@ctrliq/quantic-components 1.85.1 → 1.86.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 (51) hide show
  1. package/dist/card/card-carousel.stories.js +2 -2
  2. package/dist/card/card-group.stories.js +2 -2
  3. package/dist/checkbox/index.stories.js +3 -3
  4. package/dist/cluster/cluster.component.d.ts +7 -0
  5. package/dist/cluster/cluster.component.js +14 -5
  6. package/dist/cluster/index.constants.d.ts +3 -0
  7. package/dist/cluster/index.constants.js +3 -0
  8. package/dist/code-input/index.stories.js +3 -3
  9. package/dist/field/field.stories.d.ts +1 -0
  10. package/dist/field/field.stories.js +1 -0
  11. package/dist/grid/grid.component.d.ts +8 -0
  12. package/dist/grid/grid.component.js +16 -2
  13. package/dist/index.js.map +1 -1
  14. package/dist/meta/index.js.map +1 -1
  15. package/dist/meta.json +62 -65
  16. package/dist/number-input/index.stories.js +3 -3
  17. package/dist/option-card/option-card-group.stories.js +3 -3
  18. package/dist/panel/panel-group.stories.js +1 -1
  19. package/dist/quantic-components.js +48 -10
  20. package/dist/quantic-components.js.map +1 -1
  21. package/dist/quantic-components.min.js +3 -3
  22. package/dist/quantic-components.min.js.map +1 -1
  23. package/dist/radio/index.stories.js +1 -1
  24. package/dist/radio/radio-group.stories.js +5 -5
  25. package/dist/register.js.map +1 -1
  26. package/dist/shared/meta.types.d.ts +1 -1
  27. package/dist/tabs/index.stories.js +35 -35
  28. package/dist/text/index.constants.d.ts +4 -0
  29. package/dist/text/index.constants.js +2 -0
  30. package/dist/text/index.d.ts +7 -0
  31. package/dist/text/index.js +13 -3
  32. package/dist/text-input/index.stories.js +3 -3
  33. package/dist/textarea/index.stories.js +3 -3
  34. package/dist/toggle/index.stories.js +3 -3
  35. package/dist/types/cluster/cluster.component.d.ts +7 -0
  36. package/dist/types/cluster/index.constants.d.ts +3 -0
  37. package/dist/types/field/field.stories.d.ts +1 -0
  38. package/dist/types/grid/grid.component.d.ts +8 -0
  39. package/dist/types/shared/meta.types.d.ts +1 -1
  40. package/dist/types/text/index.constants.d.ts +4 -0
  41. package/dist/types/text/index.d.ts +7 -0
  42. package/package.json +1 -1
  43. package/dist/cluster/cluster.stories.d.ts +0 -57
  44. package/dist/cluster/cluster.stories.js +0 -67
  45. package/dist/grid/grid.stories.d.ts +0 -36
  46. package/dist/grid/grid.stories.js +0 -95
  47. package/dist/text/index.stories.d.ts +0 -50
  48. package/dist/text/index.stories.js +0 -55
  49. package/dist/types/cluster/cluster.stories.d.ts +0 -57
  50. package/dist/types/grid/grid.stories.d.ts +0 -36
  51. package/dist/types/text/index.stories.d.ts +0 -50
