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
|
@@ -40510,6 +40510,7 @@ init_ActionBar();
|
|
|
40510
40510
|
|
|
40511
40511
|
// src/components/components/ActionList/ActionList.tsx
|
|
40512
40512
|
var import_react95 = __toESM(require_react(), 1);
|
|
40513
|
+
init_polished_esm();
|
|
40513
40514
|
init_theming();
|
|
40514
40515
|
|
|
40515
40516
|
// src/components/components/Button/Button.tsx
|
|
@@ -60329,22 +60330,24 @@ var init11 = ({ store: store2, fullAPI, provider }) => {
|
|
|
60329
60330
|
defaults[actionName] = defaultShortcut;
|
|
60330
60331
|
}), defaults;
|
|
60331
60332
|
},
|
|
60332
|
-
async setShortcuts(
|
|
60333
|
-
|
|
60333
|
+
async setShortcuts(update2) {
|
|
60334
|
+
let { shortcuts } = await store2.setState(
|
|
60335
|
+
(state4) => ({ shortcuts: typeof update2 == "function" ? update2(state4.shortcuts) : update2 }),
|
|
60336
|
+
{ persistence: "permanent" }
|
|
60337
|
+
);
|
|
60338
|
+
return shortcuts;
|
|
60334
60339
|
},
|
|
60335
60340
|
async restoreAllDefaultShortcuts() {
|
|
60336
60341
|
return api.setShortcuts(api.getDefaultShortcuts());
|
|
60337
60342
|
},
|
|
60338
60343
|
async setShortcut(action2, value) {
|
|
60339
|
-
|
|
60340
|
-
return await api.setShortcuts({ ...shortcuts, [action2]: value }), value;
|
|
60344
|
+
return await api.setShortcuts((shortcuts) => ({ ...shortcuts, [action2]: value })), value;
|
|
60341
60345
|
},
|
|
60342
60346
|
async setAddonShortcut(addon, shortcut) {
|
|
60343
|
-
|
|
60344
|
-
return await api.setShortcuts({
|
|
60347
|
+
return await api.setShortcuts((shortcuts) => ({
|
|
60345
60348
|
...shortcuts,
|
|
60346
60349
|
[`${addon}-${shortcut.actionName}`]: shortcut.defaultShortcut
|
|
60347
|
-
}), addonsShortcuts[`${addon}-${shortcut.actionName}`] = shortcut, shortcut;
|
|
60350
|
+
})), addonsShortcuts[`${addon}-${shortcut.actionName}`] = shortcut, shortcut;
|
|
60348
60351
|
},
|
|
60349
60352
|
async restoreDefaultShortcut(action2) {
|
|
60350
60353
|
let defaultShortcut = api.getDefaultShortcuts()[action2];
|
|
@@ -62130,7 +62133,7 @@ init_dist();
|
|
|
62130
62133
|
var import_memoizerific8 = __toESM(require_memoizerific(), 1), import_semver = __toESM(require_semver2(), 1);
|
|
62131
62134
|
|
|
62132
62135
|
// src/manager-api/version.ts
|
|
62133
|
-
var version = "10.2.0-alpha.
|
|
62136
|
+
var version = "10.2.0-alpha.15";
|
|
62134
62137
|
|
|
62135
62138
|
// src/manager-api/modules/versions.ts
|
|
62136
62139
|
var { VERSIONCHECK } = scope, getVersionCheckData = (0, import_memoizerific8.default)(1)(() => {
|
|
@@ -70212,19 +70215,44 @@ var ActionListItem = styled.li(
|
|
|
70212
70215
|
justifyContent: "space-between",
|
|
70213
70216
|
flex: "0 0 auto",
|
|
70214
70217
|
overflow: "hidden",
|
|
70218
|
+
minHeight: 32,
|
|
70215
70219
|
gap: 4,
|
|
70216
70220
|
fontSize: theme3.typography.size.s1,
|
|
70217
70221
|
fontWeight: active ? theme3.typography.weight.bold : theme3.typography.weight.regular,
|
|
70218
|
-
color: active ?
|
|
70219
|
-
"--listbox-item-
|
|
70222
|
+
color: active ? "var(--listbox-item-active-color)" : theme3.color.defaultText,
|
|
70223
|
+
"--listbox-item-active-color": theme3.base === "light" ? curriedDarken$1(0.1, theme3.color.secondary) : theme3.color.secondary,
|
|
70224
|
+
"--listbox-item-muted-color": active ? "var(--listbox-item-active-color)" : theme3.color.mediumdark,
|
|
70225
|
+
'&[aria-disabled="true"]': {
|
|
70226
|
+
opacity: 0.5,
|
|
70227
|
+
cursor: "not-allowed"
|
|
70228
|
+
},
|
|
70229
|
+
'&[aria-selected="true"]': {
|
|
70230
|
+
color: "var(--listbox-item-active-color)",
|
|
70231
|
+
fontWeight: theme3.typography.weight.bold,
|
|
70232
|
+
"--listbox-item-muted-color": "var(--listbox-item-active-color)"
|
|
70233
|
+
},
|
|
70220
70234
|
"&:not(:hover, :has(:focus-visible)) svg + input": {
|
|
70221
70235
|
position: "absolute",
|
|
70222
70236
|
opacity: 0
|
|
70223
70237
|
},
|
|
70238
|
+
'&[role="option"]': {
|
|
70239
|
+
cursor: "pointer",
|
|
70240
|
+
borderRadius: theme3.input.borderRadius,
|
|
70241
|
+
outlineOffset: -2,
|
|
70242
|
+
padding: "0 9px",
|
|
70243
|
+
gap: 8,
|
|
70244
|
+
"&:hover": {
|
|
70245
|
+
background: curriedTransparentize$1(0.86, theme3.color.secondary)
|
|
70246
|
+
},
|
|
70247
|
+
"&:focus-visible": {
|
|
70248
|
+
outline: `2px solid ${theme3.color.secondary}`
|
|
70249
|
+
}
|
|
70250
|
+
},
|
|
70224
70251
|
"@supports (interpolate-size: allow-keywords)": {
|
|
70225
70252
|
interpolateSize: "allow-keywords",
|
|
70226
|
-
|
|
70227
|
-
|
|
70253
|
+
transitionBehavior: "allow-discrete",
|
|
70254
|
+
transitionDuration: "var(--transition-duration, 0.2s)",
|
|
70255
|
+
transitionProperty: "opacity, block-size, content-visibility"
|
|
70228
70256
|
},
|
|
70229
70257
|
"@media (prefers-reduced-motion: reduce)": {
|
|
70230
70258
|
transition: "none"
|
|
@@ -70266,12 +70294,13 @@ var ActionListItem = styled.li(
|
|
|
70266
70294
|
opacity: 0,
|
|
70267
70295
|
paddingInline: 0
|
|
70268
70296
|
}
|
|
70269
|
-
})), StyledButton2 = styled(Button)({
|
|
70297
|
+
})), StyledButton2 = styled(Button)(({ size }) => ({
|
|
70298
|
+
gap: size === "small" ? 6 : 8,
|
|
70270
70299
|
"&:focus-visible": {
|
|
70271
70300
|
// Prevent focus outline from being cut off by overflow: hidden
|
|
70272
70301
|
outlineOffset: -2
|
|
70273
70302
|
}
|
|
70274
|
-
}), StyledToggleButton = styled(ToggleButton)({
|
|
70303
|
+
})), StyledToggleButton = styled(ToggleButton)({
|
|
70275
70304
|
"&:focus-visible": {
|
|
70276
70305
|
// Prevent focus outline from being cut off by overflow: hidden
|
|
70277
70306
|
outlineOffset: -2
|
|
@@ -70285,6 +70314,8 @@ var ActionListItem = styled.li(
|
|
|
70285
70314
|
return import_react95.default.createElement(StyledToggleButton, { ...props, variant, padding, size, ref });
|
|
70286
70315
|
}
|
|
70287
70316
|
), ActionListAction = styled(ActionListButton)(({ theme: theme3 }) => ({
|
|
70317
|
+
height: "auto",
|
|
70318
|
+
minHeight: 32,
|
|
70288
70319
|
flex: "0 1 100%",
|
|
70289
70320
|
textAlign: "start",
|
|
70290
70321
|
justifyContent: "space-between",
|
|
@@ -70300,32 +70331,40 @@ var ActionListItem = styled.li(
|
|
|
70300
70331
|
outline: `2px solid ${theme3.color.secondary}`,
|
|
70301
70332
|
outlineOffset: -2
|
|
70302
70333
|
}
|
|
70303
|
-
})), ActionListLink = (props) => import_react95.default.createElement(ActionListAction, { as: "a", ...props }), ActionListText = styled.div({
|
|
70334
|
+
})), ActionListLink = (props) => import_react95.default.createElement(ActionListAction, { as: "a", ...props }), ActionListText = styled.div(({ theme: theme3 }) => ({
|
|
70304
70335
|
display: "flex",
|
|
70305
|
-
|
|
70306
|
-
|
|
70336
|
+
flexDirection: "column",
|
|
70337
|
+
justifyContent: "center",
|
|
70307
70338
|
flexGrow: 1,
|
|
70308
70339
|
minWidth: 0,
|
|
70309
70340
|
padding: "8px 0",
|
|
70310
70341
|
lineHeight: "16px",
|
|
70311
|
-
"&
|
|
70342
|
+
"& > *": {
|
|
70343
|
+
margin: 0,
|
|
70344
|
+
whiteSpace: "normal"
|
|
70345
|
+
},
|
|
70346
|
+
"& > span": {
|
|
70312
70347
|
overflow: "hidden",
|
|
70313
70348
|
textOverflow: "ellipsis",
|
|
70314
70349
|
whiteSpace: "nowrap"
|
|
70315
70350
|
},
|
|
70351
|
+
"& small": {
|
|
70352
|
+
fontSize: "inherit",
|
|
70353
|
+
color: theme3.textMutedColor
|
|
70354
|
+
},
|
|
70316
70355
|
"&:first-child": {
|
|
70317
70356
|
paddingLeft: 8
|
|
70318
70357
|
},
|
|
70319
70358
|
"&:last-child": {
|
|
70320
70359
|
paddingRight: 8
|
|
70321
70360
|
},
|
|
70322
|
-
|
|
70361
|
+
'button > &:first-child, [role="option"] > &:first-child': {
|
|
70323
70362
|
paddingLeft: 0
|
|
70324
70363
|
},
|
|
70325
|
-
|
|
70364
|
+
'button > &:last-child, [role="option"] > &:last-child': {
|
|
70326
70365
|
paddingRight: 0
|
|
70327
70366
|
}
|
|
70328
|
-
}), ActionListIcon = styled.div({
|
|
70367
|
+
})), ActionListIcon = styled.div({
|
|
70329
70368
|
display: "flex",
|
|
70330
70369
|
alignItems: "center",
|
|
70331
70370
|
justifyContent: "center",
|
|
@@ -70729,7 +70768,7 @@ var fadeIn = keyframes({
|
|
|
70729
70768
|
outline: "none"
|
|
70730
70769
|
}
|
|
70731
70770
|
}),
|
|
70732
|
-
({ width, height, $variant, $status, $transitionDuration }) => $variant === "dialog" ? {
|
|
70771
|
+
({ theme: theme3, width, height, $variant, $status, $transitionDuration }) => $variant === "dialog" ? {
|
|
70733
70772
|
top: "50%",
|
|
70734
70773
|
left: "50%",
|
|
70735
70774
|
width: width ?? 740,
|
|
@@ -70749,9 +70788,12 @@ var fadeIn = keyframes({
|
|
|
70749
70788
|
bottom: "0",
|
|
70750
70789
|
left: "0",
|
|
70751
70790
|
right: "0",
|
|
70791
|
+
borderRadius: "10px 10px 0 0",
|
|
70792
|
+
overflow: "hidden",
|
|
70752
70793
|
width: width ?? "100%",
|
|
70753
70794
|
height: height ?? "80%",
|
|
70754
70795
|
maxWidth: "100%",
|
|
70796
|
+
background: theme3.background.content,
|
|
70755
70797
|
"@supports (interpolate-size: allow-keywords)": {
|
|
70756
70798
|
interpolateSize: "allow-keywords"
|
|
70757
70799
|
},
|
|
@@ -71128,9 +71170,9 @@ var import_react110 = __toESM(require_react(), 1), ZoomIFrame = class extends im
|
|
|
71128
71170
|
setIframeInnerZoom(scale) {
|
|
71129
71171
|
try {
|
|
71130
71172
|
Object.assign(this.iframe.contentDocument.body.style, {
|
|
71131
|
-
width: `${scale * 100}%`,
|
|
71132
|
-
height: `${scale * 100}%`,
|
|
71133
|
-
transform: `scale(${
|
|
71173
|
+
width: `${1 / scale * 100}%`,
|
|
71174
|
+
height: `${1 / scale * 100}%`,
|
|
71175
|
+
transform: `scale(${scale})`,
|
|
71134
71176
|
transformOrigin: "top left"
|
|
71135
71177
|
});
|
|
71136
71178
|
} catch {
|
|
@@ -71139,9 +71181,9 @@ var import_react110 = __toESM(require_react(), 1), ZoomIFrame = class extends im
|
|
|
71139
71181
|
}
|
|
71140
71182
|
setIframeZoom(scale) {
|
|
71141
71183
|
Object.assign(this.iframe.style, {
|
|
71142
|
-
width: `${scale * 100}%`,
|
|
71143
|
-
height: `${scale * 100}%`,
|
|
71144
|
-
transform: `scale(${
|
|
71184
|
+
width: `${1 / scale * 100}%`,
|
|
71185
|
+
height: `${1 / scale * 100}%`,
|
|
71186
|
+
transform: `scale(${scale})`,
|
|
71145
71187
|
transformOrigin: "top left"
|
|
71146
71188
|
});
|
|
71147
71189
|
}
|
|
@@ -71788,57 +71830,12 @@ Popover.displayName = "Popover";
|
|
|
71788
71830
|
|
|
71789
71831
|
// src/components/components/Select/SelectOption.tsx
|
|
71790
71832
|
var import_react123 = __toESM(require_react(), 1);
|
|
71791
|
-
|
|
71792
|
-
init_theming();
|
|
71793
|
-
var Item = styled("li")(({ theme: theme3 }) => ({
|
|
71794
|
-
padding: "6px 12px",
|
|
71795
|
-
fontSize: 12,
|
|
71796
|
-
lineHeight: 1.5,
|
|
71797
|
-
background: "transparent",
|
|
71798
|
-
color: theme3.color.defaultText,
|
|
71799
|
-
cursor: "pointer",
|
|
71800
|
-
borderRadius: 4,
|
|
71801
|
-
'&[aria-disabled="true"]': {
|
|
71802
|
-
opacity: 0.5,
|
|
71803
|
-
cursor: "not-allowed"
|
|
71804
|
-
},
|
|
71805
|
-
'&[aria-selected="true"]': {
|
|
71806
|
-
color: theme3.base === "light" ? curriedDarken$1(0.1, theme3.color.secondary) : theme3.color.secondary,
|
|
71807
|
-
fontWeight: theme3.typography.weight.bold
|
|
71808
|
-
},
|
|
71809
|
-
":hover": {
|
|
71810
|
-
background: curriedTransparentize$1(0.93, theme3.color.secondary)
|
|
71811
|
-
},
|
|
71812
|
-
":focus-visible": {
|
|
71813
|
-
background: theme3.background.hoverable,
|
|
71814
|
-
outline: `2px solid ${theme3.barSelectedColor}`,
|
|
71815
|
-
outlineOffset: 1,
|
|
71816
|
-
borderRadius: 2
|
|
71817
|
-
},
|
|
71818
|
-
display: "flex",
|
|
71819
|
-
alignItems: "flex-start",
|
|
71820
|
-
gap: 8
|
|
71821
|
-
})), Row2 = styled("div")({
|
|
71822
|
-
display: "flex",
|
|
71823
|
-
flexDirection: "row",
|
|
71824
|
-
gap: 4,
|
|
71825
|
-
alignItems: "center"
|
|
71826
|
-
}), Col2 = styled("div")({
|
|
71827
|
-
display: "flex",
|
|
71828
|
-
flexDirection: "column",
|
|
71829
|
-
flexGrow: 1
|
|
71830
|
-
}), Icon = styled("span")(() => ({
|
|
71831
|
-
display: "block",
|
|
71832
|
-
height: "1rem",
|
|
71833
|
-
width: "1rem"
|
|
71834
|
-
})), Title3 = styled("span")(({}) => ({})), Description2 = styled("span")(({ theme: theme3 }) => ({
|
|
71835
|
-
fontSize: 11,
|
|
71836
|
-
color: theme3.textMutedColor
|
|
71837
|
-
})), SelectOption = ({
|
|
71833
|
+
var SelectOption = ({
|
|
71838
71834
|
id,
|
|
71839
71835
|
title,
|
|
71840
71836
|
description,
|
|
71841
71837
|
icon,
|
|
71838
|
+
aside,
|
|
71842
71839
|
children,
|
|
71843
71840
|
isSelected,
|
|
71844
71841
|
isActive,
|
|
@@ -71848,7 +71845,7 @@ var Item = styled("li")(({ theme: theme3 }) => ({
|
|
|
71848
71845
|
shouldLookDisabled = !1,
|
|
71849
71846
|
...props
|
|
71850
71847
|
}) => import_react123.default.createElement(
|
|
71851
|
-
Item,
|
|
71848
|
+
ActionList.Item,
|
|
71852
71849
|
{
|
|
71853
71850
|
...props,
|
|
71854
71851
|
id,
|
|
@@ -71860,7 +71857,7 @@ var Item = styled("li")(({ theme: theme3 }) => ({
|
|
|
71860
71857
|
onFocus,
|
|
71861
71858
|
onKeyDown
|
|
71862
71859
|
},
|
|
71863
|
-
children ?? import_react123.default.createElement(
|
|
71860
|
+
children ?? import_react123.default.createElement(import_react123.default.Fragment, null, icon && import_react123.default.createElement(ActionList.Icon, null, icon), import_react123.default.createElement(ActionList.Text, null, import_react123.default.createElement("p", null, title), description && import_react123.default.createElement("small", null, description)), aside)
|
|
71864
71861
|
);
|
|
71865
71862
|
SelectOption.displayName = "SelectOption";
|
|
71866
71863
|
|
|
@@ -71974,12 +71971,16 @@ var StyledButton3 = styled(Button)(
|
|
|
71974
71971
|
ariaLabel,
|
|
71975
71972
|
...props
|
|
71976
71973
|
}, ref) => {
|
|
71977
|
-
let [isOpen, setIsOpen] = (0, import_react124.useState)(props.defaultOpen || !1), triggerRef = $df56164dff5785e2$export$4338b53315abf666(ref), id = (0, import_react124.useMemo)(() => "select-" + Math.random().toString(36).substring(2, 15), []), listboxId = `${id}-listbox`, listboxRef = (0, import_react124.useRef)(null), otState = $fc909762b330b746$export$61c6a8c84e605fb6({
|
|
71974
|
+
let [isOpen, setIsOpen] = (0, import_react124.useState)(props.defaultOpen || !1), [shouldRefocusTrigger, setShouldRefocusTrigger] = (0, import_react124.useState)(!1), triggerRef = $df56164dff5785e2$export$4338b53315abf666(ref), id = (0, import_react124.useMemo)(() => "select-" + Math.random().toString(36).substring(2, 15), []), listboxId = `${id}-listbox`, listboxRef = (0, import_react124.useRef)(null), otState = $fc909762b330b746$export$61c6a8c84e605fb6({
|
|
71978
71975
|
isOpen: isOpen && !disabled,
|
|
71979
71976
|
onOpenChange: setIsOpen
|
|
71980
71977
|
}), handleClose = (0, import_react124.useCallback)(() => {
|
|
71981
|
-
setIsOpen(!1),
|
|
71982
|
-
}, [
|
|
71978
|
+
setIsOpen(!1), setShouldRefocusTrigger(!0);
|
|
71979
|
+
}, []);
|
|
71980
|
+
(0, import_react124.useEffect)(() => {
|
|
71981
|
+
!otState.isOpen && shouldRefocusTrigger && (triggerRef.current?.focus(), setShouldRefocusTrigger(!1));
|
|
71982
|
+
}, [otState.isOpen, shouldRefocusTrigger, triggerRef]);
|
|
71983
|
+
let [selectedOptions, setSelectedOptions] = (0, import_react124.useState)(
|
|
71983
71984
|
setSelectedFromDefault(calleeOptions, defaultOptions2)
|
|
71984
71985
|
), handleSelectOption = (0, import_react124.useCallback)(
|
|
71985
71986
|
(option) => {
|
|
@@ -72009,8 +72010,8 @@ var StyledButton3 = styled(Button)(
|
|
|
72009
72010
|
let [activeOption, setActiveOptionState] = (0, import_react124.useState)(
|
|
72010
72011
|
void 0
|
|
72011
72012
|
), setActiveOption = (0, import_react124.useCallback)(
|
|
72012
|
-
(option) => {
|
|
72013
|
-
setActiveOptionState(optionOrResetToInternal(option)), multiSelect
|
|
72013
|
+
(option, changeSelection = !0) => {
|
|
72014
|
+
setActiveOptionState(optionOrResetToInternal(option)), !multiSelect && changeSelection && handleSelectOption(optionOrResetToInternal(option));
|
|
72014
72015
|
},
|
|
72015
72016
|
[multiSelect, handleSelectOption]
|
|
72016
72017
|
), moveActiveOptionDown = (0, import_react124.useCallback)(
|
|
@@ -72117,6 +72118,7 @@ var StyledButton3 = styled(Button)(
|
|
|
72117
72118
|
key: option.value === void 0 ? "sb-reset" : String(option.value),
|
|
72118
72119
|
title: option.title,
|
|
72119
72120
|
description: option.description,
|
|
72121
|
+
aside: option.aside,
|
|
72120
72122
|
icon: !isReset && multiSelect ? (
|
|
72121
72123
|
// Purely decorative.
|
|
72122
72124
|
import_react124.default.createElement(Form2.Checkbox, { checked: isSelected, hidden: !0, role: "presentation" })
|
|
@@ -72127,7 +72129,7 @@ var StyledButton3 = styled(Button)(
|
|
|
72127
72129
|
onClick: () => {
|
|
72128
72130
|
handleSelectOption(option), multiSelect || handleClose();
|
|
72129
72131
|
},
|
|
72130
|
-
onFocus: () => setActiveOption(externalOption),
|
|
72132
|
+
onFocus: () => setActiveOption(externalOption, !1),
|
|
72131
72133
|
shouldLookDisabled: isReset && selectedOptions.length === 0 && multiSelect,
|
|
72132
72134
|
onKeyDown: (e) => {
|
|
72133
72135
|
e.key === "Enter" || e.key === " " ? (e.preventDefault(), handleSelectOption(option), multiSelect || handleClose()) : e.key === "Tab" && (multiSelect || handleSelectOption(option), handleClose());
|
|
@@ -75711,7 +75713,7 @@ var import_react159 = __toESM(require_react(), 1), LazyWithTooltip = (0, import_
|
|
|
75711
75713
|
var import_react160 = __toESM(require_react(), 1);
|
|
75712
75714
|
init_client_logger();
|
|
75713
75715
|
init_theming();
|
|
75714
|
-
var
|
|
75716
|
+
var Title3 = styled.div(({ theme: theme3 }) => ({
|
|
75715
75717
|
fontWeight: theme3.typography.weight.bold
|
|
75716
75718
|
})), Desc2 = styled.span(), Links = styled.div(({ theme: theme3 }) => ({
|
|
75717
75719
|
marginTop: 8,
|
|
@@ -75729,7 +75731,7 @@ var Title4 = styled.div(({ theme: theme3 }) => ({
|
|
|
75729
75731
|
boxSizing: "border-box"
|
|
75730
75732
|
}), TooltipMessage = ({ title, desc, links }) => (deprecate(
|
|
75731
75733
|
"`TooltipMessage` is deprecated and will be removed in Storybook 11, use `Popover` and `PopoverProvider` instead."
|
|
75732
|
-
), import_react160.default.createElement(MessageWrapper, { "data-deprecated": "TooltipMessage" }, import_react160.default.createElement(Message2, null, title && import_react160.default.createElement(
|
|
75734
|
+
), import_react160.default.createElement(MessageWrapper, { "data-deprecated": "TooltipMessage" }, import_react160.default.createElement(Message2, null, title && import_react160.default.createElement(Title3, null, title), desc && import_react160.default.createElement(Desc2, null, desc)), links && import_react160.default.createElement(Links, null, links.map(({ title: linkTitle, ...other }) => import_react160.default.createElement(Link2, { ...other, key: linkTitle }, linkTitle)))));
|
|
75733
75735
|
|
|
75734
75736
|
// src/components/components/tooltip/TooltipLinkList.tsx
|
|
75735
75737
|
var import_react162 = __toESM(require_react(), 1);
|
|
@@ -75741,7 +75743,7 @@ var import_react161 = __toESM(require_react(), 1);
|
|
|
75741
75743
|
init_client_logger();
|
|
75742
75744
|
var import_memoizerific11 = __toESM(require_memoizerific(), 1);
|
|
75743
75745
|
init_theming();
|
|
75744
|
-
var
|
|
75746
|
+
var Title4 = styled(({ active, loading, disabled, ...rest }) => import_react161.default.createElement("span", { ...rest }))(
|
|
75745
75747
|
({ theme: theme3 }) => ({
|
|
75746
75748
|
color: theme3.color.defaultText,
|
|
75747
75749
|
// Previously was theme.typography.weight.normal but this weight does not exists in Theme
|
|
@@ -75796,7 +75798,7 @@ var Title5 = styled(({ active, loading, disabled, ...rest }) => import_react161.
|
|
|
75796
75798
|
display: "flex",
|
|
75797
75799
|
maxWidth: 14
|
|
75798
75800
|
})
|
|
75799
|
-
),
|
|
75801
|
+
), Item = styled.button(
|
|
75800
75802
|
({ theme: theme3 }) => ({
|
|
75801
75803
|
width: "100%",
|
|
75802
75804
|
minWidth: 0,
|
|
@@ -75875,7 +75877,7 @@ var Title5 = styled(({ active, loading, disabled, ...rest }) => import_react161.
|
|
|
75875
75877
|
} = props, commonProps = { active, disabled }, itemProps = getItemProps(props), left2 = icon || input2;
|
|
75876
75878
|
return deprecate(
|
|
75877
75879
|
"`ListItem` is deprecated and will be removed in Storybook 11, use `MenuItem` instead."
|
|
75878
|
-
), import_react161.default.createElement(
|
|
75880
|
+
), import_react161.default.createElement(Item, { "data-deprecated": "ListItem", ref, ...rest, ...commonProps, ...itemProps }, import_react161.default.createElement(import_react161.default.Fragment, null, left2 && import_react161.default.createElement(Left, { ...commonProps }, left2), title || center ? import_react161.default.createElement(Center, { isIndented: isIndented && !left2 }, title && import_react161.default.createElement(Title4, { ...commonProps, loading }, title), center && import_react161.default.createElement(CenterText, { ...commonProps }, center)) : null, right2 && import_react161.default.createElement(Right, { ...commonProps }, right2)));
|
|
75879
75881
|
});
|
|
75880
75882
|
ListItem.displayName = "ListItem";
|
|
75881
75883
|
var ListItem_default = ListItem;
|
|
@@ -75898,7 +75900,7 @@ var List = styled.div(
|
|
|
75898
75900
|
"& + &": {
|
|
75899
75901
|
borderTop: `1px solid ${theme3.appBorderColor}`
|
|
75900
75902
|
}
|
|
75901
|
-
})),
|
|
75903
|
+
})), Item2 = ({ id, onClick, ...rest }) => {
|
|
75902
75904
|
let { active, disabled, title, href } = rest, handleClick = (0, import_react162.useCallback)(
|
|
75903
75905
|
(event) => onClick?.(event, { id, active, disabled, title, href }),
|
|
75904
75906
|
[onClick, id, active, disabled, title, href]
|
|
@@ -75911,7 +75913,7 @@ var List = styled.div(
|
|
|
75911
75913
|
let groups = Array.isArray(links[0]) ? links : [links], isIndented = groups.some(
|
|
75912
75914
|
(group) => group.some((link) => "icon" in link && link.icon || "input" in link && link.input)
|
|
75913
75915
|
);
|
|
75914
|
-
return import_react162.default.createElement(List, { "data-deprecated": "TooltipLinkList", ...props, className: "sb-list" }, groups.filter((group) => group.length).map((group, index4) => import_react162.default.createElement(Group, { key: group.map((link) => link.id).join(`~${index4}~`) }, group.map((link) => "content" in link ? import_react162.default.createElement(import_react162.Fragment, { key: link.id }, link.content) : import_react162.default.createElement(
|
|
75916
|
+
return import_react162.default.createElement(List, { "data-deprecated": "TooltipLinkList", ...props, className: "sb-list" }, groups.filter((group) => group.length).map((group, index4) => import_react162.default.createElement(Group, { key: group.map((link) => link.id).join(`~${index4}~`) }, group.map((link) => "content" in link ? import_react162.default.createElement(import_react162.Fragment, { key: link.id }, link.content) : import_react162.default.createElement(Item2, { key: link.id, isIndented, LinkWrapper, ...link })))));
|
|
75915
75917
|
};
|
|
75916
75918
|
|
|
75917
75919
|
// src/components/components/Tabs/Tabs.tsx
|
|
@@ -76091,19 +76093,19 @@ var Wrapper5 = styled.div(({ theme: theme3 }) => ({
|
|
|
76091
76093
|
flexDirection: "column",
|
|
76092
76094
|
gap: 4,
|
|
76093
76095
|
maxWidth: 415
|
|
76094
|
-
}),
|
|
76096
|
+
}), Title5 = styled.div(({ theme: theme3 }) => ({
|
|
76095
76097
|
fontWeight: theme3.typography.weight.bold,
|
|
76096
76098
|
fontSize: theme3.typography.size.s2 - 1,
|
|
76097
76099
|
textAlign: "center",
|
|
76098
76100
|
color: theme3.color.defaultText
|
|
76099
76101
|
})), Footer = styled.div(({ theme: theme3 }) => ({
|
|
76100
76102
|
fontSize: theme3.typography.size.s2 - 1
|
|
76101
|
-
})),
|
|
76103
|
+
})), Description2 = styled.div(({ theme: theme3 }) => ({
|
|
76102
76104
|
fontWeight: theme3.typography.weight.regular,
|
|
76103
76105
|
fontSize: theme3.typography.size.s2 - 1,
|
|
76104
76106
|
textAlign: "center",
|
|
76105
76107
|
color: theme3.textMutedColor
|
|
76106
|
-
})), EmptyTabContent = ({ title, description, footer }) => import_react165.default.createElement(Wrapper5, null, import_react165.default.createElement(Content2, null, import_react165.default.createElement(
|
|
76108
|
+
})), EmptyTabContent = ({ title, description, footer }) => import_react165.default.createElement(Wrapper5, null, import_react165.default.createElement(Content2, null, import_react165.default.createElement(Title5, null, title), description && import_react165.default.createElement(Description2, null, description)), footer && import_react165.default.createElement(Footer, null, footer));
|
|
76107
76109
|
|
|
76108
76110
|
// src/components/components/Tabs/Tabs.helpers.tsx
|
|
76109
76111
|
var import_react166 = __toESM(require_react(), 1);
|
|
@@ -76426,6 +76428,7 @@ var import_react169 = __toESM(require_react(), 1);
|
|
|
76426
76428
|
init_theming();
|
|
76427
76429
|
var Separator2 = styled.span(
|
|
76428
76430
|
({ theme: theme3 }) => ({
|
|
76431
|
+
display: "inline-block",
|
|
76429
76432
|
width: 1,
|
|
76430
76433
|
height: 20,
|
|
76431
76434
|
background: theme3.appBorderColor,
|
|
@@ -77056,7 +77059,7 @@ var useTabsState = ({
|
|
|
77056
77059
|
selected,
|
|
77057
77060
|
tabs
|
|
77058
77061
|
}) => $76f919a04c5a7d14$export$4ba071daf4e486({
|
|
77059
|
-
children: tabs.map(({ children: Children10, id, "aria-label": ariaLabel, title:
|
|
77062
|
+
children: tabs.map(({ children: Children10, id, "aria-label": ariaLabel, title: Title6 }) => import_react179.default.createElement($c1d7fb2ec91bae71$export$6d08773d2e66f8f2, { key: id, "aria-label": ariaLabel, title: typeof Title6 == "function" ? import_react179.default.createElement(Title6, null) : Title6 }, typeof Children10 == "function" ? import_react179.default.createElement(Children10, null) : Children10)),
|
|
77060
77063
|
disabledKeys: tabs.filter(({ isDisabled: isDisabled3 }) => isDisabled3).map(({ id }) => id),
|
|
77061
77064
|
defaultSelectedKey: defaultSelected,
|
|
77062
77065
|
onSelectionChange: (key) => onSelectionChange?.(`${key}`),
|