@ctrliq/quantic-components 1.82.0 → 1.83.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/astro.d.ts +3 -1
- package/dist/astro.js +3 -1
- package/dist/astro.js.map +1 -1
- package/dist/button/index.js +1 -1
- package/dist/button-bar/button-bar-item.d.ts +11 -0
- package/dist/button-bar/button-bar-item.js +191 -0
- package/dist/button-bar/button-bar.d.ts +11 -0
- package/dist/button-bar/button-bar.js +76 -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-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 +17 -58
- package/dist/button-group/index.constants.d.ts +4 -1
- package/dist/button-group/index.constants.js +3 -5
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/meta/index.js +4 -0
- package/dist/meta/index.js.map +1 -1
- package/dist/meta/serialize.js +1 -0
- package/dist/meta.json +92 -22
- package/dist/pagination/pagination.component.js +15 -15
- package/dist/quantic-components.js +131 -73
- package/dist/quantic-components.js.map +1 -1
- package/dist/quantic-components.min.js +148 -142
- 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/types/astro.d.ts +3 -1
- package/dist/types/button-bar/button-bar-item.d.ts +11 -0
- package/dist/types/button-bar/button-bar.d.ts +11 -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-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 +1 -0
- package/dist/types/shared/meta.types.d.ts +4 -0
- package/package.json +1 -1
- 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
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { QuanticElement } from '../shared/quantic-element';
|
|
1
|
+
import { ButtonBar } from '../button-bar/button-bar';
|
|
3
2
|
import type { ComponentMeta } from '../shared/meta.types';
|
|
4
|
-
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Renamed to `ButtonBar` (`quantic-button-bar`). This element
|
|
5
|
+
* never grouped buttons: it joins borders and gives its items a pressed state, which is a
|
|
6
|
+
* button bar. Removed in the next major. For a spaced row of related actions use
|
|
7
|
+
* `ActionGroup`; the `ButtonGroup` name is retired rather than reused.
|
|
8
|
+
*/
|
|
9
|
+
export declare class ButtonGroup extends ButtonBar {
|
|
5
10
|
static meta: ComponentMeta;
|
|
6
|
-
|
|
7
|
-
ariaLabel: string | null;
|
|
8
|
-
static styles: import("lit").CSSResult;
|
|
9
|
-
render(): import("lit").TemplateResult<1>;
|
|
11
|
+
protected defaultLabel: string;
|
|
10
12
|
}
|
|
@@ -4,73 +4,32 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
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
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
import { quanticElement } from '../shared/quantic-element';
|
|
8
|
+
import { ButtonBar } from '../button-bar/button-bar';
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated Renamed to `ButtonBar` (`quantic-button-bar`). This element
|
|
11
|
+
* never grouped buttons: it joins borders and gives its items a pressed state, which is a
|
|
12
|
+
* button bar. Removed in the next major. For a spaced row of related actions use
|
|
13
|
+
* `ActionGroup`; the `ButtonGroup` name is retired rather than reused.
|
|
14
|
+
*/
|
|
15
|
+
let ButtonGroup = class ButtonGroup extends ButtonBar {
|
|
14
16
|
constructor() {
|
|
15
17
|
super(...arguments);
|
|
16
|
-
this.
|
|
17
|
-
this.ariaLabel = null;
|
|
18
|
-
}
|
|
19
|
-
render() {
|
|
20
|
-
return html `
|
|
21
|
-
<div
|
|
22
|
-
class="container"
|
|
23
|
-
role="toolbar"
|
|
24
|
-
aria-label=${this.ariaLabel || 'Button group'}
|
|
25
|
-
>
|
|
26
|
-
<slot></slot>
|
|
27
|
-
</div>
|
|
28
|
-
`;
|
|
18
|
+
this.defaultLabel = 'Button group';
|
|
29
19
|
}
|
|
30
20
|
};
|
|
31
21
|
ButtonGroup.meta = {
|
|
22
|
+
...ButtonBar.meta,
|
|
32
23
|
tag: 'quantic-button-group',
|
|
33
|
-
description: '
|
|
34
|
-
'
|
|
35
|
-
|
|
24
|
+
description: 'Deprecated alias of quantic-button-bar. This element never grouped buttons: ' +
|
|
25
|
+
'it joins borders and gives its items a pressed state. Use quantic-button-bar.',
|
|
26
|
+
deprecated: {
|
|
27
|
+
use: 'quantic-button-bar',
|
|
28
|
+
reason: 'The name describes a row of buttons, which this is not. Use quantic-action-group for that.',
|
|
29
|
+
},
|
|
36
30
|
slots: { '': { description: 'One or more quantic-button-group-item elements.' } },
|
|
37
31
|
subComponents: ['quantic-button-group-item'],
|
|
38
|
-
relatedTo: ['quantic-button'],
|
|
39
32
|
};
|
|
40
|
-
ButtonGroup.styles = css `
|
|
41
|
-
:host {
|
|
42
|
-
--quantic-component-button-group-padding-block: var(--quantic-spacing-2);
|
|
43
|
-
--quantic-component-button-group-padding-inline: var(--quantic-spacing-3);
|
|
44
|
-
--quantic-component-button-group-font-size: var(
|
|
45
|
-
--quantic-font-size-body-sm
|
|
46
|
-
);
|
|
47
|
-
--quantic-component-button-group-line-height: var(
|
|
48
|
-
--quantic-line-height-body-sm
|
|
49
|
-
);
|
|
50
|
-
--quantic-component-button-group-item-max-width: var(--quantic-width-xxs);
|
|
51
|
-
--quantic-component-button-group-border-radius: var(--quantic-radius-md);
|
|
52
|
-
--quantic-component-button-group-border-color: var(
|
|
53
|
-
--quantic-border-primary
|
|
54
|
-
);
|
|
55
|
-
|
|
56
|
-
max-width: 100%;
|
|
57
|
-
display: inline-flex;
|
|
58
|
-
overflow: visible;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.container {
|
|
62
|
-
display: inline-flex;
|
|
63
|
-
border: 1px solid var(--quantic-component-button-group-border-color);
|
|
64
|
-
border-radius: var(--quantic-component-button-group-border-radius);
|
|
65
|
-
}
|
|
66
|
-
`;
|
|
67
|
-
__decorate([
|
|
68
|
-
provide({ context: sizeContext }),
|
|
69
|
-
prop({ type: 'ButtonGroupSize', options: Object.values(ButtonGroupSize), default: ButtonGroupSize.Medium, description: 'Size applied to all child items via context.' })
|
|
70
|
-
], ButtonGroup.prototype, "size", void 0);
|
|
71
|
-
__decorate([
|
|
72
|
-
prop({ type: 'string', attribute: 'aria-label', description: 'Accessible label for the toolbar role.' })
|
|
73
|
-
], ButtonGroup.prototype, "ariaLabel", void 0);
|
|
74
33
|
ButtonGroup = __decorate([
|
|
75
34
|
quanticElement('quantic-button-group')
|
|
76
35
|
], ButtonGroup);
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { ButtonBarSize } from '../button-bar/index.constants';
|
|
2
|
+
/** @deprecated Renamed to `ButtonBarSize`. Removed in the next major. */
|
|
1
3
|
export declare const ButtonGroupSize: {
|
|
2
4
|
readonly Small: "sm";
|
|
3
5
|
readonly Medium: "md";
|
|
4
6
|
readonly Large: "lg";
|
|
5
7
|
};
|
|
6
|
-
|
|
8
|
+
/** @deprecated Renamed to `ButtonBarSize`. Removed in the next major. */
|
|
9
|
+
export type ButtonGroupSize = ButtonBarSize;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Large: 'lg',
|
|
5
|
-
};
|
|
1
|
+
import { ButtonBarSize } from '../button-bar/index.constants';
|
|
2
|
+
/** @deprecated Renamed to `ButtonBarSize`. Removed in the next major. */
|
|
3
|
+
export const ButtonGroupSize = ButtonBarSize;
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED