tharaday 0.8.2 → 0.8.4
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/.gitignore +3 -0
- package/.storybook/preview.ts +2 -2
- package/dist/{src/components → components}/Accordion/Accordion.d.ts +0 -1
- package/dist/{src/components → components}/Avatar/Avatar.d.ts +0 -1
- package/dist/{src/components → components}/Badge/Badge.d.ts +0 -1
- package/dist/{src/components → components}/Box/Box.d.ts +0 -1
- package/dist/{src/components → components}/Box/Box.types.d.ts +11 -11
- package/dist/{src/components → components}/Box/helpers/getSpacingStyles.d.ts +2 -2
- package/dist/{src/components → components}/Breadcrumbs/Breadcrumbs.d.ts +0 -1
- package/dist/{src/components → components}/Button/Button.d.ts +0 -1
- package/dist/{src/components → components}/Card/Card.d.ts +0 -1
- package/dist/{src/components → components}/Checkbox/Checkbox.d.ts +0 -1
- package/dist/components/DatePicker/DatePicker.d.ts +1 -0
- package/dist/{src/components → components}/Divider/Divider.d.ts +0 -1
- package/dist/components/Drawer/Drawer.d.ts +1 -0
- package/dist/{src/components → components}/Dropdown/Dropdown.d.ts +0 -1
- package/dist/components/EmptyState/EmptyState.d.ts +1 -0
- package/dist/{src/components → components}/Header/Header.d.ts +0 -1
- package/dist/{src/components → components}/Input/Input.d.ts +0 -1
- package/dist/{src/components → components}/List/List.d.ts +2 -2
- package/dist/{src/components → components}/List/List.types.d.ts +3 -3
- package/dist/{src/components → components}/List/ListItem.d.ts +1 -1
- package/dist/{src/components → components}/List/ListItem.types.d.ts +1 -1
- package/dist/{src/components → components}/Loader/Loader.d.ts +0 -1
- package/dist/{src/components → components}/Modal/Modal.d.ts +1 -2
- package/dist/{src/components → components}/NavBar/NavBar.d.ts +0 -1
- package/dist/{src/components → components}/Notification/Notification.d.ts +0 -1
- package/dist/{src/components → components}/Pagination/Pagination.d.ts +0 -1
- package/dist/components/Popover/Popover.d.ts +1 -0
- package/dist/{src/components → components}/ProgressBar/ProgressBar.d.ts +0 -1
- package/dist/{src/components → components}/RadioButton/RadioButton.d.ts +0 -1
- package/dist/{src/components → components}/Select/Select.d.ts +0 -1
- package/dist/{src/components → components}/Skeleton/Skeleton.d.ts +0 -1
- package/dist/{src/components → components}/Slider/Slider.d.ts +0 -1
- package/dist/{src/components → components}/Stepper/Step.d.ts +0 -1
- package/dist/{src/components → components}/Stepper/Stepper.d.ts +0 -1
- package/dist/{src/components → components}/Stepper/stepper.utils.d.ts +2 -2
- package/dist/{src/components → components}/Switch/Switch.d.ts +0 -1
- package/dist/{src/components → components}/Table/Table.d.ts +0 -1
- package/dist/{src/components → components}/Tabs/Tabs.d.ts +0 -1
- package/dist/components/Tag/Tag.d.ts +1 -0
- package/dist/{src/components → components}/Text/Text.d.ts +0 -1
- package/dist/{src/components → components}/Textarea/Textarea.d.ts +0 -1
- package/dist/{src/components → components}/Tooltip/Tooltip.d.ts +0 -1
- package/dist/{src/components → components}/Tree/Tree.d.ts +2 -2
- package/dist/{src/components → components}/Tree/Tree.types.d.ts +1 -1
- package/dist/{src/components → components}/Tree/TreeItem.d.ts +1 -1
- package/dist/{src/components → components}/Tree/TreeItem.types.d.ts +1 -1
- package/dist/ds.css +1 -1
- package/dist/ds.js +1351 -1206
- package/dist/ds.umd.cjs +1 -1
- package/dist/hooks/useClickOutside.d.ts +6 -0
- package/dist/{src/hooks → hooks}/useComponentId.d.ts +1 -1
- package/dist/hooks/useFocusTrap.d.ts +17 -0
- package/dist/{src/index.d.ts → index.d.ts} +38 -28
- package/dist/{src/layouts → layouts}/AppLayout/AppLayout.d.ts +0 -1
- package/dist/{src/layouts → layouts}/AuthLayout/AuthLayout.d.ts +0 -1
- package/dist/{src/layouts → layouts}/DashboardLayout/DashboardLayout.d.ts +0 -1
- package/dist/{src/layouts → layouts}/SettingsLayout/SettingsLayout.d.ts +0 -1
- package/eslint.config.js +15 -0
- package/package.json +13 -11
- package/src/components/Accordion/Accordion.stories.tsx +1 -1
- package/src/components/Accordion/Accordion.tsx +1 -1
- package/src/components/Avatar/Avatar.stories.tsx +1 -1
- package/src/components/Avatar/Avatar.test.tsx +1 -1
- package/src/components/Badge/Badge.stories.tsx +1 -1
- package/src/components/Box/Box.module.css +0 -557
- package/src/components/Box/Box.test.tsx +4 -4
- package/src/components/Box/Box.tsx +8 -16
- package/src/components/Box/Box.types.ts +1 -1
- package/src/components/Box/helpers/getSpacingStyles.ts +24 -17
- package/src/components/Breadcrumbs/Breadcrumbs.stories.tsx +1 -1
- package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +1 -1
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +1 -1
- package/src/components/Breadcrumbs/Breadcrumbs.types.ts +1 -1
- package/src/components/Button/Button.stories.tsx +1 -1
- package/src/components/Card/Card.stories.tsx +1 -1
- package/src/components/Card/Card.test.tsx +1 -1
- package/src/components/Card/Card.tsx +2 -2
- package/src/components/Checkbox/Checkbox.stories.tsx +1 -1
- package/src/components/Checkbox/Checkbox.tsx +1 -1
- package/src/components/DatePicker/DatePicker.module.css +212 -0
- package/src/components/DatePicker/DatePicker.stories.tsx +56 -0
- package/src/components/DatePicker/DatePicker.test.tsx +61 -0
- package/src/components/DatePicker/DatePicker.tsx +271 -0
- package/src/components/DatePicker/DatePicker.types.ts +11 -0
- package/src/components/Divider/Divider.stories.tsx +1 -1
- package/src/components/Drawer/Drawer.module.css +126 -0
- package/src/components/Drawer/Drawer.stories.tsx +71 -0
- package/src/components/Drawer/Drawer.test.tsx +49 -0
- package/src/components/Drawer/Drawer.tsx +77 -0
- package/src/components/Drawer/Drawer.types.ts +17 -0
- package/src/components/Dropdown/Dropdown.tsx +7 -3
- package/src/components/EmptyState/EmptyState.module.css +73 -0
- package/src/components/EmptyState/EmptyState.stories.tsx +65 -0
- package/src/components/EmptyState/EmptyState.test.tsx +30 -0
- package/src/components/EmptyState/EmptyState.tsx +29 -0
- package/src/components/EmptyState/EmptyState.types.ts +12 -0
- package/src/components/Header/Header.test.tsx +5 -5
- package/src/components/Header/Header.tsx +2 -2
- package/src/components/Input/Input.stories.tsx +1 -1
- package/src/components/Input/Input.tsx +1 -1
- package/src/components/List/List.stories.tsx +1 -0
- package/src/components/List/List.tsx +1 -1
- package/src/components/List/List.types.ts +3 -2
- package/src/components/List/ListItem.tsx +2 -1
- package/src/components/List/ListItem.types.ts +1 -1
- package/src/components/Loader/Loader.stories.tsx +1 -1
- package/src/components/Modal/Modal.stories.tsx +1 -1
- package/src/components/Modal/Modal.tsx +4 -65
- package/src/components/NavBar/NavBar.stories.tsx +1 -1
- package/src/components/Notification/Notification.stories.tsx +1 -1
- package/src/components/Notification/Notification.tsx +1 -1
- package/src/components/Pagination/Pagination.tsx +2 -2
- package/src/components/Popover/Popover.module.css +52 -0
- package/src/components/Popover/Popover.stories.tsx +67 -0
- package/src/components/Popover/Popover.test.tsx +40 -0
- package/src/components/Popover/Popover.tsx +78 -0
- package/src/components/Popover/Popover.types.ts +13 -0
- package/src/components/ProgressBar/ProgressBar.stories.tsx +1 -1
- package/src/components/ProgressBar/ProgressBar.tsx +1 -1
- package/src/components/RadioButton/RadioButton.stories.tsx +1 -1
- package/src/components/RadioButton/RadioButton.tsx +1 -1
- package/src/components/Select/Select.stories.tsx +1 -1
- package/src/components/Select/Select.tsx +1 -1
- package/src/components/Select/Select.types.ts +1 -1
- package/src/components/Skeleton/Skeleton.stories.tsx +1 -1
- package/src/components/Skeleton/Skeleton.tsx +1 -1
- package/src/components/Slider/Slider.tsx +4 -1
- package/src/components/Stepper/Stepper.stories.tsx +1 -1
- package/src/components/Stepper/Stepper.tsx +1 -1
- package/src/components/Stepper/stepper.utils.ts +4 -1
- package/src/components/Switch/Switch.stories.tsx +1 -1
- package/src/components/Switch/Switch.tsx +1 -1
- package/src/components/Table/Table.stories.tsx +1 -1
- package/src/components/Table/Table.test.tsx +3 -3
- package/src/components/Table/Table.tsx +4 -4
- package/src/components/Tabs/Tabs.tsx +2 -2
- package/src/components/Tag/Tag.module.css +115 -0
- package/src/components/Tag/Tag.stories.tsx +61 -0
- package/src/components/Tag/Tag.test.tsx +42 -0
- package/src/components/Tag/Tag.tsx +74 -0
- package/src/components/Tag/Tag.types.ts +15 -0
- package/src/components/Text/Text.module.css +0 -521
- package/src/components/Text/Text.stories.tsx +1 -1
- package/src/components/Text/Text.test.tsx +4 -4
- package/src/components/Text/Text.tsx +0 -14
- package/src/components/Text/Text.types.ts +3 -3
- package/src/components/Textarea/Textarea.stories.tsx +1 -1
- package/src/components/Textarea/Textarea.tsx +1 -1
- package/src/components/Tooltip/Tooltip.module.css +1 -1
- package/src/components/Tooltip/Tooltip.stories.tsx +1 -1
- package/src/components/Tooltip/Tooltip.test.tsx +5 -5
- package/src/components/Tooltip/Tooltip.tsx +6 -9
- package/src/components/Tree/Tree.stories.tsx +1 -0
- package/src/components/Tree/Tree.tsx +3 -2
- package/src/components/Tree/TreeItem.tsx +5 -2
- package/src/hooks/useClickOutside.test.tsx +69 -0
- package/src/hooks/useClickOutside.ts +36 -0
- package/src/hooks/useComponentId.ts +1 -0
- package/src/hooks/useFocusTrap.test.tsx +97 -0
- package/src/hooks/useFocusTrap.ts +89 -0
- package/src/index.ts +43 -33
- package/src/layouts/AppLayout/AppLayout.stories.tsx +2 -2
- package/src/layouts/AppLayout/AppLayout.tsx +1 -1
- package/src/layouts/AuthLayout/AuthLayout.stories.tsx +1 -1
- package/src/layouts/AuthLayout/AuthLayout.tsx +2 -2
- package/src/layouts/AuthLayout/AuthLayout.types.tsx +2 -2
- package/src/layouts/DashboardLayout/DashboardLayout.stories.tsx +3 -3
- package/src/layouts/SettingsLayout/SettingsLayout.stories.tsx +3 -3
- package/src/styles/themes.browser.test.ts +76 -0
- package/vite.config.ts +2 -3
- package/dist/src/components/Accordion/Accordion.stories.d.ts +0 -14
- package/dist/src/components/Accordion/Accordion.types.d.ts +0 -18
- package/dist/src/components/Avatar/Avatar.stories.d.ts +0 -14
- package/dist/src/components/Avatar/Avatar.types.d.ts +0 -10
- package/dist/src/components/Badge/Badge.stories.d.ts +0 -33
- package/dist/src/components/Badge/Badge.types.d.ts +0 -10
- package/dist/src/components/Box/Box.stories.d.ts +0 -38
- package/dist/src/components/Breadcrumbs/Breadcrumbs.stories.d.ts +0 -13
- package/dist/src/components/Breadcrumbs/Breadcrumbs.types.d.ts +0 -11
- package/dist/src/components/Button/Button.stories.d.ts +0 -22
- package/dist/src/components/Button/Button.types.d.ts +0 -12
- package/dist/src/components/Card/Card.stories.d.ts +0 -27
- package/dist/src/components/Card/Card.types.d.ts +0 -16
- package/dist/src/components/Checkbox/Checkbox.stories.d.ts +0 -17
- package/dist/src/components/Checkbox/Checkbox.types.d.ts +0 -7
- package/dist/src/components/Divider/Divider.stories.d.ts +0 -15
- package/dist/src/components/Divider/Divider.types.d.ts +0 -10
- package/dist/src/components/Dropdown/Dropdown.stories.d.ts +0 -12
- package/dist/src/components/Dropdown/Dropdown.types.d.ts +0 -24
- package/dist/src/components/Header/Header.stories.d.ts +0 -20
- package/dist/src/components/Header/Header.types.d.ts +0 -16
- package/dist/src/components/Input/Input.stories.d.ts +0 -32
- package/dist/src/components/Input/Input.types.d.ts +0 -10
- package/dist/src/components/List/List.stories.d.ts +0 -25
- package/dist/src/components/Loader/Loader.stories.d.ts +0 -25
- package/dist/src/components/Loader/Loader.types.d.ts +0 -8
- package/dist/src/components/Modal/Modal.stories.d.ts +0 -28
- package/dist/src/components/Modal/Modal.types.d.ts +0 -12
- package/dist/src/components/NavBar/NavBar.stories.d.ts +0 -8
- package/dist/src/components/NavBar/NavBar.types.d.ts +0 -38
- package/dist/src/components/Notification/Notification.stories.d.ts +0 -26
- package/dist/src/components/Notification/Notification.types.d.ts +0 -9
- package/dist/src/components/Pagination/Pagination.stories.d.ts +0 -21
- package/dist/src/components/Pagination/Pagination.types.d.ts +0 -34
- package/dist/src/components/ProgressBar/ProgressBar.stories.d.ts +0 -32
- package/dist/src/components/ProgressBar/ProgressBar.types.d.ts +0 -12
- package/dist/src/components/RadioButton/RadioButton.stories.d.ts +0 -30
- package/dist/src/components/RadioButton/RadioButton.types.d.ts +0 -9
- package/dist/src/components/Select/Select.stories.d.ts +0 -32
- package/dist/src/components/Select/Select.types.d.ts +0 -23
- package/dist/src/components/Skeleton/Skeleton.stories.d.ts +0 -15
- package/dist/src/components/Skeleton/Skeleton.types.d.ts +0 -9
- package/dist/src/components/Slider/Slider.stories.d.ts +0 -23
- package/dist/src/components/Slider/Slider.types.d.ts +0 -15
- package/dist/src/components/Stepper/Step.types.d.ts +0 -18
- package/dist/src/components/Stepper/Stepper.stories.d.ts +0 -15
- package/dist/src/components/Stepper/Stepper.types.d.ts +0 -14
- package/dist/src/components/Switch/Switch.stories.d.ts +0 -16
- package/dist/src/components/Switch/Switch.types.d.ts +0 -6
- package/dist/src/components/Table/Table.stories.d.ts +0 -27
- package/dist/src/components/Table/Table.types.d.ts +0 -19
- package/dist/src/components/Tabs/Tabs.stories.d.ts +0 -19
- package/dist/src/components/Tabs/Tabs.types.d.ts +0 -16
- package/dist/src/components/Text/Text.stories.d.ts +0 -78
- package/dist/src/components/Text/Text.types.d.ts +0 -52
- package/dist/src/components/Textarea/Textarea.stories.d.ts +0 -32
- package/dist/src/components/Textarea/Textarea.types.d.ts +0 -11
- package/dist/src/components/Tooltip/Tooltip.stories.d.ts +0 -10
- package/dist/src/components/Tooltip/Tooltip.types.d.ts +0 -12
- package/dist/src/components/Tree/Tree.stories.d.ts +0 -27
- package/dist/src/layouts/AppLayout/AppLayout.stories.d.ts +0 -13
- package/dist/src/layouts/AppLayout/AppLayout.types.d.ts +0 -13
- package/dist/src/layouts/AuthLayout/AuthLayout.stories.d.ts +0 -12
- package/dist/src/layouts/AuthLayout/AuthLayout.types.d.ts +0 -8
- package/dist/src/layouts/DashboardLayout/DashboardLayout.stories.d.ts +0 -11
- package/dist/src/layouts/DashboardLayout/DashboardLayout.types.d.ts +0 -10
- package/dist/src/layouts/SettingsLayout/SettingsLayout.stories.d.ts +0 -11
- package/dist/src/layouts/SettingsLayout/SettingsLayout.types.d.ts +0 -9
|
@@ -102,563 +102,6 @@
|
|
|
102
102
|
text-align: justify;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
/* Padding */
|
|
106
|
-
.p-0 {
|
|
107
|
-
padding: 0;
|
|
108
|
-
}
|
|
109
|
-
.p-1 {
|
|
110
|
-
padding: var(--ds-space-1);
|
|
111
|
-
}
|
|
112
|
-
.p-2 {
|
|
113
|
-
padding: var(--ds-space-2);
|
|
114
|
-
}
|
|
115
|
-
.p-3 {
|
|
116
|
-
padding: var(--ds-space-3);
|
|
117
|
-
}
|
|
118
|
-
.p-4 {
|
|
119
|
-
padding: var(--ds-space-4);
|
|
120
|
-
}
|
|
121
|
-
.p-5 {
|
|
122
|
-
padding: var(--ds-space-5);
|
|
123
|
-
}
|
|
124
|
-
.p-6 {
|
|
125
|
-
padding: var(--ds-space-6);
|
|
126
|
-
}
|
|
127
|
-
.p-8 {
|
|
128
|
-
padding: var(--ds-space-8);
|
|
129
|
-
}
|
|
130
|
-
.p-10 {
|
|
131
|
-
padding: var(--ds-space-10);
|
|
132
|
-
}
|
|
133
|
-
.p-12 {
|
|
134
|
-
padding: var(--ds-space-12);
|
|
135
|
-
}
|
|
136
|
-
.p-14 {
|
|
137
|
-
padding: var(--ds-space-14);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.px-0 {
|
|
141
|
-
padding-left: 0;
|
|
142
|
-
padding-right: 0;
|
|
143
|
-
}
|
|
144
|
-
.px-1 {
|
|
145
|
-
padding-left: var(--ds-space-1);
|
|
146
|
-
padding-right: var(--ds-space-1);
|
|
147
|
-
}
|
|
148
|
-
.px-2 {
|
|
149
|
-
padding-left: var(--ds-space-2);
|
|
150
|
-
padding-right: var(--ds-space-2);
|
|
151
|
-
}
|
|
152
|
-
.px-3 {
|
|
153
|
-
padding-left: var(--ds-space-3);
|
|
154
|
-
padding-right: var(--ds-space-3);
|
|
155
|
-
}
|
|
156
|
-
.px-4 {
|
|
157
|
-
padding-left: var(--ds-space-4);
|
|
158
|
-
padding-right: var(--ds-space-4);
|
|
159
|
-
}
|
|
160
|
-
.px-5 {
|
|
161
|
-
padding-left: var(--ds-space-5);
|
|
162
|
-
padding-right: var(--ds-space-5);
|
|
163
|
-
}
|
|
164
|
-
.px-6 {
|
|
165
|
-
padding-left: var(--ds-space-6);
|
|
166
|
-
padding-right: var(--ds-space-6);
|
|
167
|
-
}
|
|
168
|
-
.px-8 {
|
|
169
|
-
padding-left: var(--ds-space-8);
|
|
170
|
-
padding-right: var(--ds-space-8);
|
|
171
|
-
}
|
|
172
|
-
.px-10 {
|
|
173
|
-
padding-left: var(--ds-space-10);
|
|
174
|
-
padding-right: var(--ds-space-10);
|
|
175
|
-
}
|
|
176
|
-
.px-12 {
|
|
177
|
-
padding-left: var(--ds-space-12);
|
|
178
|
-
padding-right: var(--ds-space-12);
|
|
179
|
-
}
|
|
180
|
-
.px-14 {
|
|
181
|
-
padding-left: var(--ds-space-14);
|
|
182
|
-
padding-right: var(--ds-space-14);
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.py-0 {
|
|
186
|
-
padding-top: 0;
|
|
187
|
-
padding-bottom: 0;
|
|
188
|
-
}
|
|
189
|
-
.py-1 {
|
|
190
|
-
padding-top: var(--ds-space-1);
|
|
191
|
-
padding-bottom: var(--ds-space-1);
|
|
192
|
-
}
|
|
193
|
-
.py-2 {
|
|
194
|
-
padding-top: var(--ds-space-2);
|
|
195
|
-
padding-bottom: var(--ds-space-2);
|
|
196
|
-
}
|
|
197
|
-
.py-3 {
|
|
198
|
-
padding-top: var(--ds-space-3);
|
|
199
|
-
padding-bottom: var(--ds-space-3);
|
|
200
|
-
}
|
|
201
|
-
.py-4 {
|
|
202
|
-
padding-top: var(--ds-space-4);
|
|
203
|
-
padding-bottom: var(--ds-space-4);
|
|
204
|
-
}
|
|
205
|
-
.py-5 {
|
|
206
|
-
padding-top: var(--ds-space-5);
|
|
207
|
-
padding-bottom: var(--ds-space-5);
|
|
208
|
-
}
|
|
209
|
-
.py-6 {
|
|
210
|
-
padding-top: var(--ds-space-6);
|
|
211
|
-
padding-bottom: var(--ds-space-6);
|
|
212
|
-
}
|
|
213
|
-
.py-8 {
|
|
214
|
-
padding-top: var(--ds-space-8);
|
|
215
|
-
padding-bottom: var(--ds-space-8);
|
|
216
|
-
}
|
|
217
|
-
.py-10 {
|
|
218
|
-
padding-top: var(--ds-space-10);
|
|
219
|
-
padding-bottom: var(--ds-space-10);
|
|
220
|
-
}
|
|
221
|
-
.py-12 {
|
|
222
|
-
padding-top: var(--ds-space-12);
|
|
223
|
-
padding-bottom: var(--ds-space-12);
|
|
224
|
-
}
|
|
225
|
-
.py-14 {
|
|
226
|
-
padding-top: var(--ds-space-14);
|
|
227
|
-
padding-bottom: var(--ds-space-14);
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
.pt-0 {
|
|
231
|
-
padding-top: 0;
|
|
232
|
-
}
|
|
233
|
-
.pt-1 {
|
|
234
|
-
padding-top: var(--ds-space-1);
|
|
235
|
-
}
|
|
236
|
-
.pt-2 {
|
|
237
|
-
padding-top: var(--ds-space-2);
|
|
238
|
-
}
|
|
239
|
-
.pt-3 {
|
|
240
|
-
padding-top: var(--ds-space-3);
|
|
241
|
-
}
|
|
242
|
-
.pt-4 {
|
|
243
|
-
padding-top: var(--ds-space-4);
|
|
244
|
-
}
|
|
245
|
-
.pt-5 {
|
|
246
|
-
padding-top: var(--ds-space-5);
|
|
247
|
-
}
|
|
248
|
-
.pt-6 {
|
|
249
|
-
padding-top: var(--ds-space-6);
|
|
250
|
-
}
|
|
251
|
-
.pt-8 {
|
|
252
|
-
padding-top: var(--ds-space-8);
|
|
253
|
-
}
|
|
254
|
-
.pt-10 {
|
|
255
|
-
padding-top: var(--ds-space-10);
|
|
256
|
-
}
|
|
257
|
-
.pt-12 {
|
|
258
|
-
padding-top: var(--ds-space-12);
|
|
259
|
-
}
|
|
260
|
-
.pt-14 {
|
|
261
|
-
padding-top: var(--ds-space-14);
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
.pb-0 {
|
|
265
|
-
padding-bottom: 0;
|
|
266
|
-
}
|
|
267
|
-
.pb-1 {
|
|
268
|
-
padding-bottom: var(--ds-space-1);
|
|
269
|
-
}
|
|
270
|
-
.pb-2 {
|
|
271
|
-
padding-bottom: var(--ds-space-2);
|
|
272
|
-
}
|
|
273
|
-
.pb-3 {
|
|
274
|
-
padding-bottom: var(--ds-space-3);
|
|
275
|
-
}
|
|
276
|
-
.pb-4 {
|
|
277
|
-
padding-bottom: var(--ds-space-4);
|
|
278
|
-
}
|
|
279
|
-
.pb-5 {
|
|
280
|
-
padding-bottom: var(--ds-space-5);
|
|
281
|
-
}
|
|
282
|
-
.pb-6 {
|
|
283
|
-
padding-bottom: var(--ds-space-6);
|
|
284
|
-
}
|
|
285
|
-
.pb-8 {
|
|
286
|
-
padding-bottom: var(--ds-space-8);
|
|
287
|
-
}
|
|
288
|
-
.pb-10 {
|
|
289
|
-
padding-bottom: var(--ds-space-10);
|
|
290
|
-
}
|
|
291
|
-
.pb-12 {
|
|
292
|
-
padding-bottom: var(--ds-space-12);
|
|
293
|
-
}
|
|
294
|
-
.pb-14 {
|
|
295
|
-
padding-bottom: var(--ds-space-14);
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
.pl-0 {
|
|
299
|
-
padding-left: 0;
|
|
300
|
-
}
|
|
301
|
-
.pl-1 {
|
|
302
|
-
padding-left: var(--ds-space-1);
|
|
303
|
-
}
|
|
304
|
-
.pl-2 {
|
|
305
|
-
padding-left: var(--ds-space-2);
|
|
306
|
-
}
|
|
307
|
-
.pl-3 {
|
|
308
|
-
padding-left: var(--ds-space-3);
|
|
309
|
-
}
|
|
310
|
-
.pl-4 {
|
|
311
|
-
padding-left: var(--ds-space-4);
|
|
312
|
-
}
|
|
313
|
-
.pl-5 {
|
|
314
|
-
padding-left: var(--ds-space-5);
|
|
315
|
-
}
|
|
316
|
-
.pl-6 {
|
|
317
|
-
padding-left: var(--ds-space-6);
|
|
318
|
-
}
|
|
319
|
-
.pl-8 {
|
|
320
|
-
padding-left: var(--ds-space-8);
|
|
321
|
-
}
|
|
322
|
-
.pl-10 {
|
|
323
|
-
padding-left: var(--ds-space-10);
|
|
324
|
-
}
|
|
325
|
-
.pl-12 {
|
|
326
|
-
padding-left: var(--ds-space-12);
|
|
327
|
-
}
|
|
328
|
-
.pl-14 {
|
|
329
|
-
padding-left: var(--ds-space-14);
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
.pr-0 {
|
|
333
|
-
padding-right: 0;
|
|
334
|
-
}
|
|
335
|
-
.pr-1 {
|
|
336
|
-
padding-right: var(--ds-space-1);
|
|
337
|
-
}
|
|
338
|
-
.pr-2 {
|
|
339
|
-
padding-right: var(--ds-space-2);
|
|
340
|
-
}
|
|
341
|
-
.pr-3 {
|
|
342
|
-
padding-right: var(--ds-space-3);
|
|
343
|
-
}
|
|
344
|
-
.pr-4 {
|
|
345
|
-
padding-right: var(--ds-space-4);
|
|
346
|
-
}
|
|
347
|
-
.pr-5 {
|
|
348
|
-
padding-right: var(--ds-space-5);
|
|
349
|
-
}
|
|
350
|
-
.pr-6 {
|
|
351
|
-
padding-right: var(--ds-space-6);
|
|
352
|
-
}
|
|
353
|
-
.pr-8 {
|
|
354
|
-
padding-right: var(--ds-space-8);
|
|
355
|
-
}
|
|
356
|
-
.pr-10 {
|
|
357
|
-
padding-right: var(--ds-space-10);
|
|
358
|
-
}
|
|
359
|
-
.pr-12 {
|
|
360
|
-
padding-right: var(--ds-space-12);
|
|
361
|
-
}
|
|
362
|
-
.pr-14 {
|
|
363
|
-
padding-right: var(--ds-space-14);
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
/* Gap */
|
|
367
|
-
.gap-0 {
|
|
368
|
-
gap: 0;
|
|
369
|
-
}
|
|
370
|
-
.gap-1 {
|
|
371
|
-
gap: var(--ds-space-1);
|
|
372
|
-
}
|
|
373
|
-
.gap-2 {
|
|
374
|
-
gap: var(--ds-space-2);
|
|
375
|
-
}
|
|
376
|
-
.gap-3 {
|
|
377
|
-
gap: var(--ds-space-3);
|
|
378
|
-
}
|
|
379
|
-
.gap-4 {
|
|
380
|
-
gap: var(--ds-space-4);
|
|
381
|
-
}
|
|
382
|
-
.gap-5 {
|
|
383
|
-
gap: var(--ds-space-5);
|
|
384
|
-
}
|
|
385
|
-
.gap-6 {
|
|
386
|
-
gap: var(--ds-space-6);
|
|
387
|
-
}
|
|
388
|
-
.gap-8 {
|
|
389
|
-
gap: var(--ds-space-8);
|
|
390
|
-
}
|
|
391
|
-
.gap-10 {
|
|
392
|
-
gap: var(--ds-space-10);
|
|
393
|
-
}
|
|
394
|
-
.gap-12 {
|
|
395
|
-
gap: var(--ds-space-12);
|
|
396
|
-
}
|
|
397
|
-
.gap-14 {
|
|
398
|
-
gap: var(--ds-space-14);
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
/* Margin */
|
|
402
|
-
.m-0 {
|
|
403
|
-
margin: 0;
|
|
404
|
-
}
|
|
405
|
-
.m-1 {
|
|
406
|
-
margin: var(--ds-space-1);
|
|
407
|
-
}
|
|
408
|
-
.m-2 {
|
|
409
|
-
margin: var(--ds-space-2);
|
|
410
|
-
}
|
|
411
|
-
.m-3 {
|
|
412
|
-
margin: var(--ds-space-3);
|
|
413
|
-
}
|
|
414
|
-
.m-4 {
|
|
415
|
-
margin: var(--ds-space-4);
|
|
416
|
-
}
|
|
417
|
-
.m-5 {
|
|
418
|
-
margin: var(--ds-space-5);
|
|
419
|
-
}
|
|
420
|
-
.m-6 {
|
|
421
|
-
margin: var(--ds-space-6);
|
|
422
|
-
}
|
|
423
|
-
.m-8 {
|
|
424
|
-
margin: var(--ds-space-8);
|
|
425
|
-
}
|
|
426
|
-
.m-10 {
|
|
427
|
-
margin: var(--ds-space-10);
|
|
428
|
-
}
|
|
429
|
-
.m-12 {
|
|
430
|
-
margin: var(--ds-space-12);
|
|
431
|
-
}
|
|
432
|
-
.m-14 {
|
|
433
|
-
margin: var(--ds-space-14);
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
.mx-0 {
|
|
437
|
-
margin-left: 0;
|
|
438
|
-
margin-right: 0;
|
|
439
|
-
}
|
|
440
|
-
.mx-1 {
|
|
441
|
-
margin-left: var(--ds-space-1);
|
|
442
|
-
margin-right: var(--ds-space-1);
|
|
443
|
-
}
|
|
444
|
-
.mx-2 {
|
|
445
|
-
margin-left: var(--ds-space-2);
|
|
446
|
-
margin-right: var(--ds-space-2);
|
|
447
|
-
}
|
|
448
|
-
.mx-3 {
|
|
449
|
-
margin-left: var(--ds-space-3);
|
|
450
|
-
margin-right: var(--ds-space-3);
|
|
451
|
-
}
|
|
452
|
-
.mx-4 {
|
|
453
|
-
margin-left: var(--ds-space-4);
|
|
454
|
-
margin-right: var(--ds-space-4);
|
|
455
|
-
}
|
|
456
|
-
.mx-5 {
|
|
457
|
-
margin-left: var(--ds-space-5);
|
|
458
|
-
margin-right: var(--ds-space-5);
|
|
459
|
-
}
|
|
460
|
-
.mx-6 {
|
|
461
|
-
margin-left: var(--ds-space-6);
|
|
462
|
-
margin-right: var(--ds-space-6);
|
|
463
|
-
}
|
|
464
|
-
.mx-8 {
|
|
465
|
-
margin-left: var(--ds-space-8);
|
|
466
|
-
margin-right: var(--ds-space-8);
|
|
467
|
-
}
|
|
468
|
-
.mx-10 {
|
|
469
|
-
margin-left: var(--ds-space-10);
|
|
470
|
-
margin-right: var(--ds-space-10);
|
|
471
|
-
}
|
|
472
|
-
.mx-12 {
|
|
473
|
-
margin-left: var(--ds-space-12);
|
|
474
|
-
margin-right: var(--ds-space-12);
|
|
475
|
-
}
|
|
476
|
-
.mx-14 {
|
|
477
|
-
margin-left: var(--ds-space-14);
|
|
478
|
-
margin-right: var(--ds-space-14);
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
.my-0 {
|
|
482
|
-
margin-top: 0;
|
|
483
|
-
margin-bottom: 0;
|
|
484
|
-
}
|
|
485
|
-
.my-1 {
|
|
486
|
-
margin-top: var(--ds-space-1);
|
|
487
|
-
margin-bottom: var(--ds-space-1);
|
|
488
|
-
}
|
|
489
|
-
.my-2 {
|
|
490
|
-
margin-top: var(--ds-space-2);
|
|
491
|
-
margin-bottom: var(--ds-space-2);
|
|
492
|
-
}
|
|
493
|
-
.my-3 {
|
|
494
|
-
margin-top: var(--ds-space-3);
|
|
495
|
-
margin-bottom: var(--ds-space-3);
|
|
496
|
-
}
|
|
497
|
-
.my-4 {
|
|
498
|
-
margin-top: var(--ds-space-4);
|
|
499
|
-
margin-bottom: var(--ds-space-4);
|
|
500
|
-
}
|
|
501
|
-
.my-5 {
|
|
502
|
-
margin-top: var(--ds-space-5);
|
|
503
|
-
margin-bottom: var(--ds-space-5);
|
|
504
|
-
}
|
|
505
|
-
.my-6 {
|
|
506
|
-
margin-top: var(--ds-space-6);
|
|
507
|
-
margin-bottom: var(--ds-space-6);
|
|
508
|
-
}
|
|
509
|
-
.my-8 {
|
|
510
|
-
margin-top: var(--ds-space-8);
|
|
511
|
-
margin-bottom: var(--ds-space-8);
|
|
512
|
-
}
|
|
513
|
-
.my-10 {
|
|
514
|
-
margin-top: var(--ds-space-10);
|
|
515
|
-
margin-bottom: var(--ds-space-10);
|
|
516
|
-
}
|
|
517
|
-
.my-12 {
|
|
518
|
-
margin-top: var(--ds-space-12);
|
|
519
|
-
margin-bottom: var(--ds-space-12);
|
|
520
|
-
}
|
|
521
|
-
.my-14 {
|
|
522
|
-
margin-top: var(--ds-space-14);
|
|
523
|
-
margin-bottom: var(--ds-space-14);
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
.mt-0 {
|
|
527
|
-
margin-top: 0;
|
|
528
|
-
}
|
|
529
|
-
.mt-1 {
|
|
530
|
-
margin-top: var(--ds-space-1);
|
|
531
|
-
}
|
|
532
|
-
.mt-2 {
|
|
533
|
-
margin-top: var(--ds-space-2);
|
|
534
|
-
}
|
|
535
|
-
.mt-3 {
|
|
536
|
-
margin-top: var(--ds-space-3);
|
|
537
|
-
}
|
|
538
|
-
.mt-4 {
|
|
539
|
-
margin-top: var(--ds-space-4);
|
|
540
|
-
}
|
|
541
|
-
.mt-5 {
|
|
542
|
-
margin-top: var(--ds-space-5);
|
|
543
|
-
}
|
|
544
|
-
.mt-6 {
|
|
545
|
-
margin-top: var(--ds-space-6);
|
|
546
|
-
}
|
|
547
|
-
.mt-8 {
|
|
548
|
-
margin-top: var(--ds-space-8);
|
|
549
|
-
}
|
|
550
|
-
.mt-10 {
|
|
551
|
-
margin-top: var(--ds-space-10);
|
|
552
|
-
}
|
|
553
|
-
.mt-12 {
|
|
554
|
-
margin-top: var(--ds-space-12);
|
|
555
|
-
}
|
|
556
|
-
.mt-14 {
|
|
557
|
-
margin-top: var(--ds-space-14);
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
.mb-0 {
|
|
561
|
-
margin-bottom: 0;
|
|
562
|
-
}
|
|
563
|
-
.mb-1 {
|
|
564
|
-
margin-bottom: var(--ds-space-1);
|
|
565
|
-
}
|
|
566
|
-
.mb-2 {
|
|
567
|
-
margin-bottom: var(--ds-space-2);
|
|
568
|
-
}
|
|
569
|
-
.mb-3 {
|
|
570
|
-
margin-bottom: var(--ds-space-3);
|
|
571
|
-
}
|
|
572
|
-
.mb-4 {
|
|
573
|
-
margin-bottom: var(--ds-space-4);
|
|
574
|
-
}
|
|
575
|
-
.mb-5 {
|
|
576
|
-
margin-bottom: var(--ds-space-5);
|
|
577
|
-
}
|
|
578
|
-
.mb-6 {
|
|
579
|
-
margin-bottom: var(--ds-space-6);
|
|
580
|
-
}
|
|
581
|
-
.mb-8 {
|
|
582
|
-
margin-bottom: var(--ds-space-8);
|
|
583
|
-
}
|
|
584
|
-
.mb-10 {
|
|
585
|
-
margin-bottom: var(--ds-space-10);
|
|
586
|
-
}
|
|
587
|
-
.mb-12 {
|
|
588
|
-
margin-bottom: var(--ds-space-12);
|
|
589
|
-
}
|
|
590
|
-
.mb-14 {
|
|
591
|
-
margin-bottom: var(--ds-space-14);
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
.ml-0 {
|
|
595
|
-
margin-left: 0;
|
|
596
|
-
}
|
|
597
|
-
.ml-1 {
|
|
598
|
-
margin-left: var(--ds-space-1);
|
|
599
|
-
}
|
|
600
|
-
.ml-2 {
|
|
601
|
-
margin-left: var(--ds-space-2);
|
|
602
|
-
}
|
|
603
|
-
.ml-3 {
|
|
604
|
-
margin-left: var(--ds-space-3);
|
|
605
|
-
}
|
|
606
|
-
.ml-4 {
|
|
607
|
-
margin-left: var(--ds-space-4);
|
|
608
|
-
}
|
|
609
|
-
.ml-5 {
|
|
610
|
-
margin-left: var(--ds-space-5);
|
|
611
|
-
}
|
|
612
|
-
.ml-6 {
|
|
613
|
-
margin-left: var(--ds-space-6);
|
|
614
|
-
}
|
|
615
|
-
.ml-8 {
|
|
616
|
-
margin-left: var(--ds-space-8);
|
|
617
|
-
}
|
|
618
|
-
.ml-10 {
|
|
619
|
-
margin-left: var(--ds-space-10);
|
|
620
|
-
}
|
|
621
|
-
.ml-12 {
|
|
622
|
-
margin-left: var(--ds-space-12);
|
|
623
|
-
}
|
|
624
|
-
.ml-14 {
|
|
625
|
-
margin-left: var(--ds-space-14);
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
.mr-0 {
|
|
629
|
-
margin-right: 0;
|
|
630
|
-
}
|
|
631
|
-
.mr-1 {
|
|
632
|
-
margin-right: var(--ds-space-1);
|
|
633
|
-
}
|
|
634
|
-
.mr-2 {
|
|
635
|
-
margin-right: var(--ds-space-2);
|
|
636
|
-
}
|
|
637
|
-
.mr-3 {
|
|
638
|
-
margin-right: var(--ds-space-3);
|
|
639
|
-
}
|
|
640
|
-
.mr-4 {
|
|
641
|
-
margin-right: var(--ds-space-4);
|
|
642
|
-
}
|
|
643
|
-
.mr-5 {
|
|
644
|
-
margin-right: var(--ds-space-5);
|
|
645
|
-
}
|
|
646
|
-
.mr-6 {
|
|
647
|
-
margin-right: var(--ds-space-6);
|
|
648
|
-
}
|
|
649
|
-
.mr-8 {
|
|
650
|
-
margin-right: var(--ds-space-8);
|
|
651
|
-
}
|
|
652
|
-
.mr-10 {
|
|
653
|
-
margin-right: var(--ds-space-10);
|
|
654
|
-
}
|
|
655
|
-
.mr-12 {
|
|
656
|
-
margin-right: var(--ds-space-12);
|
|
657
|
-
}
|
|
658
|
-
.mr-14 {
|
|
659
|
-
margin-right: var(--ds-space-14);
|
|
660
|
-
}
|
|
661
|
-
|
|
662
105
|
/* Background Color */
|
|
663
106
|
.bg-main {
|
|
664
107
|
background-color: var(--ds-surface-0);
|
|
@@ -38,14 +38,14 @@ describe('Box', () => {
|
|
|
38
38
|
expect(container.firstChild).toHaveClass('fullWidth');
|
|
39
39
|
});
|
|
40
40
|
|
|
41
|
-
it('applies numeric padding as
|
|
41
|
+
it('applies numeric padding as inline style', () => {
|
|
42
42
|
const { container } = render(<Box padding={4}>Content</Box>);
|
|
43
|
-
expect(container.firstChild).
|
|
43
|
+
expect((container.firstChild as HTMLElement).style.padding).toBe('var(--ds-space-4)');
|
|
44
44
|
});
|
|
45
45
|
|
|
46
|
-
it('applies numeric margin as
|
|
46
|
+
it('applies numeric margin as inline style', () => {
|
|
47
47
|
const { container } = render(<Box margin={2}>Content</Box>);
|
|
48
|
-
expect(container.firstChild).
|
|
48
|
+
expect((container.firstChild as HTMLElement).style.margin).toBe('var(--ds-space-2)');
|
|
49
49
|
});
|
|
50
50
|
|
|
51
51
|
it('applies string padding as inline style', () => {
|
|
@@ -54,7 +54,14 @@ export const Box = ({
|
|
|
54
54
|
height,
|
|
55
55
|
maxWidth,
|
|
56
56
|
gridTemplateColumns,
|
|
57
|
-
gap:
|
|
57
|
+
gap:
|
|
58
|
+
gap !== undefined
|
|
59
|
+
? gap === 0
|
|
60
|
+
? '0'
|
|
61
|
+
: typeof gap === 'number'
|
|
62
|
+
? `var(--ds-space-${gap})`
|
|
63
|
+
: gap
|
|
64
|
+
: undefined,
|
|
58
65
|
...getSpacingStyles(
|
|
59
66
|
'padding',
|
|
60
67
|
padding,
|
|
@@ -83,21 +90,6 @@ export const Box = ({
|
|
|
83
90
|
styles.box,
|
|
84
91
|
display && styles[`display-${display}`],
|
|
85
92
|
textAlign && styles[`textAlign-${textAlign}`],
|
|
86
|
-
typeof padding === 'number' && styles[`p-${padding}`],
|
|
87
|
-
typeof paddingX === 'number' && styles[`px-${paddingX}`],
|
|
88
|
-
typeof paddingY === 'number' && styles[`py-${paddingY}`],
|
|
89
|
-
typeof paddingTop === 'number' && styles[`pt-${paddingTop}`],
|
|
90
|
-
typeof paddingBottom === 'number' && styles[`pb-${paddingBottom}`],
|
|
91
|
-
typeof paddingLeft === 'number' && styles[`pl-${paddingLeft}`],
|
|
92
|
-
typeof paddingRight === 'number' && styles[`pr-${paddingRight}`],
|
|
93
|
-
typeof margin === 'number' && styles[`m-${margin}`],
|
|
94
|
-
typeof marginX === 'number' && styles[`mx-${marginX}`],
|
|
95
|
-
typeof marginY === 'number' && styles[`my-${marginY}`],
|
|
96
|
-
typeof marginTop === 'number' && styles[`mt-${marginTop}`],
|
|
97
|
-
typeof marginBottom === 'number' && styles[`mb-${marginBottom}`],
|
|
98
|
-
typeof marginLeft === 'number' && styles[`ml-${marginLeft}`],
|
|
99
|
-
typeof marginRight === 'number' && styles[`mr-${marginRight}`],
|
|
100
|
-
typeof gap === 'number' && styles[`gap-${gap}`],
|
|
101
93
|
flexDirection && styles[`flexDirection-${flexDirection}`],
|
|
102
94
|
alignItems && styles[`alignItems-${alignItems}`],
|
|
103
95
|
justifyContent && styles[`justifyContent-${justifyContent}`],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { HTMLAttributes, ReactNode
|
|
1
|
+
import type { ElementType, HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
|
|
3
3
|
export type BoxPadding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 14 | (string & {});
|
|
4
4
|
export type BoxMargin = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 14 | (string & {});
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import type { BoxPadding } from '../Box.types.ts';
|
|
2
2
|
|
|
3
|
+
const toSpaceValue = (value: BoxPadding): string => {
|
|
4
|
+
if (typeof value === 'number') {
|
|
5
|
+
return value === 0 ? '0' : `var(--ds-space-${value})`;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
return value;
|
|
9
|
+
};
|
|
10
|
+
|
|
3
11
|
export const getSpacingStyles = (
|
|
4
12
|
type: 'padding' | 'margin',
|
|
5
13
|
prop: BoxPadding | undefined,
|
|
@@ -12,29 +20,28 @@ export const getSpacingStyles = (
|
|
|
12
20
|
) => {
|
|
13
21
|
const styles: Record<string, string | undefined> = {};
|
|
14
22
|
|
|
15
|
-
if (
|
|
16
|
-
styles[type] = prop;
|
|
23
|
+
if (prop !== undefined) {
|
|
24
|
+
styles[type] = toSpaceValue(prop);
|
|
17
25
|
}
|
|
18
|
-
if (
|
|
19
|
-
styles[`${type}Top`] = propTop;
|
|
26
|
+
if (propTop !== undefined) {
|
|
27
|
+
styles[`${type}Top`] = toSpaceValue(propTop);
|
|
20
28
|
}
|
|
21
|
-
if (
|
|
22
|
-
styles[`${type}Bottom`] = propBottom;
|
|
29
|
+
if (propBottom !== undefined) {
|
|
30
|
+
styles[`${type}Bottom`] = toSpaceValue(propBottom);
|
|
23
31
|
}
|
|
24
|
-
if (
|
|
25
|
-
styles[`${type}Left`] = propLeft;
|
|
32
|
+
if (propLeft !== undefined) {
|
|
33
|
+
styles[`${type}Left`] = toSpaceValue(propLeft);
|
|
26
34
|
}
|
|
27
|
-
if (
|
|
28
|
-
styles[`${type}Right`] = propRight;
|
|
35
|
+
if (propRight !== undefined) {
|
|
36
|
+
styles[`${type}Right`] = toSpaceValue(propRight);
|
|
29
37
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
styles[`${type}
|
|
33
|
-
styles[`${type}Right`] = propX;
|
|
38
|
+
if (propX !== undefined) {
|
|
39
|
+
styles[`${type}Left`] = toSpaceValue(propX);
|
|
40
|
+
styles[`${type}Right`] = toSpaceValue(propX);
|
|
34
41
|
}
|
|
35
|
-
if (
|
|
36
|
-
styles[`${type}Top`] = propY;
|
|
37
|
-
styles[`${type}Bottom`] = propY;
|
|
42
|
+
if (propY !== undefined) {
|
|
43
|
+
styles[`${type}Top`] = toSpaceValue(propY);
|
|
44
|
+
styles[`${type}Bottom`] = toSpaceValue(propY);
|
|
38
45
|
}
|
|
39
46
|
|
|
40
47
|
return styles;
|