layusoft-ui 1.0.19 → 1.0.20

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.
@@ -0,0 +1,30 @@
1
+ name: Publish to NPM
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ publish:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - name: Checkout Code
13
+ uses: actions/checkout@v4
14
+
15
+ - name: Setup Node.js
16
+ uses: actions/setup-node@v4
17
+ with:
18
+ node-version: '24'
19
+ registry-url: 'https://registry.npmjs.org'
20
+
21
+ - name: Install Dependencies
22
+ run: npm ci --force
23
+
24
+ - name: Build Library
25
+ run: npm run build
26
+
27
+ - name: Publish to NPM
28
+ run: npm publish
29
+ env:
30
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -1,10 +1,10 @@
1
- import { ChangeEventHandler, CSSProperties, KeyboardEventHandler } from 'react';
1
+ import { CSSProperties } from 'react';
2
2
  export interface LyCheckboxInputProps {
3
- name: string;
4
- value?: string;
3
+ label: string;
4
+ isChecked: boolean;
5
+ setIsChecked: (v: boolean) => void;
5
6
  style?: CSSProperties;
6
- onChange?: ChangeEventHandler<HTMLInputElement>;
7
- onKeyUp?: KeyboardEventHandler<HTMLInputElement>;
7
+ required?: boolean;
8
8
  }
9
9
  export declare function LyCheckboxInput(props: LyCheckboxInputProps): import("react/jsx-runtime").JSX.Element;
10
10
  //# sourceMappingURL=checboxinput.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"checboxinput.component.d.ts","sourceRoot":"","sources":["../lib/checboxinput.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAErF,MAAM,WAAW,oBAAoB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,QAAQ,CAAC,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;IAChD,OAAO,CAAC,EAAE,oBAAoB,CAAC,gBAAgB,CAAC,CAAC;CAEpD;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,2CAmB1D"}
