@mozaic-ds/web-components 0.5.0 → 0.6.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 (198) hide show
  1. package/package.json +3 -3
  2. package/public/ClickOutside-63071e7a.js +1 -15
  3. package/public/ClickOutside-63071e7a.js.map +1 -1
  4. package/public/DataTableDefaultAction.nested-4da4dc44.js +1 -759
  5. package/public/DataTableDefaultAction.nested-4da4dc44.js.map +1 -1
  6. package/public/DataTableUtilities-60220c78.js +1 -370
  7. package/public/DataTableUtilities-60220c78.js.map +1 -1
  8. package/public/EventForward-8492ff62.js +1 -109
  9. package/public/EventForward-8492ff62.js.map +1 -1
  10. package/public/EventHandler-02058705.js +1 -15
  11. package/public/EventHandler-02058705.js.map +1 -1
  12. package/public/adeo/components/layer/Layer.js +1 -1
  13. package/public/adeo/components/layer/Layer.js.map +1 -1
  14. package/public/adeo/components/layer/Layer.svelte +2 -1
  15. package/public/adeo/components/phonenumber/PhoneNumber.js +1 -1
  16. package/public/adeo/components/phonenumber/PhoneNumber.js.map +1 -1
  17. package/public/adeo/components/phonenumber/PhoneNumber.svelte +72 -9
  18. package/public/adeo/components/quantityselector/QuantitySelector.js +1 -1
  19. package/public/adeo/components/quantityselector/QuantitySelector.js.map +1 -1
  20. package/public/adeo/components/quantityselector/QuantitySelector.svelte +6 -3
  21. package/public/array-5b770a93.js +1 -13
  22. package/public/array-5b770a93.js.map +1 -1
  23. package/public/axis-fbc0f7b5.js +1 -174
  24. package/public/axis-fbc0f7b5.js.map +1 -1
  25. package/public/band-d7a07d2c.js +1 -186
  26. package/public/band-d7a07d2c.js.map +1 -1
  27. package/public/bricoman/components/chart/Donut.js +1 -1
  28. package/public/bricoman/components/header/Header.js +1 -1
  29. package/public/bricoman/components/hero/Hero.js +1 -1
  30. package/public/bricoman/components/layer/Layer.js +1 -1
  31. package/public/bricoman/components/layer/Layer.js.map +1 -1
  32. package/public/bricoman/components/layer/Layer.svelte +2 -1
  33. package/public/bricoman/components/listbox/Listbox.js +1 -1
  34. package/public/bricoman/components/listbox/Listbox.nested.js +1 -1
  35. package/public/bricoman/components/phonenumber/PhoneNumber.js +1 -1
  36. package/public/bricoman/components/phonenumber/PhoneNumber.js.map +1 -1
  37. package/public/bricoman/components/phonenumber/PhoneNumber.svelte +72 -9
  38. package/public/bricoman/components/price/Price.js +1 -1
  39. package/public/bricoman/components/quantityselector/QuantitySelector.js +1 -1
  40. package/public/bricoman/components/quantityselector/QuantitySelector.js.map +1 -1
  41. package/public/bricoman/components/quantityselector/QuantitySelector.svelte +6 -3
  42. package/public/components/accordion/Accordion.js +1 -365
  43. package/public/components/accordion/Accordion.js.map +1 -1
  44. package/public/components/autocomplete/Autocomplete.js +1 -1515
  45. package/public/components/autocomplete/Autocomplete.js.map +1 -1
  46. package/public/components/badge/Badge.js +1 -155
  47. package/public/components/badge/Badge.js.map +1 -1
  48. package/public/components/badge/Badge.nested.js +1 -101
  49. package/public/components/badge/Badge.nested.js.map +1 -1
  50. package/public/components/breadcrumb/Breadcrumb.js +1 -372
  51. package/public/components/breadcrumb/Breadcrumb.js.map +1 -1
  52. package/public/components/breadcrumb/Breadcrumb.nested.js +1 -319
  53. package/public/components/breadcrumb/Breadcrumb.nested.js.map +1 -1
  54. package/public/components/button/Button.js +1 -1138
  55. package/public/components/button/Button.js.map +1 -1
  56. package/public/components/card/Card.js +1 -369
  57. package/public/components/card/Card.js.map +1 -1
  58. package/public/components/chart/BarChart.js +1 -582
  59. package/public/components/chart/BarChart.js.map +1 -1
  60. package/public/components/chart/Donut.js +1 -1189
  61. package/public/components/chart/Donut.js.map +1 -1
  62. package/public/components/chart/GroupedBarChart.js +1 -750
  63. package/public/components/chart/GroupedBarChart.js.map +1 -1
  64. package/public/components/chart/LineChart.js +1 -1731
  65. package/public/components/chart/LineChart.js.map +1 -1
  66. package/public/components/chart/Radar.js +1 -729
  67. package/public/components/chart/Radar.js.map +1 -1
  68. package/public/components/chart/StackedBarChart.js +1 -745
  69. package/public/components/chart/StackedBarChart.js.map +1 -1
  70. package/public/components/checkbox/Checkbox.js +1 -307
  71. package/public/components/checkbox/Checkbox.js.map +1 -1
  72. package/public/components/checkboxgroup/checkboxGroup.js +1 -404
  73. package/public/components/checkboxgroup/checkboxGroup.js.map +1 -1
  74. package/public/components/datatable/DataTable.js +1 -3064
  75. package/public/components/datatable/DataTable.js.map +1 -1
  76. package/public/components/datatable/DataTableDefaultAction.nested.js +1 -4
  77. package/public/components/datatable/DataTableDefaultAction.nested.js.map +1 -1
  78. package/public/components/datatable/DataTableDefaultEdtion.nested.js +1 -164
  79. package/public/components/datatable/DataTableDefaultEdtion.nested.js.map +1 -1
  80. package/public/components/datatable/DataTableDefaultFilterTags.nested.js +1 -380
  81. package/public/components/datatable/DataTableDefaultFilterTags.nested.js.map +1 -1
  82. package/public/components/datatable/DataTableDefaultSelection.nested.js +1 -424
  83. package/public/components/datatable/DataTableDefaultSelection.nested.js.map +1 -1
  84. package/public/components/datatable/DataTableDefaultSelectionLabel.nested.js +1 -263
  85. package/public/components/datatable/DataTableDefaultSelectionLabel.nested.js.map +1 -1
  86. package/public/components/datatable/DataTableFooter.nested.js +1 -637
  87. package/public/components/datatable/DataTableFooter.nested.js.map +1 -1
  88. package/public/components/dropdown/Dropdown.js +1 -1426
  89. package/public/components/dropdown/Dropdown.js.map +1 -1
  90. package/public/components/field/Field.js +1 -375
  91. package/public/components/field/Field.js.map +1 -1
  92. package/public/components/fileuploader/FileUploader.js +1 -555
  93. package/public/components/fileuploader/FileUploader.js.map +1 -1
  94. package/public/components/fileuploader/ResultFile.nested.js +1 -265
  95. package/public/components/fileuploader/ResultFile.nested.js.map +1 -1
  96. package/public/components/flag/Flag.js +1 -174
  97. package/public/components/flag/Flag.js.map +1 -1
  98. package/public/components/header/Header.js +1 -903
  99. package/public/components/header/Header.js.map +1 -1
  100. package/public/components/hero/Hero.js +1 -271
  101. package/public/components/hero/Hero.js.map +1 -1
  102. package/public/components/layer/Layer.js +1 -453
  103. package/public/components/layer/Layer.js.map +1 -1
  104. package/public/components/layer/Layer.svelte +2 -1
  105. package/public/components/link/Link.js +1 -380
  106. package/public/components/link/Link.js.map +1 -1
  107. package/public/components/listbox/Listbox.js +1 -595
  108. package/public/components/listbox/Listbox.js.map +1 -1
  109. package/public/components/listbox/Listbox.nested.js +1 -629
  110. package/public/components/listbox/Listbox.nested.js.map +1 -1
  111. package/public/components/loader/Loader.js +1 -246
  112. package/public/components/loader/Loader.js.map +1 -1
  113. package/public/components/loader/Loader.nested.js +1 -176
  114. package/public/components/loader/Loader.nested.js.map +1 -1
  115. package/public/components/modal/Modal.js +1 -395
  116. package/public/components/modal/Modal.js.map +1 -1
  117. package/public/components/notification/Notification.js +1 -458
  118. package/public/components/notification/Notification.js.map +1 -1
  119. package/public/components/optionbutton/OptionButton.js +1 -316
  120. package/public/components/optionbutton/OptionButton.js.map +1 -1
  121. package/public/components/overlay/Overlay.js +1 -104
  122. package/public/components/overlay/Overlay.js.map +1 -1
  123. package/public/components/overlay/OverlayLoader.js +1 -151
  124. package/public/components/overlay/OverlayLoader.js.map +1 -1
  125. package/public/components/pagination/Pagination.js +1 -613
  126. package/public/components/pagination/Pagination.js.map +1 -1
  127. package/public/components/passwordinput/PasswordInput.js +1 -291
  128. package/public/components/passwordinput/PasswordInput.js.map +1 -1
  129. package/public/components/phonenumber/PhoneNumber.js +1 -6894
  130. package/public/components/phonenumber/PhoneNumber.js.map +1 -1
  131. package/public/components/price/Price.js +1 -768
  132. package/public/components/price/Price.js.map +1 -1
  133. package/public/components/progressbar/ProgressBar.js +1 -278
  134. package/public/components/progressbar/ProgressBar.js.map +1 -1
  135. package/public/components/quantityselector/QuantitySelector.js +1 -333
  136. package/public/components/quantityselector/QuantitySelector.js.map +1 -1
  137. package/public/components/quantityselector/QuantitySelector.svelte +6 -3
  138. package/public/components/radio/Radio.js +1 -273
  139. package/public/components/radio/Radio.js.map +1 -1
  140. package/public/components/radiogroup/RadioGroup.js +1 -414
  141. package/public/components/radiogroup/RadioGroup.js.map +1 -1
  142. package/public/components/ratings/StarsInput.js +1 -292
  143. package/public/components/ratings/StarsInput.js.map +1 -1
  144. package/public/components/ratings/StarsResult.js +1 -246
  145. package/public/components/ratings/StarsResult.js.map +1 -1
  146. package/public/components/select/Select.js +1 -451
  147. package/public/components/select/Select.js.map +1 -1
  148. package/public/components/sidebar/Sidebar.js +1 -784
  149. package/public/components/sidebar/Sidebar.js.map +1 -1
  150. package/public/components/sidebar/sidebar-feature-group.nested.js +1 -594
  151. package/public/components/sidebar/sidebar-feature-group.nested.js.map +1 -1
  152. package/public/components/sidebar/sidebar-feature.nested.js +1 -402
  153. package/public/components/sidebar/sidebar-feature.nested.js.map +1 -1
  154. package/public/components/sidebar/sidebar-section.nested.js +1 -394
  155. package/public/components/sidebar/sidebar-section.nested.js.map +1 -1
  156. package/public/components/sidebar/sidebar-segment.nested.js +1 -200
  157. package/public/components/sidebar/sidebar-segment.nested.js.map +1 -1
  158. package/public/components/sidebar/sidebar-separator.nested.js +1 -49
  159. package/public/components/sidebar/sidebar-separator.nested.js.map +1 -1
  160. package/public/components/sidebar/sidebar-sub-features.nested.js +1 -312
  161. package/public/components/sidebar/sidebar-sub-features.nested.js.map +1 -1
  162. package/public/components/sidebar/sidebar-user.nested.js +1 -733
  163. package/public/components/sidebar/sidebar-user.nested.js.map +1 -1
  164. package/public/components/stepper/Stepper.js +1 -371
  165. package/public/components/stepper/Stepper.js.map +1 -1
  166. package/public/components/tabs/Tabs.js +1 -615
  167. package/public/components/tabs/Tabs.js.map +1 -1
  168. package/public/components/tabs/Tabs.nested.js +1 -472
  169. package/public/components/tabs/Tabs.nested.js.map +1 -1
  170. package/public/components/tag/Tag.js +1 -665
  171. package/public/components/tag/Tag.js.map +1 -1
  172. package/public/components/tag/Tag.nested.js +1 -554
  173. package/public/components/tag/Tag.nested.js.map +1 -1
  174. package/public/components/taglist/TagList.js +1 -475
  175. package/public/components/taglist/TagList.js.map +1 -1
  176. package/public/components/textarea/Textarea.js +1 -303
  177. package/public/components/textarea/Textarea.js.map +1 -1
  178. package/public/components/textinput/Textinput.js +1 -497
  179. package/public/components/textinput/Textinput.js.map +1 -1
  180. package/public/components/textinput/Textinput.nested.js +1 -320
  181. package/public/components/textinput/Textinput.nested.js.map +1 -1
  182. package/public/components/toggle/Toggle.js +1 -278
  183. package/public/components/toggle/Toggle.js.map +1 -1
  184. package/public/components/tooltip/Tooltip.js +1 -173
  185. package/public/components/tooltip/Tooltip.js.map +1 -1
  186. package/public/index-c33b3772.js +1 -873
  187. package/public/index-c33b3772.js.map +1 -1
  188. package/public/linear-f46d7e9e.js +1 -700
  189. package/public/linear-f46d7e9e.js.map +1 -1
  190. package/public/path-1b5da959.js +1 -186
  191. package/public/path-1b5da959.js.map +1 -1
  192. package/public/sidebar-service-275bf9ef.js +1 -129
  193. package/public/sidebar-service-275bf9ef.js.map +1 -1
  194. package/public/symbol-b05a6e2b.js +1 -169
  195. package/public/symbol-b05a6e2b.js.map +1 -1
  196. package/public/transform-15d69d5d.js +1 -2743
  197. package/public/transform-15d69d5d.js.map +1 -1
  198. package/public/utilities/stories/quantityselector/QuantitySelector.stories.d.ts.map +1 -1
