@marianmeres/stuic 3.66.0 → 3.67.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 +99 -62
  25. package/dist/components/DataTable/DataTable.svelte.d.ts +13 -3
  26. package/dist/components/DataTable/README.md +79 -25
  27. package/dist/components/DataTable/index.css +7 -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 +18 -19
@@ -170,6 +170,10 @@ export interface Props extends Omit<HTMLButtonAttributes, "children"> {
170
170
  triggerEl?: HTMLButtonElement;
171
171
  /** Reference to dropdown element */
172
172
  dropdownEl?: HTMLDivElement;
173
+ /** Reference to the wrapper element */
174
+ el?: HTMLDivElement;
175
+ /** Opt out of stuic base classes for full styling control */
176
+ unstyled?: boolean;
173
177
  /** Optional, used only when css positioning not supported (iPhone)*/
174
178
  noScrollLock?: boolean;
175
179
  }
@@ -179,6 +183,6 @@ export declare const DROPDOWN_MENU_DROPDOWN_CLASSES = "stuic-dropdown-menu-dropd
179
183
  export declare const DROPDOWN_MENU_DIVIDER_CLASSES = "stuic-dropdown-menu-divider";
180
184
  export declare const DROPDOWN_MENU_HEADER_CLASSES = "stuic-dropdown-menu-header";
181
185
  export declare const DROPDOWN_MENU_BACKDROP_CLASSES = "stuic-dropdown-menu-backdrop";
182
- declare const DropdownMenu: import("svelte").Component<Props, {}, "isOpen" | "triggerEl" | "dropdownEl">;
186
+ declare const DropdownMenu: import("svelte").Component<Props, {}, "el" | "isOpen" | "triggerEl" | "dropdownEl">;
183
187
  type DropdownMenu = ReturnType<typeof DropdownMenu>;
184
188
  export default DropdownMenu;
