@marianmeres/stuic 3.66.1 → 3.68.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.
Files changed (75) hide show
  1. package/dist/actions/autoscroll.d.ts +7 -0
  2. package/dist/actions/autoscroll.js +7 -0
  3. package/dist/actions/focus-trap.d.ts +7 -0
  4. package/dist/actions/focus-trap.js +8 -3
  5. package/dist/actions/typeahead.svelte.js +40 -4
  6. package/dist/components/Carousel/Carousel.svelte +9 -2
  7. package/dist/components/Carousel/README.md +8 -2
  8. package/dist/components/Cart/Cart.svelte +3 -0
  9. package/dist/components/Cart/README.md +18 -1
  10. package/dist/components/Checkout/CheckoutOrderReview.svelte +4 -14
  11. package/dist/components/Checkout/README.md +184 -0
  12. package/dist/components/Checkout/_internal/checkout-utils.d.ts +6 -0
  13. package/dist/components/Checkout/_internal/checkout-utils.js +24 -0
  14. package/dist/components/Checkout/index.d.ts +1 -1
  15. package/dist/components/Checkout/index.js +1 -1
  16. package/dist/components/CommandMenu/CommandMenu.svelte +23 -7
  17. package/dist/components/CommandMenu/CommandMenu.svelte.d.ts +2 -0
  18. package/dist/components/CronInput/CronInput.svelte +44 -9
  19. package/dist/components/CronInput/CronInput.svelte.d.ts +2 -0
  20. package/dist/components/CronInput/README.md +145 -0
  21. package/dist/components/CronInput/cron-next-run.svelte.d.ts +11 -0
  22. package/dist/components/CronInput/cron-next-run.svelte.js +11 -0
  23. package/dist/components/CronInput/index.css +0 -8
  24. package/dist/components/DataTable/DataTable.svelte +276 -83
  25. package/dist/components/DataTable/DataTable.svelte.d.ts +58 -6
  26. package/dist/components/DataTable/README.md +155 -25
  27. package/dist/components/DataTable/index.css +31 -0
  28. package/dist/components/DropdownMenu/DropdownMenu.svelte +43 -26
  29. package/dist/components/DropdownMenu/DropdownMenu.svelte.d.ts +5 -1
  30. package/dist/components/DropdownMenu/README.md +37 -9
  31. package/dist/components/Input/FieldAssets.svelte +9 -7
  32. package/dist/components/Input/FieldAssets.svelte.d.ts +3 -7
  33. package/dist/components/Input/FieldFile.svelte +13 -7
  34. package/dist/components/Input/FieldFile.svelte.d.ts +4 -7
  35. package/dist/components/Input/FieldInput.svelte +10 -8
  36. package/dist/components/Input/FieldInput.svelte.d.ts +3 -8
  37. package/dist/components/Input/FieldInputLocalized.svelte +8 -7
  38. package/dist/components/Input/FieldInputLocalized.svelte.d.ts +2 -7
  39. package/dist/components/Input/FieldKeyValues.svelte +8 -7
  40. package/dist/components/Input/FieldKeyValues.svelte.d.ts +2 -7
  41. package/dist/components/Input/FieldLikeButton.svelte +9 -7
  42. package/dist/components/Input/FieldLikeButton.svelte.d.ts +3 -7
  43. package/dist/components/Input/FieldObject.svelte +8 -7
  44. package/dist/components/Input/FieldObject.svelte.d.ts +2 -7
  45. package/dist/components/Input/FieldOptions.svelte +9 -7
  46. package/dist/components/Input/FieldOptions.svelte.d.ts +3 -7
  47. package/dist/components/Input/FieldPhoneNumber.svelte +7 -8
  48. package/dist/components/Input/FieldPhoneNumber.svelte.d.ts +3 -8
  49. package/dist/components/Input/FieldSelect.svelte +9 -8
  50. package/dist/components/Input/FieldSelect.svelte.d.ts +3 -8
  51. package/dist/components/Input/FieldSwitch.svelte +9 -7
  52. package/dist/components/Input/FieldSwitch.svelte.d.ts +3 -7
  53. package/dist/components/Input/FieldTextarea.svelte +7 -8
  54. package/dist/components/Input/FieldTextarea.svelte.d.ts +3 -8
  55. package/dist/components/Input/README.md +20 -0
  56. package/dist/components/Input/_internal/InputWrap.svelte +2 -10
  57. package/dist/components/Input/_internal/InputWrap.svelte.d.ts +2 -10
  58. package/dist/components/Input/types.d.ts +28 -0
  59. package/dist/components/Nav/Nav.svelte +5 -4
  60. package/dist/components/Nav/Nav.svelte.d.ts +2 -2
  61. package/dist/components/Nav/README.md +2 -2
  62. package/dist/components/Nav/index.css +4 -0
  63. package/dist/components/Tree/README.md +189 -0
  64. package/dist/components/Tree/Tree.svelte +46 -2
  65. package/dist/components/Tree/Tree.svelte.d.ts +5 -0
  66. package/dist/utils/input-history.svelte.d.ts +12 -0
  67. package/dist/utils/input-history.svelte.js +12 -0
  68. package/dist/utils/observe-exists.svelte.d.ts +1 -0
  69. package/dist/utils/observe-exists.svelte.js +11 -3
  70. package/dist/utils/switch.svelte.d.ts +12 -0
  71. package/dist/utils/switch.svelte.js +12 -1
  72. package/docs/architecture.md +0 -1
  73. package/docs/testing.md +72 -0
  74. package/docs/upgrading.md +281 -0
  75. package/package.json +12 -13
