@ctrliq/quantic-components 1.82.0 → 1.84.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 (88) hide show
  1. package/dist/action-group/action-group.component.d.ts +13 -0
  2. package/dist/action-group/action-group.component.js +63 -0
  3. package/dist/action-group/index.d.ts +1 -0
  4. package/dist/action-group/index.js +1 -0
  5. package/dist/action-group/index.stories.d.ts +25 -0
  6. package/dist/action-group/index.stories.js +59 -0
  7. package/dist/astro.d.ts +6 -1
  8. package/dist/astro.js +6 -1
  9. package/dist/astro.js.map +1 -1
  10. package/dist/badge/badge-group.component.d.ts +13 -0
  11. package/dist/badge/badge-group.component.js +62 -0
  12. package/dist/badge/badge-group.stories.d.ts +41 -0
  13. package/dist/badge/badge-group.stories.js +62 -0
  14. package/dist/badge/index.d.ts +1 -0
  15. package/dist/badge/index.js +1 -0
  16. package/dist/button/index.js +1 -1
  17. package/dist/button-bar/button-bar-item.d.ts +14 -0
  18. package/dist/button-bar/button-bar-item.js +202 -0
  19. package/dist/button-bar/button-bar.d.ts +20 -0
  20. package/dist/button-bar/button-bar.js +127 -0
  21. package/dist/button-bar/index.constants.d.ts +6 -0
  22. package/dist/button-bar/index.constants.js +5 -0
  23. package/dist/button-bar/index.context.d.ts +4 -0
  24. package/dist/button-bar/index.context.js +2 -0
  25. package/dist/button-bar/index.d.ts +3 -0
  26. package/dist/button-bar/index.js +3 -0
  27. package/dist/{types/button-group → button-bar}/index.stories.d.ts +2 -2
  28. package/dist/button-bar/index.stories.js +107 -0
  29. package/dist/button-bar/index.utils.d.ts +6 -0
  30. package/dist/button-bar/index.utils.js +31 -0
  31. package/dist/button-bar/index.utils.test.d.ts +1 -0
  32. package/dist/button-bar/index.utils.test.js +53 -0
  33. package/dist/button-group/button-group-item.d.ts +6 -8
  34. package/dist/button-group/button-group-item.js +11 -167
  35. package/dist/button-group/button-group.d.ts +9 -7
  36. package/dist/button-group/button-group.js +16 -58
  37. package/dist/button-group/index.constants.d.ts +4 -1
  38. package/dist/button-group/index.constants.js +3 -5
  39. package/dist/dialog/dialog-actions.js +11 -10
  40. package/dist/index.d.ts +2 -0
  41. package/dist/index.js +2 -0
  42. package/dist/index.js.map +1 -1
  43. package/dist/meta/index.js +10 -0
  44. package/dist/meta/index.js.map +1 -1
  45. package/dist/meta/serialize.js +1 -0
  46. package/dist/meta.json +199 -24
  47. package/dist/pagination/pagination.component.js +15 -15
  48. package/dist/quantic-components.js +395 -86
  49. package/dist/quantic-components.js.map +1 -1
  50. package/dist/quantic-components.min.js +215 -155
  51. package/dist/quantic-components.min.js.map +1 -1
  52. package/dist/register.js.map +1 -1
  53. package/dist/shared/meta.types.d.ts +4 -0
  54. package/dist/tabs/index.stories.js +1 -1
  55. package/dist/tag/index.d.ts +1 -0
  56. package/dist/tag/index.js +1 -0
  57. package/dist/tag/tag-group.component.d.ts +13 -0
  58. package/dist/tag/tag-group.component.js +62 -0
  59. package/dist/tag/tag-group.stories.d.ts +34 -0
  60. package/dist/tag/tag-group.stories.js +65 -0
  61. package/dist/types/action-group/action-group.component.d.ts +13 -0
  62. package/dist/types/action-group/index.d.ts +1 -0
  63. package/dist/types/action-group/index.stories.d.ts +25 -0
  64. package/dist/types/astro.d.ts +6 -1
  65. package/dist/types/badge/badge-group.component.d.ts +13 -0
  66. package/dist/types/badge/badge-group.stories.d.ts +41 -0
  67. package/dist/types/badge/index.d.ts +1 -0
  68. package/dist/types/button-bar/button-bar-item.d.ts +14 -0
  69. package/dist/types/button-bar/button-bar.d.ts +20 -0
  70. package/dist/types/button-bar/index.constants.d.ts +6 -0
  71. package/dist/types/button-bar/index.context.d.ts +4 -0
  72. package/dist/types/button-bar/index.d.ts +3 -0
  73. package/dist/{button-group → types/button-bar}/index.stories.d.ts +2 -2
  74. package/dist/types/button-bar/index.utils.d.ts +6 -0
  75. package/dist/types/button-bar/index.utils.test.d.ts +1 -0
  76. package/dist/types/button-group/button-group-item.d.ts +6 -8
  77. package/dist/types/button-group/button-group.d.ts +9 -7
  78. package/dist/types/button-group/index.constants.d.ts +4 -1
  79. package/dist/types/index.d.ts +2 -0
  80. package/dist/types/shared/meta.types.d.ts +4 -0
  81. package/dist/types/tag/index.d.ts +1 -0
  82. package/dist/types/tag/tag-group.component.d.ts +13 -0
  83. package/dist/types/tag/tag-group.stories.d.ts +34 -0
  84. package/package.json +4 -3
  85. package/dist/button-group/index.context.d.ts +0 -4
  86. package/dist/button-group/index.context.js +0 -2
  87. package/dist/button-group/index.stories.js +0 -107
  88. package/dist/types/button-group/index.context.d.ts +0 -4
