@mt-gloss/ui 0.0.8 → 0.0.10

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 (271) hide show
  1. package/catalog.d.ts +7 -0
  2. package/catalog.js +614 -0
  3. package/index.d.ts +274 -2
  4. package/index.js +2217 -18330
  5. package/internals.d.ts +64 -0
  6. package/internals.js +279 -0
  7. package/lib/base/BaseAccordion/BaseAccordion.d.ts +51 -0
  8. package/lib/base/BaseAlert/BaseAlert.d.ts +28 -0
  9. package/lib/base/BaseAsyncButton/BaseAsyncButton.d.ts +22 -0
  10. package/lib/base/BaseAvatar/BaseAvatar.d.ts +28 -0
  11. package/lib/base/BaseBadge/BaseBadge.d.ts +31 -0
  12. package/lib/base/BaseBox/BaseBox.d.ts +35 -0
  13. package/lib/base/BaseBreadcrumbs/BaseBreadcrumbs.d.ts +26 -0
  14. package/lib/base/BaseButton/BaseButton.d.ts +38 -0
  15. package/lib/base/BaseCard/BaseCard.d.ts +109 -0
  16. package/lib/base/BaseCheckbox/BaseCheckbox.d.ts +23 -0
  17. package/lib/base/BaseChip/BaseChip.d.ts +38 -0
  18. package/lib/base/BaseColorPicker/BaseColorPicker.d.ts +77 -0
  19. package/lib/base/BaseDatePicker/BaseDatePicker.d.ts +76 -0
  20. package/lib/base/BaseDateRangePicker/BaseDateRangePicker.d.ts +47 -0
  21. package/lib/base/BaseDialog/BaseDialog.d.ts +54 -0
  22. package/lib/base/BaseDivider/BaseDivider.d.ts +24 -0
  23. package/lib/base/BaseFileUpload/BaseFileUpload.d.ts +57 -0
  24. package/lib/base/BaseIcon/BaseIcon.d.ts +23 -0
  25. package/lib/base/BaseInput/BaseInput.d.ts +34 -0
  26. package/lib/base/BaseLabel/BaseLabel.d.ts +21 -0
  27. package/lib/base/BaseLink/BaseLink.d.ts +29 -0
  28. package/lib/base/BaseMaskedInput/BaseMaskedInput.d.ts +31 -0
  29. package/lib/base/BaseMenu/BaseMenu.d.ts +70 -0
  30. package/lib/base/BaseNumberInput/BaseNumberInput.d.ts +31 -0
  31. package/lib/base/BaseOverlay/BaseOverlay.d.ts +39 -0
  32. package/lib/base/BaseOverlay/useOverlayDismiss.d.ts +15 -0
  33. package/lib/base/BaseOverlay/useOverlayPositioning.d.ts +13 -0
  34. package/lib/base/BasePopover/BasePopover.d.ts +40 -0
  35. package/lib/base/BaseProgressBar/BaseProgressBar.d.ts +27 -0
  36. package/lib/base/BaseRadio/BaseRadio.d.ts +20 -0
  37. package/lib/base/BaseRangeSlider/BaseRangeSlider.d.ts +31 -0
  38. package/lib/base/BaseRating/BaseRating.d.ts +25 -0
  39. package/lib/base/BaseSegmentedControl/BaseSegmentedControl.d.ts +26 -0
  40. package/lib/base/BaseSelect/BaseSelect.d.ts +83 -0
  41. package/lib/base/BaseSlider/BaseSlider.d.ts +29 -0
  42. package/lib/base/BaseStack/BaseStack.d.ts +26 -0
  43. package/lib/base/BaseTable/BaseTable.d.ts +97 -0
  44. package/lib/base/BaseText/BaseText.d.ts +19 -0
  45. package/lib/base/BaseTextarea/BaseTextarea.d.ts +37 -0
  46. package/lib/base/BaseTimePicker/BaseTimePicker.d.ts +55 -0
  47. package/lib/base/BaseTitle/BaseTitle.d.ts +22 -0
  48. package/lib/base/BaseToast/BaseToast.d.ts +35 -0
  49. package/lib/base/BaseToggle/BaseToggle.d.ts +22 -0
  50. package/lib/base/BaseTooltip/BaseTooltip.d.ts +27 -0
  51. package/lib/base/BaseTypography/BaseTypography.d.ts +30 -0
  52. package/lib/base/BaseValue/BaseValue.d.ts +20 -0
  53. package/lib/base/index.d.ts +65 -0
  54. package/lib/base/types.d.ts +9 -0
  55. package/lib/base/utils.d.ts +18 -0
  56. package/lib/composites/controls/ThresholdRamp/ThresholdRamp.d.ts +24 -0
  57. package/lib/composites/controls/ThresholdRamp/index.d.ts +2 -0
  58. package/lib/composites/controls/index.d.ts +1 -0
  59. package/lib/composites/dashboard/QuickConfigPanel/QuickConfigPanel.d.ts +14 -0
  60. package/lib/composites/dashboard/QuickConfigPanel/index.d.ts +2 -0
  61. package/lib/composites/dashboard/QuickConfigPanel/types.d.ts +38 -0
  62. package/lib/composites/data/DataTable.d.ts +61 -0
  63. package/lib/composites/data/PinToMetric/PinToMetric.d.ts +11 -0
  64. package/lib/composites/data/PinToMetric/index.d.ts +2 -0
  65. package/lib/composites/data/PinToMetric/types.d.ts +17 -0
  66. package/lib/composites/data/index.d.ts +4 -0
  67. package/lib/composites/index.d.ts +5 -0
  68. package/lib/composites/inputs/Autocomplete.d.ts +36 -0
  69. package/lib/composites/inputs/EntityPicker.d.ts +36 -0
  70. package/lib/composites/inputs/FilterChip.d.ts +29 -0
  71. package/lib/composites/inputs/MultiSelect.d.ts +38 -0
  72. package/lib/composites/inputs/index.d.ts +8 -0
  73. package/lib/composites/navigation/Stepper.d.ts +40 -0
  74. package/lib/composites/navigation/index.d.ts +2 -0
  75. package/lib/composites/overlay/Dropdown/Dropdown.d.ts +22 -0
  76. package/lib/composites/overlay/Dropdown/index.d.ts +2 -0
  77. package/lib/composites/overlay/FormDialog.d.ts +38 -0
  78. package/lib/composites/overlay/InlineNudge/InlineNudge.d.ts +26 -0
  79. package/lib/composites/overlay/InlineNudge/index.d.ts +12 -0
  80. package/lib/composites/overlay/MergePrompt/MergePrompt.d.ts +16 -0
  81. package/lib/composites/overlay/MergePrompt/index.d.ts +2 -0
  82. package/lib/composites/overlay/MergePrompt/types.d.ts +15 -0
  83. package/lib/composites/overlay/SplitButton/SplitButton.d.ts +27 -0
  84. package/lib/composites/overlay/SplitButton/index.d.ts +2 -0
  85. package/lib/composites/overlay/index.d.ts +6 -0
  86. package/lib/compositions/feedback/DestructiveModal.d.ts +1 -1
  87. package/lib/compositions/filters/OrderFilterBar.d.ts +35 -0
  88. package/lib/compositions/filters/index.d.ts +2 -0
  89. package/lib/compositions/forms/AddressGroup.d.ts +13 -1
  90. package/lib/compositions/forms/ContactForm.d.ts +31 -0
  91. package/lib/compositions/forms/CreditCardForm.d.ts +3 -1
  92. package/lib/compositions/forms/LoginForm.d.ts +3 -1
  93. package/lib/compositions/forms/PaymentForm.d.ts +50 -0
  94. package/lib/compositions/forms/RegistrationForm.d.ts +39 -0
  95. package/lib/compositions/forms/index.d.ts +3 -0
  96. package/lib/compositions/index.d.ts +3 -0
  97. package/lib/compositions/navigation/ImportWizard.d.ts +28 -0
  98. package/lib/compositions/navigation/index.d.ts +2 -0
  99. package/lib/compositions/panels/EntitySearchPanel.d.ts +41 -0
  100. package/lib/compositions/panels/ProfileCard.d.ts +34 -0
  101. package/lib/compositions/panels/index.d.ts +4 -0
  102. package/lib/containers/ContainerCard/ContainerCard.d.ts +13 -0
  103. package/lib/containers/ContainerDialog/ContainerDialog.d.ts +27 -0
  104. package/lib/containers/ContainerForm/ContainerForm.d.ts +45 -0
  105. package/lib/containers/ContainerFormField/ContainerFormField.d.ts +31 -0
  106. package/lib/containers/ContainerFormSection/ContainerFormSection.d.ts +13 -0
  107. package/lib/containers/ContainerPanel/ContainerPanel.d.ts +14 -0
  108. package/lib/containers/ContainerTable/ContainerTable.d.ts +12 -0
  109. package/lib/containers/ContainerToolbar/ContainerToolbar.d.ts +11 -0
  110. package/lib/containers/UIContext.d.ts +26 -0
  111. package/lib/containers/index.d.ts +18 -0
  112. package/lib/dictionary/border.d.ts +11 -0
  113. package/lib/dictionary/breakpoint.d.ts +12 -0
  114. package/lib/dictionary/color.d.ts +67 -0
  115. package/lib/dictionary/elevation.d.ts +16 -0
  116. package/lib/dictionary/index.d.ts +14 -0
  117. package/lib/dictionary/motion.d.ts +13 -0
  118. package/lib/dictionary/opacity.d.ts +11 -0
  119. package/lib/dictionary/radius.d.ts +14 -0
  120. package/lib/dictionary/spacing.d.ts +18 -0
  121. package/lib/dictionary/typography.d.ts +25 -0
  122. package/lib/dictionary/z-index.d.ts +13 -0
  123. package/lib/facade/composites.d.ts +56 -0
  124. package/lib/facade/compositions.d.ts +27 -0
  125. package/lib/facade/containers.d.ts +8 -0
  126. package/lib/facade/data-display.d.ts +41 -0
  127. package/lib/facade/display.d.ts +50 -0
  128. package/lib/facade/feedback.d.ts +6 -0
  129. package/lib/facade/index.d.ts +17 -0
  130. package/lib/facade/inputs.d.ts +43 -0
  131. package/lib/facade/layout.d.ts +8 -0
  132. package/lib/facade/overlay.d.ts +26 -0
  133. package/lib/facade/typography.d.ts +12 -0
  134. package/lib/facade/wrappers.d.ts +26 -0
  135. package/lib/presets/PresetAccordion/PresetAccordion.d.ts +21 -0
  136. package/lib/presets/PresetAlert/PresetAlert.d.ts +17 -0
  137. package/lib/presets/PresetAsyncButton/PresetAsyncButton.d.ts +22 -0
  138. package/lib/presets/PresetAsyncLoader/PresetAsyncLoader.d.ts +6 -0
  139. package/lib/presets/PresetAvatar/PresetAvatar.d.ts +18 -0
  140. package/lib/presets/PresetBadge/PresetBadge.d.ts +15 -0
  141. package/lib/presets/PresetBreadcrumbs/PresetBreadcrumbs.d.ts +15 -0
  142. package/lib/presets/PresetButton/PresetButton.d.ts +27 -0
  143. package/lib/presets/PresetButtonGroup/PresetButtonGroup.d.ts +6 -0
  144. package/lib/presets/PresetCard/PresetCard.d.ts +45 -0
  145. package/lib/presets/PresetCheckbox/PresetCheckbox.d.ts +23 -0
  146. package/lib/presets/PresetCheckboxGroup/PresetCheckboxGroup.d.ts +6 -0
  147. package/lib/presets/PresetChip/PresetChip.d.ts +22 -0
  148. package/lib/presets/PresetColorPicker/PresetColorPicker.d.ts +22 -0
  149. package/lib/presets/PresetDatePicker/PresetDatePicker.d.ts +29 -0
  150. package/lib/presets/PresetDateRangePicker/PresetDateRangePicker.d.ts +37 -0
  151. package/lib/presets/PresetDialog/PresetDialog.d.ts +46 -0
  152. package/lib/presets/PresetDivider/PresetDivider.d.ts +13 -0
  153. package/lib/presets/PresetDropdown/PresetDropdown.d.ts +6 -0
  154. package/lib/presets/PresetFileUpload/PresetFileUpload.d.ts +35 -0
  155. package/lib/presets/PresetForm/PresetForm.d.ts +6 -0
  156. package/lib/presets/PresetFormField/PresetFormField.d.ts +6 -0
  157. package/lib/presets/PresetInput/PresetInput.d.ts +24 -0
  158. package/lib/presets/PresetInputGroup/PresetInputGroup.d.ts +6 -0
  159. package/lib/presets/PresetLabel/PresetLabel.d.ts +18 -0
  160. package/lib/presets/PresetLink/PresetLink.d.ts +21 -0
  161. package/lib/presets/PresetMaskedInput/PresetMaskedInput.d.ts +41 -0
  162. package/lib/presets/PresetMenu/PresetMenu.d.ts +33 -0
  163. package/lib/presets/PresetNumberInput/PresetNumberInput.d.ts +26 -0
  164. package/lib/presets/PresetPopover/PresetPopover.d.ts +17 -0
  165. package/lib/presets/PresetProgressBar/PresetProgressBar.d.ts +19 -0
  166. package/lib/presets/PresetRadio/PresetRadio.d.ts +21 -0
  167. package/lib/presets/PresetRadioGroup/PresetRadioGroup.d.ts +6 -0
  168. package/lib/presets/PresetRangeSlider/PresetRangeSlider.d.ts +30 -0
  169. package/lib/presets/PresetRating/PresetRating.d.ts +19 -0
  170. package/lib/presets/PresetSegmentedControl/PresetSegmentedControl.d.ts +28 -0
  171. package/lib/presets/PresetSelect/PresetSelect.d.ts +63 -0
  172. package/lib/presets/PresetSlider/PresetSlider.d.ts +29 -0
  173. package/lib/presets/PresetSplitButton/PresetSplitButton.d.ts +6 -0
  174. package/lib/presets/PresetSwatchRow/PresetSwatchRow.d.ts +28 -0
  175. package/lib/presets/PresetSwatchRow/index.d.ts +2 -0
  176. package/lib/presets/PresetText/PresetText.d.ts +17 -0
  177. package/lib/presets/PresetTextarea/PresetTextarea.d.ts +25 -0
  178. package/lib/presets/PresetTimePicker/PresetTimePicker.d.ts +27 -0
  179. package/lib/presets/PresetTitle/PresetTitle.d.ts +19 -0
  180. package/lib/presets/PresetToast/PresetToast.d.ts +19 -0
  181. package/lib/presets/PresetToggle/PresetToggle.d.ts +21 -0
  182. package/lib/presets/PresetTooltip/PresetTooltip.d.ts +20 -0
  183. package/lib/presets/PresetTransition/PresetTransition.d.ts +6 -0
  184. package/lib/presets/PresetValue/PresetValue.d.ts +15 -0
  185. package/lib/presets/createPreset.d.ts +64 -0
  186. package/lib/presets/index.d.ts +86 -0
  187. package/lib/presets/types.d.ts +13 -0
  188. package/lib/primitives/Accordion.d.ts +12 -102
  189. package/lib/primitives/AsyncLoader.d.ts +4 -39
  190. package/lib/primitives/Badge.d.ts +5 -40
  191. package/lib/primitives/Button.d.ts +4 -71
  192. package/lib/primitives/ButtonGroup.d.ts +4 -70
  193. package/lib/primitives/Card.d.ts +20 -138
  194. package/lib/primitives/Checkbox.d.ts +4 -68
  195. package/lib/primitives/CheckboxGroup.d.ts +4 -160
  196. package/lib/primitives/Chip.d.ts +5 -66
  197. package/lib/primitives/ColorPicker.d.ts +4 -80
  198. package/lib/primitives/DatePicker.d.ts +4 -100
  199. package/lib/primitives/DateRangePicker.d.ts +4 -107
  200. package/lib/primitives/Dropdown.d.ts +4 -63
  201. package/lib/primitives/FileUpload.d.ts +4 -107
  202. package/lib/primitives/Form.d.ts +4 -117
  203. package/lib/primitives/FormField.d.ts +4 -67
  204. package/lib/primitives/Input.d.ts +4 -87
  205. package/lib/primitives/InputGroup.d.ts +4 -57
  206. package/lib/primitives/Link.d.ts +4 -67
  207. package/lib/primitives/MaskedInput.d.ts +4 -93
  208. package/lib/primitives/Menu.d.ts +12 -131
  209. package/lib/primitives/NumberInput.d.ts +4 -79
  210. package/lib/primitives/Radio.d.ts +4 -58
  211. package/lib/primitives/RadioGroup.d.ts +4 -161
  212. package/lib/primitives/RangeSlider.d.ts +4 -103
  213. package/lib/primitives/Rating.d.ts +4 -113
  214. package/lib/primitives/SegmentedControl.d.ts +4 -94
  215. package/lib/primitives/Select.d.ts +5 -203
  216. package/lib/primitives/Slider.d.ts +4 -109
  217. package/lib/primitives/SplitButton.d.ts +4 -82
  218. package/lib/primitives/Textarea.d.ts +4 -57
  219. package/lib/primitives/TimePicker.d.ts +4 -91
  220. package/lib/primitives/Toggle.d.ts +4 -66
  221. package/lib/primitives/Tooltip.d.ts +6 -86
  222. package/lib/primitives/Transition.d.ts +4 -105
  223. package/lib/primitives/dashboard/MetricCard/CardBack.d.ts +17 -2
  224. package/lib/primitives/dashboard/MetricCard/CardShell.d.ts +1 -1
  225. package/lib/primitives/dashboard/MetricCard/EdgeHoverHandle.d.ts +20 -0
  226. package/lib/primitives/dashboard/MetricCard/GhostPreview.d.ts +24 -0
  227. package/lib/primitives/dashboard/MetricCard/GutterActions.d.ts +12 -2
  228. package/lib/primitives/dashboard/MetricCard/MetricCard.d.ts +0 -28
  229. package/lib/primitives/dashboard/MetricCard/StatusModeCard.d.ts +5 -0
  230. package/lib/primitives/dashboard/MetricCard/StatusSlotChipMenu.d.ts +28 -0
  231. package/lib/primitives/dashboard/MetricCard/flipAndStage/FlipAndStageProvider.d.ts +29 -0
  232. package/lib/primitives/dashboard/MetricCard/flipAndStage/index.d.ts +15 -0
  233. package/lib/primitives/dashboard/MetricCard/flipAndStage/types.d.ts +83 -0
  234. package/lib/primitives/dashboard/MetricCard/flipAndStage/useFlipAndStage.d.ts +10 -0
  235. package/lib/primitives/dashboard/MetricCard/index.d.ts +10 -0
  236. package/lib/primitives/dashboard/MetricCard/types.d.ts +48 -4
  237. package/lib/primitives/dashboard/MetricCard/useEdgeHoverResize.d.ts +52 -0
  238. package/lib/primitives/dashboard/MetricCard/useSlotCapacity.d.ts +12 -0
  239. package/lib/primitives/dashboard/MetricCardGrid/MetricCardGrid.d.ts +21 -19
  240. package/lib/primitives/dashboard/MetricCardGrid/types.d.ts +8 -1
  241. package/lib/primitives/dashboard/MetricGroupContainer/MetricGroupContainer.d.ts +5 -0
  242. package/lib/primitives/dashboard/MetricGroupContainer/__tests__/fixtures.d.ts +13 -0
  243. package/lib/primitives/dashboard/MetricGroupContainer/index.d.ts +2 -0
  244. package/lib/primitives/dashboard/MetricGroupContainer/types.d.ts +34 -0
  245. package/lib/primitives/dashboard/PageChip/PageChip.d.ts +27 -0
  246. package/lib/primitives/dashboard/PageChip/PageDropdown.d.ts +29 -0
  247. package/lib/primitives/dashboard/PageChip/index.d.ts +3 -0
  248. package/lib/primitives/dashboard/PageChip/types.d.ts +36 -0
  249. package/lib/primitives/dashboard/TimeFrame/SimpleSelector.d.ts +9 -0
  250. package/lib/primitives/dashboard/TimeFrame/index.d.ts +2 -0
  251. package/lib/primitives/dashboard/TimeFrame/types.d.ts +8 -0
  252. package/lib/primitives/dashboard/UnifiedContextMenu/types.d.ts +2 -0
  253. package/lib/primitives/dashboard/index.d.ts +2 -0
  254. package/lib/wrappers/Actionable/Actionable.d.ts +17 -0
  255. package/lib/wrappers/AsyncLoader/AsyncLoader.d.ts +13 -0
  256. package/lib/wrappers/ButtonGroup/ButtonGroup.d.ts +23 -0
  257. package/lib/wrappers/CheckboxGroup/CheckboxGroup.d.ts +52 -0
  258. package/lib/wrappers/Dismissible/Dismissible.d.ts +24 -0
  259. package/lib/wrappers/Expandable/Expandable.d.ts +23 -0
  260. package/lib/wrappers/InputGroup/InputGroup.d.ts +20 -0
  261. package/lib/wrappers/RadioGroup/RadioGroup.d.ts +52 -0
  262. package/lib/wrappers/Selectable/Selectable.d.ts +19 -0
  263. package/lib/wrappers/Sortable/Sortable.d.ts +27 -0
  264. package/lib/wrappers/SortableZones/SortableZones.d.ts +32 -0
  265. package/lib/wrappers/SortableZones/index.d.ts +4 -0
  266. package/lib/wrappers/SortableZones/useSortableZones.d.ts +66 -0
  267. package/lib/wrappers/Transition/Transition.d.ts +49 -0
  268. package/lib/wrappers/index.d.ts +25 -0
  269. package/lib/wrappers/utils.d.ts +10 -0
  270. package/package.json +37 -3
  271. package/index.css +0 -1
