@kws3/ui 4.5.0-beta.2 → 4.5.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 +8 -1
- package/helpers/Popover.svelte +2 -1
- package/helpers/Tooltip.d.ts +11 -4
- package/helpers/Tooltip.d.ts.map +1 -1
- package/helpers/Tooltip.js +7 -3
- package/package.json +2 -2
- package/styles/Grid.scss +18 -4
- package/styles/Timepicker.scss +2 -1
- package/styles/Tooltip.scss +1 -1
package/CHANGELOG.mdx
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
## 4.5.1
|
|
2
|
+
- Fix ActionReturn type for `popover` action
|
|
3
|
+
- Update popover arrow default colour to be border color
|
|
4
|
+
- Fix dark mode default text colour in `Timepicker` component
|
|
5
|
+
- Fix default border colours for active and checked rows in `Grid` component
|
|
6
|
+
- Allow border colours to be configured for checked and active rows in `Grid` component
|
|
7
|
+
|
|
8
|
+
# 4.5.0 <span className="has-text-danger">[BREAKING]</span>
|
|
2
9
|
- This version requires Bulma v1
|
|
3
10
|
- Supports bulma dark mode
|
|
4
11
|
- All SCSS files are now modular, so you need to use `@use` instead of `@import`
|
package/helpers/Popover.svelte
CHANGED
|
@@ -15,7 +15,7 @@ If you would like to trigger the popover programatically only, you can use `manu
|
|
|
15
15
|
Available options: <a target="_blank" href="https://atomiks.github.io/tippyjs/v6/all-props/#placement">https://atomiks.github.io/tippyjs/v6/all-props/#placement</a>, Default: `auto`
|
|
16
16
|
@param {boolean} [interactive=false] - Allows you to interact with the Popover content, when turned on, Default: `false`
|
|
17
17
|
@param {boolean} [hide_on_click=true] - Whether the popover should hide on clicking outside of it, Default: `true`
|
|
18
|
-
@param {
|
|
18
|
+
@param {HTMLElement | null} [external_target=null] - Specify a target node reference to use as the Popover content
|
|
19
19
|
|
|
20
20
|
When set to `null`, it will use the content of the `popover` slot, Default: `null`
|
|
21
21
|
@param {string} [max_width="none"] - Maximum allowed width of the popover
|
|
@@ -126,6 +126,7 @@ It can be any CSS value associated with `max-width` property, including `"none"`
|
|
|
126
126
|
* Specify a target node reference to use as the Popover content
|
|
127
127
|
*
|
|
128
128
|
* When set to `null`, it will use the content of the `popover` slot
|
|
129
|
+
* @type {HTMLElement | null}
|
|
129
130
|
*/
|
|
130
131
|
export let external_target = null;
|
|
131
132
|
/**
|
package/helpers/Tooltip.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @typedef {import('@kws3/ui/types').TippyPositions} TippyPositions
|
|
3
|
+
*
|
|
4
|
+
* @typedef {import("svelte/action").Action<HTMLElement, {
|
|
5
|
+
* content?: HTMLElement
|
|
6
|
+
* }>} TippyAction
|
|
3
7
|
*/
|
|
4
8
|
/**
|
|
5
9
|
* Activates tooltips via event delegation
|
|
@@ -8,12 +12,15 @@
|
|
|
8
12
|
*/
|
|
9
13
|
export function activateTooltips(container: string, opts?: object | null): void;
|
|
10
14
|
/**
|
|
11
|
-
* @type {
|
|
15
|
+
* @type {TippyAction}
|
|
12
16
|
*/
|
|
13
|
-
export let popover:
|
|
17
|
+
export let popover: TippyAction;
|
|
14
18
|
/**
|
|
15
|
-
* @type {
|
|
19
|
+
* @type {TippyAction}
|
|
16
20
|
*/
|
|
17
|
-
export let tooltip:
|
|
21
|
+
export let tooltip: TippyAction;
|
|
18
22
|
export type TippyPositions = import('@kws3/ui/types').TippyPositions;
|
|
23
|
+
export type TippyAction = import("svelte/action").Action<HTMLElement, {
|
|
24
|
+
content?: HTMLElement;
|
|
25
|
+
}>;
|
|
19
26
|
//# sourceMappingURL=Tooltip.d.ts.map
|
package/helpers/Tooltip.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["Tooltip.js"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["Tooltip.js"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH;;;;GAIG;AACH,4CAHW,MAAM,SACN,MAAM,eAmBhB;AA8DD;;GAEG;AACH,oBAFU,WAAW,CAkBlB;AAEH;;GAEG;AACH,oBAFU,WAAW,CAWlB;6BA5HU,OAAO,gBAAgB,EAAE,cAAc;0BAEvC,OAAO,eAAe,EAAE,MAAM,CAAC,WAAW,EAAE;IACxD,OAAS,CAAC,EAAE,WAAW,CAAA;CACpB,CAAC"}
|
package/helpers/Tooltip.js
CHANGED
|
@@ -2,6 +2,10 @@ import tippy, { delegate } from "tippy.js";
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @typedef {import('@kws3/ui/types').TippyPositions} TippyPositions
|
|
5
|
+
*
|
|
6
|
+
* @typedef {import("svelte/action").Action<HTMLElement, {
|
|
7
|
+
* content?: HTMLElement
|
|
8
|
+
* }>} TippyAction
|
|
5
9
|
*/
|
|
6
10
|
|
|
7
11
|
/**
|
|
@@ -22,7 +26,7 @@ export function activateTooltips(container, opts = {}) {
|
|
|
22
26
|
offset: [0, 15],
|
|
23
27
|
touch: true,
|
|
24
28
|
},
|
|
25
|
-
opts
|
|
29
|
+
opts,
|
|
26
30
|
);
|
|
27
31
|
|
|
28
32
|
delegate(container, _opts);
|
|
@@ -89,7 +93,7 @@ function createTippyAction(defaultOpts) {
|
|
|
89
93
|
}
|
|
90
94
|
|
|
91
95
|
/**
|
|
92
|
-
* @type {
|
|
96
|
+
* @type {TippyAction}
|
|
93
97
|
*/
|
|
94
98
|
export let popover = createTippyAction({
|
|
95
99
|
appendTo: () => document.body,
|
|
@@ -110,7 +114,7 @@ export let popover = createTippyAction({
|
|
|
110
114
|
});
|
|
111
115
|
|
|
112
116
|
/**
|
|
113
|
-
* @type {
|
|
117
|
+
* @type {TippyAction}
|
|
114
118
|
*/
|
|
115
119
|
export let tooltip = createTippyAction({
|
|
116
120
|
animation: "scale",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kws3/ui",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.1",
|
|
4
4
|
"description": "UI components for use with Svelte v3 applications.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"svelte": "index.js",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"typescript": "^5.2.2"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "aa49d3c649effc859ad383983f4498f8724cac42"
|
|
43
43
|
}
|
package/styles/Grid.scss
CHANGED
|
@@ -8,16 +8,16 @@ $tag-margin: 0 0.125rem 0.125rem 0 !default;
|
|
|
8
8
|
$icon-size: 1.5em !default;
|
|
9
9
|
$checked-row-background: cv.getVar("info-light") !default;
|
|
10
10
|
$checked-row-color: cv.getVar("info") !default;
|
|
11
|
+
$checked-row-border-color: $checked-row-color !default;
|
|
11
12
|
$active-row-background: cv.getVar("table-row-active-background-color") !default;
|
|
12
13
|
$active-row-color: cv.getVar("table-row-active-color") !default;
|
|
14
|
+
$active-row-border-color: $active-row-color !default;
|
|
13
15
|
$background: cv.getVar("table-background-color") !default;
|
|
14
16
|
$striped-row-background: cv.getVar(
|
|
15
17
|
"table-striped-row-even-background-color"
|
|
16
18
|
) !default;
|
|
17
19
|
$sticky-column-border-color: cv.getVar("border") !default;
|
|
18
|
-
$sticky-column-active-row-border-color:
|
|
19
|
-
"table-row-active-color"
|
|
20
|
-
) !default;
|
|
20
|
+
$sticky-column-active-row-border-color: $active-row-border-color !default;
|
|
21
21
|
$hover-background-color: cv.getVar("table-row-hover-background-color") !default;
|
|
22
22
|
$even-row-hover-background-color: cv.getVar(
|
|
23
23
|
"table-striped-row-even-hover-background-color"
|
|
@@ -73,6 +73,8 @@ $cell-border-color: cv.getVar("table-cell-border-color") !default;
|
|
|
73
73
|
td {
|
|
74
74
|
background-color: $checked-row-background !important;
|
|
75
75
|
color: $checked-row-color !important;
|
|
76
|
+
border-color: $checked-row-border-color !important;
|
|
77
|
+
box-shadow: inset 0 1px 0 $checked-row-border-color;
|
|
76
78
|
}
|
|
77
79
|
}
|
|
78
80
|
|
|
@@ -125,6 +127,8 @@ $cell-border-color: cv.getVar("table-cell-border-color") !default;
|
|
|
125
127
|
td {
|
|
126
128
|
background: $active-row-background;
|
|
127
129
|
color: $active-row-color;
|
|
130
|
+
border-color: $active-row-border-color;
|
|
131
|
+
box-shadow: inset 0 1px 0 $active-row-border-color;
|
|
128
132
|
}
|
|
129
133
|
}
|
|
130
134
|
}
|
|
@@ -164,7 +168,17 @@ $cell-border-color: cv.getVar("table-cell-border-color") !default;
|
|
|
164
168
|
tr.is-selected {
|
|
165
169
|
td.is-sticky-column,
|
|
166
170
|
th.is-sticky-column {
|
|
167
|
-
box-shadow:
|
|
171
|
+
box-shadow:
|
|
172
|
+
inset -1px 0 0 $sticky-column-active-row-border-color,
|
|
173
|
+
inset 0 1px 0 $sticky-column-active-row-border-color;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
tr.is-checked {
|
|
177
|
+
td.is-sticky-column,
|
|
178
|
+
th.is-sticky-column {
|
|
179
|
+
box-shadow:
|
|
180
|
+
inset -1px 0 0 $checked-row-border-color,
|
|
181
|
+
inset 0 1px 0 $checked-row-border-color;
|
|
168
182
|
}
|
|
169
183
|
}
|
|
170
184
|
}
|
package/styles/Timepicker.scss
CHANGED
|
@@ -56,10 +56,11 @@ $radius: cv.getVar("radius") !default;
|
|
|
56
56
|
border: 1px solid $color;
|
|
57
57
|
input,
|
|
58
58
|
.flatpickr-am-pm {
|
|
59
|
-
color: $
|
|
59
|
+
color: $text;
|
|
60
60
|
&:hover,
|
|
61
61
|
&:focus {
|
|
62
62
|
background: $color-light;
|
|
63
|
+
color: $color-dark;
|
|
63
64
|
}
|
|
64
65
|
}
|
|
65
66
|
.numInputWrapper {
|
package/styles/Tooltip.scss
CHANGED
|
@@ -10,7 +10,7 @@ $radius: cv.getVar("radius-small") !default;
|
|
|
10
10
|
$shadow: 0 5px 10px -5px hsla(cv.getVar("shadow-h"), cv.getVar("shadow-s"), cv.getVar("shadow-l"), 0.4) !default;
|
|
11
11
|
$popover-background: cv.getVar("background") !default;
|
|
12
12
|
$popover-color: cv.getVar("text") !default;
|
|
13
|
-
$popover-arrow-color: cv.getVar("
|
|
13
|
+
$popover-arrow-color: cv.getVar("border") !default;
|
|
14
14
|
$popover-shadow: $shadow !default;
|
|
15
15
|
$popover-radius: $radius !default;
|
|
16
16
|
|