figma-kit 1.0.0-beta.23 → 1.0.0-beta.25
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.
- package/LICENSE +21 -0
- package/README.md +2 -4
- package/dist/components/alert-dialog/alert-dialog.d.ts +31 -0
- package/dist/components/alert-dialog/index.d.ts +1 -0
- package/dist/components/button/button.d.ts +15 -0
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/checkbox/checkbox.d.ts +12 -0
- package/dist/components/checkbox/index.d.ts +1 -0
- package/dist/components/collapsible/collapsible.d.ts +10 -0
- package/dist/components/collapsible/index.d.ts +1 -0
- package/dist/components/color-picker/color-picker-alpha.d.ts +4 -0
- package/dist/components/color-picker/color-picker-area.d.ts +5 -0
- package/dist/components/color-picker/color-picker-hue.d.ts +4 -0
- package/dist/components/color-picker/color-picker-input.d.ts +7 -0
- package/dist/components/color-picker/color-picker.d.ts +63 -0
- package/dist/components/color-picker/index.d.ts +5 -0
- package/dist/components/combobox/combobox.d.ts +51 -0
- package/dist/components/combobox/index.d.ts +1 -0
- package/dist/components/context-menu/context-menu.d.ts +36 -0
- package/dist/components/context-menu/index.d.ts +1 -0
- package/dist/components/dialog/dialog.d.ts +25 -0
- package/dist/components/dialog/index.d.ts +1 -0
- package/dist/components/dialog.base/dialog.base.d.ts +15 -0
- package/dist/components/dialog.base/index.d.ts +1 -0
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +36 -0
- package/dist/components/dropdown-menu/index.d.ts +1 -0
- package/dist/components/flex/flex.d.ts +23 -0
- package/dist/components/flex/index.d.ts +1 -0
- package/dist/components/icon/icon.d.ts +16 -0
- package/dist/components/icon/index.d.ts +1 -0
- package/dist/components/icon-button/icon-button.d.ts +21 -0
- package/dist/components/icon-button/index.d.ts +1 -0
- package/dist/components/icons/actions.d.ts +3 -0
- package/dist/components/icons/align-bottom.d.ts +3 -0
- package/dist/components/icons/align-horizontal-center.d.ts +3 -0
- package/dist/components/icons/align-left.d.ts +3 -0
- package/dist/components/icons/align-right.d.ts +3 -0
- package/dist/components/icons/align-top.d.ts +3 -0
- package/dist/components/icons/align-vertical-center.d.ts +3 -0
- package/dist/components/icons/annotation.d.ts +3 -0
- package/dist/components/icons/aspect-ratio.d.ts +3 -0
- package/dist/components/icons/auto-height.d.ts +3 -0
- package/dist/components/icons/auto-width.d.ts +3 -0
- package/dist/components/icons/blend-mode.d.ts +3 -0
- package/dist/components/icons/boolean.d.ts +3 -0
- package/dist/components/icons/checkmark-indeterminate.d.ts +3 -0
- package/dist/components/icons/checkmark.d.ts +3 -0
- package/dist/components/icons/chevron-down.d.ts +3 -0
- package/dist/components/icons/chevron-left.d.ts +3 -0
- package/dist/components/icons/chevron-right.d.ts +3 -0
- package/dist/components/icons/chevron-up.d.ts +3 -0
- package/dist/components/icons/circle.d.ts +3 -0
- package/dist/components/icons/clear.d.ts +3 -0
- package/dist/components/icons/close.d.ts +3 -0
- package/dist/components/icons/code.d.ts +3 -0
- package/dist/components/icons/comment.d.ts +3 -0
- package/dist/components/icons/component.d.ts +3 -0
- package/dist/components/icons/constraint-left.d.ts +3 -0
- package/dist/components/icons/constraint-top.d.ts +3 -0
- package/dist/components/icons/corner-radius.d.ts +3 -0
- package/dist/components/icons/design.d.ts +3 -0
- package/dist/components/icons/draw.d.ts +3 -0
- package/dist/components/icons/ellipsis.d.ts +3 -0
- package/dist/components/icons/expand.d.ts +3 -0
- package/dist/components/icons/eye.d.ts +3 -0
- package/dist/components/icons/eyedropper.d.ts +3 -0
- package/dist/components/icons/figma.d.ts +3 -0
- package/dist/components/icons/fill-gradient.d.ts +3 -0
- package/dist/components/icons/fill-pattern.d.ts +3 -0
- package/dist/components/icons/fill-solid.d.ts +3 -0
- package/dist/components/icons/fixed-size.d.ts +3 -0
- package/dist/components/icons/flip-horizontal.d.ts +3 -0
- package/dist/components/icons/flip-vertical.d.ts +3 -0
- package/dist/components/icons/frame.d.ts +3 -0
- package/dist/components/icons/help.d.ts +3 -0
- package/dist/components/icons/image.d.ts +3 -0
- package/dist/components/icons/index.d.ts +84 -0
- package/dist/components/icons/layers-collapse.d.ts +3 -0
- package/dist/components/icons/letter-spacing.d.ts +3 -0
- package/dist/components/icons/line-height.d.ts +3 -0
- package/dist/components/icons/link.d.ts +3 -0
- package/dist/components/icons/minus.d.ts +3 -0
- package/dist/components/icons/move.d.ts +3 -0
- package/dist/components/icons/number.d.ts +3 -0
- package/dist/components/icons/opacity.d.ts +3 -0
- package/dist/components/icons/palette.d.ts +3 -0
- package/dist/components/icons/panel-left-close.d.ts +3 -0
- package/dist/components/icons/pen.d.ts +3 -0
- package/dist/components/icons/play.d.ts +3 -0
- package/dist/components/icons/plus.d.ts +3 -0
- package/dist/components/icons/rectangle.d.ts +3 -0
- package/dist/components/icons/rotate-clockwise.d.ts +3 -0
- package/dist/components/icons/rotation.d.ts +3 -0
- package/dist/components/icons/ruler.d.ts +3 -0
- package/dist/components/icons/search.d.ts +3 -0
- package/dist/components/icons/select-matching.d.ts +3 -0
- package/dist/components/icons/shadow-bottom-left.d.ts +3 -0
- package/dist/components/icons/shadow-bottom-right.d.ts +3 -0
- package/dist/components/icons/shadow-down.d.ts +3 -0
- package/dist/components/icons/shadow-left.d.ts +3 -0
- package/dist/components/icons/shadow-right.d.ts +3 -0
- package/dist/components/icons/shadow-top-left.d.ts +3 -0
- package/dist/components/icons/shadow-top-right.d.ts +3 -0
- package/dist/components/icons/shadow-up.d.ts +3 -0
- package/dist/components/icons/sliders.d.ts +3 -0
- package/dist/components/icons/string.d.ts +3 -0
- package/dist/components/icons/styles.d.ts +3 -0
- package/dist/components/icons/text-align-center.d.ts +3 -0
- package/dist/components/icons/text-align-left.d.ts +3 -0
- package/dist/components/icons/text-align-right.d.ts +3 -0
- package/dist/components/icons/text-vertical-align-bottom.d.ts +3 -0
- package/dist/components/icons/text-vertical-align-middle.d.ts +3 -0
- package/dist/components/icons/text-vertical-align-top.d.ts +3 -0
- package/dist/components/icons/text.d.ts +3 -0
- package/dist/components/icons/variable-mode.d.ts +3 -0
- package/dist/components/icons/variable.d.ts +3 -0
- package/dist/components/icons/video.d.ts +3 -0
- package/dist/components/input/index.d.ts +1 -0
- package/dist/components/input/input.d.ts +9 -0
- package/dist/components/popover/index.d.ts +1 -0
- package/dist/components/popover/popover.d.ts +20 -0
- package/dist/components/radio-group/index.d.ts +1 -0
- package/dist/components/radio-group/radio-group.d.ts +20 -0
- package/dist/components/segmented-control/index.d.ts +1 -0
- package/dist/components/segmented-control/segmented-control.d.ts +24 -0
- package/dist/components/select/index.d.ts +1 -0
- package/dist/components/select/select.d.ts +40 -0
- package/dist/components/slider/index.d.ts +1 -0
- package/dist/components/slider/slider.d.ts +20 -0
- package/dist/components/switch/index.d.ts +1 -0
- package/dist/components/switch/switch.d.ts +6 -0
- package/dist/components/tabs/index.d.ts +1 -0
- package/dist/components/tabs/tabs.d.ts +12 -0
- package/dist/components/text/index.d.ts +1 -0
- package/dist/components/text/text.d.ts +47 -0
- package/dist/components/textarea/index.d.ts +1 -0
- package/dist/components/textarea/textarea.d.ts +6 -0
- package/dist/components/tooltip/index.d.ts +1 -0
- package/dist/components/tooltip/tooltip.d.ts +18 -0
- package/dist/components/value-field/index.d.ts +10 -0
- package/dist/components/value-field/named-colors.d.ts +2 -0
- package/dist/components/value-field/types.d.ts +15 -0
- package/dist/components/value-field/value-field-base.d.ts +17 -0
- package/dist/components/value-field/value-field-elements.d.ts +31 -0
- package/dist/components/value-field/value-field-hex.d.ts +29 -0
- package/dist/components/value-field/value-field-numeric-select.d.ts +16 -0
- package/dist/components/value-field/value-field-numeric.d.ts +62 -0
- package/dist/components/value-field/value-field-scrubber.d.ts +20 -0
- package/dist/figma-development-theme.css +1 -1
- package/dist/index.cjs +1 -11
- package/dist/index.d.ts +39 -1004
- package/dist/index.mjs +4149 -2057
- package/dist/lib/color.d.ts +40 -0
- package/dist/lib/constants.d.ts +2 -0
- package/dist/lib/dom/focus.d.ts +14 -0
- package/dist/lib/dom/set-input-value.d.ts +8 -0
- package/dist/lib/number/clamp.d.ts +1 -0
- package/dist/lib/number/normalize.d.ts +13 -0
- package/dist/lib/react/add-class-name.d.ts +4 -0
- package/dist/lib/react/create-context.d.ts +14 -0
- package/dist/lib/react/use-compose-refs.d.ts +19 -0
- package/dist/lib/react/use-controllable-state.d.ts +14 -0
- package/dist/lib/react/use-select-on-input-click.d.ts +9 -0
- package/dist/styles.css +277 -20
- package/dist/tailwind.css +273 -0
- package/package.json +69 -33
- 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,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,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
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
--color-text-menu-tertiary: var(--figma-color-text-oncomponent-tertiary);
|
|
115
115
|
--color-icon-menu: var(--figma-color-icon-oncomponent);
|
|
116
116
|
--shadow-menu: var(--elevation-400);
|
|
117
|
-
--font-size-menu:
|
|
117
|
+
--font-size-menu: var(--font-size-3);
|
|
118
118
|
|
|
119
119
|
--color-bg-tooltip: #1e1e1e;
|
|
120
120
|
--color-text-tooltip: #fff;
|
|
@@ -523,6 +523,7 @@
|
|
|
523
523
|
.fp-ValueFieldRoot {
|
|
524
524
|
box-sizing: border-box;
|
|
525
525
|
display: flex;
|
|
526
|
+
position: relative;
|
|
526
527
|
align-items: center;
|
|
527
528
|
border-radius: var(--radius-medium);
|
|
528
529
|
padding: 0 1px;
|
|
@@ -552,6 +553,52 @@
|
|
|
552
553
|
cursor: default;
|
|
553
554
|
outline: 0;
|
|
554
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
|
+
}
|
|
555
602
|
.fp-ValueFieldLabel {
|
|
556
603
|
display: flex;
|
|
557
604
|
align-items: center;
|
|
@@ -578,6 +625,7 @@
|
|
|
578
625
|
}
|
|
579
626
|
.fp-ValueFieldMulti {
|
|
580
627
|
display: flex;
|
|
628
|
+
position: relative;
|
|
581
629
|
border-radius: var(--radius-medium);
|
|
582
630
|
outline-offset: -1px;
|
|
583
631
|
box-sizing: border-box;
|
|
@@ -618,6 +666,70 @@
|
|
|
618
666
|
background-color: transparent;
|
|
619
667
|
padding-left: calc(var(--space-2) - 1px);
|
|
620
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
|
+
}
|
|
621
733
|
.fp-tooltip {
|
|
622
734
|
box-sizing: border-box;
|
|
623
735
|
padding: var(--space-1) var(--space-2);
|
|
@@ -638,8 +750,22 @@
|
|
|
638
750
|
fill: var(--color-bg-tooltip);
|
|
639
751
|
width: var(--space-3_5);
|
|
640
752
|
height: 7px;
|
|
641
|
-
position:
|
|
642
|
-
|
|
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);
|
|
643
769
|
}
|
|
644
770
|
.fp-textarea {
|
|
645
771
|
all: unset;
|
|
@@ -691,6 +817,7 @@
|
|
|
691
817
|
letter-spacing: var(--letter-spacing-default);
|
|
692
818
|
color: var(--color-text-menu);
|
|
693
819
|
box-shadow: var(--elevation-400);
|
|
820
|
+
outline: 0;
|
|
694
821
|
}
|
|
695
822
|
.fp-MenuItem {
|
|
696
823
|
position: relative;
|
|
@@ -719,7 +846,7 @@
|
|
|
719
846
|
display: flex;
|
|
720
847
|
align-items: center;
|
|
721
848
|
height: var(--space-6);
|
|
722
|
-
padding: 0 var(--space-
|
|
849
|
+
padding: 0 var(--space-2);
|
|
723
850
|
color: var(--color-text-menu-tertiary);
|
|
724
851
|
}
|
|
725
852
|
.fp-MenuLabel:where(.fp-MenuContent:has(.fp-MenuCheckboxItem, .fp-MenuRadioItem) .fp-MenuLabel) {
|
|
@@ -773,6 +900,11 @@
|
|
|
773
900
|
.fp-SelectTriggerIcon {
|
|
774
901
|
margin-left: auto;
|
|
775
902
|
}
|
|
903
|
+
.fp-SelectPositioner {
|
|
904
|
+
display: flex;
|
|
905
|
+
flex-direction: column;
|
|
906
|
+
min-width: calc(var(--anchor-width) + var(--space-6) - 1px);
|
|
907
|
+
}
|
|
776
908
|
.fp-SelectScrollUpButton,
|
|
777
909
|
.fp-SelectScrollDownButton {
|
|
778
910
|
position: absolute;
|
|
@@ -797,6 +929,117 @@
|
|
|
797
929
|
bottom: 0;
|
|
798
930
|
border-radius: 0 0 var(--radius-large) var(--radius-large);
|
|
799
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
|
+
}
|
|
800
1043
|
.fp-Button {
|
|
801
1044
|
box-sizing: border-box;
|
|
802
1045
|
background-clip: border-box;
|
|
@@ -966,11 +1209,11 @@
|
|
|
966
1209
|
width: var(--space-8);
|
|
967
1210
|
height: var(--space-8);
|
|
968
1211
|
}
|
|
969
|
-
.fp-IconButton
|
|
1212
|
+
.fp-IconButton:where(.fp-active-appearance-subtle):where([data-state='open'], [data-popup-open]) {
|
|
970
1213
|
background-color: var(--figma-color-bg-selected);
|
|
971
1214
|
--color-icon: var(--figma-color-icon-brand);
|
|
972
1215
|
}
|
|
973
|
-
.fp-IconButton
|
|
1216
|
+
.fp-IconButton:where(.fp-active-appearance-solid):where([data-state='open'], [data-popup-open]) {
|
|
974
1217
|
background-color: var(--figma-color-bg-selected-strong);
|
|
975
1218
|
--color-icon: var(--figma-color-icon-onbrand);
|
|
976
1219
|
}
|
|
@@ -998,10 +1241,10 @@
|
|
|
998
1241
|
background: none;
|
|
999
1242
|
content: '';
|
|
1000
1243
|
}
|
|
1001
|
-
.fp-switchRoot[data-
|
|
1244
|
+
.fp-switchRoot[data-unchecked]::before {
|
|
1002
1245
|
background: var(--figma-color-bg-tertiary);
|
|
1003
1246
|
}
|
|
1004
|
-
.fp-switchRoot[data-
|
|
1247
|
+
.fp-switchRoot[data-checked]::before {
|
|
1005
1248
|
background: var(--figma-color-bg-brand);
|
|
1006
1249
|
}
|
|
1007
1250
|
.fp-switchRoot:focus-visible {
|
|
@@ -1011,12 +1254,12 @@
|
|
|
1011
1254
|
.fp-switchRoot:focus-visible::before {
|
|
1012
1255
|
inset: 2px;
|
|
1013
1256
|
}
|
|
1014
|
-
.fp-switchRoot[data-disabled][data-
|
|
1257
|
+
.fp-switchRoot[data-disabled][data-unchecked]::before {
|
|
1015
1258
|
/* This gives it more contrast than the disabled checked state but this is
|
|
1016
1259
|
how it is in Figma. ¯\_(ツ)_/¯ */
|
|
1017
1260
|
background: var(--figma-color-bg-disabled);
|
|
1018
1261
|
}
|
|
1019
|
-
.fp-switchRoot[data-disabled][data-
|
|
1262
|
+
.fp-switchRoot[data-disabled][data-checked]::before {
|
|
1020
1263
|
background: var(--figma-color-bg-tertiary);
|
|
1021
1264
|
}
|
|
1022
1265
|
.fp-switchThumb {
|
|
@@ -1033,10 +1276,10 @@
|
|
|
1033
1276
|
.fp-switchThumb[data-disabled] {
|
|
1034
1277
|
background-color: var(--figma-color-icon-ondisabled);
|
|
1035
1278
|
}
|
|
1036
|
-
.fp-switchThumb[data-
|
|
1279
|
+
.fp-switchThumb[data-unchecked] {
|
|
1037
1280
|
left: 1px;
|
|
1038
1281
|
}
|
|
1039
|
-
.fp-switchThumb[data-
|
|
1282
|
+
.fp-switchThumb[data-checked] {
|
|
1040
1283
|
left: calc(100% - var(--space-3_5) - 1px);
|
|
1041
1284
|
}
|
|
1042
1285
|
:root,
|
|
@@ -1070,10 +1313,22 @@
|
|
|
1070
1313
|
width: var(--slider-root-size);
|
|
1071
1314
|
border-width: calc(var(--slider-thumb-width) / 2) 0;
|
|
1072
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
|
+
}
|
|
1073
1328
|
.fp-SliderTrack {
|
|
1074
1329
|
box-sizing: border-box;
|
|
1075
|
-
position:
|
|
1076
|
-
overflow:
|
|
1330
|
+
position: static;
|
|
1331
|
+
overflow: visible;
|
|
1077
1332
|
flex-grow: 1;
|
|
1078
1333
|
background: var(--slider-track-bg);
|
|
1079
1334
|
border-radius: var(--radius-full);
|
|
@@ -1112,6 +1367,7 @@
|
|
|
1112
1367
|
.fp-SliderThumb {
|
|
1113
1368
|
box-sizing: border-box;
|
|
1114
1369
|
display: block;
|
|
1370
|
+
z-index: 1;
|
|
1115
1371
|
width: var(--slider-track-size);
|
|
1116
1372
|
height: var(--slider-track-size);
|
|
1117
1373
|
background-color: var(--slider-thumb-bg);
|
|
@@ -1284,11 +1540,11 @@
|
|
|
1284
1540
|
line-height: var(--line-height-default);
|
|
1285
1541
|
white-space: nowrap;
|
|
1286
1542
|
}
|
|
1287
|
-
.fp-TabsTrigger:where([data-
|
|
1543
|
+
.fp-TabsTrigger:where(:not([data-active])) {
|
|
1288
1544
|
color: var(--figma-color-text-secondary);
|
|
1289
1545
|
--color-icon: var(--figma-color-icon-secondary);
|
|
1290
1546
|
}
|
|
1291
|
-
.fp-TabsTrigger:where([data-
|
|
1547
|
+
.fp-TabsTrigger:where([data-active]) {
|
|
1292
1548
|
font-weight: var(--font-weight-strong);
|
|
1293
1549
|
color: var(--figma-color-text);
|
|
1294
1550
|
--color-icon: var(--figma-color-icon);
|
|
@@ -1378,6 +1634,7 @@
|
|
|
1378
1634
|
.fp-RadioGroupItem {
|
|
1379
1635
|
all: unset;
|
|
1380
1636
|
box-sizing: border-box;
|
|
1637
|
+
display: inline-block;
|
|
1381
1638
|
width: 16px;
|
|
1382
1639
|
height: 16px;
|
|
1383
1640
|
background-color: var(--figma-color-bg);
|
|
@@ -1389,14 +1646,14 @@
|
|
|
1389
1646
|
.fp-RadioGroupItem:focus-visible {
|
|
1390
1647
|
outline-color: var(--figma-color-border-selected);
|
|
1391
1648
|
}
|
|
1392
|
-
.fp-RadioGroupItem[data-
|
|
1649
|
+
.fp-RadioGroupItem[data-checked] {
|
|
1393
1650
|
background-color: var(--figma-color-icon);
|
|
1394
1651
|
border-color: var(--figma-color-bg);
|
|
1395
1652
|
}
|
|
1396
1653
|
.fp-RadioGroupItem[data-disabled] {
|
|
1397
1654
|
outline-color: var(--figma-color-icon-disabled);
|
|
1398
1655
|
}
|
|
1399
|
-
.fp-RadioGroupItem[data-disabled][data-
|
|
1656
|
+
.fp-RadioGroupItem[data-disabled][data-checked] {
|
|
1400
1657
|
background-color: var(--figma-color-icon-disabled);
|
|
1401
1658
|
}
|
|
1402
1659
|
.fp-RadioGroupLabel {
|
|
@@ -1433,7 +1690,7 @@
|
|
|
1433
1690
|
white-space: nowrap;
|
|
1434
1691
|
--color-icon: var(--figma-color-icon-secondary);
|
|
1435
1692
|
}
|
|
1436
|
-
.fp-SegmentedControlItem[
|
|
1693
|
+
.fp-SegmentedControlItem[data-pressed] {
|
|
1437
1694
|
--color-icon: var(--figma-color-icon);
|
|
1438
1695
|
background-color: var(--figma-color-bg);
|
|
1439
1696
|
box-shadow: inset 0 0 0 var(--space-px) var(--figma-color-border);
|
|
@@ -1473,7 +1730,7 @@
|
|
|
1473
1730
|
.fp-CollapsibleIndicator {
|
|
1474
1731
|
--color-icon: var(--figma-color-icon-secondary);
|
|
1475
1732
|
}
|
|
1476
|
-
[data-
|
|
1733
|
+
[data-panel-open] > .fp-CollapsibleIndicator {
|
|
1477
1734
|
transform: rotate(90deg);
|
|
1478
1735
|
}
|
|
1479
1736
|
.fp-CollapsibleContent {
|