@driveflux/beam 2.0.1 → 2.0.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/dist/badge/Badge.d.ts +1 -1
- package/dist/base-styles.css +96 -265
- package/dist/box/Box.d.ts +1 -1
- package/dist/box/Box.d.ts.map +1 -1
- package/dist/button/Button.d.ts +1 -1
- package/dist/button/Button.js +12 -124
- package/dist/carousel/Carousel.js +58 -281
- package/dist/carousel/Carousel.js.map +1 -1
- package/dist/command/command.js.map +1 -1
- package/dist/datepicker/DatePicker.d.ts +2 -2
- package/dist/datepicker/DatePicker.d.ts.map +1 -1
- package/dist/datepicker/DatePicker.js.map +1 -1
- package/dist/datepicker/DatePickerPopover.js +35 -207
- package/dist/datepicker/DatePickerPopover.js.map +1 -1
- package/dist/divider/Divider.js +3 -63
- package/dist/divider/Divider.js.map +1 -1
- package/dist/drawer/index.js.map +1 -1
- package/dist/dropdown/Dropdown.js +26 -212
- package/dist/dropdown/Dropdown.js.map +1 -1
- package/dist/field-wrapper/FieldWrapper.js.map +1 -1
- package/dist/icons/IconDot.js.map +1 -1
- package/dist/input-select/InputSelect.js.map +1 -1
- package/dist/input-select/InputSelect.stories.d.ts.map +1 -1
- package/dist/popover/popover.js.map +1 -1
- package/dist/scroll-area/scroll-area.js +5 -113
- package/dist/scroll-area/scroll-area.js.map +1 -1
- package/dist/search-input-select/SearchInputSelect.js.map +1 -1
- package/dist/select/Select.js.map +1 -1
- package/dist/select/Select.stories.d.ts.map +1 -1
- package/dist/styles.css +3283 -2802
- package/dist/tabs/Tabs.js +9 -128
- package/dist/tabs/Tabs.js.map +1 -1
- package/dist/text/Text.d.ts +2 -2
- package/dist/text/Text.d.ts.map +1 -1
- package/package.json +4 -4
- package/dist/icons/IconCollapseAll.d.ts +0 -8
- package/dist/icons/IconCollapseAll.d.ts.map +0 -1
- package/dist/icons/IconCollapseAll.js +0 -97
- package/dist/icons/IconExpandAll.d.ts +0 -8
- package/dist/icons/IconExpandAll.d.ts.map +0 -1
- package/dist/icons/IconExpandAll.js +0 -97
- package/dist/icons/IconReport.d.ts +0 -9
- package/dist/icons/IconReport.d.ts.map +0 -1
- package/dist/icons/IconReport.js +0 -92
package/dist/badge/Badge.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
2
|
import type * as React from 'react';
|
|
3
3
|
declare const badgeVariants: (props?: ({
|
|
4
|
-
colorScheme?: "
|
|
4
|
+
colorScheme?: "info" | "warning" | "success" | "accent" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
7
7
|
}
|
package/dist/base-styles.css
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
@import "tailwindcss" important;
|
|
2
1
|
@import "./root.css";
|
|
3
2
|
@import "./datepicker/calendar.css";
|
|
4
|
-
|
|
5
|
-
@
|
|
6
|
-
|
|
7
|
-
@custom-variant dark (&:is(.dark *));
|
|
3
|
+
@tailwind base;
|
|
4
|
+
@tailwind components;
|
|
5
|
+
@tailwind utilities;
|
|
8
6
|
|
|
9
7
|
@font-face {
|
|
10
8
|
font-family: "Gotham-Black";
|
|
@@ -61,282 +59,115 @@
|
|
|
61
59
|
font-display: swap;
|
|
62
60
|
}
|
|
63
61
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
--font-black: Gotham-Black;
|
|
71
|
-
--font-light: Gotham-Light;
|
|
72
|
-
|
|
73
|
-
--text-xs: 10px;
|
|
74
|
-
--text-sm: 12px;
|
|
75
|
-
--text-base: 14px;
|
|
76
|
-
--text-xl: 16px;
|
|
77
|
-
--text-2xl: 18px;
|
|
78
|
-
--text-3xl: 20px;
|
|
79
|
-
--text-4xl: 22px;
|
|
80
|
-
--text-5xl: 24px;
|
|
81
|
-
--text-6xl: 26px;
|
|
82
|
-
--text-7xl: 28px;
|
|
83
|
-
--text-8xl: 30px;
|
|
84
|
-
|
|
85
|
-
--tracking-normal: 0;
|
|
86
|
-
--tracking-wide: 1px;
|
|
87
|
-
--tracking-wider: 2px;
|
|
88
|
-
--tracking-widest: 3px;
|
|
89
|
-
|
|
90
|
-
--color-primary1: #efeff0;
|
|
91
|
-
--color-primary2: #cacaca;
|
|
92
|
-
--color-primary3: #585858;
|
|
93
|
-
--color-primary4: #191919;
|
|
94
|
-
--color-accent4: #e55867;
|
|
95
|
-
--color-links1: #eefafd;
|
|
96
|
-
--color-links2: #ade0ee;
|
|
97
|
-
--color-links: #50c8e8;
|
|
98
|
-
--color-lite: #d6f0f7;
|
|
99
|
-
--color-alert4: #e24657;
|
|
100
|
-
--color-danger: #e24657;
|
|
101
|
-
--color-warning4: #f4b25c;
|
|
102
|
-
--color-success4: #4fd9c2;
|
|
103
|
-
--color-green: #4fd9c2;
|
|
104
|
-
--color-black: #000000;
|
|
105
|
-
--color-white: #ffffff;
|
|
106
|
-
--color-white-hover: #e6e6e6;
|
|
107
|
-
--color-placeholder: #f4f4f4;
|
|
108
|
-
--color-highlight: #f9f7d7;
|
|
109
|
-
|
|
110
|
-
--color-primary-25: #fafafa;
|
|
111
|
-
--color-primary-50: #d6f5f0;
|
|
112
|
-
--color-primary-100: #98e6d6;
|
|
113
|
-
--color-primary-200: #191919;
|
|
114
|
-
--color-primary-300: #191919;
|
|
115
|
-
--color-primary-400: #3bd5bb;
|
|
116
|
-
--color-primary-500: #000000;
|
|
117
|
-
--color-primary-600: #000000;
|
|
118
|
-
--color-primary-700: #000000;
|
|
119
|
-
--color-primary-800: #000000;
|
|
120
|
-
--color-primary-900: #000000;
|
|
121
|
-
|
|
122
|
-
--color-success-50: #d8f7f2;
|
|
123
|
-
--color-success-100: #98e6d6;
|
|
124
|
-
--color-success-200: #3bd5bc;
|
|
125
|
-
--color-success-300: #4fd9c2;
|
|
126
|
-
--color-success-400: #3bd5bb;
|
|
127
|
-
--color-success-500: #3bd5bb;
|
|
128
|
-
--color-success-600: #2ea692;
|
|
129
|
-
--color-success-700: #00825c;
|
|
130
|
-
--color-success-800: #00724d;
|
|
131
|
-
--color-success-900: #005530;
|
|
132
|
-
|
|
133
|
-
--color-accent-50: #fceaee;
|
|
134
|
-
--color-accent-100: #f8cad3;
|
|
135
|
-
--color-accent-200: #e55867;
|
|
136
|
-
--color-accent-300: #e55867;
|
|
137
|
-
--color-accent-400: #e24657;
|
|
138
|
-
--color-accent-500: #e24657;
|
|
139
|
-
--color-accent-600: #d8253f;
|
|
140
|
-
--color-accent-700: #c61a38;
|
|
141
|
-
--color-accent-800: #b91231;
|
|
142
|
-
--color-accent-900: #aa0026;
|
|
143
|
-
|
|
144
|
-
--color-warning-50: #fdf0de;
|
|
145
|
-
--color-warning-100: #f4b25c;
|
|
146
|
-
--color-warning-200: #f4b25c;
|
|
147
|
-
--color-warning-300: #f4b25c;
|
|
148
|
-
--color-warning-400: #f4b25c;
|
|
149
|
-
--color-warning-500: #f4b25c;
|
|
150
|
-
--color-warning-600: #bf7f2c;
|
|
151
|
-
--color-warning-700: #f4b25c;
|
|
152
|
-
--color-warning-800: #f4b25c;
|
|
153
|
-
--color-warning-900: #f4b25c;
|
|
154
|
-
|
|
155
|
-
--color-info-25: #eefafc;
|
|
156
|
-
--color-info-50: #cdf1fa;
|
|
157
|
-
--color-info-100: #50c8e8;
|
|
158
|
-
--color-info-200: #50c8e8;
|
|
159
|
-
--color-info-300: #50c8e8;
|
|
160
|
-
--color-info-400: #50c8e8;
|
|
161
|
-
--color-info-500: #50c8e8;
|
|
162
|
-
--color-info-600: #3ea5c0;
|
|
163
|
-
--color-info-700: #50c8e8;
|
|
164
|
-
--color-info-800: #50c8e8;
|
|
165
|
-
--color-info-900: #183c46;
|
|
166
|
-
|
|
167
|
-
--color-alert-50: #e24657;
|
|
168
|
-
--color-alert-100: #e24657;
|
|
169
|
-
--color-alert-200: #e24657;
|
|
170
|
-
--color-alert-300: #e24657;
|
|
171
|
-
--color-alert-400: #e24657;
|
|
172
|
-
--color-alert-500: #e24657;
|
|
173
|
-
--color-alert-600: #e24657;
|
|
174
|
-
--color-alert-700: #e24657;
|
|
175
|
-
--color-alert-800: #e24657;
|
|
176
|
-
--color-alert-900: #e24657;
|
|
177
|
-
|
|
178
|
-
--animate-accordion-down: accordion-down 0.2s ease-out;
|
|
179
|
-
--animate-accordion-up: accordion-up 0.2s ease-out;
|
|
180
|
-
--animate-spin: rotate 0.6s linear infinite;
|
|
181
|
-
|
|
182
|
-
--leading-14: 14px;
|
|
183
|
-
|
|
184
|
-
@keyframes accordion-down {
|
|
185
|
-
from {
|
|
186
|
-
height: 0;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
to {
|
|
190
|
-
height: var(--radix-accordion-content-height);
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
@keyframes accordion-up {
|
|
195
|
-
from {
|
|
196
|
-
height: var(--radix-accordion-content-height);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
to {
|
|
200
|
-
height: 0;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
@keyframes rotate {
|
|
205
|
-
0% {
|
|
206
|
-
transform: rotate(0deg);
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
100% {
|
|
210
|
-
transform: rotate(360deg);
|
|
211
|
-
}
|
|
212
|
-
}
|
|
62
|
+
html {
|
|
63
|
+
line-height: 1.15;
|
|
64
|
+
-webkit-text-size-adjust: 100%;
|
|
65
|
+
height: 100%;
|
|
66
|
+
box-sizing: border-box;
|
|
67
|
+
line-height: 1.65;
|
|
213
68
|
}
|
|
214
69
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
::file-selector-button {
|
|
221
|
-
border-color: var(--color-gray-200, currentcolor);
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
a {
|
|
225
|
-
color: var(--links);
|
|
226
|
-
text-decoration: none;
|
|
227
|
-
transition: color 0.2s ease;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
a:hover {
|
|
231
|
-
text-decoration: none;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
html {
|
|
235
|
-
line-height: 1.15;
|
|
236
|
-
-webkit-text-size-adjust: 100%;
|
|
237
|
-
height: 100%;
|
|
238
|
-
box-sizing: border-box;
|
|
239
|
-
line-height: 1.65;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
*,
|
|
243
|
-
*:before,
|
|
244
|
-
*:after {
|
|
245
|
-
box-sizing: inherit;
|
|
246
|
-
}
|
|
70
|
+
*,
|
|
71
|
+
*:before,
|
|
72
|
+
*:after {
|
|
73
|
+
box-sizing: inherit;
|
|
74
|
+
}
|
|
247
75
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
76
|
+
body {
|
|
77
|
+
position: relative;
|
|
78
|
+
min-height: 100%;
|
|
79
|
+
margin: 0;
|
|
80
|
+
|
|
81
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Oxygen", "Ubuntu",
|
|
82
|
+
"Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
|
|
83
|
+
font-weight: 400;
|
|
84
|
+
min-width: 320px;
|
|
85
|
+
direction: ltr;
|
|
86
|
+
font-feature-settings: "kern";
|
|
87
|
+
text-rendering: optimizeLegibility;
|
|
88
|
+
-webkit-font-smoothing: antialiased;
|
|
89
|
+
-moz-osx-font-smoothing: grayscale;
|
|
90
|
+
scroll-behavior: smooth;
|
|
91
|
+
font-family: var(--primaryNormal);
|
|
92
|
+
}
|
|
252
93
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
min-width: 320px;
|
|
258
|
-
direction: ltr;
|
|
259
|
-
font-feature-settings: "kern";
|
|
260
|
-
text-rendering: optimizeLegibility;
|
|
261
|
-
-webkit-font-smoothing: antialiased;
|
|
262
|
-
-moz-osx-font-smoothing: grayscale;
|
|
263
|
-
scroll-behavior: smooth;
|
|
264
|
-
font-family: var(--primaryNormal);
|
|
265
|
-
}
|
|
94
|
+
html,
|
|
95
|
+
body {
|
|
96
|
+
background-color: var(--white);
|
|
97
|
+
}
|
|
266
98
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
99
|
+
::selection {
|
|
100
|
+
background-color: var(--primary);
|
|
101
|
+
color: var(--white);
|
|
102
|
+
}
|
|
271
103
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
}
|
|
104
|
+
[role="grid"]:focus {
|
|
105
|
+
outline: none;
|
|
106
|
+
}
|
|
276
107
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
108
|
+
svg {
|
|
109
|
+
text-rendering: optimizeLegibility;
|
|
110
|
+
}
|
|
280
111
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
112
|
+
h1,
|
|
113
|
+
h2,
|
|
114
|
+
h3 {
|
|
115
|
+
margin: 0;
|
|
116
|
+
}
|
|
284
117
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
118
|
+
a {
|
|
119
|
+
color: var(--links);
|
|
120
|
+
text-decoration: none;
|
|
121
|
+
transition: color 0.2s ease;
|
|
122
|
+
}
|
|
290
123
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
text-align: left;
|
|
295
|
-
}
|
|
124
|
+
a:hover {
|
|
125
|
+
text-decoration: none;
|
|
126
|
+
}
|
|
296
127
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
128
|
+
* {
|
|
129
|
+
overflow: visible;
|
|
130
|
+
box-sizing: border-box;
|
|
131
|
+
text-align: left;
|
|
132
|
+
}
|
|
301
133
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
134
|
+
strong {
|
|
135
|
+
font-family: var(--primaryBold);
|
|
136
|
+
}
|
|
305
137
|
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
138
|
+
.svg-icon {
|
|
139
|
+
width: 100%;
|
|
140
|
+
height: 100%;
|
|
141
|
+
}
|
|
310
142
|
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
143
|
+
input:-webkit-autofill,
|
|
144
|
+
input:-webkit-autofill:hover,
|
|
145
|
+
input:-webkit-autofill:focus,
|
|
146
|
+
textarea:-webkit-autofill,
|
|
147
|
+
textarea:-webkit-autofill:hover,
|
|
148
|
+
textarea:-webkit-autofill:focus,
|
|
149
|
+
select:-webkit-autofill,
|
|
150
|
+
select:-webkit-autofill:hover,
|
|
151
|
+
select:-webkit-autofill:focus {
|
|
152
|
+
background-color: var(--white) !important;
|
|
153
|
+
-webkit-box-shadow: 0 0 0px 1000px var(--white) inset !important;
|
|
154
|
+
color: #000 !important;
|
|
155
|
+
font-size: 14px !important;
|
|
156
|
+
}
|
|
325
157
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
158
|
+
li::marker {
|
|
159
|
+
font-size: 15px;
|
|
160
|
+
margin-left: 10px;
|
|
161
|
+
}
|
|
330
162
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
163
|
+
.full-width {
|
|
164
|
+
width: 100%;
|
|
165
|
+
}
|
|
334
166
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
167
|
+
.h-safe-bottom-edge {
|
|
168
|
+
height: env(safe-area-inset-bottom);
|
|
169
|
+
}
|
|
338
170
|
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
}
|
|
171
|
+
::-ms-reveal {
|
|
172
|
+
display: none;
|
|
342
173
|
}
|
package/dist/box/Box.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
3
3
|
/**
|
|
4
4
|
* @default 'div'
|
|
5
5
|
*/
|
|
6
|
-
as?: 'input' |
|
|
6
|
+
as?: 'input' | React.HTMLElementType | React.SVGElementType;
|
|
7
7
|
type?: React.ButtonHTMLAttributes<HTMLButtonElement>['type'];
|
|
8
8
|
}
|
|
9
9
|
declare const Box: React.ForwardRefExoticComponent<BoxProps & React.RefAttributes<HTMLDivElement>>;
|
package/dist/box/Box.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../src/box/Box.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,MAAM,WAAW,QAAS,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACrE;;OAEG;IACH,EAAE,CAAC,EAAE,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../src/box/Box.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,MAAM,WAAW,QAAS,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACrE;;OAEG;IACH,EAAE,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC,eAAe,GAAG,KAAK,CAAC,cAAc,CAAA;IAC3D,IAAI,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAA;CAC5D;AAED,QAAA,MAAM,GAAG,iFAIR,CAAA;AAGD,eAAe,GAAG,CAAA"}
|
package/dist/button/Button.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { type VariantProps } from 'class-variance-authority';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
4
|
variant?: "outline" | "outline-white" | null | undefined;
|
|
5
|
-
colorScheme?: "link" | "default" | "
|
|
5
|
+
colorScheme?: "link" | "default" | "accent" | "warning" | "success" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
8
|
asChild?: boolean;
|
package/dist/button/Button.js
CHANGED
|
@@ -1,83 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
if (key in obj) {
|
|
3
|
-
Object.defineProperty(obj, key, {
|
|
4
|
-
value: value,
|
|
5
|
-
enumerable: true,
|
|
6
|
-
configurable: true,
|
|
7
|
-
writable: true
|
|
8
|
-
});
|
|
9
|
-
} else {
|
|
10
|
-
obj[key] = value;
|
|
11
|
-
}
|
|
12
|
-
return obj;
|
|
13
|
-
}
|
|
14
|
-
function _object_spread(target) {
|
|
15
|
-
for(var i = 1; i < arguments.length; i++){
|
|
16
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
17
|
-
var ownKeys = Object.keys(source);
|
|
18
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
19
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
20
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
21
|
-
}));
|
|
22
|
-
}
|
|
23
|
-
ownKeys.forEach(function(key) {
|
|
24
|
-
_define_property(target, key, source[key]);
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
return target;
|
|
28
|
-
}
|
|
29
|
-
function ownKeys(object, enumerableOnly) {
|
|
30
|
-
var keys = Object.keys(object);
|
|
31
|
-
if (Object.getOwnPropertySymbols) {
|
|
32
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
33
|
-
if (enumerableOnly) {
|
|
34
|
-
symbols = symbols.filter(function(sym) {
|
|
35
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
keys.push.apply(keys, symbols);
|
|
39
|
-
}
|
|
40
|
-
return keys;
|
|
41
|
-
}
|
|
42
|
-
function _object_spread_props(target, source) {
|
|
43
|
-
source = source != null ? source : {};
|
|
44
|
-
if (Object.getOwnPropertyDescriptors) {
|
|
45
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
46
|
-
} else {
|
|
47
|
-
ownKeys(Object(source)).forEach(function(key) {
|
|
48
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
return target;
|
|
52
|
-
}
|
|
53
|
-
function _object_without_properties(source, excluded) {
|
|
54
|
-
if (source == null) return {};
|
|
55
|
-
var target = _object_without_properties_loose(source, excluded);
|
|
56
|
-
var key, i;
|
|
57
|
-
if (Object.getOwnPropertySymbols) {
|
|
58
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
59
|
-
for(i = 0; i < sourceSymbolKeys.length; i++){
|
|
60
|
-
key = sourceSymbolKeys[i];
|
|
61
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
62
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
63
|
-
target[key] = source[key];
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
return target;
|
|
67
|
-
}
|
|
68
|
-
function _object_without_properties_loose(source, excluded) {
|
|
69
|
-
if (source == null) return {};
|
|
70
|
-
var target = {};
|
|
71
|
-
var sourceKeys = Object.keys(source);
|
|
72
|
-
var key, i;
|
|
73
|
-
for(i = 0; i < sourceKeys.length; i++){
|
|
74
|
-
key = sourceKeys[i];
|
|
75
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
76
|
-
target[key] = source[key];
|
|
77
|
-
}
|
|
78
|
-
return target;
|
|
79
|
-
}
|
|
80
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
81
2
|
import { Slot } from '@radix-ui/react-slot';
|
|
82
3
|
import { cva } from 'class-variance-authority';
|
|
83
4
|
import * as React from 'react';
|
|
@@ -85,60 +6,27 @@ import LoadingAnimation from '../animations/LoadingAnimation.js';
|
|
|
85
6
|
import Box from '../box/Box.js';
|
|
86
7
|
import HStack from '../hstack/HStack.js';
|
|
87
8
|
import { cn } from '../utils.js';
|
|
88
|
-
|
|
9
|
+
const buttonVariants = cva('inline-flex items-center justify-center whitespace-nowrap text-xs px-4 py-6 h-12 bg-black hover:bg-primary4 text-white font-bold uppercase tracking-wider disabled:pointer-events-none disabled:opacity-30 ', {
|
|
89
10
|
variants: {
|
|
90
11
|
variant: {
|
|
91
12
|
outline: 'border border-black bg-white text-black hover:text-white hover:bg-black',
|
|
92
|
-
'outline-white': 'border border-white bg-transparent text-white hover:text-black hover:bg-white'
|
|
13
|
+
'outline-white': 'border border-white bg-transparent text-white hover:text-black hover:bg-white',
|
|
93
14
|
},
|
|
94
15
|
colorScheme: {
|
|
95
16
|
default: 'bg-black',
|
|
96
17
|
accent: 'bg-accent-500 hover:bg-accent4',
|
|
97
18
|
link: 'bg-links hover:bg-links2',
|
|
98
19
|
warning: 'bg-warning4 hover:bg-warning-500',
|
|
99
|
-
success: 'bg-success-200 hover:bg-success4'
|
|
100
|
-
}
|
|
101
|
-
}
|
|
20
|
+
success: 'bg-success-200 hover:bg-success4',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
102
23
|
});
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
"asChild",
|
|
109
|
-
"leftIcon",
|
|
110
|
-
"rightIcon",
|
|
111
|
-
"isDisabled",
|
|
112
|
-
"isLoading",
|
|
113
|
-
"children"
|
|
114
|
-
]);
|
|
115
|
-
var Comp = asChild ? Slot : 'button';
|
|
116
|
-
return /*#__PURE__*/ _jsx(Comp, _object_spread_props(_object_spread({
|
|
117
|
-
className: cn('min-w-32', buttonVariants({
|
|
118
|
-
variant: variant,
|
|
119
|
-
colorScheme: colorScheme,
|
|
120
|
-
className: className
|
|
121
|
-
}), isLoading ? 'disabled:!opacity-100' : ''),
|
|
122
|
-
ref: ref,
|
|
123
|
-
disabled: isDisabled || isLoading
|
|
124
|
-
}, props), {
|
|
125
|
-
children: /*#__PURE__*/ _jsx(HStack, {
|
|
126
|
-
className: 'gap-2 items-center',
|
|
127
|
-
children: isLoading ? /*#__PURE__*/ _jsx(LoadingAnimation, {
|
|
128
|
-
colorScheme: colorScheme === 'default' || colorScheme === undefined ? 'default' : 'white'
|
|
129
|
-
}) : /*#__PURE__*/ _jsxs(_Fragment, {
|
|
130
|
-
children: [
|
|
131
|
-
leftIcon && /*#__PURE__*/ _jsx(Box, {
|
|
132
|
-
children: leftIcon
|
|
133
|
-
}),
|
|
134
|
-
children,
|
|
135
|
-
rightIcon && /*#__PURE__*/ _jsx(Box, {
|
|
136
|
-
children: rightIcon
|
|
137
|
-
})
|
|
138
|
-
]
|
|
139
|
-
})
|
|
140
|
-
})
|
|
141
|
-
}));
|
|
24
|
+
const Button = React.forwardRef(({ className, variant, colorScheme, asChild = false, leftIcon, rightIcon, isDisabled, isLoading, children, ...props }, ref) => {
|
|
25
|
+
const Comp = asChild ? Slot : 'button';
|
|
26
|
+
return (_jsx(Comp, { className: cn('min-w-32', buttonVariants({ variant, colorScheme, className }), isLoading ? 'disabled:opacity-100!' : ''), ref: ref, disabled: isDisabled || isLoading, ...props, children: _jsx(HStack, { className: 'gap-2 items-center', children: isLoading ? (_jsx(LoadingAnimation, { colorScheme: colorScheme === 'default' || colorScheme === undefined
|
|
27
|
+
? 'default'
|
|
28
|
+
: 'white' })) : (_jsxs(_Fragment, { children: [leftIcon && _jsx(Box, { children: leftIcon }), children, rightIcon && _jsx(Box, { children: rightIcon })] })) }) }));
|
|
142
29
|
});
|
|
143
30
|
Button.displayName = 'Button';
|
|
144
31
|
export default Button;
|
|
32
|
+
//# sourceMappingURL=Button.js.map
|