@theweekendprojects/emvb-daisyui 0.0.0-stage → 0.2.1

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 (55) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +106 -2
  3. package/licenses/daisyui-MIT.txt +3 -0
  4. package/package.json +55 -4
  5. package/src/catalog/basic.ts +407 -0
  6. package/src/catalog/class-names.ts +623 -0
  7. package/src/catalog/countdown.ts +392 -0
  8. package/src/catalog/data-display.ts +563 -0
  9. package/src/catalog/forms.ts +433 -0
  10. package/src/catalog/index.ts +77 -0
  11. package/src/catalog/interactive.ts +567 -0
  12. package/src/catalog/layout-marketing.ts +641 -0
  13. package/src/catalog/missing-complex.ts +430 -0
  14. package/src/catalog/missing-primitives.ts +409 -0
  15. package/src/catalog/navigation.ts +438 -0
  16. package/src/catalog/value-class.ts +20 -0
  17. package/src/compatibility/index.ts +104 -0
  18. package/src/compound/editor.ts +299 -0
  19. package/src/compound/index.ts +157 -0
  20. package/src/conformance/cli.ts +9 -0
  21. package/src/conformance/compile.ts +77 -0
  22. package/src/conformance/index.ts +4 -0
  23. package/src/conformance/manifest.ts +39 -0
  24. package/src/conformance/official-inventory.ts +135 -0
  25. package/src/conformance/report-cli.ts +5 -0
  26. package/src/conformance/report.ts +59 -0
  27. package/src/conformance/verify-css.ts +22 -0
  28. package/src/extension/class-token.ts +11 -0
  29. package/src/extension/classes.ts +636 -0
  30. package/src/extension/collect-classes.ts +73 -0
  31. package/src/extension/content.ts +93 -0
  32. package/src/extension/daisy.css +12441 -0
  33. package/src/extension/daisy.js +1 -0
  34. package/src/extension/elements.ts +262 -0
  35. package/src/extension/index.ts +39 -0
  36. package/src/extension/to-output.ts +113 -0
  37. package/src/generator/artifacts.ts +81 -0
  38. package/src/generator/class-names.ts +35 -0
  39. package/src/generator/cli.ts +21 -0
  40. package/src/generator/generate.ts +122 -0
  41. package/src/generator/index.ts +2 -0
  42. package/src/generator/write-class-names.ts +10 -0
  43. package/src/index.ts +12 -0
  44. package/src/render/classes.ts +48 -0
  45. package/src/render/href.ts +19 -0
  46. package/src/render/index.ts +3 -0
  47. package/src/render/provider.ts +37 -0
  48. package/src/renderer.ts +6 -0
  49. package/src/runtime/browser.ts +11 -0
  50. package/src/runtime/index.ts +41 -0
  51. package/src/test-support.ts +13 -0
  52. package/src/themes/index.ts +72 -0
  53. package/src/types.ts +116 -0
  54. package/src/validation/index.ts +153 -0
  55. package/src/verified/primitives.ts +62 -0
