@wistia/ui 0.14.12 → 0.14.13
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 +30 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +30 -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
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -11207,13 +11207,18 @@ var inputStyles = import_styled_components61.css`
|
|
|
11207
11207
|
font-weight: var(--wui-input-font-weight);
|
|
11208
11208
|
color: var(--wui-input-color-text);
|
|
11209
11209
|
|
|
11210
|
+
&:read-only {
|
|
11211
|
+
outline-style: dashed;
|
|
11212
|
+
}
|
|
11213
|
+
|
|
11210
11214
|
&::placeholder {
|
|
11211
11215
|
color: var(--wui-input-placeholder);
|
|
11212
11216
|
opacity: 1; /* Firefox */
|
|
11213
11217
|
}
|
|
11214
11218
|
|
|
11215
11219
|
&:focus {
|
|
11216
|
-
outline: 2px
|
|
11220
|
+
outline-width: 2px;
|
|
11221
|
+
outline-color: var(--wui-input-color-border-focus);
|
|
11217
11222
|
outline-offset: -2px;
|
|
11218
11223
|
}
|
|
11219
11224
|
|
|
@@ -13252,18 +13257,17 @@ var import_styled_components76 = __toESM(require("styled-components"));
|
|
|
13252
13257
|
var import_react62 = require("react");
|
|
13253
13258
|
var import_type_guards41 = require("@wistia/type-guards");
|
|
13254
13259
|
var import_jsx_runtime265 = require("react/jsx-runtime");
|
|
13255
|
-
var
|
|
13256
|
-
|
|
13257
|
-
|
|
13258
|
-
|
|
13260
|
+
var StyledIconButton = (0, import_styled_components76.default)(IconButton)`
|
|
13261
|
+
/* override size for icon button since prop gets changed by Input */
|
|
13262
|
+
height: var(--icon-button-size-sm);
|
|
13263
|
+
width: var(--icon-button-size-sm);
|
|
13259
13264
|
|
|
13260
|
-
|
|
13261
|
-
|
|
13262
|
-
}
|
|
13265
|
+
/* override input padding variable since it is used for Input Icon positioning */
|
|
13266
|
+
--wui-input-horizontal-padding: 4px;
|
|
13263
13267
|
`;
|
|
13264
13268
|
var COPY_SUCCESS_DURATION = 2e3;
|
|
13265
13269
|
var InputClickToCopy = (0, import_react62.forwardRef)(
|
|
13266
|
-
({ value, onCopy, ...props }, ref) => {
|
|
13270
|
+
({ value, onCopy, disabled = false, ...props }, ref) => {
|
|
13267
13271
|
const [isCopied, setIsCopied] = (0, import_react62.useState)(false);
|
|
13268
13272
|
(0, import_react62.useEffect)(() => {
|
|
13269
13273
|
if (isCopied) {
|
|
@@ -13278,6 +13282,9 @@ var InputClickToCopy = (0, import_react62.forwardRef)(
|
|
|
13278
13282
|
}, [isCopied]);
|
|
13279
13283
|
const handleClick = (event) => {
|
|
13280
13284
|
event.preventDefault();
|
|
13285
|
+
if (disabled) {
|
|
13286
|
+
return;
|
|
13287
|
+
}
|
|
13281
13288
|
if ((0, import_type_guards41.isFunction)(props.onClick)) {
|
|
13282
13289
|
props.onClick(event);
|
|
13283
13290
|
}
|
|
@@ -13290,20 +13297,24 @@ var InputClickToCopy = (0, import_react62.forwardRef)(
|
|
|
13290
13297
|
});
|
|
13291
13298
|
};
|
|
13292
13299
|
return /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
|
|
13293
|
-
|
|
13300
|
+
Input,
|
|
13294
13301
|
{
|
|
13295
13302
|
"aria-label": "Click to Copy",
|
|
13296
13303
|
...props,
|
|
13297
13304
|
ref,
|
|
13298
|
-
|
|
13305
|
+
disabled,
|
|
13299
13306
|
readOnly: true,
|
|
13300
|
-
rightIcon:
|
|
13301
|
-
|
|
13307
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
|
|
13308
|
+
StyledIconButton,
|
|
13302
13309
|
{
|
|
13303
|
-
colorScheme: "success",
|
|
13304
|
-
|
|
13310
|
+
colorScheme: isCopied ? "success" : "inherit",
|
|
13311
|
+
disabled,
|
|
13312
|
+
label: "Copy to clipboard",
|
|
13313
|
+
onClick: handleClick,
|
|
13314
|
+
variant: "ghost",
|
|
13315
|
+
children: isCopied ? /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(Icon, { type: "checkmark-circle" }) : /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(Icon, { type: "save-as-copy" })
|
|
13305
13316
|
}
|
|
13306
|
-
)
|
|
13317
|
+
),
|
|
13307
13318
|
value
|
|
13308
13319
|
}
|
|
13309
13320
|
);
|
|
@@ -16917,7 +16928,7 @@ var import_styled_components120 = __toESM(require("styled-components"));
|
|
|
16917
16928
|
var import_react89 = require("react");
|
|
16918
16929
|
var import_type_guards70 = require("@wistia/type-guards");
|
|
16919
16930
|
var import_jsx_runtime315 = require("react/jsx-runtime");
|
|
16920
|
-
var
|
|
16931
|
+
var StyledIconButton2 = (0, import_styled_components120.default)(IconButton)`
|
|
16921
16932
|
/* override size for icon button since prop gets changed by Input */
|
|
16922
16933
|
height: var(--icon-button-size-sm);
|
|
16923
16934
|
width: var(--icon-button-size-sm);
|
|
@@ -16942,7 +16953,7 @@ var InputPassword = (0, import_react89.forwardRef)(
|
|
|
16942
16953
|
ref,
|
|
16943
16954
|
disabled,
|
|
16944
16955
|
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
|
|
16945
|
-
|
|
16956
|
+
StyledIconButton2,
|
|
16946
16957
|
{
|
|
16947
16958
|
disabled,
|
|
16948
16959
|
label: isVisible ? "Hide password" : "Show password",
|