@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.
Files changed (180) hide show
  1. package/README.md +47 -4
  2. package/dist/atoms/avatar/index.d.mts +12 -0
  3. package/dist/atoms/avatar/index.d.ts +12 -0
  4. package/dist/atoms/avatar/index.js +99 -0
  5. package/dist/atoms/avatar/index.mjs +76 -0
  6. package/dist/atoms/badge/index.d.mts +16 -0
  7. package/dist/atoms/badge/index.d.ts +16 -0
  8. package/dist/atoms/badge/index.js +149 -0
  9. package/dist/atoms/badge/index.mjs +146 -0
  10. package/dist/atoms/button/index.d.mts +11 -0
  11. package/dist/atoms/button/index.d.ts +11 -0
  12. package/dist/atoms/button/index.js +307 -0
  13. package/dist/atoms/button/index.mjs +301 -0
  14. package/dist/atoms/checkbox/index.d.mts +6 -0
  15. package/dist/atoms/checkbox/index.d.ts +6 -0
  16. package/dist/atoms/checkbox/index.js +98 -0
  17. package/dist/atoms/checkbox/index.mjs +75 -0
  18. package/dist/atoms/input/index.d.mts +12 -0
  19. package/dist/atoms/input/index.d.ts +12 -0
  20. package/dist/atoms/input/index.js +104 -0
  21. package/dist/atoms/input/index.mjs +82 -0
  22. package/dist/atoms/label/index.d.mts +8 -0
  23. package/dist/atoms/label/index.d.ts +8 -0
  24. package/dist/atoms/label/index.js +77 -0
  25. package/dist/atoms/label/index.mjs +54 -0
  26. package/dist/atoms/radio/index.d.mts +7 -0
  27. package/dist/atoms/radio/index.d.ts +7 -0
  28. package/dist/atoms/radio/index.js +97 -0
  29. package/dist/atoms/radio/index.mjs +73 -0
  30. package/dist/atoms/switch/index.d.mts +6 -0
  31. package/dist/atoms/switch/index.d.ts +6 -0
  32. package/dist/atoms/switch/index.js +97 -0
  33. package/dist/atoms/switch/index.mjs +74 -0
  34. package/dist/atoms/tag/index.d.mts +14 -0
  35. package/dist/atoms/tag/index.d.ts +14 -0
  36. package/dist/atoms/tag/index.js +128 -0
  37. package/dist/atoms/tag/index.mjs +122 -0
  38. package/dist/atoms/textarea/index.d.mts +11 -0
  39. package/dist/atoms/textarea/index.d.ts +11 -0
  40. package/dist/atoms/textarea/index.js +125 -0
  41. package/dist/atoms/textarea/index.mjs +103 -0
  42. package/dist/atoms/typography/index.d.mts +20 -0
  43. package/dist/atoms/typography/index.d.ts +20 -0
  44. package/dist/atoms/typography/index.js +140 -0
  45. package/dist/atoms/typography/index.mjs +115 -0
  46. package/dist/hooks/index.d.mts +1 -0
  47. package/dist/hooks/index.d.ts +1 -0
  48. package/dist/hooks/index.js +17 -0
  49. package/dist/hooks/index.mjs +15 -0
  50. package/dist/hooks/use-pagination.d.mts +10 -0
  51. package/dist/hooks/use-pagination.d.ts +10 -0
  52. package/dist/hooks/use-pagination.js +54 -0
  53. package/dist/hooks/use-pagination.mjs +51 -0
  54. package/dist/hooks/use-toast.d.mts +2 -0
  55. package/dist/hooks/use-toast.d.ts +2 -0
  56. package/dist/hooks/use-toast.js +2 -0
  57. package/dist/hooks/use-toast.mjs +1 -0
  58. package/dist/hooks/useModal.d.mts +7 -0
  59. package/dist/hooks/useModal.d.ts +7 -0
  60. package/dist/hooks/useModal.js +17 -0
  61. package/dist/hooks/useModal.mjs +15 -0
  62. package/dist/index.d.mts +50 -1298
  63. package/dist/index.d.ts +50 -1298
  64. package/dist/molecules/accordion/index.d.mts +17 -0
  65. package/dist/molecules/accordion/index.d.ts +17 -0
  66. package/dist/molecules/accordion/index.js +154 -0
  67. package/dist/molecules/accordion/index.mjs +128 -0
  68. package/dist/molecules/alert/index.d.mts +14 -0
  69. package/dist/molecules/alert/index.d.ts +14 -0
  70. package/dist/molecules/alert/index.js +425 -0
  71. package/dist/molecules/alert/index.mjs +402 -0
  72. package/dist/molecules/card/index.d.mts +10 -0
  73. package/dist/molecules/card/index.d.ts +10 -0
  74. package/dist/molecules/card/index.js +128 -0
  75. package/dist/molecules/card/index.mjs +101 -0
  76. package/dist/molecules/chart/index.d.mts +80 -0
  77. package/dist/molecules/chart/index.d.ts +80 -0
  78. package/dist/molecules/chart/index.js +300 -0
  79. package/dist/molecules/chart/index.mjs +272 -0
  80. package/dist/molecules/data-table/index.d.mts +57 -0
  81. package/dist/molecules/data-table/index.d.ts +57 -0
  82. package/dist/molecules/data-table/index.js +1456 -0
  83. package/dist/molecules/data-table/index.mjs +1430 -0
  84. package/dist/molecules/date-picker/index.d.mts +12 -0
  85. package/dist/molecules/date-picker/index.d.ts +12 -0
  86. package/dist/molecules/date-picker/index.js +756 -0
  87. package/dist/molecules/date-picker/index.mjs +734 -0
  88. package/dist/molecules/dropdown/index.d.mts +21 -0
  89. package/dist/molecules/dropdown/index.d.ts +21 -0
  90. package/dist/molecules/dropdown/index.js +221 -0
  91. package/dist/molecules/dropdown/index.mjs +198 -0
  92. package/dist/molecules/form/index.d.mts +19 -0
  93. package/dist/molecules/form/index.d.ts +19 -0
  94. package/dist/molecules/form/index.js +139 -0
  95. package/dist/molecules/form/index.mjs +114 -0
  96. package/dist/molecules/pagination/index.d.mts +15 -0
  97. package/dist/molecules/pagination/index.d.ts +15 -0
  98. package/dist/molecules/pagination/index.js +605 -0
  99. package/dist/molecules/pagination/index.mjs +583 -0
  100. package/dist/molecules/progress-bar/index.d.mts +15 -0
  101. package/dist/molecules/progress-bar/index.d.ts +15 -0
  102. package/dist/molecules/progress-bar/index.js +166 -0
  103. package/dist/molecules/progress-bar/index.mjs +144 -0
  104. package/dist/molecules/select/index.d.mts +15 -0
  105. package/dist/molecules/select/index.d.ts +15 -0
  106. package/dist/molecules/select/index.js +201 -0
  107. package/dist/molecules/select/index.mjs +169 -0
  108. package/dist/molecules/stepper/index.d.mts +67 -0
  109. package/dist/molecules/stepper/index.d.ts +67 -0
  110. package/dist/molecules/stepper/index.js +287 -0
  111. package/dist/molecules/stepper/index.mjs +260 -0
  112. package/dist/molecules/tabs/index.d.mts +9 -0
  113. package/dist/molecules/tabs/index.d.ts +9 -0
  114. package/dist/molecules/tabs/index.js +112 -0
  115. package/dist/molecules/tabs/index.mjs +86 -0
  116. package/dist/tokens/badge.d.mts +39 -0
  117. package/dist/tokens/badge.d.ts +39 -0
  118. package/dist/tokens/badge.js +61 -0
  119. package/dist/tokens/badge.mjs +59 -0
  120. package/dist/tokens/buttons.d.mts +277 -0
  121. package/dist/tokens/buttons.d.ts +277 -0
  122. package/dist/tokens/buttons.js +191 -0
  123. package/dist/tokens/buttons.mjs +173 -0
  124. package/dist/tokens/colors.d.mts +65 -0
  125. package/dist/tokens/colors.d.ts +65 -0
  126. package/dist/tokens/colors.js +68 -0
  127. package/dist/tokens/colors.mjs +66 -0
  128. package/dist/tokens/effects.d.mts +124 -0
  129. package/dist/tokens/effects.d.ts +124 -0
  130. package/dist/tokens/effects.js +130 -0
  131. package/dist/tokens/effects.mjs +115 -0
  132. package/dist/tokens/grids.d.mts +331 -0
  133. package/dist/tokens/grids.d.ts +331 -0
  134. package/dist/tokens/grids.js +305 -0
  135. package/dist/tokens/grids.mjs +292 -0
  136. package/dist/tokens/icons.d.mts +134 -0
  137. package/dist/tokens/icons.d.ts +134 -0
  138. package/dist/tokens/icons.js +108 -0
  139. package/dist/tokens/icons.mjs +97 -0
  140. package/dist/tokens/index.d.mts +6 -0
  141. package/dist/tokens/index.d.ts +6 -0
  142. package/dist/tokens/index.js +775 -0
  143. package/dist/tokens/index.mjs +743 -0
  144. package/dist/tokens/progress-bar.d.mts +31 -0
  145. package/dist/tokens/progress-bar.d.ts +31 -0
  146. package/dist/tokens/progress-bar.js +70 -0
  147. package/dist/tokens/progress-bar.mjs +68 -0
  148. package/dist/tokens/spacing.d.mts +90 -0
  149. package/dist/tokens/spacing.d.ts +90 -0
  150. package/dist/tokens/spacing.js +120 -0
  151. package/dist/tokens/spacing.mjs +109 -0
  152. package/dist/tokens/stroke.d.mts +292 -0
  153. package/dist/tokens/stroke.d.ts +292 -0
  154. package/dist/tokens/stroke.js +202 -0
  155. package/dist/tokens/stroke.mjs +186 -0
  156. package/dist/tokens/tab.d.mts +31 -0
  157. package/dist/tokens/tab.d.ts +31 -0
  158. package/dist/tokens/tab.js +48 -0
  159. package/dist/tokens/tab.mjs +46 -0
  160. package/dist/tokens/tag.d.mts +53 -0
  161. package/dist/tokens/tag.d.ts +53 -0
  162. package/dist/tokens/tag.js +80 -0
  163. package/dist/tokens/tag.mjs +78 -0
  164. package/dist/tokens/typography.d.mts +394 -0
  165. package/dist/tokens/typography.d.ts +394 -0
  166. package/dist/tokens/typography.js +302 -0
  167. package/dist/tokens/typography.mjs +292 -0
  168. package/dist/utils/classNames.d.mts +3 -0
  169. package/dist/utils/classNames.d.ts +3 -0
  170. package/dist/utils/classNames.js +8 -0
  171. package/dist/utils/classNames.mjs +6 -0
  172. package/dist/utils/cn.d.mts +5 -0
  173. package/dist/utils/cn.d.ts +5 -0
  174. package/dist/utils/cn.js +11 -0
  175. package/dist/utils/cn.mjs +9 -0
  176. package/dist/utils/index.d.mts +3 -0
  177. package/dist/utils/index.d.ts +3 -0
  178. package/dist/utils/index.js +15 -0
  179. package/dist/utils/index.mjs +12 -0
  180. package/package.json +34 -1
