@grupor5/raya 0.2.1 → 0.2.2
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.
- package/README.md +47 -4
- package/dist/atoms/avatar/index.d.mts +12 -0
- package/dist/atoms/avatar/index.d.ts +12 -0
- package/dist/atoms/avatar/index.js +99 -0
- package/dist/atoms/avatar/index.mjs +76 -0
- package/dist/atoms/badge/index.d.mts +16 -0
- package/dist/atoms/badge/index.d.ts +16 -0
- package/dist/atoms/badge/index.js +149 -0
- package/dist/atoms/badge/index.mjs +146 -0
- package/dist/atoms/button/index.d.mts +11 -0
- package/dist/atoms/button/index.d.ts +11 -0
- package/dist/atoms/button/index.js +307 -0
- package/dist/atoms/button/index.mjs +301 -0
- package/dist/atoms/checkbox/index.d.mts +6 -0
- package/dist/atoms/checkbox/index.d.ts +6 -0
- package/dist/atoms/checkbox/index.js +98 -0
- package/dist/atoms/checkbox/index.mjs +75 -0
- package/dist/atoms/input/index.d.mts +12 -0
- package/dist/atoms/input/index.d.ts +12 -0
- package/dist/atoms/input/index.js +104 -0
- package/dist/atoms/input/index.mjs +82 -0
- package/dist/atoms/label/index.d.mts +8 -0
- package/dist/atoms/label/index.d.ts +8 -0
- package/dist/atoms/label/index.js +77 -0
- package/dist/atoms/label/index.mjs +54 -0
- package/dist/atoms/radio/index.d.mts +7 -0
- package/dist/atoms/radio/index.d.ts +7 -0
- package/dist/atoms/radio/index.js +97 -0
- package/dist/atoms/radio/index.mjs +73 -0
- package/dist/atoms/switch/index.d.mts +6 -0
- package/dist/atoms/switch/index.d.ts +6 -0
- package/dist/atoms/switch/index.js +97 -0
- package/dist/atoms/switch/index.mjs +74 -0
- package/dist/atoms/tag/index.d.mts +14 -0
- package/dist/atoms/tag/index.d.ts +14 -0
- package/dist/atoms/tag/index.js +128 -0
- package/dist/atoms/tag/index.mjs +122 -0
- package/dist/atoms/textarea/index.d.mts +11 -0
- package/dist/atoms/textarea/index.d.ts +11 -0
- package/dist/atoms/textarea/index.js +125 -0
- package/dist/atoms/textarea/index.mjs +103 -0
- package/dist/atoms/typography/index.d.mts +20 -0
- package/dist/atoms/typography/index.d.ts +20 -0
- package/dist/atoms/typography/index.js +140 -0
- package/dist/atoms/typography/index.mjs +115 -0
- package/dist/hooks/index.d.mts +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +17 -0
- package/dist/hooks/index.mjs +15 -0
- package/dist/hooks/use-pagination.d.mts +10 -0
- package/dist/hooks/use-pagination.d.ts +10 -0
- package/dist/hooks/use-pagination.js +54 -0
- package/dist/hooks/use-pagination.mjs +51 -0
- package/dist/hooks/use-toast.d.mts +2 -0
- package/dist/hooks/use-toast.d.ts +2 -0
- package/dist/hooks/use-toast.js +2 -0
- package/dist/hooks/use-toast.mjs +1 -0
- package/dist/hooks/useModal.d.mts +7 -0
- package/dist/hooks/useModal.d.ts +7 -0
- package/dist/hooks/useModal.js +17 -0
- package/dist/hooks/useModal.mjs +15 -0
- package/dist/index.d.mts +50 -1298
- package/dist/index.d.ts +50 -1298
- package/dist/molecules/accordion/index.d.mts +17 -0
- package/dist/molecules/accordion/index.d.ts +17 -0
- package/dist/molecules/accordion/index.js +154 -0
- package/dist/molecules/accordion/index.mjs +128 -0
- package/dist/molecules/alert/index.d.mts +14 -0
- package/dist/molecules/alert/index.d.ts +14 -0
- package/dist/molecules/alert/index.js +425 -0
- package/dist/molecules/alert/index.mjs +402 -0
- package/dist/molecules/card/index.d.mts +10 -0
- package/dist/molecules/card/index.d.ts +10 -0
- package/dist/molecules/card/index.js +128 -0
- package/dist/molecules/card/index.mjs +101 -0
- package/dist/molecules/chart/index.d.mts +80 -0
- package/dist/molecules/chart/index.d.ts +80 -0
- package/dist/molecules/chart/index.js +300 -0
- package/dist/molecules/chart/index.mjs +272 -0
- package/dist/molecules/data-table/index.d.mts +57 -0
- package/dist/molecules/data-table/index.d.ts +57 -0
- package/dist/molecules/data-table/index.js +1456 -0
- package/dist/molecules/data-table/index.mjs +1430 -0
- package/dist/molecules/date-picker/index.d.mts +12 -0
- package/dist/molecules/date-picker/index.d.ts +12 -0
- package/dist/molecules/date-picker/index.js +756 -0
- package/dist/molecules/date-picker/index.mjs +734 -0
- package/dist/molecules/dropdown/index.d.mts +21 -0
- package/dist/molecules/dropdown/index.d.ts +21 -0
- package/dist/molecules/dropdown/index.js +221 -0
- package/dist/molecules/dropdown/index.mjs +198 -0
- package/dist/molecules/form/index.d.mts +19 -0
- package/dist/molecules/form/index.d.ts +19 -0
- package/dist/molecules/form/index.js +139 -0
- package/dist/molecules/form/index.mjs +114 -0
- package/dist/molecules/pagination/index.d.mts +15 -0
- package/dist/molecules/pagination/index.d.ts +15 -0
- package/dist/molecules/pagination/index.js +605 -0
- package/dist/molecules/pagination/index.mjs +583 -0
- package/dist/molecules/progress-bar/index.d.mts +15 -0
- package/dist/molecules/progress-bar/index.d.ts +15 -0
- package/dist/molecules/progress-bar/index.js +166 -0
- package/dist/molecules/progress-bar/index.mjs +144 -0
- package/dist/molecules/select/index.d.mts +15 -0
- package/dist/molecules/select/index.d.ts +15 -0
- package/dist/molecules/select/index.js +201 -0
- package/dist/molecules/select/index.mjs +169 -0
- package/dist/molecules/stepper/index.d.mts +67 -0
- package/dist/molecules/stepper/index.d.ts +67 -0
- package/dist/molecules/stepper/index.js +287 -0
- package/dist/molecules/stepper/index.mjs +260 -0
- package/dist/molecules/tabs/index.d.mts +9 -0
- package/dist/molecules/tabs/index.d.ts +9 -0
- package/dist/molecules/tabs/index.js +112 -0
- package/dist/molecules/tabs/index.mjs +86 -0
- package/dist/tokens/badge.d.mts +39 -0
- package/dist/tokens/badge.d.ts +39 -0
- package/dist/tokens/badge.js +61 -0
- package/dist/tokens/badge.mjs +59 -0
- package/dist/tokens/buttons.d.mts +277 -0
- package/dist/tokens/buttons.d.ts +277 -0
- package/dist/tokens/buttons.js +191 -0
- package/dist/tokens/buttons.mjs +173 -0
- package/dist/tokens/colors.d.mts +65 -0
- package/dist/tokens/colors.d.ts +65 -0
- package/dist/tokens/colors.js +68 -0
- package/dist/tokens/colors.mjs +66 -0
- package/dist/tokens/effects.d.mts +124 -0
- package/dist/tokens/effects.d.ts +124 -0
- package/dist/tokens/effects.js +130 -0
- package/dist/tokens/effects.mjs +115 -0
- package/dist/tokens/grids.d.mts +331 -0
- package/dist/tokens/grids.d.ts +331 -0
- package/dist/tokens/grids.js +305 -0
- package/dist/tokens/grids.mjs +292 -0
- package/dist/tokens/icons.d.mts +134 -0
- package/dist/tokens/icons.d.ts +134 -0
- package/dist/tokens/icons.js +108 -0
- package/dist/tokens/icons.mjs +97 -0
- package/dist/tokens/index.d.mts +6 -0
- package/dist/tokens/index.d.ts +6 -0
- package/dist/tokens/index.js +775 -0
- package/dist/tokens/index.mjs +743 -0
- package/dist/tokens/progress-bar.d.mts +31 -0
- package/dist/tokens/progress-bar.d.ts +31 -0
- package/dist/tokens/progress-bar.js +70 -0
- package/dist/tokens/progress-bar.mjs +68 -0
- package/dist/tokens/spacing.d.mts +90 -0
- package/dist/tokens/spacing.d.ts +90 -0
- package/dist/tokens/spacing.js +120 -0
- package/dist/tokens/spacing.mjs +109 -0
- package/dist/tokens/stroke.d.mts +292 -0
- package/dist/tokens/stroke.d.ts +292 -0
- package/dist/tokens/stroke.js +202 -0
- package/dist/tokens/stroke.mjs +186 -0
- package/dist/tokens/tab.d.mts +31 -0
- package/dist/tokens/tab.d.ts +31 -0
- package/dist/tokens/tab.js +48 -0
- package/dist/tokens/tab.mjs +46 -0
- package/dist/tokens/tag.d.mts +53 -0
- package/dist/tokens/tag.d.ts +53 -0
- package/dist/tokens/tag.js +80 -0
- package/dist/tokens/tag.mjs +78 -0
- package/dist/tokens/typography.d.mts +394 -0
- package/dist/tokens/typography.d.ts +394 -0
- package/dist/tokens/typography.js +302 -0
- package/dist/tokens/typography.mjs +292 -0
- package/dist/utils/classNames.d.mts +3 -0
- package/dist/utils/classNames.d.ts +3 -0
- package/dist/utils/classNames.js +8 -0
- package/dist/utils/classNames.mjs +6 -0
- package/dist/utils/cn.d.mts +5 -0
- package/dist/utils/cn.d.ts +5 -0
- package/dist/utils/cn.js +11 -0
- package/dist/utils/cn.mjs +9 -0
- package/dist/utils/index.d.mts +3 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.js +15 -0
- package/dist/utils/index.mjs +12 -0
- package/package.json +34 -1
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Raya Design System - Grid Tokens
|
|
3
|
+
*
|
|
4
|
+
* Grid system tokens for responsive layout design with consistent
|
|
5
|
+
* breakpoints, columns, margins, and gutters across all devices.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Breakpoint definitions
|
|
9
|
+
*/
|
|
10
|
+
declare const breakpoints: {
|
|
11
|
+
readonly mobile: "0px";
|
|
12
|
+
readonly tablet: "768px";
|
|
13
|
+
readonly desktop: "1024px";
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Grid specifications for each breakpoint
|
|
17
|
+
*/
|
|
18
|
+
declare const gridSpecs: {
|
|
19
|
+
readonly mobile: {
|
|
20
|
+
readonly columns: 4;
|
|
21
|
+
readonly margin: "16px";
|
|
22
|
+
readonly gutter: "16px";
|
|
23
|
+
readonly breakpoint: "0px";
|
|
24
|
+
readonly maxWidth: "767px";
|
|
25
|
+
};
|
|
26
|
+
readonly tablet: {
|
|
27
|
+
readonly columns: 8;
|
|
28
|
+
readonly margin: "20px";
|
|
29
|
+
readonly gutter: "20px";
|
|
30
|
+
readonly breakpoint: "768px";
|
|
31
|
+
readonly maxWidth: "1023px";
|
|
32
|
+
};
|
|
33
|
+
readonly desktop: {
|
|
34
|
+
readonly columns: 12;
|
|
35
|
+
readonly margin: "24px";
|
|
36
|
+
readonly gutter: "24px";
|
|
37
|
+
readonly breakpoint: "1024px";
|
|
38
|
+
readonly maxWidth: "none";
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Column span utilities for each breakpoint
|
|
43
|
+
*/
|
|
44
|
+
declare const columnSpans: {
|
|
45
|
+
readonly mobile: {
|
|
46
|
+
readonly 1: "25%";
|
|
47
|
+
readonly 2: "50%";
|
|
48
|
+
readonly 3: "75%";
|
|
49
|
+
readonly 4: "100%";
|
|
50
|
+
};
|
|
51
|
+
readonly tablet: {
|
|
52
|
+
readonly 1: "12.5%";
|
|
53
|
+
readonly 2: "25%";
|
|
54
|
+
readonly 3: "37.5%";
|
|
55
|
+
readonly 4: "50%";
|
|
56
|
+
readonly 5: "62.5%";
|
|
57
|
+
readonly 6: "75%";
|
|
58
|
+
readonly 7: "87.5%";
|
|
59
|
+
readonly 8: "100%";
|
|
60
|
+
};
|
|
61
|
+
readonly desktop: {
|
|
62
|
+
readonly 1: "8.333333%";
|
|
63
|
+
readonly 2: "16.666667%";
|
|
64
|
+
readonly 3: "25%";
|
|
65
|
+
readonly 4: "33.333333%";
|
|
66
|
+
readonly 5: "41.666667%";
|
|
67
|
+
readonly 6: "50%";
|
|
68
|
+
readonly 7: "58.333333%";
|
|
69
|
+
readonly 8: "66.666667%";
|
|
70
|
+
readonly 9: "75%";
|
|
71
|
+
readonly 10: "83.333333%";
|
|
72
|
+
readonly 11: "91.666667%";
|
|
73
|
+
readonly 12: "100%";
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Grid container styles
|
|
78
|
+
*/
|
|
79
|
+
declare const gridContainer: {
|
|
80
|
+
readonly display: "grid";
|
|
81
|
+
readonly width: "100%";
|
|
82
|
+
readonly boxSizing: "border-box";
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Responsive grid configurations
|
|
86
|
+
*/
|
|
87
|
+
declare const responsiveGrid: {
|
|
88
|
+
readonly mobile: {
|
|
89
|
+
readonly display: "grid";
|
|
90
|
+
readonly gridTemplateColumns: "repeat(4, 1fr)";
|
|
91
|
+
readonly gap: "16px";
|
|
92
|
+
readonly margin: "0 16px";
|
|
93
|
+
readonly boxSizing: "border-box";
|
|
94
|
+
};
|
|
95
|
+
readonly tablet: {
|
|
96
|
+
readonly display: "grid";
|
|
97
|
+
readonly gridTemplateColumns: "repeat(8, 1fr)";
|
|
98
|
+
readonly gap: "20px";
|
|
99
|
+
readonly margin: "0 20px";
|
|
100
|
+
readonly boxSizing: "border-box";
|
|
101
|
+
};
|
|
102
|
+
readonly desktop: {
|
|
103
|
+
readonly display: "grid";
|
|
104
|
+
readonly gridTemplateColumns: "repeat(12, 1fr)";
|
|
105
|
+
readonly gap: "24px";
|
|
106
|
+
readonly margin: "0 24px";
|
|
107
|
+
readonly boxSizing: "border-box";
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* Flexbox grid fallback configurations
|
|
112
|
+
*/
|
|
113
|
+
declare const flexboxGrid: {
|
|
114
|
+
readonly container: {
|
|
115
|
+
readonly display: "flex";
|
|
116
|
+
readonly flexWrap: "wrap";
|
|
117
|
+
readonly width: "100%";
|
|
118
|
+
readonly boxSizing: "border-box";
|
|
119
|
+
};
|
|
120
|
+
readonly item: {
|
|
121
|
+
readonly boxSizing: "border-box";
|
|
122
|
+
readonly flex: "0 0 auto";
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* Common layout patterns
|
|
127
|
+
*/
|
|
128
|
+
declare const layoutPatterns: {
|
|
129
|
+
readonly hero: {
|
|
130
|
+
readonly mobile: {
|
|
131
|
+
readonly gridColumn: "1 / -1";
|
|
132
|
+
};
|
|
133
|
+
readonly tablet: {
|
|
134
|
+
readonly gridColumn: "1 / -1";
|
|
135
|
+
};
|
|
136
|
+
readonly desktop: {
|
|
137
|
+
readonly gridColumn: "1 / -1";
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
readonly contentSidebar: {
|
|
141
|
+
readonly content: {
|
|
142
|
+
readonly mobile: {
|
|
143
|
+
readonly gridColumn: "1 / -1";
|
|
144
|
+
};
|
|
145
|
+
readonly tablet: {
|
|
146
|
+
readonly gridColumn: "1 / 7";
|
|
147
|
+
};
|
|
148
|
+
readonly desktop: {
|
|
149
|
+
readonly gridColumn: "1 / 9";
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
readonly sidebar: {
|
|
153
|
+
readonly mobile: {
|
|
154
|
+
readonly gridColumn: "1 / -1";
|
|
155
|
+
};
|
|
156
|
+
readonly tablet: {
|
|
157
|
+
readonly gridColumn: "7 / -1";
|
|
158
|
+
};
|
|
159
|
+
readonly desktop: {
|
|
160
|
+
readonly gridColumn: "9 / -1";
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
readonly threeColumn: {
|
|
165
|
+
readonly mobile: {
|
|
166
|
+
readonly gridColumn: "1 / -1";
|
|
167
|
+
};
|
|
168
|
+
readonly tablet: {
|
|
169
|
+
readonly first: {
|
|
170
|
+
readonly gridColumn: "span 2";
|
|
171
|
+
};
|
|
172
|
+
readonly others: {
|
|
173
|
+
readonly gridColumn: "span 3";
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
readonly desktop: {
|
|
177
|
+
readonly gridColumn: "span 4";
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
readonly twoColumn: {
|
|
181
|
+
readonly mobile: {
|
|
182
|
+
readonly gridColumn: "1 / -1";
|
|
183
|
+
};
|
|
184
|
+
readonly tablet: {
|
|
185
|
+
readonly gridColumn: "span 4";
|
|
186
|
+
};
|
|
187
|
+
readonly desktop: {
|
|
188
|
+
readonly gridColumn: "span 6";
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
readonly fourColumn: {
|
|
192
|
+
readonly mobile: {
|
|
193
|
+
readonly gridColumn: "span 2";
|
|
194
|
+
};
|
|
195
|
+
readonly tablet: {
|
|
196
|
+
readonly gridColumn: "span 2";
|
|
197
|
+
};
|
|
198
|
+
readonly desktop: {
|
|
199
|
+
readonly gridColumn: "span 3";
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
/**
|
|
204
|
+
* Grid utilities for common use cases
|
|
205
|
+
*/
|
|
206
|
+
declare const gridUtils: {
|
|
207
|
+
readonly fullWidth: {
|
|
208
|
+
readonly mobile: "col-span-4";
|
|
209
|
+
readonly tablet: "col-span-8";
|
|
210
|
+
readonly desktop: "col-span-12";
|
|
211
|
+
};
|
|
212
|
+
readonly halfWidth: {
|
|
213
|
+
readonly mobile: "col-span-2";
|
|
214
|
+
readonly tablet: "col-span-4";
|
|
215
|
+
readonly desktop: "col-span-6";
|
|
216
|
+
};
|
|
217
|
+
readonly thirdWidth: {
|
|
218
|
+
readonly mobile: "col-span-4";
|
|
219
|
+
readonly tablet: "col-span-3";
|
|
220
|
+
readonly desktop: "col-span-4";
|
|
221
|
+
};
|
|
222
|
+
readonly quarterWidth: {
|
|
223
|
+
readonly mobile: "col-span-2";
|
|
224
|
+
readonly tablet: "col-span-2";
|
|
225
|
+
readonly desktop: "col-span-3";
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
/**
|
|
229
|
+
* Grid gap utilities aligned with spacing system
|
|
230
|
+
*/
|
|
231
|
+
declare const gridGaps: {
|
|
232
|
+
readonly xs: "4px";
|
|
233
|
+
readonly s: "8px";
|
|
234
|
+
readonly m: "16px";
|
|
235
|
+
readonly l: "24px";
|
|
236
|
+
readonly xl: "32px";
|
|
237
|
+
};
|
|
238
|
+
/**
|
|
239
|
+
* Container max-widths for different layouts
|
|
240
|
+
*/
|
|
241
|
+
declare const containerSizes: {
|
|
242
|
+
readonly sm: "640px";
|
|
243
|
+
readonly md: "768px";
|
|
244
|
+
readonly lg: "1024px";
|
|
245
|
+
readonly xl: "1280px";
|
|
246
|
+
readonly '2xl': "1536px";
|
|
247
|
+
readonly full: "100%";
|
|
248
|
+
};
|
|
249
|
+
/**
|
|
250
|
+
* Grid system type definitions
|
|
251
|
+
*/
|
|
252
|
+
type Breakpoint = keyof typeof breakpoints;
|
|
253
|
+
type GridSpec = typeof gridSpecs[Breakpoint];
|
|
254
|
+
type ColumnSpan = keyof typeof columnSpans.desktop;
|
|
255
|
+
type GridGap = keyof typeof gridGaps;
|
|
256
|
+
type ContainerSize = keyof typeof containerSizes;
|
|
257
|
+
/**
|
|
258
|
+
* Pre-composed grid styles for common components
|
|
259
|
+
*/
|
|
260
|
+
declare const componentGrids: {
|
|
261
|
+
readonly cardGrid: {
|
|
262
|
+
readonly mobile: {
|
|
263
|
+
readonly display: "grid";
|
|
264
|
+
readonly gridTemplateColumns: "repeat(1, 1fr)";
|
|
265
|
+
readonly gap: "16px";
|
|
266
|
+
};
|
|
267
|
+
readonly tablet: {
|
|
268
|
+
readonly display: "grid";
|
|
269
|
+
readonly gridTemplateColumns: "repeat(2, 1fr)";
|
|
270
|
+
readonly gap: "24px";
|
|
271
|
+
};
|
|
272
|
+
readonly desktop: {
|
|
273
|
+
readonly display: "grid";
|
|
274
|
+
readonly gridTemplateColumns: "repeat(3, 1fr)";
|
|
275
|
+
readonly gap: "24px";
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
readonly dashboard: {
|
|
279
|
+
readonly mobile: {
|
|
280
|
+
readonly display: "grid";
|
|
281
|
+
readonly gridTemplateColumns: "1fr";
|
|
282
|
+
readonly gap: "16px";
|
|
283
|
+
};
|
|
284
|
+
readonly tablet: {
|
|
285
|
+
readonly display: "grid";
|
|
286
|
+
readonly gridTemplateColumns: "200px 1fr";
|
|
287
|
+
readonly gap: "24px";
|
|
288
|
+
};
|
|
289
|
+
readonly desktop: {
|
|
290
|
+
readonly display: "grid";
|
|
291
|
+
readonly gridTemplateColumns: "250px 1fr";
|
|
292
|
+
readonly gap: "32px";
|
|
293
|
+
};
|
|
294
|
+
};
|
|
295
|
+
readonly form: {
|
|
296
|
+
readonly mobile: {
|
|
297
|
+
readonly display: "grid";
|
|
298
|
+
readonly gridTemplateColumns: "1fr";
|
|
299
|
+
readonly gap: "16px";
|
|
300
|
+
};
|
|
301
|
+
readonly tablet: {
|
|
302
|
+
readonly display: "grid";
|
|
303
|
+
readonly gridTemplateColumns: "repeat(2, 1fr)";
|
|
304
|
+
readonly gap: "16px";
|
|
305
|
+
};
|
|
306
|
+
readonly desktop: {
|
|
307
|
+
readonly display: "grid";
|
|
308
|
+
readonly gridTemplateColumns: "repeat(2, 1fr)";
|
|
309
|
+
readonly gap: "24px";
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
/**
|
|
314
|
+
* Utility functions for grid calculations
|
|
315
|
+
*/
|
|
316
|
+
declare const gridCalculations: {
|
|
317
|
+
/**
|
|
318
|
+
* Calculate column width based on container width
|
|
319
|
+
*/
|
|
320
|
+
readonly calculateColumnWidth: (containerWidth: number, columns: number, margin: number, gutter: number) => number;
|
|
321
|
+
/**
|
|
322
|
+
* Get responsive column span classes
|
|
323
|
+
*/
|
|
324
|
+
readonly getResponsiveSpan: (mobile: number, tablet: number, desktop: number) => string;
|
|
325
|
+
/**
|
|
326
|
+
* Generate grid template columns string
|
|
327
|
+
*/
|
|
328
|
+
readonly generateGridColumns: (columns: number) => string;
|
|
329
|
+
};
|
|
330
|
+
|
|
331
|
+
export { type Breakpoint, type ColumnSpan, type ContainerSize, type GridGap, type GridSpec, breakpoints, columnSpans, componentGrids, containerSizes, flexboxGrid, gridCalculations, gridContainer, gridGaps, gridSpecs, gridUtils, layoutPatterns, responsiveGrid };
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Raya Design System - Grid Tokens
|
|
3
|
+
*
|
|
4
|
+
* Grid system tokens for responsive layout design with consistent
|
|
5
|
+
* breakpoints, columns, margins, and gutters across all devices.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Breakpoint definitions
|
|
9
|
+
*/
|
|
10
|
+
declare const breakpoints: {
|
|
11
|
+
readonly mobile: "0px";
|
|
12
|
+
readonly tablet: "768px";
|
|
13
|
+
readonly desktop: "1024px";
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Grid specifications for each breakpoint
|
|
17
|
+
*/
|
|
18
|
+
declare const gridSpecs: {
|
|
19
|
+
readonly mobile: {
|
|
20
|
+
readonly columns: 4;
|
|
21
|
+
readonly margin: "16px";
|
|
22
|
+
readonly gutter: "16px";
|
|
23
|
+
readonly breakpoint: "0px";
|
|
24
|
+
readonly maxWidth: "767px";
|
|
25
|
+
};
|
|
26
|
+
readonly tablet: {
|
|
27
|
+
readonly columns: 8;
|
|
28
|
+
readonly margin: "20px";
|
|
29
|
+
readonly gutter: "20px";
|
|
30
|
+
readonly breakpoint: "768px";
|
|
31
|
+
readonly maxWidth: "1023px";
|
|
32
|
+
};
|
|
33
|
+
readonly desktop: {
|
|
34
|
+
readonly columns: 12;
|
|
35
|
+
readonly margin: "24px";
|
|
36
|
+
readonly gutter: "24px";
|
|
37
|
+
readonly breakpoint: "1024px";
|
|
38
|
+
readonly maxWidth: "none";
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Column span utilities for each breakpoint
|
|
43
|
+
*/
|
|
44
|
+
declare const columnSpans: {
|
|
45
|
+
readonly mobile: {
|
|
46
|
+
readonly 1: "25%";
|
|
47
|
+
readonly 2: "50%";
|
|
48
|
+
readonly 3: "75%";
|
|
49
|
+
readonly 4: "100%";
|
|
50
|
+
};
|
|
51
|
+
readonly tablet: {
|
|
52
|
+
readonly 1: "12.5%";
|
|
53
|
+
readonly 2: "25%";
|
|
54
|
+
readonly 3: "37.5%";
|
|
55
|
+
readonly 4: "50%";
|
|
56
|
+
readonly 5: "62.5%";
|
|
57
|
+
readonly 6: "75%";
|
|
58
|
+
readonly 7: "87.5%";
|
|
59
|
+
readonly 8: "100%";
|
|
60
|
+
};
|
|
61
|
+
readonly desktop: {
|
|
62
|
+
readonly 1: "8.333333%";
|
|
63
|
+
readonly 2: "16.666667%";
|
|
64
|
+
readonly 3: "25%";
|
|
65
|
+
readonly 4: "33.333333%";
|
|
66
|
+
readonly 5: "41.666667%";
|
|
67
|
+
readonly 6: "50%";
|
|
68
|
+
readonly 7: "58.333333%";
|
|
69
|
+
readonly 8: "66.666667%";
|
|
70
|
+
readonly 9: "75%";
|
|
71
|
+
readonly 10: "83.333333%";
|
|
72
|
+
readonly 11: "91.666667%";
|
|
73
|
+
readonly 12: "100%";
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Grid container styles
|
|
78
|
+
*/
|
|
79
|
+
declare const gridContainer: {
|
|
80
|
+
readonly display: "grid";
|
|
81
|
+
readonly width: "100%";
|
|
82
|
+
readonly boxSizing: "border-box";
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Responsive grid configurations
|
|
86
|
+
*/
|
|
87
|
+
declare const responsiveGrid: {
|
|
88
|
+
readonly mobile: {
|
|
89
|
+
readonly display: "grid";
|
|
90
|
+
readonly gridTemplateColumns: "repeat(4, 1fr)";
|
|
91
|
+
readonly gap: "16px";
|
|
92
|
+
readonly margin: "0 16px";
|
|
93
|
+
readonly boxSizing: "border-box";
|
|
94
|
+
};
|
|
95
|
+
readonly tablet: {
|
|
96
|
+
readonly display: "grid";
|
|
97
|
+
readonly gridTemplateColumns: "repeat(8, 1fr)";
|
|
98
|
+
readonly gap: "20px";
|
|
99
|
+
readonly margin: "0 20px";
|
|
100
|
+
readonly boxSizing: "border-box";
|
|
101
|
+
};
|
|
102
|
+
readonly desktop: {
|
|
103
|
+
readonly display: "grid";
|
|
104
|
+
readonly gridTemplateColumns: "repeat(12, 1fr)";
|
|
105
|
+
readonly gap: "24px";
|
|
106
|
+
readonly margin: "0 24px";
|
|
107
|
+
readonly boxSizing: "border-box";
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* Flexbox grid fallback configurations
|
|
112
|
+
*/
|
|
113
|
+
declare const flexboxGrid: {
|
|
114
|
+
readonly container: {
|
|
115
|
+
readonly display: "flex";
|
|
116
|
+
readonly flexWrap: "wrap";
|
|
117
|
+
readonly width: "100%";
|
|
118
|
+
readonly boxSizing: "border-box";
|
|
119
|
+
};
|
|
120
|
+
readonly item: {
|
|
121
|
+
readonly boxSizing: "border-box";
|
|
122
|
+
readonly flex: "0 0 auto";
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* Common layout patterns
|
|
127
|
+
*/
|
|
128
|
+
declare const layoutPatterns: {
|
|
129
|
+
readonly hero: {
|
|
130
|
+
readonly mobile: {
|
|
131
|
+
readonly gridColumn: "1 / -1";
|
|
132
|
+
};
|
|
133
|
+
readonly tablet: {
|
|
134
|
+
readonly gridColumn: "1 / -1";
|
|
135
|
+
};
|
|
136
|
+
readonly desktop: {
|
|
137
|
+
readonly gridColumn: "1 / -1";
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
readonly contentSidebar: {
|
|
141
|
+
readonly content: {
|
|
142
|
+
readonly mobile: {
|
|
143
|
+
readonly gridColumn: "1 / -1";
|
|
144
|
+
};
|
|
145
|
+
readonly tablet: {
|
|
146
|
+
readonly gridColumn: "1 / 7";
|
|
147
|
+
};
|
|
148
|
+
readonly desktop: {
|
|
149
|
+
readonly gridColumn: "1 / 9";
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
readonly sidebar: {
|
|
153
|
+
readonly mobile: {
|
|
154
|
+
readonly gridColumn: "1 / -1";
|
|
155
|
+
};
|
|
156
|
+
readonly tablet: {
|
|
157
|
+
readonly gridColumn: "7 / -1";
|
|
158
|
+
};
|
|
159
|
+
readonly desktop: {
|
|
160
|
+
readonly gridColumn: "9 / -1";
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
readonly threeColumn: {
|
|
165
|
+
readonly mobile: {
|
|
166
|
+
readonly gridColumn: "1 / -1";
|
|
167
|
+
};
|
|
168
|
+
readonly tablet: {
|
|
169
|
+
readonly first: {
|
|
170
|
+
readonly gridColumn: "span 2";
|
|
171
|
+
};
|
|
172
|
+
readonly others: {
|
|
173
|
+
readonly gridColumn: "span 3";
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
readonly desktop: {
|
|
177
|
+
readonly gridColumn: "span 4";
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
readonly twoColumn: {
|
|
181
|
+
readonly mobile: {
|
|
182
|
+
readonly gridColumn: "1 / -1";
|
|
183
|
+
};
|
|
184
|
+
readonly tablet: {
|
|
185
|
+
readonly gridColumn: "span 4";
|
|
186
|
+
};
|
|
187
|
+
readonly desktop: {
|
|
188
|
+
readonly gridColumn: "span 6";
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
readonly fourColumn: {
|
|
192
|
+
readonly mobile: {
|
|
193
|
+
readonly gridColumn: "span 2";
|
|
194
|
+
};
|
|
195
|
+
readonly tablet: {
|
|
196
|
+
readonly gridColumn: "span 2";
|
|
197
|
+
};
|
|
198
|
+
readonly desktop: {
|
|
199
|
+
readonly gridColumn: "span 3";
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
/**
|
|
204
|
+
* Grid utilities for common use cases
|
|
205
|
+
*/
|
|
206
|
+
declare const gridUtils: {
|
|
207
|
+
readonly fullWidth: {
|
|
208
|
+
readonly mobile: "col-span-4";
|
|
209
|
+
readonly tablet: "col-span-8";
|
|
210
|
+
readonly desktop: "col-span-12";
|
|
211
|
+
};
|
|
212
|
+
readonly halfWidth: {
|
|
213
|
+
readonly mobile: "col-span-2";
|
|
214
|
+
readonly tablet: "col-span-4";
|
|
215
|
+
readonly desktop: "col-span-6";
|
|
216
|
+
};
|
|
217
|
+
readonly thirdWidth: {
|
|
218
|
+
readonly mobile: "col-span-4";
|
|
219
|
+
readonly tablet: "col-span-3";
|
|
220
|
+
readonly desktop: "col-span-4";
|
|
221
|
+
};
|
|
222
|
+
readonly quarterWidth: {
|
|
223
|
+
readonly mobile: "col-span-2";
|
|
224
|
+
readonly tablet: "col-span-2";
|
|
225
|
+
readonly desktop: "col-span-3";
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
/**
|
|
229
|
+
* Grid gap utilities aligned with spacing system
|
|
230
|
+
*/
|
|
231
|
+
declare const gridGaps: {
|
|
232
|
+
readonly xs: "4px";
|
|
233
|
+
readonly s: "8px";
|
|
234
|
+
readonly m: "16px";
|
|
235
|
+
readonly l: "24px";
|
|
236
|
+
readonly xl: "32px";
|
|
237
|
+
};
|
|
238
|
+
/**
|
|
239
|
+
* Container max-widths for different layouts
|
|
240
|
+
*/
|
|
241
|
+
declare const containerSizes: {
|
|
242
|
+
readonly sm: "640px";
|
|
243
|
+
readonly md: "768px";
|
|
244
|
+
readonly lg: "1024px";
|
|
245
|
+
readonly xl: "1280px";
|
|
246
|
+
readonly '2xl': "1536px";
|
|
247
|
+
readonly full: "100%";
|
|
248
|
+
};
|
|
249
|
+
/**
|
|
250
|
+
* Grid system type definitions
|
|
251
|
+
*/
|
|
252
|
+
type Breakpoint = keyof typeof breakpoints;
|
|
253
|
+
type GridSpec = typeof gridSpecs[Breakpoint];
|
|
254
|
+
type ColumnSpan = keyof typeof columnSpans.desktop;
|
|
255
|
+
type GridGap = keyof typeof gridGaps;
|
|
256
|
+
type ContainerSize = keyof typeof containerSizes;
|
|
257
|
+
/**
|
|
258
|
+
* Pre-composed grid styles for common components
|
|
259
|
+
*/
|
|
260
|
+
declare const componentGrids: {
|
|
261
|
+
readonly cardGrid: {
|
|
262
|
+
readonly mobile: {
|
|
263
|
+
readonly display: "grid";
|
|
264
|
+
readonly gridTemplateColumns: "repeat(1, 1fr)";
|
|
265
|
+
readonly gap: "16px";
|
|
266
|
+
};
|
|
267
|
+
readonly tablet: {
|
|
268
|
+
readonly display: "grid";
|
|
269
|
+
readonly gridTemplateColumns: "repeat(2, 1fr)";
|
|
270
|
+
readonly gap: "24px";
|
|
271
|
+
};
|
|
272
|
+
readonly desktop: {
|
|
273
|
+
readonly display: "grid";
|
|
274
|
+
readonly gridTemplateColumns: "repeat(3, 1fr)";
|
|
275
|
+
readonly gap: "24px";
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
readonly dashboard: {
|
|
279
|
+
readonly mobile: {
|
|
280
|
+
readonly display: "grid";
|
|
281
|
+
readonly gridTemplateColumns: "1fr";
|
|
282
|
+
readonly gap: "16px";
|
|
283
|
+
};
|
|
284
|
+
readonly tablet: {
|
|
285
|
+
readonly display: "grid";
|
|
286
|
+
readonly gridTemplateColumns: "200px 1fr";
|
|
287
|
+
readonly gap: "24px";
|
|
288
|
+
};
|
|
289
|
+
readonly desktop: {
|
|
290
|
+
readonly display: "grid";
|
|
291
|
+
readonly gridTemplateColumns: "250px 1fr";
|
|
292
|
+
readonly gap: "32px";
|
|
293
|
+
};
|
|
294
|
+
};
|
|
295
|
+
readonly form: {
|
|
296
|
+
readonly mobile: {
|
|
297
|
+
readonly display: "grid";
|
|
298
|
+
readonly gridTemplateColumns: "1fr";
|
|
299
|
+
readonly gap: "16px";
|
|
300
|
+
};
|
|
301
|
+
readonly tablet: {
|
|
302
|
+
readonly display: "grid";
|
|
303
|
+
readonly gridTemplateColumns: "repeat(2, 1fr)";
|
|
304
|
+
readonly gap: "16px";
|
|
305
|
+
};
|
|
306
|
+
readonly desktop: {
|
|
307
|
+
readonly display: "grid";
|
|
308
|
+
readonly gridTemplateColumns: "repeat(2, 1fr)";
|
|
309
|
+
readonly gap: "24px";
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
/**
|
|
314
|
+
* Utility functions for grid calculations
|
|
315
|
+
*/
|
|
316
|
+
declare const gridCalculations: {
|
|
317
|
+
/**
|
|
318
|
+
* Calculate column width based on container width
|
|
319
|
+
*/
|
|
320
|
+
readonly calculateColumnWidth: (containerWidth: number, columns: number, margin: number, gutter: number) => number;
|
|
321
|
+
/**
|
|
322
|
+
* Get responsive column span classes
|
|
323
|
+
*/
|
|
324
|
+
readonly getResponsiveSpan: (mobile: number, tablet: number, desktop: number) => string;
|
|
325
|
+
/**
|
|
326
|
+
* Generate grid template columns string
|
|
327
|
+
*/
|
|
328
|
+
readonly generateGridColumns: (columns: number) => string;
|
|
329
|
+
};
|
|
330
|
+
|
|
331
|
+
export { type Breakpoint, type ColumnSpan, type ContainerSize, type GridGap, type GridSpec, breakpoints, columnSpans, componentGrids, containerSizes, flexboxGrid, gridCalculations, gridContainer, gridGaps, gridSpecs, gridUtils, layoutPatterns, responsiveGrid };
|