@@ -0,0 +1,299 @@
1
+ import type { DaisyComponentNode, DaisyProps } from "../types.ts";
2
+
3
+ export type CompoundRootId = "menu" | "tabs" | "accordion" | "table" | "carousel";
4
+ export interface CompoundConfig {
5
+ part: string;
6
+ label: string;
7
+ richContent: boolean;
8
+ fields: readonly string[];
9
+ }
10
+ export const COMPOUND_CONFIG: Readonly<Record<CompoundRootId, CompoundConfig>> = {
11
+ menu: {
12
+ part: "menu-item",
13
+ label: "Menu item",
14
+ richContent: false,
15
+ fields: ["label", "href", "disabled"],
16
+ },
17
+ tabs: { part: "tab-item", label: "Tab", richContent: true, fields: ["label", "selected"] },
18
+ accordion: {
19
+ part: "accordion-item",
20
+ label: "Accordion item",
21
+ richContent: true,
22
+ fields: ["label", "defaultOpen"],
23
+ },
24
+ table: { part: "table-row", label: "Row", richContent: true, fields: [] },
25
+ carousel: { part: "carousel-item", label: "Slide", richContent: true, fields: ["label"] },
26
+ };
27
+ /** Layers-panel names for compound parts, so each item reads as its part, not "Provider component". */
28
+ export const COMPOUND_PART_LABELS: Readonly<Record<string, string>> = {
29
+ "menu-item": "Menu item",
30
+ "tab-item": "Tab",
31
+ "accordion-item": "Accordion item",
32
+ "table-row": "Row",
33
+ "carousel-item": "Slide",
34
+ };
35
+ export const compoundConfig = (component: string): CompoundConfig | undefined =>
36
+ COMPOUND_CONFIG[component as CompoundRootId];
37
+ export const compoundPartFor = (component: string): string | undefined =>
38
+ compoundConfig(component)?.part;
39
+ export const supportsCompoundEditor = (component: string): component is CompoundRootId =>
40
+ component in COMPOUND_CONFIG;
41
+
42
+ const defaultsFor = (part: string): DaisyProps =>
43
+ part === "menu-item"
44
+ ? { label: "Item", href: "#", disabled: false }
45
+ : part === "tab-item"
46
+ ? { label: "Tab", selected: false }
47
+ : part === "accordion-item"
48
+ ? { label: "Question", defaultOpen: false }
49
+ : part === "carousel-item"
50
+ ? { label: "Slide" }
51
+ : {};
52
+ export function addCompoundItem(
53
+ parent: DaisyComponentNode,
54
+ id: string,
55
+ props: DaisyProps = {},
56
+ ): DaisyComponentNode {
57
+ const component = compoundPartFor(parent.component);
58
+ if (!component) return parent;
59
+ return {
60
+ ...parent,
61
+ children: [
62
+ ...(parent.children ?? []),
63
+ {
64
+ id,
65
+ type: "provider",
66
+ provider: "daisyui",
67
+ component,
68
+ editorLabel: COMPOUND_PART_LABELS[component],
69
+ props: { ...defaultsFor(component), ...props },
70
+ children: [],
71
+ },
72
+ ],
73
+ };
74
+ }
75
+ export function duplicateCompoundItem(
76
+ parent: DaisyComponentNode,
77
+ id: string,
78
+ newId: () => string,
79
+ ): DaisyComponentNode {
80
+ const children = [...(parent.children ?? [])];
81
+ const index = children.findIndex((child) => child.id === id);
82
+ if (index < 0) return parent;
83
+ const clone = (node: DaisyComponentNode): DaisyComponentNode => ({
84
+ ...node,
85
+ id: newId(),
86
+ children: node.children?.map(clone),
87
+ });
88
+ const original = children[index];
89
+ if (!original) return parent;
90
+ children.splice(index + 1, 0, clone(original));
91
+ return { ...parent, children };
92
+ }
93
+ function withProps(child: DaisyComponentNode, props: DaisyProps): DaisyComponentNode {
94
+ return { ...child, props: { ...child.props, ...props } };
95
+ }
96
+ function withChildren(
97
+ child: DaisyComponentNode,
98
+ children: DaisyComponentNode[],
99
+ ): DaisyComponentNode {
100
+ return { ...child, children };
101
+ }
102
+ export function removeCompoundItem(parent: DaisyComponentNode, id: string): DaisyComponentNode {
103
+ return { ...parent, children: (parent.children ?? []).filter((child) => child.id !== id) };
104
+ }
105
+ export function moveCompoundItem(
106
+ parent: DaisyComponentNode,
107
+ id: string,
108
+ delta: -1 | 1,
109
+ ): DaisyComponentNode {
110
+ const children = [...(parent.children ?? [])];
111
+ const from = children.findIndex((child) => child.id === id);
112
+ const to = from + delta;
113
+ if (from < 0 || to < 0 || to >= children.length) return parent;
114
+ const moved = children[from];
115
+ const displaced = children[to];
116
+ if (!moved || !displaced) return parent;
117
+ children[from] = displaced;
118
+ children[to] = moved;
119
+ return { ...parent, children };
120
+ }
121
+ export function moveCompoundItemTo(
122
+ parent: DaisyComponentNode,
123
+ id: string,
124
+ targetId: string,
125
+ ): DaisyComponentNode {
126
+ const children = [...(parent.children ?? [])];
127
+ const from = children.findIndex((child) => child.id === id);
128
+ const to = children.findIndex((child) => child.id === targetId);
129
+ if (from < 0 || to < 0 || from === to) return parent;
130
+ const [item] = children.splice(from, 1);
131
+ if (item) children.splice(to, 0, item);
132
+ return { ...parent, children };
133
+ }
134
+ export function updateCompoundItem(
135
+ parent: DaisyComponentNode,
136
+ id: string,
137
+ props: DaisyProps,
138
+ ): DaisyComponentNode {
139
+ return {
140
+ ...parent,
141
+ children: (parent.children ?? []).map((child) =>
142
+ child.id === id ? withProps(child, props) : child,
143
+ ),
144
+ };
145
+ }
146
+ export function updateCompoundItemChildren(
147
+ parent: DaisyComponentNode,
148
+ id: string,
149
+ children: DaisyComponentNode[],
150
+ ): DaisyComponentNode {
151
+ return {
152
+ ...parent,
153
+ children: (parent.children ?? []).map((child) =>
154
+ child.id === id ? withChildren(child, children) : child,
155
+ ),
156
+ };
157
+ }
158
+
159
+ export interface CompoundIssue {
160
+ nodeId: string;
161
+ code: "wrong-part" | "duplicate-id" | "tab-selection" | "empty-table-row";
162
+ message: string;
163
+ }
164
+ export function validateCompoundTree(parent: DaisyComponentNode): CompoundIssue[] {
165
+ const config = compoundConfig(parent.component);
166
+ if (!config) return [];
167
+ const issues: CompoundIssue[] = [];
168
+ const ids = new Set<string>();
169
+ let selected = 0;
170
+ for (const child of parent.children ?? []) {
171
+ if (ids.has(child.id))
172
+ issues.push({
173
+ nodeId: child.id,
174
+ code: "duplicate-id",
175
+ message: `Duplicate item id ${child.id}.`,
176
+ });
177
+ ids.add(child.id);
178
+ if (child.component !== config.part)
179
+ issues.push({
180
+ nodeId: child.id,
181
+ code: "wrong-part",
182
+ message: `${parent.component} accepts ${config.part} children, not ${child.component}.`,
183
+ });
184
+ if (parent.component === "tabs" && child.props.selected === true) selected++;
185
+ if (parent.component === "table" && (child.children?.length ?? 0) === 0)
186
+ issues.push({
187
+ nodeId: child.id,
188
+ code: "empty-table-row",
189
+ message: "Table rows require cells.",
190
+ });
191
+ }
192
+ if (parent.component === "tabs" && (parent.children?.length ?? 0) > 0 && selected !== 1)
193
+ issues.push({
194
+ nodeId: parent.id,
195
+ code: "tab-selection",
196
+ message: "Tabs require exactly one selected item.",
197
+ });
198
+ return issues;
199
+ }
200
+
201
+ export function addTableColumn(
202
+ table: DaisyComponentNode,
203
+ id: () => string,
204
+ heading = "Column",
205
+ ): DaisyComponentNode {
206
+ if (table.component !== "table") return table;
207
+ const children = [...(table.children ?? [])];
208
+ let head = children.find((child) => child.component === "table-head");
209
+ let body = children.find((child) => child.component === "table-body");
210
+ if (!head) {
211
+ head = {
212
+ id: id(),
213
+ type: "provider",
214
+ provider: "daisyui",
215
+ component: "table-head",
216
+ props: {},
217
+ children: [
218
+ {
219
+ id: id(),
220
+ type: "provider",
221
+ provider: "daisyui",
222
+ component: "table-row",
223
+ props: {},
224
+ children: [],
225
+ },
226
+ ],
227
+ };
228
+ children.unshift(head);
229
+ }
230
+ if (!body) {
231
+ body = {
232
+ id: id(),
233
+ type: "provider",
234
+ provider: "daisyui",
235
+ component: "table-body",
236
+ props: {},
237
+ children: [],
238
+ };
239
+ children.push(body);
240
+ }
241
+ const headerRow = head.children?.[0];
242
+ if (!headerRow) throw new Error("table head has no row");
243
+ headerRow.children = [
244
+ ...(headerRow.children ?? []),
245
+ {
246
+ id: id(),
247
+ type: "provider",
248
+ provider: "daisyui",
249
+ component: "table-header-cell",
250
+ props: { text: heading, scope: "col" },
251
+ },
252
+ ];
253
+ for (const row of body.children ?? [])
254
+ row.children = [
255
+ ...(row.children ?? []),
256
+ {
257
+ id: id(),
258
+ type: "provider",
259
+ provider: "daisyui",
260
+ component: "table-cell",
261
+ props: { text: "Cell" },
262
+ },
263
+ ];
264
+ return { ...table, children };
265
+ }
266
+ export function addTableRow(table: DaisyComponentNode, id: () => string): DaisyComponentNode {
267
+ if (table.component !== "table") return table;
268
+ const children = [...(table.children ?? [])];
269
+ const head = children.find((child) => child.component === "table-head");
270
+ let body = children.find((child) => child.component === "table-body");
271
+ if (!body) {
272
+ body = {
273
+ id: id(),
274
+ type: "provider",
275
+ provider: "daisyui",
276
+ component: "table-body",
277
+ props: {},
278
+ children: [],
279
+ };
280
+ children.push(body);
281
+ }
282
+ const count = head?.children?.[0]?.children?.length ?? 1;
283
+ const row: DaisyComponentNode = {
284
+ id: id(),
285
+ type: "provider",
286
+ provider: "daisyui",
287
+ component: "table-row",
288
+ props: {},
289
+ children: Array.from({ length: count }, () => ({
290
+ id: id(),
291
+ type: "provider",
292
+ provider: "daisyui",
293
+ component: "table-cell",
294
+ props: { text: "Cell" },
295
+ })),
296
+ };
297
+ body.children = [...(body.children ?? []), row];
298
+ return { ...table, children };
299
+ }
@@ -0,0 +1,157 @@
1
+ import type { DaisyComponentNode, DaisyVNode } from "../types.ts";
2
+ import { safeHref } from "../render/href.ts";
3
+
4
+ export const COMPOUND_PARTS = [
5
+ "menu-item",
6
+ "tab-item",
7
+ "accordion-item",
8
+ "table-head",
9
+ "table-body",
10
+ "table-row",
11
+ "table-header-cell",
12
+ "table-cell",
13
+ "carousel-item",
14
+ ] as const;
15
+ export type CompoundPartId = (typeof COMPOUND_PARTS)[number];
16
+ export const isCompoundPart = (id: string): id is CompoundPartId =>
17
+ (COMPOUND_PARTS as readonly string[]).includes(id);
18
+
19
+ const text = (node: DaisyComponentNode, key: string, fallback: string) =>
20
+ String(node.props[key] ?? fallback);
21
+
22
+ export function renderCompoundNode(
23
+ node: DaisyComponentNode,
24
+ renderedChildren: DaisyVNode[] = [],
25
+ ): DaisyVNode {
26
+ switch (node.component) {
27
+ case "menu-item":
28
+ return {
29
+ tag: "li",
30
+ attrs: {},
31
+ children: [
32
+ {
33
+ tag: "a",
34
+ attrs: { href: safeHref(text(node, "href", "#")) },
35
+ children: [text(node, "label", "Item"), ...renderedChildren],
36
+ },
37
+ ],
38
+ };
39
+ case "tab-item": {
40
+ const tabId = `tab-${node.id}`;
41
+ const panelId = `panel-${node.id}`;
42
+ return {
43
+ tag: "div",
44
+ attrs: { class: "contents" },
45
+ children: [
46
+ {
47
+ tag: "button",
48
+ attrs: {
49
+ id: tabId,
50
+ class: "tab",
51
+ role: "tab",
52
+ "aria-controls": panelId,
53
+ "aria-selected": node.props.selected === true ? "true" : "false",
54
+ tabindex: node.props.selected === true ? "0" : "-1",
55
+ },
56
+ children: [text(node, "label", "Tab")],
57
+ },
58
+ {
59
+ tag: "div",
60
+ attrs: {
61
+ id: panelId,
62
+ class: "tab-content",
63
+ role: "tabpanel",
64
+ "aria-labelledby": tabId,
65
+ tabindex: "0",
66
+ },
67
+ children: renderedChildren,
68
+ },
69
+ ],
70
+ };
71
+ }
72
+ case "accordion-item":
73
+ return {
74
+ tag: "details",
75
+ attrs: {
76
+ class: "collapse collapse-arrow",
77
+ ...(node.props.defaultOpen === true ? { open: "" } : {}),
78
+ },
79
+ children: [
80
+ {
81
+ tag: "summary",
82
+ attrs: { class: "collapse-title" },
83
+ children: [text(node, "label", "Question")],
84
+ },
85
+ { tag: "div", attrs: { class: "collapse-content" }, children: renderedChildren },
86
+ ],
87
+ };
88
+ case "table-head":
89
+ return { tag: "thead", attrs: {}, children: renderedChildren };
90
+ case "table-body":
91
+ return { tag: "tbody", attrs: {}, children: renderedChildren };
92
+ case "table-row":
93
+ return { tag: "tr", attrs: {}, children: renderedChildren };
94
+ case "table-header-cell":
95
+ return {
96
+ tag: "th",
97
+ attrs: { scope: text(node, "scope", "col") },
98
+ children: [text(node, "text", "Heading")],
99
+ };
100
+ case "table-cell":
101
+ return { tag: "td", attrs: {}, children: [text(node, "text", "Cell")] };
102
+ case "carousel-item":
103
+ return {
104
+ tag: "div",
105
+ attrs: {
106
+ id: `slide-${node.id}`,
107
+ class: "carousel-item w-full",
108
+ role: "group",
109
+ "aria-label": text(node, "label", "Slide"),
110
+ },
111
+ children: renderedChildren,
112
+ };
113
+ default:
114
+ throw new Error(`Not a compound daisyUI part: ${node.component}`);
115
+ }
116
+ }
117
+
118
+ export function migrateLegacyItems(node: DaisyComponentNode, id: () => string): DaisyComponentNode {
119
+ if (node.children?.length) return node;
120
+ const lines =
121
+ typeof node.props.items === "string"
122
+ ? node.props.items
123
+ .split(/\r?\n/)
124
+ .map((line) => line.trim())
125
+ .filter(Boolean)
126
+ : [];
127
+ if (!lines.length) return node;
128
+ const part =
129
+ node.component === "menu"
130
+ ? "menu-item"
131
+ : node.component === "tabs"
132
+ ? "tab-item"
133
+ : node.component === "accordion"
134
+ ? "accordion-item"
135
+ : node.component === "carousel"
136
+ ? "carousel-item"
137
+ : undefined;
138
+ if (!part) return node;
139
+ const children = lines.map((line, index): DaisyComponentNode => {
140
+ const [label, value = ""] = line.split("|");
141
+ return {
142
+ id: id(),
143
+ type: "provider",
144
+ provider: "daisyui",
145
+ component: part,
146
+ props: {
147
+ label: label || `Item ${index + 1}`,
148
+ ...(part === "menu-item" ? { href: value || "#" } : {}),
149
+ },
150
+ children: [],
151
+ };
152
+ });
153
+ const props = { ...node.props };
154
+ delete props.items;
155
+ return { ...node, props, children };
156
+ }
157
+ export * from "./editor.ts";
@@ -0,0 +1,9 @@
1
+ import { verifyCompiledCss } from "./verify-css.ts";
2
+ const file = process.argv[2];
3
+ if (!file) throw new Error("Usage: bun src/conformance/cli.ts <compiled.css>");
4
+ const result = verifyCompiledCss(await Bun.file(file).text());
5
+ if (!result.ok) {
6
+ console.error(`Missing official selectors: ${result.missing.join(", ")}`);
7
+ process.exit(1);
8
+ }
9
+ console.log(`Verified ${result.checked} official daisyUI selectors.`);
@@ -0,0 +1,77 @@
1
+ /// <reference types="bun" />
2
+ import { mkdir, writeFile } from "node:fs/promises";
3
+ import { dirname, resolve } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+ import { DAISY_COMPONENT_CATALOG } from "../catalog/index.ts";
6
+ import { catalogSupportReport } from "./report.ts";
7
+ import { verifyCompiledCss } from "./verify-css.ts";
8
+
9
+ const here = dirname(fileURLToPath(import.meta.url));
10
+ const pkg = resolve(here, "../..");
11
+ const output = resolve(process.argv[2] ?? `${pkg}/generated/official-daisyui.css`);
12
+ const reportPath = resolve(process.argv[3] ?? `${pkg}/generated/official-conformance.json`);
13
+ await mkdir(dirname(output), { recursive: true });
14
+ await mkdir(resolve(pkg, "conformance"), { recursive: true });
15
+ const classes = new Set<string>();
16
+ for (const definition of DAISY_COMPONENT_CATALOG) {
17
+ definition.rootClass
18
+ .split(/\s+/)
19
+ .filter(Boolean)
20
+ .forEach((value) => classes.add(value));
21
+ for (const field of definition.fields)
22
+ Object.values(field.classMap ?? {})
23
+ .flatMap((value) => value.split(/\s+/))
24
+ .filter(Boolean)
25
+ .forEach((value) => classes.add(value));
26
+ }
27
+ await writeFile(
28
+ resolve(pkg, "conformance/safelist.html"),
29
+ `<main class="${[...classes].toSorted().join(" ")}"></main>\n`,
30
+ );
31
+ const command = [
32
+ "bun",
33
+ "run",
34
+ "--cwd",
35
+ resolve(pkg, "../../demos/cloudflare"),
36
+ "vite",
37
+ "build",
38
+ "--config",
39
+ "daisy-conformance.vite.config.ts",
40
+ ];
41
+ const child = Bun.spawn(command, { cwd: pkg, stdout: "inherit", stderr: "inherit" });
42
+ const exitCode = await child.exited;
43
+ if (exitCode !== 0) throw new Error(`Official CSS compilation failed with exit code ${exitCode}.`);
44
+ const dist = resolve(pkg, "../../demos/cloudflare/dist-daisy-conformance/assets");
45
+ const files = Array.from(new Bun.Glob("*.css").scanSync(dist));
46
+ const [only] = files;
47
+ if (files.length !== 1 || only === undefined)
48
+ throw new Error(`Expected one compiled CSS asset, found ${files.length}.`);
49
+ const compiled = resolve(dist, only);
50
+ await Bun.write(output, Bun.file(compiled));
51
+ const css = await Bun.file(output).text();
52
+ const verifiedBoundary = verifyCompiledCss(css);
53
+ const rootSelectors = DAISY_COMPONENT_CATALOG.map(
54
+ (definition) => `.${definition.rootClass.split(/\s+/)[0]}`,
55
+ ).filter((selector, index, list) => list.indexOf(selector) === index);
56
+ const missingRootSelectors = rootSelectors.filter((selector) => !css.includes(selector));
57
+ const support = catalogSupportReport();
58
+ const report = {
59
+ generatedAt: new Date().toISOString(),
60
+ command,
61
+ cssBytes: new TextEncoder().encode(css).length,
62
+ versions: { daisyui: support.daisyuiVersion, tailwindcss: support.tailwindcssVersion },
63
+ officialTotal: support.officialTotal,
64
+ implemented: support.implemented,
65
+ verifiedBoundary,
66
+ checkedRootSelectors: rootSelectors.length,
67
+ missingRootSelectors,
68
+ ok: verifiedBoundary.ok && missingRootSelectors.length === 0,
69
+ };
70
+ await writeFile(reportPath, `${JSON.stringify(report, null, 2)}\n`);
71
+ if (!report.ok) {
72
+ console.error(JSON.stringify(report, null, 2));
73
+ process.exit(1);
74
+ }
75
+ console.log(
76
+ `Official conformance passed: ${report.checkedRootSelectors} root selectors, ${report.cssBytes} CSS bytes.`,
77
+ );
@@ -0,0 +1,4 @@
1
+ export * from "./manifest.ts";
2
+ export * from "./verify-css.ts";
3
+ export * from "./report.ts";
4
+ export * from "./official-inventory.ts";
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Official-version conformance boundary for the first production-safe subset.
3
+ * Components outside this list remain experimental until markup, CSS, a11y,
4
+ * keyboard, editor/public parity, and upgrade fixtures all pass.
5
+ */
6
+ export const DAISYUI_CONFORMANCE = {
7
+ daisyuiVersion: "5.7.50",
8
+ tailwindcssVersion: "4.1.17",
9
+ catalogVersion: 2,
10
+ verifiedComponents: [
11
+ "button",
12
+ "badge",
13
+ "alert",
14
+ "card",
15
+ "input",
16
+ "textarea",
17
+ "select",
18
+ "checkbox",
19
+ "toggle",
20
+ "progress",
21
+ ],
22
+ requiredSelectors: [
23
+ ".btn",
24
+ ".badge",
25
+ ".alert",
26
+ ".card",
27
+ ".input",
28
+ ".textarea",
29
+ ".select",
30
+ ".checkbox",
31
+ ".toggle",
32
+ ".progress",
33
+ ],
34
+ } as const;
35
+
36
+ export type VerifiedDaisyComponentId = (typeof DAISYUI_CONFORMANCE.verifiedComponents)[number];
37
+ const VERIFIED = new Set<string>(DAISYUI_CONFORMANCE.verifiedComponents);
38
+ export const isVerifiedDaisyComponent = (id: string): id is VerifiedDaisyComponentId =>
39
+ VERIFIED.has(id);