lithesome 0.22.0 → 0.22.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.
Files changed (33) hide show
  1. package/dist/components/accordion/state.svelte.d.ts +21 -0
  2. package/dist/components/accordion/state.svelte.js +21 -0
  3. package/dist/components/checkbox/state.svelte.d.ts +18 -0
  4. package/dist/components/checkbox/state.svelte.js +18 -0
  5. package/dist/components/dropzone/state.svelte.d.ts +6 -1
  6. package/dist/components/dropzone/state.svelte.js +6 -1
  7. package/dist/components/hovercard/state.svelte.d.ts +12 -0
  8. package/dist/components/hovercard/state.svelte.js +12 -0
  9. package/dist/components/menu/state.svelte.d.ts +33 -0
  10. package/dist/components/menu/state.svelte.js +33 -0
  11. package/dist/components/modal/state.svelte.d.ts +12 -0
  12. package/dist/components/modal/state.svelte.js +12 -0
  13. package/dist/components/pin/state.svelte.d.ts +9 -0
  14. package/dist/components/pin/state.svelte.js +9 -0
  15. package/dist/components/radiogroup/state.svelte.d.ts +12 -0
  16. package/dist/components/radiogroup/state.svelte.js +12 -0
  17. package/dist/components/select/state.svelte.d.ts +21 -0
  18. package/dist/components/select/state.svelte.js +21 -0
  19. package/dist/components/slider/state.svelte.d.ts +24 -0
  20. package/dist/components/slider/state.svelte.js +24 -0
  21. package/dist/components/stepper/Stepper.svelte.d.ts +2 -1
  22. package/dist/components/stepper/StepperLink.svelte.d.ts +1 -1
  23. package/dist/components/stepper/StepperSteps.svelte.d.ts +1 -1
  24. package/dist/components/stepper/state.svelte.d.ts +71 -3
  25. package/dist/components/stepper/state.svelte.js +74 -6
  26. package/dist/components/tabs/TabsList.svelte.d.ts +1 -1
  27. package/dist/components/tabs/state.svelte.d.ts +13 -1
  28. package/dist/components/tabs/state.svelte.js +13 -1
  29. package/dist/components/tags/state.svelte.d.ts +20 -0
  30. package/dist/components/tags/state.svelte.js +20 -0
  31. package/dist/components/tooltip/state.svelte.d.ts +13 -2
  32. package/dist/components/tooltip/state.svelte.js +12 -0
  33. package/package.json +1 -1
@@ -13,6 +13,9 @@ export declare class AccordionRoot {
13
13
  "data-accordion-root": string;
14
14
  };
15
15
  state: {
16
+ /**
17
+ * The current value.
18
+ */
16
19
  value: string | string[];
17
20
  };
18
21
  }
@@ -29,7 +32,13 @@ declare class AccordionItem {
29
32
  'data-value': string;
30
33
  };
31
34
  state: {
35
+ /**
36
+ * True if the item is active.
37
+ */
32
38
  active: boolean;
39
+ /**
40
+ * True the item is disabled.
41
+ */
33
42
  disabled: boolean;
34
43
  };
35
44
  }
@@ -46,6 +55,9 @@ declare class AccordionHeading {
46
55
  'aria-level': 2 | 1 | 3 | 4 | 5 | 6;
47
56
  };
48
57
  state: {
58
+ /**
59
+ * True if the item is active.
60
+ */
49
61
  active: boolean;
50
62
  };
51
63
  }
@@ -64,7 +76,13 @@ declare class AccordionButton {
64
76
  readonly tabindex: 0 | -1;
65
77
  };
66
78
  state: {
79
+ /**
80
+ * True if the item is active.
81
+ */
67
82
  active: boolean;
83
+ /**
84
+ * True if the item is disabled.
85
+ */
68
86
  disabled: boolean;
69
87
  };
70
88
  }
