@mt-gloss/ui 0.0.9 → 0.0.11

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 (275) hide show
  1. package/BaseAsyncButton-XBXVlXMl.js +223 -0
  2. package/Expandable-SuZVwO7Z.js +13366 -0
  3. package/UIContext-CEp38xw-.js +1673 -0
  4. package/catalog.d.ts +7 -0
  5. package/catalog.js +614 -0
  6. package/index.d.ts +274 -2
  7. package/index.js +2217 -18330
  8. package/internals.d.ts +64 -0
  9. package/internals.js +279 -0
  10. package/lib/base/BaseAccordion/BaseAccordion.d.ts +51 -0
  11. package/lib/base/BaseAlert/BaseAlert.d.ts +28 -0
  12. package/lib/base/BaseAsyncButton/BaseAsyncButton.d.ts +22 -0
  13. package/lib/base/BaseAvatar/BaseAvatar.d.ts +28 -0
  14. package/lib/base/BaseBadge/BaseBadge.d.ts +31 -0
  15. package/lib/base/BaseBox/BaseBox.d.ts +35 -0
  16. package/lib/base/BaseBreadcrumbs/BaseBreadcrumbs.d.ts +26 -0
  17. package/lib/base/BaseButton/BaseButton.d.ts +38 -0
  18. package/lib/base/BaseCard/BaseCard.d.ts +109 -0
  19. package/lib/base/BaseCheckbox/BaseCheckbox.d.ts +23 -0
  20. package/lib/base/BaseChip/BaseChip.d.ts +38 -0
  21. package/lib/base/BaseColorPicker/BaseColorPicker.d.ts +77 -0
  22. package/lib/base/BaseDatePicker/BaseDatePicker.d.ts +76 -0
  23. package/lib/base/BaseDateRangePicker/BaseDateRangePicker.d.ts +47 -0
  24. package/lib/base/BaseDialog/BaseDialog.d.ts +54 -0
  25. package/lib/base/BaseDivider/BaseDivider.d.ts +24 -0
  26. package/lib/base/BaseFileUpload/BaseFileUpload.d.ts +57 -0
  27. package/lib/base/BaseIcon/BaseIcon.d.ts +23 -0
  28. package/lib/base/BaseInput/BaseInput.d.ts +34 -0
  29. package/lib/base/BaseLabel/BaseLabel.d.ts +21 -0
  30. package/lib/base/BaseLink/BaseLink.d.ts +29 -0
  31. package/lib/base/BaseMaskedInput/BaseMaskedInput.d.ts +31 -0
  32. package/lib/base/BaseMenu/BaseMenu.d.ts +70 -0
  33. package/lib/base/BaseNumberInput/BaseNumberInput.d.ts +31 -0
  34. package/lib/base/BaseOverlay/BaseOverlay.d.ts +39 -0
  35. package/lib/base/BaseOverlay/useOverlayDismiss.d.ts +15 -0
  36. package/lib/base/BaseOverlay/useOverlayPositioning.d.ts +13 -0
  37. package/lib/base/BasePopover/BasePopover.d.ts +40 -0
  38. package/lib/base/BaseProgressBar/BaseProgressBar.d.ts +27 -0
  39. package/lib/base/BaseRadio/BaseRadio.d.ts +20 -0
  40. package/lib/base/BaseRangeSlider/BaseRangeSlider.d.ts +31 -0
  41. package/lib/base/BaseRating/BaseRating.d.ts +25 -0
  42. package/lib/base/BaseSegmentedControl/BaseSegmentedControl.d.ts +26 -0
  43. package/lib/base/BaseSelect/BaseSelect.d.ts +83 -0
  44. package/lib/base/BaseSlider/BaseSlider.d.ts +29 -0
  45. package/lib/base/BaseStack/BaseStack.d.ts +26 -0
  46. package/lib/base/BaseTable/BaseTable.d.ts +97 -0
  47. package/lib/base/BaseText/BaseText.d.ts +19 -0
  48. package/lib/base/BaseTextarea/BaseTextarea.d.ts +37 -0
  49. package/lib/base/BaseTimePicker/BaseTimePicker.d.ts +55 -0
  50. package/lib/base/BaseTitle/BaseTitle.d.ts +22 -0
  51. package/lib/base/BaseToast/BaseToast.d.ts +35 -0
  52. package/lib/base/BaseToggle/BaseToggle.d.ts +22 -0
  53. package/lib/base/BaseTooltip/BaseTooltip.d.ts +27 -0
  54. package/lib/base/BaseTypography/BaseTypography.d.ts +30 -0
  55. package/lib/base/BaseValue/BaseValue.d.ts +20 -0
  56. package/lib/base/index.d.ts +65 -0
  57. package/lib/base/types.d.ts +9 -0
  58. package/lib/base/utils.d.ts +18 -0
  59. package/lib/composites/controls/ThresholdRamp/ThresholdRamp.d.ts +24 -0
  60. package/lib/composites/controls/ThresholdRamp/index.d.ts +2 -0
  61. package/lib/composites/controls/index.d.ts +1 -0
  62. package/lib/composites/dashboard/QuickConfigPanel/QuickConfigPanel.d.ts +14 -0
  63. package/lib/composites/dashboard/QuickConfigPanel/index.d.ts +2 -0
  64. package/lib/composites/dashboard/QuickConfigPanel/types.d.ts +38 -0
  65. package/lib/composites/data/DataTable.d.ts +61 -0
  66. package/lib/composites/data/PinToMetric/PinToMetric.d.ts +11 -0
  67. package/lib/composites/data/PinToMetric/index.d.ts +2 -0
  68. package/lib/composites/data/PinToMetric/types.d.ts +17 -0
  69. package/lib/composites/data/index.d.ts +4 -0
  70. package/lib/composites/index.d.ts +5 -0
  71. package/lib/composites/inputs/Autocomplete.d.ts +36 -0
  72. package/lib/composites/inputs/EntityPicker.d.ts +36 -0
  73. package/lib/composites/inputs/FilterChip.d.ts +29 -0
  74. package/lib/composites/inputs/MultiSelect.d.ts +38 -0
  75. package/lib/composites/inputs/index.d.ts +8 -0
  76. package/lib/composites/navigation/Stepper.d.ts +40 -0
  77. package/lib/composites/navigation/index.d.ts +2 -0
  78. package/lib/composites/overlay/Dropdown/Dropdown.d.ts +22 -0
  79. package/lib/composites/overlay/Dropdown/index.d.ts +2 -0
  80. package/lib/composites/overlay/FormDialog.d.ts +38 -0
  81. package/lib/composites/overlay/InlineNudge/InlineNudge.d.ts +26 -0
  82. package/lib/composites/overlay/InlineNudge/index.d.ts +12 -0
  83. package/lib/composites/overlay/MergePrompt/MergePrompt.d.ts +16 -0
  84. package/lib/composites/overlay/MergePrompt/index.d.ts +2 -0
  85. package/lib/composites/overlay/MergePrompt/types.d.ts +15 -0
  86. package/lib/composites/overlay/SplitButton/SplitButton.d.ts +27 -0
  87. package/lib/composites/overlay/SplitButton/index.d.ts +2 -0
  88. package/lib/composites/overlay/index.d.ts +6 -0
  89. package/lib/compositions/feedback/DestructiveModal.d.ts +1 -1
  90. package/lib/compositions/filters/OrderFilterBar.d.ts +35 -0
  91. package/lib/compositions/filters/index.d.ts +2 -0
  92. package/lib/compositions/forms/AddressGroup.d.ts +13 -1
  93. package/lib/compositions/forms/ContactForm.d.ts +31 -0
  94. package/lib/compositions/forms/CreditCardForm.d.ts +3 -1
  95. package/lib/compositions/forms/LoginForm.d.ts +3 -1
  96. package/lib/compositions/forms/PaymentForm.d.ts +50 -0
  97. package/lib/compositions/forms/RegistrationForm.d.ts +39 -0
  98. package/lib/compositions/forms/index.d.ts +3 -0
  99. package/lib/compositions/index.d.ts +3 -0
  100. package/lib/compositions/navigation/ImportWizard.d.ts +28 -0
  101. package/lib/compositions/navigation/index.d.ts +2 -0
  102. package/lib/compositions/panels/EntitySearchPanel.d.ts +41 -0
  103. package/lib/compositions/panels/ProfileCard.d.ts +34 -0
  104. package/lib/compositions/panels/index.d.ts +4 -0
  105. package/lib/containers/ContainerCard/ContainerCard.d.ts +13 -0
  106. package/lib/containers/ContainerDialog/ContainerDialog.d.ts +27 -0
  107. package/lib/containers/ContainerForm/ContainerForm.d.ts +45 -0
  108. package/lib/containers/ContainerFormField/ContainerFormField.d.ts +31 -0
  109. package/lib/containers/ContainerFormSection/ContainerFormSection.d.ts +13 -0
  110. package/lib/containers/ContainerPanel/ContainerPanel.d.ts +14 -0
  111. package/lib/containers/ContainerTable/ContainerTable.d.ts +12 -0
  112. package/lib/containers/ContainerToolbar/ContainerToolbar.d.ts +11 -0
  113. package/lib/containers/UIContext.d.ts +26 -0
  114. package/lib/containers/index.d.ts +18 -0
  115. package/lib/dictionary/border.d.ts +11 -0
  116. package/lib/dictionary/breakpoint.d.ts +12 -0
  117. package/lib/dictionary/color.d.ts +67 -0
  118. package/lib/dictionary/elevation.d.ts +16 -0
  119. package/lib/dictionary/index.d.ts +14 -0
  120. package/lib/dictionary/motion.d.ts +13 -0
  121. package/lib/dictionary/opacity.d.ts +11 -0
  122. package/lib/dictionary/radius.d.ts +14 -0
  123. package/lib/dictionary/spacing.d.ts +18 -0
  124. package/lib/dictionary/typography.d.ts +25 -0
  125. package/lib/dictionary/z-index.d.ts +13 -0
  126. package/lib/facade/composites.d.ts +56 -0
  127. package/lib/facade/compositions.d.ts +27 -0
  128. package/lib/facade/containers.d.ts +8 -0
  129. package/lib/facade/data-display.d.ts +41 -0
  130. package/lib/facade/display.d.ts +50 -0
  131. package/lib/facade/feedback.d.ts +6 -0
  132. package/lib/facade/index.d.ts +17 -0
  133. package/lib/facade/inputs.d.ts +43 -0
  134. package/lib/facade/layout.d.ts +8 -0
  135. package/lib/facade/overlay.d.ts +26 -0
  136. package/lib/facade/typography.d.ts +12 -0
  137. package/lib/facade/wrappers.d.ts +26 -0
  138. package/lib/presets/PresetAccordion/PresetAccordion.d.ts +21 -0
  139. package/lib/presets/PresetAlert/PresetAlert.d.ts +17 -0
  140. package/lib/presets/PresetAsyncButton/PresetAsyncButton.d.ts +22 -0
  141. package/lib/presets/PresetAsyncLoader/PresetAsyncLoader.d.ts +6 -0
  142. package/lib/presets/PresetAvatar/PresetAvatar.d.ts +18 -0
  143. package/lib/presets/PresetBadge/PresetBadge.d.ts +15 -0
  144. package/lib/presets/PresetBreadcrumbs/PresetBreadcrumbs.d.ts +15 -0
  145. package/lib/presets/PresetButton/PresetButton.d.ts +27 -0
  146. package/lib/presets/PresetButtonGroup/PresetButtonGroup.d.ts +6 -0
  147. package/lib/presets/PresetCard/PresetCard.d.ts +45 -0
  148. package/lib/presets/PresetCheckbox/PresetCheckbox.d.ts +23 -0
  149. package/lib/presets/PresetCheckboxGroup/PresetCheckboxGroup.d.ts +6 -0
  150. package/lib/presets/PresetChip/PresetChip.d.ts +22 -0
  151. package/lib/presets/PresetColorPicker/PresetColorPicker.d.ts +22 -0
  152. package/lib/presets/PresetDatePicker/PresetDatePicker.d.ts +29 -0
  153. package/lib/presets/PresetDateRangePicker/PresetDateRangePicker.d.ts +37 -0
  154. package/lib/presets/PresetDialog/PresetDialog.d.ts +46 -0
  155. package/lib/presets/PresetDivider/PresetDivider.d.ts +13 -0
  156. package/lib/presets/PresetDropdown/PresetDropdown.d.ts +6 -0
  157. package/lib/presets/PresetFileUpload/PresetFileUpload.d.ts +35 -0
  158. package/lib/presets/PresetForm/PresetForm.d.ts +6 -0
  159. package/lib/presets/PresetFormField/PresetFormField.d.ts +6 -0
  160. package/lib/presets/PresetInput/PresetInput.d.ts +24 -0
  161. package/lib/presets/PresetInputGroup/PresetInputGroup.d.ts +6 -0
  162. package/lib/presets/PresetLabel/PresetLabel.d.ts +18 -0
  163. package/lib/presets/PresetLink/PresetLink.d.ts +21 -0
  164. package/lib/presets/PresetMaskedInput/PresetMaskedInput.d.ts +41 -0
  165. package/lib/presets/PresetMenu/PresetMenu.d.ts +33 -0
  166. package/lib/presets/PresetNumberInput/PresetNumberInput.d.ts +26 -0
  167. package/lib/presets/PresetPopover/PresetPopover.d.ts +17 -0
  168. package/lib/presets/PresetProgressBar/PresetProgressBar.d.ts +19 -0
  169. package/lib/presets/PresetRadio/PresetRadio.d.ts +21 -0
  170. package/lib/presets/PresetRadioGroup/PresetRadioGroup.d.ts +6 -0
  171. package/lib/presets/PresetRangeSlider/PresetRangeSlider.d.ts +30 -0
  172. package/lib/presets/PresetRating/PresetRating.d.ts +19 -0
  173. package/lib/presets/PresetSegmentedControl/PresetSegmentedControl.d.ts +28 -0
  174. package/lib/presets/PresetSelect/PresetSelect.d.ts +63 -0
  175. package/lib/presets/PresetSlider/PresetSlider.d.ts +29 -0
  176. package/lib/presets/PresetSplitButton/PresetSplitButton.d.ts +6 -0
  177. package/lib/presets/PresetSwatchRow/PresetSwatchRow.d.ts +28 -0
  178. package/lib/presets/PresetSwatchRow/index.d.ts +2 -0
  179. package/lib/presets/PresetText/PresetText.d.ts +17 -0
  180. package/lib/presets/PresetTextarea/PresetTextarea.d.ts +25 -0
  181. package/lib/presets/PresetTimePicker/PresetTimePicker.d.ts +27 -0
  182. package/lib/presets/PresetTitle/PresetTitle.d.ts +19 -0
  183. package/lib/presets/PresetToast/PresetToast.d.ts +19 -0
  184. package/lib/presets/PresetToggle/PresetToggle.d.ts +21 -0
  185. package/lib/presets/PresetTooltip/PresetTooltip.d.ts +20 -0
  186. package/lib/presets/PresetTransition/PresetTransition.d.ts +6 -0
  187. package/lib/presets/PresetValue/PresetValue.d.ts +15 -0
  188. package/lib/presets/createPreset.d.ts +64 -0
  189. package/lib/presets/index.d.ts +86 -0
  190. package/lib/presets/types.d.ts +13 -0
  191. package/lib/primitives/Accordion.d.ts +12 -102
  192. package/lib/primitives/AsyncLoader.d.ts +4 -39
  193. package/lib/primitives/Badge.d.ts +5 -40
  194. package/lib/primitives/Button.d.ts +4 -71
  195. package/lib/primitives/ButtonGroup.d.ts +4 -70
  196. package/lib/primitives/Card.d.ts +20 -138
  197. package/lib/primitives/Checkbox.d.ts +4 -68
  198. package/lib/primitives/CheckboxGroup.d.ts +4 -160
  199. package/lib/primitives/Chip.d.ts +5 -66
  200. package/lib/primitives/ColorPicker.d.ts +4 -80
  201. package/lib/primitives/DatePicker.d.ts +4 -100
  202. package/lib/primitives/DateRangePicker.d.ts +4 -107
  203. package/lib/primitives/Dropdown.d.ts +4 -63
  204. package/lib/primitives/FileUpload.d.ts +4 -107
  205. package/lib/primitives/Form.d.ts +4 -117
  206. package/lib/primitives/FormField.d.ts +4 -67
  207. package/lib/primitives/Input.d.ts +4 -87
  208. package/lib/primitives/InputGroup.d.ts +4 -57
  209. package/lib/primitives/Link.d.ts +4 -67
  210. package/lib/primitives/MaskedInput.d.ts +4 -93
  211. package/lib/primitives/Menu.d.ts +12 -131
  212. package/lib/primitives/NumberInput.d.ts +4 -79
  213. package/lib/primitives/Radio.d.ts +4 -58
  214. package/lib/primitives/RadioGroup.d.ts +4 -161
  215. package/lib/primitives/RangeSlider.d.ts +4 -103
  216. package/lib/primitives/Rating.d.ts +4 -113
  217. package/lib/primitives/SegmentedControl.d.ts +4 -94
  218. package/lib/primitives/Select.d.ts +5 -203
  219. package/lib/primitives/Slider.d.ts +4 -109
  220. package/lib/primitives/SplitButton.d.ts +4 -82
  221. package/lib/primitives/Textarea.d.ts +4 -57
  222. package/lib/primitives/TimePicker.d.ts +4 -91
  223. package/lib/primitives/Toggle.d.ts +4 -66
  224. package/lib/primitives/Tooltip.d.ts +6 -86
  225. package/lib/primitives/Transition.d.ts +4 -105
  226. package/lib/primitives/dashboard/MetricCard/CardBack.d.ts +17 -2
  227. package/lib/primitives/dashboard/MetricCard/CardShell.d.ts +1 -1
  228. package/lib/primitives/dashboard/MetricCard/EdgeHoverHandle.d.ts +20 -0
  229. package/lib/primitives/dashboard/MetricCard/GhostPreview.d.ts +24 -0
  230. package/lib/primitives/dashboard/MetricCard/GutterActions.d.ts +12 -2
  231. package/lib/primitives/dashboard/MetricCard/MetricCard.d.ts +0 -28
  232. package/lib/primitives/dashboard/MetricCard/StatusModeCard.d.ts +5 -0
  233. package/lib/primitives/dashboard/MetricCard/StatusSlotChipMenu.d.ts +28 -0
  234. package/lib/primitives/dashboard/MetricCard/flipAndStage/FlipAndStageProvider.d.ts +29 -0
  235. package/lib/primitives/dashboard/MetricCard/flipAndStage/index.d.ts +15 -0
  236. package/lib/primitives/dashboard/MetricCard/flipAndStage/types.d.ts +83 -0
  237. package/lib/primitives/dashboard/MetricCard/flipAndStage/useFlipAndStage.d.ts +10 -0
  238. package/lib/primitives/dashboard/MetricCard/index.d.ts +10 -0
  239. package/lib/primitives/dashboard/MetricCard/types.d.ts +48 -4
  240. package/lib/primitives/dashboard/MetricCard/useEdgeHoverResize.d.ts +52 -0
  241. package/lib/primitives/dashboard/MetricCard/useSlotCapacity.d.ts +12 -0
  242. package/lib/primitives/dashboard/MetricCardGrid/MetricCardGrid.d.ts +21 -19
  243. package/lib/primitives/dashboard/MetricCardGrid/types.d.ts +8 -1
  244. package/lib/primitives/dashboard/MetricGroupContainer/MetricGroupContainer.d.ts +5 -0
  245. package/lib/primitives/dashboard/MetricGroupContainer/__tests__/fixtures.d.ts +13 -0
  246. package/lib/primitives/dashboard/MetricGroupContainer/index.d.ts +2 -0
  247. package/lib/primitives/dashboard/MetricGroupContainer/types.d.ts +34 -0
  248. package/lib/primitives/dashboard/PageChip/PageChip.d.ts +27 -0
  249. package/lib/primitives/dashboard/PageChip/PageDropdown.d.ts +29 -0
  250. package/lib/primitives/dashboard/PageChip/index.d.ts +3 -0
  251. package/lib/primitives/dashboard/PageChip/types.d.ts +36 -0
  252. package/lib/primitives/dashboard/TimeFrame/SimpleSelector.d.ts +9 -0
  253. package/lib/primitives/dashboard/TimeFrame/index.d.ts +2 -0
  254. package/lib/primitives/dashboard/TimeFrame/types.d.ts +8 -0
  255. package/lib/primitives/dashboard/UnifiedContextMenu/types.d.ts +2 -0
  256. package/lib/primitives/dashboard/index.d.ts +2 -0
  257. package/lib/wrappers/Actionable/Actionable.d.ts +17 -0
  258. package/lib/wrappers/AsyncLoader/AsyncLoader.d.ts +13 -0
  259. package/lib/wrappers/ButtonGroup/ButtonGroup.d.ts +23 -0
  260. package/lib/wrappers/CheckboxGroup/CheckboxGroup.d.ts +52 -0
  261. package/lib/wrappers/Dismissible/Dismissible.d.ts +24 -0
  262. package/lib/wrappers/Expandable/Expandable.d.ts +23 -0
  263. package/lib/wrappers/InputGroup/InputGroup.d.ts +20 -0
  264. package/lib/wrappers/RadioGroup/RadioGroup.d.ts +52 -0
  265. package/lib/wrappers/Selectable/Selectable.d.ts +19 -0
  266. package/lib/wrappers/Sortable/Sortable.d.ts +27 -0
  267. package/lib/wrappers/SortableZones/SortableZones.d.ts +32 -0
  268. package/lib/wrappers/SortableZones/index.d.ts +4 -0
  269. package/lib/wrappers/SortableZones/useSortableZones.d.ts +66 -0
  270. package/lib/wrappers/Transition/Transition.d.ts +49 -0
  271. package/lib/wrappers/index.d.ts +25 -0
  272. package/lib/wrappers/utils.d.ts +10 -0
  273. package/package.json +36 -5
  274. package/ui.css +1 -0
  275. package/index.css +0 -1
