@salmexio/ui 0.1.1 → 0.2.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 (45) hide show
  1. package/dist/dialogs/Modal/Modal.svelte +140 -140
  2. package/dist/dialogs/Modal/Modal.svelte.d.ts.map +1 -1
  3. package/dist/feedback/Alert/Alert.svelte +63 -63
  4. package/dist/feedback/Alert/Alert.svelte.d.ts.map +1 -1
  5. package/dist/feedback/Spinner/Spinner.svelte +55 -55
  6. package/dist/feedback/Spinner/Spinner.svelte.d.ts.map +1 -1
  7. package/dist/forms/Checkbox/Checkbox.svelte +64 -64
  8. package/dist/forms/Checkbox/Checkbox.svelte.d.ts.map +1 -1
  9. package/dist/forms/TextInput/TextInput.svelte +141 -141
  10. package/dist/forms/TextInput/TextInput.svelte.d.ts.map +1 -1
  11. package/dist/index.d.ts +1 -0
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +1 -0
  14. package/dist/layout/Card/Card.svelte +59 -59
  15. package/dist/layout/Card/Card.svelte.d.ts.map +1 -1
  16. package/dist/layout/Container/Container.svelte +34 -34
  17. package/dist/layout/Container/Container.svelte.d.ts.map +1 -1
  18. package/dist/navigation/Tabs/Tabs.svelte +100 -101
  19. package/dist/navigation/Tabs/Tabs.svelte.d.ts.map +1 -1
  20. package/dist/primitives/Badge/Badge.svelte +35 -42
  21. package/dist/primitives/Badge/Badge.svelte.d.ts.map +1 -1
  22. package/dist/primitives/Button/Button.svelte +47 -47
  23. package/dist/primitives/Button/Button.svelte.d.ts.map +1 -1
  24. package/dist/routes/+layout.svelte +1 -1
  25. package/dist/styles/tokens.css +92 -86
  26. package/dist/utils/keyboard.js +3 -3
  27. package/dist/windowing/Window/Window.svelte +602 -0
  28. package/dist/windowing/Window/Window.svelte.d.ts +65 -0
  29. package/dist/windowing/Window/Window.svelte.d.ts.map +1 -0
  30. package/dist/windowing/Window/index.d.ts +2 -0
  31. package/dist/windowing/Window/index.d.ts.map +1 -0
  32. package/dist/windowing/Window/index.js +1 -0
  33. package/dist/windowing/WindowManager/WindowManager.svelte +410 -0
  34. package/dist/windowing/WindowManager/WindowManager.svelte.d.ts +38 -0
  35. package/dist/windowing/WindowManager/WindowManager.svelte.d.ts.map +1 -0
  36. package/dist/windowing/WindowManager/index.d.ts +2 -0
  37. package/dist/windowing/WindowManager/index.d.ts.map +1 -0
  38. package/dist/windowing/WindowManager/index.js +1 -0
  39. package/dist/windowing/index.d.ts +5 -0
  40. package/dist/windowing/index.d.ts.map +1 -0
  41. package/dist/windowing/index.js +3 -0
  42. package/dist/windowing/windowStore.svelte.d.ts +49 -0
  43. package/dist/windowing/windowStore.svelte.d.ts.map +1 -0
  44. package/dist/windowing/windowStore.svelte.js +170 -0
  45. package/package.json +1 -1
@@ -6,70 +6,70 @@
6
6
  Label, description, error, indeterminate. Full a11y; focus and semantics follow the native input.
7
7
  -->
8
8
  <script lang="ts">
