@yahoo/uds 3.9.0 → 3.10.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.
- package/dist/{Input-CwVgAla0.d.cts → Input-C7XdEL1M.d.cts} +1 -1
- package/dist/{Input-BVE6FGm_.d.ts → Input-CHJJbcsx.d.ts} +1 -1
- package/dist/{Input-BcA7u4iL.d.ts → Input-Td8SCHmr.d.ts} +1 -1
- package/dist/{Input-rVK3-Mnd.d.cts → Input-zhPszcR6.d.cts} +1 -1
- package/dist/{Pressable-OMh2xuXh.d.cts → Pressable-Bav3ibvU.d.cts} +1 -1
- package/dist/{Pressable-CM-fSqSP.d.ts → Pressable-Bp9saCXS.d.ts} +1 -1
- package/dist/{Pressable-BBYBYrW2.d.cts → Pressable-DJLawTMJ.d.cts} +1 -1
- package/dist/{Pressable-5kvWugAb.d.ts → Pressable-TTYPJVeC.d.ts} +1 -1
- package/dist/{VStack-CsfHH-w0.d.cts → VStack-C2Q0FD84.d.cts} +1 -1
- package/dist/{VStack--5vycne5.d.ts → VStack-Cf8pnG9j.d.ts} +1 -1
- package/dist/{VStack-DKPTCB-x.d.cts → VStack-CwwLkabJ.d.cts} +1 -1
- package/dist/{VStack-D9tFfZSV.d.ts → VStack-DWzKcz58.d.ts} +1 -1
- package/dist/{chunk-6FIPOCHY.cjs → chunk-22YYIBIW.cjs} +1 -1
- package/dist/{chunk-SIBOGMNP.cjs → chunk-33CCQHDT.cjs} +1 -1
- package/dist/chunk-5J4LYLB6.js +2 -0
- package/dist/{chunk-J2KVLHS3.js → chunk-5JTPWZA5.js} +1 -1
- package/dist/{chunk-YQCS652P.cjs → chunk-6VQUZ237.cjs} +1 -1
- package/dist/{chunk-3QXTXMWK.js → chunk-75ZIVS4E.js} +2 -2
- package/dist/{chunk-RR727YZK.js → chunk-AJPLGCE6.js} +3 -3
- package/dist/{chunk-E4RNAQCQ.js → chunk-C4L656CQ.js} +1 -1
- package/dist/{chunk-M4DF5FTU.js → chunk-CD5NEURX.js} +1 -1
- package/dist/{chunk-P4YXS6AA.cjs → chunk-CHGA6DDB.cjs} +1 -1
- package/dist/{chunk-3YSGEWV3.js → chunk-CMCHR7TF.js} +1 -1
- package/dist/{chunk-AK6RCGU6.cjs → chunk-EQQKQR6E.cjs} +1 -1
- package/dist/{chunk-ZAUAVTUR.js → chunk-K4L7G5R2.js} +1 -1
- package/dist/chunk-KIT4V7FE.cjs +2 -0
- package/dist/{chunk-CKNP4OVG.cjs → chunk-NPEEFVTA.cjs} +1 -1
- package/dist/{chunk-2GIB3HPN.cjs → chunk-OV6E632J.cjs} +1 -1
- package/dist/chunk-QPPJ2I6Z.cjs +2 -0
- package/dist/{chunk-EYGEUZT7.js → chunk-VFP434PO.js} +3 -3
- package/dist/chunk-VFRJJEUU.js +2 -0
- package/dist/{chunk-R3F7E5CJ.js → chunk-WCONNL7M.js} +1 -1
- package/dist/{chunk-M47X3QGG.cjs → chunk-WHNTFODE.cjs} +3 -3
- package/dist/{chunk-GEWB6WWZ.js → chunk-XW77D3Q5.js} +2 -2
- package/dist/{chunk-IMP4Z4E6.cjs → chunk-YTYZQS35.cjs} +1 -1
- package/dist/{chunk-4LBIEP7R.cjs → chunk-ZKSFXFL2.cjs} +2 -2
- package/dist/client/Menu.cjs +1 -1
- package/dist/client/Menu.d.cts +3 -3
- package/dist/client/Menu.d.ts +3 -3
- package/dist/client/Menu.js +2 -2
- package/dist/client/index.cjs +1 -1
- package/dist/client/index.d.cts +3 -3
- package/dist/client/index.d.ts +3 -3
- package/dist/client/index.js +1 -1
- package/dist/experimental/client/index.cjs +1 -1
- package/dist/experimental/client/index.js +2 -2
- package/dist/experimental/index.cjs +1 -1
- package/dist/experimental/index.js +1 -1
- package/dist/{index-rwNlzFFT.d.ts → index-Ct1Po20h.d.ts} +1 -1
- package/dist/{index-CX8YuCPD.d.ts → index-DIu2RI99.d.ts} +1 -1
- package/dist/{index-BvnUP4dt.d.cts → index-DLkS5nSc.d.cts} +1 -1
- package/dist/{index-DNWtg8_u.d.cts → index-UJ2CT9gc.d.cts} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +7 -6
- package/dist/index.d.ts +7 -6
- package/dist/index.js +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/tailwind/plugin.cjs +1 -1
- package/dist/tailwind/plugin.d.cts +1 -1
- package/dist/tailwind/plugin.d.ts +1 -1
- package/dist/tailwind/plugin.js +2 -2
- package/dist/tailwind/purger.cjs +1 -1
- package/dist/tailwind/purger.js +1 -1
- package/dist/tailwind/tsMorph.cjs +1 -1
- package/dist/tailwind/tsMorph.js +1 -1
- package/dist/tailwind/utils.cjs +1 -1
- package/dist/tailwind/utils.d.cts +1 -1
- package/dist/tailwind/utils.d.ts +1 -1
- package/dist/tailwind/utils.js +1 -1
- package/dist/tokens/automation/configs.cjs +1 -1
- package/dist/tokens/automation/configs.d.cts +2 -2
- package/dist/tokens/automation/configs.d.ts +2 -2
- package/dist/tokens/automation/configs.js +1 -1
- package/dist/tokens/automation/properties.cjs +1 -1
- package/dist/tokens/automation/properties.d.cts +2 -2
- package/dist/tokens/automation/properties.d.ts +2 -2
- package/dist/tokens/automation/properties.js +1 -1
- package/dist/tokens/index.cjs +1 -1
- package/dist/tokens/index.d.cts +26 -4
- package/dist/tokens/index.d.ts +26 -4
- package/dist/tokens/index.js +1 -1
- package/dist/tokens/parseTokens.d.cts +1 -1
- package/dist/tokens/parseTokens.d.ts +1 -1
- package/dist/{types-BWAk0oJf.d.ts → types-CJOfjao-.d.cts} +1944 -1926
- package/dist/{types-BsWjKfuJ.d.ts → types-CJOfjao-.d.ts} +18 -0
- package/dist/{types-BWAk0oJf.d.cts → types-DGsZamYF.d.cts} +18 -0
- package/dist/{types-BsWjKfuJ.d.cts → types-DGsZamYF.d.ts} +1952 -1934
- package/package.json +1 -1
- package/dist/chunk-HHB6KYVF.cjs +0 -2
- package/dist/chunk-JDNRYVU4.js +0 -2
- package/dist/chunk-O7VWN4FD.js +0 -2
- package/dist/chunk-ZZ3PL65H.cjs +0 -2
@@ -1 +1 @@
|
|
1
|
-
import{getStyles as o,cx as r,HStack as t,IconSlot as e,Text as i}from"./chunk-
|
1
|
+
import{getStyles as o,cx as r,HStack as t,IconSlot as e,Text as i}from"./chunk-VFP434PO.js";import{TEXT_STATIC_CLASSNAME as a}from"./chunk-4NXBFKMZ.js";import{isFunction as n}from"lodash-es";import{jsxs as l,jsx as d}from"react/jsx-runtime";import{memo as s}from"react";/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */var c=({htmlFor:o,required:t,label:e,children:a,color:s="muted",variant:c="label3",hasError:p=!1,showRequiredAsterisk:f=!1,as:h="label",className:u,...m})=>{const b=e?n(e)?e():e:a;return b?l(i,{variant:c,color:s,as:h,htmlFor:o,className:r("cursor-[inherit]",u),...m,children:[b,t&&f&&d(i,{as:"sup",color:p?"alert":"inherit",variant:"inherit",spacingStart:"0.5","aria-hidden":!0,children:"*"})]}):null};function p({width:r,height:t,src:e,alt:i,contentFit:a,backgroundColor:n,borderRadius:l,borderTopStartRadius:s,borderTopEndRadius:c,borderBottomStartRadius:p,borderBottomEndRadius:f,borderColor:h,borderStartColor:u,borderEndColor:m,borderTopColor:b,borderBottomColor:g,borderWidth:x,borderVerticalWidth:S,borderHorizontalWidth:T,borderStartWidth:C,borderEndWidth:W,borderTopWidth:B,borderBottomWidth:w,alignContent:E,alignItems:V,alignSelf:v,flex:H,flexDirection:I,flexGrow:R,flexShrink:z,flexWrap:k,justifyContent:y,flexBasis:F,display:N,overflow:G,overflowX:j,overflowY:P,position:X,spacing:q,spacingHorizontal:D,spacingVertical:Y,spacingBottom:A,spacingEnd:K,spacingStart:M,spacingTop:O,offset:Z,offsetVertical:J,offsetHorizontal:L,offsetBottom:Q,offsetEnd:U,offsetStart:$,offsetTop:_,columnGap:oo,rowGap:ro,...to}){const eo=o({contentFit:a,backgroundColor:n,borderRadius:l,borderTopStartRadius:s,borderTopEndRadius:c,borderBottomStartRadius:p,borderBottomEndRadius:f,borderColor:h,borderStartColor:u,borderEndColor:m,borderTopColor:b,borderBottomColor:g,borderWidth:x,borderVerticalWidth:S,borderHorizontalWidth:T,borderStartWidth:C,borderEndWidth:W,borderTopWidth:B,borderBottomWidth:w,alignContent:E,alignItems:V,alignSelf:v,flex:H,flexDirection:I,flexGrow:R,flexShrink:z,flexWrap:k,justifyContent:y,flexBasis:F,display:N,overflow:G,overflowX:j,overflowY:P,position:X,spacing:q,spacingHorizontal:D,spacingVertical:Y,spacingBottom:A,spacingEnd:K,spacingStart:M,spacingTop:O,offset:Z,offsetVertical:J,offsetHorizontal:L,offsetBottom:Q,offsetEnd:U,offsetStart:$,offsetTop:_,columnGap:oo,rowGap:ro});return d("img",{src:e,alt:i,className:eo,style:{width:r,height:t},...to})}var f=s((function({startIcon:i,endIcon:n,iconProps:s,children:c,size:p,isFilled:f,...h}){const u={helperText:r(o({inputSizeHelperText:p,inputVariantHelperText:"default",inputVariantValueHelperText:f?"filled":"empty"}),a),helperIcon:o({inputSizeHelperIcon:p,inputVariantHelperIcon:"default",inputVariantValueHelperIcon:f?"filled":"empty"})},m={variant:"outline",...s};return l(t,{gap:"1",alignItems:"center",...h,children:[i&&d(e,{icon:i,...m,iconProps:s,className:u.helperIcon}),d("span",{className:u.helperText,children:c}),n&&d(e,{icon:n,...m,iconProps:s,className:u.helperIcon})]})}));export{c as FormLabel,p as Image,f as InputHelpTextMemo};
|
@@ -1,3 +1,3 @@
|
|
1
|
-
"use strict";var r=require("./chunk-
|
2
|
-
function p(r){return"boolean"==typeof r?`${r}`:0===r?"0":r}function u(r){const o=Object.create(null),e=Object.keys(r);for(let t=0,n=e.length;t<n;t++){const n=e[t];void 0!==r[n]&&(o[n]=r[n])}return o}var h=i.extendTailwindMerge({extend:{theme:{borderColor:o.lineColors,borderWidth:o.borderWidths,borderRadius:o.borderRadii}},override:{classGroups:{"text-color":[{text:[...o.foregroundColors,...o.spectrumColors]}],"bg-color":[{bg:o.backgroundColors}],"font-family":[{font:["icons",...o.textVariants]}],leading:[{leading:o.textVariants}]},conflictingClassGroups:{}}}),b=(...r)=>{const o=c.default(r);return h(o)},m=r=>o=>{if(!r?.variants)return b(r?.base,o?.className);const{variants:e,defaultVariants:t}=r,n=Object.keys(e).map((r=>{const n=o?.[r],i=t?.[r],a=p(n)||p(i);return e[r][a]})),i={...t,...o&&u(o)},a=r?.compoundVariants?.reduce(((r,{className:o,...e})=>Object.entries(e).every((([r,o])=>i[r]===o))?b(r,o):r),"");return b(r?.base,n,a,o?.className)},g=m({variants:r.variants}),x=new Map,
|
3
|
-
/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */exports.Box=v,exports.HStack=W,exports.Icon=N,exports.IconSlot=
|
1
|
+
"use strict";var r=require("./chunk-33CCQHDT.cjs"),o=require("@yahoo/uds/fixtures"),e=require("@yahoo/uds/flags"),t=require("clsx"),n=require("imurmurhash"),i=require("tailwind-merge"),a=require("react"),l=require("react/jsx-runtime"),s=require("lodash-es");function d(r){return r&&r.__esModule?r:{default:r}}var c=d(t),f=d(n);/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */
|
2
|
+
function p(r){return"boolean"==typeof r?`${r}`:0===r?"0":r}function u(r){const o=Object.create(null),e=Object.keys(r);for(let t=0,n=e.length;t<n;t++){const n=e[t];void 0!==r[n]&&(o[n]=r[n])}return o}var h=i.extendTailwindMerge({extend:{theme:{borderColor:o.lineColors,borderWidth:o.borderWidths,borderRadius:o.borderRadii}},override:{classGroups:{"text-color":[{text:[...o.foregroundColors,...o.spectrumColors]}],"bg-color":[{bg:o.backgroundColors}],"font-family":[{font:["icons",...o.textVariants]}],leading:[{leading:o.textVariants}]},conflictingClassGroups:{}}}),b=(...r)=>{const o=c.default(r);return h(o)},m=r=>o=>{if(!r?.variants)return b(r?.base,o?.className);const{variants:e,defaultVariants:t}=r,n=Object.keys(e).map((r=>{const n=o?.[r],i=t?.[r],a=p(n)||p(i);return e[r][a]})),i={...t,...o&&u(o)},a=r?.compoundVariants?.reduce(((r,{className:o,...e})=>Object.entries(e).every((([r,o])=>i[r]===o))?b(r,o):r),"");return b(r?.base,n,a,o?.className)},g=m({variants:r.variants}),x=new Map,C=r=>{const{useGetStylesCache:o}=e.getFeatureFlags();if(o){const o=function(r){const o=Object.create(null),e=Object.keys(r).sort();for(let t=0,n=e.length;t<n;t++){const n=e[t];o[n]=r[n]}return o}(u(r)),e=(new f.default).hash(JSON.stringify(o)).result();if(x.has(e))return x.get(e);const t=g(o);return x.set(e,t),t}return g(r)};function S(...r){return o=>r.forEach((r=>function(r,o){"function"==typeof r?r(o):null!=r&&(r.current=o)}(r,o)))}function w(){const r=a.forwardRef(((r,e)=>{const{children:n,...i}=r,s=a.Children.toArray(n),d=s.find(t);if(d){const r=d.props.children,t=s.map((o=>o===d?a.Children.count(r)>1?a.Children.only(null):a.isValidElement(r)?r.props.children:null:o));return l.jsx(o,{...i,ref:e,children:a.isValidElement(r)?a.cloneElement(r,void 0,t):null})}return l.jsx(o,{...i,ref:e,children:n})}));r.displayName="Slot";const o=a.forwardRef(((r,o)=>{const{children:e,...t}=r;return a.isValidElement(e)?a.cloneElement(e,{...n(t,e.props),ref:o?S(o,e.ref):e.ref}):a.Children.count(e)>1?a.Children.only(null):null}));o.displayName="SlotClone";const e=({children:r})=>r;function t(r){return a.isValidElement(r)&&r.type===e}function n(r,o){const e={...o};for(const t in o){const n=r[t],i=o[t];/^on[A-Z]/.test(t)?n&&i?e[t]=(...r)=>{i(...r),n(...r)}:n&&(e[t]=n):"style"===t&&(e[t]={...n,...i})}return{...r,...e}}return r}var y=w(),v=a.forwardRef((function({asChild:r,className:o,backgroundColor:e,borderRadius:t,borderTopStartRadius:n,borderTopEndRadius:i,borderBottomStartRadius:a,borderBottomEndRadius:s,borderColor:d,borderStartColor:c,borderEndColor:f,borderTopColor:p,borderBottomColor:u,borderWidth:h,borderVerticalWidth:b,borderHorizontalWidth:m,borderStartWidth:g,borderEndWidth:x,borderTopWidth:S,borderBottomWidth:w,alignContent:v,alignItems:E,alignSelf:W,flex:B,flexDirection:T,flexGrow:R,flexShrink:V,flexWrap:j,justifyContent:N,flexBasis:k,display:G="flex",overflow:H,overflowX:z,overflowY:q,position:I,spacing:D,spacingHorizontal:F,spacingVertical:O,spacingBottom:A,spacingEnd:M,spacingStart:X,spacingTop:Y,offset:$,offsetVertical:_,offsetHorizontal:J,offsetBottom:P,offsetEnd:Q,offsetStart:Z,offsetTop:K,columnGap:L,rowGap:U,width:rr,height:or,dropShadow:er,insetShadow:tr,...nr},ir){const ar=C({backgroundColor:e,borderRadius:t,borderTopStartRadius:n,borderTopEndRadius:i,borderBottomStartRadius:a,borderBottomEndRadius:s,borderColor:d,borderStartColor:c,borderEndColor:f,borderTopColor:p,borderBottomColor:u,borderWidth:h,borderVerticalWidth:b,borderHorizontalWidth:m,borderStartWidth:g,borderEndWidth:x,borderTopWidth:S,borderBottomWidth:w,alignContent:v,alignItems:E,alignSelf:W,flex:B,flexDirection:T,flexGrow:R,flexShrink:V,flexWrap:j,justifyContent:N,flexBasis:k,display:G,overflow:H,overflowX:z,overflowY:q,position:I,spacing:D,spacingHorizontal:F,spacingVertical:O,spacingBottom:A,spacingEnd:M,spacingStart:X,spacingTop:Y,offset:$,offsetVertical:_,offsetHorizontal:J,offsetBottom:P,offsetEnd:Q,offsetStart:Z,offsetTop:K,columnGap:L,rowGap:U,width:rr,height:or,dropShadow:er,insetShadow:tr,className:o}),lr=r?y:"div";return l.jsx(lr,{className:ar,ref:ir,...nr})}));v.displayName="Box";var E=(r,o)=>((r,o)=>{const e=s.isFunction(o)?o:()=>o;return r.flatMap(((r,o)=>0!==o?[e(o),r]:[r]))})(a.Children.toArray(r),(r=>{const e=s.isFunction(o)?o(r):o;return a.isValidElement(e)?a.cloneElement(e,{...e.props,key:e.key??`interspersed-${r}`}):null})),W=a.forwardRef((function({gap:r,children:o,separator:e,...t},n){return l.jsx(v,{ref:n,flexDirection:"row",rowGap:r,columnGap:r,...t,children:e?E(o,e):o})}));W.displayName="HStack";var B=w(),T={display1:"h1",display2:"h1",display3:"h1",title1:"h1",title2:"h2",title3:"h3",title4:"h4",headline1:"h5",body1:"p",label1:"p",label2:"p",label3:"p",label4:"p",caption1:"p",caption2:"p",legal1:"p",inherit:"p"},R=a.forwardRef((function({className:r,asChild:o,color:e="primary",variant:t="body1",as:n=T[t],fontFamily:i,fontSize:a,fontWeight:s,lineHeight:d,textTransform:c,textAlign:f,backgroundColor:p,borderRadius:u,borderTopStartRadius:h,borderTopEndRadius:b,borderBottomStartRadius:m,borderBottomEndRadius:g,borderColor:x,borderStartColor:S,borderEndColor:w,borderTopColor:y,borderBottomColor:v,borderWidth:E,borderVerticalWidth:W,borderHorizontalWidth:R,borderStartWidth:V,borderEndWidth:j,borderTopWidth:N,borderBottomWidth:k,alignContent:G,alignItems:H,alignSelf:z,flex:q,flexDirection:I,flexGrow:D,flexShrink:F,flexWrap:O,justifyContent:A,flexBasis:M,display:X,overflow:Y,overflowX:$,overflowY:_,position:J,spacing:P,spacingHorizontal:Q,spacingVertical:Z,spacingBottom:K,spacingEnd:L,spacingStart:U,spacingTop:rr,offset:or,offsetVertical:er,offsetHorizontal:tr,offsetBottom:nr,offsetEnd:ir,offsetStart:ar,offsetTop:lr,columnGap:sr,rowGap:dr,...cr},fr){const pr={...e&&"inherit"!==e?{color:e}:{},...t&&"inherit"!==t?{fontFamily:i??t,fontSize:a??t,fontWeight:s??t,lineHeight:d??t,textTransform:c??t}:{},textAlign:f},ur=C({className:r,...pr,backgroundColor:p,borderRadius:u,borderTopStartRadius:h,borderTopEndRadius:b,borderBottomStartRadius:m,borderBottomEndRadius:g,borderColor:x,borderStartColor:S,borderEndColor:w,borderTopColor:y,borderBottomColor:v,borderWidth:E,borderVerticalWidth:W,borderHorizontalWidth:R,borderStartWidth:V,borderEndWidth:j,borderTopWidth:N,borderBottomWidth:k,alignContent:G,alignItems:H,alignSelf:z,flex:q,flexDirection:I,flexGrow:D,flexShrink:F,flexWrap:O,justifyContent:A,flexBasis:M,display:X,overflow:Y,overflowX:$,overflowY:_,position:J,spacing:P,spacingHorizontal:Q,spacingVertical:Z,spacingBottom:K,spacingEnd:L,spacingStart:U,spacingTop:rr,offset:or,offsetVertical:er,offsetHorizontal:tr,offsetBottom:nr,offsetEnd:ir,offsetStart:ar,offsetTop:lr,columnGap:sr,rowGap:dr}),hr=o?B:n;return l.jsx(hr,{className:ur,ref:fr,...cr})}));R.displayName="Text";var V=a.forwardRef((function({gap:r,children:o,separator:e,...t},n){return l.jsx(v,{ref:n,flexDirection:"column",columnGap:r,rowGap:r,...t,children:e?E(o,e):o})}));V.displayName="VStack";var j={sm:16,md:24,lg:32},N=a.forwardRef((function({name:r,size:o="md",variant:e="outline",color:t="primary",className:n,...i},a){const s=r.metadata?.variants??[],d=s.includes(e)?e:s[0]??"fill",c="multicolor"===d,f=C({flex:"none",color:c?void 0:t,className:b(n,!c&&"[&_path]:fill-current")}),p=j[o];return l.jsx("svg",{ref:a,xmlns:"http://www.w3.org/2000/svg",width:p,height:p,viewBox:`0 0 ${p} ${p}`,"aria-hidden":"true",focusable:"false",className:f,...i,children:l.jsx(r,{size:o,variant:d})})}));N.displayName="Icon";var k=a.memo((function({icon:r,iconProps:o,...e}){if(!r)return null;const t=o??{},n=r;if(n.metadata?.isSvgIcon)return l.jsx(N,{name:n,...t,...e});if(s.isFunction(r)){const o=r(t);return a.isValidElement(o)&&a.cloneElement(o,e)}return a.isValidElement(r)&&a.cloneElement(r,{...t,...r.props,...e})}));
|
3
|
+
/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */exports.Box=v,exports.HStack=W,exports.Icon=N,exports.IconSlot=k,exports.Text=R,exports.VStack=V,exports.createSlot=w,exports.cva=m,exports.cx=b,exports.getStyles=C;
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import{createSlot as r,getStyles as t}from"./chunk-
|
2
|
-
var h={damped:{1:{damping:20.585796264350424,stiffness:62.37968115365702},2:{damping:29.312551281312288,stiffness:126.47801753759964},3:{damping:48.92799401356162,stiffness:352.3892336537332},4:{damping:123.42690994256348,stiffness:2242.474548821137}},smooth:{1:{damping:16.46863701148034,stiffness:67.80400125397502},2:{damping:23.45004102504983,stiffness:137.47610601913004},3:{damping:39.1423952108493,stiffness:383.03177571057955},4:{damping:98.7415279540508,stiffness:2437.4723356751488}},subtle:{1:{damping:13.04316051309243,stiffness:67.80400125397502},2:{damping:18.572432491839468,stiffness:137.47610601913004},3:{damping:31.000777006992646,stiffness:383.03177571057955},4:{damping:78.20329013960823,stiffness:2437.4723356751488}},bouncy:{1:{damping:9.229712940600143,stiffness:48.880672622541795},2:{damping:12.634144343496553,stiffness:91.59092691366399},3:{damping:19.40217701790486,stiffness:216.00395877230474},4:{damping:37.541723184430275,stiffness:808.7032559422912}},veryBouncy:{1:{damping:6.902290754946187,stiffness:38.92152745126911},2:{damping:9.155550514215523,stiffness:68.48134828711234},3:{damping:13.244464908166709,stiffness:143.30858570843873},4:{damping:22.17862652876726,stiffness:401.85804919502965}}},f=()=>import("./motionFeatures-SJISLQ4M.js").then((({domAnimation:r})=>r));function m({reducedMotion:r="user",children:t,layoutVariant:n="subtle",layoutSpeed:c="3",colorVariant:m="smooth",colorSpeed:u="3"}){const p=h[n][c],v=h[m][u],[g,z]=i(p),[C,M]=i(v),b={variant:m,speed:u},S=e({...b,control:"stiffness"}),V=e({...b,control:"damping"}),H={variant:n,speed:c},w=e({...H,control:"stiffness"}),L=e({...H,control:"damping"});a((()=>{const r=getComputedStyle(document.documentElement),t={damping:Number(r.getPropertyValue(L)),stiffness:Number(r.getPropertyValue(w))},e={damping:Number(r.getPropertyValue(V)),stiffness:Number(r.getPropertyValue(S))};z(t),M(e)}),[V,S,L,w]);const y=s((()=>({type:"spring",mass:1,...g,layout:g,opacity:C,color:C,borderColor:C,backgroundColor:C})),[C,g]);return d(o,{features:f,strict:!0,children:d(l,{transition:y,reducedMotion:r,children:t})})}var u=r(),p=n((function({className:r,asChild:e,onPress:o,onClick:l=o,backgroundColor:n,borderRadius:i,borderTopStartRadius:a,borderTopEndRadius:s,borderBottomStartRadius:c,borderBottomEndRadius:h,borderColor:f,borderStartColor:m,borderEndColor:p,borderTopColor:v,borderBottomColor:g,borderWidth:z,borderVerticalWidth:C,borderHorizontalWidth:M,borderStartWidth:b,borderEndWidth:S,borderTopWidth:V,borderBottomWidth:H,alignContent:w,alignItems:L,alignSelf:y,flex:B,flexDirection:W,flexGrow:E,flexShrink:x,flexWrap:A,justifyContent:T,flexBasis:R,display:k,overflow:I,overflowX:N,overflowY:G,position:P,spacing:j,spacingHorizontal:Y,spacingVertical:D,spacingBottom:J,spacingEnd:U,spacingStart:X,spacingTop:q,offset:F,offsetVertical:Q,offsetHorizontal:Z,offsetBottom:K,offsetEnd:O,offsetStart:$,offsetTop:_,columnGap:rr,rowGap:tr,dropShadow:er,insetShadow:or,...lr},nr){const ir=t({backgroundColor:n,borderRadius:i,borderTopStartRadius:a,borderTopEndRadius:s,borderBottomStartRadius:c,borderBottomEndRadius:h,borderColor:f,borderStartColor:m,borderEndColor:p,borderTopColor:v,borderBottomColor:g,borderWidth:z,borderVerticalWidth:C,borderHorizontalWidth:M,borderStartWidth:b,borderEndWidth:S,borderTopWidth:V,borderBottomWidth:H,alignContent:w,alignItems:L,alignSelf:y,flex:B,flexDirection:W,flexGrow:E,flexShrink:x,flexWrap:A,justifyContent:T,flexBasis:R,display:k,overflow:I,overflowX:N,overflowY:G,position:P,spacing:j,spacingHorizontal:Y,spacingVertical:D,spacingBottom:J,spacingEnd:U,spacingStart:X,spacingTop:q,offset:F,offsetVertical:Q,offsetHorizontal:Z,offsetBottom:K,offsetEnd:O,offsetStart:$,offsetTop:_,columnGap:rr,rowGap:tr,dropShadow:er,insetShadow:or,className:r});return d(e?u:"button",{className:ir,ref:nr,onClick:l,...lr})})),v=({size:r,variant:t})=>{if("outline"===t)switch(r){case"sm":return d(c,{children:d("path",{fill:"currentColor",d:"M8.4 2.6H2.6v10.8H4V11h3v2.4h1.4zM1 15V1h9v2.524l5 1.746V15zm9.1-9.746V13.4h3.3V6.406zM4.5 4h2v2h-2zm2 3.5h-2v2h2z"})});case"md":return d(c,{children:d("path",{fill:"currentColor",d:"M13.367 4.752H4.3v14.495h2.724v-4.533h3.619v4.533h2.714V4.762l.01.003zM21.5 21.047h-19V2.952h12.667v2.494L21.5 7.843zm-1.8-1.8V9.087L15.167 7.37v11.876zM7.929 11.095h-1.81v1.81h1.81zm-1.81-3.619h1.81v1.81h-1.81zm5.429 0h-1.81v1.81h1.81zm-1.81 3.619h1.81v1.81h-1.81z"})});case"lg":return d(c,{children:d("path",{fill:"currentColor",d:"M17.8 4.2H4.2v23.6H8V21h6v6.8h3.8zM2 30V2h18v5.725l10 3.626V30zm18.2-19.862V27.8h7.6V12.894zM10 8H7v3h3zm-3 6h3v3H7zm5-6h3v3h-3zm3 6h-3v3h3zm7.5 1h3v3h-3zm3 6h-3v3h3z"})})}if("fill"===t)switch(r){case"sm":return d(c,{children:d("path",{fill:"currentColor",d:"M4.5 4v2h2V4zm2 3.5h-2v2h2zM12 4l3 1.27V15h-3zM1 1h9v14H1z"})});case"md":return d(c,{children:d("path",{fill:"currentColor",d:"M2.5 2.952h10.857v18.095H2.5zm2.714 7.238V12h1.81v-1.81zm1.81-3.619h-1.81v1.81h1.81zm1.81 0v1.81h1.809V6.57zm1.809 3.62h-1.81V12h1.81zm-4.524 4.523v4.524h3.62v-4.524zM21.5 7.843l-6.333-3.081v16.285H21.5z"})});case"lg":return d(c,{children:d("path",{fill:"currentColor",d:"M2 2h16v28H2zm5 19v7h6v-7zM8.5 7h-3v3h3zm-3 6v3h3v-3zm9-6h-3v3h3zm-3 6v3h3v-3zM20 7l10 4.351V30H20zm3.5 8v3h3v-3z"})})}return d(c,{})};v.metadata={name:"Building",isSvgIcon:!0,variants:["outline","fill"]};var g=({size:r,variant:t})=>{if("outline"===t)switch(r){case"sm":return d(c,{children:d("path",{fill:"currentColor",d:"M13.5 3.89 6.951 12 2.5 7.48l.958-.993 3.394 3.447L12.452 3z"})});case"md":return d(c,{children:d("path",{fill:"currentColor",d:"M20.264 5.852 10.37 18.366l-6.642-6.89 1.295-1.249 5.213 5.407 8.616-10.898z"})});case"lg":return d(c,{children:d("path",{fill:"currentColor",d:"M30.19 6.341 13.677 26.276 2.803 15.509l1.688-1.706 9.012 8.922L28.341 4.81z"})})}if("fill"===t)switch(r){case"sm":return d(c,{children:d("path",{fill:"currentColor",d:"M13.593 4.502 6.968 12.5 2.4 7.978 3.505 6.86l3.348 3.315 5.53-6.676z"})});case"md":return d(c,{children:d("path",{fill:"currentColor",d:"m20.545 5.82-10.16 12.85-6.94-7.198 1.584-1.527 5.192 5.385L18.82 4.455z"})});case"lg":return d(c,{children:d("path",{fill:"currentColor",d:"M30.33 6.328 13.687 26.423 2.662 15.51l1.829-1.848 9.005 8.916 14.832-17.91z"})})}return d(c,{})};g.metadata={name:"Check",isSvgIcon:!0,variants:["outline","fill"]};var z=({size:r,variant:t})=>{if("outline"===t)switch(r){case"sm":return d(c,{children:d("path",{fill:"currentColor",d:"m12.526 4.465-.99-.99L8 7.01 4.465 3.475l-.99.99L7.01 8l-3.535 3.536.99.99L8 8.99l3.536 3.536.99-.99L8.99 8z"})});case"md":return d(c,{children:d("path",{fill:"currentColor",d:"m13.44 11.956 6.572-6.571L18.527 3.9l-6.571 6.57L5.385 3.9 3.9 5.385l6.57 6.57-6.57 6.572 1.485 1.485 6.57-6.571 6.572 6.57 1.485-1.484z"})});case"lg":return d(c,{children:d("path",{fill:"currentColor",d:"M17.702 15.934 28.818 4.818 27.05 3.05 15.934 14.166 4.818 3.05 3.05 4.818l11.116 11.116L3.05 27.05l1.768 1.768 11.116-11.116L27.05 28.818l1.768-1.768z"})})}if("fill"===t)switch(r){case"sm":return d(c,{children:d("path",{fill:"currentColor",d:"m9.131 8 3.536-3.536-1.131-1.131L8 6.869 4.464 3.333 3.333 4.464 6.869 8l-3.536 3.535 1.131 1.132L8 9.13l3.535 3.536 1.132-1.131z"})});case"md":return d(c,{children:d("path",{fill:"currentColor",d:"m12 13.768 6.337 6.337 1.768-1.768L13.768 12l6.337-6.337-1.768-1.768L12 10.232 5.663 3.895 3.895 5.663 10.232 12l-6.337 6.337 1.768 1.768z"})});case"lg":return d(c,{children:d("path",{fill:"currentColor",d:"M17.91 16 28.954 4.955l-1.91-1.91L16 14.091 4.955 3.045l-1.91 1.91L14.091 16 3.045 27.045l1.91 1.91L16 17.909l11.045 11.046 1.91-1.91z"})})}return d(c,{})};z.metadata={name:"Cross",isSvgIcon:!0,variants:["outline","fill"]};var C=({size:r,variant:t})=>{if("outline"===t)switch(r){case"sm":return d(c,{children:d("path",{fill:"currentColor",d:"M12.7 8.7H3.3V7.3h9.4z"})});case"md":return d(c,{children:d("path",{fill:"currentColor",d:"M2.97 10.75h17.838v2.1H2.97z"})});case"lg":return d(c,{children:d("path",{fill:"currentColor",d:"M27 17H4.7v-2.3H27z"})})}if("fill"===t)switch(r){case"sm":return d(c,{children:d("path",{fill:"currentColor",d:"M12.8 8.8H3.2V7.2h9.6z"})});case"md":return d(c,{children:d("path",{fill:"currentColor",d:"M2.966 10.75h18.068v2.5H2.966z"})});case"lg":return d(c,{children:d("path",{fill:"currentColor",d:"M27.3 17.3H4.7v-2.6h22.6z"})})}return d(c,{})};C.metadata={name:"Minus",isSvgIcon:!0,variants:["outline","fill"]};var M=({size:r,variant:t})=>{if("outline"===t)switch(r){case"sm":return d(c,{children:d("path",{fill:"currentColor",d:"M9.2 4.5a1.2 1.2 0 1 0-2.4 0 1.2 1.2 0 0 0 2.4 0m1.8 0a3 3 0 1 1-6 0 3 3 0 0 1 6 0m.706 6.19a2.97 2.97 0 0 0-1.472-.39H5.766a2.966 2.966 0 0 0-2.912 2.4h10.292a2.97 2.97 0 0 0-1.44-2.01M1 13.267A4.766 4.766 0 0 1 5.766 8.5h4.468A4.765 4.765 0 0 1 15 13.266v1.166c0 .038-.03.068-.068.068H1.068A.07.07 0 0 1 1 14.432z"})});case"md":return d(c,{children:d("path",{fill:"currentColor",d:"M14.25 7.95a2.25 2.25 0 1 0-4.5 0 2.25 2.25 0 0 0 4.5 0m1.8 0a4.05 4.05 0 1 1-8.1 0 4.05 4.05 0 0 1 8.1 0m.927 7.244A4.2 4.2 0 0 0 15 14.7H9a4.2 4.2 0 0 0-4.157 3.6h14.314a4.2 4.2 0 0 0-2.18-3.106M3 18.9a6 6 0 0 1 6-6h6a6 6 0 0 1 6 6v1.121a.08.08 0 0 1-.079.079H3.08a.08.08 0 0 1-.08-.08z"})});case"lg":return d(c,{children:d("path",{fill:"currentColor",d:"M19.7 10a3.7 3.7 0 1 0-7.4 0 3.7 3.7 0 0 0 7.4 0m2.3 0a6 6 0 1 1-12 0 6 6 0 0 1 12 0m8 17.043q0-.681-.1-1.343a9.044 9.044 0 0 0-8.943-7.7h-9.914A9.04 9.04 0 0 0 2 27.043V28h28zM8.144 20.955a6.74 6.74 0 0 1 2.9-.655h9.913a6.744 6.744 0 0 1 6.608 5.4H4.435a6.74 6.74 0 0 1 3.71-4.745"})})}if("fill"===t)switch(r){case"sm":return d(c,{children:d("path",{fill:"currentColor",d:"M8 7.5a3 3 0 1 0 0-6 3 3 0 0 0 0 6M3.401 9.128A4.77 4.77 0 0 0 1 13.266v1.166c0 .038.03.068.068.068h13.864c.038 0 .068-.03.068-.068v-1.166A4.766 4.766 0 0 0 10.234 8.5H5.766a4.76 4.76 0 0 0-2.365.628"})});case"md":return d(c,{children:d("path",{fill:"currentColor",d:"M12 12a4.05 4.05 0 1 0 0-8.1 4.05 4.05 0 0 0 0 8.1m-5.824 1.606A6 6 0 0 0 3 18.9v1.121c0 .044.035.079.079.079H20.92a.08.08 0 0 0 .08-.08V18.9a6 6 0 0 0-6-6H9a6 6 0 0 0-2.824.706"})});case"lg":return d(c,{children:d("path",{fill:"currentColor",d:"M16 16a6 6 0 1 0 0-12 6 6 0 0 0 0 12m-8.845 2.878A9.04 9.04 0 0 0 2 27.043V28h28v-.957A9.043 9.043 0 0 0 20.957 18h-9.914a9.05 9.05 0 0 0-3.888.878"})})}return d(c,{})};M.metadata={name:"Person",isSvgIcon:!0,variants:["outline","fill"]};var b=({size:r,variant:t})=>{if("outline"===t)switch(r){case"sm":return d(c,{children:d("path",{fill:"currentColor",d:"M7.9 2.7a5.2 5.2 0 1 0 5.2 5.2h1.6a6.8 6.8 0 1 1-6.8-6.8.8.8 0 1 1 0 1.6"})});case"md":return d(c,{children:d("path",{fill:"currentColor",d:"M12 4a8 8 0 1 0 8 8h2c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2a1 1 0 1 1 0 2"})});case"lg":return d(c,{children:d("path",{fill:"currentColor",d:"M16.15 4.3C9.605 4.3 4.3 9.605 4.3 16.15S9.605 28 16.15 28 28 22.695 28 16.15h2.3c0 7.815-6.335 14.15-14.15 14.15S2 23.965 2 16.15 8.335 2 16.15 2a1.15 1.15 0 0 1 0 2.3"})})}if("fill"===t)switch(r){case"sm":return d(c,{children:d("path",{fill:"currentColor",d:"M8 2.9A5.1 5.1 0 1 0 13.1 8h1.8A6.9 6.9 0 1 1 8 1.1a.9.9 0 1 1 0 1.8"})});case"md":return d(c,{children:d("path",{fill:"currentColor",d:"M12.15 4.3A7.85 7.85 0 1 0 20 12.15h2.3c0 5.606-4.544 10.15-10.15 10.15S2 17.756 2 12.15 6.544 2 12.15 2a1.15 1.15 0 0 1 0 2.3"})});case"lg":return d(c,{children:d("path",{fill:"currentColor",d:"M16.35 4.7C9.916 4.7 4.7 9.916 4.7 16.35S9.916 28 16.35 28 28 22.784 28 16.35h2.7c0 7.925-6.425 14.35-14.35 14.35S2 24.275 2 16.35 8.425 2 16.35 2a1.35 1.35 0 1 1 0 2.7"})})}return d(c,{})};b.metadata={name:"Progress",isSvgIcon:!0,variants:["outline","fill"]};
|
1
|
+
import{createSlot as r,getStyles as t}from"./chunk-AJPLGCE6.js";import{getMotionVar as e}from"./chunk-5J4LYLB6.js";import{LazyMotion as o,MotionConfig as l}from"motion/react";import{forwardRef as n,useState as i,useEffect as a,useMemo as s}from"react";import{jsx as d,Fragment as c}from"react/jsx-runtime";/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */
|
2
|
+
var h={damped:{1:{damping:20.585796264350424,stiffness:62.37968115365702},2:{damping:29.312551281312288,stiffness:126.47801753759964},3:{damping:48.92799401356162,stiffness:352.3892336537332},4:{damping:123.42690994256348,stiffness:2242.474548821137}},smooth:{1:{damping:16.46863701148034,stiffness:67.80400125397502},2:{damping:23.45004102504983,stiffness:137.47610601913004},3:{damping:39.1423952108493,stiffness:383.03177571057955},4:{damping:98.7415279540508,stiffness:2437.4723356751488}},subtle:{1:{damping:13.04316051309243,stiffness:67.80400125397502},2:{damping:18.572432491839468,stiffness:137.47610601913004},3:{damping:31.000777006992646,stiffness:383.03177571057955},4:{damping:78.20329013960823,stiffness:2437.4723356751488}},bouncy:{1:{damping:9.229712940600143,stiffness:48.880672622541795},2:{damping:12.634144343496553,stiffness:91.59092691366399},3:{damping:19.40217701790486,stiffness:216.00395877230474},4:{damping:37.541723184430275,stiffness:808.7032559422912}},veryBouncy:{1:{damping:6.902290754946187,stiffness:38.92152745126911},2:{damping:9.155550514215523,stiffness:68.48134828711234},3:{damping:13.244464908166709,stiffness:143.30858570843873},4:{damping:22.17862652876726,stiffness:401.85804919502965}}},f=()=>import("./motionFeatures-SJISLQ4M.js").then((({domAnimation:r})=>r));function m({reducedMotion:r="user",children:t,layoutVariant:n="subtle",layoutSpeed:c="3",colorVariant:m="smooth",colorSpeed:u="3"}){const p=h[n][c],v=h[m][u],[g,z]=i(p),[C,M]=i(v),b={variant:m,speed:u},S=e({...b,control:"stiffness"}),V=e({...b,control:"damping"}),H={variant:n,speed:c},w=e({...H,control:"stiffness"}),L=e({...H,control:"damping"});a((()=>{const r=getComputedStyle(document.documentElement),t={damping:Number(r.getPropertyValue(L)),stiffness:Number(r.getPropertyValue(w))},e={damping:Number(r.getPropertyValue(V)),stiffness:Number(r.getPropertyValue(S))};z(t),M(e)}),[V,S,L,w]);const y=s((()=>({type:"spring",mass:1,...g,layout:g,opacity:C,color:C,borderColor:C,backgroundColor:C})),[C,g]);return d(o,{features:f,strict:!0,children:d(l,{transition:y,reducedMotion:r,children:t})})}var u=r(),p=n((function({className:r,asChild:e,onPress:o,onClick:l=o,backgroundColor:n,borderRadius:i,borderTopStartRadius:a,borderTopEndRadius:s,borderBottomStartRadius:c,borderBottomEndRadius:h,borderColor:f,borderStartColor:m,borderEndColor:p,borderTopColor:v,borderBottomColor:g,borderWidth:z,borderVerticalWidth:C,borderHorizontalWidth:M,borderStartWidth:b,borderEndWidth:S,borderTopWidth:V,borderBottomWidth:H,alignContent:w,alignItems:L,alignSelf:y,flex:B,flexDirection:W,flexGrow:A,flexShrink:x,flexWrap:E,justifyContent:T,flexBasis:k,display:R,overflow:I,overflowX:P,overflowY:G,position:N,spacing:j,spacingHorizontal:J,spacingVertical:Y,spacingBottom:D,spacingEnd:X,spacingStart:q,spacingTop:F,offset:Q,offsetVertical:K,offsetHorizontal:O,offsetBottom:U,offsetEnd:Z,offsetStart:$,offsetTop:_,columnGap:rr,rowGap:tr,dropShadow:er,insetShadow:or,...lr},nr){const ir=t({backgroundColor:n,borderRadius:i,borderTopStartRadius:a,borderTopEndRadius:s,borderBottomStartRadius:c,borderBottomEndRadius:h,borderColor:f,borderStartColor:m,borderEndColor:p,borderTopColor:v,borderBottomColor:g,borderWidth:z,borderVerticalWidth:C,borderHorizontalWidth:M,borderStartWidth:b,borderEndWidth:S,borderTopWidth:V,borderBottomWidth:H,alignContent:w,alignItems:L,alignSelf:y,flex:B,flexDirection:W,flexGrow:A,flexShrink:x,flexWrap:E,justifyContent:T,flexBasis:k,display:R,overflow:I,overflowX:P,overflowY:G,position:N,spacing:j,spacingHorizontal:J,spacingVertical:Y,spacingBottom:D,spacingEnd:X,spacingStart:q,spacingTop:F,offset:Q,offsetVertical:K,offsetHorizontal:O,offsetBottom:U,offsetEnd:Z,offsetStart:$,offsetTop:_,columnGap:rr,rowGap:tr,dropShadow:er,insetShadow:or,className:r});return d(e?u:"button",{className:ir,ref:nr,onClick:l,...lr})})),v=({size:r,variant:t})=>{if("outline"===t)switch(r){case"sm":return d(c,{children:d("path",{fill:"currentColor",d:"M8.4 2.6H2.6v10.8H4V11h3v2.4h1.4zM1 15V1h9v2.524l5 1.746V15zm9.1-9.746V13.4h3.3V6.406zM4.5 4h2v2h-2zm2 3.5h-2v2h2z"})});case"md":return d(c,{children:d("path",{fill:"currentColor",d:"M13.367 4.752H4.3v14.495h2.724v-4.533h3.619v4.533h2.714V4.762l.01.003zM21.5 21.047h-19V2.952h12.667v2.494L21.5 7.843zm-1.8-1.8V9.087L15.167 7.37v11.876zM7.929 11.095h-1.81v1.81h1.81zm-1.81-3.619h1.81v1.81h-1.81zm5.429 0h-1.81v1.81h1.81zm-1.81 3.619h1.81v1.81h-1.81z"})});case"lg":return d(c,{children:d("path",{fill:"currentColor",d:"M17.8 4.2H4.2v23.6H8V21h6v6.8h3.8zM2 30V2h18v5.725l10 3.626V30zm18.2-19.862V27.8h7.6V12.894zM10 8H7v3h3zm-3 6h3v3H7zm5-6h3v3h-3zm3 6h-3v3h3zm7.5 1h3v3h-3zm3 6h-3v3h3z"})})}if("fill"===t)switch(r){case"sm":return d(c,{children:d("path",{fill:"currentColor",d:"M4.5 4v2h2V4zm2 3.5h-2v2h2zM12 4l3 1.27V15h-3zM1 1h9v14H1z"})});case"md":return d(c,{children:d("path",{fill:"currentColor",d:"M2.5 2.952h10.857v18.095H2.5zm2.714 7.238V12h1.81v-1.81zm1.81-3.619h-1.81v1.81h1.81zm1.81 0v1.81h1.809V6.57zm1.809 3.62h-1.81V12h1.81zm-4.524 4.523v4.524h3.62v-4.524zM21.5 7.843l-6.333-3.081v16.285H21.5z"})});case"lg":return d(c,{children:d("path",{fill:"currentColor",d:"M2 2h16v28H2zm5 19v7h6v-7zM8.5 7h-3v3h3zm-3 6v3h3v-3zm9-6h-3v3h3zm-3 6v3h3v-3zM20 7l10 4.351V30H20zm3.5 8v3h3v-3z"})})}return d(c,{})};v.metadata={name:"Building",isSvgIcon:!0,variants:["outline","fill"]};var g=({size:r,variant:t})=>{if("outline"===t)switch(r){case"sm":return d(c,{children:d("path",{fill:"currentColor",d:"M13.5 3.89 6.951 12 2.5 7.48l.958-.993 3.394 3.447L12.452 3z"})});case"md":return d(c,{children:d("path",{fill:"currentColor",d:"M20.264 5.852 10.37 18.366l-6.642-6.89 1.295-1.249 5.213 5.407 8.616-10.898z"})});case"lg":return d(c,{children:d("path",{fill:"currentColor",d:"M30.19 6.341 13.677 26.276 2.803 15.509l1.688-1.706 9.012 8.922L28.341 4.81z"})})}if("fill"===t)switch(r){case"sm":return d(c,{children:d("path",{fill:"currentColor",d:"M13.593 4.502 6.968 12.5 2.4 7.978 3.505 6.86l3.348 3.315 5.53-6.676z"})});case"md":return d(c,{children:d("path",{fill:"currentColor",d:"m20.545 5.82-10.16 12.85-6.94-7.198 1.584-1.527 5.192 5.385L18.82 4.455z"})});case"lg":return d(c,{children:d("path",{fill:"currentColor",d:"M30.33 6.328 13.687 26.423 2.662 15.51l1.829-1.848 9.005 8.916 14.832-17.91z"})})}return d(c,{})};g.metadata={name:"Check",isSvgIcon:!0,variants:["outline","fill"]};var z=({size:r,variant:t})=>{if("outline"===t)switch(r){case"sm":return d(c,{children:d("path",{fill:"currentColor",d:"m12.526 4.465-.99-.99L8 7.01 4.465 3.475l-.99.99L7.01 8l-3.535 3.536.99.99L8 8.99l3.536 3.536.99-.99L8.99 8z"})});case"md":return d(c,{children:d("path",{fill:"currentColor",d:"m13.44 11.956 6.572-6.571L18.527 3.9l-6.571 6.57L5.385 3.9 3.9 5.385l6.57 6.57-6.57 6.572 1.485 1.485 6.57-6.571 6.572 6.57 1.485-1.484z"})});case"lg":return d(c,{children:d("path",{fill:"currentColor",d:"M17.702 15.934 28.818 4.818 27.05 3.05 15.934 14.166 4.818 3.05 3.05 4.818l11.116 11.116L3.05 27.05l1.768 1.768 11.116-11.116L27.05 28.818l1.768-1.768z"})})}if("fill"===t)switch(r){case"sm":return d(c,{children:d("path",{fill:"currentColor",d:"m9.131 8 3.536-3.536-1.131-1.131L8 6.869 4.464 3.333 3.333 4.464 6.869 8l-3.536 3.535 1.131 1.132L8 9.13l3.535 3.536 1.132-1.131z"})});case"md":return d(c,{children:d("path",{fill:"currentColor",d:"m12 13.768 6.337 6.337 1.768-1.768L13.768 12l6.337-6.337-1.768-1.768L12 10.232 5.663 3.895 3.895 5.663 10.232 12l-6.337 6.337 1.768 1.768z"})});case"lg":return d(c,{children:d("path",{fill:"currentColor",d:"M17.91 16 28.954 4.955l-1.91-1.91L16 14.091 4.955 3.045l-1.91 1.91L14.091 16 3.045 27.045l1.91 1.91L16 17.909l11.045 11.046 1.91-1.91z"})})}return d(c,{})};z.metadata={name:"Cross",isSvgIcon:!0,variants:["outline","fill"]};var C=({size:r,variant:t})=>{if("outline"===t)switch(r){case"sm":return d(c,{children:d("path",{fill:"currentColor",d:"M12.7 8.7H3.3V7.3h9.4z"})});case"md":return d(c,{children:d("path",{fill:"currentColor",d:"M2.97 10.75h17.838v2.1H2.97z"})});case"lg":return d(c,{children:d("path",{fill:"currentColor",d:"M27 17H4.7v-2.3H27z"})})}if("fill"===t)switch(r){case"sm":return d(c,{children:d("path",{fill:"currentColor",d:"M12.8 8.8H3.2V7.2h9.6z"})});case"md":return d(c,{children:d("path",{fill:"currentColor",d:"M2.966 10.75h18.068v2.5H2.966z"})});case"lg":return d(c,{children:d("path",{fill:"currentColor",d:"M27.3 17.3H4.7v-2.6h22.6z"})})}return d(c,{})};C.metadata={name:"Minus",isSvgIcon:!0,variants:["outline","fill"]};var M=({size:r,variant:t})=>{if("outline"===t)switch(r){case"sm":return d(c,{children:d("path",{fill:"currentColor",d:"M9.2 4.5a1.2 1.2 0 1 0-2.4 0 1.2 1.2 0 0 0 2.4 0m1.8 0a3 3 0 1 1-6 0 3 3 0 0 1 6 0m.706 6.19a2.97 2.97 0 0 0-1.472-.39H5.766a2.966 2.966 0 0 0-2.912 2.4h10.292a2.97 2.97 0 0 0-1.44-2.01M1 13.267A4.766 4.766 0 0 1 5.766 8.5h4.468A4.765 4.765 0 0 1 15 13.266v1.166c0 .038-.03.068-.068.068H1.068A.07.07 0 0 1 1 14.432z"})});case"md":return d(c,{children:d("path",{fill:"currentColor",d:"M14.25 7.95a2.25 2.25 0 1 0-4.5 0 2.25 2.25 0 0 0 4.5 0m1.8 0a4.05 4.05 0 1 1-8.1 0 4.05 4.05 0 0 1 8.1 0m.927 7.244A4.2 4.2 0 0 0 15 14.7H9a4.2 4.2 0 0 0-4.157 3.6h14.314a4.2 4.2 0 0 0-2.18-3.106M3 18.9a6 6 0 0 1 6-6h6a6 6 0 0 1 6 6v1.121a.08.08 0 0 1-.079.079H3.08a.08.08 0 0 1-.08-.08z"})});case"lg":return d(c,{children:d("path",{fill:"currentColor",d:"M19.7 10a3.7 3.7 0 1 0-7.4 0 3.7 3.7 0 0 0 7.4 0m2.3 0a6 6 0 1 1-12 0 6 6 0 0 1 12 0m8 17.043q0-.681-.1-1.343a9.044 9.044 0 0 0-8.943-7.7h-9.914A9.04 9.04 0 0 0 2 27.043V28h28zM8.144 20.955a6.74 6.74 0 0 1 2.9-.655h9.913a6.744 6.744 0 0 1 6.608 5.4H4.435a6.74 6.74 0 0 1 3.71-4.745"})})}if("fill"===t)switch(r){case"sm":return d(c,{children:d("path",{fill:"currentColor",d:"M8 7.5a3 3 0 1 0 0-6 3 3 0 0 0 0 6M3.401 9.128A4.77 4.77 0 0 0 1 13.266v1.166c0 .038.03.068.068.068h13.864c.038 0 .068-.03.068-.068v-1.166A4.766 4.766 0 0 0 10.234 8.5H5.766a4.76 4.76 0 0 0-2.365.628"})});case"md":return d(c,{children:d("path",{fill:"currentColor",d:"M12 12a4.05 4.05 0 1 0 0-8.1 4.05 4.05 0 0 0 0 8.1m-5.824 1.606A6 6 0 0 0 3 18.9v1.121c0 .044.035.079.079.079H20.92a.08.08 0 0 0 .08-.08V18.9a6 6 0 0 0-6-6H9a6 6 0 0 0-2.824.706"})});case"lg":return d(c,{children:d("path",{fill:"currentColor",d:"M16 16a6 6 0 1 0 0-12 6 6 0 0 0 0 12m-8.845 2.878A9.04 9.04 0 0 0 2 27.043V28h28v-.957A9.043 9.043 0 0 0 20.957 18h-9.914a9.05 9.05 0 0 0-3.888.878"})})}return d(c,{})};M.metadata={name:"Person",isSvgIcon:!0,variants:["outline","fill"]};var b=({size:r,variant:t})=>{if("outline"===t)switch(r){case"sm":return d(c,{children:d("path",{fill:"currentColor",d:"M7.9 2.7a5.2 5.2 0 1 0 5.2 5.2h1.6a6.8 6.8 0 1 1-6.8-6.8.8.8 0 1 1 0 1.6"})});case"md":return d(c,{children:d("path",{fill:"currentColor",d:"M12 4a8 8 0 1 0 8 8h2c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2a1 1 0 1 1 0 2"})});case"lg":return d(c,{children:d("path",{fill:"currentColor",d:"M16.15 4.3C9.605 4.3 4.3 9.605 4.3 16.15S9.605 28 16.15 28 28 22.695 28 16.15h2.3c0 7.815-6.335 14.15-14.15 14.15S2 23.965 2 16.15 8.335 2 16.15 2a1.15 1.15 0 0 1 0 2.3"})})}if("fill"===t)switch(r){case"sm":return d(c,{children:d("path",{fill:"currentColor",d:"M8 2.9A5.1 5.1 0 1 0 13.1 8h1.8A6.9 6.9 0 1 1 8 1.1a.9.9 0 1 1 0 1.8"})});case"md":return d(c,{children:d("path",{fill:"currentColor",d:"M12.15 4.3A7.85 7.85 0 1 0 20 12.15h2.3c0 5.606-4.544 10.15-10.15 10.15S2 17.756 2 12.15 6.544 2 12.15 2a1.15 1.15 0 0 1 0 2.3"})});case"lg":return d(c,{children:d("path",{fill:"currentColor",d:"M16.35 4.7C9.916 4.7 4.7 9.916 4.7 16.35S9.916 28 16.35 28 28 22.784 28 16.35h2.7c0 7.925-6.425 14.35-14.35 14.35S2 24.275 2 16.35 8.425 2 16.35 2a1.35 1.35 0 1 1 0 2.7"})})}return d(c,{})};b.metadata={name:"Progress",isSvgIcon:!0,variants:["outline","fill"]};
|
3
3
|
/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */export{p as Pressable,m as SpringMotionConfig,g as a,z as a2,M as e,b as e2,C as l,v as t};
|
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";var r=require("./chunk-M47X3QGG.cjs"),e=require("./chunk-ZZ3PL65H.cjs"),t=require("motion/react"),n=require("react"),a=require("react/jsx-runtime"),s={damped:{1:{damping:20.585796264350424,stiffness:62.37968115365702},2:{damping:29.312551281312288,stiffness:126.47801753759964},3:{damping:48.92799401356162,stiffness:352.3892336537332},4:{damping:123.42690994256348,stiffness:2242.474548821137}},smooth:{1:{damping:16.46863701148034,stiffness:67.80400125397502},2:{damping:23.45004102504983,stiffness:137.47610601913004},3:{damping:39.1423952108493,stiffness:383.03177571057955},4:{damping:98.7415279540508,stiffness:2437.4723356751488}},subtle:{1:{damping:13.04316051309243,stiffness:67.80400125397502},2:{damping:18.572432491839468,stiffness:137.47610601913004},3:{damping:31.000777006992646,stiffness:383.03177571057955},4:{damping:78.20329013960823,stiffness:2437.4723356751488}},bouncy:{1:{damping:9.229712940600143,stiffness:48.880672622541795},2:{damping:12.634144343496553,stiffness:91.59092691366399},3:{damping:19.40217701790486,stiffness:216.00395877230474},4:{damping:37.541723184430275,stiffness:808.7032559422912}},veryBouncy:{1:{damping:6.902290754946187,stiffness:38.92152745126911},2:{damping:9.155550514215523,stiffness:68.48134828711234},3:{damping:13.244464908166709,stiffness:143.30858570843873},4:{damping:22.17862652876726,stiffness:401.85804919502965}}},o=()=>import("./motionFeatures-6LIGGXPL.cjs").then((({domAnimation:r})=>r));/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */var i=r.createSlot(),l=n.forwardRef((function({className:e,asChild:t,onPress:n,onClick:s=n,backgroundColor:o,borderRadius:l,borderTopStartRadius:d,borderTopEndRadius:c,borderBottomStartRadius:h,borderBottomEndRadius:m,borderColor:f,borderStartColor:u,borderEndColor:g,borderTopColor:p,borderBottomColor:x,borderWidth:v,borderVerticalWidth:j,borderHorizontalWidth:z,borderStartWidth:C,borderEndWidth:M,borderTopWidth:b,borderBottomWidth:F,alignContent:S,alignItems:V,alignSelf:H,flex:w,flexDirection:L,flexGrow:y,flexShrink:B,flexWrap:W,justifyContent:A,flexBasis:E,display:T,overflow:R,overflowX:k,overflowY:G,position:P,spacing:I,spacingHorizontal:N,spacingVertical:q,spacingBottom:X,spacingEnd:D,spacingStart:Y,spacingTop:Z,offset:Q,offsetVertical:J,offsetHorizontal:K,offsetBottom:O,offsetEnd:U,offsetStart:$,offsetTop:_,columnGap:rr,rowGap:er,dropShadow:tr,insetShadow:nr,...ar},sr){const or=r.getStyles({backgroundColor:o,borderRadius:l,borderTopStartRadius:d,borderTopEndRadius:c,borderBottomStartRadius:h,borderBottomEndRadius:m,borderColor:f,borderStartColor:u,borderEndColor:g,borderTopColor:p,borderBottomColor:x,borderWidth:v,borderVerticalWidth:j,borderHorizontalWidth:z,borderStartWidth:C,borderEndWidth:M,borderTopWidth:b,borderBottomWidth:F,alignContent:S,alignItems:V,alignSelf:H,flex:w,flexDirection:L,flexGrow:y,flexShrink:B,flexWrap:W,justifyContent:A,flexBasis:E,display:T,overflow:R,overflowX:k,overflowY:G,position:P,spacing:I,spacingHorizontal:N,spacingVertical:q,spacingBottom:X,spacingEnd:D,spacingStart:Y,spacingTop:Z,offset:Q,offsetVertical:J,offsetHorizontal:K,offsetBottom:O,offsetEnd:U,offsetStart:$,offsetTop:_,columnGap:rr,rowGap:er,dropShadow:tr,insetShadow:nr,className:e}),ir=t?i:"button";return a.jsx(ir,{className:or,ref:sr,onClick:s,...ar})})),d=({size:r,variant:e})=>{if("outline"===e)switch(r){case"sm":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M8.4 2.6H2.6v10.8H4V11h3v2.4h1.4zM1 15V1h9v2.524l5 1.746V15zm9.1-9.746V13.4h3.3V6.406zM4.5 4h2v2h-2zm2 3.5h-2v2h2z"})});case"md":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M13.367 4.752H4.3v14.495h2.724v-4.533h3.619v4.533h2.714V4.762l.01.003zM21.5 21.047h-19V2.952h12.667v2.494L21.5 7.843zm-1.8-1.8V9.087L15.167 7.37v11.876zM7.929 11.095h-1.81v1.81h1.81zm-1.81-3.619h1.81v1.81h-1.81zm5.429 0h-1.81v1.81h1.81zm-1.81 3.619h1.81v1.81h-1.81z"})});case"lg":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M17.8 4.2H4.2v23.6H8V21h6v6.8h3.8zM2 30V2h18v5.725l10 3.626V30zm18.2-19.862V27.8h7.6V12.894zM10 8H7v3h3zm-3 6h3v3H7zm5-6h3v3h-3zm3 6h-3v3h3zm7.5 1h3v3h-3zm3 6h-3v3h3z"})})}if("fill"===e)switch(r){case"sm":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M4.5 4v2h2V4zm2 3.5h-2v2h2zM12 4l3 1.27V15h-3zM1 1h9v14H1z"})});case"md":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M2.5 2.952h10.857v18.095H2.5zm2.714 7.238V12h1.81v-1.81zm1.81-3.619h-1.81v1.81h1.81zm1.81 0v1.81h1.809V6.57zm1.809 3.62h-1.81V12h1.81zm-4.524 4.523v4.524h3.62v-4.524zM21.5 7.843l-6.333-3.081v16.285H21.5z"})});case"lg":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M2 2h16v28H2zm5 19v7h6v-7zM8.5 7h-3v3h3zm-3 6v3h3v-3zm9-6h-3v3h3zm-3 6v3h3v-3zM20 7l10 4.351V30H20zm3.5 8v3h3v-3z"})})}return a.jsx(a.Fragment,{})};d.metadata={name:"Building",isSvgIcon:!0,variants:["outline","fill"]};var c=({size:r,variant:e})=>{if("outline"===e)switch(r){case"sm":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M13.5 3.89 6.951 12 2.5 7.48l.958-.993 3.394 3.447L12.452 3z"})});case"md":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M20.264 5.852 10.37 18.366l-6.642-6.89 1.295-1.249 5.213 5.407 8.616-10.898z"})});case"lg":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M30.19 6.341 13.677 26.276 2.803 15.509l1.688-1.706 9.012 8.922L28.341 4.81z"})})}if("fill"===e)switch(r){case"sm":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M13.593 4.502 6.968 12.5 2.4 7.978 3.505 6.86l3.348 3.315 5.53-6.676z"})});case"md":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"m20.545 5.82-10.16 12.85-6.94-7.198 1.584-1.527 5.192 5.385L18.82 4.455z"})});case"lg":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M30.33 6.328 13.687 26.423 2.662 15.51l1.829-1.848 9.005 8.916 14.832-17.91z"})})}return a.jsx(a.Fragment,{})};c.metadata={name:"Check",isSvgIcon:!0,variants:["outline","fill"]};var h=({size:r,variant:e})=>{if("outline"===e)switch(r){case"sm":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"m12.526 4.465-.99-.99L8 7.01 4.465 3.475l-.99.99L7.01 8l-3.535 3.536.99.99L8 8.99l3.536 3.536.99-.99L8.99 8z"})});case"md":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"m13.44 11.956 6.572-6.571L18.527 3.9l-6.571 6.57L5.385 3.9 3.9 5.385l6.57 6.57-6.57 6.572 1.485 1.485 6.57-6.571 6.572 6.57 1.485-1.484z"})});case"lg":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M17.702 15.934 28.818 4.818 27.05 3.05 15.934 14.166 4.818 3.05 3.05 4.818l11.116 11.116L3.05 27.05l1.768 1.768 11.116-11.116L27.05 28.818l1.768-1.768z"})})}if("fill"===e)switch(r){case"sm":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"m9.131 8 3.536-3.536-1.131-1.131L8 6.869 4.464 3.333 3.333 4.464 6.869 8l-3.536 3.535 1.131 1.132L8 9.13l3.535 3.536 1.132-1.131z"})});case"md":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"m12 13.768 6.337 6.337 1.768-1.768L13.768 12l6.337-6.337-1.768-1.768L12 10.232 5.663 3.895 3.895 5.663 10.232 12l-6.337 6.337 1.768 1.768z"})});case"lg":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M17.91 16 28.954 4.955l-1.91-1.91L16 14.091 4.955 3.045l-1.91 1.91L14.091 16 3.045 27.045l1.91 1.91L16 17.909l11.045 11.046 1.91-1.91z"})})}return a.jsx(a.Fragment,{})};h.metadata={name:"Cross",isSvgIcon:!0,variants:["outline","fill"]};var m=({size:r,variant:e})=>{if("outline"===e)switch(r){case"sm":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M12.7 8.7H3.3V7.3h9.4z"})});case"md":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M2.97 10.75h17.838v2.1H2.97z"})});case"lg":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M27 17H4.7v-2.3H27z"})})}if("fill"===e)switch(r){case"sm":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M12.8 8.8H3.2V7.2h9.6z"})});case"md":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M2.966 10.75h18.068v2.5H2.966z"})});case"lg":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M27.3 17.3H4.7v-2.6h22.6z"})})}return a.jsx(a.Fragment,{})};m.metadata={name:"Minus",isSvgIcon:!0,variants:["outline","fill"]};var f=({size:r,variant:e})=>{if("outline"===e)switch(r){case"sm":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M9.2 4.5a1.2 1.2 0 1 0-2.4 0 1.2 1.2 0 0 0 2.4 0m1.8 0a3 3 0 1 1-6 0 3 3 0 0 1 6 0m.706 6.19a2.97 2.97 0 0 0-1.472-.39H5.766a2.966 2.966 0 0 0-2.912 2.4h10.292a2.97 2.97 0 0 0-1.44-2.01M1 13.267A4.766 4.766 0 0 1 5.766 8.5h4.468A4.765 4.765 0 0 1 15 13.266v1.166c0 .038-.03.068-.068.068H1.068A.07.07 0 0 1 1 14.432z"})});case"md":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M14.25 7.95a2.25 2.25 0 1 0-4.5 0 2.25 2.25 0 0 0 4.5 0m1.8 0a4.05 4.05 0 1 1-8.1 0 4.05 4.05 0 0 1 8.1 0m.927 7.244A4.2 4.2 0 0 0 15 14.7H9a4.2 4.2 0 0 0-4.157 3.6h14.314a4.2 4.2 0 0 0-2.18-3.106M3 18.9a6 6 0 0 1 6-6h6a6 6 0 0 1 6 6v1.121a.08.08 0 0 1-.079.079H3.08a.08.08 0 0 1-.08-.08z"})});case"lg":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M19.7 10a3.7 3.7 0 1 0-7.4 0 3.7 3.7 0 0 0 7.4 0m2.3 0a6 6 0 1 1-12 0 6 6 0 0 1 12 0m8 17.043q0-.681-.1-1.343a9.044 9.044 0 0 0-8.943-7.7h-9.914A9.04 9.04 0 0 0 2 27.043V28h28zM8.144 20.955a6.74 6.74 0 0 1 2.9-.655h9.913a6.744 6.744 0 0 1 6.608 5.4H4.435a6.74 6.74 0 0 1 3.71-4.745"})})}if("fill"===e)switch(r){case"sm":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M8 7.5a3 3 0 1 0 0-6 3 3 0 0 0 0 6M3.401 9.128A4.77 4.77 0 0 0 1 13.266v1.166c0 .038.03.068.068.068h13.864c.038 0 .068-.03.068-.068v-1.166A4.766 4.766 0 0 0 10.234 8.5H5.766a4.76 4.76 0 0 0-2.365.628"})});case"md":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M12 12a4.05 4.05 0 1 0 0-8.1 4.05 4.05 0 0 0 0 8.1m-5.824 1.606A6 6 0 0 0 3 18.9v1.121c0 .044.035.079.079.079H20.92a.08.08 0 0 0 .08-.08V18.9a6 6 0 0 0-6-6H9a6 6 0 0 0-2.824.706"})});case"lg":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M16 16a6 6 0 1 0 0-12 6 6 0 0 0 0 12m-8.845 2.878A9.04 9.04 0 0 0 2 27.043V28h28v-.957A9.043 9.043 0 0 0 20.957 18h-9.914a9.05 9.05 0 0 0-3.888.878"})})}return a.jsx(a.Fragment,{})};f.metadata={name:"Person",isSvgIcon:!0,variants:["outline","fill"]};var u=({size:r,variant:e})=>{if("outline"===e)switch(r){case"sm":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M7.9 2.7a5.2 5.2 0 1 0 5.2 5.2h1.6a6.8 6.8 0 1 1-6.8-6.8.8.8 0 1 1 0 1.6"})});case"md":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M12 4a8 8 0 1 0 8 8h2c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2a1 1 0 1 1 0 2"})});case"lg":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M16.15 4.3C9.605 4.3 4.3 9.605 4.3 16.15S9.605 28 16.15 28 28 22.695 28 16.15h2.3c0 7.815-6.335 14.15-14.15 14.15S2 23.965 2 16.15 8.335 2 16.15 2a1.15 1.15 0 0 1 0 2.3"})})}if("fill"===e)switch(r){case"sm":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M8 2.9A5.1 5.1 0 1 0 13.1 8h1.8A6.9 6.9 0 1 1 8 1.1a.9.9 0 1 1 0 1.8"})});case"md":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M12.15 4.3A7.85 7.85 0 1 0 20 12.15h2.3c0 5.606-4.544 10.15-10.15 10.15S2 17.756 2 12.15 6.544 2 12.15 2a1.15 1.15 0 0 1 0 2.3"})});case"lg":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M16.35 4.7C9.916 4.7 4.7 9.916 4.7 16.35S9.916 28 16.35 28 28 22.784 28 16.35h2.7c0 7.925-6.425 14.35-14.35 14.35S2 24.275 2 16.35 8.425 2 16.35 2a1.35 1.35 0 1 1 0 2.7"})})}return a.jsx(a.Fragment,{})};u.metadata={name:"Progress",isSvgIcon:!0,variants:["outline","fill"]},
|
1
|
+
"use strict";var r=require("./chunk-ZKSFXFL2.cjs"),e=require("./chunk-QPPJ2I6Z.cjs"),t=require("motion/react"),n=require("react"),a=require("react/jsx-runtime"),s={damped:{1:{damping:20.585796264350424,stiffness:62.37968115365702},2:{damping:29.312551281312288,stiffness:126.47801753759964},3:{damping:48.92799401356162,stiffness:352.3892336537332},4:{damping:123.42690994256348,stiffness:2242.474548821137}},smooth:{1:{damping:16.46863701148034,stiffness:67.80400125397502},2:{damping:23.45004102504983,stiffness:137.47610601913004},3:{damping:39.1423952108493,stiffness:383.03177571057955},4:{damping:98.7415279540508,stiffness:2437.4723356751488}},subtle:{1:{damping:13.04316051309243,stiffness:67.80400125397502},2:{damping:18.572432491839468,stiffness:137.47610601913004},3:{damping:31.000777006992646,stiffness:383.03177571057955},4:{damping:78.20329013960823,stiffness:2437.4723356751488}},bouncy:{1:{damping:9.229712940600143,stiffness:48.880672622541795},2:{damping:12.634144343496553,stiffness:91.59092691366399},3:{damping:19.40217701790486,stiffness:216.00395877230474},4:{damping:37.541723184430275,stiffness:808.7032559422912}},veryBouncy:{1:{damping:6.902290754946187,stiffness:38.92152745126911},2:{damping:9.155550514215523,stiffness:68.48134828711234},3:{damping:13.244464908166709,stiffness:143.30858570843873},4:{damping:22.17862652876726,stiffness:401.85804919502965}}},o=()=>import("./motionFeatures-6LIGGXPL.cjs").then((({domAnimation:r})=>r));/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */var i=r.createSlot(),l=n.forwardRef((function({className:e,asChild:t,onPress:n,onClick:s=n,backgroundColor:o,borderRadius:l,borderTopStartRadius:d,borderTopEndRadius:c,borderBottomStartRadius:h,borderBottomEndRadius:m,borderColor:f,borderStartColor:u,borderEndColor:g,borderTopColor:p,borderBottomColor:x,borderWidth:v,borderVerticalWidth:j,borderHorizontalWidth:z,borderStartWidth:C,borderEndWidth:M,borderTopWidth:b,borderBottomWidth:F,alignContent:S,alignItems:V,alignSelf:H,flex:w,flexDirection:L,flexGrow:y,flexShrink:B,flexWrap:W,justifyContent:A,flexBasis:E,display:T,overflow:P,overflowX:R,overflowY:k,position:I,spacing:G,spacingHorizontal:N,spacingVertical:q,spacingBottom:X,spacingEnd:D,spacingStart:Y,spacingTop:Z,offset:J,offsetVertical:K,offsetHorizontal:Q,offsetBottom:O,offsetEnd:U,offsetStart:$,offsetTop:_,columnGap:rr,rowGap:er,dropShadow:tr,insetShadow:nr,...ar},sr){const or=r.getStyles({backgroundColor:o,borderRadius:l,borderTopStartRadius:d,borderTopEndRadius:c,borderBottomStartRadius:h,borderBottomEndRadius:m,borderColor:f,borderStartColor:u,borderEndColor:g,borderTopColor:p,borderBottomColor:x,borderWidth:v,borderVerticalWidth:j,borderHorizontalWidth:z,borderStartWidth:C,borderEndWidth:M,borderTopWidth:b,borderBottomWidth:F,alignContent:S,alignItems:V,alignSelf:H,flex:w,flexDirection:L,flexGrow:y,flexShrink:B,flexWrap:W,justifyContent:A,flexBasis:E,display:T,overflow:P,overflowX:R,overflowY:k,position:I,spacing:G,spacingHorizontal:N,spacingVertical:q,spacingBottom:X,spacingEnd:D,spacingStart:Y,spacingTop:Z,offset:J,offsetVertical:K,offsetHorizontal:Q,offsetBottom:O,offsetEnd:U,offsetStart:$,offsetTop:_,columnGap:rr,rowGap:er,dropShadow:tr,insetShadow:nr,className:e}),ir=t?i:"button";return a.jsx(ir,{className:or,ref:sr,onClick:s,...ar})})),d=({size:r,variant:e})=>{if("outline"===e)switch(r){case"sm":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M8.4 2.6H2.6v10.8H4V11h3v2.4h1.4zM1 15V1h9v2.524l5 1.746V15zm9.1-9.746V13.4h3.3V6.406zM4.5 4h2v2h-2zm2 3.5h-2v2h2z"})});case"md":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M13.367 4.752H4.3v14.495h2.724v-4.533h3.619v4.533h2.714V4.762l.01.003zM21.5 21.047h-19V2.952h12.667v2.494L21.5 7.843zm-1.8-1.8V9.087L15.167 7.37v11.876zM7.929 11.095h-1.81v1.81h1.81zm-1.81-3.619h1.81v1.81h-1.81zm5.429 0h-1.81v1.81h1.81zm-1.81 3.619h1.81v1.81h-1.81z"})});case"lg":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M17.8 4.2H4.2v23.6H8V21h6v6.8h3.8zM2 30V2h18v5.725l10 3.626V30zm18.2-19.862V27.8h7.6V12.894zM10 8H7v3h3zm-3 6h3v3H7zm5-6h3v3h-3zm3 6h-3v3h3zm7.5 1h3v3h-3zm3 6h-3v3h3z"})})}if("fill"===e)switch(r){case"sm":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M4.5 4v2h2V4zm2 3.5h-2v2h2zM12 4l3 1.27V15h-3zM1 1h9v14H1z"})});case"md":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M2.5 2.952h10.857v18.095H2.5zm2.714 7.238V12h1.81v-1.81zm1.81-3.619h-1.81v1.81h1.81zm1.81 0v1.81h1.809V6.57zm1.809 3.62h-1.81V12h1.81zm-4.524 4.523v4.524h3.62v-4.524zM21.5 7.843l-6.333-3.081v16.285H21.5z"})});case"lg":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M2 2h16v28H2zm5 19v7h6v-7zM8.5 7h-3v3h3zm-3 6v3h3v-3zm9-6h-3v3h3zm-3 6v3h3v-3zM20 7l10 4.351V30H20zm3.5 8v3h3v-3z"})})}return a.jsx(a.Fragment,{})};d.metadata={name:"Building",isSvgIcon:!0,variants:["outline","fill"]};var c=({size:r,variant:e})=>{if("outline"===e)switch(r){case"sm":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M13.5 3.89 6.951 12 2.5 7.48l.958-.993 3.394 3.447L12.452 3z"})});case"md":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M20.264 5.852 10.37 18.366l-6.642-6.89 1.295-1.249 5.213 5.407 8.616-10.898z"})});case"lg":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M30.19 6.341 13.677 26.276 2.803 15.509l1.688-1.706 9.012 8.922L28.341 4.81z"})})}if("fill"===e)switch(r){case"sm":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M13.593 4.502 6.968 12.5 2.4 7.978 3.505 6.86l3.348 3.315 5.53-6.676z"})});case"md":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"m20.545 5.82-10.16 12.85-6.94-7.198 1.584-1.527 5.192 5.385L18.82 4.455z"})});case"lg":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M30.33 6.328 13.687 26.423 2.662 15.51l1.829-1.848 9.005 8.916 14.832-17.91z"})})}return a.jsx(a.Fragment,{})};c.metadata={name:"Check",isSvgIcon:!0,variants:["outline","fill"]};var h=({size:r,variant:e})=>{if("outline"===e)switch(r){case"sm":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"m12.526 4.465-.99-.99L8 7.01 4.465 3.475l-.99.99L7.01 8l-3.535 3.536.99.99L8 8.99l3.536 3.536.99-.99L8.99 8z"})});case"md":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"m13.44 11.956 6.572-6.571L18.527 3.9l-6.571 6.57L5.385 3.9 3.9 5.385l6.57 6.57-6.57 6.572 1.485 1.485 6.57-6.571 6.572 6.57 1.485-1.484z"})});case"lg":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M17.702 15.934 28.818 4.818 27.05 3.05 15.934 14.166 4.818 3.05 3.05 4.818l11.116 11.116L3.05 27.05l1.768 1.768 11.116-11.116L27.05 28.818l1.768-1.768z"})})}if("fill"===e)switch(r){case"sm":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"m9.131 8 3.536-3.536-1.131-1.131L8 6.869 4.464 3.333 3.333 4.464 6.869 8l-3.536 3.535 1.131 1.132L8 9.13l3.535 3.536 1.132-1.131z"})});case"md":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"m12 13.768 6.337 6.337 1.768-1.768L13.768 12l6.337-6.337-1.768-1.768L12 10.232 5.663 3.895 3.895 5.663 10.232 12l-6.337 6.337 1.768 1.768z"})});case"lg":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M17.91 16 28.954 4.955l-1.91-1.91L16 14.091 4.955 3.045l-1.91 1.91L14.091 16 3.045 27.045l1.91 1.91L16 17.909l11.045 11.046 1.91-1.91z"})})}return a.jsx(a.Fragment,{})};h.metadata={name:"Cross",isSvgIcon:!0,variants:["outline","fill"]};var m=({size:r,variant:e})=>{if("outline"===e)switch(r){case"sm":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M12.7 8.7H3.3V7.3h9.4z"})});case"md":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M2.97 10.75h17.838v2.1H2.97z"})});case"lg":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M27 17H4.7v-2.3H27z"})})}if("fill"===e)switch(r){case"sm":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M12.8 8.8H3.2V7.2h9.6z"})});case"md":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M2.966 10.75h18.068v2.5H2.966z"})});case"lg":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M27.3 17.3H4.7v-2.6h22.6z"})})}return a.jsx(a.Fragment,{})};m.metadata={name:"Minus",isSvgIcon:!0,variants:["outline","fill"]};var f=({size:r,variant:e})=>{if("outline"===e)switch(r){case"sm":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M9.2 4.5a1.2 1.2 0 1 0-2.4 0 1.2 1.2 0 0 0 2.4 0m1.8 0a3 3 0 1 1-6 0 3 3 0 0 1 6 0m.706 6.19a2.97 2.97 0 0 0-1.472-.39H5.766a2.966 2.966 0 0 0-2.912 2.4h10.292a2.97 2.97 0 0 0-1.44-2.01M1 13.267A4.766 4.766 0 0 1 5.766 8.5h4.468A4.765 4.765 0 0 1 15 13.266v1.166c0 .038-.03.068-.068.068H1.068A.07.07 0 0 1 1 14.432z"})});case"md":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M14.25 7.95a2.25 2.25 0 1 0-4.5 0 2.25 2.25 0 0 0 4.5 0m1.8 0a4.05 4.05 0 1 1-8.1 0 4.05 4.05 0 0 1 8.1 0m.927 7.244A4.2 4.2 0 0 0 15 14.7H9a4.2 4.2 0 0 0-4.157 3.6h14.314a4.2 4.2 0 0 0-2.18-3.106M3 18.9a6 6 0 0 1 6-6h6a6 6 0 0 1 6 6v1.121a.08.08 0 0 1-.079.079H3.08a.08.08 0 0 1-.08-.08z"})});case"lg":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M19.7 10a3.7 3.7 0 1 0-7.4 0 3.7 3.7 0 0 0 7.4 0m2.3 0a6 6 0 1 1-12 0 6 6 0 0 1 12 0m8 17.043q0-.681-.1-1.343a9.044 9.044 0 0 0-8.943-7.7h-9.914A9.04 9.04 0 0 0 2 27.043V28h28zM8.144 20.955a6.74 6.74 0 0 1 2.9-.655h9.913a6.744 6.744 0 0 1 6.608 5.4H4.435a6.74 6.74 0 0 1 3.71-4.745"})})}if("fill"===e)switch(r){case"sm":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M8 7.5a3 3 0 1 0 0-6 3 3 0 0 0 0 6M3.401 9.128A4.77 4.77 0 0 0 1 13.266v1.166c0 .038.03.068.068.068h13.864c.038 0 .068-.03.068-.068v-1.166A4.766 4.766 0 0 0 10.234 8.5H5.766a4.76 4.76 0 0 0-2.365.628"})});case"md":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M12 12a4.05 4.05 0 1 0 0-8.1 4.05 4.05 0 0 0 0 8.1m-5.824 1.606A6 6 0 0 0 3 18.9v1.121c0 .044.035.079.079.079H20.92a.08.08 0 0 0 .08-.08V18.9a6 6 0 0 0-6-6H9a6 6 0 0 0-2.824.706"})});case"lg":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M16 16a6 6 0 1 0 0-12 6 6 0 0 0 0 12m-8.845 2.878A9.04 9.04 0 0 0 2 27.043V28h28v-.957A9.043 9.043 0 0 0 20.957 18h-9.914a9.05 9.05 0 0 0-3.888.878"})})}return a.jsx(a.Fragment,{})};f.metadata={name:"Person",isSvgIcon:!0,variants:["outline","fill"]};var u=({size:r,variant:e})=>{if("outline"===e)switch(r){case"sm":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M7.9 2.7a5.2 5.2 0 1 0 5.2 5.2h1.6a6.8 6.8 0 1 1-6.8-6.8.8.8 0 1 1 0 1.6"})});case"md":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M12 4a8 8 0 1 0 8 8h2c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2a1 1 0 1 1 0 2"})});case"lg":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M16.15 4.3C9.605 4.3 4.3 9.605 4.3 16.15S9.605 28 16.15 28 28 22.695 28 16.15h2.3c0 7.815-6.335 14.15-14.15 14.15S2 23.965 2 16.15 8.335 2 16.15 2a1.15 1.15 0 0 1 0 2.3"})})}if("fill"===e)switch(r){case"sm":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M8 2.9A5.1 5.1 0 1 0 13.1 8h1.8A6.9 6.9 0 1 1 8 1.1a.9.9 0 1 1 0 1.8"})});case"md":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M12.15 4.3A7.85 7.85 0 1 0 20 12.15h2.3c0 5.606-4.544 10.15-10.15 10.15S2 17.756 2 12.15 6.544 2 12.15 2a1.15 1.15 0 0 1 0 2.3"})});case"lg":return a.jsx(a.Fragment,{children:a.jsx("path",{fill:"currentColor",d:"M16.35 4.7C9.916 4.7 4.7 9.916 4.7 16.35S9.916 28 16.35 28 28 22.784 28 16.35h2.7c0 7.925-6.425 14.35-14.35 14.35S2 24.275 2 16.35 8.425 2 16.35 2a1.35 1.35 0 1 1 0 2.7"})})}return a.jsx(a.Fragment,{})};u.metadata={name:"Progress",isSvgIcon:!0,variants:["outline","fill"]},
|
2
2
|
/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */exports.Pressable=l,exports.SpringMotionConfig=function({reducedMotion:r="user",children:i,layoutVariant:l="subtle",layoutSpeed:d="3",colorVariant:c="smooth",colorSpeed:h="3"}){const m=s[l][d],f=s[c][h],[u,g]=n.useState(m),[p,x]=n.useState(f),v={variant:c,speed:h},j=e.getMotionVar({...v,control:"stiffness"}),z=e.getMotionVar({...v,control:"damping"}),C={variant:l,speed:d},M=e.getMotionVar({...C,control:"stiffness"}),b=e.getMotionVar({...C,control:"damping"});n.useEffect((()=>{const r=getComputedStyle(document.documentElement),e={damping:Number(r.getPropertyValue(b)),stiffness:Number(r.getPropertyValue(M))},t={damping:Number(r.getPropertyValue(z)),stiffness:Number(r.getPropertyValue(j))};g(e),x(t)}),[z,j,b,M]);const F=n.useMemo((()=>({type:"spring",mass:1,...u,layout:u,opacity:p,color:p,borderColor:p,backgroundColor:p})),[p,u]);return a.jsx(t.LazyMotion,{features:o,strict:!0,children:a.jsx(t.MotionConfig,{transition:F,reducedMotion:r,children:i})})},exports.a=c,exports.a2=h,exports.e=f,exports.e2=u,exports.l=m,exports.t=d;
|
@@ -1,3 +1,3 @@
|
|
1
|
-
"use strict";var r=require("./chunk-
|
2
|
-
function p(r){return"boolean"==typeof r?`${r}`:0===r?"0":r}function u(r){const o=Object.create(null),e=Object.keys(r);for(let t=0,n=e.length;t<n;t++){const n=e[t];void 0!==r[n]&&(o[n]=r[n])}return o}var h=i.extendTailwindMerge({extend:{theme:{borderColor:o.lineColors,borderWidth:o.borderWidths,borderRadius:o.borderRadii}},override:{classGroups:{"text-color":[{text:[...o.foregroundColors,...o.spectrumColors]}],"bg-color":[{bg:o.backgroundColors}],"font-family":[{font:["icons",...o.textVariants]}],leading:[{leading:o.textVariants}]},conflictingClassGroups:{}}}),b=(...r)=>{const o=c.default(r);return h(o)},m=r=>o=>{if(!r?.variants)return b(r?.base,o?.className);const{variants:e,defaultVariants:t}=r,n=Object.keys(e).map((r=>{const n=o?.[r],i=t?.[r],a=p(n)||p(i);return e[r][a]})),i={...t,...o&&u(o)},a=r?.compoundVariants?.reduce(((r,{className:o,...e})=>Object.entries(e).every((([r,o])=>i[r]===o))?b(r,o):r),"");return b(r?.base,n,a,o?.className)},g=m({variants:r.variants}),x=new Map,S=r=>{const{useGetStylesCache:o}=e.getFeatureFlags();if(o){const o=function(r){const o=Object.create(null),e=Object.keys(r).sort();for(let t=0,n=e.length;t<n;t++){const n=e[t];o[n]=r[n]}return o}(u(r)),e=(new f.default).hash(JSON.stringify(o)).result();if(x.has(e))return x.get(e);const t=g(o);return x.set(e,t),t}return g(r)};function C(...r){return o=>r.forEach((r=>function(r,o){"function"==typeof r?r(o):null!=r&&(r.current=o)}(r,o)))}function w(){const r=a.forwardRef(((r,e)=>{const{children:n,...i}=r,s=a.Children.toArray(n),d=s.find(t);if(d){const r=d.props.children,t=s.map((o=>o===d?a.Children.count(r)>1?a.Children.only(null):a.isValidElement(r)?r.props.children:null:o));return l.jsx(o,{...i,ref:e,children:a.isValidElement(r)?a.cloneElement(r,void 0,t):null})}return l.jsx(o,{...i,ref:e,children:n})}));r.displayName="Slot";const o=a.forwardRef(((r,o)=>{const{children:e,...t}=r;return a.isValidElement(e)?a.cloneElement(e,{...n(t,e.props),ref:o?C(o,e.ref):e.ref}):a.Children.count(e)>1?a.Children.only(null):null}));o.displayName="SlotClone";const e=({children:r})=>r;function t(r){return a.isValidElement(r)&&r.type===e}function n(r,o){const e={...o};for(const t in o){const n=r[t],i=o[t];/^on[A-Z]/.test(t)?n&&i?e[t]=(...r)=>{i(...r),n(...r)}:n&&(e[t]=n):"style"===t&&(e[t]={...n,...i})}return{...r,...e}}return r}var y=w(),v=a.forwardRef((function({asChild:r,className:o,backgroundColor:e,borderRadius:t,borderTopStartRadius:n,borderTopEndRadius:i,borderBottomStartRadius:a,borderBottomEndRadius:s,borderColor:d,borderStartColor:c,borderEndColor:f,borderTopColor:p,borderBottomColor:u,borderWidth:h,borderVerticalWidth:b,borderHorizontalWidth:m,borderStartWidth:g,borderEndWidth:x,borderTopWidth:C,borderBottomWidth:w,alignContent:v,alignItems:E,alignSelf:W,flex:B,flexDirection:R,flexGrow:T,flexShrink:V,flexWrap:j,justifyContent:N,flexBasis:k,display:G="flex",overflow:z,overflowX:H,overflowY:q,position:I,spacing:F,spacingHorizontal:O,spacingVertical:D,spacingBottom:A,spacingEnd:
|
1
|
+
"use strict";var r=require("./chunk-6VQUZ237.cjs"),o=require("@yahoo/uds/fixtures"),e=require("@yahoo/uds/flags"),t=require("clsx"),n=require("imurmurhash"),i=require("tailwind-merge"),a=require("react"),l=require("react/jsx-runtime"),s=require("lodash-es");function d(r){return r&&r.__esModule?r:{default:r}}var c=d(t),f=d(n);/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */
|
2
|
+
function p(r){return"boolean"==typeof r?`${r}`:0===r?"0":r}function u(r){const o=Object.create(null),e=Object.keys(r);for(let t=0,n=e.length;t<n;t++){const n=e[t];void 0!==r[n]&&(o[n]=r[n])}return o}var h=i.extendTailwindMerge({extend:{theme:{borderColor:o.lineColors,borderWidth:o.borderWidths,borderRadius:o.borderRadii}},override:{classGroups:{"text-color":[{text:[...o.foregroundColors,...o.spectrumColors]}],"bg-color":[{bg:o.backgroundColors}],"font-family":[{font:["icons",...o.textVariants]}],leading:[{leading:o.textVariants}]},conflictingClassGroups:{}}}),b=(...r)=>{const o=c.default(r);return h(o)},m=r=>o=>{if(!r?.variants)return b(r?.base,o?.className);const{variants:e,defaultVariants:t}=r,n=Object.keys(e).map((r=>{const n=o?.[r],i=t?.[r],a=p(n)||p(i);return e[r][a]})),i={...t,...o&&u(o)},a=r?.compoundVariants?.reduce(((r,{className:o,...e})=>Object.entries(e).every((([r,o])=>i[r]===o))?b(r,o):r),"");return b(r?.base,n,a,o?.className)},g=m({variants:r.variants}),x=new Map,S=r=>{const{useGetStylesCache:o}=e.getFeatureFlags();if(o){const o=function(r){const o=Object.create(null),e=Object.keys(r).sort();for(let t=0,n=e.length;t<n;t++){const n=e[t];o[n]=r[n]}return o}(u(r)),e=(new f.default).hash(JSON.stringify(o)).result();if(x.has(e))return x.get(e);const t=g(o);return x.set(e,t),t}return g(r)};function C(...r){return o=>r.forEach((r=>function(r,o){"function"==typeof r?r(o):null!=r&&(r.current=o)}(r,o)))}function w(){const r=a.forwardRef(((r,e)=>{const{children:n,...i}=r,s=a.Children.toArray(n),d=s.find(t);if(d){const r=d.props.children,t=s.map((o=>o===d?a.Children.count(r)>1?a.Children.only(null):a.isValidElement(r)?r.props.children:null:o));return l.jsx(o,{...i,ref:e,children:a.isValidElement(r)?a.cloneElement(r,void 0,t):null})}return l.jsx(o,{...i,ref:e,children:n})}));r.displayName="Slot";const o=a.forwardRef(((r,o)=>{const{children:e,...t}=r;return a.isValidElement(e)?a.cloneElement(e,{...n(t,e.props),ref:o?C(o,e.ref):e.ref}):a.Children.count(e)>1?a.Children.only(null):null}));o.displayName="SlotClone";const e=({children:r})=>r;function t(r){return a.isValidElement(r)&&r.type===e}function n(r,o){const e={...o};for(const t in o){const n=r[t],i=o[t];/^on[A-Z]/.test(t)?n&&i?e[t]=(...r)=>{i(...r),n(...r)}:n&&(e[t]=n):"style"===t&&(e[t]={...n,...i})}return{...r,...e}}return r}var y=w(),v=a.forwardRef((function({asChild:r,className:o,backgroundColor:e,borderRadius:t,borderTopStartRadius:n,borderTopEndRadius:i,borderBottomStartRadius:a,borderBottomEndRadius:s,borderColor:d,borderStartColor:c,borderEndColor:f,borderTopColor:p,borderBottomColor:u,borderWidth:h,borderVerticalWidth:b,borderHorizontalWidth:m,borderStartWidth:g,borderEndWidth:x,borderTopWidth:C,borderBottomWidth:w,alignContent:v,alignItems:E,alignSelf:W,flex:B,flexDirection:R,flexGrow:T,flexShrink:V,flexWrap:j,justifyContent:N,flexBasis:k,display:G="flex",overflow:z,overflowX:H,overflowY:q,position:I,spacing:F,spacingHorizontal:O,spacingVertical:D,spacingBottom:A,spacingEnd:M,spacingStart:X,spacingTop:Y,offset:$,offsetVertical:_,offsetHorizontal:Z,offsetBottom:J,offsetEnd:P,offsetStart:Q,offsetTop:U,columnGap:K,rowGap:L,width:rr,height:or,dropShadow:er,insetShadow:tr,...nr},ir){const ar=S({backgroundColor:e,borderRadius:t,borderTopStartRadius:n,borderTopEndRadius:i,borderBottomStartRadius:a,borderBottomEndRadius:s,borderColor:d,borderStartColor:c,borderEndColor:f,borderTopColor:p,borderBottomColor:u,borderWidth:h,borderVerticalWidth:b,borderHorizontalWidth:m,borderStartWidth:g,borderEndWidth:x,borderTopWidth:C,borderBottomWidth:w,alignContent:v,alignItems:E,alignSelf:W,flex:B,flexDirection:R,flexGrow:T,flexShrink:V,flexWrap:j,justifyContent:N,flexBasis:k,display:G,overflow:z,overflowX:H,overflowY:q,position:I,spacing:F,spacingHorizontal:O,spacingVertical:D,spacingBottom:A,spacingEnd:M,spacingStart:X,spacingTop:Y,offset:$,offsetVertical:_,offsetHorizontal:Z,offsetBottom:J,offsetEnd:P,offsetStart:Q,offsetTop:U,columnGap:K,rowGap:L,width:rr,height:or,dropShadow:er,insetShadow:tr,className:o}),lr=r?y:"div";return l.jsx(lr,{className:ar,ref:ir,...nr})}));v.displayName="Box";var E=(r,o)=>((r,o)=>{const e=s.isFunction(o)?o:()=>o;return r.flatMap(((r,o)=>0!==o?[e(o),r]:[r]))})(a.Children.toArray(r),(r=>{const e=s.isFunction(o)?o(r):o;return a.isValidElement(e)?a.cloneElement(e,{...e.props,key:e.key??`interspersed-${r}`}):null})),W=a.forwardRef((function({gap:r,children:o,separator:e,...t},n){return l.jsx(v,{ref:n,flexDirection:"row",rowGap:r,columnGap:r,...t,children:e?E(o,e):o})}));W.displayName="HStack";var B=w(),R={display1:"h1",display2:"h1",display3:"h1",title1:"h1",title2:"h2",title3:"h3",title4:"h4",headline1:"h5",body1:"p",label1:"p",label2:"p",label3:"p",label4:"p",caption1:"p",caption2:"p",legal1:"p",inherit:"p"},T=a.forwardRef((function({className:r,asChild:o,color:e="primary",variant:t="body1",as:n=R[t],fontFamily:i,fontSize:a,fontWeight:s,lineHeight:d,textTransform:c,textAlign:f,backgroundColor:p,borderRadius:u,borderTopStartRadius:h,borderTopEndRadius:b,borderBottomStartRadius:m,borderBottomEndRadius:g,borderColor:x,borderStartColor:C,borderEndColor:w,borderTopColor:y,borderBottomColor:v,borderWidth:E,borderVerticalWidth:W,borderHorizontalWidth:T,borderStartWidth:V,borderEndWidth:j,borderTopWidth:N,borderBottomWidth:k,alignContent:G,alignItems:z,alignSelf:H,flex:q,flexDirection:I,flexGrow:F,flexShrink:O,flexWrap:D,justifyContent:A,flexBasis:M,display:X,overflow:Y,overflowX:$,overflowY:_,position:Z,spacing:J,spacingHorizontal:P,spacingVertical:Q,spacingBottom:U,spacingEnd:K,spacingStart:L,spacingTop:rr,offset:or,offsetVertical:er,offsetHorizontal:tr,offsetBottom:nr,offsetEnd:ir,offsetStart:ar,offsetTop:lr,columnGap:sr,rowGap:dr,...cr},fr){const pr={...e&&"inherit"!==e?{color:e}:{},...t&&"inherit"!==t?{fontFamily:i??t,fontSize:a??t,fontWeight:s??t,lineHeight:d??t,textTransform:c??t}:{},textAlign:f},ur=S({className:r,...pr,backgroundColor:p,borderRadius:u,borderTopStartRadius:h,borderTopEndRadius:b,borderBottomStartRadius:m,borderBottomEndRadius:g,borderColor:x,borderStartColor:C,borderEndColor:w,borderTopColor:y,borderBottomColor:v,borderWidth:E,borderVerticalWidth:W,borderHorizontalWidth:T,borderStartWidth:V,borderEndWidth:j,borderTopWidth:N,borderBottomWidth:k,alignContent:G,alignItems:z,alignSelf:H,flex:q,flexDirection:I,flexGrow:F,flexShrink:O,flexWrap:D,justifyContent:A,flexBasis:M,display:X,overflow:Y,overflowX:$,overflowY:_,position:Z,spacing:J,spacingHorizontal:P,spacingVertical:Q,spacingBottom:U,spacingEnd:K,spacingStart:L,spacingTop:rr,offset:or,offsetVertical:er,offsetHorizontal:tr,offsetBottom:nr,offsetEnd:ir,offsetStart:ar,offsetTop:lr,columnGap:sr,rowGap:dr}),hr=o?B:n;return l.jsx(hr,{className:ur,ref:fr,...cr})}));T.displayName="Text";var V=a.forwardRef((function({gap:r,children:o,separator:e,...t},n){return l.jsx(v,{ref:n,flexDirection:"column",columnGap:r,rowGap:r,...t,children:e?E(o,e):o})}));V.displayName="VStack";var j={sm:16,md:24,lg:32},N=a.forwardRef((function({name:r,size:o="md",variant:e="outline",color:t="primary",className:n,...i},a){const s=r.metadata?.variants??[],d=s.includes(e)?e:s[0]??"fill",c="multicolor"===d,f=S({flex:"none",color:c?void 0:t,className:b(n,!c&&"[&_path]:fill-current")}),p=j[o];return l.jsx("svg",{ref:a,xmlns:"http://www.w3.org/2000/svg",width:p,height:p,viewBox:`0 0 ${p} ${p}`,"aria-hidden":"true",focusable:"false",className:f,...i,children:l.jsx(r,{size:o,variant:d})})}));N.displayName="Icon";var k=a.memo((function({icon:r,iconProps:o,...e}){if(!r)return null;const t=o??{},n=r;if(n.metadata?.isSvgIcon)return l.jsx(N,{name:n,...t,...e});if(s.isFunction(r)){const o=r(t);return a.isValidElement(o)&&a.cloneElement(o,e)}return a.isValidElement(r)&&a.cloneElement(r,{...t,...r.props,...e})}));
|
3
3
|
/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */exports.Box=v,exports.HStack=W,exports.Icon=N,exports.IconSlot=k,exports.Text=T,exports.VStack=V,exports.createSlot=w,exports.cva=m,exports.cx=b,exports.getStyles=S;
|
package/dist/client/Menu.cjs
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
"use client";
|
2
|
-
"use strict";var r=require("../chunk-6FIPOCHY.cjs"),e=require("../chunk-IMP4Z4E6.cjs"),a=require("../chunk-M47X3QGG.cjs"),t=require("../chunk-NUEZVMWZ.cjs"),d=require("@ariakit/react/menu"),s=require("react"),n=require("use-sync-external-store/shim/index.js"),c=require("@yahoo/uds/fixtures"),i=require("motion/react"),o=require("react/jsx-runtime"),u=require("@ariakit/react");function l(r){return r&&r.__esModule?r:{default:r}}function x(r){if(r&&r.__esModule)return r;var e=Object.create(null);return r&&Object.keys(r).forEach((function(a){if("default"!==a){var t=Object.getOwnPropertyDescriptor(r,a);Object.defineProperty(e,a,t.get?t:{enumerable:!0,get:function(){return r[a]}})}})),e.default=r,Object.freeze(e)}var m=x(s),p=l(n),b={};function f(r){return r}function h(r,e){const a=r.__unstableInternals;return function(r,e){if(!r)throw new Error(e)}(a,"Invalid store"),a[e]}t.__export(b,{Content:()=>C,Divider:()=>j,Item:()=>V,ItemCheckbox:()=>E,Provider:()=>O,Trigger:()=>z,useMenuContext:()=>d.useMenuContext,useMenuStore:()=>d.useMenuStore,useStoreState:()=>u.useStoreState});var{useSyncExternalStore:_}=p.default;function v(r,e=f){const a=m.useCallback((e=>r?function(r,...e){if(r)return h(r,"subscribe")(...e)}(r,null,e):()=>{}),[r]),t=()=>{const a="string"==typeof e?e:null,t="function"==typeof e?e:null,d=null==r?void 0:r.getState();if(t)return t(d);var s,n;if(d&&(a&&(s=d,n=a,"function"==typeof Object.hasOwn?Object.hasOwn(s,n):Object.prototype.hasOwnProperty.call(s,n))))return d[a]};return _(a,t,t)}var g=i.m.create(a.VStack),I=5,y=.97,S={top:{x:0,y:I},bottom:{x:0,y:-5},left:{x:I,y:0},right:{x:-5,y:0}},w=r=>s.useMemo((()=>((r="bottom")=>{const[e="top"]=r?.split("-");return{closed:{...S[e],opacity:0,scale:y},open:{y:0,x:0,opacity:1,scale:1}}})(r)),[r]),C=s.forwardRef((function({gap:r,spacing:e,spacingBottom:t,spacingEnd:n,spacingStart:u,spacingTop:l,gutter:x="1",backgroundColor:m="primary",borderRadius:p="md",borderColor:b,borderWidth:f="thin",overflow:h,dropShadow:_="lg",className:I,sameWidth:y,focusable:S,children:C,portalElement:j,portal:k=!0,disableAutoBorderRadius:N,...M},V){const E=d.useMenuContext(),R=v(E,"open"),P=v(E,"mounted"),O=v(E,"currentPlacement"),z=v(E,"placement"),[A,q]=s.useState(O),[T,B]=s.useState(O);s.useEffect((()=>{z!==T&&B(z)}),[z]),s.useEffect((()=>{O!==T&&B(O)}),[O]),s.useEffect((()=>{P&&T!==A&&q(T)}),[P,T,A]);const H=s.useMemo((()=>R&&P?"open":"closed"),[R,P]),D=s.useMemo((()=>R?_:"none"),[R,_]),G=w(T),W=(({borderRadius:r,spacing:e})=>{if(void 0===e||"0"===e)switch(r){case"xs":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-xs)_-_var(--uds-border-width-thin))] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-xs)_-_var(--uds-border-width-thin))]";case"sm":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-sm)_-_var(--uds-border-width-thin))] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-sm)_-_var(--uds-border-width-thin))]";case"md":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-md)_-_var(--uds-border-width-thin))] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-md)_-_var(--uds-border-width-thin))]";case"lg":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-lg)_-_var(--uds-border-width-thin))] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-lg)_-_var(--uds-border-width-thin))]";case"xl":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-xl)_-_var(--uds-border-width-thin))] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-xl)_-_var(--uds-border-width-thin))]"}if("px"===e||"0.5"===e)switch(r){case"xs":return"[&>*:first-child]:rounded-t-[max(1px,calc(var(--uds-border-radius-xs)_-_2px))] [&>*:last-child]:rounded-b-[max(1px,calc(var(--uds-border-radius-xs)_-_2px))]";case"sm":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-sm)_-_2px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-sm)_-_2px))]";case"md":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-md)_-_2px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-md)_-_2px))]";case"lg":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-lg)_-_2px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-lg)_-_2px))]";case"xl":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-xl)_-_2px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-xl)_-_2px))]"}if("1"===e||"1.5"===e)switch(r){case"xs":return"[&>*:first-child]:rounded-t-[max(1px,calc(var(--uds-border-radius-xs)_-_4px))] [&>*:last-child]:rounded-b-[max(1px,calc(var(--uds-border-radius-xs)_-_4px))]";case"sm":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-sm)_-_4px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-sm)_-_4px))]";case"md":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-md)_-_4px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-md)_-_4px))]";case"lg":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-lg)_-_4px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-lg)_-_4px))]";case"xl":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-xl)_-_4px)] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-xl)_-_4px)]"}if("2"===e||"2.5"===e)switch(r){case"xs":return"[&>*:first-child]:rounded-t-[max(1px,calc(var(--uds-border-radius-xs)_-_8px))] [&>*:last-child]:rounded-b-[max(1px,calc(var(--uds-border-radius-xs)_-_8px))]";case"sm":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-sm)_-_8px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-sm)_-_8px))]";case"md":return"[&>*:first-child]:rounded-t-[max(4px,calc(var(--uds-border-radius-md)_-_8px))] [&>*:last-child]:rounded-b-[max(4px,calc(var(--uds-border-radius-md)_-_8px))]";case"lg":return"[&>*:first-child]:rounded-t-[max(4px,calc(var(--uds-border-radius-lg)_-_8px))] [&>*:last-child]:rounded-b-[max(4px,calc(var(--uds-border-radius-lg)_-_8px))]";case"xl":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-xl)_-_8px)] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-xl)_-_8px)]"}if("3"===e||"3.5"===e)switch(r){case"xs":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-xs)_-_6px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-xs)_-_6px))]";case"sm":return"[&>*:first-child]:rounded-t-[max(4px,calc(var(--uds-border-radius-sm)_-_6px))] [&>*:last-child]:rounded-b-[max(4px,calc(var(--uds-border-radius-sm)_-_6px))]";case"md":return"[&>*:first-child]:rounded-t-[max(6px,calc(var(--uds-border-radius-md)_-_6px))] [&>*:last-child]:rounded-b-[max(6px,calc(var(--uds-border-radius-md)_-_6px))]";case"lg":return"[&>*:first-child]:rounded-t-[max(6px,calc(var(--uds-border-radius-lg)_-_6px))] [&>*:last-child]:rounded-b-[max(6px,calc(var(--uds-border-radius-lg)_-_6px))]";case"xl":return"[&>*:first-child]:rounded-t-[min(20px,calc(var(--uds-border-radius-xl)_-_6px))] [&>*:last-child]:rounded-b-[min(20px,calc(var(--uds-border-radius-xl)_-_6px))]"}if("4"===e)switch(r){case"xs":return"[&>*:first-child]:rounded-t-[max(1px,calc(var(--uds-border-radius-xs)_-_16px))] [&>*:last-child]:rounded-b-[max(1px,calc(var(--uds-border-radius-xs)_-_16px))]";case"sm":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-sm)_-_16px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-sm)_-_16px))]";case"md":return"[&>*:first-child]:rounded-t-[max(4px,calc(var(--uds-border-radius-md)_-_16px))] [&>*:last-child]:rounded-b-[max(4px,calc(var(--uds-border-radius-md)_-_16px))]";case"lg":return"[&>*:first-child]:rounded-t-[max(6px,calc(var(--uds-border-radius-lg)_-_16px))] [&>*:last-child]:rounded-b-[max(6px,calc(var(--uds-border-radius-lg)_-_16px))]";case"xl":return"[&>*:first-child]:rounded-t-[max(6px,calc(var(--uds-border-radius-xl)_-_16px))] [&>*:last-child]:rounded-b-[max(6px,calc(var(--uds-border-radius-xl)_-_16px))]"}switch(r){case"xs":return"[&>*:first-child]:rounded-t-[max(1px,calc(var(--uds-border-radius-xs)_-_4px))] [&>*:last-child]:rounded-b-[max(1px,calc(var(--uds-border-radius-xs)_-_4px))]";case"sm":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-sm)_-_4px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-sm)_-_4px))]";case"md":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-md)_-_4px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-md)_-_4px))]";case"lg":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-lg)_-_4px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-lg)_-_4px))]";case"xl":return"[&>*:first-child]:rounded-t-[min(18px,calc(var(--uds-border-radius-xl)_-_4px))] [&>*:last-child]:rounded-b-[min(18px,calc(var(--uds-border-radius-xl)_-_4px))]"}})({borderRadius:p,spacing:e}),$=s.useMemo((()=>c.spacingMap[x]),[x]);return o.jsx(i.AnimatePresence,{initial:!1,children:o.jsx(d.Menu,{gutter:$,sameWidth:y,focusable:S,store:E,ref:V,portalElement:j,portal:k,...M,render:o.jsx(g,{backgroundColor:m,gap:r,spacing:e,spacingBottom:t,spacingEnd:n,spacingStart:u,spacingTop:l,borderRadius:p,borderColor:b,borderWidth:f,overflow:h,animate:H,variants:G,dropShadow:D,className:a.cx("uds-menu-content","transition-shadow","duration-200","ease-in-out","min-w-60","max-w-lg","max-h-96","overflow-auto","uds-ring","z-10","group",!N&&W,I),children:C})})})})),j=s.forwardRef((function({role:e="separator",contentPosition:t="start",gap:d="4",children:s,spacingVertical:n=(s?"2":"0"),spacingHorizontal:c=(s?"4":"0"),className:i,...u},l){const x={root:a.getStyles({menuDividerVariantRoot:"default",className:i}),text:a.getStyles({menuDividerVariantText:"default"})};return o.jsx(r.DividerInternal,{ref:l,role:e,variant:"inherit",contentPosition:t,gap:d,spacingVertical:n,spacingHorizontal:c,className:x.root,layerClassNames:x,...u,children:s})}));j.displayName="MenuDivider";var k="uds-menu-item",N={visible:{scale:1,opacity:1},hidden:{scale:.7,opacity:0}},M=s.forwardRef((function({spacing:r="0",spacingBottom:t,spacingEnd:d,spacingHorizontal:n="4",spacingStart:c,spacingTop:u,spacingVertical:l="3.5",columnGap:x="2",className:m,children:p,endIcon:b,startIcon:f,hideEndIcon:h,active:_,disabled:v,as:g,rootProps:I,name:y,alignItems:S="center",justifyContent:w="space-between",layerClassNames:C,...j},M){const V=s.Children.count(p)>1,E=(({active:r,disabled:e,className:t})=>a.cx(k,"focus-visible:text-brand","focus-visible:bg-brand-secondary","focus-visible:z-10","uds-ring","!-outline-offset-2",r&&["[&:not([aria-checked])]:cursor-default"],e&&"opacity-25 cursor-not-allowed","duration-20 transition-[font-variation-settings] ease-in-out","z-0",t))({active:_,disabled:v,className:m}),R=a.getStyles({className:a.cx(`${k}-content truncate`,C?.text),textAlign:"start",...V&&{columnGap:x,display:"flex",alignItems:"center",width:"full",justifyContent:"space-between"}}),P=s.useMemo((()=>({root:a.getStyles({menuSizeRoot:"default",className:a.cx(C?.root,E)}),startIcon:a.getStyles({menuSizeStartIcon:"default",className:C?.startIcon}),endIcon:a.getStyles({menuSizeEndIcon:"default",className:C?.endIcon})})),[C,E]);return o.jsx(a.Box,{asChild:!0,spacing:r,spacingBottom:t,spacingEnd:d,spacingHorizontal:n,spacingStart:c,spacingTop:u,spacingVertical:l,columnGap:x,className:P.root,alignItems:S,justifyContent:w,children:o.jsxs(g,{render:o.jsx(e.Pressable,{ref:M,...j}),name:y??"",disabled:v,...I,children:[o.jsxs(a.HStack,{gap:x,alignItems:"center",width:"full",children:[o.jsx(i.AnimatePresence,{initial:!1,children:f&&o.jsx(i.m.span,{variants:N,initial:"hidden",animate:"visible",exit:"hidden",className:"uds-start-icon",children:o.jsx(a.IconSlot,{icon:f,className:P.startIcon,iconProps:{size:"sm",variant:_?"fill":"outline",color:"current"}})})}),o.jsx("span",{className:R,children:p})]}),o.jsx(i.AnimatePresence,{initial:!1,mode:"popLayout",children:!h&&b&&o.jsx(i.m.span,{variants:N,initial:"hidden",animate:"visible",exit:"hidden",className:"uds-end-icon",children:o.jsx(a.IconSlot,{icon:b,className:P.endIcon,iconProps:{size:"sm",variant:_?"fill":"outline",color:"current"}})})})]})})})),V=s.forwardRef((function({active:r,...e},t){const s={root:a.getStyles({menuItemVariantRoot:"default",menuItemVariantActiveRoot:r?"on":"off"}),text:a.getStyles({menuItemVariantText:"default",menuItemVariantActiveText:r?"on":"off"}),startIcon:a.getStyles({menuItemVariantIcon:"default",menuItemVariantActiveIcon:r?"on":"off"})};return o.jsx(M,{ref:t,as:d.MenuItem,active:r,layerClassNames:s,...e})}));V.displayName="MenuItem";var E=s.forwardRef((function({name:r,endIcon:t=e.a,checked:n,defaultChecked:c,className:i,...l},x){const m=r,p=s.useRef(!1),b=d.useMenuContext(),f=u.useStoreState(b);s.useEffect((()=>{!p.current&&void 0!==c&&b&&(b.setValues((r=>({...r,[m]:c}))),p.current=!0)}),[b,c,m]);const h=s.useMemo((()=>{if(void 0!==n)return n;if(f?.items?.length){const r=f?.items.find((r=>r.element?.name===m));if(r?.element)return r.element.checked}const r=f?.values[m];return"boolean"==typeof r?r:c??!1}),[f?.items,f?.values,m,n,c]),_=s.useCallback((r=>{void 0===n&&b?.setValues((e=>({...e,[m]:r.target.checked})))}),[m,b,n]),v={root:a.getStyles({menuItemCheckboxVariantRoot:"default",menuItemCheckboxVariantActiveRoot:h?"on":"off"}),text:a.getStyles({menuItemCheckboxVariantText:"default",menuItemCheckboxVariantActiveText:h?"on":"off"}),startIcon:a.getStyles({menuItemCheckboxVariantStartIcon:"default",menuItemCheckboxVariantActiveStartIcon:h?"on":"off"}),endIcon:a.getStyles({menuItemCheckboxVariantEndIcon:"default",menuItemCheckboxVariantActiveEndIcon:h?"on":"off"})};return o.jsx(M,{ref:x,as:d.MenuItemCheckbox,hideEndIcon:!h,endIcon:t,active:h,className:a.cx("uds-menu-item-checkbox",i),layerClassNames:v,rootProps:{name:r,onChange:_,defaultChecked:c,checked:void 0!==n?n:void 0},...l})}));E.displayName="MenuItemCheckbox";var R=()=>{if("undefined"==typeof document)return!1;return"rtl"===getComputedStyle(document.documentElement).direction},P=r=>{const[e,a]=s.useState(R);return s.useEffect((()=>{if(r?.explicit)return void a(r.explicit);const e=(r=>{const e=new MutationObserver((e=>{e.some((r=>"attributes"===r.type&&"dir"===r.attributeName))&&r()}));return e.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]}),e})((()=>{a(R())}));return()=>e.disconnect()}),[r?.explicit]),e},O=function({placement:r="bottom",rtl:a,...t}){const s=P({explicit:a}),n=((r,e)=>{const a=e?.rtl;if("start"===r)return a?"right":"left";if("end"===r)return a?"left":"right";if(r?.includes("-")){const[e,t]=r.split("-");if(!("start"!==e&&"end"!==e||"top"!==t&&"bottom"!==t))return`${"start"===e?a?"right":"left":a?"left":"right"}-${"bottom"===t?"end":"start"}`;if("top"===e||"bottom"===e)return`${e}-${"start"===t?a?"end":"start":a?"start":"end"}`}return r})(r,{rtl:s});return o.jsx(e.SpringMotionConfig,{children:o.jsx(d.MenuProvider,{placement:n,rtl:s,...t})})},z=s.forwardRef((function({asChild:r,className:e,...t},n){const c=s.useRef(null),i=r?o.jsx(a.Box,{ref:c,className:"uds-ring h-fit w-fit"}):void 0,u=s.useCallback((()=>{const r=c.current?.firstChild;r instanceof HTMLElement&&"function"==typeof r.focus&&r.focus()}),[c]);return o.jsx(d.MenuButton,{onFocus:u,onFocusVisible:u,ref:n,render:i,className:a.cx("uds-menu-trigger",e),...t})}));exports.Menu=b;
|
2
|
+
"use strict";var r=require("../chunk-EQQKQR6E.cjs"),e=require("../chunk-NPEEFVTA.cjs"),a=require("../chunk-WHNTFODE.cjs"),t=require("../chunk-NUEZVMWZ.cjs"),d=require("@ariakit/react/menu"),s=require("react"),n=require("use-sync-external-store/shim/index.js"),c=require("@yahoo/uds/fixtures"),i=require("motion/react"),o=require("react/jsx-runtime"),u=require("@ariakit/react");function l(r){return r&&r.__esModule?r:{default:r}}function x(r){if(r&&r.__esModule)return r;var e=Object.create(null);return r&&Object.keys(r).forEach((function(a){if("default"!==a){var t=Object.getOwnPropertyDescriptor(r,a);Object.defineProperty(e,a,t.get?t:{enumerable:!0,get:function(){return r[a]}})}})),e.default=r,Object.freeze(e)}var m=x(s),p=l(n),b={};function f(r){return r}function h(r,e){const a=r.__unstableInternals;return function(r,e){if(!r)throw new Error(e)}(a,"Invalid store"),a[e]}t.__export(b,{Content:()=>C,Divider:()=>j,Item:()=>M,ItemCheckbox:()=>V,Provider:()=>O,Trigger:()=>z,useMenuContext:()=>d.useMenuContext,useMenuStore:()=>d.useMenuStore,useStoreState:()=>u.useStoreState});var{useSyncExternalStore:_}=p.default;function v(r,e=f){const a=m.useCallback((e=>r?function(r,...e){if(r)return h(r,"subscribe")(...e)}(r,null,e):()=>{}),[r]),t=()=>{const a="string"==typeof e?e:null,t="function"==typeof e?e:null,d=null==r?void 0:r.getState();if(t)return t(d);var s,n;if(d&&(a&&(s=d,n=a,"function"==typeof Object.hasOwn?Object.hasOwn(s,n):Object.prototype.hasOwnProperty.call(s,n))))return d[a]};return _(a,t,t)}var g=i.m.create(a.VStack),y=5,I=.97,S={top:{x:0,y:y},bottom:{x:0,y:-5},left:{x:y,y:0},right:{x:-5,y:0}},w=r=>s.useMemo((()=>((r="bottom")=>{const[e="top"]=r?.split("-");return{closed:{...S[e],opacity:0,scale:I},open:{y:0,x:0,opacity:1,scale:1}}})(r)),[r]),C=s.forwardRef((function({gap:r,spacing:e,spacingBottom:t,spacingEnd:n,spacingStart:u,spacingTop:l,gutter:x="1",backgroundColor:m="primary",borderRadius:p="md",borderColor:b,borderWidth:f="thin",overflow:h,dropShadow:_="lg",className:y,sameWidth:I,focusable:S,children:C,portalElement:j,portal:N=!0,disableAutoBorderRadius:k,...E},M){const V=d.useMenuContext(),R=v(V,"open"),P=v(V,"mounted"),O=v(V,"currentPlacement"),z=v(V,"placement"),[A,T]=s.useState(O),[q,B]=s.useState(O);s.useEffect((()=>{z!==q&&B(z)}),[z]),s.useEffect((()=>{O!==q&&B(O)}),[O]),s.useEffect((()=>{P&&q!==A&&T(q)}),[P,q,A]);const D=s.useMemo((()=>R&&P?"open":"closed"),[R,P]),H=s.useMemo((()=>R?_:"none"),[R,_]),W=w(q),F=(({borderRadius:r,spacing:e})=>{if(void 0===e||"0"===e)switch(r){case"xs":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-xs)_-_var(--uds-border-width-thin))] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-xs)_-_var(--uds-border-width-thin))]";case"sm":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-sm)_-_var(--uds-border-width-thin))] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-sm)_-_var(--uds-border-width-thin))]";case"md":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-md)_-_var(--uds-border-width-thin))] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-md)_-_var(--uds-border-width-thin))]";case"lg":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-lg)_-_var(--uds-border-width-thin))] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-lg)_-_var(--uds-border-width-thin))]";case"xl":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-xl)_-_var(--uds-border-width-thin))] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-xl)_-_var(--uds-border-width-thin))]"}if("px"===e||"0.5"===e)switch(r){case"xs":return"[&>*:first-child]:rounded-t-[max(1px,calc(var(--uds-border-radius-xs)_-_2px))] [&>*:last-child]:rounded-b-[max(1px,calc(var(--uds-border-radius-xs)_-_2px))]";case"sm":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-sm)_-_2px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-sm)_-_2px))]";case"md":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-md)_-_2px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-md)_-_2px))]";case"lg":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-lg)_-_2px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-lg)_-_2px))]";case"xl":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-xl)_-_2px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-xl)_-_2px))]"}if("1"===e||"1.5"===e)switch(r){case"xs":return"[&>*:first-child]:rounded-t-[max(1px,calc(var(--uds-border-radius-xs)_-_4px))] [&>*:last-child]:rounded-b-[max(1px,calc(var(--uds-border-radius-xs)_-_4px))]";case"sm":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-sm)_-_4px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-sm)_-_4px))]";case"md":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-md)_-_4px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-md)_-_4px))]";case"lg":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-lg)_-_4px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-lg)_-_4px))]";case"xl":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-xl)_-_4px)] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-xl)_-_4px)]"}if("2"===e||"2.5"===e)switch(r){case"xs":return"[&>*:first-child]:rounded-t-[max(1px,calc(var(--uds-border-radius-xs)_-_8px))] [&>*:last-child]:rounded-b-[max(1px,calc(var(--uds-border-radius-xs)_-_8px))]";case"sm":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-sm)_-_8px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-sm)_-_8px))]";case"md":return"[&>*:first-child]:rounded-t-[max(4px,calc(var(--uds-border-radius-md)_-_8px))] [&>*:last-child]:rounded-b-[max(4px,calc(var(--uds-border-radius-md)_-_8px))]";case"lg":return"[&>*:first-child]:rounded-t-[max(4px,calc(var(--uds-border-radius-lg)_-_8px))] [&>*:last-child]:rounded-b-[max(4px,calc(var(--uds-border-radius-lg)_-_8px))]";case"xl":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-xl)_-_8px)] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-xl)_-_8px)]"}if("3"===e||"3.5"===e)switch(r){case"xs":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-xs)_-_6px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-xs)_-_6px))]";case"sm":return"[&>*:first-child]:rounded-t-[max(4px,calc(var(--uds-border-radius-sm)_-_6px))] [&>*:last-child]:rounded-b-[max(4px,calc(var(--uds-border-radius-sm)_-_6px))]";case"md":return"[&>*:first-child]:rounded-t-[max(6px,calc(var(--uds-border-radius-md)_-_6px))] [&>*:last-child]:rounded-b-[max(6px,calc(var(--uds-border-radius-md)_-_6px))]";case"lg":return"[&>*:first-child]:rounded-t-[max(6px,calc(var(--uds-border-radius-lg)_-_6px))] [&>*:last-child]:rounded-b-[max(6px,calc(var(--uds-border-radius-lg)_-_6px))]";case"xl":return"[&>*:first-child]:rounded-t-[min(20px,calc(var(--uds-border-radius-xl)_-_6px))] [&>*:last-child]:rounded-b-[min(20px,calc(var(--uds-border-radius-xl)_-_6px))]"}if("4"===e)switch(r){case"xs":return"[&>*:first-child]:rounded-t-[max(1px,calc(var(--uds-border-radius-xs)_-_16px))] [&>*:last-child]:rounded-b-[max(1px,calc(var(--uds-border-radius-xs)_-_16px))]";case"sm":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-sm)_-_16px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-sm)_-_16px))]";case"md":return"[&>*:first-child]:rounded-t-[max(4px,calc(var(--uds-border-radius-md)_-_16px))] [&>*:last-child]:rounded-b-[max(4px,calc(var(--uds-border-radius-md)_-_16px))]";case"lg":return"[&>*:first-child]:rounded-t-[max(6px,calc(var(--uds-border-radius-lg)_-_16px))] [&>*:last-child]:rounded-b-[max(6px,calc(var(--uds-border-radius-lg)_-_16px))]";case"xl":return"[&>*:first-child]:rounded-t-[max(6px,calc(var(--uds-border-radius-xl)_-_16px))] [&>*:last-child]:rounded-b-[max(6px,calc(var(--uds-border-radius-xl)_-_16px))]"}switch(r){case"xs":return"[&>*:first-child]:rounded-t-[max(1px,calc(var(--uds-border-radius-xs)_-_4px))] [&>*:last-child]:rounded-b-[max(1px,calc(var(--uds-border-radius-xs)_-_4px))]";case"sm":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-sm)_-_4px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-sm)_-_4px))]";case"md":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-md)_-_4px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-md)_-_4px))]";case"lg":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-lg)_-_4px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-lg)_-_4px))]";case"xl":return"[&>*:first-child]:rounded-t-[min(18px,calc(var(--uds-border-radius-xl)_-_4px))] [&>*:last-child]:rounded-b-[min(18px,calc(var(--uds-border-radius-xl)_-_4px))]"}})({borderRadius:p,spacing:e}),$=s.useMemo((()=>c.spacingMap[x]),[x]);return o.jsx(i.AnimatePresence,{initial:!1,children:o.jsx(d.Menu,{gutter:$,sameWidth:I,focusable:S,store:V,ref:M,portalElement:j,portal:N,...E,render:o.jsx(g,{backgroundColor:m,gap:r,spacing:e,spacingBottom:t,spacingEnd:n,spacingStart:u,spacingTop:l,borderRadius:p,borderColor:b,borderWidth:f,overflow:h,animate:D,variants:W,dropShadow:H,className:a.cx("uds-menu-content","transition-shadow","duration-200","ease-in-out","min-w-60","max-w-lg","max-h-96","overflow-auto","uds-ring","z-10","group",!k&&F,y),children:C})})})})),j=s.forwardRef((function({role:e="separator",contentPosition:t="start",gap:d="4",children:s,spacingVertical:n=(s?"2":"0"),spacingHorizontal:c=(s?"4":"0"),className:i,...u},l){const x={root:a.getStyles({menuDividerVariantRoot:"default",className:i}),text:a.getStyles({menuDividerVariantText:"default"})};return o.jsx(r.DividerInternal,{ref:l,role:e,variant:"inherit",contentPosition:t,gap:d,spacingVertical:n,spacingHorizontal:c,className:x.root,layerClassNames:x,...u,children:s})}));j.displayName="MenuDivider";var N="uds-menu-item",k={visible:{scale:1,opacity:1},hidden:{scale:.7,opacity:0}},E=s.forwardRef((function({spacing:r="0",spacingBottom:t,spacingEnd:d,spacingHorizontal:n="4",spacingStart:c,spacingTop:u,spacingVertical:l="3.5",columnGap:x="2",className:m,children:p,endIcon:b,startIcon:f,hideEndIcon:h,active:_,disabled:v,as:g,rootProps:y,name:I,alignItems:S="center",justifyContent:w="space-between",layerClassNames:C,...j},E){const M=s.Children.count(p)>1,V=(({active:r,disabled:e,className:t})=>a.cx(N,"focus-visible:text-brand","focus-visible:bg-brand-secondary","focus-visible:z-10","uds-ring","!-outline-offset-2",r&&["[&:not([aria-checked])]:cursor-default"],e&&"opacity-25 cursor-not-allowed","duration-20 transition-[font-variation-settings] ease-in-out","z-0",t))({active:_,disabled:v,className:m}),R=a.getStyles({className:a.cx(`${N}-content truncate`,C?.text),textAlign:"start",...M&&{columnGap:x,display:"flex",alignItems:"center",width:"full",justifyContent:"space-between"}}),P=s.useMemo((()=>({root:a.getStyles({menuSizeRoot:"default",className:a.cx(C?.root,V)}),startIcon:a.getStyles({menuSizeStartIcon:"default",className:C?.startIcon}),endIcon:a.getStyles({menuSizeEndIcon:"default",className:C?.endIcon})})),[C,V]);return o.jsx(a.Box,{asChild:!0,spacing:r,spacingBottom:t,spacingEnd:d,spacingHorizontal:n,spacingStart:c,spacingTop:u,spacingVertical:l,columnGap:x,className:P.root,alignItems:S,justifyContent:w,children:o.jsxs(g,{render:o.jsx(e.Pressable,{ref:E,...j}),name:I??"",disabled:v,...y,children:[o.jsxs(a.HStack,{gap:x,alignItems:"center",width:"full",children:[o.jsx(i.AnimatePresence,{initial:!1,children:f&&o.jsx(i.m.span,{variants:k,initial:"hidden",animate:"visible",exit:"hidden",className:"uds-start-icon",children:o.jsx(a.IconSlot,{icon:f,className:P.startIcon,iconProps:{size:"sm",variant:_?"fill":"outline",color:"current"}})})}),o.jsx("span",{className:R,children:p})]}),o.jsx(i.AnimatePresence,{initial:!1,mode:"popLayout",children:!h&&b&&o.jsx(i.m.span,{variants:k,initial:"hidden",animate:"visible",exit:"hidden",className:"uds-end-icon",children:o.jsx(a.IconSlot,{icon:b,className:P.endIcon,iconProps:{size:"sm",variant:_?"fill":"outline",color:"current"}})})})]})})})),M=s.forwardRef((function({active:r,...e},t){const s={root:a.getStyles({menuItemVariantRoot:"default",menuItemVariantActiveRoot:r?"on":"off"}),text:a.getStyles({menuItemVariantText:"default",menuItemVariantActiveText:r?"on":"off"}),startIcon:a.getStyles({menuItemVariantIcon:"default",menuItemVariantActiveIcon:r?"on":"off"})};return o.jsx(E,{ref:t,as:d.MenuItem,active:r,layerClassNames:s,...e})}));M.displayName="MenuItem";var V=s.forwardRef((function({name:r,endIcon:t=e.a,checked:n,defaultChecked:c,className:i,...l},x){const m=r,p=s.useRef(!1),b=d.useMenuContext(),f=u.useStoreState(b);s.useEffect((()=>{!p.current&&void 0!==c&&b&&(b.setValues((r=>({...r,[m]:c}))),p.current=!0)}),[b,c,m]);const h=s.useMemo((()=>{if(void 0!==n)return n;if(f?.items?.length){const r=f?.items.find((r=>r.element?.name===m));if(r?.element)return r.element.checked}const r=f?.values[m];return"boolean"==typeof r?r:c??!1}),[f?.items,f?.values,m,n,c]),_=s.useCallback((r=>{void 0===n&&b?.setValues((e=>({...e,[m]:r.target.checked})))}),[m,b,n]),v={root:a.getStyles({menuItemCheckboxVariantRoot:"default",menuItemCheckboxVariantActiveRoot:h?"on":"off"}),text:a.getStyles({menuItemCheckboxVariantText:"default",menuItemCheckboxVariantActiveText:h?"on":"off"}),startIcon:a.getStyles({menuItemCheckboxVariantStartIcon:"default",menuItemCheckboxVariantActiveStartIcon:h?"on":"off"}),endIcon:a.getStyles({menuItemCheckboxVariantEndIcon:"default",menuItemCheckboxVariantActiveEndIcon:h?"on":"off"})};return o.jsx(E,{ref:x,as:d.MenuItemCheckbox,hideEndIcon:!h,endIcon:t,active:h,className:a.cx("uds-menu-item-checkbox",i),layerClassNames:v,rootProps:{name:r,onChange:_,defaultChecked:c,checked:void 0!==n?n:void 0},...l})}));V.displayName="MenuItemCheckbox";var R=()=>{if("undefined"==typeof document)return!1;return"rtl"===getComputedStyle(document.documentElement).direction},P=r=>{const[e,a]=s.useState(R);return s.useEffect((()=>{if(r?.explicit)return void a(r.explicit);const e=(r=>{const e=new MutationObserver((e=>{e.some((r=>"attributes"===r.type&&"dir"===r.attributeName))&&r()}));return e.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]}),e})((()=>{a(R())}));return()=>e.disconnect()}),[r?.explicit]),e},O=function({placement:r="bottom",rtl:a,...t}){const s=P({explicit:a}),n=((r,e)=>{const a=e?.rtl;if("start"===r)return a?"right":"left";if("end"===r)return a?"left":"right";if(r?.includes("-")){const[e,t]=r.split("-");if(!("start"!==e&&"end"!==e||"top"!==t&&"bottom"!==t))return`${"start"===e?a?"right":"left":a?"left":"right"}-${"bottom"===t?"end":"start"}`;if("top"===e||"bottom"===e)return`${e}-${"start"===t?a?"end":"start":a?"start":"end"}`}return r})(r,{rtl:s});return o.jsx(e.SpringMotionConfig,{children:o.jsx(d.MenuProvider,{placement:n,rtl:s,...t})})},z=s.forwardRef((function({asChild:r,className:e,...t},n){const c=s.useRef(null),i=r?o.jsx(a.Box,{ref:c,className:"uds-ring h-fit w-fit"}):void 0,u=s.useCallback((()=>{const r=c.current?.firstChild;r instanceof HTMLElement&&"function"==typeof r.focus&&r.focus()}),[c]);return o.jsx(d.MenuButton,{onFocus:u,onFocusVisible:u,ref:n,render:i,className:a.cx("uds-menu-trigger",e),...t})}));exports.Menu=b;
|
package/dist/client/Menu.d.cts
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
import * as react from 'react';
|
2
2
|
import { AriaRole, HTMLAttributes, PropsWithChildren } from 'react';
|
3
3
|
import { MenuProps, MenuItemProps as MenuItemProps$1, MenuItemCheckboxProps as MenuItemCheckboxProps$1, MenuProviderProps as MenuProviderProps$1, MenuButtonProps, useMenuContext, useMenuStore } from '@ariakit/react/menu';
|
4
|
-
import { j as SpacingAlias, k as UniversalMenuItemProps } from '../types-
|
5
|
-
import { V as VStackProps, D as DividerProps, B as BoxProps } from '../VStack-
|
6
|
-
import { P as PressableProps } from '../Pressable-
|
4
|
+
import { j as SpacingAlias, k as UniversalMenuItemProps } from '../types-DGsZamYF.cjs';
|
5
|
+
import { V as VStackProps, D as DividerProps, B as BoxProps } from '../VStack-CwwLkabJ.cjs';
|
6
|
+
import { P as PressableProps } from '../Pressable-Bav3ibvU.cjs';
|
7
7
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
8
8
|
import { useStoreState } from '@ariakit/react';
|
9
9
|
import '@yahoo/uds-icons/types';
|
package/dist/client/Menu.d.ts
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
import * as react from 'react';
|
2
2
|
import { AriaRole, HTMLAttributes, PropsWithChildren } from 'react';
|
3
3
|
import { MenuProps, MenuItemProps as MenuItemProps$1, MenuItemCheckboxProps as MenuItemCheckboxProps$1, MenuProviderProps as MenuProviderProps$1, MenuButtonProps, useMenuContext, useMenuStore } from '@ariakit/react/menu';
|
4
|
-
import { j as SpacingAlias, k as UniversalMenuItemProps } from '../types-
|
5
|
-
import { V as VStackProps, D as DividerProps, B as BoxProps } from '../VStack
|
6
|
-
import { P as PressableProps } from '../Pressable-
|
4
|
+
import { j as SpacingAlias, k as UniversalMenuItemProps } from '../types-DGsZamYF.js';
|
5
|
+
import { V as VStackProps, D as DividerProps, B as BoxProps } from '../VStack-Cf8pnG9j.js';
|
6
|
+
import { P as PressableProps } from '../Pressable-Bp9saCXS.js';
|
7
7
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
8
8
|
import { useStoreState } from '@ariakit/react';
|
9
9
|
import '@yahoo/uds-icons/types';
|
package/dist/client/Menu.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
"use client";
|
2
|
-
import{DividerInternal as r}from"../chunk-
|
3
|
-
var z={};function A(r){return r}function M(r,e){const a=r.__unstableInternals;return function(r,e){if(!r)throw new Error(e)}(a,"Invalid store"),a[e]}u(z,{Content:()=>D,Divider:()=>U,Item:()=>L,ItemCheckbox:()=>X,Provider:()=>J,Trigger:()=>Q,useMenuContext:()=>m,useMenuStore:()=>l,useStoreState:()=>j});var{useSyncExternalStore:P}=k;function O(r,e=A){const a=_.useCallback((e=>r?function(r,...e){if(r)return M(r,"subscribe")(...e)}(r,null,e):()=>{}),[r]),d=()=>{const a="string"==typeof e?e:null,d="function"==typeof e?e:null,t=null==r?void 0:r.getState();if(d)return d(t);var s,i;if(t&&(a&&(s=t,i=a,"function"==typeof Object.hasOwn?Object.hasOwn(s,i):Object.prototype.hasOwnProperty.call(s,i))))return t[a]};return P(a,d,d)}var W=S.create(t),B=5,G=.97,H={top:{x:0,y:B},bottom:{x:0,y:-5},left:{x:B,y:0},right:{x:-5,y:0}},$=r=>w((()=>((r="bottom")=>{const[e="top"]=r?.split("-");return{closed:{...H[e],opacity:0,scale:G},open:{y:0,x:0,opacity:1,scale:1}}})(r)),[r]),D=v((function({gap:r,spacing:e,spacingBottom:a,spacingEnd:d,spacingStart:t,spacingTop:i,gutter:n="1",backgroundColor:c="primary",borderRadius:o="md",borderColor:u,borderWidth:l="thin",overflow:p,dropShadow:b="lg",className:h,sameWidth:f,focusable:_,children:v,portalElement:y,portal:C=!0,disableAutoBorderRadius:N,...k},S){const T=m(),j=O(T,"open"),z=O(T,"mounted"),A=O(T,"currentPlacement"),M=O(T,"placement"),[P,B]=g(A),[G,H]=g(A);I((()=>{M!==G&&H(M)}),[M]),I((()=>{A!==G&&H(A)}),[A]),I((()=>{z&&G!==P&&B(G)}),[z,G,P]);const D=w((()=>j&&z?"open":"closed"),[j,z]),U=w((()=>j?b:"none"),[j,b]),F=$(G),Z=(({borderRadius:r,spacing:e})=>{if(void 0===e||"0"===e)switch(r){case"xs":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-xs)_-_var(--uds-border-width-thin))] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-xs)_-_var(--uds-border-width-thin))]";case"sm":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-sm)_-_var(--uds-border-width-thin))] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-sm)_-_var(--uds-border-width-thin))]";case"md":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-md)_-_var(--uds-border-width-thin))] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-md)_-_var(--uds-border-width-thin))]";case"lg":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-lg)_-_var(--uds-border-width-thin))] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-lg)_-_var(--uds-border-width-thin))]";case"xl":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-xl)_-_var(--uds-border-width-thin))] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-xl)_-_var(--uds-border-width-thin))]"}if("px"===e||"0.5"===e)switch(r){case"xs":return"[&>*:first-child]:rounded-t-[max(1px,calc(var(--uds-border-radius-xs)_-_2px))] [&>*:last-child]:rounded-b-[max(1px,calc(var(--uds-border-radius-xs)_-_2px))]";case"sm":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-sm)_-_2px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-sm)_-_2px))]";case"md":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-md)_-_2px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-md)_-_2px))]";case"lg":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-lg)_-_2px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-lg)_-_2px))]";case"xl":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-xl)_-_2px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-xl)_-_2px))]"}if("1"===e||"1.5"===e)switch(r){case"xs":return"[&>*:first-child]:rounded-t-[max(1px,calc(var(--uds-border-radius-xs)_-_4px))] [&>*:last-child]:rounded-b-[max(1px,calc(var(--uds-border-radius-xs)_-_4px))]";case"sm":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-sm)_-_4px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-sm)_-_4px))]";case"md":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-md)_-_4px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-md)_-_4px))]";case"lg":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-lg)_-_4px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-lg)_-_4px))]";case"xl":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-xl)_-_4px)] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-xl)_-_4px)]"}if("2"===e||"2.5"===e)switch(r){case"xs":return"[&>*:first-child]:rounded-t-[max(1px,calc(var(--uds-border-radius-xs)_-_8px))] [&>*:last-child]:rounded-b-[max(1px,calc(var(--uds-border-radius-xs)_-_8px))]";case"sm":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-sm)_-_8px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-sm)_-_8px))]";case"md":return"[&>*:first-child]:rounded-t-[max(4px,calc(var(--uds-border-radius-md)_-_8px))] [&>*:last-child]:rounded-b-[max(4px,calc(var(--uds-border-radius-md)_-_8px))]";case"lg":return"[&>*:first-child]:rounded-t-[max(4px,calc(var(--uds-border-radius-lg)_-_8px))] [&>*:last-child]:rounded-b-[max(4px,calc(var(--uds-border-radius-lg)_-_8px))]";case"xl":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-xl)_-_8px)] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-xl)_-_8px)]"}if("3"===e||"3.5"===e)switch(r){case"xs":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-xs)_-_6px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-xs)_-_6px))]";case"sm":return"[&>*:first-child]:rounded-t-[max(4px,calc(var(--uds-border-radius-sm)_-_6px))] [&>*:last-child]:rounded-b-[max(4px,calc(var(--uds-border-radius-sm)_-_6px))]";case"md":return"[&>*:first-child]:rounded-t-[max(6px,calc(var(--uds-border-radius-md)_-_6px))] [&>*:last-child]:rounded-b-[max(6px,calc(var(--uds-border-radius-md)_-_6px))]";case"lg":return"[&>*:first-child]:rounded-t-[max(6px,calc(var(--uds-border-radius-lg)_-_6px))] [&>*:last-child]:rounded-b-[max(6px,calc(var(--uds-border-radius-lg)_-_6px))]";case"xl":return"[&>*:first-child]:rounded-t-[min(20px,calc(var(--uds-border-radius-xl)_-_6px))] [&>*:last-child]:rounded-b-[min(20px,calc(var(--uds-border-radius-xl)_-_6px))]"}if("4"===e)switch(r){case"xs":return"[&>*:first-child]:rounded-t-[max(1px,calc(var(--uds-border-radius-xs)_-_16px))] [&>*:last-child]:rounded-b-[max(1px,calc(var(--uds-border-radius-xs)_-_16px))]";case"sm":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-sm)_-_16px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-sm)_-_16px))]";case"md":return"[&>*:first-child]:rounded-t-[max(4px,calc(var(--uds-border-radius-md)_-_16px))] [&>*:last-child]:rounded-b-[max(4px,calc(var(--uds-border-radius-md)_-_16px))]";case"lg":return"[&>*:first-child]:rounded-t-[max(6px,calc(var(--uds-border-radius-lg)_-_16px))] [&>*:last-child]:rounded-b-[max(6px,calc(var(--uds-border-radius-lg)_-_16px))]";case"xl":return"[&>*:first-child]:rounded-t-[max(6px,calc(var(--uds-border-radius-xl)_-_16px))] [&>*:last-child]:rounded-b-[max(6px,calc(var(--uds-border-radius-xl)_-_16px))]"}switch(r){case"xs":return"[&>*:first-child]:rounded-t-[max(1px,calc(var(--uds-border-radius-xs)_-_4px))] [&>*:last-child]:rounded-b-[max(1px,calc(var(--uds-border-radius-xs)_-_4px))]";case"sm":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-sm)_-_4px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-sm)_-_4px))]";case"md":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-md)_-_4px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-md)_-_4px))]";case"lg":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-lg)_-_4px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-lg)_-_4px))]";case"xl":return"[&>*:first-child]:rounded-t-[min(18px,calc(var(--uds-border-radius-xl)_-_4px))] [&>*:last-child]:rounded-b-[min(18px,calc(var(--uds-border-radius-xl)_-_4px))]"}})({borderRadius:o,spacing:e}),K=w((()=>V[n]),[n]);return R(E,{initial:!1,children:R(x,{gutter:K,sameWidth:f,focusable:_,store:T,ref:S,portalElement:y,portal:C,...k,render:R(W,{backgroundColor:c,gap:r,spacing:e,spacingBottom:a,spacingEnd:d,spacingStart:t,spacingTop:i,borderRadius:o,borderColor:u,borderWidth:l,overflow:p,animate:D,variants:F,dropShadow:U,className:s("uds-menu-content","transition-shadow","duration-200","ease-in-out","min-w-60","max-w-lg","max-h-96","overflow-auto","uds-ring","z-10","group",!N&&Z,h),children:v})})})})),U=v((function({role:e="separator",contentPosition:a="start",gap:d="4",children:t,spacingVertical:s=(t?"2":"0"),spacingHorizontal:n=(t?"4":"0"),className:c,...o},u){const l={root:i({menuDividerVariantRoot:"default",className:c}),text:i({menuDividerVariantText:"default"})};return R(r,{ref:u,role:e,variant:"inherit",contentPosition:a,gap:d,spacingVertical:s,spacingHorizontal:n,className:l.root,layerClassNames:l,...o,children:t})}));U.displayName="MenuDivider";var F="uds-menu-item",Z={visible:{scale:1,opacity:1},hidden:{scale:.7,opacity:0}},K=v((function({spacing:r="0",spacingBottom:a,spacingEnd:d,spacingHorizontal:t="4",spacingStart:u,spacingTop:l,spacingVertical:m="3.5",columnGap:x="2",className:p,children:b,endIcon:h,startIcon:f,hideEndIcon:_,active:v,disabled:g,as:I,rootProps:C,name:N,alignItems:k="center",justifyContent:V="space-between",layerClassNames:j,...z},A){const M=y.count(b)>1,P=(({active:r,disabled:e,className:a})=>s(F,"focus-visible:text-brand","focus-visible:bg-brand-secondary","focus-visible:z-10","uds-ring","!-outline-offset-2",r&&["[&:not([aria-checked])]:cursor-default"],e&&"opacity-25 cursor-not-allowed","duration-20 transition-[font-variation-settings] ease-in-out","z-0",a))({active:v,disabled:g,className:p}),O=i({className:s(`${F}-content truncate`,j?.text),textAlign:"start",...M&&{columnGap:x,display:"flex",alignItems:"center",width:"full",justifyContent:"space-between"}}),W=w((()=>({root:i({menuSizeRoot:"default",className:s(j?.root,P)}),startIcon:i({menuSizeStartIcon:"default",className:j?.startIcon}),endIcon:i({menuSizeEndIcon:"default",className:j?.endIcon})})),[j,P]);return R(n,{asChild:!0,spacing:r,spacingBottom:a,spacingEnd:d,spacingHorizontal:t,spacingStart:u,spacingTop:l,spacingVertical:m,columnGap:x,className:W.root,alignItems:k,justifyContent:V,children:T(I,{render:R(e,{ref:A,...z}),name:N??"",disabled:g,...C,children:[T(c,{gap:x,alignItems:"center",width:"full",children:[R(E,{initial:!1,children:f&&R(S.span,{variants:Z,initial:"hidden",animate:"visible",exit:"hidden",className:"uds-start-icon",children:R(o,{icon:f,className:W.startIcon,iconProps:{size:"sm",variant:v?"fill":"outline",color:"current"}})})}),R("span",{className:O,children:b})]}),R(E,{initial:!1,mode:"popLayout",children:!_&&h&&R(S.span,{variants:Z,initial:"hidden",animate:"visible",exit:"hidden",className:"uds-end-icon",children:R(o,{icon:h,className:W.endIcon,iconProps:{size:"sm",variant:v?"fill":"outline",color:"current"}})})})]})})})),L=v((function({active:r,...e},a){const d={root:i({menuItemVariantRoot:"default",menuItemVariantActiveRoot:r?"on":"off"}),text:i({menuItemVariantText:"default",menuItemVariantActiveText:r?"on":"off"}),startIcon:i({menuItemVariantIcon:"default",menuItemVariantActiveIcon:r?"on":"off"})};return R(K,{ref:a,as:p,active:r,layerClassNames:d,...e})}));L.displayName="MenuItem";var X=v((function({name:r,endIcon:e=a,checked:d,defaultChecked:t,className:n,...c},o){const u=r,l=C(!1),x=m(),p=j(x);I((()=>{!l.current&&void 0!==t&&x&&(x.setValues((r=>({...r,[u]:t}))),l.current=!0)}),[x,t,u]);const h=w((()=>{if(void 0!==d)return d;if(p?.items?.length){const r=p?.items.find((r=>r.element?.name===u));if(r?.element)return r.element.checked}const r=p?.values[u];return"boolean"==typeof r?r:t??!1}),[p?.items,p?.values,u,d,t]),f=N((r=>{void 0===d&&x?.setValues((e=>({...e,[u]:r.target.checked})))}),[u,x,d]),_={root:i({menuItemCheckboxVariantRoot:"default",menuItemCheckboxVariantActiveRoot:h?"on":"off"}),text:i({menuItemCheckboxVariantText:"default",menuItemCheckboxVariantActiveText:h?"on":"off"}),startIcon:i({menuItemCheckboxVariantStartIcon:"default",menuItemCheckboxVariantActiveStartIcon:h?"on":"off"}),endIcon:i({menuItemCheckboxVariantEndIcon:"default",menuItemCheckboxVariantActiveEndIcon:h?"on":"off"})};return R(K,{ref:o,as:b,hideEndIcon:!h,endIcon:e,active:h,className:s("uds-menu-item-checkbox",n),layerClassNames:_,rootProps:{name:r,onChange:f,defaultChecked:t,checked:void 0!==d?d:void 0},...c})}));X.displayName="MenuItemCheckbox";var Y=()=>{if("undefined"==typeof document)return!1;return"rtl"===getComputedStyle(document.documentElement).direction},q=r=>{const[e,a]=g(Y);return I((()=>{if(r?.explicit)return void a(r.explicit);const e=(r=>{const e=new MutationObserver((e=>{e.some((r=>"attributes"===r.type&&"dir"===r.attributeName))&&r()}));return e.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]}),e})((()=>{a(Y())}));return()=>e.disconnect()}),[r?.explicit]),e},J=function({placement:r="bottom",rtl:e,...a}){const t=q({explicit:e}),s=((r,e)=>{const a=e?.rtl;if("start"===r)return a?"right":"left";if("end"===r)return a?"left":"right";if(r?.includes("-")){const[e,d]=r.split("-");if(!("start"!==e&&"end"!==e||"top"!==d&&"bottom"!==d))return`${"start"===e?a?"right":"left":a?"left":"right"}-${"bottom"===d?"end":"start"}`;if("top"===e||"bottom"===e)return`${e}-${"start"===d?a?"end":"start":a?"start":"end"}`}return r})(r,{rtl:t});return R(d,{children:R(h,{placement:s,rtl:t,...a})})},Q=v((function({asChild:r,className:e,...a},d){const t=C(null),i=r?R(n,{ref:t,className:"uds-ring h-fit w-fit"}):void 0,c=N((()=>{const r=t.current?.firstChild;r instanceof HTMLElement&&"function"==typeof r.focus&&r.focus()}),[t]);return R(f,{onFocus:c,onFocusVisible:c,ref:d,render:i,className:s("uds-menu-trigger",e),...a})}));export{z as Menu};
|
2
|
+
import{DividerInternal as r}from"../chunk-CD5NEURX.js";import{Pressable as e,a,SpringMotionConfig as d}from"../chunk-75ZIVS4E.js";import{VStack as t,cx as s,getStyles as i,Box as n,HStack as c,IconSlot as o}from"../chunk-VFP434PO.js";import{__export as u}from"../chunk-S5UKKXRV.js";import{useMenuStore as l,useMenuContext as m,Menu as x,MenuItem as p,MenuItemCheckbox as b,MenuProvider as h,MenuButton as f}from"@ariakit/react/menu";import*as _ from"react";import{forwardRef as v,useState as g,useEffect as I,useMemo as w,Children as y,useRef as C,useCallback as N}from"react";import k from"use-sync-external-store/shim/index.js";import{spacingMap as V}from"@yahoo/uds/fixtures";import{m as S,AnimatePresence as E}from"motion/react";import{jsx as R,jsxs as j}from"react/jsx-runtime";import{useStoreState as z}from"@ariakit/react";/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */
|
3
|
+
var P={};function M(r){return r}function T(r,e){const a=r.__unstableInternals;return function(r,e){if(!r)throw new Error(e)}(a,"Invalid store"),a[e]}u(P,{Content:()=>W,Divider:()=>G,Item:()=>X,ItemCheckbox:()=>Z,Provider:()=>Q,Trigger:()=>Y,useMenuContext:()=>m,useMenuStore:()=>l,useStoreState:()=>z});var{useSyncExternalStore:A}=k;function O(r,e=M){const a=_.useCallback((e=>r?function(r,...e){if(r)return T(r,"subscribe")(...e)}(r,null,e):()=>{}),[r]),d=()=>{const a="string"==typeof e?e:null,d="function"==typeof e?e:null,t=null==r?void 0:r.getState();if(d)return d(t);var s,i;if(t&&(a&&(s=t,i=a,"function"==typeof Object.hasOwn?Object.hasOwn(s,i):Object.prototype.hasOwnProperty.call(s,i))))return t[a]};return A(a,d,d)}var B=S.create(t),D=5,H=.97,$={top:{x:0,y:D},bottom:{x:0,y:-5},left:{x:D,y:0},right:{x:-5,y:0}},F=r=>w((()=>((r="bottom")=>{const[e="top"]=r?.split("-");return{closed:{...$[e],opacity:0,scale:H},open:{y:0,x:0,opacity:1,scale:1}}})(r)),[r]),W=v((function({gap:r,spacing:e,spacingBottom:a,spacingEnd:d,spacingStart:t,spacingTop:i,gutter:n="1",backgroundColor:c="primary",borderRadius:o="md",borderColor:u,borderWidth:l="thin",overflow:p,dropShadow:b="lg",className:h,sameWidth:f,focusable:_,children:v,portalElement:y,portal:C=!0,disableAutoBorderRadius:N,...k},S){const j=m(),z=O(j,"open"),P=O(j,"mounted"),M=O(j,"currentPlacement"),T=O(j,"placement"),[A,D]=g(M),[H,$]=g(M);I((()=>{T!==H&&$(T)}),[T]),I((()=>{M!==H&&$(M)}),[M]),I((()=>{P&&H!==A&&D(H)}),[P,H,A]);const W=w((()=>z&&P?"open":"closed"),[z,P]),G=w((()=>z?b:"none"),[z,b]),K=F(H),L=(({borderRadius:r,spacing:e})=>{if(void 0===e||"0"===e)switch(r){case"xs":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-xs)_-_var(--uds-border-width-thin))] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-xs)_-_var(--uds-border-width-thin))]";case"sm":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-sm)_-_var(--uds-border-width-thin))] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-sm)_-_var(--uds-border-width-thin))]";case"md":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-md)_-_var(--uds-border-width-thin))] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-md)_-_var(--uds-border-width-thin))]";case"lg":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-lg)_-_var(--uds-border-width-thin))] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-lg)_-_var(--uds-border-width-thin))]";case"xl":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-xl)_-_var(--uds-border-width-thin))] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-xl)_-_var(--uds-border-width-thin))]"}if("px"===e||"0.5"===e)switch(r){case"xs":return"[&>*:first-child]:rounded-t-[max(1px,calc(var(--uds-border-radius-xs)_-_2px))] [&>*:last-child]:rounded-b-[max(1px,calc(var(--uds-border-radius-xs)_-_2px))]";case"sm":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-sm)_-_2px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-sm)_-_2px))]";case"md":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-md)_-_2px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-md)_-_2px))]";case"lg":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-lg)_-_2px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-lg)_-_2px))]";case"xl":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-xl)_-_2px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-xl)_-_2px))]"}if("1"===e||"1.5"===e)switch(r){case"xs":return"[&>*:first-child]:rounded-t-[max(1px,calc(var(--uds-border-radius-xs)_-_4px))] [&>*:last-child]:rounded-b-[max(1px,calc(var(--uds-border-radius-xs)_-_4px))]";case"sm":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-sm)_-_4px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-sm)_-_4px))]";case"md":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-md)_-_4px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-md)_-_4px))]";case"lg":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-lg)_-_4px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-lg)_-_4px))]";case"xl":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-xl)_-_4px)] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-xl)_-_4px)]"}if("2"===e||"2.5"===e)switch(r){case"xs":return"[&>*:first-child]:rounded-t-[max(1px,calc(var(--uds-border-radius-xs)_-_8px))] [&>*:last-child]:rounded-b-[max(1px,calc(var(--uds-border-radius-xs)_-_8px))]";case"sm":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-sm)_-_8px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-sm)_-_8px))]";case"md":return"[&>*:first-child]:rounded-t-[max(4px,calc(var(--uds-border-radius-md)_-_8px))] [&>*:last-child]:rounded-b-[max(4px,calc(var(--uds-border-radius-md)_-_8px))]";case"lg":return"[&>*:first-child]:rounded-t-[max(4px,calc(var(--uds-border-radius-lg)_-_8px))] [&>*:last-child]:rounded-b-[max(4px,calc(var(--uds-border-radius-lg)_-_8px))]";case"xl":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-xl)_-_8px)] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-xl)_-_8px)]"}if("3"===e||"3.5"===e)switch(r){case"xs":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-xs)_-_6px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-xs)_-_6px))]";case"sm":return"[&>*:first-child]:rounded-t-[max(4px,calc(var(--uds-border-radius-sm)_-_6px))] [&>*:last-child]:rounded-b-[max(4px,calc(var(--uds-border-radius-sm)_-_6px))]";case"md":return"[&>*:first-child]:rounded-t-[max(6px,calc(var(--uds-border-radius-md)_-_6px))] [&>*:last-child]:rounded-b-[max(6px,calc(var(--uds-border-radius-md)_-_6px))]";case"lg":return"[&>*:first-child]:rounded-t-[max(6px,calc(var(--uds-border-radius-lg)_-_6px))] [&>*:last-child]:rounded-b-[max(6px,calc(var(--uds-border-radius-lg)_-_6px))]";case"xl":return"[&>*:first-child]:rounded-t-[min(20px,calc(var(--uds-border-radius-xl)_-_6px))] [&>*:last-child]:rounded-b-[min(20px,calc(var(--uds-border-radius-xl)_-_6px))]"}if("4"===e)switch(r){case"xs":return"[&>*:first-child]:rounded-t-[max(1px,calc(var(--uds-border-radius-xs)_-_16px))] [&>*:last-child]:rounded-b-[max(1px,calc(var(--uds-border-radius-xs)_-_16px))]";case"sm":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-sm)_-_16px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-sm)_-_16px))]";case"md":return"[&>*:first-child]:rounded-t-[max(4px,calc(var(--uds-border-radius-md)_-_16px))] [&>*:last-child]:rounded-b-[max(4px,calc(var(--uds-border-radius-md)_-_16px))]";case"lg":return"[&>*:first-child]:rounded-t-[max(6px,calc(var(--uds-border-radius-lg)_-_16px))] [&>*:last-child]:rounded-b-[max(6px,calc(var(--uds-border-radius-lg)_-_16px))]";case"xl":return"[&>*:first-child]:rounded-t-[max(6px,calc(var(--uds-border-radius-xl)_-_16px))] [&>*:last-child]:rounded-b-[max(6px,calc(var(--uds-border-radius-xl)_-_16px))]"}switch(r){case"xs":return"[&>*:first-child]:rounded-t-[max(1px,calc(var(--uds-border-radius-xs)_-_4px))] [&>*:last-child]:rounded-b-[max(1px,calc(var(--uds-border-radius-xs)_-_4px))]";case"sm":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-sm)_-_4px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-sm)_-_4px))]";case"md":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-md)_-_4px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-md)_-_4px))]";case"lg":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-lg)_-_4px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-lg)_-_4px))]";case"xl":return"[&>*:first-child]:rounded-t-[min(18px,calc(var(--uds-border-radius-xl)_-_4px))] [&>*:last-child]:rounded-b-[min(18px,calc(var(--uds-border-radius-xl)_-_4px))]"}})({borderRadius:o,spacing:e}),U=w((()=>V[n]),[n]);return R(E,{initial:!1,children:R(x,{gutter:U,sameWidth:f,focusable:_,store:j,ref:S,portalElement:y,portal:C,...k,render:R(B,{backgroundColor:c,gap:r,spacing:e,spacingBottom:a,spacingEnd:d,spacingStart:t,spacingTop:i,borderRadius:o,borderColor:u,borderWidth:l,overflow:p,animate:W,variants:K,dropShadow:G,className:s("uds-menu-content","transition-shadow","duration-200","ease-in-out","min-w-60","max-w-lg","max-h-96","overflow-auto","uds-ring","z-10","group",!N&&L,h),children:v})})})})),G=v((function({role:e="separator",contentPosition:a="start",gap:d="4",children:t,spacingVertical:s=(t?"2":"0"),spacingHorizontal:n=(t?"4":"0"),className:c,...o},u){const l={root:i({menuDividerVariantRoot:"default",className:c}),text:i({menuDividerVariantText:"default"})};return R(r,{ref:u,role:e,variant:"inherit",contentPosition:a,gap:d,spacingVertical:s,spacingHorizontal:n,className:l.root,layerClassNames:l,...o,children:t})}));G.displayName="MenuDivider";var K="uds-menu-item",L={visible:{scale:1,opacity:1},hidden:{scale:.7,opacity:0}},U=v((function({spacing:r="0",spacingBottom:a,spacingEnd:d,spacingHorizontal:t="4",spacingStart:u,spacingTop:l,spacingVertical:m="3.5",columnGap:x="2",className:p,children:b,endIcon:h,startIcon:f,hideEndIcon:_,active:v,disabled:g,as:I,rootProps:C,name:N,alignItems:k="center",justifyContent:V="space-between",layerClassNames:z,...P},M){const T=y.count(b)>1,A=(({active:r,disabled:e,className:a})=>s(K,"focus-visible:text-brand","focus-visible:bg-brand-secondary","focus-visible:z-10","uds-ring","!-outline-offset-2",r&&["[&:not([aria-checked])]:cursor-default"],e&&"opacity-25 cursor-not-allowed","duration-20 transition-[font-variation-settings] ease-in-out","z-0",a))({active:v,disabled:g,className:p}),O=i({className:s(`${K}-content truncate`,z?.text),textAlign:"start",...T&&{columnGap:x,display:"flex",alignItems:"center",width:"full",justifyContent:"space-between"}}),B=w((()=>({root:i({menuSizeRoot:"default",className:s(z?.root,A)}),startIcon:i({menuSizeStartIcon:"default",className:z?.startIcon}),endIcon:i({menuSizeEndIcon:"default",className:z?.endIcon})})),[z,A]);return R(n,{asChild:!0,spacing:r,spacingBottom:a,spacingEnd:d,spacingHorizontal:t,spacingStart:u,spacingTop:l,spacingVertical:m,columnGap:x,className:B.root,alignItems:k,justifyContent:V,children:j(I,{render:R(e,{ref:M,...P}),name:N??"",disabled:g,...C,children:[j(c,{gap:x,alignItems:"center",width:"full",children:[R(E,{initial:!1,children:f&&R(S.span,{variants:L,initial:"hidden",animate:"visible",exit:"hidden",className:"uds-start-icon",children:R(o,{icon:f,className:B.startIcon,iconProps:{size:"sm",variant:v?"fill":"outline",color:"current"}})})}),R("span",{className:O,children:b})]}),R(E,{initial:!1,mode:"popLayout",children:!_&&h&&R(S.span,{variants:L,initial:"hidden",animate:"visible",exit:"hidden",className:"uds-end-icon",children:R(o,{icon:h,className:B.endIcon,iconProps:{size:"sm",variant:v?"fill":"outline",color:"current"}})})})]})})})),X=v((function({active:r,...e},a){const d={root:i({menuItemVariantRoot:"default",menuItemVariantActiveRoot:r?"on":"off"}),text:i({menuItemVariantText:"default",menuItemVariantActiveText:r?"on":"off"}),startIcon:i({menuItemVariantIcon:"default",menuItemVariantActiveIcon:r?"on":"off"})};return R(U,{ref:a,as:p,active:r,layerClassNames:d,...e})}));X.displayName="MenuItem";var Z=v((function({name:r,endIcon:e=a,checked:d,defaultChecked:t,className:n,...c},o){const u=r,l=C(!1),x=m(),p=z(x);I((()=>{!l.current&&void 0!==t&&x&&(x.setValues((r=>({...r,[u]:t}))),l.current=!0)}),[x,t,u]);const h=w((()=>{if(void 0!==d)return d;if(p?.items?.length){const r=p?.items.find((r=>r.element?.name===u));if(r?.element)return r.element.checked}const r=p?.values[u];return"boolean"==typeof r?r:t??!1}),[p?.items,p?.values,u,d,t]),f=N((r=>{void 0===d&&x?.setValues((e=>({...e,[u]:r.target.checked})))}),[u,x,d]),_={root:i({menuItemCheckboxVariantRoot:"default",menuItemCheckboxVariantActiveRoot:h?"on":"off"}),text:i({menuItemCheckboxVariantText:"default",menuItemCheckboxVariantActiveText:h?"on":"off"}),startIcon:i({menuItemCheckboxVariantStartIcon:"default",menuItemCheckboxVariantActiveStartIcon:h?"on":"off"}),endIcon:i({menuItemCheckboxVariantEndIcon:"default",menuItemCheckboxVariantActiveEndIcon:h?"on":"off"})};return R(U,{ref:o,as:b,hideEndIcon:!h,endIcon:e,active:h,className:s("uds-menu-item-checkbox",n),layerClassNames:_,rootProps:{name:r,onChange:f,defaultChecked:t,checked:void 0!==d?d:void 0},...c})}));Z.displayName="MenuItemCheckbox";var q=()=>{if("undefined"==typeof document)return!1;return"rtl"===getComputedStyle(document.documentElement).direction},J=r=>{const[e,a]=g(q);return I((()=>{if(r?.explicit)return void a(r.explicit);const e=(r=>{const e=new MutationObserver((e=>{e.some((r=>"attributes"===r.type&&"dir"===r.attributeName))&&r()}));return e.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]}),e})((()=>{a(q())}));return()=>e.disconnect()}),[r?.explicit]),e},Q=function({placement:r="bottom",rtl:e,...a}){const t=J({explicit:e}),s=((r,e)=>{const a=e?.rtl;if("start"===r)return a?"right":"left";if("end"===r)return a?"left":"right";if(r?.includes("-")){const[e,d]=r.split("-");if(!("start"!==e&&"end"!==e||"top"!==d&&"bottom"!==d))return`${"start"===e?a?"right":"left":a?"left":"right"}-${"bottom"===d?"end":"start"}`;if("top"===e||"bottom"===e)return`${e}-${"start"===d?a?"end":"start":a?"start":"end"}`}return r})(r,{rtl:t});return R(d,{children:R(h,{placement:s,rtl:t,...a})})},Y=v((function({asChild:r,className:e,...a},d){const t=C(null),i=r?R(n,{ref:t,className:"uds-ring h-fit w-fit"}):void 0,c=N((()=>{const r=t.current?.firstChild;r instanceof HTMLElement&&"function"==typeof r.focus&&r.focus()}),[t]);return R(f,{onFocus:c,onFocusVisible:c,ref:d,render:i,className:s("uds-menu-trigger",e),...a})}));export{P as Menu};
|