@leonardaustin/ui 0.12.0 → 0.14.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 (201) hide show
  1. package/dist/components/app-shell/AppShell.d.ts +27 -0
  2. package/dist/components/app-shell/AppShell.d.ts.map +1 -1
  3. package/dist/components/app-shell/AuthLayout.d.ts +2 -0
  4. package/dist/components/app-shell/AuthLayout.d.ts.map +1 -1
  5. package/dist/components/app-shell/BackLink.d.ts +4 -0
  6. package/dist/components/app-shell/BackLink.d.ts.map +1 -1
  7. package/dist/components/app-shell/BottomNav.d.ts +17 -0
  8. package/dist/components/app-shell/BottomNav.d.ts.map +1 -1
  9. package/dist/components/app-shell/Breadcrumbs.d.ts +3 -0
  10. package/dist/components/app-shell/Breadcrumbs.d.ts.map +1 -1
  11. package/dist/components/app-shell/CommandPalette.d.ts +7 -0
  12. package/dist/components/app-shell/CommandPalette.d.ts.map +1 -1
  13. package/dist/components/app-shell/MobileDrawer.d.ts +30 -0
  14. package/dist/components/app-shell/MobileDrawer.d.ts.map +1 -1
  15. package/dist/components/app-shell/Sidebar.d.ts.map +1 -1
  16. package/dist/components/app-shell/ThemeMenu.d.ts.map +1 -1
  17. package/dist/components/app-shell/TopBar.d.ts +11 -0
  18. package/dist/components/app-shell/TopBar.d.ts.map +1 -1
  19. package/dist/components/app-shell/types.d.ts +3 -0
  20. package/dist/components/app-shell/types.d.ts.map +1 -1
  21. package/dist/components/charts/AreaChart.d.ts +4 -0
  22. package/dist/components/charts/AreaChart.d.ts.map +1 -1
  23. package/dist/components/charts/BarChart.d.ts +4 -0
  24. package/dist/components/charts/BarChart.d.ts.map +1 -1
  25. package/dist/components/charts/DonutChart.d.ts +8 -0
  26. package/dist/components/charts/DonutChart.d.ts.map +1 -1
  27. package/dist/components/charts/RadarChart.d.ts +9 -0
  28. package/dist/components/charts/RadarChart.d.ts.map +1 -1
  29. package/dist/components/charts/RadialBarChart.d.ts +9 -0
  30. package/dist/components/charts/RadialBarChart.d.ts.map +1 -1
  31. package/dist/components/charts/SparkLine.d.ts +10 -0
  32. package/dist/components/charts/SparkLine.d.ts.map +1 -1
  33. package/dist/components/charts/StackedBarChart.d.ts +6 -0
  34. package/dist/components/charts/StackedBarChart.d.ts.map +1 -1
  35. package/dist/components/charts/VerticalBarChart.d.ts +4 -0
  36. package/dist/components/charts/VerticalBarChart.d.ts.map +1 -1
  37. package/dist/components/charts/chartUtils.d.ts +0 -1
  38. package/dist/components/charts/chartUtils.d.ts.map +1 -1
  39. package/dist/components/tables/Pagination.d.ts +3 -0
  40. package/dist/components/tables/Pagination.d.ts.map +1 -1
  41. package/dist/components/tables/ResourceTable.d.ts +53 -0
  42. package/dist/components/tables/ResourceTable.d.ts.map +1 -1
  43. package/dist/components/tables/Table.d.ts +22 -2
  44. package/dist/components/tables/Table.d.ts.map +1 -1
  45. package/dist/components/ui/Alert.d.ts +4 -0
  46. package/dist/components/ui/Alert.d.ts.map +1 -1
  47. package/dist/components/ui/AttachmentList.d.ts +8 -0
  48. package/dist/components/ui/AttachmentList.d.ts.map +1 -1
  49. package/dist/components/ui/AuthCard.d.ts +6 -0
  50. package/dist/components/ui/AuthCard.d.ts.map +1 -1
  51. package/dist/components/ui/Avatar.d.ts +4 -0
  52. package/dist/components/ui/Avatar.d.ts.map +1 -1
  53. package/dist/components/ui/Badge.d.ts +57 -6
  54. package/dist/components/ui/Badge.d.ts.map +1 -1
  55. package/dist/components/ui/Button.d.ts.map +1 -1
  56. package/dist/components/ui/Calendar.d.ts +5 -0
  57. package/dist/components/ui/Calendar.d.ts.map +1 -1
  58. package/dist/components/ui/CalendarGrid.d.ts +4 -0
  59. package/dist/components/ui/CalendarGrid.d.ts.map +1 -1
  60. package/dist/components/ui/Card.d.ts +4 -0
  61. package/dist/components/ui/Card.d.ts.map +1 -1
  62. package/dist/components/ui/CharacterCount.d.ts +2 -0
  63. package/dist/components/ui/CharacterCount.d.ts.map +1 -1
  64. package/dist/components/ui/Checkbox.d.ts +5 -0
  65. package/dist/components/ui/Checkbox.d.ts.map +1 -1
  66. package/dist/components/ui/CodeInput.d.ts +4 -0
  67. package/dist/components/ui/CodeInput.d.ts.map +1 -1
  68. package/dist/components/ui/Combobox.d.ts +22 -0
  69. package/dist/components/ui/Combobox.d.ts.map +1 -1
  70. package/dist/components/ui/DatePartsInput.d.ts +11 -0
  71. package/dist/components/ui/DatePartsInput.d.ts.map +1 -1
  72. package/dist/components/ui/DatePicker.d.ts.map +1 -1
  73. package/dist/components/ui/DateRangePicker.d.ts +4 -0
  74. package/dist/components/ui/DateRangePicker.d.ts.map +1 -1
  75. package/dist/components/ui/DateTimePicker.d.ts +4 -0
  76. package/dist/components/ui/DateTimePicker.d.ts.map +1 -1
  77. package/dist/components/ui/DetailPanel.d.ts +12 -0
  78. package/dist/components/ui/DetailPanel.d.ts.map +1 -1
  79. package/dist/components/ui/Dialog.d.ts +51 -2
  80. package/dist/components/ui/Dialog.d.ts.map +1 -1
  81. package/dist/components/ui/DialogActions.d.ts +5 -0
  82. package/dist/components/ui/DialogActions.d.ts.map +1 -1
  83. package/dist/components/ui/DividerLabel.d.ts +2 -0
  84. package/dist/components/ui/DividerLabel.d.ts.map +1 -1
  85. package/dist/components/ui/DropdownMenu.d.ts +37 -3
  86. package/dist/components/ui/DropdownMenu.d.ts.map +1 -1
  87. package/dist/components/ui/EmptyState.d.ts +5 -0
  88. package/dist/components/ui/EmptyState.d.ts.map +1 -1
  89. package/dist/components/ui/Fieldset.d.ts +3 -0
  90. package/dist/components/ui/Fieldset.d.ts.map +1 -1
  91. package/dist/components/ui/FilterButton.d.ts.map +1 -1
  92. package/dist/components/ui/FormField.d.ts +5 -0
  93. package/dist/components/ui/FormField.d.ts.map +1 -1
  94. package/dist/components/ui/Grid.d.ts +5 -1
  95. package/dist/components/ui/Grid.d.ts.map +1 -1
  96. package/dist/components/ui/Inline.d.ts +6 -1
  97. package/dist/components/ui/Inline.d.ts.map +1 -1
  98. package/dist/components/ui/Kbd.d.ts +2 -0
  99. package/dist/components/ui/Kbd.d.ts.map +1 -1
  100. package/dist/components/ui/LoadingSpinner.d.ts +2 -0
  101. package/dist/components/ui/LoadingSpinner.d.ts.map +1 -1
  102. package/dist/components/ui/MetricCard.d.ts +7 -0
  103. package/dist/components/ui/MetricCard.d.ts.map +1 -1
  104. package/dist/components/ui/NavTabs.d.ts +6 -0
  105. package/dist/components/ui/NavTabs.d.ts.map +1 -1
  106. package/dist/components/ui/OAuthButton.d.ts +1 -0
  107. package/dist/components/ui/OAuthButton.d.ts.map +1 -1
  108. package/dist/components/ui/PageHeader.d.ts +3 -1
  109. package/dist/components/ui/PageHeader.d.ts.map +1 -1
  110. package/dist/components/ui/PageSection.d.ts +8 -0
  111. package/dist/components/ui/PageSection.d.ts.map +1 -1
  112. package/dist/components/ui/PasswordInput.d.ts +3 -0
  113. package/dist/components/ui/PasswordInput.d.ts.map +1 -1
  114. package/dist/components/ui/PasswordRequirements.d.ts +1 -0
  115. package/dist/components/ui/PasswordRequirements.d.ts.map +1 -1
  116. package/dist/components/ui/ProgressBar.d.ts +5 -2
  117. package/dist/components/ui/ProgressBar.d.ts.map +1 -1
  118. package/dist/components/ui/ProseContent.d.ts +2 -0
  119. package/dist/components/ui/ProseContent.d.ts.map +1 -1
  120. package/dist/components/ui/QrCode.d.ts +1 -0
  121. package/dist/components/ui/QrCode.d.ts.map +1 -1
  122. package/dist/components/ui/Radio.d.ts +13 -0
  123. package/dist/components/ui/Radio.d.ts.map +1 -1
  124. package/dist/components/ui/RadioPill.d.ts +6 -0
  125. package/dist/components/ui/RadioPill.d.ts.map +1 -1
  126. package/dist/components/ui/SearchInput.d.ts +4 -0
  127. package/dist/components/ui/SearchInput.d.ts.map +1 -1
  128. package/dist/components/ui/Select.d.ts +4 -0
  129. package/dist/components/ui/Select.d.ts.map +1 -1
  130. package/dist/components/ui/SelectDropdown.d.ts +5 -0
  131. package/dist/components/ui/SelectDropdown.d.ts.map +1 -1
  132. package/dist/components/ui/SideSheet.d.ts +19 -0
  133. package/dist/components/ui/SideSheet.d.ts.map +1 -1
  134. package/dist/components/ui/Skeleton.d.ts +2 -0
  135. package/dist/components/ui/Skeleton.d.ts.map +1 -1
  136. package/dist/components/ui/Slider.d.ts +19 -2
  137. package/dist/components/ui/Slider.d.ts.map +1 -1
  138. package/dist/components/ui/Stack.d.ts +3 -1
  139. package/dist/components/ui/Stack.d.ts.map +1 -1
  140. package/dist/components/ui/StatusDot.d.ts +7 -0
  141. package/dist/components/ui/StatusDot.d.ts.map +1 -1
  142. package/dist/components/ui/StepProgress.d.ts +2 -0
  143. package/dist/components/ui/StepProgress.d.ts.map +1 -1
  144. package/dist/components/ui/Tabs.d.ts +3 -0
  145. package/dist/components/ui/Tabs.d.ts.map +1 -1
  146. package/dist/components/ui/TextInput.d.ts +3 -0
  147. package/dist/components/ui/TextInput.d.ts.map +1 -1
  148. package/dist/components/ui/Textarea.d.ts +4 -0
  149. package/dist/components/ui/Textarea.d.ts.map +1 -1
  150. package/dist/components/ui/ThemePreview.d.ts +6 -0
  151. package/dist/components/ui/ThemePreview.d.ts.map +1 -1
  152. package/dist/components/ui/Timeline.d.ts +4 -3
  153. package/dist/components/ui/Timeline.d.ts.map +1 -1
  154. package/dist/components/ui/Toast.d.ts.map +1 -1
  155. package/dist/components/ui/Toggle.d.ts +5 -0
  156. package/dist/components/ui/Toggle.d.ts.map +1 -1
  157. package/dist/components/ui/Toolbar.d.ts +6 -0
  158. package/dist/components/ui/Toolbar.d.ts.map +1 -1
  159. package/dist/components/ui/Tooltip.d.ts +10 -0
  160. package/dist/components/ui/Tooltip.d.ts.map +1 -1
  161. package/dist/components/ui/UploadDropzone.d.ts +3 -0
  162. package/dist/components/ui/UploadDropzone.d.ts.map +1 -1
  163. package/dist/components/ui/badgeColors.d.ts +8 -0
  164. package/dist/components/ui/badgeColors.d.ts.map +1 -0
  165. package/dist/components/ui/calendar/useGridInteraction.d.ts.map +1 -1
  166. package/dist/hooks/useAnchoredPopup.d.ts +46 -0
  167. package/dist/hooks/useAnchoredPopup.d.ts.map +1 -0
  168. package/dist/hooks/useDismiss.d.ts +9 -2
  169. package/dist/hooks/useDismiss.d.ts.map +1 -1
  170. package/dist/hooks/useOverlayStack.d.ts +29 -0
  171. package/dist/hooks/useOverlayStack.d.ts.map +1 -0
  172. package/dist/hooks/usePopover.d.ts +71 -0
  173. package/dist/hooks/usePopover.d.ts.map +1 -0
  174. package/dist/index.d.ts +2 -0
  175. package/dist/index.d.ts.map +1 -1
  176. package/dist/index.js +2921 -2498
  177. package/dist/lib/anchorPlacement.d.ts +21 -3
  178. package/dist/lib/anchorPlacement.d.ts.map +1 -1
  179. package/dist/lib/calendar.d.ts +3 -8
  180. package/dist/lib/calendar.d.ts.map +1 -1
  181. package/dist/lib/dialogDrag.d.ts.map +1 -1
  182. package/dist/lib/dialogResize.d.ts.map +1 -1
  183. package/dist/lib/formatDate.d.ts.map +1 -1
  184. package/dist/lib/keyboardStep.d.ts +5 -0
  185. package/dist/lib/keyboardStep.d.ts.map +1 -0
  186. package/dist/lib/layout.d.ts +1 -0
  187. package/dist/lib/layout.d.ts.map +1 -1
  188. package/dist/lib/math.d.ts +3 -0
  189. package/dist/lib/math.d.ts.map +1 -0
  190. package/dist/lib/months.d.ts +4 -0
  191. package/dist/lib/months.d.ts.map +1 -0
  192. package/dist/lib/overlayStack.d.ts +26 -0
  193. package/dist/lib/overlayStack.d.ts.map +1 -0
  194. package/dist/lib/tones.d.ts +32 -0
  195. package/dist/lib/tones.d.ts.map +1 -0
  196. package/dist/providers/SettingsProvider.d.ts +1 -0
  197. package/dist/providers/SettingsProvider.d.ts.map +1 -1
  198. package/dist/styles.css +78 -8
  199. package/package.json +2 -2
  200. package/dist/hooks/useDropUp.d.ts +0 -7
  201. package/dist/hooks/useDropUp.d.ts.map +0 -1
