@wistia/ui 0.18.17-beta.0c8ce664.ca5f64a → 0.18.17-beta.0f6de3dd.0b7f75e
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 +31 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +30 -34
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- /package/dist/{index.d.mts → index.d.cts} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.18.17-beta.
|
|
3
|
+
* @license @wistia/ui v0.18.17-beta.0f6de3dd.0b7f75e
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -13958,22 +13958,12 @@ import { useRef as useRef15 } from "react";
|
|
|
13958
13958
|
import { styled as styled58, keyframes as keyframes4 } from "styled-components";
|
|
13959
13959
|
import { isNotNil as isNotNil25 } from "@wistia/type-guards";
|
|
13960
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
|
-
`;
|
|
13970
13961
|
var StyledDataCard = styled58.div`
|
|
13971
13962
|
--wui-data-card-text: var(--wui-color-text-button);
|
|
13972
13963
|
--wui-color-text: var(--wui-data-card-text);
|
|
13973
13964
|
--wui-data-card-background: var(--wui-color-bg-surface-secondary);
|
|
13974
13965
|
--wui-data-card-background-hover: var(--wui-color-bg-surface-secondary-hover);
|
|
13975
13966
|
--wui-data-card-background-active: var(--wui-color-bg-surface-secondary-active);
|
|
13976
|
-
--wui-data-card-skeleton-color: var(--wui-color-bg-surface-tertiary);
|
|
13977
13967
|
|
|
13978
13968
|
display: grid;
|
|
13979
13969
|
grid-template-areas: 'label slot' 'value value';
|
|
@@ -14001,16 +13991,6 @@ var StyledDataCard = styled58.div`
|
|
|
14001
13991
|
grid-template-rows: auto auto auto;
|
|
14002
13992
|
}
|
|
14003
13993
|
|
|
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
|
-
border-radius: var(--wui-border-radius-01);
|
|
14011
|
-
width: fit-content;
|
|
14012
|
-
}
|
|
14013
|
-
|
|
14014
13994
|
&[data-click-region] {
|
|
14015
13995
|
&:not([disabled]) {
|
|
14016
13996
|
cursor: pointer;
|
|
@@ -14042,7 +14022,6 @@ var StyledDataCard = styled58.div`
|
|
|
14042
14022
|
--wui-data-card-background-hover: var(--wui-color-bg-surface-selected-hover);
|
|
14043
14023
|
--wui-data-card-background-active: var(--wui-color-bg-surface-selected-active);
|
|
14044
14024
|
--wui-data-card-focus-ring: var(--wui-color-border-selected);
|
|
14045
|
-
--wui-data-card-skeleton-color: var(--wui-color-bg-surface-selected-active);
|
|
14046
14025
|
}
|
|
14047
14026
|
}
|
|
14048
14027
|
|
|
@@ -14053,19 +14032,38 @@ var StyledDataCard = styled58.div`
|
|
|
14053
14032
|
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
14054
14033
|
}
|
|
14055
14034
|
`;
|
|
14035
|
+
var shimmer = keyframes4`
|
|
14036
|
+
0% {
|
|
14037
|
+
background-position: 200% 0;
|
|
14038
|
+
}
|
|
14039
|
+
100% {
|
|
14040
|
+
background-position: -200% 0;
|
|
14041
|
+
}
|
|
14042
|
+
`;
|
|
14043
|
+
var LoadingBackground = styled58.div`
|
|
14044
|
+
background: linear-gradient(
|
|
14045
|
+
90deg,
|
|
14046
|
+
var(--wui-color-bg-surface-tertiary) 25%,
|
|
14047
|
+
var(--wui-color-bg-surface-secondary) 37%,
|
|
14048
|
+
var(--wui-color-bg-surface-tertiary) 63%
|
|
14049
|
+
);
|
|
14050
|
+
background-size: 200% 100%;
|
|
14051
|
+
animation: ${shimmer} 1.5s infinite;
|
|
14052
|
+
border-radius: var(--wui-border-radius-01);
|
|
14053
|
+
`;
|
|
14054
|
+
var StyledLoadingLabel = styled58(LoadingBackground)`
|
|
14055
|
+
width: 80px;
|
|
14056
|
+
height: var(--wui-typography-heading-6-line-height);
|
|
14057
|
+
`;
|
|
14058
|
+
var StyledLoadingValue = styled58(LoadingBackground)`
|
|
14059
|
+
width: 90%;
|
|
14060
|
+
height: var(--wui-typography-heading-3-line-height);
|
|
14061
|
+
`;
|
|
14056
14062
|
var StyledLabel3 = styled58(Heading)`
|
|
14057
14063
|
grid-area: label;
|
|
14058
|
-
|
|
14059
|
-
&[data-wui-data-card-skeleton='true'] {
|
|
14060
|
-
width: 80px;
|
|
14061
|
-
}
|
|
14062
14064
|
`;
|
|
14063
14065
|
var StyledValue = styled58(Heading)`
|
|
14064
14066
|
grid-area: value;
|
|
14065
|
-
|
|
14066
|
-
&[data-wui-data-card-skeleton='true'] {
|
|
14067
|
-
width: min(90%, 156px);
|
|
14068
|
-
}
|
|
14069
14067
|
`;
|
|
14070
14068
|
var StyledSlot = styled58.div`
|
|
14071
14069
|
display: flex;
|
|
@@ -14099,19 +14097,17 @@ var DataCardInner = ({
|
|
|
14099
14097
|
/* @__PURE__ */ jsx278(
|
|
14100
14098
|
StyledLabel3,
|
|
14101
14099
|
{
|
|
14102
|
-
"data-wui-data-card-skeleton": isLoading,
|
|
14103
14100
|
renderAs: "dt",
|
|
14104
14101
|
variant: "heading6",
|
|
14105
|
-
children: label
|
|
14102
|
+
children: isLoading ? /* @__PURE__ */ jsx278(StyledLoadingLabel, {}) : label
|
|
14106
14103
|
}
|
|
14107
14104
|
),
|
|
14108
14105
|
/* @__PURE__ */ jsx278(
|
|
14109
14106
|
StyledValue,
|
|
14110
14107
|
{
|
|
14111
|
-
"data-wui-data-card-skeleton": isLoading,
|
|
14112
14108
|
renderAs: "dd",
|
|
14113
14109
|
variant: "heading3",
|
|
14114
|
-
children: value
|
|
14110
|
+
children: isLoading ? /* @__PURE__ */ jsx278(StyledLoadingValue, {}) : value
|
|
14115
14111
|
}
|
|
14116
14112
|
),
|
|
14117
14113
|
isNotNil25(upperRightSlot) && !isLoading && /* @__PURE__ */ jsx278(StyledSlot, { children: upperRightSlot }),
|