@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.
Files changed (126) hide show
  1. package/README.md +3 -0
  2. package/dist/combobox/index.mjs +2 -0
  3. package/dist/combobox-cKTFK4uN.mjs +96 -0
  4. package/dist/components/features/combobox/combobox.d.ts +27 -0
  5. package/dist/components/features/combobox/combobox.d.ts.map +1 -0
  6. package/dist/components/features/combobox/index.d.ts +3 -0
  7. package/dist/components/features/combobox/index.d.ts.map +1 -0
  8. package/dist/components/features/combobox/types.d.ts +78 -0
  9. package/dist/components/features/combobox/types.d.ts.map +1 -0
  10. package/dist/components/features/date-time-picker/date-time-picker.d.ts +9 -0
  11. package/dist/components/features/date-time-picker/date-time-picker.d.ts.map +1 -0
  12. package/dist/components/features/date-time-picker/index.d.ts +3 -0
  13. package/dist/components/features/date-time-picker/index.d.ts.map +1 -0
  14. package/dist/components/features/date-time-picker/types.d.ts +53 -0
  15. package/dist/components/features/date-time-picker/types.d.ts.map +1 -0
  16. package/dist/components/features/date-time-picker/utils/format.d.ts +13 -0
  17. package/dist/components/features/date-time-picker/utils/format.d.ts.map +1 -0
  18. package/dist/components/features/date-time-picker/utils/index.d.ts +3 -0
  19. package/dist/components/features/date-time-picker/utils/index.d.ts.map +1 -0
  20. package/dist/components/features/date-time-picker/utils/timezone.d.ts +23 -0
  21. package/dist/components/features/date-time-picker/utils/timezone.d.ts.map +1 -0
  22. package/dist/components/features/form/adapter-types.d.ts +20 -0
  23. package/dist/components/features/form/adapter-types.d.ts.map +1 -1
  24. package/dist/components/features/form/adapters/conform/conform-adapter.d.ts.map +1 -1
  25. package/dist/components/features/form/adapters/rhf/rhf-adapter.d.ts.map +1 -1
  26. package/dist/components/features/form/components/form-autosearch.d.ts +25 -0
  27. package/dist/components/features/form/components/form-autosearch.d.ts.map +1 -0
  28. package/dist/components/features/form/components/form-combobox.d.ts +76 -0
  29. package/dist/components/features/form/components/form-combobox.d.ts.map +1 -0
  30. package/dist/components/features/form/components/form-copy-box.d.ts +3 -0
  31. package/dist/components/features/form/components/form-copy-box.d.ts.map +1 -1
  32. package/dist/components/features/form/components/form-custom.d.ts.map +1 -1
  33. package/dist/components/features/form/components/form-date-picker.d.ts +38 -0
  34. package/dist/components/features/form/components/form-date-picker.d.ts.map +1 -0
  35. package/dist/components/features/form/components/form-date-time-picker.d.ts +37 -0
  36. package/dist/components/features/form/components/form-date-time-picker.d.ts.map +1 -0
  37. package/dist/components/features/form/components/form-dialog.d.ts.map +1 -1
  38. package/dist/components/features/form/components/form-radio-group.d.ts.map +1 -1
  39. package/dist/components/features/form/components/form-root.d.ts.map +1 -1
  40. package/dist/components/features/form/components/form-time-picker.d.ts +21 -0
  41. package/dist/components/features/form/components/form-time-picker.d.ts.map +1 -0
  42. package/dist/components/features/form/components/form-transfer.d.ts +37 -0
  43. package/dist/components/features/form/components/form-transfer.d.ts.map +1 -0
  44. package/dist/components/features/form/components/index.d.ts +7 -1
  45. package/dist/components/features/form/components/index.d.ts.map +1 -1
  46. package/dist/components/features/form/components/stepper/form-stepper.d.ts.map +1 -1
  47. package/dist/components/features/form/hooks/index.d.ts +1 -1
  48. package/dist/components/features/form/hooks/index.d.ts.map +1 -1
  49. package/dist/components/features/form/hooks/use-form-state.d.ts +36 -0
  50. package/dist/components/features/form/hooks/use-form-state.d.ts.map +1 -0
  51. package/dist/components/features/form/index.d.ts +39 -21
  52. package/dist/components/features/form/index.d.ts.map +1 -1
  53. package/dist/components/features/form/stepper/index.d.ts +17 -0
  54. package/dist/components/features/form/stepper/index.d.ts.map +1 -0
  55. package/dist/components/features/form/types/index.d.ts +36 -0
  56. package/dist/components/features/form/types/index.d.ts.map +1 -1
  57. package/dist/components/features/form/utils/get-field-constraints.d.ts +23 -1
  58. package/dist/components/features/form/utils/get-field-constraints.d.ts.map +1 -1
  59. package/dist/components/features/form/utils/get-schema-defaults.d.ts +24 -0
  60. package/dist/components/features/form/utils/get-schema-defaults.d.ts.map +1 -0
  61. package/dist/components/features/form/utils/zod-helpers.d.ts +12 -0
  62. package/dist/components/features/form/utils/zod-helpers.d.ts.map +1 -0
  63. package/dist/components/features/time-picker/index.d.ts +3 -0
  64. package/dist/components/features/time-picker/index.d.ts.map +1 -0
  65. package/dist/components/features/time-picker/time-picker.d.ts +22 -0
  66. package/dist/components/features/time-picker/time-picker.d.ts.map +1 -0
  67. package/dist/components/features/time-picker/types.d.ts +31 -0
  68. package/dist/components/features/time-picker/types.d.ts.map +1 -0
  69. package/dist/components/features/transfer/components/index.d.ts +9 -0
  70. package/dist/components/features/transfer/components/index.d.ts.map +1 -0
  71. package/dist/components/features/transfer/components/transfer-group.d.ts +7 -0
  72. package/dist/components/features/transfer/components/transfer-group.d.ts.map +1 -0
  73. package/dist/components/features/transfer/components/transfer-item.d.ts +10 -0
  74. package/dist/components/features/transfer/components/transfer-item.d.ts.map +1 -0
  75. package/dist/components/features/transfer/components/transfer-panel.d.ts +18 -0
  76. package/dist/components/features/transfer/components/transfer-panel.d.ts.map +1 -0
  77. package/dist/components/features/transfer/components/transfer-search.d.ts +9 -0
  78. package/dist/components/features/transfer/components/transfer-search.d.ts.map +1 -0
  79. package/dist/components/features/transfer/hooks/use-transfer-dnd.d.ts +26 -0
  80. package/dist/components/features/transfer/hooks/use-transfer-dnd.d.ts.map +1 -0
  81. package/dist/components/features/transfer/hooks/use-transfer-state.d.ts +20 -0
  82. package/dist/components/features/transfer/hooks/use-transfer-state.d.ts.map +1 -0
  83. package/dist/components/features/transfer/index.d.ts +3 -0
  84. package/dist/components/features/transfer/index.d.ts.map +1 -0
  85. package/dist/components/features/transfer/transfer.d.ts +6 -0
  86. package/dist/components/features/transfer/transfer.d.ts.map +1 -0
  87. package/dist/components/features/transfer/types.d.ts +69 -0
  88. package/dist/components/features/transfer/types.d.ts.map +1 -0
  89. package/dist/date-picker/index.mjs +1 -1
  90. package/dist/date-time-picker/index.mjs +2 -0
  91. package/dist/date-time-picker-Dy2jrJoN.mjs +175 -0
  92. package/dist/form/adapters/conform/index.mjs +102 -12
  93. package/dist/form/adapters/rhf/index.mjs +112 -26
  94. package/dist/form/index.mjs +3 -3
  95. package/dist/form/stepper/index.mjs +541 -0
  96. package/dist/form-context-Ccxm-wqL.mjs +17 -0
  97. package/dist/{form-BE1xBne4.mjs → form-mlNLKaB5.mjs} +350 -592
  98. package/dist/{get-field-constraints-BPMW8VvY.mjs → get-field-constraints-BicgDkfH.mjs} +19 -16
  99. package/dist/grid/index.mjs +1 -1
  100. package/dist/hooks/index.mjs +2 -2
  101. package/dist/index.mjs +14 -14
  102. package/dist/input-number/index.mjs +1 -1
  103. package/dist/map/index.mjs +1 -1
  104. package/dist/{map-Cw7u8r6E.mjs → map-CWIQ-eql.mjs} +1 -1
  105. package/dist/more-actions/index.mjs +1 -1
  106. package/dist/page-title/index.mjs +1 -1
  107. package/dist/stepper/index.mjs +1 -320
  108. package/dist/stepper-DvIOp0hh.mjs +321 -0
  109. package/dist/tag-input/index.mjs +1 -1
  110. package/dist/task-queue/index.mjs +1 -1
  111. package/dist/time-picker/index.mjs +2 -0
  112. package/dist/time-picker-BoF7pZZ2.mjs +43 -0
  113. package/dist/transfer/index.mjs +2 -0
  114. package/dist/transfer-B2n8pgEQ.mjs +260 -0
  115. package/package.json +37 -1
  116. /package/dist/{adapter-context-B7L2ucTr.mjs → adapter-context-rWveHhDd.mjs} +0 -0
  117. /package/dist/{col-YBbQ5wlb.mjs → col-1T0Q3SlH.mjs} +0 -0
  118. /package/dist/{hooks-DYjN7lvC.mjs → hooks-D8r2M2U6.mjs} +0 -0
  119. /package/dist/{input-number-DEjXG2I6.mjs → input-number-a7uydAsw.mjs} +0 -0
  120. /package/dist/{map-leaflet-imports-D6nTEOIh.mjs → map-leaflet-imports-CRSKA79m.mjs} +0 -0
  121. /package/dist/{more-actions-BNQ2yfWZ.mjs → more-actions-ILnEZq_E.mjs} +0 -0
  122. /package/dist/{page-title-CNiRNZ7p.mjs → page-title-ChsnpBiH.mjs} +0 -0
  123. /package/dist/{tag-input-BKed-cul.mjs → tag-input-T9cUX9-G.mjs} +0 -0
  124. /package/dist/{task-queue-dropdown-Di_Wjspz.mjs → task-queue-dropdown-Wcbj-f0V.mjs} +0 -0
  125. /package/dist/{to-api-format-Cq4prffn.mjs → to-api-format-Bh3c01gr.mjs} +0 -0
  126. /package/dist/{use-copy-to-clipboard-BGdTmkFV.mjs → use-copy-to-clipboard-uNeeVHC4.mjs} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"time-picker.d.ts","sourceRoot":"","sources":["../../../../src/components/features/time-picker/time-picker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAK9C;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,QAAQ,EACR,GAAG,EACH,GAAG,EACH,IAAI,EACJ,WAAW,EACX,QAAQ,EACR,SAAS,EACT,EAAE,EACF,cAAc,EAAE,WAAW,EAC3B,kBAAkB,EAAE,eAAe,GACpC,EAAE,eAAe,2CAwBjB;yBApCe,UAAU"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * TimePicker - Simple time input component
3
+ *
4
+ * Provides a native HTML time input for selecting hours and minutes.
5
+ * Value format: "HH:mm" (e.g., "14:30")
6
+ */
7
+ export interface TimePickerProps {
8
+ /** Current time value in HH:mm format (e.g., "14:30") */
9
+ 'value'?: string;
10
+ /** Called when time changes */
11
+ 'onChange'?: (value: string) => void;
12
+ /** Minimum selectable time in HH:mm format */
13
+ 'min'?: string;
14
+ /** Maximum selectable time in HH:mm format */
15
+ 'max'?: string;
16
+ /** Step interval in minutes (default: 1) */
17
+ 'step'?: number;
18
+ /** Placeholder text */
19
+ 'placeholder'?: string;
20
+ /** Disable the input */
21
+ 'disabled'?: boolean;
22
+ /** Additional CSS classes */
23
+ 'className'?: string;
24
+ /** Input ID */
25
+ 'id'?: string;
26
+ /** ARIA invalid state */
27
+ 'aria-invalid'?: boolean;
28
+ /** ARIA described by */
29
+ 'aria-describedby'?: string;
30
+ }
31
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/features/time-picker/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,eAAe;IAC9B,yDAAyD;IACzD,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,+BAA+B;IAC/B,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,8CAA8C;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,8CAA8C;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,4CAA4C;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,uBAAuB;IACvB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,wBAAwB;IACxB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,6BAA6B;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,eAAe;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,yBAAyB;IACzB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,wBAAwB;IACxB,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B"}
@@ -0,0 +1,9 @@
1
+ export { TransferGroup } from './transfer-group';
2
+ export type { TransferGroupProps } from './transfer-group';
3
+ export { TransferItem } from './transfer-item';
4
+ export type { TransferItemProps } from './transfer-item';
5
+ export { TransferPanel } from './transfer-panel';
6
+ export type { TransferPanelProps } from './transfer-panel';
7
+ export { TransferSearch } from './transfer-search';
8
+ export type { TransferSearchProps } from './transfer-search';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/transfer/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA"}
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ export interface TransferGroupProps {
3
+ title: string;
4
+ children: React.ReactNode;
5
+ }
6
+ export declare const TransferGroup: React.FC<TransferGroupProps>;
7
+ //# sourceMappingURL=transfer-group.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transfer-group.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/transfer/components/transfer-group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAYtD,CAAA"}
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ export interface TransferItemProps {
3
+ itemKey: string;
4
+ label: string;
5
+ onClick: () => void;
6
+ disabled?: boolean;
7
+ panelType: 'source' | 'target';
8
+ }
9
+ export declare const TransferItem: React.FC<TransferItemProps>;
10
+ //# sourceMappingURL=transfer-item.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transfer-item.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/transfer/components/transfer-item.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,EAAE,QAAQ,GAAG,QAAQ,CAAA;CAC/B;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAyCpD,CAAA"}
@@ -0,0 +1,18 @@
1
+ import type { TransferItem as TransferItemType } from '../types';
2
+ import * as React from 'react';
3
+ export interface TransferPanelProps {
4
+ title: string;
5
+ items: TransferItemType[];
6
+ groups: string[];
7
+ searchable: boolean;
8
+ searchValue: string;
9
+ onSearchChange: (value: string) => void;
10
+ searchPlaceholder?: string;
11
+ onItemClick: (key: string) => void;
12
+ onSelectAll: () => void;
13
+ enableSelectAll: boolean;
14
+ disabled?: boolean;
15
+ panelType: 'source' | 'target';
16
+ }
17
+ export declare const TransferPanel: React.FC<TransferPanelProps>;
18
+ //# sourceMappingURL=transfer-panel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transfer-panel.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/transfer/components/transfer-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAChE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,gBAAgB,EAAE,CAAA;IACzB,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,UAAU,EAAE,OAAO,CAAA;IACnB,WAAW,EAAE,MAAM,CAAA;IACnB,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB,eAAe,EAAE,OAAO,CAAA;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,EAAE,QAAQ,GAAG,QAAQ,CAAA;CAC/B;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAwGtD,CAAA"}
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ export interface TransferSearchProps {
3
+ value: string;
4
+ onChange: (value: string) => void;
5
+ placeholder?: string;
6
+ disabled?: boolean;
7
+ }
8
+ export declare const TransferSearch: React.FC<TransferSearchProps>;
9
+ //# sourceMappingURL=transfer-search.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transfer-search.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/transfer/components/transfer-search.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA0BxD,CAAA"}
@@ -0,0 +1,26 @@
1
+ import type { DragEndEvent } from '@dnd-kit/core';
2
+ import { DndContext, useSensors } from '@dnd-kit/core';
3
+ import { SortableContext, verticalListSortingStrategy } from '@dnd-kit/sortable';
4
+ export interface UseTransferDndProps {
5
+ /**
6
+ * Current order of items (keys)
7
+ */
8
+ items: string[];
9
+ /**
10
+ * Called when items are reordered
11
+ */
12
+ onReorder: (items: string[]) => void;
13
+ /**
14
+ * Disable drag and drop
15
+ */
16
+ disabled?: boolean;
17
+ }
18
+ export interface UseTransferDndReturn {
19
+ sensors: ReturnType<typeof useSensors>;
20
+ handleDragEnd: (event: DragEndEvent) => void;
21
+ DndContext: typeof DndContext;
22
+ SortableContext: typeof SortableContext;
23
+ verticalListSortingStrategy: typeof verticalListSortingStrategy;
24
+ }
25
+ export declare function useTransferDnd({ items, onReorder, disabled, }: UseTransferDndProps): UseTransferDndReturn;
26
+ //# sourceMappingURL=use-transfer-dnd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-transfer-dnd.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/transfer/hooks/use-transfer-dnd.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EACL,UAAU,EAIV,UAAU,EACX,MAAM,eAAe,CAAA;AACtB,OAAO,EAEL,eAAe,EAEf,2BAA2B,EAC5B,MAAM,mBAAmB,CAAA;AAE1B,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,KAAK,EAAE,MAAM,EAAE,CAAA;IAEf;;OAEG;IACH,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;IAEpC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,CAAA;IACtC,aAAa,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAA;IAC5C,UAAU,EAAE,OAAO,UAAU,CAAA;IAC7B,eAAe,EAAE,OAAO,eAAe,CAAA;IACvC,2BAA2B,EAAE,OAAO,2BAA2B,CAAA;CAChE;AAED,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,SAAS,EACT,QAAgB,GACjB,EAAE,mBAAmB,GAAG,oBAAoB,CA8B5C"}
@@ -0,0 +1,20 @@
1
+ import type { TransferItem } from '../types';
2
+ interface UseTransferStateProps<T> {
3
+ items: T[];
4
+ value: string[];
5
+ itemKey: keyof T | ((item: T) => string);
6
+ itemLabel: keyof T | ((item: T) => string);
7
+ itemGroup?: keyof T | ((item: T) => string | undefined);
8
+ }
9
+ interface UseTransferStateReturn<T> {
10
+ sourceItems: TransferItem<T>[];
11
+ targetItems: TransferItem<T>[];
12
+ filteredSourceItems: TransferItem<T>[];
13
+ sourceGroups: string[];
14
+ targetGroups: string[];
15
+ sourceSearch: string;
16
+ setSourceSearch: (search: string) => void;
17
+ }
18
+ export declare function useTransferState<T>({ items, value, itemKey, itemLabel, itemGroup, }: UseTransferStateProps<T>): UseTransferStateReturn<T>;
19
+ export {};
20
+ //# sourceMappingURL=use-transfer-state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-transfer-state.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/transfer/hooks/use-transfer-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAG5C,UAAU,qBAAqB,CAAC,CAAC;IAC/B,KAAK,EAAE,CAAC,EAAE,CAAA;IACV,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC,CAAA;IACxC,SAAS,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC,CAAA;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,GAAG,SAAS,CAAC,CAAA;CACxD;AAED,UAAU,sBAAsB,CAAC,CAAC;IAEhC,WAAW,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAA;IAC9B,WAAW,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAA;IAG9B,mBAAmB,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAA;IAGtC,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,YAAY,EAAE,MAAM,EAAE,CAAA;IAGtB,YAAY,EAAE,MAAM,CAAA;IACpB,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;CAC1C;AAED,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,EAClC,KAAK,EACL,KAAK,EACL,OAAO,EACP,SAAS,EACT,SAAS,GACV,EAAE,qBAAqB,CAAC,CAAC,CAAC,GAAG,sBAAsB,CAAC,CAAC,CAAC,CA6GtD"}
@@ -0,0 +1,3 @@
1
+ export { Transfer } from './transfer';
2
+ export type { TransferProps } from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/features/transfer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA"}
@@ -0,0 +1,6 @@
1
+ import type { TransferProps } from './types';
2
+ export declare function Transfer<T>({ items, value, onChange, itemKey, itemLabel, itemGroup, searchable, searchPlaceholder, sourceTitle, targetTitle, enableSelectAll, disabled, className, }: TransferProps<T>): import("react/jsx-runtime").JSX.Element;
3
+ export declare namespace Transfer {
4
+ var displayName: string;
5
+ }
6
+ //# sourceMappingURL=transfer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transfer.d.ts","sourceRoot":"","sources":["../../../../src/components/features/transfer/transfer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAM5C,wBAAgB,QAAQ,CAAC,CAAC,EAAG,EAC3B,KAAK,EACL,KAAK,EACL,QAAQ,EACR,OAAO,EACP,SAAS,EACT,SAAS,EACT,UAAiB,EACjB,iBAA+B,EAC/B,WAAyB,EACzB,WAAwB,EACxB,eAAsB,EACtB,QAAgB,EAChB,SAAS,GACV,EAAE,aAAa,CAAC,CAAC,CAAC,2CAyElB;yBAvFe,QAAQ"}
@@ -0,0 +1,69 @@
1
+ export interface TransferProps<T = any> {
2
+ /**
3
+ * All available items
4
+ */
5
+ items: T[];
6
+ /**
7
+ * Currently selected item keys
8
+ */
9
+ value: string[];
10
+ /**
11
+ * Called when selection changes
12
+ */
13
+ onChange: (value: string[]) => void;
14
+ /**
15
+ * Extract unique key from item
16
+ */
17
+ itemKey: keyof T | ((item: T) => string);
18
+ /**
19
+ * Extract display label from item
20
+ */
21
+ itemLabel: keyof T | ((item: T) => string);
22
+ /**
23
+ * Extract group name from item (optional)
24
+ */
25
+ itemGroup?: keyof T | ((item: T) => string | undefined);
26
+ /**
27
+ * Enable search functionality
28
+ * @default true
29
+ */
30
+ searchable?: boolean;
31
+ /**
32
+ * Search input placeholder
33
+ */
34
+ searchPlaceholder?: string;
35
+ /**
36
+ * Source panel title
37
+ * @default "Available"
38
+ */
39
+ sourceTitle?: string;
40
+ /**
41
+ * Target panel title
42
+ * @default "Selected"
43
+ */
44
+ targetTitle?: string;
45
+ /**
46
+ * Show select-all button
47
+ * @default true
48
+ */
49
+ enableSelectAll?: boolean;
50
+ /**
51
+ * Disable the component
52
+ */
53
+ disabled?: boolean;
54
+ /**
55
+ * Additional CSS class
56
+ */
57
+ className?: string;
58
+ }
59
+ export interface TransferItem<T = any> {
60
+ key: string;
61
+ label: string;
62
+ group?: string;
63
+ data: T;
64
+ }
65
+ export interface TransferPanelData<T = any> {
66
+ items: TransferItem<T>[];
67
+ groups: string[];
68
+ }
69
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/features/transfer/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa,CAAC,CAAC,GAAG,GAAG;IACpC;;OAEG;IACH,KAAK,EAAE,CAAC,EAAE,CAAA;IAEV;;OAEG;IACH,KAAK,EAAE,MAAM,EAAE,CAAA;IAEf;;OAEG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;IAEnC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC,CAAA;IAExC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC,CAAA;IAE1C;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,GAAG,SAAS,CAAC,CAAA;IAEvD;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAE1B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;IAEzB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,YAAY,CAAC,CAAC,GAAG,GAAG;IACnC,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,CAAC,CAAA;CACR;AAED,MAAM,WAAW,iBAAiB,CAAC,CAAC,GAAG,GAAG;IACxC,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAA;IACxB,MAAM,EAAE,MAAM,EAAE,CAAA;CACjB"}
@@ -1,3 +1,3 @@
1
1
  import { t as CalendarDatePicker } from "../calendar-date-picker-DWK94_DC.mjs";
2
- import { C as utcToLocalInputString, S as utcStringToZonedDate, _ as getBrowserTimezone, a as formatTimeRangeDisplay, b as getTimezoneOffset, c as getPresetByKey, d as TimezoneSelector, f as QuickRangesPanel, g as formatUtcForDisplay, h as formatTimezoneLabel, i as formatSingleTimeDisplay, l as getPresetByShortcut, m as createTimezoneOption, n as TimeRangePicker, o as DEFAULT_PRESETS, p as CustomRangePanel, r as formatDateForInput, s as getDefaultPreset, t as toApiTimeRange, u as getPresetRange, v as getDefaultTimezoneOptions, w as zonedDateToUtcString, x as localInputStringToUtc, y as getShortTimezoneDisplay } from "../to-api-format-Cq4prffn.mjs";
2
+ import { C as utcToLocalInputString, S as utcStringToZonedDate, _ as getBrowserTimezone, a as formatTimeRangeDisplay, b as getTimezoneOffset, c as getPresetByKey, d as TimezoneSelector, f as QuickRangesPanel, g as formatUtcForDisplay, h as formatTimezoneLabel, i as formatSingleTimeDisplay, l as getPresetByShortcut, m as createTimezoneOption, n as TimeRangePicker, o as DEFAULT_PRESETS, p as CustomRangePanel, r as formatDateForInput, s as getDefaultPreset, t as toApiTimeRange, u as getPresetRange, v as getDefaultTimezoneOptions, w as zonedDateToUtcString, x as localInputStringToUtc, y as getShortTimezoneDisplay } from "../to-api-format-Bh3c01gr.mjs";
3
3
  export { CustomRangePanel as AbsoluteRangePanel, CustomRangePanel, CalendarDatePicker, DEFAULT_PRESETS, QuickRangesPanel, TimeRangePicker, TimezoneSelector, createTimezoneOption, formatDateForInput, formatSingleTimeDisplay, formatTimeRangeDisplay, formatTimezoneLabel, formatUtcForDisplay, getBrowserTimezone, getDefaultPreset, getDefaultTimezoneOptions, getPresetByKey, getPresetByShortcut, getPresetRange, getShortTimezoneDisplay, getTimezoneOffset, localInputStringToUtc, toApiTimeRange, utcStringToZonedDate, utcToLocalInputString, zonedDateToUtcString };
@@ -0,0 +1,2 @@
1
+ import { t as DateTimePicker } from "../date-time-picker-Dy2jrJoN.mjs";
2
+ export { DateTimePicker };
@@ -0,0 +1,175 @@
1
+ import { t as cn } from "./cn-D2KYQ917.mjs";
2
+ import { t as Button } from "./button-D3RrsMfQ.mjs";
3
+ import { t as Calendar$1 } from "./calendar-DEkCw7I1.mjs";
4
+ import { i as PopoverTrigger, r as PopoverContent, t as Popover } from "./popover-FJAcbYoH.mjs";
5
+ import { CalendarIcon } from "lucide-react";
6
+ import * as React$1 from "react";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ import { format } from "date-fns";
9
+ import { formatInTimeZone, fromZonedTime, toZonedTime } from "date-fns-tz";
10
+ //#region src/components/features/date-time-picker/utils/format.ts
11
+ /**
12
+ * Format date for display
13
+ */
14
+ function formatDate(date) {
15
+ if (!date) return "";
16
+ return format(date, "PP");
17
+ }
18
+ //#endregion
19
+ //#region src/components/features/date-time-picker/utils/timezone.ts
20
+ /**
21
+ * Get the browser's timezone
22
+ */
23
+ function getBrowserTimezone() {
24
+ return Intl.DateTimeFormat().resolvedOptions().timeZone;
25
+ }
26
+ /**
27
+ * Convert local date + time to UTC ISO string
28
+ * @param date - Date object (date part)
29
+ * @param time - Time string in HH:mm format
30
+ * @param timezone - IANA timezone (e.g., "America/New_York")
31
+ * @returns UTC ISO string
32
+ */
33
+ function localDateTimeToUtc(date, time, timezone) {
34
+ try {
35
+ const [hours, minutes] = time.split(":").map(Number);
36
+ return fromZonedTime(`${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")} ${String(hours).padStart(2, "0")}:${String(minutes).padStart(2, "0")}`, timezone).toISOString();
37
+ } catch {
38
+ const [hours = 0, minutes = 0] = time.split(":").map(Number);
39
+ const combined = new Date(date);
40
+ combined.setUTCHours(hours, minutes, 0, 0);
41
+ return combined.toISOString();
42
+ }
43
+ }
44
+ /**
45
+ * Convert UTC ISO string to local date + time
46
+ * @param utcString - UTC ISO string
47
+ * @param timezone - IANA timezone
48
+ * @returns Object with date and time (HH:mm)
49
+ */
50
+ function utcToLocalDateTime(utcString, timezone) {
51
+ try {
52
+ const utcDate = new Date(utcString);
53
+ const time = formatInTimeZone(utcDate, timezone, "HH:mm");
54
+ return {
55
+ date: toZonedTime(utcDate, timezone),
56
+ time
57
+ };
58
+ } catch {
59
+ const utcDate = new Date(utcString);
60
+ const hours = utcDate.getUTCHours();
61
+ const minutes = utcDate.getUTCMinutes();
62
+ return {
63
+ date: utcDate,
64
+ time: `${String(hours).padStart(2, "0")}:${String(minutes).padStart(2, "0")}`
65
+ };
66
+ }
67
+ }
68
+ //#endregion
69
+ //#region src/components/features/date-time-picker/date-time-picker.tsx
70
+ const DEFAULT_TIMEZONE = getBrowserTimezone();
71
+ function DateTimePicker({ ref, value, onChange, minDate, maxDate, disabledDates, timezone = DEFAULT_TIMEZONE, showTimezoneIndicator = false, placeholder = "Select date and time", disabled = false, className }) {
72
+ const initialState = React$1.useMemo(() => {
73
+ if (!value) return {
74
+ date: void 0,
75
+ time: ""
76
+ };
77
+ return utcToLocalDateTime(value, timezone);
78
+ }, [value, timezone]);
79
+ const [state, setState] = React$1.useState(initialState);
80
+ const prevValue = React$1.useRef(value);
81
+ const prevTimezone = React$1.useRef(timezone);
82
+ React$1.useEffect(() => {
83
+ if (value !== prevValue.current || timezone !== prevTimezone.current) {
84
+ prevValue.current = value;
85
+ prevTimezone.current = timezone;
86
+ setState(() => value ? utcToLocalDateTime(value, timezone) : {
87
+ date: void 0,
88
+ time: ""
89
+ });
90
+ }
91
+ }, [value, timezone]);
92
+ const handleDateChange = React$1.useCallback((newDate) => {
93
+ setState((prev) => ({
94
+ ...prev,
95
+ date: newDate
96
+ }));
97
+ }, []);
98
+ const handleTimeChange = React$1.useCallback((e) => {
99
+ const newTime = e.target.value;
100
+ if (newTime && !/^\d{2}:\d{2}$/.test(newTime)) return;
101
+ setState((prev) => ({
102
+ ...prev,
103
+ time: newTime
104
+ }));
105
+ }, []);
106
+ React$1.useEffect(() => {
107
+ if (state.date && state.time) {
108
+ const utcValue = localDateTimeToUtc(state.date, state.time, timezone);
109
+ onChange?.(utcValue);
110
+ }
111
+ }, [
112
+ state.date,
113
+ state.time,
114
+ timezone,
115
+ onChange
116
+ ]);
117
+ const formatDisplayValue = () => {
118
+ if (!state.date) return placeholder;
119
+ if (state.time) return `${formatDate(state.date)} ${state.time}`;
120
+ return formatDate(state.date);
121
+ };
122
+ return /* @__PURE__ */ jsx("div", {
123
+ ref,
124
+ className,
125
+ children: /* @__PURE__ */ jsxs(Popover, { children: [/* @__PURE__ */ jsx(PopoverTrigger, {
126
+ asChild: true,
127
+ children: /* @__PURE__ */ jsxs(Button, {
128
+ variant: "outline",
129
+ className: cn("w-full justify-start text-left font-normal", !state.date && "text-muted-foreground"),
130
+ disabled,
131
+ children: [
132
+ /* @__PURE__ */ jsx(CalendarIcon, { className: "mr-2 h-4 w-4" }),
133
+ /* @__PURE__ */ jsx("span", {
134
+ className: "flex-1",
135
+ children: formatDisplayValue()
136
+ }),
137
+ showTimezoneIndicator && state.date && state.time && /* @__PURE__ */ jsx("span", {
138
+ className: "text-muted-foreground ml-2 text-xs",
139
+ children: timezone
140
+ })
141
+ ]
142
+ })
143
+ }), /* @__PURE__ */ jsx(PopoverContent, {
144
+ className: "w-auto p-0",
145
+ align: "start",
146
+ children: /* @__PURE__ */ jsxs("div", {
147
+ className: "p-3",
148
+ children: [/* @__PURE__ */ jsx(Calendar$1, {
149
+ mode: "single",
150
+ selected: state.date,
151
+ onSelect: handleDateChange,
152
+ disabled: disabledDates,
153
+ fromDate: minDate,
154
+ toDate: maxDate
155
+ }), /* @__PURE__ */ jsxs("div", {
156
+ className: "mt-3",
157
+ children: [/* @__PURE__ */ jsx("label", {
158
+ className: "mb-1 block text-sm font-medium",
159
+ children: "Time"
160
+ }), /* @__PURE__ */ jsx("input", {
161
+ type: "time",
162
+ "aria-label": "Select time",
163
+ value: state.time,
164
+ onChange: handleTimeChange,
165
+ disabled: disabled || !state.date,
166
+ className: cn("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1", "text-sm shadow-sm transition-colors", "placeholder:text-muted-foreground", "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring", "disabled:cursor-not-allowed disabled:opacity-50")
167
+ })]
168
+ })]
169
+ })
170
+ })] })
171
+ });
172
+ }
173
+ DateTimePicker.displayName = "DateTimePicker";
174
+ //#endregion
175
+ export { DateTimePicker as t };