@commercetools/nimbus 0.0.0-canary-20251015173928 → 0.0.0-canary-20251015182814

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 (185) hide show
  1. package/dist/accordion.d.ts +26 -11
  2. package/dist/alert.d.ts +54 -28
  3. package/dist/avatar.d.ts +17 -19
  4. package/dist/badge.d.ts +16 -17
  5. package/dist/button.d.ts +23 -16
  6. package/dist/calendar.d.ts +0 -4
  7. package/dist/card.d.ts +18 -18
  8. package/dist/checkbox.d.ts +14 -9
  9. package/dist/chunks/accordion-B2FLWAh5.cjs.js.map +1 -1
  10. package/dist/chunks/accordion-CKDnNkVv.es.js.map +1 -1
  11. package/dist/chunks/alert-CPHjPe4-.cjs.js.map +1 -1
  12. package/dist/chunks/alert-lNg0Rz2w.es.js.map +1 -1
  13. package/dist/chunks/{avatar-BfEMp9g8.es.js → avatar-CTiSGVoD.es.js} +4 -2
  14. package/dist/chunks/avatar-CTiSGVoD.es.js.map +1 -0
  15. package/dist/chunks/avatar-_o-uSXYy.cjs.js.map +1 -1
  16. package/dist/chunks/{badge-JEfh4EDj.es.js → badge-Csn5glEd.es.js} +4 -2
  17. package/dist/chunks/badge-Csn5glEd.es.js.map +1 -0
  18. package/dist/chunks/badge-mMpNb3Qj.cjs.js.map +1 -1
  19. package/dist/chunks/button-B5OOW-2z.cjs.js.map +1 -1
  20. package/dist/chunks/button-IZUJaJku.es.js.map +1 -1
  21. package/dist/chunks/calendar-V0KeNCQ3.cjs.js.map +1 -1
  22. package/dist/chunks/calendar-lD6G93R9.es.js.map +1 -1
  23. package/dist/chunks/card-BB_1xrND.es.js.map +1 -1
  24. package/dist/chunks/card-BPEsGx1J.cjs.js.map +1 -1
  25. package/dist/chunks/{checkbox-DII0AOBy.es.js → checkbox-BB-WJdal.es.js} +2 -8
  26. package/dist/chunks/{checkbox-DII0AOBy.es.js.map → checkbox-BB-WJdal.es.js.map} +1 -1
  27. package/dist/chunks/checkbox-Dod-yTj4.cjs.js.map +1 -1
  28. package/dist/chunks/collapsible-motion-C7M_CLNI.cjs.js.map +1 -1
  29. package/dist/chunks/collapsible-motion-CSrKjF8X.es.js.map +1 -1
  30. package/dist/chunks/combobox-B5UxZWSX.cjs.js.map +1 -1
  31. package/dist/chunks/{combobox-CxEeal66.es.js → combobox-D_7gr3DY.es.js} +2 -2
  32. package/dist/chunks/{combobox-CxEeal66.es.js.map → combobox-D_7gr3DY.es.js.map} +1 -1
  33. package/dist/chunks/data-table-C51WU0Cc.cjs.js.map +1 -1
  34. package/dist/chunks/{data-table-BGCmY93Q.es.js → data-table-ClMivKY1.es.js} +5 -8
  35. package/dist/chunks/{data-table-BGCmY93Q.es.js.map → data-table-ClMivKY1.es.js.map} +1 -1
  36. package/dist/chunks/date-input-Cap8-3zj.es.js.map +1 -1
  37. package/dist/chunks/date-input-DvOM0DLT.cjs.js.map +1 -1
  38. package/dist/chunks/date-picker-CZAoPNsT.cjs.js.map +1 -1
  39. package/dist/chunks/date-picker-ChZ8H-MT.es.js.map +1 -1
  40. package/dist/chunks/date-range-picker-DGWMdcAN.es.js.map +1 -1
  41. package/dist/chunks/date-range-picker-iENzosfN.cjs.js.map +1 -1
  42. package/dist/chunks/{draggable-list-Dv372xXb.es.js → draggable-list-s43baxoM.es.js} +2 -2
  43. package/dist/chunks/{draggable-list-Dv372xXb.es.js.map → draggable-list-s43baxoM.es.js.map} +1 -1
  44. package/dist/chunks/{field-errors-CHxHaB5C.es.js → field-errors-ClQprmQz.es.js} +1 -6
  45. package/dist/chunks/field-errors-ClQprmQz.es.js.map +1 -0
  46. package/dist/chunks/field-errors-D2re_C_c.cjs.js.map +1 -1
  47. package/dist/chunks/group-BqUFlw5R.cjs.js.map +1 -1
  48. package/dist/chunks/group-CWADf2vF.es.js.map +1 -1
  49. package/dist/chunks/{icon-V6yr3oou.es.js → icon-CenxuChf.es.js} +2 -4
  50. package/dist/chunks/icon-CenxuChf.es.js.map +1 -0
  51. package/dist/chunks/icon-D39U--jA.cjs.js.map +1 -1
  52. package/dist/chunks/kbd-BaeV_DL-.cjs.js.map +1 -1
  53. package/dist/chunks/kbd-CH9rYghB.es.js.map +1 -1
  54. package/dist/chunks/link-BEhlSTUU.es.js.map +1 -1
  55. package/dist/chunks/link-DpU4rPCp.cjs.js.map +1 -1
  56. package/dist/chunks/loading-spinner-BiVTAfmp.es.js.map +1 -1
  57. package/dist/chunks/loading-spinner-DQM-6XnY.cjs.js.map +1 -1
  58. package/dist/chunks/{localized-field-D4R1lSbz.es.js → localized-field-D3G0Uy7Z.es.js} +6 -6
  59. package/dist/chunks/{localized-field-D4R1lSbz.es.js.map → localized-field-D3G0Uy7Z.es.js.map} +1 -1
  60. package/dist/chunks/{menu-BkPvV5Ey.es.js → menu-D-vE6ZpM.es.js} +3 -6
  61. package/dist/chunks/menu-D-vE6ZpM.es.js.map +1 -0
  62. package/dist/chunks/menu-DIepV2KZ.cjs.js.map +1 -1
  63. package/dist/chunks/{money-input-jPYw0Jyg.es.js → money-input-sk0Slpeu.es.js} +2 -2
  64. package/dist/chunks/{money-input-jPYw0Jyg.es.js.map → money-input-sk0Slpeu.es.js.map} +1 -1
  65. package/dist/chunks/multiline-text-input-B9TBDieZ.cjs.js.map +1 -1
  66. package/dist/chunks/multiline-text-input-CilSJJaO.es.js.map +1 -1
  67. package/dist/chunks/{password-input-Bf_SPzLj.es.js → password-input-6MO4I-2j.es.js} +2 -2
  68. package/dist/chunks/{password-input-Bf_SPzLj.es.js.map → password-input-6MO4I-2j.es.js.map} +1 -1
  69. package/dist/chunks/popover-CfEq5G5-.cjs.js.map +1 -1
  70. package/dist/chunks/{popover-DF0ppmkw.es.js → popover-DNaC7CwB.es.js} +2 -4
  71. package/dist/chunks/popover-DNaC7CwB.es.js.map +1 -0
  72. package/dist/chunks/progress-bar-Bhp7W6Eo.cjs.js.map +1 -1
  73. package/dist/chunks/progress-bar-DwuOjOcH.es.js.map +1 -1
  74. package/dist/chunks/range-calendar-DBpl6y5i.es.js.map +1 -1
  75. package/dist/chunks/range-calendar-_dZfAsdG.cjs.js.map +1 -1
  76. package/dist/chunks/{rich-text-input-D7DcSuhr.es.js → rich-text-input-BC8CBVio.es.js} +5 -5
  77. package/dist/chunks/rich-text-input-BC8CBVio.es.js.map +1 -0
  78. package/dist/chunks/rich-text-input-Da5WFZ3l.cjs.js.map +1 -1
  79. package/dist/chunks/search-input-BefkmgPy.cjs.js.map +1 -1
  80. package/dist/chunks/search-input-DJy2NHYW.es.js.map +1 -1
  81. package/dist/chunks/separator-CvRn_J0r.cjs.js.map +1 -1
  82. package/dist/chunks/{separator-B0qxXI4c.es.js → separator-DJGUFG-o.es.js} +2 -4
  83. package/dist/chunks/separator-DJGUFG-o.es.js.map +1 -0
  84. package/dist/chunks/split-button-BO52sL7h.cjs.js.map +1 -1
  85. package/dist/chunks/{split-button-yfUsgbxF.es.js → split-button-BxyZmuNi.es.js} +3 -3
  86. package/dist/chunks/split-button-BxyZmuNi.es.js.map +1 -0
  87. package/dist/chunks/{switch-Df_0twKu.es.js → switch-01hEhL9A.es.js} +2 -14
  88. package/dist/chunks/switch-01hEhL9A.es.js.map +1 -0
  89. package/dist/chunks/switch-CdLhBEPq.cjs.js.map +1 -1
  90. package/dist/chunks/tabs-CJ0OAUSR.cjs.js.map +1 -1
  91. package/dist/chunks/{tabs-BCLrKRoZ.es.js → tabs-Dhte-RCe.es.js} +2 -8
  92. package/dist/chunks/{tabs-BCLrKRoZ.es.js.map → tabs-Dhte-RCe.es.js.map} +1 -1
  93. package/dist/chunks/tag-group-Btt0egzG.cjs.js.map +1 -1
  94. package/dist/chunks/{tag-group-B-eOhltn.es.js → tag-group-D2dgXSsV.es.js} +3 -9
  95. package/dist/chunks/{tag-group-B-eOhltn.es.js.map → tag-group-D2dgXSsV.es.js.map} +1 -1
  96. package/dist/chunks/text-input-CSAODlCw.es.js.map +1 -1
  97. package/dist/chunks/text-input-DZdkCbdd.cjs.js.map +1 -1
  98. package/dist/chunks/time-input--a_qv-Jk.es.js.map +1 -1
  99. package/dist/chunks/time-input-zXykDANk.cjs.js.map +1 -1
  100. package/dist/chunks/toggle-button-DxMZsem4.cjs.js.map +1 -1
  101. package/dist/chunks/toggle-button-awb1jBf8.es.js.map +1 -1
  102. package/dist/chunks/toolbar-DV0l5MqA.cjs.js.map +1 -1
  103. package/dist/chunks/{toolbar-BDatiEYj.es.js → toolbar-Dduysqqi.es.js} +4 -2
  104. package/dist/chunks/toolbar-Dduysqqi.es.js.map +1 -0
  105. package/dist/chunks/tooltip-BPTOkK7W.cjs.js.map +1 -1
  106. package/dist/chunks/{tooltip-CHm25f4m.es.js → tooltip-sgakxhiy.es.js} +2 -4
  107. package/dist/chunks/{tooltip-CHm25f4m.es.js.map → tooltip-sgakxhiy.es.js.map} +1 -1
  108. package/dist/collapsible-motion.d.ts +55 -42
  109. package/dist/combobox.d.ts +45 -25
  110. package/dist/components/avatar.es.js +1 -1
  111. package/dist/components/badge.es.js +1 -1
  112. package/dist/components/checkbox.es.js +1 -1
  113. package/dist/components/combobox.es.js +1 -1
  114. package/dist/components/data-table.es.js +1 -1
  115. package/dist/components/draggable-list.es.js +1 -1
  116. package/dist/components/field-errors.es.js +1 -1
  117. package/dist/components/icon.es.js +1 -1
  118. package/dist/components/localized-field.es.js +1 -1
  119. package/dist/components/money-input.es.js +1 -1
  120. package/dist/components/password-input.es.js +1 -1
  121. package/dist/components/popover.es.js +1 -1
  122. package/dist/components/rich-text-input.es.js +1 -1
  123. package/dist/components/separator.es.js +1 -1
  124. package/dist/components/split-button.es.js +1 -1
  125. package/dist/components/switch.es.js +1 -1
  126. package/dist/components/tabs.es.js +1 -1
  127. package/dist/components/tag-group.es.js +1 -1
  128. package/dist/components/toolbar.es.js +1 -1
  129. package/dist/components/tooltip.es.js +1 -1
  130. package/dist/components.d.ts +31 -20
  131. package/dist/data-table.d.ts +4 -24
  132. package/dist/date-input.d.ts +10 -35
  133. package/dist/date-picker.d.ts +13 -66
  134. package/dist/date-range-picker.d.ts +10 -21
  135. package/dist/dialog.d.ts +31 -20
  136. package/dist/draggable-list.d.ts +35 -11
  137. package/dist/drawer.d.ts +45 -36
  138. package/dist/field-errors.d.ts +33 -25
  139. package/dist/form-field.d.ts +32 -12
  140. package/dist/group.d.ts +8 -12
  141. package/dist/icon-button.d.ts +29 -20
  142. package/dist/icon-toggle-button.d.ts +21 -16
  143. package/dist/icon.d.ts +0 -19
  144. package/dist/index.d.ts +31 -20
  145. package/dist/index.es.js +21 -21
  146. package/dist/inline-svg.d.ts +2 -21
  147. package/dist/link.d.ts +14 -24
  148. package/dist/loading-spinner.d.ts +13 -22
  149. package/dist/localized-field.d.ts +2 -5
  150. package/dist/money-input.d.ts +4 -0
  151. package/dist/multiline-text-input.d.ts +21 -7
  152. package/dist/nimbus-provider.d.ts +20 -8
  153. package/dist/number-input.d.ts +13 -2
  154. package/dist/pagination.d.ts +33 -9
  155. package/dist/password-input.d.ts +16 -10
  156. package/dist/popover.d.ts +3 -3
  157. package/dist/progress-bar.d.ts +21 -22
  158. package/dist/radio-input.d.ts +8 -3
  159. package/dist/range-calendar.d.ts +0 -7
  160. package/dist/scoped-search-input.d.ts +29 -92
  161. package/dist/search-input.d.ts +14 -10
  162. package/dist/select.d.ts +25 -9
  163. package/dist/separator.d.ts +10 -27
  164. package/dist/split-button.d.ts +23 -16
  165. package/dist/switch.d.ts +6 -11
  166. package/dist/tabs.d.ts +12 -13
  167. package/dist/tag-group.d.ts +4 -10
  168. package/dist/text-input.d.ts +19 -8
  169. package/dist/time-input.d.ts +8 -38
  170. package/dist/toggle-button-group.d.ts +9 -10
  171. package/dist/toggle-button.d.ts +15 -15
  172. package/dist/toolbar.d.ts +5 -11
  173. package/dist/tooltip.d.ts +23 -28
  174. package/package.json +5 -5
  175. package/dist/chunks/avatar-BfEMp9g8.es.js.map +0 -1
  176. package/dist/chunks/badge-JEfh4EDj.es.js.map +0 -1
  177. package/dist/chunks/field-errors-CHxHaB5C.es.js.map +0 -1
  178. package/dist/chunks/icon-V6yr3oou.es.js.map +0 -1
  179. package/dist/chunks/menu-BkPvV5Ey.es.js.map +0 -1
  180. package/dist/chunks/popover-DF0ppmkw.es.js.map +0 -1
  181. package/dist/chunks/rich-text-input-D7DcSuhr.es.js.map +0 -1
  182. package/dist/chunks/separator-B0qxXI4c.es.js.map +0 -1
  183. package/dist/chunks/split-button-yfUsgbxF.es.js.map +0 -1
  184. package/dist/chunks/switch-Df_0twKu.es.js.map +0 -1
  185. package/dist/chunks/toolbar-BDatiEYj.es.js.map +0 -1
