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