@@ -8,13 +8,15 @@ A feature-rich dropdown menu component with CSS Anchor Positioning (with fallbac
8
8
  | ------------------------ | ---------------------- | -------------------- | ---------------------------------------- |
9
9
  | `items` | `DropdownMenuItem[]` | - | Menu items to display |
10
10
  | `isOpen` | `boolean` | `false` | Controlled open state (bindable) |
11
- | `position` | `DropdownMenuPosition` | `"bottom-span-left"` | Popover position relative to trigger |
11
+ | `position` | `DropdownMenuPosition` | `"bottom-span-right"` | Popover position relative to trigger |
12
12
  | `offset` | `string` | `"0.25rem"` | Offset from trigger element (CSS value) |
13
13
  | `maxHeight` | `string` | `"300px"` | Max height of dropdown |
14
14
  | `closeOnSelect` | `boolean` | `true` | Close menu when action item is selected |
15
15
  | `closeOnClickOutside` | `boolean` | `true` | Close on click outside |
16
16
  | `closeOnEscape` | `boolean` | `true` | Close on Escape key |
17
17
  | `forceFallback` | `boolean` | `false` | Force fallback positioning (for testing) |
18
+ | `search` | `boolean \| DropdownMenuSearchConfig` | - | Enable search/filter input (see [Search](#search)) |
19
+ | `unstyled` | `boolean` | `false` | Opt out of stuic base classes |
18
20
  | `class` | `string` | - | Classes for wrapper element |
19
21
  | `classTrigger` | `string` | - | Classes for trigger button |
20
22
  | `classDropdown` | `string` | - | Classes for dropdown container |
@@ -25,6 +27,7 @@ A feature-rich dropdown menu component with CSS Anchor Positioning (with fallbac
25
27
  | `classHeader` | `string` | - | Classes for header items |
26
28
  | `classExpandable` | `string` | - | Classes for expandable section header |
27
29
  | `classExpandableContent` | `string` | - | Classes for expandable section content |
30
+ | `el` | `HTMLDivElement` | - | Wrapper element reference (bindable) |
28
31
  | `triggerEl` | `HTMLButtonElement` | - | Trigger element reference (bindable) |
29
32
  | `dropdownEl` | `HTMLDivElement` | - | Dropdown element reference (bindable) |
30
33
 
@@ -39,15 +42,15 @@ A feature-rich dropdown menu component with CSS Anchor Positioning (with fallbac
39
42
 
40
43
  ### Action Item
41
44
 
42
- Clickable menu item with optional icon and shortcut.
45
+ Clickable menu item with optional leading/trailing content.
43
46
 
44
47
  ```typescript
45
48
  interface DropdownMenuActionItem {
46
49
  type: "action";
47
50
  id: string | number;
48
51
  label: THC; // Text, HTML, or component
49
- icon?: THC; // Optional leading icon
50
- shortcut?: string; // Keyboard shortcut hint
52
+ contentBefore?: THC; // Optional leading content (icon, etc.)
53
+ contentAfter?: THC; // Optional trailing content (shortcut hint, etc.)
51
54
  disabled?: boolean;
52
55
  onSelect?: () => void | boolean;
53
56
  href?: string; // Render as <a> link instead of <button>
@@ -104,7 +107,7 @@ interface DropdownMenuExpandableItem {
104
107
  type: "expandable";
105
108
  id: string | number;
106
109
  label: THC;
107
- icon?: THC;
110
+ contentBefore?: THC;
108
111
  items: DropdownMenuFlatItem[]; // Nested items (no nested expandables)
109
112
  defaultExpanded?: boolean;
110
113
  disabled?: boolean;
@@ -131,6 +134,29 @@ interface DropdownMenuExpandableItem {
131
134
  | `onClose` | - | Called when menu closes |
132
135
  | `onSelect` | `(item: DropdownMenuActionItem)` | Called when action item selected (fallback) |
133
136
 
137
+ ## Search
138
+
139
+ Pass `search` to enable an in-menu filter input. Use `true` for defaults or a config object:
140
+
141
+ ```typescript
142
+ interface DropdownMenuSearchConfig {
143
+ placeholder?: string;
144
+ /** Match algorithm */
145
+ strategy?: "prefix" | "exact" | "fuzzy";
146
+ /** Custom function to extract searchable text from an item */
147
+ getContent?: (item: DropdownMenuActionItem | DropdownMenuExpandableItem) => string;
148
+ /** Auto-focus search input when menu opens */
149
+ autoFocus?: boolean;
150
+ /** Message shown when no results found */
151
+ noResultsMessage?: string;
152
+ }
153
+ ```
154
+
155
+ ```svelte
156
+ <DropdownMenu {items} search />
157
+ <DropdownMenu {items} search={{ placeholder: "Filter…", strategy: "fuzzy" }} />
158
+ ```
159
+
134
160
  ## Keyboard Navigation
135
161
 
136
162
  | Key | Action |
@@ -186,6 +212,8 @@ When `href` is set, the item renders as an `<a>` element instead of `<button>`.
186
212
 
187
213
  ### With Icons and Shortcuts
188
214
 
215
+ Use `contentBefore` for leading content (icons) and `contentAfter` for trailing content (shortcut hints). Both accept any `THC` value — string, HTML, or component.
216
+
189
217
  ```svelte
190
218
  <script lang="ts">
191
219
  import { DropdownMenu } from "stuic";
@@ -197,8 +225,8 @@ When `href` is set, the item renders as an `<a>` element instead of `<button>`.
197
225
  type: "action",
198
226
  id: "edit",
199
227
  label: "Edit",
200
- icon: iconLucideEdit({ size: 16 }),
201
- shortcut: "Cmd+E",
228
+ contentBefore: { html: iconLucideEdit({ size: 16 }) },
229
+ contentAfter: "Cmd+E",
202
230
  onSelect: () => handleEdit(),
203
231
  },
204
232
  { type: "divider" },
@@ -206,8 +234,8 @@ When `href` is set, the item renders as an `<a>` element instead of `<button>`.
206
234
  type: "action",
207
235
  id: "delete",
208
236
  label: "Delete",
209
- icon: iconLucideTrash({ size: 16 }),
210
- shortcut: "Cmd+D",
237
+ contentBefore: { html: iconLucideTrash({ size: 16 }) },
238
+ contentAfter: "Cmd+D",
211
239
  onSelect: () => handleDelete(),
212
240
  },
213
241
  ];
@@ -37,6 +37,7 @@
37
37
  import SpinnerCircleOscillate from "../Spinner/SpinnerCircleOscillate.svelte";
38
38
  import { isTHCNotEmpty, type THC } from "../Thc/Thc.svelte";
39
39
  import InputWrap from "./_internal/InputWrap.svelte";
40
+ import type { InputWrapClassProps } from "./types.js";
40
41
  import Button from "../Button/Button.svelte";
41
42
 
42
43
  const clog = createClog("FieldAssets");
@@ -126,7 +127,7 @@
126
127
 
127
128
  type SnippetWithId = Snippet<[{ id: string }]>;
128
129
 
129
- export interface Props extends Record<string, any> {
130
+ export interface Props extends InputWrapClassProps, Record<string, any> {
130
131
  value: string;
131
132
  label?: SnippetWithId | THC;
132
133
  type?: string;
@@ -145,13 +146,8 @@
145
146
  labelLeft?: boolean;
146
147
  labelLeftWidth?: "normal" | "wide";
147
148
  labelLeftBreakpoint?: number;
149
+ /** Classes for the hidden <input> element */
148
150
  classInput?: string;
149
- classLabel?: string;
150
- classLabelBox?: string;
151
- classInputBox?: string;
152
- classInputBoxWrap?: string;
153
- classDescBox?: string;
154
- classBelowBox?: string;
155
151
  classOption?: string;
156
152
  classOptionActive?: string;
157
153
  classOptgroup?: string;
@@ -205,8 +201,11 @@
205
201
  classLabelBox,
206
202
  classInputBox,
207
203
  classInputBoxWrap,
204
+ classInputBoxWrapInvalid,
208
205
  classDescBox,
206
+ classDescBoxToggle,
209
207
  classBelowBox,
208
+ classValidationBox,
210
209
  //
211
210
  classOption,
212
211
  classOptionActive,
@@ -503,8 +502,11 @@
503
502
  {classLabelBox}
504
503
  {classInputBox}
505
504
  {classInputBoxWrap}
505
+ {classInputBoxWrapInvalid}
506
506
  {classDescBox}
507
+ {classDescBoxToggle}
507
508
  {classBelowBox}
509
+ {classValidationBox}
508
510
  {validation}
509
511
  {style}
510
512
  >
@@ -3,6 +3,7 @@ import { type ValidateOptions } from "../../actions/validate.svelte.js";
3
3
  import type { TranslateFn } from "../../types.js";
4
4
  import { NotificationsStack } from "../Notifications/notifications-stack.svelte.js";
5
5
  import { type THC } from "../Thc/Thc.svelte";
6
+ import type { InputWrapClassProps } from "./types.js";
6
7
  export type FieldAssetUrlObj = {
7
8
  thumb: string;
8
9
  full: string;
@@ -23,7 +24,7 @@ export declare function getAssetIcon(ext?: string): CallableFunction;
23
24
  type SnippetWithId = Snippet<[{
24
25
  id: string;
25
26
  }]>;
26
- export interface Props extends Record<string, any> {
27
+ export interface Props extends InputWrapClassProps, Record<string, any> {
27
28
  value: string;
28
29
  label?: SnippetWithId | THC;
29
30
  type?: string;
@@ -42,13 +43,8 @@ export interface Props extends Record<string, any> {
42
43
  labelLeft?: boolean;
43
44
  labelLeftWidth?: "normal" | "wide";
44
45
  labelLeftBreakpoint?: number;
46
+ /** Classes for the hidden <input> element */
45
47
  classInput?: string;
46
- classLabel?: string;
47
- classLabelBox?: string;
48
- classInputBox?: string;
49
- classInputBoxWrap?: string;
50
- classDescBox?: string;
51
- classBelowBox?: string;
52
48
  classOption?: string;
53
49
  classOptionActive?: string;
54
50
  classOptgroup?: string;
@@ -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
  >