@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.
- package/dist/action-group/action-group.component.d.ts +13 -0
- package/dist/action-group/action-group.component.js +63 -0
- package/dist/action-group/index.d.ts +1 -0
- package/dist/action-group/index.js +1 -0
- package/dist/action-group/index.stories.d.ts +25 -0
- package/dist/action-group/index.stories.js +59 -0
- package/dist/astro.d.ts +6 -1
- package/dist/astro.js +6 -1
- package/dist/astro.js.map +1 -1
- package/dist/badge/badge-group.component.d.ts +13 -0
- package/dist/badge/badge-group.component.js +62 -0
- package/dist/badge/badge-group.stories.d.ts +41 -0
- package/dist/badge/badge-group.stories.js +62 -0
- package/dist/badge/index.d.ts +1 -0
- package/dist/badge/index.js +1 -0
- package/dist/button/index.js +1 -1
- package/dist/button-bar/button-bar-item.d.ts +14 -0
- package/dist/button-bar/button-bar-item.js +202 -0
- package/dist/button-bar/button-bar.d.ts +20 -0
- package/dist/button-bar/button-bar.js +127 -0
- package/dist/button-bar/index.constants.d.ts +6 -0
- package/dist/button-bar/index.constants.js +5 -0
- package/dist/button-bar/index.context.d.ts +4 -0
- package/dist/button-bar/index.context.js +2 -0
- package/dist/button-bar/index.d.ts +3 -0
- package/dist/button-bar/index.js +3 -0
- package/dist/{types/button-group → button-bar}/index.stories.d.ts +2 -2
- package/dist/button-bar/index.stories.js +107 -0
- package/dist/button-bar/index.utils.d.ts +6 -0
- package/dist/button-bar/index.utils.js +31 -0
- package/dist/button-bar/index.utils.test.d.ts +1 -0
- package/dist/button-bar/index.utils.test.js +53 -0
- package/dist/button-group/button-group-item.d.ts +6 -8
- package/dist/button-group/button-group-item.js +11 -167
- package/dist/button-group/button-group.d.ts +9 -7
- package/dist/button-group/button-group.js +16 -58
- package/dist/button-group/index.constants.d.ts +4 -1
- package/dist/button-group/index.constants.js +3 -5
- package/dist/dialog/dialog-actions.js +11 -10
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/meta/index.js +10 -0
- package/dist/meta/index.js.map +1 -1
- package/dist/meta/serialize.js +1 -0
- package/dist/meta.json +199 -24
- package/dist/pagination/pagination.component.js +15 -15
- package/dist/quantic-components.js +395 -86
- package/dist/quantic-components.js.map +1 -1
- package/dist/quantic-components.min.js +215 -155
- package/dist/quantic-components.min.js.map +1 -1
- package/dist/register.js.map +1 -1
- package/dist/shared/meta.types.d.ts +4 -0
- package/dist/tabs/index.stories.js +1 -1
- package/dist/tag/index.d.ts +1 -0
- package/dist/tag/index.js +1 -0
- package/dist/tag/tag-group.component.d.ts +13 -0
- package/dist/tag/tag-group.component.js +62 -0
- package/dist/tag/tag-group.stories.d.ts +34 -0
- package/dist/tag/tag-group.stories.js +65 -0
- package/dist/types/action-group/action-group.component.d.ts +13 -0
- package/dist/types/action-group/index.d.ts +1 -0
- package/dist/types/action-group/index.stories.d.ts +25 -0
- package/dist/types/astro.d.ts +6 -1
- package/dist/types/badge/badge-group.component.d.ts +13 -0
- package/dist/types/badge/badge-group.stories.d.ts +41 -0
- package/dist/types/badge/index.d.ts +1 -0
- package/dist/types/button-bar/button-bar-item.d.ts +14 -0
- package/dist/types/button-bar/button-bar.d.ts +20 -0
- package/dist/types/button-bar/index.constants.d.ts +6 -0
- package/dist/types/button-bar/index.context.d.ts +4 -0
- package/dist/types/button-bar/index.d.ts +3 -0
- package/dist/{button-group → types/button-bar}/index.stories.d.ts +2 -2
- package/dist/types/button-bar/index.utils.d.ts +6 -0
- package/dist/types/button-bar/index.utils.test.d.ts +1 -0
- package/dist/types/button-group/button-group-item.d.ts +6 -8
- package/dist/types/button-group/button-group.d.ts +9 -7
- package/dist/types/button-group/index.constants.d.ts +4 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/shared/meta.types.d.ts +4 -0
- package/dist/types/tag/index.d.ts +1 -0
- package/dist/types/tag/tag-group.component.d.ts +13 -0
- package/dist/types/tag/tag-group.stories.d.ts +34 -0
- package/package.json +4 -3
- package/dist/button-group/index.context.d.ts +0 -4
- package/dist/button-group/index.context.js +0 -2
- package/dist/button-group/index.stories.js +0 -107
- package/dist/types/button-group/index.context.d.ts +0 -4
|
@@ -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,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>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ctrliq/quantic-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.84.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -88,10 +88,11 @@
|
|
|
88
88
|
"prebuild": "pnpm run prebuild:fonts && pnpm run prebuild:tokens && pnpm run prebuild:icons && pnpm run prebuild:astro",
|
|
89
89
|
"postbuild:astro": "node scripts/fix-astro-dts.mjs",
|
|
90
90
|
"postbuild:meta": "node scripts/gen-meta.mjs",
|
|
91
|
-
"build": "pnpm run prebuild:icons && pnpm run prebuild:astro && rollup -c && tsc -p tsconfig.json && pnpm run postbuild:astro && pnpm run postbuild:meta",
|
|
91
|
+
"build": "pnpm run clean && pnpm run prebuild:icons && pnpm run prebuild:astro && rollup -c && tsc -p tsconfig.json && pnpm run postbuild:astro && pnpm run postbuild:meta",
|
|
92
92
|
"dev": "pnpm run prebuild:icons && pnpm run prebuild:astro && rollup -c -w",
|
|
93
93
|
"typecheck": "pnpm run prebuild:icons && pnpm run prebuild:astro && tsc",
|
|
94
94
|
"test": "vitest run",
|
|
95
|
-
"release": "semantic-release"
|
|
95
|
+
"release": "semantic-release",
|
|
96
|
+
"clean": "rm -rf dist"
|
|
96
97
|
}
|
|
97
98
|
}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { story } from '../shared/story';
|
|
2
|
-
import { ButtonGroupSize } from './index.constants';
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Components/Actions/Button Group',
|
|
5
|
-
component: 'quantic-button-group',
|
|
6
|
-
tags: ['autodocs'],
|
|
7
|
-
argTypes: {
|
|
8
|
-
size: {
|
|
9
|
-
control: { type: 'select' },
|
|
10
|
-
options: Object.values(ButtonGroupSize),
|
|
11
|
-
description: 'The size of the button group',
|
|
12
|
-
},
|
|
13
|
-
items: {
|
|
14
|
-
control: 'object',
|
|
15
|
-
description: 'Array of button labels',
|
|
16
|
-
},
|
|
17
|
-
activeIndex: {
|
|
18
|
-
control: 'number',
|
|
19
|
-
description: 'Index of the active button (optional)',
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
const base = story({
|
|
24
|
-
args: {
|
|
25
|
-
size: undefined,
|
|
26
|
-
items: ['Text', 'Text', 'Text'],
|
|
27
|
-
activeIndex: undefined,
|
|
28
|
-
},
|
|
29
|
-
}).render(({ size, items, activeIndex }) => {
|
|
30
|
-
const sizeAttr = size ? `size="${size}"` : '';
|
|
31
|
-
const itemsHtml = items
|
|
32
|
-
.map((item, index) => `<quantic-button-group-item ${activeIndex === index ? 'active' : ''}>${item}</quantic-button-group-item>`)
|
|
33
|
-
.join('');
|
|
34
|
-
return `<quantic-button-group ${sizeAttr}>${itemsHtml}</quantic-button-group>`;
|
|
35
|
-
});
|
|
36
|
-
export const Default = base;
|
|
37
|
-
export const Small = base.override({ size: ButtonGroupSize.Small });
|
|
38
|
-
export const Medium = base.override({ size: ButtonGroupSize.Medium });
|
|
39
|
-
export const Large = base.override({ size: ButtonGroupSize.Large });
|
|
40
|
-
export const WithActiveItem = base.override({ activeIndex: 1 });
|
|
41
|
-
export const ManyItems = base.override({
|
|
42
|
-
items: ['Text', 'Text', 'Text', 'Text', 'Text', 'Text', 'Text', 'Text'],
|
|
43
|
-
});
|
|
44
|
-
export const WithIcons = story().render(() => `
|
|
45
|
-
<quantic-button-group>
|
|
46
|
-
<quantic-button-group-item>
|
|
47
|
-
<quantic-icon-lucide-align-left size="xs"></quantic-icon-lucide-align-left>
|
|
48
|
-
</quantic-button-group-item>
|
|
49
|
-
<quantic-button-group-item active>
|
|
50
|
-
<quantic-icon-lucide-align-center size="xs"></quantic-icon-lucide-align-center>
|
|
51
|
-
</quantic-button-group-item>
|
|
52
|
-
<quantic-button-group-item>
|
|
53
|
-
<quantic-icon-lucide-align-right size="xs"></quantic-icon-lucide-align-right>
|
|
54
|
-
</quantic-button-group-item>
|
|
55
|
-
</quantic-button-group>
|
|
56
|
-
`);
|
|
57
|
-
export const WithIconsAndText = story().render(() => `
|
|
58
|
-
<quantic-button-group>
|
|
59
|
-
<quantic-button-group-item>
|
|
60
|
-
<quantic-icon-lucide-chevron-left size="xs"></quantic-icon-lucide-chevron-left>
|
|
61
|
-
</quantic-button-group-item>
|
|
62
|
-
<quantic-button-group-item>
|
|
63
|
-
Text
|
|
64
|
-
</quantic-button-group-item>
|
|
65
|
-
<quantic-button-group-item active>
|
|
66
|
-
<quantic-icon-lucide-plus size="xs"></quantic-icon-lucide-plus>
|
|
67
|
-
</quantic-button-group-item>
|
|
68
|
-
<quantic-button-group-item>
|
|
69
|
-
<quantic-icon-lucide-chevron-right size="xs"></quantic-icon-lucide-chevron-right>
|
|
70
|
-
</quantic-button-group-item>
|
|
71
|
-
</quantic-button-group>
|
|
72
|
-
`);
|
|
73
|
-
export const Disabled = story().render(() => `
|
|
74
|
-
<quantic-button-group>
|
|
75
|
-
<quantic-button-group-item>Text</quantic-button-group-item>
|
|
76
|
-
<quantic-button-group-item disabled>Disabled item</quantic-button-group-item>
|
|
77
|
-
<quantic-button-group-item>Text</quantic-button-group-item>
|
|
78
|
-
</quantic-button-group>
|
|
79
|
-
`);
|
|
80
|
-
export const WithClickEvent = story({
|
|
81
|
-
args: { size: ButtonGroupSize.Medium, items: [], activeIndex: undefined },
|
|
82
|
-
}).render(({ size }) => `
|
|
83
|
-
<div style="display: flex; flex-direction: column; gap: 16px;">
|
|
84
|
-
<quantic-button-group size="${size}">
|
|
85
|
-
<quantic-button-group-item onclick="handleClick('Option 1')">Option 1</quantic-button-group-item>
|
|
86
|
-
<quantic-button-group-item onclick="handleClick('Option 2')">Option 2</quantic-button-group-item>
|
|
87
|
-
<quantic-button-group-item onclick="handleClick('Option 3')">Option 3</quantic-button-group-item>
|
|
88
|
-
</quantic-button-group>
|
|
89
|
-
<quantic-card variant="solid" size="sm" id="output">
|
|
90
|
-
Click a button to see the event
|
|
91
|
-
</quantic-card>
|
|
92
|
-
</div>
|
|
93
|
-
<script>
|
|
94
|
-
function handleClick(option) {
|
|
95
|
-
document.getElementById('output').textContent = option + ' clicked at ' + new Date().toLocaleTimeString();
|
|
96
|
-
}
|
|
97
|
-
</script>
|
|
98
|
-
`);
|
|
99
|
-
export const WithLongText = story().render(() => `
|
|
100
|
-
<quantic-button-group>
|
|
101
|
-
<quantic-button-group-item>Short</quantic-button-group-item>
|
|
102
|
-
<quantic-button-group-item>Text</quantic-button-group-item>
|
|
103
|
-
<quantic-button-group-item>This is a very long button text that should be clamped with ellipsis</quantic-button-group-item>
|
|
104
|
-
<quantic-button-group-item>Medium</quantic-button-group-item>
|
|
105
|
-
<quantic-button-group-item>Text</quantic-button-group-item>
|
|
106
|
-
</quantic-button-group>
|
|
107
|
-
`);
|