jenosize-ui 0.1.0

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 (182) hide show
  1. package/LICENSE +28 -0
  2. package/README.md +100 -0
  3. package/THIRD-PARTY-NOTICES.md +163 -0
  4. package/dist/Button-Bt7pzM4R.d.ts +82 -0
  5. package/dist/PaymentInput-CKPIPNWH.d.ts +141 -0
  6. package/dist/Select-CVbEQ2Ep.d.ts +118 -0
  7. package/dist/TagInput-CTJYOB4J.d.ts +90 -0
  8. package/dist/avatar.d.ts +161 -0
  9. package/dist/avatar.js +11 -0
  10. package/dist/badge.d.ts +109 -0
  11. package/dist/badge.js +10 -0
  12. package/dist/breadcrumb.d.ts +58 -0
  13. package/dist/breadcrumb.js +7 -0
  14. package/dist/button.d.ts +54 -0
  15. package/dist/button.js +14 -0
  16. package/dist/calendar.d.ts +368 -0
  17. package/dist/calendar.js +21 -0
  18. package/dist/callout.d.ts +70 -0
  19. package/dist/callout.js +16 -0
  20. package/dist/card-nWicloNi.d.ts +80 -0
  21. package/dist/card.d.ts +2 -0
  22. package/dist/card.js +7 -0
  23. package/dist/checkbox.d.ts +133 -0
  24. package/dist/checkbox.js +11 -0
  25. package/dist/chunk-24TO7E32.js +42 -0
  26. package/dist/chunk-3Y5X7B5C.js +146 -0
  27. package/dist/chunk-4OLULPQG.js +202 -0
  28. package/dist/chunk-4P2NBLBW.js +103 -0
  29. package/dist/chunk-52IFGFTL.js +11 -0
  30. package/dist/chunk-5FATN5YD.js +115 -0
  31. package/dist/chunk-5NOBSXJN.js +297 -0
  32. package/dist/chunk-5RAPA22E.js +106 -0
  33. package/dist/chunk-7EUAMHMU.js +16 -0
  34. package/dist/chunk-7EWQKTNQ.js +1336 -0
  35. package/dist/chunk-7HOIZ3UO.js +110 -0
  36. package/dist/chunk-7IU5TMFL.js +452 -0
  37. package/dist/chunk-7JBNLEJ7.js +29 -0
  38. package/dist/chunk-7S2TBALK.js +23 -0
  39. package/dist/chunk-BJUZVYQC.js +188 -0
  40. package/dist/chunk-BVJWBYIG.js +66 -0
  41. package/dist/chunk-CME4DIML.js +65 -0
  42. package/dist/chunk-CYPPEUX5.js +73 -0
  43. package/dist/chunk-D5BTFSL7.js +71 -0
  44. package/dist/chunk-D6TPWNRK.js +387 -0
  45. package/dist/chunk-DJSXIAFH.js +66 -0
  46. package/dist/chunk-DRZCJCBO.js +46 -0
  47. package/dist/chunk-DWKILXHE.js +17 -0
  48. package/dist/chunk-E7ZSWBAK.js +70 -0
  49. package/dist/chunk-EDSK6FEH.js +8 -0
  50. package/dist/chunk-F2K7VJUV.js +114 -0
  51. package/dist/chunk-F6NLE6XJ.js +40 -0
  52. package/dist/chunk-FHHAPGCR.js +32 -0
  53. package/dist/chunk-FXIBGTS5.js +14 -0
  54. package/dist/chunk-GCVA3OIV.js +72 -0
  55. package/dist/chunk-GFOAJVW5.js +336 -0
  56. package/dist/chunk-GRLSUQQE.js +136 -0
  57. package/dist/chunk-GTHJWR3Q.js +77 -0
  58. package/dist/chunk-HMUZE6EK.js +67 -0
  59. package/dist/chunk-I7WU4GTY.js +503 -0
  60. package/dist/chunk-J2BCKBHC.js +151 -0
  61. package/dist/chunk-J36M3KRX.js +1315 -0
  62. package/dist/chunk-J7ZQQFPT.js +113 -0
  63. package/dist/chunk-JP26LPCY.js +234 -0
  64. package/dist/chunk-JTNFJLIY.js +1046 -0
  65. package/dist/chunk-JVJRHBTD.js +50 -0
  66. package/dist/chunk-JYGR44ZC.js +133 -0
  67. package/dist/chunk-KDLPXXD2.js +173 -0
  68. package/dist/chunk-KMSYEE23.js +224 -0
  69. package/dist/chunk-KNYKWUYX.js +52 -0
  70. package/dist/chunk-LME57Z6J.js +138 -0
  71. package/dist/chunk-MFJP5FA7.js +20 -0
  72. package/dist/chunk-MKC5HNA7.js +1692 -0
  73. package/dist/chunk-MQGD2OUF.js +39 -0
  74. package/dist/chunk-MUFHLP4S.js +566 -0
  75. package/dist/chunk-O2LG3PNI.js +74 -0
  76. package/dist/chunk-O4GRKO3I.js +66 -0
  77. package/dist/chunk-OHUFNYGN.js +791 -0
  78. package/dist/chunk-PWKWNDBS.js +243 -0
  79. package/dist/chunk-QA74ITR4.js +103 -0
  80. package/dist/chunk-R6RGJF4L.js +170 -0
  81. package/dist/chunk-S7NNXWIN.js +7 -0
  82. package/dist/chunk-SV56BSUQ.js +162 -0
  83. package/dist/chunk-T7FCG7XV.js +435 -0
  84. package/dist/chunk-THC2ISYP.js +57 -0
  85. package/dist/chunk-VWC72TR3.js +115 -0
  86. package/dist/chunk-W46K56XU.js +216 -0
  87. package/dist/chunk-W5GGOUUI.js +75 -0
  88. package/dist/chunk-WEUJYDCV.js +269 -0
  89. package/dist/chunk-WFY7DKQD.js +279 -0
  90. package/dist/chunk-WZQFC7ZN.js +448 -0
  91. package/dist/chunk-Z3ETJN5G.js +136 -0
  92. package/dist/chunk-ZOOX3TUB.js +192 -0
  93. package/dist/chunk-ZSNJ6UA3.js +42 -0
  94. package/dist/chunk-ZZA2LUTL.js +130 -0
  95. package/dist/chunk-ZZT2E5VT.js +24 -0
  96. package/dist/color-CtSxc1Rh.d.ts +6 -0
  97. package/dist/combobox.d.ts +184 -0
  98. package/dist/combobox.js +21 -0
  99. package/dist/date-input.d.ts +83 -0
  100. package/dist/date-input.js +16 -0
  101. package/dist/date-picker.d.ts +249 -0
  102. package/dist/date-picker.js +29 -0
  103. package/dist/date-utils-7hTFTXNK.d.ts +34 -0
  104. package/dist/date-vMJBKAFK.d.ts +22 -0
  105. package/dist/dialog.d.ts +86 -0
  106. package/dist/dialog.js +15 -0
  107. package/dist/drawer.d.ts +77 -0
  108. package/dist/drawer.js +14 -0
  109. package/dist/dropdown-menu.d.ts +218 -0
  110. package/dist/dropdown-menu.js +10 -0
  111. package/dist/file-trigger.d.ts +42 -0
  112. package/dist/file-trigger.js +3 -0
  113. package/dist/form.d.ts +487 -0
  114. package/dist/form.js +1179 -0
  115. package/dist/header-navigation.d.ts +74 -0
  116. package/dist/header-navigation.js +23 -0
  117. package/dist/icons/app.d.ts +48 -0
  118. package/dist/icons/app.js +282 -0
  119. package/dist/icons/flag.d.ts +817 -0
  120. package/dist/icons/flag.js +58336 -0
  121. package/dist/icons/integration.d.ts +36 -0
  122. package/dist/icons/integration.js +531 -0
  123. package/dist/icons/payment.d.ts +116 -0
  124. package/dist/icons/payment.js +2418 -0
  125. package/dist/icons.d.ts +2013 -0
  126. package/dist/icons.js +2012 -0
  127. package/dist/illustration.d.ts +48 -0
  128. package/dist/illustration.js +4 -0
  129. package/dist/index.d.ts +68 -0
  130. package/dist/index.js +73 -0
  131. package/dist/indicator.d.ts +51 -0
  132. package/dist/indicator.js +7 -0
  133. package/dist/input.d.ts +66 -0
  134. package/dist/input.js +15 -0
  135. package/dist/multi-value-CJb_tnvi.d.ts +8 -0
  136. package/dist/nav-Bla0o_-1.d.ts +98 -0
  137. package/dist/number-input.d.ts +80 -0
  138. package/dist/number-input.js +15 -0
  139. package/dist/options-CPEIgjtd.d.ts +68 -0
  140. package/dist/overflow-Df0h42Oi.d.ts +29 -0
  141. package/dist/pagination.d.ts +77 -0
  142. package/dist/pagination.js +17 -0
  143. package/dist/payment-input.d.ts +7 -0
  144. package/dist/payment-input.js +15 -0
  145. package/dist/popover.d.ts +60 -0
  146. package/dist/popover.js +14 -0
  147. package/dist/progress.d.ts +87 -0
  148. package/dist/progress.js +5 -0
  149. package/dist/radio.d.ts +77 -0
  150. package/dist/radio.js +12 -0
  151. package/dist/select.d.ts +68 -0
  152. package/dist/select.js +24 -0
  153. package/dist/shared-BNXAdgh2.d.ts +9 -0
  154. package/dist/shared-BYXJPnsN.d.ts +11 -0
  155. package/dist/shared-Dc-GgA16.d.ts +42 -0
  156. package/dist/sidebar-navigation.d.ts +129 -0
  157. package/dist/sidebar-navigation.js +15 -0
  158. package/dist/styles.css +2 -0
  159. package/dist/switch.d.ts +23 -0
  160. package/dist/switch.js +7 -0
  161. package/dist/table.d.ts +692 -0
  162. package/dist/table.js +44 -0
  163. package/dist/tabs.d.ts +111 -0
  164. package/dist/tabs.js +8 -0
  165. package/dist/tag-input.d.ts +12 -0
  166. package/dist/tag-input.js +19 -0
  167. package/dist/tag.d.ts +98 -0
  168. package/dist/tag.js +9 -0
  169. package/dist/textarea.d.ts +40 -0
  170. package/dist/textarea.js +12 -0
  171. package/dist/theme-script.d.ts +29 -0
  172. package/dist/theme-script.js +15 -0
  173. package/dist/theme.css +929 -0
  174. package/dist/theme.d.ts +71 -0
  175. package/dist/theme.js +15 -0
  176. package/dist/toast.d.ts +242 -0
  177. package/dist/toast.js +15 -0
  178. package/dist/tooltip.d.ts +70 -0
  179. package/dist/tooltip.js +6 -0
  180. package/dist/tree.d.ts +308 -0
  181. package/dist/tree.js +11 -0
  182. package/package.json +352 -0
