@wistia/ui 0.18.17-beta.2be58098.c00c4ab → 0.18.17-beta.c1f00b80.e6809d4

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 CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v0.18.17-beta.2be58098.c00c4ab
3
+ * @license @wistia/ui v0.18.17-beta.c1f00b80.e6809d4
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -2025,7 +2025,7 @@ var colorTokens = import_styled_components11.css`
2025
2025
  ${colorAliasTokens}
2026
2026
  `;
2027
2027
  var designTokens = import_styled_components11.css`
2028
- :where([data-wui-theme]) {
2028
+ :root {
2029
2029
  ${borderRadiusTokens}
2030
2030
  ${colorTokens}
2031
2031
  ${elevationTokens}
@@ -2164,14 +2164,7 @@ var UIProvider = ({ children }) => {
2164
2164
  }
2165
2165
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(UIProviderNestingContext.Provider, { value: true, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AriaLiveProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_tooltip.Provider, { children: [
2166
2166
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(GlobalStyle, {}),
2167
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2168
- "div",
2169
- {
2170
- "data-wui-theme": "true",
2171
- style: { display: "contents" },
2172
- children
2173
- }
2174
- ),
2167
+ children,
2175
2168
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ToastProvider, {})
2176
2169
  ] }) }) });
2177
2170
  };
@@ -14117,12 +14110,22 @@ var import_react62 = require("react");
14117
14110
  var import_styled_components77 = require("styled-components");
14118
14111
  var import_type_guards44 = require("@wistia/type-guards");
14119
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
+ `;
14120
14122
  var StyledDataCard = import_styled_components77.styled.div`
14121
14123
  --wui-data-card-text: var(--wui-color-text-button);
14122
14124
  --wui-color-text: var(--wui-data-card-text);
14123
14125
  --wui-data-card-background: var(--wui-color-bg-surface-secondary);
14124
14126
  --wui-data-card-background-hover: var(--wui-color-bg-surface-secondary-hover);
14125
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);
14126
14129
 
14127
14130
  display: grid;
14128
14131
  grid-template-areas: 'label slot' 'value value';
@@ -14150,6 +14153,17 @@ var StyledDataCard = import_styled_components77.styled.div`
14150
14153
  grid-template-rows: auto auto auto;
14151
14154
  }
14152
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
+ pointer-events: none;
14163
+ border-radius: var(--wui-border-radius-01);
14164
+ width: fit-content;
14165
+ }
14166
+
14153
14167
  &[data-click-region] {
14154
14168
  &:not([disabled]) {
14155
14169
  cursor: pointer;
@@ -14181,6 +14195,7 @@ var StyledDataCard = import_styled_components77.styled.div`
14181
14195
  --wui-data-card-background-hover: var(--wui-color-bg-surface-selected-hover);
14182
14196
  --wui-data-card-background-active: var(--wui-color-bg-surface-selected-active);
14183
14197
  --wui-data-card-focus-ring: var(--wui-color-border-selected);
14198
+ --wui-data-card-skeleton-color: var(--wui-color-bg-surface-selected-active);
14184
14199
  }
14185
14200
  }
14186
14201
 
@@ -14191,38 +14206,17 @@ var StyledDataCard = import_styled_components77.styled.div`
14191
14206
  ${({ $colorScheme }) => getColorScheme($colorScheme)}
14192
14207
  }
14193
14208
  `;
14194
- var shimmer = import_styled_components77.keyframes`
14195
- 0% {
14196
- background-position: 200% 0;
14197
- }
14198
- 100% {
14199
- background-position: -200% 0;
14200
- }
14201
- `;
14202
- var LoadingBackground = import_styled_components77.styled.div`
14203
- background: linear-gradient(
14204
- 90deg,
14205
- var(--wui-color-bg-surface-tertiary) 25%,
14206
- var(--wui-color-bg-surface-secondary) 37%,
14207
- var(--wui-color-bg-surface-tertiary) 63%
14208
- );
14209
- background-size: 200% 100%;
14210
- animation: ${shimmer} 1.5s infinite;
14211
- border-radius: var(--wui-border-radius-01);
14212
- `;
14213
- var StyledLoadingLabel = (0, import_styled_components77.styled)(LoadingBackground)`
14214
- width: 80px;
14215
- height: var(--wui-typography-heading-6-line-height);
14216
- `;
14217
- var StyledLoadingValue = (0, import_styled_components77.styled)(LoadingBackground)`
14218
- width: 90%;
14219
- height: var(--wui-typography-heading-3-line-height);
14220
- `;
14221
14209
  var StyledLabel3 = (0, import_styled_components77.styled)(Heading)`
14222
14210
  grid-area: label;
14211
+ &[data-wui-data-card-skeleton='true'] {
14212
+ width: 80px;
14213
+ }
14223
14214
  `;
14224
14215
  var StyledValue = (0, import_styled_components77.styled)(Heading)`
14225
14216
  grid-area: value;
14217
+ &[data-wui-data-card-skeleton='true'] {
14218
+ width: min(90%, 156px);
14219
+ }
14226
14220
  `;
14227
14221
  var StyledSlot = import_styled_components77.styled.div`
14228
14222
  display: flex;
@@ -14256,17 +14250,19 @@ var DataCardInner = ({
14256
14250
  /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
14257
14251
  StyledLabel3,
14258
14252
  {
14253
+ "data-wui-data-card-skeleton": isLoading,
14259
14254
  renderAs: "dt",
14260
14255
  variant: "heading6",
14261
- children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(StyledLoadingLabel, {}) : label
14256
+ children: label
14262
14257
  }
14263
14258
  ),
14264
14259
  /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
14265
14260
  StyledValue,
14266
14261
  {
14262
+ "data-wui-data-card-skeleton": isLoading,
14267
14263
  renderAs: "dd",
14268
14264
  variant: "heading3",
14269
- children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(StyledLoadingValue, {}) : value
14265
+ children: value
14270
14266
  }
14271
14267
  ),
14272
14268
  (0, import_type_guards44.isNotNil)(upperRightSlot) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(StyledSlot, { children: upperRightSlot }),