@pathscale/ui 0.0.13 → 0.0.15

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 (174) hide show
  1. package/README.md +44 -39
  2. package/dist/index.js +7170 -29
  3. package/package.json +42 -48
  4. package/dist/Autocomplete-gLkjMHrc.d.ts +0 -28
  5. package/dist/Avatar-Dkd_kPlV.d.ts +0 -40
  6. package/dist/CollapseTitle-BNxog3is.d.ts +0 -12
  7. package/dist/Field-DI2PA30N.d.ts +0 -49
  8. package/dist/Mask-CPb596Mg.d.ts +0 -16
  9. package/dist/Menu-DgO4SHmA.d.ts +0 -45
  10. package/dist/Progress-ChF4ior8.d.ts +0 -64
  11. package/dist/Steps-Dk-UPL6r.d.ts +0 -38
  12. package/dist/Table-CGa6Nop3.d.ts +0 -39
  13. package/dist/Tabs-WiUU0xsM.d.ts +0 -42
  14. package/dist/Timeline-Bd4SxHMT.d.ts +0 -14
  15. package/dist/chunk/2OJYONJ3.js +0 -40
  16. package/dist/chunk/2VQ2762Z.js +0 -80
  17. package/dist/chunk/2XPPNBYK.js +0 -164
  18. package/dist/chunk/3FBDYV4P.js +0 -143
  19. package/dist/chunk/3I23P4TJ.js +0 -33
  20. package/dist/chunk/55B7Q4NT.jsx +0 -258
  21. package/dist/chunk/5HG7XWVC.jsx +0 -2956
  22. package/dist/chunk/5IJ7WEIF.js +0 -43
  23. package/dist/chunk/5O6WC3OB.jsx +0 -67
  24. package/dist/chunk/64ESNXN4.js +0 -1
  25. package/dist/chunk/6P5JIKPF.jsx +0 -51
  26. package/dist/chunk/BHLLVOVR.js +0 -46
  27. package/dist/chunk/C4YO33NN.jsx +0 -179
  28. package/dist/chunk/DJI5XKAV.js +0 -31
  29. package/dist/chunk/DN3P54J2.jsx +0 -43
  30. package/dist/chunk/DSTUGZW6.jsx +0 -81
  31. package/dist/chunk/DVFQAAZR.js +0 -43
  32. package/dist/chunk/EDDBK4J6.js +0 -42
  33. package/dist/chunk/FKSQPGOD.jsx +0 -170
  34. package/dist/chunk/FZRQDGPD.jsx +0 -54
  35. package/dist/chunk/G5UEZ2VC.js +0 -49
  36. package/dist/chunk/GL7JG772.js +0 -114
  37. package/dist/chunk/GMIXRYN3.js +0 -138
  38. package/dist/chunk/H2Q3L5KM.js +0 -48
  39. package/dist/chunk/HEOKGP5U.js +0 -55
  40. package/dist/chunk/HKS7ET6T.js +0 -56
  41. package/dist/chunk/HUHXQCKK.js +0 -16
  42. package/dist/chunk/HWAGW5N4.jsx +0 -118
  43. package/dist/chunk/I36LHZUY.jsx +0 -31
  44. package/dist/chunk/IG323YKF.jsx +0 -50
  45. package/dist/chunk/JQ4HSRDP.js +0 -142
  46. package/dist/chunk/JSQBKK7L.jsx +0 -50
  47. package/dist/chunk/JWRGKHDO.js +0 -172
  48. package/dist/chunk/K3WO7SRD.js +0 -1
  49. package/dist/chunk/KQ3RAWCE.jsx +0 -57
  50. package/dist/chunk/KV6LTJHI.jsx +0 -175
  51. package/dist/chunk/KXJZKDJX.jsx +0 -0
  52. package/dist/chunk/L4A67X7S.js +0 -7
  53. package/dist/chunk/LGDDR242.jsx +0 -159
  54. package/dist/chunk/MAX47D6F.js +0 -99
  55. package/dist/chunk/MM2DZQL3.js +0 -46
  56. package/dist/chunk/MYERRMTM.js +0 -200
  57. package/dist/chunk/O7LDJCQS.jsx +0 -18
  58. package/dist/chunk/OJRG4ZAB.jsx +0 -143
  59. package/dist/chunk/P653OZ5D.js +0 -224
  60. package/dist/chunk/P7WPLZNA.jsx +0 -59
  61. package/dist/chunk/PFB27MP3.jsx +0 -0
  62. package/dist/chunk/Q4442PU4.js +0 -42
  63. package/dist/chunk/QYEMOKUG.js +0 -125
  64. package/dist/chunk/R5G3PODL.jsx +0 -11
  65. package/dist/chunk/R6ZBT7CY.jsx +0 -55
  66. package/dist/chunk/RHEFVSMJ.jsx +0 -52
  67. package/dist/chunk/SPEY5RMB.js +0 -84
  68. package/dist/chunk/STFCLC5R.js +0 -2954
  69. package/dist/chunk/STKRVQR6.jsx +0 -130
  70. package/dist/chunk/SVJIYMYJ.jsx +0 -156
  71. package/dist/chunk/SYWB4UN3.jsx +0 -64
  72. package/dist/chunk/T2LDLYWV.jsx +0 -101
  73. package/dist/chunk/T324HUIT.jsx +0 -57
  74. package/dist/chunk/T5LDPSFV.jsx +0 -122
  75. package/dist/chunk/UNKDNDT3.js +0 -62
  76. package/dist/chunk/VN5BKHA2.jsx +0 -97
  77. package/dist/chunk/WOT36Q7O.js +0 -166
  78. package/dist/chunk/WUZETUQR.js +0 -92
  79. package/dist/chunk/XM3KF5LV.jsx +0 -179
  80. package/dist/chunk/YWIT2MRI.jsx +0 -43
  81. package/dist/chunk/ZH7DKMMN.js +0 -109
  82. package/dist/chunk/ZYEP35R3.jsx +0 -60
  83. package/dist/classes-B_S9K-9I.d.ts +0 -13
  84. package/dist/components/Progress/index.d.ts +0 -7
  85. package/dist/components/Progress/index.js +0 -1
  86. package/dist/components/Progress/index.jsx +0 -7
  87. package/dist/components/accordion/index.d.ts +0 -20
  88. package/dist/components/accordion/index.js +0 -1
  89. package/dist/components/accordion/index.jsx +0 -9
  90. package/dist/components/autocomplete/index.d.ts +0 -8
  91. package/dist/components/autocomplete/index.js +0 -1
  92. package/dist/components/autocomplete/index.jsx +0 -7
  93. package/dist/components/avatar/index.d.ts +0 -8
  94. package/dist/components/avatar/index.js +0 -1
  95. package/dist/components/avatar/index.jsx +0 -8
  96. package/dist/components/badge/index.d.ts +0 -17
  97. package/dist/components/badge/index.js +0 -1
  98. package/dist/components/badge/index.jsx +0 -8
  99. package/dist/components/breadcrumbs/index.d.ts +0 -9
  100. package/dist/components/breadcrumbs/index.js +0 -1
  101. package/dist/components/breadcrumbs/index.jsx +0 -7
  102. package/dist/components/button/index.d.ts +0 -31
  103. package/dist/components/button/index.js +0 -1
  104. package/dist/components/button/index.jsx +0 -9
  105. package/dist/components/checkbox/index.d.ts +0 -16
  106. package/dist/components/checkbox/index.js +0 -1
  107. package/dist/components/checkbox/index.jsx +0 -8
  108. package/dist/components/collapse/index.d.ts +0 -15
  109. package/dist/components/collapse/index.js +0 -1
  110. package/dist/components/collapse/index.jsx +0 -14
  111. package/dist/components/dropdown/index.d.ts +0 -27
  112. package/dist/components/dropdown/index.js +0 -1
  113. package/dist/components/dropdown/index.jsx +0 -13
  114. package/dist/components/field/index.d.ts +0 -7
  115. package/dist/components/field/index.js +0 -1
  116. package/dist/components/field/index.jsx +0 -7
  117. package/dist/components/fileinput/index.d.ts +0 -16
  118. package/dist/components/fileinput/index.js +0 -1
  119. package/dist/components/fileinput/index.jsx +0 -8
  120. package/dist/components/input/index.d.ts +0 -15
  121. package/dist/components/input/index.js +0 -1
  122. package/dist/components/input/index.jsx +0 -8
  123. package/dist/components/join/index.d.ts +0 -11
  124. package/dist/components/join/index.js +0 -1
  125. package/dist/components/join/index.jsx +0 -9
  126. package/dist/components/loading/index.d.ts +0 -11
  127. package/dist/components/loading/index.js +0 -1
  128. package/dist/components/loading/index.jsx +0 -9
  129. package/dist/components/mask/index.d.ts +0 -7
  130. package/dist/components/mask/index.js +0 -1
  131. package/dist/components/mask/index.jsx +0 -8
  132. package/dist/components/menu/index.d.ts +0 -8
  133. package/dist/components/menu/index.js +0 -1
  134. package/dist/components/menu/index.jsx +0 -8
  135. package/dist/components/navbar/index.d.ts +0 -36
  136. package/dist/components/navbar/index.js +0 -1
  137. package/dist/components/navbar/index.jsx +0 -11
  138. package/dist/components/pagination/index.d.ts +0 -8
  139. package/dist/components/pagination/index.js +0 -1
  140. package/dist/components/pagination/index.jsx +0 -9
  141. package/dist/components/polymorphic/index.d.ts +0 -34
  142. package/dist/components/polymorphic/index.js +0 -1
  143. package/dist/components/polymorphic/index.jsx +0 -8
  144. package/dist/components/select/index.d.ts +0 -15
  145. package/dist/components/select/index.js +0 -1
  146. package/dist/components/select/index.jsx +0 -8
  147. package/dist/components/steps/index.d.ts +0 -7
  148. package/dist/components/steps/index.js +0 -1
  149. package/dist/components/steps/index.jsx +0 -8
  150. package/dist/components/table/index.d.ts +0 -8
  151. package/dist/components/table/index.js +0 -1
  152. package/dist/components/table/index.jsx +0 -7
  153. package/dist/components/tabs/index.d.ts +0 -8
  154. package/dist/components/tabs/index.js +0 -1
  155. package/dist/components/tabs/index.jsx +0 -7
  156. package/dist/components/textarea/index.d.ts +0 -15
  157. package/dist/components/textarea/index.js +0 -1
  158. package/dist/components/textarea/index.jsx +0 -8
  159. package/dist/components/timeline/index.d.ts +0 -7
  160. package/dist/components/timeline/index.js +0 -1
  161. package/dist/components/timeline/index.jsx +0 -7
  162. package/dist/components/toast/index.d.ts +0 -24
  163. package/dist/components/toast/index.js +0 -1
  164. package/dist/components/toast/index.jsx +0 -11
  165. package/dist/components/toggle/index.d.ts +0 -15
  166. package/dist/components/toggle/index.js +0 -1
  167. package/dist/components/toggle/index.jsx +0 -8
  168. package/dist/components/tooltip/index.d.ts +0 -17
  169. package/dist/components/tooltip/index.js +0 -1
  170. package/dist/components/tooltip/index.jsx +0 -8
  171. package/dist/index.css +0 -73
  172. package/dist/index.d.ts +0 -33
  173. package/dist/index.jsx +0 -143
  174. package/dist/types-CUG9pToa.d.ts +0 -15
