@sigx/daisyui 0.1.6

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 (146) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +235 -0
  3. package/dist/buttons/Button.d.ts +18 -0
  4. package/dist/buttons/Button.d.ts.map +1 -0
  5. package/dist/buttons/ButtonGroup.d.ts +18 -0
  6. package/dist/buttons/ButtonGroup.d.ts.map +1 -0
  7. package/dist/buttons/index.d.ts +5 -0
  8. package/dist/buttons/index.d.ts.map +1 -0
  9. package/dist/buttons/index.js +2 -0
  10. package/dist/buttons-Dtj_5Uc3.js +61 -0
  11. package/dist/buttons-Dtj_5Uc3.js.map +1 -0
  12. package/dist/data/Table.d.ts +92 -0
  13. package/dist/data/Table.d.ts.map +1 -0
  14. package/dist/data/index.d.ts +3 -0
  15. package/dist/data/index.d.ts.map +1 -0
  16. package/dist/data/index.js +2 -0
  17. package/dist/data-wxNpnX83.js +153 -0
  18. package/dist/data-wxNpnX83.js.map +1 -0
  19. package/dist/feedback/Accordion.d.ts +87 -0
  20. package/dist/feedback/Accordion.d.ts.map +1 -0
  21. package/dist/feedback/Badge.d.ts +73 -0
  22. package/dist/feedback/Badge.d.ts.map +1 -0
  23. package/dist/feedback/Countdown.d.ts +33 -0
  24. package/dist/feedback/Countdown.d.ts.map +1 -0
  25. package/dist/feedback/Diff.d.ts +43 -0
  26. package/dist/feedback/Diff.d.ts.map +1 -0
  27. package/dist/feedback/FileInput.d.ts +28 -0
  28. package/dist/feedback/FileInput.d.ts.map +1 -0
  29. package/dist/feedback/Indicator.d.ts +47 -0
  30. package/dist/feedback/Indicator.d.ts.map +1 -0
  31. package/dist/feedback/Kbd.d.ts +31 -0
  32. package/dist/feedback/Kbd.d.ts.map +1 -0
  33. package/dist/feedback/Modal.d.ts +51 -0
  34. package/dist/feedback/Modal.d.ts.map +1 -0
  35. package/dist/feedback/RadialProgress.d.ts +35 -0
  36. package/dist/feedback/RadialProgress.d.ts.map +1 -0
  37. package/dist/feedback/Rating.d.ts +34 -0
  38. package/dist/feedback/Rating.d.ts.map +1 -0
  39. package/dist/feedback/Skeleton.d.ts +24 -0
  40. package/dist/feedback/Skeleton.d.ts.map +1 -0
  41. package/dist/feedback/Steps.d.ts +60 -0
  42. package/dist/feedback/Steps.d.ts.map +1 -0
  43. package/dist/feedback/Swap.d.ts +53 -0
  44. package/dist/feedback/Swap.d.ts.map +1 -0
  45. package/dist/feedback/Timeline.d.ts +76 -0
  46. package/dist/feedback/Timeline.d.ts.map +1 -0
  47. package/dist/feedback/Toast.d.ts +30 -0
  48. package/dist/feedback/Toast.d.ts.map +1 -0
  49. package/dist/feedback/index.d.ts +31 -0
  50. package/dist/feedback/index.d.ts.map +1 -0
  51. package/dist/feedback/index.js +2 -0
  52. package/dist/feedback-DFutN-Kz.js +817 -0
  53. package/dist/feedback-DFutN-Kz.js.map +1 -0
  54. package/dist/forms/Checkbox.d.ts +15 -0
  55. package/dist/forms/Checkbox.d.ts.map +1 -0
  56. package/dist/forms/FormField.d.ts +16 -0
  57. package/dist/forms/FormField.d.ts.map +1 -0
  58. package/dist/forms/Input.d.ts +19 -0
  59. package/dist/forms/Input.d.ts.map +1 -0
  60. package/dist/forms/Radio.d.ts +78 -0
  61. package/dist/forms/Radio.d.ts.map +1 -0
  62. package/dist/forms/Range.d.ts +15 -0
  63. package/dist/forms/Range.d.ts.map +1 -0
  64. package/dist/forms/Select.d.ts +28 -0
  65. package/dist/forms/Select.d.ts.map +1 -0
  66. package/dist/forms/Textarea.d.ts +17 -0
  67. package/dist/forms/Textarea.d.ts.map +1 -0
  68. package/dist/forms/Toggle.d.ts +15 -0
  69. package/dist/forms/Toggle.d.ts.map +1 -0
  70. package/dist/forms/index.d.ts +17 -0
  71. package/dist/forms/index.d.ts.map +1 -0
  72. package/dist/forms/index.js +2 -0
  73. package/dist/forms-CuvlRMro.js +362 -0
  74. package/dist/forms-CuvlRMro.js.map +1 -0
  75. package/dist/index.d.ts +38 -0
  76. package/dist/index.d.ts.map +1 -0
  77. package/dist/index.js +9 -0
  78. package/dist/layout/Card.d.ts +65 -0
  79. package/dist/layout/Card.d.ts.map +1 -0
  80. package/dist/layout/Carousel.d.ts +56 -0
  81. package/dist/layout/Carousel.d.ts.map +1 -0
  82. package/dist/layout/Chat.d.ts +54 -0
  83. package/dist/layout/Chat.d.ts.map +1 -0
  84. package/dist/layout/Container.d.ts +17 -0
  85. package/dist/layout/Container.d.ts.map +1 -0
  86. package/dist/layout/Divider.d.ts +22 -0
  87. package/dist/layout/Divider.d.ts.map +1 -0
  88. package/dist/layout/Flex.d.ts +59 -0
  89. package/dist/layout/Flex.d.ts.map +1 -0
  90. package/dist/layout/Footer.d.ts +25 -0
  91. package/dist/layout/Footer.d.ts.map +1 -0
  92. package/dist/layout/Hero.d.ts +52 -0
  93. package/dist/layout/Hero.d.ts.map +1 -0
  94. package/dist/layout/Join.d.ts +40 -0
  95. package/dist/layout/Join.d.ts.map +1 -0
  96. package/dist/layout/Link.d.ts +20 -0
  97. package/dist/layout/Link.d.ts.map +1 -0
  98. package/dist/layout/Mask.d.ts +26 -0
  99. package/dist/layout/Mask.d.ts.map +1 -0
  100. package/dist/layout/Mockup.d.ts +95 -0
  101. package/dist/layout/Mockup.d.ts.map +1 -0
  102. package/dist/layout/Stack.d.ts +45 -0
  103. package/dist/layout/Stack.d.ts.map +1 -0
  104. package/dist/layout/index.d.ts +46 -0
  105. package/dist/layout/index.d.ts.map +1 -0
  106. package/dist/layout/index.js +2 -0
  107. package/dist/layout-0aaJX4B2.js +554 -0
  108. package/dist/layout-0aaJX4B2.js.map +1 -0
  109. package/dist/navigation/Breadcrumbs.d.ts +22 -0
  110. package/dist/navigation/Breadcrumbs.d.ts.map +1 -0
  111. package/dist/navigation/Drawer.d.ts +25 -0
  112. package/dist/navigation/Drawer.d.ts.map +1 -0
  113. package/dist/navigation/Dropdown.d.ts +40 -0
  114. package/dist/navigation/Dropdown.d.ts.map +1 -0
  115. package/dist/navigation/MenuComponent.d.ts +54 -0
  116. package/dist/navigation/MenuComponent.d.ts.map +1 -0
  117. package/dist/navigation/Navbar.d.ts +23 -0
  118. package/dist/navigation/Navbar.d.ts.map +1 -0
  119. package/dist/navigation/Pagination.d.ts +12 -0
  120. package/dist/navigation/Pagination.d.ts.map +1 -0
  121. package/dist/navigation/Tabs.d.ts +35 -0
  122. package/dist/navigation/Tabs.d.ts.map +1 -0
  123. package/dist/navigation/index.d.ts +15 -0
  124. package/dist/navigation/index.d.ts.map +1 -0
  125. package/dist/navigation/index.js +2 -0
  126. package/dist/navigation-4cwyfLvr.js +285 -0
  127. package/dist/navigation-4cwyfLvr.js.map +1 -0
  128. package/dist/shared/styles.d.ts +79 -0
  129. package/dist/shared/styles.d.ts.map +1 -0
  130. package/dist/styles-DFkMxi90.js +126 -0
  131. package/dist/styles-DFkMxi90.js.map +1 -0
  132. package/dist/theme/ThemeProvider.d.ts +73 -0
  133. package/dist/theme/ThemeProvider.d.ts.map +1 -0
  134. package/dist/theme/index.d.ts +3 -0
  135. package/dist/theme/index.d.ts.map +1 -0
  136. package/dist/theme/index.js +2 -0
  137. package/dist/theme-D9CUMvuT.js +118 -0
  138. package/dist/theme-D9CUMvuT.js.map +1 -0
  139. package/dist/typography/Text.d.ts +47 -0
  140. package/dist/typography/Text.d.ts.map +1 -0
  141. package/dist/typography/index.d.ts +3 -0
  142. package/dist/typography/index.d.ts.map +1 -0
  143. package/dist/typography/index.js +2 -0
  144. package/dist/typography-CU1RMGKA.js +112 -0
  145. package/dist/typography-CU1RMGKA.js.map +1 -0
  146. package/package.json +88 -0