@@ -79,6 +97,9 @@ declare class AccordionContent {
79
97
  "data-accordion-content": string;
80
98
  };
81
99
  state: {
100
+ /**
101
+ * True if the item is active.
102
+ */
82
103
  active: boolean;
83
104
  };
84
105
  }
@@ -31,6 +31,9 @@ export class AccordionRoot {
31
31
  [attrs.root]: ''
32
32
  }));
33
33
  state = $derived.by(() => ({
34
+ /**
35
+ * The current value.
36
+ */
34
37
  value: this.$$.value.val
35
38
  }));
36
39
  }
@@ -50,7 +53,13 @@ class AccordionItem {
50
53
  'data-value': this.$$.value.val
51
54
  }));
52
55
  state = $derived.by(() => ({
56
+ /**
57
+ * True if the item is active.
58
+ */
53
59
  active: this.Active,
60
+ /**
61
+ * True the item is disabled.
62
+ */
54
63
  disabled: this.$$.disabled.val
55
64
  }));
56
65
  }
@@ -70,6 +79,9 @@ class AccordionHeading {
70
79
  'aria-level': this.$$.level.val
71
80
  }));
72
81
  state = $derived.by(() => ({
82
+ /**
83
+ * True if the item is active.
84
+ */
73
85
  active: this._item.Active
74
86
  }));
75
87
  }
@@ -99,7 +111,13 @@ class AccordionButton {
99
111
  }))
100
112
  }));
101
113
  state = $derived.by(() => ({
114
+ /**
115
+ * True if the item is active.
116
+ */
102
117
  active: this._item.Active,
118
+ /**
119
+ * True if the item is disabled.
120
+ */
103
121
  disabled: this._item.$$.disabled.val
104
122
  }));
105
123
  }
@@ -118,6 +136,9 @@ class AccordionContent {
118
136
  [attrs.content]: ''
119
137
  }));
120
138
  state = $derived.by(() => ({
139
+ /**
140
+ * True if the item is active.
141
+ */
121
142
  active: this._item.Active
122
143
  }));
123
144
  }
@@ -11,7 +11,13 @@ declare class CheckboxGroup {
11
11
  "data-checkbox-group": string;
12
12
  };
13
13
  state: {
14
+ /**
15
+ * True if the button is checked.
16
+ */
14
17
  checked: import("../../types/index.js").CheckboxChecked;
18
+ /**
19
+ * True if the group is disabled.
20
+ */
15
21
  disabled: boolean;
16
22
  };
17
23
  }
@@ -34,7 +40,13 @@ declare class CheckboxButton {
34
40
  disabled: true | undefined;
35
41
  };
36
42
  state: {
43
+ /**
44
+ * True if the button is checked.
45
+ */
37
46
  checked: import("../../types/index.js").CheckboxChecked;
47
+ /**
48
+ * True if the group is disabled.
49
+ */
38
50
  disabled: boolean;
39
51
  };
40
52
  }
@@ -49,7 +61,13 @@ declare class CheckboxLabel {
49
61
  for: string | undefined;
50
62
  };
51
63
  state: {
64
+ /**
65
+ * True if the button is checked.
66
+ */
52
67
  checked: import("../../types/index.js").CheckboxChecked;
68
+ /**
69
+ * True if the group is disabled.
70
+ */
53
71
  disabled: boolean;
54
72
  };
55
73
  }
@@ -12,7 +12,13 @@ class CheckboxGroup {
12
12
  [attrs.group]: ''
13
13
  }));
14
14
  state = $derived.by(() => ({
15
+ /**
16
+ * True if the button is checked.
17
+ */
15
18
  checked: this.$$.checked.val,
19
+ /**
20
+ * True if the group is disabled.
21
+ */
16
22
  disabled: this.$$.disabled.val
17
23
  }));
18
24
  }
@@ -52,7 +58,13 @@ class CheckboxButton {
52
58
  }))
53
59
  }));