@@ -0,0 +1,17 @@
1
+ import { default as React } from 'react';
2
+ export interface ActionableProps {
3
+ /** Called when the child is activated (click or Enter/Space key) */
4
+ onAction?: (e: React.SyntheticEvent) => void;
5
+ /** Disable the actionable behavior */
6
+ disabled?: boolean;
7
+ /** ARIA role for the wrapped element (default: 'button') */
8
+ role?: string;
9
+ children: React.ReactElement;
10
+ }
11
+ /**
12
+ * Functional Wrapper: grants action behavior (click + keyboard) to any child element.
13
+ * Adds onClick, onKeyDown (Enter/Space), tabIndex, and role='button'.
14
+ *
15
+ * Usage: <Actionable onAction={handleClick}><Card>...</Card></Actionable>
16
+ */
17
+ export declare const Actionable: React.ForwardRefExoticComponent<ActionableProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+ export interface AsyncLoaderProps {
3
+ color?: 'blue' | 'green';
4
+ isLoading?: boolean;
5
+ children?: React.ReactNode;
6
+ }
7
+ /**
8
+ * AsyncLoader -- Wrapper tier. SVG perimeter-tracing animation wrapper.
9
+ * Strips className/style from consumer API.
10
+ */
11
+ export declare const AsyncLoader: React.ForwardRefExoticComponent<AsyncLoaderProps & React.RefAttributes<HTMLDivElement>>;
12
+ export { AsyncLoader as PresetAsyncLoader };
13
+ export type { AsyncLoaderProps as PresetAsyncLoaderProps };
@@ -0,0 +1,23 @@
1
+ import { default as React } from 'react';
2
+ export interface ButtonGroupProps {
3
+ children: React.ReactNode;
4
+ orientation?: 'horizontal' | 'vertical';
5
+ attached?: boolean;
6
+ size?: 'sm' | 'md' | 'lg';
7
+ variant?: string;
8
+ fullWidth?: boolean;
9
+ gap?: 'none' | 'sm' | 'md' | 'lg';
10
+ }
11
+ export interface ButtonGroupContextValue {
12
+ size?: 'sm' | 'md' | 'lg';
13
+ variant?: string;
14
+ isInGroup: boolean;
15
+ }
16
+ export declare const ButtonGroupContext: React.Context<ButtonGroupContextValue>;
17
+ /**
18
+ * ButtonGroup -- Wrapper tier. Groups related buttons with context propagation.
19
+ * Locked-down API (no className/style).
20
+ */
21
+ export declare const ButtonGroup: React.ForwardRefExoticComponent<ButtonGroupProps & React.RefAttributes<HTMLDivElement>>;
22
+ export { ButtonGroup as PresetButtonGroup };
23
+ export type { ButtonGroupProps as PresetButtonGroupProps };
@@ -0,0 +1,52 @@
1
+ import { default as React } from 'react';
2
+ export interface CheckboxGroupOption<T = string> {
3
+ value: T;
4
+ label: React.ReactNode;
5
+ disabled?: boolean;
6
+ helperText?: string;
7
+ }
8
+ export interface CheckboxGroupProps<T = string> {
9
+ value?: T[];
10
+ defaultValue?: T[];
11
+ onChange?: (value: T[]) => void;
12
+ options?: CheckboxGroupOption<T>[];
13
+ children?: React.ReactNode;
14
+ orientation?: 'horizontal' | 'vertical';
15
+ size?: 'sm' | 'md' | 'lg';
16
+ label?: string;
17
+ helperText?: string;
18
+ status?: 'default' | 'success' | 'error';
19
+ required?: boolean;
20
+ disabled?: boolean;
21
+ name?: string;
22
+ }
23
+ export interface CheckboxGroupContextValue<T = string> {
24
+ values: T[];
25
+ toggle: (value: T) => void;
26
+ isSelected: (value: T) => boolean;
27
+ groupProps: {
28
+ size?: 'sm' | 'md' | 'lg';
29
+ status?: 'default' | 'success' | 'error';
30
+ disabled?: boolean;
31
+ name?: string;
32
+ };
33
+ isInGroup: boolean;
34
+ }
35
+ export declare function useCheckboxGroupContext<T = string>(): CheckboxGroupContextValue<T> | null;
36
+ /**
37
+ * CheckboxGroup -- Wrapper tier. Manages multiple checkbox selections.
38
+ * Locked-down API (no className/style).
39
+ */
40
+ export declare function CheckboxGroup<T = string>({ value, defaultValue, onChange, options, children, orientation, size, label, helperText, status, required, disabled, name, }: CheckboxGroupProps<T>): import("react/jsx-runtime").JSX.Element;
41
+ export declare namespace CheckboxGroup {
42
+ var displayName: string;
43
+ }
44
+ export interface GroupCheckboxProps {
45
+ value: string;
46
+ label?: React.ReactNode;
47
+ disabled?: boolean;
48
+ helperText?: string;
49
+ }
50
+ export declare const GroupCheckbox: React.ForwardRefExoticComponent<GroupCheckboxProps & React.RefAttributes<HTMLInputElement>>;
51
+ export { CheckboxGroup as PresetCheckboxGroup };
52
+ export type { CheckboxGroupProps as PresetCheckboxGroupProps };
@@ -0,0 +1,24 @@
1
+ import { default as React } from 'react';
2
+ export interface DismissibleProps {
3
+ /** Called when the element should be dismissed */
4
+ onDismiss?: () => void;
5
+ /** Dismiss on Escape key press (default: true) */
6
+ dismissOnEscape?: boolean;
7
+ /** Dismiss on click outside the element (default: true) */
8
+ dismissOnClickOutside?: boolean;
9
+ /** Show a close button (renders an X button as first child, not via cloneElement) */
10
+ showCloseButton?: boolean;
11
+ /** Disable dismiss behavior */
12
+ disabled?: boolean;
13
+ children: React.ReactElement;
14
+ }
15
+ /**
16
+ * Functional Wrapper: grants dismiss behavior to any child element.
17
+ * Adds Escape key listener, click-outside detection, and optional close button.
18
+ *
19
+ * Usage: <Dismissible onDismiss={handleClose}><Panel>...</Panel></Dismissible>
20
+ *
21
+ * Note: Uses native DOM event listeners (not Floating UI) since Dismissible
22
+ * doesn't need floating/positioning. For positioned overlays, use BaseOverlay instead.
23
+ */
24
+ export declare const Dismissible: React.ForwardRefExoticComponent<DismissibleProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,23 @@
1
+ import { default as React } from 'react';
2
+ export interface ExpandableProps {
3
+ /** Whether the content is expanded */
4
+ expanded: boolean;
5
+ /** Optional trigger element rendered before the expandable content */
6
+ trigger?: React.ReactNode;
7
+ /** Called when the trigger is clicked (for controlled expand/collapse) */
8
+ onToggle?: () => void;
9
+ /** Animation duration in seconds (default: 0.2) */
10
+ duration?: number;
11
+ children: React.ReactNode;
12
+ }
13
+ /**
14
+ * Functional Wrapper: animated expand/collapse toggle.
15
+ * Uses Framer Motion AnimatePresence for smooth height animation.
16
+ * Falls back to basic show/hide if framer-motion is not installed.
17
+ *
18
+ * Usage:
19
+ * <Expandable expanded={isOpen} trigger={<Button onClick={toggle}>Toggle</Button>}>
20
+ * <div>Collapsible content here</div>
21
+ * </Expandable>
22
+ */
23
+ export declare const Expandable: React.ForwardRefExoticComponent<ExpandableProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,20 @@
1
+ import { default as React } from 'react';
2
+ export interface InputGroupProps {
3
+ children: React.ReactNode;
4
+ attached?: boolean;
5
+ }
6
+ export interface InputAddonProps {
7
+ children: React.ReactNode;
8
+ position?: 'left' | 'right';
9
+ }
10
+ /**
11
+ * InputGroup -- Wrapper tier. Groups inputs with addons.
12
+ * Locked-down API (no className/style).
13
+ */
14
+ export declare const InputGroup: React.ForwardRefExoticComponent<InputGroupProps & React.RefAttributes<HTMLDivElement>>;
15
+ /**
16
+ * InputAddon -- Wrapper tier. Prepend/append content to inputs.
17
+ */
18
+ export declare const InputAddon: React.ForwardRefExoticComponent<InputAddonProps & React.RefAttributes<HTMLSpanElement>>;
19
+ export { InputGroup as PresetInputGroup, InputAddon as PresetInputAddon };
20
+ export type { InputGroupProps as PresetInputGroupProps, InputAddonProps as PresetInputAddonProps };
@@ -0,0 +1,52 @@
1
+ import { default as React } from 'react';
2
+ export interface RadioGroupOption<T = string> {
3
+ value: T;
4
+ label: React.ReactNode;
5
+ description?: React.ReactNode;
6
+ disabled?: boolean;
7
+ }
8
+ export interface RadioGroupProps<T = string> {
9
+ value?: T;
10
+ defaultValue?: T;
11
+ onChange?: (value: T) => void;
12
+ options?: RadioGroupOption<T>[];
13
+ children?: React.ReactNode;
14
+ orientation?: 'horizontal' | 'vertical';
15
+ size?: 'sm' | 'md' | 'lg';
16
+ label?: string;
17
+ helperText?: string;
18
+ status?: 'default' | 'success' | 'error';
19
+ required?: boolean;
20
+ disabled?: boolean;
21
+ name: string;
22
+ }
23
+ export interface RadioGroupContextValue<T = string> {
24
+ value: T | undefined;
25
+ select: (value: T) => void;
26
+ isSelected: (value: T) => boolean;
27
+ groupProps: {
28
+ size?: 'sm' | 'md' | 'lg';
29
+ status?: 'default' | 'success' | 'error';
30
+ disabled?: boolean;
31
+ name: string;
32
+ };
33
+ isInGroup: boolean;
34
+ }
35
+ export declare function useRadioGroupContext<T = string>(): RadioGroupContextValue<T> | null;
36
+ /**
37
+ * RadioGroup -- Wrapper tier. Manages single-choice selections.
38
+ * Locked-down API (no className/style).
39
+ */
40
+ export declare function RadioGroup<T = string>({ value, defaultValue, onChange, options, children, orientation, size, label, helperText, status, required, disabled, name, }: RadioGroupProps<T>): import("react/jsx-runtime").JSX.Element;
41
+ export declare namespace RadioGroup {
42
+ var displayName: string;
43
+ }
44
+ export interface GroupRadioProps {
45
+ value: string;
46
+ label?: React.ReactNode;
47
+ description?: React.ReactNode;
48
+ disabled?: boolean;
49
+ }
50
+ export declare const GroupRadio: React.ForwardRefExoticComponent<GroupRadioProps & React.RefAttributes<HTMLInputElement>>;
51
+ export { RadioGroup as PresetRadioGroup };
52
+ export type { RadioGroupProps as PresetRadioGroupProps };
@@ -0,0 +1,19 @@
1
+ import { default as React } from 'react';
2
+ export interface SelectableProps {
3
+ /** Whether the child is currently selected */
4
+ selected?: boolean;
5
+ /** Called when selection state should change */
6
+ onSelect?: (selected: boolean, e: React.SyntheticEvent) => void;
7
+ /** Disable selection */
8
+ disabled?: boolean;
9
+ /** Show a checkbox indicator alongside the child */
10
+ showCheckbox?: boolean;
11
+ children: React.ReactElement;
12
+ }
13
+ /**
14
+ * Functional Wrapper: grants selection behavior to any child element.
15
+ * Adds click toggle, aria-selected, and optional checkbox indicator.
16
+ *
17
+ * Usage: <Selectable selected={isSelected} onSelect={handleSelect}><Card>...</Card></Selectable>
18
+ */
19
+ export declare const Selectable: React.ForwardRefExoticComponent<SelectableProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,27 @@
1
+ import { default as React } from 'react';
2
+ export interface SortableProps {
3
+ /** Unique ID for this sortable item (must match SortableContext items) */
4
+ id: string | number;
5
+ /** Disable drag behavior */
6
+ disabled?: boolean;
7
+ children: React.ReactElement;
8
+ }
9
+ /**
10
+ * Functional Wrapper: grants drag-to-reorder behavior to any child element.
11
+ * Requires @dnd-kit/sortable as optional peer dep. Falls back to passthrough if not installed.
12
+ *
13
+ * IMPORTANT: Consumer must wrap the list in DndContext + SortableContext from @dnd-kit/core.
14
+ * This wrapper only handles individual item sortable behavior.
15
+ *
16
+ * Usage:
17
+ * <DndContext onDragEnd={handleDragEnd}>
18
+ * <SortableContext items={ids}>
19
+ * {items.map(item => (
20
+ * <Sortable id={item.id} key={item.id}>
21
+ * <Card>{item.name}</Card>
22
+ * </Sortable>
23
+ * ))}
24
+ * </SortableContext>
25
+ * </DndContext>
26
+ */
27
+ export declare const Sortable: React.ForwardRefExoticComponent<SortableProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,32 @@
1
+ import { default as React } from 'react';
2
+ import { ZoneConfig } from './useSortableZones';
3
+ export interface SortableZonesProps<T extends {
4
+ id: string;
5
+ }> {
6
+ zones: ZoneConfig<T>[];
7
+ onZoneChange?: (zones: ZoneConfig<T>[]) => void;
8
+ /** Render the zone container. Receives zone key and the zone's current items. */
9
+ renderZone: (zoneKey: string, items: T[]) => React.ReactNode;
10
+ /** Render a single item inside a zone. */
11
+ renderItem: (item: T) => React.ReactNode;
12
+ /** Render the drag overlay (floating item while dragging). Falls back to renderItem if omitted. */
13
+ renderDragOverlay?: (item: T) => React.ReactNode;
14
+ }
15
+ /**
16
+ * SortableZones — multi-zone drag/drop wrapper on top of @dnd-kit/core.
17
+ *
18
+ * Supports within-zone reorder and cross-zone drag with optional maxItems cap per zone.
19
+ * Uses useSortableZones hook for state management.
20
+ * Falls back to passive rendering if @dnd-kit/core is not installed.
21
+ *
22
+ * Generic over T extends { id: string }. No reptime-specific types. D-04, D-06, D-11 compliant.
23
+ */
24
+ export declare function SortableZones<T extends {
25
+ id: string;
26
+ }>(props: SortableZonesProps<T>): React.ReactElement;
27
+ export declare namespace SortableZones {
28
+ var displayName: string;
29
+ }
30
+ export type { ZoneConfig, UseSortableZonesConfig, SortableZonesState } from './useSortableZones';
31
+ export { useSortableZones } from './useSortableZones';
32
+ export type { ZoneKey } from './useSortableZones';
@@ -0,0 +1,4 @@
1
+ export { SortableZones } from './SortableZones';
2
+ export type { SortableZonesProps } from './SortableZones';
3
+ export { useSortableZones } from './useSortableZones';
4
+ export type { ZoneConfig, ZoneKey, UseSortableZonesConfig, SortableZonesState } from './useSortableZones';
@@ -0,0 +1,66 @@
1
+ export type ZoneKey = string;
2
+ export interface ZoneConfig<T extends {
3
+ id: string;
4
+ }> {
5
+ zoneKey: ZoneKey;
6
+ items: T[];
7
+ maxItems?: number;
8
+ }
9
+ export interface SortableZonesState<T extends {
10
+ id: string;
11
+ }> {
12
+ zones: ZoneConfig<T>[];
13
+ activeZone: ZoneKey | null;
14
+ activeItem: T | null;
15
+ getZoneProps: (zoneKey: ZoneKey) => {
16
+ id: string;
17
+ 'data-zone-key': string;
18
+ };
19
+ getItemProps: (item: T) => {
20
+ id: string;
21
+ 'data-item-id': string;
22
+ 'data-zone-key': ZoneKey;
23
+ };
24
+ }
25
+ export interface UseSortableZonesConfig<T extends {
26
+ id: string;
27
+ }> {
28
+ zones: ZoneConfig<T>[];
29
+ onZoneChange?: (zones: ZoneConfig<T>[]) => void;
30
+ }
31
+ /**
32
+ * useSortableZones — zone-aware multi-container drag/drop state hook.
33
+ *
34
+ * Pure React hook (useState, useCallback). Does NOT import DndContext —
35
+ * SortableZones.tsx connects the event handlers to DndContext callbacks.
36
+ *
37
+ * Uncontrolled by default: zones state is initialised from config.zones and
38
+ * managed internally. Call onZoneChange to sync back to parent.
39
+ *
40
+ * Generic over T extends { id: string }. No reptime-specific types. D-06, D-04, D-11 compliant.
41
+ */
42
+ export declare function useSortableZones<T extends {
43
+ id: string;
44
+ }>(config: UseSortableZonesConfig<T>): SortableZonesState<T> & {
45
+ handleDragStart: (event: {
46
+ active: {
47
+ id: string;
48
+ };
49
+ }) => void;
50
+ handleDragOver: (event: {
51
+ active: {
52
+ id: string;
53
+ };
54
+ over: {
55
+ id: string;
56
+ } | null;
57
+ }) => void;
58
+ handleDragEnd: (event: {
59
+ active: {
60
+ id: string;
61
+ };
62
+ over: {
63
+ id: string;
64
+ } | null;
65
+ }) => void;
66
+ };
@@ -0,0 +1,49 @@
1
+ import { default as React } from 'react';
2
+ import { AnimationPresetName } from '../../utils/animations';
3
+ interface AnimatedElementProps {
4
+ className?: string;
5
+ style?: React.CSSProperties;
6
+ 'data-state'?: string;
7
+ }
8
+ export interface TransitionProps {
9
+ show: boolean;
10
+ animation?: AnimationPresetName | {
11
+ enter: {
12
+ from: React.CSSProperties;
13
+ to: React.CSSProperties;
14
+ };
15
+ exit: {
16
+ from: React.CSSProperties;
17
+ to: React.CSSProperties;
18
+ };
19
+ };
20
+ duration?: number;
21
+ easing?: string;
22
+ delay?: number;
23
+ unmountOnExit?: boolean;
24
+ onEnter?: () => void;
25
+ onEntered?: () => void;
26
+ onExit?: () => void;
27
+ onExited?: () => void;
28
+ children: React.ReactElement<AnimatedElementProps>;
29
+ }
30
+ /**
31
+ * Transition -- Wrapper tier. Self-contained enter/exit animation.
32
+ * Strips className/style from consumer API.
33
+ */
34
+ export declare function Transition({ show, animation, duration: customDuration, easing: customEasing, delay, unmountOnExit, onEnter, onEntered, onExit, onExited, children, ...rest }: TransitionProps): React.ReactElement<AnimatedElementProps, string | React.JSXElementConstructor<any>> | null;
35
+ export declare namespace Transition {
36
+ var displayName: string;
37
+ }
38
+ export interface TransitionGroupProps {
39
+ children: React.ReactNode;
40
+ }
41
+ /**
42
+ * TransitionGroup -- Wrapper tier. Container for animated lists.
43
+ */
44
+ export declare function TransitionGroup({ children }: TransitionGroupProps): import("react/jsx-runtime").JSX.Element;
45
+ export declare namespace TransitionGroup {
46
+ var displayName: string;
47
+ }
48
+ export { Transition as PresetTransition, TransitionGroup as PresetTransitionGroup };
49
+ export type { TransitionProps as PresetTransitionProps, TransitionGroupProps as PresetTransitionGroupProps };
@@ -0,0 +1,25 @@
1
+ export { mergeRefs, mergeHandlers } from './utils';
2
+ export { Actionable } from './Actionable/Actionable';
3
+ export type { ActionableProps } from './Actionable/Actionable';
4
+ export { Selectable } from './Selectable/Selectable';
5
+ export type { SelectableProps } from './Selectable/Selectable';
6
+ export { Dismissible } from './Dismissible/Dismissible';
7
+ export type { DismissibleProps } from './Dismissible/Dismissible';
8
+ export { Sortable } from './Sortable/Sortable';
9
+ export type { SortableProps } from './Sortable/Sortable';
10
+ export { Expandable } from './Expandable/Expandable';
11
+ export type { ExpandableProps } from './Expandable/Expandable';
12
+ export { ButtonGroup, ButtonGroupContext } from './ButtonGroup/ButtonGroup';
13
+ export type { ButtonGroupProps, ButtonGroupContextValue } from './ButtonGroup/ButtonGroup';
14
+ export { InputGroup, InputAddon } from './InputGroup/InputGroup';
15
+ export type { InputGroupProps, InputAddonProps } from './InputGroup/InputGroup';
16
+ export { CheckboxGroup, useCheckboxGroupContext, GroupCheckbox } from './CheckboxGroup/CheckboxGroup';
17
+ export type { CheckboxGroupProps, CheckboxGroupOption, CheckboxGroupContextValue, GroupCheckboxProps } from './CheckboxGroup/CheckboxGroup';
18
+ export { RadioGroup, useRadioGroupContext, GroupRadio } from './RadioGroup/RadioGroup';
19
+ export type { RadioGroupProps, RadioGroupOption, RadioGroupContextValue, GroupRadioProps } from './RadioGroup/RadioGroup';
20
+ export { AsyncLoader } from './AsyncLoader/AsyncLoader';
21
+ export type { AsyncLoaderProps } from './AsyncLoader/AsyncLoader';
22
+ export { Transition, TransitionGroup } from './Transition/Transition';
23
+ export type { TransitionProps, TransitionGroupProps } from './Transition/Transition';
24
+ export { SortableZones, useSortableZones } from './SortableZones';
25
+ export type { SortableZonesProps, ZoneConfig, ZoneKey, UseSortableZonesConfig, SortableZonesState } from './SortableZones';
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ /**
3
+ * Merge multiple React refs into one. Supports callback refs and RefObjects.
4
+ */
5
+ export declare function mergeRefs<T>(...refs: (React.Ref<T> | undefined | null)[]): React.RefCallback<T>;
6
+ /**
7
+ * Chain two event handlers. Calls child handler first, then wrapper handler.
8
+ * If child handler calls e.preventDefault(), wrapper handler still runs.
9
+ */
10
+ export declare function mergeHandlers<E extends React.SyntheticEvent>(childHandler?: ((e: E) => void) | null, wrapperHandler?: ((e: E) => void) | null): ((e: E) => void) | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mt-gloss/ui",
3
- "version": "0.0.9",
3
+ "version": "0.0.11",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "restricted"
@@ -20,12 +20,31 @@
20
20
  },
