bako-ui 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +50 -6
- package/dist/index.d.ts +50 -6
- package/dist/index.js +228 -52
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +181 -30
- package/dist/index.mjs.map +1 -1
- package/package.json +14 -15
package/dist/index.js
CHANGED
|
@@ -2,12 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
var react = require('@chakra-ui/react');
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
-
var
|
|
5
|
+
var React = require('react');
|
|
6
6
|
var reactDom = require('react-dom');
|
|
7
7
|
var reactHookForm = require('react-hook-form');
|
|
8
8
|
var useMaskInput = require('use-mask-input');
|
|
9
9
|
var anatomy = require('@chakra-ui/react/anatomy');
|
|
10
10
|
|
|
11
|
+
function _interopNamespace(e) {
|
|
12
|
+
if (e && e.__esModule) return e;
|
|
13
|
+
var n = Object.create(null);
|
|
14
|
+
if (e) {
|
|
15
|
+
Object.keys(e).forEach(function (k) {
|
|
16
|
+
if (k !== 'default') {
|
|
17
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
18
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return e[k]; }
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
n.default = e;
|
|
26
|
+
return Object.freeze(n);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
30
|
+
|
|
11
31
|
// src/components/Stack/stack.tsx
|
|
12
32
|
var Stack = react.Stack;
|
|
13
33
|
var HStack = react.HStack;
|
|
@@ -32,7 +52,7 @@ function Button({
|
|
|
32
52
|
var Card = react.Card;
|
|
33
53
|
var card_default = Card;
|
|
34
54
|
var Clipboard = react.Clipboard;
|
|
35
|
-
var close_button_default =
|
|
55
|
+
var close_button_default = React.forwardRef(
|
|
36
56
|
function CloseButton(props, ref) {
|
|
37
57
|
return /* @__PURE__ */ jsxRuntime.jsx(react.CloseButton, { ref, ...props });
|
|
38
58
|
}
|
|
@@ -40,7 +60,7 @@ var close_button_default = react$1.forwardRef(
|
|
|
40
60
|
function Container(props) {
|
|
41
61
|
return /* @__PURE__ */ jsxRuntime.jsx(react.Container, { ...props });
|
|
42
62
|
}
|
|
43
|
-
var icon_button_default =
|
|
63
|
+
var icon_button_default = React.forwardRef(
|
|
44
64
|
function IconButton(props, ref) {
|
|
45
65
|
return /* @__PURE__ */ jsxRuntime.jsx(react.IconButton, { ref, ...props });
|
|
46
66
|
}
|
|
@@ -48,16 +68,16 @@ var icon_button_default = react$1.forwardRef(
|
|
|
48
68
|
var QrCode = react.QrCode;
|
|
49
69
|
var separator_default = react.Separator;
|
|
50
70
|
var image_default = react.Image;
|
|
51
|
-
var Icon =
|
|
71
|
+
var Icon = React.forwardRef(function Icon2(props, ref) {
|
|
52
72
|
return /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { ref, ...props });
|
|
53
73
|
});
|
|
54
74
|
var icon_default = Icon;
|
|
55
|
-
var link_default =
|
|
75
|
+
var link_default = React.forwardRef(
|
|
56
76
|
function Link(props, ref) {
|
|
57
77
|
return /* @__PURE__ */ jsxRuntime.jsx(react.Link, { ref, ...props });
|
|
58
78
|
}
|
|
59
79
|
);
|
|
60
|
-
var link_overlay_default =
|
|
80
|
+
var link_overlay_default = React.forwardRef(
|
|
61
81
|
function LinkOverlay(props, ref) {
|
|
62
82
|
return /* @__PURE__ */ jsxRuntime.jsx(react.LinkOverlay, { ref, ...props });
|
|
63
83
|
}
|
|
@@ -66,7 +86,7 @@ var loader_default = react.Spinner;
|
|
|
66
86
|
var Skeleton = react.Skeleton;
|
|
67
87
|
var SkeletonCircle = react.SkeletonCircle;
|
|
68
88
|
var SkeletonText = react.SkeletonText;
|
|
69
|
-
var Checkbox =
|
|
89
|
+
var Checkbox = React.forwardRef(
|
|
70
90
|
function Checkbox2(props, ref) {
|
|
71
91
|
const { icon, children, inputProps, rootRef, ...rest } = props;
|
|
72
92
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Checkbox.Root, { ref: rootRef, ...rest, children: [
|
|
@@ -81,7 +101,7 @@ var Combobox = {
|
|
|
81
101
|
...react.Combobox,
|
|
82
102
|
Portal: react.Portal
|
|
83
103
|
};
|
|
84
|
-
var input_default =
|
|
104
|
+
var input_default = React.forwardRef(
|
|
85
105
|
function Input(props, ref) {
|
|
86
106
|
return /* @__PURE__ */ jsxRuntime.jsx(react.Input, { ref, ...props });
|
|
87
107
|
}
|
|
@@ -94,8 +114,8 @@ function MoneyField({
|
|
|
94
114
|
decimalScale = 2,
|
|
95
115
|
...props
|
|
96
116
|
}) {
|
|
97
|
-
const inputRef =
|
|
98
|
-
const config2 =
|
|
117
|
+
const inputRef = React.useRef(null);
|
|
118
|
+
const config2 = React.useMemo(
|
|
99
119
|
() => ({
|
|
100
120
|
thousandSeparator,
|
|
101
121
|
decimalSeparator,
|
|
@@ -103,7 +123,7 @@ function MoneyField({
|
|
|
103
123
|
}),
|
|
104
124
|
[thousandSeparator, decimalSeparator, decimalScale]
|
|
105
125
|
);
|
|
106
|
-
const formatNumber =
|
|
126
|
+
const formatNumber = React.useCallback(
|
|
107
127
|
(num) => {
|
|
108
128
|
const numStr = String(num).replace(/[^\d.-]/g, "");
|
|
109
129
|
if (!numStr || numStr === "-") return "";
|
|
@@ -121,17 +141,17 @@ function MoneyField({
|
|
|
121
141
|
},
|
|
122
142
|
[config2]
|
|
123
143
|
);
|
|
124
|
-
const unformatNumber =
|
|
144
|
+
const unformatNumber = React.useCallback(
|
|
125
145
|
(formatted) => {
|
|
126
146
|
return formatted.replace(new RegExp(`\\${config2.thousandSeparator}`, "g"), "").replace(new RegExp(`\\${config2.decimalSeparator}`, "g"), ".");
|
|
127
147
|
},
|
|
128
148
|
[config2]
|
|
129
149
|
);
|
|
130
|
-
const displayValue =
|
|
150
|
+
const displayValue = React.useMemo(() => {
|
|
131
151
|
if (!value && value !== 0) return "";
|
|
132
152
|
return formatNumber(value);
|
|
133
153
|
}, [value, formatNumber]);
|
|
134
|
-
const handleChange =
|
|
154
|
+
const handleChange = React.useCallback(
|
|
135
155
|
(event) => {
|
|
136
156
|
const inputValue = event.target.value;
|
|
137
157
|
const cursorPosition = event.target.selectionStart || 0;
|
|
@@ -164,12 +184,12 @@ function MoneyField({
|
|
|
164
184
|
}
|
|
165
185
|
);
|
|
166
186
|
}
|
|
167
|
-
var RadioGroup =
|
|
187
|
+
var RadioGroup = React.forwardRef(
|
|
168
188
|
function RadioGroup2(props, ref) {
|
|
169
189
|
return /* @__PURE__ */ jsxRuntime.jsx(react.RadioGroup.Root, { ref, spaceX: 2, ...props });
|
|
170
190
|
}
|
|
171
191
|
);
|
|
172
|
-
var Radio =
|
|
192
|
+
var Radio = React.forwardRef(
|
|
173
193
|
function Radio2(props, ref) {
|
|
174
194
|
const { children, inputProps, ...rest } = props;
|
|
175
195
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.RadioGroup.Item, { ...rest, children: [
|
|
@@ -223,7 +243,8 @@ function RhfCombobox({
|
|
|
223
243
|
variant,
|
|
224
244
|
clearTriggerIcon,
|
|
225
245
|
showTrigger = false,
|
|
226
|
-
allowCustomValue = true
|
|
246
|
+
allowCustomValue = true,
|
|
247
|
+
onInputValueChange
|
|
227
248
|
}) {
|
|
228
249
|
const {
|
|
229
250
|
field: { value, onChange, ref, ...rest }
|
|
@@ -233,28 +254,40 @@ function RhfCombobox({
|
|
|
233
254
|
initialItems: options,
|
|
234
255
|
filter: contains
|
|
235
256
|
});
|
|
236
|
-
const [inputValue, setInputValue] =
|
|
237
|
-
const
|
|
257
|
+
const [inputValue, setInputValue] = React.useState(value || "");
|
|
258
|
+
const [isTyping, setIsTyping] = React.useState(false);
|
|
259
|
+
React.useEffect(() => {
|
|
260
|
+
if (isTyping) return;
|
|
261
|
+
if (value !== inputValue) {
|
|
262
|
+
setInputValue(value || "");
|
|
263
|
+
}
|
|
264
|
+
}, [value, inputValue, isTyping]);
|
|
265
|
+
const handleValueChange = React.useCallback(
|
|
238
266
|
(details) => {
|
|
239
267
|
const newValue = details.value[0] || "";
|
|
268
|
+
setIsTyping(false);
|
|
240
269
|
onChange(newValue);
|
|
241
270
|
setInputValue(newValue);
|
|
271
|
+
onInputValueChange == null ? void 0 : onInputValueChange(newValue);
|
|
242
272
|
},
|
|
243
|
-
[onChange]
|
|
273
|
+
[onChange, onInputValueChange]
|
|
244
274
|
);
|
|
245
|
-
const handleInputValueChange =
|
|
275
|
+
const handleInputValueChange = React.useCallback(
|
|
246
276
|
(details) => {
|
|
277
|
+
setIsTyping(true);
|
|
247
278
|
setInputValue(details.inputValue);
|
|
248
279
|
reactDom.flushSync(() => {
|
|
249
280
|
filter(details.inputValue);
|
|
250
281
|
});
|
|
282
|
+
onInputValueChange == null ? void 0 : onInputValueChange(details.inputValue);
|
|
251
283
|
if (allowCustomValue) {
|
|
252
284
|
onChange(details.inputValue);
|
|
253
285
|
}
|
|
286
|
+
setTimeout(() => setIsTyping(false), 100);
|
|
254
287
|
},
|
|
255
|
-
[filter, allowCustomValue, onChange]
|
|
288
|
+
[filter, allowCustomValue, onChange, onInputValueChange]
|
|
256
289
|
);
|
|
257
|
-
const handleOpenChange =
|
|
290
|
+
const handleOpenChange = React.useCallback(
|
|
258
291
|
(details) => {
|
|
259
292
|
var _a, _b;
|
|
260
293
|
if (allowCustomValue && details.open && inputValue.trim() !== "") {
|
|
@@ -267,7 +300,7 @@ function RhfCombobox({
|
|
|
267
300
|
},
|
|
268
301
|
[slotProps == null ? void 0 : slotProps.root, allowCustomValue, inputValue, collection.items.length]
|
|
269
302
|
);
|
|
270
|
-
const hasValue =
|
|
303
|
+
const hasValue = React.useMemo(() => {
|
|
271
304
|
if (!value) {
|
|
272
305
|
return false;
|
|
273
306
|
}
|
|
@@ -314,6 +347,7 @@ function RhfCombobox({
|
|
|
314
347
|
invalid: !!error,
|
|
315
348
|
allowCustomValue,
|
|
316
349
|
selectionBehavior: "preserve",
|
|
350
|
+
defaultValue: [defaultValue || ""],
|
|
317
351
|
...slotProps == null ? void 0 : slotProps.root,
|
|
318
352
|
children: [
|
|
319
353
|
/* @__PURE__ */ jsxRuntime.jsxs(react.Combobox.Control, { children: [
|
|
@@ -377,7 +411,7 @@ function RhfInput({
|
|
|
377
411
|
field: { value, onChange, ref, ...rest }
|
|
378
412
|
} = reactHookForm.useController({ control, defaultValue, name });
|
|
379
413
|
const { inputGroup } = slotProps || {};
|
|
380
|
-
const hasValue =
|
|
414
|
+
const hasValue = React.useMemo(
|
|
381
415
|
() => value != null && value !== "" && value.toString().length > 0,
|
|
382
416
|
[value]
|
|
383
417
|
);
|
|
@@ -440,7 +474,7 @@ function RhfMoneyField({
|
|
|
440
474
|
const {
|
|
441
475
|
field: { value, onChange, ...rest }
|
|
442
476
|
} = reactHookForm.useController({ control, defaultValue, name });
|
|
443
|
-
const hasValue =
|
|
477
|
+
const hasValue = React.useMemo(() => {
|
|
444
478
|
return String(value).length > 0;
|
|
445
479
|
}, [value]);
|
|
446
480
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Field.Root, { invalid: !!error, children: [
|
|
@@ -489,7 +523,7 @@ var Select = {
|
|
|
489
523
|
...react.Select,
|
|
490
524
|
Portal: react.Portal
|
|
491
525
|
};
|
|
492
|
-
var Switch =
|
|
526
|
+
var Switch = React.forwardRef(
|
|
493
527
|
function Switch2(props, ref) {
|
|
494
528
|
const { children, inputProps, thumbLabel, ...rest } = props;
|
|
495
529
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Switch.Root, { ...rest, children: [
|
|
@@ -511,7 +545,7 @@ var defaultMaskOptions = {
|
|
|
511
545
|
showMaskOnFocus: false,
|
|
512
546
|
showMaskOnHover: false
|
|
513
547
|
};
|
|
514
|
-
var TextMask =
|
|
548
|
+
var TextMask = React.forwardRef(
|
|
515
549
|
({ mask, maskOptions, ...props }, ref) => {
|
|
516
550
|
const mergedMaskOptions = {
|
|
517
551
|
...defaultMaskOptions,
|
|
@@ -539,16 +573,53 @@ function AvatarGroup(props) {
|
|
|
539
573
|
return /* @__PURE__ */ jsxRuntime.jsx(react.Group, { ...props });
|
|
540
574
|
}
|
|
541
575
|
var EmptyState = react.EmptyState;
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
576
|
+
var Progress = React.forwardRef(
|
|
577
|
+
function Progress2(props, ref) {
|
|
578
|
+
const {
|
|
579
|
+
showValueText,
|
|
580
|
+
valueText,
|
|
581
|
+
label,
|
|
582
|
+
trackProps,
|
|
583
|
+
rangeProps,
|
|
584
|
+
labelProps,
|
|
585
|
+
valueTextProps,
|
|
586
|
+
...rootProps
|
|
587
|
+
} = props;
|
|
588
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.Progress.Root, { ref, ...rootProps, children: [
|
|
589
|
+
label && /* @__PURE__ */ jsxRuntime.jsx(react.Progress.Label, { ...labelProps, children: label }),
|
|
590
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Progress.Track, { ...trackProps, children: /* @__PURE__ */ jsxRuntime.jsx(react.Progress.Range, { ...rangeProps }) }),
|
|
591
|
+
showValueText && /* @__PURE__ */ jsxRuntime.jsx(react.Progress.ValueText, { ...valueTextProps, children: valueText })
|
|
592
|
+
] });
|
|
593
|
+
}
|
|
594
|
+
);
|
|
595
|
+
var ProgressRoot = react.Progress.Root;
|
|
596
|
+
var ProgressTrack = react.Progress.Track;
|
|
597
|
+
var ProgressRange = react.Progress.Range;
|
|
598
|
+
var ProgressLabel = react.Progress.Label;
|
|
599
|
+
var ProgressValueText = react.Progress.ValueText;
|
|
600
|
+
var Tooltip = React__namespace.forwardRef(
|
|
601
|
+
function Tooltip2(props, ref) {
|
|
602
|
+
const {
|
|
603
|
+
showArrow,
|
|
604
|
+
children,
|
|
605
|
+
disabled,
|
|
606
|
+
portalled = true,
|
|
607
|
+
content,
|
|
608
|
+
contentProps,
|
|
609
|
+
portalRef,
|
|
610
|
+
...rest
|
|
611
|
+
} = props;
|
|
612
|
+
if (disabled) return children;
|
|
613
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.Tooltip.Root, { ...rest, children: [
|
|
614
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Tooltip.Trigger, { asChild: true, children }),
|
|
615
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Portal, { disabled: !portalled, container: portalRef, children: /* @__PURE__ */ jsxRuntime.jsx(react.Tooltip.Positioner, { children: /* @__PURE__ */ jsxRuntime.jsxs(react.Tooltip.Content, { ref, ...contentProps, children: [
|
|
616
|
+
showArrow && /* @__PURE__ */ jsxRuntime.jsx(react.Tooltip.Arrow, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Tooltip.ArrowTip, {}) }),
|
|
617
|
+
content
|
|
618
|
+
] }) }) })
|
|
619
|
+
] });
|
|
620
|
+
}
|
|
621
|
+
);
|
|
622
|
+
var tooltip_default = Tooltip;
|
|
552
623
|
var Dialog = {
|
|
553
624
|
...react.Dialog,
|
|
554
625
|
Portal: react.Portal
|
|
@@ -737,10 +808,10 @@ var semanticColors = react.defineSemanticTokens.colors({
|
|
|
737
808
|
}
|
|
738
809
|
},
|
|
739
810
|
panel: {
|
|
740
|
-
value: { _light: "{colors.gray.
|
|
811
|
+
value: { _light: "{colors.gray.700}", _dark: "{colors.gray.700}" }
|
|
741
812
|
},
|
|
742
813
|
muted: {
|
|
743
|
-
value: { _light: "{colors.gray.
|
|
814
|
+
value: { _light: "{colors.gray.600}", _dark: "{colors.gray.600}" }
|
|
744
815
|
}
|
|
745
816
|
},
|
|
746
817
|
fg: {
|
|
@@ -762,7 +833,7 @@ var semanticColors = react.defineSemanticTokens.colors({
|
|
|
762
833
|
value: { _light: "white", _dark: "white" }
|
|
763
834
|
},
|
|
764
835
|
fg: {
|
|
765
|
-
value: { _light: "{colors.red.
|
|
836
|
+
value: { _light: "{colors.red.50}", _dark: "{colors.red.50}" }
|
|
766
837
|
},
|
|
767
838
|
subtle: {
|
|
768
839
|
value: { _light: "{colors.red.100}", _dark: "{colors.red.900}" }
|
|
@@ -810,8 +881,8 @@ var semanticColors = react.defineSemanticTokens.colors({
|
|
|
810
881
|
},
|
|
811
882
|
border: {
|
|
812
883
|
value: {
|
|
813
|
-
_light: "{colors.gray.
|
|
814
|
-
_dark: "{colors.gray.
|
|
884
|
+
_light: "{colors.gray.700}",
|
|
885
|
+
_dark: "{colors.gray.700}"
|
|
815
886
|
}
|
|
816
887
|
}
|
|
817
888
|
},
|
|
@@ -820,7 +891,7 @@ var semanticColors = react.defineSemanticTokens.colors({
|
|
|
820
891
|
value: { _light: "white", _dark: "white" }
|
|
821
892
|
},
|
|
822
893
|
fg: {
|
|
823
|
-
value: { _light: "{colors.green.
|
|
894
|
+
value: { _light: "{colors.green.50}", _dark: "{colors.green.50}" }
|
|
824
895
|
},
|
|
825
896
|
subtle: {
|
|
826
897
|
value: { _light: "{colors.green.100}", _dark: "{colors.green.100}" }
|
|
@@ -843,7 +914,7 @@ var semanticColors = react.defineSemanticTokens.colors({
|
|
|
843
914
|
value: { _light: "black", _dark: "black" }
|
|
844
915
|
},
|
|
845
916
|
fg: {
|
|
846
|
-
value: { _light: "{colors.yellow.
|
|
917
|
+
value: { _light: "{colors.yellow.50}", _dark: "{colors.yellow.50}" }
|
|
847
918
|
},
|
|
848
919
|
subtle: {
|
|
849
920
|
value: { _light: "{colors.yellow.150}", _dark: "{colors.yellow.150}" }
|
|
@@ -860,6 +931,14 @@ var semanticColors = react.defineSemanticTokens.colors({
|
|
|
860
931
|
focusRing: {
|
|
861
932
|
value: { _light: "{colors.yellow.500}", _dark: "{colors.yellow.500}" }
|
|
862
933
|
}
|
|
934
|
+
},
|
|
935
|
+
blue: {
|
|
936
|
+
solid: {
|
|
937
|
+
value: { _light: "{colors.blue.200}", _dark: "{colors.blue.200}" }
|
|
938
|
+
},
|
|
939
|
+
fg: {
|
|
940
|
+
value: { _light: "{colors.blue.50}", _dark: "{colors.blue.50}" }
|
|
941
|
+
}
|
|
863
942
|
}
|
|
864
943
|
});
|
|
865
944
|
|
|
@@ -867,6 +946,26 @@ var semanticColors = react.defineSemanticTokens.colors({
|
|
|
867
946
|
var semanticTokens = {
|
|
868
947
|
colors: semanticColors
|
|
869
948
|
};
|
|
949
|
+
var accordionSlotRecipe = react.defineSlotRecipe({
|
|
950
|
+
slots: anatomy.accordionAnatomy.keys(),
|
|
951
|
+
base: {
|
|
952
|
+
root: {
|
|
953
|
+
"--accordion-radius": "radii.lg"
|
|
954
|
+
}
|
|
955
|
+
},
|
|
956
|
+
variants: {
|
|
957
|
+
variant: {
|
|
958
|
+
subtle: {
|
|
959
|
+
item: {
|
|
960
|
+
bg: "bg.panel",
|
|
961
|
+
_open: {
|
|
962
|
+
bg: "bg.panel"
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
});
|
|
870
969
|
var menuSlotRecipe = react.defineSlotRecipe({
|
|
871
970
|
slots: anatomy.menuAnatomy.keys(),
|
|
872
971
|
base: {
|
|
@@ -889,6 +988,28 @@ var menuSlotRecipe = react.defineSlotRecipe({
|
|
|
889
988
|
}
|
|
890
989
|
}
|
|
891
990
|
});
|
|
991
|
+
var progessSlotRecipes = react.defineSlotRecipe({
|
|
992
|
+
slots: anatomy.progressAnatomy.keys(),
|
|
993
|
+
variants: {
|
|
994
|
+
size: {
|
|
995
|
+
xs: {
|
|
996
|
+
track: { h: "0.5" }
|
|
997
|
+
},
|
|
998
|
+
sm: {
|
|
999
|
+
track: { h: "1" }
|
|
1000
|
+
},
|
|
1001
|
+
md: {
|
|
1002
|
+
track: { h: "2.5" }
|
|
1003
|
+
},
|
|
1004
|
+
lg: {
|
|
1005
|
+
track: { h: "3" }
|
|
1006
|
+
},
|
|
1007
|
+
xl: {
|
|
1008
|
+
track: { h: "4" }
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
});
|
|
892
1013
|
var tabsSlotRecipe = react.defineSlotRecipe({
|
|
893
1014
|
slots: anatomy.tabsAnatomy.keys(),
|
|
894
1015
|
variants: {
|
|
@@ -917,22 +1038,69 @@ var tabsSlotRecipe = react.defineSlotRecipe({
|
|
|
917
1038
|
}
|
|
918
1039
|
}
|
|
919
1040
|
});
|
|
1041
|
+
var toastSlotRecipe = react.defineSlotRecipe({
|
|
1042
|
+
slots: anatomy.toastAnatomy.keys(),
|
|
1043
|
+
base: {
|
|
1044
|
+
root: {
|
|
1045
|
+
py: "2",
|
|
1046
|
+
ps: "2",
|
|
1047
|
+
pe: "4",
|
|
1048
|
+
gap: "2",
|
|
1049
|
+
borderRadius: "lg",
|
|
1050
|
+
border: "1px solid",
|
|
1051
|
+
borderColor: "variable(--toast-border-color, transparent)",
|
|
1052
|
+
"&[data-type=info]": {
|
|
1053
|
+
bg: "blue.solid/15",
|
|
1054
|
+
color: "blue.fg",
|
|
1055
|
+
"--toast-trigger-bg": "{white/10}",
|
|
1056
|
+
"--toast-border-color": "{blue.solid/30}"
|
|
1057
|
+
},
|
|
1058
|
+
"&[data-type=warning]": {
|
|
1059
|
+
bg: "yellow.solid/15",
|
|
1060
|
+
color: "yellow.fg",
|
|
1061
|
+
"--toast-trigger-bg": "{white/10}",
|
|
1062
|
+
"--toast-border-color": "{yellow.solid/30}"
|
|
1063
|
+
},
|
|
1064
|
+
"&[data-type=success]": {
|
|
1065
|
+
bg: "green.solid/15",
|
|
1066
|
+
color: "green.fg",
|
|
1067
|
+
"--toast-trigger-bg": "{white/10}",
|
|
1068
|
+
"--toast-border-color": "{green.solid/30}"
|
|
1069
|
+
},
|
|
1070
|
+
"&[data-type=error]": {
|
|
1071
|
+
bg: "red.solid/15",
|
|
1072
|
+
color: "red.fg",
|
|
1073
|
+
"--toast-trigger-bg": "{white/10}",
|
|
1074
|
+
"--toast-border-color": "{red.solid/30}"
|
|
1075
|
+
}
|
|
1076
|
+
},
|
|
1077
|
+
title: {
|
|
1078
|
+
fontWeight: "semibold"
|
|
1079
|
+
},
|
|
1080
|
+
description: {
|
|
1081
|
+
fontStyle: "xs"
|
|
1082
|
+
}
|
|
1083
|
+
}
|
|
1084
|
+
});
|
|
920
1085
|
|
|
921
1086
|
// src/theme/slot-recipes/index.ts
|
|
922
1087
|
var slotRecipes = {
|
|
923
1088
|
menu: menuSlotRecipe,
|
|
924
|
-
tabs: tabsSlotRecipe
|
|
1089
|
+
tabs: tabsSlotRecipe,
|
|
1090
|
+
progress: progessSlotRecipes,
|
|
1091
|
+
toast: toastSlotRecipe,
|
|
1092
|
+
accordion: accordionSlotRecipe
|
|
925
1093
|
};
|
|
926
1094
|
var colorsTokens = react.defineTokens.colors({
|
|
927
1095
|
primary: {
|
|
928
|
-
contrast: { value: "{colors.gray.
|
|
1096
|
+
contrast: { value: "{colors.gray.600}" },
|
|
929
1097
|
default: { value: "{colors.yellow.100}" }
|
|
930
1098
|
},
|
|
931
1099
|
secondary: {
|
|
932
|
-
default: { value: "{colors.gray.
|
|
1100
|
+
default: { value: "{colors.gray.600}" },
|
|
933
1101
|
contrast: { value: "{colors.gray.300}" }
|
|
934
1102
|
},
|
|
935
|
-
textPrimary: { value: "{colors.gray.
|
|
1103
|
+
textPrimary: { value: "{colors.gray.100}" },
|
|
936
1104
|
textSecondary: { value: "{colors.gray.300}" },
|
|
937
1105
|
background: { value: "#0D0D0C" },
|
|
938
1106
|
// ------------------------------------------
|
|
@@ -942,8 +1110,10 @@ var colorsTokens = react.defineTokens.colors({
|
|
|
942
1110
|
"200": { value: "#AAA6A1" },
|
|
943
1111
|
"300": { value: "#868079" },
|
|
944
1112
|
"400": { value: "#5E5955" },
|
|
945
|
-
"500": { value: "#
|
|
946
|
-
"
|
|
1113
|
+
"500": { value: "#353230" },
|
|
1114
|
+
"550": { value: "#2B2927" },
|
|
1115
|
+
"600": { value: "#201F1D" },
|
|
1116
|
+
"700": { value: "#151413" }
|
|
947
1117
|
},
|
|
948
1118
|
yellow: {
|
|
949
1119
|
"50": { value: "#EED07C" },
|
|
@@ -1135,6 +1305,12 @@ exports.Loader = loader_default;
|
|
|
1135
1305
|
exports.Menu = Menu;
|
|
1136
1306
|
exports.MoneyField = MoneyField;
|
|
1137
1307
|
exports.Popover = Popover;
|
|
1308
|
+
exports.Progress = Progress;
|
|
1309
|
+
exports.ProgressLabel = ProgressLabel;
|
|
1310
|
+
exports.ProgressRange = ProgressRange;
|
|
1311
|
+
exports.ProgressRoot = ProgressRoot;
|
|
1312
|
+
exports.ProgressTrack = ProgressTrack;
|
|
1313
|
+
exports.ProgressValueText = ProgressValueText;
|
|
1138
1314
|
exports.QrCode = QrCode;
|
|
1139
1315
|
exports.Radio = radio_default;
|
|
1140
1316
|
exports.RadioGroup = RadioGroup;
|
|
@@ -1155,7 +1331,7 @@ exports.TextArea = TextArea;
|
|
|
1155
1331
|
exports.TextMask = text_mask_default;
|
|
1156
1332
|
exports.ThemeProvider = ThemeProvider;
|
|
1157
1333
|
exports.Toast = Toast;
|
|
1158
|
-
exports.Tooltip =
|
|
1334
|
+
exports.Tooltip = tooltip_default;
|
|
1159
1335
|
exports.VStack = VStack;
|
|
1160
1336
|
exports.WalletIcon = WalletIcon;
|
|
1161
1337
|
exports.theme = theme_default;
|