@pathscale/ui 0.0.1 → 0.0.3

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 (131) hide show
  1. package/dist/Accordion-JZGWxBMK.d.ts +27 -0
  2. package/dist/Autocomplete-gLkjMHrc.d.ts +28 -0
  3. package/dist/Checkbox-BjaweaOH.d.ts +40 -0
  4. package/dist/Field-DfUn85_1.d.ts +49 -0
  5. package/dist/{Input-BQbTzjIO.d.ts → Input-C1bm4HGf.d.ts} +1 -1
  6. package/dist/Pagination-CJtlFMHy.d.ts +43 -0
  7. package/dist/Progress-gN0xqhAF.d.ts +64 -0
  8. package/dist/Select-CWCDBvec.d.ts +44 -0
  9. package/dist/Steps-1miUeyCD.d.ts +34 -0
  10. package/dist/Switch-BiKX7HZ2.d.ts +72 -0
  11. package/dist/Table-CGa6Nop3.d.ts +39 -0
  12. package/dist/Tabs-BEnRV6GG.d.ts +42 -0
  13. package/dist/Tag-BPrhn-Ne.d.ts +42 -0
  14. package/dist/Timeline-Bd4SxHMT.d.ts +14 -0
  15. package/dist/Tooltip-BfPongoz.d.ts +53 -0
  16. package/dist/Upload-BrFuZ4JA.d.ts +39 -0
  17. package/dist/chunk/3IHANYRN.js +98 -0
  18. package/dist/chunk/3VOILEMN.js +187 -0
  19. package/dist/chunk/4TWLQ3IA.js +103 -0
  20. package/dist/chunk/6SBH3KSM.jsx +96 -0
  21. package/dist/chunk/7ROVLN3J.js +175 -0
  22. package/dist/chunk/BBDVIXAH.jsx +194 -0
  23. package/dist/chunk/{4RCWSX7S.jsx → C4745OZS.jsx} +7 -7
  24. package/dist/chunk/C4YO33NN.jsx +179 -0
  25. package/dist/chunk/CJZGTNJZ.js +115 -0
  26. package/dist/chunk/D2BEL4SM.jsx +169 -0
  27. package/dist/chunk/DBQ7IOPU.js +189 -0
  28. package/dist/chunk/DNTGSCVF.jsx +100 -0
  29. package/dist/chunk/DSTUGZW6.jsx +81 -0
  30. package/dist/chunk/ELRAUORW.jsx +179 -0
  31. package/dist/chunk/FKSQPGOD.jsx +170 -0
  32. package/dist/chunk/FPUQ25SO.js +137 -0
  33. package/dist/chunk/GLEAR2TS.jsx +160 -0
  34. package/dist/chunk/GMIXRYN3.js +138 -0
  35. package/dist/chunk/HWAGW5N4.jsx +118 -0
  36. package/dist/chunk/JWRGKHDO.js +172 -0
  37. package/dist/chunk/KV6LTJHI.jsx +175 -0
  38. package/dist/chunk/LAQPAV5I.jsx +187 -0
  39. package/dist/chunk/LI3HCFL7.jsx +132 -0
  40. package/dist/chunk/MAX47D6F.js +99 -0
  41. package/dist/chunk/{2JGZSAW5.js → MI773TMC.js} +6 -6
  42. package/dist/chunk/MMTAND25.jsx +126 -0
  43. package/dist/chunk/MXG3MBEN.jsx +148 -0
  44. package/dist/chunk/MYERRMTM.js +200 -0
  45. package/dist/chunk/NZKPDBTE.js +118 -0
  46. package/dist/chunk/OSJ3P7PI.js +189 -0
  47. package/dist/chunk/P2L6LFLS.js +144 -0
  48. package/dist/chunk/QLESLIWS.jsx +110 -0
  49. package/dist/chunk/QONDPQ2I.jsx +105 -0
  50. package/dist/chunk/QYEMOKUG.js +125 -0
  51. package/dist/chunk/S3ZDSQSV.js +98 -0
  52. package/dist/chunk/SCJSBRV2.jsx +39 -0
  53. package/dist/chunk/STKRVQR6.jsx +130 -0
  54. package/dist/chunk/{NZZRKP74.js → TFLJI242.js} +1 -25
  55. package/dist/chunk/TT2JYGLU.js +218 -0
  56. package/dist/chunk/V6Y5E7BL.js +133 -0
  57. package/dist/chunk/VN5BKHA2.jsx +97 -0
  58. package/dist/chunk/WOT36Q7O.js +166 -0
  59. package/dist/chunk/WUZETUQR.js +92 -0
  60. package/dist/chunk/XD34JKSU.jsx +201 -0
  61. package/dist/chunk/{GA2HCFRS.jsx → YAQK2KFY.jsx} +1 -35
  62. package/dist/chunk/YMO6RPS6.js +26 -0
  63. package/dist/components/Progress/index.d.ts +4 -39
  64. package/dist/components/Progress/index.js +1 -278
  65. package/dist/components/Progress/index.jsx +4 -199
  66. package/dist/components/accordion/index.d.ts +5 -24
  67. package/dist/components/accordion/index.js +1 -118
  68. package/dist/components/accordion/index.jsx +3 -100
  69. package/dist/components/autocomplete/index.d.ts +8 -0
  70. package/dist/components/autocomplete/index.js +1 -0
  71. package/dist/components/autocomplete/index.jsx +7 -0
  72. package/dist/components/avatar/index.js +1 -1
  73. package/dist/components/avatar/index.jsx +3 -3
  74. package/dist/components/breadcrumb/index.d.ts +2 -2
  75. package/dist/components/breadcrumb/index.js +1 -133
  76. package/dist/components/breadcrumb/index.jsx +4 -120
  77. package/dist/components/button/index.js +1 -1
  78. package/dist/components/button/index.jsx +2 -1
  79. package/dist/components/checkbox/index.d.ts +5 -37
  80. package/dist/components/checkbox/index.js +1 -137
  81. package/dist/components/checkbox/index.jsx +3 -143
  82. package/dist/components/dropdown/index.d.ts +43 -0
  83. package/dist/components/dropdown/index.js +1 -0
  84. package/dist/components/dropdown/index.jsx +12 -0
  85. package/dist/components/field/index.d.ts +7 -0
  86. package/dist/components/field/index.js +1 -0
  87. package/dist/components/field/index.jsx +7 -0
  88. package/dist/components/input/index.d.ts +2 -2
  89. package/dist/components/menu/index.d.ts +66 -0
  90. package/dist/components/menu/index.js +1 -0
  91. package/dist/components/menu/index.jsx +11 -0
  92. package/dist/components/navbar/index.d.ts +74 -0
  93. package/dist/components/navbar/index.js +1 -0
  94. package/dist/components/navbar/index.jsx +11 -0
  95. package/dist/components/pagination/index.d.ts +5 -40
  96. package/dist/components/pagination/index.js +1 -189
  97. package/dist/components/pagination/index.jsx +3 -174
  98. package/dist/components/select/index.d.ts +5 -41
  99. package/dist/components/select/index.js +1 -98
  100. package/dist/components/select/index.jsx +3 -91
  101. package/dist/components/steps/index.d.ts +8 -0
  102. package/dist/components/steps/index.js +1 -0
  103. package/dist/components/steps/index.jsx +7 -0
  104. package/dist/components/switch/index.d.ts +5 -69
  105. package/dist/components/switch/index.js +1 -144
  106. package/dist/components/switch/index.jsx +3 -155
  107. package/dist/components/table/index.d.ts +8 -0
  108. package/dist/components/table/index.js +1 -0
  109. package/dist/components/table/index.jsx +7 -0
  110. package/dist/components/tabs/index.d.ts +5 -39
  111. package/dist/components/tabs/index.js +1 -166
  112. package/dist/components/tabs/index.jsx +3 -170
  113. package/dist/components/tag/index.d.ts +5 -39
  114. package/dist/components/tag/index.js +1 -115
  115. package/dist/components/tag/index.jsx +3 -127
  116. package/dist/components/timeline/index.d.ts +7 -0
  117. package/dist/components/timeline/index.js +1 -0
  118. package/dist/components/timeline/index.jsx +7 -0
  119. package/dist/components/toast/index.d.ts +24 -0
  120. package/dist/components/toast/index.js +1 -0
  121. package/dist/components/toast/index.jsx +11 -0
  122. package/dist/components/tooltip/index.d.ts +5 -50
  123. package/dist/components/tooltip/index.js +1 -103
  124. package/dist/components/tooltip/index.jsx +3 -95
  125. package/dist/components/upload/index.d.ts +5 -36
  126. package/dist/components/upload/index.js +1 -98
  127. package/dist/components/upload/index.jsx +3 -105
  128. package/dist/index.d.ts +22 -2
  129. package/dist/index.js +23 -2
  130. package/dist/index.jsx +108 -8
  131. package/package.json +1 -1
