@coveord/plasma-mantine 57.2.0 → 58.0.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 (250) hide show
  1. package/.turbo/turbo-build.log +4 -4
  2. package/.turbo/turbo-test.log +106 -104
  3. package/dist/.tsbuildinfo +1 -1
  4. package/dist/cjs/components/ActionIcon/ActionIcon.d.ts +3 -3
  5. package/dist/cjs/components/Alert/Alert.d.ts +3 -3
  6. package/dist/cjs/components/Alert/Alert.js +4 -12
  7. package/dist/cjs/components/Alert/Alert.js.map +1 -1
  8. package/dist/cjs/components/Badge/Badge.d.ts +3 -3
  9. package/dist/cjs/components/BrowserPreview/BrowserPreview.d.ts +1 -1
  10. package/dist/cjs/components/BrowserPreview/BrowserPreview.d.ts.map +1 -1
  11. package/dist/cjs/components/BrowserPreview/BrowserPreview.js +1 -2
  12. package/dist/cjs/components/BrowserPreview/BrowserPreview.js.map +1 -1
  13. package/dist/cjs/components/Button/Button.d.ts +3 -3
  14. package/dist/cjs/components/ChildForm/ChildForm.d.ts +5 -4
  15. package/dist/cjs/components/ChildForm/ChildForm.d.ts.map +1 -1
  16. package/dist/cjs/components/ChildForm/ChildForm.js +4 -2
  17. package/dist/cjs/components/ChildForm/ChildForm.js.map +1 -1
  18. package/dist/cjs/components/Collection/Collection.d.ts +6 -6
  19. package/dist/cjs/components/Collection/CollectionAddButton.d.ts +1 -1
  20. package/dist/cjs/components/Collection/CollectionAddButton.d.ts.map +1 -1
  21. package/dist/cjs/components/Collection/CollectionContext.d.ts +1 -1
  22. package/dist/cjs/components/Collection/CollectionContext.d.ts.map +1 -1
  23. package/dist/cjs/components/Collection/layouts/CollectionLayouts.d.ts +5 -5
  24. package/dist/cjs/components/Collection/layouts/horizontal-layout/HorizontalLayout.d.ts +3 -3
  25. package/dist/cjs/components/Collection/layouts/horizontal-layout/HorizontalLayoutBody.d.ts +1 -1
  26. package/dist/cjs/components/Collection/layouts/horizontal-layout/HorizontalLayoutBody.d.ts.map +1 -1
  27. package/dist/cjs/components/Collection/layouts/horizontal-layout/HorizontalLayoutHeader.d.ts +1 -1
  28. package/dist/cjs/components/Collection/layouts/horizontal-layout/HorizontalLayoutHeader.d.ts.map +1 -1
  29. package/dist/cjs/components/Collection/layouts/shared/itemRenderer.d.ts +3 -3
  30. package/dist/cjs/components/Collection/layouts/vertical-layout/VerticalLayout.d.ts +2 -2
  31. package/dist/cjs/components/Collection/layouts/vertical-layout/VerticalLayoutBody.d.ts +1 -1
  32. package/dist/cjs/components/Collection/layouts/vertical-layout/VerticalLayoutBody.d.ts.map +1 -1
  33. package/dist/cjs/components/DateRangePicker/DateRangePickerInlineCalendar.d.ts +1 -1
  34. package/dist/cjs/components/DateRangePicker/DateRangePickerInlineCalendar.d.ts.map +1 -1
  35. package/dist/cjs/components/DateRangePicker/DateRangePickerPopoverCalendar.d.ts +1 -1
  36. package/dist/cjs/components/DateRangePicker/DateRangePickerPopoverCalendar.d.ts.map +1 -1
  37. package/dist/cjs/components/DateTimeRangePicker/DateTimeRangePicker.d.ts +1 -1
  38. package/dist/cjs/components/DateTimeRangePicker/DateTimeRangePicker.d.ts.map +1 -1
  39. package/dist/cjs/components/EllipsisText/EllipsisText.d.ts +3 -3
  40. package/dist/cjs/components/Header/Header.context.d.ts +1 -1
  41. package/dist/cjs/components/Header/Header.context.d.ts.map +1 -1
  42. package/dist/cjs/components/Header/Header.module.css +0 -5
  43. package/dist/cjs/components/Header/HeaderBreadcrumbs/HeaderBreadcrumbAnchor.d.ts +3 -3
  44. package/dist/cjs/components/Header/HeaderBreadcrumbs/HeaderBreadcrumbText.d.ts +3 -3
  45. package/dist/cjs/components/Header/HeaderDocAnchor/HeaderDocAnchor.js +2 -4
  46. package/dist/cjs/components/Header/HeaderDocAnchor/HeaderDocAnchor.js.map +1 -1
  47. package/dist/cjs/components/InfoToken/InfoToken.d.ts +26 -82
  48. package/dist/cjs/components/InfoToken/InfoToken.d.ts.map +1 -1
  49. package/dist/cjs/components/InfoToken/InfoToken.js +62 -55
  50. package/dist/cjs/components/InfoToken/InfoToken.js.map +1 -1
  51. package/dist/cjs/components/InfoToken/InfoToken.module.css +11 -3
  52. package/dist/cjs/components/InlineConfirm/InlineConfirmTarget.d.ts +3 -3
  53. package/dist/cjs/components/Input/Input.d.ts +14 -1
  54. package/dist/cjs/components/Input/Input.d.ts.map +1 -1
  55. package/dist/cjs/components/Input/Input.js +17 -5
  56. package/dist/cjs/components/Input/Input.js.map +1 -1
  57. package/dist/cjs/components/Input/InputLabelInfo.d.ts +17 -0
  58. package/dist/cjs/components/Input/InputLabelInfo.d.ts.map +1 -0
  59. package/dist/cjs/components/Input/InputLabelInfo.js +58 -0
  60. package/dist/cjs/components/Input/InputLabelInfo.js.map +1 -0
  61. package/dist/cjs/components/Input/InputLabelInfo.module.css +5 -0
  62. package/dist/cjs/components/Menu/Menu.d.ts +1 -1
  63. package/dist/cjs/components/Modal/Modal.js +1 -1
  64. package/dist/cjs/components/Modal/Modal.js.map +1 -1
  65. package/dist/cjs/components/Modal/ModalFooter.js +2 -0
  66. package/dist/cjs/components/Modal/ModalFooter.js.map +1 -1
  67. package/dist/cjs/components/Modal/ModalFooter.module.css +2 -2
  68. package/dist/cjs/components/Prompt/Prompt.context.d.ts +1 -1
  69. package/dist/cjs/components/Prompt/Prompt.context.d.ts.map +1 -1
  70. package/dist/cjs/components/Prompt/Prompt.d.ts +33 -33
  71. package/dist/cjs/components/Prompt/Prompt.d.ts.map +1 -1
  72. package/dist/cjs/components/Prompt/Prompt.js +38 -18
  73. package/dist/cjs/components/Prompt/Prompt.js.map +1 -1
  74. package/dist/cjs/components/Prompt/Prompt.module.css +0 -17
  75. package/dist/cjs/components/Prompt/PromptCancelButton.d.ts.map +1 -1
  76. package/dist/cjs/components/Prompt/PromptCancelButton.js +1 -0
  77. package/dist/cjs/components/Prompt/PromptCancelButton.js.map +1 -1
  78. package/dist/cjs/components/Prompt/PromptConfirmButton.d.ts.map +1 -1
  79. package/dist/cjs/components/Prompt/PromptConfirmButton.js +2 -1
  80. package/dist/cjs/components/Prompt/PromptConfirmButton.js.map +1 -1
  81. package/dist/cjs/components/StickyFooter/StickyFooter.js +1 -1
  82. package/dist/cjs/components/StickyFooter/StickyFooter.js.map +1 -1
  83. package/dist/cjs/components/Table/Table.d.ts +4 -4
  84. package/dist/cjs/components/Table/layouts/TableLayoutControl.d.ts +1 -1
  85. package/dist/cjs/components/Table/layouts/TableLayoutControl.d.ts.map +1 -1
  86. package/dist/cjs/components/Table/layouts/row-layout/RowLayoutBody.d.ts +1 -1
  87. package/dist/cjs/components/Table/layouts/row-layout/RowLayoutContext.d.ts +1 -1
  88. package/dist/cjs/components/Table/layouts/row-layout/RowLayoutContext.d.ts.map +1 -1
  89. package/dist/cjs/components/Table/layouts/row-layout/RowLayoutHeader.d.ts +1 -1
  90. package/dist/cjs/components/Table/table-actions/TableActionItem.d.ts +3 -3
  91. package/dist/cjs/components/Table/table-actions/TableActionsList.d.ts +2 -2
  92. package/dist/cjs/components/Table/table-header/Th.d.ts +1 -1
  93. package/dist/cjs/index.d.ts +1 -1
  94. package/dist/cjs/index.d.ts.map +1 -1
  95. package/dist/cjs/index.js +7 -1
  96. package/dist/cjs/index.js.map +1 -1
  97. package/dist/cjs/styles/Breadcrumbs.module.css +0 -4
  98. package/dist/cjs/styles/Checkbox.module.css +0 -1
  99. package/dist/cjs/styles/InputWrapper.module.css +0 -4
  100. package/dist/cjs/styles/NavLink.module.css +0 -2
  101. package/dist/cjs/styles/Radio.module.css +0 -1
  102. package/dist/cjs/styles/RadioCard.module.css +0 -1
  103. package/dist/cjs/styles/Select.module.css +0 -2
  104. package/dist/cjs/styles/Tabs.module.css +2 -2
  105. package/dist/cjs/theme/Theme.js +3 -5
  106. package/dist/cjs/theme/Theme.js.map +1 -1
  107. package/dist/cjs/theme/plasmaCSSVariablesResolver.d.ts.map +1 -1
  108. package/dist/cjs/theme/plasmaCSSVariablesResolver.js +3 -6
  109. package/dist/cjs/theme/plasmaCSSVariablesResolver.js.map +1 -1
  110. package/dist/esm/components/ActionIcon/ActionIcon.d.ts +3 -3
  111. package/dist/esm/components/Alert/Alert.d.ts +3 -3
  112. package/dist/esm/components/Alert/Alert.js +4 -12
  113. package/dist/esm/components/Alert/Alert.js.map +1 -1
  114. package/dist/esm/components/Badge/Badge.d.ts +3 -3
  115. package/dist/esm/components/BrowserPreview/BrowserPreview.js +1 -2
  116. package/dist/esm/components/BrowserPreview/BrowserPreview.js.map +1 -1
  117. package/dist/esm/components/Button/Button.d.ts +3 -3
  118. package/dist/esm/components/ChildForm/ChildForm.d.ts +5 -4
  119. package/dist/esm/components/ChildForm/ChildForm.d.ts.map +1 -1
  120. package/dist/esm/components/ChildForm/ChildForm.js +4 -2
  121. package/dist/esm/components/ChildForm/ChildForm.js.map +1 -1
  122. package/dist/esm/components/EllipsisText/EllipsisText.d.ts +3 -3
  123. package/dist/esm/components/Header/Header.module.css +0 -5
  124. package/dist/esm/components/Header/HeaderBreadcrumbs/HeaderBreadcrumbAnchor.d.ts +3 -3
  125. package/dist/esm/components/Header/HeaderBreadcrumbs/HeaderBreadcrumbText.d.ts +3 -3
  126. package/dist/esm/components/Header/HeaderDocAnchor/HeaderDocAnchor.js +2 -4
  127. package/dist/esm/components/Header/HeaderDocAnchor/HeaderDocAnchor.js.map +1 -1
  128. package/dist/esm/components/InfoToken/InfoToken.d.ts +26 -82
  129. package/dist/esm/components/InfoToken/InfoToken.d.ts.map +1 -1
  130. package/dist/esm/components/InfoToken/InfoToken.js +61 -57
  131. package/dist/esm/components/InfoToken/InfoToken.js.map +1 -1
  132. package/dist/esm/components/InfoToken/InfoToken.module.css +11 -3
  133. package/dist/esm/components/InlineConfirm/InlineConfirmTarget.d.ts +3 -3
  134. package/dist/esm/components/Input/Input.d.ts +14 -1
  135. package/dist/esm/components/Input/Input.d.ts.map +1 -1
  136. package/dist/esm/components/Input/Input.js +7 -2
  137. package/dist/esm/components/Input/Input.js.map +1 -1
  138. package/dist/esm/components/Input/InputLabelInfo.d.ts +17 -0
  139. package/dist/esm/components/Input/InputLabelInfo.d.ts.map +1 -0
  140. package/dist/esm/components/Input/InputLabelInfo.js +35 -0
  141. package/dist/esm/components/Input/InputLabelInfo.js.map +1 -0
  142. package/dist/esm/components/Input/InputLabelInfo.module.css +5 -0
  143. package/dist/esm/components/Modal/Modal.js +1 -1
  144. package/dist/esm/components/Modal/Modal.js.map +1 -1
  145. package/dist/esm/components/Modal/ModalFooter.js +2 -0
  146. package/dist/esm/components/Modal/ModalFooter.js.map +1 -1
  147. package/dist/esm/components/Modal/ModalFooter.module.css +2 -2
  148. package/dist/esm/components/Prompt/Prompt.d.ts +33 -33
  149. package/dist/esm/components/Prompt/Prompt.d.ts.map +1 -1
  150. package/dist/esm/components/Prompt/Prompt.js +38 -19
  151. package/dist/esm/components/Prompt/Prompt.js.map +1 -1
  152. package/dist/esm/components/Prompt/Prompt.module.css +0 -17
  153. package/dist/esm/components/Prompt/PromptCancelButton.d.ts.map +1 -1
  154. package/dist/esm/components/Prompt/PromptCancelButton.js +1 -0
  155. package/dist/esm/components/Prompt/PromptCancelButton.js.map +1 -1
  156. package/dist/esm/components/Prompt/PromptConfirmButton.d.ts.map +1 -1
  157. package/dist/esm/components/Prompt/PromptConfirmButton.js +2 -1
  158. package/dist/esm/components/Prompt/PromptConfirmButton.js.map +1 -1
  159. package/dist/esm/components/StickyFooter/StickyFooter.js +1 -1
  160. package/dist/esm/components/StickyFooter/StickyFooter.js.map +1 -1
  161. package/dist/esm/components/Table/Table.d.ts +3 -3
  162. package/dist/esm/components/Table/table-actions/TableActionItem.d.ts +3 -3
  163. package/dist/esm/index.d.ts +1 -1
  164. package/dist/esm/index.d.ts.map +1 -1
  165. package/dist/esm/index.js +1 -1
  166. package/dist/esm/index.js.map +1 -1
  167. package/dist/esm/styles/Breadcrumbs.module.css +0 -4
  168. package/dist/esm/styles/Checkbox.module.css +0 -1
  169. package/dist/esm/styles/InputWrapper.module.css +0 -4
  170. package/dist/esm/styles/NavLink.module.css +0 -2
  171. package/dist/esm/styles/Radio.module.css +0 -1
  172. package/dist/esm/styles/RadioCard.module.css +0 -1
  173. package/dist/esm/styles/Select.module.css +0 -2
  174. package/dist/esm/styles/Tabs.module.css +2 -2
  175. package/dist/esm/theme/Theme.js +3 -5
  176. package/dist/esm/theme/Theme.js.map +1 -1
  177. package/dist/esm/theme/plasmaCSSVariablesResolver.d.ts.map +1 -1
  178. package/dist/esm/theme/plasmaCSSVariablesResolver.js +3 -6
  179. package/dist/esm/theme/plasmaCSSVariablesResolver.js.map +1 -1
  180. package/package.json +23 -23
  181. package/src/components/Alert/Alert.tsx +4 -4
  182. package/src/components/BrowserPreview/BrowserPreview.tsx +1 -1
  183. package/src/components/ChildForm/ChildForm.tsx +10 -3
  184. package/src/components/ChildForm/__tests__/ChildForm.spec.tsx +29 -4
  185. package/src/components/Header/Header.module.css +0 -5
  186. package/src/components/Header/HeaderDocAnchor/HeaderDocAnchor.tsx +2 -2
  187. package/src/components/InfoToken/InfoToken.module.css +11 -3
  188. package/src/components/InfoToken/InfoToken.tsx +83 -67
  189. package/src/components/Input/Input.ts +24 -2
  190. package/src/components/Input/InputLabelInfo.module.css +5 -0
  191. package/src/components/Input/InputLabelInfo.tsx +43 -0
  192. package/src/components/Input/__tests__/Input.spec.tsx +33 -0
  193. package/src/components/Modal/Modal.tsx +1 -1
  194. package/src/components/Modal/ModalFooter.module.css +2 -2
  195. package/src/components/Modal/ModalFooter.tsx +3 -1
  196. package/src/components/Prompt/Prompt.module.css +0 -17
  197. package/src/components/Prompt/Prompt.tsx +48 -34
  198. package/src/components/Prompt/PromptCancelButton.tsx +3 -1
  199. package/src/components/Prompt/PromptConfirmButton.tsx +4 -2
  200. package/src/components/Prompt/__tests__/Prompt.spec.tsx +18 -16
  201. package/src/components/StickyFooter/StickyFooter.tsx +1 -1
  202. package/src/components/Switch/__tests__/Switch.spec.tsx +27 -0
  203. package/src/index.ts +9 -1
  204. package/src/styles/Breadcrumbs.module.css +0 -4
  205. package/src/styles/Checkbox.module.css +0 -1
  206. package/src/styles/InputWrapper.module.css +0 -4
  207. package/src/styles/NavLink.module.css +0 -2
  208. package/src/styles/Radio.module.css +0 -1
  209. package/src/styles/RadioCard.module.css +0 -1
  210. package/src/styles/Select.module.css +0 -2
  211. package/src/styles/Tabs.module.css +2 -2
  212. package/src/theme/Theme.tsx +3 -3
  213. package/src/theme/__tests__/plasmaCSSVariablesResolver.spec.ts +3 -6
  214. package/src/theme/plasmaCSSVariablesResolver.ts +3 -6
  215. package/dist/cjs/components/Prompt/icons/CriticalIcon.d.ts +0 -3
  216. package/dist/cjs/components/Prompt/icons/CriticalIcon.d.ts.map +0 -1
  217. package/dist/cjs/components/Prompt/icons/CriticalIcon.js +0 -29
  218. package/dist/cjs/components/Prompt/icons/CriticalIcon.js.map +0 -1
  219. package/dist/cjs/components/Prompt/icons/InfoIcon.d.ts +0 -3
  220. package/dist/cjs/components/Prompt/icons/InfoIcon.d.ts.map +0 -1
  221. package/dist/cjs/components/Prompt/icons/InfoIcon.js +0 -29
  222. package/dist/cjs/components/Prompt/icons/InfoIcon.js.map +0 -1
  223. package/dist/cjs/components/Prompt/icons/SuccessIcon.d.ts +0 -3
  224. package/dist/cjs/components/Prompt/icons/SuccessIcon.d.ts.map +0 -1
  225. package/dist/cjs/components/Prompt/icons/SuccessIcon.js +0 -29
  226. package/dist/cjs/components/Prompt/icons/SuccessIcon.js.map +0 -1
  227. package/dist/cjs/components/Prompt/icons/WarningIcon.d.ts +0 -3
  228. package/dist/cjs/components/Prompt/icons/WarningIcon.d.ts.map +0 -1
  229. package/dist/cjs/components/Prompt/icons/WarningIcon.js +0 -29
  230. package/dist/cjs/components/Prompt/icons/WarningIcon.js.map +0 -1
  231. package/dist/esm/components/Prompt/icons/CriticalIcon.d.ts +0 -3
  232. package/dist/esm/components/Prompt/icons/CriticalIcon.d.ts.map +0 -1
  233. package/dist/esm/components/Prompt/icons/CriticalIcon.js +0 -17
  234. package/dist/esm/components/Prompt/icons/CriticalIcon.js.map +0 -1
  235. package/dist/esm/components/Prompt/icons/InfoIcon.d.ts +0 -3
  236. package/dist/esm/components/Prompt/icons/InfoIcon.d.ts.map +0 -1
  237. package/dist/esm/components/Prompt/icons/InfoIcon.js +0 -17
  238. package/dist/esm/components/Prompt/icons/InfoIcon.js.map +0 -1
  239. package/dist/esm/components/Prompt/icons/SuccessIcon.d.ts +0 -3
  240. package/dist/esm/components/Prompt/icons/SuccessIcon.d.ts.map +0 -1
  241. package/dist/esm/components/Prompt/icons/SuccessIcon.js +0 -17
  242. package/dist/esm/components/Prompt/icons/SuccessIcon.js.map +0 -1
  243. package/dist/esm/components/Prompt/icons/WarningIcon.d.ts +0 -3
  244. package/dist/esm/components/Prompt/icons/WarningIcon.d.ts.map +0 -1
  245. package/dist/esm/components/Prompt/icons/WarningIcon.js +0 -17
  246. package/dist/esm/components/Prompt/icons/WarningIcon.js.map +0 -1
  247. package/src/components/Prompt/icons/CriticalIcon.tsx +0 -18
  248. package/src/components/Prompt/icons/InfoIcon.tsx +0 -18
  249. package/src/components/Prompt/icons/SuccessIcon.tsx +0 -17
  250. package/src/components/Prompt/icons/WarningIcon.tsx +0 -18
