@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,74 @@
1
+ import { Component, JSX } from 'solid-js';
2
+ import { C as ConfigVariants, a as ClassProps, V as VariantProps } from '../../classes-B_S9K-9I.js';
3
+
4
+ declare const navbarStyles: {
5
+ (props?: (ConfigVariants<{
6
+ color: {
7
+ info: string;
8
+ primary: string;
9
+ success: string;
10
+ light: string;
11
+ };
12
+ }> & ClassProps) | undefined): string;
13
+ variantKeys: "color"[];
14
+ };
15
+ declare const navbarItemStyles: {
16
+ (props?: (ConfigVariants<{
17
+ active: {
18
+ true: string;
19
+ false: string;
20
+ };
21
+ tag: {
22
+ div: string;
23
+ a: string;
24
+ };
25
+ }> & ClassProps) | undefined): string;
26
+ variantKeys: ("active" | "tag")[];
27
+ };
28
+ declare const navbarDropdownStyles: {
29
+ (props?: (ConfigVariants<{
30
+ hoverable: {
31
+ true: string;
32
+ false: string;
33
+ };
34
+ }> & ClassProps) | undefined): string;
35
+ variantKeys: "hoverable"[];
36
+ };
37
+ declare const dropdownMenuStyles: {
38
+ (props?: (ConfigVariants<{
39
+ align: {
40
+ left: string;
41
+ right: string;
42
+ };
43
+ }> & ClassProps) | undefined): string;
44
+ variantKeys: "align"[];
45
+ };
46
+
47
+ type NavbarProps = {
48
+ brand?: JSX.Element;
49
+ start?: JSX.Element;
50
+ end?: JSX.Element;
51
+ className?: string;
52
+ } & VariantProps<typeof navbarStyles> & ClassProps & JSX.HTMLAttributes<HTMLElement>;
53
+ declare const Navbar: Component<NavbarProps>;
54
+
55
+ type NavbarItemProps = {
56
+ active?: boolean;
57
+ href?: string;
58
+ tag?: "a" | "div";
59
+ to?: string;
60
+ className?: string;
61
+ children: JSX.Element;
62
+ } & VariantProps<typeof navbarItemStyles> & ClassProps & Omit<JSX.HTMLAttributes<HTMLElement>, "children">;
63
+ declare const NavbarItem: Component<NavbarItemProps>;
64
+
65
+ type NavbarDropdownProps = {
66
+ label: string;
67
+ hoverable?: boolean;
68
+ align?: "left" | "right";
69
+ className?: string;
70
+ children: JSX.Element;
71
+ } & VariantProps<typeof navbarDropdownStyles> & VariantProps<typeof dropdownMenuStyles> & ClassProps;
72
+ declare const NavbarDropdown: Component<NavbarDropdownProps>;
73
+
74
+ export { Navbar, NavbarDropdown, NavbarItem };
@@ -0,0 +1 @@
1
+ export { Navbar_default as Navbar, NavbarDropdown_default as NavbarDropdown, NavbarItem_default as NavbarItem } from '../../chunk/OSJ3P7PI.js';
@@ -0,0 +1,11 @@
1
+ import {
2
+ NavbarDropdown_default,
3
+ NavbarItem_default,
4
+ Navbar_default
5
+ } from "../../chunk/BBDVIXAH.jsx";
6
+ import "../../chunk/P7WPLZNA.jsx";
7
+ export {
8
+ Navbar_default as Navbar,
9
+ NavbarDropdown_default as NavbarDropdown,
10
+ NavbarItem_default as NavbarItem
11
+ };
@@ -1,43 +1,8 @@
1
- import { JSX, Component } from 'solid-js';
2
- import { C as ConfigVariants, a as ClassProps, V as VariantProps } from '../../classes-B_S9K-9I.js';
1
+ import { P as Pagination } from '../../Pagination-CJtlFMHy.js';
2
+ export { a as PaginationProps } from '../../Pagination-CJtlFMHy.js';
3
+ import 'solid-js';
4
+ import '../../classes-B_S9K-9I.js';
3
5
 
