@pathscale/ui 0.0.11 → 0.0.13

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 (178) hide show
  1. package/README.md +53 -0
  2. package/dist/{Autocomplete-BLKN_nG8.d.ts → Autocomplete-gLkjMHrc.d.ts} +1 -1
  3. package/dist/Avatar-Dkd_kPlV.d.ts +40 -0
  4. package/dist/CollapseTitle-BNxog3is.d.ts +12 -0
  5. package/dist/{Field-DfUn85_1.d.ts → Field-DI2PA30N.d.ts} +1 -1
  6. package/dist/Mask-CPb596Mg.d.ts +16 -0
  7. package/dist/Menu-DgO4SHmA.d.ts +45 -0
  8. package/dist/{Progress-gN0xqhAF.d.ts → Progress-ChF4ior8.d.ts} +2 -2
  9. package/dist/Steps-Dk-UPL6r.d.ts +38 -0
  10. package/dist/{Tabs-BNR3p92D.d.ts → Tabs-WiUU0xsM.d.ts} +1 -1
  11. package/dist/chunk/2OJYONJ3.js +40 -0
  12. package/dist/chunk/2VQ2762Z.js +80 -0
  13. package/dist/chunk/2XPPNBYK.js +164 -0
  14. package/dist/chunk/3I23P4TJ.js +33 -0
  15. package/dist/chunk/5HG7XWVC.jsx +2956 -0
  16. package/dist/chunk/5IJ7WEIF.js +43 -0
  17. package/dist/chunk/5O6WC3OB.jsx +67 -0
  18. package/dist/chunk/64ESNXN4.js +1 -0
  19. package/dist/chunk/6P5JIKPF.jsx +51 -0
  20. package/dist/chunk/BHLLVOVR.js +46 -0
  21. package/dist/chunk/DJI5XKAV.js +31 -0
  22. package/dist/chunk/DN3P54J2.jsx +43 -0
  23. package/dist/chunk/DVFQAAZR.js +43 -0
  24. package/dist/chunk/EDDBK4J6.js +42 -0
  25. package/dist/chunk/FZRQDGPD.jsx +54 -0
  26. package/dist/chunk/G5UEZ2VC.js +49 -0
  27. package/dist/chunk/GL7JG772.js +114 -0
  28. package/dist/chunk/H2Q3L5KM.js +48 -0
  29. package/dist/chunk/HEOKGP5U.js +55 -0
  30. package/dist/chunk/HUHXQCKK.js +16 -0
  31. package/dist/chunk/I36LHZUY.jsx +31 -0
  32. package/dist/chunk/IG323YKF.jsx +50 -0
  33. package/dist/chunk/JQ4HSRDP.js +142 -0
  34. package/dist/chunk/JSQBKK7L.jsx +50 -0
  35. package/dist/chunk/K3WO7SRD.js +1 -0
  36. package/dist/chunk/KQ3RAWCE.jsx +57 -0
  37. package/dist/chunk/KXJZKDJX.jsx +0 -0
  38. package/dist/chunk/L4A67X7S.js +7 -0
  39. package/dist/chunk/LGDDR242.jsx +159 -0
  40. package/dist/chunk/MM2DZQL3.js +46 -0
  41. package/dist/chunk/O7LDJCQS.jsx +18 -0
  42. package/dist/chunk/PFB27MP3.jsx +0 -0
  43. package/dist/chunk/Q4442PU4.js +42 -0
  44. package/dist/chunk/R5G3PODL.jsx +11 -0
  45. package/dist/chunk/R6ZBT7CY.jsx +55 -0
  46. package/dist/chunk/RHEFVSMJ.jsx +52 -0
  47. package/dist/chunk/STFCLC5R.js +2954 -0
  48. package/dist/chunk/SVJIYMYJ.jsx +156 -0
  49. package/dist/chunk/SYWB4UN3.jsx +64 -0
  50. package/dist/chunk/T324HUIT.jsx +57 -0
  51. package/dist/chunk/T5LDPSFV.jsx +122 -0
  52. package/dist/chunk/UNKDNDT3.js +62 -0
  53. package/dist/chunk/XM3KF5LV.jsx +179 -0
  54. package/dist/chunk/YWIT2MRI.jsx +43 -0
  55. package/dist/chunk/ZH7DKMMN.js +109 -0
  56. package/dist/chunk/ZYEP35R3.jsx +60 -0
  57. package/dist/components/Progress/index.d.ts +1 -1
  58. package/dist/components/accordion/index.d.ts +17 -5
  59. package/dist/components/accordion/index.js +1 -1
  60. package/dist/components/accordion/index.jsx +6 -4
  61. package/dist/components/autocomplete/index.d.ts +2 -2
  62. package/dist/components/avatar/index.d.ts +4 -4
  63. package/dist/components/avatar/index.js +1 -1
  64. package/dist/components/avatar/index.jsx +3 -2
  65. package/dist/components/badge/index.d.ts +17 -0
  66. package/dist/components/badge/index.js +1 -0
  67. package/dist/components/badge/index.jsx +8 -0
  68. package/dist/components/breadcrumbs/index.d.ts +9 -0
  69. package/dist/components/breadcrumbs/index.js +1 -0
  70. package/dist/components/breadcrumbs/index.jsx +7 -0
  71. package/dist/components/button/index.d.ts +28 -6
  72. package/dist/components/button/index.js +1 -1
  73. package/dist/components/button/index.jsx +6 -5
  74. package/dist/components/checkbox/index.d.ts +13 -5
  75. package/dist/components/checkbox/index.js +1 -1
  76. package/dist/components/checkbox/index.jsx +5 -4
  77. package/dist/components/collapse/index.d.ts +15 -0
  78. package/dist/components/collapse/index.js +1 -0
  79. package/dist/components/collapse/index.jsx +14 -0
  80. package/dist/components/field/index.d.ts +1 -1
  81. package/dist/components/fileinput/index.d.ts +16 -0
  82. package/dist/components/fileinput/index.js +1 -0
  83. package/dist/components/fileinput/index.jsx +8 -0
  84. package/dist/components/input/index.d.ts +13 -8
  85. package/dist/components/input/index.js +1 -1
  86. package/dist/components/input/index.jsx +5 -6
  87. package/dist/components/join/index.d.ts +11 -0
  88. package/dist/components/join/index.js +1 -0
  89. package/dist/components/join/index.jsx +9 -0
  90. package/dist/components/loading/index.d.ts +11 -0
  91. package/dist/components/loading/index.js +1 -0
  92. package/dist/components/loading/index.jsx +9 -0
  93. package/dist/components/mask/index.d.ts +7 -0
  94. package/dist/components/mask/index.js +1 -0
  95. package/dist/components/mask/index.jsx +8 -0
  96. package/dist/components/menu/index.d.ts +6 -64
  97. package/dist/components/menu/index.js +1 -1
  98. package/dist/components/menu/index.jsx +4 -7
  99. package/dist/components/pagination/index.d.ts +6 -6
  100. package/dist/components/pagination/index.js +1 -1
  101. package/dist/components/pagination/index.jsx +6 -4
  102. package/dist/components/polymorphic/index.d.ts +1 -1
  103. package/dist/components/select/index.d.ts +12 -5
  104. package/dist/components/select/index.js +1 -1
  105. package/dist/components/select/index.jsx +5 -4
  106. package/dist/components/steps/index.d.ts +3 -4
  107. package/dist/components/steps/index.js +1 -1
  108. package/dist/components/steps/index.jsx +3 -2
  109. package/dist/components/tabs/index.d.ts +2 -2
  110. package/dist/components/textarea/index.d.ts +12 -5
  111. package/dist/components/textarea/index.js +1 -1
  112. package/dist/components/textarea/index.jsx +5 -4
  113. package/dist/components/toggle/index.d.ts +15 -0
  114. package/dist/components/toggle/index.js +1 -0
  115. package/dist/components/toggle/index.jsx +8 -0
  116. package/dist/components/tooltip/index.d.ts +14 -5
  117. package/dist/components/tooltip/index.js +1 -1
  118. package/dist/components/tooltip/index.jsx +5 -4
  119. package/dist/index.d.ts +25 -19
  120. package/dist/index.js +23 -19
  121. package/dist/index.jsx +87 -67
  122. package/dist/types-CUG9pToa.d.ts +15 -0
  123. package/package.json +4 -2
  124. package/dist/Accordion-nwuRbRRw.d.ts +0 -27
  125. package/dist/Avatar-CzIirpVq.d.ts +0 -33
  126. package/dist/Button-B50OLXuV.d.ts +0 -63
  127. package/dist/Checkbox-CzeDsQLA.d.ts +0 -32
  128. package/dist/Input-X4gwIB-F.d.ts +0 -42
  129. package/dist/Pagination-CJtlFMHy.d.ts +0 -43
  130. package/dist/Select-CP-TUHJv.d.ts +0 -44
  131. package/dist/Steps-1miUeyCD.d.ts +0 -34
  132. package/dist/Switch-CW6QtO1Y.d.ts +0 -76
  133. package/dist/Tag-BPrhn-Ne.d.ts +0 -42
  134. package/dist/Textarea-Cpdk7m6S.d.ts +0 -37
  135. package/dist/Tooltip-BfPongoz.d.ts +0 -53
  136. package/dist/Upload-CRljD5jf.d.ts +0 -39
  137. package/dist/chunk/3VOILEMN.js +0 -187
  138. package/dist/chunk/C4745OZS.jsx +0 -101
  139. package/dist/chunk/CJZGTNJZ.js +0 -115
  140. package/dist/chunk/DBQ7IOPU.js +0 -189
  141. package/dist/chunk/EB7KXR65.js +0 -102
  142. package/dist/chunk/EE4HXMKA.js +0 -165
  143. package/dist/chunk/ELRAUORW.jsx +0 -179
  144. package/dist/chunk/F33TSIEQ.jsx +0 -181
  145. package/dist/chunk/GWFGP2JQ.jsx +0 -179
  146. package/dist/chunk/LAQPAV5I.jsx +0 -187
  147. package/dist/chunk/LI3HCFL7.jsx +0 -132
  148. package/dist/chunk/LMPV5G35.jsx +0 -228
  149. package/dist/chunk/MI773TMC.js +0 -107
  150. package/dist/chunk/MMTAND25.jsx +0 -126
  151. package/dist/chunk/NZKPDBTE.js +0 -118
  152. package/dist/chunk/O2IMHWMY.js +0 -159
  153. package/dist/chunk/OMRJVDZV.js +0 -173
  154. package/dist/chunk/OYAKKETQ.js +0 -111
  155. package/dist/chunk/PF47YREI.js +0 -214
  156. package/dist/chunk/PNPC2OI3.jsx +0 -156
  157. package/dist/chunk/QHJOIUYT.jsx +0 -117
  158. package/dist/chunk/QONDPQ2I.jsx +0 -105
  159. package/dist/chunk/R6COBCN7.jsx +0 -100
  160. package/dist/chunk/T7IZ26YC.jsx +0 -194
  161. package/dist/chunk/TT2JYGLU.js +0 -218
  162. package/dist/chunk/V6Y5E7BL.js +0 -133
  163. package/dist/chunk/WB6NEEQV.jsx +0 -107
  164. package/dist/chunk/WYHYWDOM.js +0 -164
  165. package/dist/chunk/XD34JKSU.jsx +0 -201
  166. package/dist/chunk/YDEDUOFM.js +0 -102
  167. package/dist/components/breadcrumb/index.d.ts +0 -47
  168. package/dist/components/breadcrumb/index.js +0 -1
  169. package/dist/components/breadcrumb/index.jsx +0 -9
  170. package/dist/components/switch/index.d.ts +0 -8
  171. package/dist/components/switch/index.js +0 -1
  172. package/dist/components/switch/index.jsx +0 -7
  173. package/dist/components/tag/index.d.ts +0 -8
  174. package/dist/components/tag/index.js +0 -1
  175. package/dist/components/tag/index.jsx +0 -7
  176. package/dist/components/upload/index.d.ts +0 -8
  177. package/dist/components/upload/index.js +0 -1
  178. package/dist/components/upload/index.jsx +0 -7
