@kws3/ui 4.1.3 → 4.1.4

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,92 +1,98 @@
1
- # 4.1.3
1
+ ## 4.1.4
2
+ - add `black` and `white` as valid color types
3
+
4
+ ## 4.1.3
2
5
  - Ensure transitions are global for `Modal`, `CardModal` and `ActionSheet` components
3
6
  - `InfiniteList` - do not fake a scroll event on a resize event, fixes loading bugs
4
7
 
5
- # 4.1.2
8
+ ## 4.1.2
6
9
  - `MultiSelect` - fixed issue where raw object were initially outputted (if provided)
7
10
  - `SearchableSelect and `MultiSelect` (Async): resolved issue with the 'active' class not attaching to the most matched item in dropdown options
8
11
  - `SearchableSelect` - improved behavior, ensuring the `tab` key correctly loses focus
9
12
  - `AutoComplete` - dropdown now closes on loss of focus triggered by the `tab` key
10
13
 
11
- # 4.1.1
14
+ ## 4.1.1
12
15
  - `DatePicker` - add support for configurable border radius
13
16
  - `DatePicker` - add support for configurable box shadow
14
17
  - `DatePicker` - bug fix on date range selection colors
15
18
 
16
- # 4.1.0
19
+ ## 4.1.0
17
20
  - New component `InfiniteList` Added
18
21
 
19
- # 4.0.3
22
+ ## 4.0.3
20
23
  - `ScrollableList` - bugfixes, and add support for removing items without affecting scroll position
21
24
 
22
- # 4.0.2
25
+ ## 4.0.2
23
26
  - `ToggleButtons` - add support for count tags, and fix css not applying
24
27
 
25
- # 4.0.1
28
+ ## 4.0.1
26
29
  - `ScrollableList` - add support for custom iteration key for keyed each block
27
30
 
28
- # 4.0.0
31
+ ## 4.0.0
29
32
  - add svelte 4 compatibility
30
33
 
31
34
  --------------
32
- # 2.3.3
35
+ ## 2.3.4
36
+ - add `black` and `white` as valid color types
37
+
38
+ ## 2.3.3
33
39
  - `InfiniteList` - do not fake a scroll event on a resize event, fixes loading bugs
34
40
 
35
- # 2.3.2
41
+ ## 2.3.2
36
42
  - `MultiSelect` - fixed issue where raw object were initially outputted (if provided)
37
43
  - `SearchableSelect and `MultiSelect` (Async): resolved issue with the 'active' class not attaching to the most matched item in dropdown options
38
44
  - `SearchableSelect` - improved behavior, ensuring the `tab` key correctly loses focus
39
45
  - `AutoComplete` - dropdown now closes on loss of focus triggered by the `tab` key
40
46
 
41
47
 
42
- # 2.3.1
48
+ ## 2.3.1
43
49
  - `DatePicker` - add support for configurable border radius
44
50
  - `DatePicker` - add support for configurable box shadow
45
51
  - `DatePicker` - bug fix on date range selection colors
46
52
 
47
- # 2.3.0
53
+ ## 2.3.0
48
54
  - New component `InfiniteList` Added
49
55
 
50
- # 2.2.5
56
+ ## 2.2.5
51
57
  - `ScrollableList` - bugfixes, and add support for removing items without affecting scroll position
52
58
 
53
- # 2.2.4
59
+ ## 2.2.4
54
60
  - `ToggleButtons` - add support for count tags, and fix css not applying
55
61
 
56
- # 2.2.3
62
+ ## 2.2.3
57
63
  - `ScrollableList` - add support for custom iteration key for keyed each block
58
64
 
59
- # 2.2.2
65
+ ## 2.2.2
60
66
  - `ScrollableList` - fix jumping issue when edge of scrollable regions are reached
61
67
 
62
- # 2.2.1
68
+ ## 2.2.1
63
69
  - `Icon` fix icon sizes when line-awesome icons are loaded
64
70
  - `Icon` fix material icons when icon family is set globally
65
71
  - `Icon` add support for adding custom icon families
66
72
  - `Chart` fix, ensure ApexCharts is loaded before trying to initialise it
67
73
 
68
- # 2.2.0
74
+ ## 2.2.0
69
75
  - Fix bug where `ScrollableList` component puts extra padding on top of list when fast scroll to top
70
76
  - `ScrollableList` - Fix bug to reset internal positioning props when data changes
71
77
  - fix Popperjs position strategy to work better on mobile by default, affects `SearchableSelect`, `MultiSelect` and `AutoComplete` components
