@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.
Files changed (189) hide show
  1. package/lib/components/AspectRatio/AspectRatio.cjs +53 -0
  2. package/lib/components/AspectRatio/AspectRatio.d.ts +11 -0
  3. package/lib/components/AspectRatio/AspectRatio.d.ts.map +1 -0
  4. package/lib/components/AspectRatio/AspectRatio.js +30 -0
  5. package/lib/components/AspectRatio/index.cjs +9 -0
  6. package/lib/components/AspectRatio/index.d.ts +2 -0
  7. package/lib/components/AspectRatio/index.d.ts.map +1 -0
  8. package/lib/components/AspectRatio/index.js +1 -0
  9. package/lib/components/Avatar/Avatar.cjs +4 -10
  10. package/lib/components/Avatar/Avatar.d.ts +4 -4
  11. package/lib/components/Avatar/Avatar.d.ts.map +1 -1
  12. package/lib/components/Avatar/Avatar.js +4 -10
  13. package/lib/components/Checkbox/Checkbox.cjs +10 -0
  14. package/lib/components/Checkbox/Checkbox.d.ts +4 -0
  15. package/lib/components/Checkbox/Checkbox.d.ts.map +1 -1
  16. package/lib/components/Checkbox/Checkbox.js +10 -1
  17. package/lib/components/Checkbox/Checkbox.namespace.cjs +1 -0
  18. package/lib/components/Checkbox/Checkbox.namespace.d.ts +1 -1
  19. package/lib/components/Checkbox/Checkbox.namespace.d.ts.map +1 -1
  20. package/lib/components/Checkbox/Checkbox.namespace.js +1 -1
  21. package/lib/components/Checkbox/index.cjs +1 -0
  22. package/lib/components/Checkbox/index.d.ts +1 -1
  23. package/lib/components/Checkbox/index.d.ts.map +1 -1
  24. package/lib/components/Checkbox/index.js +1 -1
  25. package/lib/components/ChipTabs/ChipTabs.cjs +23 -4
  26. package/lib/components/ChipTabs/ChipTabs.d.ts.map +1 -1
  27. package/lib/components/ChipTabs/ChipTabs.js +23 -4
  28. package/lib/components/Dialog/Dialog.d.ts.map +1 -1
  29. package/lib/components/Fieldset/Fieldset.cjs +86 -0
  30. package/lib/components/Fieldset/Fieldset.d.ts +30 -0
  31. package/lib/components/Fieldset/Fieldset.d.ts.map +1 -0
  32. package/lib/components/Fieldset/Fieldset.js +75 -0
  33. package/lib/components/Fieldset/Fieldset.namespace.cjs +16 -0
  34. package/lib/components/Fieldset/Fieldset.namespace.d.ts +2 -0
  35. package/lib/components/Fieldset/Fieldset.namespace.d.ts.map +1 -0
  36. package/lib/components/Fieldset/Fieldset.namespace.js +1 -0
  37. package/lib/components/Fieldset/index.cjs +18 -0
  38. package/lib/components/Fieldset/index.d.ts +3 -0
  39. package/lib/components/Fieldset/index.d.ts.map +1 -0
  40. package/lib/components/Fieldset/index.js +3 -0
  41. package/lib/components/Grid/Grid.cjs +56 -0
  42. package/lib/components/Grid/Grid.d.ts +41 -0
  43. package/lib/components/Grid/Grid.d.ts.map +1 -0
  44. package/lib/components/Grid/Grid.js +33 -0
  45. package/lib/components/Grid/index.cjs +9 -0
  46. package/lib/components/Grid/index.d.ts +2 -0
  47. package/lib/components/Grid/index.d.ts.map +1 -0
  48. package/lib/components/Grid/index.js +1 -0
  49. package/lib/components/GridItem/GridItem.cjs +45 -0
  50. package/lib/components/GridItem/GridItem.d.ts +35 -0
  51. package/lib/components/GridItem/GridItem.d.ts.map +1 -0
  52. package/lib/components/GridItem/GridItem.js +22 -0
  53. package/lib/components/GridItem/index.cjs +9 -0
  54. package/lib/components/GridItem/index.d.ts +2 -0
  55. package/lib/components/GridItem/index.d.ts.map +1 -0
  56. package/lib/components/GridItem/index.js +1 -0
  57. package/lib/components/HelpBubble/HelpBubble.cjs +5 -0
  58. package/lib/components/HelpBubble/HelpBubble.d.ts +3 -0
  59. package/lib/components/HelpBubble/HelpBubble.d.ts.map +1 -1
  60. package/lib/components/HelpBubble/HelpBubble.js +5 -1
  61. package/lib/components/HelpBubble/HelpBubble.namespace.cjs +1 -0
  62. package/lib/components/HelpBubble/HelpBubble.namespace.d.ts +1 -1
  63. package/lib/components/HelpBubble/HelpBubble.namespace.d.ts.map +1 -1
  64. package/lib/components/HelpBubble/HelpBubble.namespace.js +1 -1
  65. package/lib/components/HelpBubble/index.cjs +1 -0
  66. package/lib/components/HelpBubble/index.d.ts +1 -1
  67. package/lib/components/HelpBubble/index.d.ts.map +1 -1
  68. package/lib/components/HelpBubble/index.js +1 -1
  69. package/lib/components/ImageFrame/ImageFrame.cjs +157 -0
  70. package/lib/components/ImageFrame/ImageFrame.d.ts +51 -0
  71. package/lib/components/ImageFrame/ImageFrame.d.ts.map +1 -0
  72. package/lib/components/ImageFrame/ImageFrame.js +129 -0
  73. package/lib/components/ImageFrame/index.cjs +14 -0
  74. package/lib/components/ImageFrame/index.d.ts +2 -0
  75. package/lib/components/ImageFrame/index.d.ts.map +1 -0
  76. package/lib/components/ImageFrame/index.js +1 -0
  77. package/lib/components/MenuSheet/MenuSheet.cjs +60 -24
  78. package/lib/components/MenuSheet/MenuSheet.d.ts +12 -0
  79. package/lib/components/MenuSheet/MenuSheet.d.ts.map +1 -1
  80. package/lib/components/MenuSheet/MenuSheet.js +57 -25
  81. package/lib/components/MenuSheet/MenuSheet.namespace.cjs +4 -0
  82. package/lib/components/MenuSheet/MenuSheet.namespace.d.ts +1 -1
  83. package/lib/components/MenuSheet/MenuSheet.namespace.d.ts.map +1 -1
  84. package/lib/components/MenuSheet/MenuSheet.namespace.js +1 -1
  85. package/lib/components/MenuSheet/index.cjs +4 -0
  86. package/lib/components/MenuSheet/index.d.ts +1 -1
  87. package/lib/components/MenuSheet/index.d.ts.map +1 -1
  88. package/lib/components/MenuSheet/index.js +1 -1
  89. package/lib/components/RadioGroup/RadioGroup.cjs +4 -1
  90. package/lib/components/RadioGroup/RadioGroup.d.ts +3 -2
  91. package/lib/components/RadioGroup/RadioGroup.d.ts.map +1 -1
  92. package/lib/components/RadioGroup/RadioGroup.js +4 -1
  93. package/lib/components/RadioGroupField/RadioGroupField.cjs +79 -0
  94. package/lib/components/RadioGroupField/RadioGroupField.d.ts +30 -0
  95. package/lib/components/RadioGroupField/RadioGroupField.d.ts.map +1 -0
  96. package/lib/components/RadioGroupField/RadioGroupField.js +68 -0
  97. package/lib/components/RadioGroupField/RadioGroupField.namespace.cjs +16 -0
  98. package/lib/components/RadioGroupField/RadioGroupField.namespace.d.ts +2 -0
  99. package/lib/components/RadioGroupField/RadioGroupField.namespace.d.ts.map +1 -0
  100. package/lib/components/RadioGroupField/RadioGroupField.namespace.js +1 -0
  101. package/lib/components/RadioGroupField/index.cjs +18 -0
  102. package/lib/components/RadioGroupField/index.d.ts +3 -0
  103. package/lib/components/RadioGroupField/index.d.ts.map +1 -0
  104. package/lib/components/RadioGroupField/index.js +3 -0
  105. package/lib/components/SelectBox/CheckSelectBox.cjs +117 -8
  106. package/lib/components/SelectBox/CheckSelectBox.d.ts +38 -10
  107. package/lib/components/SelectBox/CheckSelectBox.d.ts.map +1 -1
  108. package/lib/components/SelectBox/CheckSelectBox.js +113 -10
  109. package/lib/components/SelectBox/CheckSelectBox.namespace.cjs +6 -0
  110. package/lib/components/SelectBox/CheckSelectBox.namespace.d.ts +1 -1
  111. package/lib/components/SelectBox/CheckSelectBox.namespace.d.ts.map +1 -1
  112. package/lib/components/SelectBox/CheckSelectBox.namespace.js +1 -1
  113. package/lib/components/SelectBox/RadioSelectBox.cjs +112 -9
  114. package/lib/components/SelectBox/RadioSelectBox.d.ts +31 -7
  115. package/lib/components/SelectBox/RadioSelectBox.d.ts.map +1 -1
  116. package/lib/components/SelectBox/RadioSelectBox.js +109 -10
  117. package/lib/components/SelectBox/RadioSelectBox.namespace.cjs +5 -1
  118. package/lib/components/SelectBox/RadioSelectBox.namespace.d.ts +1 -1
  119. package/lib/components/SelectBox/RadioSelectBox.namespace.d.ts.map +1 -1
  120. package/lib/components/SelectBox/RadioSelectBox.namespace.js +1 -1
  121. package/lib/components/SelectBox/index.cjs +11 -1
  122. package/lib/components/SelectBox/index.d.ts +2 -2
  123. package/lib/components/SelectBox/index.d.ts.map +1 -1
  124. package/lib/components/SelectBox/index.js +2 -2
  125. package/lib/components/Switch/Switch.cjs +10 -5
  126. package/lib/components/Switch/Switch.d.ts +3 -3
  127. package/lib/components/Switch/Switch.d.ts.map +1 -1
  128. package/lib/components/Switch/Switch.js +10 -5
  129. package/lib/components/TagGroup/TagGroup.cjs +25 -9
  130. package/lib/components/TagGroup/TagGroup.d.ts +5 -1
  131. package/lib/components/TagGroup/TagGroup.d.ts.map +1 -1
  132. package/lib/components/TagGroup/TagGroup.js +25 -10
  133. package/lib/components/TagGroup/TagGroup.namespace.cjs +1 -0
  134. package/lib/components/TagGroup/TagGroup.namespace.d.ts +1 -1
  135. package/lib/components/TagGroup/TagGroup.namespace.d.ts.map +1 -1
  136. package/lib/components/TagGroup/TagGroup.namespace.js +1 -1
  137. package/lib/components/TagGroup/index.cjs +1 -0
  138. package/lib/components/TagGroup/index.d.ts +1 -1
  139. package/lib/components/TagGroup/index.d.ts.map +1 -1
  140. package/lib/components/TagGroup/index.js +1 -1
  141. package/lib/components/index.cjs +53 -1
  142. package/lib/components/index.d.ts +6 -0
  143. package/lib/components/index.d.ts.map +1 -1
  144. package/lib/components/index.js +16 -6
  145. package/lib/index.cjs +53 -1
  146. package/lib/index.js +16 -6
  147. package/lib/utils/styled.cjs +11 -5
  148. package/lib/utils/styled.d.ts +6 -0
  149. package/lib/utils/styled.d.ts.map +1 -1
  150. package/lib/utils/styled.js +11 -5
  151. package/package.json +6 -3
  152. package/src/components/AspectRatio/AspectRatio.tsx +38 -0
  153. package/src/components/AspectRatio/index.ts +1 -0
  154. package/src/components/Avatar/Avatar.tsx +7 -14
  155. package/src/components/Checkbox/Checkbox.namespace.ts +2 -0
  156. package/src/components/Checkbox/Checkbox.tsx +24 -0
  157. package/src/components/Checkbox/index.ts +2 -0
  158. package/src/components/ChipTabs/ChipTabs.tsx +25 -4
  159. package/src/components/Dialog/Dialog.tsx +6 -0
  160. package/src/components/Fieldset/Fieldset.namespace.ts +17 -0
  161. package/src/components/Fieldset/Fieldset.tsx +101 -0
  162. package/src/components/Fieldset/index.ts +19 -0
  163. package/src/components/Grid/Grid.tsx +79 -0
  164. package/src/components/Grid/index.ts +1 -0
  165. package/src/components/GridItem/GridItem.tsx +70 -0
  166. package/src/components/GridItem/index.ts +1 -0
  167. package/src/components/HelpBubble/HelpBubble.namespace.ts +3 -0
  168. package/src/components/HelpBubble/HelpBubble.tsx +7 -2
  169. package/src/components/HelpBubble/index.ts +2 -0
  170. package/src/components/ImageFrame/ImageFrame.tsx +227 -0
  171. package/src/components/ImageFrame/index.ts +14 -0
  172. package/src/components/MenuSheet/MenuSheet.namespace.ts +8 -0
  173. package/src/components/MenuSheet/MenuSheet.tsx +82 -34
  174. package/src/components/MenuSheet/index.ts +8 -0
  175. package/src/components/RadioGroup/RadioGroup.tsx +8 -2
  176. package/src/components/RadioGroupField/RadioGroupField.namespace.ts +18 -0
  177. package/src/components/RadioGroupField/RadioGroupField.tsx +114 -0
  178. package/src/components/RadioGroupField/index.ts +2 -0
  179. package/src/components/SelectBox/CheckSelectBox.namespace.ts +12 -0
  180. package/src/components/SelectBox/CheckSelectBox.tsx +229 -24
  181. package/src/components/SelectBox/RadioSelectBox.namespace.ts +10 -2
  182. package/src/components/SelectBox/RadioSelectBox.tsx +210 -16
  183. package/src/components/SelectBox/index.ts +22 -2
  184. package/src/components/Switch/Switch.tsx +16 -7
  185. package/src/components/TagGroup/TagGroup.namespace.ts +2 -0
  186. package/src/components/TagGroup/TagGroup.tsx +33 -9
  187. package/src/components/TagGroup/index.ts +2 -0
  188. package/src/components/index.ts +6 -0
  189. package/src/utils/styled.tsx +23 -5
