alope-ui 1.2.54 → 1.2.55
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 +2 -2
- package/dist/main.js +15 -15
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -115,8 +115,8 @@ 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-
|
|
119
|
-
return e.jsxs("div",{className:"w-full",children:[r&&e.jsx("label",{className:"block text-sm font-medium text-gray-900 dark:text-
|
|
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-500 dark:!text-neutral-400 hover:!text-error dark:hover:!text-error-dark transition-colors",dropdownIndicator:()=>"!cursor-pointer !text-gray-500 dark:!text-neutral-400 hover:!text-gray-800 dark:hover:!text-neutral-100 transition-colors",indicatorSeparator:()=>"!bg-gray-200 dark:!bg-neutral-800",control:({isFocused:e,isDisabled:r})=>a.cn("!w-full !border !rounded-md !shadow-sm sm:!text-sm !min-h-[38px] !bg-white dark:!bg-neutral-900 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-200 dark:!border-neutral-800"),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-gray-100 dark:!bg-neutral-800 !text-gray-900 dark:!text-neutral-100":"!bg-white dark:!bg-neutral-900 !text-gray-700 dark:!text-neutral-300"),multiValue:()=>"!bg-gray-100 dark:!bg-neutral-800 !rounded-md !flex !items-center !mr-1",multiValueLabel:()=>"!text-gray-800 dark:!text-neutral-100 !text-sm !px-2 !py-0.5",multiValueRemove:()=>"!text-gray-500 dark:!text-neutral-400 hover:!bg-gray-200 dark:hover:!bg-neutral-700 hover:!text-gray-800 dark:hover:!text-neutral-100 !rounded-r-md !px-1 !cursor-pointer transition-colors",menu:()=>"!mt-1 !border !border-gray-200 dark:!border-neutral-800 !bg-white dark:!bg-neutral-900 !rounded-md !shadow-lg !z-20 overflow-hidden",input:()=>"!text-gray-900 dark:!text-neutral-100",placeholder:()=>"!text-gray-400 dark:!text-neutral-500",singleValue:()=>"!text-gray-900 dark:!text-neutral-100",noOptionsMessage:()=>"!text-gray-500 dark:!text-neutral-400 !py-2 !text-sm"}
|
|
119
|
+
return e.jsxs("div",{className:"w-full",children:[r&&e.jsx("label",{className:"block text-sm font-medium text-gray-900 dark:text-neutral-100 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]
|
|
122
122
|
return e.jsxs("div",{className:"w-full p-4 relative overflow-x-clip",children:[o&&e.jsx("label",{htmlFor:t||s,className:"block text-sm font-medium mb-1 dark:text-white",children:o}),e.jsxs("div",{className:"flex gap-3 items-center relative",children:[b,e.jsxs("div",{className:"relative w-full flex items-center",onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),children:[m&&e.jsx("div",{className:"absolute z-10 -top-7 transition-opacity duration-300",style:(()=>{const e=Number(d)-Number(n),r=0===e?0:(Number(c)-Number(n))/e
|
package/dist/main.js
CHANGED
|
@@ -2633,29 +2633,29 @@ const RadioInput = ({
|
|
|
2633
2633
|
};
|
|
2634
2634
|
const SelectInput = ({ label, error, ...props }) => {
|
|
2635
2635
|
const defaultClassNames = {
|
|
2636
|
-
clearIndicator: () => "cursor-pointer text-gray-
|
|
2637
|
-
dropdownIndicator: () => "cursor-pointer text-gray-
|
|
2638
|
-
indicatorSeparator: () => "!bg-gray-
|
|
2636
|
+
clearIndicator: () => "!cursor-pointer !text-gray-500 dark:!text-neutral-400 hover:!text-error dark:hover:!text-error-dark transition-colors",
|
|
2637
|
+
dropdownIndicator: () => "!cursor-pointer !text-gray-500 dark:!text-neutral-400 hover:!text-gray-800 dark:hover:!text-neutral-100 transition-colors",
|
|
2638
|
+
indicatorSeparator: () => "!bg-gray-200 dark:!bg-neutral-800",
|
|
2639
2639
|
control: ({ isFocused, isDisabled }) => cn(
|
|
2640
|
-
"!w-full !border !rounded-md !shadow-sm sm:!text-sm !min-h-[38px] !bg-
|
|
2640
|
+
"!w-full !border !rounded-md !shadow-sm sm:!text-sm !min-h-[38px] !bg-white dark:!bg-neutral-900 transition-colors",
|
|
2641
2641
|
isDisabled && "!opacity-50 !cursor-not-allowed",
|
|
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-
|
|
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-200 dark:!border-neutral-800"
|
|
2643
2643
|
),
|
|
2644
2644
|
option: ({ isFocused, isSelected }) => cn(
|
|
2645
2645
|
"!px-4 !py-2 !cursor-pointer transition-colors",
|
|
2646
|
-
isSelected ? "!bg-primary dark:!bg-primary-dark !text-white" : isFocused ? "!bg-
|
|
2646
|
+
isSelected ? "!bg-primary dark:!bg-primary-dark !text-white" : isFocused ? "!bg-gray-100 dark:!bg-neutral-800 !text-gray-900 dark:!text-neutral-100" : "!bg-white dark:!bg-neutral-900 !text-gray-700 dark:!text-neutral-300"
|
|
2647
2647
|
),
|
|
2648
|
-
multiValue: () => "!bg-
|
|
2649
|
-
multiValueLabel: () => "!text-
|
|
2650
|
-
multiValueRemove: () => "!text-
|
|
2651
|
-
menu: () => "!mt-1 !border !border-gray-200 dark:!border-
|
|
2652
|
-
input: () => "!text-gray-900 dark:!text-
|
|
2653
|
-
placeholder: () => "!text-gray-400 dark:!text-
|
|
2654
|
-
singleValue: () => "!text-gray-900 dark:!text-
|
|
2655
|
-
noOptionsMessage: () => "!text-gray-500 dark:!text-
|
|
2648
|
+
multiValue: () => "!bg-gray-100 dark:!bg-neutral-800 !rounded-md !flex !items-center !mr-1",
|
|
2649
|
+
multiValueLabel: () => "!text-gray-800 dark:!text-neutral-100 !text-sm !px-2 !py-0.5",
|
|
2650
|
+
multiValueRemove: () => "!text-gray-500 dark:!text-neutral-400 hover:!bg-gray-200 dark:hover:!bg-neutral-700 hover:!text-gray-800 dark:hover:!text-neutral-100 !rounded-r-md !px-1 !cursor-pointer transition-colors",
|
|
2651
|
+
menu: () => "!mt-1 !border !border-gray-200 dark:!border-neutral-800 !bg-white dark:!bg-neutral-900 !rounded-md !shadow-lg !z-20 overflow-hidden",
|
|
2652
|
+
input: () => "!text-gray-900 dark:!text-neutral-100",
|
|
2653
|
+
placeholder: () => "!text-gray-400 dark:!text-neutral-500",
|
|
2654
|
+
singleValue: () => "!text-gray-900 dark:!text-neutral-100",
|
|
2655
|
+
noOptionsMessage: () => "!text-gray-500 dark:!text-neutral-400 !py-2 !text-sm"
|
|
2656
2656
|
};
|
|
2657
2657
|
return /* @__PURE__ */ jsxs("div", { className: "w-full", children: [
|
|
2658
|
-
label && /* @__PURE__ */ jsx("label", { className: "block text-sm font-medium text-gray-900 dark:text-
|
|
2658
|
+
label && /* @__PURE__ */ jsx("label", { className: "block text-sm font-medium text-gray-900 dark:text-neutral-100 mb-1", children: label }),
|
|
2659
2659
|
/* @__PURE__ */ jsx(
|
|
2660
2660
|
Select,
|
|
2661
2661
|
{
|