storybook 10.2.0-alpha.13 → 10.2.0-alpha.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_browser-chunks/{chunk-3PJE6VLG.js → chunk-ASKQZAOS.js} +1 -12
- package/dist/_browser-chunks/{chunk-BGSDJMFM.js → chunk-NVLTWT3B.js} +18 -6
- package/dist/_node-chunks/{builder-manager-YTW4R3NB.js → builder-manager-SOKYB5NF.js} +12 -12
- package/dist/_node-chunks/{camelcase-ALOK3DTL.js → camelcase-SXQWF7PW.js} +7 -7
- package/dist/_node-chunks/{chunk-QV7LTTOW.js → chunk-274OMYGE.js} +20 -20
- package/dist/_node-chunks/{chunk-B3NH4IRY.js → chunk-2BHD5YKF.js} +6 -6
- package/dist/_node-chunks/{chunk-FCBELYHM.js → chunk-2FQAOAQ6.js} +12 -12
- package/dist/_node-chunks/{chunk-NGFKU3PK.js → chunk-45UIB4YF.js} +7 -7
- package/dist/_node-chunks/{chunk-TWCN75ID.js → chunk-4GKVZO2T.js} +9 -9
- package/dist/_node-chunks/{chunk-KXFFKIVX.js → chunk-5KEIALUH.js} +6 -6
- package/dist/_node-chunks/{chunk-AOMUVL33.js → chunk-6SIUW3HU.js} +12 -12
- package/dist/_node-chunks/{chunk-L4JVY7CQ.js → chunk-AIIQJ6UR.js} +7 -7
- package/dist/_node-chunks/{chunk-5CARBEGS.js → chunk-BOY3TNPC.js} +9 -9
- package/dist/_node-chunks/{chunk-TOLCEUYZ.js → chunk-BRW7NFUP.js} +7 -7
- package/dist/_node-chunks/{chunk-ZSUT22UW.js → chunk-E3Y5MHXD.js} +7 -7
- package/dist/_node-chunks/{chunk-QMDFRT4S.js → chunk-ENNDE4GC.js} +10 -10
- package/dist/_node-chunks/{chunk-NL75DTGM.js → chunk-FKBWQGIF.js} +6 -6
- package/dist/_node-chunks/{chunk-NRCGIPSW.js → chunk-HFKM7JHQ.js} +6 -6
- package/dist/_node-chunks/{chunk-OOTLIMKW.js → chunk-K4YVLJRS.js} +6 -6
- package/dist/_node-chunks/{chunk-WKDY7YZY.js → chunk-KNGN3UEO.js} +7 -7
- package/dist/_node-chunks/{chunk-AE6TGTGX.js → chunk-MD52RVZX.js} +7 -7
- package/dist/_node-chunks/chunk-MM7Z4SG7.js +23 -0
- package/dist/_node-chunks/{chunk-XX6B7MPS.js → chunk-MQZLLJRG.js} +8 -8
- package/dist/_node-chunks/{chunk-OWZXELHP.js → chunk-PI7P5HFH.js} +13 -13
- package/dist/_node-chunks/{chunk-VOVBTC53.js → chunk-Q6WUEJ4S.js} +6 -6
- package/dist/_node-chunks/{chunk-2VHYFREG.js → chunk-QPKBPYOY.js} +7 -7
- package/dist/_node-chunks/chunk-RGWB6DD7.js +20 -0
- package/dist/_node-chunks/{chunk-BIJENBOW.js → chunk-SZWIX5YC.js} +9 -9
- package/dist/_node-chunks/{chunk-X2PNK4N4.js → chunk-T57UCO67.js} +7 -7
- package/dist/_node-chunks/{chunk-5E6TIJW7.js → chunk-TN3Q52LO.js} +6 -6
- package/dist/_node-chunks/chunk-TYSSQECX.js +61 -0
- package/dist/_node-chunks/chunk-YP34ARUD.js +18 -0
- package/dist/_node-chunks/{globby-RG2TFVNI.js → globby-LGQ5P2JB.js} +9 -9
- package/dist/_node-chunks/{lib-E2AGGQV3.js → lib-5LBLULG3.js} +7 -7
- package/dist/_node-chunks/{mdx-N42X6CFJ-SGUMZ4YL.js → mdx-N42X6CFJ-TAPL5IEO.js} +8 -8
- package/dist/_node-chunks/{p-limit-J4UZO65T.js → p-limit-GTMOHYQF.js} +7 -7
- package/dist/babel/index.js +10 -10
- package/dist/bin/core.js +12 -12
- package/dist/bin/dispatcher.js +11 -11
- package/dist/bin/loader.js +9 -9
- package/dist/cli/index.d.ts +176 -176
- package/dist/cli/index.js +18 -18
- package/dist/common/index.js +19 -19
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +167 -166
- package/dist/core-events/index.d.ts +4 -4
- package/dist/core-server/index.d.ts +11 -1
- package/dist/core-server/index.js +217 -76
- package/dist/core-server/presets/common-manager.js +176 -134
- package/dist/core-server/presets/common-override-preset.js +9 -9
- package/dist/core-server/presets/common-preset.js +27 -26
- package/dist/csf/index.d.ts +8 -6
- package/dist/csf/index.js +1 -1
- package/dist/csf-tools/index.js +10 -10
- package/dist/docs-tools/index.d.ts +2 -2
- package/dist/manager/globals-runtime.js +97 -94
- package/dist/manager/runtime.js +1755 -985
- package/dist/manager-api/index.d.ts +1 -1
- package/dist/manager-api/index.js +10 -8
- package/dist/mocking-utils/index.js +8 -8
- package/dist/node-logger/index.js +9 -9
- package/dist/preview/runtime.js +18 -6
- package/dist/preview-api/index.js +1 -1
- package/dist/server-errors.js +11 -11
- package/dist/telemetry/index.js +22 -22
- package/dist/types/index.d.ts +12 -6
- package/dist/viewport/index.d.ts +5 -3
- package/dist/viewport/index.js +12 -3
- package/package.json +2 -2
- package/dist/_node-chunks/chunk-5U7IR6W2.js +0 -61
- package/dist/_node-chunks/chunk-JUCUYWH2.js +0 -23
- package/dist/_node-chunks/chunk-KTAHXSER.js +0 -18
- package/dist/_node-chunks/chunk-XQU357NR.js +0 -20
- package/dist/_node-chunks/dist-I4XBT6AL.js +0 -121
package/dist/components/index.js
CHANGED
|
@@ -8774,19 +8774,44 @@ var ActionListItem = styled30.li(
|
|
|
8774
8774
|
justifyContent: "space-between",
|
|
8775
8775
|
flex: "0 0 auto",
|
|
8776
8776
|
overflow: "hidden",
|
|
8777
|
+
minHeight: 32,
|
|
8777
8778
|
gap: 4,
|
|
8778
8779
|
fontSize: theme.typography.size.s1,
|
|
8779
8780
|
fontWeight: active ? theme.typography.weight.bold : theme.typography.weight.regular,
|
|
8780
|
-
color: active ?
|
|
8781
|
-
"--listbox-item-
|
|
8781
|
+
color: active ? "var(--listbox-item-active-color)" : theme.color.defaultText,
|
|
8782
|
+
"--listbox-item-active-color": theme.base === "light" ? curriedDarken$1(0.1, theme.color.secondary) : theme.color.secondary,
|
|
8783
|
+
"--listbox-item-muted-color": active ? "var(--listbox-item-active-color)" : theme.color.mediumdark,
|
|
8784
|
+
'&[aria-disabled="true"]': {
|
|
8785
|
+
opacity: 0.5,
|
|
8786
|
+
cursor: "not-allowed"
|
|
8787
|
+
},
|
|
8788
|
+
'&[aria-selected="true"]': {
|
|
8789
|
+
color: "var(--listbox-item-active-color)",
|
|
8790
|
+
fontWeight: theme.typography.weight.bold,
|
|
8791
|
+
"--listbox-item-muted-color": "var(--listbox-item-active-color)"
|
|
8792
|
+
},
|
|
8782
8793
|
"&:not(:hover, :has(:focus-visible)) svg + input": {
|
|
8783
8794
|
position: "absolute",
|
|
8784
8795
|
opacity: 0
|
|
8785
8796
|
},
|
|
8797
|
+
'&[role="option"]': {
|
|
8798
|
+
cursor: "pointer",
|
|
8799
|
+
borderRadius: theme.input.borderRadius,
|
|
8800
|
+
outlineOffset: -2,
|
|
8801
|
+
padding: "0 9px",
|
|
8802
|
+
gap: 8,
|
|
8803
|
+
"&:hover": {
|
|
8804
|
+
background: curriedTransparentize$1(0.86, theme.color.secondary)
|
|
8805
|
+
},
|
|
8806
|
+
"&:focus-visible": {
|
|
8807
|
+
outline: `2px solid ${theme.color.secondary}`
|
|
8808
|
+
}
|
|
8809
|
+
},
|
|
8786
8810
|
"@supports (interpolate-size: allow-keywords)": {
|
|
8787
8811
|
interpolateSize: "allow-keywords",
|
|
8788
|
-
|
|
8789
|
-
|
|
8812
|
+
transitionBehavior: "allow-discrete",
|
|
8813
|
+
transitionDuration: "var(--transition-duration, 0.2s)",
|
|
8814
|
+
transitionProperty: "opacity, block-size, content-visibility"
|
|
8790
8815
|
},
|
|
8791
8816
|
"@media (prefers-reduced-motion: reduce)": {
|
|
8792
8817
|
transition: "none"
|
|
@@ -8828,12 +8853,13 @@ var ActionListItem = styled30.li(
|
|
|
8828
8853
|
opacity: 0,
|
|
8829
8854
|
paddingInline: 0
|
|
8830
8855
|
}
|
|
8831
|
-
})), StyledButton2 = styled30(Button)({
|
|
8856
|
+
})), StyledButton2 = styled30(Button)(({ size }) => ({
|
|
8857
|
+
gap: size === "small" ? 6 : 8,
|
|
8832
8858
|
"&:focus-visible": {
|
|
8833
8859
|
// Prevent focus outline from being cut off by overflow: hidden
|
|
8834
8860
|
outlineOffset: -2
|
|
8835
8861
|
}
|
|
8836
|
-
}), StyledToggleButton = styled30(ToggleButton)({
|
|
8862
|
+
})), StyledToggleButton = styled30(ToggleButton)({
|
|
8837
8863
|
"&:focus-visible": {
|
|
8838
8864
|
// Prevent focus outline from being cut off by overflow: hidden
|
|
8839
8865
|
outlineOffset: -2
|
|
@@ -8847,6 +8873,8 @@ var ActionListItem = styled30.li(
|
|
|
8847
8873
|
return React16.createElement(StyledToggleButton, { ...props, variant, padding, size, ref });
|
|
8848
8874
|
}
|
|
8849
8875
|
), ActionListAction = styled30(ActionListButton)(({ theme }) => ({
|
|
8876
|
+
height: "auto",
|
|
8877
|
+
minHeight: 32,
|
|
8850
8878
|
flex: "0 1 100%",
|
|
8851
8879
|
textAlign: "start",
|
|
8852
8880
|
justifyContent: "space-between",
|
|
@@ -8862,32 +8890,40 @@ var ActionListItem = styled30.li(
|
|
|
8862
8890
|
outline: `2px solid ${theme.color.secondary}`,
|
|
8863
8891
|
outlineOffset: -2
|
|
8864
8892
|
}
|
|
8865
|
-
})), ActionListLink = (props) => React16.createElement(ActionListAction, { as: "a", ...props }), ActionListText = styled30.div({
|
|
8893
|
+
})), ActionListLink = (props) => React16.createElement(ActionListAction, { as: "a", ...props }), ActionListText = styled30.div(({ theme }) => ({
|
|
8866
8894
|
display: "flex",
|
|
8867
|
-
|
|
8868
|
-
|
|
8895
|
+
flexDirection: "column",
|
|
8896
|
+
justifyContent: "center",
|
|
8869
8897
|
flexGrow: 1,
|
|
8870
8898
|
minWidth: 0,
|
|
8871
8899
|
padding: "8px 0",
|
|
8872
8900
|
lineHeight: "16px",
|
|
8873
|
-
"&
|
|
8901
|
+
"& > *": {
|
|
8902
|
+
margin: 0,
|
|
8903
|
+
whiteSpace: "normal"
|
|
8904
|
+
},
|
|
8905
|
+
"& > span": {
|
|
8874
8906
|
overflow: "hidden",
|
|
8875
8907
|
textOverflow: "ellipsis",
|
|
8876
8908
|
whiteSpace: "nowrap"
|
|
8877
8909
|
},
|
|
8910
|
+
"& small": {
|
|
8911
|
+
fontSize: "inherit",
|
|
8912
|
+
color: theme.textMutedColor
|
|
8913
|
+
},
|
|
8878
8914
|
"&:first-child": {
|
|
8879
8915
|
paddingLeft: 8
|
|
8880
8916
|
},
|
|
8881
8917
|
"&:last-child": {
|
|
8882
8918
|
paddingRight: 8
|
|
8883
8919
|
},
|
|
8884
|
-
|
|
8920
|
+
'button > &:first-child, [role="option"] > &:first-child': {
|
|
8885
8921
|
paddingLeft: 0
|
|
8886
8922
|
},
|
|
8887
|
-
|
|
8923
|
+
'button > &:last-child, [role="option"] > &:last-child': {
|
|
8888
8924
|
paddingRight: 0
|
|
8889
8925
|
}
|
|
8890
|
-
}), ActionListIcon = styled30.div({
|
|
8926
|
+
})), ActionListIcon = styled30.div({
|
|
8891
8927
|
display: "flex",
|
|
8892
8928
|
alignItems: "center",
|
|
8893
8929
|
justifyContent: "center",
|
|
@@ -9299,7 +9335,7 @@ var fadeIn = keyframes2({
|
|
|
9299
9335
|
outline: "none"
|
|
9300
9336
|
}
|
|
9301
9337
|
}),
|
|
9302
|
-
({ width, height, $variant, $status, $transitionDuration }) => $variant === "dialog" ? {
|
|
9338
|
+
({ theme, width, height, $variant, $status, $transitionDuration }) => $variant === "dialog" ? {
|
|
9303
9339
|
top: "50%",
|
|
9304
9340
|
left: "50%",
|
|
9305
9341
|
width: width ?? 740,
|
|
@@ -9319,9 +9355,12 @@ var fadeIn = keyframes2({
|
|
|
9319
9355
|
bottom: "0",
|
|
9320
9356
|
left: "0",
|
|
9321
9357
|
right: "0",
|
|
9358
|
+
borderRadius: "10px 10px 0 0",
|
|
9359
|
+
overflow: "hidden",
|
|
9322
9360
|
width: width ?? "100%",
|
|
9323
9361
|
height: height ?? "80%",
|
|
9324
9362
|
maxWidth: "100%",
|
|
9363
|
+
background: theme.background.content,
|
|
9325
9364
|
"@supports (interpolate-size: allow-keywords)": {
|
|
9326
9365
|
interpolateSize: "allow-keywords"
|
|
9327
9366
|
},
|
|
@@ -9696,9 +9735,9 @@ var ZoomIFrame = class extends Component {
|
|
|
9696
9735
|
setIframeInnerZoom(scale) {
|
|
9697
9736
|
try {
|
|
9698
9737
|
Object.assign(this.iframe.contentDocument.body.style, {
|
|
9699
|
-
width: `${scale * 100}%`,
|
|
9700
|
-
height: `${scale * 100}%`,
|
|
9701
|
-
transform: `scale(${
|
|
9738
|
+
width: `${1 / scale * 100}%`,
|
|
9739
|
+
height: `${1 / scale * 100}%`,
|
|
9740
|
+
transform: `scale(${scale})`,
|
|
9702
9741
|
transformOrigin: "top left"
|
|
9703
9742
|
});
|
|
9704
9743
|
} catch {
|
|
@@ -9707,9 +9746,9 @@ var ZoomIFrame = class extends Component {
|
|
|
9707
9746
|
}
|
|
9708
9747
|
setIframeZoom(scale) {
|
|
9709
9748
|
Object.assign(this.iframe.style, {
|
|
9710
|
-
width: `${scale * 100}%`,
|
|
9711
|
-
height: `${scale * 100}%`,
|
|
9712
|
-
transform: `scale(${
|
|
9749
|
+
width: `${1 / scale * 100}%`,
|
|
9750
|
+
height: `${1 / scale * 100}%`,
|
|
9751
|
+
transform: `scale(${scale})`,
|
|
9713
9752
|
transformOrigin: "top left"
|
|
9714
9753
|
});
|
|
9715
9754
|
}
|
|
@@ -9763,7 +9802,7 @@ ${input}`);
|
|
|
9763
9802
|
// src/components/components/Select/Select.tsx
|
|
9764
9803
|
import React37, { forwardRef as forwardRef12, useCallback as useCallback8, useEffect as useEffect7, useMemo as useMemo4, useRef as useRef7, useState as useState11 } from "react";
|
|
9765
9804
|
import { RefreshIcon } from "@storybook/icons";
|
|
9766
|
-
import { styled as
|
|
9805
|
+
import { styled as styled47, useTheme } from "storybook/theming";
|
|
9767
9806
|
|
|
9768
9807
|
// src/components/components/Form/Form.tsx
|
|
9769
9808
|
import { styled as styled44 } from "storybook/theming";
|
|
@@ -10358,56 +10397,12 @@ Popover.displayName = "Popover";
|
|
|
10358
10397
|
|
|
10359
10398
|
// src/components/components/Select/SelectOption.tsx
|
|
10360
10399
|
import React36 from "react";
|
|
10361
|
-
|
|
10362
|
-
var Item = styled46("li")(({ theme }) => ({
|
|
10363
|
-
padding: "6px 12px",
|
|
10364
|
-
fontSize: 12,
|
|
10365
|
-
lineHeight: 1.5,
|
|
10366
|
-
background: "transparent",
|
|
10367
|
-
color: theme.color.defaultText,
|
|
10368
|
-
cursor: "pointer",
|
|
10369
|
-
borderRadius: 4,
|
|
10370
|
-
'&[aria-disabled="true"]': {
|
|
10371
|
-
opacity: 0.5,
|
|
10372
|
-
cursor: "not-allowed"
|
|
10373
|
-
},
|
|
10374
|
-
'&[aria-selected="true"]': {
|
|
10375
|
-
color: theme.base === "light" ? curriedDarken$1(0.1, theme.color.secondary) : theme.color.secondary,
|
|
10376
|
-
fontWeight: theme.typography.weight.bold
|
|
10377
|
-
},
|
|
10378
|
-
":hover": {
|
|
10379
|
-
background: curriedTransparentize$1(0.93, theme.color.secondary)
|
|
10380
|
-
},
|
|
10381
|
-
":focus-visible": {
|
|
10382
|
-
background: theme.background.hoverable,
|
|
10383
|
-
outline: `2px solid ${theme.barSelectedColor}`,
|
|
10384
|
-
outlineOffset: 1,
|
|
10385
|
-
borderRadius: 2
|
|
10386
|
-
},
|
|
10387
|
-
display: "flex",
|
|
10388
|
-
alignItems: "flex-start",
|
|
10389
|
-
gap: 8
|
|
10390
|
-
})), Row2 = styled46("div")({
|
|
10391
|
-
display: "flex",
|
|
10392
|
-
flexDirection: "row",
|
|
10393
|
-
gap: 4,
|
|
10394
|
-
alignItems: "center"
|
|
10395
|
-
}), Col2 = styled46("div")({
|
|
10396
|
-
display: "flex",
|
|
10397
|
-
flexDirection: "column",
|
|
10398
|
-
flexGrow: 1
|
|
10399
|
-
}), Icon = styled46("span")(() => ({
|
|
10400
|
-
display: "block",
|
|
10401
|
-
height: "1rem",
|
|
10402
|
-
width: "1rem"
|
|
10403
|
-
})), Title3 = styled46("span")(({}) => ({})), Description2 = styled46("span")(({ theme }) => ({
|
|
10404
|
-
fontSize: 11,
|
|
10405
|
-
color: theme.textMutedColor
|
|
10406
|
-
})), SelectOption = ({
|
|
10400
|
+
var SelectOption = ({
|
|
10407
10401
|
id,
|
|
10408
10402
|
title,
|
|
10409
10403
|
description,
|
|
10410
10404
|
icon,
|
|
10405
|
+
aside,
|
|
10411
10406
|
children,
|
|
10412
10407
|
isSelected,
|
|
10413
10408
|
isActive,
|
|
@@ -10417,7 +10412,7 @@ var Item = styled46("li")(({ theme }) => ({
|
|
|
10417
10412
|
shouldLookDisabled = !1,
|
|
10418
10413
|
...props
|
|
10419
10414
|
}) => React36.createElement(
|
|
10420
|
-
Item,
|
|
10415
|
+
ActionList.Item,
|
|
10421
10416
|
{
|
|
10422
10417
|
...props,
|
|
10423
10418
|
id,
|
|
@@ -10429,12 +10424,12 @@ var Item = styled46("li")(({ theme }) => ({
|
|
|
10429
10424
|
onFocus,
|
|
10430
10425
|
onKeyDown
|
|
10431
10426
|
},
|
|
10432
|
-
children ?? React36.createElement(
|
|
10427
|
+
children ?? React36.createElement(React36.Fragment, null, icon && React36.createElement(ActionList.Icon, null, icon), React36.createElement(ActionList.Text, null, React36.createElement("p", null, title), description && React36.createElement("small", null, description)), aside)
|
|
10433
10428
|
);
|
|
10434
10429
|
SelectOption.displayName = "SelectOption";
|
|
10435
10430
|
|
|
10436
10431
|
// src/components/components/Select/helpers.tsx
|
|
10437
|
-
import { styled as
|
|
10432
|
+
import { styled as styled46 } from "storybook/theming";
|
|
10438
10433
|
var PAGE_STEP_SIZE = 5, UNDEFINED_VALUE = Symbol.for("undefined");
|
|
10439
10434
|
function isLiteralValue(value) {
|
|
10440
10435
|
return value == null || typeof value == "string" || typeof value == "number" || typeof value == "boolean" || typeof value == "symbol";
|
|
@@ -10456,7 +10451,7 @@ function valueToExternal(value) {
|
|
|
10456
10451
|
function externalToValue(value) {
|
|
10457
10452
|
return value === void 0 ? UNDEFINED_VALUE : value;
|
|
10458
10453
|
}
|
|
10459
|
-
var Listbox =
|
|
10454
|
+
var Listbox = styled46("ul")({
|
|
10460
10455
|
minWidth: 180,
|
|
10461
10456
|
height: "100%",
|
|
10462
10457
|
borderRadius: 6,
|
|
@@ -10470,7 +10465,7 @@ var Listbox = styled47("ul")({
|
|
|
10470
10465
|
function valueToId(parentId, { value }) {
|
|
10471
10466
|
return `${parentId}-opt-${String(value) ?? "sb-reset"}`;
|
|
10472
10467
|
}
|
|
10473
|
-
var SelectedOptionCount =
|
|
10468
|
+
var SelectedOptionCount = styled47.span(({ theme }) => ({
|
|
10474
10469
|
appearance: "none",
|
|
10475
10470
|
color: theme.textMutedColor,
|
|
10476
10471
|
fontSize: 12
|
|
@@ -10478,13 +10473,13 @@ var SelectedOptionCount = styled48.span(({ theme }) => ({
|
|
|
10478
10473
|
function setSelectedFromDefault(options, defaultOptions) {
|
|
10479
10474
|
return defaultOptions === void 0 ? [] : isLiteralValue(defaultOptions) ? options.filter((opt) => opt.value === defaultOptions).map(optionToInternal) : options.filter((opt) => defaultOptions.some((def) => opt.value === def)).map(optionToInternal);
|
|
10480
10475
|
}
|
|
10481
|
-
var StyledButton3 =
|
|
10476
|
+
var StyledButton3 = styled47(Button)(
|
|
10482
10477
|
({ $isOpen: isOpen, $hasSelection: hasSelection, theme }) => isOpen || hasSelection ? {
|
|
10483
10478
|
boxShadow: "none",
|
|
10484
10479
|
background: curriedTransparentize$1(0.93, theme.barSelectedColor),
|
|
10485
10480
|
color: theme.base === "light" ? curriedDarken$1(0.1, theme.color.secondary) : theme.color.secondary
|
|
10486
10481
|
} : {}
|
|
10487
|
-
), Underlay =
|
|
10482
|
+
), Underlay = styled47.div({
|
|
10488
10483
|
position: "fixed",
|
|
10489
10484
|
inset: 0,
|
|
10490
10485
|
// This will do for now, our popovers use the max z-index of 2147483647. We'll want to
|
|
@@ -10543,12 +10538,16 @@ var StyledButton3 = styled48(Button)(
|
|
|
10543
10538
|
ariaLabel,
|
|
10544
10539
|
...props
|
|
10545
10540
|
}, ref) => {
|
|
10546
|
-
let [isOpen, setIsOpen] = useState11(props.defaultOpen || !1), triggerRef = $df56164dff5785e2$export$4338b53315abf666(ref), id = useMemo4(() => "select-" + Math.random().toString(36).substring(2, 15), []), listboxId = `${id}-listbox`, listboxRef = useRef7(null), otState = $fc909762b330b746$export$61c6a8c84e605fb6({
|
|
10541
|
+
let [isOpen, setIsOpen] = useState11(props.defaultOpen || !1), [shouldRefocusTrigger, setShouldRefocusTrigger] = useState11(!1), triggerRef = $df56164dff5785e2$export$4338b53315abf666(ref), id = useMemo4(() => "select-" + Math.random().toString(36).substring(2, 15), []), listboxId = `${id}-listbox`, listboxRef = useRef7(null), otState = $fc909762b330b746$export$61c6a8c84e605fb6({
|
|
10547
10542
|
isOpen: isOpen && !disabled,
|
|
10548
10543
|
onOpenChange: setIsOpen
|
|
10549
10544
|
}), handleClose = useCallback8(() => {
|
|
10550
|
-
setIsOpen(!1),
|
|
10551
|
-
}, [
|
|
10545
|
+
setIsOpen(!1), setShouldRefocusTrigger(!0);
|
|
10546
|
+
}, []);
|
|
10547
|
+
useEffect7(() => {
|
|
10548
|
+
!otState.isOpen && shouldRefocusTrigger && (triggerRef.current?.focus(), setShouldRefocusTrigger(!1));
|
|
10549
|
+
}, [otState.isOpen, shouldRefocusTrigger, triggerRef]);
|
|
10550
|
+
let [selectedOptions, setSelectedOptions] = useState11(
|
|
10552
10551
|
setSelectedFromDefault(calleeOptions, defaultOptions)
|
|
10553
10552
|
), handleSelectOption = useCallback8(
|
|
10554
10553
|
(option) => {
|
|
@@ -10578,8 +10577,8 @@ var StyledButton3 = styled48(Button)(
|
|
|
10578
10577
|
let [activeOption, setActiveOptionState] = useState11(
|
|
10579
10578
|
void 0
|
|
10580
10579
|
), setActiveOption = useCallback8(
|
|
10581
|
-
(option) => {
|
|
10582
|
-
setActiveOptionState(optionOrResetToInternal(option)), multiSelect
|
|
10580
|
+
(option, changeSelection = !0) => {
|
|
10581
|
+
setActiveOptionState(optionOrResetToInternal(option)), !multiSelect && changeSelection && handleSelectOption(optionOrResetToInternal(option));
|
|
10583
10582
|
},
|
|
10584
10583
|
[multiSelect, handleSelectOption]
|
|
10585
10584
|
), moveActiveOptionDown = useCallback8(
|
|
@@ -10686,6 +10685,7 @@ var StyledButton3 = styled48(Button)(
|
|
|
10686
10685
|
key: option.value === void 0 ? "sb-reset" : String(option.value),
|
|
10687
10686
|
title: option.title,
|
|
10688
10687
|
description: option.description,
|
|
10688
|
+
aside: option.aside,
|
|
10689
10689
|
icon: !isReset && multiSelect ? (
|
|
10690
10690
|
// Purely decorative.
|
|
10691
10691
|
React37.createElement(Form.Checkbox, { checked: isSelected, hidden: !0, role: "presentation" })
|
|
@@ -10696,7 +10696,7 @@ var StyledButton3 = styled48(Button)(
|
|
|
10696
10696
|
onClick: () => {
|
|
10697
10697
|
handleSelectOption(option), multiSelect || handleClose();
|
|
10698
10698
|
},
|
|
10699
|
-
onFocus: () => setActiveOption(externalOption),
|
|
10699
|
+
onFocus: () => setActiveOption(externalOption, !1),
|
|
10700
10700
|
shouldLookDisabled: isReset && selectedOptions.length === 0 && multiSelect,
|
|
10701
10701
|
onKeyDown: (e) => {
|
|
10702
10702
|
e.key === "Enter" || e.key === " " ? (e.preventDefault(), handleSelectOption(option), multiSelect || handleClose()) : e.key === "Tab" && (multiSelect || handleSelectOption(option), handleClose());
|
|
@@ -14294,38 +14294,38 @@ var LazyWithTooltip = lazy2(
|
|
|
14294
14294
|
// src/components/components/tooltip/TooltipMessage.tsx
|
|
14295
14295
|
import React41 from "react";
|
|
14296
14296
|
import { deprecate as deprecate5 } from "storybook/internal/client-logger";
|
|
14297
|
-
import { styled as
|
|
14298
|
-
var
|
|
14297
|
+
import { styled as styled48 } from "storybook/theming";
|
|
14298
|
+
var Title3 = styled48.div(({ theme }) => ({
|
|
14299
14299
|
fontWeight: theme.typography.weight.bold
|
|
14300
|
-
})), Desc2 =
|
|
14300
|
+
})), Desc2 = styled48.span(), Links = styled48.div(({ theme }) => ({
|
|
14301
14301
|
marginTop: 8,
|
|
14302
14302
|
textAlign: "center",
|
|
14303
14303
|
"> *": {
|
|
14304
14304
|
margin: "0 8px",
|
|
14305
14305
|
fontWeight: theme.typography.weight.bold
|
|
14306
14306
|
}
|
|
14307
|
-
})), Message2 =
|
|
14307
|
+
})), Message2 = styled48.div(({ theme }) => ({
|
|
14308
14308
|
color: theme.color.defaultText,
|
|
14309
14309
|
lineHeight: "18px"
|
|
14310
|
-
})), MessageWrapper =
|
|
14310
|
+
})), MessageWrapper = styled48.div({
|
|
14311
14311
|
padding: 15,
|
|
14312
14312
|
width: 280,
|
|
14313
14313
|
boxSizing: "border-box"
|
|
14314
14314
|
}), TooltipMessage = ({ title, desc, links }) => (deprecate5(
|
|
14315
14315
|
"`TooltipMessage` is deprecated and will be removed in Storybook 11, use `Popover` and `PopoverProvider` instead."
|
|
14316
|
-
), React41.createElement(MessageWrapper, { "data-deprecated": "TooltipMessage" }, React41.createElement(Message2, null, title && React41.createElement(
|
|
14316
|
+
), React41.createElement(MessageWrapper, { "data-deprecated": "TooltipMessage" }, React41.createElement(Message2, null, title && React41.createElement(Title3, null, title), desc && React41.createElement(Desc2, null, desc)), links && React41.createElement(Links, null, links.map(({ title: linkTitle, ...other }) => React41.createElement(Link2, { ...other, key: linkTitle }, linkTitle)))));
|
|
14317
14317
|
|
|
14318
14318
|
// src/components/components/tooltip/TooltipLinkList.tsx
|
|
14319
14319
|
import React43, { Fragment as Fragment4, useCallback as useCallback10 } from "react";
|
|
14320
14320
|
import { deprecate as deprecate7 } from "storybook/internal/client-logger";
|
|
14321
|
-
import { styled as
|
|
14321
|
+
import { styled as styled50 } from "storybook/theming";
|
|
14322
14322
|
|
|
14323
14323
|
// src/components/components/tooltip/ListItem.tsx
|
|
14324
14324
|
var import_memoizerific2 = __toESM(require_memoizerific(), 1);
|
|
14325
14325
|
import React42, { forwardRef as forwardRef14 } from "react";
|
|
14326
14326
|
import { deprecate as deprecate6 } from "storybook/internal/client-logger";
|
|
14327
|
-
import { styled as
|
|
14328
|
-
var
|
|
14327
|
+
import { styled as styled49 } from "storybook/theming";
|
|
14328
|
+
var Title4 = styled49(({ active, loading, disabled, ...rest }) => React42.createElement("span", { ...rest }))(
|
|
14329
14329
|
({ theme }) => ({
|
|
14330
14330
|
color: theme.color.defaultText,
|
|
14331
14331
|
// Previously was theme.typography.weight.normal but this weight does not exists in Theme
|
|
@@ -14343,7 +14343,7 @@ var Title5 = styled50(({ active, loading, disabled, ...rest }) => React42.create
|
|
|
14343
14343
|
({ disabled, theme }) => disabled ? {
|
|
14344
14344
|
color: theme.textMutedColor
|
|
14345
14345
|
} : {}
|
|
14346
|
-
), Right =
|
|
14346
|
+
), Right = styled49.span({
|
|
14347
14347
|
display: "flex",
|
|
14348
14348
|
"& svg": {
|
|
14349
14349
|
height: 12,
|
|
@@ -14351,7 +14351,7 @@ var Title5 = styled50(({ active, loading, disabled, ...rest }) => React42.create
|
|
|
14351
14351
|
margin: "3px 0",
|
|
14352
14352
|
verticalAlign: "top"
|
|
14353
14353
|
}
|
|
14354
|
-
}), Center =
|
|
14354
|
+
}), Center = styled49.span(
|
|
14355
14355
|
{
|
|
14356
14356
|
flex: 1,
|
|
14357
14357
|
textAlign: "left",
|
|
@@ -14361,7 +14361,7 @@ var Title5 = styled50(({ active, loading, disabled, ...rest }) => React42.create
|
|
|
14361
14361
|
// required for overflow
|
|
14362
14362
|
},
|
|
14363
14363
|
({ isIndented }) => isIndented ? { marginLeft: 24 } : {}
|
|
14364
|
-
), CenterText =
|
|
14364
|
+
), CenterText = styled49.span(
|
|
14365
14365
|
({ theme }) => ({
|
|
14366
14366
|
fontSize: "11px",
|
|
14367
14367
|
lineHeight: "14px"
|
|
@@ -14372,7 +14372,7 @@ var Title5 = styled50(({ active, loading, disabled, ...rest }) => React42.create
|
|
|
14372
14372
|
({ theme, disabled }) => disabled ? {
|
|
14373
14373
|
color: theme.textMutedColor
|
|
14374
14374
|
} : {}
|
|
14375
|
-
), Left =
|
|
14375
|
+
), Left = styled49.span(
|
|
14376
14376
|
({ active, theme }) => active ? {
|
|
14377
14377
|
color: theme.color.secondary
|
|
14378
14378
|
} : {},
|
|
@@ -14380,7 +14380,7 @@ var Title5 = styled50(({ active, loading, disabled, ...rest }) => React42.create
|
|
|
14380
14380
|
display: "flex",
|
|
14381
14381
|
maxWidth: 14
|
|
14382
14382
|
})
|
|
14383
|
-
),
|
|
14383
|
+
), Item = styled49.button(
|
|
14384
14384
|
({ theme }) => ({
|
|
14385
14385
|
width: "100%",
|
|
14386
14386
|
minWidth: 0,
|
|
@@ -14459,13 +14459,13 @@ var Title5 = styled50(({ active, loading, disabled, ...rest }) => React42.create
|
|
|
14459
14459
|
} = props, commonProps = { active, disabled }, itemProps = getItemProps(props), left = icon || input;
|
|
14460
14460
|
return deprecate6(
|
|
14461
14461
|
"`ListItem` is deprecated and will be removed in Storybook 11, use `MenuItem` instead."
|
|
14462
|
-
), React42.createElement(
|
|
14462
|
+
), React42.createElement(Item, { "data-deprecated": "ListItem", ref, ...rest, ...commonProps, ...itemProps }, React42.createElement(React42.Fragment, null, left && React42.createElement(Left, { ...commonProps }, left), title || center ? React42.createElement(Center, { isIndented: isIndented && !left }, title && React42.createElement(Title4, { ...commonProps, loading }, title), center && React42.createElement(CenterText, { ...commonProps }, center)) : null, right && React42.createElement(Right, { ...commonProps }, right)));
|
|
14463
14463
|
});
|
|
14464
14464
|
ListItem.displayName = "ListItem";
|
|
14465
14465
|
var ListItem_default = ListItem;
|
|
14466
14466
|
|
|
14467
14467
|
// src/components/components/tooltip/TooltipLinkList.tsx
|
|
14468
|
-
var List =
|
|
14468
|
+
var List = styled50.div(
|
|
14469
14469
|
{
|
|
14470
14470
|
minWidth: 180,
|
|
14471
14471
|
overflow: "hidden",
|
|
@@ -14477,12 +14477,12 @@ var List = styled51.div(
|
|
|
14477
14477
|
borderRadius: theme.appBorderRadius + 2
|
|
14478
14478
|
}),
|
|
14479
14479
|
({ theme }) => theme.base === "dark" ? { background: theme.background.content } : {}
|
|
14480
|
-
), Group =
|
|
14480
|
+
), Group = styled50.div(({ theme }) => ({
|
|
14481
14481
|
padding: 4,
|
|
14482
14482
|
"& + &": {
|
|
14483
14483
|
borderTop: `1px solid ${theme.appBorderColor}`
|
|
14484
14484
|
}
|
|
14485
|
-
})),
|
|
14485
|
+
})), Item2 = ({ id, onClick, ...rest }) => {
|
|
14486
14486
|
let { active, disabled, title, href } = rest, handleClick = useCallback10(
|
|
14487
14487
|
(event) => onClick?.(event, { id, active, disabled, title, href }),
|
|
14488
14488
|
[onClick, id, active, disabled, title, href]
|
|
@@ -14495,20 +14495,20 @@ var List = styled51.div(
|
|
|
14495
14495
|
let groups = Array.isArray(links[0]) ? links : [links], isIndented = groups.some(
|
|
14496
14496
|
(group) => group.some((link) => "icon" in link && link.icon || "input" in link && link.input)
|
|
14497
14497
|
);
|
|
14498
|
-
return React43.createElement(List, { "data-deprecated": "TooltipLinkList", ...props, className: "sb-list" }, groups.filter((group) => group.length).map((group, index3) => React43.createElement(Group, { key: group.map((link) => link.id).join(`~${index3}~`) }, group.map((link) => "content" in link ? React43.createElement(Fragment4, { key: link.id }, link.content) : React43.createElement(
|
|
14498
|
+
return React43.createElement(List, { "data-deprecated": "TooltipLinkList", ...props, className: "sb-list" }, groups.filter((group) => group.length).map((group, index3) => React43.createElement(Group, { key: group.map((link) => link.id).join(`~${index3}~`) }, group.map((link) => "content" in link ? React43.createElement(Fragment4, { key: link.id }, link.content) : React43.createElement(Item2, { key: link.id, isIndented, LinkWrapper, ...link })))));
|
|
14499
14499
|
};
|
|
14500
14500
|
|
|
14501
14501
|
// src/components/components/Tabs/Tabs.tsx
|
|
14502
14502
|
import React49, { Component as Component2, forwardRef as forwardRef17, memo, useMemo as useMemo5 } from "react";
|
|
14503
14503
|
import { deprecate as deprecate12 } from "storybook/internal/client-logger";
|
|
14504
14504
|
import { sanitize as sanitize2 } from "storybook/internal/csf";
|
|
14505
|
-
import { styled as
|
|
14505
|
+
import { styled as styled56 } from "storybook/theming";
|
|
14506
14506
|
|
|
14507
14507
|
// src/components/components/Bar/Bar.tsx
|
|
14508
14508
|
import React44, { Children as Children4, forwardRef as forwardRef15 } from "react";
|
|
14509
14509
|
import { deprecate as deprecate8 } from "storybook/internal/client-logger";
|
|
14510
|
-
import { styled as
|
|
14511
|
-
var StyledBar =
|
|
14510
|
+
import { styled as styled51 } from "storybook/theming";
|
|
14511
|
+
var StyledBar = styled51.div(
|
|
14512
14512
|
({ backgroundColor, border = !1, innerStyle = {}, scrollable, theme }) => ({
|
|
14513
14513
|
color: theme.barTextColor,
|
|
14514
14514
|
width: "100%",
|
|
@@ -14530,7 +14530,7 @@ var StyledBar = styled52.div(
|
|
|
14530
14530
|
} : {},
|
|
14531
14531
|
...innerStyle
|
|
14532
14532
|
})
|
|
14533
|
-
), HeightPreserver =
|
|
14533
|
+
), HeightPreserver = styled51.div(({ innerStyle }) => ({
|
|
14534
14534
|
minHeight: 40,
|
|
14535
14535
|
display: "flex",
|
|
14536
14536
|
alignItems: "center",
|
|
@@ -14551,7 +14551,7 @@ var StyledBar = styled52.div(
|
|
|
14551
14551
|
)
|
|
14552
14552
|
);
|
|
14553
14553
|
Bar.displayName = "Bar";
|
|
14554
|
-
var Side =
|
|
14554
|
+
var Side = styled51.div(
|
|
14555
14555
|
{
|
|
14556
14556
|
display: "flex",
|
|
14557
14557
|
whiteSpace: "nowrap",
|
|
@@ -14570,7 +14570,7 @@ var Side = styled52.div(
|
|
|
14570
14570
|
} : {}
|
|
14571
14571
|
);
|
|
14572
14572
|
Side.displayName = "Side";
|
|
14573
|
-
var BarInner =
|
|
14573
|
+
var BarInner = styled51.div(({ bgColor }) => ({
|
|
14574
14574
|
display: "flex",
|
|
14575
14575
|
justifyContent: "space-between",
|
|
14576
14576
|
position: "relative",
|
|
@@ -14579,7 +14579,7 @@ var BarInner = styled52.div(({ bgColor }) => ({
|
|
|
14579
14579
|
height: 40,
|
|
14580
14580
|
width: "100%",
|
|
14581
14581
|
backgroundColor: bgColor || ""
|
|
14582
|
-
})), BarWithoutPadding =
|
|
14582
|
+
})), BarWithoutPadding = styled51(Bar)({
|
|
14583
14583
|
paddingInline: 0
|
|
14584
14584
|
}), FlexBar = ({ children, backgroundColor, className = "", ...rest }) => {
|
|
14585
14585
|
deprecate8('FlexBar is deprecated. Use Bar with justifyContent: "space-between" instead.');
|
|
@@ -14600,7 +14600,7 @@ FlexBar.displayName = "FlexBar";
|
|
|
14600
14600
|
// src/components/components/Tabs/Button.tsx
|
|
14601
14601
|
import React45, { forwardRef as forwardRef16 } from "react";
|
|
14602
14602
|
import { deprecate as deprecate9 } from "storybook/internal/client-logger";
|
|
14603
|
-
import { isPropValid as isPropValid2, styled as
|
|
14603
|
+
import { isPropValid as isPropValid2, styled as styled52 } from "storybook/theming";
|
|
14604
14604
|
var isLink = (obj) => typeof obj.props.href == "string", isButton = (obj) => typeof obj.props.href != "string";
|
|
14605
14605
|
function ForwardRefFunction({ children, ...rest }, ref) {
|
|
14606
14606
|
let o = { props: rest, ref };
|
|
@@ -14612,7 +14612,7 @@ function ForwardRefFunction({ children, ...rest }, ref) {
|
|
|
14612
14612
|
}
|
|
14613
14613
|
var ButtonOrLink = forwardRef16(ForwardRefFunction);
|
|
14614
14614
|
ButtonOrLink.displayName = "ButtonOrLink";
|
|
14615
|
-
var StyledTabButton =
|
|
14615
|
+
var StyledTabButton = styled52(ButtonOrLink, { shouldForwardProp: isPropValid2 })(
|
|
14616
14616
|
{
|
|
14617
14617
|
whiteSpace: "normal",
|
|
14618
14618
|
display: "inline-flex",
|
|
@@ -14661,8 +14661,8 @@ TabButton.displayName = "TabButton";
|
|
|
14661
14661
|
|
|
14662
14662
|
// src/components/components/Tabs/EmptyTabContent.tsx
|
|
14663
14663
|
import React46 from "react";
|
|
14664
|
-
import { styled as
|
|
14665
|
-
var Wrapper3 =
|
|
14664
|
+
import { styled as styled53 } from "storybook/theming";
|
|
14665
|
+
var Wrapper3 = styled53.div(({ theme }) => ({
|
|
14666
14666
|
height: "100%",
|
|
14667
14667
|
display: "flex",
|
|
14668
14668
|
padding: 30,
|
|
@@ -14671,30 +14671,30 @@ var Wrapper3 = styled54.div(({ theme }) => ({
|
|
|
14671
14671
|
flexDirection: "column",
|
|
14672
14672
|
gap: 15,
|
|
14673
14673
|
background: theme.background.content
|
|
14674
|
-
})), Content2 =
|
|
14674
|
+
})), Content2 = styled53.div({
|
|
14675
14675
|
display: "flex",
|
|
14676
14676
|
flexDirection: "column",
|
|
14677
14677
|
gap: 4,
|
|
14678
14678
|
maxWidth: 415
|
|
14679
|
-
}),
|
|
14679
|
+
}), Title5 = styled53.div(({ theme }) => ({
|
|
14680
14680
|
fontWeight: theme.typography.weight.bold,
|
|
14681
14681
|
fontSize: theme.typography.size.s2 - 1,
|
|
14682
14682
|
textAlign: "center",
|
|
14683
14683
|
color: theme.color.defaultText
|
|
14684
|
-
})), Footer =
|
|
14684
|
+
})), Footer = styled53.div(({ theme }) => ({
|
|
14685
14685
|
fontSize: theme.typography.size.s2 - 1
|
|
14686
|
-
})),
|
|
14686
|
+
})), Description2 = styled53.div(({ theme }) => ({
|
|
14687
14687
|
fontWeight: theme.typography.weight.regular,
|
|
14688
14688
|
fontSize: theme.typography.size.s2 - 1,
|
|
14689
14689
|
textAlign: "center",
|
|
14690
14690
|
color: theme.textMutedColor
|
|
14691
|
-
})), EmptyTabContent = ({ title, description, footer }) => React46.createElement(Wrapper3, null, React46.createElement(Content2, null, React46.createElement(
|
|
14691
|
+
})), EmptyTabContent = ({ title, description, footer }) => React46.createElement(Wrapper3, null, React46.createElement(Content2, null, React46.createElement(Title5, null, title), description && React46.createElement(Description2, null, description)), footer && React46.createElement(Footer, null, footer));
|
|
14692
14692
|
|
|
14693
14693
|
// src/components/components/Tabs/Tabs.helpers.tsx
|
|
14694
14694
|
import React47, { Children as Children5 } from "react";
|
|
14695
14695
|
import { deprecate as deprecate10 } from "storybook/internal/client-logger";
|
|
14696
|
-
import { styled as
|
|
14697
|
-
var VisuallyHidden =
|
|
14696
|
+
import { styled as styled54 } from "storybook/theming";
|
|
14697
|
+
var VisuallyHidden = styled54.div(
|
|
14698
14698
|
({ active }) => active ? { display: "block" } : { display: "none" }
|
|
14699
14699
|
), childrenToList = (children) => (deprecate10("The `childrenToList` tabs helper is deprecated. Use `TabsView` instead."), Children5.toArray(children).map(
|
|
14700
14700
|
// @ts-expect-error (non strict)
|
|
@@ -14717,8 +14717,8 @@ var VisuallyHidden = styled55.div(
|
|
|
14717
14717
|
import React48, { useCallback as useCallback11, useLayoutEffect as useLayoutEffect3, useRef as useRef8, useState as useState13 } from "react";
|
|
14718
14718
|
import { deprecate as deprecate11 } from "storybook/internal/client-logger";
|
|
14719
14719
|
import { sanitize } from "storybook/internal/csf";
|
|
14720
|
-
import { styled as
|
|
14721
|
-
var CollapseIcon =
|
|
14720
|
+
import { styled as styled55 } from "storybook/theming";
|
|
14721
|
+
var CollapseIcon = styled55.span(({ theme, isActive }) => ({
|
|
14722
14722
|
display: "inline-block",
|
|
14723
14723
|
width: 0,
|
|
14724
14724
|
height: 0,
|
|
@@ -14728,7 +14728,7 @@ var CollapseIcon = styled56.span(({ theme, isActive }) => ({
|
|
|
14728
14728
|
borderLeft: "3px solid transparent",
|
|
14729
14729
|
borderTop: "3px solid",
|
|
14730
14730
|
transition: "transform .1s ease-out"
|
|
14731
|
-
})), AddonButton =
|
|
14731
|
+
})), AddonButton = styled55(TabButton)(({ active, theme, preActive }) => `
|
|
14732
14732
|
color: ${preActive || active ? theme.barSelectedColor : theme.barTextColor};
|
|
14733
14733
|
.addon-collapsible-icon {
|
|
14734
14734
|
color: ${preActive || active ? theme.barSelectedColor : theme.barTextColor};
|
|
@@ -14837,7 +14837,7 @@ function useList(list) {
|
|
|
14837
14837
|
}
|
|
14838
14838
|
|
|
14839
14839
|
// src/components/components/Tabs/Tabs.tsx
|
|
14840
|
-
var ignoreSsrWarning2 = "/* emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason */", Wrapper4 =
|
|
14840
|
+
var ignoreSsrWarning2 = "/* emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason */", Wrapper4 = styled56.div(
|
|
14841
14841
|
({ theme, bordered }) => bordered ? {
|
|
14842
14842
|
backgroundClip: "padding-box",
|
|
14843
14843
|
border: `1px solid ${theme.appBorderColor}`,
|
|
@@ -14854,7 +14854,7 @@ var ignoreSsrWarning2 = "/* emotion-disable-server-rendering-unsafe-selector-war
|
|
|
14854
14854
|
} : {
|
|
14855
14855
|
display: "block"
|
|
14856
14856
|
}
|
|
14857
|
-
), StyledTabBar =
|
|
14857
|
+
), StyledTabBar = styled56.div({
|
|
14858
14858
|
overflow: "hidden",
|
|
14859
14859
|
"&:first-of-type": {
|
|
14860
14860
|
marginLeft: -3
|
|
@@ -14865,7 +14865,7 @@ var ignoreSsrWarning2 = "/* emotion-disable-server-rendering-unsafe-selector-war
|
|
|
14865
14865
|
(props, ref) => (deprecate12("The `TabBar` component is deprecated. Use `TabsView` instead."), React49.createElement(StyledTabBar, { "data-deprecated": "TabBar", ...props, ref }))
|
|
14866
14866
|
);
|
|
14867
14867
|
TabBar.displayName = "TabBar";
|
|
14868
|
-
var Content3 =
|
|
14868
|
+
var Content3 = styled56.div(
|
|
14869
14869
|
{
|
|
14870
14870
|
display: "block",
|
|
14871
14871
|
position: "relative",
|
|
@@ -15009,9 +15009,10 @@ TabsState.defaultProps = {
|
|
|
15009
15009
|
|
|
15010
15010
|
// src/components/components/Bar/Separator.tsx
|
|
15011
15011
|
import React50, { Fragment as Fragment5 } from "react";
|
|
15012
|
-
import { styled as
|
|
15013
|
-
var Separator2 =
|
|
15012
|
+
import { styled as styled57 } from "storybook/theming";
|
|
15013
|
+
var Separator2 = styled57.span(
|
|
15014
15014
|
({ theme }) => ({
|
|
15015
|
+
display: "inline-block",
|
|
15015
15016
|
width: 1,
|
|
15016
15017
|
height: 20,
|
|
15017
15018
|
background: theme.appBorderColor,
|
|
@@ -15032,7 +15033,7 @@ var interleaveSeparators = (list) => list.reduce(
|
|
|
15032
15033
|
|
|
15033
15034
|
// src/components/components/addon-panel/addon-panel.tsx
|
|
15034
15035
|
import React51, { useEffect as useEffect8, useRef as useRef9 } from "react";
|
|
15035
|
-
import { styled as
|
|
15036
|
+
import { styled as styled58 } from "storybook/theming";
|
|
15036
15037
|
var usePrevious = (value) => {
|
|
15037
15038
|
let ref = useRef9();
|
|
15038
15039
|
return useEffect8(() => {
|
|
@@ -15041,7 +15042,7 @@ var usePrevious = (value) => {
|
|
|
15041
15042
|
}, useUpdate = (update, value) => {
|
|
15042
15043
|
let previousValue = usePrevious(value);
|
|
15043
15044
|
return update ? value : previousValue;
|
|
15044
|
-
}, Div2 =
|
|
15045
|
+
}, Div2 = styled58.div(({ theme }) => ({
|
|
15045
15046
|
fontSize: theme.typography.size.s2 - 1,
|
|
15046
15047
|
height: "100%"
|
|
15047
15048
|
})), AddonPanel = ({ active, children, hasScrollbar = !0 }) => (
|
|
@@ -15271,8 +15272,8 @@ function $58d314389b21fa3f$export$773e389e644c5874(props, state, ref) {
|
|
|
15271
15272
|
}
|
|
15272
15273
|
|
|
15273
15274
|
// src/components/components/Tabs/TabList.tsx
|
|
15274
|
-
import { styled as
|
|
15275
|
-
var StyledTabButton2 =
|
|
15275
|
+
import { styled as styled59 } from "storybook/theming";
|
|
15276
|
+
var StyledTabButton2 = styled59.button(
|
|
15276
15277
|
{
|
|
15277
15278
|
whiteSpace: "normal",
|
|
15278
15279
|
display: "inline-flex",
|
|
@@ -15317,13 +15318,13 @@ var StyledTabButton2 = styled60.button(
|
|
|
15317
15318
|
color: theme.barHoverColor
|
|
15318
15319
|
}
|
|
15319
15320
|
}
|
|
15320
|
-
), TabListContainer =
|
|
15321
|
+
), TabListContainer = styled59.div({
|
|
15321
15322
|
display: "flex",
|
|
15322
15323
|
alignItems: "center",
|
|
15323
15324
|
flexShrink: 0,
|
|
15324
15325
|
position: "relative",
|
|
15325
15326
|
overflow: "hidden"
|
|
15326
|
-
}), ScrollContainer =
|
|
15327
|
+
}), ScrollContainer = styled59.div({
|
|
15327
15328
|
display: "flex",
|
|
15328
15329
|
overflowX: "auto",
|
|
15329
15330
|
scrollbarWidth: "none",
|
|
@@ -15334,17 +15335,17 @@ var StyledTabButton2 = styled60.button(
|
|
|
15334
15335
|
"&::-webkit-scrollbar": {
|
|
15335
15336
|
display: "none"
|
|
15336
15337
|
}
|
|
15337
|
-
}), StyledTabList =
|
|
15338
|
+
}), StyledTabList = styled59.div({
|
|
15338
15339
|
display: "flex",
|
|
15339
15340
|
flexShrink: 0
|
|
15340
|
-
}), SCROLL_BUTTON_WIDTH = 28, ScrollButtonContainer =
|
|
15341
|
+
}), SCROLL_BUTTON_WIDTH = 28, ScrollButtonContainer = styled59.div(({ $showStartBorder, $showEndBorder, theme }) => ({
|
|
15341
15342
|
flexShrink: 0,
|
|
15342
15343
|
display: "flex",
|
|
15343
15344
|
alignItems: "center",
|
|
15344
15345
|
justifyContent: "center",
|
|
15345
15346
|
padding: 6,
|
|
15346
15347
|
boxShadow: $showStartBorder ? `inset 1px 0 0 ${theme.appBorderColor}` : $showEndBorder ? `inset -1px 0 0 ${theme.appBorderColor}` : "none"
|
|
15347
|
-
})), ScrollButton =
|
|
15348
|
+
})), ScrollButton = styled59(Button)({
|
|
15348
15349
|
flexShrink: 0,
|
|
15349
15350
|
paddingInline: 0,
|
|
15350
15351
|
width: 16
|
|
@@ -15424,8 +15425,8 @@ var StyledTabButton2 = styled60.button(
|
|
|
15424
15425
|
|
|
15425
15426
|
// src/components/components/Tabs/TabPanel.tsx
|
|
15426
15427
|
import React54, { useRef as useRef12 } from "react";
|
|
15427
|
-
import { styled as
|
|
15428
|
-
var Panel =
|
|
15428
|
+
import { styled as styled60 } from "storybook/theming";
|
|
15429
|
+
var Panel = styled60.div({
|
|
15429
15430
|
overflowY: "hidden",
|
|
15430
15431
|
height: "100%"
|
|
15431
15432
|
}), TabPanel = ({
|
|
@@ -15638,25 +15639,25 @@ function $76f919a04c5a7d14$var$findDefaultSelectedKey(collection, disabledKeys)
|
|
|
15638
15639
|
}
|
|
15639
15640
|
|
|
15640
15641
|
// src/components/components/Tabs/TabsView.tsx
|
|
15641
|
-
import { styled as
|
|
15642
|
+
import { styled as styled61 } from "storybook/theming";
|
|
15642
15643
|
var useTabsState = ({
|
|
15643
15644
|
defaultSelected,
|
|
15644
15645
|
onSelectionChange,
|
|
15645
15646
|
selected,
|
|
15646
15647
|
tabs
|
|
15647
15648
|
}) => $76f919a04c5a7d14$export$4ba071daf4e486({
|
|
15648
|
-
children: tabs.map(({ children: Children6, id, "aria-label": ariaLabel, title:
|
|
15649
|
+
children: tabs.map(({ children: Children6, id, "aria-label": ariaLabel, title: Title6 }) => React55.createElement($c1d7fb2ec91bae71$export$6d08773d2e66f8f2, { key: id, "aria-label": ariaLabel, title: typeof Title6 == "function" ? React55.createElement(Title6, null) : Title6 }, typeof Children6 == "function" ? React55.createElement(Children6, null) : Children6)),
|
|
15649
15650
|
disabledKeys: tabs.filter(({ isDisabled }) => isDisabled).map(({ id }) => id),
|
|
15650
15651
|
defaultSelectedKey: defaultSelected,
|
|
15651
15652
|
onSelectionChange: (key) => onSelectionChange?.(`${key}`),
|
|
15652
15653
|
selectedKey: selected
|
|
15653
|
-
}), Container4 =
|
|
15654
|
+
}), Container4 = styled61.div({
|
|
15654
15655
|
display: "flex",
|
|
15655
15656
|
flexDirection: "column",
|
|
15656
15657
|
height: "100%"
|
|
15657
|
-
}), FlexTabPanel =
|
|
15658
|
+
}), FlexTabPanel = styled61(TabPanel)(() => ({
|
|
15658
15659
|
flex: 1
|
|
15659
|
-
})), FlexTabList =
|
|
15660
|
+
})), FlexTabList = styled61(TabList)(({ $simulatedGap }) => ({
|
|
15660
15661
|
flex: "1 1 0%",
|
|
15661
15662
|
'&[data-show-scroll-buttons="true"]': { marginInlineEnd: $simulatedGap }
|
|
15662
15663
|
})), TabsView = ({
|
|
@@ -15885,14 +15886,14 @@ var $5e8ad37a45e1c704$export$3e41faf802a29e71 = $e1995378a142960e$export$18af5c7
|
|
|
15885
15886
|
});
|
|
15886
15887
|
|
|
15887
15888
|
// src/components/components/Tabs/StatelessTabList.tsx
|
|
15888
|
-
import { styled as
|
|
15889
|
-
var Root =
|
|
15889
|
+
import { styled as styled62 } from "storybook/theming";
|
|
15890
|
+
var Root = styled62.div({
|
|
15890
15891
|
display: "flex",
|
|
15891
15892
|
alignItems: "center",
|
|
15892
15893
|
flexShrink: 0,
|
|
15893
15894
|
position: "relative",
|
|
15894
15895
|
overflow: "hidden"
|
|
15895
|
-
}), ScrollContainer2 =
|
|
15896
|
+
}), ScrollContainer2 = styled62.div({
|
|
15896
15897
|
display: "flex",
|
|
15897
15898
|
overflowX: "auto",
|
|
15898
15899
|
scrollbarWidth: "none",
|
|
@@ -15903,17 +15904,17 @@ var Root = styled63.div({
|
|
|
15903
15904
|
"&::-webkit-scrollbar": {
|
|
15904
15905
|
display: "none"
|
|
15905
15906
|
}
|
|
15906
|
-
}), StyledTabList2 =
|
|
15907
|
+
}), StyledTabList2 = styled62($5e8ad37a45e1c704$export$e51a686c67fdaa2d)({
|
|
15907
15908
|
display: "flex",
|
|
15908
15909
|
flexShrink: 0
|
|
15909
|
-
}), SCROLL_BUTTON_WIDTH2 = 28, ScrollButtonContainer2 =
|
|
15910
|
+
}), SCROLL_BUTTON_WIDTH2 = 28, ScrollButtonContainer2 = styled62.div(({ $showStartBorder, $showEndBorder, theme }) => ({
|
|
15910
15911
|
flexShrink: 0,
|
|
15911
15912
|
display: "flex",
|
|
15912
15913
|
alignItems: "center",
|
|
15913
15914
|
justifyContent: "center",
|
|
15914
15915
|
padding: 6,
|
|
15915
15916
|
boxShadow: $showStartBorder ? `inset 1px 0 0 ${theme.appBorderColor}` : $showEndBorder ? `inset -1px 0 0 ${theme.appBorderColor}` : "none"
|
|
15916
|
-
})), ScrollButton2 =
|
|
15917
|
+
})), ScrollButton2 = styled62(Button)({
|
|
15917
15918
|
flexShrink: 0,
|
|
15918
15919
|
paddingInline: 0,
|
|
15919
15920
|
width: 16
|
|
@@ -15975,8 +15976,8 @@ var Root = styled63.div({
|
|
|
15975
15976
|
|
|
15976
15977
|
// src/components/components/Tabs/StatelessTabPanel.tsx
|
|
15977
15978
|
import React57 from "react";
|
|
15978
|
-
import { styled as
|
|
15979
|
-
var Root2 =
|
|
15979
|
+
import { styled as styled63 } from "storybook/theming";
|
|
15980
|
+
var Root2 = styled63($5e8ad37a45e1c704$export$3d96ec278d3efce4)({
|
|
15980
15981
|
overflowY: "hidden",
|
|
15981
15982
|
height: "100%",
|
|
15982
15983
|
display: "block",
|
|
@@ -15990,8 +15991,8 @@ var Root2 = styled64($5e8ad37a45e1c704$export$3d96ec278d3efce4)({
|
|
|
15990
15991
|
|
|
15991
15992
|
// src/components/components/Tabs/StatelessTabsView.tsx
|
|
15992
15993
|
import React58 from "react";
|
|
15993
|
-
import { styled as
|
|
15994
|
-
var Container5 =
|
|
15994
|
+
import { styled as styled64 } from "storybook/theming";
|
|
15995
|
+
var Container5 = styled64($5e8ad37a45e1c704$export$b2539bed5023c21c)(({ $simulatedGap }) => ({
|
|
15995
15996
|
display: "flex",
|
|
15996
15997
|
flexDirection: "column",
|
|
15997
15998
|
height: "100%",
|
|
@@ -16057,8 +16058,8 @@ var Container5 = styled65($5e8ad37a45e1c704$export$b2539bed5023c21c)(({ $simulat
|
|
|
16057
16058
|
|
|
16058
16059
|
// src/components/components/Tabs/StatelessTab.tsx
|
|
16059
16060
|
import React59 from "react";
|
|
16060
|
-
import { styled as
|
|
16061
|
-
var StyledTab =
|
|
16061
|
+
import { styled as styled65 } from "storybook/theming";
|
|
16062
|
+
var StyledTab = styled65($5e8ad37a45e1c704$export$3e41faf802a29e71)(({ theme }) => ({
|
|
16062
16063
|
whiteSpace: "normal",
|
|
16063
16064
|
display: "inline-flex",
|
|
16064
16065
|
overflow: "hidden",
|
|
@@ -16154,7 +16155,7 @@ var StorybookIcon = (props) => React61.createElement("svg", { viewBox: "0 0 64 6
|
|
|
16154
16155
|
// src/components/components/Loader/Loader.tsx
|
|
16155
16156
|
import React62 from "react";
|
|
16156
16157
|
import { LightningOffIcon } from "@storybook/icons";
|
|
16157
|
-
import { keyframes as keyframes4, styled as
|
|
16158
|
+
import { keyframes as keyframes4, styled as styled66 } from "storybook/theming";
|
|
16158
16159
|
|
|
16159
16160
|
// src/components/components/shared/animation.ts
|
|
16160
16161
|
import { keyframes as keyframes3 } from "storybook/theming";
|
|
@@ -16168,7 +16169,7 @@ var rotate360 = keyframes3`
|
|
|
16168
16169
|
`;
|
|
16169
16170
|
|
|
16170
16171
|
// src/components/components/Loader/Loader.tsx
|
|
16171
|
-
var LoaderWrapper =
|
|
16172
|
+
var LoaderWrapper = styled66.div(({ size = 32 }) => ({
|
|
16172
16173
|
borderRadius: "50%",
|
|
16173
16174
|
cursor: "progress",
|
|
16174
16175
|
display: "inline-block",
|
|
@@ -16189,7 +16190,7 @@ var LoaderWrapper = styled67.div(({ size = 32 }) => ({
|
|
|
16189
16190
|
borderTopColor: "rgb(100,100,100)",
|
|
16190
16191
|
animation: `${rotate360} 0.7s linear infinite`,
|
|
16191
16192
|
mixBlendMode: "difference"
|
|
16192
|
-
})), ProgressWrapper =
|
|
16193
|
+
})), ProgressWrapper = styled66.div({
|
|
16193
16194
|
position: "absolute",
|
|
16194
16195
|
display: "flex",
|
|
16195
16196
|
flexDirection: "column",
|
|
@@ -16197,7 +16198,7 @@ var LoaderWrapper = styled67.div(({ size = 32 }) => ({
|
|
|
16197
16198
|
alignItems: "center",
|
|
16198
16199
|
width: "100%",
|
|
16199
16200
|
height: "100%"
|
|
16200
|
-
}), ProgressTrack =
|
|
16201
|
+
}), ProgressTrack = styled66.div(({ theme }) => ({
|
|
16201
16202
|
position: "relative",
|
|
16202
16203
|
width: "80%",
|
|
16203
16204
|
marginBottom: "0.75rem",
|
|
@@ -16207,17 +16208,17 @@ var LoaderWrapper = styled67.div(({ size = 32 }) => ({
|
|
|
16207
16208
|
background: curriedTransparentize$1(0.8, theme.color.secondary),
|
|
16208
16209
|
overflow: "hidden",
|
|
16209
16210
|
cursor: "progress"
|
|
16210
|
-
})), ProgressBar2 =
|
|
16211
|
+
})), ProgressBar2 = styled66.div(({ theme }) => ({
|
|
16211
16212
|
position: "absolute",
|
|
16212
16213
|
top: 0,
|
|
16213
16214
|
left: 0,
|
|
16214
16215
|
height: "100%",
|
|
16215
16216
|
background: theme.color.secondary
|
|
16216
|
-
})), ProgressMessage =
|
|
16217
|
+
})), ProgressMessage = styled66.div(({ theme }) => ({
|
|
16217
16218
|
minHeight: "2em",
|
|
16218
16219
|
fontSize: `${theme.typography.size.s1}px`,
|
|
16219
16220
|
color: theme.textMutedColor
|
|
16220
|
-
})), ErrorIcon =
|
|
16221
|
+
})), ErrorIcon = styled66(LightningOffIcon)(({ theme }) => ({
|
|
16221
16222
|
width: 20,
|
|
16222
16223
|
height: 20,
|
|
16223
16224
|
marginBottom: "0.5rem",
|
|
@@ -16227,7 +16228,7 @@ var LoaderWrapper = styled67.div(({ size = 32 }) => ({
|
|
|
16227
16228
|
33% { content: "." }
|
|
16228
16229
|
66% { content: ".." }
|
|
16229
16230
|
to { content: "..." }
|
|
16230
|
-
`, Ellipsis =
|
|
16231
|
+
`, Ellipsis = styled66.span({
|
|
16231
16232
|
"&::after": {
|
|
16232
16233
|
content: "'...'",
|
|
16233
16234
|
animation: `${ellipsis} 1s linear infinite`,
|
|
@@ -16271,7 +16272,7 @@ var LoaderWrapper = styled67.div(({ size = 32 }) => ({
|
|
|
16271
16272
|
|
|
16272
16273
|
// src/components/components/ProgressSpinner/ProgressSpinner.tsx
|
|
16273
16274
|
import React63 from "react";
|
|
16274
|
-
import { keyframes as keyframes5, styled as
|
|
16275
|
+
import { keyframes as keyframes5, styled as styled67 } from "storybook/theming";
|
|
16275
16276
|
var XMLNS = "http://www.w3.org/2000/svg", rotate = keyframes5({
|
|
16276
16277
|
"0%": {
|
|
16277
16278
|
transform: "rotate(0deg)"
|
|
@@ -16279,14 +16280,14 @@ var XMLNS = "http://www.w3.org/2000/svg", rotate = keyframes5({
|
|
|
16279
16280
|
"100%": {
|
|
16280
16281
|
transform: "rotate(360deg)"
|
|
16281
16282
|
}
|
|
16282
|
-
}), Wrapper5 =
|
|
16283
|
+
}), Wrapper5 = styled67.div(({ size }) => ({
|
|
16283
16284
|
display: "inline-flex",
|
|
16284
16285
|
alignItems: "center",
|
|
16285
16286
|
justifyContent: "center",
|
|
16286
16287
|
position: "relative",
|
|
16287
16288
|
minWidth: size,
|
|
16288
16289
|
minHeight: size
|
|
16289
|
-
})), Circle =
|
|
16290
|
+
})), Circle = styled67.svg(
|
|
16290
16291
|
({ size, width }) => ({
|
|
16291
16292
|
position: "absolute",
|
|
16292
16293
|
width: `${size}px!important`,
|
|
@@ -16351,8 +16352,8 @@ var getStoryHref = (baseUrl, storyId, additionalParams = {}) => {
|
|
|
16351
16352
|
|
|
16352
16353
|
// src/components/components/clipboard/ClipboardCode.tsx
|
|
16353
16354
|
import React64 from "react";
|
|
16354
|
-
import { color as color3, styled as
|
|
16355
|
-
var Code2 =
|
|
16355
|
+
import { color as color3, styled as styled68, typography } from "storybook/theming";
|
|
16356
|
+
var Code2 = styled68.pre`
|
|
16356
16357
|
line-height: 18px;
|
|
16357
16358
|
padding: 11px 1rem;
|
|
16358
16359
|
white-space: pre-wrap;
|