@@ -92,9 +92,9 @@ const renderDensityWithBreakpoints = (density, cardCount, cardSize = CardSize.Me
92
92
  ${breakpoints
93
93
  .map((bp) => `
94
94
  <div>
95
- <quantic-text as="h4" style="margin-bottom: var(--quantic-spacing-2);">
95
+ <h4 style="margin: 0 0 var(--quantic-spacing-2);">
96
96
  ${bp.name}
97
- </quantic-text>
97
+ </h4>
98
98
  <div
99
99
  style="
100
100
  width: ${bp.width};
@@ -43,9 +43,9 @@ const renderDensityWithBreakpoints = (density, cardCount, cardSize) => html `
43
43
  <div style="display: flex; flex-direction: column; gap: var(--quantic-spacing-6); margin-bottom: var(--quantic-spacing-6); margin-inline: var(--quantic-spacing-4);">
44
44
  ${breakpoints.map((bp) => html `
45
45
  <div>
46
- <quantic-text as="h4" style="margin-bottom: var(--quantic-spacing-2);">
46
+ <h4 style="margin: 0 0 var(--quantic-spacing-2);">
47
47
  ${bp.name} (${bp.width})
48
- </quantic-text>
48
+ </h4>
49
49
  <div style="width: ${bp.width}; border: 1px dashed var(--quantic-color-blue-900); background-color: rgb(var(--quantic-color-blue-900-rgb) / 0.35);">
50
50
  <quantic-card-group density=${density}>
51
51
  ${Array.from({ length: cardCount }, (_, i) => sampleCard(i + 1, cardSize))}
@@ -65,7 +65,7 @@ export const WithEventHandlers = story({
65
65
  ?required=${required}
66
66
  ?invalid=${invalid}
67
67
  ></quantic-checkbox>
68
- <quantic-text size="xs">See actions panel for more details.</quantic-text>
68
+ <p class="story-note">See actions panel for more details.</p>
69
69
  </div>
70
70
  `);
71
71
  export const FormAssociated = story({
@@ -109,11 +109,11 @@ export const FormAssociated = story({
109
109
  <quantic-button size="sm" type="reset" variant="outline">Reset</quantic-button>
110
110
  </div>
111
111
 
112
- <quantic-text size="xs">
112
+ <p class="story-note">
113
113
  This story demonstrates form-associated behavior using ElementInternals.
114
114
  Try submitting or resetting the form to see the values in the Actions
115
115
  panel.
116
- </quantic-text>
116
+ </p>
117
117
  </form>
118
118
  `);
119
119
  FormAssociated.parameters = {
@@ -1,6 +1,13 @@
1
1
  import { ClusterAxis, ClusterGap, ClusterAlign } from './index.constants';
2
2
  import { QuanticElement } from '../shared/quantic-element';
3
3
  import type { ComponentMeta } from '../shared/meta.types';
4
+ /**
5
+ * @deprecated Presentation belongs in CSS. Every prop this element carries maps
6
+ * one-to-one to a CSS property, so it is a `div` with a shadow root around it. For a
7
+ * uniform run of children use the group that names them: `TagGroup`, `BadgeGroup` or
8
+ * `ActionGroup`. Anything else is page layout, so write the flex rule in your own
9
+ * stylesheet. Removed in the next major. See `rules/component-api-boundary.md`.
10
+ */
4
11
  export declare class Cluster extends QuanticElement {
5
12
  static meta: ComponentMeta;
6
13
  axis: ClusterAxis;
@@ -10,6 +10,13 @@ import { classMap } from 'lit/directives/class-map.js';
10
10
  import { ClusterAxis, ClusterGap, ClusterAlign } from './index.constants';
11
11
  import { QuanticElement, quanticElement } from '../shared/quantic-element';
12
12
  import { prop } from '../shared/component-meta.decorators';
13
+ /**
14
+ * @deprecated Presentation belongs in CSS. Every prop this element carries maps
15
+ * one-to-one to a CSS property, so it is a `div` with a shadow root around it. For a
16
+ * uniform run of children use the group that names them: `TagGroup`, `BadgeGroup` or
17
+ * `ActionGroup`. Anything else is page layout, so write the flex rule in your own
18
+ * stylesheet. Removed in the next major. See `rules/component-api-boundary.md`.
19
+ */
13
20
  let Cluster = class Cluster extends QuanticElement {
14
21
  constructor() {
15
22
  super(...arguments);
@@ -35,13 +42,15 @@ let Cluster = class Cluster extends QuanticElement {
35
42
  };
36
43
  Cluster.meta = {
37
44
  tag: 'quantic-cluster',
38
- description: 'Generic flex container that arranges child items along a horizontal or vertical axis with consistent spacing. ' +
39
- 'Use for grouping small inline elements like badges, tags, or buttons. ' +
40
- 'Prefer quantic-card-group for cards, quantic-panel-group for panels, and quantic-grid for multi-column responsive layouts — ' +
41
- 'those components provide semantics and density presets that Cluster does not.',
45
+ description: 'Deprecated generic flex container. Use quantic-tag-group, quantic-badge-group or ' +
46
+ 'quantic-action-group for a uniform run of children, and a flex rule in your own ' +
47
+ 'stylesheet for anything else.',
42
48
  category: 'layout',
49
+ deprecated: {
50
+ reason: 'Every prop maps one-to-one to a CSS property, so the element adds a shadow boundary and nothing else.',
51
+ },
43
52
  slots: { '': { description: 'Items to arrange.' } },
44
- relatedTo: ['quantic-grid', 'quantic-card-group', 'quantic-panel-group'],
53
+ relatedTo: ['quantic-tag-group', 'quantic-badge-group', 'quantic-action-group'],
45
54
  };
46
55
  Cluster.styles = css `
47
56
  :host {
@@ -1,7 +1,9 @@
1
+ /** @deprecated `Cluster` is deprecated. Set `flex-direction` in your own stylesheet. */
1
2
  export declare enum ClusterAxis {
2
3
  Horizontal = "horizontal",
3
4
  Vertical = "vertical"
4
5
  }
6
+ /** @deprecated `Cluster` is deprecated. Set `gap` to a `--quantic-spacing-*` token in your own stylesheet. */
5
7
  export declare enum ClusterGap {
6
8
  None = "none",
7
9
  ExtraSmall = "xs",
@@ -10,6 +12,7 @@ export declare enum ClusterGap {
10
12
  Large = "lg",
11
13
  ExtraLarge = "xl"
12
14
  }
15
+ /** @deprecated `Cluster` is deprecated. Set `align-items` in your own stylesheet. */
13
16
  export declare enum ClusterAlign {
14
17
  Start = "start",
15
18
  Center = "center",
@@ -1,8 +1,10 @@
1
+ /** @deprecated `Cluster` is deprecated. Set `flex-direction` in your own stylesheet. */
1
2
  export var ClusterAxis;
2
3
  (function (ClusterAxis) {
3
4
  ClusterAxis["Horizontal"] = "horizontal";
4
5
  ClusterAxis["Vertical"] = "vertical";
5
6
  })(ClusterAxis || (ClusterAxis = {}));
7
+ /** @deprecated `Cluster` is deprecated. Set `gap` to a `--quantic-spacing-*` token in your own stylesheet. */
6
8
  export var ClusterGap;
7
9
  (function (ClusterGap) {
8
10
  ClusterGap["None"] = "none";
@@ -12,6 +14,7 @@ export var ClusterGap;
12
14
  ClusterGap["Large"] = "lg";
13
15
  ClusterGap["ExtraLarge"] = "xl";
14
16
  })(ClusterGap || (ClusterGap = {}));
17
+ /** @deprecated `Cluster` is deprecated. Set `align-items` in your own stylesheet. */
15
18
  export var ClusterAlign;
16
19
  (function (ClusterAlign) {
17
20
  ClusterAlign["Start"] = "start";
@@ -125,7 +125,7 @@ export const WithEventHandlers = story({
125
125
  return `
126
126
  <div style="display: flex; gap: .5em; flex-direction: column">
127
127
  <quantic-code-input value="${args.value.replace(/"/g, '&quot;')}" ${attrs}></quantic-code-input>
128
- <quantic-text size="xs">See actions panel for more details.</quantic-text>
128
+ <p class="story-note">See actions panel for more details.</p>
129
129
  </div>
130
130
  `;
131
131
  });
@@ -169,11 +169,11 @@ export const FormAssociated = story({
169
169
  >
170
170
  </div>
171
171
 
172
- <quantic-text size="xs">
172
+ <p class="story-note">
173
173
  This story demonstrates form-associated behavior using ElementInternals.
174
174
  Try submitting or resetting the form to see the values in the Actions
175
175
  panel.
176
- </quantic-text>
176
+ </p>
177
177
  </form>
178
178
  `);
179
179
  FormAssociated.parameters = {
@@ -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: {
@@ -2,6 +2,7 @@ import { story } from '../shared/story';
2
2
  import { FieldValidationStatus, FieldSize, FieldHintPosition } from './index.constants';
3
3
  export default {
4
4
  title: 'Components/Forms/Field',
5
+ component: 'quantic-field',
5
6
  tags: ['autodocs'],
6
7
  parameters: {
7
8
  docs: {
@@ -1,6 +1,14 @@
1
1
  import { GridDensity } from './index.constants';
2
2
  import { QuanticElement } from '../shared/quantic-element';
3
3
  import type { ComponentMeta } from '../shared/meta.types';
4
+ /**
5
+ * @deprecated Becoming internal anatomy. Grid sizes its children, so every layout it does
6
+ * not anticipate is unreachable from outside the shadow boundary. Use `CardGroup`, which
7
+ * owns its row sizing, or write the grid in your own stylesheet. `OptionCardGroup` is the
8
+ * equivalent when the children are option cards. The element stays registered because
9
+ * those two render it; the public export goes in the next major. See
10
+ * `rules/component-api-boundary.md`.
11
+ */
4
12
  export declare class Grid extends QuanticElement {
5
13
  static meta: ComponentMeta;
6
14
  density: GridDensity;
@@ -10,6 +10,14 @@ import { GridDensity } from './index.constants';
10
10
  import { ContainerSizeBreakpoint } from '../shared/shared.constants';
11
11
  import { QuanticElement, quanticElement } from '../shared/quantic-element';
12
12
  import { prop } from '../shared/component-meta.decorators';
13
+ /**
14
+ * @deprecated Becoming internal anatomy. Grid sizes its children, so every layout it does
15
+ * not anticipate is unreachable from outside the shadow boundary. Use `CardGroup`, which
16
+ * owns its row sizing, or write the grid in your own stylesheet. `OptionCardGroup` is the
17
+ * equivalent when the children are option cards. The element stays registered because
18
+ * those two render it; the public export goes in the next major. See
19
+ * `rules/component-api-boundary.md`.
20
+ */
13
21
  let Grid = class Grid extends QuanticElement {
14
22
  constructor() {
15
23
  super(...arguments);
@@ -29,10 +37,16 @@ let Grid = class Grid extends QuanticElement {
29
37
  };
30
38
  Grid.meta = {
31
39
  tag: 'quantic-grid',
32
- description: 'CSS grid layout container that arranges child items into a responsive multi-column grid. ' +
33
- 'Column count and gap scale automatically with container width based on the chosen density preset.',
40
+ description: 'Deprecated public export, becoming internal anatomy of quantic-card-group and ' +
41
+ 'quantic-option-card-group. Use quantic-card-group, quantic-option-card-group for ' +
42
+ 'option cards, or write the grid in your own stylesheet.',
34
43
  category: 'layout',
44
+ deprecated: {
45
+ use: 'quantic-card-group',
46
+ reason: 'Grid sizes its children, so any track or row rule it does not anticipate cannot be reached from outside.',
47
+ },
35
48
  slots: { '': { description: 'Grid items to be laid out.' } },
49
+ relatedTo: ['quantic-card-group', 'quantic-option-card-group'],
36
50
  };
37
51
  Grid.styles = css `
38
52
  :host {