72
78
  - `ActionSheet` - Update styling to make it wokr better visually on desktop
73
79
 
74
- # 2.1.4
80
+ ## 2.1.4
75
81
  - Fix bug where disabled `Checkbox` components wrongly appeared as if they were checked
76
82
  - Allow adding CSS classes to the input field in `NumberInput` component
77
83
 
78
- # 2.1.3
84
+ ## 2.1.3
79
85
  - `PasswordInput` - add support for field `autocomplete` and `required`
80
86
  - `PasswordValidator` - fix `valid` field binding
81
87
 
82
- # 2.1.2
88
+ ## 2.1.2
83
89
  - `PasswordInput` - add support for field `name`
84
90
  - `PasswordInput` - fix spacing when icons are turned off
85
91
 
86
- # 2.1.1
92
+ ## 2.1.1
87
93
  - Package `text-mask-core` moved to @kws3 namespace.
88
94
 
89
- # 2.1.0
95
+ ## 2.1.0
90
96
  - Bugfix with Colorpicker component, where colors could not be typed in manually.
91
97
  - Extended typing and typescript support
92
98
  - New Components added `Canvas`, `ESignature`, `PenInput` and `PenControls`
@@ -16,7 +16,7 @@ This is to prevent unnecessary event subscriptions., Default: `[]`
16
16
  <div class="kws-chart {klass}" bind:this={canvas} />
17
17
 
18
18
  <script>
19
- import { createEventDispatcher, onMount } from "svelte";
19
+ import { createEventDispatcher, onMount, onDestroy } from "svelte";
20
20
  import { merge } from "./utils";
21
21
 
22
22
  const fire = createEventDispatcher();
@@ -88,12 +88,11 @@ This is to prevent unnecessary event subscriptions., Default: `[]`
88
88
  const module = await import("apexcharts/dist/apexcharts.esm");
89
89
  ApexCharts = module.default;
90
90
  window.ApexCharts = ApexCharts;
91
-
92
91
  init();
92
+ });
93
93
 
94
- return () => {
95
- chart && chart.destroy();
96
- };
94
+ onDestroy(() => {
95
+ if (chart) chart.destroy();
97
96
  });
98
97
 
99
98
  let Events;
@@ -11,7 +11,7 @@
11
11
  -->
12
12
 
13
13
  <td class={classNames(column, row)} style={styles(column, row)}>
14
- <!-- eslint-disable-next-line @ota-meshi/svelte/no-at-html-tags -->
14
+ <!-- eslint-disable-next-line svelte/no-at-html-tags -->
15
15
  {@html transforms(column, row)}
16
16
  </td>
17
17
 
