@kanso-labs/kanso-ui 0.26.2 → 0.26.3
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/dist/calendar/index.js +1 -1
- package/dist/calendar/index.js.map +1 -1
- package/dist/calendar/months.js.map +1 -1
- package/dist/calendar/styles.js.map +1 -1
- package/dist/chip/styles.js.map +1 -1
- package/dist/components/app-bar/index.js +148 -40
- package/dist/components/app-bar/index.js.map +1 -1
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/autocomplete/index.js.map +1 -1
- package/dist/components/avatar/index.js +46 -14
- package/dist/components/avatar/index.js.map +1 -1
- package/dist/components/breadcrumbs/index.js +1 -1
- package/dist/components/breadcrumbs/index.js.map +1 -1
- package/dist/components/button/index.js +67 -18
- package/dist/components/button/index.js.map +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/calendar/index.js.map +1 -1
- package/dist/components/card/index.js +71 -19
- package/dist/components/card/index.js.map +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox/index.js.map +1 -1
- package/dist/components/checkbox-group/index.js +1 -1
- package/dist/components/checkbox-group/index.js.map +1 -1
- package/dist/components/chip/index.js +1 -1
- package/dist/components/chip/index.js.map +1 -1
- package/dist/components/chip-group/index.js +118 -28
- package/dist/components/chip-group/index.js.map +1 -1
- package/dist/components/code/index.js.map +1 -1
- package/dist/components/color-area/index.js +66 -12
- package/dist/components/color-area/index.js.map +1 -1
- package/dist/components/color-field/index.js +61 -12
- package/dist/components/color-field/index.js.map +1 -1
- package/dist/components/color-picker/index.js +146 -43
- package/dist/components/color-picker/index.js.map +1 -1
- package/dist/components/color-slider/index.js +116 -21
- package/dist/components/color-slider/index.js.map +1 -1
- package/dist/components/color-swatch/index.js +1 -1
- package/dist/components/color-swatch/index.js.map +1 -1
- package/dist/components/color-swatch-picker/index.js +1 -1
- package/dist/components/color-swatch-picker/index.js.map +1 -1
- package/dist/components/color-wheel/index.js +75 -11
- package/dist/components/color-wheel/index.js.map +1 -1
- package/dist/components/combo-box/index.js +113 -32
- package/dist/components/combo-box/index.js.map +1 -1
- package/dist/components/container/index.js +53 -10
- package/dist/components/container/index.js.map +1 -1
- package/dist/components/copy-field/index.js +95 -40
- package/dist/components/copy-field/index.js.map +1 -1
- package/dist/components/currency/index.js +68 -11
- package/dist/components/currency/index.js.map +1 -1
- package/dist/components/date-field/index.js +64 -15
- package/dist/components/date-field/index.js.map +1 -1
- package/dist/components/date-picker/index.js +121 -38
- package/dist/components/date-picker/index.js.map +1 -1
- package/dist/components/date-range-picker/index.js +154 -52
- package/dist/components/date-range-picker/index.js.map +1 -1
- package/dist/components/dialog/index.js +87 -19
- package/dist/components/dialog/index.js.map +1 -1
- package/dist/components/disclosure/index.js +43 -10
- package/dist/components/disclosure/index.js.map +1 -1
- package/dist/components/disclosure-group/index.js +49 -6
- package/dist/components/disclosure-group/index.js.map +1 -1
- package/dist/components/drop-zone/index.js +1 -1
- package/dist/components/drop-zone/index.js.map +1 -1
- package/dist/components/drop-zone/styles.js.map +1 -1
- package/dist/components/feed/index.js +52 -9
- package/dist/components/feed/index.js.map +1 -1
- package/dist/components/form/index.js +39 -6
- package/dist/components/form/index.js.map +1 -1
- package/dist/components/icon-button/index.js +89 -29
- package/dist/components/icon-button/index.js.map +1 -1
- package/dist/components/keycap/index.js.map +1 -1
- package/dist/components/link/index.js +52 -11
- package/dist/components/link/index.js.map +1 -1
- package/dist/components/list/index.js +96 -16
- package/dist/components/list/index.js.map +1 -1
- package/dist/components/list-box/index.js +45 -8
- package/dist/components/list-box/index.js.map +1 -1
- package/dist/components/list-detail/index.js +99 -20
- package/dist/components/list-detail/index.js.map +1 -1
- package/dist/components/list-item/index.js +42 -15
- package/dist/components/list-item/index.js.map +1 -1
- package/dist/components/menu/index.js +139 -23
- package/dist/components/menu/index.js.map +1 -1
- package/dist/components/meter/index.js +68 -8
- package/dist/components/meter/index.js.map +1 -1
- package/dist/components/navigation-tree/index.js +1 -1
- package/dist/components/navigation-tree/index.js.map +1 -1
- package/dist/components/number-field/index.js +135 -47
- package/dist/components/number-field/index.js.map +1 -1
- package/dist/components/popover/index.js +226 -49
- package/dist/components/popover/index.js.map +1 -1
- package/dist/components/product-icon/index.js +50 -17
- package/dist/components/product-icon/index.js.map +1 -1
- package/dist/components/progress-indicator/index.js +92 -9
- package/dist/components/progress-indicator/index.js.map +1 -1
- package/dist/components/radio-group/index.js +44 -10
- package/dist/components/radio-group/index.js.map +1 -1
- package/dist/components/range-calendar/index.js +1 -1
- package/dist/components/range-calendar/index.js.map +1 -1
- package/dist/components/search-field/index.js +44 -9
- package/dist/components/search-field/index.js.map +1 -1
- package/dist/components/segmented-button/index.js +111 -19
- package/dist/components/segmented-button/index.js.map +1 -1
- package/dist/components/select/index.js +48 -10
- package/dist/components/select/index.js.map +1 -1
- package/dist/components/separator/index.js +21 -6
- package/dist/components/separator/index.js.map +1 -1
- package/dist/components/sheet/index.js +87 -19
- package/dist/components/sheet/index.js.map +1 -1
- package/dist/components/slider/index.js +90 -18
- package/dist/components/slider/index.js.map +1 -1
- package/dist/components/snackbar/index.js +1 -1
- package/dist/components/snackbar/index.js.map +1 -1
- package/dist/components/stack/index.js +54 -9
- package/dist/components/stack/index.js.map +1 -1
- package/dist/components/supporting-pane/index.js +91 -20
- package/dist/components/supporting-pane/index.js.map +1 -1
- package/dist/components/switch/index.js +57 -12
- package/dist/components/switch/index.js.map +1 -1
- package/dist/components/table/index.js +229 -46
- package/dist/components/table/index.js.map +1 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tabs/index.js.map +1 -1
- package/dist/components/tag/index.js +53 -10
- package/dist/components/tag/index.js.map +1 -1
- package/dist/components/text/index.js +54 -9
- package/dist/components/text/index.js.map +1 -1
- package/dist/components/text-area/index.js +70 -15
- package/dist/components/text-area/index.js.map +1 -1
- package/dist/components/text-field/index.js +73 -16
- package/dist/components/text-field/index.js.map +1 -1
- package/dist/components/time-field/index.js +64 -15
- package/dist/components/time-field/index.js.map +1 -1
- package/dist/components/token-field/index.js +133 -18
- package/dist/components/token-field/index.js.map +1 -1
- package/dist/components/toolbar/index.js +68 -11
- package/dist/components/toolbar/index.js.map +1 -1
- package/dist/components/tooltip/index.js +87 -11
- package/dist/components/tooltip/index.js.map +1 -1
- package/dist/components/tree/index.js +96 -16
- package/dist/components/tree/index.js.map +1 -1
- package/dist/drag/hooks.js +1 -1
- package/dist/drag/hooks.js.map +1 -1
- package/dist/drag/index.js +1 -1
- package/dist/drag/index.js.map +1 -1
- package/dist/drag/styles.js.map +1 -1
- package/dist/field/index.js +338 -96
- package/dist/field/index.js.map +1 -1
- package/dist/field/root.js.map +1 -1
- package/dist/glyphs/index.js +1 -1
- package/dist/glyphs/index.js.map +1 -1
- package/dist/hooks/useImageLoadingStatus.js +1 -1
- package/dist/hooks/useImageLoadingStatus.js.map +1 -1
- package/dist/hooks/useRipple.js +1 -1
- package/dist/hooks/useRipple.js.map +1 -1
- package/dist/indicator/index.js +1 -1
- package/dist/indicator/index.js.map +1 -1
- package/dist/indicator/styles.js.map +1 -1
- package/dist/layout.js.map +1 -1
- package/dist/render/aria.js.map +1 -1
- package/dist/render/useRender.js +66 -21
- package/dist/render/useRender.js.map +1 -1
- package/dist/row/index.js +97 -23
- package/dist/row/index.js.map +1 -1
- package/dist/row/styles.js.map +1 -1
- package/dist/segments/index.js.map +1 -1
- package/dist/segments/styles.js.map +1 -1
- package/dist/styles/chequer.js.map +1 -1
- package/dist/styles/color.js.map +1 -1
- package/dist/styles/merge.js.map +1 -1
- package/dist/styles/overlay.js.map +1 -1
- package/dist/styles/picker.js.map +1 -1
- package/dist/styles/ripple.js.map +1 -1
- package/dist/tokens/design.tokens.stylex.js.map +1 -1
- package/dist/tokens/values.js.map +1 -1
- package/package.json +8 -6
|
@@ -6,6 +6,7 @@ import { overlay } from "../../styles/overlay.js";
|
|
|
6
6
|
import { picker } from "../../styles/picker.js";
|
|
7
7
|
import ColorSlider$1 from "../color-slider/index.js";
|
|
8
8
|
import ColorSwatch$1 from "../color-swatch/index.js";
|
|
9
|
+
import { c } from "react/compiler-runtime";
|
|
9
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
11
|
import { Button, ColorPicker, Dialog, DialogTrigger, Popover } from "react-aria-components";
|
|
11
12
|
//#region src/components/color-picker/index.tsx
|
|
@@ -33,52 +34,154 @@ import { Button, ColorPicker, Dialog, DialogTrigger, Popover } from "react-aria-
|
|
|
33
34
|
* The call site's `className` and `style` land on the trigger, which is the
|
|
34
35
|
* element a layout positions.
|
|
35
36
|
*/
|
|
36
|
-
function ColorPicker$1(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
function ColorPicker$1(t0) {
|
|
38
|
+
const $ = c(36);
|
|
39
|
+
let children;
|
|
40
|
+
let className;
|
|
41
|
+
let defaultOpen;
|
|
42
|
+
let isOpen;
|
|
43
|
+
let label;
|
|
44
|
+
let onOpenChange;
|
|
45
|
+
let props$1;
|
|
46
|
+
let style;
|
|
47
|
+
let t1;
|
|
48
|
+
let t2;
|
|
49
|
+
if ($[0] !== t0) {
|
|
50
|
+
({alpha: t1, children, className, defaultOpen, isDisabled: t2, isOpen, label, onOpenChange, style, ...props$1} = t0);
|
|
51
|
+
$[0] = t0;
|
|
52
|
+
$[1] = children;
|
|
53
|
+
$[2] = className;
|
|
54
|
+
$[3] = defaultOpen;
|
|
55
|
+
$[4] = isOpen;
|
|
56
|
+
$[5] = label;
|
|
57
|
+
$[6] = onOpenChange;
|
|
58
|
+
$[7] = props$1;
|
|
59
|
+
$[8] = style;
|
|
60
|
+
$[9] = t1;
|
|
61
|
+
$[10] = t2;
|
|
62
|
+
} else {
|
|
63
|
+
children = $[1];
|
|
64
|
+
className = $[2];
|
|
65
|
+
defaultOpen = $[3];
|
|
66
|
+
isOpen = $[4];
|
|
67
|
+
label = $[5];
|
|
68
|
+
onOpenChange = $[6];
|
|
69
|
+
props$1 = $[7];
|
|
70
|
+
style = $[8];
|
|
71
|
+
t1 = $[9];
|
|
72
|
+
t2 = $[10];
|
|
73
|
+
}
|
|
74
|
+
const alpha = t1 === void 0 ? false : t1;
|
|
75
|
+
const isDisabled = t2 === void 0 ? false : t2;
|
|
76
|
+
let t3;
|
|
77
|
+
if ($[11] !== className || $[12] !== style) {
|
|
78
|
+
t3 = mergeStatefulStyles(_temp, {
|
|
79
|
+
className,
|
|
80
|
+
style
|
|
81
|
+
});
|
|
82
|
+
$[11] = className;
|
|
83
|
+
$[12] = style;
|
|
84
|
+
$[13] = t3;
|
|
85
|
+
} else t3 = $[13];
|
|
86
|
+
let t4;
|
|
87
|
+
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
88
|
+
t4 = /* @__PURE__ */ jsx(ColorSwatch$1, { className: "xxk0z11 x2lah0s xvy4d1p" });
|
|
89
|
+
$[14] = t4;
|
|
90
|
+
} else t4 = $[14];
|
|
91
|
+
let t5;
|
|
92
|
+
if ($[15] !== isDisabled || $[16] !== label || $[17] !== t3) {
|
|
93
|
+
t5 = /* @__PURE__ */ jsxs(Button, {
|
|
94
|
+
isDisabled,
|
|
95
|
+
...t3,
|
|
96
|
+
children: [t4, label]
|
|
97
|
+
});
|
|
98
|
+
$[15] = isDisabled;
|
|
99
|
+
$[16] = label;
|
|
100
|
+
$[17] = t3;
|
|
101
|
+
$[18] = t5;
|
|
102
|
+
} else t5 = $[18];
|
|
103
|
+
let t6;
|
|
104
|
+
if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
|
|
105
|
+
t6 = props(overlay.popup, picker.popover);
|
|
106
|
+
$[19] = t6;
|
|
107
|
+
} else t6 = $[19];
|
|
108
|
+
let t7;
|
|
109
|
+
if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
|
|
110
|
+
t7 = props(overlay.popupDialog);
|
|
111
|
+
$[20] = t7;
|
|
112
|
+
} else t7 = $[20];
|
|
113
|
+
let t8;
|
|
114
|
+
if ($[21] !== alpha || $[22] !== children || $[23] !== label) {
|
|
115
|
+
t8 = children ?? /* @__PURE__ */ jsxs("div", {
|
|
116
|
+
className: "x9f619 x78zum5 xdt5ytf x1gka490 x1dz1jew x193iq5w xgc26li",
|
|
117
|
+
children: [
|
|
118
|
+
/* @__PURE__ */ jsx(ColorArea$1, {
|
|
119
|
+
"aria-label": label,
|
|
120
|
+
colorSpace: "hsl",
|
|
121
|
+
xChannel: "saturation",
|
|
122
|
+
yChannel: "lightness"
|
|
123
|
+
}),
|
|
124
|
+
/* @__PURE__ */ jsx(ColorSlider$1, {
|
|
125
|
+
channel: "hue",
|
|
126
|
+
colorSpace: "hsl",
|
|
127
|
+
label: "Hue"
|
|
128
|
+
}),
|
|
129
|
+
alpha ? /* @__PURE__ */ jsx(ColorSlider$1, {
|
|
130
|
+
channel: "alpha",
|
|
131
|
+
label: "Alpha"
|
|
132
|
+
}) : null,
|
|
133
|
+
/* @__PURE__ */ jsx(ColorField$1, { label })
|
|
134
|
+
]
|
|
135
|
+
});
|
|
136
|
+
$[21] = alpha;
|
|
137
|
+
$[22] = children;
|
|
138
|
+
$[23] = label;
|
|
139
|
+
$[24] = t8;
|
|
140
|
+
} else t8 = $[24];
|
|
141
|
+
let t9;
|
|
142
|
+
if ($[25] !== t8) {
|
|
143
|
+
t9 = /* @__PURE__ */ jsx(Popover, {
|
|
144
|
+
...t6,
|
|
145
|
+
children: /* @__PURE__ */ jsx(Dialog, {
|
|
146
|
+
...t7,
|
|
147
|
+
children: t8
|
|
148
|
+
})
|
|
149
|
+
});
|
|
150
|
+
$[25] = t8;
|
|
151
|
+
$[26] = t9;
|
|
152
|
+
} else t9 = $[26];
|
|
153
|
+
let t10;
|
|
154
|
+
if ($[27] !== defaultOpen || $[28] !== isOpen || $[29] !== onOpenChange || $[30] !== t5 || $[31] !== t9) {
|
|
155
|
+
t10 = /* @__PURE__ */ jsxs(DialogTrigger, {
|
|
40
156
|
defaultOpen,
|
|
41
157
|
isOpen,
|
|
42
158
|
onOpenChange,
|
|
43
|
-
children: [
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
label: "Hue"
|
|
70
|
-
}),
|
|
71
|
-
alpha ? /* @__PURE__ */ jsx(ColorSlider$1, {
|
|
72
|
-
channel: "alpha",
|
|
73
|
-
label: "Alpha"
|
|
74
|
-
}) : null,
|
|
75
|
-
/* @__PURE__ */ jsx(ColorField$1, { label })
|
|
76
|
-
]
|
|
77
|
-
})
|
|
78
|
-
})
|
|
79
|
-
})]
|
|
80
|
-
})
|
|
81
|
-
});
|
|
159
|
+
children: [t5, t9]
|
|
160
|
+
});
|
|
161
|
+
$[27] = defaultOpen;
|
|
162
|
+
$[28] = isOpen;
|
|
163
|
+
$[29] = onOpenChange;
|
|
164
|
+
$[30] = t5;
|
|
165
|
+
$[31] = t9;
|
|
166
|
+
$[32] = t10;
|
|
167
|
+
} else t10 = $[32];
|
|
168
|
+
let t11;
|
|
169
|
+
if ($[33] !== props$1 || $[34] !== t10) {
|
|
170
|
+
t11 = /* @__PURE__ */ jsx(ColorPicker, {
|
|
171
|
+
...props$1,
|
|
172
|
+
children: t10
|
|
173
|
+
});
|
|
174
|
+
$[33] = props$1;
|
|
175
|
+
$[34] = t10;
|
|
176
|
+
$[35] = t11;
|
|
177
|
+
} else t11 = $[35];
|
|
178
|
+
return t11;
|
|
179
|
+
}
|
|
180
|
+
function _temp(state) {
|
|
181
|
+
return {
|
|
182
|
+
0: { className: "x6s0dn4 xu5m21g x5r8g2b x1vnz5z6 x3y1ksm xc342km x9f619 x139gbkf x1ypdohk x3nfvp2 xkknnkr x14zspaw x1v9cpvo x126z3so x155f00i x1lz68p4 xrgy624 x1hl8ikr x9v5kkp x1t137rt x1de99jn x1cmllll x18fpw6u" },
|
|
183
|
+
1: { className: "x6s0dn4 x3y1ksm xc342km x9f619 x3nfvp2 xkknnkr x14zspaw x1v9cpvo x126z3so x155f00i x1lz68p4 xrgy624 x1hl8ikr x9v5kkp x1t137rt x1de99jn x1cmllll x18fpw6u x19v6zzp x1xj74d8 x1h6gzvc" }
|
|
184
|
+
}[!!state.isDisabled << 0];
|
|
82
185
|
}
|
|
83
186
|
//#endregion
|
|
84
187
|
export { ColorPicker$1 as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/color-picker/index.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport type { ButtonRenderProps, ColorPickerProps as RACColorPickerProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { Button as RACButton, ColorPicker as RACColorPicker, Dialog as RACDialog, DialogTrigger as RACDialogTrigger, Popover as RACPopover } from 'react-aria-components';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport { overlay } from '../../styles/overlay';\nimport { picker } from '../../styles/picker';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, radii, spacing, stateLayerOpacity, typography } from '../../tokens/design.tokens.stylex';\nimport ColorArea from '../color-area';\nimport ColorField from '../color-field';\nimport ColorSlider from '../color-slider';\nimport ColorSwatch from '../color-swatch';\n\n// Everything in this phase, in one control: a swatch and a label as the\n// trigger, and a plane, a hue slider, an alpha slider and a text field on\n// the surface it opens. React Aria's `ColorPicker` renders nothing of its\n// own — it is the state the five share — so what is here is the trigger,\n// the overlay and the arrangement inside it.\n//\n// The design carries no page for a colour picker. What it does carry is the\n// text fields page, which the field inside this one already draws through,\n// and the overlay surface every popover here shares. Three choices are the\n// library's own.\n//\n// **The trigger is a swatch beside a name, not a swatch alone.** A swatch\n// on its own is a coloured square with no affordance — nothing says it can\n// be pressed, and a screen reader is told a colour rather than an action.\n// The label is what makes it a button.\n//\n// **Hue is a slider rather than a wheel here.** A wheel and the plane want\n// the same space and would make the surface square and large; the strip\n// sits under the plane at the width it already has. `ColorWheel` is for a\n// picker that wants to be round, which is a different shape rather than a\n// different control.\n//\n// **It is docked above the medium breakpoint and modal below it**, which is\n// the same swap `DatePicker` and `Sheet` make — the shared one in\n// `src/styles/picker.ts` rather than a third copy. A 280dp surface anchored\n// to a trigger is unreachable at 375px.\n//\n// One thing the picker has to do that its parts do not. **The plane and the\n// hue strip are pinned to HSL.** A channel has to belong to the value's own\n// space or React Aria throws, and a hex parses as RGB, which has no\n// saturation — so `<ColorPicker defaultValue=\"#6750A4\" />`, the call anyone\n// writes first, would throw outright. Converting here is what makes the\n// picker take any notation, and it costs the caller nothing: the value\n// handed back is still in whatever they passed.\n\ntype ColorPickerProps = Omit<RACColorPickerProps, 'children'> & {\n /** Whether the alpha strip is drawn under the hue one. @default false */\n alpha?: boolean;\n /** Replaces everything on the surface, for a picker that arranges its own parts. */\n children?: ReactNode;\n /** Lands on the trigger, which is the element a layout positions. */\n className?: string;\n /** Whether the surface starts open. Uncontrolled; pair `isOpen` with `onOpenChange` instead. */\n defaultOpen?: boolean;\n /** Whether the whole picker is inert. @default false */\n isDisabled?: boolean;\n /** Whether the surface is open. Controlled; needs `onOpenChange`. */\n isOpen?: boolean;\n /** What the trigger says beside its swatch. Always rendered; it is the button's name. */\n label: string;\n /** Called when the surface opens or closes. */\n onOpenChange?: (isOpen: boolean) => void;\n /** Lands on the trigger, as `className` does. */\n style?: React.CSSProperties;\n};\n\n/**\n * A colour picked from a plane, a hue strip and a text field, behind a\n * trigger showing the colour. The value is React Aria's: pass `value` with\n * `onChange` to control it, or `defaultValue`, as a CSS colour string or a\n * `Color` from `parseColor`, which this package re-exports.\n *\n * ```tsx\n * <ColorPicker defaultValue=\"#6750A4\" label=\"Label\" />\n * ```\n *\n * `alpha` adds the transparency strip. Above the medium breakpoint the\n * surface is docked to the trigger; below it, it opens centred, the same\n * swap `DatePicker` makes. `defaultOpen`, `isOpen` and `onOpenChange` reach\n * the overlay, since the picker itself carries no open state — React Aria\n * keeps that on the dialog trigger this renders inside.\n *\n * Every part inside is this package's own — `ColorArea`, `ColorSlider`,\n * `ColorField` and `ColorSwatch` — and they share the picker's value\n * through React Aria's context rather than props. Passing `children`\n * replaces all of them, for a picker that wants a different arrangement.\n *\n * The call site's `className` and `style` land on the trigger, which is the\n * element a layout positions.\n */\nfunction ColorPicker({\n alpha = false,\n children,\n className,\n defaultOpen,\n isDisabled = false,\n isOpen,\n label,\n onOpenChange,\n style,\n ...props\n}: ColorPickerProps) {\n return <RACColorPicker {...props}>\n <RACDialogTrigger defaultOpen={defaultOpen} isOpen={isOpen} onOpenChange={onOpenChange}>\n <RACButton isDisabled={isDisabled} {...mergeStatefulStyles(\n // A function of the state rather than a fixed class, since the\n // trigger is the element a layout positions and the call site's\n // own class has to merge into it — a plain `className` would\n // overwrite one or the other.\n (state: ButtonRenderProps) => ({\n 0: {\n className: \"x6s0dn4 xu5m21g x5r8g2b x1vnz5z6 x3y1ksm xc342km x9f619 x139gbkf x1ypdohk x3nfvp2 xkknnkr x14zspaw x1v9cpvo x126z3so x155f00i x1lz68p4 xrgy624 x1hl8ikr x9v5kkp x1t137rt x1de99jn x1cmllll x18fpw6u\"\n },\n 1: {\n className: \"x6s0dn4 x3y1ksm xc342km x9f619 x3nfvp2 xkknnkr x14zspaw x1v9cpvo x126z3so x155f00i x1lz68p4 xrgy624 x1hl8ikr x9v5kkp x1t137rt x1de99jn x1cmllll x18fpw6u x19v6zzp x1xj74d8 x1h6gzvc\"\n }\n })[!!state.isDisabled << 0], {\n className,\n style\n })}>\n <ColorSwatch className=\"xxk0z11 x2lah0s xvy4d1p\" />\n {label}\n </RACButton>\n <RACPopover {...stylex.props(overlay.popup, picker.popover)}>\n <RACDialog {...stylex.props(overlay.popupDialog)}>\n {children ?? <div className=\"x9f619 x78zum5 xdt5ytf x1gka490 x1dz1jew x193iq5w xgc26li\">\n <ColorArea aria-label={label} colorSpace=\"hsl\" xChannel=\"saturation\" yChannel=\"lightness\" />\n <ColorSlider channel=\"hue\" colorSpace=\"hsl\" label=\"Hue\" />\n {alpha ? <ColorSlider channel=\"alpha\" label=\"Alpha\" /> : null}\n <ColorField label={label} />\n </div>}\n </RACDialog>\n </RACPopover>\n </RACDialogTrigger>\n </RACColorPicker>;\n}\nexport type { ColorPickerProps };\nexport default ColorPicker;"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8FA,SAAS,cAAY,EACnB,QAAQ,OACR,UACA,WACA,aACA,aAAa,OACb,QACA,OACA,cACA,OACA,GAAG,WACgB;CACnB,OAAO,oBAAC,aAAD;EAAgB,GAAI;EACvB,UAAA,qBAAC,eAAD;GAA+B;GAAqB;GAAsB;GAA1E,UAAA,CACE,qBAAC,QAAD;IAAuB;IAAY,GAAI,qBAKxC,WAA8B;KAC7B,GAAG,EACD,WAAW,sMACb;KACA,GAAG,EACD,WAAW,sLACb;IACF,EAAA,CAAG,CAAC,CAAC,MAAM,cAAc,IAAI;KAC3B;KACA;IACF,CAAC;IAfC,UAAA,CAgBE,oBAAC,eAAD,EAAa,WAAU,0BAAyB,CAAA,GAC/C,KACQ;GACX,CAAA,GAAA,oBAAC,SAAD;IAAY,GAAI,MAAa,QAAQ,OAAO,OAAO,OAAO;IACxD,UAAA,oBAAC,QAAD;KAAW,GAAI,MAAa,QAAQ,WAAW;KAC5C,UAAA,YAAY,qBAAC,OAAD;MAAK,WAAU;MAAf,UAAA;OACT,oBAAC,aAAD;QAAW,cAAY;QAAO,YAAW;QAAM,UAAS;QAAa,UAAS;OAAW,CAAA;OACzF,oBAAC,eAAD;QAAa,SAAQ;QAAM,YAAW;QAAM,OAAM;OAAK,CAAA;OACtD,QAAQ,oBAAC,eAAD;QAAa,SAAQ;QAAQ,OAAM;OAAO,CAAA,IAAM;OACzD,oBAAC,cAAD,EAAmB,MAAM,CAAA;MACtB;;IACE,CAAA;GACD,CAAA,CACI;;CACJ,CAAA;AACpB"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["ReactNode","ButtonRenderProps","ColorPickerProps","RACColorPickerProps","stylex","Button","RACButton","ColorPicker","RACColorPicker","Dialog","RACDialog","DialogTrigger","RACDialogTrigger","Popover","RACPopover","mergeStatefulStyles","overlay","picker","colors","radii","spacing","stateLayerOpacity","typography","ColorArea","ColorField","ColorSlider","ColorSwatch","Omit","alpha","children","className","defaultOpen","isDisabled","isOpen","label","onOpenChange","style","React","CSSProperties","t0","$","_c","props","t1","t2","undefined","t3","_temp","t4","Symbol","for","t5","t6","popup","popover","t7","popupDialog","t8","t9","t10","t11","state","0","1"],"sources":["../../../src/components/color-picker/index.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport type { ButtonRenderProps, ColorPickerProps as RACColorPickerProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { Button as RACButton, ColorPicker as RACColorPicker, Dialog as RACDialog, DialogTrigger as RACDialogTrigger, Popover as RACPopover } from 'react-aria-components';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport { overlay } from '../../styles/overlay';\nimport { picker } from '../../styles/picker';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, radii, spacing, stateLayerOpacity, typography } from '../../tokens/design.tokens.stylex';\nimport ColorArea from '../color-area';\nimport ColorField from '../color-field';\nimport ColorSlider from '../color-slider';\nimport ColorSwatch from '../color-swatch';\n\n// Everything in this phase, in one control: a swatch and a label as the\n// trigger, and a plane, a hue slider, an alpha slider and a text field on\n// the surface it opens. React Aria's `ColorPicker` renders nothing of its\n// own — it is the state the five share — so what is here is the trigger,\n// the overlay and the arrangement inside it.\n//\n// The design carries no page for a colour picker. What it does carry is the\n// text fields page, which the field inside this one already draws through,\n// and the overlay surface every popover here shares. Three choices are the\n// library's own.\n//\n// **The trigger is a swatch beside a name, not a swatch alone.** A swatch\n// on its own is a coloured square with no affordance — nothing says it can\n// be pressed, and a screen reader is told a colour rather than an action.\n// The label is what makes it a button.\n//\n// **Hue is a slider rather than a wheel here.** A wheel and the plane want\n// the same space and would make the surface square and large; the strip\n// sits under the plane at the width it already has. `ColorWheel` is for a\n// picker that wants to be round, which is a different shape rather than a\n// different control.\n//\n// **It is docked above the medium breakpoint and modal below it**, which is\n// the same swap `DatePicker` and `Sheet` make — the shared one in\n// `src/styles/picker.ts` rather than a third copy. A 280dp surface anchored\n// to a trigger is unreachable at 375px.\n//\n// One thing the picker has to do that its parts do not. **The plane and the\n// hue strip are pinned to HSL.** A channel has to belong to the value's own\n// space or React Aria throws, and a hex parses as RGB, which has no\n// saturation — so `<ColorPicker defaultValue=\"#6750A4\" />`, the call anyone\n// writes first, would throw outright. Converting here is what makes the\n// picker take any notation, and it costs the caller nothing: the value\n// handed back is still in whatever they passed.\n\ntype ColorPickerProps = Omit<RACColorPickerProps, 'children'> & {\n /** Whether the alpha strip is drawn under the hue one. @default false */\n alpha?: boolean;\n /** Replaces everything on the surface, for a picker that arranges its own parts. */\n children?: ReactNode;\n /** Lands on the trigger, which is the element a layout positions. */\n className?: string;\n /** Whether the surface starts open. Uncontrolled; pair `isOpen` with `onOpenChange` instead. */\n defaultOpen?: boolean;\n /** Whether the whole picker is inert. @default false */\n isDisabled?: boolean;\n /** Whether the surface is open. Controlled; needs `onOpenChange`. */\n isOpen?: boolean;\n /** What the trigger says beside its swatch. Always rendered; it is the button's name. */\n label: string;\n /** Called when the surface opens or closes. */\n onOpenChange?: (isOpen: boolean) => void;\n /** Lands on the trigger, as `className` does. */\n style?: React.CSSProperties;\n};\n\n/**\n * A colour picked from a plane, a hue strip and a text field, behind a\n * trigger showing the colour. The value is React Aria's: pass `value` with\n * `onChange` to control it, or `defaultValue`, as a CSS colour string or a\n * `Color` from `parseColor`, which this package re-exports.\n *\n * ```tsx\n * <ColorPicker defaultValue=\"#6750A4\" label=\"Label\" />\n * ```\n *\n * `alpha` adds the transparency strip. Above the medium breakpoint the\n * surface is docked to the trigger; below it, it opens centred, the same\n * swap `DatePicker` makes. `defaultOpen`, `isOpen` and `onOpenChange` reach\n * the overlay, since the picker itself carries no open state — React Aria\n * keeps that on the dialog trigger this renders inside.\n *\n * Every part inside is this package's own — `ColorArea`, `ColorSlider`,\n * `ColorField` and `ColorSwatch` — and they share the picker's value\n * through React Aria's context rather than props. Passing `children`\n * replaces all of them, for a picker that wants a different arrangement.\n *\n * The call site's `className` and `style` land on the trigger, which is the\n * element a layout positions.\n */\nfunction ColorPicker({\n alpha = false,\n children,\n className,\n defaultOpen,\n isDisabled = false,\n isOpen,\n label,\n onOpenChange,\n style,\n ...props\n}: ColorPickerProps) {\n return <RACColorPicker {...props}>\n <RACDialogTrigger defaultOpen={defaultOpen} isOpen={isOpen} onOpenChange={onOpenChange}>\n <RACButton isDisabled={isDisabled} {...mergeStatefulStyles(\n // A function of the state rather than a fixed class, since the\n // trigger is the element a layout positions and the call site's\n // own class has to merge into it — a plain `className` would\n // overwrite one or the other.\n (state: ButtonRenderProps) => ({\n 0: {\n className: \"x6s0dn4 xu5m21g x5r8g2b x1vnz5z6 x3y1ksm xc342km x9f619 x139gbkf x1ypdohk x3nfvp2 xkknnkr x14zspaw x1v9cpvo x126z3so x155f00i x1lz68p4 xrgy624 x1hl8ikr x9v5kkp x1t137rt x1de99jn x1cmllll x18fpw6u\"\n },\n 1: {\n className: \"x6s0dn4 x3y1ksm xc342km x9f619 x3nfvp2 xkknnkr x14zspaw x1v9cpvo x126z3so x155f00i x1lz68p4 xrgy624 x1hl8ikr x9v5kkp x1t137rt x1de99jn x1cmllll x18fpw6u x19v6zzp x1xj74d8 x1h6gzvc\"\n }\n })[!!state.isDisabled << 0], {\n className,\n style\n })}>\n <ColorSwatch className=\"xxk0z11 x2lah0s xvy4d1p\" />\n {label}\n </RACButton>\n <RACPopover {...stylex.props(overlay.popup, picker.popover)}>\n <RACDialog {...stylex.props(overlay.popupDialog)}>\n {children ?? <div className=\"x9f619 x78zum5 xdt5ytf x1gka490 x1dz1jew x193iq5w xgc26li\">\n <ColorArea aria-label={label} colorSpace=\"hsl\" xChannel=\"saturation\" yChannel=\"lightness\" />\n <ColorSlider channel=\"hue\" colorSpace=\"hsl\" label=\"Hue\" />\n {alpha ? <ColorSlider channel=\"alpha\" label=\"Alpha\" /> : null}\n <ColorField label={label} />\n </div>}\n </RACDialog>\n </RACPopover>\n </RACDialogTrigger>\n </RACColorPicker>;\n}\nexport type { ColorPickerProps };\nexport default ColorPicker;"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8FA,SAAAO,cAAAgC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAZ;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAE;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAO;CAAA,IAAAN;CAAA,IAAAO;CAAA,IAAAC;CAAA,IAAAJ,EAAA,OAAAD,IAAA;EAAqB,CAAA,CAAAX,OAAAe,IAAAd,UAAAC,WAAAC,aAAAC,YAAAY,IAAAX,QAAAC,OAAAC,cAAAC,OAAA,GAAAM,WAAAH;EAWFC,EAAA,KAAAD;EAAAC,EAAA,KAAAX;EAAAW,EAAA,KAAAV;EAAAU,EAAA,KAAAT;EAAAS,EAAA,KAAAP;EAAAO,EAAA,KAAAN;EAAAM,EAAA,KAAAL;EAAAK,EAAA,KAAAE;EAAAF,EAAA,KAAAJ;EAAAI,EAAA,KAAAG;EAAAH,EAAA,MAAAI;CAAA,OAAA;EAAAf,WAAAW,EAAA;EAAAV,YAAAU,EAAA;EAAAT,cAAAS,EAAA;EAAAP,SAAAO,EAAA;EAAAN,QAAAM,EAAA;EAAAL,eAAAK,EAAA;EAAAE,UAAAF,EAAA;EAAAJ,QAAAI,EAAA;EAAAG,KAAAH,EAAA;EAAAI,KAAAJ,EAAA;CAAA;CAVjB,MAAAZ,QAAAe,OAAAE,KAAAA,IAAA,QAAAF;CAIA,MAAAX,aAAAY,OAAAC,KAAAA,IAAA,QAAAD;CAAkB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MACb;EAACiC,GACE,EAAAjC,WACU,sLACb;CACF,EAAG,CAAC,CAAC+B,MAAK7B,cAAe;AAAE"}
|
|
@@ -3,6 +3,7 @@ import { mergeStatefulStyles } from "../../styles/merge.js";
|
|
|
3
3
|
import { FieldLabel } from "../../field/index.js";
|
|
4
4
|
import { thumbClassName } from "../../styles/color.js";
|
|
5
5
|
import { chequer } from "../../styles/chequer.js";
|
|
6
|
+
import { c } from "react/compiler-runtime";
|
|
6
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
8
|
import { ColorSlider, ColorThumb, SliderOutput, SliderTrack } from "react-aria-components";
|
|
8
9
|
//#region src/components/color-slider/index.tsx
|
|
@@ -41,28 +42,122 @@ const styles = {
|
|
|
41
42
|
* The call site's `className` and `style` land on the slider as a whole,
|
|
42
43
|
* which is the element a layout positions.
|
|
43
44
|
*/
|
|
44
|
-
function ColorSlider$1(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
function ColorSlider$1(t0) {
|
|
46
|
+
const $ = c(31);
|
|
47
|
+
let T0;
|
|
48
|
+
let isDisabled;
|
|
49
|
+
let label;
|
|
50
|
+
let showValue;
|
|
51
|
+
let t1;
|
|
52
|
+
let t2;
|
|
53
|
+
let t3;
|
|
54
|
+
if ($[0] !== t0) {
|
|
55
|
+
const { isDisabled: t4, label: t5, showValue: t6, ...props } = t0;
|
|
56
|
+
label = t5;
|
|
57
|
+
isDisabled = t4 === void 0 ? false : t4;
|
|
58
|
+
showValue = t6 === void 0 ? true : t6;
|
|
59
|
+
T0 = ColorSlider;
|
|
60
|
+
t1 = isDisabled;
|
|
61
|
+
t2 = props;
|
|
62
|
+
t3 = mergeStatefulStyles({ className: "x9f619 x78zum5 xdt5ytf xzoy561 xh8yej3" }, props);
|
|
63
|
+
$[0] = t0;
|
|
64
|
+
$[1] = T0;
|
|
65
|
+
$[2] = isDisabled;
|
|
66
|
+
$[3] = label;
|
|
67
|
+
$[4] = showValue;
|
|
68
|
+
$[5] = t1;
|
|
69
|
+
$[6] = t2;
|
|
70
|
+
$[7] = t3;
|
|
71
|
+
} else {
|
|
72
|
+
T0 = $[1];
|
|
73
|
+
isDisabled = $[2];
|
|
74
|
+
label = $[3];
|
|
75
|
+
showValue = $[4];
|
|
76
|
+
t1 = $[5];
|
|
77
|
+
t2 = $[6];
|
|
78
|
+
t3 = $[7];
|
|
79
|
+
}
|
|
80
|
+
let t4;
|
|
81
|
+
if ($[8] !== label) {
|
|
82
|
+
t4 = label === void 0 ? null : /* @__PURE__ */ jsx(FieldLabel, {
|
|
83
|
+
className: "xkknnkr x14zspaw x1v9cpvo x155f00i x1lz68p4",
|
|
84
|
+
children: label
|
|
85
|
+
});
|
|
86
|
+
$[8] = label;
|
|
87
|
+
$[9] = t4;
|
|
88
|
+
} else t4 = $[9];
|
|
89
|
+
let t5;
|
|
90
|
+
if ($[10] !== showValue) {
|
|
91
|
+
t5 = showValue ? /* @__PURE__ */ jsx(SliderOutput, { className: "x1w5n3ug x1yicsit x1b35g6e xwth0xh xybisxh xvc5jky" }) : null;
|
|
92
|
+
$[10] = showValue;
|
|
93
|
+
$[11] = t5;
|
|
94
|
+
} else t5 = $[11];
|
|
95
|
+
let t6;
|
|
96
|
+
if ($[12] !== t4 || $[13] !== t5) {
|
|
97
|
+
t6 = /* @__PURE__ */ jsxs("div", {
|
|
50
98
|
className: "x1pha0wt x78zum5 x126z3so",
|
|
51
|
-
children: [
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
99
|
+
children: [t4, t5]
|
|
100
|
+
});
|
|
101
|
+
$[12] = t4;
|
|
102
|
+
$[13] = t5;
|
|
103
|
+
$[14] = t6;
|
|
104
|
+
} else t6 = $[14];
|
|
105
|
+
let t7;
|
|
106
|
+
if ($[15] !== isDisabled) {
|
|
107
|
+
t7 = props(chequer.ground, styles.trackGround, isDisabled && styles.trackGroundDisabled);
|
|
108
|
+
$[15] = isDisabled;
|
|
109
|
+
$[16] = t7;
|
|
110
|
+
} else t7 = $[16];
|
|
111
|
+
let t8;
|
|
112
|
+
if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
|
|
113
|
+
t8 = {
|
|
114
|
+
0: { className: "x1cpjm7i x1mtdikz xm4btww x1hmns74 x5yr21d x9f619 x1ypdohk xh8yej3 x1n2onr6" },
|
|
115
|
+
1: { className: "x1cpjm7i x1mtdikz xm4btww x1hmns74 x5yr21d x9f619 xh8yej3 x1n2onr6 x1h6gzvc" }
|
|
116
|
+
};
|
|
117
|
+
$[17] = t8;
|
|
118
|
+
} else t8 = $[17];
|
|
119
|
+
const t9 = t8[!!isDisabled << 0];
|
|
120
|
+
let t10;
|
|
121
|
+
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
122
|
+
t10 = /* @__PURE__ */ jsx(ColorThumb, { className: thumbClassName });
|
|
123
|
+
$[18] = t10;
|
|
124
|
+
} else t10 = $[18];
|
|
125
|
+
let t11;
|
|
126
|
+
if ($[19] !== t9) {
|
|
127
|
+
t11 = /* @__PURE__ */ jsx(SliderTrack, {
|
|
128
|
+
...t9,
|
|
129
|
+
children: t10
|
|
130
|
+
});
|
|
131
|
+
$[19] = t9;
|
|
132
|
+
$[20] = t11;
|
|
133
|
+
} else t11 = $[20];
|
|
134
|
+
let t12;
|
|
135
|
+
if ($[21] !== t11 || $[22] !== t7) {
|
|
136
|
+
t12 = /* @__PURE__ */ jsx("div", {
|
|
137
|
+
...t7,
|
|
138
|
+
children: t11
|
|
139
|
+
});
|
|
140
|
+
$[21] = t11;
|
|
141
|
+
$[22] = t7;
|
|
142
|
+
$[23] = t12;
|
|
143
|
+
} else t12 = $[23];
|
|
144
|
+
let t13;
|
|
145
|
+
if ($[24] !== T0 || $[25] !== t1 || $[26] !== t12 || $[27] !== t2 || $[28] !== t3 || $[29] !== t6) {
|
|
146
|
+
t13 = /* @__PURE__ */ jsxs(T0, {
|
|
147
|
+
isDisabled: t1,
|
|
148
|
+
...t2,
|
|
149
|
+
...t3,
|
|
150
|
+
children: [t6, t12]
|
|
151
|
+
});
|
|
152
|
+
$[24] = T0;
|
|
153
|
+
$[25] = t1;
|
|
154
|
+
$[26] = t12;
|
|
155
|
+
$[27] = t2;
|
|
156
|
+
$[28] = t3;
|
|
157
|
+
$[29] = t6;
|
|
158
|
+
$[30] = t13;
|
|
159
|
+
} else t13 = $[30];
|
|
160
|
+
return t13;
|
|
66
161
|
}
|
|
67
162
|
//#endregion
|
|
68
163
|
export { ColorSlider$1 as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/color-slider/index.tsx"],"sourcesContent":["import type { ColorSliderProps as RACColorSliderProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { ColorSlider as RACColorSlider, ColorThumb as RACColorThumb, SliderOutput as RACSliderOutput, SliderTrack as RACSliderTrack } from 'react-aria-components';\nimport { FieldLabel } from '../../field';\nimport { chequer } from '../../styles/chequer';\nimport { thumbClassName } from '../../styles/color';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, radii, spacing, stateLayerOpacity, typography } from '../../tokens/design.tokens.stylex';\n\n// The sliders page's track, carrying one channel of a colour instead of an\n// active and an inactive part: the page's 16dp strip with its 8dp corner,\n// centred in the 44dp a handle takes, and the same label-large label above\n// it. React Aria paints the gradient itself, on the track's own inline\n// `background`, so what runs along the strip is the channel rather than\n// anything chosen here.\n//\n// Three things depart from the page, each because a colour slider shows a\n// value the page's slider does not have.\n//\n// **The handle is a circle carrying the colour, not the page's 4dp bar.**\n// The page's handle is a mark on a track whose colour it already knows; this\n// one has to show the value it sits on, and 4dp of a colour is not a colour\n// anyone can read. It keeps the page's 44dp of height as the target it is\n// centred in.\n//\n// **The handle is ringed rather than filled with primary.** Its fill is the\n// value, so the ring is what has to read against it — and against every\n// other colour the track runs through. It is a surface-coloured ring with a\n// hairline outside it, which reads on a light track and a dark one alike.\n//\n// **There is no stop at the inactive end.** The page puts one 6dp from the\n// end of the inactive part; a channel has no inactive part, so there is no\n// end for it to mark.\n//\n// The alpha channel is the one that needs a chequer, for the reason\n// `src/styles/chequer.ts` gives: a track fading to transparent over a light\n// surface and one fading to white are the same pixels without it.\n\nconst styles = {\n trackGround: {\n kZKoxP: \"xlup9mm\",\n kaIpWk: \"x1xdvaa9\",\n kB7OPa: \"x9f619\",\n kzqmXN: \"xh8yej3\",\n kqGvvJ: \"x2k5q2m\",\n $$css: true\n },\n trackGroundDisabled: {\n kSiTet: \"x1ppv7y9\",\n $$css: true\n }\n};\ntype ColorSliderProps = Omit<RACColorSliderProps, 'children' | 'className' | 'style'> & {\n /** A function may compute the class from the slider's render state. */\n className?: RACColorSliderProps['className'];\n /** What the slider is for. Always rendered; React Aria names the channel otherwise. */\n label?: string;\n /**\n * Whether the value React Aria announces is also shown, at the end of the\n * label's line.\n * @default true\n */\n showValue?: boolean;\n /** A function may compute the style from the slider's render state. */\n style?: RACColorSliderProps['style'];\n};\n\n/**\n * A slider over one channel of a colour — hue, saturation, lightness, alpha\n * and the rest. The value is React Aria's: pass `value` with `onChange` to\n * control it, or `defaultValue`, as a CSS colour string or a `Color` from\n * `parseColor`, which this package re-exports.\n *\n * ```tsx\n * <ColorSlider channel=\"hue\" defaultValue=\"hsl(200, 100%, 50%)\" label=\"Label\" />\n * ```\n *\n * **`channel` has to name a channel the value's own space has.** A hex or\n * `rgb()` value parses as RGB, which has no hue, so `channel=\"hue\"` against\n * one throws rather than converting — pass `colorSpace=\"hsl\"` to convert it,\n * or give the value in the space you mean to slide.\n *\n * React Aria paints the gradient and names the value — \"200°, cyan blue\" —\n * so the readout beside the label is what it announces.\n *\n * The call site's `className` and `style` land on the slider as a whole,\n * which is the element a layout positions.\n */\nfunction ColorSlider({\n isDisabled = false,\n label,\n showValue = true,\n ...props\n}: ColorSliderProps) {\n return <RACColorSlider isDisabled={isDisabled} {...props} {...mergeStatefulStyles({\n className: \"x9f619 x78zum5 xdt5ytf xzoy561 xh8yej3\"\n }, props)}>\n <div className=\"x1pha0wt x78zum5 x126z3so\">\n {label === undefined ? null : <FieldLabel className=\"xkknnkr x14zspaw x1v9cpvo x155f00i x1lz68p4\">{label}</FieldLabel>}\n {showValue ? <RACSliderOutput className=\"x1w5n3ug x1yicsit x1b35g6e xwth0xh xybisxh xvc5jky\" /> : null}\n </div>\n <div {...stylex.props(chequer.ground, styles.trackGround, isDisabled && styles.trackGroundDisabled)}>\n <RACSliderTrack {...{\n 0: {\n className: \"x1cpjm7i x1mtdikz xm4btww x1hmns74 x5yr21d x9f619 x1ypdohk xh8yej3 x1n2onr6\"\n },\n 1: {\n className: \"x1cpjm7i x1mtdikz xm4btww x1hmns74 x5yr21d x9f619 xh8yej3 x1n2onr6 x1h6gzvc\"\n }\n }[!!isDisabled << 0]}>\n <RACColorThumb className={thumbClassName} />\n </RACSliderTrack>\n </div>\n </RACColorSlider>;\n}\nexport type { ColorSliderProps };\nexport default ColorSlider;"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["ColorSliderProps","RACColorSliderProps","stylex","ColorSlider","RACColorSlider","ColorThumb","RACColorThumb","SliderOutput","RACSliderOutput","SliderTrack","RACSliderTrack","FieldLabel","chequer","thumbClassName","mergeStatefulStyles","colors","radii","spacing","stateLayerOpacity","typography","styles","trackGround","kZKoxP","kaIpWk","kB7OPa","kzqmXN","kqGvvJ","$$css","trackGroundDisabled","kSiTet","Omit","className","label","showValue","style","t0","$","_c","T0","isDisabled","t1","t2","t3","t4","t5","t6","props","undefined","t7","ground","t8","Symbol","for","0","1","t9","t10","t11","t12","t13"],"sources":["../../../src/components/color-slider/index.tsx"],"sourcesContent":["import type { ColorSliderProps as RACColorSliderProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { ColorSlider as RACColorSlider, ColorThumb as RACColorThumb, SliderOutput as RACSliderOutput, SliderTrack as RACSliderTrack } from 'react-aria-components';\nimport { FieldLabel } from '../../field';\nimport { chequer } from '../../styles/chequer';\nimport { thumbClassName } from '../../styles/color';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, radii, spacing, stateLayerOpacity, typography } from '../../tokens/design.tokens.stylex';\n\n// The sliders page's track, carrying one channel of a colour instead of an\n// active and an inactive part: the page's 16dp strip with its 8dp corner,\n// centred in the 44dp a handle takes, and the same label-large label above\n// it. React Aria paints the gradient itself, on the track's own inline\n// `background`, so what runs along the strip is the channel rather than\n// anything chosen here.\n//\n// Three things depart from the page, each because a colour slider shows a\n// value the page's slider does not have.\n//\n// **The handle is a circle carrying the colour, not the page's 4dp bar.**\n// The page's handle is a mark on a track whose colour it already knows; this\n// one has to show the value it sits on, and 4dp of a colour is not a colour\n// anyone can read. It keeps the page's 44dp of height as the target it is\n// centred in.\n//\n// **The handle is ringed rather than filled with primary.** Its fill is the\n// value, so the ring is what has to read against it — and against every\n// other colour the track runs through. It is a surface-coloured ring with a\n// hairline outside it, which reads on a light track and a dark one alike.\n//\n// **There is no stop at the inactive end.** The page puts one 6dp from the\n// end of the inactive part; a channel has no inactive part, so there is no\n// end for it to mark.\n//\n// The alpha channel is the one that needs a chequer, for the reason\n// `src/styles/chequer.ts` gives: a track fading to transparent over a light\n// surface and one fading to white are the same pixels without it.\n\nconst styles = {\n trackGround: {\n kZKoxP: \"xlup9mm\",\n kaIpWk: \"x1xdvaa9\",\n kB7OPa: \"x9f619\",\n kzqmXN: \"xh8yej3\",\n kqGvvJ: \"x2k5q2m\",\n $$css: true\n },\n trackGroundDisabled: {\n kSiTet: \"x1ppv7y9\",\n $$css: true\n }\n};\ntype ColorSliderProps = Omit<RACColorSliderProps, 'children' | 'className' | 'style'> & {\n /** A function may compute the class from the slider's render state. */\n className?: RACColorSliderProps['className'];\n /** What the slider is for. Always rendered; React Aria names the channel otherwise. */\n label?: string;\n /**\n * Whether the value React Aria announces is also shown, at the end of the\n * label's line.\n * @default true\n */\n showValue?: boolean;\n /** A function may compute the style from the slider's render state. */\n style?: RACColorSliderProps['style'];\n};\n\n/**\n * A slider over one channel of a colour — hue, saturation, lightness, alpha\n * and the rest. The value is React Aria's: pass `value` with `onChange` to\n * control it, or `defaultValue`, as a CSS colour string or a `Color` from\n * `parseColor`, which this package re-exports.\n *\n * ```tsx\n * <ColorSlider channel=\"hue\" defaultValue=\"hsl(200, 100%, 50%)\" label=\"Label\" />\n * ```\n *\n * **`channel` has to name a channel the value's own space has.** A hex or\n * `rgb()` value parses as RGB, which has no hue, so `channel=\"hue\"` against\n * one throws rather than converting — pass `colorSpace=\"hsl\"` to convert it,\n * or give the value in the space you mean to slide.\n *\n * React Aria paints the gradient and names the value — \"200°, cyan blue\" —\n * so the readout beside the label is what it announces.\n *\n * The call site's `className` and `style` land on the slider as a whole,\n * which is the element a layout positions.\n */\nfunction ColorSlider({\n isDisabled = false,\n label,\n showValue = true,\n ...props\n}: ColorSliderProps) {\n return <RACColorSlider isDisabled={isDisabled} {...props} {...mergeStatefulStyles({\n className: \"x9f619 x78zum5 xdt5ytf xzoy561 xh8yej3\"\n }, props)}>\n <div className=\"x1pha0wt x78zum5 x126z3so\">\n {label === undefined ? null : <FieldLabel className=\"xkknnkr x14zspaw x1v9cpvo x155f00i x1lz68p4\">{label}</FieldLabel>}\n {showValue ? <RACSliderOutput className=\"x1w5n3ug x1yicsit x1b35g6e xwth0xh xybisxh xvc5jky\" /> : null}\n </div>\n <div {...stylex.props(chequer.ground, styles.trackGround, isDisabled && styles.trackGroundDisabled)}>\n <RACSliderTrack {...{\n 0: {\n className: \"x1cpjm7i x1mtdikz xm4btww x1hmns74 x5yr21d x9f619 x1ypdohk xh8yej3 x1n2onr6\"\n },\n 1: {\n className: \"x1cpjm7i x1mtdikz xm4btww x1hmns74 x5yr21d x9f619 xh8yej3 x1n2onr6 x1h6gzvc\"\n }\n }[!!isDisabled << 0]}>\n <RACColorThumb className={thumbClassName} />\n </RACSliderTrack>\n </div>\n </RACColorSlider>;\n}\nexport type { ColorSliderProps };\nexport default ColorSlider;"],"mappings":";;;;;;;;;AAuCA,MAAMoB,SAAS;CACbC,aAAa;EACXC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,qBAAqB;EACnBC,QAAQ;EACRF,OAAO;CACT;AACF;;;;;;;;;;;;;;;;;;;;;;AAqCA,SAAAxB,cAAAgC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAP;CAAA,IAAAC;CAAA,IAAAO;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAN,EAAA,OAAAD,IAAA;EAAqB,MAAA,EAAAI,YAAAI,IAAAX,OAAAY,IAAAX,WAAAY,IAAA,GAAAC,UAAAX;EAAAH,QAAAY;EACnBL,aAAAI,OAAAI,KAAAA,IAAA,QAAAJ;EAEAV,YAAAY,OAAAE,KAAAA,IAAA,OAAAF;EAGQP,KAAAlC;EAA2BmC,KAAAA;EAAgBO,KAAAA;EAAWJ,KAAA5B,oBAAoB,EAAAiB,WACrE,yCACb,GAAGe,KAAK;EAACV,EAAA,KAAAD;EAAAC,EAAA,KAAAE;EAAAF,EAAA,KAAAG;EAAAH,EAAA,KAAAJ;EAAAI,EAAA,KAAAH;EAAAG,EAAA,KAAAI;EAAAJ,EAAA,KAAAK;EAAAL,EAAA,KAAAM;CAAA,OAAA;EAAAJ,KAAAF,EAAA;EAAAG,aAAAH,EAAA;EAAAJ,QAAAI,EAAA;EAAAH,YAAAG,EAAA;EAAAI,KAAAJ,EAAA;EAAAK,KAAAL,EAAA;EAAAM,KAAAN,EAAA;CAAA;CAAA,IAAAO;CAAA,IAAAP,EAAA,OAAAJ,OAAA;EAEFW,KAAAX,UA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A,oBAAC,aAAD;GAAe,GAAKF;GAQlBC,UAAAA;EARa,CAAA;EASEpB,EAAA,MAAAmB;EAAAnB,EAAA,MAAAqB;CAAA,OAAAA,MAAArB,EAAA;CAAA,IAAAsB;CAAA,IAAAtB,EAAA,QAAAqB,OAAArB,EAAA,QAAAY,IAAA;EAVnBU,MAAA,oBAAA,OAAA;GAWM,GAXGV;GACPS,UAAAA;EAUI,CAAA;EAAArB,EAAA,MAAAqB;EAAArB,EAAA,MAAAY;EAAAZ,EAAA,MAAAsB;CAAA,OAAAA,MAAAtB,EAAA;CAAA,IAAAuB;CAAA,IAAAvB,EAAA,QAAAE,MAAAF,EAAA,QAAAI,MAAAJ,EAAA,QAAAsB,OAAAtB,EAAA,QAAAK,MAAAL,EAAA,QAAAM,MAAAN,EAAA,QAAAS,IAAA;EAlBHc,MAAA,qBAAC,IAAD;GAA4BpB,YAAAA;GAAU,GAAMO;GAAK,GAAMJ;GAAvD,UAAA,CAGHG,IAIAa,GAPkB;;EAmBHtB,EAAA,MAAAE;EAAAF,EAAA,MAAAI;EAAAJ,EAAA,MAAAsB;EAAAtB,EAAA,MAAAK;EAAAL,EAAA,MAAAM;EAAAN,EAAA,MAAAS;EAAAT,EAAA,MAAAuB;CAAA,OAAAA,MAAAvB,EAAA;CAAA,OAnBZuB;AAmBY"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { props } from "../../node_modules/@stylexjs/stylex/lib/es/stylex.js";
|
|
2
2
|
import { mergeStyles } from "../../styles/merge.js";
|
|
3
3
|
import { chequer } from "../../styles/chequer.js";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
4
|
import { c } from "react/compiler-runtime";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import { ColorSwatch } from "react-aria-components";
|
|
7
7
|
//#region src/components/color-swatch/index.tsx
|
|
8
8
|
const styles = { ground: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/color-swatch/index.tsx"],"sourcesContent":["import type { CSSProperties } from 'react';\nimport type { ColorSwatchProps as RACColorSwatchProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { ColorSwatch as RACColorSwatch } from 'react-aria-components';\nimport { chequer } from '../../styles/chequer';\nimport { mergeStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, radii } from '../../tokens/design.tokens.stylex';\n\n// A single colour, drawn as a square. The design carries no page for this —\n// its colour guidance is about the roles a component takes, not about\n// showing a colour as a value — so the shape here is the library's own,\n// built from what the rest of it already uses.\n//\n// Three things follow from that, and each is a choice rather than a reading.\n//\n// **A swatch is outlined.** Its own colour is the content, so it cannot\n// carry a contrasting one — and a white swatch on a light surface, or a\n// near-black one in dark mode, would otherwise have no edge at all. The\n// outline is the same hairline a field's box takes.\n//\n// **Transparency is drawn against a chequer rather than against the page.**\n// A half-transparent red over a white surface and an opaque pink are the\n// same pixels; the chequer is what tells them apart. It is built from two\n// surface tokens, so it follows the theme rather than being a fixed grey.\n//\n// **The chequer is a layer behind the swatch, not a background on it.**\n// React Aria sets the colour through the element's own inline\n// `background-color`, and CSS paints a background image over a background\n// colour rather than under it — so a chequer on the same element would\n// cover the colour it is there to reveal.\n\nconst SQUARE = '40px';\nconst styles = {\n ground: {\n kZKoxP: \"x1vqgdyp\",\n kaIpWk: \"x1tfhd1\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x1rg5ohu\",\n kzqmXN: \"x100vrsf\",\n kVQacm: \"xb3r6kr\",\n $$css: true\n }\n};\ntype ColorSwatchProps = Omit<RACColorSwatchProps, 'className' | 'style'> & {\n /**\n * Lands on the square around the swatch, which is the element a layout\n * positions and the one that carries its size.\n */\n className?: string;\n /** Lands on the square around the swatch, as `className` does. */\n style?: CSSProperties;\n};\n\n/**\n * A colour shown as a value: a square of it, with a chequer behind so\n * transparency reads as transparency. The colour is React Aria's — a CSS\n * string, or a `Color` from `parseColor`, which this package re-exports.\n *\n * ```tsx\n * import { parseColor } from '@kanso-labs/kanso-ui'\n *\n * <ColorSwatch color={parseColor('hsla(200, 100%, 50%, 0.4)')} />\n * ```\n *\n * React Aria names it from the colour itself — \"light vibrant cyan blue, 60%\n * transparent\" — so it needs no label. Pass `colorName` to say something\n * else instead.\n *\n * The call site's `className` and `style` land on the square around the\n * swatch rather than on the swatch itself, which is what makes setting a\n * size from outside work — the colour fills whatever square it is given.\n * React Aria's function forms are not taken here, since a swatch has no\n * interactive state for one to read.\n */\nfunction ColorSwatch({\n className,\n style,\n ...props\n}: ColorSwatchProps) {\n return <span {...mergeStyles(stylex.props(chequer.ground, styles.ground), {\n className,\n style\n })}>\n <RACColorSwatch {...props} className=\"x5yr21d x1tfhd1 xbd69nm x9f619 x1lliihq xh8yej3\" />\n </span>;\n}\nexport type { ColorSwatchProps };\nexport default ColorSwatch;"],"mappings":";;;;;;;AAiCA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["CSSProperties","ColorSwatchProps","RACColorSwatchProps","stylex","ColorSwatch","RACColorSwatch","chequer","mergeStyles","colors","radii","SQUARE","styles","ground","kZKoxP","kaIpWk","kB7OPa","k1xSpc","kzqmXN","kVQacm","$$css","Omit","className","style","t0","$","_c","props","t1","t2","t3"],"sources":["../../../src/components/color-swatch/index.tsx"],"sourcesContent":["import type { CSSProperties } from 'react';\nimport type { ColorSwatchProps as RACColorSwatchProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { ColorSwatch as RACColorSwatch } from 'react-aria-components';\nimport { chequer } from '../../styles/chequer';\nimport { mergeStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, radii } from '../../tokens/design.tokens.stylex';\n\n// A single colour, drawn as a square. The design carries no page for this —\n// its colour guidance is about the roles a component takes, not about\n// showing a colour as a value — so the shape here is the library's own,\n// built from what the rest of it already uses.\n//\n// Three things follow from that, and each is a choice rather than a reading.\n//\n// **A swatch is outlined.** Its own colour is the content, so it cannot\n// carry a contrasting one — and a white swatch on a light surface, or a\n// near-black one in dark mode, would otherwise have no edge at all. The\n// outline is the same hairline a field's box takes.\n//\n// **Transparency is drawn against a chequer rather than against the page.**\n// A half-transparent red over a white surface and an opaque pink are the\n// same pixels; the chequer is what tells them apart. It is built from two\n// surface tokens, so it follows the theme rather than being a fixed grey.\n//\n// **The chequer is a layer behind the swatch, not a background on it.**\n// React Aria sets the colour through the element's own inline\n// `background-color`, and CSS paints a background image over a background\n// colour rather than under it — so a chequer on the same element would\n// cover the colour it is there to reveal.\n\nconst SQUARE = '40px';\nconst styles = {\n ground: {\n kZKoxP: \"x1vqgdyp\",\n kaIpWk: \"x1tfhd1\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x1rg5ohu\",\n kzqmXN: \"x100vrsf\",\n kVQacm: \"xb3r6kr\",\n $$css: true\n }\n};\ntype ColorSwatchProps = Omit<RACColorSwatchProps, 'className' | 'style'> & {\n /**\n * Lands on the square around the swatch, which is the element a layout\n * positions and the one that carries its size.\n */\n className?: string;\n /** Lands on the square around the swatch, as `className` does. */\n style?: CSSProperties;\n};\n\n/**\n * A colour shown as a value: a square of it, with a chequer behind so\n * transparency reads as transparency. The colour is React Aria's — a CSS\n * string, or a `Color` from `parseColor`, which this package re-exports.\n *\n * ```tsx\n * import { parseColor } from '@kanso-labs/kanso-ui'\n *\n * <ColorSwatch color={parseColor('hsla(200, 100%, 50%, 0.4)')} />\n * ```\n *\n * React Aria names it from the colour itself — \"light vibrant cyan blue, 60%\n * transparent\" — so it needs no label. Pass `colorName` to say something\n * else instead.\n *\n * The call site's `className` and `style` land on the square around the\n * swatch rather than on the swatch itself, which is what makes setting a\n * size from outside work — the colour fills whatever square it is given.\n * React Aria's function forms are not taken here, since a swatch has no\n * interactive state for one to read.\n */\nfunction ColorSwatch({\n className,\n style,\n ...props\n}: ColorSwatchProps) {\n return <span {...mergeStyles(stylex.props(chequer.ground, styles.ground), {\n className,\n style\n })}>\n <RACColorSwatch {...props} className=\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K;CAAA,OAAAA,KAAAL,EAAA;CAAA,OALFK;AAKE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mergeStatefulStyles } from "../../styles/merge.js";
|
|
2
2
|
import ColorSwatch$1 from "../color-swatch/index.js";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
3
|
import { c } from "react/compiler-runtime";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import { ColorSwatchPicker, ColorSwatchPickerItem } from "react-aria-components";
|
|
6
6
|
//#region src/components/color-swatch-picker/index.tsx
|
|
7
7
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["itemClassName"],"sources":["../../../src/components/color-swatch-picker/index.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport type { ColorSwatchPickerItemProps as RACColorSwatchPickerItemProps, ColorSwatchPickerProps as RACColorSwatchPickerProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { ColorSwatchPicker as RACColorSwatchPicker, ColorSwatchPickerItem as RACColorSwatchPickerItem } from 'react-aria-components';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, radii, spacing, stateLayerOpacity } from '../../tokens/design.tokens.stylex';\nimport ColorSwatch from '../color-swatch';\n\n// A row of colours to choose one from. React Aria makes it a listbox of\n// swatches, so it is a selection control rather than a palette: arrow keys\n// move between colours and one of them is selected.\n//\n// The design carries no page for this either, so what an item looks like\n// when it is chosen is the library's own. Three choices, each with its\n// reason.\n//\n// **Selection is a ring around the swatch, not a mark on it.** A tick drawn\n// over a colour has to be readable against every colour in the row, which no\n// single ink is; a ring sits outside the swatch and needs only to read\n// against the surface behind it.\n//\n// **The ring is the primary role, and offset.** It is the same weight and\n// colour the focus ring takes elsewhere, one step out from the swatch so the\n// colour stays whole — a ring drawn on the swatch would eat two pixels of\n// the thing being chosen.\n//\n// **Focus and selection are drawn at different offsets.** A focused\n// selected swatch would otherwise paint one ring over the other and lose\n// whichever came second, so the focus ring sits outside the selection one.\n\ntype ColorSwatchPickerItemProps = Omit<RACColorSwatchPickerItemProps, 'children' | 'className' | 'style'> & {\n /** What the item draws. A `ColorSwatch` with no `color` of its own by default. */\n children?: ReactNode;\n /** A function may compute the class from the item's render state. */\n className?: RACColorSwatchPickerItemProps['className'];\n /** A function may compute the style from the item's render state. */\n style?: RACColorSwatchPickerItemProps['style'];\n};\ntype ColorSwatchPickerProps = Omit<RACColorSwatchPickerProps, 'className' | 'style'> & {\n /** A function may compute the class from the picker's render state. */\n className?: RACColorSwatchPickerProps['className'];\n /** A function may compute the style from the picker's render state. */\n style?: RACColorSwatchPickerProps['style'];\n};\n\n/**\n * A row of colours to choose one from, drawn as swatches. The value is React\n * Aria's — pass `value` with `onChange` to control it, or `defaultValue` —\n * as a CSS colour string or a `Color` from `parseColor`, which this package\n * re-exports.\n *\n * ```tsx\n * <ColorSwatchPicker defaultValue=\"#6750A4\">\n * <ColorSwatchPicker.Item color=\"#6750A4\" />\n * <ColorSwatchPicker.Item color=\"#625B71\" />\n * </ColorSwatchPicker>\n * ```\n *\n * It is a listbox, so arrow keys move between colours and the chosen one\n * carries a ring. Name it with `aria-label` or `aria-labelledby`; React Aria\n * calls it \"Color swatches\" otherwise.\n *\n * The call site's `className` and `style` land on the picker, which is the\n * element a layout positions.\n */\nfunction ColorSwatchPicker(props: ColorSwatchPickerProps) {\n return <RACColorSwatchPicker {...props} {...mergeStatefulStyles({\n className: \"x9f619 x78zum5 x1a02dak x126z3so x1t137rt\"\n }, props)} />;\n}\n\n/**\n * One swatch in a {@link ColorSwatchPicker}. Renders a `ColorSwatch` of its\n * own `color` unless given different children.\n */\nfunction ColorSwatchPickerItem({\n children,\n ...props\n}: ColorSwatchPickerItemProps) {\n return <RACColorSwatchPickerItem {...props} className={itemClassName}>\n {children ?? <ColorSwatch />}\n </RACColorSwatchPickerItem>;\n}\n\n// The item's classes, from React Aria's render state. StyleX cannot target\n// `[data-selected]` on the element it is styling, so the state comes from\n// what React Aria hands the className.\n//\n// The order matters. `focused` is applied after `selected`, and StyleX\n// replaces a property whole, so a swatch that is both takes the focus ring's\n// outer offset — which is what keeps the two rings from landing on each\n// other. `disabled` is last, so it takes the cursor with it.\nfunction itemClassName(state: {\n isDisabled: boolean;\n isFocusVisible: boolean;\n isSelected: boolean;\n}) {\n return {\n 0: {\n className: \"x1tfhd1 x9f619 x1ypdohk x3nfvp2 xrgy624 x1hl8ikr x1t137rt x1de99jn\"\n },\n 4: {\n className: \"x1tfhd1 x9f619 x1ypdohk x3nfvp2 xrgy624 x1de99jn x1hl8ikr xaatb59\"\n },\n 2: {\n className: \"x1tfhd1 x9f619 x1ypdohk x3nfvp2 x1de99jn xrgy624 x8wkva7 xaatb59\"\n },\n 6: {\n className: \"x1tfhd1 x9f619 x1ypdohk x3nfvp2 x1de99jn xrgy624 x8wkva7 xaatb59\"\n },\n 1: {\n className: \"x1tfhd1 x9f619 x3nfvp2 xrgy624 x1hl8ikr x1t137rt x1de99jn xt0e3qv x1ppv7y9\"\n },\n 5: {\n className: \"x1tfhd1 x9f619 x3nfvp2 xrgy624 x1de99jn x1hl8ikr xaatb59 xt0e3qv x1ppv7y9\"\n },\n 3: {\n className: \"x1tfhd1 x9f619 x3nfvp2 x1de99jn xrgy624 x8wkva7 xaatb59 xt0e3qv x1ppv7y9\"\n },\n 7: {\n className: \"x1tfhd1 x9f619 x3nfvp2 x1de99jn xrgy624 x8wkva7 xaatb59 xt0e3qv x1ppv7y9\"\n }\n }[!!state.isSelected << 2 | !!state.isFocusVisible << 1 | !!state.isDisabled << 0].className ?? '';\n}\nColorSwatchPicker.Item = ColorSwatchPickerItem;\nexport type { ColorSwatchPickerItemProps, ColorSwatchPickerProps };\nexport default ColorSwatchPicker;"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAkEA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["ReactNode","ColorSwatchPickerItemProps","RACColorSwatchPickerItemProps","ColorSwatchPickerProps","RACColorSwatchPickerProps","stylex","ColorSwatchPicker","RACColorSwatchPicker","ColorSwatchPickerItem","RACColorSwatchPickerItem","mergeStatefulStyles","colors","radii","spacing","stateLayerOpacity","ColorSwatch","Omit","children","className","style","props","$","_c","t0","t1","t2","itemClassName","state","isDisabled","isFocusVisible","isSelected","Item"],"sources":["../../../src/components/color-swatch-picker/index.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport type { ColorSwatchPickerItemProps as RACColorSwatchPickerItemProps, ColorSwatchPickerProps as RACColorSwatchPickerProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { ColorSwatchPicker as RACColorSwatchPicker, ColorSwatchPickerItem as RACColorSwatchPickerItem } from 'react-aria-components';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, radii, spacing, stateLayerOpacity } from '../../tokens/design.tokens.stylex';\nimport ColorSwatch from '../color-swatch';\n\n// A row of colours to choose one from. React Aria makes it a listbox of\n// swatches, so it is a selection control rather than a palette: arrow keys\n// move between colours and one of them is selected.\n//\n// The design carries no page for this either, so what an item looks like\n// when it is chosen is the library's own. Three choices, each with its\n// reason.\n//\n// **Selection is a ring around the swatch, not a mark on it.** A tick drawn\n// over a colour has to be readable against every colour in the row, which no\n// single ink is; a ring sits outside the swatch and needs only to read\n// against the surface behind it.\n//\n// **The ring is the primary role, and offset.** It is the same weight and\n// colour the focus ring takes elsewhere, one step out from the swatch so the\n// colour stays whole — a ring drawn on the swatch would eat two pixels of\n// the thing being chosen.\n//\n// **Focus and selection are drawn at different offsets.** A focused\n// selected swatch would otherwise paint one ring over the other and lose\n// whichever came second, so the focus ring sits outside the selection one.\n\ntype ColorSwatchPickerItemProps = Omit<RACColorSwatchPickerItemProps, 'children' | 'className' | 'style'> & {\n /** What the item draws. A `ColorSwatch` with no `color` of its own by default. */\n children?: ReactNode;\n /** A function may compute the class from the item's render state. */\n className?: RACColorSwatchPickerItemProps['className'];\n /** A function may compute the style from the item's render state. */\n style?: RACColorSwatchPickerItemProps['style'];\n};\ntype ColorSwatchPickerProps = Omit<RACColorSwatchPickerProps, 'className' | 'style'> & {\n /** A function may compute the class from the picker's render state. */\n className?: RACColorSwatchPickerProps['className'];\n /** A function may compute the style from the picker's render state. */\n style?: RACColorSwatchPickerProps['style'];\n};\n\n/**\n * A row of colours to choose one from, drawn as swatches. The value is React\n * Aria's — pass `value` with `onChange` to control it, or `defaultValue` —\n * as a CSS colour string or a `Color` from `parseColor`, which this package\n * re-exports.\n *\n * ```tsx\n * <ColorSwatchPicker defaultValue=\"#6750A4\">\n * <ColorSwatchPicker.Item color=\"#6750A4\" />\n * <ColorSwatchPicker.Item color=\"#625B71\" />\n * </ColorSwatchPicker>\n * ```\n *\n * It is a listbox, so arrow keys move between colours and the chosen one\n * carries a ring. Name it with `aria-label` or `aria-labelledby`; React Aria\n * calls it \"Color swatches\" otherwise.\n *\n * The call site's `className` and `style` land on the picker, which is the\n * element a layout positions.\n */\nfunction ColorSwatchPicker(props: ColorSwatchPickerProps) {\n return <RACColorSwatchPicker {...props} {...mergeStatefulStyles({\n className: \"x9f619 x78zum5 x1a02dak x126z3so x1t137rt\"\n }, props)} />;\n}\n\n/**\n * One swatch in a {@link ColorSwatchPicker}. Renders a `ColorSwatch` of its\n * own `color` unless given different children.\n */\nfunction ColorSwatchPickerItem({\n children,\n ...props\n}: ColorSwatchPickerItemProps) {\n return <RACColorSwatchPickerItem {...props} className={itemClassName}>\n {children ?? <ColorSwatch />}\n </RACColorSwatchPickerItem>;\n}\n\n// The item's classes, from React Aria's render state. StyleX cannot target\n// `[data-selected]` on the element it is styling, so the state comes from\n// what React Aria hands the className.\n//\n// The order matters. `focused` is applied after `selected`, and StyleX\n// replaces a property whole, so a swatch that is both takes the focus ring's\n// outer offset — which is what keeps the two rings from landing on each\n// other. `disabled` is last, so it takes the cursor with it.\nfunction itemClassName(state: {\n isDisabled: boolean;\n isFocusVisible: boolean;\n isSelected: boolean;\n}) {\n return {\n 0: {\n className: \"x1tfhd1 x9f619 x1ypdohk x3nfvp2 xrgy624 x1hl8ikr x1t137rt x1de99jn\"\n },\n 4: {\n className: \"x1tfhd1 x9f619 x1ypdohk x3nfvp2 xrgy624 x1de99jn x1hl8ikr xaatb59\"\n },\n 2: {\n className: \"x1tfhd1 x9f619 x1ypdohk x3nfvp2 x1de99jn xrgy624 x8wkva7 xaatb59\"\n },\n 6: {\n className: \"x1tfhd1 x9f619 x1ypdohk x3nfvp2 x1de99jn xrgy624 x8wkva7 xaatb59\"\n },\n 1: {\n className: \"x1tfhd1 x9f619 x3nfvp2 xrgy624 x1hl8ikr x1t137rt x1de99jn xt0e3qv x1ppv7y9\"\n },\n 5: {\n className: \"x1tfhd1 x9f619 x3nfvp2 xrgy624 x1de99jn x1hl8ikr xaatb59 xt0e3qv x1ppv7y9\"\n },\n 3: {\n className: \"x1tfhd1 x9f619 x3nfvp2 x1de99jn xrgy624 x8wkva7 xaatb59 xt0e3qv x1ppv7y9\"\n },\n 7: {\n className: \"x1tfhd1 x9f619 x3nfvp2 x1de99jn xrgy624 x8wkva7 xaatb59 xt0e3qv x1ppv7y9\"\n }\n }[!!state.isSelected << 2 | !!state.isFocusVisible << 1 | !!state.isDisabled << 0].className ?? '';\n}\nColorSwatchPicker.Item = ColorSwatchPickerItem;\nexport type { ColorSwatchPickerItemProps, ColorSwatchPickerProps };\nexport default ColorSwatchPicker;"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAkEA,SAAAM,oBAAAc,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAC;CAAA,IAAAF,EAAA,OAAAD,OAAA;EAC8CG,KAAAb,oBAAoB,EAAAQ,WACnD,4CACb,GAAGE,KAAK;EAACC,EAAA,KAAAD;EAAAC,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAAA,IAAAG;CAAA,IAAAH,EAAA,OAAAD,SAAAC,EAAA,OAAAE,IA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