54
60
  state = $derived.by(() => ({
61
+ /**
62
+ * True if the button is checked.
63
+ */
55
64
  checked: this.Checked,
65
+ /**
66
+ * True if the group is disabled.
67
+ */
56
68
  disabled: this.Disabled
57
69
  }));
58
70
  }
@@ -70,7 +82,13 @@ class CheckboxLabel {
70
82
  for: this._group.sharedIds.get('button')
71
83
  }));
72
84
  state = $derived.by(() => ({
85
+ /**
86
+ * True if the button is checked.
87
+ */
73
88
  checked: this._group.$$.checked.val,
89
+ /**
90
+ * True if the group is disabled.
91
+ */
74
92
  disabled: this._group.$$.disabled.val
75
93
  }));
76
94
  }
@@ -11,13 +11,18 @@ declare class DropzoneRoot {
11
11
  constructor(props: RootProps);
12
12
  checkFileType: (file: File) => boolean;
13
13
  handleFiles: (filelist: FileList) => void;
14
- validate: () => void;
15
14
  props: {
16
15
  id: string;
17
16
  "data-dropzone-root": string;
18
17
  };
19
18
  state: {
19
+ /**
20
+ * True if the dropzone is currently being hovered with a file.
21
+ */
20
22
  dragging: boolean;
23
+ /**
24
+ * True if any validation errors are found.
25
+ */
21
26
  errors: boolean;
22
27
  };
23
28
  }
@@ -69,7 +69,6 @@ class DropzoneRoot {
69
69
  this.$$.onSuccess?.(file);
70
70
  }
71
71
  };
72
- validate = () => { };
73
72
  props = $derived.by(() => ({
74
73
  id: this.$$.id.val,
75
74
  [attrs.root]: '',
@@ -114,7 +113,13 @@ class DropzoneRoot {
114
113
  })
115
114
  }));
116
115
  state = $derived.by(() => ({
116
+ /**
117
+ * True if the dropzone is currently being hovered with a file.
118
+ */
117
119
  dragging: this.dragging,
120
+ /**
121
+ * True if any validation errors are found.
122
+ */
118
123
  errors: this.errorsFound
119
124
  }));
120
125
  }
@@ -20,6 +20,9 @@ declare class HovercardRoot extends Floating {
20
20
  close: () => void;
21
21
  forceClose: () => void;
22
22
  state: {
23
+ /**
24
+ * True if the contents are visible.
25
+ */
23
26
  visible: boolean;
24
27
  };
25
28
  }
@@ -34,6 +37,9 @@ declare class HovercardTrigger {
34
37
  'aria-describedby': string | undefined;
35
38
  };
36
39
  state: {
40
+ /**
41
+ * True if the contents are visible.
42
+ */
37
43
  visible: boolean;
38
44
  };
39
45
  }
@@ -47,6 +53,9 @@ declare class HovercardContent {
47
53
  "data-hovercard-content": string;
48
54
  };
49
55
  state: {
56
+ /**
57
+ * True if the contents are visible.
58
+ */
50
59
  visible: boolean;
51
60
  };
52
61
  }
@@ -60,6 +69,9 @@ declare class HovercardArrow {
60
69
  "data-hovercard-arrow": string;
61
70
  };
62
71
  state: {
72
+ /**
73
+ * True if the contents are visible.
74
+ */
63
75
  visible: boolean;
64
76
  };
65
77
  }
@@ -28,6 +28,9 @@ class HovercardRoot extends Floating {
28
28
  this.$$.visible.val = false;
29
29
  };
30
30
  state = $derived.by(() => ({
31
+ /**
32
+ * True if the contents are visible.
33
+ */
31
34
  visible: this.$$.visible.val
32
35
  }));
33
36
  }
@@ -69,6 +72,9 @@ class HovercardTrigger {
69
72
  })
70
73
  }));
