@kws3/ui 4.5.6 → 4.5.8

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.
package/CHANGELOG.mdx CHANGED
@@ -1,3 +1,9 @@
1
+ ## 4.5.8
2
+ - `MultiSelect` Stop overwriting options prop in async mode
3
+
4
+ ## 4.5.7
5
+ - Fix SCSS deprecation warnings
6
+
1
7
  ## 4.5.6
2
8
  - Fix chart tooltip box shadow colors
3
9
  - Add docs for LLMs
@@ -566,7 +566,12 @@ Default value: `<span>{option[search_key] || option}</span>`
566
566
  if (asyncMode) {
567
567
  // initally on async mode options are empty
568
568
  // so we need to fill selectedOptions with value if value is avaliable
569
- options = value ? [...(single ? [value] : [...value])] : [];
569
+ options =
570
+ options && options.length
571
+ ? options
572
+ : value
573
+ ? [...(single ? [value] : [...value])]
574
+ : [];
570
575
  searching = false;
571
576
  tick().then(() => {
572
577
  normaliseOptions();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kws3/ui",
3
- "version": "4.5.6",
3
+ "version": "4.5.8",
4
4
  "description": "UI components for use with Svelte v3 applications.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -67,5 +67,5 @@
67
67
  "devDependencies": {
68
68
  "typescript": "^5.2.2"
69
69
  },
70
- "gitHead": "700d6e12bc8f969d5f2d39db05a98d02ccbf10a0"
70
+ "gitHead": "a549b4270c569fb5ec4baa2a5c11c61aff0b24d0"
71
71
  }
@@ -1,3 +1,4 @@
1
+ @use "sass:meta";
1
2
  @use "bulma/sass/utilities/css-variables" as cv;
2
3
  @use "bulma/sass/utilities/derived-variables" as dv;
3
4
 
@@ -26,7 +27,7 @@ $text-matches-font-weight: cv.getVar("weight-bold") !default;
26
27
  $options-background: cv.getVar("scheme-main-ter") !default;
27
28
 
28
29
  $__modal-z: 41 !default;
29
- @if variable-exists("modal-z") {
30
+ @if meta.variable-exists("modal-z") {
30
31
  $__modal-z: $modal-z;
31
32
  }
32
33
 
@@ -1,3 +1,4 @@
1
+ @use "sass:meta";
1
2
  @use "bulma/sass/utilities/css-variables" as cv;
2
3
  @use "bulma/sass/utilities/derived-variables" as dv;
3
4
 
@@ -27,7 +28,7 @@ $selected-background: cv.getVar("primary-light") !default;
27
28
  $options-background: cv.getVar("scheme-main-ter") !default;
28
29
 
29
30
  $__modal-z: 41 !default;
30
- @if variable-exists("modal-z") {
31
+ @if meta.variable-exists("modal-z") {
31
32
  $__modal-z: $modal-z;
32
33
  }
33
34
 
@@ -7,10 +7,10 @@ $count-color: cv.getVar("danger-invert") !default;
7
7
  .kws-toggle-buttons {
8
8
  .button,
9
9
  .button:focus {
10
+ box-shadow: none;
10
11
  .icon {
11
12
  margin: 0;
12
13
  }
13
- box-shadow: none;
14
14
  &.is-active {
15
15
  box-shadow: 0 0 0.6rem
16
16
  hsla(
@@ -1,3 +1,4 @@
1
+ @use "sass:list";
1
2
  @use "bulma/sass/utilities/css-variables" as cv;
2
3
  @use "bulma/sass/utilities/derived-variables" as dv;
3
4
 
@@ -7,7 +8,8 @@ $color: cv.getVar("text-invert") !default;
7
8
  $arrow-size: 8px !default;
8
9
  $padding: 0.5rem !default;
9
10
  $radius: cv.getVar("radius-small") !default;
10
- $shadow: 0 5px 10px -5px hsla(cv.getVar("shadow-h"), cv.getVar("shadow-s"), cv.getVar("shadow-l"), 0.4) !default;
11
+ $shadow: 0 5px 10px -5px
12
+ hsla(cv.getVar("shadow-h"), cv.getVar("shadow-s"), cv.getVar("shadow-l"), 0.4) !default;
11
13
  $popover-background: cv.getVar("background") !default;
12
14
  $popover-color: cv.getVar("text") !default;
13
15
  $popover-arrow-color: cv.getVar("border") !default;
@@ -47,10 +49,21 @@ $popover-radius: $radius !default;
47
49
  $placements: "top", "bottom", "left", "right";
48
50
  $origins: bottom, top, right, left;
49
51
 
52
+ position: relative;
53
+ background-color: $background;
54
+ color: $color;
55
+ border-radius: $radius;
56
+ outline: 0;
57
+ box-shadow: $shadow;
58
+ transition-property: transform, visibility, opacity;
59
+
50
60
  &[data-animation="scale"] {
51
61
  @each $placement in $placements {
52
62
  &[data-placement^="#{$placement}"] {
53
- transform-origin: nth($origins, index($placements, $placement));
63
+ transform-origin: list.nth(
64
+ $origins,
65
+ list.index($placements, $placement)
66
+ );
54
67
  }
55
68
  }
56
69
 
@@ -64,14 +77,6 @@ $popover-radius: $radius !default;
64
77
  opacity: 0;
65
78
  }
66
79
 
67
- position: relative;
68
- background-color: $background;
69
- color: $color;
70
- border-radius: $radius;
71
- outline: 0;
72
- box-shadow: $shadow;
73
- transition-property: transform, visibility, opacity;
74
-
75
80
  @each $name, $pair in $theme-colors {
76
81
  &[data-theme~="#{$name}"] {
77
82
  color: cv.getVar($name, "", "-invert");