@wistia/ui 0.4.10 → 0.4.11-beta.0a31ff17.2cd1f7c
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 +195 -61
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +85 -216
- package/dist/index.d.ts +85 -216
- package/dist/index.mjs +230 -98
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.4.
|
|
3
|
+
* @license @wistia/ui v0.4.11-beta.0a31ff17.2cd1f7c
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -52,6 +52,8 @@ __export(index_exports, {
|
|
|
52
52
|
CheckboxGroup: () => CheckboxGroup,
|
|
53
53
|
CheckboxMenuItem: () => CheckboxMenuItem,
|
|
54
54
|
ColorSchemeWrapper: () => ColorSchemeWrapper,
|
|
55
|
+
DataCard: () => DataCard,
|
|
56
|
+
DataCards: () => DataCards,
|
|
55
57
|
Divider: () => Divider,
|
|
56
58
|
Ellipsis: () => Ellipsis,
|
|
57
59
|
Form: () => Form,
|
|
@@ -6074,6 +6076,13 @@ Badge.displayName = "Badge";
|
|
|
6074
6076
|
var import_react16 = require("react");
|
|
6075
6077
|
var import_styled_components23 = __toESM(require("styled-components"));
|
|
6076
6078
|
var import_type_guards15 = require("@wistia/type-guards");
|
|
6079
|
+
|
|
6080
|
+
// src/private/helpers/makePolymorphic/makePolymorphic.tsx
|
|
6081
|
+
var makePolymorphic = (component) => {
|
|
6082
|
+
return component;
|
|
6083
|
+
};
|
|
6084
|
+
|
|
6085
|
+
// src/components/Box/Box.tsx
|
|
6077
6086
|
var import_jsx_runtime167 = require("react/jsx-runtime");
|
|
6078
6087
|
var isDev = process.env["NODE_ENV"] === "development" || process.env["NODE_ENV"] === "test";
|
|
6079
6088
|
var getGapStyle = (gap) => {
|
|
@@ -6117,7 +6126,7 @@ var getFillViewportStyle = (fillViewport) => {
|
|
|
6117
6126
|
}
|
|
6118
6127
|
return void 0;
|
|
6119
6128
|
};
|
|
6120
|
-
var
|
|
6129
|
+
var StyledBoxComponent = import_styled_components23.default.div`
|
|
6121
6130
|
align-content: ${({ $alignContent }) => $alignContent};
|
|
6122
6131
|
align-items: ${({ $alignItems }) => $alignItems};
|
|
6123
6132
|
align-self: ${({ $alignSelf }) => $alignSelf ?? null};
|
|
@@ -6151,50 +6160,56 @@ var wrapChildren = (children) => {
|
|
|
6151
6160
|
}
|
|
6152
6161
|
return null;
|
|
6153
6162
|
};
|
|
6154
|
-
var
|
|
6155
|
-
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
|
|
6166
|
-
|
|
6167
|
-
|
|
6168
|
-
|
|
6169
|
-
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
-
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
|
|
6184
|
-
|
|
6185
|
-
|
|
6186
|
-
|
|
6187
|
-
|
|
6188
|
-
|
|
6189
|
-
|
|
6190
|
-
|
|
6191
|
-
|
|
6192
|
-
|
|
6193
|
-
|
|
6194
|
-
|
|
6195
|
-
|
|
6196
|
-
|
|
6197
|
-
|
|
6163
|
+
var DEFAULT_ELEMENT = "div";
|
|
6164
|
+
var BoxComponent = (0, import_react16.forwardRef)(
|
|
6165
|
+
({
|
|
6166
|
+
alignContent = "stretch",
|
|
6167
|
+
alignItems = "flex-start",
|
|
6168
|
+
alignSelf,
|
|
6169
|
+
basis,
|
|
6170
|
+
children,
|
|
6171
|
+
direction = "row",
|
|
6172
|
+
fill = false,
|
|
6173
|
+
fillViewport = false,
|
|
6174
|
+
gap,
|
|
6175
|
+
grow,
|
|
6176
|
+
hasBoxParent = false,
|
|
6177
|
+
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
6178
|
+
inline = false,
|
|
6179
|
+
justifyContent = "flex-start",
|
|
6180
|
+
order,
|
|
6181
|
+
renderAs,
|
|
6182
|
+
shrink,
|
|
6183
|
+
wrapItems = false,
|
|
6184
|
+
...otherProps
|
|
6185
|
+
}, ref) => {
|
|
6186
|
+
return /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
|
|
6187
|
+
StyledBoxComponent,
|
|
6188
|
+
{
|
|
6189
|
+
ref,
|
|
6190
|
+
$alignContent: alignContent,
|
|
6191
|
+
$alignItems: alignItems,
|
|
6192
|
+
$alignSelf: alignSelf,
|
|
6193
|
+
$basis: basis,
|
|
6194
|
+
$fillBox: fill,
|
|
6195
|
+
$fillViewport: fillViewport,
|
|
6196
|
+
$flexDirection: direction,
|
|
6197
|
+
$gap: gap,
|
|
6198
|
+
$grow: grow,
|
|
6199
|
+
$inline: inline,
|
|
6200
|
+
$justifyContent: justifyContent,
|
|
6201
|
+
$order: order,
|
|
6202
|
+
$shrink: shrink,
|
|
6203
|
+
$wrapItems: wrapItems,
|
|
6204
|
+
as: renderAs ?? DEFAULT_ELEMENT,
|
|
6205
|
+
...otherProps,
|
|
6206
|
+
children: wrapChildren(children)
|
|
6207
|
+
}
|
|
6208
|
+
);
|
|
6209
|
+
}
|
|
6210
|
+
);
|
|
6211
|
+
BoxComponent.displayName = "Box";
|
|
6212
|
+
var Box = makePolymorphic(BoxComponent);
|
|
6198
6213
|
|
|
6199
6214
|
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
6200
6215
|
var import_styled_components24 = __toESM(require("styled-components"));
|
|
@@ -6364,13 +6379,6 @@ var import_styled_components28 = __toESM(require("styled-components"));
|
|
|
6364
6379
|
// src/components/Heading/Heading.tsx
|
|
6365
6380
|
var import_react17 = require("react");
|
|
6366
6381
|
var import_styled_components27 = __toESM(require("styled-components"));
|
|
6367
|
-
|
|
6368
|
-
// src/private/helpers/makePolymorphic/makePolymorphic.tsx
|
|
6369
|
-
var makePolymorphic = (component) => {
|
|
6370
|
-
return component;
|
|
6371
|
-
};
|
|
6372
|
-
|
|
6373
|
-
// src/components/Heading/Heading.tsx
|
|
6374
6382
|
var import_jsx_runtime172 = require("react/jsx-runtime");
|
|
6375
6383
|
var heroStyle = import_styled_components27.css`
|
|
6376
6384
|
--font-family: var(--wui-typography-heading-hero-family);
|
|
@@ -6423,7 +6431,7 @@ var variantStyleMap = {
|
|
|
6423
6431
|
heading5: heading5TextStyle,
|
|
6424
6432
|
heading6: heading6TextStyle
|
|
6425
6433
|
};
|
|
6426
|
-
var
|
|
6434
|
+
var DEFAULT_ELEMENT2 = "h1";
|
|
6427
6435
|
var StyledHeading = import_styled_components27.default.div`
|
|
6428
6436
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
6429
6437
|
font-family: var(--font-family);
|
|
@@ -6448,8 +6456,8 @@ var StyledHeading = import_styled_components27.default.div`
|
|
|
6448
6456
|
margin: 0;
|
|
6449
6457
|
`;
|
|
6450
6458
|
var variantElementMap = {
|
|
6451
|
-
hero:
|
|
6452
|
-
heading1:
|
|
6459
|
+
hero: DEFAULT_ELEMENT2,
|
|
6460
|
+
heading1: DEFAULT_ELEMENT2,
|
|
6453
6461
|
heading2: "h2",
|
|
6454
6462
|
heading3: "h3",
|
|
6455
6463
|
heading4: "h4",
|
|
@@ -6751,7 +6759,7 @@ var import_type_guards19 = require("@wistia/type-guards");
|
|
|
6751
6759
|
var import_react19 = require("react");
|
|
6752
6760
|
var import_styled_components32 = __toESM(require("styled-components"));
|
|
6753
6761
|
var import_jsx_runtime177 = require("react/jsx-runtime");
|
|
6754
|
-
var
|
|
6762
|
+
var DEFAULT_ELEMENT3 = "div";
|
|
6755
6763
|
var StyledStack = import_styled_components32.default.div`
|
|
6756
6764
|
display: flex;
|
|
6757
6765
|
flex-direction: ${({ $direction }) => $direction === "horizontal" ? "row" : "column"};
|
|
@@ -6767,7 +6775,7 @@ var StackComponent = (0, import_react19.forwardRef)(
|
|
|
6767
6775
|
ref,
|
|
6768
6776
|
$direction: responsiveDirection,
|
|
6769
6777
|
$gap: responsiveGap,
|
|
6770
|
-
as: renderAs ??
|
|
6778
|
+
as: renderAs ?? DEFAULT_ELEMENT3,
|
|
6771
6779
|
...props
|
|
6772
6780
|
}
|
|
6773
6781
|
);
|
|
@@ -7088,7 +7096,7 @@ var StyledText = import_styled_components34.default.div`
|
|
|
7088
7096
|
display: block;
|
|
7089
7097
|
`}
|
|
7090
7098
|
`;
|
|
7091
|
-
var
|
|
7099
|
+
var DEFAULT_ELEMENT4 = "div";
|
|
7092
7100
|
var TextComponent = (0, import_react23.forwardRef)(
|
|
7093
7101
|
({
|
|
7094
7102
|
align = "left",
|
|
@@ -7114,7 +7122,7 @@ var TextComponent = (0, import_react23.forwardRef)(
|
|
|
7114
7122
|
$preventUserSelect: preventUserSelect,
|
|
7115
7123
|
$prominence: prominence,
|
|
7116
7124
|
$variant: variant,
|
|
7117
|
-
as: renderAs ??
|
|
7125
|
+
as: renderAs ?? DEFAULT_ELEMENT4,
|
|
7118
7126
|
...otherProps
|
|
7119
7127
|
}
|
|
7120
7128
|
);
|
|
@@ -8201,6 +8209,7 @@ var ModalContent = (0, import_react36.forwardRef)(
|
|
|
8201
8209
|
ref,
|
|
8202
8210
|
$fullHeight: fullHeight,
|
|
8203
8211
|
$width: width,
|
|
8212
|
+
"aria-describedby": void 0,
|
|
8204
8213
|
...otherProps,
|
|
8205
8214
|
children
|
|
8206
8215
|
}
|
|
@@ -8296,7 +8305,6 @@ var Modal = (0, import_react38.forwardRef)(
|
|
|
8296
8305
|
ModalContent,
|
|
8297
8306
|
{
|
|
8298
8307
|
ref,
|
|
8299
|
-
"aria-describedby": void 0,
|
|
8300
8308
|
fullHeight,
|
|
8301
8309
|
onOpenAutoFocus: (event) => {
|
|
8302
8310
|
if ((0, import_type_guards28.isNotNil)(initialFocusRef) && initialFocusRef.current) {
|
|
@@ -9123,6 +9131,130 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
|
9123
9131
|
children
|
|
9124
9132
|
] });
|
|
9125
9133
|
};
|
|
9134
|
+
|
|
9135
|
+
// src/components/DataCards/DataCard.tsx
|
|
9136
|
+
var import_styled_components59 = __toESM(require("styled-components"));
|
|
9137
|
+
var import_type_guards34 = require("@wistia/type-guards");
|
|
9138
|
+
var import_jsx_runtime211 = require("react/jsx-runtime");
|
|
9139
|
+
var StyledDataCard = import_styled_components59.default.div`
|
|
9140
|
+
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
9141
|
+
display: grid;
|
|
9142
|
+
grid-template-areas: 'label slot' 'value value';
|
|
9143
|
+
grid-template-rows: auto auto;
|
|
9144
|
+
grid-template-columns: auto auto;
|
|
9145
|
+
gap: var(--wui-space-01);
|
|
9146
|
+
padding: var(--wui-space-03);
|
|
9147
|
+
background: var(--wui-color-bg-surface-secondary);
|
|
9148
|
+
flex: 1;
|
|
9149
|
+
border-radius: var(--wui-border-radius-02);
|
|
9150
|
+
`;
|
|
9151
|
+
var shimmer = import_styled_components59.keyframes`
|
|
9152
|
+
0% {
|
|
9153
|
+
background-position: 200% 0;
|
|
9154
|
+
}
|
|
9155
|
+
100% {
|
|
9156
|
+
background-position: -200% 0;
|
|
9157
|
+
}
|
|
9158
|
+
`;
|
|
9159
|
+
var LoadingBackground = import_styled_components59.default.div`
|
|
9160
|
+
background: linear-gradient(
|
|
9161
|
+
90deg,
|
|
9162
|
+
var(--wui-color-bg-surface-tertiary) 25%,
|
|
9163
|
+
var(--wui-color-bg-surface-secondary) 37%,
|
|
9164
|
+
var(--wui-color-bg-surface-tertiary) 63%
|
|
9165
|
+
);
|
|
9166
|
+
background-size: 200% 100%;
|
|
9167
|
+
animation: ${shimmer} 1.5s infinite;
|
|
9168
|
+
border-radius: var(--wui-border-radius-01);
|
|
9169
|
+
`;
|
|
9170
|
+
var StyledLoadingLabel = (0, import_styled_components59.default)(LoadingBackground)`
|
|
9171
|
+
width: 80px;
|
|
9172
|
+
height: var(--wui-typography-heading-6-line-height);
|
|
9173
|
+
`;
|
|
9174
|
+
var StyledLoadingValue = (0, import_styled_components59.default)(LoadingBackground)`
|
|
9175
|
+
width: 90%;
|
|
9176
|
+
height: var(--wui-typography-heading-3-line-height);
|
|
9177
|
+
`;
|
|
9178
|
+
var StyledLabel4 = (0, import_styled_components59.default)(Heading)`
|
|
9179
|
+
grid-area: label;
|
|
9180
|
+
`;
|
|
9181
|
+
var StyledValue = (0, import_styled_components59.default)(Heading)`
|
|
9182
|
+
grid-area: value;
|
|
9183
|
+
`;
|
|
9184
|
+
var StyledSlot = import_styled_components59.default.div`
|
|
9185
|
+
display: flex;
|
|
9186
|
+
justify-content: flex-end;
|
|
9187
|
+
grid-area: slot;
|
|
9188
|
+
align-self: center;
|
|
9189
|
+
`;
|
|
9190
|
+
var DataCard = ({
|
|
9191
|
+
label,
|
|
9192
|
+
value,
|
|
9193
|
+
upperRightSlot,
|
|
9194
|
+
colorScheme = "inherit",
|
|
9195
|
+
isLoading = false,
|
|
9196
|
+
...props
|
|
9197
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime211.jsxs)(
|
|
9198
|
+
StyledDataCard,
|
|
9199
|
+
{
|
|
9200
|
+
$colorScheme: colorScheme,
|
|
9201
|
+
...props,
|
|
9202
|
+
children: [
|
|
9203
|
+
/* @__PURE__ */ (0, import_jsx_runtime211.jsx)(
|
|
9204
|
+
StyledLabel4,
|
|
9205
|
+
{
|
|
9206
|
+
renderAs: "dt",
|
|
9207
|
+
variant: "heading6",
|
|
9208
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(StyledLoadingLabel, {}) : label
|
|
9209
|
+
}
|
|
9210
|
+
),
|
|
9211
|
+
/* @__PURE__ */ (0, import_jsx_runtime211.jsx)(
|
|
9212
|
+
StyledValue,
|
|
9213
|
+
{
|
|
9214
|
+
renderAs: "dd",
|
|
9215
|
+
variant: "heading3",
|
|
9216
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(StyledLoadingValue, {}) : value
|
|
9217
|
+
}
|
|
9218
|
+
),
|
|
9219
|
+
(0, import_type_guards34.isNotNull)(upperRightSlot) && /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(StyledSlot, { children: upperRightSlot })
|
|
9220
|
+
]
|
|
9221
|
+
}
|
|
9222
|
+
);
|
|
9223
|
+
DataCard.displayName = "DataCard";
|
|
9224
|
+
|
|
9225
|
+
// src/components/DataCards/DataCards.tsx
|
|
9226
|
+
var import_styled_components60 = __toESM(require("styled-components"));
|
|
9227
|
+
var import_type_guards35 = require("@wistia/type-guards");
|
|
9228
|
+
var import_jsx_runtime212 = require("react/jsx-runtime");
|
|
9229
|
+
var StyledDataCards = (0, import_styled_components60.default)(Box)`
|
|
9230
|
+
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
9231
|
+
> * {
|
|
9232
|
+
min-width: 120px;
|
|
9233
|
+
max-width: ${({ $cardMaxWidth }) => (0, import_type_guards35.isNotUndefined)($cardMaxWidth) ? `${$cardMaxWidth}px` : "none"};
|
|
9234
|
+
}
|
|
9235
|
+
`;
|
|
9236
|
+
var DataCards = ({
|
|
9237
|
+
children,
|
|
9238
|
+
cardMaxWidth,
|
|
9239
|
+
colorScheme = "inherit",
|
|
9240
|
+
...props
|
|
9241
|
+
}) => {
|
|
9242
|
+
return /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(
|
|
9243
|
+
StyledDataCards,
|
|
9244
|
+
{
|
|
9245
|
+
...props,
|
|
9246
|
+
$cardMaxWidth: cardMaxWidth,
|
|
9247
|
+
$colorScheme: colorScheme,
|
|
9248
|
+
direction: "row",
|
|
9249
|
+
fill: "horizontal",
|
|
9250
|
+
gap: "space-02",
|
|
9251
|
+
renderAs: "dl",
|
|
9252
|
+
wrapItems: true,
|
|
9253
|
+
children
|
|
9254
|
+
}
|
|
9255
|
+
);
|
|
9256
|
+
};
|
|
9257
|
+
DataCards.displayName = "DataCards";
|
|
9126
9258
|
// Annotate the CommonJS export names for ESM import in node:
|
|
9127
9259
|
0 && (module.exports = {
|
|
9128
9260
|
ActionButton,
|
|
@@ -9138,6 +9270,8 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
|
9138
9270
|
CheckboxGroup,
|
|
9139
9271
|
CheckboxMenuItem,
|
|
9140
9272
|
ColorSchemeWrapper,
|
|
9273
|
+
DataCard,
|
|
9274
|
+
DataCards,
|
|
9141
9275
|
Divider,
|
|
9142
9276
|
Ellipsis,
|
|
9143
9277
|
Form,
|