alope-ui 1.2.53 → 1.2.54

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/main.cjs CHANGED
@@ -115,7 +115,7 @@ return e.jsxs("p",{className:"dark:text-white",children:["Showing ",a," - ",t,"
115
115
  const o=t===r,n=a.cn("px-3 py-1 rounded-lg border",o?"bg-primary text-white dark:bg-primary-dark dark:border-primary-dark":"hover:bg-secondary hover:cursor-pointer dark:border-gray-600 dark:text-white dark:hover:bg-gray-700",f,o&&"pointer-events-none")
116
116
  return l?e.jsx("a",{className:n,href:w(Number(t)),onClick:e=>{e.preventDefault(),h(Number(t))},children:t},s):e.jsx("button",{className:n,onClick:()=>h(Number(t)),children:t},s)}),j]})},exports.RadioInput=({name:r,options:t,selectedValue:s,onValueChange:o,variant:n="subtle",radioSize:l="md",disabled:d,...i})=>{const c=J[l],m=Q[n]
117
117
  return e.jsx("div",{className:"flex flex-wrap gap-3",children:t.map((t,n)=>{const l=s?.value===t.value
118
- return e.jsxs("label",{className:a.cn("relative flex items-center rounded-md cursor-pointer transition-all duration-200 border px-3 py-2 select-none",c.container,m.label,{[m.checked]:l,"opacity-50 cursor-not-allowed":d}),children:[e.jsx("input",{type:"radio",name:r,value:t.value,checked:l,onChange:()=>o(t),disabled:d,className:a.cn("absolute opacity-0 w-full h-full cursor-pointer",{"cursor-not-allowed":d}),...i}),e.jsx("span",{className:a.cn("flex items-center justify-center rounded-full border transition-all duration-200",c.radio,m.radio,{[m.checkedRadio]:l}),children:l&&e.jsx("span",{className:"w-1/2 h-1/2 rounded-full bg-white transition-transform duration-200 scale-100"})}),e.jsx("span",{className:a.cn("ml-2",c.label),children:t.label})]},t.value??n)})})},exports.SelectInput=({label:r,error:t,...o})=>{const n={clearIndicator:()=>"cursor-pointer text-gray-400 hover:!text-error dark:hover:!text-error-dark transition-colors",dropdownIndicator:()=>"cursor-pointer text-gray-400 hover:!text-gray-600 dark:hover:!text-gray-200 transition-colors",control:({isFocused:e,isDisabled:r})=>a.cn("!w-full !border !rounded-md !shadow-sm sm:!text-sm !min-h-[38px] !bg-transparent transition-colors",r&&"!opacity-50 !cursor-not-allowed",t?e?"!border-error !ring-1 !ring-error":"!border-error dark:!border-error-dark":e?"!border-primary !ring-1 !ring-primary":"!border-secondary dark:!border-secondary-dark"),option:({isFocused:e,isSelected:r})=>a.cn("!px-4 !py-2 !cursor-pointer transition-colors",r?"!bg-primary !text-white":e?"!bg-primary/30 dark:!bg-primary-dark/30 dark:!text-white":"!bg-white dark:!bg-gray-700 dark:!text-white"),multiValue:()=>"!bg-primary/20 dark:!bg-primary-dark/30 !rounded-md !flex !items-center !mr-1",multiValueLabel:()=>"!text-primary-700 dark:!text-white !text-sm !px-2 !py-0.5",multiValueRemove:()=>"!text-primary-700 dark:!text-white hover:!bg-primary/30 !rounded-r-md !px-1 !cursor-pointer transition-colors",menu:()=>"!mt-1 dark:!text-white !border !border-secondary dark:!border-secondary-dark !bg-white dark:!bg-gray-700 !rounded-md !shadow-lg !z-20 overflow-hidden",input:()=>"!text-gray-900 dark:!text-white",placeholder:()=>"!text-gray-400",singleValue:()=>"!text-gray-900 dark:!text-white",noOptionsMessage:()=>"!text-gray-500 dark:!text-gray-300 !py-2 !text-sm"}
118
+ return e.jsxs("label",{className:a.cn("relative flex items-center rounded-md cursor-pointer transition-all duration-200 border px-3 py-2 select-none",c.container,m.label,{[m.checked]:l,"opacity-50 cursor-not-allowed":d}),children:[e.jsx("input",{type:"radio",name:r,value:t.value,checked:l,onChange:()=>o(t),disabled:d,className:a.cn("absolute opacity-0 w-full h-full cursor-pointer",{"cursor-not-allowed":d}),...i}),e.jsx("span",{className:a.cn("flex items-center justify-center rounded-full border transition-all duration-200",c.radio,m.radio,{[m.checkedRadio]:l}),children:l&&e.jsx("span",{className:"w-1/2 h-1/2 rounded-full bg-white transition-transform duration-200 scale-100"})}),e.jsx("span",{className:a.cn("ml-2",c.label),children:t.label})]},t.value??n)})})},exports.SelectInput=({label:r,error:t,...o})=>{const n={clearIndicator:()=>"cursor-pointer text-gray-400 dark:text-gray-400 hover:!text-error dark:hover:!text-error-dark transition-colors",dropdownIndicator:()=>"cursor-pointer text-gray-400 dark:text-gray-400 hover:!text-gray-600 dark:hover:!text-gray-200 transition-colors",indicatorSeparator:()=>"!bg-gray-300 dark:!bg-gray-600",control:({isFocused:e,isDisabled:r})=>a.cn("!w-full !border !rounded-md !shadow-sm sm:!text-sm !min-h-[38px] !bg-transparent dark:!bg-gray-800/50 transition-colors",r&&"!opacity-50 !cursor-not-allowed",t?e?"!border-error dark:!border-error-dark !ring-1 !ring-error dark:!ring-error-dark":"!border-error dark:!border-error-dark":e?"!border-primary dark:!border-primary-dark !ring-1 !ring-primary dark:!ring-primary-dark":"!border-gray-300 dark:!border-gray-600"),option:({isFocused:e,isSelected:r})=>a.cn("!px-4 !py-2 !cursor-pointer transition-colors",r?"!bg-primary dark:!bg-primary-dark !text-white":e?"!bg-primary/30 dark:!bg-primary/30 text-primary-700 dark:!text-white":"!bg-white dark:!bg-gray-800 text-gray-900 dark:!text-white"),multiValue:()=>"!bg-primary/30 dark:!bg-primary/30 !rounded-md !flex !items-center !mr-1",multiValueLabel:()=>"!text-primary-700 dark:!text-white !text-sm !px-2 !py-0.5",multiValueRemove:()=>"!text-primary-700 dark:!text-white hover:!bg-primary/40 dark:hover:!bg-primary/50 !rounded-r-md !px-1 !cursor-pointer transition-colors",menu:()=>"!mt-1 !border !border-gray-200 dark:!border-gray-600 !bg-white dark:!bg-gray-800 dark:!text-white !rounded-md !shadow-lg !z-20 overflow-hidden",input:()=>"!text-gray-900 dark:!text-white",placeholder:()=>"!text-gray-400 dark:!text-gray-400",singleValue:()=>"!text-gray-900 dark:!text-white",noOptionsMessage:()=>"!text-gray-500 dark:!text-gray-400 !py-2 !text-sm"}
119
119
  return e.jsxs("div",{className:"w-full",children:[r&&e.jsx("label",{className:"block text-sm font-medium text-gray-900 dark:text-white mb-1",children:r}),e.jsx(s,{classNames:n,...o}),t&&e.jsx("p",{className:"mt-1 text-sm text-error dark:text-error-dark",children:t})]})},exports.Skeleton=({width:a,height:t,rounded:s=!1,isLoading:o=!0,animode:n="flash",children:l})=>{if(!o)return e.jsx(e.Fragment,{children:l})
120
120
  const d={width:a??"fit-content",height:t??(l?"auto":"1rem")}
121
121
  return l?e.jsx(e.Fragment,{children:r.Children.map(l,(r,a)=>e.jsx("div",{className:`${n} ${s?"rounded-full":"rounded-sm"} mb-1`,style:d,children:e.jsx("span",{className:"invisible",children:r})},a))}):e.jsx("div",{className:`${n} ${s?"rounded-full":"rounded-sm"}`,style:d})},exports.Slider=({id:t,name:s,label:o,min:n=0,disabled:l,max:d=100,step:i=1,value:c,showTooltip:m=!0,showMarks:u=!0,onChange:g,color:x="primary",prefixIcon:b,suffixIcon:p,sliderSize:h="md"})=>{const[k,f]=r.useState(!1),y=re[x],w=ae[h],v={sm:12,md:16,lg:20,xl:24}[h]
package/dist/main.js CHANGED
@@ -2633,25 +2633,26 @@ const RadioInput = ({
2633
2633
  };
2634
2634
  const SelectInput = ({ label, error, ...props }) => {
2635
2635
  const defaultClassNames = {
2636
- clearIndicator: () => "cursor-pointer text-gray-400 hover:!text-error dark:hover:!text-error-dark transition-colors",
2637
- dropdownIndicator: () => "cursor-pointer text-gray-400 hover:!text-gray-600 dark:hover:!text-gray-200 transition-colors",
2636
+ clearIndicator: () => "cursor-pointer text-gray-400 dark:text-gray-400 hover:!text-error dark:hover:!text-error-dark transition-colors",
2637
+ dropdownIndicator: () => "cursor-pointer text-gray-400 dark:text-gray-400 hover:!text-gray-600 dark:hover:!text-gray-200 transition-colors",
2638
+ indicatorSeparator: () => "!bg-gray-300 dark:!bg-gray-600",
2638
2639
  control: ({ isFocused, isDisabled }) => cn(
2639
- "!w-full !border !rounded-md !shadow-sm sm:!text-sm !min-h-[38px] !bg-transparent transition-colors",
2640
+ "!w-full !border !rounded-md !shadow-sm sm:!text-sm !min-h-[38px] !bg-transparent dark:!bg-gray-800/50 transition-colors",
2640
2641
  isDisabled && "!opacity-50 !cursor-not-allowed",
2641
- error ? isFocused ? "!border-error !ring-1 !ring-error" : "!border-error dark:!border-error-dark" : isFocused ? "!border-primary !ring-1 !ring-primary" : "!border-secondary dark:!border-secondary-dark"
2642
+ error ? isFocused ? "!border-error dark:!border-error-dark !ring-1 !ring-error dark:!ring-error-dark" : "!border-error dark:!border-error-dark" : isFocused ? "!border-primary dark:!border-primary-dark !ring-1 !ring-primary dark:!ring-primary-dark" : "!border-gray-300 dark:!border-gray-600"
2642
2643
  ),
2643
2644
  option: ({ isFocused, isSelected }) => cn(
2644
2645
  "!px-4 !py-2 !cursor-pointer transition-colors",
2645
- isSelected ? "!bg-primary !text-white" : isFocused ? "!bg-primary/30 dark:!bg-primary-dark/30 dark:!text-white" : "!bg-white dark:!bg-gray-700 dark:!text-white"
2646
+ isSelected ? "!bg-primary dark:!bg-primary-dark !text-white" : isFocused ? "!bg-primary/30 dark:!bg-primary/30 text-primary-700 dark:!text-white" : "!bg-white dark:!bg-gray-800 text-gray-900 dark:!text-white"
2646
2647
  ),
2647
- multiValue: () => "!bg-primary/20 dark:!bg-primary-dark/30 !rounded-md !flex !items-center !mr-1",
2648
+ multiValue: () => "!bg-primary/30 dark:!bg-primary/30 !rounded-md !flex !items-center !mr-1",
2648
2649
  multiValueLabel: () => "!text-primary-700 dark:!text-white !text-sm !px-2 !py-0.5",
2649
- multiValueRemove: () => "!text-primary-700 dark:!text-white hover:!bg-primary/30 !rounded-r-md !px-1 !cursor-pointer transition-colors",
2650
- menu: () => "!mt-1 dark:!text-white !border !border-secondary dark:!border-secondary-dark !bg-white dark:!bg-gray-700 !rounded-md !shadow-lg !z-20 overflow-hidden",
2650
+ multiValueRemove: () => "!text-primary-700 dark:!text-white hover:!bg-primary/40 dark:hover:!bg-primary/50 !rounded-r-md !px-1 !cursor-pointer transition-colors",
2651
+ menu: () => "!mt-1 !border !border-gray-200 dark:!border-gray-600 !bg-white dark:!bg-gray-800 dark:!text-white !rounded-md !shadow-lg !z-20 overflow-hidden",
2651
2652
  input: () => "!text-gray-900 dark:!text-white",
2652
- placeholder: () => "!text-gray-400",
2653
+ placeholder: () => "!text-gray-400 dark:!text-gray-400",
2653
2654
  singleValue: () => "!text-gray-900 dark:!text-white",
2654
- noOptionsMessage: () => "!text-gray-500 dark:!text-gray-300 !py-2 !text-sm"
2655
+ noOptionsMessage: () => "!text-gray-500 dark:!text-gray-400 !py-2 !text-sm"
2655
2656
  };
2656
2657
  return /* @__PURE__ */ jsxs("div", { className: "w-full", children: [
2657
2658
  label && /* @__PURE__ */ jsx("label", { className: "block text-sm font-medium text-gray-900 dark:text-white mb-1", children: label }),
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.53",
8
+ "version": "1.2.54",
9
9
  "type": "module",
10
10
  "files": [
11
11
  "dist"