@oneplatformdev/ui 0.1.99-beta.24 → 0.1.99-beta.240

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 (226) hide show
  1. package/Accordion/Accordion.d.ts +1 -1
  2. package/Accordion/Accordion.d.ts.map +1 -1
  3. package/Accordion/Accordion.js +48 -26
  4. package/Accordion/Accordion.js.map +1 -1
  5. package/AlertDialog/AlertDialog.stories.js +3 -2
  6. package/AlertDialog/AlertDialog.stories.js.map +1 -1
  7. package/AlertDialog/AlertDialogRoot.d.ts.map +1 -1
  8. package/AlertDialog/AlertDialogRoot.js +26 -24
  9. package/AlertDialog/AlertDialogRoot.js.map +1 -1
  10. package/Button/Button.d.ts.map +1 -1
  11. package/Button/Button.js +43 -43
  12. package/Button/Button.js.map +1 -1
  13. package/Button/Button.stories.js +15 -12
  14. package/Button/Button.stories.js.map +1 -1
  15. package/Button/Button.utils.d.ts +3 -0
  16. package/Button/Button.utils.d.ts.map +1 -0
  17. package/Button/Button.utils.js +14 -0
  18. package/Button/Button.utils.js.map +1 -0
  19. package/Button/buttonVariants.d.ts +2 -2
  20. package/Button/buttonVariants.d.ts.map +1 -1
  21. package/Button/buttonVariants.js +39 -6
  22. package/Button/buttonVariants.js.map +1 -1
  23. package/Button/index.d.ts +1 -0
  24. package/Button/index.d.ts.map +1 -1
  25. package/Button/index.js +8 -6
  26. package/Button/index.js.map +1 -1
  27. package/ButtonIcon/ButtonIcon.d.ts.map +1 -1
  28. package/ButtonIcon/ButtonIcon.js +41 -39
  29. package/ButtonIcon/ButtonIcon.js.map +1 -1
  30. package/ButtonIcon/ButtonIcon.stories.js +35 -33
  31. package/ButtonIcon/ButtonIcon.stories.js.map +1 -1
  32. package/ButtonIcon/buttonIconVariants.d.ts +1 -1
  33. package/ButtonIcon/buttonIconVariants.d.ts.map +1 -1
  34. package/ButtonIcon/buttonIconVariants.js +4 -2
  35. package/ButtonIcon/buttonIconVariants.js.map +1 -1
  36. package/CHANGELOG.md +1359 -0
  37. package/Calendar/Calendar.js +5 -4
  38. package/Calendar/Calendar.js.map +1 -1
  39. package/Card/Card.d.ts.map +1 -1
  40. package/Card/Card.js +22 -21
  41. package/Card/Card.js.map +1 -1
  42. package/Checkbox/Checkbox.d.ts.map +1 -1
  43. package/Checkbox/Checkbox.js +36 -34
  44. package/Checkbox/Checkbox.js.map +1 -1
  45. package/Checkbox/Checkbox.stories.js +108 -0
  46. package/Checkbox/Checkbox.stories.js.map +1 -0
  47. package/Combobox/Combobox.d.ts +4 -2
  48. package/Combobox/Combobox.d.ts.map +1 -1
  49. package/Combobox/Combobox.js +183 -195
  50. package/Combobox/Combobox.js.map +1 -1
  51. package/Combobox/Combobox.stories.js +293 -0
  52. package/Combobox/Combobox.stories.js.map +1 -0
  53. package/Combobox/Combobox.types.d.ts +68 -24
  54. package/Combobox/Combobox.types.d.ts.map +1 -1
  55. package/Combobox/Combobox.types.js +4 -1
  56. package/Combobox/Combobox.types.js.map +1 -1
  57. package/Combobox/ComboboxOptionItem.d.ts +5 -3
  58. package/Combobox/ComboboxOptionItem.d.ts.map +1 -1
  59. package/Combobox/ComboboxOptionItem.js +79 -23
  60. package/Combobox/ComboboxOptionItem.js.map +1 -1
  61. package/Combobox/ComboboxRenderContent.d.ts +23 -0
  62. package/Combobox/ComboboxRenderContent.d.ts.map +1 -0
  63. package/Combobox/ComboboxRenderContent.js +117 -0
  64. package/Combobox/ComboboxRenderContent.js.map +1 -0
  65. package/Combobox/ComboboxRenderOptions.d.ts +4 -0
  66. package/Combobox/ComboboxRenderOptions.d.ts.map +1 -0
  67. package/Combobox/ComboboxRenderOptions.js +53 -0
  68. package/Combobox/ComboboxRenderOptions.js.map +1 -0
  69. package/Combobox/ComboboxRenderTrigger.d.ts +18 -0
  70. package/Combobox/ComboboxRenderTrigger.d.ts.map +1 -0
  71. package/Combobox/ComboboxRenderTrigger.js +120 -0
  72. package/Combobox/ComboboxRenderTrigger.js.map +1 -0
  73. package/Command/Command.d.ts +6 -1
  74. package/Command/Command.d.ts.map +1 -1
  75. package/Command/Command.js +61 -43
  76. package/Command/Command.js.map +1 -1
  77. package/ContextPopover/ContextDropdownMenu.d.ts +12 -0
  78. package/ContextPopover/ContextDropdownMenu.d.ts.map +1 -0
  79. package/ContextPopover/ContextDropdownMenu.js +41 -0
  80. package/ContextPopover/ContextDropdownMenu.js.map +1 -0
  81. package/ContextPopover/ContextPopover.d.ts +12 -0
  82. package/ContextPopover/ContextPopover.d.ts.map +1 -0
  83. package/ContextPopover/ContextPopover.js +34 -0
  84. package/ContextPopover/ContextPopover.js.map +1 -0
  85. package/ContextPopover/index.d.ts +4 -0
  86. package/ContextPopover/index.d.ts.map +1 -0
  87. package/ContextPopover/index.js +9 -0
  88. package/ContextPopover/index.js.map +1 -0
  89. package/ContextPopover/useContextPopoverHandler.d.ts +14 -0
  90. package/ContextPopover/useContextPopoverHandler.d.ts.map +1 -0
  91. package/ContextPopover/useContextPopoverHandler.js +21 -0
  92. package/ContextPopover/useContextPopoverHandler.js.map +1 -0
  93. package/DataTable/DataTable.js +16 -15
  94. package/DataTable/DataTable.js.map +1 -1
  95. package/Dialog/Dialog.d.ts +4 -1
  96. package/Dialog/Dialog.d.ts.map +1 -1
  97. package/Dialog/Dialog.js +68 -34
  98. package/Dialog/Dialog.js.map +1 -1
  99. package/Dialog/Dialog.stories.js +102 -0
  100. package/Dialog/Dialog.stories.js.map +1 -0
  101. package/Dialog/Dialog.types.d.ts +4 -0
  102. package/Dialog/Dialog.types.d.ts.map +1 -0
  103. package/Dialog/Dialog.types.js +2 -0
  104. package/Dialog/Dialog.types.js.map +1 -0
  105. package/Dialog/index.d.ts +1 -0
  106. package/Dialog/index.d.ts.map +1 -1
  107. package/DropdownMenu/DropdownMenu.d.ts.map +1 -1
  108. package/DropdownMenu/DropdownMenu.js +33 -20
  109. package/DropdownMenu/DropdownMenu.js.map +1 -1
  110. package/Dropzone/Dropzone.d.ts.map +1 -1
  111. package/Dropzone/Dropzone.js +46 -28
  112. package/Dropzone/Dropzone.js.map +1 -1
  113. package/Dropzone/Dropzone.stories.js +100 -0
  114. package/Dropzone/Dropzone.stories.js.map +1 -0
  115. package/Dropzone/Dropzone.types.js +6 -6
  116. package/Dropzone/Dropzone.types.js.map +1 -1
  117. package/Form/Form.d.ts.map +1 -1
  118. package/Form/Form.js.map +1 -1
  119. package/Form/FormRenderControl.d.ts +1 -1
  120. package/Form/FormRenderControl.d.ts.map +1 -1
  121. package/Form/FormRenderControl.js +54 -14
  122. package/Form/FormRenderControl.js.map +1 -1
  123. package/Form/FormRenderControl.types.d.ts +5 -2
  124. package/Form/FormRenderControl.types.d.ts.map +1 -1
  125. package/FormCombobox/FormCombobox.d.ts +4 -2
  126. package/FormCombobox/FormCombobox.d.ts.map +1 -1
  127. package/FormCombobox/FormCombobox.js +30 -17
  128. package/FormCombobox/FormCombobox.js.map +1 -1
  129. package/FormCombobox/FormCombobox.types.d.ts +6 -2
  130. package/FormCombobox/FormCombobox.types.d.ts.map +1 -1
  131. package/FormDatePicker/FormDatePicker.d.ts.map +1 -1
  132. package/FormDatePicker/FormDatePicker.js +18 -16
  133. package/FormDatePicker/FormDatePicker.js.map +1 -1
  134. package/FormDropzone/FormDropzone.d.ts.map +1 -1
  135. package/FormDropzone/FormDropzone.js +11 -9
  136. package/FormDropzone/FormDropzone.js.map +1 -1
  137. package/FormInput/FormInput.d.ts.map +1 -1
  138. package/FormInput/FormInput.js +47 -27
  139. package/FormInput/FormInput.js.map +1 -1
  140. package/FormInput/FormInput.stories.js +61 -0
  141. package/FormInput/FormInput.stories.js.map +1 -0
  142. package/FormInput/FormInput.types.d.ts +1 -0
  143. package/FormInput/FormInput.types.d.ts.map +1 -1
  144. package/FormSelect/FormSelect.d.ts.map +1 -1
  145. package/FormSelect/FormSelect.js +21 -17
  146. package/FormSelect/FormSelect.js.map +1 -1
  147. package/FormTextarea/FormTextarea.d.ts.map +1 -1
  148. package/FormTextarea/FormTextarea.js +15 -12
  149. package/FormTextarea/FormTextarea.js.map +1 -1
  150. package/InfoBlock/InfoBlock.d.ts +7 -0
  151. package/InfoBlock/InfoBlock.d.ts.map +1 -0
  152. package/InfoBlock/InfoBlock.js +28 -0
  153. package/InfoBlock/InfoBlock.js.map +1 -0
  154. package/InfoBlock/InfoBlock.stories.js +50 -0
  155. package/InfoBlock/InfoBlock.stories.js.map +1 -0
  156. package/InfoBlock/InfoBlock.types.d.ts +9 -0
  157. package/InfoBlock/InfoBlock.types.d.ts.map +1 -0
  158. package/InfoBlock/InfoBlock.types.js +2 -0
  159. package/InfoBlock/InfoBlock.types.js.map +1 -0
  160. package/InfoBlock/index.d.ts +3 -0
  161. package/InfoBlock/index.d.ts.map +1 -0
  162. package/InfoBlock/index.js +5 -0
  163. package/InfoBlock/index.js.map +1 -0
  164. package/InfoBlock/infoBlockVariants.d.ts +6 -0
  165. package/InfoBlock/infoBlockVariants.d.ts.map +1 -0
  166. package/InfoBlock/infoBlockVariants.js +27 -0
  167. package/InfoBlock/infoBlockVariants.js.map +1 -0
  168. package/Input/Input.d.ts.map +1 -1
  169. package/Input/Input.js +65 -51
  170. package/Input/Input.js.map +1 -1
  171. package/Input/Input.types.d.ts +1 -0
  172. package/Input/Input.types.d.ts.map +1 -1
  173. package/LoadingMask/LoadingMask.d.ts +1 -2
  174. package/LoadingMask/LoadingMask.d.ts.map +1 -1
  175. package/LoadingMask/LoadingMask.js +8 -8
  176. package/LoadingMask/LoadingMask.js.map +1 -1
  177. package/LoadingMask/LoadingMask.types.d.ts +1 -0
  178. package/LoadingMask/LoadingMask.types.d.ts.map +1 -1
  179. package/Popover/Popover.d.ts.map +1 -1
  180. package/Popover/Popover.js +9 -5
  181. package/Popover/Popover.js.map +1 -1
  182. package/ScrollArea/ScrollArea.d.ts +5 -1
  183. package/ScrollArea/ScrollArea.d.ts.map +1 -1
  184. package/ScrollArea/ScrollArea.js +23 -17
  185. package/ScrollArea/ScrollArea.js.map +1 -1
  186. package/Search/Search.d.ts.map +1 -1
  187. package/Search/Search.js +40 -31
  188. package/Search/Search.js.map +1 -1
  189. package/Select/Select.d.ts.map +1 -1
  190. package/Select/Select.js +53 -48
  191. package/Select/Select.js.map +1 -1
  192. package/Select/Select.types.d.ts +4 -0
  193. package/Select/Select.types.d.ts.map +1 -1
  194. package/Select/SelectRoot.js +1 -1
  195. package/Select/SelectRoot.js.map +1 -1
  196. package/Switch/Switch.d.ts +1 -1
  197. package/Switch/Switch.d.ts.map +1 -1
  198. package/Switch/Switch.js +5 -7
  199. package/Switch/Switch.js.map +1 -1
  200. package/TablePagination/TablePagination.js +9 -8
  201. package/TablePagination/TablePagination.js.map +1 -1
  202. package/Textarea/Textarea.d.ts.map +1 -1
  203. package/Textarea/Textarea.js +50 -45
  204. package/Textarea/Textarea.js.map +1 -1
  205. package/Textarea/Textarea.types.d.ts +3 -1
  206. package/Textarea/Textarea.types.d.ts.map +1 -1
  207. package/Toast/Toast.d.ts +1 -1
  208. package/Toast/toastVariants.d.ts +1 -1
  209. package/Tooltip/Tooltip.d.ts.map +1 -1
  210. package/Tooltip/Tooltip.js +51 -32
  211. package/Tooltip/Tooltip.js.map +1 -1
  212. package/Tooltip/Tooltip.types.d.ts +10 -0
  213. package/Tooltip/Tooltip.types.d.ts.map +1 -1
  214. package/Tooltip/tooltipVariants.d.ts +4 -0
  215. package/Tooltip/tooltipVariants.d.ts.map +1 -0
  216. package/Tooltip/tooltipVariants.js +22 -0
  217. package/Tooltip/tooltipVariants.js.map +1 -0
  218. package/index.d.ts +2 -0
  219. package/index.d.ts.map +1 -1
  220. package/index.js +342 -332
  221. package/index.js.map +1 -1
  222. package/package.json +6 -5
  223. package/Combobox/ComboboxOptions.d.ts +0 -4
  224. package/Combobox/ComboboxOptions.d.ts.map +0 -1
  225. package/Combobox/ComboboxOptions.js +0 -65
  226. package/Combobox/ComboboxOptions.js.map +0 -1
