@wistia/ui 0.20.18 → 0.20.19
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 +5 -0
- package/dist/index.js +23 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3620,6 +3620,10 @@ type RadioCardDefaultLayoutProps = {
|
|
|
3620
3620
|
* Whether to show the indicator
|
|
3621
3621
|
*/
|
|
3622
3622
|
showIndicator?: boolean | undefined;
|
|
3623
|
+
/**
|
|
3624
|
+
* Whether to show the sparkle icon and gated styles
|
|
3625
|
+
*/
|
|
3626
|
+
isGated?: boolean | undefined;
|
|
3623
3627
|
};
|
|
3624
3628
|
|
|
3625
3629
|
type BaseRadioCardProps = Omit<ComponentPropsWithoutRef<'input'>, 'checked' | 'disabled' | 'id' | 'name' | 'onChange' | 'value'> & {
|
|
@@ -3657,6 +3661,7 @@ type RadioCardWithChildren = BaseRadioCardProps & {
|
|
|
3657
3661
|
label?: never;
|
|
3658
3662
|
description?: never;
|
|
3659
3663
|
showIndicator?: never;
|
|
3664
|
+
isGated?: never;
|
|
3660
3665
|
};
|
|
3661
3666
|
type RadioCardWithDefaultLayout = BaseRadioCardProps & RadioCardDefaultLayoutProps & {
|
|
3662
3667
|
children?: never;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.20.
|
|
3
|
+
* @license @wistia/ui v0.20.19
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2026, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -17672,7 +17672,7 @@ var StyledCard2 = styled90.label`
|
|
|
17672
17672
|
}
|
|
17673
17673
|
|
|
17674
17674
|
&:has(input:checked) {
|
|
17675
|
-
${checkedStyles}
|
|
17675
|
+
${({ $isGated }) => $isGated ? getColorScheme("purple") : checkedStyles}
|
|
17676
17676
|
}
|
|
17677
17677
|
|
|
17678
17678
|
&:has(input:disabled) {
|
|
@@ -17703,6 +17703,7 @@ var RadioCardRoot = forwardRef28(
|
|
|
17703
17703
|
children,
|
|
17704
17704
|
disabled = false,
|
|
17705
17705
|
id,
|
|
17706
|
+
isGated = false,
|
|
17706
17707
|
name,
|
|
17707
17708
|
onChange,
|
|
17708
17709
|
value,
|
|
@@ -17724,6 +17725,7 @@ var RadioCardRoot = forwardRef28(
|
|
|
17724
17725
|
StyledCard2,
|
|
17725
17726
|
{
|
|
17726
17727
|
$aspectRatio: aspectRatio,
|
|
17728
|
+
$isGated: isGated,
|
|
17727
17729
|
$padding: padding,
|
|
17728
17730
|
htmlFor: computedId,
|
|
17729
17731
|
children: [
|
|
@@ -17813,6 +17815,12 @@ var StyledCardContent = styled92.div`
|
|
|
17813
17815
|
var StyledCardIcon = styled92.div`
|
|
17814
17816
|
display: contents;
|
|
17815
17817
|
`;
|
|
17818
|
+
var StyledGatedIcon = styled92.div`
|
|
17819
|
+
position: absolute;
|
|
17820
|
+
right: 10px;
|
|
17821
|
+
top: 10px;
|
|
17822
|
+
z-index: 1;
|
|
17823
|
+
`;
|
|
17816
17824
|
var StyledIndicatorContainer = styled92.div`
|
|
17817
17825
|
height: ${({ $hasIcon }) => $hasIcon ? "24px" : "16px"};
|
|
17818
17826
|
display: flex;
|
|
@@ -17822,10 +17830,19 @@ var RadioCardDefaultLayout = ({
|
|
|
17822
17830
|
icon,
|
|
17823
17831
|
label,
|
|
17824
17832
|
description,
|
|
17825
|
-
showIndicator = true
|
|
17833
|
+
showIndicator = true,
|
|
17834
|
+
isGated = false
|
|
17826
17835
|
}) => {
|
|
17827
17836
|
return /* @__PURE__ */ jsxs60(StyledCardContent, { children: [
|
|
17828
17837
|
showIndicator ? /* @__PURE__ */ jsx328(StyledIndicatorContainer, { $hasIcon: isNotNil37(icon), children: /* @__PURE__ */ jsx328(RadioCardIndicator, { "data-testid": "wui-radio-card-indicator" }) }) : null,
|
|
17838
|
+
isGated ? /* @__PURE__ */ jsx328(StyledGatedIcon, { "data-testid": "wui-radio-gated-icon", children: /* @__PURE__ */ jsx328(
|
|
17839
|
+
Icon,
|
|
17840
|
+
{
|
|
17841
|
+
colorScheme: "purple",
|
|
17842
|
+
"data-testid": "wui-icon-sparkle",
|
|
17843
|
+
type: "sparkle"
|
|
17844
|
+
}
|
|
17845
|
+
) }) : null,
|
|
17829
17846
|
/* @__PURE__ */ jsxs60(Stack, { gap: "space-02", children: [
|
|
17830
17847
|
isNotNil37(icon) && /* @__PURE__ */ jsx328(StyledCardIcon, { "data-wui-radio-card-icon": true, children: icon }),
|
|
17831
17848
|
/* @__PURE__ */ jsxs60(
|
|
@@ -17860,11 +17877,12 @@ var RadioCardChildrenContainer = styled93.div`
|
|
|
17860
17877
|
// src/components/RadioCard/RadioCard.tsx
|
|
17861
17878
|
import { jsx as jsx329 } from "react/jsx-runtime";
|
|
17862
17879
|
var RadioCard = forwardRef29(
|
|
17863
|
-
({ icon, label, description, showIndicator, children, ...rootProps }, ref) => {
|
|
17880
|
+
({ icon, label, description, showIndicator, isGated, children, ...rootProps }, ref) => {
|
|
17864
17881
|
return /* @__PURE__ */ jsx329(
|
|
17865
17882
|
RadioCardRoot,
|
|
17866
17883
|
{
|
|
17867
17884
|
ref,
|
|
17885
|
+
isGated,
|
|
17868
17886
|
padding: children != null ? "space-00" : "space-04",
|
|
17869
17887
|
...rootProps,
|
|
17870
17888
|
children: children != null ? /* @__PURE__ */ jsx329(RadioCardChildrenContainer, { "data-wui-radio-card-image": "cover", children }) : /* @__PURE__ */ jsx329(
|
|
@@ -17872,6 +17890,7 @@ var RadioCard = forwardRef29(
|
|
|
17872
17890
|
{
|
|
17873
17891
|
description,
|
|
17874
17892
|
icon,
|
|
17893
|
+
isGated,
|
|
17875
17894
|
label,
|
|
17876
17895
|
showIndicator
|
|
17877
17896
|
}
|