1
+ {"version":3,"file":"checboxinput.component.d.ts","sourceRoot":"","sources":["../lib/checboxinput.component.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,MAAM,WAAW,oBAAoB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,2CAmC1D"}
package/dist/index.css CHANGED
@@ -1 +1 @@
1
- @import "https://fonts.googleapis.com/css2?family=Exo+2:ital,wght@0,100..900;1,100..900&display=swap";@layer components;@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-900:oklch(41.4% .112 45.904);--color-yellow-50:oklch(98.7% .026 102.212);--color-purple-600:oklch(55.8% .288 302.321);--color-slate-100:oklch(96.8% .007 247.896);--color-white:#fff;--spacing:.25rem;--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.flex{display:flex}.grid{display:grid}.h-5{height:calc(var(--spacing) * 5)}.w-5{width:calc(var(--spacing) * 5)}.w-52{width:calc(var(--spacing) * 52)}.w-full{width:100%}.cursor-pointer{cursor:pointer}.appearance-none{appearance:none}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.items-center{align-items:center}.justify-around{justify-content:space-around}.gap-5{gap:calc(var(--spacing) * 5)}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-amber-900{border-color:var(--color-amber-900)}.border-slate-100{border-color:var(--color-slate-100)}.bg-yellow-50{background-color:var(--color-yellow-50)}.bg-linear-to-r{--tw-gradient-position:to right}@supports (background-image:linear-gradient(in lab, red, red)){.bg-linear-to-r{--tw-gradient-position:to right in oklab}}.bg-linear-to-r{background-image:linear-gradient(var(--tw-gradient-stops))}.from-red-500{--tw-gradient-from:var(--color-red-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-purple-600{--tw-gradient-to:var(--color-purple-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-size-\[200\%_100\%\]{background-size:200% 100%}.bg-position-\[0\%_0\%\]{background-position:0 0}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.px-12{padding-inline:calc(var(--spacing) * 12)}.py-4{padding-block:calc(var(--spacing) * 4)}.text-center{text-align:center}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-white{color:var(--color-white)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-1000{--tw-duration:1s;transition-duration:1s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.checked\:border-amber-200:checked{border-color:var(--color-amber-200)}.checked\:bg-red-600:checked{background-color:var(--color-red-600)}@media (hover:hover){.hover\:bg-position-\[100\%_0\%\]:hover{background-position:100% 0}.hover\:text-2xl:hover{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-amber-300:focus{--tw-ring-color:var(--color-amber-300)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}}.exo-2-regular{font-optical-sizing:auto;font-family:"Exo 2",sans-serif;font-style:normal;font-weight:500}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}
1
+ @import "https://fonts.googleapis.com/css2?family=Exo+2:ital,wght@0,100..900;1,100..900&display=swap";@layer components;@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-500:oklch(63.7% .237 25.331);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-yellow-700:oklch(55.4% .135 66.442);--color-purple-600:oklch(55.8% .288 302.321);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-300:oklch(86.9% .022 252.894);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-900:oklch(21% .034 264.665);--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-in-out:cubic-bezier(.4, 0, .2, 1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.relative{position:relative}.top-5{top:calc(var(--spacing) * 5)}.right-5{right:calc(var(--spacing) * 5)}.z-10{z-index:10}.z-20{z-index:20}.-mt-0\.5{margin-top:calc(var(--spacing) * -.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mr-4{margin-right:calc(var(--spacing) * 4)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-auto{margin-left:auto}.flex{display:flex}.grid{display:grid}.h-6{height:calc(var(--spacing) * 6)}.min-h-11{min-height:calc(var(--spacing) * 11)}.w-6{width:calc(var(--spacing) * 6)}.w-full{width:100%}.flex-1{flex:1}.scale-0{--tw-scale-x:0%;--tw-scale-y:0%;--tw-scale-z:0%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.rotate-180{rotate:180deg}.cursor-pointer{cursor:pointer}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-5{gap:calc(var(--spacing) * 5)}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-slate-100{border-color:var(--color-slate-100)}.border-slate-300{border-color:var(--color-slate-300)}.border-yellow-200{border-color:var(--color-yellow-200)}.border-yellow-500{border-color:var(--color-yellow-500)}.border-yellow-600{border-color:var(--color-yellow-600)}.bg-white{background-color:var(--color-white)}.bg-yellow-50{background-color:var(--color-yellow-50)}.bg-yellow-100{background-color:var(--color-yellow-100)}.bg-yellow-600{background-color:var(--color-yellow-600)}.bg-linear-to-r{--tw-gradient-position:to right}@supports (background-image:linear-gradient(in lab, red, red)){.bg-linear-to-r{--tw-gradient-position:to right in oklab}}.bg-linear-to-r{background-image:linear-gradient(var(--tw-gradient-stops))}.from-red-500{--tw-gradient-from:var(--color-red-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-purple-600{--tw-gradient-to:var(--color-purple-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-size-\[200\%_100\%\]{background-size:200% 100%}.bg-position-\[0\%_0\%\]{background-position:0 0}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-2{padding:calc(var(--spacing) * 2)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-12{padding-inline:calc(var(--spacing) * 12)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.text-center{text-align:center}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-900{color:var(--color-gray-900)}.text-slate-300{color:var(--color-slate-300)}.text-white{color:var(--color-white)}.text-yellow-500{color:var(--color-yellow-500)}.text-yellow-600{color:var(--color-yellow-600)}.text-yellow-700{color:var(--color-yellow-700)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-yellow-200{--tw-shadow-color:oklch(94.5% .129 101.54)}@supports (color:color-mix(in lab, red, red)){.shadow-yellow-200{--tw-shadow-color:color-mix(in oklab, var(--color-yellow-200) var(--tw-shadow-alpha), transparent)}}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-1000{--tw-duration:1s;transition-duration:1s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media (hover:hover){.group-hover\:border-yellow-400:is(:where(.group):hover *){border-color:var(--color-yellow-400)}}.focus-within\:ring-2:focus-within{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-within\:ring-yellow-100:focus-within{--tw-ring-color:var(--color-yellow-100)}@media (hover:hover){.hover\:border-gray-300:hover{border-color:var(--color-gray-300)}.hover\:border-yellow-500:hover{border-color:var(--color-yellow-500)}.hover\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\:bg-yellow-200:hover{background-color:var(--color-yellow-200)}.hover\:bg-position-\[100\%_0\%\]:hover{background-position:100% 0}.hover\:text-2xl:hover{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-yellow-100:focus{--tw-ring-color:var(--color-yellow-100)}.focus\:ring-yellow-200:focus{--tw-ring-color:var(--color-yellow-200)}}.exo-2-regular{font-optical-sizing:auto;font-family:"Exo 2",sans-serif;font-style:normal;font-weight:500}.password-input{-webkit-text-security:asterisk}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,8 @@
1
1
  export * from './button.component';
2
2
  export * from './textinput.component';
3
3
  export * from './checboxinput.component';
4
+ export * from './passwordinput.component';
5
+ export * from './radioinput.component';
6
+ export * from './selectinput.component';
7
+ export * from './multiselectinput.component';
4
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AACA,OAAO,aAAa,CAAC;AAErB,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AACA,OAAO,aAAa,CAAC;AAErB,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC"}
package/dist/index.js CHANGED
@@ -1,38 +1,308 @@
1
1
  import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
+ import { createElement as n, forwardRef as r, useState as i } from "react";
2
3
  import './index.css';//#region lib/button.component.tsx
3
- function n(t) {
4
+ function a(t) {
4
5
  return /* @__PURE__ */ e("div", {
5
6
  onClick: t.onClick,
6
7
  style: t.style ?? {},
7
- className: "py-4 px-12 text-white rounded cursor-pointer w-52 text-center text-xl exo-2-regular\n bg-linear-to-r from-red-500 to-purple-600 bg-size-[200%_100%] bg-position-[0%_0%] transition-all\n duration-1000 ease-in-out hover:bg-position-[100%_0%] hover:text-2xl shadow-2xl\n ",
8
+ className: "py-4 px-12 text-white rounded cursor-pointer text-center text-xl exo-2-regular\n bg-linear-to-r from-red-500 to-purple-600 bg-size-[200%_100%] bg-position-[0%_0%] transition-all\n duration-1000 ease-in-out hover:bg-position-[100%_0%] hover:text-2xl shadow-2xl\n ",
8
9
  children: /* @__PURE__ */ e("span", { children: t.title })
9
10
  });
10
11
  }
11
12
  //#endregion
12
13
  //#region lib/textinput.component.tsx
13
- function r(t) {
14
+ function o(t) {
14
15
  return /* @__PURE__ */ e("div", {
15
16
  className: "bg-yellow-50 exo-2-regular\n ",
16
17
  children: /* @__PURE__ */ e("input", {
17
- className: "p-4 border border-slate-100 rounded w-full text-xl shadow-xl text-center",
18
+ required: t.required ?? !1,
19
+ type: t.type ?? "text",
20
+ className: "p-4 border border-slate-100 rounded w-full text-xl shadow-xl text-center ring:bg-slate-100\n outline-none transition-all focus:ring-2 focus:ring-yellow-200\n ",
18
21
  ...t
19
22
  })
20
23
  });
21
24
  }
22
25
  //#endregion
26
+ //#region node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
27
+ var s = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), c = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), l = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), u = (e) => {
28
+ let t = l(e);
29
+ return t.charAt(0).toUpperCase() + t.slice(1);
30
+ }, d = {
31
+ xmlns: "http://www.w3.org/2000/svg",
32
+ width: 24,
33
+ height: 24,
34
+ viewBox: "0 0 24 24",
35
+ fill: "none",
36
+ stroke: "currentColor",
37
+ strokeWidth: 2,
38
+ strokeLinecap: "round",
39
+ strokeLinejoin: "round"
40
+ }, f = (e) => {
41
+ for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
42
+ return !1;
43
+ }, p = r(({ color: e = "currentColor", size: t = 24, strokeWidth: r = 2, absoluteStrokeWidth: i, className: a = "", children: o, iconNode: c, ...l }, u) => n("svg", {
44
+ ref: u,
45
+ ...d,
46
+ width: t,
47
+ height: t,
48
+ stroke: e,
49
+ strokeWidth: i ? Number(r) * 24 / Number(t) : r,
50
+ className: s("lucide", a),
51
+ ...!o && !f(l) && { "aria-hidden": "true" },
52
+ ...l
53
+ }, [...c.map(([e, t]) => n(e, t)), ...Array.isArray(o) ? o : [o]])), m = (e, t) => {
54
+ let i = r(({ className: r, ...i }, a) => n(p, {
55
+ ref: a,
56
+ iconNode: t,
57
+ className: s(`lucide-${c(u(e))}`, `lucide-${e}`, r),
58
+ ...i
59
+ }));
60
+ return i.displayName = u(e), i;
61
+ }, h = m("check", [["path", {
62
+ d: "M20 6 9 17l-5-5",
63
+ key: "1gmf2c"
64
+ }]]), g = m("chevron-down", [["path", {
65
+ d: "m6 9 6 6 6-6",
66
+ key: "qrunsl"
67
+ }]]), _ = m("circle-check", [["circle", {
68
+ cx: "12",
69
+ cy: "12",
70
+ r: "10",
71
+ key: "1mglay"
72
+ }], ["path", {
73
+ d: "m9 12 2 2 4-4",
74
+ key: "dzmm74"
75
+ }]]), v = m("eye-off", [
76
+ ["path", {
77
+ d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
78
+ key: "ct8e1f"
79
+ }],
80
+ ["path", {
81
+ d: "M14.084 14.158a3 3 0 0 1-4.242-4.242",
82
+ key: "151rxh"
83
+ }],
84
+ ["path", {
85
+ d: "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",
86
+ key: "13bj9a"
87
+ }],
88
+ ["path", {
89
+ d: "m2 2 20 20",
90
+ key: "1ooewy"
91
+ }]
92
+ ]), y = m("eye", [["path", {
93
+ d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",
94
+ key: "1nclc0"
95
+ }], ["circle", {
96
+ cx: "12",
97
+ cy: "12",
98
+ r: "3",
99
+ key: "1v7zrd"
100
+ }]]), b = m("x", [["path", {
101
+ d: "M18 6 6 18",
102
+ key: "1bl5f8"
103
+ }], ["path", {
104
+ d: "m6 6 12 12",
105
+ key: "d8bk6v"
106
+ }]]);
107
+ //#endregion
23
108
  //#region lib/checboxinput.component.tsx
24
- function i(n) {
109
+ function x(n) {
110
+ return /* @__PURE__ */ t("label", {
111
+ className: "group flex items-start gap-3 cursor-pointer select-none bg-yellow-50 p-4 rounded shadow-xl\n border-2 border-yellow-200",
112
+ children: [/* @__PURE__ */ t("div", {
113
+ className: "relative flex items-center",
114
+ children: [/* @__PURE__ */ e("input", {
115
+ type: "checkbox",
116
+ style: n.style,
117
+ checked: n.isChecked,
118
+ onChange: () => n.setIsChecked(!n.isChecked),
119
+ className: "sr-only"
120
+ }), /* @__PURE__ */ e("div", {
121
+ className: `
122
+ w-6 h-6 rounded-md border-2 transition-all duration-200 flex items-center justify-center
123
+ ${n.isChecked ? "bg-yellow-600 border-yellow-600 shadow-lg shadow-yellow-200" : "bg-white border-gray-300 group-hover:border-yellow-400"}
124
+ `,
125
+ children: /* @__PURE__ */ e(h, {
126
+ size: 16,
127
+ strokeWidth: 4,
128
+ className: `text-white transition-transform duration-200 ${n.isChecked ? "scale-100" : "scale-0"}`
129
+ })
130
+ })]
131
+ }), /* @__PURE__ */ e("div", {
132
+ className: "flex flex-col -mt-0.5",
133
+ children: /* @__PURE__ */ e("span", {
134
+ className: `text-lg font-semibold transition-colors ${n.isChecked ? "text-gray-900" : "text-gray-600"}`,
135
+ children: n.label
136
+ })
137
+ })]
138
+ });
139
+ }
140
+ //#endregion
141
+ //#region lib/passwordinput.component.tsx
142
+ function S(n) {
143
+ let [r, a] = i(!1);
25
144
  return /* @__PURE__ */ t("div", {
26
- className: "exo-2-regular flex flex-row gap-5 p-4 items-center justify-around bg-yellow-50\n ",
145
+ className: "bg-yellow-50 exo-2-regular relative\n ",
27
146
  children: [/* @__PURE__ */ e("input", {
28
- type: "checkbox",
29
- className: "\n appearance-none w-5 h-5 rounded-full border-2 border-amber-900 bg-amber-250\n checked:bg-red-600 checked:border-amber-200\n transition-all duration-200 cursor-pointer\n focus:outline-none focus:ring-2 focus:ring-amber-300 focus:ring-offset-2\n ",
147
+ required: n.required ?? !1,
148
+ type: r ? "text" : "password",
149
+ className: "p-4 border border-slate-100 rounded w-full text-xl shadow-xl text-center\n outline-none transition-all focus:ring-2 focus:ring-yellow-200\n ",
30
150
  ...n
31
- }), /* @__PURE__ */ e("label", {
32
- className: "text-xl exo-2-regular",
33
- children: "AAAAA"
151
+ }), /* @__PURE__ */ e("span", {
152
+ onClick: () => a(!r),
153
+ className: "absolute right-5 top-5 cursor-pointer text-slate-300",
154
+ children: e(r ? y : v, {})
155
+ })]
156
+ });
157
+ }
158
+ //#endregion
159
+ //#region lib/radioinput.component.tsx
160
+ function C(n) {
161
+ return /* @__PURE__ */ e("div", {
162
+ className: "flex flex-col gap-3 exo-2-regular border p-2 rounded-lg border-slate-300 shadow-2xl",
163
+ children: n.options.map((r) => /* @__PURE__ */ t("label", {
164
+ className: `
165
+ relative flex items-center p-4 border-2 rounded-xl cursor-pointer transition-all
166
+ ${n.value === r.id ? "border-yellow-500 bg-yellow-50" : "border-gray-200 hover:border-gray-300 bg-white"}
167
+ `,
168
+ children: [
169
+ /* @__PURE__ */ e("input", {
170
+ type: "radio",
171
+ value: r.id,
172
+ checked: n.value === r.id,
173
+ onChange: n.onChange,
174
+ style: n.style,
175
+ className: "sr-only"
176
+ }),
177
+ r.icon && /* @__PURE__ */ e("div", {
178
+ className: `p-2 rounded-lg mr-4 ${n.value === r.id ? "text-yellow-600" : "text-gray-500"}`,
179
+ children: r.icon
180
+ }),
181
+ /* @__PURE__ */ e("div", {
182
+ className: "flex-1",
183
+ children: /* @__PURE__ */ e("p", {
184
+ className: "font-bold text-gray-900",
185
+ children: r.name
186
+ })
187
+ }),
188
+ n.value === r.id && /* @__PURE__ */ e(_, {
189
+ className: "text-yellow-500 animate-in zoom-in duration-200",
190
+ size: 24
191
+ })
192
+ ]
193
+ }, r.id))
194
+ });
195
+ }
196
+ //#endregion
197
+ //#region lib/selectinput.component.tsx
198
+ function w(n) {
199
+ let [r, a] = i(!1);
200
+ return /* @__PURE__ */ t("div", {
201
+ className: "relative shadow-2xl",
202
+ children: [/* @__PURE__ */ t("button", {
203
+ onClick: () => a(!r),
204
+ className: "w-full flex items-center justify-between p-4\n bg-yellow-50 border border-gray-300 rounded-xl shadow-sm\n hover:border-yellow-500 transition-all focus:ring-2 focus:ring-yellow-100",
205
+ children: [/* @__PURE__ */ t("div", {
206
+ className: "flex items-center gap-3 text-gray-700",
207
+ children: [n.value && /* @__PURE__ */ e("span", {
208
+ className: "text-yellow-500",
209
+ children: n.value.icon
210
+ }), /* @__PURE__ */ e("span", {
211
+ className: "font-medium",
212
+ children: n.value.name
213
+ })]
214
+ }), /* @__PURE__ */ e(g, {
215
+ size: 18,
216
+ className: `text-gray-400 transition-transform duration-200 ${r ? "rotate-180" : ""}`
217
+ })]
218
+ }), r && /* @__PURE__ */ e("div", {
219
+ className: "absolute z-10 w-full mt-2 bg-white border\n border-gray-100 rounded-xl shadow-lg overflow-hidden animate-in fade-in zoom-in-95 duration-100",
220
+ children: n.options.map((r) => /* @__PURE__ */ t("div", {
221
+ onClick: () => {
222
+ n.onChange(r), a(!1);
223
+ },
224
+ className: `
225
+ flex items-center justify-between px-4 py-3 cursor-pointer transition-colors
226
+ ${n.value.id === r.id ? "bg-yellow-50 text-yellow-700" : "hover:bg-gray-50 text-gray-600"}
227
+ `,
228
+ children: [/* @__PURE__ */ t("div", {
229
+ className: "flex items-center gap-3",
230
+ children: [n.value ? r.icon : null, /* @__PURE__ */ e("span", {
231
+ className: "text-sm font-medium",
232
+ children: r.name
233
+ })]
234
+ }), n.value.id === r.id && /* @__PURE__ */ e(h, {
235
+ size: 16,
236
+ className: "text-yellow-600"
237
+ })]
238
+ }, r.id))
239
+ })]
240
+ });
241
+ }
242
+ //#endregion
243
+ //#region lib/multiselectinput.component.tsx
244
+ function T(n) {
245
+ let [r, a] = i(!1), o = (e) => {
246
+ n.value.find((t) => t.id === e.id) ? n.onChange(n.value.filter((t) => t.id !== e.id)) : n.onChange([...n.value, e]);
247
+ }, s = (e) => {
248
+ n.onChange(n.value.filter((t) => t.id !== e));
249
+ };
250
+ return /* @__PURE__ */ t("div", {
251
+ className: "relative exo-2-regular shadow-2xl",
252
+ children: [/* @__PURE__ */ t("div", {
253
+ onClick: () => a(!r),
254
+ className: "min-h-11 w-full flex items-center flex-wrap gap-2 p-4\n bg-yellow-50 border border-gray-300 rounded-xl cursor-pointer\n hover:border-yellow-500 transition-all focus-within:ring-2\n focus-within:ring-yellow-100",
255
+ children: [
256
+ n.value.length === 0 && /* @__PURE__ */ e("span", {
257
+ className: "text-gray-400 text-sm ml-1",
258
+ children: n.title ?? "Select ..."
259
+ }),
260
+ n.value.map((n) => /* @__PURE__ */ t("span", {
261
+ className: "flex items-center gap-1.5 bg-yellow-100 text-yellow-700\n px-2 py-1 rounded-md text-xs font-bold animate-in zoom-in duration-150",
262
+ children: [
263
+ n.icon,
264
+ n.name,
265
+ /* @__PURE__ */ e("button", {
266
+ onClick: (e) => {
267
+ e.stopPropagation(), s(n.id);
268
+ },
269
+ className: "hover:bg-yellow-200 rounded-full p-0.5",
270
+ children: /* @__PURE__ */ e(b, { size: 12 })
271
+ })
272
+ ]
273
+ }, n.id)),
274
+ /* @__PURE__ */ e(g, {
275
+ size: 18,
276
+ className: `ml-auto text-gray-400 transition-transform ${r ? "rotate-180" : ""}`
277
+ })
278
+ ]
279
+ }), r && /* @__PURE__ */ e("div", {
280
+ className: "absolute z-20 w-full mt-2 bg-white border\n border-gray-100 rounded-xl shadow-xl overflow-hidden animate-in slide-in-from-top-2 duration-200",
281
+ children: n.options.map((r) => {
282
+ let i = n.value.find((e) => e.id === r.id);
283
+ return /* @__PURE__ */ t("div", {
284
+ onClick: () => o(r),
285
+ className: `
286
+ flex items-center justify-between px-4 py-2.5 cursor-pointer transition-colors
287
+ ${i ? "bg-yellow-50 text-yellow-700 font-semibold" : "hover:bg-gray-50 text-gray-600"}
288
+ `,
289
+ children: [/* @__PURE__ */ t("div", {
290
+ className: "flex items-center gap-3",
291
+ children: [/* @__PURE__ */ e("span", {
292
+ className: i ? "text-yellow-500" : "text-gray-400",
293
+ children: r.icon
294
+ }), /* @__PURE__ */ e("span", {
295
+ className: "text-sm",
296
+ children: r.name
297
+ })]
298
+ }), i && /* @__PURE__ */ e(h, {
299
+ size: 16,
300
+ className: "text-yellow-600"
301
+ })]
302
+ }, r.id);
303
+ })
34
304
  })]
35
305
  });
36
306
  }
37
307
  //#endregion
38
- export { n as LyButton, i as LyCheckboxInput, r as LyTextInput };
308
+ export { a as LyButton, x as LyCheckboxInput, T as LyMultiSelectInput, S as LyPasswordInput, C as LyRadioInput, w as LySelectInput, o as LyTextInput };
@@ -0,0 +1,15 @@
1
+ import { CSSProperties, JSX } from 'react';
2
+ export interface LyMultiSelectOption {
3
+ id: string;
4
+ name: string;
5
+ icon: JSX.Element;
6
+ }
7
+ export interface LyMultiSelectInputProps {
8
+ options: LyMultiSelectOption[];
9
+ value: LyMultiSelectOption[];
10
+ style?: CSSProperties;
11
+ onChange: (items: LyMultiSelectOption[]) => void;
12
+ title?: string;
13
+ }
14
+ export declare function LyMultiSelectInput(props: LyMultiSelectInputProps): import("react/jsx-runtime").JSX.Element;
15
+ //# sourceMappingURL=multiselectinput.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"multiselectinput.component.d.ts","sourceRoot":"","sources":["../lib/multiselectinput.component.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,aAAa,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAE/D,MAAM,WAAW,mBAAmB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,uBAAuB;IACpC,OAAO,EAAE,mBAAmB,EAAE,CAAC;IAC/B,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAC7B,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,QAAQ,EAAE,CAAC,KAAK,EAAE,mBAAmB,EAAE,KAAK,IAAI,CAAC;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,2CA6EhE"}
@@ -0,0 +1,10 @@
1
+ import { ChangeEventHandler, CSSProperties, KeyboardEventHandler } from 'react';
2
+ export interface LyPasswordProps {
3
+ value?: string;
4
+ style?: CSSProperties;
5
+ onChange?: ChangeEventHandler<HTMLInputElement>;
6
+ onKeyUp?: KeyboardEventHandler<HTMLInputElement>;
7
+ required?: boolean;
8
+ }
9
+ export declare function LyPasswordInput(props: LyPasswordProps): import("react/jsx-runtime").JSX.Element;
10
+ //# sourceMappingURL=passwordinput.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"passwordinput.component.d.ts","sourceRoot":"","sources":["../lib/passwordinput.component.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,kBAAkB,EAAE,KAAK,aAAa,EAAE,KAAK,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAGzG,MAAM,WAAW,eAAe;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,QAAQ,CAAC,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;IAChD,OAAO,CAAC,EAAE,oBAAoB,CAAC,gBAAgB,CAAC,CAAC;IACjD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,eAAe,2CAwBrD"}
@@ -0,0 +1,14 @@
1
+ import { ChangeEventHandler, CSSProperties, JSX } from 'react';
2
+ export interface LyRadioOption {
3
+ id: string;
4
+ name: string;
5
+ icon?: JSX.Element;
6
+ }
7
+ export interface LyRadioInputProps {
8
+ options: LyRadioOption[];
9
+ value: string;
10
+ style?: CSSProperties;
11
+ onChange?: ChangeEventHandler<HTMLInputElement>;
12
+ }
13
+ export declare function LyRadioInput(props: LyRadioInputProps): import("react/jsx-runtime").JSX.Element;
14
+ //# sourceMappingURL=radioinput.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radioinput.component.d.ts","sourceRoot":"","sources":["../lib/radioinput.component.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,aAAa,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAE9E,MAAM,WAAW,aAAa;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IAC9B,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,QAAQ,CAAC,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;CACnD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CA0CpD"}
@@ -0,0 +1,14 @@
1
+ import { CSSProperties, JSX } from 'react';
2
+ export interface LySelectOption {
3
+ id: string;
4
+ name: string;
5
+ icon: JSX.Element;
6
+ }
7
+ export interface LySelectInputProps {
8
+ options: LySelectOption[];
9
+ value: LySelectOption;
10
+ style?: CSSProperties;
11
+ onChange: (item: LySelectOption) => void;
12
+ }
13
+ export declare function LySelectInput(props: LySelectInputProps): import("react/jsx-runtime").JSX.Element;
14
+ //# sourceMappingURL=selectinput.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selectinput.component.d.ts","sourceRoot":"","sources":["../lib/selectinput.component.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,aAAa,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAE/D,MAAM,WAAW,cAAc;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,kBAAkB;IAC/B,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,KAAK,EAAE,cAAc,CAAC;IACtB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,QAAQ,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,CAAC;CAC5C;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,2CAsDtD"}
@@ -1,10 +1,11 @@
1
- import { ChangeEventHandler, CSSProperties, KeyboardEventHandler } from 'react';
1
+ import { ChangeEventHandler, CSSProperties, HTMLInputTypeAttribute, KeyboardEventHandler } from 'react';
2
2
  export interface LyInputProps {
3
- name: string;
4
3
  value?: string;
5
4
  style?: CSSProperties;
6
5
  onChange?: ChangeEventHandler<HTMLInputElement>;
7
6
  onKeyUp?: KeyboardEventHandler<HTMLInputElement>;
7
+ required?: boolean;
8
+ type?: HTMLInputTypeAttribute;
8
9
  }
9
10
  export declare function LyTextInput(props: LyInputProps): import("react/jsx-runtime").JSX.Element;
10
11
  //# sourceMappingURL=textinput.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"textinput.component.d.ts","sourceRoot":"","sources":["../lib/textinput.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAErF,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,QAAQ,CAAC,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;IAChD,OAAO,CAAC,EAAE,oBAAoB,CAAC,gBAAgB,CAAC,CAAC;CAEpD;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,YAAY,2CAU9C"}
1
+ {"version":3,"file":"textinput.component.d.ts","sourceRoot":"","sources":["../lib/textinput.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAE7G,MAAM,WAAW,YAAY;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,QAAQ,CAAC,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;IAChD,OAAO,CAAC,EAAE,oBAAoB,CAAC,gBAAgB,CAAC,CAAC;IACjD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,sBAAsB,CAAC;CACjC;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,YAAY,2CAc9C"}
@@ -11,7 +11,7 @@ export function LyButton(props: LyButtonProps) {
11
11
  return (
12
12
  <div onClick={props.onClick}
13
13
  style={props.style ?? {}}
14
- className="py-4 px-12 text-white rounded cursor-pointer w-52 text-center text-xl exo-2-regular
14
+ className="py-4 px-12 text-white rounded cursor-pointer text-center text-xl exo-2-regular
15
15
  bg-linear-to-r from-red-500 to-purple-600 bg-size-[200%_100%] bg-position-[0%_0%] transition-all
16
16
  duration-1000 ease-in-out hover:bg-position-[100%_0%] hover:text-2xl shadow-2xl
17
17
  ">
@@ -1,31 +1,47 @@
1
- import type { ChangeEventHandler, CSSProperties, KeyboardEventHandler } from "react";
1
+ import { Check } from "lucide-react";
2
+ import { type CSSProperties } from "react";
2
3
 
3
4
  export interface LyCheckboxInputProps {
4
- name: string;
5
- value?: string;
5
+ label: string;
6
+ isChecked: boolean;
7
+ setIsChecked: (v: boolean) => void;
6
8
  style?: CSSProperties;
7
- onChange?: ChangeEventHandler<HTMLInputElement>;
8
- onKeyUp?: KeyboardEventHandler<HTMLInputElement>;
9
-
9
+ required?: boolean;
10
10
  }
11
11
 
12
12
  export function LyCheckboxInput(props: LyCheckboxInputProps) {
13
13
  return (
14
- <div
15
- className="exo-2-regular flex flex-row gap-5 p-4 items-center justify-around bg-yellow-50
16
- ">
17
-
18
- <input
19
- type="checkbox"
20
- className="
21
- appearance-none w-5 h-5 rounded-full border-2 border-amber-900 bg-amber-250
22
- checked:bg-red-600 checked:border-amber-200
23
- transition-all duration-200 cursor-pointer
24
- focus:outline-none focus:ring-2 focus:ring-amber-300 focus:ring-offset-2
25
- "
26
- {...props}
27
- />
28
- <label className="text-xl exo-2-regular">AAAAA</label>
29
- </div>
14
+ <label className="group flex items-start gap-3 cursor-pointer select-none bg-yellow-50 p-4 rounded shadow-xl
15
+ border-2 border-yellow-200">
16
+ <div className="relative flex items-center">
17
+ <input
18
+ type="checkbox"
19
+ style={props.style}
20
+ checked={props.isChecked}
21
+ onChange={() => props.setIsChecked(!props.isChecked)}
22
+ className="sr-only"
23
+ />
24
+
25
+ <div className={`
26
+ w-6 h-6 rounded-md border-2 transition-all duration-200 flex items-center justify-center
27
+ ${props.isChecked
28
+ ? 'bg-yellow-600 border-yellow-600 shadow-lg shadow-yellow-200'
29
+ : 'bg-white border-gray-300 group-hover:border-yellow-400'}
30
+ `}>
31
+ <Check
32
+ size={16}
33
+ strokeWidth={4}
34
+ className={`text-white transition-transform duration-200 ${props.isChecked ? 'scale-100' : 'scale-0'}`}
35
+ />
36
+ </div>
37
+ </div>
38
+
39
+ {/* Text Label */}
40
+ <div className="flex flex-col -mt-0.5">
41
+ <span className={`text-lg font-semibold transition-colors ${props.isChecked ? 'text-gray-900' : 'text-gray-600'}`}>
42
+ {props.label}
43
+ </span>
44
+ </div>
45
+ </label>
30
46
  );
31
47
  }
package/lib/index.css CHANGED
@@ -1,9 +1,13 @@
1
1
  @import url('https://fonts.googleapis.com/css2?family=Exo+2:ital,wght@0,100..900;1,100..900&display=swap');
2
2
  @import "tailwindcss";
3
3
 
4
- .exo-2-regular{
5
- font-family: "Exo 2", sans-serif;
6
- font-optical-sizing: auto;
7
- font-weight: 500;
8
- font-style: normal;
9
- }
4
+ .exo-2-regular {
5
+ font-family: "Exo 2", sans-serif;
6
+ font-optical-sizing: auto;
7
+ font-weight: 500;
8
+ font-style: normal;
9
+ }
10
+
11
+ .password-input {
12
+ -webkit-text-security: asterisk;
13
+ }
package/lib/index.ts CHANGED
@@ -4,3 +4,7 @@ import "./index.css";
4
4
  export * from "./button.component";
5
5
  export * from "./textinput.component";
6
6
  export * from "./checboxinput.component";
7
+ export * from "./passwordinput.component";
8
+ export * from "./radioinput.component";
9
+ export * from "./selectinput.component";
10
+ export * from "./multiselectinput.component";
@@ -0,0 +1,95 @@
1
+ import { Check, ChevronDown, X } from "lucide-react";
2
+ import { useState, type CSSProperties, type JSX } from "react";
3
+
4
+ export interface LyMultiSelectOption {
5
+ id: string;
6
+ name: string;
7
+ icon: JSX.Element;
8
+ }
9
+
10
+ export interface LyMultiSelectInputProps {
11
+ options: LyMultiSelectOption[];
12
+ value: LyMultiSelectOption[];
13
+ style?: CSSProperties;
14
+ onChange: (items: LyMultiSelectOption[]) => void;
15
+ title?: string;
16
+ }
17
+
18
+ export function LyMultiSelectInput(props: LyMultiSelectInputProps) {
19
+
20
+ const [isOpen, setIsOpen] = useState(false);
21
+
22
+ const toggleOption = (option: LyMultiSelectOption) => {
23
+ if (props.value.find(item => item.id === option.id)) {
24
+ props.onChange(props.value.filter(item => item.id !== option.id));
25
+ } else {
26
+ props.onChange([...props.value, option]);
27
+ }
28
+ };
29
+
30
+ const removeOption = (id: string) => {
31
+ props.onChange(props.value.filter(item => item.id !== id));
32
+ };
33
+
34
+ return (
35
+ <div className="relative exo-2-regular shadow-2xl">
36
+ <div
37
+ onClick={() => setIsOpen(!isOpen)}
38
+ className="min-h-11 w-full flex items-center flex-wrap gap-2 p-4
39
+ bg-yellow-50 border border-gray-300 rounded-xl cursor-pointer
40
+ hover:border-yellow-500 transition-all focus-within:ring-2
41
+ focus-within:ring-yellow-100"
42
+ >
43
+ {props.value.length === 0 && (
44
+ <span className="text-gray-400 text-sm ml-1">{props.title ?? "Select ..."}</span>
45
+ )}
46
+
47
+ {/* Selected Pills */}
48
+ {props.value.map((item) => (
49
+ <span
50
+ key={item.id}
51
+ className="flex items-center gap-1.5 bg-yellow-100 text-yellow-700
52
+ px-2 py-1 rounded-md text-xs font-bold animate-in zoom-in duration-150"
53
+ >
54
+ {item.icon}
55
+ {item.name}
56
+ <button
57
+ onClick={(e) => { e.stopPropagation(); removeOption(item.id); }}
58
+ className="hover:bg-yellow-200 rounded-full p-0.5"
59
+ >
60
+ <X size={12} />
61
+ </button>
62
+ </span>
63
+ ))}
64
+
65
+ <ChevronDown size={18} className={`ml-auto text-gray-400 transition-transform ${isOpen ? 'rotate-180' : ''}`} />
66
+ </div>
67
+
68
+ {/* Dropdown Menu */}
69
+ {isOpen && (
70
+ <div className="absolute z-20 w-full mt-2 bg-white border
71
+ border-gray-100 rounded-xl shadow-xl overflow-hidden animate-in slide-in-from-top-2 duration-200">
72
+ {props.options.map((option) => {
73
+ const isSelected = props.value.find(item => item.id === option.id);
74
+ return (
75
+ <div
76
+ key={option.id}
77
+ onClick={() => toggleOption(option)}
78
+ className={`
79
+ flex items-center justify-between px-4 py-2.5 cursor-pointer transition-colors
80
+ ${isSelected ? 'bg-yellow-50 text-yellow-700 font-semibold' : 'hover:bg-gray-50 text-gray-600'}
81
+ `}
82
+ >
83
+ <div className="flex items-center gap-3">
84
+ <span className={isSelected ? 'text-yellow-500' : 'text-gray-400'}>{option.icon}</span>
85
+ <span className="text-sm">{option.name}</span>
86
+ </div>
87
+ {isSelected && <Check size={16} className="text-yellow-600" />}
88
+ </div>
89
+ );
90
+ })}
91
+ </div>
92
+ )}
93
+ </div>
94
+ );
95
+ }
@@ -0,0 +1,37 @@
1
+ import { Eye, EyeOff } from 'lucide-react';
2
+ import { useState, type ChangeEventHandler, type CSSProperties, type KeyboardEventHandler } from "react";
3
+
4
+
5
+ export interface LyPasswordProps {
6
+ value?: string;
7
+ style?: CSSProperties;
8
+ onChange?: ChangeEventHandler<HTMLInputElement>;
9
+ onKeyUp?: KeyboardEventHandler<HTMLInputElement>;
10
+ required?: boolean;
11
+ }
12
+
13
+ export function LyPasswordInput(props: LyPasswordProps) {
14
+ const [open, setOpen] = useState(false);
15
+
16
+
17
+ return (
18
+ <div
19
+ className="bg-yellow-50 exo-2-regular relative
20
+ ">
21
+ <input
22
+ required={props.required ?? false}
23
+ type={open ? "text" : "password"}
24
+ className="p-4 border border-slate-100 rounded w-full text-xl shadow-xl text-center
25
+ outline-none transition-all focus:ring-2 focus:ring-yellow-200
26
+ "
27
+ {...props} />
28
+
29
+
30
+ <span onClick={() => setOpen(!open)} className="absolute right-5 top-5 cursor-pointer text-slate-300">
31
+ {
32
+ open ? <Eye /> : <EyeOff />
33
+ }
34
+ </span>
35
+ </div>
36
+ );
37
+ }
@@ -0,0 +1,59 @@
1
+ import { CheckCircle2 } from "lucide-react";
2
+ import { type ChangeEventHandler, type CSSProperties, type JSX } from "react";
3
+
4
+ export interface LyRadioOption {
5
+ id: string;
6
+ name: string;
7
+ icon?: JSX.Element;
8
+ }
9
+
10
+ export interface LyRadioInputProps {
11
+ options: LyRadioOption[];
12
+ value: string;
13
+ style?: CSSProperties;
14
+ onChange?: ChangeEventHandler<HTMLInputElement>;
15
+ }
16
+
17
+ export function LyRadioInput(props: LyRadioInputProps) {
18
+ return (
19
+ <div className="flex flex-col gap-3 exo-2-regular border p-2 rounded-lg border-slate-300 shadow-2xl">
20
+ {props.options.map((option) => (
21
+ <label
22
+ key={option.id}
23
+ className={`
24
+ relative flex items-center p-4 border-2 rounded-xl cursor-pointer transition-all
25
+ ${props.value === option.id
26
+ ? 'border-yellow-500 bg-yellow-50'
27
+ : 'border-gray-200 hover:border-gray-300 bg-white'}
28
+ `}
29
+ >
30
+ <input
31
+ type="radio"
32
+ value={option.id}
33
+ checked={props.value === option.id}
34
+ onChange={props.onChange}
35
+ style={props.style}
36
+ className="sr-only"
37
+ />
38
+
39
+ {
40
+ option.icon &&
41
+ <div className={`p-2 rounded-lg mr-4 ${props.value === option.id ? 'text-yellow-600' : 'text-gray-500'}`}>
42
+ {option.icon}
43
+ </div>
44
+ }
45
+
46
+
47
+ <div className="flex-1">
48
+ <p className="font-bold text-gray-900">{option.name}</p>
49
+ </div>
50
+
51
+ {/* Custom Checkmark Icon */}
52
+ {props.value === option.id && (
53
+ <CheckCircle2 className="text-yellow-500 animate-in zoom-in duration-200" size={24} />
54
+ )}
55
+ </label>
56
+ ))}
57
+ </div>
58
+ );
59
+ }
@@ -0,0 +1,71 @@
1
+ import { Check, ChevronDown } from "lucide-react";
2
+ import { useState, type CSSProperties, type JSX } from "react";
3
+
4
+ export interface LySelectOption {
5
+ id: string;
6
+ name: string;
7
+ icon: JSX.Element;
8
+ }
9
+
10
+ export interface LySelectInputProps {
11
+ options: LySelectOption[];
12
+ value: LySelectOption;
13
+ style?: CSSProperties;
14
+ onChange: (item: LySelectOption) => void;
15
+ }
16
+
17
+ export function LySelectInput(props: LySelectInputProps) {
18
+
19
+ const [isOpen, setIsOpen] = useState(false);
20
+
21
+
22
+ return (
23
+ <div className="relative shadow-2xl">
24
+ {/* The "Trigger" Button */}
25
+ <button
26
+ onClick={() => setIsOpen(!isOpen)}
27
+ className="w-full flex items-center justify-between p-4
28
+ bg-yellow-50 border border-gray-300 rounded-xl shadow-sm
29
+ hover:border-yellow-500 transition-all focus:ring-2 focus:ring-yellow-100"
30
+ >
31
+ <div className="flex items-center gap-3 text-gray-700">
32
+ {
33
+ props.value &&
34
+ <span className="text-yellow-500">{props.value.icon}</span>
35
+ }
36
+ <span className="font-medium">{props.value.name}</span>
37
+ </div>
38
+ <ChevronDown
39
+ size={18}
40
+ className={`text-gray-400 transition-transform duration-200 ${isOpen ? 'rotate-180' : ''}`}
41
+ />
42
+ </button>
43
+
44
+ {/* The Dropdown Menu */}
45
+ {isOpen && (
46
+ <div className="absolute z-10 w-full mt-2 bg-white border
47
+ border-gray-100 rounded-xl shadow-lg overflow-hidden animate-in fade-in zoom-in-95 duration-100">
48
+ {props.options.map((option) => (
49
+ <div
50
+ key={option.id}
51
+ onClick={() => {
52
+ props.onChange(option);
53
+ setIsOpen(false);
54
+ }}
55
+ className={`
56
+ flex items-center justify-between px-4 py-3 cursor-pointer transition-colors
57
+ ${props.value.id === option.id ? 'bg-yellow-50 text-yellow-700' : 'hover:bg-gray-50 text-gray-600'}
58
+ `}
59
+ >
60
+ <div className="flex items-center gap-3">
61
+ {props.value ? option.icon : null}
62
+ <span className="text-sm font-medium">{option.name}</span>
63
+ </div>
64
+ {props.value.id === option.id && <Check size={16} className="text-yellow-600" />}
65
+ </div>
66
+ ))}
67
+ </div>
68
+ )}
69
+ </div>
70
+ );
71
+ }
@@ -1,12 +1,12 @@
1
- import type { ChangeEventHandler, CSSProperties, KeyboardEventHandler } from "react";
1
+ import type { ChangeEventHandler, CSSProperties, HTMLInputTypeAttribute, KeyboardEventHandler } from "react";
2
2
 
3
3
  export interface LyInputProps {
4
- name: string;
5
4
  value?: string;
6
5
  style?: CSSProperties;
7
6
  onChange?: ChangeEventHandler<HTMLInputElement>;
8
7
  onKeyUp?: KeyboardEventHandler<HTMLInputElement>;
9
-
8
+ required?: boolean;
9
+ type?: HTMLInputTypeAttribute;
10
10
  }
11
11
 
12
12
  export function LyTextInput(props: LyInputProps) {
@@ -15,7 +15,11 @@ export function LyTextInput(props: LyInputProps) {
15
15
  className="bg-yellow-50 exo-2-regular
16
16
  ">
17
17
  <input
18
- className="p-4 border border-slate-100 rounded w-full text-xl shadow-xl text-center"
18
+ required={props.required ?? false}
19
+ type={props.type ?? "text"}
20
+ className="p-4 border border-slate-100 rounded w-full text-xl shadow-xl text-center ring:bg-slate-100
21
+ outline-none transition-all focus:ring-2 focus:ring-yellow-200
22
+ "
19
23
  {...props}/>
20
24
  </div>
21
25
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "layusoft-ui",
3
- "version": "1.0.19",
3
+ "version": "1.0.20",
4
4
  "type": "module",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
@@ -40,6 +40,7 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@tailwindcss/vite": "^4.2.1",
43
+ "lucide-react": "^0.577.0",
43
44
  "tailwindcss": "^4.2.1"
44
45
  }
45
46
  }
@@ -1 +1 @@
1
- {"root":["./lib/button.component.tsx","./lib/checboxinput.component.tsx","./lib/index.ts","./lib/textinput.component.tsx"],"version":"5.9.3"}
1
+ {"root":["./lib/button.component.tsx","./lib/checboxinput.component.tsx","./lib/index.ts","./lib/multiselectinput.component.tsx","./lib/passwordinput.component.tsx","./lib/radioinput.component.tsx","./lib/selectinput.component.tsx","./lib/textinput.component.tsx"],"version":"5.9.3"}