@maestro-js/components 1.0.0-alpha.18 → 1.0.0-alpha.2

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 (56) hide show
  1. package/commands/add.ts +1 -16
  2. package/dist/components.json +1 -1
  3. package/dist/index.js +1 -14
  4. package/package.json +5 -5
  5. package/registry.json +790 -598
  6. package/scripts/build.ts +4 -11
  7. package/src/components/alert-dialog.tsx +3 -3
  8. package/src/components/avatar.tsx +1 -1
  9. package/src/components/button-link.tsx +0 -3
  10. package/src/components/button.tsx +0 -4
  11. package/src/components/checkbox.tsx +7 -7
  12. package/src/components/chip.tsx +7 -7
  13. package/src/components/container.tsx +3 -3
  14. package/src/components/dialog.tsx +7 -21
  15. package/src/components/disclosure.tsx +1 -1
  16. package/src/components/drawer.tsx +5 -19
  17. package/src/components/form.tsx +5 -27
  18. package/src/components/helpers/form-field.tsx +8 -7
  19. package/src/components/helpers/get-button-classes.ts +23 -23
  20. package/src/components/helpers/headless-button.tsx +1 -1
  21. package/src/components/inline-alert.tsx +3 -3
  22. package/src/components/labeled-value.tsx +2 -2
  23. package/src/components/menu.tsx +26 -60
  24. package/src/components/month-day-input.tsx +1 -2
  25. package/src/components/multiselect.tsx +70 -74
  26. package/src/components/radio.tsx +8 -8
  27. package/src/components/select.tsx +8 -9
  28. package/src/components/stepper.tsx +6 -6
  29. package/src/components/switch.tsx +7 -7
  30. package/src/components/tabs.tsx +1 -1
  31. package/src/components/tag-field.tsx +3 -3
  32. package/src/components/text-area.tsx +1 -1
  33. package/src/components/text-field.tsx +1 -4
  34. package/src/components/toast.tsx +6 -6
  35. package/src/components/toggle-button-group.tsx +2 -2
  36. package/src/utils/icons.d.ts +1 -2
  37. package/src/utils/use-tab-indicator.ts +9 -9
  38. package/src/components/date-range.tsx +0 -138
  39. package/src/components/optional-link.tsx +0 -15
  40. package/src/components/table/headless-templated-row-table.ts +0 -550
  41. package/src/components/table/index.tsx +0 -41
  42. package/src/components/table/server-table.ts +0 -143
  43. package/src/components/table/table-actions.tsx +0 -76
  44. package/src/components/table/table-container.tsx +0 -173
  45. package/src/components/table/table-container.type-test.ts +0 -155
  46. package/src/components/table/table-filters/date-range-filter.tsx +0 -227
  47. package/src/components/table/table-filters/select-filter.tsx +0 -211
  48. package/src/components/table/table-filters/sort.tsx +0 -85
  49. package/src/components/table/table-primitives.tsx +0 -226
  50. package/src/components/table/table-toolbar.tsx +0 -300
  51. package/src/components/table/table-types.ts +0 -61
  52. package/src/components/table/use-client-table.ts +0 -157
  53. package/src/components/table/use-client-table.type-test.ts +0 -217
  54. package/src/components/table/use-server-table.ts +0 -192
  55. package/src/components/table/use-server-table.type-test.ts +0 -174
  56. package/src/utils/use-query-state.ts +0 -626
package/dist/index.js CHANGED
@@ -2,24 +2,11 @@
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
- }
17
5
  async function add(options) {
18
6
  const registryPath = resolve(dirname(fileURLToPath(import.meta.url)), "./components.json");
19
7
  const registry = JSON.parse(await readFile(registryPath, "utf-8"));
20
- const all = resolveDependencies(options.components, registry);
21
8
  const written = [];
22
- for (const componentName of all) {
9
+ for (const componentName of options.components) {
23
10
  const component = registry.find((c) => c.name === componentName);
24
11
  if (!component) {
25
12
  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.4",
9
+ "react-pdf-hook": "^1.0.3",
10
10
  "vaul": "^1.1.2",
11
- "@maestro-js/form": "1.0.0-alpha.18"
11
+ "@maestro-js/form": "1.0.0-alpha.2"
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.4",
25
+ "react-pdf-hook": "^1.0.3",
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.18"
29
+ "@maestro-js/form": "1.0.0-alpha.2"
30
30
  },
31
- "version": "1.0.0-alpha.18",
31
+ "version": "1.0.0-alpha.2",
32
32
  "license": "UNLICENSED",
33
33
  "engines": {
34
34
  "node": ">=22.18.0"