@wistia/ui 0.4.11-beta.96fbeb40.e289270 → 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.96fbeb40.e289270
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
  *
@@ -40,6 +40,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
40
40
  var index_exports = {};
41
41
  __export(index_exports, {
42
42
  ActionButton: () => ActionButton,
43
+ AnalyticsCard: () => AnalyticsCard,
43
44
  Avatar: () => Avatar,
44
45
  Badge: () => Badge,
45
46
  Box: () => Box,
@@ -52,9 +53,6 @@ __export(index_exports, {
52
53
  CheckboxGroup: () => CheckboxGroup,
53
54
  CheckboxMenuItem: () => CheckboxMenuItem,
54
55
  ColorSchemeWrapper: () => ColorSchemeWrapper,
55
- DataCard: () => DataCard,
56
- DataCardTrend: () => DataCardTrend,
57
- DataCards: () => DataCards,
58
56
  Divider: () => Divider,
59
57
  Ellipsis: () => Ellipsis,
60
58
  Form: () => Form,
@@ -9133,11 +9131,11 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
9133
9131
  ] });
9134
9132
  };
9135
9133
 
9136
- // src/components/DataCards/DataCard.tsx
9134
+ // src/components/AnalyticsCards/AnalyticsCard.tsx
9137
9135
  var import_styled_components59 = __toESM(require("styled-components"));
9138
9136
  var import_type_guards34 = require("@wistia/type-guards");
9139
9137
  var import_jsx_runtime211 = require("react/jsx-runtime");
9140
- var StyledDataCard = import_styled_components59.default.div`
9138
+ var StyledAnalyticsCard = import_styled_components59.default.div`
9141
9139
  ${({ $colorScheme }) => getColorScheme($colorScheme)}
9142
9140
  display: grid;
9143
9141
  grid-template-areas: 'label slot' 'value value';
@@ -9148,7 +9146,6 @@ var StyledDataCard = import_styled_components59.default.div`
9148
9146
  background: var(--wui-color-bg-surface-secondary);
9149
9147
  flex: 1;
9150
9148
  border-radius: var(--wui-border-radius-02);
9151
- position: relative;
9152
9149
  `;
9153
9150
  var shimmer = import_styled_components59.keyframes`
9154
9151
  0% {
@@ -9171,11 +9168,11 @@ var LoadingBackground = import_styled_components59.default.div`
9171
9168
  `;
9172
9169
  var StyledLoadingLabel = (0, import_styled_components59.default)(LoadingBackground)`
9173
9170
  width: 80px;
9174
- height: var(--wui-typography-heading-6-line-height);
9171
+ height: 20px;
9175
9172
  `;
9176
9173
  var StyledLoadingValue = (0, import_styled_components59.default)(LoadingBackground)`
9177
- width: 90%;
9178
- height: var(--wui-typography-heading-3-line-height);
9174
+ width: 120px;
9175
+ height: 32px;
9179
9176
  `;
9180
9177
  var StyledLabel4 = (0, import_styled_components59.default)(Heading)`
9181
9178
  grid-area: label;
@@ -9189,21 +9186,15 @@ var StyledSlot = import_styled_components59.default.div`
9189
9186
  grid-area: slot;
9190
9187
  align-self: center;
9191
9188
  `;