71
74
  state = $derived.by(() => ({
75
+ /**
76
+ * True if the contents are visible.
77
+ */
72
78
  visible: this._root.$$.visible.val
73
79
  }));
74
80
  }
@@ -107,6 +113,9 @@ class HovercardContent {
107
113
  })
108
114
  }));
109
115
  state = $derived.by(() => ({
116
+ /**
117
+ * True if the contents are visible.
118
+ */
110
119
  visible: this._root.$$.visible.val
111
120
  }));
112
121
  }
@@ -125,6 +134,9 @@ class HovercardArrow {
125
134
  })
126
135
  }));
127
136
  state = $derived.by(() => ({
137
+ /**
138
+ * True if the contents are visible.
139
+ */
128
140
  visible: this._root.$$.visible.val
129
141
  }));
130
142
  }
@@ -14,6 +14,9 @@ declare class MenuBaseState extends Floating {
14
14
  $$: RootProps;
15
15
  constructor(props: RootProps);
16
16
  state: {
17
+ /**
18
+ * True if the contents are visible.
19
+ */
17
20
  visible: boolean;
18
21
  };
19
22
  }
@@ -35,6 +38,9 @@ declare class MenuRoot extends MenuBaseState {
35
38
  setHoveredItem: (item: string) => void;
36
39
  getHoveredElement: () => HTMLButtonElement | null;
37
40
  state: {
41
+ /**
42
+ * True if the contents are visible.
43
+ */
38
44
  visible: boolean;
39
45
  };
40
46
  }
@@ -51,6 +57,9 @@ declare class MenuTrigger {
51
57
  'aria-controls': string | undefined;
52
58
  };
53
59
  state: {
60
+ /**
61
+ * True if the contents are visible.
62
+ */
54
63
  visible: boolean;
55
64
  };
56
65
  }
@@ -64,6 +73,9 @@ declare class MenuArrow {
64
73
  "data-menu-arrow": string;
65
74
  };
66
75
  state: {
76
+ /**
77
+ * True if the contents are visible.
78
+ */
67
79
  visible: boolean;
68
80
  };
69
81
  }
@@ -77,6 +89,9 @@ declare class MenuContent {
77
89
  "data-menu-content": string;
78
90
  };
79
91
  state: {
92
+ /**
93
+ * True if the contents are visible.
94
+ */
80
95
  visible: boolean;
81
96
  };
82
97
  }
@@ -94,7 +109,13 @@ declare class MenuItem {
94
109
  'aria-disabled': boolean;
95
110
  };
96
111
  state: {
112
+ /**
113
+ * True if the item is disabled.
114
+ */
97
115
  readonly disabled: boolean;
116
+ /**
117
+ * True if the item is being hovered.
118
+ */
98
119
  readonly active: boolean;
99
120
  };
100
121
  }
@@ -125,8 +146,17 @@ declare class MenuSubTrigger {
125
146
  'aria-controls': string | undefined;
126
147
  };
127
148
  state: {
149
+ /**
150
+ * True if the sub menu is disabled.
151
+ */
128
152
  readonly disabled: boolean;
153
+ /**
154
+ * True if item is hovered.
155
+ */
129
156
  readonly active: boolean;
157
+ /**
158
+ * True if the sub menu is opened.
159
+ */
130
160
  readonly opened: boolean;
131
161
  };
132
162
  }
@@ -141,6 +171,9 @@ declare class MenuSubContent {
141
171
  "data-menu-sub-content": string;
142
172
  };
143
173
  state: {
174
+ /**
175
+ * True if the contents are visible.
176
+ */
144
177
  visible: boolean;
145
178
  };
146
179
  }
@@ -18,6 +18,9 @@ class MenuBaseState extends Floating {
18
18
  this.$$ = props;
19
19
  }
20
20
  state = $derived.by(() => ({
21
+ /**
22
+ * True if the contents are visible.
23
+ */
21
24
  visible: this.$$.visible.val
22
25
  }));
