@wistia/ui 0.18.17-beta.c1f00b80.e6809d4 → 0.18.18-beta.5671ee8e.fdf9f16
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.cjs +21 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +10 -2
- package/dist/index.d.ts +10 -2
- package/dist/index.mjs +21 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1723,20 +1723,28 @@ type DataCardsProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
1723
1723
|
* Should be at least one `DataCard` component
|
|
1724
1724
|
*/
|
|
1725
1725
|
children: ReactNode;
|
|
1726
|
+
/**
|
|
1727
|
+
* String to pass to the `min-width` property of its children. [View the syntax on MDN →](https://developer.mozilla.org/en-US/docs/Web/CSS/min-width#syntax)
|
|
1728
|
+
*/
|
|
1729
|
+
cardMinWidth?: ResponsiveObject<string> | string;
|
|
1726
1730
|
/**
|
|
1727
1731
|
* String to pass to the `max-width` property of its children. [View the syntax on MDN →](https://developer.mozilla.org/en-US/docs/Web/CSS/max-width#syntax)
|
|
1728
1732
|
*/
|
|
1729
|
-
cardMaxWidth?: string;
|
|
1733
|
+
cardMaxWidth?: ResponsiveObject<string> | string;
|
|
1730
1734
|
/**
|
|
1731
1735
|
* Sets the color scheme of the cards, can be overriden at the card level
|
|
1732
1736
|
*/
|
|
1733
1737
|
colorScheme?: ColorSchemeTypes;
|
|
1738
|
+
/**
|
|
1739
|
+
* Desired number of columns to display.
|
|
1740
|
+
*/
|
|
1741
|
+
columns?: ResponsiveObject<number | 'auto'> | number | 'auto';
|
|
1734
1742
|
};
|
|
1735
1743
|
/**
|
|
1736
1744
|
* Displays a series of cards tailor made for displaying analytics data
|
|
1737
1745
|
*/
|
|
1738
1746
|
declare const DataCards: {
|
|
1739
|
-
({ children, cardMaxWidth, colorScheme, ...props }: DataCardsProps): JSX.Element;
|
|
1747
|
+
({ children, cardMinWidth, cardMaxWidth, colorScheme, columns, ...props }: DataCardsProps): JSX.Element;
|
|
1740
1748
|
displayName: string;
|
|
1741
1749
|
};
|
|
1742
1750
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1723,20 +1723,28 @@ type DataCardsProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
1723
1723
|
* Should be at least one `DataCard` component
|
|
1724
1724
|
*/
|
|
1725
1725
|
children: ReactNode;
|
|
1726
|
+
/**
|
|
1727
|
+
* String to pass to the `min-width` property of its children. [View the syntax on MDN →](https://developer.mozilla.org/en-US/docs/Web/CSS/min-width#syntax)
|
|
1728
|
+
*/
|
|
1729
|
+
cardMinWidth?: ResponsiveObject<string> | string;
|
|
1726
1730
|
/**
|
|
1727
1731
|
* String to pass to the `max-width` property of its children. [View the syntax on MDN →](https://developer.mozilla.org/en-US/docs/Web/CSS/max-width#syntax)
|
|
1728
1732
|
*/
|
|
1729
|
-
cardMaxWidth?: string;
|
|
1733
|
+
cardMaxWidth?: ResponsiveObject<string> | string;
|
|
1730
1734
|
/**
|
|
1731
1735
|
* Sets the color scheme of the cards, can be overriden at the card level
|
|
1732
1736
|
*/
|
|
1733
1737
|
colorScheme?: ColorSchemeTypes;
|
|
1738
|
+
/**
|
|
1739
|
+
* Desired number of columns to display.
|
|
1740
|
+
*/
|
|
1741
|
+
columns?: ResponsiveObject<number | 'auto'> | number | 'auto';
|
|
1734
1742
|
};
|
|
1735
1743
|
/**
|
|
1736
1744
|
* Displays a series of cards tailor made for displaying analytics data
|
|
1737
1745
|
*/
|
|
1738
1746
|
declare const DataCards: {
|
|
1739
|
-
({ children, cardMaxWidth, colorScheme, ...props }: DataCardsProps): JSX.Element;
|
|
1747
|
+
({ children, cardMinWidth, cardMaxWidth, colorScheme, columns, ...props }: DataCardsProps): JSX.Element;
|
|
1740
1748
|
displayName: string;
|
|
1741
1749
|
};
|
|
1742
1750
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.18.
|
|
3
|
+
* @license @wistia/ui v0.18.18-beta.5671ee8e.fdf9f16
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -14007,7 +14007,6 @@ var StyledDataCard = styled58.div`
|
|
|
14007
14007
|
animation: ${pulse} 1.5s var(--wui-motion-ease-in-out) 0.5s infinite;
|
|
14008
14008
|
color: transparent;
|
|
14009
14009
|
user-select: none;
|
|
14010
|
-
pointer-events: none;
|
|
14011
14010
|
border-radius: var(--wui-border-radius-01);
|
|
14012
14011
|
width: fit-content;
|
|
14013
14012
|
}
|
|
@@ -14056,12 +14055,14 @@ var StyledDataCard = styled58.div`
|
|
|
14056
14055
|
`;
|
|
14057
14056
|
var StyledLabel3 = styled58(Heading)`
|
|
14058
14057
|
grid-area: label;
|
|
14058
|
+
|
|
14059
14059
|
&[data-wui-data-card-skeleton='true'] {
|
|
14060
14060
|
width: 80px;
|
|
14061
14061
|
}
|
|
14062
14062
|
`;
|
|
14063
14063
|
var StyledValue = styled58(Heading)`
|
|
14064
14064
|
grid-area: value;
|
|
14065
|
+
|
|
14065
14066
|
&[data-wui-data-card-skeleton='true'] {
|
|
14066
14067
|
width: min(90%, 156px);
|
|
14067
14068
|
}
|
|
@@ -14099,7 +14100,7 @@ var DataCardInner = ({
|
|
|
14099
14100
|
StyledLabel3,
|
|
14100
14101
|
{
|
|
14101
14102
|
"data-wui-data-card-skeleton": isLoading,
|
|
14102
|
-
renderAs: "
|
|
14103
|
+
renderAs: "span",
|
|
14103
14104
|
variant: "heading6",
|
|
14104
14105
|
children: label
|
|
14105
14106
|
}
|
|
@@ -14108,7 +14109,7 @@ var DataCardInner = ({
|
|
|
14108
14109
|
StyledValue,
|
|
14109
14110
|
{
|
|
14110
14111
|
"data-wui-data-card-skeleton": isLoading,
|
|
14111
|
-
renderAs: "
|
|
14112
|
+
renderAs: "span",
|
|
14112
14113
|
variant: "heading3",
|
|
14113
14114
|
children: value
|
|
14114
14115
|
}
|
|
@@ -14161,29 +14162,42 @@ import { styled as styled59 } from "styled-components";
|
|
|
14161
14162
|
import { jsx as jsx279 } from "react/jsx-runtime";
|
|
14162
14163
|
var StyledDataCards = styled59(Box)`
|
|
14163
14164
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
14165
|
+
--wui-data-cards-column-count: ${({ $columns }) => $columns === "auto" ? void 0 : $columns};
|
|
14166
|
+
--wui-data-cards-total-column-gap-width: calc(var(--wui-data-cards-column-count) - 1) *
|
|
14167
|
+
var(--wui-space-02);
|
|
14168
|
+
--wui-data-cards-column-width: calc(
|
|
14169
|
+
(100% - var(--wui-data-cards-total-column-gap-width)) / var(--wui-data-cards-column-count)
|
|
14170
|
+
);
|
|
14164
14171
|
|
|
14165
14172
|
> * {
|
|
14166
|
-
min-width:
|
|
14173
|
+
min-width: ${({ $cardMinWidth }) => $cardMinWidth};
|
|
14174
|
+
flex-basis: var(--wui-data-cards-column-width, 0);
|
|
14167
14175
|
max-width: ${({ $cardMaxWidth }) => $cardMaxWidth};
|
|
14168
14176
|
}
|
|
14169
14177
|
`;
|
|
14170
14178
|
var DataCards = ({
|
|
14171
14179
|
children,
|
|
14180
|
+
cardMinWidth = "120px",
|
|
14172
14181
|
cardMaxWidth = "none",
|
|
14173
14182
|
colorScheme = "inherit",
|
|
14183
|
+
columns = "auto",
|
|
14174
14184
|
...props
|
|
14175
14185
|
}) => {
|
|
14186
|
+
const responsiveCardMinWidth = useResponsiveProp(cardMinWidth);
|
|
14187
|
+
const responsiveCardMaxWidth = useResponsiveProp(cardMaxWidth);
|
|
14188
|
+
const responsiveColumns = useResponsiveProp(columns);
|
|
14176
14189
|
return /* @__PURE__ */ jsx279(
|
|
14177
14190
|
StyledDataCards,
|
|
14178
14191
|
{
|
|
14179
14192
|
...props,
|
|
14180
|
-
$cardMaxWidth:
|
|
14193
|
+
$cardMaxWidth: responsiveCardMaxWidth,
|
|
14194
|
+
$cardMinWidth: responsiveCardMinWidth,
|
|
14181
14195
|
$colorScheme: colorScheme,
|
|
14196
|
+
$columns: responsiveColumns,
|
|
14182
14197
|
alignItems: "stretch",
|
|
14183
14198
|
direction: "row",
|
|
14184
14199
|
fill: "horizontal",
|
|
14185
14200
|
gap: "space-02",
|
|
14186
|
-
renderAs: "dl",
|
|
14187
14201
|
wrapItems: true,
|
|
14188
14202
|
children
|
|
14189
14203
|
}
|