@@ -1,69 +1,6 @@
1
- import { default as React } from 'react';
2
- import { IconValue } from '../types/icon';
3
- export type LinkVariant = 'default' | 'muted' | 'danger';
4
- export interface LinkProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href'> {
5
- /**
6
- * URL the link points to
7
- */
8
- href?: string;
9
- /**
10
- * Visual style variant
11
- * @default 'default'
12
- */
13
- variant?: LinkVariant;
14
- /**
15
- * Size of the link text
16
- * @default 'md'
17
- */
18
- size?: 'sm' | 'md' | 'lg';
19
- /**
20
- * Icon displayed before the link text
21
- */
22
- leftIcon?: IconValue;
23
- /**
24
- * Icon displayed after the link text
25
- */
26
- rightIcon?: IconValue;
27
- /**
28
- * Opens link in new tab with security attributes (adds external-link icon)
29
- */
30
- external?: boolean;
31
- /**
32
- * Disabled state - prevents interaction
33
- */
34
- disabled?: boolean;
35
- /**
36
- * Underline behavior
37
- * @default 'hover'
38
- */
39
- underline?: 'always' | 'hover' | 'none';
40
- /**
41
- * Render as different element (e.g., for Next.js Link integration)
42
- * When using with Next.js, pass the Link component from next/link as `as`
43
- * and spread href and other props through
44
- */
45
- as?: React.ElementType;
46
- /**
47
- * Content of the link
48
- */
49
- children?: React.ReactNode;
50
- /**
51
- * Additional CSS class names
52
- */
53
- className?: string;
54
- }
55
1
  /**
56
- * Link component for navigation with consistent styling
57
- *
58
- * Features underline animations, icons, and external link handling.
59
- * Can be composed with framework-specific link components using the `as` prop.
60
- *
61
- * @example
62
- * ```tsx
63
- * <Link href="/about">About Us</Link>
64
- * <Link href="https://example.com" external>External Site</Link>
65
- * <Link href="/settings" leftIcon="settings">Settings</Link>
66
- * <Link variant="muted" size="sm">Learn more</Link>
67
- * ```
2
+ * @deprecated Import directly from '@mt-gloss/ui' instead.
3
+ * This file will be removed in Phase 23.
68
4
  */