@@ -0,0 +1,201 @@
1
+ import {
2
+ classes,
3
+ cva
4
+ } from "./P7WPLZNA.jsx";
5
+
6
+ // src/components/menu/Menu.tsx
7
+ import {
8
+ splitProps
9
+ } from "solid-js";
10
+
11
+ // src/components/menu/Menu.styles.ts
12
+ var menuWrapper = cva("bg-white border border-gray-200 rounded shadow", {
13
+ variants: {
14
+ inline: {
15
+ true: "flex space-x-4",
16
+ false: "block"
17
+ }
18
+ },
19
+ defaultVariants: {
20
+ inline: false
21
+ }
22
+ });
23
+ var listWrapper = cva("px-4 py-2", {
24
+ variants: {
25
+ label: {
26
+ true: "pt-6",
27
+ false: ""
28
+ }
29
+ },
30
+ defaultVariants: {
31
+ label: false
32
+ }
33
+ });
34
+ var itemVariants = cva(
35
+ "px-4 py-2 cursor-pointer select-none transition-colors",
36
+ {
37
+ variants: {
38
+ active: {
39
+ true: "bg-blue-100 font-semibold",
40
+ false: "hover:bg-blue-500"
41
+ },
42
+ expanded: {
43
+ true: "bg-gray-50 text-black",
44
+ false: ""
45
+ },
46
+ disabled: {
47
+ true: "opacity-50 cursor-not-allowed text-gray-700",
48
+ false: ""
49
+ }
50
+ },
51
+ compoundVariants: [
52
+ {
53
+ active: true,
54
+ expanded: true,
55
+ class: "bg-blue-200"
56
+ }
57
+ ],
58
+ defaultVariants: {
59
+ active: false,
60
+ expanded: false,
61
+ disabled: false
62
+ }
63
+ }
64
+ );
65
+ var itemDetailWrapper = cva(
66
+ "ml-4 border-l border-gray-200 mt-1 pl-2"
67
+ );
68
+
69
+ // src/components/menu/Menu.tsx
70
+ var Menu = (props) => {
71
+ const [local, variantProps, otherProps] = splitProps(
72
+ props,
73
+ ["class", "className", "children", "inline"],
74
+ Object.keys(menuWrapper.variantKeys ?? {})
75
+ );
76
+ return <div
77
+ class={classes(
78
+ menuWrapper({ inline: !!variantProps.inline }),
79
+ local.class,
80
+ local.className
81
+ )}
82
+ {...otherProps}
83
+ >
84
+ {local.children}
85
+ </div>;
86
+ };
87
+ var Menu_default = Menu;
88
+
89
+ // src/components/menu/MenuList.tsx
90
+ import {
91
+ splitProps as splitProps2,
92
+ Show
93
+ } from "solid-js";
94
+ var MenuList = (props) => {
95
+ const [local, variantProps, otherProps] = splitProps2(
96
+ props,
97
+ ["class", "children", "label"],
98
+ Object.keys(listWrapper.variantKeys ?? {})
99
+ );
100
+ return <div
101
+ class={classes(
102
+ listWrapper({ label: !!local.label }),
103
+ local.class
104
+ )}
105
+ {...otherProps}
106
+ >
107
+ <Show when={local.label}>
108
+ <div class="px-4 pb-2 font-medium text-gray-700">{local.label}</div>
109
+ </Show>
110
+ <div class="flex flex-col">{local.children}</div>
111
+ </div>;
112
+ };
113
+ var MenuList_default = MenuList;
114
+
115
+ // src/components/menu/MenuItem.tsx
116
+ import {
117
+ splitProps as splitProps3,
118
+ Show as Show2,
119
+ createSignal,
120
+ createMemo
121
+ } from "solid-js";
122
+ import { Dynamic } from "solid-js/web";
123
+ var MenuItem = (props) => {
124
+ const [local, variantProps, rest] = splitProps3(
125
+ props,
126
+ [
127
+ "class",
128
+ "className",
129
+ "label",
130
+ "active",
131
+ "expanded",
132
+ "disabled",
133
+ "tag",
134
+ "to",
135
+ "target",
136
+ "children"
137
+ ],
138
+ Object.keys(itemVariants.variantKeys ?? {})
139
+ );
140
+ const hasChildren = createMemo(() => !!local.children);
141
+ const isControlled = createMemo(() => local.expanded !== void 0);
142
+ const [internalExpanded, setInternalExpanded] = createSignal(false);
143
+ const isExpanded = createMemo(
144
+ () => isControlled() ? !!local.expanded : internalExpanded()
145
+ );
146
+ const toggleExpand = () => {
147
+ if (!isControlled() && hasChildren() && !local.disabled) {
148
+ setInternalExpanded((prev) => !prev);
149
+ }
150
+ };
151
+ const onKeyDown = (e) => {
152
+ if (local.disabled) return;
153
+ if (e.key === "Enter" || e.key === " ") {
154
+ e.preventDefault();
155
+ toggleExpand();
156
+ }
157
+ };
158
+ const tagName = local.to ? "a" : local.tag ?? "div";
159
+ const focusableProps = !local.to && !local.disabled ? { tabIndex: 0 } : {};
160
+ return <Dynamic
161
+ component={tagName}
162
+ class={classes(local.class, local.className, "w-full")}
163
+ href={local.to}
164
+ target={local.target}
165
+ aria-disabled={local.disabled}
166
+ onClick={toggleExpand}
167
+ onKeyDown={onKeyDown}
168
+ {...focusableProps}
169
+ {...rest}
170
+ >
171
+ <div
172
+ class={itemVariants({
173
+ active: !!local.active,
174
+ expanded: isExpanded(),
175
+ disabled: !!local.disabled
176
+ })}
177
+ >
178
+ <div class="flex items-center justify-between">
179
+ <span>{local.label}</span>
180
+ <Show2 when={hasChildren()}>
181
+ <span class="ml-2 text-gray-500">
182
+ {isExpanded() ? "\u25BE" : "\u25B8"}
183
+ </span>
184
+ </Show2>
185
+ </div>
186
+ </div>
187
+
188
+ <Show2 when={isExpanded()}>
189
+ <div class={itemDetailWrapper()}>
190
+ {local.children}
191
+ </div>
192
+ </Show2>
193
+ </Dynamic>;
194
+ };
195
+ var MenuItem_default = MenuItem;
196
+
197
+ export {
198
+ Menu_default,
199
+ MenuList_default,
200
+ MenuItem_default
201
+ };
@@ -1,17 +1,7 @@
1
- import {
2
- PolymorphicButton_default
3
- } from "./KACNXPUM.jsx";
4
1
  import {
5
2
  cva
6
3
  } from "./P7WPLZNA.jsx";