9
- import { cn } from '../../utils/cn.js';
10
- import { generateId } from '../../utils/keyboard.js';
11
-
12
- type CheckboxSize = 'sm' | 'md' | 'lg';
13
-
14
- interface Props {
15
- id?: string;
16
- name?: string;
17
- value?: string;
18
- label: string;
19
- checked?: boolean;
20
- description?: string;
21
- required?: boolean;
22
- disabled?: boolean;
23
- error?: string;
24
- indeterminate?: boolean;
25
- size?: CheckboxSize;
26
- hideLabel?: boolean;
27
- class?: string;
28
- onchange?: (event: Event) => void;
29
- testId?: string;
30
- validateOnMount?: boolean;
31
- }
32
-
33
- let {
34
- id = generateId('checkbox'),
35
- name,
36
- value,
37
- label,
38
- checked = $bindable(false),
39
- description = '',
40
- required = false,
41
- disabled = false,
42
- error = '',
43
- indeterminate = false,
44
- size = 'md',
45
- hideLabel = false,
46
- class: className = '',
47
- onchange,
48
- testId,
49
- validateOnMount = false,
50
- }: Props = $props();
51
-
52
- let inputElement = $state<HTMLInputElement | undefined>(undefined);
53
- let hasInteracted = $state(false);
54
-
55
- $effect(() => {
56
- const el = inputElement;
57
- if (el) el.indeterminate = indeterminate;
58
- });
59
-
60
- const showChecked = $derived(checked && !indeterminate);
61
- const shouldValidate = $derived(hasInteracted || validateOnMount);
62
- const showError = $derived(shouldValidate && !!error);
63
- const errorId = $derived(`${id}-error`);
64
- const descriptionId = $derived(`${id}-description`);
65
- const ariaDescribedBy = $derived(
66
- [showError && errorId, description && descriptionId].filter(Boolean).join(' ') || undefined
67
- );
68
-
69
- function handleChange(e: Event) {
70
- hasInteracted = true;
71
- onchange?.(e);
72
- }
9
+ import { cn } from '../../utils/cn.js';
10
+ import { generateId } from '../../utils/keyboard.js';
11
+
12
+ type CheckboxSize = 'sm' | 'md' | 'lg';
13
+
14
+ interface Props {
15
+ id?: string;
16
+ name?: string;
17
+ value?: string;
18
+ label: string;
19
+ checked?: boolean;
20
+ description?: string;
21
+ required?: boolean;
22
+ disabled?: boolean;
23
+ error?: string;
24
+ indeterminate?: boolean;
25
+ size?: CheckboxSize;
26
+ hideLabel?: boolean;
27
+ class?: string;
28
+ onchange?: (event: Event) => void;
29
+ testId?: string;
30
+ validateOnMount?: boolean;
31
+ }
32
+
33
+ let {
34
+ id = generateId('checkbox'),
35
+ name,
36
+ value,
37
+ label,
38
+ checked = $bindable(false),
39
+ description = '',
40
+ required = false,
41
+ disabled = false,
42
+ error = '',
43
+ indeterminate = false,
44
+ size = 'md',
45
+ hideLabel = false,
46
+ class: className = '',
47
+ onchange,
48
+ testId,
49
+ validateOnMount = false
50
+ }: Props = $props();
51
+
52
+ let inputElement = $state<HTMLInputElement | undefined>(undefined);
53
+ let hasInteracted = $state(false);
54
+
55
+ $effect(() => {
56
+ const el = inputElement;
57
+ if (el) el.indeterminate = indeterminate;
58
+ });
59
+
60
+ const showChecked = $derived(checked && !indeterminate);
61
+ const shouldValidate = $derived(hasInteracted || validateOnMount);
62
+ const showError = $derived(shouldValidate && !!error);
63
+ const errorId = $derived(`${id}-error`);
64
+ const descriptionId = $derived(`${id}-description`);
65
+ const ariaDescribedBy = $derived(
66
+ [showError && errorId, description && descriptionId].filter(Boolean).join(' ') || undefined
67
+ );
68
+
69
+ function handleChange(e: Event) {
70
+ hasInteracted = true;
71
+ onchange?.(e);
72
+ }
73
73
  </script>
74
74
 
75
75
  <div
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.svelte.d.ts","sourceRoot":"","sources":["../../../src/forms/Checkbox/Checkbox.svelte.ts"],"names":[],"mappings":"AAOC,KAAK,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEvC,UAAU,KAAK;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC1B;AA+FF;;;;;;GAMG;AACH,QAAA,MAAM,QAAQ,kDAAwC,CAAC;AACvD,KAAK,QAAQ,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC;AAC5C,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"Checkbox.svelte.d.ts","sourceRoot":"","sources":["../../../src/forms/Checkbox/Checkbox.svelte.ts"],"names":[],"mappings":"AAOA,KAAK,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEvC,UAAU,KAAK;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC1B;AA+FD;;;;;;GAMG;AACH,QAAA,MAAM,QAAQ,kDAAwC,CAAC;AACvD,KAAK,QAAQ,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC;AAC5C,eAAe,QAAQ,CAAC"}
@@ -5,148 +5,148 @@
5
5
  Label, error, hint, prefix/suffix, clearable, password toggle. Full a11y.