@@ -1,110 +1,2 @@
1
- import { l as listen, O as bubble, Y as prevent_default, I as stop_propagation } from './index-c33b3772.js';
2
-
3
- const MODIFIER_DIVIDER = '!';
4
- const modifierRegex = new RegExp(`^[^${MODIFIER_DIVIDER}]+(?:${MODIFIER_DIVIDER}(?:preventDefault|stopPropagation|passive|nonpassive|capture|once|self))+$`);
5
- function createEventForwarder(component, except = []) {
6
- let $on;
7
- const events = [];
8
- component.$on = (fullEventType, callback) => {
9
- const eventType = fullEventType;
10
- let destructor = () => { };
11
- for (const exception of except) {
12
- if (typeof exception === 'string' && exception === eventType) {
13
- const callbacks = component.$$.callbacks[eventType] ||
14
- (component.$$.callbacks[eventType] = []);
15
- callbacks.push(callback);
16
- return () => {
17
- const index = callbacks.indexOf(callback);
18
- if (index !== -1)
19
- callbacks.splice(index, 1);
20
- };
21
- }
22
- if (typeof exception === 'object' && exception['name'] === eventType) {
23
- const oldCallback = callback;
24
- callback = (...props) => {
25
- if (!(typeof exception === 'object' && exception['shouldExclude']())) {
26
- oldCallback(...props);
27
- }
28
- };
29
- }
30
- }
31
- if ($on) {
32
- destructor = $on(eventType, callback);
33
- }
34
- else {
35
- events.push([eventType, callback]);
36
- }
37
- return () => {
38
- destructor();
39
- };
40
- };
41
- function forward(e) {
42
- bubble(component, e);
43
- }
44
- return (node) => {
45
- const destructors = [];
46
- const forwardDestructors = {};
47
- $on = (fullEventType, callback) => {
48
- let eventType = fullEventType;
49
- let handler = callback;
50
- let options = false;
51
- const modifierMatch = eventType.match(modifierRegex);
52
- if (modifierMatch) {
53
- const parts = eventType.split(MODIFIER_DIVIDER);
54
- eventType = parts[0];
55
- const eventOptions = Object.fromEntries(parts.slice(1).map((mod) => [mod, true]));
56
- if (eventOptions.passive) {
57
- options = options || {};
58
- options.passive = true;
59
- }
60
- if (eventOptions.nonpassive) {
61
- options = options || {};
62
- options.passive = false;
63
- }
64
- if (eventOptions.capture) {
65
- options = options || {};
66
- options.capture = true;
67
- }
68
- if (eventOptions.once) {
69
- options = options || {};
70
- options.once = true;
71
- }
72
- if (eventOptions.preventDefault) {
73
- handler = prevent_default(handler);
74
- }
75
- if (eventOptions.stopPropagation) {
76
- handler = stop_propagation(handler);
77
- }
78
- }
79
- const off = listen(node, eventType, handler, options);
80
- const destructor = () => {
81
- off();
82
- const idx = destructors.indexOf(destructor);
83
- if (idx > -1) {
84
- destructors.splice(idx, 1);
85
- }
86
- };
87
- destructors.push(destructor);
88
- if (!(eventType in forwardDestructors)) {
89
- forwardDestructors[eventType] = listen(node, eventType, forward);
90
- }
91
- return destructor;
92
- };
93
- for (let i = 0; i < events.length; i++) {
94
- $on(events[i][0], events[i][1]);
95
- }
96
- return {
97
- destroy: () => {
98
- for (let i = 0; i < destructors.length; i++) {
99
- destructors[i]();
100
- }
101
- for (const entry of Object.entries(forwardDestructors)) {
102
- entry[1]();
103
- }
104
- },
105
- };
106
- };
107
- }
108
-
109
- export { createEventForwarder as c };
1
+ import{l as e,O as t,Y as s,I as n}from"./index-c33b3772.js";const o=new RegExp("^[^!]+(?:!(?:preventDefault|stopPropagation|passive|nonpassive|capture|once|self))+$");function c(c,r=[]){let p;const a=[];function i(e){t(c,e)}return c.$on=(e,t)=>{const s=e;let n=()=>{};for(const e of r){if("string"==typeof e&&e===s){const e=c.$$.callbacks[s]||(c.$$.callbacks[s]=[]);return e.push(t),()=>{const s=e.indexOf(t);-1!==s&&e.splice(s,1)}}if("object"==typeof e&&e.name===s){const s=t;t=(...t)=>{"object"==typeof e&&e.shouldExclude()||s(...t)}}}return p?n=p(s,t):a.push([s,t]),()=>{n()}},t=>{const c=[],r={};p=(p,a)=>{let f=p,l=a,u=!1;if(f.match(o)){const e=f.split("!");f=e[0];const t=Object.fromEntries(e.slice(1).map((e=>[e,!0])));t.passive&&(u=u||{},u.passive=!0),t.nonpassive&&(u=u||{},u.passive=!1),t.capture&&(u=u||{},u.capture=!0),t.once&&(u=u||{},u.once=!0),t.preventDefault&&(l=s(l)),t.stopPropagation&&(l=n(l))}const v=e(t,f,l,u),b=()=>{v();const e=c.indexOf(b);e>-1&&c.splice(e,1)};return c.push(b),f in r||(r[f]=e(t,f,i)),b};for(let e=0;e<a.length;e++)p(a[e][0],a[e][1]);return{destroy:()=>{for(let e=0;e<c.length;e++)c[e]();for(const e of Object.entries(r))e[1]()}}}}export{c};
110
2
  //# sourceMappingURL=EventForward-8492ff62.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EventForward-8492ff62.js","sources":["../src/utilities/EventForward.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAkBA,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAC7B,MAAM,aAAa,GAAG,IAAI,MAAM,CAC9B,CAAM,GAAA,EAAA,gBAAgB,CAAQ,KAAA,EAAA,gBAAgB,CAA4E,0EAAA,CAA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A;AAED,YAAA,OAAO,UAAU,CAAC;AACpB,SAAC,CAAC;AAEF,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAEtC,YAAA,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACjC,SAAA;QAED,OAAO;YACL,OAAO,EAAE,MAAK;AAEZ,gBAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAC3C,oBAAA,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC;AAClB,iBAAA;gBAGD,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,OAAO,CAAC,kBAAkB,CAAC,EAAE;AACtD,oBAAA,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;AACZ,iBAAA;aACF;SACF,CAAC;AACJ,KAAC,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"EventForward-8492ff62.js","sources":["../src/utilities/EventForward.ts"],"sourcesContent":[null],"names":["modifierRegex","RegExp","createEventForwarder","component","except","$on","events","forward","e","bubble","fullEventType","callback","eventType","destructor","exception","callbacks","$$","push","index","indexOf","splice","oldCallback","props","node","destructors","forwardDestructors","handler","options","match","parts","split","eventOptions","Object","fromEntries","slice","map","mod","passive","nonpassive","capture","once","preventDefault","prevent_default","stopPropagation","stop_propagation","off","listen","idx","i","length","destroy","entry","entries"],"mappings":"6DAkBA,MACMA,EAAgB,IAAIC,OACxB,iGAIcC,EACdC,EACAC,EAA6B,IAG7B,IAAIC,EAEJ,MAAMC,EAA2C,GAyCjD,SAASC,EAAQC,GAEfC,EAAON,EAAWK,EACnB,CAED,OA3CAL,EAAUE,IAAM,CAACK,EAAuBC,KACtC,MAAMC,EAAYF,EAClB,IAAIG,EAAa,OACjB,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,EAAMvB,EAAYL,QAAQN,GAC5BkC,GAAO,GACTvB,EAAYJ,OAAO2B,EAAK,EACzB,EAUH,OAPAvB,EAAYP,KAAKJ,GAGXD,KAAaa,IACjBA,EAAmBb,GAAakC,EAAOvB,EAAMX,EAAWL,IAGnDM,CAAU,EAGnB,IAAK,IAAImC,EAAI,EAAGA,EAAI1C,EAAO2C,OAAQD,IAEjC3C,EAAIC,EAAO0C,GAAG,GAAI1C,EAAO0C,GAAG,IAG9B,MAAO,CACLE,QAAS,KAEP,IAAK,IAAIF,EAAI,EAAGA,EAAIxB,EAAYyB,OAAQD,IACtCxB,EAAYwB,KAId,IAAK,MAAMG,KAASnB,OAAOoB,QAAQ3B,GACjC0B,EAAM,IACP,EAEJ,CAEL"}
