@wistia/ui 0.14.12 → 0.14.13-beta.5aafe6cc.47508a3
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 +119 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +57 -1
- package/dist/index.d.ts +57 -1
- package/dist/index.mjs +115 -19
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.14.
|
|
3
|
+
* @license @wistia/ui v0.14.13-beta.5aafe6cc.47508a3
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -76,6 +76,10 @@ __export(index_exports, {
|
|
|
76
76
|
DataCardHoverArrow: () => DataCardHoverArrow,
|
|
77
77
|
DataCardTrend: () => DataCardTrend,
|
|
78
78
|
DataCards: () => DataCards,
|
|
79
|
+
DataList: () => DataList,
|
|
80
|
+
DataListItem: () => DataListItem,
|
|
81
|
+
DataListItemLabel: () => DataListItemLabel,
|
|
82
|
+
DataListItemValue: () => DataListItemValue,
|
|
79
83
|
Divider: () => Divider,
|
|
80
84
|
EditableHeading: () => EditableHeading,
|
|
81
85
|
Ellipsis: () => Ellipsis,
|
|
@@ -11207,13 +11211,18 @@ var inputStyles = import_styled_components61.css`
|
|
|
11207
11211
|
font-weight: var(--wui-input-font-weight);
|
|
11208
11212
|
color: var(--wui-input-color-text);
|
|
11209
11213
|
|
|
11214
|
+
&:read-only {
|
|
11215
|
+
outline-style: dashed;
|
|
11216
|
+
}
|
|
11217
|
+
|
|
11210
11218
|
&::placeholder {
|
|
11211
11219
|
color: var(--wui-input-placeholder);
|
|
11212
11220
|
opacity: 1; /* Firefox */
|
|
11213
11221
|
}
|
|
11214
11222
|
|
|
11215
11223
|
&:focus {
|
|
11216
|
-
outline: 2px
|
|
11224
|
+
outline-width: 2px;
|
|
11225
|
+
outline-color: var(--wui-input-color-border-focus);
|
|
11217
11226
|
outline-offset: -2px;
|
|
11218
11227
|
}
|
|
11219
11228
|
|
|
@@ -13252,18 +13261,17 @@ var import_styled_components76 = __toESM(require("styled-components"));
|
|
|
13252
13261
|
var import_react62 = require("react");
|
|
13253
13262
|
var import_type_guards41 = require("@wistia/type-guards");
|
|
13254
13263
|
var import_jsx_runtime265 = require("react/jsx-runtime");
|
|
13255
|
-
var
|
|
13256
|
-
|
|
13257
|
-
|
|
13258
|
-
|
|
13264
|
+
var StyledIconButton = (0, import_styled_components76.default)(IconButton)`
|
|
13265
|
+
/* override size for icon button since prop gets changed by Input */
|
|
13266
|
+
height: var(--icon-button-size-sm);
|
|
13267
|
+
width: var(--icon-button-size-sm);
|
|
13259
13268
|
|
|
13260
|
-
|
|
13261
|
-
|
|
13262
|
-
}
|
|
13269
|
+
/* override input padding variable since it is used for Input Icon positioning */
|
|
13270
|
+
--wui-input-horizontal-padding: 4px;
|
|
13263
13271
|
`;
|
|
13264
13272
|
var COPY_SUCCESS_DURATION = 2e3;
|
|
13265
13273
|
var InputClickToCopy = (0, import_react62.forwardRef)(
|
|
13266
|
-
({ value, onCopy, ...props }, ref) => {
|
|
13274
|
+
({ value, onCopy, disabled = false, ...props }, ref) => {
|
|
13267
13275
|
const [isCopied, setIsCopied] = (0, import_react62.useState)(false);
|
|
13268
13276
|
(0, import_react62.useEffect)(() => {
|
|
13269
13277
|
if (isCopied) {
|
|
@@ -13278,6 +13286,9 @@ var InputClickToCopy = (0, import_react62.forwardRef)(
|
|
|
13278
13286
|
}, [isCopied]);
|
|
13279
13287
|
const handleClick = (event) => {
|
|
13280
13288
|
event.preventDefault();
|
|
13289
|
+
if (disabled) {
|
|
13290
|
+
return;
|
|
13291
|
+
}
|
|
13281
13292
|
if ((0, import_type_guards41.isFunction)(props.onClick)) {
|
|
13282
13293
|
props.onClick(event);
|
|
13283
13294
|
}
|
|
@@ -13290,20 +13301,24 @@ var InputClickToCopy = (0, import_react62.forwardRef)(
|
|
|
13290
13301
|
});
|
|
13291
13302
|
};
|
|
13292
13303
|
return /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
|
|
13293
|
-
|
|
13304
|
+
Input,
|
|
13294
13305
|
{
|
|
13295
13306
|
"aria-label": "Click to Copy",
|
|
13296
13307
|
...props,
|
|
13297
13308
|
ref,
|
|
13298
|
-
|
|
13309
|
+
disabled,
|
|
13299
13310
|
readOnly: true,
|
|
13300
|
-
rightIcon:
|
|
13301
|
-
|
|
13311
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
|
|
13312
|
+
StyledIconButton,
|
|
13302
13313
|
{
|
|
13303
|
-
colorScheme: "success",
|
|
13304
|
-
|
|
13314
|
+
colorScheme: isCopied ? "success" : "inherit",
|
|
13315
|
+
disabled,
|
|
13316
|
+
label: "Copy to clipboard",
|
|
13317
|
+
onClick: handleClick,
|
|
13318
|
+
variant: "ghost",
|
|
13319
|
+
children: isCopied ? /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(Icon, { type: "checkmark-circle" }) : /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(Icon, { type: "save-as-copy" })
|
|
13305
13320
|
}
|
|
13306
|
-
)
|
|
13321
|
+
),
|
|
13307
13322
|
value
|
|
13308
13323
|
}
|
|
13309
13324
|
);
|
|
@@ -16917,7 +16932,7 @@ var import_styled_components120 = __toESM(require("styled-components"));
|
|
|
16917
16932
|
var import_react89 = require("react");
|
|
16918
16933
|
var import_type_guards70 = require("@wistia/type-guards");
|
|
16919
16934
|
var import_jsx_runtime315 = require("react/jsx-runtime");
|
|
16920
|
-
var
|
|
16935
|
+
var StyledIconButton2 = (0, import_styled_components120.default)(IconButton)`
|
|
16921
16936
|
/* override size for icon button since prop gets changed by Input */
|
|
16922
16937
|
height: var(--icon-button-size-sm);
|
|
16923
16938
|
width: var(--icon-button-size-sm);
|
|
@@ -16942,7 +16957,7 @@ var InputPassword = (0, import_react89.forwardRef)(
|
|
|
16942
16957
|
ref,
|
|
16943
16958
|
disabled,
|
|
16944
16959
|
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
|
|
16945
|
-
|
|
16960
|
+
StyledIconButton2,
|
|
16946
16961
|
{
|
|
16947
16962
|
disabled,
|
|
16948
16963
|
label: isVisible ? "Hide password" : "Show password",
|
|
@@ -17017,6 +17032,87 @@ var ContextMenu = ({
|
|
|
17017
17032
|
}
|
|
17018
17033
|
) : null;
|
|
17019
17034
|
};
|
|
17035
|
+
|
|
17036
|
+
// src/components/DataList/DataList.tsx
|
|
17037
|
+
var import_styled_components121 = __toESM(require("styled-components"));
|
|
17038
|
+
var import_jsx_runtime317 = require("react/jsx-runtime");
|
|
17039
|
+
var StyledDataList = import_styled_components121.default.dl`
|
|
17040
|
+
display: grid;
|
|
17041
|
+
grid-template-columns: auto 1fr;
|
|
17042
|
+
column-gap: var(--wui-space-02);
|
|
17043
|
+
row-gap: var(--wui-space-04);
|
|
17044
|
+
align-items: baseline;
|
|
17045
|
+
align-content: start;
|
|
17046
|
+
|
|
17047
|
+
dt {
|
|
17048
|
+
margin: 0;
|
|
17049
|
+
padding: 0;
|
|
17050
|
+
font-weight: var(--wui-datalist-label-prominence);
|
|
17051
|
+
width: var(--wui-datalist-label-max-width, auto);
|
|
17052
|
+
}
|
|
17053
|
+
|
|
17054
|
+
dd {
|
|
17055
|
+
margin: 0;
|
|
17056
|
+
padding: 0;
|
|
17057
|
+
text-align: var(--wui-datalist-value-alignment, start);
|
|
17058
|
+
}
|
|
17059
|
+
`;
|
|
17060
|
+
var DataList = ({
|
|
17061
|
+
children,
|
|
17062
|
+
valueAlignment = "start",
|
|
17063
|
+
labelMaxWith = "auto",
|
|
17064
|
+
labelProminence = "primary",
|
|
17065
|
+
...props
|
|
17066
|
+
}) => {
|
|
17067
|
+
return /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
|
|
17068
|
+
StyledDataList,
|
|
17069
|
+
{
|
|
17070
|
+
role: "list",
|
|
17071
|
+
style: {
|
|
17072
|
+
"--wui-datalist-label-max-width": labelMaxWith,
|
|
17073
|
+
"--wui-datalist-value-alignment": valueAlignment === "end" ? "right" : "left",
|
|
17074
|
+
"--wui-datalist-label-prominence": labelProminence === "secondary" ? "var(--wui-typography-weight-label)" : "var(--wui-typography-weight-label-bold)"
|
|
17075
|
+
},
|
|
17076
|
+
...props,
|
|
17077
|
+
children
|
|
17078
|
+
}
|
|
17079
|
+
);
|
|
17080
|
+
};
|
|
17081
|
+
DataList.displayName = "DataList_UI";
|
|
17082
|
+
|
|
17083
|
+
// src/components/DataList/DataListItem.tsx
|
|
17084
|
+
var DataListItem = ({ children }) => {
|
|
17085
|
+
return children;
|
|
17086
|
+
};
|
|
17087
|
+
DataListItem.displayName = "DataListItem_UI";
|
|
17088
|
+
|
|
17089
|
+
// src/components/DataList/DataListItemLabel.tsx
|
|
17090
|
+
var import_jsx_runtime318 = require("react/jsx-runtime");
|
|
17091
|
+
var DataListItemLabel = (props) => {
|
|
17092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime318.jsx)(
|
|
17093
|
+
Text,
|
|
17094
|
+
{
|
|
17095
|
+
variant: "label4",
|
|
17096
|
+
...props,
|
|
17097
|
+
renderAs: "dt"
|
|
17098
|
+
}
|
|
17099
|
+
);
|
|
17100
|
+
};
|
|
17101
|
+
DataListItemLabel.displayName = "DataListItemLabel_UI";
|
|
17102
|
+
|
|
17103
|
+
// src/components/DataList/DataListItemValue.tsx
|
|
17104
|
+
var import_jsx_runtime319 = require("react/jsx-runtime");
|
|
17105
|
+
var DataListItemValue = (props) => {
|
|
17106
|
+
return /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
|
|
17107
|
+
Text,
|
|
17108
|
+
{
|
|
17109
|
+
variant: "body3",
|
|
17110
|
+
...props,
|
|
17111
|
+
renderAs: "dd"
|
|
17112
|
+
}
|
|
17113
|
+
);
|
|
17114
|
+
};
|
|
17115
|
+
DataListItemValue.displayName = "DataListItemValue_UI";
|
|
17020
17116
|
// Annotate the CommonJS export names for ESM import in node:
|
|
17021
17117
|
0 && (module.exports = {
|
|
17022
17118
|
ActionButton,
|
|
@@ -17056,6 +17152,10 @@ var ContextMenu = ({
|
|
|
17056
17152
|
DataCardHoverArrow,
|
|
17057
17153
|
DataCardTrend,
|
|
17058
17154
|
DataCards,
|
|
17155
|
+
DataList,
|
|
17156
|
+
DataListItem,
|
|
17157
|
+
DataListItemLabel,
|
|
17158
|
+
DataListItemValue,
|
|
17059
17159
|
Divider,
|
|
17060
17160
|
EditableHeading,
|
|
17061
17161
|
Ellipsis,
|