@@ -0,0 +1,31 @@
1
+ declare const progressBarTokens: {
2
+ colors: {
3
+ trackBackground: string;
4
+ indicatorBackground: string;
5
+ label: string;
6
+ };
7
+ height: {
8
+ sm: string;
9
+ md: string;
10
+ lg: string;
11
+ };
12
+ typography: {
13
+ sm: {
14
+ fontSize: string;
15
+ lineHeight: string;
16
+ fontWeight: number;
17
+ };
18
+ md: {
19
+ fontSize: string;
20
+ lineHeight: string;
21
+ fontWeight: number;
22
+ };
23
+ lg: {
24
+ fontSize: string;
25
+ lineHeight: string;
26
+ fontWeight: number;
27
+ };
28
+ };
29
+ };
30
+
31
+ export { progressBarTokens };
@@ -0,0 +1,31 @@
1
+ declare const progressBarTokens: {
2
+ colors: {
3
+ trackBackground: string;
4
+ indicatorBackground: string;
5
+ label: string;
6
+ };
7
+ height: {
8
+ sm: string;
9
+ md: string;
10
+ lg: string;
11
+ };
12
+ typography: {
13
+ sm: {
14
+ fontSize: string;
15
+ lineHeight: string;
16
+ fontWeight: number;
17
+ };
18
+ md: {
19
+ fontSize: string;
20
+ lineHeight: string;
21
+ fontWeight: number;
22
+ };
23
+ lg: {
24
+ fontSize: string;
25
+ lineHeight: string;
26
+ fontWeight: number;
27
+ };
28
+ };
29
+ };
30
+
31
+ export { progressBarTokens };
@@ -0,0 +1,70 @@
1
+ 'use strict';
2
+
3
+ // src/tokens/colors.ts
4
+ var colors = {
5
+ primary: {
6
+ 1200: "#222028"
7
+ },
8
+ secondary: {
9
+ 200: "#f2e4f6",
10
+ 600: "#ac50c7"}};
11
+
12
+ // src/tokens/typography.ts
13
+ var typography = {
14
+ fontWeight: {
15
+ regular: 400},
16
+ fontSize: {
17
+ // Body Scale - Text content with Regular and Semi-bold variants
18
+ body: {
19
+ // 18px - Body/L
20
+ md: "1rem",
21
+ // 16px - Body/M
22
+ sm: "0.875rem",
23
+ // 14px - Body/S
24
+ xs: "0.75rem"
25
+ // 12px - Body/XS
26
+ }},
27
+ lineHeight: {
28
+ // Body line heights (same for both bold and regular)
29
+ body: {
30
+ // 28px - Body/L & Body/Bold/L
31
+ md: "1.5rem",
32
+ // 24px - Body/M & Body/Bold/M
33
+ sm: "1.25rem",
34
+ // 20px - Body/S & Body/Bold/S
35
+ xs: "1.25rem"
36
+ // 20px - Body/XS & Body/Bold/XS
37
+ }}};
38
+
39
+ // src/tokens/progress-bar.ts
40
+ var progressBarTokens = {
41
+ colors: {
42
+ trackBackground: colors.secondary[200],
43
+ indicatorBackground: colors.secondary[600],
44
+ label: colors.primary[1200]
45
+ },
46
+ height: {
47
+ sm: "4px",
48
+ md: "8px",
49
+ lg: "12px"
50
+ },
51
+ typography: {
52
+ sm: {
53
+ fontSize: typography.fontSize.body.xs,
54
+ lineHeight: typography.lineHeight.body.xs,
55
+ fontWeight: typography.fontWeight.regular
56
+ },
57
+ md: {
58
+ fontSize: typography.fontSize.body.sm,
59
+ lineHeight: typography.lineHeight.body.sm,
60
+ fontWeight: typography.fontWeight.regular
61
+ },
62
+ lg: {
63
+ fontSize: typography.fontSize.body.md,
64
+ lineHeight: typography.lineHeight.body.md,
65
+ fontWeight: typography.fontWeight.regular
66
+ }
67
+ }
68
+ };
69
+
70
+ exports.progressBarTokens = progressBarTokens;
@@ -0,0 +1,68 @@
1
+ // src/tokens/colors.ts
2
+ var colors = {
3
+ primary: {
4
+ 1200: "#222028"
5
+ },
6
+ secondary: {
7
+ 200: "#f2e4f6",
8
+ 600: "#ac50c7"}};
9
+
10
+ // src/tokens/typography.ts
11
+ var typography = {
12
+ fontWeight: {
13
+ regular: 400},
14
+ fontSize: {
15
+ // Body Scale - Text content with Regular and Semi-bold variants
16
+ body: {
17
+ // 18px - Body/L
18
+ md: "1rem",
19
+ // 16px - Body/M
20
+ sm: "0.875rem",
21
+ // 14px - Body/S
22
+ xs: "0.75rem"
23
+ // 12px - Body/XS
24
+ }},
25
+ lineHeight: {
26
+ // Body line heights (same for both bold and regular)
27
+ body: {
28
+ // 28px - Body/L & Body/Bold/L
29
+ md: "1.5rem",
30
+ // 24px - Body/M & Body/Bold/M
31
+ sm: "1.25rem",
32
+ // 20px - Body/S & Body/Bold/S
33
+ xs: "1.25rem"
34
+ // 20px - Body/XS & Body/Bold/XS
35
+ }}};
36
+
37
+ // src/tokens/progress-bar.ts
38
+ var progressBarTokens = {
39
+ colors: {
40
+ trackBackground: colors.secondary[200],
41
+ indicatorBackground: colors.secondary[600],
42
+ label: colors.primary[1200]
43
+ },
44
+ height: {
45
+ sm: "4px",
46
+ md: "8px",
47
+ lg: "12px"
48
+ },
49
+ typography: {
50
+ sm: {
51
+ fontSize: typography.fontSize.body.xs,
52
+ lineHeight: typography.lineHeight.body.xs,
53
+ fontWeight: typography.fontWeight.regular
54
+ },
55
+ md: {
56
+ fontSize: typography.fontSize.body.sm,
57
+ lineHeight: typography.lineHeight.body.sm,
58
+ fontWeight: typography.fontWeight.regular
59
+ },
60
+ lg: {
61
+ fontSize: typography.fontSize.body.md,
62
+ lineHeight: typography.lineHeight.body.md,
63
+ fontWeight: typography.fontWeight.regular
64
+ }
65
+ }
66
+ };
67
+
68
+ export { progressBarTokens };
@@ -0,0 +1,90 @@
1
+ /**
2
+ * Raya Design System - Spacing Tokens
3
+ *
4
+ * Spacing system based on 4px base unit with mathematical progression
5
+ * for consistent spatial relationships across all components.
6
+ */
7
+ declare const spacing: {
8
+ readonly base: "0.25rem";
9
+ readonly xs: "0.25rem";
10
+ readonly s: "0.5rem";
11
+ readonly m: "1rem";
12
+ readonly l: "1.5rem";
13
+ readonly xl: "2rem";
14
+ readonly '2xl': "2.5rem";
15
+ readonly '3xl': "3rem";
16
+ readonly '4xl': "3.5rem";
17
+ };
18
+ type SpacingToken = keyof typeof spacing;
19
+ /**
20
+ * Spacing values in pixels for calculations and documentation
21
+ */
22
+ declare const spacingPx: {
23
+ readonly base: 4;
24
+ readonly xs: 4;
25
+ readonly s: 8;
26
+ readonly m: 16;
27
+ readonly l: 24;
28
+ readonly xl: 32;
29
+ readonly '2xl': 40;
30
+ readonly '3xl': 48;
31
+ readonly '4xl': 56;
32
+ };
33
+ /**
34
+ * Pre-composed spacing styles for common use cases
35
+ */
36
+ declare const spacingStyles: {
37
+ readonly buttonPadding: {
38
+ readonly small: "0.25rem 0.5rem";
39
+ readonly medium: "0.5rem 1rem";
40
+ readonly large: "1rem 1.5rem";
41
+ };
42
+ readonly cardPadding: {
43
+ readonly compact: "1rem";
44
+ readonly comfortable: "1.5rem";
45
+ readonly spacious: "2rem";
46
+ };
47
+ readonly formSpacing: {
48
+ readonly fieldGap: "1rem";
49
+ readonly labelGap: "0.25rem";
50
+ readonly helpGap: "0.25rem";
51
+ };
52
+ readonly layoutSpacing: {
53
+ readonly sectionGap: "2.5rem";
54
+ readonly componentGap: "2rem";
55
+ readonly elementGap: "1rem";
56
+ };
57
+ readonly gridGap: {
58
+ readonly tight: "0.5rem";
59
+ readonly normal: "1rem";
60
+ readonly comfortable: "1.5rem";
61
+ readonly loose: "2rem";
62
+ };
63
+ };
64
+ /**
65
+ * Utility function to get spacing value
66
+ */
67
+ declare const getSpacing: (token: SpacingToken) => string;
68
+ /**
69
+ * Utility function to get spacing value in pixels
70
+ */
71
+ declare const getSpacingPx: (token: SpacingToken) => number;
72
+ /**
73
+ * Generate CSS custom properties for spacing
74
+ */
75
+ declare const generateSpacingCSS: () => string;
76
+ /**
77
+ * Spacing tokens for Tailwind CSS configuration
78
+ */
79
+ declare const tailwindSpacing: {
80
+ readonly xs: "var(--spacing-xs)";
81
+ readonly s: "var(--spacing-s)";
82
+ readonly m: "var(--spacing-m)";
83
+ readonly l: "var(--spacing-l)";
84
+ readonly xl: "var(--spacing-xl)";
85
+ readonly '2xl': "var(--spacing-2xl)";
86
+ readonly '3xl': "var(--spacing-3xl)";
87
+ readonly '4xl': "var(--spacing-4xl)";
88
+ };
89
+
90
+ export { type SpacingToken, spacing as default, generateSpacingCSS, getSpacing, getSpacingPx, spacing, spacingPx, spacingStyles, tailwindSpacing };
@@ -0,0 +1,90 @@
1
+ /**
2
+ * Raya Design System - Spacing Tokens
3
+ *
4
+ * Spacing system based on 4px base unit with mathematical progression
5
+ * for consistent spatial relationships across all components.
6
+ */
7
+ declare const spacing: {
8
+ readonly base: "0.25rem";
9
+ readonly xs: "0.25rem";
10
+ readonly s: "0.5rem";
11
+ readonly m: "1rem";
12
+ readonly l: "1.5rem";
13
+ readonly xl: "2rem";
14
+ readonly '2xl': "2.5rem";
15
+ readonly '3xl': "3rem";
16
+ readonly '4xl': "3.5rem";
17
+ };
18
+ type SpacingToken = keyof typeof spacing;
19
+ /**
20
+ * Spacing values in pixels for calculations and documentation
21
+ */
22
+ declare const spacingPx: {
23
+ readonly base: 4;
24
+ readonly xs: 4;
25
+ readonly s: 8;
26
+ readonly m: 16;
27
+ readonly l: 24;
28
+ readonly xl: 32;
29
+ readonly '2xl': 40;
30
+ readonly '3xl': 48;
31
+ readonly '4xl': 56;
32
+ };
33
+ /**
34
+ * Pre-composed spacing styles for common use cases
35
+ */
36
+ declare const spacingStyles: {
37
+ readonly buttonPadding: {
38
+ readonly small: "0.25rem 0.5rem";
39
+ readonly medium: "0.5rem 1rem";
40
+ readonly large: "1rem 1.5rem";
41
+ };
42
+ readonly cardPadding: {
43
+ readonly compact: "1rem";
44
+ readonly comfortable: "1.5rem";
45
+ readonly spacious: "2rem";
46
+ };
47
+ readonly formSpacing: {
48
+ readonly fieldGap: "1rem";
49
+ readonly labelGap: "0.25rem";
50
+ readonly helpGap: "0.25rem";
51
+ };
52
+ readonly layoutSpacing: {
53
+ readonly sectionGap: "2.5rem";
54
+ readonly componentGap: "2rem";
55
+ readonly elementGap: "1rem";
56
+ };
57
+ readonly gridGap: {
58
+ readonly tight: "0.5rem";
59
+ readonly normal: "1rem";
60
+ readonly comfortable: "1.5rem";
61
+ readonly loose: "2rem";
62
+ };
63
+ };
64
+ /**
65
+ * Utility function to get spacing value
66
+ */
67
+ declare const getSpacing: (token: SpacingToken) => string;
68
+ /**
69
+ * Utility function to get spacing value in pixels
70
+ */
71
+ declare const getSpacingPx: (token: SpacingToken) => number;
72
+ /**
73
+ * Generate CSS custom properties for spacing
74
+ */
75
+ declare const generateSpacingCSS: () => string;
76
+ /**
77
+ * Spacing tokens for Tailwind CSS configuration
78
+ */
79
+ declare const tailwindSpacing: {
80
+ readonly xs: "var(--spacing-xs)";
81
+ readonly s: "var(--spacing-s)";
82
+ readonly m: "var(--spacing-m)";
83
+ readonly l: "var(--spacing-l)";
84
+ readonly xl: "var(--spacing-xl)";
85
+ readonly '2xl': "var(--spacing-2xl)";
86
+ readonly '3xl': "var(--spacing-3xl)";
87
+ readonly '4xl': "var(--spacing-4xl)";
88
+ };
89
+
90
+ export { type SpacingToken, spacing as default, generateSpacingCSS, getSpacing, getSpacingPx, spacing, spacingPx, spacingStyles, tailwindSpacing };
@@ -0,0 +1,120 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ // src/tokens/spacing.ts
6
+ var spacing = {
7
+ // Base unit
8
+ base: "0.25rem",
9
+ // 4px
10
+ // Spacing scale
11
+ xs: "0.25rem",
12
+ // 4px - Minimal spacing, tight layouts
13
+ s: "0.5rem",
14
+ // 8px - Small gaps, compact components
15
+ m: "1rem",
16
+ // 16px - Default spacing, standard gaps
17
+ l: "1.5rem",
18
+ // 24px - Comfortable spacing, section gaps
19
+ xl: "2rem",
20
+ // 32px - Large spacing, major sections
21
+ "2xl": "2.5rem",
22
+ // 40px - Extra large spacing, page sections
23
+ "3xl": "3rem",
24
+ // 48px - Generous spacing, hero sections
25
+ "4xl": "3.5rem"
26
+ // 56px - Maximum spacing, major layouts
27
+ };
28
+ var spacingPx = {
29
+ base: 4,
30
+ xs: 4,
31
+ s: 8,
32
+ m: 16,
33
+ l: 24,
34
+ xl: 32,
35
+ "2xl": 40,
36
+ "3xl": 48,
37
+ "4xl": 56
38
+ };
39
+ var spacingStyles = {
40
+ // Component padding
41
+ buttonPadding: {
42
+ small: `${spacing.xs} ${spacing.s}`,
43
+ // 4px 8px
44
+ medium: `${spacing.s} ${spacing.m}`,
45
+ // 8px 16px
46
+ large: `${spacing.m} ${spacing.l}`
47
+ // 16px 24px
48
+ },
49
+ // Card spacing
50
+ cardPadding: {
51
+ compact: spacing.m,
52
+ // 16px
53
+ comfortable: spacing.l,
54
+ // 24px
55
+ spacious: spacing.xl
56
+ // 32px
57
+ },
58
+ // Form spacing
59
+ formSpacing: {
60
+ fieldGap: spacing.m,
61
+ // 16px between form fields
62
+ labelGap: spacing.xs,
63
+ // 4px between label and input
64
+ helpGap: spacing.xs
65
+ // 4px between input and help text
66
+ },
67
+ // Layout spacing
68
+ layoutSpacing: {
69
+ sectionGap: spacing["2xl"],
70
+ // 40px between major sections
71
+ componentGap: spacing.xl,
72
+ // 32px between components
73
+ elementGap: spacing.m
74
+ // 16px between elements
75
+ },
76
+ // Grid spacing
77
+ gridGap: {
78
+ tight: spacing.s,
79
+ // 8px
80
+ normal: spacing.m,
81
+ // 16px
82
+ comfortable: spacing.l,
83
+ // 24px
84
+ loose: spacing.xl
85
+ // 32px
86
+ }
87
+ };
88
+ var getSpacing = (token) => {
89
+ return spacing[token];
90
+ };
91
+ var getSpacingPx = (token) => {
92
+ return spacingPx[token];
93
+ };
94
+ var generateSpacingCSS = () => {
95
+ const cssVars = Object.entries(spacing).map(([key, value]) => ` --spacing-${key}: ${value};`).join("\n");
96
+ return `:root {
97
+ /* Spacing tokens */
98
+ ${cssVars}
99
+ }`;
100
+ };
101
+ var tailwindSpacing = {
102
+ "xs": "var(--spacing-xs)",
103
+ "s": "var(--spacing-s)",
104
+ "m": "var(--spacing-m)",
105
+ "l": "var(--spacing-l)",
106
+ "xl": "var(--spacing-xl)",
107
+ "2xl": "var(--spacing-2xl)",
108
+ "3xl": "var(--spacing-3xl)",
109
+ "4xl": "var(--spacing-4xl)"
110
+ };
111
+ var spacing_default = spacing;
112
+
113
+ exports.default = spacing_default;
114
+ exports.generateSpacingCSS = generateSpacingCSS;
115
+ exports.getSpacing = getSpacing;
116
+ exports.getSpacingPx = getSpacingPx;
117
+ exports.spacing = spacing;
118
+ exports.spacingPx = spacingPx;
119
+ exports.spacingStyles = spacingStyles;
120
+ exports.tailwindSpacing = tailwindSpacing;
@@ -0,0 +1,109 @@
1
+ // src/tokens/spacing.ts
2
+ var spacing = {
3
+ // Base unit
4
+ base: "0.25rem",
5
+ // 4px
6
+ // Spacing scale
7
+ xs: "0.25rem",
8
+ // 4px - Minimal spacing, tight layouts
9
+ s: "0.5rem",
10
+ // 8px - Small gaps, compact components
11
+ m: "1rem",
12
+ // 16px - Default spacing, standard gaps
13
+ l: "1.5rem",
14
+ // 24px - Comfortable spacing, section gaps
15
+ xl: "2rem",
16
+ // 32px - Large spacing, major sections
17
+ "2xl": "2.5rem",
18
+ // 40px - Extra large spacing, page sections
19
+ "3xl": "3rem",
20
+ // 48px - Generous spacing, hero sections
21
+ "4xl": "3.5rem"
22
+ // 56px - Maximum spacing, major layouts
23
+ };
24
+ var spacingPx = {
25
+ base: 4,
26
+ xs: 4,
27
+ s: 8,
28
+ m: 16,
29
+ l: 24,
30
+ xl: 32,
31
+ "2xl": 40,
32
+ "3xl": 48,
33
+ "4xl": 56
34
+ };
35
+ var spacingStyles = {
36
+ // Component padding
37
+ buttonPadding: {
38
+ small: `${spacing.xs} ${spacing.s}`,
39
+ // 4px 8px
40
+ medium: `${spacing.s} ${spacing.m}`,
41
+ // 8px 16px
42
+ large: `${spacing.m} ${spacing.l}`
43
+ // 16px 24px
44
+ },
45
+ // Card spacing
46
+ cardPadding: {
47
+ compact: spacing.m,
48
+ // 16px
49
+ comfortable: spacing.l,
50
+ // 24px
51
+ spacious: spacing.xl
52
+ // 32px
53
+ },
54
+ // Form spacing
55
+ formSpacing: {
56
+ fieldGap: spacing.m,
57
+ // 16px between form fields
58
+ labelGap: spacing.xs,
59
+ // 4px between label and input
60
+ helpGap: spacing.xs
61
+ // 4px between input and help text
62
+ },
63
+ // Layout spacing
64
+ layoutSpacing: {
65
+ sectionGap: spacing["2xl"],
66
+ // 40px between major sections
67
+ componentGap: spacing.xl,
68
+ // 32px between components
69
+ elementGap: spacing.m
70
+ // 16px between elements
71
+ },
72
+ // Grid spacing
73
+ gridGap: {
74
+ tight: spacing.s,
75
+ // 8px
76
+ normal: spacing.m,
77
+ // 16px
78
+ comfortable: spacing.l,
79
+ // 24px
80
+ loose: spacing.xl
81
+ // 32px
82
+ }
83
+ };
84
+ var getSpacing = (token) => {
85
+ return spacing[token];
86
+ };
87
+ var getSpacingPx = (token) => {
88
+ return spacingPx[token];
89
+ };
90
+ var generateSpacingCSS = () => {
91
+ const cssVars = Object.entries(spacing).map(([key, value]) => ` --spacing-${key}: ${value};`).join("\n");
92
+ return `:root {
93
+ /* Spacing tokens */
94
+ ${cssVars}
95
+ }`;
96
+ };
97
+ var tailwindSpacing = {
98
+ "xs": "var(--spacing-xs)",
99
+ "s": "var(--spacing-s)",
100
+ "m": "var(--spacing-m)",
101
+ "l": "var(--spacing-l)",
102
+ "xl": "var(--spacing-xl)",
103
+ "2xl": "var(--spacing-2xl)",
104
+ "3xl": "var(--spacing-3xl)",
105
+ "4xl": "var(--spacing-4xl)"
106
+ };
107
+ var spacing_default = spacing;
108
+
109
+ export { spacing_default as default, generateSpacingCSS, getSpacing, getSpacingPx, spacing, spacingPx, spacingStyles, tailwindSpacing };