@max-ts/svelte 0.1.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 (179) hide show
  1. package/README.md +161 -0
  2. package/lib/components/Accordion/Content/index.d.ts +1 -0
  3. package/lib/components/Accordion/Content/styles.css.d.ts +5 -0
  4. package/lib/components/Accordion/Item/index.d.ts +1 -0
  5. package/lib/components/Accordion/Item/styles.css.d.ts +4 -0
  6. package/lib/components/Accordion/Trigger/index.d.ts +1 -0
  7. package/lib/components/Accordion/Trigger/styles.css.d.ts +6 -0
  8. package/lib/components/Accordion/index.d.ts +7 -0
  9. package/lib/components/Button/index.d.ts +3 -0
  10. package/lib/components/Button/styles.css.d.ts +9 -0
  11. package/lib/components/Button/types.d.ts +12 -0
  12. package/lib/components/Calendar/Caption/index.d.ts +1 -0
  13. package/lib/components/Calendar/Cell/index.d.ts +1 -0
  14. package/lib/components/Calendar/Cell/styles.css.d.ts +4 -0
  15. package/lib/components/Calendar/Day/index.d.ts +1 -0
  16. package/lib/components/Calendar/Day/styles.css.d.ts +4 -0
  17. package/lib/components/Calendar/Grid/index.d.ts +1 -0
  18. package/lib/components/Calendar/Grid/styles.css.d.ts +4 -0
  19. package/lib/components/Calendar/GridBody/index.d.ts +1 -0
  20. package/lib/components/Calendar/GridHead/index.d.ts +1 -0
  21. package/lib/components/Calendar/GridRow/index.d.ts +1 -0
  22. package/lib/components/Calendar/GridRow/styles.css.d.ts +4 -0
  23. package/lib/components/Calendar/HeadCell/index.d.ts +1 -0
  24. package/lib/components/Calendar/HeadCell/styles.css.d.ts +4 -0
  25. package/lib/components/Calendar/Header/index.d.ts +1 -0
  26. package/lib/components/Calendar/Header/styles.css.d.ts +4 -0
  27. package/lib/components/Calendar/Heading/index.d.ts +1 -0
  28. package/lib/components/Calendar/Heading/styles.css.d.ts +4 -0
  29. package/lib/components/Calendar/Month/index.d.ts +1 -0
  30. package/lib/components/Calendar/MonthSelect/index.d.ts +1 -0
  31. package/lib/components/Calendar/MonthSelect/styles.css.d.ts +6 -0
  32. package/lib/components/Calendar/Months/index.d.ts +1 -0
  33. package/lib/components/Calendar/Months/styles.css.d.ts +4 -0
  34. package/lib/components/Calendar/Nav/index.d.ts +1 -0
  35. package/lib/components/Calendar/Nav/styles.css.d.ts +4 -0
  36. package/lib/components/Calendar/NextButton/index.d.ts +1 -0
  37. package/lib/components/Calendar/NextButton/styles.css.d.ts +4 -0
  38. package/lib/components/Calendar/PrevButton/index.d.ts +1 -0
  39. package/lib/components/Calendar/PrevButton/styles.css.d.ts +4 -0
  40. package/lib/components/Calendar/YearSelect/index.d.ts +1 -0
  41. package/lib/components/Calendar/YearSelect/styles.css.d.ts +6 -0
  42. package/lib/components/Calendar/index.d.ts +1 -0
  43. package/lib/components/Calendar/styles.css.d.ts +6 -0
  44. package/lib/components/Checkbox/index.d.ts +2 -0
  45. package/lib/components/Checkbox/styles.css.d.ts +5 -0
  46. package/lib/components/CircularProgress/index.d.ts +3 -0
  47. package/lib/components/CircularProgress/styles.css.d.ts +9 -0
  48. package/lib/components/CircularProgress/types.d.ts +8 -0
  49. package/lib/components/DataGrid/Body/index.d.ts +3 -0
  50. package/lib/components/DataGrid/Body/styles.css.d.ts +4 -0
  51. package/lib/components/DataGrid/Body/types.d.ts +4 -0
  52. package/lib/components/DataGrid/Cell/index.d.ts +3 -0
  53. package/lib/components/DataGrid/Cell/styles.css.d.ts +5 -0
  54. package/lib/components/DataGrid/Cell/types.d.ts +7 -0
  55. package/lib/components/DataGrid/Footer/index.d.ts +2 -0
  56. package/lib/components/DataGrid/Footer/styles.css.d.ts +4 -0
  57. package/lib/components/DataGrid/Header/index.d.ts +3 -0
  58. package/lib/components/DataGrid/Header/styles.css.d.ts +4 -0
  59. package/lib/components/DataGrid/Header/types.d.ts +6 -0
  60. package/lib/components/DataGrid/HeaderCell/index.d.ts +3 -0
  61. package/lib/components/DataGrid/HeaderCell/styles.css.d.ts +4 -0
  62. package/lib/components/DataGrid/HeaderCell/types.d.ts +6 -0
  63. package/lib/components/DataGrid/Row/index.d.ts +3 -0
  64. package/lib/components/DataGrid/Row/styles.css.d.ts +5 -0
  65. package/lib/components/DataGrid/Row/types.d.ts +9 -0
  66. package/lib/components/DataGrid/State/index.d.ts +3 -0
  67. package/lib/components/DataGrid/State/styles.css.d.ts +5 -0
  68. package/lib/components/DataGrid/State/types.d.ts +10 -0
  69. package/lib/components/DataGrid/constants.d.ts +1 -0
  70. package/lib/components/DataGrid/index.d.ts +2 -0
  71. package/lib/components/DataGrid/styles.css.d.ts +9 -0
  72. package/lib/components/DataGrid/types.d.ts +45 -0
  73. package/lib/components/DataGridSortHeader/index.d.ts +2 -0
  74. package/lib/components/DataGridSortHeader/styles.css.d.ts +7 -0
  75. package/lib/components/DataGridSortHeader/types.d.ts +11 -0
  76. package/lib/components/DropdownMenu/CheckboxGroup/index.d.ts +1 -0
  77. package/lib/components/DropdownMenu/CheckboxItem/index.d.ts +1 -0
  78. package/lib/components/DropdownMenu/CheckboxItem/styles.css.d.ts +6 -0
  79. package/lib/components/DropdownMenu/Content/index.d.ts +1 -0
  80. package/lib/components/DropdownMenu/Content/styles.css.d.ts +4 -0
  81. package/lib/components/DropdownMenu/Group/index.d.ts +1 -0
  82. package/lib/components/DropdownMenu/GroupHeading/index.d.ts +1 -0
  83. package/lib/components/DropdownMenu/GroupHeading/styles.css.d.ts +4 -0
  84. package/lib/components/DropdownMenu/Item/index.d.ts +1 -0
  85. package/lib/components/DropdownMenu/Item/styles.css.d.ts +4 -0
  86. package/lib/components/DropdownMenu/Label/index.d.ts +1 -0
  87. package/lib/components/DropdownMenu/Label/styles.css.d.ts +1 -0
  88. package/lib/components/DropdownMenu/Portal/index.d.ts +1 -0
  89. package/lib/components/DropdownMenu/RadioGroup/index.d.ts +1 -0
  90. package/lib/components/DropdownMenu/RadioItem/index.d.ts +1 -0
  91. package/lib/components/DropdownMenu/RadioItem/styles.css.d.ts +6 -0
  92. package/lib/components/DropdownMenu/Separator/index.d.ts +1 -0
  93. package/lib/components/DropdownMenu/Separator/styles.css.d.ts +4 -0
  94. package/lib/components/DropdownMenu/Shortcut/index.d.ts +1 -0
  95. package/lib/components/DropdownMenu/Shortcut/styles.css.d.ts +4 -0
  96. package/lib/components/DropdownMenu/Sub/index.d.ts +1 -0
  97. package/lib/components/DropdownMenu/SubContent/index.d.ts +1 -0
  98. package/lib/components/DropdownMenu/SubContent/styles.css.d.ts +4 -0
  99. package/lib/components/DropdownMenu/SubTrigger/index.d.ts +1 -0
  100. package/lib/components/DropdownMenu/SubTrigger/styles.css.d.ts +5 -0
  101. package/lib/components/DropdownMenu/Trigger/index.d.ts +1 -0
  102. package/lib/components/DropdownMenu/index.d.ts +20 -0
  103. package/lib/components/Field/Content/index.d.ts +1 -0
  104. package/lib/components/Field/Content/styles.css.d.ts +4 -0
  105. package/lib/components/Field/Description/index.d.ts +1 -0
  106. package/lib/components/Field/Description/styles.css.d.ts +4 -0
  107. package/lib/components/Field/FieldError/index.d.ts +1 -0
  108. package/lib/components/Field/FieldError/styles.css.d.ts +4 -0
  109. package/lib/components/Field/FieldSet/index.d.ts +1 -0
  110. package/lib/components/Field/FieldSet/styles.css.d.ts +4 -0
  111. package/lib/components/Field/Group/index.d.ts +1 -0
  112. package/lib/components/Field/Group/styles.css.d.ts +4 -0
  113. package/lib/components/Field/Label/index.d.ts +1 -0
  114. package/lib/components/Field/Label/styles.css.d.ts +4 -0
  115. package/lib/components/Field/Legend/index.d.ts +1 -0
  116. package/lib/components/Field/Legend/styles.css.d.ts +4 -0
  117. package/lib/components/Field/Separator/index.d.ts +1 -0
  118. package/lib/components/Field/Separator/styles.css.d.ts +6 -0
  119. package/lib/components/Field/Title/index.d.ts +1 -0
  120. package/lib/components/Field/Title/styles.css.d.ts +4 -0
  121. package/lib/components/Field/index.d.ts +14 -0
  122. package/lib/components/Field/styles.css.d.ts +5 -0
  123. package/lib/components/Field/types.d.ts +3 -0
  124. package/lib/components/Input/index.d.ts +2 -0
  125. package/lib/components/Input/styles.css.d.ts +6 -0
  126. package/lib/components/Input/types.d.ts +12 -0
  127. package/lib/components/Label/index.d.ts +2 -0
  128. package/lib/components/Label/styles.css.d.ts +4 -0
  129. package/lib/components/Placeholder/Image/index.d.ts +3 -0
  130. package/lib/components/Placeholder/Image/styles.css.d.ts +6 -0
  131. package/lib/components/Placeholder/Image/types.d.ts +9 -0
  132. package/lib/components/Placeholder/constants.d.ts +22 -0
  133. package/lib/components/Placeholder/index.d.ts +3 -0
  134. package/lib/components/Placeholder/styles.css.d.ts +9 -0
  135. package/lib/components/Placeholder/types.d.ts +18 -0
  136. package/lib/components/Select/Content/index.d.ts +1 -0
  137. package/lib/components/Select/Content/styles.css.d.ts +5 -0
  138. package/lib/components/Select/Group/index.d.ts +1 -0
  139. package/lib/components/Select/GroupHeading/index.d.ts +1 -0
  140. package/lib/components/Select/GroupHeading/styles.css.d.ts +4 -0
  141. package/lib/components/Select/Item/index.d.ts +1 -0
  142. package/lib/components/Select/Item/styles.css.d.ts +5 -0
  143. package/lib/components/Select/Label/index.d.ts +1 -0
  144. package/lib/components/Select/Label/styles.css.d.ts +4 -0
  145. package/lib/components/Select/Portal/index.d.ts +1 -0
  146. package/lib/components/Select/ScrollDownButton/index.d.ts +1 -0
  147. package/lib/components/Select/ScrollDownButton/styles.css.d.ts +4 -0
  148. package/lib/components/Select/ScrollUpButton/index.d.ts +1 -0
  149. package/lib/components/Select/ScrollUpButton/styles.css.d.ts +5 -0
  150. package/lib/components/Select/Separator/index.d.ts +1 -0
  151. package/lib/components/Select/Separator/styles.css.d.ts +4 -0
  152. package/lib/components/Select/Trigger/index.d.ts +1 -0
  153. package/lib/components/Select/Trigger/styles.css.d.ts +5 -0
  154. package/lib/components/Select/index.d.ts +14 -0
  155. package/lib/components/Separator/index.d.ts +2 -0
  156. package/lib/components/Separator/styles.css.d.ts +4 -0
  157. package/lib/components/Separator/types.d.ts +2 -0
  158. package/lib/components/Tooltip/Content/index.d.ts +1 -0
  159. package/lib/components/Tooltip/Content/styles.css.d.ts +5 -0
  160. package/lib/components/Tooltip/Portal/index.d.ts +2 -0
  161. package/lib/components/Tooltip/Provider/index.d.ts +2 -0
  162. package/lib/components/Tooltip/Trigger/index.d.ts +1 -0
  163. package/lib/components/Tooltip/index.d.ts +2 -0
  164. package/lib/components/Tooltip/types.d.ts +11 -0
  165. package/lib/components/Typography/index.d.ts +4 -0
  166. package/lib/components/Typography/styles.css.d.ts +9 -0
  167. package/lib/components/Typography/types.d.ts +4 -0
  168. package/lib/components/index.d.ts +16 -0
  169. package/lib/index.d.ts +2 -0
  170. package/lib/index.js +1 -0
  171. package/lib/rslib-runtime.js +1 -0
  172. package/lib/styles/index.d.ts +5 -0
  173. package/lib/styles/reset.css.d.ts +1 -0
  174. package/lib/styles/theme.css.d.ts +85 -0
  175. package/lib/styles/types.d.ts +11 -0
  176. package/lib/styles/utils.d.ts +6 -0
  177. package/lib/styles.css +1 -0
  178. package/package.json +53 -0
  179. package/src/index.ts +2 -0