6
6
  -->
7
7
  <script lang="ts">
8
- import type { Snippet } from 'svelte';
9
- import type { HTMLInputAttributes } from 'svelte/elements';
10
- import { cn } from '../../utils/cn.js';
11
-
12
- type InputSize = 'sm' | 'md' | 'lg';
13
- type InputMode = 'none' | 'text' | 'search' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal';
14
-
15
- interface Props extends Omit<HTMLInputAttributes, 'class' | 'size' | 'inputmode' | 'autocomplete'> {
16
- id?: string;
17
- name?: string;
18
- type?: 'text' | 'email' | 'password' | 'tel' | 'url' | 'search' | 'number';
19
- label: string;
20
- value?: string;
21
- placeholder?: string;
22
- required?: boolean;
23
- disabled?: boolean;
24
- readonly?: boolean;
25
- error?: string;
26
- hint?: string;
27
- successMessage?: string;
28
- maxLength?: number;
29
- minLength?: number;
30
- showCharCount?: boolean;
31
- pattern?: string;
32
- inputMode?: InputMode;
33
- autocomplete?: string;
34
- size?: InputSize;
35
- iconLeft?: Snippet;
36
- iconRight?: Snippet;
37
- hideLabel?: boolean;
38
- class?: string;
39
- prefix?: string;
40
- suffix?: string;
41
- clearable?: boolean;
42
- showPasswordToggle?: boolean;
43
- loading?: boolean;
44
- oninput?: (event: Event) => void;
45
- onblur?: (event: FocusEvent) => void;
46
- onfocus?: (event: FocusEvent) => void;
47
- onclear?: () => void;
48
- testId?: string;
49
- validateOnMount?: boolean;
50
- }
51
-
52
- let {
53
- id = `input-${Math.random().toString(36).slice(2, 9)}`,
54
- name,
55
- type = 'text',
56
- label,
57
- value = $bindable(''),
58
- placeholder = '',
59
- required = false,
60
- disabled = false,
61
- readonly = false,
62
- error = '',
63
- hint = '',
64
- successMessage = '',
65
- maxLength,
66
- minLength,
67
- showCharCount = false,
68
- pattern,
69
- inputMode = 'text',
70
- autocomplete = 'off',
71
- size = 'md',
72
- iconLeft,
73
- iconRight,
74
- hideLabel = false,
75
- class: className = '',
76
- prefix,
77
- suffix,
78
- clearable = false,
79
- showPasswordToggle = false,
80
- loading = false,
81
- oninput,
82
- onblur,
83
- onfocus,
84
- onclear,
85
- testId,
86
- validateOnMount = false,
87
- ...restProps
88
- }: Props = $props();
89
-
90
- let inputRef = $state<HTMLInputElement | undefined>();
91
- let isFocused = $state(false);
92
- let hasInteracted = $state(false);
93
- let passwordVisible = $state(false);
94
-
95
- const shouldValidate = $derived(hasInteracted || validateOnMount);
96
- const showError = $derived(shouldValidate && !!error);
97
- const showSuccess = $derived(shouldValidate && !error && !!value && !!successMessage);
98
- const effectiveType = $derived(type === 'password' && passwordVisible ? 'text' : type);
99
- const errorId = $derived(`${id}-error`);
100
- const hintId = $derived(`${id}-hint`);
101
- const hasRightContent = $derived(
102
- loading ||
103
- showError ||
104
- showSuccess ||
105
- (clearable && value && !disabled && !readonly) ||
106
- (showPasswordToggle && type === 'password') ||
8
+ import type { Snippet } from 'svelte';
9
+ import type { HTMLInputAttributes } from 'svelte/elements';
10
+ import { cn } from '../../utils/cn.js';
11
+
12
+ type InputSize = 'sm' | 'md' | 'lg';
13
+ type InputMode = 'none' | 'text' | 'search' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal';
14
+
15
+ interface Props extends Omit<HTMLInputAttributes, 'class' | 'size' | 'inputmode' | 'autocomplete'> {
16
+ id?: string;
17
+ name?: string;
18
+ type?: 'text' | 'email' | 'password' | 'tel' | 'url' | 'search' | 'number';
19
+ label: string;
20
+ value?: string;
21
+ placeholder?: string;
22
+ required?: boolean;
23
+ disabled?: boolean;
24
+ readonly?: boolean;
25
+ error?: string;
26
+ hint?: string;
27
+ successMessage?: string;
28
+ maxLength?: number;
29
+ minLength?: number;
30
+ showCharCount?: boolean;
31
+ pattern?: string;
32
+ inputMode?: InputMode;
33
+ autocomplete?: string;
34
+ size?: InputSize;
35
+ iconLeft?: Snippet;
36
+ iconRight?: Snippet;
37
+ hideLabel?: boolean;
38
+ class?: string;
39
+ prefix?: string;
40
+ suffix?: string;
41
+ clearable?: boolean;
42
+ showPasswordToggle?: boolean;
43
+ loading?: boolean;
44
+ oninput?: (event: Event) => void;
45
+ onblur?: (event: FocusEvent) => void;
46
+ onfocus?: (event: FocusEvent) => void;
47
+ onclear?: () => void;
48
+ testId?: string;
49
+ validateOnMount?: boolean;
50
+ }
51
+
52
+ let {
53
+ id = `input-${Math.random().toString(36).slice(2, 9)}`,
54
+ name,
55
+ type = 'text',
56
+ label,
57
+ value = $bindable(''),
58
+ placeholder = '',
59
+ required = false,
60
+ disabled = false,
61
+ readonly = false,
62
+ error = '',
63
+ hint = '',
64
+ successMessage = '',
65
+ maxLength,
66
+ minLength,
67
+ showCharCount = false,
68
+ pattern,
69
+ inputMode = 'text',
70
+ autocomplete = 'off',
71
+ size = 'md',
72
+ iconLeft,
73
+ iconRight,
74
+ hideLabel = false,
75
+ class: className = '',
76
+ prefix,
77
+ suffix,
78
+ clearable = false,
79
+ showPasswordToggle = false,
80
+ loading = false,
81
+ oninput,
82
+ onblur,
83
+ onfocus,
84
+ onclear,
85
+ testId,
86
+ validateOnMount = false,
87
+ ...restProps
88
+ }: Props = $props();
89
+
90
+ let inputRef = $state<HTMLInputElement | undefined>();
91
+ let isFocused = $state(false);
92
+ let hasInteracted = $state(false);
93
+ let passwordVisible = $state(false);
94
+
95
+ const shouldValidate = $derived(hasInteracted || validateOnMount);
96
+ const showError = $derived(shouldValidate && !!error);
97
+ const showSuccess = $derived(shouldValidate && !error && !!value && !!successMessage);
98
+ const effectiveType = $derived(type === 'password' && passwordVisible ? 'text' : type);
99
+ const errorId = $derived(`${id}-error`);
100
+ const hintId = $derived(`${id}-hint`);
101
+ const hasRightContent = $derived(
102
+ loading ||
103
+ showError ||
104
+ showSuccess ||
105
+ (clearable && value && !disabled && !readonly) ||
106
+ (showPasswordToggle && type === 'password') ||
107
107
  !!iconRight
108
- );
109
- const ariaDescribedBy = $derived(
110
- [error && errorId, hint && hintId].filter(Boolean).join(' ') || undefined
111
- );
112
-
113
- function handleInput(e: Event) {
114
- const target = e.target as HTMLInputElement;
115
- value = target.value;
116
- oninput?.(e);
117
- }
118
-
119
- function handleBlur(e: FocusEvent) {
120
- isFocused = false;
121
- hasInteracted = true;
122
- onblur?.(e);
123
- }
124
-
125
- function handleFocus(e: FocusEvent) {
126
- isFocused = true;
127
- onfocus?.(e);
128
- }
129
-
130
- function handleClear() {
131
- value = '';
132
- if (inputRef) {
133
- inputRef.value = '';
134
- inputRef.focus();
135
- }
136
- onclear?.();
137
- }
138
-
139
- function togglePassword() {
140
- passwordVisible = !passwordVisible;
141
- inputRef?.focus();
142
- }
143
-
144
- function handleKeyDown(e: KeyboardEvent) {
145
- if (e.key === 'Escape' && clearable && value && !disabled && !readonly) {
146
- e.preventDefault();
147
- handleClear();
148
- }
149
- }
108
+ );
109
+ const ariaDescribedBy = $derived(
110
+ [error && errorId, hint && hintId].filter(Boolean).join(' ') || undefined
111
+ );
112
+
113
+ function handleInput(e: Event) {
114
+ const target = e.target as HTMLInputElement;
115
+ value = target.value;
116
+ oninput?.(e);
117
+ }
118
+
119
+ function handleBlur(e: FocusEvent) {
120
+ isFocused = false;
121
+ hasInteracted = true;
122
+ onblur?.(e);
123
+ }
124
+
125
+ function handleFocus(e: FocusEvent) {
126
+ isFocused = true;
127
+ onfocus?.(e);
128
+ }
129
+
130
+ function handleClear() {
131
+ value = '';
132
+ if (inputRef) {
133
+ inputRef.value = '';
134
+ inputRef.focus();
135
+ }
136
+ onclear?.();
137
+ }
138
+
139
+ function togglePassword() {
140
+ passwordVisible = !passwordVisible;
141
+ inputRef?.focus();
142
+ }
143
+
144
+ function handleKeyDown(e: KeyboardEvent) {
145
+ if (e.key === 'Escape' && clearable && value && !disabled && !readonly) {
146
+ e.preventDefault();
147
+ handleClear();
148
+ }
149
+ }
150
150
  </script>