69
- export declare const Link: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>;
5
+ export { PresetLink as Link } from '../presets/PresetLink/PresetLink';
6
+ export type { PresetLinkProps as LinkProps, PresetLinkVariant as LinkVariant } from '../presets/PresetLink/PresetLink';
@@ -1,95 +1,6 @@
1
- import { default as React } from 'react';
2
- import { default as IMask } from 'imask';
3
- import { InputProps } from './Input';
4
1
  /**
5
- * Mask configuration options
6
- * @see https://imask.js.org/guide.html
2
+ * @deprecated Import directly from '@mt-gloss/ui' instead.
3
+ * This file will be removed in Phase 23.
7
4
  */
8
- export interface MaskConfig {
9
- /**
10
- * Mask pattern string (e.g., '0000 0000 0000 0000' for credit card)
11
- * '0' = digit, 'a' = letter, '*' = any character
12
- */
13
- mask: string | RegExp | NumberConstructor | Array<string | RegExp | {
14
- mask: string;
15
- [key: string]: unknown;
16
- }>;
17
- /**
18
- * Placeholder character for unfilled positions
19
- * @default '_'
20
- */
21
- placeholderChar?: string;
22
- /**
23
- * Whether to show placeholder characters (lazy mode hides unfilled)
24
- * @default true
25
- */
26
- lazy?: boolean;
27
- /**
28
- * Custom definitions for mask characters
29
- * @example { '#': /[0-9]/ }
30
- */
31
- definitions?: Record<string, RegExp>;
32
- /**
33
- * Whether to include mask characters in the value
34
- * false = masked value, true = unmasked value, 'typed' = typed value
35
- * @default false
36
- */
37
- unmask?: boolean | 'typed';
38
- /**
39
- * Additional imask options
40
- */
41
- [key: string]: unknown;
42
- }
43
- type IMaskInstance = ReturnType<typeof IMask>;
44
- /**
45
- * Built-in mask presets for common use cases
46
- */
47
- export declare const MaskPresets: Record<string, MaskConfig>;
48
- export type MaskPresetName = keyof typeof MaskPresets;
49
- export interface MaskedInputProps extends Omit<InputProps, 'onChange' | 'value'> {
50
- /**
51
- * Mask configuration object or preset name
52
- */
53
- mask: MaskConfig | MaskPresetName;
54
- /**
55
- * Current value (can be masked or unmasked depending on mask config)
56
- */
57
- value?: string;
58
- /**
59
- * Callback with unmasked value when input is accepted
60
- */
61
- onAccept?: (value: string, maskRef: IMaskInstance) => void;
62
- /**
63
- * Callback when mask is complete
64
- */
65
- onComplete?: (value: string, maskRef: IMaskInstance) => void;
66
- /**
67
- * Standard onChange for form compatibility (fires with masked value)
68
- */
69
- onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
70
- }
71
- /**
72
- * Input component with built-in masking support
73
- *
74
- * Wraps the base Input component with imask integration for
75
- * formatted input like credit cards, phone numbers, dates, etc.
76
- *
77
- * @example
78
- * ```tsx
79
- * // Using a preset
80
- * <MaskedInput
81
- * mask="creditCard"
82
- * label="Card Number"
83
- * onAccept={(value) => setCardNumber(value)}
84
- * />
85
- *
86
- * // Custom mask
87
- * <MaskedInput
88
- * mask={{ mask: '000-000-0000' }}
89
- * label="Phone"
90
- * onAccept={(value) => setPhone(value)}
91
- * />
92
- * ```
93
- */
94
- export declare const MaskedInput: React.ForwardRefExoticComponent<MaskedInputProps & React.RefAttributes<HTMLInputElement>>;
95
- export {};
5
+ export { PresetMaskedInput as MaskedInput, MaskPresets } from '../presets/PresetMaskedInput/PresetMaskedInput';
6
+ export type { PresetMaskedInputProps as MaskedInputProps, MaskConfig, MaskPresetName } from '../presets/PresetMaskedInput/PresetMaskedInput';
@@ -1,132 +1,13 @@
1
- import { default as React } from 'react';
2
- import { AccordionShowCount } from './Accordion';
3
- export type MenuLevel = 0 | 1 | 2;
4
- export interface MenuProps extends React.HTMLAttributes<HTMLElement> {
5
- /**
6
- * Content of the menu (MenuGroup or MenuItem components)
7
- */
8
- children: React.ReactNode;
9
- /**
10
- * Additional CSS class names
11
- */
12
- className?: string;
13
- }
14
- /**
15
- * Menu - navigation container with collapsible groups
16
- *
17
- * DOM Structure: `<nav class="gloss-menu">`
18
- *
19
- * @example
20
- * ```tsx
21
- * <Menu>
22
- * <MenuGroup label="Components" showCount="never">
23
- * <MenuGroup label="Input" showCount="collapsed-only">
24
- * <MenuItem href="/input" icon={<Icon name="input" />}>Text</MenuItem>
25
- * </MenuGroup>
26
- * </MenuGroup>
27
- * </Menu>
28
- * ```
29
- */
30
- export declare const Menu: React.ForwardRefExoticComponent<MenuProps & React.RefAttributes<HTMLElement>>;
31
- export interface MenuGroupProps extends React.HTMLAttributes<HTMLDivElement> {
32
- /**
33
- * Label text for the group header
34
- */
35
- label: string;
36
- /**
37
- * Icon to display on the left side of the header
38
- */
39
- icon?: React.ReactNode;
40
- /**
41
- * Whether the group is expanded by default
42
- */
43
- defaultOpen?: boolean;
44
- /**
45
- * Controlled open state
46
- */
47
- open?: boolean;
48
- /**
49
- * Callback when open state changes
50
- */
51
- onOpenChange?: (open: boolean) => void;
52
- /**
53
- * When to show the item count badge
54
- */
55
- showCount?: AccordionShowCount;
56
- /**
57
- * Whether the group is disabled
58
- */
59
- disabled?: boolean;
60
- /**
61
- * Content of the group (MenuItem or nested MenuGroup)
62
- */
63
- children: React.ReactNode;
64
- /**
65
- * Additional CSS class names
66
- */
67
- className?: string;
68
- }
69
- /**
70
- * MenuGroup - collapsible section within Menu
71
- *
72
- * DOM Structure: `<div class="gloss-menu-group">`
73
- */
74
- export declare const MenuGroup: React.ForwardRefExoticComponent<MenuGroupProps & React.RefAttributes<HTMLDivElement>>;
75
- export interface MenuItemProps extends React.HTMLAttributes<HTMLElement> {
76
- /**
77
- * URL for the item (renders as anchor if provided)
78
- */
79
- href?: string;
80
- /**
81
- * Custom component to render as (e.g., Next.js Link)
82
- * When provided with href, renders the component with href prop
83
- */
84
- as?: React.ElementType;
85
- /**
86
- * Icon to display on the left side
87
- */
88
- icon?: React.ReactNode;
89
- /**
90
- * Whether the item is currently active/selected
91
- */
92
- active?: boolean;
93
- /**
94
- * Whether the item is disabled
95
- */
96
- disabled?: boolean;
97
- /**
98
- * Click handler (for non-link items)
99
- */
100
- onClick?: (e: React.MouseEvent) => void;
101
- /**
102
- * Content of the item
103
- */
104
- children: React.ReactNode;
105
- /**
106
- * Additional CSS class names
107
- */
108
- className?: string;
109
- }
110
1
  /**
111
- * MenuItem - individual navigation item
112
- *
113
- * DOM Structure: `<a class="gloss-menu-item">` or `<button class="gloss-menu-item">`
114
- *
115
- * @example
116
- * // With Next.js Link
117
- * import Link from 'next/link';
118
- * <MenuItem as={Link} href="/dashboard" icon={<Icon name="home" />}>Dashboard</MenuItem>
119
- */
120
- export declare const MenuItem: React.ForwardRefExoticComponent<MenuItemProps & React.RefAttributes<HTMLElement>>;
121
- export interface MenuDividerProps extends React.HTMLAttributes<HTMLHRElement> {
122
- /**
123
- * Additional CSS class names
124
- */
125
- className?: string;
126
- }
127
- /**
128
- * MenuDivider - visual separator between menu items
129
- *
130
- * DOM Structure: `<hr class="gloss-menu-divider">`
131
- */
132
- export declare const MenuDivider: React.ForwardRefExoticComponent<MenuDividerProps & React.RefAttributes<HTMLHRElement>>;
2
+ * @deprecated Import directly from '@mt-gloss/ui' instead.
3
+ * This file will be removed in Phase 23.
4
+ */
5
+ export { PresetMenu as Menu } from '../presets/PresetMenu/PresetMenu';
6
+ export { PresetMenuGroup as MenuGroup } from '../presets/PresetMenu/PresetMenu';
7
+ export { PresetMenuItem as MenuItem } from '../presets/PresetMenu/PresetMenu';
8
+ export { PresetMenuDivider as MenuDivider } from '../presets/PresetMenu/PresetMenu';
9
+ export type { PresetMenuProps as MenuProps } from '../presets/PresetMenu/PresetMenu';
10
+ export type { PresetMenuGroupProps as MenuGroupProps } from '../presets/PresetMenu/PresetMenu';
11
+ export type { PresetMenuItemProps as MenuItemProps } from '../presets/PresetMenu/PresetMenu';
12
+ export type MenuDividerProps = Record<string, unknown>;
13
+ export type MenuLevel = 0 | 1 | 2;
@@ -1,81 +1,6 @@
1
- import { default as React } from 'react';
2
- export interface NumberInputProps {
3
- /**
4
- * Current value
5
- */
6
- value?: number;
7
- /**
8
- * Default value (uncontrolled)
9
- */
10
- defaultValue?: number;
11
- /**
12
- * Change handler
13
- */
14
- onChange?: (value: number) => void;
15
- /**
16
- * Minimum value
17
- */
18
- min?: number;
19
- /**
20
- * Maximum value
21
- */
22
- max?: number;
23
- /**
24
- * Step increment
25
- * @default 1
26
- */
27
- step?: number;
28
- /**
29
- * Show stepper buttons
30
- * @default true
31
- */
32
- showStepper?: boolean;
33
- /**
34
- * Stepper button position
35
- * @default 'right'
36
- */
37
- stepperPosition?: 'right' | 'sides';
38
- /**
39
- * Format display value
40
- */
41
- formatValue?: (value: number) => string;
42
- /**
43
- * Parse input back to number
44
- */
45
- parseValue?: (input: string) => number;
46
- /**
47
- * Label text
48
- */
49
- label?: string;
50
- /**
51
- * Helper text
52
- */
53
- helperText?: string;
54
- /**
55
- * Validation status
56
- */
57
- status?: 'default' | 'success' | 'error';
58
- /**
59
- * Disabled state
60
- */
61
- disabled?: boolean;
62
- /**
63
- * Placeholder text
64
- */
65
- placeholder?: string;
66
- /**
67
- * Additional CSS class names
68
- */
69
- className?: string;
70
- }
71
1
  /**
72
- * NumberInput component with stepper buttons
73
- *
74
- * @example
75
- * ```tsx
76
- * <NumberInput value={5} onChange={setValue} min={0} max={10} />
77
- * <NumberInput step={0.5} formatValue={(v) => `$${v.toFixed(2)}`} />
78
- * <NumberInput stepperPosition="sides" />
79
- * ```
2
+ * @deprecated Import directly from '@mt-gloss/ui' instead.
3
+ * This file will be removed in Phase 23.
80
4
  */
