@kws3/ui 1.6.7 → 1.7.1
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 +99 -0
- package/LICENSE +21 -0
- package/README.md +1 -1
- 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 +107 -47
- package/datagrid/TileView/TileViewItem.svelte +1 -0
- package/forms/MaskedInput.svelte +1 -1
- package/forms/PasswordValidator/validatePassword.js +2 -2
- package/forms/actions.js +2 -1
- 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/helpers/Timeline/Timeline.svelte +28 -0
- package/helpers/Timeline/TimelineHeader.svelte +21 -0
- package/helpers/Timeline/TimelineItem.svelte +70 -0
- package/index.js +5 -0
- package/package.json +2 -2
- package/sliding-panes/SlidingPane.svelte +2 -2
- package/sliding-panes/SlidingPaneSet.svelte +12 -15
- package/styles/DataSort.scss +5 -0
- package/styles/Divider.scss +102 -0
- package/styles/Grid.scss +1 -0
- package/styles/Loader.scss +35 -34
- package/styles/Pagination.scss +1 -1
- package/styles/RangeSlider.scss +2 -1
- package/styles/Skeleton.scss +52 -0
- package/styles/Timeline.scss +165 -0
- package/utils/index.js +1 -1
- package/utils/keyboard-events.js +3 -3
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/Pagination.scss
CHANGED
|
@@ -14,7 +14,7 @@ $kws-pagination-item-active-color: findColorInvert(
|
|
|
14
14
|
|
|
15
15
|
$kws-pagination-frame-box-shadow: 0 0.125rem 0.1875rem rgba(0, 0, 0, 0.1),
|
|
16
16
|
0 0 0 0.0625rem rgba(0, 0, 0, 0.1) !default;
|
|
17
|
-
$kws-pagination-frame-background: linear-gradient(#fff, #fafafa);
|
|
17
|
+
$kws-pagination-frame-background: linear-gradient(#fff, #fafafa) !default;
|
|
18
18
|
|
|
19
19
|
.pagination {
|
|
20
20
|
&.is-small {
|
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
|
+
}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
$kws-theme-colors: $colors !default;
|
|
2
|
+
$kws-timeline-default-color: $grey !default;
|
|
3
|
+
$kws-timeline-default-color-invert: $light !default;
|
|
4
|
+
|
|
5
|
+
@mixin right-aligned-timeline-item {
|
|
6
|
+
flex-direction: row-reverse;
|
|
7
|
+
.kws-timeline-marker {
|
|
8
|
+
right: 0;
|
|
9
|
+
left: auto;
|
|
10
|
+
transform: translateX(50%);
|
|
11
|
+
}
|
|
12
|
+
.kws-timeline-content {
|
|
13
|
+
text-align: right;
|
|
14
|
+
padding-left: 0;
|
|
15
|
+
padding-right: 1.75rem;
|
|
16
|
+
}
|
|
17
|
+
&:before {
|
|
18
|
+
right: -0.5px;
|
|
19
|
+
left: auto;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.kws-timeline-item {
|
|
24
|
+
display: flex;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
align-items: center;
|
|
27
|
+
position: relative;
|
|
28
|
+
padding: 0.5rem 0;
|
|
29
|
+
&:first-child {
|
|
30
|
+
padding-top: 0;
|
|
31
|
+
}
|
|
32
|
+
&:last-child {
|
|
33
|
+
padding-bottom: 0;
|
|
34
|
+
}
|
|
35
|
+
.kws-timeline-marker {
|
|
36
|
+
position: absolute;
|
|
37
|
+
left: 0;
|
|
38
|
+
background: $kws-timeline-default-color;
|
|
39
|
+
border: 1px solid $kws-timeline-default-color;
|
|
40
|
+
border-radius: 100%;
|
|
41
|
+
transform: translateX(-50%);
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
justify-content: center;
|
|
45
|
+
padding: 0.25rem;
|
|
46
|
+
overflow: hidden;
|
|
47
|
+
&:empty {
|
|
48
|
+
min-height: 1rem;
|
|
49
|
+
min-width: 1rem;
|
|
50
|
+
padding: 0;
|
|
51
|
+
border-width: 4px;
|
|
52
|
+
background: $kws-timeline-default-color-invert;
|
|
53
|
+
}
|
|
54
|
+
.icon {
|
|
55
|
+
color: $kws-timeline-default-color-invert;
|
|
56
|
+
width: 16px;
|
|
57
|
+
height: 16px;
|
|
58
|
+
font-size: 0.75rem !important;
|
|
59
|
+
}
|
|
60
|
+
.image {
|
|
61
|
+
margin: -0.25rem;
|
|
62
|
+
img {
|
|
63
|
+
border-radius: 100%;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
.kws-timeline-content {
|
|
68
|
+
padding-left: 1.75rem;
|
|
69
|
+
flex-grow: 1;
|
|
70
|
+
flex-shrink: 1;
|
|
71
|
+
}
|
|
72
|
+
.kws-timeline-image {
|
|
73
|
+
flex-grow: 0;
|
|
74
|
+
flex-shrink: 0;
|
|
75
|
+
width: 32px;
|
|
76
|
+
img {
|
|
77
|
+
max-width: 100%;
|
|
78
|
+
max-height: 100%;
|
|
79
|
+
border-radius: $radius;
|
|
80
|
+
box-shadow: 0 0.125rem 0.1875rem rgba(10, 10, 10, 0.1),
|
|
81
|
+
0 0 0 0.0625rem rgba(10, 10, 10, 0.1);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&:before {
|
|
86
|
+
content: "";
|
|
87
|
+
background-color: $kws-timeline-default-color;
|
|
88
|
+
display: block;
|
|
89
|
+
width: 1px;
|
|
90
|
+
height: 100%;
|
|
91
|
+
position: absolute;
|
|
92
|
+
left: -0.5px;
|
|
93
|
+
top: 0;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@each $name, $pair in $kws-theme-colors {
|
|
97
|
+
$color: nth($pair, 1);
|
|
98
|
+
$color-invert: nth($pair, 2);
|
|
99
|
+
&.is-#{$name} {
|
|
100
|
+
.kws-timeline-marker {
|
|
101
|
+
border-color: $color;
|
|
102
|
+
background-color: $color;
|
|
103
|
+
&:empty {
|
|
104
|
+
background-color: $color-invert;
|
|
105
|
+
}
|
|
106
|
+
.icon {
|
|
107
|
+
color: $color-invert;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
&:before {
|
|
111
|
+
background-color: $color;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.kws-timeline-header {
|
|
118
|
+
width: 4em;
|
|
119
|
+
min-width: 4em;
|
|
120
|
+
word-wrap: normal;
|
|
121
|
+
text-align: center;
|
|
122
|
+
transform: translateX(-25px);
|
|
123
|
+
+ .kws-timeline-header {
|
|
124
|
+
padding-top: 0.5rem;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.kws-timeline {
|
|
129
|
+
list-style: none;
|
|
130
|
+
margin: 0;
|
|
131
|
+
padding: 1rem;
|
|
132
|
+
display: flex;
|
|
133
|
+
flex-direction: column;
|
|
134
|
+
|
|
135
|
+
&.is-center {
|
|
136
|
+
.kws-timeline-item {
|
|
137
|
+
width: 50%;
|
|
138
|
+
align-self: flex-end;
|
|
139
|
+
flex-direction: row;
|
|
140
|
+
&:nth-of-type(2n) {
|
|
141
|
+
align-self: flex-start;
|
|
142
|
+
@include right-aligned-timeline-item;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
.kws-timeline-header {
|
|
146
|
+
width: 100%;
|
|
147
|
+
transform: none;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
&.is-right {
|
|
152
|
+
justify-content: flex-end;
|
|
153
|
+
align-items: flex-end;
|
|
154
|
+
.kws-timeline-item {
|
|
155
|
+
width: 100%;
|
|
156
|
+
align-self: flex-end;
|
|
157
|
+
@include right-aligned-timeline-item;
|
|
158
|
+
}
|
|
159
|
+
.kws-timeline-header {
|
|
160
|
+
transform: translateX(25px);
|
|
161
|
+
width: 100%;
|
|
162
|
+
text-align: right;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
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
|
+
}
|