@kws3/ui 1.6.9 → 1.7.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.
- package/CHANGELOG.mdx +17 -0
- package/buttons/SubmitButton.svelte +8 -8
- package/controls/Checkbox.svelte +5 -5
- package/controls/FileUpload.svelte +4 -4
- package/controls/NumberInput.svelte +2 -2
- package/controls/ToggleButtons.svelte +1 -1
- package/datagrid/DataSearch/DataSearch.svelte +7 -6
- package/datagrid/DataSearch/SearchFilter.svelte +25 -10
- package/datagrid/GridView/GridCell.svelte +1 -0
- package/datagrid/GridView/GridRow.svelte +1 -1
- package/datagrid/Pagination/Pagination.svelte +119 -55
- package/datagrid/TileView/TileViewItem.svelte +1 -0
- package/forms/MaskedInput.svelte +1 -1
- package/forms/PasswordValidator/validatePassword.js +2 -2
- package/forms/actions.js +11 -8
- package/forms/colorpicker/Colorpicker.js +18 -13
- package/forms/colorpicker/Colorpicker.svelte +2 -2
- package/forms/select/MultiSelect.svelte +11 -13
- package/helpers/Dialog/Dialog.svelte +13 -14
- package/helpers/Divider.svelte +55 -0
- package/helpers/FloatingUI/Floatie.svelte +11 -5
- package/helpers/FloatingUI/index.js +2 -2
- package/helpers/Icon.svelte +1 -1
- package/helpers/Loader.svelte +4 -4
- package/helpers/Message.svelte +4 -1
- package/helpers/Modal.svelte +10 -2
- package/helpers/Nl2br.svelte +1 -1
- package/helpers/Notification.svelte +1 -1
- package/helpers/Panel.svelte +3 -1
- package/helpers/Popover.svelte +5 -5
- package/helpers/Skeleton.svelte +66 -0
- package/index.js +2 -0
- package/package.json +2 -2
- package/sliding-panes/SlidingPaneSet.svelte +2 -2
- package/styles/DataSort.scss +5 -0
- package/styles/Divider.scss +102 -0
- package/styles/Loader.scss +35 -34
- package/styles/RangeSlider.scss +2 -1
- package/styles/Skeleton.scss +52 -0
- package/styles/Timeline.scss +2 -1
- package/utils/index.js +1 -1
- package/utils/keyboard-events.js +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kws3/ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.2",
|
|
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": "
|
|
32
|
+
"gitHead": "227e2a0e081adad79a4a46096d1f846bd307d6e3"
|
|
33
33
|
}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
@component
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
@param {string} [classes=""] - Additional classes, Default: `""`
|
|
6
5
|
@param {string} [style=""] - Inline style of component, Default: `""`
|
|
7
|
-
@param {boolean} [vertical=false] - Vertical
|
|
6
|
+
@param {boolean} [vertical=false] - Vertical transform of SlidingPane., Default: `false`
|
|
7
|
+
@param {string} [class=""] - CSS classes for the SlidingPaneSet, Default: `""`
|
|
8
8
|
|
|
9
9
|
### Slots
|
|
10
10
|
- `<slot name="default" />`
|
package/styles/DataSort.scss
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
&:first-child {
|
|
10
10
|
padding-left: calc(0.625rem - 1px);
|
|
11
11
|
border-radius: 0 0 0 $radius-large;
|
|
12
|
+
background: darken($input-border-color, 5%);
|
|
13
|
+
padding-right: calc(0.625rem - 1px);
|
|
12
14
|
}
|
|
13
15
|
&:last-child {
|
|
14
16
|
border-radius: 0 0 $radius-large 0;
|
|
@@ -29,6 +31,9 @@
|
|
|
29
31
|
border: none;
|
|
30
32
|
box-shadow: none;
|
|
31
33
|
}
|
|
34
|
+
&.is-fullwidth {
|
|
35
|
+
width: 100%;
|
|
36
|
+
}
|
|
32
37
|
}
|
|
33
38
|
&::after {
|
|
34
39
|
border-color: $primary;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
$kws-theme-colors: $colors !default;
|
|
2
|
+
$kws-divider-color: $border !default;
|
|
3
|
+
$kws-divider-font-size: $size-7 !default;
|
|
4
|
+
$kws-divider-gap: 0.25rem !default;
|
|
5
|
+
$kws-divider-margin: 1rem !default;
|
|
6
|
+
|
|
7
|
+
.kws-divider {
|
|
8
|
+
position: relative;
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
text-transform: uppercase;
|
|
12
|
+
color: $grey;
|
|
13
|
+
font-size: $kws-divider-font-size;
|
|
14
|
+
font-weight: $weight-semibold;
|
|
15
|
+
letter-spacing: 0.5px;
|
|
16
|
+
margin: $kws-divider-margin 0;
|
|
17
|
+
width: 100%;
|
|
18
|
+
|
|
19
|
+
&::after,
|
|
20
|
+
&::before {
|
|
21
|
+
content: "";
|
|
22
|
+
display: block;
|
|
23
|
+
flex: 1;
|
|
24
|
+
height: 1px;
|
|
25
|
+
background-color: $kws-divider-color;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&:not(.is-right),
|
|
29
|
+
&:not(.is-bottom) {
|
|
30
|
+
&::after {
|
|
31
|
+
margin-left: $kws-divider-gap;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&:not(.is-left),
|
|
36
|
+
&:not(.is-top) {
|
|
37
|
+
&::before {
|
|
38
|
+
margin-right: $kws-divider-gap;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&.is-left,
|
|
43
|
+
&.is-top {
|
|
44
|
+
&::before {
|
|
45
|
+
display: none;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.is-right,
|
|
50
|
+
&.is-bottom {
|
|
51
|
+
&::after {
|
|
52
|
+
display: none;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&.is-vertical {
|
|
57
|
+
flex-direction: column;
|
|
58
|
+
margin: 0 $kws-divider-margin;
|
|
59
|
+
height: 100%;
|
|
60
|
+
width: auto;
|
|
61
|
+
|
|
62
|
+
&::after,
|
|
63
|
+
&::before {
|
|
64
|
+
height: auto;
|
|
65
|
+
width: 1px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&::after {
|
|
69
|
+
margin-left: 0;
|
|
70
|
+
margin-top: $kws-divider-gap;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&::before {
|
|
74
|
+
margin-right: 0;
|
|
75
|
+
margin-bottom: $kws-divider-gap;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&:empty {
|
|
80
|
+
&::after,
|
|
81
|
+
&::before {
|
|
82
|
+
margin: 0;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@each $name, $pair in $kws-theme-colors {
|
|
87
|
+
$color: nth($pair, 1);
|
|
88
|
+
$color-light: findLightColor($color);
|
|
89
|
+
&.is-#{$name} {
|
|
90
|
+
&::after,
|
|
91
|
+
&::before {
|
|
92
|
+
background-color: $color;
|
|
93
|
+
}
|
|
94
|
+
&.is-light {
|
|
95
|
+
&::after,
|
|
96
|
+
&::before {
|
|
97
|
+
background-color: $color-light;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
package/styles/Loader.scss
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
$kws-theme-colors: $colors !default;
|
|
1
2
|
$kws-loader-width: 2rem !default;
|
|
2
3
|
$kws-loader-height: 2rem !default;
|
|
3
4
|
$kws-loader-width-medium: ($kws-loader-width * 1.5) !default;
|
|
@@ -5,45 +6,45 @@ $kws-loader-height-medium: ($kws-loader-height * 1.5) !default;
|
|
|
5
6
|
$kws-loader-width-large: ($kws-loader-width * 3) !default;
|
|
6
7
|
$kws-loader-height-large: ($kws-loader-height * 3) !default;
|
|
7
8
|
$kws-loader-color: #ccc !default;
|
|
8
|
-
$kws-loader-overlay-background: rgba(0,0,0,0.15) !default;
|
|
9
|
+
$kws-loader-overlay-background: rgba(0, 0, 0, 0.15) !default;
|
|
9
10
|
|
|
10
|
-
.kws-loader{
|
|
11
|
-
.hero-body{
|
|
12
|
-
position:relative;
|
|
13
|
-
&:after{
|
|
11
|
+
.kws-loader {
|
|
12
|
+
.hero-body {
|
|
13
|
+
position: relative;
|
|
14
|
+
&:after {
|
|
14
15
|
@include loader();
|
|
15
|
-
border-left-color
|
|
16
|
-
border-bottom-color
|
|
16
|
+
border-left-color: $kws-loader-color;
|
|
17
|
+
border-bottom-color: $kws-loader-color;
|
|
17
18
|
position: absolute !important;
|
|
18
|
-
width
|
|
19
|
-
height
|
|
19
|
+
width: $kws-loader-width;
|
|
20
|
+
height: $kws-loader-height;
|
|
20
21
|
left: calc(50% - (#{$kws-loader-width} / 2));
|
|
21
22
|
top: calc(50% - (#{$kws-loader-height} / 2));
|
|
22
23
|
}
|
|
23
24
|
|
|
24
|
-
@each $name, $pair in $colors{
|
|
25
|
+
@each $name, $pair in $kws-theme-colors {
|
|
25
26
|
$color: nth($pair, 1);
|
|
26
|
-
&.is-#{$name}{
|
|
27
|
-
&:after{
|
|
28
|
-
border-left-color
|
|
29
|
-
border-bottom-color
|
|
27
|
+
&.is-#{$name} {
|
|
28
|
+
&:after {
|
|
29
|
+
border-left-color: $color !important;
|
|
30
|
+
border-bottom-color: $color !important;
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
34
|
|
|
34
|
-
&.is-medium{
|
|
35
|
-
&:after{
|
|
36
|
-
width
|
|
37
|
-
height
|
|
35
|
+
&.is-medium {
|
|
36
|
+
&:after {
|
|
37
|
+
width: $kws-loader-width-medium;
|
|
38
|
+
height: $kws-loader-height-medium;
|
|
38
39
|
left: calc(50% - (#{$kws-loader-width-medium} / 2));
|
|
39
40
|
top: calc(50% - (#{$kws-loader-height-medium} / 2));
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
43
|
|
|
43
|
-
&.is-large{
|
|
44
|
-
&:after{
|
|
45
|
-
width
|
|
46
|
-
height
|
|
44
|
+
&.is-large {
|
|
45
|
+
&:after {
|
|
46
|
+
width: $kws-loader-width-large;
|
|
47
|
+
height: $kws-loader-height-large;
|
|
47
48
|
left: calc(50% - (#{$kws-loader-width-large} / 2));
|
|
48
49
|
top: calc(50% - (#{$kws-loader-height-large} / 2));
|
|
49
50
|
}
|
|
@@ -51,17 +52,17 @@ $kws-loader-overlay-background: rgba(0,0,0,0.15) !default;
|
|
|
51
52
|
}
|
|
52
53
|
}
|
|
53
54
|
|
|
54
|
-
.is-overlay{
|
|
55
|
-
z-index:4;
|
|
56
|
-
.kws-loader{
|
|
57
|
-
padding:0;
|
|
58
|
-
height:100%;
|
|
59
|
-
width:100%;
|
|
60
|
-
position:relative;
|
|
61
|
-
background
|
|
62
|
-
z-index:3;
|
|
63
|
-
.hero-body{
|
|
64
|
-
padding:0;
|
|
55
|
+
.is-overlay {
|
|
56
|
+
z-index: 4;
|
|
57
|
+
.kws-loader {
|
|
58
|
+
padding: 0;
|
|
59
|
+
height: 100%;
|
|
60
|
+
width: 100%;
|
|
61
|
+
position: relative;
|
|
62
|
+
background: $kws-loader-overlay-background;
|
|
63
|
+
z-index: 3;
|
|
64
|
+
.hero-body {
|
|
65
|
+
padding: 0;
|
|
65
66
|
}
|
|
66
67
|
}
|
|
67
|
-
}
|
|
68
|
+
}
|
package/styles/RangeSlider.scss
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
$kws-theme-colors: $colors !default;
|
|
1
2
|
$kws-slider-radius: $radius !default;
|
|
2
3
|
$kws-slider-track-background: $grey-lighter !default;
|
|
3
4
|
$kws-slider-track-radius: $radius !default;
|
|
@@ -222,7 +223,7 @@ $kws-slider-output-radius: $radius !default;
|
|
|
222
223
|
&.is-large {
|
|
223
224
|
@include slider-size($size-large);
|
|
224
225
|
}
|
|
225
|
-
@each $name, $pair in $colors {
|
|
226
|
+
@each $name, $pair in $kws-theme-colors {
|
|
226
227
|
$color: nth($pair, 1);
|
|
227
228
|
$color-invert: nth($pair, 2);
|
|
228
229
|
$color-light: findLightColor($color);
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
$kws-theme-colors: $colors !default;
|
|
2
|
+
$kws-skeleton-color: lighten($text, 60%) !default;
|
|
3
|
+
$kws-skeleton-hilight-color: lighten($text, 65%) !default;
|
|
4
|
+
|
|
5
|
+
.kws-skeleton {
|
|
6
|
+
width: 100%;
|
|
7
|
+
line-height: 1;
|
|
8
|
+
display: inline-block;
|
|
9
|
+
background-color: $kws-skeleton-color;
|
|
10
|
+
background-image: linear-gradient(
|
|
11
|
+
90deg,
|
|
12
|
+
$kws-skeleton-color,
|
|
13
|
+
$kws-skeleton-hilight-color,
|
|
14
|
+
$kws-skeleton-color
|
|
15
|
+
);
|
|
16
|
+
background-size: 200px 100%;
|
|
17
|
+
background-repeat: no-repeat;
|
|
18
|
+
animation: kws-skeleton-shine 1.2s infinite;
|
|
19
|
+
|
|
20
|
+
@each $name, $pair in $kws-theme-colors {
|
|
21
|
+
$color: nth($pair, 1);
|
|
22
|
+
$color-light: findLightColor($color);
|
|
23
|
+
&.is-#{$name} {
|
|
24
|
+
background-color: $color-light;
|
|
25
|
+
background-image: linear-gradient(
|
|
26
|
+
90deg,
|
|
27
|
+
$color-light,
|
|
28
|
+
darken($color-light, 10%),
|
|
29
|
+
$color-light
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&.is-transparent {
|
|
35
|
+
background-color: transparent;
|
|
36
|
+
background-image: linear-gradient(
|
|
37
|
+
90deg,
|
|
38
|
+
transparent,
|
|
39
|
+
transparentize($kws-skeleton-hilight-color, 0.6),
|
|
40
|
+
transparent
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@keyframes kws-skeleton-shine {
|
|
46
|
+
0% {
|
|
47
|
+
background-position: -200px 0;
|
|
48
|
+
}
|
|
49
|
+
100% {
|
|
50
|
+
background-position: calc(200px + 100%) 0;
|
|
51
|
+
}
|
|
52
|
+
}
|
package/styles/Timeline.scss
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
$kws-theme-colors: $colors !default;
|
|
1
2
|
$kws-timeline-default-color: $grey !default;
|
|
2
3
|
$kws-timeline-default-color-invert: $light !default;
|
|
3
4
|
|
|
@@ -92,7 +93,7 @@ $kws-timeline-default-color-invert: $light !default;
|
|
|
92
93
|
top: 0;
|
|
93
94
|
}
|
|
94
95
|
|
|
95
|
-
@each $name, $pair in $colors {
|
|
96
|
+
@each $name, $pair in $kws-theme-colors {
|
|
96
97
|
$color: nth($pair, 1);
|
|
97
98
|
$color-invert: nth($pair, 2);
|
|
98
99
|
&.is-#{$name} {
|
package/utils/index.js
CHANGED
package/utils/keyboard-events.js
CHANGED
|
@@ -9,7 +9,7 @@ let events = [
|
|
|
9
9
|
{name: 'uparrow', code: 38},
|
|
10
10
|
{name: 'backspace', code: 8},
|
|
11
11
|
{name: 'del', code: 46},
|
|
12
|
-
]
|
|
12
|
+
];
|
|
13
13
|
|
|
14
14
|
export function keyboardEvents(node) {
|
|
15
15
|
function keydownHandler(event) {
|
|
@@ -20,7 +20,7 @@ export function keyboardEvents(node) {
|
|
|
20
20
|
new CustomEvent(name)
|
|
21
21
|
);
|
|
22
22
|
}
|
|
23
|
-
})
|
|
23
|
+
});
|
|
24
24
|
}
|
|
25
25
|
node.addEventListener('keydown', keydownHandler, false);
|
|
26
26
|
|
|
@@ -29,4 +29,4 @@ export function keyboardEvents(node) {
|
|
|
29
29
|
node.removeEventListener('keydown', keydownHandler, false);
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
-
}
|
|
32
|
+
}
|