81
- export declare const NumberInput: React.ForwardRefExoticComponent<NumberInputProps & React.RefAttributes<HTMLInputElement>>;
5
+ export { PresetNumberInput as NumberInput } from '../presets/PresetNumberInput/PresetNumberInput';
6
+ export type { PresetNumberInputProps as NumberInputProps } from '../presets/PresetNumberInput/PresetNumberInput';
@@ -1,60 +1,6 @@
1
- import { default as React } from 'react';
2
- export interface RadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {
3
- /**
4
- * Whether the radio is checked (controlled)
5
- */
6
- checked?: boolean;
7
- /**
8
- * Callback when checked state changes
9
- */
10
- onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
11
- /**
12
- * Label text displayed next to the radio
13
- */
14
- label?: React.ReactNode;
15
- /**
16
- * Description text displayed below the label
17
- */
18
- description?: React.ReactNode;
19
- /**
20
- * Helper text displayed below the radio
21
- */
22
- helperText?: string;
23
- /**
24
- * Validation/status state
25
- * @default 'default'
26
- */
27
- status?: 'default' | 'success' | 'error';
28
- /**
29
- * Whether the field is required
30
- */
31
- required?: boolean;
32
- /**
33
- * Size of the radio
34
- * @default 'md'
35
- */
36
- size?: 'sm' | 'md' | 'lg';
37
- /**
38
- * Position of the label relative to the radio
39
- * @default 'right'
40
- */
41
- labelPosition?: 'left' | 'right';
42
- /**
43
- * Additional CSS class names
44
- */
45
- className?: string;
46
- }
47
1
  /**
48
- * Radio component for single-choice selection
49
- *
50
- * Must be used with RadioGroup for proper functionality.
51
- * Uses convex physics - radio elevates slightly on hover.
52
- *
53
- * @example
54
- * ```tsx
55
- * <Radio name="plan" value="basic" label="Basic Plan" />
56
- * <Radio name="plan" value="pro" label="Pro Plan" description="Best for teams" />
57
- * <Radio name="plan" value="enterprise" label="Enterprise" disabled />
58
- * ```
2
+ * @deprecated Import directly from '@mt-gloss/ui' instead.
3
+ * This file will be removed in Phase 23.
59
4
  */
