figma-kit 1.0.0-beta.22 → 1.0.0-beta.24

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 (167) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +2 -4
  3. package/dist/components/alert-dialog/alert-dialog.d.ts +31 -0
  4. package/dist/components/alert-dialog/index.d.ts +1 -0
  5. package/dist/components/button/button.d.ts +15 -0
  6. package/dist/components/button/index.d.ts +1 -0
  7. package/dist/components/checkbox/checkbox.d.ts +12 -0
  8. package/dist/components/checkbox/index.d.ts +1 -0
  9. package/dist/components/collapsible/collapsible.d.ts +10 -0
  10. package/dist/components/collapsible/index.d.ts +1 -0
  11. package/dist/components/color-picker/color-picker-alpha.d.ts +4 -0
  12. package/dist/components/color-picker/color-picker-area.d.ts +5 -0
  13. package/dist/components/color-picker/color-picker-hue.d.ts +4 -0
  14. package/dist/components/color-picker/color-picker-input.d.ts +7 -0
  15. package/dist/components/color-picker/color-picker.d.ts +63 -0
  16. package/dist/components/color-picker/index.d.ts +5 -0
  17. package/dist/components/combobox/combobox.d.ts +51 -0
  18. package/dist/components/combobox/index.d.ts +1 -0
  19. package/dist/components/context-menu/context-menu.d.ts +36 -0
  20. package/dist/components/context-menu/index.d.ts +1 -0
  21. package/dist/components/dialog/dialog.d.ts +25 -0
  22. package/dist/components/dialog/index.d.ts +1 -0
  23. package/dist/components/dialog.base/dialog.base.d.ts +15 -0
  24. package/dist/components/dialog.base/index.d.ts +1 -0
  25. package/dist/components/dropdown-menu/dropdown-menu.d.ts +36 -0
  26. package/dist/components/dropdown-menu/index.d.ts +1 -0
  27. package/dist/components/flex/flex.d.ts +23 -0
  28. package/dist/components/flex/index.d.ts +1 -0
  29. package/dist/components/icon/icon.d.ts +16 -0
  30. package/dist/components/icon/index.d.ts +1 -0
  31. package/dist/components/icon-button/icon-button.d.ts +21 -0
  32. package/dist/components/icon-button/index.d.ts +1 -0
  33. package/dist/components/icons/actions.d.ts +3 -0
  34. package/dist/components/icons/align-bottom.d.ts +3 -0
  35. package/dist/components/icons/align-horizontal-center.d.ts +3 -0
  36. package/dist/components/icons/align-left.d.ts +3 -0
  37. package/dist/components/icons/align-right.d.ts +3 -0
  38. package/dist/components/icons/align-top.d.ts +3 -0
  39. package/dist/components/icons/align-vertical-center.d.ts +3 -0
  40. package/dist/components/icons/annotation.d.ts +3 -0
  41. package/dist/components/icons/aspect-ratio.d.ts +3 -0
  42. package/dist/components/icons/auto-height.d.ts +3 -0
  43. package/dist/components/icons/auto-width.d.ts +3 -0
  44. package/dist/components/icons/blend-mode.d.ts +3 -0
  45. package/dist/components/icons/boolean.d.ts +3 -0
  46. package/dist/components/icons/checkmark-indeterminate.d.ts +3 -0
  47. package/dist/components/icons/checkmark.d.ts +3 -0
  48. package/dist/components/icons/chevron-down.d.ts +3 -0
  49. package/dist/components/icons/chevron-left.d.ts +3 -0
  50. package/dist/components/icons/chevron-right.d.ts +3 -0
  51. package/dist/components/icons/chevron-up.d.ts +3 -0
  52. package/dist/components/icons/circle.d.ts +3 -0
  53. package/dist/components/icons/clear.d.ts +3 -0
  54. package/dist/components/icons/close.d.ts +3 -0
  55. package/dist/components/icons/code.d.ts +3 -0
  56. package/dist/components/icons/comment.d.ts +3 -0
  57. package/dist/components/icons/component.d.ts +3 -0
  58. package/dist/components/icons/constraint-left.d.ts +3 -0
  59. package/dist/components/icons/constraint-top.d.ts +3 -0
  60. package/dist/components/icons/corner-radius.d.ts +3 -0
  61. package/dist/components/icons/design.d.ts +3 -0
  62. package/dist/components/icons/draw.d.ts +3 -0
  63. package/dist/components/icons/ellipsis.d.ts +3 -0
  64. package/dist/components/icons/expand.d.ts +3 -0
  65. package/dist/components/icons/eye.d.ts +3 -0
  66. package/dist/components/icons/eyedropper.d.ts +3 -0
  67. package/dist/components/icons/figma.d.ts +3 -0
  68. package/dist/components/icons/fill-gradient.d.ts +3 -0
  69. package/dist/components/icons/fill-pattern.d.ts +3 -0
  70. package/dist/components/icons/fill-solid.d.ts +3 -0
  71. package/dist/components/icons/fixed-size.d.ts +3 -0
  72. package/dist/components/icons/flip-horizontal.d.ts +3 -0
  73. package/dist/components/icons/flip-vertical.d.ts +3 -0
  74. package/dist/components/icons/frame.d.ts +3 -0
  75. package/dist/components/icons/help.d.ts +3 -0
  76. package/dist/components/icons/image.d.ts +3 -0
  77. package/dist/components/icons/index.d.ts +84 -0
  78. package/dist/components/icons/layers-collapse.d.ts +3 -0
  79. package/dist/components/icons/letter-spacing.d.ts +3 -0
  80. package/dist/components/icons/line-height.d.ts +3 -0
  81. package/dist/components/icons/link.d.ts +3 -0
  82. package/dist/components/icons/minus.d.ts +3 -0
  83. package/dist/components/icons/move.d.ts +3 -0
  84. package/dist/components/icons/number.d.ts +3 -0
  85. package/dist/components/icons/opacity.d.ts +3 -0
  86. package/dist/components/icons/palette.d.ts +3 -0
  87. package/dist/components/icons/panel-left-close.d.ts +3 -0
  88. package/dist/components/icons/pen.d.ts +3 -0
  89. package/dist/components/icons/play.d.ts +3 -0
  90. package/dist/components/icons/plus.d.ts +3 -0
  91. package/dist/components/icons/rectangle.d.ts +3 -0
  92. package/dist/components/icons/rotate-clockwise.d.ts +3 -0
  93. package/dist/components/icons/rotation.d.ts +3 -0
  94. package/dist/components/icons/ruler.d.ts +3 -0
  95. package/dist/components/icons/search.d.ts +3 -0
  96. package/dist/components/icons/select-matching.d.ts +3 -0
  97. package/dist/components/icons/shadow-bottom-left.d.ts +3 -0
  98. package/dist/components/icons/shadow-bottom-right.d.ts +3 -0
  99. package/dist/components/icons/shadow-down.d.ts +3 -0
  100. package/dist/components/icons/shadow-left.d.ts +3 -0
  101. package/dist/components/icons/shadow-right.d.ts +3 -0
  102. package/dist/components/icons/shadow-top-left.d.ts +3 -0
  103. package/dist/components/icons/shadow-top-right.d.ts +3 -0
  104. package/dist/components/icons/shadow-up.d.ts +3 -0
  105. package/dist/components/icons/sliders.d.ts +3 -0
  106. package/dist/components/icons/string.d.ts +3 -0
  107. package/dist/components/icons/styles.d.ts +3 -0
  108. package/dist/components/icons/text-align-center.d.ts +3 -0
  109. package/dist/components/icons/text-align-left.d.ts +3 -0
  110. package/dist/components/icons/text-align-right.d.ts +3 -0
  111. package/dist/components/icons/text-vertical-align-bottom.d.ts +3 -0
  112. package/dist/components/icons/text-vertical-align-middle.d.ts +3 -0
  113. package/dist/components/icons/text-vertical-align-top.d.ts +3 -0
  114. package/dist/components/icons/text.d.ts +3 -0
  115. package/dist/components/icons/variable-mode.d.ts +3 -0
  116. package/dist/components/icons/variable.d.ts +3 -0
  117. package/dist/components/icons/video.d.ts +3 -0
  118. package/dist/components/input/index.d.ts +1 -0
  119. package/dist/components/input/input.d.ts +9 -0
  120. package/dist/components/popover/index.d.ts +1 -0
  121. package/dist/components/popover/popover.d.ts +20 -0
  122. package/dist/components/radio-group/index.d.ts +1 -0
  123. package/dist/components/radio-group/radio-group.d.ts +20 -0
  124. package/dist/components/segmented-control/index.d.ts +1 -0
  125. package/dist/components/segmented-control/segmented-control.d.ts +24 -0
  126. package/dist/components/select/index.d.ts +1 -0
  127. package/dist/components/select/select.d.ts +40 -0
  128. package/dist/components/slider/index.d.ts +1 -0
  129. package/dist/components/slider/slider.d.ts +20 -0
  130. package/dist/components/switch/index.d.ts +1 -0
  131. package/dist/components/switch/switch.d.ts +6 -0
  132. package/dist/components/tabs/index.d.ts +1 -0
  133. package/dist/components/tabs/tabs.d.ts +12 -0
  134. package/dist/components/text/index.d.ts +1 -0
  135. package/dist/components/text/text.d.ts +47 -0
  136. package/dist/components/textarea/index.d.ts +1 -0
  137. package/dist/components/textarea/textarea.d.ts +6 -0
  138. package/dist/components/tooltip/index.d.ts +1 -0
  139. package/dist/components/tooltip/tooltip.d.ts +18 -0
  140. package/dist/components/value-field/index.d.ts +10 -0
  141. package/dist/components/value-field/named-colors.d.ts +2 -0
  142. package/dist/components/value-field/types.d.ts +15 -0
  143. package/dist/components/value-field/value-field-base.d.ts +17 -0
  144. package/dist/components/value-field/value-field-elements.d.ts +31 -0
  145. package/dist/components/value-field/value-field-hex.d.ts +29 -0
  146. package/dist/components/value-field/value-field-numeric-select.d.ts +16 -0
  147. package/dist/components/value-field/value-field-numeric.d.ts +62 -0
  148. package/dist/components/value-field/value-field-scrubber.d.ts +20 -0
  149. package/dist/figma-development-theme.css +1 -1
  150. package/dist/index.cjs +4 -11
  151. package/dist/index.d.ts +39 -1004
  152. package/dist/index.mjs +17909 -2084
  153. package/dist/lib/color.d.ts +40 -0
  154. package/dist/lib/constants.d.ts +2 -0
  155. package/dist/lib/dom/focus.d.ts +14 -0
  156. package/dist/lib/dom/set-input-value.d.ts +8 -0
  157. package/dist/lib/number/clamp.d.ts +1 -0
  158. package/dist/lib/number/normalize.d.ts +13 -0
  159. package/dist/lib/react/add-class-name.d.ts +4 -0
  160. package/dist/lib/react/create-context.d.ts +14 -0
  161. package/dist/lib/react/use-compose-refs.d.ts +19 -0
  162. package/dist/lib/react/use-controllable-state.d.ts +14 -0
  163. package/dist/lib/react/use-select-on-input-click.d.ts +9 -0
  164. package/dist/styles.css +282 -23
  165. package/dist/tailwind.css +273 -0
  166. package/package.json +69 -33
  167. package/dist/tailwind.preset.js +0 -303
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import { Toggle } from '@base-ui/react/toggle';
3
+ import { ToggleGroup } from '@base-ui/react/toggle-group';
4
+ import { type TextProps as TextPrimitiveProps } from '../text';
5
+ type RootProps = Omit<ToggleGroup.Props<string>, 'defaultValue' | 'multiple' | 'onValueChange' | 'value'> & {
6
+ defaultValue?: string | undefined;
7
+ fullWidth?: boolean | undefined;
8
+ onValueChange?: ((value: string) => void) | undefined;
9
+ value?: string | undefined;
10
+ };
11
+ declare const Root: React.ForwardRefExoticComponent<Omit<RootProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
+ type ItemProps = Toggle.Props<string>;
13
+ declare const Item: React.ForwardRefExoticComponent<Omit<ItemProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
14
+ type TextProps = TextPrimitiveProps;
15
+ declare const Text: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("class-variance-authority").VariantProps<(props?: ({
16
+ size?: "small" | "medium" | "large" | null | undefined;
17
+ weight?: "strong" | "default" | null | undefined;
18
+ align?: "center" | "end" | "start" | null | undefined;
19
+ block?: boolean | null | undefined;
20
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
21
+ render?: import("@base-ui/react").useRender.RenderProp | undefined;
22
+ } & React.RefAttributes<HTMLSpanElement>>;
23
+ export type { RootProps, ItemProps, TextProps };
24
+ export { Root, Item, Text };
@@ -0,0 +1 @@
1
+ export * from './select';
@@ -0,0 +1,40 @@
1
+ import React from 'react';
2
+ import { Select as BaseSelect } from '@base-ui/react/select';
3
+ type RootProps<Value = unknown, Multiple extends boolean | undefined = false> = BaseSelect.Root.Props<Value, Multiple>;
4
+ declare const Root: typeof BaseSelect.Root;
5
+ type PortalProps = BaseSelect.Portal.Props;
6
+ declare const Portal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").SelectPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
+ type ValueProps = BaseSelect.Value.Props;
8
+ declare const Value: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").SelectValueProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
9
+ type LabelProps = BaseSelect.Label.Props;
10
+ declare const Label: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").SelectLabelProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
11
+ type ArrowProps = BaseSelect.Arrow.Props;
12
+ declare const Arrow: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").SelectArrowProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
+ type TriggerProps = BaseSelect.Trigger.Props;
14
+ declare const Trigger: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").SelectTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
15
+ type IconProps = BaseSelect.Icon.Props;
16
+ declare const Icon: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").SelectIconProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
17
+ type PositionerProps = BaseSelect.Positioner.Props;
18
+ declare const Positioner: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").SelectPositionerProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
19
+ type PopupProps = BaseSelect.Popup.Props;
20
+ declare const Popup: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").SelectPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
21
+ type ListProps = BaseSelect.List.Props;
22
+ declare const List: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").SelectListProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
23
+ type ItemProps = BaseSelect.Item.Props;
24
+ declare const Item: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").SelectItemProps, "ref"> & React.RefAttributes<HTMLElement>>;
25
+ type ItemTextProps = BaseSelect.ItemText.Props;
26
+ declare const ItemText: React.NamedExoticComponent<Omit<import("@base-ui/react").SelectItemTextProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
27
+ type ItemIndicatorProps = BaseSelect.ItemIndicator.Props;
28
+ declare const ItemIndicator: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").SelectItemIndicatorProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
29
+ type SeparatorProps = BaseSelect.Separator.Props;
30
+ declare const Separator: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").SeparatorProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
31
+ type GroupProps = BaseSelect.Group.Props;
32
+ declare const Group: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").SelectGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
33
+ type GroupLabelProps = BaseSelect.GroupLabel.Props;
34
+ declare const GroupLabel: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").SelectGroupLabelProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
35
+ type ScrollUpArrowProps = BaseSelect.ScrollUpArrow.Props;
36
+ declare const ScrollUpArrow: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").SelectScrollUpArrowProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
37
+ type ScrollDownArrowProps = BaseSelect.ScrollDownArrow.Props;
38
+ declare const ScrollDownArrow: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").SelectScrollDownArrowProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
39
+ export type { RootProps, PortalProps, ValueProps, LabelProps, TriggerProps, IconProps, PositionerProps, PopupProps, ListProps, ItemProps, ItemTextProps, ItemIndicatorProps, SeparatorProps, GroupProps, GroupLabelProps, ScrollUpArrowProps, ScrollDownArrowProps, ArrowProps, };
40
+ export { Root, Portal, Value, Label, Trigger, Icon, Positioner, Popup, List, Item, ItemText, ItemIndicator, Separator, Group, GroupLabel, ScrollUpArrow, ScrollDownArrow, Arrow, };
@@ -0,0 +1 @@
1
+ export * from './slider';
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import { Slider as BaseSlider } from '@base-ui/react/slider';
3
+ type SliderOwnProps = {
4
+ range?: boolean;
5
+ rangeAnchor?: number;
6
+ baseValue?: number;
7
+ hints?: number[];
8
+ };
9
+ type SliderProps = Omit<BaseSlider.Root.Props<number | readonly number[]>, 'children' | 'defaultValue' | 'dir' | 'minStepsBetweenValues' | 'onValueChange' | 'onValueCommitted' | 'thumbAlignment' | 'value'> & SliderOwnProps & {
10
+ defaultValue?: number[] | undefined;
11
+ dir?: 'ltr' | 'rtl' | undefined;
12
+ inverted?: boolean | undefined;
13
+ minStepsBetweenThumbs?: number | undefined;
14
+ onValueChange?: ((value: number[]) => void) | undefined;
15
+ onValueCommit?: ((value: number[]) => void) | undefined;
16
+ value?: number[] | undefined;
17
+ };
18
+ declare const Slider: React.ForwardRefExoticComponent<Omit<SliderProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
19
+ export type { SliderProps };
20
+ export { Slider };
@@ -0,0 +1 @@
1
+ export * from './switch';
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { Switch as BaseSwitch } from '@base-ui/react/switch';
3
+ type SwitchProps = BaseSwitch.Root.Props;
4
+ declare const Switch: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").SwitchRootProps, "ref"> & React.RefAttributes<HTMLElement>>;
5
+ export type { SwitchProps };
6
+ export { Switch };
@@ -0,0 +1 @@
1
+ export * from './tabs';
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { Tabs as BaseTabs } from '@base-ui/react/tabs';
3
+ type RootProps = BaseTabs.Root.Props;
4
+ declare const Root: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").TabsRootProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
+ type ListProps = BaseTabs.List.Props;
6
+ declare const List: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").TabsListProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
+ type TabProps = BaseTabs.Tab.Props;
8
+ declare const Tab: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").TabsTabProps, "ref"> & React.RefAttributes<HTMLElement>>;
9
+ type PanelProps = BaseTabs.Panel.Props;
10
+ declare const Panel: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").TabsPanelProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
11
+ export type { RootProps, ListProps, TabProps, PanelProps };
12
+ export { Root, List, Tab, Panel };
@@ -0,0 +1 @@
1
+ export * from './text';
@@ -0,0 +1,47 @@
1
+ import React from 'react';
2
+ import { useRender } from '@base-ui/react/use-render';
3
+ import type { VariantProps } from 'class-variance-authority';
4
+ declare const text: (props?: ({
5
+ size?: "small" | "medium" | "large" | null | undefined;
6
+ weight?: "strong" | "default" | null | undefined;
7
+ align?: "center" | "end" | "start" | null | undefined;
8
+ block?: boolean | null | undefined;
9
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
+ type TextProps = React.ComponentPropsWithoutRef<'span'> & VariantProps<typeof text> & {
11
+ render?: useRender.RenderProp | undefined;
12
+ };
13
+ declare const Text: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & VariantProps<(props?: ({
14
+ size?: "small" | "medium" | "large" | null | undefined;
15
+ weight?: "strong" | "default" | null | undefined;
16
+ align?: "center" | "end" | "start" | null | undefined;
17
+ block?: boolean | null | undefined;
18
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
19
+ render?: useRender.RenderProp | undefined;
20
+ } & React.RefAttributes<HTMLSpanElement>>;
21
+ type LabelProps = React.ComponentPropsWithoutRef<'label'> & VariantProps<typeof text>;
22
+ declare const Label: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & VariantProps<(props?: ({
23
+ size?: "small" | "medium" | "large" | null | undefined;
24
+ weight?: "strong" | "default" | null | undefined;
25
+ align?: "center" | "end" | "start" | null | undefined;
26
+ block?: boolean | null | undefined;
27
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
28
+ type ParagraphProps = React.ComponentPropsWithoutRef<'p'> & VariantProps<typeof text>;
29
+ declare const Paragraph: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & VariantProps<(props?: ({
30
+ size?: "small" | "medium" | "large" | null | undefined;
31
+ weight?: "strong" | "default" | null | undefined;
32
+ align?: "center" | "end" | "start" | null | undefined;
33
+ block?: boolean | null | undefined;
34
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLParagraphElement>>;
35
+ type LinkProps = React.ComponentPropsWithoutRef<'a'> & VariantProps<typeof text> & {
36
+ render?: useRender.RenderProp | undefined;
37
+ };
38
+ declare const Link: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & VariantProps<(props?: ({
39
+ size?: "small" | "medium" | "large" | null | undefined;
40
+ weight?: "strong" | "default" | null | undefined;
41
+ align?: "center" | "end" | "start" | null | undefined;
42
+ block?: boolean | null | undefined;
43
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
44
+ render?: useRender.RenderProp | undefined;
45
+ } & React.RefAttributes<HTMLAnchorElement>>;
46
+ export type { TextProps, LabelProps, ParagraphProps, LinkProps };
47
+ export { Text, Label, Paragraph, Link };
@@ -0,0 +1 @@
1
+ export * from './textarea';
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import type { TextareaAutosizeProps } from 'react-textarea-autosize';
3
+ type TextareaProps = TextareaAutosizeProps;
4
+ declare const Textarea: React.ForwardRefExoticComponent<TextareaAutosizeProps & React.RefAttributes<HTMLTextAreaElement>>;
5
+ export type { TextareaProps };
6
+ export { Textarea };
@@ -0,0 +1 @@
1
+ export * from './tooltip';
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { Tooltip as BaseTooltip } from '@base-ui/react/tooltip';
3
+ type TooltipProviderProps = BaseTooltip.Provider.Props & {
4
+ disableHoverablePopup?: boolean | undefined;
5
+ };
6
+ declare const TooltipProvider: (props: TooltipProviderProps) => import("react/jsx-runtime").JSX.Element;
7
+ type TooltipPositioningProps = Pick<BaseTooltip.Positioner.Props, 'align' | 'alignOffset' | 'anchor' | 'arrowPadding' | 'collisionAvoidance' | 'collisionBoundary' | 'collisionPadding' | 'disableAnchorTracking' | 'positionMethod' | 'side' | 'sideOffset' | 'sticky'>;
8
+ type TooltipRootProps = Pick<BaseTooltip.Root.Props, 'defaultOpen' | 'disableHoverablePopup' | 'disabled' | 'onOpenChange' | 'onOpenChangeComplete' | 'open' | 'trackCursorAxis'>;
9
+ type TooltipTriggerProps = Pick<BaseTooltip.Trigger.Props, 'closeDelay' | 'closeOnClick' | 'delay'>;
10
+ type TooltipProps = Omit<BaseTooltip.Popup.Props, 'children' | 'content'> & TooltipPositioningProps & TooltipRootProps & TooltipTriggerProps & {
11
+ children: NonNullable<BaseTooltip.Trigger.Props['render']>;
12
+ container?: BaseTooltip.Portal.Props['container'] | undefined;
13
+ content: React.ReactNode;
14
+ keepMounted?: BaseTooltip.Portal.Props['keepMounted'] | undefined;
15
+ };
16
+ declare const Tooltip: React.ForwardRefExoticComponent<Omit<TooltipProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
17
+ export { TooltipProvider, Tooltip };
18
+ export type { TooltipProps, TooltipProviderProps };
@@ -0,0 +1,10 @@
1
+ export { Multi, Root, Label } from './value-field-elements';
2
+ export { Numeric } from './value-field-numeric';
3
+ export { NumericSelect } from './value-field-numeric-select';
4
+ export { Hex } from './value-field-hex';
5
+ export { Scrubber } from './value-field-scrubber';
6
+ export type { MultiProps, RootProps, LabelProps } from './value-field-elements';
7
+ export type { NumericProps } from './value-field-numeric';
8
+ export type { NumericSelectProps } from './value-field-numeric-select';
9
+ export type { HexProps } from './value-field-hex';
10
+ export type { ScrubberProps } from './value-field-scrubber';
@@ -0,0 +1,2 @@
1
+ import type { RGB } from '../../lib/color';
2
+ export declare const namedColors: Record<string, RGB>;
@@ -0,0 +1,15 @@
1
+ type ParserResult<V> = {
2
+ valid: true;
3
+ value: V;
4
+ } | {
5
+ valid: false;
6
+ };
7
+ type IncrementTargets = Record<string, boolean> | null;
8
+ type Formatter<V> = {
9
+ parse: (input: string, value: V) => ParserResult<V>;
10
+ format: (value: V) => string;
11
+ incrementBy?: (value: V, amount: number, incrementTargets: IncrementTargets) => V;
12
+ getIncrementTargets?: (element: HTMLInputElement) => IncrementTargets;
13
+ getIncrementSelection?: (incrementTargets: IncrementTargets) => [start: number, end: number];
14
+ };
15
+ export type { IncrementTargets, Formatter, ParserResult };
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import type { InputProps } from '../input';
3
+ import type { Formatter } from './types';
4
+ type BaseProps<V> = Omit<InputProps, 'value' | 'onChange'> & {
5
+ value: V;
6
+ onChange: (value: V) => void;
7
+ inputRef?: React.Ref<HTMLInputElement>;
8
+ smallNudge?: number;
9
+ bigNudge?: number;
10
+ formatter: Formatter<V>;
11
+ };
12
+ declare const Base: {
13
+ <V>(props: BaseProps<V>): import("react/jsx-runtime").JSX.Element;
14
+ displayName: string;
15
+ };
16
+ export type { BaseProps };
17
+ export { Base };
@@ -0,0 +1,31 @@
1
+ import React from 'react';
2
+ type ValueFieldScrubTarget = {
3
+ disabled: boolean;
4
+ inputRef: React.RefObject<HTMLInputElement>;
5
+ startScrub: () => void;
6
+ scrub: (movementX: number, event: PointerEvent) => void;
7
+ };
8
+ type ValueFieldContext = {
9
+ disabled?: boolean;
10
+ scrubbing: boolean;
11
+ scrubTargetsRef: React.MutableRefObject<ValueFieldScrubTarget[]>;
12
+ registerScrubTarget: (target: ValueFieldScrubTarget | null) => () => void;
13
+ setScrubbing: (scrubbing: boolean) => void;
14
+ };
15
+ declare const useValueFieldContext: (consumerName: string) => ValueFieldContext | null;
16
+ type RootProps = React.ComponentPropsWithoutRef<'label'> & {
17
+ disabled?: boolean;
18
+ };
19
+ declare const Root: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & {
20
+ disabled?: boolean;
21
+ } & React.RefAttributes<HTMLLabelElement>>;
22
+ type MultiProps = React.ComponentPropsWithoutRef<'div'> & {
23
+ disabled?: boolean;
24
+ };
25
+ declare const Multi: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
26
+ disabled?: boolean;
27
+ } & React.RefAttributes<HTMLDivElement>>;
28
+ type LabelProps = React.ComponentPropsWithoutRef<'span'>;
29
+ declare const Label: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
30
+ export type { RootProps, LabelProps, MultiProps, ValueFieldContext, ValueFieldScrubTarget };
31
+ export { Root, Label, Multi, useValueFieldContext };
@@ -0,0 +1,29 @@
1
+ import React from 'react';
2
+ import type { RGBA } from '../../lib/color';
3
+ import type { InputProps } from '../input';
4
+ type HexProps = Omit<InputProps, 'value' | 'onChange'> & {
5
+ /** Color in Figma's normalized RGBA format */
6
+ value: RGBA;
7
+ /** Callback to call upon submission. */
8
+ onChange: (value: RGBA) => void;
9
+ /**
10
+ * Ignores the alpha channel in user input, treating it as opaque. Useful when rendering without an alpha field.
11
+ * Results in 'onChange' always being called with an alpha value of 1.
12
+ * @default false
13
+ * */
14
+ ignoreAlpha?: boolean;
15
+ };
16
+ declare const Hex: React.ForwardRefExoticComponent<Omit<InputProps, "onChange" | "value"> & {
17
+ /** Color in Figma's normalized RGBA format */
18
+ value: RGBA;
19
+ /** Callback to call upon submission. */
20
+ onChange: (value: RGBA) => void;
21
+ /**
22
+ * Ignores the alpha channel in user input, treating it as opaque. Useful when rendering without an alpha field.
23
+ * Results in 'onChange' always being called with an alpha value of 1.
24
+ * @default false
25
+ * */
26
+ ignoreAlpha?: boolean;
27
+ } & React.RefAttributes<HTMLInputElement>>;
28
+ export type { HexProps };
29
+ export { Hex };
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import type { NumericProps } from './value-field-numeric';
3
+ type NumericSelectProps = Omit<NumericProps, 'className' | 'style'> & {
4
+ options: readonly number[];
5
+ className?: string;
6
+ style?: React.CSSProperties;
7
+ triggerLabel?: string;
8
+ };
9
+ declare const NumericSelect: React.ForwardRefExoticComponent<Omit<NumericProps, "className" | "style"> & {
10
+ options: readonly number[];
11
+ className?: string;
12
+ style?: React.CSSProperties;
13
+ triggerLabel?: string;
14
+ } & React.RefAttributes<HTMLInputElement>>;
15
+ export type { NumericSelectProps };
16
+ export { NumericSelect };
@@ -0,0 +1,62 @@
1
+ import React from 'react';
2
+ import type { InputProps } from '../input';
3
+ type NumericProps = Omit<InputProps, 'value' | 'onChange' | 'min' | 'max' | 'type'> & {
4
+ /** The numeric value of the input. */
5
+ value: number;
6
+ /** Callback to call upon submission. */
7
+ onChange: (value: number) => void;
8
+ /** The minimum allowed value. */
9
+ min?: number;
10
+ /** The maximum allowed value. */
11
+ max?: number;
12
+ /** The numeric range that the `value` prop will be normalized to when displayed in the input.
13
+ * Requires non-equal 'max' and 'min' values.
14
+ * @example:
15
+ * <Numeric value={0.5} min={0} max={1} targetRange={[0, 100]} /> // Displays value of 50
16
+ * */
17
+ targetRange?: [number, number];
18
+ /** The decimal precision that user input will be rounded to. */
19
+ precision?: number;
20
+ /** Units that will be accepted as valid input (e.g., "px", "%"). */
21
+ allowedUnits?: string[];
22
+ /** Suffix to be appended to the value (e.g., "px", "%"). Suffix is treated as an allowed unit. */
23
+ suffix?: string;
24
+ /** The small nudge increment for the value. */
25
+ smallNudge?: number;
26
+ /** The big nudge increment for the value. */
27
+ bigNudge?: number;
28
+ };
29
+ declare const Numeric: React.ForwardRefExoticComponent<Omit<InputProps, "onChange" | "value" | "max" | "min" | "type"> & {
30
+ /** The numeric value of the input. */
31
+ value: number;
32
+ /** Callback to call upon submission. */
33
+ onChange: (value: number) => void;
34
+ /** The minimum allowed value. */
35
+ min?: number;
36
+ /** The maximum allowed value. */
37
+ max?: number;
38
+ /** The numeric range that the `value` prop will be normalized to when displayed in the input.
39
+ * Requires non-equal 'max' and 'min' values.
40
+ * @example:
41
+ * <Numeric value={0.5} min={0} max={1} targetRange={[0, 100]} /> // Displays value of 50
42
+ * */
43
+ targetRange?: [number, number];
44
+ /** The decimal precision that user input will be rounded to. */
45
+ precision?: number;
46
+ /** Units that will be accepted as valid input (e.g., "px", "%"). */
47
+ allowedUnits?: string[];
48
+ /** Suffix to be appended to the value (e.g., "px", "%"). Suffix is treated as an allowed unit. */
49
+ suffix?: string;
50
+ /** The small nudge increment for the value. */
51
+ smallNudge?: number;
52
+ /** The big nudge increment for the value. */
53
+ bigNudge?: number;
54
+ } & React.RefAttributes<HTMLInputElement>>;
55
+ declare function evaluateExpression(params: {
56
+ expression: string;
57
+ displayValue: number;
58
+ suffix?: string;
59
+ allowedUnits?: string[];
60
+ }): number;
61
+ export type { NumericProps };
62
+ export { Numeric, evaluateExpression };
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Adapted from Base UI NumberFieldScrubArea.
3
+ * MIT license, Copyright (c) 2019 Material-UI SAS.
4
+ * https://github.com/mui/base-ui/blob/master/packages/react/src/number-field/scrub-area/NumberFieldScrubArea.tsx
5
+ * */
6
+ import React from 'react';
7
+ type ScrubberProps = React.ComponentPropsWithoutRef<'span'> & {
8
+ /** The number of horizontal pixels the pointer must move before the value changes. */
9
+ pixelSensitivity?: number;
10
+ /** Expands the cursor wrap boundary around the scrubber by half this distance on each side. */
11
+ teleportDistance?: number;
12
+ };
13
+ declare const Scrubber: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
14
+ /** The number of horizontal pixels the pointer must move before the value changes. */
15
+ pixelSensitivity?: number;
16
+ /** Expands the cursor wrap boundary around the scrubber by half this distance on each side. */
17
+ teleportDistance?: number;
18
+ } & React.RefAttributes<HTMLSpanElement>>;
19
+ export type { ScrubberProps };
20
+ export { Scrubber };
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * FOR DEVELOPMENT PURPOSES ONLY.
3
- * Use this file in non-figma plugin environments, e.g. Storybook to ensure base styles and color tokens are accessible to components.
3
+ * Use this file in non-figma plugin environments to ensure base styles and color tokens are accessible to components.
4
4
  * This file doesn't need to be imported into Plugin UI.
5
5
  * https://www.figma.com/plugin-docs/css-variables/
6
6
  */