4
- declare const paginationItemVariants: {
5
- (props?: (ConfigVariants<{
6
- active: {
7
- true: string;
8
- false: string;
9
- };
10
- rounded: {
11
- true: string;
12
- false: string;
13
- };
14
- simple: {
15
- true: string;
16
- false: string;
17
- };
18
- size: {
19
- sm: string;
20
- md: string;
21
- lg: string;
22
- };
23
- disabled: {
24
- true: string;
25
- false: string;
26
- };
27
- }> & ClassProps) | undefined): string;
28
- variantKeys: ("active" | "rounded" | "simple" | "size" | "disabled")[];
29
- };
30
6
 
31
- type PaginationProps = {
32
- total: number;
33
- perPage?: number;
34
- current: number;
35
- onChange: (page: number) => void;
36
- rangeBefore?: number;
37
- rangeAfter?: number;
38
- simple?: boolean;
39
- children?: JSX.Element;
40
- } & VariantProps<typeof paginationItemVariants> & JSX.HTMLAttributes<HTMLElement>;
41
- declare const Pagination: Component<PaginationProps>;
42
7
 
43
- export { type PaginationProps, Pagination as default };
8
+ export { Pagination as default };
@@ -1,189 +1 @@
1
- import { cva } from '../../chunk/HKS7ET6T.js';
2
- import { delegateEvents, template, spread, mergeProps, insert, createComponent, memo, effect, className } from 'solid-js/web';
3
- import { splitProps, createMemo, Show, For } from 'solid-js';
4
-
5
- // src/components/pagination/Pagination.styles.ts
6
- var paginationItemVariants = cva(
7
- [
8
- "inline-flex items-center justify-center font-medium transition-colors",
9
- "select-none border border-transparent",
10
- // border shown only when needed
11
- "disabled:opacity-50 disabled:pointer-events-none"
12
- ],
13
- {
14
- variants: {
15
- active: {
16
- true: "bg-blue-500 text-white hover:bg-blue-600",
17
- false: "bg-transparent text-gray-700 hover:bg-gray-200 dark:text-gray-200 dark:hover:bg-gray-700"
18
- },
19
- rounded: {
20
- true: "rounded-full",
21
- false: "rounded"
22
- },
23
- simple: {
24
- true: "border-none bg-transparent hover:bg-transparent text-gray-700 dark:text-gray-300",
25
- false: ""
26
- },
27
- size: {
28
- sm: "text-xs px-2 py-1",
29
- md: "text-sm px-3 py-1.5",
30
- lg: "text-base px-4 py-2"
31
- },
32
- disabled: {
33
- true: "opacity-50 pointer-events-none",
34
- false: ""
35
- }
36
- },
37
- defaultVariants: {
38
- active: false,
39
- rounded: false,
40
- simple: false,
41
- size: "md",
42
- disabled: false
43
- }
44
- }
45
- );
46
- var paginationInfoVariants = cva(
47
- "inline-block font-medium transition-colors",
48
- {
49
- variants: {
50
- simple: {
51
- true: "text-sm text-gray-600 dark:text-gray-300 px-2",
52
- false: "text-sm text-gray-700 dark:text-gray-200 px-2"
53
- }
54
- },
55
- defaultVariants: {
56
- simple: false
57
- }
58
- }
59
- );
60
- var paginationContainerVariants = cva(
61
- "flex items-center gap-1 flex-wrap",
62
- {
63
- variants: {
64
- align: {
65
- start: "justify-start",
66
- center: "justify-center",
67
- end: "justify-end"
68
- },
69
- wrap: {
70
- true: "flex-wrap",
71
- false: "flex-nowrap"
72
- }
73
- },
74
- defaultVariants: {
75
- align: "start",
76
- wrap: true
77
- }
78
- }
79
- );
80
-
81
- // src/components/pagination/Pagination.tsx
82
- var _tmpl$ = /* @__PURE__ */ template(`<span>`);
83
- var _tmpl$2 = /* @__PURE__ */ template(`<nav><button>&laquo;</button><button>&raquo;`);
84
- var _tmpl$3 = /* @__PURE__ */ template(`<button>`);
85
- var Pagination = (props) => {
86
- const [local, variantProps, otherProps] = splitProps(props, ["total", "perPage", "current", "onChange", "rangeBefore", "rangeAfter", "simple", "children"], ["rounded", "size", "disabled", "active", "simple"]);
87
- const perPage = () => local.perPage ?? 20;
88
- const pageCount = createMemo(() => Math.ceil(local.total / perPage()));
89
- const hasPrev = createMemo(() => local.current > 1);
90
- const hasNext = createMemo(() => local.current < pageCount());
91
- const pagesInRange = createMemo(() => {
92
- const before = local.rangeBefore ?? 1;
93
- const after = local.rangeAfter ?? 1;
94
- const start = Math.max(1, local.current - before);
95
- const end = Math.min(local.current + after, pageCount());
96
- return Array.from({
97
- length: end - start + 1
98
- }, (_, i) => start + i);
99
- });
100
- const changePage = (page) => {
101
- if (page >= 1 && page <= pageCount() && page !== local.current) {
102
- local.onChange(page);
103
- }
104
- };
105
- return (() => {
106
- var _el$ = _tmpl$2(), _el$2 = _el$.firstChild, _el$4 = _el$2.nextSibling;
107
- spread(_el$, mergeProps({
108
- get ["class"]() {
109
- return paginationContainerVariants({
110
- align: "start",
111
- wrap: true
112
- });
113
- }
114
- }, otherProps), false, true);
115
- _el$2.$$click = () => changePage(local.current - 1);
116
- insert(_el$, createComponent(Show, {
117
- get when() {
118
- return pageCount() > 1;
119
- },
120
- get children() {
121
- return [createComponent(Show, {
122
- get when() {
123
- return local.simple;
124
- },
125
- get children() {
126
- var _el$3 = _tmpl$();
127
- insert(_el$3, (() => {
128
- var _c$ = memo(() => perPage() === 1);
129
- return () => _c$() ? `${(local.current - 1) * perPage() + 1} / ${local.total}` : `${(local.current - 1) * perPage() + 1}-${Math.min(local.current * perPage(), local.total)} / ${local.total}`;
130
- })());
131
- effect(() => className(_el$3, paginationInfoVariants({
132
- simple: true
133
- })));
134
- return _el$3;
135
- }
136
- }), createComponent(Show, {
137
- get when() {
138
- return !local.simple;
139
- },
140
- get children() {
141
- return createComponent(For, {
142
- get each() {
143
- return pagesInRange();
144
- },
145
- children: (page) => (() => {
146
- var _el$5 = _tmpl$3();
147
- _el$5.$$click = () => changePage(page);
148
- insert(_el$5, page);
149
- effect(() => className(_el$5, paginationItemVariants({
150
- ...variantProps,
151
- active: page === local.current
152
- })));
153
- return _el$5;
154
- })()
155
- });
156
- }
157
- })];
158
- }
159
- }), _el$4);
160
- _el$4.$$click = () => changePage(local.current + 1);
161
- effect((_p$) => {
162
- var _v$ = paginationItemVariants({
163
- ...variantProps,
164
- disabled: !hasPrev()
165
- }), _v$2 = !hasPrev(), _v$3 = paginationItemVariants({
166
- ...variantProps,
167
- disabled: !hasNext()
168
- }), _v$4 = !hasNext();
169
- _v$ !== _p$.e && className(_el$2, _p$.e = _v$);
170
- _v$2 !== _p$.t && (_el$2.disabled = _p$.t = _v$2);
171
- _v$3 !== _p$.a && className(_el$4, _p$.a = _v$3);
172
- _v$4 !== _p$.o && (_el$4.disabled = _p$.o = _v$4);
173
- return _p$;
174
- }, {
175
- e: void 0,
176
- t: void 0,
177
- a: void 0,
178
- o: void 0
179
- });
180
- return _el$;
181
- })();
182
- };
183
- var Pagination_default = Pagination;
184
- delegateEvents(["click"]);
185
-
186
- // src/components/pagination/index.ts
187
- var pagination_default = Pagination_default;
188
-
189
- export { pagination_default as default };
1
+ export { pagination_default as default } from '../../chunk/DBQ7IOPU.js';
@@ -1,178 +1,7 @@
1
1
  import {
2
- cva
3
- } from "../../chunk/P7WPLZNA.jsx";
4
-
5
- // src/components/pagination/Pagination.tsx
6
- import {
7
- splitProps,
8
- createMemo,
9
- Show,
10
- For
11
- } from "solid-js";
12
-
13
- // src/components/pagination/Pagination.styles.ts
14
- var paginationItemVariants = cva(
15
- [
16
- "inline-flex items-center justify-center font-medium transition-colors",
17
- "select-none border border-transparent",
18
- // border shown only when needed
19
- "disabled:opacity-50 disabled:pointer-events-none"
20
- ],
21
- {
22
- variants: {
23
- active: {
24
- true: "bg-blue-500 text-white hover:bg-blue-600",
25
- false: "bg-transparent text-gray-700 hover:bg-gray-200 dark:text-gray-200 dark:hover:bg-gray-700"
26
- },
27
- rounded: {
28
- true: "rounded-full",
29
- false: "rounded"
30
- },
31
- simple: {
32
- true: "border-none bg-transparent hover:bg-transparent text-gray-700 dark:text-gray-300",
33
- false: ""
34
- },
35
- size: {
36
- sm: "text-xs px-2 py-1",
37
- md: "text-sm px-3 py-1.5",
38
- lg: "text-base px-4 py-2"
39
- },
40
- disabled: {
41
- true: "opacity-50 pointer-events-none",
42
- false: ""
43
- }
44
- },
45
- defaultVariants: {
46
- active: false,
47
- rounded: false,
48
- simple: false,
49
- size: "md",
50
- disabled: false
51
- }
52
- }
53
- );
54
- var paginationInfoVariants = cva(
55
- "inline-block font-medium transition-colors",
56
- {
57
- variants: {
58
- simple: {
59
- true: "text-sm text-gray-600 dark:text-gray-300 px-2",
60
- false: "text-sm text-gray-700 dark:text-gray-200 px-2"
61
- }
62
- },
63
- defaultVariants: {
64
- simple: false
65
- }
66
- }
67
- );
68
- var paginationContainerVariants = cva(
69
- "flex items-center gap-1 flex-wrap",
70
- {
71
- variants: {
72
- align: {
73
- start: "justify-start",
74
- center: "justify-center",
75
- end: "justify-end"
76
- },
77
- wrap: {
78
- true: "flex-wrap",
79
- false: "flex-nowrap"
80
- }
81
- },
82
- defaultVariants: {
83
- align: "start",
84
- wrap: true
85
- }
86
- }
87
- );
88
-
89
- // src/components/pagination/Pagination.tsx
90
- var Pagination = (props) => {
91
- const [local, variantProps, otherProps] = splitProps(
92
- props,
93
- [
94
- "total",
95
- "perPage",
96
- "current",
97
- "onChange",
98
- "rangeBefore",
99
- "rangeAfter",
100
- "simple",
101
- "children"
102
- ],
103
- ["rounded", "size", "disabled", "active", "simple"]
104
- );
105
- const perPage = () => local.perPage ?? 20;
106
- const pageCount = createMemo(() => Math.ceil(local.total / perPage()));
107
- const hasPrev = createMemo(() => local.current > 1);
108
- const hasNext = createMemo(() => local.current < pageCount());
109
- const pagesInRange = createMemo(() => {
110
- const before = local.rangeBefore ?? 1;
111
- const after = local.rangeAfter ?? 1;
112
- const start = Math.max(1, local.current - before);
113
- const end = Math.min(local.current + after, pageCount());
114
- return Array.from({ length: end - start + 1 }, (_, i) => start + i);
115
- });
116
- const changePage = (page) => {
117
- if (page >= 1 && page <= pageCount() && page !== local.current) {
118
- local.onChange(page);
119
- }
120
- };
121
- return <nav
122
- class={paginationContainerVariants({ align: "start", wrap: true })}
123
- {...otherProps}
124
- >
125
- <button
126
- class={paginationItemVariants({
127
- ...variantProps,
128
- disabled: !hasPrev()
129
- })}
130
- onClick={() => changePage(local.current - 1)}
131
- disabled={!hasPrev()}
132
- >
133
- &laquo;
134
- </button>
135
-
136
- <Show when={pageCount() > 1}>
137
- <Show when={local.simple}>
138
- <span class={paginationInfoVariants({ simple: true })}>
139
- {perPage() === 1 ? `${(local.current - 1) * perPage() + 1} / ${local.total}` : `${(local.current - 1) * perPage() + 1}-${Math.min(
140
- local.current * perPage(),
141
- local.total
142
- )} / ${local.total}`}
143
- </span>
144
- </Show>
145
-
146
- <Show when={!local.simple}>
147
- <For each={pagesInRange()}>
148
- {(page) => <button
149
- class={paginationItemVariants({
150
- ...variantProps,
151
- active: page === local.current
152
- })}
153
- onClick={() => changePage(page)}
154
- >
155
- {page}
156
- </button>}
157
- </For>
158
- </Show>
159
- </Show>
160
- <button
161
- class={paginationItemVariants({
162
- ...variantProps,
163
- disabled: !hasNext()
164
- })}
165
- onClick={() => changePage(local.current + 1)}
166
- disabled={!hasNext()}
167
- >
168
- &raquo;
169
- </button>
170
- </nav>;
171
- };
172
- var Pagination_default = Pagination;
173
-
174
- // src/components/pagination/index.ts
175
- var pagination_default = Pagination_default;
2
+ pagination_default
3
+ } from "../../chunk/ELRAUORW.jsx";
4
+ import "../../chunk/P7WPLZNA.jsx";
176
5
  export {
177
6
  pagination_default as default
178
7
  };
