@wistia/ui 0.4.11-beta.87f57f6f.273b456 → 0.4.11-beta.b2fd894e.ecae805

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.4.11-beta.87f57f6f.273b456
3
+ * @license @wistia/ui v0.4.11-beta.b2fd894e.ecae805
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -9147,6 +9147,33 @@ var StyledAnalyticsCard = import_styled_components59.default.div`
9147
9147
  flex: 1;
9148
9148
  border-radius: var(--wui-border-radius-02);
9149
9149
  `;
9150
+ var shimmer = import_styled_components59.keyframes`
9151
+ 0% {
9152
+ background-position: 200% 0;
9153
+ }
9154
+ 100% {
9155
+ background-position: -200% 0;
9156
+ }
9157
+ `;
9158
+ var LoadingBackground = import_styled_components59.default.div`
9159
+ background: linear-gradient(
9160
+ 90deg,
9161
+ var(--wui-color-bg-surface-tertiary) 25%,
9162
+ var(--wui-color-bg-surface-secondary) 37%,
9163
+ var(--wui-color-bg-surface-tertiary) 63%
9164
+ );
9165
+ background-size: 200% 100%;
9166
+ animation: ${shimmer} 1.5s infinite;
9167
+ border-radius: var(--wui-border-radius-01);
9168
+ `;
9169
+ var StyledLoadingLabel = (0, import_styled_components59.default)(LoadingBackground)`
9170
+ width: 80px;
9171
+ height: 20px;
9172
+ `;
9173
+ var StyledLoadingValue = (0, import_styled_components59.default)(LoadingBackground)`
9174
+ width: 120px;
9175
+ height: 32px;
9176
+ `;
9150
9177
  var StyledLabel4 = (0, import_styled_components59.default)(Heading)`
9151
9178
  grid-area: label;
9152
9179
  `;
@@ -9162,8 +9189,9 @@ var StyledSlot = import_styled_components59.default.div`
9162
9189
  var AnalyticsCard = ({
9163
9190
  label,
9164
9191
  value,
9165
- slot,
9192
+ upperRightSlot,
9166
9193
  colorScheme = "inherit",
9194
+ isLoading = false,
9167
9195
  ...props
9168
9196
  }) => /* @__PURE__ */ (0, import_jsx_runtime211.jsxs)(
9169
9197
  StyledAnalyticsCard,
@@ -9176,7 +9204,7 @@ var AnalyticsCard = ({
9176
9204
  {
9177
9205
  renderAs: "dt",
9178
9206
  variant: "heading6",
9179
- children: label
9207
+ children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(StyledLoadingLabel, {}) : label
9180
9208
  }
9181
9209
  ),
9182
9210
  /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(
@@ -9184,10 +9212,10 @@ var AnalyticsCard = ({
9184
9212
  {
9185
9213
  renderAs: "dd",
9186
9214
  variant: "heading3",
9187
- children: value
9215
+ children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(StyledLoadingValue, {}) : value
9188
9216
  }
9189
9217
  ),
9190
- (0, import_type_guards34.isNotNull)(slot) && /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(StyledSlot, { children: slot })
9218
+ (0, import_type_guards34.isNotNull)(upperRightSlot) && /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(StyledSlot, { children: upperRightSlot })
9191
9219
  ]
9192
9220
  }
9193
9221
  );