@pathscale/ui 0.0.10 → 0.0.12

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.
Files changed (175) hide show
  1. package/README.md +53 -0
  2. package/dist/Avatar-Dkd_kPlV.d.ts +40 -0
  3. package/dist/CollapseTitle-BNxog3is.d.ts +12 -0
  4. package/dist/{Field-DfUn85_1.d.ts → Field-DI2PA30N.d.ts} +1 -1
  5. package/dist/Mask-CPb596Mg.d.ts +16 -0
  6. package/dist/Menu-DgO4SHmA.d.ts +45 -0
  7. package/dist/{Progress-gN0xqhAF.d.ts → Progress-ChF4ior8.d.ts} +2 -2
  8. package/dist/Steps-Dk-UPL6r.d.ts +38 -0
  9. package/dist/{Tabs-BEnRV6GG.d.ts → Tabs-WiUU0xsM.d.ts} +1 -1
  10. package/dist/chunk/2OJYONJ3.js +40 -0
  11. package/dist/chunk/2VQ2762Z.js +80 -0
  12. package/dist/chunk/2XPPNBYK.js +164 -0
  13. package/dist/chunk/3I23P4TJ.js +33 -0
  14. package/dist/chunk/5HG7XWVC.jsx +2956 -0
  15. package/dist/chunk/5IJ7WEIF.js +43 -0
  16. package/dist/chunk/5O6WC3OB.jsx +67 -0
  17. package/dist/chunk/6P5JIKPF.jsx +51 -0
  18. package/dist/chunk/BHLLVOVR.js +46 -0
  19. package/dist/chunk/DJI5XKAV.js +31 -0
  20. package/dist/chunk/DN3P54J2.jsx +43 -0
  21. package/dist/chunk/DVFQAAZR.js +43 -0
  22. package/dist/chunk/EDDBK4J6.js +42 -0
  23. package/dist/chunk/FZRQDGPD.jsx +54 -0
  24. package/dist/chunk/G5UEZ2VC.js +49 -0
  25. package/dist/chunk/GL7JG772.js +114 -0
  26. package/dist/chunk/HEOKGP5U.js +55 -0
  27. package/dist/chunk/HUHXQCKK.js +16 -0
  28. package/dist/chunk/I36LHZUY.jsx +31 -0
  29. package/dist/chunk/IG323YKF.jsx +50 -0
  30. package/dist/chunk/JQ4HSRDP.js +142 -0
  31. package/dist/chunk/JSQBKK7L.jsx +50 -0
  32. package/dist/chunk/K3WO7SRD.js +1 -0
  33. package/dist/chunk/KQ3RAWCE.jsx +57 -0
  34. package/dist/chunk/KXJZKDJX.jsx +0 -0
  35. package/dist/chunk/L4A67X7S.js +7 -0
  36. package/dist/chunk/LGDDR242.jsx +159 -0
  37. package/dist/chunk/MM2DZQL3.js +46 -0
  38. package/dist/chunk/MZWBWFDD.js +151 -0
  39. package/dist/chunk/O7LDJCQS.jsx +18 -0
  40. package/dist/chunk/Q4442PU4.js +42 -0
  41. package/dist/chunk/R5G3PODL.jsx +11 -0
  42. package/dist/chunk/R6ZBT7CY.jsx +55 -0
  43. package/dist/chunk/RHEFVSMJ.jsx +52 -0
  44. package/dist/chunk/{G6RG4LR7.js → SPEY5RMB.js} +2 -5
  45. package/dist/chunk/STFCLC5R.js +2954 -0
  46. package/dist/chunk/SVJIYMYJ.jsx +156 -0
  47. package/dist/chunk/SYWB4UN3.jsx +64 -0
  48. package/dist/chunk/{KACNXPUM.jsx → T2LDLYWV.jsx} +2 -4
  49. package/dist/chunk/UNKDNDT3.js +62 -0
  50. package/dist/chunk/XM3KF5LV.jsx +179 -0
  51. package/dist/chunk/XQCSYRVP.jsx +168 -0
  52. package/dist/chunk/YWIT2MRI.jsx +43 -0
  53. package/dist/chunk/ZYEP35R3.jsx +60 -0
  54. package/dist/components/{progress → Progress}/index.d.ts +1 -1
  55. package/dist/components/accordion/index.d.ts +17 -5
  56. package/dist/components/accordion/index.js +1 -1
  57. package/dist/components/accordion/index.jsx +6 -4
  58. package/dist/components/avatar/index.d.ts +4 -4
  59. package/dist/components/avatar/index.js +1 -1
  60. package/dist/components/avatar/index.jsx +3 -2
  61. package/dist/components/badge/index.d.ts +17 -0
  62. package/dist/components/badge/index.js +1 -0
  63. package/dist/components/badge/index.jsx +8 -0
  64. package/dist/components/breadcrumbs/index.d.ts +9 -0
  65. package/dist/components/breadcrumbs/index.js +1 -0
  66. package/dist/components/breadcrumbs/index.jsx +7 -0
  67. package/dist/components/button/index.d.ts +28 -6
  68. package/dist/components/button/index.js +1 -1
  69. package/dist/components/button/index.jsx +5 -5
  70. package/dist/components/checkbox/index.d.ts +13 -5
  71. package/dist/components/checkbox/index.js +1 -1
  72. package/dist/components/checkbox/index.jsx +5 -4
  73. package/dist/components/collapse/index.d.ts +15 -0
  74. package/dist/components/collapse/index.js +1 -0
  75. package/dist/components/collapse/index.jsx +14 -0
  76. package/dist/components/field/index.d.ts +1 -1
  77. package/dist/components/fileinput/index.d.ts +16 -0
  78. package/dist/components/fileinput/index.js +1 -0
  79. package/dist/components/fileinput/index.jsx +8 -0
  80. package/dist/components/input/index.d.ts +13 -8
  81. package/dist/components/input/index.js +1 -1
  82. package/dist/components/input/index.jsx +5 -6
  83. package/dist/components/join/index.d.ts +11 -0
  84. package/dist/components/join/index.js +1 -0
  85. package/dist/components/join/index.jsx +9 -0
  86. package/dist/components/mask/index.d.ts +7 -0
  87. package/dist/components/mask/index.js +1 -0
  88. package/dist/components/mask/index.jsx +8 -0
  89. package/dist/components/menu/index.d.ts +6 -64
  90. package/dist/components/menu/index.js +1 -1
  91. package/dist/components/menu/index.jsx +4 -7
  92. package/dist/components/pagination/index.d.ts +6 -6
  93. package/dist/components/pagination/index.js +1 -1
  94. package/dist/components/pagination/index.jsx +6 -4
  95. package/dist/components/polymorphic/index.d.ts +1 -2
  96. package/dist/components/polymorphic/index.js +1 -1
  97. package/dist/components/polymorphic/index.jsx +1 -1
  98. package/dist/components/select/index.d.ts +12 -5
  99. package/dist/components/select/index.js +1 -1
  100. package/dist/components/select/index.jsx +5 -4
  101. package/dist/components/steps/index.d.ts +3 -4
  102. package/dist/components/steps/index.js +1 -1
  103. package/dist/components/steps/index.jsx +3 -2
  104. package/dist/components/tabs/index.d.ts +2 -2
  105. package/dist/components/textarea/index.d.ts +12 -5
  106. package/dist/components/textarea/index.js +1 -1
  107. package/dist/components/textarea/index.jsx +5 -4
  108. package/dist/components/toggle/index.d.ts +15 -0
  109. package/dist/components/toggle/index.js +1 -0
  110. package/dist/components/toggle/index.jsx +8 -0
  111. package/dist/components/tooltip/index.d.ts +14 -5
  112. package/dist/components/tooltip/index.js +1 -1
  113. package/dist/components/tooltip/index.jsx +5 -4
  114. package/dist/index.d.ts +23 -18
  115. package/dist/index.js +23 -20
  116. package/dist/index.jsx +80 -65
  117. package/dist/types-CUG9pToa.d.ts +15 -0
  118. package/package.json +4 -2
  119. package/dist/Accordion-JZGWxBMK.d.ts +0 -27
  120. package/dist/Avatar-CzIirpVq.d.ts +0 -33
  121. package/dist/Button-B50OLXuV.d.ts +0 -63
  122. package/dist/Checkbox-CzeDsQLA.d.ts +0 -32
  123. package/dist/Input-BGHHmBBR.d.ts +0 -42
  124. package/dist/Pagination-CJtlFMHy.d.ts +0 -43
  125. package/dist/Select-CWCDBvec.d.ts +0 -44
  126. package/dist/Steps-1miUeyCD.d.ts +0 -34
  127. package/dist/Switch-CW6QtO1Y.d.ts +0 -76
  128. package/dist/Tag-BPrhn-Ne.d.ts +0 -42
  129. package/dist/Textarea-Cpdk7m6S.d.ts +0 -37
  130. package/dist/Tooltip-BfPongoz.d.ts +0 -53
  131. package/dist/Upload-CRljD5jf.d.ts +0 -39
  132. package/dist/chunk/3VOILEMN.js +0 -187
  133. package/dist/chunk/C4745OZS.jsx +0 -101
  134. package/dist/chunk/CJZGTNJZ.js +0 -115
  135. package/dist/chunk/DBQ7IOPU.js +0 -189
  136. package/dist/chunk/EB7KXR65.js +0 -102
  137. package/dist/chunk/EE4HXMKA.js +0 -165
  138. package/dist/chunk/ELRAUORW.jsx +0 -179
  139. package/dist/chunk/F33TSIEQ.jsx +0 -181
  140. package/dist/chunk/GA2HCFRS.jsx +0 -228
  141. package/dist/chunk/GWFGP2JQ.jsx +0 -179
  142. package/dist/chunk/LAQPAV5I.jsx +0 -187
  143. package/dist/chunk/LI3HCFL7.jsx +0 -132
  144. package/dist/chunk/MI773TMC.js +0 -107
  145. package/dist/chunk/MMTAND25.jsx +0 -126
  146. package/dist/chunk/NZKPDBTE.js +0 -118
  147. package/dist/chunk/NZZRKP74.js +0 -214
  148. package/dist/chunk/O2IMHWMY.js +0 -159
  149. package/dist/chunk/OMRJVDZV.js +0 -173
  150. package/dist/chunk/OYAKKETQ.js +0 -111
  151. package/dist/chunk/PNPC2OI3.jsx +0 -156
  152. package/dist/chunk/QHJOIUYT.jsx +0 -117
  153. package/dist/chunk/QONDPQ2I.jsx +0 -105
  154. package/dist/chunk/R6COBCN7.jsx +0 -100
  155. package/dist/chunk/T7IZ26YC.jsx +0 -194
  156. package/dist/chunk/TT2JYGLU.js +0 -218
  157. package/dist/chunk/V6Y5E7BL.js +0 -133
  158. package/dist/chunk/WB6NEEQV.jsx +0 -107
  159. package/dist/chunk/WYHYWDOM.js +0 -164
  160. package/dist/chunk/XD34JKSU.jsx +0 -201
  161. package/dist/chunk/YDEDUOFM.js +0 -102
  162. package/dist/components/breadcrumb/index.d.ts +0 -47
  163. package/dist/components/breadcrumb/index.js +0 -1
  164. package/dist/components/breadcrumb/index.jsx +0 -9
  165. package/dist/components/switch/index.d.ts +0 -8
  166. package/dist/components/switch/index.js +0 -1
  167. package/dist/components/switch/index.jsx +0 -7
  168. package/dist/components/tag/index.d.ts +0 -8
  169. package/dist/components/tag/index.js +0 -1
  170. package/dist/components/tag/index.jsx +0 -7
  171. package/dist/components/upload/index.d.ts +0 -8
  172. package/dist/components/upload/index.js +0 -1
  173. package/dist/components/upload/index.jsx +0 -7
  174. /package/dist/components/{progress → Progress}/index.js +0 -0
  175. /package/dist/components/{progress → Progress}/index.jsx +0 -0
