@budibase/bbui 1.4.1 → 1.4.2

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 (154) hide show
  1. package/LICENSE +375 -0
  2. package/README.md +19 -17
  3. package/dist/bbui.es.js +14 -0
  4. package/dist/bbui.es.js.map +1 -0
  5. package/package.json +71 -26
  6. package/src/ActionButton/ActionButton.svelte +102 -0
  7. package/src/ActionGroup/ActionGroup.svelte +26 -0
  8. package/src/ActionMenu/ActionMenu.svelte +44 -0
  9. package/src/Actions/ClickOutside.svench.svx +30 -0
  10. package/src/Actions/PositionDropdown.svench.svx +81 -0
  11. package/src/Actions/autoresize_textarea.js +14 -0
  12. package/src/Actions/click_outside.js +18 -0
  13. package/src/Actions/position_dropdown.js +75 -0
  14. package/src/Avatar/Avatar.svelte +62 -0
  15. package/src/Badge/Badge.svelte +29 -0
  16. package/src/Banner/Banner.svelte +72 -0
  17. package/src/Banner/BannerDisplay.svelte +41 -0
  18. package/src/Button/Button.svelte +114 -0
  19. package/src/Button/Button.svench +138 -0
  20. package/src/ButtonGroup/ButtonGroup.svelte +30 -0
  21. package/src/ClearButton/ClearButton.svelte +19 -0
  22. package/src/ColorPicker/ColorPicker.svelte +297 -0
  23. package/src/DetailSummary/DetailSummary.svelte +83 -0
  24. package/src/Divider/Divider.svelte +28 -0
  25. package/src/Drawer/Drawer.svelte +113 -0
  26. package/src/Drawer/Drawer.svench +42 -0
  27. package/src/Drawer/DrawerContent.svelte +46 -0
  28. package/src/Form/Checkbox.svelte +23 -0
  29. package/src/Form/Combobox.svelte +45 -0
  30. package/src/Form/Core/Checkbox.svelte +69 -0
  31. package/src/Form/Core/CheckboxGroup.svelte +68 -0
  32. package/src/Form/Core/Combobox.svelte +142 -0
  33. package/src/Form/Core/DatePicker.svelte +257 -0
  34. package/src/Form/Core/Dropzone.svelte +450 -0
  35. package/src/Form/Core/InputDropdown.svelte +228 -0
  36. package/src/Form/Core/Multiselect.svelte +90 -0
  37. package/src/Form/Core/Picker.svelte +259 -0
  38. package/src/Form/Core/PickerDropdown.svelte +436 -0
  39. package/src/Form/Core/RadioGroup.svelte +48 -0
  40. package/src/Form/Core/RichTextField.svelte +42 -0
  41. package/src/Form/Core/Search.svelte +105 -0
  42. package/src/Form/Core/Select.svelte +75 -0
  43. package/src/Form/Core/Slider.svelte +86 -0
  44. package/src/Form/Core/Stepper.svelte +172 -0
  45. package/src/Form/Core/Switch.svelte +37 -0
  46. package/src/Form/Core/TextArea.svelte +78 -0
  47. package/src/Form/Core/TextField.svelte +119 -0
  48. package/src/Form/Core/index.js +15 -0
  49. package/src/Form/DatePicker.svelte +39 -0
  50. package/src/Form/Dropzone.svelte +42 -0
  51. package/src/Form/Field.svelte +42 -0
  52. package/src/Form/FieldLabel.svelte +32 -0
  53. package/src/Form/Input.svelte +40 -45
  54. package/src/Form/InputDropdown.svelte +55 -0
  55. package/src/Form/Multiselect.svelte +40 -0
  56. package/src/Form/PickerDropdown.svelte +134 -0
  57. package/src/Form/RadioGroup.svelte +42 -0
  58. package/src/Form/RichTextField.svelte +36 -0
  59. package/src/Form/Search.svelte +36 -0
  60. package/src/Form/Select.svelte +48 -43
  61. package/src/Form/Slider.svelte +24 -0
  62. package/src/Form/Stepper.svelte +45 -0
  63. package/src/Form/TextArea.svelte +29 -44
  64. package/src/Form/Toggle.svelte +23 -0
  65. package/src/Icon/Icon.svelte +91 -0
  66. package/src/IconPicker/IconPicker.svelte +177 -0
  67. package/src/IconSideNav/IconSideNav.svelte +14 -0
  68. package/src/IconSideNav/IconSideNavItem.svelte +56 -0
  69. package/src/InlineAlert/InlineAlert.svelte +60 -0
  70. package/src/Label/Label.svelte +29 -0
  71. package/src/Layout/Layout.svelte +94 -0
  72. package/src/Layout/Page.svelte +32 -0
  73. package/src/Link/Link.svelte +24 -0
  74. package/src/List/List.svelte +28 -0
  75. package/src/List/ListItem.svelte +98 -0
  76. package/src/Markdown/MarkdownEditor.svelte +60 -0
  77. package/src/Markdown/MarkdownViewer.svelte +70 -0
  78. package/src/Markdown/SpectrumMDE.svelte +184 -0
  79. package/src/Menu/Item.svelte +96 -0
  80. package/src/Menu/Menu.svelte +7 -0
  81. package/src/Menu/Menu.svench +19 -0
  82. package/src/Menu/Section.svelte +10 -0
  83. package/src/Menu/Separator.svelte +1 -0
  84. package/src/Modal/Content.svelte +6 -0
  85. package/src/Modal/CustomContent.svelte +38 -0
  86. package/src/Modal/Modal.svelte +165 -0
  87. package/src/Modal/Modal.svench +117 -0
  88. package/src/Modal/ModalContent.svelte +190 -0
  89. package/src/Modal/QuizModal.svelte +54 -0
  90. package/src/Notification/Notification.svelte +70 -0
  91. package/src/Notification/NotificationDisplay.svelte +43 -0
  92. package/src/Pagination/Pagination.svelte +57 -0
  93. package/src/Popover/Popover.svelte +78 -0
  94. package/src/Popover/Popover.svench +121 -0
  95. package/src/ProgressBar/ProgressBar.svelte +67 -0
  96. package/src/ProgressCircle/ProgressCircle.svelte +62 -0
  97. package/src/SideNavigation/Item.svelte +61 -0
  98. package/src/SideNavigation/Navigation.svelte +12 -0
  99. package/src/StatusLight/StatusLight.svelte +80 -0
  100. package/src/Stores/Notifications.svench.svx +78 -0
  101. package/src/Stores/banner.js +65 -0
  102. package/src/Stores/notifications.js +84 -0
  103. package/src/Table/ArrayRenderer.svelte +17 -0
  104. package/src/Table/AttachmentRenderer.svelte +67 -0
  105. package/src/Table/BoldRenderer.svelte +15 -0
  106. package/src/Table/BooleanRenderer.svelte +42 -0
  107. package/src/Table/CellRenderer.svelte +69 -0
  108. package/src/Table/CodeRenderer.svelte +14 -0
  109. package/src/Table/DateTimeRenderer.svelte +29 -0
  110. package/src/Table/InternalRenderer.svelte +24 -0
  111. package/src/Table/RelationshipRenderer.svelte +40 -0
  112. package/src/Table/SelectEditRenderer.svelte +28 -0
  113. package/src/Table/StringRenderer.svelte +14 -0
  114. package/src/Table/Table.svelte +635 -0
  115. package/src/Table/index.js +1 -0
  116. package/src/Tabs/Tab.svelte +88 -0
  117. package/src/Tabs/Tabs.svelte +130 -0
  118. package/src/Tags/Tag.svelte +43 -0
  119. package/src/Tags/Tags.svelte +7 -0
  120. package/src/Tooltip/Tooltip.svelte +34 -0
  121. package/src/Tooltip/TooltipWrapper.svelte +60 -0
  122. package/src/TreeView/Item.svelte +41 -0
  123. package/src/TreeView/Tree.svelte +16 -0
  124. package/src/Typography/Body.svelte +21 -0
  125. package/src/Typography/Code.svelte +10 -0
  126. package/src/Typography/Detail.svelte +19 -0
  127. package/src/Typography/Heading.svelte +17 -0
  128. package/src/bbui.css +96 -0
  129. package/src/context.js +3 -0
  130. package/src/helpers.js +134 -0
  131. package/src/index.js +98 -12
  132. package/src/spectrum-icons-rollup.js +31 -0
  133. package/src/spectrum-icons-vite.js +31 -0
  134. package/dist/bundle.css +0 -8
  135. package/dist/bundle.css.map +0 -22
  136. package/dist/index.js +0 -1275
  137. package/dist/index.mjs +0 -1260
  138. package/src/Branding/Budibase-logo.svelte +0 -68
  139. package/src/Branding/Logo.svelte +0 -16
  140. package/src/Branding/Logo.svench +0 -8
  141. package/src/Form/Button.svelte +0 -131
  142. package/src/Form/Button.svench +0 -49
  143. package/src/Form/Input.svench +0 -8
  144. package/src/Form/Select.svench +0 -8
  145. package/src/Form/TextArea.svench +0 -8
  146. package/src/Links/Home.svelte +0 -49
  147. package/src/Links/Home.svench +0 -19
  148. package/src/List/Items/DetailSummary.svelte +0 -66
  149. package/src/List/Items/DetailSummary.svench +0 -15
  150. package/src/Switcher/Switcher.svelte +0 -39
  151. package/src/Switcher/Switcher.svench +0 -25
  152. package/src/actions/autoresize_textarea.js +0 -14
  153. package/src/icons/Contribution.svelte +0 -14
  154. package/src/index.svench.svx +0 -35