@@ -23,7 +23,7 @@
23
23
  {#each column_keys as column}
24
24
  {#if isVisible(column)}
25
25
  <div class={classNames(column, row)} style={styles(column, row)}>
26
- <!-- eslint-disable-next-line @ota-meshi/svelte/no-at-html-tags -->
26
+ <!-- eslint-disable-next-line svelte/no-at-html-tags -->
27
27
  {@html transforms(column, row)}
28
28
  </div>
29
29
  {/if}
package/form/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ /// <reference types="svelte" />
1
2
  export function makeForms(items: any): any[] | {
2
3
  formData: import("svelte/store").Writable<any>;
3
4
  errors: import("svelte/store").Readable<any>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"AAGA;;;;;;;;;;EAWC;AA2ID,0CAA4C;AAE5C,0CAAqC;AAErC,8EAA8E"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":";AAGA;;;;;;;;;;EAWC;AA2ID,0CAA4C;AAE5C,0CAAqC;AAErC,8EAA8E"}
@@ -38,7 +38,7 @@ For internal use only - not part of config object, Default: `""`
38
38
  {/if}
39
39
  <div class="column">
40
40
  <div>
41
- <!-- eslint-disable-next-line @ota-meshi/svelte/no-at-html-tags -->
41
+ <!-- eslint-disable-next-line svelte/no-at-html-tags -->
42
42
  <span class="is-block">{@html _text}</span>
43
43
  {#if _type === "prompt"}
44
44
  <div class="field" style="margin-top:0.5rem;">
@@ -49,7 +49,7 @@
49
49
  <h4 class="title is-5 is-marginless">{title}</h4>
50
50
  {/if}
51
51
 
52
- <!-- eslint-disable-next-line @ota-meshi/svelte/no-at-html-tags -->
52
+ <!-- eslint-disable-next-line svelte/no-at-html-tags -->
53
53
  <p>{@html message}</p>
54
54
 
55
55
  {#if !persistent}
@@ -13,7 +13,7 @@
13
13
  class="kws-floatie-item has-{variant} is-{item.position}"
14
14
  id={item.id}
15
15
  animate:flip={{ easing: sineOut }}
16
- transition:fly={{
16
+ transition:fly|global={{
17
17
  y: transitionDistance(item.position),
18
18
  duration: transitionDuration,
19
19
  easing: sineOut,
@@ -1,3 +1,4 @@
1
+ /// <reference types="svelte" />
1
2
  export namespace FloatiesStore {
2
3
  export { create };
3
4
  export { remove };
@@ -35,7 +36,7 @@ declare const subscribe: (this: void, run: import("svelte/store").Subscriber<{
35
36
  snackbar: any[];
36
37
  toast: any[];
37
38
  };
38
- }>, invalidate?: (value?: {
39
+ }>, invalidate?: import("svelte/store").Invalidator<{
39
40
  top: {
40
41
  notification: any[];
41
42
  snackbar: any[];
@@ -46,6 +47,6 @@ declare const subscribe: (this: void, run: import("svelte/store").Subscriber<{
46
47
  snackbar: any[];
47
48
  toast: any[];
48
49
  };
49
- }) => void) => import("svelte/store").Unsubscriber;
50
+ }>) => import("svelte/store").Unsubscriber;
50
51
  export {};
51
52
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":";;;;;AA4GA;;GAEG;AAEH;;GAEG;AACH,4BAFU,WAAW,CAgBnB;AAEF;;GAEG;AACH,qBAFU,WAAW,CAiBnB;AAEF;;GAEG;AACH,wBAFU,WAAW,CAiBnB;0BA5DW,OAAO,gBAAgB,EAAE,WAAW;AAxD/C;;;EA6BC;AAED,0CAYC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":";;;;;;AA4GA;;GAEG;AAEH;;GAEG;AACH,4BAFU,WAAW,CAgBnB;AAEF;;GAEG;AACH,qBAFU,WAAW,CAiBnB;AAEF;;GAEG;AACH,wBAFU,WAAW,CAiBnB;0BA5DW,OAAO,gBAAgB,EAAE,WAAW;AAxD/C;;;EA6BC;AAED,0CAYC"}
@@ -48,7 +48,7 @@ This will not work if there is no title area
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
+ <!-- eslint-disable-next-line svelte/no-at-html-tags -->
52
52
  <h2 class="subtitle">{@html title}</h2>
53
53
  </div>
54
54
  </div>
@@ -74,7 +74,7 @@ This will not work if there is no title area
74
74
  </div>
75
75
  {/if}
76
76
  <div class="level-item">
77
- <!-- eslint-disable-next-line @ota-meshi/svelte/no-at-html-tags -->
77
+ <!-- eslint-disable-next-line svelte/no-at-html-tags -->
78
78
  <h2 class="subtitle is-6">{@html subtitle}</h2>
79
79
  </div>
80
80
  <span class="collapsor level-item">
@@ -69,14 +69,14 @@ export class DrawingPad {
69
69
  setColor(color: any): void;
70
70
  }
71
71
  export namespace Pen {
72
- const name: string;
73
- const icon: string;
72
+ let name: string;
73
+ let icon: string;
74
74
  function draw(instance: any): void;
75
75
  }
76
76
  export namespace Eraser {
77
- const name_1: string;
77
+ let name_1: string;
78
78
  export { name_1 as name };
79
- const icon_1: string;
79
+ let icon_1: string;
80
80
  export { icon_1 as icon };
81
81
  export function draw_1(instance: any): void;
82
82
  export { draw_1 as draw };
@@ -153,7 +153,7 @@ export class DrawingPad {
153
153
  0,
154
154
  0,
155
155
  this.canvas.width,
156
- this.canvas.height
156
+ this.canvas.height,
157
157
  );
158
158
  }
159
159
 
@@ -179,7 +179,7 @@ export class DrawingPad {
179
179
  0,
180
180
  0,
181
181
  this.canvas.width,
182
- this.canvas.height
182
+ this.canvas.height,
183
183
  );
184
184
  if (callBackFn) {
185
185
  callBackFn();
@@ -4,11 +4,11 @@ declare class UndoManager {
4
4
  index: number;
5
5
  isExecuting: boolean;
6
6
  callback: any;
7
- execute(command: any, action: any): UndoManager;
8
- add(command: any): UndoManager;
7
+ execute(command: any, action: any): this;
8
+ add(command: any): this;
9
9
  setCallback(callbackFunc: any): void;
10
- undo(): UndoManager;
11
- redo(): UndoManager;
10
+ undo(): this;
11
+ redo(): this;
12
12
  clear(): void;
13
13
  hasUndo(): boolean;
14
14
  hasRedo(): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"UndoManager.d.ts","sourceRoot":"","sources":["UndoManager.js"],"names":[],"mappings":";AAAA;IAEI,gBAAkB;IAClB,cAAe;IACf,qBAAwB;IACxB,cAAoB;IAGtB,gDAQC;IAED,+BAcC;IAED,qCAEC;IAED,oBAWC;IAED,oBAWC;IAED,cAOC;IACD,mBAEC;IACD,mBAEC;IACD,qBAEC;CACF"}
1
+ {"version":3,"file":"UndoManager.d.ts","sourceRoot":"","sources":["UndoManager.js"],"names":[],"mappings":";AAAA;IAEI,gBAAkB;IAClB,cAAe;IACf,qBAAwB;IACxB,cAAoB;IAGtB,yCAQC;IAED,wBAcC;IAED,qCAEC;IAED,aAWC;IAED,aAWC;IAED,cAOC;IACD,mBAEC;IACD,mBAEC;IACD,qBAEC;CACF"}
@@ -1,19 +1,20 @@
1
+ /// <reference types="svelte" />
1
2
  /**
2
3
  * @param {string | number} definition - can be a string like 'Enter', 'Tab' or number as keyCode, also allow combination key like 'ctrl+d', 'ctrl+alt+x'
3
4
  * @param {boolean} CommandKey - if true, in mac 'ctrl' key binding will be shift on 'command' key.
4
5
  * @returns {import("svelte/action").Action} .
5
6
  */
6
7
  export function makeKeyDefinition(definition: string | number, CommandKey?: boolean): import("svelte/action").Action;
7
- export let enter: import("svelte/action").Action<HTMLElement, any, any>;
8
- export let tab: import("svelte/action").Action<HTMLElement, any, any>;
9
- export let escape: import("svelte/action").Action<HTMLElement, any, any>;
10
- export let space: import("svelte/action").Action<HTMLElement, any, any>;
11
- export let leftarrow: import("svelte/action").Action<HTMLElement, any, any>;
12
- export let rightarrow: import("svelte/action").Action<HTMLElement, any, any>;
13
- export let downarrow: import("svelte/action").Action<HTMLElement, any, any>;
14
- export let uparrow: import("svelte/action").Action<HTMLElement, any, any>;
15
- export let backspace: import("svelte/action").Action<HTMLElement, any, any>;
16
- export let del: import("svelte/action").Action<HTMLElement, any, any>;
8
+ export let enter: import("svelte/action").Action<HTMLElement, undefined, any>;
9
+ export let tab: import("svelte/action").Action<HTMLElement, undefined, any>;
10
+ export let escape: import("svelte/action").Action<HTMLElement, undefined, any>;
11
+ export let space: import("svelte/action").Action<HTMLElement, undefined, any>;
12
+ export let leftarrow: import("svelte/action").Action<HTMLElement, undefined, any>;
13
+ export let rightarrow: import("svelte/action").Action<HTMLElement, undefined, any>;
14
+ export let downarrow: import("svelte/action").Action<HTMLElement, undefined, any>;
15
+ export let uparrow: import("svelte/action").Action<HTMLElement, undefined, any>;
16
+ export let backspace: import("svelte/action").Action<HTMLElement, undefined, any>;
17
+ export let del: import("svelte/action").Action<HTMLElement, undefined, any>;
17
18
  declare namespace _default {
18
19
  export { enter };
19
20
  export { tab };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"AAQA;;;;GAIG;AAEH,8CALW,MAAM,GAAG,MAAM,eACf,OAAO,GACL,OAAO,eAAe,EAAE,MAAM,CA0D1C;AAED,wEAA8C;AAC9C,sEAA0C;AAC1C,yEAAgD;AAChD,wEAA0C;AAC1C,4EAAsD;AACtD,6EAAwD;AACxD,4EAAsD;AACtD,0EAAkD;AAClD,4EAAsD;AACtD,sEAA6C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":";AAQA;;;;GAIG;AAEH,8CALW,MAAM,GAAG,MAAM,eACf,OAAO,GACL,OAAO,eAAe,EAAE,MAAM,CA2D1C;AAED,8EAA8C;AAC9C,4EAA0C;AAC1C,+EAAgD;AAChD,8EAA0C;AAC1C,kFAAsD;AACtD,mFAAwD;AACxD,kFAAsD;AACtD,gFAAkD;AAClD,kFAAsD;AACtD,4EAA6C"}
package/keyboard/index.js CHANGED
@@ -54,7 +54,8 @@ export function makeKeyDefinition(definition, CommandKey = false) {
54
54
  valid = true;
55
55
  }
56
56
 
57
- if (valid) {
57
+ if (valid && fire) {
58
+ // @ts-ignore
58
59
  fire(event);
59
60
  }
60
61
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kws3/ui",
3
- "version": "4.1.3",
3
+ "version": "4.1.4",
4
4
  "description": "UI components for use with Svelte v3 applications.",
5
5
  "main": "index.js",
6
6
  "svelte": "index.js",
@@ -26,14 +26,14 @@
26
26
  },
27
27
  "types": "./index.d.ts",
28
28
  "dependencies": {
29
- "@kws3/text-mask-core": "^5.1.2",
29
+ "@kws3/text-mask-core": "^5.1.3",
30
30
  "apexcharts": "3.33.2",
31
31
  "flatpickr": "^4.5.2",
32
32
  "svelte-portal": "^2.1.2",
33
33
  "tippy.js": "^6.3.1"
34
34
  },
35
35
  "devDependencies": {
36
- "typescript": "^5.0.4"
36
+ "typescript": "^5.2.2"
37
37
  },
38
- "gitHead": "4fd2b4a801628800fc5498495277ad45b40a01c6"
38
+ "gitHead": "69ffd54529ddc0d7ccddbc0304d48acff0724c4c"
39
39
  }
package/settings.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ /// <reference types="svelte" />
1
2
  /**
2
3
  * - `defaultIconFamily`: `"fa"` - default icon family
3
4
  * - `defaultToastPlacement`: `"bottom"` - default placement of toast notifications
package/settings.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["settings.js"],"names":[],"mappings":"AAsCA;;;;;;;;;GASG;AAEH,mCAJW,cAAc,QAQxB;6BAlDY,OAAO,gBAAgB,EAAE,cAAc;AADpD;;GAEG;AAEH,wEAAyC;AACzC,4EAAiD;AACjD,+EAA0D;AAC1D,mFAA2D;AAC3D,sEAAsC;AACtC,2EAOG"}
1
+ {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["settings.js"],"names":[],"mappings":";AAsCA;;;;;;;;;GASG;AAEH,mCAJW,cAAc,QAQxB;6BAlDY,OAAO,gBAAgB,EAAE,cAAc;AADpD;;GAEG;AAEH,wEAAyC;AACzC,4EAAiD;AACjD,+EAA0D;AAC1D,mFAA2D;AAC3D,sEAAsC;AACtC,2EAOG"}
package/tsconfig.json CHANGED
@@ -5,6 +5,8 @@
5
5
  "lib": ["es2020", "DOM"],
6
6
  "skipLibCheck": true,
7
7
  "checkJs": true,
8
+ "jsx": "react",
9
+ "esModuleInterop": true,
8
10
  // Tells TypeScript to read JS files, as
9
11
  // normally they are ignored as source files
10
12
  "allowJs": true,
package/types/index.d.ts CHANGED
@@ -56,7 +56,7 @@ export type SearchOptions = {
56
56
 
57
57
  export type SearchHelper = (
58
58
  needle: string,
59
- haystack: Array<string>
59
+ haystack: Array<string>,
60
60
  ) => Array<any>;
61
61
 
62
62
  export type ValidatePasswordOptions = {
@@ -7,6 +7,8 @@ export const Colors = [
7
7
  "danger",
8
8
  "dark",
9
9
  "light",
10
+ "white",
11
+ "black",
10
12
  "link",
11
13
  ] as const;
12
14
 
package/utils/index.js CHANGED
@@ -143,7 +143,7 @@ export function randomIntegerFromInterval(min = 0, max = Infinity) {
143
143
  * @param {number} [max=100] - Maximum Number, Default: `100`
144
144
  */
145
145
  export function randomPercent(min = 1, max = 100) {
146
- return randomIntegerFromInterval(min, max) + "%";
146
+ return `${randomIntegerFromInterval(min, max)}%`;
147
147
  }
148
148
 
149
149
  /**