@@ -1,73 +1,78 @@
1
- import { jsxs as l, Fragment as p, jsx as b } from "react/jsx-runtime";
2
- import * as h from "react";
3
- import { useId as A, useRef as v, useState as w, useImperativeHandle as z, useEffect as F } from "react";
4
- import { cn as d } from "@oneplatformdev/utils";
5
- import { useAutosizeTextArea as N } from "./useAutosizeTextArea.js";
6
- const y = h.forwardRef(
7
- (u, m) => {
1
+ import { jsxs as d, Fragment as v, jsx as A } from "react/jsx-runtime";
2
+ import * as w from "react";
3
+ import { useId as y, useRef as z, useState as F, useImperativeHandle as N, useEffect as T } from "react";
4
+ import { cn as m } from "@oneplatformdev/utils";
5
+ import { useAutosizeTextArea as C } from "./useAutosizeTextArea.js";
6
+ const R = w.forwardRef(
7
+ (f, c) => {
8
8
  const {
9
- className: c,
10
- value: t = "",
11
- maxHeight: o = Number.MAX_SAFE_INTEGER,
9
+ className: g,
10
+ value: r = "",
11
+ maxHeight: a = Number.MAX_SAFE_INTEGER,
12
12
  minHeight: i = 40,
13
- resizeble: f = !0,
14
- counter: s = !1,
15
- id: n = "",
16
- ...r
17
- } = u, a = A(), e = v(null), [x, g] = w("");
18
- return N({
19
- textAreaRef: e,
20
- triggerAutoSize: x,
21
- maxHeight: o,
13
+ resizeble: x = !1,
14
+ counter: n = !0,
15
+ id: s = "",
16
+ onChange: p,
17
+ onTransform: l,
18
+ ...o
19
+ } = f, u = y(), t = z(null), [b, h] = F("");
20
+ return C({
21
+ textAreaRef: t,
22
+ triggerAutoSize: b,
23
+ maxHeight: a,
22
24
  minHeight: i
23
- }), z(m, () => ({
24
- ...e.current ?? {},
25
- textArea: e.current,
26
- focus: () => e?.current?.focus(),
27
- maxHeight: o,
25
+ }), N(c, () => ({
26
+ ...t.current ?? {},
27
+ textArea: t.current,
28
+ focus: () => t?.current?.focus(),
29
+ maxHeight: a,
28
30
  minHeight: i
29
- })), F(() => {
30
- g(t);
31
- }, [r?.defaultValue, t]), /* @__PURE__ */ l(p, { children: [
32
- /* @__PURE__ */ b(
31
+ })), T(() => {
32
+ h(r);
33
+ }, [o?.defaultValue, r]), /* @__PURE__ */ d(v, { children: [
34
+ /* @__PURE__ */ A(
33
35
  "textarea",
34
36
  {
35
- id: n || a,
36
- ...r,
37
- ref: e,
38
- value: t,
39
- className: d(
37
+ id: s || u,
38
+ ...o,
39
+ ref: t,
40
+ value: r,
41
+ onChange: (e) => {
42
+ typeof l?.(e.target.value, e) == "string" && (e.target.value = l(e.target.value, e)), p?.(e);
43
+ },
44
+ className: m(
40
45
  "flex min-h-10 w-full px-3 py-2 text-base relative md:text-sm",
41
46
  "rounded-lg border border-input bg-[#FCFCFC] shadow-none",
42
47
  "placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
43
48
  "focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring",
44
- f ? "resize" : "resize-none overflow-hidden!",
45
- s && "pb-2",
46
- c
49
+ x ? "resize" : "resize-none overflow-hidden!",
50
+ n && "pb-1",
51
+ g
47
52
  )
48
53
  }
49
54
  ),
50
- s && /* @__PURE__ */ l(
55
+ n && typeof o?.maxLength == "number" && /* @__PURE__ */ d(
51
56
  "label",
52
57
  {
53
- htmlFor: n || a,
54
- className: d(
58
+ htmlFor: s || u,
59
+ className: m(
55
60
  "w-full text-right inline-flex items-center justify-end",
56
- "text-sm font-normal text-muted-foreground",
57
- "leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
61
+ "text-xs font-medium leading-[1.2] text-muted-foreground",
62
+ "peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
58
63
  ),
59
64
  children: [
60
- String(t || "").length,
65
+ String(r || "").length,
61
66
  " / ",
62
- r?.maxLength
67
+ o?.maxLength
63
68
  ]
64
69
  }
65
70
  )
66
71
  ] });
67
72
  }
68
73
  );
69
- y.displayName = "Textarea";
74
+ R.displayName = "Textarea";
70
75
  export {
71
- y as Textarea
76
+ R as Textarea
72
77
  };
73
78
  //# sourceMappingURL=Textarea.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Textarea.js","sources":["../../src/Textarea/Textarea.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useEffect, useId, useImperativeHandle, useRef, useState } from 'react';\nimport { cn } from '@oneplatformdev/utils';\n\nimport { TextareaProps } from './Textarea.types';\nimport { useAutosizeTextArea } from './useAutosizeTextArea';\n\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n (textareaProps, ref) => {\n const {\n className,\n value = '',\n maxHeight = Number.MAX_SAFE_INTEGER,\n minHeight = 40,\n resizeble = true,\n counter = false,\n id: customId = '',\n ...props\n } = textareaProps;\n const id = useId();\n const textAreaRef = useRef<HTMLTextAreaElement | null>(null);\n const [triggerAutoSize, setTriggerAutoSize] = useState('');\n\n useAutosizeTextArea({\n textAreaRef,\n triggerAutoSize: triggerAutoSize,\n maxHeight,\n minHeight,\n });\n\n useImperativeHandle(ref, () => ({\n ...((textAreaRef.current ?? {}) as HTMLTextAreaElement),\n textArea: textAreaRef.current as HTMLTextAreaElement,\n focus: () => textAreaRef?.current?.focus(),\n maxHeight,\n minHeight,\n }));\n\n useEffect(() => {\n setTriggerAutoSize(value as string);\n }, [props?.defaultValue, value]);\n\n return (\n <>\n <textarea\n id={customId || id}\n {...props}\n ref={textAreaRef}\n value={value}\n className={cn(\n 'flex min-h-10 w-full px-3 py-2 text-base relative md:text-sm',\n 'rounded-lg border border-input bg-[#FCFCFC] shadow-none',\n 'placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50',\n 'focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring',\n resizeble ? 'resize' : 'resize-none overflow-hidden!',\n counter && 'pb-2',\n className\n )}\n />\n {counter && (\n <label\n htmlFor={customId || id}\n className={cn(\n 'w-full text-right inline-flex items-center justify-end',\n 'text-sm font-normal text-muted-foreground',\n 'leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70'\n )}\n >\n {String(value || '').length} / {props?.maxLength}\n </label>\n )}\n </>\n );\n }\n);\nTextarea.displayName = 'Textarea';\n\nexport { Textarea };\n"],"names":["Textarea","React","textareaProps","ref","className","value","maxHeight","minHeight","resizeble","counter","customId","props","id","useId","textAreaRef","useRef","triggerAutoSize","setTriggerAutoSize","useState","useAutosizeTextArea","useImperativeHandle","useEffect","jsxs","Fragment","jsx","cn"],"mappings":";;;;;AAOA,MAAMA,IAAWC,EAAM;AAAA,EACrB,CAACC,GAAeC,MAAQ;AACtB,UAAM;AAAA,MACJ,WAAAC;AAAA,MACA,OAAAC,IAAQ;AAAA,MACR,WAAAC,IAAY,OAAO;AAAA,MACnB,WAAAC,IAAY;AAAA,MACZ,WAAAC,IAAY;AAAA,MACZ,SAAAC,IAAU;AAAA,MACV,IAAIC,IAAW;AAAA,MACf,GAAGC;AAAA,IAAA,IACDT,GACEU,IAAKC,EAAA,GACLC,IAAcC,EAAmC,IAAI,GACrD,CAACC,GAAiBC,CAAkB,IAAIC,EAAS,EAAE;AAEzD,WAAAC,EAAoB;AAAA,MAClB,aAAAL;AAAA,MACA,iBAAAE;AAAA,MACA,WAAAV;AAAA,MACA,WAAAC;AAAA,IAAA,CACD,GAEDa,EAAoBjB,GAAK,OAAO;AAAA,MAC9B,GAAKW,EAAY,WAAW,CAAA;AAAA,MAC5B,UAAUA,EAAY;AAAA,MACtB,OAAO,MAAMA,GAAa,SAAS,MAAA;AAAA,MACnC,WAAAR;AAAA,MACA,WAAAC;AAAA,IAAA,EACA,GAEFc,EAAU,MAAM;AACd,MAAAJ,EAAmBZ,CAAe;AAAA,IACpC,GAAG,CAACM,GAAO,cAAcN,CAAK,CAAC,GAG7B,gBAAAiB,EAAAC,GAAA,EACE,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,IAAId,KAAYE;AAAA,UACf,GAAGD;AAAA,UACJ,KAAKG;AAAA,UACL,OAAAT;AAAA,UACA,WAAWoB;AAAA,YACT;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACAjB,IAAY,WAAW;AAAA,YACvBC,KAAW;AAAA,YACXL;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,MAEDK,KACC,gBAAAa;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,SAASZ,KAAYE;AAAA,UACrB,WAAWa;AAAA,YACT;AAAA,YACA;AAAA,YACA;AAAA,UAAA;AAAA,UAGD,UAAA;AAAA,YAAA,OAAOpB,KAAS,EAAE,EAAE;AAAA,YAAO;AAAA,YAAIM,GAAO;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACzC,GAEJ;AAAA,EAEJ;AACF;AACAX,EAAS,cAAc;"}
1
+ {"version":3,"file":"Textarea.js","sources":["../../src/Textarea/Textarea.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useEffect, useId, useImperativeHandle, useRef, useState } from 'react';\nimport { cn } from '@oneplatformdev/utils';\n\nimport { TextareaProps } from './Textarea.types';\nimport { useAutosizeTextArea } from './useAutosizeTextArea';\n\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n (textareaProps, ref) => {\n const {\n className,\n value = '',\n maxHeight = Number.MAX_SAFE_INTEGER,\n minHeight = 40,\n resizeble = false,\n counter = true,\n id: customId = '',\n onChange,\n onTransform,\n ...props\n } = textareaProps;\n const id = useId();\n const textAreaRef = useRef<HTMLTextAreaElement | null>(null);\n const [triggerAutoSize, setTriggerAutoSize] = useState('');\n\n useAutosizeTextArea({\n textAreaRef,\n triggerAutoSize: triggerAutoSize,\n maxHeight,\n minHeight,\n });\n\n useImperativeHandle(ref, () => ({\n ...((textAreaRef.current ?? {}) as HTMLTextAreaElement),\n textArea: textAreaRef.current as HTMLTextAreaElement,\n focus: () => textAreaRef?.current?.focus(),\n maxHeight,\n minHeight,\n }));\n\n useEffect(() => {\n setTriggerAutoSize(value as string);\n }, [props?.defaultValue, value]);\n\n return (\n <>\n <textarea\n id={customId || id}\n {...props}\n ref={textAreaRef}\n value={value}\n onChange={(e) => {\n if (typeof onTransform?.(e.target.value, e) === 'string') {\n e.target.value = onTransform(e.target.value, e);\n }\n onChange?.(e);\n }}\n className={cn(\n 'flex min-h-10 w-full px-3 py-2 text-base relative md:text-sm',\n 'rounded-lg border border-input bg-[#FCFCFC] shadow-none',\n 'placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50',\n 'focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring',\n resizeble ? 'resize' : 'resize-none overflow-hidden!',\n counter && 'pb-1',\n className\n )}\n />\n {counter && typeof props?.maxLength === 'number' && (\n <label\n htmlFor={customId || id}\n className={cn(\n 'w-full text-right inline-flex items-center justify-end',\n 'text-xs font-medium leading-[1.2] text-muted-foreground',\n 'peer-disabled:cursor-not-allowed peer-disabled:opacity-70'\n )}\n >\n {String(value || '').length} / {props?.maxLength}\n </label>\n )}\n </>\n );\n }\n);\nTextarea.displayName = 'Textarea';\n\nexport { Textarea };\n"],"names":["Textarea","React","textareaProps","ref","className","value","maxHeight","minHeight","resizeble","counter","customId","onChange","onTransform","props","id","useId","textAreaRef","useRef","triggerAutoSize","setTriggerAutoSize","useState","useAutosizeTextArea","useImperativeHandle","useEffect","jsxs","Fragment","jsx","cn"],"mappings":";;;;;AAOA,MAAMA,IAAWC,EAAM;AAAA,EACrB,CAACC,GAAeC,MAAQ;AACtB,UAAM;AAAA,MACJ,WAAAC;AAAA,MACA,OAAAC,IAAQ;AAAA,MACR,WAAAC,IAAY,OAAO;AAAA,MACnB,WAAAC,IAAY;AAAA,MACZ,WAAAC,IAAY;AAAA,MACZ,SAAAC,IAAU;AAAA,MACV,IAAIC,IAAW;AAAA,MACf,UAAAC;AAAA,MACA,aAAAC;AAAA,MACA,GAAGC;AAAA,IAAA,IACDX,GACEY,IAAKC,EAAA,GACLC,IAAcC,EAAmC,IAAI,GACrD,CAACC,GAAiBC,CAAkB,IAAIC,EAAS,EAAE;AAEzD,WAAAC,EAAoB;AAAA,MAClB,aAAAL;AAAA,MACA,iBAAAE;AAAA,MACA,WAAAZ;AAAA,MACA,WAAAC;AAAA,IAAA,CACD,GAEDe,EAAoBnB,GAAK,OAAO;AAAA,MAC9B,GAAKa,EAAY,WAAW,CAAA;AAAA,MAC5B,UAAUA,EAAY;AAAA,MACtB,OAAO,MAAMA,GAAa,SAAS,MAAA;AAAA,MACnC,WAAAV;AAAA,MACA,WAAAC;AAAA,IAAA,EACA,GAEFgB,EAAU,MAAM;AACd,MAAAJ,EAAmBd,CAAe;AAAA,IACpC,GAAG,CAACQ,GAAO,cAAcR,CAAK,CAAC,GAG7B,gBAAAmB,EAAAC,GAAA,EACE,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,IAAIhB,KAAYI;AAAA,UACf,GAAGD;AAAA,UACJ,KAAKG;AAAA,UACL,OAAAX;AAAA,UACA,UAAU,CAAC,MAAM;AACf,YAAI,OAAOO,IAAc,EAAE,OAAO,OAAO,CAAC,KAAM,aAC9C,EAAE,OAAO,QAAQA,EAAY,EAAE,OAAO,OAAO,CAAC,IAEhDD,IAAW,CAAC;AAAA,UACd;AAAA,UACA,WAAWgB;AAAA,YACT;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACAnB,IAAY,WAAW;AAAA,YACvBC,KAAW;AAAA,YACXL;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,MAEDK,KAAW,OAAOI,GAAO,aAAc,YACtC,gBAAAW;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,SAASd,KAAYI;AAAA,UACrB,WAAWa;AAAA,YACT;AAAA,YACA;AAAA,YACA;AAAA,UAAA;AAAA,UAGD,UAAA;AAAA,YAAA,OAAOtB,KAAS,EAAE,EAAE;AAAA,YAAO;AAAA,YAAIQ,GAAO;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACzC,GAEJ;AAAA,EAEJ;AACF;AACAb,EAAS,cAAc;"}
@@ -1,4 +1,4 @@
1
- import { ComponentProps, RefObject } from 'react';
1
+ import { ChangeEvent, ComponentProps, RefObject } from 'react';
2
2
  export interface IUseAutosizeTextAreaProps {
3
3
  textAreaRef: RefObject<HTMLTextAreaElement | null>;
4
4
  triggerAutoSize: string;
@@ -14,5 +14,7 @@ export interface IUseAutosizeTextAreaProps {
14
14
  export interface TextareaProps extends ComponentProps<'textarea'>, Pick<IUseAutosizeTextAreaProps, 'minHeight' | 'maxHeight'> {
15
15
  resizeble?: boolean;
16
16
  counter?: boolean;
17
+ /** func transform event.target.value before onChange event call*/
18
+ onTransform?: (value: string, event: ChangeEvent<HTMLInputElement>) => string;
17
19
  }
18
20
  //# sourceMappingURL=Textarea.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Textarea.types.d.ts","sourceRoot":"","sources":["../../src/Textarea/Textarea.types.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElD,MAAM,WAAW,yBAAyB;IACxC,WAAW,EAAE,SAAS,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC;IACnD,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,aACf,SAAQ,cAAc,CAAC,UAAU,CAAC,EAChC,IAAI,CAAC,yBAAyB,EAAE,WAAW,GAAG,WAAW,CAAC;IAC5D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
1
+ {"version":3,"file":"Textarea.types.d.ts","sourceRoot":"","sources":["../../src/Textarea/Textarea.types.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE/D,MAAM,WAAW,yBAAyB;IACxC,WAAW,EAAE,SAAS,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC;IACnD,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,aACf,SAAQ,cAAc,CAAC,UAAU,CAAC,EAChC,IAAI,CAAC,yBAAyB,EAAE,WAAW,GAAG,WAAW,CAAC;IAC5D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kEAAkE;IAClE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,MAAM,CAAC;CAC/E"}
package/Toast/Toast.d.ts CHANGED
@@ -4,7 +4,7 @@ import * as ToastPrimitives from "@radix-ui/react-toast";
4
4
  declare const ToastProvider: React.FC<ToastPrimitives.ToastProviderProps>;
5
5
  declare const ToastViewport: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React.RefAttributes<HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
6
6
  declare const Toast: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
7
- variant?: "default" | "destructive" | "success" | "info" | "update" | null | undefined;
7
+ variant?: "default" | "destructive" | "info" | "success" | "update" | null | undefined;
8
8
  } & import('class-variance-authority/types').ClassProp) | undefined) => string> & React.RefAttributes<HTMLLIElement>>;
9
9
  declare const ToastAction: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
10
10
  declare const ToastClose: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
@@ -1,4 +1,4 @@
1
1
  export declare const toastVariants: (props?: ({
2
- variant?: "default" | "destructive" | "success" | "info" | "update" | null | undefined;
2
+ variant?: "default" | "destructive" | "info" | "success" | "update" | null | undefined;
3
3
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
4
4
  //# sourceMappingURL=toastVariants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../src/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGpD,eAAO,MAAM,YAAY,GAAI,OAAO,iBAAiB,CAAC,YAAY,CAAC,4CAwClE,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,OAAO,iBAAiB,CAAC,YAAY,CAAC,4CAQ7D,CAAC"}
1
+ {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../src/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAIpD,eAAO,MAAM,YAAY,GAAI,OAAO,iBAAiB,CAAC,YAAY,CAAC,4CAyDlE,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,OAAO,iBAAiB,CAAC,YAAY,CAAC,4CAQ7D,CAAC"}
@@ -1,60 +1,79 @@
1
- import { jsx as r, jsxs as n } from "react/jsx-runtime";
2
- import { CircleQuestionMarkIcon as m } from "lucide-react";
3
- import { cn as i } from "@oneplatformdev/utils";
4
- import { TooltipProvider as f, TooltipRoot as x, TooltipTrigger as d, TooltipContent as u } from "./TooltipRoot.js";
5
- const s = (e) => {
6
- const { triggerProps: t, contentProps: o, message: l, children: a, showQuestionMark: c = !1, ...p } = e;
7
- return /* @__PURE__ */ n(
8
- x,
1
+ import { jsx as o, jsxs as a } from "react/jsx-runtime";
2
+ import { CircleQuestionMarkIcon as f } from "lucide-react";
3
+ import { cn as n } from "@oneplatformdev/utils";
4
+ import { TooltipProvider as x, TooltipRoot as g, TooltipTrigger as h, TooltipContent as w } from "./TooltipRoot.js";
5
+ import { tooltipQuestionIconVariants as N } from "./tooltipVariants.js";
6
+ const l = (t) => {
7
+ const { triggerProps: r, contentProps: s, message: c, children: p, showQuestionMark: m = !1, size: i = "md", questionIconSize: u = i, slotProps: e, ...d } = t;
8
+ return /* @__PURE__ */ a(
9
+ g,
9
10
  {
10
11
  defaultOpen: !1,
11
12
  delayDuration: 300,
12
- ...p,
13
+ ...d,
13
14
  children: [
14
- /* @__PURE__ */ n(
15
- d,
15
+ /* @__PURE__ */ a(
16
+ h,
16
17
  {
17
- ...t || {},
18
- className: i(
18
+ ...r || {},
19
+ ...e?.trigger || {},
20
+ className: n(
19
21
  "flex flex-row gap-1 w-fit",
20
22
  "items-center",
21
23
  "cursor-pointer",
22
24
  "outline-none",
23
- t?.className
25
+ r?.className,
26
+ e?.trigger?.className
24
27
  ),
25
28
  type: "button",
26
29
  children: [
27
- a,
28
- c && /* @__PURE__ */ r(m, {})
30
+ p,
31
+ m && /* @__PURE__ */ o(
32
+ f,
33
+ {
34
+ ...e?.questionIcon || {},
35
+ className: n(
36
+ N({ size: i || u }),
37
+ "cursor-help",
38
+ e?.questionIcon?.className
39
+ )
40
+ }
41
+ )
29
42
  ]
30
43
  }
31
44
  ),
32
- /* @__PURE__ */ r(
33
- u,
45
+ /* @__PURE__ */ o(
46
+ w,
34
47
  {
35
48
  align: "center",
36
- ...o || {},
37
- className: i(
49
+ sideOffset: 8,
50
+ ...s || {},
51
+ ...e?.content || {},
52
+ className: n(
38
53
  "flex items-center justify-center",
39
- "max-w-[320px] p-1",
40
- "bg-[#FCFCFC] border-none",
41
- "shadow-[0px_4px_8px_rgba(13,14,43,0.125)]",
42
- "text-[#363B4E] font-normal text-sm leading-normal",
43
- "whitespace-pre-wrap",
44
- o?.className
54
+ "w-auto max-w-80",
55
+ "rounded-xl",
56
+ "px-4 py-3",
57
+ "bg-white",
58
+ "text-primary",
59
+ "text-md font-normal leading-normal",
60
+ "shadow-[1px_1px_10px_0px_rgba(6,8,13,0.1)]",
61
+ "whitespace-pre-wrap break-words",
62
+ s?.className,
63
+ e?.content?.className
45
64
  ),
46
- children: l || ""
65
+ children: c || ""
47
66
  }
48
67
  )
49
68
  ]
50
69
  }
51
70
  );
52
- }, C = (e) => {
53
- const { skipProvider: t = !0 } = e;
54
- return t ? /* @__PURE__ */ r(s, { ...e }) : /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(s, { ...e }) });
71
+ }, k = (t) => {
72
+ const { skipProvider: r = !0 } = t;
73
+ return r ? /* @__PURE__ */ o(l, { ...t }) : /* @__PURE__ */ o(x, { children: /* @__PURE__ */ o(l, { ...t }) });
55
74
  };
56
75
  export {
57
- C as Tooltip,
58
- s as TooltipInner
76
+ k as Tooltip,
77
+ l as TooltipInner
59
78
  };
60
79
  //# sourceMappingURL=Tooltip.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.js","sources":["../../src/Tooltip/Tooltip.tsx"],"sourcesContent":["import { CircleQuestionMarkIcon } from 'lucide-react';\nimport { PropsWithChildren } from \"react\";\n\nimport { cn } from \"@oneplatformdev/utils\";\nimport type { TooltipProps } from \"./Tooltip.types\";\nimport { TooltipRoot, TooltipTrigger, TooltipContent, TooltipProvider } from \"./TooltipRoot\";\n\nexport const TooltipInner = (props: PropsWithChildren<TooltipProps>) => {\n const { triggerProps, contentProps, message, children, showQuestionMark = false, ...rest } = props;\n return (\n <TooltipRoot\n defaultOpen={false}\n delayDuration={300}\n {...rest}\n >\n <TooltipTrigger\n {...(triggerProps || {})}\n className={cn(\n 'flex flex-row gap-1 w-fit',\n 'items-center',\n 'cursor-pointer',\n 'outline-none',\n triggerProps?.className\n )}\n type='button'\n >\n {children}\n {showQuestionMark && <CircleQuestionMarkIcon/>}\n </TooltipTrigger>\n\n <TooltipContent\n align=\"center\"\n {...(contentProps || {})}\n className={cn(\n 'flex items-center justify-center',\n 'max-w-[320px] p-1',\n 'bg-[#FCFCFC] border-none',\n 'shadow-[0px_4px_8px_rgba(13,14,43,0.125)]',\n 'text-[#363B4E] font-normal text-sm leading-normal',\n 'whitespace-pre-wrap',\n contentProps?.className\n )}\n >\n {message || ''}\n </TooltipContent>\n </TooltipRoot>\n );\n};\n\nexport const Tooltip = (props: PropsWithChildren<TooltipProps>) => {\n const { skipProvider = true } = props;\n if (skipProvider) return <TooltipInner {...props}/>;\n return (\n <TooltipProvider>\n <TooltipInner {...props}/>\n </TooltipProvider>\n );\n};\n"],"names":["TooltipInner","props","triggerProps","contentProps","message","children","showQuestionMark","rest","jsxs","TooltipRoot","TooltipTrigger","cn","CircleQuestionMarkIcon","jsx","TooltipContent","Tooltip","skipProvider","TooltipProvider"],"mappings":";;;;AAOO,MAAMA,IAAe,CAACC,MAA2C;AACtE,QAAM,EAAE,cAAAC,GAAc,cAAAC,GAAc,SAAAC,GAAS,UAAAC,GAAU,kBAAAC,IAAmB,IAAO,GAAGC,EAAA,IAASN;AAC7F,SACE,gBAAAO;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,aAAa;AAAA,MACb,eAAe;AAAA,MACd,GAAGF;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAC;AAAA,UAACE;AAAA,UAAA;AAAA,YACE,GAAIR,KAAgB,CAAA;AAAA,YACrB,WAAWS;AAAA,cACT;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACAT,GAAc;AAAA,YAAA;AAAA,YAEhB,MAAK;AAAA,YAEJ,UAAA;AAAA,cAAAG;AAAA,cACAC,uBAAqBM,GAAA,CAAA,CAAsB;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,QAG9C,gBAAAC;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,OAAM;AAAA,YACL,GAAIX,KAAgB,CAAA;AAAA,YACrB,WAAWQ;AAAA,cACT;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACAR,GAAc;AAAA,YAAA;AAAA,YAGf,UAAAC,KAAW;AAAA,UAAA;AAAA,QAAA;AAAA,MACd;AAAA,IAAA;AAAA,EAAA;AAGN,GAEaW,IAAU,CAACd,MAA2C;AACjE,QAAM,EAAE,cAAAe,IAAe,GAAA,IAASf;AAChC,SAAIe,IAAqB,gBAAAH,EAACb,GAAA,EAAc,GAAGC,EAAA,CAAM,sBAE9CgB,GAAA,EACC,UAAA,gBAAAJ,EAACb,GAAA,EAAc,GAAGC,GAAM,GAC1B;AAEJ;"}
1
+ {"version":3,"file":"Tooltip.js","sources":["../../src/Tooltip/Tooltip.tsx"],"sourcesContent":["import { CircleQuestionMarkIcon } from 'lucide-react';\nimport { PropsWithChildren } from \"react\";\n\nimport { cn } from \"@oneplatformdev/utils\";\nimport type { TooltipProps } from \"./Tooltip.types\";\nimport { TooltipRoot, TooltipTrigger, TooltipContent, TooltipProvider } from \"./TooltipRoot\";\nimport { tooltipQuestionIconVariants } from './tooltipVariants';\n\nexport const TooltipInner = (props: PropsWithChildren<TooltipProps>) => {\n const { triggerProps, contentProps, message, children, showQuestionMark = false, size = 'md', questionIconSize = size, slotProps, ...rest } = props;\n return (\n <TooltipRoot\n defaultOpen={false}\n delayDuration={300}\n {...rest}\n >\n <TooltipTrigger\n {...(triggerProps || {})}\n {...(slotProps?.trigger || {})}\n className={cn(\n 'flex flex-row gap-1 w-fit',\n 'items-center',\n 'cursor-pointer',\n 'outline-none',\n triggerProps?.className,\n slotProps?.trigger?.className\n )}\n type='button'\n >\n {children}\n {showQuestionMark && (\n <CircleQuestionMarkIcon\n {...(slotProps?.questionIcon || {})}\n className={cn(\n tooltipQuestionIconVariants({ size: size || questionIconSize }),\n 'cursor-help',\n slotProps?.questionIcon?.className\n )}\n />\n )}\n </TooltipTrigger>\n\n <TooltipContent\n align=\"center\"\n sideOffset={8}\n {...(contentProps || {})}\n {...(slotProps?.content || {})}\n className={cn(\n 'flex items-center justify-center',\n 'w-auto max-w-80',\n 'rounded-xl',\n 'px-4 py-3',\n 'bg-white',\n 'text-primary',\n 'text-md font-normal leading-normal',\n 'shadow-[1px_1px_10px_0px_rgba(6,8,13,0.1)]',\n 'whitespace-pre-wrap break-words',\n contentProps?.className,\n slotProps?.content?.className\n )}\n >\n {message || ''}\n </TooltipContent>\n </TooltipRoot>\n );\n};\n\nexport const Tooltip = (props: PropsWithChildren<TooltipProps>) => {\n const { skipProvider = true } = props;\n if (skipProvider) return <TooltipInner {...props}/>;\n return (\n <TooltipProvider>\n <TooltipInner {...props}/>\n </TooltipProvider>\n );\n};\n"],"names":["TooltipInner","props","triggerProps","contentProps","message","children","showQuestionMark","size","questionIconSize","slotProps","rest","jsxs","TooltipRoot","TooltipTrigger","cn","jsx","CircleQuestionMarkIcon","tooltipQuestionIconVariants","TooltipContent","Tooltip","skipProvider","TooltipProvider"],"mappings":";;;;;AAQO,MAAMA,IAAe,CAACC,MAA2C;AACtE,QAAM,EAAE,cAAAC,GAAc,cAAAC,GAAc,SAAAC,GAAS,UAAAC,GAAU,kBAAAC,IAAmB,IAAO,MAAAC,IAAO,MAAM,kBAAAC,IAAmBD,GAAM,WAAAE,GAAW,GAAGC,MAAST;AAC9I,SACE,gBAAAU;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,aAAa;AAAA,MACb,eAAe;AAAA,MACd,GAAGF;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAC;AAAA,UAACE;AAAA,UAAA;AAAA,YACE,GAAIX,KAAgB,CAAA;AAAA,YACpB,GAAIO,GAAW,WAAW,CAAA;AAAA,YAC3B,WAAWK;AAAA,cACT;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACAZ,GAAc;AAAA,cACdO,GAAW,SAAS;AAAA,YAAA;AAAA,YAEtB,MAAK;AAAA,YAEJ,UAAA;AAAA,cAAAJ;AAAA,cACAC,KACC,gBAAAS;AAAA,gBAACC;AAAA,gBAAA;AAAA,kBACE,GAAIP,GAAW,gBAAgB,CAAA;AAAA,kBAChC,WAAWK;AAAA,oBACTG,EAA4B,EAAE,MAAMV,KAAQC,GAAkB;AAAA,oBAC9D;AAAA,oBACAC,GAAW,cAAc;AAAA,kBAAA;AAAA,gBAC3B;AAAA,cAAA;AAAA,YACF;AAAA,UAAA;AAAA,QAAA;AAAA,QAIJ,gBAAAM;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,OAAM;AAAA,YACN,YAAY;AAAA,YACX,GAAIf,KAAgB,CAAA;AAAA,YACpB,GAAIM,GAAW,WAAW,CAAA;AAAA,YAC3B,WAAWK;AAAA,cACT;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACAX,GAAc;AAAA,cACdM,GAAW,SAAS;AAAA,YAAA;AAAA,YAGrB,UAAAL,KAAW;AAAA,UAAA;AAAA,QAAA;AAAA,MACd;AAAA,IAAA;AAAA,EAAA;AAGN,GAEae,IAAU,CAAClB,MAA2C;AACjE,QAAM,EAAE,cAAAmB,IAAe,GAAA,IAASnB;AAChC,SAAImB,IAAqB,gBAAAL,EAACf,GAAA,EAAc,GAAGC,EAAA,CAAM,sBAE9CoB,GAAA,EACC,UAAA,gBAAAN,EAACf,GAAA,EAAc,GAAGC,GAAM,GAC1B;AAEJ;"}
@@ -4,7 +4,17 @@ export interface TooltipProps extends ComponentPropsWithoutRef<typeof TooltipRoo
4
4
  message?: ReactNode;
5
5
  skipProvider?: boolean;
6
6
  showQuestionMark?: boolean;
7
+ /** @deprecated use `slotProps.content` */
7
8
  contentProps?: ComponentPropsWithoutRef<typeof TooltipContent>;
9
+ /** @deprecated use `slotProps.trigger` */
8
10
  triggerProps?: ComponentPropsWithoutRef<typeof TooltipTrigger>;
11
+ size?: "xs" | "sm" | "md";
12
+ /** @deprecated use `size` */
13
+ questionIconSize?: "xs" | "sm" | "md";
14
+ slotProps?: {
15
+ content?: ComponentPropsWithoutRef<typeof TooltipContent>;
16
+ trigger?: ComponentPropsWithoutRef<typeof TooltipTrigger>;
17
+ questionIcon?: ComponentPropsWithoutRef<"svg">;
18
+ };
9
19
  }
10
20
  //# sourceMappingURL=Tooltip.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.types.d.ts","sourceRoot":"","sources":["../../src/Tooltip/Tooltip.types.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE5E,MAAM,WAAW,YAAa,SAAQ,wBAAwB,CAAC,OAAO,WAAW,CAAC;IAChF,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,YAAY,CAAC,EAAE,wBAAwB,CAAC,OAAO,cAAc,CAAC,CAAC;IAC/D,YAAY,CAAC,EAAE,wBAAwB,CAAC,OAAO,cAAc,CAAC,CAAC;CAChE"}
1
+ {"version":3,"file":"Tooltip.types.d.ts","sourceRoot":"","sources":["../../src/Tooltip/Tooltip.types.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE5E,MAAM,WAAW,YAAa,SAAQ,wBAAwB,CAAC,OAAO,WAAW,CAAC;IAChF,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,0CAA0C;IAC1C,YAAY,CAAC,EAAE,wBAAwB,CAAC,OAAO,cAAc,CAAC,CAAC;IAC/D,0CAA0C;IAC1C,YAAY,CAAC,EAAE,wBAAwB,CAAC,OAAO,cAAc,CAAC,CAAC;IAC/D,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,6BAA6B;IAC7B,gBAAgB,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACtC,SAAS,CAAC,EAAE;QACV,OAAO,CAAC,EAAE,wBAAwB,CAAC,OAAO,cAAc,CAAC,CAAC;QAC1D,OAAO,CAAC,EAAE,wBAAwB,CAAC,OAAO,cAAc,CAAC,CAAC;QAC1D,YAAY,CAAC,EAAE,wBAAwB,CAAC,KAAK,CAAC,CAAC;KAChD,CAAC;CACH"}
@@ -0,0 +1,4 @@
1
+ export declare const tooltipQuestionIconVariants: (props?: ({
2
+ size?: "xs" | "sm" | "md" | null | undefined;
3
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
4
+ //# sourceMappingURL=tooltipVariants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tooltipVariants.d.ts","sourceRoot":"","sources":["../../src/Tooltip/tooltipVariants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,2BAA2B;;8EAgBvC,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { cva as s } from "class-variance-authority";
2
+ const t = s(
3
+ [
4
+ "shrink-0 text-[#8C8F9A]"
5
+ ],
6
+ {
7
+ variants: {
8
+ size: {
9
+ xs: "size-2",
10
+ sm: "size-3",
11
+ md: "size-4"
12
+ }
13
+ },
14
+ defaultVariants: {
15
+ size: "md"
16
+ }
17
+ }
18
+ );
19
+ export {
20
+ t as tooltipQuestionIconVariants
21
+ };
22
+ //# sourceMappingURL=tooltipVariants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tooltipVariants.js","sources":["../../src/Tooltip/tooltipVariants.ts"],"sourcesContent":["import { cva } from \"class-variance-authority\";\n\nexport const tooltipQuestionIconVariants = cva(\n [\n \"shrink-0 text-[#8C8F9A]\",\n ],\n {\n variants: {\n size: {\n xs: \"size-2\",\n sm: \"size-3\",\n md: \"size-4\",\n },\n },\n defaultVariants: {\n size: \"md\",\n },\n }\n);\n"],"names":["tooltipQuestionIconVariants","cva"],"mappings":";AAEO,MAAMA,IAA8BC;AAAA,EACzC;AAAA,IACE;AAAA,EAAA;AAAA,EAEF;AAAA,IACE,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA;AAAA,IACN;AAAA,IAEF,iBAAiB;AAAA,MACf,MAAM;AAAA,IAAA;AAAA,EACR;AAEJ;"}
package/index.d.ts CHANGED
@@ -17,6 +17,7 @@ export * from './Checkbox';
17
17
  export * from './Collapsible';
18
18
  export * from './Combobox';
19
19
  export * from './Command';
20
+ export * from './ContextPopover';
20
21
  export * from './DataTable';
21
22
  export * from './DatePicker';
22
23
  export * from './Dialog';
@@ -31,6 +32,7 @@ export * from './FormSelect';
31
32
  export * from './FormTextarea';
32
33
  export * from './Header';
33
34
  export * from './HoverCard';
35
+ export * from './InfoBlock';
34
36
  export * from './Input';
35
37
  export * from './InputOTP';
36
38
  export * from './Label';
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC"}