@ctrliq/quantic-components 1.67.0 → 1.67.2
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/alert/alert.d.ts +1 -1
- package/dist/alert/alert.js +4 -12
- package/dist/card/card-title.component.d.ts +1 -1
- package/dist/card/card-title.component.js +4 -12
- package/dist/card/card.component.d.ts +2 -1
- package/dist/card/card.component.js +9 -10
- package/dist/dialog/dialog-title.d.ts +1 -1
- package/dist/dialog/dialog-title.js +3 -11
- package/dist/dialog/dialog.d.ts +1 -1
- package/dist/dialog/dialog.js +4 -13
- package/dist/dropdown-menu/group.component.d.ts +2 -1
- package/dist/dropdown-menu/group.component.js +9 -3
- package/dist/field/field.component.d.ts +4 -3
- package/dist/field/field.component.js +59 -35
- package/dist/field/render-as-field.hoc.d.ts +1 -1
- package/dist/field/render-as-field.hoc.js +21 -8
- package/dist/index.js.map +1 -1
- package/dist/inline-edit/index.d.ts +2 -3
- package/dist/inline-edit/index.js +16 -8
- package/dist/layout/layout.component.d.ts +5 -2
- package/dist/layout/layout.component.js +28 -14
- package/dist/layout/sidebar.component.d.ts +1 -1
- package/dist/layout/sidebar.component.js +5 -5
- package/dist/meta/index.js.map +1 -1
- package/dist/option-card/option-card.component.d.ts +1 -1
- package/dist/option-card/option-card.component.js +4 -12
- package/dist/panel/panel-header.component.d.ts +1 -1
- package/dist/panel/panel-header.component.js +4 -16
- package/dist/panel/panel.component.d.ts +1 -1
- package/dist/panel/panel.component.js +4 -12
- package/dist/popover/popover-popup.d.ts +1 -1
- package/dist/popover/popover-popup.js +3 -3
- package/dist/popover/popover.d.ts +2 -2
- package/dist/quantic-components.js +252 -307
- package/dist/quantic-components.js.map +1 -1
- package/dist/quantic-components.min.js +1917 -1977
- package/dist/quantic-components.min.js.map +1 -1
- package/dist/shared/auto-hide-empty-slots.mixin.d.ts +19 -20
- package/dist/shared/auto-hide-empty-slots.mixin.js +43 -43
- package/dist/shared/quantic-element.d.ts +11 -1
- package/dist/shared/slot-utils.d.ts +24 -0
- package/dist/shared/slot-utils.js +38 -0
- package/dist/table/index.stories.d.ts +1 -0
- package/dist/table/index.stories.js +19 -0
- package/dist/table/table.component.d.ts +1 -1
- package/dist/table/table.component.js +3 -11
- package/dist/toast/toast.d.ts +1 -1
- package/dist/toast/toast.js +4 -12
- package/dist/toggle/index.d.ts +1 -1
- package/dist/toggle/index.js +1 -2
- package/dist/types/alert/alert.d.ts +1 -1
- package/dist/types/card/card-title.component.d.ts +1 -1
- package/dist/types/card/card.component.d.ts +2 -1
- package/dist/types/dialog/dialog-title.d.ts +1 -1
- package/dist/types/dialog/dialog.d.ts +1 -1
- package/dist/types/dropdown-menu/group.component.d.ts +2 -1
- package/dist/types/field/field.component.d.ts +4 -3
- package/dist/types/field/render-as-field.hoc.d.ts +1 -1
- package/dist/types/inline-edit/index.d.ts +2 -3
- package/dist/types/layout/layout.component.d.ts +5 -2
- package/dist/types/layout/sidebar.component.d.ts +1 -1
- package/dist/types/option-card/option-card.component.d.ts +1 -1
- package/dist/types/panel/panel-header.component.d.ts +1 -1
- package/dist/types/panel/panel.component.d.ts +1 -1
- package/dist/types/popover/popover-popup.d.ts +1 -1
- package/dist/types/popover/popover.d.ts +2 -2
- package/dist/types/shared/auto-hide-empty-slots.mixin.d.ts +19 -20
- package/dist/types/shared/quantic-element.d.ts +11 -1
- package/dist/types/shared/slot-utils.d.ts +24 -0
- package/dist/types/table/index.stories.d.ts +1 -0
- package/dist/types/table/table.component.d.ts +1 -1
- package/dist/types/toast/toast.d.ts +1 -1
- package/dist/types/toggle/index.d.ts +1 -1
- package/package.json +4 -4
|
@@ -195,125 +195,52 @@
|
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
/**
|
|
198
|
-
*
|
|
199
|
-
* This is the foundation for other slot-related patterns like:
|
|
200
|
-
* - Slot-wins-over-attribute pattern
|
|
201
|
-
* - Auto-hiding empty slots
|
|
202
|
-
* - Conditional rendering based on slot content
|
|
198
|
+
* Mixin that automatically hides empty named slots using CSS only.
|
|
203
199
|
*
|
|
204
|
-
*
|
|
205
|
-
*
|
|
206
|
-
* class MyComponent extends SlotContentMixin(LitElement) {
|
|
207
|
-
* @property() label = '';
|
|
200
|
+
* Each named slot is hidden by default and revealed when the host has a light
|
|
201
|
+
* DOM child with a matching `slot` attribute. Two rules cover all browsers:
|
|
208
202
|
*
|
|
209
|
-
*
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
*
|
|
213
|
-
*
|
|
214
|
-
*
|
|
215
|
-
*
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
|
|
219
|
-
const SlotContentMixin = (superClass) => {
|
|
220
|
-
class SlotContentClass extends superClass {
|
|
221
|
-
/**
|
|
222
|
-
* Checks if a slot is empty by examining its assigned nodes.
|
|
223
|
-
* A slot is considered empty if it has no element nodes and no text nodes with non-whitespace content.
|
|
224
|
-
* @param slot The slot element to check (or slot name as string)
|
|
225
|
-
* @returns true if the slot is empty, false otherwise
|
|
226
|
-
*/
|
|
227
|
-
isSlotEmpty(slot) {
|
|
228
|
-
const slotElement = typeof slot === 'string' ? this.getSlotByName(slot) : slot;
|
|
229
|
-
return !(slotElement
|
|
230
|
-
?.assignedNodes({ flatten: true })
|
|
231
|
-
.some((n) => n.nodeType !== Node.TEXT_NODE || n.textContent?.trim()) ?? false);
|
|
232
|
-
}
|
|
233
|
-
/**
|
|
234
|
-
* Gets a slot element by name from the shadow root.
|
|
235
|
-
* @param name The name of the slot
|
|
236
|
-
* @returns The slot element or null if not found
|
|
237
|
-
*/
|
|
238
|
-
getSlotByName(name) {
|
|
239
|
-
return this.renderRoot.querySelector(`slot[name="${name}"]`);
|
|
240
|
-
}
|
|
241
|
-
/**
|
|
242
|
-
* Checks if a named slot has content by examining the light DOM.
|
|
243
|
-
* @param name The name of the slot to check
|
|
244
|
-
* @returns true if the slot has content, false otherwise
|
|
245
|
-
*/
|
|
246
|
-
hasSlotContent(name) {
|
|
247
|
-
return (
|
|
248
|
-
// First check light DOM for elements with matching slot attribute
|
|
249
|
-
!!this.querySelector(`[slot="${name}"]`) ||
|
|
250
|
-
// Fallback: check if shadow root slot has assigned content
|
|
251
|
-
!this.isSlotEmpty(this.getSlotByName(name)));
|
|
252
|
-
}
|
|
253
|
-
/**
|
|
254
|
-
* Gets the text content of a named slot from the light DOM.
|
|
255
|
-
* @param name The name of the slot
|
|
256
|
-
* @returns The text content of the slot or an empty string
|
|
257
|
-
*/
|
|
258
|
-
getSlotTextContent(name) {
|
|
259
|
-
const selector = name ? `[slot="${name}"]` : ':not([slot])';
|
|
260
|
-
const slotElements = this.querySelectorAll(selector);
|
|
261
|
-
return Array.from(slotElements)
|
|
262
|
-
.map((el) => el.textContent?.trim() ?? '')
|
|
263
|
-
.filter(Boolean)
|
|
264
|
-
.join(' ');
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
return SlotContentClass;
|
|
268
|
-
};
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* Mixin that automatically hides empty slots using the `hidden` attribute.
|
|
272
|
-
* Extends SlotContentMixin to inherit slot checking functionality.
|
|
203
|
+
* - `:host(:has([slot="name"]))` — Safari and Firefox
|
|
204
|
+
* - `@scope { :scope:has([slot="name"]) }` — Chrome (@scope changes the
|
|
205
|
+
* evaluation context so :has() can see light DOM children)
|
|
206
|
+
*
|
|
207
|
+
* The reveal value is `display: revert-layer` rather than `display: block` so
|
|
208
|
+
* that the component's own display value is restored instead of overridden.
|
|
209
|
+
* Component styles are placed in `@layer quantic-component` and the
|
|
210
|
+
* hide/reveal rules in `@layer quantic-slot-visibility` (declared after, so
|
|
211
|
+
* higher priority). `revert-layer` then falls back to whatever the component
|
|
212
|
+
* set in `quantic-component`.
|
|
273
213
|
*
|
|
274
|
-
*
|
|
275
|
-
*
|
|
214
|
+
* CSS is injected via `finalizeStyles` so it lands in Lit SSR's Declarative
|
|
215
|
+
* Shadow DOM output — no JS, no layout shift.
|
|
276
216
|
*
|
|
277
217
|
* @example
|
|
278
|
-
*
|
|
279
|
-
* class MyComponent extends AutoHideEmptySlotsMixin(QuanticElement) {
|
|
280
|
-
* render() {
|
|
281
|
-
* return html`
|
|
282
|
-
* <slot name="header" @slotchange=${this.handleAutoHide}></slot>
|
|
283
|
-
* <slot></slot>
|
|
284
|
-
* <slot name="footer" @slotchange=${this.handleAutoHide}></slot>
|
|
285
|
-
* `;
|
|
286
|
-
* }
|
|
287
|
-
* }
|
|
288
|
-
* ```
|
|
218
|
+
* class MyElement extends AutoHideEmptySlotsMixin(QuanticElement, ['header', 'footer']) {}
|
|
289
219
|
*/
|
|
290
|
-
const AutoHideEmptySlotsMixin = (superClass) => {
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
this.renderRoot
|
|
315
|
-
.querySelectorAll('slot')
|
|
316
|
-
.forEach((e) => this.updateSlotVisibility(e));
|
|
220
|
+
const AutoHideEmptySlotsMixin = (superClass, namedSlots = []) => {
|
|
221
|
+
if (namedSlots.length === 0)
|
|
222
|
+
return superClass;
|
|
223
|
+
// A component may declare a native CSSStyleSheet, which Lit passes through
|
|
224
|
+
// untouched wherever adoptedStyleSheets is supported.
|
|
225
|
+
const toCssText = (style) => 'cssText' in style
|
|
226
|
+
? style.cssText
|
|
227
|
+
: Array.from(style.cssRules, (rule) => rule.cssText).join('\n');
|
|
228
|
+
const slotRulesCSS = namedSlots
|
|
229
|
+
.map((name) => [
|
|
230
|
+
`slot[name="${name}"] { display: none; }`,
|
|
231
|
+
`:host(:has([slot="${name}"])) slot[name="${name}"] { display: revert-layer; }`,
|
|
232
|
+
`@scope { :scope:has([slot="${name}"]) slot[name="${name}"] { display: revert-layer; } }`,
|
|
233
|
+
].join(' '))
|
|
234
|
+
.join(' ');
|
|
235
|
+
class AutoHideEmptySlotsClass extends superClass {
|
|
236
|
+
static finalizeStyles(styles) {
|
|
237
|
+
const base = superClass.finalizeStyles?.call(this, styles) ?? [];
|
|
238
|
+
const baseCSS = base.map(toCssText).join('\n');
|
|
239
|
+
return [
|
|
240
|
+
r$6(`@layer quantic-component, quantic-slot-visibility;` +
|
|
241
|
+
` @layer quantic-component { ${baseCSS} }` +
|
|
242
|
+
` @layer quantic-slot-visibility { ${slotRulesCSS} }`),
|
|
243
|
+
];
|
|
317
244
|
}
|
|
318
245
|
}
|
|
319
246
|
return AutoHideEmptySlotsClass;
|
|
@@ -2601,7 +2528,7 @@
|
|
|
2601
2528
|
exports.LucideIconInfo.ensureDefined();
|
|
2602
2529
|
exports.LucideIconTriangleAlert.ensureDefined();
|
|
2603
2530
|
exports.LucideIconX.ensureDefined();
|
|
2604
|
-
exports.Alert = class Alert extends AutoHideEmptySlotsMixin(QuanticElement) {
|
|
2531
|
+
exports.Alert = class Alert extends AutoHideEmptySlotsMixin(QuanticElement, ['title', 'action']) {
|
|
2605
2532
|
constructor() {
|
|
2606
2533
|
super(...arguments);
|
|
2607
2534
|
this.type = AlertType.Info;
|
|
@@ -2646,17 +2573,9 @@
|
|
|
2646
2573
|
<slot name="icon">${this.renderDefaultIcon()}</slot>
|
|
2647
2574
|
</span>
|
|
2648
2575
|
<div class="content">
|
|
2649
|
-
<slot
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
@slotchange=${this.handleAutoHide}
|
|
2653
|
-
></slot>
|
|
2654
|
-
<slot class="body" @slotchange=${this.handleAutoHide}></slot>
|
|
2655
|
-
<slot
|
|
2656
|
-
name="action"
|
|
2657
|
-
class="action"
|
|
2658
|
-
@slotchange=${this.handleAutoHide}
|
|
2659
|
-
></slot>
|
|
2576
|
+
<slot name="title" class="title"></slot>
|
|
2577
|
+
<slot class="body"></slot>
|
|
2578
|
+
<slot name="action" class="action"></slot>
|
|
2660
2579
|
</div>
|
|
2661
2580
|
${this.showCloseButton
|
|
2662
2581
|
? b `<quantic-button
|
|
@@ -6109,6 +6028,45 @@
|
|
|
6109
6028
|
quanticElement('quantic-button-group-item')
|
|
6110
6029
|
], exports.ButtonGroupItem);
|
|
6111
6030
|
|
|
6031
|
+
/**
|
|
6032
|
+
* Returns true if a slot has at least one non-whitespace node assigned.
|
|
6033
|
+
*/
|
|
6034
|
+
function slotHasContent(slot) {
|
|
6035
|
+
return slot
|
|
6036
|
+
.assignedNodes({ flatten: true })
|
|
6037
|
+
.some((n) => n.nodeType !== Node.TEXT_NODE || (n.textContent?.trim() ?? '') !== '');
|
|
6038
|
+
}
|
|
6039
|
+
/**
|
|
6040
|
+
* Returns the concatenated trimmed text content of all assigned nodes.
|
|
6041
|
+
*/
|
|
6042
|
+
function slotTextContent(slot) {
|
|
6043
|
+
return slot
|
|
6044
|
+
.assignedNodes({ flatten: true })
|
|
6045
|
+
.map((n) => n.textContent?.trim() ?? '')
|
|
6046
|
+
.filter(Boolean)
|
|
6047
|
+
.join(' ');
|
|
6048
|
+
}
|
|
6049
|
+
/**
|
|
6050
|
+
* Returns a slotchange event handler that calls `setter` with whether the slot
|
|
6051
|
+
* has non-empty content.
|
|
6052
|
+
*
|
|
6053
|
+
* @example
|
|
6054
|
+
* html`<slot @slotchange=${onSlotChange((has) => (this._hasLabel = has))}></slot>`
|
|
6055
|
+
*/
|
|
6056
|
+
function onSlotChange(setter) {
|
|
6057
|
+
return (e) => setter(slotHasContent(e.target));
|
|
6058
|
+
}
|
|
6059
|
+
/**
|
|
6060
|
+
* Returns a slotchange event handler that calls `setter` with the slot's text
|
|
6061
|
+
* content, falling back to `''` when empty.
|
|
6062
|
+
*
|
|
6063
|
+
* @example
|
|
6064
|
+
* html`<slot @slotchange=${onSlotTextChange((t) => (this._labelText = t))}></slot>`
|
|
6065
|
+
*/
|
|
6066
|
+
function onSlotTextChange(setter) {
|
|
6067
|
+
return (e) => setter(slotTextContent(e.target));
|
|
6068
|
+
}
|
|
6069
|
+
|
|
6112
6070
|
exports.GridDensity = void 0;
|
|
6113
6071
|
(function (GridDensity) {
|
|
6114
6072
|
GridDensity["Dense"] = "dense";
|
|
@@ -6135,7 +6093,7 @@
|
|
|
6135
6093
|
*/
|
|
6136
6094
|
const CardGroupDensity = exports.GridDensity;
|
|
6137
6095
|
|
|
6138
|
-
exports.Card = class Card extends AutoHideEmptySlotsMixin(QuanticElement) {
|
|
6096
|
+
exports.Card = class Card extends AutoHideEmptySlotsMixin(QuanticElement, ['header', 'footer', 'action-icon']) {
|
|
6139
6097
|
constructor() {
|
|
6140
6098
|
super(...arguments);
|
|
6141
6099
|
this.as = 'div';
|
|
@@ -6143,6 +6101,7 @@
|
|
|
6143
6101
|
this.size = exports.CardSize.Medium;
|
|
6144
6102
|
this.type = 'button';
|
|
6145
6103
|
this.disabled = false;
|
|
6104
|
+
this.hasActionIconSlot = false;
|
|
6146
6105
|
}
|
|
6147
6106
|
render() {
|
|
6148
6107
|
const classes = e$3({
|
|
@@ -6151,35 +6110,28 @@
|
|
|
6151
6110
|
[`size--${this.size}`]: true,
|
|
6152
6111
|
['is-interactive']: this.as === 'button' || this.as === 'a',
|
|
6153
6112
|
['is-disabled']: this.disabled,
|
|
6154
|
-
[`has-action-icon`]: this.
|
|
6113
|
+
[`has-action-icon`]: this.hasActionIconSlot,
|
|
6155
6114
|
});
|
|
6156
|
-
const handleSlotChange = (e) => {
|
|
6157
|
-
this.handleAutoHide(e);
|
|
6158
|
-
this.requestUpdate();
|
|
6159
|
-
};
|
|
6160
6115
|
const slots = u$2 `
|
|
6161
6116
|
<slot
|
|
6162
6117
|
name="header"
|
|
6163
6118
|
class="header"
|
|
6164
6119
|
data-description="Header area — place quantic-card-title and quantic-card-meta here."
|
|
6165
|
-
@slotchange=${handleSlotChange}
|
|
6166
6120
|
></slot>
|
|
6167
6121
|
<slot
|
|
6168
6122
|
class="body"
|
|
6169
6123
|
data-description="Main body content."
|
|
6170
|
-
@slotchange=${handleSlotChange}
|
|
6171
6124
|
></slot>
|
|
6172
6125
|
<slot
|
|
6173
6126
|
name="footer"
|
|
6174
6127
|
class="footer"
|
|
6175
6128
|
data-description="Footer content, pinned to the bottom of the card."
|
|
6176
|
-
@slotchange=${handleSlotChange}
|
|
6177
6129
|
></slot>
|
|
6178
6130
|
<slot
|
|
6179
6131
|
name="action-icon"
|
|
6180
6132
|
class="action-icon"
|
|
6181
6133
|
data-description="Icon in the top-right corner; only visible on interactive cards."
|
|
6182
|
-
@slotchange=${
|
|
6134
|
+
@slotchange=${onSlotChange((has) => (this.hasActionIconSlot = has))}
|
|
6183
6135
|
></slot>
|
|
6184
6136
|
`;
|
|
6185
6137
|
if (this.as === 'button') {
|
|
@@ -6446,6 +6398,9 @@
|
|
|
6446
6398
|
__decorate([
|
|
6447
6399
|
prop({ type: 'string', description: 'Download filename (as="a" only).' })
|
|
6448
6400
|
], exports.Card.prototype, "download", void 0);
|
|
6401
|
+
__decorate([
|
|
6402
|
+
r$2()
|
|
6403
|
+
], exports.Card.prototype, "hasActionIconSlot", void 0);
|
|
6449
6404
|
exports.Card = __decorate([
|
|
6450
6405
|
quanticElement('quantic-card')
|
|
6451
6406
|
], exports.Card);
|
|
@@ -7252,21 +7207,13 @@
|
|
|
7252
7207
|
quanticElement('quantic-card-meta')
|
|
7253
7208
|
], exports.CardMeta);
|
|
7254
7209
|
|
|
7255
|
-
exports.CardTitle = class CardTitle extends AutoHideEmptySlotsMixin(QuanticElement) {
|
|
7210
|
+
exports.CardTitle = class CardTitle extends AutoHideEmptySlotsMixin(QuanticElement, ['pretitle', 'subtitle']) {
|
|
7256
7211
|
render() {
|
|
7257
7212
|
return u$2 `
|
|
7258
7213
|
<hgroup>
|
|
7259
|
-
<slot
|
|
7260
|
-
|
|
7261
|
-
|
|
7262
|
-
@slotchange=${this.handleAutoHide}
|
|
7263
|
-
></slot>
|
|
7264
|
-
<slot class="title" @slotchange=${this.handleAutoHide}></slot>
|
|
7265
|
-
<slot
|
|
7266
|
-
name="subtitle"
|
|
7267
|
-
class="subtitle"
|
|
7268
|
-
@slotchange=${this.handleAutoHide}
|
|
7269
|
-
></slot>
|
|
7214
|
+
<slot name="pretitle" class="pretitle"></slot>
|
|
7215
|
+
<slot class="title"></slot>
|
|
7216
|
+
<slot name="subtitle" class="subtitle"></slot>
|
|
7270
7217
|
</hgroup>
|
|
7271
7218
|
`;
|
|
7272
7219
|
}
|
|
@@ -8150,7 +8097,7 @@
|
|
|
8150
8097
|
quanticElement('quantic-dialog-backdrop')
|
|
8151
8098
|
], exports.DialogBackdropElement);
|
|
8152
8099
|
|
|
8153
|
-
exports.DialogTitle = class DialogTitle extends AutoHideEmptySlotsMixin(QuanticElement) {
|
|
8100
|
+
exports.DialogTitle = class DialogTitle extends AutoHideEmptySlotsMixin(QuanticElement, ['pretitle', 'subtitle']) {
|
|
8154
8101
|
constructor() {
|
|
8155
8102
|
super(...arguments);
|
|
8156
8103
|
this.level = '2';
|
|
@@ -8159,19 +8106,11 @@
|
|
|
8159
8106
|
return b `
|
|
8160
8107
|
<div class="main">
|
|
8161
8108
|
<hgroup>
|
|
8162
|
-
<slot
|
|
8163
|
-
name="pretitle"
|
|
8164
|
-
class="pretitle"
|
|
8165
|
-
@slotchange=${this.handleAutoHide}
|
|
8166
|
-
></slot>
|
|
8109
|
+
<slot name="pretitle" class="pretitle"></slot>
|
|
8167
8110
|
<div class="title" role="heading" aria-level=${this.level}>
|
|
8168
8111
|
<slot></slot>
|
|
8169
8112
|
</div>
|
|
8170
|
-
<slot
|
|
8171
|
-
name="subtitle"
|
|
8172
|
-
class="subtitle"
|
|
8173
|
-
@slotchange=${this.handleAutoHide}
|
|
8174
|
-
></slot>
|
|
8113
|
+
<slot name="subtitle" class="subtitle"></slot>
|
|
8175
8114
|
</hgroup>
|
|
8176
8115
|
</div>
|
|
8177
8116
|
`;
|
|
@@ -10077,7 +10016,7 @@
|
|
|
10077
10016
|
exports.DialogBackdropElement.ensureDefined();
|
|
10078
10017
|
exports.Button.ensureDefined();
|
|
10079
10018
|
exports.LucideIconX.ensureDefined();
|
|
10080
|
-
exports.Dialog = class Dialog extends AutoHideEmptySlotsMixin(QuanticElement) {
|
|
10019
|
+
exports.Dialog = class Dialog extends AutoHideEmptySlotsMixin(QuanticElement, ['header', 'footer']) {
|
|
10081
10020
|
constructor() {
|
|
10082
10021
|
super(...arguments);
|
|
10083
10022
|
this.open = false;
|
|
@@ -10336,20 +10275,11 @@
|
|
|
10336
10275
|
</quantic-button>`
|
|
10337
10276
|
: ''}
|
|
10338
10277
|
|
|
10339
|
-
<slot
|
|
10340
|
-
class="header"
|
|
10341
|
-
name="header"
|
|
10342
|
-
id=${this.headerId}
|
|
10343
|
-
@slotchange=${this.handleAutoHide}
|
|
10344
|
-
></slot>
|
|
10278
|
+
<slot class="header" name="header" id=${this.headerId}></slot>
|
|
10345
10279
|
|
|
10346
|
-
<slot class="body"
|
|
10280
|
+
<slot class="body"></slot>
|
|
10347
10281
|
|
|
10348
|
-
<slot
|
|
10349
|
-
class="footer"
|
|
10350
|
-
name="footer"
|
|
10351
|
-
@slotchange=${this.handleAutoHide}
|
|
10352
|
-
></slot>
|
|
10282
|
+
<slot class="footer" name="footer"></slot>
|
|
10353
10283
|
</div>
|
|
10354
10284
|
</div>
|
|
10355
10285
|
`;
|
|
@@ -10818,7 +10748,7 @@
|
|
|
10818
10748
|
Manual: 'manual',
|
|
10819
10749
|
};
|
|
10820
10750
|
|
|
10821
|
-
exports.PopoverPopup = class PopoverPopup extends AutoHideEmptySlotsMixin(QuanticElement) {
|
|
10751
|
+
exports.PopoverPopup = class PopoverPopup extends AutoHideEmptySlotsMixin(QuanticElement, ['header', 'footer']) {
|
|
10822
10752
|
constructor() {
|
|
10823
10753
|
super(...arguments);
|
|
10824
10754
|
this.visible = false;
|
|
@@ -10826,9 +10756,9 @@
|
|
|
10826
10756
|
render() {
|
|
10827
10757
|
return b `
|
|
10828
10758
|
<div class="main">
|
|
10829
|
-
<slot name="header"
|
|
10759
|
+
<slot name="header"></slot>
|
|
10830
10760
|
<slot></slot>
|
|
10831
|
-
<slot name="footer"
|
|
10761
|
+
<slot name="footer"></slot>
|
|
10832
10762
|
</div>
|
|
10833
10763
|
`;
|
|
10834
10764
|
}
|
|
@@ -11829,16 +11759,17 @@
|
|
|
11829
11759
|
quanticElement('quantic-dropdown-menu-item')
|
|
11830
11760
|
], exports.DropdownMenuItem);
|
|
11831
11761
|
|
|
11832
|
-
exports.DropdownMenuGroup = class DropdownMenuGroup extends AutoHideEmptySlotsMixin(QuanticElement) {
|
|
11762
|
+
exports.DropdownMenuGroup = class DropdownMenuGroup extends AutoHideEmptySlotsMixin(QuanticElement, ['label']) {
|
|
11833
11763
|
constructor() {
|
|
11834
11764
|
super(...arguments);
|
|
11835
11765
|
this.label = '';
|
|
11766
|
+
this.hasLabelSlot = false;
|
|
11836
11767
|
}
|
|
11837
11768
|
render() {
|
|
11838
|
-
const hasLabel = this.label || this.
|
|
11769
|
+
const hasLabel = this.label || this.hasLabelSlot;
|
|
11839
11770
|
return b `
|
|
11840
11771
|
<div class="label" id="group-label" ?hidden=${!hasLabel}>
|
|
11841
|
-
<slot name="label">${this.label}</slot>
|
|
11772
|
+
<slot name="label" @slotchange=${onSlotChange((has) => (this.hasLabelSlot = has))}>${this.label}</slot>
|
|
11842
11773
|
</div>
|
|
11843
11774
|
<div
|
|
11844
11775
|
class="items"
|
|
@@ -11907,6 +11838,9 @@
|
|
|
11907
11838
|
description: 'Section heading displayed above the group items.',
|
|
11908
11839
|
})
|
|
11909
11840
|
], exports.DropdownMenuGroup.prototype, "label", void 0);
|
|
11841
|
+
__decorate([
|
|
11842
|
+
r$2()
|
|
11843
|
+
], exports.DropdownMenuGroup.prototype, "hasLabelSlot", void 0);
|
|
11910
11844
|
exports.DropdownMenuGroup = __decorate([
|
|
11911
11845
|
quanticElement('quantic-dropdown-menu-group')
|
|
11912
11846
|
], exports.DropdownMenuGroup);
|
|
@@ -11937,7 +11871,7 @@
|
|
|
11937
11871
|
Large: 'lg',
|
|
11938
11872
|
};
|
|
11939
11873
|
|
|
11940
|
-
exports.Field = class Field extends
|
|
11874
|
+
exports.Field = class Field extends QuanticElement {
|
|
11941
11875
|
constructor() {
|
|
11942
11876
|
super(...arguments);
|
|
11943
11877
|
this.fieldId = '';
|
|
@@ -11947,48 +11881,57 @@
|
|
|
11947
11881
|
this.required = false;
|
|
11948
11882
|
this.size = FieldSize.Medium;
|
|
11949
11883
|
this.hintPosition = FieldHintPosition.Below;
|
|
11884
|
+
this.hasLabelSlot = false;
|
|
11885
|
+
this.hasHintSlot = false;
|
|
11886
|
+
this.hasMessageSlot = false;
|
|
11950
11887
|
}
|
|
11951
11888
|
render() {
|
|
11952
|
-
const hasLabel =
|
|
11953
|
-
const hasHint =
|
|
11954
|
-
const hasMessage =
|
|
11955
|
-
const hintTemplate =
|
|
11956
|
-
|
|
11957
|
-
|
|
11958
|
-
|
|
11959
|
-
|
|
11960
|
-
|
|
11961
|
-
|
|
11889
|
+
const hasLabel = this.hasLabelSlot || !!this.label;
|
|
11890
|
+
const hasHint = this.hasHintSlot || !!this.hint;
|
|
11891
|
+
const hasMessage = this.hasMessageSlot || !!this.message;
|
|
11892
|
+
const hintTemplate = b `
|
|
11893
|
+
<div
|
|
11894
|
+
id="hint-${this.fieldId}"
|
|
11895
|
+
class=${e$3({ hint: true, 'is-empty': !hasHint })}
|
|
11896
|
+
>
|
|
11897
|
+
<slot
|
|
11898
|
+
name="hint"
|
|
11899
|
+
@slotchange=${onSlotChange((v) => (this.hasHintSlot = v))}
|
|
11900
|
+
>${this.hint}</slot>
|
|
11901
|
+
</div>
|
|
11902
|
+
`;
|
|
11962
11903
|
return b `
|
|
11963
11904
|
<div class=${e$3({ main: true, [`size--${this.size}`]: true })}>
|
|
11964
|
-
|
|
11965
|
-
|
|
11966
|
-
|
|
11967
|
-
|
|
11968
|
-
|
|
11969
|
-
|
|
11970
|
-
|
|
11971
|
-
|
|
11972
|
-
|
|
11905
|
+
<label
|
|
11906
|
+
id=${this.fieldId}
|
|
11907
|
+
class=${e$3({ label: true, 'is-empty': !hasLabel })}
|
|
11908
|
+
>
|
|
11909
|
+
<slot
|
|
11910
|
+
name="label"
|
|
11911
|
+
@slotchange=${onSlotChange((v) => (this.hasLabelSlot = v))}
|
|
11912
|
+
>${this.label}</slot>
|
|
11913
|
+
${this.required
|
|
11914
|
+
? b `<span class="required-indicator">*</span>`
|
|
11973
11915
|
: ''}
|
|
11916
|
+
</label>
|
|
11974
11917
|
${this.hintPosition === 'above' ? hintTemplate : ''}
|
|
11975
11918
|
<div class="control">
|
|
11976
11919
|
<slot></slot>
|
|
11977
11920
|
${this.hintPosition === 'below' ? hintTemplate : ''}
|
|
11978
|
-
|
|
11979
|
-
|
|
11980
|
-
|
|
11981
|
-
|
|
11982
|
-
|
|
11983
|
-
|
|
11984
|
-
|
|
11985
|
-
|
|
11986
|
-
|
|
11987
|
-
|
|
11988
|
-
|
|
11989
|
-
|
|
11990
|
-
|
|
11991
|
-
|
|
11921
|
+
<div
|
|
11922
|
+
id="message-${this.fieldId}"
|
|
11923
|
+
class=${e$3({
|
|
11924
|
+
message: true,
|
|
11925
|
+
'is-empty': !hasMessage,
|
|
11926
|
+
[`message--state-${this.status}`]: !!this.status,
|
|
11927
|
+
})}
|
|
11928
|
+
role="alert"
|
|
11929
|
+
>
|
|
11930
|
+
<slot
|
|
11931
|
+
name="message"
|
|
11932
|
+
@slotchange=${onSlotChange((v) => (this.hasMessageSlot = v))}
|
|
11933
|
+
>${this.message}</slot>
|
|
11934
|
+
</div>
|
|
11992
11935
|
</div>
|
|
11993
11936
|
</div>
|
|
11994
11937
|
`;
|
|
@@ -12054,6 +11997,11 @@
|
|
|
12054
11997
|
color: var(--quantic-text-secondary);
|
|
12055
11998
|
}
|
|
12056
11999
|
|
|
12000
|
+
/* Sections render unconditionally so their slots exist to fire slotchange. */
|
|
12001
|
+
.is-empty {
|
|
12002
|
+
display: none;
|
|
12003
|
+
}
|
|
12004
|
+
|
|
12057
12005
|
.size--xs {
|
|
12058
12006
|
--quantic-component-field-label-font-size: var(
|
|
12059
12007
|
--quantic-font-size-body-xs
|
|
@@ -12162,6 +12110,15 @@
|
|
|
12162
12110
|
__decorate([
|
|
12163
12111
|
prop({ type: 'FieldHintPosition', options: Object.values(FieldHintPosition), default: FieldHintPosition.Below, attribute: 'hint-position', description: 'Position of the hint relative to the control.' })
|
|
12164
12112
|
], exports.Field.prototype, "hintPosition", void 0);
|
|
12113
|
+
__decorate([
|
|
12114
|
+
r$2()
|
|
12115
|
+
], exports.Field.prototype, "hasLabelSlot", void 0);
|
|
12116
|
+
__decorate([
|
|
12117
|
+
r$2()
|
|
12118
|
+
], exports.Field.prototype, "hasHintSlot", void 0);
|
|
12119
|
+
__decorate([
|
|
12120
|
+
r$2()
|
|
12121
|
+
], exports.Field.prototype, "hasMessageSlot", void 0);
|
|
12165
12122
|
exports.Field = __decorate([
|
|
12166
12123
|
quanticElement(`quantic-field`)
|
|
12167
12124
|
], exports.Field);
|
|
@@ -12274,7 +12231,7 @@
|
|
|
12274
12231
|
// to focus on its own rendering logic.
|
|
12275
12232
|
// @see: https://nolanlawson.com/2022/11/28/shadow-dom-and-accessibility-the-trouble-with-aria/
|
|
12276
12233
|
function renderAsField(name, InputComponent, renderInput) {
|
|
12277
|
-
let FieldWrapper = class FieldWrapper extends
|
|
12234
|
+
let FieldWrapper = class FieldWrapper extends InputComponent {
|
|
12278
12235
|
constructor() {
|
|
12279
12236
|
super(...arguments);
|
|
12280
12237
|
this.label = '';
|
|
@@ -12282,15 +12239,18 @@
|
|
|
12282
12239
|
this.message = '';
|
|
12283
12240
|
this.required = false;
|
|
12284
12241
|
this.fieldId = generateId('field');
|
|
12242
|
+
this.labelSlotText = '';
|
|
12243
|
+
this.hintSlotText = '';
|
|
12244
|
+
this.messageSlotText = '';
|
|
12285
12245
|
}
|
|
12286
12246
|
get computedLabel() {
|
|
12287
|
-
return this.
|
|
12247
|
+
return this.labelSlotText || this.label;
|
|
12288
12248
|
}
|
|
12289
12249
|
get computedHint() {
|
|
12290
|
-
return this.
|
|
12250
|
+
return this.hintSlotText || this.hint;
|
|
12291
12251
|
}
|
|
12292
12252
|
get computedMessage() {
|
|
12293
|
-
return this.
|
|
12253
|
+
return this.messageSlotText || this.message;
|
|
12294
12254
|
}
|
|
12295
12255
|
getFieldA11yContext() {
|
|
12296
12256
|
const description = compact([
|
|
@@ -12314,10 +12274,10 @@
|
|
|
12314
12274
|
.status=${this.status}
|
|
12315
12275
|
.size=${this.size ?? E}
|
|
12316
12276
|
>
|
|
12317
|
-
<slot name="label" slot="label">${this.label}</slot>
|
|
12318
|
-
<slot name="hint" slot="hint">${this.hint}</slot>
|
|
12277
|
+
<slot name="label" slot="label" @slotchange=${onSlotTextChange((v) => (this.labelSlotText = v))}>${this.label}</slot>
|
|
12278
|
+
<slot name="hint" slot="hint" @slotchange=${onSlotTextChange((v) => (this.hintSlotText = v))}>${this.hint}</slot>
|
|
12319
12279
|
${renderInput.call(this, a11yContext)}
|
|
12320
|
-
<slot name="message" slot="message">${this.message}</slot>
|
|
12280
|
+
<slot name="message" slot="message" @slotchange=${onSlotTextChange((v) => (this.messageSlotText = v))}>${this.message}</slot>
|
|
12321
12281
|
</quantic-field>
|
|
12322
12282
|
`;
|
|
12323
12283
|
}
|
|
@@ -12357,6 +12317,15 @@
|
|
|
12357
12317
|
description: 'Validation state controlling message color.',
|
|
12358
12318
|
})
|
|
12359
12319
|
], FieldWrapper.prototype, "status", void 0);
|
|
12320
|
+
__decorate([
|
|
12321
|
+
r$2()
|
|
12322
|
+
], FieldWrapper.prototype, "labelSlotText", void 0);
|
|
12323
|
+
__decorate([
|
|
12324
|
+
r$2()
|
|
12325
|
+
], FieldWrapper.prototype, "hintSlotText", void 0);
|
|
12326
|
+
__decorate([
|
|
12327
|
+
r$2()
|
|
12328
|
+
], FieldWrapper.prototype, "messageSlotText", void 0);
|
|
12360
12329
|
FieldWrapper = __decorate([
|
|
12361
12330
|
quanticElement(`quantic-${name}-field`)
|
|
12362
12331
|
], FieldWrapper);
|
|
@@ -13751,7 +13720,7 @@
|
|
|
13751
13720
|
Large: 'lg',
|
|
13752
13721
|
};
|
|
13753
13722
|
|
|
13754
|
-
exports.Toggle = class Toggle extends A11yAttributesMixin(
|
|
13723
|
+
exports.Toggle = class Toggle extends A11yAttributesMixin(QuanticElement) {
|
|
13755
13724
|
constructor() {
|
|
13756
13725
|
super();
|
|
13757
13726
|
this.checked = false;
|
|
@@ -62164,12 +62133,13 @@
|
|
|
62164
62133
|
], exports.IconLabel);
|
|
62165
62134
|
|
|
62166
62135
|
exports.LucideIconPencil.ensureDefined();
|
|
62167
|
-
exports.InlineEdit = class InlineEdit extends
|
|
62136
|
+
exports.InlineEdit = class InlineEdit extends QuanticElement {
|
|
62168
62137
|
constructor() {
|
|
62169
62138
|
super(...arguments);
|
|
62170
62139
|
this.label = '';
|
|
62171
62140
|
this.active = false;
|
|
62172
62141
|
this.invalid = false;
|
|
62142
|
+
this.hasLabelSlot = false;
|
|
62173
62143
|
this.handleActivateClick = () => {
|
|
62174
62144
|
if (!this.active)
|
|
62175
62145
|
this.activate();
|
|
@@ -62227,7 +62197,7 @@
|
|
|
62227
62197
|
}
|
|
62228
62198
|
}
|
|
62229
62199
|
render() {
|
|
62230
|
-
const hasLabel = this.
|
|
62200
|
+
const hasLabel = this.hasLabelSlot || !!this.label;
|
|
62231
62201
|
return b `
|
|
62232
62202
|
<div
|
|
62233
62203
|
class="${e$3({
|
|
@@ -62239,11 +62209,9 @@
|
|
|
62239
62209
|
@click=${this.handleActivateClick}
|
|
62240
62210
|
@keydown=${this.handleTriggerKey}
|
|
62241
62211
|
>
|
|
62242
|
-
${hasLabel
|
|
62243
|
-
|
|
62244
|
-
|
|
62245
|
-
>`
|
|
62246
|
-
: ''}
|
|
62212
|
+
<span class=${e$3({ label: true, 'is-empty': !hasLabel })}
|
|
62213
|
+
><slot name="label" @slotchange=${onSlotChange((has) => (this.hasLabelSlot = has))}>${this.label}</slot></span
|
|
62214
|
+
>
|
|
62247
62215
|
<span class="value">
|
|
62248
62216
|
<span class="display">
|
|
62249
62217
|
<slot name="display"><span>—</span></slot>
|
|
@@ -62316,6 +62284,11 @@
|
|
|
62316
62284
|
);
|
|
62317
62285
|
}
|
|
62318
62286
|
|
|
62287
|
+
/* The label renders unconditionally so its slot exists to fire slotchange. */
|
|
62288
|
+
.label.is-empty {
|
|
62289
|
+
display: none;
|
|
62290
|
+
}
|
|
62291
|
+
|
|
62319
62292
|
.value {
|
|
62320
62293
|
min-width: 0;
|
|
62321
62294
|
display: flex;
|
|
@@ -62391,6 +62364,9 @@
|
|
|
62391
62364
|
__decorate([
|
|
62392
62365
|
prop({ type: 'boolean', default: 'false', description: 'When true, focusout does not close the editor. The editor stays open until the value is valid or the user cancels.' })
|
|
62393
62366
|
], exports.InlineEdit.prototype, "invalid", void 0);
|
|
62367
|
+
__decorate([
|
|
62368
|
+
r$2()
|
|
62369
|
+
], exports.InlineEdit.prototype, "hasLabelSlot", void 0);
|
|
62394
62370
|
exports.InlineEdit = __decorate([
|
|
62395
62371
|
event('cancel', { description: 'Fired on Escape. Consumer should revert optimistic state.' }),
|
|
62396
62372
|
quanticElement('quantic-inline-edit')
|
|
@@ -63510,10 +63486,14 @@
|
|
|
63510
63486
|
|
|
63511
63487
|
exports.Button.ensureDefined();
|
|
63512
63488
|
exports.LucideIconMenu.ensureDefined();
|
|
63513
|
-
exports.Layout = class Layout extends AutoHideEmptySlotsMixin(QuanticElement) {
|
|
63489
|
+
exports.Layout = class Layout extends AutoHideEmptySlotsMixin(QuanticElement, ['logo', 'titlebar', 'toolbar', 'navbar', 'sidebar']) {
|
|
63514
63490
|
constructor() {
|
|
63515
63491
|
super(...arguments);
|
|
63516
63492
|
this.variant = LayoutVariant.Default;
|
|
63493
|
+
this.hasSidebarSlot = false;
|
|
63494
|
+
this.hasTitlebarSlot = false;
|
|
63495
|
+
this.hasNavbarSlot = false;
|
|
63496
|
+
this.hasLogoSlot = false;
|
|
63517
63497
|
this._isAsideExpanded = true;
|
|
63518
63498
|
this.handleAsideExpand = (event) => {
|
|
63519
63499
|
this.isAsideExpanded = event.detail.expanded;
|
|
@@ -63523,10 +63503,6 @@
|
|
|
63523
63503
|
this.isAsideExpanded = false;
|
|
63524
63504
|
}
|
|
63525
63505
|
};
|
|
63526
|
-
this.handleSlotChange = (event) => {
|
|
63527
|
-
this.handleAutoHide(event);
|
|
63528
|
-
this.requestUpdate();
|
|
63529
|
-
};
|
|
63530
63506
|
}
|
|
63531
63507
|
get isAsideExpanded() {
|
|
63532
63508
|
return this._isAsideExpanded;
|
|
@@ -63609,14 +63585,16 @@
|
|
|
63609
63585
|
return this.isSmallViewport && this.hasSidebar;
|
|
63610
63586
|
}
|
|
63611
63587
|
get hasSidebar() {
|
|
63612
|
-
return
|
|
63588
|
+
return this.hasSidebarSlot;
|
|
63613
63589
|
}
|
|
63614
63590
|
get hasTitlebar() {
|
|
63615
|
-
return
|
|
63591
|
+
return this.hasTitlebarSlot;
|
|
63616
63592
|
}
|
|
63617
63593
|
get hasHeader() {
|
|
63618
63594
|
return (this.isAsideCollapsible ||
|
|
63619
|
-
|
|
63595
|
+
this.hasTitlebarSlot ||
|
|
63596
|
+
this.hasNavbarSlot ||
|
|
63597
|
+
this.hasLogoSlot);
|
|
63620
63598
|
}
|
|
63621
63599
|
render() {
|
|
63622
63600
|
const toggleButton = u$2 `<quantic-button
|
|
@@ -63633,12 +63611,12 @@
|
|
|
63633
63611
|
const logo = u$2 `<slot
|
|
63634
63612
|
name="logo"
|
|
63635
63613
|
class="logo"
|
|
63636
|
-
@slotchange=${this.
|
|
63614
|
+
@slotchange=${onSlotChange((has) => (this.hasLogoSlot = has))}
|
|
63637
63615
|
></slot>`;
|
|
63638
63616
|
const titlebar = u$2 `<slot
|
|
63639
63617
|
class="titlebar"
|
|
63640
63618
|
name="titlebar"
|
|
63641
|
-
@slotchange=${this.
|
|
63619
|
+
@slotchange=${onSlotChange((has) => (this.hasTitlebarSlot = has))}
|
|
63642
63620
|
></slot> `;
|
|
63643
63621
|
return u$2 `
|
|
63644
63622
|
<div
|
|
@@ -63657,7 +63635,7 @@
|
|
|
63657
63635
|
<slot
|
|
63658
63636
|
class="navbar"
|
|
63659
63637
|
name="navbar"
|
|
63660
|
-
@slotchange=${this.
|
|
63638
|
+
@slotchange=${onSlotChange((has) => (this.hasNavbarSlot = has))}
|
|
63661
63639
|
></slot>
|
|
63662
63640
|
</header>
|
|
63663
63641
|
|
|
@@ -63666,7 +63644,6 @@
|
|
|
63666
63644
|
<slot
|
|
63667
63645
|
name="toolbar"
|
|
63668
63646
|
class="toolbar"
|
|
63669
|
-
@slotchange=${this.handleSlotChange}
|
|
63670
63647
|
></slot>
|
|
63671
63648
|
|
|
63672
63649
|
<div
|
|
@@ -63686,7 +63663,7 @@
|
|
|
63686
63663
|
<slot
|
|
63687
63664
|
class="sidebar"
|
|
63688
63665
|
name="sidebar"
|
|
63689
|
-
@slotchange=${this.
|
|
63666
|
+
@slotchange=${onSlotChange((has) => (this.hasSidebarSlot = has))}
|
|
63690
63667
|
></slot>
|
|
63691
63668
|
</aside>
|
|
63692
63669
|
|
|
@@ -63972,6 +63949,18 @@
|
|
|
63972
63949
|
__decorate([
|
|
63973
63950
|
respond(Breakpoint.below(1024))
|
|
63974
63951
|
], exports.Layout.prototype, "isSmallViewport", void 0);
|
|
63952
|
+
__decorate([
|
|
63953
|
+
r$2()
|
|
63954
|
+
], exports.Layout.prototype, "hasSidebarSlot", void 0);
|
|
63955
|
+
__decorate([
|
|
63956
|
+
r$2()
|
|
63957
|
+
], exports.Layout.prototype, "hasTitlebarSlot", void 0);
|
|
63958
|
+
__decorate([
|
|
63959
|
+
r$2()
|
|
63960
|
+
], exports.Layout.prototype, "hasNavbarSlot", void 0);
|
|
63961
|
+
__decorate([
|
|
63962
|
+
r$2()
|
|
63963
|
+
], exports.Layout.prototype, "hasLogoSlot", void 0);
|
|
63975
63964
|
__decorate([
|
|
63976
63965
|
e$5('.aside')
|
|
63977
63966
|
], exports.Layout.prototype, "asideElement", void 0);
|
|
@@ -64683,7 +64672,7 @@
|
|
|
64683
64672
|
exports.SidebarMenuItem.ensureDefined();
|
|
64684
64673
|
exports.LucideIconPanelLeftClose.ensureDefined();
|
|
64685
64674
|
exports.LucideIconPanelLeft.ensureDefined();
|
|
64686
|
-
exports.Sidebar = class Sidebar extends AutoHideEmptySlotsMixin(QuanticElement) {
|
|
64675
|
+
exports.Sidebar = class Sidebar extends AutoHideEmptySlotsMixin(QuanticElement, ['header', 'footer']) {
|
|
64687
64676
|
constructor() {
|
|
64688
64677
|
super(...arguments);
|
|
64689
64678
|
this.ariaLabel = 'Sidebar navigation';
|
|
@@ -64705,16 +64694,16 @@
|
|
|
64705
64694
|
aria-expanded=${this.isAsideExpanded !== false ? 'true' : 'false'}
|
|
64706
64695
|
>
|
|
64707
64696
|
<div class="header">
|
|
64708
|
-
<slot name="header"
|
|
64697
|
+
<slot name="header"></slot>
|
|
64709
64698
|
</div>
|
|
64710
64699
|
|
|
64711
64700
|
<div class="scroll-area">
|
|
64712
64701
|
<div class="body">
|
|
64713
|
-
<slot
|
|
64702
|
+
<slot></slot>
|
|
64714
64703
|
</div>
|
|
64715
64704
|
|
|
64716
64705
|
<div class="footer">
|
|
64717
|
-
<slot name="footer"
|
|
64706
|
+
<slot name="footer"></slot>
|
|
64718
64707
|
</div>
|
|
64719
64708
|
|
|
64720
64709
|
${this.isDesktopViewport && this.collapsible
|
|
@@ -64777,7 +64766,7 @@
|
|
|
64777
64766
|
flex-shrink: 0;
|
|
64778
64767
|
}
|
|
64779
64768
|
|
|
64780
|
-
|
|
64769
|
+
:host(:not(:has([slot="header"]))) .header {
|
|
64781
64770
|
display: none;
|
|
64782
64771
|
}
|
|
64783
64772
|
|
|
@@ -64934,7 +64923,7 @@
|
|
|
64934
64923
|
|
|
64935
64924
|
const optionCardGroupContext = n$1('option-card-group.context');
|
|
64936
64925
|
|
|
64937
|
-
exports.OptionCard = class OptionCard extends AutoHideEmptySlotsMixin(QuanticElement) {
|
|
64926
|
+
exports.OptionCard = class OptionCard extends AutoHideEmptySlotsMixin(QuanticElement, ['icon', 'description']) {
|
|
64938
64927
|
constructor() {
|
|
64939
64928
|
super();
|
|
64940
64929
|
this.checked = false;
|
|
@@ -65060,13 +65049,9 @@
|
|
|
65060
65049
|
/>
|
|
65061
65050
|
<label for=${inputId} class=${labelClasses}>
|
|
65062
65051
|
<div class="content">
|
|
65063
|
-
<slot
|
|
65064
|
-
name="icon"
|
|
65065
|
-
class="icon"
|
|
65066
|
-
@slotchange=${this.handleAutoHide}
|
|
65067
|
-
></slot>
|
|
65052
|
+
<slot name="icon" class="icon"></slot>
|
|
65068
65053
|
<!-- main slot -->
|
|
65069
|
-
<slot class="body"
|
|
65054
|
+
<slot class="body"></slot>
|
|
65070
65055
|
<div class="indicator" aria-hidden="true">
|
|
65071
65056
|
${isRadio
|
|
65072
65057
|
? b `<div class="visual-radio"></div>`
|
|
@@ -65088,11 +65073,7 @@
|
|
|
65088
65073
|
</div>`}
|
|
65089
65074
|
</div>
|
|
65090
65075
|
</div>
|
|
65091
|
-
<slot
|
|
65092
|
-
name="description"
|
|
65093
|
-
class="description"
|
|
65094
|
-
@slotchange=${this.handleAutoHide}
|
|
65095
|
-
></slot>
|
|
65076
|
+
<slot name="description" class="description"></slot>
|
|
65096
65077
|
</label>
|
|
65097
65078
|
`;
|
|
65098
65079
|
}
|
|
@@ -65839,7 +65820,7 @@
|
|
|
65839
65820
|
PanelHeaderSize["Large"] = "lg";
|
|
65840
65821
|
})(exports.PanelHeaderSize || (exports.PanelHeaderSize = {}));
|
|
65841
65822
|
|
|
65842
|
-
exports.Panel = class Panel extends AutoHideEmptySlotsMixin(QuanticElement) {
|
|
65823
|
+
exports.Panel = class Panel extends AutoHideEmptySlotsMixin(QuanticElement, ['header', 'footer']) {
|
|
65843
65824
|
constructor() {
|
|
65844
65825
|
super(...arguments);
|
|
65845
65826
|
this.variant = exports.PanelVariant.Outline;
|
|
@@ -65853,17 +65834,9 @@
|
|
|
65853
65834
|
});
|
|
65854
65835
|
return u$2 `
|
|
65855
65836
|
<div class=${classes}>
|
|
65856
|
-
<slot
|
|
65857
|
-
|
|
65858
|
-
|
|
65859
|
-
@slotchange=${this.handleAutoHide}
|
|
65860
|
-
></slot>
|
|
65861
|
-
<slot class="body" @slotchange=${this.handleAutoHide}></slot>
|
|
65862
|
-
<slot
|
|
65863
|
-
name="footer"
|
|
65864
|
-
class="footer"
|
|
65865
|
-
@slotchange=${this.handleAutoHide}
|
|
65866
|
-
></slot>
|
|
65837
|
+
<slot name="header" class="header"></slot>
|
|
65838
|
+
<slot class="body"></slot>
|
|
65839
|
+
<slot name="footer" class="footer"></slot>
|
|
65867
65840
|
</div>
|
|
65868
65841
|
`;
|
|
65869
65842
|
}
|
|
@@ -65952,7 +65925,7 @@
|
|
|
65952
65925
|
quanticElement('quantic-panel')
|
|
65953
65926
|
], exports.Panel);
|
|
65954
65927
|
|
|
65955
|
-
exports.PanelHeader = class PanelHeader extends AutoHideEmptySlotsMixin(QuanticElement) {
|
|
65928
|
+
exports.PanelHeader = class PanelHeader extends AutoHideEmptySlotsMixin(QuanticElement, ['pretitle', 'subtitle', 'meta']) {
|
|
65956
65929
|
constructor() {
|
|
65957
65930
|
super(...arguments);
|
|
65958
65931
|
this.size = exports.PanelHeaderSize.Medium;
|
|
@@ -65965,23 +65938,11 @@
|
|
|
65965
65938
|
return u$2 `
|
|
65966
65939
|
<div class=${classes}>
|
|
65967
65940
|
<hgroup>
|
|
65968
|
-
<slot
|
|
65969
|
-
name="pretitle"
|
|
65970
|
-
class="pretitle"
|
|
65971
|
-
@slotchange=${this.handleAutoHide}
|
|
65972
|
-
></slot>
|
|
65941
|
+
<slot name="pretitle" class="pretitle"></slot>
|
|
65973
65942
|
<slot class="title"></slot>
|
|
65974
|
-
<slot
|
|
65975
|
-
name="subtitle"
|
|
65976
|
-
class="subtitle"
|
|
65977
|
-
@slotchange=${this.handleAutoHide}
|
|
65978
|
-
></slot>
|
|
65943
|
+
<slot name="subtitle" class="subtitle"></slot>
|
|
65979
65944
|
</hgroup>
|
|
65980
|
-
<slot
|
|
65981
|
-
name="meta"
|
|
65982
|
-
class="meta"
|
|
65983
|
-
@slotchange=${this.handleAutoHide}
|
|
65984
|
-
></slot>
|
|
65945
|
+
<slot name="meta" class="meta"></slot>
|
|
65985
65946
|
</div>
|
|
65986
65947
|
`;
|
|
65987
65948
|
}
|
|
@@ -67209,7 +67170,7 @@
|
|
|
67209
67170
|
|
|
67210
67171
|
const tableVariantContext = n$1('table.variant');
|
|
67211
67172
|
|
|
67212
|
-
exports.Table = class Table extends AutoHideEmptySlotsMixin(QuanticElement) {
|
|
67173
|
+
exports.Table = class Table extends AutoHideEmptySlotsMixin(QuanticElement, ['toolbar', 'header', 'footer', 'controls']) {
|
|
67213
67174
|
constructor() {
|
|
67214
67175
|
super(...arguments);
|
|
67215
67176
|
this.size = exports.TableSize.Medium;
|
|
@@ -67219,11 +67180,7 @@
|
|
|
67219
67180
|
}
|
|
67220
67181
|
render() {
|
|
67221
67182
|
return b `
|
|
67222
|
-
<slot
|
|
67223
|
-
name="toolbar"
|
|
67224
|
-
class="toolbar"
|
|
67225
|
-
@slotchange=${this.handleAutoHide}
|
|
67226
|
-
></slot>
|
|
67183
|
+
<slot name="toolbar" class="toolbar"></slot>
|
|
67227
67184
|
<div
|
|
67228
67185
|
role="table"
|
|
67229
67186
|
class="table"
|
|
@@ -67234,11 +67191,7 @@
|
|
|
67234
67191
|
<slot></slot>
|
|
67235
67192
|
<slot name="footer"></slot>
|
|
67236
67193
|
</div>
|
|
67237
|
-
<slot
|
|
67238
|
-
name="controls"
|
|
67239
|
-
class="controls"
|
|
67240
|
-
@slotchange=${this.handleAutoHide}
|
|
67241
|
-
></slot>
|
|
67194
|
+
<slot name="controls" class="controls"></slot>
|
|
67242
67195
|
`;
|
|
67243
67196
|
}
|
|
67244
67197
|
};
|
|
@@ -69135,7 +69088,7 @@
|
|
|
69135
69088
|
exports.LucideIconInfo.ensureDefined();
|
|
69136
69089
|
exports.LucideIconTriangleAlert.ensureDefined();
|
|
69137
69090
|
exports.LucideIconX.ensureDefined();
|
|
69138
|
-
exports.Toast = class Toast extends AutoHideEmptySlotsMixin(QuanticElement) {
|
|
69091
|
+
exports.Toast = class Toast extends AutoHideEmptySlotsMixin(QuanticElement, ['title', 'action']) {
|
|
69139
69092
|
constructor() {
|
|
69140
69093
|
super(...arguments);
|
|
69141
69094
|
this.open = false;
|
|
@@ -69192,17 +69145,9 @@
|
|
|
69192
69145
|
<slot name="icon">${this.renderDefaultIcon()}</slot>
|
|
69193
69146
|
</span>
|
|
69194
69147
|
<div class="content">
|
|
69195
|
-
<slot
|
|
69196
|
-
|
|
69197
|
-
|
|
69198
|
-
@slotchange=${this.handleAutoHide}
|
|
69199
|
-
></slot>
|
|
69200
|
-
<slot class="body" @slotchange=${this.handleAutoHide}></slot>
|
|
69201
|
-
<slot
|
|
69202
|
-
name="action"
|
|
69203
|
-
class="action"
|
|
69204
|
-
@slotchange=${this.handleAutoHide}
|
|
69205
|
-
></slot>
|
|
69148
|
+
<slot name="title" class="title"></slot>
|
|
69149
|
+
<slot class="body"></slot>
|
|
69150
|
+
<slot name="action" class="action"></slot>
|
|
69206
69151
|
</div>
|
|
69207
69152
|
${this.showCloseButton
|
|
69208
69153
|
? b `<quantic-button
|