@@ -1,16 +1,2 @@
1
- import { r as get_current_component, u as createEventDispatcher } from './index-c33b3772.js';
2
-
3
- class EventHandler {
4
- constructor() {
5
- this.component = get_current_component();
6
- this.svelteDispatch = createEventDispatcher();
7
- }
8
- dispatch(name, detail) {
9
- this.svelteDispatch(name, detail);
10
- this.component.dispatchEvent &&
11
- this.component.dispatchEvent(new CustomEvent(name, { detail: detail }));
12
- }
13
- }
14
-
15
- export { EventHandler as E };
1
+ import{r as t,u as s}from"./index-c33b3772.js";class e{constructor(){this.component=t(),this.svelteDispatch=s()}dispatch(t,s){this.svelteDispatch(t,s),this.component.dispatchEvent&&this.component.dispatchEvent(new CustomEvent(t,{detail:s}))}}export{e as E};
16
2
  //# sourceMappingURL=EventHandler-02058705.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EventHandler-02058705.js","sources":["../src/utilities/EventHandler.ts"],"sourcesContent":[null],"names":[],"mappings":";;MAEa,YAAY,CAAA;AAOvB,IAAA,WAAA,GAAA;AACE,QAAA,IAAI,CAAC,SAAS,GAAG,qBAAqB,EAA4B,CAAC;AACnE,QAAA,IAAI,CAAC,cAAc,GAAG,qBAAqB,EAAE,CAAC;KAC/C;IAED,QAAQ,CAAC,IAAY,EAAE,MAA6B,EAAA;AAClD,QAAA,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAElC,IAAI,CAAC,SAAS,CAAC,aAAa;AAC1B,YAAA,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;KAC3E;AACF;;;;"}
