@r2digisolutions/components 0.14.9 → 0.14.11

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.
@@ -9,6 +9,8 @@
9
9
  gap?: ClusterGap;
10
10
  align?: ClusterAlign;
11
11
  justify?: ClusterJustify;
12
+ /** When false, items stay on one row (no wrap). Default true. */
13
+ wrap?: boolean;
12
14
  class?: string;
13
15
  children?: Snippet;
14
16
  }
@@ -17,6 +19,7 @@
17
19
  gap = 'sm',
18
20
  align = 'center',
19
21
  justify = 'start',
22
+ wrap = true,
20
23
  class: className = '',
21
24
  children
22
25
  }: ClusterProps = $props();
@@ -44,6 +47,15 @@
44
47
  };
45
48
  </script>
46
49
 
47
- <div class={['flex flex-wrap', gaps[gap], aligns[align], justifies[justify], className]}>
50
+ <div
51
+ class={[
52
+ 'flex',
53
+ wrap ? 'flex-wrap' : 'flex-nowrap',
54
+ gaps[gap],
55
+ aligns[align],
56
+ justifies[justify],
57
+ className
58
+ ]}
59
+ >
48
60
  {#if children}{@render children()}{/if}
49
61
  </div>
@@ -6,6 +6,8 @@ interface ClusterProps {
6
6
  gap?: ClusterGap;
7
7
  align?: ClusterAlign;
8
8
  justify?: ClusterJustify;
9
+ /** When false, items stay on one row (no wrap). Default true. */
10
+ wrap?: boolean;
9
11
  class?: string;
10
12
  children?: Snippet;
11
13
  }
@@ -71,6 +71,7 @@
71
71
 
72
72
  <div class={['w-full', className]}>
73
73
  <NumberInput
74
+ {name}
74
75
  {label}
75
76
  {min}
76
77
  {max}
@@ -2,6 +2,7 @@
2
2
  import Input from '../../atoms/Input/Input.svelte';
3
3
 
4
4
  interface NumberInputProps {
5
+ name?: string;
5
6
  value?: number;
6
7
  min?: number;
7
8
  max?: number;
@@ -18,6 +19,7 @@
18
19
  }
19
20
 
20
21
  let {
22
+ name,
21
23
  value = $bindable(0),
22
24
  min,
23
25
  max,
@@ -97,6 +99,7 @@
97
99
  <div class={['number-input w-full', className]}>
98
100
  {#if controls === 'sides'}
99
101
  <Input
102
+ {name}
100
103
  {label}
101
104
  {helperText}
102
105
  {disabled}
@@ -142,6 +145,7 @@
142
145
  </Input>
143
146
  {:else if controls === 'stacked'}
144
147
  <Input
148
+ {name}
145
149
  {label}
146
150
  {helperText}
147
151
  {disabled}
@@ -183,6 +187,7 @@
183
187
  </Input>
184
188
  {:else}
185
189
  <Input
190
+ {name}
186
191
  {label}
187
192
  {helperText}
188
193
  {disabled}
@@ -1,4 +1,5 @@
1
1
  interface NumberInputProps {
2
+ name?: string;
2
3
  value?: number;
3
4
  min?: number;
4
5
  max?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@r2digisolutions/components",
3
- "version": "0.14.9",
3
+ "version": "0.14.11",
4
4
  "private": false,
5
5
  "description": "R2DigiSolutions Svelte 5 component library — Atomic Design, Tailwind 4, Light/Dark mode",
6
6
  "license": "MIT",