package/README.md ADDED
@@ -0,0 +1,161 @@
1
+ # @max-ts/svelte
2
+
3
+ Svelte UI-kit with vanilla-extract CSS-in-JS styling.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @max-ts/svelte
9
+ # or
10
+ pnpm add @max-ts/svelte
11
+ # or
12
+ yarn add @max-ts/svelte
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ ```svelte
18
+ <script>
19
+ import { Button } from '@max-ts/svelte';
20
+ import '@max-ts/svelte/styles.css';
21
+ </script>
22
+
23
+ <Button variant="default" size="md">
24
+ {#snippet children()}
25
+ Click me!
26
+ {/snippet}
27
+ </Button>
28
+ ```
29
+
30
+ ## Components
31
+
32
+ ### Button
33
+
34
+ A versatile button component with multiple variants and sizes.
35
+
36
+ #### Props
37
+
38
+ - `variant?: 'default' | 'destructive' | 'outline' | 'ghost' | 'link'` - Button style variant (default: 'default')
39
+ - `size?: 'sm' | 'md' | 'lg' | 'icon' | 'iconSm'` - Button size (default: 'md')
40
+ - `isLoading?: boolean` - Show loading spinner (default: false)
41
+ - `fullWidth?: boolean` - Make button full width (default: false)
42
+ - `disabled?: boolean` - Disable button (default: false)
43
+ - `type?: 'button' | 'submit' | 'reset'` - Button type (default: 'button')
44
+ - `class?: string` - Additional CSS classes
45
+ - `onclick?: () => void` - Click handler
46
+ - `children?: Snippet` - Button content (Svelte 5 snippet)
47
+ - `startAdornment?: Snippet` - Content before button text
48
+ - `endAdornment?: Snippet` - Content after button text
49
+
50
+ #### Examples
51
+
52
+ ```svelte
53
+ <!-- Basic usage -->
54
+ <Button>
55
+ {#snippet children()}Default Button{/snippet}
56
+ </Button>
57
+
58
+ <!-- Different variants -->
59
+ <Button variant="destructive">
60
+ {#snippet children()}Delete{/snippet}
61
+ </Button>
62
+
63
+ <Button variant="outline">
64
+ {#snippet children()}Outline{/snippet}
65
+ </Button>
66
+
67
+ <Button variant="ghost">
68
+ {#snippet children()}Ghost{/snippet}
69
+ </Button>
70
+
71
+ <Button variant="link">
72
+ {#snippet children()}Link{/snippet}
73
+ </Button>
74
+
75
+ <!-- Different sizes -->
76
+ <Button size="sm">
77
+ {#snippet children()}Small{/snippet}
78
+ </Button>
79
+
80
+ <Button size="lg">
81
+ {#snippet children()}Large{/snippet}
82
+ </Button>
83
+
84
+ <!-- Icon button -->
85
+ <Button size="icon" variant="outline">
86
+ {#snippet children()}🔍{/snippet}
87
+ </Button>
88
+
89
+ <!-- Loading state -->
90
+ <Button isLoading={true}>
91
+ {#snippet children()}Loading...{/snippet}
92
+ </Button>
93
+
94
+ <!-- With adornments -->
95
+ <Button>
96
+ {#snippet startAdornment()}📧{/snippet}
97
+ {#snippet children()}Send Email{/snippet}
98
+ </Button>
99
+
100
+ <!-- Full width -->
101
+ <Button fullWidth={true}>
102
+ {#snippet children()}Full Width{/snippet}
103
+ </Button>
104
+ ```
105
+
106
+ ## Styling
107
+
108
+ This package uses vanilla-extract for type-safe CSS-in-JS. The theme tokens are shared with `@max-ts/kit` package, ensuring consistent design across React and Svelte components.
109
+
110
+ ### Theme tokens
111
+
112
+ The package includes theme tokens for:
113
+ - Colors (primary, secondary, error, success, warning, info, text, background)
114
+ - Spacing (1-20 scale)
115
+ - Font sizes (xs, sm, base, lg, xl, 2xl, 3xl, 4xl)
116
+ - Font weights (normal, medium, semibold, bold)
117
+ - Border radius (sm, md, lg)
118
+ - Elevation (shadows 1-6)
119
+
120
+ ### Custom styling
121
+
122
+ You can override styles using CSS classes:
123
+
124
+ ```svelte
125
+ <Button class="my-custom-button">
126
+ {#snippet children()}Custom{/snippet}
127
+ </Button>
128
+
129
+ <style>
130
+ :global(.my-custom-button) {
131
+ /* Your custom styles */
132
+ }
133
+ </style>
134
+ ```
135
+
136
+ ## Development
137
+
138
+ ```bash
139
+ # Build the package
140
+ pnpm build
141
+
142
+ # Watch mode for development
143
+ pnpm dev
144
+
145
+ # Run Storybook
146
+ pnpm storybook
147
+
148
+ # Type checking
149
+ pnpm lint:types
150
+ ```
151
+
152
+ ## Architecture
153
+
154
+ - **Svelte 5**: Uses modern Svelte 5 syntax with runes and snippets
155
+ - **vanilla-extract**: Type-safe CSS-in-JS with zero runtime
156
+ - **Vite**: Fast build tool for library bundling
157
+ - **Native Svelte features**: Uses Svelte's `class:` directive instead of external class utilities
158
+
159
+ ## License
160
+
161
+ MIT
@@ -0,0 +1 @@
1
+ export { default as Content } from './Content.svelte';
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ content: string;
3
+ inner: string;
4
+ };
5
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default as Item } from './Item.svelte';
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ item: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default as Trigger } from './Trigger.svelte';
@@ -0,0 +1,6 @@
1
+ declare const _default: {
2
+ header: string;
3
+ trigger: string;
4
+ icon: string;
5
+ };
6
+ export default _default;
@@ -0,0 +1,7 @@
1
+ declare const Accordion: {
2
+ Trigger: import("svelte/legacy").LegacyComponentType;
3
+ Item: import("svelte/legacy").LegacyComponentType;
4
+ Content: import("svelte/legacy").LegacyComponentType;
5
+ Root: import("svelte/legacy").LegacyComponentType;
6
+ };
7
+ export { Accordion };
@@ -0,0 +1,3 @@
1
+ export { default as Button } from './Button.svelte';
2
+ export { buttonVariants } from './styles.css';
3
+ export type { ButtonSize, ButtonVariant } from './types';
@@ -0,0 +1,9 @@
1
+ import type { ButtonSize, ButtonVariant } from './types';
2
+ export declare const buttonVariants: Record<ButtonVariant, string>;
3
+ declare const _default: {
4
+ buttonSizes: Record<ButtonSize, string>;
5
+ buttonVariants: Record<ButtonVariant, string>;
6
+ fullWidth: string;
7
+ loading: string;
8
+ };
9
+ export default _default;
@@ -0,0 +1,12 @@
1
+ import type { HTMLButtonAttributes } from 'svelte/elements';
2
+ export type ButtonVariant = 'default' | 'destructive' | 'outline' | 'ghost' | 'link';
3
+ export type ButtonSize = 'medium' | 'small' | 'large' | 'icon' | 'iconSmall';
4
+ export type ButtonProps = HTMLButtonAttributes & {
5
+ variant?: ButtonVariant;
6
+ loading?: boolean;
7
+ fullWidth?: boolean;
8
+ size?: ButtonSize;
9
+ label?: string;
10
+ href?: string;
11
+ ref?: HTMLElement | null;
12
+ };
@@ -0,0 +1 @@
1
+ export { default as Caption } from './Caption.svelte';
@@ -0,0 +1 @@
1
+ export { default as Cell } from './Cell.svelte';
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ cell: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default as Day } from './Day.svelte';
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ day: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default as Grid } from './Grid.svelte';
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ grid: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default as GridBody } from './GridBody.svelte';
@@ -0,0 +1 @@
1
+ export { default as GridHead } from './GridHead.svelte';
@@ -0,0 +1 @@
1
+ export { default as GridRow } from './GridRow.svelte';
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ gridRow: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default as HeadCell } from './HeadCell.svelte';
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ headCell: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default as Header } from './Header.svelte';
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ header: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default as Heading } from './Heading.svelte';
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ heading: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default as Month } from './Month.svelte';
@@ -0,0 +1 @@
1
+ export { default as MonthSelect } from './MonthSelect.svelte';
@@ -0,0 +1,6 @@
1
+ declare const _default: {
2
+ wrapper: string;
3
+ select: string;
4
+ visiblePart: string;
5
+ };
6
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default as Months } from './Months.svelte';
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ months: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default as Nav } from './Nav.svelte';
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ nav: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default as NextButton } from './NextButton.svelte';
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ nextButton: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default as PrevButton } from './PrevButton.svelte';
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ prevButton: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default as YearSelect } from './YearSelect.svelte';
@@ -0,0 +1,6 @@
1
+ declare const _default: {
2
+ wrapper: string;
3
+ select: string;
4
+ visiblePart: string;
5
+ };
6
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default as Calendar } from './Calendar.svelte';
@@ -0,0 +1,6 @@
1
+ declare const _default: {
2
+ calendar: string;
3
+ gridRow: string;
4
+ gridRowHead: string;
5
+ };
6
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import Root from './Checkbox.svelte';
2
+ export { Root as Checkbox, Root, };
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ checkboxBase: string;
3
+ checkboxIndicator: string;
4
+ };
5
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import CircularProgress from './CircularProgress.svelte';
2
+ export type { CircularProgressProps } from './types';
3
+ export { CircularProgress };
@@ -0,0 +1,9 @@
1
+ export declare const colors: Record<"primary" | "secondary" | "inherit", string>;
2
+ declare const _default: {
3
+ root: string;
4
+ svg: string;
5
+ circle: string;
6
+ variants: Record<"indeterminate" | "determinate", string>;
7
+ colors: Record<"primary" | "secondary" | "inherit", string>;
8
+ };
9
+ export default _default;
@@ -0,0 +1,8 @@
1
+ export type CircularProgressProps = {
2
+ size?: number;
3
+ thickness?: number;
4
+ color?: 'primary' | 'secondary' | 'inherit';
5
+ value?: number;
6
+ variant?: 'indeterminate' | 'determinate';
7
+ class?: string;
8
+ };
@@ -0,0 +1,3 @@
1
+ import Body from './Body.svelte';
2
+ export type { BodyProps } from './types';
3
+ export { Body };
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ container: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import type { DataGridProps } from '../types';
2
+ export type BodyProps<TRow> = Pick<DataGridProps<TRow>, 'emptyState' | 'errorState' | 'isLoading' | 'isError' | 'columns' | 'rows' | 'onRowClick' | 'keyId' | 'onRetry'> & {
3
+ rowHeight: number;
4
+ };
@@ -0,0 +1,3 @@
1
+ import Cell from './Cell.svelte';
2
+ export type { CellProps } from './types';
3
+ export { Cell };
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ cell: string;
3
+ disabled: string;
4
+ };
5
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import type { DataGridColumn } from '../types';
2
+ export type CellProps<TRow> = {
3
+ row: TRow;
4
+ column: DataGridColumn<TRow>;
5
+ rowIndex: number;
6
+ height: number;
7
+ };
@@ -0,0 +1,2 @@
1
+ import Footer from './Footer.svelte';
2
+ export { Footer };
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ footer: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import Header from './Header.svelte';
2
+ export { Header };
3
+ export type { HeaderProps } from './types';
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ sticky: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import type { DataGridColumn } from '../types';
2
+ export type HeaderProps<TRow> = {
3
+ columns: DataGridColumn<TRow>[];
4
+ height: string | number;
5
+ sticky?: boolean;
6
+ };
@@ -0,0 +1,3 @@
1
+ import HeaderCell from './HeaderCell.svelte';
2
+ export type { HeaderCellProps } from './types';
3
+ export { HeaderCell };
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ cell: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import type { DataGridColumn } from '../types';
2
+ export type HeaderCellProps<T> = {
3
+ column: DataGridColumn<T>;
4
+ height?: string | number;
5
+ width?: string | number;
6
+ };
@@ -0,0 +1,3 @@
1
+ import Row from './Row.svelte';
2
+ export type { RowProps } from './types';
3
+ export { Row };
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ row: string;
3
+ selectable: string;
4
+ };
5
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import type { DataGridColumn } from '../types';
2
+ export type RowProps<TRow> = {
3
+ row: TRow;
4
+ columns: DataGridColumn<TRow>[];
5
+ rowIndex: number;
6
+ rowId: string;
7
+ rowHeight: number;
8
+ onRowClick?: (row: TRow) => void;
9
+ };
@@ -0,0 +1,3 @@
1
+ import State from './State.svelte';
2
+ export type { StateProps } from './types';
3
+ export { State };
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ container: string;
3
+ loader: string;
4
+ };
5
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import type { DataGridState } from '../types';
2
+ export type StateProps = {
3
+ isLoading?: boolean;
4
+ isEmpty?: boolean;
5
+ isError?: boolean;
6
+ columnsLength: number;
7
+ emptyState?: DataGridState;
8
+ errorState?: DataGridState;
9
+ onRetry?: () => void;
10
+ };
@@ -0,0 +1 @@
1
+ export declare const ROW_HEIGHT = 40;
@@ -0,0 +1,2 @@
1
+ export { default as DataGrid } from './DataGrid.svelte';
2
+ export type * from './types';
@@ -0,0 +1,9 @@
1
+ declare const _default: {
2
+ container: string;
3
+ table: string;
4
+ fullHeight: string;
5
+ disabled: string;
6
+ loading: string;
7
+ title: string;
8
+ };
9
+ export default _default;
@@ -0,0 +1,45 @@
1
+ import type { Snippet } from 'svelte';
2
+ export type DataGridColumn<TRow> = {
3
+ title: string;
4
+ field?: keyof TRow;
5
+ width?: number | string;
6
+ align?: 'left' | 'center' | 'right' | 'justify';
7
+ isDisabled?: boolean;
8
+ color?: string;
9
+ headerCell?: Snippet<[
10
+ Omit<DataGridColumn<TRow>, 'headerCell' | 'cell' | 'format' | 'cellClassName' | 'cellColor'>
11
+ ]>;
12
+ cell?: Snippet<[TRow, number]>;
13
+ format?: (row: TRow) => string | number | null | undefined;
14
+ cellClassName?: (row: TRow) => string;
15
+ cellColor?: (row: TRow) => string;
16
+ };
17
+ export type DataGridColumns<TRow> = DataGridColumn<TRow>[];
18
+ export type AlignVariant = 'left' | 'center' | 'right' | 'justify';
19
+ export type DataGridState = {
20
+ text: string;
21
+ imgSrc?: string;
22
+ imgAlt?: string;
23
+ actions?: Snippet;
24
+ errorList?: string[];
25
+ onRetry?: () => void;
26
+ };
27
+ export type DataGridProps<TRow> = {
28
+ rows: TRow[];
29
+ columns: DataGridColumn<TRow>[];
30
+ class?: string;
31
+ height?: string | number;
32
+ rowHeight?: number;
33
+ headerHeight?: number;
34
+ keyId: keyof TRow;
35
+ isLoading?: boolean;
36
+ isDisabled?: boolean;
37
+ isError?: boolean;
38
+ stickyHeader?: boolean;
39
+ emptyState?: DataGridState;
40
+ errorState?: DataGridState;
41
+ onRowClick?: (row: TRow) => void;
42
+ onRetry?: () => void;
43
+ title?: string;
44
+ footer?: Snippet<[]>;
45
+ };
@@ -0,0 +1,2 @@
1
+ export { default as DataGridSortHeader } from './DataGridSortHeader.svelte';
2
+ export type * from './types';
@@ -0,0 +1,7 @@
1
+ export declare const wrapper: string;
2
+ export declare const alignments: Record<"left" | "right" | "center" | "justify", string>;
3
+ declare const _default: {
4
+ wrapper: string;
5
+ alignments: Record<"left" | "right" | "center" | "justify", string>;
6
+ };
7
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import type { DataGridColumn } from '../DataGrid/types';
2
+ export type DataGridSorting<TData> = {
3
+ key: keyof TData;
4
+ order: 'asc' | 'desc';
5
+ };
6
+ export type DataGridSortHeaderProps<TData> = {
7
+ column: DataGridColumn<TData>;
8
+ sorting: DataGridSorting<TData>;
9
+ setSorting: (sorting: DataGridSorting<TData>) => void;
10
+ class?: string;
11
+ };