@phcdevworks/spectre-components 1.19.0 → 1.20.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 +99 -77
- 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 +48 -1
- package/dist/badge.cjs.map +1 -1
- package/dist/badge.d.cts +22 -2
- package/dist/badge.d.ts +22 -2
- package/dist/badge.js +48 -1
- package/dist/badge.js.map +1 -1
- package/dist/button.cjs.map +1 -1
- package/dist/button.d.cts +2 -2
- package/dist/button.d.ts +2 -2
- package/dist/button.js.map +1 -1
- package/dist/card.cjs +34 -0
- package/dist/card.cjs.map +1 -1
- package/dist/card.d.cts +16 -3
- package/dist/card.d.ts +16 -3
- package/dist/card.js +33 -1
- 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 +42 -3
- package/dist/dropdown.cjs.map +1 -1
- package/dist/dropdown.d.cts +21 -2
- package/dist/dropdown.d.ts +21 -2
- package/dist/dropdown.js +42 -3
- package/dist/dropdown.js.map +1 -1
- package/dist/footer.cjs +32 -0
- package/dist/footer.cjs.map +1 -1
- package/dist/footer.d.cts +14 -0
- package/dist/footer.d.ts +14 -0
- package/dist/footer.js +32 -0
- package/dist/footer.js.map +1 -1
- package/dist/{form-TvtLcoW0.d.cts → form-DpPtizpY.d.cts} +5 -1
- package/dist/{form-TvtLcoW0.d.ts → form-DpPtizpY.d.ts} +5 -1
- package/dist/grid.cjs.map +1 -1
- package/dist/grid.d.cts +2 -2
- package/dist/grid.d.ts +2 -2
- 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 +197 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +196 -5
- 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/modal.cjs +32 -0
- package/dist/modal.cjs.map +1 -1
- package/dist/modal.d.cts +14 -0
- package/dist/modal.d.ts +14 -0
- package/dist/modal.js +32 -0
- package/dist/modal.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 +32 -0
- package/dist/nav.cjs.map +1 -1
- package/dist/nav.d.cts +14 -1
- package/dist/nav.d.ts +14 -1
- package/dist/nav.js +32 -0
- package/dist/nav.js.map +1 -1
- package/dist/pricing-card.cjs +32 -0
- package/dist/pricing-card.cjs.map +1 -1
- package/dist/pricing-card.d.cts +14 -0
- package/dist/pricing-card.d.ts +14 -0
- package/dist/pricing-card.js +32 -0
- package/dist/pricing-card.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.map +1 -1
- package/dist/sidebar-link.d.cts +1 -1
- package/dist/sidebar-link.d.ts +1 -1
- package/dist/sidebar-link.js.map +1 -1
- 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.map +1 -1
- package/dist/stack.d.cts +2 -2
- package/dist/stack.d.ts +2 -2
- 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 +32 -0
- package/dist/testimonial.cjs.map +1 -1
- package/dist/testimonial.d.cts +15 -2
- package/dist/testimonial.d.ts +15 -2
- package/dist/testimonial.js +32 -0
- package/dist/testimonial.js.map +1 -1
- 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.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 +32 -0
- package/dist/toast.cjs.map +1 -1
- package/dist/toast.d.cts +15 -2
- package/dist/toast.d.ts +15 -2
- package/dist/toast.js +32 -0
- package/dist/toast.js.map +1 -1
- package/dist/tooltip.cjs +32 -0
- package/dist/tooltip.cjs.map +1 -1
- package/dist/tooltip.d.cts +15 -2
- package/dist/tooltip.d.ts +15 -2
- package/dist/tooltip.js +32 -0
- package/dist/tooltip.js.map +1 -1
- package/package.json +14 -14
package/dist/index.cjs
CHANGED
|
@@ -87,6 +87,22 @@ function isCardPaddingSize(value) {
|
|
|
87
87
|
value
|
|
88
88
|
);
|
|
89
89
|
}
|
|
90
|
+
var spectreAccentEdges = ["top", "right", "bottom", "left"];
|
|
91
|
+
function isAccentEdge(value) {
|
|
92
|
+
return spectreAccentEdges.includes(value);
|
|
93
|
+
}
|
|
94
|
+
var spectreAccentColors = [
|
|
95
|
+
"neutral",
|
|
96
|
+
"brand",
|
|
97
|
+
"info",
|
|
98
|
+
"success",
|
|
99
|
+
"warning",
|
|
100
|
+
"danger",
|
|
101
|
+
"cta"
|
|
102
|
+
];
|
|
103
|
+
function isAccentColor(value) {
|
|
104
|
+
return spectreAccentColors.includes(value);
|
|
105
|
+
}
|
|
90
106
|
var spectreIconBoxVariants = [
|
|
91
107
|
"primary",
|
|
92
108
|
"secondary",
|
|
@@ -1984,8 +2000,11 @@ function defineSpectreFieldset(tagName = "sp-fieldset") {
|
|
|
1984
2000
|
var SpectreBadgeElement = class extends SpectreProjectableElement {
|
|
1985
2001
|
constructor() {
|
|
1986
2002
|
super(...arguments);
|
|
2003
|
+
this.accentRail = void 0;
|
|
2004
|
+
this.accentRailColor = void 0;
|
|
1987
2005
|
this.disabled = false;
|
|
1988
2006
|
this.fullWidth = false;
|
|
2007
|
+
this.innerClass = void 0;
|
|
1989
2008
|
this.loading = false;
|
|
1990
2009
|
this.size = "md";
|
|
1991
2010
|
this.variant = "primary";
|
|
@@ -2013,6 +2032,12 @@ var SpectreBadgeElement = class extends SpectreProjectableElement {
|
|
|
2013
2032
|
return el.hasAttribute("data-sp-badge-native");
|
|
2014
2033
|
}
|
|
2015
2034
|
willUpdate(changedProperties) {
|
|
2035
|
+
if (changedProperties.has("accentRail") && this.accentRail != null && !isAccentEdge(this.accentRail)) {
|
|
2036
|
+
this.accentRail = void 0;
|
|
2037
|
+
}
|
|
2038
|
+
if (changedProperties.has("accentRailColor") && this.accentRailColor != null && !isAccentColor(this.accentRailColor)) {
|
|
2039
|
+
this.accentRailColor = void 0;
|
|
2040
|
+
}
|
|
2016
2041
|
if (changedProperties.has("disabled") && this.disabled == null) {
|
|
2017
2042
|
this.disabled = false;
|
|
2018
2043
|
}
|
|
@@ -2030,13 +2055,21 @@ var SpectreBadgeElement = class extends SpectreProjectableElement {
|
|
|
2030
2055
|
}
|
|
2031
2056
|
}
|
|
2032
2057
|
get badgeClasses() {
|
|
2033
|
-
|
|
2058
|
+
const recipeClasses = spectreUi.getBadgeClasses({
|
|
2059
|
+
...this.accentRail !== void 0 && {
|
|
2060
|
+
accentRail: this.accentRail
|
|
2061
|
+
},
|
|
2062
|
+
...this.accentRailColor !== void 0 && {
|
|
2063
|
+
accentRailColor: this.accentRailColor
|
|
2064
|
+
},
|
|
2034
2065
|
disabled: this.isDisabled,
|
|
2035
2066
|
fullWidth: this.fullWidth ?? false,
|
|
2036
2067
|
loading: this.loading ?? false,
|
|
2037
2068
|
size: this.size,
|
|
2038
2069
|
variant: this.variant
|
|
2039
2070
|
});
|
|
2071
|
+
const utilityClasses = sanitizeUtilityClasses(this.innerClass);
|
|
2072
|
+
return utilityClasses ? `${recipeClasses} ${utilityClasses}` : recipeClasses;
|
|
2040
2073
|
}
|
|
2041
2074
|
render() {
|
|
2042
2075
|
return lit.html`<span
|
|
@@ -2055,8 +2088,15 @@ var SpectreBadgeElement = class extends SpectreProjectableElement {
|
|
|
2055
2088
|
}
|
|
2056
2089
|
};
|
|
2057
2090
|
SpectreBadgeElement.properties = {
|
|
2091
|
+
accentRail: { attribute: "accent-rail", type: String, reflect: true },
|
|
2092
|
+
accentRailColor: {
|
|
2093
|
+
attribute: "accent-rail-color",
|
|
2094
|
+
type: String,
|
|
2095
|
+
reflect: true
|
|
2096
|
+
},
|
|
2058
2097
|
disabled: { type: Boolean, reflect: true },
|
|
2059
2098
|
fullWidth: { attribute: "full-width", type: Boolean, reflect: true },
|
|
2099
|
+
innerClass: { attribute: "inner-class", type: String },
|
|
2060
2100
|
loading: { type: Boolean, reflect: true },
|
|
2061
2101
|
size: { type: String, reflect: true },
|
|
2062
2102
|
variant: { type: String, reflect: true }
|
|
@@ -2092,6 +2132,8 @@ var paddedConverter = {
|
|
|
2092
2132
|
var SpectreCardElement = class extends SpectreProjectableElement {
|
|
2093
2133
|
constructor() {
|
|
2094
2134
|
super(...arguments);
|
|
2135
|
+
this.accent = void 0;
|
|
2136
|
+
this.accentColor = void 0;
|
|
2095
2137
|
this.disabled = false;
|
|
2096
2138
|
this.fullHeight = false;
|
|
2097
2139
|
this.innerClass = void 0;
|
|
@@ -2123,6 +2165,12 @@ var SpectreCardElement = class extends SpectreProjectableElement {
|
|
|
2123
2165
|
return el.hasAttribute("data-sp-card-native");
|
|
2124
2166
|
}
|
|
2125
2167
|
willUpdate(changedProperties) {
|
|
2168
|
+
if (changedProperties.has("accent") && this.accent != null && !isAccentEdge(this.accent)) {
|
|
2169
|
+
this.accent = void 0;
|
|
2170
|
+
}
|
|
2171
|
+
if (changedProperties.has("accentColor") && this.accentColor != null && !isAccentColor(this.accentColor)) {
|
|
2172
|
+
this.accentColor = void 0;
|
|
2173
|
+
}
|
|
2126
2174
|
if (changedProperties.has("disabled") && this.disabled == null) {
|
|
2127
2175
|
this.disabled = false;
|
|
2128
2176
|
}
|
|
@@ -2144,6 +2192,12 @@ var SpectreCardElement = class extends SpectreProjectableElement {
|
|
|
2144
2192
|
}
|
|
2145
2193
|
get cardClasses() {
|
|
2146
2194
|
const recipeClasses = spectreUi.getCardClasses({
|
|
2195
|
+
...this.accent !== void 0 && {
|
|
2196
|
+
accent: this.accent
|
|
2197
|
+
},
|
|
2198
|
+
...this.accentColor !== void 0 && {
|
|
2199
|
+
accentColor: this.accentColor
|
|
2200
|
+
},
|
|
2147
2201
|
disabled: this.isDisabled,
|
|
2148
2202
|
fullHeight: this.fullHeight ?? false,
|
|
2149
2203
|
interactive: this.interactive ?? false,
|
|
@@ -2171,6 +2225,8 @@ var SpectreCardElement = class extends SpectreProjectableElement {
|
|
|
2171
2225
|
}
|
|
2172
2226
|
};
|
|
2173
2227
|
SpectreCardElement.properties = {
|
|
2228
|
+
accent: { type: String, reflect: true },
|
|
2229
|
+
accentColor: { attribute: "accent-color", type: String, reflect: true },
|
|
2174
2230
|
disabled: { type: Boolean, reflect: true },
|
|
2175
2231
|
fullHeight: { attribute: "full-height", type: Boolean, reflect: true },
|
|
2176
2232
|
innerClass: { attribute: "inner-class", type: String },
|
|
@@ -2396,6 +2452,8 @@ function defineSpectreRating(tagName = "sp-rating") {
|
|
|
2396
2452
|
var SpectreTestimonialElement = class extends SpectreProjectableElement {
|
|
2397
2453
|
constructor() {
|
|
2398
2454
|
super(...arguments);
|
|
2455
|
+
this.accent = void 0;
|
|
2456
|
+
this.accentColor = void 0;
|
|
2399
2457
|
this.disabled = false;
|
|
2400
2458
|
this.fullHeight = false;
|
|
2401
2459
|
this.interactive = false;
|
|
@@ -2425,6 +2483,12 @@ var SpectreTestimonialElement = class extends SpectreProjectableElement {
|
|
|
2425
2483
|
return el.hasAttribute("data-sp-testimonial-native");
|
|
2426
2484
|
}
|
|
2427
2485
|
willUpdate(changedProperties) {
|
|
2486
|
+
if (changedProperties.has("accent") && this.accent != null && !isAccentEdge(this.accent)) {
|
|
2487
|
+
this.accent = void 0;
|
|
2488
|
+
}
|
|
2489
|
+
if (changedProperties.has("accentColor") && this.accentColor != null && !isAccentColor(this.accentColor)) {
|
|
2490
|
+
this.accentColor = void 0;
|
|
2491
|
+
}
|
|
2428
2492
|
if (changedProperties.has("disabled") && this.disabled == null) {
|
|
2429
2493
|
this.disabled = false;
|
|
2430
2494
|
}
|
|
@@ -2443,6 +2507,12 @@ var SpectreTestimonialElement = class extends SpectreProjectableElement {
|
|
|
2443
2507
|
}
|
|
2444
2508
|
get testimonialClasses() {
|
|
2445
2509
|
return spectreUi.getTestimonialClasses({
|
|
2510
|
+
...this.accent !== void 0 && {
|
|
2511
|
+
accent: this.accent
|
|
2512
|
+
},
|
|
2513
|
+
...this.accentColor !== void 0 && {
|
|
2514
|
+
accentColor: this.accentColor
|
|
2515
|
+
},
|
|
2446
2516
|
disabled: this.isDisabled,
|
|
2447
2517
|
fullHeight: this.fullHeight ?? false,
|
|
2448
2518
|
interactive: this.interactive ?? false,
|
|
@@ -2467,6 +2537,8 @@ var SpectreTestimonialElement = class extends SpectreProjectableElement {
|
|
|
2467
2537
|
}
|
|
2468
2538
|
};
|
|
2469
2539
|
SpectreTestimonialElement.properties = {
|
|
2540
|
+
accent: { type: String, reflect: true },
|
|
2541
|
+
accentColor: { attribute: "accent-color", type: String, reflect: true },
|
|
2470
2542
|
disabled: { type: Boolean, reflect: true },
|
|
2471
2543
|
fullHeight: { attribute: "full-height", type: Boolean, reflect: true },
|
|
2472
2544
|
interactive: { type: Boolean, reflect: true },
|
|
@@ -2856,6 +2928,8 @@ function defineSpectreTag(tagName = "sp-tag") {
|
|
|
2856
2928
|
var SpectrePricingCardElement = class extends SpectreProjectableElement {
|
|
2857
2929
|
constructor() {
|
|
2858
2930
|
super(...arguments);
|
|
2931
|
+
this.accent = void 0;
|
|
2932
|
+
this.accentColor = void 0;
|
|
2859
2933
|
this.disabled = false;
|
|
2860
2934
|
this.featured = false;
|
|
2861
2935
|
this.fullHeight = false;
|
|
@@ -2885,6 +2959,12 @@ var SpectrePricingCardElement = class extends SpectreProjectableElement {
|
|
|
2885
2959
|
return el.hasAttribute("data-sp-pricing-card-native");
|
|
2886
2960
|
}
|
|
2887
2961
|
willUpdate(changedProperties) {
|
|
2962
|
+
if (changedProperties.has("accent") && this.accent != null && !isAccentEdge(this.accent)) {
|
|
2963
|
+
this.accent = void 0;
|
|
2964
|
+
}
|
|
2965
|
+
if (changedProperties.has("accentColor") && this.accentColor != null && !isAccentColor(this.accentColor)) {
|
|
2966
|
+
this.accentColor = void 0;
|
|
2967
|
+
}
|
|
2888
2968
|
if (changedProperties.has("disabled") && this.disabled == null) {
|
|
2889
2969
|
this.disabled = false;
|
|
2890
2970
|
}
|
|
@@ -2903,6 +2983,12 @@ var SpectrePricingCardElement = class extends SpectreProjectableElement {
|
|
|
2903
2983
|
}
|
|
2904
2984
|
get pricingCardClasses() {
|
|
2905
2985
|
return spectreUi.getPricingCardClasses({
|
|
2986
|
+
...this.accent !== void 0 && {
|
|
2987
|
+
accent: this.accent
|
|
2988
|
+
},
|
|
2989
|
+
...this.accentColor !== void 0 && {
|
|
2990
|
+
accentColor: this.accentColor
|
|
2991
|
+
},
|
|
2906
2992
|
disabled: this.isDisabled,
|
|
2907
2993
|
featured: this.featured ?? false,
|
|
2908
2994
|
fullHeight: this.fullHeight ?? false,
|
|
@@ -2927,6 +3013,8 @@ var SpectrePricingCardElement = class extends SpectreProjectableElement {
|
|
|
2927
3013
|
}
|
|
2928
3014
|
};
|
|
2929
3015
|
SpectrePricingCardElement.properties = {
|
|
3016
|
+
accent: { type: String, reflect: true },
|
|
3017
|
+
accentColor: { attribute: "accent-color", type: String, reflect: true },
|
|
2930
3018
|
disabled: { type: Boolean, reflect: true },
|
|
2931
3019
|
featured: { type: Boolean, reflect: true },
|
|
2932
3020
|
fullHeight: { attribute: "full-height", type: Boolean, reflect: true },
|
|
@@ -3372,11 +3460,14 @@ function defineSpectreStack(tagName = "sp-stack") {
|
|
|
3372
3460
|
var SpectreDropdownElement = class extends SpectreBaseElement {
|
|
3373
3461
|
constructor() {
|
|
3374
3462
|
super(...arguments);
|
|
3463
|
+
this.accent = void 0;
|
|
3464
|
+
this.accentColor = void 0;
|
|
3375
3465
|
this.fullWidth = false;
|
|
3376
3466
|
this.mega = false;
|
|
3377
3467
|
this.open = false;
|
|
3378
3468
|
this.placement = "bottom-start";
|
|
3379
3469
|
this.triggerLabel = "Toggle menu";
|
|
3470
|
+
this.viewport = false;
|
|
3380
3471
|
this.triggerContent = [];
|
|
3381
3472
|
this.menuContent = [];
|
|
3382
3473
|
this.handleDocumentClick = (event) => {
|
|
@@ -3481,6 +3572,12 @@ var SpectreDropdownElement = class extends SpectreBaseElement {
|
|
|
3481
3572
|
this.contentObserver = void 0;
|
|
3482
3573
|
}
|
|
3483
3574
|
willUpdate(changedProperties) {
|
|
3575
|
+
if (changedProperties.has("accent") && this.accent != null && !isAccentEdge(this.accent)) {
|
|
3576
|
+
this.accent = void 0;
|
|
3577
|
+
}
|
|
3578
|
+
if (changedProperties.has("accentColor") && this.accentColor != null && !isAccentColor(this.accentColor)) {
|
|
3579
|
+
this.accentColor = void 0;
|
|
3580
|
+
}
|
|
3484
3581
|
if (changedProperties.has("fullWidth") && this.fullWidth == null) {
|
|
3485
3582
|
this.fullWidth = false;
|
|
3486
3583
|
}
|
|
@@ -3496,6 +3593,9 @@ var SpectreDropdownElement = class extends SpectreBaseElement {
|
|
|
3496
3593
|
if (changedProperties.has("triggerLabel") && !this.triggerLabel) {
|
|
3497
3594
|
this.triggerLabel = "Toggle menu";
|
|
3498
3595
|
}
|
|
3596
|
+
if (changedProperties.has("viewport") && this.viewport == null) {
|
|
3597
|
+
this.viewport = false;
|
|
3598
|
+
}
|
|
3499
3599
|
}
|
|
3500
3600
|
get triggerElement() {
|
|
3501
3601
|
return this.querySelector("[data-sp-dropdown-trigger]");
|
|
@@ -3524,14 +3624,22 @@ var SpectreDropdownElement = class extends SpectreBaseElement {
|
|
|
3524
3624
|
get dropdownClasses() {
|
|
3525
3625
|
return spectreUi.getDropdownClasses({
|
|
3526
3626
|
fullWidth: this.fullWidth ?? false,
|
|
3527
|
-
mega: this.mega ?? false
|
|
3627
|
+
mega: this.mega ?? false,
|
|
3628
|
+
viewport: this.viewport ?? false
|
|
3528
3629
|
});
|
|
3529
3630
|
}
|
|
3530
3631
|
get menuClasses() {
|
|
3531
3632
|
return spectreUi.getDropdownMenuClasses({
|
|
3633
|
+
...this.accent !== void 0 && {
|
|
3634
|
+
accent: this.accent
|
|
3635
|
+
},
|
|
3636
|
+
...this.accentColor !== void 0 && {
|
|
3637
|
+
accentColor: this.accentColor
|
|
3638
|
+
},
|
|
3532
3639
|
mega: this.mega ?? false,
|
|
3533
3640
|
open: this.open ?? false,
|
|
3534
|
-
placement: this.placement
|
|
3641
|
+
placement: this.placement,
|
|
3642
|
+
viewport: this.viewport ?? false
|
|
3535
3643
|
});
|
|
3536
3644
|
}
|
|
3537
3645
|
render() {
|
|
@@ -3559,11 +3667,14 @@ var SpectreDropdownElement = class extends SpectreBaseElement {
|
|
|
3559
3667
|
}
|
|
3560
3668
|
};
|
|
3561
3669
|
SpectreDropdownElement.properties = {
|
|
3670
|
+
accent: { type: String, reflect: true },
|
|
3671
|
+
accentColor: { attribute: "accent-color", type: String, reflect: true },
|
|
3562
3672
|
fullWidth: { attribute: "full-width", type: Boolean, reflect: true },
|
|
3563
3673
|
mega: { type: Boolean, reflect: true },
|
|
3564
3674
|
open: { type: Boolean, reflect: true },
|
|
3565
3675
|
placement: { type: String, reflect: true },
|
|
3566
|
-
triggerLabel: { attribute: "trigger-label", type: String }
|
|
3676
|
+
triggerLabel: { attribute: "trigger-label", type: String },
|
|
3677
|
+
viewport: { type: Boolean, reflect: true }
|
|
3567
3678
|
};
|
|
3568
3679
|
function defineSpectreDropdown(tagName = "sp-dropdown") {
|
|
3569
3680
|
const existingElement = customElements.get(tagName);
|
|
@@ -3576,6 +3687,8 @@ function defineSpectreDropdown(tagName = "sp-dropdown") {
|
|
|
3576
3687
|
var SpectreFooterElement = class extends SpectreProjectableElement {
|
|
3577
3688
|
constructor() {
|
|
3578
3689
|
super(...arguments);
|
|
3690
|
+
this.accent = void 0;
|
|
3691
|
+
this.accentColor = void 0;
|
|
3579
3692
|
this.bordered = false;
|
|
3580
3693
|
this.fullWidth = false;
|
|
3581
3694
|
this.innerClass = void 0;
|
|
@@ -3608,6 +3721,12 @@ var SpectreFooterElement = class extends SpectreProjectableElement {
|
|
|
3608
3721
|
return el.hasAttribute("data-sp-footer-native");
|
|
3609
3722
|
}
|
|
3610
3723
|
willUpdate(changedProperties) {
|
|
3724
|
+
if (changedProperties.has("accent") && this.accent != null && !isAccentEdge(this.accent)) {
|
|
3725
|
+
this.accent = void 0;
|
|
3726
|
+
}
|
|
3727
|
+
if (changedProperties.has("accentColor") && this.accentColor != null && !isAccentColor(this.accentColor)) {
|
|
3728
|
+
this.accentColor = void 0;
|
|
3729
|
+
}
|
|
3611
3730
|
if (changedProperties.has("bordered") && this.bordered == null) {
|
|
3612
3731
|
this.bordered = false;
|
|
3613
3732
|
}
|
|
@@ -3617,6 +3736,12 @@ var SpectreFooterElement = class extends SpectreProjectableElement {
|
|
|
3617
3736
|
}
|
|
3618
3737
|
get footerClasses() {
|
|
3619
3738
|
const recipeClasses = spectreUi.getFooterClasses({
|
|
3739
|
+
...this.accent !== void 0 && {
|
|
3740
|
+
accent: this.accent
|
|
3741
|
+
},
|
|
3742
|
+
...this.accentColor !== void 0 && {
|
|
3743
|
+
accentColor: this.accentColor
|
|
3744
|
+
},
|
|
3620
3745
|
bordered: this.bordered ?? false,
|
|
3621
3746
|
fullWidth: this.fullWidth ?? false
|
|
3622
3747
|
});
|
|
@@ -3636,6 +3761,8 @@ var SpectreFooterElement = class extends SpectreProjectableElement {
|
|
|
3636
3761
|
}
|
|
3637
3762
|
};
|
|
3638
3763
|
SpectreFooterElement.properties = {
|
|
3764
|
+
accent: { type: String, reflect: true },
|
|
3765
|
+
accentColor: { attribute: "accent-color", type: String, reflect: true },
|
|
3639
3766
|
bordered: { type: Boolean, reflect: true },
|
|
3640
3767
|
fullWidth: { attribute: "full-width", type: Boolean, reflect: true },
|
|
3641
3768
|
innerClass: { attribute: "inner-class", type: String }
|
|
@@ -3790,6 +3917,8 @@ var FOCUSABLE_SELECTOR = [
|
|
|
3790
3917
|
var SpectreModalElement = class extends SpectreProjectableElement {
|
|
3791
3918
|
constructor() {
|
|
3792
3919
|
super(...arguments);
|
|
3920
|
+
this.accent = void 0;
|
|
3921
|
+
this.accentColor = void 0;
|
|
3793
3922
|
this.fullWidth = false;
|
|
3794
3923
|
this.open = false;
|
|
3795
3924
|
this.previouslyFocusedElement = null;
|
|
@@ -3829,6 +3958,12 @@ var SpectreModalElement = class extends SpectreProjectableElement {
|
|
|
3829
3958
|
return el.hasAttribute("data-sp-modal-native") || el.hasAttribute("data-sp-modal-overlay");
|
|
3830
3959
|
}
|
|
3831
3960
|
willUpdate(changedProperties) {
|
|
3961
|
+
if (changedProperties.has("accent") && this.accent != null && !isAccentEdge(this.accent)) {
|
|
3962
|
+
this.accent = void 0;
|
|
3963
|
+
}
|
|
3964
|
+
if (changedProperties.has("accentColor") && this.accentColor != null && !isAccentColor(this.accentColor)) {
|
|
3965
|
+
this.accentColor = void 0;
|
|
3966
|
+
}
|
|
3832
3967
|
if (changedProperties.has("fullWidth") && this.fullWidth == null) {
|
|
3833
3968
|
this.fullWidth = false;
|
|
3834
3969
|
}
|
|
@@ -3900,6 +4035,12 @@ var SpectreModalElement = class extends SpectreProjectableElement {
|
|
|
3900
4035
|
}
|
|
3901
4036
|
get modalClasses() {
|
|
3902
4037
|
return spectreUi.getModalClasses({
|
|
4038
|
+
...this.accent !== void 0 && {
|
|
4039
|
+
accent: this.accent
|
|
4040
|
+
},
|
|
4041
|
+
...this.accentColor !== void 0 && {
|
|
4042
|
+
accentColor: this.accentColor
|
|
4043
|
+
},
|
|
3903
4044
|
open: this.open ?? false,
|
|
3904
4045
|
fullWidth: this.fullWidth ?? false
|
|
3905
4046
|
});
|
|
@@ -3935,6 +4076,8 @@ var SpectreModalElement = class extends SpectreProjectableElement {
|
|
|
3935
4076
|
}
|
|
3936
4077
|
};
|
|
3937
4078
|
SpectreModalElement.properties = {
|
|
4079
|
+
accent: { type: String, reflect: true },
|
|
4080
|
+
accentColor: { attribute: "accent-color", type: String, reflect: true },
|
|
3938
4081
|
fullWidth: { attribute: "full-width", type: Boolean, reflect: true },
|
|
3939
4082
|
open: { type: Boolean, reflect: true }
|
|
3940
4083
|
};
|
|
@@ -3949,6 +4092,8 @@ function defineSpectreModal(tagName = "sp-modal") {
|
|
|
3949
4092
|
var SpectreNavElement = class extends SpectreProjectableElement {
|
|
3950
4093
|
constructor() {
|
|
3951
4094
|
super(...arguments);
|
|
4095
|
+
this.accent = void 0;
|
|
4096
|
+
this.accentColor = void 0;
|
|
3952
4097
|
this.align = void 0;
|
|
3953
4098
|
this.bordered = false;
|
|
3954
4099
|
this.fullWidth = false;
|
|
@@ -3983,6 +4128,12 @@ var SpectreNavElement = class extends SpectreProjectableElement {
|
|
|
3983
4128
|
return el.hasAttribute("data-sp-nav-native");
|
|
3984
4129
|
}
|
|
3985
4130
|
willUpdate(changedProperties) {
|
|
4131
|
+
if (changedProperties.has("accent") && this.accent != null && !isAccentEdge(this.accent)) {
|
|
4132
|
+
this.accent = void 0;
|
|
4133
|
+
}
|
|
4134
|
+
if (changedProperties.has("accentColor") && this.accentColor != null && !isAccentColor(this.accentColor)) {
|
|
4135
|
+
this.accentColor = void 0;
|
|
4136
|
+
}
|
|
3986
4137
|
if (changedProperties.has("bordered") && this.bordered == null) {
|
|
3987
4138
|
this.bordered = false;
|
|
3988
4139
|
}
|
|
@@ -3998,6 +4149,12 @@ var SpectreNavElement = class extends SpectreProjectableElement {
|
|
|
3998
4149
|
}
|
|
3999
4150
|
get navClasses() {
|
|
4000
4151
|
const recipeClasses = spectreUi.getNavClasses({
|
|
4152
|
+
...this.accent !== void 0 && {
|
|
4153
|
+
accent: this.accent
|
|
4154
|
+
},
|
|
4155
|
+
...this.accentColor !== void 0 && {
|
|
4156
|
+
accentColor: this.accentColor
|
|
4157
|
+
},
|
|
4001
4158
|
bordered: this.bordered ?? false,
|
|
4002
4159
|
fullWidth: this.fullWidth ?? false,
|
|
4003
4160
|
sticky: this.sticky ?? false,
|
|
@@ -4019,6 +4176,8 @@ var SpectreNavElement = class extends SpectreProjectableElement {
|
|
|
4019
4176
|
}
|
|
4020
4177
|
};
|
|
4021
4178
|
SpectreNavElement.properties = {
|
|
4179
|
+
accent: { type: String, reflect: true },
|
|
4180
|
+
accentColor: { attribute: "accent-color", type: String, reflect: true },
|
|
4022
4181
|
align: { type: String, reflect: true },
|
|
4023
4182
|
bordered: { type: Boolean, reflect: true },
|
|
4024
4183
|
fullWidth: { attribute: "full-width", type: Boolean, reflect: true },
|
|
@@ -4569,6 +4728,8 @@ function defineSpectreSidebarToggle(tagName = "sp-sidebar-toggle") {
|
|
|
4569
4728
|
var SpectreToastElement = class extends SpectreBaseElement {
|
|
4570
4729
|
constructor() {
|
|
4571
4730
|
super(...arguments);
|
|
4731
|
+
this.accent = void 0;
|
|
4732
|
+
this.accentColor = void 0;
|
|
4572
4733
|
this.dismissed = false;
|
|
4573
4734
|
this.fullWidth = false;
|
|
4574
4735
|
this.variant = "info";
|
|
@@ -4652,6 +4813,12 @@ var SpectreToastElement = class extends SpectreBaseElement {
|
|
|
4652
4813
|
this.contentObserver = void 0;
|
|
4653
4814
|
}
|
|
4654
4815
|
willUpdate(changedProperties) {
|
|
4816
|
+
if (changedProperties.has("accent") && this.accent != null && !isAccentEdge(this.accent)) {
|
|
4817
|
+
this.accent = void 0;
|
|
4818
|
+
}
|
|
4819
|
+
if (changedProperties.has("accentColor") && this.accentColor != null && !isAccentColor(this.accentColor)) {
|
|
4820
|
+
this.accentColor = void 0;
|
|
4821
|
+
}
|
|
4655
4822
|
if (changedProperties.has("dismissed") && this.dismissed == null) {
|
|
4656
4823
|
this.dismissed = false;
|
|
4657
4824
|
}
|
|
@@ -4698,6 +4865,12 @@ var SpectreToastElement = class extends SpectreBaseElement {
|
|
|
4698
4865
|
}
|
|
4699
4866
|
get toastClasses() {
|
|
4700
4867
|
return spectreUi.getToastClasses({
|
|
4868
|
+
...this.accent !== void 0 && {
|
|
4869
|
+
accent: this.accent
|
|
4870
|
+
},
|
|
4871
|
+
...this.accentColor !== void 0 && {
|
|
4872
|
+
accentColor: this.accentColor
|
|
4873
|
+
},
|
|
4701
4874
|
variant: this.variant,
|
|
4702
4875
|
dismissed: this.dismissed ?? false,
|
|
4703
4876
|
fullWidth: this.fullWidth ?? false
|
|
@@ -4725,6 +4898,8 @@ var SpectreToastElement = class extends SpectreBaseElement {
|
|
|
4725
4898
|
}
|
|
4726
4899
|
};
|
|
4727
4900
|
SpectreToastElement.properties = {
|
|
4901
|
+
accent: { type: String, reflect: true },
|
|
4902
|
+
accentColor: { attribute: "accent-color", type: String, reflect: true },
|
|
4728
4903
|
autoDismiss: { attribute: "auto-dismiss", type: Number },
|
|
4729
4904
|
dismissed: { type: Boolean, reflect: true },
|
|
4730
4905
|
fullWidth: { attribute: "full-width", type: Boolean, reflect: true },
|
|
@@ -4741,6 +4916,8 @@ function defineSpectreToast(tagName = "sp-toast") {
|
|
|
4741
4916
|
var SpectreTooltipElement = class extends SpectreBaseElement {
|
|
4742
4917
|
constructor() {
|
|
4743
4918
|
super(...arguments);
|
|
4919
|
+
this.accent = void 0;
|
|
4920
|
+
this.accentColor = void 0;
|
|
4744
4921
|
this.placement = "top";
|
|
4745
4922
|
this.visible = false;
|
|
4746
4923
|
this.triggerContent = [];
|
|
@@ -4829,6 +5006,12 @@ var SpectreTooltipElement = class extends SpectreBaseElement {
|
|
|
4829
5006
|
this.contentObserver = void 0;
|
|
4830
5007
|
}
|
|
4831
5008
|
willUpdate(changedProperties) {
|
|
5009
|
+
if (changedProperties.has("accent") && this.accent != null && !isAccentEdge(this.accent)) {
|
|
5010
|
+
this.accent = void 0;
|
|
5011
|
+
}
|
|
5012
|
+
if (changedProperties.has("accentColor") && this.accentColor != null && !isAccentColor(this.accentColor)) {
|
|
5013
|
+
this.accentColor = void 0;
|
|
5014
|
+
}
|
|
4832
5015
|
if (changedProperties.has("placement") && (this.placement == null || !isTooltipPlacement(this.placement))) {
|
|
4833
5016
|
this.placement = "top";
|
|
4834
5017
|
}
|
|
@@ -4852,6 +5035,12 @@ var SpectreTooltipElement = class extends SpectreBaseElement {
|
|
|
4852
5035
|
}
|
|
4853
5036
|
get tooltipClasses() {
|
|
4854
5037
|
return spectreUi.getTooltipClasses({
|
|
5038
|
+
...this.accent !== void 0 && {
|
|
5039
|
+
accent: this.accent
|
|
5040
|
+
},
|
|
5041
|
+
...this.accentColor !== void 0 && {
|
|
5042
|
+
accentColor: this.accentColor
|
|
5043
|
+
},
|
|
4855
5044
|
placement: this.placement,
|
|
4856
5045
|
visible: this.visible ?? false
|
|
4857
5046
|
});
|
|
@@ -4879,6 +5068,8 @@ var SpectreTooltipElement = class extends SpectreBaseElement {
|
|
|
4879
5068
|
}
|
|
4880
5069
|
};
|
|
4881
5070
|
SpectreTooltipElement.properties = {
|
|
5071
|
+
accent: { type: String, reflect: true },
|
|
5072
|
+
accentColor: { attribute: "accent-color", type: String, reflect: true },
|
|
4882
5073
|
placement: { type: String, reflect: true },
|
|
4883
5074
|
visible: { type: Boolean, reflect: true }
|
|
4884
5075
|
};
|
|
@@ -5100,6 +5291,8 @@ exports.spectreBadgeVariants = spectreBadgeVariants;
|
|
|
5100
5291
|
exports.spectreButtonSizes = spectreInputSizes;
|
|
5101
5292
|
exports.spectreButtonTypes = spectreButtonTypes;
|
|
5102
5293
|
exports.spectreButtonVariants = spectreButtonVariants;
|
|
5294
|
+
exports.spectreCardAccentColors = spectreAccentColors;
|
|
5295
|
+
exports.spectreCardAccentEdges = spectreAccentEdges;
|
|
5103
5296
|
exports.spectreCardVariants = spectreCardVariants;
|
|
5104
5297
|
exports.spectreContainerMaxWidths = spectreContainerMaxWidths;
|
|
5105
5298
|
exports.spectreDropdownPlacements = spectreDropdownPlacements;
|