@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
|
@@ -18,12 +18,13 @@
|
|
|
18
18
|
|
|
19
19
|
-->
|
|
20
20
|
|
|
21
|
-
{#if variant
|
|
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
|
|
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
|
|
91
|
+
return el && el.id && el.id !== props.id;
|
|
92
92
|
});
|
|
93
93
|
|
|
94
94
|
return items;
|
package/helpers/Icon.svelte
CHANGED
|
@@ -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
|
|
102
|
+
family && family !== "" ? family : globalFamily ? globalFamily : "fa";
|
|
103
103
|
|
|
104
104
|
switch (usedFamily) {
|
|
105
105
|
case "lar":
|
package/helpers/Loader.svelte
CHANGED
|
@@ -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.
|
|
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.
|
|
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)
|
|
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 = "";
|
package/helpers/Message.svelte
CHANGED
|
@@ -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
|
|
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}>
|
package/helpers/Modal.svelte
CHANGED
|
@@ -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
|
-
|
|
119
|
+
/**
|
|
120
|
+
* Call this method to close modal programmatically
|
|
121
|
+
*/
|
|
122
|
+
export function close() {
|
|
118
123
|
is_active = false;
|
|
119
124
|
}
|
|
120
125
|
|
|
121
|
-
|
|
126
|
+
/**
|
|
127
|
+
* Call this method to open modal programmatically
|
|
128
|
+
*/
|
|
129
|
+
export function open() {
|
|
122
130
|
is_active = true;
|
|
123
131
|
}
|
|
124
132
|
</script>
|
package/helpers/Nl2br.svelte
CHANGED
|
@@ -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>
|
package/helpers/Panel.svelte
CHANGED
|
@@ -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
|
|
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">
|
package/helpers/Popover.svelte
CHANGED
|
@@ -23,11 +23,11 @@ When set to `null`, it will use the content of the `popover` slot, Default: `nul
|
|
|
23
23
|
It can be any CSS value associated with `max-width` property, including `"none"`, Default: `"none"`
|
|
24
24
|
@param {string} [style=""] - Inline CSS for Popover trigger, Default: `""`
|
|
25
25
|
@param {string} [class=""] - CSS classes for Popover trigger, Default: `""`
|
|
26
|
-
@
|
|
27
|
-
@
|
|
28
|
-
@
|
|
29
|
-
@
|
|
30
|
-
@
|
|
26
|
+
@method `open()` - Open method
|
|
27
|
+
@method `close()` - Close method
|
|
28
|
+
@method `enable()` - Enable method
|
|
29
|
+
@method `disable()` - Disable method
|
|
30
|
+
@method `setProps(props)` - SetProps method
|
|
31
31
|
|
|
32
32
|
### Events
|
|
33
33
|
- `opening` - Triggered when popover is opening
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
@param {number} [lines=1] - Lines property, Default: `1`
|
|
6
|
+
@param {string} [width="100%"] - CSS string denoting width of the Skeleton
|
|
7
|
+
**Examples:** `10px` | `5rem` | `100vh`, Default: `"100%"`
|
|
8
|
+
@param {string} [height="auto"] - CSS string denoting height of the Skeleton
|
|
9
|
+
**Examples:** `10px` | `5rem` | `100vh` | `auto`, Default: `"auto"`
|
|
10
|
+
@param {string} [radius="0px"] - CSS string denoting border-radius of the Skeleton
|
|
11
|
+
**Examples:** `10px` | `5rem`, Default: `"0px"`
|
|
12
|
+
@param {boolean} [circle=false] - Whether the Skeleton should be rendered as a circle.
|
|
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: `""`
|
|
15
|
+
@param {string} [class=""] - CSS class for Skeleton, Default: `""`
|
|
16
|
+
|
|
17
|
+
-->
|
|
18
|
+
<!-- eslint-disable-next-line no-unused-vars -->
|
|
19
|
+
{#each { length: lines } as _, i}
|
|
20
|
+
<span
|
|
21
|
+
class="kws-skeleton is-{color} {klass}"
|
|
22
|
+
style="width:{width};height:{height};border-radius:{border_radius}">
|
|
23
|
+
‌
|
|
24
|
+
</span>
|
|
25
|
+
{/each}
|
|
26
|
+
|
|
27
|
+
<script>
|
|
28
|
+
export let /**
|
|
29
|
+
* Number of lines of text to display.
|
|
30
|
+
*/
|
|
31
|
+
lines = 1,
|
|
32
|
+
/**
|
|
33
|
+
* CSS string denoting width of the Skeleton
|
|
34
|
+
* **Examples:** `10px` | `5rem` | `100vh`
|
|
35
|
+
*/
|
|
36
|
+
width = "100%",
|
|
37
|
+
/**
|
|
38
|
+
* CSS string denoting height of the Skeleton
|
|
39
|
+
* **Examples:** `10px` | `5rem` | `100vh` | `auto`
|
|
40
|
+
*/
|
|
41
|
+
height = "auto",
|
|
42
|
+
/**
|
|
43
|
+
* CSS string denoting border-radius of the Skeleton
|
|
44
|
+
* **Examples:** `10px` | `5rem`
|
|
45
|
+
*/
|
|
46
|
+
radius = "0px",
|
|
47
|
+
/**
|
|
48
|
+
* Whether the Skeleton should be rendered as a circle.
|
|
49
|
+
* If this is set to `true`, the `radius` property will be ignored.
|
|
50
|
+
*/
|
|
51
|
+
circle = false,
|
|
52
|
+
/**
|
|
53
|
+
* Color of the Skeleton lines
|
|
54
|
+
* @type {'' | 'transparent' | 'warning' | 'info' | 'danger' | 'primary' | 'success' | 'link'}
|
|
55
|
+
*/
|
|
56
|
+
color = "";
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* CSS class for Skeleton
|
|
60
|
+
* @type {string}
|
|
61
|
+
*/
|
|
62
|
+
let klass = "";
|
|
63
|
+
export { klass as class };
|
|
64
|
+
|
|
65
|
+
$: border_radius = circle ? "50%" : radius;
|
|
66
|
+
</script>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
@param {'left'|'center'|'right'} [align="left"] - Alignment of the Timeline child items, Default: `"left"`
|
|
6
|
+
@param {string} [class=""] - CSS classes for the Timeline container, Default: `""`
|
|
7
|
+
|
|
8
|
+
### Slots
|
|
9
|
+
- `<slot name="default" />` - Default slot for placing all TimelineItem and TimelineHeader components
|
|
10
|
+
|
|
11
|
+
-->
|
|
12
|
+
<ul class="kws-timeline is-{align} {klass}">
|
|
13
|
+
<!--Default slot for placing all TimelineItem and TimelineHeader components--><slot />
|
|
14
|
+
</ul>
|
|
15
|
+
|
|
16
|
+
<script>
|
|
17
|
+
/**
|
|
18
|
+
* Alignment of the Timeline child items
|
|
19
|
+
* @type {'left'|'center'|'right'}
|
|
20
|
+
*/
|
|
21
|
+
export let align = "left";
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* CSS classes for the Timeline container
|
|
25
|
+
*/
|
|
26
|
+
let klass = "";
|
|
27
|
+
export { klass as class };
|
|
28
|
+
</script>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
@param {string} [class=""] - CSS classes for the TimelineItem container, Default: `""`
|
|
6
|
+
|
|
7
|
+
### Slots
|
|
8
|
+
- `<slot name="default" />` - Content of the header, recommended to wrap with a `.tag` element.
|
|
9
|
+
|
|
10
|
+
-->
|
|
11
|
+
<header class="kws-timeline-header {klass}">
|
|
12
|
+
<!--Content of the header, recommended to wrap with a `.tag` element.--><slot />
|
|
13
|
+
</header>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
/**
|
|
17
|
+
* CSS classes for the TimelineItem container
|
|
18
|
+
*/
|
|
19
|
+
let klass = "";
|
|
20
|
+
export { klass as class };
|
|
21
|
+
</script>
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
@param {''|'dark' | 'light' | 'warning' | 'info' | 'danger' | 'primary' | 'success'} [color="primary"] - Color of marker and border, Default: `"primary"`
|
|
6
|
+
@param {string} [marker_icon="null"] - Any icon name accepted by the Icon component, icon will be placed inside the marker, Default: `"null"`
|
|
7
|
+
@param {string} [marker_image="null"] - Any image URL, the image will be placed inside the marker, Default: `"null"`
|
|
8
|
+
@param {string} [class=""] - CSS classes for the TimelineItem container, Default: `""`
|
|
9
|
+
|
|
10
|
+
### Slots
|
|
11
|
+
- `<slot name="above" />` - Optional text to be displayed above the main text
|
|
12
|
+
- `<slot name="default" />` - Default slot containing the main text
|
|
13
|
+
- `<slot name="below" />` - Optional text to be displayed below the main text
|
|
14
|
+
- `<slot name="thumbnail" />` - Optional thumbnail image do be displayed next to the main content
|
|
15
|
+
|
|
16
|
+
-->
|
|
17
|
+
<li class="kws-timeline-item is-{color} {klass}">
|
|
18
|
+
<div class="kws-timeline-marker">
|
|
19
|
+
{#if marker_icon && !marker_image}
|
|
20
|
+
<Icon icon={marker_icon} />
|
|
21
|
+
{/if}{#if marker_image && !marker_icon}
|
|
22
|
+
<figure class="image is-32x32"><img src={marker_image} alt="" /></figure>
|
|
23
|
+
{/if}
|
|
24
|
+
</div>
|
|
25
|
+
<div class="kws-timeline-content">
|
|
26
|
+
<span class="is-block has-text-grey"
|
|
27
|
+
><!--Optional text to be displayed above the main text--><slot
|
|
28
|
+
name="above" /></span>
|
|
29
|
+
<span class="is-block description">
|
|
30
|
+
<!--Default slot containing the main text--><slot />
|
|
31
|
+
</span>
|
|
32
|
+
|
|
33
|
+
<span class="is-block has-text-grey">
|
|
34
|
+
<!--Optional text to be displayed below the main text--><slot
|
|
35
|
+
name="below" />
|
|
36
|
+
</span>
|
|
37
|
+
</div>
|
|
38
|
+
{#if $$slots.thumbnail}
|
|
39
|
+
<div class="kws-timeline-image">
|
|
40
|
+
<!--Optional thumbnail image do be displayed next to the main content--><slot
|
|
41
|
+
name="thumbnail" />
|
|
42
|
+
</div>
|
|
43
|
+
{/if}
|
|
44
|
+
</li>
|
|
45
|
+
|
|
46
|
+
<script>
|
|
47
|
+
import { Icon } from "@kws3/ui";
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Color of marker and border
|
|
51
|
+
* @type {''|'dark' | 'light' | 'warning' | 'info' | 'danger' | 'primary' | 'success'}
|
|
52
|
+
*/
|
|
53
|
+
export let color = "primary";
|
|
54
|
+
/**
|
|
55
|
+
* Any icon name accepted by the Icon component, icon will be placed inside the marker
|
|
56
|
+
* @type {string}
|
|
57
|
+
*/
|
|
58
|
+
export let marker_icon = null;
|
|
59
|
+
/**
|
|
60
|
+
* Any image URL, the image will be placed inside the marker
|
|
61
|
+
* @type {string}
|
|
62
|
+
*/
|
|
63
|
+
export let marker_image = null;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* CSS classes for the TimelineItem container
|
|
67
|
+
*/
|
|
68
|
+
let klass = "";
|
|
69
|
+
export { klass as class };
|
|
70
|
+
</script>
|
package/index.js
CHANGED
|
@@ -10,6 +10,11 @@ export { default as Panel } from "./helpers/Panel.svelte";
|
|
|
10
10
|
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
|
+
export { default as Skeleton } from "./helpers/Skeleton.svelte";
|
|
14
|
+
export { default as Divider } from "./helpers/Divider.svelte";
|
|
15
|
+
export { default as Timeline } from "./helpers/Timeline/Timeline.svelte";
|
|
16
|
+
export { default as TimelineItem } from "./helpers/Timeline/TimelineItem.svelte";
|
|
17
|
+
export { default as TimelineHeader } from "./helpers/Timeline/TimelineHeader.svelte";
|
|
13
18
|
export { default as Nl2br } from "./helpers/Nl2br.svelte";
|
|
14
19
|
export { default as ClipboardCopier } from "./helpers/ClipboardCopier.svelte";
|
|
15
20
|
export { alert, confirm, prompt, default as Dialog } from "./helpers/Dialog";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kws3/ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.1",
|
|
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": "f9be2abdbb4f340ade0d47be929aac91381a5e4b"
|
|
33
33
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
@component
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
@param {boolean} [active=false] - Used to set the active pane
|
|
5
|
+
@param {boolean} [active=false] - Used to set the active pane, Default: `false`
|
|
6
6
|
@param {string} [style=""] - Inline CSS of component, Default: `""`
|
|
7
7
|
@param {boolean} [v_center=true] - Vertical alignment of content inside the active pane., Default: `true`
|
|
8
8
|
@param {boolean} [h_center=true] - Horizontal alignment of content inside the active pane., Default: `true`
|
|
@@ -40,7 +40,7 @@ This will work only when `track_height` is set to `true`
|
|
|
40
40
|
const fire = createEventDispatcher();
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
|
-
* Used to set the active pane
|
|
43
|
+
* Used to set the active pane
|
|
44
44
|
*/
|
|
45
45
|
export let active = false,
|
|
46
46
|
/**
|
|
@@ -2,34 +2,31 @@
|
|
|
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" />`
|
|
11
11
|
|
|
12
12
|
-->
|
|
13
|
-
<div
|
|
14
|
-
class="sliding-pane-set {vertical ? 'is-vertical' : ''} {classes}"
|
|
15
|
-
{style}>
|
|
13
|
+
<div class="sliding-pane-set {vertical ? 'is-vertical' : ''} {klass}" {style}>
|
|
16
14
|
<slot />
|
|
17
15
|
</div>
|
|
18
16
|
|
|
19
17
|
<script>
|
|
20
18
|
/**
|
|
21
|
-
*
|
|
22
|
-
* @type {string}
|
|
19
|
+
* Inline style of component
|
|
23
20
|
*/
|
|
24
|
-
export let
|
|
21
|
+
export let style = "",
|
|
25
22
|
/**
|
|
26
|
-
*
|
|
27
|
-
* @type {string}
|
|
28
|
-
*/
|
|
29
|
-
style = "",
|
|
30
|
-
/**
|
|
31
|
-
* Vertical Aligned - true/false
|
|
32
|
-
* @type {boolean}
|
|
23
|
+
* Vertical transform of SlidingPane.
|
|
33
24
|
*/
|
|
34
25
|
vertical = false;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* CSS classes for the SlidingPaneSet
|
|
29
|
+
*/
|
|
30
|
+
let klass = "";
|
|
31
|
+
export { klass as class };
|
|
35
32
|
</script>
|
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
|
+
}
|