@okshaun/components 4.1.5 → 5.0.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/README.md +1 -1
- package/dist/icon-metadata.json +134 -0
- package/dist/index.js +16208 -10749
- package/dist/index.js.map +1 -1
- package/dist/panda.buildinfo.json +754 -530
- package/dist/{preset-jXQwQ5KL.js → preset-B6fsdoKY.js} +2338 -317
- package/dist/preset-B6fsdoKY.js.map +1 -0
- package/dist/preset.js +1 -1
- package/dist/specs/keyframes.json +66 -0
- package/dist/specs/recipes.json +394 -26
- package/dist/specs/tokens.json +15 -0
- package/dist/sprite.svg +1 -1
- package/dist/sprite.symbol.html +248 -2
- package/dist/styles.css +3971 -789
- package/dist/svgs/barcode-reader-off.svg +1 -0
- package/dist/svgs/circle-dashed.svg +1 -0
- package/dist/svgs/drawer-left-hide.svg +1 -0
- package/dist/svgs/drawer-left-show.svg +1 -0
- package/dist/svgs/drawer-right-hide.svg +1 -0
- package/dist/svgs/drawer-right-show.svg +1 -0
- package/dist/svgs/not-equal.svg +1 -0
- package/dist/svgs/square-dashed.svg +1 -0
- package/dist/types/index.d.ts +2989 -115
- package/package.json +9 -12
- package/src/recipes/alert.ts +80 -0
- package/src/recipes/autocomplete.ts +2 -2
- package/src/recipes/avatar.ts +13 -6
- package/src/recipes/button.ts +41 -30
- package/src/recipes/checkbox.ts +3 -0
- package/src/recipes/chip.ts +16 -0
- package/src/recipes/code.ts +40 -23
- package/src/recipes/codeBlock.ts +277 -0
- package/src/recipes/drawer.ts +150 -0
- package/src/recipes/filterField.ts +138 -0
- package/src/recipes/filterMenu.ts +71 -0
- package/src/recipes/filterToken.ts +189 -0
- package/src/recipes/inlineNote.ts +49 -0
- package/src/recipes/keyFact.ts +111 -0
- package/src/recipes/listItem.ts +25 -0
- package/src/recipes/menu.ts +41 -2
- package/src/recipes/pageBanner.ts +110 -0
- package/src/recipes/peekBar.ts +35 -0
- package/src/recipes/popover.ts +206 -0
- package/src/recipes/printPreview.ts +101 -0
- package/src/recipes/recipes-regular.ts +1 -1
- package/src/recipes/recipes-slot.ts +14 -0
- package/src/recipes/segmentedFields.ts +11 -5
- package/src/recipes/select.ts +204 -63
- package/src/recipes/spinner.ts +1 -1
- package/src/recipes/tabs.ts +161 -0
- package/src/recipes/tag.ts +13 -2
- package/src/recipes/timeMenus.ts +1 -1
- package/src/recipes/toast.ts +116 -0
- package/src/recipes/toggle.ts +3 -3
- package/src/styles/primitives/fontSizes.ts +1 -0
- package/src/styles/primitives/radii.ts +2 -0
- package/src/styles/utilities/keyframes.ts +38 -0
- package/src/utils/compoundComponent.ts +29 -0
- package/dist/preset-jXQwQ5KL.js.map +0 -1
|
@@ -440,6 +440,44 @@ const keyframes = defineKeyframes({
|
|
|
440
440
|
opacity: "0",
|
|
441
441
|
transform: "scale(0.97) translateY(-40px)"
|
|
442
442
|
}
|
|
443
|
+
},
|
|
444
|
+
// Drawer animations
|
|
445
|
+
drawerSlideInRight: {
|
|
446
|
+
"0%": { transform: "translateX(100%)" },
|
|
447
|
+
"100%": { transform: "translateX(0)" }
|
|
448
|
+
},
|
|
449
|
+
drawerSlideOutRight: {
|
|
450
|
+
"0%": { transform: "translateX(0)" },
|
|
451
|
+
"100%": { transform: "translateX(100%)" }
|
|
452
|
+
},
|
|
453
|
+
drawerSlideInLeft: {
|
|
454
|
+
"0%": { transform: "translateX(-100%)" },
|
|
455
|
+
"100%": { transform: "translateX(0)" }
|
|
456
|
+
},
|
|
457
|
+
drawerSlideOutLeft: {
|
|
458
|
+
"0%": { transform: "translateX(0)" },
|
|
459
|
+
"100%": { transform: "translateX(-100%)" }
|
|
460
|
+
},
|
|
461
|
+
// Toast animations
|
|
462
|
+
toastSlideIn: {
|
|
463
|
+
"0%": {
|
|
464
|
+
opacity: "0",
|
|
465
|
+
transform: "translateX(16px)"
|
|
466
|
+
},
|
|
467
|
+
"100%": {
|
|
468
|
+
opacity: "1",
|
|
469
|
+
transform: "translateX(0)"
|
|
470
|
+
}
|
|
471
|
+
},
|
|
472
|
+
toastSlideOut: {
|
|
473
|
+
"0%": {
|
|
474
|
+
opacity: "1",
|
|
475
|
+
transform: "translateX(0)"
|
|
476
|
+
},
|
|
477
|
+
"100%": {
|
|
478
|
+
opacity: "0",
|
|
479
|
+
transform: "translateX(16px)"
|
|
480
|
+
}
|
|
443
481
|
}
|
|
444
482
|
});
|
|
445
483
|
const layerStyles = defineLayerStyles({
|
|
@@ -1095,6 +1133,7 @@ const fontSizes$1 = defineTokens.fontSizes({
|
|
|
1095
1133
|
"32": { value: "{sizes.32}" },
|
|
1096
1134
|
"40": { value: "{sizes.40}" },
|
|
1097
1135
|
"48": { value: "{sizes.48}" },
|
|
1136
|
+
"56": { value: "{sizes.56}" },
|
|
1098
1137
|
"64": { value: "{sizes.64}" },
|
|
1099
1138
|
"72": { value: "{sizes.72}" },
|
|
1100
1139
|
"80": { value: "{sizes.80}" },
|
|
@@ -1258,7 +1297,9 @@ const radii = defineTokens.radii({
|
|
|
1258
1297
|
"2": { value: "{sizes.2}" },
|
|
1259
1298
|
"3": { value: "{sizes.3}" },
|
|
1260
1299
|
"4": { value: "{sizes.4}" },
|
|
1300
|
+
"6": { value: "{sizes.6}" },
|
|
1261
1301
|
"8": { value: "{sizes.8}" },
|
|
1302
|
+
"12": { value: "{sizes.12}" },
|
|
1262
1303
|
"16": { value: "{sizes.16}" },
|
|
1263
1304
|
"100": { value: utilitySizes.full.value },
|
|
1264
1305
|
"999": { value: "999px" }
|
|
@@ -2910,7 +2951,7 @@ function createFocusRing(selector, className) {
|
|
|
2910
2951
|
}
|
|
2911
2952
|
};
|
|
2912
2953
|
}
|
|
2913
|
-
var focusRing = {
|
|
2954
|
+
var focusRing$1 = {
|
|
2914
2955
|
focusRing: createFocusRing("&:is(:focus, [data-focus])", "focus-ring"),
|
|
2915
2956
|
focusVisibleRing: createFocusRing("&:is(:focus-visible, [data-focus-visible])", "focus-v-ring"),
|
|
2916
2957
|
focusRingColor: {
|
|
@@ -4627,7 +4668,7 @@ var utilities = Object.assign(
|
|
|
4627
4668
|
flexGrid,
|
|
4628
4669
|
spacing,
|
|
4629
4670
|
outline,
|
|
4630
|
-
focusRing,
|
|
4671
|
+
focusRing$1,
|
|
4631
4672
|
divide,
|
|
4632
4673
|
sizing,
|
|
4633
4674
|
typography,
|
|
@@ -4777,34 +4818,50 @@ const checkboxInputRecipe = defineRecipe({
|
|
|
4777
4818
|
variants: {}
|
|
4778
4819
|
});
|
|
4779
4820
|
const codeBase = {
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
fontSize: "
|
|
4821
|
+
...globalBaseStyles,
|
|
4822
|
+
display: "inline",
|
|
4823
|
+
fontFamily: "mono",
|
|
4824
|
+
// Relative to the surrounding text, so inline code keeps the same optical
|
|
4825
|
+
// size in a heading, a paragraph, or a table cell.
|
|
4826
|
+
fontSize: "smaller",
|
|
4827
|
+
lineHeight: "inherit",
|
|
4828
|
+
color: "text",
|
|
4829
|
+
px: "4",
|
|
4830
|
+
rounded: "4",
|
|
4831
|
+
boxDecorationBreak: "clone",
|
|
4832
|
+
// Long identifiers, part numbers, and tokens wrap instead of overflowing
|
|
4833
|
+
// their container.
|
|
4834
|
+
overflowWrap: "anywhere",
|
|
4835
|
+
whiteSpace: "normal"
|
|
4786
4836
|
};
|
|
4787
|
-
const
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4837
|
+
const codeVariants = {
|
|
4838
|
+
variant: {
|
|
4839
|
+
/** Tinted background. The default for code inside running text. */
|
|
4840
|
+
subtle: {
|
|
4841
|
+
bg: "bg.neutral"
|
|
4842
|
+
},
|
|
4843
|
+
/** Border only. Use where a tint would compete with a selected row. */
|
|
4844
|
+
outline: {
|
|
4845
|
+
borderWidth: "1",
|
|
4846
|
+
borderStyle: "solid",
|
|
4847
|
+
borderColor: "border",
|
|
4848
|
+
bg: "transparent"
|
|
4849
|
+
},
|
|
4850
|
+
/** Monospace font only. Use for values in dense tables and lists. */
|
|
4851
|
+
plain: {
|
|
4852
|
+
px: "0",
|
|
4853
|
+
bg: "transparent"
|
|
4854
|
+
}
|
|
4855
|
+
}
|
|
4798
4856
|
};
|
|
4799
4857
|
const codeRecipe = defineRecipe({
|
|
4800
4858
|
className: "code",
|
|
4801
4859
|
jsx: ["Code"],
|
|
4802
|
-
base: codeBase
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
base: preBase
|
|
4860
|
+
base: codeBase,
|
|
4861
|
+
variants: codeVariants,
|
|
4862
|
+
defaultVariants: {
|
|
4863
|
+
variant: "subtle"
|
|
4864
|
+
}
|
|
4808
4865
|
});
|
|
4809
4866
|
const dividerRecipe = defineRecipe({
|
|
4810
4867
|
className: "divider",
|
|
@@ -5067,13 +5124,23 @@ const tagRecipe = defineRecipe({
|
|
|
5067
5124
|
gap: "1",
|
|
5068
5125
|
px: "4",
|
|
5069
5126
|
w: "fit",
|
|
5070
|
-
h: "20",
|
|
5071
|
-
fontSize: "14",
|
|
5072
5127
|
fontWeight: "medium",
|
|
5073
5128
|
lineHeight: "tight",
|
|
5074
5129
|
whiteSpace: "nowrap"
|
|
5075
5130
|
},
|
|
5076
5131
|
variants: {
|
|
5132
|
+
// Both sizes set every property they change, so a conditional value such
|
|
5133
|
+
// as { base: 'sm', md: 'md' } switches back at the breakpoint.
|
|
5134
|
+
size: {
|
|
5135
|
+
sm: {
|
|
5136
|
+
h: "16",
|
|
5137
|
+
fontSize: "12"
|
|
5138
|
+
},
|
|
5139
|
+
md: {
|
|
5140
|
+
h: "20",
|
|
5141
|
+
fontSize: "14"
|
|
5142
|
+
}
|
|
5143
|
+
},
|
|
5077
5144
|
// Each hue publishes both colour pairs; `variant` picks one. This replaces
|
|
5078
5145
|
// 24 compoundVariants, which Panda emitted no CSS for at all: the variant
|
|
5079
5146
|
// bodies were empty, so every Tag rendered as the uncoloured base. Doing it
|
|
@@ -5316,6 +5383,7 @@ const tagRecipe = defineRecipe({
|
|
|
5316
5383
|
}
|
|
5317
5384
|
},
|
|
5318
5385
|
defaultVariants: {
|
|
5386
|
+
size: "md",
|
|
5319
5387
|
variant: "default",
|
|
5320
5388
|
hue: "gray"
|
|
5321
5389
|
}
|
|
@@ -5680,7 +5748,6 @@ const regularRecipes = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defi
|
|
|
5680
5748
|
labelRecipe,
|
|
5681
5749
|
linkRecipe,
|
|
5682
5750
|
listRecipe,
|
|
5683
|
-
preRecipe,
|
|
5684
5751
|
radioInputRecipe,
|
|
5685
5752
|
skeletonRecipe,
|
|
5686
5753
|
tagRecipe,
|
|
@@ -5689,6 +5756,80 @@ const regularRecipes = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defi
|
|
|
5689
5756
|
themeSwitcherRecipe,
|
|
5690
5757
|
toggleInputRecipe
|
|
5691
5758
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5759
|
+
const alertBase = {
|
|
5760
|
+
root: {
|
|
5761
|
+
...globalBaseStyles,
|
|
5762
|
+
display: "flex",
|
|
5763
|
+
alignItems: "flex-start",
|
|
5764
|
+
gap: "8",
|
|
5765
|
+
w: "full",
|
|
5766
|
+
p: "12",
|
|
5767
|
+
borderRadius: "4",
|
|
5768
|
+
border: "default"
|
|
5769
|
+
},
|
|
5770
|
+
icon: {
|
|
5771
|
+
display: "flex",
|
|
5772
|
+
alignItems: "center",
|
|
5773
|
+
flex: "none",
|
|
5774
|
+
minH: "20"
|
|
5775
|
+
},
|
|
5776
|
+
content: {
|
|
5777
|
+
display: "flex",
|
|
5778
|
+
flexDirection: "column",
|
|
5779
|
+
gap: "4",
|
|
5780
|
+
flex: "1",
|
|
5781
|
+
minW: "0"
|
|
5782
|
+
},
|
|
5783
|
+
title: {
|
|
5784
|
+
maxW: "full"
|
|
5785
|
+
},
|
|
5786
|
+
message: {
|
|
5787
|
+
maxW: "full"
|
|
5788
|
+
},
|
|
5789
|
+
actions: {
|
|
5790
|
+
display: "flex",
|
|
5791
|
+
flexWrap: "wrap",
|
|
5792
|
+
alignItems: "center",
|
|
5793
|
+
gap: "8",
|
|
5794
|
+
mt: "4"
|
|
5795
|
+
},
|
|
5796
|
+
dismiss: {
|
|
5797
|
+
flex: "none"
|
|
5798
|
+
}
|
|
5799
|
+
};
|
|
5800
|
+
const alertVariants = {
|
|
5801
|
+
/**
|
|
5802
|
+
* Semantic tone. Drives surface and border tokens; the component maps the
|
|
5803
|
+
* same tone to text/icon color tokens and to the tone icon.
|
|
5804
|
+
*/
|
|
5805
|
+
tone: {
|
|
5806
|
+
info: {
|
|
5807
|
+
root: { bg: "bg.info", border: "info" }
|
|
5808
|
+
},
|
|
5809
|
+
success: {
|
|
5810
|
+
root: { bg: "bg.success", border: "success" }
|
|
5811
|
+
},
|
|
5812
|
+
warning: {
|
|
5813
|
+
root: { bg: "bg.warning", border: "warning" }
|
|
5814
|
+
},
|
|
5815
|
+
danger: {
|
|
5816
|
+
root: { bg: "bg.danger", border: "danger" }
|
|
5817
|
+
},
|
|
5818
|
+
neutral: {
|
|
5819
|
+
root: { bg: "bg.neutral", border: "default" }
|
|
5820
|
+
}
|
|
5821
|
+
}
|
|
5822
|
+
};
|
|
5823
|
+
const alertRecipe = defineSlotRecipe({
|
|
5824
|
+
className: "alert",
|
|
5825
|
+
jsx: ["Alert"],
|
|
5826
|
+
slots: ["root", "icon", "content", "title", "message", "actions", "dismiss"],
|
|
5827
|
+
base: alertBase,
|
|
5828
|
+
variants: alertVariants,
|
|
5829
|
+
defaultVariants: {
|
|
5830
|
+
tone: "info"
|
|
5831
|
+
}
|
|
5832
|
+
});
|
|
5692
5833
|
const validationStyles = {
|
|
5693
5834
|
danger: {
|
|
5694
5835
|
borderColor: "border.danger",
|
|
@@ -5843,9 +5984,9 @@ const autocompleteBase = {
|
|
|
5843
5984
|
},
|
|
5844
5985
|
listbox: {
|
|
5845
5986
|
...globalBaseStyles,
|
|
5846
|
-
width: "
|
|
5987
|
+
width: "fit",
|
|
5847
5988
|
maxHeight: "192",
|
|
5848
|
-
|
|
5989
|
+
overflow: "auto",
|
|
5849
5990
|
bg: "surface",
|
|
5850
5991
|
borderRadius: "4",
|
|
5851
5992
|
boxShadow: "overlay",
|
|
@@ -5952,12 +6093,6 @@ const avatarRecipe = defineSlotRecipe({
|
|
|
5952
6093
|
className: "avatar",
|
|
5953
6094
|
jsx: ["Avatar"],
|
|
5954
6095
|
slots: ["root", "image", "fallback", "presence", "status"],
|
|
5955
|
-
staticCss: [
|
|
5956
|
-
{
|
|
5957
|
-
size: ["xs", "sm", "md", "lg", "xl", "2xl"],
|
|
5958
|
-
shape: ["circle", "square", "hexagon"]
|
|
5959
|
-
}
|
|
5960
|
-
],
|
|
5961
6096
|
base: {
|
|
5962
6097
|
root: {
|
|
5963
6098
|
display: "inline-flex",
|
|
@@ -6142,6 +6277,19 @@ const avatarRecipe = defineSlotRecipe({
|
|
|
6142
6277
|
clipPath: "polygon(45% 1.33975%,46.5798% .60307%,48.26352% .15192%,50% 0,51.73648% .15192%,53.4202% .60307%,55% 1.33975%,89.64102% 21.33975%,91.06889% 22.33956%,92.30146% 23.57212%,93.30127% 25%,94.03794% 26.5798%,94.48909% 28.26352%,94.64102% 30%,94.64102% 70%,94.48909% 71.73648%,94.03794% 73.4202%,93.30127% 75%,92.30146% 76.42788%,91.06889% 77.66044%,89.64102% 78.66025%,55% 98.66025%,53.4202% 99.39693%,51.73648% 99.84808%,50% 100%,48.26352% 99.84808%,46.5798% 99.39693%,45% 98.66025%,10.35898% 78.66025%,8.93111% 77.66044%,7.69854% 76.42788%,6.69873% 75%,5.96206% 73.4202%,5.51091% 71.73648%,5.35898% 70%,5.35898% 30%,5.51091% 28.26352%,5.96206% 26.5798%,6.69873% 25%,7.69854% 23.57212%,8.93111% 22.33956%,10.35898% 21.33975%)"
|
|
6143
6278
|
}
|
|
6144
6279
|
}
|
|
6280
|
+
},
|
|
6281
|
+
stacked: {
|
|
6282
|
+
true: {
|
|
6283
|
+
root: {
|
|
6284
|
+
outlineWidth: "2",
|
|
6285
|
+
outlineStyle: "solid",
|
|
6286
|
+
outlineColor: "surface",
|
|
6287
|
+
outlineOffset: "-2",
|
|
6288
|
+
"&:not(:first-child)": {
|
|
6289
|
+
ml: "-4"
|
|
6290
|
+
}
|
|
6291
|
+
}
|
|
6292
|
+
}
|
|
6145
6293
|
}
|
|
6146
6294
|
},
|
|
6147
6295
|
defaultVariants: {
|
|
@@ -6351,6 +6499,11 @@ const breadcrumbsRecipe = defineSlotRecipe({
|
|
|
6351
6499
|
}
|
|
6352
6500
|
}
|
|
6353
6501
|
});
|
|
6502
|
+
const enabled = ":not([aria-disabled='true'])";
|
|
6503
|
+
const hoverEnabled = `&:is(:hover, [data-hover=true])${enabled}`;
|
|
6504
|
+
const activeEnabled = `&:is(:active, [data-active=true])${enabled}`;
|
|
6505
|
+
const groupHoverEnabled = `.group:is(:hover, [data-hover=true])${enabled} &`;
|
|
6506
|
+
const groupActiveEnabled = `.group:is(:active, [data-active=true])${enabled} &`;
|
|
6354
6507
|
const buttonBaseStyles = {
|
|
6355
6508
|
container: {
|
|
6356
6509
|
...globalBaseStyles,
|
|
@@ -6427,10 +6580,10 @@ const buttonVariants = {
|
|
|
6427
6580
|
container: {
|
|
6428
6581
|
bg: "bg.neutral",
|
|
6429
6582
|
borderColor: "transparent",
|
|
6430
|
-
|
|
6583
|
+
[hoverEnabled]: {
|
|
6431
6584
|
bg: "bg.neutral.hovered"
|
|
6432
6585
|
},
|
|
6433
|
-
|
|
6586
|
+
[activeEnabled]: {
|
|
6434
6587
|
bg: "bg.neutral.pressed"
|
|
6435
6588
|
}
|
|
6436
6589
|
},
|
|
@@ -6440,18 +6593,18 @@ const buttonVariants = {
|
|
|
6440
6593
|
slot: {
|
|
6441
6594
|
fill: "icon.decorative",
|
|
6442
6595
|
mixBlendMode: { base: "multiply", _dark: "screen" },
|
|
6443
|
-
|
|
6444
|
-
|
|
6596
|
+
[groupHoverEnabled]: { fill: "current" },
|
|
6597
|
+
[groupActiveEnabled]: { fill: "current" }
|
|
6445
6598
|
}
|
|
6446
6599
|
},
|
|
6447
6600
|
primary: {
|
|
6448
6601
|
container: {
|
|
6449
6602
|
bg: "bg.neutral.boldest",
|
|
6450
6603
|
borderColor: "transparent",
|
|
6451
|
-
|
|
6604
|
+
[hoverEnabled]: {
|
|
6452
6605
|
bg: "bg.neutral.bold.hovered"
|
|
6453
6606
|
},
|
|
6454
|
-
|
|
6607
|
+
[activeEnabled]: {
|
|
6455
6608
|
bg: "bg.neutral.bold.pressed"
|
|
6456
6609
|
}
|
|
6457
6610
|
},
|
|
@@ -6461,8 +6614,8 @@ const buttonVariants = {
|
|
|
6461
6614
|
slot: {
|
|
6462
6615
|
fill: "icon.decorative.inverse",
|
|
6463
6616
|
mixBlendMode: { base: "screen", _dark: "multiply" },
|
|
6464
|
-
|
|
6465
|
-
|
|
6617
|
+
[groupHoverEnabled]: { fill: "icon.decorative.inverse.hovered" },
|
|
6618
|
+
[groupActiveEnabled]: { fill: "icon.decorative.inverse.hovered" },
|
|
6466
6619
|
_groupDisabled: {
|
|
6467
6620
|
fill: "icon.decorative.inverse"
|
|
6468
6621
|
}
|
|
@@ -6472,10 +6625,10 @@ const buttonVariants = {
|
|
|
6472
6625
|
container: {
|
|
6473
6626
|
bg: "bg.neutral.subtle",
|
|
6474
6627
|
borderColor: "border",
|
|
6475
|
-
|
|
6628
|
+
[hoverEnabled]: {
|
|
6476
6629
|
bg: "bg.neutral.subtle.hovered"
|
|
6477
6630
|
},
|
|
6478
|
-
|
|
6631
|
+
[activeEnabled]: {
|
|
6479
6632
|
bg: "bg.neutral.subtle.pressed"
|
|
6480
6633
|
}
|
|
6481
6634
|
},
|
|
@@ -6485,18 +6638,18 @@ const buttonVariants = {
|
|
|
6485
6638
|
slot: {
|
|
6486
6639
|
fill: "icon.decorative",
|
|
6487
6640
|
mixBlendMode: { base: "multiply", _dark: "screen" },
|
|
6488
|
-
|
|
6489
|
-
|
|
6641
|
+
[groupHoverEnabled]: { fill: "current" },
|
|
6642
|
+
[groupActiveEnabled]: { fill: "current" }
|
|
6490
6643
|
}
|
|
6491
6644
|
},
|
|
6492
6645
|
ghost: {
|
|
6493
6646
|
container: {
|
|
6494
6647
|
bg: "bg.neutral.subtle",
|
|
6495
6648
|
borderColor: "transparent",
|
|
6496
|
-
|
|
6649
|
+
[hoverEnabled]: {
|
|
6497
6650
|
bg: "bg.neutral.subtle.hovered"
|
|
6498
6651
|
},
|
|
6499
|
-
|
|
6652
|
+
[activeEnabled]: {
|
|
6500
6653
|
bg: "bg.neutral.subtle.pressed"
|
|
6501
6654
|
}
|
|
6502
6655
|
},
|
|
@@ -6506,31 +6659,34 @@ const buttonVariants = {
|
|
|
6506
6659
|
slot: {
|
|
6507
6660
|
fill: "icon.decorative",
|
|
6508
6661
|
mixBlendMode: { base: "multiply", _dark: "screen" },
|
|
6509
|
-
|
|
6510
|
-
|
|
6662
|
+
[groupHoverEnabled]: { fill: "current" },
|
|
6663
|
+
[groupActiveEnabled]: { fill: "current" }
|
|
6511
6664
|
}
|
|
6512
6665
|
},
|
|
6513
6666
|
danger: {
|
|
6514
6667
|
container: {
|
|
6515
6668
|
bg: "red.50",
|
|
6516
6669
|
borderColor: "transparent",
|
|
6517
|
-
|
|
6670
|
+
[hoverEnabled]: {
|
|
6518
6671
|
bg: "red.40"
|
|
6519
6672
|
},
|
|
6520
|
-
|
|
6673
|
+
[activeEnabled]: {
|
|
6521
6674
|
bg: "red.60"
|
|
6522
6675
|
}
|
|
6523
6676
|
},
|
|
6524
6677
|
mainContent: {
|
|
6525
6678
|
color: "neutral.0"
|
|
6526
6679
|
},
|
|
6680
|
+
// The red background and white label are the same in both themes, so
|
|
6681
|
+
// the icon is too. The inverse icon tokens turn dark in dark mode, and
|
|
6682
|
+
// a dark icon screened on red does not show.
|
|
6527
6683
|
slot: {
|
|
6528
|
-
fill: "
|
|
6684
|
+
fill: "neutral.30",
|
|
6529
6685
|
mixBlendMode: "screen",
|
|
6530
|
-
|
|
6531
|
-
|
|
6686
|
+
[groupHoverEnabled]: { fill: "neutral.0" },
|
|
6687
|
+
[groupActiveEnabled]: { fill: "neutral.0" },
|
|
6532
6688
|
_groupDisabled: {
|
|
6533
|
-
fill: "
|
|
6689
|
+
fill: "neutral.30"
|
|
6534
6690
|
}
|
|
6535
6691
|
}
|
|
6536
6692
|
},
|
|
@@ -6538,11 +6694,11 @@ const buttonVariants = {
|
|
|
6538
6694
|
container: {
|
|
6539
6695
|
bg: "bg.selected",
|
|
6540
6696
|
borderColor: "transparent",
|
|
6541
|
-
|
|
6697
|
+
[hoverEnabled]: {
|
|
6542
6698
|
bg: "bg.selected.hovered",
|
|
6543
6699
|
color: "text.selected"
|
|
6544
6700
|
},
|
|
6545
|
-
|
|
6701
|
+
[activeEnabled]: {
|
|
6546
6702
|
bg: "bg.selected.pressed",
|
|
6547
6703
|
color: "text.selected"
|
|
6548
6704
|
}
|
|
@@ -6553,8 +6709,8 @@ const buttonVariants = {
|
|
|
6553
6709
|
slot: {
|
|
6554
6710
|
fill: "icon.selected",
|
|
6555
6711
|
mixBlendMode: { base: "multiply", _dark: "screen" },
|
|
6556
|
-
|
|
6557
|
-
|
|
6712
|
+
[groupHoverEnabled]: { fill: "icon.selected" },
|
|
6713
|
+
[groupActiveEnabled]: { fill: "icon.selected" },
|
|
6558
6714
|
_groupDisabled: {
|
|
6559
6715
|
fill: "icon.selected"
|
|
6560
6716
|
}
|
|
@@ -6564,10 +6720,10 @@ const buttonVariants = {
|
|
|
6564
6720
|
container: {
|
|
6565
6721
|
bg: "bg.selected.bold",
|
|
6566
6722
|
borderColor: "transparent",
|
|
6567
|
-
|
|
6723
|
+
[hoverEnabled]: {
|
|
6568
6724
|
bg: "bg.selected.bold.hovered"
|
|
6569
6725
|
},
|
|
6570
|
-
|
|
6726
|
+
[activeEnabled]: {
|
|
6571
6727
|
bg: "bg.selected.bold.pressed"
|
|
6572
6728
|
}
|
|
6573
6729
|
},
|
|
@@ -6577,8 +6733,8 @@ const buttonVariants = {
|
|
|
6577
6733
|
slot: {
|
|
6578
6734
|
fill: "icon.decorative.inverse",
|
|
6579
6735
|
mixBlendMode: { base: "screen", _dark: "multiply" },
|
|
6580
|
-
|
|
6581
|
-
|
|
6736
|
+
[groupHoverEnabled]: { fill: "icon.decorative.inverse.hovered" },
|
|
6737
|
+
[groupActiveEnabled]: { fill: "icon.decorative.inverse.hovered" },
|
|
6582
6738
|
_groupDisabled: {
|
|
6583
6739
|
fill: "icon.decorative.inverse"
|
|
6584
6740
|
}
|
|
@@ -6860,6 +7016,8 @@ const checkboxRecipe = defineSlotRecipe({
|
|
|
6860
7016
|
width: "24",
|
|
6861
7017
|
height: "24",
|
|
6862
7018
|
zIndex: "3",
|
|
7019
|
+
// The icons sit above the input, so clicks must pass through to it.
|
|
7020
|
+
pointerEvents: "none",
|
|
6863
7021
|
"&:is([name='checkbox'])": {
|
|
6864
7022
|
fill: "icon.subtlest",
|
|
6865
7023
|
zIndex: "3"
|
|
@@ -6872,7 +7030,8 @@ const checkboxRecipe = defineSlotRecipe({
|
|
|
6872
7030
|
width: "24",
|
|
6873
7031
|
height: "24",
|
|
6874
7032
|
fill: "surface",
|
|
6875
|
-
zIndex: "base"
|
|
7033
|
+
zIndex: "base",
|
|
7034
|
+
pointerEvents: "none"
|
|
6876
7035
|
}
|
|
6877
7036
|
}
|
|
6878
7037
|
});
|
|
@@ -6923,6 +7082,19 @@ const buttonStyles = {
|
|
|
6923
7082
|
_icon: {
|
|
6924
7083
|
fill: "icon.decorative.inverse.hovered"
|
|
6925
7084
|
}
|
|
7085
|
+
},
|
|
7086
|
+
// Deviation from Cetec: the body carries data-selected itself, and :has()
|
|
7087
|
+
// only matches descendants. Without these rules, icons in a selected chip
|
|
7088
|
+
// keep the unselected fill on the dark background.
|
|
7089
|
+
"&[data-selected=true]": {
|
|
7090
|
+
_icon: {
|
|
7091
|
+
fill: "icon.decorative.inverse"
|
|
7092
|
+
}
|
|
7093
|
+
},
|
|
7094
|
+
"&[data-selected=true]:is(:hover, [data-hover], :active, [data-active])": {
|
|
7095
|
+
_icon: {
|
|
7096
|
+
fill: "icon.decorative.inverse.hovered"
|
|
7097
|
+
}
|
|
6926
7098
|
}
|
|
6927
7099
|
};
|
|
6928
7100
|
const chipRecipe = defineSlotRecipe({
|
|
@@ -7003,6 +7175,9 @@ const chipRecipe = defineSlotRecipe({
|
|
|
7003
7175
|
outlineStyle: "solid",
|
|
7004
7176
|
outlineColor: "transparent",
|
|
7005
7177
|
outlineOffset: "calc(token(sizes.2) * -1)",
|
|
7178
|
+
_focusVisible: {
|
|
7179
|
+
outlineColor: "border.focused"
|
|
7180
|
+
},
|
|
7006
7181
|
"button&": {
|
|
7007
7182
|
...buttonStyles
|
|
7008
7183
|
}
|
|
@@ -7125,94 +7300,874 @@ const chipRecipe = defineSlotRecipe({
|
|
|
7125
7300
|
size: "md"
|
|
7126
7301
|
}
|
|
7127
7302
|
});
|
|
7128
|
-
const
|
|
7129
|
-
|
|
7130
|
-
|
|
7303
|
+
const inheritText = {
|
|
7304
|
+
fontFamily: "inherit",
|
|
7305
|
+
fontVariationSettings: "inherit",
|
|
7306
|
+
fontSize: "inherit",
|
|
7307
|
+
fontWeight: "inherit",
|
|
7308
|
+
lineHeight: "inherit",
|
|
7309
|
+
color: "inherit"
|
|
7310
|
+
};
|
|
7311
|
+
const focusRing = {
|
|
7312
|
+
outlineWidth: "2",
|
|
7313
|
+
outlineStyle: "solid",
|
|
7314
|
+
outlineColor: "border.focused",
|
|
7315
|
+
outlineOffset: "-2"
|
|
7316
|
+
};
|
|
7317
|
+
const codeBlockBase = {
|
|
7318
|
+
root: {
|
|
7319
|
+
...globalBaseStyles,
|
|
7320
|
+
position: "relative",
|
|
7131
7321
|
display: "flex",
|
|
7132
|
-
|
|
7133
|
-
|
|
7134
|
-
|
|
7135
|
-
|
|
7136
|
-
|
|
7137
|
-
|
|
7138
|
-
|
|
7322
|
+
flexDirection: "column",
|
|
7323
|
+
w: "full",
|
|
7324
|
+
minW: "0",
|
|
7325
|
+
borderWidth: "1",
|
|
7326
|
+
borderStyle: "solid",
|
|
7327
|
+
rounded: "8",
|
|
7328
|
+
overflow: "hidden"
|
|
7139
7329
|
},
|
|
7140
|
-
|
|
7141
|
-
footer: {
|
|
7330
|
+
header: {
|
|
7142
7331
|
display: "flex",
|
|
7143
|
-
justifyContent: "flex-end",
|
|
7144
7332
|
alignItems: "center",
|
|
7145
7333
|
gap: "8",
|
|
7146
|
-
|
|
7147
|
-
|
|
7148
|
-
|
|
7149
|
-
|
|
7150
|
-
|
|
7151
|
-
}
|
|
7152
|
-
};
|
|
7153
|
-
const dateMenusRecipe = defineSlotRecipe({
|
|
7154
|
-
className: "dateMenus",
|
|
7155
|
-
jsx: ["DateMenus", "DateMenu", "DateRangeMenu"],
|
|
7156
|
-
slots: ["calendars", "calendarsDivider", "footer"],
|
|
7157
|
-
base: dateMenusBase
|
|
7158
|
-
});
|
|
7159
|
-
const dateTimeMenusBase = {
|
|
7160
|
-
// Row holding the Calendar + divider + time columns, above the footer.
|
|
7161
|
-
content: {
|
|
7162
|
-
display: "flex",
|
|
7163
|
-
alignItems: "stretch"
|
|
7334
|
+
minH: "32",
|
|
7335
|
+
pl: "16",
|
|
7336
|
+
pr: "4",
|
|
7337
|
+
borderBottomWidth: "1",
|
|
7338
|
+
borderBottomStyle: "solid"
|
|
7164
7339
|
},
|
|
7165
|
-
|
|
7166
|
-
|
|
7167
|
-
|
|
7168
|
-
|
|
7169
|
-
|
|
7340
|
+
title: {
|
|
7341
|
+
flex: "1",
|
|
7342
|
+
minW: "0",
|
|
7343
|
+
fontFamily: "mono",
|
|
7344
|
+
fontSize: "12",
|
|
7345
|
+
lineHeight: "tight",
|
|
7346
|
+
color: "inherit",
|
|
7347
|
+
truncate: true
|
|
7170
7348
|
},
|
|
7171
|
-
|
|
7172
|
-
// even though DateTimeMenu isn't itself a range variant.
|
|
7173
|
-
footer: {
|
|
7349
|
+
actions: {
|
|
7174
7350
|
display: "flex",
|
|
7175
|
-
justifyContent: "flex-end",
|
|
7176
7351
|
alignItems: "center",
|
|
7177
|
-
|
|
7178
|
-
|
|
7179
|
-
borderTopWidth: "1",
|
|
7180
|
-
borderTopStyle: "solid",
|
|
7181
|
-
borderColor: "border",
|
|
7182
|
-
px: "16",
|
|
7183
|
-
py: "8"
|
|
7184
|
-
}
|
|
7185
|
-
};
|
|
7186
|
-
const dateTimeMenusRecipe = defineSlotRecipe({
|
|
7187
|
-
className: "dateTimeMenus",
|
|
7188
|
-
jsx: ["DateTimeMenus", "DateTimeMenu"],
|
|
7189
|
-
slots: ["content", "divider", "footer"],
|
|
7190
|
-
base: dateTimeMenusBase
|
|
7191
|
-
});
|
|
7192
|
-
const formFieldBase = {
|
|
7193
|
-
container: {
|
|
7194
|
-
_disabled: {
|
|
7195
|
-
opacity: "0.4",
|
|
7196
|
-
pointerEvents: "none"
|
|
7197
|
-
}
|
|
7352
|
+
gap: "2",
|
|
7353
|
+
flex: "none"
|
|
7198
7354
|
},
|
|
7199
|
-
|
|
7355
|
+
floatingActions: {
|
|
7356
|
+
position: "absolute",
|
|
7357
|
+
top: "4",
|
|
7358
|
+
right: "4",
|
|
7359
|
+
zIndex: "1",
|
|
7200
7360
|
display: "flex",
|
|
7201
|
-
|
|
7361
|
+
alignItems: "center",
|
|
7202
7362
|
gap: "2"
|
|
7203
7363
|
},
|
|
7204
|
-
|
|
7364
|
+
content: {
|
|
7365
|
+
position: "relative",
|
|
7366
|
+
overflowX: "auto",
|
|
7367
|
+
overflowY: "auto",
|
|
7368
|
+
fontFamily: "mono",
|
|
7369
|
+
fontWeight: "normal",
|
|
7370
|
+
lineHeight: "loose",
|
|
7371
|
+
color: "inherit",
|
|
7372
|
+
_focusVisible: focusRing
|
|
7373
|
+
},
|
|
7374
|
+
pre: {
|
|
7375
|
+
...inheritText,
|
|
7376
|
+
m: "0",
|
|
7377
|
+
py: "12",
|
|
7378
|
+
px: "16",
|
|
7379
|
+
minW: "full",
|
|
7380
|
+
w: "fit-content",
|
|
7381
|
+
bg: "transparent",
|
|
7382
|
+
tabSize: "2"
|
|
7383
|
+
},
|
|
7384
|
+
// Also resets global `code` styles from the host page, such as a tint or
|
|
7385
|
+
// padding meant for inline code.
|
|
7386
|
+
code: {
|
|
7387
|
+
...inheritText,
|
|
7388
|
+
display: "block",
|
|
7389
|
+
m: "0",
|
|
7390
|
+
p: "0",
|
|
7391
|
+
rounded: "0",
|
|
7392
|
+
bg: "transparent",
|
|
7393
|
+
whiteSpace: "inherit",
|
|
7394
|
+
overflowWrap: "inherit",
|
|
7395
|
+
mixBlendMode: "normal"
|
|
7396
|
+
},
|
|
7397
|
+
line: {
|
|
7398
|
+
...inheritText,
|
|
7399
|
+
display: "block",
|
|
7400
|
+
position: "relative",
|
|
7401
|
+
// An empty line has no text, so it needs an explicit one-line height.
|
|
7402
|
+
minH: "1lh"
|
|
7403
|
+
},
|
|
7404
|
+
lineNumber: {
|
|
7405
|
+
...inheritText,
|
|
7406
|
+
position: "absolute",
|
|
7407
|
+
left: "0",
|
|
7408
|
+
w: "var(--code-block-gutter)",
|
|
7409
|
+
textAlign: "right",
|
|
7410
|
+
userSelect: "none",
|
|
7411
|
+
pointerEvents: "none",
|
|
7412
|
+
_before: {
|
|
7413
|
+
content: "attr(data-line)"
|
|
7414
|
+
}
|
|
7415
|
+
},
|
|
7416
|
+
expand: {
|
|
7417
|
+
display: "flex",
|
|
7205
7418
|
alignItems: "center",
|
|
7206
|
-
|
|
7419
|
+
justifyContent: "center",
|
|
7420
|
+
gap: "4",
|
|
7421
|
+
w: "full",
|
|
7422
|
+
minH: "32",
|
|
7423
|
+
px: "16",
|
|
7424
|
+
borderTopWidth: "1",
|
|
7425
|
+
borderTopStyle: "solid",
|
|
7426
|
+
fontSize: "12",
|
|
7427
|
+
fontWeight: "medium",
|
|
7428
|
+
cursor: "pointer",
|
|
7429
|
+
_focusVisible: focusRing
|
|
7207
7430
|
}
|
|
7208
7431
|
};
|
|
7209
|
-
const
|
|
7210
|
-
|
|
7432
|
+
const codeBlockVariants = {
|
|
7433
|
+
/**
|
|
7434
|
+
* Surface treatment. `default` sits on the page as a sunken panel.
|
|
7435
|
+
* `inverse` uses the inverse surface for setup and integration snippets that
|
|
7436
|
+
* must stand apart from the surrounding page; it follows the theme, so it is
|
|
7437
|
+
* dark in the light theme and light in the dark theme.
|
|
7438
|
+
*/
|
|
7439
|
+
tone: {
|
|
7211
7440
|
default: {
|
|
7212
|
-
|
|
7213
|
-
|
|
7214
|
-
|
|
7215
|
-
|
|
7441
|
+
root: {
|
|
7442
|
+
bg: "surface.sunken",
|
|
7443
|
+
borderColor: "border",
|
|
7444
|
+
color: "text"
|
|
7445
|
+
},
|
|
7446
|
+
header: {
|
|
7447
|
+
borderColor: "border",
|
|
7448
|
+
color: "text.subtle"
|
|
7449
|
+
},
|
|
7450
|
+
lineNumber: {
|
|
7451
|
+
color: "text.subtlest"
|
|
7452
|
+
},
|
|
7453
|
+
expand: {
|
|
7454
|
+
bg: "surface.sunken",
|
|
7455
|
+
borderColor: "border",
|
|
7456
|
+
color: "text.subtle",
|
|
7457
|
+
_hover: { bg: "surface.hovered", color: "text" }
|
|
7458
|
+
}
|
|
7459
|
+
},
|
|
7460
|
+
inverse: {
|
|
7461
|
+
root: {
|
|
7462
|
+
bg: "bg.neutral.inverse",
|
|
7463
|
+
borderColor: "transparent",
|
|
7464
|
+
color: "text.inverse"
|
|
7465
|
+
},
|
|
7466
|
+
header: {
|
|
7467
|
+
borderColor: "bg.neutral.inverse.subtle",
|
|
7468
|
+
color: "text.inverse.subtlest"
|
|
7469
|
+
},
|
|
7470
|
+
lineNumber: {
|
|
7471
|
+
color: "text.inverse.subtlest"
|
|
7472
|
+
},
|
|
7473
|
+
expand: {
|
|
7474
|
+
bg: "bg.neutral.inverse",
|
|
7475
|
+
borderColor: "bg.neutral.inverse.subtle",
|
|
7476
|
+
color: "text.inverse.subtlest",
|
|
7477
|
+
_hover: { color: "text.inverse" }
|
|
7478
|
+
}
|
|
7479
|
+
}
|
|
7480
|
+
},
|
|
7481
|
+
size: {
|
|
7482
|
+
sm: {
|
|
7483
|
+
content: { fontSize: "12" }
|
|
7484
|
+
},
|
|
7485
|
+
md: {
|
|
7486
|
+
content: { fontSize: "14" }
|
|
7487
|
+
}
|
|
7488
|
+
},
|
|
7489
|
+
/** Wraps long lines instead of scrolling horizontally. */
|
|
7490
|
+
wrap: {
|
|
7491
|
+
true: {
|
|
7492
|
+
pre: {
|
|
7493
|
+
whiteSpace: "pre-wrap",
|
|
7494
|
+
overflowWrap: "anywhere",
|
|
7495
|
+
w: "auto"
|
|
7496
|
+
}
|
|
7497
|
+
},
|
|
7498
|
+
false: {
|
|
7499
|
+
pre: {
|
|
7500
|
+
whiteSpace: "pre"
|
|
7501
|
+
}
|
|
7502
|
+
}
|
|
7503
|
+
},
|
|
7504
|
+
/** Reserves a gutter on each line for the line number. */
|
|
7505
|
+
lineNumbers: {
|
|
7506
|
+
true: {
|
|
7507
|
+
line: {
|
|
7508
|
+
pl: "calc(var(--code-block-gutter) + token(spacing.16))"
|
|
7509
|
+
}
|
|
7510
|
+
},
|
|
7511
|
+
false: {}
|
|
7512
|
+
},
|
|
7513
|
+
/**
|
|
7514
|
+
* Limits the visible height to the first `--code-block-max-lines` source
|
|
7515
|
+
* lines. The component measures the bottom of the last visible line into
|
|
7516
|
+
* `--code-block-collapsed-h`, so a wrapped line shows in full. The `calc`
|
|
7517
|
+
* is the fallback before measurement, and it is exact when lines do not
|
|
7518
|
+
* wrap.
|
|
7519
|
+
*/
|
|
7520
|
+
collapsed: {
|
|
7521
|
+
true: {
|
|
7522
|
+
content: {
|
|
7523
|
+
maxH: "var(--code-block-collapsed-h, calc(var(--code-block-max-lines) * 1lh + token(spacing.24)))",
|
|
7524
|
+
overflowY: "hidden"
|
|
7525
|
+
}
|
|
7526
|
+
},
|
|
7527
|
+
false: {}
|
|
7528
|
+
},
|
|
7529
|
+
/**
|
|
7530
|
+
* Reserves a gutter on the right of the code for the floating copy button,
|
|
7531
|
+
* so the button never covers code. Set when there is no header.
|
|
7532
|
+
*/
|
|
7533
|
+
actionGutter: {
|
|
7534
|
+
true: {
|
|
7535
|
+
content: {
|
|
7536
|
+
mr: "32"
|
|
7537
|
+
}
|
|
7538
|
+
},
|
|
7539
|
+
false: {}
|
|
7540
|
+
}
|
|
7541
|
+
};
|
|
7542
|
+
const codeBlockRecipe = defineSlotRecipe({
|
|
7543
|
+
className: "codeBlock",
|
|
7544
|
+
jsx: ["CodeBlock"],
|
|
7545
|
+
slots: [
|
|
7546
|
+
"root",
|
|
7547
|
+
"header",
|
|
7548
|
+
"title",
|
|
7549
|
+
"actions",
|
|
7550
|
+
"floatingActions",
|
|
7551
|
+
"content",
|
|
7552
|
+
"pre",
|
|
7553
|
+
"code",
|
|
7554
|
+
"line",
|
|
7555
|
+
"lineNumber",
|
|
7556
|
+
"expand"
|
|
7557
|
+
],
|
|
7558
|
+
base: codeBlockBase,
|
|
7559
|
+
variants: codeBlockVariants,
|
|
7560
|
+
defaultVariants: {
|
|
7561
|
+
tone: "default",
|
|
7562
|
+
size: "md",
|
|
7563
|
+
wrap: false,
|
|
7564
|
+
lineNumbers: false,
|
|
7565
|
+
collapsed: false,
|
|
7566
|
+
actionGutter: false
|
|
7567
|
+
}
|
|
7568
|
+
});
|
|
7569
|
+
const dateMenusBase = {
|
|
7570
|
+
// Row wrapper for DateRangeMenu's two Calendar instances.
|
|
7571
|
+
calendars: {
|
|
7572
|
+
display: "flex",
|
|
7573
|
+
alignItems: "stretch"
|
|
7574
|
+
},
|
|
7575
|
+
// Vertical rule between the two calendars.
|
|
7576
|
+
calendarsDivider: {
|
|
7577
|
+
width: "1",
|
|
7578
|
+
alignSelf: "stretch",
|
|
7579
|
+
bg: "border"
|
|
7580
|
+
},
|
|
7581
|
+
// Right-aligned Cancel/Apply pair for the pending range selection.
|
|
7582
|
+
footer: {
|
|
7583
|
+
display: "flex",
|
|
7584
|
+
justifyContent: "flex-end",
|
|
7585
|
+
alignItems: "center",
|
|
7586
|
+
gap: "8",
|
|
7587
|
+
borderTopWidth: "1",
|
|
7588
|
+
borderTopStyle: "solid",
|
|
7589
|
+
borderColor: "border",
|
|
7590
|
+
px: "16",
|
|
7591
|
+
py: "8"
|
|
7592
|
+
}
|
|
7593
|
+
};
|
|
7594
|
+
const dateMenusRecipe = defineSlotRecipe({
|
|
7595
|
+
className: "dateMenus",
|
|
7596
|
+
jsx: ["DateMenus", "DateMenu", "DateRangeMenu"],
|
|
7597
|
+
slots: ["calendars", "calendarsDivider", "footer"],
|
|
7598
|
+
base: dateMenusBase
|
|
7599
|
+
});
|
|
7600
|
+
const dateTimeMenusBase = {
|
|
7601
|
+
// Row holding the Calendar + divider + time columns, above the footer.
|
|
7602
|
+
content: {
|
|
7603
|
+
display: "flex",
|
|
7604
|
+
alignItems: "stretch"
|
|
7605
|
+
},
|
|
7606
|
+
// 4px-wide vertical divider between the Calendar and the time columns.
|
|
7607
|
+
divider: {
|
|
7608
|
+
width: "4",
|
|
7609
|
+
alignSelf: "stretch",
|
|
7610
|
+
bg: "border"
|
|
7611
|
+
},
|
|
7612
|
+
// Right-aligned Cancel/Apply pair — always present per the Figma spec,
|
|
7613
|
+
// even though DateTimeMenu isn't itself a range variant.
|
|
7614
|
+
footer: {
|
|
7615
|
+
display: "flex",
|
|
7616
|
+
justifyContent: "flex-end",
|
|
7617
|
+
alignItems: "center",
|
|
7618
|
+
w: "full",
|
|
7619
|
+
gap: "8",
|
|
7620
|
+
borderTopWidth: "1",
|
|
7621
|
+
borderTopStyle: "solid",
|
|
7622
|
+
borderColor: "border",
|
|
7623
|
+
px: "16",
|
|
7624
|
+
py: "8"
|
|
7625
|
+
}
|
|
7626
|
+
};
|
|
7627
|
+
const dateTimeMenusRecipe = defineSlotRecipe({
|
|
7628
|
+
className: "dateTimeMenus",
|
|
7629
|
+
jsx: ["DateTimeMenus", "DateTimeMenu"],
|
|
7630
|
+
slots: ["content", "divider", "footer"],
|
|
7631
|
+
base: dateTimeMenusBase
|
|
7632
|
+
});
|
|
7633
|
+
const drawerBase = {
|
|
7634
|
+
overlay: {
|
|
7635
|
+
position: "fixed",
|
|
7636
|
+
inset: "0",
|
|
7637
|
+
bg: "blanket",
|
|
7638
|
+
zIndex: 1100,
|
|
7639
|
+
// Initial state matches animation start
|
|
7640
|
+
opacity: "0",
|
|
7641
|
+
animation: "modalFadeIn 200ms ease-out forwards",
|
|
7642
|
+
'&[data-state="closing"]': {
|
|
7643
|
+
animation: "modalFadeOut 200ms ease-out forwards"
|
|
7644
|
+
},
|
|
7645
|
+
_motionReduce: {
|
|
7646
|
+
opacity: "1",
|
|
7647
|
+
animation: "none"
|
|
7648
|
+
}
|
|
7649
|
+
},
|
|
7650
|
+
container: {
|
|
7651
|
+
...globalBaseStyles,
|
|
7652
|
+
position: "fixed",
|
|
7653
|
+
top: "0",
|
|
7654
|
+
bottom: "0",
|
|
7655
|
+
display: "flex",
|
|
7656
|
+
flexDirection: "column",
|
|
7657
|
+
// Size to the visible viewport, so the footer stays on screen when mobile
|
|
7658
|
+
// browser controls expand. 100vh is the fallback for browsers without dvh.
|
|
7659
|
+
h: "100vh",
|
|
7660
|
+
"@supports (height: 100dvh)": {
|
|
7661
|
+
h: "100dvh"
|
|
7662
|
+
},
|
|
7663
|
+
maxW: "100vw",
|
|
7664
|
+
bg: "surface.overlay",
|
|
7665
|
+
boxShadow: "overlay",
|
|
7666
|
+
outline: "none",
|
|
7667
|
+
// Same layer as the modal's position wrapper, not its 1101 container: the
|
|
7668
|
+
// modal's 1101 only applies inside that wrapper's stacking context. On a
|
|
7669
|
+
// tie, the later portal paints on top, so a modal opened from a drawer
|
|
7670
|
+
// covers it. The container follows the overlay in the DOM, so it still
|
|
7671
|
+
// paints above its own scrim.
|
|
7672
|
+
zIndex: 1100,
|
|
7673
|
+
_motionReduce: {
|
|
7674
|
+
animation: "none"
|
|
7675
|
+
}
|
|
7676
|
+
},
|
|
7677
|
+
header: {
|
|
7678
|
+
display: "flex",
|
|
7679
|
+
alignItems: "center",
|
|
7680
|
+
justifyContent: "space-between",
|
|
7681
|
+
gap: "12",
|
|
7682
|
+
flexShrink: 0,
|
|
7683
|
+
px: "20",
|
|
7684
|
+
py: "12",
|
|
7685
|
+
borderBottom: "default"
|
|
7686
|
+
},
|
|
7687
|
+
title: {
|
|
7688
|
+
w: "full",
|
|
7689
|
+
truncate: true
|
|
7690
|
+
},
|
|
7691
|
+
closeButton: {
|
|
7692
|
+
// IconButton styles are applied by the IconButton component.
|
|
7693
|
+
},
|
|
7694
|
+
body: {
|
|
7695
|
+
flex: 1,
|
|
7696
|
+
minH: "0",
|
|
7697
|
+
display: "flex",
|
|
7698
|
+
flexDirection: "column",
|
|
7699
|
+
gap: "12",
|
|
7700
|
+
px: "20",
|
|
7701
|
+
py: "20"
|
|
7702
|
+
},
|
|
7703
|
+
footer: {
|
|
7704
|
+
display: "flex",
|
|
7705
|
+
alignItems: "center",
|
|
7706
|
+
justifyContent: "flex-end",
|
|
7707
|
+
gap: "8",
|
|
7708
|
+
flexShrink: 0,
|
|
7709
|
+
px: "20",
|
|
7710
|
+
py: "12",
|
|
7711
|
+
borderTop: "default"
|
|
7712
|
+
}
|
|
7713
|
+
};
|
|
7714
|
+
const mobile$1 = {
|
|
7715
|
+
xsDown: {
|
|
7716
|
+
w: "100vw"
|
|
7717
|
+
}
|
|
7718
|
+
};
|
|
7719
|
+
const drawerVariants = {
|
|
7720
|
+
side: {
|
|
7721
|
+
right: {
|
|
7722
|
+
container: {
|
|
7723
|
+
right: "0",
|
|
7724
|
+
animation: "drawerSlideInRight 200ms ease-out forwards",
|
|
7725
|
+
'&[data-state="closing"]': {
|
|
7726
|
+
animation: "drawerSlideOutRight 200ms ease-in forwards",
|
|
7727
|
+
_motionReduce: { animation: "none" }
|
|
7728
|
+
},
|
|
7729
|
+
_motionReduce: { animation: "none" }
|
|
7730
|
+
}
|
|
7731
|
+
},
|
|
7732
|
+
left: {
|
|
7733
|
+
container: {
|
|
7734
|
+
left: "0",
|
|
7735
|
+
animation: "drawerSlideInLeft 200ms ease-out forwards",
|
|
7736
|
+
'&[data-state="closing"]': {
|
|
7737
|
+
animation: "drawerSlideOutLeft 200ms ease-in forwards",
|
|
7738
|
+
_motionReduce: { animation: "none" }
|
|
7739
|
+
},
|
|
7740
|
+
_motionReduce: { animation: "none" }
|
|
7741
|
+
}
|
|
7742
|
+
}
|
|
7743
|
+
},
|
|
7744
|
+
size: {
|
|
7745
|
+
sm: { container: { w: "md", ...mobile$1 } },
|
|
7746
|
+
md: { container: { w: "xl", ...mobile$1 } },
|
|
7747
|
+
lg: { container: { w: "3xl", ...mobile$1 } },
|
|
7748
|
+
xl: { container: { w: "5xl", ...mobile$1 } },
|
|
7749
|
+
full: { container: { w: "100vw" } }
|
|
7750
|
+
},
|
|
7751
|
+
scrollable: {
|
|
7752
|
+
true: { body: { overflowY: "auto" } },
|
|
7753
|
+
false: { body: { overflow: "hidden" } }
|
|
7754
|
+
}
|
|
7755
|
+
};
|
|
7756
|
+
const drawerRecipe = defineSlotRecipe({
|
|
7757
|
+
className: "drawer",
|
|
7758
|
+
jsx: ["Drawer", "DrawerHeader", "DrawerBody", "DrawerFooter"],
|
|
7759
|
+
slots: [
|
|
7760
|
+
"overlay",
|
|
7761
|
+
"container",
|
|
7762
|
+
"header",
|
|
7763
|
+
"title",
|
|
7764
|
+
"closeButton",
|
|
7765
|
+
"body",
|
|
7766
|
+
"footer"
|
|
7767
|
+
],
|
|
7768
|
+
base: drawerBase,
|
|
7769
|
+
variants: drawerVariants,
|
|
7770
|
+
defaultVariants: {
|
|
7771
|
+
side: "right",
|
|
7772
|
+
size: "md",
|
|
7773
|
+
scrollable: true
|
|
7774
|
+
}
|
|
7775
|
+
});
|
|
7776
|
+
const filterFieldRecipe = defineSlotRecipe({
|
|
7777
|
+
className: "filterField",
|
|
7778
|
+
jsx: ["FilterField"],
|
|
7779
|
+
slots: [
|
|
7780
|
+
"root",
|
|
7781
|
+
"icon",
|
|
7782
|
+
"values",
|
|
7783
|
+
"sizer",
|
|
7784
|
+
"token",
|
|
7785
|
+
"input",
|
|
7786
|
+
"more",
|
|
7787
|
+
"shortcut",
|
|
7788
|
+
"clear"
|
|
7789
|
+
],
|
|
7790
|
+
base: {
|
|
7791
|
+
root: {
|
|
7792
|
+
...globalBaseStyles,
|
|
7793
|
+
"--filter-field-gap": "token(sizes.6)",
|
|
7794
|
+
"--filter-field-input-min": "token(sizes.120)",
|
|
7795
|
+
display: "flex",
|
|
7796
|
+
alignItems: "center",
|
|
7797
|
+
gap: "8",
|
|
7798
|
+
w: "full",
|
|
7799
|
+
minW: "0",
|
|
7800
|
+
minH: "40",
|
|
7801
|
+
ps: "10",
|
|
7802
|
+
pe: "4",
|
|
7803
|
+
bg: "surface",
|
|
7804
|
+
color: "text",
|
|
7805
|
+
borderWidth: "1",
|
|
7806
|
+
borderStyle: "solid",
|
|
7807
|
+
borderColor: "border.input",
|
|
7808
|
+
borderRadius: "4",
|
|
7809
|
+
outlineWidth: "1",
|
|
7810
|
+
outlineStyle: "solid",
|
|
7811
|
+
outlineColor: "transparent",
|
|
7812
|
+
cursor: "text",
|
|
7813
|
+
transitionDuration: "fast",
|
|
7814
|
+
transitionProperty: "background, border-color, outline-color",
|
|
7815
|
+
transitionTimingFunction: "default",
|
|
7816
|
+
_focusWithin: {
|
|
7817
|
+
borderColor: "border.focused",
|
|
7818
|
+
outlineColor: "border.focused"
|
|
7819
|
+
},
|
|
7820
|
+
_disabled: {
|
|
7821
|
+
bg: "bg.disabled",
|
|
7822
|
+
borderColor: "border.disabled",
|
|
7823
|
+
color: "text.disabled",
|
|
7824
|
+
cursor: "not-allowed"
|
|
7825
|
+
}
|
|
7826
|
+
},
|
|
7827
|
+
icon: {
|
|
7828
|
+
flexShrink: "0"
|
|
7829
|
+
},
|
|
7830
|
+
values: {
|
|
7831
|
+
position: "relative",
|
|
7832
|
+
display: "flex",
|
|
7833
|
+
alignItems: "center",
|
|
7834
|
+
gap: "var(--filter-field-gap)",
|
|
7835
|
+
flex: "1",
|
|
7836
|
+
minW: "0"
|
|
7837
|
+
},
|
|
7838
|
+
// Spans the values area so the overflow hook reads its width. The end
|
|
7839
|
+
// padding keeps room for the input.
|
|
7840
|
+
sizer: {
|
|
7841
|
+
position: "absolute",
|
|
7842
|
+
inset: "0",
|
|
7843
|
+
columnGap: "var(--filter-field-gap)",
|
|
7844
|
+
pe: "calc(var(--filter-field-input-min) + var(--filter-field-gap))",
|
|
7845
|
+
visibility: "hidden",
|
|
7846
|
+
pointerEvents: "none"
|
|
7847
|
+
},
|
|
7848
|
+
token: {
|
|
7849
|
+
display: "inline-flex",
|
|
7850
|
+
flexShrink: "0",
|
|
7851
|
+
// A token behind "+N more" stays in the DOM, so its width can be read.
|
|
7852
|
+
"&[data-overflowed]": {
|
|
7853
|
+
position: "absolute",
|
|
7854
|
+
insetInlineStart: "0",
|
|
7855
|
+
visibility: "hidden",
|
|
7856
|
+
pointerEvents: "none"
|
|
7857
|
+
}
|
|
7858
|
+
},
|
|
7859
|
+
input: {
|
|
7860
|
+
flex: "1",
|
|
7861
|
+
minW: "var(--filter-field-input-min)",
|
|
7862
|
+
h: "28",
|
|
7863
|
+
p: "0",
|
|
7864
|
+
bg: "transparent",
|
|
7865
|
+
color: "text",
|
|
7866
|
+
fontFamily: "sans",
|
|
7867
|
+
fontSize: "14",
|
|
7868
|
+
borderWidth: "0",
|
|
7869
|
+
outline: "none",
|
|
7870
|
+
_placeholder: {
|
|
7871
|
+
color: "text.placeholder"
|
|
7872
|
+
},
|
|
7873
|
+
_disabled: {
|
|
7874
|
+
cursor: "not-allowed"
|
|
7875
|
+
},
|
|
7876
|
+
// Inside a token, the input is as wide as its text.
|
|
7877
|
+
"&[data-inline]": {
|
|
7878
|
+
flex: "none",
|
|
7879
|
+
minW: "0",
|
|
7880
|
+
h: "22"
|
|
7881
|
+
}
|
|
7882
|
+
},
|
|
7883
|
+
more: {
|
|
7884
|
+
flexShrink: "0",
|
|
7885
|
+
"&[data-pending]": {
|
|
7886
|
+
borderStyle: "dashed"
|
|
7887
|
+
},
|
|
7888
|
+
"&[data-open]": {
|
|
7889
|
+
borderColor: "border.focused"
|
|
7890
|
+
}
|
|
7891
|
+
},
|
|
7892
|
+
shortcut: {
|
|
7893
|
+
flexShrink: "0",
|
|
7894
|
+
// At the end of the field, the hint lines up with the start padding.
|
|
7895
|
+
me: "6",
|
|
7896
|
+
"[data-has-clear] &": {
|
|
7897
|
+
me: "0"
|
|
7898
|
+
}
|
|
7899
|
+
},
|
|
7900
|
+
clear: {
|
|
7901
|
+
flexShrink: "0"
|
|
7902
|
+
}
|
|
7903
|
+
}
|
|
7904
|
+
});
|
|
7905
|
+
const filterMenuRecipe = defineSlotRecipe({
|
|
7906
|
+
className: "filterMenu",
|
|
7907
|
+
jsx: ["FilterMenu"],
|
|
7908
|
+
slots: ["root", "listbox", "checkbox", "before", "empty", "footer"],
|
|
7909
|
+
base: {
|
|
7910
|
+
root: {
|
|
7911
|
+
...globalBaseStyles,
|
|
7912
|
+
display: "flex",
|
|
7913
|
+
flexDirection: "column",
|
|
7914
|
+
w: "xs",
|
|
7915
|
+
maxH: "var(--available-height)",
|
|
7916
|
+
bg: "surface",
|
|
7917
|
+
borderRadius: "4",
|
|
7918
|
+
boxShadow: "overlay",
|
|
7919
|
+
overflow: "hidden",
|
|
7920
|
+
outline: "none"
|
|
7921
|
+
},
|
|
7922
|
+
listbox: {
|
|
7923
|
+
flex: "1",
|
|
7924
|
+
minH: "0",
|
|
7925
|
+
overflowY: "auto",
|
|
7926
|
+
outline: "none"
|
|
7927
|
+
},
|
|
7928
|
+
checkbox: {
|
|
7929
|
+
display: "block",
|
|
7930
|
+
w: "var(--list-item-icon-size)",
|
|
7931
|
+
h: "var(--list-item-icon-size)"
|
|
7932
|
+
},
|
|
7933
|
+
before: {
|
|
7934
|
+
display: "flex",
|
|
7935
|
+
alignItems: "center",
|
|
7936
|
+
gap: "6"
|
|
7937
|
+
},
|
|
7938
|
+
empty: {
|
|
7939
|
+
px: "10",
|
|
7940
|
+
py: "6",
|
|
7941
|
+
color: "text.subtlest",
|
|
7942
|
+
fontFamily: "sans",
|
|
7943
|
+
fontSize: "14"
|
|
7944
|
+
},
|
|
7945
|
+
footer: {
|
|
7946
|
+
px: "10",
|
|
7947
|
+
py: "6",
|
|
7948
|
+
bg: "surface.sunken",
|
|
7949
|
+
color: "text.subtlest",
|
|
7950
|
+
fontFamily: "sans",
|
|
7951
|
+
fontSize: "12"
|
|
7952
|
+
}
|
|
7953
|
+
},
|
|
7954
|
+
variants: {
|
|
7955
|
+
layer: {
|
|
7956
|
+
elevated: {
|
|
7957
|
+
root: { zIndex: "elevated" }
|
|
7958
|
+
},
|
|
7959
|
+
modalFloating: {
|
|
7960
|
+
root: { zIndex: "modalFloating" }
|
|
7961
|
+
}
|
|
7962
|
+
}
|
|
7963
|
+
},
|
|
7964
|
+
defaultVariants: {
|
|
7965
|
+
layer: "elevated"
|
|
7966
|
+
}
|
|
7967
|
+
});
|
|
7968
|
+
const partButtonStyles = {
|
|
7969
|
+
appearance: "none",
|
|
7970
|
+
cursor: "pointer",
|
|
7971
|
+
_hover: {
|
|
7972
|
+
bg: "bg.neutral.hovered"
|
|
7973
|
+
},
|
|
7974
|
+
_active: {
|
|
7975
|
+
bg: "bg.neutral.pressed"
|
|
7976
|
+
},
|
|
7977
|
+
_focusVisible: {
|
|
7978
|
+
outlineColor: "border.focused"
|
|
7979
|
+
},
|
|
7980
|
+
_disabled: {
|
|
7981
|
+
cursor: "not-allowed",
|
|
7982
|
+
_hover: { bg: "transparent" }
|
|
7983
|
+
}
|
|
7984
|
+
};
|
|
7985
|
+
const filterTokenRecipe = defineSlotRecipe({
|
|
7986
|
+
className: "filterToken",
|
|
7987
|
+
jsx: ["FilterToken"],
|
|
7988
|
+
slots: [
|
|
7989
|
+
"root",
|
|
7990
|
+
"part",
|
|
7991
|
+
"field",
|
|
7992
|
+
"operator",
|
|
7993
|
+
"value",
|
|
7994
|
+
"valueText",
|
|
7995
|
+
"count",
|
|
7996
|
+
"editor",
|
|
7997
|
+
"remove"
|
|
7998
|
+
],
|
|
7999
|
+
base: {
|
|
8000
|
+
root: {
|
|
8001
|
+
...globalBaseStyles,
|
|
8002
|
+
display: "inline-flex",
|
|
8003
|
+
alignItems: "center",
|
|
8004
|
+
flexShrink: "0",
|
|
8005
|
+
maxW: "full",
|
|
8006
|
+
h: "28",
|
|
8007
|
+
ps: "2",
|
|
8008
|
+
pe: "2",
|
|
8009
|
+
borderWidth: "1",
|
|
8010
|
+
borderStyle: "solid",
|
|
8011
|
+
borderColor: "border",
|
|
8012
|
+
borderRadius: "4",
|
|
8013
|
+
bg: "bg.neutral",
|
|
8014
|
+
color: "text",
|
|
8015
|
+
fontFamily: "sans",
|
|
8016
|
+
fontSize: "14",
|
|
8017
|
+
whiteSpace: "nowrap",
|
|
8018
|
+
transitionDuration: "fast",
|
|
8019
|
+
transitionProperty: "background, border-color, opacity",
|
|
8020
|
+
transitionTimingFunction: "default",
|
|
8021
|
+
// Lets every part shrink, the tooltip wrapper around the value included.
|
|
8022
|
+
"& > *": {
|
|
8023
|
+
minW: "0"
|
|
8024
|
+
},
|
|
8025
|
+
"&[data-state=editing]": {
|
|
8026
|
+
bg: "surface",
|
|
8027
|
+
borderColor: "border.focused"
|
|
8028
|
+
},
|
|
8029
|
+
"&[data-state=pending]": {
|
|
8030
|
+
bg: "surface",
|
|
8031
|
+
borderColor: "border.bold",
|
|
8032
|
+
borderStyle: "dashed"
|
|
8033
|
+
},
|
|
8034
|
+
"&[data-state=removing]": {
|
|
8035
|
+
bg: "surface",
|
|
8036
|
+
borderColor: "border.bold",
|
|
8037
|
+
borderStyle: "dashed",
|
|
8038
|
+
opacity: "[0.6]"
|
|
8039
|
+
},
|
|
8040
|
+
"&[data-state=armed]": {
|
|
8041
|
+
bg: "bg.neutral.hovered",
|
|
8042
|
+
borderColor: "border.focused"
|
|
8043
|
+
},
|
|
8044
|
+
"&[data-disabled]": {
|
|
8045
|
+
opacity: "[0.6]"
|
|
8046
|
+
}
|
|
8047
|
+
},
|
|
8048
|
+
part: {
|
|
8049
|
+
...globalBaseStyles,
|
|
8050
|
+
display: "inline-flex",
|
|
8051
|
+
alignItems: "center",
|
|
8052
|
+
minW: "0",
|
|
8053
|
+
h: "22",
|
|
8054
|
+
px: "4",
|
|
8055
|
+
bg: "transparent",
|
|
8056
|
+
borderWidth: "0",
|
|
8057
|
+
borderRadius: "2",
|
|
8058
|
+
outlineWidth: "2",
|
|
8059
|
+
outlineStyle: "solid",
|
|
8060
|
+
outlineColor: "transparent",
|
|
8061
|
+
outlineOffset: "-2",
|
|
8062
|
+
fontFamily: "sans",
|
|
8063
|
+
fontSize: "14",
|
|
8064
|
+
lineHeight: "tight",
|
|
8065
|
+
textAlign: "start",
|
|
8066
|
+
"button&": partButtonStyles,
|
|
8067
|
+
"[data-state=removing] &": {
|
|
8068
|
+
textDecoration: "line-through"
|
|
8069
|
+
}
|
|
8070
|
+
},
|
|
8071
|
+
field: {
|
|
8072
|
+
color: "text"
|
|
8073
|
+
},
|
|
8074
|
+
operator: {
|
|
8075
|
+
color: "text.subtlest",
|
|
8076
|
+
// A locked operator reads as part of the sentence, not as a control.
|
|
8077
|
+
"&[data-locked]": {
|
|
8078
|
+
cursor: "default"
|
|
8079
|
+
},
|
|
8080
|
+
"[data-tone=exclude] > &": {
|
|
8081
|
+
color: "text.danger",
|
|
8082
|
+
bg: "bg.danger",
|
|
8083
|
+
_hover: { bg: "bg.danger.hovered" }
|
|
8084
|
+
}
|
|
8085
|
+
},
|
|
8086
|
+
value: {
|
|
8087
|
+
display: "inline-flex",
|
|
8088
|
+
alignItems: "center",
|
|
8089
|
+
gap: "4",
|
|
8090
|
+
color: "text",
|
|
8091
|
+
fontWeight: "medium"
|
|
8092
|
+
},
|
|
8093
|
+
// A long single value truncates. The +N count after it always stays visible.
|
|
8094
|
+
valueText: {
|
|
8095
|
+
minW: "0",
|
|
8096
|
+
color: "text",
|
|
8097
|
+
maxW: "240",
|
|
8098
|
+
overflow: "hidden",
|
|
8099
|
+
textOverflow: "ellipsis"
|
|
8100
|
+
},
|
|
8101
|
+
count: {
|
|
8102
|
+
flexShrink: "0",
|
|
8103
|
+
color: "text.subtle"
|
|
8104
|
+
},
|
|
8105
|
+
editor: {
|
|
8106
|
+
display: "inline-flex",
|
|
8107
|
+
alignItems: "center",
|
|
8108
|
+
gap: "4",
|
|
8109
|
+
ps: "4",
|
|
8110
|
+
cursor: "text"
|
|
8111
|
+
},
|
|
8112
|
+
remove: {
|
|
8113
|
+
...globalBaseStyles,
|
|
8114
|
+
appearance: "none",
|
|
8115
|
+
display: "inline-flex",
|
|
8116
|
+
alignItems: "center",
|
|
8117
|
+
justifyContent: "center",
|
|
8118
|
+
flexShrink: "0",
|
|
8119
|
+
w: "20",
|
|
8120
|
+
h: "20",
|
|
8121
|
+
ms: "2",
|
|
8122
|
+
p: "0",
|
|
8123
|
+
bg: "transparent",
|
|
8124
|
+
borderWidth: "0",
|
|
8125
|
+
borderRadius: "2",
|
|
8126
|
+
outlineWidth: "2",
|
|
8127
|
+
outlineStyle: "solid",
|
|
8128
|
+
outlineColor: "transparent",
|
|
8129
|
+
outlineOffset: "-2",
|
|
8130
|
+
cursor: "pointer",
|
|
8131
|
+
_icon: {
|
|
8132
|
+
fill: "icon.subtle"
|
|
8133
|
+
},
|
|
8134
|
+
_hover: {
|
|
8135
|
+
bg: "bg.neutral.hovered",
|
|
8136
|
+
_icon: { fill: "icon" }
|
|
8137
|
+
},
|
|
8138
|
+
_focusVisible: {
|
|
8139
|
+
outlineColor: "border.focused"
|
|
8140
|
+
},
|
|
8141
|
+
_disabled: {
|
|
8142
|
+
cursor: "not-allowed"
|
|
8143
|
+
}
|
|
8144
|
+
}
|
|
8145
|
+
}
|
|
8146
|
+
});
|
|
8147
|
+
const formFieldBase = {
|
|
8148
|
+
container: {
|
|
8149
|
+
_disabled: {
|
|
8150
|
+
opacity: "0.4",
|
|
8151
|
+
pointerEvents: "none"
|
|
8152
|
+
}
|
|
8153
|
+
},
|
|
8154
|
+
inputs: {
|
|
8155
|
+
display: "flex",
|
|
8156
|
+
flexDirection: "column",
|
|
8157
|
+
gap: "2"
|
|
8158
|
+
},
|
|
8159
|
+
labelWrapper: {
|
|
8160
|
+
alignItems: "center",
|
|
8161
|
+
gap: "2"
|
|
8162
|
+
}
|
|
8163
|
+
};
|
|
8164
|
+
const formFieldVariants = {
|
|
8165
|
+
layout: {
|
|
8166
|
+
default: {
|
|
8167
|
+
container: {
|
|
8168
|
+
display: "flex",
|
|
8169
|
+
flexDirection: "column",
|
|
8170
|
+
gap: "2"
|
|
7216
8171
|
}
|
|
7217
8172
|
},
|
|
7218
8173
|
inline: {
|
|
@@ -7263,6 +8218,49 @@ const formFieldRecipe = defineSlotRecipe({
|
|
|
7263
8218
|
size: "md"
|
|
7264
8219
|
}
|
|
7265
8220
|
});
|
|
8221
|
+
const inlineNoteBase = {
|
|
8222
|
+
root: {
|
|
8223
|
+
...globalBaseStyles,
|
|
8224
|
+
display: "flex",
|
|
8225
|
+
alignItems: "flex-start",
|
|
8226
|
+
gap: "4",
|
|
8227
|
+
w: "full"
|
|
8228
|
+
},
|
|
8229
|
+
icon: {
|
|
8230
|
+
display: "flex",
|
|
8231
|
+
alignItems: "center",
|
|
8232
|
+
flex: "none",
|
|
8233
|
+
minH: "16"
|
|
8234
|
+
},
|
|
8235
|
+
message: {
|
|
8236
|
+
flex: "1",
|
|
8237
|
+
minW: "0",
|
|
8238
|
+
maxW: "full"
|
|
8239
|
+
}
|
|
8240
|
+
};
|
|
8241
|
+
const inlineNoteVariants = {
|
|
8242
|
+
/**
|
|
8243
|
+
* Semantic tone. An inline note carries no surface of its own, so tone is
|
|
8244
|
+
* expressed through the text and icon color tokens the component applies.
|
|
8245
|
+
*/
|
|
8246
|
+
tone: {
|
|
8247
|
+
info: {},
|
|
8248
|
+
success: {},
|
|
8249
|
+
warning: {},
|
|
8250
|
+
danger: {},
|
|
8251
|
+
neutral: {}
|
|
8252
|
+
}
|
|
8253
|
+
};
|
|
8254
|
+
const inlineNoteRecipe = defineSlotRecipe({
|
|
8255
|
+
className: "inlineNote",
|
|
8256
|
+
jsx: ["InlineNote"],
|
|
8257
|
+
slots: ["root", "icon", "message"],
|
|
8258
|
+
base: inlineNoteBase,
|
|
8259
|
+
variants: inlineNoteVariants,
|
|
8260
|
+
defaultVariants: {
|
|
8261
|
+
tone: "info"
|
|
8262
|
+
}
|
|
8263
|
+
});
|
|
7266
8264
|
const kbdRecipe = defineSlotRecipe({
|
|
7267
8265
|
className: "kbd",
|
|
7268
8266
|
jsx: ["Kbd"],
|
|
@@ -7310,7 +8308,112 @@ const kbdRecipe = defineSlotRecipe({
|
|
|
7310
8308
|
}
|
|
7311
8309
|
},
|
|
7312
8310
|
defaultVariants: {
|
|
7313
|
-
variant: "default"
|
|
8311
|
+
variant: "default"
|
|
8312
|
+
}
|
|
8313
|
+
});
|
|
8314
|
+
const keyFactBase = {
|
|
8315
|
+
root: {
|
|
8316
|
+
...globalBaseStyles,
|
|
8317
|
+
display: "flex",
|
|
8318
|
+
minW: "0",
|
|
8319
|
+
maxW: "full"
|
|
8320
|
+
},
|
|
8321
|
+
label: {
|
|
8322
|
+
flex: "none",
|
|
8323
|
+
whiteSpace: "nowrap"
|
|
8324
|
+
},
|
|
8325
|
+
// The label's text renders in these, through Box. Box resets font and color,
|
|
8326
|
+
// so they take both from the label.
|
|
8327
|
+
labelWithColon: {
|
|
8328
|
+
color: "inherit",
|
|
8329
|
+
fontFamily: "inherit",
|
|
8330
|
+
fontVariationSettings: "inherit",
|
|
8331
|
+
fontWeight: "inherit",
|
|
8332
|
+
lineHeight: "inherit"
|
|
8333
|
+
},
|
|
8334
|
+
labelPlain: {
|
|
8335
|
+
color: "inherit",
|
|
8336
|
+
fontFamily: "inherit",
|
|
8337
|
+
fontVariationSettings: "inherit",
|
|
8338
|
+
fontWeight: "inherit",
|
|
8339
|
+
lineHeight: "inherit"
|
|
8340
|
+
},
|
|
8341
|
+
value: {
|
|
8342
|
+
display: "flex",
|
|
8343
|
+
minW: "0",
|
|
8344
|
+
// The truncation tooltip wraps the value in a span. Let it shrink so the
|
|
8345
|
+
// value can truncate.
|
|
8346
|
+
"& > span": {
|
|
8347
|
+
w: "full",
|
|
8348
|
+
minW: "0"
|
|
8349
|
+
}
|
|
8350
|
+
},
|
|
8351
|
+
actions: {
|
|
8352
|
+
display: "flex",
|
|
8353
|
+
alignItems: "center",
|
|
8354
|
+
flex: "none",
|
|
8355
|
+
gap: "2",
|
|
8356
|
+
ms: "4"
|
|
8357
|
+
},
|
|
8358
|
+
text: {
|
|
8359
|
+
display: "block",
|
|
8360
|
+
minW: "0",
|
|
8361
|
+
overflow: "hidden",
|
|
8362
|
+
textOverflow: "ellipsis",
|
|
8363
|
+
whiteSpace: "nowrap"
|
|
8364
|
+
}
|
|
8365
|
+
};
|
|
8366
|
+
const keyFactVariants = {
|
|
8367
|
+
/**
|
|
8368
|
+
* `horizontal` reads "Label: Value" on one line, for a page header `aside`.
|
|
8369
|
+
* `vertical` stacks the label over a larger value, for a facts strip.
|
|
8370
|
+
*/
|
|
8371
|
+
// Each layout sets every property the other one sets, so a conditional
|
|
8372
|
+
// layout switches cleanly at a breakpoint. The label renders in both forms,
|
|
8373
|
+
// and the layout shows one.
|
|
8374
|
+
layout: {
|
|
8375
|
+
horizontal: {
|
|
8376
|
+
root: { flexDirection: "row", alignItems: "center", gap: "4" },
|
|
8377
|
+
// A text style sets its own color, so set the label color after it.
|
|
8378
|
+
label: { textStyle: "sans.sm", color: "text.subtle" },
|
|
8379
|
+
labelWithColon: { display: "inline" },
|
|
8380
|
+
labelPlain: { display: "none" },
|
|
8381
|
+
value: { textStyle: "sans.sm" }
|
|
8382
|
+
},
|
|
8383
|
+
vertical: {
|
|
8384
|
+
root: { flexDirection: "column", alignItems: "stretch", gap: "2" },
|
|
8385
|
+
label: { textStyle: "sans.sm", color: "text.subtle" },
|
|
8386
|
+
labelWithColon: { display: "none" },
|
|
8387
|
+
labelPlain: { display: "inline" },
|
|
8388
|
+
value: { textStyle: "sans.lg" }
|
|
8389
|
+
}
|
|
8390
|
+
},
|
|
8391
|
+
/** Replaces the value with a text input. */
|
|
8392
|
+
editing: {
|
|
8393
|
+
true: {
|
|
8394
|
+
root: { w: "280" },
|
|
8395
|
+
value: { flex: "1" }
|
|
8396
|
+
},
|
|
8397
|
+
false: {}
|
|
8398
|
+
}
|
|
8399
|
+
};
|
|
8400
|
+
const keyFactRecipe = defineSlotRecipe({
|
|
8401
|
+
className: "keyFact",
|
|
8402
|
+
jsx: ["KeyFact"],
|
|
8403
|
+
slots: [
|
|
8404
|
+
"root",
|
|
8405
|
+
"label",
|
|
8406
|
+
"labelWithColon",
|
|
8407
|
+
"labelPlain",
|
|
8408
|
+
"value",
|
|
8409
|
+
"text",
|
|
8410
|
+
"actions"
|
|
8411
|
+
],
|
|
8412
|
+
base: keyFactBase,
|
|
8413
|
+
variants: keyFactVariants,
|
|
8414
|
+
defaultVariants: {
|
|
8415
|
+
layout: "horizontal",
|
|
8416
|
+
editing: false
|
|
7314
8417
|
}
|
|
7315
8418
|
});
|
|
7316
8419
|
const listItemRecipe = defineSlotRecipe({
|
|
@@ -7320,7 +8423,9 @@ const listItemRecipe = defineSlotRecipe({
|
|
|
7320
8423
|
"wrapper",
|
|
7321
8424
|
"icon",
|
|
7322
8425
|
"beforeSlot",
|
|
8426
|
+
"beforeContent",
|
|
7323
8427
|
"afterSlot",
|
|
8428
|
+
"afterContent",
|
|
7324
8429
|
"itemMain",
|
|
7325
8430
|
"itemLabel",
|
|
7326
8431
|
"itemDescription",
|
|
@@ -7391,9 +8496,32 @@ const listItemRecipe = defineSlotRecipe({
|
|
|
7391
8496
|
beforeSlot: {
|
|
7392
8497
|
ms: "calc(var(--list-item-slot-margin) * -1)"
|
|
7393
8498
|
},
|
|
8499
|
+
// Centers custom `before` content, such as a 20px icon or an avatar,
|
|
8500
|
+
// on the first line of the label, the same way a built-in icon sits.
|
|
8501
|
+
beforeContent: {
|
|
8502
|
+
display: "flex",
|
|
8503
|
+
alignItems: "center",
|
|
8504
|
+
justifyContent: "center",
|
|
8505
|
+
flexShrink: "0",
|
|
8506
|
+
minW: "var(--list-item-icon-size)",
|
|
8507
|
+
minH: "var(--list-item-icon-size)"
|
|
8508
|
+
},
|
|
7394
8509
|
afterSlot: {
|
|
7395
8510
|
me: "calc(var(--list-item-slot-margin) * -1)"
|
|
7396
8511
|
},
|
|
8512
|
+
// Short trailing text, such as a date range or a count. It stays on the
|
|
8513
|
+
// first line of the label and never wraps.
|
|
8514
|
+
afterContent: {
|
|
8515
|
+
display: "flex",
|
|
8516
|
+
alignItems: "center",
|
|
8517
|
+
flexShrink: "0",
|
|
8518
|
+
minH: "var(--list-item-icon-size)",
|
|
8519
|
+
ms: "auto",
|
|
8520
|
+
ps: "8",
|
|
8521
|
+
color: "text.subtlest",
|
|
8522
|
+
fontSize: "var(--list-item-description-size)",
|
|
8523
|
+
whiteSpace: "nowrap"
|
|
8524
|
+
},
|
|
7397
8525
|
divider: {
|
|
7398
8526
|
width: "full",
|
|
7399
8527
|
py: "var(--list-item-padding-y)",
|
|
@@ -7545,8 +8673,10 @@ const menuBase = {
|
|
|
7545
8673
|
bg: { base: "tan.20", _dark: "tan.70" }
|
|
7546
8674
|
}
|
|
7547
8675
|
},
|
|
8676
|
+
// `clip` (not `hidden`) so the oversized size probe inside can't make this a
|
|
8677
|
+
// programmatically scrollable ancestor that `scrollIntoView()` would move.
|
|
7548
8678
|
levelsViewport: {
|
|
7549
|
-
overflow: "
|
|
8679
|
+
overflow: "clip",
|
|
7550
8680
|
width: "full",
|
|
7551
8681
|
position: "relative"
|
|
7552
8682
|
},
|
|
@@ -7568,7 +8698,12 @@ const menuBase = {
|
|
|
7568
8698
|
visibility: "hidden",
|
|
7569
8699
|
top: "0",
|
|
7570
8700
|
left: "0",
|
|
7571
|
-
|
|
8701
|
+
// `max-content`, not `fit-content`: the probe sits inside the wrapper, so
|
|
8702
|
+
// `fit-content` capped it at the wrapper's current width. Going back from
|
|
8703
|
+
// a narrow level then measured the wider level at the narrow width, and
|
|
8704
|
+
// its labels wrapped. `100vw` keeps very long labels on screen.
|
|
8705
|
+
width: "max-content",
|
|
8706
|
+
maxWidth: "100vw",
|
|
7572
8707
|
height: "fit-content",
|
|
7573
8708
|
overflow: "visible"
|
|
7574
8709
|
},
|
|
@@ -7633,6 +8768,38 @@ const menuVariants = {
|
|
|
7633
8768
|
boxShadow: "none"
|
|
7634
8769
|
}
|
|
7635
8770
|
}
|
|
8771
|
+
},
|
|
8772
|
+
// Caps the wrapper to `--available-height`, which Floating UI's `size()`
|
|
8773
|
+
// middleware writes at runtime, and scrolls the overflow. The floor keeps a
|
|
8774
|
+
// few rows visible when the trigger sits at the viewport edge.
|
|
8775
|
+
scrollable: {
|
|
8776
|
+
true: {
|
|
8777
|
+
wrapper: {
|
|
8778
|
+
maxHeight: "max(var(--available-height), token(sizes.120))",
|
|
8779
|
+
overflowY: "auto"
|
|
8780
|
+
},
|
|
8781
|
+
// Drill-in sets an explicit wrapper height, so each level can fill it
|
|
8782
|
+
// and scroll on its own. Otherwise every level stretches to the tallest
|
|
8783
|
+
// one and a short level scrolls into blank space. Single-level menus
|
|
8784
|
+
// have no explicit height, so the wrapper still does the scrolling.
|
|
8785
|
+
levelsViewport: {
|
|
8786
|
+
height: "full"
|
|
8787
|
+
},
|
|
8788
|
+
levelsTrack: {
|
|
8789
|
+
height: "full"
|
|
8790
|
+
},
|
|
8791
|
+
// Keeps keyboard focus scrolling from landing under the sticky header;
|
|
8792
|
+
// Menu measures the header into `--menu-back-header-height`.
|
|
8793
|
+
level: {
|
|
8794
|
+
overflowY: "auto",
|
|
8795
|
+
scrollPaddingTop: "var(--menu-back-header-height, 0px)"
|
|
8796
|
+
},
|
|
8797
|
+
backHeader: {
|
|
8798
|
+
position: "sticky",
|
|
8799
|
+
top: "0",
|
|
8800
|
+
zIndex: "1"
|
|
8801
|
+
}
|
|
8802
|
+
}
|
|
7636
8803
|
}
|
|
7637
8804
|
};
|
|
7638
8805
|
const menuRecipe = defineSlotRecipe({
|
|
@@ -7683,152 +8850,574 @@ const modalBase = {
|
|
|
7683
8850
|
animation: "modalFadeOut 150ms ease-out forwards"
|
|
7684
8851
|
}
|
|
7685
8852
|
},
|
|
7686
|
-
container: {
|
|
8853
|
+
container: {
|
|
8854
|
+
...globalBaseStyles,
|
|
8855
|
+
display: "flex",
|
|
8856
|
+
flexDirection: "column",
|
|
8857
|
+
maxW: "calc(100vw - (2 * var(--wrapper-p)))",
|
|
8858
|
+
maxH: "calc(100vh - (2 * var(--wrapper-p)))",
|
|
8859
|
+
bg: "surface.overlay",
|
|
8860
|
+
borderRadius: "12",
|
|
8861
|
+
boxShadow: "overlay",
|
|
8862
|
+
outline: "none",
|
|
8863
|
+
zIndex: 1101
|
|
8864
|
+
},
|
|
8865
|
+
header: {
|
|
8866
|
+
display: "flex",
|
|
8867
|
+
alignItems: "center",
|
|
8868
|
+
justifyContent: "space-between",
|
|
8869
|
+
gap: "12",
|
|
8870
|
+
px: "20",
|
|
8871
|
+
py: "12",
|
|
8872
|
+
borderBottom: "default"
|
|
8873
|
+
},
|
|
8874
|
+
title: {
|
|
8875
|
+
w: "full",
|
|
8876
|
+
truncate: true
|
|
8877
|
+
},
|
|
8878
|
+
closeButton: {
|
|
8879
|
+
// IconButton styles will be applied via IconButton component
|
|
8880
|
+
// This slot is for any additional wrapper styling if needed
|
|
8881
|
+
},
|
|
8882
|
+
body: {
|
|
8883
|
+
flex: 1,
|
|
8884
|
+
display: "flex",
|
|
8885
|
+
flexDirection: "column",
|
|
8886
|
+
overflowY: "auto",
|
|
8887
|
+
gap: "12",
|
|
8888
|
+
px: "20",
|
|
8889
|
+
py: "20"
|
|
8890
|
+
},
|
|
8891
|
+
footer: {
|
|
8892
|
+
display: "flex",
|
|
8893
|
+
alignItems: "center",
|
|
8894
|
+
justifyContent: "flex-end",
|
|
8895
|
+
gap: "8",
|
|
8896
|
+
px: "20",
|
|
8897
|
+
py: "12",
|
|
8898
|
+
borderTop: "default"
|
|
8899
|
+
}
|
|
8900
|
+
};
|
|
8901
|
+
const mobile = {
|
|
8902
|
+
xsDown: {
|
|
8903
|
+
width: "100vw",
|
|
8904
|
+
height: "100vh",
|
|
8905
|
+
maxWidth: "100vw",
|
|
8906
|
+
maxHeight: "100vh",
|
|
8907
|
+
borderRadius: "0"
|
|
8908
|
+
}
|
|
8909
|
+
};
|
|
8910
|
+
const modalVariants = {
|
|
8911
|
+
size: {
|
|
8912
|
+
sm: {
|
|
8913
|
+
container: {
|
|
8914
|
+
w: "md",
|
|
8915
|
+
...mobile
|
|
8916
|
+
}
|
|
8917
|
+
},
|
|
8918
|
+
md: {
|
|
8919
|
+
container: {
|
|
8920
|
+
w: "xl",
|
|
8921
|
+
...mobile
|
|
8922
|
+
}
|
|
8923
|
+
},
|
|
8924
|
+
lg: {
|
|
8925
|
+
container: {
|
|
8926
|
+
w: "3xl",
|
|
8927
|
+
...mobile
|
|
8928
|
+
}
|
|
8929
|
+
},
|
|
8930
|
+
xl: {
|
|
8931
|
+
container: {
|
|
8932
|
+
w: "5xl",
|
|
8933
|
+
...mobile
|
|
8934
|
+
}
|
|
8935
|
+
},
|
|
8936
|
+
full: {
|
|
8937
|
+
container: {
|
|
8938
|
+
w: "95vw",
|
|
8939
|
+
...mobile
|
|
8940
|
+
}
|
|
8941
|
+
},
|
|
8942
|
+
fullPage: {
|
|
8943
|
+
positionWrapper: {
|
|
8944
|
+
"--wrapper-p": "token(sizes.0)"
|
|
8945
|
+
},
|
|
8946
|
+
container: {
|
|
8947
|
+
w: "100vw",
|
|
8948
|
+
h: "100vh",
|
|
8949
|
+
maxW: "100vw",
|
|
8950
|
+
maxH: "100vh",
|
|
8951
|
+
borderRadius: "0",
|
|
8952
|
+
...mobile
|
|
8953
|
+
}
|
|
8954
|
+
}
|
|
8955
|
+
},
|
|
8956
|
+
position: {
|
|
8957
|
+
centered: {
|
|
8958
|
+
positionWrapper: {
|
|
8959
|
+
placeContent: "center"
|
|
8960
|
+
},
|
|
8961
|
+
container: {
|
|
8962
|
+
animation: "modalScaleIn 150ms ease-out forwards",
|
|
8963
|
+
'&[data-state="closing"]': {
|
|
8964
|
+
animation: "modalScaleOut 150ms ease-out forwards"
|
|
8965
|
+
}
|
|
8966
|
+
}
|
|
8967
|
+
},
|
|
8968
|
+
top: {
|
|
8969
|
+
positionWrapper: {
|
|
8970
|
+
placeContent: "start center"
|
|
8971
|
+
},
|
|
8972
|
+
container: {
|
|
8973
|
+
animation: "modalScaleInTop 150ms ease-out forwards",
|
|
8974
|
+
'&[data-state="closing"]': {
|
|
8975
|
+
animation: "modalScaleOutTop 150ms ease-out forwards"
|
|
8976
|
+
}
|
|
8977
|
+
}
|
|
8978
|
+
}
|
|
8979
|
+
}
|
|
8980
|
+
};
|
|
8981
|
+
const modalRecipe = defineSlotRecipe({
|
|
8982
|
+
className: "modal",
|
|
8983
|
+
jsx: ["ModalWrapper", "ModalHeader", "ModalBody", "ModalFooter", "Modal"],
|
|
8984
|
+
slots: [
|
|
8985
|
+
"positionWrapper",
|
|
8986
|
+
"overlay",
|
|
8987
|
+
"container",
|
|
8988
|
+
"header",
|
|
8989
|
+
"title",
|
|
8990
|
+
"closeButton",
|
|
8991
|
+
"body",
|
|
8992
|
+
"footer"
|
|
8993
|
+
],
|
|
8994
|
+
base: modalBase,
|
|
8995
|
+
variants: modalVariants,
|
|
8996
|
+
defaultVariants: {
|
|
8997
|
+
size: "md",
|
|
8998
|
+
position: "centered"
|
|
8999
|
+
}
|
|
9000
|
+
});
|
|
9001
|
+
const pageBannerBase = {
|
|
9002
|
+
root: {
|
|
9003
|
+
...globalBaseStyles,
|
|
9004
|
+
display: "flex",
|
|
9005
|
+
alignItems: "center",
|
|
9006
|
+
gap: "8",
|
|
9007
|
+
w: "full",
|
|
9008
|
+
px: "24",
|
|
9009
|
+
py: "12",
|
|
9010
|
+
borderRadius: "0",
|
|
9011
|
+
borderBottom: "default"
|
|
9012
|
+
},
|
|
9013
|
+
icon: {
|
|
9014
|
+
display: "flex",
|
|
9015
|
+
alignItems: "center",
|
|
9016
|
+
flex: "none",
|
|
9017
|
+
minH: "20"
|
|
9018
|
+
},
|
|
9019
|
+
content: {
|
|
9020
|
+
display: "flex",
|
|
9021
|
+
flex: "1",
|
|
9022
|
+
minW: "0"
|
|
9023
|
+
},
|
|
9024
|
+
message: {
|
|
9025
|
+
maxW: "full"
|
|
9026
|
+
},
|
|
9027
|
+
actions: {
|
|
9028
|
+
display: "flex",
|
|
9029
|
+
flexWrap: "wrap",
|
|
9030
|
+
alignItems: "center",
|
|
9031
|
+
gap: "8",
|
|
9032
|
+
flex: "none"
|
|
9033
|
+
}
|
|
9034
|
+
};
|
|
9035
|
+
const pageBannerVariants = {
|
|
9036
|
+
/** Semantic tone. `data-emphasis="bold"` switches to the filled treatment. */
|
|
9037
|
+
tone: {
|
|
9038
|
+
info: {
|
|
9039
|
+
root: {
|
|
9040
|
+
bg: "bg.info",
|
|
9041
|
+
borderBottom: "info",
|
|
9042
|
+
'&[data-emphasis="bold"]': {
|
|
9043
|
+
bg: "bg.info.bold",
|
|
9044
|
+
borderBottomColor: "bg.info.bold"
|
|
9045
|
+
}
|
|
9046
|
+
}
|
|
9047
|
+
},
|
|
9048
|
+
success: {
|
|
9049
|
+
root: {
|
|
9050
|
+
bg: "bg.success",
|
|
9051
|
+
borderBottom: "success",
|
|
9052
|
+
'&[data-emphasis="bold"]': {
|
|
9053
|
+
bg: "bg.success.bold",
|
|
9054
|
+
borderBottomColor: "bg.success.bold"
|
|
9055
|
+
}
|
|
9056
|
+
}
|
|
9057
|
+
},
|
|
9058
|
+
warning: {
|
|
9059
|
+
root: {
|
|
9060
|
+
bg: "bg.warning",
|
|
9061
|
+
borderBottom: "warning",
|
|
9062
|
+
'&[data-emphasis="bold"]': {
|
|
9063
|
+
bg: "bg.warning.bold",
|
|
9064
|
+
borderBottomColor: "bg.warning.bold"
|
|
9065
|
+
}
|
|
9066
|
+
}
|
|
9067
|
+
},
|
|
9068
|
+
danger: {
|
|
9069
|
+
root: {
|
|
9070
|
+
bg: "bg.danger",
|
|
9071
|
+
borderBottom: "danger",
|
|
9072
|
+
'&[data-emphasis="bold"]': {
|
|
9073
|
+
bg: "bg.danger.bold",
|
|
9074
|
+
borderBottomColor: "bg.danger.bold"
|
|
9075
|
+
}
|
|
9076
|
+
}
|
|
9077
|
+
},
|
|
9078
|
+
neutral: {
|
|
9079
|
+
root: {
|
|
9080
|
+
bg: "bg.neutral",
|
|
9081
|
+
borderBottom: "default",
|
|
9082
|
+
'&[data-emphasis="bold"]': {
|
|
9083
|
+
bg: "bg.neutral.bold",
|
|
9084
|
+
borderBottomColor: "bg.neutral.bold"
|
|
9085
|
+
}
|
|
9086
|
+
}
|
|
9087
|
+
}
|
|
9088
|
+
}
|
|
9089
|
+
};
|
|
9090
|
+
const pageBannerRecipe = defineSlotRecipe({
|
|
9091
|
+
className: "pageBanner",
|
|
9092
|
+
jsx: ["PageBanner"],
|
|
9093
|
+
slots: ["root", "icon", "content", "message", "actions"],
|
|
9094
|
+
base: pageBannerBase,
|
|
9095
|
+
variants: pageBannerVariants,
|
|
9096
|
+
defaultVariants: {
|
|
9097
|
+
tone: "info"
|
|
9098
|
+
}
|
|
9099
|
+
});
|
|
9100
|
+
const peekBarBase = {
|
|
9101
|
+
root: {
|
|
9102
|
+
...globalBaseStyles,
|
|
9103
|
+
display: "flex",
|
|
9104
|
+
alignItems: "center",
|
|
9105
|
+
justifyContent: "space-between",
|
|
9106
|
+
gap: "8",
|
|
9107
|
+
px: "16",
|
|
9108
|
+
py: "8",
|
|
9109
|
+
borderBottomWidth: "1",
|
|
9110
|
+
borderBottomStyle: "solid",
|
|
9111
|
+
borderColor: "border"
|
|
9112
|
+
},
|
|
9113
|
+
position: {
|
|
9114
|
+
textStyle: "sans.md",
|
|
9115
|
+
color: "text",
|
|
9116
|
+
whiteSpace: "nowrap"
|
|
9117
|
+
},
|
|
9118
|
+
controls: {
|
|
9119
|
+
display: "flex",
|
|
9120
|
+
alignItems: "center",
|
|
9121
|
+
gap: "4"
|
|
9122
|
+
}
|
|
9123
|
+
};
|
|
9124
|
+
const peekBarRecipe = defineSlotRecipe({
|
|
9125
|
+
className: "peekBar",
|
|
9126
|
+
jsx: ["PeekBar"],
|
|
9127
|
+
slots: ["root", "position", "controls"],
|
|
9128
|
+
base: peekBarBase
|
|
9129
|
+
});
|
|
9130
|
+
const popoverBase = {
|
|
9131
|
+
content: {
|
|
7687
9132
|
...globalBaseStyles,
|
|
7688
9133
|
display: "flex",
|
|
7689
9134
|
flexDirection: "column",
|
|
7690
|
-
maxW: "calc(100vw - (2 * var(--wrapper-p)))",
|
|
7691
|
-
maxH: "calc(100vh - (2 * var(--wrapper-p)))",
|
|
7692
9135
|
bg: "surface.overlay",
|
|
7693
|
-
|
|
9136
|
+
color: "text",
|
|
9137
|
+
borderRadius: "8",
|
|
9138
|
+
border: "default",
|
|
7694
9139
|
boxShadow: "overlay",
|
|
7695
|
-
outline: "none"
|
|
7696
|
-
zIndex: 1101
|
|
9140
|
+
outline: "none"
|
|
7697
9141
|
},
|
|
7698
9142
|
header: {
|
|
7699
9143
|
display: "flex",
|
|
7700
|
-
alignItems: "
|
|
9144
|
+
alignItems: "flex-start",
|
|
7701
9145
|
justifyContent: "space-between",
|
|
7702
|
-
gap: "
|
|
7703
|
-
px: "
|
|
7704
|
-
|
|
7705
|
-
|
|
9146
|
+
gap: "8",
|
|
9147
|
+
px: "12",
|
|
9148
|
+
pt: "12",
|
|
9149
|
+
pb: "4"
|
|
7706
9150
|
},
|
|
7707
9151
|
title: {
|
|
7708
|
-
|
|
7709
|
-
|
|
9152
|
+
display: "flex",
|
|
9153
|
+
alignItems: "center",
|
|
9154
|
+
gap: "6",
|
|
9155
|
+
fontWeight: "bold",
|
|
9156
|
+
color: "text",
|
|
9157
|
+
lineHeight: "tight",
|
|
9158
|
+
minW: "0",
|
|
9159
|
+
flex: "1"
|
|
7710
9160
|
},
|
|
7711
|
-
|
|
7712
|
-
|
|
7713
|
-
|
|
9161
|
+
titleIcon: {
|
|
9162
|
+
display: "flex",
|
|
9163
|
+
alignItems: "center",
|
|
9164
|
+
flex: "none"
|
|
9165
|
+
},
|
|
9166
|
+
description: {
|
|
9167
|
+
color: "text.subtle",
|
|
9168
|
+
lineHeight: "default",
|
|
9169
|
+
px: "12",
|
|
9170
|
+
pb: "4"
|
|
7714
9171
|
},
|
|
7715
9172
|
body: {
|
|
7716
|
-
flex: 1,
|
|
7717
9173
|
display: "flex",
|
|
7718
9174
|
flexDirection: "column",
|
|
7719
|
-
|
|
7720
|
-
|
|
7721
|
-
|
|
7722
|
-
|
|
9175
|
+
gap: "8",
|
|
9176
|
+
px: "12",
|
|
9177
|
+
py: "8",
|
|
9178
|
+
color: "text",
|
|
9179
|
+
lineHeight: "default"
|
|
9180
|
+
},
|
|
9181
|
+
// Content can't clip overflow without clipping the arrow, so media rounds
|
|
9182
|
+
// its own corners when it sits at the top or bottom edge of the panel.
|
|
9183
|
+
media: {
|
|
9184
|
+
display: "block",
|
|
9185
|
+
width: "full",
|
|
9186
|
+
overflow: "hidden",
|
|
9187
|
+
_first: { borderTopRadius: "8" },
|
|
9188
|
+
_last: { borderBottomRadius: "8" },
|
|
9189
|
+
"& img": {
|
|
9190
|
+
display: "block",
|
|
9191
|
+
width: "full",
|
|
9192
|
+
height: "auto"
|
|
9193
|
+
}
|
|
7723
9194
|
},
|
|
7724
9195
|
footer: {
|
|
7725
9196
|
display: "flex",
|
|
7726
9197
|
alignItems: "center",
|
|
7727
9198
|
justifyContent: "flex-end",
|
|
9199
|
+
flexWrap: "wrap",
|
|
7728
9200
|
gap: "8",
|
|
7729
|
-
px: "
|
|
7730
|
-
|
|
7731
|
-
|
|
7732
|
-
}
|
|
7733
|
-
|
|
7734
|
-
|
|
7735
|
-
|
|
7736
|
-
|
|
7737
|
-
|
|
7738
|
-
|
|
7739
|
-
|
|
7740
|
-
|
|
9201
|
+
px: "12",
|
|
9202
|
+
pt: "4",
|
|
9203
|
+
pb: "12"
|
|
9204
|
+
},
|
|
9205
|
+
close: {
|
|
9206
|
+
flex: "none",
|
|
9207
|
+
ms: "auto"
|
|
9208
|
+
},
|
|
9209
|
+
// Applied only to the fallback element PopoverTrigger renders for plain
|
|
9210
|
+
// content, never to a consumer's cloned child. Reads as an inline
|
|
9211
|
+
// dashed-underline phrase whether it renders a button or a span.
|
|
9212
|
+
trigger: {
|
|
9213
|
+
appearance: "none",
|
|
9214
|
+
display: "inline",
|
|
9215
|
+
width: "fit",
|
|
9216
|
+
p: "0",
|
|
9217
|
+
m: "0",
|
|
9218
|
+
bg: "transparent",
|
|
9219
|
+
borderWidth: "0",
|
|
9220
|
+
color: "inherit",
|
|
9221
|
+
font: "inherit",
|
|
9222
|
+
textAlign: "inherit",
|
|
9223
|
+
textDecoration: "underline",
|
|
9224
|
+
textDecorationStyle: "dashed",
|
|
9225
|
+
textDecorationThickness: "[0.0625em]",
|
|
9226
|
+
textUnderlineOffset: "[0.15625em]",
|
|
9227
|
+
textDecorationSkipInk: "all",
|
|
9228
|
+
cursor: "pointer",
|
|
9229
|
+
_focusVisible: {
|
|
9230
|
+
borderRadius: "2",
|
|
9231
|
+
outlineWidth: "2",
|
|
9232
|
+
outlineStyle: "solid",
|
|
9233
|
+
outlineColor: "border.focused"
|
|
9234
|
+
}
|
|
7741
9235
|
}
|
|
7742
9236
|
};
|
|
7743
|
-
const
|
|
9237
|
+
const popoverVariants = {
|
|
9238
|
+
interaction: {
|
|
9239
|
+
definition: { trigger: { cursor: "help" } },
|
|
9240
|
+
rich: {}
|
|
9241
|
+
},
|
|
9242
|
+
/** z-index layer inherited from FloatingLayerContext (raised inside modals). */
|
|
9243
|
+
layer: {
|
|
9244
|
+
elevated: { content: { zIndex: "elevated" } },
|
|
9245
|
+
modalFloating: { content: { zIndex: "modalFloating" } }
|
|
9246
|
+
},
|
|
7744
9247
|
size: {
|
|
7745
9248
|
sm: {
|
|
7746
|
-
|
|
7747
|
-
|
|
7748
|
-
|
|
7749
|
-
}
|
|
9249
|
+
content: { maxW: "280", fontSize: "12" },
|
|
9250
|
+
title: { fontSize: "12" },
|
|
9251
|
+
description: { fontSize: "12" },
|
|
9252
|
+
body: { fontSize: "12" }
|
|
7750
9253
|
},
|
|
7751
9254
|
md: {
|
|
7752
|
-
|
|
7753
|
-
|
|
7754
|
-
|
|
7755
|
-
}
|
|
9255
|
+
content: { maxW: "xs", fontSize: "14" },
|
|
9256
|
+
title: { fontSize: "14" },
|
|
9257
|
+
description: { fontSize: "14" },
|
|
9258
|
+
body: { fontSize: "14" }
|
|
7756
9259
|
},
|
|
7757
9260
|
lg: {
|
|
7758
|
-
|
|
7759
|
-
|
|
7760
|
-
|
|
7761
|
-
}
|
|
7762
|
-
}
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
|
|
7766
|
-
|
|
7767
|
-
|
|
9261
|
+
content: { maxW: "sm", fontSize: "14" },
|
|
9262
|
+
title: { fontSize: "16" },
|
|
9263
|
+
description: { fontSize: "14" },
|
|
9264
|
+
body: { fontSize: "14" }
|
|
9265
|
+
}
|
|
9266
|
+
},
|
|
9267
|
+
/**
|
|
9268
|
+
* Visual tone for handbook-style notes. Quiet chrome only: left accent bar +
|
|
9269
|
+
* soft title tint. Surface stays neutral (surface.overlay). Never maps to
|
|
9270
|
+
* role="alert".
|
|
9271
|
+
*/
|
|
9272
|
+
tone: {
|
|
9273
|
+
note: {
|
|
9274
|
+
content: { borderLeft: "default", borderLeftWidth: "4" },
|
|
9275
|
+
title: { color: "text.subtle" }
|
|
9276
|
+
},
|
|
9277
|
+
tip: {
|
|
9278
|
+
content: { borderLeft: "info", borderLeftWidth: "4" },
|
|
9279
|
+
title: { color: "text.subtle" }
|
|
7768
9280
|
},
|
|
7769
|
-
|
|
7770
|
-
|
|
7771
|
-
|
|
7772
|
-
...mobile
|
|
7773
|
-
}
|
|
9281
|
+
warning: {
|
|
9282
|
+
content: { borderLeft: "warning", borderLeftWidth: "4" },
|
|
9283
|
+
title: { color: "text.warning" }
|
|
7774
9284
|
},
|
|
7775
|
-
|
|
7776
|
-
|
|
7777
|
-
|
|
7778
|
-
},
|
|
7779
|
-
container: {
|
|
7780
|
-
w: "100vw",
|
|
7781
|
-
h: "100vh",
|
|
7782
|
-
maxW: "100vw",
|
|
7783
|
-
maxH: "100vh",
|
|
7784
|
-
borderRadius: "0",
|
|
7785
|
-
...mobile
|
|
7786
|
-
}
|
|
7787
|
-
}
|
|
7788
|
-
},
|
|
7789
|
-
position: {
|
|
7790
|
-
centered: {
|
|
7791
|
-
positionWrapper: {
|
|
7792
|
-
placeContent: "center"
|
|
7793
|
-
},
|
|
7794
|
-
container: {
|
|
7795
|
-
animation: "modalScaleIn 150ms ease-out forwards",
|
|
7796
|
-
'&[data-state="closing"]': {
|
|
7797
|
-
animation: "modalScaleOut 150ms ease-out forwards"
|
|
7798
|
-
}
|
|
7799
|
-
}
|
|
9285
|
+
important: {
|
|
9286
|
+
content: { borderLeft: "danger", borderLeftWidth: "4" },
|
|
9287
|
+
title: { color: "text.danger" }
|
|
7800
9288
|
},
|
|
7801
|
-
|
|
7802
|
-
|
|
7803
|
-
|
|
7804
|
-
},
|
|
7805
|
-
container: {
|
|
7806
|
-
animation: "modalScaleInTop 150ms ease-out forwards",
|
|
7807
|
-
'&[data-state="closing"]': {
|
|
7808
|
-
animation: "modalScaleOutTop 150ms ease-out forwards"
|
|
7809
|
-
}
|
|
7810
|
-
}
|
|
9289
|
+
caution: {
|
|
9290
|
+
content: { borderLeft: "warning", borderLeftWidth: "4" },
|
|
9291
|
+
title: { color: "text.warning" }
|
|
7811
9292
|
}
|
|
7812
9293
|
}
|
|
7813
9294
|
};
|
|
7814
|
-
const
|
|
7815
|
-
className: "
|
|
7816
|
-
jsx: [
|
|
9295
|
+
const popoverRecipe = defineSlotRecipe({
|
|
9296
|
+
className: "popover",
|
|
9297
|
+
jsx: [
|
|
9298
|
+
"Popover",
|
|
9299
|
+
"PopoverTrigger",
|
|
9300
|
+
"PopoverContent",
|
|
9301
|
+
"PopoverHeader",
|
|
9302
|
+
"PopoverTitle",
|
|
9303
|
+
"PopoverDescription",
|
|
9304
|
+
"PopoverBody",
|
|
9305
|
+
"PopoverMedia",
|
|
9306
|
+
"PopoverFooter",
|
|
9307
|
+
"PopoverClose",
|
|
9308
|
+
"PopoverArrow"
|
|
9309
|
+
],
|
|
7817
9310
|
slots: [
|
|
7818
|
-
"
|
|
7819
|
-
"overlay",
|
|
7820
|
-
"container",
|
|
9311
|
+
"content",
|
|
7821
9312
|
"header",
|
|
7822
9313
|
"title",
|
|
7823
|
-
"
|
|
9314
|
+
"titleIcon",
|
|
9315
|
+
"description",
|
|
7824
9316
|
"body",
|
|
7825
|
-
"
|
|
9317
|
+
"media",
|
|
9318
|
+
"footer",
|
|
9319
|
+
"close",
|
|
9320
|
+
"trigger"
|
|
7826
9321
|
],
|
|
7827
|
-
base:
|
|
7828
|
-
variants:
|
|
9322
|
+
base: popoverBase,
|
|
9323
|
+
variants: popoverVariants,
|
|
7829
9324
|
defaultVariants: {
|
|
7830
9325
|
size: "md",
|
|
7831
|
-
|
|
9326
|
+
interaction: "rich",
|
|
9327
|
+
layer: "elevated"
|
|
9328
|
+
}
|
|
9329
|
+
});
|
|
9330
|
+
const printPreviewRecipe = defineSlotRecipe({
|
|
9331
|
+
className: "printPreview",
|
|
9332
|
+
jsx: ["PrintPreview", "PrintPage"],
|
|
9333
|
+
slots: ["root", "stack", "page", "sheet", "overlay", "marginArea", "margins"],
|
|
9334
|
+
base: {
|
|
9335
|
+
root: {
|
|
9336
|
+
position: "relative",
|
|
9337
|
+
w: "full",
|
|
9338
|
+
h: "full",
|
|
9339
|
+
overflow: "auto",
|
|
9340
|
+
// A scrollbar that appears would change the width and the fit scale.
|
|
9341
|
+
scrollbarGutter: "stable",
|
|
9342
|
+
bg: "surface.sunken",
|
|
9343
|
+
p: "24",
|
|
9344
|
+
_focusVisible: {
|
|
9345
|
+
outlineWidth: "2",
|
|
9346
|
+
outlineStyle: "solid",
|
|
9347
|
+
outlineColor: "border.focused",
|
|
9348
|
+
outlineOffset: "-2"
|
|
9349
|
+
}
|
|
9350
|
+
},
|
|
9351
|
+
stack: {
|
|
9352
|
+
display: "flex",
|
|
9353
|
+
flexDirection: "column",
|
|
9354
|
+
alignItems: "flex-start",
|
|
9355
|
+
gap: "24",
|
|
9356
|
+
w: "max-content",
|
|
9357
|
+
minW: "full"
|
|
9358
|
+
},
|
|
9359
|
+
page: {
|
|
9360
|
+
position: "relative",
|
|
9361
|
+
flexShrink: 0,
|
|
9362
|
+
// Auto margins center the page without clipping it when it overflows.
|
|
9363
|
+
mx: "auto",
|
|
9364
|
+
w: "calc(var(--print-page-w) * var(--print-scale))",
|
|
9365
|
+
h: "calc(var(--print-page-h) * var(--print-scale))",
|
|
9366
|
+
boxShadow: "raised",
|
|
9367
|
+
"&[data-measuring=true]": {
|
|
9368
|
+
visibility: "hidden"
|
|
9369
|
+
}
|
|
9370
|
+
},
|
|
9371
|
+
sheet: {
|
|
9372
|
+
position: "absolute",
|
|
9373
|
+
top: "0",
|
|
9374
|
+
left: "0",
|
|
9375
|
+
w: "var(--print-page-w)",
|
|
9376
|
+
h: "var(--print-page-h)",
|
|
9377
|
+
overflow: "hidden",
|
|
9378
|
+
// Paper is white in both themes. The token system has no light scope to
|
|
9379
|
+
// reset semantic colors inside dark mode, so these are primitives.
|
|
9380
|
+
bg: "neutral.0",
|
|
9381
|
+
color: "neutral.110",
|
|
9382
|
+
transform: "scale(var(--print-scale))",
|
|
9383
|
+
transformOrigin: "top left"
|
|
9384
|
+
},
|
|
9385
|
+
overlay: {
|
|
9386
|
+
position: "absolute",
|
|
9387
|
+
inset: "0",
|
|
9388
|
+
pointerEvents: "none"
|
|
9389
|
+
},
|
|
9390
|
+
// Stripes fill the margins. The padding is the margin, and the mask cuts
|
|
9391
|
+
// out the content box. Drawn outside the scaled sheet, so stripe width and
|
|
9392
|
+
// spacing stay the same at any zoom.
|
|
9393
|
+
marginArea: {
|
|
9394
|
+
position: "absolute",
|
|
9395
|
+
inset: "0",
|
|
9396
|
+
pt: "calc(var(--print-margin-top) * var(--print-scale))",
|
|
9397
|
+
pr: "calc(var(--print-margin-right) * var(--print-scale))",
|
|
9398
|
+
pb: "calc(var(--print-margin-bottom) * var(--print-scale))",
|
|
9399
|
+
pl: "calc(var(--print-margin-left) * var(--print-scale))",
|
|
9400
|
+
bgImage: "repeating-linear-gradient(-45deg, token(colors.border.info) 0 token(sizes.1), transparent token(sizes.1) token(sizes.8))",
|
|
9401
|
+
opacity: "0.3",
|
|
9402
|
+
// validate-ignore: no-hardcoded-design-values-in-recipes — mask alpha only, never painted
|
|
9403
|
+
mask: "linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)",
|
|
9404
|
+
maskComposite: "exclude",
|
|
9405
|
+
// biome-ignore lint/style/useNamingConvention: vendor-prefixed CSS property
|
|
9406
|
+
WebkitMaskComposite: "xor",
|
|
9407
|
+
pointerEvents: "none"
|
|
9408
|
+
},
|
|
9409
|
+
// Drawn outside the scaled sheet so the guide stays one pixel wide.
|
|
9410
|
+
margins: {
|
|
9411
|
+
position: "absolute",
|
|
9412
|
+
top: "calc(var(--print-margin-top) * var(--print-scale))",
|
|
9413
|
+
right: "calc(var(--print-margin-right) * var(--print-scale))",
|
|
9414
|
+
bottom: "calc(var(--print-margin-bottom) * var(--print-scale))",
|
|
9415
|
+
left: "calc(var(--print-margin-left) * var(--print-scale))",
|
|
9416
|
+
borderWidth: "1",
|
|
9417
|
+
borderStyle: "dashed",
|
|
9418
|
+
borderColor: "border.info",
|
|
9419
|
+
pointerEvents: "none"
|
|
9420
|
+
}
|
|
7832
9421
|
}
|
|
7833
9422
|
});
|
|
7834
9423
|
const radioRecipe = defineSlotRecipe({
|
|
@@ -7920,8 +9509,6 @@ const segmentedFieldsBase = {
|
|
|
7920
9509
|
display: "flex",
|
|
7921
9510
|
alignItems: "center",
|
|
7922
9511
|
width: "full",
|
|
7923
|
-
py: "var(--input-py)",
|
|
7924
|
-
px: "var(--input-px)",
|
|
7925
9512
|
bg: "bg.input",
|
|
7926
9513
|
borderWidth: "1",
|
|
7927
9514
|
borderStyle: "solid",
|
|
@@ -7965,6 +9552,14 @@ const segmentedFieldsBase = {
|
|
|
7965
9552
|
}
|
|
7966
9553
|
}
|
|
7967
9554
|
},
|
|
9555
|
+
content: {
|
|
9556
|
+
display: "flex",
|
|
9557
|
+
alignItems: "center",
|
|
9558
|
+
flex: "1 1 auto",
|
|
9559
|
+
minW: "0",
|
|
9560
|
+
py: "var(--input-py)",
|
|
9561
|
+
px: "var(--input-px)"
|
|
9562
|
+
},
|
|
7968
9563
|
slot: {
|
|
7969
9564
|
display: "inline-flex",
|
|
7970
9565
|
alignItems: "center",
|
|
@@ -8052,7 +9647,7 @@ const segmentedFieldsVariants = {
|
|
|
8052
9647
|
},
|
|
8053
9648
|
before: {
|
|
8054
9649
|
true: {
|
|
8055
|
-
|
|
9650
|
+
content: {
|
|
8056
9651
|
ps: "0"
|
|
8057
9652
|
},
|
|
8058
9653
|
buttonSlot: {
|
|
@@ -8065,7 +9660,7 @@ const segmentedFieldsVariants = {
|
|
|
8065
9660
|
},
|
|
8066
9661
|
after: {
|
|
8067
9662
|
true: {
|
|
8068
|
-
|
|
9663
|
+
content: {
|
|
8069
9664
|
pe: "0"
|
|
8070
9665
|
},
|
|
8071
9666
|
buttonSlot: {
|
|
@@ -8087,7 +9682,7 @@ const segmentedFieldsRecipe = defineSlotRecipe({
|
|
|
8087
9682
|
"TimeRangeInput",
|
|
8088
9683
|
"DateTimeInput"
|
|
8089
9684
|
],
|
|
8090
|
-
slots: ["container", "slot", "buttonSlot"],
|
|
9685
|
+
slots: ["container", "content", "slot", "buttonSlot"],
|
|
8091
9686
|
base: segmentedFieldsBase,
|
|
8092
9687
|
variants: segmentedFieldsVariants,
|
|
8093
9688
|
defaultVariants: {
|
|
@@ -8193,33 +9788,53 @@ const segmentedInputsRecipe = defineSlotRecipe({
|
|
|
8193
9788
|
}
|
|
8194
9789
|
});
|
|
8195
9790
|
const selectBase = {
|
|
8196
|
-
|
|
9791
|
+
root: {
|
|
9792
|
+
"--icon-size": "token(sizes.24)",
|
|
9793
|
+
"--icon-margin": "token(sizes.3)",
|
|
9794
|
+
"--input-icon-padding": "token(sizes.10)",
|
|
9795
|
+
display: "inline-flex",
|
|
9796
|
+
flexDirection: "column",
|
|
9797
|
+
position: "relative",
|
|
9798
|
+
minWidth: "0",
|
|
9799
|
+
maxW: "full",
|
|
9800
|
+
width: "fit"
|
|
9801
|
+
},
|
|
8197
9802
|
trigger: {
|
|
8198
|
-
|
|
9803
|
+
position: "relative",
|
|
9804
|
+
display: "inline-flex",
|
|
8199
9805
|
alignItems: "center",
|
|
8200
|
-
|
|
8201
|
-
|
|
8202
|
-
|
|
9806
|
+
width: "fit",
|
|
9807
|
+
minWidth: "0",
|
|
9808
|
+
maxWidth: "full",
|
|
9809
|
+
pe: "var(--input-icon-padding)",
|
|
8203
9810
|
borderWidth: "1",
|
|
8204
9811
|
borderStyle: "solid",
|
|
8205
9812
|
borderColor: "border.input",
|
|
8206
9813
|
borderRadius: "4",
|
|
9814
|
+
outlineWidth: "2",
|
|
9815
|
+
outlineOffset: "-1",
|
|
9816
|
+
outlineStyle: "solid",
|
|
9817
|
+
outlineColor: "transparent",
|
|
8207
9818
|
bg: "bg.input",
|
|
8208
9819
|
color: "text",
|
|
8209
|
-
fontFamily: "
|
|
9820
|
+
fontFamily: "sans",
|
|
9821
|
+
lineHeight: "default",
|
|
8210
9822
|
cursor: "pointer",
|
|
8211
|
-
|
|
9823
|
+
overflow: "hidden",
|
|
8212
9824
|
transitionDuration: "fast",
|
|
8213
|
-
transitionProperty: "background, border-color,
|
|
9825
|
+
transitionProperty: "background, border-color, outline-color",
|
|
8214
9826
|
transitionTimingFunction: "default",
|
|
8215
9827
|
_hover: {
|
|
8216
9828
|
bg: "bg.input.hovered"
|
|
8217
9829
|
},
|
|
8218
|
-
|
|
9830
|
+
_focusVisible: {
|
|
9831
|
+
bg: "bg.input.pressed",
|
|
9832
|
+
borderColor: "border.focused",
|
|
9833
|
+
outlineColor: "border.focused"
|
|
9834
|
+
},
|
|
9835
|
+
_open: {
|
|
9836
|
+
bg: "bg.input.pressed",
|
|
8219
9837
|
borderColor: "border.focused",
|
|
8220
|
-
outlineWidth: "2",
|
|
8221
|
-
outlineOffset: "-1",
|
|
8222
|
-
outlineStyle: "solid",
|
|
8223
9838
|
outlineColor: "border.focused"
|
|
8224
9839
|
},
|
|
8225
9840
|
_disabled: {
|
|
@@ -8227,106 +9842,231 @@ const selectBase = {
|
|
|
8227
9842
|
borderColor: "border.disabled",
|
|
8228
9843
|
color: "text.disabled",
|
|
8229
9844
|
cursor: "not-allowed",
|
|
8230
|
-
|
|
9845
|
+
pointerEvents: "none"
|
|
8231
9846
|
},
|
|
8232
9847
|
_error: {
|
|
8233
|
-
bg: "bg.danger",
|
|
8234
9848
|
borderColor: "border.danger",
|
|
8235
9849
|
_hover: {
|
|
8236
|
-
|
|
9850
|
+
borderColor: "border.danger"
|
|
8237
9851
|
},
|
|
8238
|
-
|
|
9852
|
+
_focusVisible: {
|
|
9853
|
+
borderColor: "border.danger",
|
|
9854
|
+
outlineColor: "border.danger"
|
|
9855
|
+
},
|
|
9856
|
+
_open: {
|
|
8239
9857
|
borderColor: "border.danger",
|
|
8240
9858
|
outlineColor: "border.danger"
|
|
8241
9859
|
}
|
|
8242
9860
|
}
|
|
8243
9861
|
},
|
|
8244
|
-
|
|
9862
|
+
content: {
|
|
9863
|
+
display: "flex",
|
|
9864
|
+
alignItems: "center",
|
|
9865
|
+
minWidth: "0",
|
|
9866
|
+
width: "full",
|
|
9867
|
+
flex: "1",
|
|
9868
|
+
ps: "var(--select-px)"
|
|
9869
|
+
},
|
|
9870
|
+
before: {
|
|
9871
|
+
display: "inline-flex",
|
|
9872
|
+
alignItems: "center",
|
|
9873
|
+
flex: "0 0 auto",
|
|
9874
|
+
alignSelf: "center",
|
|
9875
|
+
px: "var(--select-slot-px)",
|
|
9876
|
+
fill: "icon.decorative",
|
|
9877
|
+
pointerEvents: "none"
|
|
9878
|
+
},
|
|
8245
9879
|
value: {
|
|
8246
9880
|
flex: 1,
|
|
9881
|
+
minWidth: "0",
|
|
8247
9882
|
textAlign: "left",
|
|
8248
9883
|
truncate: true,
|
|
8249
|
-
color: "text"
|
|
8250
|
-
_placeholder: {
|
|
8251
|
-
color: "text.subtlest"
|
|
8252
|
-
}
|
|
9884
|
+
color: "text"
|
|
8253
9885
|
},
|
|
8254
|
-
// Placeholder styling (when no value selected)
|
|
8255
9886
|
placeholder: {
|
|
8256
|
-
color: "text.subtlest"
|
|
8257
|
-
},
|
|
8258
|
-
chips: {
|
|
8259
9887
|
flex: 1,
|
|
8260
9888
|
minWidth: "0",
|
|
9889
|
+
textAlign: "left",
|
|
9890
|
+
truncate: true,
|
|
9891
|
+
color: "text.placeholder"
|
|
9892
|
+
},
|
|
9893
|
+
chips: {
|
|
9894
|
+
display: "flex",
|
|
8261
9895
|
alignItems: "center",
|
|
8262
|
-
|
|
9896
|
+
gap: "4",
|
|
9897
|
+
minWidth: "0",
|
|
9898
|
+
width: "full",
|
|
9899
|
+
flex: "1",
|
|
9900
|
+
overflowX: "auto",
|
|
9901
|
+
overflowY: "hidden",
|
|
9902
|
+
scrollbarWidth: "thin"
|
|
8263
9903
|
},
|
|
8264
|
-
// The chevron/arrow icon
|
|
8265
9904
|
icon: {
|
|
8266
|
-
|
|
9905
|
+
position: "absolute",
|
|
9906
|
+
top: "50%",
|
|
9907
|
+
right: "1",
|
|
9908
|
+
display: "inline-flex",
|
|
8267
9909
|
alignItems: "center",
|
|
8268
|
-
|
|
8269
|
-
|
|
8270
|
-
|
|
8271
|
-
|
|
9910
|
+
justifyContent: "center",
|
|
9911
|
+
width: "var(--icon-size)",
|
|
9912
|
+
height: "var(--icon-size)",
|
|
9913
|
+
marginInline: "var(--icon-margin)",
|
|
9914
|
+
transform: "translateY(-50%)",
|
|
9915
|
+
bg: "bg.input",
|
|
9916
|
+
fill: "icon.decorative",
|
|
9917
|
+
pointerEvents: "none",
|
|
9918
|
+
transitionDuration: "fast",
|
|
9919
|
+
transitionProperty: "all",
|
|
8272
9920
|
transitionTimingFunction: "default",
|
|
8273
|
-
|
|
8274
|
-
|
|
9921
|
+
_icon: {
|
|
9922
|
+
width: "var(--icon-size)",
|
|
9923
|
+
height: "var(--icon-size)",
|
|
9924
|
+
transitionDuration: "fast",
|
|
9925
|
+
transitionProperty: "all",
|
|
9926
|
+
transitionTimingFunction: "default"
|
|
9927
|
+
},
|
|
9928
|
+
_peerHover: {
|
|
9929
|
+
bg: "bg.input.hovered"
|
|
9930
|
+
},
|
|
9931
|
+
_open: {
|
|
9932
|
+
"& > svg": {
|
|
9933
|
+
transform: "rotate(-180deg)",
|
|
9934
|
+
transformOrigin: "center"
|
|
9935
|
+
}
|
|
8275
9936
|
}
|
|
8276
9937
|
}
|
|
8277
9938
|
};
|
|
8278
9939
|
const selectVariants = {
|
|
8279
9940
|
size: {
|
|
9941
|
+
sm: {
|
|
9942
|
+
root: {
|
|
9943
|
+
"--icon-size": "token(sizes.22)",
|
|
9944
|
+
"--icon-margin": "token(sizes.2)",
|
|
9945
|
+
"--input-icon-padding": "[26px]",
|
|
9946
|
+
"--select-px": "token(sizes.8)",
|
|
9947
|
+
"--select-slot-px": "token(sizes.4)"
|
|
9948
|
+
},
|
|
9949
|
+
content: {
|
|
9950
|
+
py: "0",
|
|
9951
|
+
fontSize: "14"
|
|
9952
|
+
},
|
|
9953
|
+
chips: {
|
|
9954
|
+
gap: "3",
|
|
9955
|
+
py: "2"
|
|
9956
|
+
}
|
|
9957
|
+
},
|
|
8280
9958
|
md: {
|
|
8281
|
-
|
|
9959
|
+
root: {
|
|
9960
|
+
"--icon-size": "token(sizes.24)",
|
|
9961
|
+
"--icon-margin": "token(sizes.3)",
|
|
9962
|
+
"--input-icon-padding": "[31px]",
|
|
9963
|
+
"--select-px": "token(sizes.10)",
|
|
9964
|
+
"--select-slot-px": "token(sizes.6)"
|
|
9965
|
+
},
|
|
9966
|
+
content: {
|
|
8282
9967
|
py: "3",
|
|
8283
|
-
px: "12",
|
|
8284
9968
|
fontSize: "16"
|
|
8285
9969
|
},
|
|
8286
|
-
|
|
8287
|
-
|
|
8288
|
-
|
|
9970
|
+
chips: {
|
|
9971
|
+
gap: "4",
|
|
9972
|
+
py: "5"
|
|
9973
|
+
}
|
|
9974
|
+
},
|
|
9975
|
+
lg: {
|
|
9976
|
+
root: {
|
|
9977
|
+
"--icon-size": "token(sizes.24)",
|
|
9978
|
+
"--icon-margin": "token(sizes.5)",
|
|
9979
|
+
"--input-icon-padding": "[34px]",
|
|
9980
|
+
"--select-px": "token(sizes.12)",
|
|
9981
|
+
"--select-slot-px": "token(sizes.8)"
|
|
9982
|
+
},
|
|
9983
|
+
content: {
|
|
9984
|
+
py: "7",
|
|
9985
|
+
fontSize: "16"
|
|
9986
|
+
},
|
|
9987
|
+
chips: {
|
|
9988
|
+
gap: "5",
|
|
9989
|
+
py: "0"
|
|
8289
9990
|
}
|
|
8290
9991
|
},
|
|
8291
9992
|
xl: {
|
|
8292
|
-
|
|
9993
|
+
root: {
|
|
9994
|
+
"--icon-size": "token(sizes.28)",
|
|
9995
|
+
"--icon-margin": "token(sizes.7)",
|
|
9996
|
+
"--input-icon-padding": "[42px]",
|
|
9997
|
+
"--select-px": "token(sizes.16)",
|
|
9998
|
+
"--select-slot-px": "token(sizes.10)"
|
|
9999
|
+
},
|
|
10000
|
+
content: {
|
|
8293
10001
|
py: "9",
|
|
8294
|
-
px: "16",
|
|
8295
10002
|
fontSize: "20"
|
|
8296
10003
|
},
|
|
8297
|
-
|
|
8298
|
-
|
|
8299
|
-
|
|
10004
|
+
chips: {
|
|
10005
|
+
gap: "6",
|
|
10006
|
+
py: "2"
|
|
8300
10007
|
}
|
|
8301
|
-
}
|
|
8302
|
-
|
|
10008
|
+
}
|
|
10009
|
+
},
|
|
10010
|
+
before: {
|
|
10011
|
+
true: {
|
|
10012
|
+
content: {
|
|
10013
|
+
ps: "0"
|
|
10014
|
+
}
|
|
10015
|
+
}
|
|
10016
|
+
},
|
|
10017
|
+
multiple: {
|
|
10018
|
+
true: {
|
|
8303
10019
|
trigger: {
|
|
8304
|
-
|
|
8305
|
-
px: "14",
|
|
8306
|
-
fontSize: "16"
|
|
10020
|
+
alignItems: "flex-start"
|
|
8307
10021
|
},
|
|
8308
|
-
|
|
8309
|
-
|
|
8310
|
-
h: "24"
|
|
10022
|
+
content: {
|
|
10023
|
+
alignItems: "flex-start"
|
|
8311
10024
|
}
|
|
8312
|
-
}
|
|
8313
|
-
|
|
10025
|
+
}
|
|
10026
|
+
},
|
|
10027
|
+
autoSize: {
|
|
10028
|
+
true: {
|
|
8314
10029
|
trigger: {
|
|
8315
|
-
|
|
8316
|
-
px: "8",
|
|
8317
|
-
fontSize: "14"
|
|
10030
|
+
height: "auto"
|
|
8318
10031
|
},
|
|
8319
|
-
|
|
8320
|
-
|
|
8321
|
-
|
|
10032
|
+
value: {
|
|
10033
|
+
whiteSpace: "normal",
|
|
10034
|
+
textWrap: "wrap",
|
|
10035
|
+
overflow: "visible",
|
|
10036
|
+
textOverflow: "clip"
|
|
10037
|
+
},
|
|
10038
|
+
placeholder: {
|
|
10039
|
+
whiteSpace: "normal",
|
|
10040
|
+
textWrap: "wrap",
|
|
10041
|
+
overflow: "visible",
|
|
10042
|
+
textOverflow: "clip"
|
|
10043
|
+
},
|
|
10044
|
+
chips: {
|
|
10045
|
+
flexWrap: "wrap",
|
|
10046
|
+
overflowX: "visible",
|
|
10047
|
+
overflowY: "visible"
|
|
10048
|
+
}
|
|
10049
|
+
},
|
|
10050
|
+
false: {
|
|
10051
|
+
chips: {
|
|
10052
|
+
flexWrap: "nowrap"
|
|
8322
10053
|
}
|
|
8323
10054
|
}
|
|
8324
10055
|
}
|
|
8325
10056
|
};
|
|
8326
10057
|
const selectRecipe = defineSlotRecipe({
|
|
8327
10058
|
className: "select",
|
|
8328
|
-
jsx: ["Select"
|
|
8329
|
-
slots: [
|
|
10059
|
+
jsx: ["Select"],
|
|
10060
|
+
slots: [
|
|
10061
|
+
"root",
|
|
10062
|
+
"trigger",
|
|
10063
|
+
"content",
|
|
10064
|
+
"value",
|
|
10065
|
+
"placeholder",
|
|
10066
|
+
"chips",
|
|
10067
|
+
"before",
|
|
10068
|
+
"icon"
|
|
10069
|
+
],
|
|
8330
10070
|
base: selectBase,
|
|
8331
10071
|
variants: selectVariants,
|
|
8332
10072
|
defaultVariants: {
|
|
@@ -8338,7 +10078,7 @@ const spinnerBase = {
|
|
|
8338
10078
|
position: "relative",
|
|
8339
10079
|
display: "grid",
|
|
8340
10080
|
placeContent: "center",
|
|
8341
|
-
zIndex: "
|
|
10081
|
+
zIndex: "raised",
|
|
8342
10082
|
w: "fit",
|
|
8343
10083
|
h: "fit",
|
|
8344
10084
|
flex: "0"
|
|
@@ -8410,6 +10150,163 @@ const spinnerRecipe = defineSlotRecipe({
|
|
|
8410
10150
|
size: "md"
|
|
8411
10151
|
}
|
|
8412
10152
|
});
|
|
10153
|
+
const tabsRecipe = defineSlotRecipe({
|
|
10154
|
+
className: "tabs",
|
|
10155
|
+
jsx: ["Tabs"],
|
|
10156
|
+
slots: ["root", "strip", "list", "tab", "badge", "overflow", "menu", "panel"],
|
|
10157
|
+
base: {
|
|
10158
|
+
root: {
|
|
10159
|
+
...globalBaseStyles,
|
|
10160
|
+
display: "flex",
|
|
10161
|
+
flexDirection: "column",
|
|
10162
|
+
minWidth: "0",
|
|
10163
|
+
width: "full"
|
|
10164
|
+
},
|
|
10165
|
+
strip: {
|
|
10166
|
+
...globalBaseStyles,
|
|
10167
|
+
position: "relative",
|
|
10168
|
+
minWidth: "0",
|
|
10169
|
+
width: "full"
|
|
10170
|
+
},
|
|
10171
|
+
list: {
|
|
10172
|
+
...globalBaseStyles,
|
|
10173
|
+
position: "relative",
|
|
10174
|
+
display: "flex",
|
|
10175
|
+
alignItems: "stretch",
|
|
10176
|
+
flexWrap: "nowrap",
|
|
10177
|
+
// Figma `Tabs` tablist: 8px between tabs, with each tab carrying 6px of
|
|
10178
|
+
// its own inline padding so the underline hugs the label.
|
|
10179
|
+
gap: "8",
|
|
10180
|
+
minWidth: "0",
|
|
10181
|
+
width: "full",
|
|
10182
|
+
// The 1px rule the strip sits on. Each tab's 2px underline overlaps it.
|
|
10183
|
+
borderBottomWidth: "1",
|
|
10184
|
+
borderBottomStyle: "solid",
|
|
10185
|
+
borderBottomColor: "border"
|
|
10186
|
+
},
|
|
10187
|
+
tab: {
|
|
10188
|
+
...globalBaseStyles,
|
|
10189
|
+
position: "relative",
|
|
10190
|
+
display: "inline-flex",
|
|
10191
|
+
alignItems: "center",
|
|
10192
|
+
justifyContent: "center",
|
|
10193
|
+
gap: "6",
|
|
10194
|
+
flexShrink: "0",
|
|
10195
|
+
whiteSpace: "nowrap",
|
|
10196
|
+
appearance: "none",
|
|
10197
|
+
bg: "transparent",
|
|
10198
|
+
cursor: "pointer",
|
|
10199
|
+
px: "6",
|
|
10200
|
+
// 8px above and below the 22px line box, plus the 2px underline, makes
|
|
10201
|
+
// the 40px tab in Figma `_TabsTab`. The 20px badge sits inside the line
|
|
10202
|
+
// box, so showing it never changes the tab's height.
|
|
10203
|
+
py: "8",
|
|
10204
|
+
fontSize: "14",
|
|
10205
|
+
lineHeight: "default",
|
|
10206
|
+
color: "text.subtlest",
|
|
10207
|
+
borderWidth: "0",
|
|
10208
|
+
borderBottomWidth: "2",
|
|
10209
|
+
borderBottomStyle: "solid",
|
|
10210
|
+
borderBottomColor: "transparent",
|
|
10211
|
+
// Pull the 2px underline on top of the list's 1px rule.
|
|
10212
|
+
marginBottom: "-1",
|
|
10213
|
+
transitionProperty: "color, border-color",
|
|
10214
|
+
transitionDuration: "fast",
|
|
10215
|
+
transitionTimingFunction: "default",
|
|
10216
|
+
_hover: {
|
|
10217
|
+
color: "text",
|
|
10218
|
+
borderBottomColor: "border"
|
|
10219
|
+
},
|
|
10220
|
+
_selected: {
|
|
10221
|
+
color: "text",
|
|
10222
|
+
borderBottomColor: "border.bold",
|
|
10223
|
+
// The selected underline does not react to hover.
|
|
10224
|
+
_hover: {
|
|
10225
|
+
borderBottomColor: "border.bold"
|
|
10226
|
+
}
|
|
10227
|
+
},
|
|
10228
|
+
_focusVisible: {
|
|
10229
|
+
outlineWidth: "2",
|
|
10230
|
+
outlineStyle: "solid",
|
|
10231
|
+
outlineColor: "border.focused",
|
|
10232
|
+
outlineOffset: "-2"
|
|
10233
|
+
},
|
|
10234
|
+
_disabled: {
|
|
10235
|
+
color: "text.disabled",
|
|
10236
|
+
cursor: "not-allowed",
|
|
10237
|
+
_hover: {
|
|
10238
|
+
color: "text.disabled",
|
|
10239
|
+
borderBottomColor: "transparent"
|
|
10240
|
+
}
|
|
10241
|
+
},
|
|
10242
|
+
_motionReduce: {
|
|
10243
|
+
transitionDuration: "fastest"
|
|
10244
|
+
}
|
|
10245
|
+
},
|
|
10246
|
+
badge: {
|
|
10247
|
+
display: "inline-flex",
|
|
10248
|
+
alignItems: "center",
|
|
10249
|
+
flexShrink: "0",
|
|
10250
|
+
// Keep the badge from adding a line box of its own to the tab.
|
|
10251
|
+
lineHeight: "none"
|
|
10252
|
+
},
|
|
10253
|
+
overflow: {
|
|
10254
|
+
position: "absolute",
|
|
10255
|
+
insetInlineEnd: "0",
|
|
10256
|
+
top: "0",
|
|
10257
|
+
bottom: "0",
|
|
10258
|
+
display: "inline-flex",
|
|
10259
|
+
alignItems: "center",
|
|
10260
|
+
flexShrink: "0"
|
|
10261
|
+
},
|
|
10262
|
+
menu: {
|
|
10263
|
+
minWidth: "160"
|
|
10264
|
+
},
|
|
10265
|
+
panel: {
|
|
10266
|
+
...globalBaseStyles,
|
|
10267
|
+
color: "text",
|
|
10268
|
+
fontSize: "14",
|
|
10269
|
+
minWidth: "0",
|
|
10270
|
+
_focusVisible: {
|
|
10271
|
+
outlineWidth: "2",
|
|
10272
|
+
outlineStyle: "solid",
|
|
10273
|
+
outlineColor: "border.focused",
|
|
10274
|
+
outlineOffset: "2"
|
|
10275
|
+
}
|
|
10276
|
+
}
|
|
10277
|
+
},
|
|
10278
|
+
variants: {
|
|
10279
|
+
hasOverflow: {
|
|
10280
|
+
false: {
|
|
10281
|
+
overflow: {
|
|
10282
|
+
visibility: "hidden",
|
|
10283
|
+
pointerEvents: "none"
|
|
10284
|
+
}
|
|
10285
|
+
},
|
|
10286
|
+
true: {
|
|
10287
|
+
overflow: {
|
|
10288
|
+
visibility: "visible",
|
|
10289
|
+
pointerEvents: "auto"
|
|
10290
|
+
}
|
|
10291
|
+
}
|
|
10292
|
+
},
|
|
10293
|
+
/** Keeps an overflowed tab measurable while removing it from the strip. */
|
|
10294
|
+
overflowed: {
|
|
10295
|
+
true: {
|
|
10296
|
+
tab: {
|
|
10297
|
+
position: "absolute",
|
|
10298
|
+
visibility: "hidden",
|
|
10299
|
+
pointerEvents: "none",
|
|
10300
|
+
insetInlineStart: "0",
|
|
10301
|
+
top: "0"
|
|
10302
|
+
}
|
|
10303
|
+
}
|
|
10304
|
+
}
|
|
10305
|
+
},
|
|
10306
|
+
defaultVariants: {
|
|
10307
|
+
hasOverflow: false
|
|
10308
|
+
}
|
|
10309
|
+
});
|
|
8413
10310
|
const textInputBase = {
|
|
8414
10311
|
container: {
|
|
8415
10312
|
...globalBaseStyles,
|
|
@@ -8645,7 +10542,7 @@ const timeMenusBase = {
|
|
|
8645
10542
|
top: "0",
|
|
8646
10543
|
textAlign: "center",
|
|
8647
10544
|
fontSize: "12",
|
|
8648
|
-
fontWeight: "
|
|
10545
|
+
fontWeight: "medium",
|
|
8649
10546
|
color: "text.subtlest",
|
|
8650
10547
|
bg: "surface",
|
|
8651
10548
|
py: "4",
|
|
@@ -8690,6 +10587,116 @@ const timeMenusRecipe = defineSlotRecipe({
|
|
|
8690
10587
|
base: timeMenusBase,
|
|
8691
10588
|
variants: timeMenusVariants
|
|
8692
10589
|
});
|
|
10590
|
+
const toastBase = {
|
|
10591
|
+
/**
|
|
10592
|
+
* Fixed, bottom-right stack rendered once by `ToastViewport`. The viewport
|
|
10593
|
+
* itself is click-through so it never covers the page; each toast re-enables
|
|
10594
|
+
* pointer events for its own box.
|
|
10595
|
+
*/
|
|
10596
|
+
viewport: {
|
|
10597
|
+
position: "fixed",
|
|
10598
|
+
left: { base: "24", xs: "auto" },
|
|
10599
|
+
right: "24",
|
|
10600
|
+
bottom: "24",
|
|
10601
|
+
display: "flex",
|
|
10602
|
+
flexDirection: "column",
|
|
10603
|
+
alignItems: "flex-end",
|
|
10604
|
+
gap: "12",
|
|
10605
|
+
maxW: "full",
|
|
10606
|
+
pointerEvents: "none",
|
|
10607
|
+
zIndex: "tooltip"
|
|
10608
|
+
},
|
|
10609
|
+
root: {
|
|
10610
|
+
...globalBaseStyles,
|
|
10611
|
+
display: "flex",
|
|
10612
|
+
alignItems: "flex-start",
|
|
10613
|
+
gap: "8",
|
|
10614
|
+
w: "full",
|
|
10615
|
+
minW: { base: "0", xs: "xs" },
|
|
10616
|
+
maxW: "sm",
|
|
10617
|
+
p: "12",
|
|
10618
|
+
borderRadius: "8",
|
|
10619
|
+
bg: "surface.overlay",
|
|
10620
|
+
boxShadow: "overlay",
|
|
10621
|
+
border: "default",
|
|
10622
|
+
pointerEvents: "auto",
|
|
10623
|
+
animationName: "toastSlideIn",
|
|
10624
|
+
animationDuration: "fast",
|
|
10625
|
+
animationTimingFunction: "out",
|
|
10626
|
+
animationFillMode: "forwards",
|
|
10627
|
+
'&[data-state="closing"]': {
|
|
10628
|
+
animationName: "toastSlideOut"
|
|
10629
|
+
},
|
|
10630
|
+
_motionReduce: {
|
|
10631
|
+
animationName: "none",
|
|
10632
|
+
opacity: "1"
|
|
10633
|
+
}
|
|
10634
|
+
},
|
|
10635
|
+
icon: {
|
|
10636
|
+
display: "flex",
|
|
10637
|
+
alignItems: "center",
|
|
10638
|
+
flex: "none",
|
|
10639
|
+
minH: "18"
|
|
10640
|
+
},
|
|
10641
|
+
content: {
|
|
10642
|
+
display: "flex",
|
|
10643
|
+
flexDirection: "column",
|
|
10644
|
+
gap: "4",
|
|
10645
|
+
flex: "1",
|
|
10646
|
+
minW: "0"
|
|
10647
|
+
},
|
|
10648
|
+
message: {
|
|
10649
|
+
maxW: "full"
|
|
10650
|
+
},
|
|
10651
|
+
actions: {
|
|
10652
|
+
display: "flex",
|
|
10653
|
+
flexWrap: "wrap",
|
|
10654
|
+
alignItems: "center",
|
|
10655
|
+
gap: "8",
|
|
10656
|
+
mt: "4"
|
|
10657
|
+
},
|
|
10658
|
+
dismiss: {
|
|
10659
|
+
flex: "none"
|
|
10660
|
+
}
|
|
10661
|
+
};
|
|
10662
|
+
const toastVariants = {
|
|
10663
|
+
/** Semantic tone. Drives the leading border accent and the tone icon. */
|
|
10664
|
+
tone: {
|
|
10665
|
+
info: {
|
|
10666
|
+
root: { borderLeft: "info", borderLeftWidth: "4" }
|
|
10667
|
+
},
|
|
10668
|
+
success: {
|
|
10669
|
+
root: { borderLeft: "success", borderLeftWidth: "4" }
|
|
10670
|
+
},
|
|
10671
|
+
warning: {
|
|
10672
|
+
root: { borderLeft: "warning", borderLeftWidth: "4" }
|
|
10673
|
+
},
|
|
10674
|
+
danger: {
|
|
10675
|
+
root: { borderLeft: "danger", borderLeftWidth: "4" }
|
|
10676
|
+
},
|
|
10677
|
+
neutral: {
|
|
10678
|
+
root: { borderLeft: "default", borderLeftWidth: "4" }
|
|
10679
|
+
}
|
|
10680
|
+
}
|
|
10681
|
+
};
|
|
10682
|
+
const toastRecipe = defineSlotRecipe({
|
|
10683
|
+
className: "toast",
|
|
10684
|
+
jsx: ["Toast", "ToastViewport"],
|
|
10685
|
+
slots: [
|
|
10686
|
+
"viewport",
|
|
10687
|
+
"root",
|
|
10688
|
+
"icon",
|
|
10689
|
+
"content",
|
|
10690
|
+
"message",
|
|
10691
|
+
"actions",
|
|
10692
|
+
"dismiss"
|
|
10693
|
+
],
|
|
10694
|
+
base: toastBase,
|
|
10695
|
+
variants: toastVariants,
|
|
10696
|
+
defaultVariants: {
|
|
10697
|
+
tone: "neutral"
|
|
10698
|
+
}
|
|
10699
|
+
});
|
|
8693
10700
|
const toggleRecipe = defineSlotRecipe({
|
|
8694
10701
|
className: "toggle",
|
|
8695
10702
|
jsx: ["Toggle"],
|
|
@@ -8700,11 +10707,11 @@ const toggleRecipe = defineSlotRecipe({
|
|
|
8700
10707
|
w: "32",
|
|
8701
10708
|
h: "20",
|
|
8702
10709
|
my: "2",
|
|
8703
|
-
rounded: "
|
|
10710
|
+
rounded: "999",
|
|
8704
10711
|
bg: "surface",
|
|
8705
10712
|
cursor: "pointer",
|
|
8706
10713
|
transitionProperty: "border-color, background-color",
|
|
8707
|
-
transitionDuration: "
|
|
10714
|
+
transitionDuration: "normal",
|
|
8708
10715
|
transitionTimingFunction: "ease-in-out",
|
|
8709
10716
|
borderWidth: "2",
|
|
8710
10717
|
borderStyle: "solid",
|
|
@@ -8723,7 +10730,7 @@ const toggleRecipe = defineSlotRecipe({
|
|
|
8723
10730
|
outlineOffset: "1",
|
|
8724
10731
|
outlineWidth: "2",
|
|
8725
10732
|
outlineStyle: "solid",
|
|
8726
|
-
rounded: "
|
|
10733
|
+
rounded: "999",
|
|
8727
10734
|
w: "32",
|
|
8728
10735
|
h: "20"
|
|
8729
10736
|
}
|
|
@@ -8838,6 +10845,7 @@ const tooltipRecipe = defineSlotRecipe({
|
|
|
8838
10845
|
});
|
|
8839
10846
|
const slotRecipes = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
8840
10847
|
__proto__: null,
|
|
10848
|
+
alertRecipe,
|
|
8841
10849
|
autocompleteRecipe,
|
|
8842
10850
|
avatarRecipe,
|
|
8843
10851
|
badgeRecipe,
|
|
@@ -8846,22 +10854,35 @@ const slotRecipes = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
8846
10854
|
calendarRecipe,
|
|
8847
10855
|
checkboxRecipe,
|
|
8848
10856
|
chipRecipe,
|
|
10857
|
+
codeBlockRecipe,
|
|
8849
10858
|
dateMenusRecipe,
|
|
8850
10859
|
dateTimeMenusRecipe,
|
|
10860
|
+
drawerRecipe,
|
|
10861
|
+
filterFieldRecipe,
|
|
10862
|
+
filterMenuRecipe,
|
|
10863
|
+
filterTokenRecipe,
|
|
8851
10864
|
formFieldRecipe,
|
|
8852
10865
|
iconButtonRecipe,
|
|
10866
|
+
inlineNoteRecipe,
|
|
8853
10867
|
kbdRecipe,
|
|
10868
|
+
keyFactRecipe,
|
|
8854
10869
|
listItemGroupRecipe,
|
|
8855
10870
|
listItemRecipe,
|
|
8856
10871
|
menuRecipe,
|
|
8857
10872
|
modalRecipe,
|
|
10873
|
+
pageBannerRecipe,
|
|
10874
|
+
peekBarRecipe,
|
|
10875
|
+
popoverRecipe,
|
|
10876
|
+
printPreviewRecipe,
|
|
8858
10877
|
radioRecipe,
|
|
8859
10878
|
segmentedFieldsRecipe,
|
|
8860
10879
|
segmentedInputsRecipe,
|
|
8861
10880
|
selectRecipe,
|
|
8862
10881
|
spinnerRecipe,
|
|
10882
|
+
tabsRecipe,
|
|
8863
10883
|
textInputRecipe,
|
|
8864
10884
|
timeMenusRecipe,
|
|
10885
|
+
toastRecipe,
|
|
8865
10886
|
toggleRecipe,
|
|
8866
10887
|
tooltipRecipe
|
|
8867
10888
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -9867,4 +11888,4 @@ export {
|
|
|
9867
11888
|
containerSizes as c,
|
|
9868
11889
|
okshaunPreset as o
|
|
9869
11890
|
};
|
|
9870
|
-
//# sourceMappingURL=preset-
|
|
11891
|
+
//# sourceMappingURL=preset-B6fsdoKY.js.map
|