@wistia/ui 1.14.0 → 1.15.0-beta.1af8f5cf.0efd533
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/index.d.ts +146 -138
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +62 -48
- package/dist/index.js.map +1 -1
- package/package.json +6 -4
- package/CHANGELOG.md +0 -2343
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v1.
|
|
3
|
+
* @license @wistia/ui v1.15.0-beta.1af8f5cf.0efd533
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2026, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -276,6 +276,18 @@ const AriaLiveProvider = ({ children, debug = false }) => {
|
|
|
276
276
|
});
|
|
277
277
|
};
|
|
278
278
|
//#endregion
|
|
279
|
+
//#region src/providers/UIProvider/GatedIconContext.tsx
|
|
280
|
+
/**
|
|
281
|
+
* The icon components use to mark a gated feature — `ActionButton`'s `gated`
|
|
282
|
+
* variant, `MenuItem`'s `gated` appearance, and the gated `CheckboxCard` and
|
|
283
|
+
* `RadioCard`.
|
|
284
|
+
*
|
|
285
|
+
* Defaults to `sparkle`. Set `gatedIcon` on `UIProvider` to change it
|
|
286
|
+
* everywhere at once, which is what lets a product test an alternative marker
|
|
287
|
+
* without touching each call site.
|
|
288
|
+
*/
|
|
289
|
+
const GatedIconContext = createContext("sparkle");
|
|
290
|
+
//#endregion
|
|
279
291
|
//#region src/providers/UIProvider/ToastScopeContext.tsx
|
|
280
292
|
/**
|
|
281
293
|
* Carries the toast scope id from a `UIProvider` down to `useToast` and
|
|
@@ -306,17 +318,20 @@ const ToastProvider = () => {
|
|
|
306
318
|
//#endregion
|
|
307
319
|
//#region src/providers/UIProvider/UIProvider.tsx
|
|
308
320
|
const UIProviderNestingContext = createContext(false);
|
|
309
|
-
const UIProvider = ({ children, id }) => {
|
|
321
|
+
const UIProvider = ({ children, id, gatedIcon = "sparkle" }) => {
|
|
310
322
|
if (useContext(UIProviderNestingContext)) return /* @__PURE__ */ jsx(Fragment, { children });
|
|
311
323
|
return /* @__PURE__ */ jsx(UIProviderNestingContext, {
|
|
312
324
|
value: true,
|
|
313
|
-
children: /* @__PURE__ */ jsx(
|
|
314
|
-
value:
|
|
315
|
-
children: /* @__PURE__ */ jsx(
|
|
316
|
-
|
|
317
|
-
children,
|
|
318
|
-
|
|
319
|
-
|
|
325
|
+
children: /* @__PURE__ */ jsx(GatedIconContext, {
|
|
326
|
+
value: gatedIcon,
|
|
327
|
+
children: /* @__PURE__ */ jsx(ToastScopeContext, {
|
|
328
|
+
value: id,
|
|
329
|
+
children: /* @__PURE__ */ jsx(AriaLiveProvider, { children: /* @__PURE__ */ jsxs(Tooltip$1.Provider, { children: [
|
|
330
|
+
/* @__PURE__ */ jsx(GlobalStyle, {}),
|
|
331
|
+
children,
|
|
332
|
+
/* @__PURE__ */ jsx(ToastProvider, {})
|
|
333
|
+
] }) })
|
|
334
|
+
})
|
|
320
335
|
})
|
|
321
336
|
});
|
|
322
337
|
};
|
|
@@ -2065,7 +2080,7 @@ const Toast = ({ action, message, colorScheme = "inherit", icon, ...props }) =>
|
|
|
2065
2080
|
})] }), /* @__PURE__ */ jsx(Action, { actionButton: action })]
|
|
2066
2081
|
});
|
|
2067
2082
|
};
|
|
2068
|
-
Toast.displayName = "
|
|
2083
|
+
Toast.displayName = "Toast_UI";
|
|
2069
2084
|
//#endregion
|
|
2070
2085
|
//#region src/hooks/useToast/useToast.tsx
|
|
2071
2086
|
const useToast = () => {
|
|
@@ -2092,6 +2107,10 @@ const useToast = () => {
|
|
|
2092
2107
|
}, [toasterId]);
|
|
2093
2108
|
};
|
|
2094
2109
|
//#endregion
|
|
2110
|
+
//#region src/private/hooks/useGatedIcon/useGatedIcon.ts
|
|
2111
|
+
/** The icon marking a gated feature — `sparkle` unless `UIProvider` overrides it. */
|
|
2112
|
+
const useGatedIcon = () => useContext(GatedIconContext);
|
|
2113
|
+
//#endregion
|
|
2095
2114
|
//#region src/css/buttonResetCss.tsx
|
|
2096
2115
|
const buttonResetCss = css`
|
|
2097
2116
|
align-items: center;
|
|
@@ -3105,7 +3124,7 @@ const DiamondIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
|
3105
3124
|
viewBox: "0 0 24 24",
|
|
3106
3125
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3107
3126
|
children: /* @__PURE__ */ jsx("path", {
|
|
3108
|
-
d: "
|
|
3127
|
+
d: "M10.2261 2.96726H17.4195C17.7215 2.96726 18.0039 3.11832 18.1714 3.36961L21.7847 8.78953C21.787 8.79292 21.7884 8.79686 21.7906 8.80027C21.8118 8.833 21.8303 8.86734 21.8472 8.90281C21.851 8.91072 21.8554 8.91827 21.8589 8.92625C21.8756 8.96395 21.8885 9.00324 21.8999 9.04344C21.9024 9.0522 21.9046 9.06099 21.9068 9.0698C21.9245 9.14049 21.9361 9.21431 21.9361 9.29051C21.9361 9.3 21.9344 9.30941 21.9341 9.31883C21.9337 9.33123 21.9331 9.34356 21.9322 9.35594C21.9259 9.44284 21.9066 9.52562 21.8775 9.60398C21.875 9.61074 21.8733 9.61778 21.8707 9.62449C21.8551 9.66332 21.8375 9.70084 21.8169 9.7368C21.8124 9.7448 21.8071 9.75235 21.8023 9.76023C21.7801 9.7965 21.757 9.83207 21.73 9.86473C21.729 9.86598 21.7281 9.86738 21.7271 9.86863L13.1832 20.1196C13.1486 20.1709 13.1104 20.2188 13.0669 20.2612L12.6939 20.7085C12.5223 20.9141 12.2674 21.0327 11.9996 21.0327C11.7319 21.0326 11.4777 20.914 11.3062 20.7085L10.9361 20.2641C10.8811 20.2129 10.8318 20.1551 10.7906 20.0903L2.27299 9.86863C2.27195 9.86738 2.2711 9.86598 2.27007 9.86473C2.24302 9.83194 2.2191 9.79666 2.19682 9.76023C2.19201 9.75235 2.18672 9.74479 2.18217 9.7368C2.16169 9.70087 2.14394 9.66329 2.12846 9.62449C2.1258 9.61779 2.12413 9.61074 2.12163 9.60398C2.09256 9.52569 2.07319 9.44275 2.06694 9.35594C2.06604 9.34357 2.06538 9.33122 2.06499 9.31883C2.06469 9.30942 2.06401 9.29999 2.06401 9.29051C2.06401 9.21439 2.0746 9.14042 2.09233 9.0698C2.09455 9.061 2.09668 9.05219 2.09917 9.04344C2.12387 8.95637 2.16052 8.8745 2.20854 8.80027C2.21084 8.79671 2.21302 8.79307 2.21538 8.78953L5.82866 3.36961L5.89702 3.27976C6.06735 3.0827 6.31647 2.96726 6.58061 2.96726H10.1822C10.1968 2.96708 10.2114 2.96673 10.2261 2.96726ZM11.9957 17.9712L14.3882 10.1938H9.60893L11.9957 17.9712ZM16.2798 10.1938L14.6265 15.5649L19.1021 10.1938H16.2798ZM9.36479 15.5561L7.72026 10.1938H4.89702L9.36479 15.5561ZM16.2642 8.38719H19.3443L16.9361 4.7739H15.0601L16.2642 8.38719ZM4.65483 8.38719H7.73491L8.93999 4.7739H7.06401L4.65483 8.38719ZM9.63921 8.38719H14.3589L13.1558 4.7739H10.8453L9.63921 8.38719Z",
|
|
3109
3128
|
fill: "currentColor"
|
|
3110
3129
|
})
|
|
3111
3130
|
});
|
|
@@ -6205,7 +6224,7 @@ const ActionButton = ({ icon, colorScheme = "standard", disabled = false, forceS
|
|
|
6205
6224
|
const resolvedHoverColorScheme = hoverColorScheme ?? (variant === "gated" ? "purple" : "inherit");
|
|
6206
6225
|
const secondaryIconMap = {
|
|
6207
6226
|
default: "arrow-right",
|
|
6208
|
-
gated:
|
|
6227
|
+
gated: useGatedIcon(),
|
|
6209
6228
|
"menu-up": "caret-up",
|
|
6210
6229
|
"menu-down": "caret-down"
|
|
6211
6230
|
};
|
|
@@ -6493,16 +6512,7 @@ const Badge = ({ colorScheme = "inherit", label, icon, variant = "default", ref,
|
|
|
6493
6512
|
};
|
|
6494
6513
|
//#endregion
|
|
6495
6514
|
//#region src/private/helpers/makePolymorphic/makePolymorphic.tsx
|
|
6496
|
-
|
|
6497
|
-
* makePolymorphic takes a component and returns a new version
|
|
6498
|
-
* that supports polymorphism via a `renderAs` prop. The returned component's types automatically
|
|
6499
|
-
* merge the intrinsic props of the rendered element with the custom props of the original
|
|
6500
|
-
* component, while including support for children and refs.
|
|
6501
|
-
*
|
|
6502
|
-
* This allows for highly reusable UI components that can change the underlying HTML element or
|
|
6503
|
-
* component at the time of use—without sacrificing type safety or having to manually merge props
|
|
6504
|
-
* every time.
|
|
6505
|
-
*/
|
|
6515
|
+
const withPolymorphicAs = (component) => component;
|
|
6506
6516
|
const makePolymorphic = (component) => {
|
|
6507
6517
|
return component;
|
|
6508
6518
|
};
|
|
@@ -6553,7 +6563,7 @@ const getFlexStyle = (flexMode) => {
|
|
|
6553
6563
|
default: return null;
|
|
6554
6564
|
}
|
|
6555
6565
|
};
|
|
6556
|
-
const
|
|
6566
|
+
const PolymorphicStyledBox = withPolymorphicAs(styled.div`
|
|
6557
6567
|
/* properties meant for Box parent (flex container) */
|
|
6558
6568
|
align-content: ${({ $alignContent }) => $alignContent};
|
|
6559
6569
|
align-items: ${({ $alignItems }) => $alignItems};
|
|
@@ -6574,7 +6584,7 @@ const StyledBoxComponent = styled.div`
|
|
|
6574
6584
|
flex-grow: ${({ $grow }) => isNotNil($grow) ? $grow : null};
|
|
6575
6585
|
flex-shrink: ${({ $shrink }) => isNotNil($shrink) ? $shrink : null};
|
|
6576
6586
|
order: ${({ $order }) => isNotNil($order) ? $order : null};
|
|
6577
|
-
|
|
6587
|
+
`);
|
|
6578
6588
|
const DEFAULT_ELEMENT$4 = "div";
|
|
6579
6589
|
const BoxComponent = ({ ref, alignContent = "stretch", alignItems = "flex-start", alignSelf, basis, children, direction = "row", fill = false, fillViewport = false, gap, grow, height, inline = false, justifyContent = "flex-start", order, renderAs, shrink, width, wrapItems = false, flexMode, ...props }) => {
|
|
6580
6590
|
const responsiveAlignContent = useResponsiveProp(alignContent);
|
|
@@ -6600,7 +6610,7 @@ const BoxComponent = ({ ref, alignContent = "stretch", alignItems = "flex-start"
|
|
|
6600
6610
|
if (responsiveFill === true || responsiveFill === "horizontal") throw new Error("Cannot use width prop with fill=\"horizontal\" or fill={true}");
|
|
6601
6611
|
if (fillViewport === true || fillViewport === "horizontal") throw new Error("Cannot use width prop with fillViewport=\"horizontal\" or fillViewport={true}");
|
|
6602
6612
|
}
|
|
6603
|
-
return /* @__PURE__ */ jsx(
|
|
6613
|
+
return /* @__PURE__ */ jsx(PolymorphicStyledBox, {
|
|
6604
6614
|
ref,
|
|
6605
6615
|
$alignContent: responsiveAlignContent,
|
|
6606
6616
|
$alignItems: responsiveAlignItems,
|
|
@@ -6759,7 +6769,7 @@ const variantStyleMap$1 = {
|
|
|
6759
6769
|
`
|
|
6760
6770
|
};
|
|
6761
6771
|
const DEFAULT_ELEMENT$3 = "h1";
|
|
6762
|
-
const
|
|
6772
|
+
const PolymorphicStyledHeading = withPolymorphicAs(styled.div`
|
|
6763
6773
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
6764
6774
|
--text-color: ${({ $prominence, $disabled }) => {
|
|
6765
6775
|
if ($disabled) return "var(--wui-color-text-disabled)";
|
|
@@ -6795,7 +6805,7 @@ const StyledHeading$1 = styled.div`
|
|
|
6795
6805
|
margin: 0;
|
|
6796
6806
|
|
|
6797
6807
|
${iconInlineStyle}
|
|
6798
|
-
|
|
6808
|
+
`);
|
|
6799
6809
|
const variantElementMap$1 = {
|
|
6800
6810
|
hero: DEFAULT_ELEMENT$3,
|
|
6801
6811
|
heading1: DEFAULT_ELEMENT$3,
|
|
@@ -6807,7 +6817,7 @@ const variantElementMap$1 = {
|
|
|
6807
6817
|
};
|
|
6808
6818
|
const HeadingComponent = ({ ref, align = "left", children, colorScheme = "inherit", disabled = false, inline = false, maxChars, preventUserSelect = false, prominence = "primary", maxLines, textTransform, variant = "heading1", renderAs, ...props }) => {
|
|
6809
6819
|
const processedChildren = applyMaxCharsToChildren(children, maxChars);
|
|
6810
|
-
return /* @__PURE__ */ jsx(
|
|
6820
|
+
return /* @__PURE__ */ jsx(PolymorphicStyledHeading, {
|
|
6811
6821
|
ref,
|
|
6812
6822
|
$align: align,
|
|
6813
6823
|
$colorScheme: colorScheme,
|
|
@@ -6983,7 +6993,7 @@ const variantElementMap = {
|
|
|
6983
6993
|
label3: labelElement,
|
|
6984
6994
|
label4: labelElement
|
|
6985
6995
|
};
|
|
6986
|
-
const
|
|
6996
|
+
const PolymorphicStyledText = withPolymorphicAs(styled.div`
|
|
6987
6997
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
6988
6998
|
--text-color: ${({ $prominence, $disabled }) => {
|
|
6989
6999
|
if ($disabled) return "var(--wui-color-text-disabled)";
|
|
@@ -7029,10 +7039,10 @@ const StyledText = styled.div`
|
|
|
7029
7039
|
margin-top: var(--paragraph-spacing, var(--wui-space-04));
|
|
7030
7040
|
}
|
|
7031
7041
|
`}
|
|
7032
|
-
|
|
7042
|
+
`);
|
|
7033
7043
|
const TextComponent = ({ ref, align = "left", children, colorScheme = "inherit", disabled = false, inline = false, maxChars, preventUserSelect = false, prominence = "primary", maxLines, textTransform, variant = "body2", renderAs, ...props }) => {
|
|
7034
7044
|
const processedChildren = applyMaxCharsToChildren(children, maxChars);
|
|
7035
|
-
return /* @__PURE__ */ jsx(
|
|
7045
|
+
return /* @__PURE__ */ jsx(PolymorphicStyledText, {
|
|
7036
7046
|
ref,
|
|
7037
7047
|
$align: align,
|
|
7038
7048
|
$colorScheme: colorScheme,
|
|
@@ -7329,7 +7339,7 @@ const FormControlLabelDescription = ({ children, disabled = false, ...props }) =
|
|
|
7329
7339
|
children
|
|
7330
7340
|
});
|
|
7331
7341
|
};
|
|
7332
|
-
FormControlLabelDescription.displayName = "
|
|
7342
|
+
FormControlLabelDescription.displayName = "FormControlLabelDescription_UI";
|
|
7333
7343
|
//#endregion
|
|
7334
7344
|
//#region src/private/components/FormControlLabel/FormControlLabel.tsx
|
|
7335
7345
|
const disabledStyle$1 = css`
|
|
@@ -7369,25 +7379,25 @@ const FormControlLabel = ({ align = "left", label, description, disabled = false
|
|
|
7369
7379
|
children: [align === "left" ? slot : labelContent, align === "left" ? labelContent : slot]
|
|
7370
7380
|
});
|
|
7371
7381
|
};
|
|
7372
|
-
FormControlLabel.displayName = "
|
|
7382
|
+
FormControlLabel.displayName = "FormControlLabel_UI";
|
|
7373
7383
|
//#endregion
|
|
7374
7384
|
//#region src/components/Stack/Stack.tsx
|
|
7375
7385
|
const DEFAULT_ELEMENT$1 = "div";
|
|
7376
|
-
const
|
|
7386
|
+
const PolymorphicStyledStack = withPolymorphicAs(styled.div`
|
|
7377
7387
|
display: flex;
|
|
7378
7388
|
flex-direction: ${({ $direction }) => $direction === "horizontal" ? "row" : "column"};
|
|
7379
7389
|
gap: ${({ $gap }) => `var(--wui-${$gap})`};
|
|
7380
7390
|
align-items: ${({ $alignItems }) => $alignItems};
|
|
7381
7391
|
${({ $paddingX }) => $paddingX && `padding-left: var(--wui-${$paddingX}); padding-right: var(--wui-${$paddingX});`}
|
|
7382
7392
|
${({ $paddingY }) => $paddingY && `padding-top: var(--wui-${$paddingY}); padding-bottom: var(--wui-${$paddingY});`}
|
|
7383
|
-
|
|
7393
|
+
`);
|
|
7384
7394
|
const StackComponent = ({ ref, renderAs, direction = "vertical", gap = "space-02", alignItems = "stretch", padding, ...props }) => {
|
|
7385
7395
|
const responsiveGap = useResponsiveProp(gap);
|
|
7386
7396
|
const responsiveDirection = useResponsiveProp(direction);
|
|
7387
7397
|
const responsiveAlignItems = useResponsiveProp(alignItems);
|
|
7388
7398
|
const responsivePaddingX = useResponsiveProp(padding?.x);
|
|
7389
7399
|
const responsivePaddingY = useResponsiveProp(padding?.y);
|
|
7390
|
-
return /* @__PURE__ */ jsx(
|
|
7400
|
+
return /* @__PURE__ */ jsx(PolymorphicStyledStack, {
|
|
7391
7401
|
ref,
|
|
7392
7402
|
$alignItems: responsiveAlignItems,
|
|
7393
7403
|
$direction: responsiveDirection,
|
|
@@ -7973,6 +7983,7 @@ const StyledIndicatorContainer$1 = styled.div`
|
|
|
7973
7983
|
align-items: center;
|
|
7974
7984
|
`;
|
|
7975
7985
|
const CheckboxCardDefaultLayout = ({ icon, label, description, showIndicator = true, isGated = false }) => {
|
|
7986
|
+
const gatedIcon = useGatedIcon();
|
|
7976
7987
|
return /* @__PURE__ */ jsxs(StyledCardContent$1, { children: [
|
|
7977
7988
|
showIndicator ? /* @__PURE__ */ jsx(StyledIndicatorContainer$1, {
|
|
7978
7989
|
$hasIcon: isNotNil(icon),
|
|
@@ -7983,7 +7994,7 @@ const CheckboxCardDefaultLayout = ({ icon, label, description, showIndicator = t
|
|
|
7983
7994
|
children: /* @__PURE__ */ jsx(Icon, {
|
|
7984
7995
|
colorScheme: "purple",
|
|
7985
7996
|
"data-testid": "wui-icon-sparkle",
|
|
7986
|
-
type:
|
|
7997
|
+
type: gatedIcon
|
|
7987
7998
|
})
|
|
7988
7999
|
}) : null,
|
|
7989
8000
|
/* @__PURE__ */ jsxs(Stack, {
|
|
@@ -9331,6 +9342,7 @@ const Switch = ({ align = "left", checked, disabled = false, id, label, descript
|
|
|
9331
9342
|
name,
|
|
9332
9343
|
onChange,
|
|
9333
9344
|
required,
|
|
9345
|
+
role: "switch",
|
|
9334
9346
|
type: "checkbox",
|
|
9335
9347
|
value
|
|
9336
9348
|
}), /* @__PURE__ */ jsx(FormControlLabel, {
|
|
@@ -11759,7 +11771,7 @@ const CalendarNavigation = ({ onPreviousClick, onNextClick, previousMonth, nextM
|
|
|
11759
11771
|
children: /* @__PURE__ */ jsx(Icon, { type: "caret-right" })
|
|
11760
11772
|
})] });
|
|
11761
11773
|
};
|
|
11762
|
-
CalendarNavigation.displayName = "
|
|
11774
|
+
CalendarNavigation.displayName = "CalendarNavigation_UI";
|
|
11763
11775
|
//#endregion
|
|
11764
11776
|
//#region src/private/components/Calendar/calendarStyles.ts
|
|
11765
11777
|
const calendarCss = css`
|
|
@@ -11990,7 +12002,7 @@ const Calendar = (props) => {
|
|
|
11990
12002
|
children: /* @__PURE__ */ jsx(DayPicker, { ...dayPickerProps })
|
|
11991
12003
|
});
|
|
11992
12004
|
};
|
|
11993
|
-
Calendar.displayName = "
|
|
12005
|
+
Calendar.displayName = "Calendar_UI";
|
|
11994
12006
|
//#endregion
|
|
11995
12007
|
//#region src/components/DatePicker/DatePickerPopover.tsx
|
|
11996
12008
|
const DatePickerPopover = () => {
|
|
@@ -12516,7 +12528,7 @@ const EditableTextRoot = ({ children, defaultValue = "", value: controlledValue,
|
|
|
12516
12528
|
};
|
|
12517
12529
|
//#endregion
|
|
12518
12530
|
//#region src/components/EditableText/EditableTextDisplay.tsx
|
|
12519
|
-
const
|
|
12531
|
+
const PolymorphicStyledEditableTextDisplay = withPolymorphicAs(styled.div`
|
|
12520
12532
|
${({ $typographicVariant }) => getTypographicStyles($typographicVariant)}
|
|
12521
12533
|
padding: var(--wui-editable-text-padding);
|
|
12522
12534
|
border-radius: var(--wui-editable-text-border-radius);
|
|
@@ -12547,7 +12559,7 @@ const StyledEditableTextDisplay = styled.div`
|
|
|
12547
12559
|
background-color: var(--wui-color-bg-surface-hover);
|
|
12548
12560
|
}
|
|
12549
12561
|
}
|
|
12550
|
-
|
|
12562
|
+
`);
|
|
12551
12563
|
const StyledHiddenTriggerButton = styled.button({ ...visuallyHiddenStyle });
|
|
12552
12564
|
const EditableTextDisplayComponent = ({ ref, asTrigger, renderAs, ...props }) => {
|
|
12553
12565
|
const context = useContext(EditableTextContext);
|
|
@@ -12563,7 +12575,7 @@ const EditableTextDisplayComponent = ({ ref, asTrigger, renderAs, ...props }) =>
|
|
|
12563
12575
|
if (isEditing) return null;
|
|
12564
12576
|
if (asTrigger && !context.readOnly) return /* @__PURE__ */ jsx(ClickRegion, {
|
|
12565
12577
|
targetRef: triggerButtonRef,
|
|
12566
|
-
children: /* @__PURE__ */ jsxs(
|
|
12578
|
+
children: /* @__PURE__ */ jsxs(PolymorphicStyledEditableTextDisplay, {
|
|
12567
12579
|
ref,
|
|
12568
12580
|
$maxLines: maxLines,
|
|
12569
12581
|
$minLines: minLines,
|
|
@@ -12579,7 +12591,7 @@ const EditableTextDisplayComponent = ({ ref, asTrigger, renderAs, ...props }) =>
|
|
|
12579
12591
|
})]
|
|
12580
12592
|
})
|
|
12581
12593
|
});
|
|
12582
|
-
return /* @__PURE__ */ jsx(
|
|
12594
|
+
return /* @__PURE__ */ jsx(PolymorphicStyledEditableTextDisplay, {
|
|
12583
12595
|
ref,
|
|
12584
12596
|
$maxLines: maxLines,
|
|
12585
12597
|
$minLines: minLines,
|
|
@@ -13234,7 +13246,7 @@ const getGridTemplateColumns = (maxColumns, minChildWidth, expandItems) => {
|
|
|
13234
13246
|
);
|
|
13235
13247
|
`;
|
|
13236
13248
|
};
|
|
13237
|
-
const
|
|
13249
|
+
const PolymorphicStyledGrid = withPolymorphicAs(styled.div`
|
|
13238
13250
|
--wui-grid-column-gap: ${({ $columnGap }) => `var(--wui-${$columnGap})`};
|
|
13239
13251
|
--wui-grid-row-gap: ${({ $rowGap }) => `var(--wui-${$rowGap})`};
|
|
13240
13252
|
|
|
@@ -13243,7 +13255,7 @@ const StyledGrid = styled.div`
|
|
|
13243
13255
|
width: 100%;
|
|
13244
13256
|
|
|
13245
13257
|
${({ $maxColumns, $minChildWidth, $expandItems }) => getGridTemplateColumns($maxColumns, $minChildWidth, $expandItems)}
|
|
13246
|
-
|
|
13258
|
+
`);
|
|
13247
13259
|
/**
|
|
13248
13260
|
* A flexible grid component that can either create a fixed number of columns
|
|
13249
13261
|
* or an auto-filling grid based on the minimum child width.
|
|
@@ -13256,7 +13268,7 @@ const GridComponent = ({ ref, children, columns = "auto", minChildWidth = "auto"
|
|
|
13256
13268
|
};
|
|
13257
13269
|
const responsiveColumns = useResponsiveProp(columns);
|
|
13258
13270
|
const responsiveMinChildWidth = useResponsiveProp(minChildWidth);
|
|
13259
|
-
return /* @__PURE__ */ jsx(
|
|
13271
|
+
return /* @__PURE__ */ jsx(PolymorphicStyledGrid, {
|
|
13260
13272
|
ref,
|
|
13261
13273
|
$columnGap: column,
|
|
13262
13274
|
$expandItems: expandItems,
|
|
@@ -14670,6 +14682,7 @@ const StyledBadgeContainer = styled.div`
|
|
|
14670
14682
|
color: var(--wui-color-text-secondary);
|
|
14671
14683
|
`;
|
|
14672
14684
|
const MenuItemButton = ({ children, appearance, command, icon, ref, ...props }) => {
|
|
14685
|
+
const gatedIcon = useGatedIcon();
|
|
14673
14686
|
let { colorScheme, badge } = props;
|
|
14674
14687
|
if (appearance === "dangerous") {
|
|
14675
14688
|
if (isNotUndefined(colorScheme)) console.warn("colorScheme prop is ignored when appearance is dangerous");
|
|
@@ -14681,7 +14694,7 @@ const MenuItemButton = ({ children, appearance, command, icon, ref, ...props })
|
|
|
14681
14694
|
height: "16px",
|
|
14682
14695
|
width: "16px"
|
|
14683
14696
|
},
|
|
14684
|
-
type:
|
|
14697
|
+
type: gatedIcon
|
|
14685
14698
|
});
|
|
14686
14699
|
return /* @__PURE__ */ jsxs(StyledButton, {
|
|
14687
14700
|
...props,
|
|
@@ -15640,6 +15653,7 @@ const StyledIndicatorContainer = styled.div`
|
|
|
15640
15653
|
align-items: center;
|
|
15641
15654
|
`;
|
|
15642
15655
|
const RadioCardDefaultLayout = ({ icon, label, description, showIndicator = true, isGated = false }) => {
|
|
15656
|
+
const gatedIcon = useGatedIcon();
|
|
15643
15657
|
return /* @__PURE__ */ jsxs(StyledCardContent, { children: [
|
|
15644
15658
|
showIndicator ? /* @__PURE__ */ jsx(StyledIndicatorContainer, {
|
|
15645
15659
|
$hasIcon: isNotNil(icon),
|
|
@@ -15650,7 +15664,7 @@ const RadioCardDefaultLayout = ({ icon, label, description, showIndicator = true
|
|
|
15650
15664
|
children: /* @__PURE__ */ jsx(Icon, {
|
|
15651
15665
|
colorScheme: "purple",
|
|
15652
15666
|
"data-testid": "wui-icon-sparkle",
|
|
15653
|
-
type:
|
|
15667
|
+
type: gatedIcon
|
|
15654
15668
|
})
|
|
15655
15669
|
}) : null,
|
|
15656
15670
|
/* @__PURE__ */ jsxs(Stack, {
|