@@ -1,218 +0,0 @@
1
- import { cva, classes } from './HKS7ET6T.js';
2
- import { delegateEvents, template, spread, mergeProps, insert, createComponent, effect, className } from 'solid-js/web';
3
- import { splitProps, createSignal, createMemo, For, Show } from 'solid-js';
4
-
5
- // src/components/steps/Steps.styles.ts
6
- var stepsContainer = cva("flex flex-col", {
7
- variants: {
8
- animated: {
9
- true: "transition-all duration-300 ease-in-out",
10
- false: ""
11
- }
12
- },
13
- defaultVariants: { animated: false }
14
- });
15
- var navBar = cva("flex items-center justify-between mb-6");
16
- var navItem = cva(
17
- "relative flex-1 flex flex-col items-center",
18
- {
19
- variants: {
20
- clickable: {
21
- true: "cursor-pointer",
22
- false: "pointer-events-none"
23
- },
24
- disabled: {
25
- true: "opacity-50 pointer-events-none",
26
- false: ""
27
- }
28
- },
29
- defaultVariants: { clickable: false, disabled: false }
30
- }
31
- );
32
- var marker = cva(
33
- "w-8 h-8 flex items-center justify-center rounded-full border-2",
34
- {
35
- variants: {
36
- active: {
37
- true: "bg-blue-500 border-blue-500 text-white",
38
- false: "bg-white border-gray-300 text-gray-600"
39
- }
40
- },
41
- defaultVariants: { active: false }
42
- }
43
- );
44
- var line = cva("absolute top-1/2 left-full w-full h-0.5", {
45
- variants: {
46
- active: {
47
- true: "bg-blue-500",
48
- false: "bg-gray-300"
49
- }
50
- },
51
- defaultVariants: { active: false }
52
- });
53
- var title = cva("mt-2 text-sm", {
54
- variants: {
55
- active: {
56
- true: "text-blue-600 font-medium",
57
- false: "text-gray-600"
58
- }
59
- },
60
- defaultVariants: { active: false }
61
- });
62
- var subtitle = cva("text-xs mt-1", {
63
- variants: {
64
- color: {
65
- default: "text-blue-500",
66
- muted: "text-gray-500",
67
- accent: "text-green-500"
68
- }
69
- },
70
- defaultVariants: { color: "default" }
71
- });
72
- var buttonSteps = cva("px-4 py-2 bg-blue-600 text-white rounded");
73
-
74
- // src/components/steps/Steps.tsx
75
- var _tmpl$ = /* @__PURE__ */ template(`<div><nav></nav><div>`);
76
- var _tmpl$2 = /* @__PURE__ */ template(`<div>`);
77
- var _tmpl$3 = /* @__PURE__ */ template(`<div><div></div><div>`);
78
- var _tmpl$4 = /* @__PURE__ */ template(`<button type=button class="px-4 py-2 border rounded">Back`);
79
- var _tmpl$5 = /* @__PURE__ */ template(`<button type=button>Next`);
80
- var _tmpl$6 = /* @__PURE__ */ template(`<button type=button class="px-4 py-2 bg-green-600 text-white rounded">Restart`);
81
- var _tmpl$7 = /* @__PURE__ */ template(`<div><div class="flex justify-end gap-2 mt-6">`);
82
- var Steps = (props) => {
83
- const [local, variantProps, otherProps] = splitProps(props, ["steps", "animated", "initial", "value", "onStepChange", "className"], ["animated"]);
84
- const isControlled = () => local.value !== void 0;
85
- const [internalIndex, setInternalIndex] = createSignal(local.initial ?? 0);
86
- const activeIndex = createMemo(() => isControlled() ? local.value : internalIndex());
87
- const clamp = (i) => Math.max(0, Math.min(i, local.steps.length - 1));
88
- const changeIndex = (i) => {
89
- const idx = clamp(i);
90
- if (isControlled()) local.onStepChange?.(idx);
91
- else setInternalIndex(idx);
92
- };
93
- const next = () => changeIndex(activeIndex() + 1);
94
- const back = () => changeIndex(activeIndex() - 1);
95
- const isActive = (i) => i === activeIndex();
96
- const isPast = (i) => i < activeIndex();
97
- return (() => {
98
- var _el$ = _tmpl$(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
99
- spread(_el$, mergeProps({
100
- get ["class"]() {
101
- return classes(stepsContainer({
102
- animated: local.animated
103
- }), local.className);
104
- }
105
- }, otherProps), false, true);
106
- insert(_el$2, createComponent(For, {
107
- get each() {
108
- return local.steps;
109
- },
110
- children: (step, idx) => {
111
- const i = idx();
112
- return (() => {
113
- var _el$4 = _tmpl$3(), _el$5 = _el$4.firstChild, _el$7 = _el$5.nextSibling;
114
- _el$4.$$click = () => step.clickable && changeIndex(i);
115
- insert(_el$5, () => step.marker ?? String(i + 1));
116
- insert(_el$4, createComponent(Show, {
117
- get when() {
118
- return i < local.steps.length - 1;
119
- },
120
- get children() {
121
- var _el$6 = _tmpl$2();
122
- effect(() => className(_el$6, line({
123
- active: isPast(i)
124
- })));
125
- return _el$6;
126
- }
127
- }), _el$7);
128
- insert(_el$7, () => step.title);
129
- insert(_el$4, createComponent(Show, {
130
- get when() {
131
- return step.subtitle;
132
- },
133
- get children() {
134
- var _el$8 = _tmpl$2();
135
- insert(_el$8, () => step.subtitle);
136
- effect(() => className(_el$8, subtitle()));
137
- return _el$8;
138
- }
139
- }), null);
140
- effect((_p$) => {
141
- var _v$ = navItem({
142
- clickable: !!step.clickable
143
- }), _v$2 = marker({
144
- active: isActive(i) || isPast(i)
145
- }), _v$3 = title({
146
- active: isActive(i) || isPast(i)
147
- });
148
- _v$ !== _p$.e && className(_el$4, _p$.e = _v$);
149
- _v$2 !== _p$.t && className(_el$5, _p$.t = _v$2);
150
- _v$3 !== _p$.a && className(_el$7, _p$.a = _v$3);
151
- return _p$;
152
- }, {
153
- e: void 0,
154
- t: void 0,
155
- a: void 0
156
- });
157
- return _el$4;
158
- })();
159
- }
160
- }));
161
- insert(_el$3, createComponent(For, {
162
- get each() {
163
- return local.steps;
164
- },
165
- children: (step, idx) => {
166
- const i = idx();
167
- return createComponent(Show, {
168
- get when() {
169
- return isActive(i);
170
- },
171
- get children() {
172
- var _el$9 = _tmpl$7(), _el$0 = _el$9.firstChild;
173
- insert(_el$9, () => step.content, _el$0);
174
- insert(_el$0, createComponent(Show, {
175
- when: i > 0,
176
- get children() {
177
- var _el$1 = _tmpl$4();
178
- _el$1.$$click = back;
179
- return _el$1;
180
- }
181
- }), null);
182
- insert(_el$0, createComponent(Show, {
183
- get when() {
184
- return i < local.steps.length - 1;
185
- },
186
- get children() {
187
- var _el$10 = _tmpl$5();
188
- _el$10.$$click = next;
189
- effect(() => className(_el$10, buttonSteps()));
190
- return _el$10;
191
- }
192
- }), null);
193
- insert(_el$0, createComponent(Show, {
194
- get when() {
195
- return i === local.steps.length - 1;
196
- },
197
- get children() {
198
- var _el$11 = _tmpl$6();
199
- _el$11.$$click = () => changeIndex(0);
200
- return _el$11;
201
- }
202
- }), null);
203
- return _el$9;
204
- }
205
- });
206
- }
207
- }));
208
- effect(() => className(_el$2, navBar()));
209
- return _el$;
210
- })();
211
- };
212
- var Steps_default = Steps;
213
- delegateEvents(["click"]);
214
-
215
- // src/components/steps/index.ts
216
- var steps_default = Steps_default;
217
-
218
- export { steps_default };
@@ -1,133 +0,0 @@
1
- import { cva } from './HKS7ET6T.js';
2
- import { template, insert, effect, setAttribute, spread, mergeProps, memo, className } from 'solid-js/web';
3
- import { splitProps, children, createMemo, untrack } from 'solid-js';
4
-
5
- // src/components/breadcrumb/Breadcrumb.styles.ts
6
- var breadcrumbContainerVariants = cva(
7
- ["flex", "items-center", "gap-2", "text-sm"],
8
- {
9
- variants: {
10
- alignment: {
11
- left: "justify-start",
12
- center: "justify-center",
13
- right: "justify-end"
14
- },
15
- size: {
16
- sm: "text-xs gap-1",
17
- md: "text-sm gap-2",
18
- lg: "text-base gap-3"
19
- },
20
- separator: {
21
- arrow: "breadcrumb-arrow",
22
- dot: "breadcrumb-dot",
23
- bullet: "breadcrumb-bullet",
24
- succeeds: "breadcrumb-succeeds"
25
- }
26
- },
27
- defaultVariants: {
28
- alignment: "left",
29
- size: "md"
30
- }
31
- }
32
- );
33
- var breadcrumbItemVariants = cva(
34
- ["text-gray-600", "dark:text-gray-300"],
35
- {
36
- variants: {
37
- active: {
38
- true: "text-blue-600 font-semibold cursor-default",
39
- false: "hover:underline"
40
- }
41
- },
42
- defaultVariants: {
43
- active: false
44
- }
45
- }
46
- );
47
-
48
- // src/components/breadcrumb/Breadcrumb.tsx
49
- var _tmpl$ = /* @__PURE__ */ template(`<li class="text-gray-400 select-none"aria-hidden=true>`);
50
- var _tmpl$2 = /* @__PURE__ */ template(`<li><span>`);
51
- var _tmpl$3 = /* @__PURE__ */ template(`<nav aria-label=Breadcrumb><ol class="flex items-center flex-wrap gap-1">`);
52
- var separatorMap = {
53
- arrow: "\u2192",
54
- dot: "\xB7",
55
- bullet: "\u2022",
56
- succeeds: "\xBB"
57
- };
58
- var Breadcrumb = (props) => {
59
- const [local, variantProps, otherProps] = splitProps(props, ["children"], ["alignment", "size", "separator"]);
60
- const resolvedChildren = children(() => local.children);
61
- const items = createMemo(() => resolvedChildren.toArray());
62
- const separator = createMemo(() => untrack(() => {
63
- const sep = variantProps.separator;
64
- return sep && separatorMap[sep] ? separatorMap[sep] : "/";
65
- }));
66
- const containerClasses = createMemo(() => breadcrumbContainerVariants(variantProps));
67
- const renderItems = createMemo(() => {
68
- return items().reduce((acc, item, idx) => {
69
- if (idx > 0) {
70
- acc.push((() => {
71
- var _el$ = _tmpl$();
72
- insert(_el$, separator);
73
- return _el$;
74
- })());
75
- }
76
- acc.push((() => {
77
- var _el$2 = _tmpl$2(), _el$3 = _el$2.firstChild;
78
- insert(_el$3, item);
79
- effect(() => setAttribute(_el$3, "aria-current", idx === items().length - 1 ? "page" : void 0));
80
- return _el$2;
81
- })());
82
- return acc;
83
- }, []);
84
- });
85
- return (() => {
86
- var _el$4 = _tmpl$3(), _el$5 = _el$4.firstChild;
87
- spread(_el$4, mergeProps({
88
- get ["class"]() {
89
- return containerClasses();
90
- }
91
- }, otherProps), false, true);
92
- insert(_el$5, renderItems);
93
- return _el$4;
94
- })();
95
- };
96
- var Breadcrumb_default = Breadcrumb;
97
- var _tmpl$4 = /* @__PURE__ */ template(`<li class="flex items-center gap-1">`);
98
- var _tmpl$22 = /* @__PURE__ */ template(`<a>`);
99
- var _tmpl$32 = /* @__PURE__ */ template(`<span>`);
100
- var BreadcrumbItem = (props) => {
101
- const [local, variantProps] = splitProps(props, ["children", "href", "active"], ["active"]);
102
- return (() => {
103
- var _el$ = _tmpl$4();
104
- insert(_el$, (() => {
105
- var _c$ = memo(() => !!(local.href && !local.active));
106
- return () => _c$() ? (() => {
107
- var _el$2 = _tmpl$22();
108
- insert(_el$2, () => local.children);
109
- effect((_p$) => {
110
- var _v$ = local.href, _v$2 = breadcrumbItemVariants(variantProps);
111
- _v$ !== _p$.e && setAttribute(_el$2, "href", _p$.e = _v$);
112
- _v$2 !== _p$.t && className(_el$2, _p$.t = _v$2);
113
- return _p$;
114
- }, {
115
- e: void 0,
116
- t: void 0
117
- });
118
- return _el$2;
119
- })() : (() => {
120
- var _el$3 = _tmpl$32();
121
- insert(_el$3, () => local.children);
122
- effect(() => className(_el$3, breadcrumbItemVariants({
123
- active: true
124
- })));
125
- return _el$3;
126
- })();
127
- })());
128
- return _el$;
129
- })();
130
- };
131
- var BreadcrumbItem_default = BreadcrumbItem;
132
-
133
- export { BreadcrumbItem_default, Breadcrumb_default };
@@ -1,107 +0,0 @@
1
- import {
2
- classes,
3
- cva
4
- } from "./P7WPLZNA.jsx";
5
-
6
- // src/components/textarea/Textarea.tsx
7
- import {
8
- createMemo,
9
- createSignal,
10
- splitProps,
11
- Show
12
- } from "solid-js";
13
-
14
- // src/components/textarea/Textarea.styles.ts
15
- var textareaVariants = cva(
16
- [
17
- "block w-full rounded-md border bg-white px-3 py-2 text-sm",
18
- "text-gray-900 placeholder-gray-400",
19
- "focus:outline-none focus:ring-2 focus:ring-accent focus:border-transparent",
20
- "disabled:opacity-50 disabled:cursor-not-allowed"
21
- ],
22
- {
23
- variants: {
24
- size: {
25
- sm: "text-sm py-1.5",
26
- md: "text-base py-2",
27
- lg: "text-lg py-3"
28
- },
29
- color: {
30
- primary: "border-blue-500",
31
- info: "border-cyan-500",
32
- success: "border-green-500",
33
- warning: "border-yellow-500",
34
- danger: "border-red-500"
35
- },
36
- loading: {
37
- true: "opacity-50 cursor-wait",
38
- false: ""
39
- },
40
- resize: {
41
- none: "resize-none",
42
- both: "resize",
43
- x: "resize-x",
44
- y: "resize-y"
45
- }
46
- },
47
- defaultVariants: {
48
- size: "md",
49
- color: "primary",
50
- loading: false,
51
- resize: "y"
52
- }
53
- }
54
- );
55
-
56
- // src/components/textarea/Textarea.tsx
57
- var Textarea = (props) => {
58
- const [localProps, variantProps, otherProps] = splitProps(
59
- props,
60
- ["hasCounter", "value", "onInput", "onFocus", "onBlur", "maxLength"],
61
- ["class", ...textareaVariants.variantKeys]
62
- );
63
- const [isFocused, setFocused] = createSignal(false);
64
- const valueLength = createMemo(
65
- () => typeof localProps.value === "string" ? localProps.value.length : 0
66
- );
67
- const showCounter = createMemo(
68
- () => localProps.maxLength && localProps.hasCounter
69
- );
70
- return <div class="relative w-full">
71
- <textarea
72
- class={textareaVariants(variantProps)}
73
- value={localProps.value}
74
- maxLength={localProps.maxLength}
75
- onInput={localProps.onInput}
76
- onFocus={(e) => {
77
- setFocused(true);
78
- typeof localProps.onFocus === "function" && localProps.onFocus(e);
79
- }}
80
- onBlur={(e) => {
81
- setFocused(false);
82
- typeof localProps.onBlur === "function" && localProps.onBlur(e);
83
- }}
84
- aria-invalid={variantProps.color === "danger" ? "true" : void 0}
85
- {...otherProps}
86
- />
87
-
88
- <Show when={showCounter()}>
89
- <small
90
- class={classes(
91
- "absolute bottom-1 right-2 text-xs text-gray-500 transition-opacity",
92
- isFocused() ? "opacity-100" : "opacity-0"
93
- )}
94
- >
95
- {valueLength()} / {localProps.maxLength}
96
- </small>
97
- </Show>
98
- </div>;
99
- };
100
- var Textarea_default = Textarea;
101
-
102
- // src/components/textarea/index.ts
103
- var textarea_default = Textarea_default;
104
-
105
- export {
106
- textarea_default
107
- };
@@ -1,164 +0,0 @@
1
- import { cva } from './HKS7ET6T.js';
2
- import { template, use, className, spread, mergeProps, insert, createComponent, memo, effect, setAttribute } from 'solid-js/web';
3
- import { splitProps, createSignal, createEffect, Show, untrack } from 'solid-js';
4
-
5
- // src/components/checkbox/Checkbox.styles.ts
6
- var checkboxVariants = cva(
7
- [
8
- "relative inline-flex items-center gap-2 select-none",
9
- "cursor-pointer disabled:cursor-default peer-disabled:cursor-default",
10
- "peer-disabled:opacity-50"
11
- ],
12
- {
13
- variants: {
14
- size: {
15
- sm: "text-sm",
16
- md: "text-base",
17
- lg: "text-lg"
18
- },
19
- color: {
20
- primary: "text-blue-600",
21
- success: "text-green-600",
22
- warning: "text-yellow-600",
23
- danger: "text-red-600"
24
- }
25
- },
26
- defaultVariants: {
27
- size: "md",
28
- color: "primary"
29
- }
30
- }
31
- );
32
- var checkboxMarkerVariants = cva(
33
- [
34
- "inline-flex items-center justify-center rounded-sm border",
35
- "transition-colors duration-200",
36
- "peer-disabled:opacity-50"
37
- ],
38
- {
39
- variants: {
40
- size: {
41
- sm: "w-4 h-4 text-sm",
42
- md: "w-5 h-5 text-base",
43
- lg: "w-6 h-6 text-lg"
44
- },
45
- color: {
46
- primary: "bg-blue-600 border-blue-600",
47
- success: "bg-green-600 border-green-600",
48
- warning: "bg-yellow-400 border-yellow-400",
49
- danger: "bg-red-600 border-red-600"
50
- },
51
- variant: {
52
- colored: "text-white",
53
- default: "border-gray-400 text-gray-800 dark:text-gray-200 bg-transparent"
54
- }
55
- },
56
- defaultVariants: {
57
- size: "md",
58
- variant: "default"
59
- }
60
- }
61
- );
62
- var checkboxInputClass = "peer absolute opacity-0 w-4 h-4";
63
- var checkboxLabelClass = "ml-2 text-gray-800 dark:text-gray-200";
64
- var _tmpl$ = /* @__PURE__ */ template(`<svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=3 stroke-linecap=round stroke-linejoin=round class="w-3.5 h-3.5"><polyline points="20 6 9 17 4 12">`);
65
- var CheckIcon = () => _tmpl$();
66
- var CheckIcon_default = CheckIcon;
67
- var _tmpl$2 = /* @__PURE__ */ template(`<svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=3 stroke-linecap=round stroke-linejoin=round class="w-3.5 h-3.5"><line x1=5 y1=12 x2=19 y2=12>`);
68
- var MinusIcon = () => _tmpl$2();
69
- var MinusIcon_default = MinusIcon;
70
-
71
- // src/components/checkbox/Checkbox.tsx
72
- var _tmpl$3 = /* @__PURE__ */ template(`<span>`);
73
- var _tmpl$22 = /* @__PURE__ */ template(`<label role=checkbox><input type=checkbox aria-hidden=true><span>`);
74
- var Checkbox = (props) => {
75
- const [localProps, variantProps, otherProps] = splitProps(props, ["label", "indeterminate", "defaultChecked", "checked", "onChange", "onFocus", "onBlur", "disabled"], ["class", ...checkboxVariants.variantKeys]);
76
- const isControlled = localProps.checked !== void 0;
77
- const [status, setStatus] = createSignal(localProps.indeterminate ? "indeterminate" : isControlled ? localProps.checked ? "checked" : "unchecked" : localProps.defaultChecked ? "checked" : "unchecked");
78
- createEffect(() => {
79
- if (isControlled) {
80
- setStatus(localProps.indeterminate ? "indeterminate" : localProps.checked ? "checked" : "unchecked");
81
- }
82
- });
83
- const handleChange = (e) => {
84
- const input = e.currentTarget;
85
- if (input.indeterminate) {
86
- input.indeterminate = false;
87
- input.checked = true;
88
- setStatus("checked");
89
- } else {
90
- setStatus(input.checked ? "checked" : "unchecked");
91
- }
92
- untrack(() => {
93
- if (typeof localProps.onChange === "function") {
94
- localProps.onChange(e);
95
- }
96
- });
97
- };
98
- return (() => {
99
- var _el$ = _tmpl$22(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
100
- use((el) => {
101
- if (status() === "indeterminate") {
102
- el.indeterminate = true;
103
- }
104
- }, _el$2);
105
- className(_el$2, checkboxInputClass);
106
- spread(_el$2, mergeProps({
107
- get checked() {
108
- return status() === "checked";
109
- },
110
- get disabled() {
111
- return localProps.disabled;
112
- }
113
- }, otherProps, {
114
- "onChange": handleChange,
115
- get onFocus() {
116
- return localProps.onFocus;
117
- },
118
- get onBlur() {
119
- return localProps.onBlur;
120
- }
121
- }), false, false);
122
- insert(_el$3, createComponent(Show, {
123
- get when() {
124
- return status() !== "unchecked";
125
- },
126
- get children() {
127
- return memo(() => status() === "indeterminate")() ? createComponent(MinusIcon_default, {}) : createComponent(CheckIcon_default, {});
128
- }
129
- }));
130
- insert(_el$, createComponent(Show, {
131
- get when() {
132
- return localProps.label;
133
- },
134
- get children() {
135
- var _el$4 = _tmpl$3();
136
- className(_el$4, checkboxLabelClass);
137
- insert(_el$4, () => localProps.label);
138
- return _el$4;
139
- }
140
- }), null);
141
- effect((_p$) => {
142
- var _v$ = checkboxVariants(), _v$2 = status() === "indeterminate" ? "mixed" : status() === "checked", _v$3 = checkboxMarkerVariants({
143
- size: variantProps.size,
144
- color: status() !== "unchecked" ? variantProps.color : void 0,
145
- variant: status() !== "unchecked" ? "colored" : "default"
146
- });
147
- _v$ !== _p$.e && className(_el$, _p$.e = _v$);
148
- _v$2 !== _p$.t && setAttribute(_el$, "aria-checked", _p$.t = _v$2);
149
- _v$3 !== _p$.a && className(_el$3, _p$.a = _v$3);
150
- return _p$;
151
- }, {
152
- e: void 0,
153
- t: void 0,
154
- a: void 0
155
- });
156
- return _el$;
157
- })();
158
- };
159
- var Checkbox_default = Checkbox;
160
-
161
- // src/components/checkbox/index.ts
162
- var checkbox_default = Checkbox_default;
163
-
164
- export { checkbox_default };