sodtrack-web-ui 0.86.5 → 0.87.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/README.md +3 -0
- package/dist/chunk-K4WOO5Z2.mjs +1 -0
- package/dist/components/index.d.mts +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/index.mjs +1 -1
- package/dist/components/list-item-arrow.mjs +1 -1
- package/dist/components/list-item-button.mjs +1 -1
- package/dist/components/list-item-checkbox-left.mjs +1 -1
- package/dist/components/list-item-checkbox.mjs +1 -1
- package/dist/components/list-item.mjs +1 -1
- package/dist/components/switch.d.mts +10 -2
- package/dist/components/switch.d.ts +10 -2
- package/dist/components/switch.js +1 -1
- package/dist/components/switch.mjs +1 -1
- package/dist/styles/index.css +1 -1
- package/package.json +1 -1
- package/dist/chunk-K42J25V2.mjs +0 -1
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-XJD5SYZJ.mjs';import {Switch}from'@ark-ui/react/switch';import {Loader2}from'lucide-react';import {jsxs,jsx}from'react/jsx-runtime';var P=["sm","md"],N=["base","status"],T=["primary","secondary"],I=({size:a$1="md",type:t="base",variant:d="primary",className:u,disabled:h,onCheckedChange:p,label:e,icon:g,loading:n=false,...l})=>{let i=n?Loader2:g,b=h||n,k=m=>{p?.(m.checked);};return jsxs(Switch.Root,{className:a("relative flex",u),disabled:b,onCheckedChange:k,...l,readOnly:false,"aria-readonly":false,children:[jsxs(Switch.Control,{className:a("group relative inline-flex shrink-0 cursor-pointer items-center rounded-full","transition-all ring-inset",d==="secondary"&&["ring"],t==="base"&&d==="primary"&&["data-[state=checked]:bg-primary-600","data-[state=unchecked]:bg-primary-200","data-[state=unchecked]:ring-primary-400","data-[state=checked]:hover:not-data-disabled:bg-primary-800","data-[state=unchecked]:hover:not-data-disabled:bg-primary-300","data-[state=checked]:active:not-data-disabled:bg-primary-600","data-[state=checked]:active:not-data-disabled:ring-primary-800","data-[state=unchecked]:active:not-data-disabled:bg-primary-300","data-[state=unchecked]:active:not-data-disabled:ring-primary-700","data-disabled:ring-0!"],t==="base"&&d==="secondary"&&["data-[state=checked]:bg-primary-400","data-[state=checked]:ring-primary-600","data-[state=unchecked]:bg-primary-200","data-[state=unchecked]:ring-primary-500","data-[state=checked]:hover:not-data-disabled:bg-primary-500","data-[state=checked]:hover:not-data-disabled:ring-primary-600","data-[state=unchecked]:hover:not-data-disabled:bg-primary-300","active:not-data-disabled:ring-primary-800","data-[state=unchecked]:active:not-data-disabled:bg-primary-300","data-disabled:ring-neutral-400!"],t==="status"&&d==="primary"&&["data-[state=checked]:bg-success-300","data-[state=unchecked]:bg-neutral-400","data-[state=unchecked]:ring-neutral-600","data-[state=checked]:hover:not-data-disabled:bg-success-500","data-[state=unchecked]:hover:not-data-disabled:bg-neutral-500","data-[state=checked]:active:not-data-disabled:ring-success-800","data-[state=unchecked]:active:not-data-disabled:ring-neutral-800","data-disabled:ring-0!"],t==="status"&&d==="secondary"&&["data-[state=checked]:bg-success-100","data-[state=checked]:ring-success-600","data-[state=unchecked]:bg-neutral-300","data-[state=unchecked]:ring-neutral-600","data-[state=checked]:hover:not-data-disabled:bg-success-300","data-[state=unchecked]:hover:not-data-disabled:bg-neutral-400","data-[state=checked]:active:not-data-disabled:ring-success-800","data-[state=unchecked]:active:not-data-disabled:ring-neutral-800","data-disabled:ring-neutral-400!"],"data-[state=unchecked]:not-active:ring-1","active:not-data-disabled:ring-4","data-disabled:cursor-not-allowed","data-disabled:bg-neutral-300!",!e&&a$1==="sm"&&"h-6 w-10",!e&&a$1==="md"&&"h-8 w-14",e&&a$1==="sm"&&["h-6 gap-2","data-[state=checked]:pl-2 data-[state=checked]:pr-1","data-[state=unchecked]:pl-1.5 data-[state=unchecked]:pr-2.5"],e&&a$1==="md"&&["h-8 gap-2","data-[state=checked]:pl-2 data-[state=checked]:pr-1","data-[state=unchecked]:pl-2 data-[state=unchecked]:pr-3"]),children:[e&&jsx("span",{className:a("leading-[133%] font-medium transition-all select-none",t==="base"&&d==="primary"&&["group-data-[state=checked]:not-group-data-disabled:text-neutral-50","group-data-[state=unchecked]:not-group-data-disabled:text-primary-700"],t==="base"&&d==="secondary"&&["group-data-[state=unchecked]:not-group-data-disabled:text-primary-600","group-data-[state=checked]:not-group-data-disabled:text-primary-800"],t==="status"&&["group-data-[state=checked]:not-group-data-disabled:text-success-800","group-data-[state=unchecked]:not-group-data-disabled:text-neutral-800"],"group-data-disabled:text-neutral-600","group-data-[state=checked]:order-1","group-data-[state=unchecked]:order-2",a$1==="sm"&&"text-xs",a$1==="md"&&"text-sm"),children:e}),jsx(Switch.Thumb,{className:a("flex items-center justify-center rounded-full bg-neutral-50 transition-all shrink-0","group-hover:not-group-data-disabled:ring-8","group-active:not-group-data-disabled:ring-7",t==="base"&&["group-hover:not-group-data-disabled:ring-transparent-primary-400-50","group-active:not-group-data-disabled:ring-transparent-primary-400-50"],t==="status"&&["group-data-[state=checked]:group-hover:not-group-data-disabled:ring-transparent-primary-400-50","group-data-[state=unchecked]:group-hover:not-group-data-disabled:ring-transparent-neutral-800-20","group-data-[state=checked]:group-active:not-group-data-disabled:ring-transparent-primary-400-50","group-data-[state=unchecked]:group-active:not-group-data-disabled:ring-transparent-neutral-800-20"],"group-data-disabled:ring-0!",a$1==="sm"&&"size-4 data-[state=unchecked]:size-3",a$1==="md"&&"size-6 data-[state=unchecked]:size-4",a$1==="sm"&&["group-active:data-[state=checked]:not-group-data-disabled:scale-[1.125]","group-active:data-[state=unchecked]:not-group-data-disabled:scale-[1.5]"],a$1==="md"&&["group-active:data-[state=checked]:not-group-data-disabled:scale-[1.08]","group-active:data-[state=unchecked]:not-group-data-disabled:scale-[1.625]"],!e&&"absolute",!e&&a$1==="sm"&&"data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-1.5",!e&&a$1==="md"&&"data-[state=checked]:translate-x-7 data-[state=unchecked]:translate-x-2",e&&"group-data-[state=checked]:order-2",e&&"group-data-[state=unchecked]:order-1"),children:i&&jsx(i,{className:a("transition-colors",n&&"animate-spin",a$1==="sm"&&"size-3 group-data-[state=unchecked]:size-2.5",a$1==="md"&&"size-3.5",t==="base"&&["group-data-[state=checked]:not-group-data-disabled:text-primary-600","group-data-[state=unchecked]:not-group-data-disabled:text-primary-500"],t==="status"&&["group-data-[state=checked]:not-group-data-disabled:text-success-700","group-data-[state=unchecked]:not-group-data-disabled:text-neutral-700"],"group-data-disabled:text-neutral-400")})})]}),jsx(Switch.HiddenInput,{})]})};export{P as a,N as b,T as c,I as d};
|
|
@@ -38,7 +38,7 @@ export { ChipContext, ChipContextColorType, ChipContextColors, ChipContextProps,
|
|
|
38
38
|
export { CountryEnum, CountryTextField, CountryTextFieldProps } from './country-text-field.mjs';
|
|
39
39
|
export { Tooltip, TooltipProps } from './tooltip.mjs';
|
|
40
40
|
export { Checkbox, CheckboxCheckedState, CheckboxCheckedStates, CheckboxProps, CheckboxSize, CheckboxSizes } from './checkbox.mjs';
|
|
41
|
-
export { Switch, SwitchProps, SwitchSizes } from './switch.mjs';
|
|
41
|
+
export { Switch, SwitchProps, SwitchSizes, SwitchTypes, SwitchVariants } from './switch.mjs';
|
|
42
42
|
export { Popover, PopoverContent, PopoverProps, PopoverTrigger } from './popover.mjs';
|
|
43
43
|
export { ToastActionOptions, ToastPlacement, ToastStatus, ToastStatusChangeDetails, ToastType, ToastTypes, Toaster, ToasterProps, toast } from './toast.mjs';
|
|
44
44
|
export { ListItemButton } from './list-item-button.mjs';
|
|
@@ -38,7 +38,7 @@ export { ChipContext, ChipContextColorType, ChipContextColors, ChipContextProps,
|
|
|
38
38
|
export { CountryEnum, CountryTextField, CountryTextFieldProps } from './country-text-field.js';
|
|
39
39
|
export { Tooltip, TooltipProps } from './tooltip.js';
|
|
40
40
|
export { Checkbox, CheckboxCheckedState, CheckboxCheckedStates, CheckboxProps, CheckboxSize, CheckboxSizes } from './checkbox.js';
|
|
41
|
-
export { Switch, SwitchProps, SwitchSizes } from './switch.js';
|
|
41
|
+
export { Switch, SwitchProps, SwitchSizes, SwitchTypes, SwitchVariants } from './switch.js';
|
|
42
42
|
export { Popover, PopoverContent, PopoverProps, PopoverTrigger } from './popover.js';
|
|
43
43
|
export { ToastActionOptions, ToastPlacement, ToastStatus, ToastStatusChangeDetails, ToastType, ToastTypes, Toaster, ToasterProps, toast } from './toast.js';
|
|
44
44
|
export { ListItemButton } from './list-item-button.js';
|