@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
@@ -124,6 +124,13 @@ Select.meta = {
124
124
  description: 'Dropdown select input backed by a native <select>. Form-associated. ' +
125
125
  'Pass options via the options prop or slot native <option> elements.',
126
126
  category: 'form',
127
+ slots: {
128
+ '': {
129
+ description: 'Native option elements, read to build the list. Never rendered directly.',
130
+ },
131
+ prefix: { description: 'Leading content (e.g. icon).' },
132
+ suffix: { description: 'Trailing content, replacing the default chevron.' },
133
+ },
127
134
  relatedTo: ['quantic-field', 'quantic-text-input'],
128
135
  };
129
136
  Select.styles = css `
@@ -19,6 +19,17 @@ export interface ComponentMeta {
19
19
  description: string;
20
20
  category: 'action' | 'form' | 'display' | 'layout' | 'feedback' | 'navigation' | 'data';
21
21
  ascii?: string;
22
+ /**
23
+ * The component exists to serve a specific request and it is not yet known whether the
24
+ * need is general. The code works; what is withheld is the commitment to keep the
25
+ * capability. Absence means supported, which is the default, including for a new
26
+ * component that came from the roadmap.
27
+ *
28
+ * Independent of `deprecated`: an experimental component that turns out to serve only
29
+ * the team that asked keeps this set, which is what lets it be removed in a minor
30
+ * instead of waiting for a major. See `rules/promotion.md`.
31
+ */
32
+ experimental?: boolean;
22
33
  deprecated?: {
23
34
  use?: string;
24
35
  reason?: string;
@@ -28,5 +39,14 @@ export interface ComponentMeta {
28
39
  events?: Record<string, EventMeta>;
29
40
  examples?: string[];
30
41
  relatedTo?: string[];
31
- subComponents?: string[];
42
+ /**
43
+ * The element this one is anatomy of. Set it when the child is inert on its own:
44
+ * quantic-card-title outside a quantic-card, quantic-tab-panel outside quantic-tabs.
45
+ * Leave it unset when the pairing is only conventional, as quantic-button inside
46
+ * quantic-action-group is, and use relatedTo for that instead.
47
+ *
48
+ * The parent's `subComponents` list in the manifest is derived from these, so the
49
+ * two can never disagree.
50
+ */
51
+ subComponentOf?: string;
32
52
  }
@@ -276,7 +276,6 @@ SplitterGroup.meta = {
276
276
  'Collapses to a stacked layout below the collapse-below breakpoint.',
277
277
  category: 'layout',
278
278
  slots: { '': { description: 'Two or more quantic-splitter-pane elements.' } },
279
- subComponents: ['quantic-splitter-pane'],
280
279
  };
281
280
  SplitterGroup.styles = css `
