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,40 @@
1
+ type WithAlpha<T> = T & {
2
+ a: number;
3
+ };
4
+ type RGB = {
5
+ r: number;
6
+ g: number;
7
+ b: number;
8
+ };
9
+ type HSV = {
10
+ h: number;
11
+ s: number;
12
+ v: number;
13
+ };
14
+ type HSL = {
15
+ h: number;
16
+ s: number;
17
+ l: number;
18
+ };
19
+ type RGBA = WithAlpha<RGB>;
20
+ type HSVA = WithAlpha<HSV>;
21
+ type HSLA = WithAlpha<HSL>;
22
+ type HEX = string;
23
+ type P3String = `color(display-p3 ${number} ${number} ${number}${` / ${number}` | ''})`;
24
+ type RGBString = `rgb(${number} ${number} ${number}${` / ${number}` | ''})`;
25
+ declare function rgbaToHex({ r, g, b, a }: RGBA): HEX;
26
+ declare function hslaToHex(hsla: HSLA): HEX;
27
+ declare function hsvaToHex(hsla: HSVA): HEX;
28
+ declare function rgbaToHsva({ r, g, b, a }: RGBA): HSVA;
29
+ declare function hsvaToRgba({ h, s, v, a }: HSVA): RGBA;
30
+ declare function hslaToHsva({ h, s, l, a }: HSLA): HSVA;
31
+ declare function hsvaToHsla({ h, s, v, a }: HSVA): HSLA;
32
+ declare function hslaToRgba(hsla: HSLA): RGBA;
33
+ declare function rgbaToHsla(rgba: RGBA): HSLA;
34
+ declare function rgbaToP3String(color: RGBA): P3String;
35
+ declare function rgbaToCssString(color: RGBA): RGBString;
36
+ declare function blendWithWhite(color: RGBA): RGBA;
37
+ declare function roundHsva(hsva: HSVA): HSVA;
38
+ declare function roundHsla(hsla: HSLA): HSLA;
39
+ export type { RGB, HSV, HSL, RGBA, HSVA, HSLA, HEX, P3String, RGBString };
40
+ export { rgbaToHex, rgbaToHsva, hsvaToRgba, hslaToHsva, hsvaToHsla, hslaToRgba, rgbaToHsla, rgbaToP3String, rgbaToCssString, blendWithWhite, roundHsva, roundHsla, hslaToHex, hsvaToHex, };
@@ -0,0 +1,2 @@
1
+ export declare const DEFAULT_SMALL_NUDGE = 1;
2
+ export declare const DEFAULT_BIG_NUDGE = 10;
@@ -0,0 +1,14 @@
1
+ type FocusableTarget = HTMLElement | {
2
+ focus(): void;
3
+ };
4
+ /**
5
+ * Focus a given element and optionally select its content if it is a selectable input.
6
+ *
7
+ * @param element - The element to focus. Optional.
8
+ * @param options
9
+ * @param options.select - Whether to select the content of the element if it is a selectable input (default: false).
10
+ */
11
+ export declare function focus(element?: FocusableTarget | null, { select }?: {
12
+ select?: boolean | undefined;
13
+ }): void;
14
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Set the value of an HTMLInputElement and optionally dispatch an input event.
3
+ *
4
+ * @param inputElement - The HTMLInputElement to set the value for.
5
+ * @param value - The value to set on the input element.
6
+ * @param dispatchEvent - Whether to dispatch an input event (default: true).
7
+ */
8
+ export declare const setInputElementValue: (inputElement: HTMLInputElement | null, value: string, dispatchEvent?: boolean) => void;
@@ -0,0 +1 @@
1
+ export declare function clamp(value: number, min: number, max?: number): number;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Map a value to a specified range.
3
+ * https://stats.stackexchange.com/a/281164
4
+ *
5
+ * @param sourceRange {[number, number]} - input range
6
+ * @param targetRange {[number, number]} - The target range to map the value to
7
+ * @return {function(number): number} A function that takes a number and maps it to the specified range
8
+ *
9
+ * @example:
10
+ * normalize([0, 1], [0, 100])(0.5) -> 50
11
+ * normalize([0, 1], [0, 255])(1) -> 255
12
+ */
13
+ export declare function normalize(sourceRange: [number, number], targetRange: [number, number]): (value: number) => number;
@@ -0,0 +1,4 @@
1
+ type ClassName<State> = string | ((state: State) => string | undefined) | undefined;
2
+ declare function addClassName<State>(className: ClassName<State>, value: string): ClassName<State>;
3
+ export type { ClassName };
4
+ export { addClassName };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @license
3
+ * MIT License
4
+ * Copyright (c) 2022 WorkOS
5
+ * https://github.com/radix-ui/primitives/blob/main/LICENSE
6
+ * */
7
+ import React from 'react';
8
+ declare function createContext<ContextValueType extends object | null>(rootComponentName: string, defaultContext?: ContextValueType): readonly [{
9
+ (props: ContextValueType & {
10
+ children: React.ReactNode;
11
+ }): import("react/jsx-runtime").JSX.Element;
12
+ displayName: string;
13
+ }, (consumerName: string) => ContextValueType];
14
+ export { createContext };
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @license
3
+ * MIT License
4
+ * Copyright (c) 2022 WorkOS
5
+ * https://github.com/radix-ui/primitives/blob/main/LICENSE
6
+ * */
7
+ import * as React from 'react';
8
+ type PossibleRef<T> = React.Ref<T> | undefined;
9
+ /**
10
+ * A utility to compose multiple refs together
11
+ * Accepts callback refs and RefObject(s)
12
+ */
13
+ declare function composeRefs<T>(...refs: PossibleRef<T>[]): (node: T) => void;
14
+ /**
15
+ * A custom hook that composes multiple refs
16
+ * Accepts callback refs and RefObject(s)
17
+ */
18
+ declare function useComposedRefs<T>(...refs: PossibleRef<T>[]): (node: T) => void;
19
+ export { composeRefs, useComposedRefs };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @license
3
+ * MIT License
4
+ * Copyright (c) 2022 WorkOS
5
+ * https://github.com/radix-ui/primitives/blob/main/LICENSE
6
+ * */
7
+ import * as React from 'react';
8
+ type UseControllableStateParams<T> = {
9
+ prop?: T | undefined;
10
+ defaultProp?: T | undefined;
11
+ onChange?: (state: T) => void;
12
+ };
13
+ declare function useControllableState<T>({ prop, defaultProp, onChange }: UseControllableStateParams<T>): readonly [T | undefined, React.Dispatch<React.SetStateAction<T | undefined>>];
14
+ export { useControllableState };
@@ -0,0 +1,9 @@
1
+ import type React from 'react';
2
+ /**
3
+ * Selects the target element's contents on click, unless the user is selecting manually.
4
+ * */
5
+ export declare function useSelectOnInputClick(): {
6
+ onMouseLeave: () => void;
7
+ onMouseUp: (event: React.MouseEvent<HTMLInputElement>) => void;
8
+ onFocus: () => void;
9
+ };
package/dist/styles.css CHANGED
@@ -79,15 +79,16 @@
79
79
  --letter-spacing-10: -0.0255rem;
