@usefui/components 1.7.1 → 1.7.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/CHANGELOG.md +12 -0
- package/dist/index.d.mts +14 -124
- package/dist/index.d.ts +14 -124
- package/dist/index.js +127 -326
- package/dist/index.mjs +126 -318
- package/package.json +3 -3
- package/src/badge/Badge.stories.tsx +32 -0
- package/src/badge/index.tsx +4 -0
- package/src/badge/styles/index.ts +26 -0
- package/src/button/Button.stories.tsx +93 -0
- package/src/button/styles/index.ts +23 -31
- package/src/dialog/index.tsx +17 -20
- package/src/dropdown/Dropdown.stories.tsx +87 -0
- package/src/dropdown/index.tsx +13 -1
- package/src/dropdown/styles/index.ts +14 -6
- package/src/field/styles/index.ts +7 -21
- package/src/index.ts +0 -3
- package/src/message-bubble/MessageBubble.stories.tsx +27 -7
- package/src/message-bubble/index.tsx +6 -2
- package/src/resizable/Resizable.stories.tsx +19 -22
- package/src/resizable/index.tsx +9 -5
- package/src/resizable/styles/index.ts +4 -2
- package/src/__tests__/Tree.test.tsx +0 -275
- package/src/tree/Tree.stories.tsx +0 -141
- package/src/tree/hooks/tree-node-provider.tsx +0 -50
- package/src/tree/hooks/tree-provider.tsx +0 -75
- package/src/tree/index.tsx +0 -231
- package/src/tree/styles/index.ts +0 -23
package/dist/index.mjs
CHANGED
|
@@ -85,25 +85,6 @@ var ButtonIconStyles = css`
|
|
|
85
85
|
svg {
|
|
86
86
|
width: var(--fontsize-medium-20);
|
|
87
87
|
height: var(--fontsize-medium-20);
|
|
88
|
-
fill: currentColor;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
svg {
|
|
92
|
-
opacity: 0.6;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
&:hover,
|
|
96
|
-
&:focus,
|
|
97
|
-
&:active {
|
|
98
|
-
svg {
|
|
99
|
-
opacity: 1;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
&[data-variant="primary"] {
|
|
104
|
-
svg {
|
|
105
|
-
fill: var(--body-color);
|
|
106
|
-
}
|
|
107
88
|
}
|
|
108
89
|
`;
|
|
109
90
|
var ButtonSizeStyles = css`
|
|
@@ -159,7 +140,6 @@ var ButtonBeforeDefaultStyles = css`
|
|
|
159
140
|
`;
|
|
160
141
|
var ButtonVariantsStyles = css`
|
|
161
142
|
&[data-variant="primary"] {
|
|
162
|
-
color: var(--body-color-alpha-80);
|
|
163
143
|
background-color: var(--font-color);
|
|
164
144
|
background: linear-gradient(
|
|
165
145
|
180deg,
|
|
@@ -169,6 +149,11 @@ var ButtonVariantsStyles = css`
|
|
|
169
149
|
background-size: 100% 200%;
|
|
170
150
|
background-position: 0% 50%;
|
|
171
151
|
|
|
152
|
+
color: var(--body-color-alpha-80) !important;
|
|
153
|
+
svg * {
|
|
154
|
+
stroke: var(--body-color-alpha-80) !important;
|
|
155
|
+
}
|
|
156
|
+
|
|
172
157
|
::before {
|
|
173
158
|
${ButtonBeforeDefaultStyles}
|
|
174
159
|
border-color: var(--body-color-alpha-20);
|
|
@@ -187,7 +172,6 @@ var ButtonVariantsStyles = css`
|
|
|
187
172
|
}
|
|
188
173
|
}
|
|
189
174
|
&[data-variant="secondary"] {
|
|
190
|
-
color: var(--font-color-alpha-60);
|
|
191
175
|
border-color: var(--font-color-alpha-10);
|
|
192
176
|
|
|
193
177
|
background-color: var(--body-color);
|
|
@@ -199,6 +183,8 @@ var ButtonVariantsStyles = css`
|
|
|
199
183
|
background-size: 100% 200%;
|
|
200
184
|
background-position: 0% 50%;
|
|
201
185
|
|
|
186
|
+
color: var(--font-color-alpha-60) !important;
|
|
187
|
+
|
|
202
188
|
::before {
|
|
203
189
|
${ButtonBeforeDefaultStyles}
|
|
204
190
|
border-color: var(--font-color-alpha-10);
|
|
@@ -215,8 +201,6 @@ var ButtonVariantsStyles = css`
|
|
|
215
201
|
}
|
|
216
202
|
}
|
|
217
203
|
&[data-variant="tertiary"] {
|
|
218
|
-
color: var(--font-color-alpha-60);
|
|
219
|
-
|
|
220
204
|
background-color: transparent;
|
|
221
205
|
background: linear-gradient(
|
|
222
206
|
-180deg,
|
|
@@ -226,6 +210,8 @@ var ButtonVariantsStyles = css`
|
|
|
226
210
|
background-size: 100% 200%;
|
|
227
211
|
background-position: 0% 10%;
|
|
228
212
|
|
|
213
|
+
color: var(--font-color-alpha-60) !important;
|
|
214
|
+
|
|
229
215
|
&:hover,
|
|
230
216
|
&:focus,
|
|
231
217
|
&:active {
|
|
@@ -241,8 +227,8 @@ var ButtonVariantsStyles = css`
|
|
|
241
227
|
}
|
|
242
228
|
}
|
|
243
229
|
&[data-variant="mono"] {
|
|
244
|
-
color: var(--font-color-alpha-80);
|
|
245
230
|
background-color: var(--contrast-color);
|
|
231
|
+
color: var(--font-color-alpha-80) !important;
|
|
246
232
|
|
|
247
233
|
::before {
|
|
248
234
|
${ButtonBeforeDefaultStyles}
|
|
@@ -261,9 +247,9 @@ var ButtonVariantsStyles = css`
|
|
|
261
247
|
}
|
|
262
248
|
}
|
|
263
249
|
&[data-variant="border"] {
|
|
264
|
-
color: var(--font-color-alpha-60);
|
|
265
250
|
background-color: transparent;
|
|
266
251
|
border-color: var(--font-color-alpha-10);
|
|
252
|
+
color: var(--font-color-alpha-60) !important;
|
|
267
253
|
|
|
268
254
|
&:hover,
|
|
269
255
|
&:focus,
|
|
@@ -305,7 +291,6 @@ var ButtonVariantsStyles = css`
|
|
|
305
291
|
}
|
|
306
292
|
|
|
307
293
|
&[data-variant="meta"] {
|
|
308
|
-
color: var(--alpha-mono-white-80);
|
|
309
294
|
background-color: var(--color-blue);
|
|
310
295
|
background: linear-gradient(
|
|
311
296
|
180deg,
|
|
@@ -315,6 +300,8 @@ var ButtonVariantsStyles = css`
|
|
|
315
300
|
background-size: 100% 200%;
|
|
316
301
|
background-position: 0% 50%;
|
|
317
302
|
|
|
303
|
+
color: var(--alpha-mono-white-80) !important;
|
|
304
|
+
|
|
318
305
|
::before {
|
|
319
306
|
${ButtonBeforeDefaultStyles}
|
|
320
307
|
border-color: var(--tint-blue-30);
|
|
@@ -335,7 +322,6 @@ var ButtonVariantsStyles = css`
|
|
|
335
322
|
}
|
|
336
323
|
}
|
|
337
324
|
&[data-variant="hint"] {
|
|
338
|
-
color: var(--alpha-mono-white-80);
|
|
339
325
|
background-color: var(--color-purple);
|
|
340
326
|
background: linear-gradient(
|
|
341
327
|
180deg,
|
|
@@ -345,6 +331,8 @@ var ButtonVariantsStyles = css`
|
|
|
345
331
|
background-size: 100% 200%;
|
|
346
332
|
background-position: 0% 50%;
|
|
347
333
|
|
|
334
|
+
color: var(--alpha-mono-white-80) !important;
|
|
335
|
+
|
|
348
336
|
::before {
|
|
349
337
|
${ButtonBeforeDefaultStyles}
|
|
350
338
|
border-color: var(--shade-purple-20);
|
|
@@ -361,7 +349,6 @@ var ButtonVariantsStyles = css`
|
|
|
361
349
|
}
|
|
362
350
|
}
|
|
363
351
|
&[data-variant="success"] {
|
|
364
|
-
color: var(--alpha-mono-white-90);
|
|
365
352
|
background-color: var(--shade-green-30);
|
|
366
353
|
background: linear-gradient(
|
|
367
354
|
180deg,
|
|
@@ -371,6 +358,8 @@ var ButtonVariantsStyles = css`
|
|
|
371
358
|
background-size: 100% 200%;
|
|
372
359
|
background-position: 0% 50%;
|
|
373
360
|
|
|
361
|
+
color: var(--alpha-mono-white-80) !important;
|
|
362
|
+
|
|
374
363
|
::before {
|
|
375
364
|
${ButtonBeforeDefaultStyles}
|
|
376
365
|
border-color: var(--shade-green-20);
|
|
@@ -387,7 +376,6 @@ var ButtonVariantsStyles = css`
|
|
|
387
376
|
}
|
|
388
377
|
}
|
|
389
378
|
&[data-variant="danger"] {
|
|
390
|
-
color: var(--alpha-mono-white-80);
|
|
391
379
|
background-color: var(--color-red);
|
|
392
380
|
background: linear-gradient(
|
|
393
381
|
180deg,
|
|
@@ -397,6 +385,8 @@ var ButtonVariantsStyles = css`
|
|
|
397
385
|
background-size: 100% 200%;
|
|
398
386
|
background-position: 0% 50%;
|
|
399
387
|
|
|
388
|
+
color: var(--alpha-mono-white-80) !important;
|
|
389
|
+
|
|
400
390
|
::before {
|
|
401
391
|
${ButtonBeforeDefaultStyles}
|
|
402
392
|
border-color: var(--tint-red-60);
|
|
@@ -416,7 +406,6 @@ var ButtonVariantsStyles = css`
|
|
|
416
406
|
}
|
|
417
407
|
}
|
|
418
408
|
&[data-variant="warning"] {
|
|
419
|
-
color: var(--alpha-mono-dark-80);
|
|
420
409
|
background-color: var(--color-orange);
|
|
421
410
|
background: linear-gradient(
|
|
422
411
|
180deg,
|
|
@@ -426,6 +415,8 @@ var ButtonVariantsStyles = css`
|
|
|
426
415
|
background-size: 100% 200%;
|
|
427
416
|
background-position: 0% 50%;
|
|
428
417
|
|
|
418
|
+
color: var(--alpha-mono-dark-80) !important;
|
|
419
|
+
|
|
429
420
|
::before {
|
|
430
421
|
${ButtonBeforeDefaultStyles}
|
|
431
422
|
border-color: var(--tint-orange-30);
|
|
@@ -502,7 +493,8 @@ var ButtonWrapper = styled.button`
|
|
|
502
493
|
${ButtonSizeStyles}
|
|
503
494
|
${ButtonShapeStyles}
|
|
504
495
|
${ButtonVariantsStyles}
|
|
505
|
-
|
|
496
|
+
|
|
497
|
+
&[data-rawIcon="false"] {
|
|
506
498
|
${ButtonIconStyles}
|
|
507
499
|
}
|
|
508
500
|
}
|
|
@@ -1012,6 +1004,28 @@ var BadgeVariantStyles = css3`
|
|
|
1012
1004
|
}
|
|
1013
1005
|
}
|
|
1014
1006
|
`;
|
|
1007
|
+
var BadgeEmphasisVariantStyles = css3`
|
|
1008
|
+
&[data-variant="danger"] {
|
|
1009
|
+
background-color: var(--color-red) !important;
|
|
1010
|
+
color: var(--color-mono-white) !important;
|
|
1011
|
+
}
|
|
1012
|
+
&[data-variant="warning"] {
|
|
1013
|
+
background-color: var(--color-orange) !important;
|
|
1014
|
+
color: var(--color-mono-dark) !important;
|
|
1015
|
+
}
|
|
1016
|
+
&[data-variant="success"] {
|
|
1017
|
+
background-color: var(--color-green) !important;
|
|
1018
|
+
color: var(--color-mono-white) !important;
|
|
1019
|
+
}
|
|
1020
|
+
&[data-variant="meta"] {
|
|
1021
|
+
background-color: var(--color-blue) !important;
|
|
1022
|
+
color: var(--color-mono-white) !important;
|
|
1023
|
+
}
|
|
1024
|
+
&[data-variant="hint"] {
|
|
1025
|
+
background-color: var(--color-purple) !important;
|
|
1026
|
+
color: var(--color-mono-white) !important;
|
|
1027
|
+
}
|
|
1028
|
+
`;
|
|
1015
1029
|
var BadgeShapeStyles = css3`
|
|
1016
1030
|
&[data-shape="square"] {
|
|
1017
1031
|
border-radius: 0;
|
|
@@ -1049,6 +1063,10 @@ var BadgeWrapper2 = styled3.div`
|
|
|
1049
1063
|
${BadgeVariantStyles}
|
|
1050
1064
|
${BadgeShapeStyles}
|
|
1051
1065
|
${BadgeSizeStyles}
|
|
1066
|
+
|
|
1067
|
+
&[data-emphasis="true"] {
|
|
1068
|
+
${BadgeEmphasisVariantStyles}
|
|
1069
|
+
}
|
|
1052
1070
|
}
|
|
1053
1071
|
`;
|
|
1054
1072
|
|
|
@@ -1056,6 +1074,7 @@ var BadgeWrapper2 = styled3.div`
|
|
|
1056
1074
|
var Badge = (props) => {
|
|
1057
1075
|
const {
|
|
1058
1076
|
raw = false,
|
|
1077
|
+
emphasis = false,
|
|
1059
1078
|
sizing = "small" /* Small */,
|
|
1060
1079
|
variant = "primary" /* Primary */,
|
|
1061
1080
|
shape = "smooth" /* Smooth */,
|
|
@@ -1069,6 +1088,7 @@ var Badge = (props) => {
|
|
|
1069
1088
|
"data-variant": variant,
|
|
1070
1089
|
"data-shape": shape,
|
|
1071
1090
|
"data-size": sizing,
|
|
1091
|
+
"data-emphasis": emphasis,
|
|
1072
1092
|
...restProps
|
|
1073
1093
|
},
|
|
1074
1094
|
children
|
|
@@ -2102,7 +2122,8 @@ var Dialog = (props) => {
|
|
|
2102
2122
|
if (open && toggleDialog) toggleDialog();
|
|
2103
2123
|
}, []);
|
|
2104
2124
|
if (lock) useDisabledScroll(Boolean(states.open));
|
|
2105
|
-
|
|
2125
|
+
if (!states.open) return null;
|
|
2126
|
+
return /* @__PURE__ */ React15.createElement(
|
|
2106
2127
|
ScrollArea,
|
|
2107
2128
|
{
|
|
2108
2129
|
as: DialogWrapper,
|
|
@@ -2117,7 +2138,7 @@ var Dialog = (props) => {
|
|
|
2117
2138
|
...restProps
|
|
2118
2139
|
},
|
|
2119
2140
|
children
|
|
2120
|
-
)
|
|
2141
|
+
);
|
|
2121
2142
|
};
|
|
2122
2143
|
Dialog.displayName = "Dialog";
|
|
2123
2144
|
var DialogRoot = ({ children }) => {
|
|
@@ -2291,6 +2312,15 @@ var ContentWrapperSizes = css7`
|
|
|
2291
2312
|
max-width: var(--large);
|
|
2292
2313
|
}
|
|
2293
2314
|
`;
|
|
2315
|
+
var ContentWrapperVariants = css7`
|
|
2316
|
+
&[data-variant="body"] {
|
|
2317
|
+
background-color: var(--body-color);
|
|
2318
|
+
}
|
|
2319
|
+
|
|
2320
|
+
&[data-variant="contrast"] {
|
|
2321
|
+
background-color: var(--contrast-color);
|
|
2322
|
+
}
|
|
2323
|
+
`;
|
|
2294
2324
|
var RootWrapper = styled9.div`
|
|
2295
2325
|
position: relative;
|
|
2296
2326
|
`;
|
|
@@ -2317,13 +2347,14 @@ var ContentWrapper = styled9.ul`
|
|
|
2317
2347
|
padding: var(--measurement-medium-30);
|
|
2318
2348
|
margin: var(--measurement-medium-10) 0;
|
|
2319
2349
|
|
|
2320
|
-
background-color: var(--body-color);
|
|
2321
2350
|
border: var(--measurement-small-10) solid var(--font-color-alpha-10);
|
|
2322
2351
|
border-radius: var(--measurement-medium-30);
|
|
2323
2352
|
|
|
2324
2353
|
z-index: var(--depth-default-100);
|
|
2325
2354
|
|
|
2326
2355
|
${ContentWrapperSizes}
|
|
2356
|
+
${ContentWrapperVariants}
|
|
2357
|
+
|
|
2327
2358
|
animation-duration: 0.2s;
|
|
2328
2359
|
animation-name: slide-in;
|
|
2329
2360
|
animation-fill-mode: backwards;
|
|
@@ -2338,14 +2369,13 @@ var ItemWrapper2 = styled9.li`
|
|
|
2338
2369
|
&[data-raw="false"] {
|
|
2339
2370
|
padding: var(--measurement-medium-10) var(--measurement-medium-30);
|
|
2340
2371
|
border-radius: var(--measurement-medium-20);
|
|
2372
|
+
color: var(--font-color);
|
|
2341
2373
|
|
|
2342
|
-
text-align: left;
|
|
2343
|
-
font-weight: 600;
|
|
2344
2374
|
letter-spacing: calc(
|
|
2345
2375
|
var(--fontsize-small-10) - ((var(--fontsize-small-10) * 1.066))
|
|
2346
2376
|
);
|
|
2347
|
-
font-size:
|
|
2348
|
-
|
|
2377
|
+
font-size: inherit;
|
|
2378
|
+
text-align: left;
|
|
2349
2379
|
|
|
2350
2380
|
outline: none;
|
|
2351
2381
|
cursor: pointer;
|
|
@@ -2357,7 +2387,7 @@ var ItemWrapper2 = styled9.li`
|
|
|
2357
2387
|
&:active,
|
|
2358
2388
|
&:focus-within,
|
|
2359
2389
|
&:has(:active) {
|
|
2360
|
-
background-color: var(--
|
|
2390
|
+
background-color: var(--font-color-alpha-10);
|
|
2361
2391
|
}
|
|
2362
2392
|
}
|
|
2363
2393
|
|
|
@@ -2422,7 +2452,14 @@ var DropdownMenuTrigger = (props) => {
|
|
|
2422
2452
|
};
|
|
2423
2453
|
DropdownMenuTrigger.displayName = "DropdownMenu.Trigger";
|
|
2424
2454
|
var DropdownMenuContent = React17.forwardRef((props, _) => {
|
|
2425
|
-
const {
|
|
2455
|
+
const {
|
|
2456
|
+
raw,
|
|
2457
|
+
sizing = "medium" /* Medium */,
|
|
2458
|
+
variant = "body",
|
|
2459
|
+
defaultOpen,
|
|
2460
|
+
children,
|
|
2461
|
+
...restProps
|
|
2462
|
+
} = props;
|
|
2426
2463
|
const { id, states, methods } = useDropdownMenu();
|
|
2427
2464
|
const { toggleOpen, setContentProps } = methods;
|
|
2428
2465
|
const mounted = React17.useRef(false);
|
|
@@ -2488,6 +2525,7 @@ var DropdownMenuContent = React17.forwardRef((props, _) => {
|
|
|
2488
2525
|
"aria-labelledby": id.split("|").at(0),
|
|
2489
2526
|
"data-state": applyDataState(Boolean(states.open)),
|
|
2490
2527
|
"data-sizing": sizing,
|
|
2528
|
+
"data-variant": variant,
|
|
2491
2529
|
"data-side": hasEnoughHorizontalSpace ? "left" /* Left */ : "right" /* Right */,
|
|
2492
2530
|
"data-align": hasEnoughHorizontalSpace ? "left" /* Left */ : "right" /* Right */,
|
|
2493
2531
|
"data-raw": Boolean(raw),
|
|
@@ -2869,12 +2907,8 @@ var InnerWrapper = styled10.div`
|
|
|
2869
2907
|
display: flex;
|
|
2870
2908
|
flex-direction: column;
|
|
2871
2909
|
|
|
2872
|
-
right: 0;
|
|
2873
|
-
&[data-multiple="true"] {
|
|
2874
|
-
right: var(--measurement-small-10) !important;
|
|
2875
|
-
}
|
|
2876
|
-
|
|
2877
2910
|
top: var(--measurement-small-10);
|
|
2911
|
+
right: var(--measurement-small-10);
|
|
2878
2912
|
bottom: var(--measurement-small-10);
|
|
2879
2913
|
|
|
2880
2914
|
border-left: var(--measurement-small-10) solid var(--font-color-alpha-10);
|
|
@@ -2885,7 +2919,6 @@ var InnerWrapper = styled10.div`
|
|
|
2885
2919
|
&[data-error="true"] {
|
|
2886
2920
|
border-color: var(--alpha-red-10) !important;
|
|
2887
2921
|
}
|
|
2888
|
-
|
|
2889
2922
|
&[data-shape="round"] {
|
|
2890
2923
|
border-radius: 0 var(--measurement-large-90) var(--measurement-large-90) 0;
|
|
2891
2924
|
}
|
|
@@ -2911,16 +2944,7 @@ var InnerTrigger = styled10.button`
|
|
|
2911
2944
|
padding: 0 var(--measurement-medium-40);
|
|
2912
2945
|
|
|
2913
2946
|
color: var(--font-color-alpha-60);
|
|
2914
|
-
|
|
2915
|
-
background-color: var(--body-color);
|
|
2916
|
-
background: linear-gradient(
|
|
2917
|
-
180deg,
|
|
2918
|
-
transparent 50%,
|
|
2919
|
-
var(--font-color-alpha-10) 100%
|
|
2920
|
-
);
|
|
2921
|
-
background-size: 100% 200%;
|
|
2922
|
-
background-position: 0% 0%;
|
|
2923
|
-
backdrop-filter: blur(var(--measurement-medium-10));
|
|
2947
|
+
backdrop-filter: blur(var(--measurement-small-60));
|
|
2924
2948
|
|
|
2925
2949
|
cursor: pointer;
|
|
2926
2950
|
transition: all ease-in-out 0.2s;
|
|
@@ -2930,7 +2954,7 @@ var InnerTrigger = styled10.button`
|
|
|
2930
2954
|
transition: all ease-in-out 0.2s;
|
|
2931
2955
|
}
|
|
2932
2956
|
|
|
2933
|
-
::before {
|
|
2957
|
+
/* ::before {
|
|
2934
2958
|
content: "";
|
|
2935
2959
|
inset: 0;
|
|
2936
2960
|
|
|
@@ -2944,12 +2968,12 @@ var InnerTrigger = styled10.button`
|
|
|
2944
2968
|
|
|
2945
2969
|
transition: all ease-in-out 0.2s;
|
|
2946
2970
|
mask-image: linear-gradient(var(--font-color), transparent);
|
|
2947
|
-
}
|
|
2971
|
+
} */
|
|
2948
2972
|
|
|
2949
2973
|
&:hover,
|
|
2950
2974
|
&:active {
|
|
2951
2975
|
color: var(--font-color);
|
|
2952
|
-
background-position: 0% 50%;
|
|
2976
|
+
/* background-position: 0% 50%; */
|
|
2953
2977
|
|
|
2954
2978
|
svg {
|
|
2955
2979
|
opacity: 0.8;
|
|
@@ -2968,7 +2992,7 @@ var InnerSegment = styled10.span`
|
|
|
2968
2992
|
text-align: center;
|
|
2969
2993
|
outline: none;
|
|
2970
2994
|
color: inherit;
|
|
2971
|
-
transition: background-color ease-in-out 0.2s;
|
|
2995
|
+
/* transition: background-color ease-in-out 0.2s; */
|
|
2972
2996
|
|
|
2973
2997
|
&[data-placeholder="true"] {
|
|
2974
2998
|
color: var(--font-color-alpha-30);
|
|
@@ -2979,7 +3003,7 @@ var InnerSegment = styled10.span`
|
|
|
2979
3003
|
&:active,
|
|
2980
3004
|
&:focus-within,
|
|
2981
3005
|
&:has(:active) {
|
|
2982
|
-
background-color: var(--font-color-alpha-10);
|
|
3006
|
+
/* background-color: var(--font-color-alpha-10); */
|
|
2983
3007
|
color: var(--font-color);
|
|
2984
3008
|
}
|
|
2985
3009
|
}
|
|
@@ -3876,7 +3900,7 @@ var MessageBubble = (props) => {
|
|
|
3876
3900
|
};
|
|
3877
3901
|
MessageBubble.displayName = "MessageBubble";
|
|
3878
3902
|
var MessageBubbleContent = (props) => {
|
|
3879
|
-
const { sizing, shape, variant, children, raw, ...restProps } = props;
|
|
3903
|
+
const { emphasis, sizing, shape, variant, children, raw, ...restProps } = props;
|
|
3880
3904
|
const { id, states } = useMessageBubble();
|
|
3881
3905
|
return /* @__PURE__ */ React21.createElement(
|
|
3882
3906
|
MessageBubbleBadge,
|
|
@@ -3884,8 +3908,9 @@ var MessageBubbleContent = (props) => {
|
|
|
3884
3908
|
"data-raw": Boolean(raw),
|
|
3885
3909
|
"data-side": states?.side,
|
|
3886
3910
|
variant: variant ?? "border" /* Border */,
|
|
3887
|
-
shape: shape ?? "
|
|
3911
|
+
shape: shape ?? "round" /* Round */,
|
|
3888
3912
|
sizing: sizing ?? "medium" /* Medium */,
|
|
3913
|
+
emphasis,
|
|
3889
3914
|
"aria-label": `message-bubble-content-${id}`,
|
|
3890
3915
|
...restProps
|
|
3891
3916
|
},
|
|
@@ -4539,7 +4564,7 @@ var SplitContainer = styled16.div`
|
|
|
4539
4564
|
`;
|
|
4540
4565
|
var Panel = styled16.div`
|
|
4541
4566
|
overflow: hidden;
|
|
4542
|
-
width: ${(props) => props.width}
|
|
4567
|
+
width: ${(props) => props.width}dvw;
|
|
4543
4568
|
`;
|
|
4544
4569
|
var Divider2 = styled16.div`
|
|
4545
4570
|
width: var(--measurement-medium-10);
|
|
@@ -4595,6 +4620,8 @@ var DragOverlay = styled16.div`
|
|
|
4595
4620
|
// src/resizable/index.tsx
|
|
4596
4621
|
var Resizable = ({
|
|
4597
4622
|
defaultWidth,
|
|
4623
|
+
minWidth,
|
|
4624
|
+
maxWidth,
|
|
4598
4625
|
left,
|
|
4599
4626
|
right
|
|
4600
4627
|
}) => {
|
|
@@ -4608,7 +4635,7 @@ var Resizable = ({
|
|
|
4608
4635
|
if (!isDragging || !containerRef.current) return;
|
|
4609
4636
|
const containerRect = containerRef.current.getBoundingClientRect();
|
|
4610
4637
|
const newLeftWidth = (e.clientX - containerRect.left) / containerRect.width * 100;
|
|
4611
|
-
const threshold = { min: 30, max: 70 };
|
|
4638
|
+
const threshold = { min: minWidth ?? 30, max: maxWidth ?? 70 };
|
|
4612
4639
|
const constrainedWidth = Math.min(
|
|
4613
4640
|
Math.max(newLeftWidth, threshold.min),
|
|
4614
4641
|
threshold.max
|
|
@@ -6097,235 +6124,23 @@ var Tooltip = ({
|
|
|
6097
6124
|
};
|
|
6098
6125
|
Tooltip.displayName = "Tooltip";
|
|
6099
6126
|
|
|
6100
|
-
// src/tree/index.tsx
|
|
6101
|
-
import React46 from "react";
|
|
6102
|
-
|
|
6103
|
-
// src/tree/hooks/tree-provider.tsx
|
|
6104
|
-
import React44, { useState as useState10, createContext as createContext10, useContext as useContext10 } from "react";
|
|
6105
|
-
var defaultTreeAPI = {
|
|
6106
|
-
id: "",
|
|
6107
|
-
states: {},
|
|
6108
|
-
methods: {}
|
|
6109
|
-
};
|
|
6110
|
-
var TreeContext = createContext10(defaultTreeAPI);
|
|
6111
|
-
var useTree = () => useContext10(TreeContext);
|
|
6112
|
-
var TreeProvider = ({
|
|
6113
|
-
children,
|
|
6114
|
-
defaultExpandedIds = [],
|
|
6115
|
-
onSelectionChange
|
|
6116
|
-
}) => {
|
|
6117
|
-
const context = useTreeProviderContext({
|
|
6118
|
-
defaultExpandedIds,
|
|
6119
|
-
onSelectionChange
|
|
6120
|
-
});
|
|
6121
|
-
return /* @__PURE__ */ React44.createElement(TreeContext.Provider, { value: context }, children);
|
|
6122
|
-
};
|
|
6123
|
-
function useTreeProviderContext({
|
|
6124
|
-
defaultExpandedIds,
|
|
6125
|
-
onSelectionChange
|
|
6126
|
-
}) {
|
|
6127
|
-
const treeId = React44.useId();
|
|
6128
|
-
const [expandedIds, setExpandedIds] = useState10(
|
|
6129
|
-
() => new Set(defaultExpandedIds)
|
|
6130
|
-
);
|
|
6131
|
-
const [selectedIds, setSelectedIds] = useState10(() => /* @__PURE__ */ new Set());
|
|
6132
|
-
return {
|
|
6133
|
-
id: treeId,
|
|
6134
|
-
states: {
|
|
6135
|
-
expandedIds,
|
|
6136
|
-
selectedIds
|
|
6137
|
-
},
|
|
6138
|
-
methods: {
|
|
6139
|
-
isExpanded: (id) => expandedIds.has(id),
|
|
6140
|
-
isSelected: (id) => selectedIds.has(id),
|
|
6141
|
-
toggleExpanded: (id) => {
|
|
6142
|
-
setExpandedIds((prev) => {
|
|
6143
|
-
const next = new Set(prev);
|
|
6144
|
-
next.has(id) ? next.delete(id) : next.add(id);
|
|
6145
|
-
return next;
|
|
6146
|
-
});
|
|
6147
|
-
},
|
|
6148
|
-
toggleSelected: (id) => {
|
|
6149
|
-
setSelectedIds((prev) => {
|
|
6150
|
-
const next = new Set(prev);
|
|
6151
|
-
next.has(id) ? next.delete(id) : next.add(id);
|
|
6152
|
-
onSelectionChange?.(Array.from(next));
|
|
6153
|
-
return next;
|
|
6154
|
-
});
|
|
6155
|
-
},
|
|
6156
|
-
getTreeId: ({ nodeId, type }) => `${treeId}-${type}-${nodeId}`
|
|
6157
|
-
}
|
|
6158
|
-
};
|
|
6159
|
-
}
|
|
6160
|
-
|
|
6161
|
-
// src/tree/hooks/tree-node-provider.tsx
|
|
6162
|
-
import React45, { createContext as createContext11, useContext as useContext11 } from "react";
|
|
6163
|
-
var defaultTreeNodeAPI = {
|
|
6164
|
-
id: "",
|
|
6165
|
-
states: {},
|
|
6166
|
-
methods: {}
|
|
6167
|
-
};
|
|
6168
|
-
var TreeNodeContext = createContext11(defaultTreeNodeAPI);
|
|
6169
|
-
var useTreeNode = () => useContext11(TreeNodeContext);
|
|
6170
|
-
var TreeNodeProvider = ({
|
|
6171
|
-
children,
|
|
6172
|
-
nodeId,
|
|
6173
|
-
level,
|
|
6174
|
-
isLast
|
|
6175
|
-
}) => {
|
|
6176
|
-
const context = useTreeNodeProviderContext({ nodeId, level, isLast });
|
|
6177
|
-
return /* @__PURE__ */ React45.createElement(TreeNodeContext.Provider, { value: context }, children);
|
|
6178
|
-
};
|
|
6179
|
-
function useTreeNodeProviderContext({
|
|
6180
|
-
nodeId,
|
|
6181
|
-
level,
|
|
6182
|
-
isLast
|
|
6183
|
-
}) {
|
|
6184
|
-
return {
|
|
6185
|
-
id: nodeId,
|
|
6186
|
-
states: {
|
|
6187
|
-
nodeId,
|
|
6188
|
-
level,
|
|
6189
|
-
isLast
|
|
6190
|
-
},
|
|
6191
|
-
methods: {}
|
|
6192
|
-
};
|
|
6193
|
-
}
|
|
6194
|
-
|
|
6195
|
-
// src/tree/styles/index.ts
|
|
6196
|
-
import styled27 from "styled-components";
|
|
6197
|
-
var TreeView = styled27.ul`
|
|
6198
|
-
display: flex;
|
|
6199
|
-
flex-direction: column;
|
|
6200
|
-
list-style: none;
|
|
6201
|
-
margin: 0;
|
|
6202
|
-
padding: 0;
|
|
6203
|
-
`;
|
|
6204
|
-
var TreeItem = styled27.li`
|
|
6205
|
-
display: flex;
|
|
6206
|
-
flex-direction: column;
|
|
6207
|
-
list-style: none;
|
|
6208
|
-
`;
|
|
6209
|
-
var TreeNodeContent = styled27.ul`
|
|
6210
|
-
display: flex;
|
|
6211
|
-
flex-direction: column;
|
|
6212
|
-
list-style: none;
|
|
6213
|
-
margin: 0;
|
|
6214
|
-
padding: 0;
|
|
6215
|
-
`;
|
|
6216
|
-
|
|
6217
|
-
// src/tree/index.tsx
|
|
6218
|
-
var Tree = (props) => {
|
|
6219
|
-
const { children, ...restProps } = props;
|
|
6220
|
-
const { id } = useTree();
|
|
6221
|
-
return /* @__PURE__ */ React46.createElement(TreeView, { id, role: "tree", ...restProps }, children);
|
|
6222
|
-
};
|
|
6223
|
-
Tree.displayName = "Tree";
|
|
6224
|
-
var TreeRoot = ({
|
|
6225
|
-
children,
|
|
6226
|
-
defaultExpandedIds,
|
|
6227
|
-
onSelectionChange
|
|
6228
|
-
}) => {
|
|
6229
|
-
return /* @__PURE__ */ React46.createElement(
|
|
6230
|
-
TreeProvider,
|
|
6231
|
-
{
|
|
6232
|
-
defaultExpandedIds,
|
|
6233
|
-
onSelectionChange
|
|
6234
|
-
},
|
|
6235
|
-
children
|
|
6236
|
-
);
|
|
6237
|
-
};
|
|
6238
|
-
TreeRoot.displayName = "Tree.Root";
|
|
6239
|
-
var TreeNode = (props) => {
|
|
6240
|
-
const { nodeId, level = 0, isLast = false, children, ...restProps } = props;
|
|
6241
|
-
return /* @__PURE__ */ React46.createElement(TreeNodeProvider, { nodeId, level, isLast }, /* @__PURE__ */ React46.createElement(TreeItem, { role: "treeitem", "aria-level": level + 1, ...restProps }, children));
|
|
6242
|
-
};
|
|
6243
|
-
TreeNode.displayName = "Tree.Node";
|
|
6244
|
-
var TreeTrigger = (props) => {
|
|
6245
|
-
const { nodeId, disabled, onClick, children, ...restProps } = props;
|
|
6246
|
-
const { methods } = useTree();
|
|
6247
|
-
const { getTreeId, toggleExpanded, toggleSelected } = methods;
|
|
6248
|
-
const isExpanded = methods.isExpanded && methods.isExpanded(nodeId);
|
|
6249
|
-
const isSelected = methods.isSelected && methods.isSelected(nodeId);
|
|
6250
|
-
const IdHandler = {
|
|
6251
|
-
trigger: getTreeId && getTreeId({ nodeId, type: "trigger" }),
|
|
6252
|
-
content: getTreeId && getTreeId({ nodeId, type: "content" })
|
|
6253
|
-
};
|
|
6254
|
-
const { states: nodeStates } = useTreeNode();
|
|
6255
|
-
const level = nodeStates.level ?? 0;
|
|
6256
|
-
const handleClick = (event) => {
|
|
6257
|
-
if (!disabled) {
|
|
6258
|
-
onClick && onClick(event);
|
|
6259
|
-
toggleExpanded && toggleExpanded(nodeId);
|
|
6260
|
-
toggleSelected && toggleSelected(nodeId);
|
|
6261
|
-
}
|
|
6262
|
-
};
|
|
6263
|
-
return /* @__PURE__ */ React46.createElement(
|
|
6264
|
-
Button,
|
|
6265
|
-
{
|
|
6266
|
-
id: String(IdHandler.trigger),
|
|
6267
|
-
disabled: disabled ?? false,
|
|
6268
|
-
onClick: handleClick,
|
|
6269
|
-
"data-state": isExpanded ? "expanded" : "collapsed",
|
|
6270
|
-
"data-selected": isSelected || void 0,
|
|
6271
|
-
variant: props.variant ?? "ghost" /* Ghost */,
|
|
6272
|
-
style: { paddingLeft: `calc(${level} * 1rem + 0.5rem)` },
|
|
6273
|
-
rawicon: true,
|
|
6274
|
-
...restProps
|
|
6275
|
-
},
|
|
6276
|
-
children
|
|
6277
|
-
);
|
|
6278
|
-
};
|
|
6279
|
-
TreeTrigger.displayName = "Tree.Trigger";
|
|
6280
|
-
var TreeContent = (props) => {
|
|
6281
|
-
const { nodeId, defaultOpen = false, children, ...restProps } = props;
|
|
6282
|
-
const { methods } = useTree();
|
|
6283
|
-
const { getTreeId, toggleExpanded } = methods;
|
|
6284
|
-
const isExpanded = methods.isExpanded && methods.isExpanded(nodeId);
|
|
6285
|
-
const IdHandler = {
|
|
6286
|
-
trigger: getTreeId && getTreeId({ nodeId, type: "trigger" }),
|
|
6287
|
-
content: getTreeId && getTreeId({ nodeId, type: "content" })
|
|
6288
|
-
};
|
|
6289
|
-
React46.useEffect(() => {
|
|
6290
|
-
if (defaultOpen && !isExpanded && toggleExpanded) toggleExpanded(nodeId);
|
|
6291
|
-
}, []);
|
|
6292
|
-
if (isExpanded)
|
|
6293
|
-
return /* @__PURE__ */ React46.createElement(
|
|
6294
|
-
TreeNodeContent,
|
|
6295
|
-
{
|
|
6296
|
-
role: "group",
|
|
6297
|
-
id: String(IdHandler.content),
|
|
6298
|
-
"aria-labelledby": String(IdHandler.trigger),
|
|
6299
|
-
"data-nodeId": nodeId,
|
|
6300
|
-
...restProps
|
|
6301
|
-
},
|
|
6302
|
-
children
|
|
6303
|
-
);
|
|
6304
|
-
return /* @__PURE__ */ React46.createElement(React46.Fragment, null);
|
|
6305
|
-
};
|
|
6306
|
-
TreeContent.displayName = "Tree.Content";
|
|
6307
|
-
Tree.Root = TreeRoot;
|
|
6308
|
-
Tree.Node = TreeNode;
|
|
6309
|
-
Tree.Trigger = TreeTrigger;
|
|
6310
|
-
Tree.Content = TreeContent;
|
|
6311
|
-
|
|
6312
6127
|
// src/select/index.tsx
|
|
6313
|
-
import
|
|
6128
|
+
import React45 from "react";
|
|
6314
6129
|
|
|
6315
6130
|
// src/select/hooks/index.tsx
|
|
6316
|
-
import
|
|
6131
|
+
import React44 from "react";
|
|
6317
6132
|
var defaultComponentAPI10 = {
|
|
6318
6133
|
id: "",
|
|
6319
6134
|
states: {},
|
|
6320
6135
|
methods: {}
|
|
6321
6136
|
};
|
|
6322
|
-
var SelectContext =
|
|
6323
|
-
var useSelect = () =>
|
|
6137
|
+
var SelectContext = React44.createContext(defaultComponentAPI10);
|
|
6138
|
+
var useSelect = () => React44.useContext(SelectContext);
|
|
6324
6139
|
var SelectProvider = ({
|
|
6325
6140
|
children
|
|
6326
6141
|
}) => {
|
|
6327
6142
|
const context = useSelectProvider();
|
|
6328
|
-
return /* @__PURE__ */
|
|
6143
|
+
return /* @__PURE__ */ React44.createElement(SelectContext.Provider, { value: context }, children);
|
|
6329
6144
|
};
|
|
6330
6145
|
function useSelectProvider() {
|
|
6331
6146
|
const DEFAULT_POSITIONS2 = {
|
|
@@ -6338,19 +6153,19 @@ function useSelectProvider() {
|
|
|
6338
6153
|
width: 0,
|
|
6339
6154
|
height: 0
|
|
6340
6155
|
};
|
|
6341
|
-
const [open, setOpen] =
|
|
6342
|
-
const [value, setValue] =
|
|
6343
|
-
const [label, setLabel] =
|
|
6344
|
-
const [contentProps, setContentProps] =
|
|
6156
|
+
const [open, setOpen] = React44.useState(false);
|
|
6157
|
+
const [value, setValue] = React44.useState(null);
|
|
6158
|
+
const [label, setLabel] = React44.useState("");
|
|
6159
|
+
const [contentProps, setContentProps] = React44.useState({
|
|
6345
6160
|
...DEFAULT_POSITIONS2,
|
|
6346
6161
|
...DEFAULT_DIMENSIONS2
|
|
6347
6162
|
});
|
|
6348
|
-
const [triggerProps, setTriggerProps] =
|
|
6163
|
+
const [triggerProps, setTriggerProps] = React44.useState({
|
|
6349
6164
|
...DEFAULT_POSITIONS2,
|
|
6350
6165
|
...DEFAULT_DIMENSIONS2
|
|
6351
6166
|
});
|
|
6352
|
-
const triggerId =
|
|
6353
|
-
const listboxId =
|
|
6167
|
+
const triggerId = React44.useId();
|
|
6168
|
+
const listboxId = React44.useId();
|
|
6354
6169
|
const composedId = `${triggerId}|${listboxId}`;
|
|
6355
6170
|
return {
|
|
6356
6171
|
id: composedId,
|
|
@@ -6373,12 +6188,12 @@ function useSelectProvider() {
|
|
|
6373
6188
|
}
|
|
6374
6189
|
|
|
6375
6190
|
// src/select/styles/index.tsx
|
|
6376
|
-
import
|
|
6377
|
-
var Wrapper =
|
|
6191
|
+
import styled27 from "styled-components";
|
|
6192
|
+
var Wrapper = styled27.div`
|
|
6378
6193
|
position: relative;
|
|
6379
6194
|
width: 100%;
|
|
6380
6195
|
`;
|
|
6381
|
-
var Trigger =
|
|
6196
|
+
var Trigger = styled27.button`
|
|
6382
6197
|
all: unset;
|
|
6383
6198
|
box-sizing: border-box;
|
|
6384
6199
|
|
|
@@ -6396,7 +6211,7 @@ var Trigger = styled28.button`
|
|
|
6396
6211
|
|
|
6397
6212
|
cursor: pointer !important;
|
|
6398
6213
|
`;
|
|
6399
|
-
var Label2 =
|
|
6214
|
+
var Label2 = styled27.span`
|
|
6400
6215
|
flex: 1;
|
|
6401
6216
|
text-align: left;
|
|
6402
6217
|
font-weight: 400;
|
|
@@ -6404,7 +6219,7 @@ var Label2 = styled28.span`
|
|
|
6404
6219
|
overflow: hidden;
|
|
6405
6220
|
text-overflow: ellipsis;
|
|
6406
6221
|
`;
|
|
6407
|
-
var Content =
|
|
6222
|
+
var Content = styled27.ul`
|
|
6408
6223
|
@keyframes select-slide-in-down {
|
|
6409
6224
|
0% {
|
|
6410
6225
|
opacity: 0;
|
|
@@ -6458,7 +6273,7 @@ var Content = styled28.ul`
|
|
|
6458
6273
|
}
|
|
6459
6274
|
}
|
|
6460
6275
|
`;
|
|
6461
|
-
var List =
|
|
6276
|
+
var List = styled27.li`
|
|
6462
6277
|
list-style: none;
|
|
6463
6278
|
padding: 0;
|
|
6464
6279
|
margin: 0;
|
|
@@ -6507,7 +6322,7 @@ var List = styled28.li`
|
|
|
6507
6322
|
opacity: 0.6;
|
|
6508
6323
|
}
|
|
6509
6324
|
`;
|
|
6510
|
-
var Item =
|
|
6325
|
+
var Item = styled27.span`
|
|
6511
6326
|
display: flex;
|
|
6512
6327
|
align-items: center;
|
|
6513
6328
|
gap: var(--measurement-small-60);
|
|
@@ -6519,11 +6334,11 @@ var Item = styled28.span`
|
|
|
6519
6334
|
|
|
6520
6335
|
// src/select/index.tsx
|
|
6521
6336
|
var SelectRoot = ({ children }) => {
|
|
6522
|
-
return /* @__PURE__ */
|
|
6337
|
+
return /* @__PURE__ */ React45.createElement(SelectProvider, null, children);
|
|
6523
6338
|
};
|
|
6524
6339
|
SelectRoot.displayName = "Select.Root";
|
|
6525
6340
|
var Select = ({ children }) => {
|
|
6526
|
-
const selectRef =
|
|
6341
|
+
const selectRef = React45.useRef(null);
|
|
6527
6342
|
const { states, methods } = useSelect();
|
|
6528
6343
|
const handleClickOutside = () => {
|
|
6529
6344
|
if (states.open && methods.setOpen) {
|
|
@@ -6534,7 +6349,7 @@ var Select = ({ children }) => {
|
|
|
6534
6349
|
selectRef,
|
|
6535
6350
|
handleClickOutside
|
|
6536
6351
|
);
|
|
6537
|
-
return /* @__PURE__ */
|
|
6352
|
+
return /* @__PURE__ */ React45.createElement(Wrapper, { ref: selectRef }, children);
|
|
6538
6353
|
};
|
|
6539
6354
|
Select.displayName = "Select";
|
|
6540
6355
|
var SelectTrigger = (props) => {
|
|
@@ -6548,7 +6363,7 @@ var SelectTrigger = (props) => {
|
|
|
6548
6363
|
children,
|
|
6549
6364
|
...restProps
|
|
6550
6365
|
} = props;
|
|
6551
|
-
const triggerRef =
|
|
6366
|
+
const triggerRef = React45.useRef(null);
|
|
6552
6367
|
const triggerRect = () => triggerRef.current?.getBoundingClientRect();
|
|
6553
6368
|
const { id, states, methods } = useSelect();
|
|
6554
6369
|
const { toggleOpen, setTriggerProps } = methods;
|
|
@@ -6566,7 +6381,7 @@ var SelectTrigger = (props) => {
|
|
|
6566
6381
|
});
|
|
6567
6382
|
}
|
|
6568
6383
|
};
|
|
6569
|
-
return /* @__PURE__ */
|
|
6384
|
+
return /* @__PURE__ */ React45.createElement(
|
|
6570
6385
|
Trigger,
|
|
6571
6386
|
{
|
|
6572
6387
|
ref: triggerRef,
|
|
@@ -6586,7 +6401,7 @@ var SelectTrigger = (props) => {
|
|
|
6586
6401
|
disabled,
|
|
6587
6402
|
...restProps
|
|
6588
6403
|
},
|
|
6589
|
-
/* @__PURE__ */
|
|
6404
|
+
/* @__PURE__ */ React45.createElement(Label2, null, children)
|
|
6590
6405
|
);
|
|
6591
6406
|
};
|
|
6592
6407
|
SelectTrigger.displayName = "Select.Trigger";
|
|
@@ -6594,8 +6409,8 @@ var SelectContent = (props) => {
|
|
|
6594
6409
|
const { raw, defaultOpen, children, ...restProps } = props;
|
|
6595
6410
|
const { id, states, methods } = useSelect();
|
|
6596
6411
|
const { toggleOpen, setContentProps } = methods;
|
|
6597
|
-
const mounted =
|
|
6598
|
-
const contentRef =
|
|
6412
|
+
const mounted = React45.useRef(false);
|
|
6413
|
+
const contentRef = React45.useRef(null);
|
|
6599
6414
|
const contentRect = () => contentRef?.current?.getBoundingClientRect();
|
|
6600
6415
|
const bodyRect = () => {
|
|
6601
6416
|
if (typeof document !== "undefined") {
|
|
@@ -6613,10 +6428,10 @@ var SelectContent = (props) => {
|
|
|
6613
6428
|
content_bottom: states.contentProps.bottom
|
|
6614
6429
|
};
|
|
6615
6430
|
const hasEnoughVerticalSpace = dimensions.body_height - dimensions.content_bottom > dimensions.content_height - dimensions.content_height * 0.9;
|
|
6616
|
-
|
|
6431
|
+
React45.useEffect(() => {
|
|
6617
6432
|
if (defaultOpen && toggleOpen) toggleOpen();
|
|
6618
6433
|
}, []);
|
|
6619
|
-
|
|
6434
|
+
React45.useEffect(() => {
|
|
6620
6435
|
mounted.current = true;
|
|
6621
6436
|
if (setContentProps) {
|
|
6622
6437
|
setContentProps({
|
|
@@ -6632,7 +6447,7 @@ var SelectContent = (props) => {
|
|
|
6632
6447
|
mounted.current = false;
|
|
6633
6448
|
};
|
|
6634
6449
|
}, [states.open]);
|
|
6635
|
-
|
|
6450
|
+
React45.useEffect(() => {
|
|
6636
6451
|
if (!states.open) return;
|
|
6637
6452
|
const handleKeyDown = (event) => {
|
|
6638
6453
|
if (event.key === "Escape" && methods.setOpen) {
|
|
@@ -6643,7 +6458,7 @@ var SelectContent = (props) => {
|
|
|
6643
6458
|
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
6644
6459
|
}, [states.open]);
|
|
6645
6460
|
if (!states.open) return null;
|
|
6646
|
-
return /* @__PURE__ */
|
|
6461
|
+
return /* @__PURE__ */ React45.createElement(
|
|
6647
6462
|
ScrollArea,
|
|
6648
6463
|
{
|
|
6649
6464
|
scrollbar: true,
|
|
@@ -6683,7 +6498,7 @@ var SelectItem = (props) => {
|
|
|
6683
6498
|
handleSelect(event);
|
|
6684
6499
|
}
|
|
6685
6500
|
};
|
|
6686
|
-
return /* @__PURE__ */
|
|
6501
|
+
return /* @__PURE__ */ React45.createElement(
|
|
6687
6502
|
List,
|
|
6688
6503
|
{
|
|
6689
6504
|
role: "option",
|
|
@@ -6697,7 +6512,7 @@ var SelectItem = (props) => {
|
|
|
6697
6512
|
onKeyDown: handleKeyDown,
|
|
6698
6513
|
...restProps
|
|
6699
6514
|
},
|
|
6700
|
-
/* @__PURE__ */
|
|
6515
|
+
/* @__PURE__ */ React45.createElement(Item, null, children)
|
|
6701
6516
|
);
|
|
6702
6517
|
};
|
|
6703
6518
|
SelectItem.displayName = "Select.Item";
|
|
@@ -6803,11 +6618,6 @@ export {
|
|
|
6803
6618
|
ToolbarSection,
|
|
6804
6619
|
ToolbarTrigger,
|
|
6805
6620
|
Tooltip,
|
|
6806
|
-
Tree,
|
|
6807
|
-
TreeContent,
|
|
6808
|
-
TreeNode,
|
|
6809
|
-
TreeRoot,
|
|
6810
|
-
TreeTrigger,
|
|
6811
6621
|
useAccordion,
|
|
6812
6622
|
useCheckbox,
|
|
6813
6623
|
useCollapsible,
|
|
@@ -6819,7 +6629,5 @@ export {
|
|
|
6819
6629
|
useSheet,
|
|
6820
6630
|
useSwitch,
|
|
6821
6631
|
useTabs,
|
|
6822
|
-
useToolbar
|
|
6823
|
-
useTree,
|
|
6824
|
-
useTreeNode
|
|
6632
|
+
useToolbar
|
|
6825
6633
|
};
|