60
- export declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>;
5
+ export { PresetRadio as Radio } from '../presets/PresetRadio/PresetRadio';
6
+ export type { PresetRadioProps as RadioProps } from '../presets/PresetRadio/PresetRadio';
@@ -1,163 +1,6 @@
1
- import { default as React } from 'react';
2
- import { RadioProps } from './Radio';
3
1
  /**
4
- * Option definition for RadioGroup
2
+ * @deprecated Import directly from '@mt-gloss/ui' instead.
3
+ * This file will be removed in Phase 23.
5
4
  */
6
- export interface RadioGroupOption<T = string> {
7
- /**
8
- * Unique value for the option
9
- */
10
- value: T;
11
- /**
12
- * Display label for the radio
13
- */
14
- label: React.ReactNode;
15
- /**
16
- * Description text below the label
17
- */
18
- description?: React.ReactNode;
19
- /**
20
- * Whether this option is disabled
21
- */
22
- disabled?: boolean;
23
- }
24
- export interface RadioGroupProps<T = string> {
25
- /**
26
- * Selected value (controlled)
27
- */
28
- value?: T;
29
- /**
30
- * Default selected value (uncontrolled)
31
- */
32
- defaultValue?: T;
33
- /**
34
- * Callback when selection changes
35
- */
36
- onChange?: (value: T) => void;
37
- /**
38
- * Array of options to render as radios
39
- * If not provided, use Radio children
40
- */
41
- options?: RadioGroupOption<T>[];
42
- /**
43
- * Radio children (alternative to options)
44
- */
45
- children?: React.ReactNode;
46
- /**
47
- * Layout orientation
48
- * @default 'vertical'
49
- */
50
- orientation?: 'horizontal' | 'vertical';
51
- /**
52
- * Size applied to all radios
53
- * @default 'md'
54
- */
55
- size?: 'sm' | 'md' | 'lg';
56
- /**
57
- * Group label displayed above the radios
58
- */
59
- label?: string;
60
- /**
61
- * Helper text displayed below the group
62
- */
63
- helperText?: string;
64
- /**
65
- * Validation status
66
- * @default 'default'
67
- */
68
- status?: 'default' | 'success' | 'error';
69
- /**
70
- * Whether a selection is required
71
- */
72
- required?: boolean;
73
- /**
74
- * Disable all radios in the group
75
- */
76
- disabled?: boolean;
77
- /**
78
- * Name attribute for form submission (required for radio groups)
79
- */
80
- name: string;
81
- /**
82
- * Additional CSS class names
83
- */
84
- className?: string;
85
- }
86
- /**
87
- * Context for sharing RadioGroup state with child radios
88
- */
89
- export interface RadioGroupContextValue<T = string> {
90
- /**
91
- * Currently selected value
92
- */
93
- value: T | undefined;
94
- /**
95
- * Select a value
96
- */
97
- select: (value: T) => void;
98
- /**
99
- * Check if a value is selected
100
- */
101
- isSelected: (value: T) => boolean;
102
- /**
103
- * Group-level props to apply to radios
104
- */
105
- groupProps: {
106
- size?: 'sm' | 'md' | 'lg';
107
- status?: 'default' | 'success' | 'error';
108
- disabled?: boolean;
109
- name: string;
110
- };
111
- /**
112
- * Whether radio is in a group
113
- */
114
- isInGroup: boolean;
115
- }
116
- /**
117
- * Hook to access RadioGroup context
118
- */
119
- export declare function useRadioGroupContext<T = string>(): RadioGroupContextValue<T> | null;
120
- /**
121
- * RadioGroup component for managing single-choice selections
122
- *
123
- * Provides context to child radios and manages selected value state.
124
- *
125
- * @example
126
- * ```tsx
127
- * // Using options prop
128
- * <RadioGroup
129
- * name="plan"
130
- * label="Select a plan"
131
- * options={[
132
- * { value: 'basic', label: 'Basic', description: '$9/month' },
133
- * { value: 'pro', label: 'Pro', description: '$29/month' },
134
- * { value: 'enterprise', label: 'Enterprise', description: 'Contact us' },
135
- * ]}
136
- * onChange={(value) => console.log(value)}
137
- * />
138
- *
139
- * // Using children
140
- * <RadioGroup name="size" label="Select size" orientation="horizontal">
141
- * <Radio value="sm" label="Small" />
142
- * <Radio value="md" label="Medium" />
143
- * <Radio value="lg" label="Large" />
144
- * </RadioGroup>
145
- * ```
146
- */
147
- export declare function RadioGroup<T = string>({ value, defaultValue, onChange, options, children, orientation, size, label, helperText, status, required, disabled, name, className, }: RadioGroupProps<T>): import("react/jsx-runtime").JSX.Element;
148
- export declare namespace RadioGroup {
149
- var displayName: string;
150
- }
151
- /**
152
- * Wrapper to make a Radio work within RadioGroup context
153
- */
154
- export interface GroupRadioProps extends Omit<RadioProps, 'checked' | 'onChange' | 'name'> {
155
- /**
156
- * Value for this radio within the group
157
- */
158
- value: string;
159
- }
160
- /**
161
- * Radio that automatically integrates with RadioGroup context
162
- */
163
- export declare const GroupRadio: React.ForwardRefExoticComponent<GroupRadioProps & React.RefAttributes<HTMLInputElement>>;
5
+ export { RadioGroup, useRadioGroupContext, GroupRadio } from '../wrappers/RadioGroup/RadioGroup';
6
+ export type { RadioGroupProps, RadioGroupOption, RadioGroupContextValue, GroupRadioProps } from '../wrappers/RadioGroup/RadioGroup';