@pathscale/ui 0.0.1 → 0.0.2

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 (69) hide show
  1. package/dist/Accordion-nwuRbRRw.d.ts +27 -0
  2. package/dist/Checkbox-BjaweaOH.d.ts +40 -0
  3. package/dist/Pagination-BlrjElGg.d.ts +43 -0
  4. package/dist/Progress-a616LgE0.d.ts +5 -0
  5. package/dist/Select-CP-TUHJv.d.ts +44 -0
  6. package/dist/Switch-3IXS_68H.d.ts +72 -0
  7. package/dist/Tabs-BNR3p92D.d.ts +42 -0
  8. package/dist/Tag-BPrhn-Ne.d.ts +42 -0
  9. package/dist/Tooltip-BfPongoz.d.ts +53 -0
  10. package/dist/Upload-BrFuZ4JA.d.ts +39 -0
  11. package/dist/chunk/3IHANYRN.js +98 -0
  12. package/dist/chunk/4TWLQ3IA.js +103 -0
  13. package/dist/chunk/6SBH3KSM.jsx +96 -0
  14. package/dist/chunk/CJZGTNJZ.js +115 -0
  15. package/dist/chunk/DBQ7IOPU.js +189 -0
  16. package/dist/chunk/DNTGSCVF.jsx +100 -0
  17. package/dist/chunk/ELRAUORW.jsx +179 -0
  18. package/dist/chunk/FPUQ25SO.js +137 -0
  19. package/dist/chunk/GLEAR2TS.jsx +160 -0
  20. package/dist/chunk/KV6LTJHI.jsx +175 -0
  21. package/dist/chunk/LI3HCFL7.jsx +132 -0
  22. package/dist/chunk/MMTAND25.jsx +126 -0
  23. package/dist/chunk/MXG3MBEN.jsx +148 -0
  24. package/dist/chunk/NZKPDBTE.js +118 -0
  25. package/dist/chunk/P2L6LFLS.js +144 -0
  26. package/dist/chunk/QLESLIWS.jsx +110 -0
  27. package/dist/chunk/QNOJ6PCD.js +278 -0
  28. package/dist/chunk/QONDPQ2I.jsx +105 -0
  29. package/dist/chunk/S3ZDSQSV.js +98 -0
  30. package/dist/chunk/V6Y5E7BL.js +133 -0
  31. package/dist/chunk/WCBMW2TP.jsx +203 -0
  32. package/dist/chunk/WOT36Q7O.js +166 -0
  33. package/dist/components/Progress/index.d.ts +2 -3
  34. package/dist/components/Progress/index.js +1 -278
  35. package/dist/components/Progress/index.jsx +7 -194
  36. package/dist/components/accordion/index.d.ts +5 -24
  37. package/dist/components/accordion/index.js +1 -118
  38. package/dist/components/accordion/index.jsx +3 -100
  39. package/dist/components/breadcrumb/index.d.ts +2 -2
  40. package/dist/components/breadcrumb/index.js +1 -133
  41. package/dist/components/breadcrumb/index.jsx +4 -120
  42. package/dist/components/checkbox/index.d.ts +5 -37
  43. package/dist/components/checkbox/index.js +1 -137
  44. package/dist/components/checkbox/index.jsx +3 -143
  45. package/dist/components/pagination/index.d.ts +5 -40
  46. package/dist/components/pagination/index.js +1 -189
  47. package/dist/components/pagination/index.jsx +3 -174
  48. package/dist/components/select/index.d.ts +5 -41
  49. package/dist/components/select/index.js +1 -98
  50. package/dist/components/select/index.jsx +3 -91
  51. package/dist/components/switch/index.d.ts +5 -69
  52. package/dist/components/switch/index.js +1 -144
  53. package/dist/components/switch/index.jsx +3 -155
  54. package/dist/components/tabs/index.d.ts +5 -39
  55. package/dist/components/tabs/index.js +1 -166
  56. package/dist/components/tabs/index.jsx +3 -170
  57. package/dist/components/tag/index.d.ts +5 -39
  58. package/dist/components/tag/index.js +1 -115
  59. package/dist/components/tag/index.jsx +3 -127
  60. package/dist/components/tooltip/index.d.ts +5 -50
  61. package/dist/components/tooltip/index.js +1 -103
  62. package/dist/components/tooltip/index.jsx +3 -95
  63. package/dist/components/upload/index.d.ts +5 -36
  64. package/dist/components/upload/index.js +1 -98
  65. package/dist/components/upload/index.jsx +3 -105
  66. package/dist/index.d.ts +11 -0
  67. package/dist/index.js +12 -1
  68. package/dist/index.jsx +47 -1
  69. package/package.json +1 -1