package/dist/index.mjs DELETED
@@ -1,1260 +0,0 @@
1
- function noop() { }
2
- function assign(tar, src) {
3
- // @ts-ignore
4
- for (const k in src)
5
- tar[k] = src[k];
6
- return tar;
7
- }
8
- function run(fn) {
9
- return fn();
10
- }
11
- function blank_object() {
12
- return Object.create(null);
13
- }
14
- function run_all(fns) {
15
- fns.forEach(run);
16
- }
17
- function is_function(thing) {
18
- return typeof thing === 'function';
19
- }
20
- function safe_not_equal(a, b) {
21
- return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
22
- }
23
- function create_slot(definition, ctx, $$scope, fn) {
24
- if (definition) {
25
- const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);
26
- return definition[0](slot_ctx);
27
- }
28
- }
29
- function get_slot_context(definition, ctx, $$scope, fn) {
30
- return definition[1] && fn
31
- ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))
32
- : $$scope.ctx;
33
- }
34
- function get_slot_changes(definition, $$scope, dirty, fn) {
35
- if (definition[2] && fn) {
36
- const lets = definition[2](fn(dirty));
37
- if ($$scope.dirty === undefined) {
38
- return lets;
39
- }
40
- if (typeof lets === 'object') {
41
- const merged = [];
42
- const len = Math.max($$scope.dirty.length, lets.length);
43
- for (let i = 0; i < len; i += 1) {
44
- merged[i] = $$scope.dirty[i] | lets[i];
45
- }
46
- return merged;
47
- }
48
- return $$scope.dirty | lets;
49
- }
50
- return $$scope.dirty;
51
- }
52
- function update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {
53
- const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);
54
- if (slot_changes) {
55
- const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);
56
- slot.p(slot_context, slot_changes);
57
- }
58
- }
59
- function action_destroyer(action_result) {
60
- return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;
61
- }
62
-
63
- function append(target, node) {
64
- target.appendChild(node);
65
- }
66
- function insert(target, node, anchor) {
67
- target.insertBefore(node, anchor || null);
68
- }
69
- function detach(node) {
70
- node.parentNode.removeChild(node);
71
- }
72
- function destroy_each(iterations, detaching) {
73
- for (let i = 0; i < iterations.length; i += 1) {
74
- if (iterations[i])
75
- iterations[i].d(detaching);
76
- }
77
- }
78
- function element(name) {
79
- return document.createElement(name);
80
- }
81
- function text(data) {
82
- return document.createTextNode(data);
83
- }
84
- function space() {
85
- return text(' ');
86
- }
87
- function listen(node, event, handler, options) {
88
- node.addEventListener(event, handler, options);
89
- return () => node.removeEventListener(event, handler, options);
90
- }
91
- function prevent_default(fn) {
92
- return function (event) {
93
- event.preventDefault();
94
- // @ts-ignore
95
- return fn.call(this, event);
96
- };
97
- }
98
- function attr(node, attribute, value) {
99
- if (value == null)
100
- node.removeAttribute(attribute);
101
- else if (node.getAttribute(attribute) !== value)
102
- node.setAttribute(attribute, value);
103
- }
104
- function children(element) {
105
- return Array.from(element.childNodes);
106
- }
107
- function set_data(text, data) {
108
- data = '' + data;
109
- if (text.data !== data)
110
- text.data = data;
111
- }
112
- function set_input_value(input, value) {
113
- input.value = value == null ? '' : value;
114
- }
115
- function toggle_class(element, name, toggle) {
116
- element.classList[toggle ? 'add' : 'remove'](name);
117
- }
118
-
119
- let current_component;
120
- function set_current_component(component) {
121
- current_component = component;
122
- }
123
- // TODO figure out if we still want to support
124
- // shorthand events, or if we want to implement
125
- // a real bubbling mechanism
126
- function bubble(component, event) {
127
- const callbacks = component.$$.callbacks[event.type];
128
- if (callbacks) {
129
- callbacks.slice().forEach(fn => fn(event));
130
- }
131
- }
132
-
133
- const dirty_components = [];
134
- const binding_callbacks = [];
135
- const render_callbacks = [];
136
- const flush_callbacks = [];
137
- const resolved_promise = Promise.resolve();
138
- let update_scheduled = false;
139
- function schedule_update() {
140
- if (!update_scheduled) {
141
- update_scheduled = true;
142
- resolved_promise.then(flush);
143
- }
144
- }
145
- function add_render_callback(fn) {
146
- render_callbacks.push(fn);
147
- }
148
- let flushing = false;
149
- const seen_callbacks = new Set();
150
- function flush() {
151
- if (flushing)
152
- return;
153
- flushing = true;
154
- do {
155
- // first, call beforeUpdate functions
156
- // and update components
157
- for (let i = 0; i < dirty_components.length; i += 1) {
158
- const component = dirty_components[i];
159
- set_current_component(component);
160
- update(component.$$);
161
- }
162
- dirty_components.length = 0;
163
- while (binding_callbacks.length)
164
- binding_callbacks.pop()();
165
- // then, once components are updated, call
166
- // afterUpdate functions. This may cause
167
- // subsequent updates...
168
- for (let i = 0; i < render_callbacks.length; i += 1) {
169
- const callback = render_callbacks[i];
170
- if (!seen_callbacks.has(callback)) {
171
- // ...so guard against infinite loops
172
- seen_callbacks.add(callback);
173
- callback();
174
- }
175
- }
176
- render_callbacks.length = 0;
177
- } while (dirty_components.length);
178
- while (flush_callbacks.length) {
179
- flush_callbacks.pop()();
180
- }
181
- update_scheduled = false;
182
- flushing = false;
183
- seen_callbacks.clear();
184
- }
185
- function update($$) {
186
- if ($$.fragment !== null) {
187
- $$.update();
188
- run_all($$.before_update);
189
- const dirty = $$.dirty;
190
- $$.dirty = [-1];
191
- $$.fragment && $$.fragment.p($$.ctx, dirty);
192
- $$.after_update.forEach(add_render_callback);
193
- }
194
- }
195
- const outroing = new Set();
196
- let outros;
197
- function group_outros() {
198
- outros = {
199
- r: 0,
200
- c: [],
201
- p: outros // parent group
202
- };
203
- }
204
- function check_outros() {
205
- if (!outros.r) {
206
- run_all(outros.c);
207
- }
208
- outros = outros.p;
209
- }
210
- function transition_in(block, local) {
211
- if (block && block.i) {
212
- outroing.delete(block);
213
- block.i(local);
214
- }
215
- }
216
- function transition_out(block, local, detach, callback) {
217
- if (block && block.o) {
218
- if (outroing.has(block))
219
- return;
220
- outroing.add(block);
221
- outros.c.push(() => {
222
- outroing.delete(block);
223
- if (callback) {
224
- if (detach)
225
- block.d(1);
226
- callback();
227
- }
228
- });
229
- block.o(local);
230
- }
231
- }
232
- function create_component(block) {
233
- block && block.c();
234
- }
235
- function mount_component(component, target, anchor) {
236
- const { fragment, on_mount, on_destroy, after_update } = component.$$;
237
- fragment && fragment.m(target, anchor);
238
- // onMount happens before the initial afterUpdate
239
- add_render_callback(() => {
240
- const new_on_destroy = on_mount.map(run).filter(is_function);
241
- if (on_destroy) {
242
- on_destroy.push(...new_on_destroy);
243
- }
244
- else {
245
- // Edge case - component was destroyed immediately,
246
- // most likely as a result of a binding initialising
247
- run_all(new_on_destroy);
248
- }
249
- component.$$.on_mount = [];
250
- });
251
- after_update.forEach(add_render_callback);
252
- }
253
- function destroy_component(component, detaching) {
254
- const $$ = component.$$;
255
- if ($$.fragment !== null) {
256
- run_all($$.on_destroy);
257
- $$.fragment && $$.fragment.d(detaching);
258
- // TODO null out other refs, including component.$$ (but need to
259
- // preserve final state?)
260
- $$.on_destroy = $$.fragment = null;
261
- $$.ctx = [];
262
- }
263
- }
264
- function make_dirty(component, i) {
265
- if (component.$$.dirty[0] === -1) {
266
- dirty_components.push(component);
267
- schedule_update();
268
- component.$$.dirty.fill(0);
269
- }
270
- component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));
271
- }
272
- function init(component, options, instance, create_fragment, not_equal, props, dirty = [-1]) {
273
- const parent_component = current_component;
274
- set_current_component(component);
275
- const prop_values = options.props || {};
276
- const $$ = component.$$ = {
277
- fragment: null,
278
- ctx: null,
279
- // state
280
- props,
281
- update: noop,
282
- not_equal,
283
- bound: blank_object(),
284
- // lifecycle
285
- on_mount: [],
286
- on_destroy: [],
287
- before_update: [],
288
- after_update: [],
289
- context: new Map(parent_component ? parent_component.$$.context : []),
290
- // everything else
291
- callbacks: blank_object(),
292
- dirty
293
- };
294
- let ready = false;
295
- $$.ctx = instance
296
- ? instance(component, prop_values, (i, ret, ...rest) => {
297
- const value = rest.length ? rest[0] : ret;
298
- if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {
299
- if ($$.bound[i])
300
- $$.bound[i](value);
301
- if (ready)
302
- make_dirty(component, i);
303
- }
304
- return ret;
305
- })
306
- : [];
307
- $$.update();
308
- ready = true;
309
- run_all($$.before_update);
310
- // `false` as a special case of no DOM component
311
- $$.fragment = create_fragment ? create_fragment($$.ctx) : false;
312
- if (options.target) {
313
- if (options.hydrate) {
314
- const nodes = children(options.target);
315
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
316
- $$.fragment && $$.fragment.l(nodes);
317
- nodes.forEach(detach);
318
- }
319
- else {
320
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
321
- $$.fragment && $$.fragment.c();
322
- }
323
- if (options.intro)
324
- transition_in(component.$$.fragment);
325
- mount_component(component, options.target, options.anchor);
326
- flush();
327
- }
328
- set_current_component(parent_component);
329
- }
330
- class SvelteComponent {
331
- $destroy() {
332
- destroy_component(this, 1);
333
- this.$destroy = noop;
334
- }
335
- $on(type, callback) {
336
- const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));
337
- callbacks.push(callback);
338
- return () => {
339
- const index = callbacks.indexOf(callback);
340
- if (index !== -1)
341
- callbacks.splice(index, 1);
342
- };
343
- }
344
- $set() {
345
- // overridden by instance, if it has props
346
- }
347
- }
348
-
349
- /* src/Form/Input.svelte generated by Svelte v3.23.2 */
350
-
351
- function create_fragment(ctx) {
352
- let div;
353
- let label_1;
354
- let t0;
355
- let t1;
356
- let input;
357
- let validator_action;
358
- let mounted;
359
- let dispose;
360
-
361
- return {
362
- c() {
363
- div = element("div");
364
- label_1 = element("label");
365
- t0 = text(/*label*/ ctx[1]);
366
- t1 = space();
367
- input = element("input");
368
- attr(label_1, "for", /*name*/ ctx[0]);
369
- attr(label_1, "class", "svelte-1ujfzyw");
370
- attr(input, "type", /*type*/ ctx[2]);
371
- attr(input, "name", /*name*/ ctx[0]);
372
- attr(input, "placeholder", /*placeholder*/ ctx[3]);
373
- attr(input, "class", "svelte-1ujfzyw");
374
- attr(div, "class", "container svelte-1ujfzyw");
375
- },
376
- m(target, anchor) {
377
- insert(target, div, anchor);
378
- append(div, label_1);
379
- append(label_1, t0);
380
- append(div, t1);
381
- append(div, input);
382
-
383
- if (!mounted) {
384
- dispose = [
385
- listen(input, "change", /*change_handler*/ ctx[5]),
386
- listen(input, "input", /*input_handler*/ ctx[6]),
387
- action_destroyer(validator_action = /*validator*/ ctx[4].call(null, input))
388
- ];
389
-
390
- mounted = true;
391
- }
392
- },
393
- p(ctx, [dirty]) {
394
- if (dirty & /*label*/ 2) set_data(t0, /*label*/ ctx[1]);
395
-
396
- if (dirty & /*name*/ 1) {
397
- attr(label_1, "for", /*name*/ ctx[0]);
398
- }
399
-
400
- if (dirty & /*type*/ 4) {
401
- attr(input, "type", /*type*/ ctx[2]);
402
- }
403
-
404
- if (dirty & /*name*/ 1) {
405
- attr(input, "name", /*name*/ ctx[0]);
406
- }
407
-
408
- if (dirty & /*placeholder*/ 8) {
409
- attr(input, "placeholder", /*placeholder*/ ctx[3]);
410
- }
411
- },
412
- i: noop,
413
- o: noop,
414
- d(detaching) {
415
- if (detaching) detach(div);
416
- mounted = false;
417
- run_all(dispose);
418
- }
419
- };
420
- }
421
-
422
- function instance($$self, $$props, $$invalidate) {
423
- let { name } = $$props,
424
- { label } = $$props,
425
- { type } = $$props,
426
- { placeholder } = $$props,
427
- { validator = () => {
428
-
429
- } } = $$props;
430
-
431
- function change_handler(event) {
432
- bubble($$self, event);
433
- }
434
-
435
- function input_handler(event) {
436
- bubble($$self, event);
437
- }
438
-
439
- $$self.$set = $$props => {
440
- if ("name" in $$props) $$invalidate(0, name = $$props.name);
441
- if ("label" in $$props) $$invalidate(1, label = $$props.label);
442
- if ("type" in $$props) $$invalidate(2, type = $$props.type);
443
- if ("placeholder" in $$props) $$invalidate(3, placeholder = $$props.placeholder);
444
- if ("validator" in $$props) $$invalidate(4, validator = $$props.validator);
445
- };
446
-
447
- return [name, label, type, placeholder, validator, change_handler, input_handler];
448
- }
449
-
450
- class Input extends SvelteComponent {
451
- constructor(options) {
452
- super();
453
-
454
- init(this, options, instance, create_fragment, safe_not_equal, {
455
- name: 0,
456
- label: 1,
457
- type: 2,
458
- placeholder: 3,
459
- validator: 4
460
- });
461
- }
462
- }
463
-
464
- function resize({ target }) {
465
- target.style.height = "1px";
466
- target.style.height = (+target.scrollHeight) + "px";
467
- }
468
-
469
- function text_area_resize(el) {
470
- resize({ target: el });
471
- el.style.overflow = 'hidden';
472
- el.addEventListener('input', resize);
473
-
474
- return {
475
- destroy: () => el.removeEventListener('input', resize)
476
- }
477
- }
478
-
479
- /* src/Form/TextArea.svelte generated by Svelte v3.23.2 */
480
-
481
- function create_fragment$1(ctx) {
482
- let div;
483
- let label_1;
484
- let t0;
485
- let t1;
486
- let textarea;
487
- let text_area_resize_action;
488
- let mounted;
489
- let dispose;
490
-
491
- return {
492
- c() {
493
- div = element("div");
494
- label_1 = element("label");
495
- t0 = text(/*label*/ ctx[2]);
496
- t1 = space();
497
- textarea = element("textarea");
498
- attr(label_1, "for", /*name*/ ctx[1]);
499
- attr(label_1, "class", "svelte-b7rdfu");
500
- attr(textarea, "placeholder", /*placeholder*/ ctx[3]);
501
- attr(textarea, "name", /*name*/ ctx[1]);
502
- attr(textarea, "class", "svelte-b7rdfu");
503
- attr(div, "class", "container svelte-b7rdfu");
504
- },
505
- m(target, anchor) {
506
- insert(target, div, anchor);
507
- append(div, label_1);
508
- append(label_1, t0);
509
- append(div, t1);
510
- append(div, textarea);
511
- set_input_value(textarea, /*value*/ ctx[0]);
512
-
513
- if (!mounted) {
514
- dispose = [
515
- listen(textarea, "input", /*textarea_input_handler*/ ctx[5]),
516
- action_destroyer(text_area_resize_action = text_area_resize.call(null, textarea))
517
- ];
518
-
519
- mounted = true;
520
- }
521
- },
522
- p(ctx, [dirty]) {
523
- if (dirty & /*label*/ 4) set_data(t0, /*label*/ ctx[2]);
524
-
525
- if (dirty & /*name*/ 2) {
526
- attr(label_1, "for", /*name*/ ctx[1]);
527
- }
528
-
529
- if (dirty & /*placeholder*/ 8) {
530
- attr(textarea, "placeholder", /*placeholder*/ ctx[3]);
531
- }
532
-
533
- if (dirty & /*name*/ 2) {
534
- attr(textarea, "name", /*name*/ ctx[1]);
535
- }
536
-
537
- if (dirty & /*value*/ 1) {
538
- set_input_value(textarea, /*value*/ ctx[0]);
539
- }
540
- },
541
- i: noop,
542
- o: noop,
543
- d(detaching) {
544
- if (detaching) detach(div);
545
- mounted = false;
546
- run_all(dispose);
547
- }
548
- };
549
- }
550
-
551
- function instance$1($$self, $$props, $$invalidate) {
552
- let { name } = $$props,
553
- { label } = $$props,
554
- { value } = $$props,
555
- { placeholder } = $$props,
556
- { validator = () => {
557
-
558
- } } = $$props;
559
-
560
- function textarea_input_handler() {
561
- value = this.value;
562
- $$invalidate(0, value);
563
- }
564
-
565
- $$self.$set = $$props => {
566
- if ("name" in $$props) $$invalidate(1, name = $$props.name);
567
- if ("label" in $$props) $$invalidate(2, label = $$props.label);
568
- if ("value" in $$props) $$invalidate(0, value = $$props.value);
569
- if ("placeholder" in $$props) $$invalidate(3, placeholder = $$props.placeholder);
570
- if ("validator" in $$props) $$invalidate(4, validator = $$props.validator);
571
- };
572
-
573
- return [value, name, label, placeholder, validator, textarea_input_handler];
574
- }
575
-
576
- class TextArea extends SvelteComponent {
577
- constructor(options) {
578
- super();
579
-
580
- init(this, options, instance$1, create_fragment$1, safe_not_equal, {
581
- name: 1,
582
- label: 2,
583
- value: 0,
584
- placeholder: 3,
585
- validator: 4
586
- });
587
- }
588
- }
589
-
590
- /* src/Form/Button.svelte generated by Svelte v3.23.2 */
591
-
592
- function create_fragment$2(ctx) {
593
- let button;
594
- let current;
595
- let mounted;
596
- let dispose;
597
- const default_slot_template = /*$$slots*/ ctx[11].default;
598
- const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[10], null);
599
-
600
- return {
601
- c() {
602
- button = element("button");
603
- if (default_slot) default_slot.c();
604
- button.disabled = /*disabled*/ ctx[3];
605
- attr(button, "class", "svelte-1oez5n8");
606
- toggle_class(button, "primary", /*primary*/ ctx[0]);
607
- toggle_class(button, "secondary", /*secondary*/ ctx[1]);
608
- toggle_class(button, "attention", /*attention*/ ctx[2]);
609
- toggle_class(button, "error", /*error*/ ctx[4]);
610
- toggle_class(button, "warning", /*warning*/ ctx[5]);
611
- toggle_class(button, "small", /*small*/ ctx[6]);
612
- toggle_class(button, "medium", /*medium*/ ctx[7]);
613
- toggle_class(button, "wide", /*wide*/ ctx[8]);
614
- toggle_class(button, "large", /*large*/ ctx[9]);
615
- },
616
- m(target, anchor) {
617
- insert(target, button, anchor);
618
-
619
- if (default_slot) {
620
- default_slot.m(button, null);
621
- }
622
-
623
- current = true;
624
-
625
- if (!mounted) {
626
- dispose = listen(button, "click", prevent_default(/*click_handler*/ ctx[12]));
627
- mounted = true;
628
- }
629
- },
630
- p(ctx, [dirty]) {
631
- if (default_slot) {
632
- if (default_slot.p && dirty & /*$$scope*/ 1024) {
633
- update_slot(default_slot, default_slot_template, ctx, /*$$scope*/ ctx[10], dirty, null, null);
634
- }
635
- }
636
-
637
- if (!current || dirty & /*disabled*/ 8) {
638
- button.disabled = /*disabled*/ ctx[3];
639
- }
640
-
641
- if (dirty & /*primary*/ 1) {
642
- toggle_class(button, "primary", /*primary*/ ctx[0]);
643
- }
644
-
645
- if (dirty & /*secondary*/ 2) {
646
- toggle_class(button, "secondary", /*secondary*/ ctx[1]);
647
- }
648
-
649
- if (dirty & /*attention*/ 4) {
650
- toggle_class(button, "attention", /*attention*/ ctx[2]);
651
- }
652
-
653
- if (dirty & /*error*/ 16) {
654
- toggle_class(button, "error", /*error*/ ctx[4]);
655
- }
656
-
657
- if (dirty & /*warning*/ 32) {
658
- toggle_class(button, "warning", /*warning*/ ctx[5]);
659
- }
660
-
661
- if (dirty & /*small*/ 64) {
662
- toggle_class(button, "small", /*small*/ ctx[6]);
663
- }
664
-
665
- if (dirty & /*medium*/ 128) {
666
- toggle_class(button, "medium", /*medium*/ ctx[7]);
667
- }
668
-
669
- if (dirty & /*wide*/ 256) {
670
- toggle_class(button, "wide", /*wide*/ ctx[8]);
671
- }
672
-
673
- if (dirty & /*large*/ 512) {
674
- toggle_class(button, "large", /*large*/ ctx[9]);
675
- }
676
- },
677
- i(local) {
678
- if (current) return;
679
- transition_in(default_slot, local);
680
- current = true;
681
- },
682
- o(local) {
683
- transition_out(default_slot, local);
684
- current = false;
685
- },
686
- d(detaching) {
687
- if (detaching) detach(button);
688
- if (default_slot) default_slot.d(detaching);
689
- mounted = false;
690
- dispose();
691
- }
692
- };
693
- }
694
-
695
- function instance$2($$self, $$props, $$invalidate) {
696
- let { primary = false } = $$props,
697
- { secondary = false } = $$props,
698
- { attention = false } = $$props,
699
- { disabled = false } = $$props,
700
- { error = false } = $$props,
701
- { warning = false } = $$props,
702
- { small = false } = $$props,
703
- { medium = false } = $$props,
704
- { wide = false } = $$props,
705
- { large = false } = $$props;
706
-
707
- let { $$slots = {}, $$scope } = $$props;
708
-
709
- function click_handler(event) {
710
- bubble($$self, event);
711
- }
712
-
713
- $$self.$set = $$props => {
714
- if ("primary" in $$props) $$invalidate(0, primary = $$props.primary);
715
- if ("secondary" in $$props) $$invalidate(1, secondary = $$props.secondary);
716
- if ("attention" in $$props) $$invalidate(2, attention = $$props.attention);
717
- if ("disabled" in $$props) $$invalidate(3, disabled = $$props.disabled);
718
- if ("error" in $$props) $$invalidate(4, error = $$props.error);
719
- if ("warning" in $$props) $$invalidate(5, warning = $$props.warning);
720
- if ("small" in $$props) $$invalidate(6, small = $$props.small);
721
- if ("medium" in $$props) $$invalidate(7, medium = $$props.medium);
722
- if ("wide" in $$props) $$invalidate(8, wide = $$props.wide);
723
- if ("large" in $$props) $$invalidate(9, large = $$props.large);
724
- if ("$$scope" in $$props) $$invalidate(10, $$scope = $$props.$$scope);
725
- };
726
-
727
- return [
728
- primary,
729
- secondary,
730
- attention,
731
- disabled,
732
- error,
733
- warning,
734
- small,
735
- medium,
736
- wide,
737
- large,
738
- $$scope,
739
- $$slots,
740
- click_handler
741
- ];
742
- }
743
-
744
- class Button extends SvelteComponent {
745
- constructor(options) {
746
- super();
747
-
748
- init(this, options, instance$2, create_fragment$2, safe_not_equal, {
749
- primary: 0,
750
- secondary: 1,
751
- attention: 2,
752
- disabled: 3,
753
- error: 4,
754
- warning: 5,
755
- small: 6,
756
- medium: 7,
757
- wide: 8,
758
- large: 9
759
- });
760
- }
761
- }
762
-
763
- /* src/Links/Home.svelte generated by Svelte v3.23.2 */
764
-
765
- function create_if_block_1(ctx) {
766
- let span;
767
- let switch_instance;
768
- let current;
769
- var switch_value = /*icon*/ ctx[1];
770
-
771
- function switch_props(ctx) {
772
- return {};
773
- }
774
-
775
- if (switch_value) {
776
- switch_instance = new switch_value(switch_props());
777
- }
778
-
779
- return {
780
- c() {
781
- span = element("span");
782
- if (switch_instance) create_component(switch_instance.$$.fragment);
783
- attr(span, "class", "nav-item-icon svelte-dsza1v");
784
- },
785
- m(target, anchor) {
786
- insert(target, span, anchor);
787
-
788
- if (switch_instance) {
789
- mount_component(switch_instance, span, null);
790
- }
791
-
792
- current = true;
793
- },
794
- p(ctx, dirty) {
795
- if (switch_value !== (switch_value = /*icon*/ ctx[1])) {
796
- if (switch_instance) {
797
- group_outros();
798
- const old_component = switch_instance;
799
-
800
- transition_out(old_component.$$.fragment, 1, 0, () => {
801
- destroy_component(old_component, 1);
802
- });
803
-
804
- check_outros();
805
- }
806
-
807
- if (switch_value) {
808
- switch_instance = new switch_value(switch_props());
809
- create_component(switch_instance.$$.fragment);
810
- transition_in(switch_instance.$$.fragment, 1);
811
- mount_component(switch_instance, span, null);
812
- } else {
813
- switch_instance = null;
814
- }
815
- }
816
- },
817
- i(local) {
818
- if (current) return;
819
- if (switch_instance) transition_in(switch_instance.$$.fragment, local);
820
- current = true;
821
- },
822
- o(local) {
823
- if (switch_instance) transition_out(switch_instance.$$.fragment, local);
824
- current = false;
825
- },
826
- d(detaching) {
827
- if (detaching) detach(span);
828
- if (switch_instance) destroy_component(switch_instance);
829
- }
830
- };
831
- }
832
-
833
- // (46:2) {#if title}
834
- function create_if_block(ctx) {
835
- let div;
836
- let t;
837
-
838
- return {
839
- c() {
840
- div = element("div");
841
- t = text(/*title*/ ctx[2]);
842
- attr(div, "class", "nav-item-title svelte-dsza1v");
843
- },
844
- m(target, anchor) {
845
- insert(target, div, anchor);
846
- append(div, t);
847
- },
848
- p(ctx, dirty) {
849
- if (dirty & /*title*/ 4) set_data(t, /*title*/ ctx[2]);
850
- },
851
- d(detaching) {
852
- if (detaching) detach(div);
853
- }
854
- };
855
- }
856
-
857
- function create_fragment$3(ctx) {
858
- let a;
859
- let t;
860
- let current;
861
- let if_block0 = /*icon*/ ctx[1] && create_if_block_1(ctx);
862
- let if_block1 = /*title*/ ctx[2] && create_if_block(ctx);
863
-
864
- return {
865
- c() {
866
- a = element("a");
867
- if (if_block0) if_block0.c();
868
- t = space();
869
- if (if_block1) if_block1.c();
870
- attr(a, "href", /*href*/ ctx[0]);
871
- attr(a, "target", "_blank");
872
- attr(a, "class", "nav-item svelte-dsza1v");
873
- toggle_class(a, "active", /*active*/ ctx[3]);
874
- },
875
- m(target, anchor) {
876
- insert(target, a, anchor);
877
- if (if_block0) if_block0.m(a, null);
878
- append(a, t);
879
- if (if_block1) if_block1.m(a, null);
880
- current = true;
881
- },
882
- p(ctx, [dirty]) {
883
- if (/*icon*/ ctx[1]) {
884
- if (if_block0) {
885
- if_block0.p(ctx, dirty);
886
-
887
- if (dirty & /*icon*/ 2) {
888
- transition_in(if_block0, 1);
889
- }
890
- } else {
891
- if_block0 = create_if_block_1(ctx);
892
- if_block0.c();
893
- transition_in(if_block0, 1);
894
- if_block0.m(a, t);
895
- }
896
- } else if (if_block0) {
897
- group_outros();
898
-
899
- transition_out(if_block0, 1, 1, () => {
900
- if_block0 = null;
901
- });
902
-
903
- check_outros();
904
- }
905
-
906
- if (/*title*/ ctx[2]) {
907
- if (if_block1) {
908
- if_block1.p(ctx, dirty);
909
- } else {
910
- if_block1 = create_if_block(ctx);
911
- if_block1.c();
912
- if_block1.m(a, null);
913
- }
914
- } else if (if_block1) {
915
- if_block1.d(1);
916
- if_block1 = null;
917
- }
918
-
919
- if (!current || dirty & /*href*/ 1) {
920
- attr(a, "href", /*href*/ ctx[0]);
921
- }
922
-
923
- if (dirty & /*active*/ 8) {
924
- toggle_class(a, "active", /*active*/ ctx[3]);
925
- }
926
- },
927
- i(local) {
928
- if (current) return;
929
- transition_in(if_block0);
930
- current = true;
931
- },
932
- o(local) {
933
- transition_out(if_block0);
934
- current = false;
935
- },
936
- d(detaching) {
937
- if (detaching) detach(a);
938
- if (if_block0) if_block0.d();
939
- if (if_block1) if_block1.d();
940
- }
941
- };
942
- }
943
-
944
- function instance$3($$self, $$props, $$invalidate) {
945
- let { href } = $$props,
946
- { icon } = $$props,
947
- { title } = $$props,
948
- { active = false } = $$props;
949
-
950
- $$self.$set = $$props => {
951
- if ("href" in $$props) $$invalidate(0, href = $$props.href);
952
- if ("icon" in $$props) $$invalidate(1, icon = $$props.icon);
953
- if ("title" in $$props) $$invalidate(2, title = $$props.title);
954
- if ("active" in $$props) $$invalidate(3, active = $$props.active);
955
- };
956
-
957
- return [href, icon, title, active];
958
- }
959
-
960
- class Home extends SvelteComponent {
961
- constructor(options) {
962
- super();
963
- init(this, options, instance$3, create_fragment$3, safe_not_equal, { href: 0, icon: 1, title: 2, active: 3 });
964
- }
965
- }
966
-
967
- /* src/List/Items/DetailSummary.svelte generated by Svelte v3.23.2 */
968
-
969
- function create_fragment$4(ctx) {
970
- let div4;
971
- let div2;
972
- let div0;
973
- let i;
974
- let i_class_value;
975
- let t0;
976
- let div1;
977
- let t1_value = /*capitalize*/ ctx[2](/*name*/ ctx[1]) + "";
978
- let t1;
979
- let t2;
980
- let div3;
981
- let current;
982
- let mounted;
983
- let dispose;
984
- const default_slot_template = /*$$slots*/ ctx[4].default;
985
- const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[3], null);
986
-
987
- return {
988
- c() {
989
- div4 = element("div");
990
- div2 = element("div");
991
- div0 = element("div");
992
- i = element("i");
993
- t0 = space();
994
- div1 = element("div");
995
- t1 = text(t1_value);
996
- t2 = space();
997
- div3 = element("div");
998
- if (default_slot) default_slot.c();
999
-
1000
- attr(i, "class", i_class_value = /*show*/ ctx[0]
1001
- ? "ri-arrow-down-s-fill"
1002
- : "ri-arrow-right-s-fill");
1003
-
1004
- attr(div0, "class", "icon svelte-1ds8322");
1005
- attr(div1, "class", "name svelte-1ds8322");
1006
- attr(div2, "class", "property-group-name svelte-1ds8322");
1007
- attr(div3, "class", "property-panel svelte-1ds8322");
1008
- toggle_class(div3, "show", /*show*/ ctx[0]);
1009
- attr(div4, "class", "property-group-container svelte-1ds8322");
1010
- },
1011
- m(target, anchor) {
1012
- insert(target, div4, anchor);
1013
- append(div4, div2);
1014
- append(div2, div0);
1015
- append(div0, i);
1016
- append(div2, t0);
1017
- append(div2, div1);
1018
- append(div1, t1);
1019
- append(div4, t2);
1020
- append(div4, div3);
1021
-
1022
- if (default_slot) {
1023
- default_slot.m(div3, null);
1024
- }
1025
-
1026
- current = true;
1027
-
1028
- if (!mounted) {
1029
- dispose = listen(div2, "click", /*click_handler*/ ctx[5]);
1030
- mounted = true;
1031
- }
1032
- },
1033
- p(ctx, [dirty]) {
1034
- if (!current || dirty & /*show*/ 1 && i_class_value !== (i_class_value = /*show*/ ctx[0]
1035
- ? "ri-arrow-down-s-fill"
1036
- : "ri-arrow-right-s-fill")) {
1037
- attr(i, "class", i_class_value);
1038
- }
1039
-
1040
- if ((!current || dirty & /*name*/ 2) && t1_value !== (t1_value = /*capitalize*/ ctx[2](/*name*/ ctx[1]) + "")) set_data(t1, t1_value);
1041
-
1042
- if (default_slot) {
1043
- if (default_slot.p && dirty & /*$$scope*/ 8) {
1044
- update_slot(default_slot, default_slot_template, ctx, /*$$scope*/ ctx[3], dirty, null, null);
1045
- }
1046
- }
1047
-
1048
- if (dirty & /*show*/ 1) {
1049
- toggle_class(div3, "show", /*show*/ ctx[0]);
1050
- }
1051
- },
1052
- i(local) {
1053
- if (current) return;
1054
- transition_in(default_slot, local);
1055
- current = true;
1056
- },
1057
- o(local) {
1058
- transition_out(default_slot, local);
1059
- current = false;
1060
- },
1061
- d(detaching) {
1062
- if (detaching) detach(div4);
1063
- if (default_slot) default_slot.d(detaching);
1064
- mounted = false;
1065
- dispose();
1066
- }
1067
- };
1068
- }
1069
-
1070
- function instance$4($$self, $$props, $$invalidate) {
1071
- let { name } = $$props, { show = false } = $$props;
1072
- const capitalize = name => name[0].toUpperCase() + name.slice(1);
1073
- let { $$slots = {}, $$scope } = $$props;
1074
- const click_handler = () => $$invalidate(0, show = !show);
1075
-
1076
- $$self.$set = $$props => {
1077
- if ("name" in $$props) $$invalidate(1, name = $$props.name);
1078
- if ("show" in $$props) $$invalidate(0, show = $$props.show);
1079
- if ("$$scope" in $$props) $$invalidate(3, $$scope = $$props.$$scope);
1080
- };
1081
-
1082
- return [show, name, capitalize, $$scope, $$slots, click_handler];
1083
- }
1084
-
1085
- class DetailSummary extends SvelteComponent {
1086
- constructor(options) {
1087
- super();
1088
- init(this, options, instance$4, create_fragment$4, safe_not_equal, { name: 1, show: 0 });
1089
- }
1090
- }
1091
-
1092
- /* src/Switcher/Switcher.svelte generated by Svelte v3.23.2 */
1093
-
1094
- function get_each_context(ctx, list, i) {
1095
- const child_ctx = ctx.slice();
1096
- child_ctx[5] = list[i];
1097
- return child_ctx;
1098
- }
1099
-
1100
- // (30:4) {#each headings as heading}
1101
- function create_each_block(ctx) {
1102
- let span;
1103
- let t0_value = /*heading*/ ctx[5].title + "";
1104
- let t0;
1105
- let t1;
1106
- let mounted;
1107
- let dispose;
1108
-
1109
- function click_handler(...args) {
1110
- return /*click_handler*/ ctx[4](/*heading*/ ctx[5], ...args);
1111
- }
1112
-
1113
- return {
1114
- c() {
1115
- span = element("span");
1116
- t0 = text(t0_value);
1117
- t1 = space();
1118
- attr(span, "class", "svelte-1qsas4l");
1119
- toggle_class(span, "selected", /*value*/ ctx[0] === /*heading*/ ctx[5].key);
1120
- },
1121
- m(target, anchor) {
1122
- insert(target, span, anchor);
1123
- append(span, t0);
1124
- append(span, t1);
1125
-
1126
- if (!mounted) {
1127
- dispose = listen(span, "click", click_handler);
1128
- mounted = true;
1129
- }
1130
- },
1131
- p(new_ctx, dirty) {
1132
- ctx = new_ctx;
1133
- if (dirty & /*headings*/ 2 && t0_value !== (t0_value = /*heading*/ ctx[5].title + "")) set_data(t0, t0_value);
1134
-
1135
- if (dirty & /*value, headings*/ 3) {
1136
- toggle_class(span, "selected", /*value*/ ctx[0] === /*heading*/ ctx[5].key);
1137
- }
1138
- },
1139
- d(detaching) {
1140
- if (detaching) detach(span);
1141
- mounted = false;
1142
- dispose();
1143
- }
1144
- };
1145
- }
1146
-
1147
- function create_fragment$5(ctx) {
1148
- let section;
1149
- let header;
1150
- let t;
1151
- let current;
1152
- let each_value = /*headings*/ ctx[1];
1153
- let each_blocks = [];
1154
-
1155
- for (let i = 0; i < each_value.length; i += 1) {
1156
- each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
1157
- }
1158
-
1159
- const default_slot_template = /*$$slots*/ ctx[3].default;
1160
- const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[2], null);
1161
-
1162
- return {
1163
- c() {
1164
- section = element("section");
1165
- header = element("header");
1166
-
1167
- for (let i = 0; i < each_blocks.length; i += 1) {
1168
- each_blocks[i].c();
1169
- }
1170
-
1171
- t = space();
1172
- if (default_slot) default_slot.c();
1173
- attr(header, "class", "svelte-1qsas4l");
1174
- },
1175
- m(target, anchor) {
1176
- insert(target, section, anchor);
1177
- append(section, header);
1178
-
1179
- for (let i = 0; i < each_blocks.length; i += 1) {
1180
- each_blocks[i].m(header, null);
1181
- }
1182
-
1183
- append(section, t);
1184
-
1185
- if (default_slot) {
1186
- default_slot.m(section, null);
1187
- }
1188
-
1189
- current = true;
1190
- },
1191
- p(ctx, [dirty]) {
1192
- if (dirty & /*value, headings*/ 3) {
1193
- each_value = /*headings*/ ctx[1];
1194
- let i;
1195
-
1196
- for (i = 0; i < each_value.length; i += 1) {
1197
- const child_ctx = get_each_context(ctx, each_value, i);
1198
-
1199
- if (each_blocks[i]) {
1200
- each_blocks[i].p(child_ctx, dirty);
1201
- } else {
1202
- each_blocks[i] = create_each_block(child_ctx);
1203
- each_blocks[i].c();
1204
- each_blocks[i].m(header, null);
1205
- }
1206
- }
1207
-
1208
- for (; i < each_blocks.length; i += 1) {
1209
- each_blocks[i].d(1);
1210
- }
1211
-
1212
- each_blocks.length = each_value.length;
1213
- }
1214
-
1215
- if (default_slot) {
1216
- if (default_slot.p && dirty & /*$$scope*/ 4) {
1217
- update_slot(default_slot, default_slot_template, ctx, /*$$scope*/ ctx[2], dirty, null, null);
1218
- }
1219
- }
1220
- },
1221
- i(local) {
1222
- if (current) return;
1223
- transition_in(default_slot, local);
1224
- current = true;
1225
- },
1226
- o(local) {
1227
- transition_out(default_slot, local);
1228
- current = false;
1229
- },
1230
- d(detaching) {
1231
- if (detaching) detach(section);
1232
- destroy_each(each_blocks, detaching);
1233
- if (default_slot) default_slot.d(detaching);
1234
- }
1235
- };
1236
- }
1237
-
1238
- function instance$5($$self, $$props, $$invalidate) {
1239
- let { headings } = $$props;
1240
- let { value } = $$props;
1241
- let { $$slots = {}, $$scope } = $$props;
1242
- const click_handler = heading => $$invalidate(0, value = heading.key);
1243
-
1244
- $$self.$set = $$props => {
1245
- if ("headings" in $$props) $$invalidate(1, headings = $$props.headings);
1246
- if ("value" in $$props) $$invalidate(0, value = $$props.value);
1247
- if ("$$scope" in $$props) $$invalidate(2, $$scope = $$props.$$scope);
1248
- };
1249
-
1250
- return [value, headings, $$scope, $$slots, click_handler];
1251
- }
1252
-
1253
- class Switcher extends SvelteComponent {
1254
- constructor(options) {
1255
- super();
1256
- init(this, options, instance$5, create_fragment$5, safe_not_equal, { headings: 1, value: 0 });
1257
- }
1258
- }
1259
-
1260
- export { Button, DetailSummary, Home, Input, Switcher, TextArea };