@wistia/ui 0.14.32 → 0.14.33

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 CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v0.14.32
3
+ * @license @wistia/ui v0.14.33
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -9029,22 +9029,44 @@ var Center = (0, import_react33.forwardRef)(
9029
9029
  Center.displayName = "Center_UI";
9030
9030
 
9031
9031
  // src/components/Checkbox/Checkbox.tsx
9032
+ var import_type_guards31 = require("@wistia/type-guards");
9032
9033
  var import_react38 = require("react");
9033
9034
  var import_styled_components43 = __toESM(require("styled-components"));
9034
- var import_type_guards31 = require("@wistia/type-guards");
9035
9035
 
9036
9036
  // src/private/components/FormControlLabel/FormControlLabel.tsx
9037
- var import_styled_components39 = __toESM(require("styled-components"));
9038
9037
  var import_type_guards27 = require("@wistia/type-guards");
9038
+ var import_styled_components39 = __toESM(require("styled-components"));
9039
9039
 
9040
- // src/private/components/FormControlLabel/FormControlLabelDescription.tsx
9040
+ // src/components/ScreenReaderOnly/ScreenReaderOnly.tsx
9041
9041
  var import_styled_components37 = __toESM(require("styled-components"));
9042
9042
  var import_type_guards25 = require("@wistia/type-guards");
9043
9043
  var import_jsx_runtime214 = require("react/jsx-runtime");
9044
- var disabledStyle = import_styled_components37.css`
9044
+ var VisuallyHidden = import_styled_components37.default.div({ ...visuallyHiddenStyle });
9045
+ var VisuallyHiddenButFocusable = import_styled_components37.default.div({
9046
+ "&:not(:focus-within)": visuallyHiddenStyle
9047
+ });
9048
+ var ScreenReaderOnly = ({
9049
+ text,
9050
+ children,
9051
+ focusable = false,
9052
+ ...props
9053
+ }) => {
9054
+ const accessibleText = (0, import_type_guards25.isNotNil)(text) ? text : children;
9055
+ if (focusable) {
9056
+ return /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(VisuallyHiddenButFocusable, { ...props, children: accessibleText });
9057
+ }
9058
+ return /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(VisuallyHidden, { ...props, children: accessibleText });
9059
+ };
9060
+ ScreenReaderOnly.displayName = "ScreenReaderOnly_UI";
9061
+
9062
+ // src/private/components/FormControlLabel/FormControlLabelDescription.tsx
9063
+ var import_styled_components38 = __toESM(require("styled-components"));
9064
+ var import_type_guards26 = require("@wistia/type-guards");
9065
+ var import_jsx_runtime215 = require("react/jsx-runtime");
9066
+ var disabledStyle = import_styled_components38.css`
9045
9067
  color: var(--wui-color-text-disabled);
9046
9068
  `;
9047
- var StyledFormControlLabelDescription = import_styled_components37.default.div`
9069
+ var StyledFormControlLabelDescription = import_styled_components38.default.div`
9048
9070
  color: var(--wui-color-text-secondary);
9049
9071
  display: block;
9050
9072
  font-size: var(--wui-typography-body-4-size);
@@ -9058,10 +9080,10 @@ var FormControlLabelDescription = ({
9058
9080
  disabled = false,
9059
9081
  ...props
9060
9082
  }) => {
9061
- if ((0, import_type_guards25.isNil)(children)) {
9083
+ if ((0, import_type_guards26.isNil)(children)) {
9062
9084
  return null;
9063
9085
  }
9064
- return /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
9086
+ return /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(
9065
9087
  StyledFormControlLabelDescription,
9066
9088
  {
9067
9089
  ...props,
@@ -9072,28 +9094,6 @@ var FormControlLabelDescription = ({
9072
9094
  };
9073
9095
  FormControlLabelDescription.displayName = "FormControlLabelDescription";
9074
9096
 
9075
- // src/components/ScreenReaderOnly/ScreenReaderOnly.tsx
9076
- var import_styled_components38 = __toESM(require("styled-components"));
9077
- var import_type_guards26 = require("@wistia/type-guards");
9078
- var import_jsx_runtime215 = require("react/jsx-runtime");
9079
- var VisuallyHidden = import_styled_components38.default.div({ ...visuallyHiddenStyle });
9080
- var VisuallyHiddenButFocusable = import_styled_components38.default.div({
9081
- "&:not(:focus-within)": visuallyHiddenStyle
9082
- });
9083
- var ScreenReaderOnly = ({
9084
- text,
9085
- children,
9086
- focusable = false,
9087
- ...props
9088
- }) => {
9089
- const accessibleText = (0, import_type_guards26.isNotNil)(text) ? text : children;
9090
- if (focusable) {
9091
- return /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(VisuallyHiddenButFocusable, { ...props, children: accessibleText });
9092
- }
9093
- return /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(VisuallyHidden, { ...props, children: accessibleText });
9094
- };
9095
- ScreenReaderOnly.displayName = "ScreenReaderOnly_UI";
9096
-
9097
9097
  // src/private/components/FormControlLabel/FormControlLabel.tsx
9098
9098
  var import_jsx_runtime216 = require("react/jsx-runtime");
9099
9099
  var disabledStyle2 = import_styled_components39.css`
@@ -9107,7 +9107,7 @@ var StyledLabelWrapper = import_styled_components39.default.div`
9107
9107
  var StyledFormControlLabel = import_styled_components39.default.label`
9108
9108
  cursor: pointer;
9109
9109
  display: flex;
9110
- align-items: center;
9110
+ align-items: flex-start;
9111
9111
  gap: var(--wui-space-02);
9112
9112
  width: 100%;
9113
9113
  color: var(--wui-color-tex);
@@ -9476,7 +9476,6 @@ var StyledCheckboxInput = import_styled_components43.default.div`
9476
9476
  border-radius: var(--wui-border-radius-01);
9477
9477
  display: grid;
9478
9478
  place-content: center;
9479
- align-self: flex-start;
9480
9479
  border-width: 1px;
9481
9480
  border-style: solid;
9482
9481
  border-color: var(--wui-checkbox-border-color);
@@ -10532,7 +10531,8 @@ var Tooltip = ({
10532
10531
  content,
10533
10532
  children,
10534
10533
  forceOpen,
10535
- hideArrow = false
10534
+ hideArrow = false,
10535
+ container = null
10536
10536
  }) => {
10537
10537
  const rootProps = {};
10538
10538
  if (content === "" || content === null) {
@@ -10548,7 +10548,7 @@ var Tooltip = ({
10548
10548
  ...rootProps,
10549
10549
  children: [
10550
10550
  /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_react_tooltip2.Trigger, { asChild: true, children }),
10551
- /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_react_tooltip2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime230.jsxs)(
10551
+ /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_react_tooltip2.Portal, { container, children: /* @__PURE__ */ (0, import_jsx_runtime230.jsxs)(
10552
10552
  StyledContent,
10553
10553
  {
10554
10554
  side: direction,
@@ -11134,7 +11134,7 @@ var ContrastEnforcerSwitch = () => {
11134
11134
  {
11135
11135
  align: "right",
11136
11136
  checked: shouldEnforceMinContrast,
11137
- label: /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(Text, { variant: "label3", children: "Limit to high-contrast colors" }),
11137
+ label: "Limit to high-contrast colors",
11138
11138
  onChange: onChangeContrastLimitedSwitch
11139
11139
  }
11140
11140
  );
@@ -15535,9 +15535,9 @@ var ProgressBar = ({
15535
15535
  ProgressBar.displayName = "ProgressBar_UI";
15536
15536
 
15537
15537
  // src/components/Radio/Radio.tsx
15538
+ var import_type_guards58 = require("@wistia/type-guards");
15538
15539
  var import_react81 = require("react");
15539
15540
  var import_styled_components100 = __toESM(require("styled-components"));
15540
- var import_type_guards58 = require("@wistia/type-guards");
15541
15541
  var import_jsx_runtime297 = require("react/jsx-runtime");
15542
15542
  var sizeSmall2 = import_styled_components100.css`
15543
15543
  --wui-radio-size: 14px;
@@ -15592,7 +15592,6 @@ var StyledRadioWrapper = import_styled_components100.default.div`
15592
15592
  `;
15593
15593
  var StyledRadioInput = import_styled_components100.default.div`
15594
15594
  ${({ $size }) => getSizeCss3($size)}
15595
- align-self: flex-start;
15596
15595
  width: var(--wui-radio-size);
15597
15596
  height: var(--wui-radio-size);
15598
15597
  min-width: var(--wui-radio-size);