@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.mjs 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
  *
@@ -1834,7 +1834,7 @@ var colorTokens = css11`
1834
1834
  ${colorAliasTokens}
1835
1835
  `;
1836
1836
  var designTokens = css11`
1837
- :where([data-wui-theme]) {
1837
+ :root {
1838
1838
  ${borderRadiusTokens}
1839
1839
  ${colorTokens}
1840
1840
  ${elevationTokens}
@@ -1973,14 +1973,7 @@ var UIProvider = ({ children }) => {
1973
1973
  }
1974
1974
  return /* @__PURE__ */ jsx3(UIProviderNestingContext.Provider, { value: true, children: /* @__PURE__ */ jsx3(AriaLiveProvider, { children: /* @__PURE__ */ jsxs(TooltipProvider, { children: [
1975
1975
  /* @__PURE__ */ jsx3(GlobalStyle, {}),
1976
- /* @__PURE__ */ jsx3(
1977
- "div",
1978
- {
1979
- "data-wui-theme": "true",
1980
- style: { display: "contents" },
1981
- children
1982
- }
1983
- ),
1976
+ children,
1984
1977
  /* @__PURE__ */ jsx3(ToastProvider, {})
1985
1978
  ] }) }) });
1986
1979
  };
@@ -13965,12 +13958,22 @@ import { useRef as useRef15 } from "react";
13965
13958
  import { styled as styled58, keyframes as keyframes4 } from "styled-components";
13966
13959
  import { isNotNil as isNotNil25 } from "@wistia/type-guards";
13967
13960
  import { jsx as jsx278, jsxs as jsxs41 } from "react/jsx-runtime";
13961
+ var pulse = keyframes4`
13962
+ 0%,
13963
+ 100% {
13964
+ opacity: 1;
13965
+ }
13966
+ 50% {
13967
+ opacity: 0.5;
13968
+ }
13969
+ `;
13968
13970
  var StyledDataCard = styled58.div`
13969
13971
  --wui-data-card-text: var(--wui-color-text-button);
13970
13972
  --wui-color-text: var(--wui-data-card-text);
13971
13973
  --wui-data-card-background: var(--wui-color-bg-surface-secondary);
13972
13974
  --wui-data-card-background-hover: var(--wui-color-bg-surface-secondary-hover);
13973
13975
  --wui-data-card-background-active: var(--wui-color-bg-surface-secondary-active);
13976
+ --wui-data-card-skeleton-color: var(--wui-color-bg-surface-tertiary);
13974
13977
 
13975
13978
  display: grid;
13976
13979
  grid-template-areas: 'label slot' 'value value';
@@ -13998,6 +14001,17 @@ var StyledDataCard = styled58.div`
13998
14001
  grid-template-rows: auto auto auto;
13999
14002
  }
14000
14003
 
14004
+ [data-wui-data-card-skeleton='true'] {
14005
+ pointer-events: none;
14006
+ background-color: var(--wui-data-card-skeleton-color);
14007
+ animation: ${pulse} 1.5s var(--wui-motion-ease-in-out) 0.5s infinite;
14008
+ color: transparent;
14009
+ user-select: none;
14010
+ pointer-events: none;
14011
+ border-radius: var(--wui-border-radius-01);
14012
+ width: fit-content;
14013
+ }
14014
+
14001
14015
  &[data-click-region] {
14002
14016
  &:not([disabled]) {
14003
14017
  cursor: pointer;
@@ -14029,6 +14043,7 @@ var StyledDataCard = styled58.div`
14029
14043
  --wui-data-card-background-hover: var(--wui-color-bg-surface-selected-hover);
14030
14044
  --wui-data-card-background-active: var(--wui-color-bg-surface-selected-active);
14031
14045
  --wui-data-card-focus-ring: var(--wui-color-border-selected);
14046
+ --wui-data-card-skeleton-color: var(--wui-color-bg-surface-selected-active);
14032
14047
  }
14033
14048
  }
14034
14049
 
@@ -14039,38 +14054,17 @@ var StyledDataCard = styled58.div`
14039
14054
  ${({ $colorScheme }) => getColorScheme($colorScheme)}
14040
14055
  }
14041
14056
  `;
14042
- var shimmer = keyframes4`
14043
- 0% {
14044
- background-position: 200% 0;
14045
- }
14046
- 100% {
14047
- background-position: -200% 0;
14048
- }
14049
- `;
14050
- var LoadingBackground = styled58.div`
14051
- background: linear-gradient(
14052
- 90deg,
14053
- var(--wui-color-bg-surface-tertiary) 25%,
14054
- var(--wui-color-bg-surface-secondary) 37%,
14055
- var(--wui-color-bg-surface-tertiary) 63%
14056
- );
14057
- background-size: 200% 100%;
14058
- animation: ${shimmer} 1.5s infinite;
14059
- border-radius: var(--wui-border-radius-01);
14060
- `;
14061
- var StyledLoadingLabel = styled58(LoadingBackground)`
14062
- width: 80px;
14063
- height: var(--wui-typography-heading-6-line-height);
14064
- `;
14065
- var StyledLoadingValue = styled58(LoadingBackground)`
14066
- width: 90%;
14067
- height: var(--wui-typography-heading-3-line-height);
14068
- `;
14069
14057
  var StyledLabel3 = styled58(Heading)`
14070
14058
  grid-area: label;
14059
+ &[data-wui-data-card-skeleton='true'] {
14060
+ width: 80px;
14061
+ }
14071
14062
  `;
14072
14063
  var StyledValue = styled58(Heading)`
14073
14064
  grid-area: value;
14065
+ &[data-wui-data-card-skeleton='true'] {
14066
+ width: min(90%, 156px);
14067
+ }
14074
14068
  `;
14075
14069
  var StyledSlot = styled58.div`
14076
14070
  display: flex;
@@ -14104,17 +14098,19 @@ var DataCardInner = ({
14104
14098
  /* @__PURE__ */ jsx278(
14105
14099
  StyledLabel3,
14106
14100
  {
14101
+ "data-wui-data-card-skeleton": isLoading,
14107
14102
  renderAs: "dt",
14108
14103
  variant: "heading6",
14109
- children: isLoading ? /* @__PURE__ */ jsx278(StyledLoadingLabel, {}) : label
14104
+ children: label
14110
14105
  }
14111
14106
  ),
14112
14107
  /* @__PURE__ */ jsx278(
14113
14108
  StyledValue,
14114
14109
  {
14110
+ "data-wui-data-card-skeleton": isLoading,
14115
14111
  renderAs: "dd",
14116
14112
  variant: "heading3",
14117
- children: isLoading ? /* @__PURE__ */ jsx278(StyledLoadingValue, {}) : value
14113
+ children: value
14118
14114
  }
14119
14115
  ),
14120
14116
  isNotNil25(upperRightSlot) && !isLoading && /* @__PURE__ */ jsx278(StyledSlot, { children: upperRightSlot }),