@bolerish/ui 0.13.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/alert-dialog.js +69 -17
- package/dist/alert-dialog.js.map +3 -3
- package/dist/attachment.js +89 -10
- package/dist/attachment.js.map +4 -4
- package/dist/button-group.js +84 -5
- package/dist/button-group.js.map +4 -4
- package/dist/button.d.ts +10 -2
- package/dist/button.js +81 -2
- package/dist/button.js.map +4 -4
- package/dist/calendar.js +16 -11
- package/dist/calendar.js.map +2 -2
- package/dist/card.js +70 -18
- package/dist/card.js.map +3 -3
- package/dist/carousel.d.ts +2 -2
- package/dist/carousel.js +78 -43
- package/dist/carousel.js.map +2 -2
- package/dist/combobox.d.ts +2 -1
- package/dist/combobox.js +140 -77
- package/dist/combobox.js.map +3 -3
- package/dist/date-picker.js +152 -37
- package/dist/date-picker.js.map +4 -4
- package/dist/dialog.d.ts +1 -1
- package/dist/dialog.js +69 -17
- package/dist/dialog.js.map +3 -3
- package/dist/drawer.js +73 -21
- package/dist/drawer.js.map +3 -3
- package/dist/dropdown-menu.d.ts +1 -1
- package/dist/dropdown-menu.js +76 -20
- package/dist/dropdown-menu.js.map +3 -3
- package/dist/global.css +33 -0
- package/dist/hover-card.d.ts +1 -1
- package/dist/hover-card.js +66 -14
- package/dist/hover-card.js.map +3 -3
- package/dist/index.d.ts +6 -2
- package/dist/index.js +19 -15
- package/dist/index.js.map +2 -2
- package/dist/input-group.d.ts +1 -1
- package/dist/input-group.js +111 -44
- package/dist/input-group.js.map +4 -4
- package/dist/input-otp.js +84 -5
- package/dist/input-otp.js.map +4 -4
- package/dist/input.d.ts +1 -1
- package/dist/input.js +122 -17
- package/dist/input.js.map +4 -4
- package/dist/item.d.ts +32 -0
- package/dist/{content-row.js → item.js} +103 -24
- package/dist/item.js.map +7 -0
- package/dist/liquid-refraction.svg +7 -0
- package/dist/liquid.d.ts +10 -0
- package/dist/liquid.js +229 -0
- package/dist/liquid.js.map +7 -0
- package/dist/menubar.d.ts +1 -1
- package/dist/menubar.js +66 -14
- package/dist/menubar.js.map +3 -3
- package/dist/native-select.js +102 -22
- package/dist/native-select.js.map +4 -4
- package/dist/navigation-menu.js +71 -19
- package/dist/navigation-menu.js.map +3 -3
- package/dist/pagination.js +2 -0
- package/dist/pagination.js.map +2 -2
- package/dist/popover.js +70 -16
- package/dist/popover.js.map +3 -3
- package/dist/select.js +75 -18
- package/dist/select.js.map +3 -3
- package/dist/slider.d.ts +1 -1
- package/dist/slider.js +60 -48
- package/dist/slider.js.map +2 -2
- package/dist/styles/liquid-map.d.ts +5 -0
- package/dist/styles/surface.d.ts +152 -13
- package/dist/stylex.css +205 -17
- package/dist/surface.d.ts +12 -0
- package/dist/surface.js +12 -0
- package/dist/surface.js.map +7 -0
- package/dist/textarea.js +81 -2
- package/dist/textarea.js.map +4 -4
- package/dist/toast.d.ts +3 -1
- package/dist/toast.js +127 -61
- package/dist/toast.js.map +3 -3
- package/dist/toggle-group.js +82 -3
- package/dist/toggle-group.js.map +4 -4
- package/dist/toggle.js +81 -2
- package/dist/toggle.js.map +4 -4
- package/dist/tooltip.d.ts +1 -1
- package/dist/tooltip.js +85 -2
- package/dist/tooltip.js.map +4 -4
- package/package.json +10 -5
- package/dist/content-row.d.ts +0 -32
- package/dist/content-row.js.map +0 -7
package/dist/liquid.js
ADDED
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/liquid.tsx
|
|
4
|
+
import * as stylex from "@stylexjs/stylex";
|
|
5
|
+
import { useEffect, useId, useRef, useState } from "react";
|
|
6
|
+
|
|
7
|
+
// src/styles/liquid-map.ts
|
|
8
|
+
function createLiquidMap(width, height, radius) {
|
|
9
|
+
if (![width, height, radius].every(Number.isFinite) || width <= 0 || height <= 0 || radius < 0)
|
|
10
|
+
throw new RangeError(
|
|
11
|
+
"Liquid geometry must be finite with positive dimensions and a non-negative radius."
|
|
12
|
+
);
|
|
13
|
+
const ratio = Math.min(1, 256 / Math.max(width, height));
|
|
14
|
+
const mapWidth = Math.max(1, Math.round(width * ratio));
|
|
15
|
+
const mapHeight = Math.max(1, Math.round(height * ratio));
|
|
16
|
+
const data = new Uint8ClampedArray(mapWidth * mapHeight * 4);
|
|
17
|
+
const corner = Math.min(radius, width / 2, height / 2);
|
|
18
|
+
const band = Math.min(16, width / 4, height / 4);
|
|
19
|
+
const distance = (x, y) => {
|
|
20
|
+
const dx = Math.abs(x - width / 2) - (width / 2 - corner);
|
|
21
|
+
const dy = Math.abs(y - height / 2) - (height / 2 - corner);
|
|
22
|
+
return Math.hypot(Math.max(dx, 0), Math.max(dy, 0)) + Math.min(Math.max(dx, dy), 0) - corner;
|
|
23
|
+
};
|
|
24
|
+
for (let y = 0; y < mapHeight; y++) {
|
|
25
|
+
for (let x = 0; x < mapWidth; x++) {
|
|
26
|
+
const px = (x + 0.5) * width / mapWidth;
|
|
27
|
+
const py = (y + 0.5) * height / mapHeight;
|
|
28
|
+
const d = distance(px, py);
|
|
29
|
+
const amount = d <= 0 ? Math.max(0, 1 + d / band) ** 2 : 0;
|
|
30
|
+
const nx = distance(px + 0.5, py) - distance(px - 0.5, py);
|
|
31
|
+
const ny = distance(px, py + 0.5) - distance(px, py - 0.5);
|
|
32
|
+
const length = Math.hypot(nx, ny) || 1;
|
|
33
|
+
const index = (y * mapWidth + x) * 4;
|
|
34
|
+
data[index] = Math.round(128 - nx / length * amount * 120);
|
|
35
|
+
data[index + 1] = Math.round(128 - ny / length * amount * 120);
|
|
36
|
+
data[index + 2] = 128;
|
|
37
|
+
data[index + 3] = 255;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return { width: mapWidth, height: mapHeight, data };
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// src/styles/merge-styles.ts
|
|
44
|
+
function mergeStyles(base, className, style) {
|
|
45
|
+
if (className === void 0 && style === void 0) return base;
|
|
46
|
+
return {
|
|
47
|
+
...base,
|
|
48
|
+
className: [base.className, className].filter(Boolean).join(" ") || void 0,
|
|
49
|
+
style: base.style || style ? {
|
|
50
|
+
...base.style,
|
|
51
|
+
...style
|
|
52
|
+
} : void 0
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// src/styles/surface.ts
|
|
57
|
+
var styles = {
|
|
58
|
+
edge: {
|
|
59
|
+
kVAM5u: "x1kqtvf4",
|
|
60
|
+
kFGkbq: "x1w1tqly",
|
|
61
|
+
$$css: true
|
|
62
|
+
},
|
|
63
|
+
material: {
|
|
64
|
+
"--bolerish-material-shadow": "xvd6nka",
|
|
65
|
+
kGVxlE: "x16ifxj2 xpqbwuo",
|
|
66
|
+
kWkggS: "x1s4uome x1u5mdis",
|
|
67
|
+
k6WDB: "x1t853zo x1o5bnqd",
|
|
68
|
+
kKwaWg: "x18o3ruo xxit9r9",
|
|
69
|
+
kTahiY: "x1cg02ou",
|
|
70
|
+
kEcs6k: "x11rvarm",
|
|
71
|
+
kWrjR8: "x1ile18z",
|
|
72
|
+
kfloDl: "x1m3y3zz",
|
|
73
|
+
kO6drA: "x9yvj25",
|
|
74
|
+
kkTUmj: "x14hm74v",
|
|
75
|
+
k11ilZ: "xhobzj1",
|
|
76
|
+
ktzNWN: "xwaqzdf",
|
|
77
|
+
$$css: true
|
|
78
|
+
},
|
|
79
|
+
panel: {
|
|
80
|
+
"--bolerish-material-color": "x14zkn9l",
|
|
81
|
+
"--bolerish-material-opacity": "x8fe23t",
|
|
82
|
+
"--bolerish-material-filter": "x1n6mwez",
|
|
83
|
+
$$css: true
|
|
84
|
+
},
|
|
85
|
+
control: {
|
|
86
|
+
"--bolerish-material-color": "x14zkn9l",
|
|
87
|
+
"--bolerish-material-opacity": "xg4j6g8",
|
|
88
|
+
"--bolerish-material-filter": "x1mpfm11",
|
|
89
|
+
$$css: true
|
|
90
|
+
},
|
|
91
|
+
subtle: {
|
|
92
|
+
"--bolerish-material-color": "x1819ggx",
|
|
93
|
+
"--bolerish-material-opacity": "xg4j6g8",
|
|
94
|
+
"--bolerish-material-filter": "x1mpfm11",
|
|
95
|
+
$$css: true
|
|
96
|
+
},
|
|
97
|
+
outline: {
|
|
98
|
+
"--bolerish-material-color": "x3m3fbl",
|
|
99
|
+
"--bolerish-material-opacity": "xg4j6g8",
|
|
100
|
+
"--bolerish-material-filter": "x1mpfm11",
|
|
101
|
+
$$css: true
|
|
102
|
+
},
|
|
103
|
+
raised: {
|
|
104
|
+
"--bolerish-material-shadow": "x1l9gcvt",
|
|
105
|
+
"--bolerish-material-color": "x1y5ilfp",
|
|
106
|
+
"--bolerish-material-opacity": "x1nqk09",
|
|
107
|
+
"--bolerish-material-filter": "x1gkvbmm",
|
|
108
|
+
$$css: true
|
|
109
|
+
},
|
|
110
|
+
translucent: {
|
|
111
|
+
"--bolerish-material-color": "x14zkn9l",
|
|
112
|
+
"--bolerish-material-opacity": "xoh9gux",
|
|
113
|
+
"--bolerish-material-filter": "xhu24am",
|
|
114
|
+
$$css: true
|
|
115
|
+
},
|
|
116
|
+
floating: {
|
|
117
|
+
"--bolerish-material-shadow": "xu02b4h",
|
|
118
|
+
"--bolerish-material-color": "x1y5ilfp",
|
|
119
|
+
"--bolerish-material-opacity": "x14p89z6",
|
|
120
|
+
"--bolerish-material-filter": "xunhrho",
|
|
121
|
+
$$css: true
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
var surfaceStyles = {
|
|
125
|
+
edge: styles.edge,
|
|
126
|
+
panel: [styles.material, styles.panel],
|
|
127
|
+
control: [styles.material, styles.control],
|
|
128
|
+
subtle: [styles.material, styles.subtle],
|
|
129
|
+
outline: [styles.material, styles.outline],
|
|
130
|
+
raised: [styles.material, styles.raised],
|
|
131
|
+
translucent: [styles.material, styles.translucent],
|
|
132
|
+
floating: [styles.material, styles.floating]
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
// src/liquid.tsx
|
|
136
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
137
|
+
var styles2 = {
|
|
138
|
+
root: {
|
|
139
|
+
kaIpWk: "x9up7g5",
|
|
140
|
+
kMwMTN: "x1t28c4i",
|
|
141
|
+
kMv6JI: "x1b1to7n",
|
|
142
|
+
kHBbk8: "xc8icb0",
|
|
143
|
+
k7Eaqz: "xeuugli",
|
|
144
|
+
kVAEAm: "x1n2onr6",
|
|
145
|
+
$$css: true
|
|
146
|
+
},
|
|
147
|
+
tint: {
|
|
148
|
+
"--bolerish-material-opacity": "xf4qlvf",
|
|
149
|
+
"--bolerish-material-filter": "x9f78pr",
|
|
150
|
+
"--bolerish-surface-reflection": "xepbi11",
|
|
151
|
+
kaIpWk: "x1pjcqnp",
|
|
152
|
+
kpwlN0: "x10a8y8t",
|
|
153
|
+
kfzvcC: "x47corl",
|
|
154
|
+
kVAEAm: "x10l6tqk",
|
|
155
|
+
$$css: true
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
function Liquid({
|
|
159
|
+
background,
|
|
160
|
+
children,
|
|
161
|
+
className,
|
|
162
|
+
style,
|
|
163
|
+
xstyle,
|
|
164
|
+
...props2
|
|
165
|
+
}) {
|
|
166
|
+
const backgroundRef = useRef(null);
|
|
167
|
+
const id = useId().replace(/:/g, "");
|
|
168
|
+
const [map, setMap] = useState();
|
|
169
|
+
useEffect(() => {
|
|
170
|
+
const element = backgroundRef.current;
|
|
171
|
+
if (!element || typeof ResizeObserver === "undefined") return;
|
|
172
|
+
let revision = 0;
|
|
173
|
+
let frame = 0;
|
|
174
|
+
const observer = new ResizeObserver(([entry]) => {
|
|
175
|
+
cancelAnimationFrame(frame);
|
|
176
|
+
frame = requestAnimationFrame(() => {
|
|
177
|
+
const {
|
|
178
|
+
width,
|
|
179
|
+
height
|
|
180
|
+
} = entry.contentRect;
|
|
181
|
+
if (!width || !height || width > 1024 || height > 1024) {
|
|
182
|
+
setMap(void 0);
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
try {
|
|
186
|
+
const value = getComputedStyle(element).borderTopLeftRadius;
|
|
187
|
+
const radius = (parseFloat(value) || 0) * (value.endsWith("%") ? Math.min(width, height) / 100 : 1);
|
|
188
|
+
const pixels = createLiquidMap(width, height, radius);
|
|
189
|
+
const canvas = document.createElement("canvas");
|
|
190
|
+
canvas.width = pixels.width;
|
|
191
|
+
canvas.height = pixels.height;
|
|
192
|
+
const context = canvas.getContext("2d");
|
|
193
|
+
if (!context) {
|
|
194
|
+
setMap(void 0);
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
context.putImageData(new ImageData(pixels.data, pixels.width, pixels.height), 0, 0);
|
|
198
|
+
setMap({
|
|
199
|
+
url: canvas.toDataURL(),
|
|
200
|
+
revision: ++revision
|
|
201
|
+
});
|
|
202
|
+
} catch {
|
|
203
|
+
setMap(void 0);
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
});
|
|
207
|
+
observer.observe(element);
|
|
208
|
+
return () => {
|
|
209
|
+
observer.disconnect();
|
|
210
|
+
cancelAnimationFrame(frame);
|
|
211
|
+
};
|
|
212
|
+
}, []);
|
|
213
|
+
const filterId = `${id}-liquid-${map?.revision ?? 0}`;
|
|
214
|
+
return /* @__PURE__ */ jsxs("div", { ...props2, ...mergeStyles(stylex.props(styles2.root, xstyle), className, style), children: [
|
|
215
|
+
/* @__PURE__ */ jsx("div", { className: "x1pjcqnp x1ctqcxj x10a8y8t xb3r6kr x47corl x10l6tqk x1izksy x1c7sf14", ref: backgroundRef, "aria-hidden": "true", inert: true, style: map ? {
|
|
216
|
+
filter: `url(#${filterId})`
|
|
217
|
+
} : void 0, children: background }),
|
|
218
|
+
/* @__PURE__ */ jsx("div", { "aria-hidden": "true", ...stylex.props(surfaceStyles.panel, styles2.tint) }),
|
|
219
|
+
/* @__PURE__ */ jsx("div", { className: "x1n2onr6", children }),
|
|
220
|
+
/* @__PURE__ */ jsx("svg", { className: "x10l6tqk x47corl", width: "0", height: "0", "aria-hidden": "true", focusable: "false", children: /* @__PURE__ */ jsx("defs", { children: map ? /* @__PURE__ */ jsxs("filter", { id: filterId, x: "0", y: "0", width: "100%", height: "100%", colorInterpolationFilters: "sRGB", children: [
|
|
221
|
+
/* @__PURE__ */ jsx("feImage", { href: map.url, width: "100%", height: "100%", preserveAspectRatio: "none", result: "map" }),
|
|
222
|
+
/* @__PURE__ */ jsx("feDisplacementMap", { in: "SourceGraphic", in2: "map", scale: "12", xChannelSelector: "R", yChannelSelector: "G" })
|
|
223
|
+
] }) : null }) })
|
|
224
|
+
] });
|
|
225
|
+
}
|
|
226
|
+
export {
|
|
227
|
+
Liquid
|
|
228
|
+
};
|
|
229
|
+
//# sourceMappingURL=liquid.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/liquid.tsx", "../src/styles/liquid-map.ts", "../src/styles/merge-styles.ts", "../src/styles/surface.ts"],
|
|
4
|
+
"sourcesContent": ["\"use client\";\n\nimport { colorVars, radiusVars, typo } from \"@bolerish/tokens/semantic.stylex\";\nimport * as stylex from \"@stylexjs/stylex\";\nimport { useEffect, useId, useRef, useState, type ComponentProps, type ReactNode } from \"react\";\nimport { createLiquidMap } from \"./styles/liquid-map\";\nimport { mergeStyles, type StyledProps } from \"./styles/merge-styles\";\nimport { surfaceStyles } from \"./styles/surface\";\nconst styles = {\n root: {\n kaIpWk: \"x9up7g5\",\n kMwMTN: \"x1t28c4i\",\n kMv6JI: \"x1b1to7n\",\n kHBbk8: \"xc8icb0\",\n k7Eaqz: \"xeuugli\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n tint: {\n \"--bolerish-material-opacity\": \"xf4qlvf\",\n \"--bolerish-material-filter\": \"x9f78pr\",\n \"--bolerish-surface-reflection\": \"xepbi11\",\n kaIpWk: \"x1pjcqnp\",\n kpwlN0: \"x10a8y8t\",\n kfzvcC: \"x47corl\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n }\n};\nexport type LiquidProps = StyledProps<ComponentProps<\"div\">> & {\n /** A decorative background owned by this liquid, not a snapshot of the page. */\n background: ReactNode;\n xstyle?: stylex.StyleXStyles;\n};\n\n/** Refracts an explicit decorative background while foreground controls remain sharp. */\nexport function Liquid({\n background,\n children,\n className,\n style,\n xstyle,\n ...props\n}: LiquidProps) {\n const backgroundRef = useRef<HTMLDivElement>(null);\n const id = useId().replace(/:/g, \"\");\n const [map, setMap] = useState<{\n url: string;\n revision: number;\n }>();\n useEffect(() => {\n const element = backgroundRef.current;\n if (!element || typeof ResizeObserver === \"undefined\") return;\n let revision = 0;\n let frame = 0;\n const observer = new ResizeObserver(([entry]) => {\n cancelAnimationFrame(frame);\n frame = requestAnimationFrame(() => {\n const {\n width,\n height\n } = entry.contentRect;\n // shortcut: large SVG sources vary across WebKit versions; use the plain material above 1024px.\n if (!width || !height || width > 1024 || height > 1024) {\n setMap(undefined);\n return;\n }\n try {\n const value = getComputedStyle(element).borderTopLeftRadius;\n const radius = (parseFloat(value) || 0) * (value.endsWith(\"%\") ? Math.min(width, height) / 100 : 1);\n const pixels = createLiquidMap(width, height, radius);\n const canvas = document.createElement(\"canvas\");\n canvas.width = pixels.width;\n canvas.height = pixels.height;\n const context = canvas.getContext(\"2d\");\n if (!context) {\n setMap(undefined);\n return;\n }\n context.putImageData(new ImageData(pixels.data, pixels.width, pixels.height), 0, 0);\n // WebKit caches filter output by ID; resized lenses need a fresh ID.\n setMap({\n url: canvas.toDataURL(),\n revision: ++revision\n });\n } catch {\n setMap(undefined);\n }\n });\n });\n observer.observe(element);\n return () => {\n observer.disconnect();\n cancelAnimationFrame(frame);\n };\n }, []);\n const filterId = `${id}-liquid-${map?.revision ?? 0}`;\n return <div {...props} {...mergeStyles(stylex.props(styles.root, xstyle), className, style)}>\n <div className=\"x1pjcqnp x1ctqcxj x10a8y8t xb3r6kr x47corl x10l6tqk x1izksy x1c7sf14\" ref={backgroundRef} aria-hidden=\"true\" inert style={map ? {\n filter: `url(#${filterId})`\n } : undefined}>\n {background}\n </div>\n <div aria-hidden=\"true\" {...stylex.props(surfaceStyles.panel, styles.tint)} />\n <div className=\"x1n2onr6\">{children}</div>\n <svg className=\"x10l6tqk x47corl\" width=\"0\" height=\"0\" aria-hidden=\"true\" focusable=\"false\">\n <defs>\n {map ? <filter id={filterId} x=\"0\" y=\"0\" width=\"100%\" height=\"100%\" colorInterpolationFilters=\"sRGB\">\n <feImage href={map.url} width=\"100%\" height=\"100%\" preserveAspectRatio=\"none\" result=\"map\" />\n <feDisplacementMap in=\"SourceGraphic\" in2=\"map\" scale=\"12\" xChannelSelector=\"R\" yChannelSelector=\"G\" />\n </filter> : null}\n </defs>\n </svg>\n </div>;\n}", "export function createLiquidMap(width: number, height: number, radius: number) {\n if (![width, height, radius].every(Number.isFinite) || width <= 0 || height <= 0 || radius < 0)\n throw new RangeError(\n \"Liquid geometry must be finite with positive dimensions and a non-negative radius.\",\n );\n const ratio = Math.min(1, 256 / Math.max(width, height));\n const mapWidth = Math.max(1, Math.round(width * ratio));\n const mapHeight = Math.max(1, Math.round(height * ratio));\n const data = new Uint8ClampedArray(mapWidth * mapHeight * 4);\n const corner = Math.min(radius, width / 2, height / 2);\n const band = Math.min(16, width / 4, height / 4);\n const distance = (x: number, y: number) => {\n const dx = Math.abs(x - width / 2) - (width / 2 - corner);\n const dy = Math.abs(y - height / 2) - (height / 2 - corner);\n return Math.hypot(Math.max(dx, 0), Math.max(dy, 0)) + Math.min(Math.max(dx, dy), 0) - corner;\n };\n for (let y = 0; y < mapHeight; y++) {\n for (let x = 0; x < mapWidth; x++) {\n const px = ((x + 0.5) * width) / mapWidth;\n const py = ((y + 0.5) * height) / mapHeight;\n const d = distance(px, py);\n const amount = d <= 0 ? Math.max(0, 1 + d / band) ** 2 : 0;\n const nx = distance(px + 0.5, py) - distance(px - 0.5, py);\n const ny = distance(px, py + 0.5) - distance(px, py - 0.5);\n const length = Math.hypot(nx, ny) || 1;\n const index = (y * mapWidth + x) * 4;\n data[index] = Math.round(128 - (nx / length) * amount * 120);\n data[index + 1] = Math.round(128 - (ny / length) * amount * 120);\n data[index + 2] = 128;\n data[index + 3] = 255;\n }\n }\n return { width: mapWidth, height: mapHeight, data };\n}\n", "import type * as stylex from \"@stylexjs/stylex\";\nimport type { CSSProperties } from \"react\";\nexport type StyledProps<Props> = Props extends unknown ? Omit<Props, \"className\" | \"style\"> & {\n className?: string;\n style?: CSSProperties;\n} : never;\nexport function mergeStyles(base: ReturnType<typeof stylex.props>, className?: string, style?: CSSProperties): {\n className?: string;\n style?: CSSProperties;\n} {\n if (className === undefined && style === undefined) return base;\n return {\n ...base,\n className: [base.className, className].filter(Boolean).join(\" \") || undefined,\n style: base.style || style ? {\n ...base.style,\n ...style\n } : undefined\n };\n}", "import { colorVars, shadowVars } from \"@bolerish/tokens/semantic.stylex\";\nimport * as stylex from \"@stylexjs/stylex\";\nconst styles = {\n edge: {\n kVAM5u: \"x1kqtvf4\",\n kFGkbq: \"x1w1tqly\",\n $$css: true\n },\n material: {\n \"--bolerish-material-shadow\": \"xvd6nka\",\n kGVxlE: \"x16ifxj2 xpqbwuo\",\n kWkggS: \"x1s4uome x1u5mdis\",\n k6WDB: \"x1t853zo x1o5bnqd\",\n kKwaWg: \"x18o3ruo xxit9r9\",\n kTahiY: \"x1cg02ou\",\n kEcs6k: \"x11rvarm\",\n kWrjR8: \"x1ile18z\",\n kfloDl: \"x1m3y3zz\",\n kO6drA: \"x9yvj25\",\n kkTUmj: \"x14hm74v\",\n k11ilZ: \"xhobzj1\",\n ktzNWN: \"xwaqzdf\",\n $$css: true\n },\n panel: {\n \"--bolerish-material-color\": \"x14zkn9l\",\n \"--bolerish-material-opacity\": \"x8fe23t\",\n \"--bolerish-material-filter\": \"x1n6mwez\",\n $$css: true\n },\n control: {\n \"--bolerish-material-color\": \"x14zkn9l\",\n \"--bolerish-material-opacity\": \"xg4j6g8\",\n \"--bolerish-material-filter\": \"x1mpfm11\",\n $$css: true\n },\n subtle: {\n \"--bolerish-material-color\": \"x1819ggx\",\n \"--bolerish-material-opacity\": \"xg4j6g8\",\n \"--bolerish-material-filter\": \"x1mpfm11\",\n $$css: true\n },\n outline: {\n \"--bolerish-material-color\": \"x3m3fbl\",\n \"--bolerish-material-opacity\": \"xg4j6g8\",\n \"--bolerish-material-filter\": \"x1mpfm11\",\n $$css: true\n },\n raised: {\n \"--bolerish-material-shadow\": \"x1l9gcvt\",\n \"--bolerish-material-color\": \"x1y5ilfp\",\n \"--bolerish-material-opacity\": \"x1nqk09\",\n \"--bolerish-material-filter\": \"x1gkvbmm\",\n $$css: true\n },\n translucent: {\n \"--bolerish-material-color\": \"x14zkn9l\",\n \"--bolerish-material-opacity\": \"xoh9gux\",\n \"--bolerish-material-filter\": \"xhu24am\",\n $$css: true\n },\n floating: {\n \"--bolerish-material-shadow\": \"xu02b4h\",\n \"--bolerish-material-color\": \"x1y5ilfp\",\n \"--bolerish-material-opacity\": \"x14p89z6\",\n \"--bolerish-material-filter\": \"xunhrho\",\n $$css: true\n }\n};\nexport const surfaceStyles = {\n edge: styles.edge,\n panel: [styles.material, styles.panel],\n control: [styles.material, styles.control],\n subtle: [styles.material, styles.subtle],\n outline: [styles.material, styles.outline],\n raised: [styles.material, styles.raised],\n translucent: [styles.material, styles.translucent],\n floating: [styles.material, styles.floating]\n};"],
|
|
5
|
+
"mappings": ";;;AAGA,YAAY,YAAY;AACxB,SAAS,WAAW,OAAO,QAAQ,gBAAqD;;;ACJjF,SAAS,gBAAgB,OAAe,QAAgB,QAAgB;AAC7E,MAAI,CAAC,CAAC,OAAO,QAAQ,MAAM,EAAE,MAAM,OAAO,QAAQ,KAAK,SAAS,KAAK,UAAU,KAAK,SAAS;AAC3F,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AACF,QAAM,QAAQ,KAAK,IAAI,GAAG,MAAM,KAAK,IAAI,OAAO,MAAM,CAAC;AACvD,QAAM,WAAW,KAAK,IAAI,GAAG,KAAK,MAAM,QAAQ,KAAK,CAAC;AACtD,QAAM,YAAY,KAAK,IAAI,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AAK;AAAA,IAC5B;AAAA,EACF,GAAG,CAAC,CAAC;AACL,QAAM,WAAW,GAAG,EAAE,WAAW,KAAK,YAAY,CAAC;AACnD,SAAO,qBAAC,SAAK,GAAGA,QAAQ,GAAG,YAAmB,aAAMD,QAAO,MAAM,MAAM,GAAG,WAAW,KAAK,GACtF;AAAA,wBAAC,SAAI,WAAU,wEAAuE,KAAK,eAAe,eAAY,QAAO,OAAK,MAAC,OAAO,MAAM;AAAA,MAChJ,QAAQ,QAAQ,QAAQ;AAAA,IAC1B,IAAI,QACC,sBACH;AAAA,IACA,oBAAC,SAAI,eAAY,QAAQ,GAAU,aAAM,cAAc,OAAOA,QAAO,IAAI,GAAG;AAAA,IAC5E,oBAAC,SAAI,WAAU,YAAY,UAAS;AAAA,IACpC,oBAAC,SAAI,WAAU,oBAAmB,OAAM,KAAI,QAAO,KAAI,eAAY,QAAO,WAAU,SAClF,8BAAC,UACE,gBAAM,qBAAC,YAAO,IAAI,UAAU,GAAE,KAAI,GAAE,KAAI,OAAM,QAAO,QAAO,QAAO,2BAA0B,QAC1F;AAAA,0BAAC,aAAQ,MAAM,IAAI,KAAK,OAAM,QAAO,QAAO,QAAO,qBAAoB,QAAO,QAAO,OAAM;AAAA,MAC3F,oBAAC,uBAAkB,IAAG,iBAAgB,KAAI,OAAM,OAAM,MAAK,kBAAiB,KAAI,kBAAiB,KAAI;AAAA,OACvG,IAAY,MAChB,GACF;AAAA,KACF;AACJ;",
|
|
6
|
+
"names": ["styles", "props"]
|
|
7
|
+
}
|
package/dist/menubar.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import type { StyledProps } from "./styles/merge-styles";
|
|
|
8
8
|
export declare function Menubar({ className, style, xstyle, ...props }: StyledProps<ComponentProps<typeof MenubarPrimitive>> & {
|
|
9
9
|
xstyle?: stylex.StyleXStyles;
|
|
10
10
|
}): import("react").JSX.Element;
|
|
11
|
-
export declare const MenubarMenu:
|
|
11
|
+
export declare const MenubarMenu: typeof MenuPrimitive.Root;
|
|
12
12
|
export declare function MenubarTrigger({ className, style, xstyle, ...props }: StyledProps<ComponentProps<typeof MenuPrimitive.Trigger>> & {
|
|
13
13
|
xstyle?: ControlLayoutStyles;
|
|
14
14
|
}): import("react").JSX.Element;
|
package/dist/menubar.js
CHANGED
|
@@ -21,35 +21,87 @@ function mergeStyles(base, className, style) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
// src/styles/surface.ts
|
|
24
|
-
var
|
|
24
|
+
var styles = {
|
|
25
25
|
edge: {
|
|
26
26
|
kVAM5u: "x1kqtvf4",
|
|
27
27
|
kFGkbq: "x1w1tqly",
|
|
28
28
|
$$css: true
|
|
29
29
|
},
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
material: {
|
|
31
|
+
"--bolerish-material-shadow": "xvd6nka",
|
|
32
|
+
kGVxlE: "x16ifxj2 xpqbwuo",
|
|
33
|
+
kWkggS: "x1s4uome x1u5mdis",
|
|
34
|
+
k6WDB: "x1t853zo x1o5bnqd",
|
|
35
|
+
kKwaWg: "x18o3ruo xxit9r9",
|
|
36
|
+
kTahiY: "x1cg02ou",
|
|
34
37
|
kEcs6k: "x11rvarm",
|
|
38
|
+
kWrjR8: "x1ile18z",
|
|
39
|
+
kfloDl: "x1m3y3zz",
|
|
35
40
|
kO6drA: "x9yvj25",
|
|
36
41
|
kkTUmj: "x14hm74v",
|
|
42
|
+
k11ilZ: "xhobzj1",
|
|
43
|
+
ktzNWN: "xwaqzdf",
|
|
44
|
+
$$css: true
|
|
45
|
+
},
|
|
46
|
+
panel: {
|
|
47
|
+
"--bolerish-material-color": "x14zkn9l",
|
|
48
|
+
"--bolerish-material-opacity": "x8fe23t",
|
|
49
|
+
"--bolerish-material-filter": "x1n6mwez",
|
|
50
|
+
$$css: true
|
|
51
|
+
},
|
|
52
|
+
control: {
|
|
53
|
+
"--bolerish-material-color": "x14zkn9l",
|
|
54
|
+
"--bolerish-material-opacity": "xg4j6g8",
|
|
55
|
+
"--bolerish-material-filter": "x1mpfm11",
|
|
56
|
+
$$css: true
|
|
57
|
+
},
|
|
58
|
+
subtle: {
|
|
59
|
+
"--bolerish-material-color": "x1819ggx",
|
|
60
|
+
"--bolerish-material-opacity": "xg4j6g8",
|
|
61
|
+
"--bolerish-material-filter": "x1mpfm11",
|
|
62
|
+
$$css: true
|
|
63
|
+
},
|
|
64
|
+
outline: {
|
|
65
|
+
"--bolerish-material-color": "x3m3fbl",
|
|
66
|
+
"--bolerish-material-opacity": "xg4j6g8",
|
|
67
|
+
"--bolerish-material-filter": "x1mpfm11",
|
|
68
|
+
$$css: true
|
|
69
|
+
},
|
|
70
|
+
raised: {
|
|
71
|
+
"--bolerish-material-shadow": "x1l9gcvt",
|
|
72
|
+
"--bolerish-material-color": "x1y5ilfp",
|
|
73
|
+
"--bolerish-material-opacity": "x1nqk09",
|
|
74
|
+
"--bolerish-material-filter": "x1gkvbmm",
|
|
75
|
+
$$css: true
|
|
76
|
+
},
|
|
77
|
+
translucent: {
|
|
78
|
+
"--bolerish-material-color": "x14zkn9l",
|
|
79
|
+
"--bolerish-material-opacity": "xoh9gux",
|
|
80
|
+
"--bolerish-material-filter": "xhu24am",
|
|
37
81
|
$$css: true
|
|
38
82
|
},
|
|
39
83
|
floating: {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
kO6drA: "x9yvj25",
|
|
45
|
-
kkTUmj: "x14hm74v",
|
|
84
|
+
"--bolerish-material-shadow": "xu02b4h",
|
|
85
|
+
"--bolerish-material-color": "x1y5ilfp",
|
|
86
|
+
"--bolerish-material-opacity": "x14p89z6",
|
|
87
|
+
"--bolerish-material-filter": "xunhrho",
|
|
46
88
|
$$css: true
|
|
47
89
|
}
|
|
48
90
|
};
|
|
91
|
+
var surfaceStyles = {
|
|
92
|
+
edge: styles.edge,
|
|
93
|
+
panel: [styles.material, styles.panel],
|
|
94
|
+
control: [styles.material, styles.control],
|
|
95
|
+
subtle: [styles.material, styles.subtle],
|
|
96
|
+
outline: [styles.material, styles.outline],
|
|
97
|
+
raised: [styles.material, styles.raised],
|
|
98
|
+
translucent: [styles.material, styles.translucent],
|
|
99
|
+
floating: [styles.material, styles.floating]
|
|
100
|
+
};
|
|
49
101
|
|
|
50
102
|
// src/menubar.tsx
|
|
51
103
|
import { jsx } from "react/jsx-runtime";
|
|
52
|
-
var
|
|
104
|
+
var styles2 = {
|
|
53
105
|
root: {
|
|
54
106
|
kGNEyG: "x6s0dn4",
|
|
55
107
|
kWkggS: "xcc0o6n",
|
|
@@ -125,7 +177,7 @@ function Menubar(t0) {
|
|
|
125
177
|
}
|
|
126
178
|
let t1;
|
|
127
179
|
if ($[5] !== className || $[6] !== style || $[7] !== xstyle) {
|
|
128
|
-
t1 = mergeStyles(stylex.props(
|
|
180
|
+
t1 = mergeStyles(stylex.props(styles2.root, surfaceStyles.edge, surfaceStyles.translucent, xstyle), className, style);
|
|
129
181
|
$[5] = className;
|
|
130
182
|
$[6] = style;
|
|
131
183
|
$[7] = xstyle;
|
|
@@ -172,7 +224,7 @@ function MenubarTrigger(t0) {
|
|
|
172
224
|
let t1;
|
|
173
225
|
if ($[5] !== className || $[6] !== style || $[7] !== xstyle) {
|
|
174
226
|
t1 = function getTriggerStyles2(state) {
|
|
175
|
-
return mergeStyles(stylex.props(
|
|
227
|
+
return mergeStyles(stylex.props(styles2.trigger, state.open && styles2.triggerOpen, state.disabled && styles2.triggerDisabled, xstyle), className, style);
|
|
176
228
|
};
|
|
177
229
|
$[5] = className;
|
|
178
230
|
$[6] = style;
|
package/dist/menubar.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/menubar.tsx", "../src/styles/merge-styles.ts", "../src/styles/surface.ts"],
|
|
4
|
-
"sourcesContent": ["\"use client\";\n\nimport { c as _c } from \"react/compiler-runtime\";\nimport { Menu as MenuPrimitive } from \"@base-ui/react/menu\";\nimport { Menubar as MenubarPrimitive } from \"@base-ui/react/menubar\";\nimport { colorVars, motionVars, radiusVars, sizeVars, spacingVars, typo } from \"@bolerish/tokens/semantic.stylex\";\nimport * as stylex from \"@stylexjs/stylex\";\nimport type { ComponentProps } from \"react\";\nimport { DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger } from \"./dropdown-menu\";\nimport type { ControlLayoutStyles } from \"./styles/control-layout\";\nimport { mergeStyles } from \"./styles/merge-styles\";\nimport type { StyledProps } from \"./styles/merge-styles\";\nimport { surfaceStyles } from \"./styles/surface\";\nconst styles = {\n root: {\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"xcc0o6n\",\n kVAM5u: \"x1kqtvf4\",\n kaIpWk: \"x1p5vitp\",\n ksu8eU: \"x1y0btm7\",\n kMzoRj: \"x1al7nqq\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"x7gjopr\",\n kAzted: \"x116rqyj\",\n kmVPX3: \"x7fjq2a\",\n $$css: true\n },\n trigger: {\n kysU6D: \"xjyslct\",\n kWkggS: \"xjbqb8w\",\n ksu8eU: \"xng3xce\",\n kMzoRj: \"xc342km\",\n kaIpWk: \"x1p5vitp\",\n kMwMTN: \"x1t28c4i\",\n kkrTdU: \"x1ypdohk\",\n kMv6JI: \"x1b1to7n\",\n kGuDYH: \"x1lskvfa\",\n k63SB2: \"xoop9yj\",\n kZKoxP: \"x1dvwle6\",\n kI3sdo: \"x1a2a7pz\",\n kg3NbH: \"x5044ve\",\n kIyJzY: \"xznvecg\",\n k1ekBW: \"xs2xxs2\",\n kAMwcw: \"xrkjf8i\",\n kGzVvX: \"xk9i4fa\",\n kZs9gx: \"x768paa\",\n kiEn40: \"x1p3hdyt\",\n k7shQP: \"x9v5kkp\",\n kPJHz1: \"x1k4h2j2\",\n $$css: true\n },\n triggerOpen: {\n kWkggS: \"xlbutab\",\n $$css: true\n },\n triggerDisabled: {\n kWkggS: \"xjbqb8w\",\n kMwMTN: \"xdmzwdx\",\n kkrTdU: \"x1h6gzvc\",\n kGzVvX: \"x1n5bzlp\",\n $$css: true\n }\n};\nexport function Menubar(t0) {\n const $ = _c(12);\n let className;\n let props;\n let style;\n let xstyle;\n if ($[0] !== t0) {\n ({\n className,\n style,\n xstyle,\n ...props\n } = t0);\n $[0] = t0;\n $[1] = className;\n $[2] = props;\n $[3] = style;\n $[4] = xstyle;\n } else {\n className = $[1];\n props = $[2];\n style = $[3];\n xstyle = $[4];\n }\n let t1;\n if ($[5] !== className || $[6] !== style || $[7] !== xstyle) {\n t1 = mergeStyles(stylex.props(styles.root, surfaceStyles.edge, surfaceStyles.translucent, xstyle), className, style);\n $[5] = className;\n $[6] = style;\n $[7] = xstyle;\n $[8] = t1;\n } else {\n t1 = $[8];\n }\n let t2;\n if ($[9] !== props || $[10] !== t1) {\n t2 = <MenubarPrimitive {...props} {...t1} />;\n $[9] = props;\n $[10] = t1;\n $[11] = t2;\n } else {\n t2 = $[11];\n }\n return t2;\n}\nexport const MenubarMenu = MenuPrimitive.Root;\nexport function MenubarTrigger(t0) {\n const $ = _c(16);\n let className;\n let props;\n let style;\n let xstyle;\n if ($[0] !== t0) {\n ({\n className,\n style,\n xstyle,\n ...props\n } = t0);\n $[0] = t0;\n $[1] = className;\n $[2] = props;\n $[3] = style;\n $[4] = xstyle;\n } else {\n className = $[1];\n props = $[2];\n style = $[3];\n xstyle = $[4];\n }\n let t1;\n if ($[5] !== className || $[6] !== style || $[7] !== xstyle) {\n t1 = function getTriggerStyles(state) {\n return mergeStyles(stylex.props(styles.trigger, state.open && styles.triggerOpen, state.disabled && styles.triggerDisabled, xstyle), className, style);\n };\n $[5] = className;\n $[6] = style;\n $[7] = xstyle;\n $[8] = t1;\n } else {\n t1 = $[8];\n }\n const getTriggerStyles = t1;\n let t2;\n let t3;\n if ($[9] !== getTriggerStyles) {\n t2 = state_0 => getTriggerStyles(state_0).className;\n t3 = state_1 => getTriggerStyles(state_1).style;\n $[9] = getTriggerStyles;\n $[10] = t2;\n $[11] = t3;\n } else {\n t2 = $[10];\n t3 = $[11];\n }\n let t4;\n if ($[12] !== props || $[13] !== t2 || $[14] !== t3) {\n t4 = <MenuPrimitive.Trigger {...props} className={t2} style={t3} />;\n $[12] = props;\n $[13] = t2;\n $[14] = t3;\n $[15] = t4;\n } else {\n t4 = $[15];\n }\n return t4;\n}\nexport const MenubarContent = DropdownMenuContent;\nexport const MenubarItem = DropdownMenuItem;\nexport const MenubarCheckboxItem = DropdownMenuCheckboxItem;\nexport const MenubarRadioItem = DropdownMenuRadioItem;\nexport const MenubarGroup = DropdownMenuGroup;\nexport const MenubarRadioGroup = DropdownMenuRadioGroup;\nexport const MenubarLabel = DropdownMenuLabel;\nexport const MenubarSeparator = DropdownMenuSeparator;\nexport const MenubarShortcut = DropdownMenuShortcut;\nexport const MenubarSub = DropdownMenuSub;\nexport const MenubarSubTrigger = DropdownMenuSubTrigger;\nexport const MenubarSubContent = DropdownMenuSubContent;", "import type * as stylex from \"@stylexjs/stylex\";\nimport type { CSSProperties } from \"react\";\nexport type StyledProps<Props> = Props extends unknown ? Omit<Props, \"className\" | \"style\"> & {\n className?: string;\n style?: CSSProperties;\n} : never;\nexport function mergeStyles(base: ReturnType<typeof stylex.props>, className?: string, style?: CSSProperties): {\n className?: string;\n style?: CSSProperties;\n} {\n if (className === undefined && style === undefined) return base;\n return {\n ...base,\n className: [base.className, className].filter(Boolean).join(\" \") || undefined,\n style: base.style || style ? {\n ...base.style,\n ...style\n } : undefined\n };\n}", "import { colorVars } from \"@bolerish/tokens/semantic.stylex\";\nimport * as stylex from \"@stylexjs/stylex\";\
|
|
5
|
-
"mappings": ";;;AAEA,SAAS,KAAK,UAAU;AACxB,SAAS,QAAQ,qBAAqB;AACtC,SAAS,WAAW,wBAAwB;AAE5C,YAAY,YAAY;AAExB,SAAS,0BAA0B,qBAAqB,mBAAmB,kBAAkB,mBAAmB,wBAAwB,uBAAuB,uBAAuB,sBAAsB,iBAAiB,wBAAwB,8BAA8B;;;ACF5Q,SAAS,YAAY,MAAuC,WAAoB,OAGrF;AACA,MAAI,cAAc,UAAa,UAAU,OAAW,QAAO;AAC3D,SAAO;AAAA,IACL,GAAG;AAAA,IACH,WAAW,CAAC,KAAK,WAAW,SAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,KAAK;AAAA,IACpE,OAAO,KAAK,SAAS,QAAQ;AAAA,MAC3B,GAAG,KAAK;AAAA,MACR,GAAG;AAAA,IACL,IAAI;AAAA,EACN;AACF;;;
|
|
6
|
-
"names": ["props", "getTriggerStyles"]
|
|
4
|
+
"sourcesContent": ["\"use client\";\n\nimport { c as _c } from \"react/compiler-runtime\";\nimport { Menu as MenuPrimitive } from \"@base-ui/react/menu\";\nimport { Menubar as MenubarPrimitive } from \"@base-ui/react/menubar\";\nimport { colorVars, motionVars, radiusVars, sizeVars, spacingVars, typo } from \"@bolerish/tokens/semantic.stylex\";\nimport * as stylex from \"@stylexjs/stylex\";\nimport type { ComponentProps } from \"react\";\nimport { DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger } from \"./dropdown-menu\";\nimport type { ControlLayoutStyles } from \"./styles/control-layout\";\nimport { mergeStyles } from \"./styles/merge-styles\";\nimport type { StyledProps } from \"./styles/merge-styles\";\nimport { surfaceStyles } from \"./styles/surface\";\nconst styles = {\n root: {\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"xcc0o6n\",\n kVAM5u: \"x1kqtvf4\",\n kaIpWk: \"x1p5vitp\",\n ksu8eU: \"x1y0btm7\",\n kMzoRj: \"x1al7nqq\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"x7gjopr\",\n kAzted: \"x116rqyj\",\n kmVPX3: \"x7fjq2a\",\n $$css: true\n },\n trigger: {\n kysU6D: \"xjyslct\",\n kWkggS: \"xjbqb8w\",\n ksu8eU: \"xng3xce\",\n kMzoRj: \"xc342km\",\n kaIpWk: \"x1p5vitp\",\n kMwMTN: \"x1t28c4i\",\n kkrTdU: \"x1ypdohk\",\n kMv6JI: \"x1b1to7n\",\n kGuDYH: \"x1lskvfa\",\n k63SB2: \"xoop9yj\",\n kZKoxP: \"x1dvwle6\",\n kI3sdo: \"x1a2a7pz\",\n kg3NbH: \"x5044ve\",\n kIyJzY: \"xznvecg\",\n k1ekBW: \"xs2xxs2\",\n kAMwcw: \"xrkjf8i\",\n kGzVvX: \"xk9i4fa\",\n kZs9gx: \"x768paa\",\n kiEn40: \"x1p3hdyt\",\n k7shQP: \"x9v5kkp\",\n kPJHz1: \"x1k4h2j2\",\n $$css: true\n },\n triggerOpen: {\n kWkggS: \"xlbutab\",\n $$css: true\n },\n triggerDisabled: {\n kWkggS: \"xjbqb8w\",\n kMwMTN: \"xdmzwdx\",\n kkrTdU: \"x1h6gzvc\",\n kGzVvX: \"x1n5bzlp\",\n $$css: true\n }\n};\nexport function Menubar(t0) {\n const $ = _c(12);\n let className;\n let props;\n let style;\n let xstyle;\n if ($[0] !== t0) {\n ({\n className,\n style,\n xstyle,\n ...props\n } = t0);\n $[0] = t0;\n $[1] = className;\n $[2] = props;\n $[3] = style;\n $[4] = xstyle;\n } else {\n className = $[1];\n props = $[2];\n style = $[3];\n xstyle = $[4];\n }\n let t1;\n if ($[5] !== className || $[6] !== style || $[7] !== xstyle) {\n t1 = mergeStyles(stylex.props(styles.root, surfaceStyles.edge, surfaceStyles.translucent, xstyle), className, style);\n $[5] = className;\n $[6] = style;\n $[7] = xstyle;\n $[8] = t1;\n } else {\n t1 = $[8];\n }\n let t2;\n if ($[9] !== props || $[10] !== t1) {\n t2 = <MenubarPrimitive {...props} {...t1} />;\n $[9] = props;\n $[10] = t1;\n $[11] = t2;\n } else {\n t2 = $[11];\n }\n return t2;\n}\nexport const MenubarMenu = MenuPrimitive.Root;\nexport function MenubarTrigger(t0) {\n const $ = _c(16);\n let className;\n let props;\n let style;\n let xstyle;\n if ($[0] !== t0) {\n ({\n className,\n style,\n xstyle,\n ...props\n } = t0);\n $[0] = t0;\n $[1] = className;\n $[2] = props;\n $[3] = style;\n $[4] = xstyle;\n } else {\n className = $[1];\n props = $[2];\n style = $[3];\n xstyle = $[4];\n }\n let t1;\n if ($[5] !== className || $[6] !== style || $[7] !== xstyle) {\n t1 = function getTriggerStyles(state) {\n return mergeStyles(stylex.props(styles.trigger, state.open && styles.triggerOpen, state.disabled && styles.triggerDisabled, xstyle), className, style);\n };\n $[5] = className;\n $[6] = style;\n $[7] = xstyle;\n $[8] = t1;\n } else {\n t1 = $[8];\n }\n const getTriggerStyles = t1;\n let t2;\n let t3;\n if ($[9] !== getTriggerStyles) {\n t2 = state_0 => getTriggerStyles(state_0).className;\n t3 = state_1 => getTriggerStyles(state_1).style;\n $[9] = getTriggerStyles;\n $[10] = t2;\n $[11] = t3;\n } else {\n t2 = $[10];\n t3 = $[11];\n }\n let t4;\n if ($[12] !== props || $[13] !== t2 || $[14] !== t3) {\n t4 = <MenuPrimitive.Trigger {...props} className={t2} style={t3} />;\n $[12] = props;\n $[13] = t2;\n $[14] = t3;\n $[15] = t4;\n } else {\n t4 = $[15];\n }\n return t4;\n}\nexport const MenubarContent = DropdownMenuContent;\nexport const MenubarItem = DropdownMenuItem;\nexport const MenubarCheckboxItem = DropdownMenuCheckboxItem;\nexport const MenubarRadioItem = DropdownMenuRadioItem;\nexport const MenubarGroup = DropdownMenuGroup;\nexport const MenubarRadioGroup = DropdownMenuRadioGroup;\nexport const MenubarLabel = DropdownMenuLabel;\nexport const MenubarSeparator = DropdownMenuSeparator;\nexport const MenubarShortcut = DropdownMenuShortcut;\nexport const MenubarSub = DropdownMenuSub;\nexport const MenubarSubTrigger = DropdownMenuSubTrigger;\nexport const MenubarSubContent = DropdownMenuSubContent;", "import type * as stylex from \"@stylexjs/stylex\";\nimport type { CSSProperties } from \"react\";\nexport type StyledProps<Props> = Props extends unknown ? Omit<Props, \"className\" | \"style\"> & {\n className?: string;\n style?: CSSProperties;\n} : never;\nexport function mergeStyles(base: ReturnType<typeof stylex.props>, className?: string, style?: CSSProperties): {\n className?: string;\n style?: CSSProperties;\n} {\n if (className === undefined && style === undefined) return base;\n return {\n ...base,\n className: [base.className, className].filter(Boolean).join(\" \") || undefined,\n style: base.style || style ? {\n ...base.style,\n ...style\n } : undefined\n };\n}", "import { colorVars, shadowVars } from \"@bolerish/tokens/semantic.stylex\";\nimport * as stylex from \"@stylexjs/stylex\";\nconst styles = {\n edge: {\n kVAM5u: \"x1kqtvf4\",\n kFGkbq: \"x1w1tqly\",\n $$css: true\n },\n material: {\n \"--bolerish-material-shadow\": \"xvd6nka\",\n kGVxlE: \"x16ifxj2 xpqbwuo\",\n kWkggS: \"x1s4uome x1u5mdis\",\n k6WDB: \"x1t853zo x1o5bnqd\",\n kKwaWg: \"x18o3ruo xxit9r9\",\n kTahiY: \"x1cg02ou\",\n kEcs6k: \"x11rvarm\",\n kWrjR8: \"x1ile18z\",\n kfloDl: \"x1m3y3zz\",\n kO6drA: \"x9yvj25\",\n kkTUmj: \"x14hm74v\",\n k11ilZ: \"xhobzj1\",\n ktzNWN: \"xwaqzdf\",\n $$css: true\n },\n panel: {\n \"--bolerish-material-color\": \"x14zkn9l\",\n \"--bolerish-material-opacity\": \"x8fe23t\",\n \"--bolerish-material-filter\": \"x1n6mwez\",\n $$css: true\n },\n control: {\n \"--bolerish-material-color\": \"x14zkn9l\",\n \"--bolerish-material-opacity\": \"xg4j6g8\",\n \"--bolerish-material-filter\": \"x1mpfm11\",\n $$css: true\n },\n subtle: {\n \"--bolerish-material-color\": \"x1819ggx\",\n \"--bolerish-material-opacity\": \"xg4j6g8\",\n \"--bolerish-material-filter\": \"x1mpfm11\",\n $$css: true\n },\n outline: {\n \"--bolerish-material-color\": \"x3m3fbl\",\n \"--bolerish-material-opacity\": \"xg4j6g8\",\n \"--bolerish-material-filter\": \"x1mpfm11\",\n $$css: true\n },\n raised: {\n \"--bolerish-material-shadow\": \"x1l9gcvt\",\n \"--bolerish-material-color\": \"x1y5ilfp\",\n \"--bolerish-material-opacity\": \"x1nqk09\",\n \"--bolerish-material-filter\": \"x1gkvbmm\",\n $$css: true\n },\n translucent: {\n \"--bolerish-material-color\": \"x14zkn9l\",\n \"--bolerish-material-opacity\": \"xoh9gux\",\n \"--bolerish-material-filter\": \"xhu24am\",\n $$css: true\n },\n floating: {\n \"--bolerish-material-shadow\": \"xu02b4h\",\n \"--bolerish-material-color\": \"x1y5ilfp\",\n \"--bolerish-material-opacity\": \"x14p89z6\",\n \"--bolerish-material-filter\": \"xunhrho\",\n $$css: true\n }\n};\nexport const surfaceStyles = {\n edge: styles.edge,\n panel: [styles.material, styles.panel],\n control: [styles.material, styles.control],\n subtle: [styles.material, styles.subtle],\n outline: [styles.material, styles.outline],\n raised: [styles.material, styles.raised],\n translucent: [styles.material, styles.translucent],\n floating: [styles.material, styles.floating]\n};"],
|
|
5
|
+
"mappings": ";;;AAEA,SAAS,KAAK,UAAU;AACxB,SAAS,QAAQ,qBAAqB;AACtC,SAAS,WAAW,wBAAwB;AAE5C,YAAY,YAAY;AAExB,SAAS,0BAA0B,qBAAqB,mBAAmB,kBAAkB,mBAAmB,wBAAwB,uBAAuB,uBAAuB,sBAAsB,iBAAiB,wBAAwB,8BAA8B;;;ACF5Q,SAAS,YAAY,MAAuC,WAAoB,OAGrF;AACA,MAAI,cAAc,UAAa,UAAU,OAAW,QAAO;AAC3D,SAAO;AAAA,IACL,GAAG;AAAA,IACH,WAAW,CAAC,KAAK,WAAW,SAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,KAAK;AAAA,IACpE,OAAO,KAAK,SAAS,QAAQ;AAAA,MAC3B,GAAG,KAAK;A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AACjE,MAAE,EAAE,IAAIA;AACR,MAAE,EAAE,IAAI;AACR,MAAE,EAAE,IAAI;AACR,MAAE,EAAE,IAAI;AAAA,EACV,OAAO;AACL,SAAK,EAAE,EAAE;AAAA,EACX;AACA,SAAO;AACT;AACO,IAAM,iBAAiB;AACvB,IAAM,cAAc;AACpB,IAAM,sBAAsB;AAC5B,IAAM,mBAAmB;AACzB,IAAM,eAAe;AACrB,IAAM,oBAAoB;AAC1B,IAAM,eAAe;AACrB,IAAM,mBAAmB;AACzB,IAAM,kBAAkB;AACxB,IAAM,aAAa;AACnB,IAAM,oBAAoB;AAC1B,IAAM,oBAAoB;",
|
|
6
|
+
"names": ["styles", "props", "getTriggerStyles"]
|
|
7
7
|
}
|
package/dist/native-select.js
CHANGED
|
@@ -18,9 +18,88 @@ function mergeStyles(base, className, style) {
|
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
// src/styles/surface.ts
|
|
22
|
+
var styles = {
|
|
23
|
+
edge: {
|
|
24
|
+
kVAM5u: "x1kqtvf4",
|
|
25
|
+
kFGkbq: "x1w1tqly",
|
|
26
|
+
$$css: true
|
|
27
|
+
},
|
|
28
|
+
material: {
|
|
29
|
+
"--bolerish-material-shadow": "xvd6nka",
|
|
30
|
+
kGVxlE: "x16ifxj2 xpqbwuo",
|
|
31
|
+
kWkggS: "x1s4uome x1u5mdis",
|
|
32
|
+
k6WDB: "x1t853zo x1o5bnqd",
|
|
33
|
+
kKwaWg: "x18o3ruo xxit9r9",
|
|
34
|
+
kTahiY: "x1cg02ou",
|
|
35
|
+
kEcs6k: "x11rvarm",
|
|
36
|
+
kWrjR8: "x1ile18z",
|
|
37
|
+
kfloDl: "x1m3y3zz",
|
|
38
|
+
kO6drA: "x9yvj25",
|
|
39
|
+
kkTUmj: "x14hm74v",
|
|
40
|
+
k11ilZ: "xhobzj1",
|
|
41
|
+
ktzNWN: "xwaqzdf",
|
|
42
|
+
$$css: true
|
|
43
|
+
},
|
|
44
|
+
panel: {
|
|
45
|
+
"--bolerish-material-color": "x14zkn9l",
|
|
46
|
+
"--bolerish-material-opacity": "x8fe23t",
|
|
47
|
+
"--bolerish-material-filter": "x1n6mwez",
|
|
48
|
+
$$css: true
|
|
49
|
+
},
|
|
50
|
+
control: {
|
|
51
|
+
"--bolerish-material-color": "x14zkn9l",
|
|
52
|
+
"--bolerish-material-opacity": "xg4j6g8",
|
|
53
|
+
"--bolerish-material-filter": "x1mpfm11",
|
|
54
|
+
$$css: true
|
|
55
|
+
},
|
|
56
|
+
subtle: {
|
|
57
|
+
"--bolerish-material-color": "x1819ggx",
|
|
58
|
+
"--bolerish-material-opacity": "xg4j6g8",
|
|
59
|
+
"--bolerish-material-filter": "x1mpfm11",
|
|
60
|
+
$$css: true
|
|
61
|
+
},
|
|
62
|
+
outline: {
|
|
63
|
+
"--bolerish-material-color": "x3m3fbl",
|
|
64
|
+
"--bolerish-material-opacity": "xg4j6g8",
|
|
65
|
+
"--bolerish-material-filter": "x1mpfm11",
|
|
66
|
+
$$css: true
|
|
67
|
+
},
|
|
68
|
+
raised: {
|
|
69
|
+
"--bolerish-material-shadow": "x1l9gcvt",
|
|
70
|
+
"--bolerish-material-color": "x1y5ilfp",
|
|
71
|
+
"--bolerish-material-opacity": "x1nqk09",
|
|
72
|
+
"--bolerish-material-filter": "x1gkvbmm",
|
|
73
|
+
$$css: true
|
|
74
|
+
},
|
|
75
|
+
translucent: {
|
|
76
|
+
"--bolerish-material-color": "x14zkn9l",
|
|
77
|
+
"--bolerish-material-opacity": "xoh9gux",
|
|
78
|
+
"--bolerish-material-filter": "xhu24am",
|
|
79
|
+
$$css: true
|
|
80
|
+
},
|
|
81
|
+
floating: {
|
|
82
|
+
"--bolerish-material-shadow": "xu02b4h",
|
|
83
|
+
"--bolerish-material-color": "x1y5ilfp",
|
|
84
|
+
"--bolerish-material-opacity": "x14p89z6",
|
|
85
|
+
"--bolerish-material-filter": "xunhrho",
|
|
86
|
+
$$css: true
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
var surfaceStyles = {
|
|
90
|
+
edge: styles.edge,
|
|
91
|
+
panel: [styles.material, styles.panel],
|
|
92
|
+
control: [styles.material, styles.control],
|
|
93
|
+
subtle: [styles.material, styles.subtle],
|
|
94
|
+
outline: [styles.material, styles.outline],
|
|
95
|
+
raised: [styles.material, styles.raised],
|
|
96
|
+
translucent: [styles.material, styles.translucent],
|
|
97
|
+
floating: [styles.material, styles.floating]
|
|
98
|
+
};
|
|
99
|
+
|
|
21
100
|
// src/native-select.tsx
|
|
22
101
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
23
|
-
var
|
|
102
|
+
var styles2 = {
|
|
24
103
|
root: {
|
|
25
104
|
k1xSpc: "x3nfvp2",
|
|
26
105
|
kVAEAm: "x1n2onr6",
|
|
@@ -69,7 +148,7 @@ var sizeStyles = {
|
|
|
69
148
|
}
|
|
70
149
|
};
|
|
71
150
|
function NativeSelect(t0) {
|
|
72
|
-
const $ = _c(
|
|
151
|
+
const $ = _c(22);
|
|
73
152
|
let children;
|
|
74
153
|
let className;
|
|
75
154
|
let props2;
|
|
@@ -103,7 +182,7 @@ function NativeSelect(t0) {
|
|
|
103
182
|
const size = t1 === void 0 ? "md" : t1;
|
|
104
183
|
let t2;
|
|
105
184
|
if ($[7] !== className || $[8] !== style || $[9] !== xstyle) {
|
|
106
|
-
t2 = mergeStyles(stylex.props(
|
|
185
|
+
t2 = mergeStyles(stylex.props(styles2.root, xstyle), className, style);
|
|
107
186
|
$[7] = className;
|
|
108
187
|
$[8] = style;
|
|
109
188
|
$[9] = xstyle;
|
|
@@ -112,41 +191,42 @@ function NativeSelect(t0) {
|
|
|
112
191
|
t2 = $[10];
|
|
113
192
|
}
|
|
114
193
|
let t3;
|
|
115
|
-
if ($[11] !== size) {
|
|
116
|
-
t3 = stylex.props(
|
|
117
|
-
$[11] =
|
|
118
|
-
$[12] =
|
|
194
|
+
if ($[11] !== props2.disabled || $[12] !== size) {
|
|
195
|
+
t3 = stylex.props(styles2.select, !props2.disabled && surfaceStyles.control, sizeStyles[size]);
|
|
196
|
+
$[11] = props2.disabled;
|
|
197
|
+
$[12] = size;
|
|
198
|
+
$[13] = t3;
|
|
119
199
|
} else {
|
|
120
|
-
t3 = $[
|
|
200
|
+
t3 = $[13];
|
|
121
201
|
}
|
|
122
202
|
let t4;
|
|
123
|
-
if ($[
|
|
203
|
+
if ($[14] !== children || $[15] !== props2 || $[16] !== t3) {
|
|
124
204
|
t4 = /* @__PURE__ */ jsx("select", { ...props2, ...t3, children });
|
|
125
|
-
$[
|
|
126
|
-
$[
|
|
127
|
-
$[
|
|
128
|
-
$[
|
|
205
|
+
$[14] = children;
|
|
206
|
+
$[15] = props2;
|
|
207
|
+
$[16] = t3;
|
|
208
|
+
$[17] = t4;
|
|
129
209
|
} else {
|
|
130
|
-
t4 = $[
|
|
210
|
+
t4 = $[17];
|
|
131
211
|
}
|
|
132
212
|
let t5;
|
|
133
|
-
if ($[
|
|
213
|
+
if ($[18] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
134
214
|
t5 = /* @__PURE__ */ jsx(CaretDownIcon, { "aria-hidden": "true", className: "xj9e3ow x47corl x10l6tqk xjord3i xwa60dl x1cb1t30" });
|
|
135
|
-
$[
|
|
215
|
+
$[18] = t5;
|
|
136
216
|
} else {
|
|
137
|
-
t5 = $[
|
|
217
|
+
t5 = $[18];
|
|
138
218
|
}
|
|
139
219
|
let t6;
|
|
140
|
-
if ($[
|
|
220
|
+
if ($[19] !== t2 || $[20] !== t4) {
|
|
141
221
|
t6 = /* @__PURE__ */ jsxs("span", { ...t2, children: [
|
|
142
222
|
t4,
|
|
143
223
|
t5
|
|
144
224
|
] });
|
|
145
|
-
$[
|
|
146
|
-
$[
|
|
147
|
-
$[
|
|
225
|
+
$[19] = t2;
|
|
226
|
+
$[20] = t4;
|
|
227
|
+
$[21] = t6;
|
|
148
228
|
} else {
|
|
149
|
-
t6 = $[
|
|
229
|
+
t6 = $[21];
|
|
150
230
|
}
|
|
151
231
|
return t6;
|
|
152
232
|
}
|