23
26
  }
@@ -84,6 +87,9 @@ class MenuRoot extends MenuBaseState {
84
87
  return document.querySelector(`${selectors.item}#${this.HoveredItem.id}`);
85
88
  };
86
89
  state = $derived.by(() => ({
90
+ /**
91
+ * True if the contents are visible.
92
+ */
87
93
  visible: this.$$.visible.val
88
94
  }));
89
95
  }
@@ -160,6 +166,9 @@ class MenuTrigger {
160
166
  })
161
167
  }));
162
168
  state = $derived.by(() => ({
169
+ /**
170
+ * True if the contents are visible.
171
+ */
163
172
  visible: this._root.$$.visible.val
164
173
  }));
165
174
  }
@@ -178,6 +187,9 @@ class MenuArrow {
178
187
  })
179
188
  }));
180
189
  state = $derived.by(() => ({
190
+ /**
191
+ * True if the contents are visible.
192
+ */
181
193
  visible: this._parent.$$.visible.val
182
194
  }));
183
195
  }
@@ -207,6 +219,9 @@ class MenuContent {
207
219
  })
208
220
  }));
209
221
  state = $derived.by(() => ({
222
+ /**
223
+ * True if the contents are visible.
224
+ */
210
225
  visible: this._root.$$.visible.val
211
226
  }));
212
227
  }
@@ -246,7 +261,13 @@ class MenuItem {
246
261
  })
247
262
  }));
248
263
  state = $derived.by(() => ({
264
+ /**
265
+ * True if the item is disabled.
266
+ */
249
267
  disabled: this.$$.disabled.val,
268
+ /**
269
+ * True if the item is being hovered.
270
+ */
250
271
  active: this.IsActive
251
272
  }));
252
273
  }
@@ -310,8 +331,17 @@ class MenuSubTrigger {
310
331
  })
311
332
  }));
312
333
  state = $derived.by(() => ({
334
+ /**
335
+ * True if the sub menu is disabled.
336
+ */
313
337
  disabled: this._sub.$$.disabled.val,
338
+ /**
339
+ * True if item is hovered.
340
+ */
314
341
  active: this.IsActive,
342
+ /**
343
+ * True if the sub menu is opened.
344
+ */
315
345
  opened: this.IsOpened
316
346
  }));
317
347
  }
@@ -339,6 +369,9 @@ class MenuSubContent {
339
369
  })
340
370
  }));
341
371
  state = $derived.by(() => ({
372
+ /**
373
+ * True if the contents are visible.
374
+ */
342
375
  visible: this._sub.$$.visible.val
343
376
  }));
344
377
  }
@@ -12,6 +12,9 @@ declare class ModalRoot extends Scrolling {
12
12
  toggle: () => void;
13
13
  handleKeydown: (e: KeyboardEvent) => void;
14
14
  state: {
15
+ /**
16
+ * True if the contents are visible.
17
+ */
15
18
  visible: boolean;
16
19
  };
17
20
  }
@@ -28,6 +31,9 @@ declare class ModalTrigger {
28
31
  'aria-controls': string | undefined;
29
32
  };
30
33
  state: {
34
+ /**
35
+ * True if the contents are visible.
36
+ */
31
37
  visible: boolean;
32
38
  };
33
39
  }
@@ -42,6 +48,9 @@ declare class ModalBackdrop {
42
48
  'aria-hidden': boolean;
43
49
  };
44
50
  state: {
51
+ /**
52
+ * True if the contents are visible.
53
+ */
45
54
  visible: boolean;
46
55
  };
47
56
  }
@@ -60,6 +69,9 @@ declare class ModalContent {
60
69
  readonly 'aria-labelledby': string | undefined;
61
70
  };
62
71
  state: {
72
+ /**
73
+ * True if the contents are visible.
74
+ */
63
75
  visible: boolean;
64
76
  };
65
77
  }
