@yahoo/uds 3.178.0 → 3.179.0

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.
@@ -48333,7 +48333,7 @@ const ToastConfig = {
48333
48333
  }
48334
48334
  };
48335
48335
  const TooltipConfig = {
48336
- description: "Tooltips provide short, contextual help for UI elements. They appear on hover, focus, or long-press, and should clarify meaning—not introduce new concepts.",
48336
+ description: "Tooltips provide short, contextual help for UI elements. They appear on hover, focus, or tap, and should clarify meaning—not introduce new concepts.",
48337
48337
  label: "Tooltip",
48338
48338
  variants: {
48339
48339
  size: {
@@ -5300,7 +5300,7 @@ declare const ToastConfig: {
5300
5300
  };
5301
5301
  };
5302
5302
  declare const TooltipConfig: {
5303
- readonly description: "Tooltips provide short, contextual help for UI elements. They appear on hover, focus, or long-press, and should clarify meaning—not introduce new concepts.";
5303
+ readonly description: "Tooltips provide short, contextual help for UI elements. They appear on hover, focus, or tap, and should clarify meaning—not introduce new concepts.";
5304
5304
  readonly label: "Tooltip";
5305
5305
  readonly variants: {
5306
5306
  readonly size: {
@@ -5300,7 +5300,7 @@ declare const ToastConfig: {
5300
5300
  };
5301
5301
  };
5302
5302
  declare const TooltipConfig: {
5303
- readonly description: "Tooltips provide short, contextual help for UI elements. They appear on hover, focus, or long-press, and should clarify meaning—not introduce new concepts.";
5303
+ readonly description: "Tooltips provide short, contextual help for UI elements. They appear on hover, focus, or tap, and should clarify meaning—not introduce new concepts.";
5304
5304
  readonly label: "Tooltip";
5305
5305
  readonly variants: {
5306
5306
  readonly size: {
@@ -48333,7 +48333,7 @@ const ToastConfig = {
48333
48333
  }
48334
48334
  };
48335
48335
  const TooltipConfig = {
48336
- description: "Tooltips provide short, contextual help for UI elements. They appear on hover, focus, or long-press, and should clarify meaning—not introduce new concepts.",
48336
+ description: "Tooltips provide short, contextual help for UI elements. They appear on hover, focus, or tap, and should clarify meaning—not introduce new concepts.",
48337
48337
  label: "Tooltip",
48338
48338
  variants: {
48339
48339
  size: {
@@ -12,7 +12,7 @@ let _ariakit_react = require("@ariakit/react");
12
12
  * @componentType Client component
13
13
  *
14
14
  * @description
15
- * Tooltips provide short, contextual help for UI elements. They appear on hover, focus, or long-press, and should clarify meaning—not introduce new concepts.
15
+ * Tooltips provide short, contextual help for UI elements. They appear on hover, focus, or tap, and should clarify meaning—not introduce new concepts.
16
16
  *
17
17
  * Tooltips are not meant for critical information or required actions. If the user must take action, use a Dialog, Popover, or Inline messaging instead.
18
18
  *
@@ -8,7 +8,7 @@ type TooltipProps = UniversalTooltipProps;
8
8
  * @componentType Client component
9
9
  *
10
10
  * @description
11
- * Tooltips provide short, contextual help for UI elements. They appear on hover, focus, or long-press, and should clarify meaning—not introduce new concepts.
11
+ * Tooltips provide short, contextual help for UI elements. They appear on hover, focus, or tap, and should clarify meaning—not introduce new concepts.
12
12
  *
13
13
  * Tooltips are not meant for critical information or required actions. If the user must take action, use a Dialog, Popover, or Inline messaging instead.
14
14
  *
@@ -9,7 +9,7 @@ type TooltipProps = UniversalTooltipProps;
9
9
  * @componentType Client component
10
10
  *
11
11
  * @description
12
- * Tooltips provide short, contextual help for UI elements. They appear on hover, focus, or long-press, and should clarify meaning—not introduce new concepts.
12
+ * Tooltips provide short, contextual help for UI elements. They appear on hover, focus, or tap, and should clarify meaning—not introduce new concepts.
13
13
  *
14
14
  * Tooltips are not meant for critical information or required actions. If the user must take action, use a Dialog, Popover, or Inline messaging instead.
15
15
  *
@@ -11,7 +11,7 @@ import { TooltipProvider } from "@ariakit/react";
11
11
  * @componentType Client component
12
12
  *
13
13
  * @description
14
- * Tooltips provide short, contextual help for UI elements. They appear on hover, focus, or long-press, and should clarify meaning—not introduce new concepts.
14
+ * Tooltips provide short, contextual help for UI elements. They appear on hover, focus, or tap, and should clarify meaning—not introduce new concepts.
15
15
  *
16
16
  * Tooltips are not meant for critical information or required actions. If the user must take action, use a Dialog, Popover, or Inline messaging instead.
17
17
  *
@@ -1,14 +1,74 @@
1
1
  /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
2
  "use client";
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
+ const require_components_client_Tooltip_tooltipContext = require("./tooltipContext.cjs");
4
5
  let react = require("react");
5
6
  let react_jsx_runtime = require("react/jsx-runtime");
6
7
  let _ariakit_react = require("@ariakit/react");
7
8
  //#region src/components/client/Tooltip/TooltipTrigger.tsx
9
+ /**
10
+ * Touch devices (mobile browsers and in-app webviews) don't produce real hover
11
+ * or keyboard focus, so Ariakit's anchor never opens the tooltip from a tap.
12
+ * Track the pointer type of the last press and toggle the tooltip when a touch
13
+ * tap results in a click. A tap anywhere outside the trigger or the tooltip
14
+ * closes it again.
15
+ */
16
+ function useTouchToggle() {
17
+ const store = (0, _ariakit_react.useTooltipContext)();
18
+ const isControlled = (0, react.useContext)(require_components_client_Tooltip_tooltipContext.TooltipInternalContext)?.isControlled ?? false;
19
+ const open = (0, _ariakit_react.useStoreState)(store, "open");
20
+ const lastPointerTypeRef = (0, react.useRef)(null);
21
+ const openedByTouchRef = (0, react.useRef)(false);
22
+ (0, react.useEffect)(() => {
23
+ if (!open) {
24
+ openedByTouchRef.current = false;
25
+ return;
26
+ }
27
+ if (!store || isControlled || !openedByTouchRef.current) return;
28
+ const onPointerDownOutside = (event) => {
29
+ const target = event.target;
30
+ const { anchorElement, contentElement } = store.getState();
31
+ if (target && (anchorElement?.contains(target) || contentElement?.contains(target))) return;
32
+ store.hide();
33
+ };
34
+ document.addEventListener("pointerdown", onPointerDownOutside, true);
35
+ return () => document.removeEventListener("pointerdown", onPointerDownOutside, true);
36
+ }, [
37
+ open,
38
+ store,
39
+ isControlled
40
+ ]);
41
+ const onPointerDown = (event) => {
42
+ lastPointerTypeRef.current = event.pointerType;
43
+ if (event.pointerType === "touch" && store) store.setDisclosureElement(event.currentTarget);
44
+ };
45
+ const onClick = (event) => {
46
+ const pointerType = lastPointerTypeRef.current;
47
+ lastPointerTypeRef.current = null;
48
+ if (pointerType !== "touch" || !store || isControlled || event.defaultPrevented) return;
49
+ if (store.getState().open) {
50
+ store.hide();
51
+ return;
52
+ }
53
+ store.setAnchorElement(event.currentTarget);
54
+ store.setDisclosureElement(event.currentTarget);
55
+ openedByTouchRef.current = true;
56
+ store.show();
57
+ };
58
+ return {
59
+ onPointerDown,
60
+ onClick
61
+ };
62
+ }
8
63
  function TooltipTrigger({ children }) {
9
- if ((0, react.isValidElement)(children) && children.type !== react.Fragment) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ariakit_react.TooltipAnchor, { render: children });
64
+ const touchProps = useTouchToggle();
65
+ if ((0, react.isValidElement)(children) && children.type !== react.Fragment) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ariakit_react.TooltipAnchor, {
66
+ render: children,
67
+ ...touchProps
68
+ });
10
69
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ariakit_react.TooltipAnchor, {
11
70
  className: "inline",
71
+ ...touchProps,
12
72
  children
13
73
  });
14
74
  }
@@ -1,13 +1,73 @@
1
1
  /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
2
  "use client";
3
- import { Fragment, isValidElement } from "react";
3
+ import { TooltipInternalContext } from "./tooltipContext.js";
4
+ import { Fragment, isValidElement, useContext, useEffect, useRef } from "react";
4
5
  import { jsx } from "react/jsx-runtime";
5
- import { TooltipAnchor } from "@ariakit/react";
6
+ import { TooltipAnchor, useStoreState, useTooltipContext } from "@ariakit/react";
6
7
  //#region src/components/client/Tooltip/TooltipTrigger.tsx
8
+ /**
9
+ * Touch devices (mobile browsers and in-app webviews) don't produce real hover
10
+ * or keyboard focus, so Ariakit's anchor never opens the tooltip from a tap.
11
+ * Track the pointer type of the last press and toggle the tooltip when a touch
12
+ * tap results in a click. A tap anywhere outside the trigger or the tooltip
13
+ * closes it again.
14
+ */
15
+ function useTouchToggle() {
16
+ const store = useTooltipContext();
17
+ const isControlled = useContext(TooltipInternalContext)?.isControlled ?? false;
18
+ const open = useStoreState(store, "open");
19
+ const lastPointerTypeRef = useRef(null);
20
+ const openedByTouchRef = useRef(false);
21
+ useEffect(() => {
22
+ if (!open) {
23
+ openedByTouchRef.current = false;
24
+ return;
25
+ }
26
+ if (!store || isControlled || !openedByTouchRef.current) return;
27
+ const onPointerDownOutside = (event) => {
28
+ const target = event.target;
29
+ const { anchorElement, contentElement } = store.getState();
30
+ if (target && (anchorElement?.contains(target) || contentElement?.contains(target))) return;
31
+ store.hide();
32
+ };
33
+ document.addEventListener("pointerdown", onPointerDownOutside, true);
34
+ return () => document.removeEventListener("pointerdown", onPointerDownOutside, true);
35
+ }, [
36
+ open,
37
+ store,
38
+ isControlled
39
+ ]);
40
+ const onPointerDown = (event) => {
41
+ lastPointerTypeRef.current = event.pointerType;
42
+ if (event.pointerType === "touch" && store) store.setDisclosureElement(event.currentTarget);
43
+ };
44
+ const onClick = (event) => {
45
+ const pointerType = lastPointerTypeRef.current;
46
+ lastPointerTypeRef.current = null;
47
+ if (pointerType !== "touch" || !store || isControlled || event.defaultPrevented) return;
48
+ if (store.getState().open) {
49
+ store.hide();
50
+ return;
51
+ }
52
+ store.setAnchorElement(event.currentTarget);
53
+ store.setDisclosureElement(event.currentTarget);
54
+ openedByTouchRef.current = true;
55
+ store.show();
56
+ };
57
+ return {
58
+ onPointerDown,
59
+ onClick
60
+ };
61
+ }
7
62
  function TooltipTrigger({ children }) {
8
- if (isValidElement(children) && children.type !== Fragment) return /* @__PURE__ */ jsx(TooltipAnchor, { render: children });
63
+ const touchProps = useTouchToggle();
64
+ if (isValidElement(children) && children.type !== Fragment) return /* @__PURE__ */ jsx(TooltipAnchor, {
65
+ render: children,
66
+ ...touchProps
67
+ });
9
68
  return /* @__PURE__ */ jsx(TooltipAnchor, {
10
69
  className: "inline",
70
+ ...touchProps,
11
71
  children
12
72
  });
13
73
  }
@@ -48334,7 +48334,7 @@ const ToastConfig = {
48334
48334
  }
48335
48335
  };
48336
48336
  const TooltipConfig = {
48337
- description: "Tooltips provide short, contextual help for UI elements. They appear on hover, focus, or long-press, and should clarify meaning—not introduce new concepts.",
48337
+ description: "Tooltips provide short, contextual help for UI elements. They appear on hover, focus, or tap, and should clarify meaning—not introduce new concepts.",
48338
48338
  label: "Tooltip",
48339
48339
  variants: {
48340
48340
  size: {
@@ -48334,7 +48334,7 @@ const ToastConfig = {
48334
48334
  }
48335
48335
  };
48336
48336
  const TooltipConfig = {
48337
- description: "Tooltips provide short, contextual help for UI elements. They appear on hover, focus, or long-press, and should clarify meaning—not introduce new concepts.",
48337
+ description: "Tooltips provide short, contextual help for UI elements. They appear on hover, focus, or tap, and should clarify meaning—not introduce new concepts.",
48338
48338
  label: "Tooltip",
48339
48339
  variants: {
48340
48340
  size: {
@@ -2948,6 +2948,117 @@ var componentData_default = {
2948
2948
  "motionVarPrefixes": [],
2949
2949
  "factoryTarget": null
2950
2950
  },
2951
+ Switch: {
2952
+ "name": "Switch",
2953
+ "defaultProps": {},
2954
+ "getStylesLiterals": {
2955
+ "switchVariantActiveHandle": "on",
2956
+ "switchVariantActiveHandle:1": "off",
2957
+ "switchVariantHandle": "default",
2958
+ "switchVariantHandleIcon": "default",
2959
+ "switchVariantActiveHandleIcon": "on",
2960
+ "switchVariantActiveHandleIcon:1": "off"
2961
+ },
2962
+ "cxLiterals": [
2963
+ "relative",
2964
+ "pointer-events-none",
2965
+ "uds-border-radius-full",
2966
+ "overflow-hidden",
2967
+ "absolute",
2968
+ "top-0",
2969
+ "left-0",
2970
+ "right-0",
2971
+ "bottom-0",
2972
+ "opacity-95",
2973
+ "group-hover:opacity-100",
2974
+ "transition-[background-color,box-shadow,opacity]",
2975
+ "opacity-0",
2976
+ "m-auto",
2977
+ "transition-opacity",
2978
+ "opacity-100"
2979
+ ],
2980
+ "internalComponents": [
2981
+ "IconSlot",
2982
+ "SwitchBase",
2983
+ "Box",
2984
+ "SpringMotionConfig",
2985
+ "MotionBox",
2986
+ "SwitchProps",
2987
+ "SwitchStaticHandle"
2988
+ ],
2989
+ "internalComponentProps": { "IconSlot": { "data-testid": ["on-icon", "off-icon"] } },
2990
+ "propToVariantKeys": {
2991
+ "size": ["switchSizeHandle", "switchSizeHandleIcon"],
2992
+ "reduceMotion": ["reducedMotion"]
2993
+ },
2994
+ "runtimeConfigDefaultProps": {},
2995
+ "runtimeConfigGetStyles": {},
2996
+ "runtimeConfigInternalComponentProps": {},
2997
+ "motionVarPrefixes": ["--uds-motion-bouncy-4-", "--uds-motion-smooth-3-"],
2998
+ "factoryTarget": null
2999
+ },
3000
+ SwitchBase: {
3001
+ "name": "SwitchBase",
3002
+ "defaultProps": {
3003
+ "labelPosition": "start",
3004
+ "size": "md"
3005
+ },
3006
+ "getStylesLiterals": {
3007
+ "switchVariantRoot": "default",
3008
+ "switchVariantActiveRoot": "on",
3009
+ "switchVariantActiveRoot:1": "off",
3010
+ "display": "flex",
3011
+ "flexDirection": "row",
3012
+ "flexDirection:1": "row-reverse",
3013
+ "alignItems": "center",
3014
+ "switchVariantSwitch": "default",
3015
+ "switchVariantActiveSwitch": "on",
3016
+ "switchVariantActiveSwitch:1": "off",
3017
+ "borderRadius": "full",
3018
+ "position": "relative"
3019
+ },
3020
+ "cxLiterals": [
3021
+ "group",
3022
+ "cursor-pointer",
3023
+ "cursor-default",
3024
+ "opacity-50",
3025
+ "uds-ring",
3026
+ "uds-ring-within",
3027
+ "transition-[background-color,box-shadow]",
3028
+ "cursor-[inherit]",
3029
+ "absolute",
3030
+ "opacity-0",
3031
+ "top-[-1px]",
3032
+ "left-[-1px]",
3033
+ "w-[calc(100%+2px)]",
3034
+ "h-[calc(100%+2px)]",
3035
+ "text-start",
3036
+ "text-end",
3037
+ "translate-x-[1.25rem]",
3038
+ "rtl:translate-x-[-1.25rem]",
3039
+ "translate-x-[0.75rem]",
3040
+ "rtl:translate-x-[-0.75rem]"
3041
+ ],
3042
+ "internalComponents": [
3043
+ "FormLabel",
3044
+ "RootElement",
3045
+ "Box"
3046
+ ],
3047
+ "internalComponentProps": {
3048
+ "FormLabel": {
3049
+ "as": ["div"],
3050
+ "variant": ["inherit"],
3051
+ "color": ["inherit"]
3052
+ },
3053
+ "RootElement": { "data-testid": ["container"] }
3054
+ },
3055
+ "propToVariantKeys": { "size": ["switchSizeRoot", "switchSizeSwitch"] },
3056
+ "runtimeConfigDefaultProps": {},
3057
+ "runtimeConfigGetStyles": {},
3058
+ "runtimeConfigInternalComponentProps": {},
3059
+ "motionVarPrefixes": [],
3060
+ "factoryTarget": null
3061
+ },
2951
3062
  PopoverTrigger: {
2952
3063
  "name": "PopoverTrigger",
2953
3064
  "defaultProps": {},
@@ -3079,117 +3190,6 @@ var componentData_default = {
3079
3190
  "motionVarPrefixes": [],
3080
3191
  "factoryTarget": null
3081
3192
  },
3082
- Switch: {
3083
- "name": "Switch",
3084
- "defaultProps": {},
3085
- "getStylesLiterals": {
3086
- "switchVariantActiveHandle": "on",
3087
- "switchVariantActiveHandle:1": "off",
3088
- "switchVariantHandle": "default",
3089
- "switchVariantHandleIcon": "default",
3090
- "switchVariantActiveHandleIcon": "on",
3091
- "switchVariantActiveHandleIcon:1": "off"
3092
- },
3093
- "cxLiterals": [
3094
- "relative",
3095
- "pointer-events-none",
3096
- "uds-border-radius-full",
3097
- "overflow-hidden",
3098
- "absolute",
3099
- "top-0",
3100
- "left-0",
3101
- "right-0",
3102
- "bottom-0",
3103
- "opacity-95",
3104
- "group-hover:opacity-100",
3105
- "transition-[background-color,box-shadow,opacity]",
3106
- "opacity-0",
3107
- "m-auto",
3108
- "transition-opacity",
3109
- "opacity-100"
3110
- ],
3111
- "internalComponents": [
3112
- "IconSlot",
3113
- "SwitchBase",
3114
- "Box",
3115
- "SpringMotionConfig",
3116
- "MotionBox",
3117
- "SwitchProps",
3118
- "SwitchStaticHandle"
3119
- ],
3120
- "internalComponentProps": { "IconSlot": { "data-testid": ["on-icon", "off-icon"] } },
3121
- "propToVariantKeys": {
3122
- "size": ["switchSizeHandle", "switchSizeHandleIcon"],
3123
- "reduceMotion": ["reducedMotion"]
3124
- },
3125
- "runtimeConfigDefaultProps": {},
3126
- "runtimeConfigGetStyles": {},
3127
- "runtimeConfigInternalComponentProps": {},
3128
- "motionVarPrefixes": ["--uds-motion-bouncy-4-", "--uds-motion-smooth-3-"],
3129
- "factoryTarget": null
3130
- },
3131
- SwitchBase: {
3132
- "name": "SwitchBase",
3133
- "defaultProps": {
3134
- "labelPosition": "start",
3135
- "size": "md"
3136
- },
3137
- "getStylesLiterals": {
3138
- "switchVariantRoot": "default",
3139
- "switchVariantActiveRoot": "on",
3140
- "switchVariantActiveRoot:1": "off",
3141
- "display": "flex",
3142
- "flexDirection": "row",
3143
- "flexDirection:1": "row-reverse",
3144
- "alignItems": "center",
3145
- "switchVariantSwitch": "default",
3146
- "switchVariantActiveSwitch": "on",
3147
- "switchVariantActiveSwitch:1": "off",
3148
- "borderRadius": "full",
3149
- "position": "relative"
3150
- },
3151
- "cxLiterals": [
3152
- "group",
3153
- "cursor-pointer",
3154
- "cursor-default",
3155
- "opacity-50",
3156
- "uds-ring",
3157
- "uds-ring-within",
3158
- "transition-[background-color,box-shadow]",
3159
- "cursor-[inherit]",
3160
- "absolute",
3161
- "opacity-0",
3162
- "top-[-1px]",
3163
- "left-[-1px]",
3164
- "w-[calc(100%+2px)]",
3165
- "h-[calc(100%+2px)]",
3166
- "text-start",
3167
- "text-end",
3168
- "translate-x-[1.25rem]",
3169
- "rtl:translate-x-[-1.25rem]",
3170
- "translate-x-[0.75rem]",
3171
- "rtl:translate-x-[-0.75rem]"
3172
- ],
3173
- "internalComponents": [
3174
- "FormLabel",
3175
- "RootElement",
3176
- "Box"
3177
- ],
3178
- "internalComponentProps": {
3179
- "FormLabel": {
3180
- "as": ["div"],
3181
- "variant": ["inherit"],
3182
- "color": ["inherit"]
3183
- },
3184
- "RootElement": { "data-testid": ["container"] }
3185
- },
3186
- "propToVariantKeys": { "size": ["switchSizeRoot", "switchSizeSwitch"] },
3187
- "runtimeConfigDefaultProps": {},
3188
- "runtimeConfigGetStyles": {},
3189
- "runtimeConfigInternalComponentProps": {},
3190
- "motionVarPrefixes": [],
3191
- "factoryTarget": null
3192
- },
3193
3193
  SelectContent: {
3194
3194
  "name": "SelectContent",
3195
3195
  "defaultProps": {
@@ -2948,6 +2948,117 @@ var componentData_default = {
2948
2948
  "motionVarPrefixes": [],
2949
2949
  "factoryTarget": null
2950
2950
  },
2951
+ Switch: {
2952
+ "name": "Switch",
2953
+ "defaultProps": {},
2954
+ "getStylesLiterals": {
2955
+ "switchVariantActiveHandle": "on",
2956
+ "switchVariantActiveHandle:1": "off",
2957
+ "switchVariantHandle": "default",
2958
+ "switchVariantHandleIcon": "default",
2959
+ "switchVariantActiveHandleIcon": "on",
2960
+ "switchVariantActiveHandleIcon:1": "off"
2961
+ },
2962
+ "cxLiterals": [
2963
+ "relative",
2964
+ "pointer-events-none",
2965
+ "uds-border-radius-full",
2966
+ "overflow-hidden",
2967
+ "absolute",
2968
+ "top-0",
2969
+ "left-0",
2970
+ "right-0",
2971
+ "bottom-0",
2972
+ "opacity-95",
2973
+ "group-hover:opacity-100",
2974
+ "transition-[background-color,box-shadow,opacity]",
2975
+ "opacity-0",
2976
+ "m-auto",
2977
+ "transition-opacity",
2978
+ "opacity-100"
2979
+ ],
2980
+ "internalComponents": [
2981
+ "IconSlot",
2982
+ "SwitchBase",
2983
+ "Box",
2984
+ "SpringMotionConfig",
2985
+ "MotionBox",
2986
+ "SwitchProps",
2987
+ "SwitchStaticHandle"
2988
+ ],
2989
+ "internalComponentProps": { "IconSlot": { "data-testid": ["on-icon", "off-icon"] } },
2990
+ "propToVariantKeys": {
2991
+ "size": ["switchSizeHandle", "switchSizeHandleIcon"],
2992
+ "reduceMotion": ["reducedMotion"]
2993
+ },
2994
+ "runtimeConfigDefaultProps": {},
2995
+ "runtimeConfigGetStyles": {},
2996
+ "runtimeConfigInternalComponentProps": {},
2997
+ "motionVarPrefixes": ["--uds-motion-bouncy-4-", "--uds-motion-smooth-3-"],
2998
+ "factoryTarget": null
2999
+ },
3000
+ SwitchBase: {
3001
+ "name": "SwitchBase",
3002
+ "defaultProps": {
3003
+ "labelPosition": "start",
3004
+ "size": "md"
3005
+ },
3006
+ "getStylesLiterals": {
3007
+ "switchVariantRoot": "default",
3008
+ "switchVariantActiveRoot": "on",
3009
+ "switchVariantActiveRoot:1": "off",
3010
+ "display": "flex",
3011
+ "flexDirection": "row",
3012
+ "flexDirection:1": "row-reverse",
3013
+ "alignItems": "center",
3014
+ "switchVariantSwitch": "default",
3015
+ "switchVariantActiveSwitch": "on",
3016
+ "switchVariantActiveSwitch:1": "off",
3017
+ "borderRadius": "full",
3018
+ "position": "relative"
3019
+ },
3020
+ "cxLiterals": [
3021
+ "group",
3022
+ "cursor-pointer",
3023
+ "cursor-default",
3024
+ "opacity-50",
3025
+ "uds-ring",
3026
+ "uds-ring-within",
3027
+ "transition-[background-color,box-shadow]",
3028
+ "cursor-[inherit]",
3029
+ "absolute",
3030
+ "opacity-0",
3031
+ "top-[-1px]",
3032
+ "left-[-1px]",
3033
+ "w-[calc(100%+2px)]",
3034
+ "h-[calc(100%+2px)]",
3035
+ "text-start",
3036
+ "text-end",
3037
+ "translate-x-[1.25rem]",
3038
+ "rtl:translate-x-[-1.25rem]",
3039
+ "translate-x-[0.75rem]",
3040
+ "rtl:translate-x-[-0.75rem]"
3041
+ ],
3042
+ "internalComponents": [
3043
+ "FormLabel",
3044
+ "RootElement",
3045
+ "Box"
3046
+ ],
3047
+ "internalComponentProps": {
3048
+ "FormLabel": {
3049
+ "as": ["div"],
3050
+ "variant": ["inherit"],
3051
+ "color": ["inherit"]
3052
+ },
3053
+ "RootElement": { "data-testid": ["container"] }
3054
+ },
3055
+ "propToVariantKeys": { "size": ["switchSizeRoot", "switchSizeSwitch"] },
3056
+ "runtimeConfigDefaultProps": {},
3057
+ "runtimeConfigGetStyles": {},
3058
+ "runtimeConfigInternalComponentProps": {},
3059
+ "motionVarPrefixes": [],
3060
+ "factoryTarget": null
3061
+ },
2951
3062
  PopoverTrigger: {
2952
3063
  "name": "PopoverTrigger",
2953
3064
  "defaultProps": {},
@@ -3079,117 +3190,6 @@ var componentData_default = {
3079
3190
  "motionVarPrefixes": [],
3080
3191
  "factoryTarget": null
3081
3192
  },
3082
- Switch: {
3083
- "name": "Switch",
3084
- "defaultProps": {},
3085
- "getStylesLiterals": {
3086
- "switchVariantActiveHandle": "on",
3087
- "switchVariantActiveHandle:1": "off",
3088
- "switchVariantHandle": "default",
3089
- "switchVariantHandleIcon": "default",
3090
- "switchVariantActiveHandleIcon": "on",
3091
- "switchVariantActiveHandleIcon:1": "off"
3092
- },
3093
- "cxLiterals": [
3094
- "relative",
3095
- "pointer-events-none",
3096
- "uds-border-radius-full",
3097
- "overflow-hidden",
3098
- "absolute",
3099
- "top-0",
3100
- "left-0",
3101
- "right-0",
3102
- "bottom-0",
3103
- "opacity-95",
3104
- "group-hover:opacity-100",
3105
- "transition-[background-color,box-shadow,opacity]",
3106
- "opacity-0",
3107
- "m-auto",
3108
- "transition-opacity",
3109
- "opacity-100"
3110
- ],
3111
- "internalComponents": [
3112
- "IconSlot",
3113
- "SwitchBase",
3114
- "Box",
3115
- "SpringMotionConfig",
3116
- "MotionBox",
3117
- "SwitchProps",
3118
- "SwitchStaticHandle"
3119
- ],
3120
- "internalComponentProps": { "IconSlot": { "data-testid": ["on-icon", "off-icon"] } },
3121
- "propToVariantKeys": {
3122
- "size": ["switchSizeHandle", "switchSizeHandleIcon"],
3123
- "reduceMotion": ["reducedMotion"]
3124
- },
3125
- "runtimeConfigDefaultProps": {},
3126
- "runtimeConfigGetStyles": {},
3127
- "runtimeConfigInternalComponentProps": {},
3128
- "motionVarPrefixes": ["--uds-motion-bouncy-4-", "--uds-motion-smooth-3-"],
3129
- "factoryTarget": null
3130
- },
3131
- SwitchBase: {
3132
- "name": "SwitchBase",
3133
- "defaultProps": {
3134
- "labelPosition": "start",
3135
- "size": "md"
3136
- },
3137
- "getStylesLiterals": {
3138
- "switchVariantRoot": "default",
3139
- "switchVariantActiveRoot": "on",
3140
- "switchVariantActiveRoot:1": "off",
3141
- "display": "flex",
3142
- "flexDirection": "row",
3143
- "flexDirection:1": "row-reverse",
3144
- "alignItems": "center",
3145
- "switchVariantSwitch": "default",
3146
- "switchVariantActiveSwitch": "on",
3147
- "switchVariantActiveSwitch:1": "off",
3148
- "borderRadius": "full",
3149
- "position": "relative"
3150
- },
3151
- "cxLiterals": [
3152
- "group",
3153
- "cursor-pointer",
3154
- "cursor-default",
3155
- "opacity-50",
3156
- "uds-ring",
3157
- "uds-ring-within",
3158
- "transition-[background-color,box-shadow]",
3159
- "cursor-[inherit]",
3160
- "absolute",
3161
- "opacity-0",
3162
- "top-[-1px]",
3163
- "left-[-1px]",
3164
- "w-[calc(100%+2px)]",
3165
- "h-[calc(100%+2px)]",
3166
- "text-start",
3167
- "text-end",
3168
- "translate-x-[1.25rem]",
3169
- "rtl:translate-x-[-1.25rem]",
3170
- "translate-x-[0.75rem]",
3171
- "rtl:translate-x-[-0.75rem]"
3172
- ],
3173
- "internalComponents": [
3174
- "FormLabel",
3175
- "RootElement",
3176
- "Box"
3177
- ],
3178
- "internalComponentProps": {
3179
- "FormLabel": {
3180
- "as": ["div"],
3181
- "variant": ["inherit"],
3182
- "color": ["inherit"]
3183
- },
3184
- "RootElement": { "data-testid": ["container"] }
3185
- },
3186
- "propToVariantKeys": { "size": ["switchSizeRoot", "switchSizeSwitch"] },
3187
- "runtimeConfigDefaultProps": {},
3188
- "runtimeConfigGetStyles": {},
3189
- "runtimeConfigInternalComponentProps": {},
3190
- "motionVarPrefixes": [],
3191
- "factoryTarget": null
3192
- },
3193
3193
  SelectContent: {
3194
3194
  "name": "SelectContent",
3195
3195
  "defaultProps": {
@@ -3973,6 +3973,147 @@
3973
3973
  "motionVarPrefixes": [],
3974
3974
  "factoryTarget": null
3975
3975
  },
3976
+ "Switch": {
3977
+ "name": "Switch",
3978
+ "defaultProps": {},
3979
+ "getStylesLiterals": {
3980
+ "switchVariantActiveHandle": "on",
3981
+ "switchVariantActiveHandle:1": "off",
3982
+ "switchVariantHandle": "default",
3983
+ "switchVariantHandleIcon": "default",
3984
+ "switchVariantActiveHandleIcon": "on",
3985
+ "switchVariantActiveHandleIcon:1": "off"
3986
+ },
3987
+ "cxLiterals": [
3988
+ "relative",
3989
+ "pointer-events-none",
3990
+ "uds-border-radius-full",
3991
+ "overflow-hidden",
3992
+ "absolute",
3993
+ "top-0",
3994
+ "left-0",
3995
+ "right-0",
3996
+ "bottom-0",
3997
+ "opacity-95",
3998
+ "group-hover:opacity-100",
3999
+ "transition-[background-color,box-shadow,opacity]",
4000
+ "opacity-0",
4001
+ "m-auto",
4002
+ "transition-opacity",
4003
+ "opacity-100"
4004
+ ],
4005
+ "internalComponents": [
4006
+ "IconSlot",
4007
+ "SwitchBase",
4008
+ "Box",
4009
+ "SpringMotionConfig",
4010
+ "MotionBox",
4011
+ "SwitchProps",
4012
+ "SwitchStaticHandle"
4013
+ ],
4014
+ "internalComponentProps": {
4015
+ "IconSlot": {
4016
+ "data-testid": [
4017
+ "on-icon",
4018
+ "off-icon"
4019
+ ]
4020
+ }
4021
+ },
4022
+ "propToVariantKeys": {
4023
+ "size": [
4024
+ "switchSizeHandle",
4025
+ "switchSizeHandleIcon"
4026
+ ],
4027
+ "reduceMotion": [
4028
+ "reducedMotion"
4029
+ ]
4030
+ },
4031
+ "runtimeConfigDefaultProps": {},
4032
+ "runtimeConfigGetStyles": {},
4033
+ "runtimeConfigInternalComponentProps": {},
4034
+ "motionVarPrefixes": [
4035
+ "--uds-motion-bouncy-4-",
4036
+ "--uds-motion-smooth-3-"
4037
+ ],
4038
+ "factoryTarget": null
4039
+ },
4040
+ "SwitchBase": {
4041
+ "name": "SwitchBase",
4042
+ "defaultProps": {
4043
+ "labelPosition": "start",
4044
+ "size": "md"
4045
+ },
4046
+ "getStylesLiterals": {
4047
+ "switchVariantRoot": "default",
4048
+ "switchVariantActiveRoot": "on",
4049
+ "switchVariantActiveRoot:1": "off",
4050
+ "display": "flex",
4051
+ "flexDirection": "row",
4052
+ "flexDirection:1": "row-reverse",
4053
+ "alignItems": "center",
4054
+ "switchVariantSwitch": "default",
4055
+ "switchVariantActiveSwitch": "on",
4056
+ "switchVariantActiveSwitch:1": "off",
4057
+ "borderRadius": "full",
4058
+ "position": "relative"
4059
+ },
4060
+ "cxLiterals": [
4061
+ "group",
4062
+ "cursor-pointer",
4063
+ "cursor-default",
4064
+ "opacity-50",
4065
+ "uds-ring",
4066
+ "uds-ring-within",
4067
+ "transition-[background-color,box-shadow]",
4068
+ "cursor-[inherit]",
4069
+ "absolute",
4070
+ "opacity-0",
4071
+ "top-[-1px]",
4072
+ "left-[-1px]",
4073
+ "w-[calc(100%+2px)]",
4074
+ "h-[calc(100%+2px)]",
4075
+ "text-start",
4076
+ "text-end",
4077
+ "translate-x-[1.25rem]",
4078
+ "rtl:translate-x-[-1.25rem]",
4079
+ "translate-x-[0.75rem]",
4080
+ "rtl:translate-x-[-0.75rem]"
4081
+ ],
4082
+ "internalComponents": [
4083
+ "FormLabel",
4084
+ "RootElement",
4085
+ "Box"
4086
+ ],
4087
+ "internalComponentProps": {
4088
+ "FormLabel": {
4089
+ "as": [
4090
+ "div"
4091
+ ],
4092
+ "variant": [
4093
+ "inherit"
4094
+ ],
4095
+ "color": [
4096
+ "inherit"
4097
+ ]
4098
+ },
4099
+ "RootElement": {
4100
+ "data-testid": [
4101
+ "container"
4102
+ ]
4103
+ }
4104
+ },
4105
+ "propToVariantKeys": {
4106
+ "size": [
4107
+ "switchSizeRoot",
4108
+ "switchSizeSwitch"
4109
+ ]
4110
+ },
4111
+ "runtimeConfigDefaultProps": {},
4112
+ "runtimeConfigGetStyles": {},
4113
+ "runtimeConfigInternalComponentProps": {},
4114
+ "motionVarPrefixes": [],
4115
+ "factoryTarget": null
4116
+ },
3976
4117
  "PopoverTrigger": {
3977
4118
  "name": "PopoverTrigger",
3978
4119
  "defaultProps": {},
@@ -4141,147 +4282,6 @@
4141
4282
  "motionVarPrefixes": [],
4142
4283
  "factoryTarget": null
4143
4284
  },
4144
- "Switch": {
4145
- "name": "Switch",
4146
- "defaultProps": {},
4147
- "getStylesLiterals": {
4148
- "switchVariantActiveHandle": "on",
4149
- "switchVariantActiveHandle:1": "off",
4150
- "switchVariantHandle": "default",
4151
- "switchVariantHandleIcon": "default",
4152
- "switchVariantActiveHandleIcon": "on",
4153
- "switchVariantActiveHandleIcon:1": "off"
4154
- },
4155
- "cxLiterals": [
4156
- "relative",
4157
- "pointer-events-none",
4158
- "uds-border-radius-full",
4159
- "overflow-hidden",
4160
- "absolute",
4161
- "top-0",
4162
- "left-0",
4163
- "right-0",
4164
- "bottom-0",
4165
- "opacity-95",
4166
- "group-hover:opacity-100",
4167
- "transition-[background-color,box-shadow,opacity]",
4168
- "opacity-0",
4169
- "m-auto",
4170
- "transition-opacity",
4171
- "opacity-100"
4172
- ],
4173
- "internalComponents": [
4174
- "IconSlot",
4175
- "SwitchBase",
4176
- "Box",
4177
- "SpringMotionConfig",
4178
- "MotionBox",
4179
- "SwitchProps",
4180
- "SwitchStaticHandle"
4181
- ],
4182
- "internalComponentProps": {
4183
- "IconSlot": {
4184
- "data-testid": [
4185
- "on-icon",
4186
- "off-icon"
4187
- ]
4188
- }
4189
- },
4190
- "propToVariantKeys": {
4191
- "size": [
4192
- "switchSizeHandle",
4193
- "switchSizeHandleIcon"
4194
- ],
4195
- "reduceMotion": [
4196
- "reducedMotion"
4197
- ]
4198
- },
4199
- "runtimeConfigDefaultProps": {},
4200
- "runtimeConfigGetStyles": {},
4201
- "runtimeConfigInternalComponentProps": {},
4202
- "motionVarPrefixes": [
4203
- "--uds-motion-bouncy-4-",
4204
- "--uds-motion-smooth-3-"
4205
- ],
4206
- "factoryTarget": null
4207
- },
4208
- "SwitchBase": {
4209
- "name": "SwitchBase",
4210
- "defaultProps": {
4211
- "labelPosition": "start",
4212
- "size": "md"
4213
- },
4214
- "getStylesLiterals": {
4215
- "switchVariantRoot": "default",
4216
- "switchVariantActiveRoot": "on",
4217
- "switchVariantActiveRoot:1": "off",
4218
- "display": "flex",
4219
- "flexDirection": "row",
4220
- "flexDirection:1": "row-reverse",
4221
- "alignItems": "center",
4222
- "switchVariantSwitch": "default",
4223
- "switchVariantActiveSwitch": "on",
4224
- "switchVariantActiveSwitch:1": "off",
4225
- "borderRadius": "full",
4226
- "position": "relative"
4227
- },
4228
- "cxLiterals": [
4229
- "group",
4230
- "cursor-pointer",
4231
- "cursor-default",
4232
- "opacity-50",
4233
- "uds-ring",
4234
- "uds-ring-within",
4235
- "transition-[background-color,box-shadow]",
4236
- "cursor-[inherit]",
4237
- "absolute",
4238
- "opacity-0",
4239
- "top-[-1px]",
4240
- "left-[-1px]",
4241
- "w-[calc(100%+2px)]",
4242
- "h-[calc(100%+2px)]",
4243
- "text-start",
4244
- "text-end",
4245
- "translate-x-[1.25rem]",
4246
- "rtl:translate-x-[-1.25rem]",
4247
- "translate-x-[0.75rem]",
4248
- "rtl:translate-x-[-0.75rem]"
4249
- ],
4250
- "internalComponents": [
4251
- "FormLabel",
4252
- "RootElement",
4253
- "Box"
4254
- ],
4255
- "internalComponentProps": {
4256
- "FormLabel": {
4257
- "as": [
4258
- "div"
4259
- ],
4260
- "variant": [
4261
- "inherit"
4262
- ],
4263
- "color": [
4264
- "inherit"
4265
- ]
4266
- },
4267
- "RootElement": {
4268
- "data-testid": [
4269
- "container"
4270
- ]
4271
- }
4272
- },
4273
- "propToVariantKeys": {
4274
- "size": [
4275
- "switchSizeRoot",
4276
- "switchSizeSwitch"
4277
- ]
4278
- },
4279
- "runtimeConfigDefaultProps": {},
4280
- "runtimeConfigGetStyles": {},
4281
- "runtimeConfigInternalComponentProps": {},
4282
- "motionVarPrefixes": [],
4283
- "factoryTarget": null
4284
- },
4285
4285
  "SelectContent": {
4286
4286
  "name": "SelectContent",
4287
4287
  "defaultProps": {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@yahoo/uds",
3
3
  "description": "Yahoo Universal System",
4
- "version": "3.178.0",
4
+ "version": "3.179.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",