@@ -1,170 +0,0 @@
1
- import {
2
- cva
3
- } from "./P7WPLZNA.jsx";
4
-
5
- // src/components/toast/toast.store.ts
6
- import { createSignal } from "solid-js";
7
- var [toasts, setToasts] = createSignal([]);
8
- var toastStore = {
9
- toasts,
10
- add(toast2) {
11
- const id = crypto.randomUUID();
12
- setToasts((prev) => [...prev, { ...toast2, id }]);
13
- return id;
14
- },
15
- remove(id) {
16
- setToasts((prev) => prev.filter((t) => t.id !== id));
17
- },
18
- clear() {
19
- setToasts([]);
20
- }
21
- };
22
-
23
- // src/components/toast/toast-api.ts
24
- function createToastApi() {
25
- const show = (message, options = {}) => {
26
- return toastStore.add({ ...options, message });
27
- };
28
- return {
29
- show,
30
- success: (msg, opts) => show(msg, { ...opts, type: "success" }),
31
- error: (msg, opts) => show(msg, { ...opts, type: "error" }),
32
- info: (msg, opts) => show(msg, { ...opts, type: "info" }),
33
- warning: (msg, opts) => show(msg, { ...opts, type: "warning" }),
34
- clear: toastStore.clear
35
- };
36
- }
37
-
38
- // src/components/toast/Toaster.tsx
39
- import { For } from "solid-js";
40
-
41
- // src/components/toast/Toast.tsx
42
- import {
43
- createSignal as createSignal2,
44
- onMount,
45
- onCleanup,
46
- Show
47
- } from "solid-js";
48
-
49
- // src/components/toast/utils/remove-element.ts
50
- function removeElement(el) {
51
- if (typeof el.remove === "function") {
52
- el.remove();
53
- } else {
54
- el.parentNode?.removeChild(el);
55
- }
56
- }
57
-
58
- // src/components/toast/utils/timer.ts
59
- var Timer = class {
60
- callback;
61
- delay;
62
- startedAt;
63
- timer;
64
- constructor(callback, delay) {
65
- this.callback = callback;
66
- this.delay = delay;
67
- this.startedAt = Date.now();
68
- this.timer = window.setTimeout(callback, delay);
69
- }
70
- pause() {
71
- this.stop();
72
- this.delay -= Date.now() - this.startedAt;
73
- }
74
- resume() {
75
- this.stop();
76
- this.startedAt = Date.now();
77
- this.timer = window.setTimeout(this.callback, this.delay);
78
- }
79
- stop() {
80
- clearTimeout(this.timer);
81
- }
82
- };
83
-
84
- // src/components/toast/Toast.styles.ts
85
- var toastWrapperClass = cva(
86
- "relative flex items-start gap-3 px-4 py-3 rounded-2xl shadow-lg transition-all duration-300 w-full",
87
- {
88
- variants: {
89
- type: {
90
- default: "bg-gray-700 text-white",
91
- success: "bg-green-600 text-white",
92
- error: "bg-red-600 text-white",
93
- info: "bg-blue-600 text-white",
94
- warning: "bg-yellow-400 text-black"
95
- },
96
- visible: {
97
- true: "opacity-100 translate-y-0",
98
- false: "opacity-0 -translate-y-2 pointer-events-none"
99
- }
100
- },
101
- defaultVariants: {
102
- type: "default",
103
- visible: true
104
- }
105
- }
106
- );
107
-
108
- // src/components/toast/Toast.tsx
109
- var Toast = (props) => {
110
- const [visible, setVisible] = createSignal2(false);
111
- let rootRef;
112
- let timer = null;
113
- const close = () => {
114
- timer?.stop();
115
- setVisible(false);
116
- setTimeout(() => {
117
- props.onClose?.();
118
- if (rootRef) removeElement(rootRef);
119
- }, 150);
120
- };
121
- onMount(() => {
122
- setVisible(true);
123
- if (props.duration !== false) {
124
- timer = new Timer(close, props.duration || 4e3);
125
- }
126
- });
127
- onCleanup(() => {
128
- timer?.stop();
129
- });
130
- return <div
131
- ref={rootRef}
132
- class={toastWrapperClass({
133
- type: props.type || "default",
134
- visible: visible()
135
- })}
136
- role="alert"
137
- onClick={() => props.dismissible && close()}
138
- innerHTML={props.message}
139
- >
140
- <Show when={props.dismissible}>
141
- <button
142
- class="absolute top-2 right-2 text-white/80 hover:text-white transition"
143
- aria-label="Close toast"
144
- >
145
- ×
146
- </button>
147
- </Show>
148
- </div>;
149
- };
150
- var Toast_default = Toast;
151
-
152
- // src/components/toast/Toaster.tsx
153
- var Toaster = () => {
154
- return <div class="fixed bottom-4 right-4 z-50 flex flex-col items-end gap-2 w-[300px] max-w-full">
155
- <For each={toastStore.toasts()}>
156
- {(toast2) => <Toast_default {...toast2} onClose={() => toastStore.remove(toast2.id)} />}
157
- </For>
158
- </div>;
159
- };
160
- var Toaster_default = Toaster;
161
-
162
- // src/components/toast/index.ts
163
- var toast = createToastApi();
164
- var toast_default = toast;
165
-
166
- export {
167
- Toaster_default,
168
- toast,
169
- toast_default
170
- };
@@ -1,54 +0,0 @@
1
- import {
2
- clsx
3
- } from "./O7LDJCQS.jsx";
4
- import {
5
- twMerge
6
- } from "./5HG7XWVC.jsx";
7
-
8
- // src/components/fileinput/FileInput.tsx
9
- import { splitProps } from "solid-js";
10
- var FileInput = (props) => {
11
- const [local, others] = splitProps(props, [
12
- "size",
13
- "color",
14
- "bordered",
15
- "dataTheme",
16
- "class",
17
- "className",
18
- "style"
19
- ]);
20
- const classes = () => twMerge(
21
- "file-input",
22
- local.class,
23
- local.className,
24
- clsx({
25
- "file-input-xl": local.size === "xl",
26
- "file-input-lg": local.size === "lg",
27
- "file-input-md": local.size === "md",
28
- "file-input-sm": local.size === "sm",
29
- "file-input-xs": local.size === "xs",
30
- "file-input-primary": local.color === "primary",
31
- "file-input-secondary": local.color === "secondary",
32
- "file-input-accent": local.color === "accent",
33
- "file-input-ghost": local.color === "ghost",
34
- "file-input-info": local.color === "info",
35
- "file-input-success": local.color === "success",
36
- "file-input-warning": local.color === "warning",
37
- "file-input-error": local.color === "error",
38
- "file-input-bordered": local.bordered
39
- })
40
- );
41
- return <input
42
- {...others}
43
- ref={others.ref}
44
- type="file"
45
- data-theme={local.dataTheme}
46
- class={classes()}
47
- style={local.style}
48
- />;
49
- };
50
- var FileInput_default = FileInput;
51
-
52
- export {
53
- FileInput_default
54
- };
@@ -1,49 +0,0 @@
1
- import { clsx } from './HUHXQCKK.js';
2
- import { twMerge } from './STFCLC5R.js';
3
- import { template, spread, mergeProps, insert } from 'solid-js/web';
4
- import { splitProps } from 'solid-js';
5
-
6
- var _tmpl$ = /* @__PURE__ */ template(`<div>`);
7
- var Badge = (props) => {
8
- const [local, others] = splitProps(props, ["size", "color", "variant", "responsive", "dataTheme", "class", "className", "style"]);
9
- const classes = () => twMerge("badge", local.class, local.className, clsx({
10
- "badge-xl": local.size === "xl",
11
- "badge-lg": local.size === "lg",
12
- "badge-md": local.size === "md",
13
- "badge-sm": local.size === "sm",
14
- "badge-xs": local.size === "xs",
15
- "badge-soft": local.variant === "soft",
16
- "badge-dash": local.variant === "dash",
17
- "badge-outline": local.variant === "outline",
18
- "badge-neutral": local.color === "neutral",
19
- "badge-primary": local.color === "primary",
20
- "badge-secondary": local.color === "secondary",
21
- "badge-accent": local.color === "accent",
22
- "badge-ghost": local.color === "ghost",
23
- "badge-info": local.color === "info",
24
- "badge-success": local.color === "success",
25
- "badge-warning": local.color === "warning",
26
- "badge-error": local.color === "error",
27
- "badge-xs md:badge-sm lg:badge-md xl:badge-lg": local.responsive
28
- }));
29
- return (() => {
30
- var _el$ = _tmpl$();
31
- spread(_el$, mergeProps(others, {
32
- get ["data-theme"]() {
33
- return local.dataTheme;
34
- },
35
- get ["class"]() {
36
- return classes();
37
- },
38
- get style() {
39
- return local.style;
40
- },
41
- "aria-label": "Badge"
42
- }), false, true);
43
- insert(_el$, () => props.children);
44
- return _el$;
45
- })();
46
- };
47
- var Badge_default = Badge;
48
-
49
- export { Badge_default };
@@ -1,114 +0,0 @@
1
- import { clsx } from './HUHXQCKK.js';
2
- import { twMerge } from './STFCLC5R.js';
3
- import { createComponent, Dynamic, mergeProps } from 'solid-js/web';
4
- import { splitProps } from 'solid-js';
5
-
6
- var VoidElementList = ["area", "base", "br", "col", "embed", "hr", "img", "input", "link", "keygen", "meta", "param", "source", "track", "wbr"];
7
- var Step = (props) => {
8
- const [local, others] = splitProps(props, ["value", "color", "as", "class", "className", "style", "children", "data-theme"]);
9
- const Tag = local.as || "li";
10
- const classes = () => twMerge("step", local.class, local.className, clsx({
11
- "step-neutral": local.color === "neutral",
12
- "step-primary": local.color === "primary",
13
- "step-secondary": local.color === "secondary",
14
- "step-accent": local.color === "accent",
15
- "step-info": local.color === "info",
16
- "step-success": local.color === "success",
17
- "step-warning": local.color === "warning",
18
- "step-error": local.color === "error"
19
- }));
20
- if (VoidElementList.includes(Tag)) {
21
- return createComponent(Dynamic, mergeProps({
22
- component: Tag
23
- }, others, {
24
- "aria-label": "Step",
25
- get ["data-theme"]() {
26
- return local["data-theme"];
27
- },
28
- get ["data-content"]() {
29
- return local.value;
30
- },
31
- get ["class"]() {
32
- return classes();
33
- },
34
- get style() {
35
- return local.style;
36
- }
37
- }));
38
- }
39
- return createComponent(Dynamic, mergeProps({
40
- component: Tag
41
- }, others, {
42
- "aria-label": "Step",
43
- get ["data-theme"]() {
44
- return local["data-theme"];
45
- },
46
- get ["data-content"]() {
47
- return local.value;
48
- },
49
- get ["class"]() {
50
- return classes();
51
- },
52
- get style() {
53
- return local.style;
54
- },
55
- get children() {
56
- return local.children;
57
- }
58
- }));
59
- };
60
- var Step_default = Step;
61
-
62
- // src/components/steps/Steps.tsx
63
- var VoidElementList2 = ["area", "base", "br", "col", "embed", "hr", "img", "input", "link", "keygen", "meta", "param", "source", "track", "wbr"];
64
- var Steps = (props) => {
65
- const [local, others] = splitProps(props, ["children", "vertical", "horizontal", "as", "class", "className", "style", "data-theme"]);
66
- const Tag = local.as || "ul";
67
- const classes = () => twMerge("steps", local.class, local.className, clsx({
68
- "steps-vertical": local.vertical,
69
- "steps-horizontal": local.horizontal
70
- }));
71
- if (VoidElementList2.includes(Tag)) {
72
- return createComponent(Dynamic, mergeProps({
73
- component: Tag
74
- }, others, {
75
- role: "group",
76
- "aria-label": "Steps",
77
- get ["data-theme"]() {
78
- return local["data-theme"];
79
- },
80
- get ["class"]() {
81
- return classes();
82
- },
83
- get style() {
84
- return local.style;
85
- }
86
- }));
87
- }
88
- return createComponent(Dynamic, mergeProps({
89
- component: Tag
90
- }, others, {
91
- role: "group",
92
- "aria-label": "Steps",
93
- get ["data-theme"]() {
94
- return local["data-theme"];
95
- },
96
- get ["class"]() {
97
- return classes();
98
- },
99
- get style() {
100
- return local.style;
101
- },
102
- get children() {
103
- return local.children;
104
- }
105
- }));
106
- };
107
- var Steps_default = Object.assign(Steps, {
108
- Step: Step_default
109
- });
110
-
111
- // src/components/steps/index.ts
112
- var steps_default = Steps_default;
113
-
114
- export { steps_default };
@@ -1,138 +0,0 @@
1
- import { cva, classes } from './HKS7ET6T.js';
2
- import { template, spread, mergeProps, insert, createComponent, effect, className, memo } from 'solid-js/web';
3
- import { splitProps, createMemo, Show } from 'solid-js';
4
-
5
- // src/components/progress/Progress.styles.ts
6
- var progressContainer = cva(
7
- "relative w-full max-w-md select-none",
8
- {
9
- variants: {
10
- size: {
11
- sm: "",
12
- md: "",
13
- lg: ""
14
- }
15
- },
16
- defaultVariants: { size: "md" }
17
- }
18
- );
19
- var progressWrapper = cva("overflow-hidden bg-gray-200", {
20
- variants: {
21
- size: {
22
- sm: "h-2",
23
- md: "h-4",
24
- lg: "h-6"
25
- },
26
- shape: {
27
- rounded: "rounded-lg",
28
- circle: "rounded-full"
29
- }
30
- },
31
- defaultVariants: {
32
- size: "md",
33
- shape: "rounded"
34
- }
35
- });
36
- var progressFill = cva("h-full transition-all duration-300", {
37
- variants: {
38
- color: {
39
- default: "bg-gray-500",
40
- danger: "bg-red-500",
41
- success: "bg-green-500",
42
- info: "bg-blue-500",
43
- warning: "bg-yellow-500"
44
- },
45
- variant: {
46
- filled: "",
47
- outlined: "bg-opacity-0 ring-1 ring-gray-300",
48
- ghost: "bg-opacity-50"
49
- }
50
- },
51
- defaultVariants: {
52
- color: "default",
53
- variant: "filled"
54
- }
55
- });
56
- var progressLabel = cva(
57
- "absolute top-0 right-0 h-full flex items-center pr-2 text-xs font-medium text-gray-700"
58
- );
59
-
60
- // src/components/progress/Progress.tsx
61
- var _tmpl$ = /* @__PURE__ */ template(`<div>`);
62
- var _tmpl$2 = /* @__PURE__ */ template(`<div><div>`);
63
- var Progress = (props) => {
64
- const [local, rest] = splitProps(props, ["value", "size", "shape", "variant", "color", "showValue", "format", "className"]);
65
- const val = createMemo(() => typeof local.value === "number" ? Math.max(0, Math.min(100, local.value)) : null);
66
- const isDeterminate = () => val() !== null;
67
- const labelText = createMemo(() => {
68
- if (!local.showValue || val() == null) return "";
69
- return local.format === "percent" ? `${val()}%` : String(val());
70
- });
71
- return (() => {
72
- var _el$ = _tmpl$2(), _el$2 = _el$.firstChild;
73
- spread(_el$, mergeProps(rest, {
74
- get ["class"]() {
75
- return classes(progressContainer({
76
- size: local.size
77
- }), local.className);
78
- },
79
- get ["aria-busy"]() {
80
- return !isDeterminate();
81
- }
82
- }), false, true);
83
- insert(_el$2, createComponent(Show, {
84
- get when() {
85
- return isDeterminate();
86
- },
87
- get fallback() {
88
- return (() => {
89
- var _el$5 = _tmpl$();
90
- _el$5.style.setProperty("width", "100%");
91
- effect(() => className(_el$5, classes(progressFill({
92
- color: local.color,
93
- variant: local.variant
94
- }), "animate-pulse")));
95
- return _el$5;
96
- })();
97
- },
98
- get children() {
99
- var _el$3 = _tmpl$();
100
- effect((_p$) => {
101
- var _v$ = progressFill({
102
- color: local.color,
103
- variant: local.variant
104
- }), _v$2 = `${val()}%`;
105
- _v$ !== _p$.e && className(_el$3, _p$.e = _v$);
106
- _v$2 !== _p$.t && ((_p$.t = _v$2) != null ? _el$3.style.setProperty("width", _v$2) : _el$3.style.removeProperty("width"));
107
- return _p$;
108
- }, {
109
- e: void 0,
110
- t: void 0
111
- });
112
- return _el$3;
113
- }
114
- }));
115
- insert(_el$, createComponent(Show, {
116
- get when() {
117
- return memo(() => !!local.showValue)() && labelText();
118
- },
119
- get children() {
120
- var _el$4 = _tmpl$();
121
- insert(_el$4, labelText);
122
- effect(() => className(_el$4, progressLabel()));
123
- return _el$4;
124
- }
125
- }), null);
126
- effect(() => className(_el$2, classes(progressWrapper({
127
- size: local.size,
128
- shape: local.shape
129
- }))));
130
- return _el$;
131
- })();
132
- };
133
- var Progress_default = Progress;
134
-
135
- // src/components/progress/index.ts
136
- var progress_default = Progress_default;
137
-
138
- export { progress_default };
@@ -1,48 +0,0 @@
1
- import { clsx } from './HUHXQCKK.js';
2
- import { twMerge } from './STFCLC5R.js';
3
- import { template, spread, mergeProps } from 'solid-js/web';
4
- import { splitProps } from 'solid-js';
5
-
6
- var _tmpl$ = /* @__PURE__ */ template(`<span>`);
7
- var Loading = (props) => {
8
- const [local, others] = splitProps(props, ["size", "variant", "color", "dataTheme", "class", "className", "style"]);
9
- const classes = () => twMerge("loading", local.class, local.className, clsx({
10
- "loading-xl": local.size === "xl",
11
- "loading-lg": local.size === "lg",
12
- "loading-md": local.size === "md",
13
- "loading-sm": local.size === "sm",
14
- "loading-xs": local.size === "xs",
15
- "loading-spinner": local.variant === "spinner",
16
- "loading-dots": local.variant === "dots",
17
- "loading-ring": local.variant === "ring",
18
- "loading-ball": local.variant === "ball",
19
- "loading-bars": local.variant === "bars",
20
- "loading-infinity": local.variant === "infinity",
21
- "text-primary": local.color === "primary",
22
- "text-secondary": local.color === "secondary",
23
- "text-accent": local.color === "accent",
24
- "text-info": local.color === "info",
25
- "text-success": local.color === "success",
26
- "text-warning": local.color === "warning",
27
- "text-error": local.color === "error",
28
- "text-ghost": local.color === "ghost"
29
- }));
30
- return (() => {
31
- var _el$ = _tmpl$();
32
- spread(_el$, mergeProps(others, {
33
- get ["data-theme"]() {
34
- return local.dataTheme;
35
- },
36
- get ["class"]() {
37
- return classes();
38
- },
39
- get style() {
40
- return local.style;
41
- }
42
- }), false, false);
43
- return _el$;
44
- })();
45
- };
46
- var Loading_default = Loading;
47
-
48
- export { Loading_default };
@@ -1,55 +0,0 @@
1
- import { clsx } from './HUHXQCKK.js';
2
- import { twMerge } from './STFCLC5R.js';
3
- import { template, use, spread, mergeProps } from 'solid-js/web';
4
- import { splitProps, onMount, createEffect } from 'solid-js';
5
-
6
- var _tmpl$ = /* @__PURE__ */ template(`<input>`);
7
- var Checkbox = (props) => {
8
- let inputRef;
9
- const [local, others] = splitProps(props, ["color", "size", "indeterminate", "dataTheme", "class", "className", "style"]);
10
- const classes = () => twMerge("checkbox", local.class, local.className, clsx({
11
- "checkbox-xl": local.size === "xl",
12
- "checkbox-lg": local.size === "lg",
13
- "checkbox-md": local.size === "md",
14
- "checkbox-sm": local.size === "sm",
15
- "checkbox-xs": local.size === "xs",
16
- "checkbox-neutral": local.color === "neutral",
17
- "checkbox-primary": local.color === "primary",
18
- "checkbox-secondary": local.color === "secondary",
19
- "checkbox-accent": local.color === "accent",
20
- "checkbox-info": local.color === "info",
21
- "checkbox-success": local.color === "success",
22
- "checkbox-warning": local.color === "warning",
23
- "checkbox-error": local.color === "error"
24
- }));
25
- onMount(() => {
26
- if (inputRef && local.indeterminate !== void 0) {
27
- inputRef.indeterminate = local.indeterminate;
28
- }
29
- });
30
- createEffect(() => {
31
- if (inputRef) {
32
- inputRef.indeterminate = !!local.indeterminate;
33
- }
34
- });
35
- return (() => {
36
- var _el$ = _tmpl$();
37
- use((el) => inputRef = el, _el$);
38
- spread(_el$, mergeProps(others, {
39
- "type": "checkbox",
40
- get ["data-theme"]() {
41
- return local.dataTheme;
42
- },
43
- get ["class"]() {
44
- return classes();
45
- },
46
- get style() {
47
- return local.style;
48
- }
49
- }), false, false);
50
- return _el$;
51
- })();
52
- };
53
- var Checkbox_default = Checkbox;
54
-
55
- export { Checkbox_default };
@@ -1,56 +0,0 @@
1
- // src/lib/style/classes.ts
2
- function classes(...args) {
3
- return args.flat().filter(Boolean).join(" ");
4
- }
5
- function falsyToString(value) {
6
- return typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
7
- }
8
- function cva(base, config) {
9
- const fn = (props) => {
10
- if (config?.variants == null) return classes(base, props?.class);
11
- const { variants, defaultVariants } = config;
12
- const getVariantClassNames = Object.keys(variants).map((variant) => {
13
- const variantProp = props?.[variant];
14
- const defaultVariantProp = defaultVariants?.[variant];
15
- if (variantProp === null) return null;
16
- const variantKey = falsyToString(variantProp) || falsyToString(
17
- defaultVariantProp
18
- );
19
- return variants[variant]?.[variantKey];
20
- });
21
- const propsWithoutUndefined = Object.entries(props || {}).reduce(
22
- (acc, [key, value]) => {
23
- if (value !== void 0) {
24
- acc[key] = value;
25
- }
26
- return acc;
27
- },
28
- {}
29
- );
30
- const getCompoundVariantClassNames = config?.compoundVariants?.reduce(
31
- (acc, { class: cvClass, ...compoundVariantOptions }) => {
32
- const isMatch = Object.entries(compoundVariantOptions).every(
33
- ([key, value]) => {
34
- const currentValue = {
35
- ...defaultVariants,
36
- ...propsWithoutUndefined
37
- }[key];
38
- return Array.isArray(value) ? value.includes(currentValue) : currentValue === value;
39
- }
40
- );
41
- return isMatch ? [...acc, cvClass] : acc;
42
- },
43
- []
44
- );
45
- return classes(
46
- base,
47
- getVariantClassNames,
48
- getCompoundVariantClassNames,
49
- props?.class
50
- );
51
- };
52
- fn.variantKeys = config?.variants ? Object.keys(config.variants) : [];
53
- return fn;
54
- }
55
-
56
- export { classes, cva };