@kws3/ui 1.7.0 → 1.7.3

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 (36) hide show
  1. package/CHANGELOG.mdx +17 -1
  2. package/buttons/SubmitButton.svelte +2 -2
  3. package/controls/Checkbox.svelte +5 -5
  4. package/controls/FileUpload.svelte +4 -4
  5. package/controls/NumberInput.svelte +2 -2
  6. package/controls/ToggleButtons.svelte +1 -1
  7. package/datagrid/DataSearch/DataSearch.svelte +7 -6
  8. package/datagrid/DataSearch/SearchFilter.svelte +6 -6
  9. package/datagrid/GridView/GridCell.svelte +1 -0
  10. package/datagrid/GridView/GridRow.svelte +1 -1
  11. package/datagrid/Pagination/Pagination.svelte +119 -55
  12. package/datagrid/TileView/TileViewItem.svelte +1 -0
  13. package/forms/MaskedInput.svelte +1 -1
  14. package/forms/PasswordValidator/validatePassword.js +2 -2
  15. package/forms/actions.js +11 -8
  16. package/forms/colorpicker/Colorpicker.js +18 -13
  17. package/forms/colorpicker/Colorpicker.svelte +2 -2
  18. package/forms/select/MultiSelect.svelte +11 -13
  19. package/helpers/Dialog/Dialog.svelte +13 -14
  20. package/helpers/Divider.svelte +55 -0
  21. package/helpers/FloatingUI/Floatie.svelte +11 -5
  22. package/helpers/FloatingUI/index.js +2 -2
  23. package/helpers/Icon.svelte +1 -1
  24. package/helpers/Loader.svelte +4 -4
  25. package/helpers/Message.svelte +4 -1
  26. package/helpers/Modal.svelte +10 -2
  27. package/helpers/Nl2br.svelte +1 -1
  28. package/helpers/Notification.svelte +1 -1
  29. package/helpers/Panel.svelte +3 -1
  30. package/helpers/Skeleton.svelte +3 -2
  31. package/index.js +1 -0
  32. package/package.json +2 -2
  33. package/sliding-panes/SlidingPane.svelte +68 -36
  34. package/styles/Divider.scss +102 -0
  35. package/utils/index.js +1 -1
  36. package/utils/keyboard-events.js +3 -3
