@ctrliq/quantic-components 1.86.0 → 1.87.0

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 (72) hide show
  1. package/dist/action-group/action-group.component.js +7 -2
  2. package/dist/badge/badge-group.component.js +1 -2
  3. package/dist/badge/badge.component.js +8 -3
  4. package/dist/button/index.js +3 -2
  5. package/dist/button-bar/button-bar-item.js +1 -0
  6. package/dist/button-bar/button-bar.js +0 -1
  7. package/dist/button-group/button-group-item.js +3 -0
  8. package/dist/button-group/button-group.js +0 -1
  9. package/dist/card/card-image.component.js +1 -0
  10. package/dist/card/card-meta.component.js +1 -0
  11. package/dist/card/card-title.component.js +1 -0
  12. package/dist/card/card.component.js +14 -21
  13. package/dist/checkbox/checkbox-group.component.js +0 -1
  14. package/dist/dialog/dialog-actions.js +1 -1
  15. package/dist/dialog/dialog-title.js +1 -0
  16. package/dist/dialog/dialog.js +0 -1
  17. package/dist/dropdown-menu/dropdown-menu.component.js +0 -4
  18. package/dist/dropdown-menu/group.component.js +1 -0
  19. package/dist/dropdown-menu/item.component.js +1 -0
  20. package/dist/field/field.stories.d.ts +1 -0
  21. package/dist/field/field.stories.js +1 -0
  22. package/dist/index.js.map +1 -1
  23. package/dist/layout/layout.component.js +1 -1
  24. package/dist/layout/sidebar-menu-item-group.component.js +1 -0
  25. package/dist/layout/sidebar-menu-item.component.js +2 -0
  26. package/dist/layout/sidebar.component.js +1 -4
  27. package/dist/meta/all-meta.test.js +18 -0
  28. package/dist/meta/index.js.map +1 -1
  29. package/dist/meta/serialize.d.ts +3 -1
  30. package/dist/meta/serialize.js +20 -3
  31. package/dist/meta/serialize.test.js +30 -0
  32. package/dist/meta/slot-parity.test.d.ts +1 -0
  33. package/dist/meta/slot-parity.test.js +83 -0
  34. package/dist/meta.json +155 -58
  35. package/dist/number-input/index.js +1 -0
  36. package/dist/option-card/option-card-group.component.js +0 -1
  37. package/dist/option-card/option-card.component.js +1 -0
  38. package/dist/panel/panel-group.component.js +0 -1
  39. package/dist/panel/panel-header.component.js +1 -0
  40. package/dist/panel/panel.component.js +0 -1
  41. package/dist/popover/popover-popup.js +1 -0
  42. package/dist/popover/popover.js +0 -1
  43. package/dist/quantic-components.js +84 -70
  44. package/dist/quantic-components.js.map +1 -1
  45. package/dist/quantic-components.min.js +61 -79
  46. package/dist/quantic-components.min.js.map +1 -1
  47. package/dist/radio/radio.component.js +1 -0
  48. package/dist/register.js.map +1 -1
  49. package/dist/select/index.js +7 -0
  50. package/dist/shared/meta.types.d.ts +21 -1
  51. package/dist/splitter/splitter-group.component.js +0 -1
  52. package/dist/splitter/splitter-pane.component.js +1 -0
  53. package/dist/table/table-body.component.js +1 -0
  54. package/dist/table/table-cell.component.js +1 -0
  55. package/dist/table/table-controls.component.js +1 -0
  56. package/dist/table/table-footer.component.js +1 -0
  57. package/dist/table/table-head.component.js +1 -0
  58. package/dist/table/table-header.component.js +1 -0
  59. package/dist/table/table-row.component.js +1 -0
  60. package/dist/table/table.component.js +0 -9
  61. package/dist/tabs/button.component.js +1 -0
  62. package/dist/tabs/panel.component.js +1 -0
  63. package/dist/tabs/tabs.component.js +0 -1
  64. package/dist/tag/tag-group.component.js +6 -2
  65. package/dist/text-input/index.js +6 -8
  66. package/dist/tooltip/tooltip-popup.js +1 -0
  67. package/dist/tooltip/tooltip.js +0 -1
  68. package/dist/types/field/field.stories.d.ts +1 -0
  69. package/dist/types/meta/serialize.d.ts +3 -1
  70. package/dist/types/meta/slot-parity.test.d.ts +1 -0
  71. package/dist/types/shared/meta.types.d.ts +21 -1
  72. package/package.json +1 -1