@@ -1,30 +1,129 @@
1
1
  'use client';
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import { composeRefs } from '@radix-ui/react-compose-refs';
2
4
  import { selectBox } from '@seed-design/css/recipes/select-box';
3
5
  import { selectBoxGroup } from '@seed-design/css/recipes/select-box-group';
6
+ import { useCollapsibleContext, Collapsible, useCollapsible, CollapsibleProvider } from '@seed-design/react-collapsible';
4
7
  import { Primitive } from '@seed-design/react-primitive';
5
- import { RadioGroup, useRadioGroupItemContext } from '@seed-design/react-radio-group';
6
- import { createRecipeContext } from '../../utils/createRecipeContext.js';
8
+ import { useRadioGroupItemContext, RadioGroup } from '@seed-design/react-radio-group';
9
+ import { forwardRef, useContext, createContext, useState, useCallback } from 'react';
7
10
  import { createSlotRecipeContext } from '../../utils/createSlotRecipeContext.js';
8
11
  import { createWithStateProps } from '../../utils/createWithStateProps.js';
12
+ import clsx from 'clsx';
9
13
 
10
- const { withContext: withGroupContext } = createRecipeContext(selectBoxGroup);
11
- const { withContext, withProvider } = createSlotRecipeContext(selectBox);
14
+ const { PropsProvider, ClassNamesProvider, withContext, useProps, useClassNames } = createSlotRecipeContext(selectBox);
12
15
  const withStateProps = createWithStateProps([useRadioGroupItemContext]);