1
+ {"version":3,"file":"EventHandler-02058705.js","sources":["../src/utilities/EventHandler.ts"],"sourcesContent":[null],"names":["EventHandler","constructor","this","component","get_current_component","svelteDispatch","createEventDispatcher","dispatch","name","detail","dispatchEvent","CustomEvent"],"mappings":"qDAEaA,EAOXC,cACEC,KAAKC,UAAYC,IACjBF,KAAKG,eAAiBC,GACvB,CAEDC,SAASC,EAAcC,GACrBP,KAAKG,eAAeG,EAAMC,GAE1BP,KAAKC,UAAUO,eACbR,KAAKC,UAAUO,cAAc,IAAIC,YAAYH,EAAM,CAAEC,OAAQA,IAChE"}
@@ -1,2 +1,2 @@
1
- import{S as e,i as t,a as i,b as r,f as o,s as a,c as n,e as s,d as l,t as d,n as c,g as m,h as b,j as y,l as g,k as x,m as p,o as h,H as f,p as w,a1 as _,q as u,v}from"../../index-c33b3772.js";import{E as k}from"../../EventHandler-02058705.js";function $(e){let t,i=`<${D(e[5])} class="mc-layer__icon" />`;return{c(){t=s("span"),m(t,"class","mc-layer__icon")},m(e,o){r(e,t,o),t.innerHTML=i},p(e,r){32&r&&i!==(i=`<${D(e[5])} class="mc-layer__icon" />`)&&(t.innerHTML=i)},d(e){e&&h(t)}}}function M(e){let t;return{c(){t=s("footer"),t.innerHTML='<slot name="footer"></slot>',m(t,"class","mc-layer__footer")},m(e,i){r(e,t,i)},d(e){e&&h(t)}}}function A(e){let t,i,o,a,w,_,u,v,k,A,D,I,j,z,L,C,S,T,E,H,O,Z,N,P=e[5]&&$(e),Q=!e[8]&&M(),R=[{class:"mc-layer"},{tabindex:"-1"},{role:"dialog"},{"aria-labelledby":"layerTitle"},{"aria-modal":"true"},{"aria-hidden":T=!e[0]},e[6]],W={};for(let e=0;e<R.length;e+=1)W=n(W,R[e]);return{c(){t=s("div"),i=s("div"),o=s("div"),a=s("div"),P&&P.c(),w=l(),_=s("h2"),u=d(e[1]),v=l(),k=s("button"),A=s("span"),D=d(e[4]),I=l(),j=s("main"),z=s("article"),z.innerHTML='<slot name="content"></slot>',C=l(),Q&&Q.c(),E=l(),H=s("div"),this.c=c,m(_,"class","mc-layer__title"),m(_,"id","modallayerTitleTitle"),m(A,"class","mc-layer__close-text"),m(k,"class","mc-layer__close"),m(k,"type","button"),m(a,"class","mc-layer__header"),m(z,"class","mc-layer__content"),m(j,"class",L="mc-layer__body "+(e[3]?"mc-layer__body--overflowing-scroll-edge":"")),m(o,"class",S="mc-layer__dialog "+(e[0]?" is-open":"")+" "+(e[2]?" mc-layer__dialog--extend":"")),m(o,"role","document"),b(i,W),m(H,"class",O="mc-layer-overlay "+(e[0]?" is-visible":"")),m(H,"tabindex","-1"),m(H,"role","dialog")},m(n,s){r(n,t,s),y(t,i),y(i,o),y(o,a),P&&P.m(a,null),y(a,w),y(a,_),y(_,u),y(a,v),y(a,k),y(k,A),y(A,D),y(o,I),y(o,j),y(j,z),y(o,C),Q&&Q.m(o,null),y(t,E),y(t,H),e[13](t),Z||(N=[g(k,"click",e[11]),g(H,"click",e[12])],Z=!0)},p(e,[t]){e[5]?P?P.p(e,t):(P=$(e),P.c(),P.m(a,w)):P&&(P.d(1),P=null),2&t&&x(u,e[1]),16&t&&x(D,e[4]),8&t&&L!==(L="mc-layer__body "+(e[3]?"mc-layer__body--overflowing-scroll-edge":""))&&m(j,"class",L),e[8]?Q&&(Q.d(1),Q=null):Q||(Q=M(),Q.c(),Q.m(o,null)),5&t&&S!==(S="mc-layer__dialog "+(e[0]?" is-open":"")+" "+(e[2]?" mc-layer__dialog--extend":""))&&m(o,"class",S),b(i,W=p(R,[{class:"mc-layer"},{tabindex:"-1"},{role:"dialog"},{"aria-labelledby":"layerTitle"},{"aria-modal":"true"},1&t&&T!==(T=!e[0])&&{"aria-hidden":T},64&t&&e[6]])),1&t&&O!==(O="mc-layer-overlay "+(e[0]?" is-visible":""))&&m(H,"class",O)},i:c,o:c,d(i){i&&h(t),P&&P.d(),Q&&Q.d(),e[13](null),Z=!1,f(N)}}}function D(e){return`${e} size="1.5rem"`}function I(e,t,i){let r,o;const a=["title","isopen","extended","scrollbaredge","closebuttontext","iconname","hidefooter"];let s,l=w(t,a),{title:d}=t,{isopen:c}=t,{extended:m}=t,{scrollbaredge:b}=t,{closebuttontext:y="Close"}=t,{iconname:g}=t,{hidefooter:x}=t,p=new k;function h(){i(0,c=!1)}_((()=>{const e=s.querySelector(".mc-layer__body"),t=s.querySelector(".mc-layer__content"),i=b?"mc-layer__body--overflowing-scroll-edge":"mc-layer__body--overflowing";if(e&&t){const r=e.clientHeight;t.scrollHeight>r?e.classList.add(i):e.classList.remove(i)}}));return e.$$set=e=>{t=n(n({},t),u(e)),i(15,l=w(t,a)),"title"in e&&i(1,d=e.title),"isopen"in e&&i(0,c=e.isopen),"extended"in e&&i(2,m=e.extended),"scrollbaredge"in e&&i(3,b=e.scrollbaredge),"closebuttontext"in e&&i(4,y=e.closebuttontext),"iconname"in e&&i(5,g=e.iconname),"hidefooter"in e&&i(10,x=e.hidefooter)},e.$$.update=()=>{1024&e.$$.dirty&&i(8,r=null!=x&&x),1&e.$$.dirty&&(c?p.dispatch("layer-opened",{}):p.dispatch("layer-closed",{})),i(6,o=Object.assign({},l)),64&e.$$.dirty&&delete o.class},[c,d,m,b,y,g,o,s,r,h,x,()=>h(),()=>h(),function(e){v[e?"unshift":"push"]((()=>{s=e,i(7,s)}))}]}class j extends e{constructor(e){super();const n=document.createElement("style");n.textContent='.mc-layer{font-family:"Roboto", sans-serif;font-weight:400;-webkit-box-sizing:border-box;box-sizing:border-box;bottom:0;left:0;outline:0;pointer-events:none;position:fixed;right:0;top:0;z-index:1999999999;display:-webkit-box;display:-ms-flexbox;display:flex;overflow:hidden}.mc-layer *{-webkit-box-sizing:inherit;box-sizing:inherit}.mc-layer--ltr{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.mc-layer--ltr .mc-layer__dialog{-webkit-transform:translate3d(-100%, 0, 0);transform:translate3d(-100%, 0, 0)}.mc-layer:not(.mc-layer--ltr){-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.mc-layer:not(.mc-layer--ltr) .mc-layer__dialog{-webkit-transform:translate3d(100%, 0, 0);transform:translate3d(100%, 0, 0)}.mc-layer__dialog{background:#ffffff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%;max-width:calc(100% - 2rem);-webkit-transition:visibility 0s linear 0.4s, -webkit-transform 0.4s;transition:visibility 0s linear 0.4s, -webkit-transform 0.4s;-o-transition:visibility 0s linear 0.4s, transform 0.4s;transition:visibility 0s linear 0.4s, transform 0.4s;transition:visibility 0s linear 0.4s, transform 0.4s, -webkit-transform 0.4s;visibility:hidden;width:100%}@media screen and (min-width: 680px){.mc-layer__dialog{max-width:25rem}}@media screen and (min-width: 769px){.mc-layer__dialog{max-width:28.6875rem}}@media screen and (min-width: 1024px){.mc-layer__dialog{max-width:28rem}}@media screen and (min-width: 680px){.mc-layer__dialog--extend{max-width:31.75rem}}@media screen and (min-width: 769px){.mc-layer__dialog--extend{max-width:36.3125rem}}@media screen and (min-width: 1024px){.mc-layer__dialog--extend{max-width:43rem}}.mc-layer__header,.mc-layer__footer{padding-left:1rem;padding-right:1rem}@media screen and (min-width: 1024px){.mc-layer__header,.mc-layer__footer{padding-left:2rem;padding-right:2rem}}.mc-layer__header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-bottom:0.5rem;padding-top:1rem;min-height:3.75rem;position:relative}.mc-layer__header::after{background:#b3b3b3;content:"";display:block;margin:0 auto;height:1px;width:100%;bottom:0;left:0;position:absolute}@media screen and (min-width: 1024px){.mc-layer__header{padding-bottom:0.75rem;padding-top:1.25rem;min-height:4.25rem}}.mc-layer__icon{fill:#666666;height:1.5rem;margin-right:0.75rem;width:1.5rem}.mc-layer__title{font-size:0.875rem;line-height:1.2857142857;font-weight:400;color:#666666;margin-bottom:0;margin-top:0}.mc-layer__close{margin:0;-webkit-box-shadow:none;box-shadow:none;text-decoration:none;outline:none;border:none;cursor:pointer;padding:0;position:relative;-ms-flex-item-align:start;align-self:flex-start;background:transparent url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMnJlbSIgd2lkdGg9IjJyZW0iIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0iIzgwODA4MCI+PHBhdGggZD0iTTE3LjQxIDE2bDguOC04Ljc5YTEgMSAwIDEwLTEuNDItMS40MkwxNiAxNC41OWwtOC43OS04LjhhMSAxIDAgMDAtMS40MiAxLjQybDguOCA4Ljc5LTguOCA4Ljc5YTEgMSAwIDAwMCAxLjQyIDEgMSAwIDAwMS40MiAwbDguNzktOC44IDguNzkgOC44YTEgMSAwIDAwMS40MiAwIDEgMSAwIDAwMC0xLjQyeiIvPjwvc3ZnPg==") no-repeat;background-size:contain;cursor:pointer;height:2rem;margin-left:auto;width:2rem}.mc-layer__close::after{border-radius:2px;-webkit-box-shadow:0 0 0 0 transparent;box-shadow:0 0 0 0 transparent;content:"";display:block;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0;-webkit-transition:-webkit-box-shadow 200ms ease;transition:-webkit-box-shadow 200ms ease;-o-transition:box-shadow 200ms ease;transition:box-shadow 200ms ease;transition:box-shadow 200ms ease, -webkit-box-shadow 200ms ease}.mc-layer__close-text{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;visibility:visible;white-space:nowrap}.mc-layer__close:focus::after{-webkit-box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #758992;box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #758992}.mc-layer__body{-webkit-box-flex:1;-ms-flex:1 1;flex:1 1;overflow:hidden;padding-left:0.5rem;padding-right:0.5rem}@media screen and (min-width: 1024px){.mc-layer__body{padding-left:1rem;padding-right:1rem}}.mc-layer__body--overflowing-scroll-edge+.mc-layer__footer{-webkit-box-shadow:0px 4px 20px 0px rgba(25, 25, 25, 0.2);box-shadow:0px 4px 20px 0px rgba(25, 25, 25, 0.2);position:relative}.mc-layer__body--overflowing-scroll-edge{padding-left:0;padding-right:0}.mc-layer__body--overflowing-scroll-edge .mc-layer__content{padding-left:1rem;padding-right:1.125rem}@media screen and (min-width: 1024px){.mc-layer__body--overflowing-scroll-edge .mc-layer__content{padding-left:2rem;padding-right:2rem}}.mc-layer__content{max-height:100%;overflow-y:auto;overflow-x:hidden;padding:1.5rem 0.5rem 3rem;scrollbar-color:#666666 #e6e6e6;scrollbar-width:thin}@media screen and (min-width: 1024px){.mc-layer__content{padding-left:1rem;padding-right:1rem}}.mc-layer__content::-webkit-scrollbar{background-color:#e6e6e6;width:0.25rem}.mc-layer__content::-webkit-scrollbar-thumb{background:#666666}.mc-layer__footer{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;padding-top:1rem;padding-bottom:1rem}@media screen and (min-width: 1024px){.mc-layer__footer{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding-top:1.5rem;padding-bottom:1.5rem}}.mc-layer__footer>:first-child:not(:only-child){margin-bottom:0.75rem}@media screen and (min-width: 1024px){.mc-layer__footer>:first-child:not(:only-child){margin-bottom:0;margin-right:1rem}}.mc-layer-open{overflow:hidden}.mc-layer .mc-layer__dialog.is-open{pointer-events:all;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);-webkit-transition:visibility 0s linear 0s, -webkit-transform 0.4s;transition:visibility 0s linear 0s, -webkit-transform 0.4s;-o-transition:visibility 0s linear 0s, transform 0.4s;transition:visibility 0s linear 0s, transform 0.4s;transition:visibility 0s linear 0s, transform 0.4s, -webkit-transform 0.4s;visibility:visible}.mc-layer-overlay{background-color:rgba(25, 25, 25, 0.7);-webkit-filter:blur(1px);filter:blur(1px);inset:0;opacity:0;position:fixed;pointer-events:none;-webkit-transition:opacity 0.4s ease, visibility 0ms 0.4s;-o-transition:opacity 0.4s ease, visibility 0ms 0.4s;transition:opacity 0.4s ease, visibility 0ms 0.4s;z-index:1999999998}.mc-layer-overlay.is-visible{opacity:1;pointer-events:all;-webkit-transition:opacity 0.4s ease, visibility 0ms;-o-transition:opacity 0.4s ease, visibility 0ms;transition:opacity 0.4s ease, visibility 0ms;visibility:visible}',this.shadowRoot.appendChild(n),t(this,{target:this.shadowRoot,props:i(this.attributes),customElement:!0},I,A,a,{title:1,isopen:0,extended:2,scrollbaredge:3,closebuttontext:4,iconname:5,hidefooter:10},null),e&&(e.target&&r(e.target,this,e.anchor),e.props&&(this.$set(e.props),o()))}static get observedAttributes(){return["title","isopen","extended","scrollbaredge","closebuttontext","iconname","hidefooter"]}get title(){return this.$$.ctx[1]}set title(e){this.$$set({title:e}),o()}get isopen(){return this.$$.ctx[0]}set isopen(e){this.$$set({isopen:e}),o()}get extended(){return this.$$.ctx[2]}set extended(e){this.$$set({extended:e}),o()}get scrollbaredge(){return this.$$.ctx[3]}set scrollbaredge(e){this.$$set({scrollbaredge:e}),o()}get closebuttontext(){return this.$$.ctx[4]}set closebuttontext(e){this.$$set({closebuttontext:e}),o()}get iconname(){return this.$$.ctx[5]}set iconname(e){this.$$set({iconname:e}),o()}get hidefooter(){return this.$$.ctx[10]}set hidefooter(e){this.$$set({hidefooter:e}),o()}}export{j as default};
1
+ import{S as e,i as t,a as i,b as a,f as r,s as o,c as n,e as l,d as s,t as d,n as c,g as m,h as b,j as y,l as g,k as x,m as p,o as h,H as f,p as w,a1 as _,q as u,v}from"../../index-c33b3772.js";import{E as k}from"../../EventHandler-02058705.js";function $(e){let t,i=`<${D(e[5])} class="mc-layer__icon" />`;return{c(){t=l("span"),m(t,"class","mc-layer__icon")},m(e,r){a(e,t,r),t.innerHTML=i},p(e,a){32&a&&i!==(i=`<${D(e[5])} class="mc-layer__icon" />`)&&(t.innerHTML=i)},d(e){e&&h(t)}}}function M(e){let t;return{c(){t=l("footer"),t.innerHTML='<slot name="footer"></slot>',m(t,"class","mc-layer__footer")},m(e,i){a(e,t,i)},d(e){e&&h(t)}}}function A(e){let t,i,r,o,w,_,u,v,k,A,D,I,j,L,z,C,S,T,E,H,O,Z,N,P=e[5]&&$(e),Q=!e[9]&&M(),R=[{class:"mc-layer"},{tabindex:"-1"},{role:"dialog"},{"aria-labelledby":e[6]},{"aria-modal":"true"},{"aria-hidden":T=!e[0]},e[7]],W={};for(let e=0;e<R.length;e+=1)W=n(W,R[e]);return{c(){t=l("div"),i=l("div"),r=l("div"),o=l("div"),P&&P.c(),w=s(),_=l("h2"),u=d(e[1]),v=s(),k=l("button"),A=l("span"),D=d(e[4]),I=s(),j=l("main"),L=l("article"),L.innerHTML='<slot name="content"></slot>',C=s(),Q&&Q.c(),E=s(),H=l("div"),this.c=c,m(_,"class","mc-layer__title"),m(_,"id","modallayerTitleTitle"),m(A,"class","mc-layer__close-text"),m(k,"class","mc-layer__close"),m(k,"type","button"),m(o,"class","mc-layer__header"),m(L,"class","mc-layer__content"),m(j,"class",z="mc-layer__body "+(e[3]?"mc-layer__body--overflowing-scroll-edge":"")),m(r,"class",S="mc-layer__dialog "+(e[0]?" is-open":"")+" "+(e[2]?" mc-layer__dialog--extend":"")),m(r,"role","document"),b(i,W),m(H,"class",O="mc-layer-overlay "+(e[0]?" is-visible":"")),m(H,"tabindex","-1"),m(H,"role","dialog")},m(n,l){a(n,t,l),y(t,i),y(i,r),y(r,o),P&&P.m(o,null),y(o,w),y(o,_),y(_,u),y(o,v),y(o,k),y(k,A),y(A,D),y(r,I),y(r,j),y(j,L),y(r,C),Q&&Q.m(r,null),y(t,E),y(t,H),e[14](t),Z||(N=[g(k,"click",e[12]),g(H,"click",e[13])],Z=!0)},p(e,[t]){e[5]?P?P.p(e,t):(P=$(e),P.c(),P.m(o,w)):P&&(P.d(1),P=null),2&t&&x(u,e[1]),16&t&&x(D,e[4]),8&t&&z!==(z="mc-layer__body "+(e[3]?"mc-layer__body--overflowing-scroll-edge":""))&&m(j,"class",z),e[9]?Q&&(Q.d(1),Q=null):Q||(Q=M(),Q.c(),Q.m(r,null)),5&t&&S!==(S="mc-layer__dialog "+(e[0]?" is-open":"")+" "+(e[2]?" mc-layer__dialog--extend":""))&&m(r,"class",S),b(i,W=p(R,[{class:"mc-layer"},{tabindex:"-1"},{role:"dialog"},64&t&&{"aria-labelledby":e[6]},{"aria-modal":"true"},1&t&&T!==(T=!e[0])&&{"aria-hidden":T},128&t&&e[7]])),1&t&&O!==(O="mc-layer-overlay "+(e[0]?" is-visible":""))&&m(H,"class",O)},i:c,o:c,d(i){i&&h(t),P&&P.d(),Q&&Q.d(),e[14](null),Z=!1,f(N)}}}function D(e){return`${e} size="1.5rem"`}function I(e,t,i){let a,r;const o=["title","isopen","extended","scrollbaredge","closebuttontext","iconname","hidefooter","arialabelledby"];let l,s=w(t,o),{title:d}=t,{isopen:c}=t,{extended:m}=t,{scrollbaredge:b}=t,{closebuttontext:y="Close"}=t,{iconname:g}=t,{hidefooter:x}=t,{arialabelledby:p="LayerTitle"}=t,h=new k;function f(){i(0,c=!1)}_((()=>{const e=l.querySelector(".mc-layer__body"),t=l.querySelector(".mc-layer__content"),i=b?"mc-layer__body--overflowing-scroll-edge":"mc-layer__body--overflowing";if(e&&t){const a=e.clientHeight;t.scrollHeight>a?e.classList.add(i):e.classList.remove(i)}}));return e.$$set=e=>{t=n(n({},t),u(e)),i(16,s=w(t,o)),"title"in e&&i(1,d=e.title),"isopen"in e&&i(0,c=e.isopen),"extended"in e&&i(2,m=e.extended),"scrollbaredge"in e&&i(3,b=e.scrollbaredge),"closebuttontext"in e&&i(4,y=e.closebuttontext),"iconname"in e&&i(5,g=e.iconname),"hidefooter"in e&&i(11,x=e.hidefooter),"arialabelledby"in e&&i(6,p=e.arialabelledby)},e.$$.update=()=>{2048&e.$$.dirty&&i(9,a=null!=x&&x),1&e.$$.dirty&&(c?h.dispatch("layer-opened",{}):h.dispatch("layer-closed",{})),i(7,r=Object.assign({},s)),128&e.$$.dirty&&delete r.class},[c,d,m,b,y,g,p,r,l,a,f,x,()=>f(),()=>f(),function(e){v[e?"unshift":"push"]((()=>{l=e,i(8,l)}))}]}class j extends e{constructor(e){super();const n=document.createElement("style");n.textContent='.mc-layer{font-family:"Roboto", sans-serif;font-weight:400;-webkit-box-sizing:border-box;box-sizing:border-box;bottom:0;left:0;outline:0;pointer-events:none;position:fixed;right:0;top:0;z-index:1999999999;display:-webkit-box;display:-ms-flexbox;display:flex;overflow:hidden}.mc-layer *{-webkit-box-sizing:inherit;box-sizing:inherit}.mc-layer--ltr{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.mc-layer--ltr .mc-layer__dialog{-webkit-transform:translate3d(-100%, 0, 0);transform:translate3d(-100%, 0, 0)}.mc-layer:not(.mc-layer--ltr){-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.mc-layer:not(.mc-layer--ltr) .mc-layer__dialog{-webkit-transform:translate3d(100%, 0, 0);transform:translate3d(100%, 0, 0)}.mc-layer__dialog{background:#ffffff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%;max-width:calc(100% - 2rem);-webkit-transition:visibility 0s linear 0.4s, -webkit-transform 0.4s;transition:visibility 0s linear 0.4s, -webkit-transform 0.4s;-o-transition:visibility 0s linear 0.4s, transform 0.4s;transition:visibility 0s linear 0.4s, transform 0.4s;transition:visibility 0s linear 0.4s, transform 0.4s, -webkit-transform 0.4s;visibility:hidden;width:100%}@media screen and (min-width: 680px){.mc-layer__dialog{max-width:25rem}}@media screen and (min-width: 769px){.mc-layer__dialog{max-width:28.6875rem}}@media screen and (min-width: 1024px){.mc-layer__dialog{max-width:28rem}}@media screen and (min-width: 680px){.mc-layer__dialog--extend{max-width:31.75rem}}@media screen and (min-width: 769px){.mc-layer__dialog--extend{max-width:36.3125rem}}@media screen and (min-width: 1024px){.mc-layer__dialog--extend{max-width:43rem}}.mc-layer__header,.mc-layer__footer{padding-left:1rem;padding-right:1rem}@media screen and (min-width: 1024px){.mc-layer__header,.mc-layer__footer{padding-left:2rem;padding-right:2rem}}.mc-layer__header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-bottom:0.5rem;padding-top:1rem;min-height:3.75rem;position:relative}.mc-layer__header::after{background:#b3b3b3;content:"";display:block;margin:0 auto;height:1px;width:100%;bottom:0;left:0;position:absolute}@media screen and (min-width: 1024px){.mc-layer__header{padding-bottom:0.75rem;padding-top:1.25rem;min-height:4.25rem}}.mc-layer__icon{fill:#666666;height:1.5rem;margin-right:0.75rem;width:1.5rem}.mc-layer__title{font-size:0.875rem;line-height:1.2857142857;font-weight:400;color:#666666;margin-bottom:0;margin-top:0}.mc-layer__close{margin:0;-webkit-box-shadow:none;box-shadow:none;text-decoration:none;outline:none;border:none;cursor:pointer;padding:0;position:relative;-ms-flex-item-align:start;align-self:flex-start;background:transparent url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMnJlbSIgd2lkdGg9IjJyZW0iIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0iIzgwODA4MCI+PHBhdGggZD0iTTE3LjQxIDE2bDguOC04Ljc5YTEgMSAwIDEwLTEuNDItMS40MkwxNiAxNC41OWwtOC43OS04LjhhMSAxIDAgMDAtMS40MiAxLjQybDguOCA4Ljc5LTguOCA4Ljc5YTEgMSAwIDAwMCAxLjQyIDEgMSAwIDAwMS40MiAwbDguNzktOC44IDguNzkgOC44YTEgMSAwIDAwMS40MiAwIDEgMSAwIDAwMC0xLjQyeiIvPjwvc3ZnPg==") no-repeat;background-size:contain;cursor:pointer;height:2rem;margin-left:auto;width:2rem}.mc-layer__close::after{border-radius:2px;-webkit-box-shadow:0 0 0 0 transparent;box-shadow:0 0 0 0 transparent;content:"";display:block;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0;-webkit-transition:-webkit-box-shadow 200ms ease;transition:-webkit-box-shadow 200ms ease;-o-transition:box-shadow 200ms ease;transition:box-shadow 200ms ease;transition:box-shadow 200ms ease, -webkit-box-shadow 200ms ease}.mc-layer__close-text{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;visibility:visible;white-space:nowrap}.mc-layer__close:focus::after{-webkit-box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #758992;box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #758992}.mc-layer__body{-webkit-box-flex:1;-ms-flex:1 1;flex:1 1;overflow:hidden;padding-left:0.5rem;padding-right:0.5rem}@media screen and (min-width: 1024px){.mc-layer__body{padding-left:1rem;padding-right:1rem}}.mc-layer__body--overflowing-scroll-edge+.mc-layer__footer{-webkit-box-shadow:0px 4px 20px 0px rgba(25, 25, 25, 0.2);box-shadow:0px 4px 20px 0px rgba(25, 25, 25, 0.2);position:relative}.mc-layer__body--overflowing-scroll-edge{padding-left:0;padding-right:0}.mc-layer__body--overflowing-scroll-edge .mc-layer__content{padding-left:1rem;padding-right:1.125rem}@media screen and (min-width: 1024px){.mc-layer__body--overflowing-scroll-edge .mc-layer__content{padding-left:2rem;padding-right:2rem}}.mc-layer__content{max-height:100%;overflow-y:auto;overflow-x:hidden;padding:1.5rem 0.5rem 3rem;scrollbar-color:#666666 #e6e6e6;scrollbar-width:thin}@media screen and (min-width: 1024px){.mc-layer__content{padding-left:1rem;padding-right:1rem}}.mc-layer__content::-webkit-scrollbar{background-color:#e6e6e6;width:0.25rem}.mc-layer__content::-webkit-scrollbar-thumb{background:#666666}.mc-layer__footer{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;padding-top:1rem;padding-bottom:1rem}@media screen and (min-width: 1024px){.mc-layer__footer{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding-top:1.5rem;padding-bottom:1.5rem}}.mc-layer__footer>:first-child:not(:only-child){margin-bottom:0.75rem}@media screen and (min-width: 1024px){.mc-layer__footer>:first-child:not(:only-child){margin-bottom:0;margin-right:1rem}}.mc-layer-open{overflow:hidden}.mc-layer .mc-layer__dialog.is-open{pointer-events:all;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);-webkit-transition:visibility 0s linear 0s, -webkit-transform 0.4s;transition:visibility 0s linear 0s, -webkit-transform 0.4s;-o-transition:visibility 0s linear 0s, transform 0.4s;transition:visibility 0s linear 0s, transform 0.4s;transition:visibility 0s linear 0s, transform 0.4s, -webkit-transform 0.4s;visibility:visible}.mc-layer-overlay{background-color:rgba(25, 25, 25, 0.7);-webkit-filter:blur(1px);filter:blur(1px);inset:0;opacity:0;position:fixed;pointer-events:none;-webkit-transition:opacity 0.4s ease, visibility 0ms 0.4s;-o-transition:opacity 0.4s ease, visibility 0ms 0.4s;transition:opacity 0.4s ease, visibility 0ms 0.4s;z-index:1999999998}.mc-layer-overlay.is-visible{opacity:1;pointer-events:all;-webkit-transition:opacity 0.4s ease, visibility 0ms;-o-transition:opacity 0.4s ease, visibility 0ms;transition:opacity 0.4s ease, visibility 0ms;visibility:visible}',this.shadowRoot.appendChild(n),t(this,{target:this.shadowRoot,props:i(this.attributes),customElement:!0},I,A,o,{title:1,isopen:0,extended:2,scrollbaredge:3,closebuttontext:4,iconname:5,hidefooter:11,arialabelledby:6},null),e&&(e.target&&a(e.target,this,e.anchor),e.props&&(this.$set(e.props),r()))}static get observedAttributes(){return["title","isopen","extended","scrollbaredge","closebuttontext","iconname","hidefooter","arialabelledby"]}get title(){return this.$$.ctx[1]}set title(e){this.$$set({title:e}),r()}get isopen(){return this.$$.ctx[0]}set isopen(e){this.$$set({isopen:e}),r()}get extended(){return this.$$.ctx[2]}set extended(e){this.$$set({extended:e}),r()}get scrollbaredge(){return this.$$.ctx[3]}set scrollbaredge(e){this.$$set({scrollbaredge:e}),r()}get closebuttontext(){return this.$$.ctx[4]}set closebuttontext(e){this.$$set({closebuttontext:e}),r()}get iconname(){return this.$$.ctx[5]}set iconname(e){this.$$set({iconname:e}),r()}get hidefooter(){return this.$$.ctx[11]}set hidefooter(e){this.$$set({hidefooter:e}),r()}get arialabelledby(){return this.$$.ctx[6]}set arialabelledby(e){this.$$set({arialabelledby:e}),r()}}export{j as default};
2
2
  //# sourceMappingURL=Layer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Layer.js","sources":["../../../../src/components/layer/Layer.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import { onMount } from 'svelte/internal';\n import { EventHandler } from '../../utilities/EventHandler';\n export let title: string;\n export let isopen: boolean;\n export let extended: boolean;\n export let scrollbaredge: boolean;\n export let closebuttontext = 'Close';\n export let iconname: string | undefined = undefined;\n export let hidefooter: boolean;\n\n $: hideFooter = hidefooter ?? false;\n $: isopen\n ? eventHandler.dispatch('layer-opened', {})\n : eventHandler.dispatch('layer-closed', {});\n $: attributes = { ...$$restProps };\n $: delete attributes.class;\n let root: HTMLElement;\n let eventHandler = new EventHandler();\n onMount(() => {\n const body = root.querySelector('.mc-layer__body');\n const content = root.querySelector('.mc-layer__content');\n const overflowingClass = !scrollbaredge\n ? 'mc-layer__body--overflowing'\n : 'mc-layer__body--overflowing-scroll-edge';\n if (body && content) {\n const bodyHeight = body.clientHeight;\n const contentHeight = content.scrollHeight;\n\n if (contentHeight > bodyHeight) {\n body.classList.add(overflowingClass);\n } else {\n body.classList.remove(overflowingClass);\n }\n }\n });\n\n function onClose(): void {\n isopen = false;\n }\n\n function generateIconName(iconname: string): string {\n return `${iconname} size=\"1.5rem\"`;\n }\n</script>\n\n<div bind:this={root}>\n <div\n class=\"mc-layer\"\n tabindex=\"-1\"\n role=\"dialog\"\n aria-labelledby=\"layerTitle\"\n aria-modal=\"true\"\n aria-hidden={!isopen}\n {...attributes}\n >\n <div\n class=\"mc-layer__dialog {isopen ? ' is-open' : ''} {extended\n ? ' mc-layer__dialog--extend'\n : ''}\"\n role=\"document\"\n >\n <div class=\"mc-layer__header\">\n {#if iconname}\n <span class=\"mc-layer__icon\">\n {@html `<${generateIconName(iconname)} class=\"mc-layer__icon\" />`}\n </span>\n {/if}\n <h2 class=\"mc-layer__title\" id=\"modallayerTitleTitle\">{title}</h2>\n <button\n class=\"mc-layer__close\"\n type=\"button\"\n on:click={() => onClose()}\n >\n <span class=\"mc-layer__close-text\">{closebuttontext}</span>\n </button>\n </div>\n <main\n class=\"mc-layer__body {scrollbaredge\n ? 'mc-layer__body--overflowing-scroll-edge'\n : ''}\"\n >\n <article class=\"mc-layer__content\">\n <slot name=\"content\" />\n </article>\n </main>\n {#if !hideFooter}\n <footer class=\"mc-layer__footer\">\n <slot name=\"footer\" />\n </footer>\n {/if}\n </div>\n </div>\n <div\n class=\"mc-layer-overlay {isopen ? ' is-visible' : ''}\"\n tabindex=\"-1\"\n role=\"dialog\"\n on:click={() => onClose()}\n />\n</div>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/_all-settings';\n @import '@mozaic-ds/styles/components/c.layer';\n</style>\n"],"names":["raw_value","generateIconName","ctx","insert","target","span","anchor","dirty","innerHTML","footer","create_if_block_1","create_if_block","div4","append","div2","div1","div0","h2","button","main","article","div3","div2_aria_hidden_value","iconname","root","title","$$props","isopen","extended","scrollbaredge","closebuttontext","hidefooter","eventHandler","EventHandler","onClose","$$invalidate","onMount","body","querySelector","content","overflowingClass","bodyHeight","clientHeight","scrollHeight","classList","add","remove","hideFooter","dispatch","attributes","Object","assign","$$restProps","class","$$value"],"mappings":"yQAmEuBA,EAAA,IAAAC,EAAiBC,EAAQ,6FADtCC,EAEMC,EAAAC,EAAAC,yBADO,GAAAC,GAAAP,KAAAA,EAAA,IAAAC,EAAiBC,EAAQ,mCAAAG,EAAAG,UAAAR,kJAsBxCG,EAEQC,EAAAK,EAAAH,qFA1BHJ,EAAQ,IAAAQ,EAAAR,MAuBTA,EAAU,IAAAS,mIAjCJT,EAAM,IAChBA,EAAU,qIAc6CA,EAAK,wCAMtBA,EAAe,mXAI9BA,EAAA,GACnB,0CACA,wCAvBmBA,EAAM,GAAG,WAAa,SAAKA,EAAA,GAChD,4BACA,sEAmCmBA,EAAM,GAAG,cAAgB,uDAhDtDC,EAqDKC,EAAAQ,EAAAN,GApDHO,EA6CKD,EAAAE,GApCHD,EAmCKC,EAAAC,GA7BHF,EAcKE,EAAAC,yBARHH,EAAiEG,EAAAC,iBACjEJ,EAMQG,EAAAE,GADNL,EAA0DK,EAAAb,iBAG9DQ,EAQME,EAAAI,GAHJN,EAESM,EAAAC,gCASfP,EAKCD,EAAAS,0EAnCUnB,EAAQ,kEAK0CA,EAAK,cAMtBA,EAAe,mCAI9BA,EAAA,GACnB,0CACA,qBAMAA,EAAU,oFA7BSA,EAAM,GAAG,WAAa,SAAKA,EAAA,GAChD,4BACA,uJANQA,EAAM,KAAA,CAAA,cAAAoB,SAChBpB,EAAU,uCAwCWA,EAAM,GAAG,cAAgB,qFArD3C,SAAAD,EAAiBsB,YACdA,gJAzBRC,kBAdOC,GAAaC,UACbC,GAAeD,YACfE,GAAiBF,iBACjBG,GAAsBH,GACtBI,gBAAAA,EAAkB,SAAOJ,GACzBH,SAAAA,GAAwCG,cACxCK,GAAmBL,EAS1BM,MAAmBC,WAmBdC,IACPC,EAAA,EAAAR,GAAS,GAnBXS,GAAO,KACC,MAAAC,EAAOb,EAAKc,cAAc,mBAC1BC,EAAUf,EAAKc,cAAc,sBAC7BE,EAAoBX,EAEtB,0CADA,8BAEA,GAAAQ,GAAQE,EAAO,OACXE,EAAaJ,EAAKK,aACFH,EAAQI,aAEVF,EAClBJ,EAAKO,UAAUC,IAAIL,GAEnBH,EAAKO,UAAUE,OAAON,+VArB3BL,EAAA,EAAEY,EAAahB,SAAAA,kBACbJ,EACCK,EAAagB,SAAS,eAAc,IACpChB,EAAagB,SAAS,eAAc,CAAA,QACrCC,EAALC,OAAAC,UAAuBC,0BACXH,EAAWI,kCAwDGnB,QAyBNA,4CAnDJV,EAAI8B"}