@@ -5,18 +5,8 @@ import { TimeFieldProps } from 'react-aria-components';
5
5
  import { TimeValue } from 'react-aria';
6
6
  import { UnstyledProp } from '@chakra-ui/react';
7
7
 
8
- /**
9
- * Properties from TimeFieldProps that would conflict with similarly named
10
- * properties in TimeInputRootProps.
11
- *
12
- * Examples include: value, defaultValue, onChange, onBlur, onFocus, etc.
13
- */
14
8
  declare type ConflictingFieldStateProps = keyof TimeFieldProps<TimeValue>;
15
9
 
16
- /**
17
- * Additional properties we want to exclude from the TimeInput component.
18
- * These are either deprecated or not intended for use in this component.
19
- */
20
10
  declare type ExcludedProps = "validationState" | "label" | "description" | "errorMessage" | "css" | "colorScheme" | "unstyled" | "recipe" | "as" | "asChild";
21
11
 
22
12
  /**
@@ -29,45 +19,25 @@ export declare const TimeInput: {
29
19
  displayName: string;
30
20
  };
31
21
 
32
- export declare type TimeInputLeadingElementProps = HTMLChakraProps<"div", TimeInputRecipeProps>;
22
+ export declare type TimeInputLeadingElementSlotProps = HTMLChakraProps<"div", TimeInputRecipeProps>;
33
23
 
34
- /**
35
- * Main props type for the TimeInput component.
36
- *
37
- * We use Omit to remove:
38
- * 1. Conflicting props from TimeInputRootProps to avoid TypeScript errors
39
- * 2. Explicitly excluded props that we don't want users to access
40
- */
41
- export declare type TimeInputProps = Omit<TimeInputRootProps, ConflictingFieldStateProps | ExcludedProps> & Omit<TimeFieldProps<TimeValue>, ExcludedProps> & {
42
- /**
43
- * Optional element to display at the start of the input
44
- * Will respect text direction (left in LTR, right in RTL)
45
- */
24
+ export declare type TimeInputProps = Omit<TimeInputRootSlotProps, ConflictingFieldStateProps | ExcludedProps> & Omit<TimeFieldProps<TimeValue>, ExcludedProps> & {
25
+ /** Optional element to display at the start of the input */
46
26
  leadingElement?: React.ReactNode;
47
- /**
48
- * Optional element to display at the end of the input
49
- * Will respect text direction (right in LTR, left in RTL)
50
- */
27
+ /** Optional element to display at the end of the input */
51
28
  trailingElement?: React.ReactNode;
52
29
  };
53
30
 
54
- /**
55
- * Base recipe props type that combines Chakra UI's recipe props
56
- * with the unstyled prop option for the div element.
57
- */
58
31
  declare type TimeInputRecipeProps = {
32
+ /** Size variant of the time input */
59
33
  size?: SlotRecipeProps<"timeInput">["size"];
34
+ /** Visual style variant of the time input */
60
35
  variant?: SlotRecipeProps<"timeInput">["variant"];
61
36
  } & UnstyledProp;
62
37
 
63
- /**
64
- * Root props type that extends Chakra's HTML props with our recipe props.
65
- * This creates a complete set of props for the root element, combining
66
- * HTML attributes, Chakra's styling system, and our custom recipe props.
67
- */
68
- export declare type TimeInputRootProps = HTMLChakraProps<"div", TimeInputRecipeProps>;
38
+ export declare type TimeInputRootSlotProps = HTMLChakraProps<"div", TimeInputRecipeProps>;
69
39
 
70
- export declare type TimeInputTrailingElementProps = HTMLChakraProps<"div", TimeInputRecipeProps>;
40
+ export declare type TimeInputTrailingElementSlotProps = HTMLChakraProps<"div", TimeInputRecipeProps>;
71
41
 
72
42
  export { }
73
43
 
@@ -19,19 +19,18 @@ export declare const ToggleButtonGroup: {
19
19
 
20
20
  export declare const _ToggleButtonGroupButton: ToggleButtonGroupButtonComponent;
21
21
 
22
- /** Type signature for the `ToggleButtonGroup.Button` sub-component. */
22
+ /**
23
+ * Type signature for the ToggleButtonGroup.Button sub-component.
24
+ */
23
25
  export declare type ToggleButtonGroupButtonComponent = React.FC<ToggleButtonGroupButtonProps>;
24
26
 
25
- /** Combined props for the button element (Chakra styles + Aria behavior). */
26
27
  export declare type ToggleButtonGroupButtonProps = ToggleButtonGroupButtonSlotProps & AriaToggleButtonProps & {
27
28
  ref?: React.Ref<typeof ToggleButton>;
28
29
  };
29
30
 
30
- /** Base Chakra styling props for the `button` slot. */
31
31
  declare type ToggleButtonGroupButtonSlotProps = HTMLChakraProps<"button", RecipeProps<"button">>;
32
32
 
33
- /** Final external props for the `<ToggleButtonGroup>` component, including `children`. */
34
- export declare type ToggleButtonGroupProps = ToggleButtonGroupRecipeVariantProps & Omit<ToggleButtonGroupRootProps, "size" | "tone"> & {
33
+ export declare type ToggleButtonGroupProps = ToggleButtonGroupRecipeVariantProps & Omit<ToggleButtonGroupRootCombinedProps, "size" | "tone"> & {
35
34
  ref?: React.Ref<typeof ToggleButtonGroup_2>;
36
35
  };
37
36
 
@@ -56,13 +55,13 @@ declare type ToggleButtonGroupRecipeVariantProps = {
56
55
  */
57
56
  export declare const _ToggleButtonGroupRoot: ToggleButtonGroupRootComponent;
58
57
 
59
- /** Type signature for the main `ToggleButtonGroup` component. */
60
- export declare type ToggleButtonGroupRootComponent = React.FC<ToggleButtonGroupProps>;
58
+ declare type ToggleButtonGroupRootCombinedProps = ToggleButtonGroupRootSlotProps & AriaToggleButtonGroupProps;
61
59
 
62
- /** Combined props for the root element (Chakra styles + Aria behavior + Recipe variants). */
63
- declare type ToggleButtonGroupRootProps = ToggleButtonGroupRootSlotProps & AriaToggleButtonGroupProps;
60
+ /**
61
+ * Type signature for the main ToggleButtonGroup component.
62
+ */
63
+ export declare type ToggleButtonGroupRootComponent = React.FC<ToggleButtonGroupProps>;
64
64
 
65
- /** Base Chakra styling props for the root `div` slot. */
66
65
  declare type ToggleButtonGroupRootSlotProps = HTMLChakraProps<"div", RecipeProps<"div">>;
67
66
 
68
67
  export { }
@@ -3,10 +3,6 @@ import { JSX } from 'react/jsx-runtime';
3
3
  import { RecipeProps } from '@chakra-ui/react';
4
4
  import { ToggleButtonProps as ToggleButtonProps_2 } from 'react-aria-components';
5
5
 
6
- /**
7
- * Additional properties we want to exclude from the ToggleButton component.
8
- * These are chakra-ui props we don't want exposed for non-polymorphic components.
9
- */
10
6
  declare type ExcludedProps = "css" | "colorScheme" | "recipe" | "as" | "asChild";
11
7
 
12
8
  /**
@@ -22,28 +18,32 @@ export declare const ToggleButton: {
22
18
  displayName: string;
23
19
  };
24
20
 
25
- export declare type ToggleButtonProps = Omit<ToggleButtonRootProps, keyof ToggleButtonProps_2 | ExcludedProps> & ToggleButtonProps_2 & {
21
+ export declare type ToggleButtonProps = Omit<ToggleButtonRootSlotProps, keyof ToggleButtonProps_2 | ExcludedProps> & ToggleButtonProps_2 & {
26
22
  /**
27
- * Ref to the underlying button element
23
+ * Ref forwarding to the button element
28
24
  */
29
25
  ref?: React.Ref<HTMLButtonElement>;
30
26
  };
31
27
 
32
- /**
33
- * Base recipe props interface.
34
- */
35
28
  declare type ToggleButtonRecipeProps = {
29
+ /**
30
+ * Size variant of the toggle button
31
+ * @default "md"
32
+ */
36
33
  size?: RecipeProps<"toggleButton">["size"];
34
+ /**
35
+ * Visual style variant of the toggle button
36
+ * @default "outline"
37
+ */
37
38
  variant?: RecipeProps<"toggleButton">["variant"];
39
+ /**
40
+ * Color tone palette for the toggle button
41
+ * @default "primary"
42
+ */
38
43
  tone?: RecipeProps<"toggleButton">["tone"];
39
44
  };
40
45
 
41
- /**
42
- * Root props interface that extends Chakra's HTML props with our recipe props.
43
- * This creates a complete set of props for the root element, combining
44
- * HTML attributes, Chakra's styling system, and our custom recipe props.
45
- */
46
- declare type ToggleButtonRootProps = HTMLChakraProps<"button", ToggleButtonRecipeProps>;
46
+ declare type ToggleButtonRootSlotProps = HTMLChakraProps<"button", ToggleButtonRecipeProps>;
47
47
 
48
48
  export { }
49
49
 
package/dist/toolbar.d.ts CHANGED
@@ -11,26 +11,20 @@ export declare const Toolbar: ToolbarComponent;
11
11
 
12
12
  export declare type ToolbarComponent = FC<ToolbarProps>;
13
13
 
14
- export declare type ToolbarProps = Omit<ToolbarSlotProps, DefaultExcludedProps | "children" | "slot"> & Omit<ToolbarProps_2, "orientation" | "className" | "style"> & {
14
+ export declare type ToolbarProps = Omit<ToolbarRootSlotProps, DefaultExcludedProps | "children" | "slot"> & Omit<ToolbarProps_2, "orientation" | "className" | "style"> & {
15
15
  ref?: Ref<HTMLDivElement>;
16
16
  };
17
17
 
18
- /**
19
- * Base recipe props type that combines Chakra UI's recipe props
20
- * with the unstyled prop option for the toolbar recipe.
21
- */
22
18
  declare type ToolbarRecipeProps = {
19
+ /** Size variant of the toolbar */
23
20
  size?: RecipeProps<"toolbar">["size"];
21
+ /** Layout orientation of the toolbar */
24
22
  orientation?: RecipeProps<"toolbar">["orientation"];
23
+ /** Visual style variant of the toolbar */
25
24
  variant?: RecipeProps<"toolbar">["variant"];
26
25
  } & UnstyledProp;
27
26
 
28
- /**
29
- * Root props type that extends Chakra's HTML props with our recipe props.
30
- * This creates a complete set of props for the root element, combining
31
- * HTML attributes, Chakra's styling system, and our custom recipe props.
32
- */
33
- export declare type ToolbarSlotProps = Omit<HTMLChakraProps<"div", ToolbarRecipeProps>, "translate"> & {
27
+ export declare type ToolbarRootSlotProps = Omit<HTMLChakraProps<"div", ToolbarRecipeProps>, "translate"> & {
34
28
  translate?: "yes" | "no";
35
29
  };
36
30
 
package/dist/tooltip.d.ts CHANGED
@@ -10,16 +10,32 @@ import { TooltipTriggerComponentProps } from 'react-aria-components';
10
10
  import { UnstyledProp } from '@chakra-ui/react';
11
11
 
12
12
  /**
13
- * For use in components that use the polymorphic `as` and `asChild` props
13
+ * Utility type helpers for Nimbus components
14
+ */
15
+ /**
16
+ * Excludes polymorphic props (`as` and `asChild`) from a type.
17
+ *
18
+ * **Use case:** For components that use the polymorphic `as` and `asChild` props
14
19
  * internally, but do not make them available to the consumer.
15
20
  *
16
- * Long rambling background:
21
+ * **Background:**
17
22
  * React-Aria's components cannot be configured to use `as` and `asChild` internally,
18
- * and cannot be directly styled by chakra's styledSystem. Therefore components
19
- * from `react-aria-components` should be wrapped in a chakra `withContext`
23
+ * and cannot be directly styled by Chakra's styledSystem. Therefore components
24
+ * from `react-aria-components` should be wrapped in a Chakra `withContext`
20
25
  * root component to set the styles onto the `r-a-c` component using `asChild`.
21
26
  * This means that we need to allow polymorphism internally, but should not
22
- * allow it in the external props api since it would not work.
27
+ * allow it in the external props API since it would not work.
28
+ *
29
+ * @template T - The type to exclude polymorphic props from
30
+ *
31
+ * @example
32
+ * ```typescript
33
+ * export type AccordionItemProps = ExcludePolymorphicFromProps<
34
+ * RaDisclosureProps & HTMLChakraProps<"div">
35
+ * > & {
36
+ * children: ReactNode;
37
+ * };
38
+ * ```
23
39
  */
24
40
  declare type ExcludePolymorphicFromProps<T> = Omit<T, "as" | "asChild">;
25
41
 
@@ -82,16 +98,8 @@ export declare namespace _TooltipContent {
82
98
  var displayName: string;
83
99
  }
84
100
 
85
- /**
86
- * Main props type for the Tooltip components
87
- * Extends TooltipVariantProps to include root props, variant props,
88
- * and react-aria props, while adding support for React children.
89
- */
90
101
  export declare type TooltipProps = PropsWithChildren<TooltipVariantProps>;
91
102
 
92
- /**
93
- * Base recipe props type that combines Chakra UI's recipe props
94
- */
95
103
  declare type TooltipRecipeProps = RecipeProps<"tooltip"> & UnstyledProp;
96
104
 
97
105
  /**
@@ -107,22 +115,9 @@ export declare namespace _TooltipRoot {
107
115
  var displayName: string;
108
116
  }
109
117
 
110
- /**
111
- * Root props type that extends Chakra's HTML props with our recipe props.
112
- * This creates a complete set of props for the root element, combining
113
- * HTML attributes, Chakra's styling system, and our custom recipe props.
114
- */
115
- export declare type TooltipRootProps = HTMLChakraProps<"div", TooltipRecipeProps>;
118
+ export declare type TooltipRootSlotProps = HTMLChakraProps<"div", TooltipRecipeProps>;
116
119
 
117
- /**
118
- * Combines the root props with Chakra UI's recipe variant props, and
119
- * react-aria-component's TooltipProps
120
- * This allows the component to accept:
121
- * - structural props from Root
122
- * - styling variants from the recipe
123
- * - a11y/state related props from react-aria-components Tooltip
124
- */
125
- declare type TooltipVariantProps = ExcludePolymorphicFromProps<TooltipRootProps & TooltipProps_2>;
120
+ declare type TooltipVariantProps = ExcludePolymorphicFromProps<TooltipRootSlotProps & TooltipProps_2>;
126
121
 
127
122
  export { }
128
123
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools/nimbus",
3
- "version": "0.0.0-canary-20251015173928",
3
+ "version": "0.0.0-canary-20251015182814",
4
4
  "main": "./dist/index.cjs",
5
5
  "module": "./dist/index.js",
6
6
  "type": "module",
@@ -94,15 +94,15 @@
94
94
  "vite-plugin-dts": "^4.5.4",
95
95
  "vite-tsconfig-paths": "^5.1.4",
96
96
  "vitest": "^3.2.4",
97
- "@commercetools/nimbus-icons": "^0.0.0-canary-20251015173928",
98
- "@commercetools/nimbus-tokens": "^0.0.0-canary-20251015173928"
97
+ "@commercetools/nimbus-icons": "^0.0.0-canary-20251015182814",
98
+ "@commercetools/nimbus-tokens": "^0.0.0-canary-20251015182814"
99
99
  },
100
100
  "peerDependencies": {
101
101
  "@chakra-ui/react": "^3.27.1",
102
102
  "react": "19.x",
103
103
  "react-intl": "7.x",
104
- "@commercetools/nimbus-icons": "^0.0.0-canary-20251015173928",
105
- "@commercetools/nimbus-tokens": "^0.0.0-canary-20251015173928"
104
+ "@commercetools/nimbus-icons": "^0.0.0-canary-20251015182814",
105
+ "@commercetools/nimbus-tokens": "^0.0.0-canary-20251015182814"
106
106
  },
107
107
  "scripts": {
108
108
  "build": "pnpm run build-theme-typings && pnpm run build:lib",
@@ -1 +0,0 @@
1
- {"version":3,"file":"avatar-BfEMp9g8.es.js","sources":["../../src/components/avatar/avatar.slots.tsx","../../src/components/avatar/avatar.tsx"],"sourcesContent":["import { createRecipeContext } from \"@chakra-ui/react\";\nimport { avatarRecipe } from \"./avatar.recipe\";\nimport type { AvatarRootProps } from \"./avatar.types\";\n\nconst { withContext } = createRecipeContext({ recipe: avatarRecipe });\n\nexport const AvatarRoot = withContext<HTMLElement, AvatarRootProps>(\"figure\");\n","import { useState } from \"react\";\nimport { Image } from \"@chakra-ui/react/image\";\nimport { type AvatarProps } from \"./avatar.types\";\nimport { AvatarRoot } from \"./avatar.slots.tsx\";\n\nfunction getInitials(firstName: string, lastName: string) {\n return (\n firstName.split(\"\")[0].toUpperCase() + lastName.split(\"\")[0].toUpperCase()\n );\n}\n\nexport const Avatar = (props: AvatarProps) => {\n const { ref, firstName, lastName, src, alt, ...rest } = props;\n const [imageLoaded, setImageLoaded] = useState(false);\n const [imageError, setImageError] = useState(false);\n\n const fullName = `${firstName} ${lastName}`;\n\n const sharedProps = {\n \"aria-label\": `${fullName} avatar`,\n ref,\n ...rest,\n };\n\n const onLoad = () => {\n setImageLoaded(true);\n setImageError(false);\n };\n\n const onError = () => {\n setImageLoaded(false);\n setImageError(true);\n };\n\n // Show initials if no src provided, image hasn't loaded yet, or image failed\n const shouldShowInitials = !src || !imageLoaded || imageError;\n\n return (\n <AvatarRoot {...sharedProps}>\n {shouldShowInitials ? getInitials(firstName, lastName) : null}\n\n {src && (\n <Image\n src={src}\n alt={alt || fullName}\n onLoad={onLoad}\n onError={onError}\n display={imageLoaded && !imageError ? \"block\" : \"none\"}\n />\n )}\n </AvatarRoot>\n );\n};\n\nAvatar.displayName = \"Avatar\";\n"],"names":["withContext","createRecipeContext","avatarRecipe","AvatarRoot","getInitials","firstName","lastName","Avatar","props","ref","src","alt","rest","imageLoaded","setImageLoaded","useState","imageError","setImageError","fullName","sharedProps","onLoad","onError","jsxs","jsx","Image"],"mappings":";;;;;AAIA,MAAM,EAAE,aAAAA,EAAA,IAAgB,gBAAAC,EAAoB,EAAE,QAAQC,GAAc,GAEvDC,IAAa,gBAAAH,EAA0C,QAAQ;ACD5E,SAASI,EAAYC,GAAmBC,GAAkB;AACxD,SACED,EAAU,MAAM,EAAE,EAAE,CAAC,EAAE,gBAAgBC,EAAS,MAAM,EAAE,EAAE,CAAC,EAAE,YAAA;AAEjE;AAEO,MAAMC,IAAS,CAACC,MAAuB;AAC5C,QAAM,EAAE,KAAAC,GAAK,WAAAJ,GAAW,UAAAC,GAAU,KAAAI,GAAK,KAAAC,GAAK,GAAGC,MAASJ,GAClD,CAACK,GAAaC,CAAc,IAAIC,EAAS,EAAK,GAC9C,CAACC,GAAYC,CAAa,IAAIF,EAAS,EAAK,GAE5CG,IAAW,GAAGb,CAAS,IAAIC,CAAQ,IAEnCa,IAAc;AAAA,IAClB,cAAc,GAAGD,CAAQ;AAAA,IACzB,KAAAT;AAAA,IACA,GAAGG;AAAA,EAAA,GAGCQ,IAAS,MAAM;AACnB,IAAAN,EAAe,EAAI,GACnBG,EAAc,EAAK;AAAA,EACrB,GAEMI,IAAU,MAAM;AACpB,IAAAP,EAAe,EAAK,GACpBG,EAAc,EAAI;AAAA,EACpB;AAKA,SACE,gBAAAK,EAACnB,GAAA,EAAY,GAAGgB,GACb,UAAA;AAAA,IAJsB,CAACT,KAAO,CAACG,KAAeG,IAIzBZ,EAAYC,GAAWC,CAAQ,IAAI;AAAA,IAExDI,KACC,gBAAAa;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,KAAAd;AAAA,QACA,KAAKC,KAAOO;AAAA,QACZ,QAAAE;AAAA,QACA,SAAAC;AAAA,QACA,SAASR,KAAe,CAACG,IAAa,UAAU;AAAA,MAAA;AAAA,IAAA;AAAA,EAClD,GAEJ;AAEJ;AAEAT,EAAO,cAAc;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"badge-JEfh4EDj.es.js","sources":["../../src/components/badge/badge.slots.tsx","../../src/components/badge/badge.tsx"],"sourcesContent":["import { createRecipeContext } from \"@chakra-ui/react\";\nimport { badgeRecipe } from \"./badge.recipe\";\nimport type { BadgeRootProps } from \"./badge.types\";\n\nconst { withContext } = createRecipeContext({ recipe: badgeRecipe });\n\nexport const BadgeRoot = withContext<HTMLSpanElement, BadgeRootProps>(\"span\");\n","import { useRef } from \"react\";\nimport { BadgeRoot } from \"./badge.slots\";\nimport type { BadgeProps } from \"./badge.types\";\nimport { mergeRefs } from \"@chakra-ui/react\";\nimport { useObjectRef, mergeProps } from \"react-aria\";\n/**\n * # Badge\n *\n * Briefly highlights or categorizes associated UI elements with concise visual cues for status or metadata.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/data-display/badge}\n */\n\nexport const Badge = (props: BadgeProps) => {\n const { ref: forwardedRef, as, children, ...rest } = props;\n\n const localRef = useRef<HTMLSpanElement>(null);\n const ref = useObjectRef(mergeRefs(localRef, forwardedRef));\n\n const elementType = as || \"span\";\n\n return (\n <BadgeRoot as={elementType} {...mergeProps(rest, { ref })}>\n {children}\n </BadgeRoot>\n );\n};\n\nBadge.displayName = \"Badge\";\n"],"names":["withContext","createRecipeContext","badgeRecipe","BadgeRoot","Badge","props","forwardedRef","as","children","rest","localRef","useRef","ref","useObjectRef","mergeRefs","jsx","mergeProps"],"mappings":";;;;;;AAIA,MAAM,EAAE,aAAAA,EAAA,IAAgB,gBAAAC,EAAoB,EAAE,QAAQC,GAAa,GAEtDC,IAAY,gBAAAH,EAA6C,MAAM,GCO/DI,IAAQ,CAACC,MAAsB;AAC1C,QAAM,EAAE,KAAKC,GAAc,IAAAC,GAAI,UAAAC,GAAU,GAAGC,MAASJ,GAE/CK,IAAWC,EAAwB,IAAI,GACvCC,IAAMC,EAAaC,EAAUJ,GAAUJ,CAAY,CAAC;AAI1D,SACE,gBAAAS,EAACZ,GAAA,EAAU,IAHOI,KAAM,QAGK,GAAGS,EAAWP,GAAM,EAAE,KAAAG,GAAK,GACrD,UAAAJ,EAAA,CACH;AAEJ;AAEAJ,EAAM,cAAc;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"field-errors-CHxHaB5C.es.js","sources":["../../src/components/field-errors/field-errors.slots.tsx","../../src/components/field-errors/field-errors.i18n.ts","../../src/components/field-errors/field-errors.types.ts","../../src/components/field-errors/field-errors.tsx"],"sourcesContent":["import { createSlotRecipeContext } from \"@chakra-ui/react\";\nimport type {\n FieldErrorsMessageProps,\n FieldErrorsRootProps,\n} from \"./field-errors.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"fieldErrors\",\n});\n\nexport const FieldErrorsRoot = withProvider<\n HTMLDivElement,\n FieldErrorsRootProps\n>(\"div\", \"root\");\n\nexport const FieldErrorsMessage = withContext<\n HTMLDivElement,\n FieldErrorsMessageProps\n>(\"div\", \"message\");\n","import { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n // Basic validation\n missingRequiredField: {\n id: \"Nimbus.FieldErrors.missingRequiredField\",\n description: \"Error message for missing required value\",\n defaultMessage: \"This field is required. Provide a value.\",\n },\n invalidValue: {\n id: \"Nimbus.FieldErrors.invalidValue\",\n description: \"Error message for invalid value or format\",\n defaultMessage: \"The provided value is invalid.\",\n },\n emptyValue: {\n id: \"Nimbus.FieldErrors.emptyValue\",\n description: \"Error message for empty value when content is required\",\n defaultMessage: \"This field cannot be empty.\",\n },\n\n // Length validation\n valueTooShort: {\n id: \"Nimbus.FieldErrors.valueTooShort\",\n description: \"Error message for minimum length validation\",\n defaultMessage: \"This value is too short.\",\n },\n valueTooLong: {\n id: \"Nimbus.FieldErrors.valueTooLong\",\n description: \"Error message for maximum length validation\",\n defaultMessage: \"This value is too long.\",\n },\n\n // Format validation\n invalidFormat: {\n id: \"Nimbus.FieldErrors.invalidFormat\",\n description: \"Error message for format validation\",\n defaultMessage: \"Please enter a valid format.\",\n },\n duplicateValue: {\n id: \"Nimbus.FieldErrors.duplicateValue\",\n description: \"Error message for duplicate value validation\",\n defaultMessage: \"This value is already in use. It must be unique.\",\n },\n\n // Numeric validation\n invalidNegativeNumber: {\n id: \"Nimbus.FieldErrors.invalidNegativeNumber\",\n description: \"Error message when negative number is used\",\n defaultMessage: \"Negative number is not supported.\",\n },\n invalidFractionalNumber: {\n id: \"Nimbus.FieldErrors.invalidFractionalNumber\",\n description: \"Error message when fractional number is used\",\n defaultMessage: \"A whole number is required.\",\n },\n valueBelowMinimum: {\n id: \"Nimbus.FieldErrors.valueBelowMinimum\",\n description: \"Error message for values below minimum threshold\",\n defaultMessage: \"Value must be greater than or equal to the minimum.\",\n },\n valueAboveMaximum: {\n id: \"Nimbus.FieldErrors.valueAboveMaximum\",\n description: \"Error message for values above maximum threshold\",\n defaultMessage: \"Value must be less than or equal to the maximum.\",\n },\n valueOutOfRange: {\n id: \"Nimbus.FieldErrors.valueOutOfRange\",\n description: \"Error message for values outside acceptable range\",\n defaultMessage: \"Value must be within the acceptable range.\",\n },\n\n // Server/async validation\n invalidFromServer: {\n id: \"Nimbus.FieldErrors.invalidFromServer\",\n description: \"Error message for server-side validation errors\",\n defaultMessage: \"Server validation failed. Please check your input.\",\n },\n resourceNotFound: {\n id: \"Nimbus.FieldErrors.resourceNotFound\",\n description: \"Error message when a resource is not found\",\n defaultMessage: \"The requested resource was not found.\",\n },\n valueBlocked: {\n id: \"Nimbus.FieldErrors.valueBlocked\",\n description: \"Error message for blocked or restricted values\",\n defaultMessage: \"This value is not allowed.\",\n },\n});\n","import type { ReactNode } from \"react\";\nimport type { HTMLChakraProps } from \"@chakra-ui/react\";\n\nexport type FieldErrorsMessageProps = HTMLChakraProps<\"div\">;\n\n/**\n * Error object type - compatible with UI-Kit FieldErrors\n * Only entries with truthy values will be rendered as errors\n */\nexport type TFieldErrors = Record<string, boolean>;\n\n/**\n * Function to render custom error messages\n */\nexport type TErrorRenderer = (key: string, error?: boolean) => ReactNode;\n\nexport type FieldErrorsRootProps = HTMLChakraProps<\"div\"> & {\n id?: string;\n role?: string;\n children?: ReactNode;\n};\n\n/**\n * Props for FieldErrors component\n */\nexport type FieldErrorsProps = FieldErrorsRootProps & {\n /**\n * ID of the error field for accessibility\n */\n id?: string;\n\n /**\n * Error object - only truthy values will be rendered\n * Compatible with UI-Kit FieldErrors format\n */\n errors?: TFieldErrors;\n\n /**\n * Whether error messages should be visible\n * @deprecated This prop will be automatically handled by the component\n */\n isVisible?: boolean;\n\n /**\n * Custom error renderer function\n * Return null to fall back to renderDefaultError or built-in errors\n */\n renderError?: TErrorRenderer;\n\n /**\n * Default error renderer function for errors not handled by renderError\n * Return null to fall back to built-in error handling\n */\n renderDefaultError?: TErrorRenderer;\n\n /**\n * Custom error messages to override built-in ones\n */\n customMessages?: {\n // Basic validation\n missing?: ReactNode;\n invalid?: ReactNode;\n empty?: ReactNode;\n\n // Length validation\n min?: ReactNode;\n max?: ReactNode;\n\n // Format validation\n format?: ReactNode;\n duplicate?: ReactNode;\n\n // Numeric validation\n negative?: ReactNode;\n fractions?: ReactNode;\n belowMin?: ReactNode;\n aboveMax?: ReactNode;\n outOfRange?: ReactNode;\n\n // Server/async validation\n invalidFromServer?: ReactNode;\n notFound?: ReactNode;\n blocked?: ReactNode;\n };\n};\n\n/**\n * Built-in error types that FieldErrors can handle automatically\n */\nexport const FieldErrorTypes = {\n // Basic validation\n MISSING: \"missing\",\n INVALID: \"invalid\",\n EMPTY: \"empty\",\n\n // Length validation\n MIN_LENGTH: \"min\",\n MAX_LENGTH: \"max\",\n\n // Format validation\n FORMAT: \"format\",\n DUPLICATE: \"duplicate\",\n\n // Numeric validation\n NEGATIVE: \"negative\",\n FRACTIONS: \"fractions\",\n BELOW_MIN: \"belowMin\",\n ABOVE_MAX: \"aboveMax\",\n OUT_OF_RANGE: \"outOfRange\",\n\n // Server/async validation\n INVALID_FROM_SERVER: \"invalidFromServer\",\n NOT_FOUND: \"notFound\",\n BLOCKED: \"blocked\",\n} as const;\n\nexport type TFieldErrorTypes =\n (typeof FieldErrorTypes)[keyof typeof FieldErrorTypes];\n","import { FormattedMessage } from \"react-intl\";\nimport { FieldErrorsRoot, FieldErrorsMessage } from \"./field-errors.slots\";\nimport { messages } from \"./field-errors.i18n\";\nimport type { FieldErrorsProps } from \"./field-errors.types\";\nimport { FieldErrorTypes } from \"./field-errors.types\";\n\nconst isObject = (obj: unknown): boolean => typeof obj === \"object\";\n\n/**\n * Get custom message for a given error key\n */\nconst getCustomMessage = (\n key: string,\n customMessages?: FieldErrorsProps[\"customMessages\"]\n): React.ReactNode => {\n if (!customMessages) return null;\n\n // Map error keys to custom messages\n switch (key) {\n case FieldErrorTypes.MISSING:\n return customMessages.missing || null;\n case FieldErrorTypes.INVALID:\n return customMessages.invalid || null;\n case FieldErrorTypes.EMPTY:\n return customMessages.empty || null;\n case FieldErrorTypes.MIN_LENGTH:\n return customMessages.min || null;\n case FieldErrorTypes.MAX_LENGTH:\n return customMessages.max || null;\n case FieldErrorTypes.FORMAT:\n return customMessages.format || null;\n case FieldErrorTypes.DUPLICATE:\n return customMessages.duplicate || null;\n case FieldErrorTypes.NEGATIVE:\n return customMessages.negative || null;\n case FieldErrorTypes.FRACTIONS:\n return customMessages.fractions || null;\n case FieldErrorTypes.BELOW_MIN:\n return customMessages.belowMin || null;\n case FieldErrorTypes.ABOVE_MAX:\n return customMessages.aboveMax || null;\n case FieldErrorTypes.OUT_OF_RANGE:\n return customMessages.outOfRange || null;\n case FieldErrorTypes.INVALID_FROM_SERVER:\n return customMessages.invalidFromServer || null;\n case FieldErrorTypes.NOT_FOUND:\n return customMessages.notFound || null;\n case FieldErrorTypes.BLOCKED:\n return customMessages.blocked || null;\n default:\n return null;\n }\n};\n\n/**\n * Get built-in localized message for a given error key\n */\nconst getBuiltInMessage = (key: string): React.ReactNode => {\n switch (key) {\n // Basic validation\n case FieldErrorTypes.MISSING:\n return <FormattedMessage {...messages.missingRequiredField} />;\n case FieldErrorTypes.INVALID:\n return <FormattedMessage {...messages.invalidValue} />;\n case FieldErrorTypes.EMPTY:\n return <FormattedMessage {...messages.emptyValue} />;\n\n // Length validation\n case FieldErrorTypes.MIN_LENGTH:\n return <FormattedMessage {...messages.valueTooShort} />;\n case FieldErrorTypes.MAX_LENGTH:\n return <FormattedMessage {...messages.valueTooLong} />;\n\n // Format validation\n case FieldErrorTypes.FORMAT:\n return <FormattedMessage {...messages.invalidFormat} />;\n case FieldErrorTypes.DUPLICATE:\n return <FormattedMessage {...messages.duplicateValue} />;\n\n // Numeric validation\n case FieldErrorTypes.NEGATIVE:\n return <FormattedMessage {...messages.invalidNegativeNumber} />;\n case FieldErrorTypes.FRACTIONS:\n return <FormattedMessage {...messages.invalidFractionalNumber} />;\n case FieldErrorTypes.BELOW_MIN:\n return <FormattedMessage {...messages.valueBelowMinimum} />;\n case FieldErrorTypes.ABOVE_MAX:\n return <FormattedMessage {...messages.valueAboveMaximum} />;\n case FieldErrorTypes.OUT_OF_RANGE:\n return <FormattedMessage {...messages.valueOutOfRange} />;\n\n // Server/async validation\n case FieldErrorTypes.INVALID_FROM_SERVER:\n return <FormattedMessage {...messages.invalidFromServer} />;\n case FieldErrorTypes.NOT_FOUND:\n return <FormattedMessage {...messages.resourceNotFound} />;\n case FieldErrorTypes.BLOCKED:\n return <FormattedMessage {...messages.valueBlocked} />;\n\n default:\n return null;\n }\n};\n\n/**\n * # FieldErrors\n *\n * Renders error messages based on error object configuration.\n * Provides backwards compatibility with UI-Kit FieldErrors while integrating\n * with Nimbus design system patterns.\n *\n * Supports custom error renderers and localized built-in error messages\n * for common validation scenarios like missing required fields.\n */\nexport const FieldErrors = ({\n id,\n errors,\n isVisible = true, // Default to true for backwards compatibility, but will be auto-handled in future\n renderError,\n renderDefaultError,\n customMessages,\n ...props\n}: FieldErrorsProps) => {\n // Don't render if not visible or no errors\n if (!isVisible) return null;\n if (!errors || !isObject(errors)) return null;\n\n // Filter to only show truthy errors\n const activeErrors = Object.entries(errors).filter(([, error]) => error);\n\n // Don't render if no active errors\n if (activeErrors.length === 0) return null;\n\n return (\n <FieldErrorsRoot id={id} role=\"alert\" {...props}>\n {activeErrors.map(([key, error]) => {\n // Try custom error renderer first\n const customErrorElement = renderError?.(key, error);\n if (customErrorElement) {\n return (\n <FieldErrorsMessage key={key}>\n {customErrorElement}\n </FieldErrorsMessage>\n );\n }\n\n // Try default error renderer second\n const defaultErrorElement = renderDefaultError?.(key, error);\n if (defaultErrorElement) {\n return (\n <FieldErrorsMessage key={key}>\n {defaultErrorElement}\n </FieldErrorsMessage>\n );\n }\n\n // Try custom messages for built-in error types first\n const customMessage = getCustomMessage(key, customMessages);\n if (customMessage) {\n return (\n <FieldErrorsMessage key={key}>{customMessage}</FieldErrorsMessage>\n );\n }\n\n // Fall back to built-in localized messages\n const builtInMessage = getBuiltInMessage(key);\n if (builtInMessage) {\n return (\n <FieldErrorsMessage key={key}>{builtInMessage}</FieldErrorsMessage>\n );\n }\n\n // If no renderer handles it, render nothing\n return null;\n })}\n </FieldErrorsRoot>\n );\n};\n\n// Static properties for backwards compatibility with UI-Kit\nFieldErrors.displayName = \"FieldErrors\";\nFieldErrors.errorTypes = FieldErrorTypes;\n// Static properties for string conversion, mostly for testing\nFieldErrors.getBuiltInMessage = getBuiltInMessage;\nFieldErrors.getCustomMessage = getCustomMessage;\n"],"names":["withProvider","withContext","createSlotRecipeContext","FieldErrorsRoot","FieldErrorsMessage","messages","defineMessages","FieldErrorTypes","isObject","obj","getCustomMessage","key","customMessages","getBuiltInMessage","jsx","FormattedMessage","FieldErrors","id","errors","isVisible","renderError","renderDefaultError","props","activeErrors","error","customErrorElement","defaultErrorElement","customMessage","builtInMessage"],"mappings":";;;AAMA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,KAAK;AACP,CAAC,GAEYC,IAAkB,gBAAAH,EAG7B,OAAO,MAAM,GAEFI,IAAqB,gBAAAH,EAGhC,OAAO,SAAS,GChBLI,IAAW,gBAAAC,EAAe;AAAA;AAAA,EAErC,sBAAsB;AAAA,IACpB,IAAI;AAAA,IACJ,aAAa;AAAA,IACb,gBAAgB;AAAA,EAAA;AAAA,EAElB,cAAc;AAAA,IACZ,IAAI;AAAA,IACJ,aAAa;AAAA,IACb,gBAAgB;AAAA,EAAA;AAAA,EAElB,YAAY;AAAA,IACV,IAAI;AAAA,IACJ,aAAa;AAAA,IACb,gBAAgB;AAAA,EAAA;AAAA;AAAA,EAIlB,eAAe;AAAA,IACb,IAAI;AAAA,IACJ,aAAa;AAAA,IACb,gBAA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- {"version":3,"file":"icon-V6yr3oou.es.js","sources":["../../src/components/icon/icon.slots.tsx","../../src/components/icon/icon.tsx"],"sourcesContent":["import { createRecipeContext } from \"@chakra-ui/react\";\nimport type { IconRootSlotProps } from \"./icon.types\";\n\nconst { withContext } = createRecipeContext({ key: \"icon\" });\n\n/**\n * Root component that provides the styling context for the Icon component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const IconRootSlot = withContext<SVGSVGElement, IconRootSlotProps>(\n \"svg\"\n);\n","import { IconRootSlot } from \"./icon.slots\";\nimport type { IconProps } from \"./icon.types\";\n\n/**\n * # Icon\n *\n * displays icon components\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/media/icon}\n */\nexport const Icon = (props: IconProps) => {\n const { ref, ...restProps } = props;\n return <IconRootSlot ref={ref} asChild={!restProps.as} {...restProps} />;\n};\n\nIcon.displayName = \"Icon\";\n"],"names":["withContext","createRecipeContext","IconRootSlot","Icon","props","ref","restProps","jsx"],"mappings":";;AAGA,MAAM,EAAE,aAAAA,EAAA,IAAgB,gBAAAC,EAAoB,EAAE,KAAK,QAAQ,GAM9CC,IAAe,gBAAAF;AAAA,EAC1B;AACF,GCDaG,IAAO,CAACC,MAAqB;AACxC,QAAM,EAAE,KAAAC,GAAK,GAAGC,EAAA,IAAcF;AAC9B,SAAO,gBAAAG,EAACL,KAAa,KAAAG,GAAU,SAAS,CAACC,EAAU,IAAK,GAAGA,GAAW;AACxE;AAEAH,EAAK,cAAc;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"menu-BkPvV5Ey.es.js","sources":["../../src/components/menu/menu.slots.tsx","../../src/components/menu/components/menu.context.tsx","../../src/components/menu/components/menu.root.tsx","../../src/components/menu/components/menu.trigger.tsx","../../src/components/menu/components/menu.section-context.tsx","../../src/components/menu/components/menu.content.tsx","../../src/components/menu/components/menu.item.tsx","../../src/components/menu/components/menu.section-label.tsx","../../src/components/menu/components/menu.section.tsx","../../src/components/menu/components/menu.submenu-trigger.tsx","../../src/components/menu/components/menu.submenu.tsx","../../src/components/menu/menu.tsx"],"sourcesContent":["import { createSlotRecipeContext } from \"@chakra-ui/react\";\nimport type {\n MenuRootSlotProps,\n MenuTriggerSlotProps,\n MenuPopoverSlotProps,\n MenuContentSlotProps,\n MenuItemSlotProps,\n MenuSectionSlotProps,\n MenuSectionLabelSlotProps,\n MenuSubmenuSlotProps,\n} from \"./menu.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"menu\",\n});\n\n// Menu Root\nexport const MenuRootSlot = withProvider<HTMLDivElement, MenuRootSlotProps>(\n \"div\",\n \"root\"\n);\n\n// Menu Trigger\nexport const MenuTriggerSlot = withContext<\n HTMLButtonElement,\n MenuTriggerSlotProps\n>(\"button\", \"trigger\");\n\n// Menu Popover\nexport const MenuPopoverSlot = withContext<\n HTMLDivElement,\n MenuPopoverSlotProps\n>(\"div\", \"popover\");\n\n// Menu Content\nexport const MenuContentSlot = withContext<\n HTMLDivElement,\n MenuContentSlotProps\n>(\"div\", \"content\");\n\n// Menu Item\nexport const MenuItemSlot = withContext<HTMLDivElement, MenuItemSlotProps>(\n \"div\",\n \"item\"\n);\n\n// Menu Section\nexport const MenuSectionSlot = withContext<\n HTMLDivElement,\n MenuSectionSlotProps\n>(\"div\", \"section\");\n\n// Menu Section Label\nexport const MenuSectionLabelSlot = withContext<\n HTMLDivElement,\n MenuSectionLabelSlotProps\n>(\"div\", \"sectionLabel\");\n\n// Menu Group Label\nexport const MenuSubmenuSlot = withContext<\n HTMLDivElement,\n MenuSubmenuSlotProps\n>(\"div\", \"submenu\");\n","import { createContext, useContext } from \"react\";\nimport type { MenuRootProps } from \"./../menu.types\";\nimport type { MenuTriggerProps as RaMenuTriggerProps } from \"react-aria-components\";\n\n// Context should contain all Menu props (excluding MenuTrigger-specific props)\nexport type MenuContextValue = Omit<\n MenuRootProps,\n keyof RaMenuTriggerProps | \"children\" | \"trigger\"\n>;\n\nconst MenuContext = createContext<MenuContextValue | undefined>(undefined);\n\nexport const MenuProvider = MenuContext.Provider;\n\nexport const useMenuContext = () => {\n const context = useContext(MenuContext);\n return context;\n};\n","import { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { MenuTrigger as RaMenuTrigger } from \"react-aria-components\";\nimport type { MenuRootProps } from \"../menu.types\";\nimport { MenuRootSlot } from \"../menu.slots\";\nimport { MenuProvider } from \"./menu.context\";\n\nexport const MenuRoot = (props: MenuRootProps) => {\n const recipe = useSlotRecipe({ key: \"menu\" });\n const [recipeProps, functionalProps] = recipe.splitVariantProps(props);\n\n // Separate MenuTrigger props from Menu props\n const {\n children,\n trigger,\n isOpen,\n defaultOpen,\n onOpenChange,\n ...menuContextProps\n } = functionalProps;\n\n const menuTriggerProps = {\n trigger,\n isOpen,\n defaultOpen,\n onOpenChange,\n };\n\n return (\n <MenuRootSlot {...recipeProps} asChild>\n <RaMenuTrigger {...menuTriggerProps}>\n <MenuProvider value={menuContextProps}>{children}</MenuProvider>\n </RaMenuTrigger>\n </MenuRootSlot>\n );\n};\n\nMenuRoot.displayName = \"Menu.Root\";\n","import { Button } from \"react-aria-components\";\nimport { MenuTriggerSlot } from \"../menu.slots\";\nimport type { MenuTriggerProps } from \"../menu.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport type { ReactNode } from \"react\";\n\nexport const MenuTrigger = ({\n children,\n asChild,\n ref,\n ...props\n}: MenuTriggerProps) => {\n const [styleProps, restProps] = extractStyleProps(props);\n\n /**\n * The user supplied a Button as the trigger\n */\n if (asChild) {\n // When asChild is true, apply styles to the child element\n return (\n <MenuTriggerSlot ref={ref} asChild {...styleProps}>\n {children as ReactNode}\n </MenuTriggerSlot>\n );\n }\n\n /**\n * The user did not supply a Button as trigger, use an unstyled button\n * to wrap which ever element the user supplied and make it a trigger\n */\n return (\n <MenuTriggerSlot asChild {...styleProps}>\n <Button ref={ref} {...restProps}>\n {children}\n </Button>\n </MenuTriggerSlot>\n );\n};\n\nMenuTrigger.displayName = \"Menu.Trigger\";\n","import { createContext, useContext } from \"react\";\n\nexport type MenuSectionContextValue = {\n selectionMode?: \"single\" | \"multiple\" | \"none\";\n};\n/**\n * Why is a second context (MenuSectionContext) needed?\n *\n * MenuSectionContext enables section-level config for menu items, such as\n * selection mode, which may differ from the global menu context. This allows\n * advanced menus where each section can have its own selection behavior\n * (e.g., one section is single-select, another is multi-select).\n * By scoping context to a section, menu items inherit settings from their\n * nearest section, falling back to the global menu context if not present.\n * This pattern improves flexibility and composability for complex menus,\n * and avoids prop drilling or awkward prop merging.\n */\n\nconst MenuSectionContext = createContext<MenuSectionContextValue | undefined>(\n undefined\n);\n\nexport const MenuSectionProvider = MenuSectionContext.Provider;\n\nexport const useMenuSectionContext = () => {\n return useContext(MenuSectionContext);\n};\n","import { Menu, Popover } from \"react-aria-components\";\nimport { MenuContentSlot, MenuPopoverSlot } from \"../menu.slots\";\nimport type { MenuContentProps } from \"../menu.types\";\nimport { useMenuContext } from \"./menu.context\";\nimport { MenuSectionProvider } from \"./menu.section-context\";\n\nexport const MenuContent = ({\n children,\n placement: placementOverride,\n ref,\n}: MenuContentProps) => {\n const contextProps = useMenuContext();\n\n if (!contextProps) {\n throw new Error(\"Menu.Content must be used within Menu.Root\");\n }\n\n // Separate placement from other props since it's handled by Popover\n const { placement, ...menuProps } = contextProps;\n const finalPlacement = placementOverride || placement || \"bottom start\";\n\n return (\n <MenuSectionProvider value={{ selectionMode: menuProps.selectionMode }}>\n <MenuPopoverSlot asChild>\n <Popover placement={finalPlacement} offset={4} shouldFlip>\n <MenuContentSlot asChild>\n <Menu ref={ref} shouldFocusWrap autoFocus=\"first\" {...menuProps}>\n {children}\n </Menu>\n </MenuContentSlot>\n </Popover>\n </MenuPopoverSlot>\n </MenuSectionProvider>\n );\n};\n\nMenuContent.displayName = \"Menu.Content\";\n","import { MenuItem as RaMenuItem } from \"react-aria-components\";\nimport { MenuItemSlot } from \"../menu.slots\";\nimport type { MenuItemProps } from \"../menu.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { ChevronRight } from \"@commercetools/nimbus-icons\";\nimport { Icon } from \"@/components/icon\";\n\nexport const MenuItem = ({\n children,\n isCritical,\n ref,\n ...props\n}: MenuItemProps) => {\n const [styleProps, restProps] = extractStyleProps(props);\n\n return (\n <MenuItemSlot\n asChild\n {...styleProps}\n data-critical={isCritical ? \"\" : undefined}\n >\n <RaMenuItem ref={ref} {...restProps}>\n {({ hasSubmenu }) => (\n <>\n {children}\n {hasSubmenu && (\n <Icon slot=\"caretIcon\">\n <ChevronRight />\n </Icon>\n )}\n </>\n )}\n </RaMenuItem>\n </MenuItemSlot>\n );\n};\n\nMenuItem.displayName = \"Menu.Item\";\n","import { Header } from \"react-aria-components\";\nimport { MenuSectionLabelSlot } from \"../menu.slots\";\nimport type { MenuSectionLabelProps } from \"../menu.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\n\n/**\n * Used in MenuSection for rendering the `label` property.\n */\nexport const MenuSectionLabel = ({\n children,\n ref,\n ...props\n}: MenuSectionLabelProps) => {\n const [styleProps, restProps] = extractStyleProps(props);\n\n return (\n <MenuSectionLabelSlot asChild {...styleProps}>\n <Header ref={ref} {...restProps}>\n {children}\n </Header>\n </MenuSectionLabelSlot>\n );\n};\n\nMenuSectionLabel.displayName = \"Menu.SectionLabel\";\n","import {\n MenuSection as RaMenuSection,\n Collection,\n} from \"react-aria-components\";\nimport { MenuSectionSlot } from \"../menu.slots\";\nimport type { MenuSectionProps } from \"../menu.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { useMenuContext } from \"./menu.context\";\nimport { MenuSectionProvider } from \"./menu.section-context\";\nimport { MenuSectionLabel } from \"./menu.section-label\";\nimport type { ReactNode } from \"react\";\n\nexport const MenuSection = <T extends object = object>({\n children,\n ref,\n label,\n items,\n ...props\n}: MenuSectionProps<T>) => {\n const contextProps = useMenuContext();\n\n // Extract selection-related props before extracting style props\n const {\n selectionMode = contextProps?.selectionMode,\n selectedKeys = contextProps?.selectedKeys,\n defaultSelectedKeys = contextProps?.defaultSelectedKeys,\n onSelectionChange = contextProps?.onSelectionChange,\n disallowEmptySelection = contextProps?.disallowEmptySelection,\n ...restProps\n } = props;\n\n const [styleProps, otherProps] = extractStyleProps(restProps);\n\n return (\n <MenuSectionProvider value={{ selectionMode }}>\n <MenuSectionSlot asChild {...styleProps}>\n <RaMenuSection\n ref={ref}\n selectionMode={selectionMode}\n selectedKeys={selectedKeys}\n defaultSelectedKeys={defaultSelectedKeys}\n onSelectionChange={onSelectionChange}\n disallowEmptySelection={disallowEmptySelection}\n {...otherProps}\n >\n <MenuSectionLabel>{label}</MenuSectionLabel>\n {items ? (\n <Collection items={items}>{children}</Collection>\n ) : (\n (children as ReactNode)\n )}\n </RaMenuSection>\n </MenuSectionSlot>\n </MenuSectionProvider>\n );\n};\n\nMenuSection.displayName = \"Menu.Section\";\n","import { SubmenuTrigger as RaSubmenuTrigger } from \"react-aria-components\";\nimport type { MenuSubmenuTriggerProps } from \"../menu.types\";\n\nexport const MenuSubmenuTrigger = ({\n children,\n ...props\n}: MenuSubmenuTriggerProps) => {\n return <RaSubmenuTrigger {...props}>{children}</RaSubmenuTrigger>;\n};\n\nMenuSubmenuTrigger.displayName = \"Menu.SubmenuTrigger\";\n","import type { MenuSubmenuProps } from \"../menu.types\";\nimport { MenuContent } from \"./menu.content\";\n\nexport const MenuSubmenu = ({ children, ...props }: MenuSubmenuProps) => {\n return (\n <MenuContent {...props} placement=\"end\">\n {children}\n </MenuContent>\n );\n};\n\nMenuSubmenu.displayName = \"Menu.Submenu\";\n","import { MenuRoot } from \"./components/menu.root\";\nimport { MenuTrigger } from \"./components/menu.trigger\";\nimport { MenuContent } from \"./components/menu.content\";\nimport { MenuItem } from \"./components/menu.item\";\nimport { MenuSection } from \"./components/menu.section\";\nimport { MenuSubmenuTrigger } from \"./components/menu.submenu-trigger\";\nimport { MenuSubmenu } from \"./components/menu.submenu\";\n\n// Re-export types\nexport type * from \"./menu.types\";\n\nexport const Menu = {\n Root: MenuRoot,\n Trigger: MenuTrigger,\n Content: MenuContent,\n Item: MenuItem,\n Section: MenuSection,\n Submenu: MenuSubmenu,\n SubmenuTrigger: MenuSubmenuTrigger,\n};\n\n// Exports for internal use by react-docgen\nexport {\n MenuRoot as _MenuRoot,\n MenuTrigger as _MenuTrigger,\n MenuContent as _MenuContent,\n MenuItem as _MenuItem,\n MenuSection as _MenuSection,\n MenuSubmenuTrigger as _MenuSubmenuTrigger,\n MenuSubmenu as _MenuSubmenu,\n};\n"],"names":["withProvider","withContext","createSlotRecipeContext","MenuRootSlot","MenuTriggerSlot","MenuPopoverSlot","MenuContentSlot","MenuItemSlot","MenuSectionSlot","MenuSectionLabelSlot","MenuContext","createContext","MenuProvider","useMenuContext","useContext","MenuRoot","props","recipe","useSlotRecipe","recipeProps","functionalProps","children","trigger","isOpen","defaultOpen","onOpenChange","menuContextProps","jsx","RaMenuTrigger","MenuTrigger","asChild","ref","styleProps","restProps","extractStyleProps","Button","MenuSectionContext","MenuSectionProvider","MenuContent","placementOverride","contextProps","placement","menuProps","finalPlacement","Popover","Menu","MenuItem","isCritical","RaMenuItem","hasSubmenu","jsxs","Fragment","Icon","ChevronRight","MenuSectionLabel","Header","MenuSection","label","items","selectionMode","selectedKeys","defaultSelectedKeys","onSelectionChange","disallowEmptySelection","otherProps","RaMenuSection","Collection","MenuSubmenuTrigger","RaSubmenuTrigger","MenuSubmenu"],"mappings":";;;;;;;;;;;AAYA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,KAAK;AACP,CAAC,GAGYC,IAAe,gBAAAH;AAAA,EAC1B;AAAA,EACA;AACF,GAGaI,IAAkB,gBAAAH,EAG7B,UAAU,SAAS,GAGRI,IAAkB,gBAAAJ,EAG7B,OAAO,SAAS,GAGLK,IAAkB,gBAAAL,EAG7B,OAAO,SAAS,GAGLM,IAAe,gBAAAN;AAAA,EAC1B;AAAA,EAC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AAe,UAAArC,GAAS,IAEnCA;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,GAGP,EAAA,CACF;AAEJ;AAEAmC,EAAY,cAAc;ACtDnB,MAAMW,IAAqB,CAAC;AAAA,EACjC,UAAA9C;AAAA,EACA,GAAGL;AACL,MACS,gBAAAW,EAACyC,GAAA,EAAkB,GAAGpD,GAAQ,UAAAK,EAAA,CAAS;AAGhD8C,EAAmB,cAAc;ACP1B,MAAME,IAAc,CAAC,EAAE,UAAAhD,GAAU,GAAGL,0BAEtCsB,GAAA,EAAa,GAAGtB,GAAO,WAAU,OAC/B,UAAAK,GACH;AAIJgD,EAAY,cAAc;ACAnB,MAAMxB,KAAO;AAAA,EAClB,MAAM9B;AAAA,EACN,SAASc;AAAA,EACT,SAASS;AAAA,EACT,MAAMQ;AAAA,EACN,SAASU;AAAA,EACT,SAASa;AAAA,EACT,gBAAgBF;AAClB;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"popover-DF0ppmkw.es.js","sources":["../../src/components/popover/popover.slots.tsx","../../src/components/popover/popover.tsx"],"sourcesContent":["import { createRecipeContext } from \"@chakra-ui/react\";\nimport { Popover as RaPopover } from \"react-aria-components\";\nimport type { PopoverProps } from \"./popover.types\";\n\nconst { withContext } = createRecipeContext({\n key: \"popover\",\n});\n\nexport const PopoverRootSlot = withContext<HTMLDivElement, PopoverProps>(\n RaPopover\n);\n","import { PopoverRootSlot } from \"./popover.slots\";\nimport type { PopoverProps } from \"./popover.types\";\n\n/**\n * # Popover\n *\n * A component that displays floating content in relation to a trigger element.\n *\n * Note this component is only used internally.\n */\nexport const Popover = (props: PopoverProps) => {\n const { children, ...rest } = props;\n\n return <PopoverRootSlot {...rest}>{children}</PopoverRootSlot>;\n};\n\nPopover.displayName = \"Popover\";\n"],"names":["withContext","createRecipeContext","PopoverRootSlot","RaPopover","Popover","props","children","rest","jsx"],"mappings":";;;AAIA,MAAM,EAAE,aAAAA,EAAA,IAAgB,gBAAAC,EAAoB;AAAA,EAC1C,KAAK;AACP,CAAC,GAEYC,IAAkB,gBAAAF;AAAA,EAC7BG;AACF,GCAaC,IAAU,CAACC,MAAwB;AAC9C,QAAM,EAAE,UAAAC,GAAU,GAAGC,EAAA,IAASF;AAE9B,SAAO,gBAAAG,EAACN,GAAA,EAAiB,GAAGK,GAAO,UAAAD,EAAA,CAAS;AAC9C;AAEAF,EAAQ,cAAc;"}