282
281
  :host {
@@ -24,6 +24,7 @@ SplitterPane.meta = {
24
24
  description: 'Individual resizable pane within a quantic-splitter-group. ' +
25
25
  'Set min-size and max-size to constrain how far it can be dragged.',
26
26
  category: 'layout',
27
+ subComponentOf: 'quantic-splitter-group',
27
28
  slots: { '': { description: 'Pane content.' } },
28
29
  relatedTo: ['quantic-splitter-group'],
29
30
  };
@@ -21,6 +21,7 @@ TableBody.meta = {
21
21
  description: 'The <tbody> equivalent for quantic-table. ' +
22
22
  'Contains quantic-table-row elements with data cells.',
23
23
  category: 'display',
24
+ subComponentOf: 'quantic-table',
24
25
  slots: {
25
26
  '': { description: 'quantic-table-row elements.' },
26
27
  },
@@ -41,6 +41,7 @@ TableCell.meta = {
41
41
  description: 'Individual data cell within a quantic-table-row. ' +
42
42
  'Receives variant context from the parent quantic-table.',
43
43
  category: 'display',
44
+ subComponentOf: 'quantic-table',
44
45
  slots: {
45
46
  '': { description: 'Cell content — text, elements, or other components.' },
46
47
  },
@@ -29,6 +29,7 @@ TableControls.meta = {
29
29
  'Provides a two-zone layout: default slot for start-aligned items (search, filters) ' +
30
30
  'and the end slot for end-aligned items (bulk actions, column toggles).',
31
31
  category: 'display',
32
+ subComponentOf: 'quantic-table',
32
33
  slots: {
33
34
  '': { description: 'Start-aligned controls such as search inputs and filter buttons.' },
34
35
  end: { description: 'End-aligned controls such as bulk actions or column visibility toggles.' },
@@ -21,6 +21,7 @@ TableFooter.meta = {
21
21
  description: 'The <tfoot> equivalent for quantic-table. ' +
22
22
  'Place quantic-table-row elements with summary or footer data as children.',
23
23
  category: 'display',
24
+ subComponentOf: 'quantic-table',
24
25
  slots: {
25
26
  '': { description: 'quantic-table-row elements with footer data.' },
26
27
  },
@@ -77,6 +77,7 @@ TableHead.meta = {
77
77
  'Renders as a <th> equivalent and supports optional sort controls. ' +
78
78
  'Emits sort-change when clicked while sortable.',
79
79
  category: 'display',
80
+ subComponentOf: 'quantic-table',
80
81
  slots: {
81
82
  '': { description: 'Column header label text or content.' },
82
83
  },
@@ -21,6 +21,7 @@ TableHeader.meta = {
21
21
  description: 'The <thead> equivalent for quantic-table. ' +
22
22
  'Place quantic-table-row elements containing quantic-table-head cells as children.',
23
23
  category: 'display',
24
+ subComponentOf: 'quantic-table',
24
25
  slots: {
25
26
  '': { description: 'quantic-table-row elements with quantic-table-head cells.' },
26
27
  },
@@ -36,6 +36,7 @@ TableRow.meta = {
36
36
  description: 'Single data row within a quantic-table-body or quantic-table-footer. ' +
37
37
  'Receives variant context from the parent quantic-table and applies matching styles.',
38
38
  category: 'display',
39
+ subComponentOf: 'quantic-table',
39
40
  slots: {
40
41
  '': { description: 'quantic-table-cell elements.' },
41
42
  },
@@ -50,15 +50,6 @@ Table.meta = {
50
50
  toolbar: { description: 'quantic-table-controls or other toolbar content placed above the table.' },
51
51
  controls: { description: 'quantic-table-controls or pagination content placed below the table.' },
52
52
  },
53
- subComponents: [
54
- 'quantic-table-header',
55
- 'quantic-table-body',
56
- 'quantic-table-footer',
57
- 'quantic-table-row',
58
- 'quantic-table-cell',
59
- 'quantic-table-head',
60
- 'quantic-table-controls',
61
- ],
62
53
  };
63
54
  Table.styles = css `
64
55
  :host {
@@ -84,6 +84,7 @@ TabButton.meta = {
84
84
  'Reflects a selected attribute while active. Restyle the mark with ::part(indicator) ' +
85
85
  'or --quantic-component-tab-indicator-* / --quantic-component-tab-active-bg.',
86
86
  category: 'navigation',
87
+ subComponentOf: 'quantic-tabs',
87
88
  slots: {
88
89
  icon: {
89
90
  description: 'Icon element, displayed before the label and scaled to the tab size.',
@@ -46,6 +46,7 @@ TabPanel.meta = {
46
46
  'Set index to match the corresponding quantic-tab-button. ' +
47
47
  'Visibility is controlled automatically by the parent quantic-tabs.',
48
48
  category: 'navigation',
49
+ subComponentOf: 'quantic-tabs',
49
50
  slots: {
50
51
  '': { description: 'Panel content shown when this tab is active.' },
51
52
  },
@@ -120,7 +120,6 @@ Tabs.meta = {
120
120
  description: 'quantic-tab-button and quantic-tab-panel elements as direct children.',
121
121
  },
122
122
  },
123
- subComponents: ['quantic-tab-button', 'quantic-tab-panel'],
124
123
  };
125
124
  Tabs.styles = [
126
125
  css `
@@ -32,8 +32,12 @@ TagGroup.meta = {
32
32
  description: 'quantic-tag, quantic-status-tag or quantic-count-tag elements.',
33
33
  },
34
34
  },
35
- subComponents: ['quantic-tag', 'quantic-status-tag', 'quantic-count-tag'],
36
- relatedTo: ['quantic-tag', 'quantic-badge-group'],
35
+ relatedTo: [
36
+ 'quantic-tag',
37
+ 'quantic-badge-group',
38
+ 'quantic-status-tag',
39
+ 'quantic-count-tag',
40
+ ],
37
41
  };
38
42
  TagGroup.styles = css `
39
43
  :host {
@@ -96,10 +96,7 @@ let TextInput = class TextInput extends A11yAttributesMixin(QuanticElement) {
96
96
  const a11y = this.getA11yAttributes({ invalid: this.invalid });
97
97
  return html `
98
98
  <div class=${classes}>
99
- <slot
100
- name="prefix"
101
- data-description="Leading content (e.g. icon or currency symbol)."
102
- ></slot>
99
+ <slot name="prefix"></slot>
103
100
  <input
104
101
  .value=${this.value}
105
102
  .autocomplete="${this.autoComplete}"
@@ -146,10 +143,7 @@ let TextInput = class TextInput extends A11yAttributesMixin(QuanticElement) {
146
143
  ></quantic-icon-lucide-circle-alert>`
147
144
  : ''}
148
145
  ${!this.invalid
149
- ? html `<slot
150
- name="suffix"
151
- data-description="Trailing content (e.g. icon or unit label)."
152
- ></slot>`
146
+ ? html `<slot name="suffix"></slot>`
153
147
  : ''}
154
148
  </div>
155
149
  `;
@@ -161,6 +155,10 @@ TextInput.meta = {
161
155
  'Wrap in quantic-field to add a visible label, hint text, and validation messaging. ' +
162
156
  'Use type="password" or type="email" to get browser-native input behaviour.',
163
157
  category: 'form',
158
+ slots: {
159
+ prefix: { description: 'Leading content (e.g. icon or currency symbol).' },
160
+ suffix: { description: 'Trailing content (e.g. icon or unit label).' },
161
+ },
164
162
  relatedTo: ['quantic-field', 'quantic-number-input', 'quantic-select'],
165
163
  };
166
164
  TextInput.formAssociated = true;
@@ -26,6 +26,7 @@ TooltipPopup.meta = {
26
26
  'Positioned absolutely relative to the trigger via @floating-ui/dom. ' +
27
27
  'Not intended for direct use — use quantic-tooltip instead.',
28
28
  category: 'feedback',
29
+ subComponentOf: 'quantic-tooltip',
29
30
  slots: {
30
31
  '': { description: 'Tooltip content (managed by quantic-tooltip).' },
31
32
  },
@@ -222,7 +222,6 @@ Tooltip.meta = {
222
222
  '': { description: 'Trigger element that activates the tooltip.' },
223
223
  content: { description: 'Content displayed inside the tooltip popup.' },
224
224
  },
225
- subComponents: ['quantic-tooltip-popup'],
226
225
  relatedTo: [],
227
226
  };
228
227
  Tooltip.styles = css `
@@ -10,6 +10,7 @@ type FieldArgs = {
10
10
  };
11
11
  declare const _default: {
12
12
  title: string;
13
+ component: string;
13
14
  tags: string[];
14
15
  parameters: {
15
16
  docs: {
@@ -13,11 +13,13 @@ export interface ManifestComponent extends Omit<ComponentMeta, 'props' | 'slots'
13
13
  props?: ManifestProp[];
14
14
  slots?: ManifestSlot[];
15
15
  events?: ManifestEvent[];
16
+ /** Derived from the children's `subComponentOf`, never hand-authored. */
17
+ subComponents?: string[];
16
18
  }
17
19
  export interface ComponentManifest {
18
20
  schemaVersion: number;
19
21
  generated: string;
20
22
  components: ManifestComponent[];
21
23
  }
22
- export declare function serializeComponent(component: ComponentMeta): ManifestComponent;
24
+ export declare function serializeComponent(component: ComponentMeta, subComponents?: string[]): ManifestComponent;
23
25
  export declare function buildManifest(components: ComponentMeta[], generated?: string): ComponentManifest;
@@ -0,0 +1 @@
1
+ export {};
@@ -19,6 +19,17 @@ export interface ComponentMeta {
19
19
  description: string;
20
20
  category: 'action' | 'form' | 'display' | 'layout' | 'feedback' | 'navigation' | 'data';
21
21
  ascii?: string;
22
+ /**
23
+ * The component exists to serve a specific request and it is not yet known whether the
24
+ * need is general. The code works; what is withheld is the commitment to keep the
25
+ * capability. Absence means supported, which is the default, including for a new
26
+ * component that came from the roadmap.
27
+ *
28
+ * Independent of `deprecated`: an experimental component that turns out to serve only
29
+ * the team that asked keeps this set, which is what lets it be removed in a minor
30
+ * instead of waiting for a major. See `rules/promotion.md`.
31
+ */
32
+ experimental?: boolean;
22
33
  deprecated?: {
23
34
  use?: string;
24
35
  reason?: string;
@@ -28,5 +39,14 @@ export interface ComponentMeta {
28
39
  events?: Record<string, EventMeta>;
29
40
  examples?: string[];
30
41
  relatedTo?: string[];
31
- subComponents?: string[];
42
+ /**
43
+ * The element this one is anatomy of. Set it when the child is inert on its own:
44
+ * quantic-card-title outside a quantic-card, quantic-tab-panel outside quantic-tabs.
45
+ * Leave it unset when the pairing is only conventional, as quantic-button inside
46
+ * quantic-action-group is, and use relatedTo for that instead.
47
+ *
48
+ * The parent's `subComponents` list in the manifest is derived from these, so the
49
+ * two can never disagree.
50
+ */
51
+ subComponentOf?: string;
32
52
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctrliq/quantic-components",
3
- "version": "1.86.0",
3
+ "version": "1.87.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/types/index.d.ts",