21
21
  "default": "./index.js"
22
22
  },
23
+ "./internals": {
24
+ "import": {
25
+ "types": "./internals.d.ts",
26
+ "default": "./internals.js"
27
+ },
28
+ "default": "./internals.js"
29
+ },
30
+ "./catalog": {
31
+ "import": {
32
+ "types": "./catalog.d.ts",
33
+ "default": "./catalog.js"
34
+ },
35
+ "require": {
36
+ "types": "./catalog.d.ts",
37
+ "default": "./catalog.js"
38
+ },
39
+ "default": "./catalog.js"
40
+ },
23
41
  "./styles.css": "./index.css"
24
42
  },
25
43
  "files": [
26
- "index.js",
27
- "index.d.ts",
28
- "index.css",
44
+ "*.js",
45
+ "*.d.ts",
46
+ "*.css",
47
+ "lib/**/*.js",
29
48
  "lib/**/*.d.ts",
30
49
  "README.md"
31
50
  ],
@@ -41,7 +60,10 @@
41
60
  "@emotion/react": "^11.0.0",
42
61
  "@emotion/styled": "^11.0.0",
43
62
  "date-fns": "^3.0.0 || ^4.0.0",
44
- "@mt-gloss/utils": ">=0.0.1"
63
+ "@mt-gloss/utils": ">=0.0.1",
64
+ "@floating-ui/react": ">=0.27.0",
65
+ "framer-motion": ">=12.0.0",
66
+ "zod": "^4.0.0"
45
67
  },
46
68
  "peerDependenciesMeta": {
47
69
  "@mui/material": {
@@ -76,6 +98,15 @@
76
98
  },
77
99
  "@mui/x-date-pickers-pro": {
78
100
  "optional": true
101
+ },
102
+ "@floating-ui/react": {
103
+ "optional": true
104
+ },
105
+ "framer-motion": {
106
+ "optional": true
107
+ },
108
+ "zod": {
109
+ "optional": true
79
110
  }
80
111
  },
81
112
  "optionalDependencies": {