@wistia/ui 0.6.20-beta.f693d494.df8ca33 → 0.6.21
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 +98 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +40 -6
- package/dist/index.d.ts +40 -6
- package/dist/index.mjs +98 -13
- 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.6.
|
|
3
|
+
* @license @wistia/ui v0.6.21
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -7648,12 +7648,24 @@ var disabledStyle3 = import_styled_components33.css`
|
|
|
7648
7648
|
cursor: not-allowed;
|
|
7649
7649
|
opacity: 0.5;
|
|
7650
7650
|
`;
|
|
7651
|
+
var inputSizeSmall = import_styled_components33.css`
|
|
7652
|
+
width: 14px;
|
|
7653
|
+
height: 14px;
|
|
7654
|
+
min-width: 14px;
|
|
7655
|
+
min-height: 14px;
|
|
7656
|
+
`;
|
|
7651
7657
|
var inputSizeMedium = import_styled_components33.css`
|
|
7652
7658
|
width: 16px;
|
|
7653
7659
|
height: 16px;
|
|
7654
7660
|
min-width: 16px;
|
|
7655
7661
|
min-height: 16px;
|
|
7656
7662
|
`;
|
|
7663
|
+
var inputSizeLarge = import_styled_components33.css`
|
|
7664
|
+
width: 20px;
|
|
7665
|
+
height: 20px;
|
|
7666
|
+
min-width: 20px;
|
|
7667
|
+
min-height: 20px;
|
|
7668
|
+
`;
|
|
7657
7669
|
var StyledCheckboxWrapper = import_styled_components33.default.div`
|
|
7658
7670
|
display: flex;
|
|
7659
7671
|
margin: 0;
|
|
@@ -7663,9 +7675,13 @@ var StyledCheckboxWrapper = import_styled_components33.default.div`
|
|
|
7663
7675
|
|
|
7664
7676
|
${({ disabled }) => disabled && disabledStyle3};
|
|
7665
7677
|
`;
|
|
7678
|
+
var getSizeCss = (size) => {
|
|
7679
|
+
if (size === "sm") return inputSizeSmall;
|
|
7680
|
+
if (size === "lg") return inputSizeLarge;
|
|
7681
|
+
return inputSizeMedium;
|
|
7682
|
+
};
|
|
7666
7683
|
var StyledCheckboxInput = import_styled_components33.default.div`
|
|
7667
|
-
|
|
7668
|
-
${inputSizeMedium}
|
|
7684
|
+
${({ $size }) => getSizeCss($size)}
|
|
7669
7685
|
line-height: 0;
|
|
7670
7686
|
margin: 0;
|
|
7671
7687
|
border: 1px solid var(--wui-color-border);
|
|
@@ -7697,7 +7713,19 @@ var StyledHiddenCheckboxInput = import_styled_components33.default.input`
|
|
|
7697
7713
|
}
|
|
7698
7714
|
`;
|
|
7699
7715
|
var Checkbox = (0, import_react18.forwardRef)(
|
|
7700
|
-
({
|
|
7716
|
+
({
|
|
7717
|
+
checked,
|
|
7718
|
+
disabled = false,
|
|
7719
|
+
id,
|
|
7720
|
+
label,
|
|
7721
|
+
description,
|
|
7722
|
+
name,
|
|
7723
|
+
onChange,
|
|
7724
|
+
size = "md",
|
|
7725
|
+
value,
|
|
7726
|
+
required = false,
|
|
7727
|
+
...props
|
|
7728
|
+
}, ref) => {
|
|
7701
7729
|
const generatedId = (0, import_react18.useId)();
|
|
7702
7730
|
const computedId = (0, import_type_guards21.isNonEmptyString)(id) ? id : `wistia-ui-checkbox-${generatedId}`;
|
|
7703
7731
|
return /* @__PURE__ */ (0, import_jsx_runtime201.jsxs)(
|
|
@@ -7716,6 +7744,7 @@ var Checkbox = (0, import_react18.forwardRef)(
|
|
|
7716
7744
|
id: computedId,
|
|
7717
7745
|
name,
|
|
7718
7746
|
onChange,
|
|
7747
|
+
required,
|
|
7719
7748
|
type: "checkbox",
|
|
7720
7749
|
value
|
|
7721
7750
|
}
|
|
@@ -7723,7 +7752,14 @@ var Checkbox = (0, import_react18.forwardRef)(
|
|
|
7723
7752
|
/* @__PURE__ */ (0, import_jsx_runtime201.jsx)(
|
|
7724
7753
|
FormControlLabel,
|
|
7725
7754
|
{
|
|
7726
|
-
controlSlot: /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(
|
|
7755
|
+
controlSlot: /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(
|
|
7756
|
+
StyledCheckboxInput,
|
|
7757
|
+
{
|
|
7758
|
+
$size: size,
|
|
7759
|
+
"data-wui-faux-input": "true",
|
|
7760
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(CheckIcon, {})
|
|
7761
|
+
}
|
|
7762
|
+
),
|
|
7727
7763
|
description,
|
|
7728
7764
|
htmlFor: computedId,
|
|
7729
7765
|
label
|
|
@@ -10353,13 +10389,33 @@ var StyledHiddenRadioInput = import_styled_components65.default.input`
|
|
|
10353
10389
|
display: block;
|
|
10354
10390
|
}
|
|
10355
10391
|
`;
|
|
10356
|
-
var
|
|
10357
|
-
|
|
10358
|
-
|
|
10392
|
+
var inputSizeSmall2 = import_styled_components65.css`
|
|
10393
|
+
width: 14px;
|
|
10394
|
+
height: 14px;
|
|
10395
|
+
min-width: 14px;
|
|
10396
|
+
min-height: 14px;
|
|
10397
|
+
`;
|
|
10398
|
+
var inputSizeMedium2 = import_styled_components65.css`
|
|
10359
10399
|
width: 16px;
|
|
10360
|
-
min-width: 16px;
|
|
10361
10400
|
height: 16px;
|
|
10401
|
+
min-width: 16px;
|
|
10362
10402
|
min-height: 16px;
|
|
10403
|
+
`;
|
|
10404
|
+
var inputSizeLarge2 = import_styled_components65.css`
|
|
10405
|
+
width: 20px;
|
|
10406
|
+
height: 20px;
|
|
10407
|
+
min-width: 20px;
|
|
10408
|
+
min-height: 20px;
|
|
10409
|
+
`;
|
|
10410
|
+
var getSizeCss2 = (size) => {
|
|
10411
|
+
if (size === "sm") return inputSizeSmall2;
|
|
10412
|
+
if (size === "lg") return inputSizeLarge2;
|
|
10413
|
+
return inputSizeMedium2;
|
|
10414
|
+
};
|
|
10415
|
+
var StyledRadioInput = import_styled_components65.default.div`
|
|
10416
|
+
${({ $size }) => getSizeCss2($size)}
|
|
10417
|
+
line-height: 0;
|
|
10418
|
+
margin: 0;
|
|
10363
10419
|
border: 1px solid var(--wui-color-border);
|
|
10364
10420
|
border-radius: 50%; /* TODO --wui-border-radius-rounded */
|
|
10365
10421
|
background-color: var(--wui-color-bg-fill-white);
|
|
@@ -10397,7 +10453,9 @@ var Radio = (0, import_react43.forwardRef)(
|
|
|
10397
10453
|
description,
|
|
10398
10454
|
name,
|
|
10399
10455
|
onChange,
|
|
10456
|
+
size = "md",
|
|
10400
10457
|
value = "false",
|
|
10458
|
+
required = false,
|
|
10401
10459
|
...props
|
|
10402
10460
|
}, ref) => {
|
|
10403
10461
|
const generatedId = (0, import_react43.useId)();
|
|
@@ -10418,6 +10476,7 @@ var Radio = (0, import_react43.forwardRef)(
|
|
|
10418
10476
|
id: computedId,
|
|
10419
10477
|
name,
|
|
10420
10478
|
onChange,
|
|
10479
|
+
required,
|
|
10421
10480
|
type: "radio",
|
|
10422
10481
|
value
|
|
10423
10482
|
}
|
|
@@ -10425,7 +10484,14 @@ var Radio = (0, import_react43.forwardRef)(
|
|
|
10425
10484
|
/* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
|
|
10426
10485
|
FormControlLabel,
|
|
10427
10486
|
{
|
|
10428
|
-
controlSlot: /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
|
|
10487
|
+
controlSlot: /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
|
|
10488
|
+
StyledRadioInput,
|
|
10489
|
+
{
|
|
10490
|
+
$size: size,
|
|
10491
|
+
"data-wui-faux-input": "true",
|
|
10492
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(RadioIcon, {})
|
|
10493
|
+
}
|
|
10494
|
+
),
|
|
10429
10495
|
description,
|
|
10430
10496
|
htmlFor: computedId,
|
|
10431
10497
|
label
|
|
@@ -11337,10 +11403,17 @@ var TagLabel = import_styled_components83.default.a`
|
|
|
11337
11403
|
font-weight: var(--wui-typography-label-4-weight);
|
|
11338
11404
|
line-height: var(--wui-typography-label-4-line-height);
|
|
11339
11405
|
border-radius: var(--wui-border-radius-01);
|
|
11406
|
+
display: flex;
|
|
11340
11407
|
align-items: center;
|
|
11341
11408
|
color: var(--wui-color-text);
|
|
11342
11409
|
text-decoration: none;
|
|
11343
11410
|
padding: var(--wui-space-01);
|
|
11411
|
+
gap: var(--wui-space-01);
|
|
11412
|
+
|
|
11413
|
+
svg {
|
|
11414
|
+
height: 12px;
|
|
11415
|
+
width: 12px;
|
|
11416
|
+
}
|
|
11344
11417
|
|
|
11345
11418
|
:not(:only-child) {
|
|
11346
11419
|
padding-right: var(--wui-space-01);
|
|
@@ -11438,7 +11511,16 @@ var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
|
11438
11511
|
] });
|
|
11439
11512
|
};
|
|
11440
11513
|
var Tag = (0, import_react59.forwardRef)(
|
|
11441
|
-
({
|
|
11514
|
+
({
|
|
11515
|
+
onClickRemove,
|
|
11516
|
+
colorScheme = "inherit",
|
|
11517
|
+
href,
|
|
11518
|
+
icon,
|
|
11519
|
+
label,
|
|
11520
|
+
onClickRemoveLabel,
|
|
11521
|
+
...otherProps
|
|
11522
|
+
}, ref) => {
|
|
11523
|
+
const hasIcon = (0, import_type_guards44.isNotNil)(icon);
|
|
11442
11524
|
const labelProps = (0, import_type_guards44.isNotNil)(href) && (0, import_type_guards44.isNonEmptyString)(href) ? { href, as: "a" } : { as: "span" };
|
|
11443
11525
|
return /* @__PURE__ */ (0, import_jsx_runtime261.jsxs)(
|
|
11444
11526
|
StyledTag,
|
|
@@ -11447,12 +11529,15 @@ var Tag = (0, import_react59.forwardRef)(
|
|
|
11447
11529
|
$colorScheme: colorScheme,
|
|
11448
11530
|
...otherProps,
|
|
11449
11531
|
children: [
|
|
11450
|
-
/* @__PURE__ */ (0, import_jsx_runtime261.
|
|
11532
|
+
/* @__PURE__ */ (0, import_jsx_runtime261.jsxs)(
|
|
11451
11533
|
TagLabel,
|
|
11452
11534
|
{
|
|
11453
11535
|
...labelProps,
|
|
11454
11536
|
$colorScheme: colorScheme,
|
|
11455
|
-
children:
|
|
11537
|
+
children: [
|
|
11538
|
+
hasIcon ? icon : null,
|
|
11539
|
+
label
|
|
11540
|
+
]
|
|
11456
11541
|
}
|
|
11457
11542
|
),
|
|
11458
11543
|
/* @__PURE__ */ (0, import_jsx_runtime261.jsx)(
|