@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.
Files changed (136) hide show
  1. package/README.md +99 -77
  2. package/dist/alert.cjs.map +1 -1
  3. package/dist/alert.d.cts +2 -2
  4. package/dist/alert.d.ts +2 -2
  5. package/dist/alert.js.map +1 -1
  6. package/dist/avatar.cjs.map +1 -1
  7. package/dist/avatar.d.cts +2 -2
  8. package/dist/avatar.d.ts +2 -2
  9. package/dist/avatar.js.map +1 -1
  10. package/dist/badge.cjs +48 -1
  11. package/dist/badge.cjs.map +1 -1
  12. package/dist/badge.d.cts +22 -2
  13. package/dist/badge.d.ts +22 -2
  14. package/dist/badge.js +48 -1
  15. package/dist/badge.js.map +1 -1
  16. package/dist/button.cjs.map +1 -1
  17. package/dist/button.d.cts +2 -2
  18. package/dist/button.d.ts +2 -2
  19. package/dist/button.js.map +1 -1
  20. package/dist/card.cjs +34 -0
  21. package/dist/card.cjs.map +1 -1
  22. package/dist/card.d.cts +16 -3
  23. package/dist/card.d.ts +16 -3
  24. package/dist/card.js +33 -1
  25. package/dist/card.js.map +1 -1
  26. package/dist/container.cjs.map +1 -1
  27. package/dist/container.d.cts +2 -2
  28. package/dist/container.d.ts +2 -2
  29. package/dist/container.js.map +1 -1
  30. package/dist/dropdown.cjs +42 -3
  31. package/dist/dropdown.cjs.map +1 -1
  32. package/dist/dropdown.d.cts +21 -2
  33. package/dist/dropdown.d.ts +21 -2
  34. package/dist/dropdown.js +42 -3
  35. package/dist/dropdown.js.map +1 -1
  36. package/dist/footer.cjs +32 -0
  37. package/dist/footer.cjs.map +1 -1
  38. package/dist/footer.d.cts +14 -0
  39. package/dist/footer.d.ts +14 -0
  40. package/dist/footer.js +32 -0
  41. package/dist/footer.js.map +1 -1
  42. package/dist/{form-TvtLcoW0.d.cts → form-DpPtizpY.d.cts} +5 -1
  43. package/dist/{form-TvtLcoW0.d.ts → form-DpPtizpY.d.ts} +5 -1
  44. package/dist/grid.cjs.map +1 -1
  45. package/dist/grid.d.cts +2 -2
  46. package/dist/grid.d.ts +2 -2
  47. package/dist/grid.js.map +1 -1
  48. package/dist/icon-box.cjs.map +1 -1
  49. package/dist/icon-box.d.cts +2 -2
  50. package/dist/icon-box.d.ts +2 -2
  51. package/dist/icon-box.js.map +1 -1
  52. package/dist/index.cjs +197 -4
  53. package/dist/index.cjs.map +1 -1
  54. package/dist/index.d.cts +1 -1
  55. package/dist/index.d.ts +1 -1
  56. package/dist/index.js +196 -5
  57. package/dist/index.js.map +1 -1
  58. package/dist/input.cjs.map +1 -1
  59. package/dist/input.d.cts +2 -2
  60. package/dist/input.d.ts +2 -2
  61. package/dist/input.js.map +1 -1
  62. package/dist/modal.cjs +32 -0
  63. package/dist/modal.cjs.map +1 -1
  64. package/dist/modal.d.cts +14 -0
  65. package/dist/modal.d.ts +14 -0
  66. package/dist/modal.js +32 -0
  67. package/dist/modal.js.map +1 -1
  68. package/dist/nav-item.cjs.map +1 -1
  69. package/dist/nav-item.d.cts +1 -1
  70. package/dist/nav-item.d.ts +1 -1
  71. package/dist/nav-item.js.map +1 -1
  72. package/dist/nav.cjs +32 -0
  73. package/dist/nav.cjs.map +1 -1
  74. package/dist/nav.d.cts +14 -1
  75. package/dist/nav.d.ts +14 -1
  76. package/dist/nav.js +32 -0
  77. package/dist/nav.js.map +1 -1
  78. package/dist/pricing-card.cjs +32 -0
  79. package/dist/pricing-card.cjs.map +1 -1
  80. package/dist/pricing-card.d.cts +14 -0
  81. package/dist/pricing-card.d.ts +14 -0
  82. package/dist/pricing-card.js +32 -0
  83. package/dist/pricing-card.js.map +1 -1
  84. package/dist/rating.cjs.map +1 -1
  85. package/dist/rating.d.cts +2 -2
  86. package/dist/rating.d.ts +2 -2
  87. package/dist/rating.js.map +1 -1
  88. package/dist/section.cjs.map +1 -1
  89. package/dist/section.js.map +1 -1
  90. package/dist/select.cjs.map +1 -1
  91. package/dist/select.d.cts +1 -1
  92. package/dist/select.d.ts +1 -1
  93. package/dist/select.js.map +1 -1
  94. package/dist/sidebar-link.cjs.map +1 -1
  95. package/dist/sidebar-link.d.cts +1 -1
  96. package/dist/sidebar-link.d.ts +1 -1
  97. package/dist/sidebar-link.js.map +1 -1
  98. package/dist/spinner.cjs.map +1 -1
  99. package/dist/spinner.d.cts +2 -2
  100. package/dist/spinner.d.ts +2 -2
  101. package/dist/spinner.js.map +1 -1
  102. package/dist/stack.cjs.map +1 -1
  103. package/dist/stack.d.cts +2 -2
  104. package/dist/stack.d.ts +2 -2
  105. package/dist/stack.js.map +1 -1
  106. package/dist/tag.cjs.map +1 -1
  107. package/dist/tag.d.cts +2 -2
  108. package/dist/tag.d.ts +2 -2
  109. package/dist/tag.js.map +1 -1
  110. package/dist/testimonial.cjs +32 -0
  111. package/dist/testimonial.cjs.map +1 -1
  112. package/dist/testimonial.d.cts +15 -2
  113. package/dist/testimonial.d.ts +15 -2
  114. package/dist/testimonial.js +32 -0
  115. package/dist/testimonial.js.map +1 -1
  116. package/dist/text.cjs.map +1 -1
  117. package/dist/text.d.cts +2 -2
  118. package/dist/text.d.ts +2 -2
  119. package/dist/text.js.map +1 -1
  120. package/dist/textarea.cjs.map +1 -1
  121. package/dist/textarea.d.cts +1 -1
  122. package/dist/textarea.d.ts +1 -1
  123. package/dist/textarea.js.map +1 -1
  124. package/dist/toast.cjs +32 -0
  125. package/dist/toast.cjs.map +1 -1
  126. package/dist/toast.d.cts +15 -2
  127. package/dist/toast.d.ts +15 -2
  128. package/dist/toast.js +32 -0
  129. package/dist/toast.js.map +1 -1
  130. package/dist/tooltip.cjs +32 -0
  131. package/dist/tooltip.cjs.map +1 -1
  132. package/dist/tooltip.d.cts +15 -2
  133. package/dist/tooltip.d.ts +15 -2
  134. package/dist/tooltip.js +32 -0
  135. package/dist/tooltip.js.map +1 -1
  136. package/package.json +14 -14
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 SpectreGridAlign, k as SpectreGridColumns, l as SpectreGridGap, S as SpectreIconBoxSize, m as SpectreIconBoxVariant, S as SpectreInputSize, n as SpectreInputType, S as SpectreRatingSize, S as SpectreSpinnerSize, o as SpectreSpinnerVariant, p as SpectreStackAlign, q as SpectreStackBasis, r as SpectreStackDirection, s as SpectreStackGap, S as SpectreTagSize, t as SpectreTagVariant, u as SpectreTestimonialVariant, v as SpectreTextFamily, w as SpectreTextLevel, x as SpectreTextSize, y as SpectreTextVariant, z as SpectreToastVariant, A as SpectreTooltipPlacement, B as spectreAlertSizes, C as spectreAlertVariants, D as spectreAvatarShapes, E as spectreAvatarSizes, B as spectreBadgeSizes, F as spectreBadgeVariants, B as spectreButtonSizes, G as spectreButtonTypes, H as spectreButtonVariants, I as spectreCardVariants, J as spectreContainerMaxWidths, K as spectreDropdownPlacements, L as spectreGridAligns, M as spectreGridColumns, N as spectreGridGaps, B as spectreIconBoxSizes, O as spectreIconBoxVariants, B as spectreInputSizes, P as spectreInputTypes, B as spectreRatingSizes, B as spectreSpinnerSizes, Q as spectreSpinnerVariants, R as spectreStackAligns, T as spectreStackBases, U as spectreStackDirections, V as spectreStackGaps, B as spectreTagSizes, W as spectreTagVariants, X as spectreTestimonialVariants, Y as spectreTextFamilies, Z as spectreTextLevels, _ as spectreTextSizes, $ as spectreTextVariants, a0 as spectreToastVariants, a1 as spectreTooltipPlacements } from './form-TvtLcoW0.cjs';
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 SpectreCardAccentColor, h as SpectreCardAccentEdge, i as SpectreCardVariant, j as SpectreContainerMaxWidth, k as SpectreDropdownPlacement, l as SpectreGridAlign, m as SpectreGridColumns, n as SpectreGridGap, S as SpectreIconBoxSize, o as SpectreIconBoxVariant, S as SpectreInputSize, p as SpectreInputType, S as SpectreRatingSize, S as SpectreSpinnerSize, q as SpectreSpinnerVariant, r as SpectreStackAlign, s as SpectreStackBasis, t as SpectreStackDirection, u as SpectreStackGap, S as SpectreTagSize, v as SpectreTagVariant, w as SpectreTestimonialVariant, x as SpectreTextFamily, y as SpectreTextLevel, z as SpectreTextSize, A as SpectreTextVariant, B as SpectreToastVariant, C as SpectreTooltipPlacement, D as spectreAlertSizes, E as spectreAlertVariants, F as spectreAvatarShapes, G as spectreAvatarSizes, D as spectreBadgeSizes, H as spectreBadgeVariants, D as spectreButtonSizes, I as spectreButtonTypes, J as spectreButtonVariants, K as spectreCardAccentColors, L as spectreCardAccentEdges, M as spectreCardVariants, N as spectreContainerMaxWidths, O as spectreDropdownPlacements, P as spectreGridAligns, Q as spectreGridColumns, R as spectreGridGaps, D as spectreIconBoxSizes, T as spectreIconBoxVariants, D as spectreInputSizes, U as spectreInputTypes, D as spectreRatingSizes, D as spectreSpinnerSizes, V as spectreSpinnerVariants, W as spectreStackAligns, X as spectreStackBases, Y as spectreStackDirections, Z as spectreStackGaps, D as spectreTagSizes, _ as spectreTagVariants, $ as spectreTestimonialVariants, a0 as spectreTextFamilies, a1 as spectreTextLevels, a2 as spectreTextSizes, a3 as spectreTextVariants, a4 as spectreToastVariants, a5 as spectreTooltipPlacements } from './form-DpPtizpY.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';
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 SpectreGridAlign, k as SpectreGridColumns, l as SpectreGridGap, S as SpectreIconBoxSize, m as SpectreIconBoxVariant, S as SpectreInputSize, n as SpectreInputType, S as SpectreRatingSize, S as SpectreSpinnerSize, o as SpectreSpinnerVariant, p as SpectreStackAlign, q as SpectreStackBasis, r as SpectreStackDirection, s as SpectreStackGap, S as SpectreTagSize, t as SpectreTagVariant, u as SpectreTestimonialVariant, v as SpectreTextFamily, w as SpectreTextLevel, x as SpectreTextSize, y as SpectreTextVariant, z as SpectreToastVariant, A as SpectreTooltipPlacement, B as spectreAlertSizes, C as spectreAlertVariants, D as spectreAvatarShapes, E as spectreAvatarSizes, B as spectreBadgeSizes, F as spectreBadgeVariants, B as spectreButtonSizes, G as spectreButtonTypes, H as spectreButtonVariants, I as spectreCardVariants, J as spectreContainerMaxWidths, K as spectreDropdownPlacements, L as spectreGridAligns, M as spectreGridColumns, N as spectreGridGaps, B as spectreIconBoxSizes, O as spectreIconBoxVariants, B as spectreInputSizes, P as spectreInputTypes, B as spectreRatingSizes, B as spectreSpinnerSizes, Q as spectreSpinnerVariants, R as spectreStackAligns, T as spectreStackBases, U as spectreStackDirections, V as spectreStackGaps, B as spectreTagSizes, W as spectreTagVariants, X as spectreTestimonialVariants, Y as spectreTextFamilies, Z as spectreTextLevels, _ as spectreTextSizes, $ as spectreTextVariants, a0 as spectreToastVariants, a1 as spectreTooltipPlacements } from './form-TvtLcoW0.js';
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 SpectreCardAccentColor, h as SpectreCardAccentEdge, i as SpectreCardVariant, j as SpectreContainerMaxWidth, k as SpectreDropdownPlacement, l as SpectreGridAlign, m as SpectreGridColumns, n as SpectreGridGap, S as SpectreIconBoxSize, o as SpectreIconBoxVariant, S as SpectreInputSize, p as SpectreInputType, S as SpectreRatingSize, S as SpectreSpinnerSize, q as SpectreSpinnerVariant, r as SpectreStackAlign, s as SpectreStackBasis, t as SpectreStackDirection, u as SpectreStackGap, S as SpectreTagSize, v as SpectreTagVariant, w as SpectreTestimonialVariant, x as SpectreTextFamily, y as SpectreTextLevel, z as SpectreTextSize, A as SpectreTextVariant, B as SpectreToastVariant, C as SpectreTooltipPlacement, D as spectreAlertSizes, E as spectreAlertVariants, F as spectreAvatarShapes, G as spectreAvatarSizes, D as spectreBadgeSizes, H as spectreBadgeVariants, D as spectreButtonSizes, I as spectreButtonTypes, J as spectreButtonVariants, K as spectreCardAccentColors, L as spectreCardAccentEdges, M as spectreCardVariants, N as spectreContainerMaxWidths, O as spectreDropdownPlacements, P as spectreGridAligns, Q as spectreGridColumns, R as spectreGridGaps, D as spectreIconBoxSizes, T as spectreIconBoxVariants, D as spectreInputSizes, U as spectreInputTypes, D as spectreRatingSizes, D as spectreSpinnerSizes, V as spectreSpinnerVariants, W as spectreStackAligns, X as spectreStackBases, Y as spectreStackDirections, Z as spectreStackGaps, D as spectreTagSizes, _ as spectreTagVariants, $ as spectreTestimonialVariants, a0 as spectreTextFamilies, a1 as spectreTextLevels, a2 as spectreTextSizes, a3 as spectreTextVariants, a4 as spectreToastVariants, a5 as spectreTooltipPlacements } from './form-DpPtizpY.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';
package/dist/index.js CHANGED
@@ -85,6 +85,22 @@ function isCardPaddingSize(value) {
85
85
  value
86
86
  );
