@wistia/ui 0.18.17 → 0.18.18
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 +34 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +34 -30
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.18.
|
|
3
|
+
* @license @wistia/ui v0.18.18
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -14110,12 +14110,22 @@ var import_react62 = require("react");
|
|
|
14110
14110
|
var import_styled_components77 = require("styled-components");
|
|
14111
14111
|
var import_type_guards44 = require("@wistia/type-guards");
|
|
14112
14112
|
var import_jsx_runtime278 = require("react/jsx-runtime");
|
|
14113
|
+
var pulse = import_styled_components77.keyframes`
|
|
14114
|
+
0%,
|
|
14115
|
+
100% {
|
|
14116
|
+
opacity: 1;
|
|
14117
|
+
}
|
|
14118
|
+
50% {
|
|
14119
|
+
opacity: 0.5;
|
|
14120
|
+
}
|
|
14121
|
+
`;
|
|
14113
14122
|
var StyledDataCard = import_styled_components77.styled.div`
|
|
14114
14123
|
--wui-data-card-text: var(--wui-color-text-button);
|
|
14115
14124
|
--wui-color-text: var(--wui-data-card-text);
|
|
14116
14125
|
--wui-data-card-background: var(--wui-color-bg-surface-secondary);
|
|
14117
14126
|
--wui-data-card-background-hover: var(--wui-color-bg-surface-secondary-hover);
|
|
14118
14127
|
--wui-data-card-background-active: var(--wui-color-bg-surface-secondary-active);
|
|
14128
|
+
--wui-data-card-skeleton-color: var(--wui-color-bg-surface-tertiary);
|
|
14119
14129
|
|
|
14120
14130
|
display: grid;
|
|
14121
14131
|
grid-template-areas: 'label slot' 'value value';
|
|
@@ -14143,6 +14153,16 @@ var StyledDataCard = import_styled_components77.styled.div`
|
|
|
14143
14153
|
grid-template-rows: auto auto auto;
|
|
14144
14154
|
}
|
|
14145
14155
|
|
|
14156
|
+
[data-wui-data-card-skeleton='true'] {
|
|
14157
|
+
pointer-events: none;
|
|
14158
|
+
background-color: var(--wui-data-card-skeleton-color);
|
|
14159
|
+
animation: ${pulse} 1.5s var(--wui-motion-ease-in-out) 0.5s infinite;
|
|
14160
|
+
color: transparent;
|
|
14161
|
+
user-select: none;
|
|
14162
|
+
border-radius: var(--wui-border-radius-01);
|
|
14163
|
+
width: fit-content;
|
|
14164
|
+
}
|
|
14165
|
+
|
|
14146
14166
|
&[data-click-region] {
|
|
14147
14167
|
&:not([disabled]) {
|
|
14148
14168
|
cursor: pointer;
|
|
@@ -14174,6 +14194,7 @@ var StyledDataCard = import_styled_components77.styled.div`
|
|
|
14174
14194
|
--wui-data-card-background-hover: var(--wui-color-bg-surface-selected-hover);
|
|
14175
14195
|
--wui-data-card-background-active: var(--wui-color-bg-surface-selected-active);
|
|
14176
14196
|
--wui-data-card-focus-ring: var(--wui-color-border-selected);
|
|
14197
|
+
--wui-data-card-skeleton-color: var(--wui-color-bg-surface-selected-active);
|
|
14177
14198
|
}
|
|
14178
14199
|
}
|
|
14179
14200
|
|
|
@@ -14184,38 +14205,19 @@ var StyledDataCard = import_styled_components77.styled.div`
|
|
|
14184
14205
|
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
14185
14206
|
}
|
|
14186
14207
|
`;
|
|
14187
|
-
var shimmer = import_styled_components77.keyframes`
|
|
14188
|
-
0% {
|
|
14189
|
-
background-position: 200% 0;
|
|
14190
|
-
}
|
|
14191
|
-
100% {
|
|
14192
|
-
background-position: -200% 0;
|
|
14193
|
-
}
|
|
14194
|
-
`;
|
|
14195
|
-
var LoadingBackground = import_styled_components77.styled.div`
|
|
14196
|
-
background: linear-gradient(
|
|
14197
|
-
90deg,
|
|
14198
|
-
var(--wui-color-bg-surface-tertiary) 25%,
|
|
14199
|
-
var(--wui-color-bg-surface-secondary) 37%,
|
|
14200
|
-
var(--wui-color-bg-surface-tertiary) 63%
|
|
14201
|
-
);
|
|
14202
|
-
background-size: 200% 100%;
|
|
14203
|
-
animation: ${shimmer} 1.5s infinite;
|
|
14204
|
-
border-radius: var(--wui-border-radius-01);
|
|
14205
|
-
`;
|
|
14206
|
-
var StyledLoadingLabel = (0, import_styled_components77.styled)(LoadingBackground)`
|
|
14207
|
-
width: 80px;
|
|
14208
|
-
height: var(--wui-typography-heading-6-line-height);
|
|
14209
|
-
`;
|
|
14210
|
-
var StyledLoadingValue = (0, import_styled_components77.styled)(LoadingBackground)`
|
|
14211
|
-
width: 90%;
|
|
14212
|
-
height: var(--wui-typography-heading-3-line-height);
|
|
14213
|
-
`;
|
|
14214
14208
|
var StyledLabel3 = (0, import_styled_components77.styled)(Heading)`
|
|
14215
14209
|
grid-area: label;
|
|
14210
|
+
|
|
14211
|
+
&[data-wui-data-card-skeleton='true'] {
|
|
14212
|
+
width: 80px;
|
|
14213
|
+
}
|
|
14216
14214
|
`;
|
|
14217
14215
|
var StyledValue = (0, import_styled_components77.styled)(Heading)`
|
|
14218
14216
|
grid-area: value;
|
|
14217
|
+
|
|
14218
|
+
&[data-wui-data-card-skeleton='true'] {
|
|
14219
|
+
width: min(90%, 156px);
|
|
14220
|
+
}
|
|
14219
14221
|
`;
|
|
14220
14222
|
var StyledSlot = import_styled_components77.styled.div`
|
|
14221
14223
|
display: flex;
|
|
@@ -14249,17 +14251,19 @@ var DataCardInner = ({
|
|
|
14249
14251
|
/* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
|
|
14250
14252
|
StyledLabel3,
|
|
14251
14253
|
{
|
|
14254
|
+
"data-wui-data-card-skeleton": isLoading,
|
|
14252
14255
|
renderAs: "dt",
|
|
14253
14256
|
variant: "heading6",
|
|
14254
|
-
children:
|
|
14257
|
+
children: label
|
|
14255
14258
|
}
|
|
14256
14259
|
),
|
|
14257
14260
|
/* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
|
|
14258
14261
|
StyledValue,
|
|
14259
14262
|
{
|
|
14263
|
+
"data-wui-data-card-skeleton": isLoading,
|
|
14260
14264
|
renderAs: "dd",
|
|
14261
14265
|
variant: "heading3",
|
|
14262
|
-
children:
|
|
14266
|
+
children: value
|
|
14263
14267
|
}
|
|
14264
14268
|
),
|
|
14265
14269
|
(0, import_type_guards44.isNotNil)(upperRightSlot) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(StyledSlot, { children: upperRightSlot }),
|