@@ -287,7 +287,7 @@ Layout.meta = {
287
287
  description: 'Top-level application shell that composes a collapsible sidebar, a top navbar, and a main content area. ' +
288
288
  'On small viewports the sidebar slides in as a drawer with a focus trap; on desktop it collapses to an icon rail.',
289
289
  category: 'layout',
290
- subComponents: ['quantic-sidebar', 'quantic-navbar', 'quantic-page'],
290
+ relatedTo: ['quantic-navbar', 'quantic-page'],
291
291
  slots: {
292
292
  logo: {
293
293
  description: 'Brand logo shown in the header (no-sidebar) or inside the aside.',
@@ -29,6 +29,7 @@ SidebarMenuItemGroup.meta = {
29
29
  description: 'Grouped section of sidebar nav items with an uppercase section label. ' +
30
30
  'The label is hidden automatically when the sidebar is collapsed.',
31
31
  category: 'navigation',
32
+ subComponentOf: 'quantic-sidebar',
32
33
  slots: { '': { description: 'quantic-sidebar-menu-item elements belonging to this group.' } },
33
34
  relatedTo: ['quantic-sidebar', 'quantic-sidebar-menu-item'],
34
35
  };
@@ -62,7 +62,9 @@ SidebarMenuItem.meta = {
62
62
  description: 'Individual nav item within quantic-sidebar. Renders as a link when href is set, otherwise as a button. ' +
63
63
  'When the sidebar is collapsed on desktop, shows only the icon with a tooltip.',
64
64
  category: 'navigation',
65
+ subComponentOf: 'quantic-sidebar',
65
66
  slots: {
67
+ '': { description: 'Label content, used when the label prop is not set.' },
66
68
  icon: { description: 'Icon displayed to the left of the label.' },
67
69
  after: { description: 'Optional trailing content (e.g. badge or count).' },
68
70
  },
@@ -103,10 +103,7 @@ Sidebar.meta = {
103
103
  description: 'Collapsible side navigation panel placed in the sidebar slot of quantic-layout. ' +
104
104
  'On desktop it can collapse to an icon rail; on mobile it is controlled by the layout as a drawer.',
105
105
  category: 'navigation',
106
- subComponents: [
107
- 'quantic-sidebar-menu-item',
108
- 'quantic-sidebar-menu-item-group',
109
- ],
106
+ subComponentOf: 'quantic-layout',
110
107
  slots: {
111
108
  header: {
112
109
  description: 'Optional sticky header rendered above the scrollable content.',
@@ -5,6 +5,8 @@ import { describe, expect, it } from 'vitest';
5
5
  const SRC_DIR = join(dirname(fileURLToPath(import.meta.url)), '..');
6
6
  const DOCUMENTED_COMPONENT = /@quanticElement\(\s*['"`]([^'"`]+)['"`]\s*\)\s*export class (\w+)[^{]*\{\s*static meta/g;
7
7
  const ALL_META_ENTRY = /^ {2}(\w+)\.meta,$/gm;
8
+ const SUB_COMPONENT_OF = /subComponentOf: '([^']+)'/g;
9
+ const REGISTERED_TAG = /@quanticElement\(\s*['"`]([^'"`]+)['"`]\s*\)/g;
8
10
  function componentSources() {
9
11
  return globSync('**/*.ts', { cwd: SRC_DIR })
10
12
  .filter((file) => !/\.(stories|test|d)\.ts$/.test(file))
@@ -34,3 +36,19 @@ describe('allMeta', () => {
34
36
  expect(unparsed).toEqual([]);
35
37
  });
36
38
  });
39
+ describe('subComponentOf', () => {
40
+ const sources = componentSources();
41
+ const registered = new Set(sources.flatMap(({ source }) => [...source.matchAll(REGISTERED_TAG)].map(([, tag]) => tag)));
42
+ const declared = sources.flatMap(({ file, source }) => [...source.matchAll(SUB_COMPONENT_OF)].map(([, parent]) => ({ parent, file })));
43
+ // A parent tag that does not exist makes the whole declaration inert: nothing
44
+ // derives, and any rule reading it silently never fires.
45
+ it('names a registered custom element', () => {
46
+ const unknown = declared
47
+ .filter(({ parent }) => !registered.has(parent))
48
+ .map(({ parent, file }) => `${parent} (${file})`);
49
+ expect(unknown).toEqual([]);
50
+ });
51
+ it('is set on something', () => {
52
+ expect(declared.length).toBeGreaterThan(0);
53
+ });
54
+ });