@ark-ui/react 1.0.1 → 1.2.0
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/CHANGELOG.md +34 -0
- package/README.md +67 -61
- package/accordion/accordion.stories.d.ts +0 -1
- package/color-picker/color-picker-format-select.cjs +21 -0
- package/color-picker/color-picker-format-select.d.ts +6 -0
- package/color-picker/color-picker-format-select.mjs +17 -0
- package/color-picker/color-picker-format-trigger.cjs +19 -0
- package/color-picker/color-picker-format-trigger.d.ts +6 -0
- package/color-picker/color-picker-format-trigger.mjs +15 -0
- package/color-picker/color-picker-swatch-context.cjs +15 -0
- package/color-picker/color-picker-swatch-context.d.ts +6 -0
- package/color-picker/color-picker-swatch-context.mjs +10 -0
- package/color-picker/color-picker-swatch-indicator.cjs +21 -0
- package/color-picker/color-picker-swatch-indicator.d.ts +6 -0
- package/color-picker/color-picker-swatch-indicator.mjs +17 -0
- package/color-picker/color-picker-swatch-trigger.cjs +4 -1
- package/color-picker/color-picker-swatch-trigger.d.ts +1 -5
- package/color-picker/color-picker-swatch-trigger.mjs +4 -1
- package/color-picker/color-picker-swatch.cjs +4 -3
- package/color-picker/color-picker-swatch.mjs +4 -3
- package/color-picker/color-picker-transparency-grid.d.ts +2 -5
- package/color-picker/color-picker.cjs +4 -2
- package/color-picker/color-picker.mjs +4 -2
- package/color-picker/index.cjs +10 -0
- package/color-picker/index.d.ts +10 -3
- package/color-picker/index.mjs +7 -1
- package/color-picker/use-color-picker.cjs +1 -1
- package/color-picker/use-color-picker.d.ts +4 -1
- package/color-picker/use-color-picker.mjs +1 -1
- package/combobox/combobox.cjs +1 -1
- package/combobox/combobox.d.ts +1 -1
- package/combobox/combobox.mjs +1 -1
- package/date-picker/date-picker.cjs +2 -2
- package/date-picker/date-picker.mjs +2 -2
- package/date-picker/date-picker.stories.d.ts +1 -0
- package/dialog/dialog-backdrop.cjs +1 -1
- package/dialog/dialog-backdrop.mjs +1 -1
- package/dialog/dialog.cjs +2 -1
- package/dialog/dialog.mjs +2 -1
- package/editable/editable.cjs +2 -2
- package/editable/editable.mjs +2 -2
- package/factory.cjs +1 -2
- package/factory.d.ts +1 -1
- package/factory.mjs +2 -3
- package/factory.test.d.ts +1 -0
- package/file-upload/file-upload-context.cjs +15 -0
- package/file-upload/file-upload-context.d.ts +6 -0
- package/file-upload/file-upload-context.mjs +10 -0
- package/file-upload/file-upload-dropzone.cjs +24 -0
- package/file-upload/file-upload-dropzone.d.ts +6 -0
- package/file-upload/file-upload-dropzone.mjs +20 -0
- package/file-upload/file-upload-item-context.cjs +15 -0
- package/file-upload/file-upload-item-context.d.ts +6 -0
- package/file-upload/file-upload-item-context.mjs +10 -0
- package/file-upload/file-upload-item-delete-trigger.cjs +21 -0
- package/file-upload/file-upload-item-delete-trigger.d.ts +6 -0
- package/file-upload/file-upload-item-delete-trigger.mjs +17 -0
- package/file-upload/file-upload-item-group.cjs +24 -0
- package/file-upload/file-upload-item-group.d.ts +8 -0
- package/file-upload/file-upload-item-group.mjs +20 -0
- package/file-upload/file-upload-item-name.cjs +24 -0
- package/file-upload/file-upload-item-name.d.ts +6 -0
- package/file-upload/file-upload-item-name.mjs +20 -0
- package/file-upload/file-upload-item-preview-image.cjs +25 -0
- package/file-upload/file-upload-item-preview-image.d.ts +6 -0
- package/file-upload/file-upload-item-preview-image.mjs +21 -0
- package/file-upload/file-upload-item-preview.cjs +25 -0
- package/file-upload/file-upload-item-preview.d.ts +11 -0
- package/file-upload/file-upload-item-preview.mjs +21 -0
- package/file-upload/file-upload-item-size-text.cjs +24 -0
- package/file-upload/file-upload-item-size-text.d.ts +6 -0
- package/file-upload/file-upload-item-size-text.mjs +20 -0
- package/file-upload/file-upload-item.cjs +24 -0
- package/file-upload/file-upload-item.d.ts +8 -0
- package/file-upload/file-upload-item.mjs +20 -0
- package/file-upload/file-upload-label.cjs +19 -0
- package/file-upload/file-upload-label.d.ts +6 -0
- package/file-upload/file-upload-label.mjs +15 -0
- package/file-upload/file-upload-trigger.cjs +21 -0
- package/file-upload/file-upload-trigger.d.ts +6 -0
- package/file-upload/file-upload-trigger.mjs +17 -0
- package/file-upload/file-upload.cjs +46 -0
- package/file-upload/file-upload.d.ts +9 -0
- package/file-upload/file-upload.mjs +42 -0
- package/file-upload/file-upload.stories.d.ts +7 -0
- package/file-upload/file-upload.test.d.ts +1 -0
- package/file-upload/index.cjs +43 -0
- package/file-upload/index.d.ts +29 -0
- package/file-upload/index.mjs +29 -0
- package/file-upload/use-file-upload.cjs +48 -0
- package/file-upload/use-file-upload.d.ts +8 -0
- package/file-upload/use-file-upload.mjs +25 -0
- package/hover-card/hover-card.cjs +2 -1
- package/hover-card/hover-card.mjs +2 -1
- package/index.cjs +74 -42
- package/index.d.ts +1 -0
- package/index.mjs +18 -2
- package/menu/menu.cjs +4 -3
- package/menu/menu.mjs +2 -1
- package/number-input/index.cjs +3 -3
- package/number-input/index.d.ts +1 -1
- package/number-input/index.mjs +1 -1
- package/number-input/number-input.cjs +5 -3
- package/number-input/number-input.d.ts +5 -4
- package/number-input/number-input.mjs +5 -3
- package/number-input/number-input.stories.d.ts +1 -0
- package/package.json +72 -57
- package/pagination/pagination-item.cjs +1 -1
- package/pagination/pagination-item.mjs +1 -1
- package/pagination/pagination.cjs +2 -2
- package/pagination/pagination.mjs +2 -2
- package/pin-input/index.cjs +3 -3
- package/pin-input/index.d.ts +1 -1
- package/pin-input/index.mjs +1 -1
- package/pin-input/pin-input.cjs +2 -2
- package/pin-input/pin-input.mjs +2 -2
- package/popover/popover.cjs +2 -1
- package/popover/popover.mjs +2 -1
- package/portal.cjs +2 -1
- package/portal.d.ts +2 -2
- package/portal.mjs +2 -1
- package/radio-group/radio-group-indicator.cjs +1 -2
- package/radio-group/radio-group-indicator.mjs +1 -2
- package/radio-group/radio-group-item.d.ts +1 -1
- package/radio-group/radio-group.cjs +2 -2
- package/radio-group/radio-group.mjs +2 -2
- package/radio-group/radio-group.stories.d.ts +1 -1
- package/rating-group/rating-group-control.cjs +2 -2
- package/rating-group/rating-group-control.mjs +2 -2
- package/rating-group/rating-group-item-context.d.ts +2 -2
- package/rating-group/rating-group-item.cjs +5 -4
- package/rating-group/rating-group-item.mjs +5 -4
- package/rating-group/rating-group.cjs +2 -2
- package/rating-group/rating-group.mjs +2 -2
- package/rating-group/use-rating-group.cjs +4 -4
- package/rating-group/use-rating-group.d.ts +4 -4
- package/rating-group/use-rating-group.mjs +3 -3
- package/segment-group/segment-group-indicator.cjs +2 -2
- package/segment-group/segment-group-indicator.mjs +2 -2
- package/segment-group/segment-group-item-context.d.ts +1 -13
- package/segment-group/segment-group-item-control.cjs +2 -2
- package/segment-group/segment-group-item-control.mjs +2 -2
- package/segment-group/segment-group-item-text.cjs +2 -2
- package/segment-group/segment-group-item-text.mjs +2 -2
- package/segment-group/segment-group-item.cjs +3 -3
- package/segment-group/segment-group-item.d.ts +3 -2
- package/segment-group/segment-group-item.mjs +3 -3
- package/segment-group/segment-group-label.cjs +2 -2
- package/segment-group/segment-group-label.mjs +2 -2
- package/segment-group/segment-group.cjs +4 -4
- package/segment-group/segment-group.mjs +4 -4
- package/select/select-item-group.cjs +2 -2
- package/select/select-item-group.mjs +2 -2
- package/select/select.cjs +1 -1
- package/select/select.d.ts +1 -1
- package/select/select.mjs +1 -1
- package/select/select.stories.d.ts +1 -0
- package/slider/slider.stories.d.ts +1 -1
- package/switch/switch.cjs +2 -2
- package/switch/switch.mjs +2 -2
- package/toast/create-toaster.cjs +2 -2
- package/toast/create-toaster.d.ts +1 -1
- package/toast/create-toaster.mjs +2 -2
- package/toast/index.cjs +5 -2
- package/toast/index.d.ts +6 -4
- package/toast/index.mjs +5 -3
- package/toast/toast-group.cjs +15 -0
- package/toast/toast-group.d.ts +6 -0
- package/toast/toast-group.mjs +11 -0
- package/tooltip/tooltip.cjs +2 -1
- package/tooltip/tooltip.mjs +2 -1
- package/use-is-server.cjs +16 -0
- package/use-is-server.d.ts +1 -0
- package/use-is-server.mjs +12 -0
- package/segment-group/segment-group.anatomy.cjs +0 -10
- package/segment-group/segment-group.anatomy.d.ts +0 -2
- package/segment-group/segment-group.anatomy.mjs +0 -6
- /package/number-input/{number-input-field.cjs → number-input-input.cjs} +0 -0
- /package/number-input/{number-input-field.d.ts → number-input-input.d.ts} +0 -0
- /package/number-input/{number-input-field.mjs → number-input-input.mjs} +0 -0
- /package/pin-input/{pin-input-field.cjs → pin-input-input.cjs} +0 -0
- /package/pin-input/{pin-input-field.d.ts → pin-input-input.d.ts} +0 -0
- /package/pin-input/{pin-input-field.mjs → pin-input-input.mjs} +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
5
|
|
|
6
|
-
const
|
|
6
|
+
const rating = require('@zag-js/rating-group');
|
|
7
7
|
const react$1 = require('@zag-js/react');
|
|
8
8
|
const react = require('react');
|
|
9
9
|
require('../environment/index.cjs');
|
|
@@ -27,7 +27,7 @@ function _interopNamespaceDefault(e) {
|
|
|
27
27
|
return Object.freeze(n);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
const
|
|
30
|
+
const rating__namespace = /*#__PURE__*/_interopNamespaceDefault(rating);
|
|
31
31
|
|
|
32
32
|
const useRatingGroup = (props) => {
|
|
33
33
|
const initialContext = {
|
|
@@ -42,10 +42,10 @@ const useRatingGroup = (props) => {
|
|
|
42
42
|
onValueChange: useEvent.useEvent(props.onValueChange, { sync: true }),
|
|
43
43
|
onHoverChange: useEvent.useEvent(props.onHoverChange)
|
|
44
44
|
};
|
|
45
|
-
const [state, send] = react$1.useMachine(
|
|
45
|
+
const [state, send] = react$1.useMachine(rating__namespace.machine(initialContext), {
|
|
46
46
|
context
|
|
47
47
|
});
|
|
48
|
-
return
|
|
48
|
+
return rating__namespace.connect(state, send, react$1.normalizeProps);
|
|
49
49
|
};
|
|
50
50
|
|
|
51
51
|
exports.useRatingGroup = useRatingGroup;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as rating from '@zag-js/rating-group';
|
|
2
2
|
import { type PropTypes } from '@zag-js/react';
|
|
3
3
|
import { type Optional } from '../types';
|
|
4
|
-
export interface UseRatingGroupProps extends Optional<
|
|
4
|
+
export interface UseRatingGroupProps extends Optional<rating.Context, 'id'> {
|
|
5
5
|
/**
|
|
6
6
|
* The initial value of the rating group.
|
|
7
7
|
*/
|
|
8
|
-
defaultValue?:
|
|
8
|
+
defaultValue?: rating.Context['value'];
|
|
9
9
|
}
|
|
10
|
-
export interface UseRatingGroupReturn extends
|
|
10
|
+
export interface UseRatingGroupReturn extends rating.Api<PropTypes> {
|
|
11
11
|
}
|
|
12
12
|
export declare const useRatingGroup: (props: UseRatingGroupProps) => UseRatingGroupReturn;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import * as
|
|
2
|
+
import * as rating from '@zag-js/rating-group';
|
|
3
3
|
import { useMachine, normalizeProps } from '@zag-js/react';
|
|
4
4
|
import { useId } from 'react';
|
|
5
5
|
import '../environment/index.mjs';
|
|
@@ -19,10 +19,10 @@ const useRatingGroup = (props) => {
|
|
|
19
19
|
onValueChange: useEvent(props.onValueChange, { sync: true }),
|
|
20
20
|
onHoverChange: useEvent(props.onHoverChange)
|
|
21
21
|
};
|
|
22
|
-
const [state, send] = useMachine(
|
|
22
|
+
const [state, send] = useMachine(rating.machine(initialContext), {
|
|
23
23
|
context
|
|
24
24
|
});
|
|
25
|
-
return
|
|
25
|
+
return rating.connect(state, send, normalizeProps);
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
export { useRatingGroup };
|
|
@@ -4,18 +4,18 @@
|
|
|
4
4
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
5
|
|
|
6
6
|
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
const anatomy = require('@ark-ui/anatomy');
|
|
7
8
|
const react$1 = require('@zag-js/react');
|
|
8
9
|
const react = require('react');
|
|
9
10
|
const factory = require('../factory.cjs');
|
|
10
11
|
const segmentGroupContext = require('./segment-group-context.cjs');
|
|
11
|
-
const segmentGroup_anatomy = require('./segment-group.anatomy.cjs');
|
|
12
12
|
|
|
13
13
|
const SegmentGroupIndicator = react.forwardRef(
|
|
14
14
|
(props, ref) => {
|
|
15
15
|
const api = segmentGroupContext.useSegmentGroupContext();
|
|
16
16
|
const mergedProps = react$1.mergeProps(
|
|
17
17
|
api.indicatorProps,
|
|
18
|
-
|
|
18
|
+
anatomy.segmentGroupAnatomy.build().indicator.attrs,
|
|
19
19
|
props
|
|
20
20
|
);
|
|
21
21
|
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref });
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { segmentGroupAnatomy } from '@ark-ui/anatomy';
|
|
3
4
|
import { mergeProps } from '@zag-js/react';
|
|
4
5
|
import { forwardRef } from 'react';
|
|
5
6
|
import { ark } from '../factory.mjs';
|
|
6
7
|
import { useSegmentGroupContext } from './segment-group-context.mjs';
|
|
7
|
-
import { parts } from './segment-group.anatomy.mjs';
|
|
8
8
|
|
|
9
9
|
const SegmentGroupIndicator = forwardRef(
|
|
10
10
|
(props, ref) => {
|
|
11
11
|
const api = useSegmentGroupContext();
|
|
12
12
|
const mergedProps = mergeProps(
|
|
13
13
|
api.indicatorProps,
|
|
14
|
-
|
|
14
|
+
segmentGroupAnatomy.build().indicator.attrs,
|
|
15
15
|
props
|
|
16
16
|
);
|
|
17
17
|
return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });
|
|
@@ -1,18 +1,6 @@
|
|
|
1
1
|
import { Provider } from 'react';
|
|
2
2
|
/// <reference types="react" />
|
|
3
|
-
|
|
4
|
-
value: string;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
invalid?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export interface ItemState {
|
|
9
|
-
isInvalid: boolean;
|
|
10
|
-
isDisabled: boolean;
|
|
11
|
-
isChecked: boolean;
|
|
12
|
-
isFocused: boolean;
|
|
13
|
-
isHovered: boolean;
|
|
14
|
-
isActive: boolean;
|
|
15
|
-
}
|
|
3
|
+
import type { ItemProps } from '@zag-js/radio-group';
|
|
16
4
|
export interface SegmentGroupItemContext extends ItemProps {
|
|
17
5
|
}
|
|
18
6
|
export declare const SegmentGroupItemProvider: Provider<SegmentGroupItemContext>, useSegmentGroupItemContext: () => SegmentGroupItemContext;
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
5
|
|
|
6
6
|
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
const anatomy = require('@ark-ui/anatomy');
|
|
7
8
|
const react$1 = require('@zag-js/react');
|
|
8
9
|
const react = require('react');
|
|
9
10
|
const factory = require('../factory.cjs');
|
|
10
11
|
const segmentGroupContext = require('./segment-group-context.cjs');
|
|
11
12
|
const segmentGroupItemContext = require('./segment-group-item-context.cjs');
|
|
12
|
-
const segmentGroup_anatomy = require('./segment-group.anatomy.cjs');
|
|
13
13
|
|
|
14
14
|
const SegmentGroupItemControl = react.forwardRef(
|
|
15
15
|
(props, ref) => {
|
|
@@ -17,7 +17,7 @@ const SegmentGroupItemControl = react.forwardRef(
|
|
|
17
17
|
const itemProps = segmentGroupItemContext.useSegmentGroupItemContext();
|
|
18
18
|
const mergedProps = react$1.mergeProps(
|
|
19
19
|
api.getItemControlProps(itemProps),
|
|
20
|
-
|
|
20
|
+
anatomy.segmentGroupAnatomy.build().itemControl.attrs,
|
|
21
21
|
props
|
|
22
22
|
);
|
|
23
23
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { segmentGroupAnatomy } from '@ark-ui/anatomy';
|
|
3
4
|
import { mergeProps } from '@zag-js/react';
|
|
4
5
|
import { forwardRef } from 'react';
|
|
5
6
|
import { ark } from '../factory.mjs';
|
|
6
7
|
import { useSegmentGroupContext } from './segment-group-context.mjs';
|
|
7
8
|
import { useSegmentGroupItemContext } from './segment-group-item-context.mjs';
|
|
8
|
-
import { parts } from './segment-group.anatomy.mjs';
|
|
9
9
|
|
|
10
10
|
const SegmentGroupItemControl = forwardRef(
|
|
11
11
|
(props, ref) => {
|
|
@@ -13,7 +13,7 @@ const SegmentGroupItemControl = forwardRef(
|
|
|
13
13
|
const itemProps = useSegmentGroupItemContext();
|
|
14
14
|
const mergedProps = mergeProps(
|
|
15
15
|
api.getItemControlProps(itemProps),
|
|
16
|
-
|
|
16
|
+
segmentGroupAnatomy.build().itemControl.attrs,
|
|
17
17
|
props
|
|
18
18
|
);
|
|
19
19
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
5
|
|
|
6
6
|
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
const anatomy = require('@ark-ui/anatomy');
|
|
7
8
|
const react$1 = require('@zag-js/react');
|
|
8
9
|
const react = require('react');
|
|
9
10
|
const factory = require('../factory.cjs');
|
|
10
11
|
const segmentGroupContext = require('./segment-group-context.cjs');
|
|
11
12
|
const segmentGroupItemContext = require('./segment-group-item-context.cjs');
|
|
12
|
-
const segmentGroup_anatomy = require('./segment-group.anatomy.cjs');
|
|
13
13
|
|
|
14
14
|
const SegmentGroupItemText = react.forwardRef(
|
|
15
15
|
(props, ref) => {
|
|
@@ -17,7 +17,7 @@ const SegmentGroupItemText = react.forwardRef(
|
|
|
17
17
|
const itemProps = segmentGroupItemContext.useSegmentGroupItemContext();
|
|
18
18
|
const mergedProps = react$1.mergeProps(
|
|
19
19
|
api.getItemTextProps(itemProps),
|
|
20
|
-
|
|
20
|
+
anatomy.segmentGroupAnatomy.build().itemText.attrs,
|
|
21
21
|
props
|
|
22
22
|
);
|
|
23
23
|
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.span, { ...mergedProps, ref });
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { segmentGroupAnatomy } from '@ark-ui/anatomy';
|
|
3
4
|
import { mergeProps } from '@zag-js/react';
|
|
4
5
|
import { forwardRef } from 'react';
|
|
5
6
|
import { ark } from '../factory.mjs';
|
|
6
7
|
import { useSegmentGroupContext } from './segment-group-context.mjs';
|
|
7
8
|
import { useSegmentGroupItemContext } from './segment-group-item-context.mjs';
|
|
8
|
-
import { parts } from './segment-group.anatomy.mjs';
|
|
9
9
|
|
|
10
10
|
const SegmentGroupItemText = forwardRef(
|
|
11
11
|
(props, ref) => {
|
|
@@ -13,7 +13,7 @@ const SegmentGroupItemText = forwardRef(
|
|
|
13
13
|
const itemProps = useSegmentGroupItemContext();
|
|
14
14
|
const mergedProps = mergeProps(
|
|
15
15
|
api.getItemTextProps(itemProps),
|
|
16
|
-
|
|
16
|
+
segmentGroupAnatomy.build().itemText.attrs,
|
|
17
17
|
props
|
|
18
18
|
);
|
|
19
19
|
return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
5
|
|
|
6
6
|
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
const anatomy = require('@ark-ui/anatomy');
|
|
7
8
|
const react$1 = require('@zag-js/react');
|
|
8
9
|
const react = require('react');
|
|
9
10
|
const createSplitProps = require('../create-split-props.cjs');
|
|
@@ -11,7 +12,6 @@ const factory = require('../factory.cjs');
|
|
|
11
12
|
const runIfFn = require('../run-if-fn.cjs');
|
|
12
13
|
const segmentGroupContext = require('./segment-group-context.cjs');
|
|
13
14
|
const segmentGroupItemContext = require('./segment-group-item-context.cjs');
|
|
14
|
-
const segmentGroup_anatomy = require('./segment-group.anatomy.cjs');
|
|
15
15
|
|
|
16
16
|
const SegmentGroupItem = react.forwardRef(
|
|
17
17
|
(props, ref) => {
|
|
@@ -22,12 +22,12 @@ const SegmentGroupItem = react.forwardRef(
|
|
|
22
22
|
const api = segmentGroupContext.useSegmentGroupContext();
|
|
23
23
|
const mergedProps = react$1.mergeProps(
|
|
24
24
|
api.getItemProps(itemProps),
|
|
25
|
-
|
|
25
|
+
anatomy.segmentGroupAnatomy.build().item.attrs,
|
|
26
26
|
localProps
|
|
27
27
|
);
|
|
28
28
|
const itemState = api.getItemState(itemProps);
|
|
29
29
|
const view = runIfFn.runIfFn(children, itemState);
|
|
30
|
-
return /* @__PURE__ */ jsxRuntime.jsx(segmentGroupItemContext.SegmentGroupItemProvider, { value:
|
|
30
|
+
return /* @__PURE__ */ jsxRuntime.jsx(segmentGroupItemContext.SegmentGroupItemProvider, { value: itemProps, children: /* @__PURE__ */ jsxRuntime.jsx(factory.ark.label, { ...mergedProps, ref, children: view }) });
|
|
31
31
|
}
|
|
32
32
|
);
|
|
33
33
|
SegmentGroupItem.displayName = "SegmentGroupItem";
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import type { ItemState } from '@zag-js/radio-group';
|
|
1
2
|
import { ForwardRefExoticComponent, RefAttributes, type ReactNode } from 'react';
|
|
2
3
|
import { type HTMLArkProps } from '../factory';
|
|
3
4
|
import type { Assign } from '../types';
|
|
4
|
-
import { type
|
|
5
|
+
import { type SegmentGroupItemContext } from './segment-group-item-context';
|
|
5
6
|
export interface SegmentGroupItemProps extends Assign<HTMLArkProps<'label'>, {
|
|
6
|
-
children?:
|
|
7
|
+
children?: ((state: ItemState) => ReactNode) | ReactNode;
|
|
7
8
|
}>, SegmentGroupItemContext {
|
|
8
9
|
}
|
|
9
10
|
export declare const SegmentGroupItem: ForwardRefExoticComponent<SegmentGroupItemProps & RefAttributes<HTMLLabelElement>>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { segmentGroupAnatomy } from '@ark-ui/anatomy';
|
|
3
4
|
import { mergeProps } from '@zag-js/react';
|
|
4
5
|
import { forwardRef } from 'react';
|
|
5
6
|
import { createSplitProps } from '../create-split-props.mjs';
|
|
@@ -7,7 +8,6 @@ import { ark } from '../factory.mjs';
|
|
|
7
8
|
import { runIfFn } from '../run-if-fn.mjs';
|
|
8
9
|
import { useSegmentGroupContext } from './segment-group-context.mjs';
|
|
9
10
|
import { SegmentGroupItemProvider } from './segment-group-item-context.mjs';
|
|
10
|
-
import { parts } from './segment-group.anatomy.mjs';
|
|
11
11
|
|
|
12
12
|
const SegmentGroupItem = forwardRef(
|
|
13
13
|
(props, ref) => {
|
|
@@ -18,12 +18,12 @@ const SegmentGroupItem = forwardRef(
|
|
|
18
18
|
const api = useSegmentGroupContext();
|
|
19
19
|
const mergedProps = mergeProps(
|
|
20
20
|
api.getItemProps(itemProps),
|
|
21
|
-
|
|
21
|
+
segmentGroupAnatomy.build().item.attrs,
|
|
22
22
|
localProps
|
|
23
23
|
);
|
|
24
24
|
const itemState = api.getItemState(itemProps);
|
|
25
25
|
const view = runIfFn(children, itemState);
|
|
26
|
-
return /* @__PURE__ */ jsx(SegmentGroupItemProvider, { value:
|
|
26
|
+
return /* @__PURE__ */ jsx(SegmentGroupItemProvider, { value: itemProps, children: /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref, children: view }) });
|
|
27
27
|
}
|
|
28
28
|
);
|
|
29
29
|
SegmentGroupItem.displayName = "SegmentGroupItem";
|
|
@@ -4,18 +4,18 @@
|
|
|
4
4
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
5
|
|
|
6
6
|
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
const anatomy = require('@ark-ui/anatomy');
|
|
7
8
|
const react$1 = require('@zag-js/react');
|
|
8
9
|
const react = require('react');
|
|
9
10
|
const factory = require('../factory.cjs');
|
|
10
11
|
const segmentGroupContext = require('./segment-group-context.cjs');
|
|
11
|
-
const segmentGroup_anatomy = require('./segment-group.anatomy.cjs');
|
|
12
12
|
|
|
13
13
|
const SegmentGroupLabel = react.forwardRef(
|
|
14
14
|
(props, ref) => {
|
|
15
15
|
const api = segmentGroupContext.useSegmentGroupContext();
|
|
16
16
|
const mergedProps = react$1.mergeProps(
|
|
17
17
|
api.labelProps,
|
|
18
|
-
|
|
18
|
+
anatomy.segmentGroupAnatomy.build().label.attrs,
|
|
19
19
|
props
|
|
20
20
|
);
|
|
21
21
|
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.label, { ...mergedProps, ref });
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { segmentGroupAnatomy } from '@ark-ui/anatomy';
|
|
3
4
|
import { mergeProps } from '@zag-js/react';
|
|
4
5
|
import { forwardRef } from 'react';
|
|
5
6
|
import { ark } from '../factory.mjs';
|
|
6
7
|
import { useSegmentGroupContext } from './segment-group-context.mjs';
|
|
7
|
-
import { parts } from './segment-group.anatomy.mjs';
|
|
8
8
|
|
|
9
9
|
const SegmentGroupLabel = forwardRef(
|
|
10
10
|
(props, ref) => {
|
|
11
11
|
const api = useSegmentGroupContext();
|
|
12
12
|
const mergedProps = mergeProps(
|
|
13
13
|
api.labelProps,
|
|
14
|
-
|
|
14
|
+
segmentGroupAnatomy.build().label.attrs,
|
|
15
15
|
props
|
|
16
16
|
);
|
|
17
17
|
return /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref });
|
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
5
|
|
|
6
6
|
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
const anatomy = require('@ark-ui/anatomy');
|
|
7
8
|
const react$1 = require('@zag-js/react');
|
|
8
9
|
const react = require('react');
|
|
9
10
|
const createSplitProps = require('../create-split-props.cjs');
|
|
10
11
|
const factory = require('../factory.cjs');
|
|
11
12
|
const segmentGroupContext = require('./segment-group-context.cjs');
|
|
12
|
-
const segmentGroup_anatomy = require('./segment-group.anatomy.cjs');
|
|
13
13
|
const useSegmentGroup = require('./use-segment-group.cjs');
|
|
14
14
|
|
|
15
15
|
const SegmentGroup = react.forwardRef((props, ref) => {
|
|
16
|
-
const [useSegmentGroupProps,
|
|
16
|
+
const [useSegmentGroupProps, localProps] = createSplitProps.createSplitProps()(props, [
|
|
17
17
|
"defaultValue",
|
|
18
18
|
"dir",
|
|
19
19
|
"disabled",
|
|
@@ -29,8 +29,8 @@ const SegmentGroup = react.forwardRef((props, ref) => {
|
|
|
29
29
|
const api = useSegmentGroup.useSegmentGroup(useSegmentGroupProps);
|
|
30
30
|
const mergedProps = react$1.mergeProps(
|
|
31
31
|
api.rootProps,
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
anatomy.segmentGroupAnatomy.build().root.attrs,
|
|
33
|
+
localProps
|
|
34
34
|
);
|
|
35
35
|
return /* @__PURE__ */ jsxRuntime.jsx(segmentGroupContext.SegmentGroupProvider, { value: api, children: /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref }) });
|
|
36
36
|
});
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { segmentGroupAnatomy } from '@ark-ui/anatomy';
|
|
3
4
|
import { mergeProps } from '@zag-js/react';
|
|
4
5
|
import { forwardRef } from 'react';
|
|
5
6
|
import { createSplitProps } from '../create-split-props.mjs';
|
|
6
7
|
import { ark } from '../factory.mjs';
|
|
7
8
|
import { SegmentGroupProvider } from './segment-group-context.mjs';
|
|
8
|
-
import { parts } from './segment-group.anatomy.mjs';
|
|
9
9
|
import { useSegmentGroup } from './use-segment-group.mjs';
|
|
10
10
|
|
|
11
11
|
const SegmentGroup = forwardRef((props, ref) => {
|
|
12
|
-
const [useSegmentGroupProps,
|
|
12
|
+
const [useSegmentGroupProps, localProps] = createSplitProps()(props, [
|
|
13
13
|
"defaultValue",
|
|
14
14
|
"dir",
|
|
15
15
|
"disabled",
|
|
@@ -25,8 +25,8 @@ const SegmentGroup = forwardRef((props, ref) => {
|
|
|
25
25
|
const api = useSegmentGroup(useSegmentGroupProps);
|
|
26
26
|
const mergedProps = mergeProps(
|
|
27
27
|
api.rootProps,
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
segmentGroupAnatomy.build().root.attrs,
|
|
29
|
+
localProps
|
|
30
30
|
);
|
|
31
31
|
return /* @__PURE__ */ jsx(SegmentGroupProvider, { value: api, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) });
|
|
32
32
|
});
|
|
@@ -11,9 +11,9 @@ const factory = require('../factory.cjs');
|
|
|
11
11
|
const selectContext = require('./select-context.cjs');
|
|
12
12
|
|
|
13
13
|
const SelectItemGroup = react.forwardRef((props, ref) => {
|
|
14
|
-
const [
|
|
14
|
+
const [itemGroupProps, localProps] = createSplitProps.createSplitProps()(props, ["id"]);
|
|
15
15
|
const api = selectContext.useSelectContext();
|
|
16
|
-
const mergedProps = react$1.mergeProps(api.getItemGroupProps(
|
|
16
|
+
const mergedProps = react$1.mergeProps(api.getItemGroupProps(itemGroupProps), localProps);
|
|
17
17
|
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref });
|
|
18
18
|
});
|
|
19
19
|
SelectItemGroup.displayName = "SelectItemGroup";
|
|
@@ -7,9 +7,9 @@ import { ark } from '../factory.mjs';
|
|
|
7
7
|
import { useSelectContext } from './select-context.mjs';
|
|
8
8
|
|
|
9
9
|
const SelectItemGroup = forwardRef((props, ref) => {
|
|
10
|
-
const [
|
|
10
|
+
const [itemGroupProps, localProps] = createSplitProps()(props, ["id"]);
|
|
11
11
|
const api = useSelectContext();
|
|
12
|
-
const mergedProps = mergeProps(api.getItemGroupProps(
|
|
12
|
+
const mergedProps = mergeProps(api.getItemGroupProps(itemGroupProps), localProps);
|
|
13
13
|
return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });
|
|
14
14
|
});
|
|
15
15
|
SelectItemGroup.displayName = "SelectItemGroup";
|
package/select/select.cjs
CHANGED
|
@@ -52,7 +52,7 @@ const SelectImpl = (props, ref) => {
|
|
|
52
52
|
]
|
|
53
53
|
);
|
|
54
54
|
const api = useSelect.useSelect(useSelectProps);
|
|
55
|
-
const presenceApi = usePresence.usePresence({
|
|
55
|
+
const presenceApi = usePresence.usePresence(react$1.mergeProps({ present: api.isOpen }, presenceProps));
|
|
56
56
|
const view = runIfFn.runIfFn(children, api);
|
|
57
57
|
const mergedProps = react$1.mergeProps(api.rootProps, localProps);
|
|
58
58
|
return /* @__PURE__ */ jsxRuntime.jsx(selectContext.SelectProvider, { value: api, children: /* @__PURE__ */ jsxRuntime.jsx(presenceContext.PresenceProvider, { value: presenceApi, children: /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref, children: view }) }) });
|
package/select/select.d.ts
CHANGED
package/select/select.mjs
CHANGED
|
@@ -48,7 +48,7 @@ const SelectImpl = (props, ref) => {
|
|
|
48
48
|
]
|
|
49
49
|
);
|
|
50
50
|
const api = useSelect(useSelectProps);
|
|
51
|
-
const presenceApi = usePresence({
|
|
51
|
+
const presenceApi = usePresence(mergeProps({ present: api.isOpen }, presenceProps));
|
|
52
52
|
const view = runIfFn(children, api);
|
|
53
53
|
const mergedProps = mergeProps(api.rootProps, localProps);
|
|
54
54
|
return /* @__PURE__ */ jsx(SelectProvider, { value: api, children: /* @__PURE__ */ jsx(PresenceProvider, { value: presenceApi, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref, children: view }) }) });
|
|
@@ -5,6 +5,7 @@ type SliderType = typeof Slider;
|
|
|
5
5
|
declare const meta: Meta<SliderType>;
|
|
6
6
|
export default meta;
|
|
7
7
|
export declare const Basic: () => JSX.Element;
|
|
8
|
+
export declare const Range: () => JSX.Element;
|
|
8
9
|
export declare const WithMarks: () => JSX.Element;
|
|
9
10
|
export declare const InitialValue: () => JSX.Element;
|
|
10
11
|
export declare const MinMax: () => JSX.Element;
|
|
@@ -12,4 +13,3 @@ export declare const Step: () => JSX.Element;
|
|
|
12
13
|
export declare const OnEvent: () => JSX.Element;
|
|
13
14
|
export declare const Vertical: () => JSX.Element;
|
|
14
15
|
export declare const CenterOrigin: () => JSX.Element;
|
|
15
|
-
export declare const Advanced: () => JSX.Element;
|
package/switch/switch.cjs
CHANGED
|
@@ -13,7 +13,7 @@ const switchContext = require('./switch-context.cjs');
|
|
|
13
13
|
const useSwitch = require('./use-switch.cjs');
|
|
14
14
|
|
|
15
15
|
const Switch = react.forwardRef((props, ref) => {
|
|
16
|
-
const [switchProps, { children, ...
|
|
16
|
+
const [switchProps, { children, ...localProps }] = createSplitProps.createSplitProps()(props, [
|
|
17
17
|
"checked",
|
|
18
18
|
"defaultChecked",
|
|
19
19
|
"dir",
|
|
@@ -30,8 +30,8 @@ const Switch = react.forwardRef((props, ref) => {
|
|
|
30
30
|
"value"
|
|
31
31
|
]);
|
|
32
32
|
const api = useSwitch.useSwitch(switchProps);
|
|
33
|
+
const mergedProps = react$1.mergeProps(api.rootProps, localProps);
|
|
33
34
|
const view = runIfFn.runIfFn(children, api);
|
|
34
|
-
const mergedProps = react$1.mergeProps(api.rootProps, labelProps);
|
|
35
35
|
return /* @__PURE__ */ jsxRuntime.jsx(switchContext.SwitchProvider, { value: api, children: /* @__PURE__ */ jsxRuntime.jsx(factory.ark.label, { ...mergedProps, ref, children: view }) });
|
|
36
36
|
});
|
|
37
37
|
Switch.displayName = "Switch";
|
package/switch/switch.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import { SwitchProvider } from './switch-context.mjs';
|
|
|
9
9
|
import { useSwitch } from './use-switch.mjs';
|
|
10
10
|
|
|
11
11
|
const Switch = forwardRef((props, ref) => {
|
|
12
|
-
const [switchProps, { children, ...
|
|
12
|
+
const [switchProps, { children, ...localProps }] = createSplitProps()(props, [
|
|
13
13
|
"checked",
|
|
14
14
|
"defaultChecked",
|
|
15
15
|
"dir",
|
|
@@ -26,8 +26,8 @@ const Switch = forwardRef((props, ref) => {
|
|
|
26
26
|
"value"
|
|
27
27
|
]);
|
|
28
28
|
const api = useSwitch(switchProps);
|
|
29
|
+
const mergedProps = mergeProps(api.rootProps, localProps);
|
|
29
30
|
const view = runIfFn(children, api);
|
|
30
|
-
const mergedProps = mergeProps(api.rootProps, labelProps);
|
|
31
31
|
return /* @__PURE__ */ jsx(SwitchProvider, { value: api, children: /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref, children: view }) });
|
|
32
32
|
});
|
|
33
33
|
Switch.displayName = "Switch";
|
package/toast/create-toaster.cjs
CHANGED
|
@@ -8,8 +8,8 @@ const react = require('@zag-js/react');
|
|
|
8
8
|
const toast = require('@zag-js/toast');
|
|
9
9
|
const react$1 = require('react');
|
|
10
10
|
require('../environment/index.cjs');
|
|
11
|
-
const factory = require('../factory.cjs');
|
|
12
11
|
const toastContext = require('./toast-context.cjs');
|
|
12
|
+
const toastGroup = require('./toast-group.cjs');
|
|
13
13
|
const environmentContext = require('../environment/environment-context.cjs');
|
|
14
14
|
|
|
15
15
|
function _interopNamespaceDefault(e) {
|
|
@@ -45,7 +45,7 @@ const createToaster = (props) => {
|
|
|
45
45
|
}, []);
|
|
46
46
|
const mergedProps = react.mergeProps(api.getGroupProps({ placement }), props2);
|
|
47
47
|
const toasts = api.toastsByPlacement[placement] ?? [];
|
|
48
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
48
|
+
return /* @__PURE__ */ jsxRuntime.jsx(toastGroup.ToastGroup, { ...mergedProps, ref, children: toasts.map((toast2) => /* @__PURE__ */ jsxRuntime.jsx(ToastProviderFactory, { service: toast2 }, toast2.id)) });
|
|
49
49
|
});
|
|
50
50
|
Toaster.displayName = "ToastGroup";
|
|
51
51
|
return [Toaster, api];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type PropTypes } from '@zag-js/react';
|
|
2
2
|
import * as toast from '@zag-js/toast';
|
|
3
|
-
import
|
|
3
|
+
import { type JSX } from 'react';
|
|
4
4
|
import type { Optional } from '../types';
|
|
5
5
|
type GroupContext = Partial<toast.GroupMachineContext>;
|
|
6
6
|
export interface CreateToasterProps extends Omit<Optional<GroupContext, 'id'>, 'render'> {
|
package/toast/create-toaster.mjs
CHANGED
|
@@ -4,8 +4,8 @@ import { normalizeProps, useActor, mergeProps } from '@zag-js/react';
|
|
|
4
4
|
import * as toast from '@zag-js/toast';
|
|
5
5
|
import { forwardRef, useEffect } from 'react';
|
|
6
6
|
import '../environment/index.mjs';
|
|
7
|
-
import { ark } from '../factory.mjs';
|
|
8
7
|
import { ToastProvider } from './toast-context.mjs';
|
|
8
|
+
import { ToastGroup } from './toast-group.mjs';
|
|
9
9
|
import { useEnvironmentContext } from '../environment/environment-context.mjs';
|
|
10
10
|
|
|
11
11
|
const createToaster = (props) => {
|
|
@@ -22,7 +22,7 @@ const createToaster = (props) => {
|
|
|
22
22
|
}, []);
|
|
23
23
|
const mergedProps = mergeProps(api.getGroupProps({ placement }), props2);
|
|
24
24
|
const toasts = api.toastsByPlacement[placement] ?? [];
|
|
25
|
-
return /* @__PURE__ */ jsx(
|
|
25
|
+
return /* @__PURE__ */ jsx(ToastGroup, { ...mergedProps, ref, children: toasts.map((toast2) => /* @__PURE__ */ jsx(ToastProviderFactory, { service: toast2 }, toast2.id)) });
|
|
26
26
|
});
|
|
27
27
|
Toaster.displayName = "ToastGroup";
|
|
28
28
|
return [Toaster, api];
|
package/toast/index.cjs
CHANGED
|
@@ -7,17 +7,20 @@ const createToaster = require('./create-toaster.cjs');
|
|
|
7
7
|
const toast = require('./toast.cjs');
|
|
8
8
|
const toastCloseTrigger = require('./toast-close-trigger.cjs');
|
|
9
9
|
const toastDescription = require('./toast-description.cjs');
|
|
10
|
+
const toastGroup = require('./toast-group.cjs');
|
|
10
11
|
const toastTitle = require('./toast-title.cjs');
|
|
11
12
|
|
|
12
13
|
const Toast = Object.assign(toast.Toast, {
|
|
13
14
|
Root: toast.Toast,
|
|
14
|
-
|
|
15
|
+
CloseTrigger: toastCloseTrigger.ToastCloseTrigger,
|
|
15
16
|
Description: toastDescription.ToastDescription,
|
|
16
|
-
|
|
17
|
+
Group: toastGroup.ToastGroup,
|
|
18
|
+
Title: toastTitle.ToastTitle
|
|
17
19
|
});
|
|
18
20
|
|
|
19
21
|
exports.createToaster = createToaster.createToaster;
|
|
20
22
|
exports.ToastCloseTrigger = toastCloseTrigger.ToastCloseTrigger;
|
|
21
23
|
exports.ToastDescription = toastDescription.ToastDescription;
|
|
24
|
+
exports.ToastGroup = toastGroup.ToastGroup;
|
|
22
25
|
exports.ToastTitle = toastTitle.ToastTitle;
|
|
23
26
|
exports.Toast = Toast;
|
package/toast/index.d.ts
CHANGED
|
@@ -4,12 +4,14 @@ import { createToaster, type CreateToasterProps, type CreateToasterReturn } from
|
|
|
4
4
|
import { type ToastProps } from './toast';
|
|
5
5
|
import { ToastCloseTrigger, type ToastCloseTriggerProps } from './toast-close-trigger';
|
|
6
6
|
import { ToastDescription, type ToastDescriptionProps } from './toast-description';
|
|
7
|
+
import { ToastGroup, type ToastGroupProps } from './toast-group';
|
|
7
8
|
import { ToastTitle, type ToastTitleProps } from './toast-title';
|
|
8
9
|
declare const Toast: ForwardRefExoticComponent<ToastProps & RefAttributes<HTMLLIElement>> & {
|
|
9
10
|
Root: ForwardRefExoticComponent<ToastProps & RefAttributes<HTMLLIElement>>;
|
|
10
|
-
Title: ForwardRefExoticComponent<ToastTitleProps & RefAttributes<HTMLDivElement>>;
|
|
11
|
-
Description: ForwardRefExoticComponent<ToastDescriptionProps & RefAttributes<HTMLDivElement>>;
|
|
12
11
|
CloseTrigger: ForwardRefExoticComponent<ToastCloseTriggerProps & RefAttributes<HTMLButtonElement>>;
|
|
12
|
+
Description: ForwardRefExoticComponent<ToastDescriptionProps & RefAttributes<HTMLDivElement>>;
|
|
13
|
+
Group: ForwardRefExoticComponent<ToastGroupProps & RefAttributes<HTMLOListElement>>;
|
|
14
|
+
Title: ForwardRefExoticComponent<ToastTitleProps & RefAttributes<HTMLDivElement>>;
|
|
13
15
|
};
|
|
14
|
-
export { createToaster, Toast, ToastCloseTrigger, ToastDescription, ToastTitle };
|
|
15
|
-
export type { CreateToasterProps, CreateToasterReturn, ToastCloseTriggerProps, ToastDescriptionProps, ToastProps, ToastTitleProps, };
|
|
16
|
+
export { createToaster, Toast, ToastCloseTrigger, ToastDescription, ToastGroup, ToastTitle };
|
|
17
|
+
export type { CreateToasterProps, CreateToasterReturn, ToastCloseTriggerProps, ToastDescriptionProps, ToastGroupProps, ToastProps, ToastTitleProps, };
|
package/toast/index.mjs
CHANGED
|
@@ -3,13 +3,15 @@ export { createToaster } from './create-toaster.mjs';
|
|
|
3
3
|
import { Toast as Toast$1 } from './toast.mjs';
|
|
4
4
|
import { ToastCloseTrigger } from './toast-close-trigger.mjs';
|
|
5
5
|
import { ToastDescription } from './toast-description.mjs';
|
|
6
|
+
import { ToastGroup } from './toast-group.mjs';
|
|
6
7
|
import { ToastTitle } from './toast-title.mjs';
|
|
7
8
|
|
|
8
9
|
const Toast = Object.assign(Toast$1, {
|
|
9
10
|
Root: Toast$1,
|
|
10
|
-
|
|
11
|
+
CloseTrigger: ToastCloseTrigger,
|
|
11
12
|
Description: ToastDescription,
|
|
12
|
-
|
|
13
|
+
Group: ToastGroup,
|
|
14
|
+
Title: ToastTitle
|
|
13
15
|
});
|
|
14
16
|
|
|
15
|
-
export { Toast, ToastCloseTrigger, ToastDescription, ToastTitle };
|
|
17
|
+
export { Toast, ToastCloseTrigger, ToastDescription, ToastGroup, ToastTitle };
|