@gobolt/genesis 0.3.22 → 0.3.23
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/dist/components/Badge/Badge.js +32 -9
- package/dist/components/Badge/styles.d.ts +10 -1
- package/dist/components/Badge/styles.js +14 -39
- package/dist/components/Button/Button.js +27 -4
- package/dist/components/Button/IconButton.js +27 -4
- package/dist/components/Button/components/Button/Button.d.ts +16 -0
- package/dist/components/Button/components/Button/Button.js +13 -0
- package/dist/components/Button/components/Button/styles.d.ts +1 -0
- package/dist/components/Button/components/Button/styles.js +118 -0
- package/dist/components/Button/constants/index.d.ts +163 -0
- package/dist/components/Button/constants/index.js +89 -0
- package/dist/components/Button/icon-button-styles.d.ts +12 -1
- package/dist/components/Button/icon-button-styles.js +16 -69
- package/dist/components/Button/styles.d.ts +16 -1
- package/dist/components/Button/styles.js +30 -88
- package/dist/components/Input/Input.js +29 -6
- package/dist/components/Input/styles.d.ts +18 -1
- package/dist/components/Input/styles.js +42 -146
- package/dist/components/Select/Select.js +125 -101
- package/dist/components/Select/SelectTrigger.js +57 -71
- package/dist/components/Table/Table.js +27 -8
- package/dist/components/Table/TableControls/CustomPagination.js +66 -50
- package/dist/components/Table/TableControls/PaginationNumber.js +43 -27
- package/dist/components/Table/TableControls/PrimaryTableControlsRow.js +17 -16
- package/dist/components/Table/TableControls/SecondaryTableControlsRow.js +36 -14
- package/dist/components/Table/TableControls/TableControls.js +4 -3
- package/dist/components/Table/TablePagination.js +21 -4
- package/dist/components/Table/__mocks__/table-mocks.js +24 -15
- package/dist/components/Table/styles.d.ts +15 -1
- package/dist/components/Table/styles.js +13 -57
- package/dist/components/Table/useTable.js +166 -69
- package/dist/components/TableWithControls/TableWithControls.js +7 -6
- package/dist/components/TableWithControls/components/Badge/Badge.d.ts +16 -0
- package/dist/components/TableWithControls/components/Badge/Badge.js +28 -0
- package/dist/components/TableWithControls/components/Badge/index.d.ts +2 -0
- package/dist/components/TableWithControls/components/Badge/index.js +1 -0
- package/dist/components/TableWithControls/components/Badge/styles.d.ts +4 -0
- package/dist/components/TableWithControls/components/Badge/styles.js +46 -0
- package/dist/components/TableWithControls/components/Button/Button.d.ts +16 -0
- package/dist/components/TableWithControls/components/Button/Button.js +13 -0
- package/dist/components/TableWithControls/components/Button/IconButton.d.ts +8 -0
- package/dist/components/TableWithControls/components/Button/IconButton.js +9 -0
- package/dist/components/TableWithControls/components/Button/icon-button-styles.d.ts +1 -0
- package/dist/components/TableWithControls/components/Button/icon-button-styles.js +76 -0
- package/dist/components/TableWithControls/components/Button/index.d.ts +4 -0
- package/dist/components/TableWithControls/components/Button/index.js +2 -0
- package/dist/components/TableWithControls/components/Button/styles.d.ts +1 -0
- package/dist/components/TableWithControls/components/Button/styles.js +118 -0
- package/dist/components/TableWithControls/components/Input/Input.d.ts +13 -0
- package/dist/components/TableWithControls/components/Input/Input.js +34 -0
- package/dist/components/TableWithControls/components/Input/index.d.ts +2 -0
- package/dist/components/TableWithControls/components/Input/index.js +1 -0
- package/dist/components/TableWithControls/components/Input/styles.d.ts +1 -0
- package/dist/components/TableWithControls/components/Input/styles.js +180 -0
- package/dist/components/TableWithControls/components/Select/Select.d.ts +26 -0
- package/dist/components/TableWithControls/components/Select/Select.js +175 -0
- package/dist/components/TableWithControls/components/Select/SelectTrigger.d.ts +23 -0
- package/dist/components/TableWithControls/components/Select/SelectTrigger.js +103 -0
- package/dist/components/TableWithControls/components/Select/index.d.ts +2 -0
- package/dist/components/TableWithControls/components/Select/index.js +1 -0
- package/dist/components/TableWithControls/components/Table/Table.d.ts +51 -0
- package/dist/components/TableWithControls/components/Table/Table.js +14 -0
- package/dist/components/TableWithControls/components/Table/TableControls/CustomPagination.d.ts +13 -0
- package/dist/components/TableWithControls/components/Table/TableControls/CustomPagination.js +158 -0
- package/dist/components/TableWithControls/components/Table/TableControls/PaginationNumber.d.ts +7 -0
- package/dist/components/TableWithControls/components/Table/TableControls/PaginationNumber.js +30 -0
- package/dist/components/TableWithControls/components/Table/TableControls/PrimaryTableControlsRow.d.ts +18 -0
- package/dist/components/TableWithControls/components/Table/TableControls/PrimaryTableControlsRow.js +77 -0
- package/dist/components/TableWithControls/components/Table/TableControls/SecondaryTableControlsRow.d.ts +11 -0
- package/dist/components/TableWithControls/components/Table/TableControls/SecondaryTableControlsRow.js +43 -0
- package/dist/components/TableWithControls/components/Table/TableControls/TableControls.d.ts +14 -0
- package/dist/components/TableWithControls/components/Table/TableControls/TableControls.js +13 -0
- package/dist/components/TableWithControls/components/Table/TableControls/index.d.ts +2 -0
- package/dist/components/TableWithControls/components/Table/TableControls/index.js +1 -0
- package/dist/components/TableWithControls/components/Table/TablePagination.d.ts +13 -0
- package/dist/components/TableWithControls/components/Table/TablePagination.js +11 -0
- package/dist/components/TableWithControls/components/Table/__mocks__/table-mocks.d.ts +20 -0
- package/dist/components/TableWithControls/components/Table/__mocks__/table-mocks.js +301 -0
- package/dist/components/TableWithControls/components/Table/index.d.ts +6 -0
- package/dist/components/TableWithControls/components/Table/index.js +3 -0
- package/dist/components/TableWithControls/components/Table/styles.d.ts +14 -0
- package/dist/components/TableWithControls/components/Table/styles.js +64 -0
- package/dist/components/TableWithControls/components/Table/useTable.d.ts +26 -0
- package/dist/components/TableWithControls/components/Table/useTable.js +141 -0
- package/dist/components/TableWithControls/components/TableWithControls/TableWithControls.d.ts +12 -0
- package/dist/components/TableWithControls/components/TableWithControls/TableWithControls.js +20 -0
- package/dist/components/TableWithControls/components/TableWithControls/useTableWithControls.d.ts +29 -0
- package/dist/components/TableWithControls/components/TableWithControls/useTableWithControls.js +136 -0
- package/dist/components/TableWithControls/components/Tooltip/Tooltip.d.ts +7 -0
- package/dist/components/TableWithControls/components/Tooltip/Tooltip.js +8 -0
- package/dist/components/TableWithControls/components/Tooltip/index.d.ts +2 -0
- package/dist/components/TableWithControls/components/Tooltip/index.js +1 -0
- package/dist/components/TableWithControls/components/Tooltip/styles.d.ts +6 -0
- package/dist/components/TableWithControls/components/Tooltip/styles.js +26 -0
- package/dist/components/TableWithControls/components/Typography/Typography.d.ts +17 -0
- package/dist/components/TableWithControls/components/Typography/Typography.js +16 -0
- package/dist/components/TableWithControls/components/Typography/index.d.ts +2 -0
- package/dist/components/TableWithControls/components/Typography/index.js +1 -0
- package/dist/components/TableWithControls/components/Typography/styles.d.ts +3 -0
- package/dist/components/TableWithControls/components/Typography/styles.js +54 -0
- package/dist/components/TableWithControls/components/UtilityButton/UtilityButton.d.ts +5 -0
- package/dist/components/TableWithControls/components/UtilityButton/UtilityButton.js +9 -0
- package/dist/components/TableWithControls/components/UtilityButton/index.d.ts +2 -0
- package/dist/components/TableWithControls/components/UtilityButton/index.js +1 -0
- package/dist/components/TableWithControls/components/shared/DropdownChevron.d.ts +2 -0
- package/dist/components/TableWithControls/components/shared/DropdownChevron.js +7 -0
- package/dist/components/TableWithControls/constants/index.d.ts +163 -0
- package/dist/components/TableWithControls/constants/index.js +89 -0
- package/dist/components/TableWithControls/types/events.d.ts +22 -0
- package/dist/components/TableWithControls/types/events.js +1 -0
- package/dist/components/TableWithControls/useTableWithControls.js +63 -82
- package/dist/components/TableWithControls/utils/icon-util.d.ts +3 -0
- package/dist/components/TableWithControls/utils/icon-util.js +116 -0
- package/dist/components/Tooltip/Tooltip.js +2 -1
- package/dist/components/Tooltip/styles.d.ts +14 -1
- package/dist/components/Tooltip/styles.js +14 -23
- package/dist/components/Typography/Typography.js +29 -6
- package/dist/components/Typography/styles.d.ts +21 -3
- package/dist/components/Typography/styles.js +24 -41
- package/dist/components/UtilityButton/UtilityButton.js +27 -4
- package/dist/components/UtilityButton/components/Button/Button.d.ts +16 -0
- package/dist/components/UtilityButton/components/Button/Button.js +13 -0
- package/dist/components/UtilityButton/components/Button/IconButton.d.ts +8 -0
- package/dist/components/UtilityButton/components/Button/IconButton.js +9 -0
- package/dist/components/UtilityButton/components/Button/icon-button-styles.d.ts +1 -0
- package/dist/components/UtilityButton/components/Button/icon-button-styles.js +76 -0
- package/dist/components/UtilityButton/components/Button/index.d.ts +4 -0
- package/dist/components/UtilityButton/components/Button/index.js +2 -0
- package/dist/components/UtilityButton/components/Button/styles.d.ts +1 -0
- package/dist/components/UtilityButton/components/Button/styles.js +118 -0
- package/dist/components/UtilityButton/components/UtilityButton/UtilityButton.d.ts +5 -0
- package/dist/components/UtilityButton/components/UtilityButton/UtilityButton.js +9 -0
- package/dist/components/UtilityButton/constants/index.d.ts +163 -0
- package/dist/components/UtilityButton/constants/index.js +89 -0
- package/dist/components/index.d.ts +6 -6
- package/dist/components/index.js +7 -0
- package/dist/components/index.ts +6 -6
- package/dist/components/shared/DropdownChevron.js +14 -3
- package/dist/index.d.ts +9 -9
- package/dist/index.js +10 -89
- package/dist/index.ts +9 -9
- package/dist/utils/icon-util.d.ts +2 -2
- package/dist/utils/icon-util.js +19 -16
- package/package.json +1 -1
- package/dist/components/Button/Button.tsx +0 -59
- package/dist/components/Table/Table.tsx +0 -112
- package/dist/components/Table/useTable.ts +0 -194
- package/dist/components/TableWithControls/TableWithControls.tsx +0 -54
- package/dist/components/TableWithControls/useTableWithControls.tsx +0 -161
- package/dist/components/UtilityButton/UtilityButton.tsx +0 -36
- package/dist/constants/index.ts +0 -98
- package/dist/genesis-theme.types.d.ts +0 -263
- package/dist/genesis-theme.types.js +0 -6
- package/dist/styled.d.ts +0 -1
- package/dist/styled.js +0 -44
- package/dist/styles/theme/genesis-theme.types.ts +0 -297
- package/dist/utils/styled.ts +0 -52
- /package/dist/{Table → components/Table/Table}/Table.d.ts +0 -0
- /package/dist/{Table → components/Table/Table}/Table.js +0 -0
- /package/dist/{Table → components/Table/Table}/TableControls/CustomPagination.d.ts +0 -0
- /package/dist/{Table → components/Table/Table}/TableControls/CustomPagination.js +0 -0
- /package/dist/{Table → components/Table/Table}/TableControls/PaginationNumber.d.ts +0 -0
- /package/dist/{Table → components/Table/Table}/TableControls/PaginationNumber.js +0 -0
- /package/dist/{Table → components/Table/Table}/styles.d.ts +0 -0
- /package/dist/{Table → components/Table/Table}/styles.js +0 -0
- /package/dist/{Table → components/Table/Table}/useTable.d.ts +0 -0
- /package/dist/{Table → components/Table/Table}/useTable.js +0 -0
- /package/dist/{Typography → components/Table/Typography}/Typography.d.ts +0 -0
- /package/dist/{Typography → components/Table/Typography}/Typography.js +0 -0
- /package/dist/{Typography → components/Table/Typography}/index.d.ts +0 -0
- /package/dist/{Typography → components/Table/Typography}/index.js +0 -0
- /package/dist/{Typography → components/Table/Typography}/styles.d.ts +0 -0
- /package/dist/{Typography → components/Table/Typography}/styles.js +0 -0
|
@@ -1,297 +0,0 @@
|
|
|
1
|
-
export enum BreakpointLabel {
|
|
2
|
-
Narrow = "narrow",
|
|
3
|
-
Medium = "medium",
|
|
4
|
-
Wide = "wide",
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export type Breakpoints = {
|
|
8
|
-
[key in BreakpointLabel]: number;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export type Sizing = {
|
|
12
|
-
Size1: number;
|
|
13
|
-
Size2: number;
|
|
14
|
-
Size3: number;
|
|
15
|
-
Size4: number;
|
|
16
|
-
Size5: number;
|
|
17
|
-
Size6: number;
|
|
18
|
-
Size7: number;
|
|
19
|
-
Size8: number;
|
|
20
|
-
Size10: number;
|
|
21
|
-
Size12: number;
|
|
22
|
-
Size13: number;
|
|
23
|
-
Size14: number;
|
|
24
|
-
Size16: number;
|
|
25
|
-
Size18: number;
|
|
26
|
-
Size20: number;
|
|
27
|
-
Size24: number;
|
|
28
|
-
Size27: number;
|
|
29
|
-
Size28: number;
|
|
30
|
-
Size30: number;
|
|
31
|
-
Size32: number;
|
|
32
|
-
Size34: number;
|
|
33
|
-
Size35: number;
|
|
34
|
-
Size39: number;
|
|
35
|
-
Size43: number;
|
|
36
|
-
Size50: number;
|
|
37
|
-
Size64: number;
|
|
38
|
-
Size05: number;
|
|
39
|
-
Size15: number;
|
|
40
|
-
Size025: number;
|
|
41
|
-
Size25: number;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
type BorderRadius = {
|
|
45
|
-
BorderRadiusNone: number;
|
|
46
|
-
BorderRadiusXs: number;
|
|
47
|
-
BorderRadiusSm: number;
|
|
48
|
-
BorderRadiusMd: number;
|
|
49
|
-
BorderRadiusLg: number;
|
|
50
|
-
BorderRadiusXl: number;
|
|
51
|
-
BorderRadiusXxl: number;
|
|
52
|
-
BorderRadiusXxxl: number;
|
|
53
|
-
BorderRadiusRounded: number;
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
type FontStyle = {
|
|
57
|
-
fontSize: string;
|
|
58
|
-
lineHeight: string;
|
|
59
|
-
fontWeight: number;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export type TypographySize = {
|
|
63
|
-
display1: FontStyle;
|
|
64
|
-
display2: FontStyle;
|
|
65
|
-
display3: FontStyle;
|
|
66
|
-
heading1: FontStyle;
|
|
67
|
-
heading2: FontStyle;
|
|
68
|
-
heading3: FontStyle;
|
|
69
|
-
subHeading1: FontStyle;
|
|
70
|
-
subHeading2: FontStyle;
|
|
71
|
-
subHeading3: FontStyle;
|
|
72
|
-
body1: FontStyle;
|
|
73
|
-
body2: FontStyle;
|
|
74
|
-
body3: FontStyle;
|
|
75
|
-
body4: FontStyle;
|
|
76
|
-
body5: FontStyle;
|
|
77
|
-
message: FontStyle;
|
|
78
|
-
overline: FontStyle;
|
|
79
|
-
label: FontStyle;
|
|
80
|
-
link1: FontStyle;
|
|
81
|
-
link2: FontStyle;
|
|
82
|
-
link3: FontStyle;
|
|
83
|
-
digits1: FontStyle;
|
|
84
|
-
digits2: FontStyle;
|
|
85
|
-
digits3: FontStyle;
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
export type Typography = {
|
|
89
|
-
wide: TypographySize;
|
|
90
|
-
medium: TypographySize;
|
|
91
|
-
narrow: TypographySize;
|
|
92
|
-
fontFamily: string;
|
|
93
|
-
lineHeight: string;
|
|
94
|
-
body1: FontStyle;
|
|
95
|
-
body2: FontStyle;
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
export type ColorShades = {
|
|
99
|
-
100?: string;
|
|
100
|
-
200?: string;
|
|
101
|
-
300?: string;
|
|
102
|
-
400?: string;
|
|
103
|
-
500?: string;
|
|
104
|
-
600?: string;
|
|
105
|
-
700?: string;
|
|
106
|
-
800?: string;
|
|
107
|
-
900?: string;
|
|
108
|
-
black?: string;
|
|
109
|
-
white?: string;
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
type ColorLayer = {
|
|
113
|
-
textColor: string;
|
|
114
|
-
backgroundColor: string;
|
|
115
|
-
borderColor: string;
|
|
116
|
-
ringColor?: string;
|
|
117
|
-
active: ColorShades;
|
|
118
|
-
checked?: string;
|
|
119
|
-
default?: string;
|
|
120
|
-
border?: string;
|
|
121
|
-
onsurface: string;
|
|
122
|
-
generic?: string;
|
|
123
|
-
disabled?: string;
|
|
124
|
-
surface?: string;
|
|
125
|
-
hover?: string;
|
|
126
|
-
pressed?: string;
|
|
127
|
-
focus?: string;
|
|
128
|
-
info?: string;
|
|
129
|
-
success?: string;
|
|
130
|
-
error?: string;
|
|
131
|
-
empty?: string;
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
type ColorState = {
|
|
135
|
-
active: ColorLayer;
|
|
136
|
-
hover: ColorLayer;
|
|
137
|
-
pressed: ColorLayer;
|
|
138
|
-
focussed: ColorLayer;
|
|
139
|
-
disabled: ColorLayer;
|
|
140
|
-
link: ColorLayer;
|
|
141
|
-
surface: ColorLayer;
|
|
142
|
-
success: ColorLayer;
|
|
143
|
-
error: ColorLayer;
|
|
144
|
-
onsurface: ColorLayer;
|
|
145
|
-
warning: ColorLayer;
|
|
146
|
-
generic?: ColorLayer;
|
|
147
|
-
hollow?: ColorLayer;
|
|
148
|
-
info?: ColorLayer;
|
|
149
|
-
utility?: ColorLayer;
|
|
150
|
-
icon?: ColorLayer;
|
|
151
|
-
default?: ColorLayer;
|
|
152
|
-
selected?: ColorLayer;
|
|
153
|
-
border?: ColorLayer;
|
|
154
|
-
tertiary?: string;
|
|
155
|
-
copy?: string;
|
|
156
|
-
"copy-dark"?: string;
|
|
157
|
-
"border-light"?: string;
|
|
158
|
-
primary?: string;
|
|
159
|
-
progress?: ColorLayer;
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
export type ColorMode = {
|
|
163
|
-
primary: ColorState;
|
|
164
|
-
secondary: ColorState;
|
|
165
|
-
tertiary: ColorState;
|
|
166
|
-
destructive: ColorState;
|
|
167
|
-
success: ColorState;
|
|
168
|
-
warning: ColorState;
|
|
169
|
-
danger: ColorState;
|
|
170
|
-
info: ColorState;
|
|
171
|
-
onsurface: ColorState;
|
|
172
|
-
surface: ColorState;
|
|
173
|
-
inputs: ColorState;
|
|
174
|
-
interactive: ColorState;
|
|
175
|
-
status: ColorState;
|
|
176
|
-
brandon: ColorState;
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
export type ColorModes = {
|
|
180
|
-
light: ColorMode;
|
|
181
|
-
dark: ColorMode;
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
export type ColorGroup =
|
|
185
|
-
| "red"
|
|
186
|
-
| "orange"
|
|
187
|
-
| "yellow"
|
|
188
|
-
| "green"
|
|
189
|
-
| "blue"
|
|
190
|
-
| "purple"
|
|
191
|
-
| "sky"
|
|
192
|
-
| "gray";
|
|
193
|
-
|
|
194
|
-
type AllColors = {
|
|
195
|
-
red: ColorShades;
|
|
196
|
-
orange: ColorShades;
|
|
197
|
-
yellow: ColorShades;
|
|
198
|
-
green: ColorShades;
|
|
199
|
-
blue: ColorShades;
|
|
200
|
-
purple: ColorShades;
|
|
201
|
-
sky: ColorShades;
|
|
202
|
-
gray: ColorShades;
|
|
203
|
-
};
|
|
204
|
-
|
|
205
|
-
type Mode = "light" | "dark";
|
|
206
|
-
|
|
207
|
-
type Button = {
|
|
208
|
-
padding: {
|
|
209
|
-
verPadding: number;
|
|
210
|
-
horPadding: number;
|
|
211
|
-
};
|
|
212
|
-
gap: number;
|
|
213
|
-
radius: number;
|
|
214
|
-
};
|
|
215
|
-
|
|
216
|
-
type Input = {
|
|
217
|
-
suffixPrefixHorPadding: number;
|
|
218
|
-
suffixPrefixVerPadding: number;
|
|
219
|
-
};
|
|
220
|
-
|
|
221
|
-
type Badge = {
|
|
222
|
-
"ver-padding": number;
|
|
223
|
-
"left-padding": number;
|
|
224
|
-
"right-padding": number;
|
|
225
|
-
radius: number;
|
|
226
|
-
};
|
|
227
|
-
|
|
228
|
-
type CommonContainer = {
|
|
229
|
-
"ver-padding": number;
|
|
230
|
-
"hor-padding": number;
|
|
231
|
-
radius: number;
|
|
232
|
-
gap: number;
|
|
233
|
-
};
|
|
234
|
-
|
|
235
|
-
type Popover = CommonContainer;
|
|
236
|
-
|
|
237
|
-
type Row = CommonContainer;
|
|
238
|
-
|
|
239
|
-
type TableCell = {
|
|
240
|
-
surface: string;
|
|
241
|
-
hover: string;
|
|
242
|
-
pressed: string;
|
|
243
|
-
};
|
|
244
|
-
|
|
245
|
-
export type Components = {
|
|
246
|
-
button: Button;
|
|
247
|
-
utilityButton: Button;
|
|
248
|
-
iconButton: Button;
|
|
249
|
-
input: Input;
|
|
250
|
-
row: Row;
|
|
251
|
-
badge: Badge;
|
|
252
|
-
popover: Popover;
|
|
253
|
-
tableCell: TableCell;
|
|
254
|
-
};
|
|
255
|
-
|
|
256
|
-
type Motion = {
|
|
257
|
-
instant: string;
|
|
258
|
-
veryfast: string;
|
|
259
|
-
fast: string;
|
|
260
|
-
medium: string;
|
|
261
|
-
slow: string;
|
|
262
|
-
};
|
|
263
|
-
|
|
264
|
-
type Shadows = {
|
|
265
|
-
general: {
|
|
266
|
-
"1": string;
|
|
267
|
-
"2": string;
|
|
268
|
-
"3": string;
|
|
269
|
-
};
|
|
270
|
-
actions: {
|
|
271
|
-
"1": string;
|
|
272
|
-
"2": string;
|
|
273
|
-
};
|
|
274
|
-
inputs: {
|
|
275
|
-
"1": string;
|
|
276
|
-
};
|
|
277
|
-
};
|
|
278
|
-
|
|
279
|
-
interface ConvenienceFunctions {
|
|
280
|
-
getStatusColor: (colors: ColorMode, status: string) => string;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
export interface BaseTokens extends ConvenienceFunctions {
|
|
284
|
-
breakpoints: Breakpoints;
|
|
285
|
-
sizing: Sizing;
|
|
286
|
-
borderRadius: BorderRadius;
|
|
287
|
-
typography: Typography;
|
|
288
|
-
allColors: AllColors;
|
|
289
|
-
components: Components;
|
|
290
|
-
motion: Motion;
|
|
291
|
-
shadows: Shadows;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
export interface GenesisTheme extends BaseTokens {
|
|
295
|
-
colors: ColorMode;
|
|
296
|
-
mode: Mode;
|
|
297
|
-
}
|
package/dist/utils/styled.ts
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Warning: this was a failed attempt to create a universal styled-components library.
|
|
3
|
-
When importing styled-components into a non React Native app, it will throw an error!
|
|
4
|
-
|
|
5
|
-
Even when React Native was setup as an optional peer dependency; it's not actually working.
|
|
6
|
-
Now it's seems like a better idea to create a separate Genesis package for React Native styled-components which is basically only the theme provider.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
/*
|
|
10
|
-
import * as styledComponents from "styled-components";
|
|
11
|
-
|
|
12
|
-
// Platform detection
|
|
13
|
-
const isReactNative =
|
|
14
|
-
typeof navigator !== "undefined" && navigator.product === "ReactNative";
|
|
15
|
-
|
|
16
|
-
// Set up platform-specific styled
|
|
17
|
-
let platformStyled;
|
|
18
|
-
if (isReactNative) {
|
|
19
|
-
try {
|
|
20
|
-
platformStyled = require("styled-components/native");
|
|
21
|
-
} catch (e) {
|
|
22
|
-
console.warn(
|
|
23
|
-
"Failed to load styled-components/native, falling back to web"
|
|
24
|
-
);
|
|
25
|
-
platformStyled = styledComponents;
|
|
26
|
-
}
|
|
27
|
-
} else {
|
|
28
|
-
platformStyled = styledComponents;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// Export named exports
|
|
32
|
-
export const styled = platformStyled.default;
|
|
33
|
-
export const ThemeProvider = platformStyled.ThemeProvider;
|
|
34
|
-
export const useTheme = platformStyled.useTheme;
|
|
35
|
-
export const css = platformStyled.css;
|
|
36
|
-
|
|
37
|
-
// Add createGlobalStyle (web only)
|
|
38
|
-
export const createGlobalStyle = isReactNative
|
|
39
|
-
? () => null
|
|
40
|
-
: styledComponents.createGlobalStyle;
|
|
41
|
-
|
|
42
|
-
// Export default too for backwards compatibility
|
|
43
|
-
export default styled;
|
|
44
|
-
*/
|
|
45
|
-
|
|
46
|
-
export {
|
|
47
|
-
default,
|
|
48
|
-
createGlobalStyle,
|
|
49
|
-
useTheme,
|
|
50
|
-
ThemeProvider,
|
|
51
|
-
css,
|
|
52
|
-
} from "styled-components";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|