1
+ {"version":3,"file":"Layer.js","sources":["../../../../src/components/layer/Layer.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import { onMount } from 'svelte/internal';\n import { EventHandler } from '../../utilities/EventHandler';\n export let title: string;\n export let isopen: boolean;\n export let extended: boolean;\n export let scrollbaredge: boolean;\n export let closebuttontext = 'Close';\n export let iconname: string | undefined = undefined;\n export let hidefooter: boolean;\n export let arialabelledby = 'LayerTitle';\n\n $: hideFooter = hidefooter ?? false;\n $: isopen\n ? eventHandler.dispatch('layer-opened', {})\n : eventHandler.dispatch('layer-closed', {});\n $: attributes = { ...$$restProps };\n $: delete attributes.class;\n let root: HTMLElement;\n let eventHandler = new EventHandler();\n onMount(() => {\n const body = root.querySelector('.mc-layer__body');\n const content = root.querySelector('.mc-layer__content');\n const overflowingClass = !scrollbaredge\n ? 'mc-layer__body--overflowing'\n : 'mc-layer__body--overflowing-scroll-edge';\n if (body && content) {\n const bodyHeight = body.clientHeight;\n const contentHeight = content.scrollHeight;\n\n if (contentHeight > bodyHeight) {\n body.classList.add(overflowingClass);\n } else {\n body.classList.remove(overflowingClass);\n }\n }\n });\n\n function onClose(): void {\n isopen = false;\n }\n\n function generateIconName(iconname: string): string {\n return `${iconname} size=\"1.5rem\"`;\n }\n</script>\n\n<div bind:this={root}>\n <div\n class=\"mc-layer\"\n tabindex=\"-1\"\n role=\"dialog\"\n aria-labelledby={arialabelledby}\n aria-modal=\"true\"\n aria-hidden={!isopen}\n {...attributes}\n >\n <div\n class=\"mc-layer__dialog {isopen ? ' is-open' : ''} {extended\n ? ' mc-layer__dialog--extend'\n : ''}\"\n role=\"document\"\n >\n <div class=\"mc-layer__header\">\n {#if iconname}\n <span class=\"mc-layer__icon\">\n {@html `<${generateIconName(iconname)} class=\"mc-layer__icon\" />`}\n </span>\n {/if}\n <h2 class=\"mc-layer__title\" id=\"modallayerTitleTitle\">{title}</h2>\n <button\n class=\"mc-layer__close\"\n type=\"button\"\n on:click={() => onClose()}\n >\n <span class=\"mc-layer__close-text\">{closebuttontext}</span>\n </button>\n </div>\n <main\n class=\"mc-layer__body {scrollbaredge\n ? 'mc-layer__body--overflowing-scroll-edge'\n : ''}\"\n >\n <article class=\"mc-layer__content\">\n <slot name=\"content\" />\n </article>\n </main>\n {#if !hideFooter}\n <footer class=\"mc-layer__footer\">\n <slot name=\"footer\" />\n </footer>\n {/if}\n </div>\n </div>\n <div\n class=\"mc-layer-overlay {isopen ? ' is-visible' : ''}\"\n tabindex=\"-1\"\n role=\"dialog\"\n on:click={() => onClose()}\n />\n</div>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/_all-settings';\n @import '@mozaic-ds/styles/components/c.layer';\n</style>\n"],"names":["raw_value","generateIconName","ctx","insert","target","span","anchor","dirty","innerHTML","footer","create_if_block_1","create_if_block","div4","append","div2","div1","div0","h2","button","main","article","div3","div2_aria_hidden_value","iconname","root","title","$$props","isopen","extended","scrollbaredge","closebuttontext","hidefooter","arialabelledby","eventHandler","EventHandler","onClose","$$invalidate","onMount","body","querySelector","content","overflowingClass","bodyHeight","clientHeight","scrollHeight","classList","add","remove","hide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e,cAAc,mBAC1BC,EAAUhB,EAAKe,cAAc,sBAC7BE,EAAoBZ,EAEtB,0CADA,8BAEA,GAAAS,GAAQE,EAAO,OACXE,EAAaJ,EAAKK,aACFH,EAAQI,aAEVF,EAClBJ,EAAKO,UAAUC,IAAIL,GAEnBH,EAAKO,UAAUE,OAAON,6YArB3BL,EAAA,EAAEY,EAAajB,SAAAA,kBACbJ,EACCM,EAAagB,SAAS,eAAc,IACpChB,EAAagB,SAAS,eAAc,CAAA,QACrCC,EAALC,OAAAC,UAAuBC,2BACXH,EAAWI,oCAwDGnB,QAyBNA,4CAnDJX,EAAI+B"}
@@ -10,6 +10,7 @@
10
10
  export let closebuttontext = 'Close';
11
11
  export let iconname: string | undefined = undefined;
12
12
  export let hidefooter: boolean;
13
+ export let arialabelledby = 'LayerTitle';
13
14
 
14
15
  $: hideFooter = hidefooter ?? false;
15
16
  $: isopen
@@ -51,7 +52,7 @@
51
52
  class="mc-layer"
52
53
  tabindex="-1"
53
54
  role="dialog"
54
- aria-labelledby="layerTitle"
55
+ aria-labelledby={arialabelledby}
55
56
  aria-modal="true"
56
57
  aria-hidden={!isopen}
57
58
  {...attributes}