@wistia/ui 0.19.0 → 0.19.1-beta.5b34e7ca.ed12791
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 +44 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +21 -2
- package/dist/index.d.ts +21 -2
- package/dist/index.mjs +44 -16
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -471,6 +471,11 @@ type ActionButtonProps = {
|
|
|
471
471
|
* Disables the button
|
|
472
472
|
*/
|
|
473
473
|
disabled?: boolean;
|
|
474
|
+
/**
|
|
475
|
+
* @ignore
|
|
476
|
+
* Force a button into a particular css state (for debugging)
|
|
477
|
+
*/
|
|
478
|
+
forceState?: 'focus' | 'hover' | undefined;
|
|
474
479
|
/**
|
|
475
480
|
* Set the [color scheme](../?path=/docs/docs-color-schemes--docs) of the `ActionButton` when hovered. By default, it will inherit the `colorScheme` prop.
|
|
476
481
|
*/
|
|
@@ -499,6 +504,11 @@ declare const ActionButton: react.ForwardRefExoticComponent<(Omit<{
|
|
|
499
504
|
* Disables the button
|
|
500
505
|
*/
|
|
501
506
|
disabled?: boolean;
|
|
507
|
+
/**
|
|
508
|
+
* @ignore
|
|
509
|
+
* Force a button into a particular css state (for debugging)
|
|
510
|
+
*/
|
|
511
|
+
forceState?: "focus" | "hover" | undefined;
|
|
502
512
|
/**
|
|
503
513
|
* Set the [color scheme](../?path=/docs/docs-color-schemes--docs) of the `ActionButton` when hovered. By default, it will inherit the `colorScheme` prop.
|
|
504
514
|
*/
|
|
@@ -523,6 +533,11 @@ declare const ActionButton: react.ForwardRefExoticComponent<(Omit<{
|
|
|
523
533
|
* Disables the button
|
|
524
534
|
*/
|
|
525
535
|
disabled?: boolean;
|
|
536
|
+
/**
|
|
537
|
+
* @ignore
|
|
538
|
+
* Force a button into a particular css state (for debugging)
|
|
539
|
+
*/
|
|
540
|
+
forceState?: "focus" | "hover" | undefined;
|
|
526
541
|
/**
|
|
527
542
|
* Set the [color scheme](../?path=/docs/docs-color-schemes--docs) of the `ActionButton` when hovered. By default, it will inherit the `colorScheme` prop.
|
|
528
543
|
*/
|
|
@@ -1726,17 +1741,21 @@ type DataCardsProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
1726
1741
|
/**
|
|
1727
1742
|
* 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
1743
|
*/
|
|
1729
|
-
cardMaxWidth?: string;
|
|
1744
|
+
cardMaxWidth?: ResponsiveObject<string> | string;
|
|
1730
1745
|
/**
|
|
1731
1746
|
* Sets the color scheme of the cards, can be overriden at the card level
|
|
1732
1747
|
*/
|
|
1733
1748
|
colorScheme?: ColorSchemeTypes;
|
|
1749
|
+
/**
|
|
1750
|
+
* Desired number of columns to display.
|
|
1751
|
+
*/
|
|
1752
|
+
columns?: ResponsiveObject<number | 'auto'> | number | 'auto';
|
|
1734
1753
|
};
|
|
1735
1754
|
/**
|
|
1736
1755
|
* Displays a series of cards tailor made for displaying analytics data
|
|
1737
1756
|
*/
|
|
1738
1757
|
declare const DataCards: {
|
|
1739
|
-
({ children, cardMaxWidth, colorScheme, ...props }: DataCardsProps): JSX.Element;
|
|
1758
|
+
({ children, cardMaxWidth, colorScheme, columns, ...props }: DataCardsProps): JSX.Element;
|
|
1740
1759
|
displayName: string;
|
|
1741
1760
|
};
|
|
1742
1761
|
|
package/dist/index.d.ts
CHANGED
|
@@ -471,6 +471,11 @@ type ActionButtonProps = {
|
|
|
471
471
|
* Disables the button
|
|
472
472
|
*/
|
|
473
473
|
disabled?: boolean;
|
|
474
|
+
/**
|
|
475
|
+
* @ignore
|
|
476
|
+
* Force a button into a particular css state (for debugging)
|
|
477
|
+
*/
|
|
478
|
+
forceState?: 'focus' | 'hover' | undefined;
|
|
474
479
|
/**
|
|
475
480
|
* Set the [color scheme](../?path=/docs/docs-color-schemes--docs) of the `ActionButton` when hovered. By default, it will inherit the `colorScheme` prop.
|
|
476
481
|
*/
|
|
@@ -499,6 +504,11 @@ declare const ActionButton: react.ForwardRefExoticComponent<(Omit<{
|
|
|
499
504
|
* Disables the button
|
|
500
505
|
*/
|
|
501
506
|
disabled?: boolean;
|
|
507
|
+
/**
|
|
508
|
+
* @ignore
|
|
509
|
+
* Force a button into a particular css state (for debugging)
|
|
510
|
+
*/
|
|
511
|
+
forceState?: "focus" | "hover" | undefined;
|
|
502
512
|
/**
|
|
503
513
|
* Set the [color scheme](../?path=/docs/docs-color-schemes--docs) of the `ActionButton` when hovered. By default, it will inherit the `colorScheme` prop.
|
|
504
514
|
*/
|
|
@@ -523,6 +533,11 @@ declare const ActionButton: react.ForwardRefExoticComponent<(Omit<{
|
|
|
523
533
|
* Disables the button
|
|
524
534
|
*/
|
|
525
535
|
disabled?: boolean;
|
|
536
|
+
/**
|
|
537
|
+
* @ignore
|
|
538
|
+
* Force a button into a particular css state (for debugging)
|
|
539
|
+
*/
|
|
540
|
+
forceState?: "focus" | "hover" | undefined;
|
|
526
541
|
/**
|
|
527
542
|
* Set the [color scheme](../?path=/docs/docs-color-schemes--docs) of the `ActionButton` when hovered. By default, it will inherit the `colorScheme` prop.
|
|
528
543
|
*/
|
|
@@ -1726,17 +1741,21 @@ type DataCardsProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
1726
1741
|
/**
|
|
1727
1742
|
* 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
1743
|
*/
|
|
1729
|
-
cardMaxWidth?: string;
|
|
1744
|
+
cardMaxWidth?: ResponsiveObject<string> | string;
|
|
1730
1745
|
/**
|
|
1731
1746
|
* Sets the color scheme of the cards, can be overriden at the card level
|
|
1732
1747
|
*/
|
|
1733
1748
|
colorScheme?: ColorSchemeTypes;
|
|
1749
|
+
/**
|
|
1750
|
+
* Desired number of columns to display.
|
|
1751
|
+
*/
|
|
1752
|
+
columns?: ResponsiveObject<number | 'auto'> | number | 'auto';
|
|
1734
1753
|
};
|
|
1735
1754
|
/**
|
|
1736
1755
|
* Displays a series of cards tailor made for displaying analytics data
|
|
1737
1756
|
*/
|
|
1738
1757
|
declare const DataCards: {
|
|
1739
|
-
({ children, cardMaxWidth, colorScheme, ...props }: DataCardsProps): JSX.Element;
|
|
1758
|
+
({ children, cardMaxWidth, colorScheme, columns, ...props }: DataCardsProps): JSX.Element;
|
|
1740
1759
|
displayName: string;
|
|
1741
1760
|
};
|
|
1742
1761
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.19.
|
|
3
|
+
* @license @wistia/ui v0.19.1-beta.5b34e7ca.ed12791
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -3363,8 +3363,8 @@ var buttonExtraLargeStyles = css17`
|
|
|
3363
3363
|
`;
|
|
3364
3364
|
var ghostButtonVariant = css17`
|
|
3365
3365
|
--button-color-bg-override: transparent;
|
|
3366
|
-
--button-color-bg-hover: var(--wui-color-bg-surface-hover);
|
|
3367
|
-
--button-color-bg-active: var(--wui-color-bg-surface-active);
|
|
3366
|
+
--button-color-bg-hover: var(--wui-color-bg-surface-secondary-hover);
|
|
3367
|
+
--button-color-bg-active: var(--wui-color-bg-surface-secondary-active);
|
|
3368
3368
|
--button-color-text: var(--wui-color-text-button);
|
|
3369
3369
|
--button-color-icon: var(--wui-color-icon);
|
|
3370
3370
|
`;
|
|
@@ -3441,12 +3441,15 @@ var buttonBaseStyles = css17`
|
|
|
3441
3441
|
|
|
3442
3442
|
&:focus-visible,
|
|
3443
3443
|
&.force-state-focus {
|
|
3444
|
-
|
|
3445
|
-
|
|
3444
|
+
--wui-button-focus-color: var(--wui-color-focus-ring);
|
|
3445
|
+
|
|
3446
3446
|
background: var(--button-color-bg-hover);
|
|
3447
|
+
box-shadow:
|
|
3448
|
+
inset 0 0 0 2px var(--wui-button-focus-color),
|
|
3449
|
+
inset 0 0 0 3px var(--wui-color-bg-app);
|
|
3447
3450
|
|
|
3448
3451
|
&[aria-disabled='true'] {
|
|
3449
|
-
|
|
3452
|
+
--wui-button-focus-color: var(--wui-color-focus-ring-disabled);
|
|
3450
3453
|
}
|
|
3451
3454
|
}
|
|
3452
3455
|
|
|
@@ -8080,22 +8083,29 @@ var StyledActionButton = styled7(Button)`
|
|
|
8080
8083
|
}
|
|
8081
8084
|
|
|
8082
8085
|
&:hover,
|
|
8083
|
-
&:focus-visible
|
|
8086
|
+
&:focus-visible,
|
|
8087
|
+
&.force-state-hover,
|
|
8088
|
+
&.force-state-focus {
|
|
8084
8089
|
--wui-color-text: var(--wui-color-text-button);
|
|
8085
8090
|
|
|
8086
8091
|
${({ $hoverColorScheme }) => getColorScheme($hoverColorScheme)};
|
|
8087
8092
|
background: var(--wui-color-bg-surface-tertiary);
|
|
8088
8093
|
}
|
|
8089
8094
|
|
|
8090
|
-
&:focus-visible
|
|
8091
|
-
|
|
8092
|
-
|
|
8095
|
+
&:focus-visible,
|
|
8096
|
+
&.force-state-focus {
|
|
8097
|
+
--wui-action-button-focus-color: var(--wui-color-focus-ring);
|
|
8098
|
+
|
|
8099
|
+
box-shadow:
|
|
8100
|
+
inset 0 0 0 2px var(--wui-action-button-focus-color),
|
|
8101
|
+
inset 0 0 0 3px var(--wui-color-bg-app);
|
|
8093
8102
|
}
|
|
8094
8103
|
|
|
8095
8104
|
&[aria-disabled='true'] {
|
|
8105
|
+
--wui-action-button-focus-color: var(--wui-color-focus-ring-disabled);
|
|
8106
|
+
|
|
8096
8107
|
background: var(--wui-color-bg-surface-disabled);
|
|
8097
8108
|
color: var(--wui-color-text-disabled);
|
|
8098
|
-
outline-color: var(--wui-color-focus-ring-disabled);
|
|
8099
8109
|
cursor: not-allowed;
|
|
8100
8110
|
|
|
8101
8111
|
&& {
|
|
@@ -8133,7 +8143,9 @@ var StyledSecondaryIcon = styled7.div`
|
|
|
8133
8143
|
opacity: 0;
|
|
8134
8144
|
transform: translateX(-16px);
|
|
8135
8145
|
${StyledActionButton}:hover:not([aria-disabled="true"]) &,
|
|
8136
|
-
|
|
8146
|
+
${StyledActionButton}:focus-visible:not([aria-disabled="true"]) &,
|
|
8147
|
+
${StyledActionButton}.force-state-hover:not([aria-disabled="true"]) &,
|
|
8148
|
+
${StyledActionButton}.force-state-focus:not([aria-disabled="true"]) & {
|
|
8137
8149
|
transform: translateX(0);
|
|
8138
8150
|
opacity: 1;
|
|
8139
8151
|
}
|
|
@@ -8162,6 +8174,7 @@ var ActionButton = forwardRef3(
|
|
|
8162
8174
|
icon,
|
|
8163
8175
|
colorScheme = "standard",
|
|
8164
8176
|
disabled = false,
|
|
8177
|
+
forceState,
|
|
8165
8178
|
hoverColorScheme,
|
|
8166
8179
|
variant = "default",
|
|
8167
8180
|
children,
|
|
@@ -8182,6 +8195,7 @@ var ActionButton = forwardRef3(
|
|
|
8182
8195
|
$colorScheme: colorScheme,
|
|
8183
8196
|
$hoverColorScheme: resolvedHoverColorScheme,
|
|
8184
8197
|
disabled,
|
|
8198
|
+
forceState,
|
|
8185
8199
|
unstyled: true,
|
|
8186
8200
|
children: [
|
|
8187
8201
|
/* @__PURE__ */ jsx210(StyledMainIcon, { children: icon }),
|
|
@@ -14059,6 +14073,10 @@ var StyledLabel3 = styled58(Heading)`
|
|
|
14059
14073
|
&[data-wui-data-card-skeleton='true'] {
|
|
14060
14074
|
width: 80px;
|
|
14061
14075
|
}
|
|
14076
|
+
|
|
14077
|
+
button {
|
|
14078
|
+
text-align: left;
|
|
14079
|
+
}
|
|
14062
14080
|
`;
|
|
14063
14081
|
var StyledValue = styled58(Heading)`
|
|
14064
14082
|
grid-area: value;
|
|
@@ -14100,7 +14118,7 @@ var DataCardInner = ({
|
|
|
14100
14118
|
StyledLabel3,
|
|
14101
14119
|
{
|
|
14102
14120
|
"data-wui-data-card-skeleton": isLoading,
|
|
14103
|
-
renderAs: "
|
|
14121
|
+
renderAs: "div",
|
|
14104
14122
|
variant: "heading6",
|
|
14105
14123
|
children: label
|
|
14106
14124
|
}
|
|
@@ -14109,7 +14127,7 @@ var DataCardInner = ({
|
|
|
14109
14127
|
StyledValue,
|
|
14110
14128
|
{
|
|
14111
14129
|
"data-wui-data-card-skeleton": isLoading,
|
|
14112
|
-
renderAs: "
|
|
14130
|
+
renderAs: "div",
|
|
14113
14131
|
variant: "heading3",
|
|
14114
14132
|
children: value
|
|
14115
14133
|
}
|
|
@@ -14162,9 +14180,16 @@ import { styled as styled59 } from "styled-components";
|
|
|
14162
14180
|
import { jsx as jsx279 } from "react/jsx-runtime";
|
|
14163
14181
|
var StyledDataCards = styled59(Box)`
|
|
14164
14182
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
14183
|
+
--wui-data-cards-column-count: ${({ $columns }) => $columns === "auto" ? void 0 : $columns};
|
|
14184
|
+
--wui-data-cards-total-column-gap-width: calc(var(--wui-data-cards-column-count) - 1) *
|
|
14185
|
+
var(--wui-space-02);
|
|
14186
|
+
--wui-data-cards-column-width: calc(
|
|
14187
|
+
(100% - var(--wui-data-cards-total-column-gap-width)) / var(--wui-data-cards-column-count)
|
|
14188
|
+
);
|
|
14165
14189
|
|
|
14166
14190
|
> * {
|
|
14167
14191
|
min-width: 120px;
|
|
14192
|
+
flex-basis: var(--wui-data-cards-column-width, 0);
|
|
14168
14193
|
max-width: ${({ $cardMaxWidth }) => $cardMaxWidth};
|
|
14169
14194
|
}
|
|
14170
14195
|
`;
|
|
@@ -14172,19 +14197,22 @@ var DataCards = ({
|
|
|
14172
14197
|
children,
|
|
14173
14198
|
cardMaxWidth = "none",
|
|
14174
14199
|
colorScheme = "inherit",
|
|
14200
|
+
columns = "auto",
|
|
14175
14201
|
...props
|
|
14176
14202
|
}) => {
|
|
14203
|
+
const responsiveCardMaxWidth = useResponsiveProp(cardMaxWidth);
|
|
14204
|
+
const responsiveColumns = useResponsiveProp(columns);
|
|
14177
14205
|
return /* @__PURE__ */ jsx279(
|
|
14178
14206
|
StyledDataCards,
|
|
14179
14207
|
{
|
|
14180
14208
|
...props,
|
|
14181
|
-
$cardMaxWidth:
|
|
14209
|
+
$cardMaxWidth: responsiveCardMaxWidth,
|
|
14182
14210
|
$colorScheme: colorScheme,
|
|
14211
|
+
$columns: responsiveColumns,
|
|
14183
14212
|
alignItems: "stretch",
|
|
14184
14213
|
direction: "row",
|
|
14185
14214
|
fill: "horizontal",
|
|
14186
14215
|
gap: "space-02",
|
|
14187
|
-
renderAs: "dl",
|
|
14188
14216
|
wrapItems: true,
|
|
14189
14217
|
children
|
|
14190
14218
|
}
|