@seed-design/react 1.1.16 → 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/lib/components/AspectRatio/AspectRatio.cjs +53 -0
- package/lib/components/AspectRatio/AspectRatio.d.ts +11 -0
- package/lib/components/AspectRatio/AspectRatio.d.ts.map +1 -0
- package/lib/components/AspectRatio/AspectRatio.js +30 -0
- package/lib/components/AspectRatio/index.cjs +9 -0
- package/lib/components/AspectRatio/index.d.ts +2 -0
- package/lib/components/AspectRatio/index.d.ts.map +1 -0
- package/lib/components/AspectRatio/index.js +1 -0
- package/lib/components/Avatar/Avatar.cjs +4 -10
- package/lib/components/Avatar/Avatar.d.ts +4 -4
- package/lib/components/Avatar/Avatar.d.ts.map +1 -1
- package/lib/components/Avatar/Avatar.js +4 -10
- package/lib/components/Checkbox/Checkbox.cjs +10 -0
- package/lib/components/Checkbox/Checkbox.d.ts +4 -0
- package/lib/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/components/Checkbox/Checkbox.js +10 -1
- package/lib/components/Checkbox/Checkbox.namespace.cjs +1 -0
- package/lib/components/Checkbox/Checkbox.namespace.d.ts +1 -1
- package/lib/components/Checkbox/Checkbox.namespace.d.ts.map +1 -1
- package/lib/components/Checkbox/Checkbox.namespace.js +1 -1
- package/lib/components/Checkbox/index.cjs +1 -0
- package/lib/components/Checkbox/index.d.ts +1 -1
- package/lib/components/Checkbox/index.d.ts.map +1 -1
- package/lib/components/Checkbox/index.js +1 -1
- package/lib/components/ChipTabs/ChipTabs.cjs +23 -4
- package/lib/components/ChipTabs/ChipTabs.d.ts.map +1 -1
- package/lib/components/ChipTabs/ChipTabs.js +23 -4
- package/lib/components/Dialog/Dialog.d.ts.map +1 -1
- package/lib/components/Fieldset/Fieldset.cjs +86 -0
- package/lib/components/Fieldset/Fieldset.d.ts +30 -0
- package/lib/components/Fieldset/Fieldset.d.ts.map +1 -0
- package/lib/components/Fieldset/Fieldset.js +75 -0
- package/lib/components/Fieldset/Fieldset.namespace.cjs +16 -0
- package/lib/components/Fieldset/Fieldset.namespace.d.ts +2 -0
- package/lib/components/Fieldset/Fieldset.namespace.d.ts.map +1 -0
- package/lib/components/Fieldset/Fieldset.namespace.js +1 -0
- package/lib/components/Fieldset/index.cjs +18 -0
- package/lib/components/Fieldset/index.d.ts +3 -0
- package/lib/components/Fieldset/index.d.ts.map +1 -0
- package/lib/components/Fieldset/index.js +3 -0
- package/lib/components/Grid/Grid.cjs +56 -0
- package/lib/components/Grid/Grid.d.ts +41 -0
- package/lib/components/Grid/Grid.d.ts.map +1 -0
- package/lib/components/Grid/Grid.js +33 -0
- package/lib/components/Grid/index.cjs +9 -0
- package/lib/components/Grid/index.d.ts +2 -0
- package/lib/components/Grid/index.d.ts.map +1 -0
- package/lib/components/Grid/index.js +1 -0
- package/lib/components/GridItem/GridItem.cjs +45 -0
- package/lib/components/GridItem/GridItem.d.ts +35 -0
- package/lib/components/GridItem/GridItem.d.ts.map +1 -0
- package/lib/components/GridItem/GridItem.js +22 -0
- package/lib/components/GridItem/index.cjs +9 -0
- package/lib/components/GridItem/index.d.ts +2 -0
- package/lib/components/GridItem/index.d.ts.map +1 -0
- package/lib/components/GridItem/index.js +1 -0
- package/lib/components/HelpBubble/HelpBubble.cjs +5 -0
- package/lib/components/HelpBubble/HelpBubble.d.ts +3 -0
- package/lib/components/HelpBubble/HelpBubble.d.ts.map +1 -1
- package/lib/components/HelpBubble/HelpBubble.js +5 -1
- package/lib/components/HelpBubble/HelpBubble.namespace.cjs +1 -0
- package/lib/components/HelpBubble/HelpBubble.namespace.d.ts +1 -1
- package/lib/components/HelpBubble/HelpBubble.namespace.d.ts.map +1 -1
- package/lib/components/HelpBubble/HelpBubble.namespace.js +1 -1
- package/lib/components/HelpBubble/index.cjs +1 -0
- package/lib/components/HelpBubble/index.d.ts +1 -1
- package/lib/components/HelpBubble/index.d.ts.map +1 -1
- package/lib/components/HelpBubble/index.js +1 -1
- package/lib/components/ImageFrame/ImageFrame.cjs +157 -0
- package/lib/components/ImageFrame/ImageFrame.d.ts +51 -0
- package/lib/components/ImageFrame/ImageFrame.d.ts.map +1 -0
- package/lib/components/ImageFrame/ImageFrame.js +129 -0
- package/lib/components/ImageFrame/index.cjs +14 -0
- package/lib/components/ImageFrame/index.d.ts +2 -0
- package/lib/components/ImageFrame/index.d.ts.map +1 -0
- package/lib/components/ImageFrame/index.js +1 -0
- package/lib/components/MenuSheet/MenuSheet.cjs +60 -24
- package/lib/components/MenuSheet/MenuSheet.d.ts +12 -0
- package/lib/components/MenuSheet/MenuSheet.d.ts.map +1 -1
- package/lib/components/MenuSheet/MenuSheet.js +57 -25
- package/lib/components/MenuSheet/MenuSheet.namespace.cjs +4 -0
- package/lib/components/MenuSheet/MenuSheet.namespace.d.ts +1 -1
- package/lib/components/MenuSheet/MenuSheet.namespace.d.ts.map +1 -1
- package/lib/components/MenuSheet/MenuSheet.namespace.js +1 -1
- package/lib/components/MenuSheet/index.cjs +4 -0
- package/lib/components/MenuSheet/index.d.ts +1 -1
- package/lib/components/MenuSheet/index.d.ts.map +1 -1
- package/lib/components/MenuSheet/index.js +1 -1
- package/lib/components/RadioGroup/RadioGroup.cjs +4 -1
- package/lib/components/RadioGroup/RadioGroup.d.ts +3 -2
- package/lib/components/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/lib/components/RadioGroup/RadioGroup.js +4 -1
- package/lib/components/RadioGroupField/RadioGroupField.cjs +79 -0
- package/lib/components/RadioGroupField/RadioGroupField.d.ts +30 -0
- package/lib/components/RadioGroupField/RadioGroupField.d.ts.map +1 -0
- package/lib/components/RadioGroupField/RadioGroupField.js +68 -0
- package/lib/components/RadioGroupField/RadioGroupField.namespace.cjs +16 -0
- package/lib/components/RadioGroupField/RadioGroupField.namespace.d.ts +2 -0
- package/lib/components/RadioGroupField/RadioGroupField.namespace.d.ts.map +1 -0
- package/lib/components/RadioGroupField/RadioGroupField.namespace.js +1 -0
- package/lib/components/RadioGroupField/index.cjs +18 -0
- package/lib/components/RadioGroupField/index.d.ts +3 -0
- package/lib/components/RadioGroupField/index.d.ts.map +1 -0
- package/lib/components/RadioGroupField/index.js +3 -0
- package/lib/components/SelectBox/CheckSelectBox.cjs +117 -8
- package/lib/components/SelectBox/CheckSelectBox.d.ts +38 -10
- package/lib/components/SelectBox/CheckSelectBox.d.ts.map +1 -1
- package/lib/components/SelectBox/CheckSelectBox.js +113 -10
- package/lib/components/SelectBox/CheckSelectBox.namespace.cjs +6 -0
- package/lib/components/SelectBox/CheckSelectBox.namespace.d.ts +1 -1
- package/lib/components/SelectBox/CheckSelectBox.namespace.d.ts.map +1 -1
- package/lib/components/SelectBox/CheckSelectBox.namespace.js +1 -1
- package/lib/components/SelectBox/RadioSelectBox.cjs +112 -9
- package/lib/components/SelectBox/RadioSelectBox.d.ts +31 -7
- package/lib/components/SelectBox/RadioSelectBox.d.ts.map +1 -1
- package/lib/components/SelectBox/RadioSelectBox.js +109 -10
- package/lib/components/SelectBox/RadioSelectBox.namespace.cjs +5 -1
- package/lib/components/SelectBox/RadioSelectBox.namespace.d.ts +1 -1
- package/lib/components/SelectBox/RadioSelectBox.namespace.d.ts.map +1 -1
- package/lib/components/SelectBox/RadioSelectBox.namespace.js +1 -1
- package/lib/components/SelectBox/index.cjs +11 -1
- package/lib/components/SelectBox/index.d.ts +2 -2
- package/lib/components/SelectBox/index.d.ts.map +1 -1
- package/lib/components/SelectBox/index.js +2 -2
- package/lib/components/Switch/Switch.cjs +10 -5
- package/lib/components/Switch/Switch.d.ts +3 -3
- package/lib/components/Switch/Switch.d.ts.map +1 -1
- package/lib/components/Switch/Switch.js +10 -5
- package/lib/components/TagGroup/TagGroup.cjs +25 -9
- package/lib/components/TagGroup/TagGroup.d.ts +5 -1
- package/lib/components/TagGroup/TagGroup.d.ts.map +1 -1
- package/lib/components/TagGroup/TagGroup.js +25 -10
- package/lib/components/TagGroup/TagGroup.namespace.cjs +1 -0
- package/lib/components/TagGroup/TagGroup.namespace.d.ts +1 -1
- package/lib/components/TagGroup/TagGroup.namespace.d.ts.map +1 -1
- package/lib/components/TagGroup/TagGroup.namespace.js +1 -1
- package/lib/components/TagGroup/index.cjs +1 -0
- package/lib/components/TagGroup/index.d.ts +1 -1
- package/lib/components/TagGroup/index.d.ts.map +1 -1
- package/lib/components/TagGroup/index.js +1 -1
- package/lib/components/index.cjs +53 -1
- package/lib/components/index.d.ts +6 -0
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/index.js +16 -6
- package/lib/index.cjs +53 -1
- package/lib/index.js +16 -6
- package/lib/utils/styled.cjs +11 -5
- package/lib/utils/styled.d.ts +6 -0
- package/lib/utils/styled.d.ts.map +1 -1
- package/lib/utils/styled.js +11 -5
- package/package.json +6 -3
- package/src/components/AspectRatio/AspectRatio.tsx +38 -0
- package/src/components/AspectRatio/index.ts +1 -0
- package/src/components/Avatar/Avatar.tsx +7 -14
- package/src/components/Checkbox/Checkbox.namespace.ts +2 -0
- package/src/components/Checkbox/Checkbox.tsx +24 -0
- package/src/components/Checkbox/index.ts +2 -0
- package/src/components/ChipTabs/ChipTabs.tsx +25 -4
- package/src/components/Dialog/Dialog.tsx +6 -0
- package/src/components/Fieldset/Fieldset.namespace.ts +17 -0
- package/src/components/Fieldset/Fieldset.tsx +101 -0
- package/src/components/Fieldset/index.ts +19 -0
- package/src/components/Grid/Grid.tsx +79 -0
- package/src/components/Grid/index.ts +1 -0
- package/src/components/GridItem/GridItem.tsx +70 -0
- package/src/components/GridItem/index.ts +1 -0
- package/src/components/HelpBubble/HelpBubble.namespace.ts +3 -0
- package/src/components/HelpBubble/HelpBubble.tsx +7 -2
- package/src/components/HelpBubble/index.ts +2 -0
- package/src/components/ImageFrame/ImageFrame.tsx +227 -0
- package/src/components/ImageFrame/index.ts +14 -0
- package/src/components/MenuSheet/MenuSheet.namespace.ts +8 -0
- package/src/components/MenuSheet/MenuSheet.tsx +82 -34
- package/src/components/MenuSheet/index.ts +8 -0
- package/src/components/RadioGroup/RadioGroup.tsx +8 -2
- package/src/components/RadioGroupField/RadioGroupField.namespace.ts +18 -0
- package/src/components/RadioGroupField/RadioGroupField.tsx +114 -0
- package/src/components/RadioGroupField/index.ts +2 -0
- package/src/components/SelectBox/CheckSelectBox.namespace.ts +12 -0
- package/src/components/SelectBox/CheckSelectBox.tsx +229 -24
- package/src/components/SelectBox/RadioSelectBox.namespace.ts +10 -2
- package/src/components/SelectBox/RadioSelectBox.tsx +210 -16
- package/src/components/SelectBox/index.ts +22 -2
- package/src/components/Switch/Switch.tsx +16 -7
- package/src/components/TagGroup/TagGroup.namespace.ts +2 -0
- package/src/components/TagGroup/TagGroup.tsx +33 -9
- package/src/components/TagGroup/index.ts +2 -0
- package/src/components/index.ts +6 -0
- package/src/utils/styled.tsx +23 -5
|
@@ -5,16 +5,17 @@ import { Primitive } from '@seed-design/react-primitive';
|
|
|
5
5
|
import { menuSheet } from '@seed-design/css/recipes/menu-sheet';
|
|
6
6
|
import { menuSheetItem } from '@seed-design/css/recipes/menu-sheet-item';
|
|
7
7
|
import * as React from 'react';
|
|
8
|
-
import { createRecipeContext } from '../../utils/createRecipeContext.js';
|
|
9
8
|
import { createSlotRecipeContext } from '../../utils/createSlotRecipeContext.js';
|
|
10
9
|
import { createWithStateProps } from '../../utils/createWithStateProps.js';
|
|
10
|
+
import clsx from 'clsx';
|
|
11
11
|
|
|
12
|
-
const { withRootProvider, withContext } = createSlotRecipeContext(menuSheet);
|
|
12
|
+
const { withRootProvider, withContext, useClassNames } = createSlotRecipeContext(menuSheet);
|
|
13
13
|
const {
|
|
14
|
-
withContext: withItemContext,
|
|
15
14
|
PropsProvider: ItemPropsProvider,
|
|
16
|
-
useProps: useItemProps
|
|
17
|
-
|
|
15
|
+
useProps: useItemProps,
|
|
16
|
+
withContext: withItemContext,
|
|
17
|
+
ClassNamesProvider: ItemClassNamesProvider
|
|
18
|
+
} = createSlotRecipeContext(menuSheetItem);
|
|
18
19
|
const withStateProps = createWithStateProps([useDialogContext]);
|
|
19
20
|
const MenuSheetRoot = withRootProvider(Dialog.Root, {
|
|
20
21
|
defaultProps: {
|
|
@@ -31,13 +32,18 @@ const MenuSheetBackdrop = withContext(
|
|
|
31
32
|
Dialog.Backdrop,
|
|
32
33
|
"backdrop"
|
|
33
34
|
);
|
|
34
|
-
const MenuSheetContentBase = withContext(
|
|
35
|
-
Dialog.Content,
|
|
36
|
-
"content"
|
|
37
|
-
);
|
|
38
35
|
const MenuSheetContent = React.forwardRef(
|
|
39
|
-
({
|
|
40
|
-
|
|
36
|
+
({ className, ...props }, ref) => {
|
|
37
|
+
const [variantProps, otherProps] = menuSheetItem.splitVariantProps(props);
|
|
38
|
+
const classNames = useClassNames();
|
|
39
|
+
return /* @__PURE__ */ jsx(ItemPropsProvider, { value: variantProps, children: /* @__PURE__ */ jsx(
|
|
40
|
+
Dialog.Content,
|
|
41
|
+
{
|
|
42
|
+
className: clsx(classNames.content, className),
|
|
43
|
+
ref,
|
|
44
|
+
...otherProps
|
|
45
|
+
}
|
|
46
|
+
) });
|
|
41
47
|
}
|
|
42
48
|
);
|
|
43
49
|
const MenuSheetHeader = withContext(
|
|
@@ -48,31 +54,57 @@ const MenuSheetTitle = withContext(
|
|
|
48
54
|
withStateProps(Primitive.h2),
|
|
49
55
|
"title"
|
|
50
56
|
);
|
|
57
|
+
const MenuSheetDescription = withContext(
|
|
58
|
+
withStateProps(Primitive.p),
|
|
59
|
+
"description"
|
|
60
|
+
);
|
|
51
61
|
const MenuSheetList = withContext(
|
|
52
62
|
withStateProps(Primitive.div),
|
|
53
63
|
"list"
|
|
54
64
|
);
|
|
55
|
-
const MenuSheetGroupBase = withContext(
|
|
56
|
-
withStateProps(Primitive.div),
|
|
57
|
-
"group"
|
|
58
|
-
);
|
|
59
65
|
const MenuSheetGroup = React.forwardRef(
|
|
60
|
-
({
|
|
66
|
+
({ className, ...props }, ref) => {
|
|
67
|
+
const [variantProps, otherProps] = menuSheetItem.splitVariantProps(props);
|
|
61
68
|
const parentProps = useItemProps();
|
|
62
|
-
const
|
|
63
|
-
|
|
69
|
+
const classNames = useClassNames();
|
|
70
|
+
const { stateProps } = useDialogContext();
|
|
71
|
+
return /* @__PURE__ */ jsx(ItemPropsProvider, { value: { ...parentProps, ...variantProps }, children: /* @__PURE__ */ jsx(
|
|
72
|
+
Primitive.div,
|
|
73
|
+
{
|
|
74
|
+
className: clsx(classNames.group, className),
|
|
75
|
+
ref,
|
|
76
|
+
...stateProps,
|
|
77
|
+
...otherProps
|
|
78
|
+
}
|
|
79
|
+
) });
|
|
64
80
|
}
|
|
65
81
|
);
|
|
66
|
-
const MenuSheetItemBase = withItemContext(
|
|
67
|
-
withStateProps(Primitive.button)
|
|
68
|
-
);
|
|
69
82
|
const MenuSheetItem = React.forwardRef(
|
|
70
|
-
({
|
|
83
|
+
({ className: propClassName, ...props }, ref) => {
|
|
84
|
+
const [variantProps, otherProps] = menuSheetItem.splitVariantProps(props);
|
|
71
85
|
const parentProps = useItemProps();
|
|
72
|
-
const
|
|
73
|
-
|
|
86
|
+
const classNames = menuSheetItem({ ...parentProps, ...variantProps });
|
|
87
|
+
const { stateProps } = useDialogContext();
|
|
88
|
+
return /* @__PURE__ */ jsx(ItemClassNamesProvider, { value: classNames, children: /* @__PURE__ */ jsx(
|
|
89
|
+
Primitive.button,
|
|
90
|
+
{
|
|
91
|
+
ref,
|
|
92
|
+
className: clsx(classNames.root, propClassName),
|
|
93
|
+
...stateProps,
|
|
94
|
+
...otherProps
|
|
95
|
+
}
|
|
96
|
+
) });
|
|
74
97
|
}
|
|
75
98
|
);
|
|
99
|
+
const MenuSheetItemContent = withItemContext(
|
|
100
|
+
withStateProps(Primitive.div),
|
|
101
|
+
"content"
|
|
102
|
+
);
|
|
103
|
+
const MenuSheetItemLabel = withItemContext(
|
|
104
|
+
withStateProps(Primitive.span),
|
|
105
|
+
"label"
|
|
106
|
+
);
|
|
107
|
+
const MenuSheetItemDescription = withItemContext(withStateProps(Primitive.span), "description");
|
|
76
108
|
const MenuSheetFooter = withContext(
|
|
77
109
|
withStateProps(Primitive.div),
|
|
78
110
|
"footer"
|
|
@@ -82,4 +114,4 @@ const MenuSheetCloseButton = withContext(
|
|
|
82
114
|
"closeButton"
|
|
83
115
|
);
|
|
84
116
|
|
|
85
|
-
export { MenuSheetBackdrop, MenuSheetCloseButton, MenuSheetContent, MenuSheetFooter, MenuSheetGroup, MenuSheetHeader, MenuSheetItem, MenuSheetList, MenuSheetPositioner, MenuSheetRoot, MenuSheetTitle, MenuSheetTrigger };
|
|
117
|
+
export { MenuSheetBackdrop, MenuSheetCloseButton, MenuSheetContent, MenuSheetDescription, MenuSheetFooter, MenuSheetGroup, MenuSheetHeader, MenuSheetItem, MenuSheetItemContent, MenuSheetItemDescription, MenuSheetItemLabel, MenuSheetList, MenuSheetPositioner, MenuSheetRoot, MenuSheetTitle, MenuSheetTrigger };
|
|
@@ -9,10 +9,14 @@ const MenuSheet = require('./MenuSheet.cjs');
|
|
|
9
9
|
exports.Backdrop = MenuSheet.MenuSheetBackdrop;
|
|
10
10
|
exports.CloseButton = MenuSheet.MenuSheetCloseButton;
|
|
11
11
|
exports.Content = MenuSheet.MenuSheetContent;
|
|
12
|
+
exports.Description = MenuSheet.MenuSheetDescription;
|
|
12
13
|
exports.Footer = MenuSheet.MenuSheetFooter;
|
|
13
14
|
exports.Group = MenuSheet.MenuSheetGroup;
|
|
14
15
|
exports.Header = MenuSheet.MenuSheetHeader;
|
|
15
16
|
exports.Item = MenuSheet.MenuSheetItem;
|
|
17
|
+
exports.ItemContent = MenuSheet.MenuSheetItemContent;
|
|
18
|
+
exports.ItemDescription = MenuSheet.MenuSheetItemDescription;
|
|
19
|
+
exports.ItemLabel = MenuSheet.MenuSheetItemLabel;
|
|
16
20
|
exports.List = MenuSheet.MenuSheetList;
|
|
17
21
|
exports.Positioner = MenuSheet.MenuSheetPositioner;
|
|
18
22
|
exports.Root = MenuSheet.MenuSheetRoot;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { MenuSheetBackdrop as Backdrop, MenuSheetPositioner as Positioner, MenuSheetContent as Content, MenuSheetFooter as Footer, MenuSheetHeader as Header, MenuSheetRoot as Root, MenuSheetTitle as Title, MenuSheetTrigger as Trigger, MenuSheetList as List, MenuSheetGroup as Group, MenuSheetItem as Item, MenuSheetCloseButton as CloseButton, type MenuSheetBackdropProps as BackdropProps, type MenuSheetPositionerProps as PositionerProps, type MenuSheetContentProps as ContentProps, type MenuSheetFooterProps as FooterProps, type MenuSheetHeaderProps as HeaderProps, type MenuSheetRootProps as RootProps, type MenuSheetTitleProps as TitleProps, type MenuSheetTriggerProps as TriggerProps, type MenuSheetListProps as ListProps, type MenuSheetGroupProps as GroupProps, type MenuSheetItemProps as ItemProps, type MenuSheetCloseButtonProps as CloseButtonProps, } from './MenuSheet';
|
|
1
|
+
export { MenuSheetBackdrop as Backdrop, MenuSheetPositioner as Positioner, MenuSheetContent as Content, MenuSheetFooter as Footer, MenuSheetHeader as Header, MenuSheetRoot as Root, MenuSheetTitle as Title, MenuSheetDescription as Description, MenuSheetTrigger as Trigger, MenuSheetList as List, MenuSheetGroup as Group, MenuSheetItem as Item, MenuSheetItemContent as ItemContent, MenuSheetItemLabel as ItemLabel, MenuSheetItemDescription as ItemDescription, MenuSheetCloseButton as CloseButton, type MenuSheetBackdropProps as BackdropProps, type MenuSheetPositionerProps as PositionerProps, type MenuSheetContentProps as ContentProps, type MenuSheetFooterProps as FooterProps, type MenuSheetHeaderProps as HeaderProps, type MenuSheetRootProps as RootProps, type MenuSheetTitleProps as TitleProps, type MenuSheetDescriptionProps as DescriptionProps, type MenuSheetTriggerProps as TriggerProps, type MenuSheetListProps as ListProps, type MenuSheetGroupProps as GroupProps, type MenuSheetItemProps as ItemProps, type MenuSheetItemContentProps as ItemContentProps, type MenuSheetItemLabelProps as ItemLabelProps, type MenuSheetItemDescriptionProps as ItemDescriptionProps, type MenuSheetCloseButtonProps as CloseButtonProps, } from './MenuSheet';
|
|
2
2
|
//# sourceMappingURL=MenuSheet.namespace.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuSheet.namespace.d.ts","sourceRoot":"","sources":["../../../src/components/MenuSheet/MenuSheet.namespace.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,IAAI,QAAQ,EAC7B,mBAAmB,IAAI,UAAU,EACjC,gBAAgB,IAAI,OAAO,EAC3B,eAAe,IAAI,MAAM,EACzB,eAAe,IAAI,MAAM,EACzB,aAAa,IAAI,IAAI,EACrB,cAAc,IAAI,KAAK,EACvB,gBAAgB,IAAI,OAAO,EAC3B,aAAa,IAAI,IAAI,EACrB,cAAc,IAAI,KAAK,EACvB,aAAa,IAAI,IAAI,EACrB,oBAAoB,IAAI,WAAW,EACnC,KAAK,sBAAsB,IAAI,aAAa,EAC5C,KAAK,wBAAwB,IAAI,eAAe,EAChD,KAAK,qBAAqB,IAAI,YAAY,EAC1C,KAAK,oBAAoB,IAAI,WAAW,EACxC,KAAK,oBAAoB,IAAI,WAAW,EACxC,KAAK,kBAAkB,IAAI,SAAS,EACpC,KAAK,mBAAmB,IAAI,UAAU,EACtC,KAAK,qBAAqB,IAAI,YAAY,EAC1C,KAAK,kBAAkB,IAAI,SAAS,EACpC,KAAK,mBAAmB,IAAI,UAAU,EACtC,KAAK,kBAAkB,IAAI,SAAS,EACpC,KAAK,yBAAyB,IAAI,gBAAgB,GACnD,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"MenuSheet.namespace.d.ts","sourceRoot":"","sources":["../../../src/components/MenuSheet/MenuSheet.namespace.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,IAAI,QAAQ,EAC7B,mBAAmB,IAAI,UAAU,EACjC,gBAAgB,IAAI,OAAO,EAC3B,eAAe,IAAI,MAAM,EACzB,eAAe,IAAI,MAAM,EACzB,aAAa,IAAI,IAAI,EACrB,cAAc,IAAI,KAAK,EACvB,oBAAoB,IAAI,WAAW,EACnC,gBAAgB,IAAI,OAAO,EAC3B,aAAa,IAAI,IAAI,EACrB,cAAc,IAAI,KAAK,EACvB,aAAa,IAAI,IAAI,EACrB,oBAAoB,IAAI,WAAW,EACnC,kBAAkB,IAAI,SAAS,EAC/B,wBAAwB,IAAI,eAAe,EAC3C,oBAAoB,IAAI,WAAW,EACnC,KAAK,sBAAsB,IAAI,aAAa,EAC5C,KAAK,wBAAwB,IAAI,eAAe,EAChD,KAAK,qBAAqB,IAAI,YAAY,EAC1C,KAAK,oBAAoB,IAAI,WAAW,EACxC,KAAK,oBAAoB,IAAI,WAAW,EACxC,KAAK,kBAAkB,IAAI,SAAS,EACpC,KAAK,mBAAmB,IAAI,UAAU,EACtC,KAAK,yBAAyB,IAAI,gBAAgB,EAClD,KAAK,qBAAqB,IAAI,YAAY,EAC1C,KAAK,kBAAkB,IAAI,SAAS,EACpC,KAAK,mBAAmB,IAAI,UAAU,EACtC,KAAK,kBAAkB,IAAI,SAAS,EACpC,KAAK,yBAAyB,IAAI,gBAAgB,EAClD,KAAK,uBAAuB,IAAI,cAAc,EAC9C,KAAK,6BAA6B,IAAI,oBAAoB,EAC1D,KAAK,yBAAyB,IAAI,gBAAgB,GACnD,MAAM,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { MenuSheetBackdrop as Backdrop, MenuSheetCloseButton as CloseButton, MenuSheetContent as Content, MenuSheetFooter as Footer, MenuSheetGroup as Group, MenuSheetHeader as Header, MenuSheetItem as Item, MenuSheetList as List, MenuSheetPositioner as Positioner, MenuSheetRoot as Root, MenuSheetTitle as Title, MenuSheetTrigger as Trigger } from './MenuSheet.js';
|
|
1
|
+
export { MenuSheetBackdrop as Backdrop, MenuSheetCloseButton as CloseButton, MenuSheetContent as Content, MenuSheetDescription as Description, MenuSheetFooter as Footer, MenuSheetGroup as Group, MenuSheetHeader as Header, MenuSheetItem as Item, MenuSheetItemContent as ItemContent, MenuSheetItemDescription as ItemDescription, MenuSheetItemLabel as ItemLabel, MenuSheetList as List, MenuSheetPositioner as Positioner, MenuSheetRoot as Root, MenuSheetTitle as Title, MenuSheetTrigger as Trigger } from './MenuSheet.js';
|
|
@@ -10,10 +10,14 @@ const MenuSheet_namespace = require('./MenuSheet.namespace.cjs');
|
|
|
10
10
|
exports.MenuSheetBackdrop = MenuSheet.MenuSheetBackdrop;
|
|
11
11
|
exports.MenuSheetCloseButton = MenuSheet.MenuSheetCloseButton;
|
|
12
12
|
exports.MenuSheetContent = MenuSheet.MenuSheetContent;
|
|
13
|
+
exports.MenuSheetDescription = MenuSheet.MenuSheetDescription;
|
|
13
14
|
exports.MenuSheetFooter = MenuSheet.MenuSheetFooter;
|
|
14
15
|
exports.MenuSheetGroup = MenuSheet.MenuSheetGroup;
|
|
15
16
|
exports.MenuSheetHeader = MenuSheet.MenuSheetHeader;
|
|
16
17
|
exports.MenuSheetItem = MenuSheet.MenuSheetItem;
|
|
18
|
+
exports.MenuSheetItemContent = MenuSheet.MenuSheetItemContent;
|
|
19
|
+
exports.MenuSheetItemDescription = MenuSheet.MenuSheetItemDescription;
|
|
20
|
+
exports.MenuSheetItemLabel = MenuSheet.MenuSheetItemLabel;
|
|
17
21
|
exports.MenuSheetList = MenuSheet.MenuSheetList;
|
|
18
22
|
exports.MenuSheetPositioner = MenuSheet.MenuSheetPositioner;
|
|
19
23
|
exports.MenuSheetRoot = MenuSheet.MenuSheetRoot;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { MenuSheetBackdrop, MenuSheetPositioner, MenuSheetContent, MenuSheetFooter, MenuSheetHeader, MenuSheetRoot, MenuSheetTitle, MenuSheetTrigger, MenuSheetList, MenuSheetGroup, MenuSheetItem, MenuSheetCloseButton, type MenuSheetBackdropProps, type MenuSheetPositionerProps, type MenuSheetContentProps, type MenuSheetFooterProps, type MenuSheetHeaderProps, type MenuSheetRootProps, type MenuSheetTitleProps, type MenuSheetTriggerProps, type MenuSheetListProps, type MenuSheetGroupProps, type MenuSheetItemProps, type MenuSheetCloseButtonProps, } from './MenuSheet';
|
|
1
|
+
export { MenuSheetBackdrop, MenuSheetPositioner, MenuSheetContent, MenuSheetFooter, MenuSheetHeader, MenuSheetRoot, MenuSheetTitle, MenuSheetDescription, MenuSheetTrigger, MenuSheetList, MenuSheetGroup, MenuSheetItem, MenuSheetItemContent, MenuSheetItemLabel, MenuSheetItemDescription, MenuSheetCloseButton, type MenuSheetBackdropProps, type MenuSheetPositionerProps, type MenuSheetContentProps, type MenuSheetFooterProps, type MenuSheetHeaderProps, type MenuSheetRootProps, type MenuSheetTitleProps, type MenuSheetDescriptionProps, type MenuSheetTriggerProps, type MenuSheetListProps, type MenuSheetGroupProps, type MenuSheetItemProps, type MenuSheetItemContentProps, type MenuSheetItemLabelProps, type MenuSheetItemDescriptionProps, type MenuSheetCloseButtonProps, } from './MenuSheet';
|
|
2
2
|
export * as MenuSheet from './MenuSheet.namespace';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/MenuSheet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,GAC/B,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/MenuSheet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,kBAAkB,EAClB,wBAAwB,EACxB,oBAAoB,EACpB,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,EAClC,KAAK,yBAAyB,GAC/B,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { MenuSheetBackdrop, MenuSheetCloseButton, MenuSheetContent, MenuSheetFooter, MenuSheetGroup, MenuSheetHeader, MenuSheetItem, MenuSheetList, MenuSheetPositioner, MenuSheetRoot, MenuSheetTitle, MenuSheetTrigger } from './MenuSheet.js';
|
|
1
|
+
export { MenuSheetBackdrop, MenuSheetCloseButton, MenuSheetContent, MenuSheetDescription, MenuSheetFooter, MenuSheetGroup, MenuSheetHeader, MenuSheetItem, MenuSheetItemContent, MenuSheetItemDescription, MenuSheetItemLabel, MenuSheetList, MenuSheetPositioner, MenuSheetRoot, MenuSheetTitle, MenuSheetTrigger } from './MenuSheet.js';
|
|
2
2
|
import * as MenuSheet_namespace from './MenuSheet.namespace.js';
|
|
3
3
|
export { MenuSheet_namespace as MenuSheet };
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
5
5
|
|
|
6
6
|
const jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
const radio = require('@seed-design/css/recipes/radio');
|
|
8
|
+
const radioGroup = require('@seed-design/css/recipes/radio-group');
|
|
8
9
|
const radiomark = require('@seed-design/css/recipes/radiomark');
|
|
9
10
|
const domUtils = require('@seed-design/dom-utils');
|
|
10
11
|
const reactRadioGroup = require('@seed-design/react-radio-group');
|
|
@@ -15,7 +16,9 @@ const createSlotRecipeContext = require('../../utils/createSlotRecipeContext.cjs
|
|
|
15
16
|
const createWithStateProps = require('../../utils/createWithStateProps.cjs');
|
|
16
17
|
const Icon = require('../private/Icon.cjs');
|
|
17
18
|
const splitMultipleVariantsProps = require('../../utils/splitMultipleVariantsProps.cjs');
|
|
19
|
+
const createRecipeContext = require('../../utils/createRecipeContext.cjs');
|
|
18
20
|
|
|
21
|
+
const { withContext: withGroupContext } = createRecipeContext.createRecipeContext(radioGroup.radioGroup);
|
|
19
22
|
const { ClassNamesProvider, withContext } = createSlotRecipeContext.createSlotRecipeContext(radio.radio);
|
|
20
23
|
const {
|
|
21
24
|
withProvider: withRadiomarkProvider,
|
|
@@ -23,7 +26,7 @@ const {
|
|
|
23
26
|
PropsProvider: RadiomarkPropsProvider
|
|
24
27
|
} = createSlotRecipeContext.createSlotRecipeContext(radiomark.radiomark);
|
|
25
28
|
const withStateProps = createWithStateProps.createWithStateProps([reactRadioGroup.useRadioGroupItemContext]);
|
|
26
|
-
const RadioGroupRoot =
|
|
29
|
+
const RadioGroupRoot = withGroupContext(reactPrimitive.Primitive.div);
|
|
27
30
|
const RadioGroupItem = Object.assign(
|
|
28
31
|
React.forwardRef(({ className, ...props }, ref) => {
|
|
29
32
|
const [{ radio: radioVariantProps, radiomark: radiomarkVariantProps }, otherProps] = splitMultipleVariantsProps.splitMultipleVariantsProps(props, { radio: radio.radio, radiomark: radiomark.radiomark });
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { RadioVariantProps } from '@seed-design/css/recipes/radio';
|
|
2
|
+
import { RadioGroupVariantProps } from '@seed-design/css/recipes/radio-group';
|
|
2
3
|
import { RadiomarkVariantProps } from '@seed-design/css/recipes/radiomark';
|
|
3
4
|
import { RadioGroup as RadioGroupPrimitive } from '@seed-design/react-radio-group';
|
|
4
5
|
import { PrimitiveProps } from '@seed-design/react-primitive';
|
|
5
6
|
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
6
|
-
export interface RadioGroupRootProps extends
|
|
7
|
+
export interface RadioGroupRootProps extends RadioGroupVariantProps, PrimitiveProps, React.HTMLAttributes<HTMLDivElement> {
|
|
7
8
|
}
|
|
8
|
-
export declare const RadioGroupRoot: ForwardRefExoticComponent<
|
|
9
|
+
export declare const RadioGroupRoot: ForwardRefExoticComponent<RadioGroupRootProps & RefAttributes<HTMLDivElement>>;
|
|
9
10
|
export interface RadioGroupItemProps extends RadioVariantProps, RadiomarkVariantProps, RadioGroupPrimitive.ItemProps {
|
|
10
11
|
}
|
|
11
12
|
export declare const RadioGroupItem: ForwardRefExoticComponent<RadioGroupItemProps & RefAttributes<HTMLLabelElement>> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../src/components/RadioGroup/RadioGroup.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAS,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAa,KAAK,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAE3F,OAAO,EACL,UAAU,IAAI,mBAAmB,EAElC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../src/components/RadioGroup/RadioGroup.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAS,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAc,KAAK,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC/F,OAAO,EAAa,KAAK,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAE3F,OAAO,EACL,UAAU,IAAI,mBAAmB,EAElC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAoB9E,MAAM,WAAW,mBACf,SAAQ,sBAAsB,EAC5B,cAAc,EACd,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAE3C,eAAO,MAAM,cAAc,gHAAuE,CAAC;AAInG,MAAM,WAAW,mBACf,SAAQ,iBAAiB,EACvB,qBAAqB,EACrB,mBAAmB,CAAC,SAAS;CAAG;AAEpC,eAAO,MAAM,cAAc;;CAsB1B,CAAC;AAIF,MAAM,WAAW,wBACf,SAAQ,cAAc,EACpB,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;CAAG;AAE5C,eAAO,MAAM,mBAAmB,sHAG/B,CAAC;AAIF,MAAM,WAAW,0BACf,SAAQ,qBAAqB,EAC3B,mBAAmB,CAAC,gBAAgB;CAAG;AAE3C,eAAO,MAAM,qBAAqB,uHAGQ,CAAC;AAI3C,MAAM,WAAW,4BAA6B,SAAQ,KAAK,CAAC,aAAa,CAAC,aAAa,CAAC;IACtF;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE5B;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,uBAAuB,wHA4BnC,CAAC;AAKF,MAAM,WAAW,8BAA+B,SAAQ,mBAAmB,CAAC,oBAAoB;CAAG;AAEnG,eAAO,MAAM,yBAAyB,uIAAsC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { radio } from '@seed-design/css/recipes/radio';
|
|
4
|
+
import { radioGroup } from '@seed-design/css/recipes/radio-group';
|
|
4
5
|
import { radiomark } from '@seed-design/css/recipes/radiomark';
|
|
5
6
|
import { mergeProps } from '@seed-design/dom-utils';
|
|
6
7
|
import { RadioGroup, useRadioGroupItemContext } from '@seed-design/react-radio-group';
|
|
@@ -11,7 +12,9 @@ import { createSlotRecipeContext } from '../../utils/createSlotRecipeContext.js'
|
|
|
11
12
|
import { createWithStateProps } from '../../utils/createWithStateProps.js';
|
|
12
13
|
import { InternalIcon } from '../private/Icon.js';
|
|
13
14
|
import { splitMultipleVariantsProps } from '../../utils/splitMultipleVariantsProps.js';
|
|
15
|
+
import { createRecipeContext } from '../../utils/createRecipeContext.js';
|
|
14
16
|
|
|
17
|
+
const { withContext: withGroupContext } = createRecipeContext(radioGroup);
|
|
15
18
|
const { ClassNamesProvider, withContext } = createSlotRecipeContext(radio);
|
|
16
19
|
const {
|
|
17
20
|
withProvider: withRadiomarkProvider,
|
|
@@ -19,7 +22,7 @@ const {
|
|
|
19
22
|
PropsProvider: RadiomarkPropsProvider
|
|
20
23
|
} = createSlotRecipeContext(radiomark);
|
|
21
24
|
const withStateProps = createWithStateProps([useRadioGroupItemContext]);
|
|
22
|
-
const RadioGroupRoot =
|
|
25
|
+
const RadioGroupRoot = withGroupContext(Primitive.div);
|
|
23
26
|
const RadioGroupItem = Object.assign(
|
|
24
27
|
forwardRef(({ className, ...props }, ref) => {
|
|
25
28
|
const [{ radio: radioVariantProps, radiomark: radiomarkVariantProps }, otherProps] = splitMultipleVariantsProps(props, { radio, radiomark });
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
+
|
|
6
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
const field = require('@seed-design/css/recipes/field');
|
|
8
|
+
const fieldLabel = require('@seed-design/css/recipes/field-label');
|
|
9
|
+
const reactPrimitive = require('@seed-design/react-primitive');
|
|
10
|
+
const reactRadioGroup = require('@seed-design/react-radio-group');
|
|
11
|
+
const React = require('react');
|
|
12
|
+
const clsx = require('clsx');
|
|
13
|
+
const createSlotRecipeContext = require('../../utils/createSlotRecipeContext.cjs');
|
|
14
|
+
const Icon = require('../private/Icon.cjs');
|
|
15
|
+
|
|
16
|
+
const { withProvider, withContext } = createSlotRecipeContext.createSlotRecipeContext(field.field);
|
|
17
|
+
const {
|
|
18
|
+
withContext: withLabelContext,
|
|
19
|
+
withProvider: withLabelProvider,
|
|
20
|
+
useClassNames: useLabelClassNames
|
|
21
|
+
} = createSlotRecipeContext.createSlotRecipeContext(fieldLabel.fieldLabel);
|
|
22
|
+
const RadioGroupFieldRoot = withProvider(
|
|
23
|
+
reactRadioGroup.RadioGroup.Root,
|
|
24
|
+
"root"
|
|
25
|
+
);
|
|
26
|
+
const RadioGroupFieldHeader = withContext(
|
|
27
|
+
reactPrimitive.Primitive.div,
|
|
28
|
+
"header"
|
|
29
|
+
);
|
|
30
|
+
const RadioGroupFieldLabel = withLabelProvider(
|
|
31
|
+
reactRadioGroup.RadioGroup.Label,
|
|
32
|
+
"root"
|
|
33
|
+
);
|
|
34
|
+
const RadioGroupFieldIndicatorText = withLabelContext(reactPrimitive.Primitive.span, "indicatorText");
|
|
35
|
+
const RadioGroupFieldRequiredIndicator = React.forwardRef(({ className, ...props }, ref) => {
|
|
36
|
+
const { indicatorIcon } = useLabelClassNames();
|
|
37
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
38
|
+
Icon.InternalIcon,
|
|
39
|
+
{
|
|
40
|
+
svg: (
|
|
41
|
+
// biome-ignore lint/a11y/noSvgWithoutTitle: InternalIcon is aria-hidden
|
|
42
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
43
|
+
"svg",
|
|
44
|
+
{
|
|
45
|
+
viewBox: "0 0 6 6",
|
|
46
|
+
fill: "none",
|
|
47
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
48
|
+
className: clsx(indicatorIcon, className),
|
|
49
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
50
|
+
"path",
|
|
51
|
+
{
|
|
52
|
+
d: "M3.75002 1.55859L4.41318 1.09468C4.75243 0.857361 5.21982 0.939865 5.45732 1.27899C5.69499 1.61836 5.61243 2.08615 5.27295 2.32366L4.30763 2.99902L5.27372 3.67612C5.61285 3.91381 5.69517 4.38137 5.45761 4.72059C5.21999 5.0599 4.7523 5.14233 4.41299 4.90471L3.75002 4.44043V5.25C3.75002 5.66421 3.41423 6 3.00002 6C2.5858 6 2.25002 5.66421 2.25002 5.25V4.44043L1.58704 4.90471C1.24773 5.14233 0.780041 5.0599 0.542418 4.72059C0.304856 4.38137 0.387176 3.91381 0.726309 3.67612L1.6924 2.99902L0.727079 2.32366C0.387603 2.08615 0.305043 1.61836 0.542707 1.27899C0.780206 0.939865 1.2476 0.857361 1.58685 1.09468L2.25002 1.55859V0.75C2.25002 0.335786 2.5858 0 3.00002 0C3.41423 0 3.75002 0.335786 3.75002 0.75V1.55859Z",
|
|
53
|
+
fill: "currentColor"
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
),
|
|
59
|
+
ref,
|
|
60
|
+
...props
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
});
|
|
64
|
+
RadioGroupFieldRequiredIndicator.displayName = "RadioGroupFieldRequiredIndicator";
|
|
65
|
+
const RadioGroupFieldFooter = withContext(
|
|
66
|
+
reactPrimitive.Primitive.div,
|
|
67
|
+
"footer"
|
|
68
|
+
);
|
|
69
|
+
const RadioGroupFieldDescription = withContext(reactRadioGroup.RadioGroup.Description, "description");
|
|
70
|
+
const RadioGroupFieldErrorMessage = withContext(reactRadioGroup.RadioGroup.ErrorMessage, "errorMessage");
|
|
71
|
+
|
|
72
|
+
exports.RadioGroupFieldDescription = RadioGroupFieldDescription;
|
|
73
|
+
exports.RadioGroupFieldErrorMessage = RadioGroupFieldErrorMessage;
|
|
74
|
+
exports.RadioGroupFieldFooter = RadioGroupFieldFooter;
|
|
75
|
+
exports.RadioGroupFieldHeader = RadioGroupFieldHeader;
|
|
76
|
+
exports.RadioGroupFieldIndicatorText = RadioGroupFieldIndicatorText;
|
|
77
|
+
exports.RadioGroupFieldLabel = RadioGroupFieldLabel;
|
|
78
|
+
exports.RadioGroupFieldRequiredIndicator = RadioGroupFieldRequiredIndicator;
|
|
79
|
+
exports.RadioGroupFieldRoot = RadioGroupFieldRoot;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { FieldVariantProps } from '@seed-design/css/recipes/field';
|
|
2
|
+
import { FieldLabelVariantProps } from '@seed-design/css/recipes/field-label';
|
|
3
|
+
import { PrimitiveProps } from '@seed-design/react-primitive';
|
|
4
|
+
import { RadioGroup as RadioGroupPrimitive } from '@seed-design/react-radio-group';
|
|
5
|
+
import type * as React from "react";
|
|
6
|
+
export interface RadioGroupFieldRootProps extends FieldVariantProps, RadioGroupPrimitive.RootProps {
|
|
7
|
+
}
|
|
8
|
+
export declare const RadioGroupFieldRoot: React.ForwardRefExoticComponent<RadioGroupFieldRootProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
export interface RadioGroupFieldHeaderProps extends PrimitiveProps, React.HTMLAttributes<HTMLDivElement> {
|
|
10
|
+
}
|
|
11
|
+
export declare const RadioGroupFieldHeader: React.ForwardRefExoticComponent<RadioGroupFieldHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
export interface RadioGroupFieldLabelProps extends FieldLabelVariantProps, RadioGroupPrimitive.LabelProps {
|
|
13
|
+
}
|
|
14
|
+
export declare const RadioGroupFieldLabel: React.ForwardRefExoticComponent<RadioGroupFieldLabelProps & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
export interface RadioGroupFieldIndicatorTextProps extends PrimitiveProps, React.HTMLAttributes<HTMLSpanElement> {
|
|
16
|
+
}
|
|
17
|
+
export declare const RadioGroupFieldIndicatorText: React.ForwardRefExoticComponent<RadioGroupFieldIndicatorTextProps & React.RefAttributes<HTMLSpanElement>>;
|
|
18
|
+
export interface RadioGroupFieldRequiredIndicatorProps extends React.SVGProps<SVGElement> {
|
|
19
|
+
}
|
|
20
|
+
export declare const RadioGroupFieldRequiredIndicator: React.ForwardRefExoticComponent<Omit<RadioGroupFieldRequiredIndicatorProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
21
|
+
export interface RadioGroupFieldFooterProps extends PrimitiveProps, React.HTMLAttributes<HTMLDivElement> {
|
|
22
|
+
}
|
|
23
|
+
export declare const RadioGroupFieldFooter: React.ForwardRefExoticComponent<RadioGroupFieldFooterProps & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
+
export interface RadioGroupFieldDescriptionProps extends RadioGroupPrimitive.DescriptionProps {
|
|
25
|
+
}
|
|
26
|
+
export declare const RadioGroupFieldDescription: React.ForwardRefExoticComponent<RadioGroupFieldDescriptionProps & React.RefAttributes<HTMLSpanElement>>;
|
|
27
|
+
export interface RadioGroupFieldErrorMessageProps extends RadioGroupPrimitive.ErrorMessageProps {
|
|
28
|
+
}
|
|
29
|
+
export declare const RadioGroupFieldErrorMessage: React.ForwardRefExoticComponent<RadioGroupFieldErrorMessageProps & React.RefAttributes<HTMLDivElement>>;
|
|
30
|
+
//# sourceMappingURL=RadioGroupField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioGroupField.d.ts","sourceRoot":"","sources":["../../../src/components/RadioGroupField/RadioGroupField.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAS,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAc,KAAK,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC/F,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAE,UAAU,IAAI,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACnF,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAepC,MAAM,WAAW,wBACf,SAAQ,iBAAiB,EACvB,mBAAmB,CAAC,SAAS;CAAG;AAEpC,eAAO,MAAM,mBAAmB,iGAG/B,CAAC;AAIF,MAAM,WAAW,0BACf,SAAQ,cAAc,EACpB,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAE3C,eAAO,MAAM,qBAAqB,mGAGjC,CAAC;AAEF,MAAM,WAAW,yBACf,SAAQ,sBAAsB,EAC5B,mBAAmB,CAAC,UAAU;CAAG;AAErC,eAAO,MAAM,oBAAoB,kGAGhC,CAAC;AAEF,MAAM,WAAW,iCACf,SAAQ,cAAc,EACpB,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;CAAG;AAE5C,eAAO,MAAM,4BAA4B,2GAGP,CAAC;AAEnC,MAAM,WAAW,qCAAsC,SAAQ,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC;CAAG;AAE5F,eAAO,MAAM,gCAAgC,0HA0B3C,CAAC;AAKH,MAAM,WAAW,0BACf,SAAQ,cAAc,EACpB,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAE3C,eAAO,MAAM,qBAAqB,mGAGjC,CAAC;AAEF,MAAM,WAAW,+BAAgC,SAAQ,mBAAmB,CAAC,gBAAgB;CAAG;AAEhG,eAAO,MAAM,0BAA0B,yGAGU,CAAC;AAElD,MAAM,WAAW,gCAAiC,SAAQ,mBAAmB,CAAC,iBAAiB;CAAG;AAElG,eAAO,MAAM,2BAA2B,yGAGW,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { field } from '@seed-design/css/recipes/field';
|
|
4
|
+
import { fieldLabel } from '@seed-design/css/recipes/field-label';
|
|
5
|
+
import { Primitive } from '@seed-design/react-primitive';
|
|
6
|
+
import { RadioGroup } from '@seed-design/react-radio-group';
|
|
7
|
+
import { forwardRef } from 'react';
|
|
8
|
+
import clsx from 'clsx';
|
|
9
|
+
import { createSlotRecipeContext } from '../../utils/createSlotRecipeContext.js';
|
|
10
|
+
import { InternalIcon } from '../private/Icon.js';
|
|
11
|
+
|
|
12
|
+
const { withProvider, withContext } = createSlotRecipeContext(field);
|
|
13
|
+
const {
|
|
14
|
+
withContext: withLabelContext,
|
|
15
|
+
withProvider: withLabelProvider,
|
|
16
|
+
useClassNames: useLabelClassNames
|
|
17
|
+
} = createSlotRecipeContext(fieldLabel);
|
|
18
|
+
const RadioGroupFieldRoot = withProvider(
|
|
19
|
+
RadioGroup.Root,
|
|
20
|
+
"root"
|
|
21
|
+
);
|
|
22
|
+
const RadioGroupFieldHeader = withContext(
|
|
23
|
+
Primitive.div,
|
|
24
|
+
"header"
|
|
25
|
+
);
|
|
26
|
+
const RadioGroupFieldLabel = withLabelProvider(
|
|
27
|
+
RadioGroup.Label,
|
|
28
|
+
"root"
|
|
29
|
+
);
|
|
30
|
+
const RadioGroupFieldIndicatorText = withLabelContext(Primitive.span, "indicatorText");
|
|
31
|
+
const RadioGroupFieldRequiredIndicator = forwardRef(({ className, ...props }, ref) => {
|
|
32
|
+
const { indicatorIcon } = useLabelClassNames();
|
|
33
|
+
return /* @__PURE__ */ jsx(
|
|
34
|
+
InternalIcon,
|
|
35
|
+
{
|
|
36
|
+
svg: (
|
|
37
|
+
// biome-ignore lint/a11y/noSvgWithoutTitle: InternalIcon is aria-hidden
|
|
38
|
+
/* @__PURE__ */ jsx(
|
|
39
|
+
"svg",
|
|
40
|
+
{
|
|
41
|
+
viewBox: "0 0 6 6",
|
|
42
|
+
fill: "none",
|
|
43
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
44
|
+
className: clsx(indicatorIcon, className),
|
|
45
|
+
children: /* @__PURE__ */ jsx(
|
|
46
|
+
"path",
|
|
47
|
+
{
|
|
48
|
+
d: "M3.75002 1.55859L4.41318 1.09468C4.75243 0.857361 5.21982 0.939865 5.45732 1.27899C5.69499 1.61836 5.61243 2.08615 5.27295 2.32366L4.30763 2.99902L5.27372 3.67612C5.61285 3.91381 5.69517 4.38137 5.45761 4.72059C5.21999 5.0599 4.7523 5.14233 4.41299 4.90471L3.75002 4.44043V5.25C3.75002 5.66421 3.41423 6 3.00002 6C2.5858 6 2.25002 5.66421 2.25002 5.25V4.44043L1.58704 4.90471C1.24773 5.14233 0.780041 5.0599 0.542418 4.72059C0.304856 4.38137 0.387176 3.91381 0.726309 3.67612L1.6924 2.99902L0.727079 2.32366C0.387603 2.08615 0.305043 1.61836 0.542707 1.27899C0.780206 0.939865 1.2476 0.857361 1.58685 1.09468L2.25002 1.55859V0.75C2.25002 0.335786 2.5858 0 3.00002 0C3.41423 0 3.75002 0.335786 3.75002 0.75V1.55859Z",
|
|
49
|
+
fill: "currentColor"
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
),
|
|
55
|
+
ref,
|
|
56
|
+
...props
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
});
|
|
60
|
+
RadioGroupFieldRequiredIndicator.displayName = "RadioGroupFieldRequiredIndicator";
|
|
61
|
+
const RadioGroupFieldFooter = withContext(
|
|
62
|
+
Primitive.div,
|
|
63
|
+
"footer"
|
|
64
|
+
);
|
|
65
|
+
const RadioGroupFieldDescription = withContext(RadioGroup.Description, "description");
|
|
66
|
+
const RadioGroupFieldErrorMessage = withContext(RadioGroup.ErrorMessage, "errorMessage");
|
|
67
|
+
|
|
68
|
+
export { RadioGroupFieldDescription, RadioGroupFieldErrorMessage, RadioGroupFieldFooter, RadioGroupFieldHeader, RadioGroupFieldIndicatorText, RadioGroupFieldLabel, RadioGroupFieldRequiredIndicator, RadioGroupFieldRoot };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const RadioGroupField = require('./RadioGroupField.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
exports.Description = RadioGroupField.RadioGroupFieldDescription;
|
|
10
|
+
exports.ErrorMessage = RadioGroupField.RadioGroupFieldErrorMessage;
|
|
11
|
+
exports.Footer = RadioGroupField.RadioGroupFieldFooter;
|
|
12
|
+
exports.Header = RadioGroupField.RadioGroupFieldHeader;
|
|
13
|
+
exports.IndicatorText = RadioGroupField.RadioGroupFieldIndicatorText;
|
|
14
|
+
exports.Label = RadioGroupField.RadioGroupFieldLabel;
|
|
15
|
+
exports.RequiredIndicator = RadioGroupField.RadioGroupFieldRequiredIndicator;
|
|
16
|
+
exports.Root = RadioGroupField.RadioGroupFieldRoot;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { RadioGroupFieldRoot as Root, RadioGroupFieldHeader as Header, RadioGroupFieldLabel as Label, RadioGroupFieldIndicatorText as IndicatorText, RadioGroupFieldRequiredIndicator as RequiredIndicator, RadioGroupFieldFooter as Footer, RadioGroupFieldDescription as Description, RadioGroupFieldErrorMessage as ErrorMessage, type RadioGroupFieldRootProps as RootProps, type RadioGroupFieldHeaderProps as HeaderProps, type RadioGroupFieldLabelProps as LabelProps, type RadioGroupFieldIndicatorTextProps as IndicatorTextProps, type RadioGroupFieldRequiredIndicatorProps as RequiredIndicatorProps, type RadioGroupFieldFooterProps as FooterProps, type RadioGroupFieldDescriptionProps as DescriptionProps, type RadioGroupFieldErrorMessageProps as ErrorMessageProps, } from './RadioGroupField';
|
|
2
|
+
//# sourceMappingURL=RadioGroupField.namespace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioGroupField.namespace.d.ts","sourceRoot":"","sources":["../../../src/components/RadioGroupField/RadioGroupField.namespace.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,IAAI,IAAI,EAC3B,qBAAqB,IAAI,MAAM,EAC/B,oBAAoB,IAAI,KAAK,EAC7B,4BAA4B,IAAI,aAAa,EAC7C,gCAAgC,IAAI,iBAAiB,EACrD,qBAAqB,IAAI,MAAM,EAC/B,0BAA0B,IAAI,WAAW,EACzC,2BAA2B,IAAI,YAAY,EAC3C,KAAK,wBAAwB,IAAI,SAAS,EAC1C,KAAK,0BAA0B,IAAI,WAAW,EAC9C,KAAK,yBAAyB,IAAI,UAAU,EAC5C,KAAK,iCAAiC,IAAI,kBAAkB,EAC5D,KAAK,qCAAqC,IAAI,sBAAsB,EACpE,KAAK,0BAA0B,IAAI,WAAW,EAC9C,KAAK,+BAA+B,IAAI,gBAAgB,EACxD,KAAK,gCAAgC,IAAI,iBAAiB,GAC3D,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RadioGroupFieldDescription as Description, RadioGroupFieldErrorMessage as ErrorMessage, RadioGroupFieldFooter as Footer, RadioGroupFieldHeader as Header, RadioGroupFieldIndicatorText as IndicatorText, RadioGroupFieldLabel as Label, RadioGroupFieldRequiredIndicator as RequiredIndicator, RadioGroupFieldRoot as Root } from './RadioGroupField.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const RadioGroupField = require('./RadioGroupField.cjs');
|
|
6
|
+
const RadioGroupField_namespace = require('./RadioGroupField.namespace.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
exports.RadioGroupFieldDescription = RadioGroupField.RadioGroupFieldDescription;
|
|
11
|
+
exports.RadioGroupFieldErrorMessage = RadioGroupField.RadioGroupFieldErrorMessage;
|
|
12
|
+
exports.RadioGroupFieldFooter = RadioGroupField.RadioGroupFieldFooter;
|
|
13
|
+
exports.RadioGroupFieldHeader = RadioGroupField.RadioGroupFieldHeader;
|
|
14
|
+
exports.RadioGroupFieldIndicatorText = RadioGroupField.RadioGroupFieldIndicatorText;
|
|
15
|
+
exports.RadioGroupFieldLabel = RadioGroupField.RadioGroupFieldLabel;
|
|
16
|
+
exports.RadioGroupFieldRequiredIndicator = RadioGroupField.RadioGroupFieldRequiredIndicator;
|
|
17
|
+
exports.RadioGroupFieldRoot = RadioGroupField.RadioGroupFieldRoot;
|
|
18
|
+
exports.RadioGroupField = RadioGroupField_namespace;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/RadioGroupField/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,OAAO,KAAK,eAAe,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { RadioGroupFieldDescription, RadioGroupFieldErrorMessage, RadioGroupFieldFooter, RadioGroupFieldHeader, RadioGroupFieldIndicatorText, RadioGroupFieldLabel, RadioGroupFieldRequiredIndicator, RadioGroupFieldRoot } from './RadioGroupField.js';
|
|
2
|
+
import * as RadioGroupField_namespace from './RadioGroupField.namespace.js';
|
|
3
|
+
export { RadioGroupField_namespace as RadioGroupField };
|