@@ -0,0 +1,285 @@
1
+ import { component, compound, defineInjectable } from "sigx";
2
+ import { jsx, jsxs } from "sigx/jsx-runtime";
3
+ var tabsSizeClasses = {
4
+ xs: "tabs-xs",
5
+ sm: "tabs-sm",
6
+ md: "",
7
+ lg: "tabs-lg",
8
+ xl: "tabs-xl"
9
+ };
10
+ var tabsCounter = 0;
11
+ const Tabs = component(({ props, emit }) => {
12
+ const instanceId = ++tabsCounter;
13
+ const getTabGroupName = () => props.name || `sigx_tabs_${instanceId}`;
14
+ const hasContent = () => props.tabs?.some((tab) => tab.content != null);
15
+ const getContainerClasses = () => {
16
+ const classes = ["tabs"];
17
+ if (props.variant === "border") classes.push("tabs-border");
18
+ if (props.variant === "lift") classes.push("tabs-lift");
19
+ if (props.variant === "box") classes.push("tabs-box");
20
+ if (props.position === "bottom") classes.push("tabs-bottom");
21
+ if (props.size) {
22
+ const sizeClass = tabsSizeClasses[props.size];
23
+ if (sizeClass) classes.push(sizeClass);
24
+ }
25
+ if (props.class) classes.push(props.class);
26
+ return classes.join(" ");
27
+ };
28
+ const getContentClasses = () => {
29
+ const classes = [
30
+ "tab-content",
31
+ "bg-base-100",
32
+ "border-base-300",
33
+ "p-6"
34
+ ];
35
+ if (props.contentClass) classes.push(props.contentClass);
36
+ return classes.join(" ");
37
+ };
38
+ return () => {
39
+ if (hasContent()) return /* @__PURE__ */ jsx("div", {
40
+ role: "tablist",
41
+ class: getContainerClasses(),
42
+ children: props.tabs?.map((tab) => [/* @__PURE__ */ jsx("input", {
43
+ type: "radio",
44
+ name: getTabGroupName(),
45
+ class: `tab ${tab.disabled ? "tab-disabled" : ""}`,
46
+ "aria-label": typeof tab.label === "string" ? tab.label : tab.id,
47
+ checked: props.activeTab === tab.id,
48
+ disabled: tab.disabled,
49
+ onChange: () => !tab.disabled && emit("change", tab.id)
50
+ }), /* @__PURE__ */ jsx("div", {
51
+ class: getContentClasses(),
52
+ children: tab.content
53
+ })])
54
+ });
55
+ return /* @__PURE__ */ jsx("div", {
56
+ role: "tablist",
57
+ class: getContainerClasses(),
58
+ children: props.tabs?.map((tab) => /* @__PURE__ */ jsx("button", {
59
+ type: "button",
60
+ role: "tab",
61
+ class: `tab ${props.activeTab === tab.id ? "tab-active" : ""} ${tab.disabled ? "tab-disabled" : ""}`,
62
+ disabled: tab.disabled,
63
+ onClick: () => !tab.disabled && emit("change", tab.id),
64
+ children: tab.label
65
+ }))
66
+ });
67
+ };
68
+ });
69
+ var menuSizeClasses = {
70
+ xs: "menu-xs",
71
+ sm: "menu-sm",
72
+ md: "",
73
+ lg: "menu-lg"
74
+ };
75
+ var test = defineInjectable(() => {
76
+ return { model: void 0 };
77
+ });
78
+ var MenuItem = component(({ props, slots }) => {
79
+ test();
80
+ const getClasses = () => {
81
+ const classes = [];
82
+ if (props.disabled) classes.push("disabled");
83
+ if (props.class) classes.push(props.class);
84
+ return classes.join(" ") || void 0;
85
+ };
86
+ return () => /* @__PURE__ */ jsx("li", {
87
+ class: getClasses(),
88
+ "data-value": props.value,
89
+ children: slots.default?.()
90
+ });
91
+ });
92
+ var MenuTitle = component(({ props, slots }) => {
93
+ const getClasses = () => {
94
+ const classes = ["menu-title"];
95
+ if (props.class) classes.push(props.class);
96
+ return classes.join(" ");
97
+ };
98
+ return () => /* @__PURE__ */ jsx("li", {
99
+ class: getClasses(),
100
+ children: slots.default?.()
101
+ });
102
+ });
103
+ const Menu = compound(component(({ props, slots, emit }) => {
104
+ test();
105
+ const getClasses = () => {
106
+ const classes = ["menu"];
107
+ if (props.size) {
108
+ const sizeClass = menuSizeClasses[props.size];
109
+ if (sizeClass) classes.push(sizeClass);
110
+ }
111
+ if (props.horizontal) classes.push("menu-horizontal");
112
+ if (props.class) classes.push(props.class);
113
+ return classes.join(" ");
114
+ };
115
+ const handleClick = (e) => {
116
+ const li = e.target.closest("li[data-value]");
117
+ if (li) {
118
+ const value = li.getAttribute("data-value");
119
+ if (value && !li.classList.contains("disabled")) emit("update:modelValue", value);
120
+ }
121
+ };
122
+ return () => /* @__PURE__ */ jsx("ul", {
123
+ class: getClasses(),
124
+ onClick: handleClick,
125
+ children: slots.default?.()
126
+ });
127
+ }), {
128
+ Item: MenuItem,
129
+ Title: MenuTitle
130
+ });
131
+ const Dropdown = component(({ props, slots }) => {
132
+ const getClasses = () => {
133
+ const classes = ["dropdown"];
134
+ if (props.position === "end") classes.push("dropdown-end");
135
+ if (props.position === "top") classes.push("dropdown-top");
136
+ if (props.position === "left") classes.push("dropdown-left");
137
+ if (props.position === "right") classes.push("dropdown-right");
138
+ if (props.hover) classes.push("dropdown-hover");
139
+ if (props.class) classes.push(props.class);
140
+ return classes.join(" ");
141
+ };
142
+ const getMenuClasses = () => {
143
+ const classes = [
144
+ "dropdown-content",
145
+ "z-[1]",
146
+ "menu",
147
+ "p-2",
148
+ "shadow",
149
+ "bg-base-100",
150
+ "rounded-box"
151
+ ];
152
+ if (props.menuClass) classes.push(props.menuClass);
153
+ return classes.join(" ");
154
+ };
155
+ return () => /* @__PURE__ */ jsxs("div", {
156
+ class: getClasses(),
157
+ children: [slots.trigger && /* @__PURE__ */ jsx("div", {
158
+ tabIndex: 0,
159
+ role: "button",
160
+ children: slots.trigger()
161
+ }), /* @__PURE__ */ jsx("ul", {
162
+ tabIndex: 0,
163
+ class: getMenuClasses(),
164
+ children: slots.default?.()
165
+ })]
166
+ });
167
+ });
168
+ const Drawer = component(({ props, slots, emit }) => {
169
+ const drawerId = `drawer-${Math.random().toString(36).slice(2)}`;
170
+ const handleCheckboxChange = (e) => {
171
+ const checked = e.target.checked;
172
+ if (props.model) props.model.value = checked;
173
+ };
174
+ return () => {
175
+ const classes = ["drawer"];
176
+ if (props.side === "right") classes.push("drawer-end");
177
+ if (props.responsive) classes.push("lg:drawer-open");
178
+ if (props.class) classes.push(props.class);
179
+ return /* @__PURE__ */ jsxs("div", {
180
+ class: classes.join(" "),
181
+ children: [
182
+ /* @__PURE__ */ jsx("input", {
183
+ id: drawerId,
184
+ type: "checkbox",
185
+ class: "drawer-toggle",
186
+ checked: props.model?.value ?? false,
187
+ onChange: handleCheckboxChange
188
+ }),
189
+ /* @__PURE__ */ jsx("div", {
190
+ class: "drawer-content",
191
+ children: slots.default?.()
192
+ }),
193
+ /* @__PURE__ */ jsxs("div", {
194
+ class: ["drawer-side", "z-[999]"].join(" "),
195
+ children: [/* @__PURE__ */ jsx("label", {
196
+ htmlFor: drawerId,
197
+ "aria-label": "close sidebar",
198
+ class: "drawer-overlay"
199
+ }), slots.side?.()]
200
+ })
201
+ ]
202
+ });
203
+ };
204
+ });
205
+ const Breadcrumbs = component(({ props, emit }) => {
206
+ const getClasses = () => {
207
+ const classes = ["breadcrumbs", "text-sm"];
208
+ if (props.class) classes.push(props.class);
209
+ return classes.join(" ");
210
+ };
211
+ return () => /* @__PURE__ */ jsx("div", {
212
+ class: getClasses(),
213
+ children: /* @__PURE__ */ jsx("ul", { children: props.items?.map((item) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("a", {
214
+ onClick: () => emit("navigate", item.id),
215
+ children: item.label
216
+ }) })) })
217
+ });
218
+ });
219
+ const Navbar = component(({ props, slots }) => {
220
+ const getClasses = () => {
221
+ const classes = ["navbar", "bg-base-100"];
222
+ if (props.class) classes.push(props.class);
223
+ return classes.join(" ");
224
+ };
225
+ return () => /* @__PURE__ */ jsxs("div", {
226
+ class: getClasses(),
227
+ children: [
228
+ slots.start && /* @__PURE__ */ jsx("div", {
229
+ class: "navbar-start",
230
+ children: slots.start()
231
+ }),
232
+ slots.center && /* @__PURE__ */ jsx("div", {
233
+ class: "navbar-center",
234
+ children: slots.center()
235
+ }),
236
+ slots.end && /* @__PURE__ */ jsx("div", {
237
+ class: "navbar-end",
238
+ children: slots.end()
239
+ })
240
+ ]
241
+ });
242
+ });
243
+ const Pagination = component(({ props, emit }) => {
244
+ const getClasses = () => {
245
+ const classes = ["join"];
246
+ if (props.class) classes.push(props.class);
247
+ return classes.join(" ");
248
+ };
249
+ const getPages = () => {
250
+ const pages = [];
251
+ const current = props.currentPage ?? 1;
252
+ const total = props.totalPages ?? 1;
253
+ if (total <= 7) for (let i = 1; i <= total; i++) pages.push(i);
254
+ else if (current <= 4) {
255
+ for (let i = 1; i <= 5; i++) pages.push(i);
256
+ pages.push("...");
257
+ pages.push(total);
258
+ } else if (current >= total - 3) {
259
+ pages.push(1);
260
+ pages.push("...");
261
+ for (let i = total - 4; i <= total; i++) pages.push(i);
262
+ } else {
263
+ pages.push(1);
264
+ pages.push("...");
265
+ for (let i = current - 1; i <= current + 1; i++) pages.push(i);
266
+ pages.push("...");
267
+ pages.push(total);
268
+ }
269
+ return pages;
270
+ };
271
+ return () => /* @__PURE__ */ jsx("div", {
272
+ class: getClasses(),
273
+ children: getPages().map((page) => page === "..." ? /* @__PURE__ */ jsx("button", {
274
+ class: "join-item btn btn-disabled",
275
+ children: "..."
276
+ }) : /* @__PURE__ */ jsx("button", {
277
+ class: `join-item btn ${page === props.currentPage ? "btn-active" : ""}`,
278
+ onClick: () => emit("change", page),
279
+ children: page
280
+ }))
281
+ });
282
+ });
283
+ export { Dropdown as a, Drawer as i, Navbar as n, Menu as o, Breadcrumbs as r, Tabs as s, Pagination as t };
284
+
285
+ //# sourceMappingURL=navigation-4cwyfLvr.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation-4cwyfLvr.js","names":[],"sources":["../src/navigation/Tabs.tsx","../src/navigation/MenuComponent.tsx","../src/navigation/Dropdown.tsx","../src/navigation/Drawer.tsx","../src/navigation/Breadcrumbs.tsx","../src/navigation/Navbar.tsx","../src/navigation/Pagination.tsx"],"sourcesContent":["import { component, DefineProp, DefineEvent, JSXElement } from 'sigx';\r\n\r\nexport interface Tab {\r\n id: string;\r\n label: string | JSXElement;\r\n content?: string | JSXElement;\r\n disabled?: boolean;\r\n}\r\n\r\nexport type TabsVariant = 'border' | 'lift' | 'box';\r\nexport type TabsSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\r\nexport type TabsPosition = 'top' | 'bottom';\r\n\r\nexport type TabsProps = \r\n & DefineProp<'tabs', Tab[]>\r\n & DefineProp<'activeTab', string>\r\n & DefineProp<'variant', TabsVariant, false>\r\n & DefineProp<'size', TabsSize, false>\r\n & DefineProp<'position', TabsPosition, false>\r\n & DefineProp<'name', string, false>\r\n & DefineProp<'contentClass', string, false>\r\n & DefineProp<'class', string, false>\r\n & DefineEvent<'change', string>;\r\n\r\nconst tabsSizeClasses: Record<TabsSize, string> = {\r\n xs: 'tabs-xs',\r\n sm: 'tabs-sm',\r\n md: '',\r\n lg: 'tabs-lg',\r\n xl: 'tabs-xl'\r\n};\r\n\r\nlet tabsCounter = 0;\r\n\r\n/**\r\n * Tabs component with DaisyUI styling.\r\n * Uses radio inputs for native tab switching with content panels.\r\n * \r\n * @example Basic tabs without content\r\n * ```tsx\r\n * const tabs = [\r\n * { id: 'tab1', label: 'Tab 1' },\r\n * { id: 'tab2', label: 'Tab 2' }\r\n * ];\r\n * <Tabs tabs={tabs} activeTab={activeTab.value} onChange={(id) => activeTab.value = id} />\r\n * ```\r\n * \r\n * @example Tabs with content\r\n * ```tsx\r\n * const tabs = [\r\n * { id: 'tab1', label: 'Tab 1', content: 'Content for tab 1' },\r\n * { id: 'tab2', label: 'Tab 2', content: <div>Rich content for tab 2</div> }\r\n * ];\r\n * <Tabs tabs={tabs} activeTab={activeTab.value} onChange={(id) => activeTab.value = id} variant=\"lift\" />\r\n * ```\r\n */\r\nexport const Tabs = component<TabsProps>(({ props, emit }) => {\r\n // Generate stable name once per component instance\r\n const instanceId = ++tabsCounter;\r\n const getTabGroupName = () => props.name || `sigx_tabs_${instanceId}`;\r\n \r\n const hasContent = () => props.tabs?.some(tab => tab.content != null);\r\n \r\n const getContainerClasses = () => {\r\n const classes = ['tabs'];\r\n \r\n // DaisyUI v5 uses tabs-border, tabs-lift, tabs-box\r\n if (props.variant === 'border') classes.push('tabs-border');\r\n if (props.variant === 'lift') classes.push('tabs-lift');\r\n if (props.variant === 'box') classes.push('tabs-box');\r\n \r\n // Position\r\n if (props.position === 'bottom') classes.push('tabs-bottom');\r\n \r\n if (props.size) {\r\n const sizeClass = tabsSizeClasses[props.size];\r\n if (sizeClass) classes.push(sizeClass);\r\n }\r\n \r\n if (props.class) classes.push(props.class);\r\n \r\n return classes.join(' ');\r\n };\r\n \r\n const getContentClasses = () => {\r\n const classes = ['tab-content', 'bg-base-100', 'border-base-300', 'p-6'];\r\n if (props.contentClass) classes.push(props.contentClass);\r\n return classes.join(' ');\r\n };\r\n\r\n return () => {\r\n const showContent = hasContent();\r\n \r\n // If tabs have content, use radio input pattern (DaisyUI's native tab content switching)\r\n if (showContent) {\r\n return (\r\n <div role=\"tablist\" class={getContainerClasses()}>\r\n {props.tabs?.map(tab => [\r\n <input\r\n type=\"radio\"\r\n name={getTabGroupName()}\r\n class={`tab ${tab.disabled ? 'tab-disabled' : ''}`}\r\n aria-label={typeof tab.label === 'string' ? tab.label : tab.id}\r\n checked={props.activeTab === tab.id}\r\n disabled={tab.disabled}\r\n onChange={() => !tab.disabled && emit('change', tab.id)}\r\n />,\r\n <div class={getContentClasses()}>\r\n {tab.content}\r\n </div>\r\n ])}\r\n </div>\r\n );\r\n }\r\n \r\n // Without content, use simple button/link tabs\r\n return (\r\n <div role=\"tablist\" class={getContainerClasses()}>\r\n {props.tabs?.map(tab => (\r\n <button\r\n type=\"button\"\r\n role=\"tab\"\r\n class={`tab ${props.activeTab === tab.id ? 'tab-active' : ''} ${tab.disabled ? 'tab-disabled' : ''}`}\r\n disabled={tab.disabled}\r\n onClick={() => !tab.disabled && emit('change', tab.id)}\r\n >\r\n {tab.label}\r\n </button>\r\n ))}\r\n </div>\r\n );\r\n };\r\n});\r\n","import { component, compound, DefineProp, DefineSlot, DefineEvent, defineProvide, defineInjectable, DefineModel } from 'sigx';\r\n\r\nexport type MenuSize = 'xs' | 'sm' | 'md' | 'lg';\r\n\r\nconst menuSizeClasses: Record<MenuSize, string> = {\r\n xs: 'menu-xs',\r\n sm: 'menu-sm',\r\n md: '',\r\n lg: 'menu-lg'\r\n};\r\n\r\nexport type MenuProps = \r\n & DefineModel<string>\r\n & DefineProp<'size', MenuSize, false>\r\n & DefineProp<'horizontal', boolean, false>\r\n & DefineProp<'class', string, false>\r\n & DefineSlot<'default'>\r\n & DefineEvent<'update:modelValue', string>;\r\n\r\nexport type MenuItemProps =\r\n & DefineProp<'value', string, false>\r\n & DefineProp<'active', boolean, false>\r\n & DefineProp<'disabled', boolean, false>\r\n & DefineProp<'class', string, false>\r\n & DefineSlot<'default'>;\r\n\r\nexport type MenuTitleProps =\r\n & DefineProp<'class', string, false>\r\n & DefineSlot<'default'>;\r\n\r\n //const test = defineInjectable(() => { return { item: 'test'} });\r\ntype ItemGetter = (() => string) | undefined;\r\nconst test = defineInjectable((): { model: ItemGetter } => {\r\n return {\r\n model: undefined,\r\n };\r\n});\r\n\r\n/**\r\n * Menu item sub-component for use inside Menu.\r\n * \r\n * @example\r\n * ```tsx\r\n * <Menu.Item value=\"home\"><a>Home</a></Menu.Item>\r\n * <Menu.Item disabled><a>Disabled</a></Menu.Item>\r\n * ```\r\n */\r\nconst MenuItem = component<MenuItemProps>(({ props, slots }) => {\r\n\r\n const me = test();\r\n \r\n const getClasses = () => {\r\n const classes: string[] = [];\r\n if (props.disabled) classes.push('disabled');\r\n if (props.class) classes.push(props.class);\r\n return classes.join(' ') || undefined;\r\n };\r\n\r\n const getAnchorClasses = () => {\r\n const classes: string[] = [];\r\n if (props.active) classes.push('active');\r\n return classes.join(' ') || undefined;\r\n };\r\n\r\n return () => (\r\n <li class={getClasses()} data-value={props.value}>\r\n {slots.default?.()}\r\n </li>\r\n );\r\n});\r\n\r\n/**\r\n * Menu title/header sub-component for grouping menu items.\r\n * \r\n * @example\r\n * ```tsx\r\n * <Menu.Title>Category</Menu.Title>\r\n * ```\r\n */\r\nconst MenuTitle = component<MenuTitleProps>(({ props, slots }) => {\r\n const getClasses = () => {\r\n const classes = ['menu-title'];\r\n if (props.class) classes.push(props.class);\r\n return classes.join(' ');\r\n };\r\n\r\n return () => (\r\n <li class={getClasses()}>\r\n {slots.default?.()}\r\n </li>\r\n );\r\n});\r\n\r\n\r\n\r\n/**\r\n * Menu component with DaisyUI styling. Supports compound sub-components.\r\n * \r\n * @example\r\n * ```tsx\r\n * <Menu model={() => activeItem} size=\"lg\" class=\"bg-base-200 rounded-box w-56\">\r\n * <Menu.Title>Navigation</Menu.Title>\r\n * <Menu.Item value=\"home\"><a>Home</a></Menu.Item>\r\n * <Menu.Item value=\"about\"><a>About</a></Menu.Item>\r\n * <Menu.Item disabled><a>Disabled</a></Menu.Item>\r\n * </Menu>\r\n * ```\r\n */\r\nconst _Menu = component<MenuProps>(({ props, slots, emit }) => {\r\n\r\n const hepp = test();\r\n //hepp.model = props;\r\n \r\n \r\n \r\n const getClasses = () => {\r\n const classes = ['menu'];\r\n \r\n if (props.size) {\r\n const sizeClass = menuSizeClasses[props.size];\r\n if (sizeClass) classes.push(sizeClass);\r\n }\r\n \r\n if (props.horizontal) classes.push('menu-horizontal');\r\n if (props.class) classes.push(props.class);\r\n \r\n return classes.join(' ');\r\n };\r\n\r\n const handleClick = (e: Event) => {\r\n const target = e.target as HTMLElement;\r\n const li = target.closest('li[data-value]');\r\n if (li) {\r\n const value = li.getAttribute('data-value');\r\n if (value && !li.classList.contains('disabled')) {\r\n emit('update:modelValue', value);\r\n }\r\n }\r\n };\r\n\r\n return () => (\r\n <ul class={getClasses()} onClick={handleClick}>\r\n {slots.default?.()}\r\n </ul>\r\n );\r\n});\r\n\r\n/**\r\n * Menu compound component with Item and Title sub-components.\r\n */\r\nexport const Menu = compound(_Menu, {\r\n Item: MenuItem,\r\n Title: MenuTitle,\r\n});\r\n","import { component, DefineProp, DefineSlot } from 'sigx';\r\n\r\nexport type DropdownPosition = 'end' | 'top' | 'bottom' | 'left' | 'right';\r\n\r\nexport type DropdownProps = \r\n & DefineProp<'position', DropdownPosition, false>\r\n & DefineProp<'hover', boolean, false>\r\n & DefineProp<'class', string, false>\r\n & DefineProp<'menuClass', string, false>\r\n & DefineSlot<'trigger'>\r\n & DefineSlot<'default'>;\r\n\r\n/**\r\n * Dropdown component with DaisyUI styling.\r\n * Uses slots for maximum flexibility - any component can be the trigger.\r\n * \r\n * @example\r\n * ```tsx\r\n * <Dropdown\r\n * slots={{\r\n * trigger: () => <Button>Open Menu</Button>\r\n * }}\r\n * >\r\n * <a>Item 1</a>\r\n * <a>Item 2</a>\r\n * </Dropdown>\r\n * ```\r\n * \r\n * @example With Menu component\r\n * ```tsx\r\n * <Dropdown\r\n * position=\"end\"\r\n * slots={{\r\n * trigger: () => <Button variant=\"primary\">Actions</Button>\r\n * }}\r\n * >\r\n * <Menu class=\"w-52\">\r\n * <Menu.Item><a>Edit</a></Menu.Item>\r\n * <Menu.Item><a>Delete</a></Menu.Item>\r\n * </Menu>\r\n * </Dropdown>\r\n * ```\r\n */\r\nexport const Dropdown = component<DropdownProps>(({ props, slots }) => {\r\n const getClasses = () => {\r\n const classes = ['dropdown'];\r\n \r\n if (props.position === 'end') classes.push('dropdown-end');\r\n if (props.position === 'top') classes.push('dropdown-top');\r\n if (props.position === 'left') classes.push('dropdown-left');\r\n if (props.position === 'right') classes.push('dropdown-right');\r\n if (props.hover) classes.push('dropdown-hover');\r\n if (props.class) classes.push(props.class);\r\n \r\n return classes.join(' ');\r\n };\r\n\r\n const getMenuClasses = () => {\r\n const classes = ['dropdown-content', 'z-[1]', 'menu', 'p-2', 'shadow', 'bg-base-100', 'rounded-box'];\r\n if (props.menuClass) classes.push(props.menuClass);\r\n return classes.join(' ');\r\n };\r\n\r\n return () => (\r\n <div class={getClasses()}>\r\n {slots.trigger && (\r\n <div tabIndex={0} role=\"button\">\r\n {slots.trigger()}\r\n </div>\r\n )}\r\n <ul tabIndex={0} class={getMenuClasses()}>\r\n {slots.default?.()}\r\n </ul>\r\n </div>\r\n );\r\n});\r\n","import { component, DefineProp, DefineModel, DefineSlot } from 'sigx';\r\n\r\nexport type DrawerProps = \r\n & DefineModel<boolean>\r\n & DefineProp<'side', 'left' | 'right', false>\r\n & DefineProp<'responsive', boolean, false>\r\n & DefineProp<'class', string, false>\r\n & DefineSlot<'default'>\r\n & DefineSlot<'side'>;\r\n\r\n/**\r\n * Drawer component with DaisyUI styling.\r\n * Slide-out side panel for navigation, filters, and mobile menus.\r\n * \r\n * @example\r\n * ```tsx\r\n * const open = signal(false);\r\n * <Drawer \r\n * model={open} \r\n * slots={{\r\n * side: () => <Menu items={navItems} />\r\n * }}\r\n * >\r\n * <main>Main content</main>\r\n * </Drawer>\r\n * ```\r\n */\r\nexport const Drawer = component<DrawerProps>(({ props, slots, emit }) => {\r\n const drawerId = `drawer-${Math.random().toString(36).slice(2)}`;\r\n\r\n const handleCheckboxChange = (e: Event) => {\r\n const checked = (e.target as HTMLInputElement).checked;\r\n if (props.model) props.model.value = checked;\r\n };\r\n\r\n return () => {\r\n const classes = ['drawer'];\r\n if (props.side === 'right') classes.push('drawer-end');\r\n if (props.responsive) classes.push('lg:drawer-open');\r\n if (props.class) classes.push(props.class);\r\n\r\n // Determine drawer side classes - add z-index for proper layering\r\n const drawerSideClasses = ['drawer-side', 'z-[999]'];\r\n // If not responsive, we need the drawer-side to respect the toggle\r\n // The DaisyUI CSS handles visibility via :checked ~ .drawer-side\r\n\r\n return (\r\n <div class={classes.join(' ')}>\r\n <input \r\n id={drawerId} \r\n type=\"checkbox\" \r\n class=\"drawer-toggle\" \r\n checked={props.model?.value ?? false}\r\n onChange={handleCheckboxChange}\r\n />\r\n <div class=\"drawer-content\">\r\n {slots.default?.()}\r\n </div>\r\n <div class={drawerSideClasses.join(' ')}>\r\n <label \r\n htmlFor={drawerId} \r\n aria-label=\"close sidebar\" \r\n class=\"drawer-overlay\"\r\n ></label>\r\n {slots.side?.()}\r\n </div>\r\n </div>\r\n );\r\n };\r\n});\r\n","import { component, DefineProp, DefineEvent } from 'sigx';\r\n\r\nexport interface BreadcrumbItem {\r\n id: string;\r\n label: string;\r\n href?: string;\r\n}\r\n\r\nexport type BreadcrumbsProps = \r\n & DefineProp<'items', BreadcrumbItem[]>\r\n & DefineProp<'class', string, false>\r\n & DefineEvent<'navigate', string>;\r\n\r\n/**\r\n * Breadcrumbs component with DaisyUI styling.\r\n * \r\n * @example\r\n * ```tsx\r\n * const items = [\r\n * { id: 'home', label: 'Home', href: '/' },\r\n * { id: 'docs', label: 'Docs', href: '/docs' },\r\n * { id: 'current', label: 'Current Page' }\r\n * ];\r\n * <Breadcrumbs items={items} onNavigate={(id) => navigate(id)} />\r\n * ```\r\n */\r\nexport const Breadcrumbs = component<BreadcrumbsProps>(({ props, emit }) => {\r\n const getClasses = () => {\r\n const classes = ['breadcrumbs', 'text-sm'];\r\n if (props.class) classes.push(props.class);\r\n return classes.join(' ');\r\n };\r\n\r\n return () => (\r\n <div class={getClasses()}>\r\n <ul>\r\n {props.items?.map(item => (\r\n <li>\r\n <a onClick={() => emit('navigate', item.id)}>\r\n {item.label}\r\n </a>\r\n </li>\r\n ))}\r\n </ul>\r\n </div>\r\n );\r\n});\r\n","import { component, DefineProp, DefineSlot } from 'sigx';\r\n\r\nexport type NavbarProps = \r\n & DefineProp<'class', string, false>\r\n & DefineSlot<'start'>\r\n & DefineSlot<'center'>\r\n & DefineSlot<'end'>;\r\n\r\n/**\r\n * Navbar component with DaisyUI styling.\r\n * \r\n * @example\r\n * ```tsx\r\n * <Navbar\r\n * slots={{\r\n * start: () => <a class=\"btn btn-ghost text-xl\">Logo</a>,\r\n * end: () => <Button>Login</Button>\r\n * }}\r\n * />\r\n * ```\r\n */\r\nexport const Navbar = component<NavbarProps>(({ props, slots }) => {\r\n const getClasses = () => {\r\n const classes = ['navbar', 'bg-base-100'];\r\n if (props.class) classes.push(props.class);\r\n return classes.join(' ');\r\n };\r\n\r\n return () => (\r\n <div class={getClasses()}>\r\n {slots.start && <div class=\"navbar-start\">{slots.start()}</div>}\r\n {slots.center && <div class=\"navbar-center\">{slots.center()}</div>}\r\n {slots.end && <div class=\"navbar-end\">{slots.end()}</div>}\r\n </div>\r\n );\r\n});\r\n","import { component, DefineProp, DefineEvent } from 'sigx';\r\n\r\nexport type PaginationProps = \r\n & DefineProp<'currentPage', number>\r\n & DefineProp<'totalPages', number>\r\n & DefineProp<'class', string, false>\r\n & DefineEvent<'change', number>;\r\n\r\n/**\r\n * Pagination component with DaisyUI styling.\r\n * \r\n * @example\r\n * ```tsx\r\n * <Pagination currentPage={1} totalPages={10} onChange={(page) => setPage(page)} />\r\n * ```\r\n */\r\nexport const Pagination = component<PaginationProps>(({ props, emit }) => {\r\n const getClasses = () => {\r\n const classes = ['join'];\r\n if (props.class) classes.push(props.class);\r\n return classes.join(' ');\r\n };\r\n\r\n const getPages = () => {\r\n const pages: (number | '...')[] = [];\r\n const current = props.currentPage ?? 1;\r\n const total = props.totalPages ?? 1;\r\n \r\n if (total <= 7) {\r\n for (let i = 1; i <= total; i++) {\r\n pages.push(i);\r\n }\r\n } else {\r\n if (current <= 4) {\r\n for (let i = 1; i <= 5; i++) pages.push(i);\r\n pages.push('...');\r\n pages.push(total);\r\n } else if (current >= total - 3) {\r\n pages.push(1);\r\n pages.push('...');\r\n for (let i = total - 4; i <= total; i++) pages.push(i);\r\n } else {\r\n pages.push(1);\r\n pages.push('...');\r\n for (let i = current - 1; i <= current + 1; i++) pages.push(i);\r\n pages.push('...');\r\n pages.push(total);\r\n }\r\n }\r\n \r\n return pages;\r\n };\r\n\r\n return () => (\r\n <div class={getClasses()}>\r\n {getPages().map(page => \r\n page === '...' ? (\r\n <button class=\"join-item btn btn-disabled\">...</button>\r\n ) : (\r\n <button \r\n class={`join-item btn ${page === props.currentPage ? 'btn-active' : ''}`}\r\n onClick={() => emit('change', page)}\r\n >\r\n {page}\r\n </button>\r\n )\r\n )}\r\n </div>\r\n );\r\n});\r\n"],"mappings":";;AAwBA,IAAM,kBAA4C;CAC9C,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACP;AAED,IAAI,cAAc;AAwBlB,MAAa,OAAO,WAAsB,EAAE,OAAO,WAAW;CAE1D,MAAM,aAAa,EAAE;CACrB,MAAM,wBAAwB,MAAM,QAAQ,aAAa;CAEzD,MAAM,mBAAmB,MAAM,MAAM,MAAK,QAAO,IAAI,WAAW,KAAK;CAErE,MAAM,4BAA4B;EAC9B,MAAM,UAAU,CAAC,OAAO;AAGxB,MAAI,MAAM,YA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B,SAAS,MAAM,cAAc,eAAe;GACpE,eAAe,KAAK,UAAU,KAAK;aAElC;IACI,CAEhB;GACC;EAEZ"}
@@ -0,0 +1,79 @@
1
+ import { DefineProp } from 'sigx';
2
+ /** Spacing scale values (matches Tailwind spacing) */
3
+ export type SpacingValue = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '8' | '10' | '12';
4
+ /** Directional spacing object */
5
+ export type SpacingObject = {
6
+ /** All sides */
7
+ all?: SpacingValue;
8
+ /** Horizontal (left + right) */
9
+ x?: SpacingValue;
10
+ /** Vertical (top + bottom) */
11
+ y?: SpacingValue;
12
+ /** Top only */
13
+ top?: SpacingValue;
14
+ /** Right only */
15
+ right?: SpacingValue;
16
+ /** Bottom only */
17
+ bottom?: SpacingValue;
18
+ /** Left only */
19
+ left?: SpacingValue;
20
+ };
21
+ /** Flexible spacing - can be a single value or directional object */
22
+ export type Spacing = SpacingValue | SpacingObject;
23
+ /** Resolves spacing to Tailwind classes */
24
+ export declare function resolveSpacing(value: Spacing | undefined, prefix: 'p' | 'm' | 'gap'): string[];
25
+ /** Border radius values */
26
+ export type RadiusValue = 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full' | 'box';
27
+ /** Resolves radius to Tailwind class */
28
+ export declare function resolveRadius(value: RadiusValue | boolean | undefined): string | undefined;
29
+ /** Predefined Tailwind size values */
30
+ export type TailwindSizeValue = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '8' | '10' | '12' | '16' | '20' | '24' | '32' | '40' | '48' | '56' | '64' | '72' | '80' | '96' | 'auto' | 'full' | 'screen' | 'min' | 'max' | 'fit' | '1/2' | '1/3' | '2/3' | '1/4' | '2/4' | '3/4' | '1/5' | '2/5' | '3/5' | '4/5' | '1/6' | '5/6';
31
+ /**
32
+ * Size value - can be a Tailwind preset or arbitrary CSS value.
33
+ *
34
+ * @example
35
+ * // Tailwind presets
36
+ * width="48" // w-48 (12rem)
37
+ * width="full" // w-full (100%)
38
+ * width="1/2" // w-1/2 (50%)
39
+ *
40
+ * // Arbitrary CSS values (applied as inline styles)
41
+ * width="400px" // style="width: 400px"
42
+ * width="70%" // style="width: 70%"
43
+ * width="calc(100% - 2rem)" // style="width: calc(100% - 2rem)"
44
+ */
45
+ export type SizeValue = TailwindSizeValue | (string & {});
46
+ /** Result of resolving a size - either a class or inline style */
47
+ export type SizeResult = {
48
+ class?: string;
49
+ style?: {
50
+ property: string;
51
+ value: string;
52
+ };
53
+ };
54
+ /**
55
+ * Resolves size to Tailwind class OR inline style for arbitrary values.
56
+ * Tailwind presets become classes, arbitrary CSS values become inline styles.
57
+ */
58
+ export declare function resolveSize(value: SizeValue | undefined, prefix: 'w' | 'h' | 'min-w' | 'min-h' | 'max-w' | 'max-h'): SizeResult;
59
+ /** DaisyUI semantic background colors */
60
+ export type BackgroundColor = 'base-100' | 'base-200' | 'base-300' | 'primary' | 'secondary' | 'accent' | 'neutral' | 'info' | 'success' | 'warning' | 'error';
61
+ /** Resolves background to Tailwind classes (bg + text color) */
62
+ export declare function resolveBackground(value: BackgroundColor | undefined): string[];
63
+ /** Common styling props that can be mixed into any component */
64
+ export type StyleProps = DefineProp<'padding', Spacing, false> & DefineProp<'margin', Spacing, false> & DefineProp<'rounded', RadiusValue | boolean, false> & DefineProp<'background', BackgroundColor, false> & DefineProp<'class', string, false>;
65
+ /** Resolves all style props to class array */
66
+ export declare function resolveStyleProps(props: {
67
+ padding?: Spacing;
68
+ margin?: Spacing;
69
+ rounded?: RadiusValue | boolean;
70
+ background?: BackgroundColor;
71
+ class?: string;
72
+ }): string[];
73
+ export type FlexAlign = 'start' | 'center' | 'end' | 'stretch' | 'baseline';
74
+ export type FlexJustify = 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
75
+ export type FlexDirection = 'row' | 'col' | 'row-reverse' | 'col-reverse';
76
+ export declare const alignClasses: Record<FlexAlign, string>;
77
+ export declare const justifyClasses: Record<FlexJustify, string>;
78
+ export declare const directionClasses: Record<FlexDirection, string>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[`${prefix}-${value}`];
4
+ const classes = [];
5
+ if (value.all) classes.push(`${prefix}-${value.all}`);
6
+ if (value.x) classes.push(`${prefix}x-${value.x}`);
7
+ if (value.y) classes.push(`${prefix}y-${value.y}`);
8
+ if (value.top) classes.push(`${prefix}t-${value.top}`);
9
+ if (value.right) classes.push(`${prefix}r-${value.right}`);
10
+ if (value.bottom) classes.push(`${prefix}b-${value.bottom}`);
11
+ if (value.left) classes.push(`${prefix}l-${value.left}`);
12
+ return classes;
13
+ }
14
+ function resolveRadius(value) {
15
+ if (value === void 0) return void 0;
16
+ if (value === true) return "rounded-box";
17
+ if (value === false) return void 0;
18
+ return {
19
+ "none": "rounded-none",
20
+ "sm": "rounded-sm",
21
+ "md": "rounded-md",
22
+ "lg": "rounded-lg",
23
+ "xl": "rounded-xl",
24
+ "2xl": "rounded-2xl",
25
+ "3xl": "rounded-3xl",
26
+ "full": "rounded-full",
27
+ "box": "rounded-box"
28
+ }[value];
29
+ }
30
+ var tailwindSizes = new Set([
31
+ "0",
32
+ "1",
33
+ "2",
34
+ "3",
35
+ "4",
36
+ "5",
37
+ "6",
38
+ "8",
39
+ "10",
40
+ "12",
41
+ "16",
42
+ "20",
43
+ "24",
44
+ "32",
45
+ "40",
46
+ "48",
47
+ "56",
48
+ "64",
49
+ "72",
50
+ "80",
51
+ "96",
52
+ "auto",
53
+ "full",
54
+ "screen",
55
+ "min",
56
+ "max",
57
+ "fit",
58
+ "1/2",
59
+ "1/3",
60
+ "2/3",
61
+ "1/4",
62
+ "2/4",
63
+ "3/4",
64
+ "1/5",
65
+ "2/5",
66
+ "3/5",
67
+ "4/5",
68
+ "1/6",
69
+ "5/6"
70
+ ]);
71
+ var sizeCssProps = {
72
+ "w": "width",
73
+ "h": "height",
74
+ "min-w": "minWidth",
75
+ "min-h": "minHeight",
76
+ "max-w": "maxWidth",
77
+ "max-h": "maxHeight"
78
+ };
79
+ function resolveSize(value, prefix) {
80
+ if (!value) return {};
81
+ if (tailwindSizes.has(value)) return { class: `${prefix}-${value}` };
82
+ return { style: {
83
+ property: sizeCssProps[prefix],
84
+ value
85
+ } };
86
+ }
87
+ function resolveBackground(value) {
88
+ if (!value) return [];
89
+ return {
90
+ "base-100": ["bg-base-100"],
91
+ "base-200": ["bg-base-200"],
92
+ "base-300": ["bg-base-300"],
93
+ "primary": ["bg-primary", "text-primary-content"],
94
+ "secondary": ["bg-secondary", "text-secondary-content"],
95
+ "accent": ["bg-accent", "text-accent-content"],
96
+ "neutral": ["bg-neutral", "text-neutral-content"],
97
+ "info": ["bg-info", "text-info-content"],
98
+ "success": ["bg-success", "text-success-content"],
99
+ "warning": ["bg-warning", "text-warning-content"],
100
+ "error": ["bg-error", "text-error-content"]
101
+ }[value];
102
+ }
103
+ const alignClasses = {
104
+ start: "items-start",
105
+ center: "items-center",
106
+ end: "items-end",
107
+ stretch: "items-stretch",
108
+ baseline: "items-baseline"
109
+ };
110
+ const justifyClasses = {
111
+ start: "justify-start",
112
+ center: "justify-center",
113
+ end: "justify-end",
114
+ between: "justify-between",
115
+ around: "justify-around",
116
+ evenly: "justify-evenly"
117
+ };
118
+ const directionClasses = {
119
+ "row": "flex-row",
120
+ "col": "flex-col",
121
+ "row-reverse": "flex-row-reverse",
122
+ "col-reverse": "flex-col-reverse"
123
+ };
124
+ export { resolveRadius as a, resolveBackground as i, directionClasses as n, resolveSize as o, justifyClasses as r, resolveSpacing as s, alignClasses as t };
125
+
126
+ //# sourceMappingURL=styles-DFkMxi90.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles-DFkMxi90.js","names":[],"sources":["../src/shared/styles.ts"],"sourcesContent":["import { DefineProp } from 'sigx';\r\n\r\n// ============================================================================\r\n// Spacing System\r\n// ============================================================================\r\n\r\n/** Spacing scale values (matches Tailwind spacing) */\r\nexport type SpacingValue = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '8' | '10' | '12';\r\n\r\n/** Directional spacing object */\r\nexport type SpacingObject = {\r\n /** All sides */\r\n all?: SpacingValue;\r\n /** Horizontal (left + right) */\r\n x?: SpacingValue;\r\n /** Vertical (top + bottom) */\r\n y?: SpacingValue;\r\n /** Top only */\r\n top?: SpacingValue;\r\n /** Right only */\r\n right?: SpacingValue;\r\n /** Bottom only */\r\n bottom?: SpacingValue;\r\n /** Left only */\r\n left?: SpacingValue;\r\n};\r\n\r\n/** Flexible spacing - can be a single value or directional object */\r\nexport type Spacing = SpacingValue | SpacingObject;\r\n\r\n/** Resolves spacing to Tailwind classes */\r\nexport function resolveSpacing(\r\n value: Spacing | undefined, \r\n prefix: 'p' | 'm' | 'gap'\r\n): string[] {\r\n if (!value) return [];\r\n \r\n // Simple value\r\n if (typeof value === 'string') {\r\n return [`${prefix}-${value}`];\r\n }\r\n \r\n const classes: string[] = [];\r\n \r\n // Process object form with precedence: individual > x/y > all\r\n if (value.all) {\r\n classes.push(`${prefix}-${value.all}`);\r\n }\r\n \r\n if (value.x) {\r\n classes.push(`${prefix}x-${value.x}`);\r\n }\r\n if (value.y) {\r\n classes.push(`${prefix}y-${value.y}`);\r\n }\r\n \r\n if (value.top) {\r\n classes.push(`${prefix}t-${value.top}`);\r\n }\r\n if (value.right) {\r\n classes.push(`${prefix}r-${value.right}`);\r\n }\r\n if (value.bottom) {\r\n classes.push(`${prefix}b-${value.bottom}`);\r\n }\r\n if (value.left) {\r\n classes.push(`${prefix}l-${value.left}`);\r\n }\r\n \r\n return classes;\r\n}\r\n\r\n// ============================================================================\r\n// Border Radius\r\n// ============================================================================\r\n\r\n/** Border radius values */\r\nexport type RadiusValue = 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full' | 'box';\r\n\r\n/** Resolves radius to Tailwind class */\r\nexport function resolveRadius(value: RadiusValue | boolean | undefined): string | undefined {\r\n if (value === undefined) return undefined;\r\n if (value === true) return 'rounded-box';\r\n if (value === false) return undefined;\r\n \r\n const radiusMap: Record<RadiusValue, string> = {\r\n 'none': 'rounded-none',\r\n 'sm': 'rounded-sm',\r\n 'md': 'rounded-md',\r\n 'lg': 'rounded-lg',\r\n 'xl': 'rounded-xl',\r\n '2xl': 'rounded-2xl',\r\n '3xl': 'rounded-3xl',\r\n 'full': 'rounded-full',\r\n 'box': 'rounded-box',\r\n };\r\n \r\n return radiusMap[value];\r\n}\r\n\r\n// ============================================================================\r\n// Size (Width / Height)\r\n// ============================================================================\r\n\r\n/** Predefined Tailwind size values */\r\nexport type TailwindSizeValue = \r\n | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '8' | '10' | '12' | '16' | '20' | '24' | '32' | '40' | '48' | '56' | '64' | '72' | '80' | '96'\r\n | 'auto' | 'full' | 'screen' | 'min' | 'max' | 'fit'\r\n | '1/2' | '1/3' | '2/3' | '1/4' | '2/4' | '3/4' | '1/5' | '2/5' | '3/5' | '4/5' | '1/6' | '5/6';\r\n\r\n/** \r\n * Size value - can be a Tailwind preset or arbitrary CSS value.\r\n * \r\n * @example\r\n * // Tailwind presets\r\n * width=\"48\" // w-48 (12rem)\r\n * width=\"full\" // w-full (100%)\r\n * width=\"1/2\" // w-1/2 (50%)\r\n * \r\n * // Arbitrary CSS values (applied as inline styles)\r\n * width=\"400px\" // style=\"width: 400px\"\r\n * width=\"70%\" // style=\"width: 70%\"\r\n * width=\"calc(100% - 2rem)\" // style=\"width: calc(100% - 2rem)\"\r\n */\r\nexport type SizeValue = TailwindSizeValue | (string & {});\r\n\r\n/** Set of valid Tailwind size presets for quick lookup */\r\nconst tailwindSizes = new Set<string>([\r\n '0', '1', '2', '3', '4', '5', '6', '8', '10', '12', '16', '20', '24', '32', '40', '48', '56', '64', '72', '80', '96',\r\n 'auto', 'full', 'screen', 'min', 'max', 'fit',\r\n '1/2', '1/3', '2/3', '1/4', '2/4', '3/4', '1/5', '2/5', '3/5', '4/5', '1/6', '5/6'\r\n]);\r\n\r\n/** CSS property names for size prefixes */\r\nconst sizeCssProps: Record<string, string> = {\r\n 'w': 'width',\r\n 'h': 'height',\r\n 'min-w': 'minWidth',\r\n 'min-h': 'minHeight',\r\n 'max-w': 'maxWidth',\r\n 'max-h': 'maxHeight',\r\n};\r\n\r\n/** Result of resolving a size - either a class or inline style */\r\nexport type SizeResult = {\r\n class?: string;\r\n style?: { property: string; value: string };\r\n};\r\n\r\n/** \r\n * Resolves size to Tailwind class OR inline style for arbitrary values.\r\n * Tailwind presets become classes, arbitrary CSS values become inline styles.\r\n */\r\nexport function resolveSize(value: SizeValue | undefined, prefix: 'w' | 'h' | 'min-w' | 'min-h' | 'max-w' | 'max-h'): SizeResult {\r\n if (!value) return {};\r\n \r\n // Check if it's a predefined Tailwind value\r\n if (tailwindSizes.has(value)) {\r\n return { class: `${prefix}-${value}` };\r\n }\r\n \r\n // Otherwise, treat as arbitrary CSS value - use inline style\r\n return { \r\n style: { \r\n property: sizeCssProps[prefix], \r\n value \r\n } \r\n };\r\n}\r\n\r\n// ============================================================================\r\n// Colors / Background\r\n// ============================================================================\r\n\r\n/** DaisyUI semantic background colors */\r\nexport type BackgroundColor = \r\n | 'base-100' | 'base-200' | 'base-300'\r\n | 'primary' | 'secondary' | 'accent' | 'neutral'\r\n | 'info' | 'success' | 'warning' | 'error';\r\n\r\n/** Resolves background to Tailwind classes (bg + text color) */\r\nexport function resolveBackground(value: BackgroundColor | undefined): string[] {\r\n if (!value) return [];\r\n \r\n const bgMap: Record<BackgroundColor, string[]> = {\r\n 'base-100': ['bg-base-100'],\r\n 'base-200': ['bg-base-200'],\r\n 'base-300': ['bg-base-300'],\r\n 'primary': ['bg-primary', 'text-primary-content'],\r\n 'secondary': ['bg-secondary', 'text-secondary-content'],\r\n 'accent': ['bg-accent', 'text-accent-content'],\r\n 'neutral': ['bg-neutral', 'text-neutral-content'],\r\n 'info': ['bg-info', 'text-info-content'],\r\n 'success': ['bg-success', 'text-success-content'],\r\n 'warning': ['bg-warning', 'text-warning-content'],\r\n 'error': ['bg-error', 'text-error-content'],\r\n };\r\n \r\n return bgMap[value];\r\n}\r\n\r\n// ============================================================================\r\n// Common Style Props (reusable across components)\r\n// ============================================================================\r\n\r\n/** Common styling props that can be mixed into any component */\r\nexport type StyleProps = \r\n & DefineProp<'padding', Spacing, false>\r\n & DefineProp<'margin', Spacing, false>\r\n & DefineProp<'rounded', RadiusValue | boolean, false>\r\n & DefineProp<'background', BackgroundColor, false>\r\n & DefineProp<'class', string, false>;\r\n\r\n/** Resolves all style props to class array */\r\nexport function resolveStyleProps(props: {\r\n padding?: Spacing;\r\n margin?: Spacing;\r\n rounded?: RadiusValue | boolean;\r\n background?: BackgroundColor;\r\n class?: string;\r\n}): string[] {\r\n const classes: string[] = [];\r\n \r\n classes.push(...resolveSpacing(props.padding, 'p'));\r\n classes.push(...resolveSpacing(props.margin, 'm'));\r\n \r\n const radiusClass = resolveRadius(props.rounded);\r\n if (radiusClass) classes.push(radiusClass);\r\n \r\n classes.push(...resolveBackground(props.background));\r\n \r\n if (props.class) classes.push(props.class);\r\n \r\n return classes;\r\n}\r\n\r\n// ============================================================================\r\n// Flex-specific utilities\r\n// ============================================================================\r\n\r\nexport type FlexAlign = 'start' | 'center' | 'end' | 'stretch' | 'baseline';\r\nexport type FlexJustify = 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';\r\nexport type FlexDirection = 'row' | 'col' | 'row-reverse' | 'col-reverse';\r\n\r\nexport const alignClasses: Record<FlexAlign, string> = {\r\n start: 'items-start',\r\n center: 'items-center',\r\n end: 'items-end',\r\n stretch: 'items-stretch',\r\n baseline: 'items-baseline',\r\n};\r\n\r\nexport const justifyClasses: Record<FlexJustify, string> = {\r\n start: 'justify-start',\r\n center: 'justify-center',\r\n end: 'justify-end',\r\n between: 'justify-between',\r\n around: 'justify-around',\r\n evenly: 'justify-evenly',\r\n};\r\n\r\nexport const directionClasses: Record<FlexDirection, string> = {\r\n 'row': 'flex-row',\r\n 'col': 'flex-col',\r\n 'row-reverse': 'flex-row-reverse',\r\n 'col-reverse': 'flex-col-reverse',\r\n};\r\n"],"mappings":"AA+BA,SAAgB,eACZ,OACA,QACQ;A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