@yahoo/uds 3.18.0-beta.1 → 3.18.0-beta.2

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.
Binary file
Binary file
Binary file
Binary file
package/cli/compile.ts CHANGED
@@ -25,7 +25,7 @@ async function main() {
25
25
 
26
26
  // Add shebang at the top of the file and write to disk
27
27
  await Bun.write(
28
- path.join(libPath, './uds-cli'),
28
+ path.join(libPath, './uds-cli.js'),
29
29
  `#!/usr/bin/env node \n
30
30
  // Note: This file is generated, do not edit directly! Edit exec.ts instead. \n` + shellOutput,
31
31
  );
package/cli/consts.ts CHANGED
@@ -4,4 +4,5 @@ export const SUPPORTED_BUN_PLATFORMS = [
4
4
  'linux-x64-baseline',
5
5
  'linux-arm64',
6
6
  'darwin-arm64-baseline',
7
+ 'darwin-x64',
7
8
  ];
@@ -10,7 +10,8 @@ import { fileURLToPath } from "url";
10
10
  var SUPPORTED_BUN_PLATFORMS = [
11
11
  "linux-x64-baseline",
12
12
  "linux-arm64",
13
- "darwin-arm64-baseline"
13
+ "darwin-arm64-baseline",
14
+ "darwin-x64"
14
15
  ];
15
16
 
16
17
  // cli/exec.ts
@@ -1 +1,2 @@
1
+ "use client";
1
2
  "use strict";var e=require("../../chunk-LUIZSLSJ.cjs"),t=require("../../chunk-M47OEEZQ.cjs"),a=require("../../chunk-SQCEFYU5.cjs"),o=require("motion/react-m"),i=require("react"),r=require("react/jsx-runtime");function n(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var o=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,o.get?o:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}var c=()=>import("../../domMax-ZTC57OAI.cjs").then((({domMax:e})=>e)),s=n(o).create(a.Box),l=i.forwardRef((function({id:o,isOn:n,defaultIsOn:l,onChange:d,label:u,labelPosition:h="start",size:f="md",onIcon:x,offIcon:m,reduceMotion:p,disabled:y,required:b,onFocus:w,onBlur:v,className:S,layerClassNames:g,...j},C){const N=i.useId(),I=o??`uds-input-${N}`,k=i.useRef(null),V=void 0!==n,[O,q]=i.useState(V?n:l),M=i.useCallback((e=>{d?.(e),V||q(e.target.checked)}),[V,d]),z=i.useCallback((e=>{w?.(e)}),[w]),A=i.useCallback((e=>{v?.(e)}),[v]),B=p?"always":"user",P=p?"duration-0":"duration-120 motion-reduce:duration-0";i.useEffect((()=>{V&&q(n)}),[n,V]);const H={root:a.getStyles({switchSizeRoot:f,switchVariantRoot:"default",switchVariantActiveRoot:O?"on":"off",className:a.cx("group","flex","items-center","start"===h?"flex-row":"flex-row-reverse",...y?["cursor-default","opacity-50"]:["cursor-pointer"],g?.root,S)}),switch:a.getStyles({switchVariantSwitch:"default",switchSizeSwitch:f,switchVariantActiveSwitch:O?"on":"off",className:a.cx("uds-ring","uds-ring-within","relative","rounded-full","items-center",P,"transition-[background-color,box-shadow]",g?.switch)}),handleContainer:a.cx("pointer-events-none","relative","w-full","h-full"),handle:a.getStyles({switchSizeHandle:f,className:a.cx("absolute","top-0","bottom-0",O?"right-0":"left-0",g?.handle)}),handleContents:a.cx("relative","w-full","h-full","rounded-full","overflow-hidden",!y&&"group-hover:scale-105","opacity-95",!y&&"group-hover:opacity-100",P,"transition-[transform,opacity]"),handleCircle:a.getStyles({switchVariantActiveHandle:O?"on":"off",switchVariantHandle:"default",className:a.cx("absolute","top-0","left-0","right-0","bottom-0")}),handleIcon:a.getStyles({switchSizeHandleIcon:f,switchVariantHandleIcon:"default",switchVariantActiveHandleIcon:O?"on":"off",className:a.cx("absolute","opacity-0","top-1/2","left-1/2","transform","translate-x-[-50%]","translate-y-[-50%]",P,"transition-opacity")}),htmlCheckbox:a.cx("cursor-[inherit]","absolute","opacity-0","top-1/2","left-1/2","w-[calc(100%+2px)]","h-[calc(100%+2px)]","transform","translate-x-[-50%]","translate-y-[-50%]"),label:a.cx("start"===h?"text-start":"text-end",g?.label)},E=u?"label":"div";return r.jsx(t.SpringMotionConfig,{reducedMotion:B,loadFeatures:c,layoutVariant:"bouncy",layoutSpeed:"4",children:r.jsxs(E,{className:H.root,"data-testid":"switch-root",tabIndex:-1,children:[r.jsxs(a.Box,{className:H.switch,children:[r.jsx("input",{type:"checkbox",...j,ref:e=>{k.current=e,"function"==typeof C?C(e):null!==C&&(C.current=e)},onFocus:z,onBlur:A,id:I,disabled:y,required:b,checked:V?O:void 0,defaultChecked:V?void 0:l,onChange:M,className:H.htmlCheckbox,style:{}}),r.jsx(a.Box,{className:H.handleContainer,children:r.jsx(s,{className:H.handle,layout:"position",layoutDependency:O,children:r.jsxs(a.Box,{className:H.handleContents,children:[r.jsx(a.Box,{className:H.handleCircle}),x&&r.jsx(a.IconSlot,{icon:x,iconProps:{variant:"fill",size:"sm"},"data-testid":"on-icon",className:a.cx(H.handleIcon,O?"opacity-100":"opacity-0")}),m&&r.jsx(a.IconSlot,{icon:m,iconProps:{variant:"fill",size:"sm"},"data-testid":"off-icon",className:a.cx(H.handleIcon,O?"opacity-0":"opacity-100")})]})})})]}),u&&r.jsx(e.FormLabel,{as:"div",variant:"inherit",color:"inherit",required:b,label:u,className:H.label})]})})}));/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */l.displayName="SwitchV2";var d=t.AvoidMotionLibraryProvider;exports.SwitchV2=l,exports.SwitchV2AvoidMotionLibraryProvider=d;