@@ -255,7 +255,9 @@ export default (function (win, doc) {
255
255
 
256
256
  // get mouse/finger coordinate
257
257
  function point(el, e) {
258
+ // eslint-disable-next-line no-extra-boolean-cast
258
259
  var x = !!e.touches ? e.touches[0].pageX : e.pageX,
260
+ // eslint-disable-next-line no-extra-boolean-cast
259
261
  y = !!e.touches ? e.touches[0].pageY : e.pageY,
260
262
  left = offset(el).l,
261
263
  top = offset(el).t;
@@ -396,18 +398,21 @@ export default (function (win, doc) {
396
398
  H_point_H = size(H_point).h,
397
399
  SV_point_W = SV_point_size.w,
398
400
  SV_point_H = SV_point_size.h;
401
+
402
+ function click(e) {
403
+ var t = e.target,
404
+ is_target = t === target || closest(t, target) === target;
405
+ if (is_target) {
406
+ create();
407
+ } else {
408
+ $.exit();
409
+ }
410
+ trigger(is_target ? "enter" : "exit", [$]);
411
+ }
412
+
399
413
  if (first) {
400
414
  picker.style.left = picker.style.top = "-9999px";
401
- function click(e) {
402
- var t = e.target,
403
- is_target = t === target || closest(t, target) === target;
404
- if (is_target) {
405
- create();
406
- } else {
407
- $.exit();
408
- }
409
- trigger(is_target ? "enter" : "exit", [$]);
410
- }
415
+
411
416
  if (events !== false) {
412
417
  on(events, target, click);
413
418
  }
@@ -430,7 +435,7 @@ export default (function (win, doc) {
430
435
  SV_point.style.right = SV_W - SV_point_W / 2 - SV_W * +HSV[1] + "px";
431
436
  SV_point.style.top = SV_H - SV_point_H / 2 - SV_H * +HSV[2] + "px";
432
437
  };
433
- $.exit = function (e) {
438
+ $.exit = function () {
434
439
  if (visible()) {
435
440
  visible().removeChild(picker);
436
441
  $.visible = false;
@@ -443,8 +448,8 @@ export default (function (win, doc) {
443
448
  return $;
444
449
  };
445
450
  function color(e) {
446
- var a = HSV2RGB(HSV),
447
- b = HSV2RGB([HSV[0], 1, 1]);
451
+ //var a = HSV2RGB(HSV),
452
+ var b = HSV2RGB([HSV[0], 1, 1]);
448
453
  SV.style.backgroundColor = "rgb(" + b.join(",") + ")";
449
454
  set_data(HSV);
450
455
  prevent(e);
@@ -116,7 +116,7 @@ This property can be bound to, to fetch the current colour, Default: `"000000"`
116
116
  e && e.target && e.target.select();
117
117
  }
118
118
 
119
- function onDragOver(e) {
119
+ function onDragOver() {
120
120
  if (!readonly && !disabled) {
121
121
  dragover = true;
122
122
  }
@@ -131,7 +131,7 @@ This property can be bound to, to fetch the current colour, Default: `"000000"`
131
131
  return false;
132
132
  }
133
133
 
134
- function onDragLeave(e) {
134
+ function onDragLeave() {
135
135
  if (!readonly && !disabled) {
136
136
  dragover = false;
137
137
  }
@@ -22,9 +22,7 @@ this property of each object will be returned as the value, Default: `"id"`
22
22
  @param {boolean} [readonly=false] - Marks component as read-only, Default: `false`
23
23
  @param {boolean} [disabled=false] - Disables the component, Default: `false`
24
24
  @param {string} [selected_icon="check"] - Icon used to mark selected items in dropdown list, Default: `"check"`
25
- @param {boolean} [summary_mode=false] - When activated, it will show the number of selected items.
26
-
27
- Instead of listing all the selected items inside the input., Default: `false`
25
+ @param {boolean} [summary_mode=false] - Shows only the number of items selected, instead of listing all the selected items in the input., Default: `false`
28
26
  @param {string} [no_options_msg="No matching options"] - Message to display when no matching options are found, Default: `"No matching options"`
29
27
  @param {string} [remove_btn_tip="Remove"] - Tooltip text for Remove Item button. This `string` will precede the selected Item Name in the tooltip., Default: `"Remove"`
30
28
  @param {string} [remove_all_tip="Remove all"] - Tooltip text for the Clear All button, Default: `"Remove all"`
@@ -66,7 +64,7 @@ Default value: `<span>{option[search_key] || option}</span>`
66
64
  </li>
67
65
  <li
68
66
  class="tag is-{size} summary-text is-{color || 'primary'} is-light">
69
- Item{selectedOptions.length == 1 ? "" : "s"} selected
67
+ Item{selectedOptions.length === 1 ? "" : "s"} selected
70
68
  </li>
71
69
  {:else}
72
70
  {#each selectedOptions as tag}
@@ -225,9 +223,7 @@ Default value: `<span>{option[search_key] || option}</span>`
225
223
  */
226
224
  export let selected_icon = "check";
227
225
  /**
228
- * When activated, it will show the number of selected items.
229
- *
230
- * Instead of listing all the selected items inside the input.
226
+ * Shows only the number of items selected, instead of listing all the selected items in the input.
231
227
  */
232
228
  export let summary_mode = false;
233
229
  /**
@@ -298,9 +294,10 @@ Default value: `<span>{option[search_key] || option}</span>`
298
294
  $: _placeholder = hasValue ? "" : placeholder;
299
295
 
300
296
  //ensure search_key and value_key are no empty strings
301
- $: used_search_key = search_key && search_key != "" ? search_key : "name";
302
- $: used_value_key = value_key && value_key != "" ? value_key : "id";
297
+ $: used_search_key = search_key && search_key !== "" ? search_key : "name";
298
+ $: used_value_key = value_key && value_key !== "" ? value_key : "id";
303
299
 
300
+ // eslint-disable-next-line no-redeclare
304
301
  $: shouldShowClearAll = hasValue;
305
302
 
306
303
  $: options, normaliseOptions();
@@ -322,7 +319,7 @@ Default value: `<span>{option[search_key] || option}</span>`
322
319
  //TODO: optimise isSelected function
323
320
  $: isSelected = (option) => {
324
321
  if (single) return matchesValue(value, option);
325
- if (!(value && value.length > 0) || value == "") return false;
322
+ if (!(value && value.length > 0) || value === "") return false;
326
323
  // nothing is selected if `value` is the empty array or string
327
324
  else return value.some((v) => matchesValue(v, option));
328
325
  };
@@ -384,13 +381,13 @@ Default value: `<span>{option[search_key] || option}</span>`
384
381
  function fillSelectedOptions() {
385
382
  if (single) {
386
383
  selectedOptions = normalisedOptions.filter(
387
- (v) => `${v[used_value_key]}` == `${value}`
384
+ (v) => `${v[used_value_key]}` === `${value}`
388
385
  );
389
386
  setSingleVisibleValue();
390
387
  } else {
391
388
  selectedOptions = normalisedOptions
392
389
  .filter(
393
- (v) => value && value.some((vl) => `${v[used_value_key]}` == `${vl}`)
390
+ (v) => value && value.some((vl) => `${v[used_value_key]}` === `${vl}`)
394
391
  )
395
392
  .sort(
396
393
  (a, b) =>
@@ -440,7 +437,8 @@ Default value: `<span>{option[search_key] || option}</span>`
440
437
  if (!isAlreadySelected && !single && (max === null || value.length < max)) {
441
438
  //attach to value array while filtering out invalid values
442
439
  value = [...value, token[used_value_key]].filter((v) => {
443
- return normalisedOptions.filter((nv) => nv[used_value_key] == v).length;
440
+ return normalisedOptions.filter((nv) => nv[used_value_key] === v)
441
+ .length;
444
442
  });
445
443
  searchText = ""; // reset search string on selection
446
444
 
@@ -30,15 +30,16 @@ For internal use only - not part of config object, Default: `""`
30
30
  <CardModal title={titleToUse} {size} {is_active} closable={false}>
31
31
  <div slot="default">
32
32
  <div class="columns is-vcentered is-mobile">
33
- {#if icon && icon != ""}
33
+ {#if icon && icon !== ""}
34
34
  <div class="column is-narrow">
35
35
  <Icon {icon} size={icon_size} color={icon_color} />
36
36
  </div>
37
37
  {/if}
38
38
  <div class="column">
39
39
  <div>
40
+ <!-- eslint-disable-next-line @ota-meshi/svelte/no-at-html-tags -->
40
41
  <span class="is-block">{@html _text}</span>
41
- {#if _type == "prompt"}
42
+ {#if _type === "prompt"}
42
43
  <div class="field" style="margin-top:0.5rem;">
43
44
  <div class="control">
44
45
  <input
@@ -50,7 +51,7 @@ For internal use only - not part of config object, Default: `""`
50
51
  </div>
51
52
  </div>
52
53
  {/if}
53
- {#if help_text && help_text != ""}
54
+ {#if help_text && help_text !== ""}
54
55
  <span class="help">{help_text}</span>
55
56
  {/if}
56
57
  </div>
@@ -59,20 +60,24 @@ For internal use only - not part of config object, Default: `""`
59
60
  </div>
60
61
  <div slot="footer" style="width:100%">
61
62
  <div class="field is-grouped is-grouped-right">
62
- {#if _type != "alert"}
63
+ {#if _type !== "alert"}
63
64
  <div class="control">
64
- <button on:click={cancel} class="button is-{cancel_button_color}"
65
- >{#if cancel_button_icon != ""}<Icon
65
+ <button
66
+ type="button"
67
+ on:click={cancel}
68
+ class="button is-{cancel_button_color}"
69
+ >{#if cancel_button_icon !== ""}<Icon
66
70
  icon={cancel_button_icon}
67
71
  size="small" />{/if}<span>{cancel_button_text}</span></button>
68
72
  </div>
69
73
  {/if}
70
74
  <div class="control">
71
75
  <button
76
+ type="button"
72
77
  bind:this={ok_button}
73
78
  on:click={ok}
74
79
  class="button is-{ok_button_color}"
75
- >{#if ok_button_icon != ""}<Icon
80
+ >{#if ok_button_icon !== ""}<Icon
76
81
  icon={ok_button_icon}
77
82
  size="small" />{/if}<span>{ok_button_text}</span></button>
78
83
  </div>
@@ -170,7 +175,7 @@ For internal use only - not part of config object, Default: `""`
170
175
  input_box,
171
176
  ok_button;
172
177
 
173
- $: titleToUse = title != "" ? title : capitaliseFirstLetter(_type);
178
+ $: titleToUse = title !== "" ? title : capitaliseFirstLetter(_type);
174
179
 
175
180
  /**
176
181
  * Determines the type of Dialog.
@@ -204,13 +209,10 @@ For internal use only - not part of config object, Default: `""`
204
209
  switch (_type) {
205
210
  case "alert":
206
211
  return;
207
- break;
208
212
  case "confirm":
209
213
  return true;
210
- break;
211
214
  case "prompt":
212
215
  return input_value;
213
- break;
214
216
  }
215
217
  }
216
218
 
@@ -218,13 +220,10 @@ For internal use only - not part of config object, Default: `""`
218
220
  switch (_type) {
219
221
  case "alert":
220
222
  return;
221
- break;
222
223
  case "confirm":
223
224
  return false;
224
- break;
225
225
  case "prompt":
226
226
  return null;
227
- break;
228
227
  }
229
228
  }
230
229
 
@@ -0,0 +1,55 @@
1
+ <!--
2
+ @component
3
+
4
+
5
+ @param {'' | 'warning' | 'info' | 'danger' | 'primary' | 'success' | 'link' | 'dark' | 'light'} [color=""] - Color of the Divider lines, Default: `""`
6
+ @param {boolean} [light=false] - Whether to display a lighter variant of the `color`, Default: `false`
7
+ @param {boolean} [vertical=false] - Whether to orient the Divider vertically. Vertical Divider take up the height of their parent., Default: `false`
8
+ @param {'center' | 'left' | 'right' | 'top' | 'bottom'} [alignment="center"] - Alignment of the Divider text. `top`/`left` and `bottom`/`right` are analogous for vertical Dividers, Default: `"center"`
9
+ @param {string} [style=""] - Inline CSS styles for the Divider, Default: `""`
10
+ @param {string} [class=""] - CSS class for Divider, Default: `""`
11
+
12
+ ### Slots
13
+ - `<slot name="default" />` - Default slot for text inside Divider
14
+
15
+ -->
16
+
17
+ <div
18
+ class:is-vertical={vertical}
19
+ class:is-light={light}
20
+ class="kws-divider is-{alignment} is-{color} {klass}"
21
+ {style}>
22
+ <!--Default slot for text inside Divider--><slot />
23
+ </div>
24
+
25
+ <script>
26
+ /**
27
+ * Color of the Divider lines
28
+ * @type {'' | 'warning' | 'info' | 'danger' | 'primary' | 'success' | 'link' | 'dark' | 'light'}
29
+ */
30
+ export let color = "",
31
+ /**
32
+ * Whether to display a lighter variant of the `color`
33
+ */
34
+ light = false,
35
+ /**
36
+ * Whether to orient the Divider vertically. Vertical Divider take up the height of their parent.
37
+ */
38
+ vertical = false,
39
+ /**
40
+ * Alignment of the Divider text. `top`/`left` and `bottom`/`right` are analogous for vertical Dividers
41
+ * @type {'center' | 'left' | 'right' | 'top' | 'bottom'}
42
+ */
43
+ alignment = "center",
44
+ /**
45
+ * Inline CSS styles for the Divider
46
+ */
47
+ style = "";
48
+
49
+ /**
50
+ * CSS class for Divider
51
+ * @type {string}
52
+ */
53
+ let klass = "";
54
+ export { klass as class };
55
+ </script>
@@ -18,12 +18,13 @@
18
18
 
19
19
  -->
20
20
 
21
- {#if variant == "snackbar"}
21
+ {#if variant === "snackbar"}
22
22
  <div class="snackbar is-{color} {light ? 'is-light' : ''}">
23
23
  <div class="text">{message}</div>
24
24
  <div class="action">
25
25
  {#each buttonsToRender as { text, color: text_color, click }}
26
26
  <button
27
+ type="button"
27
28
  class="button is-{color} has-text-{text_color}"
28
29
  on:click={click}
29
30
  on:click={destroy}>{text}</button>
@@ -33,7 +34,7 @@
33
34
  <div class="floatie-progress" style="animation-duration:{duration}ms" />
34
35
  {/if}
35
36
  </div>
36
- {:else if variant == "toast"}
37
+ {:else if variant === "toast"}
37
38
  <div class="toast is-{color} {light ? 'is-light' : ''}">
38
39
  {message}
39
40
  </div>
@@ -43,12 +44,13 @@
43
44
  <svelte:component this={component} {...$$props} on:destroy={destroy} />
44
45
  {:else}
45
46
  {#if dismissable}
46
- <button class="delete" on:click={destroy} />
47
+ <button type="button" class="delete" on:click={destroy} />
47
48
  {/if}
48
49
  {#if title}
49
50
  <h4 class="title is-5 is-marginless">{title}</h4>
50
51
  {/if}
51
52
 
53
+ <!-- eslint-disable-next-line @ota-meshi/svelte/no-at-html-tags -->
52
54
  <p>{@html message}</p>
53
55
 
54
56
  {#if !persistent}
@@ -109,11 +111,15 @@
109
111
  /**
110
112
  * Callback function call before close event
111
113
  */
112
- beforeClose = (props) => {},
114
+ beforeClose = (props) => {
115
+ props;
116
+ },
113
117
  /**
114
118
  * Callback function call after close event
115
119
  */
116
- afterClose = (props) => {},
120
+ afterClose = (props) => {
121
+ props;
122
+ },
117
123
  /**
118
124
  * List of buttons to show in snackbar
119
125
  */
@@ -62,7 +62,7 @@ export const FloatiesStore = (() => {
62
62
  newItem.variant = "notification";
63
63
  }
64
64
 
65
- if (!newItem.position || newItem.position == "") {
65
+ if (!newItem.position || newItem.position === "") {
66
66
  newItem.position = DEFAULT_POSITIONS[newItem.variant];
67
67
  }
68
68
 
@@ -88,7 +88,7 @@ export const FloatiesStore = (() => {
88
88
  let _items = items[_position][_variant];
89
89
 
90
90
  items[_position][_variant] = _items.slice().filter((el) => {
91
- return el && el.id && el.id != props.id;
91
+ return el && el.id && el.id !== props.id;
92
92
  });
93
93
 
94
94
  return items;
@@ -99,7 +99,7 @@ Ultimately defaults to `fa`, if family is not set anywhere, Default: `""`
99
99
 
100
100
  $: {
101
101
  usedFamily =
102
- family && family != "" ? family : globalFamily ? globalFamily : "fa";
102
+ family && family !== "" ? family : globalFamily ? globalFamily : "fa";
103
103
 
104
104
  switch (usedFamily) {
105
105
  case "lar":
@@ -5,7 +5,7 @@
5
5
  @param {'grey' | 'light' | 'warning' | 'info' | 'danger' | 'primary' | 'success'} [spinner_color="grey"] - Color of the Spinner, Default: `"grey"`
6
6
  @param {'small'|'medium'|'large'} [spinner_size="medium"] - Size of the Spinner, Default: `"medium"`
7
7
  @param {'transparent' | 'warning' | 'info' | 'danger' | 'primary' | 'success' | 'link'} [background_color="transparent"] - Backgound color of the Spinner container, Default: `"transparent"`
8
- @param {string} [background_size="medium"] - Size of the Spinner container.  It can also accept css units
8
+ @param {string} [background_size="medium"] - Size of the Spinner container. It can also accept css units
9
9
 
10
10
  **Examples:** `small` | `medium` | `large` | `halfheight` | `fullheight` | `10px` | `5rem` | `100vh`, Default: `"medium"`
11
11
  @param {boolean} [is_inline=false] - Determines if the Loader is inline or not, Default: `false`
@@ -48,7 +48,7 @@ The overlay is absolutely positioned. Ensure that the parent container is relati
48
48
  */
49
49
  background_color = "transparent",
50
50
  /**
51
- * Size of the Spinner container.  It can also accept css units
51
+ * Size of the Spinner container. It can also accept css units
52
52
  *
53
53
  * **Examples:** `small` | `medium` | `large` | `halfheight` | `fullheight` | `10px` | `5rem` | `100vh`
54
54
  */
@@ -86,14 +86,14 @@ The overlay is absolutely positioned. Ensure that the parent container is relati
86
86
 
87
87
  function determineHeightStyles() {
88
88
  if (
89
- bg_sizes.indexOf(background_size) == -1 &&
89
+ bg_sizes.indexOf(background_size) === -1 &&
90
90
  typeof background_size == "string" &&
91
91
  background_size.length
92
92
  ) {
93
93
  _height = "height: " + background_size + ";";
94
94
 
95
95
  _style =
96
- (style.length && style.charAt(style.length - 1) != ";"
96
+ (style.length && style.charAt(style.length - 1) !== ";"
97
97
  ? style + ";"
98
98
  : style) + _height;
99
99
  _background_size = "";
@@ -41,7 +41,10 @@ The parent can then decide what to do with the component
41
41
  <slot name="title"><p>{title}</p></slot>
42
42
  {/if}
43
43
  {#if dismissable}
44
- <button class="delete is-pulled-right is-{size}" on:click={dismiss} />
44
+ <button
45
+ type="button"
46
+ class="delete is-pulled-right is-{size}"
47
+ on:click={dismiss} />
45
48
  {/if}
46
49
  </div>
47
50
  <div class="message-body {inner_class}" style={inner_style}>
@@ -13,6 +13,8 @@ Only programmatic closing is possible, Default: `true`
13
13
  @param {string} [inner_class=""] - CSS classes for modal content, Default: `""`
14
14
  @param {string} [cy=""] - data-cy attribute for cypress, Default: `""`
15
15
  @param {string} [class=""] - CSS class for modal container, Default: `""`
16
+ @method `close()` - Call this method to close modal programmatically
17
+ @method `open()` - Call this method to open modal programmatically
16
18
 
17
19
  ### Slots
18
20
  - `<slot name="default" />` - Used for the Modal content
@@ -114,11 +116,17 @@ Only programmatic closing is possible, Default: `true`
114
116
  }
115
117
  }
116
118
 
117
- function close() {
119
+ /**
120
+ * Call this method to close modal programmatically
121
+ */
122
+ export function close() {
118
123
  is_active = false;
119
124
  }
120
125
 
121
- function open() {
126
+ /**
127
+ * Call this method to open modal programmatically
128
+ */
129
+ export function open() {
122
130
  is_active = true;
123
131
  }
124
132
  </script>
@@ -7,7 +7,7 @@
7
7
  -->
8
8
  {#if text && text_parts}
9
9
  {#each text_parts as part, index}
10
- {part}{#if text_parts.length != index + 1}<br />{/if}
10
+ {part}{#if text_parts.length !== index + 1}<br />{/if}
11
11
  {/each}
12
12
  {/if}
13
13
 
@@ -23,7 +23,7 @@ The parent can then decide what to do with the component
23
23
  class="notification is-{color} {light ? 'is-light' : ''} {klass}"
24
24
  {style}>
25
25
  {#if dismissable}
26
- <button class="delete" on:click={dismiss} />
26
+ <button type="button" class="delete" on:click={dismiss} />
27
27
  {/if}
28
28
  <!--Used for notification content--><slot />
29
29
  </div>
@@ -43,11 +43,12 @@ This will not work if there is no title area
43
43
  class="panel {klass}"
44
44
  {style}
45
45
  data-cy={cy}>
46
- {#if title != "" || has_title}
46
+ {#if title !== "" || has_title}
47
47
  <div class="panel-heading" on:click={toggle}>
48
48
  <div class="level is-mobile">
49
49
  <div class="level-left">
50
50
  <div class="level-item">
51
+ <!-- eslint-disable-next-line @ota-meshi/svelte/no-at-html-tags -->
51
52
  <h2 class="subtitle">{@html title}</h2>
52
53
  </div>
53
54
  </div>
@@ -73,6 +74,7 @@ This will not work if there is no title area
73
74
  </div>
74
75
  {/if}
75
76
  <div class="level-item">
77
+ <!-- eslint-disable-next-line @ota-meshi/svelte/no-at-html-tags -->
76
78
  <h2 class="subtitle is-6">{@html subtitle}</h2>
77
79
  </div>
78
80
  <span class="collapsor level-item">
@@ -11,10 +11,11 @@
11
11
  **Examples:** `10px` | `5rem`, Default: `"0px"`
12
12
  @param {boolean} [circle=false] - Whether the Skeleton should be rendered as a circle.
13
13
  If this is set to `true`, the `radius` property will be ignored., Default: `false`
14
- @param {'transparent' | 'warning' | 'info' | 'danger' | 'primary' | 'success' | 'link'} [color=""] - Color of the Skeleton lines, Default: `""`
14
+ @param {'' | 'transparent' | 'warning' | 'info' | 'danger' | 'primary' | 'success' | 'link'} [color=""] - Color of the Skeleton lines, Default: `""`
15
15
  @param {string} [class=""] - CSS class for Skeleton, Default: `""`
16
16
 
17
17
  -->
18
+ <!-- eslint-disable-next-line no-unused-vars -->
18
19
  {#each { length: lines } as _, i}
19
20
  <span
20
21
  class="kws-skeleton is-{color} {klass}"
@@ -50,7 +51,7 @@ If this is set to `true`, the `radius` property will be ignored., Default: `fals
50
51
  circle = false,
51
52
  /**
52
53
  * Color of the Skeleton lines
53
- * @type {'transparent' | 'warning' | 'info' | 'danger' | 'primary' | 'success' | 'link'}
54
+ * @type {'' | 'transparent' | 'warning' | 'info' | 'danger' | 'primary' | 'success' | 'link'}
54
55
  */
55
56
  color = "";
56
57
 
package/index.js CHANGED
@@ -11,6 +11,7 @@ export { default as Notification } from "./helpers/Notification.svelte";
11
11
  export { default as Loader } from "./helpers/Loader.svelte";
12
12
  export { default as ActionSheet } from "./helpers/ActionSheet.svelte";
13
13
  export { default as Skeleton } from "./helpers/Skeleton.svelte";
14
+ export { default as Divider } from "./helpers/Divider.svelte";
14
15
  export { default as Timeline } from "./helpers/Timeline/Timeline.svelte";
15
16
  export { default as TimelineItem } from "./helpers/Timeline/TimelineItem.svelte";
16
17
  export { default as TimelineHeader } from "./helpers/Timeline/TimelineHeader.svelte";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kws3/ui",
3
- "version": "1.7.0",
3
+ "version": "1.7.3",
4
4
  "description": "UI components for use with Svelte v3 applications.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -29,5 +29,5 @@
29
29
  "text-mask-core": "^5.1.2",
30
30
  "tippy.js": "^6.3.1"
31
31
  },
32
- "gitHead": "2da51d63a233a8129e31898f0a134f3a68d7f1ec"
32
+ "gitHead": "f76e8d0f5bb9859092c7e4e6b38f8fbd3252dc5d"
33
33
  }