twenty-ui 2.44.0 → 2.45.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/{Avatar-Da_dlwJP.js → Avatar-C0FtFpJC.js} +1 -1
- package/dist/{Avatar-B5-MSVUG.cjs → Avatar-CkI8b3nh.cjs} +1 -1
- package/dist/ListItem-B2HOeN2h.cjs +1 -0
- package/dist/ListItem-D8BQRK1W.js +97 -0
- package/dist/ListItem.module-Dxd8jOJP.js +35 -0
- package/dist/ListItem.module-RqrfwrFg.cjs +1 -0
- package/dist/{OverflowingTextWithTooltip-maBlogGW.cjs → OverflowingTextWithTooltip-tsJWb_Ie.cjs} +1 -1
- package/dist/ProgressBar-21MXyySH.js +108 -0
- package/dist/ProgressBar-CyqeRyzA.cjs +1 -0
- package/dist/{ResizeHandle-DN1bRxQb.js → ResizeHandle-CGYGfOVF.js} +5 -5
- package/dist/{ResizeHandle-cll01qBQ.cjs → ResizeHandle-CI-VTVOi.cjs} +1 -1
- package/dist/Shortcut-CRCVbA2m.js +71 -0
- package/dist/Shortcut-CuBFak3I.cjs +1 -0
- package/dist/Switch-BQp0t6JZ.js +129 -0
- package/dist/Switch-CFCj3OQZ.cjs +1 -0
- package/dist/TabsTabContent-DZUNi_iE.cjs +1 -0
- package/dist/TabsTabContent-s6J5bZ3R.js +39 -0
- package/dist/components/code-editor.cjs +1 -1
- package/dist/components/code-editor.mjs +1 -1
- package/dist/components/data-display/MetricRow/MetricRow.d.ts +2 -0
- package/dist/components/data-display/MetricRow/types/MetricRowProps.d.ts +11 -0
- package/dist/components/index.d.ts +6 -1
- package/dist/components/input/IconButton/types/IconButtonProps.d.ts +1 -1
- package/dist/components/input/ImageInput/ImageInput.d.ts +2 -0
- package/dist/components/input/ImageInput/__stories__/ImageInputPreviewChangesExample.d.ts +2 -0
- package/dist/components/input/ImageInput/__stories__/imageInputPreviewUrl.d.ts +1 -0
- package/dist/components/input/ImageInput/internal/ImageInputPreview.d.ts +5 -0
- package/dist/components/input/ImageInput/types/ImageInputProps.d.ts +15 -0
- package/dist/components/layout/OverflowingList/OverflowingList.d.ts +2 -0
- package/dist/components/layout/OverflowingList/__stories__/OVERFLOWING_LIST_STORY_ITEMS.d.ts +1 -0
- package/dist/components/layout/OverflowingList/__stories__/OverflowingListControlledFocusExample.d.ts +1 -0
- package/dist/components/layout/OverflowingList/__stories__/OverflowingListMutableTag.d.ts +1 -0
- package/dist/components/layout/OverflowingList/__stories__/OverflowingListResizeExample.d.ts +1 -0
- package/dist/components/layout/OverflowingList/__stories__/expectOverflowingListPopupGeometry.d.ts +4 -0
- package/dist/components/layout/OverflowingList/internal/OverflowingListItem.d.ts +9 -0
- package/dist/components/layout/OverflowingList/internal/getVisibleItemCount.d.ts +6 -0
- package/dist/components/layout/OverflowingList/internal/measureItemWidths.d.ts +5 -0
- package/dist/components/layout/OverflowingList/internal/useFocusedElementUnmountRef.d.ts +1 -0
- package/dist/components/layout/OverflowingList/internal/useOverflowingListLayout.d.ts +12 -0
- package/dist/components/layout/OverflowingList/types/OverflowingListProps.d.ts +7 -0
- package/dist/components/navigation/Dropdown/Dropdown.d.ts +3 -3
- package/dist/components/navigation/Dropdown/internal/DropdownActionItem.d.ts +1 -1
- package/dist/components/navigation/Dropdown/internal/DropdownOptionItem.d.ts +1 -1
- package/dist/components/navigation/Dropdown/internal/DropdownSubmenuTrigger.d.ts +1 -1
- package/dist/components/navigation/Dropdown/types/DropdownActionItemProps.d.ts +1 -1
- package/dist/components/navigation/Dropdown/types/DropdownOptionItemProps.d.ts +1 -1
- package/dist/components/navigation/MenuItem/MenuItem.d.ts +1 -1
- package/dist/components/navigation/MenuItem/types/MenuItemProps.d.ts +3 -3
- package/dist/components/navigation/TabButton/types/TabButtonProps.d.ts +1 -1
- package/dist/components-BizDepCM.cjs +1 -0
- package/dist/components-CC-3jXEq.js +2144 -0
- package/dist/components.cjs +1 -1
- package/dist/components.mjs +30 -28
- package/dist/{data-display-DenoFbuP.cjs → data-display-BgweQocz.cjs} +1 -1
- package/dist/{data-display-npY0auY_.js → data-display-Dn_nzrc8.js} +25 -25
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +631 -622
- package/dist/input-C50264Jb.js +407 -0
- package/dist/input-CRiX4eQH.cjs +1 -0
- package/dist/isRenderableSlot-DT_depzM.js +6 -0
- package/dist/isRenderableSlot-Guryb6Nf.cjs +1 -0
- package/dist/navigation-B9YTBTaa.cjs +1 -0
- package/dist/navigation-CQUyRKgk.js +122 -0
- package/dist/primitives/data-display.cjs +1 -1
- package/dist/primitives/data-display.mjs +2 -2
- package/dist/primitives/feedback/ProgressRing/ProgressRing.d.ts +2 -0
- package/dist/primitives/feedback/ProgressRing/types/ProgressRingProps.d.ts +6 -0
- package/dist/primitives/feedback/index.d.ts +2 -0
- package/dist/primitives/feedback.cjs +1 -1
- package/dist/primitives/feedback.mjs +6 -5
- package/dist/primitives/input/Button/Button.d.ts +1 -1
- package/dist/primitives/input/Button/types/ButtonProps.d.ts +3 -1
- package/dist/primitives/input/NumberStepper/NumberStepper.d.ts +2 -0
- package/dist/primitives/input/NumberStepper/__stories__/ControlledNumberStepperExample.d.ts +2 -0
- package/dist/primitives/input/NumberStepper/__stories__/NumberStepperFieldExample.d.ts +2 -0
- package/dist/primitives/input/NumberStepper/__stories__/NumberStepperFormExample.d.ts +4 -0
- package/dist/primitives/input/NumberStepper/internal/constants/NumberStepperFormat.d.ts +1 -0
- package/dist/primitives/input/NumberStepper/internal/utils/isBlurRoundingOfCurrentValue.d.ts +8 -0
- package/dist/primitives/input/NumberStepper/types/NumberStepperProps.d.ts +7 -0
- package/dist/primitives/input/index.d.ts +2 -0
- package/dist/primitives/input.cjs +1 -1
- package/dist/primitives/input.mjs +15 -14
- package/dist/primitives/layout.cjs +1 -1
- package/dist/primitives/layout.mjs +1 -1
- package/dist/primitives/navigation/Breadcrumb/Breadcrumb.d.ts +2 -0
- package/dist/primitives/navigation/Breadcrumb/internal/BreadcrumbItemContent.d.ts +6 -0
- package/dist/primitives/navigation/Breadcrumb/types/BreadcrumbItem.d.ts +2 -0
- package/dist/primitives/navigation/Breadcrumb/types/BreadcrumbProps.d.ts +5 -0
- package/dist/primitives/navigation/ListItem/ListItem.d.ts +1 -1
- package/dist/primitives/navigation/ListItem/types/ListItemProps.d.ts +3 -2
- package/dist/primitives/navigation/index.d.ts +3 -0
- package/dist/primitives/navigation.cjs +1 -1
- package/dist/primitives/navigation.mjs +5 -4
- package/dist/primitives/surfaces/Menu/internal/getMenuListItemProps.d.ts +2 -2
- package/dist/primitives/surfaces/Menu/types/MenuItemSlotProps.d.ts +1 -1
- package/dist/primitives/surfaces.cjs +1 -1
- package/dist/primitives/surfaces.mjs +2 -2
- package/dist/primitives/typography/Shortcut/Shortcut.d.ts +2 -0
- package/dist/primitives/typography/Shortcut/formatShortcut.d.ts +2 -0
- package/dist/primitives/typography/Shortcut/internal/getShortcutPresentation.d.ts +8 -0
- package/dist/primitives/typography/Shortcut/types/ShortcutDefinition.d.ts +1 -0
- package/dist/primitives/typography/Shortcut/types/ShortcutFormatOptions.d.ts +7 -0
- package/dist/primitives/typography/Shortcut/types/ShortcutProps.d.ts +6 -0
- package/dist/primitives/typography/index.d.ts +5 -0
- package/dist/primitives/typography.cjs +1 -1
- package/dist/primitives/typography.mjs +8 -4
- package/dist/primitives.cjs +1 -1
- package/dist/primitives.mjs +61 -54
- package/dist/style.css +1 -1
- package/dist/{surfaces-BJilWRcD.js → surfaces-C9ZUjKxU.js} +10 -10
- package/dist/{surfaces-iGk6vB0x.cjs → surfaces-Davk4uBw.cjs} +1 -1
- package/dist/typography-D3fk3hSo.cjs +1 -0
- package/dist/typography-DUJWRilJ.js +5 -0
- package/dist/useIsMobile-CAIiLC-3.js +37 -0
- package/dist/useIsMobile-UXHqqYXb.cjs +1 -0
- package/dist/utilities/index.d.ts +0 -1
- package/dist/utilities-CJKPcDM4.js +28 -0
- package/dist/utilities-CdR__WZM.cjs +1 -0
- package/dist/utilities.cjs +1 -1
- package/dist/utilities.mjs +16 -16
- package/package.json +1 -1
- package/dist/ListItem-Bg7Sk5Nv.js +0 -112
- package/dist/ListItem-UYe5GaEQ.cjs +0 -1
- package/dist/ListItem.module-DkSRO3lX.cjs +0 -1
- package/dist/ListItem.module-DqkBkYtI.js +0 -38
- package/dist/ProgressBar-C8N-1Iav.cjs +0 -1
- package/dist/ProgressBar-Cq6EDZz9.js +0 -58
- package/dist/Switch-BLO0Y9bi.cjs +0 -1
- package/dist/Switch-CMVfAYqP.js +0 -127
- package/dist/TabsTabContent-BseLV1Wk.cjs +0 -1
- package/dist/TabsTabContent-_NCTxoP6.js +0 -40
- package/dist/components/navigation/NavigationBar/NavigationBar.d.ts +0 -13
- package/dist/components/navigation/NavigationBar/internal/NavigationBarItem/NavigationBarItem.d.ts +0 -9
- package/dist/components-Bs-35QDJ.cjs +0 -1
- package/dist/components-kaERZ89J.js +0 -1865
- package/dist/input-BNuMVtkM.cjs +0 -1
- package/dist/input-COx4wMjs.js +0 -324
- package/dist/navigation-CUofX3gO.js +0 -78
- package/dist/navigation-qJfYicT7.cjs +0 -1
- package/dist/primitives/input/Button/internal/ButtonHotKeys.d.ts +0 -5
- package/dist/primitives/navigation/ListItem/internal/MenuItemHotKeys/MenuItemHotKeys.d.ts +0 -6
- package/dist/primitives/navigation/Tabs/internal/isRenderableSlot.d.ts +0 -2
- package/dist/utilities/device/getOsShortcutSeparator.d.ts +0 -1
- package/dist/utilities-B7EwAZ4L.cjs +0 -1
- package/dist/utilities-CMrqpiWM.js +0 -64
- package/dist/{OverflowingTextWithTooltip-CtHMhu6b.js → OverflowingTextWithTooltip-CNpmkBvJ.js} +1 -1
- /package/dist/{primitives/navigation/ListItem → utilities}/internal/isRenderableSlot.d.ts +0 -0
package/dist/input-BNuMVtkM.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const H=require("./theme-DumxXtpW.cjs"),C=require("./isDefined-DS2Q42p5.cjs"),I=require("./Switch-BLO0Y9bi.cjs"),s=require("./useProvidedTextDirection-B7ovnsdr.cjs"),l=require("./ListItem.module-DkSRO3lX.cjs");let m=require("clsx"),a=require("react/jsx-runtime"),q=require("@sniptt/guards"),j=require("react"),M=require("@base-ui/react/use-render"),A=require("@base-ui/react/input"),T=require("@base-ui/react/checkbox"),N=require("@base-ui/react/field"),k=require("@base-ui/react/radio"),$=require("@base-ui/react/radio-group"),d=require("@base-ui/react/select"),x=require("@base-ui/react/slider"),R=require("@tabler/icons-react");var X="_container_262rx_1",J={container:X},K=({attached:e=!0,framed:r=!1,className:t,children:o,variant:i,size:n,color:c,render:u,ref:_,...f})=>{const g=(0,M.useRender)({render:u,ref:_,props:{role:"group","data-attached":e||void 0,"data-framed":r||void 0,...f,className:(0,m.clsx)(J.container,t),children:o}});return(0,a.jsx)(I.ButtonGroupContext.Provider,{value:{variant:i,color:c,size:n},children:g})},Q=({size:e="sm",variant:r="solid",shape:t="square",color:o="accent",hoverable:i=!0,className:n,children:c,...u})=>(0,a.jsxs)(T.Checkbox.Root,{...u,className:s.mergeClassNames((0,m.clsx)(l.Checkbox_module_default.root,l.Checkbox_module_default[e],l.Checkbox_module_default[r],l.Checkbox_module_default[t],l.Checkbox_module_default[o],i&&l.Checkbox_module_default.hoverable),n),children:[(0,a.jsx)("span",{className:l.Checkbox_module_default.box,children:(0,a.jsxs)(T.Checkbox.Indicator,{className:l.Checkbox_module_default.indicator,children:[(0,a.jsx)(R.IconCheck,{className:l.Checkbox_module_default.check,"aria-hidden":!0}),(0,a.jsx)(R.IconMinus,{className:l.Checkbox_module_default.minus,"aria-hidden":!0})]})}),c]}),U="_description_yrj5x_1",W={description:U},w=(0,j.forwardRef)(({className:e,...r},t)=>(0,a.jsx)(N.Field.Description,{ref:t,className:s.mergeClassNames(W.description,e),...r}));w.displayName="FieldDescription";var Y="_error_179et_1",Z={error:Y},G=(0,j.forwardRef)(({className:e,...r},t)=>(0,a.jsx)(N.Field.Error,{ref:t,className:s.mergeClassNames(Z.error,e),...r}));G.displayName="FieldError";var ee="_label_1yxve_1",re={label:ee},E=(0,j.forwardRef)(({className:e,...r},t)=>(0,a.jsx)(N.Field.Label,{ref:t,className:s.mergeClassNames(re.label,e),...r}));E.displayName="FieldLabel";var ae={Root:N.Field.Root,Label:E,Control:N.Field.Control,Description:w,Error:G,Validity:N.Field.Validity},te="_root_1dv0f_1",le="_control_1dv0f_18",oe="_sm_1dv0f_33",se="_md_1dv0f_38",ie="_indicator_1dv0f_49",ce="_card_1dv0f_90",ne="_cardContent_1dv0f_111",p={root:te,control:le,sm:oe,md:se,indicator:ie,card:ce,cardContent:ne},de=({children:e,className:r,size:t="sm",variant:o="default",...i})=>(0,a.jsxs)(k.Radio.Root,{render:o==="card"?(0,a.jsx)("div",{}):void 0,...i,className:s.mergeClassNames((0,m.clsx)(p.root,p[t],o==="card"&&p.card),r),children:[(0,a.jsx)("span",{className:p.control,"aria-hidden":!0,children:(0,a.jsx)(k.Radio.Indicator,{className:p.indicator})}),o==="card"?(0,a.jsx)("div",{className:p.cardContent,children:e}):e]}),ue="_root_1h79s_1",_e={root:ue},me=({className:e,...r})=>(0,a.jsx)($.RadioGroup,{...r,className:s.mergeClassNames(_e.root,e)}),ve="_container_1uovu_1",he="_item_1uovu_20",xe="_iconOnly_1uovu_60",fe="_icon_1uovu_60",be="_label_1uovu_79",S={container:ve,item:he,iconOnly:xe,icon:fe,label:be},pe=({className:e,itemWidth:r="equal",options:t,...o})=>(0,a.jsx)($.RadioGroup,{...o,className:s.mergeClassNames(S.container,e),"data-item-width":r,children:t.map(({"aria-label":i,disabled:n,label:c,startIcon:u,value:_})=>(0,a.jsxs)(k.Radio.Root,{value:_,disabled:n,"aria-label":i,className:(0,m.clsx)(S.item,!l.isRenderableSlot(c)&&S.iconOnly),children:[l.isRenderableSlot(u)&&(0,a.jsx)("span",{className:S.icon,"aria-hidden":!0,children:u}),l.isRenderableSlot(c)&&(0,a.jsx)("span",{className:S.label,children:c})]},_))}),je="_trigger_hijh9_1",Ne="_value_hijh9_12",ge="_icon_hijh9_31",Se="_positioner_hijh9_42",Ce="_popup_hijh9_46",Re="_item_hijh9_71",Ie="_indicator_hijh9_75",ke="_groupLabel_hijh9_81",qe="_separator_hijh9_89",v={trigger:je,value:Ne,icon:ge,positioner:Se,popup:Ce,item:Re,indicator:Ie,groupLabel:ke,separator:qe},Le=({className:e,...r})=>(0,a.jsx)(d.Select.GroupLabel,{...r,className:s.mergeClassNames(v.groupLabel,e)}),ye=({className:e,children:r,startIcon:t,endIcon:o,description:i,descriptionPlacement:n="inline",...c})=>(0,a.jsxs)(d.Select.Item,{...c,className:s.mergeClassNames((0,m.clsx)(l.ListItem_module_default.root,v.item),e),"data-color":"neutral","data-indicator":"check",children:[l.isRenderableSlot(t)&&(0,a.jsx)("div",{className:l.ListItem_module_default.startIcon,"aria-hidden":!0,children:t}),(0,a.jsxs)("div",{className:l.ListItem_module_default.label,children:[(0,a.jsx)(d.Select.ItemText,{className:l.ListItem_module_default.text,children:r}),l.isRenderableSlot(i)&&n==="inline"&&(0,a.jsx)("div",{className:(0,m.clsx)(l.ListItem_module_default.description,l.ListItem_module_default.inlineDescription),children:i})]}),l.isRenderableSlot(i)&&n==="end"&&(0,a.jsx)("div",{className:(0,m.clsx)(l.ListItem_module_default.description,l.ListItem_module_default.endDescription),children:i}),l.isRenderableSlot(o)&&(0,a.jsx)("div",{className:l.ListItem_module_default.endIcon,"aria-hidden":!0,children:o}),(0,a.jsx)(d.Select.ItemIndicator,{className:v.indicator,children:(0,a.jsx)(R.IconCheck,{className:l.ListItem_module_default.checkIndicator})})]}),Te=({side:e="bottom",align:r="start",sideOffset:t=8,alignOffset:o,alignItemWithTrigger:i=!1,anchor:n,container:c,className:u,..._})=>{const f=H.useThemeContainer(),g=s.useProvidedTextDirection();return(0,a.jsx)(d.Select.Portal,{container:c===void 0?f??void 0:c,children:(0,a.jsx)(d.Select.Positioner,{dir:g,side:e,align:r,sideOffset:t,alignOffset:o,alignItemWithTrigger:i,anchor:n,className:v.positioner,children:(0,a.jsx)(d.Select.Popup,{..._,className:s.mergeClassNames(v.popup,u)})})})},Fe=({className:e,...r})=>(0,a.jsx)(d.Select.Separator,{...r,className:s.mergeClassNames(v.separator,e)}),De=({size:e="md",className:r,children:t,...o})=>(0,a.jsxs)(d.Select.Trigger,{...o,className:s.mergeClassNames((0,m.clsx)(I.Input_module_default.input,I.Input_module_default[e],v.trigger),r),children:[t,(0,a.jsx)(d.Select.Icon,{className:v.icon,children:(0,a.jsx)(R.IconChevronDown,{})})]}),Pe=({className:e,...r})=>(0,a.jsx)(d.Select.Value,{...r,className:s.mergeClassNames(v.value,e)}),$e=()=>({Root:d.Select.Root,Trigger:De,Value:Pe,Popup:Te,Item:ye,Group:d.Select.Group,GroupLabel:Le,Separator:Fe}),we=$e(),Ge="_root_1mh0w_1",Ee="_accent_1mh0w_16",Oe="_success_1mh0w_20",Ve="_control_1mh0w_24",Be="_track_1mh0w_42",ze="_indicator_1mh0w_55",He="_thumb_1mh0w_66",Me="_label_1mh0w_80",Ae="_value_1mh0w_81",h={root:Ge,accent:Ee,success:Oe,control:Ve,track:Be,indicator:ze,thumb:He,label:Me,value:Ae},Xe=({className:e,color:r="accent",thumbAlignment:t="edge",...o})=>(0,a.jsx)(x.Slider.Root,{...o,thumbAlignment:t,className:s.mergeClassNames((0,m.clsx)(h.root,h[r]),e)}),Je=({className:e,...r})=>(0,a.jsx)(x.Slider.Control,{...r,className:s.mergeClassNames(h.control,e)}),Ke=({className:e,...r})=>(0,a.jsx)(x.Slider.Track,{...r,className:s.mergeClassNames(h.track,e)}),Qe=({className:e,...r})=>(0,a.jsx)(x.Slider.Indicator,{...r,className:s.mergeClassNames(h.indicator,e)}),Ue=({className:e,...r})=>(0,a.jsx)(x.Slider.Thumb,{...r,className:s.mergeClassNames(h.thumb,e)}),We=({className:e,...r})=>(0,a.jsx)(x.Slider.Label,{...r,className:s.mergeClassNames(h.label,e)}),Ye=({className:e,...r})=>(0,a.jsx)(x.Slider.Value,{...r,className:s.mergeClassNames(h.value,e)}),Ze={Root:Xe,Control:Je,Track:Ke,Indicator:Qe,Thumb:Ue,Label:We,Value:Ye},er=e=>C.isDefined(e)?(0,q.isNumber)(e)?`${e}px`:String(e):"",F=(e,r)=>{if(C.isDefined(e)){if((0,q.isFunction)(e))return e(r);e.current=r}},rr=(...e)=>r=>{const t=e.map(o=>{const i=F(o,r);return(0,q.isFunction)(i)?i:()=>F(o,null)});return()=>{for(const o of t)o()}},D=e=>{e.style.blockSize="auto";const r=e.offsetHeight-e.clientHeight;e.style.blockSize=`${e.scrollHeight+r}px`},ar="_textarea_1qcvj_1",tr="_sm_1qcvj_38",lr="_md_1qcvj_42",P={textarea:ar,sm:tr,md:lr},or=(0,a.jsx)("textarea",{}),sr=({size:e="md",autoResize:r=!1,maxRows:t,className:o,style:i,ref:n,render:c=or,onChange:u,value:_,rows:f,...g})=>{const L=(0,j.useRef)(null),O=(0,j.useMemo)(()=>rr(n,L),[n]),V=C.isDefined(_),y=i?.blockSize;(0,j.useLayoutEffect)(()=>{const b=L.current;if(C.isDefined(b)){if(!r){b.style.blockSize=er(y);return}D(b)}},[r,_,t,f,y]);const B=b=>{r&&!V&&D(b.currentTarget),u?.(b)},z=C.isDefined(t)?{...i,"--tw-textarea-max-rows":t}:i;return(0,a.jsx)(A.Input,{...g,rows:f,onChange:B,ref:O,render:c,value:_,className:s.mergeClassNames((0,m.clsx)(P.textarea,P[e]),o),style:z,"data-auto-resize":r||void 0})};Object.defineProperty(exports,"ButtonGroup",{enumerable:!0,get:function(){return K}});Object.defineProperty(exports,"Checkbox",{enumerable:!0,get:function(){return Q}});Object.defineProperty(exports,"Field",{enumerable:!0,get:function(){return ae}});Object.defineProperty(exports,"Radio",{enumerable:!0,get:function(){return de}});Object.defineProperty(exports,"RadioGroup",{enumerable:!0,get:function(){return me}});Object.defineProperty(exports,"SegmentedControl",{enumerable:!0,get:function(){return pe}});Object.defineProperty(exports,"Select",{enumerable:!0,get:function(){return we}});Object.defineProperty(exports,"Slider",{enumerable:!0,get:function(){return Ze}});Object.defineProperty(exports,"Textarea",{enumerable:!0,get:function(){return sr}});
|
package/dist/input-COx4wMjs.js
DELETED
|
@@ -1,324 +0,0 @@
|
|
|
1
|
-
import { Sn as G, wn as X, xo as J } from "./icon-B7aZ6RxF.js";
|
|
2
|
-
import { t as T } from "./isDefined-fMi6eQ4r.js";
|
|
3
|
-
import { t as K } from "./theme-CjHovJAZ.js";
|
|
4
|
-
import { i as y, o as Q } from "./Switch-CMVfAYqP.js";
|
|
5
|
-
import { n as l, t as U } from "./useProvidedTextDirection-P1dtjUtE.js";
|
|
6
|
-
import { n as _, r as f, t as u } from "./ListItem.module-DqkBkYtI.js";
|
|
7
|
-
import { clsx as v } from "clsx";
|
|
8
|
-
import { jsx as e, jsxs as N } from "react/jsx-runtime";
|
|
9
|
-
import { isFunction as V, isNumber as W } from "@sniptt/guards";
|
|
10
|
-
import { forwardRef as k, useLayoutEffect as Y, useMemo as Z, useRef as rr } from "react";
|
|
11
|
-
import { useRender as ar } from "@base-ui/react/use-render";
|
|
12
|
-
import { Input as er } from "@base-ui/react/input";
|
|
13
|
-
import { Checkbox as E } from "@base-ui/react/checkbox";
|
|
14
|
-
import { Field as C } from "@base-ui/react/field";
|
|
15
|
-
import { Radio as I } from "@base-ui/react/radio";
|
|
16
|
-
import { RadioGroup as B } from "@base-ui/react/radio-group";
|
|
17
|
-
import { Select as s } from "@base-ui/react/select";
|
|
18
|
-
import { Slider as b } from "@base-ui/react/slider";
|
|
19
|
-
var or = "_container_262rx_1", tr = { container: or }, Ia = ({ attached: r = !0, framed: a = !1, className: o, children: t, variant: i, size: n, color: c, render: d, ref: m, ...S }) => {
|
|
20
|
-
const R = ar({
|
|
21
|
-
render: d,
|
|
22
|
-
ref: m,
|
|
23
|
-
props: {
|
|
24
|
-
role: "group",
|
|
25
|
-
"data-attached": r || void 0,
|
|
26
|
-
"data-framed": a || void 0,
|
|
27
|
-
...S,
|
|
28
|
-
className: v(tr.container, o),
|
|
29
|
-
children: t
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
return /* @__PURE__ */ e(Q.Provider, {
|
|
33
|
-
value: {
|
|
34
|
-
variant: i,
|
|
35
|
-
color: c,
|
|
36
|
-
size: n
|
|
37
|
-
},
|
|
38
|
-
children: R
|
|
39
|
-
});
|
|
40
|
-
}, ka = ({ size: r = "sm", variant: a = "solid", shape: o = "square", color: t = "accent", hoverable: i = !0, className: n, children: c, ...d }) => /* @__PURE__ */ N(E.Root, {
|
|
41
|
-
...d,
|
|
42
|
-
className: l(v(_.root, _[r], _[a], _[o], _[t], i && _.hoverable), n),
|
|
43
|
-
children: [/* @__PURE__ */ e("span", {
|
|
44
|
-
className: _.box,
|
|
45
|
-
children: /* @__PURE__ */ N(E.Indicator, {
|
|
46
|
-
className: _.indicator,
|
|
47
|
-
children: [/* @__PURE__ */ e(G, {
|
|
48
|
-
className: _.check,
|
|
49
|
-
"aria-hidden": !0
|
|
50
|
-
}), /* @__PURE__ */ e(J, {
|
|
51
|
-
className: _.minus,
|
|
52
|
-
"aria-hidden": !0
|
|
53
|
-
})]
|
|
54
|
-
})
|
|
55
|
-
}), c]
|
|
56
|
-
}), ir = "_description_yrj5x_1", lr = { description: ir }, P = k(({ className: r, ...a }, o) => /* @__PURE__ */ e(C.Description, {
|
|
57
|
-
ref: o,
|
|
58
|
-
className: l(lr.description, r),
|
|
59
|
-
...a
|
|
60
|
-
}));
|
|
61
|
-
P.displayName = "FieldDescription";
|
|
62
|
-
var cr = "_error_179et_1", nr = { error: cr }, q = k(({ className: r, ...a }, o) => /* @__PURE__ */ e(C.Error, {
|
|
63
|
-
ref: o,
|
|
64
|
-
className: l(nr.error, r),
|
|
65
|
-
...a
|
|
66
|
-
}));
|
|
67
|
-
q.displayName = "FieldError";
|
|
68
|
-
var sr = "_label_1yxve_1", dr = { label: sr }, z = k(({ className: r, ...a }, o) => /* @__PURE__ */ e(C.Label, {
|
|
69
|
-
ref: o,
|
|
70
|
-
className: l(dr.label, r),
|
|
71
|
-
...a
|
|
72
|
-
}));
|
|
73
|
-
z.displayName = "FieldLabel";
|
|
74
|
-
var La = {
|
|
75
|
-
Root: C.Root,
|
|
76
|
-
Label: z,
|
|
77
|
-
Control: C.Control,
|
|
78
|
-
Description: P,
|
|
79
|
-
Error: q,
|
|
80
|
-
Validity: C.Validity
|
|
81
|
-
}, mr = "_root_1dv0f_1", _r = "_control_1dv0f_18", ur = "_sm_1dv0f_33", vr = "_md_1dv0f_38", pr = "_indicator_1dv0f_49", hr = "_card_1dv0f_90", fr = "_cardContent_1dv0f_111", x = {
|
|
82
|
-
root: mr,
|
|
83
|
-
control: _r,
|
|
84
|
-
sm: ur,
|
|
85
|
-
md: vr,
|
|
86
|
-
indicator: pr,
|
|
87
|
-
card: hr,
|
|
88
|
-
cardContent: fr
|
|
89
|
-
}, ja = ({ children: r, className: a, size: o = "sm", variant: t = "default", ...i }) => /* @__PURE__ */ N(I.Root, {
|
|
90
|
-
render: t === "card" ? /* @__PURE__ */ e("div", {}) : void 0,
|
|
91
|
-
...i,
|
|
92
|
-
className: l(v(x.root, x[o], t === "card" && x.card), a),
|
|
93
|
-
children: [/* @__PURE__ */ e("span", {
|
|
94
|
-
className: x.control,
|
|
95
|
-
"aria-hidden": !0,
|
|
96
|
-
children: /* @__PURE__ */ e(I.Indicator, { className: x.indicator })
|
|
97
|
-
}), t === "card" ? /* @__PURE__ */ e("div", {
|
|
98
|
-
className: x.cardContent,
|
|
99
|
-
children: r
|
|
100
|
-
}) : r]
|
|
101
|
-
}), Nr = "_root_1h79s_1", br = { root: Nr }, ya = ({ className: r, ...a }) => /* @__PURE__ */ e(B, {
|
|
102
|
-
...a,
|
|
103
|
-
className: l(br.root, r)
|
|
104
|
-
}), Sr = "_container_1uovu_1", gr = "_item_1uovu_20", xr = "_iconOnly_1uovu_60", Cr = "_icon_1uovu_60", Rr = "_label_1uovu_79", $ = {
|
|
105
|
-
container: Sr,
|
|
106
|
-
item: gr,
|
|
107
|
-
iconOnly: xr,
|
|
108
|
-
icon: Cr,
|
|
109
|
-
label: Rr
|
|
110
|
-
}, Ea = ({ className: r, itemWidth: a = "equal", options: o, ...t }) => /* @__PURE__ */ e(B, {
|
|
111
|
-
...t,
|
|
112
|
-
className: l($.container, r),
|
|
113
|
-
"data-item-width": a,
|
|
114
|
-
children: o.map(({ "aria-label": i, disabled: n, label: c, startIcon: d, value: m }) => /* @__PURE__ */ N(I.Root, {
|
|
115
|
-
value: m,
|
|
116
|
-
disabled: n,
|
|
117
|
-
"aria-label": i,
|
|
118
|
-
className: v($.item, !f(c) && $.iconOnly),
|
|
119
|
-
children: [f(d) && /* @__PURE__ */ e("span", {
|
|
120
|
-
className: $.icon,
|
|
121
|
-
"aria-hidden": !0,
|
|
122
|
-
children: d
|
|
123
|
-
}), f(c) && /* @__PURE__ */ e("span", {
|
|
124
|
-
className: $.label,
|
|
125
|
-
children: c
|
|
126
|
-
})]
|
|
127
|
-
}, m))
|
|
128
|
-
}), $r = "_trigger_hijh9_1", Tr = "_value_hijh9_12", Ir = "_icon_hijh9_31", kr = "_positioner_hijh9_42", Lr = "_popup_hijh9_46", jr = "_item_hijh9_71", yr = "_indicator_hijh9_75", Er = "_groupLabel_hijh9_81", wr = "_separator_hijh9_89", p = {
|
|
129
|
-
trigger: $r,
|
|
130
|
-
value: Tr,
|
|
131
|
-
icon: Ir,
|
|
132
|
-
positioner: kr,
|
|
133
|
-
popup: Lr,
|
|
134
|
-
item: jr,
|
|
135
|
-
indicator: yr,
|
|
136
|
-
groupLabel: Er,
|
|
137
|
-
separator: wr
|
|
138
|
-
}, Fr = ({ className: r, ...a }) => /* @__PURE__ */ e(s.GroupLabel, {
|
|
139
|
-
...a,
|
|
140
|
-
className: l(p.groupLabel, r)
|
|
141
|
-
}), Dr = ({ className: r, children: a, startIcon: o, endIcon: t, description: i, descriptionPlacement: n = "inline", ...c }) => /* @__PURE__ */ N(s.Item, {
|
|
142
|
-
...c,
|
|
143
|
-
className: l(v(u.root, p.item), r),
|
|
144
|
-
"data-color": "neutral",
|
|
145
|
-
"data-indicator": "check",
|
|
146
|
-
children: [
|
|
147
|
-
f(o) && /* @__PURE__ */ e("div", {
|
|
148
|
-
className: u.startIcon,
|
|
149
|
-
"aria-hidden": !0,
|
|
150
|
-
children: o
|
|
151
|
-
}),
|
|
152
|
-
/* @__PURE__ */ N("div", {
|
|
153
|
-
className: u.label,
|
|
154
|
-
children: [/* @__PURE__ */ e(s.ItemText, {
|
|
155
|
-
className: u.text,
|
|
156
|
-
children: a
|
|
157
|
-
}), f(i) && n === "inline" && /* @__PURE__ */ e("div", {
|
|
158
|
-
className: v(u.description, u.inlineDescription),
|
|
159
|
-
children: i
|
|
160
|
-
})]
|
|
161
|
-
}),
|
|
162
|
-
f(i) && n === "end" && /* @__PURE__ */ e("div", {
|
|
163
|
-
className: v(u.description, u.endDescription),
|
|
164
|
-
children: i
|
|
165
|
-
}),
|
|
166
|
-
f(t) && /* @__PURE__ */ e("div", {
|
|
167
|
-
className: u.endIcon,
|
|
168
|
-
"aria-hidden": !0,
|
|
169
|
-
children: t
|
|
170
|
-
}),
|
|
171
|
-
/* @__PURE__ */ e(s.ItemIndicator, {
|
|
172
|
-
className: p.indicator,
|
|
173
|
-
children: /* @__PURE__ */ e(G, { className: u.checkIndicator })
|
|
174
|
-
})
|
|
175
|
-
]
|
|
176
|
-
}), Gr = ({ side: r = "bottom", align: a = "start", sideOffset: o = 8, alignOffset: t, alignItemWithTrigger: i = !1, anchor: n, container: c, className: d, ...m }) => {
|
|
177
|
-
const S = K(), R = U();
|
|
178
|
-
return /* @__PURE__ */ e(s.Portal, {
|
|
179
|
-
container: c === void 0 ? S ?? void 0 : c,
|
|
180
|
-
children: /* @__PURE__ */ e(s.Positioner, {
|
|
181
|
-
dir: R,
|
|
182
|
-
side: r,
|
|
183
|
-
align: a,
|
|
184
|
-
sideOffset: o,
|
|
185
|
-
alignOffset: t,
|
|
186
|
-
alignItemWithTrigger: i,
|
|
187
|
-
anchor: n,
|
|
188
|
-
className: p.positioner,
|
|
189
|
-
children: /* @__PURE__ */ e(s.Popup, {
|
|
190
|
-
...m,
|
|
191
|
-
className: l(p.popup, d)
|
|
192
|
-
})
|
|
193
|
-
})
|
|
194
|
-
});
|
|
195
|
-
}, Vr = ({ className: r, ...a }) => /* @__PURE__ */ e(s.Separator, {
|
|
196
|
-
...a,
|
|
197
|
-
className: l(p.separator, r)
|
|
198
|
-
}), Br = ({ size: r = "md", className: a, children: o, ...t }) => /* @__PURE__ */ N(s.Trigger, {
|
|
199
|
-
...t,
|
|
200
|
-
className: l(v(y.input, y[r], p.trigger), a),
|
|
201
|
-
children: [o, /* @__PURE__ */ e(s.Icon, {
|
|
202
|
-
className: p.icon,
|
|
203
|
-
children: /* @__PURE__ */ e(X, {})
|
|
204
|
-
})]
|
|
205
|
-
}), Pr = ({ className: r, ...a }) => /* @__PURE__ */ e(s.Value, {
|
|
206
|
-
...a,
|
|
207
|
-
className: l(p.value, r)
|
|
208
|
-
}), qr = () => ({
|
|
209
|
-
Root: s.Root,
|
|
210
|
-
Trigger: Br,
|
|
211
|
-
Value: Pr,
|
|
212
|
-
Popup: Gr,
|
|
213
|
-
Item: Dr,
|
|
214
|
-
Group: s.Group,
|
|
215
|
-
GroupLabel: Fr,
|
|
216
|
-
Separator: Vr
|
|
217
|
-
}), wa = /* @__PURE__ */ qr(), zr = "_root_1mh0w_1", Hr = "_accent_1mh0w_16", Mr = "_success_1mh0w_20", Or = "_control_1mh0w_24", Ar = "_track_1mh0w_42", Xr = "_indicator_1mh0w_55", Jr = "_thumb_1mh0w_66", Kr = "_label_1mh0w_80", Qr = "_value_1mh0w_81", h = {
|
|
218
|
-
root: zr,
|
|
219
|
-
accent: Hr,
|
|
220
|
-
success: Mr,
|
|
221
|
-
control: Or,
|
|
222
|
-
track: Ar,
|
|
223
|
-
indicator: Xr,
|
|
224
|
-
thumb: Jr,
|
|
225
|
-
label: Kr,
|
|
226
|
-
value: Qr
|
|
227
|
-
}, Ur = ({ className: r, color: a = "accent", thumbAlignment: o = "edge", ...t }) => /* @__PURE__ */ e(b.Root, {
|
|
228
|
-
...t,
|
|
229
|
-
thumbAlignment: o,
|
|
230
|
-
className: l(v(h.root, h[a]), r)
|
|
231
|
-
}), Wr = ({ className: r, ...a }) => /* @__PURE__ */ e(b.Control, {
|
|
232
|
-
...a,
|
|
233
|
-
className: l(h.control, r)
|
|
234
|
-
}), Yr = ({ className: r, ...a }) => /* @__PURE__ */ e(b.Track, {
|
|
235
|
-
...a,
|
|
236
|
-
className: l(h.track, r)
|
|
237
|
-
}), Zr = ({ className: r, ...a }) => /* @__PURE__ */ e(b.Indicator, {
|
|
238
|
-
...a,
|
|
239
|
-
className: l(h.indicator, r)
|
|
240
|
-
}), ra = ({ className: r, ...a }) => /* @__PURE__ */ e(b.Thumb, {
|
|
241
|
-
...a,
|
|
242
|
-
className: l(h.thumb, r)
|
|
243
|
-
}), aa = ({ className: r, ...a }) => /* @__PURE__ */ e(b.Label, {
|
|
244
|
-
...a,
|
|
245
|
-
className: l(h.label, r)
|
|
246
|
-
}), ea = ({ className: r, ...a }) => /* @__PURE__ */ e(b.Value, {
|
|
247
|
-
...a,
|
|
248
|
-
className: l(h.value, r)
|
|
249
|
-
}), Fa = {
|
|
250
|
-
Root: Ur,
|
|
251
|
-
Control: Wr,
|
|
252
|
-
Track: Yr,
|
|
253
|
-
Indicator: Zr,
|
|
254
|
-
Thumb: ra,
|
|
255
|
-
Label: aa,
|
|
256
|
-
Value: ea
|
|
257
|
-
}, oa = (r) => T(r) ? W(r) ? `${r}px` : String(r) : "", w = (r, a) => {
|
|
258
|
-
if (T(r)) {
|
|
259
|
-
if (V(r)) return r(a);
|
|
260
|
-
r.current = a;
|
|
261
|
-
}
|
|
262
|
-
}, ta = (...r) => (a) => {
|
|
263
|
-
const o = r.map((t) => {
|
|
264
|
-
const i = w(t, a);
|
|
265
|
-
return V(i) ? i : () => w(t, null);
|
|
266
|
-
});
|
|
267
|
-
return () => {
|
|
268
|
-
for (const t of o) t();
|
|
269
|
-
};
|
|
270
|
-
}, F = (r) => {
|
|
271
|
-
r.style.blockSize = "auto";
|
|
272
|
-
const a = r.offsetHeight - r.clientHeight;
|
|
273
|
-
r.style.blockSize = `${r.scrollHeight + a}px`;
|
|
274
|
-
}, ia = "_textarea_1qcvj_1", la = "_sm_1qcvj_38", ca = "_md_1qcvj_42", D = {
|
|
275
|
-
textarea: ia,
|
|
276
|
-
sm: la,
|
|
277
|
-
md: ca
|
|
278
|
-
}, na = /* @__PURE__ */ e("textarea", {}), Da = ({ size: r = "md", autoResize: a = !1, maxRows: o, className: t, style: i, ref: n, render: c = na, onChange: d, value: m, rows: S, ...R }) => {
|
|
279
|
-
const L = rr(null), H = Z(() => ta(n, L), [n]), M = T(m), j = i?.blockSize;
|
|
280
|
-
Y(() => {
|
|
281
|
-
const g = L.current;
|
|
282
|
-
if (T(g)) {
|
|
283
|
-
if (!a) {
|
|
284
|
-
g.style.blockSize = oa(j);
|
|
285
|
-
return;
|
|
286
|
-
}
|
|
287
|
-
F(g);
|
|
288
|
-
}
|
|
289
|
-
}, [
|
|
290
|
-
a,
|
|
291
|
-
m,
|
|
292
|
-
o,
|
|
293
|
-
S,
|
|
294
|
-
j
|
|
295
|
-
]);
|
|
296
|
-
const O = (g) => {
|
|
297
|
-
a && !M && F(g.currentTarget), d?.(g);
|
|
298
|
-
}, A = T(o) ? {
|
|
299
|
-
...i,
|
|
300
|
-
"--tw-textarea-max-rows": o
|
|
301
|
-
} : i;
|
|
302
|
-
return /* @__PURE__ */ e(er, {
|
|
303
|
-
...R,
|
|
304
|
-
rows: S,
|
|
305
|
-
onChange: O,
|
|
306
|
-
ref: H,
|
|
307
|
-
render: c,
|
|
308
|
-
value: m,
|
|
309
|
-
className: l(v(D.textarea, D[r]), t),
|
|
310
|
-
style: A,
|
|
311
|
-
"data-auto-resize": a || void 0
|
|
312
|
-
});
|
|
313
|
-
};
|
|
314
|
-
export {
|
|
315
|
-
ya as a,
|
|
316
|
-
ka as c,
|
|
317
|
-
Ea as i,
|
|
318
|
-
Ia as l,
|
|
319
|
-
Fa as n,
|
|
320
|
-
ja as o,
|
|
321
|
-
wa as r,
|
|
322
|
-
La as s,
|
|
323
|
-
Da as t
|
|
324
|
-
};
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { t as w } from "./isDefined-fMi6eQ4r.js";
|
|
2
|
-
import { n as b } from "./useProvidedTextDirection-P1dtjUtE.js";
|
|
3
|
-
import { n as c, t as A } from "./TabsTabContent-_NCTxoP6.js";
|
|
4
|
-
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
5
|
-
import { useDirection as g } from "@base-ui/react/direction-provider";
|
|
6
|
-
import { Tabs as u } from "@base-ui/react/tabs";
|
|
7
|
-
var x = ({ event: r, direction: a, loopFocus: n }) => {
|
|
8
|
-
if (r.altKey || r.ctrlKey || r.metaKey || r.shiftKey) return;
|
|
9
|
-
const s = r.currentTarget, o = Array.from(s.querySelectorAll('[role="tab"]')).filter((e) => e.closest('[role="tablist"]') === s), i = o.findIndex((e) => e === r.target);
|
|
10
|
-
if (i === -1) return;
|
|
11
|
-
const l = a === "rtl" ? ["ArrowLeft", "ArrowRight"] : ["ArrowRight", "ArrowLeft"], [t, m] = s.getAttribute("aria-orientation") === "vertical" ? ["ArrowDown", "ArrowUp"] : l;
|
|
12
|
-
if (![
|
|
13
|
-
t,
|
|
14
|
-
m,
|
|
15
|
-
"Home",
|
|
16
|
-
"End"
|
|
17
|
-
].includes(r.key)) return;
|
|
18
|
-
r.preventBaseUIHandler(), r.preventDefault();
|
|
19
|
-
const d = o.filter((e) => !e.hasAttribute("data-disabled") && !e.hasAttribute("disabled") && e.getAttribute("aria-disabled") !== "true" && !e.closest("[hidden], [inert]"));
|
|
20
|
-
if (r.key === "Home") {
|
|
21
|
-
d[0]?.focus();
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
if (r.key === "End") {
|
|
25
|
-
d[d.length - 1]?.focus();
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
const T = r.key === m, y = T ? [...d].reverse() : d, h = y.find((e) => T ? o.indexOf(e) < i : o.indexOf(e) > i);
|
|
29
|
-
if (w(h)) {
|
|
30
|
-
h.focus();
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
n && y[0]?.focus();
|
|
34
|
-
}, K = ({ className: r, children: a, onKeyDown: n, loopFocus: s = !0, ...o }) => {
|
|
35
|
-
const i = g(), l = (t) => {
|
|
36
|
-
if (n?.(t), t.defaultPrevented) {
|
|
37
|
-
t.preventBaseUIHandler();
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
t.baseUIHandlerPrevented || x({
|
|
41
|
-
event: t,
|
|
42
|
-
direction: i,
|
|
43
|
-
loopFocus: s
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
return /* @__PURE__ */ p(u.List, {
|
|
47
|
-
...o,
|
|
48
|
-
loopFocus: s,
|
|
49
|
-
onKeyDown: l,
|
|
50
|
-
className: b(c.list, r),
|
|
51
|
-
children: [a, /* @__PURE__ */ f(u.Indicator, { className: c.indicator })]
|
|
52
|
-
});
|
|
53
|
-
}, N = ({ className: r, ...a }) => /* @__PURE__ */ f(u.Panel, {
|
|
54
|
-
...a,
|
|
55
|
-
className: b(c.panel, r)
|
|
56
|
-
}), k = ({ className: r, ...a }) => /* @__PURE__ */ f(u.Root, {
|
|
57
|
-
...a,
|
|
58
|
-
className: b(c.root, r)
|
|
59
|
-
}), D = ({ className: r, children: a, startIcon: n, endIcon: s, badge: o, highlighted: i = !1, size: l = "sm", ...t }) => /* @__PURE__ */ f(u.Tab, {
|
|
60
|
-
...t,
|
|
61
|
-
className: b(c.tab, r),
|
|
62
|
-
"data-size": l,
|
|
63
|
-
"data-highlighted": i || void 0,
|
|
64
|
-
children: /* @__PURE__ */ f(A, {
|
|
65
|
-
startIcon: n,
|
|
66
|
-
endIcon: s,
|
|
67
|
-
badge: o,
|
|
68
|
-
children: a
|
|
69
|
-
})
|
|
70
|
-
}), B = {
|
|
71
|
-
Root: k,
|
|
72
|
-
List: K,
|
|
73
|
-
Tab: D,
|
|
74
|
-
Panel: N
|
|
75
|
-
};
|
|
76
|
-
export {
|
|
77
|
-
B as t
|
|
78
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const g=require("./isDefined-DS2Q42p5.cjs"),f=require("./useProvidedTextDirection-B7ovnsdr.cjs"),n=require("./TabsTabContent-BseLV1Wk.cjs");let l=require("react/jsx-runtime"),h=require("@base-ui/react/direction-provider"),b=require("@base-ui/react/tabs");var x=({event:e,direction:a,loopFocus:d})=>{if(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return;const s=e.currentTarget,i=Array.from(s.querySelectorAll('[role="tab"]')).filter(r=>r.closest('[role="tablist"]')===s),o=i.findIndex(r=>r===e.target);if(o===-1)return;const u=a==="rtl"?["ArrowLeft","ArrowRight"]:["ArrowRight","ArrowLeft"],[t,T]=s.getAttribute("aria-orientation")==="vertical"?["ArrowDown","ArrowUp"]:u;if(![t,T,"Home","End"].includes(e.key))return;e.preventBaseUIHandler(),e.preventDefault();const c=i.filter(r=>!r.hasAttribute("data-disabled")&&!r.hasAttribute("disabled")&&r.getAttribute("aria-disabled")!=="true"&&!r.closest("[hidden], [inert]"));if(e.key==="Home"){c[0]?.focus();return}if(e.key==="End"){c[c.length-1]?.focus();return}const m=e.key===T,_=m?[...c].reverse():c,y=_.find(r=>m?i.indexOf(r)<o:i.indexOf(r)>o);if(g.isDefined(y)){y.focus();return}d&&_[0]?.focus()},w=({className:e,children:a,onKeyDown:d,loopFocus:s=!0,...i})=>{const o=(0,h.useDirection)(),u=t=>{if(d?.(t),t.defaultPrevented){t.preventBaseUIHandler();return}t.baseUIHandlerPrevented||x({event:t,direction:o,loopFocus:s})};return(0,l.jsxs)(b.Tabs.List,{...i,loopFocus:s,onKeyDown:u,className:f.mergeClassNames(n.Tab_module_default.list,e),children:[a,(0,l.jsx)(b.Tabs.Indicator,{className:n.Tab_module_default.indicator})]})},A=({className:e,...a})=>(0,l.jsx)(b.Tabs.Panel,{...a,className:f.mergeClassNames(n.Tab_module_default.panel,e)}),q=({className:e,...a})=>(0,l.jsx)(b.Tabs.Root,{...a,className:f.mergeClassNames(n.Tab_module_default.root,e)}),N=({className:e,children:a,startIcon:d,endIcon:s,badge:i,highlighted:o=!1,size:u="sm",...t})=>(0,l.jsx)(b.Tabs.Tab,{...t,className:f.mergeClassNames(n.Tab_module_default.tab,e),"data-size":u,"data-highlighted":o||void 0,children:(0,l.jsx)(n.TabsTabContent,{startIcon:d,endIcon:s,badge:i,children:a})}),K={Root:q,List:w,Tab:N,Panel:A};Object.defineProperty(exports,"Tabs",{enumerable:!0,get:function(){return K}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getOsShortcutSeparator: () => "" | " ";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const n=require("./theme-DumxXtpW.cjs"),s=require("./isDefined-DS2Q42p5.cjs");let c=require("@sniptt/guards"),g=require("react"),b=require("zod");var h=r=>r.replace(/\d+$/,""),d=b.z.enum(n.MAIN_COLOR_NAMES),M=r=>{const e=d.safeParse(r??"");return e.success?e.data:n.DEFAULT_THEME_COLOR_FALLBACK},l=r=>{let e=0;for(let t=0;t<r.length;t++)e=r.charCodeAt(t)+((e<<5)-e);return n.MAIN_COLOR_NAMES[Math.abs(e)%n.MAIN_COLOR_NAMES.length]??n.MAIN_COLOR_NAMES[0]},y=({string:r,variant:e=9,theme:t})=>{if(e<1||e>12)throw new Error("Variant must be between 1 and 12");const o=`${l(r)}${e}`;return t.color[o]},u=()=>{const r=globalThis.navigator?.userAgent;if(!(0,c.isString)(r))return"unknown";const e=r.toLowerCase();return e.includes("ios")||e.includes("iphone")||e.includes("ipad")?"ios":e.includes("mac os x")||e.includes("macos")?"mac":e.includes("windows")?"windows":e.includes("android")?"android":e.includes("linux")?"linux":"unknown"},O=()=>{const r=u();return r==="mac"||r==="ios"?"⌘":"Ctrl"},S=()=>{const r=u();return r==="mac"||r==="ios"?"":" "},m="(max-width: 768px)",f="(hover: none) and (pointer: coarse)",p={getSnapshot:()=>!1,subscribe:()=>()=>{}},a=new WeakMap,v=r=>({getSnapshot:()=>r.matches,subscribe:e=>(r.addEventListener("change",e),()=>r.removeEventListener("change",e))}),E=r=>{const e=a.get(r);if(s.isDefined(e))return e;const t=new Map;return a.set(r,t),t},_=r=>{if(typeof window>"u"||!(0,c.isFunction)(window.matchMedia))return p;const e=E(window.matchMedia),t=e.get(r);if(s.isDefined(t))return t;const o=v(window.matchMedia(r));return e.set(r,o),o},C=()=>!1,i=r=>{const{subscribe:e,getSnapshot:t}=_(r);return(0,g.useSyncExternalStore)(e,t,C)},w=()=>i(m),A=()=>i(f);Object.defineProperty(exports,"MOBILE_MEDIA_QUERY",{enumerable:!0,get:function(){return m}});Object.defineProperty(exports,"TOUCH_DEVICE_MEDIA_QUERY",{enumerable:!0,get:function(){return f}});Object.defineProperty(exports,"getMainColorNameFromPaletteColorName",{enumerable:!0,get:function(){return h}});Object.defineProperty(exports,"getOsControlSymbol",{enumerable:!0,get:function(){return O}});Object.defineProperty(exports,"getOsShortcutSeparator",{enumerable:!0,get:function(){return S}});Object.defineProperty(exports,"getUserDevice",{enumerable:!0,get:function(){return u}});Object.defineProperty(exports,"parseThemeColor",{enumerable:!0,get:function(){return M}});Object.defineProperty(exports,"stringToThemeColor",{enumerable:!0,get:function(){return l}});Object.defineProperty(exports,"stringToThemeColorP3String",{enumerable:!0,get:function(){return y}});Object.defineProperty(exports,"themeColorSchema",{enumerable:!0,get:function(){return d}});Object.defineProperty(exports,"useIsMobile",{enumerable:!0,get:function(){return w}});Object.defineProperty(exports,"useIsTouchDevice",{enumerable:!0,get:function(){return A}});Object.defineProperty(exports,"useMediaQuery",{enumerable:!0,get:function(){return i}});
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { t as s } from "./isDefined-fMi6eQ4r.js";
|
|
2
|
-
import { f as n, h as c } from "./theme-CjHovJAZ.js";
|
|
3
|
-
import { isFunction as d, isString as l } from "@sniptt/guards";
|
|
4
|
-
import { useSyncExternalStore as m } from "react";
|
|
5
|
-
import { z as h } from "zod";
|
|
6
|
-
var O = (r) => r.replace(/\d+$/, ""), v = h.enum(n), I = (r) => {
|
|
7
|
-
const e = v.safeParse(r ?? "");
|
|
8
|
-
return e.success ? e.data : c;
|
|
9
|
-
}, f = (r) => {
|
|
10
|
-
let e = 0;
|
|
11
|
-
for (let t = 0; t < r.length; t++) e = r.charCodeAt(t) + ((e << 5) - e);
|
|
12
|
-
return n[Math.abs(e) % n.length] ?? n[0];
|
|
13
|
-
}, D = ({ string: r, variant: e = 9, theme: t }) => {
|
|
14
|
-
if (e < 1 || e > 12) throw new Error("Variant must be between 1 and 12");
|
|
15
|
-
const a = `${f(r)}${e}`;
|
|
16
|
-
return t.color[a];
|
|
17
|
-
}, i = () => {
|
|
18
|
-
const r = globalThis.navigator?.userAgent;
|
|
19
|
-
if (!l(r)) return "unknown";
|
|
20
|
-
const e = r.toLowerCase();
|
|
21
|
-
return e.includes("ios") || e.includes("iphone") || e.includes("ipad") ? "ios" : e.includes("mac os x") || e.includes("macos") ? "mac" : e.includes("windows") ? "windows" : e.includes("android") ? "android" : e.includes("linux") ? "linux" : "unknown";
|
|
22
|
-
}, U = () => {
|
|
23
|
-
const r = i();
|
|
24
|
-
return r === "mac" || r === "ios" ? "⌘" : "Ctrl";
|
|
25
|
-
}, B = () => {
|
|
26
|
-
const r = i();
|
|
27
|
-
return r === "mac" || r === "ios" ? "" : " ";
|
|
28
|
-
}, S = "(max-width: 768px)", g = "(hover: none) and (pointer: coarse)", M = {
|
|
29
|
-
getSnapshot: () => !1,
|
|
30
|
-
subscribe: () => () => {
|
|
31
|
-
}
|
|
32
|
-
}, o = /* @__PURE__ */ new WeakMap(), p = (r) => ({
|
|
33
|
-
getSnapshot: () => r.matches,
|
|
34
|
-
subscribe: (e) => (r.addEventListener("change", e), () => r.removeEventListener("change", e))
|
|
35
|
-
}), w = (r) => {
|
|
36
|
-
const e = o.get(r);
|
|
37
|
-
if (s(e)) return e;
|
|
38
|
-
const t = /* @__PURE__ */ new Map();
|
|
39
|
-
return o.set(r, t), t;
|
|
40
|
-
}, E = (r) => {
|
|
41
|
-
if (typeof window > "u" || !d(window.matchMedia)) return M;
|
|
42
|
-
const e = w(window.matchMedia), t = e.get(r);
|
|
43
|
-
if (s(t)) return t;
|
|
44
|
-
const a = p(window.matchMedia(r));
|
|
45
|
-
return e.set(r, a), a;
|
|
46
|
-
}, y = () => !1, u = (r) => {
|
|
47
|
-
const { subscribe: e, getSnapshot: t } = E(r);
|
|
48
|
-
return m(e, t, y);
|
|
49
|
-
}, L = () => u(S), R = () => u(g);
|
|
50
|
-
export {
|
|
51
|
-
S as a,
|
|
52
|
-
i as c,
|
|
53
|
-
I as d,
|
|
54
|
-
v as f,
|
|
55
|
-
g as i,
|
|
56
|
-
f as l,
|
|
57
|
-
L as n,
|
|
58
|
-
B as o,
|
|
59
|
-
O as p,
|
|
60
|
-
u as r,
|
|
61
|
-
U as s,
|
|
62
|
-
R as t,
|
|
63
|
-
D as u
|
|
64
|
-
};
|
package/dist/{OverflowingTextWithTooltip-CtHMhu6b.js → OverflowingTextWithTooltip-CNpmkBvJ.js}
RENAMED
|
@@ -6,8 +6,8 @@ import { clsx as y } from "clsx";
|
|
|
6
6
|
import { Fragment as A, jsx as r, jsxs as k } from "react/jsx-runtime";
|
|
7
7
|
import { isNonEmptyString as E, isNumber as X, isString as G } from "@sniptt/guards";
|
|
8
8
|
import { memo as $, useRef as z, useState as S } from "react";
|
|
9
|
-
import { Tooltip as c } from "@base-ui/react/tooltip";
|
|
10
9
|
import { useRender as H } from "@base-ui/react/use-render";
|
|
10
|
+
import { Tooltip as c } from "@base-ui/react/tooltip";
|
|
11
11
|
var B = "_positioner_w2bea_1", J = "_popup_w2bea_5", K = "_content_w2bea_47", Q = "_title_w2bea_53", V = "_icon_w2bea_65", Y = "_description_w2bea_75", Z = "_arrow_w2bea_81", v = {
|
|
12
12
|
positioner: B,
|
|
13
13
|
popup: J,
|
|
File without changes
|