@@ -1,194 +0,0 @@
1
- import {
2
- cva
3
- } from "./P7WPLZNA.jsx";
4
-
5
- // src/components/checkbox/Checkbox.tsx
6
- import {
7
- splitProps,
8
- createSignal,
9
- Show,
10
- untrack,
11
- createEffect
12
- } from "solid-js";
13
-
14
- // src/components/checkbox/Checkbox.styles.ts
15
- var checkboxVariants = cva(
16
- [
17
- "relative inline-flex items-center gap-2 select-none",
18
- "cursor-pointer disabled:cursor-default peer-disabled:cursor-default",
19
- "peer-disabled:opacity-50"
20
- ],
21
- {
22
- variants: {
23
- size: {
24
- sm: "text-sm",
25
- md: "text-base",
26
- lg: "text-lg"
27
- },
28
- color: {
29
- primary: "text-blue-600",
30
- success: "text-green-600",
31
- warning: "text-yellow-600",
32
- danger: "text-red-600"
33
- }
34
- },
35
- defaultVariants: {
36
- size: "md",
37
- color: "primary"
38
- }
39
- }
40
- );
41
- var checkboxMarkerVariants = cva(
42
- [
43
- "inline-flex items-center justify-center rounded-sm border",
44
- "transition-colors duration-200",
45
- "peer-disabled:opacity-50"
46
- ],
47
- {
48
- variants: {
49
- size: {
50
- sm: "w-4 h-4 text-sm",
51
- md: "w-5 h-5 text-base",
52
- lg: "w-6 h-6 text-lg"
53
- },
54
- color: {
55
- primary: "bg-blue-600 border-blue-600",
56
- success: "bg-green-600 border-green-600",
57
- warning: "bg-yellow-400 border-yellow-400",
58
- danger: "bg-red-600 border-red-600"
59
- },
60
- variant: {
61
- colored: "text-white",
62
- default: "border-gray-400 text-gray-800 dark:text-gray-200 bg-transparent"
63
- }
64
- },
65
- defaultVariants: {
66
- size: "md",
67
- variant: "default"
68
- }
69
- }
70
- );
71
- var checkboxInputClass = "peer absolute opacity-0 w-4 h-4";
72
- var checkboxLabelClass = "ml-2 text-gray-800 dark:text-gray-200";
73
-
74
- // src/components/checkbox/CheckIcon.tsx
75
- import "solid-js";
76
- var CheckIcon = () => <svg
77
- viewBox="0 0 24 24"
78
- fill="none"
79
- stroke="currentColor"
80
- stroke-width="3"
81
- stroke-linecap="round"
82
- stroke-linejoin="round"
83
- class="w-3.5 h-3.5"
84
- >
85
- <polyline points="20 6 9 17 4 12" />
86
- </svg>;
87
- var CheckIcon_default = CheckIcon;
88
-
89
- // src/components/checkbox/MinusIcon.tsx
90
- import "solid-js";
91
- var MinusIcon = () => <svg
92
- viewBox="0 0 24 24"
93
- fill="none"
94
- stroke="currentColor"
95
- stroke-width="3"
96
- stroke-linecap="round"
97
- stroke-linejoin="round"
98
- class="w-3.5 h-3.5"
99
- >
100
- <line x1="5" y1="12" x2="19" y2="12" />
101
- </svg>;
102
- var MinusIcon_default = MinusIcon;
103
-
104
- // src/components/checkbox/Checkbox.tsx
105
- var Checkbox = (props) => {
106
- const [localProps, variantProps, otherProps] = splitProps(
107
- props,
108
- [
109
- "label",
110
- "indeterminate",
111
- "defaultChecked",
112
- "checked",
113
- "onChange",
114
- "onFocus",
115
- "onBlur",
116
- "disabled"
117
- ],
118
- ["class", ...checkboxVariants.variantKeys]
119
- );
120
- let inputRef;
121
- const isControlled = localProps.checked !== void 0;
122
- const [status, setStatus] = createSignal(
123
- localProps.indeterminate ? "indeterminate" : isControlled ? localProps.checked ? "checked" : "unchecked" : localProps.defaultChecked ? "checked" : "unchecked"
124
- );
125
- createEffect(() => {
126
- if (isControlled) {
127
- setStatus(
128
- localProps.indeterminate ? "indeterminate" : localProps.checked ? "checked" : "unchecked"
129
- );
130
- }
131
- });
132
- const handleChange = (e) => {
133
- const input = e.currentTarget;
134
- if (input.indeterminate) {
135
- input.indeterminate = false;
136
- input.checked = true;
137
- setStatus("checked");
138
- } else {
139
- setStatus(input.checked ? "checked" : "unchecked");
140
- }
141
- untrack(() => {
142
- if (typeof localProps.onChange === "function") {
143
- localProps.onChange(e);
144
- }
145
- });
146
- };
147
- return <label
148
- class={checkboxVariants()}
149
- role="checkbox"
150
- aria-checked={status() === "indeterminate" ? "mixed" : status() === "checked"}
151
- >
152
- <input
153
- ref={(el) => {
154
- inputRef = el;
155
- if (status() === "indeterminate") {
156
- el.indeterminate = true;
157
- }
158
- }}
159
- type="checkbox"
160
- class={checkboxInputClass}
161
- checked={status() === "checked"}
162
- disabled={localProps.disabled}
163
- aria-hidden="true"
164
- {...otherProps}
165
- onChange={handleChange}
166
- onFocus={localProps.onFocus}
167
- onBlur={localProps.onBlur}
168
- />
169
-
170
- <span
171
- class={checkboxMarkerVariants({
172
- size: variantProps.size,
173
- color: status() !== "unchecked" ? variantProps.color : void 0,
174
- variant: status() !== "unchecked" ? "colored" : "default"
175
- })}
176
- >
177
- <Show when={status() !== "unchecked"}>
178
- {status() === "indeterminate" ? <MinusIcon_default /> : <CheckIcon_default />}
179
- </Show>
180
- </span>
181
-
182
- <Show when={localProps.label}>
183
- <span class={checkboxLabelClass}>{localProps.label}</span>
184
- </Show>
185
- </label>;
186
- };
187
- var Checkbox_default = Checkbox;
188
-
189
- // src/components/checkbox/index.ts
190
- var checkbox_default = Checkbox_default;
191
-
192
- export {
193
- checkbox_default
194
- };
@@ -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
- };