9192
- var StyledDataCardTrendContainer = import_styled_components59.default.div`
9193
- position: absolute;
9194
- bottom: var(--wui-space-01);
9195
- right: var(--wui-space-01);
9196
- `;
9197
- var DataCard = ({
9189
+ var AnalyticsCard = ({
9198
9190
  label,
9199
9191
  value,
9200
9192
  upperRightSlot,
9201
9193
  colorScheme = "inherit",
9202
9194
  isLoading = false,
9203
- trend,
9204
9195
  ...props
9205
9196
  }) => /* @__PURE__ */ (0, import_jsx_runtime211.jsxs)(
9206
- StyledDataCard,
9197
+ StyledAnalyticsCard,
9207
9198
  {
9208
9199
  $colorScheme: colorScheme,
9209
9200
  ...props,
@@ -9224,87 +9215,15 @@ var DataCard = ({
9224
9215
  children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(StyledLoadingValue, {}) : value
9225
9216
  }
9226
9217
  ),
9227
- (0, import_type_guards34.isNotNull)(upperRightSlot) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(StyledSlot, { children: upperRightSlot }),
9228
- (0, import_type_guards34.isNotNull)(trend) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(StyledDataCardTrendContainer, { children: trend })
9218
+ (0, import_type_guards34.isNotNull)(upperRightSlot) && /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(StyledSlot, { children: upperRightSlot })
9229
9219
  ]
9230
9220
  }
9231
9221
  );
9232
- DataCard.displayName = "DataCard";
9233
-
9234
- // src/components/DataCards/DataCards.tsx
9235
- var import_styled_components60 = __toESM(require("styled-components"));
9236
- var import_type_guards35 = require("@wistia/type-guards");
9237
- var import_jsx_runtime212 = require("react/jsx-runtime");
9238
- var StyledDataCards = (0, import_styled_components60.default)(Box)`
9239
- ${({ $colorScheme }) => getColorScheme($colorScheme)};
9240
- > * {
9241
- min-width: 120px;
9242
- max-width: ${({ $cardMaxWidth }) => (0, import_type_guards35.isNotUndefined)($cardMaxWidth) ? `${$cardMaxWidth}px` : "none"};
9243
- }
9244
- `;
9245
- var DataCards = ({
9246
- children,
9247
- cardMaxWidth,
9248
- colorScheme = "inherit",
9249
- ...props
9250
- }) => {
9251
- return /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(
9252
- StyledDataCards,
9253
- {
9254
- ...props,
9255
- $cardMaxWidth: cardMaxWidth,
9256
- $colorScheme: colorScheme,
9257
- direction: "row",
9258
- fill: "horizontal",
9259
- gap: "space-02",
9260
- renderAs: "dl",
9261
- wrapItems: true,
9262
- children
9263
- }
9264
- );
9265
- };
9266
- DataCards.displayName = "DataCards";
9267
-
9268
- // src/components/DataCards/DataCardTrend.tsx
9269
- var import_styled_components61 = __toESM(require("styled-components"));
9270
- var import_jsx_runtime213 = require("react/jsx-runtime");
9271
- var StyledDataCardTrend = import_styled_components61.default.div`
9272
- ${({ $outlook }) => getColorScheme($outlook === "positive" ? "success" : "error")};
9273
- background: var(--wui-color-bg-app);
9274
- border-radius: var(--wui-border-radius-rounded);
9275
- padding: var(--wui-space-01);
9276
- display: flex;
9277
- align-items: center;
9278
- gap: 2px;
9279
- `;
9280
- var DataCardTrend = ({
9281
- direction = "up",
9282
- outlook = "positive",
9283
- children,
9284
- ...props
9285
- }) => {
9286
- return /* @__PURE__ */ (0, import_jsx_runtime213.jsxs)(StyledDataCardTrend, { $outlook: outlook, children: [
9287
- /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(
9288
- Icon,
9289
- {
9290
- size: "md",
9291
- type: direction === "up" ? "arrow-up" : "arrow-down",
9292
- ...props
9293
- }
9294
- ),
9295
- /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(
9296
- Text,
9297
- {
9298
- prominence: "secondary",
9299
- variant: "label4",
9300
- children
9301
- }
9302
- )
9303
- ] });
9304
- };
9222
+ AnalyticsCard.displayName = "AnalyticsCard";
9305
9223
  // Annotate the CommonJS export names for ESM import in node:
9306
9224
  0 && (module.exports = {
9307
9225
  ActionButton,
9226
+ AnalyticsCard,
9308
9227
  Avatar,
9309
9228
  Badge,
9310
9229
  Box,
@@ -9317,9 +9236,6 @@ var DataCardTrend = ({
9317
9236
  CheckboxGroup,
9318
9237
  CheckboxMenuItem,
9319
9238
  ColorSchemeWrapper,
9320
- DataCard,
9321
- DataCardTrend,
9322
- DataCards,
9323
9239
  Divider,
9324
9240
  Ellipsis,
9325
9241
  Form,