@wistia/ui 0.4.8-beta.d9bacfdc.e51055f → 0.4.8
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 +5 -214
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +5 -84
- package/dist/index.d.ts +5 -84
- package/dist/index.mjs +57 -272
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -2
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.4.8
|
|
3
|
+
* @license @wistia/ui v0.4.8
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -75,9 +75,6 @@ __export(index_exports, {
|
|
|
75
75
|
RadioGroup: () => RadioGroup,
|
|
76
76
|
RadioMenuItem: () => RadioMenuItem,
|
|
77
77
|
ScreenReaderOnly: () => ScreenReaderOnly,
|
|
78
|
-
Select: () => Select,
|
|
79
|
-
SelectOption: () => SelectOption,
|
|
80
|
-
SelectOptionGroup: () => SelectOptionGroup,
|
|
81
78
|
Stack: () => Stack,
|
|
82
79
|
SubMenu: () => SubMenu,
|
|
83
80
|
Tag: () => Tag,
|
|
@@ -5471,25 +5468,12 @@ var generateHref = (href, type, disabled) => {
|
|
|
5471
5468
|
var isButton = (props) => (0, import_type_guards10.isUndefined)(props.href);
|
|
5472
5469
|
var isLink = (props) => (0, import_type_guards10.isNotUndefined)(props.href);
|
|
5473
5470
|
var StyledLink = import_styled_components17.default.a`
|
|
5474
|
-
--link-icon-size: 14px;
|
|
5475
|
-
|
|
5476
5471
|
${({ href }) => (0, import_type_guards10.isNil)(href) && buttonResetCss};
|
|
5477
5472
|
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
5478
5473
|
cursor: pointer;
|
|
5479
5474
|
font-family: var(--wui-typography-family-default);
|
|
5480
5475
|
color: var(--wui-color-text-link);
|
|
5481
5476
|
text-decoration: ${({ $underline }) => $underline ? "underline" : "none"};
|
|
5482
|
-
display: inline-flex;
|
|
5483
|
-
align-items: baseline;
|
|
5484
|
-
gap: var(--wui-space-01);
|
|
5485
|
-
|
|
5486
|
-
/* This ensure that the icon is the corect color when the style is solid or the button is disabled */
|
|
5487
|
-
&& {
|
|
5488
|
-
svg {
|
|
5489
|
-
width: var(--link-icon-size);
|
|
5490
|
-
height: var(--link-icon-size);
|
|
5491
|
-
}
|
|
5492
|
-
}
|
|
5493
5477
|
`;
|
|
5494
5478
|
var Link = (0, import_react11.forwardRef)(
|
|
5495
5479
|
({
|
|
@@ -5499,8 +5483,6 @@ var Link = (0, import_react11.forwardRef)(
|
|
|
5499
5483
|
disabled = false,
|
|
5500
5484
|
colorScheme = "inherit",
|
|
5501
5485
|
underline = false,
|
|
5502
|
-
leftIcon,
|
|
5503
|
-
rightIcon,
|
|
5504
5486
|
...props
|
|
5505
5487
|
}, ref) => {
|
|
5506
5488
|
const inRouterContext = (0, import_react_router_dom.useInRouterContext)();
|
|
@@ -5559,17 +5541,13 @@ var Link = (0, import_react11.forwardRef)(
|
|
|
5559
5541
|
to: to ?? "",
|
|
5560
5542
|
children
|
|
5561
5543
|
}
|
|
5562
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime161.
|
|
5544
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
|
|
5563
5545
|
StyledLink,
|
|
5564
5546
|
{
|
|
5565
5547
|
as: "a",
|
|
5566
5548
|
...combinedProps,
|
|
5567
5549
|
href: to,
|
|
5568
|
-
children
|
|
5569
|
-
leftIcon ?? null,
|
|
5570
|
-
children,
|
|
5571
|
-
rightIcon ?? null
|
|
5572
|
-
]
|
|
5550
|
+
children
|
|
5573
5551
|
}
|
|
5574
5552
|
);
|
|
5575
5553
|
}
|
|
@@ -7843,8 +7821,8 @@ var StyledSubTrigger = (0, import_styled_components43.default)(import_react_drop
|
|
|
7843
7821
|
`;
|
|
7844
7822
|
var SubMenuTrigger = (props) => {
|
|
7845
7823
|
const { isSmAndUp } = useMq();
|
|
7846
|
-
const
|
|
7847
|
-
return /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
|
|
7824
|
+
const Trigger2 = isSmAndUp ? StyledSubTrigger : import_react_dropdown_menu3.DropdownMenuItem;
|
|
7825
|
+
return /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(Trigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
|
|
7848
7826
|
MenuItemButton,
|
|
7849
7827
|
{
|
|
7850
7828
|
...props,
|
|
@@ -8806,190 +8784,6 @@ var WistiaLogo = ({
|
|
|
8806
8784
|
return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime205.jsx)("a", { href, children: Logo }) : Logo;
|
|
8807
8785
|
};
|
|
8808
8786
|
WistiaLogo.displayName = "WistiaLogo";
|
|
8809
|
-
|
|
8810
|
-
// src/components/Select/Select.tsx
|
|
8811
|
-
var import_react_select = require("@radix-ui/react-select");
|
|
8812
|
-
var import_react41 = require("react");
|
|
8813
|
-
var import_styled_components54 = __toESM(require("styled-components"));
|
|
8814
|
-
var import_jsx_runtime206 = require("react/jsx-runtime");
|
|
8815
|
-
var StyledTrigger = (0, import_styled_components54.default)(import_react_select.Trigger)`
|
|
8816
|
-
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8817
|
-
--wui-select-color-bg: var(--wui-color-bg-surface);
|
|
8818
|
-
--wui-select-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
8819
|
-
--wui-select-color-border: var(--wui-color-border);
|
|
8820
|
-
--wui-select-color-border-focus: var(--wui-color-border-active);
|
|
8821
|
-
--wui-select-color-border-error: var(--wui-color-border-error);
|
|
8822
|
-
--wui-select-color-border-disabled: var(--wui-color-border-disabled);
|
|
8823
|
-
--wui-select-border-radius: var(--wui-border-radius-rounded);
|
|
8824
|
-
--wui-select-multiline-border-radius: var(--wui-border-radius-02);
|
|
8825
|
-
--wui-select-vertical-padding: var(--wui-space-02);
|
|
8826
|
-
--wui-select-horizontal-padding: var(--wui-space-03);
|
|
8827
|
-
--wui-select-placeholder: var(--wui-gray-10);
|
|
8828
|
-
--wui-select-color-text-error: var(--wui-color-text-error);
|
|
8829
|
-
|
|
8830
|
-
padding: var(--wui-select-vertical-padding) var(--wui-select-horizontal-padding);
|
|
8831
|
-
background-color: var(--wui-select-color-bg);
|
|
8832
|
-
border: 1px solid var(--wui-select-color-border);
|
|
8833
|
-
border-radius: var(--wui-select-border-radius);
|
|
8834
|
-
min-width: 200px;
|
|
8835
|
-
text-align: left;
|
|
8836
|
-
display: inline-flex;
|
|
8837
|
-
align-items: center;
|
|
8838
|
-
justify-content: space-between;
|
|
8839
|
-
width: ${({ $fullWidth = false }) => $fullWidth ? "100%" : "auto"};
|
|
8840
|
-
|
|
8841
|
-
&[aria-expanded='true'],
|
|
8842
|
-
&:focus {
|
|
8843
|
-
outline: 2px solid var(--wui-color-focus-ring);
|
|
8844
|
-
}
|
|
8845
|
-
|
|
8846
|
-
&[aria-invalid='true'] {
|
|
8847
|
-
outline: 2px solid var(--wui-select-color-border-error);
|
|
8848
|
-
color: var(--wui-select-color-text-error);
|
|
8849
|
-
}
|
|
8850
|
-
|
|
8851
|
-
&:disabled {
|
|
8852
|
-
border-color: var(--wui-color-bg-surface-disabled);
|
|
8853
|
-
background-color: var(--wui-color-bg-surface-disabled);
|
|
8854
|
-
}
|
|
8855
|
-
`;
|
|
8856
|
-
var StyledContent2 = (0, import_styled_components54.default)(import_react_select.Content)`
|
|
8857
|
-
--wui-select-content-border: var(--wui-color-border);
|
|
8858
|
-
--wui-select-content-bg: var(--wui-color-bg-surface);
|
|
8859
|
-
--wui-select-content-border-radius: var(--wui-border-radius-02);
|
|
8860
|
-
--wui-select-option-padding: var(--wui-space-02);
|
|
8861
|
-
--wui-select-option-inner-gap: var(--wui-space-03);
|
|
8862
|
-
--wui-select-option-bg-hover: var(--wui-color-bg-surface-hover);
|
|
8863
|
-
|
|
8864
|
-
overflow: hidden;
|
|
8865
|
-
transform: translateY(8px);
|
|
8866
|
-
background-color: var(--wui-select-content-bg);
|
|
8867
|
-
border: 1px solid var(--wui-select-content-border);
|
|
8868
|
-
border-radius: var(--wui-select-content-border-radius);
|
|
8869
|
-
padding: var(--wui-select-option-padding);
|
|
8870
|
-
min-width: 200px;
|
|
8871
|
-
`;
|
|
8872
|
-
var Select = (0, import_react41.forwardRef)(
|
|
8873
|
-
({
|
|
8874
|
-
colorScheme = "inherit",
|
|
8875
|
-
children,
|
|
8876
|
-
onChange = () => null,
|
|
8877
|
-
placeholder = "Select...",
|
|
8878
|
-
fullWidth = false,
|
|
8879
|
-
...props
|
|
8880
|
-
}, forwardedRef) => {
|
|
8881
|
-
const responsiveFullWidth = useResponsiveProp(fullWidth);
|
|
8882
|
-
return /* @__PURE__ */ (0, import_jsx_runtime206.jsxs)(
|
|
8883
|
-
import_react_select.Root,
|
|
8884
|
-
{
|
|
8885
|
-
...props,
|
|
8886
|
-
onValueChange: onChange,
|
|
8887
|
-
children: [
|
|
8888
|
-
/* @__PURE__ */ (0, import_jsx_runtime206.jsxs)(
|
|
8889
|
-
StyledTrigger,
|
|
8890
|
-
{
|
|
8891
|
-
ref: forwardedRef,
|
|
8892
|
-
$colorScheme: colorScheme,
|
|
8893
|
-
$fullWidth: responsiveFullWidth,
|
|
8894
|
-
...props,
|
|
8895
|
-
children: [
|
|
8896
|
-
/* @__PURE__ */ (0, import_jsx_runtime206.jsx)(import_react_select.Value, { placeholder }),
|
|
8897
|
-
/* @__PURE__ */ (0, import_jsx_runtime206.jsx)(
|
|
8898
|
-
Icon,
|
|
8899
|
-
{
|
|
8900
|
-
size: "md",
|
|
8901
|
-
type: "caret-down"
|
|
8902
|
-
}
|
|
8903
|
-
)
|
|
8904
|
-
]
|
|
8905
|
-
}
|
|
8906
|
-
),
|
|
8907
|
-
/* @__PURE__ */ (0, import_jsx_runtime206.jsx)(import_react_select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime206.jsxs)(StyledContent2, { position: "popper", children: [
|
|
8908
|
-
/* @__PURE__ */ (0, import_jsx_runtime206.jsx)(import_react_select.ScrollUpButton, { children: /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(Icon, { type: "caret-up" }) }),
|
|
8909
|
-
/* @__PURE__ */ (0, import_jsx_runtime206.jsx)(import_react_select.Viewport, { children }),
|
|
8910
|
-
/* @__PURE__ */ (0, import_jsx_runtime206.jsx)(import_react_select.ScrollDownButton, { children: /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(Icon, { type: "caret-down" }) })
|
|
8911
|
-
] }) })
|
|
8912
|
-
]
|
|
8913
|
-
}
|
|
8914
|
-
);
|
|
8915
|
-
}
|
|
8916
|
-
);
|
|
8917
|
-
Select.displayName = "Select";
|
|
8918
|
-
|
|
8919
|
-
// src/components/Select/SelectOption.tsx
|
|
8920
|
-
var import_react_select2 = require("@radix-ui/react-select");
|
|
8921
|
-
var import_react42 = require("react");
|
|
8922
|
-
var import_styled_components55 = __toESM(require("styled-components"));
|
|
8923
|
-
var import_jsx_runtime207 = require("react/jsx-runtime");
|
|
8924
|
-
var StyledItem = (0, import_styled_components55.default)(import_react_select2.Item)`
|
|
8925
|
-
${variantStyleMap2.body3};
|
|
8926
|
-
display: flex;
|
|
8927
|
-
padding: var(--wui-select-option-padding);
|
|
8928
|
-
gap: var(--wui-select-option-inner-gap);
|
|
8929
|
-
font-size: var(--font-size);
|
|
8930
|
-
font-weight: var(--font-weight);
|
|
8931
|
-
border-radius: var(--wui-border-radius-01);
|
|
8932
|
-
|
|
8933
|
-
&:hover,
|
|
8934
|
-
&:focus-visible {
|
|
8935
|
-
background-color: var(--wui-select-option-bg-hover);
|
|
8936
|
-
outline: none;
|
|
8937
|
-
}
|
|
8938
|
-
|
|
8939
|
-
&[aria-disabled='true'] {
|
|
8940
|
-
color: var(--wui-color-text-disabled);
|
|
8941
|
-
}
|
|
8942
|
-
|
|
8943
|
-
&[aria-disabled='true']:hover {
|
|
8944
|
-
background-color: transparent;
|
|
8945
|
-
}
|
|
8946
|
-
`;
|
|
8947
|
-
var StyledIconContainer = import_styled_components55.default.span`
|
|
8948
|
-
width: 12px;
|
|
8949
|
-
`;
|
|
8950
|
-
var SelectOption = (0, import_react42.forwardRef)(
|
|
8951
|
-
({ children, ...props }, forwardedRef) => {
|
|
8952
|
-
return /* @__PURE__ */ (0, import_jsx_runtime207.jsxs)(
|
|
8953
|
-
StyledItem,
|
|
8954
|
-
{
|
|
8955
|
-
...props,
|
|
8956
|
-
ref: forwardedRef,
|
|
8957
|
-
children: [
|
|
8958
|
-
/* @__PURE__ */ (0, import_jsx_runtime207.jsx)(StyledIconContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(import_react_select2.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
|
|
8959
|
-
Icon,
|
|
8960
|
-
{
|
|
8961
|
-
size: "sm",
|
|
8962
|
-
type: "checkmark"
|
|
8963
|
-
}
|
|
8964
|
-
) }) }),
|
|
8965
|
-
/* @__PURE__ */ (0, import_jsx_runtime207.jsx)(import_react_select2.ItemText, { children })
|
|
8966
|
-
]
|
|
8967
|
-
}
|
|
8968
|
-
);
|
|
8969
|
-
}
|
|
8970
|
-
);
|
|
8971
|
-
SelectOption.displayName = "Option";
|
|
8972
|
-
|
|
8973
|
-
// src/components/Select/SelectOptionGroup.tsx
|
|
8974
|
-
var import_react_select3 = require("@radix-ui/react-select");
|
|
8975
|
-
var import_styled_components56 = __toESM(require("styled-components"));
|
|
8976
|
-
var import_jsx_runtime208 = require("react/jsx-runtime");
|
|
8977
|
-
var StyledLabel3 = (0, import_styled_components56.default)(import_react_select3.Label)`
|
|
8978
|
-
padding: var(--wui-select-option-padding);
|
|
8979
|
-
`;
|
|
8980
|
-
var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
8981
|
-
return /* @__PURE__ */ (0, import_jsx_runtime208.jsxs)(import_react_select3.Group, { ...props, children: [
|
|
8982
|
-
/* @__PURE__ */ (0, import_jsx_runtime208.jsx)(StyledLabel3, { children: /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(
|
|
8983
|
-
Text,
|
|
8984
|
-
{
|
|
8985
|
-
prominence: "secondary",
|
|
8986
|
-
variant: "body3",
|
|
8987
|
-
children: label
|
|
8988
|
-
}
|
|
8989
|
-
) }),
|
|
8990
|
-
children
|
|
8991
|
-
] });
|
|
8992
|
-
};
|
|
8993
8787
|
// Annotate the CommonJS export names for ESM import in node:
|
|
8994
8788
|
0 && (module.exports = {
|
|
8995
8789
|
ActionButton,
|
|
@@ -9028,9 +8822,6 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
|
9028
8822
|
RadioGroup,
|
|
9029
8823
|
RadioMenuItem,
|
|
9030
8824
|
ScreenReaderOnly,
|
|
9031
|
-
Select,
|
|
9032
|
-
SelectOption,
|
|
9033
|
-
SelectOptionGroup,
|
|
9034
8825
|
Stack,
|
|
9035
8826
|
SubMenu,
|
|
9036
8827
|
Tag,
|