alope-ui 1.2.59 → 1.2.60

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.
@@ -7,7 +7,7 @@ declare const ToggleVariant: {
7
7
  info: string;
8
8
  secondary: string;
9
9
  };
10
- declare const ToggleThumbShape: {
10
+ declare const ToggleShape: {
11
11
  stadium: string;
12
12
  rounded: string;
13
13
  };
@@ -17,9 +17,9 @@ declare const ToggleSize: {
17
17
  lg: string;
18
18
  };
19
19
  export type ToggleProps = {
20
- customSize?: keyof typeof ToggleSize;
20
+ size?: keyof typeof ToggleSize;
21
21
  variant?: keyof typeof ToggleVariant;
22
- thumbShape?: keyof typeof ToggleThumbShape;
22
+ shape?: keyof typeof ToggleShape;
23
23
  label?: string;
24
24
  } & Omit<InputHTMLAttributes<HTMLInputElement>, 'className' | 'size'>;
25
25
  export declare const Toggle: React.FC<ToggleProps>;
package/dist/main.cjs CHANGED
@@ -128,6 +128,6 @@ e&&(e.style.height="auto",e.style.height=`${e.scrollHeight}px`)}
128
128
  return r.useEffect(()=>{l&&m()},[l,i.value]),e.jsxs("div",{className:"w-full",children:[t&&e.jsx("label",{htmlFor:s||o,className:"inline-block text-sm font-medium mb-1 text-gray-900 dark:text-neutral-100",children:t}),e.jsx("textarea",{id:s||o,name:o,rows:l?1:5,ref:c,onInput:e=>{l&&m(),d?.(e)},className:a.cn("w-full block px-3 py-2 border rounded-md shadow-sm sm:text-sm min-h-[58px] max-h-[10rem] transition-colors","bg-white border-gray-200 text-gray-900 placeholder:text-gray-400","dark:bg-neutral-900 dark:border-neutral-800 dark:text-neutral-100 dark:placeholder:text-neutral-500","focus:outline-none focus:ring-1 focus:ring-primary focus:border-primary dark:focus:ring-primary-dark dark:focus:border-primary-dark",l?"resize-none overflow-hidden":"resize-y overflow-y-auto",n&&"border-error dark:border-error-dark focus:ring-error focus:border-error dark:focus:ring-error-dark dark:focus:border-error-dark",i.disabled&&"opacity-50 bg-gray-100 dark:bg-neutral-800 cursor-not-allowed"),...i}),n&&e.jsx("p",{className:"mt-1 text-sm text-error dark:text-error-dark",children:n})]})},exports.Timeline=me,exports.ToastProvider=({children:a})=>{const[t,s]=r.useState([]),o=Object.keys(F)
129
129
  return e.jsxs(U.Provider,{value:{addToast:({title:e,message:r,type:a,variant:t,icon:o,withClose:n=!0,withLoading:l=!1,onClose:d,position:i="bottom-right"})=>{const c=Date.now()+Math.random()
130
130
  s(s=>[...s,{title:e,id:c,message:r,type:a,variant:t,icon:o,withClose:n,withLoading:l,onClose:d,position:i}])}},children:[a,o.map(r=>e.jsx("div",{className:`fixed z-50 ${F[r]}`,children:t.filter(e=>e.position===r).map(r=>e.jsx(q,{title:r.title,message:r.message,type:r.type,variant:r.variant,icon:r.icon,withClose:r.withClose,withLoading:r.withLoading,position:r.position,onClose:()=>{var e
131
- r.onClose?.(),e=r.id,s(r=>r.filter(r=>r.id!==e))}},r.id))},r))]})},exports.Toggle=({variant:r="primary",customSize:t="md",thumbShape:s="stadium",label:o,disabled:n,...l})=>e.jsxs("label",{className:a.cn("relative inline-flex items-center select-none",n?"cursor-not-allowed opacity-50":"cursor-pointer"),children:[e.jsx("input",{type:"checkbox",disabled:n,className:"sr-only peer pointer-events-none",...l}),e.jsx("div",{className:a.cn("relative shrink-0 transition-colors duration-300","bg-gray-300 dark:bg-neutral-800","peer-focus-visible:ring-2 peer-focus-visible:ring-primary/50 dark:peer-focus-visible:ring-primary-dark/50","after:content-[''] after:absolute after:bg-white after:shadow-xs after:transition-transform after:duration-300",ge[t],ue[r],xe[s])}),o&&e.jsx("span",{className:"ms-3 text-sm font-medium text-gray-900 dark:text-neutral-100",children:o})]}),exports.Tooltip=J,exports.getVariantClasses=j,exports.useToast=()=>{const e=r.useContext(U)
131
+ r.onClose?.(),e=r.id,s(r=>r.filter(r=>r.id!==e))}},r.id))},r))]})},exports.Toggle=({variant:r="primary",size:t="md",shape:s="stadium",label:o,disabled:n,...l})=>e.jsxs("label",{className:a.cn("relative inline-flex items-center select-none",n?"cursor-not-allowed opacity-50":"cursor-pointer"),children:[e.jsx("input",{type:"checkbox",disabled:n,className:"sr-only peer pointer-events-none",...l}),e.jsx("div",{className:a.cn("relative shrink-0 transition-colors duration-300","bg-gray-300 dark:bg-neutral-800","peer-focus-visible:ring-2 peer-focus-visible:ring-primary/50 dark:peer-focus-visible:ring-primary-dark/50","after:content-[''] after:absolute after:bg-white after:shadow-xs after:transition-transform after:duration-300",ge[t],ue[r],xe[s])}),o&&e.jsx("span",{className:"ms-3 text-sm font-medium text-gray-900 dark:text-neutral-100",children:o})]}),exports.Tooltip=J,exports.getVariantClasses=j,exports.useToast=()=>{const e=r.useContext(U)
132
132
  if(!e)throw new Error("useToast must be used within a ToastProvider")
133
133
  return e}
package/dist/main.js CHANGED
@@ -3189,7 +3189,7 @@ const ToggleVariant = {
3189
3189
  info: "peer-checked:bg-info dark:peer-checked:bg-info-dark",
3190
3190
  secondary: "peer-checked:bg-secondary dark:peer-checked:bg-secondary-dark"
3191
3191
  };
3192
- const ToggleThumbShape = {
3192
+ const ToggleShape = {
3193
3193
  stadium: "rounded-full after:rounded-full",
3194
3194
  rounded: "rounded-md after:rounded-sm"
3195
3195
  };
@@ -3200,8 +3200,8 @@ const ToggleSize = {
3200
3200
  };
3201
3201
  const Toggle = ({
3202
3202
  variant = "primary",
3203
- customSize: size = "md",
3204
- thumbShape = "stadium",
3203
+ size = "md",
3204
+ shape = "stadium",
3205
3205
  label,
3206
3206
  disabled,
3207
3207
  ...props
@@ -3233,7 +3233,7 @@ const Toggle = ({
3233
3233
  "after:content-[''] after:absolute after:bg-white after:shadow-xs after:transition-transform after:duration-300",
3234
3234
  ToggleSize[size],
3235
3235
  ToggleVariant[variant],
3236
- ToggleThumbShape[thumbShape]
3236
+ ToggleShape[shape]
3237
3237
  )
3238
3238
  }
3239
3239
  ),
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/Alope-Community/alope-ui.git"
7
7
  },
8
- "version": "1.2.59",
8
+ "version": "1.2.60",
9
9
  "type": "module",
10
10
  "files": [
11
11
  "dist"