mainbase-ui 3.36.0 → 3.37.1
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/README.md +12 -23
- package/dist/cjs/components/accordion/accordion.cjs +2 -1
- package/dist/cjs/components/alert/alert.cjs +7 -6
- package/dist/cjs/components/aspect-ratio/aspect-ratio.cjs +8 -8
- package/dist/cjs/components/avatar/avatar.cjs +16 -16
- package/dist/cjs/components/bleed/bleed.cjs +5 -4
- package/dist/cjs/components/breadcrumb/breadcrumb.cjs +3 -2
- package/dist/cjs/components/button/button-group.cjs +5 -4
- package/dist/cjs/components/button/button.cjs +16 -16
- package/dist/cjs/components/button/close-button.cjs +2 -1
- package/dist/cjs/components/button/icon-button.cjs +4 -3
- package/dist/cjs/components/carousel/carousel.cjs +13 -8
- package/dist/cjs/components/checkbox/checkbox.cjs +13 -12
- package/dist/cjs/components/checkbox-card/checkbox-card.cjs +6 -5
- package/dist/cjs/components/checkmark/checkmark.cjs +7 -7
- package/dist/cjs/components/circle/index.cjs +4 -3
- package/dist/cjs/components/client-only/client-only.cjs +5 -4
- package/dist/cjs/components/clipboard/clipboard.cjs +6 -5
- package/dist/cjs/components/code-block/code-block-adapter-provider.cjs +2 -1
- package/dist/cjs/components/code-block/code-block.cjs +43 -45
- package/dist/cjs/components/color-picker/color-picker.cjs +24 -13
- package/dist/cjs/components/color-swatch/index.cjs +9 -9
- package/dist/cjs/components/combobox/combobox.cjs +4 -3
- package/dist/cjs/components/date-picker/date-picker.cjs +39 -25
- package/dist/cjs/components/dialog/dialog.cjs +4 -3
- package/dist/cjs/components/drawer/drawer.cjs +4 -3
- package/dist/cjs/components/editable/editable.cjs +4 -3
- package/dist/cjs/components/field/field.cjs +7 -7
- package/dist/cjs/components/file-upload/file-upload.cjs +21 -13
- package/dist/cjs/components/flex/flex.cjs +4 -3
- package/dist/cjs/components/float/float.cjs +5 -5
- package/dist/cjs/components/floating-panel/floating-panel.cjs +2 -1
- package/dist/cjs/components/grid/grid-item.cjs +5 -5
- package/dist/cjs/components/grid/grid.cjs +4 -3
- package/dist/cjs/components/group/group.cjs +11 -11
- package/dist/cjs/components/highlight/highlight.cjs +5 -4
- package/dist/cjs/components/hover-card/hover-card.cjs +2 -1
- package/dist/cjs/components/icon/create-icon.cjs +7 -6
- package/dist/cjs/components/icon/icon.cjs +2 -2
- package/dist/cjs/components/icons.cjs +90 -75
- package/dist/cjs/components/image/image.cjs +4 -4
- package/dist/cjs/components/input-addon/input-addon.cjs +4 -3
- package/dist/cjs/components/input-group/input-group.cjs +20 -17
- package/dist/cjs/components/link/link-box.cjs +6 -6
- package/dist/cjs/components/listbox/listbox.cjs +2 -1
- package/dist/cjs/components/loader/loader.cjs +12 -4
- package/dist/cjs/components/menu/menu.cjs +3 -2
- package/dist/cjs/components/native-select/native-select.cjs +15 -13
- package/dist/cjs/components/number-input/number-input.cjs +7 -3
- package/dist/cjs/components/pagination/pagination.cjs +12 -11
- package/dist/cjs/components/popover/popover.cjs +2 -1
- package/dist/cjs/components/qr-code/qr-code.cjs +2 -1
- package/dist/cjs/components/radio-card/radio-card.cjs +10 -10
- package/dist/cjs/components/radio-group/radio-group.cjs +5 -4
- package/dist/cjs/components/radiomark/radiomark.cjs +4 -4
- package/dist/cjs/components/rating-group/rating-group.cjs +15 -12
- package/dist/cjs/components/scroll-area/scroll-area.cjs +2 -1
- package/dist/cjs/components/segment-group/segment-group.cjs +11 -8
- package/dist/cjs/components/select/select.cjs +4 -3
- package/dist/cjs/components/separator/separator.cjs +4 -4
- package/dist/cjs/components/show/show.cjs +3 -2
- package/dist/cjs/components/simple-grid/simple-grid.cjs +4 -4
- package/dist/cjs/components/skeleton/skeleton.cjs +6 -5
- package/dist/cjs/components/skip-nav/skip-nav-content.cjs +4 -3
- package/dist/cjs/components/skip-nav/skip-nav-link.cjs +4 -3
- package/dist/cjs/components/slider/slider.cjs +10 -6
- package/dist/cjs/components/splitter/splitter.cjs +5 -1
- package/dist/cjs/components/square/index.cjs +4 -3
- package/dist/cjs/components/stack/get-separator-style.cjs +0 -2
- package/dist/cjs/components/stack/h-stack.cjs +4 -3
- package/dist/cjs/components/stack/stack.cjs +17 -14
- package/dist/cjs/components/stack/v-stack.cjs +4 -3
- package/dist/cjs/components/stat/stat.cjs +8 -7
- package/dist/cjs/components/steps/steps.cjs +10 -9
- package/dist/cjs/components/switch/switch.cjs +10 -10
- package/dist/cjs/components/table/table.cjs +6 -6
- package/dist/cjs/components/tag/tag.cjs +2 -1
- package/dist/cjs/components/tags-input/tags-input.cjs +10 -3
- package/dist/cjs/components/theme.cjs +4 -4
- package/dist/cjs/components/toast/toast.cjs +5 -4
- package/dist/cjs/components/tooltip/tooltip.cjs +2 -1
- package/dist/cjs/components/tree-view/tree-view.cjs +20 -13
- package/dist/cjs/components/wrap/wrap.cjs +6 -6
- package/dist/cjs/hooks/index.cjs +5 -5
- package/dist/cjs/hooks/use-overlay.cjs +3 -3
- package/dist/cjs/index.cjs +21 -21
- package/dist/cjs/merge-props.cjs +0 -2
- package/dist/cjs/styled-system/breakpoints.cjs +0 -2
- package/dist/cjs/styled-system/calc.cjs +0 -2
- package/dist/cjs/styled-system/conditions.cjs +0 -2
- package/dist/cjs/styled-system/create-recipe-context.cjs +6 -6
- package/dist/cjs/styled-system/create-slot-recipe-context.cjs +12 -12
- package/dist/cjs/styled-system/css.cjs +1 -3
- package/dist/cjs/styled-system/cva.cjs +0 -2
- package/dist/cjs/styled-system/factory.cjs +19 -13
- package/dist/cjs/styled-system/merge-config.cjs +1 -3
- package/dist/cjs/styled-system/normalize.cjs +0 -2
- package/dist/cjs/styled-system/preflight.cjs +0 -2
- package/dist/cjs/styled-system/provider.cjs +6 -1
- package/dist/cjs/styled-system/recipe-props.cjs +2 -1
- package/dist/cjs/styled-system/references.cjs +0 -2
- package/dist/cjs/styled-system/serialize.cjs +1 -3
- package/dist/cjs/styled-system/sort-at-rules.cjs +0 -2
- package/dist/cjs/styled-system/sva.cjs +0 -2
- package/dist/cjs/styled-system/system.cjs +1 -3
- package/dist/cjs/styled-system/token-dictionary.cjs +2 -4
- package/dist/cjs/styled-system/token-middleware.cjs +0 -2
- package/dist/cjs/styled-system/use-resolved-props.cjs +0 -1
- package/dist/cjs/styled-system/utility.cjs +1 -3
- package/dist/cjs/theme/recipes/number-input.cjs +0 -2
- package/dist/cjs/theme/recipes/pin-input.cjs +0 -2
- package/dist/esm/components/accordion/accordion.js +2 -1
- package/dist/esm/components/alert/alert.js +4 -3
- package/dist/esm/components/aspect-ratio/aspect-ratio.js +5 -5
- package/dist/esm/components/avatar/avatar.js +11 -11
- package/dist/esm/components/bleed/bleed.js +3 -2
- package/dist/esm/components/breadcrumb/breadcrumb.js +3 -2
- package/dist/esm/components/button/button-group.js +2 -1
- package/dist/esm/components/button/button.js +13 -13
- package/dist/esm/components/button/close-button.js +2 -1
- package/dist/esm/components/button/icon-button.js +2 -1
- package/dist/esm/components/carousel/carousel.js +10 -5
- package/dist/esm/components/checkbox/checkbox.js +11 -10
- package/dist/esm/components/checkbox-card/checkbox-card.js +3 -2
- package/dist/esm/components/checkmark/checkmark.js +5 -5
- package/dist/esm/components/circle/index.js +2 -1
- package/dist/esm/components/client-only/client-only.js +2 -1
- package/dist/esm/components/clipboard/clipboard.js +4 -3
- package/dist/esm/components/code-block/code-block-adapter-provider.js +2 -1
- package/dist/esm/components/code-block/code-block.js +29 -31
- package/dist/esm/components/color-picker/color-picker.js +19 -8
- package/dist/esm/components/color-swatch/index.js +7 -7
- package/dist/esm/components/combobox/combobox.js +4 -3
- package/dist/esm/components/date-picker/date-picker.js +37 -23
- package/dist/esm/components/dialog/dialog.js +2 -1
- package/dist/esm/components/drawer/drawer.js +2 -1
- package/dist/esm/components/editable/editable.js +2 -1
- package/dist/esm/components/field/field.js +5 -5
- package/dist/esm/components/file-upload/file-upload.js +17 -9
- package/dist/esm/components/flex/flex.js +2 -1
- package/dist/esm/components/float/float.js +2 -2
- package/dist/esm/components/floating-panel/floating-panel.js +2 -1
- package/dist/esm/components/grid/grid-item.js +2 -2
- package/dist/esm/components/grid/grid.js +2 -1
- package/dist/esm/components/group/group.js +5 -5
- package/dist/esm/components/highlight/highlight.js +4 -3
- package/dist/esm/components/hover-card/hover-card.js +2 -1
- package/dist/esm/components/icon/create-icon.js +5 -4
- package/dist/esm/components/icon/icon.js +2 -2
- package/dist/esm/components/icons.js +90 -75
- package/dist/esm/components/image/image.js +2 -2
- package/dist/esm/components/input-addon/input-addon.js +2 -1
- package/dist/esm/components/input-group/input-group.js +17 -14
- package/dist/esm/components/link/link-box.js +3 -3
- package/dist/esm/components/listbox/listbox.js +2 -1
- package/dist/esm/components/loader/loader.js +12 -4
- package/dist/esm/components/menu/menu.js +3 -2
- package/dist/esm/components/native-select/native-select.js +13 -11
- package/dist/esm/components/number-input/number-input.js +7 -3
- package/dist/esm/components/pagination/pagination.js +9 -8
- package/dist/esm/components/popover/popover.js +2 -1
- package/dist/esm/components/qr-code/qr-code.js +2 -1
- package/dist/esm/components/radio-card/radio-card.js +7 -7
- package/dist/esm/components/radio-group/radio-group.js +3 -2
- package/dist/esm/components/radiomark/radiomark.js +2 -2
- package/dist/esm/components/rating-group/rating-group.js +11 -8
- package/dist/esm/components/scroll-area/scroll-area.js +2 -1
- package/dist/esm/components/segment-group/segment-group.js +9 -6
- package/dist/esm/components/select/select.js +4 -3
- package/dist/esm/components/separator/separator.js +2 -2
- package/dist/esm/components/show/show.js +2 -1
- package/dist/esm/components/simple-grid/simple-grid.js +2 -2
- package/dist/esm/components/skeleton/skeleton.js +6 -5
- package/dist/esm/components/skip-nav/skip-nav-content.js +2 -1
- package/dist/esm/components/skip-nav/skip-nav-link.js +2 -1
- package/dist/esm/components/slider/slider.js +8 -4
- package/dist/esm/components/splitter/splitter.js +5 -1
- package/dist/esm/components/square/index.js +2 -1
- package/dist/esm/components/stack/get-separator-style.js +0 -2
- package/dist/esm/components/stack/h-stack.js +2 -1
- package/dist/esm/components/stack/stack.js +9 -6
- package/dist/esm/components/stack/v-stack.js +2 -1
- package/dist/esm/components/stat/stat.js +5 -4
- package/dist/esm/components/steps/steps.js +8 -7
- package/dist/esm/components/switch/switch.js +7 -7
- package/dist/esm/components/table/table.js +3 -3
- package/dist/esm/components/tag/tag.js +2 -1
- package/dist/esm/components/tags-input/tags-input.js +10 -3
- package/dist/esm/components/theme.js +2 -2
- package/dist/esm/components/toast/toast.js +3 -2
- package/dist/esm/components/tooltip/tooltip.js +2 -1
- package/dist/esm/components/tree-view/tree-view.js +20 -13
- package/dist/esm/components/wrap/wrap.js +3 -3
- package/dist/esm/hooks/index.js +1 -1
- package/dist/esm/hooks/use-overlay.js +3 -3
- package/dist/esm/index.js +1 -1
- package/dist/esm/merge-props.js +0 -2
- package/dist/esm/styled-system/breakpoints.js +0 -2
- package/dist/esm/styled-system/calc.js +0 -2
- package/dist/esm/styled-system/conditions.js +0 -2
- package/dist/esm/styled-system/create-recipe-context.js +2 -2
- package/dist/esm/styled-system/create-slot-recipe-context.js +5 -5
- package/dist/esm/styled-system/css.js +1 -3
- package/dist/esm/styled-system/cva.js +0 -2
- package/dist/esm/styled-system/factory.js +19 -13
- package/dist/esm/styled-system/merge-config.js +1 -3
- package/dist/esm/styled-system/normalize.js +0 -2
- package/dist/esm/styled-system/preflight.js +0 -2
- package/dist/esm/styled-system/provider.js +6 -1
- package/dist/esm/styled-system/recipe-props.js +2 -1
- package/dist/esm/styled-system/references.js +0 -2
- package/dist/esm/styled-system/serialize.js +1 -3
- package/dist/esm/styled-system/sort-at-rules.js +0 -2
- package/dist/esm/styled-system/sva.js +0 -2
- package/dist/esm/styled-system/system.js +1 -3
- package/dist/esm/styled-system/token-dictionary.js +2 -4
- package/dist/esm/styled-system/token-middleware.js +0 -2
- package/dist/esm/styled-system/use-resolved-props.js +0 -1
- package/dist/esm/styled-system/utility.js +1 -3
- package/dist/esm/theme/recipes/number-input.js +0 -2
- package/dist/esm/theme/recipes/pin-input.js +0 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
#
|
|
1
|
+
# mainbase-ui
|
|
2
2
|
|
|
3
|
-
[](https://npmx.dev/package/@mainbase-ui/react)
|
|
4
|
-
[](https://npmx.dev/package/@mainbase-ui/react)
|
|
5
|
-
[](https://npmx.dev/package/@mainbase-ui/react)
|
|
6
|
-
[](https://github.com/mainbase-ui/mainbase-ui/blob/main/LICENSE)
|
|
7
3
|
|
|
8
4
|
Mainbase UI is a component system for building products with speed. Accessible
|
|
9
5
|
React components for building high-quality web apps and design systems. Works
|
|
@@ -20,28 +16,26 @@ with Next.js RSC.
|
|
|
20
16
|
|
|
21
17
|
## Documentation
|
|
22
18
|
|
|
23
|
-
https://mainbase
|
|
19
|
+
https://mainbase.pitchpit.ru
|
|
24
20
|
|
|
25
|
-
- Latest: https://mainbase
|
|
26
|
-
- v2: https://v2.mainbase-ui.com
|
|
27
|
-
- v1: https://v1.mainbase-ui.com
|
|
21
|
+
- Latest: https://mainbase.pitchpit.ru
|
|
28
22
|
|
|
29
23
|
## Installation
|
|
30
24
|
|
|
31
|
-
Install the
|
|
25
|
+
Install the `mainbase-ui` package and its peer dependency:
|
|
32
26
|
|
|
33
27
|
```sh
|
|
34
28
|
# with npm
|
|
35
|
-
npm i
|
|
29
|
+
npm i mainbase-ui @emotion/react
|
|
36
30
|
|
|
37
31
|
# with yarn
|
|
38
|
-
yarn add
|
|
32
|
+
yarn add mainbase-ui @emotion/react
|
|
39
33
|
|
|
40
34
|
# with pnpm
|
|
41
|
-
pnpm add
|
|
35
|
+
pnpm add mainbase-ui @emotion/react
|
|
42
36
|
|
|
43
37
|
# with bun
|
|
44
|
-
bun add
|
|
38
|
+
bun add mainbase-ui @emotion/react
|
|
45
39
|
```
|
|
46
40
|
|
|
47
41
|
## Getting started
|
|
@@ -49,7 +43,7 @@ bun add @mainbase-ui/react @emotion/react
|
|
|
49
43
|
1. Wrap your application with the `MainbaseProvider` component:
|
|
50
44
|
|
|
51
45
|
```tsx
|
|
52
|
-
import { MainbaseProvider, defaultSystem } from "
|
|
46
|
+
import { MainbaseProvider, defaultSystem } from "mainbase-ui"
|
|
53
47
|
|
|
54
48
|
export const App = ({ children }) => (
|
|
55
49
|
<MainbaseProvider value={defaultSystem}>{children}</MainbaseProvider>
|
|
@@ -59,20 +53,15 @@ export const App = ({ children }) => (
|
|
|
59
53
|
2. Start using components:
|
|
60
54
|
|
|
61
55
|
```tsx
|
|
62
|
-
import { Button } from "
|
|
56
|
+
import { Button } from "mainbase-ui"
|
|
63
57
|
|
|
64
58
|
const Demo = () => <Button>I just consumed some ⚡️Mainbase!</Button>
|
|
65
59
|
```
|
|
66
60
|
|
|
67
|
-
For framework-specific setup (Next.js, Vite, etc.), see the
|
|
68
|
-
[installation guide](https://mainbase-ui.com/docs/get-started/installation).
|
|
69
61
|
|
|
70
|
-
## Contributing
|
|
71
62
|
|
|
72
|
-
|
|
73
|
-
[contribution guide](https://mainbase-ui.com/docs/get-started/contributing) to get
|
|
74
|
-
started.
|
|
63
|
+
|
|
75
64
|
|
|
76
65
|
## License
|
|
77
66
|
|
|
78
|
-
MIT
|
|
67
|
+
MIT
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
5
|
var accordion = require('@ark-ui/react/accordion');
|
|
5
6
|
var createSlotRecipeContext = require('../../styled-system/create-slot-recipe-context.cjs');
|
|
6
7
|
var icons = require('../icons.cjs');
|
|
@@ -29,7 +30,7 @@ const AccordionItemTrigger = withContext(accordion.Accordion.ItemTrigger, "itemT
|
|
|
29
30
|
const AccordionItemIndicator = withContext(accordion.Accordion.ItemIndicator, "itemIndicator", {
|
|
30
31
|
forwardAsChild: true,
|
|
31
32
|
defaultProps: {
|
|
32
|
-
children: /* @__PURE__ */
|
|
33
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(icons.ChevronDownIcon, {})
|
|
33
34
|
}
|
|
34
35
|
});
|
|
35
36
|
const AccordionContext = accordion.Accordion.Context;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var React = require('react');
|
|
5
6
|
var createContext = require('../../create-context.cjs');
|
|
6
7
|
var createSlotRecipeContext = require('../../styled-system/create-slot-recipe-context.cjs');
|
|
7
8
|
var factory = require('../../styled-system/factory.cjs');
|
|
@@ -26,7 +27,7 @@ const AlertRoot = withProvider(
|
|
|
26
27
|
wrapElement(element, props) {
|
|
27
28
|
return (
|
|
28
29
|
// @ts-ignore fix later
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
+
/* @__PURE__ */ jsxRuntime.jsx(AlertStatusProvider, { value: { status: props.status || "info" }, children: element })
|
|
30
31
|
);
|
|
31
32
|
}
|
|
32
33
|
}
|
|
@@ -48,13 +49,13 @@ const iconMap = {
|
|
|
48
49
|
error: icons.WarningIcon,
|
|
49
50
|
neutral: icons.InfoIcon
|
|
50
51
|
};
|
|
51
|
-
const AlertIndicator = React
|
|
52
|
+
const AlertIndicator = React.forwardRef(
|
|
52
53
|
function AlertIndicator2(props, ref) {
|
|
53
54
|
const api = useAlertStatusContext();
|
|
54
55
|
const styles = useAlertStyles();
|
|
55
|
-
const Icon = typeof api.status === "string" ? iconMap[api.status] : React
|
|
56
|
-
const { children = /* @__PURE__ */
|
|
57
|
-
return /* @__PURE__ */
|
|
56
|
+
const Icon = typeof api.status === "string" ? iconMap[api.status] : React.Fragment;
|
|
57
|
+
const { children = /* @__PURE__ */ jsxRuntime.jsx(Icon, {}), ...rest } = props;
|
|
58
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.mainbase.span, { ref, ...rest, css: [styles.indicator, props.css], children });
|
|
58
59
|
}
|
|
59
60
|
);
|
|
60
61
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var React = require('react');
|
|
5
6
|
var config = require('../../styled-system/config.cjs');
|
|
6
7
|
var factory = require('../../styled-system/factory.cjs');
|
|
7
8
|
var cx = require('../../utils/cx.cjs');
|
|
8
9
|
var walkObject = require('../../utils/walk-object.cjs');
|
|
9
|
-
require('../../utils/unit.cjs');
|
|
10
10
|
|
|
11
11
|
const baseStyle = config.defineStyle({
|
|
12
12
|
"& > *:not(style)": {
|
|
@@ -26,11 +26,11 @@ const baseStyle = config.defineStyle({
|
|
|
26
26
|
objectFit: "cover"
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
|
-
const AspectRatio = React
|
|
29
|
+
const AspectRatio = React.forwardRef(
|
|
30
30
|
function AspectRatio2(props, ref) {
|
|
31
31
|
const { ratio = 4 / 3, children, className, ...rest } = props;
|
|
32
|
-
const child = React
|
|
33
|
-
return /* @__PURE__ */
|
|
32
|
+
const child = React.Children.only(children);
|
|
33
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
34
34
|
factory.mainbase.div,
|
|
35
35
|
{
|
|
36
36
|
ref,
|
|
@@ -43,9 +43,9 @@ const AspectRatio = React$1.forwardRef(
|
|
|
43
43
|
paddingBottom: walkObject.mapObject(ratio, (r) => `${1 / r * 100}%`)
|
|
44
44
|
},
|
|
45
45
|
...rest,
|
|
46
|
-
css: [baseStyle, props.css]
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
css: [baseStyle, props.css],
|
|
47
|
+
children: child
|
|
48
|
+
}
|
|
49
49
|
);
|
|
50
50
|
}
|
|
51
51
|
);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
5
|
var avatar = require('@ark-ui/react/avatar');
|
|
5
|
-
var React
|
|
6
|
+
var React = require('react');
|
|
6
7
|
var createSlotRecipeContext = require('../../styled-system/create-slot-recipe-context.cjs');
|
|
7
8
|
var factory = require('../../styled-system/factory.cjs');
|
|
8
9
|
var useSlotRecipe = require('../../styled-system/use-slot-recipe.cjs');
|
|
9
10
|
var cx = require('../../utils/cx.cjs');
|
|
10
|
-
require('../../utils/unit.cjs');
|
|
11
11
|
var group = require('../group/group.cjs');
|
|
12
12
|
|
|
13
13
|
const {
|
|
@@ -28,7 +28,7 @@ const StyledFallback = factory.mainbase(avatar.Avatar.Fallback, {}, { forwardAsC
|
|
|
28
28
|
function getFallbackChildren(props) {
|
|
29
29
|
if (props.children || props.asChild) return props.children;
|
|
30
30
|
if (props.name) return getInitials(props.name);
|
|
31
|
-
return /* @__PURE__ */
|
|
31
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AvatarIcon, {});
|
|
32
32
|
}
|
|
33
33
|
function getInitials(name) {
|
|
34
34
|
const names = name.trim().split(" ");
|
|
@@ -36,20 +36,20 @@ function getInitials(name) {
|
|
|
36
36
|
const lastName = names.length > 1 ? names[names.length - 1] : "";
|
|
37
37
|
return firstName && lastName ? `${firstName.charAt(0)}${lastName.charAt(0)}` : firstName.charAt(0);
|
|
38
38
|
}
|
|
39
|
-
const AvatarFallback = React
|
|
39
|
+
const AvatarFallback = React.forwardRef(
|
|
40
40
|
function AvatarFallback2(props, ref) {
|
|
41
41
|
const styles = useAvatarStyles();
|
|
42
42
|
const classNames = useClassNames();
|
|
43
43
|
const { name: _, ...rest } = props;
|
|
44
|
-
return /* @__PURE__ */
|
|
44
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
45
45
|
StyledFallback,
|
|
46
46
|
{
|
|
47
47
|
ref,
|
|
48
48
|
...rest,
|
|
49
49
|
className: cx.cx(props.className, classNames.fallback),
|
|
50
|
-
css: [styles.fallback, props.css]
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
css: [styles.fallback, props.css],
|
|
51
|
+
children: getFallbackChildren(props)
|
|
52
|
+
}
|
|
53
53
|
);
|
|
54
54
|
}
|
|
55
55
|
);
|
|
@@ -64,9 +64,9 @@ const AvatarImage = withContext(
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
);
|
|
67
|
-
const AvatarIcon = React
|
|
67
|
+
const AvatarIcon = React.forwardRef(
|
|
68
68
|
function AvatarIcon2(props, ref) {
|
|
69
|
-
return /* @__PURE__ */
|
|
69
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
70
70
|
factory.mainbase.svg,
|
|
71
71
|
{
|
|
72
72
|
stroke: "currentColor",
|
|
@@ -76,21 +76,21 @@ const AvatarIcon = React$1.forwardRef(
|
|
|
76
76
|
height: "1.2em",
|
|
77
77
|
width: "1.2em",
|
|
78
78
|
ref,
|
|
79
|
-
...props
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
...props,
|
|
80
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20 22H18V20C18 18.3431 16.6569 17 15 17H9C7.34315 17 6 18.3431 6 20V22H4V20C4 17.2386 6.23858 15 9 15H15C17.7614 15 20 17.2386 20 20V22ZM12 13C8.68629 13 6 10.3137 6 7C6 3.68629 8.68629 1 12 1C15.3137 1 18 3.68629 18 7C18 10.3137 15.3137 13 12 13ZM12 11C14.2091 11 16 9.20914 16 7C16 4.79086 14.2091 3 12 3C9.79086 3 8 4.79086 8 7C8 9.20914 9.79086 11 12 11Z" })
|
|
81
|
+
}
|
|
82
82
|
);
|
|
83
83
|
}
|
|
84
84
|
);
|
|
85
85
|
const AvatarContext = avatar.Avatar.Context;
|
|
86
|
-
const AvatarGroup = React
|
|
86
|
+
const AvatarGroup = React.forwardRef(
|
|
87
87
|
function AvatarGroup2(props, ref) {
|
|
88
88
|
const recipe = useSlotRecipe.useSlotRecipe({ key: "avatar" });
|
|
89
|
-
const [variantProps, localProps] = React
|
|
89
|
+
const [variantProps, localProps] = React.useMemo(
|
|
90
90
|
() => recipe.splitVariantProps(props),
|
|
91
91
|
[props, recipe]
|
|
92
92
|
);
|
|
93
|
-
return /* @__PURE__ */
|
|
93
|
+
return /* @__PURE__ */ jsxRuntime.jsx(PropsProvider, { value: variantProps, children: /* @__PURE__ */ jsxRuntime.jsx(group.Group, { gap: "0", spaceX: "-3", ref, ...localProps }) });
|
|
94
94
|
}
|
|
95
95
|
);
|
|
96
96
|
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var React = require('react');
|
|
5
6
|
var factory = require('../../styled-system/factory.cjs');
|
|
6
7
|
var is = require('../../utils/is.cjs');
|
|
7
|
-
var walkObject = require('../../utils/walk-object.cjs');
|
|
8
8
|
var unit = require('../../utils/unit.cjs');
|
|
9
|
+
var walkObject = require('../../utils/walk-object.cjs');
|
|
9
10
|
|
|
10
11
|
const valueFn = (v) => unit.isCssUnit(v) || is.isCssVar(v) ? v : `token(spacing.${v}, ${v})`;
|
|
11
|
-
const Bleed = React
|
|
12
|
+
const Bleed = React.forwardRef(
|
|
12
13
|
function Bleed2(props, ref) {
|
|
13
14
|
const {
|
|
14
15
|
inline,
|
|
@@ -20,7 +21,7 @@ const Bleed = React$1.forwardRef(
|
|
|
20
21
|
css: cssProp,
|
|
21
22
|
...rest
|
|
22
23
|
} = props;
|
|
23
|
-
return /* @__PURE__ */
|
|
24
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
24
25
|
factory.mainbase.div,
|
|
25
26
|
{
|
|
26
27
|
ref,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
5
|
var createSlotRecipeContext = require('../../styled-system/create-slot-recipe-context.cjs');
|
|
5
6
|
var icons = require('../icons.cjs');
|
|
6
7
|
|
|
@@ -36,14 +37,14 @@ const BreadcrumbCurrentLink = withContext("span", "currentLink", {
|
|
|
36
37
|
const BreadcrumbSeparator = withContext("li", "separator", {
|
|
37
38
|
defaultProps: {
|
|
38
39
|
"aria-hidden": true,
|
|
39
|
-
children: /* @__PURE__ */
|
|
40
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(icons.ChevronRightIcon, {})
|
|
40
41
|
}
|
|
41
42
|
});
|
|
42
43
|
const BreadcrumbEllipsis = withContext("li", "ellipsis", {
|
|
43
44
|
defaultProps: {
|
|
44
45
|
role: "presentation",
|
|
45
46
|
"aria-hidden": true,
|
|
46
|
-
children: /* @__PURE__ */
|
|
47
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(icons.EllpsisIcon, {})
|
|
47
48
|
}
|
|
48
49
|
});
|
|
49
50
|
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var React = require('react');
|
|
5
6
|
var useRecipe = require('../../styled-system/use-recipe.cjs');
|
|
6
7
|
var group = require('../group/group.cjs');
|
|
7
8
|
var button = require('./button.cjs');
|
|
8
9
|
|
|
9
|
-
const ButtonGroup = React
|
|
10
|
+
const ButtonGroup = React.forwardRef(
|
|
10
11
|
function ButtonGroup2(props, ref) {
|
|
11
12
|
const recipe = useRecipe.useRecipe({ key: "button" });
|
|
12
|
-
const [variantProps, otherProps] = React
|
|
13
|
+
const [variantProps, otherProps] = React.useMemo(
|
|
13
14
|
() => recipe.splitVariantProps(props),
|
|
14
15
|
[props, recipe]
|
|
15
16
|
);
|
|
16
|
-
return /* @__PURE__ */
|
|
17
|
+
return /* @__PURE__ */ jsxRuntime.jsx(button.ButtonPropsProvider, { value: variantProps, children: /* @__PURE__ */ jsxRuntime.jsx(group.Group, { ref, ...otherProps }) });
|
|
17
18
|
}
|
|
18
19
|
);
|
|
19
20
|
ButtonGroup.displayName = "ButtonGroup";
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var React = require('react');
|
|
5
6
|
var mergeProps = require('../../merge-props.cjs');
|
|
6
7
|
var createRecipeContext = require('../../styled-system/create-recipe-context.cjs');
|
|
7
8
|
var factory = require('../../styled-system/factory.cjs');
|
|
8
9
|
var attr = require('../../utils/attr.cjs');
|
|
9
10
|
var cx = require('../../utils/cx.cjs');
|
|
10
|
-
require('../../utils/unit.cjs');
|
|
11
11
|
var loader = require('../loader/loader.cjs');
|
|
12
12
|
require('../loader/loader-overlay.cjs');
|
|
13
13
|
|
|
14
14
|
const { useRecipeResult, PropsProvider, usePropsContext } = createRecipeContext.createRecipeContext(
|
|
15
15
|
{ key: "button" }
|
|
16
16
|
);
|
|
17
|
-
const Button = React
|
|
17
|
+
const Button = React.forwardRef(
|
|
18
18
|
function Button2(inProps, ref) {
|
|
19
19
|
const propsContext = usePropsContext();
|
|
20
|
-
const props = React
|
|
20
|
+
const props = React.useMemo(
|
|
21
21
|
() => mergeProps.mergeProps(propsContext, inProps),
|
|
22
22
|
[propsContext, inProps]
|
|
23
23
|
);
|
|
@@ -30,7 +30,7 @@ const Button = React$1.forwardRef(
|
|
|
30
30
|
spinnerPlacement,
|
|
31
31
|
...rest
|
|
32
32
|
} = result.props;
|
|
33
|
-
return /* @__PURE__ */
|
|
33
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
34
34
|
factory.mainbase.button,
|
|
35
35
|
{
|
|
36
36
|
type: "button",
|
|
@@ -39,17 +39,17 @@ const Button = React$1.forwardRef(
|
|
|
39
39
|
"data-loading": attr.dataAttr(loading),
|
|
40
40
|
disabled: loading || rest.disabled,
|
|
41
41
|
className: cx.cx(result.className, props.className),
|
|
42
|
-
css: [result.styles, props.css]
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
children
|
|
52
|
-
|
|
42
|
+
css: [result.styles, props.css],
|
|
43
|
+
children: !props.asChild && loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
44
|
+
loader.Loader,
|
|
45
|
+
{
|
|
46
|
+
spinner,
|
|
47
|
+
text: loadingText,
|
|
48
|
+
spinnerPlacement,
|
|
49
|
+
children
|
|
50
|
+
}
|
|
51
|
+
) : children
|
|
52
|
+
}
|
|
53
53
|
);
|
|
54
54
|
}
|
|
55
55
|
);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
3
4
|
var React = require('react');
|
|
4
5
|
var icons = require('../icons.cjs');
|
|
5
6
|
var iconButton = require('./icon-button.cjs');
|
|
@@ -24,7 +25,7 @@ function _interopNamespaceDefault(e) {
|
|
|
24
25
|
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
25
26
|
|
|
26
27
|
const CloseButton = React__namespace.forwardRef(function CloseButton2(props, ref) {
|
|
27
|
-
return /* @__PURE__ */
|
|
28
|
+
return /* @__PURE__ */ jsxRuntime.jsx(iconButton.IconButton, { variant: "ghost", "aria-label": "Close", ref, ...props, children: props.children ?? /* @__PURE__ */ jsxRuntime.jsx(icons.CloseIcon, {}) });
|
|
28
29
|
});
|
|
29
30
|
CloseButton.displayName = "CloseButton";
|
|
30
31
|
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var React = require('react');
|
|
5
6
|
var button = require('./button.cjs');
|
|
6
7
|
|
|
7
|
-
const IconButton = React
|
|
8
|
+
const IconButton = React.forwardRef(
|
|
8
9
|
function IconButton2(props, ref) {
|
|
9
|
-
return /* @__PURE__ */
|
|
10
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
11
|
button.Button,
|
|
11
12
|
{
|
|
12
13
|
px: "0",
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
5
|
var carousel = require('@ark-ui/react/carousel');
|
|
5
|
-
var React
|
|
6
|
+
var React = require('react');
|
|
6
7
|
var createSlotRecipeContext = require('../../styled-system/create-slot-recipe-context.cjs');
|
|
7
8
|
var index = require('../box/index.cjs');
|
|
8
9
|
var icons = require('../icons.cjs');
|
|
@@ -37,26 +38,30 @@ const CarouselItem = withContext(
|
|
|
37
38
|
const CarouselControl = withContext(carousel.Carousel.Control, "control", { forwardAsChild: true });
|
|
38
39
|
const CarouselPrevTrigger = withContext(carousel.Carousel.PrevTrigger, "prevTrigger", {
|
|
39
40
|
forwardAsChild: true,
|
|
40
|
-
defaultProps: { children: /* @__PURE__ */
|
|
41
|
+
defaultProps: { children: /* @__PURE__ */ jsxRuntime.jsx(icons.ChevronLeftIcon, {}) }
|
|
41
42
|
});
|
|
42
43
|
const CarouselNextTrigger = withContext(carousel.Carousel.NextTrigger, "nextTrigger", {
|
|
43
44
|
forwardAsChild: true,
|
|
44
|
-
defaultProps: { children: /* @__PURE__ */
|
|
45
|
+
defaultProps: { children: /* @__PURE__ */ jsxRuntime.jsx(icons.ChevronRightIcon, {}) }
|
|
45
46
|
});
|
|
46
|
-
const CarouselIndicators = React
|
|
47
|
+
const CarouselIndicators = React.forwardRef(function CarouselIndicators2(props, ref) {
|
|
47
48
|
const api = carousel.useCarouselContext();
|
|
48
|
-
return /* @__PURE__ */
|
|
49
|
+
return /* @__PURE__ */ jsxRuntime.jsx(CarouselIndicatorGroup, { ref, children: api.pageSnapPoints.map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(CarouselIndicator, { index, ...props }, index)) });
|
|
49
50
|
});
|
|
50
51
|
const CarouselAutoplayIndicator = ({
|
|
51
52
|
play,
|
|
52
53
|
paused
|
|
53
54
|
}) => {
|
|
54
55
|
const api = carousel.useCarouselContext();
|
|
55
|
-
return /* @__PURE__ */
|
|
56
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: api.isPlaying ? paused : play });
|
|
56
57
|
};
|
|
57
|
-
const CarouselProgressText = React
|
|
58
|
+
const CarouselProgressText = React.forwardRef(function CarouselProgressText2(props, ref) {
|
|
58
59
|
const api = carousel.useCarouselContext();
|
|
59
|
-
return /* @__PURE__ */
|
|
60
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(index.Box, { ref, ...props, children: [
|
|
61
|
+
api.page + 1,
|
|
62
|
+
" / ",
|
|
63
|
+
api.pageSnapPoints.length
|
|
64
|
+
] });
|
|
60
65
|
});
|
|
61
66
|
const CarouselAutoplayTrigger = withContext(carousel.Carousel.AutoplayTrigger, "autoplayTrigger", { forwardAsChild: true });
|
|
62
67
|
const CarouselIndicatorGroup = withContext(carousel.Carousel.IndicatorGroup, "indicatorGroup", { forwardAsChild: true });
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
5
|
var checkbox = require('@ark-ui/react/checkbox');
|
|
5
|
-
var React
|
|
6
|
+
var React = require('react');
|
|
6
7
|
var createSlotRecipeContext = require('../../styled-system/create-slot-recipe-context.cjs');
|
|
7
8
|
var factory = require('../../styled-system/factory.cjs');
|
|
8
9
|
var checkmark = require('../checkmark/checkmark.cjs');
|
|
@@ -25,35 +26,35 @@ const CheckboxLabel = withContext(
|
|
|
25
26
|
"label",
|
|
26
27
|
{ forwardAsChild: true }
|
|
27
28
|
);
|
|
28
|
-
const CheckboxIndicator = React
|
|
29
|
+
const CheckboxIndicator = React.forwardRef(function CheckboxIndicator2(props, ref) {
|
|
29
30
|
const { checked, indeterminate, ...rest } = props;
|
|
30
31
|
const api = checkbox.useCheckboxContext();
|
|
31
32
|
const styles = useCheckboxStyles();
|
|
32
33
|
if (checked && api.checked) {
|
|
33
|
-
return /* @__PURE__ */
|
|
34
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
34
35
|
factory.mainbase.svg,
|
|
35
36
|
{
|
|
36
37
|
ref,
|
|
37
38
|
asChild: true,
|
|
38
39
|
...rest,
|
|
39
|
-
css: [styles.indicator, props.css]
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
css: [styles.indicator, props.css],
|
|
41
|
+
children: checked
|
|
42
|
+
}
|
|
42
43
|
);
|
|
43
44
|
}
|
|
44
45
|
if (indeterminate && api.indeterminate) {
|
|
45
|
-
return /* @__PURE__ */
|
|
46
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
46
47
|
factory.mainbase.svg,
|
|
47
48
|
{
|
|
48
49
|
ref,
|
|
49
50
|
asChild: true,
|
|
50
51
|
...rest,
|
|
51
|
-
css: [styles.indicator, props.css]
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
css: [styles.indicator, props.css],
|
|
53
|
+
children: indeterminate
|
|
54
|
+
}
|
|
54
55
|
);
|
|
55
56
|
}
|
|
56
|
-
return /* @__PURE__ */
|
|
57
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
57
58
|
checkmark.Checkmark,
|
|
58
59
|
{
|
|
59
60
|
ref,
|
|
@@ -71,7 +72,7 @@ const CheckboxControl = withContext(
|
|
|
71
72
|
"control",
|
|
72
73
|
{
|
|
73
74
|
forwardAsChild: true,
|
|
74
|
-
defaultProps: { children: /* @__PURE__ */
|
|
75
|
+
defaultProps: { children: /* @__PURE__ */ jsxRuntime.jsx(CheckboxIndicator, {}) }
|
|
75
76
|
}
|
|
76
77
|
);
|
|
77
78
|
const CheckboxGroup = factory.mainbase(
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
5
|
var checkbox = require('@ark-ui/react/checkbox');
|
|
5
|
-
var React
|
|
6
|
+
var React = require('react');
|
|
6
7
|
var createSlotRecipeContext = require('../../styled-system/create-slot-recipe-context.cjs');
|
|
7
8
|
var factory = require('../../styled-system/factory.cjs');
|
|
8
9
|
var checkmark = require('../checkmark/checkmark.cjs');
|
|
@@ -17,10 +18,10 @@ const CheckboxCardRootProvider = withProvider(checkbox.Checkbox.RootProvider, "r
|
|
|
17
18
|
const CheckboxCardRoot = withProvider(checkbox.Checkbox.Root, "root", { forwardAsChild: true });
|
|
18
19
|
const CheckboxCardRootPropsProvider = PropsProvider;
|
|
19
20
|
const CheckboxCardLabel = withContext(checkbox.Checkbox.Label, "label", { forwardAsChild: true });
|
|
20
|
-
const CheckboxCardDescription = React
|
|
21
|
+
const CheckboxCardDescription = React.forwardRef(function CheckboxCardDescription2(props, ref) {
|
|
21
22
|
const styles = useCheckboxCardStyles();
|
|
22
23
|
const api = checkbox.useCheckboxContext();
|
|
23
|
-
return /* @__PURE__ */
|
|
24
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
24
25
|
factory.mainbase.div,
|
|
25
26
|
{
|
|
26
27
|
ref,
|
|
@@ -35,10 +36,10 @@ const CheckboxCardDescription = React$1.forwardRef(function CheckboxCardDescript
|
|
|
35
36
|
});
|
|
36
37
|
const CheckboxCardControl = withContext(checkbox.Checkbox.Control, "control", { forwardAsChild: true });
|
|
37
38
|
const CheckboxCardContent = withContext("div", "content");
|
|
38
|
-
const CheckboxCardIndicator = React
|
|
39
|
+
const CheckboxCardIndicator = React.forwardRef(function CheckboxCardIndicator2(props, ref) {
|
|
39
40
|
const api = checkbox.useCheckboxContext();
|
|
40
41
|
const styles = useCheckboxCardStyles();
|
|
41
|
-
return /* @__PURE__ */
|
|
42
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
42
43
|
checkmark.Checkmark,
|
|
43
44
|
{
|
|
44
45
|
ref,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var React = require('react');
|
|
5
6
|
var empty = require('../../styled-system/empty.cjs');
|
|
6
7
|
var factory = require('../../styled-system/factory.cjs');
|
|
7
8
|
var useRecipe = require('../../styled-system/use-recipe.cjs');
|
|
8
9
|
var attr = require('../../utils/attr.cjs');
|
|
9
|
-
require('../../utils/unit.cjs');
|
|
10
10
|
|
|
11
|
-
const Checkmark = React
|
|
11
|
+
const Checkmark = React.forwardRef(
|
|
12
12
|
function Checkmark2(props, ref) {
|
|
13
13
|
const recipe = useRecipe.useRecipe({ key: "checkmark", recipe: props.recipe });
|
|
14
14
|
const [variantProps, restProps] = recipe.splitVariantProps(props);
|
|
@@ -22,7 +22,7 @@ const Checkmark = React$1.forwardRef(
|
|
|
22
22
|
...rest
|
|
23
23
|
} = restProps;
|
|
24
24
|
const styles = unstyled ? empty.EMPTY_STYLES : recipe(variantProps);
|
|
25
|
-
return /* @__PURE__ */
|
|
25
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
26
26
|
factory.mainbase.svg,
|
|
27
27
|
{
|
|
28
28
|
ref,
|
|
@@ -35,9 +35,9 @@ const Checkmark = React$1.forwardRef(
|
|
|
35
35
|
"data-state": indeterminate ? "indeterminate" : checked ? "checked" : "unchecked",
|
|
36
36
|
"data-disabled": attr.dataAttr(disabled),
|
|
37
37
|
css: [styles, css],
|
|
38
|
-
...rest
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
...rest,
|
|
39
|
+
children: indeterminate ? /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 12h14" }) : checked ? /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "20 6 9 17 4 12" }) : null
|
|
40
|
+
}
|
|
41
41
|
);
|
|
42
42
|
}
|
|
43
43
|
);
|