@@ -19,6 +19,10 @@ export interface ComponentMeta {
19
19
  description: string;
20
20
  category: 'action' | 'form' | 'display' | 'layout' | 'feedback' | 'navigation' | 'data';
21
21
  ascii?: string;
22
+ deprecated?: {
23
+ use: string;
24
+ reason?: string;
25
+ };
22
26
  props?: Record<string, PropMeta>;
23
27
  slots?: Record<string, SlotMeta>;
24
28
  events?: Record<string, EventMeta>;
@@ -315,7 +315,7 @@ NavigationOnly.parameters = {
315
315
  docs: {
316
316
  ...NavigationOnly.parameters?.docs,
317
317
  description: {
318
- story: 'Tabs can be used for navigation without content panels, similar to a segmented control or navigation bar.',
318
+ story: 'Tabs can be used for navigation without content panels, similar to a button bar or navigation bar.',
319
319
  },
320
320
  },
321
321
  };
@@ -1,4 +1,5 @@
1
1
  export * from './tag.component';
2
2
  export * from './status-tag.component';
3
3
  export * from './count-tag.component';
4
+ export * from './tag-group.component';
4
5
  export { TagSize } from './index.constants';
package/dist/tag/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './tag.component';
2
2
  export * from './status-tag.component';
3
3
  export * from './count-tag.component';
4
+ export * from './tag-group.component';
4
5
  export { TagSize } from './index.constants';
@@ -0,0 +1,13 @@
1
+ import { QuanticElement } from '../shared/quantic-element';
2
+ import type { ComponentMeta } from '../shared/meta.types';
3
+ export declare class TagGroup extends QuanticElement {
4
+ static meta: ComponentMeta;
5
+ ariaLabel: string | null;
6
+ static styles: import("lit").CSSResult;
7
+ render(): import("lit").TemplateResult<1>;
8
+ }
9
+ declare global {
10
+ interface HTMLElementTagNameMap {
11
+ 'quantic-tag-group': TagGroup;
12
+ }
13
+ }
@@ -0,0 +1,62 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { css, html } from 'lit';
8
+ import { QuanticElement, quanticElement } from '../shared/quantic-element';
9
+ import { prop } from '../shared/component-meta.decorators';
10
+ let TagGroup = class TagGroup extends QuanticElement {
11
+ constructor() {
12
+ super(...arguments);
13
+ this.ariaLabel = null;
14
+ }
15
+ render() {
16
+ return html `
17
+ <div class="group" role="group" aria-label=${this.ariaLabel ?? 'Tags'}>
18
+ <slot></slot>
19
+ </div>
20
+ `;
21
+ }
22
+ };
23
+ TagGroup.meta = {
24
+ tag: 'quantic-tag-group',
25
+ description: 'A run of quantic-tag, quantic-status-tag or quantic-count-tag sharing one accessible name and a consistent gap. ' +
26
+ 'Wraps across lines, and each tag keeps its own size. Gap: --quantic-component-tag-group-gap. ' +
27
+ 'Use quantic-badge-group for badges.',
28
+ category: 'display',
29
+ slots: {
30
+ '': {
31
+ description: 'quantic-tag, quantic-status-tag or quantic-count-tag elements.',
32
+ },
33
+ },
34
+ subComponents: ['quantic-tag', 'quantic-status-tag', 'quantic-count-tag'],
35
+ relatedTo: ['quantic-tag', 'quantic-badge-group'],
36
+ };
37
+ TagGroup.styles = css `
38
+ :host {
39
+ display: block;
40
+ }
41
+
42
+ .group {
43
+ display: flex;
44
+ flex-wrap: wrap;
45
+ align-items: center;
46
+ gap: var(
47
+ --quantic-component-tag-group-gap,
48
+ var(--quantic-spacing-1)
49
+ );
50
+ }
51
+ `;
52
+ __decorate([
53
+ prop({
54
+ type: 'string',
55
+ attribute: 'aria-label',
56
+ description: 'Accessible name for the group.',
57
+ })
58
+ ], TagGroup.prototype, "ariaLabel", void 0);
59
+ TagGroup = __decorate([
60
+ quanticElement('quantic-tag-group')
61
+ ], TagGroup);
62
+ export { TagGroup };
@@ -0,0 +1,34 @@
1
+ import { TagSize } from './index.constants';
2
+ interface Args {
3
+ label: string | undefined;
4
+ size: TagSize;
5
+ tags: string[];
6
+ }
7
+ declare const _default: {
8
+ title: string;
9
+ component: string;
10
+ tags: string[];
11
+ argTypes: {
12
+ label: {
13
+ control: string;
14
+ description: string;
15
+ };
16
+ size: {
17
+ control: {
18
+ type: string;
19
+ };
20
+ options: ("sm" | "md" | "lg")[];
21
+ description: string;
22
+ };
23
+ tags: {
24
+ control: string;
25
+ description: string;
26
+ };
27
+ };
28
+ };
29
+ export default _default;
30
+ export declare const Default: import("../shared/story").StoryObject<Args>;
31
+ export declare const WithAccessibleName: import("../shared/story").StoryObject<Args>;
32
+ export declare const Wrapping: import("../shared/story").StoryObject<Args>;
33
+ export declare const Dismissible: import("../shared/story").StoryObject<object>;
34
+ export declare const MixedTagTypes: import("../shared/story").StoryObject<object>;
@@ -0,0 +1,65 @@
1
+ import { story } from '../shared/story';
2
+ import { TagSize } from './index.constants';
3
+ export default {
4
+ title: 'Components/Display/Tag/TagGroup',
5
+ component: 'quantic-tag-group',
6
+ tags: ['autodocs'],
7
+ argTypes: {
8
+ label: {
9
+ control: 'text',
10
+ description: 'Accessible name for the group. Defaults to "Tags".',
11
+ },
12
+ size: {
13
+ control: { type: 'select' },
14
+ options: Object.values(TagSize),
15
+ description: 'Size set on each tag. The group does not own sizing.',
16
+ },
17
+ tags: {
18
+ control: 'object',
19
+ description: 'Tag labels',
20
+ },
21
+ },
22
+ };
23
+ const base = story({
24
+ args: {
25
+ label: undefined,
26
+ size: TagSize.Medium,
27
+ tags: ['Compute', 'Storage', 'Networking'],
28
+ },
29
+ }).render(({ label, size, tags }) => {
30
+ const labelAttr = label === undefined ? '' : `aria-label="${label}"`;
31
+ const items = tags
32
+ .map((tag) => `<quantic-tag size="${size}">${tag}</quantic-tag>`)
33
+ .join('');
34
+ return `<quantic-tag-group ${labelAttr}>${items}</quantic-tag-group>`;
35
+ });
36
+ export const Default = base;
37
+ export const WithAccessibleName = base.override({ label: 'Cluster capabilities' });
38
+ // The group has no gap, axis or wrap props on purpose: a run of tags always wraps the
39
+ // same way, so the rhythm is a decision rather than a knob.
40
+ export const Wrapping = base.override({
41
+ tags: [
42
+ 'Compute',
43
+ 'Storage',
44
+ 'Networking',
45
+ 'Scheduling',
46
+ 'Monitoring',
47
+ 'Provisioning',
48
+ 'Authentication',
49
+ 'Observability',
50
+ ],
51
+ });
52
+ export const Dismissible = story().render(() => `
53
+ <quantic-tag-group aria-label="Applied filters">
54
+ <quantic-tag dismissible>Compute</quantic-tag>
55
+ <quantic-tag dismissible>Storage</quantic-tag>
56
+ <quantic-tag dismissible>Networking</quantic-tag>
57
+ </quantic-tag-group>
58
+ `);
59
+ export const MixedTagTypes = story().render(() => `
60
+ <quantic-tag-group aria-label="Cluster state">
61
+ <quantic-tag>Compute</quantic-tag>
62
+ <quantic-status-tag color="success">Healthy</quantic-status-tag>
63
+ <quantic-count-tag count="12">Nodes</quantic-count-tag>
64
+ </quantic-tag-group>
65
+ `);
@@ -0,0 +1,13 @@
1
+ import { QuanticElement } from '../shared/quantic-element';
2
+ import type { ComponentMeta } from '../shared/meta.types';
3
+ export declare class ActionGroup extends QuanticElement {
4
+ static meta: ComponentMeta;
5
+ ariaLabel: string | null;
6
+ static styles: import("lit").CSSResult;
7
+ render(): import("lit").TemplateResult<1>;
8
+ }
9
+ declare global {
10
+ interface HTMLElementTagNameMap {
11
+ 'quantic-action-group': ActionGroup;
12
+ }
13
+ }
@@ -0,0 +1 @@
1
+ export * from './action-group.component';
@@ -0,0 +1,25 @@
1
+ interface Args {
2
+ label: string | undefined;
3
+ actions: string[];
4
+ }
5
+ declare const _default: {
6
+ title: string;
7
+ component: string;
8
+ tags: string[];
9
+ argTypes: {
10
+ label: {
11
+ control: string;
12
+ description: string;
13
+ };
14
+ actions: {
15
+ control: string;
16
+ description: string;
17
+ };
18
+ };
19
+ };
20
+ export default _default;
21
+ export declare const Default: import("../shared/story").StoryObject<Args>;
22
+ export declare const WithAccessibleName: import("../shared/story").StoryObject<Args>;
23
+ export declare const ThreeActions: import("../shared/story").StoryObject<Args>;
24
+ export declare const IconActions: import("../shared/story").StoryObject<object>;
25
+ export declare const InsideADialogFooter: import("../shared/story").StoryObject<object>;