@@ -0,0 +1,83 @@
1
+ import * as React from 'react';
2
+ import { E as Era } from './date-utils-7hTFTXNK.js';
3
+ export { D as DateOrder, H as HourCycle, P as ParsedFormat } from './date-utils-7hTFTXNK.js';
4
+
5
+ type DateInputSize = "sm" | "md" | "lg";
6
+
7
+ interface DateInputProps {
8
+ /** Control height/padding/text size. @default "md" */
9
+ size?: DateInputSize;
10
+ /** Controlled value in the canonical shape the {@link DateInputProps.format} implies —
11
+ * `YYYY-MM-DD`, `YYYY-MM-DDTHH:mm[:ss]`, or `HH:mm[:ss]` for a time-only field —
12
+ * or `null` while any segment is still empty. */
13
+ value?: string | null;
14
+ /** Uncontrolled initial value (same shape as {@link DateInputProps.value}). */
15
+ defaultValue?: string;
16
+ /** Fires with the canonical string (or `null` while incomplete). Always Gregorian; era only affects display. */
17
+ onValueChange?: (value: string | null) => void;
18
+ /** Earliest allowed ISO date — clamps the year segment (always given in CE). */
19
+ min?: string;
20
+ /** Latest allowed ISO date — clamps the year segment (always given in CE). */
21
+ max?: string;
22
+ /**
23
+ * What this field IS, as a token string: which segments exist, in what order, with
24
+ * what separators — one prop instead of a boolean-per-feature.
25
+ *
26
+ * Tokens (date-fns spelling): `yyyy` `MM` `dd` · `HH` (24h) or `hh`+`a` (12h) ·
27
+ * `mm` `ss`. Everything else is a literal separator, so the punctuation is written,
28
+ * not chosen from an enum. A date needs all three of `yyyy`/`MM`/`dd` (or none), a
29
+ * time needs `HH|hh` + `mm`, `ss` needs `mm`, and `hh` needs `a`.
30
+ *
31
+ * `"MM/dd/yyyy"` · `"dd/MM/yyyy"` · `"dd/MM/yyyy HH:mm"` · `"HH:mm"` (time-only) ·
32
+ * `"hh:mm a"` · `"yyyy-MM-dd HH:mm:ss"`. An unparseable format warns in dev and
33
+ * falls back to the default. @default "MM/dd/yyyy"
34
+ */
35
+ format?: string;
36
+ /** Year era shown/typed in the year segment: `"ce"` (ค.ศ.) or `"be"` (พ.ศ. = ค.ศ. + 543).
37
+ * Not a `format` token — the era is a calendar, not a layout. The emitted value is always CE. @default "ce" */
38
+ era?: Era;
39
+ /** Start slot: a **node** renders as an icon (e.g. a calendar, `fg-quaternary`); a **string** as a
40
+ * muted text affix. */
41
+ leading?: React.ReactNode;
42
+ /** End slot: a **node** renders as an icon; a **string** as a muted text affix. */
43
+ trailing?: React.ReactNode;
44
+ /**
45
+ * Bordered/interactive segment flush to the START edge — a unit, a `<NativeSelect seamless>`,
46
+ * or an icon `<Button seamless>`. Wrap static content in `<InputAddon>`. @see InputAddon
47
+ */
48
+ leadingAddon?: React.ReactNode;
49
+ /** Bordered/interactive segment flush to the END edge (a "Today" button, a timezone select, …). @see InputAddon */
50
+ trailingAddon?: React.ReactNode;
51
+ /** Visible label (`Field.Label`), auto-associated with the control. */
52
+ label?: string;
53
+ /** Help-circle tooltip after the label (title line). @see tooltipDescription */
54
+ tooltip?: string;
55
+ /** Optional secondary line under {@link tooltip} in the tooltip surface. */
56
+ tooltipDescription?: string;
57
+ /** Helper text under the field (`Field.Description`). Hidden while an `error` shows. */
58
+ hint?: React.ReactNode;
59
+ /** Error state: red border + error ring and `aria-invalid`. @default false */
60
+ invalid?: boolean;
61
+ /** Optional error message (`Field.Error`). A truthy `error` also implies `invalid`. */
62
+ error?: string;
63
+ /** Marks the field required for form submission. @default false */
64
+ required?: boolean;
65
+ /** Suppress the visual required `*` while keeping `required` semantics — for forms
66
+ * where every field is required and the asterisks become noise. @default false */
67
+ hideRequiredIndicator?: boolean;
68
+ /** Disables the field. @default false */
69
+ disabled?: boolean;
70
+ /** Whether the field column takes `w-full`. Only OBSERVABLE where the parent would otherwise let
71
+ * the column shrink-to-fit (a flex row / grid cell) — in a plain block container it fills either
72
+ * way. Bound the field with a width in `className` (`w-64`, `max-w-56`). @default true */
73
+ fullWidth?: boolean;
74
+ /** Name of the hidden ISO input (form integration). */
75
+ name?: string;
76
+ /** Id of the field group. */
77
+ id?: string;
78
+ /** Layout/spacing only (margin, width, flex/grid placement), merged via `cn()`. */
79
+ className?: string;
80
+ }
81
+ declare function DateInput(props: DateInputProps): React.JSX.Element;
82
+
83
+ export { DateInput, type DateInputProps, type DateInputSize, Era };
@@ -0,0 +1,16 @@
1
+ "use client";export { DateInput } from './chunk-5NOBSXJN.js';
2
+ import './chunk-GFOAJVW5.js';
3
+ import './chunk-7EUAMHMU.js';
4
+ import './chunk-QA74ITR4.js';
5
+ import './chunk-KNYKWUYX.js';
6
+ import './chunk-52IFGFTL.js';
7
+ import './chunk-O2LG3PNI.js';
8
+ import './chunk-EDSK6FEH.js';
9
+ import './chunk-J2BCKBHC.js';
10
+ import './chunk-24TO7E32.js';
11
+ import './chunk-ZZA2LUTL.js';
12
+ import './chunk-O4GRKO3I.js';
13
+ import './chunk-GCVA3OIV.js';
14
+ import './chunk-ZSNJ6UA3.js';
15
+ //# sourceMappingURL=date-input.js.map
16
+ //# sourceMappingURL=date-input.js.map
@@ -0,0 +1,249 @@
1
+ import * as React from 'react';
2
+ import { W as WeekStart } from './date-vMJBKAFK.js';
3
+ import { E as Era } from './date-utils-7hTFTXNK.js';
4
+ import { Locale } from 'date-fns';
5
+ import { b as PopoverSide, P as PopoverAlign } from './shared-BYXJPnsN.js';
6
+
7
+ /**
8
+ * The public type surface of the date family — `DateCalendar`, `DateRangeCalendar`, `DatePicker`,
9
+ * `DateRangePicker`. No JSX here, so it can be imported by the adapter, the class map and the docs
10
+ * tooling without pulling a component in.
11
+ *
12
+ * ## The containment rule
13
+ *
14
+ * `react-day-picker` is the hidden engine (the same posture `use-table.ts` holds with TanStack and
15
+ * `src/form/` holds with react-hook-form), and **only `day-picker.tsx` may name it**:
16
+ *
17
+ * ```bash
18
+ * grep -rn "react-day-picker" src/ --include='*.ts' --include='*.tsx' \
19
+ * | grep -v "src/components/date-picker/day-picker.tsx"
20
+ * # must return nothing
21
+ * ```
22
+ *
23
+ * So rdp's `DateRange` (`{ from, to }`) never leaves that file: our range is {@link DateRangeValue}
24
+ * with `start`/`end`, matching every other range concept in the library, adapted at the boundary
25
+ * (`adapter.ts`).
26
+ *
27
+ * ## One `Date`, two meanings — and only one of them here
28
+ *
29
+ * Every value in this family is a **calendar date** held as local midnight, so the wire form is
30
+ * `toWireDate(d)` (`"YYYY-MM-DD"`) and **`toISOString()` is banned**: at Bangkok's +07,
31
+ * `new Date(2026, 7, 5).toISOString()` is `"2026-08-04T17:00:00.000Z"` and renders the day before.
32
+ * The mirror rule holds for a calendar EVENT's `start`/`end`, which are instants and therefore
33
+ * REQUIRE `toISOString()` — see `src/lib/date.ts`'s header for the full table. Same `Date` type,
34
+ * opposite serializers, decided by what the value means.
35
+ */
36
+
37
+ /**
38
+ * A date range as the library spells it — `start` / `end`.
39
+ *
40
+ * The members are nullable rather than the range itself being `| null` because a half-open range is
41
+ * a real state (the first click of a two-click selection) and so is "all time"
42
+ * (`{ start: null, end: null }`, which is what the `All time` preset resolves to).
43
+ */
44
+ interface DateRangeValue {
45
+ start: Date | null;
46
+ end: Date | null;
47
+ }
48
+ /** Grid density. `sm` 32px cells · **`md` 40px (default)** · `lg` 44px. */
49
+ type DateCalendarSize = "sm" | "md" | "lg";
50
+ /**
51
+ * Every prop shared by all four components.
52
+ *
53
+ * Note `disabledDates`, not `disabled`: `disabled` is already the library-wide "this control is
54
+ * inert" boolean, which the two pickers need for their field. Two meanings on one name is how a
55
+ * prop becomes unreadable.
56
+ */
57
+ interface DateCommonProps {
58
+ /** Earliest selectable date (inclusive). Days before it render disabled **and** navigation stops
59
+ * at its month — both halves matter, or a user reaches a month where every day is dead. */
60
+ min?: Date;
61
+ /** Latest selectable date (inclusive). Same pair of effects as {@link min}. */
62
+ max?: Date;
63
+ /** Individual days to disable beyond {@link min}/{@link max} — blackout dates as an array, or a
64
+ * predicate for a rule (`(d) => d.getDay() === 0 || d.getDay() === 6` for weekends). */
65
+ disabledDates?: readonly Date[] | ((date: Date) => boolean);
66
+ /** date-fns locale driving the weekday names, the month caption and the printed formats. It does
67
+ * **not** drive the week start; that is {@link weekStartsOn}.
68
+ * `import { th } from "date-fns/locale"`. @default enUS */
69
+ locale?: Locale;
70
+ /** Which day the grid's first column is. `"locale"` defers to the date-fns locale's own week start
71
+ * (Sunday for `enUS`, `ja` and `th`; Monday for `enGB` and `de`). @default "monday" */
72
+ weekStartsOn?: WeekStart;
73
+ /** Year era shown in the caption, the year dropdown and the typed row: `"ce"` (ค.ศ.) or `"be"`
74
+ * (พ.ศ. = ค.ศ. + 543). **Display only** — emitted values are always CE, exactly `DateInput`'s
75
+ * contract. @default "ce" */
76
+ era?: Era;
77
+ /** Cell size / type scale. @default "md" */
78
+ size?: DateCalendarSize;
79
+ /** Month shown when nothing is selected. @default today */
80
+ defaultMonth?: Date;
81
+ /** Layout/spacing only, merged via `cn()`. Never restyles a cell. */
82
+ className?: string;
83
+ }
84
+
85
+ interface DateCalendarProps extends DateCommonProps {
86
+ /** Controlled selection. `null` = nothing selected. */
87
+ value?: Date | null;
88
+ /** Uncontrolled initial selection. @default null */
89
+ defaultValue?: Date | null;
90
+ /** Fires on every day click — this grid is always instant. `null` when the selected day is clicked
91
+ * again, which clears it. The `Date` is always **local midnight**. */
92
+ onValueChange?: (value: Date | null) => void;
93
+ /** Accessible name for the grid container. @default "Calendar" */
94
+ "aria-label"?: string;
95
+ }
96
+ declare function DateCalendar(props: DateCalendarProps): React.JSX.Element;
97
+ declare namespace DateCalendar {
98
+ var displayName: string;
99
+ }
100
+
101
+ interface DateRangeCalendarProps extends DateCommonProps {
102
+ /** Controlled selection. Both members nullable — `{ start, end: null }` is the half-open state
103
+ * after the first click, and `{ start: null, end: null }` is nothing selected. */
104
+ value?: DateRangeValue | null;
105
+ /** Uncontrolled initial selection. */
106
+ defaultValue?: DateRangeValue | null;
107
+ /** Fires on every day click. **Total** — never `null`; an empty selection is `{ start: null,
108
+ * end: null }`. Both `Date`s are local midnight. */
109
+ onValueChange?: (value: DateRangeValue) => void;
110
+ /** Months rendered side by side. @default 2 */
111
+ months?: 1 | 2;
112
+ /** Minimum nights a selectable range may span. A second click closer than this restarts the range
113
+ * from the clicked day rather than silently accepting a too-short stay. */
114
+ minNights?: number;
115
+ /** Maximum nights a selectable range may span. */
116
+ maxNights?: number;
117
+ /** Accessible name for the grid container. @default "Date range calendar" */
118
+ "aria-label"?: string;
119
+ }
120
+ declare function DateRangeCalendar(props: DateRangeCalendarProps): React.JSX.Element;
121
+ declare namespace DateRangeCalendar {
122
+ var displayName: string;
123
+ }
124
+
125
+ /** How a change reaches the caller. ONE union rather than two booleans: the "neither" state gets a
126
+ * name, the default is a real member, and there is no way to spell a contradiction. */
127
+ type DateCommit = "instant" | "confirm";
128
+ interface DatePickerProps extends DateCommonProps {
129
+ /** Controlled selection. `null` = nothing selected. */
130
+ value?: Date | null;
131
+ /** Uncontrolled initial selection. @default null */
132
+ defaultValue?: Date | null;
133
+ /** Fires when the value COMMITS — on every grid click under `commit="instant"`, on Apply under
134
+ * `commit="confirm"`. The `Date` is always local midnight (plus the typed clock, if any). */
135
+ onValueChange?: (value: Date | null) => void;
136
+ /** The trigger's formatted label, in **date-fns** display tokens (`MMM`, `EEEE`, `do`, …).
137
+ * @default derived from `dateInputFormat` → `"MMM d, yyyy"` */
138
+ format?: string;
139
+ /** The popover's typed row, in the **segment** token table `<DateInput>` speaks
140
+ * (`yyyy MM dd HH hh a mm ss` only — `MMM` is not a segment). Also the single source for whether
141
+ * this picker has a TIME part. @default "MM/dd/yyyy" */
142
+ dateInputFormat?: string;
143
+ /** `"instant"` commits on each grid click and closes. `"confirm"` stages a draft and commits only on
144
+ * Apply, rendering the Cancel/Apply footer; Esc and outside-press then behave as Cancel.
145
+ * @default "instant" */
146
+ commit?: DateCommit;
147
+ /** Text shown in the trigger when there is no value. @default "Select date" */
148
+ placeholder?: string;
149
+ /** Side of the trigger the popover opens on. @default "bottom" */
150
+ side?: PopoverSide;
151
+ /** Alignment along that side. @default "start" */
152
+ align?: PopoverAlign;
153
+ /** Visible label (`Field.Label`), associated with the trigger via `aria-labelledby`. */
154
+ label?: string;
155
+ /** Help-circle tooltip after the label (title line). @see tooltipDescription */
156
+ tooltip?: string;
157
+ /** Optional secondary line under {@link tooltip} in the tooltip surface. */
158
+ tooltipDescription?: string;
159
+ /** Helper text under the field (`Field.Description`). Hidden while an `error` shows. */
160
+ hint?: React.ReactNode;
161
+ /** Marks the field required for form submission. @default false */
162
+ required?: boolean;
163
+ /** Suppress the visual required `*` while keeping `required` semantics. @default false */
164
+ hideRequiredIndicator?: boolean;
165
+ /** Error state: red edge + error ring and `aria-invalid`. @default false */
166
+ invalid?: boolean;
167
+ /** Optional error message (`Field.Error`). A non-empty `error` also implies `invalid`. */
168
+ error?: string;
169
+ /** Disables the trigger; the popover cannot open. @default false */
170
+ disabled?: boolean;
171
+ /** Whether the field column takes `w-full`. Only OBSERVABLE where the parent would otherwise let
172
+ * the column shrink-to-fit (a flex row / grid cell) — in a plain block container it fills either
173
+ * way. Bound the field with a width in `className` (`w-56`). @default true */
174
+ fullWidth?: boolean;
175
+ /** Start slot: a **node** renders as an icon; a **string** as a muted text affix. */
176
+ leading?: React.ReactNode;
177
+ /** End slot: a node renders as an icon; a string as a muted text affix. Sits outside the trigger's
178
+ * own calendar glyph. */
179
+ trailing?: React.ReactNode;
180
+ /** Bordered/interactive segment flush to the START edge. @see InputAddon */
181
+ leadingAddon?: React.ReactNode;
182
+ /** Bordered/interactive segment flush to the END edge (a "Today" button, a timezone select, …). */
183
+ trailingAddon?: React.ReactNode;
184
+ /** Name of the hidden ISO input, for uncontrolled form submission. */
185
+ name?: string;
186
+ /** Id of the field group. */
187
+ id?: string;
188
+ }
189
+ declare function DatePicker(props: DatePickerProps): React.JSX.Element;
190
+ declare namespace DatePicker {
191
+ var displayName: string;
192
+ }
193
+
194
+ interface DatePreset {
195
+ /** The rail button's text. */
196
+ label: string;
197
+ /**
198
+ * A literal range, or a **thunk**.
199
+ *
200
+ * Use a thunk for anything relative to "now": a literal is evaluated when the module is imported,
201
+ * which freezes "today" at the moment the bundle loaded — a tab left open overnight would offer
202
+ * yesterday under the label `Today`. Every member of {@link DATE_PRESETS} is a thunk.
203
+ */
204
+ range: DateRangeValue | (() => DateRangeValue);
205
+ }
206
+ /** Resolve a preset's range, calling it when it is a thunk. Internal — the components call it at
207
+ * render, so a relative preset is re-evaluated every time the rail draws. */
208
+ declare function resolvePreset(preset: DatePreset): DateRangeValue;
209
+ /**
210
+ * The house list: **Today · Yesterday · This week · Last week · This month · Last month ·
211
+ * This year · Last year · All time**.
212
+ *
213
+ * Every range is local-midnight-to-local-midnight (`startOfDay`), because a picker's value is a
214
+ * calendar DATE — see `types.ts`'s header on the two `Date` semantics. `All time` is
215
+ * `{ start: null, end: null }`, which is why {@link DateRangeValue}'s members are the nullable part.
216
+ *
217
+ * The week bounds use the **house week start, Monday** (`DEFAULT_WEEK_START`) — the same default the
218
+ * grid draws with, so "This week" highlights exactly the row a user is looking at. A preset list is
219
+ * data, not a component, so it cannot read a caller's `weekStartsOn`; anyone who overrides that prop
220
+ * and needs the presets to match spells their own two entries, which is the extension point.
221
+ */
222
+ declare const DATE_PRESETS: readonly DatePreset[];
223
+
224
+ interface DateRangePickerProps extends Omit<DatePickerProps, "value" | "defaultValue" | "onValueChange" | "placeholder"> {
225
+ /** Controlled selection. `{ start, end: null }` is the half-open state after one click. */
226
+ value?: DateRangeValue | null;
227
+ /** Uncontrolled initial selection. */
228
+ defaultValue?: DateRangeValue | null;
229
+ /** Fires when the range COMMITS. **Total** — never `null`; an empty range is
230
+ * `{ start: null, end: null }`. */
231
+ onValueChange?: (value: DateRangeValue) => void;
232
+ /** Quick-range rail. Pass the exported `DATE_PRESETS` for the house list, or extend it:
233
+ * `presets={[...DATE_PRESETS, myQuarter]}`. Omit it for no rail. */
234
+ presets?: readonly DatePreset[];
235
+ /** Months rendered side by side in the popover. @default 2 */
236
+ months?: 1 | 2;
237
+ /** Minimum nights a selectable range may span. */
238
+ minNights?: number;
239
+ /** Maximum nights a selectable range may span. */
240
+ maxNights?: number;
241
+ /** Text shown in the trigger when there is no range. @default "Select dates" */
242
+ placeholder?: string;
243
+ }
244
+ declare function DateRangePicker(props: DateRangePickerProps): React.JSX.Element;
245
+ declare namespace DateRangePicker {
246
+ var displayName: string;
247
+ }
248
+
249
+ export { DATE_PRESETS, DateCalendar, type DateCalendarProps, type DateCalendarSize, type DateCommit, type DateCommonProps, DatePicker, type DatePickerProps, type DatePreset, DateRangeCalendar, type DateRangeCalendarProps, DateRangePicker, type DateRangePickerProps, type DateRangeValue, Era, WeekStart, resolvePreset };
@@ -0,0 +1,29 @@
1
+ "use client";export { DATE_PRESETS, DateCalendar, DatePicker, DateRangeCalendar, DateRangePicker, resolvePreset } from './chunk-JTNFJLIY.js';
2
+ import './chunk-5RAPA22E.js';
3
+ import './chunk-3Y5X7B5C.js';
4
+ import './chunk-CYPPEUX5.js';
5
+ import './chunk-J7ZQQFPT.js';
6
+ import './chunk-MFJP5FA7.js';
7
+ import './chunk-5NOBSXJN.js';
8
+ import './chunk-GFOAJVW5.js';
9
+ import './chunk-W46K56XU.js';
10
+ import './chunk-CME4DIML.js';
11
+ import './chunk-MQGD2OUF.js';
12
+ import './chunk-JVJRHBTD.js';
13
+ import './chunk-7EUAMHMU.js';
14
+ import './chunk-7S2TBALK.js';
15
+ import './chunk-S7NNXWIN.js';
16
+ import './chunk-DWKILXHE.js';
17
+ import './chunk-QA74ITR4.js';
18
+ import './chunk-KNYKWUYX.js';
19
+ import './chunk-52IFGFTL.js';
20
+ import './chunk-O2LG3PNI.js';
21
+ import './chunk-EDSK6FEH.js';
22
+ import './chunk-J2BCKBHC.js';
23
+ import './chunk-24TO7E32.js';
24
+ import './chunk-ZZA2LUTL.js';
25
+ import './chunk-O4GRKO3I.js';
26
+ import './chunk-GCVA3OIV.js';
27
+ import './chunk-ZSNJ6UA3.js';
28
+ //# sourceMappingURL=date-picker.js.map
29
+ //# sourceMappingURL=date-picker.js.map
@@ -0,0 +1,34 @@
1
+ type SegName = "month" | "day" | "year" | "hour" | "minute" | "second" | "dayPeriod";
2
+ /** Year era for the DISPLAY of the year segment. The stored value is always CE.
3
+ * NOT part of {@link DateInputProps.format}: the era is a calendar, not a layout —
4
+ * พ.ศ. has no token in the date-fns vocabulary the format borrows. */
5
+ type Era = "ce" | "be";
6
+ type HourCycle = 12 | 24;
7
+ /** One rendered segment: what it edits, and the literal text before it. */
8
+ interface SegSpec {
9
+ seg: SegName;
10
+ /** Literal rendered BEFORE this segment — whatever the `format` put between the
11
+ * two tokens ("/", ":", " ", ", "). `null` for the first segment. */
12
+ sep: string | null;
13
+ /** The token this segment came from — `HH` vs `hh` is what sets the hour cycle. */
14
+ token: string;
15
+ }
16
+ /** Order of the date segments, needed to resolve an ambiguous pasted triple. */
17
+ type DateOrder = "mdy" | "dmy" | "ymd";
18
+ /** What a `format` string resolves to. Shape only — era/year bounds live on {@link DateConfig}. */
19
+ interface ParsedFormat {
20
+ /** Segments in render order, each with the literal that precedes it. */
21
+ segs: SegSpec[];
22
+ /** Carries a full date (year + month + day). */
23
+ hasDate: boolean;
24
+ /** Carries a time (hour + minute). */
25
+ hasTime: boolean;
26
+ /** `true` when the format asked for a seconds segment. */
27
+ hasSeconds: boolean;
28
+ /** 12-hour when the format used `hh` + `a`. */
29
+ hourCycle: HourCycle;
30
+ /** Reading order of the date segments (for paste resolution). */
31
+ dateOrder: DateOrder;
32
+ }
33
+
34
+ export type { DateOrder as D, Era as E, HourCycle as H, ParsedFormat as P };
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Which day a week grid starts on — **the house default is Monday**, in every locale.
3
+ *
4
+ * This deliberately does NOT default to the locale's own week start, and the reversal is worth
5
+ * recording because the opposite rule shipped first ("the locale carries `weekStartsOn`, so there is
6
+ * no second knob"). Two things broke it:
7
+ *
8
+ * 1. **Most locales are Sunday-start, and that is not what a work calendar wants.** CLDR puts
9
+ * `en-US`, `ja` **and `th`** on Sunday (`new Intl.Locale("th").weekInfo.firstDay === 7` — Thai wall
10
+ * calendars really do lead with อาทิตย์). So "follow the locale" meant "Sunday" for most of this
11
+ * library's users, and a Sunday column split their working week across two rows.
12
+ * 2. **Language and layout are different questions.** Switching a UI to Thai should change the
13
+ * weekday NAMES; it should not silently reflow the grid. Tying the two together made the week
14
+ * start un-settable without also changing the language.
15
+ *
16
+ * `"locale"` hands the decision back for the app that genuinely wants it — an i18n product that
17
+ * follows the user's language everywhere. It is a member rather than the default so that the common
18
+ * case needs no prop and the deferral is a written choice.
19
+ */
20
+ type WeekStart = "locale" | "sunday" | "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday";
21
+
22
+ export type { WeekStart as W };
@@ -0,0 +1,86 @@
1
+ import * as React from 'react';
2
+ import { a as DialogSize, D as DialogFooter } from './shared-BNXAdgh2.js';
3
+
4
+ interface AlertDialogProps {
5
+ /** Opens the dialog from your own element (e.g. a `<Button>`) and wires focus-return
6
+ * automatically. Use for simple, sync cases; omit and control `open` for async flows. */
7
+ trigger?: React.ReactElement;
8
+ /** Controlled open state. */
9
+ open?: boolean;
10
+ /** Uncontrolled initial open state. @default false */
11
+ defaultOpen?: boolean;
12
+ /** Fires whenever the dialog requests to open or close. */
13
+ onOpenChange?: (open: boolean) => void;
14
+ /** Max width of the popup surface. @default "md" */
15
+ size?: DialogSize;
16
+ /** Render the top-right close icon button. @default false */
17
+ showClose?: boolean;
18
+ /** Draw a full-bleed hairline between the header and body, and the body and footer. @default true */
19
+ dividers?: boolean;
20
+ /** Keep the portal mounted (hidden) while closed, preserving body state instead of unmounting. @default false */
21
+ keepMounted?: boolean;
22
+ /** Title text (wired to `aria-labelledby`). Provide this or `aria-label`. */
23
+ title?: React.ReactNode;
24
+ /** Supporting description (wired to `aria-describedby`). */
25
+ description?: React.ReactNode;
26
+ /** Leading header node — an `<Avatar>`, a feature icon. The node keeps its own a11y semantics. */
27
+ leading?: React.ReactNode;
28
+ /** Trailing header node — a `<Badge>`, a menu trigger. Sits left of the close icon when both show. */
29
+ trailing?: React.ReactNode;
30
+ /** Right-aligned action row; a render-fn receives a `close()` helper. */
31
+ footer?: DialogFooter;
32
+ /** Accessible name when no `title` is rendered. */
33
+ "aria-label"?: string;
34
+ /** Layout/spacing overrides for the popup only (merged via `cn()`). Cannot recolor the surface or scrim. */
35
+ className?: string;
36
+ /** Main content — rendered in the scrollable body (auto scroll-fade). */
37
+ children?: React.ReactNode;
38
+ }
39
+ declare function AlertDialog(props: AlertDialogProps): React.JSX.Element;
40
+ declare namespace AlertDialog {
41
+ var displayName: string;
42
+ }
43
+
44
+ interface DialogProps {
45
+ /** Opens the dialog from your own element (e.g. a `<Button>`) and wires focus-return
46
+ * automatically. Use for simple, sync cases; omit and control `open` for async flows. */
47
+ trigger?: React.ReactElement;
48
+ /** Controlled open state. */
49
+ open?: boolean;
50
+ /** Uncontrolled initial open state. @default false */
51
+ defaultOpen?: boolean;
52
+ /** Fires whenever the dialog requests to open or close. */
53
+ onOpenChange?: (open: boolean) => void;
54
+ /** Max width of the popup surface. @default "md" */
55
+ size?: DialogSize;
56
+ /** Render the top-right close icon button. @default true */
57
+ showClose?: boolean;
58
+ /** Draw a full-bleed hairline between the header and body, and the body and footer. @default true */
59
+ dividers?: boolean;
60
+ /** Keep the portal mounted (hidden) while closed, preserving body state instead of unmounting. @default false */
61
+ keepMounted?: boolean;
62
+ /** Allow closing via backdrop click and `Esc`. The close icon and footer still close when `false`. @default true */
63
+ dismissible?: boolean;
64
+ /** Title text (wired to `aria-labelledby`). Provide this or `aria-label`. */
65
+ title?: React.ReactNode;
66
+ /** Supporting description (wired to `aria-describedby`). */
67
+ description?: React.ReactNode;
68
+ /** Leading header node — an `<Avatar>`, a feature icon. The node keeps its own a11y semantics. */
69
+ leading?: React.ReactNode;
70
+ /** Trailing header node — a `<Badge>`, a menu trigger. Sits left of the close icon when both show. */
71
+ trailing?: React.ReactNode;
72
+ /** Right-aligned action row; a render-fn receives a `close()` helper. */
73
+ footer?: DialogFooter;
74
+ /** Accessible name when no `title` is rendered. */
75
+ "aria-label"?: string;
76
+ /** Layout/spacing overrides for the popup only (merged via `cn()`). Cannot recolor the surface or scrim. */
77
+ className?: string;
78
+ /** Main content — rendered in the scrollable body (auto scroll-fade). */
79
+ children?: React.ReactNode;
80
+ }
81
+ declare function Dialog(props: DialogProps): React.JSX.Element;
82
+ declare namespace Dialog {
83
+ var displayName: string;
84
+ }
85
+
86
+ export { AlertDialog, type AlertDialogProps, Dialog, DialogFooter, type DialogProps, DialogSize };
package/dist/dialog.js ADDED
@@ -0,0 +1,15 @@
1
+ "use client";export { Dialog } from './chunk-E7ZSWBAK.js';
2
+ export { AlertDialog } from './chunk-THC2ISYP.js';
3
+ import './chunk-CYPPEUX5.js';
4
+ import './chunk-J7ZQQFPT.js';
5
+ import './chunk-MFJP5FA7.js';
6
+ import './chunk-MQGD2OUF.js';
7
+ import './chunk-S7NNXWIN.js';
8
+ import './chunk-52IFGFTL.js';
9
+ import './chunk-O2LG3PNI.js';
10
+ import './chunk-EDSK6FEH.js';
11
+ import './chunk-24TO7E32.js';
12
+ import './chunk-O4GRKO3I.js';
13
+ import './chunk-ZSNJ6UA3.js';
14
+ //# sourceMappingURL=dialog.js.map
15
+ //# sourceMappingURL=dialog.js.map
@@ -0,0 +1,77 @@
1
+ import * as React from 'react';
2
+ import { D as DialogFooter } from './shared-BNXAdgh2.js';
3
+
4
+ type DrawerSide = "left" | "right" | "top" | "bottom";
5
+ type DrawerSize = "sm" | "md" | "lg" | "fit";
6
+ /** Where a contained drawer renders. A ref is the usual form — the element does
7
+ * not exist on the first render, so passing it directly means passing `null`. */
8
+ type DrawerContainer = HTMLElement | React.RefObject<HTMLElement | null> | null;
9
+ /** A footer is a plain node, or a render-fn given a `close()` helper — the latter
10
+ * lets footer buttons dismiss the drawer in BOTH controlled and uncontrolled
11
+ * (`trigger`) modes without a close part. Shared verbatim with `Dialog`. */
12
+ type DrawerFooter = DialogFooter;
13
+ interface DrawerProps {
14
+ /** Opens the drawer from your own element (e.g. a `<Button>`) and wires focus-return
15
+ * automatically. Use for simple, sync cases; omit and control `open` for async flows. */
16
+ trigger?: React.ReactElement;
17
+ /** Controlled open state. */
18
+ open?: boolean;
19
+ /** Uncontrolled initial open state. @default false */
20
+ defaultOpen?: boolean;
21
+ /** Fires whenever the drawer requests to open or close. */
22
+ onOpenChange?: (open: boolean) => void;
23
+ /** Viewport edge the panel is pinned to. Also sets the swipe-to-dismiss direction. @default "right" */
24
+ side?: DrawerSide;
25
+ /** Panel thickness along the axis it does NOT fill — width for `left`/`right`, height for
26
+ * `top`/`bottom`. `sm`/`md`/`lg` are 320/400/512px; **`fit` shrinks to the child instead**,
27
+ * for content that already declares its own size (e.g. a `<SidebarNavigation>`, which is `w-70`).
28
+ * `fit` needs a child that HAS an intrinsic size — text-only content collapses to its
29
+ * longest line. @default "md" */
30
+ size?: DrawerSize;
31
+ /** Render the top-right close icon button. @default true */
32
+ showClose?: boolean;
33
+ /** Draw a full-bleed hairline between the header and body, and the body and footer. @default true */
34
+ dividers?: boolean;
35
+ /** Keep the portal mounted (hidden) while closed, preserving body state instead of unmounting. @default false */
36
+ keepMounted?: boolean;
37
+ /** Allow closing via backdrop click, swipe, `Esc`, and the Android back gesture. The close icon,
38
+ * the footer's `close()`, the trigger, and the app driving `open` itself still close when
39
+ * `false` — see {@link EXPLICIT_CLOSE}. @default true */
40
+ dismissible?: boolean;
41
+ /**
42
+ * Render inside this element instead of the viewport — a drawer over one panel
43
+ * of a dashboard rather than over the page. The container must establish a
44
+ * positioning context (`relative`) and clip its own overflow; the panel, scrim,
45
+ * and swipe layer all become `absolute` within it.
46
+ *
47
+ * A contained drawer traps focus but does NOT make the rest of the page inert or
48
+ * lock body scroll: it is one region's overlay, so the surrounding app stays live.
49
+ */
50
+ container?: DrawerContainer;
51
+ /** Title text (wired to `aria-labelledby`). Provide this or `aria-label`. */
52
+ title?: React.ReactNode;
53
+ /** Supporting description (wired to `aria-describedby`). */
54
+ description?: React.ReactNode;
55
+ /** Leading header node — an `<Avatar>`, a feature icon. The node keeps its own a11y semantics. */
56
+ leading?: React.ReactNode;
57
+ /** Trailing header node — a `<Badge>`, a menu trigger. Sits left of the close icon when both show. */
58
+ trailing?: React.ReactNode;
59
+ /** Action row; a render-fn receives a `close()` helper. */
60
+ footer?: DrawerFooter;
61
+ /** Accessible name when no `title` is rendered. */
62
+ "aria-label"?: string;
63
+ /** Layout/spacing overrides for the panel only (merged via `cn()`). Cannot recolor the surface or scrim. */
64
+ className?: string;
65
+ /** Main content — rendered in the scrollable body (auto scroll-fade). */
66
+ children?: React.ReactNode;
67
+ }
68
+ /**
69
+ * Edge-anchored modal panel — the side-docked counterpart to `Dialog`, for
70
+ * navigation, filters, and detail views that should keep the page in frame.
71
+ */
72
+ declare function Drawer(props: DrawerProps): React.JSX.Element;
73
+ declare namespace Drawer {
74
+ var displayName: string;
75
+ }
76
+
77
+ export { Drawer, type DrawerContainer, type DrawerFooter, type DrawerProps, type DrawerSide, type DrawerSize };
package/dist/drawer.js ADDED
@@ -0,0 +1,14 @@
1
+ "use client";export { Drawer } from './chunk-Z3ETJN5G.js';
2
+ import './chunk-CYPPEUX5.js';
3
+ import './chunk-J7ZQQFPT.js';
4
+ import './chunk-MFJP5FA7.js';
5
+ import './chunk-MQGD2OUF.js';
6
+ import './chunk-S7NNXWIN.js';
7
+ import './chunk-52IFGFTL.js';
8
+ import './chunk-O2LG3PNI.js';
9
+ import './chunk-EDSK6FEH.js';
10
+ import './chunk-24TO7E32.js';
11
+ import './chunk-O4GRKO3I.js';
12
+ import './chunk-ZSNJ6UA3.js';
13
+ //# sourceMappingURL=drawer.js.map
14
+ //# sourceMappingURL=drawer.js.map