@phcdevworks/spectre-components 1.15.0 → 1.16.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/README.md +110 -15
- package/dist/alert.cjs.map +1 -1
- package/dist/alert.d.cts +2 -2
- package/dist/alert.d.ts +2 -2
- package/dist/alert.js.map +1 -1
- package/dist/avatar.cjs.map +1 -1
- package/dist/avatar.d.cts +2 -2
- package/dist/avatar.d.ts +2 -2
- package/dist/avatar.js.map +1 -1
- package/dist/badge.cjs.map +1 -1
- package/dist/badge.d.cts +2 -2
- package/dist/badge.d.ts +2 -2
- package/dist/badge.js.map +1 -1
- package/dist/button.cjs +6 -0
- package/dist/button.cjs.map +1 -1
- package/dist/button.d.cts +8 -2
- package/dist/button.d.ts +8 -2
- package/dist/button.js +6 -0
- package/dist/button.js.map +1 -1
- package/dist/card.cjs.map +1 -1
- package/dist/card.d.cts +2 -2
- package/dist/card.d.ts +2 -2
- package/dist/card.js.map +1 -1
- package/dist/container.cjs.map +1 -1
- package/dist/container.d.cts +2 -2
- package/dist/container.d.ts +2 -2
- package/dist/container.js.map +1 -1
- package/dist/dropdown.cjs.map +1 -1
- package/dist/dropdown.d.cts +2 -2
- package/dist/dropdown.d.ts +2 -2
- package/dist/dropdown.js.map +1 -1
- package/dist/footer-chip.cjs +411 -0
- package/dist/footer-chip.cjs.map +1 -0
- package/dist/footer-chip.d.cts +32 -0
- package/dist/footer-chip.d.ts +32 -0
- package/dist/footer-chip.js +408 -0
- package/dist/footer-chip.js.map +1 -0
- package/dist/footer-link.cjs +424 -0
- package/dist/footer-link.cjs.map +1 -0
- package/dist/footer-link.d.cts +43 -0
- package/dist/footer-link.d.ts +43 -0
- package/dist/footer-link.js +421 -0
- package/dist/footer-link.js.map +1 -0
- package/dist/footer.cjs.map +1 -1
- package/dist/footer.js.map +1 -1
- package/dist/{form-BGQjgJrL.d.cts → form-bHrr2vl7.d.cts} +40 -1
- package/dist/{form-BGQjgJrL.d.ts → form-bHrr2vl7.d.ts} +40 -1
- package/dist/grid.cjs +166 -0
- package/dist/grid.cjs.map +1 -1
- package/dist/grid.d.cts +56 -2
- package/dist/grid.d.ts +56 -2
- package/dist/grid.js +166 -0
- package/dist/grid.js.map +1 -1
- package/dist/icon-box.cjs.map +1 -1
- package/dist/icon-box.d.cts +2 -2
- package/dist/icon-box.d.ts +2 -2
- package/dist/icon-box.js.map +1 -1
- package/dist/index.cjs +409 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +405 -9
- package/dist/index.js.map +1 -1
- package/dist/input.cjs.map +1 -1
- package/dist/input.d.cts +2 -2
- package/dist/input.d.ts +2 -2
- package/dist/input.js.map +1 -1
- package/dist/nav-item.cjs.map +1 -1
- package/dist/nav-item.d.cts +1 -1
- package/dist/nav-item.d.ts +1 -1
- package/dist/nav-item.js.map +1 -1
- package/dist/nav.cjs +11 -1
- package/dist/nav.cjs.map +1 -1
- package/dist/nav.d.cts +7 -0
- package/dist/nav.d.ts +7 -0
- package/dist/nav.js +11 -1
- package/dist/nav.js.map +1 -1
- package/dist/rating.cjs.map +1 -1
- package/dist/rating.d.cts +2 -2
- package/dist/rating.d.ts +2 -2
- package/dist/rating.js.map +1 -1
- package/dist/section.cjs.map +1 -1
- package/dist/section.js.map +1 -1
- package/dist/select.cjs.map +1 -1
- package/dist/select.d.cts +1 -1
- package/dist/select.d.ts +1 -1
- package/dist/select.js.map +1 -1
- package/dist/sidebar-link.cjs +436 -0
- package/dist/sidebar-link.cjs.map +1 -0
- package/dist/sidebar-link.d.cts +50 -0
- package/dist/sidebar-link.d.ts +50 -0
- package/dist/sidebar-link.js +433 -0
- package/dist/sidebar-link.js.map +1 -0
- package/dist/spinner.cjs.map +1 -1
- package/dist/spinner.d.cts +2 -2
- package/dist/spinner.d.ts +2 -2
- package/dist/spinner.js.map +1 -1
- package/dist/stack.cjs +1 -3
- package/dist/stack.cjs.map +1 -1
- package/dist/stack.d.cts +2 -2
- package/dist/stack.d.ts +2 -2
- package/dist/stack.js +1 -3
- package/dist/stack.js.map +1 -1
- package/dist/tag.cjs.map +1 -1
- package/dist/tag.d.cts +2 -2
- package/dist/tag.d.ts +2 -2
- package/dist/tag.js.map +1 -1
- package/dist/testimonial.cjs.map +1 -1
- package/dist/testimonial.d.cts +2 -2
- package/dist/testimonial.d.ts +2 -2
- package/dist/testimonial.js.map +1 -1
- package/dist/text.cjs +1 -3
- package/dist/text.cjs.map +1 -1
- package/dist/text.d.cts +2 -2
- package/dist/text.d.ts +2 -2
- package/dist/text.js +1 -3
- package/dist/text.js.map +1 -1
- package/dist/textarea.cjs.map +1 -1
- package/dist/textarea.d.cts +1 -1
- package/dist/textarea.d.ts +1 -1
- package/dist/textarea.js.map +1 -1
- package/dist/toast.cjs.map +1 -1
- package/dist/toast.d.cts +2 -2
- package/dist/toast.d.ts +2 -2
- package/dist/toast.js.map +1 -1
- package/dist/tooltip.cjs.map +1 -1
- package/dist/tooltip.d.cts +2 -2
- package/dist/tooltip.d.ts +2 -2
- package/dist/tooltip.js.map +1 -1
- package/package.json +23 -8
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { S as SpectreAlertSize, a as SpectreAlertVariant, b as SpectreAvatarShape, c as SpectreAvatarSize, S as SpectreBadgeSize, d as SpectreBadgeVariant, S as SpectreButtonSize, e as SpectreButtonType, f as SpectreButtonVariant, g as SpectreCardVariant, h as SpectreContainerMaxWidth, i as SpectreDropdownPlacement, j as SpectreGridColumns, k as SpectreGridGap, S as SpectreIconBoxSize, l as SpectreIconBoxVariant, S as SpectreInputSize, m as SpectreInputType, S as SpectreRatingSize, S as SpectreSpinnerSize, n as SpectreSpinnerVariant, o as SpectreStackAlign, p as SpectreStackBasis, q as SpectreStackDirection, S as SpectreTagSize, r as SpectreTagVariant, s as SpectreTestimonialVariant, t as SpectreTextFamily, u as SpectreTextLevel, v as SpectreTextSize, w as SpectreTextVariant, x as SpectreToastVariant, y as SpectreTooltipPlacement, z as spectreAlertSizes, A as spectreAlertVariants, B as spectreAvatarShapes, C as spectreAvatarSizes, z as spectreBadgeSizes, D as spectreBadgeVariants, z as spectreButtonSizes, E as spectreButtonTypes, F as spectreButtonVariants, G as spectreCardVariants, H as spectreContainerMaxWidths, I as spectreDropdownPlacements, J as spectreGridColumns, K as spectreGridGaps, z as spectreIconBoxSizes, L as spectreIconBoxVariants, z as spectreInputSizes, M as spectreInputTypes, z as spectreRatingSizes, z as spectreSpinnerSizes, N as spectreSpinnerVariants, O as spectreStackAligns, P as spectreStackBases, Q as spectreStackDirections, z as spectreTagSizes, R as spectreTagVariants, T as spectreTestimonialVariants, U as spectreTextFamilies, V as spectreTextLevels, W as spectreTextSizes, X as spectreTextVariants, Y as spectreToastVariants, Z as spectreTooltipPlacements } from './form-
|
|
1
|
+
export { S as SpectreAlertSize, a as SpectreAlertVariant, b as SpectreAvatarShape, c as SpectreAvatarSize, S as SpectreBadgeSize, d as SpectreBadgeVariant, S as SpectreButtonSize, e as SpectreButtonType, f as SpectreButtonVariant, g as SpectreCardVariant, h as SpectreContainerMaxWidth, i as SpectreDropdownPlacement, j as SpectreGridColumns, k as SpectreGridGap, S as SpectreIconBoxSize, l as SpectreIconBoxVariant, S as SpectreInputSize, m as SpectreInputType, S as SpectreRatingSize, S as SpectreSpinnerSize, n as SpectreSpinnerVariant, o as SpectreStackAlign, p as SpectreStackBasis, q as SpectreStackDirection, S as SpectreTagSize, r as SpectreTagVariant, s as SpectreTestimonialVariant, t as SpectreTextFamily, u as SpectreTextLevel, v as SpectreTextSize, w as SpectreTextVariant, x as SpectreToastVariant, y as SpectreTooltipPlacement, z as spectreAlertSizes, A as spectreAlertVariants, B as spectreAvatarShapes, C as spectreAvatarSizes, z as spectreBadgeSizes, D as spectreBadgeVariants, z as spectreButtonSizes, E as spectreButtonTypes, F as spectreButtonVariants, G as spectreCardVariants, H as spectreContainerMaxWidths, I as spectreDropdownPlacements, J as spectreGridColumns, K as spectreGridGaps, z as spectreIconBoxSizes, L as spectreIconBoxVariants, z as spectreInputSizes, M as spectreInputTypes, z as spectreRatingSizes, z as spectreSpinnerSizes, N as spectreSpinnerVariants, O as spectreStackAligns, P as spectreStackBases, Q as spectreStackDirections, z as spectreTagSizes, R as spectreTagVariants, T as spectreTestimonialVariants, U as spectreTextFamilies, V as spectreTextLevels, W as spectreTextSizes, X as spectreTextVariants, Y as spectreToastVariants, Z as spectreTooltipPlacements } from './form-bHrr2vl7.cjs';
|
|
2
2
|
export { SpectreButtonElement, SpectreButtonProps, SpectreButtonTarget, defineSpectreButton } from './button.cjs';
|
|
3
3
|
export { SpectreInputElement, SpectreInputProps, defineSpectreInput } from './input.cjs';
|
|
4
4
|
export { SpectreTextareaElement, SpectreTextareaProps, defineSpectreTextarea } from './textarea.cjs';
|
|
@@ -23,10 +23,13 @@ export { SpectreSectionElement, SpectreSectionProps, defineSpectreSection } from
|
|
|
23
23
|
export { SpectreStackElement, SpectreStackProps, defineSpectreStack } from './stack.cjs';
|
|
24
24
|
export { SpectreDropdownElement, SpectreDropdownProps, defineSpectreDropdown } from './dropdown.cjs';
|
|
25
25
|
export { SpectreFooterElement, SpectreFooterProps, defineSpectreFooter } from './footer.cjs';
|
|
26
|
+
export { SpectreFooterChipElement, SpectreFooterChipProps, defineSpectreFooterChip } from './footer-chip.cjs';
|
|
27
|
+
export { SpectreFooterLinkElement, SpectreFooterLinkProps, defineSpectreFooterLink } from './footer-link.cjs';
|
|
26
28
|
export { SpectreModalElement, SpectreModalProps, defineSpectreModal } from './modal.cjs';
|
|
27
29
|
export { SpectreNavElement, SpectreNavProps, defineSpectreNav } from './nav.cjs';
|
|
28
30
|
export { SpectreNavItemElement, SpectreNavItemProps, defineSpectreNavItem } from './nav-item.cjs';
|
|
29
31
|
export { SpectreSidebarElement, SpectreSidebarProps, defineSpectreSidebar } from './sidebar.cjs';
|
|
32
|
+
export { SpectreSidebarLinkElement, SpectreSidebarLinkProps, defineSpectreSidebarLink } from './sidebar-link.cjs';
|
|
30
33
|
export { SpectreSidebarToggleElement, SpectreSidebarToggleProps, defineSpectreSidebarToggle } from './sidebar-toggle.cjs';
|
|
31
34
|
export { SpectreToastElement, SpectreToastProps, defineSpectreToast } from './toast.cjs';
|
|
32
35
|
export { SpectreTooltipElement, SpectreTooltipProps, defineSpectreTooltip } from './tooltip.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { S as SpectreAlertSize, a as SpectreAlertVariant, b as SpectreAvatarShape, c as SpectreAvatarSize, S as SpectreBadgeSize, d as SpectreBadgeVariant, S as SpectreButtonSize, e as SpectreButtonType, f as SpectreButtonVariant, g as SpectreCardVariant, h as SpectreContainerMaxWidth, i as SpectreDropdownPlacement, j as SpectreGridColumns, k as SpectreGridGap, S as SpectreIconBoxSize, l as SpectreIconBoxVariant, S as SpectreInputSize, m as SpectreInputType, S as SpectreRatingSize, S as SpectreSpinnerSize, n as SpectreSpinnerVariant, o as SpectreStackAlign, p as SpectreStackBasis, q as SpectreStackDirection, S as SpectreTagSize, r as SpectreTagVariant, s as SpectreTestimonialVariant, t as SpectreTextFamily, u as SpectreTextLevel, v as SpectreTextSize, w as SpectreTextVariant, x as SpectreToastVariant, y as SpectreTooltipPlacement, z as spectreAlertSizes, A as spectreAlertVariants, B as spectreAvatarShapes, C as spectreAvatarSizes, z as spectreBadgeSizes, D as spectreBadgeVariants, z as spectreButtonSizes, E as spectreButtonTypes, F as spectreButtonVariants, G as spectreCardVariants, H as spectreContainerMaxWidths, I as spectreDropdownPlacements, J as spectreGridColumns, K as spectreGridGaps, z as spectreIconBoxSizes, L as spectreIconBoxVariants, z as spectreInputSizes, M as spectreInputTypes, z as spectreRatingSizes, z as spectreSpinnerSizes, N as spectreSpinnerVariants, O as spectreStackAligns, P as spectreStackBases, Q as spectreStackDirections, z as spectreTagSizes, R as spectreTagVariants, T as spectreTestimonialVariants, U as spectreTextFamilies, V as spectreTextLevels, W as spectreTextSizes, X as spectreTextVariants, Y as spectreToastVariants, Z as spectreTooltipPlacements } from './form-
|
|
1
|
+
export { S as SpectreAlertSize, a as SpectreAlertVariant, b as SpectreAvatarShape, c as SpectreAvatarSize, S as SpectreBadgeSize, d as SpectreBadgeVariant, S as SpectreButtonSize, e as SpectreButtonType, f as SpectreButtonVariant, g as SpectreCardVariant, h as SpectreContainerMaxWidth, i as SpectreDropdownPlacement, j as SpectreGridColumns, k as SpectreGridGap, S as SpectreIconBoxSize, l as SpectreIconBoxVariant, S as SpectreInputSize, m as SpectreInputType, S as SpectreRatingSize, S as SpectreSpinnerSize, n as SpectreSpinnerVariant, o as SpectreStackAlign, p as SpectreStackBasis, q as SpectreStackDirection, S as SpectreTagSize, r as SpectreTagVariant, s as SpectreTestimonialVariant, t as SpectreTextFamily, u as SpectreTextLevel, v as SpectreTextSize, w as SpectreTextVariant, x as SpectreToastVariant, y as SpectreTooltipPlacement, z as spectreAlertSizes, A as spectreAlertVariants, B as spectreAvatarShapes, C as spectreAvatarSizes, z as spectreBadgeSizes, D as spectreBadgeVariants, z as spectreButtonSizes, E as spectreButtonTypes, F as spectreButtonVariants, G as spectreCardVariants, H as spectreContainerMaxWidths, I as spectreDropdownPlacements, J as spectreGridColumns, K as spectreGridGaps, z as spectreIconBoxSizes, L as spectreIconBoxVariants, z as spectreInputSizes, M as spectreInputTypes, z as spectreRatingSizes, z as spectreSpinnerSizes, N as spectreSpinnerVariants, O as spectreStackAligns, P as spectreStackBases, Q as spectreStackDirections, z as spectreTagSizes, R as spectreTagVariants, T as spectreTestimonialVariants, U as spectreTextFamilies, V as spectreTextLevels, W as spectreTextSizes, X as spectreTextVariants, Y as spectreToastVariants, Z as spectreTooltipPlacements } from './form-bHrr2vl7.js';
|
|
2
2
|
export { SpectreButtonElement, SpectreButtonProps, SpectreButtonTarget, defineSpectreButton } from './button.js';
|
|
3
3
|
export { SpectreInputElement, SpectreInputProps, defineSpectreInput } from './input.js';
|
|
4
4
|
export { SpectreTextareaElement, SpectreTextareaProps, defineSpectreTextarea } from './textarea.js';
|
|
@@ -23,10 +23,13 @@ export { SpectreSectionElement, SpectreSectionProps, defineSpectreSection } from
|
|
|
23
23
|
export { SpectreStackElement, SpectreStackProps, defineSpectreStack } from './stack.js';
|
|
24
24
|
export { SpectreDropdownElement, SpectreDropdownProps, defineSpectreDropdown } from './dropdown.js';
|
|
25
25
|
export { SpectreFooterElement, SpectreFooterProps, defineSpectreFooter } from './footer.js';
|
|
26
|
+
export { SpectreFooterChipElement, SpectreFooterChipProps, defineSpectreFooterChip } from './footer-chip.js';
|
|
27
|
+
export { SpectreFooterLinkElement, SpectreFooterLinkProps, defineSpectreFooterLink } from './footer-link.js';
|
|
26
28
|
export { SpectreModalElement, SpectreModalProps, defineSpectreModal } from './modal.js';
|
|
27
29
|
export { SpectreNavElement, SpectreNavProps, defineSpectreNav } from './nav.js';
|
|
28
30
|
export { SpectreNavItemElement, SpectreNavItemProps, defineSpectreNavItem } from './nav-item.js';
|
|
29
31
|
export { SpectreSidebarElement, SpectreSidebarProps, defineSpectreSidebar } from './sidebar.js';
|
|
32
|
+
export { SpectreSidebarLinkElement, SpectreSidebarLinkProps, defineSpectreSidebarLink } from './sidebar-link.js';
|
|
30
33
|
export { SpectreSidebarToggleElement, SpectreSidebarToggleProps, defineSpectreSidebarToggle } from './sidebar-toggle.js';
|
|
31
34
|
export { SpectreToastElement, SpectreToastProps, defineSpectreToast } from './toast.js';
|
|
32
35
|
export { SpectreTooltipElement, SpectreTooltipProps, defineSpectreTooltip } from './tooltip.js';
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getButtonClasses, getInputLabelClasses, getInputClasses, getTextareaClasses, getSelectClasses, getCheckboxClasses, getRadioClasses, getLabelClasses, getFieldsetLegendClasses, getFieldsetClasses, getBadgeClasses, getCardClasses, getIconBoxClasses, getRatingClasses, getRatingStarClasses, getRatingStarsClasses, getRatingTextClasses, getTestimonialClasses, getAlertClasses, getAvatarClasses, getSpinnerClasses, getTagClasses, getPricingCardClasses, getContainerClasses, getGridClasses, getSectionClasses, getStackClasses, getDropdownClasses, getDropdownMenuClasses, getFooterClasses, getModalOverlayClasses, getModalClasses, getNavClasses, getNavLinkClasses, getSidebarClasses, getSidebarToggleClasses, getSidebarBackdropClasses, getToastClasses, getToastIconClasses, getTooltipClasses, getTextClasses } from '@phcdevworks/spectre-ui';
|
|
1
|
+
import { getButtonClasses, getInputLabelClasses, getInputClasses, getTextareaClasses, getSelectClasses, getCheckboxClasses, getRadioClasses, getLabelClasses, getFieldsetLegendClasses, getFieldsetClasses, getBadgeClasses, getCardClasses, getIconBoxClasses, getRatingClasses, getRatingStarClasses, getRatingStarsClasses, getRatingTextClasses, getTestimonialClasses, getAlertClasses, getAvatarClasses, getSpinnerClasses, getTagClasses, getPricingCardClasses, getContainerClasses, getGridClasses, getSectionClasses, getStackClasses, getDropdownClasses, getDropdownMenuClasses, getFooterClasses, getFooterChipClasses, getFooterLinkClasses, getModalOverlayClasses, getModalClasses, getNavClasses, getNavLinkClasses, getSidebarClasses, getSidebarToggleClasses, getSidebarBackdropClasses, getSidebarLinkClasses, getToastClasses, getToastIconClasses, getTooltipClasses, getTextClasses } from '@phcdevworks/spectre-ui';
|
|
2
2
|
import { LitElement, html, nothing } from 'lit';
|
|
3
3
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
4
4
|
import { live } from 'lit/directives/live.js';
|
|
@@ -184,16 +184,118 @@ function isGridSpanOptions(value) {
|
|
|
184
184
|
const candidate = value;
|
|
185
185
|
return (candidate.base === void 0 || isGridSpan(candidate.base)) && (candidate.md === void 0 || isGridSpan(candidate.md)) && (candidate.lg === void 0 || isGridSpan(candidate.lg));
|
|
186
186
|
}
|
|
187
|
-
var
|
|
188
|
-
|
|
189
|
-
|
|
187
|
+
var spectreGridOffsets = [
|
|
188
|
+
0,
|
|
189
|
+
1,
|
|
190
|
+
2,
|
|
191
|
+
3,
|
|
192
|
+
4,
|
|
193
|
+
5,
|
|
194
|
+
6,
|
|
195
|
+
7,
|
|
196
|
+
8,
|
|
197
|
+
9,
|
|
198
|
+
10,
|
|
199
|
+
11
|
|
200
|
+
];
|
|
201
|
+
function isGridOffset(value) {
|
|
202
|
+
return spectreGridOffsets.includes(value);
|
|
203
|
+
}
|
|
204
|
+
function isGridOffsetOptions(value) {
|
|
205
|
+
if (typeof value !== "object" || value === null) {
|
|
206
|
+
return false;
|
|
207
|
+
}
|
|
208
|
+
const candidate = value;
|
|
209
|
+
return (candidate.base === void 0 || isGridOffset(candidate.base)) && (candidate.md === void 0 || isGridOffset(candidate.md)) && (candidate.lg === void 0 || isGridOffset(candidate.lg));
|
|
210
|
+
}
|
|
211
|
+
var spectreGridOrders = [
|
|
212
|
+
"first",
|
|
213
|
+
"last",
|
|
214
|
+
"none",
|
|
215
|
+
1,
|
|
216
|
+
2,
|
|
217
|
+
3,
|
|
218
|
+
4,
|
|
219
|
+
5,
|
|
220
|
+
6,
|
|
221
|
+
7,
|
|
222
|
+
8,
|
|
223
|
+
9,
|
|
224
|
+
10,
|
|
225
|
+
11,
|
|
226
|
+
12
|
|
227
|
+
];
|
|
228
|
+
function isGridOrder(value) {
|
|
229
|
+
return spectreGridOrders.includes(
|
|
190
230
|
value
|
|
191
231
|
);
|
|
192
232
|
}
|
|
233
|
+
function isGridOrderOptions(value) {
|
|
234
|
+
if (typeof value !== "object" || value === null) {
|
|
235
|
+
return false;
|
|
236
|
+
}
|
|
237
|
+
const candidate = value;
|
|
238
|
+
return (candidate.base === void 0 || isGridOrder(candidate.base)) && (candidate.md === void 0 || isGridOrder(candidate.md)) && (candidate.lg === void 0 || isGridOrder(candidate.lg));
|
|
239
|
+
}
|
|
240
|
+
var spectreGridLeadingWeights = [1.5, 1.6, 2, 2.5, 3];
|
|
241
|
+
function isGridLeadingWeight(value) {
|
|
242
|
+
return spectreGridLeadingWeights.includes(
|
|
243
|
+
value
|
|
244
|
+
);
|
|
245
|
+
}
|
|
246
|
+
function isGridLeadingWeightOptions(value) {
|
|
247
|
+
if (typeof value !== "object" || value === null) {
|
|
248
|
+
return false;
|
|
249
|
+
}
|
|
250
|
+
const candidate = value;
|
|
251
|
+
return (candidate.base === void 0 || isGridLeadingWeight(candidate.base)) && (candidate.md === void 0 || isGridLeadingWeight(candidate.md)) && (candidate.lg === void 0 || isGridLeadingWeight(candidate.lg));
|
|
252
|
+
}
|
|
253
|
+
function isGridLeadingTracksOptions(value) {
|
|
254
|
+
if (typeof value !== "object" || value === null) {
|
|
255
|
+
return false;
|
|
256
|
+
}
|
|
257
|
+
const candidate = value;
|
|
258
|
+
return isGridLeadingWeight(candidate.weight) || isGridLeadingWeightOptions(candidate.weight);
|
|
259
|
+
}
|
|
260
|
+
var spectreGridFixedTrackCounts = [1, 2, 3, 4];
|
|
261
|
+
function isGridFixedTrackCount(value) {
|
|
262
|
+
return spectreGridFixedTrackCounts.includes(
|
|
263
|
+
value
|
|
264
|
+
);
|
|
265
|
+
}
|
|
266
|
+
function isGridFixedTracksOptions(value) {
|
|
267
|
+
if (typeof value !== "object" || value === null) {
|
|
268
|
+
return false;
|
|
269
|
+
}
|
|
270
|
+
const candidate = value;
|
|
271
|
+
return isGridFixedTrackCount(candidate.count);
|
|
272
|
+
}
|
|
273
|
+
var spectreGridTemplates = [
|
|
274
|
+
"edge-fluid-edge",
|
|
275
|
+
"label-fluid-fluid"
|
|
276
|
+
];
|
|
277
|
+
function isGridTemplate(value) {
|
|
278
|
+
return spectreGridTemplates.includes(value);
|
|
279
|
+
}
|
|
280
|
+
function isGridExplicitTemplateOptions(value) {
|
|
281
|
+
if (typeof value !== "object" || value === null) {
|
|
282
|
+
return false;
|
|
283
|
+
}
|
|
284
|
+
const candidate = value;
|
|
285
|
+
return isGridTemplate(candidate.template) && (candidate.weight === void 0 || isGridLeadingWeight(candidate.weight));
|
|
286
|
+
}
|
|
287
|
+
var spectreStackDirections = ["vertical", "horizontal"];
|
|
288
|
+
function isStackDirection(value) {
|
|
289
|
+
return spectreStackDirections.includes(value);
|
|
290
|
+
}
|
|
193
291
|
var spectreStackBases = ["sidebar"];
|
|
194
292
|
function isStackBasis(value) {
|
|
195
293
|
return spectreStackBases.includes(value);
|
|
196
294
|
}
|
|
295
|
+
var spectreNavAligns = ["start", "center", "end"];
|
|
296
|
+
function isNavAlign(value) {
|
|
297
|
+
return spectreNavAligns.includes(value);
|
|
298
|
+
}
|
|
197
299
|
var spectreStackAligns = ["center", "stretch"];
|
|
198
300
|
function isStackAlign(value) {
|
|
199
301
|
return spectreStackAligns.includes(value);
|
|
@@ -218,6 +320,12 @@ var spectreToastVariants = [
|
|
|
218
320
|
function isToastVariant(value) {
|
|
219
321
|
return spectreToastVariants.includes(value);
|
|
220
322
|
}
|
|
323
|
+
var spectreSidebarLinkLevels = ["parent", "child"];
|
|
324
|
+
function isSidebarLinkLevel(value) {
|
|
325
|
+
return spectreSidebarLinkLevels.includes(
|
|
326
|
+
value
|
|
327
|
+
);
|
|
328
|
+
}
|
|
221
329
|
var spectreTooltipPlacements = [
|
|
222
330
|
"top",
|
|
223
331
|
"bottom",
|
|
@@ -278,9 +386,7 @@ var spectreTextTransforms = [
|
|
|
278
386
|
"capitalize"
|
|
279
387
|
];
|
|
280
388
|
function isTextTransform(value) {
|
|
281
|
-
return spectreTextTransforms.includes(
|
|
282
|
-
value
|
|
283
|
-
);
|
|
389
|
+
return spectreTextTransforms.includes(value);
|
|
284
390
|
}
|
|
285
391
|
function normalizeInt(value, fallback, min = 0) {
|
|
286
392
|
if (value == null || typeof value !== "number" || !Number.isInteger(value) || value < min) {
|
|
@@ -638,6 +744,7 @@ var SpectreProjectableElement = class extends SpectreBaseElement {
|
|
|
638
744
|
var SpectreButtonElement = class extends SpectreProjectableElement {
|
|
639
745
|
constructor() {
|
|
640
746
|
super(...arguments);
|
|
747
|
+
this.compact = false;
|
|
641
748
|
this.disabled = false;
|
|
642
749
|
this.fullWidth = false;
|
|
643
750
|
this.iconOnly = false;
|
|
@@ -681,6 +788,9 @@ var SpectreButtonElement = class extends SpectreProjectableElement {
|
|
|
681
788
|
return el.hasAttribute("data-sp-button-native") || el.hasAttribute("data-sp-button-loading-label") || el.hasAttribute("data-sp-button-label-fallback");
|
|
682
789
|
}
|
|
683
790
|
willUpdate(changedProperties) {
|
|
791
|
+
if (changedProperties.has("compact") && this.compact == null) {
|
|
792
|
+
this.compact = false;
|
|
793
|
+
}
|
|
684
794
|
if (changedProperties.has("disabled") && this.disabled == null) {
|
|
685
795
|
this.disabled = false;
|
|
686
796
|
}
|
|
@@ -716,6 +826,7 @@ var SpectreButtonElement = class extends SpectreProjectableElement {
|
|
|
716
826
|
}
|
|
717
827
|
get buttonClasses() {
|
|
718
828
|
return getButtonClasses({
|
|
829
|
+
compact: this.compact ?? false,
|
|
719
830
|
disabled: this.isDisabled,
|
|
720
831
|
fullWidth: this.fullWidth ?? false,
|
|
721
832
|
iconOnly: this.iconOnly ?? false,
|
|
@@ -792,6 +903,7 @@ var SpectreButtonElement = class extends SpectreProjectableElement {
|
|
|
792
903
|
}
|
|
793
904
|
};
|
|
794
905
|
SpectreButtonElement.properties = {
|
|
906
|
+
compact: { type: Boolean, reflect: true },
|
|
795
907
|
disabled: { type: Boolean, reflect: true },
|
|
796
908
|
form: { type: String },
|
|
797
909
|
fullWidth: { attribute: "full-width", type: Boolean, reflect: true },
|
|
@@ -2849,8 +2961,13 @@ var SpectreGridElement = class extends SpectreProjectableElement {
|
|
|
2849
2961
|
constructor() {
|
|
2850
2962
|
super(...arguments);
|
|
2851
2963
|
this.columns = 1;
|
|
2964
|
+
this.columnGap = void 0;
|
|
2965
|
+
this.explicitTemplate = void 0;
|
|
2966
|
+
this.fixedTracks = void 0;
|
|
2852
2967
|
this.gap = "md";
|
|
2853
2968
|
this.innerClass = void 0;
|
|
2969
|
+
this.leadingTracks = void 0;
|
|
2970
|
+
this.rowGap = void 0;
|
|
2854
2971
|
}
|
|
2855
2972
|
get id() {
|
|
2856
2973
|
return super.id;
|
|
@@ -2887,16 +3004,68 @@ var SpectreGridElement = class extends SpectreProjectableElement {
|
|
|
2887
3004
|
if (changedProperties.has("gap") && (this.gap == null || !isGridGap(this.gap))) {
|
|
2888
3005
|
this.gap = "md";
|
|
2889
3006
|
}
|
|
3007
|
+
if (changedProperties.has("columnGap") && this.columnGap != null && !isGridGap(this.columnGap)) {
|
|
3008
|
+
this.columnGap = void 0;
|
|
3009
|
+
}
|
|
3010
|
+
if (changedProperties.has("rowGap") && this.rowGap != null && !isGridGap(this.rowGap)) {
|
|
3011
|
+
this.rowGap = void 0;
|
|
3012
|
+
}
|
|
2890
3013
|
if (changedProperties.has("span") && this.span !== void 0 && !isGridSpan(this.span) && !isGridSpanOptions(this.span)) {
|
|
2891
3014
|
this.span = void 0;
|
|
2892
3015
|
}
|
|
3016
|
+
if (changedProperties.has("offset") && this.offset !== void 0 && !isGridOffset(this.offset) && !isGridOffsetOptions(this.offset)) {
|
|
3017
|
+
this.offset = void 0;
|
|
3018
|
+
}
|
|
3019
|
+
if (changedProperties.has("rowSpan") && this.rowSpan !== void 0 && !isGridSpan(this.rowSpan) && !isGridSpanOptions(this.rowSpan)) {
|
|
3020
|
+
this.rowSpan = void 0;
|
|
3021
|
+
}
|
|
3022
|
+
if (changedProperties.has("rowOffset") && this.rowOffset !== void 0 && !isGridOffset(this.rowOffset) && !isGridOffsetOptions(this.rowOffset)) {
|
|
3023
|
+
this.rowOffset = void 0;
|
|
3024
|
+
}
|
|
3025
|
+
if (changedProperties.has("order") && this.order !== void 0 && !isGridOrder(this.order) && !isGridOrderOptions(this.order)) {
|
|
3026
|
+
this.order = void 0;
|
|
3027
|
+
}
|
|
3028
|
+
if (changedProperties.has("leadingTracks") && this.leadingTracks !== void 0 && !isGridLeadingTracksOptions(this.leadingTracks)) {
|
|
3029
|
+
this.leadingTracks = void 0;
|
|
3030
|
+
}
|
|
3031
|
+
if (changedProperties.has("fixedTracks") && this.fixedTracks !== void 0 && !isGridFixedTracksOptions(this.fixedTracks)) {
|
|
3032
|
+
this.fixedTracks = void 0;
|
|
3033
|
+
}
|
|
3034
|
+
if (changedProperties.has("explicitTemplate") && this.explicitTemplate !== void 0 && !isGridExplicitTemplateOptions(this.explicitTemplate)) {
|
|
3035
|
+
this.explicitTemplate = void 0;
|
|
3036
|
+
}
|
|
2893
3037
|
}
|
|
2894
3038
|
get gridClasses() {
|
|
2895
3039
|
const recipeClasses = getGridClasses({
|
|
2896
3040
|
columns: this.columns,
|
|
2897
3041
|
gap: this.gap,
|
|
3042
|
+
...this.columnGap !== void 0 && {
|
|
3043
|
+
columnGap: this.columnGap
|
|
3044
|
+
},
|
|
3045
|
+
...this.rowGap !== void 0 && { rowGap: this.rowGap },
|
|
2898
3046
|
...this.span !== void 0 && {
|
|
2899
3047
|
span: this.span
|
|
3048
|
+
},
|
|
3049
|
+
...this.offset !== void 0 && {
|
|
3050
|
+
offset: this.offset
|
|
3051
|
+
},
|
|
3052
|
+
...this.rowSpan !== void 0 && {
|
|
3053
|
+
rowSpan: this.rowSpan
|
|
3054
|
+
},
|
|
3055
|
+
...this.rowOffset !== void 0 && {
|
|
3056
|
+
rowOffset: this.rowOffset
|
|
3057
|
+
},
|
|
3058
|
+
...this.order !== void 0 && {
|
|
3059
|
+
order: this.order
|
|
3060
|
+
},
|
|
3061
|
+
...this.leadingTracks !== void 0 && {
|
|
3062
|
+
leadingTracks: this.leadingTracks
|
|
3063
|
+
},
|
|
3064
|
+
...this.fixedTracks !== void 0 && {
|
|
3065
|
+
fixedTracks: this.fixedTracks
|
|
3066
|
+
},
|
|
3067
|
+
...this.explicitTemplate !== void 0 && {
|
|
3068
|
+
explicitTemplate: this.explicitTemplate
|
|
2900
3069
|
}
|
|
2901
3070
|
});
|
|
2902
3071
|
const utilityClasses = sanitizeUtilityClasses(this.innerClass);
|
|
@@ -2918,8 +3087,17 @@ var SpectreGridElement = class extends SpectreProjectableElement {
|
|
|
2918
3087
|
};
|
|
2919
3088
|
SpectreGridElement.properties = {
|
|
2920
3089
|
columns: { type: Number, reflect: true },
|
|
3090
|
+
columnGap: { attribute: "column-gap", type: String, reflect: true },
|
|
3091
|
+
explicitTemplate: { attribute: "explicit-template", type: Object },
|
|
3092
|
+
fixedTracks: { attribute: "fixed-tracks", type: Object },
|
|
2921
3093
|
gap: { type: String, reflect: true },
|
|
2922
3094
|
innerClass: { attribute: "inner-class", type: String },
|
|
3095
|
+
leadingTracks: { attribute: "leading-tracks", type: Object },
|
|
3096
|
+
offset: { type: Object },
|
|
3097
|
+
order: { type: Object },
|
|
3098
|
+
rowGap: { attribute: "row-gap", type: String, reflect: true },
|
|
3099
|
+
rowOffset: { attribute: "row-offset", type: Object },
|
|
3100
|
+
rowSpan: { attribute: "row-span", type: Object },
|
|
2923
3101
|
span: { type: Object }
|
|
2924
3102
|
};
|
|
2925
3103
|
function defineSpectreGrid(tagName = "sp-grid") {
|
|
@@ -3346,6 +3524,137 @@ function defineSpectreFooter(tagName = "sp-footer") {
|
|
|
3346
3524
|
customElements.define(tagName, SpectreFooterElement);
|
|
3347
3525
|
return SpectreFooterElement;
|
|
3348
3526
|
}
|
|
3527
|
+
var SpectreFooterChipElement = class extends SpectreProjectableElement {
|
|
3528
|
+
constructor() {
|
|
3529
|
+
super(...arguments);
|
|
3530
|
+
this.disabled = false;
|
|
3531
|
+
}
|
|
3532
|
+
get id() {
|
|
3533
|
+
return super.id;
|
|
3534
|
+
}
|
|
3535
|
+
set id(value) {
|
|
3536
|
+
super.id = value;
|
|
3537
|
+
}
|
|
3538
|
+
get title() {
|
|
3539
|
+
return super.title;
|
|
3540
|
+
}
|
|
3541
|
+
set title(value) {
|
|
3542
|
+
super.title = value;
|
|
3543
|
+
}
|
|
3544
|
+
getContentContainer() {
|
|
3545
|
+
return this.querySelector("[data-sp-footer-chip-native]");
|
|
3546
|
+
}
|
|
3547
|
+
isInternalNode(node) {
|
|
3548
|
+
if (node.nodeType !== Node.ELEMENT_NODE) {
|
|
3549
|
+
return false;
|
|
3550
|
+
}
|
|
3551
|
+
const el = node;
|
|
3552
|
+
return el.hasAttribute("data-sp-footer-chip-native");
|
|
3553
|
+
}
|
|
3554
|
+
willUpdate(changedProperties) {
|
|
3555
|
+
if (changedProperties.has("disabled") && this.disabled == null) {
|
|
3556
|
+
this.disabled = false;
|
|
3557
|
+
}
|
|
3558
|
+
}
|
|
3559
|
+
get footerChipClasses() {
|
|
3560
|
+
return getFooterChipClasses({ disabled: this.disabled ?? false });
|
|
3561
|
+
}
|
|
3562
|
+
render() {
|
|
3563
|
+
return html`<span
|
|
3564
|
+
aria-disabled="${ifDefined(this.disabled ? "true" : void 0)}"
|
|
3565
|
+
aria-label="${ifDefined(this.forwardedAriaLabel)}"
|
|
3566
|
+
class="${this.footerChipClasses}"
|
|
3567
|
+
data-sp-footer-chip-native
|
|
3568
|
+
id="${ifDefined(this.id || void 0)}"
|
|
3569
|
+
title="${ifDefined(this.title || void 0)}"
|
|
3570
|
+
>
|
|
3571
|
+
${this.hasProjectedContent ? this.projectedContent : nothing}
|
|
3572
|
+
</span>`;
|
|
3573
|
+
}
|
|
3574
|
+
};
|
|
3575
|
+
SpectreFooterChipElement.properties = {
|
|
3576
|
+
disabled: { type: Boolean, reflect: true }
|
|
3577
|
+
};
|
|
3578
|
+
function defineSpectreFooterChip(tagName = "sp-footer-chip") {
|
|
3579
|
+
const existingElement = customElements.get(tagName);
|
|
3580
|
+
if (existingElement) {
|
|
3581
|
+
return existingElement;
|
|
3582
|
+
}
|
|
3583
|
+
customElements.define(tagName, SpectreFooterChipElement);
|
|
3584
|
+
return SpectreFooterChipElement;
|
|
3585
|
+
}
|
|
3586
|
+
var SpectreFooterLinkElement = class extends SpectreProjectableElement {
|
|
3587
|
+
constructor() {
|
|
3588
|
+
super(...arguments);
|
|
3589
|
+
this.active = false;
|
|
3590
|
+
this.disabled = false;
|
|
3591
|
+
this.href = void 0;
|
|
3592
|
+
}
|
|
3593
|
+
get id() {
|
|
3594
|
+
return super.id;
|
|
3595
|
+
}
|
|
3596
|
+
set id(value) {
|
|
3597
|
+
super.id = value;
|
|
3598
|
+
}
|
|
3599
|
+
get title() {
|
|
3600
|
+
return super.title;
|
|
3601
|
+
}
|
|
3602
|
+
set title(value) {
|
|
3603
|
+
super.title = value;
|
|
3604
|
+
}
|
|
3605
|
+
getContentContainer() {
|
|
3606
|
+
return this.querySelector("[data-sp-footer-link-native]");
|
|
3607
|
+
}
|
|
3608
|
+
isInternalNode(node) {
|
|
3609
|
+
if (node.nodeType !== Node.ELEMENT_NODE) {
|
|
3610
|
+
return false;
|
|
3611
|
+
}
|
|
3612
|
+
const el = node;
|
|
3613
|
+
return el.hasAttribute("data-sp-footer-link-native");
|
|
3614
|
+
}
|
|
3615
|
+
willUpdate(changedProperties) {
|
|
3616
|
+
if (changedProperties.has("active") && this.active == null) {
|
|
3617
|
+
this.active = false;
|
|
3618
|
+
}
|
|
3619
|
+
if (changedProperties.has("disabled") && this.disabled == null) {
|
|
3620
|
+
this.disabled = false;
|
|
3621
|
+
}
|
|
3622
|
+
}
|
|
3623
|
+
get footerLinkClasses() {
|
|
3624
|
+
return getFooterLinkClasses({
|
|
3625
|
+
active: this.active ?? false,
|
|
3626
|
+
disabled: this.disabled ?? false
|
|
3627
|
+
});
|
|
3628
|
+
}
|
|
3629
|
+
render() {
|
|
3630
|
+
return html`<a
|
|
3631
|
+
aria-current="${ifDefined(this.active ? "page" : void 0)}"
|
|
3632
|
+
aria-disabled="${ifDefined(this.disabled ? "true" : void 0)}"
|
|
3633
|
+
aria-label="${ifDefined(this.forwardedAriaLabel)}"
|
|
3634
|
+
class="${this.footerLinkClasses}"
|
|
3635
|
+
data-sp-footer-link-native
|
|
3636
|
+
href="${ifDefined(this.disabled ? void 0 : this.href)}"
|
|
3637
|
+
id="${ifDefined(this.id || void 0)}"
|
|
3638
|
+
tabindex="${ifDefined(this.disabled ? -1 : void 0)}"
|
|
3639
|
+
title="${ifDefined(this.title || void 0)}"
|
|
3640
|
+
>
|
|
3641
|
+
${this.hasProjectedContent ? this.projectedContent : nothing}
|
|
3642
|
+
</a>`;
|
|
3643
|
+
}
|
|
3644
|
+
};
|
|
3645
|
+
SpectreFooterLinkElement.properties = {
|
|
3646
|
+
active: { type: Boolean, reflect: true },
|
|
3647
|
+
disabled: { type: Boolean, reflect: true },
|
|
3648
|
+
href: { type: String }
|
|
3649
|
+
};
|
|
3650
|
+
function defineSpectreFooterLink(tagName = "sp-footer-link") {
|
|
3651
|
+
const existingElement = customElements.get(tagName);
|
|
3652
|
+
if (existingElement) {
|
|
3653
|
+
return existingElement;
|
|
3654
|
+
}
|
|
3655
|
+
customElements.define(tagName, SpectreFooterLinkElement);
|
|
3656
|
+
return SpectreFooterLinkElement;
|
|
3657
|
+
}
|
|
3349
3658
|
var FOCUSABLE_SELECTOR = [
|
|
3350
3659
|
"a[href]",
|
|
3351
3660
|
"button:not([disabled])",
|
|
@@ -3516,6 +3825,7 @@ function defineSpectreModal(tagName = "sp-modal") {
|
|
|
3516
3825
|
var SpectreNavElement = class extends SpectreProjectableElement {
|
|
3517
3826
|
constructor() {
|
|
3518
3827
|
super(...arguments);
|
|
3828
|
+
this.align = void 0;
|
|
3519
3829
|
this.bordered = false;
|
|
3520
3830
|
this.fullWidth = false;
|
|
3521
3831
|
this.innerClass = void 0;
|
|
@@ -3558,12 +3868,16 @@ var SpectreNavElement = class extends SpectreProjectableElement {
|
|
|
3558
3868
|
if (changedProperties.has("sticky") && this.sticky == null) {
|
|
3559
3869
|
this.sticky = false;
|
|
3560
3870
|
}
|
|
3871
|
+
if (changedProperties.has("align") && this.align != null && !isNavAlign(this.align)) {
|
|
3872
|
+
this.align = void 0;
|
|
3873
|
+
}
|
|
3561
3874
|
}
|
|
3562
3875
|
get navClasses() {
|
|
3563
3876
|
const recipeClasses = getNavClasses({
|
|
3564
3877
|
bordered: this.bordered ?? false,
|
|
3565
3878
|
fullWidth: this.fullWidth ?? false,
|
|
3566
|
-
sticky: this.sticky ?? false
|
|
3879
|
+
sticky: this.sticky ?? false,
|
|
3880
|
+
...this.align !== void 0 && { align: this.align }
|
|
3567
3881
|
});
|
|
3568
3882
|
const utilityClasses = sanitizeUtilityClasses(this.innerClass);
|
|
3569
3883
|
return utilityClasses ? `${recipeClasses} ${utilityClasses}` : recipeClasses;
|
|
@@ -3581,6 +3895,7 @@ var SpectreNavElement = class extends SpectreProjectableElement {
|
|
|
3581
3895
|
}
|
|
3582
3896
|
};
|
|
3583
3897
|
SpectreNavElement.properties = {
|
|
3898
|
+
align: { type: String, reflect: true },
|
|
3584
3899
|
bordered: { type: Boolean, reflect: true },
|
|
3585
3900
|
fullWidth: { attribute: "full-width", type: Boolean, reflect: true },
|
|
3586
3901
|
innerClass: { attribute: "inner-class", type: String },
|
|
@@ -3936,6 +4251,84 @@ function defineSpectreSidebar(tagName = "sp-sidebar") {
|
|
|
3936
4251
|
customElements.define(tagName, SpectreSidebarElement);
|
|
3937
4252
|
return SpectreSidebarElement;
|
|
3938
4253
|
}
|
|
4254
|
+
var SpectreSidebarLinkElement = class extends SpectreProjectableElement {
|
|
4255
|
+
constructor() {
|
|
4256
|
+
super(...arguments);
|
|
4257
|
+
this.active = false;
|
|
4258
|
+
this.disabled = false;
|
|
4259
|
+
this.href = void 0;
|
|
4260
|
+
this.level = "parent";
|
|
4261
|
+
}
|
|
4262
|
+
get id() {
|
|
4263
|
+
return super.id;
|
|
4264
|
+
}
|
|
4265
|
+
set id(value) {
|
|
4266
|
+
super.id = value;
|
|
4267
|
+
}
|
|
4268
|
+
get title() {
|
|
4269
|
+
return super.title;
|
|
4270
|
+
}
|
|
4271
|
+
set title(value) {
|
|
4272
|
+
super.title = value;
|
|
4273
|
+
}
|
|
4274
|
+
getContentContainer() {
|
|
4275
|
+
return this.querySelector("[data-sp-sidebar-link-native]");
|
|
4276
|
+
}
|
|
4277
|
+
isInternalNode(node) {
|
|
4278
|
+
if (node.nodeType !== Node.ELEMENT_NODE) {
|
|
4279
|
+
return false;
|
|
4280
|
+
}
|
|
4281
|
+
const el = node;
|
|
4282
|
+
return el.hasAttribute("data-sp-sidebar-link-native");
|
|
4283
|
+
}
|
|
4284
|
+
willUpdate(changedProperties) {
|
|
4285
|
+
if (changedProperties.has("active") && this.active == null) {
|
|
4286
|
+
this.active = false;
|
|
4287
|
+
}
|
|
4288
|
+
if (changedProperties.has("disabled") && this.disabled == null) {
|
|
4289
|
+
this.disabled = false;
|
|
4290
|
+
}
|
|
4291
|
+
if (changedProperties.has("level") && (this.level == null || !isSidebarLinkLevel(this.level))) {
|
|
4292
|
+
this.level = "parent";
|
|
4293
|
+
}
|
|
4294
|
+
}
|
|
4295
|
+
get sidebarLinkClasses() {
|
|
4296
|
+
return getSidebarLinkClasses({
|
|
4297
|
+
active: this.active ?? false,
|
|
4298
|
+
disabled: this.disabled ?? false,
|
|
4299
|
+
level: this.level
|
|
4300
|
+
});
|
|
4301
|
+
}
|
|
4302
|
+
render() {
|
|
4303
|
+
return html`<a
|
|
4304
|
+
aria-current="${ifDefined(this.active ? "page" : void 0)}"
|
|
4305
|
+
aria-disabled="${ifDefined(this.disabled ? "true" : void 0)}"
|
|
4306
|
+
aria-label="${ifDefined(this.forwardedAriaLabel)}"
|
|
4307
|
+
class="${this.sidebarLinkClasses}"
|
|
4308
|
+
data-sp-sidebar-link-native
|
|
4309
|
+
href="${ifDefined(this.disabled ? void 0 : this.href)}"
|
|
4310
|
+
id="${ifDefined(this.id || void 0)}"
|
|
4311
|
+
tabindex="${ifDefined(this.disabled ? -1 : void 0)}"
|
|
4312
|
+
title="${ifDefined(this.title || void 0)}"
|
|
4313
|
+
>
|
|
4314
|
+
${this.hasProjectedContent ? this.projectedContent : nothing}
|
|
4315
|
+
</a>`;
|
|
4316
|
+
}
|
|
4317
|
+
};
|
|
4318
|
+
SpectreSidebarLinkElement.properties = {
|
|
4319
|
+
active: { type: Boolean, reflect: true },
|
|
4320
|
+
disabled: { type: Boolean, reflect: true },
|
|
4321
|
+
href: { type: String },
|
|
4322
|
+
level: { type: String, reflect: true }
|
|
4323
|
+
};
|
|
4324
|
+
function defineSpectreSidebarLink(tagName = "sp-sidebar-link") {
|
|
4325
|
+
const existingElement = customElements.get(tagName);
|
|
4326
|
+
if (existingElement) {
|
|
4327
|
+
return existingElement;
|
|
4328
|
+
}
|
|
4329
|
+
customElements.define(tagName, SpectreSidebarLinkElement);
|
|
4330
|
+
return SpectreSidebarLinkElement;
|
|
4331
|
+
}
|
|
3939
4332
|
var SpectreSidebarToggleElement = class extends SpectreProjectableElement {
|
|
3940
4333
|
constructor() {
|
|
3941
4334
|
super(...arguments);
|
|
@@ -4483,16 +4876,19 @@ function defineSpectreComponents() {
|
|
|
4483
4876
|
defineSpectreStack();
|
|
4484
4877
|
defineSpectreDropdown();
|
|
4485
4878
|
defineSpectreFooter();
|
|
4879
|
+
defineSpectreFooterChip();
|
|
4880
|
+
defineSpectreFooterLink();
|
|
4486
4881
|
defineSpectreModal();
|
|
4487
4882
|
defineSpectreNav();
|
|
4488
4883
|
defineSpectreNavItem();
|
|
4489
4884
|
defineSpectreSidebar();
|
|
4885
|
+
defineSpectreSidebarLink();
|
|
4490
4886
|
defineSpectreSidebarToggle();
|
|
4491
4887
|
defineSpectreToast();
|
|
4492
4888
|
defineSpectreTooltip();
|
|
4493
4889
|
defineSpectreText();
|
|
4494
4890
|
}
|
|
4495
4891
|
|
|
4496
|
-
export { SpectreAlertElement, SpectreAvatarElement, SpectreBadgeElement, SpectreButtonElement, SpectreCardElement, SpectreCheckboxElement, SpectreContainerElement, SpectreDropdownElement, SpectreFieldsetElement, SpectreFooterElement, SpectreGridElement, SpectreIconBoxElement, SpectreInputElement, SpectreLabelElement, SpectreModalElement, SpectreNavElement, SpectreNavItemElement, SpectrePricingCardElement, SpectreRadioElement, SpectreRatingElement, SpectreSectionElement, SpectreSelectElement, SpectreSidebarElement, SpectreSidebarToggleElement, SpectreSpinnerElement, SpectreStackElement, SpectreTagElement, SpectreTestimonialElement, SpectreTextElement, SpectreTextareaElement, SpectreToastElement, SpectreTooltipElement, defineSpectreAlert, defineSpectreAvatar, defineSpectreBadge, defineSpectreButton, defineSpectreCard, defineSpectreCheckbox, defineSpectreComponents, defineSpectreContainer, defineSpectreDropdown, defineSpectreFieldset, defineSpectreFooter, defineSpectreGrid, defineSpectreIconBox, defineSpectreInput, defineSpectreLabel, defineSpectreModal, defineSpectreNav, defineSpectreNavItem, defineSpectrePricingCard, defineSpectreRadio, defineSpectreRating, defineSpectreSection, defineSpectreSelect, defineSpectreSidebar, defineSpectreSidebarToggle, defineSpectreSpinner, defineSpectreStack, defineSpectreTag, defineSpectreTestimonial, defineSpectreText, defineSpectreTextarea, defineSpectreToast, defineSpectreTooltip, spectreInputSizes as spectreAlertSizes, spectreAlertVariants, spectreAvatarShapes, spectreAvatarSizes, spectreInputSizes as spectreBadgeSizes, spectreBadgeVariants, spectreInputSizes as spectreButtonSizes, spectreButtonTypes, spectreButtonVariants, spectreCardVariants, spectreContainerMaxWidths, spectreDropdownPlacements, spectreGridColumns, spectreGridGaps, spectreInputSizes as spectreIconBoxSizes, spectreIconBoxVariants, spectreInputSizes, spectreInputTypes, spectreInputSizes as spectreRatingSizes, spectreInputSizes as spectreSpinnerSizes, spectreSpinnerVariants, spectreStackAligns, spectreStackBases, spectreStackDirections, spectreInputSizes as spectreTagSizes, spectreTagVariants, spectreTestimonialVariants, spectreTextFamilies, spectreTextLevels, spectreTextSizes, spectreTextVariants, spectreToastVariants, spectreTooltipPlacements };
|
|
4892
|
+
export { SpectreAlertElement, SpectreAvatarElement, SpectreBadgeElement, SpectreButtonElement, SpectreCardElement, SpectreCheckboxElement, SpectreContainerElement, SpectreDropdownElement, SpectreFieldsetElement, SpectreFooterChipElement, SpectreFooterElement, SpectreFooterLinkElement, SpectreGridElement, SpectreIconBoxElement, SpectreInputElement, SpectreLabelElement, SpectreModalElement, SpectreNavElement, SpectreNavItemElement, SpectrePricingCardElement, SpectreRadioElement, SpectreRatingElement, SpectreSectionElement, SpectreSelectElement, SpectreSidebarElement, SpectreSidebarLinkElement, SpectreSidebarToggleElement, SpectreSpinnerElement, SpectreStackElement, SpectreTagElement, SpectreTestimonialElement, SpectreTextElement, SpectreTextareaElement, SpectreToastElement, SpectreTooltipElement, defineSpectreAlert, defineSpectreAvatar, defineSpectreBadge, defineSpectreButton, defineSpectreCard, defineSpectreCheckbox, defineSpectreComponents, defineSpectreContainer, defineSpectreDropdown, defineSpectreFieldset, defineSpectreFooter, defineSpectreFooterChip, defineSpectreFooterLink, defineSpectreGrid, defineSpectreIconBox, defineSpectreInput, defineSpectreLabel, defineSpectreModal, defineSpectreNav, defineSpectreNavItem, defineSpectrePricingCard, defineSpectreRadio, defineSpectreRating, defineSpectreSection, defineSpectreSelect, defineSpectreSidebar, defineSpectreSidebarLink, defineSpectreSidebarToggle, defineSpectreSpinner, defineSpectreStack, defineSpectreTag, defineSpectreTestimonial, defineSpectreText, defineSpectreTextarea, defineSpectreToast, defineSpectreTooltip, spectreInputSizes as spectreAlertSizes, spectreAlertVariants, spectreAvatarShapes, spectreAvatarSizes, spectreInputSizes as spectreBadgeSizes, spectreBadgeVariants, spectreInputSizes as spectreButtonSizes, spectreButtonTypes, spectreButtonVariants, spectreCardVariants, spectreContainerMaxWidths, spectreDropdownPlacements, spectreGridColumns, spectreGridGaps, spectreInputSizes as spectreIconBoxSizes, spectreIconBoxVariants, spectreInputSizes, spectreInputTypes, spectreInputSizes as spectreRatingSizes, spectreInputSizes as spectreSpinnerSizes, spectreSpinnerVariants, spectreStackAligns, spectreStackBases, spectreStackDirections, spectreInputSizes as spectreTagSizes, spectreTagVariants, spectreTestimonialVariants, spectreTextFamilies, spectreTextLevels, spectreTextSizes, spectreTextVariants, spectreToastVariants, spectreTooltipPlacements };
|
|
4497
4893
|
//# sourceMappingURL=index.js.map
|
|
4498
4894
|
//# sourceMappingURL=index.js.map
|