80
80
  --letter-spacing-default: var(--letter-spacing-3);
81
81
  }
82
- :root {
82
+ :root,
83
+ .light,
84
+ .light-theme {
83
85
  --elevation-100: 0px 0px 0.5px rgba(0, 0, 0, 0.3), 0px 1px 3px rgba(0, 0, 0, 0.15);
84
86
  --elevation-200: 0px 0px 0.5px rgba(0, 0, 0, 0.18), 0px 3px 8px rgba(0, 0, 0, 0.1), 0px 1px 3px rgba(0, 0, 0, 0.1);
85
87
  --elevation-300: 0px 0px 0.5px rgba(0, 0, 0, 0.15), 0px 5px 12px rgba(0, 0, 0, 0.13), 0px 1px 3px rgba(0, 0, 0, 0.1);
86
88
  --elevation-400: 0px 0px 0.5px rgba(0, 0, 0, 0.12), 0px 10px 16px rgba(0, 0, 0, 0.12), 0px 2px 5px rgba(0, 0, 0, 0.15);
87
89
  --elevation-500: 0px 0px 0.5px rgba(0, 0, 0, 0.08), 0px 10px 24px rgba(0, 0, 0, 0.18), 0px 2px 5px rgba(0, 0, 0, 0.15);
88
90
  }
89
- .dark,
90
- .dark-theme {
91
+ .figma-dark {
91
92
  --elevation-100: 0px 0px 0.5px rgba(0, 0, 0, 0.5), 0px 1px 3px rgba(0, 0, 0, 0.4),
92
93
  inset 0px 0.5px 0px rgba(255, 255, 255, 0.1), inset 0px 0px 0.5px rgba(255, 255, 255, 0.3);
93
94
 
@@ -113,7 +114,7 @@
113
114
  --color-text-menu-tertiary: var(--figma-color-text-oncomponent-tertiary);
114
115
  --color-icon-menu: var(--figma-color-icon-oncomponent);
115
116
  --shadow-menu: var(--elevation-400);
116
- --font-size-menu: 12px;
117
+ --font-size-menu: var(--font-size-3);
117
118
 
118
119
  --color-bg-tooltip: #1e1e1e;
119
120
  --color-text-tooltip: #fff;
@@ -522,6 +523,7 @@
522
523
  .fp-ValueFieldRoot {
523
524
  box-sizing: border-box;
524
525
  display: flex;
526
+ position: relative;
525
527
  align-items: center;
526
528
  border-radius: var(--radius-medium);
527
529
  padding: 0 1px;
@@ -551,6 +553,52 @@
551
553
  cursor: default;
552
554
  outline: 0;
553
555
  }
556
+ .fp-ValueFieldScrubber {
557
+ display: flex;
558
+ align-items: center;
559
+ align-self: stretch;
560
+ flex-shrink: 0;
561
+ cursor: ew-resize;
562
+ color: var(--figma-color-text-secondary);
563
+ --color-icon: var(--figma-color-icon-secondary);
564
+ }
565
+ .fp-ValueFieldScrubber:empty {
566
+ position: absolute;
567
+ top: 0;
568
+ bottom: 0;
569
+ left: 0;
570
+ z-index: 1;
571
+ width: var(--space-6);
572
+ }
573
+ .fp-ValueFieldScrubber[data-disabled] {
574
+ cursor: default;
575
+ color: var(--figma-color-text-disabled);
576
+ --color-icon: var(--figma-color-icon-disabled);
577
+ }
578
+ .fp-ValueFieldScrubber:not(:empty) + .fp-ValueFieldBase {
579
+ padding-left: 0;
580
+ }
581
+ .fp-ValueFieldScrubber .fp-ValueFieldLabel:last-child {
582
+ width: var(--space-6);
583
+ }
584
+ .fp-ValueFieldScrubberCursor {
585
+ position: fixed;
586
+ top: 0;
587
+ left: 0;
588
+ z-index: 2147483647;
589
+ width: 26px;
590
+ height: 14px;
591
+ pointer-events: none;
592
+ color: var(--figma-color-text-oninverse);
593
+ filter: drop-shadow(0 1px 1px var(--figma-color-bg-inverse));
594
+ }
595
+ .fp-ValueFieldScrubberCursorIcon {
596
+ display: block;
597
+ width: 26px;
598
+ height: 14px;
599
+ fill: var(--figma-color-bg-inverse);
600
+ stroke: var(--figma-color-text-oninverse);
601
+ }
554
602
  .fp-ValueFieldLabel {
555
603
  display: flex;
556
604
  align-items: center;
@@ -577,6 +625,7 @@
577
625
  }
578
626
  .fp-ValueFieldMulti {
579
627
  display: flex;
628
+ position: relative;
580
629
  border-radius: var(--radius-medium);
581
630
  outline-offset: -1px;
582
631
  box-sizing: border-box;
@@ -617,6 +666,70 @@
617
666
  background-color: transparent;
618
667
  padding-left: calc(var(--space-2) - 1px);
619
668
  }
669
+ .fp-ValueFieldNumericSelect {
670
+ width: 100%;
671
+ }
672
+ .fp-ValueFieldNumericSelect:hover:where(:not([data-disabled])) {
673
+ border-color: transparent;
674
+ }
675
+ .fp-ValueFieldNumericSelect:has(.fp-ValueFieldNumericSelectField:hover):where(:not([data-disabled])) {
676
+ border-color: var(--figma-color-border);
677
+ }
678
+ .fp-ValueFieldNumericSelect .fp-ValueFieldNumericSelectField {
679
+ min-width: 0;
680
+ }
681
+ .fp-ValueFieldNumericSelectTrigger {
682
+ all: unset;
683
+ appearance: none;
684
+ box-sizing: border-box;
685
+ align-self: flex-start;
686
+ display: flex;
687
+ align-items: center;
688
+ justify-content: center;
689
+ flex: 0 0 var(--space-6);
690
+ height: var(--space-6);
691
+ margin-top: -1px;
692
+ border-left: 1px solid var(--figma-color-bg);
693
+ border-top-right-radius: var(--radius-medium);
694
+ border-bottom-right-radius: var(--radius-medium);
695
+ color: var(--figma-color-text);
696
+ --color-icon: var(--figma-color-icon);
697
+ }
698
+ .fp-ValueFieldNumericSelectTrigger:hover:where(:not(:disabled)) {
699
+ background-color: var(--figma-color-bg-tertiary);
700
+ }
701
+ .fp-ValueFieldNumericSelectTrigger:disabled {
702
+ color: var(--figma-color-text-disabled);
703
+ --color-icon: var(--figma-color-icon-disabled);
704
+ }
705
+ .fp-ValueFieldNumericSelectTrigger > span:first-child {
706
+ position: absolute;
707
+ left: var(--space-2);
708
+ top: 0;
709
+ width: 0;
710
+ height: var(--space-6);
711
+ overflow: hidden;
712
+ opacity: 0;
713
+ pointer-events: none;
714
+ white-space: nowrap;
715
+ }
716
+ .fp-ValueFieldNumericSelectPositioner {
717
+ display: flex;
718
+ flex-direction: column;
719
+ min-width: calc(var(--anchor-width) + var(--space-6) - 2px);
720
+ min-height: calc(var(--available-height) + var(--space-6) - 2px);
721
+ }
722
+ .fp-ValueFieldNumericSelectPositionerInOptions {
723
+ margin-top: calc(var(--space-2) + 1px) !important;
724
+ }
725
+ .fp-ValueFieldNumericSelectIcon {
726
+ display: flex;
727
+ align-items: center;
728
+ justify-content: center;
729
+ }
730
+ .fp-ValueFieldNumericSelectCurrentItem {
731
+ background-color: var(--color-bg-menu-selected);
732
+ }
620
733
  .fp-tooltip {
621
734
  box-sizing: border-box;
622
735
  padding: var(--space-1) var(--space-2);
@@ -637,8 +750,22 @@
637
750
  fill: var(--color-bg-tooltip);
638
751
  width: var(--space-3_5);
639
752
  height: 7px;
640
- position: relative;
641
- bottom: 1px;
753
+ position: absolute;
754
+ }
755
+ .fp-tooltip-arrow[data-side='top'] {
756
+ top: calc(100% - 1px);
757
+ }
758
+ .fp-tooltip-arrow[data-side='bottom'] {
759
+ bottom: calc(100% - 1px);
760
+ transform: rotate(180deg);
761
+ }
762
+ .fp-tooltip-arrow[data-side='left'] {
763
+ left: calc(100% - 1px);
764
+ transform: rotate(-90deg);
765
+ }
766
+ .fp-tooltip-arrow[data-side='right'] {
767
+ right: calc(100% - 1px);
768
+ transform: rotate(90deg);
642
769
  }
643
770
  .fp-textarea {
644
771
  all: unset;
@@ -690,6 +817,7 @@
690
817
  letter-spacing: var(--letter-spacing-default);
691
818
  color: var(--color-text-menu);
692
819
  box-shadow: var(--elevation-400);
820
+ outline: 0;
693
821
  }
694
822
  .fp-MenuItem {
695
823
  position: relative;
@@ -718,7 +846,7 @@
718
846
  display: flex;
719
847
  align-items: center;
720
848
  height: var(--space-6);
721
- padding: 0 var(--space-4);
849
+ padding: 0 var(--space-2);
722
850
  color: var(--color-text-menu-tertiary);
723
851
  }
724
852
  .fp-MenuLabel:where(.fp-MenuContent:has(.fp-MenuCheckboxItem, .fp-MenuRadioItem) .fp-MenuLabel) {
@@ -772,6 +900,11 @@
772
900
  .fp-SelectTriggerIcon {
773
901
  margin-left: auto;
774
902
  }
903
+ .fp-SelectPositioner {
904
+ display: flex;
905
+ flex-direction: column;
906
+ min-width: calc(var(--anchor-width) + var(--space-6) - 1px);
907
+ }
775
908
  .fp-SelectScrollUpButton,
776
909
  .fp-SelectScrollDownButton {
777
910
  position: absolute;
@@ -796,6 +929,117 @@
796
929
  bottom: 0;
797
930
  border-radius: 0 0 var(--radius-large) var(--radius-large);
798
931
  }
932
+ .fp-ComboboxTrigger {
933
+ cursor: default;
934
+ }
935
+ .fp-ComboboxTrigger:focus-visible {
936
+ border-color: var(--figma-color-border-selected);
937
+ }
938
+ .fp-ComboboxTrigger[data-disabled] {
939
+ color: var(--figma-color-text-disabled);
940
+ border-color: var(--figma-color-border-disabled);
941
+ }
942
+ .fp-ComboboxPositioner {
943
+ display: flex;
944
+ flex-direction: column;
945
+ min-width: var(--anchor-width);
946
+ max-width: min(var(--available-width), 24rem);
947
+ }
948
+ .fp-ComboboxPopup {
949
+ box-sizing: border-box;
950
+ display: flex;
951
+ flex-direction: column;
952
+ gap: var(--space-2);
953
+ max-height: min(var(--available-height), 20rem);
954
+ min-width: var(--anchor-width);
955
+ padding: var(--space-2);
956
+ background-color: var(--figma-color-bg);
957
+ border-radius: var(--radius-large);
958
+ box-shadow: var(--elevation-500);
959
+ color: var(--figma-color-text);
960
+ font-family: var(--font-family-default);
961
+ font-size: var(--font-size-default);
962
+ font-weight: var(--font-weight-default);
963
+ letter-spacing: var(--letter-spacing-default);
964
+ outline: 0;
965
+ overflow: auto;
966
+ }
967
+ .fp-ComboboxInputGroup {
968
+ box-sizing: border-box;
969
+ position: relative;
970
+ flex-shrink: 0;
971
+ --color-icon: var(--figma-color-icon-secondary);
972
+ }
973
+ .fp-ComboboxInputGroup > .fp-Icon {
974
+ position: absolute;
975
+ top: 50%;
976
+ left: var(--space-2);
977
+ z-index: 1;
978
+ transform: translateY(-50%);
979
+ }
980
+ .fp-ComboboxInputGroup:has(.fp-ComboboxInput:disabled) {
981
+ --color-icon: var(--figma-color-icon-disabled);
982
+ }
983
+ .fp-ComboboxInput {
984
+ min-width: 0;
985
+ padding-left: calc(var(--space-2) + var(--space-6) + var(--space-1));
986
+ padding-right: var(--space-6);
987
+ }
988
+ .fp-ComboboxList {
989
+ display: flex;
990
+ flex-direction: column;
991
+ }
992
+ .fp-ComboboxItem {
993
+ width: 100%;
994
+ box-sizing: border-box;
995
+ color: var(--figma-color-text);
996
+ line-height: var(--line-height-default);
997
+ }
998
+ .fp-ComboboxItem[data-selected] {
999
+ background-color: var(--figma-color-bg-selected-secondary);
1000
+ }
1001
+ .fp-ComboboxItem[data-highlighted] {
1002
+ background-color: var(--figma-color-bg-hover);
1003
+ }
1004
+ .fp-ComboboxItem[data-selected][data-highlighted] {
1005
+ background-color: var(--figma-color-bg-selected);
1006
+ }
1007
+ .fp-ComboboxItem[data-disabled] {
1008
+ color: var(--figma-color-text-disabled);
1009
+ }
1010
+ .fp-ComboboxItemIndicator {
1011
+ --color-icon: var(--figma-color-icon);
1012
+ }
1013
+ .fp-ComboboxMessage {
1014
+ display: flex;
1015
+ align-items: center;
1016
+ min-height: var(--space-6);
1017
+ padding: 0 var(--space-2);
1018
+ color: var(--figma-color-text-secondary);
1019
+ }
1020
+ .fp-ComboboxMessage:empty {
1021
+ min-height: 0;
1022
+ padding: 0;
1023
+ }
1024
+ .fp-ComboboxClear.fp-IconButton,
1025
+ .fp-ComboboxSearchClear.fp-IconButton {
1026
+ --color-icon: var(--figma-color-icon-secondary);
1027
+ }
1028
+ .fp-ComboboxClear.fp-IconButton:hover, .fp-ComboboxSearchClear.fp-IconButton:hover {
1029
+ background-color: transparent;
1030
+ --color-icon: var(--figma-color-icon-secondary-hover);
1031
+ }
1032
+ .fp-ComboboxClear.fp-IconButton[data-disabled] {
1033
+ --color-icon: var(--figma-color-icon-disabled);
1034
+ }
1035
+ .fp-ComboboxSearchClear.fp-IconButton {
1036
+ position: absolute;
1037
+ top: 0;
1038
+ right: 0;
1039
+ }
1040
+ .fp-ComboboxInput:placeholder-shown + .fp-ComboboxSearchClear.fp-IconButton {
1041
+ display: none;
1042
+ }
799
1043
  .fp-Button {
800
1044
  box-sizing: border-box;
801
1045
  background-clip: border-box;
@@ -819,6 +1063,7 @@
819
1063
  letter-spacing: var(--letter-spacing-default);
820
1064
  line-height: var(--line-height-default);
821
1065
  border-radius: var(--radius-medium);
1066
+ --color-icon: currentColor;
822
1067
  }
823
1068
  .fp-Button:where(.fp-variant-secondary) {
824
1069
  --button-color-bg: transparent;
@@ -964,11 +1209,11 @@
964
1209
  width: var(--space-8);
965
1210
  height: var(--space-8);
966
1211
  }
967
- .fp-IconButton[data-state='open']:where(.fp-active-appearance-subtle) {
1212
+ .fp-IconButton:where(.fp-active-appearance-subtle):where([data-state='open'], [data-popup-open]) {
968
1213
  background-color: var(--figma-color-bg-selected);
969
1214
  --color-icon: var(--figma-color-icon-brand);
970
1215
  }
971
- .fp-IconButton[data-state='open']:where(.fp-active-appearance-solid) {
1216
+ .fp-IconButton:where(.fp-active-appearance-solid):where([data-state='open'], [data-popup-open]) {
972
1217
  background-color: var(--figma-color-bg-selected-strong);
973
1218
  --color-icon: var(--figma-color-icon-onbrand);
974
1219
  }
@@ -996,10 +1241,10 @@
996
1241
  background: none;
997
1242
  content: '';
998
1243
  }
999
- .fp-switchRoot[data-state='unchecked']::before {
1244
+ .fp-switchRoot[data-unchecked]::before {
1000
1245
  background: var(--figma-color-bg-tertiary);
1001
1246
  }
1002
- .fp-switchRoot[data-state='checked']::before {
1247
+ .fp-switchRoot[data-checked]::before {
1003
1248
  background: var(--figma-color-bg-brand);
1004
1249
  }
1005
1250
  .fp-switchRoot:focus-visible {
@@ -1009,12 +1254,12 @@
1009
1254
  .fp-switchRoot:focus-visible::before {
1010
1255
  inset: 2px;
1011
1256
  }
1012
- .fp-switchRoot[data-disabled][data-state='unchecked']::before {
1257
+ .fp-switchRoot[data-disabled][data-unchecked]::before {
1013
1258
  /* This gives it more contrast than the disabled checked state but this is
1014
1259
  how it is in Figma. ¯\_(ツ)_/¯ */
1015
1260
  background: var(--figma-color-bg-disabled);
1016
1261
  }
1017
- .fp-switchRoot[data-disabled][data-state='checked']::before {
1262
+ .fp-switchRoot[data-disabled][data-checked]::before {
1018
1263
  background: var(--figma-color-bg-tertiary);
1019
1264
  }
1020
1265
  .fp-switchThumb {
@@ -1031,10 +1276,10 @@
1031
1276
  .fp-switchThumb[data-disabled] {
1032
1277
  background-color: var(--figma-color-icon-ondisabled);
1033
1278
  }
1034
- .fp-switchThumb[data-state='unchecked'] {
1279
+ .fp-switchThumb[data-unchecked] {
1035
1280
  left: 1px;
1036
1281
  }
1037
- .fp-switchThumb[data-state='checked'] {
1282
+ .fp-switchThumb[data-checked] {
1038
1283
  left: calc(100% - var(--space-3_5) - 1px);
1039
1284
  }
1040
1285
  :root,
@@ -1068,10 +1313,22 @@
1068
1313
  width: var(--slider-root-size);
1069
1314
  border-width: calc(var(--slider-thumb-width) / 2) 0;
1070
1315
  }
1316
+ .fp-SliderControl {
1317
+ position: relative;
1318
+ display: flex;
1319
+ align-items: center;
1320
+ flex-grow: 1;
1321
+ width: 100%;
1322
+ height: 100%;
1323
+ outline: 0;
1324
+ }
1325
+ .fp-SliderRoot[data-orientation='vertical'] .fp-SliderControl {
1326
+ flex-direction: column;
1327
+ }
1071
1328
  .fp-SliderTrack {
1072
1329
  box-sizing: border-box;
1073
- position: relative;
1074
- overflow: hidden;
1330
+ position: static;
1331
+ overflow: visible;
1075
1332
  flex-grow: 1;
1076
1333
  background: var(--slider-track-bg);
1077
1334
  border-radius: var(--radius-full);
@@ -1110,6 +1367,7 @@
1110
1367
  .fp-SliderThumb {
1111
1368
  box-sizing: border-box;
1112
1369
  display: block;
1370
+ z-index: 1;
1113
1371
  width: var(--slider-track-size);
1114
1372
  height: var(--slider-track-size);
1115
1373
  background-color: var(--slider-thumb-bg);
@@ -1282,11 +1540,11 @@
1282
1540
  line-height: var(--line-height-default);
1283
1541
  white-space: nowrap;
1284
1542
  }
1285
- .fp-TabsTrigger:where([data-state='inactive']) {
1543
+ .fp-TabsTrigger:where(:not([data-active])) {
1286
1544
  color: var(--figma-color-text-secondary);
1287
1545
  --color-icon: var(--figma-color-icon-secondary);
1288
1546
  }
1289
- .fp-TabsTrigger:where([data-state='active']) {
1547
+ .fp-TabsTrigger:where([data-active]) {
1290
1548
  font-weight: var(--font-weight-strong);
1291
1549
  color: var(--figma-color-text);
1292
1550
  --color-icon: var(--figma-color-icon);
@@ -1376,6 +1634,7 @@
1376
1634
  .fp-RadioGroupItem {
1377
1635
  all: unset;
1378
1636
  box-sizing: border-box;
1637
+ display: inline-block;
1379
1638
  width: 16px;
1380
1639
  height: 16px;
1381
1640
  background-color: var(--figma-color-bg);
@@ -1387,14 +1646,14 @@
1387
1646
  .fp-RadioGroupItem:focus-visible {
1388
1647
  outline-color: var(--figma-color-border-selected);
1389
1648
  }
1390
- .fp-RadioGroupItem[data-state='checked'] {
1649
+ .fp-RadioGroupItem[data-checked] {
1391
1650
  background-color: var(--figma-color-icon);
1392
1651
  border-color: var(--figma-color-bg);
1393
1652
  }
1394
1653
  .fp-RadioGroupItem[data-disabled] {
1395
1654
  outline-color: var(--figma-color-icon-disabled);
1396
1655
  }
1397
- .fp-RadioGroupItem[data-disabled][data-state='checked'] {
1656
+ .fp-RadioGroupItem[data-disabled][data-checked] {
1398
1657
  background-color: var(--figma-color-icon-disabled);
1399
1658
  }
1400
1659
  .fp-RadioGroupLabel {
@@ -1431,7 +1690,7 @@
1431
1690
  white-space: nowrap;
1432
1691
  --color-icon: var(--figma-color-icon-secondary);
1433
1692
  }
1434
- .fp-SegmentedControlItem[aria-checked='true'] {
1693
+ .fp-SegmentedControlItem[data-pressed] {
1435
1694
  --color-icon: var(--figma-color-icon);
1436
1695
  background-color: var(--figma-color-bg);
1437
1696
  box-shadow: inset 0 0 0 var(--space-px) var(--figma-color-border);
@@ -1471,7 +1730,7 @@
1471
1730
  .fp-CollapsibleIndicator {
1472
1731
  --color-icon: var(--figma-color-icon-secondary);
1473
1732
  }
1474
- [data-state='open'] > .fp-CollapsibleIndicator {
1733
+ [data-panel-open] > .fp-CollapsibleIndicator {
1475
1734
  transform: rotate(90deg);
1476
1735
  }
1477
1736
  .fp-CollapsibleContent {