@jumpgroup/jump-design-system 0.3.59 → 0.3.63

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 (225) hide show
  1. package/dist/cjs/chunk.H33C3MRM-31110702.js +365 -0
  2. package/dist/cjs/chunk.H33C3MRM-31110702.js.map +1 -0
  3. package/dist/cjs/chunk.WLV3FVBR-bfad29d7.js +238 -0
  4. package/dist/cjs/chunk.WLV3FVBR-bfad29d7.js.map +1 -0
  5. package/dist/cjs/{class-map-b27ebf69.js → class-map-010ed95d.js} +3 -3
  6. package/dist/cjs/{class-map-b27ebf69.js.map → class-map-010ed95d.js.map} +1 -1
  7. package/dist/cjs/{chunk.H33C3MRM-2c09acb5.js → directive-helpers-b6926fa1.js} +2 -360
  8. package/dist/cjs/directive-helpers-b6926fa1.js.map +1 -0
  9. package/dist/cjs/if-defined-da1385f1.js +432 -0
  10. package/dist/cjs/if-defined-da1385f1.js.map +1 -0
  11. package/dist/cjs/{index-e91b2b41.js → index-864e40de.js} +5 -2
  12. package/dist/cjs/index-864e40de.js.map +1 -0
  13. package/dist/cjs/jump-accordion-group.cjs.entry.js +1 -1
  14. package/dist/cjs/jump-accordion.cjs.entry.js +32 -255
  15. package/dist/cjs/jump-accordion.cjs.entry.js.map +1 -1
  16. package/dist/cjs/jump-badge.cjs.entry.js +1 -1
  17. package/dist/cjs/jump-button_2.cjs.entry.js +3 -2
  18. package/dist/cjs/jump-button_2.cjs.entry.js.map +1 -1
  19. package/dist/cjs/jump-card-ecommerce-option.cjs.entry.js +1 -1
  20. package/dist/cjs/jump-card-ecommerce.cjs.entry.js +1 -1
  21. package/dist/cjs/jump-card.cjs.entry.js +1 -1
  22. package/dist/cjs/jump-design-system.cjs.js +2 -2
  23. package/dist/cjs/jump-filter-checkbox.cjs.entry.js +46 -470
  24. package/dist/cjs/jump-filter-checkbox.cjs.entry.js.map +1 -1
  25. package/dist/cjs/jump-filter-select.cjs.entry.js +4229 -0
  26. package/dist/cjs/jump-filter-select.cjs.entry.js.map +1 -0
  27. package/dist/cjs/jump-filter-switch.cjs.entry.js +440 -0
  28. package/dist/cjs/jump-filter-switch.cjs.entry.js.map +1 -0
  29. package/dist/cjs/jump-filter.cjs.entry.js +1 -1
  30. package/dist/cjs/jump-filtergroup.cjs.entry.js +4 -4
  31. package/dist/cjs/jump-navbar.cjs.entry.js +6 -6
  32. package/dist/cjs/jump-pagination-table.cjs.entry.js +4 -4
  33. package/dist/cjs/jump-pagination.cjs.entry.js +4 -4
  34. package/dist/cjs/jump-quantity.cjs.entry.js +4 -4
  35. package/dist/cjs/jump-search-bar-dropdown-item.cjs.entry.js +2 -2
  36. package/dist/cjs/jump-search-bar-mobile.cjs.entry.js +5 -5
  37. package/dist/cjs/jump-search-bar.cjs.entry.js +1 -1
  38. package/dist/cjs/jump-tab-item.cjs.entry.js +3 -3
  39. package/dist/cjs/jump-tab-panel.cjs.entry.js +2 -2
  40. package/dist/cjs/jump-tab.cjs.entry.js +2 -2
  41. package/dist/cjs/live-a9a3fb36.js +14 -0
  42. package/dist/cjs/live-a9a3fb36.js.map +1 -0
  43. package/dist/cjs/loader.cjs.js +2 -2
  44. package/dist/collection/collection-manifest.json +2 -0
  45. package/dist/collection/components/jump-filter-checkbox/jump-filter-checkbox.stories.js +0 -5
  46. package/dist/collection/components/jump-filter-checkbox/jump-filter-checkbox.stories.js.map +1 -1
  47. package/dist/collection/components/jump-filter-select/jump-filter-select.css +578 -0
  48. package/dist/collection/components/jump-filter-select/jump-filter-select.js +373 -0
  49. package/dist/collection/components/jump-filter-select/jump-filter-select.js.map +1 -0
  50. package/dist/collection/components/jump-filter-select/jump-filter-select.stories.js +211 -0
  51. package/dist/collection/components/jump-filter-switch/jump-filter-switch.css +536 -0
  52. package/dist/collection/components/jump-filter-switch/jump-filter-switch.js +175 -0
  53. package/dist/collection/components/jump-filter-switch/jump-filter-switch.js.map +1 -0
  54. package/dist/collection/components/jump-filter-switch/jump-filter-switch.stories.js +68 -0
  55. package/dist/collection/components/jump-filter-switch/jump-filter-switch.stories.js.map +1 -0
  56. package/dist/collection/components/jump-filtergroup/jump-filtergroup.js +3 -3
  57. package/dist/collection/components/jump-navbar/jump-navbar.js +5 -5
  58. package/dist/collection/components/jump-pagination/jump-pagination.js +3 -3
  59. package/dist/collection/components/jump-pagination-table/jump-pagination-table.js +3 -3
  60. package/dist/collection/components/jump-quantity/jump-quantity.js +3 -3
  61. package/dist/collection/components/jump-search-bar-dropdown-item/jump-search-bar-dropdown-item.js +1 -1
  62. package/dist/collection/components/jump-search-bar-mobile/jump-search-bar-mobile.js +4 -4
  63. package/dist/collection/components/jump-tab/jump-tab.js +1 -1
  64. package/dist/collection/components/jump-tab-item/jump-tab-item.js +2 -2
  65. package/dist/collection/components/jump-tab-panel/jump-tab-panel.js +1 -1
  66. package/dist/components/chunk.H33C3MRM.js +3 -170
  67. package/dist/components/chunk.H33C3MRM.js.map +1 -1
  68. package/dist/components/chunk.WLV3FVBR.js +230 -0
  69. package/dist/components/chunk.WLV3FVBR.js.map +1 -0
  70. package/dist/components/class-map.js +1 -1
  71. package/dist/{esm/chunk.H33C3MRM-632f8755.js → components/directive-helpers.js} +2 -359
  72. package/dist/components/directive-helpers.js.map +1 -0
  73. package/dist/components/if-defined.js +426 -0
  74. package/dist/components/if-defined.js.map +1 -0
  75. package/dist/components/jump-accordion.js +3 -226
  76. package/dist/components/jump-accordion.js.map +1 -1
  77. package/dist/components/jump-filter-checkbox.js +8 -432
  78. package/dist/components/jump-filter-checkbox.js.map +1 -1
  79. package/dist/components/jump-filter-select.d.ts +11 -0
  80. package/dist/components/jump-filter-select.js +4257 -0
  81. package/dist/components/jump-filter-select.js.map +1 -0
  82. package/dist/components/jump-filter-switch.d.ts +11 -0
  83. package/dist/components/jump-filter-switch.js +460 -0
  84. package/dist/components/jump-filter-switch.js.map +1 -0
  85. package/dist/components/jump-filtergroup.js +3 -3
  86. package/dist/components/jump-icon2.js +1 -0
  87. package/dist/components/jump-icon2.js.map +1 -1
  88. package/dist/components/jump-navbar.js +5 -5
  89. package/dist/components/jump-pagination-table.js +3 -3
  90. package/dist/components/jump-pagination.js +3 -3
  91. package/dist/components/jump-quantity.js +3 -3
  92. package/dist/components/jump-search-bar-dropdown-item.js +1 -1
  93. package/dist/components/jump-search-bar-mobile.js +4 -4
  94. package/dist/components/jump-tab-item.js +2 -2
  95. package/dist/components/jump-tab-panel.js +1 -1
  96. package/dist/components/jump-tab.js +1 -1
  97. package/dist/components/live.js +12 -0
  98. package/dist/components/live.js.map +1 -0
  99. package/dist/esm/chunk.H33C3MRM-7dcbd943.js +362 -0
  100. package/dist/esm/chunk.H33C3MRM-7dcbd943.js.map +1 -0
  101. package/dist/esm/chunk.WLV3FVBR-ded9a646.js +230 -0
  102. package/dist/esm/chunk.WLV3FVBR-ded9a646.js.map +1 -0
  103. package/dist/esm/{class-map-3150cdfe.js → class-map-a2676e27.js} +2 -2
  104. package/dist/esm/{class-map-3150cdfe.js.map → class-map-a2676e27.js.map} +1 -1
  105. package/dist/esm/directive-helpers-d80c2187.js +172 -0
  106. package/dist/esm/directive-helpers-d80c2187.js.map +1 -0
  107. package/dist/esm/if-defined-85ab7b97.js +426 -0
  108. package/dist/esm/if-defined-85ab7b97.js.map +1 -0
  109. package/dist/esm/{index-9a1da0f0.js → index-7eb565cd.js} +5 -2
  110. package/dist/esm/index-7eb565cd.js.map +1 -0
  111. package/dist/esm/jump-accordion-group.entry.js +1 -1
  112. package/dist/esm/jump-accordion.entry.js +5 -228
  113. package/dist/esm/jump-accordion.entry.js.map +1 -1
  114. package/dist/esm/jump-badge.entry.js +1 -1
  115. package/dist/esm/jump-button_2.entry.js +3 -2
  116. package/dist/esm/jump-button_2.entry.js.map +1 -1
  117. package/dist/esm/jump-card-ecommerce-option.entry.js +1 -1
  118. package/dist/esm/jump-card-ecommerce.entry.js +1 -1
  119. package/dist/esm/jump-card.entry.js +1 -1
  120. package/dist/esm/jump-design-system.js +3 -3
  121. package/dist/esm/jump-filter-checkbox.entry.js +9 -433
  122. package/dist/esm/jump-filter-checkbox.entry.js.map +1 -1
  123. package/dist/esm/jump-filter-select.entry.js +4225 -0
  124. package/dist/esm/jump-filter-select.entry.js.map +1 -0
  125. package/dist/esm/jump-filter-switch.entry.js +436 -0
  126. package/dist/esm/jump-filter-switch.entry.js.map +1 -0
  127. package/dist/esm/jump-filter.entry.js +1 -1
  128. package/dist/esm/jump-filtergroup.entry.js +4 -4
  129. package/dist/esm/jump-navbar.entry.js +6 -6
  130. package/dist/esm/jump-pagination-table.entry.js +4 -4
  131. package/dist/esm/jump-pagination.entry.js +4 -4
  132. package/dist/esm/jump-quantity.entry.js +4 -4
  133. package/dist/esm/jump-search-bar-dropdown-item.entry.js +2 -2
  134. package/dist/esm/jump-search-bar-mobile.entry.js +5 -5
  135. package/dist/esm/jump-search-bar.entry.js +1 -1
  136. package/dist/esm/jump-tab-item.entry.js +3 -3
  137. package/dist/esm/jump-tab-panel.entry.js +2 -2
  138. package/dist/esm/jump-tab.entry.js +2 -2
  139. package/dist/esm/live-253d6806.js +12 -0
  140. package/dist/esm/live-253d6806.js.map +1 -0
  141. package/dist/esm/loader.js +3 -3
  142. package/dist/jump-design-system/jump-design-system.esm.js +1 -1
  143. package/dist/jump-design-system/jump-design-system.esm.js.map +1 -1
  144. package/dist/jump-design-system/p-0cbcc5b3.entry.js +2 -0
  145. package/dist/jump-design-system/p-1b31e36f.js +17 -0
  146. package/dist/jump-design-system/p-1b31e36f.js.map +1 -0
  147. package/dist/jump-design-system/{p-2e2bd8a9.entry.js → p-201c09dd.entry.js} +2 -2
  148. package/dist/jump-design-system/p-35633b03.entry.js +848 -0
  149. package/dist/jump-design-system/p-35633b03.entry.js.map +1 -0
  150. package/dist/jump-design-system/p-39b82674.entry.js +2 -0
  151. package/dist/jump-design-system/{p-feb825e0.entry.js → p-3b4127b0.entry.js} +2 -2
  152. package/dist/jump-design-system/{p-6b1ab8c3.entry.js → p-3e31b638.entry.js} +2 -2
  153. package/dist/jump-design-system/p-53bf2958.entry.js +213 -0
  154. package/dist/jump-design-system/p-53bf2958.entry.js.map +1 -0
  155. package/dist/jump-design-system/p-67339850.js +63 -0
  156. package/dist/jump-design-system/p-67339850.js.map +1 -0
  157. package/dist/jump-design-system/{p-f7c323d2.entry.js → p-7dd5052b.entry.js} +2 -2
  158. package/dist/jump-design-system/p-8d1d2af9.entry.js +117 -0
  159. package/dist/jump-design-system/p-8d1d2af9.entry.js.map +1 -0
  160. package/dist/jump-design-system/p-8e0419b1.entry.js +2 -0
  161. package/dist/jump-design-system/{p-6dc529fc.entry.js → p-90c51b48.entry.js} +2 -2
  162. package/dist/jump-design-system/p-926c7bf0.entry.js +2 -0
  163. package/dist/jump-design-system/p-94229ed5.js +7 -0
  164. package/dist/jump-design-system/p-94229ed5.js.map +1 -0
  165. package/dist/jump-design-system/{p-02e863db.entry.js → p-94790673.entry.js} +2 -2
  166. package/dist/jump-design-system/{p-466e0ade.entry.js → p-947d7f9a.entry.js} +2 -2
  167. package/dist/jump-design-system/p-95a1bbc5.js +51 -0
  168. package/dist/jump-design-system/p-95a1bbc5.js.map +1 -0
  169. package/dist/jump-design-system/p-98ef4924.entry.js +2 -0
  170. package/dist/jump-design-system/{p-3f6d50d5.entry.js.map → p-98ef4924.entry.js.map} +1 -1
  171. package/dist/jump-design-system/{p-198cfe62.js → p-9d21c18a.js} +2 -2
  172. package/dist/jump-design-system/p-a05d9480.entry.js +178 -0
  173. package/dist/jump-design-system/p-a05d9480.entry.js.map +1 -0
  174. package/dist/jump-design-system/{p-a9b78af2.entry.js → p-ad550de6.entry.js} +2 -2
  175. package/dist/jump-design-system/{p-1aa5fb8a.entry.js → p-d3b62e9b.entry.js} +2 -2
  176. package/dist/jump-design-system/{p-bdafe87d.entry.js → p-d8bfd21c.entry.js} +2 -2
  177. package/dist/jump-design-system/{p-a1c25113.entry.js → p-d94fabc1.entry.js} +2 -2
  178. package/dist/jump-design-system/p-e516e812.js +3 -0
  179. package/dist/jump-design-system/p-e516e812.js.map +1 -0
  180. package/dist/jump-design-system/p-f2d287d6.js +2 -0
  181. package/dist/jump-design-system/p-f2d287d6.js.map +1 -0
  182. package/dist/jump-design-system/{p-2e7c10a5.entry.js → p-fa0dcb05.entry.js} +2 -2
  183. package/dist/jump-design-system/{p-07633158.entry.js → p-ff8d70ab.entry.js} +2 -2
  184. package/dist/jump-design-system-elements.json +66 -0
  185. package/dist/types/components/jump-filter-checkbox/jump-filter-checkbox.stories.d.ts +0 -5
  186. package/dist/types/components/jump-filter-select/jump-filter-select.d.ts +76 -0
  187. package/dist/types/components/jump-filter-switch/jump-filter-switch.d.ts +35 -0
  188. package/dist/types/components/jump-filter-switch/jump-filter-switch.stories.d.ts +24 -0
  189. package/dist/types/components.d.ts +206 -0
  190. package/package.json +1 -1
  191. package/dist/cjs/chunk.H33C3MRM-2c09acb5.js.map +0 -1
  192. package/dist/cjs/index-e91b2b41.js.map +0 -1
  193. package/dist/esm/chunk.H33C3MRM-632f8755.js.map +0 -1
  194. package/dist/esm/index-9a1da0f0.js.map +0 -1
  195. package/dist/jump-design-system/p-21aa0095.js +0 -3
  196. package/dist/jump-design-system/p-21aa0095.js.map +0 -1
  197. package/dist/jump-design-system/p-3f6d50d5.entry.js +0 -2
  198. package/dist/jump-design-system/p-6e7c80a3.entry.js +0 -244
  199. package/dist/jump-design-system/p-6e7c80a3.entry.js.map +0 -1
  200. package/dist/jump-design-system/p-842fff70.entry.js +0 -117
  201. package/dist/jump-design-system/p-842fff70.entry.js.map +0 -1
  202. package/dist/jump-design-system/p-8f581228.entry.js +0 -2
  203. package/dist/jump-design-system/p-a826c477.entry.js +0 -2
  204. package/dist/jump-design-system/p-b03c5b24.entry.js +0 -2
  205. package/dist/jump-design-system/p-c77d216c.entry.js +0 -2
  206. package/dist/jump-design-system/p-d33f4f1d.js +0 -66
  207. package/dist/jump-design-system/p-d33f4f1d.js.map +0 -1
  208. /package/dist/jump-design-system/{p-b03c5b24.entry.js.map → p-0cbcc5b3.entry.js.map} +0 -0
  209. /package/dist/jump-design-system/{p-2e2bd8a9.entry.js.map → p-201c09dd.entry.js.map} +0 -0
  210. /package/dist/jump-design-system/{p-8f581228.entry.js.map → p-39b82674.entry.js.map} +0 -0
  211. /package/dist/jump-design-system/{p-feb825e0.entry.js.map → p-3b4127b0.entry.js.map} +0 -0
  212. /package/dist/jump-design-system/{p-6b1ab8c3.entry.js.map → p-3e31b638.entry.js.map} +0 -0
  213. /package/dist/jump-design-system/{p-f7c323d2.entry.js.map → p-7dd5052b.entry.js.map} +0 -0
  214. /package/dist/jump-design-system/{p-c77d216c.entry.js.map → p-8e0419b1.entry.js.map} +0 -0
  215. /package/dist/jump-design-system/{p-6dc529fc.entry.js.map → p-90c51b48.entry.js.map} +0 -0
  216. /package/dist/jump-design-system/{p-a826c477.entry.js.map → p-926c7bf0.entry.js.map} +0 -0
  217. /package/dist/jump-design-system/{p-02e863db.entry.js.map → p-94790673.entry.js.map} +0 -0
  218. /package/dist/jump-design-system/{p-466e0ade.entry.js.map → p-947d7f9a.entry.js.map} +0 -0
  219. /package/dist/jump-design-system/{p-198cfe62.js.map → p-9d21c18a.js.map} +0 -0
  220. /package/dist/jump-design-system/{p-a9b78af2.entry.js.map → p-ad550de6.entry.js.map} +0 -0
  221. /package/dist/jump-design-system/{p-1aa5fb8a.entry.js.map → p-d3b62e9b.entry.js.map} +0 -0
  222. /package/dist/jump-design-system/{p-bdafe87d.entry.js.map → p-d8bfd21c.entry.js.map} +0 -0
  223. /package/dist/jump-design-system/{p-a1c25113.entry.js.map → p-d94fabc1.entry.js.map} +0 -0
  224. /package/dist/jump-design-system/{p-2e7c10a5.entry.js.map → p-fa0dcb05.entry.js.map} +0 -0
  225. /package/dist/jump-design-system/{p-07633158.entry.js.map → p-ff8d70ab.entry.js.map} +0 -0
