@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
@@ -1,95 +0,0 @@
1
- import { story } from '../shared/story';
2
- import { GridDensity } from './index.constants';
3
- import { ContainerSizeBreakpoint } from '../shared/shared.constants';
4
- export default {
5
- title: 'Components/Layout/Grid',
6
- component: 'quantic-grid',
7
- tags: ['autodocs'],
8
- argTypes: {
9
- density: {
10
- control: 'select',
11
- options: Object.values(GridDensity),
12
- description: 'Grid density setting',
13
- table: {
14
- defaultValue: { summary: GridDensity.Comfortable },
15
- },
16
- },
17
- cardCount: {
18
- control: { type: 'number', min: 1, max: 20 },
19
- description: 'Number of items to display',
20
- },
21
- },
22
- };
23
- const sampleItem = (index) => `
24
- <div
25
- style="
26
- background: var(--quantic-bg-secondary);
27
- height: 100px;
28
- text-align: center;
29
- display: flex;
30
- align-items: center;
31
- justify-content: center;
32
- "
33
- >
34
- Item ${index}
35
- </div>`;
36
- const breakpoints = [
37
- { name: 'Base', width: '20rem' },
38
- { name: `Xs (≥ ${ContainerSizeBreakpoint.Xs})`, width: ContainerSizeBreakpoint.Xs },
39
- { name: `Sm (≥ ${ContainerSizeBreakpoint.Sm})`, width: ContainerSizeBreakpoint.Sm },
40
- { name: `Md (≥ ${ContainerSizeBreakpoint.Md})`, width: ContainerSizeBreakpoint.Md },
41
- { name: `Lg (≥ ${ContainerSizeBreakpoint.Lg})`, width: ContainerSizeBreakpoint.Lg },
42
- { name: `Xl (≥ ${ContainerSizeBreakpoint.Xl})`, width: ContainerSizeBreakpoint.Xl },
43
- { name: `Xxl (≥ ${ContainerSizeBreakpoint.Xxl})`, width: ContainerSizeBreakpoint.Xxl },
44
- ];
45
- const renderDensityWithBreakpoints = (density, cardCount) => `
46
- <div
47
- style="
48
- display: flex;
49
- flex-direction: column;
50
- gap: var(--quantic-spacing-6);
51
- margin-inline: var(--quantic-spacing-4);
52
- "
53
- >
54
- ${breakpoints
55
- .map((bp) => `
56
- <div>
57
- <quantic-text as="h4" style="margin-bottom: var(--quantic-spacing-2);">
58
- ${bp.name}
59
- </quantic-text>
60
- <div
61
- style="
62
- width: ${bp.width};
63
- border: 1px dashed var(--quantic-color-blue-900);
64
- background-color: rgb(var(--quantic-color-blue-900-rgb) / 0.35);
65
- "
66
- >
67
- <quantic-grid density="${density}">
68
- ${Array.from({ length: cardCount }, (_, i) => sampleItem(i + 1)).join('')}
69
- </quantic-grid>
70
- </div>
71
- </div>`)
72
- .join('')}
73
- </div>`;
74
- const base = story({
75
- args: { density: GridDensity.Comfortable, cardCount: 12 },
76
- }).render(({ density, cardCount }) => renderDensityWithBreakpoints(density, cardCount));
77
- export const Dense = base.override({ density: GridDensity.Dense });
78
- export const Compact = base.override({ density: GridDensity.Compact });
79
- export const Comfortable = base;
80
- export const Sparse = base.override({ density: GridDensity.Sparse, cardCount: 8 });
81
- export const Custom = story({ args: { density: GridDensity.Comfortable, cardCount: 12 } }).render(({ cardCount }) => `
82
- <div
83
- style="
84
- border: 1px dashed var(--quantic-color-blue-900);
85
- background-color: rgb(var(--quantic-color-blue-900-rgb) / 0.35);
86
- "
87
- >
88
- <quantic-grid
89
- density="custom"
90
- style="--quantic-component-grid-columns: 5; --quantic-component-grid-gap: var(--quantic-spacing-2);"
91
- >
92
- ${Array.from({ length: cardCount }, (_, i) => sampleItem(i + 1)).join('')}
93
- </quantic-grid>
94
- </div>
95
- `);
@@ -1,50 +0,0 @@
1
- import { TextSize, TextVariant } from './index.constants';
2
- interface Args {
3
- contents: string;
4
- as?: string;
5
- variant?: TextVariant;
6
- size?: TextSize;
7
- }
8
- declare const _default: {
9
- title: string;
10
- component: string;
11
- tags: string[];
12
- argTypes: {
13
- contents: {
14
- control: string;
15
- };
16
- as: {
17
- control: {
18
- type: string;
19
- };
20
- options: string[];
21
- description: string;
22
- };
23
- variant: {
24
- control: {
25
- type: string;
26
- };
27
- options: ("display" | "body")[];
28
- description: string;
29
- };
30
- size: {
31
- control: {
32
- type: string;
33
- };
34
- options: ("xs" | "sm" | "md" | "lg" | "xl" | "2xl")[];
35
- description: string;
36
- };
37
- };
38
- };
39
- export default _default;
40
- export declare const Default: import("../shared/story").StoryObject<Args>;
41
- export declare const Body: import("../shared/story").StoryObject<Args>;
42
- export declare const BodyLarge: import("../shared/story").StoryObject<Args>;
43
- export declare const BodyMedium: import("../shared/story").StoryObject<Args>;
44
- export declare const BodySmall: import("../shared/story").StoryObject<Args>;
45
- export declare const BodyExtraSmall: import("../shared/story").StoryObject<Args>;
46
- export declare const Display: import("../shared/story").StoryObject<Args>;
47
- export declare const DisplayExtraLarge: import("../shared/story").StoryObject<Args>;
48
- export declare const DisplayLarge: import("../shared/story").StoryObject<Args>;
49
- export declare const DisplayMedium: import("../shared/story").StoryObject<Args>;
50
- export declare const DisplaySmall: import("../shared/story").StoryObject<Args>;
@@ -1,55 +0,0 @@
1
- import { TextSize, TextVariant } from './index.constants';
2
- import { story } from '../shared/story';
3
- export default {
4
- title: 'Components/Display/Text',
5
- component: 'quantic-text',
6
- tags: ['autodocs'],
7
- argTypes: {
8
- contents: { control: 'text' },
9
- as: {
10
- control: { type: 'select' },
11
- options: ['span', 'div', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'],
12
- description: 'The HTML element to render',
13
- },
14
- variant: {
15
- control: { type: 'select' },
16
- options: [TextVariant.Body, TextVariant.Display],
17
- description: 'The variant of the text',
18
- },
19
- size: {
20
- control: { type: 'select' },
21
- options: [
22
- TextSize.ExtraSmall,
23
- TextSize.Small,
24
- TextSize.Medium,
25
- TextSize.Large,
26
- TextSize.ExtraLarge,
27
- TextSize.TwoExtraLarge,
28
- ],
29
- description: 'The size of the text',
30
- },
31
- },
32
- };
33
- const headline = 'Notes and documentation';
34
- const paragraph = `The typography system is one of the most foundational parts of any interface design. If your users are unable to read your content, you can say goodbye to them immediately. That's why even a rudimentary understanding of typography means you can determine for yourself the best fonts for modern UI design.
35
- Text is never just text. It often goes unnoticed in good design, but good type design can elicit emotion, guide attention and even create a typographical identity.
36
- I've always felt that good typography is the most undervalued and under appreciated elements in modern product design.
37
- Bad typography, by contrast, sticks out. Even to non-design-oriented folks, bad typography is easy to spot. It reflects badly on the brand and leads to a poor user experience, even if users can't pinpoint why...
38
- Often, designers fall back on trends rather than carefully considering the best typography for a design. Partly, because good typography skills are difficult to master. Paired with great copywriting, understanding the basics of effective typography is a powerful force multiplier to help you stand out and improve user experiences.`;
39
- const base = story({ args: { contents: headline, variant: TextVariant.Body, size: TextSize.Medium } })
40
- .render(({ html, contents, as, variant, size }) => html `
41
- <quantic-text as=${as} variant=${variant} size=${size}>${contents}</quantic-text>
42
- `);
43
- // ── body ──────────────────────────────────────────────────────────────────────
44
- export const Default = base;
45
- export const Body = base.override({ contents: paragraph, as: 'p', variant: TextVariant.Body, size: undefined });
46
- export const BodyLarge = base.override({ contents: paragraph, as: 'p', variant: TextVariant.Body, size: TextSize.Large });
47
- export const BodyMedium = base.override({ contents: paragraph, as: 'p', variant: TextVariant.Body, size: TextSize.Medium });
48
- export const BodySmall = base.override({ contents: paragraph, as: 'p', variant: TextVariant.Body, size: TextSize.Small });
49
- export const BodyExtraSmall = base.override({ contents: paragraph, as: 'p', variant: TextVariant.Body, size: TextSize.ExtraSmall });
50
- // ── display ───────────────────────────────────────────────────────────────────
51
- export const Display = base.override({ contents: headline, as: 'h1', variant: TextVariant.Display, size: undefined });
52
- export const DisplayExtraLarge = base.override({ contents: headline, as: 'h1', variant: TextVariant.Display, size: TextSize.ExtraLarge });
53
- export const DisplayLarge = base.override({ contents: headline, as: 'h1', variant: TextVariant.Display, size: TextSize.Large });
54
- export const DisplayMedium = base.override({ contents: headline, as: 'h1', variant: TextVariant.Display, size: TextSize.Medium });
55
- export const DisplaySmall = base.override({ contents: headline, as: 'h1', variant: TextVariant.Display, size: TextSize.Small });
@@ -1,57 +0,0 @@
1
- import { ClusterAxis, ClusterGap, ClusterAlign } from './index.constants';
2
- declare const _default: {
3
- title: string;
4
- component: string;
5
- tags: string[];
6
- argTypes: {
7
- axis: {
8
- control: string;
9
- options: ClusterAxis[];
10
- table: {
11
- defaultValue: {
12
- summary: ClusterAxis;
13
- };
14
- };
15
- };
16
- gap: {
17
- control: string;
18
- options: ClusterGap[];
19
- table: {
20
- defaultValue: {
21
- summary: ClusterGap;
22
- };
23
- };
24
- };
25
- align: {
26
- control: string;
27
- options: ClusterAlign[];
28
- table: {
29
- defaultValue: {
30
- summary: ClusterAlign;
31
- };
32
- };
33
- };
34
- wrap: {
35
- control: string;
36
- table: {
37
- defaultValue: {
38
- summary: string;
39
- };
40
- };
41
- };
42
- };
43
- };
44
- export default _default;
45
- interface Args {
46
- axis: ClusterAxis;
47
- gap: ClusterGap;
48
- align: ClusterAlign;
49
- wrap: boolean;
50
- }
51
- export declare const Horizontal: import("../shared/story").StoryObject<Args>;
52
- export declare const Vertical: import("../shared/story").StoryObject<Args>;
53
- export declare const ExtraSmall: import("../shared/story").StoryObject<Args>;
54
- export declare const Small: import("../shared/story").StoryObject<Args>;
55
- export declare const Large: import("../shared/story").StoryObject<Args>;
56
- export declare const ExtraLarge: import("../shared/story").StoryObject<Args>;
57
- export declare const Centered: import("../shared/story").StoryObject<Args>;
@@ -1,36 +0,0 @@
1
- import { GridDensity } from './index.constants';
2
- declare const _default: {
3
- title: string;
4
- component: string;
5
- tags: string[];
6
- argTypes: {
7
- density: {
8
- control: string;
9
- options: GridDensity[];
10
- description: string;
11
- table: {
12
- defaultValue: {
13
- summary: GridDensity;
14
- };
15
- };
16
- };
17
- cardCount: {
18
- control: {
19
- type: string;
20
- min: number;
21
- max: number;
22
- };
23
- description: string;
24
- };
25
- };
26
- };
27
- export default _default;
28
- interface Args {
29
- density: GridDensity;
30
- cardCount: number;
31
- }
32
- export declare const Dense: import("../shared/story").StoryObject<Args>;
33
- export declare const Compact: import("../shared/story").StoryObject<Args>;
34
- export declare const Comfortable: import("../shared/story").StoryObject<Args>;
35
- export declare const Sparse: import("../shared/story").StoryObject<Args>;
36
- export declare const Custom: import("../shared/story").StoryObject<Args>;
@@ -1,50 +0,0 @@
1
- import { TextSize, TextVariant } from './index.constants';
2
- interface Args {
3
- contents: string;
4
- as?: string;
5
- variant?: TextVariant;
6
- size?: TextSize;
7
- }
8
- declare const _default: {
9
- title: string;
10
- component: string;
11
- tags: string[];
12
- argTypes: {
13
- contents: {
14
- control: string;
15
- };
16
- as: {
17
- control: {
18
- type: string;
19
- };
20
- options: string[];
21
- description: string;
22
- };
23
- variant: {
24
- control: {
25
- type: string;
26
- };
27
- options: ("display" | "body")[];
28
- description: string;
29
- };
30
- size: {
31
- control: {
32
- type: string;
33
- };
34
- options: ("xs" | "sm" | "md" | "lg" | "xl" | "2xl")[];
35
- description: string;
36
- };
37
- };
38
- };
39
- export default _default;
40
- export declare const Default: import("../shared/story").StoryObject<Args>;
41
- export declare const Body: import("../shared/story").StoryObject<Args>;
42
- export declare const BodyLarge: import("../shared/story").StoryObject<Args>;
43
- export declare const BodyMedium: import("../shared/story").StoryObject<Args>;
44
- export declare const BodySmall: import("../shared/story").StoryObject<Args>;
45
- export declare const BodyExtraSmall: import("../shared/story").StoryObject<Args>;
46
- export declare const Display: import("../shared/story").StoryObject<Args>;
47
- export declare const DisplayExtraLarge: import("../shared/story").StoryObject<Args>;
48
- export declare const DisplayLarge: import("../shared/story").StoryObject<Args>;
49
- export declare const DisplayMedium: import("../shared/story").StoryObject<Args>;
50
- export declare const DisplaySmall: import("../shared/story").StoryObject<Args>;