7
4
 
8
- // src/components/button/Button.tsx
9
- import {
10
- mergeProps,
11
- splitProps,
12
- createMemo
13
- } from "solid-js";
14
-
15
5
  // src/components/button/Button.styles.ts
16
6
  var buttonVariants = cva(
17
7
  [
@@ -199,30 +189,6 @@ var buttonVariants = cva(
199
189
  }
200
190
  );
201
191
 
202
- // src/components/button/Button.tsx
203
- var Button = (props) => {
204
- const defaultedProps = mergeProps(
205
- {
206
- color: "primary"
207
- },
208
- props
209
- );
210
- const [variantProps, otherProps] = splitProps(defaultedProps, [
211
- "class",
212
- ...buttonVariants.variantKeys
213
- ]);
214
- const classes = createMemo(() => buttonVariants(variantProps));
215
- return <PolymorphicButton_default
216
- class={classes()}
217
- aria-busy={variantProps.loading ? "true" : void 0}
218
- {...otherProps}
219
- />;
220
- };
221
- var Button_default = Button;
222
-
223
- // src/components/button/index.ts
224
- var button_default = Button_default;
225
-
226
192
  export {
227
- button_default
193
+ buttonVariants
228
194
  };
@@ -0,0 +1,26 @@
1
+ import { buttonVariants } from './TFLJI242.js';
2
+ import { PolymorphicButton_default } from './G6RG4LR7.js';
3
+ import { createComponent, mergeProps as mergeProps$1 } from 'solid-js/web';
4
+ import { mergeProps, splitProps, createMemo } from 'solid-js';
5
+
6
+ var Button = (props) => {
7
+ const defaultedProps = mergeProps({
8
+ color: "primary"
9
+ }, props);
10
+ const [variantProps, otherProps] = splitProps(defaultedProps, ["class", ...buttonVariants.variantKeys]);
11
+ const classes = createMemo(() => buttonVariants(variantProps));
12
+ return createComponent(PolymorphicButton_default, mergeProps$1({
13
+ get ["class"]() {
14
+ return classes();
15
+ },
16
+ get ["aria-busy"]() {
17
+ return variantProps.loading ? "true" : void 0;
18
+ }
19
+ }, otherProps));
20
+ };
21
+ var Button_default = Button;
22
+
23
+ // src/components/button/index.ts
24
+ var button_default = Button_default;
25
+
26
+ export { button_default };
@@ -1,42 +1,7 @@
1
- import { Component } from 'solid-js';
1
+ import { P as Progress } from '../../Progress-gN0xqhAF.js';
2
+ import 'solid-js';
3
+ import '../../classes-B_S9K-9I.js';
2
4
 
3
- declare const Progress$3: Component;
4
5
 
5
- interface ProgressValueProps {
6
- value: number;
7
- size?: "sm" | "md" | "lg";
8
- shape?: "circle" | "rounded";
9
- variant?: "filled" | "outlined" | "ghost";
10
- }
11
- declare const ProgressValue: Component<ProgressValueProps>;
12
6
 
13
- interface ProgressProps$2 {
14
- value: number;
15
- size?: "sm" | "md" | "lg";
16
- shape?: "circle" | "rounded";
17
- variant?: "filled" | "outlined" | "ghost";
18
- }
19
- declare const Progress$2: Component<ProgressProps$2>;
20
-
21
- interface ProgressProps$1 {
22
- value: number;
23
- size?: "sm" | "md" | "lg";
24
- shape?: "circle" | "rounded";
25
- variant?: "filled" | "outlined" | "ghost";
26
- showValue?: boolean;
27
- format?: "percent" | "raw";
28
- }
29
- declare const Progress$1: Component<ProgressProps$1>;
30
-
31
- interface ProgressProps {
32
- value: number | null;
33
- size?: "sm" | "md" | "lg";
34
- shape?: "circle" | "rounded";
35
- variant?: "filled" | "outlined" | "ghost";
36
- showValue?: boolean;
37
- format?: "percent" | "raw";
38
- color?: "danger" | "success" | "info" | "warning" | "default";
39
- }
40
- declare const Progress: Component<ProgressProps>;
41
-
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 };
7
+ export { Progress as default };
@@ -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 { progress_default as default } from '../../chunk/GMIXRYN3.js';