@kws3/ui 1.6.6 → 1.7.0

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 ADDED
@@ -0,0 +1,90 @@
1
+ ## 1.7.0
2
+ - Ensure uniform usage of $kws-theme-colors across all components, this means $kws-theme-colors can be indepnedent of the global $colors SCSS variable.
3
+ - `DataSearch` component: Expand filters to fill area when main search input is not present.
4
+ - `DataSort` component: Increase click area for activating dropdown, and provide visual segementation between label and dropdown.
5
+ - New `Skeleton` component.
6
+
7
+ ## 1.6.9
8
+ - New `Timeline`, `TimelineItem` and `TimelineHeader` components.
9
+
10
+ ## 1.6.8
11
+ - Vertically align `is-icon` cells in `Grid`
12
+
13
+ ## 1.6.7
14
+ - Added granular events `showing`, `shown`, `hiding` and `hidden` for `Popover`.
15
+ - Added `is-checked` class on `Grid` when a row is checked using the multiselect checkboxes.
16
+ - New colors for `is-checked` class on `Grid`
17
+
18
+ ## 1.6.6
19
+ - Enhance `Popover` with native `show` `hide` `enable` `disable` methods
20
+
21
+ ## 1.6.5
22
+ - Filter fix on `DataSearch`
23
+
24
+ ## 1.6.4
25
+ - Add support for `dropdown_portal` prop in `SearchableSelect`
26
+
27
+ ## 1.6.3
28
+ - Prevent submit call on `MultiSelect` when `Enter` key is pressed while searching
29
+ - Fix filter items going blank after search is initiated in `DataSearch`
30
+
31
+ ## 1.6.2
32
+ - Add `dropdown_portal` prop on `MultiSelect` to allow rendering dropdown in alternative locations
33
+
34
+ ## 1.6.1
35
+ - New `Portal` component
36
+ - Use `Portal` for `MultiSelect` and `SearchableSelect` components
37
+
38
+ ## 1.6.0
39
+ - Fix `DataSearch` responsiveness for mobile
40
+ - Fix `Pagination` CSS for mobile
41
+ - Fix `DataSort` responsiveness for mobile
42
+ - Fix functionality of `DataSearch`
43
+
44
+ ## 1.5.9
45
+ - Fix `z-index` issue with `SearchableSelect`
46
+
47
+ ## 1.5.8
48
+ - Showing `undefined` on total in `Pagination`
49
+
50
+ ## 1.5.7
51
+ - Width calculation on `DataSearch`
52
+ - More `text` validation `Nl2br`
53
+
54
+ ## 1.5.6
55
+ - Fix attribute of `MultiSelect`
56
+ - Fix `text` checking on `Nl2br`
57
+
58
+ ## 1.5.5
59
+ - Added `BarChart`
60
+ - Added `LineChart`
61
+ - Added `AreaChart`
62
+ - Added `RadialChart`
63
+ - Support `sparklines` in `Charts`
64
+ - Add `yAxisOptions` and `horizontal` bar for `Charts`
65
+ - Fix attribute of `ConfirmButton`
66
+ - Fix error Handling in `MixedChart`
67
+
68
+ ## 1.5.1
69
+ - Chart bugfixes
70
+ - Fix attribute of `NumberInput` for UI testing
71
+
72
+ ## 1.5.0
73
+ - Added `DonutChart`
74
+ - Added `MixedChart`
75
+ - Added `PieChart`
76
+
77
+ ## 1.4.7
78
+ - Fix value mismatch on `NumberInput`
79
+
80
+ ## 1.4.6
81
+ - Fix Typing bug on `NumberInput`
82
+
83
+ ## 1.4.5
84
+ - Fix **on:change** event on `NumberInput`
85
+
86
+ ## 1.4.4
87
+ - import `Floatie`, `FloatingUIOutput`, `FloatiesStore` from `@kws3/ui` for `FloatingUIOutput`
88
+
89
+ ## 1.4.3
90
+ - Rename `completion_timeout` to `error_timeout` in `Buttons`
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 KWS3 Media Ltd
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,3 @@
1
1
  UI components for use with Svelte v3 applications.
2
2
 
