@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
|
@@ -575,7 +575,7 @@
|
|
|
575
575
|
'Supports icon-only mode and polymorphic rendering as an <a> or <span>. ' +
|
|
576
576
|
'Prefer over quantic-icon-label when the element needs to be interactive.',
|
|
577
577
|
category: 'action',
|
|
578
|
-
relatedTo: ['quantic-button-
|
|
578
|
+
relatedTo: ['quantic-button-bar', 'quantic-icon-label'],
|
|
579
579
|
};
|
|
580
580
|
exports.Button.formAssociated = true;
|
|
581
581
|
exports.Button.styles = i$7 `
|
|
@@ -5754,6 +5754,59 @@
|
|
|
5754
5754
|
quanticElement('quantic-status-badge')
|
|
5755
5755
|
], exports.StatusBadge);
|
|
5756
5756
|
|
|
5757
|
+
exports.BadgeGroup = class BadgeGroup extends QuanticElement {
|
|
5758
|
+
constructor() {
|
|
5759
|
+
super(...arguments);
|
|
5760
|
+
this.ariaLabel = null;
|
|
5761
|
+
}
|
|
5762
|
+
render() {
|
|
5763
|
+
return b `
|
|
5764
|
+
<div class="group" role="group" aria-label=${this.ariaLabel ?? 'Badges'}>
|
|
5765
|
+
<slot></slot>
|
|
5766
|
+
</div>
|
|
5767
|
+
`;
|
|
5768
|
+
}
|
|
5769
|
+
};
|
|
5770
|
+
exports.BadgeGroup.meta = {
|
|
5771
|
+
tag: 'quantic-badge-group',
|
|
5772
|
+
description: 'A run of quantic-badge or quantic-status-badge sharing one accessible name and a consistent gap. ' +
|
|
5773
|
+
'Wraps across lines, and each badge keeps its own size. Gap: --quantic-component-badge-group-gap. ' +
|
|
5774
|
+
'Use quantic-tag-group for tags.',
|
|
5775
|
+
category: 'display',
|
|
5776
|
+
slots: {
|
|
5777
|
+
'': {
|
|
5778
|
+
description: 'quantic-badge or quantic-status-badge elements.',
|
|
5779
|
+
},
|
|
5780
|
+
},
|
|
5781
|
+
subComponents: ['quantic-badge', 'quantic-status-badge'],
|
|
5782
|
+
relatedTo: ['quantic-badge', 'quantic-tag-group'],
|
|
5783
|
+
};
|
|
5784
|
+
exports.BadgeGroup.styles = i$7 `
|
|
5785
|
+
:host {
|
|
5786
|
+
display: block;
|
|
5787
|
+
}
|
|
5788
|
+
|
|
5789
|
+
.group {
|
|
5790
|
+
display: flex;
|
|
5791
|
+
flex-wrap: wrap;
|
|
5792
|
+
align-items: center;
|
|
5793
|
+
gap: var(
|
|
5794
|
+
--quantic-component-badge-group-gap,
|
|
5795
|
+
var(--quantic-spacing-1)
|
|
5796
|
+
);
|
|
5797
|
+
}
|
|
5798
|
+
`;
|
|
5799
|
+
__decorate([
|
|
5800
|
+
prop({
|
|
5801
|
+
type: 'string',
|
|
5802
|
+
attribute: 'aria-label',
|
|
5803
|
+
description: 'Accessible name for the group.',
|
|
5804
|
+
})
|
|
5805
|
+
], exports.BadgeGroup.prototype, "ariaLabel", void 0);
|
|
5806
|
+
exports.BadgeGroup = __decorate([
|
|
5807
|
+
quanticElement('quantic-badge-group')
|
|
5808
|
+
], exports.BadgeGroup);
|
|
5809
|
+
|
|
5757
5810
|
const CapacityBarSize = {
|
|
5758
5811
|
ExtraSmall: 'xs',
|
|
5759
5812
|
Small: 'sm',
|
|
@@ -5943,6 +5996,60 @@
|
|
|
5943
5996
|
quanticElement('quantic-capacity-bar')
|
|
5944
5997
|
], exports.CapacityBar);
|
|
5945
5998
|
|
|
5999
|
+
exports.ActionGroup = class ActionGroup extends QuanticElement {
|
|
6000
|
+
constructor() {
|
|
6001
|
+
super(...arguments);
|
|
6002
|
+
this.ariaLabel = null;
|
|
6003
|
+
}
|
|
6004
|
+
render() {
|
|
6005
|
+
return b `
|
|
6006
|
+
<div class="group" role="group" aria-label=${this.ariaLabel ?? 'Actions'}>
|
|
6007
|
+
<slot></slot>
|
|
6008
|
+
</div>
|
|
6009
|
+
`;
|
|
6010
|
+
}
|
|
6011
|
+
};
|
|
6012
|
+
exports.ActionGroup.meta = {
|
|
6013
|
+
tag: 'quantic-action-group',
|
|
6014
|
+
description: 'A row of related actions sharing one accessible name and a consistent gap. ' +
|
|
6015
|
+
'Takes quantic-button, and quantic-dropdown-menu or quantic-popover when the trigger is a button. ' +
|
|
6016
|
+
'Wraps when the row runs out of width. Gap: --quantic-component-action-group-gap. ' +
|
|
6017
|
+
'Use quantic-button-bar when the buttons should read as one joined control.',
|
|
6018
|
+
category: 'action',
|
|
6019
|
+
slots: {
|
|
6020
|
+
'': {
|
|
6021
|
+
description: 'quantic-button elements, or a quantic-dropdown-menu or quantic-popover triggered by one.',
|
|
6022
|
+
},
|
|
6023
|
+
},
|
|
6024
|
+
subComponents: ['quantic-button', 'quantic-dropdown-menu', 'quantic-popover'],
|
|
6025
|
+
relatedTo: ['quantic-button', 'quantic-button-bar', 'quantic-dialog-actions'],
|
|
6026
|
+
};
|
|
6027
|
+
exports.ActionGroup.styles = i$7 `
|
|
6028
|
+
:host {
|
|
6029
|
+
display: block;
|
|
6030
|
+
}
|
|
6031
|
+
|
|
6032
|
+
.group {
|
|
6033
|
+
display: flex;
|
|
6034
|
+
flex-wrap: wrap;
|
|
6035
|
+
align-items: center;
|
|
6036
|
+
gap: var(
|
|
6037
|
+
--quantic-component-action-group-gap,
|
|
6038
|
+
var(--quantic-spacing-3)
|
|
6039
|
+
);
|
|
6040
|
+
}
|
|
6041
|
+
`;
|
|
6042
|
+
__decorate([
|
|
6043
|
+
prop({
|
|
6044
|
+
type: 'string',
|
|
6045
|
+
attribute: 'aria-label',
|
|
6046
|
+
description: 'Accessible name for the group.',
|
|
6047
|
+
})
|
|
6048
|
+
], exports.ActionGroup.prototype, "ariaLabel", void 0);
|
|
6049
|
+
exports.ActionGroup = __decorate([
|
|
6050
|
+
quanticElement('quantic-action-group')
|
|
6051
|
+
], exports.ActionGroup);
|
|
6052
|
+
|
|
5946
6053
|
/**
|
|
5947
6054
|
* @license
|
|
5948
6055
|
* Copyright 2021 Google LLC
|
|
@@ -5988,54 +6095,135 @@
|
|
|
5988
6095
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5989
6096
|
*/function c({context:c,subscribe:e}){return (o,n)=>{"object"==typeof n?n.addInitializer((function(){new s$1(this,{context:c,callback:t=>{o.set.call(this,t);},subscribe:e});})):o.constructor.addInitializer((o=>{new s$1(o,{context:c,callback:t=>{o[n]=t;},subscribe:e});}));}}
|
|
5990
6097
|
|
|
5991
|
-
const
|
|
6098
|
+
const ButtonBarSize = {
|
|
5992
6099
|
Small: 'sm',
|
|
5993
6100
|
Medium: 'md',
|
|
5994
6101
|
Large: 'lg',
|
|
5995
6102
|
};
|
|
5996
6103
|
|
|
5997
|
-
const sizeContext$2 = n$1('button-
|
|
5998
|
-
|
|
5999
|
-
|
|
6104
|
+
const sizeContext$2 = n$1('button-bar.size');
|
|
6105
|
+
|
|
6106
|
+
const KEY_STEPS = {
|
|
6107
|
+
ArrowRight: 1,
|
|
6108
|
+
ArrowDown: 1,
|
|
6109
|
+
ArrowLeft: -1,
|
|
6110
|
+
ArrowUp: -1,
|
|
6111
|
+
Home: 'first',
|
|
6112
|
+
End: 'last',
|
|
6113
|
+
};
|
|
6114
|
+
function resolveFocusStop(items, hasSynced) {
|
|
6115
|
+
if (!items.length)
|
|
6116
|
+
return null;
|
|
6117
|
+
if (hasSynced) {
|
|
6118
|
+
const tabbable = items.findIndex((item) => item.tabbable);
|
|
6119
|
+
if (tabbable !== -1)
|
|
6120
|
+
return tabbable;
|
|
6121
|
+
}
|
|
6122
|
+
const active = items.findIndex((item) => item.active);
|
|
6123
|
+
return active === -1 ? 0 : active;
|
|
6124
|
+
}
|
|
6125
|
+
function nextFocusIndex(key, current, count) {
|
|
6126
|
+
const step = KEY_STEPS[key];
|
|
6127
|
+
if (step === undefined)
|
|
6128
|
+
return null;
|
|
6129
|
+
if (count < 2 || current < 0 || current >= count)
|
|
6130
|
+
return null;
|
|
6131
|
+
if (step === 'first')
|
|
6132
|
+
return 0;
|
|
6133
|
+
if (step === 'last')
|
|
6134
|
+
return count - 1;
|
|
6135
|
+
return (current + step + count) % count;
|
|
6136
|
+
}
|
|
6137
|
+
|
|
6138
|
+
const ITEM_TAGS = 'quantic-button-bar-item, quantic-button-group-item';
|
|
6139
|
+
exports.ButtonBar = class ButtonBar extends QuanticElement {
|
|
6000
6140
|
constructor() {
|
|
6001
6141
|
super(...arguments);
|
|
6002
|
-
this.size =
|
|
6142
|
+
this.size = ButtonBarSize.Medium;
|
|
6003
6143
|
this.ariaLabel = null;
|
|
6144
|
+
this.hasSynced = false;
|
|
6145
|
+
this.defaultLabel = 'Button bar';
|
|
6146
|
+
}
|
|
6147
|
+
connectedCallback() {
|
|
6148
|
+
super.connectedCallback();
|
|
6149
|
+
this.disabledObserver = new MutationObserver(() => this.syncFocusStop());
|
|
6150
|
+
this.disabledObserver.observe(this, {
|
|
6151
|
+
attributeFilter: ['disabled'],
|
|
6152
|
+
subtree: true,
|
|
6153
|
+
});
|
|
6154
|
+
}
|
|
6155
|
+
disconnectedCallback() {
|
|
6156
|
+
super.disconnectedCallback();
|
|
6157
|
+
this.disabledObserver?.disconnect();
|
|
6158
|
+
this.disabledObserver = undefined;
|
|
6159
|
+
}
|
|
6160
|
+
get items() {
|
|
6161
|
+
return [...this.querySelectorAll(ITEM_TAGS)].filter((item) => item.parentElement === this && !item.disabled);
|
|
6162
|
+
}
|
|
6163
|
+
setFocusStop(items, index) {
|
|
6164
|
+
items.forEach((item, position) => {
|
|
6165
|
+
item.tabbable = position === index;
|
|
6166
|
+
});
|
|
6167
|
+
}
|
|
6168
|
+
syncFocusStop() {
|
|
6169
|
+
const items = this.items;
|
|
6170
|
+
const stop = resolveFocusStop(items, this.hasSynced);
|
|
6171
|
+
if (stop === null)
|
|
6172
|
+
return;
|
|
6173
|
+
this.hasSynced = true;
|
|
6174
|
+
this.setFocusStop(items, stop);
|
|
6175
|
+
}
|
|
6176
|
+
handleFocusIn(event) {
|
|
6177
|
+
const items = this.items;
|
|
6178
|
+
const focused = items.findIndex((item) => item.contains(event.target));
|
|
6179
|
+
if (focused !== -1)
|
|
6180
|
+
this.setFocusStop(items, focused);
|
|
6181
|
+
}
|
|
6182
|
+
handleKeydown(event) {
|
|
6183
|
+
const items = this.items;
|
|
6184
|
+
const current = items.findIndex((item) => item.contains(event.target));
|
|
6185
|
+
const next = nextFocusIndex(event.key, current, items.length);
|
|
6186
|
+
if (next === null)
|
|
6187
|
+
return;
|
|
6188
|
+
event.preventDefault();
|
|
6189
|
+
this.setFocusStop(items, next);
|
|
6190
|
+
items[next].focus();
|
|
6004
6191
|
}
|
|
6005
6192
|
render() {
|
|
6006
6193
|
return b `
|
|
6007
6194
|
<div
|
|
6008
6195
|
class="container"
|
|
6009
6196
|
role="toolbar"
|
|
6010
|
-
aria-label=${this.ariaLabel
|
|
6197
|
+
aria-label=${this.ariaLabel ?? this.defaultLabel}
|
|
6198
|
+
@keydown=${this.handleKeydown}
|
|
6199
|
+
@focusin=${this.handleFocusIn}
|
|
6011
6200
|
>
|
|
6012
|
-
<slot></slot>
|
|
6201
|
+
<slot @slotchange=${() => this.syncFocusStop()}></slot>
|
|
6013
6202
|
</div>
|
|
6014
6203
|
`;
|
|
6015
6204
|
}
|
|
6016
6205
|
};
|
|
6017
|
-
exports.
|
|
6018
|
-
tag: 'quantic-button-
|
|
6019
|
-
description: 'Toolbar
|
|
6020
|
-
'Use
|
|
6206
|
+
exports.ButtonBar.meta = {
|
|
6207
|
+
tag: 'quantic-button-bar',
|
|
6208
|
+
description: 'Toolbar of related buttons joined into one cohesive control, with shared sizing. ' +
|
|
6209
|
+
'Use for switching between views or modes, and for a compact run of icon actions. ' +
|
|
6210
|
+
'Items carry aria-pressed via active, so a set can behave as exclusive options or as independent toggles. ' +
|
|
6211
|
+
'Focus follows the toolbar pattern: one tab stop, arrow keys move between items, Home and End jump to the ends. ' +
|
|
6212
|
+
'Prefer quantic-button for a standalone action, and quantic-tabs when each segment reveals a panel.',
|
|
6021
6213
|
category: 'action',
|
|
6022
|
-
slots: { '': { description: 'One or more quantic-button-
|
|
6023
|
-
subComponents: ['quantic-button-
|
|
6214
|
+
slots: { '': { description: 'One or more quantic-button-bar-item elements.' } },
|
|
6215
|
+
subComponents: ['quantic-button-bar-item'],
|
|
6024
6216
|
relatedTo: ['quantic-button'],
|
|
6025
6217
|
};
|
|
6026
|
-
exports.
|
|
6218
|
+
exports.ButtonBar.styles = i$7 `
|
|
6027
6219
|
:host {
|
|
6028
|
-
--quantic-
|
|
6029
|
-
--quantic-
|
|
6030
|
-
--quantic-
|
|
6031
|
-
|
|
6032
|
-
);
|
|
6033
|
-
--quantic-component-button-
|
|
6034
|
-
|
|
6035
|
-
);
|
|
6036
|
-
--quantic-component-button-group-item-max-width: var(--quantic-width-xxs);
|
|
6037
|
-
--quantic-component-button-group-border-radius: var(--quantic-radius-md);
|
|
6038
|
-
--quantic-component-button-group-border-color: var(
|
|
6220
|
+
--quantic-internal-button-bar-item-padding-block: var(--quantic-spacing-2);
|
|
6221
|
+
--quantic-internal-button-bar-item-padding-inline: var(--quantic-spacing-3);
|
|
6222
|
+
--quantic-internal-button-bar-item-font-size: var(--quantic-font-size-body-sm);
|
|
6223
|
+
--quantic-internal-button-bar-item-line-height: var(--quantic-line-height-body-sm);
|
|
6224
|
+
--quantic-component-button-bar-item-max-width: var(--quantic-width-xxs);
|
|
6225
|
+
--quantic-component-button-bar-border-radius: var(--quantic-radius-md);
|
|
6226
|
+
--quantic-component-button-bar-border-color: var(
|
|
6039
6227
|
--quantic-border-primary
|
|
6040
6228
|
);
|
|
6041
6229
|
|
|
@@ -6046,27 +6234,58 @@
|
|
|
6046
6234
|
|
|
6047
6235
|
.container {
|
|
6048
6236
|
display: inline-flex;
|
|
6049
|
-
border: 1px solid var(--quantic-component-button-
|
|
6050
|
-
border-radius: var(--quantic-component-button-
|
|
6237
|
+
border: 1px solid var(--quantic-component-button-bar-border-color);
|
|
6238
|
+
border-radius: var(--quantic-component-button-bar-border-radius);
|
|
6051
6239
|
}
|
|
6052
6240
|
`;
|
|
6053
6241
|
__decorate([
|
|
6054
6242
|
e({ context: sizeContext$2 }),
|
|
6055
|
-
prop({ type: '
|
|
6056
|
-
], exports.
|
|
6243
|
+
prop({ type: 'ButtonBarSize', options: Object.values(ButtonBarSize), default: ButtonBarSize.Medium, description: 'Size applied to all child items via context.' })
|
|
6244
|
+
], exports.ButtonBar.prototype, "size", void 0);
|
|
6057
6245
|
__decorate([
|
|
6058
|
-
prop({ type: 'string', attribute: 'aria-label', description: 'Accessible label for the
|
|
6059
|
-
], exports.
|
|
6246
|
+
prop({ type: 'string', attribute: 'aria-label', description: 'Accessible label for the group.' })
|
|
6247
|
+
], exports.ButtonBar.prototype, "ariaLabel", void 0);
|
|
6248
|
+
exports.ButtonBar = __decorate([
|
|
6249
|
+
quanticElement('quantic-button-bar')
|
|
6250
|
+
], exports.ButtonBar);
|
|
6251
|
+
|
|
6252
|
+
/**
|
|
6253
|
+
* @deprecated Renamed to `ButtonBar` (`quantic-button-bar`). This element
|
|
6254
|
+
* never grouped buttons: it joins borders and gives its items a pressed state, which is a
|
|
6255
|
+
* button bar. Removed in the next major. For a spaced row of related actions use
|
|
6256
|
+
* `ActionGroup`; the `ButtonGroup` name is retired rather than reused.
|
|
6257
|
+
*/
|
|
6258
|
+
exports.ButtonGroup = class ButtonGroup extends exports.ButtonBar {
|
|
6259
|
+
constructor() {
|
|
6260
|
+
super(...arguments);
|
|
6261
|
+
this.defaultLabel = 'Button group';
|
|
6262
|
+
}
|
|
6263
|
+
};
|
|
6264
|
+
exports.ButtonGroup.meta = {
|
|
6265
|
+
...exports.ButtonBar.meta,
|
|
6266
|
+
tag: 'quantic-button-group',
|
|
6267
|
+
description: 'Deprecated alias of quantic-button-bar. Use quantic-button-bar.',
|
|
6268
|
+
deprecated: {
|
|
6269
|
+
use: 'quantic-button-bar',
|
|
6270
|
+
reason: 'The name describes a row of buttons, which this is not. Use quantic-action-group for that.',
|
|
6271
|
+
},
|
|
6272
|
+
slots: { '': { description: 'One or more quantic-button-group-item elements.' } },
|
|
6273
|
+
subComponents: ['quantic-button-group-item'],
|
|
6274
|
+
};
|
|
6060
6275
|
exports.ButtonGroup = __decorate([
|
|
6061
6276
|
quanticElement('quantic-button-group')
|
|
6062
6277
|
], exports.ButtonGroup);
|
|
6063
6278
|
|
|
6064
|
-
exports.
|
|
6279
|
+
exports.ButtonBarItem = class ButtonBarItem extends QuanticElement {
|
|
6065
6280
|
constructor() {
|
|
6066
6281
|
super(...arguments);
|
|
6282
|
+
this.tabbable = true;
|
|
6067
6283
|
this.disabled = false;
|
|
6068
6284
|
this.active = false;
|
|
6069
6285
|
}
|
|
6286
|
+
focus(options) {
|
|
6287
|
+
this.innerButton?.focus(options);
|
|
6288
|
+
}
|
|
6070
6289
|
render() {
|
|
6071
6290
|
const classes = e$3({
|
|
6072
6291
|
main: true,
|
|
@@ -6075,8 +6294,9 @@
|
|
|
6075
6294
|
});
|
|
6076
6295
|
return b `
|
|
6077
6296
|
<button
|
|
6297
|
+
type="button"
|
|
6078
6298
|
class=${classes}
|
|
6079
|
-
tabindex=${this.disabled ? -1 : 0}
|
|
6299
|
+
tabindex=${this.disabled || !this.tabbable ? -1 : 0}
|
|
6080
6300
|
?disabled=${this.disabled}
|
|
6081
6301
|
aria-pressed=${this.active ? 'true' : 'false'}
|
|
6082
6302
|
>
|
|
@@ -6087,15 +6307,15 @@
|
|
|
6087
6307
|
`;
|
|
6088
6308
|
}
|
|
6089
6309
|
};
|
|
6090
|
-
exports.
|
|
6091
|
-
tag: 'quantic-button-
|
|
6092
|
-
description: '
|
|
6093
|
-
'Renders as a native button with shared sizing from the parent
|
|
6310
|
+
exports.ButtonBarItem.meta = {
|
|
6311
|
+
tag: 'quantic-button-bar-item',
|
|
6312
|
+
description: 'Single segment within a quantic-button-bar. ' +
|
|
6313
|
+
'Renders as a native button with shared sizing from the parent context and a pressed state via active.',
|
|
6094
6314
|
category: 'action',
|
|
6095
6315
|
slots: { '': { description: 'Button label or icon content.' } },
|
|
6096
|
-
relatedTo: ['quantic-button-
|
|
6316
|
+
relatedTo: ['quantic-button-bar', 'quantic-button'],
|
|
6097
6317
|
};
|
|
6098
|
-
exports.
|
|
6318
|
+
exports.ButtonBarItem.styles = i$7 `
|
|
6099
6319
|
:host {
|
|
6100
6320
|
display: inline-flex;
|
|
6101
6321
|
}
|
|
@@ -6117,18 +6337,27 @@
|
|
|
6117
6337
|
text-decoration: none;
|
|
6118
6338
|
text-align: center;
|
|
6119
6339
|
display: block;
|
|
6120
|
-
align-items: center;
|
|
6121
|
-
justify-content: center;
|
|
6122
|
-
gap: var(--quantic-spacing-2);
|
|
6123
6340
|
width: 100%;
|
|
6124
6341
|
color: var(--quantic-text-primary);
|
|
6125
6342
|
cursor: pointer;
|
|
6126
6343
|
outline: none;
|
|
6127
6344
|
box-sizing: border-box;
|
|
6128
|
-
padding: var(
|
|
6129
|
-
|
|
6130
|
-
|
|
6131
|
-
|
|
6345
|
+
padding: var(
|
|
6346
|
+
--quantic-component-button-bar-padding-block,
|
|
6347
|
+
var(--quantic-internal-button-bar-item-padding-block)
|
|
6348
|
+
)
|
|
6349
|
+
var(
|
|
6350
|
+
--quantic-component-button-bar-padding-inline,
|
|
6351
|
+
var(--quantic-internal-button-bar-item-padding-inline)
|
|
6352
|
+
);
|
|
6353
|
+
font-size: var(
|
|
6354
|
+
--quantic-component-button-bar-font-size,
|
|
6355
|
+
var(--quantic-internal-button-bar-item-font-size)
|
|
6356
|
+
);
|
|
6357
|
+
line-height: var(
|
|
6358
|
+
--quantic-component-button-bar-line-height,
|
|
6359
|
+
var(--quantic-internal-button-bar-item-line-height)
|
|
6360
|
+
);
|
|
6132
6361
|
transition:
|
|
6133
6362
|
background-color 0.2s ease-in-out,
|
|
6134
6363
|
color 0.2s ease-in-out;
|
|
@@ -6162,7 +6391,7 @@
|
|
|
6162
6391
|
display: block;
|
|
6163
6392
|
overflow: hidden;
|
|
6164
6393
|
text-overflow: ellipsis;
|
|
6165
|
-
max-width: var(--quantic-component-button-
|
|
6394
|
+
max-width: var(--quantic-component-button-bar-item-max-width);
|
|
6166
6395
|
}
|
|
6167
6396
|
|
|
6168
6397
|
.is-active {
|
|
@@ -6170,34 +6399,34 @@
|
|
|
6170
6399
|
}
|
|
6171
6400
|
|
|
6172
6401
|
.size--sm {
|
|
6173
|
-
--quantic-
|
|
6174
|
-
--quantic-
|
|
6175
|
-
--quantic-
|
|
6402
|
+
--quantic-internal-button-bar-item-padding-block: var(--quantic-spacing-1);
|
|
6403
|
+
--quantic-internal-button-bar-item-padding-inline: var(--quantic-spacing-2);
|
|
6404
|
+
--quantic-internal-button-bar-item-font-size: var(
|
|
6176
6405
|
--quantic-font-size-body-xs
|
|
6177
6406
|
);
|
|
6178
|
-
--quantic-
|
|
6407
|
+
--quantic-internal-button-bar-item-line-height: var(
|
|
6179
6408
|
--quantic-line-height-body-xs
|
|
6180
6409
|
);
|
|
6181
6410
|
}
|
|
6182
6411
|
|
|
6183
6412
|
.size--md {
|
|
6184
|
-
--quantic-
|
|
6185
|
-
--quantic-
|
|
6186
|
-
--quantic-
|
|
6413
|
+
--quantic-internal-button-bar-item-padding-block: var(--quantic-spacing-2);
|
|
6414
|
+
--quantic-internal-button-bar-item-padding-inline: var(--quantic-spacing-3);
|
|
6415
|
+
--quantic-internal-button-bar-item-font-size: var(
|
|
6187
6416
|
--quantic-font-size-body-sm
|
|
6188
6417
|
);
|
|
6189
|
-
--quantic-
|
|
6418
|
+
--quantic-internal-button-bar-item-line-height: var(
|
|
6190
6419
|
--quantic-line-height-body-sm
|
|
6191
6420
|
);
|
|
6192
6421
|
}
|
|
6193
6422
|
|
|
6194
6423
|
.size--lg {
|
|
6195
|
-
--quantic-
|
|
6196
|
-
--quantic-
|
|
6197
|
-
--quantic-
|
|
6424
|
+
--quantic-internal-button-bar-item-padding-block: 10px;
|
|
6425
|
+
--quantic-internal-button-bar-item-padding-inline: var(--quantic-spacing-3);
|
|
6426
|
+
--quantic-internal-button-bar-item-font-size: var(
|
|
6198
6427
|
--quantic-font-size-body-md
|
|
6199
6428
|
);
|
|
6200
|
-
--quantic-
|
|
6429
|
+
--quantic-internal-button-bar-item-line-height: var(
|
|
6201
6430
|
--quantic-line-height-body-md
|
|
6202
6431
|
);
|
|
6203
6432
|
}
|
|
@@ -6209,7 +6438,13 @@
|
|
|
6209
6438
|
`;
|
|
6210
6439
|
__decorate([
|
|
6211
6440
|
c({ context: sizeContext$2, subscribe: true })
|
|
6212
|
-
], exports.
|
|
6441
|
+
], exports.ButtonBarItem.prototype, "size", void 0);
|
|
6442
|
+
__decorate([
|
|
6443
|
+
r$2()
|
|
6444
|
+
], exports.ButtonBarItem.prototype, "tabbable", void 0);
|
|
6445
|
+
__decorate([
|
|
6446
|
+
e$5('button')
|
|
6447
|
+
], exports.ButtonBarItem.prototype, "innerButton", void 0);
|
|
6213
6448
|
__decorate([
|
|
6214
6449
|
prop({
|
|
6215
6450
|
type: 'boolean',
|
|
@@ -6217,7 +6452,7 @@
|
|
|
6217
6452
|
description: 'Prevents interaction and reduces opacity.',
|
|
6218
6453
|
reflect: true,
|
|
6219
6454
|
})
|
|
6220
|
-
], exports.
|
|
6455
|
+
], exports.ButtonBarItem.prototype, "disabled", void 0);
|
|
6221
6456
|
__decorate([
|
|
6222
6457
|
prop({
|
|
6223
6458
|
type: 'boolean',
|
|
@@ -6225,11 +6460,31 @@
|
|
|
6225
6460
|
description: 'Marks this item as the currently selected/active option.',
|
|
6226
6461
|
reflect: true,
|
|
6227
6462
|
})
|
|
6228
|
-
], exports.
|
|
6463
|
+
], exports.ButtonBarItem.prototype, "active", void 0);
|
|
6464
|
+
exports.ButtonBarItem = __decorate([
|
|
6465
|
+
quanticElement('quantic-button-bar-item')
|
|
6466
|
+
], exports.ButtonBarItem);
|
|
6467
|
+
|
|
6468
|
+
/**
|
|
6469
|
+
* @deprecated Renamed to `ButtonBarItem` (`quantic-button-bar-item`).
|
|
6470
|
+
* Removed in the next major.
|
|
6471
|
+
*/
|
|
6472
|
+
exports.ButtonGroupItem = class ButtonGroupItem extends exports.ButtonBarItem {
|
|
6473
|
+
};
|
|
6474
|
+
exports.ButtonGroupItem.meta = {
|
|
6475
|
+
...exports.ButtonBarItem.meta,
|
|
6476
|
+
tag: 'quantic-button-group-item',
|
|
6477
|
+
description: 'Deprecated alias of quantic-button-bar-item. Use quantic-button-bar-item.',
|
|
6478
|
+
deprecated: { use: 'quantic-button-bar-item' },
|
|
6479
|
+
relatedTo: ['quantic-button-group'],
|
|
6480
|
+
};
|
|
6229
6481
|
exports.ButtonGroupItem = __decorate([
|
|
6230
6482
|
quanticElement('quantic-button-group-item')
|
|
6231
6483
|
], exports.ButtonGroupItem);
|
|
6232
6484
|
|
|
6485
|
+
/** @deprecated Renamed to `ButtonBarSize`. Removed in the next major. */
|
|
6486
|
+
const ButtonGroupSize = ButtonBarSize;
|
|
6487
|
+
|
|
6233
6488
|
exports.GridDensity = void 0;
|
|
6234
6489
|
(function (GridDensity) {
|
|
6235
6490
|
GridDensity["Dense"] = "dense";
|
|
@@ -8665,33 +8920,33 @@
|
|
|
8665
8920
|
quanticElement('quantic-dialog-title')
|
|
8666
8921
|
], exports.DialogTitle);
|
|
8667
8922
|
|
|
8923
|
+
exports.ActionGroup.ensureDefined();
|
|
8668
8924
|
exports.DialogActions = class DialogActions extends QuanticElement {
|
|
8669
8925
|
render() {
|
|
8670
8926
|
return u$2 `
|
|
8671
|
-
<
|
|
8927
|
+
<quantic-action-group aria-label="">
|
|
8672
8928
|
<slot></slot>
|
|
8673
|
-
</
|
|
8929
|
+
</quantic-action-group>
|
|
8674
8930
|
`;
|
|
8675
8931
|
}
|
|
8676
8932
|
};
|
|
8677
8933
|
exports.DialogActions.meta = {
|
|
8678
8934
|
tag: 'quantic-dialog-actions',
|
|
8679
|
-
description: 'Footer actions bar
|
|
8680
|
-
'Lays
|
|
8935
|
+
description: 'Footer actions bar for quantic-dialog. ' +
|
|
8936
|
+
'Lays action buttons out as a quantic-action-group, flush to the right.',
|
|
8681
8937
|
category: 'feedback',
|
|
8682
8938
|
slots: { '': { description: 'Action buttons, typically quantic-button elements.' } },
|
|
8683
|
-
|
|
8939
|
+
subComponents: ['quantic-action-group'],
|
|
8940
|
+
relatedTo: ['quantic-dialog', 'quantic-button', 'quantic-action-group'],
|
|
8684
8941
|
};
|
|
8685
8942
|
exports.DialogActions.styles = i$7 `
|
|
8686
8943
|
:host {
|
|
8687
8944
|
display: block;
|
|
8688
8945
|
}
|
|
8689
8946
|
|
|
8690
|
-
|
|
8691
|
-
|
|
8692
|
-
|
|
8693
|
-
justify-content: flex-end;
|
|
8694
|
-
gap: var(--quantic-spacing-3);
|
|
8947
|
+
quantic-action-group {
|
|
8948
|
+
width: fit-content;
|
|
8949
|
+
margin-inline-start: auto;
|
|
8695
8950
|
}
|
|
8696
8951
|
`;
|
|
8697
8952
|
exports.DialogActions = __decorate([
|
|
@@ -66488,8 +66743,8 @@
|
|
|
66488
66743
|
|
|
66489
66744
|
exports.LucideIconArrowLeft.ensureDefined();
|
|
66490
66745
|
exports.LucideIconArrowRight.ensureDefined();
|
|
66491
|
-
exports.
|
|
66492
|
-
exports.
|
|
66746
|
+
exports.ButtonBar.ensureDefined();
|
|
66747
|
+
exports.ButtonBarItem.ensureDefined();
|
|
66493
66748
|
exports.Pagination = class Pagination extends QuanticElement {
|
|
66494
66749
|
constructor() {
|
|
66495
66750
|
super(...arguments);
|
|
@@ -66520,8 +66775,8 @@
|
|
|
66520
66775
|
const pageNumbers = getPageNumbers(this.currentPage, this.totalPages, this.maxDisplayedPages);
|
|
66521
66776
|
return b `
|
|
66522
66777
|
<nav role="navigation" aria-label="Pagination">
|
|
66523
|
-
<quantic-button-
|
|
66524
|
-
<quantic-button-
|
|
66778
|
+
<quantic-button-bar size=${this.size}>
|
|
66779
|
+
<quantic-button-bar-item
|
|
66525
66780
|
?disabled=${isPrevDisabled}
|
|
66526
66781
|
@click=${this._handlePrevious}
|
|
66527
66782
|
aria-label="Go to previous page"
|
|
@@ -66530,26 +66785,26 @@
|
|
|
66530
66785
|
size="xs"
|
|
66531
66786
|
class="icon"
|
|
66532
66787
|
></quantic-icon-lucide-arrow-left>
|
|
66533
|
-
</quantic-button-
|
|
66788
|
+
</quantic-button-bar-item>
|
|
66534
66789
|
|
|
66535
66790
|
${pageNumbers.map((page) => page === 'ellipsis'
|
|
66536
66791
|
? b `
|
|
66537
|
-
<quantic-button-
|
|
66792
|
+
<quantic-button-bar-item disabled>
|
|
66538
66793
|
...
|
|
66539
|
-
</quantic-button-
|
|
66794
|
+
</quantic-button-bar-item>
|
|
66540
66795
|
`
|
|
66541
66796
|
: b `
|
|
66542
|
-
<quantic-button-
|
|
66797
|
+
<quantic-button-bar-item
|
|
66543
66798
|
?active=${page === this.currentPage}
|
|
66544
66799
|
@click=${() => this._handlePageChange(page)}
|
|
66545
66800
|
aria-label="Go to page ${page}"
|
|
66546
66801
|
aria-current=${page === this.currentPage ? 'page' : 'false'}
|
|
66547
66802
|
>
|
|
66548
66803
|
${page}
|
|
66549
|
-
</quantic-button-
|
|
66804
|
+
</quantic-button-bar-item>
|
|
66550
66805
|
`)}
|
|
66551
66806
|
|
|
66552
|
-
<quantic-button-
|
|
66807
|
+
<quantic-button-bar-item
|
|
66553
66808
|
?disabled=${isNextDisabled}
|
|
66554
66809
|
@click=${this._handleNext}
|
|
66555
66810
|
aria-label="Go to next page"
|
|
@@ -66558,8 +66813,8 @@
|
|
|
66558
66813
|
size="xs"
|
|
66559
66814
|
class="icon"
|
|
66560
66815
|
></quantic-icon-lucide-arrow-right>
|
|
66561
|
-
</quantic-button-
|
|
66562
|
-
</quantic-button-
|
|
66816
|
+
</quantic-button-bar-item>
|
|
66817
|
+
</quantic-button-bar>
|
|
66563
66818
|
</nav>
|
|
66564
66819
|
`;
|
|
66565
66820
|
}
|
|
@@ -66569,7 +66824,7 @@
|
|
|
66569
66824
|
description: 'Page navigation control with previous/next and numbered page buttons. ' +
|
|
66570
66825
|
'Emits page-change events; the host is responsible for updating currentPage.',
|
|
66571
66826
|
category: 'navigation',
|
|
66572
|
-
relatedTo: ['quantic-button-
|
|
66827
|
+
relatedTo: ['quantic-button-bar'],
|
|
66573
66828
|
};
|
|
66574
66829
|
exports.Pagination.styles = i$7 `
|
|
66575
66830
|
.icon {
|
|
@@ -69791,6 +70046,59 @@
|
|
|
69791
70046
|
quanticElement('quantic-count-tag')
|
|
69792
70047
|
], exports.CountTag);
|
|
69793
70048
|
|
|
70049
|
+
exports.TagGroup = class TagGroup extends QuanticElement {
|
|
70050
|
+
constructor() {
|
|
70051
|
+
super(...arguments);
|
|
70052
|
+
this.ariaLabel = null;
|
|
70053
|
+
}
|
|
70054
|
+
render() {
|
|
70055
|
+
return b `
|
|
70056
|
+
<div class="group" role="group" aria-label=${this.ariaLabel ?? 'Tags'}>
|
|
70057
|
+
<slot></slot>
|
|
70058
|
+
</div>
|
|
70059
|
+
`;
|
|
70060
|
+
}
|
|
70061
|
+
};
|
|
70062
|
+
exports.TagGroup.meta = {
|
|
70063
|
+
tag: 'quantic-tag-group',
|
|
70064
|
+
description: 'A run of quantic-tag, quantic-status-tag or quantic-count-tag sharing one accessible name and a consistent gap. ' +
|
|
70065
|
+
'Wraps across lines, and each tag keeps its own size. Gap: --quantic-component-tag-group-gap. ' +
|
|
70066
|
+
'Use quantic-badge-group for badges.',
|
|
70067
|
+
category: 'display',
|
|
70068
|
+
slots: {
|
|
70069
|
+
'': {
|
|
70070
|
+
description: 'quantic-tag, quantic-status-tag or quantic-count-tag elements.',
|
|
70071
|
+
},
|
|
70072
|
+
},
|
|
70073
|
+
subComponents: ['quantic-tag', 'quantic-status-tag', 'quantic-count-tag'],
|
|
70074
|
+
relatedTo: ['quantic-tag', 'quantic-badge-group'],
|
|
70075
|
+
};
|
|
70076
|
+
exports.TagGroup.styles = i$7 `
|
|
70077
|
+
:host {
|
|
70078
|
+
display: block;
|
|
70079
|
+
}
|
|
70080
|
+
|
|
70081
|
+
.group {
|
|
70082
|
+
display: flex;
|
|
70083
|
+
flex-wrap: wrap;
|
|
70084
|
+
align-items: center;
|
|
70085
|
+
gap: var(
|
|
70086
|
+
--quantic-component-tag-group-gap,
|
|
70087
|
+
var(--quantic-spacing-1)
|
|
70088
|
+
);
|
|
70089
|
+
}
|
|
70090
|
+
`;
|
|
70091
|
+
__decorate([
|
|
70092
|
+
prop({
|
|
70093
|
+
type: 'string',
|
|
70094
|
+
attribute: 'aria-label',
|
|
70095
|
+
description: 'Accessible name for the group.',
|
|
70096
|
+
})
|
|
70097
|
+
], exports.TagGroup.prototype, "ariaLabel", void 0);
|
|
70098
|
+
exports.TagGroup = __decorate([
|
|
70099
|
+
quanticElement('quantic-tag-group')
|
|
70100
|
+
], exports.TagGroup);
|
|
70101
|
+
|
|
69794
70102
|
const TextVariant = {
|
|
69795
70103
|
Body: 'body',
|
|
69796
70104
|
Display: 'display',
|
|
@@ -70568,6 +70876,7 @@
|
|
|
70568
70876
|
exports.AlertType = AlertType;
|
|
70569
70877
|
exports.BadgeColor = BadgeColor;
|
|
70570
70878
|
exports.BadgeSize = BadgeSize;
|
|
70879
|
+
exports.ButtonBarSize = ButtonBarSize;
|
|
70571
70880
|
exports.ButtonGroupSize = ButtonGroupSize;
|
|
70572
70881
|
exports.ButtonGrow = ButtonGrow;
|
|
70573
70882
|
exports.ButtonSize = ButtonSize;
|