87
87
  }
88
+ var spectreAccentEdges = ["top", "right", "bottom", "left"];
89
+ function isAccentEdge(value) {
90
+ return spectreAccentEdges.includes(value);
91
+ }
92
+ var spectreAccentColors = [
93
+ "neutral",
94
+ "brand",
95
+ "info",
96
+ "success",
97
+ "warning",
98
+ "danger",
99
+ "cta"
100
+ ];
101
+ function isAccentColor(value) {
102
+ return spectreAccentColors.includes(value);
103
+ }
88
104
  var spectreIconBoxVariants = [
89
105
  "primary",
90
106
  "secondary",
@@ -1982,8 +1998,11 @@ function defineSpectreFieldset(tagName = "sp-fieldset") {
1982
1998
  var SpectreBadgeElement = class extends SpectreProjectableElement {
1983
1999
  constructor() {
1984
2000
  super(...arguments);
2001
+ this.accentRail = void 0;
2002
+ this.accentRailColor = void 0;
1985
2003
  this.disabled = false;
1986
2004
  this.fullWidth = false;
2005
+ this.innerClass = void 0;
1987
2006
  this.loading = false;
1988
2007
  this.size = "md";
1989
2008
  this.variant = "primary";
@@ -2011,6 +2030,12 @@ var SpectreBadgeElement = class extends SpectreProjectableElement {
2011
2030
  return el.hasAttribute("data-sp-badge-native");
2012
2031
  }
2013
2032
  willUpdate(changedProperties) {
2033
+ if (changedProperties.has("accentRail") && this.accentRail != null && !isAccentEdge(this.accentRail)) {
2034
+ this.accentRail = void 0;
2035
+ }
2036
+ if (changedProperties.has("accentRailColor") && this.accentRailColor != null && !isAccentColor(this.accentRailColor)) {
2037
+ this.accentRailColor = void 0;
2038
+ }
2014
2039
  if (changedProperties.has("disabled") && this.disabled == null) {
2015
2040
  this.disabled = false;
2016
2041
  }
@@ -2028,13 +2053,21 @@ var SpectreBadgeElement = class extends SpectreProjectableElement {
2028
2053
  }
2029
2054
  }
2030
2055
  get badgeClasses() {
2031
- return getBadgeClasses({
2056
+ const recipeClasses = getBadgeClasses({
2057
+ ...this.accentRail !== void 0 && {
2058
+ accentRail: this.accentRail
2059
+ },
2060
+ ...this.accentRailColor !== void 0 && {
2061
+ accentRailColor: this.accentRailColor
2062
+ },
2032
2063
  disabled: this.isDisabled,
2033
2064
  fullWidth: this.fullWidth ?? false,
2034
2065
  loading: this.loading ?? false,
2035
2066
  size: this.size,
2036
2067
  variant: this.variant
2037
2068
  });
2069
+ const utilityClasses = sanitizeUtilityClasses(this.innerClass);
2070
+ return utilityClasses ? `${recipeClasses} ${utilityClasses}` : recipeClasses;
2038
2071
  }
2039
2072
  render() {
2040
2073
  return html`<span
@@ -2053,8 +2086,15 @@ var SpectreBadgeElement = class extends SpectreProjectableElement {
2053
2086
  }
2054
2087
  };
2055
2088
  SpectreBadgeElement.properties = {
2089
+ accentRail: { attribute: "accent-rail", type: String, reflect: true },
2090
+ accentRailColor: {
2091
+ attribute: "accent-rail-color",
2092
+ type: String,
2093
+ reflect: true
2094
+ },
2056
2095
  disabled: { type: Boolean, reflect: true },
2057
2096
  fullWidth: { attribute: "full-width", type: Boolean, reflect: true },
2097
+ innerClass: { attribute: "inner-class", type: String },
2058
2098
  loading: { type: Boolean, reflect: true },
2059
2099
  size: { type: String, reflect: true },
2060
2100
  variant: { type: String, reflect: true }
@@ -2090,6 +2130,8 @@ var paddedConverter = {
2090
2130
  var SpectreCardElement = class extends SpectreProjectableElement {
2091
2131
  constructor() {
2092
2132
  super(...arguments);
2133
+ this.accent = void 0;
2134
+ this.accentColor = void 0;
2093
2135
  this.disabled = false;
2094
2136
  this.fullHeight = false;
2095
2137
  this.innerClass = void 0;
@@ -2121,6 +2163,12 @@ var SpectreCardElement = class extends SpectreProjectableElement {
2121
2163
  return el.hasAttribute("data-sp-card-native");
2122
2164
  }
2123
2165
  willUpdate(changedProperties) {
2166
+ if (changedProperties.has("accent") && this.accent != null && !isAccentEdge(this.accent)) {
2167
+ this.accent = void 0;
2168
+ }
2169
+ if (changedProperties.has("accentColor") && this.accentColor != null && !isAccentColor(this.accentColor)) {
2170
+ this.accentColor = void 0;
2171
+ }
2124
2172
  if (changedProperties.has("disabled") && this.disabled == null) {
2125
2173
  this.disabled = false;
2126
2174
  }
@@ -2142,6 +2190,12 @@ var SpectreCardElement = class extends SpectreProjectableElement {
2142
2190
  }
2143
2191
  get cardClasses() {
2144
2192
  const recipeClasses = getCardClasses({
2193
+ ...this.accent !== void 0 && {
2194
+ accent: this.accent
2195
+ },
2196
+ ...this.accentColor !== void 0 && {
2197
+ accentColor: this.accentColor
2198
+ },
2145
2199
  disabled: this.isDisabled,
2146
2200
  fullHeight: this.fullHeight ?? false,
2147
2201
  interactive: this.interactive ?? false,
@@ -2169,6 +2223,8 @@ var SpectreCardElement = class extends SpectreProjectableElement {
2169
2223
  }
2170
2224
  };
2171
2225
  SpectreCardElement.properties = {
2226
+ accent: { type: String, reflect: true },
2227
+ accentColor: { attribute: "accent-color", type: String, reflect: true },
2172
2228
  disabled: { type: Boolean, reflect: true },
2173
2229
  fullHeight: { attribute: "full-height", type: Boolean, reflect: true },
2174
2230
  innerClass: { attribute: "inner-class", type: String },
@@ -2394,6 +2450,8 @@ function defineSpectreRating(tagName = "sp-rating") {
2394
2450
  var SpectreTestimonialElement = class extends SpectreProjectableElement {
2395
2451
  constructor() {
2396
2452
  super(...arguments);
2453
+ this.accent = void 0;
2454
+ this.accentColor = void 0;
2397
2455
  this.disabled = false;
2398
2456
  this.fullHeight = false;
2399
2457
  this.interactive = false;
@@ -2423,6 +2481,12 @@ var SpectreTestimonialElement = class extends SpectreProjectableElement {
2423
2481
  return el.hasAttribute("data-sp-testimonial-native");
2424
2482
  }
2425
2483
  willUpdate(changedProperties) {
2484
+ if (changedProperties.has("accent") && this.accent != null && !isAccentEdge(this.accent)) {
2485
+ this.accent = void 0;
2486
+ }
2487
+ if (changedProperties.has("accentColor") && this.accentColor != null && !isAccentColor(this.accentColor)) {
2488
+ this.accentColor = void 0;
2489
+ }
2426
2490
  if (changedProperties.has("disabled") && this.disabled == null) {
2427
2491
  this.disabled = false;
2428
2492
  }
@@ -2441,6 +2505,12 @@ var SpectreTestimonialElement = class extends SpectreProjectableElement {
2441
2505
  }
2442
2506
  get testimonialClasses() {
2443
2507
  return getTestimonialClasses({
2508
+ ...this.accent !== void 0 && {
2509
+ accent: this.accent
2510
+ },
2511
+ ...this.accentColor !== void 0 && {
2512
+ accentColor: this.accentColor
2513
+ },
2444
2514
  disabled: this.isDisabled,
2445
2515
  fullHeight: this.fullHeight ?? false,
2446
2516
  interactive: this.interactive ?? false,
@@ -2465,6 +2535,8 @@ var SpectreTestimonialElement = class extends SpectreProjectableElement {
2465
2535
  }
2466
2536
  };
2467
2537
  SpectreTestimonialElement.properties = {
2538
+ accent: { type: String, reflect: true },
2539
+ accentColor: { attribute: "accent-color", type: String, reflect: true },
2468
2540
  disabled: { type: Boolean, reflect: true },
2469
2541
  fullHeight: { attribute: "full-height", type: Boolean, reflect: true },
2470
2542
  interactive: { type: Boolean, reflect: true },
@@ -2854,6 +2926,8 @@ function defineSpectreTag(tagName = "sp-tag") {
2854
2926
  var SpectrePricingCardElement = class extends SpectreProjectableElement {
2855
2927
  constructor() {
2856
2928
  super(...arguments);
2929
+ this.accent = void 0;
2930
+ this.accentColor = void 0;
2857
2931
  this.disabled = false;
2858
2932
  this.featured = false;
2859
2933
  this.fullHeight = false;
@@ -2883,6 +2957,12 @@ var SpectrePricingCardElement = class extends SpectreProjectableElement {
2883
2957
  return el.hasAttribute("data-sp-pricing-card-native");
2884
2958
  }
2885
2959
  willUpdate(changedProperties) {
2960
+ if (changedProperties.has("accent") && this.accent != null && !isAccentEdge(this.accent)) {
2961
+ this.accent = void 0;
2962
+ }
2963
+ if (changedProperties.has("accentColor") && this.accentColor != null && !isAccentColor(this.accentColor)) {
2964
+ this.accentColor = void 0;
2965
+ }
2886
2966
  if (changedProperties.has("disabled") && this.disabled == null) {
2887
2967
  this.disabled = false;
2888
2968
  }
@@ -2901,6 +2981,12 @@ var SpectrePricingCardElement = class extends SpectreProjectableElement {
2901
2981
  }
2902
2982
  get pricingCardClasses() {
2903
2983
  return getPricingCardClasses({
2984
+ ...this.accent !== void 0 && {
2985
+ accent: this.accent
2986
+ },
2987
+ ...this.accentColor !== void 0 && {
2988
+ accentColor: this.accentColor
2989
+ },
2904
2990
  disabled: this.isDisabled,
2905
2991
  featured: this.featured ?? false,
2906
2992
  fullHeight: this.fullHeight ?? false,
@@ -2925,6 +3011,8 @@ var SpectrePricingCardElement = class extends SpectreProjectableElement {
2925
3011
  }
2926
3012
  };
2927
3013
  SpectrePricingCardElement.properties = {
3014
+ accent: { type: String, reflect: true },
3015
+ accentColor: { attribute: "accent-color", type: String, reflect: true },
2928
3016
  disabled: { type: Boolean, reflect: true },
2929
3017
  featured: { type: Boolean, reflect: true },
2930
3018
  fullHeight: { attribute: "full-height", type: Boolean, reflect: true },
@@ -3370,11 +3458,14 @@ function defineSpectreStack(tagName = "sp-stack") {
3370
3458
  var SpectreDropdownElement = class extends SpectreBaseElement {
3371
3459
  constructor() {
3372
3460
  super(...arguments);
3461
+ this.accent = void 0;
3462
+ this.accentColor = void 0;
3373
3463
  this.fullWidth = false;
3374
3464
  this.mega = false;
3375
3465
  this.open = false;
3376
3466
  this.placement = "bottom-start";
3377
3467
  this.triggerLabel = "Toggle menu";
3468
+ this.viewport = false;
3378
3469
  this.triggerContent = [];
3379
3470
  this.menuContent = [];
3380
3471
  this.handleDocumentClick = (event) => {
@@ -3479,6 +3570,12 @@ var SpectreDropdownElement = class extends SpectreBaseElement {
3479
3570
  this.contentObserver = void 0;
3480
3571
  }
3481
3572
  willUpdate(changedProperties) {
3573
+ if (changedProperties.has("accent") && this.accent != null && !isAccentEdge(this.accent)) {
3574
+ this.accent = void 0;
3575
+ }
3576
+ if (changedProperties.has("accentColor") && this.accentColor != null && !isAccentColor(this.accentColor)) {
3577
+ this.accentColor = void 0;
3578
+ }
3482
3579
  if (changedProperties.has("fullWidth") && this.fullWidth == null) {
3483
3580
  this.fullWidth = false;
3484
3581
  }
@@ -3494,6 +3591,9 @@ var SpectreDropdownElement = class extends SpectreBaseElement {
3494
3591
  if (changedProperties.has("triggerLabel") && !this.triggerLabel) {
3495
3592
  this.triggerLabel = "Toggle menu";
3496
3593
  }
3594
+ if (changedProperties.has("viewport") && this.viewport == null) {
3595
+ this.viewport = false;
3596
+ }
3497
3597
  }
3498
3598
  get triggerElement() {
3499
3599
  return this.querySelector("[data-sp-dropdown-trigger]");
@@ -3522,14 +3622,22 @@ var SpectreDropdownElement = class extends SpectreBaseElement {
3522
3622
  get dropdownClasses() {
3523
3623
  return getDropdownClasses({
3524
3624
  fullWidth: this.fullWidth ?? false,
3525
- mega: this.mega ?? false
3625
+ mega: this.mega ?? false,
3626
+ viewport: this.viewport ?? false
3526
3627
  });
3527
3628
  }
3528
3629
  get menuClasses() {
3529
3630
  return getDropdownMenuClasses({
3631
+ ...this.accent !== void 0 && {
3632
+ accent: this.accent
3633
+ },
3634
+ ...this.accentColor !== void 0 && {
3635
+ accentColor: this.accentColor
3636
+ },
3530
3637
  mega: this.mega ?? false,
3531
3638
  open: this.open ?? false,
3532
- placement: this.placement
3639
+ placement: this.placement,
3640
+ viewport: this.viewport ?? false
3533
3641
  });
3534
3642
  }
3535
3643
  render() {
@@ -3557,11 +3665,14 @@ var SpectreDropdownElement = class extends SpectreBaseElement {
3557
3665
  }
3558
3666
  };
3559
3667
  SpectreDropdownElement.properties = {
3668
+ accent: { type: String, reflect: true },
3669
+ accentColor: { attribute: "accent-color", type: String, reflect: true },
3560
3670
  fullWidth: { attribute: "full-width", type: Boolean, reflect: true },
3561
3671
  mega: { type: Boolean, reflect: true },
3562
3672
  open: { type: Boolean, reflect: true },
3563
3673
  placement: { type: String, reflect: true },
3564
- triggerLabel: { attribute: "trigger-label", type: String }
3674
+ triggerLabel: { attribute: "trigger-label", type: String },
3675
+ viewport: { type: Boolean, reflect: true }
3565
3676
  };
3566
3677
  function defineSpectreDropdown(tagName = "sp-dropdown") {
3567
3678
  const existingElement = customElements.get(tagName);
@@ -3574,6 +3685,8 @@ function defineSpectreDropdown(tagName = "sp-dropdown") {
3574
3685
  var SpectreFooterElement = class extends SpectreProjectableElement {
3575
3686
  constructor() {
3576
3687
  super(...arguments);
3688
+ this.accent = void 0;
3689
+ this.accentColor = void 0;
3577
3690
  this.bordered = false;
3578
3691
  this.fullWidth = false;
3579
3692
  this.innerClass = void 0;
@@ -3606,6 +3719,12 @@ var SpectreFooterElement = class extends SpectreProjectableElement {
3606
3719
  return el.hasAttribute("data-sp-footer-native");
3607
3720
  }
3608
3721
  willUpdate(changedProperties) {
3722
+ if (changedProperties.has("accent") && this.accent != null && !isAccentEdge(this.accent)) {
3723
+ this.accent = void 0;
3724
+ }
3725
+ if (changedProperties.has("accentColor") && this.accentColor != null && !isAccentColor(this.accentColor)) {
3726
+ this.accentColor = void 0;
3727
+ }
3609
3728
  if (changedProperties.has("bordered") && this.bordered == null) {
3610
3729
  this.bordered = false;
3611
3730
  }
@@ -3615,6 +3734,12 @@ var SpectreFooterElement = class extends SpectreProjectableElement {
3615
3734
  }
3616
3735
  get footerClasses() {
3617
3736
  const recipeClasses = getFooterClasses({
3737
+ ...this.accent !== void 0 && {
3738
+ accent: this.accent
3739
+ },
3740
+ ...this.accentColor !== void 0 && {
3741
+ accentColor: this.accentColor
3742
+ },
3618
3743
  bordered: this.bordered ?? false,
3619
3744
  fullWidth: this.fullWidth ?? false
3620
3745
  });
@@ -3634,6 +3759,8 @@ var SpectreFooterElement = class extends SpectreProjectableElement {
3634
3759
  }
3635
3760
  };
3636
3761
  SpectreFooterElement.properties = {
3762
+ accent: { type: String, reflect: true },
3763
+ accentColor: { attribute: "accent-color", type: String, reflect: true },
3637
3764
  bordered: { type: Boolean, reflect: true },
3638
3765
  fullWidth: { attribute: "full-width", type: Boolean, reflect: true },
3639
3766
  innerClass: { attribute: "inner-class", type: String }
@@ -3788,6 +3915,8 @@ var FOCUSABLE_SELECTOR = [
3788
3915
  var SpectreModalElement = class extends SpectreProjectableElement {
3789
3916
  constructor() {
3790
3917
  super(...arguments);
3918
+ this.accent = void 0;
3919
+ this.accentColor = void 0;
3791
3920
  this.fullWidth = false;
3792
3921
  this.open = false;
3793
3922
  this.previouslyFocusedElement = null;
@@ -3827,6 +3956,12 @@ var SpectreModalElement = class extends SpectreProjectableElement {
3827
3956
  return el.hasAttribute("data-sp-modal-native") || el.hasAttribute("data-sp-modal-overlay");
3828
3957
  }
3829
3958
  willUpdate(changedProperties) {
3959
+ if (changedProperties.has("accent") && this.accent != null && !isAccentEdge(this.accent)) {
3960
+ this.accent = void 0;
3961
+ }
3962
+ if (changedProperties.has("accentColor") && this.accentColor != null && !isAccentColor(this.accentColor)) {
3963
+ this.accentColor = void 0;
3964
+ }
3830
3965
  if (changedProperties.has("fullWidth") && this.fullWidth == null) {
3831
3966
  this.fullWidth = false;
3832
3967
  }
@@ -3898,6 +4033,12 @@ var SpectreModalElement = class extends SpectreProjectableElement {
3898
4033
  }
3899
4034
  get modalClasses() {
3900
4035
  return getModalClasses({
4036
+ ...this.accent !== void 0 && {
4037
+ accent: this.accent
4038
+ },
4039
+ ...this.accentColor !== void 0 && {
4040
+ accentColor: this.accentColor
4041
+ },
3901
4042
  open: this.open ?? false,
3902
4043
  fullWidth: this.fullWidth ?? false
3903
4044
  });
@@ -3933,6 +4074,8 @@ var SpectreModalElement = class extends SpectreProjectableElement {
3933
4074
  }
3934
4075
  };
3935
4076
  SpectreModalElement.properties = {
4077
+ accent: { type: String, reflect: true },
4078
+ accentColor: { attribute: "accent-color", type: String, reflect: true },
3936
4079
  fullWidth: { attribute: "full-width", type: Boolean, reflect: true },
3937
4080
  open: { type: Boolean, reflect: true }
3938
4081
  };
@@ -3947,6 +4090,8 @@ function defineSpectreModal(tagName = "sp-modal") {
3947
4090
  var SpectreNavElement = class extends SpectreProjectableElement {
3948
4091
  constructor() {
3949
4092
  super(...arguments);
4093
+ this.accent = void 0;
4094
+ this.accentColor = void 0;
3950
4095
  this.align = void 0;
3951
4096
  this.bordered = false;
3952
4097
  this.fullWidth = false;
@@ -3981,6 +4126,12 @@ var SpectreNavElement = class extends SpectreProjectableElement {
3981
4126
  return el.hasAttribute("data-sp-nav-native");
3982
4127
  }
3983
4128
  willUpdate(changedProperties) {
4129
+ if (changedProperties.has("accent") && this.accent != null && !isAccentEdge(this.accent)) {
4130
+ this.accent = void 0;
4131
+ }
4132
+ if (changedProperties.has("accentColor") && this.accentColor != null && !isAccentColor(this.accentColor)) {
4133
+ this.accentColor = void 0;
4134
+ }
3984
4135
  if (changedProperties.has("bordered") && this.bordered == null) {
3985
4136
  this.bordered = false;
3986
4137
  }
@@ -3996,6 +4147,12 @@ var SpectreNavElement = class extends SpectreProjectableElement {
3996
4147
  }
3997
4148
  get navClasses() {
3998
4149
  const recipeClasses = getNavClasses({
4150
+ ...this.accent !== void 0 && {
4151
+ accent: this.accent
4152
+ },
4153
+ ...this.accentColor !== void 0 && {
4154
+ accentColor: this.accentColor
4155
+ },
3999
4156
  bordered: this.bordered ?? false,
4000
4157
  fullWidth: this.fullWidth ?? false,
4001
4158
  sticky: this.sticky ?? false,
@@ -4017,6 +4174,8 @@ var SpectreNavElement = class extends SpectreProjectableElement {
4017
4174
  }
4018
4175
  };
4019
4176
  SpectreNavElement.properties = {
4177
+ accent: { type: String, reflect: true },
4178
+ accentColor: { attribute: "accent-color", type: String, reflect: true },
4020
4179
  align: { type: String, reflect: true },
4021
4180
  bordered: { type: Boolean, reflect: true },
4022
4181
  fullWidth: { attribute: "full-width", type: Boolean, reflect: true },
@@ -4567,6 +4726,8 @@ function defineSpectreSidebarToggle(tagName = "sp-sidebar-toggle") {
4567
4726
  var SpectreToastElement = class extends SpectreBaseElement {
4568
4727
  constructor() {
4569
4728
  super(...arguments);
4729
+ this.accent = void 0;
4730
+ this.accentColor = void 0;
4570
4731
  this.dismissed = false;
4571
4732
  this.fullWidth = false;
4572
4733
  this.variant = "info";
@@ -4650,6 +4811,12 @@ var SpectreToastElement = class extends SpectreBaseElement {
4650
4811
  this.contentObserver = void 0;
4651
4812
  }
4652
4813
  willUpdate(changedProperties) {
4814
+ if (changedProperties.has("accent") && this.accent != null && !isAccentEdge(this.accent)) {
4815
+ this.accent = void 0;
4816
+ }
4817
+ if (changedProperties.has("accentColor") && this.accentColor != null && !isAccentColor(this.accentColor)) {
4818
+ this.accentColor = void 0;
4819
+ }
4653
4820
  if (changedProperties.has("dismissed") && this.dismissed == null) {
4654
4821
  this.dismissed = false;
4655
4822
  }
@@ -4696,6 +4863,12 @@ var SpectreToastElement = class extends SpectreBaseElement {
4696
4863
  }
4697
4864
  get toastClasses() {
4698
4865
  return getToastClasses({
4866
+ ...this.accent !== void 0 && {
4867
+ accent: this.accent
4868
+ },
4869
+ ...this.accentColor !== void 0 && {
4870
+ accentColor: this.accentColor
4871
+ },
4699
4872
  variant: this.variant,
4700
4873
  dismissed: this.dismissed ?? false,
4701
4874
  fullWidth: this.fullWidth ?? false
@@ -4723,6 +4896,8 @@ var SpectreToastElement = class extends SpectreBaseElement {
4723
4896
  }
4724
4897
  };
4725
4898
  SpectreToastElement.properties = {
4899
+ accent: { type: String, reflect: true },
4900
+ accentColor: { attribute: "accent-color", type: String, reflect: true },
4726
4901
  autoDismiss: { attribute: "auto-dismiss", type: Number },
4727
4902
  dismissed: { type: Boolean, reflect: true },
4728
4903
  fullWidth: { attribute: "full-width", type: Boolean, reflect: true },
@@ -4739,6 +4914,8 @@ function defineSpectreToast(tagName = "sp-toast") {
4739
4914
  var SpectreTooltipElement = class extends SpectreBaseElement {
4740
4915
  constructor() {
4741
4916
  super(...arguments);
4917
+ this.accent = void 0;
4918
+ this.accentColor = void 0;
4742
4919
  this.placement = "top";
4743
4920
  this.visible = false;
4744
4921
  this.triggerContent = [];
@@ -4827,6 +5004,12 @@ var SpectreTooltipElement = class extends SpectreBaseElement {
4827
5004
  this.contentObserver = void 0;
4828
5005
  }
4829
5006
  willUpdate(changedProperties) {
5007
+ if (changedProperties.has("accent") && this.accent != null && !isAccentEdge(this.accent)) {
5008
+ this.accent = void 0;
5009
+ }
5010
+ if (changedProperties.has("accentColor") && this.accentColor != null && !isAccentColor(this.accentColor)) {
5011
+ this.accentColor = void 0;
5012
+ }
4830
5013
  if (changedProperties.has("placement") && (this.placement == null || !isTooltipPlacement(this.placement))) {
4831
5014
  this.placement = "top";
4832
5015
  }
@@ -4850,6 +5033,12 @@ var SpectreTooltipElement = class extends SpectreBaseElement {
4850
5033
  }
4851
5034
  get tooltipClasses() {
4852
5035
  return getTooltipClasses({
5036
+ ...this.accent !== void 0 && {
5037
+ accent: this.accent
5038
+ },
5039
+ ...this.accentColor !== void 0 && {
5040
+ accentColor: this.accentColor
5041
+ },
4853
5042
  placement: this.placement,
4854
5043
  visible: this.visible ?? false
4855
5044
  });
@@ -4877,6 +5066,8 @@ var SpectreTooltipElement = class extends SpectreBaseElement {
4877
5066
  }
4878
5067
  };
4879
5068
  SpectreTooltipElement.properties = {
5069
+ accent: { type: String, reflect: true },
5070
+ accentColor: { attribute: "accent-color", type: String, reflect: true },
4880
5071
  placement: { type: String, reflect: true },
4881
5072
  visible: { type: Boolean, reflect: true }
4882
5073
  };
@@ -5018,6 +5209,6 @@ function defineSpectreComponents() {
5018
5209
  defineSpectreText();
5019
5210
  }
5020
5211
 
5021
- 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, spectreGridAligns, spectreGridColumns, spectreGridGaps, spectreInputSizes as spectreIconBoxSizes, spectreIconBoxVariants, spectreInputSizes, spectreInputTypes, spectreInputSizes as spectreRatingSizes, spectreInputSizes as spectreSpinnerSizes, spectreSpinnerVariants, spectreStackAligns, spectreStackBases, spectreStackDirections, spectreStackGaps, spectreInputSizes as spectreTagSizes, spectreTagVariants, spectreTestimonialVariants, spectreTextFamilies, spectreTextLevels, spectreTextSizes, spectreTextVariants, spectreToastVariants, spectreTooltipPlacements };
5212
+ 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, spectreAccentColors as spectreCardAccentColors, spectreAccentEdges as spectreCardAccentEdges, spectreCardVariants, spectreContainerMaxWidths, spectreDropdownPlacements, spectreGridAligns, spectreGridColumns, spectreGridGaps, spectreInputSizes as spectreIconBoxSizes, spectreIconBoxVariants, spectreInputSizes, spectreInputTypes, spectreInputSizes as spectreRatingSizes, spectreInputSizes as spectreSpinnerSizes, spectreSpinnerVariants, spectreStackAligns, spectreStackBases, spectreStackDirections, spectreStackGaps, spectreInputSizes as spectreTagSizes, spectreTagVariants, spectreTestimonialVariants, spectreTextFamilies, spectreTextLevels, spectreTextSizes, spectreTextVariants, spectreToastVariants, spectreTooltipPlacements };
5022
5213
  //# sourceMappingURL=index.js.map
5023
5214
  //# sourceMappingURL=index.js.map