3
- Docs: [https://ui.kws3.media](https://ui.kws3.media)
3
+ [Demo and Documentation](https://ui.kws3.media)
@@ -15,9 +15,9 @@
15
15
  @param {number} [completion_timeout=600] - How long to wait before `saved` event is fired, and the UI state reverts back to normal, Default: `600`
16
16
  @param {number} [error_timeout=3000] - How long to wait before `error` event is fired, and the UI state reverts back to normal, Default: `3000`
17
17
  @param {string} [class=""] - CSS classes for Button container, Default: `""`
18
- @param {function} [saving()] - call this function on form saving state
19
- @param {function} [saved(callback, timeout)] - call this function after form saved
20
- @param {function} [error(callback, timeout)] - call this function on form error state
18
+ @method `saving()` - call this method on form saving state
19
+ @method `saved(callback, timeout)` - call this method after form saved
20
+ @method `error(callback, timeout)` - call this method on form error state
21
21
 
22
22
  ### Events
23
23
  - `saved` - Fired on successful submission
@@ -115,7 +115,7 @@
115
115
  export { klass as class };
116
116
 
117
117
  /**
118
- * call this function on form saving state
118
+ * call this method on form saving state
119
119
  */
120
120
  export function saving() {
121
121
  tracker = {
@@ -126,7 +126,7 @@
126
126
  }
127
127
 
128
128
  /**
129
- * call this function after form saved
129
+ * call this method after form saved
130
130
  */
131
131
  export function saved(callback, timeout = completion_timeout) {
132
132
  tracker = {
@@ -150,7 +150,7 @@
150
150
  }
151
151
 
152
152
  /**
153
- * call this function on form error state
153
+ * call this method on form error state
154
154
  */
155
155
  export function error(callback, timeout = error_timeout) {
156
156
  tracker = {
@@ -11,7 +11,10 @@
11
11
  -->
12
12
 
13
13
  {#if filter.type == "multiselect"}
14
- <div class="control search-control" style={filterWidthStyle}>
14
+ <div
15
+ class="control search-control"
16
+ class:is-expanded={shouldExpandToFill}
17
+ style={filterWidthStyle}>
15
18
  <MultiSelect
16
19
  options={sanitizedOptions}
17
20
  placeholder={`Any ${name}`}
@@ -23,14 +26,20 @@
23
26
  class={hilightClass} />
24
27
  </div>
25
28
  {:else if filter.type == "date"}
26
- <div class="control search-control" style={filterWidthStyle}>
29
+ <div
30
+ class="control search-control"
31
+ class:is-expanded={shouldExpandToFill}
32
+ style={filterWidthStyle}>
27
33
  <Datepicker
28
34
  class={hilightClass}
29
35
  bind:value={filterVals[filter.name]}
30
36
  placeholder="{capitaliseFirstLetter(name)} Date" />
31
37
  </div>
32
38
  {:else if filter.type == "daterange"}
33
- <div class="control search-control" style={filterWidthStyle}>
39
+ <div
40
+ class="control search-control"
41
+ class:is-expanded={shouldExpandToFill}
42
+ style={filterWidthStyle}>
34
43
  <Datepicker
35
44
  class={hilightClass}
36
45
  bind:value={filterVals[filter.name]}
@@ -38,7 +47,10 @@
38
47
  placeholder="{capitaliseFirstLetter(name)} Date Range" />
39
48
  </div>
40
49
  {:else if filter.options.length > 10}
41
- <div class="control search-control" style={filterWidthStyle}>
50
+ <div
51
+ class="control search-control"
52
+ class:is-expanded={shouldExpandToFill}
53
+ style={filterWidthStyle}>
42
54
  <SearchableSelect
43
55
  options={sanitizedOptions}
44
56
  placeholder={`Any ${name}`}
@@ -50,12 +62,13 @@
50
62
  {:else}
51
63
  <div
52
64
  class="select control search-control {hilightClass}"
65
+ class:is-expanded={shouldExpandToFill}
53
66
  style={filterWidthStyle}
54
67
  data-cy="select-container">
55
68
  <select
56
69
  bind:value={filterVals[filter.name]}
57
70
  class="is-radiusless {hilightClass}"
58
- style="max-width:100%"
71
+ style="max-width:100%;width:100%;"
59
72
  data-cy={cy}>
60
73
  {#each sanitizedOptions as option}
61
74
  {#if option}
@@ -103,6 +116,8 @@
103
116
 
104
117
  $: filterVals, filter, convertToValuesArray();
105
118
 
119
+ $: shouldExpandToFill = !filterWidthStyle || filterWidthStyle.trim() == "";
120
+
106
121
  function convertValuesToString() {
107
122
  tick().then(() => {
108
123
  filterVals[filter.name] = multiSelectValue
@@ -29,7 +29,8 @@
29
29
  <tr
30
30
  in:fly={{ x: 20, delay: 25 * row_index }}
31
31
  on:click|stopPropagation={rowClick}
32
- class:is-selected={rowActive}>
32
+ class:is-selected={rowActive}
33
+ class:is-checked={checked}>
33
34
  {#if bulk_actions}
34
35
  <td style="vertical-align:middle;">
35
36
  <Checkbox
@@ -55,7 +56,10 @@
55
56
  {/each}
56
57
  </tr>
57
58
  {:else}
58
- <tr on:click|stopPropagation={rowClick} class:is-selected={rowActive}>
59
+ <tr
60
+ on:click|stopPropagation={rowClick}
61
+ class:is-selected={rowActive}
62
+ class:is-checked={checked}>
59
63
  {#if bulk_actions}
60
64
  <td style="vertical-align:middle;">
61
65
  <Checkbox
@@ -23,15 +23,17 @@ 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
- @param {function} [open()] - Open function
27
- @param {function} [close()] - Close function
28
- @param {function} [enable()] - Enable function
29
- @param {function} [disable()] - Disable function
30
- @param {function} [setProps(props)] - SetProps function
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
- - `open` - Triggered when popoper is shown
34
- - `close` - Triggered when popoper is hidden
33
+ - `opening` - Triggered when popover is opening
34
+ - `open` - Triggered when popover is opened
35
+ - `closing` - Triggered when popover is closing
36
+ - `close` - Triggered when popover is closed
35
37
  - `trigger` - Triggered when popover is triggered either programatically or by user interaction
36
38
 
37
39
  ### Slots
@@ -42,7 +44,9 @@ It can be any CSS value associated with `max-width` property, including `"none"`
42
44
  <span
43
45
  use:popover={{ content: targetNode }}
44
46
  bind:this={popoverParent}
47
+ on:showing={popoverShowing}
45
48
  on:shown={popoverShown}
49
+ on:hiding={popoverHiding}
46
50
  on:hidden={popoverHidden}
47
51
  on:triggered={popoverTriggered}
48
52
  data-tippy-trigger={trigger}
@@ -160,16 +164,30 @@ It can be any CSS value associated with `max-width` property, including `"none"`
160
164
  getInstance().setProps(props);
161
165
  }
162
166
 
167
+ const popoverShowing = ({ detail }) => {
168
+ /**
169
+ * Triggered when popover is opening
170
+ */
171
+ fire("opening", detail);
172
+ };
173
+
163
174
  const popoverShown = ({ detail }) => {
164
175
  /**
165
- * Triggered when popoper is shown
176
+ * Triggered when popover is opened
166
177
  */
167
178
  fire("open", detail);
168
179
  };
169
180
 
181
+ const popoverHiding = ({ detail }) => {
182
+ /**
183
+ * Triggered when popover is closing
184
+ */
185
+ fire("closing", detail);
186
+ };
187
+
170
188
  const popoverHidden = ({ detail }) => {
171
189
  /**
172
- * Triggered when popoper is hidden
190
+ * Triggered when popover is closed
173
191
  */
174
192
  fire("close", detail);
175
193
  };
@@ -0,0 +1,65 @@
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
+ {#each { length: lines } as _, i}
19
+ <span
20
+ class="kws-skeleton is-{color} {klass}"
21
+ style="width:{width};height:{height};border-radius:{border_radius}">
22
+ &zwnj;
23
+ </span>
24
+ {/each}
25
+
26
+ <script>
27
+ export let /**
28
+ * Number of lines of text to display.
29
+ */
30
+ lines = 1,
31
+ /**
32
+ * CSS string denoting width of the Skeleton
33
+ * **Examples:** `10px` | `5rem` | `100vh`
34
+ */
35
+ width = "100%",
36
+ /**
37
+ * CSS string denoting height of the Skeleton
38
+ * **Examples:** `10px` | `5rem` | `100vh` | `auto`
39
+ */
40
+ height = "auto",
41
+ /**
42
+ * CSS string denoting border-radius of the Skeleton
43
+ * **Examples:** `10px` | `5rem`
44
+ */
45
+ radius = "0px",
46
+ /**
47
+ * Whether the Skeleton should be rendered as a circle.
48
+ * If this is set to `true`, the `radius` property will be ignored.
49
+ */
50
+ circle = false,
51
+ /**
52
+ * Color of the Skeleton lines
53
+ * @type {'transparent' | 'warning' | 'info' | 'danger' | 'primary' | 'success' | 'link'}
54
+ */
55
+ color = "";
56
+
57
+ /**
58
+ * CSS class for Skeleton
59
+ * @type {string}
60
+ */
61
+ let klass = "";
62
+ export { klass as class };
63
+
64
+ $: border_radius = circle ? "50%" : radius;
65
+ </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>
@@ -31,9 +31,15 @@ function createTippyAction(defaultOpts) {
31
31
  function makeOptions() {
32
32
  return Object.assign({}, defaultOpts, opts, {
33
33
  onShow(instance) {
34
+ dispatch("showing", { instance });
35
+ },
36
+ onShown(instance) {
34
37
  dispatch("shown", { instance });
35
38
  },
36
39
  onHide(instance) {
40
+ dispatch("hiding", { instance });
41
+ },
42
+ onHidden(instance) {
37
43
  dispatch("hidden", { instance });
38
44
  },
39
45
  onTrigger(instance) {
package/index.js CHANGED
@@ -10,6 +10,10 @@ 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 Timeline } from "./helpers/Timeline/Timeline.svelte";
15
+ export { default as TimelineItem } from "./helpers/Timeline/TimelineItem.svelte";
16
+ export { default as TimelineHeader } from "./helpers/Timeline/TimelineHeader.svelte";
13
17
  export { default as Nl2br } from "./helpers/Nl2br.svelte";
14
18
  export { default as ClipboardCopier } from "./helpers/ClipboardCopier.svelte";
15
19
  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.6.6",
3
+ "version": "1.7.0",
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": "0f6862d3aefc099de5ccc7df5eaca60c47bbcdab"
32
+ "gitHead": "2da51d63a233a8129e31898f0a134f3a68d7f1ec"
33
33
  }
@@ -2,7 +2,7 @@
2
2
  @component
3
3
 
4
4
 
5
- @param {boolean} [active=false] - Used to set the active pane., Default: `false`
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 Aligned - true/false, Default: `false`
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
- * Additional classes
22
- * @type {string}
19
+ * Inline style of component
23
20
  */
24
- export let classes = "",
21
+ export let style = "",
25
22
  /**
26
- * Inline style of component
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>
@@ -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;
package/styles/Grid.scss CHANGED
@@ -4,12 +4,14 @@ $kws-gridview-th-background: $table-background-color !default;
4
4
  $kws-gridview-th-color: $text !default;
5
5
  $kws-gridview-tag-margin: 0 0.125rem 0.125rem 0 !default;
6
6
  $kws-gridview-icon-size: 1.5em !default;
7
+ $kws-gridview-checked-row-background: $primary-light !default;
7
8
 
8
9
  .data-table .table {
9
10
  box-shadow: $kws-gridview-box-shadow;
10
11
  th {
11
12
  background: $kws-gridview-th-background;
12
13
  color: $kws-gridview-th-color;
14
+ vertical-align: middle;
13
15
  }
14
16
  &.is-bordered {
15
17
  tr {
@@ -34,6 +36,7 @@ $kws-gridview-icon-size: 1.5em !default;
34
36
  }
35
37
  td.is-icon {
36
38
  width: 25px;
39
+ vertical-align: middle;
37
40
  .icon {
38
41
  font-size: $kws-gridview-icon-size;
39
42
  }
@@ -43,4 +46,11 @@ $kws-gridview-icon-size: 1.5em !default;
43
46
  cursor: pointer;
44
47
  }
45
48
  }
49
+
50
+ tr.is-checked {
51
+ background-color: $kws-gridview-checked-row-background !important;
52
+ td {
53
+ background-color: $kws-gridview-checked-row-background !important;
54
+ }
55
+ }
46
56
  }
@@ -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:$kws-loader-color;
16
- border-bottom-color:$kws-loader-color;
16
+ border-left-color: $kws-loader-color;
17
+ border-bottom-color: $kws-loader-color;
17
18
  position: absolute !important;
18
- width:$kws-loader-width;
19
- height:$kws-loader-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:$color !important;
29
- border-bottom-color:$color !important;
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:$kws-loader-width-medium;
37
- height:$kws-loader-height-medium;
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:$kws-loader-width-large;
46
- height:$kws-loader-height-large;
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:$kws-loader-overlay-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
+ }
@@ -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 {
@@ -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
+ }