@moondreamsdev/dreamer-ui 1.7.7-test.0 → 1.7.7-test.2

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 (63) hide show
  1. package/dist/QuestionMarkCircled-BVBF3skB.js +157 -0
  2. package/dist/QuestionMarkCircled-BVBF3skB.js.map +1 -0
  3. package/dist/QuestionMarkCircled-D5cHmQp1.cjs +2 -0
  4. package/dist/QuestionMarkCircled-D5cHmQp1.cjs.map +1 -0
  5. package/dist/Toast-C5BwqBkw.js +380 -0
  6. package/dist/Toast-C5BwqBkw.js.map +1 -0
  7. package/dist/Toast-FzI16Fnl.cjs +2 -0
  8. package/dist/Toast-FzI16Fnl.cjs.map +1 -0
  9. package/dist/X-CIoyLewf.js +111 -0
  10. package/dist/X-CIoyLewf.js.map +1 -0
  11. package/dist/X-CgjeP2OI.cjs +2 -0
  12. package/dist/X-CgjeP2OI.cjs.map +1 -0
  13. package/dist/components.cjs.js +1 -1
  14. package/dist/components.cjs.js.map +1 -1
  15. package/dist/components.esm.js +570 -467
  16. package/dist/components.esm.js.map +1 -1
  17. package/dist/hooks.cjs.js +1 -1
  18. package/dist/hooks.esm.js +4 -3
  19. package/dist/providers.cjs.js +1 -1
  20. package/dist/providers.cjs.js.map +1 -1
  21. package/dist/providers.esm.js +78 -28
  22. package/dist/providers.esm.js.map +1 -1
  23. package/dist/src/components/index.d.ts +2 -0
  24. package/dist/src/components/toast/index.d.ts +0 -3
  25. package/dist/src/components/toggle/Toggle.d.ts +13 -0
  26. package/dist/src/components/toggle/index.d.ts +2 -0
  27. package/dist/src/components/toggle/variants.d.ts +29 -0
  28. package/dist/src/hooks/index.d.ts +1 -0
  29. package/dist/src/{components/toast → hooks}/useToast.d.ts +2 -2
  30. package/dist/src/{components/toast → providers}/ToastProvider.d.ts +1 -1
  31. package/dist/src/providers/index.d.ts +1 -0
  32. package/dist/src/symbols/Check.d.ts +2 -4
  33. package/dist/src/symbols/CheckCircled.d.ts +2 -3
  34. package/dist/src/symbols/ChevronDown.d.ts +2 -4
  35. package/dist/src/symbols/CrossCircled.d.ts +2 -4
  36. package/dist/src/symbols/ExclamationTriangle.d.ts +2 -3
  37. package/dist/src/symbols/EyeClosed.d.ts +2 -3
  38. package/dist/src/symbols/EyeOpened.d.ts +2 -3
  39. package/dist/src/symbols/InfoCircled.d.ts +2 -4
  40. package/dist/src/symbols/QuestionMarkCircled.d.ts +2 -4
  41. package/dist/src/symbols/X.d.ts +2 -4
  42. package/dist/src/symbols/index.d.ts +5 -0
  43. package/dist/symbols.cjs.js +1 -1
  44. package/dist/symbols.cjs.js.map +1 -1
  45. package/dist/symbols.esm.js +12 -34
  46. package/dist/symbols.esm.js.map +1 -1
  47. package/dist/useToast-CEKvEJVB.js +22 -0
  48. package/dist/useToast-CEKvEJVB.js.map +1 -0
  49. package/dist/useToast-CraVIawn.cjs +2 -0
  50. package/dist/useToast-CraVIawn.cjs.map +1 -0
  51. package/package.json +2 -2
  52. package/dist/X-5_dKmWcQ.js +0 -100
  53. package/dist/X-5_dKmWcQ.js.map +0 -1
  54. package/dist/X-BCa88TDt.cjs +0 -2
  55. package/dist/X-BCa88TDt.cjs.map +0 -1
  56. package/dist/styles-B0WE-RIs.cjs +0 -2
  57. package/dist/styles-B0WE-RIs.cjs.map +0 -1
  58. package/dist/styles-Dm_OLOPv.js +0 -289
  59. package/dist/styles-Dm_OLOPv.js.map +0 -1
  60. package/dist/useActionModal-C4X_-O9_.js +0 -13
  61. package/dist/useActionModal-C4X_-O9_.js.map +0 -1
  62. package/dist/useActionModal-CqT8y2he.cjs +0 -2
  63. package/dist/useActionModal-CqT8y2he.cjs.map +0 -1
@@ -1,11 +1,12 @@
1
- import { jsxs as d, jsx as c } from "react/jsx-runtime";
2
- import { useState as v, useCallback as s } from "react";
3
- import { A as o } from "./styles-Dm_OLOPv.js";
1
+ import { jsxs as g, jsx as l } from "react/jsx-runtime";
2
+ import { useState as x, useCallback as s } from "react";
3
+ import { A as v, T as y } from "./Toast-C5BwqBkw.js";
4
4
  import "react-dom";