@@ -3,10 +3,14 @@
3
3
  import type { HTMLInputAttributes } from "svelte/elements";
4
4
  import type { ValidateOptions } from "../../actions/validate.svelte.js";
5
5
  import type { THC } from "../Thc/Thc.svelte";
6
+ import type { InputWrapClassProps } from "./types.js";
6
7
 
7
8
  type SnippetWithId = Snippet<[{ id: string }]>;
8
9
 
9
- export interface Props extends HTMLInputAttributes, Record<string, any> {
10
+ export interface Props
11
+ extends HTMLInputAttributes,
12
+ InputWrapClassProps,
13
+ Record<string, any> {
10
14
  input?: HTMLInputElement;
11
15
  files?: FileList;
12
16
  multiple?: boolean;
@@ -27,13 +31,9 @@
27
31
  labelLeft?: boolean;
28
32
  labelLeftWidth?: "normal" | "wide";
29
33
  labelLeftBreakpoint?: number;
34
+ /** Classes for the <input> element */
30
35
  classInput?: string;
31
- classLabel?: string;
32
- classLabelBox?: string;
33
- classInputBox?: string;
34
- classInputBoxWrap?: string;
35
- classDescBox?: string;
36
- classBelowBox?: string;
36
+ /** Classes for the rendered file list (when multiple files selected) */
37
37
  classFileList?: string;
38
38
  style?: string;
39
39
  }
@@ -81,8 +81,11 @@
81
81
  classLabelBox,
82
82
  classInputBox,
83
83
  classInputBoxWrap,
84
+ classInputBoxWrapInvalid,
84
85
  classDescBox,
86
+ classDescBoxToggle,
85
87
  classBelowBox,
88
+ classValidationBox,
86
89
  classFileList,
87
90
  style,
88
91
  //
@@ -114,8 +117,11 @@
114
117
  {classLabelBox}
115
118
  {classInputBox}
116
119
  {classInputBoxWrap}
120
+ {classInputBoxWrapInvalid}
117
121
  {classDescBox}
122
+ {classDescBoxToggle}
118
123
  {classBelowBox}
124
+ {classValidationBox}
119
125
  {validation}
120
126
  {style}
121
127
  >
@@ -2,10 +2,11 @@ import type { Snippet } from "svelte";
2
2
  import type { HTMLInputAttributes } from "svelte/elements";
3
3
  import type { ValidateOptions } from "../../actions/validate.svelte.js";
4
4
  import type { THC } from "../Thc/Thc.svelte";
5
+ import type { InputWrapClassProps } from "./types.js";
5
6
  type SnippetWithId = Snippet<[{
6
7
  id: string;
7
8
  }]>;
8
- export interface Props extends HTMLInputAttributes, Record<string, any> {
9
+ export interface Props extends HTMLInputAttributes, InputWrapClassProps, Record<string, any> {
9
10
  input?: HTMLInputElement;
10
11
  files?: FileList;
11
12
  multiple?: boolean;
@@ -26,13 +27,9 @@ export interface Props extends HTMLInputAttributes, Record<string, any> {
26
27
  labelLeft?: boolean;
27
28
  labelLeftWidth?: "normal" | "wide";
28
29
  labelLeftBreakpoint?: number;
30
+ /** Classes for the <input> element */
29
31
  classInput?: string;
30
- classLabel?: string;
31
- classLabelBox?: string;
32
- classInputBox?: string;
33
- classInputBoxWrap?: string;
34
- classDescBox?: string;
35
- classBelowBox?: string;
32
+ /** Classes for the rendered file list (when multiple files selected) */
36
33
  classFileList?: string;
37
34
  style?: string;
38
35
  }
@@ -4,10 +4,14 @@
4
4
  import type { TypeaheadOptions } from "../../actions/typeahead.svelte.js";
5
5
  import type { ValidateOptions } from "../../actions/validate.svelte.js";
6
6
  import type { THC } from "../Thc/Thc.svelte";
7
+ import type { InputWrapClassProps } from "./types.js";
7
8
 
8
9
  type SnippetWithId = Snippet<[{ id: string }]>;
9
10
 
10
- export interface Props extends HTMLInputAttributes, Record<string, any> {
11
+ export interface Props
12
+ extends HTMLInputAttributes,
13
+ InputWrapClassProps,
14
+ Record<string, any> {
11
15
  input?: HTMLInputElement;
12
16
  value?: string | number;
13
17
  label?: SnippetWithId | THC;
@@ -30,14 +34,8 @@
30
34
  labelLeft?: boolean;
31
35
  labelLeftWidth?: "normal" | "wide";
32
36
  labelLeftBreakpoint?: number;
37
+ /** Classes for the <input> element */
33
38
  classInput?: string;
34
- classLabel?: string;
35
- classLabelBox?: string;
36
- classInputBox?: string;
37
- classInputBoxWrap?: string;
38
- classInputBoxWrapInvalid?: string;
39
- classDescBox?: string;
40
- classBelowBox?: string;
41
39
  style?: string;
42
40
  }
43
41
  </script>
@@ -88,7 +86,9 @@
88
86
  classInputBoxWrap,
89
87
  classInputBoxWrapInvalid,
90
88
  classDescBox,
89
+ classDescBoxToggle,
91
90
  classBelowBox,
91
+ classValidationBox,
92
92
  style,
93
93
  //
94
94
  ...rest
@@ -121,7 +121,9 @@
121
121
  {classInputBoxWrap}
122
122
  {classInputBoxWrapInvalid}
123
123
  {classDescBox}
124
+ {classDescBoxToggle}
124
125
  {classBelowBox}
126
+ {classValidationBox}
125
127
  {validation}
126
128
  {style}
127
129
  >
@@ -3,10 +3,11 @@ import type { HTMLInputAttributes } from "svelte/elements";
3
3
  import type { TypeaheadOptions } from "../../actions/typeahead.svelte.js";
4
4
  import type { ValidateOptions } from "../../actions/validate.svelte.js";
5
5
  import type { THC } from "../Thc/Thc.svelte";
6
+ import type { InputWrapClassProps } from "./types.js";
6
7
  type SnippetWithId = Snippet<[{
7
8
  id: string;
8
9
  }]>;
9
- export interface Props extends HTMLInputAttributes, Record<string, any> {
10
+ export interface Props extends HTMLInputAttributes, InputWrapClassProps, Record<string, any> {
10
11
  input?: HTMLInputElement;
11
12
  value?: string | number;
12
13
  label?: SnippetWithId | THC;
@@ -29,14 +30,8 @@ export interface Props extends HTMLInputAttributes, Record<string, any> {
29
30
  labelLeft?: boolean;
30
31
  labelLeftWidth?: "normal" | "wide";
31
32
  labelLeftBreakpoint?: number;
33
+ /** Classes for the <input> element */
32
34
  classInput?: string;
33
- classLabel?: string;
34
- classLabelBox?: string;
35
- classInputBox?: string;
36
- classInputBoxWrap?: string;
37
- classInputBoxWrapInvalid?: string;
38
- classDescBox?: string;
39
- classBelowBox?: string;
40
35
  style?: string;
41
36
  }
42
37
  declare const FieldInput: import("svelte").Component<Props, {}, "value" | "input">;
@@ -6,10 +6,11 @@
6
6
  } from "../../actions/validate.svelte.js";
7
7
  import type { TranslateFn } from "../../types.js";
8
8
  import type { THC } from "../Thc/Thc.svelte";
9
+ import type { InputWrapClassProps } from "./types.js";
9
10
 
10
11
  type SnippetWithId = Snippet<[{ id: string }]>;
11
12
 
12
- export interface Props extends Record<string, any> {
13
+ export interface Props extends InputWrapClassProps, Record<string, any> {
13
14
  value?: string;
14
15
  name: string;
15
16
  label?: SnippetWithId | THC;
@@ -26,12 +27,6 @@
26
27
  labelLeft?: boolean;
27
28
  labelLeftWidth?: "normal" | "wide";
28
29
  labelLeftBreakpoint?: number;
29
- classLabel?: string;
30
- classLabelBox?: string;
31
- classInputBox?: string;
32
- classInputBoxWrap?: string;
33
- classDescBox?: string;
34
- classBelowBox?: string;
35
30
  classEntry?: string;
36
31
  classLanguageLabel?: string;
37
32
  classLanguageInput?: string;
@@ -107,8 +102,11 @@
107
102
  classLabelBox,
108
103
  classInputBox,
109
104
  classInputBoxWrap,
105
+ classInputBoxWrapInvalid,
110
106
  classDescBox,
107
+ classDescBoxToggle,
111
108
  classBelowBox,
109
+ classValidationBox,
112
110
  classEntry,
113
111
  classLanguageLabel,
114
112
  classLanguageInput,
@@ -270,8 +268,11 @@
270
268
  {classLabelBox}
271
269
  {classInputBox}
272
270
  {classInputBoxWrap}
271
+ {classInputBoxWrapInvalid}
273
272
  {classDescBox}
273
+ {classDescBoxToggle}
274
274
  {classBelowBox}
275
+ {classValidationBox}
275
276
  {validation}
276
277
  {style}
277
278
  >
@@ -2,10 +2,11 @@ import type { Snippet } from "svelte";
2
2
  import type { ValidateOptions } from "../../actions/validate.svelte.js";
3
3
  import type { TranslateFn } from "../../types.js";
4
4
  import type { THC } from "../Thc/Thc.svelte";
5
+ import type { InputWrapClassProps } from "./types.js";
5
6
  type SnippetWithId = Snippet<[{
6
7
  id: string;
7
8
  }]>;
8
- export interface Props extends Record<string, any> {
9
+ export interface Props extends InputWrapClassProps, Record<string, any> {
9
10
  value?: string;
10
11
  name: string;
11
12
  label?: SnippetWithId | THC;
@@ -22,12 +23,6 @@ export interface Props extends Record<string, any> {
22
23
  labelLeft?: boolean;
23
24
  labelLeftWidth?: "normal" | "wide";
24
25
  labelLeftBreakpoint?: number;
25
- classLabel?: string;
26
- classLabelBox?: string;
27
- classInputBox?: string;
28
- classInputBoxWrap?: string;
29
- classDescBox?: string;
30
- classBelowBox?: string;
31
26
  classEntry?: string;
32
27
  classLanguageLabel?: string;
33
28
  classLanguageInput?: string;
@@ -6,6 +6,7 @@
6
6
  } from "../../actions/validate.svelte.js";
7
7
  import type { TranslateFn } from "../../types.js";
8
8
  import type { THC } from "../Thc/Thc.svelte";
9
+ import type { InputWrapClassProps } from "./types.js";
9
10
 
10
11
  type SnippetWithId = Snippet<[{ id: string }]>;
11
12
 
@@ -15,7 +16,7 @@
15
16
  parsedValue: unknown; // Parsed JSON value
16
17
  }
17
18
 
18
- export interface Props extends Record<string, any> {
19
+ export interface Props extends InputWrapClassProps, Record<string, any> {
19
20
  value: string;
20
21
  name: string;
21
22
  label?: SnippetWithId | THC;
@@ -32,12 +33,6 @@
32
33
  labelLeft?: boolean;
33
34
  labelLeftWidth?: "normal" | "wide";
34
35
  labelLeftBreakpoint?: number;
35
- classLabel?: string;
36
- classLabelBox?: string;
37
- classInputBox?: string;
38
- classInputBoxWrap?: string;
39
- classDescBox?: string;
40
- classBelowBox?: string;
41
36
  classEntry?: string;
42
37
  classKeyInput?: string;
43
38
  classValueInput?: string;
@@ -108,6 +103,9 @@
108
103
  classLabelBox,
109
104
  classInputBox,
110
105
  classInputBoxWrap,
106
+ classInputBoxWrapInvalid,
107
+ classDescBoxToggle,
108
+ classValidationBox,
111
109
  classDescBox,
112
110
  classBelowBox,
113
111
  classEntry,
@@ -306,8 +304,11 @@
306
304
  {classLabelBox}
307
305
  {classInputBox}
308
306
  {classInputBoxWrap}
307
+ {classInputBoxWrapInvalid}
309
308
  {classDescBox}
309
+ {classDescBoxToggle}
310
310
  {classBelowBox}
311
+ {classValidationBox}
311
312
  {validation}
312
313
  {style}
313
314
  >
@@ -2,6 +2,7 @@ import type { Snippet } from "svelte";
2
2
  import { type ValidateOptions } from "../../actions/validate.svelte.js";
3
3
  import type { TranslateFn } from "../../types.js";
4
4
  import type { THC } from "../Thc/Thc.svelte";
5
+ import type { InputWrapClassProps } from "./types.js";
5
6
  type SnippetWithId = Snippet<[{
6
7
  id: string;
7
8
  }]>;
@@ -10,7 +11,7 @@ export interface KeyValueEntry {
10
11
  value: string;
11
12
  parsedValue: unknown;
12
13
  }
13
- export interface Props extends Record<string, any> {
14
+ export interface Props extends InputWrapClassProps, Record<string, any> {
14
15
  value: string;
15
16
  name: string;
16
17
  label?: SnippetWithId | THC;
@@ -27,12 +28,6 @@ export interface Props extends Record<string, any> {
27
28
  labelLeft?: boolean;
28
29
  labelLeftWidth?: "normal" | "wide";
29
30
  labelLeftBreakpoint?: number;
30
- classLabel?: string;
31
- classLabelBox?: string;
32
- classInputBox?: string;
33
- classInputBoxWrap?: string;
34
- classDescBox?: string;
35
- classBelowBox?: string;
36
31
  classEntry?: string;
37
32
  classKeyInput?: string;
38
33
  classValueInput?: string;
@@ -2,10 +2,11 @@
2
2
  import type { Snippet } from "svelte";
3
3
  import type { ValidateOptions } from "../../actions/validate.svelte.js";
4
4
  import type { THC } from "../Thc/Thc.svelte";
5
+ import type { InputWrapClassProps } from "./types.js";
5
6
 
6
7
  type SnippetWithId = Snippet<[{ id: string }]>;
7
8
 
8
- export interface Props extends Record<string, any> {
9
+ export interface Props extends InputWrapClassProps, Record<string, any> {
9
10
  input?: HTMLInputElement;
10
11
  value: string;
11
12
  label?: SnippetWithId | THC;
@@ -27,13 +28,8 @@
27
28
  labelLeft?: boolean;
28
29
  labelLeftWidth?: "normal" | "wide";
29
30
  labelLeftBreakpoint?: number;
31
+ /** Classes for the underlying <Button> element */
30
32
  classInput?: string;
31
- classLabel?: string;
32
- classLabelBox?: string;
33
- classInputBox?: string;
34
- classInputBoxWrap?: string;
35
- classDescBox?: string;
36
- classBelowBox?: string;
37
33
  style?: string;
38
34
  renderValue?: (rawValue: any) => string;
39
35
  }
@@ -82,8 +78,11 @@
82
78
  classLabelBox,
83
79
  classInputBox,
84
80
  classInputBoxWrap,
81
+ classInputBoxWrapInvalid,
85
82
  classDescBox,
83
+ classDescBoxToggle,
86
84
  classBelowBox,
85
+ classValidationBox,
87
86
  style = "",
88
87
  //
89
88
  renderValue,
@@ -147,8 +146,11 @@
147
146
  {classLabelBox}
148
147
  {classInputBox}
149
148
  {classInputBoxWrap}
149
+ {classInputBoxWrapInvalid}
150
150
  {classDescBox}
151
+ {classDescBoxToggle}
151
152
  {classBelowBox}
153
+ {classValidationBox}
152
154
  {validation}
153
155
  {style}
154
156
  >
@@ -1,10 +1,11 @@
1
1
  import type { Snippet } from "svelte";
2
2
  import type { ValidateOptions } from "../../actions/validate.svelte.js";
3
3
  import type { THC } from "../Thc/Thc.svelte";
4
+ import type { InputWrapClassProps } from "./types.js";
4
5
  type SnippetWithId = Snippet<[{
5
6
  id: string;
6
7
  }]>;
7
- export interface Props extends Record<string, any> {
8
+ export interface Props extends InputWrapClassProps, Record<string, any> {
8
9
  input?: HTMLInputElement;
9
10
  value: string;
10
11
  label?: SnippetWithId | THC;
@@ -26,13 +27,8 @@ export interface Props extends Record<string, any> {
26
27
  labelLeft?: boolean;
27
28
  labelLeftWidth?: "normal" | "wide";
28
29
  labelLeftBreakpoint?: number;
30
+ /** Classes for the underlying <Button> element */
29
31
  classInput?: string;
30
- classLabel?: string;
31
- classLabelBox?: string;
32
- classInputBox?: string;
33
- classInputBoxWrap?: string;
34
- classDescBox?: string;
35
- classBelowBox?: string;
36
32
  style?: string;
37
33
  renderValue?: (rawValue: any) => string;
38
34
  }
@@ -5,10 +5,11 @@
5
5
  ValidationResult,
6
6
  } from "../../actions/validate.svelte.js";
7
7
  import type { THC } from "../Thc/Thc.svelte";
8
+ import type { InputWrapClassProps } from "./types.js";
8
9
 
9
10
  type SnippetWithId = Snippet<[{ id: string }]>;
10
11
 
11
- export interface Props extends Record<string, any> {
12
+ export interface Props extends InputWrapClassProps, Record<string, any> {
12
13
  value: string;
13
14
  name: string;
14
15
  label?: SnippetWithId | THC;
@@ -25,12 +26,6 @@
25
26
  labelLeft?: boolean;
26
27
  labelLeftWidth?: "normal" | "wide";
27
28
  labelLeftBreakpoint?: number;
28
- classLabel?: string;
29
- classLabelBox?: string;
30
- classInputBox?: string;
31
- classInputBoxWrap?: string;
32
- classDescBox?: string;
33
- classBelowBox?: string;
34
29
  style?: string;
35
30
  onChange?: (value: string) => void;
36
31
  }
@@ -66,8 +61,11 @@
66
61
  classLabelBox,
67
62
  classInputBox,
68
63
  classInputBoxWrap,
64
+ classInputBoxWrapInvalid,
69
65
  classDescBox,
66
+ classDescBoxToggle,
70
67
  classBelowBox,
68
+ classValidationBox,
71
69
  style,
72
70
  onChange,
73
71
  }: Props = $props();
@@ -252,8 +250,11 @@
252
250
  {classLabelBox}
253
251
  {classInputBox}
254
252
  {classInputBoxWrap}
253
+ {classInputBoxWrapInvalid}
255
254
  {classDescBox}
255
+ {classDescBoxToggle}
256
256
  {classBelowBox}
257
+ {classValidationBox}
257
258
  {validation}
258
259
  {style}
259
260
  >
@@ -1,10 +1,11 @@
1
1
  import type { Snippet } from "svelte";
2
2
  import type { ValidateOptions } from "../../actions/validate.svelte.js";
3
3
  import type { THC } from "../Thc/Thc.svelte";
4
+ import type { InputWrapClassProps } from "./types.js";
4
5
  type SnippetWithId = Snippet<[{
5
6
  id: string;
6
7
  }]>;
7
- export interface Props extends Record<string, any> {
8
+ export interface Props extends InputWrapClassProps, Record<string, any> {
8
9
  value: string;
9
10
  name: string;
10
11
  label?: SnippetWithId | THC;
@@ -21,12 +22,6 @@ export interface Props extends Record<string, any> {
21
22
  labelLeft?: boolean;
22
23
  labelLeftWidth?: "normal" | "wide";
23
24
  labelLeftBreakpoint?: number;
24
- classLabel?: string;
25
- classLabelBox?: string;
26
- classInputBox?: string;
27
- classInputBoxWrap?: string;
28
- classDescBox?: string;
29
- classBelowBox?: string;
30
25
  style?: string;
31
26
  onChange?: (value: string) => void;
32
27
  }
@@ -24,6 +24,7 @@
24
24
  import InputWrap from "./_internal/InputWrap.svelte";
25
25
  import FieldLikeButton from "./FieldLikeButton.svelte";
26
26
  import ListItemButton from "../ListItemButton/ListItemButton.svelte";
27
+ import type { InputWrapClassProps } from "./types.js";
27
28
 
28
29
  export interface Option {
29
30
  label: string;
@@ -32,7 +33,7 @@
32
33
 
33
34
  type SnippetWithId = Snippet<[{ id: string }]>;
34
35
 
35
- export interface Props extends Record<string, any> {
36
+ export interface Props extends InputWrapClassProps, Record<string, any> {
36
37
  trigger?: Snippet<[{ value: string; modal: ModalDialog }]>;
37
38
  modal?: ModalDialog;
38
39
  input?: HTMLInputElement;
@@ -53,13 +54,8 @@
53
54
  labelLeft?: boolean;
54
55
  labelLeftWidth?: "normal" | "wide";
55
56
  labelLeftBreakpoint?: number;
57
+ /** Classes for the inner FieldLikeButton element */
56
58
  classInput?: string;
57
- classLabel?: string;
58
- classLabelBox?: string;
59
- classInputBox?: string;
60
- classInputBoxWrap?: string;
61
- classDescBox?: string;
62
- classBelowBox?: string;
63
59
  classOption?: string;
64
60
  classOptionActive?: string;
65
61
  classOptgroup?: string;
@@ -154,8 +150,11 @@
154
150
  classLabelBox,
155
151
  classInputBox,
156
152
  classInputBoxWrap,
153
+ classInputBoxWrapInvalid,
157
154
  classDescBox,
155
+ classDescBoxToggle,
158
156
  classBelowBox,
157
+ classValidationBox,
159
158
  //
160
159
  classOption,
161
160
  classOptionActive,
@@ -524,8 +523,11 @@
524
523
  {classLabelBox}
525
524
  {classInputBox}
526
525
  {classInputBoxWrap}
526
+ {classInputBoxWrapInvalid}
527
527
  {classDescBox}
528
+ {classDescBoxToggle}
528
529
  {classBelowBox}
530
+ {classValidationBox}
529
531
  {style}
530
532
  validate={wrappedValidate}
531
533
  {required}
@@ -5,6 +5,7 @@ import type { TranslateFn } from "../../types.js";
5
5
  import { ModalDialog } from "../ModalDialog/index.js";
6
6
  import { NotificationsStack } from "../Notifications/index.js";
7
7
  import type { THC } from "../Thc/Thc.svelte";
8
+ import type { InputWrapClassProps } from "./types.js";
8
9
  export interface Option {
9
10
  label: string;
10
11
  value: any;
@@ -12,7 +13,7 @@ export interface Option {
12
13
  type SnippetWithId = Snippet<[{
13
14
  id: string;
14
15
  }]>;
15
- export interface Props extends Record<string, any> {
16
+ export interface Props extends InputWrapClassProps, Record<string, any> {
16
17
  trigger?: Snippet<[{
17
18
  value: string;
18
19
  modal: ModalDialog;
@@ -36,13 +37,8 @@ export interface Props extends Record<string, any> {
36
37
  labelLeft?: boolean;
37
38
  labelLeftWidth?: "normal" | "wide";
38
39
  labelLeftBreakpoint?: number;
40
+ /** Classes for the inner FieldLikeButton element */
39
41
  classInput?: string;
40
- classLabel?: string;
41
- classLabelBox?: string;
42
- classInputBox?: string;
43
- classInputBoxWrap?: string;
44
- classDescBox?: string;
45
- classBelowBox?: string;
46
42
  classOption?: string;
47
43
  classOptionActive?: string;
48
44
  classOptgroup?: string;
@@ -3,10 +3,11 @@
3
3
  import type { ValidateOptions } from "../../actions/validate.svelte.js";
4
4
  import type { TranslateFn } from "../../types.js";
5
5
  import type { THC } from "../Thc/Thc.svelte";
6
+ import type { InputWrapClassProps } from "./types.js";
6
7
 
7
8
  type SnippetWithId = Snippet<[{ id: string }]>;
8
9
 
9
- export interface Props extends Record<string, any> {
10
+ export interface Props extends InputWrapClassProps, Record<string, any> {
10
11
  input?: HTMLInputElement;
11
12
  /** Full phone number string, e.g. "+421905123456". Bindable. */
12
13
  value?: string;
@@ -46,14 +47,8 @@
46
47
  labelLeftWidth?: "normal" | "wide";
47
48
  labelLeftBreakpoint?: number;
48
49
  //
50
+ /** Classes for the tel <input> element */
49
51
  classInput?: string;
50
- classLabel?: string;
51
- classLabelBox?: string;
52
- classInputBox?: string;
53
- classInputBoxWrap?: string;
54
- classInputBoxWrapInvalid?: string;
55
- classDescBox?: string;
56
- classBelowBox?: string;
57
52
  classPrefixTrigger?: string;
58
53
  classPrefixDropdown?: string;
59
54
  style?: string;
@@ -121,7 +116,9 @@
121
116
  classInputBoxWrap,
122
117
  classInputBoxWrapInvalid,
123
118
  classDescBox,
119
+ classDescBoxToggle,
124
120
  classBelowBox,
121
+ classValidationBox,
125
122
  classPrefixTrigger,
126
123
  classPrefixDropdown,
127
124
  style,
@@ -283,7 +280,9 @@
283
280
  {classInputBoxWrap}
284
281
  {classInputBoxWrapInvalid}
285
282
  {classDescBox}
283
+ {classDescBoxToggle}
286
284
  {classBelowBox}
285
+ {classValidationBox}
287
286
  {validation}
288
287
  {style}
289
288
  >
@@ -2,10 +2,11 @@ import type { Snippet } from "svelte";
2
2
  import type { ValidateOptions } from "../../actions/validate.svelte.js";
3
3
  import type { TranslateFn } from "../../types.js";
4
4
  import type { THC } from "../Thc/Thc.svelte";
5
+ import type { InputWrapClassProps } from "./types.js";
5
6
  type SnippetWithId = Snippet<[{
6
7
  id: string;
7
8
  }]>;
8
- export interface Props extends Record<string, any> {
9
+ export interface Props extends InputWrapClassProps, Record<string, any> {
9
10
  input?: HTMLInputElement;
10
11
  /** Full phone number string, e.g. "+421905123456". Bindable. */
11
12
  value?: string;
@@ -43,14 +44,8 @@ export interface Props extends Record<string, any> {
43
44
  labelLeft?: boolean;
44
45
  labelLeftWidth?: "normal" | "wide";
45
46
  labelLeftBreakpoint?: number;
47
+ /** Classes for the tel <input> element */
46
48
  classInput?: string;
47
- classLabel?: string;
48
- classLabelBox?: string;
49
- classInputBox?: string;
50
- classInputBoxWrap?: string;
51
- classInputBoxWrapInvalid?: string;
52
- classDescBox?: string;
53
- classBelowBox?: string;
54
49
  classPrefixTrigger?: string;
55
50
  classPrefixDropdown?: string;
56
51
  style?: string;