13
- const RadioSelectBoxRoot = withGroupContext(
14
- RadioGroup.Root
16
+ const FooterContext = createContext(null);
17
+ const RadioSelectBoxGroup = forwardRef(
18
+ ({ columns = 1, className, style, ...props }, ref) => {
19
+ const [variantProps, otherProps] = selectBoxGroup.splitVariantProps(props);
20
+ const recipeClassName = selectBoxGroup(variantProps);
21
+ const layout = columns === 1 ? "horizontal" : "vertical";
22
+ return /* @__PURE__ */ jsx(PropsProvider, { value: { layout }, children: /* @__PURE__ */ jsx(
23
+ Primitive.div,
24
+ {
25
+ ref,
26
+ "data-columns": columns,
27
+ className: clsx(recipeClassName, className),
28
+ style: {
29
+ ...style,
30
+ "--seed-select-box-group--columns": columns
31
+ },
32
+ ...otherProps
33
+ }
34
+ ) });
35
+ }
15
36
  );
16
- const RadioSelectBoxItem = withProvider(
17
- RadioGroup.Item,
18
- "root"
37
+ function FooterVisibilityProvider({
38
+ children,
39
+ footerVisibility
40
+ }) {
41
+ const { checked } = useRadioGroupItemContext();
42
+ const collapsible = useCollapsible({
43
+ open: {
44
+ "when-selected": checked,
45
+ "when-not-selected": !checked
46
+ }[footerVisibility]
47
+ });
48
+ const [isFooterRendered, setIsFooterRendered] = useState(false);
49
+ const footerRef = useCallback((node) => {
50
+ setIsFooterRendered(!!node);
51
+ }, []);
52
+ return /* @__PURE__ */ jsx(CollapsibleProvider, { value: collapsible, children: /* @__PURE__ */ jsx(FooterContext.Provider, { value: { isFooterRendered, footerRef, footerVisibility }, children }) });
53
+ }
54
+ const RadioSelectBoxItem = forwardRef(
55
+ ({ footerVisibility = "when-selected", className, children, ...props }, ref) => {
56
+ const [variantProps, otherProps] = selectBox.splitVariantProps(props);
57
+ const classNames = selectBox({
58
+ ...useProps(),
59
+ ...variantProps
60
+ });
61
+ return /* @__PURE__ */ jsx(ClassNamesProvider, { value: classNames, children: /* @__PURE__ */ jsx(
62
+ RadioGroup.Item,
63
+ {
64
+ ref,
65
+ className: clsx(classNames.root, className),
66
+ ...otherProps,
67
+ children: footerVisibility === "always" ? children : /* @__PURE__ */ jsx(FooterVisibilityProvider, { footerVisibility, children })
68
+ }
69
+ ) });
70
+ }
71
+ );
72
+ const RadioSelectBoxTrigger = withContext(
73
+ withStateProps(Primitive.div),
74
+ "trigger"
19
75
  );
20
76
  const RadioSelectBoxContent = withContext(
21
77
  withStateProps(Primitive.div),
22
78
  "content"
23
79
  );
80
+ const RadioSelectBoxBody = withContext(
81
+ withStateProps(Primitive.div),
82
+ "body"
83
+ );
24
84
  const RadioSelectBoxLabel = withContext(
25
85
  withStateProps(Primitive.div),
26
86
  "label"
27
87
  );
28
88
  const RadioSelectBoxDescription = withContext(withStateProps(Primitive.div), "description");
89
+ const RadioSelectBoxHiddenInput = forwardRef((props, ref) => {
90
+ const collapsibleContext = useCollapsibleContext({ strict: false });
91
+ const footerContext = useContext(FooterContext);
92
+ const triggerAriaProps = footerContext?.isFooterRendered ? collapsibleContext?.triggerAriaProps : void 0;
93
+ return /* @__PURE__ */ jsx(RadioGroup.ItemHiddenInput, { ref, ...triggerAriaProps, ...props });
94
+ });
95
+ RadioSelectBoxHiddenInput.displayName = "RadioSelectBoxHiddenInput";
96
+ const RadioSelectBoxFooter = forwardRef(
97
+ ({ className, children, ...props }, ref) => {
98
+ const classNames = useClassNames();
99
+ const { stateProps } = useRadioGroupItemContext();
100
+ const collapsibleContext = useCollapsibleContext({ strict: false });
101
+ const footerContext = useContext(FooterContext);
102
+ const composedRef = composeRefs(ref, footerContext?.footerRef ?? null);
103
+ if (collapsibleContext) {
104
+ return /* @__PURE__ */ jsx(
105
+ Collapsible.Content,
106
+ {
107
+ ref: composedRef,
108
+ className: clsx(classNames.footer, className),
109
+ ...stateProps,
110
+ ...props,
111
+ children
112
+ }
113
+ );
114
+ }
115
+ return /* @__PURE__ */ jsx(
116
+ Primitive.div,
117
+ {
118
+ ref: composedRef,
119
+ className: clsx(classNames.footer, className),
120
+ ...stateProps,
121
+ ...props,
122
+ children
123
+ }
124
+ );
125
+ }
126
+ );
127
+ RadioSelectBoxFooter.displayName = "RadioSelectBoxFooter";
29
128
 
30
- export { RadioSelectBoxContent, RadioSelectBoxDescription, RadioSelectBoxItem, RadioSelectBoxLabel, RadioSelectBoxRoot };
129
+ export { RadioSelectBoxBody, RadioSelectBoxContent, RadioSelectBoxDescription, RadioSelectBoxFooter, RadioSelectBoxGroup, RadioSelectBoxHiddenInput, RadioSelectBoxItem, RadioSelectBoxLabel, RadioSelectBoxTrigger };
@@ -6,8 +6,12 @@ const RadioSelectBox = require('./RadioSelectBox.cjs');
6
6
 
7
7
 
8
8
 
9
+ exports.Body = RadioSelectBox.RadioSelectBoxBody;
9
10
  exports.Content = RadioSelectBox.RadioSelectBoxContent;
10
11
  exports.Description = RadioSelectBox.RadioSelectBoxDescription;
12
+ exports.Footer = RadioSelectBox.RadioSelectBoxFooter;
13
+ exports.Group = RadioSelectBox.RadioSelectBoxGroup;
14
+ exports.HiddenInput = RadioSelectBox.RadioSelectBoxHiddenInput;
11
15
  exports.Item = RadioSelectBox.RadioSelectBoxItem;
12
16
  exports.Label = RadioSelectBox.RadioSelectBoxLabel;
13
- exports.Root = RadioSelectBox.RadioSelectBoxRoot;
17
+ exports.Trigger = RadioSelectBox.RadioSelectBoxTrigger;
@@ -1,2 +1,2 @@
1
- export { RadioSelectBoxContent as Content, RadioSelectBoxDescription as Description, RadioSelectBoxItem as Item, RadioSelectBoxLabel as Label, RadioSelectBoxRoot as Root, type RadioSelectBoxContentProps as ContentProps, type RadioSelectBoxDescriptionProps as DescriptionProps, type RadioSelectBoxItemProps as ItemProps, type RadioSelectBoxLabelProps as LabelProps, type RadioSelectBoxRootProps as RootProps, } from './RadioSelectBox';
1
+ export { RadioSelectBoxBody as Body, RadioSelectBoxContent as Content, RadioSelectBoxDescription as Description, RadioSelectBoxFooter as Footer, RadioSelectBoxGroup as Group, RadioSelectBoxHiddenInput as HiddenInput, RadioSelectBoxItem as Item, RadioSelectBoxLabel as Label, RadioSelectBoxTrigger as Trigger, type RadioSelectBoxBodyProps as BodyProps, type RadioSelectBoxContentProps as ContentProps, type RadioSelectBoxDescriptionProps as DescriptionProps, type RadioSelectBoxFooterProps as FooterProps, type RadioSelectBoxGroupProps as GroupProps, type RadioSelectBoxHiddenInputProps as HiddenInputProps, type RadioSelectBoxItemProps as ItemProps, type RadioSelectBoxLabelProps as LabelProps, type RadioSelectBoxTriggerProps as TriggerProps, } from './RadioSelectBox';
2
2
  //# sourceMappingURL=RadioSelectBox.namespace.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RadioSelectBox.namespace.d.ts","sourceRoot":"","sources":["../../../src/components/SelectBox/RadioSelectBox.namespace.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,IAAI,OAAO,EAChC,yBAAyB,IAAI,WAAW,EACxC,kBAAkB,IAAI,IAAI,EAC1B,mBAAmB,IAAI,KAAK,EAC5B,kBAAkB,IAAI,IAAI,EAC1B,KAAK,0BAA0B,IAAI,YAAY,EAC/C,KAAK,8BAA8B,IAAI,gBAAgB,EACvD,KAAK,uBAAuB,IAAI,SAAS,EACzC,KAAK,wBAAwB,IAAI,UAAU,EAC3C,KAAK,uBAAuB,IAAI,SAAS,GAC1C,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"RadioSelectBox.namespace.d.ts","sourceRoot":"","sources":["../../../src/components/SelectBox/RadioSelectBox.namespace.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,IAAI,IAAI,EAC1B,qBAAqB,IAAI,OAAO,EAChC,yBAAyB,IAAI,WAAW,EACxC,oBAAoB,IAAI,MAAM,EAC9B,mBAAmB,IAAI,KAAK,EAC5B,yBAAyB,IAAI,WAAW,EACxC,kBAAkB,IAAI,IAAI,EAC1B,mBAAmB,IAAI,KAAK,EAC5B,qBAAqB,IAAI,OAAO,EAChC,KAAK,uBAAuB,IAAI,SAAS,EACzC,KAAK,0BAA0B,IAAI,YAAY,EAC/C,KAAK,8BAA8B,IAAI,gBAAgB,EACvD,KAAK,yBAAyB,IAAI,WAAW,EAC7C,KAAK,wBAAwB,IAAI,UAAU,EAC3C,KAAK,8BAA8B,IAAI,gBAAgB,EACvD,KAAK,uBAAuB,IAAI,SAAS,EACzC,KAAK,wBAAwB,IAAI,UAAU,EAC3C,KAAK,0BAA0B,IAAI,YAAY,GAChD,MAAM,kBAAkB,CAAC"}
@@ -1 +1 @@
1
- export { RadioSelectBoxContent as Content, RadioSelectBoxDescription as Description, RadioSelectBoxItem as Item, RadioSelectBoxLabel as Label, RadioSelectBoxRoot as Root } from './RadioSelectBox.js';
1
+ export { RadioSelectBoxBody as Body, RadioSelectBoxContent as Content, RadioSelectBoxDescription as Description, RadioSelectBoxFooter as Footer, RadioSelectBoxGroup as Group, RadioSelectBoxHiddenInput as HiddenInput, RadioSelectBoxItem as Item, RadioSelectBoxLabel as Label, RadioSelectBoxTrigger as Trigger } from './RadioSelectBox.js';
@@ -9,15 +9,25 @@ const RadioSelectBox_namespace = require('./RadioSelectBox.namespace.cjs');
9
9
 
10
10
 
11
11
 
12
+ exports.CheckSelectBoxBody = CheckSelectBox.CheckSelectBoxBody;
13
+ exports.CheckSelectBoxCheckmarkControl = CheckSelectBox.CheckSelectBoxCheckmarkControl;
14
+ exports.CheckSelectBoxCheckmarkIcon = CheckSelectBox.CheckSelectBoxCheckmarkIcon;
12
15
  exports.CheckSelectBoxContent = CheckSelectBox.CheckSelectBoxContent;
13
16
  exports.CheckSelectBoxDescription = CheckSelectBox.CheckSelectBoxDescription;
17
+ exports.CheckSelectBoxFooter = CheckSelectBox.CheckSelectBoxFooter;
14
18
  exports.CheckSelectBoxGroup = CheckSelectBox.CheckSelectBoxGroup;
19
+ exports.CheckSelectBoxHiddenInput = CheckSelectBox.CheckSelectBoxHiddenInput;
15
20
  exports.CheckSelectBoxLabel = CheckSelectBox.CheckSelectBoxLabel;
16
21
  exports.CheckSelectBoxRoot = CheckSelectBox.CheckSelectBoxRoot;
22
+ exports.CheckSelectBoxTrigger = CheckSelectBox.CheckSelectBoxTrigger;
23
+ exports.RadioSelectBoxBody = RadioSelectBox.RadioSelectBoxBody;
17
24
  exports.RadioSelectBoxContent = RadioSelectBox.RadioSelectBoxContent;
18
25
  exports.RadioSelectBoxDescription = RadioSelectBox.RadioSelectBoxDescription;
26
+ exports.RadioSelectBoxFooter = RadioSelectBox.RadioSelectBoxFooter;
27
+ exports.RadioSelectBoxGroup = RadioSelectBox.RadioSelectBoxGroup;
28
+ exports.RadioSelectBoxHiddenInput = RadioSelectBox.RadioSelectBoxHiddenInput;
19
29
  exports.RadioSelectBoxItem = RadioSelectBox.RadioSelectBoxItem;
20
30
  exports.RadioSelectBoxLabel = RadioSelectBox.RadioSelectBoxLabel;
21
- exports.RadioSelectBoxRoot = RadioSelectBox.RadioSelectBoxRoot;
31
+ exports.RadioSelectBoxTrigger = RadioSelectBox.RadioSelectBoxTrigger;
22
32
  exports.CheckSelectBox = CheckSelectBox_namespace;
23
33
  exports.RadioSelectBox = RadioSelectBox_namespace;
@@ -1,5 +1,5 @@
1
- export { CheckSelectBoxContent, CheckSelectBoxDescription, CheckSelectBoxGroup, CheckSelectBoxLabel, CheckSelectBoxRoot, type CheckSelectBoxContentProps, type CheckSelectBoxDescriptionProps, type CheckSelectBoxGroupProps, type CheckSelectBoxLabelProps, type CheckSelectBoxRootProps, } from './CheckSelectBox';
2
- export { RadioSelectBoxContent, RadioSelectBoxDescription, RadioSelectBoxItem, RadioSelectBoxLabel, RadioSelectBoxRoot, type RadioSelectBoxContentProps, type RadioSelectBoxDescriptionProps, type RadioSelectBoxItemProps, type RadioSelectBoxLabelProps, type RadioSelectBoxRootProps, } from './RadioSelectBox';
1
+ export { CheckSelectBoxBody, CheckSelectBoxCheckmarkControl, CheckSelectBoxCheckmarkIcon, CheckSelectBoxContent, CheckSelectBoxDescription, CheckSelectBoxFooter, CheckSelectBoxGroup, CheckSelectBoxHiddenInput, CheckSelectBoxLabel, CheckSelectBoxRoot, CheckSelectBoxTrigger, type CheckSelectBoxBodyProps, type CheckSelectBoxCheckmarkControlProps, type CheckSelectBoxCheckmarkIconProps, type CheckSelectBoxContentProps, type CheckSelectBoxDescriptionProps, type CheckSelectBoxFooterProps, type CheckSelectBoxGroupProps, type CheckSelectBoxHiddenInputProps, type CheckSelectBoxLabelProps, type CheckSelectBoxRootProps, type CheckSelectBoxTriggerProps, } from './CheckSelectBox';
2
+ export { RadioSelectBoxBody, RadioSelectBoxContent, RadioSelectBoxDescription, RadioSelectBoxFooter, RadioSelectBoxGroup, RadioSelectBoxHiddenInput, RadioSelectBoxItem, RadioSelectBoxLabel, RadioSelectBoxTrigger, type RadioSelectBoxBodyProps, type RadioSelectBoxContentProps, type RadioSelectBoxDescriptionProps, type RadioSelectBoxFooterProps, type RadioSelectBoxGroupProps, type RadioSelectBoxHiddenInputProps, type RadioSelectBoxItemProps, type RadioSelectBoxLabelProps, type RadioSelectBoxTriggerProps, } from './RadioSelectBox';
3
3
  export * as CheckSelectBox from './CheckSelectBox.namespace';
4
4
  export * as RadioSelectBox from './RadioSelectBox.namespace';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SelectBox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,yBAAyB,EACzB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,KAAK,0BAA0B,EAC/B,KAAK,8BAA8B,EACnC,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,GAC7B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,qBAAqB,EACrB,yBAAyB,EACzB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,KAAK,0BAA0B,EAC/B,KAAK,8BAA8B,EACnC,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,GAC7B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,cAAc,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,cAAc,MAAM,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SelectBox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,8BAA8B,EAC9B,2BAA2B,EAC3B,qBAAqB,EACrB,yBAAyB,EACzB,oBAAoB,EACpB,mBAAmB,EACnB,yBAAyB,EACzB,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,EACrB,KAAK,uBAAuB,EAC5B,KAAK,mCAAmC,EACxC,KAAK,gCAAgC,EACrC,KAAK,0BAA0B,EAC/B,KAAK,8BAA8B,EACnC,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,8BAA8B,EACnC,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,GAChC,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,yBAAyB,EACzB,oBAAoB,EACpB,mBAAmB,EACnB,yBAAyB,EACzB,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACrB,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAC/B,KAAK,8BAA8B,EACnC,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,8BAA8B,EACnC,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,GAChC,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,cAAc,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,cAAc,MAAM,4BAA4B,CAAC"}
@@ -1,5 +1,5 @@
1
- export { CheckSelectBoxContent, CheckSelectBoxDescription, CheckSelectBoxGroup, CheckSelectBoxLabel, CheckSelectBoxRoot } from './CheckSelectBox.js';
2
- export { RadioSelectBoxContent, RadioSelectBoxDescription, RadioSelectBoxItem, RadioSelectBoxLabel, RadioSelectBoxRoot } from './RadioSelectBox.js';
1
+ export { CheckSelectBoxBody, CheckSelectBoxCheckmarkControl, CheckSelectBoxCheckmarkIcon, CheckSelectBoxContent, CheckSelectBoxDescription, CheckSelectBoxFooter, CheckSelectBoxGroup, CheckSelectBoxHiddenInput, CheckSelectBoxLabel, CheckSelectBoxRoot, CheckSelectBoxTrigger } from './CheckSelectBox.js';
2
+ export { RadioSelectBoxBody, RadioSelectBoxContent, RadioSelectBoxDescription, RadioSelectBoxFooter, RadioSelectBoxGroup, RadioSelectBoxHiddenInput, RadioSelectBoxItem, RadioSelectBoxLabel, RadioSelectBoxTrigger } from './RadioSelectBox.js';
3
3
  import * as CheckSelectBox_namespace from './CheckSelectBox.namespace.js';
4
4
  export { CheckSelectBox_namespace as CheckSelectBox };
5
5
  import * as RadioSelectBox_namespace from './RadioSelectBox.namespace.js';
@@ -6,7 +6,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
6
6
  const jsxRuntime = require('react/jsx-runtime');
7
7
  const reactSwitch = require('@seed-design/react-switch');
8
8
  const _switch = require('@seed-design/css/recipes/switch');
9
- const switchMark = require('@seed-design/css/recipes/switch-mark');
9
+ const switchmark = require('@seed-design/css/recipes/switchmark');
10
10
  const createSlotRecipeContext = require('../../utils/createSlotRecipeContext.cjs');
11
11
  const reactPrimitive = require('@seed-design/react-primitive');
12
12
  const createWithStateProps = require('../../utils/createWithStateProps.cjs');
@@ -19,20 +19,25 @@ const {
19
19
  withContext: withControlContext,
20
20
  PropsProvider: ControlPropsProvider,
21
21
  withProvider: withControlProvider
22
- } = createSlotRecipeContext.createSlotRecipeContext(switchMark.switchMark);
22
+ } = createSlotRecipeContext.createSlotRecipeContext(switchmark.switchmark);
23
23
  const withStateProps = createWithStateProps.createWithStateProps([reactSwitch.useSwitchContext]);
24
24
  const SwitchRoot = React.forwardRef(
25
25
  ({ className, ...props }, ref) => {
26
- const [{ switch: switchVariantProps, switchMark: switchMarkVariantProps }, otherProps] = splitMultipleVariantsProps.splitMultipleVariantsProps(
26
+ if (process.env.NODE_ENV !== "production" && (props.size === "small" || props.size === "medium")) {
27
+ console.warn(
28
+ `[SEED Design System] Switch size='${props.size}' is deprecated and will be removed in @seed-design/react@1.3.0. Use size='${props.size === "small" ? "16" : "32"}' instead.`
29
+ );
30
+ }
31
+ const [{ switch: switchVariantProps, switchmark: switchmarkVariantProps }, otherProps] = splitMultipleVariantsProps.splitMultipleVariantsProps(
27
32
  {
28
33
  ...props,
29
34
  // TODO: replace this mapping completely
30
35
  size: props.size === "small" ? "16" : props.size === "medium" ? "32" : props.size
31
36
  },
32
- { switchMark: switchMark.switchMark, switch: _switch.switchStyle }
37
+ { switchmark: switchmark.switchmark, switch: _switch.switchStyle }
33
38
  );
34
39
  const classNames = _switch.switchStyle(switchVariantProps);
35
- return /* @__PURE__ */ jsxRuntime.jsx(ControlPropsProvider, { value: switchMarkVariantProps, children: /* @__PURE__ */ jsxRuntime.jsx(ClassNamesProvider, { value: classNames, children: /* @__PURE__ */ jsxRuntime.jsx(
40
+ return /* @__PURE__ */ jsxRuntime.jsx(ControlPropsProvider, { value: switchmarkVariantProps, children: /* @__PURE__ */ jsxRuntime.jsx(ClassNamesProvider, { value: classNames, children: /* @__PURE__ */ jsxRuntime.jsx(
36
41
  reactSwitch.Switch.Root,
37
42
  {
38
43
  ref,
@@ -1,17 +1,17 @@
1
1
  import { Switch as SwitchPrimitive } from '@seed-design/react-switch';
2
2
  import { SwitchVariantProps } from '@seed-design/css/recipes/switch';
3
- import { SwitchMarkVariantProps } from '@seed-design/css/recipes/switch-mark';
3
+ import { SwitchmarkVariantProps } from '@seed-design/css/recipes/switchmark';
4
4
  import { PrimitiveProps } from '@seed-design/react-primitive';
5
5
  import { default as React } from 'react';
6
6
  /**
7
7
  * @deprecated Use `16` or `32` instead of `small` or `medium`.
8
8
  */
9
9
  type SwitchVariantDeprecatedSizeProps = "small" | "medium";
10
- export interface SwitchRootProps extends Omit<SwitchVariantProps, "size">, Omit<SwitchMarkVariantProps, "size">, SwitchPrimitive.RootProps {
10
+ export interface SwitchRootProps extends Omit<SwitchVariantProps, "size">, Omit<SwitchmarkVariantProps, "size">, SwitchPrimitive.RootProps {
11
11
  size?: SwitchVariantProps["size"] | SwitchVariantDeprecatedSizeProps;
12
12
  }
13
13
  export declare const SwitchRoot: React.ForwardRefExoticComponent<SwitchRootProps & React.RefAttributes<HTMLLabelElement>>;
14
- export interface SwitchControlProps extends SwitchMarkVariantProps, SwitchPrimitive.ControlProps {
14
+ export interface SwitchControlProps extends SwitchmarkVariantProps, SwitchPrimitive.ControlProps {
15
15
  }
16
16
  export declare const SwitchControl: React.ForwardRefExoticComponent<SwitchControlProps & React.RefAttributes<HTMLDivElement>>;
17
17
  export interface SwitchThumbProps extends SwitchPrimitive.ThumbProps {
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAoB,MAAM,2BAA2B,CAAC;AACxF,OAAO,EAAe,KAAK,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACvF,OAAO,EAAc,KAAK,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAE/F,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9E,OAAO,KAAK,MAAM,OAAO,CAAC;AAc1B;;GAEG;AACH,KAAK,gCAAgC,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE3D,MAAM,WAAW,eACf,SAAQ,IAAI,CAAC,kBAAkB,EAAE,MAAM,CAAC,EACtC,IAAI,CAAC,sBAAsB,EAAE,MAAM,CAAC,EACpC,eAAe,CAAC,SAAS;IAC3B,IAAI,CAAC,EAAE,kBAAkB,CAAC,MAAM,CAAC,GAAG,gCAAgC,CAAC;CACtE;AAED,eAAO,MAAM,UAAU,0FA0BtB,CAAC;AAKF,MAAM,WAAW,kBAAmB,SAAQ,sBAAsB,EAAE,eAAe,CAAC,YAAY;CAAG;AAEnG,eAAO,MAAM,aAAa,2FAGzB,CAAC;AAIF,MAAM,WAAW,gBAAiB,SAAQ,eAAe,CAAC,UAAU;CAAG;AAEvE,eAAO,MAAM,WAAW,yFAGvB,CAAC;AAIF,MAAM,WAAW,gBAAiB,SAAQ,cAAc,EAAE,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;CAAG;AAElG,eAAO,MAAM,WAAW,0FAGvB,CAAC;AAIF,MAAM,WAAW,sBAAuB,SAAQ,eAAe,CAAC,gBAAgB;CAAG;AAEnF,eAAO,MAAM,iBAAiB,2GAA8B,CAAC"}
1
+ {"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAoB,MAAM,2BAA2B,CAAC;AACxF,OAAO,EAAe,KAAK,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACvF,OAAO,EAAc,KAAK,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAE9F,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9E,OAAO,KAAK,MAAM,OAAO,CAAC;AAc1B;;GAEG;AACH,KAAK,gCAAgC,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE3D,MAAM,WAAW,eACf,SAAQ,IAAI,CAAC,kBAAkB,EAAE,MAAM,CAAC,EACtC,IAAI,CAAC,sBAAsB,EAAE,MAAM,CAAC,EACpC,eAAe,CAAC,SAAS;IAC3B,IAAI,CAAC,EAAE,kBAAkB,CAAC,MAAM,CAAC,GAAG,gCAAgC,CAAC;CACtE;AAED,eAAO,MAAM,UAAU,0FAmCtB,CAAC;AAKF,MAAM,WAAW,kBAAmB,SAAQ,sBAAsB,EAAE,eAAe,CAAC,YAAY;CAAG;AAEnG,eAAO,MAAM,aAAa,2FAGzB,CAAC;AAIF,MAAM,WAAW,gBAAiB,SAAQ,eAAe,CAAC,UAAU;CAAG;AAEvE,eAAO,MAAM,WAAW,yFAGvB,CAAC;AAIF,MAAM,WAAW,gBAAiB,SAAQ,cAAc,EAAE,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;CAAG;AAElG,eAAO,MAAM,WAAW,0FAGvB,CAAC;AAIF,MAAM,WAAW,sBAAuB,SAAQ,eAAe,CAAC,gBAAgB;CAAG;AAEnF,eAAO,MAAM,iBAAiB,2GAA8B,CAAC"}
@@ -2,7 +2,7 @@
2
2
  import { jsx } from 'react/jsx-runtime';
3
3
  import { Switch, useSwitchContext } from '@seed-design/react-switch';
4
4
  import { switchStyle } from '@seed-design/css/recipes/switch';
5
- import { switchMark } from '@seed-design/css/recipes/switch-mark';
5
+ import { switchmark } from '@seed-design/css/recipes/switchmark';
6
6
  import { createSlotRecipeContext } from '../../utils/createSlotRecipeContext.js';
7
7
  import { Primitive } from '@seed-design/react-primitive';
8
8
  import { createWithStateProps } from '../../utils/createWithStateProps.js';
@@ -15,20 +15,25 @@ const {
15
15
  withContext: withControlContext,
16
16
  PropsProvider: ControlPropsProvider,
17
17
  withProvider: withControlProvider
18
- } = createSlotRecipeContext(switchMark);
18
+ } = createSlotRecipeContext(switchmark);
19
19
  const withStateProps = createWithStateProps([useSwitchContext]);
20
20
  const SwitchRoot = React__default.forwardRef(
21
21
  ({ className, ...props }, ref) => {
22
- const [{ switch: switchVariantProps, switchMark: switchMarkVariantProps }, otherProps] = splitMultipleVariantsProps(
22
+ if (process.env.NODE_ENV !== "production" && (props.size === "small" || props.size === "medium")) {
23
+ console.warn(
24
+ `[SEED Design System] Switch size='${props.size}' is deprecated and will be removed in @seed-design/react@1.3.0. Use size='${props.size === "small" ? "16" : "32"}' instead.`
25
+ );
26
+ }
27
+ const [{ switch: switchVariantProps, switchmark: switchmarkVariantProps }, otherProps] = splitMultipleVariantsProps(
23
28
  {
24
29
  ...props,
25
30
  // TODO: replace this mapping completely
26
31
  size: props.size === "small" ? "16" : props.size === "medium" ? "32" : props.size
27
32
  },
28
- { switchMark, switch: switchStyle }
33
+ { switchmark, switch: switchStyle }
29
34
  );
30
35
  const classNames = switchStyle(switchVariantProps);
31
- return /* @__PURE__ */ jsx(ControlPropsProvider, { value: switchMarkVariantProps, children: /* @__PURE__ */ jsx(ClassNamesProvider, { value: classNames, children: /* @__PURE__ */ jsx(
36
+ return /* @__PURE__ */ jsx(ControlPropsProvider, { value: switchmarkVariantProps, children: /* @__PURE__ */ jsx(ClassNamesProvider, { value: classNames, children: /* @__PURE__ */ jsx(
32
37
  Switch.Root,
33
38
  {
34
39
  ref,
@@ -7,13 +7,13 @@ const jsxRuntime = require('react/jsx-runtime');
7
7
  const reactPrimitive = require('@seed-design/react-primitive');
8
8
  const tagGroup = require('@seed-design/css/recipes/tag-group');
9
9
  const tagGroupItem = require('@seed-design/css/recipes/tag-group-item');
10
- const createRecipeContext = require('../../utils/createRecipeContext.cjs');
11
10
  const React = require('react');
12
11
  const clsx = require('clsx');
13
12
  const splitMultipleVariantsProps = require('../../utils/splitMultipleVariantsProps.cjs');
14
- const domUtils = require('@seed-design/dom-utils');
13
+ const styled = require('../../utils/styled.cjs');
14
+ const createSlotRecipeContext = require('../../utils/createSlotRecipeContext.cjs');
15
15
 
16
- const { PropsProvider, useProps } = createRecipeContext.createRecipeContext(tagGroupItem.tagGroupItem);
16
+ const { PropsProvider, useProps, withContext, ClassNamesProvider } = createSlotRecipeContext.createSlotRecipeContext(tagGroupItem.tagGroupItem);
17
17
  const TagGroupRoot = React.forwardRef(
18
18
  ({ className, children, separator = " · ", ...props }, ref) => {
19
19
  const [{ tagGroup: tagGroupVariantProps, tagGroupItem: tagGroupItemVariantProps }, otherProps] = splitMultipleVariantsProps.splitMultipleVariantsProps(props, { tagGroup: tagGroup.tagGroup, tagGroupItem: tagGroupItem.tagGroupItem });
@@ -27,12 +27,28 @@ const TagGroupRoot = React.forwardRef(
27
27
  )) }) });
28
28
  }
29
29
  );
30
- const TagGroupItem = React.forwardRef((props, ref) => {
31
- const parentVariantProps = useProps();
32
- const [variantProps, { className, ...otherProps }] = tagGroupItem.tagGroupItem.splitVariantProps(props);
33
- const recipeClassName = tagGroupItem.tagGroupItem(domUtils.mergeProps(parentVariantProps, variantProps));
34
- return /* @__PURE__ */ jsxRuntime.jsx(reactPrimitive.Primitive.span, { ref, className: clsx(recipeClassName, className), ...otherProps });
35
- });
30
+ const TagGroupItem = React.forwardRef(
31
+ ({ className, ...props }, ref) => {
32
+ const parentVariantProps = useProps();
33
+ const [variantProps, otherProps] = tagGroupItem.tagGroupItem.splitVariantProps(props);
34
+ const classNames = tagGroupItem.tagGroupItem({ ...parentVariantProps, ...variantProps });
35
+ const { style, restProps } = styled.useStyleProps(otherProps);
36
+ return /* @__PURE__ */ jsxRuntime.jsx(ClassNamesProvider, { value: classNames, children: /* @__PURE__ */ jsxRuntime.jsx(
37
+ reactPrimitive.Primitive.span,
38
+ {
39
+ ref,
40
+ style,
41
+ className: clsx(classNames.root, className),
42
+ ...restProps
43
+ }
44
+ ) });
45
+ }
46
+ );
47
+ const TagGroupItemLabel = withContext(
48
+ reactPrimitive.Primitive.span,
49
+ "label"
50
+ );
36
51
 
37
52
  exports.TagGroupItem = TagGroupItem;
53
+ exports.TagGroupItemLabel = TagGroupItemLabel;
38
54
  exports.TagGroupRoot = TagGroupRoot;
@@ -1,12 +1,16 @@
1
1
  import { PrimitiveProps } from '@seed-design/react-primitive';
2
2
  import { TagGroupVariantProps } from '@seed-design/css/recipes/tag-group';
3
3
  import { TagGroupItemVariantProps } from '@seed-design/css/recipes/tag-group-item';
4
+ import { StyleProps } from '../../utils/styled';
4
5
  import { ForwardRefExoticComponent, RefAttributes } from 'react';
5
6
  export interface TagGroupRootProps extends TagGroupVariantProps, TagGroupItemVariantProps, PrimitiveProps, React.HTMLAttributes<HTMLSpanElement> {
6
7
  separator?: React.ReactNode;
7
8
  }
8
9
  export declare const TagGroupRoot: ForwardRefExoticComponent<TagGroupRootProps & RefAttributes<HTMLSpanElement>>;
9
- export interface TagGroupItemProps extends TagGroupItemVariantProps, PrimitiveProps, React.HTMLAttributes<HTMLSpanElement> {
10
+ export interface TagGroupItemProps extends TagGroupItemVariantProps, Pick<StyleProps, "flexShrink">, PrimitiveProps, React.HTMLAttributes<HTMLSpanElement> {
10
11
  }
11
12
  export declare const TagGroupItem: ForwardRefExoticComponent<TagGroupItemProps & RefAttributes<HTMLSpanElement>>;
13
+ export interface TagGroupItemLabelProps extends PrimitiveProps, React.HTMLAttributes<HTMLSpanElement> {
14
+ }
15
+ export declare const TagGroupItemLabel: ForwardRefExoticComponent<TagGroupItemLabelProps & RefAttributes<HTMLSpanElement>>;
12
16
  //# sourceMappingURL=TagGroup.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TagGroup.d.ts","sourceRoot":"","sources":["../../../src/components/TagGroup/TagGroup.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAY,KAAK,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AACzF,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,yCAAyC,CAAC;AASjD,MAAM,WAAW,iBACf,SAAQ,oBAAoB,EAC1B,wBAAwB,EACxB,cAAc,EACd,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;IACvC,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED,eAAO,MAAM,YAAY,+GA0BxB,CAAC;AAEF,MAAM,WAAW,iBACf,SAAQ,wBAAwB,EAC9B,cAAc,EACd,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;CAAG;AAE5C,eAAO,MAAM,YAAY,+GAOvB,CAAC"}
1
+ {"version":3,"file":"TagGroup.d.ts","sourceRoot":"","sources":["../../../src/components/TagGroup/TagGroup.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAY,KAAK,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AACzF,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,yCAAyC,CAAC;AAIjD,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAMpE,MAAM,WAAW,iBACf,SAAQ,oBAAoB,EAC1B,wBAAwB,EACxB,cAAc,EACd,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;IACvC,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED,eAAO,MAAM,YAAY,+GA0BxB,CAAC;AAEF,MAAM,WAAW,iBACf,SAAQ,wBAAwB,EAC9B,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC,EAC9B,cAAc,EACd,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;CAAG;AAE5C,eAAO,MAAM,YAAY,+GAoBxB,CAAC;AAEF,MAAM,WAAW,sBACf,SAAQ,cAAc,EACpB,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;CAAG;AAE5C,eAAO,MAAM,iBAAiB,oHAG7B,CAAC"}
@@ -3,13 +3,13 @@ import { jsx, jsxs } from 'react/jsx-runtime';
3
3
  import { Primitive } from '@seed-design/react-primitive';
4
4
  import { tagGroup } from '@seed-design/css/recipes/tag-group';
5
5
  import { tagGroupItem } from '@seed-design/css/recipes/tag-group-item';
6
- import { createRecipeContext } from '../../utils/createRecipeContext.js';
7
6
  import { forwardRef, Children, Fragment } from 'react';
8
7
  import clsx from 'clsx';
9
8
  import { splitMultipleVariantsProps } from '../../utils/splitMultipleVariantsProps.js';
10
- import { mergeProps } from '@seed-design/dom-utils';
9
+ import { useStyleProps } from '../../utils/styled.js';
10
+ import { createSlotRecipeContext } from '../../utils/createSlotRecipeContext.js';
11
11
 
12
- const { PropsProvider, useProps } = createRecipeContext(tagGroupItem);
12
+ const { PropsProvider, useProps, withContext, ClassNamesProvider } = createSlotRecipeContext(tagGroupItem);
13
13
  const TagGroupRoot = forwardRef(
14
14
  ({ className, children, separator = " · ", ...props }, ref) => {
15
15
  const [{ tagGroup: tagGroupVariantProps, tagGroupItem: tagGroupItemVariantProps }, otherProps] = splitMultipleVariantsProps(props, { tagGroup, tagGroupItem });
@@ -23,11 +23,26 @@ const TagGroupRoot = forwardRef(
23
23
  )) }) });
24
24
  }
25
25
  );
26
- const TagGroupItem = forwardRef((props, ref) => {
27
- const parentVariantProps = useProps();
28
- const [variantProps, { className, ...otherProps }] = tagGroupItem.splitVariantProps(props);
29
- const recipeClassName = tagGroupItem(mergeProps(parentVariantProps, variantProps));
30
- return /* @__PURE__ */ jsx(Primitive.span, { ref, className: clsx(recipeClassName, className), ...otherProps });
31
- });
26
+ const TagGroupItem = forwardRef(
27
+ ({ className, ...props }, ref) => {
28
+ const parentVariantProps = useProps();
29
+ const [variantProps, otherProps] = tagGroupItem.splitVariantProps(props);
30
+ const classNames = tagGroupItem({ ...parentVariantProps, ...variantProps });
31
+ const { style, restProps } = useStyleProps(otherProps);
32
+ return /* @__PURE__ */ jsx(ClassNamesProvider, { value: classNames, children: /* @__PURE__ */ jsx(
33
+ Primitive.span,
34
+ {
35
+ ref,
36
+ style,
37
+ className: clsx(classNames.root, className),
38
+ ...restProps
39
+ }
40
+ ) });
41
+ }
42
+ );
43
+ const TagGroupItemLabel = withContext(
44
+ Primitive.span,
45
+ "label"
46
+ );
32
47
 
33
- export { TagGroupItem, TagGroupRoot };
48
+ export { TagGroupItem, TagGroupItemLabel, TagGroupRoot };
@@ -7,4 +7,5 @@ const TagGroup = require('./TagGroup.cjs');
7
7
 
8
8
 
9
9
  exports.Item = TagGroup.TagGroupItem;
10
+ exports.ItemLabel = TagGroup.TagGroupItemLabel;
10
11
  exports.Root = TagGroup.TagGroupRoot;
@@ -1,2 +1,2 @@
1
- export { TagGroupRoot as Root, TagGroupItem as Item, type TagGroupRootProps as RootProps, type TagGroupItemProps as ItemProps, } from './TagGroup';
1
+ export { TagGroupRoot as Root, TagGroupItem as Item, TagGroupItemLabel as ItemLabel, type TagGroupRootProps as RootProps, type TagGroupItemProps as ItemProps, type TagGroupItemLabelProps as ItemLabelProps, } from './TagGroup';
2
2
  //# sourceMappingURL=TagGroup.namespace.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TagGroup.namespace.d.ts","sourceRoot":"","sources":["../../../src/components/TagGroup/TagGroup.namespace.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,IAAI,IAAI,EACpB,YAAY,IAAI,IAAI,EACpB,KAAK,iBAAiB,IAAI,SAAS,EACnC,KAAK,iBAAiB,IAAI,SAAS,GACpC,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"TagGroup.namespace.d.ts","sourceRoot":"","sources":["../../../src/components/TagGroup/TagGroup.namespace.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,IAAI,IAAI,EACpB,YAAY,IAAI,IAAI,EACpB,iBAAiB,IAAI,SAAS,EAC9B,KAAK,iBAAiB,IAAI,SAAS,EACnC,KAAK,iBAAiB,IAAI,SAAS,EACnC,KAAK,sBAAsB,IAAI,cAAc,GAC9C,MAAM,YAAY,CAAC"}
@@ -1 +1 @@
1
- export { TagGroupItem as Item, TagGroupRoot as Root } from './TagGroup.js';
1
+ export { TagGroupItem as Item, TagGroupItemLabel as ItemLabel, TagGroupRoot as Root } from './TagGroup.js';
@@ -8,5 +8,6 @@ const TagGroup_namespace = require('./TagGroup.namespace.cjs');
8
8
 
9
9
 
10
10
  exports.TagGroupItem = TagGroup.TagGroupItem;
11
+ exports.TagGroupItemLabel = TagGroup.TagGroupItemLabel;
11
12
  exports.TagGroupRoot = TagGroup.TagGroupRoot;
12
13
  exports.TagGroup = TagGroup_namespace;
@@ -1,3 +1,3 @@
1
- export { TagGroupRoot, TagGroupItem, type TagGroupRootProps, type TagGroupItemProps, } from './TagGroup';
1
+ export { TagGroupRoot, TagGroupItem, TagGroupItemLabel, type TagGroupRootProps, type TagGroupItemProps, type TagGroupItemLabelProps, } from './TagGroup';
2
2
  export * as TagGroup from './TagGroup.namespace';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TagGroup/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,GACvB,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,QAAQ,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TagGroup/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,GAC5B,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,QAAQ,MAAM,sBAAsB,CAAC"}
@@ -1,3 +1,3 @@
1
- export { TagGroupItem, TagGroupRoot } from './TagGroup.js';
1
+ export { TagGroupItem, TagGroupItemLabel, TagGroupRoot } from './TagGroup.js';
2
2
  import * as TagGroup_namespace from './TagGroup.namespace.js';
3
3
  export { TagGroup_namespace as TagGroup };