@kws3/ui 2.0.0 → 2.0.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 CHANGED
@@ -1,3 +1,10 @@
1
+ ## 2.0.2
2
+ - Bugfixes with chart default colours
3
+ - Set today's date on datepicker initialisation so that long running pages don't stick to the date of first load as today's date
4
+
5
+ ## 2.0.1
6
+ - Hardcoded color bugfix on pagination styles
7
+
1
8
  ## 2.0.0
2
9
  - Add support for custom CSS classes for the table in `GridView` component
3
10
  - Add support for displaying `GridView` table rows in a compact manner using `is_narrow` prop.
@@ -142,11 +142,12 @@ This is to prevent unnecessary event subscriptions., Default: `[]`
142
142
  let _data = [];
143
143
  let yAxis = {};
144
144
 
145
- $: usedColors = colors
146
- ? colors
147
- : $defaultChartColors
148
- ? $defaultChartColors
149
- : [];
145
+ $: usedColors =
146
+ colors && colors.length
147
+ ? colors
148
+ : $defaultChartColors
149
+ ? $defaultChartColors
150
+ : [];
150
151
 
151
152
  $: data, sets, normaliseAll();
152
153
  $: _options = merge(
@@ -162,11 +162,12 @@ This is to prevent unnecessary event subscriptions., Default: `[]`
162
162
  let _data = [];
163
163
  let yAxis = {};
164
164
 
165
- $: usedColors = colors
166
- ? colors
167
- : $defaultChartColors
168
- ? $defaultChartColors
169
- : [];
165
+ $: usedColors =
166
+ colors && colors.length
167
+ ? colors
168
+ : $defaultChartColors
169
+ ? $defaultChartColors
170
+ : [];
170
171
 
171
172
  $: data, sets, normaliseAll();
172
173
  $: _options = merge(
@@ -129,11 +129,12 @@ This is to prevent unnecessary event subscriptions., Default: `[]`
129
129
  $: __class =
130
130
  "kws-donut-chart " + `${sparklines ? "kws-sparklines" : ""} ` + klass;
131
131
 
132
- $: usedColors = colors
133
- ? colors
134
- : $defaultChartColors
135
- ? $defaultChartColors
136
- : [];
132
+ $: usedColors =
133
+ colors && colors.length
134
+ ? colors
135
+ : $defaultChartColors
136
+ ? $defaultChartColors
137
+ : [];
137
138
 
138
139
  $: _data = data || Array(labels.length || 0).fill(0);
139
140
  $: _options = merge(
@@ -142,11 +142,12 @@ This is to prevent unnecessary event subscriptions., Default: `[]`
142
142
  let _data = [];
143
143
  let yAxis = {};
144
144
 
145
- $: usedColors = colors
146
- ? colors
147
- : $defaultChartColors
148
- ? $defaultChartColors
149
- : [];
145
+ $: usedColors =
146
+ colors && colors.length
147
+ ? colors
148
+ : $defaultChartColors
149
+ ? $defaultChartColors
150
+ : [];
150
151
 
151
152
  $: data, sets, normaliseAll();
152
153
  $: _options = merge(
@@ -147,11 +147,12 @@ This is to prevent unnecessary event subscriptions., Default: `[]`
147
147
  let _data = [];
148
148
  let yAxis = [];
149
149
 
150
- $: usedColors = colors
151
- ? colors
152
- : $defaultChartColors
153
- ? $defaultChartColors
154
- : [];
150
+ $: usedColors =
151
+ colors && colors.length
152
+ ? colors
153
+ : $defaultChartColors
154
+ ? $defaultChartColors
155
+ : [];
155
156
 
156
157
  $: data, sets, normaliseAll();
157
158
  $: _options = merge(
@@ -129,11 +129,12 @@ This is to prevent unnecessary event subscriptions., Default: `[]`
129
129
  $: __class =
130
130
  "kws-pie-chart " + `${sparklines ? "kws-sparklines" : ""} ` + klass;
131
131
 
132
- $: usedColors = colors
133
- ? colors
134
- : $defaultChartColors
135
- ? $defaultChartColors
136
- : [];
132
+ $: usedColors =
133
+ colors && colors.length
134
+ ? colors
135
+ : $defaultChartColors
136
+ ? $defaultChartColors
137
+ : [];
137
138
 
138
139
  $: _data = data || Array(labels.length || 0).fill(0);
139
140
  $: _options = merge(
@@ -142,11 +142,12 @@ This is to prevent unnecessary event subscriptions., Default: `[]`
142
142
  $: __class =
143
143
  "kws-radial-chart " + `${sparklines ? "kws-sparklines" : ""} ` + klass;
144
144
 
145
- $: usedColors = colors
146
- ? colors
147
- : $defaultChartColors
148
- ? $defaultChartColors
149
- : [];
145
+ $: usedColors =
146
+ colors && colors.length
147
+ ? colors
148
+ : $defaultChartColors
149
+ ? $defaultChartColors
150
+ : [];
150
151
 
151
152
  $: data, normaliseData();
152
153
  $: labels, normaliseLabels();
package/forms/actions.js CHANGED
@@ -34,6 +34,10 @@ function createFlatpickrAction(defaultOpts, hooks, type) {
34
34
  _opts["onChange"] = createFirer("dateChange");
35
35
  }
36
36
 
37
+ //set today's date on initilisation
38
+ //otherwise pages that are open overnight do not update their "Today's date"
39
+ _opts.now = new Date();
40
+
37
41
  let OPTS = Object.assign(defaultOpts, _opts, opts);
38
42
 
39
43
  let picker = flatpickr(node, OPTS);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kws3/ui",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "UI components for use with Svelte v3 applications.",
5
5
  "main": "index.js",
6
6
  "svelte": "index.js",
@@ -32,5 +32,5 @@
32
32
  "text-mask-core": "^5.1.2",
33
33
  "tippy.js": "^6.3.1"
34
34
  },
35
- "gitHead": "9606d798a4c6d550863290f2c0b6baac3a61a09e"
35
+ "gitHead": "f0fcfc46afc23ad17512ff1a783352372990c22d"
36
36
  }
@@ -1,12 +1,12 @@
1
1
  $kws-pagination-item-color: $text !default;
2
- $kws-pagination-item-background: #fff !default;
2
+ $kws-pagination-item-background: $scheme-main !default;
3
3
  $kws-pagination-item-border: 1px solid $border !default;
4
4
  $kws-pagination-item-hover-color: $kws-pagination-item-color !default;
5
5
  $kws-pagination-item-hover-border: $kws-pagination-item-border !default;
6
- $kws-pagination-item-disabled-background: $white-ter !default;
6
+ $kws-pagination-item-disabled-background: $scheme-main-ter !default;
7
7
  $kws-pagination-item-disabled-color: $grey !default;
8
- $kws-pagination-item-ellipsis-background: $white-bis !default;
9
- $kws-pagination-item-ellipsis-border-color: $grey-lighter !default;
8
+ $kws-pagination-item-ellipsis-background: $scheme-main-ter !default;
9
+ $kws-pagination-item-ellipsis-border-color: $scheme-main-ter !default;
10
10
  $kws-pagination-item-active-background: $success !default;
11
11
  $kws-pagination-item-active-color: findColorInvert(
12
12
  $kws-pagination-item-active-background
@@ -14,7 +14,10 @@ $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) !default;
17
+ $kws-pagination-frame-background: linear-gradient(
18
+ $scheme-main,
19
+ $scheme-main-ter
20
+ ) !default;
18
21
 
19
22
  .pagination {
20
23
  &.is-small {