@maestro-js/components 1.0.0-alpha.2 → 1.0.0-alpha.21
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.
- package/commands/add.ts +16 -1
- package/dist/components.json +1 -1
- package/dist/index.js +14 -1
- package/package.json +5 -5
- package/registry.json +610 -802
- package/scripts/build.ts +11 -4
- package/src/components/alert-dialog.tsx +3 -3
- package/src/components/avatar.tsx +1 -1
- package/src/components/button-link.tsx +3 -0
- package/src/components/button.tsx +4 -0
- package/src/components/checkbox.tsx +7 -7
- package/src/components/chip.tsx +7 -7
- package/src/components/container.tsx +3 -3
- package/src/components/date-range.tsx +138 -0
- package/src/components/dialog.tsx +21 -7
- package/src/components/disclosure.tsx +1 -1
- package/src/components/drawer.tsx +19 -5
- package/src/components/form.tsx +27 -5
- package/src/components/helpers/form-field.tsx +7 -8
- package/src/components/helpers/get-button-classes.ts +23 -23
- package/src/components/helpers/headless-button.tsx +1 -1
- package/src/components/inline-alert.tsx +3 -3
- package/src/components/labeled-value.tsx +2 -2
- package/src/components/menu.tsx +60 -26
- package/src/components/month-day-input.tsx +2 -1
- package/src/components/multiselect.tsx +74 -70
- package/src/components/optional-link.tsx +15 -0
- package/src/components/radio.tsx +8 -8
- package/src/components/select.tsx +9 -8
- package/src/components/stepper.tsx +6 -6
- package/src/components/switch.tsx +7 -7
- package/src/components/table/headless-templated-row-table.ts +550 -0
- package/src/components/table/index.tsx +41 -0
- package/src/components/table/server-table.ts +143 -0
- package/src/components/table/table-actions.tsx +76 -0
- package/src/components/table/table-container.tsx +173 -0
- package/src/components/table/table-container.type-test.ts +155 -0
- package/src/components/table/table-filters/date-range-filter.tsx +227 -0
- package/src/components/table/table-filters/select-filter.tsx +211 -0
- package/src/components/table/table-filters/sort.tsx +85 -0
- package/src/components/table/table-primitives.tsx +226 -0
- package/src/components/table/table-toolbar.tsx +300 -0
- package/src/components/table/table-types.ts +61 -0
- package/src/components/table/use-client-table.ts +157 -0
- package/src/components/table/use-client-table.type-test.ts +217 -0
- package/src/components/table/use-server-table.ts +192 -0
- package/src/components/table/use-server-table.type-test.ts +174 -0
- package/src/components/tabs.tsx +1 -1
- package/src/components/tag-field.tsx +3 -3
- package/src/components/text-area.tsx +1 -1
- package/src/components/text-field.tsx +4 -1
- package/src/components/toast.tsx +6 -6
- package/src/components/toggle-button-group.tsx +2 -2
- package/src/utils/icons.d.ts +2 -1
- package/src/utils/use-query-state.ts +626 -0
- package/src/utils/use-tab-indicator.ts +9 -9
package/dist/index.js
CHANGED
|
@@ -2,11 +2,24 @@
|
|
|
2
2
|
import { readFile, writeFile, mkdir, access } from "fs/promises";
|
|
3
3
|
import { resolve, dirname } from "path";
|
|
4
4
|
import { fileURLToPath } from "url";
|
|
5
|
+
function resolveDependencies(names, registry) {
|
|
6
|
+
const resolved = /* @__PURE__ */ new Set();
|
|
7
|
+
const queue = [...names];
|
|
8
|
+
while (queue.length) {
|
|
9
|
+
const name = queue.pop();
|
|
10
|
+
if (resolved.has(name)) continue;
|
|
11
|
+
resolved.add(name);
|
|
12
|
+
const entry = registry.find((c) => c.name === name);
|
|
13
|
+
if (entry?.dependencies) queue.push(...entry.dependencies);
|
|
14
|
+
}
|
|
15
|
+
return resolved;
|
|
16
|
+
}
|
|
5
17
|
async function add(options) {
|
|
6
18
|
const registryPath = resolve(dirname(fileURLToPath(import.meta.url)), "./components.json");
|
|
7
19
|
const registry = JSON.parse(await readFile(registryPath, "utf-8"));
|
|
20
|
+
const all = resolveDependencies(options.components, registry);
|
|
8
21
|
const written = [];
|
|
9
|
-
for (const componentName of
|
|
22
|
+
for (const componentName of all) {
|
|
10
23
|
const component = registry.find((c) => c.name === componentName);
|
|
11
24
|
if (!component) {
|
|
12
25
|
throw new Error(`Component "${componentName}" not found in registry`);
|
package/package.json
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
"@types/node": "^22.19.11",
|
|
7
7
|
"@types/react": "^19.1.8",
|
|
8
8
|
"@types/react-dom": "^19.1.6",
|
|
9
|
-
"react-pdf-hook": "^1.0.
|
|
9
|
+
"react-pdf-hook": "^1.0.4",
|
|
10
10
|
"vaul": "^1.1.2",
|
|
11
|
-
"@maestro-js/form": "1.0.0-alpha.
|
|
11
|
+
"@maestro-js/form": "1.0.0-alpha.21"
|
|
12
12
|
},
|
|
13
13
|
"peerDependencies": {
|
|
14
14
|
"@bundled-es-modules/pdfjs-dist": "3.6.172-alpha.1",
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
"pdfjs-dist": ">=5",
|
|
23
23
|
"react": ">=19",
|
|
24
24
|
"react-dom": ">=19",
|
|
25
|
-
"react-pdf-hook": "^1.0.
|
|
25
|
+
"react-pdf-hook": "^1.0.4",
|
|
26
26
|
"react-router": ">=7",
|
|
27
27
|
"vite-env-only": "^3.0.2",
|
|
28
28
|
"vaul": ">=1",
|
|
29
|
-
"@maestro-js/form": "1.0.0-alpha.
|
|
29
|
+
"@maestro-js/form": "1.0.0-alpha.21"
|
|
30
30
|
},
|
|
31
|
-
"version": "1.0.0-alpha.
|
|
31
|
+
"version": "1.0.0-alpha.21",
|
|
32
32
|
"license": "UNLICENSED",
|
|
33
33
|
"engines": {
|
|
34
34
|
"node": ">=22.18.0"
|