@voxel51/voodo 2.0.0 → 2.2.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 (157) hide show
  1. package/bin/voodo.mjs +127 -0
  2. package/dist/cli/reference.d.ts +79 -0
  3. package/dist/cli/reference.d.ts.map +1 -0
  4. package/dist/cli.cjs +11 -0
  5. package/dist/cli.cjs.map +1 -0
  6. package/dist/cli.d.ts +2 -0
  7. package/dist/cli.js +167 -0
  8. package/dist/cli.js.map +1 -0
  9. package/dist/components/ActivityToast/ActivityToast.d.ts +1 -1
  10. package/dist/components/ActivityToast/ActivityToast.d.ts.map +1 -1
  11. package/dist/components/Button/Button.d.ts +5 -3
  12. package/dist/components/Button/Button.d.ts.map +1 -1
  13. package/dist/components/Card/Card.d.ts +3 -3
  14. package/dist/components/Card/Card.d.ts.map +1 -1
  15. package/dist/components/Card/RichCard.d.ts +3 -1
  16. package/dist/components/Card/RichCard.d.ts.map +1 -1
  17. package/dist/components/Checkbox/Checkbox.d.ts +1 -0
  18. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
  19. package/dist/components/Clickable/Clickable.d.ts +1 -1
  20. package/dist/components/Combobox/Combobox.d.ts +6 -3
  21. package/dist/components/Combobox/Combobox.d.ts.map +1 -1
  22. package/dist/components/ContextMenu/ContextMenu.d.ts +1 -1
  23. package/dist/components/Datepicker/DatePicker.d.ts +1 -1
  24. package/dist/components/Datepicker/DatepickerIconButton.d.ts.map +1 -1
  25. package/dist/components/Divider/Divider.d.ts +21 -14
  26. package/dist/components/Divider/Divider.d.ts.map +1 -1
  27. package/dist/components/Drawer/Drawer.d.ts +37 -0
  28. package/dist/components/Drawer/Drawer.d.ts.map +1 -1
  29. package/dist/components/Dropdown/Dropdown.d.ts +3 -3
  30. package/dist/components/Dropdown/Dropdown.d.ts.map +1 -1
  31. package/dist/components/Dropdown/DropdownTrigger.d.ts +2 -2
  32. package/dist/components/Dropzone/Dropzone.d.ts.map +1 -1
  33. package/dist/components/EmptyState/EmptyState.d.ts +11 -4
  34. package/dist/components/EmptyState/EmptyState.d.ts.map +1 -1
  35. package/dist/components/FormField/FormField.d.ts +2 -2
  36. package/dist/components/FormField/FormField.d.ts.map +1 -1
  37. package/dist/components/FormFieldGroup/FormFieldGroup.d.ts +4 -19
  38. package/dist/components/FormFieldGroup/FormFieldGroup.d.ts.map +1 -1
  39. package/dist/components/Heading/Heading.d.ts +1 -1
  40. package/dist/components/Heading/Heading.d.ts.map +1 -1
  41. package/dist/components/IconAction/IconAction.d.ts +7 -1
  42. package/dist/components/IconAction/IconAction.d.ts.map +1 -1
  43. package/dist/components/Icons/Icon.d.ts +4 -3
  44. package/dist/components/Icons/Icon.d.ts.map +1 -1
  45. package/dist/components/Icons/IconBase.d.ts +2 -0
  46. package/dist/components/Icons/IconBase.d.ts.map +1 -1
  47. package/dist/components/Icons/IconWrapper.d.ts +3 -1
  48. package/dist/components/Icons/IconWrapper.d.ts.map +1 -1
  49. package/dist/components/ImageList/ImageList.d.ts +4 -4
  50. package/dist/components/ImageList/ImageList.d.ts.map +1 -1
  51. package/dist/components/Input/Input.d.ts +14 -19
  52. package/dist/components/Input/Input.d.ts.map +1 -1
  53. package/dist/components/Input/InputIcon.d.ts +1 -1
  54. package/dist/components/Input/InputIcon.d.ts.map +1 -1
  55. package/dist/components/Input/styles.d.ts +11 -12
  56. package/dist/components/Input/styles.d.ts.map +1 -1
  57. package/dist/components/ListItem/ListItem.d.ts +2 -2
  58. package/dist/components/ListItem/ListItem.d.ts.map +1 -1
  59. package/dist/components/LoadingDots/LoadingDots.d.ts +1 -1
  60. package/dist/components/Menu/MenuCheckItem.d.ts.map +1 -1
  61. package/dist/components/Menu/MenuIconTextItem.d.ts +4 -4
  62. package/dist/components/Menu/MenuIconTextItem.d.ts.map +1 -1
  63. package/dist/components/Menu/MenuSectionTitle.d.ts.map +1 -1
  64. package/dist/components/Menu/MenuTextItem.d.ts +3 -3
  65. package/dist/components/Menu/MenuTextItem.d.ts.map +1 -1
  66. package/dist/components/Menu/styles.d.ts.map +1 -1
  67. package/dist/components/Modal/Modal.d.ts +17 -9
  68. package/dist/components/Modal/Modal.d.ts.map +1 -1
  69. package/dist/components/Pill/Pill.d.ts +5 -4
  70. package/dist/components/Pill/Pill.d.ts.map +1 -1
  71. package/dist/components/Popover/Popover.d.ts +5 -5
  72. package/dist/components/Popover/styles.d.ts.map +1 -1
  73. package/dist/components/Progress/Progress.d.ts +4 -4
  74. package/dist/components/Progress/Progress.d.ts.map +1 -1
  75. package/dist/components/Radio/Radio.d.ts +15 -3
  76. package/dist/components/Radio/Radio.d.ts.map +1 -1
  77. package/dist/components/Radio/RadioGroup.d.ts +4 -4
  78. package/dist/components/Radio/RadioGroup.d.ts.map +1 -1
  79. package/dist/components/RichButton/RichButton.d.ts +2 -0
  80. package/dist/components/RichButton/RichButton.d.ts.map +1 -1
  81. package/dist/components/RichList/RichList.d.ts +14 -13
  82. package/dist/components/RichList/RichList.d.ts.map +1 -1
  83. package/dist/components/Select/Option.d.ts.map +1 -1
  84. package/dist/components/Select/Select.d.ts +17 -7
  85. package/dist/components/Select/Select.d.ts.map +1 -1
  86. package/dist/components/Sheet/Sheet.d.ts +9 -4
  87. package/dist/components/Sheet/Sheet.d.ts.map +1 -1
  88. package/dist/components/Slider/Slider.d.ts +15 -1
  89. package/dist/components/Slider/Slider.d.ts.map +1 -1
  90. package/dist/components/Slider/SliderBar.d.ts +1 -1
  91. package/dist/components/Slider/SliderKnob.d.ts +1 -1
  92. package/dist/components/Slider/SliderLabels.d.ts +1 -1
  93. package/dist/components/Spinner/Spinner.d.ts +1 -1
  94. package/dist/components/Spinner/Spinner.d.ts.map +1 -1
  95. package/dist/components/Stack/Stack.d.ts +3 -3
  96. package/dist/components/StatusDot/StatusDot.d.ts +21 -0
  97. package/dist/components/StatusDot/StatusDot.d.ts.map +1 -0
  98. package/dist/components/StatusDot/index.d.ts +2 -0
  99. package/dist/components/StatusDot/index.d.ts.map +1 -0
  100. package/dist/components/StepRail/StepRail.d.ts.map +1 -1
  101. package/dist/components/Table/Table.d.ts +82 -0
  102. package/dist/components/Table/Table.d.ts.map +1 -1
  103. package/dist/components/Tabs/Tab.d.ts +3 -0
  104. package/dist/components/Tabs/Tab.d.ts.map +1 -1
  105. package/dist/components/Text/Text.d.ts +7 -3
  106. package/dist/components/Text/Text.d.ts.map +1 -1
  107. package/dist/components/TextAction/TextAction.d.ts +9 -2
  108. package/dist/components/TextAction/TextAction.d.ts.map +1 -1
  109. package/dist/components/TextArea/TextArea.d.ts +7 -3
  110. package/dist/components/TextArea/TextArea.d.ts.map +1 -1
  111. package/dist/components/TextBadge/TextBadge.d.ts +3 -3
  112. package/dist/components/TextBadge/TextBadge.d.ts.map +1 -1
  113. package/dist/components/Toast/Toast.d.ts +4 -4
  114. package/dist/components/Toast/Toast.d.ts.map +1 -1
  115. package/dist/components/ToastContainer/ToastContainer.d.ts +9 -1
  116. package/dist/components/ToastContainer/ToastContainer.d.ts.map +1 -1
  117. package/dist/components/Toggle/Toggle.d.ts +2 -2
  118. package/dist/components/Toggle/Toggle.d.ts.map +1 -1
  119. package/dist/components/ToggleSwitch/ToggleSwitch.d.ts +12 -11
  120. package/dist/components/ToggleSwitch/ToggleSwitch.d.ts.map +1 -1
  121. package/dist/components/Toolbar/Toolbar.d.ts +14 -14
  122. package/dist/components/Toolbar/Toolbar.d.ts.map +1 -1
  123. package/dist/components/Toolbar/ToolbarGroup.d.ts +1 -1
  124. package/dist/components/Tooltip/Tooltip.d.ts +1 -1
  125. package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
  126. package/dist/components/Tree/TreeSelect.d.ts +1 -1
  127. package/dist/components/Tree/types.d.ts +2 -0
  128. package/dist/components/Tree/types.d.ts.map +1 -1
  129. package/dist/components/UnsetHint/UnsetHint.d.ts +2 -1
  130. package/dist/components/UnsetHint/UnsetHint.d.ts.map +1 -1
  131. package/dist/components/UploadList/UploadList.d.ts.map +1 -1
  132. package/dist/components/index.d.ts +1 -0
  133. package/dist/components/index.d.ts.map +1 -1
  134. package/dist/index.cjs +1 -1
  135. package/dist/index.cjs.map +1 -1
  136. package/dist/index.js +4282 -4071
  137. package/dist/index.js.map +1 -1
  138. package/dist/{palette-C24I0BcT.js → palette-Boxwxq4V.js} +92 -24
  139. package/dist/palette-Boxwxq4V.js.map +1 -0
  140. package/dist/palette-DV12yAPS.cjs +2 -0
  141. package/dist/palette-DV12yAPS.cjs.map +1 -0
  142. package/dist/styles/text.d.ts +6 -0
  143. package/dist/styles/text.d.ts.map +1 -1
  144. package/dist/theme/tokens/index.d.ts +62 -0
  145. package/dist/theme/tokens/index.d.ts.map +1 -1
  146. package/dist/theme/tokens/typography.d.ts +139 -0
  147. package/dist/theme/tokens/typography.d.ts.map +1 -1
  148. package/dist/tokens.cjs +1 -1
  149. package/dist/tokens.js +2 -2
  150. package/dist/types/text.d.ts +43 -4
  151. package/dist/types/text.d.ts.map +1 -1
  152. package/dist/util/classes.d.ts.map +1 -1
  153. package/dist/voodo.css +1 -1
  154. package/package.json +5 -1
  155. package/dist/palette-C24I0BcT.js.map +0 -1
  156. package/dist/palette-yXRdZevG.cjs +0 -2
  157. package/dist/palette-yXRdZevG.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"InputIcon.d.ts","sourceRoot":"","sources":["../../../src/components/Input/InputIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,KAAK,SAAS,EAAe,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,IAAI,EAA6B,MAAM,SAAS,CAAC;AAK1D,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAcxC,CAAC"}