@@ -0,0 +1,203 @@
1
+ import {
2
+ cva
3
+ } from "./P7WPLZNA.jsx";
4
+
5
+ // src/components/Progress/Progress.tsx
6
+ import "solid-js";
7
+
8
+ // src/components/Progress/ProgressValue.tsx
9
+ import "solid-js";
10
+
11
+ // src/components/Progress/ProgressValue.styles.ts
12
+ var progressWrapper = cva("mt-4 w-full max-w-md");
13
+ var progressBar = cva("w-full h-5 relative overflow-hidden rounded-lg bg-gray-200");
14
+ var progressFill = cva("h-full transition-all duration-300", {
15
+ variants: {
16
+ color: {
17
+ danger: "bg-red-500",
18
+ success: "bg-green-500",
19
+ info: "bg-blue-500",
20
+ warning: "bg-yellow-500",
21
+ default: "bg-gray-500"
22
+ }
23
+ },
24
+ defaultVariants: {
25
+ color: "default"
26
+ }
27
+ });
28
+ var progressLabel = cva("mt-2 text-right text-sm text-gray-700");
29
+ var progressVariants = cva(
30
+ [
31
+ "flex items-center justify-center mx-1",
32
+ "font-medium outline-none select-none transition active:transition-none",
33
+ "not-disabled:cursor-pointer",
34
+ "disabled:cursor-not-allowed disabled:opacity-25",
35
+ "aria-busy:cursor-wait"
36
+ ],
37
+ {
38
+ variants: {
39
+ size: {
40
+ sm: "size-8 text-sm",
41
+ md: "size-16 text-base",
42
+ lg: "size-24 text-lg"
43
+ },
44
+ shape: {
45
+ circle: "rounded-full overflow-hidden",
46
+ rounded: "rounded-lg overflow-hidden"
47
+ },
48
+ variant: {
49
+ filled: "text-gray-800",
50
+ outlined: "border-2 border-gray-300 text-gray-800",
51
+ ghost: "text-gray-800"
52
+ }
53
+ },
54
+ defaultVariants: {
55
+ size: "md",
56
+ shape: "rounded",
57
+ variant: "filled"
58
+ }
59
+ }
60
+ );
61
+
62
+ // src/components/Progress/ProgressValue.tsx
63
+ var ProgressValue = (props) => {
64
+ return <div
65
+ class={`${progressWrapper()} ${progressVariants({
66
+ size: props.size,
67
+ shape: props.shape,
68
+ variant: props.variant
69
+ })}`}
70
+ >
71
+ <div class={progressBar()}>
72
+ <div class={progressFill()} style={{ width: `${props.value}%` }} />
73
+ </div>
74
+ <div class={progressLabel()}>{props.value}%</div>
75
+ </div>;
76
+ };
77
+ var ProgressValue_default = ProgressValue;
78
+
79
+ // src/components/Progress/ProgressSizes.tsx
80
+ import "solid-js";
81
+ var Progress = ({
82
+ value,
83
+ size = "md",
84
+ shape = "rounded",
85
+ variant = "filled"
86
+ }) => {
87
+ return <div
88
+ class={`${progressWrapper()} ${progressVariants({
89
+ size,
90
+ shape,
91
+ variant
92
+ })}`}
93
+ >
94
+ <div class={progressBar()}>
95
+ <div class={progressFill()} style={{ width: `${value}%` }} />
96
+ </div>
97
+ <div class={progressLabel()}>{value}%</div>
98
+ </div>;
99
+ };
100
+ var ProgressSizes_default = Progress;
101
+
102
+ // src/components/Progress/ProgressPercent.tsx
103
+ import "solid-js";
104
+ var Progress2 = ({
105
+ value,
106
+ size = "md",
107
+ shape = "rounded",
108
+ variant = "filled",
109
+ showValue = false,
110
+ format = "raw"
111
+ }) => {
112
+ const displayValue = () => {
113
+ return format === "percent" ? `${value}%` : value;
114
+ };
115
+ return <div
116
+ class={`${progressWrapper()} ${progressVariants({
117
+ size,
118
+ shape,
119
+ variant
120
+ })}`}
121
+ >
122
+ <div class={progressBar()}>
123
+ <div class={progressFill()} style={{ width: `${value}%` }} />
124
+ </div>
125
+ {showValue && <div class={progressLabel()}>{displayValue()}</div>}
126
+ </div>;
127
+ };
128
+ var ProgressPercent_default = Progress2;
129
+
130
+ // src/components/Progress/ProgressColors.tsx
131
+ import { Show } from "solid-js";
132
+ var Progress3 = ({
133
+ value,
134
+ size = "md",
135
+ shape = "rounded",
136
+ variant = "filled",
137
+ showValue = false,
138
+ format = "raw",
139
+ color = "default"
140
+ }) => {
141
+ const displayValue = () => format === "percent" && value != null ? `${value}%` : value;
142
+ return <div
143
+ class={`${progressWrapper()} ${progressVariants({
144
+ size,
145
+ shape,
146
+ variant
147
+ })}`}
148
+ >
149
+ <div class={progressBar()}>
150
+ <Show
151
+ when={value != null}
152
+ fallback={<div
153
+ class={`${progressFill({ color })} animate-pulse`}
154
+ style={{ width: "100%" }}
155
+ />}
156
+ >
157
+ <div class={progressFill({ color })} style={{ width: `${value}%` }} />
158
+ </Show>
159
+ </div>
160
+ {showValue && value != null && <div class={progressLabel()}>{displayValue()}</div>}
161
+ </div>;
162
+ };
163
+ var ProgressColors_default = Progress3;
164
+
165
+ // src/components/Progress/Progress.tsx
166
+ var Progress4 = () => {
167
+ return <section>
168
+ <div class="p-4">
169
+ <h1 class="text-2xl font-semibold mb-4">Progress Component Demo</h1>
170
+ <ProgressValue_default value={40} size="sm" shape="circle" variant="filled" />
171
+ <ProgressValue_default
172
+ value={70}
173
+ size="md"
174
+ shape="rounded"
175
+ variant="outlined"
176
+ />
177
+ <ProgressValue_default value={90} size="lg" shape="circle" variant="ghost" />
178
+ </div>
179
+ <div class="mt-4 flex flex-col gap-4">
180
+ <ProgressSizes_default value={20} size="sm" />
181
+ <ProgressSizes_default value={30} size="md" />
182
+ <ProgressSizes_default value={50} size="lg" />
183
+ </div>
184
+ <div class="mt-4">
185
+ <ProgressPercent_default value={80} showValue format="percent" />
186
+ </div>
187
+ <div class="mt-4 flex flex-col gap-4">
188
+ <ProgressColors_default value={40} color="danger" />
189
+ <ProgressColors_default value={60} color="success" />
190
+ <ProgressColors_default value={80} color="info" />
191
+ <ProgressColors_default value={100} color="warning" />
192
+ </div>
193
+ </section>;
194
+ };
195
+ var Progress_default = Progress4;
196
+
197
+ export {
198
+ ProgressValue_default,
199
+ ProgressSizes_default,
200
+ ProgressPercent_default,
201
+ ProgressColors_default,
202
+ Progress_default
203
+ };
@@ -0,0 +1,166 @@
1
+ import { cva } from './HKS7ET6T.js';
2
+ import { delegateEvents, template, spread, insert, createComponent, effect, className } from 'solid-js/web';
3
+ import { splitProps, createSignal, createMemo, For, Show } from 'solid-js';
4
+
5
+ // src/components/tabs/Tabs.styles.ts
6
+ var tabsNavVariants = cva(
7
+ "flex text-sm font-medium text-gray-600 dark:text-gray-300",
8
+ {
9
+ variants: {
10
+ type: {
11
+ basic: "",
12
+ boxed: "flex gap-2",
13
+ toggle: "inline-flex rounded-md p-1",
14
+ "toggle-rounded": "inline-flex rounded-full p-1"
15
+ },
16
+ size: {
17
+ sm: "text-xs gap-1",
18
+ md: "text-sm gap-2",
19
+ lg: "text-base gap-3"
20
+ },
21
+ alignment: {
22
+ left: "justify-start",
23
+ center: "justify-center",
24
+ right: "justify-end"
25
+ },
26
+ expanded: {
27
+ true: "w-full",
28
+ false: ""
29
+ }
30
+ },
31
+ defaultVariants: {
32
+ type: "basic",
33
+ size: "md",
34
+ alignment: "left",
35
+ expanded: false
36
+ }
37
+ }
38
+ );
39
+ var tabTriggerVariants = cva(
40
+ "inline-flex items-center justify-center whitespace-nowrap font-medium text-sm transition-colors",
41
+ {
42
+ variants: {
43
+ size: {
44
+ sm: "text-xs px-2 py-1",
45
+ md: "text-sm px-3 py-2",
46
+ lg: "text-base px-4 py-3"
47
+ },
48
+ type: {
49
+ basic: "border-b-2 transition-colors hover:text-blue-600",
50
+ boxed: "rounded-t px-4 py-2 hover:text-blue-600",
51
+ toggle: "border -ml-px px-4 py-2 transition-colors first:ml-0 first:rounded-l-md last:rounded-r-md",
52
+ "toggle-rounded": "border -ml-px first:ml-0 first:rounded-l-full last:rounded-r-full transition-colors"
53
+ },
54
+ active: {
55
+ true: "",
56
+ false: ""
57
+ },
58
+ disabled: {
59
+ true: "opacity-50 cursor-not-allowed pointer-events-none",
60
+ false: ""
61
+ }
62
+ },
63
+ compoundVariants: [
64
+ {
65
+ type: "basic",
66
+ active: true,
67
+ class: "border-blue-600 text-blue-600"
68
+ },
69
+ {
70
+ type: "basic",
71
+ active: false,
72
+ class: "border-transparent text-gray-500 dark:text-gray-400"
73
+ },
74
+ {
75
+ type: "boxed",
76
+ active: true,
77
+ class: "border-x border-t border-b-0 border-gray-400 dark:border-gray-600 text-blue-600"
78
+ },
79
+ {
80
+ type: "boxed",
81
+ active: false,
82
+ class: "border-b border-transparent text-gray-500 dark:text-gray-400 hover:text-blue-600"
83
+ },
84
+ {
85
+ type: "toggle",
86
+ active: true,
87
+ class: "bg-blue-600 text-white border-blue-600"
88
+ },
89
+ {
90
+ type: "toggle",
91
+ active: false,
92
+ class: "bg-transparent text-gray-600 dark:text-gray-300 border-gray-300 dark:border-gray-600"
93
+ },
94
+ {
95
+ type: "toggle-rounded",
96
+ active: true,
97
+ class: "bg-blue-600 text-white border-blue-600"
98
+ },
99
+ {
100
+ type: "toggle-rounded",
101
+ active: false,
102
+ class: "bg-transparent text-gray-600 dark:text-gray-300 border-gray-300 dark:border-gray-600"
103
+ }
104
+ ],
105
+ defaultVariants: {
106
+ active: false,
107
+ disabled: false
108
+ }
109
+ }
110
+ );
111
+
112
+ // src/components/tabs/Tabs.tsx
113
+ var _tmpl$ = /* @__PURE__ */ template(`<div><nav><ul class="flex gap-0"></ul></nav><div class=pt-4>`);
114
+ var _tmpl$2 = /* @__PURE__ */ template(`<li><button>`);
115
+ var Tabs = (props) => {
116
+ const [local, variantProps, otherProps] = splitProps(props, ["items", "value", "onChange"], ["size", "type", "alignment", "expanded"]);
117
+ const [internalActive, setInternalActive] = createSignal(local.value ?? 0);
118
+ const isControlled = () => local.value !== void 0;
119
+ const active = createMemo(() => isControlled() ? local.value : internalActive());
120
+ const handleChange = (i) => {
121
+ const item = local.items[i];
122
+ if (!item || item.disabled) return;
123
+ if (!isControlled()) {
124
+ setInternalActive(i);
125
+ }
126
+ local.onChange?.(i);
127
+ };
128
+ return (() => {
129
+ var _el$ = _tmpl$(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$2.nextSibling;
130
+ spread(_el$, otherProps, false, true);
131
+ insert(_el$3, createComponent(For, {
132
+ get each() {
133
+ return local.items;
134
+ },
135
+ children: (tab, i) => (() => {
136
+ var _el$5 = _tmpl$2(), _el$6 = _el$5.firstChild;
137
+ _el$6.$$click = () => handleChange(i());
138
+ insert(_el$6, () => tab.label);
139
+ effect(() => className(_el$6, tabTriggerVariants({
140
+ type: variantProps.type ?? "basic",
141
+ size: variantProps.size ?? "md",
142
+ active: i() === active(),
143
+ disabled: tab.disabled
144
+ })));
145
+ return _el$5;
146
+ })()
147
+ }));
148
+ insert(_el$4, createComponent(Show, {
149
+ get when() {
150
+ return local.items[active()];
151
+ },
152
+ get children() {
153
+ return local.items[active()]?.content;
154
+ }
155
+ }));
156
+ effect(() => className(_el$2, tabsNavVariants(variantProps)));
157
+ return _el$;
158
+ })();
159
+ };
160
+ var Tabs_default = Tabs;
161
+ delegateEvents(["click"]);
162
+
163
+ // src/components/tabs/index.ts
164
+ var tabs_default = Tabs_default;
165
+
166
+ export { tabs_default };
@@ -1,7 +1,6 @@
1
+ export { P as default } from '../../Progress-a616LgE0.js';
1
2
  import { Component } from 'solid-js';
2
3
 
3
- declare const Progress$3: Component;
4
-
5
4
  interface ProgressValueProps {
6
5
  value: number;
7
6
  size?: "sm" | "md" | "lg";
@@ -39,4 +38,4 @@ interface ProgressProps {
39
38
  }
40
39
  declare const Progress: Component<ProgressProps>;
41
40
 
42
- export { Progress as ProgressColors, type ProgressProps as ProgressColorsProps, Progress$1 as ProgressPercent, type ProgressProps$1 as ProgressPercentProps, Progress$2 as ProgressSizes, type ProgressProps$2 as ProgressSizesProps, ProgressValue, type ProgressValueProps, Progress$3 as default };
41
+ export { Progress as ProgressColors, type ProgressProps as ProgressColorsProps, Progress$1 as ProgressPercent, type ProgressProps$1 as ProgressPercentProps, Progress$2 as ProgressSizes, type ProgressProps$2 as ProgressSizesProps, ProgressValue, type ProgressValueProps };
@@ -1,278 +1 @@
1
- import { cva } from '../../chunk/HKS7ET6T.js';
2
- import { template, insert, effect, className, createComponent } from 'solid-js/web';
3
- import { Show } from 'solid-js';
4
-
5
- // src/components/Progress/ProgressValue.styles.ts
6
- var progressWrapper = cva("mt-4 w-full max-w-md");
7
- var progressBar = cva("w-full h-5 relative overflow-hidden rounded-lg bg-gray-200");
8
- var progressFill = cva("h-full transition-all duration-300", {
9
- variants: {
10
- color: {
11
- danger: "bg-red-500",
12
- success: "bg-green-500",
13
- info: "bg-blue-500",
14
- warning: "bg-yellow-500",
15
- default: "bg-gray-500"
16
- }
17
- },
18
- defaultVariants: {
19
- color: "default"
20
- }
21
- });
22
- var progressLabel = cva("mt-2 text-right text-sm text-gray-700");
23
- var progressVariants = cva(
24
- [
25
- "flex items-center justify-center mx-1",
26
- "font-medium outline-none select-none transition active:transition-none",
27
- "not-disabled:cursor-pointer",
28
- "disabled:cursor-not-allowed disabled:opacity-25",
29
- "aria-busy:cursor-wait"
30
- ],
31
- {
32
- variants: {
33
- size: {
34
- sm: "size-8 text-sm",
35
- md: "size-16 text-base",
36
- lg: "size-24 text-lg"
37
- },
38
- shape: {
39
- circle: "rounded-full overflow-hidden",
40
- rounded: "rounded-lg overflow-hidden"
41
- },
42
- variant: {
43
- filled: "text-gray-800",
44
- outlined: "border-2 border-gray-300 text-gray-800",
45
- ghost: "text-gray-800"
46
- }
47
- },
48
- defaultVariants: {
49
- size: "md",
50
- shape: "rounded",
51
- variant: "filled"
52
- }
53
- }
54
- );
55
-
56
- // src/components/Progress/ProgressValue.tsx
57
- var _tmpl$ = /* @__PURE__ */ template(`<div><div><div></div></div><div>%`);
58
- var ProgressValue = (props) => {
59
- return (() => {
60
- var _el$ = _tmpl$(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$2.nextSibling, _el$5 = _el$4.firstChild;
61
- insert(_el$4, () => props.value, _el$5);
62
- effect((_p$) => {
63
- var _v$ = `${progressWrapper()} ${progressVariants({
64
- size: props.size,
65
- shape: props.shape,
66
- variant: props.variant
67
- })}`, _v$2 = progressBar(), _v$3 = progressFill(), _v$4 = `${props.value}%`, _v$5 = progressLabel();
68
- _v$ !== _p$.e && className(_el$, _p$.e = _v$);
69
- _v$2 !== _p$.t && className(_el$2, _p$.t = _v$2);
70
- _v$3 !== _p$.a && className(_el$3, _p$.a = _v$3);
71
- _v$4 !== _p$.o && ((_p$.o = _v$4) != null ? _el$3.style.setProperty("width", _v$4) : _el$3.style.removeProperty("width"));
72
- _v$5 !== _p$.i && className(_el$4, _p$.i = _v$5);
73
- return _p$;
74
- }, {
75
- e: void 0,
76
- t: void 0,
77
- a: void 0,
78
- o: void 0,
79
- i: void 0
80
- });
81
- return _el$;
82
- })();
83
- };
84
- var ProgressValue_default = ProgressValue;
85
- var _tmpl$2 = /* @__PURE__ */ template(`<div><div><div></div></div><div>%`);
86
- var Progress = ({
87
- value,
88
- size = "md",
89
- shape = "rounded",
90
- variant = "filled"
91
- }) => {
92
- return (() => {
93
- var _el$ = _tmpl$2(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$2.nextSibling, _el$5 = _el$4.firstChild;
94
- `${value}%` != null ? _el$3.style.setProperty("width", `${value}%`) : _el$3.style.removeProperty("width");
95
- insert(_el$4, value, _el$5);
96
- effect((_p$) => {
97
- var _v$ = `${progressWrapper()} ${progressVariants({
98
- size,
99
- shape,
100
- variant
101
- })}`, _v$2 = progressBar(), _v$3 = progressFill(), _v$4 = progressLabel();
102
- _v$ !== _p$.e && className(_el$, _p$.e = _v$);
103
- _v$2 !== _p$.t && className(_el$2, _p$.t = _v$2);
104
- _v$3 !== _p$.a && className(_el$3, _p$.a = _v$3);
105
- _v$4 !== _p$.o && className(_el$4, _p$.o = _v$4);
106
- return _p$;
107
- }, {
108
- e: void 0,
109
- t: void 0,
110
- a: void 0,
111
- o: void 0
112
- });
113
- return _el$;
114
- })();
115
- };
116
- var ProgressSizes_default = Progress;
117
- var _tmpl$3 = /* @__PURE__ */ template(`<div><div><div>`);
118
- var _tmpl$22 = /* @__PURE__ */ template(`<div>`);
119
- var Progress2 = ({
120
- value,
121
- size = "md",
122
- shape = "rounded",
123
- variant = "filled",
124
- showValue = false,
125
- format = "raw"
126
- }) => {
127
- const displayValue = () => {
128
- return format === "percent" ? `${value}%` : value;
129
- };
130
- return (() => {
131
- var _el$ = _tmpl$3(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
132
- `${value}%` != null ? _el$3.style.setProperty("width", `${value}%`) : _el$3.style.removeProperty("width");
133
- insert(_el$, showValue && (() => {
134
- var _el$4 = _tmpl$22();
135
- insert(_el$4, displayValue);
136
- effect(() => className(_el$4, progressLabel()));
137
- return _el$4;
138
- })(), null);
139
- effect((_p$) => {
140
- var _v$ = `${progressWrapper()} ${progressVariants({
141
- size,
142
- shape,
143
- variant
144
- })}`, _v$2 = progressBar(), _v$3 = progressFill();
145
- _v$ !== _p$.e && className(_el$, _p$.e = _v$);
146
- _v$2 !== _p$.t && className(_el$2, _p$.t = _v$2);
147
- _v$3 !== _p$.a && className(_el$3, _p$.a = _v$3);
148
- return _p$;
149
- }, {
150
- e: void 0,
151
- t: void 0,
152
- a: void 0
153
- });
154
- return _el$;
155
- })();
156
- };
157
- var ProgressPercent_default = Progress2;
158
- var _tmpl$4 = /* @__PURE__ */ template(`<div>`);
159
- var _tmpl$23 = /* @__PURE__ */ template(`<div><div>`);
160
- var Progress3 = ({
161
- value,
162
- size = "md",
163
- shape = "rounded",
164
- variant = "filled",
165
- showValue = false,
166
- format = "raw",
167
- color = "default"
168
- }) => {
169
- const displayValue = () => format === "percent" && value != null ? `${value}%` : value;
170
- return (() => {
171
- var _el$ = _tmpl$23(), _el$2 = _el$.firstChild;
172
- insert(_el$2, createComponent(Show, {
173
- when: value != null,
174
- get fallback() {
175
- return (() => {
176
- var _el$4 = _tmpl$4();
177
- _el$4.style.setProperty("width", "100%");
178
- effect(() => className(_el$4, `${progressFill({
179
- color
180
- })} animate-pulse`));
181
- return _el$4;
182
- })();
183
- },
184
- get children() {
185
- var _el$3 = _tmpl$4();
186
- `${value}%` != null ? _el$3.style.setProperty("width", `${value}%`) : _el$3.style.removeProperty("width");
187
- effect(() => className(_el$3, progressFill({
188
- color
189
- })));
190
- return _el$3;
191
- }
192
- }));
193
- insert(_el$, showValue && value != null && (() => {
194
- var _el$5 = _tmpl$4();
195
- insert(_el$5, displayValue);
196
- effect(() => className(_el$5, progressLabel()));
197
- return _el$5;
198
- })(), null);
199
- effect((_p$) => {
200
- var _v$ = `${progressWrapper()} ${progressVariants({
201
- size,
202
- shape,
203
- variant
204
- })}`, _v$2 = progressBar();
205
- _v$ !== _p$.e && className(_el$, _p$.e = _v$);
206
- _v$2 !== _p$.t && className(_el$2, _p$.t = _v$2);
207
- return _p$;
208
- }, {
209
- e: void 0,
210
- t: void 0
211
- });
212
- return _el$;
213
- })();
214
- };
215
- var ProgressColors_default = Progress3;
216
-
217
- // src/components/Progress/Progress.tsx
218
- var _tmpl$5 = /* @__PURE__ */ template(`<section><div class=p-4><h1 class="text-2xl font-semibold mb-4">Progress Component Demo</h1></div><div class="mt-4 flex flex-col gap-4"></div><div class=mt-4></div><div class="mt-4 flex flex-col gap-4">`);
219
- var Progress4 = () => {
220
- return (() => {
221
- var _el$ = _tmpl$5(), _el$2 = _el$.firstChild, _el$4 = _el$2.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling;
222
- insert(_el$2, createComponent(ProgressValue_default, {
223
- value: 40,
224
- size: "sm",
225
- shape: "circle",
226
- variant: "filled"
227
- }), null);
228
- insert(_el$2, createComponent(ProgressValue_default, {
229
- value: 70,
230
- size: "md",
231
- shape: "rounded",
232
- variant: "outlined"
233
- }), null);
234
- insert(_el$2, createComponent(ProgressValue_default, {
235
- value: 90,
236
- size: "lg",
237
- shape: "circle",
238
- variant: "ghost"
239
- }), null);
240
- insert(_el$4, createComponent(ProgressSizes_default, {
241
- value: 20,
242
- size: "sm"
243
- }), null);
244
- insert(_el$4, createComponent(ProgressSizes_default, {
245
- value: 30,
246
- size: "md"
247
- }), null);
248
- insert(_el$4, createComponent(ProgressSizes_default, {
249
- value: 50,
250
- size: "lg"
251
- }), null);
252
- insert(_el$5, createComponent(ProgressPercent_default, {
253
- value: 80,
254
- showValue: true,
255
- format: "percent"
256
- }));
257
- insert(_el$6, createComponent(ProgressColors_default, {
258
- value: 40,
259
- color: "danger"
260
- }), null);
261
- insert(_el$6, createComponent(ProgressColors_default, {
262
- value: 60,
263
- color: "success"
264
- }), null);
265
- insert(_el$6, createComponent(ProgressColors_default, {
266
- value: 80,
267
- color: "info"
268
- }), null);
269
- insert(_el$6, createComponent(ProgressColors_default, {
270
- value: 100,
271
- color: "warning"
272
- }), null);
273
- return _el$;
274
- })();
275
- };
276
- var Progress_default = Progress4;
277
-
278
- export { ProgressColors_default as ProgressColors, ProgressPercent_default as ProgressPercent, ProgressSizes_default as ProgressSizes, ProgressValue_default as ProgressValue, Progress_default as default };
1
+ export { ProgressColors_default as ProgressColors, ProgressPercent_default as ProgressPercent, ProgressSizes_default as ProgressSizes, ProgressValue_default as ProgressValue, Progress_default as default } from '../../chunk/QNOJ6PCD.js';