@@ -1,6 +1,9 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-9a1da0f0.js';
2
- import { i, u, _ as __spreadProps, a as __spreadValues, T, f, e as w, m, c as component_styles_default, S as SlIcon, b as __decorateClass, w as watch, d as ShoelaceElement, x, r, n } from './chunk.H33C3MRM-632f8755.js';
3
- import { b as e, i as i$1, t, e as e$1, a as e$2 } from './class-map-3150cdfe.js';
1
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-7eb565cd.js';
2
+ import { i, c as component_styles_default, _ as __decorateClass, w as watch, S as ShoelaceElement, x, r, n } from './directive-helpers-d80c2187.js';
3
+ import { f as form_control_styles_default, F as FormControlController, H as HasSlotController, o, d as defaultValue } from './if-defined-85ab7b97.js';
4
+ import { S as SlIcon } from './chunk.H33C3MRM-7dcbd943.js';
5
+ import { e, a as e$1 } from './class-map-a2676e27.js';
6
+ import { l } from './live-253d6806.js';
4
7
 
5
8
  // src/components/checkbox/checkbox.styles.ts
6
9
  var checkbox_styles_default = i`
@@ -123,433 +126,6 @@ var checkbox_styles_default = i`
123
126
  }
124
127
  `;
125
128
 
126
- // src/internal/default-value.ts
127
- var defaultValue = (propertyName = "value") => (proto, key) => {
128
- const ctor = proto.constructor;
129
- const attributeChangedCallback = ctor.prototype.attributeChangedCallback;
130
- ctor.prototype.attributeChangedCallback = function(name, old, value) {
131
- var _a;
132
- const options = ctor.getPropertyOptions(propertyName);
133
- const attributeName = typeof options.attribute === "string" ? options.attribute : propertyName;
134
- if (name === attributeName) {
135
- const converter = options.converter || u;
136
- const fromAttribute = typeof converter === "function" ? converter : (_a = converter == null ? void 0 : converter.fromAttribute) != null ? _a : u.fromAttribute;
137
- const newValue = fromAttribute(value, options.type);
138
- if (this[propertyName] !== newValue) {
139
- this[key] = newValue;
140
- }
141
- }
142
- attributeChangedCallback.call(this, name, old, value);
143
- };
144
- };
145
-
146
- // src/styles/form-control.styles.ts
147
- var form_control_styles_default = i`
148
- .form-control .form-control__label {
149
- display: none;
150
- }
151
-
152
- .form-control .form-control__help-text {
153
- display: none;
154
- }
155
-
156
- /* Label */
157
- .form-control--has-label .form-control__label {
158
- display: inline-block;
159
- color: var(--sl-input-label-color);
160
- margin-bottom: var(--sl-spacing-3x-small);
161
- }
162
-
163
- .form-control--has-label.form-control--small .form-control__label {
164
- font-size: var(--sl-input-label-font-size-small);
165
- }
166
-
167
- .form-control--has-label.form-control--medium .form-control__label {
168
- font-size: var(--sl-input-label-font-size-medium);
169
- }
170
-
171
- .form-control--has-label.form-control--large .form-control__label {
172
- font-size: var(--sl-input-label-font-size-large);
173
- }
174
-
175
- :host([required]) .form-control--has-label .form-control__label::after {
176
- content: var(--sl-input-required-content);
177
- margin-inline-start: var(--sl-input-required-content-offset);
178
- color: var(--sl-input-required-content-color);
179
- }
180
-
181
- /* Help text */
182
- .form-control--has-help-text .form-control__help-text {
183
- display: block;
184
- color: var(--sl-input-help-text-color);
185
- margin-top: var(--sl-spacing-3x-small);
186
- }
187
-
188
- .form-control--has-help-text.form-control--small .form-control__help-text {
189
- font-size: var(--sl-input-help-text-font-size-small);
190
- }
191
-
192
- .form-control--has-help-text.form-control--medium .form-control__help-text {
193
- font-size: var(--sl-input-help-text-font-size-medium);
194
- }
195
-
196
- .form-control--has-help-text.form-control--large .form-control__help-text {
197
- font-size: var(--sl-input-help-text-font-size-large);
198
- }
199
-
200
- .form-control--has-help-text.form-control--radio-group .form-control__help-text {
201
- margin-top: var(--sl-spacing-2x-small);
202
- }
203
- `;
204
-
205
- // src/internal/form.ts
206
- var formCollections = /* @__PURE__ */ new WeakMap();
207
- var reportValidityOverloads = /* @__PURE__ */ new WeakMap();
208
- var checkValidityOverloads = /* @__PURE__ */ new WeakMap();
209
- var userInteractedControls = /* @__PURE__ */ new WeakSet();
210
- var interactions = /* @__PURE__ */ new WeakMap();
211
- var FormControlController = class {
212
- constructor(host, options) {
213
- this.handleFormData = (event) => {
214
- const disabled = this.options.disabled(this.host);
215
- const name = this.options.name(this.host);
216
- const value = this.options.value(this.host);
217
- const isButton = this.host.tagName.toLowerCase() === "sl-button";
218
- if (this.host.isConnected && !disabled && !isButton && typeof name === "string" && name.length > 0 && typeof value !== "undefined") {
219
- if (Array.isArray(value)) {
220
- value.forEach((val) => {
221
- event.formData.append(name, val.toString());
222
- });
223
- } else {
224
- event.formData.append(name, value.toString());
225
- }
226
- }
227
- };
228
- this.handleFormSubmit = (event) => {
229
- var _a;
230
- const disabled = this.options.disabled(this.host);
231
- const reportValidity = this.options.reportValidity;
232
- if (this.form && !this.form.noValidate) {
233
- (_a = formCollections.get(this.form)) == null ? void 0 : _a.forEach((control) => {
234
- this.setUserInteracted(control, true);
235
- });
236
- }
237
- if (this.form && !this.form.noValidate && !disabled && !reportValidity(this.host)) {
238
- event.preventDefault();
239
- event.stopImmediatePropagation();
240
- }
241
- };
242
- this.handleFormReset = () => {
243
- this.options.setValue(this.host, this.options.defaultValue(this.host));
244
- this.setUserInteracted(this.host, false);
245
- interactions.set(this.host, []);
246
- };
247
- this.handleInteraction = (event) => {
248
- const emittedEvents = interactions.get(this.host);
249
- if (!emittedEvents.includes(event.type)) {
250
- emittedEvents.push(event.type);
251
- }
252
- if (emittedEvents.length === this.options.assumeInteractionOn.length) {
253
- this.setUserInteracted(this.host, true);
254
- }
255
- };
256
- this.checkFormValidity = () => {
257
- if (this.form && !this.form.noValidate) {
258
- const elements = this.form.querySelectorAll("*");
259
- for (const element of elements) {
260
- if (typeof element.checkValidity === "function") {
261
- if (!element.checkValidity()) {
262
- return false;
263
- }
264
- }
265
- }
266
- }
267
- return true;
268
- };
269
- this.reportFormValidity = () => {
270
- if (this.form && !this.form.noValidate) {
271
- const elements = this.form.querySelectorAll("*");
272
- for (const element of elements) {
273
- if (typeof element.reportValidity === "function") {
274
- if (!element.reportValidity()) {
275
- return false;
276
- }
277
- }
278
- }
279
- }
280
- return true;
281
- };
282
- (this.host = host).addController(this);
283
- this.options = __spreadValues({
284
- form: (input) => {
285
- const formId = input.form;
286
- if (formId) {
287
- const root = input.getRootNode();
288
- const form = root.querySelector(`#${formId}`);
289
- if (form) {
290
- return form;
291
- }
292
- }
293
- return input.closest("form");
294
- },
295
- name: (input) => input.name,
296
- value: (input) => input.value,
297
- defaultValue: (input) => input.defaultValue,
298
- disabled: (input) => {
299
- var _a;
300
- return (_a = input.disabled) != null ? _a : false;
301
- },
302
- reportValidity: (input) => typeof input.reportValidity === "function" ? input.reportValidity() : true,
303
- checkValidity: (input) => typeof input.checkValidity === "function" ? input.checkValidity() : true,
304
- setValue: (input, value) => input.value = value,
305
- assumeInteractionOn: ["sl-input"]
306
- }, options);
307
- }
308
- hostConnected() {
309
- const form = this.options.form(this.host);
310
- if (form) {
311
- this.attachForm(form);
312
- }
313
- interactions.set(this.host, []);
314
- this.options.assumeInteractionOn.forEach((event) => {
315
- this.host.addEventListener(event, this.handleInteraction);
316
- });
317
- }
318
- hostDisconnected() {
319
- this.detachForm();
320
- interactions.delete(this.host);
321
- this.options.assumeInteractionOn.forEach((event) => {
322
- this.host.removeEventListener(event, this.handleInteraction);
323
- });
324
- }
325
- hostUpdated() {
326
- const form = this.options.form(this.host);
327
- if (!form) {
328
- this.detachForm();
329
- }
330
- if (form && this.form !== form) {
331
- this.detachForm();
332
- this.attachForm(form);
333
- }
334
- if (this.host.hasUpdated) {
335
- this.setValidity(this.host.validity.valid);
336
- }
337
- }
338
- attachForm(form) {
339
- if (form) {
340
- this.form = form;
341
- if (formCollections.has(this.form)) {
342
- formCollections.get(this.form).add(this.host);
343
- } else {
344
- formCollections.set(this.form, /* @__PURE__ */ new Set([this.host]));
345
- }
346
- this.form.addEventListener("formdata", this.handleFormData);
347
- this.form.addEventListener("submit", this.handleFormSubmit);
348
- this.form.addEventListener("reset", this.handleFormReset);
349
- if (!reportValidityOverloads.has(this.form)) {
350
- reportValidityOverloads.set(this.form, this.form.reportValidity);
351
- this.form.reportValidity = () => this.reportFormValidity();
352
- }
353
- if (!checkValidityOverloads.has(this.form)) {
354
- checkValidityOverloads.set(this.form, this.form.checkValidity);
355
- this.form.checkValidity = () => this.checkFormValidity();
356
- }
357
- } else {
358
- this.form = void 0;
359
- }
360
- }
361
- detachForm() {
362
- if (!this.form)
363
- return;
364
- const formCollection = formCollections.get(this.form);
365
- if (!formCollection) {
366
- return;
367
- }
368
- formCollection.delete(this.host);
369
- if (formCollection.size <= 0) {
370
- this.form.removeEventListener("formdata", this.handleFormData);
371
- this.form.removeEventListener("submit", this.handleFormSubmit);
372
- this.form.removeEventListener("reset", this.handleFormReset);
373
- if (reportValidityOverloads.has(this.form)) {
374
- this.form.reportValidity = reportValidityOverloads.get(this.form);
375
- reportValidityOverloads.delete(this.form);
376
- }
377
- if (checkValidityOverloads.has(this.form)) {
378
- this.form.checkValidity = checkValidityOverloads.get(this.form);
379
- checkValidityOverloads.delete(this.form);
380
- }
381
- this.form = void 0;
382
- }
383
- }
384
- setUserInteracted(el, hasInteracted) {
385
- if (hasInteracted) {
386
- userInteractedControls.add(el);
387
- } else {
388
- userInteractedControls.delete(el);
389
- }
390
- el.requestUpdate();
391
- }
392
- doAction(type, submitter) {
393
- if (this.form) {
394
- const button = document.createElement("button");
395
- button.type = type;
396
- button.style.position = "absolute";
397
- button.style.width = "0";
398
- button.style.height = "0";
399
- button.style.clipPath = "inset(50%)";
400
- button.style.overflow = "hidden";
401
- button.style.whiteSpace = "nowrap";
402
- if (submitter) {
403
- button.name = submitter.name;
404
- button.value = submitter.value;
405
- ["formaction", "formenctype", "formmethod", "formnovalidate", "formtarget"].forEach((attr) => {
406
- if (submitter.hasAttribute(attr)) {
407
- button.setAttribute(attr, submitter.getAttribute(attr));
408
- }
409
- });
410
- }
411
- this.form.append(button);
412
- button.click();
413
- button.remove();
414
- }
415
- }
416
- /** Returns the associated `<form>` element, if one exists. */
417
- getForm() {
418
- var _a;
419
- return (_a = this.form) != null ? _a : null;
420
- }
421
- /** Resets the form, restoring all the control to their default value */
422
- reset(submitter) {
423
- this.doAction("reset", submitter);
424
- }
425
- /** Submits the form, triggering validation and form data injection. */
426
- submit(submitter) {
427
- this.doAction("submit", submitter);
428
- }
429
- /**
430
- * Synchronously sets the form control's validity. Call this when you know the future validity but need to update
431
- * the host element immediately, i.e. before Lit updates the component in the next update.
432
- */
433
- setValidity(isValid) {
434
- const host = this.host;
435
- const hasInteracted = Boolean(userInteractedControls.has(host));
436
- const required = Boolean(host.required);
437
- host.toggleAttribute("data-required", required);
438
- host.toggleAttribute("data-optional", !required);
439
- host.toggleAttribute("data-invalid", !isValid);
440
- host.toggleAttribute("data-valid", isValid);
441
- host.toggleAttribute("data-user-invalid", !isValid && hasInteracted);
442
- host.toggleAttribute("data-user-valid", isValid && hasInteracted);
443
- }
444
- /**
445
- * Updates the form control's validity based on the current value of `host.validity.valid`. Call this when anything
446
- * that affects constraint validation changes so the component receives the correct validity states.
447
- */
448
- updateValidity() {
449
- const host = this.host;
450
- this.setValidity(host.validity.valid);
451
- }
452
- /**
453
- * Dispatches a non-bubbling, cancelable custom event of type `sl-invalid`.
454
- * If the `sl-invalid` event will be cancelled then the original `invalid`
455
- * event (which may have been passed as argument) will also be cancelled.
456
- * If no original `invalid` event has been passed then the `sl-invalid`
457
- * event will be cancelled before being dispatched.
458
- */
459
- emitInvalidEvent(originalInvalidEvent) {
460
- const slInvalidEvent = new CustomEvent("sl-invalid", {
461
- bubbles: false,
462
- composed: false,
463
- cancelable: true,
464
- detail: {}
465
- });
466
- if (!originalInvalidEvent) {
467
- slInvalidEvent.preventDefault();
468
- }
469
- if (!this.host.dispatchEvent(slInvalidEvent)) {
470
- originalInvalidEvent == null ? void 0 : originalInvalidEvent.preventDefault();
471
- }
472
- }
473
- };
474
- var validValidityState = Object.freeze({
475
- badInput: false,
476
- customError: false,
477
- patternMismatch: false,
478
- rangeOverflow: false,
479
- rangeUnderflow: false,
480
- stepMismatch: false,
481
- tooLong: false,
482
- tooShort: false,
483
- typeMismatch: false,
484
- valid: true,
485
- valueMissing: false
486
- });
487
- Object.freeze(__spreadProps(__spreadValues({}, validValidityState), {
488
- valid: false,
489
- valueMissing: true
490
- }));
491
- Object.freeze(__spreadProps(__spreadValues({}, validValidityState), {
492
- valid: false,
493
- customError: true
494
- }));
495
-
496
- // src/internal/slot.ts
497
- var HasSlotController = class {
498
- constructor(host, ...slotNames) {
499
- this.slotNames = [];
500
- this.handleSlotChange = (event) => {
501
- const slot = event.target;
502
- if (this.slotNames.includes("[default]") && !slot.name || slot.name && this.slotNames.includes(slot.name)) {
503
- this.host.requestUpdate();
504
- }
505
- };
506
- (this.host = host).addController(this);
507
- this.slotNames = slotNames;
508
- }
509
- hasDefaultSlot() {
510
- return [...this.host.childNodes].some((node) => {
511
- if (node.nodeType === node.TEXT_NODE && node.textContent.trim() !== "") {
512
- return true;
513
- }
514
- if (node.nodeType === node.ELEMENT_NODE) {
515
- const el = node;
516
- const tagName = el.tagName.toLowerCase();
517
- if (tagName === "sl-visually-hidden") {
518
- return false;
519
- }
520
- if (!el.hasAttribute("slot")) {
521
- return true;
522
- }
523
- }
524
- return false;
525
- });
526
- }
527
- hasNamedSlot(name) {
528
- return this.host.querySelector(`:scope > [slot="${name}"]`) !== null;
529
- }
530
- test(slotName) {
531
- return slotName === "[default]" ? this.hasDefaultSlot() : this.hasNamedSlot(slotName);
532
- }
533
- hostConnected() {
534
- this.host.shadowRoot.addEventListener("slotchange", this.handleSlotChange);
535
- }
536
- hostDisconnected() {
537
- this.host.shadowRoot.removeEventListener("slotchange", this.handleSlotChange);
538
- }
539
- };
540
-
541
- /**
542
- * @license
543
- * Copyright 2018 Google LLC
544
- * SPDX-License-Identifier: BSD-3-Clause
545
- */const o=o=>o??T;
546
-
547
- /**
548
- * @license
549
- * Copyright 2020 Google LLC
550
- * SPDX-License-Identifier: BSD-3-Clause
551
- */const l=e(class extends i$1{constructor(r){if(super(r),r.type!==t.PROPERTY&&r.type!==t.ATTRIBUTE&&r.type!==t.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!f(r))throw Error("`live` bindings can only contain a single expression")}render(r){return r}update(i,[t$1]){if(t$1===w||t$1===T)return t$1;const o=i.element,l=i.name;if(i.type===t.PROPERTY){if(t$1===o[l])return w}else if(i.type===t.BOOLEAN_ATTRIBUTE){if(!!t$1===o.hasAttribute(l))return w}else if(i.type===t.ATTRIBUTE&&o.getAttribute(l)===t$1+"")return w;return m(i),t$1}});
552
-
553
129
  var SlCheckbox = class extends ShoelaceElement {
554
130
  constructor() {
555
131
  super(...arguments);
@@ -647,7 +223,7 @@ var SlCheckbox = class extends ShoelaceElement {
647
223
  const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;
648
224
  return x`
649
225
  <div
650
- class=${e$1({
226
+ class=${e({
651
227
  "form-control": true,
652
228
  "form-control--small": this.size === "small",
653
229
  "form-control--medium": this.size === "medium",
@@ -657,7 +233,7 @@ var SlCheckbox = class extends ShoelaceElement {
657
233
  >
658
234
  <label
659
235
  part="base"
660
- class=${e$1({
236
+ class=${e({
661
237
  checkbox: true,
662
238
  "checkbox--checked": this.checked,
663
239
  "checkbox--disabled": this.disabled,
@@ -724,7 +300,7 @@ var SlCheckbox = class extends ShoelaceElement {
724
300
  SlCheckbox.styles = [component_styles_default, form_control_styles_default, checkbox_styles_default];
725
301
  SlCheckbox.dependencies = { "sl-icon": SlIcon };
726
302
  __decorateClass([
727
- e$2('input[type="checkbox"]')
303
+ e$1('input[type="checkbox"]')
728
304
  ], SlCheckbox.prototype, "input", 2);
729
305
  __decorateClass([
730
306
  r()