@@ -1,44 +1,8 @@
1
- import { ComponentProps, JSX, Component } from 'solid-js';
2
- import { C as ConfigVariants, a as ClassProps, V as VariantProps } from '../../classes-B_S9K-9I.js';
1
+ import { S as Select } from '../../Select-CWCDBvec.js';
2
+ export { a as SelectProps } from '../../Select-CWCDBvec.js';
3
+ import 'solid-js';
4
+ import '../../classes-B_S9K-9I.js';
3
5
 
4
- declare const selectVariants: {
5
- (props?: (ConfigVariants<{
6
- size: {
7
- sm: string;
8
- md: string;
9
- lg: string;
10
- };
11
- color: {
12
- primary: string;
13
- info: string;
14
- success: string;
15
- warning: string;
16
- danger: string;
17
- };
18
- loading: {
19
- true: string;
20
- false: string;
21
- };
22
- expanded: {
23
- true: string;
24
- false: string;
25
- };
26
- rounded: {
27
- true: string;
28
- false: string;
29
- };
30
- }> & ClassProps) | undefined): string;
31
- variantKeys: ("size" | "color" | "loading" | "expanded" | "rounded")[];
32
- };
33
6
 
34
- type SelectProps = VariantProps<typeof selectVariants> & ClassProps & ComponentProps<"select"> & {
35
- placeholder?: string;
36
- nativeSize?: string | number;
37
- value?: string | number | null;
38
- onChange?: JSX.EventHandlerUnion<HTMLSelectElement, Event>;
39
- onFocus?: JSX.EventHandlerUnion<HTMLSelectElement, FocusEvent>;
40
- onBlur?: JSX.EventHandlerUnion<HTMLSelectElement, FocusEvent>;
41
- };
42
- declare const Select: Component<SelectProps>;
43
7
 