1
+ {"version":3,"file":"InputIcon.d.ts","sourceRoot":"","sources":["../../../src/components/Input/InputIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,KAAK,SAAS,EAAe,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,IAAI,EAA6B,MAAM,SAAS,CAAC;AAK1D,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAmBxC,CAAC"}
@@ -1,17 +1,16 @@
1
1
  import { Size } from '../../types';
2
- export declare const sizeStyles: Partial<Record<Size, string>>;
3
- export declare const iconPaddingStyles: Partial<Record<Size, string>>;
4
- export declare const iconSizeStyles: Partial<Record<Size, string>>;
5
- export declare const paddingLeftStyles: Partial<Record<Size, string>>;
2
+ export type InputSize = Size.Sm | Size.Md | Size.Lg;
6
3
  /**
7
- * Styling applied to `type="number"` inputs.
8
- *
9
- * Removes the native browser spinner (up/down) buttons in WebKit/Blink and Firefox so number inputs
10
- * visually match the other input types. Without this the spinners add inconsistent right-hand padding
11
- * and chrome that differs across browsers.
12
- *
13
- * NOTE: This hides the spinners only. Exact "Voodoo" number-input specs (custom stepper affordance,
14
- * alignment, etc.) require the design document, which was not available.
4
+ * Figma draws three input sizes. `size` still accepts the full scale for
5
+ * compatibility, so Xs and Xl fold onto the nearest drawn size rather than
6
+ * rendering with no height, text size or padding.
15
7
  */
8
+ export declare const toInputSize: (size: Size) => InputSize;
9
+ export declare const sizeStyles: Record<InputSize, string>;
10
+ export declare const paddingStyles: Record<InputSize, string>;
11
+ export declare const iconPaddingStyles: Record<InputSize, string>;
12
+ export declare const iconSizeStyles: Record<InputSize, string>;
13
+ export declare const iconSizes: Record<InputSize, number>;
14
+ export declare const paddingLeftStyles: Record<InputSize, string>;
16
15
  export declare const numberInputStyles: string;
17
16
  //# sourceMappingURL=styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Input/styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,eAAO,MAAM,UAAU,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAIpD,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAI3D,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAIxD,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAI3D,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,QAO7B,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Input/styles.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAe,MAAM,SAAS,CAAC;AAI5C,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;AAEpD;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,MAAM,IAAI,KAAG,SAIxC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAIhD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAInD,CAAC;AAIF,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAIvD,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAIpD,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAI/C,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAIvD,CAAC;AAEF,eAAO,MAAM,iBAAiB,QAO7B,CAAC"}
@@ -16,7 +16,7 @@ export interface ListItemProps extends HTMLAttributes<HTMLDivElement> {
16
16
  *
17
17
  * @param canSelect If `true`, the component will include a {@link Checkbox} to enable selection.
18
18
  * @param selected Controls the selection state of the list item. If `canSelect` is not truthy, this has no effect.
19
- * @param onSelected Callback triggered when this item is selected.
19
+ * @param onSelected Called when the checkbox toggles, with the new selected state.
20
20
  * @param canDrag If `true`, displays a {@link DragHandleGripIcon} to allow dragging this component.
21
21
  * @param dragHandleListeners Optional mapping of `listenerId: listener` for drag events.
22
22
  * @param primaryContent Primary content to display in the list item.
@@ -24,7 +24,7 @@ export interface ListItemProps extends HTMLAttributes<HTMLDivElement> {
24
24
  * @param actions Content to display as "actions" for the list item.
25
25
  * This content will be pushed to the trailing edge of the list item.
26
26
  * @param additionalContent Additional content to display in the list item.
27
- * This content will be placed between the `secondaryContent` and the `actions.
27
+ * Rendered below the main row, indented to line up with `primaryContent`.
28
28
  * @param className `class` overrides to apply to the component.
29
29
  * @param props Additional HTML properties to apply to the component.
30
30
  *
@@ -1 +1 @@
1
- {"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC/E,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAgB3D,MAAM,WAAW,aAAc,SAAQ,cAAc,CAAC,cAAc,CAAC;IACnE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,mBAAmB,CAAC,EAAE,oBAAoB,CAAC;IAC3C,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,iBAAiB,CAAC,EAAE,SAAS,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAuFtC,CAAC"}
1
+ {"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC/E,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAiB3D,MAAM,WAAW,aAAc,SAAQ,cAAc,CAAC,cAAc,CAAC;IACnE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,mBAAmB,CAAC,EAAE,oBAAoB,CAAC;IAC3C,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,iBAAiB,CAAC,EAAE,SAAS,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAuFtC,CAAC"}
@@ -12,7 +12,7 @@ export interface LoadingDotsProps extends TextProps {
12
12
  *
13
13
  * @example
14
14
  * ```tsx
15
- * <LoadingDots text={query} color={TextColor.Tertiary} />
15
+ * <LoadingDots text={query} color="text-tertiary" />
16
16
  * ```
17
17
  *
18
18
  * @param text Label the dots follow.
@@ -1 +1 @@
1
- {"version":3,"file":"MenuCheckItem.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuCheckItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAgBhD;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,cAAc,CAAC,iBAAiB,CAAC;IAC3E,uDAAuD;IACvD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sFAAsF;IACtF,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CA0ChD,CAAC"}
1
+ {"version":3,"file":"MenuCheckItem.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuCheckItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAgBhD;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,cAAc,CAAC,iBAAiB,CAAC;IAC3E,uDAAuD;IACvD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sFAAsF;IACtF,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CA4ChD,CAAC"}
@@ -16,7 +16,7 @@ export interface MenuIconTextItemProps extends HTMLAttributes<HTMLButtonElement>
16
16
  subtext?: string;
17
17
  /** If `true`, the item cannot be interacted with and is rendered in a muted style. */
18
18
  disabled?: boolean;
19
- /** If `true`, renders text and icon in the destructive color palette. */
19
+ /** If `true`, renders the text and icon in the failure color, and fills the row with the danger color (white content) on hover and focus. */
20
20
  destructive?: boolean;
21
21
  }
22
22
  /**
@@ -27,7 +27,7 @@ export interface MenuIconTextItemProps extends HTMLAttributes<HTMLButtonElement>
27
27
  * ```tsx
28
28
  * <Dropdown trigger={<DropdownTrigger>Open</DropdownTrigger>}>
29
29
  * <MenuIconTextItem
30
- * icon={<ImageSearchIcon size={Size.Lg} />}
30
+ * icon={<ImageSearchIcon size="lg" />}
31
31
  * text="Sort by similarity"
32
32
  * subtext="Find visually similar"
33
33
  * onClick={() => {}}
@@ -35,11 +35,11 @@ export interface MenuIconTextItemProps extends HTMLAttributes<HTMLButtonElement>
35
35
  * </Dropdown>
36
36
  * ```
37
37
  *
38
- * @param icon A ReactNode (typically an icon component) rendered in the leading slot.
38
+ * @param icon An icon element (e.g. `<EditIcon />`) rendered in the leading slot; a legacy {@link IconName} is still accepted.
39
39
  * @param text The primary label for the item.
40
40
  * @param subtext An optional secondary line rendered below the primary text in muted color.
41
41
  * @param disabled If `true`, the item cannot be interacted with.
42
- * @param destructive If `true`, renders text colors in the destructive palette.
42
+ * @param destructive If `true`, renders the text and icon in the failure color, and fills the row with the danger color (white content) on hover and focus.
43
43
  * @param className `class` overrides to apply to the component.
44
44
  * @param props Additional HTML properties to apply to the component.
45
45
  */
@@ -1 +1 @@
1
- {"version":3,"file":"MenuIconTextItem.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuIconTextItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAK3D,OAAO,EAKL,QAAQ,EAKT,MAAM,SAAS,CAAC;AAKjB;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,cAAc,CAAC,iBAAiB,CAAC;IAC9E;;;;OAIG;IACH,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IAC5C,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sFAAsF;IACtF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yEAAyE;IACzE,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAsEtD,CAAC"}
1
+ {"version":3,"file":"MenuIconTextItem.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuIconTextItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAK3D,OAAO,EAML,QAAQ,EAKT,MAAM,SAAS,CAAC;AAKjB;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,cAAc,CAAC,iBAAiB,CAAC;IAC9E;;;;OAIG;IACH,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IAC5C,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sFAAsF;IACtF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6IAA6I;IAC7I,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAsFtD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"MenuSectionTitle.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuSectionTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAMhD;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,cAAc,CAAC,cAAc,CAAC;IAC3E,oEAAoE;IACpE,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAgBtD,CAAC"}
1
+ {"version":3,"file":"MenuSectionTitle.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuSectionTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAMhD;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,cAAc,CAAC,cAAc,CAAC;IAC3E,oEAAoE;IACpE,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAiBtD,CAAC"}
@@ -5,7 +5,7 @@ import { FC, HTMLAttributes } from 'react';
5
5
  export interface MenuTextItemProps extends HTMLAttributes<HTMLButtonElement> {
6
6
  /** If `true`, the item cannot be interacted with and is rendered in a muted style. */
7
7
  disabled?: boolean;
8
- /** If `true`, renders the label in the destructive text color (e.g. for "Delete"). */
8
+ /** If `true`, renders the label in the failure color, and fills the row with the danger color (white text) on hover and focus. */
9
9
  destructive?: boolean;
10
10
  }
11
11
  /**
@@ -14,7 +14,7 @@ export interface MenuTextItemProps extends HTMLAttributes<HTMLButtonElement> {
14
14
  * @example
15
15
  * ```tsx
16
16
  * <Dropdown trigger={<DropdownTrigger>Open</DropdownTrigger>}>
17
- * <MenuTextItem onClick={() => console.log("clicked")}>
17
+ * <MenuTextItem destructive onClick={() => console.log("clicked")}>
18
18
  * Delete item
19
19
  * </MenuTextItem>
20
20
  * </Dropdown>
@@ -22,7 +22,7 @@ export interface MenuTextItemProps extends HTMLAttributes<HTMLButtonElement> {
22
22
  *
23
23
  * @param children The label text.
24
24
  * @param disabled If `true`, the item cannot be interacted with.
25
- * @param destructive If `true`, renders the label in the destructive text color.
25
+ * @param destructive If `true`, renders the label in the failure color, and fills the row with the danger color (white text) on hover and focus.
26
26
  * @param className `class` overrides to apply to the component.
27
27
  * @param props Additional HTML properties to apply to the component.
28
28
  */
@@ -1 +1 @@
1
- {"version":3,"file":"MenuTextItem.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuTextItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAchD;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,cAAc,CAAC,iBAAiB,CAAC;IAC1E,sFAAsF;IACtF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sFAAsF;IACtF,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAoC9C,CAAC"}
1
+ {"version":3,"file":"MenuTextItem.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuTextItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAehD;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,cAAc,CAAC,iBAAiB,CAAC;IAC1E,sFAAsF;IACtF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kIAAkI;IAClI,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAqD9C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/styles.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,eAAO,MAAM,eAAe,QAAO,MAgBhC,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/styles.ts"],"names":[],"mappings":"AAYA;;;;;GAKG;AACH,eAAO,MAAM,eAAe,QAAO,MAoBhC,CAAC"}
@@ -3,15 +3,22 @@ import { FC, ReactNode } from 'react';
3
3
  * Width of the modal panel. The panel is always full-width up to this cap so
4
4
  * it degrades to the viewport on small screens.
5
5
  */
6
- export declare enum ModalSize {
6
+ export declare const ModalSize: {
7
7
  /** 400px — confirmations and single-field forms. */
8
- Sm = "sm",
8
+ readonly Sm: "sm";
9
9
  /** 600px — the default; forms and short reference content. */
10
- Md = "md",
10
+ readonly Md: "md";
11
11
  /** 800px — tables, side-by-side content. */
12
- Lg = "lg",
12
+ readonly Lg: "lg";
13
13
  /** 1000px — full editors. */
14
- Xl = "xl"
14
+ readonly Xl: "xl";
15
+ };
16
+ export type ModalSize = `${(typeof ModalSize)[keyof typeof ModalSize]}`;
17
+ export declare namespace ModalSize {
18
+ type Sm = typeof ModalSize.Sm;
19
+ type Md = typeof ModalSize.Md;
20
+ type Lg = typeof ModalSize.Lg;
21
+ type Xl = typeof ModalSize.Xl;
15
22
  }
16
23
  export interface ModalProps {
17
24
  /** Whether the modal is rendered. Modals are always controlled. */
@@ -23,12 +30,13 @@ export interface ModalProps {
23
30
  onClose: () => void;
24
31
  /** Heading rendered in the modal's title bar. */
25
32
  title?: ReactNode;
26
- /** Panel width. See {@link ModalSize}. Defaults to {@link ModalSize.Md}. */
33
+ /** Panel width. See {@link ModalSize}. Defaults to `"md"`. */
27
34
  size?: ModalSize;
28
35
  /**
29
36
  * Whether to render the title bar's close button. Defaults to `true` when
30
- * a `title` is given. A modal with no title bar has no close button; give
31
- * it a dismiss control of its own.
37
+ * a `title` is given. Without a `title`, no close button renders unless
38
+ * `showCloseButton` is `true`; otherwise give the modal a dismiss control
39
+ * of its own.
32
40
  */
33
41
  showCloseButton?: boolean;
34
42
  /** Pinned below the scrollable body — typically the action buttons. */
@@ -66,7 +74,7 @@ export interface ModalProps {
66
74
  * open={open}
67
75
  * onClose={close}
68
76
  * title="Keyboard reference"
69
- * size={ModalSize.Lg}
77
+ * size="lg"
70
78
  * footer={<Button onClick={close}>Done</Button>}
71
79
  * >
72
80
  * {rows}
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AA0B3C;;;GAGG;AACH,oBAAY,SAAS;IACnB,oDAAoD;IACpD,EAAE,OAAO;IACT,8DAA8D;IAC9D,EAAE,OAAO;IACT,4CAA4C;IAC5C,EAAE,OAAO;IACT,6BAA6B;IAC7B,EAAE,OAAO;CACV;AASD,MAAM,WAAW,UAAU;IACzB,mEAAmE;IACnE,IAAI,EAAE,OAAO,CAAC;IACd;;;OAGG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,iDAAiD;IACjD,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,4EAA4E;IAC5E,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,uEAAuE;IACvE,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,uCAAuC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,wDAAwD;IACxD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,CAyGhC,CAAC"}
1
+ {"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AA0B3C;;;GAGG;AACH,eAAO,MAAM,SAAS;IACpB,oDAAoD;;IAEpD,8DAA8D;;IAE9D,4CAA4C;;IAE5C,6BAA6B;;CAErB,CAAC;AACX,MAAM,MAAM,SAAS,GAAG,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,EAAE,CAAC;AAExE,yBAAiB,SAAS,CAAC;IACzB,KAAY,EAAE,GAAG,OAAO,SAAS,CAAC,EAAE,CAAC;IACrC,KAAY,EAAE,GAAG,OAAO,SAAS,CAAC,EAAE,CAAC;IACrC,KAAY,EAAE,GAAG,OAAO,SAAS,CAAC,EAAE,CAAC;IACrC,KAAY,EAAE,GAAG,OAAO,SAAS,CAAC,EAAE,CAAC;CACtC;AASD,MAAM,WAAW,UAAU;IACzB,mEAAmE;IACnE,IAAI,EAAE,OAAO,CAAC;IACd;;;OAGG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,iDAAiD;IACjD,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,8DAA8D;IAC9D,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,uEAAuE;IACvE,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,uCAAuC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,wDAAwD;IACxD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,CA2GhC,CAAC"}
@@ -18,16 +18,17 @@ export interface PillProps extends HTMLAttributes<HTMLSpanElement> {
18
18
  *
19
19
  * @example
20
20
  * ```tsx
21
- * <Pill isStatus={true}>
22
- * Success
21
+ * <Pill isStatus size="md" color="text-success" backgroundColor="status-approved-bg">
22
+ * Approved
23
23
  * </Pill>
24
24
  * ```
25
25
  *
26
- * @param size The size of the pill. See {@link Size}.
26
+ * @param size The size of the pill: `"xs"`, `"sm"` or `"md"`. Defaults to `"sm"`. See {@link PillSize}.
27
+ * @param icon Optional leading icon component, sized to the pill and tinted with `color`.
27
28
  * @param radius The border radius of the pill. See {@link Radius}.
28
29
  * @param shadow Optional drop shadow to apply to the pill. See {@link Shadow}.
29
30
  * @param color Text color of the pill. See {@link TextColor}.
30
- * @param backgroundColor Background color of the pill. See {@link BackgroundColor}.
31
+ * @param backgroundColor Background color of the pill. Defaults to `"bg-card-elevated"`. See {@link PillColor}.
31
32
  * @param isStatus If `true`, prefixes the content with a bullet-like icon.
32
33
  * @param onRemove Callback triggered when the remove control is clicked. Providing this makes the pill
33
34
  * removable: a trailing icon {@link Button} is rendered which calls `onRemove` when clicked. Omit it
@@ -1 +1 @@
1
- {"version":3,"file":"Pill.d.ts","sourceRoot":"","sources":["../../../src/components/Pill/Pill.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAGhD,OAAO,EAGL,KAAK,SAAS,EAEf,MAAM,oBAAoB,CAAC;AAI5B,OAAO,EACL,eAAe,EACf,MAAM,EACN,aAAa,EACb,MAAM,EACN,IAAI,EAEJ,WAAW,EACX,SAAS,EAEV,MAAM,SAAS,CAAC;AAGjB,MAAM,MAAM,QAAQ,GAAG,GAAG,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;AAC7D,MAAM,MAAM,SAAS,GAAG,GAAG,eAAe,GAAG,aAAa,GAAG,WAAW,EAAE,CAAC;AAE3E,MAAM,WAAW,SAAU,SAAQ,cAAc,CAAC,eAAe,CAAC;IAChE,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;I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AAM,IAAI,EAAE,EAAE,CAAC,SAAS,CA6D9B,CAAC"}
@@ -75,7 +75,7 @@ export interface PopoverProps extends Omit<HTMLAttributes<HTMLDivElement>, "chil
75
75
  */
76
76
  zIndex?: ZIndex;
77
77
  /**
78
- * Size the panel to the trigger's width — for a panel that reads as a
78
+ * Match the panel's width to the trigger's width — for a panel that reads as a
79
79
  * second row of the control it hangs from, rather than a card beside it.
80
80
  * @default false
81
81
  */
@@ -121,8 +121,8 @@ export interface PopoverProps extends Omit<HTMLAttributes<HTMLDivElement>, "chil
121
121
  * ```tsx
122
122
  * <Popover trigger={<DropdownTrigger>Search settings</DropdownTrigger>}>
123
123
  * {({ close }) => (
124
- * <Stack orientation={Orientation.Column} spacing={Spacing.Sm}>
125
- * <Text variant={TextVariant.Label}>Similarity index</Text>
124
+ * <Stack orientation="col" spacing="sm">
125
+ * <Text variant="label">Similarity index</Text>
126
126
  * <Select options={indexes} value={selected} onChange={pick} />
127
127
  * <Button onClick={close}>Done</Button>
128
128
  * </Stack>
@@ -134,10 +134,10 @@ export interface PopoverProps extends Omit<HTMLAttributes<HTMLDivElement>, "chil
134
134
  * @param children Panel content, or a function of {@link PopoverRenderProps}.
135
135
  * @param open Controlled open state.
136
136
  * @param onOpenChange Fires when the panel wants to open or close.
137
- * @param anchor Position of the panel relative to the trigger. See {@link PopoverAnchor}.
137
+ * @param anchor Position of the panel relative to the trigger. Defaults to `"bottom-start"`. See {@link PopoverAnchor}.
138
138
  * @param portal If `true`, renders the panel in a portal with a high z-index.
139
139
  * @param zIndex Stacking tier for the panel.
140
- * @param matchTriggerWidth Size the panel to the trigger's width.
140
+ * @param matchTriggerWidth Match the panel's width to the trigger's width.
141
141
  * @param closeOnEscape Close on Escape (default `true`).
142
142
  * @param disabled If `true`, the panel cannot be opened from the trigger.
143
143
  * @param panelClassName `class` overrides for the panel.
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/styles.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,QAAO,MAQnC,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/styles.ts"],"names":[],"mappings":"AAYA;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,QAAO,MAWnC,CAAC"}
@@ -6,7 +6,7 @@ export interface ProgressProps extends HTMLAttributes<HTMLDivElement> {
6
6
  value: number;
7
7
  /** Maximum value the bar represents. */
8
8
  max?: number;
9
- /** Track thickness. See {@link Size}. */
9
+ /** Track thickness: `"sm"`, `"md"` or `"lg"`. See {@link ProgressSize}. */
10
10
  size?: ProgressSize;
11
11
  /** Fill color. See {@link Color}. */
12
12
  color?: Color;
@@ -24,10 +24,10 @@ export interface ProgressProps extends HTMLAttributes<HTMLDivElement> {
24
24
  *
25
25
  * @param value Current value, clamped to `[0, max]`.
26
26
  * @param max Maximum value the bar represents. Defaults to `100`.
27
- * @param size Track thickness. See {@link Size}. Defaults to {@link Size.Md}.
28
- * @param color Fill color. See {@link Color}. Defaults to {@link BrandColor.Primary}.
27
+ * @param size Track thickness: `"sm"`, `"md"` or `"lg"`. Defaults to `"md"`. See {@link ProgressSize}.
28
+ * @param color Fill color. See {@link Color}. Defaults to `"brand-primary"`.
29
29
  * @param trackColor Background color of the unfilled track. See {@link BackgroundColor}.
30
- * Defaults to {@link BackgroundColor.CardElevated}.
30
+ * Defaults to `"bg-card-elevated"`.
31
31
  * @param className `class` overrides to apply to the component.
32
32
  * @param props Additional HTML properties to apply to the component.
33
33
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Progress.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/Progress.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAGhD,OAAO,EACL,eAAe,EAGf,KAAK,KAAK,EAEV,IAAI,EACL,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,YAAY,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aAAa,CAqCtC,CAAC"}
@@ -5,20 +5,32 @@ export interface RadioProps extends ModifiedRadioProps {
5
5
  value?: string;
6
6
  label?: string;
7
7
  disabled?: boolean;
8
+ /**
9
+ * @deprecated Figma draws one radio size, so this no longer changes the
10
+ * control or its label. Accepted so existing callers keep compiling.
11
+ */
8
12
  size?: Size;
9
13
  className?: string;
10
14
  labelClassName?: string;
11
15
  }
12
16
  /**
13
- * A basic radio component.
17
+ * A single radio option. Render radios through {@link RadioGroup} and its
18
+ * `options`, not on their own: a `Radio` needs a parent radio group to work.
14
19
  *
15
20
  * @example
16
21
  * ```tsx
17
- * <Radio value="car" label="Car" />
22
+ * <RadioGroup
23
+ * options={[
24
+ * { value: "car", label: "Car" },
25
+ * { value: "truck", label: "Truck" },
26
+ * ]}
27
+ * value={vehicle}
28
+ * onChange={setVehicle}
29
+ * />
18
30
  * ```
19
31
  *
20
32
  * @param value The value of the radio element.
21
- * @param size The size of the radio element. See {@link Size}.
33
+ * @param size Deprecated; Figma draws a single radio size, so this is ignored.
22
34
  * @param className `class` overrides to apply to the radio.
23
35
  * @param labelClassName `class` overrides to apply to the radio's label.
24
36
  * @param label Label to display for the radio element.
@@ -1 +1 @@
1
- {"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../src/components/Radio/Radio.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAGrD,OAAO,EAAE,IAAI,EAA0C,MAAM,SAAS,CAAC;AAKvE,KAAK,kBAAkB,GAAG,IAAI,CAC5B,mBAAmB,CAAC,gBAAgB,CAAC,EACrC,MAAM,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,WAAW,GAAG,MAAM,CACpE,CAAC;AAEF,MAAM,WAAW,UAAW,SAAQ,kBAAkB;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAoBD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,CAkFhC,CAAC"}
1
+ {"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../src/components/Radio/Radio.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAGrD,OAAO,EAAE,IAAI,EAA0C,MAAM,SAAS,CAAC;AAKvE,KAAK,kBAAkB,GAAG,IAAI,CAC5B,mBAAmB,CAAC,gBAAgB,CAAC,EACrC,MAAM,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,WAAW,GAAG,MAAM,CACpE,CAAC;AAEF,MAAM,WAAW,UAAW,SAAQ,kBAAkB;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AASD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,CAoFhC,CAAC"}
@@ -14,6 +14,7 @@ export interface RadioGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, "o
14
14
  value?: string;
15
15
  onChange: (value: string) => void;
16
16
  name?: string;
17
+ /** @deprecated Figma draws one radio size; forwarded to {@link Radio}, which ignores it. */
17
18
  size?: RadioGroupSize;
18
19
  disabled?: boolean;
19
20
  radioProps?: RadioProps;
@@ -21,12 +22,12 @@ export interface RadioGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, "o
21
22
  /**
22
23
  * A group of radio controls; supports selection via one-of semantics.
23
24
  *
24
- * This component operates exclusively as a controlled component. See `value` and `onChange` for controlled behavior.
25
+ * Controlled via `value` + `onChange`, or uncontrolled with `defaultValue`.
25
26
  *
26
27
  * @example
27
28
  * ```tsx
28
29
  * const MyComponent = () => {
29
- * const [value, setValue] = useState<string | null>(null);
30
+ * const [value, setValue] = useState<string>("car");
30
31
  *
31
32
  * const onChange = useCallback((selectedValue: string) => {
32
33
  * setValue(selectedValue);
@@ -59,8 +60,7 @@ export interface RadioGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, "o
59
60
  * @param defaultValue The default value to use when no selection has been made.
60
61
  * @param onChange Callback triggered when the selection value changes.
61
62
  * @param name Optional name of the radio group.
62
- * @param size The size of the radio group; this property will be forwarded to the wrapped {@link Radio} components.
63
- * See {@link Size}.
63
+ * @param size Deprecated; Figma draws a single radio size, so the wrapped {@link Radio} components ignore it.
64
64
  * @param disabled If `true`, disables the radio group.
65
65
  * @param className `class` overrides to apply to the radio group.
66
66
  * @param radioProps Additional HTML properties to apply to each of the wrapped {@link Radio} components.
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../src/components/Radio/RadioGroup.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,cAAc,EAAW,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAG/B,OAAO,EAAS,UAAU,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,MAAM,cAAc,GAAG,GAAG,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;AAEzD,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAC3C,cA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AQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,4FAA4F;IAC5F,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAuC1C,CAAC"}
@@ -21,6 +21,8 @@ export interface RichButtonProps extends HTMLAttributes<HTMLDivElement> {
21
21
  *
22
22
  * return (
23
23
  * <RichButton
24
+ * active={active}
25
+ * icon={DetectionIcon}
24
26
  * label="Detection"
25
27
  * description="Create a new detection"
26
28
  * onClick={onClick}
@@ -1 +1 @@
1
- {"version":3,"file":"RichButton.d.ts","sourceRoot":"","sources":["../../../src/components/RichButton/RichButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG3D,OAAO,EAAE,KAAK,SAAS,EAAe,MAAM,oBAAoB,CAAC;AAgBjE,MAAM,WAAW,eAAgB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACrE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAyD1C,CAAC"}
1
+ {"version":3,"file":"RichButton.d.ts","sourceRoot":"","sources":["../../../src/components/RichButton/RichButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG3D,OAAO,EAAE,KAAK,SAAS,EAAe,MAAM,oBAAoB,CAAC;AAiBjE,MAAM,WAAW,eAAgB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACrE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CA+D1C,CAAC"}
@@ -12,21 +12,22 @@ export interface RichListProps extends HTMLAttributes<HTMLDivElement> {
12
12
  /**
13
13
  * A list-like component which renders a group of {@link ListItem} children.
14
14
  *
15
- * This component operates as both a controlled and uncontrolled component.
16
- * See `selected`/`onSelected` and `listItems`/`onOrderChange` for controlled behavior.
15
+ * Selection works controlled (`selected` + `onSelected`) or uncontrolled.
16
+ * Ordering is always controlled: with `draggable`, items only move when you
17
+ * feed `onOrderChange`'s result back into `listItems`.
17
18
  *
18
19
  * @example
19
20
  * ```tsx
20
21
  * const MyComponent = ({openSettings}: {openSettings: (id: string) => void}) => {
21
- * const items: Descriptor<ListItemProps>[] = useMemo(() => [
22
+ * const [items, setItems] = useState<Descriptor<ListItemProps>[]>(() => [
22
23
  * {
23
24
  * id: "1",
24
25
  * data: {
25
26
  * primaryContent: "First Item",
26
- * secondaryContent: "First item description"
27
+ * secondaryContent: "First item description",
27
28
  * actions: (
28
29
  * <Button
29
- * variant={Variant.Icon}
30
+ * variant="icon"
30
31
  * aria-label="Settings"
31
32
  * leadingIcon={SettingsIcon}
32
33
  * onClick={() => openSettings("1")}
@@ -38,24 +39,25 @@ export interface RichListProps extends HTMLAttributes<HTMLDivElement> {
38
39
  * id: "2",
39
40
  * data: {
40
41
  * primaryContent: "Second Item",
41
- * secondaryContent: "Second item description"
42
+ * secondaryContent: "Second item description",
42
43
  * actions: (
43
44
  * <Button
44
- * variant={Variant.Icon}
45
+ * variant="icon"
45
46
  * aria-label="Settings"
46
47
  * leadingIcon={SettingsIcon}
47
48
  * onClick={() => openSettings("2")}
48
49
  * />
49
50
  * )
50
51
  * },
52
+ * },
51
53
  * {
52
54
  * id: "3",
53
55
  * data: {
54
56
  * primaryContent: "Third Item",
55
- * secondaryContent: "Third item description"
57
+ * secondaryContent: "Third item description",
56
58
  * actions: (
57
59
  * <Button
58
- * variant={Variant.Icon}
60
+ * variant="icon"
59
61
  * aria-label="Settings"
60
62
  * leadingIcon={SettingsIcon}
61
63
  * onClick={() => openSettings("3")}
@@ -63,12 +65,10 @@ export interface RichListProps extends HTMLAttributes<HTMLDivElement> {
63
65
  * )
64
66
  * },
65
67
  * },
66
- * ],
67
- * []
68
- * );
68
+ * ]);
69
69
  *
70
70
  * return (
71
- * <RichList listItems={items} />
71
+ * <RichList listItems={items} draggable onOrderChange={setItems} spacing="sm" />
72
72
  * );
73
73
  * };
74
74
  * ```
@@ -77,6 +77,7 @@ export interface RichListProps extends HTMLAttributes<HTMLDivElement> {
77
77
  * @param listItems List of component descriptors which will be used to create {@link ListItem} child components.
78
78
  * The order of this list dictates the order of the children from top to bottom.
79
79
  * @param draggable If `true`, allows reordering of children via dragging {@link ListItem} components.
80
+ * @param spacing Vertical gap between items. Defaults to `"md"`. See {@link Spacing}.
80
81
  * @param onSelected Callback triggered when selection state changes.
81
82
  * This callback includes a list of currently-selected descriptor IDs.
82
83
  * @param onOrderChange Callback triggered when {@link ListItem} ordering changes.
@@ -1 +1 @@
1
- {"version":3,"file":"RichList.d.ts","sourceRoot":"","sources":["../../../src/components/RichList/RichList.tsx"],"names":[],"mappings":"AAgBA,OAAO,EACL,EAAE,EACF,cAAc,EAKf,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,aAAa,EAAE,MAAM,uBA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CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2EG;AACH,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAoGtC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Option.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Option.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAgBhD,MAAM,WAAW,WAAY,SAAQ,cAAc,CAAC,cAAc,CAAC;IACjE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,WAAW,CAkClC,CAAC"}
1
+ {"version":3,"file":"Option.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Option.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAiBhD,MAAM,WAAW,WAAY,SAAQ,cAAc,CAAC,cAAc,CAAC;IACjE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,WAAW,CAkClC,CAAC"}
@@ -40,9 +40,13 @@ export interface SelectProps extends Omit<HTMLAttributes<HTMLDivElement>, "onCha
40
40
  * ```tsx
41
41
  * // Single selection
42
42
  * const MyComponent = () => {
43
- * const [value, setValue] = useState<string | null>(null);
43
+ * const [value, setValue] = useState<string>();
44
44
  *
45
- * const onChange = useCallback((selected: string) => setValue(selected), [setSelected]);
45
+ * const onChange = useCallback(
46
+ * (next: string | string[] | null) =>
47
+ * setValue(typeof next === "string" ? next : undefined),
48
+ * []
49
+ * );
46
50
  *
47
51
  * const options: Descriptor<{label: string, content: ReactNode}>[] = useMemo(() => [
48
52
  * {id: "id-a", data: {label: "A", content: "Option A"}},
@@ -69,7 +73,10 @@ export interface SelectProps extends Omit<HTMLAttributes<HTMLDivElement>, "onCha
69
73
  * const MyComponent = () => {
70
74
  * const [value, setValue] = useState<string[]>(() => []);
71
75
  *
72
- * const onChange = useCallback((selected: string[]) => setValue(selected), [setSelected]);
76
+ * const onChange = useCallback(
77
+ * (next: string | string[] | null) => setValue(Array.isArray(next) ? next : []),
78
+ * []
79
+ * );
73
80
  *
74
81
  * const options: Descriptor<{label: string, content: ReactNode}>[] = useMemo(() => [
75
82
  * {id: "id-a", data: {label: "A", content: "Option A"}},
@@ -94,12 +101,15 @@ export interface SelectProps extends Omit<HTMLAttributes<HTMLDivElement>, "onCha
94
101
  * @param disabled If `true`, disables the component.
95
102
  * @param exclusive If `true`, allows only a single element to be selected;
96
103
  * otherwise, multiple items can be selected concurrently.
97
- * @param onChange Callback triggered when selection state changes.
98
- * The callback includes a list of selected option values.
104
+ * @param onChange Callback triggered when selection state changes. Receives the
105
+ * selected option `id` (a string, or `null`) when `exclusive`, otherwise an
106
+ * array of selected `id`s.
99
107
  * @param options List of component descriptors which will be used to create {@link Option} child components.
100
108
  * @param zIndex Z-index level for the dropdown.
101
- * @param portal If `true`, ensures a high z-index for layered components (equivalent to above-modal when zIndex is not set).
102
- * @param value List of values for selected options; this property allows for controlled selection.
109
+ * @param portal If `true`, renders the options in a portal that always stacks
110
+ * above modals, overriding `zIndex`.
111
+ * @param value The selected option `id` (when `exclusive`) or `id`s; set it for
112
+ * controlled selection.
103
113
  * @param props Additional HTML properties to apply to the component.
104
114
  */
105
115
  export declare const Select: FC<SelectProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,EAAE,EACF,cAAc,E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