Refresh HiveGrid Cloud reference snapshot
This commit is contained in:
1 parent
5e99e14772
commit
7f88026f79
5955 files changed
+1177325
-188362
No files matched your search
+2
-2
@@ -69,11 +69,11 @@ const InputCombobox = (
|
||||
help,
|
||||
hint,
|
||||
icon,
|
||||
borderless,
|
||||
borderless: _borderless,
|
||||
darkMode,
|
||||
autoFocus,
|
||||
readOnly,
|
||||
renderHiddenInputValue,
|
||||
renderHiddenInputValue: _renderHiddenInputValue,
|
||||
prefix,
|
||||
onClear,
|
||||
minDisplayCount = 3,
|
||||
|
||||
+6
-7
@@ -1,6 +1,5 @@
|
||||
import * as React from "react";
|
||||
import { t as i18nT } from "i18next";
|
||||
import { parse } from "date-fns";
|
||||
import { requestScopedT as i18nT } from "~/locale/request-scoped-t";
|
||||
import { CalendarIcon, ChevronDownIcon, XIcon } from "~/components/ui/icons/vendor";
|
||||
import { Button } from "../button";
|
||||
import { Popover, PopoverContent, PopoverTrigger } from "../popover";
|
||||
@@ -32,12 +31,12 @@ export function InputDatePickerDeprecated({
|
||||
name,
|
||||
date,
|
||||
setDate,
|
||||
dirty,
|
||||
dirty: _dirty,
|
||||
canClear = true,
|
||||
className,
|
||||
closeOnSelect = false,
|
||||
showInput = false,
|
||||
placeholder,
|
||||
showInput: _showInput = false,
|
||||
placeholder: _placeholder,
|
||||
required,
|
||||
disabled,
|
||||
autoFocus,
|
||||
@@ -58,7 +57,7 @@ export function InputDatePickerDeprecated({
|
||||
if (!isNaN(parsedDate.getTime())) {
|
||||
setInputValue(parsedDate.toISOString().split("T")[0]);
|
||||
}
|
||||
} catch (e) {
|
||||
} catch (_e) {
|
||||
console.error("Invalid date:", date);
|
||||
}
|
||||
} else {
|
||||
@@ -88,7 +87,7 @@ export function InputDatePickerDeprecated({
|
||||
if (!isNaN(parsedDate.getTime())) {
|
||||
return formatters.date(parsedDate, { dateStyle: "long" });
|
||||
}
|
||||
} catch (e) {
|
||||
} catch (_e) {
|
||||
console.error("Invalid date:", date);
|
||||
}
|
||||
return null;
|
||||
|
||||
+16
-23
@@ -1,4 +1,3 @@
|
||||
import { Transition } from "@headlessui/react";
|
||||
import clsx from "clsx";
|
||||
import { FormEvent, Fragment, useEffect, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
@@ -12,9 +11,8 @@ import InputSearch from "./InputSearch";
|
||||
import InputSelect from "./InputSelect";
|
||||
import { Input } from "../input";
|
||||
import { Button } from "../button";
|
||||
import { cn } from "~/lib/utils";
|
||||
import { Button as UiButton } from "~/ui/components/Button";
|
||||
import { Popover, PopoverContent, PopoverTrigger } from "~/components/ui/popover";
|
||||
import { PopoverClose } from "@radix-ui/react-popover";
|
||||
import { translateLabel } from "~/utils/i18n/translateLabel";
|
||||
// import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from "../dropdown-menu";
|
||||
|
||||
@@ -144,7 +142,7 @@ export default function InputFilters({ filters, withSearch = true, size = "defau
|
||||
<Fragment>
|
||||
<Popover open={opened} onOpenChange={setOpened}>
|
||||
<PopoverTrigger asChild>
|
||||
<Button type="button" aria-label={t("shared.filters")} size={size} onClick={() => setOpened(!opened)} variant="outline" className="relative z-0 inline-flex shrink-0 gap-2">
|
||||
<Button type="button" aria-label={t("shared.filters")} size={size} variant="outline" className="relative z-0 inline-flex shrink-0 gap-2">
|
||||
<div className={clsx("relative inline-flex items-center gap-2", filteredItems === 0 ? "rounded-md" : "rounded-l-md")}>
|
||||
<div>
|
||||
{filteredItems === 0 && <FilterEmptyIcon className="h-3 w-3" />}
|
||||
@@ -164,23 +162,18 @@ export default function InputFilters({ filters, withSearch = true, size = "defau
|
||||
)}
|
||||
</Button>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className="p-0">
|
||||
<Form
|
||||
onSubmit={onSubmit}
|
||||
method="get"
|
||||
className={cn(
|
||||
"bg-surface-neutral-primary divide-border-default ring-opacity-5 z-40 divide-y rounded-md shadow-2xl ring-1 ring-black focus:outline-none",
|
||||
position === "right" ? "right-0" : "left-0"
|
||||
)}
|
||||
>
|
||||
<div className="flex items-center justify-between px-2 py-2 text-sm">
|
||||
<Button type="button" variant="outline" onClick={onClear}>
|
||||
{t("shared.reset")}
|
||||
</Button>
|
||||
<div className="font-bold">{t("shared.filters")}</div>
|
||||
<Button type="submit" variant="outline">
|
||||
{t("shared.apply")}
|
||||
</Button>
|
||||
<PopoverContent className="w-80 p-0" align={position === "right" ? "end" : "start"} collisionPadding={8}>
|
||||
<Form onSubmit={onSubmit} method="get" className="divide-border-default divide-y rounded-md">
|
||||
<div className="flex items-center justify-between gap-2 px-3 py-2 text-sm">
|
||||
<div className="font-medium">{t("shared.filters")}</div>
|
||||
<div className="flex shrink-0 items-center gap-2">
|
||||
<UiButton type="button" variant="tertiary" size="small" onClick={onClear}>
|
||||
{t("shared.reset")}
|
||||
</UiButton>
|
||||
<UiButton type="submit" size="small">
|
||||
{t("shared.apply")}
|
||||
</UiButton>
|
||||
</div>
|
||||
</div>
|
||||
<div className="bg-surface-neutral-primary divide-border-default divide-y rounded-b-md text-sm">
|
||||
{withSearch && (
|
||||
@@ -190,8 +183,8 @@ export default function InputFilters({ filters, withSearch = true, size = "defau
|
||||
)}
|
||||
{items.map((filter, idx) => {
|
||||
return (
|
||||
<div key={filter.name} className="divide-border divide-y">
|
||||
<div className="divide-y divide-gray-300 px-2 py-2">
|
||||
<div key={filter.name} className="divide-border-default divide-y">
|
||||
<div className="px-2 py-2">
|
||||
<InputCheckboxInline
|
||||
name={"filter-" + filter.name}
|
||||
title={translateLabel(t, i18n, filter.title)}
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ type Props = (WithDefaultValue | WithValueAndSetValue) & {
|
||||
description?: string;
|
||||
className?: string;
|
||||
};
|
||||
const InputImage = (props: Props, ref: Ref<RefInputImage>) => {
|
||||
const InputImage = (props: Props, _ref: Ref<RefInputImage>) => {
|
||||
const value = "value" in props ? props.value : undefined;
|
||||
const setValue = "setValue" in props ? props.setValue : undefined;
|
||||
const defaultValue = "defaultValue" in props ? props.defaultValue : undefined;
|
||||
|
||||
+3
-3
@@ -48,7 +48,7 @@ const InputMultiText = (
|
||||
withLabel = true,
|
||||
value,
|
||||
className,
|
||||
classNameBg,
|
||||
classNameBg: _classNameBg,
|
||||
help,
|
||||
disabled = false,
|
||||
readOnly = false,
|
||||
@@ -59,14 +59,14 @@ const InputMultiText = (
|
||||
placeholder,
|
||||
pattern,
|
||||
hint,
|
||||
rows,
|
||||
rows: _rows,
|
||||
button,
|
||||
lowercase,
|
||||
uppercase,
|
||||
darkMode,
|
||||
icon,
|
||||
onBlur,
|
||||
borderless,
|
||||
borderless: _borderless,
|
||||
autoFocus,
|
||||
separator = ",",
|
||||
}: Props,
|
||||
|
||||
+4
-5
@@ -1,9 +1,8 @@
|
||||
import React, { useState, useRef, useEffect, KeyboardEvent, ReactNode, RefObject, Ref, forwardRef, useImperativeHandle } from "react";
|
||||
import React, { useState, useRef, KeyboardEvent, ReactNode, RefObject, Ref, forwardRef, useImperativeHandle } from "react";
|
||||
import clsx from "clsx";
|
||||
import HintTooltip from "../tooltips/HintTooltip";
|
||||
import EntityIcon from "~/components/layouts/icons/EntityIcon";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { RowValueMultipleDto } from "~/application/dtos/entities/RowValueMultipleDto";
|
||||
import { SeparatorFormatType } from "~/utils/shared/SeparatorUtils";
|
||||
import { Input } from "../input";
|
||||
|
||||
@@ -50,7 +49,7 @@ const InputMultipleText = (
|
||||
value,
|
||||
onChange,
|
||||
className,
|
||||
classNameBg,
|
||||
classNameBg: _classNameBg,
|
||||
help,
|
||||
disabled = false,
|
||||
readOnly = false,
|
||||
@@ -61,14 +60,14 @@ const InputMultipleText = (
|
||||
placeholder,
|
||||
pattern,
|
||||
hint,
|
||||
rows,
|
||||
rows: _rows,
|
||||
button,
|
||||
lowercase,
|
||||
uppercase,
|
||||
darkMode,
|
||||
icon,
|
||||
onBlur,
|
||||
borderless,
|
||||
borderless: _borderless,
|
||||
autoFocus,
|
||||
separator = ",",
|
||||
}: Props,
|
||||
|
||||
+6
-8
@@ -7,7 +7,7 @@ import Color from "@tiptap/extension-color";
|
||||
import { createTiptapEditorProps } from "~/modules/novel/ui/editor/props";
|
||||
import { createTiptapExtensions } from "~/modules/novel/ui/editor/extensions";
|
||||
import { cn } from "~/lib/utils";
|
||||
import { useRootData } from "~/utils/data/useRootData";
|
||||
import { sanitizeMarkedHtml } from "~/utils/html-sanitizer";
|
||||
|
||||
function MenuBar({ editor, disabled }: { editor: Editor | null; disabled?: boolean }) {
|
||||
const { t } = useTranslation();
|
||||
@@ -232,18 +232,16 @@ export interface InputRichTextEditorClientProps {
|
||||
style?: React.CSSProperties;
|
||||
}
|
||||
|
||||
export default function InputRichTextEditorClient({ content, onChange, disabled, className, dirty, placeholder, required, style }: InputRichTextEditorClientProps) {
|
||||
const rootData = useRootData();
|
||||
export default function InputRichTextEditorClient({ content, onChange, disabled, className, dirty, placeholder: _placeholder, required, style }: InputRichTextEditorClientProps) {
|
||||
const [hydrated, setHydrated] = useState(false);
|
||||
const imageUploadOptions = useMemo(() => ({ apiBaseUrl: rootData.apiBaseUrl, tenantId: rootData.currentTenant?.id ?? null }), [rootData.apiBaseUrl, rootData.currentTenant?.id]);
|
||||
const extensions: Extensions = useMemo(
|
||||
() => [
|
||||
...createTiptapExtensions(imageUploadOptions),
|
||||
...createTiptapExtensions(),
|
||||
Color.configure({ types: ["textStyle"] }), // enables color
|
||||
],
|
||||
[imageUploadOptions]
|
||||
[]
|
||||
);
|
||||
const editorProps = useMemo(() => createTiptapEditorProps(imageUploadOptions), [imageUploadOptions]);
|
||||
const editorProps = useMemo(() => createTiptapEditorProps(), []);
|
||||
|
||||
const debouncedUpdates = useCallback(
|
||||
({ editor }: { editor: Editor }) => {
|
||||
@@ -308,7 +306,7 @@ export default function InputRichTextEditorClient({ content, onChange, disabled,
|
||||
>
|
||||
{disabled ? (
|
||||
<div className="cursor-not-allowed">
|
||||
<div dangerouslySetInnerHTML={{ __html: editor?.getHTML() || "" }} />
|
||||
<div dangerouslySetInnerHTML={{ __html: sanitizeMarkedHtml(editor?.getHTML()) }} />
|
||||
</div>
|
||||
) : (
|
||||
<EditorContent editor={editor} disabled={disabled} required={required} />
|
||||
|
||||
+6
@@ -37,6 +37,8 @@ interface Props {
|
||||
style?: React.CSSProperties;
|
||||
hideIcon?: boolean;
|
||||
icon?: React.ReactNode;
|
||||
triggerAriaLabel?: string;
|
||||
highContrastText?: boolean;
|
||||
}
|
||||
export default function InputSelect({
|
||||
name,
|
||||
@@ -62,6 +64,8 @@ export default function InputSelect({
|
||||
style,
|
||||
icon,
|
||||
hideIcon = false,
|
||||
triggerAriaLabel,
|
||||
highContrastText = false,
|
||||
}: Props) {
|
||||
const { t } = useTranslation();
|
||||
const refSearch = useRef<HTMLInputElement>(null);
|
||||
@@ -132,6 +136,8 @@ export default function InputSelect({
|
||||
label={labelContent}
|
||||
icon={!hideIcon ? icon : undefined}
|
||||
placeholder={getPlaceholder()}
|
||||
triggerAriaLabel={triggerAriaLabel}
|
||||
highContrastText={highContrastText}
|
||||
>
|
||||
{withSearch && options.length > 30 && (
|
||||
<Input
|
||||
|
||||
+1
@@ -15,5 +15,6 @@ describe("Lazy rich text editor boundary", () => {
|
||||
|
||||
expect(clientSource).toContain("@tiptap/react");
|
||||
expect(clientSource).toContain("@tiptap/extension-color");
|
||||
expect(clientSource).toContain("sanitizeMarkedHtml(editor?.getHTML())");
|
||||
});
|
||||
});
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { t as i18nT } from "i18next";
|
||||
import { requestScopedT as i18nT } from "~/locale/request-scoped-t";
|
||||
import { Switch } from "~/ui/components/Switch";
|
||||
|
||||
// Subframe migration (strangler shim):
|
||||
|
||||
+1
-1
@@ -241,7 +241,7 @@ const InputSelectorDarkMode = (
|
||||
}
|
||||
value={group}
|
||||
>
|
||||
{({ selected, active }) => (
|
||||
{({ selected, active: _active }) => (
|
||||
<Fragment>
|
||||
<span className={clsx("text-muted-foreground text-xs font-medium", selected ? "font-semibold" : "font-normal")}>{group.name}</span>
|
||||
</Fragment>
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { t as i18nT } from "i18next";
|
||||
import { requestScopedT as i18nT } from "~/locale/request-scoped-t";
|
||||
import InputText from "../InputText";
|
||||
|
||||
export default function PreviewInputText() {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { t as i18nT } from "i18next";
|
||||
import { requestScopedT as i18nT } from "~/locale/request-scoped-t";
|
||||
import InputCheckbox from "~/components/ui/input/InputCheckbox";
|
||||
|
||||
export default function PreviewInputCheckbox() {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { t as i18nT } from "i18next";
|
||||
import { requestScopedT as i18nT } from "~/locale/request-scoped-t";
|
||||
import { useState } from "react";
|
||||
import InputCheckboxCards from "../../InputCheckboxCards";
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import { useState } from "react";
|
||||
import { t as i18nT } from "i18next";
|
||||
import { requestScopedT as i18nT } from "~/locale/request-scoped-t";
|
||||
import InputCheckbox from "~/components/ui/input/InputCheckbox";
|
||||
|
||||
export default function PreviewInputCheckboxWithState() {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { t as i18nT } from "i18next";
|
||||
import { requestScopedT as i18nT } from "~/locale/request-scoped-t";
|
||||
import InputDate from "~/components/ui/input/InputDate";
|
||||
|
||||
export default function PreviewInputDate() {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import { useState } from "react";
|
||||
import { t as i18nT } from "i18next";
|
||||
import { requestScopedT as i18nT } from "~/locale/request-scoped-t";
|
||||
import InputDate from "~/components/ui/input/InputDate";
|
||||
|
||||
export default function PreviewInputDateWithState() {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { t as i18nT } from "i18next";
|
||||
import { requestScopedT as i18nT } from "~/locale/request-scoped-t";
|
||||
import InputNumber from "~/components/ui/input/InputNumber";
|
||||
|
||||
export default function PreviewInputNumber() {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import { useState } from "react";
|
||||
import { t as i18nT } from "i18next";
|
||||
import { requestScopedT as i18nT } from "~/locale/request-scoped-t";
|
||||
import InputNumber from "~/components/ui/input/InputNumber";
|
||||
|
||||
export default function PreviewInputNumberWithAllOptions() {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import InputNumber from "~/components/ui/input/InputNumber";
|
||||
import { t as i18nT } from "i18next";
|
||||
import { requestScopedT as i18nT } from "~/locale/request-scoped-t";
|
||||
|
||||
export default function PreviewInputNumberWithHintAndHelp() {
|
||||
return (
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { t as i18nT } from "i18next";
|
||||
import { requestScopedT as i18nT } from "~/locale/request-scoped-t";
|
||||
import InputRadioGroup from "~/components/ui/input/InputRadioGroup";
|
||||
|
||||
export default function PreviewInputRadioGroup() {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { t as i18nT } from "i18next";
|
||||
import { requestScopedT as i18nT } from "~/locale/request-scoped-t";
|
||||
import InputRadioGroupCards from "../../InputRadioGroupCards";
|
||||
|
||||
export default function PreviewInputRadioGroupCards() {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { t as i18nT } from "i18next";
|
||||
import { requestScopedT as i18nT } from "~/locale/request-scoped-t";
|
||||
import { useState } from "react";
|
||||
import InputRadioGroup from "~/components/ui/input/InputRadioGroup";
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { t as i18nT } from "i18next";
|
||||
import { requestScopedT as i18nT } from "~/locale/request-scoped-t";
|
||||
import InputCombobox from "../../InputCombobox";
|
||||
|
||||
export default function PreviewInputCombobox() {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { t as i18nT } from "i18next";
|
||||
import { requestScopedT as i18nT } from "~/locale/request-scoped-t";
|
||||
import InputSelect from "~/components/ui/input/InputSelect";
|
||||
|
||||
export default function PreviewInputSelect() {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { t as i18nT } from "i18next";
|
||||
import { requestScopedT as i18nT } from "~/locale/request-scoped-t";
|
||||
import { useState } from "react";
|
||||
import InputSelect from "~/components/ui/input/InputSelect";
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { t as i18nT } from "i18next";
|
||||
import { requestScopedT as i18nT } from "~/locale/request-scoped-t";
|
||||
import InputSelector from "~/components/ui/input/InputSelector";
|
||||
|
||||
export default function PreviewInputSelector() {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { t as i18nT } from "i18next";
|
||||
import { requestScopedT as i18nT } from "~/locale/request-scoped-t";
|
||||
import { useState } from "react";
|
||||
import InputSelector from "~/components/ui/input/InputSelector";
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import InputMultiText from "../../InputMultiText";
|
||||
import { t as i18nT } from "i18next";
|
||||
import { requestScopedT as i18nT } from "~/locale/request-scoped-t";
|
||||
|
||||
export default function PreviewInputMultiText() {
|
||||
return (
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { t as i18nT } from "i18next";
|
||||
import { requestScopedT as i18nT } from "~/locale/request-scoped-t";
|
||||
import InputText from "~/components/ui/input/InputText";
|
||||
|
||||
export default function PreviewInputText() {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import { useState } from "react";
|
||||
import { t as i18nT } from "i18next";
|
||||
import { requestScopedT as i18nT } from "~/locale/request-scoped-t";
|
||||
import InputText from "~/components/ui/input/InputText";
|
||||
|
||||
export default function PreviewInputTextWithAllOptions() {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import InputText from "~/components/ui/input/InputText";
|
||||
import { t as i18nT } from "i18next";
|
||||
import { requestScopedT as i18nT } from "~/locale/request-scoped-t";
|
||||
|
||||
export default function PreviewInputTextWithHint() {
|
||||
return (
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ export default function PreviewInputTextWithMonacoEditor() {
|
||||
|
||||
_Image_:
|
||||
|
||||
)})
|
||||

|
||||
`
|
||||
);
|
||||
return (
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import { useState } from "react";
|
||||
import { t as i18nT } from "i18next";
|
||||
import { requestScopedT as i18nT } from "~/locale/request-scoped-t";
|
||||
import InputText from "~/components/ui/input/InputText";
|
||||
|
||||
export default function PreviewInputTextWithTranslation() {
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ export default function InputRangeNumber({
|
||||
step,
|
||||
placeholder,
|
||||
icon,
|
||||
borderless,
|
||||
borderless: _borderless,
|
||||
autoFocus,
|
||||
}: Props) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
+2
-2
@@ -46,7 +46,7 @@ const InputEmail = (
|
||||
value,
|
||||
setValue,
|
||||
className,
|
||||
classNameBg,
|
||||
classNameBg: _classNameBg,
|
||||
help,
|
||||
disabled = false,
|
||||
readOnly = false,
|
||||
@@ -62,7 +62,7 @@ const InputEmail = (
|
||||
type = "email",
|
||||
darkMode,
|
||||
onBlur,
|
||||
borderless,
|
||||
borderless: _borderless,
|
||||
autoFocus,
|
||||
}: Props,
|
||||
ref: Ref<RefInputEmail>
|
||||
|
||||
+3
-3
@@ -45,12 +45,12 @@ export default function InputPhone({
|
||||
value,
|
||||
setValue,
|
||||
className,
|
||||
classNameBg,
|
||||
classNameBg: _classNameBg,
|
||||
help,
|
||||
disabled = false,
|
||||
readOnly = false,
|
||||
required = false,
|
||||
minLength,
|
||||
minLength: _minLength,
|
||||
maxLength,
|
||||
placeholder,
|
||||
pattern,
|
||||
@@ -61,7 +61,7 @@ export default function InputPhone({
|
||||
type = "text",
|
||||
darkMode,
|
||||
onBlur,
|
||||
borderless,
|
||||
borderless: _borderless,
|
||||
autoFocus,
|
||||
}: Props) {
|
||||
// useImperativeHandle(ref, () => ({ input }));
|
||||
|
||||
+1
-1
@@ -67,7 +67,7 @@ export function InputPhoneWithMaskControlled({
|
||||
value,
|
||||
onChange,
|
||||
className = "",
|
||||
placeholder = "",
|
||||
placeholder: _placeholder = "",
|
||||
required = false,
|
||||
dirty = false,
|
||||
style,
|
||||
|
||||
+1
-2
@@ -4,7 +4,6 @@ import * as React from "react";
|
||||
import { OTPInput, OTPInputContext } from "input-otp";
|
||||
import { Label } from "~/components/ui/label";
|
||||
import { cn } from "~/lib/utils";
|
||||
import { inputVariants } from "../../input";
|
||||
|
||||
interface InputTimeProps {
|
||||
name?: string;
|
||||
@@ -52,7 +51,7 @@ function TimeSlot({
|
||||
);
|
||||
}
|
||||
|
||||
export function InputTime({ name, value = "", onChange, required = false, disabled = false, style, label, description, format = "HH:MM:SS" }: InputTimeProps) {
|
||||
export function InputTime({ name: _name, value = "", onChange, required = false, disabled = false, style, label, description, format = "HH:MM:SS" }: InputTimeProps) {
|
||||
const maxLength = format === "HH:MM" ? 4 : 6;
|
||||
|
||||
// Convert value to OTP format (remove colons)
|
||||
|
||||
+3
-3
@@ -52,7 +52,7 @@ const InputUrl = (
|
||||
value,
|
||||
setValue,
|
||||
className,
|
||||
classNameBg,
|
||||
classNameBg: _classNameBg,
|
||||
help,
|
||||
disabled = false,
|
||||
readOnly = false,
|
||||
@@ -65,14 +65,14 @@ const InputUrl = (
|
||||
placeholder,
|
||||
pattern,
|
||||
hint,
|
||||
rows,
|
||||
rows: _rows,
|
||||
button,
|
||||
lowercase,
|
||||
uppercase,
|
||||
type = "text",
|
||||
darkMode,
|
||||
onBlur,
|
||||
borderless,
|
||||
borderless: _borderless,
|
||||
autoFocus,
|
||||
}: Props,
|
||||
ref: Ref<RefInputUrl>
|
||||
|
||||
Reference in new issue
Block a user