@@ -25,21 +25,21 @@ export declare const HeaderBreadcrumbAnchor: (<C = "a">(props: import("@mantine/
25
25
  }) | (HeaderBreadcrumbAnchorProps & {
26
26
  component: React.ElementType;
27
27
  renderRoot?: (props: Record<string, any>) => any;
28
- })>, never> & import("@mantine/core/lib/core/factory/factory.js").ThemeExtend<{
28
+ })>, never> & import("@mantine/core").ThemeExtend<{
29
29
  props: HeaderBreadcrumbAnchorProps;
30
30
  ref: HTMLAnchorElement;
31
31
  stylesNames: HeaderBreadcrumbAnchorStyleNames;
32
32
  compound: true;
33
33
  defaultComponent: "a";
34
34
  defaultRef: HTMLAnchorElement;
35
- }> & import("@mantine/core/lib/core/factory/factory.js").ComponentClasses<{
35
+ }> & import("@mantine/core").ComponentClasses<{
36
36
  props: HeaderBreadcrumbAnchorProps;
37
37
  ref: HTMLAnchorElement;
38
38
  stylesNames: HeaderBreadcrumbAnchorStyleNames;
39
39
  compound: true;
40
40
  defaultComponent: "a";
41
41
  defaultRef: HTMLAnchorElement;
42
- }> & import("@mantine/core/lib/core/factory/polymorphic-factory.js").PolymorphicComponentWithProps<{
42
+ }> & import("@mantine/core").PolymorphicComponentWithProps<{
43
43
  props: HeaderBreadcrumbAnchorProps;
44
44
  ref: HTMLAnchorElement;
45
45
  stylesNames: HeaderBreadcrumbAnchorStyleNames;
@@ -16,21 +16,21 @@ export declare const HeaderBreadcrumbText: (<C = "p">(props: import("@mantine/co
16
16
  }) | (TextProps & {
17
17
  component: React.ElementType;
18
18
  renderRoot?: (props: Record<string, any>) => any;
19
- })>, never> & import("@mantine/core/lib/core/factory/factory.js").ThemeExtend<{
19
+ })>, never> & import("@mantine/core").ThemeExtend<{
20
20
  props: TextProps;
21
21
  ref: HTMLParagraphElement;
22
22
  stylesNames: HeaderBreadcrumbTextStyleNames;
23
23
  compound: true;
24
24
  defaultComponent: "p";
25
25
  defaultRef: HTMLParagraphElement;
26
- }> & import("@mantine/core/lib/core/factory/factory.js").ComponentClasses<{
26
+ }> & import("@mantine/core").ComponentClasses<{
27
27
  props: TextProps;
28
28
  ref: HTMLParagraphElement;
29
29
  stylesNames: HeaderBreadcrumbTextStyleNames;
30
30
  compound: true;
31
31
  defaultComponent: "p";
32
32
  defaultRef: HTMLParagraphElement;
33
- }> & import("@mantine/core/lib/core/factory/polymorphic-factory.js").PolymorphicComponentWithProps<{
33
+ }> & import("@mantine/core").PolymorphicComponentWithProps<{
34
34
  props: TextProps;
35
35
  ref: HTMLParagraphElement;
36
36
  stylesNames: HeaderBreadcrumbTextStyleNames;
@@ -13,13 +13,11 @@ var _object_spread_props = require("@swc/helpers/_/_object_spread_props");
13
13
  var _object_without_properties = require("@swc/helpers/_/_object_without_properties");
14
14
  var _jsxruntime = require("react/jsx-runtime");
15
15
  var _core = require("@mantine/core");
16
- var _Headercontext = require("../Header.context.js");
17
16
  var _InfoToken = require("../../InfoToken/InfoToken.js");
17
+ var _Headercontext = require("../Header.context.js");
18
18
  var defaultProps = {
19
19
  position: 'right',
20
- children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_InfoToken.InfoToken, {
21
- variant: "question"
22
- })
20
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_InfoToken.InfoToken.Question, {})
23
21
  };
