@senestia/ui 0.1.0-beta.0190ae9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,73 @@
1
+ # React + TypeScript + Vite
2
+
3
+ This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4
+
5
+ Currently, two official plugins are available:
6
+
7
+ - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs)
8
+ - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/)
9
+
10
+ ## React Compiler
11
+
12
+ The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).
13
+
14
+ ## Expanding the ESLint configuration
15
+
16
+ If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
17
+
18
+ ```js
19
+ export default defineConfig([
20
+ globalIgnores(['dist']),
21
+ {
22
+ files: ['**/*.{ts,tsx}'],
23
+ extends: [
24
+ // Other configs...
25
+
26
+ // Remove tseslint.configs.recommended and replace with this
27
+ tseslint.configs.recommendedTypeChecked,
28
+ // Alternatively, use this for stricter rules
29
+ tseslint.configs.strictTypeChecked,
30
+ // Optionally, add this for stylistic rules
31
+ tseslint.configs.stylisticTypeChecked,
32
+
33
+ // Other configs...
34
+ ],
35
+ languageOptions: {
36
+ parserOptions: {
37
+ project: ['./tsconfig.node.json', './tsconfig.app.json'],
38
+ tsconfigRootDir: import.meta.dirname,
39
+ },
40
+ // other options...
41
+ },
42
+ },
43
+ ])
44
+ ```
45
+
46
+ You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
47
+
48
+ ```js
49
+ // eslint.config.js
50
+ import reactX from 'eslint-plugin-react-x'
51
+ import reactDom from 'eslint-plugin-react-dom'
52
+
53
+ export default defineConfig([
54
+ globalIgnores(['dist']),
55
+ {
56
+ files: ['**/*.{ts,tsx}'],
57
+ extends: [
58
+ // Other configs...
59
+ // Enable lint rules for React
60
+ reactX.configs['recommended-typescript'],
61
+ // Enable lint rules for React DOM
62
+ reactDom.configs.recommended,
63
+ ],
64
+ languageOptions: {
65
+ parserOptions: {
66
+ project: ['./tsconfig.node.json', './tsconfig.app.json'],
67
+ tsconfigRootDir: import.meta.dirname,
68
+ },
69
+ // other options...
70
+ },
71
+ },
72
+ ])
73
+ ```
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="48" height="46" fill="none" viewBox="0 0 48 46"><path fill="#863bff" d="M25.946 44.938c-.664.845-2.021.375-2.021-.698V33.937a2.26 2.26 0 0 0-2.262-2.262H10.287c-.92 0-1.456-1.04-.92-1.788l7.48-10.471c1.07-1.497 0-3.578-1.842-3.578H1.237c-.92 0-1.456-1.04-.92-1.788L10.013.474c.214-.297.556-.474.92-.474h28.894c.92 0 1.456 1.04.92 1.788l-7.48 10.471c-1.07 1.498 0 3.579 1.842 3.579h11.377c.943 0 1.473 1.088.89 1.83L25.947 44.94z" style="fill:#863bff;fill:color(display-p3 .5252 .23 1);fill-opacity:1"/><mask id="a" width="48" height="46" x="0" y="0" maskUnits="userSpaceOnUse" style="mask-type:alpha"><path fill="#000" d="M25.842 44.938c-.664.844-2.021.375-2.021-.698V33.937a2.26 2.26 0 0 0-2.262-2.262H10.183c-.92 0-1.456-1.04-.92-1.788l7.48-10.471c1.07-1.498 0-3.579-1.842-3.579H1.133c-.92 0-1.456-1.04-.92-1.787L9.91.473c.214-.297.556-.474.92-.474h28.894c.92 0 1.456 1.04.92 1.788l-7.48 10.471c-1.07 1.498 0 3.578 1.842 3.578h11.377c.943 0 1.473 1.088.89 1.832L25.843 44.94z" style="fill:#000;fill-opacity:1"/></mask><g mask="url(#a)"><g filter="url(#b)"><ellipse cx="5.508" cy="14.704" fill="#ede6ff" rx="5.508" ry="14.704" style="fill:#ede6ff;fill:color(display-p3 .9275 .9033 1);fill-opacity:1" transform="matrix(.00324 1 1 -.00324 -4.47 31.516)"/></g><g filter="url(#c)"><ellipse cx="10.399" cy="29.851" fill="#ede6ff" rx="10.399" ry="29.851" style="fill:#ede6ff;fill:color(display-p3 .9275 .9033 1);fill-opacity:1" transform="matrix(.00324 1 1 -.00324 -39.328 7.883)"/></g><g filter="url(#d)"><ellipse cx="5.508" cy="30.487" fill="#7e14ff" rx="5.508" ry="30.487" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.814 -25.913 -14.639)scale(1 -1)"/></g><g filter="url(#e)"><ellipse cx="5.508" cy="30.599" fill="#7e14ff" rx="5.508" ry="30.599" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.814 -32.644 -3.334)scale(1 -1)"/></g><g filter="url(#f)"><ellipse cx="5.508" cy="30.599" fill="#7e14ff" rx="5.508" ry="30.599" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="matrix(.00324 1 1 -.00324 -34.34 30.47)"/></g><g filter="url(#g)"><ellipse cx="14.072" cy="22.078" fill="#ede6ff" rx="14.072" ry="22.078" style="fill:#ede6ff;fill:color(display-p3 .9275 .9033 1);fill-opacity:1" transform="rotate(93.35 24.506 48.493)scale(-1 1)"/></g><g filter="url(#h)"><ellipse cx="3.47" cy="21.501" fill="#7e14ff" rx="3.47" ry="21.501" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.009 28.708 47.59)scale(-1 1)"/></g><g filter="url(#i)"><ellipse cx="3.47" cy="21.501" fill="#7e14ff" rx="3.47" ry="21.501" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.009 28.708 47.59)scale(-1 1)"/></g><g filter="url(#j)"><ellipse cx=".387" cy="8.972" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(39.51 .387 8.972)"/></g><g filter="url(#k)"><ellipse cx="47.523" cy="-6.092" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 47.523 -6.092)"/></g><g filter="url(#l)"><ellipse cx="41.412" cy="6.333" fill="#47bfff" rx="5.971" ry="9.665" style="fill:#47bfff;fill:color(display-p3 .2799 .748 1);fill-opacity:1" transform="rotate(37.892 41.412 6.333)"/></g><g filter="url(#m)"><ellipse cx="-1.879" cy="38.332" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 -1.88 38.332)"/></g><g filter="url(#n)"><ellipse cx="-1.879" cy="38.332" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 -1.88 38.332)"/></g><g filter="url(#o)"><ellipse cx="35.651" cy="29.907" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 35.651 29.907)"/></g><g filter="url(#p)"><ellipse cx="38.418" cy="32.4" fill="#47bfff" rx="5.971" ry="15.297" style="fill:#47bfff;fill:color(display-p3 .2799 .748 1);fill-opacity:1" transform="rotate(37.892 38.418 32.4)"/></g></g><defs><filter id="b" width="60.045" height="41.654" x="-19.77" y="16.149" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="7.659"/></filter><filter id="c" width="90.34" height="51.437" x="-54.613" y="-7.533" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="7.659"/></filter><filter id="d" width="79.355" height="29.4" x="-49.64" y="2.03" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="e" width="79.579" height="29.4" x="-45.045" y="20.029" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="f" width="79.579" height="29.4" x="-43.513" y="21.178" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="g" width="74.749" height="58.852" x="15.756" y="-17.901" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="7.659"/></filter><filter id="h" width="61.377" height="25.362" x="23.548" y="2.284" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="i" width="61.377" height="25.362" x="23.548" y="2.284" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="j" width="56.045" height="63.649" x="-27.636" y="-22.853" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="k" width="54.814" height="64.646" x="20.116" y="-38.415" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="l" width="33.541" height="35.313" x="24.641" y="-11.323" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="m" width="54.814" height="64.646" x="-29.286" y="6.009" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="n" width="54.814" height="64.646" x="-29.286" y="6.009" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="o" width="54.814" height="64.646" x="8.244" y="-2.416" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="p" width="39.409" height="43.623" x="18.713" y="10.588" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter></defs></svg>
package/dist/icons.svg ADDED
@@ -0,0 +1,24 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg">
2
+ <symbol id="bluesky-icon" viewBox="0 0 16 17">
3
+ <g clip-path="url(#bluesky-clip)"><path fill="#08060d" d="M7.75 7.735c-.693-1.348-2.58-3.86-4.334-5.097-1.68-1.187-2.32-.981-2.74-.79C.188 2.065.1 2.812.1 3.251s.241 3.602.398 4.13c.52 1.744 2.367 2.333 4.07 2.145-2.495.37-4.71 1.278-1.805 4.512 3.196 3.309 4.38-.71 4.987-2.746.608 2.036 1.307 5.91 4.93 2.746 2.72-2.746.747-4.143-1.747-4.512 1.702.189 3.55-.4 4.07-2.145.156-.528.397-3.691.397-4.13s-.088-1.186-.575-1.406c-.42-.19-1.06-.395-2.741.79-1.755 1.24-3.64 3.752-4.334 5.099"/></g>
4
+ <defs><clipPath id="bluesky-clip"><path fill="#fff" d="M.1.85h15.3v15.3H.1z"/></clipPath></defs>
5
+ </symbol>
6
+ <symbol id="discord-icon" viewBox="0 0 20 19">
7
+ <path fill="#08060d" d="M16.224 3.768a14.5 14.5 0 0 0-3.67-1.153c-.158.286-.343.67-.47.976a13.5 13.5 0 0 0-4.067 0c-.128-.306-.317-.69-.476-.976A14.4 14.4 0 0 0 3.868 3.77C1.546 7.28.916 10.703 1.231 14.077a14.7 14.7 0 0 0 4.5 2.306q.545-.748.965-1.587a9.5 9.5 0 0 1-1.518-.74q.191-.14.372-.293c2.927 1.369 6.107 1.369 8.999 0q.183.152.372.294-.723.437-1.52.74.418.838.963 1.588a14.6 14.6 0 0 0 4.504-2.308c.37-3.911-.63-7.302-2.644-10.309m-9.13 8.234c-.878 0-1.599-.82-1.599-1.82 0-.998.705-1.82 1.6-1.82.894 0 1.614.82 1.599 1.82.001 1-.705 1.82-1.6 1.82m5.91 0c-.878 0-1.599-.82-1.599-1.82 0-.998.705-1.82 1.6-1.82.893 0 1.614.82 1.599 1.82 0 1-.706 1.82-1.6 1.82"/>
8
+ </symbol>
9
+ <symbol id="documentation-icon" viewBox="0 0 21 20">
10
+ <path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="m15.5 13.333 1.533 1.322c.645.555.967.833.967 1.178s-.322.623-.967 1.179L15.5 18.333m-3.333-5-1.534 1.322c-.644.555-.966.833-.966 1.178s.322.623.966 1.179l1.534 1.321"/>
11
+ <path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M17.167 10.836v-4.32c0-1.41 0-2.117-.224-2.68-.359-.906-1.118-1.621-2.08-1.96-.599-.21-1.349-.21-2.848-.21-2.623 0-3.935 0-4.983.369-1.684.591-3.013 1.842-3.641 3.428C3 6.449 3 7.684 3 10.154v2.122c0 2.558 0 3.838.706 4.726q.306.383.713.671c.76.536 1.79.64 3.581.66"/>
12
+ <path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M3 10a2.78 2.78 0 0 1 2.778-2.778c.555 0 1.209.097 1.748-.047.48-.129.854-.503.982-.982.145-.54.048-1.194.048-1.749a2.78 2.78 0 0 1 2.777-2.777"/>
13
+ </symbol>
14
+ <symbol id="github-icon" viewBox="0 0 19 19">
15
+ <path fill="#08060d" fill-rule="evenodd" d="M9.356 1.85C5.05 1.85 1.57 5.356 1.57 9.694a7.84 7.84 0 0 0 5.324 7.44c.387.079.528-.168.528-.376 0-.182-.013-.805-.013-1.454-2.165.467-2.616-.935-2.616-.935-.349-.91-.864-1.143-.864-1.143-.71-.48.051-.48.051-.48.787.051 1.2.805 1.2.805.695 1.194 1.817.857 2.268.649.064-.507.27-.857.49-1.052-1.728-.182-3.545-.857-3.545-3.87 0-.857.31-1.558.8-2.104-.078-.195-.349-1 .077-2.078 0 0 .657-.208 2.14.805a7.5 7.5 0 0 1 1.946-.26c.657 0 1.328.092 1.946.26 1.483-1.013 2.14-.805 2.14-.805.426 1.078.155 1.883.078 2.078.502.546.799 1.247.799 2.104 0 3.013-1.818 3.675-3.558 3.87.284.247.528.714.528 1.454 0 1.052-.012 1.896-.012 2.156 0 .208.142.455.528.377a7.84 7.84 0 0 0 5.324-7.441c.013-4.338-3.48-7.844-7.773-7.844" clip-rule="evenodd"/>
16
+ </symbol>
17
+ <symbol id="social-icon" viewBox="0 0 20 20">
18
+ <path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M12.5 6.667a4.167 4.167 0 1 0-8.334 0 4.167 4.167 0 0 0 8.334 0"/>
19
+ <path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M2.5 16.667a5.833 5.833 0 0 1 8.75-5.053m3.837.474.513 1.035c.07.144.257.282.414.309l.93.155c.596.1.736.536.307.965l-.723.73a.64.64 0 0 0-.152.531l.207.903c.164.715-.213.991-.84.618l-.872-.52a.63.63 0 0 0-.577 0l-.872.52c-.624.373-1.003.094-.84-.618l.207-.903a.64.64 0 0 0-.152-.532l-.723-.729c-.426-.43-.289-.864.306-.964l.93-.156a.64.64 0 0 0 .412-.31l.513-1.034c.28-.562.735-.562 1.012 0"/>
20
+ </symbol>
21
+ <symbol id="x-icon" viewBox="0 0 19 19">
22
+ <path fill="#08060d" fill-rule="evenodd" d="M1.893 1.98c.052.072 1.245 1.769 2.653 3.77l2.892 4.114c.183.261.333.48.333.486s-.068.089-.152.183l-.522.593-.765.867-3.597 4.087c-.375.426-.734.834-.798.905a1 1 0 0 0-.118.148c0 .01.236.017.664.017h.663l.729-.83c.4-.457.796-.906.879-.999a692 692 0 0 0 1.794-2.038c.034-.037.301-.34.594-.675l.551-.624.345-.392a7 7 0 0 1 .34-.374c.006 0 .93 1.306 2.052 2.903l2.084 2.965.045.063h2.275c1.87 0 2.273-.003 2.266-.021-.008-.02-1.098-1.572-3.894-5.547-2.013-2.862-2.28-3.246-2.273-3.266.008-.019.282-.332 2.085-2.38l2-2.274 1.567-1.782c.022-.028-.016-.03-.65-.03h-.674l-.3.342a871 871 0 0 1-1.782 2.025c-.067.075-.405.458-.75.852a100 100 0 0 1-.803.91c-.148.172-.299.344-.99 1.127-.304.343-.32.358-.345.327-.015-.019-.904-1.282-1.976-2.808L6.365 1.85H1.8zm1.782.91 8.078 11.294c.772 1.08 1.413 1.973 1.425 1.984.016.017.241.02 1.05.017l1.03-.004-2.694-3.766L7.796 5.75 5.722 2.852l-1.039-.004-1.039-.004z" clip-rule="evenodd"/>
23
+ </symbol>
24
+ </svg>
@@ -0,0 +1,7 @@
1
+ export { Badge } from './stories/Badge';
2
+ export { InputField } from './stories/InputField';
3
+ export type { BadgeProps, BadgeColor, BadgeSize, BadgeType } from './stories/Badge';
4
+ export type { InputFieldProps, InputFieldState, InputFieldSize, InputFieldTrailingIcon, InputFieldCounter, } from './stories/InputField';
5
+ export { grayNeutral, status, ciPrimary, oePrimary, interactive, padding, radius, font, } from './stories/tokens';
6
+ import * as _tokens from './stories/tokens';
7
+ export declare const tokens: typeof _tokens;
@@ -0,0 +1,681 @@
1
+ import e from "react";
2
+ import { Circle as t, Eye as n, Info as r, Search as i, X as a, XCircle as o } from "lucide-react";
3
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
4
+ //#region \0rolldown/runtime.js
5
+ var l = Object.defineProperty, u = (e, t) => {
6
+ let n = {};
7
+ for (var r in e) l(n, r, {
8
+ get: e[r],
9
+ enumerable: !0
10
+ });
11
+ return t || l(n, Symbol.toStringTag, { value: "Module" }), n;
12
+ }, d = "Sarabun, sans-serif", f = {
13
+ Gray: {
14
+ bg: "#f9fafb",
15
+ border: "#eaecf0",
16
+ text: "#06080b",
17
+ dot: "#667085"
18
+ },
19
+ Primary: {
20
+ bg: "#f4f6f9",
21
+ border: "#e6ebf2",
22
+ text: "#1e2b3b",
23
+ dot: "#6c8fbe"
24
+ },
25
+ Error: {
26
+ bg: "#fef0ef",
27
+ border: "#fbd2d0",
28
+ text: "#cc1a11",
29
+ dot: "#f04438"
30
+ },
31
+ Warning: {
32
+ bg: "#fff9ee",
33
+ border: "#ffedcc",
34
+ text: "#db8f02",
35
+ dot: "#f79009"
36
+ },
37
+ Success: {
38
+ bg: "#f0fdfa",
39
+ border: "#d2f9f1",
40
+ text: "#15a686",
41
+ dot: "#12b76a"
42
+ },
43
+ "Blue light": {
44
+ bg: "#f0f9ff",
45
+ border: "#b9e6fe",
46
+ text: "#026aa2",
47
+ dot: "#0ba5ec"
48
+ },
49
+ Blue: {
50
+ bg: "#eff8ff",
51
+ border: "#b2ddff",
52
+ text: "#175cd3",
53
+ dot: "#2e90fa"
54
+ },
55
+ Indigo: {
56
+ bg: "#eef4ff",
57
+ border: "#c7d7fe",
58
+ text: "#3538cd",
59
+ dot: "#6172f3"
60
+ },
61
+ Purple: {
62
+ bg: "#f4f3ff",
63
+ border: "#d9d6fe",
64
+ text: "#5925dc",
65
+ dot: "#7a5af8"
66
+ },
67
+ Pink: {
68
+ bg: "#fef6fb",
69
+ border: "#fce7f6",
70
+ text: "#c11574",
71
+ dot: "#ee46bc"
72
+ },
73
+ Orange: {
74
+ bg: "#fef6ee",
75
+ border: "#ffd6ae",
76
+ text: "#b93815",
77
+ dot: "#ef6820"
78
+ },
79
+ "Gray blue": {
80
+ bg: "#f8f9fc",
81
+ border: "#d5d9eb",
82
+ text: "#363f72",
83
+ dot: "#717bbc"
84
+ }
85
+ }, p = {
86
+ sm: {
87
+ paddingX: 8,
88
+ paddingY: 2,
89
+ paddingXClose: {
90
+ left: 8,
91
+ right: 4
92
+ },
93
+ paddingXDot: {
94
+ left: 6,
95
+ right: 8
96
+ },
97
+ paddingPill: 5,
98
+ fontSize: 12,
99
+ lineHeight: 18,
100
+ dotSize: 6,
101
+ iconSize: 12,
102
+ closeSize: 12
103
+ },
104
+ md: {
105
+ paddingX: 8,
106
+ paddingY: 2,
107
+ paddingXClose: {
108
+ left: 8,
109
+ right: 4
110
+ },
111
+ paddingXDot: {
112
+ left: 6,
113
+ right: 8
114
+ },
115
+ paddingPill: 6,
116
+ fontSize: 14,
117
+ lineHeight: 20,
118
+ dotSize: 6,
119
+ iconSize: 14,
120
+ closeSize: 14
121
+ },
122
+ lg: {
123
+ paddingX: 12,
124
+ paddingY: 4,
125
+ paddingXClose: {
126
+ left: 12,
127
+ right: 6
128
+ },
129
+ paddingXDot: {
130
+ left: 8,
131
+ right: 12
132
+ },
133
+ paddingPill: 8,
134
+ fontSize: 14,
135
+ lineHeight: 20,
136
+ dotSize: 8,
137
+ iconSize: 16,
138
+ closeSize: 16
139
+ }
140
+ }, m = ({ label: e = "Label", color: t = "Gray", size: n = "sm", type: r = "Idle", icon: i, onClose: o }) => {
141
+ let l = f[t], u = p[n], m = {
142
+ display: "inline-flex",
143
+ alignItems: "center",
144
+ backgroundColor: l.bg,
145
+ border: `1px solid ${l.border}`,
146
+ borderRadius: 16,
147
+ boxSizing: "border-box",
148
+ width: "fit-content",
149
+ fontFamily: d
150
+ }, h = {
151
+ fontSize: u.fontSize,
152
+ lineHeight: `${u.lineHeight}px`,
153
+ fontWeight: 500,
154
+ color: l.text,
155
+ whiteSpace: "nowrap",
156
+ fontFamily: d,
157
+ margin: 0
158
+ };
159
+ if (r === "Idle") return /* @__PURE__ */ s("span", {
160
+ style: {
161
+ ...m,
162
+ padding: `${u.paddingY}px ${u.paddingX}px`
163
+ },
164
+ children: /* @__PURE__ */ s("span", {
165
+ style: h,
166
+ children: e
167
+ })
168
+ });
169
+ if (r === "Status Dot") return /* @__PURE__ */ c("span", {
170
+ style: {
171
+ ...m,
172
+ gap: 4,
173
+ paddingTop: u.paddingY,
174
+ paddingBottom: u.paddingY,
175
+ paddingLeft: u.paddingXDot.left,
176
+ paddingRight: u.paddingXDot.right
177
+ },
178
+ children: [/* @__PURE__ */ s("span", { style: {
179
+ display: "inline-block",
180
+ width: u.dotSize,
181
+ height: u.dotSize,
182
+ borderRadius: "50%",
183
+ backgroundColor: l.dot,
184
+ flexShrink: 0
185
+ } }), /* @__PURE__ */ s("span", {
186
+ style: h,
187
+ children: e
188
+ })]
189
+ });
190
+ if (r === "Closable") return /* @__PURE__ */ c("span", {
191
+ style: {
192
+ ...m,
193
+ gap: 2,
194
+ paddingTop: u.paddingY,
195
+ paddingBottom: u.paddingY,
196
+ paddingLeft: u.paddingXClose.left,
197
+ paddingRight: u.paddingXClose.right
198
+ },
199
+ children: [/* @__PURE__ */ s("span", {
200
+ style: h,
201
+ children: e
202
+ }), /* @__PURE__ */ s("button", {
203
+ onClick: o,
204
+ style: {
205
+ display: "inline-flex",
206
+ alignItems: "center",
207
+ justifyContent: "center",
208
+ background: "none",
209
+ border: "none",
210
+ padding: 2,
211
+ borderRadius: 3,
212
+ cursor: "pointer",
213
+ color: l.text,
214
+ flexShrink: 0,
215
+ lineHeight: 1
216
+ },
217
+ "aria-label": "Remove",
218
+ children: /* @__PURE__ */ s(a, {
219
+ size: u.closeSize,
220
+ strokeWidth: 2.5
221
+ })
222
+ })]
223
+ });
224
+ if (r === "Pill color") {
225
+ let e = i;
226
+ return /* @__PURE__ */ s("span", {
227
+ style: {
228
+ ...m,
229
+ padding: u.paddingPill
230
+ },
231
+ children: e ? /* @__PURE__ */ s(e, {
232
+ size: u.iconSize,
233
+ color: l.dot,
234
+ strokeWidth: 2
235
+ }) : /* @__PURE__ */ s("span", { style: {
236
+ display: "inline-block",
237
+ width: u.iconSize,
238
+ height: u.iconSize,
239
+ borderRadius: "50%",
240
+ backgroundColor: l.dot
241
+ } })
242
+ });
243
+ }
244
+ return null;
245
+ }, h = /* @__PURE__ */ u({
246
+ ciPrimary: () => v,
247
+ font: () => C,
248
+ grayNeutral: () => g,
249
+ interactive: () => b,
250
+ oePrimary: () => y,
251
+ padding: () => x,
252
+ radius: () => S,
253
+ status: () => _
254
+ }), g = {
255
+ fgHigh: "#1B1D22",
256
+ fgMid: "#6A6E83",
257
+ fgLow: "#9A9DAD",
258
+ bgWhite: "#FFFFFF",
259
+ bgLightgray: "#F8F8F9",
260
+ bgDisabled: "#F3F4F6",
261
+ borderMidgray: "#CFD1D9",
262
+ borderLight: "#EBECEF",
263
+ borderDisabled: "#E5EAF1",
264
+ gray300: "#D0D5DD",
265
+ bgSkeleton: "#EEF0F3",
266
+ bgDisabledStrong: "#EBECEF"
267
+ }, _ = {
268
+ error: "#DB1439",
269
+ warning: "#DB8F02",
270
+ success: "#15A686"
271
+ }, v = {
272
+ fgLow: "#C4B3F6",
273
+ fgHigh: "#802CEB",
274
+ bgLow: "#D4C9F6",
275
+ bgMid: "#802CEB",
276
+ bgHigh: "#5A1DA9",
277
+ borderMid: "#996CF3",
278
+ borderHigh: "#802CEB"
279
+ }, y = {
280
+ fgLow: "#5273A1",
281
+ fgHigh: "#3A5274",
282
+ bgLowest: "#EFF2F6",
283
+ bgLow: "#6E90BF",
284
+ bgMid: "#5273A1",
285
+ bgHigh: "#3A5274",
286
+ borderLowest: "#C6D2E3",
287
+ borderLow: "#9CB3D2",
288
+ borderMid: "#5273A1",
289
+ p300: "#809BBF",
290
+ linkBlue: "#3C5BD5"
291
+ }, b = {
292
+ activeBorder: y.fgLow,
293
+ hoverBorder: "#3B82F6",
294
+ focusRing: "#D7DFEA",
295
+ invalidBorder: _.error
296
+ }, x = {
297
+ "PD-0": 0,
298
+ "PD-1": 1,
299
+ "PD-2": 2,
300
+ "PD-3": 4,
301
+ "PD-4": 6,
302
+ "PD-5": 8,
303
+ "PD-6": 12,
304
+ "PD-7": 16,
305
+ "PD-8": 24,
306
+ "PD-9": 32,
307
+ "PD-10": 40,
308
+ "PD-11": 48,
309
+ "PD-12": 56,
310
+ "PD-13": 64,
311
+ "PD-14": 72,
312
+ "PD-15": 80
313
+ }, S = {
314
+ "CR-0": 0,
315
+ "CR-1": 2,
316
+ "CR-2": 4,
317
+ "CR-3": 8,
318
+ "CR-4": 12,
319
+ "CR-5": 16,
320
+ "CR-6": 20,
321
+ "CR-7": 24,
322
+ "CR-8": 32,
323
+ "CR-9": 48,
324
+ "CR-10": 100
325
+ }, C = "Sarabun, sans-serif", w = {
326
+ sm: {
327
+ inputHeight: 32,
328
+ labelFontSize: 12,
329
+ labelLineHeight: 18,
330
+ inputFontSize: 14,
331
+ inputLineHeight: 20,
332
+ helperFontSize: 12,
333
+ helperLineHeight: 18,
334
+ paddingX: 12,
335
+ iconSize: 16,
336
+ labelIconSize: 12,
337
+ labelGap: 4,
338
+ helperGap: 4,
339
+ leadingPl: 8,
340
+ leadingPr: 4,
341
+ leadingPy: 6,
342
+ chevronSize: 14,
343
+ counterPadding: "1px 4px",
344
+ counterRadius: 4,
345
+ counterFontSize: 12,
346
+ counterLineHeight: 18,
347
+ skeletonLabelH: 18,
348
+ skeletonInputH: 32
349
+ },
350
+ md: {
351
+ inputHeight: 40,
352
+ labelFontSize: 14,
353
+ labelLineHeight: 20,
354
+ inputFontSize: 16,
355
+ inputLineHeight: 24,
356
+ helperFontSize: 14,
357
+ helperLineHeight: 20,
358
+ paddingX: 16,
359
+ iconSize: 20,
360
+ labelIconSize: 14,
361
+ labelGap: 6,
362
+ helperGap: 4,
363
+ leadingPl: 12,
364
+ leadingPr: 8,
365
+ leadingPy: 8,
366
+ chevronSize: 16,
367
+ counterPadding: "2px 8px",
368
+ counterRadius: 8,
369
+ counterFontSize: 14,
370
+ counterLineHeight: 20,
371
+ skeletonLabelH: 20,
372
+ skeletonInputH: 40
373
+ },
374
+ lg: {
375
+ inputHeight: 48,
376
+ labelFontSize: 16,
377
+ labelLineHeight: 24,
378
+ inputFontSize: 16,
379
+ inputLineHeight: 24,
380
+ helperFontSize: 14,
381
+ helperLineHeight: 20,
382
+ paddingX: 16,
383
+ iconSize: 20,
384
+ labelIconSize: 16,
385
+ labelGap: 8,
386
+ helperGap: 6,
387
+ leadingPl: 16,
388
+ leadingPr: 8,
389
+ leadingPy: 12,
390
+ chevronSize: 16,
391
+ counterPadding: "2px 8px",
392
+ counterRadius: 8,
393
+ counterFontSize: 14,
394
+ counterLineHeight: 20,
395
+ skeletonLabelH: 24,
396
+ skeletonInputH: 48
397
+ }
398
+ }, T = `0 0 0 2px ${b.focusRing}`, E = (e) => {
399
+ let t = e ?? "Idle";
400
+ return {
401
+ s: t,
402
+ isInvalid: t.includes("invalid"),
403
+ isHover: t.includes("hover"),
404
+ isActive: t === "Active" || t === "Keyboard focus" || t.endsWith("active"),
405
+ isDisabled: t === "Disable",
406
+ isSkeleton: t === "Skeleton",
407
+ isFilled: t.includes("Filled"),
408
+ isKeyboardFocus: t === "Keyboard focus"
409
+ };
410
+ }, D = {
411
+ clear: o,
412
+ search: i,
413
+ password: n
414
+ }, O = ({ label: n, required: i = !1, labelRemark: a, placeholder: o = "Placeholder", value: l, onChange: u, helperText: d, errorText: f, state: p = "Idle", size: m = "md", leadingDropdownText: h, leadingIcon: v, counter: y, unit: x, trailingIcon: S, trailingIcons: O, trailingIconSeparator: k = !1 }) => {
415
+ let { isInvalid: A, isHover: j, isActive: M, isDisabled: N, isSkeleton: P, isKeyboardFocus: F } = E(p), I = w[m], L = A ? b.invalidBorder : M || F ? b.activeBorder : j ? b.hoverBorder : g.borderMidgray, R = N ? g.bgDisabled : j ? g.bgLightgray : g.bgWhite, z = N ? g.fgLow : g.fgMid, B = g.fgLow, V = N ? g.fgLow : g.fgHigh, H = N ? g.fgLow : g.fgHigh, U = N ? g.fgLow : g.fgMid, W = A ? _.error : g.fgMid;
416
+ if (P) return /* @__PURE__ */ c("div", {
417
+ style: {
418
+ width: 320,
419
+ display: "flex",
420
+ flexDirection: "column",
421
+ gap: I.labelGap
422
+ },
423
+ children: [/* @__PURE__ */ s("div", { style: {
424
+ height: I.skeletonLabelH,
425
+ background: g.bgSkeleton,
426
+ borderRadius: 6
427
+ } }), /* @__PURE__ */ s("div", { style: {
428
+ height: I.skeletonInputH,
429
+ background: g.bgSkeleton,
430
+ border: `1px solid ${g.bgSkeleton}`,
431
+ borderRadius: 24
432
+ } })]
433
+ });
434
+ let G = v === !0 ? t : v || null, K = O?.length ? O : S ? [S] : [], q = A ? f : d, J = {
435
+ fontFamily: C,
436
+ fontWeight: 500
437
+ };
438
+ return /* @__PURE__ */ c("div", {
439
+ style: {
440
+ width: 320,
441
+ display: "flex",
442
+ flexDirection: "column",
443
+ gap: I.helperGap
444
+ },
445
+ children: [/* @__PURE__ */ c("div", {
446
+ style: {
447
+ display: "flex",
448
+ flexDirection: "column",
449
+ gap: I.labelGap,
450
+ width: "100%"
451
+ },
452
+ children: [/* @__PURE__ */ c("div", {
453
+ style: {
454
+ display: "flex",
455
+ alignItems: "center",
456
+ gap: 4,
457
+ width: "100%"
458
+ },
459
+ children: [
460
+ /* @__PURE__ */ c("div", {
461
+ style: {
462
+ display: "flex",
463
+ flex: "1 0 0",
464
+ alignItems: "center",
465
+ gap: I.labelIconSize === 12 ? 4 : 6,
466
+ minWidth: 0
467
+ },
468
+ children: [/* @__PURE__ */ s("span", {
469
+ style: {
470
+ ...J,
471
+ fontSize: I.labelFontSize,
472
+ lineHeight: `${I.labelLineHeight}px`,
473
+ color: z,
474
+ whiteSpace: "nowrap",
475
+ overflow: "hidden",
476
+ textOverflow: "ellipsis"
477
+ },
478
+ children: n
479
+ }), /* @__PURE__ */ s(r, {
480
+ size: I.labelIconSize,
481
+ color: U,
482
+ strokeWidth: 1.8,
483
+ style: { flexShrink: 0 }
484
+ })]
485
+ }),
486
+ a && /* @__PURE__ */ s("span", {
487
+ style: {
488
+ ...J,
489
+ fontSize: I.labelFontSize,
490
+ lineHeight: `${I.labelLineHeight}px`,
491
+ color: z,
492
+ whiteSpace: "nowrap",
493
+ flexShrink: 0
494
+ },
495
+ children: a
496
+ }),
497
+ i && /* @__PURE__ */ s("span", {
498
+ style: {
499
+ color: _.error,
500
+ fontWeight: 800,
501
+ flexShrink: 0
502
+ },
503
+ children: "*"
504
+ })
505
+ ]
506
+ }), /* @__PURE__ */ c("div", {
507
+ style: {
508
+ background: R,
509
+ border: `1px solid ${L}`,
510
+ height: I.inputHeight,
511
+ width: "100%",
512
+ borderRadius: 24,
513
+ display: "flex",
514
+ alignItems: h ? "stretch" : "center",
515
+ ...h ? {} : {
516
+ gap: 8,
517
+ padding: `0 ${I.paddingX}px`
518
+ },
519
+ overflow: "hidden",
520
+ boxShadow: M || F ? T : "none",
521
+ opacity: N ? .7 : 1,
522
+ boxSizing: "border-box"
523
+ },
524
+ children: [h ? /* @__PURE__ */ c("div", {
525
+ style: {
526
+ display: "flex",
527
+ alignItems: "center",
528
+ gap: 4,
529
+ background: g.bgWhite,
530
+ padding: `${I.leadingPy}px ${I.leadingPr}px ${I.leadingPy}px ${I.leadingPl}px`,
531
+ flexShrink: 0
532
+ },
533
+ children: [/* @__PURE__ */ s("span", {
534
+ style: {
535
+ ...J,
536
+ fontSize: I.inputFontSize,
537
+ lineHeight: `${I.inputLineHeight}px`,
538
+ color: g.fgHigh,
539
+ whiteSpace: "nowrap"
540
+ },
541
+ children: h
542
+ }), /* @__PURE__ */ s("svg", {
543
+ width: I.chevronSize,
544
+ height: I.chevronSize,
545
+ viewBox: "0 0 16 16",
546
+ fill: "none",
547
+ children: /* @__PURE__ */ s("path", {
548
+ d: "M4 6L8 10L12 6",
549
+ stroke: g.fgHigh,
550
+ strokeWidth: "1.5",
551
+ strokeLinecap: "round",
552
+ strokeLinejoin: "round"
553
+ })
554
+ })]
555
+ }) : G ? /* @__PURE__ */ s(G, {
556
+ size: I.iconSize,
557
+ color: H,
558
+ strokeWidth: 1.6,
559
+ style: { flexShrink: 0 }
560
+ }) : null, /* @__PURE__ */ c("div", {
561
+ style: {
562
+ flex: "1 0 0",
563
+ display: "flex",
564
+ alignItems: "center",
565
+ gap: 8,
566
+ height: "100%",
567
+ minWidth: 0,
568
+ ...h ? {
569
+ borderLeft: `1px solid ${g.borderLight}`,
570
+ padding: "0 12px"
571
+ } : {}
572
+ },
573
+ children: [
574
+ /* @__PURE__ */ s("div", {
575
+ style: {
576
+ flex: "1 0 0",
577
+ overflow: "hidden",
578
+ display: "flex",
579
+ alignItems: "center"
580
+ },
581
+ children: /* @__PURE__ */ s("span", {
582
+ style: {
583
+ ...J,
584
+ fontSize: I.inputFontSize,
585
+ lineHeight: `${I.inputLineHeight}px`,
586
+ color: l ? V : B,
587
+ overflow: "hidden",
588
+ textOverflow: "ellipsis",
589
+ whiteSpace: "nowrap",
590
+ display: "block",
591
+ width: "100%"
592
+ },
593
+ children: l || o
594
+ })
595
+ }),
596
+ y && /* @__PURE__ */ c("div", {
597
+ style: {
598
+ background: g.bgLightgray,
599
+ display: "flex",
600
+ gap: 2,
601
+ alignItems: "center",
602
+ justifyContent: "center",
603
+ padding: I.counterPadding,
604
+ borderRadius: I.counterRadius,
605
+ flexShrink: 0,
606
+ opacity: N ? .7 : 1
607
+ },
608
+ children: [/* @__PURE__ */ s("span", {
609
+ style: {
610
+ ...J,
611
+ fontSize: I.counterFontSize,
612
+ lineHeight: `${I.counterLineHeight}px`,
613
+ color: g.fgHigh
614
+ },
615
+ children: y.value
616
+ }), /* @__PURE__ */ c("span", {
617
+ style: {
618
+ ...J,
619
+ fontSize: I.counterFontSize,
620
+ lineHeight: `${I.counterLineHeight}px`,
621
+ color: g.fgMid
622
+ },
623
+ children: ["/ ", y.max]
624
+ })]
625
+ }),
626
+ x && /* @__PURE__ */ s("span", {
627
+ style: {
628
+ ...J,
629
+ fontSize: I.inputFontSize,
630
+ lineHeight: `${I.inputLineHeight}px`,
631
+ color: g.fgHigh,
632
+ whiteSpace: "nowrap",
633
+ flexShrink: 0,
634
+ maxWidth: 64,
635
+ overflow: "hidden"
636
+ },
637
+ children: x
638
+ }),
639
+ K.length > 0 && /* @__PURE__ */ s("div", {
640
+ style: {
641
+ display: "flex",
642
+ alignItems: "center",
643
+ gap: 4,
644
+ flexShrink: 0
645
+ },
646
+ children: K.map((t, n) => {
647
+ let r = D[t];
648
+ return /* @__PURE__ */ c(e.Fragment, { children: [k && n > 0 && /* @__PURE__ */ s("div", { style: {
649
+ width: 1,
650
+ height: I.iconSize,
651
+ background: g.gray300,
652
+ flexShrink: 0,
653
+ alignSelf: "center"
654
+ } }), /* @__PURE__ */ s(r, {
655
+ size: I.iconSize,
656
+ color: H,
657
+ strokeWidth: 1.6,
658
+ style: { flexShrink: 0 }
659
+ })] }, `${t}-${n}`);
660
+ })
661
+ })
662
+ ]
663
+ })]
664
+ })]
665
+ }), q && /* @__PURE__ */ s("p", {
666
+ style: {
667
+ ...J,
668
+ margin: 0,
669
+ fontSize: I.helperFontSize,
670
+ lineHeight: `${I.helperLineHeight}px`,
671
+ color: W,
672
+ width: "100%"
673
+ },
674
+ children: q
675
+ })]
676
+ });
677
+ }, k = h;
678
+ //#endregion
679
+ export { m as Badge, O as InputField, v as ciPrimary, C as font, g as grayNeutral, b as interactive, y as oePrimary, x as padding, S as radius, _ as status, k as tokens };
680
+
681
+ //# sourceMappingURL=senestia-ui.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"senestia-ui.es.js","names":[],"sources":["../src/stories/Badge.tsx","../src/stories/tokens.ts","../src/stories/InputField.tsx","../src/index.ts"],"sourcesContent":["import React from 'react';\nimport { X } from 'lucide-react';\n\n// ─── Design System Font ──────────────────────────────────────────────────────\nconst font = 'Sarabun, sans-serif';\n\n// ─── Types ───────────────────────────────────────────────────────────────────\n\nexport type BadgeColor =\n | 'Gray'\n | 'Primary'\n | 'Error'\n | 'Warning'\n | 'Success'\n | 'Blue light'\n | 'Blue'\n | 'Indigo'\n | 'Purple'\n | 'Pink'\n | 'Orange'\n | 'Gray blue';\n\nexport type BadgeSize = 'sm' | 'md' | 'lg';\n\nexport type BadgeType = 'Idle' | 'Status Dot' | 'Closable' | 'Pill color';\n\nexport interface BadgeProps {\n /** Badge label text */\n label?: string;\n /** Color variant */\n color?: BadgeColor;\n /** Size variant */\n size?: BadgeSize;\n /** Type / style variant */\n type?: BadgeType;\n /** Icon to render inside Pill color type (Lucide icon component) */\n icon?: React.ElementType;\n /** Called when close button is clicked (Closable type) */\n onClose?: () => void;\n}\n\n// ─── Color Tokens ────────────────────────────────────────────────────────────\n\nconst COLOR_TOKENS: Record<\n BadgeColor,\n { bg: string; border: string; text: string; dot: string }\n> = {\n Gray: { bg: '#f9fafb', border: '#eaecf0', text: '#06080b', dot: '#667085' },\n Primary: { bg: '#f4f6f9', border: '#e6ebf2', text: '#1e2b3b', dot: '#6c8fbe' },\n Error: { bg: '#fef0ef', border: '#fbd2d0', text: '#cc1a11', dot: '#f04438' },\n Warning: { bg: '#fff9ee', border: '#ffedcc', text: '#db8f02', dot: '#f79009' },\n Success: { bg: '#f0fdfa', border: '#d2f9f1', text: '#15a686', dot: '#12b76a' },\n 'Blue light': { bg: '#f0f9ff', border: '#b9e6fe', text: '#026aa2', dot: '#0ba5ec' },\n Blue: { bg: '#eff8ff', border: '#b2ddff', text: '#175cd3', dot: '#2e90fa' },\n Indigo: { bg: '#eef4ff', border: '#c7d7fe', text: '#3538cd', dot: '#6172f3' },\n Purple: { bg: '#f4f3ff', border: '#d9d6fe', text: '#5925dc', dot: '#7a5af8' },\n Pink: { bg: '#fef6fb', border: '#fce7f6', text: '#c11574', dot: '#ee46bc' },\n Orange: { bg: '#fef6ee', border: '#ffd6ae', text: '#b93815', dot: '#ef6820' },\n 'Gray blue':{ bg: '#f8f9fc', border: '#d5d9eb', text: '#363f72', dot: '#717bbc' },\n};\n\n// ─── Size Tokens ─────────────────────────────────────────────────────────────\n\nconst SIZE_TOKENS: Record<\n BadgeSize,\n {\n paddingX: number;\n paddingY: number;\n paddingXClose: { left: number; right: number };\n paddingXDot: { left: number; right: number };\n paddingPill: number;\n fontSize: number;\n lineHeight: number;\n dotSize: number;\n iconSize: number;\n closeSize: number;\n }\n> = {\n sm: {\n paddingX: 8, paddingY: 2,\n paddingXClose: { left: 8, right: 4 },\n paddingXDot: { left: 6, right: 8 },\n paddingPill: 5,\n fontSize: 12, lineHeight: 18,\n dotSize: 6, iconSize: 12, closeSize: 12,\n },\n md: {\n paddingX: 8, paddingY: 2,\n paddingXClose: { left: 8, right: 4 },\n paddingXDot: { left: 6, right: 8 },\n paddingPill: 6,\n fontSize: 14, lineHeight: 20,\n dotSize: 6, iconSize: 14, closeSize: 14,\n },\n lg: {\n paddingX: 12, paddingY: 4,\n paddingXClose: { left: 12, right: 6 },\n paddingXDot: { left: 8, right: 12 },\n paddingPill: 8,\n fontSize: 14, lineHeight: 20,\n dotSize: 8, iconSize: 16, closeSize: 16,\n },\n};\n\n// ─── Component ───────────────────────────────────────────────────────────────\n\nexport const Badge: React.FC<BadgeProps> = ({\n label = 'Label',\n color = 'Gray',\n size = 'sm',\n type = 'Idle',\n icon: IconComponent,\n onClose,\n}) => {\n const c = COLOR_TOKENS[color];\n const s = SIZE_TOKENS[size];\n\n // ── Shared wrapper style ──────────────────────────────────────────────────\n const baseWrapper: React.CSSProperties = {\n display: 'inline-flex',\n alignItems: 'center',\n backgroundColor: c.bg,\n border: `1px solid ${c.border}`,\n borderRadius: 16,\n boxSizing: 'border-box',\n width: 'fit-content',\n fontFamily: font,\n };\n\n // ── Text style ────────────────────────────────────────────────────────────\n const textStyle: React.CSSProperties = {\n fontSize: s.fontSize,\n lineHeight: `${s.lineHeight}px`,\n fontWeight: 500,\n color: c.text,\n whiteSpace: 'nowrap',\n fontFamily: font,\n margin: 0,\n };\n\n // ── Idle ─────────────────────────────────────────────────────────────────\n if (type === 'Idle') {\n return (\n <span\n style={{\n ...baseWrapper,\n padding: `${s.paddingY}px ${s.paddingX}px`,\n }}\n >\n <span style={textStyle}>{label}</span>\n </span>\n );\n }\n\n // ── Status Dot ────────────────────────────────────────────────────────────\n if (type === 'Status Dot') {\n return (\n <span\n style={{\n ...baseWrapper,\n gap: 4,\n paddingTop: s.paddingY,\n paddingBottom: s.paddingY,\n paddingLeft: s.paddingXDot.left,\n paddingRight: s.paddingXDot.right,\n }}\n >\n {/* Dot */}\n <span\n style={{\n display: 'inline-block',\n width: s.dotSize,\n height: s.dotSize,\n borderRadius: '50%',\n backgroundColor: c.dot,\n flexShrink: 0,\n }}\n />\n <span style={textStyle}>{label}</span>\n </span>\n );\n }\n\n // ── Closable ──────────────────────────────────────────────────────────────\n if (type === 'Closable') {\n return (\n <span\n style={{\n ...baseWrapper,\n gap: 2,\n paddingTop: s.paddingY,\n paddingBottom: s.paddingY,\n paddingLeft: s.paddingXClose.left,\n paddingRight: s.paddingXClose.right,\n }}\n >\n <span style={textStyle}>{label}</span>\n <button\n onClick={onClose}\n style={{\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n background: 'none',\n border: 'none',\n padding: 2,\n borderRadius: 3,\n cursor: 'pointer',\n color: c.text,\n flexShrink: 0,\n lineHeight: 1,\n }}\n aria-label=\"Remove\"\n >\n <X size={s.closeSize} strokeWidth={2.5} />\n </button>\n </span>\n );\n }\n\n // ── Pill color (icon only) ────────────────────────────────────────────────\n if (type === 'Pill color') {\n const PillIcon = IconComponent;\n return (\n <span\n style={{\n ...baseWrapper,\n padding: s.paddingPill,\n }}\n >\n {PillIcon ? (\n <PillIcon size={s.iconSize} color={c.dot} strokeWidth={2} />\n ) : (\n // Default: colored circle dot\n <span\n style={{\n display: 'inline-block',\n width: s.iconSize,\n height: s.iconSize,\n borderRadius: '50%',\n backgroundColor: c.dot,\n }}\n />\n )}\n </span>\n );\n }\n\n return null;\n};\n","/**\n * Senestia Design System — Semantic Color Tokens\n *\n * ┌─────────────────────────────────────────────────────────────┐\n * │ Source: Figma DS-01 · Foundation → Semantic Color │\n * │ Use these tokens in components instead of raw hex values. │\n * └─────────────────────────────────────────────────────────────┘\n */\n\n// ─── Gray-Neutral ─────────────────────────────────────────────────────────────\n\nexport const grayNeutral = {\n /** Semantic/Gray-Neutral/fg/high — primary text, dark icons */\n fgHigh: '#1B1D22',\n /** Semantic/Gray-Neutral/fg/mid-on-white — label text, helper text, secondary icons */\n fgMid: '#6A6E83',\n /** Semantic/Gray-Neutral/fg/low-on-white — placeholder, disabled text */\n fgLow: '#9A9DAD',\n\n /** Semantic/Gray-Neutral/bg/white */\n bgWhite: '#FFFFFF',\n /** Semantic/Gray-Neutral/bg/lightgray — counter pill, subtle backgrounds */\n bgLightgray: '#F8F8F9',\n /** Semantic/Gray-Neutral/bg/disabled */\n bgDisabled: '#F3F4F6',\n\n /** Semantic/Gray-Neutral/border/midgray — default input border */\n borderMidgray: '#CFD1D9',\n /** Semantic/Gray-Neutral/border/light — dividers, card borders */\n borderLight: '#EBECEF',\n /** Disabled border (checkbox, input) */\n borderDisabled: '#E5EAF1',\n\n /** Gray/300 — icon separators */\n gray300: '#D0D5DD',\n /** Skeleton loading shimmer */\n bgSkeleton: '#EEF0F3',\n /** Strong disabled background (checkbox) */\n bgDisabledStrong: '#EBECEF',\n} as const;\n\n// ─── Status ───────────────────────────────────────────────────────────────────\n\nexport const status = {\n /** Error / invalid state */\n error: '#DB1439',\n /** Warning */\n warning: '#DB8F02',\n /** Success */\n success: '#15A686',\n} as const;\n\n// ─── CI Primary (Senestia brand purple) ───────────────────────────────────────\n\nexport const ciPrimary = {\n fgLow: '#C4B3F6',\n fgHigh: '#802CEB',\n bgLow: '#D4C9F6',\n bgMid: '#802CEB',\n bgHigh: '#5A1DA9',\n borderMid: '#996CF3',\n borderHigh: '#802CEB',\n} as const;\n\n// ─── OE Theme (OE brand blue) ─────────────────────────────────────────────────\n\nexport const oePrimary = {\n fgLow: '#5273A1',\n fgHigh: '#3A5274',\n bgLowest: '#EFF2F6', // selected item background in pickers\n bgLow: '#6E90BF',\n bgMid: '#5273A1',\n bgHigh: '#3A5274',\n borderLowest:'#C6D2E3', // focused item border\n borderLow: '#9CB3D2',\n borderMid: '#5273A1',\n /** Primary/300 — supporting/helper text on blue-tinted UI */\n p300: '#809BBF',\n /** Indigo/300 — \"Set to now\" link color */\n linkBlue: '#3C5BD5',\n} as const;\n\n// ─── Interactive states ───────────────────────────────────────────────────────\n\nexport const interactive = {\n /** Active / focused border */\n activeBorder: oePrimary.fgLow, // #5273A1\n /** Hover border */\n hoverBorder: '#3B82F6',\n /** Focus ring shadow */\n focusRing: '#D7DFEA',\n /** Invalid border */\n invalidBorder: status.error,\n} as const;\n\n// ─── Padding tokens (PD) ─────────────────────────────────────────────────────\n\nexport const padding = {\n 'PD-0': 0,\n 'PD-1': 1,\n 'PD-2': 2,\n 'PD-3': 4,\n 'PD-4': 6,\n 'PD-5': 8,\n 'PD-6': 12,\n 'PD-7': 16,\n 'PD-8': 24,\n 'PD-9': 32,\n 'PD-10': 40,\n 'PD-11': 48,\n 'PD-12': 56,\n 'PD-13': 64,\n 'PD-14': 72,\n 'PD-15': 80,\n} as const;\n\n// ─── Corner Radius tokens (CR) ───────────────────────────────────────────────\n\nexport const radius = {\n 'CR-0': 0,\n 'CR-1': 2,\n 'CR-2': 4,\n 'CR-3': 8,\n 'CR-4': 12,\n 'CR-5': 16,\n 'CR-6': 20,\n 'CR-7': 24,\n 'CR-8': 32,\n 'CR-9': 48,\n 'CR-10': 100,\n} as const;\n\n// ─── Typography ───────────────────────────────────────────────────────────────\n\nexport const font = 'Sarabun, sans-serif';\n","import React from 'react';\nimport { Circle, Info, XCircle, Search, Eye } from 'lucide-react';\nimport { grayNeutral, status, interactive, font } from './tokens';\n\n// ─── Types ───────────────────────────────────────────────────────────────────\n\nexport type InputFieldState =\n | 'Idle'\n | 'Idle hover'\n | 'Active'\n | 'Idle invalid'\n | 'Idle invalid hover'\n | 'Idle invalid active'\n | 'Filled'\n | 'Filled hover'\n | 'Filled active'\n | 'Filled invalid'\n | 'Filled invalid hover'\n | 'Filled invalid active'\n | 'Disable'\n | 'Keyboard focus'\n | 'Skeleton';\n\nexport type InputFieldSize = 'sm' | 'md' | 'lg';\n\nexport type InputFieldTrailingIcon = 'clear' | 'password' | 'search';\n\nexport type InputFieldCounter = {\n value: number;\n max: number;\n};\n\nexport interface InputFieldProps {\n /** Label text displayed above the input */\n label: string;\n /** Show required asterisk (*) */\n required?: boolean;\n /** Remark text next to label e.g. \"(optional)\" */\n labelRemark?: string;\n /** Placeholder text */\n placeholder?: string;\n /** Current value */\n value?: string;\n /** Called when value changes */\n onChange?: (value: string) => void;\n /** Helper text below the input (hidden when invalid) */\n helperText?: string;\n /** Error message below the input (shown when invalid state) */\n errorText?: string;\n /** Visual state from Figma */\n state?: InputFieldState;\n /** Input size — affects height, font, and padding */\n size?: InputFieldSize;\n /** Leading dropdown prefix text */\n leadingDropdownText?: string;\n /**\n * Leading icon inside the input (left side).\n * - `true` → default Circle icon\n * - `React.ElementType` → custom Lucide icon\n * - `false/undefined` → no icon\n */\n leadingIcon?: React.ElementType | boolean;\n /** Counter pill e.g. `{ value: 0, max: 20 }` */\n counter?: InputFieldCounter;\n /** Unit text inside the input */\n unit?: string;\n /** Single trailing icon */\n trailingIcon?: InputFieldTrailingIcon;\n /** Multiple trailing icons (overrides trailingIcon) */\n trailingIcons?: InputFieldTrailingIcon[];\n /** Show separator between trailing icons */\n trailingIconSeparator?: boolean;\n}\n\n// ─── Design tokens (from Figma) ──────────────────────────────────────────────\n\n/**\n * Size tokens — matched to Figma nodes:\n * sm (Sm-32): label C5 12/18 · input C4 14/20 · helper C5 12/18\n * md (Md-40): label C4 14/20 · input C3 16/24 · helper C4 14/20\n * lg (Lg-48): label C3 16/24 · input C3 16/24 · helper C4 14/20\n *\n * Spacing (per Figma sm node — gap-4 between all elements):\n * labelGap = gap between label row and input box\n * helperGap = gap between input box and helper/error text\n */\nconst sizeTokens = {\n sm: {\n inputHeight: 32,\n labelFontSize: 12, labelLineHeight: 18,\n inputFontSize: 14, inputLineHeight: 20,\n helperFontSize: 12, helperLineHeight: 18,\n paddingX: 12,\n iconSize: 16,\n labelIconSize: 12,\n labelGap: 4, // label row → input\n helperGap: 4, // input → helper text\n leadingPl: 8, leadingPr: 4, leadingPy: 6,\n chevronSize: 14,\n counterPadding: '1px 4px',\n counterRadius: 4,\n counterFontSize: 12, counterLineHeight: 18,\n skeletonLabelH: 18, skeletonInputH: 32,\n },\n md: {\n inputHeight: 40,\n labelFontSize: 14, labelLineHeight: 20,\n inputFontSize: 16, inputLineHeight: 24,\n helperFontSize: 14, helperLineHeight: 20,\n paddingX: 16,\n iconSize: 20,\n labelIconSize: 14,\n labelGap: 6, // label row → input\n helperGap: 4, // input → helper text\n leadingPl: 12, leadingPr: 8, leadingPy: 8,\n chevronSize: 16,\n counterPadding: '2px 8px',\n counterRadius: 8,\n counterFontSize: 14, counterLineHeight: 20,\n skeletonLabelH: 20, skeletonInputH: 40,\n },\n lg: {\n inputHeight: 48,\n labelFontSize: 16, labelLineHeight: 24,\n inputFontSize: 16, inputLineHeight: 24,\n helperFontSize: 14, helperLineHeight: 20,\n paddingX: 16,\n iconSize: 20,\n labelIconSize: 16,\n labelGap: 8, // label row → input\n helperGap: 6, // input → helper text\n leadingPl: 16, leadingPr: 8, leadingPy: 12,\n chevronSize: 16,\n counterPadding: '2px 8px',\n counterRadius: 8,\n counterFontSize: 14, counterLineHeight: 20,\n skeletonLabelH: 24, skeletonInputH: 48,\n },\n} as const;\n\n// ─── State helpers ────────────────────────────────────────────────────────────\n\nconst focusRingStyle = `0 0 0 2px ${interactive.focusRing}`;\n\nconst getStateFlags = (state: InputFieldState | undefined) => {\n const s = state ?? 'Idle';\n const isInvalid = s.includes('invalid');\n const isHover = s.includes('hover');\n const isActive = s === 'Active' || s === 'Keyboard focus' || s.endsWith('active');\n const isDisabled = s === 'Disable';\n const isSkeleton = s === 'Skeleton';\n const isFilled = s.includes('Filled');\n const isKeyboardFocus = s === 'Keyboard focus';\n return { s, isInvalid, isHover, isActive, isDisabled, isSkeleton, isFilled, isKeyboardFocus };\n};\n\n// ─── Trailing icon map → Lucide ───────────────────────────────────────────────\n\nconst TRAILING_ICON_MAP = {\n clear: XCircle,\n search: Search,\n password: Eye,\n} as const;\n\n// ─── Component ───────────────────────────────────────────────────────────────\n\nexport const InputField = ({\n label,\n required = false,\n labelRemark,\n placeholder = 'Placeholder',\n value,\n onChange: _onChange,\n helperText,\n errorText,\n state = 'Idle',\n size = 'md',\n leadingDropdownText,\n leadingIcon,\n counter,\n unit,\n trailingIcon,\n trailingIcons,\n trailingIconSeparator = false,\n}: InputFieldProps) => {\n const { isInvalid, isHover, isActive, isDisabled, isSkeleton, isKeyboardFocus } =\n getStateFlags(state);\n\n const t = sizeTokens[size];\n\n // ── Colors — mapped to Semantic/Gray-Neutral tokens ─────────────────────\n const borderColor = isInvalid\n ? interactive.invalidBorder // status.error #DB1439\n : isActive || isKeyboardFocus\n ? interactive.activeBorder // oePrimary.fgLow #5273A1\n : isHover\n ? interactive.hoverBorder // #3B82F6\n : grayNeutral.borderMidgray; // #CFD1D9\n\n const background = isDisabled\n ? grayNeutral.bgDisabled // #F3F4F6\n : isHover\n ? grayNeutral.bgLightgray // #F8F8F9\n : grayNeutral.bgWhite; // #FFFFFF\n\n // Label text → fg/mid-on-white (disabled → fg/low)\n const labelColor = isDisabled ? grayNeutral.fgLow : grayNeutral.fgMid;\n\n // Placeholder → fg/low-on-white (same whether disabled or not)\n const placeholderColor = grayNeutral.fgLow; // #9A9DAD\n\n // Typed value → fg/high (disabled → fg/low)\n const valueColor = isDisabled ? grayNeutral.fgLow : grayNeutral.fgHigh; // #1B1D22\n\n // ── Icon colors (Figma: Semantic/Gray-Neutral/fg/high for input icons) ───\n // Input leading/trailing icons → fg/high (#1B1D22)\n const inputIconColor = isDisabled ? grayNeutral.fgLow : grayNeutral.fgHigh;\n // Label info icon → fg/mid (same as label text, #6A6E83)\n const labelIconColor = isDisabled ? grayNeutral.fgLow : grayNeutral.fgMid;\n\n const helperColor = isInvalid ? status.error : grayNeutral.fgMid; // #6A6E83\n\n // ── Skeleton ─────────────────────────────────────────────────────────────\n if (isSkeleton) {\n return (\n <div style={{ width: 320, display: 'flex', flexDirection: 'column', gap: t.labelGap }}>\n <div style={{ height: t.skeletonLabelH, background: grayNeutral.bgSkeleton, borderRadius: 6 }} />\n <div style={{ height: t.skeletonInputH, background: grayNeutral.bgSkeleton, border: `1px solid ${grayNeutral.bgSkeleton}`, borderRadius: 24 }} />\n </div>\n );\n }\n\n // ── Leading icon resolve ──────────────────────────────────────────────────\n // true → Circle (Figma default \"Icon/circle\"), component → custom, false → none\n const LeadingIconComponent: React.ElementType | null =\n leadingIcon === true\n ? Circle\n : leadingIcon\n ? (leadingIcon as React.ElementType)\n : null;\n\n // ── Trailing icons ────────────────────────────────────────────────────────\n const iconsToRender: InputFieldTrailingIcon[] =\n trailingIcons?.length ? trailingIcons : trailingIcon ? [trailingIcon] : [];\n\n // ── Text below input ──────────────────────────────────────────────────────\n const showText = isInvalid ? errorText : helperText;\n\n // ── Shared font style ─────────────────────────────────────────────────────\n const baseFont: React.CSSProperties = { fontFamily: font, fontWeight: 500 };\n\n return (\n /*\n * Outer wrapper — two-level gap structure matching Figma:\n * Level 1 (helperGap): separates [label + input block] from [helper text]\n * Level 2 (labelGap): separates [label row] from [input box]\n */\n <div style={{ width: 320, display: 'flex', flexDirection: 'column', gap: t.helperGap }}>\n\n {/* ── Level 1: label + input block ────────────────────────────────── */}\n <div style={{ display: 'flex', flexDirection: 'column', gap: t.labelGap, width: '100%' }}>\n\n {/* Label row */}\n <div style={{ display: 'flex', alignItems: 'center', gap: 4, width: '100%' }}>\n {/* Left: label text + info icon */}\n <div style={{ display: 'flex', flex: '1 0 0', alignItems: 'center', gap: t.labelIconSize === 12 ? 4 : 6, minWidth: 0 }}>\n <span\n style={{\n ...baseFont,\n fontSize: t.labelFontSize,\n lineHeight: `${t.labelLineHeight}px`,\n color: labelColor,\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n }}\n >\n {label}\n </span>\n {/* Info icon — fg/mid-on-white (same shade as label text) */}\n <Info\n size={t.labelIconSize}\n color={labelIconColor}\n strokeWidth={1.8}\n style={{ flexShrink: 0 }}\n />\n </div>\n\n {/* Right: remark or required marker */}\n {labelRemark && (\n <span\n style={{\n ...baseFont,\n fontSize: t.labelFontSize,\n lineHeight: `${t.labelLineHeight}px`,\n color: labelColor,\n whiteSpace: 'nowrap',\n flexShrink: 0,\n }}\n >\n {labelRemark}\n </span>\n )}\n {required && (\n <span style={{ color: status.error, fontWeight: 800, flexShrink: 0 }}>*</span>\n )}\n </div>\n\n {/* Input box */}\n <div\n style={{\n background,\n border: `1px solid ${borderColor}`,\n height: t.inputHeight,\n width: '100%',\n borderRadius: 24,\n display: 'flex',\n alignItems: leadingDropdownText ? 'stretch' : 'center',\n ...(leadingDropdownText ? {} : { gap: 8, padding: `0 ${t.paddingX}px` }),\n overflow: 'hidden',\n boxShadow: isActive || isKeyboardFocus ? focusRingStyle : 'none',\n opacity: isDisabled ? 0.7 : 1,\n boxSizing: 'border-box',\n }}\n >\n {/* Leading: dropdown prefix OR icon */}\n {leadingDropdownText ? (\n <div\n style={{\n display: 'flex',\n alignItems: 'center',\n gap: 4,\n background: grayNeutral.bgWhite,\n padding: `${t.leadingPy}px ${t.leadingPr}px ${t.leadingPy}px ${t.leadingPl}px`,\n flexShrink: 0,\n }}\n >\n <span\n style={{\n ...baseFont,\n fontSize: t.inputFontSize,\n lineHeight: `${t.inputLineHeight}px`,\n color: grayNeutral.fgHigh,\n whiteSpace: 'nowrap',\n }}\n >\n {leadingDropdownText}\n </span>\n <svg width={t.chevronSize} height={t.chevronSize} viewBox=\"0 0 16 16\" fill=\"none\">\n <path d=\"M4 6L8 10L12 6\" stroke={grayNeutral.fgHigh} strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n </div>\n ) : LeadingIconComponent ? (\n /* Leading icon in input → fg/high (#1B1D22) per Figma */\n <LeadingIconComponent\n size={t.iconSize}\n color={inputIconColor}\n strokeWidth={1.6}\n style={{ flexShrink: 0 }}\n />\n ) : null}\n\n {/* Text + accessories area */}\n <div\n style={{\n flex: '1 0 0',\n display: 'flex',\n alignItems: 'center',\n gap: 8,\n height: '100%',\n minWidth: 0,\n ...(leadingDropdownText\n ? { borderLeft: `1px solid ${grayNeutral.borderLight}`, padding: `0 12px` }\n : {}),\n }}\n >\n {/* Placeholder / Value text */}\n <div\n style={{\n flex: '1 0 0',\n overflow: 'hidden',\n display: 'flex',\n alignItems: 'center',\n }}\n >\n <span\n style={{\n ...baseFont,\n fontSize: t.inputFontSize,\n lineHeight: `${t.inputLineHeight}px`,\n color: value ? valueColor : placeholderColor,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n display: 'block',\n width: '100%',\n }}\n >\n {value || placeholder}\n </span>\n </div>\n\n {/* Counter pill */}\n {counter && (\n <div\n style={{\n background: grayNeutral.bgLightgray,\n display: 'flex',\n gap: 2,\n alignItems: 'center',\n justifyContent: 'center',\n padding: t.counterPadding,\n borderRadius: t.counterRadius,\n flexShrink: 0,\n opacity: isDisabled ? 0.7 : 1,\n }}\n >\n <span\n style={{\n ...baseFont,\n fontSize: t.counterFontSize,\n lineHeight: `${t.counterLineHeight}px`,\n color: grayNeutral.fgHigh,\n }}\n >\n {counter.value}\n </span>\n <span\n style={{\n ...baseFont,\n fontSize: t.counterFontSize,\n lineHeight: `${t.counterLineHeight}px`,\n color: grayNeutral.fgMid,\n }}\n >\n / {counter.max}\n </span>\n </div>\n )}\n\n {/* Unit text */}\n {unit && (\n <span\n style={{\n ...baseFont,\n fontSize: t.inputFontSize,\n lineHeight: `${t.inputLineHeight}px`,\n color: grayNeutral.fgHigh,\n whiteSpace: 'nowrap',\n flexShrink: 0,\n maxWidth: 64,\n overflow: 'hidden',\n }}\n >\n {unit}\n </span>\n )}\n\n {/* Trailing icons */}\n {iconsToRender.length > 0 && (\n <div style={{ display: 'flex', alignItems: 'center', gap: 4, flexShrink: 0 }}>\n {iconsToRender.map((ic, idx) => {\n const TrailingIcon = TRAILING_ICON_MAP[ic];\n return (\n <React.Fragment key={`${ic}-${idx}`}>\n {trailingIconSeparator && idx > 0 && (\n <div\n style={{\n width: 1,\n height: t.iconSize,\n background: grayNeutral.gray300,\n flexShrink: 0,\n alignSelf: 'center',\n }}\n />\n )}\n {/* Trailing icon → fg/high (#1B1D22) per Figma */}\n <TrailingIcon\n size={t.iconSize}\n color={inputIconColor}\n strokeWidth={1.6}\n style={{ flexShrink: 0 }}\n />\n </React.Fragment>\n );\n })}\n </div>\n )}\n </div>\n </div>\n </div>\n\n {/* ── Level 1: helper / error text ────────────────────────────────── */}\n {/*\n * No extra margin here — the outer helperGap (4px sm / 4px md / 6px lg)\n * from the flex container already provides the correct spacing from Figma.\n */}\n {showText && (\n <p\n style={{\n ...baseFont,\n margin: 0,\n fontSize: t.helperFontSize,\n lineHeight: `${t.helperLineHeight}px`,\n color: helperColor,\n width: '100%',\n }}\n >\n {showText}\n </p>\n )}\n </div>\n );\n};\n","// ─── Senestia Design System — Public API ─────────────────────────────────────\n//\n// import { Badge, InputField, tokens } from '@senestia/ui'\n//\n// ─────────────────────────────────────────────────────────────────────────────\n\n// ── Components ────────────────────────────────────────────────────────────────\nexport { Badge } from './stories/Badge';\nexport { InputField } from './stories/InputField';\n\n// ── Component types ───────────────────────────────────────────────────────────\nexport type { BadgeProps, BadgeColor, BadgeSize, BadgeType } from './stories/Badge';\nexport type {\n InputFieldProps,\n InputFieldState,\n InputFieldSize,\n InputFieldTrailingIcon,\n InputFieldCounter,\n} from './stories/InputField';\n\n// ── Design Tokens ─────────────────────────────────────────────────────────────\nexport {\n // Colors\n grayNeutral,\n status,\n ciPrimary,\n oePrimary,\n interactive,\n // Spacing\n padding,\n radius,\n // Typography\n font,\n} from './stories/tokens';\n\n// ── Tokens namespace (for tree-shaking friendly usage) ────────────────────────\nimport * as _tokens from './stories/tokens';\nexport const tokens = _tokens;\n"],"mappings":";;;;;;;;;;;GAIM,IAAO,uBAuCP,IAGF;CACF,MAAY;EAAE,IAA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,OAAO,EAAE,YAAY,GAAG;SACxB,CAAA,CACa,EAAA,EAnBI,GAAG,EAAG,GAAG,IAmBb;SAEnB;OACE,CAAA;MAEJ;OACF;MACF;MAOL,KACC,kBAAC,KAAD;GACE,OAAO;IACL,GAAG;IACH,QAAQ;IACR,UAAU,EAAE;IACZ,YAAY,GAAG,EAAE,iBAAiB;IAClC,OAAO;IACP,OAAO;IACR;aAEA;GACC,CAAA,CAEF;;GC1dG,IAAS"}
@@ -0,0 +1,2 @@
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`react`),require(`lucide-react`),require(`react/jsx-runtime`)):typeof define==`function`&&define.amd?define([`exports`,`react`,`lucide-react`,`react/jsx-runtime`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.SenestiaUI={},e.React,e.LucideReact,e.react_jsx_runtime))})(this,function(e,t,n,r){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var i=Object.create,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,c=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=(e,t)=>{let n={};for(var r in e)a(n,r,{get:e[r],enumerable:!0});return t||a(n,Symbol.toStringTag,{value:`Module`}),n},d=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=s(t),c=0,u=i.length,d;c<u;c++)d=i[c],!l.call(e,d)&&d!==n&&a(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=o(t,d))||r.enumerable});return e};t=((e,t,n)=>(n=e==null?{}:i(c(e)),d(t||!e||!e.__esModule?a(n,`default`,{value:e,enumerable:!0}):n,e)))(t);var f=`Sarabun, sans-serif`,p={Gray:{bg:`#f9fafb`,border:`#eaecf0`,text:`#06080b`,dot:`#667085`},Primary:{bg:`#f4f6f9`,border:`#e6ebf2`,text:`#1e2b3b`,dot:`#6c8fbe`},Error:{bg:`#fef0ef`,border:`#fbd2d0`,text:`#cc1a11`,dot:`#f04438`},Warning:{bg:`#fff9ee`,border:`#ffedcc`,text:`#db8f02`,dot:`#f79009`},Success:{bg:`#f0fdfa`,border:`#d2f9f1`,text:`#15a686`,dot:`#12b76a`},"Blue light":{bg:`#f0f9ff`,border:`#b9e6fe`,text:`#026aa2`,dot:`#0ba5ec`},Blue:{bg:`#eff8ff`,border:`#b2ddff`,text:`#175cd3`,dot:`#2e90fa`},Indigo:{bg:`#eef4ff`,border:`#c7d7fe`,text:`#3538cd`,dot:`#6172f3`},Purple:{bg:`#f4f3ff`,border:`#d9d6fe`,text:`#5925dc`,dot:`#7a5af8`},Pink:{bg:`#fef6fb`,border:`#fce7f6`,text:`#c11574`,dot:`#ee46bc`},Orange:{bg:`#fef6ee`,border:`#ffd6ae`,text:`#b93815`,dot:`#ef6820`},"Gray blue":{bg:`#f8f9fc`,border:`#d5d9eb`,text:`#363f72`,dot:`#717bbc`}},m={sm:{paddingX:8,paddingY:2,paddingXClose:{left:8,right:4},paddingXDot:{left:6,right:8},paddingPill:5,fontSize:12,lineHeight:18,dotSize:6,iconSize:12,closeSize:12},md:{paddingX:8,paddingY:2,paddingXClose:{left:8,right:4},paddingXDot:{left:6,right:8},paddingPill:6,fontSize:14,lineHeight:20,dotSize:6,iconSize:14,closeSize:14},lg:{paddingX:12,paddingY:4,paddingXClose:{left:12,right:6},paddingXDot:{left:8,right:12},paddingPill:8,fontSize:14,lineHeight:20,dotSize:8,iconSize:16,closeSize:16}},h=({label:e=`Label`,color:t=`Gray`,size:i=`sm`,type:a=`Idle`,icon:o,onClose:s})=>{let c=p[t],l=m[i],u={display:`inline-flex`,alignItems:`center`,backgroundColor:c.bg,border:`1px solid ${c.border}`,borderRadius:16,boxSizing:`border-box`,width:`fit-content`,fontFamily:f},d={fontSize:l.fontSize,lineHeight:`${l.lineHeight}px`,fontWeight:500,color:c.text,whiteSpace:`nowrap`,fontFamily:f,margin:0};if(a===`Idle`)return(0,r.jsx)(`span`,{style:{...u,padding:`${l.paddingY}px ${l.paddingX}px`},children:(0,r.jsx)(`span`,{style:d,children:e})});if(a===`Status Dot`)return(0,r.jsxs)(`span`,{style:{...u,gap:4,paddingTop:l.paddingY,paddingBottom:l.paddingY,paddingLeft:l.paddingXDot.left,paddingRight:l.paddingXDot.right},children:[(0,r.jsx)(`span`,{style:{display:`inline-block`,width:l.dotSize,height:l.dotSize,borderRadius:`50%`,backgroundColor:c.dot,flexShrink:0}}),(0,r.jsx)(`span`,{style:d,children:e})]});if(a===`Closable`)return(0,r.jsxs)(`span`,{style:{...u,gap:2,paddingTop:l.paddingY,paddingBottom:l.paddingY,paddingLeft:l.paddingXClose.left,paddingRight:l.paddingXClose.right},children:[(0,r.jsx)(`span`,{style:d,children:e}),(0,r.jsx)(`button`,{onClick:s,style:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,background:`none`,border:`none`,padding:2,borderRadius:3,cursor:`pointer`,color:c.text,flexShrink:0,lineHeight:1},"aria-label":`Remove`,children:(0,r.jsx)(n.X,{size:l.closeSize,strokeWidth:2.5})})]});if(a===`Pill color`){let e=o;return(0,r.jsx)(`span`,{style:{...u,padding:l.paddingPill},children:e?(0,r.jsx)(e,{size:l.iconSize,color:c.dot,strokeWidth:2}):(0,r.jsx)(`span`,{style:{display:`inline-block`,width:l.iconSize,height:l.iconSize,borderRadius:`50%`,backgroundColor:c.dot}})})}return null},g=u({ciPrimary:()=>y,font:()=>w,grayNeutral:()=>_,interactive:()=>x,oePrimary:()=>b,padding:()=>S,radius:()=>C,status:()=>v}),_={fgHigh:`#1B1D22`,fgMid:`#6A6E83`,fgLow:`#9A9DAD`,bgWhite:`#FFFFFF`,bgLightgray:`#F8F8F9`,bgDisabled:`#F3F4F6`,borderMidgray:`#CFD1D9`,borderLight:`#EBECEF`,borderDisabled:`#E5EAF1`,gray300:`#D0D5DD`,bgSkeleton:`#EEF0F3`,bgDisabledStrong:`#EBECEF`},v={error:`#DB1439`,warning:`#DB8F02`,success:`#15A686`},y={fgLow:`#C4B3F6`,fgHigh:`#802CEB`,bgLow:`#D4C9F6`,bgMid:`#802CEB`,bgHigh:`#5A1DA9`,borderMid:`#996CF3`,borderHigh:`#802CEB`},b={fgLow:`#5273A1`,fgHigh:`#3A5274`,bgLowest:`#EFF2F6`,bgLow:`#6E90BF`,bgMid:`#5273A1`,bgHigh:`#3A5274`,borderLowest:`#C6D2E3`,borderLow:`#9CB3D2`,borderMid:`#5273A1`,p300:`#809BBF`,linkBlue:`#3C5BD5`},x={activeBorder:b.fgLow,hoverBorder:`#3B82F6`,focusRing:`#D7DFEA`,invalidBorder:v.error},S={"PD-0":0,"PD-1":1,"PD-2":2,"PD-3":4,"PD-4":6,"PD-5":8,"PD-6":12,"PD-7":16,"PD-8":24,"PD-9":32,"PD-10":40,"PD-11":48,"PD-12":56,"PD-13":64,"PD-14":72,"PD-15":80},C={"CR-0":0,"CR-1":2,"CR-2":4,"CR-3":8,"CR-4":12,"CR-5":16,"CR-6":20,"CR-7":24,"CR-8":32,"CR-9":48,"CR-10":100},w=`Sarabun, sans-serif`,T={sm:{inputHeight:32,labelFontSize:12,labelLineHeight:18,inputFontSize:14,inputLineHeight:20,helperFontSize:12,helperLineHeight:18,paddingX:12,iconSize:16,labelIconSize:12,labelGap:4,helperGap:4,leadingPl:8,leadingPr:4,leadingPy:6,chevronSize:14,counterPadding:`1px 4px`,counterRadius:4,counterFontSize:12,counterLineHeight:18,skeletonLabelH:18,skeletonInputH:32},md:{inputHeight:40,labelFontSize:14,labelLineHeight:20,inputFontSize:16,inputLineHeight:24,helperFontSize:14,helperLineHeight:20,paddingX:16,iconSize:20,labelIconSize:14,labelGap:6,helperGap:4,leadingPl:12,leadingPr:8,leadingPy:8,chevronSize:16,counterPadding:`2px 8px`,counterRadius:8,counterFontSize:14,counterLineHeight:20,skeletonLabelH:20,skeletonInputH:40},lg:{inputHeight:48,labelFontSize:16,labelLineHeight:24,inputFontSize:16,inputLineHeight:24,helperFontSize:14,helperLineHeight:20,paddingX:16,iconSize:20,labelIconSize:16,labelGap:8,helperGap:6,leadingPl:16,leadingPr:8,leadingPy:12,chevronSize:16,counterPadding:`2px 8px`,counterRadius:8,counterFontSize:14,counterLineHeight:20,skeletonLabelH:24,skeletonInputH:48}},E=`0 0 0 2px ${x.focusRing}`,D=e=>{let t=e??`Idle`;return{s:t,isInvalid:t.includes(`invalid`),isHover:t.includes(`hover`),isActive:t===`Active`||t===`Keyboard focus`||t.endsWith(`active`),isDisabled:t===`Disable`,isSkeleton:t===`Skeleton`,isFilled:t.includes(`Filled`),isKeyboardFocus:t===`Keyboard focus`}},O={clear:n.XCircle,search:n.Search,password:n.Eye},k=({label:e,required:i=!1,labelRemark:a,placeholder:o=`Placeholder`,value:s,onChange:c,helperText:l,errorText:u,state:d=`Idle`,size:f=`md`,leadingDropdownText:p,leadingIcon:m,counter:h,unit:g,trailingIcon:y,trailingIcons:b,trailingIconSeparator:S=!1})=>{let{isInvalid:C,isHover:k,isActive:A,isDisabled:j,isSkeleton:M,isKeyboardFocus:N}=D(d),P=T[f],F=C?x.invalidBorder:A||N?x.activeBorder:k?x.hoverBorder:_.borderMidgray,I=j?_.bgDisabled:k?_.bgLightgray:_.bgWhite,L=j?_.fgLow:_.fgMid,R=_.fgLow,z=j?_.fgLow:_.fgHigh,B=j?_.fgLow:_.fgHigh,V=j?_.fgLow:_.fgMid,H=C?v.error:_.fgMid;if(M)return(0,r.jsxs)(`div`,{style:{width:320,display:`flex`,flexDirection:`column`,gap:P.labelGap},children:[(0,r.jsx)(`div`,{style:{height:P.skeletonLabelH,background:_.bgSkeleton,borderRadius:6}}),(0,r.jsx)(`div`,{style:{height:P.skeletonInputH,background:_.bgSkeleton,border:`1px solid ${_.bgSkeleton}`,borderRadius:24}})]});let U=m===!0?n.Circle:m||null,W=b?.length?b:y?[y]:[],G=C?u:l,K={fontFamily:w,fontWeight:500};return(0,r.jsxs)(`div`,{style:{width:320,display:`flex`,flexDirection:`column`,gap:P.helperGap},children:[(0,r.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:P.labelGap,width:`100%`},children:[(0,r.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,width:`100%`},children:[(0,r.jsxs)(`div`,{style:{display:`flex`,flex:`1 0 0`,alignItems:`center`,gap:P.labelIconSize===12?4:6,minWidth:0},children:[(0,r.jsx)(`span`,{style:{...K,fontSize:P.labelFontSize,lineHeight:`${P.labelLineHeight}px`,color:L,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:e}),(0,r.jsx)(n.Info,{size:P.labelIconSize,color:V,strokeWidth:1.8,style:{flexShrink:0}})]}),a&&(0,r.jsx)(`span`,{style:{...K,fontSize:P.labelFontSize,lineHeight:`${P.labelLineHeight}px`,color:L,whiteSpace:`nowrap`,flexShrink:0},children:a}),i&&(0,r.jsx)(`span`,{style:{color:v.error,fontWeight:800,flexShrink:0},children:`*`})]}),(0,r.jsxs)(`div`,{style:{background:I,border:`1px solid ${F}`,height:P.inputHeight,width:`100%`,borderRadius:24,display:`flex`,alignItems:p?`stretch`:`center`,...p?{}:{gap:8,padding:`0 ${P.paddingX}px`},overflow:`hidden`,boxShadow:A||N?E:`none`,opacity:j?.7:1,boxSizing:`border-box`},children:[p?(0,r.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,background:_.bgWhite,padding:`${P.leadingPy}px ${P.leadingPr}px ${P.leadingPy}px ${P.leadingPl}px`,flexShrink:0},children:[(0,r.jsx)(`span`,{style:{...K,fontSize:P.inputFontSize,lineHeight:`${P.inputLineHeight}px`,color:_.fgHigh,whiteSpace:`nowrap`},children:p}),(0,r.jsx)(`svg`,{width:P.chevronSize,height:P.chevronSize,viewBox:`0 0 16 16`,fill:`none`,children:(0,r.jsx)(`path`,{d:`M4 6L8 10L12 6`,stroke:_.fgHigh,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})]}):U?(0,r.jsx)(U,{size:P.iconSize,color:B,strokeWidth:1.6,style:{flexShrink:0}}):null,(0,r.jsxs)(`div`,{style:{flex:`1 0 0`,display:`flex`,alignItems:`center`,gap:8,height:`100%`,minWidth:0,...p?{borderLeft:`1px solid ${_.borderLight}`,padding:`0 12px`}:{}},children:[(0,r.jsx)(`div`,{style:{flex:`1 0 0`,overflow:`hidden`,display:`flex`,alignItems:`center`},children:(0,r.jsx)(`span`,{style:{...K,fontSize:P.inputFontSize,lineHeight:`${P.inputLineHeight}px`,color:s?z:R,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,display:`block`,width:`100%`},children:s||o})}),h&&(0,r.jsxs)(`div`,{style:{background:_.bgLightgray,display:`flex`,gap:2,alignItems:`center`,justifyContent:`center`,padding:P.counterPadding,borderRadius:P.counterRadius,flexShrink:0,opacity:j?.7:1},children:[(0,r.jsx)(`span`,{style:{...K,fontSize:P.counterFontSize,lineHeight:`${P.counterLineHeight}px`,color:_.fgHigh},children:h.value}),(0,r.jsxs)(`span`,{style:{...K,fontSize:P.counterFontSize,lineHeight:`${P.counterLineHeight}px`,color:_.fgMid},children:[`/ `,h.max]})]}),g&&(0,r.jsx)(`span`,{style:{...K,fontSize:P.inputFontSize,lineHeight:`${P.inputLineHeight}px`,color:_.fgHigh,whiteSpace:`nowrap`,flexShrink:0,maxWidth:64,overflow:`hidden`},children:g}),W.length>0&&(0,r.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0},children:W.map((e,n)=>{let i=O[e];return(0,r.jsxs)(t.default.Fragment,{children:[S&&n>0&&(0,r.jsx)(`div`,{style:{width:1,height:P.iconSize,background:_.gray300,flexShrink:0,alignSelf:`center`}}),(0,r.jsx)(i,{size:P.iconSize,color:B,strokeWidth:1.6,style:{flexShrink:0}})]},`${e}-${n}`)})})]})]})]}),G&&(0,r.jsx)(`p`,{style:{...K,margin:0,fontSize:P.helperFontSize,lineHeight:`${P.helperLineHeight}px`,color:H,width:`100%`},children:G})]})},A=g;e.Badge=h,e.InputField=k,e.ciPrimary=y,e.font=w,e.grayNeutral=_,e.interactive=x,e.oePrimary=b,e.padding=S,e.radius=C,e.status=v,e.tokens=A});
2
+ //# sourceMappingURL=senestia-ui.umd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"senestia-ui.umd.js","names":[],"sources":["../src/stories/Badge.tsx","../src/stories/tokens.ts","../src/stories/InputField.tsx","../src/index.ts"],"sourcesContent":["import React from 'react';\nimport { X } from 'lucide-react';\n\n// ─── Design System Font ──────────────────────────────────────────────────────\nconst font = 'Sarabun, sans-serif';\n\n// ─── Types ───────────────────────────────────────────────────────────────────\n\nexport type BadgeColor =\n | 'Gray'\n | 'Primary'\n | 'Error'\n | 'Warning'\n | 'Success'\n | 'Blue light'\n | 'Blue'\n | 'Indigo'\n | 'Purple'\n | 'Pink'\n | 'Orange'\n | 'Gray blue';\n\nexport type BadgeSize = 'sm' | 'md' | 'lg';\n\nexport type BadgeType = 'Idle' | 'Status Dot' | 'Closable' | 'Pill color';\n\nexport interface BadgeProps {\n /** Badge label text */\n label?: string;\n /** Color variant */\n color?: BadgeColor;\n /** Size variant */\n size?: BadgeSize;\n /** Type / style variant */\n type?: BadgeType;\n /** Icon to render inside Pill color type (Lucide icon component) */\n icon?: React.ElementType;\n /** Called when close button is clicked (Closable type) */\n onClose?: () => void;\n}\n\n// ─── Color Tokens ────────────────────────────────────────────────────────────\n\nconst COLOR_TOKENS: Record<\n BadgeColor,\n { bg: string; border: string; text: string; dot: string }\n> = {\n Gray: { bg: '#f9fafb', border: '#eaecf0', text: '#06080b', dot: '#667085' },\n Primary: { bg: '#f4f6f9', border: '#e6ebf2', text: '#1e2b3b', dot: '#6c8fbe' },\n Error: { bg: '#fef0ef', border: '#fbd2d0', text: '#cc1a11', dot: '#f04438' },\n Warning: { bg: '#fff9ee', border: '#ffedcc', text: '#db8f02', dot: '#f79009' },\n Success: { bg: '#f0fdfa', border: '#d2f9f1', text: '#15a686', dot: '#12b76a' },\n 'Blue light': { bg: '#f0f9ff', border: '#b9e6fe', text: '#026aa2', dot: '#0ba5ec' },\n Blue: { bg: '#eff8ff', border: '#b2ddff', text: '#175cd3', dot: '#2e90fa' },\n Indigo: { bg: '#eef4ff', border: '#c7d7fe', text: '#3538cd', dot: '#6172f3' },\n Purple: { bg: '#f4f3ff', border: '#d9d6fe', text: '#5925dc', dot: '#7a5af8' },\n Pink: { bg: '#fef6fb', border: '#fce7f6', text: '#c11574', dot: '#ee46bc' },\n Orange: { bg: '#fef6ee', border: '#ffd6ae', text: '#b93815', dot: '#ef6820' },\n 'Gray blue':{ bg: '#f8f9fc', border: '#d5d9eb', text: '#363f72', dot: '#717bbc' },\n};\n\n// ─── Size Tokens ─────────────────────────────────────────────────────────────\n\nconst SIZE_TOKENS: Record<\n BadgeSize,\n {\n paddingX: number;\n paddingY: number;\n paddingXClose: { left: number; right: number };\n paddingXDot: { left: number; right: number };\n paddingPill: number;\n fontSize: number;\n lineHeight: number;\n dotSize: number;\n iconSize: number;\n closeSize: number;\n }\n> = {\n sm: {\n paddingX: 8, paddingY: 2,\n paddingXClose: { left: 8, right: 4 },\n paddingXDot: { left: 6, right: 8 },\n paddingPill: 5,\n fontSize: 12, lineHeight: 18,\n dotSize: 6, iconSize: 12, closeSize: 12,\n },\n md: {\n paddingX: 8, paddingY: 2,\n paddingXClose: { left: 8, right: 4 },\n paddingXDot: { left: 6, right: 8 },\n paddingPill: 6,\n fontSize: 14, lineHeight: 20,\n dotSize: 6, iconSize: 14, closeSize: 14,\n },\n lg: {\n paddingX: 12, paddingY: 4,\n paddingXClose: { left: 12, right: 6 },\n paddingXDot: { left: 8, right: 12 },\n paddingPill: 8,\n fontSize: 14, lineHeight: 20,\n dotSize: 8, iconSize: 16, closeSize: 16,\n },\n};\n\n// ─── Component ───────────────────────────────────────────────────────────────\n\nexport const Badge: React.FC<BadgeProps> = ({\n label = 'Label',\n color = 'Gray',\n size = 'sm',\n type = 'Idle',\n icon: IconComponent,\n onClose,\n}) => {\n const c = COLOR_TOKENS[color];\n const s = SIZE_TOKENS[size];\n\n // ── Shared wrapper style ──────────────────────────────────────────────────\n const baseWrapper: React.CSSProperties = {\n display: 'inline-flex',\n alignItems: 'center',\n backgroundColor: c.bg,\n border: `1px solid ${c.border}`,\n borderRadius: 16,\n boxSizing: 'border-box',\n width: 'fit-content',\n fontFamily: font,\n };\n\n // ── Text style ────────────────────────────────────────────────────────────\n const textStyle: React.CSSProperties = {\n fontSize: s.fontSize,\n lineHeight: `${s.lineHeight}px`,\n fontWeight: 500,\n color: c.text,\n whiteSpace: 'nowrap',\n fontFamily: font,\n margin: 0,\n };\n\n // ── Idle ─────────────────────────────────────────────────────────────────\n if (type === 'Idle') {\n return (\n <span\n style={{\n ...baseWrapper,\n padding: `${s.paddingY}px ${s.paddingX}px`,\n }}\n >\n <span style={textStyle}>{label}</span>\n </span>\n );\n }\n\n // ── Status Dot ────────────────────────────────────────────────────────────\n if (type === 'Status Dot') {\n return (\n <span\n style={{\n ...baseWrapper,\n gap: 4,\n paddingTop: s.paddingY,\n paddingBottom: s.paddingY,\n paddingLeft: s.paddingXDot.left,\n paddingRight: s.paddingXDot.right,\n }}\n >\n {/* Dot */}\n <span\n style={{\n display: 'inline-block',\n width: s.dotSize,\n height: s.dotSize,\n borderRadius: '50%',\n backgroundColor: c.dot,\n flexShrink: 0,\n }}\n />\n <span style={textStyle}>{label}</span>\n </span>\n );\n }\n\n // ── Closable ──────────────────────────────────────────────────────────────\n if (type === 'Closable') {\n return (\n <span\n style={{\n ...baseWrapper,\n gap: 2,\n paddingTop: s.paddingY,\n paddingBottom: s.paddingY,\n paddingLeft: s.paddingXClose.left,\n paddingRight: s.paddingXClose.right,\n }}\n >\n <span style={textStyle}>{label}</span>\n <button\n onClick={onClose}\n style={{\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n background: 'none',\n border: 'none',\n padding: 2,\n borderRadius: 3,\n cursor: 'pointer',\n color: c.text,\n flexShrink: 0,\n lineHeight: 1,\n }}\n aria-label=\"Remove\"\n >\n <X size={s.closeSize} strokeWidth={2.5} />\n </button>\n </span>\n );\n }\n\n // ── Pill color (icon only) ────────────────────────────────────────────────\n if (type === 'Pill color') {\n const PillIcon = IconComponent;\n return (\n <span\n style={{\n ...baseWrapper,\n padding: s.paddingPill,\n }}\n >\n {PillIcon ? (\n <PillIcon size={s.iconSize} color={c.dot} strokeWidth={2} />\n ) : (\n // Default: colored circle dot\n <span\n style={{\n display: 'inline-block',\n width: s.iconSize,\n height: s.iconSize,\n borderRadius: '50%',\n backgroundColor: c.dot,\n }}\n />\n )}\n </span>\n );\n }\n\n return null;\n};\n","/**\n * Senestia Design System — Semantic Color Tokens\n *\n * ┌─────────────────────────────────────────────────────────────┐\n * │ Source: Figma DS-01 · Foundation → Semantic Color │\n * │ Use these tokens in components instead of raw hex values. │\n * └─────────────────────────────────────────────────────────────┘\n */\n\n// ─── Gray-Neutral ─────────────────────────────────────────────────────────────\n\nexport const grayNeutral = {\n /** Semantic/Gray-Neutral/fg/high — primary text, dark icons */\n fgHigh: '#1B1D22',\n /** Semantic/Gray-Neutral/fg/mid-on-white — label text, helper text, secondary icons */\n fgMid: '#6A6E83',\n /** Semantic/Gray-Neutral/fg/low-on-white — placeholder, disabled text */\n fgLow: '#9A9DAD',\n\n /** Semantic/Gray-Neutral/bg/white */\n bgWhite: '#FFFFFF',\n /** Semantic/Gray-Neutral/bg/lightgray — counter pill, subtle backgrounds */\n bgLightgray: '#F8F8F9',\n /** Semantic/Gray-Neutral/bg/disabled */\n bgDisabled: '#F3F4F6',\n\n /** Semantic/Gray-Neutral/border/midgray — default input border */\n borderMidgray: '#CFD1D9',\n /** Semantic/Gray-Neutral/border/light — dividers, card borders */\n borderLight: '#EBECEF',\n /** Disabled border (checkbox, input) */\n borderDisabled: '#E5EAF1',\n\n /** Gray/300 — icon separators */\n gray300: '#D0D5DD',\n /** Skeleton loading shimmer */\n bgSkeleton: '#EEF0F3',\n /** Strong disabled background (checkbox) */\n bgDisabledStrong: '#EBECEF',\n} as const;\n\n// ─── Status ───────────────────────────────────────────────────────────────────\n\nexport const status = {\n /** Error / invalid state */\n error: '#DB1439',\n /** Warning */\n warning: '#DB8F02',\n /** Success */\n success: '#15A686',\n} as const;\n\n// ─── CI Primary (Senestia brand purple) ───────────────────────────────────────\n\nexport const ciPrimary = {\n fgLow: '#C4B3F6',\n fgHigh: '#802CEB',\n bgLow: '#D4C9F6',\n bgMid: '#802CEB',\n bgHigh: '#5A1DA9',\n borderMid: '#996CF3',\n borderHigh: '#802CEB',\n} as const;\n\n// ─── OE Theme (OE brand blue) ─────────────────────────────────────────────────\n\nexport const oePrimary = {\n fgLow: '#5273A1',\n fgHigh: '#3A5274',\n bgLowest: '#EFF2F6', // selected item background in pickers\n bgLow: '#6E90BF',\n bgMid: '#5273A1',\n bgHigh: '#3A5274',\n borderLowest:'#C6D2E3', // focused item border\n borderLow: '#9CB3D2',\n borderMid: '#5273A1',\n /** Primary/300 — supporting/helper text on blue-tinted UI */\n p300: '#809BBF',\n /** Indigo/300 — \"Set to now\" link color */\n linkBlue: '#3C5BD5',\n} as const;\n\n// ─── Interactive states ───────────────────────────────────────────────────────\n\nexport const interactive = {\n /** Active / focused border */\n activeBorder: oePrimary.fgLow, // #5273A1\n /** Hover border */\n hoverBorder: '#3B82F6',\n /** Focus ring shadow */\n focusRing: '#D7DFEA',\n /** Invalid border */\n invalidBorder: status.error,\n} as const;\n\n// ─── Padding tokens (PD) ─────────────────────────────────────────────────────\n\nexport const padding = {\n 'PD-0': 0,\n 'PD-1': 1,\n 'PD-2': 2,\n 'PD-3': 4,\n 'PD-4': 6,\n 'PD-5': 8,\n 'PD-6': 12,\n 'PD-7': 16,\n 'PD-8': 24,\n 'PD-9': 32,\n 'PD-10': 40,\n 'PD-11': 48,\n 'PD-12': 56,\n 'PD-13': 64,\n 'PD-14': 72,\n 'PD-15': 80,\n} as const;\n\n// ─── Corner Radius tokens (CR) ───────────────────────────────────────────────\n\nexport const radius = {\n 'CR-0': 0,\n 'CR-1': 2,\n 'CR-2': 4,\n 'CR-3': 8,\n 'CR-4': 12,\n 'CR-5': 16,\n 'CR-6': 20,\n 'CR-7': 24,\n 'CR-8': 32,\n 'CR-9': 48,\n 'CR-10': 100,\n} as const;\n\n// ─── Typography ───────────────────────────────────────────────────────────────\n\nexport const font = 'Sarabun, sans-serif';\n","import React from 'react';\nimport { Circle, Info, XCircle, Search, Eye } from 'lucide-react';\nimport { grayNeutral, status, interactive, font } from './tokens';\n\n// ─── Types ───────────────────────────────────────────────────────────────────\n\nexport type InputFieldState =\n | 'Idle'\n | 'Idle hover'\n | 'Active'\n | 'Idle invalid'\n | 'Idle invalid hover'\n | 'Idle invalid active'\n | 'Filled'\n | 'Filled hover'\n | 'Filled active'\n | 'Filled invalid'\n | 'Filled invalid hover'\n | 'Filled invalid active'\n | 'Disable'\n | 'Keyboard focus'\n | 'Skeleton';\n\nexport type InputFieldSize = 'sm' | 'md' | 'lg';\n\nexport type InputFieldTrailingIcon = 'clear' | 'password' | 'search';\n\nexport type InputFieldCounter = {\n value: number;\n max: number;\n};\n\nexport interface InputFieldProps {\n /** Label text displayed above the input */\n label: string;\n /** Show required asterisk (*) */\n required?: boolean;\n /** Remark text next to label e.g. \"(optional)\" */\n labelRemark?: string;\n /** Placeholder text */\n placeholder?: string;\n /** Current value */\n value?: string;\n /** Called when value changes */\n onChange?: (value: string) => void;\n /** Helper text below the input (hidden when invalid) */\n helperText?: string;\n /** Error message below the input (shown when invalid state) */\n errorText?: string;\n /** Visual state from Figma */\n state?: InputFieldState;\n /** Input size — affects height, font, and padding */\n size?: InputFieldSize;\n /** Leading dropdown prefix text */\n leadingDropdownText?: string;\n /**\n * Leading icon inside the input (left side).\n * - `true` → default Circle icon\n * - `React.ElementType` → custom Lucide icon\n * - `false/undefined` → no icon\n */\n leadingIcon?: React.ElementType | boolean;\n /** Counter pill e.g. `{ value: 0, max: 20 }` */\n counter?: InputFieldCounter;\n /** Unit text inside the input */\n unit?: string;\n /** Single trailing icon */\n trailingIcon?: InputFieldTrailingIcon;\n /** Multiple trailing icons (overrides trailingIcon) */\n trailingIcons?: InputFieldTrailingIcon[];\n /** Show separator between trailing icons */\n trailingIconSeparator?: boolean;\n}\n\n// ─── Design tokens (from Figma) ──────────────────────────────────────────────\n\n/**\n * Size tokens — matched to Figma nodes:\n * sm (Sm-32): label C5 12/18 · input C4 14/20 · helper C5 12/18\n * md (Md-40): label C4 14/20 · input C3 16/24 · helper C4 14/20\n * lg (Lg-48): label C3 16/24 · input C3 16/24 · helper C4 14/20\n *\n * Spacing (per Figma sm node — gap-4 between all elements):\n * labelGap = gap between label row and input box\n * helperGap = gap between input box and helper/error text\n */\nconst sizeTokens = {\n sm: {\n inputHeight: 32,\n labelFontSize: 12, labelLineHeight: 18,\n inputFontSize: 14, inputLineHeight: 20,\n helperFontSize: 12, helperLineHeight: 18,\n paddingX: 12,\n iconSize: 16,\n labelIconSize: 12,\n labelGap: 4, // label row → input\n helperGap: 4, // input → helper text\n leadingPl: 8, leadingPr: 4, leadingPy: 6,\n chevronSize: 14,\n counterPadding: '1px 4px',\n counterRadius: 4,\n counterFontSize: 12, counterLineHeight: 18,\n skeletonLabelH: 18, skeletonInputH: 32,\n },\n md: {\n inputHeight: 40,\n labelFontSize: 14, labelLineHeight: 20,\n inputFontSize: 16, inputLineHeight: 24,\n helperFontSize: 14, helperLineHeight: 20,\n paddingX: 16,\n iconSize: 20,\n labelIconSize: 14,\n labelGap: 6, // label row → input\n helperGap: 4, // input → helper text\n leadingPl: 12, leadingPr: 8, leadingPy: 8,\n chevronSize: 16,\n counterPadding: '2px 8px',\n counterRadius: 8,\n counterFontSize: 14, counterLineHeight: 20,\n skeletonLabelH: 20, skeletonInputH: 40,\n },\n lg: {\n inputHeight: 48,\n labelFontSize: 16, labelLineHeight: 24,\n inputFontSize: 16, inputLineHeight: 24,\n helperFontSize: 14, helperLineHeight: 20,\n paddingX: 16,\n iconSize: 20,\n labelIconSize: 16,\n labelGap: 8, // label row → input\n helperGap: 6, // input → helper text\n leadingPl: 16, leadingPr: 8, leadingPy: 12,\n chevronSize: 16,\n counterPadding: '2px 8px',\n counterRadius: 8,\n counterFontSize: 14, counterLineHeight: 20,\n skeletonLabelH: 24, skeletonInputH: 48,\n },\n} as const;\n\n// ─── State helpers ────────────────────────────────────────────────────────────\n\nconst focusRingStyle = `0 0 0 2px ${interactive.focusRing}`;\n\nconst getStateFlags = (state: InputFieldState | undefined) => {\n const s = state ?? 'Idle';\n const isInvalid = s.includes('invalid');\n const isHover = s.includes('hover');\n const isActive = s === 'Active' || s === 'Keyboard focus' || s.endsWith('active');\n const isDisabled = s === 'Disable';\n const isSkeleton = s === 'Skeleton';\n const isFilled = s.includes('Filled');\n const isKeyboardFocus = s === 'Keyboard focus';\n return { s, isInvalid, isHover, isActive, isDisabled, isSkeleton, isFilled, isKeyboardFocus };\n};\n\n// ─── Trailing icon map → Lucide ───────────────────────────────────────────────\n\nconst TRAILING_ICON_MAP = {\n clear: XCircle,\n search: Search,\n password: Eye,\n} as const;\n\n// ─── Component ───────────────────────────────────────────────────────────────\n\nexport const InputField = ({\n label,\n required = false,\n labelRemark,\n placeholder = 'Placeholder',\n value,\n onChange: _onChange,\n helperText,\n errorText,\n state = 'Idle',\n size = 'md',\n leadingDropdownText,\n leadingIcon,\n counter,\n unit,\n trailingIcon,\n trailingIcons,\n trailingIconSeparator = false,\n}: InputFieldProps) => {\n const { isInvalid, isHover, isActive, isDisabled, isSkeleton, isKeyboardFocus } =\n getStateFlags(state);\n\n const t = sizeTokens[size];\n\n // ── Colors — mapped to Semantic/Gray-Neutral tokens ─────────────────────\n const borderColor = isInvalid\n ? interactive.invalidBorder // status.error #DB1439\n : isActive || isKeyboardFocus\n ? interactive.activeBorder // oePrimary.fgLow #5273A1\n : isHover\n ? interactive.hoverBorder // #3B82F6\n : grayNeutral.borderMidgray; // #CFD1D9\n\n const background = isDisabled\n ? grayNeutral.bgDisabled // #F3F4F6\n : isHover\n ? grayNeutral.bgLightgray // #F8F8F9\n : grayNeutral.bgWhite; // #FFFFFF\n\n // Label text → fg/mid-on-white (disabled → fg/low)\n const labelColor = isDisabled ? grayNeutral.fgLow : grayNeutral.fgMid;\n\n // Placeholder → fg/low-on-white (same whether disabled or not)\n const placeholderColor = grayNeutral.fgLow; // #9A9DAD\n\n // Typed value → fg/high (disabled → fg/low)\n const valueColor = isDisabled ? grayNeutral.fgLow : grayNeutral.fgHigh; // #1B1D22\n\n // ── Icon colors (Figma: Semantic/Gray-Neutral/fg/high for input icons) ───\n // Input leading/trailing icons → fg/high (#1B1D22)\n const inputIconColor = isDisabled ? grayNeutral.fgLow : grayNeutral.fgHigh;\n // Label info icon → fg/mid (same as label text, #6A6E83)\n const labelIconColor = isDisabled ? grayNeutral.fgLow : grayNeutral.fgMid;\n\n const helperColor = isInvalid ? status.error : grayNeutral.fgMid; // #6A6E83\n\n // ── Skeleton ─────────────────────────────────────────────────────────────\n if (isSkeleton) {\n return (\n <div style={{ width: 320, display: 'flex', flexDirection: 'column', gap: t.labelGap }}>\n <div style={{ height: t.skeletonLabelH, background: grayNeutral.bgSkeleton, borderRadius: 6 }} />\n <div style={{ height: t.skeletonInputH, background: grayNeutral.bgSkeleton, border: `1px solid ${grayNeutral.bgSkeleton}`, borderRadius: 24 }} />\n </div>\n );\n }\n\n // ── Leading icon resolve ──────────────────────────────────────────────────\n // true → Circle (Figma default \"Icon/circle\"), component → custom, false → none\n const LeadingIconComponent: React.ElementType | null =\n leadingIcon === true\n ? Circle\n : leadingIcon\n ? (leadingIcon as React.ElementType)\n : null;\n\n // ── Trailing icons ────────────────────────────────────────────────────────\n const iconsToRender: InputFieldTrailingIcon[] =\n trailingIcons?.length ? trailingIcons : trailingIcon ? [trailingIcon] : [];\n\n // ── Text below input ──────────────────────────────────────────────────────\n const showText = isInvalid ? errorText : helperText;\n\n // ── Shared font style ─────────────────────────────────────────────────────\n const baseFont: React.CSSProperties = { fontFamily: font, fontWeight: 500 };\n\n return (\n /*\n * Outer wrapper — two-level gap structure matching Figma:\n * Level 1 (helperGap): separates [label + input block] from [helper text]\n * Level 2 (labelGap): separates [label row] from [input box]\n */\n <div style={{ width: 320, display: 'flex', flexDirection: 'column', gap: t.helperGap }}>\n\n {/* ── Level 1: label + input block ────────────────────────────────── */}\n <div style={{ display: 'flex', flexDirection: 'column', gap: t.labelGap, width: '100%' }}>\n\n {/* Label row */}\n <div style={{ display: 'flex', alignItems: 'center', gap: 4, width: '100%' }}>\n {/* Left: label text + info icon */}\n <div style={{ display: 'flex', flex: '1 0 0', alignItems: 'center', gap: t.labelIconSize === 12 ? 4 : 6, minWidth: 0 }}>\n <span\n style={{\n ...baseFont,\n fontSize: t.labelFontSize,\n lineHeight: `${t.labelLineHeight}px`,\n color: labelColor,\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n }}\n >\n {label}\n </span>\n {/* Info icon — fg/mid-on-white (same shade as label text) */}\n <Info\n size={t.labelIconSize}\n color={labelIconColor}\n strokeWidth={1.8}\n style={{ flexShrink: 0 }}\n />\n </div>\n\n {/* Right: remark or required marker */}\n {labelRemark && (\n <span\n style={{\n ...baseFont,\n fontSize: t.labelFontSize,\n lineHeight: `${t.labelLineHeight}px`,\n color: labelColor,\n whiteSpace: 'nowrap',\n flexShrink: 0,\n }}\n >\n {labelRemark}\n </span>\n )}\n {required && (\n <span style={{ color: status.error, fontWeight: 800, flexShrink: 0 }}>*</span>\n )}\n </div>\n\n {/* Input box */}\n <div\n style={{\n background,\n border: `1px solid ${borderColor}`,\n height: t.inputHeight,\n width: '100%',\n borderRadius: 24,\n display: 'flex',\n alignItems: leadingDropdownText ? 'stretch' : 'center',\n ...(leadingDropdownText ? {} : { gap: 8, padding: `0 ${t.paddingX}px` }),\n overflow: 'hidden',\n boxShadow: isActive || isKeyboardFocus ? focusRingStyle : 'none',\n opacity: isDisabled ? 0.7 : 1,\n boxSizing: 'border-box',\n }}\n >\n {/* Leading: dropdown prefix OR icon */}\n {leadingDropdownText ? (\n <div\n style={{\n display: 'flex',\n alignItems: 'center',\n gap: 4,\n background: grayNeutral.bgWhite,\n padding: `${t.leadingPy}px ${t.leadingPr}px ${t.leadingPy}px ${t.leadingPl}px`,\n flexShrink: 0,\n }}\n >\n <span\n style={{\n ...baseFont,\n fontSize: t.inputFontSize,\n lineHeight: `${t.inputLineHeight}px`,\n color: grayNeutral.fgHigh,\n whiteSpace: 'nowrap',\n }}\n >\n {leadingDropdownText}\n </span>\n <svg width={t.chevronSize} height={t.chevronSize} viewBox=\"0 0 16 16\" fill=\"none\">\n <path d=\"M4 6L8 10L12 6\" stroke={grayNeutral.fgHigh} strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n </div>\n ) : LeadingIconComponent ? (\n /* Leading icon in input → fg/high (#1B1D22) per Figma */\n <LeadingIconComponent\n size={t.iconSize}\n color={inputIconColor}\n strokeWidth={1.6}\n style={{ flexShrink: 0 }}\n />\n ) : null}\n\n {/* Text + accessories area */}\n <div\n style={{\n flex: '1 0 0',\n display: 'flex',\n alignItems: 'center',\n gap: 8,\n height: '100%',\n minWidth: 0,\n ...(leadingDropdownText\n ? { borderLeft: `1px solid ${grayNeutral.borderLight}`, padding: `0 12px` }\n : {}),\n }}\n >\n {/* Placeholder / Value text */}\n <div\n style={{\n flex: '1 0 0',\n overflow: 'hidden',\n display: 'flex',\n alignItems: 'center',\n }}\n >\n <span\n style={{\n ...baseFont,\n fontSize: t.inputFontSize,\n lineHeight: `${t.inputLineHeight}px`,\n color: value ? valueColor : placeholderColor,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n display: 'block',\n width: '100%',\n }}\n >\n {value || placeholder}\n </span>\n </div>\n\n {/* Counter pill */}\n {counter && (\n <div\n style={{\n background: grayNeutral.bgLightgray,\n display: 'flex',\n gap: 2,\n alignItems: 'center',\n justifyContent: 'center',\n padding: t.counterPadding,\n borderRadius: t.counterRadius,\n flexShrink: 0,\n opacity: isDisabled ? 0.7 : 1,\n }}\n >\n <span\n style={{\n ...baseFont,\n fontSize: t.counterFontSize,\n lineHeight: `${t.counterLineHeight}px`,\n color: grayNeutral.fgHigh,\n }}\n >\n {counter.value}\n </span>\n <span\n style={{\n ...baseFont,\n fontSize: t.counterFontSize,\n lineHeight: `${t.counterLineHeight}px`,\n color: grayNeutral.fgMid,\n }}\n >\n / {counter.max}\n </span>\n </div>\n )}\n\n {/* Unit text */}\n {unit && (\n <span\n style={{\n ...baseFont,\n fontSize: t.inputFontSize,\n lineHeight: `${t.inputLineHeight}px`,\n color: grayNeutral.fgHigh,\n whiteSpace: 'nowrap',\n flexShrink: 0,\n maxWidth: 64,\n overflow: 'hidden',\n }}\n >\n {unit}\n </span>\n )}\n\n {/* Trailing icons */}\n {iconsToRender.length > 0 && (\n <div style={{ display: 'flex', alignItems: 'center', gap: 4, flexShrink: 0 }}>\n {iconsToRender.map((ic, idx) => {\n const TrailingIcon = TRAILING_ICON_MAP[ic];\n return (\n <React.Fragment key={`${ic}-${idx}`}>\n {trailingIconSeparator && idx > 0 && (\n <div\n style={{\n width: 1,\n height: t.iconSize,\n background: grayNeutral.gray300,\n flexShrink: 0,\n alignSelf: 'center',\n }}\n />\n )}\n {/* Trailing icon → fg/high (#1B1D22) per Figma */}\n <TrailingIcon\n size={t.iconSize}\n color={inputIconColor}\n strokeWidth={1.6}\n style={{ flexShrink: 0 }}\n />\n </React.Fragment>\n );\n })}\n </div>\n )}\n </div>\n </div>\n </div>\n\n {/* ── Level 1: helper / error text ────────────────────────────────── */}\n {/*\n * No extra margin here — the outer helperGap (4px sm / 4px md / 6px lg)\n * from the flex container already provides the correct spacing from Figma.\n */}\n {showText && (\n <p\n style={{\n ...baseFont,\n margin: 0,\n fontSize: t.helperFontSize,\n lineHeight: `${t.helperLineHeight}px`,\n color: helperColor,\n width: '100%',\n }}\n >\n {showText}\n </p>\n )}\n </div>\n );\n};\n","// ─── Senestia Design System — Public API ─────────────────────────────────────\n//\n// import { Badge, InputField, tokens } from '@senestia/ui'\n//\n// ─────────────────────────────────────────────────────────────────────────────\n\n// ── Components ────────────────────────────────────────────────────────────────\nexport { Badge } from './stories/Badge';\nexport { InputField } from './stories/InputField';\n\n// ── Component types ───────────────────────────────────────────────────────────\nexport type { BadgeProps, BadgeColor, BadgeSize, BadgeType } from './stories/Badge';\nexport type {\n InputFieldProps,\n InputFieldState,\n InputFieldSize,\n InputFieldTrailingIcon,\n InputFieldCounter,\n} from './stories/InputField';\n\n// ── Design Tokens ─────────────────────────────────────────────────────────────\nexport {\n // Colors\n grayNeutral,\n status,\n ciPrimary,\n oePrimary,\n interactive,\n // Spacing\n padding,\n radius,\n // Typography\n font,\n} from './stories/tokens';\n\n// ── Tokens namespace (for tree-shaking friendly usage) ────────────────────────\nimport * as _tokens from './stories/tokens';\nexport const tokens = _tokens;\n"],"mappings":"8gCAIA,IAAM,EAAO,sBAuCP,EAGF,CACF,KAAY,CAAE,GAAI,UAAW,OAAQ,UAAW,KAAM,UAAW,IAAK,UAAW,CACjF,QAAY,CAAE,GAAI,UAAW,OAAQ,UAAW,KAAM,UAAW,IAAK,UAAW,CACjF,MAAY,CAAE,GAAI,UAAW,OAAQ,UAAW,KAAM,UAAW,IAAK,UAAW,CACjF,QAAY,CAAE,GAAI,UAAW,OAAQ,UAAW,KAAM,UAAW,IAAK,UAAW,CACjF,QAAY,CAAE,GAAI,UAAW,OAAQ,UAAW,KAAM,UAAW,IAAK,UAAW,CACjF,aAAc,CAAE,GAAI,UAAW,OAAQ,UAAW,KAAM,UAAW,IAAK,UAAW,CACnF,KAAY,CAAE,GAAI,UAAW,OAAQ,UAAW,KAAM,UAAW,IAAK,UAAW,CACjF,OAAY,CAAE,GAAI,UAAW,OAAQ,UAAW,KAAM,UAAW,IAAK,UAAW,CACjF,OAAY,CAAE,GAAI,UAAW,OAAQ,UAAW,KAAM,UAAW,IAAK,UAAW,CACjF,KAAY,CAAE,GAAI,UAAW,OAAQ,UAAW,KAAM,UAAW,IAAK,UAAW,CACjF,OAAY,CAAE,GAAI,UAAW,OAAQ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EA,EACC,CAAA,CAEF,IC1dG,EAAS"}
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ export type BadgeColor = 'Gray' | 'Primary' | 'Error' | 'Warning' | 'Success' | 'Blue light' | 'Blue' | 'Indigo' | 'Purple' | 'Pink' | 'Orange' | 'Gray blue';
3
+ export type BadgeSize = 'sm' | 'md' | 'lg';
4
+ export type BadgeType = 'Idle' | 'Status Dot' | 'Closable' | 'Pill color';
5
+ export interface BadgeProps {
6
+ /** Badge label text */
7
+ label?: string;
8
+ /** Color variant */
9
+ color?: BadgeColor;
10
+ /** Size variant */
11
+ size?: BadgeSize;
12
+ /** Type / style variant */
13
+ type?: BadgeType;
14
+ /** Icon to render inside Pill color type (Lucide icon component) */
15
+ icon?: React.ElementType;
16
+ /** Called when close button is clicked (Closable type) */
17
+ onClose?: () => void;
18
+ }
19
+ export declare const Badge: React.FC<BadgeProps>;
@@ -0,0 +1,50 @@
1
+ import React from 'react';
2
+ export type InputFieldState = 'Idle' | 'Idle hover' | 'Active' | 'Idle invalid' | 'Idle invalid hover' | 'Idle invalid active' | 'Filled' | 'Filled hover' | 'Filled active' | 'Filled invalid' | 'Filled invalid hover' | 'Filled invalid active' | 'Disable' | 'Keyboard focus' | 'Skeleton';
3
+ export type InputFieldSize = 'sm' | 'md' | 'lg';
4
+ export type InputFieldTrailingIcon = 'clear' | 'password' | 'search';
5
+ export type InputFieldCounter = {
6
+ value: number;
7
+ max: number;
8
+ };
9
+ export interface InputFieldProps {
10
+ /** Label text displayed above the input */
11
+ label: string;
12
+ /** Show required asterisk (*) */
13
+ required?: boolean;
14
+ /** Remark text next to label e.g. "(optional)" */
15
+ labelRemark?: string;
16
+ /** Placeholder text */
17
+ placeholder?: string;
18
+ /** Current value */
19
+ value?: string;
20
+ /** Called when value changes */
21
+ onChange?: (value: string) => void;
22
+ /** Helper text below the input (hidden when invalid) */
23
+ helperText?: string;
24
+ /** Error message below the input (shown when invalid state) */
25
+ errorText?: string;
26
+ /** Visual state from Figma */
27
+ state?: InputFieldState;
28
+ /** Input size — affects height, font, and padding */
29
+ size?: InputFieldSize;
30
+ /** Leading dropdown prefix text */
31
+ leadingDropdownText?: string;
32
+ /**
33
+ * Leading icon inside the input (left side).
34
+ * - `true` → default Circle icon
35
+ * - `React.ElementType` → custom Lucide icon
36
+ * - `false/undefined` → no icon
37
+ */
38
+ leadingIcon?: React.ElementType | boolean;
39
+ /** Counter pill e.g. `{ value: 0, max: 20 }` */
40
+ counter?: InputFieldCounter;
41
+ /** Unit text inside the input */
42
+ unit?: string;
43
+ /** Single trailing icon */
44
+ trailingIcon?: InputFieldTrailingIcon;
45
+ /** Multiple trailing icons (overrides trailingIcon) */
46
+ trailingIcons?: InputFieldTrailingIcon[];
47
+ /** Show separator between trailing icons */
48
+ trailingIconSeparator?: boolean;
49
+ }
50
+ export declare const InputField: ({ label, required, labelRemark, placeholder, value, onChange: _onChange, helperText, errorText, state, size, leadingDropdownText, leadingIcon, counter, unit, trailingIcon, trailingIcons, trailingIconSeparator, }: InputFieldProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,108 @@
1
+ /**
2
+ * Senestia Design System — Semantic Color Tokens
3
+ *
4
+ * ┌─────────────────────────────────────────────────────────────┐
5
+ * │ Source: Figma DS-01 · Foundation → Semantic Color │
6
+ * │ Use these tokens in components instead of raw hex values. │
7
+ * └─────────────────────────────────────────────────────────────┘
8
+ */
9
+ export declare const grayNeutral: {
10
+ /** Semantic/Gray-Neutral/fg/high — primary text, dark icons */
11
+ readonly fgHigh: "#1B1D22";
12
+ /** Semantic/Gray-Neutral/fg/mid-on-white — label text, helper text, secondary icons */
13
+ readonly fgMid: "#6A6E83";
14
+ /** Semantic/Gray-Neutral/fg/low-on-white — placeholder, disabled text */
15
+ readonly fgLow: "#9A9DAD";
16
+ /** Semantic/Gray-Neutral/bg/white */
17
+ readonly bgWhite: "#FFFFFF";
18
+ /** Semantic/Gray-Neutral/bg/lightgray — counter pill, subtle backgrounds */
19
+ readonly bgLightgray: "#F8F8F9";
20
+ /** Semantic/Gray-Neutral/bg/disabled */
21
+ readonly bgDisabled: "#F3F4F6";
22
+ /** Semantic/Gray-Neutral/border/midgray — default input border */
23
+ readonly borderMidgray: "#CFD1D9";
24
+ /** Semantic/Gray-Neutral/border/light — dividers, card borders */
25
+ readonly borderLight: "#EBECEF";
26
+ /** Disabled border (checkbox, input) */
27
+ readonly borderDisabled: "#E5EAF1";
28
+ /** Gray/300 — icon separators */
29
+ readonly gray300: "#D0D5DD";
30
+ /** Skeleton loading shimmer */
31
+ readonly bgSkeleton: "#EEF0F3";
32
+ /** Strong disabled background (checkbox) */
33
+ readonly bgDisabledStrong: "#EBECEF";
34
+ };
35
+ export declare const status: {
36
+ /** Error / invalid state */
37
+ readonly error: "#DB1439";
38
+ /** Warning */
39
+ readonly warning: "#DB8F02";
40
+ /** Success */
41
+ readonly success: "#15A686";
42
+ };
43
+ export declare const ciPrimary: {
44
+ readonly fgLow: "#C4B3F6";
45
+ readonly fgHigh: "#802CEB";
46
+ readonly bgLow: "#D4C9F6";
47
+ readonly bgMid: "#802CEB";
48
+ readonly bgHigh: "#5A1DA9";
49
+ readonly borderMid: "#996CF3";
50
+ readonly borderHigh: "#802CEB";
51
+ };
52
+ export declare const oePrimary: {
53
+ readonly fgLow: "#5273A1";
54
+ readonly fgHigh: "#3A5274";
55
+ readonly bgLowest: "#EFF2F6";
56
+ readonly bgLow: "#6E90BF";
57
+ readonly bgMid: "#5273A1";
58
+ readonly bgHigh: "#3A5274";
59
+ readonly borderLowest: "#C6D2E3";
60
+ readonly borderLow: "#9CB3D2";
61
+ readonly borderMid: "#5273A1";
62
+ /** Primary/300 — supporting/helper text on blue-tinted UI */
63
+ readonly p300: "#809BBF";
64
+ /** Indigo/300 — "Set to now" link color */
65
+ readonly linkBlue: "#3C5BD5";
66
+ };
67
+ export declare const interactive: {
68
+ /** Active / focused border */
69
+ readonly activeBorder: "#5273A1";
70
+ /** Hover border */
71
+ readonly hoverBorder: "#3B82F6";
72
+ /** Focus ring shadow */
73
+ readonly focusRing: "#D7DFEA";
74
+ /** Invalid border */
75
+ readonly invalidBorder: "#DB1439";
76
+ };
77
+ export declare const padding: {
78
+ readonly 'PD-0': 0;
79
+ readonly 'PD-1': 1;
80
+ readonly 'PD-2': 2;
81
+ readonly 'PD-3': 4;
82
+ readonly 'PD-4': 6;
83
+ readonly 'PD-5': 8;
84
+ readonly 'PD-6': 12;
85
+ readonly 'PD-7': 16;
86
+ readonly 'PD-8': 24;
87
+ readonly 'PD-9': 32;
88
+ readonly 'PD-10': 40;
89
+ readonly 'PD-11': 48;
90
+ readonly 'PD-12': 56;
91
+ readonly 'PD-13': 64;
92
+ readonly 'PD-14': 72;
93
+ readonly 'PD-15': 80;
94
+ };
95
+ export declare const radius: {
96
+ readonly 'CR-0': 0;
97
+ readonly 'CR-1': 2;
98
+ readonly 'CR-2': 4;
99
+ readonly 'CR-3': 8;
100
+ readonly 'CR-4': 12;
101
+ readonly 'CR-5': 16;
102
+ readonly 'CR-6': 20;
103
+ readonly 'CR-7': 24;
104
+ readonly 'CR-8': 32;
105
+ readonly 'CR-9': 48;
106
+ readonly 'CR-10': 100;
107
+ };
108
+ export declare const font = "Sarabun, sans-serif";
package/package.json ADDED
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "@senestia/ui",
3
+ "version": "0.1.0-beta.0190ae9",
4
+ "type": "module",
5
+ "description": "Senestia Design System — React component library",
6
+ "main": "./dist/senestia-ui.umd.js",
7
+ "module": "./dist/senestia-ui.es.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./dist/senestia-ui.es.js",
12
+ "require": "./dist/senestia-ui.umd.js",
13
+ "types": "./dist/index.d.ts"
14
+ }
15
+ },
16
+ "files": [
17
+ "dist"
18
+ ],
19
+ "scripts": {
20
+ "dev": "vite",
21
+ "build": "tsc -b && vite build",
22
+ "build:lib": "vite build --config vite.config.lib.ts && tsc --emitDeclarationOnly --declaration --declarationDir dist --project tsconfig.lib.json",
23
+ "lint": "eslint .",
24
+ "preview": "vite preview",
25
+ "storybook": "storybook dev -p 6006",
26
+ "build-storybook": "storybook build",
27
+ "chromatic": "npx chromatic --project-token=chpt_250b9f6bb9afaff"
28
+ },
29
+ "peerDependencies": {
30
+ "lucide-react": ">=0.400.0",
31
+ "react": ">=18",
32
+ "react-dom": ">=18"
33
+ },
34
+ "dependencies": {
35
+ "@fluentui/web-components": "^2.6.1",
36
+ "@react-three/drei": "^10.7.7",
37
+ "lucide-react": ">=0.400.0"
38
+ },
39
+ "devDependencies": {
40
+ "@chromatic-com/storybook": "^5.0.1",
41
+ "@eslint/js": "^9.39.4",
42
+ "@storybook/addon-a11y": "^10.3.0",
43
+ "@storybook/addon-docs": "^10.3.0",
44
+ "@storybook/addon-onboarding": "^10.3.0",
45
+ "@storybook/addon-vitest": "^10.3.0",
46
+ "@storybook/react-vite": "^10.3.0",
47
+ "@types/node": "^24.12.0",
48
+ "@types/react": "^19.2.14",
49
+ "@types/react-dom": "^19.2.3",
50
+ "@vitejs/plugin-react": "^6.0.1",
51
+ "@vitest/browser-playwright": "^4.1.0",
52
+ "@vitest/coverage-v8": "^4.1.0",
53
+ "chromatic": "^15.3.0",
54
+ "eslint": "^9.39.4",
55
+ "eslint-plugin-react-hooks": "^7.0.1",
56
+ "eslint-plugin-react-refresh": "^0.5.2",
57
+ "eslint-plugin-storybook": "^10.3.0",
58
+ "globals": "^17.4.0",
59
+ "playwright": "^1.58.2",
60
+ "storybook": "^10.3.0",
61
+ "typescript": "~5.9.3",
62
+ "typescript-eslint": "^8.57.0",
63
+ "vite": "^8.0.7",
64
+ "vitest": "^4.1.0"
65
+ }
66
+ }