@wistia/ui 0.6.23 → 0.6.24-beta.00cd973c.5212f2b
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 +114 -44
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +114 -44
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -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.24-beta.00cd973c.5212f2b
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -1237,6 +1237,7 @@ var colorAliasTokens = import_styled_components4.css`
|
|
|
1237
1237
|
/* --- Misc --- */
|
|
1238
1238
|
--wui-color-bg-fill-white: #ffffff;
|
|
1239
1239
|
--wui-color-focus-color: var(--wui-blue-9);
|
|
1240
|
+
--wui-color-invalid-indicator: var(--wui-error-9);
|
|
1240
1241
|
--wui-color-notification-pill-color: var(--wui-pink-9);
|
|
1241
1242
|
--wui-color-backdrop: var(--wui-gray-alpha-9);
|
|
1242
1243
|
--wui-color-segmented-control-checked-background: var(--wui-bg-app);
|
|
@@ -7676,18 +7677,33 @@ var inputSizeSmall = import_styled_components34.css`
|
|
|
7676
7677
|
height: 14px;
|
|
7677
7678
|
min-width: 14px;
|
|
7678
7679
|
min-height: 14px;
|
|
7680
|
+
|
|
7681
|
+
svg {
|
|
7682
|
+
width: 7px;
|
|
7683
|
+
height: 7px;
|
|
7684
|
+
}
|
|
7679
7685
|
`;
|
|
7680
7686
|
var inputSizeMedium = import_styled_components34.css`
|
|
7681
7687
|
width: 16px;
|
|
7682
7688
|
height: 16px;
|
|
7683
7689
|
min-width: 16px;
|
|
7684
7690
|
min-height: 16px;
|
|
7691
|
+
|
|
7692
|
+
svg {
|
|
7693
|
+
width: 9px;
|
|
7694
|
+
height: 9px;
|
|
7695
|
+
}
|
|
7685
7696
|
`;
|
|
7686
7697
|
var inputSizeLarge = import_styled_components34.css`
|
|
7687
7698
|
width: 20px;
|
|
7688
7699
|
height: 20px;
|
|
7689
7700
|
min-width: 20px;
|
|
7690
7701
|
min-height: 20px;
|
|
7702
|
+
|
|
7703
|
+
svg {
|
|
7704
|
+
width: 11px;
|
|
7705
|
+
height: 11px;
|
|
7706
|
+
}
|
|
7691
7707
|
`;
|
|
7692
7708
|
var getSizeCss = (size) => {
|
|
7693
7709
|
if (size === "sm") return inputSizeSmall;
|
|
@@ -7709,9 +7725,10 @@ var StyledCheckboxInput = import_styled_components34.default.div`
|
|
|
7709
7725
|
display: grid;
|
|
7710
7726
|
place-content: center;
|
|
7711
7727
|
align-self: flex-start;
|
|
7728
|
+
border-width: 1px;
|
|
7729
|
+
border-style: solid;
|
|
7730
|
+
border-color: ${({ $disabled }) => $disabled ? "var(--wui-color-bg-border-disabled)" : "var(--wui-color-border)"};
|
|
7712
7731
|
background-color: ${({ $disabled }) => $disabled ? "var(--wui-color-bg-surface-disabled)" : "var(--wui-color-bg-surface)"};
|
|
7713
|
-
border: 1px solid
|
|
7714
|
-
${({ $disabled }) => $disabled ? "var(--wui-color-icon-disabled)" : "var(--wui-color-border)"};
|
|
7715
7732
|
|
|
7716
7733
|
/* checkmark icon */
|
|
7717
7734
|
svg {
|
|
@@ -7727,6 +7744,7 @@ var StyledHiddenCheckboxInput = import_styled_components34.default.input`
|
|
|
7727
7744
|
|
|
7728
7745
|
/* toggles display of faux-input background-color */
|
|
7729
7746
|
&:checked + label [data-wui-faux-input='true'] {
|
|
7747
|
+
border-color: ${({ disabled }) => disabled ? void 0 : "var(--wui-color-bg-fill)"};
|
|
7730
7748
|
background-color: ${({ disabled }) => disabled ? "var(--wui-color-bg-surface-disabled)" : "var(--wui-color-bg-fill)"};
|
|
7731
7749
|
}
|
|
7732
7750
|
|
|
@@ -8530,26 +8548,35 @@ var import_react23 = require("react");
|
|
|
8530
8548
|
var import_styled_components44 = __toESM(require("styled-components"));
|
|
8531
8549
|
var import_type_guards26 = require("@wistia/type-guards");
|
|
8532
8550
|
var import_jsx_runtime213 = require("react/jsx-runtime");
|
|
8533
|
-
var
|
|
8551
|
+
var inputCssVars = import_styled_components44.css`
|
|
8534
8552
|
--wui-input-color-bg: var(--wui-color-bg-surface);
|
|
8535
8553
|
--wui-input-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
8536
|
-
--wui-input-color-border: var(--wui-color-border);
|
|
8537
|
-
--wui-input-color-border-focus: var(--wui-color-
|
|
8538
|
-
--wui-input-color-border-error: var(--wui-color-
|
|
8554
|
+
--wui-input-color-border: var(--wui-color-border-secondary);
|
|
8555
|
+
--wui-input-color-border-focus: var(--wui-color-focus-ring);
|
|
8556
|
+
--wui-input-color-border-error: var(--wui-color-invalid-indicator);
|
|
8539
8557
|
--wui-input-color-border-disabled: var(--wui-color-border-disabled);
|
|
8540
|
-
--wui-input-border-radius: var(--wui-border-radius-
|
|
8558
|
+
--wui-input-border-radius: var(--wui-border-radius-03);
|
|
8541
8559
|
--wui-input-multiline-border-radius: var(--wui-border-radius-02);
|
|
8542
8560
|
--wui-input-vertical-padding: var(--wui-space-02);
|
|
8543
8561
|
--wui-input-horizontal-padding: var(--wui-space-03);
|
|
8544
8562
|
--wui-input-placeholder: var(--wui-gray-10);
|
|
8545
|
-
--wui-input-
|
|
8546
|
-
|
|
8563
|
+
--wui-input-font-size: var(--wui-typography-body-3-size);
|
|
8564
|
+
--wui-input-line-height: 16px;
|
|
8565
|
+
`;
|
|
8566
|
+
var inputStyles = import_styled_components44.css`
|
|
8567
|
+
${inputCssVars}
|
|
8547
8568
|
input,
|
|
8548
8569
|
textarea {
|
|
8549
8570
|
padding: var(--wui-input-vertical-padding) var(--wui-input-horizontal-padding);
|
|
8550
8571
|
background-color: var(--wui-input-color-bg);
|
|
8551
|
-
border:
|
|
8572
|
+
border: none;
|
|
8573
|
+
outline: 1px solid var(--wui-input-color-border);
|
|
8574
|
+
outline-offset: -1px;
|
|
8552
8575
|
border-radius: var(--wui-input-border-radius);
|
|
8576
|
+
font-size: var(--wui-input-font-size);
|
|
8577
|
+
line-height: var(--wui-input-line-height);
|
|
8578
|
+
font-weight: var(--wui-typography-weight-body);
|
|
8579
|
+
color: var(--wui-color-text-primary);
|
|
8553
8580
|
|
|
8554
8581
|
&::placeholder {
|
|
8555
8582
|
color: var(--wui-input-placeholder);
|
|
@@ -8557,12 +8584,13 @@ var inputStyles = import_styled_components44.css`
|
|
|
8557
8584
|
}
|
|
8558
8585
|
|
|
8559
8586
|
&:focus {
|
|
8560
|
-
|
|
8587
|
+
outline: 2px solid var(--wui-input-color-border-focus);
|
|
8588
|
+
outline-offset: -2px;
|
|
8561
8589
|
}
|
|
8562
8590
|
|
|
8563
8591
|
&[aria-invalid='true'] {
|
|
8564
8592
|
border-color: var(--wui-input-color-border-error);
|
|
8565
|
-
color: var(--wui-input-color-
|
|
8593
|
+
outline-color: var(--wui-input-color-border-error);
|
|
8566
8594
|
}
|
|
8567
8595
|
|
|
8568
8596
|
&:disabled {
|
|
@@ -8585,6 +8613,29 @@ var StyledInputContainer = import_styled_components44.default.div`
|
|
|
8585
8613
|
|
|
8586
8614
|
textarea {
|
|
8587
8615
|
border-radius: var(--wui-input-multiline-border-radius);
|
|
8616
|
+
|
|
8617
|
+
--wui-input-line-height: var(--wui-typography-body-3-line-height);
|
|
8618
|
+
}
|
|
8619
|
+
|
|
8620
|
+
[type='search'] {
|
|
8621
|
+
&::-webkit-search-cancel-button {
|
|
8622
|
+
appearance: none;
|
|
8623
|
+
height: 16px;
|
|
8624
|
+
width: 16px;
|
|
8625
|
+
margin-right: -4px;
|
|
8626
|
+
|
|
8627
|
+
/* css vars don't work in data URLs, so the stroke color value is hardcoded. if we support dark mode, we'll need to swap the background image based on the users preferred color scheme */
|
|
8628
|
+
background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 4L4 12M4 4L12 12' stroke='%2364646a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
|
|
8629
|
+
background-position: center;
|
|
8630
|
+
background-repeat: no-repeat;
|
|
8631
|
+
cursor: pointer;
|
|
8632
|
+
background-color: var(--wui-color-bg-surface-secondary);
|
|
8633
|
+
border-radius: var(--wui-border-radius-rounded);
|
|
8634
|
+
|
|
8635
|
+
&:hover {
|
|
8636
|
+
background-color: var(--wui-color-bg-surface-secondary-hover);
|
|
8637
|
+
}
|
|
8638
|
+
}
|
|
8588
8639
|
}
|
|
8589
8640
|
|
|
8590
8641
|
.wui-input-left-icon {
|
|
@@ -10359,17 +10410,17 @@ var RadioIcon = () => /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
|
|
|
10359
10410
|
"svg",
|
|
10360
10411
|
{
|
|
10361
10412
|
fill: "inherit",
|
|
10362
|
-
height: "
|
|
10363
|
-
viewBox: "0 0
|
|
10364
|
-
width: "
|
|
10413
|
+
height: "1",
|
|
10414
|
+
viewBox: "0 0 1 1",
|
|
10415
|
+
width: "1",
|
|
10365
10416
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10366
10417
|
children: /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
|
|
10367
10418
|
"circle",
|
|
10368
10419
|
{
|
|
10369
|
-
cx: "
|
|
10370
|
-
cy: "
|
|
10420
|
+
cx: "0.5",
|
|
10421
|
+
cy: "0.5",
|
|
10371
10422
|
fill: "currentColor",
|
|
10372
|
-
r: "
|
|
10423
|
+
r: "0.5"
|
|
10373
10424
|
}
|
|
10374
10425
|
)
|
|
10375
10426
|
}
|
|
@@ -10379,18 +10430,33 @@ var inputSizeSmall2 = import_styled_components65.css`
|
|
|
10379
10430
|
height: 14px;
|
|
10380
10431
|
min-width: 14px;
|
|
10381
10432
|
min-height: 14px;
|
|
10433
|
+
|
|
10434
|
+
svg {
|
|
10435
|
+
width: 7px;
|
|
10436
|
+
height: 7px;
|
|
10437
|
+
}
|
|
10382
10438
|
`;
|
|
10383
10439
|
var inputSizeMedium2 = import_styled_components65.css`
|
|
10384
10440
|
width: 16px;
|
|
10385
10441
|
height: 16px;
|
|
10386
10442
|
min-width: 16px;
|
|
10387
10443
|
min-height: 16px;
|
|
10444
|
+
|
|
10445
|
+
svg {
|
|
10446
|
+
width: 8px;
|
|
10447
|
+
height: 8px;
|
|
10448
|
+
}
|
|
10388
10449
|
`;
|
|
10389
10450
|
var inputSizeLarge2 = import_styled_components65.css`
|
|
10390
10451
|
width: 20px;
|
|
10391
10452
|
height: 20px;
|
|
10392
10453
|
min-width: 20px;
|
|
10393
10454
|
min-height: 20px;
|
|
10455
|
+
|
|
10456
|
+
svg {
|
|
10457
|
+
width: 10px;
|
|
10458
|
+
height: 10px;
|
|
10459
|
+
}
|
|
10394
10460
|
`;
|
|
10395
10461
|
var getSizeCss2 = (size) => {
|
|
10396
10462
|
if (size === "sm") return inputSizeSmall2;
|
|
@@ -10412,9 +10478,10 @@ var StyledRadioInput = import_styled_components65.default.div`
|
|
|
10412
10478
|
display: grid;
|
|
10413
10479
|
place-content: center;
|
|
10414
10480
|
align-self: flex-start;
|
|
10481
|
+
border-width: 1px;
|
|
10482
|
+
border-style: solid;
|
|
10483
|
+
border-color: ${({ $disabled }) => $disabled ? "var(--wui-color-bg-border-disabled)" : "var(--wui-color-border)"};
|
|
10415
10484
|
background-color: ${({ $disabled }) => $disabled ? "var(--wui-color-bg-surface-disabled)" : "var(--wui-color-bg-surface)"};
|
|
10416
|
-
border: 1px solid
|
|
10417
|
-
${({ $disabled }) => $disabled ? "var(--wui-color-icon-disabled)" : "var(--wui-color-border)"};
|
|
10418
10485
|
|
|
10419
10486
|
/* radio button circle icon */
|
|
10420
10487
|
svg {
|
|
@@ -10428,9 +10495,9 @@ var StyledRadioInput = import_styled_components65.default.div`
|
|
|
10428
10495
|
var StyledHiddenRadioInput = import_styled_components65.default.input`
|
|
10429
10496
|
${visuallyHiddenStyle}
|
|
10430
10497
|
|
|
10431
|
-
/* toggles display of faux-input
|
|
10498
|
+
/* toggles display of faux-input border-color */
|
|
10432
10499
|
&:checked + label [data-wui-faux-input='true'] {
|
|
10433
|
-
border-color: ${({ disabled }) => disabled ? "var(--wui-color-bg-
|
|
10500
|
+
border-color: ${({ disabled }) => disabled ? "var(--wui-color-bg-border-disabled)" : "var(--wui-color-bg-fill)"};
|
|
10434
10501
|
}
|
|
10435
10502
|
|
|
10436
10503
|
/* toggles display of RadioIcon */
|
|
@@ -10790,23 +10857,13 @@ var import_styled_components69 = __toESM(require("styled-components"));
|
|
|
10790
10857
|
var import_jsx_runtime246 = require("react/jsx-runtime");
|
|
10791
10858
|
var StyledTrigger = (0, import_styled_components69.default)(import_react_select.Trigger)`
|
|
10792
10859
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
10793
|
-
|
|
10794
|
-
--wui-
|
|
10795
|
-
|
|
10796
|
-
|
|
10797
|
-
|
|
10798
|
-
|
|
10799
|
-
|
|
10800
|
-
--wui-select-multiline-border-radius: var(--wui-border-radius-02);
|
|
10801
|
-
--wui-select-vertical-padding: var(--wui-space-02);
|
|
10802
|
-
--wui-select-horizontal-padding: var(--wui-space-03);
|
|
10803
|
-
--wui-select-placeholder: var(--wui-gray-10);
|
|
10804
|
-
--wui-select-color-text-error: var(--wui-color-text-error);
|
|
10805
|
-
|
|
10806
|
-
padding: var(--wui-select-vertical-padding) var(--wui-select-horizontal-padding);
|
|
10807
|
-
background-color: var(--wui-select-color-bg);
|
|
10808
|
-
border: 1px solid var(--wui-select-color-border);
|
|
10809
|
-
border-radius: var(--wui-select-border-radius);
|
|
10860
|
+
${inputCssVars};
|
|
10861
|
+
padding: var(--wui-input-vertical-padding) var(--wui-input-horizontal-padding);
|
|
10862
|
+
background-color: var(--wui-input-color-bg);
|
|
10863
|
+
border: none;
|
|
10864
|
+
outline: 1px solid var(--wui-input-color-border);
|
|
10865
|
+
outline-offset: -2px;
|
|
10866
|
+
border-radius: var(--wui-input-border-radius);
|
|
10810
10867
|
min-width: 200px;
|
|
10811
10868
|
text-align: left;
|
|
10812
10869
|
display: inline-flex;
|
|
@@ -10814,6 +10871,9 @@ var StyledTrigger = (0, import_styled_components69.default)(import_react_select.
|
|
|
10814
10871
|
justify-content: space-between;
|
|
10815
10872
|
max-width: 100%;
|
|
10816
10873
|
width: ${({ $fullWidth = false }) => $fullWidth ? "100%" : "auto"};
|
|
10874
|
+
color: var(--wui-input-color-text);
|
|
10875
|
+
font-size: var(--wui-input-font-size);
|
|
10876
|
+
line-height: var(--wui-input-line-height);
|
|
10817
10877
|
|
|
10818
10878
|
> span {
|
|
10819
10879
|
white-space: nowrap;
|
|
@@ -10827,14 +10887,17 @@ var StyledTrigger = (0, import_styled_components69.default)(import_react_select.
|
|
|
10827
10887
|
}
|
|
10828
10888
|
|
|
10829
10889
|
&[aria-invalid='true'] {
|
|
10830
|
-
outline: 2px solid var(--wui-
|
|
10831
|
-
color: var(--wui-select-color-text-error);
|
|
10890
|
+
outline: 2px solid var(--wui-input-color-border-error);
|
|
10832
10891
|
}
|
|
10833
10892
|
|
|
10834
10893
|
&:disabled {
|
|
10835
|
-
|
|
10894
|
+
outline-color: var(--wui-color-bg-surface-disabled);
|
|
10836
10895
|
background-color: var(--wui-color-bg-surface-disabled);
|
|
10837
10896
|
}
|
|
10897
|
+
|
|
10898
|
+
[data-placeholder] {
|
|
10899
|
+
color: var(--wui-input-placeholder);
|
|
10900
|
+
}
|
|
10838
10901
|
`;
|
|
10839
10902
|
var StyledContent3 = (0, import_styled_components69.default)(import_react_select.Content)`
|
|
10840
10903
|
--wui-select-content-border: var(--wui-color-border);
|
|
@@ -10878,7 +10941,13 @@ var Select = (0, import_react49.forwardRef)(
|
|
|
10878
10941
|
$fullWidth: responsiveFullWidth,
|
|
10879
10942
|
...props,
|
|
10880
10943
|
children: [
|
|
10881
|
-
/* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
|
|
10944
|
+
/* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
|
|
10945
|
+
import_react_select.Value,
|
|
10946
|
+
{
|
|
10947
|
+
"data-placeholder": placeholder,
|
|
10948
|
+
placeholder
|
|
10949
|
+
}
|
|
10950
|
+
),
|
|
10882
10951
|
/* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
|
|
10883
10952
|
Icon,
|
|
10884
10953
|
{
|
|
@@ -10914,6 +10983,7 @@ var StyledItem = (0, import_styled_components70.default)(import_react_select2.It
|
|
|
10914
10983
|
font-size: var(--font-size);
|
|
10915
10984
|
font-weight: var(--font-weight);
|
|
10916
10985
|
border-radius: var(--wui-border-radius-01);
|
|
10986
|
+
cursor: pointer;
|
|
10917
10987
|
|
|
10918
10988
|
&:hover,
|
|
10919
10989
|
&:focus-visible {
|