24
22
  var HeaderDocAnchor = (0, _core.factory)(function(_props, ref) {
25
23
  var props = (0, _core.useProps)('PlasmaHeaderActions', defaultProps, _props);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/Header/HeaderDocAnchor/HeaderDocAnchor.tsx"],"sourcesContent":["import {\n Anchor,\n AnchorProps,\n CompoundStylesApiProps,\n Factory,\n Tooltip,\n TooltipProps,\n factory,\n useProps,\n} from '@mantine/core';\nimport {ReactNode} from 'react';\nimport {useHeaderContext} from '../Header.context.js';\nimport {InfoToken} from '../../InfoToken/InfoToken.js';\n\nexport type HeaderDocAnchorStyleNames = 'docAnchorTooltip' | 'docAnchor';\n\nexport interface HeaderDocAnchorProps\n extends\n Pick<TooltipProps, 'position'>,\n CompoundStylesApiProps<HeaderDocAnchorFactory>,\n Omit<AnchorProps, 'classNames' | 'styles' | 'variant' | 'vars'> {\n /**\n * A href pointing to documentation related to the current panel.\n * When provided, an info icon is rendered next to the title as link to this documentation\n */\n href: string;\n /**\n * The tooltip text shown when hovering over the doc link icon\n */\n label?: ReactNode;\n /**\n * React component to add the tooltip and anchor on\n */\n children?: ReactNode;\n}\n\nexport type HeaderDocAnchorFactory = Factory<{\n props: HeaderDocAnchorProps;\n ref: HTMLAnchorElement;\n stylesNames: HeaderDocAnchorStyleNames;\n compound: true;\n}>;\n\nconst defaultProps: Partial<HeaderDocAnchorProps> = {\n position: 'right',\n children: <InfoToken variant=\"question\" />,\n};\n\nexport const HeaderDocAnchor = factory<HeaderDocAnchorFactory>((_props, ref) => {\n const props = useProps('PlasmaHeaderActions', defaultProps, _props);\n const {className, classNames, styles, style, children, label, position, vars, ...others} = props;\n\n const ctx = useHeaderContext();\n\n return (\n <Tooltip\n label={label}\n disabled={!label}\n position={position}\n classNames={{tooltip: ctx.getStyles('docAnchorTooltip', {classNames, styles, props}).className}}\n >\n <Anchor\n ref={ref}\n inline\n target=\"_blank\"\n {...ctx.getStyles('docAnchor', {classNames, styles, props, style, className})}\n {...others}\n >\n {children}\n </Anchor>\n </Tooltip>\n );\n});\n\nHeaderDocAnchor.displayName = 'Header.DocAnchor';\n"],"names":["HeaderDocAnchor","defaultProps","position","children","InfoToken","variant","factory","_props","ref","props","useProps","className","classNames","styles","style","label","vars","others","ctx","useHeaderContext","Tooltip","disabled","tooltip","getStyles","Anchor","inline","target","displayName"],"mappings":";;;;+BAgDaA;;;eAAAA;;;;;;;oBAvCN;6BAEwB;yBACP;AA+BxB,IAAMC,eAA8C;IAChDC,UAAU;IACVC,wBAAU,qBAACC,oBAAS;QAACC,SAAQ;;AACjC;AAEO,IAAML,kBAAkBM,IAAAA,aAAO,EAAyB,SAACC,QAAQC;IACpE,IAAMC,QAAQC,IAAAA,cAAQ,EAAC,uBAAuBT,cAAcM;IAC5D,IAAOI,YAAoFF,MAApFE,WAAWC,aAAyEH,MAAzEG,YAAYC,SAA6DJ,MAA7DI,QAAQC,QAAqDL,MAArDK,OAAOX,WAA8CM,MAA9CN,UAAUY,QAAoCN,MAApCM,OAAOb,WAA6BO,MAA7BP,UAAUc,OAAmBP,MAAnBO,MAASC,sCAAUR;;;;;;;;;;IAE3F,IAAMS,MAAMC,IAAAA,+BAAgB;IAE5B,qBACI,qBAACC,aAAO;QACJL,OAAOA;QACPM,UAAU,CAACN;QACXb,UAAUA;QACVU,YAAY;YAACU,SAASJ,IAAIK,SAAS,CAAC,oBAAoB;gBAACX,YAAAA;gBAAYC,QAAAA;gBAAQJ,OAAAA;YAAK,GAAGE,SAAS;QAAA;kBAE9F,cAAA,qBAACa,YAAM;YACHhB,KAAKA;YACLiB,MAAM;YACNC,QAAO;WACHR,IAAIK,SAAS,CAAC,aAAa;YAACX,YAAAA;YAAYC,QAAAA;YAAQJ,OAAAA;YAAOK,OAAAA;YAAOH,WAAAA;QAAS,IACvEM;sBAEHd;;;AAIjB;AAEAH,gBAAgB2B,WAAW,GAAG"}
1
+ {"version":3,"sources":["../../../../../src/components/Header/HeaderDocAnchor/HeaderDocAnchor.tsx"],"sourcesContent":["import {\n Anchor,\n AnchorProps,\n CompoundStylesApiProps,\n Factory,\n Tooltip,\n TooltipProps,\n factory,\n useProps,\n} from '@mantine/core';\nimport {ReactNode} from 'react';\nimport {InfoToken} from '../../InfoToken/InfoToken.js';\nimport {useHeaderContext} from '../Header.context.js';\n\nexport type HeaderDocAnchorStyleNames = 'docAnchorTooltip' | 'docAnchor';\n\nexport interface HeaderDocAnchorProps\n extends\n Pick<TooltipProps, 'position'>,\n CompoundStylesApiProps<HeaderDocAnchorFactory>,\n Omit<AnchorProps, 'classNames' | 'styles' | 'variant' | 'vars'> {\n /**\n * A href pointing to documentation related to the current panel.\n * When provided, an info icon is rendered next to the title as link to this documentation\n */\n href: string;\n /**\n * The tooltip text shown when hovering over the doc link icon\n */\n label?: ReactNode;\n /**\n * React component to add the tooltip and anchor on\n */\n children?: ReactNode;\n}\n\nexport type HeaderDocAnchorFactory = Factory<{\n props: HeaderDocAnchorProps;\n ref: HTMLAnchorElement;\n stylesNames: HeaderDocAnchorStyleNames;\n compound: true;\n}>;\n\nconst defaultProps: Partial<HeaderDocAnchorProps> = {\n position: 'right',\n children: <InfoToken.Question />,\n};\n\nexport const HeaderDocAnchor = factory<HeaderDocAnchorFactory>((_props, ref) => {\n const props = useProps('PlasmaHeaderActions', defaultProps, _props);\n const {className, classNames, styles, style, children, label, position, vars, ...others} = props;\n\n const ctx = useHeaderContext();\n\n return (\n <Tooltip\n label={label}\n disabled={!label}\n position={position}\n classNames={{tooltip: ctx.getStyles('docAnchorTooltip', {classNames, styles, props}).className}}\n >\n <Anchor\n ref={ref}\n inline\n target=\"_blank\"\n {...ctx.getStyles('docAnchor', {classNames, styles, props, style, className})}\n {...others}\n >\n {children}\n </Anchor>\n </Tooltip>\n );\n});\n\nHeaderDocAnchor.displayName = 'Header.DocAnchor';\n"],"names":["HeaderDocAnchor","defaultProps","position","children","InfoToken","Question","factory","_props","ref","props","useProps","className","classNames","styles","style","label","vars","others","ctx","useHeaderContext","Tooltip","disabled","tooltip","getStyles","Anchor","inline","target","displayName"],"mappings":";;;;+BAgDaA;;;eAAAA;;;;;;;oBAvCN;yBAEiB;6BACO;AA+B/B,IAAMC,eAA8C;IAChDC,UAAU;IACVC,wBAAU,qBAACC,oBAAS,CAACC,QAAQ;AACjC;AAEO,IAAML,kBAAkBM,IAAAA,aAAO,EAAyB,SAACC,QAAQC;IACpE,IAAMC,QAAQC,IAAAA,cAAQ,EAAC,uBAAuBT,cAAcM;IAC5D,IAAOI,YAAoFF,MAApFE,WAAWC,aAAyEH,MAAzEG,YAAYC,SAA6DJ,MAA7DI,QAAQC,QAAqDL,MAArDK,OAAOX,WAA8CM,MAA9CN,UAAUY,QAAoCN,MAApCM,OAAOb,WAA6BO,MAA7BP,UAAUc,OAAmBP,MAAnBO,MAASC,sCAAUR;;;;;;;;;;IAE3F,IAAMS,MAAMC,IAAAA,+BAAgB;IAE5B,qBACI,qBAACC,aAAO;QACJL,OAAOA;QACPM,UAAU,CAACN;QACXb,UAAUA;QACVU,YAAY;YAACU,SAASJ,IAAIK,SAAS,CAAC,oBAAoB;gBAACX,YAAAA;gBAAYC,QAAAA;gBAAQJ,OAAAA;YAAK,GAAGE,SAAS;QAAA;kBAE9F,cAAA,qBAACa,YAAM;YACHhB,KAAKA;YACLiB,MAAM;YACNC,QAAO;WACHR,IAAIK,SAAS,CAAC,aAAa;YAACX,YAAAA;YAAYC,QAAAA;YAAQJ,OAAAA;YAAOK,OAAAA;YAAOH,WAAAA;QAAS,IACvEM;sBAEHd;;;AAIjB;AAEAH,gBAAgB2B,WAAW,GAAG"}
@@ -1,105 +1,49 @@
1
- import { BoxProps, Factory, MantineSize, StylesApiProps } from '@mantine/core';
1
+ import { BoxProps, Factory, PolymorphicComponentProps, StylesApiProps } from '@mantine/core';
2
+ import { FunctionComponent, ReactElement } from 'react';
2
3
  export type InfoTokenFactory = Factory<{
3
- props: InfoTokenProps;
4
+ props: InfoTokenInternalProps;
4
5
  defaultRef: HTMLDivElement;
5
6
  defaultComponent: 'div';
6
7
  stylesNames: InfoTokenComponentStylesNames;
7
8
  vars: InfoTokenCssVariables;
8
9
  variant: InfoTokenVariant;
9
- staticComponents: {
10
- Information: typeof TokenInformation;
11
- InformationOutline: typeof TokenInformationOutline;
12
- Advice: typeof TokenAdvice;
13
- Warning: typeof TokenWarning;
14
- Error: typeof TokenError;
15
- Question: typeof TokenQuestion;
16
- };
17
10
  }>;
18
11
  export type InfoTokenComponentStylesNames = 'root';
19
- export type InfoTokenVariant = 'information' | 'information-outline' | 'advice' | 'warning' | 'error' | 'question';
12
+ export type InfoTokenType = 'information' | 'advice' | 'warning' | 'error' | 'question' | 'success';
13
+ export type InfoTokenVariant = 'outline' | 'light';
14
+ export type InfoTokenSizes = 'xs' | 'sm' | 'md' | 'lg';
20
15
  export type InfoTokenCssVariables = {
21
- root: '--info-token-color';
16
+ root: '--it-color' | '--it-bg';
22
17
  };
23
- export interface InfoTokenProps extends BoxProps, StylesApiProps<InfoTokenFactory> {
18
+ interface InfoTokenInternalProps extends BoxProps, StylesApiProps<InfoTokenFactory> {
24
19
  /**
25
20
  * The variant of the token.
26
21
  *
27
- * @default 'information'
22
+ * @default 'outline'
28
23
  */
29
24
  variant?: InfoTokenVariant;
25
+ /**
26
+ * The semantic type of the token
27
+ *
28
+ * @default 'information'
29
+ */
30
+ type?: InfoTokenType;
30
31
  /**
31
32
  * The size of the info token.
32
33
  *
33
- * @default 'sm'
34
+ * @default 'xs'
34
35
  */
35
- size?: MantineSize;
36
+ size?: InfoTokenSizes;
36
37
  }
37
- export declare const InfoToken: (<C = "div">(props: import("@mantine/core").PolymorphicComponentProps<C, InfoTokenProps>) => React.ReactElement) & Omit<import("react").FunctionComponent<(InfoTokenProps & {
38
- component?: any;
39
- } & Omit<Omit<any, "ref">, "component" | keyof InfoTokenProps> & {
40
- ref?: any;
41
- renderRoot?: (props: any) => any;
42
- }) | (InfoTokenProps & {
43
- component: React.ElementType;
44
- renderRoot?: (props: Record<string, any>) => any;
45
- })>, never> & import("@mantine/core/lib/core/factory/factory").ThemeExtend<{
46
- props: InfoTokenProps;
47
- defaultRef: HTMLDivElement;
48
- defaultComponent: "div";
49
- stylesNames: InfoTokenComponentStylesNames;
50
- vars: InfoTokenCssVariables;
51
- variant: InfoTokenVariant;
52
- staticComponents: {
53
- Information: typeof TokenInformation;
54
- InformationOutline: typeof TokenInformationOutline;
55
- Advice: typeof TokenAdvice;
56
- Warning: typeof TokenWarning;
57
- Error: typeof TokenError;
58
- Question: typeof TokenQuestion;
59
- };
60
- }> & import("@mantine/core/lib/core/factory/factory").ComponentClasses<{
61
- props: InfoTokenProps;
62
- defaultRef: HTMLDivElement;
63
- defaultComponent: "div";
64
- stylesNames: InfoTokenComponentStylesNames;
65
- vars: InfoTokenCssVariables;
66
- variant: InfoTokenVariant;
67
- staticComponents: {
68
- Information: typeof TokenInformation;
69
- InformationOutline: typeof TokenInformationOutline;
70
- Advice: typeof TokenAdvice;
71
- Warning: typeof TokenWarning;
72
- Error: typeof TokenError;
73
- Question: typeof TokenQuestion;
74
- };
75
- }> & import("@mantine/core/lib/core/factory/polymorphic-factory").PolymorphicComponentWithProps<{
76
- props: InfoTokenProps;
77
- defaultRef: HTMLDivElement;
78
- defaultComponent: "div";
79
- stylesNames: InfoTokenComponentStylesNames;
80
- vars: InfoTokenCssVariables;
81
- variant: InfoTokenVariant;
82
- staticComponents: {
83
- Information: typeof TokenInformation;
84
- InformationOutline: typeof TokenInformationOutline;
85
- Advice: typeof TokenAdvice;
86
- Warning: typeof TokenWarning;
87
- Error: typeof TokenError;
88
- Question: typeof TokenQuestion;
89
- };
90
- }> & {
91
- Information: typeof TokenInformation;
92
- InformationOutline: typeof TokenInformationOutline;
93
- Advice: typeof TokenAdvice;
94
- Warning: typeof TokenWarning;
95
- Error: typeof TokenError;
96
- Question: typeof TokenQuestion;
38
+ export type InfoTokenProps = Omit<InfoTokenInternalProps, 'type'>;
39
+ type InfoTokenCompoundComponent = (<C = 'div'>(props: PolymorphicComponentProps<C, InfoTokenProps>) => ReactElement) & Omit<FunctionComponent<PolymorphicComponentProps<any, InfoTokenProps>>, never>;
40
+ export declare const InfoToken: {
41
+ readonly Information: InfoTokenCompoundComponent;
42
+ readonly Advice: InfoTokenCompoundComponent;
43
+ readonly Warning: InfoTokenCompoundComponent;
44
+ readonly Error: InfoTokenCompoundComponent;
45
+ readonly Question: InfoTokenCompoundComponent;
46
+ readonly Success: InfoTokenCompoundComponent;
97
47
  };
98
- declare const TokenInformation: <L = "div">(props: import("@mantine/core").PolymorphicComponentProps<L, InfoTokenProps>) => React.ReactElement;
99
- declare const TokenInformationOutline: <L = "div">(props: import("@mantine/core").PolymorphicComponentProps<L, InfoTokenProps>) => React.ReactElement;
100
- declare const TokenAdvice: <L = "div">(props: import("@mantine/core").PolymorphicComponentProps<L, InfoTokenProps>) => React.ReactElement;
101
- declare const TokenWarning: <L = "div">(props: import("@mantine/core").PolymorphicComponentProps<L, InfoTokenProps>) => React.ReactElement;
102
- declare const TokenError: <L = "div">(props: import("@mantine/core").PolymorphicComponentProps<L, InfoTokenProps>) => React.ReactElement;
103
- declare const TokenQuestion: <L = "div">(props: import("@mantine/core").PolymorphicComponentProps<L, InfoTokenProps>) => React.ReactElement;
104
48
  export {};
105
49
  //# sourceMappingURL=InfoToken.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"InfoToken.d.ts","sourceRoot":"","sources":["../../../../src/components/InfoToken/InfoToken.tsx"],"names":[],"mappings":"AASA,OAAO,EAEH,QAAQ,EAER,OAAO,EACP,WAAW,EAEX,cAAc,E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EAAE,KAAK,CAAC,CAAC;AA2HnF,eAAO,MAAM,SAAS;;;;;;;CAOZ,CAAC"}
@@ -15,29 +15,46 @@ var _object_without_properties = require("@swc/helpers/_/_object_without_propert
15
15
  var _jsxruntime = require("react/jsx-runtime");
16
16
  var _plasmareacticons = require("@coveord/plasma-react-icons");
17
17
  var _core = require("@mantine/core");
18
+ var _react = require("react");
18
19
  var _InfoTokenmodulecss = /*#__PURE__*/ _interop_require_default._(require("./InfoToken.module.css"));
19
20
  var defaultProps = {
20
- variant: 'information',
21
+ variant: 'outline',
22
+ type: 'information',
21
23
  size: 'xs'
22
24
  };
23
- var colorResolver = function colorResolver(variant) {
24
- switch(variant){
25
+ var colorResolver = function colorResolver(type) {
26
+ switch(type){
25
27
  case 'error':
26
28
  return 'var(--mantine-color-error)';
27
29
  case 'advice':
28
30
  case 'question':
29
31
  return 'var(--coveo-color-text-primary)';
30
32
  case 'warning':
31
- return 'var(--mantine-color-warning-filled)';
33
+ return 'var(--mantine-color-yellow-text)';
34
+ case 'success':
35
+ return 'var(--mantine-color-green-text)';
32
36
  case 'information':
33
37
  default:
34
- return 'var(--mantine-color-gray-3)';
38
+ return 'var(--mantine-color-gray-text)';
35
39
  }
36
40
  };
37
- var sizeResolver = function sizeResolver(size) {
38
- if (typeof size === 'number') {
39
- return size;
41
+ var bgColorResolver = function bgColorResolver(type) {
42
+ switch(type){
43
+ case 'error':
44
+ return 'var(--mantine-color-red-light)';
45
+ case 'advice':
46
+ case 'question':
47
+ return 'var(--mantine-primary-color-light)';
48
+ case 'warning':
49
+ return 'var(--mantine-color-yellow-light)';
50
+ case 'success':
51
+ return 'var(--mantine-color-green-light)';
52
+ case 'information':
53
+ default:
54
+ return 'var(--mantine-color-gray-light)';
40
55
  }
56
+ };
57
+ var sizeResolver = function sizeResolver(size) {
41
58
  switch(size){
42
59
  case 'sm':
43
60
  return 20;
@@ -45,43 +62,43 @@ var sizeResolver = function sizeResolver(size) {
45
62
  return 24;
46
63
  case 'lg':
47
64
  return 32;
48
- case 'xl':
49
- return 40;
50
65
  case 'xs':
51
66
  default:
52
67
  return 16;
53
68
  }
54
69
  };
55
- var iconResolver = function iconResolver(variant) {
56
- switch(variant){
70
+ var iconResolver = function iconResolver(type) {
71
+ switch(type){
57
72
  case 'error':
58
- return _plasmareacticons.IconAlertSquareFilled;
59
- case 'information':
60
- return _plasmareacticons.IconInfoCircleFilled;
61
- case 'information-outline':
62
- return _plasmareacticons.IconInfoCircle;
73
+ return _plasmareacticons.IconAlertSquare;
63
74
  case 'question':
64
75
  return _plasmareacticons.IconHelpCircle;
65
76
  case 'warning':
66
- return _plasmareacticons.IconAlertTriangleFilled;
77
+ return _plasmareacticons.IconAlertTriangle;
67
78
  case 'advice':
79
+ return _plasmareacticons.IconBulb;
80
+ case 'success':
81
+ return _plasmareacticons.IconCheck;
68
82
  default:
69
- return _plasmareacticons.IconBulbFilled;
83
+ return _plasmareacticons.IconInfoCircle;
70
84
  }
71
85
  };
72
86
  var varsResolver = (0, _core.createVarsResolver)(function(_theme, param) {
73
- var variant = param.variant;
74
- var color = colorResolver(variant);
87
+ var type = param.type;
88
+ var color = colorResolver(type);
89
+ var bgColor = bgColorResolver(type);
75
90
  return {
76
91
  root: {
77
- '--info-token-color': color
92
+ '--it-color': color,
93
+ '--it-bg': bgColor
78
94
  }
79
95
  };
80
96
  });
81
- var InfoToken = (0, _core.polymorphicFactory)(function(_props, ref) {
97
+ var _InfoToken = (0, _core.polymorphicFactory)(function(_props, ref) {
82
98
  var props = (0, _core.useProps)('InfoToken', defaultProps, _props);
83
- var variant = props.variant, vars = props.vars, className = props.className, style = props.style, unstyled = props.unstyled, styles = props.styles, classNames = props.classNames, size = props.size, others = _object_without_properties._(props, [
99
+ var variant = props.variant, type = props.type, vars = props.vars, className = props.className, style = props.style, unstyled = props.unstyled, styles = props.styles, classNames = props.classNames, size = props.size, others = _object_without_properties._(props, [
84
100
  "variant",
101
+ "type",
85
102
  "vars",
86
103
  "className",
87
104
  "style",
@@ -101,12 +118,12 @@ var InfoToken = (0, _core.polymorphicFactory)(function(_props, ref) {
101
118
  vars: vars,
102
119
  varsResolver: varsResolver
103
120
  });
104
- var IconComponent = iconResolver(variant);
121
+ var IconComponent = iconResolver(type);
105
122
  return /*#__PURE__*/ (0, _jsxruntime.jsx)(_core.Box, _object_spread_props._(_object_spread._({
106
123
  ref: ref,
107
124
  variant: variant,
108
125
  role: "img",
109
- "aria-label": variant,
126
+ "aria-label": type,
110
127
  size: size
111
128
  }, getStyles('root', {
112
129
  className: className,
@@ -119,34 +136,24 @@ var InfoToken = (0, _core.polymorphicFactory)(function(_props, ref) {
119
136
  })
120
137
  }));
121
138
  });
122
- var TokenInformation = InfoToken.withProps({
123
- variant: 'information'
124
- });
125
- TokenInformation.displayName = 'InfoToken.Information';
126
- var TokenInformationOutline = InfoToken.withProps({
127
- variant: 'information-outline'
128
- });
129
- var TokenAdvice = InfoToken.withProps({
130
- variant: 'advice'
131
- });
132
- TokenAdvice.displayName = 'InfoToken.Advice';
133
- var TokenWarning = InfoToken.withProps({
134
- variant: 'warning'
135
- });
136
- TokenWarning.displayName = 'InfoToken.Warning';
137
- var TokenError = InfoToken.withProps({
138
- variant: 'error'
139
- });
140
- TokenError.displayName = 'InfoToken.Error';
141
- var TokenQuestion = InfoToken.withProps({
142
- variant: 'question'
143
- });
144
- TokenQuestion.displayName = 'InfoToken.Question';
145
- InfoToken.Information = TokenInformation;
146
- InfoToken.InformationOutline = TokenInformationOutline;
147
- InfoToken.Advice = TokenAdvice;
148
- InfoToken.Warning = TokenWarning;
149
- InfoToken.Error = TokenError;
150
- InfoToken.Question = TokenQuestion;
139
+ var createInfoTokenCompound = function createInfoTokenCompound(type, displayName) {
140
+ var Component = (0, _core.createPolymorphicComponent)(/*#__PURE__*/ (0, _react.forwardRef)(function(props, ref) {
141
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_InfoToken, _object_spread_props._(_object_spread._({
142
+ ref: ref
143
+ }, props), {
144
+ type: type
145
+ }));
146
+ }));
147
+ Component.displayName = displayName;
148
+ return Component;
149
+ };
150
+ var InfoToken = {
151
+ Information: createInfoTokenCompound('information', 'InfoToken.Information'),
152
+ Advice: createInfoTokenCompound('advice', 'InfoToken.Advice'),
153
+ Warning: createInfoTokenCompound('warning', 'InfoToken.Warning'),
154
+ Error: createInfoTokenCompound('error', 'InfoToken.Error'),
155
+ Question: createInfoTokenCompound('question', 'InfoToken.Question'),
156
+ Success: createInfoTokenCompound('success', 'InfoToken.Success')
157
+ };
151
158
 
152
159
  //# sourceMappingURL=InfoToken.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/InfoToken/InfoToken.tsx"],"sourcesContent":["import {\n IconAlertSquareFilled,\n IconAlertTriangleFilled,\n IconBulbFilled,\n IconHelpCircle,\n IconInfoCircle,\n IconInfoCircleFilled,\n TablerIcon,\n} from '@coveord/plasma-react-icons';\nimport {\n Box,\n BoxProps,\n createVarsResolver,\n Factory,\n MantineSize,\n polymorphicFactory,\n StylesApiProps,\n useProps,\n useStyles,\n} from '@mantine/core';\nimport classes from './InfoToken.module.css';\n\nexport type InfoTokenFactory = Factory<{\n props: InfoTokenProps;\n defaultRef: HTMLDivElement;\n defaultComponent: 'div';\n stylesNames: InfoTokenComponentStylesNames;\n vars: InfoTokenCssVariables;\n variant: InfoTokenVariant;\n staticComponents: {\n Information: typeof TokenInformation;\n InformationOutline: typeof TokenInformationOutline;\n Advice: typeof TokenAdvice;\n Warning: typeof TokenWarning;\n Error: typeof TokenError;\n Question: typeof TokenQuestion;\n };\n}>;\nexport type InfoTokenComponentStylesNames = 'root';\nexport type InfoTokenVariant = 'information' | 'information-outline' | 'advice' | 'warning' | 'error' | 'question';\nexport type InfoTokenCssVariables = {\n root: '--info-token-color';\n};\n\nexport interface InfoTokenProps extends BoxProps, StylesApiProps<InfoTokenFactory> {\n /**\n * The variant of the token.\n *\n * @default 'information'\n */\n variant?: InfoTokenVariant;\n /**\n * The size of the info token.\n *\n * @default 'sm'\n */\n size?: MantineSize;\n}\n\nconst defaultProps: Partial<InfoTokenProps> = {variant: 'information', size: 'xs'};\n\nconst colorResolver = (variant: InfoTokenVariant): string => {\n switch (variant) {\n case 'error':\n return 'var(--mantine-color-error)';\n case 'advice':\n case 'question':\n return 'var(--coveo-color-text-primary)';\n case 'warning':\n return 'var(--mantine-color-warning-filled)';\n case 'information':\n default:\n return 'var(--mantine-color-gray-3)';\n }\n};\n\nconst sizeResolver = (size: MantineSize): number => {\n if (typeof size === 'number') {\n return size;\n }\n switch (size) {\n case 'sm':\n return 20;\n case 'md':\n return 24;\n case 'lg':\n return 32;\n case 'xl':\n return 40;\n case 'xs':\n default:\n return 16;\n }\n};\n\nconst iconResolver = (variant: InfoTokenVariant): TablerIcon => {\n switch (variant) {\n case 'error':\n return IconAlertSquareFilled;\n case 'information':\n return IconInfoCircleFilled;\n case 'information-outline':\n return IconInfoCircle;\n case 'question':\n return IconHelpCircle;\n case 'warning':\n return IconAlertTriangleFilled;\n case 'advice':\n default:\n return IconBulbFilled;\n }\n};\n\nconst varsResolver = createVarsResolver<InfoTokenFactory>((_theme, {variant}) => {\n const color = colorResolver(variant);\n return {\n root: {\n '--info-token-color': color,\n },\n };\n});\n\nexport const InfoToken = polymorphicFactory<InfoTokenFactory>((_props, ref) => {\n const props = useProps('InfoToken', defaultProps, _props);\n const {variant, vars, className, style, unstyled, styles, classNames, size, ...others} = props;\n const getStyles = useStyles<InfoTokenFactory>({\n name: 'InfoToken',\n classes,\n className,\n props,\n style,\n styles,\n unstyled,\n vars,\n varsResolver,\n });\n const IconComponent = iconResolver(variant);\n return (\n <Box\n ref={ref}\n variant={variant}\n role=\"img\"\n aria-label={variant}\n size={size}\n {...getStyles('root', {\n className,\n style,\n styles,\n classNames,\n })}\n {...others}\n >\n <IconComponent size={sizeResolver(size)} />\n </Box>\n );\n});\n\nconst TokenInformation = InfoToken.withProps({\n variant: 'information',\n});\n(TokenInformation as typeof InfoToken).displayName = 'InfoToken.Information';\nconst TokenInformationOutline = InfoToken.withProps({\n variant: 'information-outline',\n});\nconst TokenAdvice = InfoToken.withProps({variant: 'advice'});\n(TokenAdvice as typeof InfoToken).displayName = 'InfoToken.Advice';\nconst TokenWarning = InfoToken.withProps({variant: 'warning'});\n(TokenWarning as typeof InfoToken).displayName = 'InfoToken.Warning';\nconst TokenError = InfoToken.withProps({variant: 'error'});\n(TokenError as typeof InfoToken).displayName = 'InfoToken.Error';\nconst TokenQuestion = InfoToken.withProps({variant: 'question'});\n(TokenQuestion as typeof InfoToken).displayName = 'InfoToken.Question';\n\nInfoToken.Information = TokenInformation;\nInfoToken.InformationOutline = TokenInformationOutline;\nInfoToken.Advice = TokenAdvice;\nInfoToken.Warning = TokenWarning;\nInfoToken.Error = TokenError;\nInfoToken.Question = TokenQuestion;\n"],"names":["InfoToken","defaultProps","variant","size","colorResolver","sizeResolver","iconResolver","IconAlertSquareFilled","IconInfoCircleFilled","IconInfoCircle","IconHelpCircle","IconAlertTriangleFilled","IconBulbFilled","varsResolver","createVarsResolver","_theme","color","root","polymorphicFactory","_props","ref","props","useProps","vars","className","style","unstyled","styles","classNames","others","getStyles","useStyles","name","classes","IconComponent","Box","role","aria-label","TokenInformation","withProps","displayName","TokenInformationOutline","TokenAdvice","TokenWarning","TokenError","TokenQuestion","Information","InformationOutline","Advice","Warning","Error","Question"],"mappings":";;;;+BA0HaA;;;eAAAA;;;;;;;;gCAlHN;oBAWA;2EACa;AAuCpB,IAAMC,eAAwC;IAACC,SAAS;IAAeC,MAAM;AAAI;AAEjF,IAAMC,gBAAgB,uBAACF;IACnB,OAAQA;QACJ,KAAK;YACD,OAAO;QACX,KAAK;QACL,KAAK;YACD,OAAO;QACX,KAAK;YACD,OAAO;QACX,KAAK;QACL;YACI,OAAO;IACf;AACJ;AAEA,IAAMG,eAAe,sBAACF;IAClB,IAAI,OAAOA,SAAS,UAAU;QAC1B,OAAOA;IACX;IACA,OAAQA;QACJ,KAAK;YACD,OAAO;QACX,KAAK;YAC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EJ,cAAA,qBAACK;YAAc/B,MAAME,aAAaF;;;AAG9C;AAEA,IAAMmC,mBAAmBtC,UAAUuC,SAAS,CAAC;IACzCrC,SAAS;AACb;AACCoC,iBAAsCE,WAAW,GAAG;AACrD,IAAMC,0BAA0BzC,UAAUuC,SAAS,CAAC;IAChDrC,SAAS;AACb;AACA,IAAMwC,cAAc1C,UAAUuC,SAAS,CAAC;IAACrC,SAAS;AAAQ;AACzDwC,YAAiCF,WAAW,GAAG;AAChD,IAAMG,eAAe3C,UAAUuC,SAAS,CAAC;IAACrC,SAAS;AAAS;AAC3DyC,aAAkCH,WAAW,GAAG;AACjD,IAAMI,aAAa5C,UAAUuC,SAAS,CAAC;IAACrC,SAAS;AAAO;AACvD0C,WAAgCJ,WAAW,GAAG;AAC/C,IAAMK,gBAAgB7C,UAAUuC,SAAS,CAAC;IAACrC,SAAS;AAAU;AAC7D2C,cAAmCL,WAAW,GAAG;AAElDxC,UAAU8C,WAAW,GAAGR;AACxBtC,UAAU+C,kBAAkB,GAAGN;AAC/BzC,UAAUgD,MAAM,GAAGN;AACnB1C,UAAUiD,OAAO,GAAGN;AACpB3C,UAAUkD,KAAK,GAAGN;AAClB5C,UAAUmD,QAAQ,GAAGN"}
1
+ {"version":3,"sources":["../../../../src/components/InfoToken/InfoToken.tsx"],"sourcesContent":["import {\n IconAlertSquare,\n IconAlertTriangle,\n IconBulb,\n IconCheck,\n IconHelpCircle,\n IconInfoCircle,\n TablerIcon,\n} from '@coveord/plasma-react-icons';\nimport {\n Box,\n BoxProps,\n createPolymorphicComponent,\n createVarsResolver,\n Factory,\n PolymorphicComponentProps,\n polymorphicFactory,\n StylesApiProps,\n useProps,\n useStyles,\n} from '@mantine/core';\nimport {forwardRef, FunctionComponent, ReactElement} from 'react';\nimport classes from './InfoToken.module.css';\n\nexport type InfoTokenFactory = Factory<{\n props: InfoTokenInternalProps;\n defaultRef: HTMLDivElement;\n defaultComponent: 'div';\n stylesNames: InfoTokenComponentStylesNames;\n vars: InfoTokenCssVariables;\n variant: InfoTokenVariant;\n}>;\nexport type InfoTokenComponentStylesNames = 'root';\nexport type InfoTokenType = 'information' | 'advice' | 'warning' | 'error' | 'question' | 'success';\nexport type InfoTokenVariant = 'outline' | 'light';\nexport type InfoTokenSizes = 'xs' | 'sm' | 'md' | 'lg';\nexport type InfoTokenCssVariables = {\n root: '--it-color' | '--it-bg';\n};\n\ninterface InfoTokenInternalProps extends BoxProps, StylesApiProps<InfoTokenFactory> {\n /**\n * The variant of the token.\n *\n * @default 'outline'\n */\n variant?: InfoTokenVariant;\n /**\n * The semantic type of the token\n *\n * @default 'information'\n */\n type?: InfoTokenType;\n /**\n * The size of the info token.\n *\n * @default 'xs'\n */\n size?: InfoTokenSizes;\n}\n\nexport type InfoTokenProps = Omit<InfoTokenInternalProps, 'type'>;\n\ntype InfoTokenCompoundComponent = (<C = 'div'>(props: PolymorphicComponentProps<C, InfoTokenProps>) => ReactElement) &\n Omit<FunctionComponent<PolymorphicComponentProps<any, InfoTokenProps>>, never>;\n\nconst defaultProps: Partial<InfoTokenInternalProps> = {variant: 'outline', type: 'information', size: 'xs'};\n\nconst colorResolver = (type: InfoTokenType): string => {\n switch (type) {\n case 'error':\n return 'var(--mantine-color-error)';\n case 'advice':\n case 'question':\n return 'var(--coveo-color-text-primary)';\n case 'warning':\n return 'var(--mantine-color-yellow-text)';\n case 'success':\n return 'var(--mantine-color-green-text)';\n case 'information':\n default:\n return 'var(--mantine-color-gray-text)';\n }\n};\n\nconst bgColorResolver = (type: InfoTokenType): string => {\n switch (type) {\n case 'error':\n return 'var(--mantine-color-red-light)';\n case 'advice':\n case 'question':\n return 'var(--mantine-primary-color-light)';\n case 'warning':\n return 'var(--mantine-color-yellow-light)';\n case 'success':\n return 'var(--mantine-color-green-light)';\n case 'information':\n default:\n return 'var(--mantine-color-gray-light)';\n }\n};\n\nconst sizeResolver = (size: InfoTokenSizes): number => {\n switch (size) {\n case 'sm':\n return 20;\n case 'md':\n return 24;\n case 'lg':\n return 32;\n case 'xs':\n default:\n return 16;\n }\n};\n\nconst iconResolver = (type: InfoTokenType): TablerIcon => {\n switch (type) {\n case 'error':\n return IconAlertSquare;\n case 'question':\n return IconHelpCircle;\n case 'warning':\n return IconAlertTriangle;\n case 'advice':\n return IconBulb;\n case 'success':\n return IconCheck;\n default:\n return IconInfoCircle;\n }\n};\n\nconst varsResolver = createVarsResolver<InfoTokenFactory>((_theme, {type}) => {\n const color = colorResolver(type);\n const bgColor = bgColorResolver(type);\n return {\n root: {\n '--it-color': color,\n '--it-bg': bgColor,\n },\n };\n});\n\nconst _InfoToken = polymorphicFactory<InfoTokenFactory>((_props, ref) => {\n const props = useProps('InfoToken', defaultProps, _props);\n const {variant, type, vars, className, style, unstyled, styles, classNames, size, ...others} = props;\n const getStyles = useStyles<InfoTokenFactory>({\n name: 'InfoToken',\n classes,\n className,\n props,\n style,\n styles,\n unstyled,\n vars,\n varsResolver,\n });\n const IconComponent = iconResolver(type);\n return (\n <Box\n ref={ref}\n variant={variant}\n role=\"img\"\n aria-label={type}\n size={size}\n {...getStyles('root', {\n className,\n style,\n styles,\n classNames,\n })}\n {...others}\n >\n <IconComponent size={sizeResolver(size)} />\n </Box>\n );\n});\n\nconst createInfoTokenCompound = (type: InfoTokenType, displayName: string): InfoTokenCompoundComponent => {\n const Component: InfoTokenCompoundComponent = createPolymorphicComponent<'div', InfoTokenProps>(\n forwardRef<any, InfoTokenProps>((props, ref) => <_InfoToken ref={ref} {...props} type={type} />),\n );\n Component.displayName = displayName;\n return Component;\n};\n\nexport const InfoToken = {\n Information: createInfoTokenCompound('information', 'InfoToken.Information'),\n Advice: createInfoTokenCompound('advice', 'InfoToken.Advice'),\n Warning: createInfoTokenCompound('warning', 'InfoToken.Warning'),\n Error: createInfoTokenCompound('error', 'InfoToken.Error'),\n Question: createInfoTokenCompound('question', 'InfoToken.Question'),\n Success: createInfoTokenCompound('success', 'InfoToken.Success'),\n} as const;\n"],"names":["InfoToken","defaultProps","variant","type","size","colorResolver","bgColorResolver","sizeResolver","iconResolver","IconAlertSquare","IconHelpCircle","IconAlertTriangle","IconBulb","IconCheck","IconInfoCircle","varsResolver","createVarsResolver","_theme","color","bgColor","root","_InfoToken","polymorphicFactory","_props","ref","props","useProps","vars","className","style","unstyled","styles","classNames","others","getStyles","useStyles","name","classes","IconComponent","Box","role","aria-label","createInfoTokenCompound","displayName","Component","createPolymorphicComponent","forwardRef","Information","Advice","Warning","Error","Question","Success"],"mappings":";;;;+BA2LaA;;;eAAAA;;;;;;;;gCAnLN;oBAYA;qBACmD;2EACtC;AA4CpB,IAAMC,eAAgD;IAACC,SAAS;IAAWC,MAAM;IAAeC,MAAM;AAAI;AAE1G,IAAMC,gBAAgB,uBAACF;IACnB,OAAQA;QACJ,KAAK;YACD,OAAO;QACX,KAAK;QACL,KAAK;YACD,OAAO;QACX,KAAK;YACD,OAAO;QACX,KAAK;YACD,OAAO;QACX,KAAK;QACL;YACI,OAAO;IACf;AACJ;AAEA,IAAMG,kBAAkB,yBAACH;IACrB,OAAQA;QACJ,KAAK;YACD,OAAO;QACX,KAAK;QACL,KAAK;YACD,OAAO;QACX,KAAK;YACD,OAAO;QACX,KAAK;YACD,OAAO;QACX,KAAK;QACL;YACI,OAAO;IACf;AACJ;AAEA,IAAMI,eAAe,sBAACH;IAClB,OAAQA;QACJ,KAAK;YACD,OAAO;QACX,KAAK;YACD,OAAO;QACX,KAAK;YACD,OAAO;QACX,KAAK;QACL;YACI,OAAO;IACf;AACJ;AAEA,IAAMI,eAAe,sBAACL;IAClB,OAAQA;QACJ,KAAK;YACD,OAAOM,iCAAe;QAC1B,KAAK;YACD,OAAOC,gCAAc;QACzB,KAAK;YACD,OAAOC,mCAAiB;QAC5B,KAAK;YACD,OAAOC,0BAAQ;QACnB,KAAK;YACD,OAAOC,2BAAS;QACpB;YACI,OAAOC,gCAAc;IAC7B;AACJ;AAEA,IAAMC,eAAeC,IAAAA,wBAAkB,EAAmB,SAACC;QAASd,aAAAA;IACh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AAwB,UAAU;IAC1CO,SAASP,wBAAwB,WAAW;IAC5CQ,OAAOR,wBAAwB,SAAS;IACxCS,UAAUT,wBAAwB,YAAY;IAC9CU,SAASV,wBAAwB,WAAW;AAChD"}
@@ -1,8 +1,16 @@
1
1
  .root {
2
- --info-token-color: var(--mantine-color-primary);
3
-
4
2
  display: inline-flex;
5
3
  flex-shrink: 0;
6
4
  align-items: center;
7
- color: var(--info-token-color);
5
+ color: var(--it-color);
6
+
7
+ &[data-variant='light'] {
8
+ background-color: var(--it-bg);
9
+ border-radius: var(--mantine-spacing-xxs);
10
+ padding: var(--mantine-spacing-xs);
11
+
12
+ &[data-size='xs'] {
13
+ padding: var(--mantine-spacing-xxs);
14
+ }
15
+ }
8
16
  }
@@ -12,7 +12,7 @@ export declare const InlineConfirmTarget: (<C = (<C_1 = "button">(props: import(
12
12
  }) | (ButtonProps & {
13
13
  component: React.ElementType;
14
14
  renderRoot?: (props: Record<string, any>) => any;
15
- })>, never> & import("@mantine/core/lib/core/factory/factory.js").ThemeExtend<{
15
+ })>, never> & import("@mantine/core").ThemeExtend<{
16
16
  props: ButtonProps;
17
17
  defaultRef: HTMLButtonElement;
18
18
  defaultComponent: "button";
@@ -30,7 +30,7 @@ export declare const InlineConfirmTarget: (<C = (<C_1 = "button">(props: import(
30
30
  DestructiveTertiary: <L = "button">(props: import("@mantine/core").PolymorphicComponentProps<L, ButtonProps>) => React.ReactElement;
31
31
  DestructiveQuaternary: <L = "button">(props: import("@mantine/core").PolymorphicComponentProps<L, ButtonProps>) => React.ReactElement;
32
32
  };
33
- }> & import("@mantine/core/lib/core/factory/factory.js").ComponentClasses<{
33
+ }> & import("@mantine/core").ComponentClasses<{
34
34
  props: ButtonProps;
35
35
  defaultRef: HTMLButtonElement;
36
36
  defaultComponent: "button";
@@ -48,7 +48,7 @@ export declare const InlineConfirmTarget: (<C = (<C_1 = "button">(props: import(
48
48
  DestructiveTertiary: <L = "button">(props: import("@mantine/core").PolymorphicComponentProps<L, ButtonProps>) => React.ReactElement;
49
49
  DestructiveQuaternary: <L = "button">(props: import("@mantine/core").PolymorphicComponentProps<L, ButtonProps>) => React.ReactElement;
50
50
  };
51
- }> & import("@mantine/core/lib/core/factory/polymorphic-factory.js").PolymorphicComponentWithProps<{
51
+ }> & import("@mantine/core").PolymorphicComponentWithProps<{
52
52
  props: ButtonProps;
53
53
  defaultRef: HTMLButtonElement;
54
54
  defaultComponent: "button";
@@ -1,2 +1,15 @@
1
- export { Input, type InputFactory, type InputProps } from '@mantine/core';
1
+ import { Input as MantineInput, type InputFactory as MantineInputFactory, type InputProps } from '@mantine/core';
2
+ import { InputLabelInfo, type InputLabelInfoFactory, type InputLabelInfoProps, type InputLabelInfoStylesNames } from './InputLabelInfo.js';
3
+ type PlasmaInputFactory = Omit<MantineInputFactory, 'staticComponents'> & {
4
+ staticComponents: MantineInputFactory['staticComponents'] & {
5
+ LabelInfo: typeof InputLabelInfo;
6
+ };
7
+ };
8
+ declare const Input: typeof MantineInput & {
9
+ LabelInfo: typeof InputLabelInfo;
10
+ };
11
+ export { Input };
12
+ export type InputFactory = PlasmaInputFactory;
13
+ export type { InputProps, InputLabelInfoFactory, InputLabelInfoProps, InputLabelInfoStylesNames };
14
+ export { InputLabelInfo };
2
15
  //# sourceMappingURL=Input.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/Input.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,KAAK,EAAE,KAAK,YAAY,EAAE,KAAK,UAAU,EAAC,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/Input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,IAAI,YAAY,EAAE,KAAK,YAAY,IAAI,mBAAmB,EAAE,KAAK,UAAU,EAAC,MAAM,eAAe,CAAC;AAC/G,OAAO,EACH,cAAc,EACd,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,EACjC,MAAM,qBAAqB,CAAC;AAE7B,KAAK,kBAAkB,GAAG,IAAI,CAAC,mBAAmB,EAAE,kBAAkB,CAAC,GAAG;IACtE,gBAAgB,EAAE,mBAAmB,CAAC,kBAAkB,CAAC,GAAG;QACxD,SAAS,EAAE,OAAO,cAAc,CAAC;KACpC,CAAC;CACL,CAAC;AAEF,QAAA,MAAM,KAAK,EAAmB,OAAO,YAAY,GAAG;IAChD,SAAS,EAAE,OAAO,cAAc,CAAC;CACpC,CAAC;AAOF,OAAO,EAAC,KAAK,EAAC,CAAC;AACf,MAAM,MAAM,YAAY,GAAG,kBAAkB,CAAC;AAC9C,YAAY,EAAC,UAAU,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,yBAAyB,EAAC,CAAC;AAChG,OAAO,EAAC,cAAc,EAAC,CAAC"}
@@ -2,13 +2,25 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- Object.defineProperty(exports, "Input", {
6
- enumerable: true,
7
- get: function() {
8
- return _core.Input;
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
+ });
10
+ }
11
+ _export(exports, {
12
+ get Input () {
13
+ return Input;
14
+ },
15
+ get InputLabelInfo () {
16
+ return _InputLabelInfo.InputLabelInfo;
9
17
  }
10
18
  });
11
19
  var _core = require("@mantine/core");
12
- _core.Input.displayName = 'Input';
20
+ var _InputLabelInfo = require("./InputLabelInfo.js");
21
+ var Input = _core.Input;
22
+ Input.displayName = 'Input';
23
+ Input.LabelInfo = _InputLabelInfo.InputLabelInfo;
24
+ _InputLabelInfo.InputLabelInfo.displayName = 'Input.LabelInfo';
13
25
 
14
26
  //# sourceMappingURL=Input.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/Input/Input.ts"],"sourcesContent":["import {Input} from '@mantine/core';\n\nInput.displayName = 'Input';\n\nexport {Input, type InputFactory, type InputProps} from '@mantine/core';\n"],"names":["Input","displayName"],"mappings":";;;;+BAIQA;;;eAAAA,WAAK;;;oBAJO;AAEpBA,WAAK,CAACC,WAAW,GAAG"}
1
+ {"version":3,"sources":["../../../../src/components/Input/Input.ts"],"sourcesContent":["import {Input as MantineInput, type InputFactory as MantineInputFactory, type InputProps} from '@mantine/core';\nimport {\n InputLabelInfo,\n type InputLabelInfoFactory,\n type InputLabelInfoProps,\n type InputLabelInfoStylesNames,\n} from './InputLabelInfo.js';\n\ntype PlasmaInputFactory = Omit<MantineInputFactory, 'staticComponents'> & {\n staticComponents: MantineInputFactory['staticComponents'] & {\n LabelInfo: typeof InputLabelInfo;\n };\n};\n\nconst Input = MantineInput as typeof MantineInput & {\n LabelInfo: typeof InputLabelInfo;\n};\n\nInput.displayName = 'Input';\nInput.LabelInfo = InputLabelInfo;\n\nInputLabelInfo.displayName = 'Input.LabelInfo';\n\nexport {Input};\nexport type InputFactory = PlasmaInputFactory;\nexport type {InputProps, InputLabelInfoFactory, InputLabelInfoProps, InputLabelInfoStylesNames};\nexport {InputLabelInfo};\n"],"names":["Input","InputLabelInfo","MantineInput","displayName","LabelInfo"],"mappings":";;;;;;;;;;;QAuBQA;eAAAA;;QAGAC;eAAAA,8BAAc;;;oBA1ByE;8BAMxF;AAQP,IAAMD,QAAQE,WAAY;AAI1BF,MAAMG,WAAW,GAAG;AACpBH,MAAMI,SAAS,GAAGH,8BAAc;AAEhCA,8BAAc,CAACE,WAAW,GAAG"}
@@ -0,0 +1,17 @@
1
+ import { StylesApiProps, type Factory, type TooltipProps } from '@mantine/core';
2
+ import { type ReactNode } from 'react';
3
+ export type InputLabelInfoStylesNames = 'labelInfo';
4
+ export interface InputLabelInfoProps extends Omit<TooltipProps, 'label' | 'classNames' | 'attributes' | 'styles' | 'vars'>, StylesApiProps<InputLabelInfoFactory> {
5
+ children: ReactNode;
6
+ }
7
+ export type InputLabelInfoFactory = Factory<{
8
+ props: InputLabelInfoProps;
9
+ ref: HTMLSpanElement;
10
+ stylesNames: InputLabelInfoStylesNames;
11
+ }>;
12
+ export declare const InputLabelInfo: import("@mantine/core").MantineComponent<{
13
+ props: InputLabelInfoProps;
14
+ ref: HTMLSpanElement;
15
+ stylesNames: InputLabelInfoStylesNames;
16
+ }>;
17
+ //# sourceMappingURL=InputLabelInfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputLabelInfo.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/InputLabelInfo.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,cAAc,EAAgC,KAAK,OAAO,EAAE,KAAK,YAAY,EAAC,MAAM,eAAe,CAAC;AACrH,OAAO,EAAC,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAIrC,MAAM,MAAM,yBAAyB,GAAG,WAAW,CAAC;AAEpD,MAAM,WAAW,mBACb,SACI,IAAI,CAAC,YAAY,EAAE,OAAO,GAAG,YAAY,GAAG,YAAY,GAAG,QAAQ,GAAG,MAAM,CAAC,EAC7E,cAAc,CAAC,qBAAqB,CAAC;IACzC,QAAQ,EAAE,SAAS,CAAC;CACvB;AAED,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAAC;IACxC,KAAK,EAAE,mBAAmB,CAAC;IAC3B,GAAG,EAAE,eAAe,CAAC;IACrB,WAAW,EAAE,yBAAyB,CAAC;CAC1C,CAAC,CAAC;AAIH,eAAO,MAAM,cAAc;WAPhB,mBAAmB;SACrB,eAAe;iBACP,yBAAyB;EAyBxC,CAAC"}