@datum-cloud/datum-ui 0.6.0-alpha.b817c77 → 0.6.0-alpha.b8a44ac
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/combobox/index.mjs +2 -0
- package/dist/combobox-cKTFK4uN.mjs +96 -0
- package/dist/components/features/combobox/combobox.d.ts +27 -0
- package/dist/components/features/combobox/combobox.d.ts.map +1 -0
- package/dist/components/features/combobox/index.d.ts +3 -0
- package/dist/components/features/combobox/index.d.ts.map +1 -0
- package/dist/components/features/combobox/types.d.ts +78 -0
- package/dist/components/features/combobox/types.d.ts.map +1 -0
- package/dist/components/features/date-time-picker/date-time-picker.d.ts +9 -0
- package/dist/components/features/date-time-picker/date-time-picker.d.ts.map +1 -0
- package/dist/components/features/date-time-picker/index.d.ts +3 -0
- package/dist/components/features/date-time-picker/index.d.ts.map +1 -0
- package/dist/components/features/date-time-picker/types.d.ts +53 -0
- package/dist/components/features/date-time-picker/types.d.ts.map +1 -0
- package/dist/components/features/date-time-picker/utils/format.d.ts +13 -0
- package/dist/components/features/date-time-picker/utils/format.d.ts.map +1 -0
- package/dist/components/features/date-time-picker/utils/index.d.ts +3 -0
- package/dist/components/features/date-time-picker/utils/index.d.ts.map +1 -0
- package/dist/components/features/date-time-picker/utils/timezone.d.ts +23 -0
- package/dist/components/features/date-time-picker/utils/timezone.d.ts.map +1 -0
- package/dist/components/features/form/adapter-types.d.ts +20 -0
- package/dist/components/features/form/adapter-types.d.ts.map +1 -1
- package/dist/components/features/form/adapters/conform/conform-adapter.d.ts.map +1 -1
- package/dist/components/features/form/adapters/rhf/rhf-adapter.d.ts.map +1 -1
- package/dist/components/features/form/components/form-autosearch.d.ts +25 -0
- package/dist/components/features/form/components/form-autosearch.d.ts.map +1 -0
- package/dist/components/features/form/components/form-combobox.d.ts +76 -0
- package/dist/components/features/form/components/form-combobox.d.ts.map +1 -0
- package/dist/components/features/form/components/form-copy-box.d.ts +3 -0
- package/dist/components/features/form/components/form-copy-box.d.ts.map +1 -1
- package/dist/components/features/form/components/form-custom.d.ts.map +1 -1
- package/dist/components/features/form/components/form-date-picker.d.ts +38 -0
- package/dist/components/features/form/components/form-date-picker.d.ts.map +1 -0
- package/dist/components/features/form/components/form-date-time-picker.d.ts +37 -0
- package/dist/components/features/form/components/form-date-time-picker.d.ts.map +1 -0
- package/dist/components/features/form/components/form-dialog.d.ts.map +1 -1
- package/dist/components/features/form/components/form-radio-group.d.ts.map +1 -1
- package/dist/components/features/form/components/form-root.d.ts.map +1 -1
- package/dist/components/features/form/components/form-time-picker.d.ts +21 -0
- package/dist/components/features/form/components/form-time-picker.d.ts.map +1 -0
- package/dist/components/features/form/components/form-transfer.d.ts +37 -0
- package/dist/components/features/form/components/form-transfer.d.ts.map +1 -0
- package/dist/components/features/form/components/index.d.ts +7 -1
- package/dist/components/features/form/components/index.d.ts.map +1 -1
- package/dist/components/features/form/components/stepper/form-stepper.d.ts.map +1 -1
- package/dist/components/features/form/hooks/index.d.ts +1 -1
- package/dist/components/features/form/hooks/index.d.ts.map +1 -1
- package/dist/components/features/form/hooks/use-form-state.d.ts +36 -0
- package/dist/components/features/form/hooks/use-form-state.d.ts.map +1 -0
- package/dist/components/features/form/index.d.ts +39 -21
- package/dist/components/features/form/index.d.ts.map +1 -1
- package/dist/components/features/form/stepper/index.d.ts +17 -0
- package/dist/components/features/form/stepper/index.d.ts.map +1 -0
- package/dist/components/features/form/types/index.d.ts +36 -0
- package/dist/components/features/form/types/index.d.ts.map +1 -1
- package/dist/components/features/form/utils/get-field-constraints.d.ts +23 -1
- package/dist/components/features/form/utils/get-field-constraints.d.ts.map +1 -1
- package/dist/components/features/form/utils/get-schema-defaults.d.ts +24 -0
- package/dist/components/features/form/utils/get-schema-defaults.d.ts.map +1 -0
- package/dist/components/features/form/utils/zod-helpers.d.ts +12 -0
- package/dist/components/features/form/utils/zod-helpers.d.ts.map +1 -0
- package/dist/components/features/time-picker/index.d.ts +3 -0
- package/dist/components/features/time-picker/index.d.ts.map +1 -0
- package/dist/components/features/time-picker/time-picker.d.ts +22 -0
- package/dist/components/features/time-picker/time-picker.d.ts.map +1 -0
- package/dist/components/features/time-picker/types.d.ts +31 -0
- package/dist/components/features/time-picker/types.d.ts.map +1 -0
- package/dist/components/features/transfer/components/index.d.ts +9 -0
- package/dist/components/features/transfer/components/index.d.ts.map +1 -0
- package/dist/components/features/transfer/components/transfer-group.d.ts +7 -0
- package/dist/components/features/transfer/components/transfer-group.d.ts.map +1 -0
- package/dist/components/features/transfer/components/transfer-item.d.ts +10 -0
- package/dist/components/features/transfer/components/transfer-item.d.ts.map +1 -0
- package/dist/components/features/transfer/components/transfer-panel.d.ts +18 -0
- package/dist/components/features/transfer/components/transfer-panel.d.ts.map +1 -0
- package/dist/components/features/transfer/components/transfer-search.d.ts +9 -0
- package/dist/components/features/transfer/components/transfer-search.d.ts.map +1 -0
- package/dist/components/features/transfer/hooks/use-transfer-dnd.d.ts +26 -0
- package/dist/components/features/transfer/hooks/use-transfer-dnd.d.ts.map +1 -0
- package/dist/components/features/transfer/hooks/use-transfer-state.d.ts +20 -0
- package/dist/components/features/transfer/hooks/use-transfer-state.d.ts.map +1 -0
- package/dist/components/features/transfer/index.d.ts +3 -0
- package/dist/components/features/transfer/index.d.ts.map +1 -0
- package/dist/components/features/transfer/transfer.d.ts +6 -0
- package/dist/components/features/transfer/transfer.d.ts.map +1 -0
- package/dist/components/features/transfer/types.d.ts +69 -0
- package/dist/components/features/transfer/types.d.ts.map +1 -0
- package/dist/date-picker/index.mjs +1 -1
- package/dist/date-time-picker/index.mjs +2 -0
- package/dist/date-time-picker-Dy2jrJoN.mjs +175 -0
- package/dist/form/adapters/conform/index.mjs +102 -12
- package/dist/form/adapters/rhf/index.mjs +112 -26
- package/dist/form/index.mjs +3 -3
- package/dist/form/stepper/index.mjs +541 -0
- package/dist/form-context-Ccxm-wqL.mjs +17 -0
- package/dist/{form-BE1xBne4.mjs → form-mlNLKaB5.mjs} +350 -592
- package/dist/{get-field-constraints-BPMW8VvY.mjs → get-field-constraints-BicgDkfH.mjs} +19 -16
- package/dist/grid/index.mjs +1 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/index.mjs +14 -14
- package/dist/input-number/index.mjs +1 -1
- package/dist/map/index.mjs +1 -1
- package/dist/{map-Cw7u8r6E.mjs → map-CWIQ-eql.mjs} +1 -1
- package/dist/more-actions/index.mjs +1 -1
- package/dist/page-title/index.mjs +1 -1
- package/dist/stepper/index.mjs +1 -320
- package/dist/stepper-DvIOp0hh.mjs +321 -0
- package/dist/tag-input/index.mjs +1 -1
- package/dist/task-queue/index.mjs +1 -1
- package/dist/time-picker/index.mjs +2 -0
- package/dist/time-picker-BoF7pZZ2.mjs +43 -0
- package/dist/transfer/index.mjs +2 -0
- package/dist/transfer-B2n8pgEQ.mjs +260 -0
- package/package.json +37 -1
- /package/dist/{adapter-context-B7L2ucTr.mjs → adapter-context-rWveHhDd.mjs} +0 -0
- /package/dist/{col-YBbQ5wlb.mjs → col-1T0Q3SlH.mjs} +0 -0
- /package/dist/{hooks-DYjN7lvC.mjs → hooks-D8r2M2U6.mjs} +0 -0
- /package/dist/{input-number-DEjXG2I6.mjs → input-number-a7uydAsw.mjs} +0 -0
- /package/dist/{map-leaflet-imports-D6nTEOIh.mjs → map-leaflet-imports-CRSKA79m.mjs} +0 -0
- /package/dist/{more-actions-BNQ2yfWZ.mjs → more-actions-ILnEZq_E.mjs} +0 -0
- /package/dist/{page-title-CNiRNZ7p.mjs → page-title-ChsnpBiH.mjs} +0 -0
- /package/dist/{tag-input-BKed-cul.mjs → tag-input-T9cUX9-G.mjs} +0 -0
- /package/dist/{task-queue-dropdown-Di_Wjspz.mjs → task-queue-dropdown-Wcbj-f0V.mjs} +0 -0
- /package/dist/{to-api-format-Cq4prffn.mjs → to-api-format-Bh3c01gr.mjs} +0 -0
- /package/dist/{use-copy-to-clipboard-BGdTmkFV.mjs → use-copy-to-clipboard-uNeeVHC4.mjs} +0 -0
package/README.md
CHANGED
|
@@ -141,8 +141,10 @@ Complex, fully-customized components with significant business logic.
|
|
|
141
141
|
| `Autocomplete` | — | Search autocomplete input |
|
|
142
142
|
| `AvatarStack` | — | Stacked avatar display |
|
|
143
143
|
| `CalendarDatePicker` | `react-day-picker`, `date-fns` | Date/range picker with presets |
|
|
144
|
+
| `Combobox` | — | Searchable single-select dropdown |
|
|
144
145
|
| `CodeEditor`, `CodeEditorTabs` | `@monaco-editor/react`, `monaco-editor` | Monaco-based code editor with VS Code UX |
|
|
145
146
|
| `DataTable`, `DataTableColumnHeader`, `DataTablePagination`, `DataTableToolbar`, `DataTableViewOptions` | `@tanstack/react-table` | Advanced data table with sorting/filtering |
|
|
147
|
+
| `DateTimePicker`, `TimePicker` | `date-fns`, `date-fns-tz` | Date/time picker with timezone support |
|
|
146
148
|
| `Dropdown`, `DropdownHeader`, `DropdownItem`, `DropdownSection` | — | Dropdown menu |
|
|
147
149
|
| `Dropzone` | `react-dropzone` | File drag-and-drop upload area |
|
|
148
150
|
| `EmptyContent` | — | Empty state placeholder |
|
|
@@ -160,6 +162,7 @@ Complex, fully-customized components with significant business logic.
|
|
|
160
162
|
| `TagInput` | — | Tag/chip input |
|
|
161
163
|
| `TaskQueue`, `TaskQueueProvider`, `TaskQueueDropdown`, `TaskPanelHeader`, `TaskSummaryDialog` | — | Background task queue with progress UI |
|
|
162
164
|
| `TimeRangePicker` | `date-fns`, `date-fns-tz` | Time range selector with timezone support |
|
|
165
|
+
| `Transfer` | — | Dual-panel item selector with search |
|
|
163
166
|
| `Toast`, `Toaster`, `useToast` | `sonner` | Toast notifications |
|
|
164
167
|
|
|
165
168
|
## Usage Examples
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { t as cn } from "./cn-D2KYQ917.mjs";
|
|
2
|
+
import { a as CommandInput, i as CommandGroup, o as CommandItem, r as CommandEmpty, s as CommandList, t as Command } from "./command-DqHWukGK.mjs";
|
|
3
|
+
import { i as PopoverTrigger, r as PopoverContent, t as Popover } from "./popover-FJAcbYoH.mjs";
|
|
4
|
+
import { CheckIcon, ChevronDown, X } from "lucide-react";
|
|
5
|
+
import * as React$1 from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
//#region src/components/features/combobox/combobox.tsx
|
|
8
|
+
/**
|
|
9
|
+
* Combobox - Single-select dropdown with search
|
|
10
|
+
*
|
|
11
|
+
* A simpler alternative to Autocomplete for basic select scenarios.
|
|
12
|
+
* Supports grouped options and search filtering.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* const options = [
|
|
17
|
+
* { value: '1', label: 'Option 1' },
|
|
18
|
+
* { value: '2', label: 'Option 2' },
|
|
19
|
+
* ]
|
|
20
|
+
*
|
|
21
|
+
* <Combobox
|
|
22
|
+
* options={options}
|
|
23
|
+
* value={value}
|
|
24
|
+
* onChange={setValue}
|
|
25
|
+
* placeholder="Select an option"
|
|
26
|
+
* />
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
function Combobox({ options, value, onChange, placeholder = "Select option...", searchPlaceholder = "Search...", emptyMessage = "No options found.", disabled = false, className, triggerClassName, contentClassName, searchable = true, showDropdownArrow = true, clearable = false, id, "data-testid": testId }) {
|
|
30
|
+
const [open, setOpen] = React$1.useState(false);
|
|
31
|
+
const isGrouped = options.length > 0 && "options" in options[0];
|
|
32
|
+
const selectedOption = React$1.useMemo(() => {
|
|
33
|
+
if (isGrouped) return options.flatMap((group) => group.options);
|
|
34
|
+
return options;
|
|
35
|
+
}, [options, isGrouped]).find((opt) => opt.value === value);
|
|
36
|
+
const handleSelect = React$1.useCallback((selectedValue) => {
|
|
37
|
+
onChange?.(selectedValue === value ? void 0 : selectedValue);
|
|
38
|
+
setOpen(false);
|
|
39
|
+
}, [value, onChange]);
|
|
40
|
+
const handleClear = React$1.useCallback((e) => {
|
|
41
|
+
e.stopPropagation();
|
|
42
|
+
onChange?.(void 0);
|
|
43
|
+
}, [onChange]);
|
|
44
|
+
return /* @__PURE__ */ jsxs(Popover, {
|
|
45
|
+
open,
|
|
46
|
+
onOpenChange: setOpen,
|
|
47
|
+
children: [/* @__PURE__ */ jsx(PopoverTrigger, {
|
|
48
|
+
asChild: true,
|
|
49
|
+
children: /* @__PURE__ */ jsxs("button", {
|
|
50
|
+
type: "button",
|
|
51
|
+
role: "combobox",
|
|
52
|
+
"aria-expanded": open,
|
|
53
|
+
disabled,
|
|
54
|
+
id,
|
|
55
|
+
"data-testid": testId,
|
|
56
|
+
className: cn("flex h-10 w-full items-center justify-between rounded-lg border border-input bg-background px-3 py-2 text-sm", "ring-offset-background placeholder:text-muted-foreground", "focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", "disabled:cursor-not-allowed disabled:opacity-50", triggerClassName, className),
|
|
57
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
58
|
+
className: "truncate",
|
|
59
|
+
children: selectedOption ? selectedOption.label : placeholder
|
|
60
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
61
|
+
className: "ml-2 flex shrink-0 items-center gap-1",
|
|
62
|
+
children: [clearable && selectedOption && !disabled && /* @__PURE__ */ jsx(X, {
|
|
63
|
+
className: "size-4 opacity-50 hover:opacity-100",
|
|
64
|
+
onClick: handleClear
|
|
65
|
+
}), showDropdownArrow && /* @__PURE__ */ jsx(ChevronDown, { className: "size-4 opacity-50" })]
|
|
66
|
+
})]
|
|
67
|
+
})
|
|
68
|
+
}), /* @__PURE__ */ jsx(PopoverContent, {
|
|
69
|
+
className: cn("w-[--radix-popover-trigger-width] p-0", contentClassName),
|
|
70
|
+
align: "start",
|
|
71
|
+
children: /* @__PURE__ */ jsxs(Command, { children: [searchable && /* @__PURE__ */ jsx(CommandInput, {
|
|
72
|
+
placeholder: searchPlaceholder,
|
|
73
|
+
className: "h-9"
|
|
74
|
+
}), /* @__PURE__ */ jsxs(CommandList, {
|
|
75
|
+
className: "max-h-[300px]",
|
|
76
|
+
children: [/* @__PURE__ */ jsx(CommandEmpty, { children: emptyMessage }), isGrouped ? options.map((group) => /* @__PURE__ */ jsx(CommandGroup, {
|
|
77
|
+
heading: group.label,
|
|
78
|
+
children: group.options.map((option) => /* @__PURE__ */ jsxs(CommandItem, {
|
|
79
|
+
value: option.value,
|
|
80
|
+
disabled: option.disabled,
|
|
81
|
+
onSelect: handleSelect,
|
|
82
|
+
children: [option.label, /* @__PURE__ */ jsx(CheckIcon, { className: cn("ml-auto size-4", value === option.value ? "opacity-100" : "opacity-0") })]
|
|
83
|
+
}, option.value))
|
|
84
|
+
}, group.label)) : /* @__PURE__ */ jsx(CommandGroup, { children: options.map((option) => /* @__PURE__ */ jsxs(CommandItem, {
|
|
85
|
+
value: option.value,
|
|
86
|
+
disabled: option.disabled,
|
|
87
|
+
onSelect: handleSelect,
|
|
88
|
+
children: [option.label, /* @__PURE__ */ jsx(CheckIcon, { className: cn("ml-auto size-4", value === option.value ? "opacity-100" : "opacity-0") })]
|
|
89
|
+
}, option.value)) })]
|
|
90
|
+
})] })
|
|
91
|
+
})]
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
Combobox.displayName = "Combobox";
|
|
95
|
+
//#endregion
|
|
96
|
+
export { Combobox as t };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ComboboxProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Combobox - Single-select dropdown with search
|
|
4
|
+
*
|
|
5
|
+
* A simpler alternative to Autocomplete for basic select scenarios.
|
|
6
|
+
* Supports grouped options and search filtering.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* const options = [
|
|
11
|
+
* { value: '1', label: 'Option 1' },
|
|
12
|
+
* { value: '2', label: 'Option 2' },
|
|
13
|
+
* ]
|
|
14
|
+
*
|
|
15
|
+
* <Combobox
|
|
16
|
+
* options={options}
|
|
17
|
+
* value={value}
|
|
18
|
+
* onChange={setValue}
|
|
19
|
+
* placeholder="Select an option"
|
|
20
|
+
* />
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare function Combobox({ options, value, onChange, placeholder, searchPlaceholder, emptyMessage, disabled, className, triggerClassName, contentClassName, searchable, showDropdownArrow, clearable, id, 'data-testid': testId, }: ComboboxProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare namespace Combobox {
|
|
25
|
+
var displayName: string;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=combobox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../../../src/components/features/combobox/combobox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiC,aAAa,EAAE,MAAM,SAAS,CAAA;AAc3E;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,QAAQ,CAAC,EACvB,OAAO,EACP,KAAK,EACL,QAAQ,EACR,WAAgC,EAChC,iBAA+B,EAC/B,YAAkC,EAClC,QAAgB,EAChB,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,UAAiB,EACjB,iBAAwB,EACxB,SAAiB,EACjB,EAAE,EACF,aAAa,EAAE,MAAM,GACtB,EAAE,aAAa,2CAgIf;yBAhJe,QAAQ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/features/combobox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
export interface ComboboxOption {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface ComboboxGroup {
|
|
7
|
+
label: string;
|
|
8
|
+
options: ComboboxOption[];
|
|
9
|
+
}
|
|
10
|
+
export interface ComboboxProps {
|
|
11
|
+
/**
|
|
12
|
+
* Available options (flat or grouped)
|
|
13
|
+
*/
|
|
14
|
+
'options': ComboboxOption[] | ComboboxGroup[];
|
|
15
|
+
/**
|
|
16
|
+
* Selected value
|
|
17
|
+
*/
|
|
18
|
+
'value'?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Called when selection changes
|
|
21
|
+
*/
|
|
22
|
+
'onChange'?: (value: string | undefined) => void;
|
|
23
|
+
/**
|
|
24
|
+
* Placeholder for trigger button
|
|
25
|
+
* @default "Select option..."
|
|
26
|
+
*/
|
|
27
|
+
'placeholder'?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Placeholder for search input
|
|
30
|
+
* @default "Search..."
|
|
31
|
+
*/
|
|
32
|
+
'searchPlaceholder'?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Message shown when no options match
|
|
35
|
+
* @default "No options found."
|
|
36
|
+
*/
|
|
37
|
+
'emptyMessage'?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Disable the combobox
|
|
40
|
+
*/
|
|
41
|
+
'disabled'?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Additional CSS classes for container
|
|
44
|
+
*/
|
|
45
|
+
'className'?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Additional CSS classes for trigger button
|
|
48
|
+
*/
|
|
49
|
+
'triggerClassName'?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Additional CSS classes for popover content
|
|
52
|
+
*/
|
|
53
|
+
'contentClassName'?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Enable search functionality
|
|
56
|
+
* @default true
|
|
57
|
+
*/
|
|
58
|
+
'searchable'?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Show dropdown arrow icon
|
|
61
|
+
* @default true
|
|
62
|
+
*/
|
|
63
|
+
'showDropdownArrow'?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Allow clearing the selection
|
|
66
|
+
* @default false
|
|
67
|
+
*/
|
|
68
|
+
'clearable'?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* ID for the combobox
|
|
71
|
+
*/
|
|
72
|
+
'id'?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Test ID
|
|
75
|
+
*/
|
|
76
|
+
'data-testid'?: string;
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/features/combobox/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,cAAc,EAAE,CAAA;CAC1B;AAED,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,SAAS,EAAE,cAAc,EAAE,GAAG,aAAa,EAAE,CAAA;IAE7C;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAA;IAEhD;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IAEtB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAE5B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IAEvB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAE3B;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAE3B;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IAEtB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAE7B;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DateTimePickerProps } from './types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export declare function DateTimePicker({ ref, value, onChange, minDate, maxDate, disabledDates, timezone, showTimezoneIndicator, placeholder, disabled, className }: DateTimePickerProps & {
|
|
4
|
+
ref?: React.RefObject<HTMLDivElement | null>;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare namespace DateTimePicker {
|
|
7
|
+
var displayName: string;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=date-time-picker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-time-picker.d.ts","sourceRoot":"","sources":["../../../../src/components/features/date-time-picker/date-time-picker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAiB,MAAM,SAAS,CAAA;AAIjE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAY9B,wBAAgB,cAAc,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,QAA2B,EAAE,qBAA6B,EAAE,WAAoC,EAAE,QAAgB,EAAE,SAAS,EAAE,EAAE,mBAAmB,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;CAAE,2CAkH9R;yBAlHe,cAAc"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/features/date-time-picker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,YAAY,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export interface DateTimePickerProps {
|
|
2
|
+
/**
|
|
3
|
+
* Current value (UTC ISO string)
|
|
4
|
+
* @example "2024-01-15T14:30:00Z"
|
|
5
|
+
*/
|
|
6
|
+
value?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Called when value changes
|
|
9
|
+
*/
|
|
10
|
+
onChange?: (value: string) => void;
|
|
11
|
+
/**
|
|
12
|
+
* Minimum selectable date
|
|
13
|
+
*/
|
|
14
|
+
minDate?: Date;
|
|
15
|
+
/**
|
|
16
|
+
* Maximum selectable date
|
|
17
|
+
*/
|
|
18
|
+
maxDate?: Date;
|
|
19
|
+
/**
|
|
20
|
+
* Dates that should be disabled
|
|
21
|
+
*/
|
|
22
|
+
disabledDates?: Date[] | ((date: Date) => boolean);
|
|
23
|
+
/**
|
|
24
|
+
* Timezone for display (defaults to browser timezone)
|
|
25
|
+
* @example "America/New_York"
|
|
26
|
+
*/
|
|
27
|
+
timezone?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Show timezone indicator below input
|
|
30
|
+
* @default false
|
|
31
|
+
*/
|
|
32
|
+
showTimezoneIndicator?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Input placeholder text
|
|
35
|
+
*/
|
|
36
|
+
placeholder?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Disable the input
|
|
39
|
+
*/
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Additional CSS class
|
|
43
|
+
*/
|
|
44
|
+
className?: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Internal state for date + time selection
|
|
48
|
+
*/
|
|
49
|
+
export interface DateTimeState {
|
|
50
|
+
date: Date | undefined;
|
|
51
|
+
time: string;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/features/date-time-picker/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAElC;;OAEG;IACH,OAAO,CAAC,EAAE,IAAI,CAAA;IAEd;;OAEG;IACH,OAAO,CAAC,EAAE,IAAI,CAAA;IAEd;;OAEG;IACH,aAAa,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,CAAA;IAElD;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAE/B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,IAAI,GAAG,SAAS,CAAA;IACtB,IAAI,EAAE,MAAM,CAAA;CACb"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Format date for display
|
|
3
|
+
*/
|
|
4
|
+
export declare function formatDate(date: Date | undefined): string;
|
|
5
|
+
/**
|
|
6
|
+
* Format time for display
|
|
7
|
+
*/
|
|
8
|
+
export declare function formatTime(time: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* Format full date-time for display
|
|
11
|
+
*/
|
|
12
|
+
export declare function formatDateTime(date: Date | undefined, time: string): string;
|
|
13
|
+
//# sourceMappingURL=format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/date-time-picker/utils/format.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,GAAG,MAAM,CAIzD;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAI/C;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAI3E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/date-time-picker/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the browser's timezone
|
|
3
|
+
*/
|
|
4
|
+
export declare function getBrowserTimezone(): string;
|
|
5
|
+
/**
|
|
6
|
+
* Convert local date + time to UTC ISO string
|
|
7
|
+
* @param date - Date object (date part)
|
|
8
|
+
* @param time - Time string in HH:mm format
|
|
9
|
+
* @param timezone - IANA timezone (e.g., "America/New_York")
|
|
10
|
+
* @returns UTC ISO string
|
|
11
|
+
*/
|
|
12
|
+
export declare function localDateTimeToUtc(date: Date, time: string, timezone: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* Convert UTC ISO string to local date + time
|
|
15
|
+
* @param utcString - UTC ISO string
|
|
16
|
+
* @param timezone - IANA timezone
|
|
17
|
+
* @returns Object with date and time (HH:mm)
|
|
18
|
+
*/
|
|
19
|
+
export declare function utcToLocalDateTime(utcString: string, timezone: string): {
|
|
20
|
+
date: Date;
|
|
21
|
+
time: string;
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=timezone.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timezone.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/date-time-picker/utils/timezone.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,GACf,MAAM,CAwBR;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,GACf;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CA4B9B"}
|
|
@@ -6,6 +6,10 @@ export interface NormalizedFieldMeta {
|
|
|
6
6
|
errors: string[];
|
|
7
7
|
/** Whether the field is required (derived from schema) */
|
|
8
8
|
required: boolean;
|
|
9
|
+
/** Whether the field value differs from its default value */
|
|
10
|
+
isDirty: boolean;
|
|
11
|
+
/** Whether the field has been focused and blurred */
|
|
12
|
+
isTouched: boolean;
|
|
9
13
|
}
|
|
10
14
|
export interface NormalizedFieldState extends NormalizedFieldMeta {
|
|
11
15
|
/** Field name (supports dot-notation paths) */
|
|
@@ -39,6 +43,20 @@ export interface NormalizedFieldArray {
|
|
|
39
43
|
/** Move an item from one index to another */
|
|
40
44
|
move: (from: number, to: number) => void;
|
|
41
45
|
}
|
|
46
|
+
export interface NormalizedFormState {
|
|
47
|
+
/** Whether any field value differs from its default value */
|
|
48
|
+
isDirty: boolean;
|
|
49
|
+
/** Whether the form currently passes validation */
|
|
50
|
+
isValid: boolean;
|
|
51
|
+
/** Whether the form has been submitted at least once */
|
|
52
|
+
isSubmitted: boolean;
|
|
53
|
+
/** Number of times the form has been submitted */
|
|
54
|
+
submitCount: number;
|
|
55
|
+
/** Record of which fields have been modified from defaults */
|
|
56
|
+
dirtyFields: Record<string, boolean>;
|
|
57
|
+
/** Record of which fields have been focused and blurred */
|
|
58
|
+
touchedFields: Record<string, boolean>;
|
|
59
|
+
}
|
|
42
60
|
export interface NormalizedFormInstance {
|
|
43
61
|
/** Form ID */
|
|
44
62
|
id: string;
|
|
@@ -46,6 +64,8 @@ export interface NormalizedFormInstance {
|
|
|
46
64
|
fields: Record<string, NormalizedFieldMeta>;
|
|
47
65
|
/** Props to spread on the <form> element (id, onSubmit, noValidate, etc.) */
|
|
48
66
|
formProps: Record<string, unknown>;
|
|
67
|
+
/** Reactive form-level state (dirty, valid, submitted, etc.) */
|
|
68
|
+
formState: NormalizedFormState;
|
|
49
69
|
/** Programmatically submit the form */
|
|
50
70
|
submit: () => void;
|
|
51
71
|
/** Reset the form to default values */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter-types.d.ts","sourceRoot":"","sources":["../../../../src/components/features/form/adapter-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAM5B,MAAM,WAAW,mBAAmB;IAClC,wCAAwC;IACxC,EAAE,EAAE,MAAM,CAAA;IACV,uCAAuC;IACvC,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,0DAA0D;IAC1D,QAAQ,EAAE,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"adapter-types.d.ts","sourceRoot":"","sources":["../../../../src/components/features/form/adapter-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAM5B,MAAM,WAAW,mBAAmB;IAClC,wCAAwC;IACxC,EAAE,EAAE,MAAM,CAAA;IACV,uCAAuC;IACvC,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,0DAA0D;IAC1D,QAAQ,EAAE,OAAO,CAAA;IACjB,6DAA6D;IAC7D,OAAO,EAAE,OAAO,CAAA;IAChB,qDAAqD;IACrD,SAAS,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,WAAW,oBAAqB,SAAQ,mBAAmB;IAC/D,+CAA+C;IAC/C,IAAI,EAAE,MAAM,CAAA;IACZ,0EAA0E;IAC1E,KAAK,EAAE,OAAO,CAAA;IACd,6BAA6B;IAC7B,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;IAChC,iEAAiE;IACjE,IAAI,EAAE,MAAM,IAAI,CAAA;IAChB,sBAAsB;IACtB,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACrC;AAED,MAAM,WAAW,oBAAoB;IACnC,yDAAyD;IACzD,KAAK,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IACvD,qCAAqC;IACrC,MAAM,EAAE,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAA;IACxD,wCAAwC;IACxC,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/B,6CAA6C;IAC7C,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CACzC;AAED,MAAM,WAAW,mBAAmB;IAClC,6DAA6D;IAC7D,OAAO,EAAE,OAAO,CAAA;IAChB,mDAAmD;IACnD,OAAO,EAAE,OAAO,CAAA;IAChB,wDAAwD;IACxD,WAAW,EAAE,OAAO,CAAA;IACpB,kDAAkD;IAClD,WAAW,EAAE,MAAM,CAAA;IACnB,8DAA8D;IAC9D,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACpC,2DAA2D;IAC3D,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACvC;AAED,MAAM,WAAW,sBAAsB;IACrC,cAAc;IACd,EAAE,EAAE,MAAM,CAAA;IACV,yCAAyC;IACzC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAA;IAC3C,6EAA6E;IAC7E,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAClC,gEAAgE;IAChE,SAAS,EAAE,mBAAmB,CAAA;IAC9B,uCAAuC;IACvC,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,uCAAuC;IACvC,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,6EAA6E;IAC7E,SAAS,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACxC,qFAAqF;IACrF,GAAG,EAAE,OAAO,CAAA;CACb;AAMD,MAAM,WAAW,eAAe;IAC9B,gCAAgC;IAChC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAA;IACjB,qCAAqC;IACrC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACvC,sBAAsB;IACtB,IAAI,EAAE,QAAQ,GAAG,UAAU,GAAG,UAAU,CAAA;IACxC,cAAc;IACd,EAAE,CAAC,EAAE,MAAM,CAAA;IACX;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAClE,kEAAkE;IAClE,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,eAAe,GAAG,IAAI,CAAC,CAAA;CAClD;AAMD,MAAM,WAAW,WAAW;IAC1B,2EAA2E;IAC3E,IAAI,EAAE,MAAM,CAAA;IAEZ,mEAAmE;IACnE,aAAa,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,sBAAsB,CAAA;IAEjE;;;OAGG;IACH,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,oBAAoB,CAAA;IAEhD,+CAA+C;IAC/C,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAA;IAEnC,gDAAgD;IAChD,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAEzD,4DAA4D;IAC5D,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,oBAAoB,CAAA;IAErD;;;OAGG;IACH,YAAY,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,QAAQ,EAAE,sBAAsB,CAAC;QAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE,CAAC,CAAA;CACnG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conform-adapter.d.ts","sourceRoot":"","sources":["../../../../../../src/components/features/form/adapters/conform/conform-adapter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,WAAW,
|
|
1
|
+
{"version":3,"file":"conform-adapter.d.ts","sourceRoot":"","sources":["../../../../../../src/components/features/form/adapters/conform/conform-adapter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,WAAW,EAMZ,MAAM,qBAAqB,CAAA;AA4c5B;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,WAQ5B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rhf-adapter.d.ts","sourceRoot":"","sources":["../../../../../../src/components/features/form/adapters/rhf/rhf-adapter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,WAAW,
|
|
1
|
+
{"version":3,"file":"rhf-adapter.d.ts","sourceRoot":"","sources":["../../../../../../src/components/features/form/adapters/rhf/rhf-adapter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,WAAW,EAMZ,MAAM,qBAAqB,CAAA;AA2N5B;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,EAAE,WAQxB,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { FormAutocompleteProps } from '../../autocomplete/autocomplete.types';
|
|
2
|
+
/**
|
|
3
|
+
* Form.Autosearch - Alias to Form.Autocomplete with search-first focus
|
|
4
|
+
*
|
|
5
|
+
* This is a convenience wrapper around Form.Autocomplete that emphasizes
|
|
6
|
+
* the search functionality. It's functionally identical to Form.Autocomplete.
|
|
7
|
+
*
|
|
8
|
+
* @example Basic usage
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <Form.Field name="search" label="Search">
|
|
11
|
+
* <Form.Autosearch
|
|
12
|
+
* options={options}
|
|
13
|
+
* placeholder="Type to search..."
|
|
14
|
+
* />
|
|
15
|
+
* </Form.Field>
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare function FormAutosearch<T extends {
|
|
19
|
+
value: string;
|
|
20
|
+
label: string;
|
|
21
|
+
}>(props: FormAutocompleteProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare namespace FormAutosearch {
|
|
23
|
+
var displayName: string;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=form-autosearch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-autosearch.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/form/components/form-autosearch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAA;AAGlF;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EACvE,KAAK,EAAE,qBAAqB,CAAC,CAAC,CAAC,2CAGhC;yBAJe,cAAc"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { ComboboxGroup, ComboboxOption } from '../../combobox';
|
|
2
|
+
/**
|
|
3
|
+
* Form.Combobox - Single-select dropdown with search for forms
|
|
4
|
+
*
|
|
5
|
+
* Automatically wired to the parent Form.Field context.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* const options = [
|
|
10
|
+
* { value: '1', label: 'Option 1' },
|
|
11
|
+
* { value: '2', label: 'Option 2' },
|
|
12
|
+
* ]
|
|
13
|
+
*
|
|
14
|
+
* <Form.Field name="country" label="Country" required>
|
|
15
|
+
* <Form.Combobox options={options} placeholder="Select a country" />
|
|
16
|
+
* </Form.Field>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export interface FormComboboxProps {
|
|
20
|
+
/**
|
|
21
|
+
* Available options (flat or grouped)
|
|
22
|
+
*/
|
|
23
|
+
'options': ComboboxOption[] | ComboboxGroup[];
|
|
24
|
+
/**
|
|
25
|
+
* Placeholder for trigger button
|
|
26
|
+
*/
|
|
27
|
+
'placeholder'?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Placeholder for search input
|
|
30
|
+
*/
|
|
31
|
+
'searchPlaceholder'?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Message shown when no options match
|
|
34
|
+
*/
|
|
35
|
+
'emptyMessage'?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Disable the combobox
|
|
38
|
+
*/
|
|
39
|
+
'disabled'?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Additional CSS classes
|
|
42
|
+
*/
|
|
43
|
+
'className'?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Additional CSS classes for trigger button
|
|
46
|
+
*/
|
|
47
|
+
'triggerClassName'?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Additional CSS classes for popover content
|
|
50
|
+
*/
|
|
51
|
+
'contentClassName'?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Enable search functionality
|
|
54
|
+
* @default true
|
|
55
|
+
*/
|
|
56
|
+
'searchable'?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Show dropdown arrow icon
|
|
59
|
+
* @default true
|
|
60
|
+
*/
|
|
61
|
+
'showDropdownArrow'?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Allow clearing the selection
|
|
64
|
+
* @default false
|
|
65
|
+
*/
|
|
66
|
+
'clearable'?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Test ID
|
|
69
|
+
*/
|
|
70
|
+
'data-testid'?: string;
|
|
71
|
+
}
|
|
72
|
+
export declare function FormCombobox({ options, placeholder, searchPlaceholder, emptyMessage, disabled, className, triggerClassName, contentClassName, searchable, showDropdownArrow, clearable, 'data-testid': testId, }: FormComboboxProps): import("react/jsx-runtime").JSX.Element;
|
|
73
|
+
export declare namespace FormCombobox {
|
|
74
|
+
var displayName: string;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=form-combobox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-combobox.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/form/components/form-combobox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAMnE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,SAAS,EAAE,cAAc,EAAE,GAAG,aAAa,EAAE,CAAA;IAE7C;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IAEtB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAE5B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IAEvB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAE3B;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAE3B;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IAEtB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAE7B;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,UAAiB,EACjB,iBAAwB,EACxB,SAAiB,EACjB,aAAa,EAAE,MAAM,GACtB,EAAE,iBAAiB,2CA+BnB;yBA5Ce,YAAY"}
|
|
@@ -38,4 +38,7 @@ export interface FormCopyBoxProps {
|
|
|
38
38
|
* ```
|
|
39
39
|
*/
|
|
40
40
|
export declare function FormCopyBox({ variant, className, contentClassName, buttonClassName, placeholder, }: FormCopyBoxProps): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export declare namespace FormCopyBox {
|
|
42
|
+
var displayName: string;
|
|
43
|
+
}
|
|
41
44
|
//# sourceMappingURL=form-copy-box.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-copy-box.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/form/components/form-copy-box.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,gBAAgB;IAC/B,2EAA2E;IAC3E,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,CAAA;IACjC,uCAAuC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,4CAA4C;IAC5C,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,sCAAsC;IACtC,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,2CAA2C;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,WAAW,CAAC,EAC1B,OAAmB,EACnB,SAAS,EACT,gBAAgB,EAChB,eAAe,EACf,WAAgB,GACjB,EAAE,gBAAgB,2CA6DlB"}
|
|
1
|
+
{"version":3,"file":"form-copy-box.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/form/components/form-copy-box.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,gBAAgB;IAC/B,2EAA2E;IAC3E,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,CAAA;IACjC,uCAAuC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,4CAA4C;IAC5C,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,sCAAsC;IACtC,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,2CAA2C;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,WAAW,CAAC,EAC1B,OAAmB,EACnB,SAAS,EACT,gBAAgB,EAChB,eAAe,EACf,WAAgB,GACjB,EAAE,gBAAgB,2CA6DlB;yBAnEe,WAAW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-custom.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/form/components/form-custom.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAyB,MAAM,UAAU,CAAA;AAItE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"form-custom.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/form/components/form-custom.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAyB,MAAM,UAAU,CAAA;AAItE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,EAAE,eAAe,2CAkBvD;yBAlBe,UAAU"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Form.DatePicker - Date picker component for forms
|
|
3
|
+
*
|
|
4
|
+
* Automatically wired to the parent Form.Field context.
|
|
5
|
+
* Extracts minDate/maxDate constraints from Zod schema.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* <Form.Field name="startDate" label="Start Date" required>
|
|
10
|
+
* <Form.DatePicker />
|
|
11
|
+
* </Form.Field>
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export interface FormDatePickerProps {
|
|
15
|
+
/** Placeholder text */
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
/** Disable the picker */
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/** Additional CSS classes */
|
|
20
|
+
className?: string;
|
|
21
|
+
/** Custom trigger button className */
|
|
22
|
+
triggerClassName?: string;
|
|
23
|
+
/** Number of months to display (1 = single date, 2 = date range) */
|
|
24
|
+
numberOfMonths?: 1 | 2;
|
|
25
|
+
/** Minimum selectable date (overrides schema) */
|
|
26
|
+
minDate?: Date;
|
|
27
|
+
/** Maximum selectable date (overrides schema) */
|
|
28
|
+
maxDate?: Date;
|
|
29
|
+
/** Disable future dates */
|
|
30
|
+
disableFuture?: boolean;
|
|
31
|
+
/** Disable past dates */
|
|
32
|
+
disablePast?: boolean;
|
|
33
|
+
}
|
|
34
|
+
export declare function FormDatePicker({ placeholder, disabled, className, triggerClassName, numberOfMonths, minDate: minDateProp, maxDate: maxDateProp, disableFuture, disablePast, }: FormDatePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export declare namespace FormDatePicker {
|
|
36
|
+
var displayName: string;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=form-date-picker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-date-picker.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/form/components/form-date-picker.tsx"],"names":[],"mappings":"AAMA;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,mBAAmB;IAClC,uBAAuB;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,yBAAyB;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,sCAAsC;IACtC,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,oEAAoE;IACpE,cAAc,CAAC,EAAE,CAAC,GAAG,CAAC,CAAA;IACtB,iDAAiD;IACjD,OAAO,CAAC,EAAE,IAAI,CAAA;IACd,iDAAiD;IACjD,OAAO,CAAC,EAAE,IAAI,CAAA;IACd,2BAA2B;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,yBAAyB;IACzB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED,wBAAgB,cAAc,CAAC,EAC7B,WAAW,EACX,QAAQ,EACR,SAAS,EACT,gBAAgB,EAChB,cAAkB,EAClB,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,WAAW,EACpB,aAAa,EACb,WAAW,GACZ,EAAE,mBAAmB,2CA+ErB;yBAzFe,cAAc"}
|