@@ -1,39 +1,61 @@
1
1
  import { type ReactNode } from "react";
2
2
  import { type ControlSize } from "../../providers/ControlSizeContext";
3
3
  export interface ComboboxOption {
4
+ /** Unique value returned to onChange when the option is chosen. */
4
5
  value: string;
6
+ /** Text shown in the list and, once selected, on the trigger. */
5
7
  label: string;
8
+ /** Show the option but prevent it from being chosen. */
6
9
  disabled?: boolean;
7
10
  }
8
11
  export interface ComboboxProps<T extends ComboboxOption = ComboboxOption> {
12
+ /** Options to choose from. Filtered by label against the search text unless filterOptions is false. */
9
13
  options: T[];
14
+ /** Value of the selected option (controlled). */
10
15
  value: string;
16
+ /** Called with the value of the chosen option. */
11
17
  onChange: (value: string) => void;
12
18
  /** Receives the complete result, including caller-owned metadata. */
13
19
  onOptionChange?: (option: T) => void;
20
+ /** Text shown on the trigger when nothing is selected. Defaults to "Select...". */
14
21
  placeholder?: string;
22
+ /** Visible label above the trigger; also names the listbox. */
15
23
  label?: string;
24
+ /** Additional utility classes for the root element. */
16
25
  className?: string;
17
26
  /** Opt-in larger controls, or inherit ControlSizeProvider. */
18
27
  controlSize?: ControlSize;
28
+ /** ID for the search input inside the dropdown; generated when omitted. */
19
29
  id?: string;
30
+ /** Submits the selected value under this name in a native form post. */
20
31
  name?: string;
32
+ /** Disable the combobox. */
21
33
  disabled?: boolean;
34
+ /** Accessible name for the trigger and search input; takes precedence over `label` for them. The listbox is named by `label` when set, otherwise by this. */
22
35
  "aria-label"?: string;
36
+ /** ID(s) of elements describing the combobox, e.g. a hint or error. */
23
37
  "aria-describedby"?: string;
38
+ /** Marks the trigger and search input as invalid. */
24
39
  "aria-invalid"?: boolean | "true" | "false";
25
40
  /** Controlled query. The application owns fetching, cancellation and paging. */
26
41
  query?: string;
42
+ /** Called with the search text as it changes; use it to fetch server-side results. */
27
43
  onQueryChange?: (query: string) => void;
28
44
  /** Set false for server-filtered/paginated results. */
29
45
  filterOptions?: boolean;
30
46
  /** Retain an existing selection even when it is absent from this result page. */
31
47
  selectedOption?: T;
48
+ /** Custom renderer for the content of each option row. */
32
49
  renderOption?: (option: T) => ReactNode;
50
+ /** Show the loading message and mark the listbox busy. */
33
51
  loading?: boolean;
52
+ /** Content shown while loading. Defaults to "Loading results…". */
34
53
  loadingMessage?: ReactNode;
54
+ /** Error content shown above the list, e.g. when a fetch fails. */
35
55
  error?: ReactNode;
56
+ /** Called when the Retry button shown beside the error is clicked; the button renders only when provided. */
36
57
  onRetry?: () => void;
58
+ /** Content shown when no options match. Defaults to "No results". */
37
59
  emptyMessage?: ReactNode;
38
60
  /** Pagination/load-more controls, outside the listbox so they remain operable. */
39
61
  footer?: ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Combobox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAM7E,OAAO,EAEL,KAAK,WAAW,EACjB,MAAM,oCAAoC,CAAC;AAE5C,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc;IACtE,OAAO,EAAE,CAAC,EAAE,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,qEAAqE;IACrE,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,CAAC;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;I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AC,CAAC;IACnB,0DAA0D;IAC1D,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,SAAS,CAAC;IACxC,0DAA0D;IAC1D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,mEAAmE;IACnE,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,mEAAmE;IACnE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,6GAA6G;IAC7G,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,qEAAqE;IACrE,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,kFAAkF;IAClF,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAED,wBAAgB,QAAQ,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc,EAAE,EAClE,OAAO,EACP,KAAK,EACL,QAAQ,EACR,cAAc,EACd,WAAyB,EACzB,KAAK,EACL,SAAS,EACT,WAAW,EACX,EAAE,EACF,IAAI,EACJ,QAAQ,EACR,YAAY,EAAE,SAAS,EACvB,kBAAkB,EAAE,WAAW,EAC/B,cAAc,EAAE,OAAO,EACvB,KAAK,EACL,aAAa,EACb,aAAoB,EACpB,cAAc,EACd,YAAY,EACZ,OAAe,EACf,cAAmC,EACnC,KAAK,EACL,OAAO,EACP,YAA2B,EAC3B,MAAM,GACP,EAAE,aAAa,CAAC,CAAC,CAAC,2CAgRlB"}
@@ -5,18 +5,29 @@ export interface DateParts {
5
5
  year: string;
6
6
  }
7
7
  export interface DatePartsInputProps {
8
+ /** Raw day, month and year strings (controlled); may be partial or invalid. */
8
9
  value: DateParts;
10
+ /** Called with the updated day, month and year strings on every edit. */
9
11
  onChange: (value: DateParts) => void;
12
+ /** Group legend describing the date, e.g. "Date of birth". */
10
13
  label: ReactNode;
14
+ /** Helper text shown below the legend. */
11
15
  hint?: ReactNode;
16
+ /** Error message; overrides the built-in validation message. */
12
17
  error?: ReactNode;
18
+ /** Base ID for the fieldset; part inputs use it as a prefix. Generated when omitted. */
13
19
  id?: string;
20
+ /** Base name for the inputs, submitted as name.day, name.month and name.year. */
14
21
  name?: string;
22
+ /** Disable all three inputs. */
15
23
  disabled?: boolean;
24
+ /** Mark the date as required and fail validation while empty. */
16
25
  required?: boolean;
26
+ /** Additional utility classes for the root fieldset. */
17
27
  className?: string;
18
28
  /** Inclusive year bounds for validation and the year selector. */
19
29
  minYear?: number;
30
+ /** Inclusive upper year bound. Defaults to 2100. */
20
31
  maxYear?: number;
21
32
  /** Native attributes for each text input, including refs, autocomplete and blur handlers. */
22
33
  inputProps?: Partial<Record<keyof DateParts, ComponentPropsWithRef<"input">>>;
@@ -1 +1 @@
1
- {"version":3,"file":"DatePartsInput.d.ts","sourceRoot":"","sources":["../../../src/components/ui/DatePartsInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,qBAAqB,EAC1B,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAQf,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AACD,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IACrC,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kEAAkE;IAClE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6FAA6F;IAC7F,UAAU,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,SAAS,EAAE,qBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;CAC/E;AACD,0IAA0I;AAC1I,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,KAAK,EACL,EAAE,EACF,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,UAAU,EACV,OAAc,EACd,OAAc,GACf,EAAE,mBAAmB,2CA4IrB"}
1
+ {"version":3,"file":"DatePartsInput.d.ts","sourceRoot":"","sources":["../../../src/components/ui/DatePartsInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,qBAAqB,EAC1B,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAQf,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AACD,MAAM,WAAW,mBAAmB;IAClC,+EAA+E;IAC/E,KAAK,EAAE,SAAS,CAAC;IACjB,yEAAyE;IACzE,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IACrC,8DAA8D;IAC9D,KAAK,EAAE,SAAS,CAAC;IACjB,0CAA0C;IAC1C,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,gEAAgE;IAChE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,wFAAwF;IACxF,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,iFAAiF;IACjF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iEAAiE;IACjE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kEAAkE;IAClE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oDAAoD;IACpD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6FAA6F;IAC7F,UAAU,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,SAAS,EAAE,qBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;CAC/E;AACD,0IAA0I;AAC1I,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,KAAK,EACL,EAAE,EACF,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,UAAU,EACV,OAAc,EACd,OAAc,GACf,EAAE,mBAAmB,2CA4IrB"}
@@ -1 +1 @@
1
- {"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../src/components/ui/DatePicker.tsx"],"names":[],"mappings":"AAQA,OAAO,EAEL,KAAK,WAAW,EACjB,MAAM,oCAAoC,CAAC;AAG5C,MAAM,WAAW,eAAe;IAC9B,iGAAiG;IACjG,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qEAAqE;IACrE,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8DAA8D;IAC9D,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;CACjC;AAoBD,wBAAgB,UAAU,CAAC,EACzB,WAAW,EACX,KAAK,EACL,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,WAA8B,EAC9B,MAAM,GACP,EAAE,eAAe,2CA4FjB"}
1
+ {"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../src/components/ui/DatePicker.tsx"],"names":[],"mappings":"AAQA,OAAO,EAEL,KAAK,WAAW,EACjB,MAAM,oCAAoC,CAAC;AAG5C,MAAM,WAAW,eAAe;IAC9B,iGAAiG;IACjG,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qEAAqE;IACrE,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8DAA8D;IAC9D,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;CACjC;AAOD,wBAAgB,UAAU,CAAC,EACzB,WAAW,EACX,KAAK,EACL,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,WAA8B,EAC9B,MAAM,GACP,EAAE,eAAe,2CA8FjB"}
@@ -6,9 +6,13 @@ export interface DateRange {
6
6
  interface DateRangePickerProps {
7
7
  /** Inherit ControlSizeProvider or override this trigger’s sizing. */
8
8
  controlSize?: ControlSize;
9
+ /** Visible label above the trigger. */
9
10
  label?: string;
11
+ /** Selected range (controlled); start and end are null while unset. */
10
12
  value: DateRange;
13
+ /** Called with the new range once both ends are chosen. */
11
14
  onChange: (range: DateRange) => void;
15
+ /** Text shown when no range is selected. Defaults to "Select date range...". */
12
16
  placeholder?: string;
13
17
  }
14
18
  export declare function DateRangePicker({ controlSize, label, value, onChange, placeholder, }: DateRangePickerProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"DateRangePicker.d.ts","sourceRoot":"","sources":["../../../src/components/ui/DateRangePicker.tsx"],"names":[],"mappings":"AAOA,OAAO,EAEL,KAAK,WAAW,EACjB,MAAM,oCAAoC,CAAC;AAG5C,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,GAAG,EAAE,IAAI,GAAG,IAAI,CAAC;CAClB;AAED,UAAU,oBAAoB;IAC5B,qEAAqE;IACrE,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AA6BD,wBAAgB,eAAe,CAAC,EAC9B,WAAW,EACX,KAAK,EACL,KAAK,EACL,QAAQ,EACR,WAAoC,GACrC,EAAE,oBAAoB,2CAuLtB"}
1
+ {"version":3,"file":"DateRangePicker.d.ts","sourceRoot":"","sources":["../../../src/components/ui/DateRangePicker.tsx"],"names":[],"mappings":"AAOA,OAAO,EAEL,KAAK,WAAW,EACjB,MAAM,oCAAoC,CAAC;AAG5C,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,GAAG,EAAE,IAAI,GAAG,IAAI,CAAC;CAClB;AAED,UAAU,oBAAoB;IAC5B,qEAAqE;IACrE,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uEAAuE;IACvE,KAAK,EAAE,SAAS,CAAC;IACjB,2DAA2D;IAC3D,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IACrC,gFAAgF;IAChF,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAcD,wBAAgB,eAAe,CAAC,EAC9B,WAAW,EACX,KAAK,EACL,KAAK,EACL,QAAQ,EACR,WAAoC,GACrC,EAAE,oBAAoB,2CA8LtB"}
@@ -4,9 +4,13 @@ export interface DateTimePickerProps {
4
4
  timeZone?: string;
5
5
  /** Inherit ControlSizeProvider or override this trigger’s sizing. */
6
6
  controlSize?: ControlSize;
7
+ /** Visible label above the trigger. */
7
8
  label?: string;
9
+ /** Selected date and time (controlled), or null. */
8
10
  value: Date | null;
11
+ /** Called with the chosen instant. */
9
12
  onChange: (date: Date | null) => void;
13
+ /** Text shown when no value is selected. Defaults to "Select date & time...". */
10
14
  placeholder?: string;
11
15
  }
12
16
  export declare function DateTimePicker(props: DateTimePickerProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"DateTimePicker.d.ts","sourceRoot":"","sources":["../../../src/components/ui/DateTimePicker.tsx"],"names":[],"mappings":"AAQA,OAAO,EAEL,KAAK,WAAW,EACjB,MAAM,oCAAoC,CAAC;AAG5C,MAAM,WAAW,mBAAmB;IAClC,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qEAAqE;IACrE,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAyDD,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,2CAIxD"}
1
+ {"version":3,"file":"DateTimePicker.d.ts","sourceRoot":"","sources":["../../../src/components/ui/DateTimePicker.tsx"],"names":[],"mappings":"AASA,OAAO,EAEL,KAAK,WAAW,EACjB,MAAM,oCAAoC,CAAC;AAG5C,MAAM,WAAW,mBAAmB;IAClC,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qEAAqE;IACrE,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oDAAoD;IACpD,KAAK,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,sCAAsC;IACtC,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IACtC,iFAAiF;IACjF,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AA0CD,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,2CAIxD"}
@@ -1,9 +1,21 @@
1
1
  import { type ReactNode } from "react";
2
2
  interface DetailPanelProps {
3
+ /**
4
+ * Whether the panel is open. It stays mounted, and its width animates
5
+ * between 0 and the current width; its content renders only while open.
6
+ */
3
7
  open: boolean;
8
+ /**
9
+ * Called when the user asks to close: the close button, or Escape when this
10
+ * is the top-most overlay. The panel doesn't close itself; set `open` to
11
+ * `false` here.
12
+ */
4
13
  onClose: () => void;
14
+ /** Heading shown in the header bar. */
5
15
  title: string;
16
+ /** The panel body, which scrolls when taller than the panel. */
6
17
  children: ReactNode;
18
+ /** Additional utility classes for the panel root, for example to set its height. */
7
19
  className?: string;
8
20
  /** Allow horizontal resize via drag handle. Default true. */
9
21
  resizable?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"DetailPanel.d.ts","sourceRoot":"","sources":["../../../src/components/ui/DetailPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAMf,UAAU,gBAAgB;IACxB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gDAAgD;IAChD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAMD,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,OAAO,EACP,KAAK,EACL,QAAQ,EACR,SAAS,EACT,SAAgB,EAChB,YAA4B,EAC5B,QAAoB,EACpB,QAAoB,GACrB,EAAE,gBAAgB,2CAqFlB"}
1
+ {"version":3,"file":"DetailPanel.d.ts","sourceRoot":"","sources":["../../../src/components/ui/DetailPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAOtE,UAAU,gBAAgB;IACxB;;;OAGG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;;;OAIG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,QAAQ,EAAE,SAAS,CAAC;IACpB,oFAAoF;IACpF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gDAAgD;IAChD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAMD,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,OAAO,EACP,KAAK,EACL,QAAQ,EACR,SAAS,EACT,SAAgB,EAChB,YAA4B,EAC5B,QAAoB,EACpB,QAAoB,GACrB,EAAE,gBAAgB,2CAsGlB"}
@@ -4,11 +4,24 @@ import { type AnchorPlacement } from "../../lib/anchorPlacement";
4
4
  export type DialogPlacement = "center" | AnchorPlacement;
5
5
  export type DialogSize = "sm" | "md" | "lg" | "xl";
6
6
  export interface DialogProps {
7
- /** Maximum width: sm 400px, md 576px, lg 768px, xl 1024px. */
7
+ /** Maximum width: sm 400px, md 576px, lg 768px, xl 1024px. Defaults to `sm`. */
8
8
  size?: DialogSize;
9
+ /** Whether the dialog is shown. It renders nothing when `false`. */
9
10
  open: boolean;
11
+ /**
12
+ * Called when the user asks to close: Escape (unless `closeOnEscape` is
13
+ * `false`), a click on the backdrop (unless `closeOnOverlayClick` is
14
+ * `false`) or the close button. None of these fire while `busy`. The
15
+ * dialog doesn't close itself; set `open` to `false` here.
16
+ */
10
17
  onClose: () => void;
18
+ /**
19
+ * Heading shown in the title bar, which also names the dialog
20
+ * (`aria-labelledby`). Without it, the dialog is named by `aria-label`, or
21
+ * "Dialog" when that is unset too.
22
+ */
11
23
  title?: string;
24
+ /** The dialog body. */
12
25
  children: ReactNode;
13
26
  /**
14
27
  * Optional footer rendered below the children.
@@ -28,6 +41,7 @@ export interface DialogProps {
28
41
  * ```
29
42
  */
30
43
  footer?: ReactNode;
44
+ /** Additional utility classes for the dialog panel. */
31
45
  className?: string;
32
46
  /**
33
47
  * Let the user move the dialog by dragging its title bar or the grip
@@ -81,16 +95,51 @@ export interface DialogProps {
81
95
  * `anchorRef` for reliable placement.
82
96
  */
83
97
  anchorRef?: RefObject<HTMLElement | null>;
98
+ /**
99
+ * ARIA role. Use `alertdialog` for an urgent message that needs a response,
100
+ * such as a destructive confirmation. Defaults to `dialog`.
101
+ */
84
102
  role?: "dialog" | "alertdialog";
103
+ /**
104
+ * Explanatory text shown at the top of the body, above `children`, and
105
+ * linked to the dialog with `aria-describedby`.
106
+ */
85
107
  description?: ReactNode;
108
+ /** Accessible name for a dialog without a `title`. Ignored when `title` is set. */
86
109
  "aria-label"?: string;
110
+ /**
111
+ * Id of another element that describes the dialog. It is added to the
112
+ * `description` id when both are given.
113
+ */
87
114
  "aria-describedby"?: string;
115
+ /**
116
+ * The element to focus when the dialog opens. Defaults to the first
117
+ * focusable element inside it. Ignored if it isn't inside the dialog.
118
+ */
88
119
  initialFocusRef?: RefObject<HTMLElement | null>;
120
+ /**
121
+ * The element to return focus to when the dialog closes. Defaults to the
122
+ * element that had focus when it opened.
123
+ */
89
124
  returnFocusRef?: RefObject<HTMLElement | null>;
90
- /** Busy dialogs suppress every dismissal path without removing focus. */
125
+ /**
126
+ * Busy dialogs suppress every dismissal path without removing focus:
127
+ * Escape, backdrop click and the close button do nothing, and the close
128
+ * button is marked `aria-disabled`. Use it while an action is in flight.
129
+ */
91
130
  busy?: boolean;
131
+ /**
132
+ * Whether Escape calls `onClose`. Defaults to `true`. When `false`, Escape
133
+ * does nothing and, while this dialog is on top, doesn't reach a dialog or
134
+ * menu beneath it.
135
+ */
92
136
  closeOnEscape?: boolean;
137
+ /** Whether a click on the backdrop calls `onClose`. Defaults to `true`. */
93
138
  closeOnOverlayClick?: boolean;
139
+ /**
140
+ * Hide the close button in the title bar. Defaults to `false`. Leave the
141
+ * user another way to close the dialog, such as `footer` actions.
142
+ */
94
143
  hideCloseButton?: boolean;
95
144
  }
96
145
  export declare function Dialog({ open, onClose, title, children, footer, className, size, draggable, resizable, rememberPosition, placement, anchorRef, role, description, "aria-label": ariaLabel, "aria-describedby": describedBy, initialFocusRef, returnFocusRef, busy, closeOnEscape, closeOnOverlayClick, hideCloseButton, }: DialogProps): import("react").ReactPortal | null;
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,SAAS,EAEd,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAMf,OAAO,EAEL,KAAK,eAAe,EAErB,MAAM,2BAA2B,CAAC;AAsBnC,sEAAsE;AACtE,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,eAAe,CAAC;AAEzD,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AASnD,MAAM,WAAW,WAAW;IAC1B,8DAA8D;IAC9D,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,SAAS,CAAC;IACpB;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;;;;O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AAE,OAAO,CAAC;IACf;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,2EAA2E;IAC3E,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AA6oBD,wBAAgB,MAAM,CAAC,EACrB,IAAI,EACJ,OAAO,EACP,KAAK,EACL,QAAQ,EACR,MAAM,EACN,SAAS,EACT,IAAW,EACX,SAAiB,EACjB,SAAiB,EACjB,gBAAwB,EACxB,SAAoB,EACpB,SAAS,EACT,IAAe,EACf,WAAW,EACX,YAAY,EAAE,SAAS,EACvB,kBAAkB,EAAE,WAAW,EAC/B,eAAe,EACf,cAAc,EACd,IAAY,EACZ,aAAoB,EACpB,mBAA0B,EAC1B,eAAuB,GACxB,EAAE,WAAW,sCAwLb"}
@@ -53,10 +53,15 @@ export interface DialogActionsProps {
53
53
  confirmVariant?: ButtonProps["variant"];
54
54
  /** Additional utility classes for the root container. */
55
55
  className?: string;
56
+ /** Disable both buttons and show busyLabel on the confirm button while an action runs. */
56
57
  busy?: boolean;
58
+ /** Confirm button text while busy. Defaults to "Working…". */
57
59
  busyLabel?: string;
60
+ /** Ref to the cancel button, e.g. for initial focus. */
58
61
  cancelRef?: Ref<HTMLButtonElement>;
62
+ /** Ref to the confirm button, e.g. for initial focus. */
59
63
  confirmRef?: Ref<HTMLButtonElement>;
64
+ /** Disable the confirm button without showing the busy state. */
60
65
  confirmDisabled?: boolean;
61
66
  }
62
67
  export declare function DialogActions({ onCancel, onConfirm, cancelLabel, confirmLabel, confirmVariant, className, busy, busyLabel, cancelRef, confirmRef, confirmDisabled, }: DialogActionsProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"DialogActions.d.ts","sourceRoot":"","sources":["../../../src/components/ui/DialogActions.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,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AM,IAAI,CAAC;IACtB,yDAAyD;IACzD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,cAAc,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IACxC,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0FAA0F;IAC1F,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,SAAS,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACnC,yDAAyD;IACzD,UAAU,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACpC,iEAAiE;IACjE,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,SAAS,EACT,WAAsB,EACtB,YAAwB,EACxB,cAA0B,EAC1B,SAAS,EACT,IAAY,EACZ,SAAsB,EACtB,SAAS,EACT,UAAU,EACV,eAAuB,GACxB,EAAE,kBAAkB,2CAgCpB"}
@@ -1,6 +1,8 @@
1
1
  import type { ReactNode } from "react";
2
2
  export interface DividerLabelProps {
3
+ /** Label shown centred between the two rules. */
3
4
  children: ReactNode;
5
+ /** Additional utility classes for the root element. */
4
6
  className?: string;
5
7
  }
6
8
  export declare function DividerLabel({ children, className }: DividerLabelProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"DividerLabel.d.ts","sourceRoot":"","sources":["../../../src/components/ui/DividerLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,iBAAiB,2CAQtE"}
1
+ {"version":3,"file":"DividerLabel.d.ts","sourceRoot":"","sources":["../../../src/components/ui/DividerLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,MAAM,WAAW,iBAAiB;IAChC,iDAAiD;IACjD,QAAQ,EAAE,SAAS,CAAC;IACpB,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,iBAAiB,2CAQtE"}
@@ -3,7 +3,22 @@ interface DropdownContentItem {
3
3
  label: string;
4
4
  icon?: ReactNode;
5
5
  shortcut?: string;
6
+ /**
7
+ * Shows a check mark. Setting it (true or false) makes the item a
8
+ * `menuitemcheckbox` (or `menuitemradio`, see `type`) with `aria-checked`.
9
+ */
6
10
  checked?: boolean;
11
+ /**
12
+ * How a checkable item is announced: `checkbox` (an independent toggle,
13
+ * the default) or `radio` (one choice of several). Only used with
14
+ * `checked`.
15
+ */
16
+ type?: "checkbox" | "radio";
17
+ /**
18
+ * Shown dimmed with `aria-disabled`; skipped by the arrow keys and
19
+ * typeahead, and does nothing when clicked.
20
+ */
21
+ disabled?: boolean;
7
22
  onClick: () => void;
8
23
  danger?: boolean;
9
24
  divider?: false;
@@ -13,14 +28,33 @@ interface DropdownDivider {
13
28
  }
14
29
  export type DropdownItem = DropdownContentItem | DropdownDivider;
15
30
  interface DropdownMenuProps {
31
+ /**
32
+ * The element that toggles the menu, usually a `Button`. It receives
33
+ * `aria-haspopup`, `aria-expanded`, `aria-controls` and (unless it has one)
34
+ * an `id` that labels the menu. Plain text is wrapped in a focusable
35
+ * `role="button"`.
36
+ */
16
37
  trigger: ReactNode;
38
+ /** Menu entries: actions (`label` + `onClick`) and `{ divider: true }`. */
17
39
  items: DropdownItem[];
40
+ /**
41
+ * Which trigger edge the menu lines up with: `right` (the default) keeps
42
+ * right edges together, `left` keeps left edges together. Near a viewport
43
+ * edge the menu shifts to stay on screen, and opens above the trigger when
44
+ * there is no room below.
45
+ */
18
46
  align?: "left" | "right";
19
47
  }
20
48
  /**
21
- * Menu whose panel portals to document.body. Position is captured from the
22
- * trigger rect at open time and not recomputed, so it does not reposition on
23
- * scroll/resize while open.
49
+ * A menu button: the trigger opens a menu of actions portalled to
50
+ * document.body and kept against the trigger (flipping above it near the
51
+ * bottom of the viewport, following it on scroll and resize).
52
+ *
53
+ * Keyboard: Enter, Space or ArrowDown on the trigger opens on the first item,
54
+ * ArrowUp on the last. In the menu, ArrowUp/ArrowDown move and wrap,
55
+ * Home/End jump, a letter jumps to the next item starting with it, Enter or
56
+ * Space activates. Escape closes and returns focus to the trigger, as does
57
+ * choosing an item; Tab closes and moves on. Disabled items are skipped.
24
58
  */
25
59
  export declare function DropdownMenu({ trigger, items, align, }: DropdownMenuProps): import("react/jsx-runtime").JSX.Element;
26
60
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownMenu.d.ts","sourceRoot":"","sources":["../../../src/components/ui/DropdownMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAQf,UAAU,mBAAmB;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,KAAK,CAAC;CACjB;AAED,UAAU,eAAe;IACvB,OAAO,EAAE,IAAI,CAAC;CACf;AAED,MAAM,MAAM,YAAY,GAAG,mBAAmB,GAAG,eAAe,CAAC;AAEjE,UAAU,iBAAiB;IACzB,OAAO,EAAE,SAAS,CAAC;IACnB,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,KAAK,EACL,KAAe,GAChB,EAAE,iBAAiB,2CAsInB"}
1
+ {"version":3,"file":"DropdownMenu.d.ts","sourceRoot":"","sources":["../../../src/components/ui/DropdownMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAYL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AASf,UAAU,mBAAmB;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,IAAI,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;IAC5B;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,KAAK,CAAC;CACjB;AAED,UAAU,eAAe;IACvB,OAAO,EAAE,IAAI,CAAC;CACf;AAED,MAAM,MAAM,YAAY,GAAG,mBAAmB,GAAG,eAAe,CAAC;AAEjE,UAAU,iBAAiB;IACzB;;;;;OAKG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB,2EAA2E;IAC3E,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAYD;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,KAAK,EACL,KAAe,GAChB,EAAE,iBAAiB,2CAqTnB"}
@@ -1,9 +1,14 @@
1
1
  import type { ReactNode } from "react";
2
2
  interface EmptyStateProps {
3
+ /** Icon shown in the tile above the title. Defaults to an inbox icon. */
3
4
  icon?: ReactNode;
5
+ /** Heading text. */
4
6
  title: string;
7
+ /** Supporting text below the title. */
5
8
  description?: string;
9
+ /** Call-to-action, e.g. a Button, shown below the description. */
6
10
  action?: ReactNode;
11
+ /** Additional utility classes for the root element. */
7
12
  className?: string;
8
13
  }
9
14
  export declare function EmptyState({ icon, title, description, action, className, }: EmptyStateProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../src/components/ui/EmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC,UAAU,eAAe;IACvB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,KAAK,EACL,WAAW,EACX,MAAM,EACN,SAAS,GACV,EAAE,eAAe,2CAoBjB"}
1
+ {"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../src/components/ui/EmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC,UAAU,eAAe;IACvB,yEAAyE;IACzE,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kEAAkE;IAClE,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,KAAK,EACL,WAAW,EACX,MAAM,EACN,SAAS,GACV,EAAE,eAAe,2CAoBjB"}
@@ -1,7 +1,10 @@
1
1
  import { type FieldsetHTMLAttributes, type ReactNode } from "react";
2
2
  export interface FieldsetProps extends FieldsetHTMLAttributes<HTMLFieldSetElement> {
3
+ /** Group caption rendered as the fieldset legend. */
3
4
  legend: ReactNode;
5
+ /** Helper text shown below the legend and linked via aria-describedby. */
4
6
  hint?: ReactNode;
7
+ /** Error message shown below the hint; marks child fields invalid. */
5
8
  error?: ReactNode;
6
9
  }
7
10
  /** Group choices without forcing a shared input ID or required state. */
@@ -1 +1 @@
1
- {"version":3,"file":"Fieldset.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Fieldset.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,sBAAsB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAK3E,MAAM,WAAW,aAAc,SAAQ,sBAAsB,CAAC,mBAAmB,CAAC;IAChF,MAAM,EAAE,SAAS,CAAC;IAClB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,yEAAyE;AACzE,wBAAgB,QAAQ,CAAC,EACvB,EAAE,EACF,MAAM,EACN,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,SAAS,EACT,kBAAkB,EAAE,WAAW,EAC/B,GAAG,KAAK,EACT,EAAE,aAAa,2CAiCf"}
1
+ {"version":3,"file":"Fieldset.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Fieldset.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,sBAAsB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAK3E,MAAM,WAAW,aAAc,SAAQ,sBAAsB,CAAC,mBAAmB,CAAC;IAChF,qDAAqD;IACrD,MAAM,EAAE,SAAS,CAAC;IAClB,0EAA0E;IAC1E,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,sEAAsE;IACtE,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,yEAAyE;AACzE,wBAAgB,QAAQ,CAAC,EACvB,EAAE,EACF,MAAM,EACN,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,SAAS,EACT,kBAAkB,EAAE,WAAW,EAC/B,GAAG,KAAK,EACT,EAAE,aAAa,2CAiCf"}
@@ -1 +1 @@
1
- {"version":3,"file":"FilterButton.d.ts","sourceRoot":"","sources":["../../../src/components/ui/FilterButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAc,KAAK,WAAW,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIrE,UAAU,iBAAkB,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IAC/E;;;OAGG;IACH,IAAI,EAAE,WAAW,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,iHAyBxB,CAAC"}
1
+ {"version":3,"file":"FilterButton.d.ts","sourceRoot":"","sources":["../../../src/components/ui/FilterButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAc,KAAK,WAAW,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIrE,UAAU,iBAAkB,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IAC/E;;;OAGG;IACH,IAAI,EAAE,WAAW,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,iHA0BxB,CAAC"}
@@ -8,10 +8,15 @@ export interface FieldControlAttributes {
8
8
  export interface FormFieldProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
9
9
  /** Stable input ID, generated when omitted and passed to child UI controls. */
10
10
  id?: string;
11
+ /** Label text for the control. */
11
12
  label: ReactNode;
13
+ /** Helper text shown below the label and linked via aria-describedby. */
12
14
  hint?: ReactNode;
15
+ /** Error message; marks the control invalid and links it via aria-describedby. */
13
16
  error?: ReactNode;
17
+ /** Show a required asterisk and pass required to the control. */
14
18
  required?: boolean;
19
+ /** Text shown beside the label when the field is not required, e.g. "(optional)". */
15
20
  optionalLabel?: ReactNode;
16
21
  children: ReactNode | ((attributes: FieldControlAttributes) => ReactNode);
17
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../../../src/components/ui/FormField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAKnE,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,cAAe,SAAQ,IAAI,CAC1C,cAAc,CAAC,cAAc,CAAC,EAC9B,UAAU,CACX;IACC,+EAA+E;IAC/E,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,QAAQ,EAAE,SAAS,GAAG,CAAC,CAAC,UAAU,EAAE,sBAAsB,KAAK,SAAS,CAAC,CAAC;CAC3E;AAED,gEAAgE;AAChE,wBAAgB,SAAS,CAAC,EACxB,EAAE,EACF,KAAK,EACL,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,2CA2ChB;AAED,sFAAsF;AACtF,wBAAgB,SAAS,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,C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2CAItC;AACD,0DAA0D;AAC1D,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,oBAAoB,CAAC,2CAEtC"}
@@ -2,15 +2,19 @@ import { type LayoutAlign, type LayoutElement, type LayoutGap, type LayoutProps,
2
2
  export interface GridOptions {
3
3
  /** Equal columns, a CSS template, or values at mobile-first breakpoints. */
4
4
  columns?: LayoutResponsive<number | string>;
5
+ /** Space between rows and columns, in spacing-scale steps. Defaults to 0. */
5
6
  gap?: LayoutGap;
7
+ /** Overrides the gap between columns. */
6
8
  gapX?: LayoutGap;
9
+ /** Overrides the gap between rows. */
7
10
  gapY?: LayoutGap;
11
+ /** Vertical alignment of each item within its grid area. Defaults to `stretch`. */
8
12
  align?: LayoutAlign;
9
13
  /** Align each item within its grid area. */
10
14
  justify?: "start" | "center" | "end" | "stretch";
11
15
  }
12
16
  export type GridProps<E extends LayoutElement = "div"> = LayoutProps<E, GridOptions>;
13
- export declare function Grid<E extends LayoutElement = "div">({ as, columns, gap, gapX, gapY, align, justify, className, style, ...props }: GridProps<E>): import("react").DetailedReactHTMLElement<Omit<GridProps<E>, "columns" | "gap" | "className" | "style" | "align" | "as" | "justify" | "gapX" | "gapY"> & {
17
+ export declare function Grid<E extends LayoutElement = "div">({ as, columns, gap, gapX, gapY, align, justify, className, style, ...props }: GridProps<E>): import("react").DetailedReactHTMLElement<Omit<GridProps<E>, "columns" | "className" | "gap" | "style" | "align" | "as" | "justify" | "gapX" | "gapY"> & {
14
18
  className: string;
15
19
  style: LayoutStyle;
16
20
  }, HTMLElement>;
@@ -1 +1 @@
1
- {"version":3,"file":"Grid.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Grid.tsx"],"names":[],"mappings":"AAGA,OAAO,EAIL,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EACjB,MAAM,kBAAkB,CAA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E,WAAW,CAAC;IACpB,4CAA4C;IAC5C,OAAO,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;CAClD;AACD,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,aAAa,GAAG,KAAK,IAAI,WAAW,CAClE,CAAC,EACD,WAAW,CACZ,CAAC;AAEF,wBAAgB,IAAI,CAAC,CAAC,SAAS,aAAa,GAAG,KAAK,EAAE,EACpD,EAAE,EACF,OAAW,EACX,GAAO,EACP,IAAI,EACJ,IAAI,EACJ,KAAiB,EACjB,OAAmB,EACnB,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,SAAS,CAAC,CAAC,CAAC;;WAUN,WAAW;gBAEnB"}
@@ -1,19 +1,24 @@
1
1
  import { type LayoutAlign, type LayoutBreakpoint, type LayoutElement, type LayoutGap, type LayoutJustify, type LayoutProps, type LayoutStyle } from "../../lib/layout";
2
2
  export interface InlineOptions {
3
+ /** Space between children, in spacing-scale steps. Defaults to 0. */
3
4
  gap?: LayoutGap;
4
5
  /** Overrides horizontal spacing. */
5
6
  gapX?: LayoutGap;
6
7
  /** Overrides vertical spacing. */
7
8
  gapY?: LayoutGap;
9
+ /** Cross-axis alignment of children. Defaults to `stretch`. */
8
10
  align?: LayoutAlign;
11
+ /** Main-axis distribution of children. Defaults to `start`. */
9
12
  justify?: LayoutJustify;
13
+ /** Let children wrap onto multiple lines instead of overflowing. */
10
14
  wrap?: boolean;
15
+ /** Render as `inline-flex` so the container sits in the text flow instead of filling the line. */
11
16
  inline?: boolean;
12
17
  /** Column below this breakpoint; row at and above it. */
13
18
  stackBelow?: LayoutBreakpoint;
14
19
  }
15
20
  export type InlineProps<E extends LayoutElement = "div"> = LayoutProps<E, InlineOptions>;
16
- export declare function Inline<E extends LayoutElement = "div">({ as, gap, gapX, gapY, align, justify, wrap, inline, stackBelow, className, style, ...props }: InlineProps<E>): import("react").DetailedReactHTMLElement<Omit<InlineProps<E>, "inline" | "gap" | "className" | "style" | "align" | "as" | "wrap" | "justify" | "gapX" | "gapY" | "stackBelow"> & {
21
+ export declare function Inline<E extends LayoutElement = "div">({ as, gap, gapX, gapY, align, justify, wrap, inline, stackBelow, className, style, ...props }: InlineProps<E>): import("react").DetailedReactHTMLElement<Omit<InlineProps<E>, "inline" | "className" | "gap" | "style" | "align" | "as" | "justify" | "wrap" | "gapX" | "gapY" | "stackBelow"> & {
17
22
  className: string;
18
23
  style: LayoutStyle;
19
24
  }, HTMLElement>;
@@ -1 +1 @@
1
- {"version":3,"file":"Inline.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Inline.tsx"],"names":[],"mappings":"AAGA,OAAO,EAKL,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,WAAW,EACjB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,oCAAoC;IACpC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,kCAAkC;IAClC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,yDAAyD;IACzD,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B;AACD,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,aAAa,GAAG,KAAK,IAAI,WAAW,CACpE,CAAC,EACD,aAAa,CACd,CAAC;AAEF,wBAAgB,MAAM,CAAC,CAAC,SAAS,aAAa,GAAG,KAAK,EAAE,EACtD,EAAE,EACF,GAAO,EACP,IAAI,EACJ,IAAI,EACJ,KAAiB,EACjB,OAAiB,EACjB,IAAY,EACZ,MAAc,EACd,UAAU,EACV,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,WAAW,CAAC,CAAC,CAAC;;WAiBR,WAAW;gBAEnB"}
1
+ {"version":3,"file":"Inline.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Inline.tsx"],"names":[],"mappings":"AAGA,OAAO,EAKL,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,WAAW,EACjB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,WAAW,aAAa;IAC5B,qEAAqE;IACrE,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,oCAAoC;IACpC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,kCAAkC;IAClC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,+DAA+D;IAC/D,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,+DAA+D;IAC/D,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,oEAAoE;IACpE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,kGAAkG;IAClG,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,yDAAyD;IACzD,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B;AACD,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,aAAa,GAAG,KAAK,IAAI,WAAW,CACpE,CAAC,EACD,aAAa,CACd,CAAC;AAEF,wBAAgB,MAAM,CAAC,CAAC,SAAS,aAAa,GAAG,KAAK,EAAE,EACtD,EAAE,EACF,GAAO,EACP,IAAI,EACJ,IAAI,EACJ,KAAiB,EACjB,OAAiB,EACjB,IAAY,EACZ,MAAc,EACd,UAAU,EACV,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,WAAW,CAAC,CAAC,CAAC;;WAiBR,WAAW;gBAEnB"}
@@ -1,5 +1,7 @@
1
1
  interface KbdProps {
2
+ /** The key or key combination to display. */
2
3
  children: React.ReactNode;
4
+ /** Additional utility classes appended to the root element. */
3
5
  className?: string;
4
6
  }
5
7
  export declare function Kbd({ children, className }: KbdProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"Kbd.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Kbd.tsx"],"names":[],"mappings":"AAEA,UAAU,QAAQ;IAChB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,GAAG,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,QAAQ,2CAYpD"}
1
+ {"version":3,"file":"Kbd.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Kbd.tsx"],"names":[],"mappings":"AAEA,UAAU,QAAQ;IAChB,6CAA6C;IAC7C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,+DAA+D;IAC/D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,GAAG,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,QAAQ,2CAYpD"}
@@ -1,5 +1,7 @@
1
1
  interface LoadingSpinnerProps {
2
+ /** Additional utility classes appended to the centering wrapper. */
2
3
  className?: string;
4
+ /** Size of the spinner icon. Defaults to `md`. */
3
5
  size?: "sm" | "md" | "lg";
4
6
  }
5
7
  export declare function LoadingSpinner({ className, size, }: LoadingSpinnerProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"LoadingSpinner.d.ts","sourceRoot":"","sources":["../../../src/components/ui/LoadingSpinner.tsx"],"names":[],"mappings":"AAIA,UAAU,mBAAmB;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC3B;AAID,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,IAAW,GACZ,EAAE,mBAAmB,2CAWrB"}
1
+ {"version":3,"file":"LoadingSpinner.d.ts","sourceRoot":"","sources":["../../../src/components/ui/LoadingSpinner.tsx"],"names":[],"mappings":"AAIA,UAAU,mBAAmB;IAC3B,oEAAoE;IACpE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kDAAkD;IAClD,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC3B;AAID,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,IAAW,GACZ,EAAE,mBAAmB,2CAWrB"}
@@ -1,7 +1,10 @@
1
1
  import type { ElementType } from "react";
2
2
  export interface MetricCardProps {
3
+ /** Small uppercase caption naming the metric. */
3
4
  label: string;
5
+ /** The headline figure. */
4
6
  value: string | number;
7
+ /** Secondary line of muted text below the value. */
5
8
  sub?: string;
6
9
  /**
7
10
  * Optional trend indicator rendered below the value. `value` is the change
@@ -14,9 +17,13 @@ export interface MetricCardProps {
14
17
  tone: "negative" | "neutral" | "positive";
15
18
  value: string;
16
19
  };
20
+ /** Progress bar fill as a percentage, clamped to 0-100. Omit to hide the bar. */
17
21
  bar?: number;
22
+ /** Icon component drawn as a large faint watermark in the corner. */
18
23
  icon?: ElementType;
24
+ /** Class name applied to the icon, typically a text colour utility. */
19
25
  iconColor?: string;
26
+ /** Additional utility classes appended to the root element. */
20
27
  className?: string;
21
28
  }
22
29
  export declare function MetricCard({ label, value, sub, trend, bar, icon: Icon, iconColor, className, }: MetricCardProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"MetricCard.d.ts","sourceRoot":"","sources":["../../../src/components/ui/MetricCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAIzC,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,KAAK,CAAC,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,UAAU,GAAG,SAAS,GAAG,UAAU,CAAC;QAC1C,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,KAAK,EACL,GAAG,EACH,KAAK,EACL,GAAG,EACH,IAAI,EAAE,IAAI,EACV,SAAS,EACT,SAAS,GACV,EAAE,eAAe,2CAkDjB"}
1
+ {"version":3,"file":"MetricCard.d.ts","sourceRoot":"","sources":["../../../src/components/ui/MetricCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAazC,MAAM,WAAW,eAAe;IAC9B,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,oDAAoD;IACpD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,KAAK,CAAC,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,UAAU,GAAG,SAAS,GAAG,UAAU,CAAC;QAC1C,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,iFAAiF;IACjF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+DAA+D;IAC/D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,KAAK,EACL,GAAG,EACH,KAAK,EACL,GAAG,EACH,IAAI,EAAE,IAAI,EACV,SAAS,EACT,SAAS,GACV,EAAE,eAAe,2CAiDjB"}