@@ -38,6 +38,9 @@ class ModalRoot extends Scrolling {
38
38
  this.$$.visible.val = false;
39
39
  };
40
40
  state = $derived.by(() => ({
41
+ /**
42
+ * True if the contents are visible.
43
+ */
41
44
  visible: this.$$.visible.val
42
45
  }));
43
46
  }
@@ -63,6 +66,9 @@ class ModalTrigger {
63
66
  }))
64
67
  }));
65
68
  state = $derived.by(() => ({
69
+ /**
70
+ * True if the contents are visible.
71
+ */
66
72
  visible: this._root.$$.visible.val
67
73
  }));
68
74
  }
@@ -93,6 +99,9 @@ class ModalBackdrop {
93
99
  })
94
100
  }));
95
101
  state = $derived.by(() => ({
102
+ /**
103
+ * True if the contents are visible.
104
+ */
96
105
  visible: this._root.$$.visible.val
97
106
  }));
98
107
  }
@@ -123,6 +132,9 @@ class ModalContent {
123
132
  })
124
133
  }));
125
134
  state = $derived.by(() => ({
135
+ /**
136
+ * True if the contents are visible.
137
+ */
126
138
  visible: this._root.$$.visible.val
127
139
  }));
128
140
  }
@@ -35,8 +35,17 @@ declare class PinInput {
35
35
  "data-pin-input": string;
36
36
  };
37
37
  state: {
38
+ /**
39
+ * True if every input is filled.
40
+ */
38
41
  filled: boolean;
42
+ /**
43
+ * True if the input is disabled.
44
+ */
39
45
  disabled: boolean;
46
+ /**
47
+ * True if the input is focused.
48
+ */
40
49
  focused: boolean;
41
50
  };
42
51
  }
@@ -144,8 +144,17 @@ class PinInput {
144
144
  }))
145
145
  }));
146
146
  state = $derived.by(() => ({
147
+ /**
148
+ * True if every input is filled.
149
+ */
147
150
  filled: this._root.Filled,
151
+ /**
152
+ * True if the input is disabled.
153
+ */
148
154
  disabled: this._root.$$.disabled.val,
155
+ /**
156
+ * True if the input is focused.
157
+ */
149
158
  focused: this.focused
150
159
  }));
151
160
  }
@@ -20,7 +20,13 @@ declare class RadioGroupRoot {
20
20
  "data-radiogroup-root": string;
21
21
  };
22
22
  state: {
23
+ /**
24
+ * The current value of the group.
25
+ */
23
26
  value: string;
27
+ /**
28
+ * True if the group is disabled.
29
+ */
24
30
  disabled: boolean;
25
31
  };
26
32
  }
@@ -39,7 +45,13 @@ declare class RadioGroupItem {
39
45
  tabindex: number;
40
46
  };
41
47
  state: {
48
+ /**
49
+ * True if the item is selected.
50
+ */
42
51
  selected: boolean;
52
+ /**
53
+ * True if the item is disabled.
54
+ */
43
55
  disabled: boolean;
44
56
  };
45
57
  }
@@ -34,7 +34,13 @@ class RadioGroupRoot {
34
34
  [attrs.root]: ''
35
35
  }));
36
36
  state = $derived.by(() => ({
37
+ /**
38
+ * The current value of the group.
39
+ */
37
40
  value: this.$$.value.val,
41
+ /**
42
+ * True if the group is disabled.
43
+ */
38
44
  disabled: this.$$.disabled.val
39
45
  }));
40
46
  }
@@ -77,7 +83,13 @@ class RadioGroupItem {
77
83
  }))
78
84
  }));
79
85
  state = $derived.by(() => ({
86
+ /**
87
+ * True if the item is selected.
88
+ */
80
89
  selected: this.Selected,
90
+ /**
91
+ * True if the item is disabled.
92
+ */
81
93
  disabled: this.$$.disabled.val
82
94
  }));
83
95
  }