44
- export { type SelectProps, Select as default };
8
+ export { Select as default };
@@ -1,98 +1 @@
1
- import { cva, classes } from '../../chunk/HKS7ET6T.js';
2
- import { template, spread, mergeProps, insert, createComponent, memo } from 'solid-js/web';
3
- import { splitProps, createMemo, untrack, Show } from 'solid-js';
4
-
5
- // src/components/select/Select.styles.ts
6
- var selectVariants = cva(
7
- [
8
- "relative inline-flex items-center appearance-none",
9
- "border outline-none",
10
- "transition bg-white text-black",
11
- "disabled:opacity-50 disabled:cursor-not-allowed"
12
- ],
13
- {
14
- variants: {
15
- size: {
16
- sm: "text-sm px-2 py-1",
17
- md: "text-base px-3 py-2",
18
- lg: "text-lg px-4 py-2"
19
- },
20
- color: {
21
- primary: "border-gray-300 focus:border-primary",
22
- info: "border-blue-300 focus:border-blue-500",
23
- success: "border-green-300 focus:border-green-500",
24
- warning: "border-yellow-300 focus:border-yellow-500",
25
- danger: "border-red-300 focus:border-red-500"
26
- },
27
- loading: {
28
- true: "cursor-wait opacity-75",
29
- false: ""
30
- },
31
- expanded: {
32
- true: "w-full",
33
- false: "w-fit"
34
- },
35
- rounded: {
36
- true: "rounded",
37
- false: "rounded-none"
38
- }
39
- },
40
- defaultVariants: {
41
- size: "md",
42
- color: "primary",
43
- loading: false,
44
- expanded: false,
45
- rounded: false
46
- }
47
- }
48
- );
49
-
50
- // src/components/select/Select.tsx
51
- var _tmpl$ = /* @__PURE__ */ template(`<option value disabled hidden>`);
52
- var _tmpl$2 = /* @__PURE__ */ template(`<select>`);
53
- var Select = (props) => {
54
- const [localProps, variantProps, otherProps] = splitProps(props, ["placeholder", "value", "nativeSize", "onChange", "onBlur", "onFocus"], ["class", ...selectVariants.variantKeys]);
55
- const empty = createMemo(() => untrack(() => localProps.value === null || localProps.value === void 0));
56
- const selectClasses = createMemo(() => classes(selectVariants(variantProps), variantProps.class));
57
- return (() => {
58
- var _el$ = _tmpl$2();
59
- spread(_el$, mergeProps({
60
- get ["class"]() {
61
- return selectClasses();
62
- },
63
- get size() {
64
- return localProps.nativeSize;
65
- },
66
- get value() {
67
- return localProps.value;
68
- },
69
- get onChange() {
70
- return localProps.onChange;
71
- },
72
- get onFocus() {
73
- return localProps.onFocus;
74
- },
75
- get onBlur() {
76
- return localProps.onBlur;
77
- }
78
- }, otherProps), false, true);
79
- insert(_el$, createComponent(Show, {
80
- get when() {
81
- return memo(() => !!localProps.placeholder)() && empty();
82
- },
83
- get children() {
84
- var _el$2 = _tmpl$();
85
- insert(_el$2, () => localProps.placeholder);
86
- return _el$2;
87
- }
88
- }), null);
89
- insert(_el$, () => props.children, null);
90
- return _el$;
91
- })();
92
- };
93
- var Select_default = Select;
94
-
95
- // src/components/select/index.ts
96
- var select_default = Select_default;
97
-
98
- export { select_default as default };
1
+ export { select_default as default } from '../../chunk/3IHANYRN.js';