5
- import { A as x } from "./useActionModal-C4X_-O9_.js";
6
- function O({ children: m }) {
7
- const [e, r] = v(null), a = s((t) => new Promise((i) => {
8
- r({
5
+ import { A as b, T as C } from "./useToast-CEKvEJVB.js";
6
+ import { join as w } from "./utils.esm.js";
7
+ function $({ children: d }) {
8
+ const [e, o] = x(null), f = s((t) => new Promise((a) => {
9
+ o({
9
10
  isOpen: !0,
10
11
  type: "confirm",
11
12
  title: t.title,
@@ -13,60 +14,109 @@ function O({ children: m }) {
13
14
  confirmText: t.confirmText,
14
15
  cancelText: t.cancelText,
15
16
  destructive: t.destructive,
16
- resolve: i
17
+ resolve: a
17
18
  });
18
- }), []), f = s((t) => new Promise((i) => {
19
- r({
19
+ }), []), c = s((t) => new Promise((a) => {
20
+ o({
20
21
  isOpen: !0,
21
22
  type: "alert",
22
23
  title: t.title,
23
24
  message: t.message,
24
25
  confirmText: t.confirmText,
25
26
  destructive: t.destructive,
26
- resolve: i
27
+ resolve: a
27
28
  });
28
- }), []), n = s(() => {
29
- e != null && e.resolve && (e.type === "confirm" ? e.resolve(!1) : e.resolve()), r(null);
30
- }, [e]), l = s(() => {
31
- e != null && e.resolve && (e.type === "confirm" ? e.resolve(!0) : e.resolve()), r(null);
29
+ }), []), i = s(() => {
30
+ e != null && e.resolve && (e.type === "confirm" ? e.resolve(!1) : e.resolve()), o(null);
31
+ }, [e]), n = s(() => {
32
+ e != null && e.resolve && (e.type === "confirm" ? e.resolve(!0) : e.resolve()), o(null);
32
33
  }, [e]), u = {
33
- confirm: a,
34
- alert: f
34
+ confirm: f,
35
+ alert: c
35
36
  };
36
- return /* @__PURE__ */ d(x.Provider, { value: u, children: [
37
- m,
38
- e && e.type === "alert" && /* @__PURE__ */ c(
39
- o,
37
+ return /* @__PURE__ */ g(b.Provider, { value: u, children: [
38
+ d,
39
+ e && e.type === "alert" && /* @__PURE__ */ l(
40
+ v,
40
41
  {
41
42
  type: "alert",
42
43
  isOpen: e.isOpen,
43
- onClose: n,
44
+ onClose: i,
44
45
  title: e.title,
45
46
  message: e.message,
46
47
  confirmText: e.confirmText,
47
48
  destructive: e.destructive,
48
- onConfirm: l,
49
+ onConfirm: n,
49
50
  className: "bg-white dark:bg-gray-800 rounded-lg"
50
51
  }
51
52
  ),
52
- e && e.type === "confirm" && /* @__PURE__ */ c(
53
- o,
53
+ e && e.type === "confirm" && /* @__PURE__ */ l(
54
+ v,
54
55
  {
55
56
  type: "confirm",
56
57
  isOpen: e.isOpen,
57
- onClose: n,
58
+ onClose: i,
58
59
  title: e.title,
59
60
  message: e.message,
60
61
  confirmText: e.confirmText,
61
62
  cancelText: e.cancelText,
62
63
  destructive: e.destructive,
63
- onConfirm: l,
64
+ onConfirm: n,
64
65
  className: "bg-white dark:bg-gray-800 rounded-lg"
65
66
  }
66
67
  )
67
68
  ] });
68
69
  }
70
+ const O = {
71
+ "top-right": "top-4 right-4",
72
+ "top-left": "top-4 left-4",
73
+ "bottom-right": "bottom-4 right-4",
74
+ "bottom-left": "bottom-4 left-4",
75
+ "top-center": "top-4 left-1/2 -translate-x-1/2",
76
+ "bottom-center": "bottom-4 left-1/2 -translate-x-1/2"
77
+ };
78
+ function z({
79
+ children: d,
80
+ customTypes: e,
81
+ customComponent: o,
82
+ position: f = "top-right",
83
+ maxToasts: c = 5
84
+ }) {
85
+ const [i, n] = x([]), u = s(
86
+ (r) => {
87
+ const p = `toast-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`, m = r.id || p, T = {
88
+ id: m,
89
+ title: r.title,
90
+ description: r.description,
91
+ type: r.type || "info",
92
+ action: r.action,
93
+ duration: r.duration ?? 5e3
94
+ };
95
+ return n((h) => [T, ...h].slice(0, c)), m;
96
+ },
97
+ [c]
98
+ ), t = s((r) => {
99
+ n((p) => p.filter((m) => m.id !== r));
100
+ }, []), a = {
101
+ addToast: u,
102
+ removeToast: t,
103
+ toasts: i
104
+ };
105
+ return /* @__PURE__ */ g(C.Provider, { value: a, children: [
106
+ d,
107
+ /* @__PURE__ */ l(
108
+ "div",
109
+ {
110
+ className: w("fixed z-50 pointer-events-none max-w-sm w-full space-y-2", O[f]),
111
+ role: "region",
112
+ "aria-label": "Notifications",
113
+ children: i.map((r) => /* @__PURE__ */ l("div", { className: "pointer-events-auto", children: /* @__PURE__ */ l(y, { ...r, onRemove: t, customTypes: e, customComponent: o }) }, r.id))
114
+ }
115
+ )
116
+ ] });
117
+ }
69
118
  export {
70
- O as ActionModalProvider
119
+ $ as ActionModalProvider,
120
+ z as ToastProvider
71
121
  };
72
122
  //# sourceMappingURL=providers.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"providers.esm.js","sources":["../src/providers/ActionModalProvider.tsx"],"sourcesContent":["import { ReactNode, useCallback, useState } from 'react';\nimport { ActionModal } from '../components';\nimport { ActionModalContext } from '../hooks';\n\nexport interface ConfirmOptions {\n title?: string;\n message: ReactNode;\n confirmText?: string;\n cancelText?: string;\n destructive?: boolean;\n}\n\nexport interface AlertOptions {\n title?: string;\n message: ReactNode;\n confirmText?: string;\n destructive?: boolean;\n}\n\nexport interface ActionModalContextValue {\n confirm: (options: ConfirmOptions) => Promise<boolean>;\n alert: (options: AlertOptions) => Promise<void>;\n}\n\ninterface ActionModalState {\n isOpen: boolean;\n type: 'alert' | 'confirm';\n title?: string;\n message: ReactNode;\n confirmText?: string;\n cancelText?: string;\n destructive?: boolean;\n resolve?: ((value: boolean) => void) | (() => void);\n}\n\nexport function ActionModalProvider({ children }: { children: ReactNode }) {\n const [modalState, setModalState] = useState<ActionModalState | null>(null);\n\n const confirm = useCallback((options: ConfirmOptions): Promise<boolean> => {\n return new Promise((resolve) => {\n setModalState({\n isOpen: true,\n type: 'confirm',\n title: options.title,\n message: options.message,\n confirmText: options.confirmText,\n cancelText: options.cancelText,\n destructive: options.destructive,\n resolve,\n });\n });\n }, []);\n\n const alert = useCallback((options: AlertOptions): Promise<void> => {\n return new Promise((resolve) => {\n setModalState({\n isOpen: true,\n type: 'alert',\n title: options.title,\n message: options.message,\n confirmText: options.confirmText,\n destructive: options.destructive,\n resolve,\n });\n });\n }, []);\n\n const handleClose = useCallback(() => {\n if (modalState?.resolve) {\n if (modalState.type === 'confirm') {\n (modalState.resolve as (value: boolean) => void)(false);\n } else {\n (modalState.resolve as () => void)();\n }\n }\n setModalState(null);\n }, [modalState]);\n\n const handleConfirm = useCallback(() => {\n if (modalState?.resolve) {\n if (modalState.type === 'confirm') {\n (modalState.resolve as (value: boolean) => void)(true);\n } else {\n (modalState.resolve as () => void)();\n }\n }\n setModalState(null);\n }, [modalState]);\n\n const contextValue: ActionModalContextValue = {\n confirm,\n alert,\n };\n\n return (\n <ActionModalContext.Provider value={contextValue}>\n {children}\n {modalState && modalState.type === 'alert' && (\n <ActionModal\n type='alert'\n isOpen={modalState.isOpen}\n onClose={handleClose}\n title={modalState.title}\n message={modalState.message}\n confirmText={modalState.confirmText}\n destructive={modalState.destructive}\n onConfirm={handleConfirm}\n className='bg-white dark:bg-gray-800 rounded-lg'\n />\n )}\n {modalState && modalState.type === 'confirm' && (\n <ActionModal\n type='confirm'\n isOpen={modalState.isOpen}\n onClose={handleClose}\n title={modalState.title}\n message={modalState.message}\n confirmText={modalState.confirmText}\n cancelText={modalState.cancelText}\n destructive={modalState.destructive}\n onConfirm={handleConfirm}\n className='bg-white dark:bg-gray-800 rounded-lg'\n />\n )}\n </ActionModalContext.Provider>\n );\n}\n"],"names":["ActionModalProvider","children","modalState","setModalState","useState","confirm","useCallback","options","resolve","alert","handleClose","handleConfirm","contextValue","jsxs","ActionModalContext","jsx","ActionModal"],"mappings":";;;;;AAmCgB,SAAAA,EAAoB,EAAE,UAAAC,KAAqC;AACzE,QAAM,CAACC,GAAYC,CAAa,IAAIC,EAAkC,IAAI,GAEpEC,IAAUC,EAAY,CAACC,MACpB,IAAI,QAAQ,CAACC,MAAY;AAChB,IAAAL,EAAA;AAAA,MACZ,QAAQ;AAAA,MACR,MAAM;AAAA,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AAU;AAAA,MAAA;AAAA,IACZ;AAAA,IAEDT,KAAcA,EAAW,SAAS,aACjC,gBAAAa;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,QAAQd,EAAW;AAAA,QACnB,SAASQ;AAAA,QACT,OAAOR,EAAW;AAAA,QAClB,SAASA,EAAW;AAAA,QACpB,aAAaA,EAAW;AAAA,QACxB,YAAYA,EAAW;AAAA,QACvB,aAAaA,EAAW;AAAA,QACxB,WAAWS;AAAA,QACX,WAAU;AAAA,MAAA;AAAA,IAAA;AAAA,EACZ,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"providers.esm.js","sources":["../src/providers/ActionModalProvider.tsx","../src/providers/ToastProvider.tsx"],"sourcesContent":["import { ReactNode, useCallback, useState } from 'react';\nimport { ActionModal } from '../components';\nimport { ActionModalContext } from '../hooks';\n\nexport interface ConfirmOptions {\n title?: string;\n message: ReactNode;\n confirmText?: string;\n cancelText?: string;\n destructive?: boolean;\n}\n\nexport interface AlertOptions {\n title?: string;\n message: ReactNode;\n confirmText?: string;\n destructive?: boolean;\n}\n\nexport interface ActionModalContextValue {\n confirm: (options: ConfirmOptions) => Promise<boolean>;\n alert: (options: AlertOptions) => Promise<void>;\n}\n\ninterface ActionModalState {\n isOpen: boolean;\n type: 'alert' | 'confirm';\n title?: string;\n message: ReactNode;\n confirmText?: string;\n cancelText?: string;\n destructive?: boolean;\n resolve?: ((value: boolean) => void) | (() => void);\n}\n\nexport function ActionModalProvider({ children }: { children: ReactNode }) {\n const [modalState, setModalState] = useState<ActionModalState | null>(null);\n\n const confirm = useCallback((options: ConfirmOptions): Promise<boolean> => {\n return new Promise((resolve) => {\n setModalState({\n isOpen: true,\n type: 'confirm',\n title: options.title,\n message: options.message,\n confirmText: options.confirmText,\n cancelText: options.cancelText,\n destructive: options.destructive,\n resolve,\n });\n });\n }, []);\n\n const alert = useCallback((options: AlertOptions): Promise<void> => {\n return new Promise((resolve) => {\n setModalState({\n isOpen: true,\n type: 'alert',\n title: options.title,\n message: options.message,\n confirmText: options.confirmText,\n destructive: options.destructive,\n resolve,\n });\n });\n }, []);\n\n const handleClose = useCallback(() => {\n if (modalState?.resolve) {\n if (modalState.type === 'confirm') {\n (modalState.resolve as (value: boolean) => void)(false);\n } else {\n (modalState.resolve as () => void)();\n }\n }\n setModalState(null);\n }, [modalState]);\n\n const handleConfirm = useCallback(() => {\n if (modalState?.resolve) {\n if (modalState.type === 'confirm') {\n (modalState.resolve as (value: boolean) => void)(true);\n } else {\n (modalState.resolve as () => void)();\n }\n }\n setModalState(null);\n }, [modalState]);\n\n const contextValue: ActionModalContextValue = {\n confirm,\n alert,\n };\n\n return (\n <ActionModalContext.Provider value={contextValue}>\n {children}\n {modalState && modalState.type === 'alert' && (\n <ActionModal\n type='alert'\n isOpen={modalState.isOpen}\n onClose={handleClose}\n title={modalState.title}\n message={modalState.message}\n confirmText={modalState.confirmText}\n destructive={modalState.destructive}\n onConfirm={handleConfirm}\n className='bg-white dark:bg-gray-800 rounded-lg'\n />\n )}\n {modalState && modalState.type === 'confirm' && (\n <ActionModal\n type='confirm'\n isOpen={modalState.isOpen}\n onClose={handleClose}\n title={modalState.title}\n message={modalState.message}\n confirmText={modalState.confirmText}\n cancelText={modalState.cancelText}\n destructive={modalState.destructive}\n onConfirm={handleConfirm}\n className='bg-white dark:bg-gray-800 rounded-lg'\n />\n )}\n </ActionModalContext.Provider>\n );\n}\n","import { ReactNode, useCallback, useState } from 'react';\nimport { Toast, ToastData, ToastType } from '../components/toast';\nimport { AddToastOptions, ToastContextValue } from '../hooks/useToast';\nimport { ToastContext } from '../hooks/useToast';\nimport { join } from '../utils';\n\ninterface ToastProviderProps {\n children: ReactNode;\n customTypes?: Record<string, { className: string; icon?: ReactNode }>;\n customComponent?: React.ComponentType<ToastData>;\n position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'top-center' | 'bottom-center';\n maxToasts?: number;\n}\n\nconst positionClasses = {\n 'top-right': 'top-4 right-4',\n 'top-left': 'top-4 left-4',\n 'bottom-right': 'bottom-4 right-4',\n 'bottom-left': 'bottom-4 left-4',\n 'top-center': 'top-4 left-1/2 -translate-x-1/2',\n 'bottom-center': 'bottom-4 left-1/2 -translate-x-1/2',\n};\n\nexport function ToastProvider({\n children,\n customTypes,\n customComponent,\n position = 'top-right',\n maxToasts = 5,\n}: ToastProviderProps) {\n const [toasts, setToasts] = useState<ToastData[]>([]);\n\n const addToast = useCallback(\n (options: AddToastOptions) => {\n const generatedId = `toast-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;\n const id = options.id || generatedId;\n\n const newToast: ToastData = {\n id,\n title: options.title,\n description: options.description,\n type: (options.type as ToastType) || 'info',\n action: options.action,\n duration: options.duration ?? 5000,\n };\n\n setToasts((prevToasts) => {\n const updatedToasts = [newToast, ...prevToasts];\n // Keep only the most recent toasts if we exceed maxToasts\n return updatedToasts.slice(0, maxToasts);\n });\n\n return id;\n },\n [maxToasts]\n );\n\n const removeToast = useCallback((id: string) => {\n setToasts((prevToasts) => prevToasts.filter((toast) => toast.id !== id));\n }, []);\n\n const contextValue: ToastContextValue = {\n addToast,\n removeToast,\n toasts,\n };\n\n return (\n <ToastContext.Provider value={contextValue}>\n {children}\n\n <div\n className={join('fixed z-50 pointer-events-none max-w-sm w-full space-y-2', positionClasses[position])}\n role='region'\n aria-label='Notifications'\n >\n {toasts.map((toast) => (\n <div key={toast.id} className='pointer-events-auto'>\n <Toast {...toast} onRemove={removeToast} customTypes={customTypes} customComponent={customComponent} />\n </div>\n ))}\n </div>\n </ToastContext.Provider>\n );\n}\n"],"names":["ActionModalProvider","children","modalState","setModalState","useState","confirm","useCallback","options","resolve","alert","handleClose","handleConfirm","contextValue","jsxs","ActionModalContext","jsx","ActionModal","positionClasses","ToastProvider","customTypes","customComponent","position","maxToasts","toasts","setToasts","addToast","generatedId","id","newToast","prevToasts","removeToast","toast","ToastContext","join","Toast"],"mappings":";;;;;;AAmCgB,SAAAA,EAAoB,EAAE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QAChB,UAAUA,EAAQ,YAAY;AAAA,MAChC;AAEA,aAAAiB,EAAU,CAACK,MACa,CAACD,GAAU,GAAGC,CAAU,EAEzB,MAAM,GAAGP,CAAS,CACxC,GAEMK;AAAA,IACT;AAAA,IACA,CAACL,CAAS;AAAA,EACZ,GAEMQ,IAAcxB,EAAY,CAACqB,MAAe;AACpC,IAAAH,EAAA,CAACK,MAAeA,EAAW,OAAO,CAACE,MAAUA,EAAM,OAAOJ,CAAE,CAAC;AAAA,EACzE,GAAG,EAAE,GAECf,IAAkC;AAAA,IACtC,UAAAa;AAAA,IACA,aAAAK;AAAA,IACA,QAAAP;AAAA,EACF;AAEA,SACG,gBAAAV,EAAAmB,EAAa,UAAb,EAAsB,OAAOpB,GAC3B,UAAA;AAAA,IAAAX;AAAA,IAED,gBAAAc;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAWkB,EAAK,6DAA6DhB,EAAgBI,CAAQ,CAAC;AAAA,QACtG,MAAK;AAAA,QACL,cAAW;AAAA,QAEV,YAAO,IAAI,CAACU,MACV,gBAAAhB,EAAA,OAAA,EAAmB,WAAU,uBAC5B,UAAA,gBAAAA,EAACmB,KAAO,GAAGH,GAAO,UAAUD,GAAa,aAAAX,GAA0B,iBAAAC,GAAkC,EAD7F,GAAAW,EAAM,EAEhB,CACD;AAAA,MAAA;AAAA,IAAA;AAAA,EACH,GACF;AAEJ;"}
@@ -9,4 +9,6 @@ export * from './modal';
9
9
  export * from './radiogroup';
10
10
  export * from './slot';
11
11
  export * from './textarea';
12
+ export * from './toast';
13
+ export * from './toggle';
12
14
  export * from './tooltip';
@@ -1,5 +1,2 @@
1
1
  export { Toast } from './Toast';
2
2
  export type { ToastAction, ToastData, ToastType } from './Toast';
3
- export { ToastProvider } from './ToastProvider';
4
- export { useToast } from './useToast';
5
- export type { AddToastOptions, ToastContextValue } from './useToast';
@@ -0,0 +1,13 @@
1
+ import React, { Ref } from 'react';
2
+ import { ToggleBackgroundClasses, ToggleSize, ToggleVariant } from './variants';
3
+ export interface ToggleProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onChange'> {
4
+ ref?: Ref<HTMLButtonElement>;
5
+ size?: ToggleSize;
6
+ variant?: ToggleVariant;
7
+ checked?: boolean;
8
+ onCheckedChange?: (checked: boolean) => void;
9
+ disabled?: boolean;
10
+ thumbClassName?: string;
11
+ backgroundClassNames?: ToggleBackgroundClasses;
12
+ }
13
+ export default function Toggle({ ref, id, size, variant, checked, onCheckedChange, disabled, className, thumbClassName, backgroundClassNames, ...props }: ToggleProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { default as Toggle } from './Toggle';
2
+ export type { ToggleProps } from './Toggle';
@@ -0,0 +1,29 @@
1
+ export declare const sizeVariants: {
2
+ sm: {
3
+ container: string;
4
+ thumb: string;
5
+ translate: string;
6
+ };
7
+ md: {
8
+ container: string;
9
+ thumb: string;
10
+ translate: string;
11
+ };
12
+ lg: {
13
+ container: string;
14
+ thumb: string;
15
+ translate: string;
16
+ };
17
+ };
18
+ export type ToggleSize = keyof typeof sizeVariants;
19
+ export interface ToggleBackgroundClasses {
20
+ unchecked?: string;
21
+ checked?: string;
22
+ }
23
+ export declare const variantStyles: Record<ToggleVariant, ToggleBackgroundClasses>;
24
+ export type ToggleVariant = 'default' | 'success' | 'destructive';
25
+ export interface ToggleVariants {
26
+ variant: ToggleVariant;
27
+ size: ToggleSize;
28
+ }
29
+ export declare const toggleDefaults: ToggleVariants;
@@ -1 +1,2 @@
1
1
  export { ActionModalContext, useActionModal } from './useActionModal';
2
+ export { useToast, type AddToastOptions, type ToastContextValue } from './useToast';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { ToastAction, ToastData, ToastType } from './Toast';
2
+ import { ToastAction, ToastData, ToastType } from '../components/toast';
3
3
  export interface AddToastOptions {
4
4
  id?: string;
5
5
  title: string;
@@ -9,7 +9,7 @@ export interface AddToastOptions {
9
9
  duration?: number;
10
10
  }
11
11
  export interface ToastContextValue {
12
- addToast: (options: AddToastOptions) => void;
12
+ addToast: (options: AddToastOptions) => string;
13
13
  removeToast: (id: string) => void;
14
14
  toasts: ToastData[];
15
15
  }
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import { ToastData } from './Toast';
2
+ import { ToastData } from '../components/toast';
3
3
  interface ToastProviderProps {
4
4
  children: ReactNode;
5
5
  customTypes?: Record<string, {
@@ -1 +1,2 @@
1
1
  export { ActionModalProvider, type ActionModalContextValue, type AlertOptions, type ConfirmOptions, } from './ActionModalProvider';
2
+ export { ToastProvider } from './ToastProvider';
@@ -1,4 +1,2 @@
1
- export default function Check({ size, color }: {
2
- size?: number;
3
- color?: string;
4
- }): import("react/jsx-runtime").JSX.Element;
1
+ import { SymbolProps } from '.';
2
+ export default function Check({ size, color, className, ...props }: SymbolProps): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,2 @@
1
- export default function CheckCircled({ size }: {
2
- size?: number;
3
- }): import("react/jsx-runtime").JSX.Element;
1
+ import { SymbolProps } from '.';
2
+ export default function CheckCircled({ size, color, className, ...props }: SymbolProps): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,2 @@
1
- export default function ChevronDown({ size, color }: {
2
- size?: number;
3
- color?: string;
4
- }): import("react/jsx-runtime").JSX.Element;
1
+ import { SymbolProps } from '.';
2
+ export default function ChevronDown({ size, color, className, ...props }: SymbolProps): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,2 @@
1
- export default function CrossCircled({ size, color }: {
2
- size?: number;
3
- color?: string;
4
- }): import("react/jsx-runtime").JSX.Element;
1
+ import { SymbolProps } from '.';
2
+ export default function CrossCircled({ size, color, className, ...props }: SymbolProps): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,2 @@
1
- export default function ExclamationTriangle({ size }: {
2
- size?: number;
3
- }): import("react/jsx-runtime").JSX.Element;
1
+ import { SymbolProps } from '.';
2
+ export default function ExclamationTriangle({ size, color, className, ...props }: SymbolProps): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,2 @@
1
- export default function EyeClosed({ size }: {
2
- size?: number;
3
- }): import("react/jsx-runtime").JSX.Element;
1
+ import { SymbolProps } from '.';
2
+ export default function EyeClosed({ size, color, className, ...props }: SymbolProps): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,2 @@
1
- export default function EyeClosed({ size }: {
2
- size?: number;
3
- }): import("react/jsx-runtime").JSX.Element;
1
+ import { SymbolProps } from '.';
2
+ export default function EyeClosed({ size, color, className, ...props }: SymbolProps): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,2 @@
1
- export default function InfoCircled({ size, color }: {
2
- size?: number;
3
- color?: string;
4
- }): import("react/jsx-runtime").JSX.Element;
1
+ import { SymbolProps } from '.';
2
+ export default function InfoCircled({ size, color, className, ...props }: SymbolProps): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,2 @@
1
- export default function QuestionMarkCircled({ size, color }: {
2
- size?: number;
3
- color?: string;
4
- }): import("react/jsx-runtime").JSX.Element;
1
+ import { SymbolProps } from '.';
2
+ export default function QuestionMarkCircled({ size, color, className, ...props }: SymbolProps): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,2 @@
1
- export default function X({ size, color }: {
2
- size?: number;
3
- color?: string;
4
- }): import("react/jsx-runtime").JSX.Element;
1
+ import { SymbolProps } from '.';
2
+ export default function X({ size, color, className, ...props }: SymbolProps): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export { default as Check } from './Check';
2
3
  export { default as CheckCircled } from './CheckCircled';
3
4
  export { default as ChevronDown } from './ChevronDown';
@@ -8,3 +9,7 @@ export { default as EyeOpened } from './EyeOpened';
8
9
  export { default as InfoCircled } from './InfoCircled';
9
10
  export { default as QuestionMarkCircled } from './QuestionMarkCircled';
10
11
  export { default as X } from './X';
12
+ export interface SymbolProps extends React.HTMLAttributes<SVGElement> {
13
+ size?: number;
14
+ color?: string;
15
+ }
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./X-BCa88TDt.cjs"),l=require("react/jsx-runtime");function n({size:C=15,color:i="currentColor"}){return l.jsx("svg",{width:C,height:C,className:"inline",viewBox:"0 0 15 15",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{d:"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704ZM9.85358 5.14644C10.0488 5.3417 10.0488 5.65829 9.85358 5.85355L8.20713 7.49999L9.85358 9.14644C10.0488 9.3417 10.0488 9.65829 9.85358 9.85355C9.65832 10.0488 9.34173 10.0488 9.14647 9.85355L7.50002 8.2071L5.85358 9.85355C5.65832 10.0488 5.34173 10.0488 5.14647 9.85355C4.95121 9.65829 4.95121 9.3417 5.14647 9.14644L6.79292 7.49999L5.14647 5.85355C4.95121 5.65829 4.95121 5.3417 5.14647 5.14644C5.34173 4.95118 5.65832 4.95118 5.85358 5.14644L7.50002 6.79289L9.14647 5.14644C9.34173 4.95118 9.65832 4.95118 9.85358 5.14644Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"})})}function r({size:C=15,color:i="currentColor"}){return l.jsx("svg",{width:C,height:C,className:"inline",viewBox:"0 0 15 15",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{d:"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM8.24992 4.49999C8.24992 4.9142 7.91413 5.24999 7.49992 5.24999C7.08571 5.24999 6.74992 4.9142 6.74992 4.49999C6.74992 4.08577 7.08571 3.74999 7.49992 3.74999C7.91413 3.74999 8.24992 4.08577 8.24992 4.49999ZM6.00003 5.99999H6.50003H7.50003C7.77618 5.99999 8.00003 6.22384 8.00003 6.49999V9.99999H8.50003H9.00003V11H8.50003H7.50003H6.50003H6.00003V9.99999H6.50003H7.00003V6.99999H6.50003H6.00003V5.99999Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"})})}exports.Check=e.Check;exports.CheckCircled=e.CheckCircled;exports.ChevronDown=e.ChevronDown;exports.ExclamationTriangle=e.ExclamationTriangle;exports.EyeClosed=e.EyeClosed;exports.EyeOpened=e.EyeClosed$1;exports.QuestionMarkCircled=e.QuestionMarkCircled;exports.X=e.X;exports.CrossCircled=n;exports.InfoCircled=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./QuestionMarkCircled-D5cHmQp1.cjs"),r=require("./X-CgjeP2OI.cjs");exports.Check=e.Check;exports.CheckCircled=e.CheckCircled;exports.ChevronDown=e.ChevronDown;exports.EyeClosed=e.EyeClosed;exports.EyeOpened=e.EyeClosed$1;exports.QuestionMarkCircled=e.QuestionMarkCircled;exports.CrossCircled=r.CrossCircled;exports.ExclamationTriangle=r.ExclamationTriangle;exports.InfoCircled=r.InfoCircled;exports.X=r.X;
2
2
  //# sourceMappingURL=symbols.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"symbols.cjs.js","sources":["../src/symbols/CrossCircled.tsx","../src/symbols/InfoCircled.tsx"],"sourcesContent":["export default function CrossCircled({ size = 15, color = 'currentColor' }: { size?: number; color?: string }) {\n return (\n <svg width={size} height={size} className={'inline'} viewBox='0 0 15 15' xmlns='http://www.w3.org/2000/svg'>\n <path\n d='M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704ZM9.85358 5.14644C10.0488 5.3417 10.0488 5.65829 9.85358 5.85355L8.20713 7.49999L9.85358 9.14644C10.0488 9.3417 10.0488 9.65829 9.85358 9.85355C9.65832 10.0488 9.34173 10.0488 9.14647 9.85355L7.50002 8.2071L5.85358 9.85355C5.65832 10.0488 5.34173 10.0488 5.14647 9.85355C4.95121 9.65829 4.95121 9.3417 5.14647 9.14644L6.79292 7.49999L5.14647 5.85355C4.95121 5.65829 4.95121 5.3417 5.14647 5.14644C5.34173 4.95118 5.65832 4.95118 5.85358 5.14644L7.50002 6.79289L9.14647 5.14644C9.34173 4.95118 9.65832 4.95118 9.85358 5.14644Z'\n fill={color}\n fillRule='evenodd'\n clipRule='evenodd'\n />\n </svg>\n );\n}\n","export default function InfoCircled({ size = 15, color = 'currentColor' }: { size?: number; color?: string }) {\n return (\n <svg width={size} height={size} className={'inline'} viewBox='0 0 15 15' xmlns='http://www.w3.org/2000/svg'>\n <path\n d='M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM8.24992 4.49999C8.24992 4.9142 7.91413 5.24999 7.49992 5.24999C7.08571 5.24999 6.74992 4.9142 6.74992 4.49999C6.74992 4.08577 7.08571 3.74999 7.49992 3.74999C7.91413 3.74999 8.24992 4.08577 8.24992 4.49999ZM6.00003 5.99999H6.50003H7.50003C7.77618 5.99999 8.00003 6.22384 8.00003 6.49999V9.99999H8.50003H9.00003V11H8.50003H7.50003H6.50003H6.00003V9.99999H6.50003H7.00003V6.99999H6.50003H6.00003V5.99999Z'\n fill={color}\n fillRule='evenodd'\n clipRule='evenodd'\n />\n </svg>\n );\n}\n"],"names":["CrossCircled","size","color","jsx","InfoCircled"],"mappings":"mJAAA,SAAwBA,EAAa,CAAE,KAAAC,EAAO,GAAI,MAAAC,EAAQ,gBAAqD,CAE3G,OAAAC,EAAAA,IAAC,MAAI,CAAA,MAAOF,EAAM,OAAQA,EAAM,UAAW,SAAU,QAAQ,YAAY,MAAM,6BAC7E,SAAAE,EAAA,IAAC,OAAA,CACC,EAAE,w7BACF,KAAMD,EACN,SAAS,UACT,SAAS,SAAA,CAAA,EAEb,CAEJ,CCXA,SAAwBE,EAAY,CAAE,KAAAH,EAAO,GAAI,MAAAC,EAAQ,gBAAqD,CAE1G,OAAAC,EAAAA,IAAC,MAAI,CAAA,MAAOF,EAAM,OAAQA,EAAM,UAAW,SAAU,QAAQ,YAAY,MAAM,6BAC7E,SAAAE,EAAA,IAAC,OAAA,CACC,EAAE,+zBACF,KAAMD,EACN,SAAS,UACT,SAAS,SAAA,CAAA,EAEb,CAEJ"}
1
+ {"version":3,"file":"symbols.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,37 +1,15 @@
1
- import { C as t, a as s, b as a, E as c, c as h, d as w, Q as H, X as u } from "./X-5_dKmWcQ.js";
2
- import { jsx as e } from "react/jsx-runtime";
3
- function r({ size: C = 15, color: l = "currentColor" }) {
4
- return /* @__PURE__ */ e("svg", { width: C, height: C, className: "inline", viewBox: "0 0 15 15", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e(
5
- "path",
6
- {
7
- d: "M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704ZM9.85358 5.14644C10.0488 5.3417 10.0488 5.65829 9.85358 5.85355L8.20713 7.49999L9.85358 9.14644C10.0488 9.3417 10.0488 9.65829 9.85358 9.85355C9.65832 10.0488 9.34173 10.0488 9.14647 9.85355L7.50002 8.2071L5.85358 9.85355C5.65832 10.0488 5.34173 10.0488 5.14647 9.85355C4.95121 9.65829 4.95121 9.3417 5.14647 9.14644L6.79292 7.49999L5.14647 5.85355C4.95121 5.65829 4.95121 5.3417 5.14647 5.14644C5.34173 4.95118 5.65832 4.95118 5.85358 5.14644L7.50002 6.79289L9.14647 5.14644C9.34173 4.95118 9.65832 4.95118 9.85358 5.14644Z",
8
- fill: l,
9
- fillRule: "evenodd",
10
- clipRule: "evenodd"
11
- }
12
- ) });
13
- }
14
- function i({ size: C = 15, color: l = "currentColor" }) {
15
- return /* @__PURE__ */ e("svg", { width: C, height: C, className: "inline", viewBox: "0 0 15 15", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e(
16
- "path",
17
- {
18
- d: "M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM8.24992 4.49999C8.24992 4.9142 7.91413 5.24999 7.49992 5.24999C7.08571 5.24999 6.74992 4.9142 6.74992 4.49999C6.74992 4.08577 7.08571 3.74999 7.49992 3.74999C7.91413 3.74999 8.24992 4.08577 8.24992 4.49999ZM6.00003 5.99999H6.50003H7.50003C7.77618 5.99999 8.00003 6.22384 8.00003 6.49999V9.99999H8.50003H9.00003V11H8.50003H7.50003H6.50003H6.00003V9.99999H6.50003H7.00003V6.99999H6.50003H6.00003V5.99999Z",
19
- fill: l,
20
- fillRule: "evenodd",
21
- clipRule: "evenodd"
22
- }
23
- ) });
24
- }
1
+ import { C as s, a as r, b as o, E as C, c, Q as i } from "./QuestionMarkCircled-BVBF3skB.js";
2
+ import { C as n, E as d, I as E, X as t } from "./X-CIoyLewf.js";
25
3
  export {
26
- t as Check,
27
- s as CheckCircled,
28
- a as ChevronDown,
29
- r as CrossCircled,
30
- c as ExclamationTriangle,
31
- h as EyeClosed,
32
- w as EyeOpened,
33
- i as InfoCircled,
34
- H as QuestionMarkCircled,
35
- u as X
4
+ s as Check,
5
+ r as CheckCircled,
6
+ o as ChevronDown,
7
+ n as CrossCircled,
8
+ d as ExclamationTriangle,
9
+ C as EyeClosed,
10
+ c as EyeOpened,
11
+ E as InfoCircled,
12
+ i as QuestionMarkCircled,
13
+ t as X
36
14
  };
37
15
  //# sourceMappingURL=symbols.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"symbols.esm.js","sources":["../src/symbols/CrossCircled.tsx","../src/symbols/InfoCircled.tsx"],"sourcesContent":["export default function CrossCircled({ size = 15, color = 'currentColor' }: { size?: number; color?: string }) {\n return (\n <svg width={size} height={size} className={'inline'} viewBox='0 0 15 15' xmlns='http://www.w3.org/2000/svg'>\n <path\n d='M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704ZM9.85358 5.14644C10.0488 5.3417 10.0488 5.65829 9.85358 5.85355L8.20713 7.49999L9.85358 9.14644C10.0488 9.3417 10.0488 9.65829 9.85358 9.85355C9.65832 10.0488 9.34173 10.0488 9.14647 9.85355L7.50002 8.2071L5.85358 9.85355C5.65832 10.0488 5.34173 10.0488 5.14647 9.85355C4.95121 9.65829 4.95121 9.3417 5.14647 9.14644L6.79292 7.49999L5.14647 5.85355C4.95121 5.65829 4.95121 5.3417 5.14647 5.14644C5.34173 4.95118 5.65832 4.95118 5.85358 5.14644L7.50002 6.79289L9.14647 5.14644C9.34173 4.95118 9.65832 4.95118 9.85358 5.14644Z'\n fill={color}\n fillRule='evenodd'\n clipRule='evenodd'\n />\n </svg>\n );\n}\n","export default function InfoCircled({ size = 15, color = 'currentColor' }: { size?: number; color?: string }) {\n return (\n <svg width={size} height={size} className={'inline'} viewBox='0 0 15 15' xmlns='http://www.w3.org/2000/svg'>\n <path\n d='M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM8.24992 4.49999C8.24992 4.9142 7.91413 5.24999 7.49992 5.24999C7.08571 5.24999 6.74992 4.9142 6.74992 4.49999C6.74992 4.08577 7.08571 3.74999 7.49992 3.74999C7.91413 3.74999 8.24992 4.08577 8.24992 4.49999ZM6.00003 5.99999H6.50003H7.50003C7.77618 5.99999 8.00003 6.22384 8.00003 6.49999V9.99999H8.50003H9.00003V11H8.50003H7.50003H6.50003H6.00003V9.99999H6.50003H7.00003V6.99999H6.50003H6.00003V5.99999Z'\n fill={color}\n fillRule='evenodd'\n clipRule='evenodd'\n />\n </svg>\n );\n}\n"],"names":["CrossCircled","size","color","jsx","InfoCircled"],"mappings":";;AAAA,SAAwBA,EAAa,EAAE,MAAAC,IAAO,IAAI,OAAAC,IAAQ,kBAAqD;AAE3G,SAAA,gBAAAC,EAAC,OAAI,EAAA,OAAOF,GAAM,QAAQA,GAAM,WAAW,UAAU,SAAQ,aAAY,OAAM,8BAC7E,UAAA,gBAAAE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,GAAE;AAAA,MACF,MAAMD;AAAA,MACN,UAAS;AAAA,MACT,UAAS;AAAA,IAAA;AAAA,EAAA,GAEb;AAEJ;ACXA,SAAwBE,EAAY,EAAE,MAAAH,IAAO,IAAI,OAAAC,IAAQ,kBAAqD;AAE1G,SAAA,gBAAAC,EAAC,OAAI,EAAA,OAAOF,GAAM,QAAQA,GAAM,WAAW,UAAU,SAAQ,aAAY,OAAM,8BAC7E,UAAA,gBAAAE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,GAAE;AAAA,MACF,MAAMD;AAAA,MACN,UAAS;AAAA,MACT,UAAS;AAAA,IAAA;AAAA,EAAA,GAEb;AAEJ;"}
1
+ {"version":3,"file":"symbols.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -0,0 +1,22 @@
1
+ import { createContext as o, useContext as n } from "react";
2
+ const e = o(void 0);
3
+ function i() {
4
+ const t = n(e);
5
+ if (!t)
6
+ throw new Error("useActionModal must be used within an ActionModalProvider");
7
+ return t;
8
+ }
9
+ const s = o(void 0);
10
+ function a() {
11
+ const t = n(s);
12
+ if (!t)
13
+ throw new Error("useToast must be used within a ToastProvider");
14
+ return t;
15
+ }
16
+ export {
17
+ e as A,
18
+ s as T,
19
+ a,
20
+ i as u
21
+ };
22
+ //# sourceMappingURL=useToast-CEKvEJVB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useToast-CEKvEJVB.js","sources":["../src/hooks/useActionModal.ts","../src/hooks/useToast.ts"],"sourcesContent":["import { createContext, useContext } from 'react';\nimport { ActionModalContextValue } from '../providers';\n\nexport const ActionModalContext = createContext<ActionModalContextValue | undefined>(undefined);\n\nexport function useActionModal(): ActionModalContextValue {\n const context = useContext(ActionModalContext);\n if (!context) {\n throw new Error('useActionModal must be used within an ActionModalProvider');\n }\n return context;\n}\n","import { createContext, useContext } from 'react';\nimport { ToastAction, ToastData, ToastType } from '../components/toast';\n\nexport interface AddToastOptions {\n id?: string;\n title: string;\n description?: string;\n type?: ToastType | string;\n action?: ToastAction;\n duration?: number;\n}\n\nexport interface ToastContextValue {\n addToast: (options: AddToastOptions) => string;\n removeToast: (id: string) => void;\n toasts: ToastData[];\n}\n\nexport const ToastContext = createContext<ToastContextValue | undefined>(undefined);\n\nexport function useToast(): ToastContextValue {\n const context = useContext(ToastContext);\n if (!context) {\n throw new Error('useToast must be used within a ToastProvider');\n }\n return context;\n}\n"],"names":["ActionModalContext","createContext","useActionModal","context","useContext","ToastContext","useToast"],"mappings":";AAGa,MAAAA,IAAqBC,EAAmD,MAAS;AAEvF,SAASC,IAA0C;AAClD,QAAAC,IAAUC,EAAWJ,CAAkB;AAC7C,MAAI,CAACG;AACG,UAAA,IAAI,MAAM,2DAA2D;AAEtE,SAAAA;AACT;ACOa,MAAAE,IAAeJ,EAA6C,MAAS;AAE3E,SAASK,IAA8B;AACtC,QAAAH,IAAUC,EAAWC,CAAY;AACvC,MAAI,CAACF;AACG,UAAA,IAAI,MAAM,8CAA8C;AAEzD,SAAAA;AACT;"}
@@ -0,0 +1,2 @@
1
+ "use strict";const o=require("react"),e=o.createContext(void 0);function s(){const t=o.useContext(e);if(!t)throw new Error("useActionModal must be used within an ActionModalProvider");return t}const n=o.createContext(void 0);function r(){const t=o.useContext(n);if(!t)throw new Error("useToast must be used within a ToastProvider");return t}exports.ActionModalContext=e;exports.ToastContext=n;exports.useActionModal=s;exports.useToast=r;
2
+ //# sourceMappingURL=useToast-CraVIawn.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useToast-CraVIawn.cjs","sources":["../src/hooks/useActionModal.ts","../src/hooks/useToast.ts"],"sourcesContent":["import { createContext, useContext } from 'react';\nimport { ActionModalContextValue } from '../providers';\n\nexport const ActionModalContext = createContext<ActionModalContextValue | undefined>(undefined);\n\nexport function useActionModal(): ActionModalContextValue {\n const context = useContext(ActionModalContext);\n if (!context) {\n throw new Error('useActionModal must be used within an ActionModalProvider');\n }\n return context;\n}\n","import { createContext, useContext } from 'react';\nimport { ToastAction, ToastData, ToastType } from '../components/toast';\n\nexport interface AddToastOptions {\n id?: string;\n title: string;\n description?: string;\n type?: ToastType | string;\n action?: ToastAction;\n duration?: number;\n}\n\nexport interface ToastContextValue {\n addToast: (options: AddToastOptions) => string;\n removeToast: (id: string) => void;\n toasts: ToastData[];\n}\n\nexport const ToastContext = createContext<ToastContextValue | undefined>(undefined);\n\nexport function useToast(): ToastContextValue {\n const context = useContext(ToastContext);\n if (!context) {\n throw new Error('useToast must be used within a ToastProvider');\n }\n return context;\n}\n"],"names":["ActionModalContext","createContext","useActionModal","context","useContext","ToastContext","useToast"],"mappings":"sCAGaA,EAAqBC,gBAAmD,MAAS,EAEvF,SAASC,GAA0C,CAClD,MAAAC,EAAUC,aAAWJ,CAAkB,EAC7C,GAAI,CAACG,EACG,MAAA,IAAI,MAAM,2DAA2D,EAEtE,OAAAA,CACT,CCOa,MAAAE,EAAeJ,gBAA6C,MAAS,EAE3E,SAASK,GAA8B,CACtC,MAAAH,EAAUC,aAAWC,CAAY,EACvC,GAAI,CAACF,EACG,MAAA,IAAI,MAAM,8CAA8C,EAEzD,OAAAA,CACT"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moondreamsdev/dreamer-ui",
3
- "version": "1.7.7-test.0",
3
+ "version": "1.7.7-test.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -37,7 +37,7 @@
37
37
  "require": "./dist/providers.js"
38
38
  },
39
39
  "./symbols": {
40
- "types": "./dist/src/symbols/index.d.ts",
40
+ "types": "./dist/src/symbols/index.d.tsx",
41
41
  "import": "./dist/symbols.esm.js",
42
42
  "require": "./dist/symbols.js"
43
43
  },