151
151
 
152
152
  <div
@@ -1 +1 @@
1
- {"version":3,"file":"TextInput.svelte.d.ts","sourceRoot":"","sources":["../../../src/forms/TextInput/TextInput.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAI1D,KAAK,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AACpC,KAAK,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;AAE9F,UAAU,KAAM,SAAQ,IAAI,CAAC,mBAAmB,EAAE,OAAO,GAAG,MAAM,GAAG,WAAW,GAAG,cAAc,CAAC;IACjG,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CA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AAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IACrC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IACtC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC1B;AAuND;;;;;GAKG;AACH,QAAA,MAAM,SAAS,gDAAwC,CAAC;AACxD,KAAK,SAAS,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAC9C,eAAe,SAAS,CAAC"}
package/dist/index.d.ts CHANGED
@@ -4,5 +4,6 @@ export * from './layout/index.js';
4
4
  export * from './feedback/index.js';
5
5
  export * from './forms/index.js';
6
6
  export * from './dialogs/index.js';
7
+ export * from './windowing/index.js';
7
8
  export * from './utils/index.js';
8
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC"}
package/dist/index.js CHANGED
@@ -4,4 +4,5 @@ export * from './layout/index.js';
4
4
  export * from './feedback/index.js';
5
5
  export * from './forms/index.js';
6
6
  export * from './dialogs/index.js';
7
+ export * from './windowing/index.js';
7
8
  export * from './utils/index.js';
@@ -9,66 +9,66 @@
9
9
  <Card variant="accent" accentColor="success" header={...} footer={...} />
10
10
  -->
11
11
  <script lang="ts">
12
- import type { Snippet } from 'svelte';
13
- import { cn } from '../../utils/cn.js';
14
-
15
- type CardPadding = 'none' | 'sm' | 'md' | 'lg' | 'xl';
16
- type CardVariant = 'default' | 'elevated' | 'outlined' | 'accent';
17
- type AccentColor = 'primary' | 'success' | 'warning' | 'error' | 'info';
18
-
19
- interface Props {
20
- variant?: CardVariant;
21
- padding?: CardPadding;
22
- accentColor?: AccentColor;
23
- interactive?: boolean;
24
- asButton?: boolean;
25
- as?: 'div' | 'article' | 'section';
26
- id?: string;
27
- ariaLabelledby?: string;
28
- class?: string;
29
- header?: Snippet;
30
- footer?: Snippet;
31
- children?: Snippet;
32
- onclick?: (event: MouseEvent) => void;
33
- onkeydown?: (event: KeyboardEvent) => void;
34
- testId?: string;
35
- }
36
-
37
- let {
38
- variant = 'default',
39
- padding = 'md',
40
- accentColor = 'primary',
41
- interactive = false,
42
- asButton = false,
43
- as = 'div',
44
- id,
45
- ariaLabelledby,
46
- class: className = '',
47
- header,
48
- footer,
49
- children,
50
- onclick,
51
- onkeydown,
52
- testId
53
- }: Props = $props();
54
-
55
- const paddingValues: Record<CardPadding, string> = {
56
- none: '0',
57
- sm: 'var(--salmex-space-4)',
58
- md: 'var(--salmex-space-6)',
59
- lg: 'var(--salmex-space-8)',
60
- xl: 'var(--salmex-space-10)'
61
- };
62
-
63
- const currentPadding = $derived(paddingValues[padding]);
64
-
65
- function handleKeydown(e: KeyboardEvent) {
66
- if (e.key === 'Enter' || e.key === ' ') {
67
- e.preventDefault();
68
- (e.currentTarget as HTMLElement).click();
69
- }
70
- onkeydown?.(e);
12
+ import type { Snippet } from 'svelte';
13
+ import { cn } from '../../utils/cn.js';
14
+
15
+ type CardPadding = 'none' | 'sm' | 'md' | 'lg' | 'xl';
16
+ type CardVariant = 'default' | 'elevated' | 'outlined' | 'accent';
17
+ type AccentColor = 'primary' | 'success' | 'warning' | 'error' | 'info';
18
+
19
+ interface Props {
20
+ variant?: CardVariant;
21
+ padding?: CardPadding;
22
+ accentColor?: AccentColor;
23
+ interactive?: boolean;
24
+ asButton?: boolean;
25
+ as?: 'div' | 'article' | 'section';
26
+ id?: string;
27
+ ariaLabelledby?: string;
28
+ class?: string;
29
+ header?: Snippet;
30
+ footer?: Snippet;
31
+ children?: Snippet;
32
+ onclick?: (event: MouseEvent) => void;
33
+ onkeydown?: (event: KeyboardEvent) => void;
34
+ testId?: string;
35
+ }
36
+
37
+ let {
38
+ variant = 'default',
39
+ padding = 'md',
40
+ accentColor = 'primary',
41
+ interactive = false,
42
+ asButton = false,
43
+ as = 'div',
44
+ id,
45
+ ariaLabelledby,
46
+ class: className = '',
47
+ header,
48
+ footer,
49
+ children,
50
+ onclick,
51
+ onkeydown,
52
+ testId
53
+ }: Props = $props();
54
+
55
+ const paddingValues: Record<CardPadding, string> = {
56
+ none: '0',
57
+ sm: 'var(--salmex-space-4)',
58
+ md: 'var(--salmex-space-6)',
59
+ lg: 'var(--salmex-space-8)',
60
+ xl: 'var(--salmex-space-10)'
61
+ };
62
+
63
+ const currentPadding = $derived(paddingValues[padding]);
64
+
65
+ function handleKeydown(e: KeyboardEvent) {
66
+ if (e.key === 'Enter' || e.key === ' ') {
67
+ e.preventDefault();
68
+ (e.currentTarget as HTMLElement).click();
71
69
  }
70
+ onkeydown?.(e);
71
+ }
72
72
  </script>
73
73
 
74
74
  {#snippet cardContent()}
@@ -1 +1 @@
1
- {"version":3,"file":"Card.svelte.d.ts","sourceRoot":"","sources":["../../../src/layout/Card/Card.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAIrC,KAAK,WAAW,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AACtD,KAAK,WAAW,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,QAAQ,CAAC;AAClE,KAAK,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAExE,UAAU,KAAK;IACd,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,EAAE,CAAC,EAAE,KAAK,GAAG,SAAS,GAAG,SAAS,CAAC;IACnC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,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