@korsolutions/ui 0.0.45 → 0.0.46
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.
- package/dist/module/components/index.js +14 -14
- package/dist/module/index.js +1 -0
- package/dist/module/index.js.map +1 -1
- package/dist/module/primitives/alert/alert-description.js +16 -0
- package/dist/module/primitives/alert/alert-description.js.map +1 -0
- package/dist/module/primitives/alert/alert-icon.js +16 -0
- package/dist/module/primitives/alert/alert-icon.js.map +1 -0
- package/dist/module/primitives/alert/alert-root.js +22 -0
- package/dist/module/primitives/alert/alert-root.js.map +1 -0
- package/dist/module/primitives/alert/alert-title.js +16 -0
- package/dist/module/primitives/alert/alert-title.js.map +1 -0
- package/dist/module/primitives/alert/context.js +12 -0
- package/dist/module/primitives/alert/context.js.map +1 -0
- package/dist/module/primitives/alert/index.js +13 -0
- package/dist/module/primitives/alert/index.js.map +1 -0
- package/dist/module/primitives/alert/types.js +4 -0
- package/dist/module/primitives/alert/types.js.map +1 -0
- package/dist/module/primitives/alert/variants/default.js +35 -0
- package/dist/module/primitives/alert/variants/default.js.map +1 -0
- package/dist/module/primitives/alert/variants/destructive.js +36 -0
- package/dist/module/primitives/alert/variants/destructive.js.map +1 -0
- package/dist/module/primitives/alert/variants/index.js +9 -0
- package/dist/module/primitives/alert/variants/index.js.map +1 -0
- package/dist/module/primitives/index.js +13 -12
- package/dist/module/primitives/index.js.map +1 -1
- package/dist/module/types/props.types.js +2 -0
- package/dist/module/types/props.types.js.map +1 -0
- package/dist/typescript/src/components/index.d.ts +14 -14
- package/dist/typescript/src/components/index.d.ts.map +1 -1
- package/dist/typescript/src/index.d.ts +1 -0
- package/dist/typescript/src/index.d.ts.map +1 -1
- package/dist/typescript/src/primitives/alert/alert-description.d.ts +9 -0
- package/dist/typescript/src/primitives/alert/alert-description.d.ts.map +1 -0
- package/dist/typescript/src/primitives/alert/alert-icon.d.ts +9 -0
- package/dist/typescript/src/primitives/alert/alert-icon.d.ts.map +1 -0
- package/dist/typescript/src/primitives/alert/alert-root.d.ts +11 -0
- package/dist/typescript/src/primitives/alert/alert-root.d.ts.map +1 -0
- package/dist/typescript/src/primitives/alert/alert-title.d.ts +9 -0
- package/dist/typescript/src/primitives/alert/alert-title.d.ts.map +1 -0
- package/dist/typescript/src/primitives/alert/context.d.ts +7 -0
- package/dist/typescript/src/primitives/alert/context.d.ts.map +1 -0
- package/dist/typescript/src/primitives/alert/index.d.ts +16 -0
- package/dist/typescript/src/primitives/alert/index.d.ts.map +1 -0
- package/dist/typescript/src/primitives/alert/types.d.ts +11 -0
- package/dist/typescript/src/primitives/alert/types.d.ts.map +1 -0
- package/dist/typescript/src/primitives/alert/variants/default.d.ts +3 -0
- package/dist/typescript/src/primitives/alert/variants/default.d.ts.map +1 -0
- package/dist/typescript/src/primitives/alert/variants/destructive.d.ts +3 -0
- package/dist/typescript/src/primitives/alert/variants/destructive.d.ts.map +1 -0
- package/dist/typescript/src/primitives/alert/variants/index.d.ts +5 -0
- package/dist/typescript/src/primitives/alert/variants/index.d.ts.map +1 -0
- package/dist/typescript/src/primitives/index.d.ts +13 -12
- package/dist/typescript/src/primitives/index.d.ts.map +1 -1
- package/dist/typescript/src/types/props.types.d.ts +4 -0
- package/dist/typescript/src/types/props.types.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/components/index.ts +14 -14
- package/src/index.tsx +1 -0
- package/src/primitives/alert/alert-description.tsx +19 -0
- package/src/primitives/alert/alert-icon.tsx +19 -0
- package/src/primitives/alert/alert-root.tsx +28 -0
- package/src/primitives/alert/alert-title.tsx +19 -0
- package/src/primitives/alert/context.ts +16 -0
- package/src/primitives/alert/index.ts +17 -0
- package/src/primitives/alert/types.ts +11 -0
- package/src/primitives/alert/variants/default.tsx +32 -0
- package/src/primitives/alert/variants/destructive.tsx +33 -0
- package/src/primitives/alert/variants/index.ts +7 -0
- package/src/primitives/index.ts +13 -12
- package/src/types/props.types.ts +3 -0
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
export * from "./
|
|
4
|
-
export * from "./card/card.js";
|
|
5
|
-
export * from "./input/index.js";
|
|
6
|
-
export * from "./field/field.js";
|
|
7
|
-
export * from "./select/select.js";
|
|
3
|
+
export * from "./alert-dialog/index.js";
|
|
8
4
|
export * from "./autocomplete/autocomplete.js";
|
|
9
|
-
export * from "./typography/typography.js";
|
|
10
|
-
export * from "./link/link.js";
|
|
11
|
-
export * from "./empty/empty.js";
|
|
12
5
|
export * from "./avatar/avatar.js";
|
|
13
|
-
export * from "./toast/index.js";
|
|
14
6
|
export * from "./badge/badge.js";
|
|
15
|
-
export * from "./
|
|
16
|
-
export * from "./dropdown-menu/dropdown-menu.js";
|
|
17
|
-
export * from "./popover/popover.js";
|
|
7
|
+
export * from "./button/button.js";
|
|
18
8
|
export * from "./calendar/calendar.js";
|
|
19
|
-
export * from "./
|
|
9
|
+
export * from "./card/card.js";
|
|
20
10
|
export * from "./checkbox/index.js";
|
|
21
|
-
export * from "./
|
|
11
|
+
export * from "./dropdown-menu/dropdown-menu.js";
|
|
12
|
+
export * from "./empty/empty.js";
|
|
13
|
+
export * from "./field/field.js";
|
|
14
|
+
export * from "./input/index.js";
|
|
15
|
+
export * from "./link/link.js";
|
|
16
|
+
export * from "./popover/popover.js";
|
|
22
17
|
export * from "./progress/index.js";
|
|
18
|
+
export * from "./select/select.js";
|
|
19
|
+
export * from "./tabs/index.js";
|
|
20
|
+
export * from "./textarea/textarea.js";
|
|
21
|
+
export * from "./toast/index.js";
|
|
22
|
+
export * from "./typography/typography.js";
|
|
23
23
|
//# sourceMappingURL=index.js.map
|
package/dist/module/index.js
CHANGED
|
@@ -26,5 +26,6 @@ export * from "./themes/adapters/index.js";
|
|
|
26
26
|
export * from "./themes/default/index.js";
|
|
27
27
|
export { useTheme } from "./themes/provider.js";
|
|
28
28
|
export * from "./themes/types.js";
|
|
29
|
+
export * from "./primitives/alert/index.js";
|
|
29
30
|
export * from "./safe-area/index.js";
|
|
30
31
|
//# sourceMappingURL=index.js.map
|
package/dist/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SafeAreaProvider","ThemeProvider","AsyncAlertDialogManager","ToastContainer","PortalHost","jsx","_jsx","jsxs","_jsxs","UniversalUIProvider","children","portalContainer","theme","safeAreaInsets","insets","container","useTheme"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,gBAAgB;AACzB,SAASC,aAAa;AACtB,SAASC,uBAAuB;AAChC,SAASC,cAAc;AACvB,SAASC,UAAU;AAA8B,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAUjD,OAAO,MAAMC,mBAAmB,GAAGA,CAAC;EAAEC,QAAQ;EAAEC,eAAe;EAAEC,KAAK;EAAEC;AAA8B,CAAC,KAAK;EAC1G,oBACEP,IAAA,CAACN,gBAAgB;IAACc,MAAM,EAAED,cAAe;IAAAH,QAAA,eACvCF,KAAA,CAACP,aAAa;MAACW,KAAK,EAAEA,KAAM;MAAAF,QAAA,gBAC1BJ,IAAA,CAACH,cAAc,IAAE,CAAC,EACjBO,QAAQ,eACTJ,IAAA,CAACF,UAAU;QAACW,SAAS,EAAEJ;MAAgB,CAAE,CAAC,eAC1CL,IAAA,CAACJ,uBAAuB,IAAE,CAAC;IAAA,CACd;EAAC,CACA,CAAC;AAEvB,CAAC;AAED;AACA;AACA,SAASc,QAAQ;AACjB;AAEA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["SafeAreaProvider","ThemeProvider","AsyncAlertDialogManager","ToastContainer","PortalHost","jsx","_jsx","jsxs","_jsxs","UniversalUIProvider","children","portalContainer","theme","safeAreaInsets","insets","container","useTheme"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,gBAAgB;AACzB,SAASC,aAAa;AACtB,SAASC,uBAAuB;AAChC,SAASC,cAAc;AACvB,SAASC,UAAU;AAA8B,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAUjD,OAAO,MAAMC,mBAAmB,GAAGA,CAAC;EAAEC,QAAQ;EAAEC,eAAe;EAAEC,KAAK;EAAEC;AAA8B,CAAC,KAAK;EAC1G,oBACEP,IAAA,CAACN,gBAAgB;IAACc,MAAM,EAAED,cAAe;IAAAH,QAAA,eACvCF,KAAA,CAACP,aAAa;MAACW,KAAK,EAAEA,KAAM;MAAAF,QAAA,gBAC1BJ,IAAA,CAACH,cAAc,IAAE,CAAC,EACjBO,QAAQ,eACTJ,IAAA,CAACF,UAAU;QAACW,SAAS,EAAEJ;MAAgB,CAAE,CAAC,eAC1CL,IAAA,CAACJ,uBAAuB,IAAE,CAAC;IAAA,CACd;EAAC,CACA,CAAC;AAEvB,CAAC;AAED;AACA;AACA,SAASc,QAAQ;AACjB;AAEA;AACA","ignoreList":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Text } from "react-native";
|
|
5
|
+
import { useAlert } from "./context.js";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
export function AlertDescription(props) {
|
|
8
|
+
const alert = useAlert();
|
|
9
|
+
const composedStyle = [alert.styles?.description, props.style];
|
|
10
|
+
const Component = props.render ?? Text;
|
|
11
|
+
return /*#__PURE__*/_jsx(Component, {
|
|
12
|
+
...props,
|
|
13
|
+
style: composedStyle
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=alert-description.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Text","useAlert","jsx","_jsx","AlertDescription","props","alert","composedStyle","styles","description","style","Component","render"],"sourceRoot":"../../../../src","sources":["primitives/alert/alert-description.tsx"],"mappings":";;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,IAAI,QAAwB,cAAc;AACnE,SAASC,QAAQ;AAAoB,SAAAC,GAAA,IAAAC,IAAA;AAQrC,OAAO,SAASC,gBAAgBA,CAACC,KAA6C,EAAE;EAC9E,MAAMC,KAAK,GAAGL,QAAQ,CAAC,CAAC;EAExB,MAAMM,aAAa,GAAG,CAACD,KAAK,CAACE,MAAM,EAAEC,WAAW,EAAEJ,KAAK,CAACK,KAAK,CAAC;EAE9D,MAAMC,SAAS,GAAGN,KAAK,CAACO,MAAM,IAAIZ,IAAI;EACtC,oBAAOG,IAAA,CAACQ,SAAS;IAAA,GAAKN,KAAK;IAAEK,KAAK,EAAEH;EAAc,CAAE,CAAC;AACvD","ignoreList":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { View } from "react-native";
|
|
5
|
+
import { useAlert } from "./context.js";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
export function AlertIcon(props) {
|
|
8
|
+
const alert = useAlert();
|
|
9
|
+
const composedStyle = [alert.styles?.icon, props.style];
|
|
10
|
+
const Component = props.render ?? View;
|
|
11
|
+
return /*#__PURE__*/_jsx(Component, {
|
|
12
|
+
...props,
|
|
13
|
+
style: composedStyle
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=alert-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","useAlert","jsx","_jsx","AlertIcon","props","alert","composedStyle","styles","icon","style","Component","render"],"sourceRoot":"../../../../src","sources":["primitives/alert/alert-icon.tsx"],"mappings":";;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,IAAI,QAAwB,cAAc;AACnE,SAASC,QAAQ;AAAoB,SAAAC,GAAA,IAAAC,IAAA;AAQrC,OAAO,SAASC,SAASA,CAACC,KAAsC,EAAE;EAChE,MAAMC,KAAK,GAAGL,QAAQ,CAAC,CAAC;EAExB,MAAMM,aAAa,GAAG,CAACD,KAAK,CAACE,MAAM,EAAEC,IAAI,EAAEJ,KAAK,CAACK,KAAK,CAAC;EAEvD,MAAMC,SAAS,GAAGN,KAAK,CAACO,MAAM,IAAIZ,IAAI;EACtC,oBAAOG,IAAA,CAACQ,SAAS;IAAA,GAAKN,KAAK;IAAEK,KAAK,EAAEH;EAAc,CAAE,CAAC;AACvD","ignoreList":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { View } from "react-native";
|
|
5
|
+
import { AlertContext } from "./context.js";
|
|
6
|
+
import { AlertVariants } from "./variants/index.js";
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
export function AlertRoot(props) {
|
|
9
|
+
const variantStyles = AlertVariants[props.variant ?? "default"]();
|
|
10
|
+
const composedStyle = [variantStyles.root, props.style];
|
|
11
|
+
const Component = props.render ?? View;
|
|
12
|
+
return /*#__PURE__*/_jsx(AlertContext.Provider, {
|
|
13
|
+
value: {
|
|
14
|
+
styles: variantStyles
|
|
15
|
+
},
|
|
16
|
+
children: /*#__PURE__*/_jsx(Component, {
|
|
17
|
+
...props,
|
|
18
|
+
style: composedStyle
|
|
19
|
+
})
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=alert-root.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","AlertContext","AlertVariants","jsx","_jsx","AlertRoot","props","variantStyles","variant","composedStyle","root","style","Component","render","Provider","value","styles","children"],"sourceRoot":"../../../../src","sources":["primitives/alert/alert-root.tsx"],"mappings":";;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,IAAI,QAAwB,cAAc;AACnE,SAASC,YAAY;AACrB,SAASC,aAAa;AAAqB,SAAAC,GAAA,IAAAC,IAAA;AAS3C,OAAO,SAASC,SAASA,CAACC,KAAsC,EAAE;EAChE,MAAMC,aAAa,GAAGL,aAAa,CAACI,KAAK,CAACE,OAAO,IAAI,SAAS,CAAC,CAAC,CAAC;EACjE,MAAMC,aAAa,GAAG,CAACF,aAAa,CAACG,IAAI,EAAEJ,KAAK,CAACK,KAAK,CAAC;EAEvD,MAAMC,SAAS,GAAGN,KAAK,CAACO,MAAM,IAAIb,IAAI;EACtC,oBACEI,IAAA,CAACH,YAAY,CAACa,QAAQ;IACpBC,KAAK,EAAE;MACLC,MAAM,EAAET;IACV,CAAE;IAAAU,QAAA,eAEFb,IAAA,CAACQ,SAAS;MAAA,GAAKN,KAAK;MAAEK,KAAK,EAAEF;IAAc,CAAE;EAAC,CACzB,CAAC;AAE5B","ignoreList":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Text } from "react-native";
|
|
5
|
+
import { useAlert } from "./context.js";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
export function AlertTitle(props) {
|
|
8
|
+
const alert = useAlert();
|
|
9
|
+
const composedStyle = [alert.styles?.title, props.style];
|
|
10
|
+
const Component = props.render ?? Text;
|
|
11
|
+
return /*#__PURE__*/_jsx(Component, {
|
|
12
|
+
...props,
|
|
13
|
+
style: composedStyle
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=alert-title.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Text","useAlert","jsx","_jsx","AlertTitle","props","alert","composedStyle","styles","title","style","Component","render"],"sourceRoot":"../../../../src","sources":["primitives/alert/alert-title.tsx"],"mappings":";;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,IAAI,QAAwB,cAAc;AACnE,SAASC,QAAQ;AAAoB,SAAAC,GAAA,IAAAC,IAAA;AAQrC,OAAO,SAASC,UAAUA,CAACC,KAAuC,EAAE;EAClE,MAAMC,KAAK,GAAGL,QAAQ,CAAC,CAAC;EAExB,MAAMM,aAAa,GAAG,CAACD,KAAK,CAACE,MAAM,EAAEC,KAAK,EAAEJ,KAAK,CAACK,KAAK,CAAC;EAExD,MAAMC,SAAS,GAAGN,KAAK,CAACO,MAAM,IAAIZ,IAAI;EACtC,oBAAOG,IAAA,CAACQ,SAAS;IAAA,GAAKN,KAAK;IAAEK,KAAK,EAAEH;EAAc,CAAE,CAAC;AACvD","ignoreList":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { createContext, useContext } from "react";
|
|
4
|
+
export const AlertContext = /*#__PURE__*/createContext(undefined);
|
|
5
|
+
export const useAlert = () => {
|
|
6
|
+
const context = useContext(AlertContext);
|
|
7
|
+
if (!context) {
|
|
8
|
+
throw new Error("useAlert must be used within an AlertRoot");
|
|
9
|
+
}
|
|
10
|
+
return context;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createContext","useContext","AlertContext","undefined","useAlert","context","Error"],"sourceRoot":"../../../../src","sources":["primitives/alert/context.ts"],"mappings":";;AAAA,SAASA,aAAa,EAAEC,UAAU,QAAQ,OAAO;AAOjD,OAAO,MAAMC,YAAY,gBAAGF,aAAa,CAA2BG,SAAS,CAAC;AAE9E,OAAO,MAAMC,QAAQ,GAAGA,CAAA,KAAM;EAC5B,MAAMC,OAAO,GAAGJ,UAAU,CAACC,YAAY,CAAC;EACxC,IAAI,CAACG,OAAO,EAAE;IACZ,MAAM,IAAIC,KAAK,CAAC,2CAA2C,CAAC;EAC9D;EACA,OAAOD,OAAO;AAChB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { AlertDescription } from "./alert-description.js";
|
|
4
|
+
import { AlertIcon } from "./alert-icon.js";
|
|
5
|
+
import { AlertRoot } from "./alert-root.js";
|
|
6
|
+
import { AlertTitle } from "./alert-title.js";
|
|
7
|
+
export const Alert = {
|
|
8
|
+
Root: AlertRoot,
|
|
9
|
+
Icon: AlertIcon,
|
|
10
|
+
Title: AlertTitle,
|
|
11
|
+
Description: AlertDescription
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["AlertDescription","AlertIcon","AlertRoot","AlertTitle","Alert","Root","Icon","Title","Description"],"sourceRoot":"../../../../src","sources":["primitives/alert/index.ts"],"mappings":";;AAAA,SAASA,gBAAgB;AACzB,SAASC,SAAS;AAClB,SAASC,SAAS;AAClB,SAASC,UAAU;AAEnB,OAAO,MAAMC,KAAK,GAAG;EACnBC,IAAI,EAAEH,SAAS;EACfI,IAAI,EAAEL,SAAS;EACfM,KAAK,EAAEJ,UAAU;EACjBK,WAAW,EAAER;AACf,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["primitives/alert/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useThemedStyles } from "../../../utils/use-themed-styles.js";
|
|
4
|
+
export const useAlertVariantDefault = () => {
|
|
5
|
+
return useThemedStyles(({
|
|
6
|
+
colors,
|
|
7
|
+
radius,
|
|
8
|
+
fontSize
|
|
9
|
+
}) => ({
|
|
10
|
+
root: {
|
|
11
|
+
padding: 16,
|
|
12
|
+
backgroundColor: colors.background,
|
|
13
|
+
borderRadius: radius,
|
|
14
|
+
borderWidth: 1,
|
|
15
|
+
borderColor: colors.border,
|
|
16
|
+
flexDirection: "row",
|
|
17
|
+
gap: 12
|
|
18
|
+
},
|
|
19
|
+
icon: {
|
|
20
|
+
marginTop: 2
|
|
21
|
+
},
|
|
22
|
+
title: {
|
|
23
|
+
fontSize: fontSize,
|
|
24
|
+
fontWeight: "600",
|
|
25
|
+
color: colors.foreground,
|
|
26
|
+
marginBottom: 4
|
|
27
|
+
},
|
|
28
|
+
description: {
|
|
29
|
+
fontSize: fontSize * 0.875,
|
|
30
|
+
color: colors.mutedForeground,
|
|
31
|
+
lineHeight: 20
|
|
32
|
+
}
|
|
33
|
+
}));
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=default.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useThemedStyles","useAlertVariantDefault","colors","radius","fontSize","root","padding","backgroundColor","background","borderRadius","borderWidth","borderColor","border","flexDirection","gap","icon","marginTop","title","fontWeight","color","foreground","marginBottom","description","mutedForeground","lineHeight"],"sourceRoot":"../../../../../src","sources":["primitives/alert/variants/default.tsx"],"mappings":";;AACA,SAASA,eAAe;AAExB,OAAO,MAAMC,sBAAsB,GAAGA,CAAA,KAAmB;EACvD,OAAOD,eAAe,CACpB,CAAC;IAAEE,MAAM;IAAEC,MAAM;IAAEC;EAAS,CAAC,MAAmB;IAC9CC,IAAI,EAAE;MACJC,OAAO,EAAE,EAAE;MACXC,eAAe,EAAEL,MAAM,CAACM,UAAU;MAClCC,YAAY,EAAEN,MAAM;MACpBO,WAAW,EAAE,CAAC;MACdC,WAAW,EAAET,MAAM,CAACU,MAAM;MAC1BC,aAAa,EAAE,KAAK;MACpBC,GAAG,EAAE;IACP,CAAC;IACDC,IAAI,EAAE;MACJC,SAAS,EAAE;IACb,CAAC;IACDC,KAAK,EAAE;MACLb,QAAQ,EAAEA,QAAQ;MAClBc,UAAU,EAAE,KAAK;MACjBC,KAAK,EAAEjB,MAAM,CAACkB,UAAU;MACxBC,YAAY,EAAE;IAChB,CAAC;IACDC,WAAW,EAAE;MACXlB,QAAQ,EAAEA,QAAQ,GAAG,KAAK;MAC1Be,KAAK,EAAEjB,MAAM,CAACqB,eAAe;MAC7BC,UAAU,EAAE;IACd;EACF,CAAC,CACH,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useThemedStyles } from "../../../utils/use-themed-styles.js";
|
|
4
|
+
export const useAlertVariantDestructive = () => {
|
|
5
|
+
return useThemedStyles(({
|
|
6
|
+
colors,
|
|
7
|
+
radius,
|
|
8
|
+
fontSize
|
|
9
|
+
}) => ({
|
|
10
|
+
root: {
|
|
11
|
+
padding: 16,
|
|
12
|
+
backgroundColor: colors.background,
|
|
13
|
+
borderRadius: radius,
|
|
14
|
+
borderWidth: 1,
|
|
15
|
+
borderColor: colors.danger,
|
|
16
|
+
flexDirection: "row",
|
|
17
|
+
gap: 12
|
|
18
|
+
},
|
|
19
|
+
icon: {
|
|
20
|
+
marginTop: 2
|
|
21
|
+
},
|
|
22
|
+
title: {
|
|
23
|
+
fontSize: fontSize,
|
|
24
|
+
fontWeight: "600",
|
|
25
|
+
color: colors.danger,
|
|
26
|
+
marginBottom: 4
|
|
27
|
+
},
|
|
28
|
+
description: {
|
|
29
|
+
fontSize: fontSize * 0.875,
|
|
30
|
+
color: colors.danger,
|
|
31
|
+
lineHeight: 20,
|
|
32
|
+
opacity: 0.9
|
|
33
|
+
}
|
|
34
|
+
}));
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=destructive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useThemedStyles","useAlertVariantDestructive","colors","radius","fontSize","root","padding","backgroundColor","background","borderRadius","borderWidth","borderColor","danger","flexDirection","gap","icon","marginTop","title","fontWeight","color","marginBottom","description","lineHeight","opacity"],"sourceRoot":"../../../../../src","sources":["primitives/alert/variants/destructive.tsx"],"mappings":";;AACA,SAASA,eAAe;AAExB,OAAO,MAAMC,0BAA0B,GAAGA,CAAA,KAAmB;EAC3D,OAAOD,eAAe,CACpB,CAAC;IAAEE,MAAM;IAAEC,MAAM;IAAEC;EAAS,CAAC,MAAmB;IAC9CC,IAAI,EAAE;MACJC,OAAO,EAAE,EAAE;MACXC,eAAe,EAAEL,MAAM,CAACM,UAAU;MAClCC,YAAY,EAAEN,MAAM;MACpBO,WAAW,EAAE,CAAC;MACdC,WAAW,EAAET,MAAM,CAACU,MAAM;MAC1BC,aAAa,EAAE,KAAK;MACpBC,GAAG,EAAE;IACP,CAAC;IACDC,IAAI,EAAE;MACJC,SAAS,EAAE;IACb,CAAC;IACDC,KAAK,EAAE;MACLb,QAAQ,EAAEA,QAAQ;MAClBc,UAAU,EAAE,KAAK;MACjBC,KAAK,EAAEjB,MAAM,CAACU,MAAM;MACpBQ,YAAY,EAAE;IAChB,CAAC;IACDC,WAAW,EAAE;MACXjB,QAAQ,EAAEA,QAAQ,GAAG,KAAK;MAC1Be,KAAK,EAAEjB,MAAM,CAACU,MAAM;MACpBU,UAAU,EAAE,EAAE;MACdC,OAAO,EAAE;IACX;EACF,CAAC,CACH,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useAlertVariantDefault } from "./default.js";
|
|
4
|
+
import { useAlertVariantDestructive } from "./destructive.js";
|
|
5
|
+
export const AlertVariants = {
|
|
6
|
+
default: useAlertVariantDefault,
|
|
7
|
+
destructive: useAlertVariantDestructive
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useAlertVariantDefault","useAlertVariantDestructive","AlertVariants","default","destructive"],"sourceRoot":"../../../../../src","sources":["primitives/alert/variants/index.ts"],"mappings":";;AAAA,SAASA,sBAAsB;AAC/B,SAASC,0BAA0B;AAEnC,OAAO,MAAMC,aAAa,GAAG;EAC3BC,OAAO,EAAEH,sBAAsB;EAC/BI,WAAW,EAAEH;AACf,CAAC","ignoreList":[]}
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
export * from "./
|
|
4
|
-
export * from "./
|
|
5
|
-
export * from "./button/index.js";
|
|
6
|
-
export * from "./select/index.js";
|
|
3
|
+
export * from "./alert/index.js";
|
|
4
|
+
export * from "./alert-dialog/index.js";
|
|
7
5
|
export * from "./autocomplete/index.js";
|
|
8
|
-
export * from "./card/index.js";
|
|
9
|
-
export * from "./empty/index.js";
|
|
10
6
|
export * from "./avatar/index.js";
|
|
11
|
-
export * from "./toast/index.js";
|
|
12
7
|
export * from "./badge/index.js";
|
|
13
|
-
export * from "./
|
|
8
|
+
export * from "./button/index.js";
|
|
9
|
+
export * from "./calendar/index.js";
|
|
10
|
+
export * from "./card/index.js";
|
|
11
|
+
export * from "./checkbox/index.js";
|
|
14
12
|
export * from "./dropdown-menu/index.js";
|
|
13
|
+
export * from "./empty/index.js";
|
|
14
|
+
export * from "./field/index.js";
|
|
15
|
+
export * from "./input/index.js";
|
|
15
16
|
export * from "./popover/index.js";
|
|
16
17
|
export * from "./portal/index.js";
|
|
17
|
-
export * from "./calendar/index.js";
|
|
18
|
-
export * from "./tabs/index.js";
|
|
19
|
-
export * from "./checkbox/index.js";
|
|
20
|
-
export * from "./alert-dialog/index.js";
|
|
21
18
|
export * from "./progress/index.js";
|
|
19
|
+
export * from "./select/index.js";
|
|
20
|
+
export * from "./tabs/index.js";
|
|
21
|
+
export * from "./textarea/index.js";
|
|
22
|
+
export * from "./toast/index.js";
|
|
22
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["primitives/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["primitives/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/props.types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./card/card";
|
|
3
|
-
export * from "./input";
|
|
4
|
-
export * from "./field/field";
|
|
5
|
-
export * from "./select/select";
|
|
1
|
+
export * from "./alert-dialog";
|
|
6
2
|
export * from "./autocomplete/autocomplete";
|
|
7
|
-
export * from "./typography/typography";
|
|
8
|
-
export * from "./link/link";
|
|
9
|
-
export * from "./empty/empty";
|
|
10
3
|
export * from "./avatar/avatar";
|
|
11
|
-
export * from "./toast/index";
|
|
12
4
|
export * from "./badge/badge";
|
|
13
|
-
export * from "./
|
|
14
|
-
export * from "./dropdown-menu/dropdown-menu";
|
|
15
|
-
export * from "./popover/popover";
|
|
5
|
+
export * from "./button/button";
|
|
16
6
|
export * from "./calendar/calendar";
|
|
17
|
-
export * from "./
|
|
7
|
+
export * from "./card/card";
|
|
18
8
|
export * from "./checkbox";
|
|
19
|
-
export * from "./
|
|
9
|
+
export * from "./dropdown-menu/dropdown-menu";
|
|
10
|
+
export * from "./empty/empty";
|
|
11
|
+
export * from "./field/field";
|
|
12
|
+
export * from "./input";
|
|
13
|
+
export * from "./link/link";
|
|
14
|
+
export * from "./popover/popover";
|
|
20
15
|
export * from "./progress";
|
|
16
|
+
export * from "./select/select";
|
|
17
|
+
export * from "./tabs";
|
|
18
|
+
export * from "./textarea/textarea";
|
|
19
|
+
export * from "./toast/index";
|
|
20
|
+
export * from "./typography/typography";
|
|
21
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC"}
|
|
@@ -12,5 +12,6 @@ export * from "./themes/adapters";
|
|
|
12
12
|
export * from "./themes/default";
|
|
13
13
|
export { useTheme } from "./themes/provider";
|
|
14
14
|
export * from "./themes/types";
|
|
15
|
+
export * from "./primitives/alert";
|
|
15
16
|
export * from "./safe-area";
|
|
16
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAIlE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAE5E,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,eAAe,CAAC,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC;IAC/C,KAAK,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACpC,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAED,eAAO,MAAM,mBAAmB,GAAI,sDAAsD,aAAa,gCAWtG,CAAC;AAEF,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAE/B,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAIlE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAE5E,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,eAAe,CAAC,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC;IAC/C,KAAK,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACpC,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAED,eAAO,MAAM,mBAAmB,GAAI,sDAAsD,aAAa,gCAWtG,CAAC;AAEF,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAE/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PropsWithRender } from "../../types/props.types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { type StyleProp, type TextStyle } from "react-native";
|
|
4
|
+
export interface AlertDescriptionProps {
|
|
5
|
+
children?: string;
|
|
6
|
+
style?: StyleProp<TextStyle>;
|
|
7
|
+
}
|
|
8
|
+
export declare function AlertDescription(props: PropsWithRender<AlertDescriptionProps>): React.JSX.Element;
|
|
9
|
+
//# sourceMappingURL=alert-description.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-description.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/alert/alert-description.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,SAAS,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpE,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,eAAe,CAAC,qBAAqB,CAAC,qBAO7E"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PropsWithRender } from "../../types/props.types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
4
|
+
export interface AlertIconProps {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
style?: StyleProp<ViewStyle>;
|
|
7
|
+
}
|
|
8
|
+
export declare function AlertIcon(props: PropsWithRender<AlertIconProps>): React.JSX.Element;
|
|
9
|
+
//# sourceMappingURL=alert-icon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-icon.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/alert/alert-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,SAAS,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpE,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,eAAe,CAAC,cAAc,CAAC,qBAO/D"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PropsWithRender } from "../../types/props.types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
4
|
+
import { AlertVariants } from "./variants";
|
|
5
|
+
export interface AlertRootProps {
|
|
6
|
+
variant?: keyof typeof AlertVariants;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
style?: StyleProp<ViewStyle>;
|
|
9
|
+
}
|
|
10
|
+
export declare function AlertRoot(props: PropsWithRender<AlertRootProps>): React.JSX.Element;
|
|
11
|
+
//# sourceMappingURL=alert-root.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-root.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/alert/alert-root.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,SAAS,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpE,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE,MAAM,OAAO,aAAa,CAAC;IACrC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,eAAe,CAAC,cAAc,CAAC,qBAc/D"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PropsWithRender } from "../../types/props.types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { type StyleProp, type TextStyle } from "react-native";
|
|
4
|
+
export interface AlertTitleProps {
|
|
5
|
+
children?: string;
|
|
6
|
+
style?: StyleProp<TextStyle>;
|
|
7
|
+
}
|
|
8
|
+
export declare function AlertTitle(props: PropsWithRender<AlertTitleProps>): React.JSX.Element;
|
|
9
|
+
//# sourceMappingURL=alert-title.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-title.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/alert/alert-title.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,SAAS,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,CAAC,eAAe,CAAC,qBAOjE"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AlertStyles } from "./types";
|
|
2
|
+
export interface AlertContext {
|
|
3
|
+
styles?: AlertStyles;
|
|
4
|
+
}
|
|
5
|
+
export declare const AlertContext: import("react").Context<AlertContext | undefined>;
|
|
6
|
+
export declare const useAlert: () => AlertContext;
|
|
7
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/alert/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,eAAO,MAAM,YAAY,mDAAqD,CAAC;AAE/E,eAAO,MAAM,QAAQ,oBAMpB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AlertDescription } from "./alert-description";
|
|
2
|
+
import { AlertIcon } from "./alert-icon";
|
|
3
|
+
import { AlertRoot } from "./alert-root";
|
|
4
|
+
import { AlertTitle } from "./alert-title";
|
|
5
|
+
export declare const Alert: {
|
|
6
|
+
Root: typeof AlertRoot;
|
|
7
|
+
Icon: typeof AlertIcon;
|
|
8
|
+
Title: typeof AlertTitle;
|
|
9
|
+
Description: typeof AlertDescription;
|
|
10
|
+
};
|
|
11
|
+
export type { AlertDescriptionProps } from "./alert-description";
|
|
12
|
+
export type { AlertIconProps } from "./alert-icon";
|
|
13
|
+
export type { AlertRootProps } from "./alert-root";
|
|
14
|
+
export type { AlertTitleProps } from "./alert-title";
|
|
15
|
+
export type { AlertStyles } from "./types";
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/alert/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,eAAO,MAAM,KAAK;;;;;CAKjB,CAAC;AAEF,YAAY,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACjE,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AlertDescriptionProps } from "./alert-description";
|
|
2
|
+
import type { AlertIconProps } from "./alert-icon";
|
|
3
|
+
import type { AlertRootProps } from "./alert-root";
|
|
4
|
+
import type { AlertTitleProps } from "./alert-title";
|
|
5
|
+
export interface AlertStyles {
|
|
6
|
+
root?: AlertRootProps["style"];
|
|
7
|
+
icon?: AlertIconProps["style"];
|
|
8
|
+
title?: AlertTitleProps["style"];
|
|
9
|
+
description?: AlertDescriptionProps["style"];
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/alert/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;IAC/B,IAAI,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;IAC/B,KAAK,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IACjC,WAAW,CAAC,EAAE,qBAAqB,CAAC,OAAO,CAAC,CAAC;CAC9C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../../../../src/primitives/alert/variants/default.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,eAAO,MAAM,sBAAsB,QAAO,WA4BzC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"destructive.d.ts","sourceRoot":"","sources":["../../../../../../src/primitives/alert/variants/destructive.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,eAAO,MAAM,0BAA0B,QAAO,WA6B7C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/primitives/alert/variants/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa;;;CAGzB,CAAC"}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./button";
|
|
4
|
-
export * from "./select";
|
|
1
|
+
export * from "./alert";
|
|
2
|
+
export * from "./alert-dialog";
|
|
5
3
|
export * from "./autocomplete";
|
|
6
|
-
export * from "./card";
|
|
7
|
-
export * from "./empty";
|
|
8
4
|
export * from "./avatar";
|
|
9
|
-
export * from "./toast";
|
|
10
5
|
export * from "./badge";
|
|
11
|
-
export * from "./
|
|
6
|
+
export * from "./button";
|
|
7
|
+
export * from "./calendar";
|
|
8
|
+
export * from "./card";
|
|
9
|
+
export * from "./checkbox";
|
|
12
10
|
export * from "./dropdown-menu";
|
|
11
|
+
export * from "./empty";
|
|
12
|
+
export * from "./field";
|
|
13
|
+
export * from "./input";
|
|
13
14
|
export * from "./popover";
|
|
14
15
|
export * from "./portal";
|
|
15
|
-
export * from "./calendar";
|
|
16
|
-
export * from "./tabs";
|
|
17
|
-
export * from "./checkbox";
|
|
18
|
-
export * from "./alert-dialog";
|
|
19
16
|
export * from "./progress";
|
|
17
|
+
export * from "./select";
|
|
18
|
+
export * from "./tabs";
|
|
19
|
+
export * from "./textarea";
|
|
20
|
+
export * from "./toast";
|
|
20
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/primitives/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/primitives/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.types.d.ts","sourceRoot":"","sources":["../../../../src/types/props.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,CAAC,GAAG;IACnC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;CACxC,CAAC"}
|
package/package.json
CHANGED
package/src/components/index.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./card/card";
|
|
3
|
-
export * from "./input";
|
|
4
|
-
export * from "./field/field";
|
|
5
|
-
export * from "./select/select";
|
|
1
|
+
export * from "./alert-dialog";
|
|
6
2
|
export * from "./autocomplete/autocomplete";
|
|
7
|
-
export * from "./typography/typography";
|
|
8
|
-
export * from "./link/link";
|
|
9
|
-
export * from "./empty/empty";
|
|
10
3
|
export * from "./avatar/avatar";
|
|
11
|
-
export * from "./toast/index";
|
|
12
4
|
export * from "./badge/badge";
|
|
13
|
-
export * from "./
|
|
14
|
-
export * from "./dropdown-menu/dropdown-menu";
|
|
15
|
-
export * from "./popover/popover";
|
|
5
|
+
export * from "./button/button";
|
|
16
6
|
export * from "./calendar/calendar";
|
|
17
|
-
export * from "./
|
|
7
|
+
export * from "./card/card";
|
|
18
8
|
export * from "./checkbox";
|
|
19
|
-
export * from "./
|
|
9
|
+
export * from "./dropdown-menu/dropdown-menu";
|
|
10
|
+
export * from "./empty/empty";
|
|
11
|
+
export * from "./field/field";
|
|
12
|
+
export * from "./input";
|
|
13
|
+
export * from "./link/link";
|
|
14
|
+
export * from "./popover/popover";
|
|
20
15
|
export * from "./progress";
|
|
16
|
+
export * from "./select/select";
|
|
17
|
+
export * from "./tabs";
|
|
18
|
+
export * from "./textarea/textarea";
|
|
19
|
+
export * from "./toast/index";
|
|
20
|
+
export * from "./typography/typography";
|
package/src/index.tsx
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { PropsWithRender } from "@/types/props.types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { type StyleProp, Text, type TextStyle } from "react-native";
|
|
4
|
+
import { useAlert } from "./context";
|
|
5
|
+
|
|
6
|
+
export interface AlertDescriptionProps {
|
|
7
|
+
children?: string;
|
|
8
|
+
|
|
9
|
+
style?: StyleProp<TextStyle>;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function AlertDescription(props: PropsWithRender<AlertDescriptionProps>) {
|
|
13
|
+
const alert = useAlert();
|
|
14
|
+
|
|
15
|
+
const composedStyle = [alert.styles?.description, props.style];
|
|
16
|
+
|
|
17
|
+
const Component = props.render ?? Text;
|
|
18
|
+
return <Component {...props} style={composedStyle} />;
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { PropsWithRender } from "@/types/props.types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { type StyleProp, View, type ViewStyle } from "react-native";
|
|
4
|
+
import { useAlert } from "./context";
|
|
5
|
+
|
|
6
|
+
export interface AlertIconProps {
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
|
|
9
|
+
style?: StyleProp<ViewStyle>;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function AlertIcon(props: PropsWithRender<AlertIconProps>) {
|
|
13
|
+
const alert = useAlert();
|
|
14
|
+
|
|
15
|
+
const composedStyle = [alert.styles?.icon, props.style];
|
|
16
|
+
|
|
17
|
+
const Component = props.render ?? View;
|
|
18
|
+
return <Component {...props} style={composedStyle} />;
|
|
19
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { PropsWithRender } from "@/types/props.types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { type StyleProp, View, type ViewStyle } from "react-native";
|
|
4
|
+
import { AlertContext } from "./context";
|
|
5
|
+
import { AlertVariants } from "./variants";
|
|
6
|
+
|
|
7
|
+
export interface AlertRootProps {
|
|
8
|
+
variant?: keyof typeof AlertVariants;
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
|
|
11
|
+
style?: StyleProp<ViewStyle>;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function AlertRoot(props: PropsWithRender<AlertRootProps>) {
|
|
15
|
+
const variantStyles = AlertVariants[props.variant ?? "default"]();
|
|
16
|
+
const composedStyle = [variantStyles.root, props.style];
|
|
17
|
+
|
|
18
|
+
const Component = props.render ?? View;
|
|
19
|
+
return (
|
|
20
|
+
<AlertContext.Provider
|
|
21
|
+
value={{
|
|
22
|
+
styles: variantStyles,
|
|
23
|
+
}}
|
|
24
|
+
>
|
|
25
|
+
<Component {...props} style={composedStyle} />
|
|
26
|
+
</AlertContext.Provider>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { PropsWithRender } from "@/types/props.types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { type StyleProp, Text, type TextStyle } from "react-native";
|
|
4
|
+
import { useAlert } from "./context";
|
|
5
|
+
|
|
6
|
+
export interface AlertTitleProps {
|
|
7
|
+
children?: string;
|
|
8
|
+
|
|
9
|
+
style?: StyleProp<TextStyle>;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function AlertTitle(props: PropsWithRender<AlertTitleProps>) {
|
|
13
|
+
const alert = useAlert();
|
|
14
|
+
|
|
15
|
+
const composedStyle = [alert.styles?.title, props.style];
|
|
16
|
+
|
|
17
|
+
const Component = props.render ?? Text;
|
|
18
|
+
return <Component {...props} style={composedStyle} />;
|
|
19
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createContext, useContext } from "react";
|
|
2
|
+
import type { AlertStyles } from "./types";
|
|
3
|
+
|
|
4
|
+
export interface AlertContext {
|
|
5
|
+
styles?: AlertStyles;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const AlertContext = createContext<AlertContext | undefined>(undefined);
|
|
9
|
+
|
|
10
|
+
export const useAlert = () => {
|
|
11
|
+
const context = useContext(AlertContext);
|
|
12
|
+
if (!context) {
|
|
13
|
+
throw new Error("useAlert must be used within an AlertRoot");
|
|
14
|
+
}
|
|
15
|
+
return context;
|
|
16
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AlertDescription } from "./alert-description";
|
|
2
|
+
import { AlertIcon } from "./alert-icon";
|
|
3
|
+
import { AlertRoot } from "./alert-root";
|
|
4
|
+
import { AlertTitle } from "./alert-title";
|
|
5
|
+
|
|
6
|
+
export const Alert = {
|
|
7
|
+
Root: AlertRoot,
|
|
8
|
+
Icon: AlertIcon,
|
|
9
|
+
Title: AlertTitle,
|
|
10
|
+
Description: AlertDescription,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type { AlertDescriptionProps } from "./alert-description";
|
|
14
|
+
export type { AlertIconProps } from "./alert-icon";
|
|
15
|
+
export type { AlertRootProps } from "./alert-root";
|
|
16
|
+
export type { AlertTitleProps } from "./alert-title";
|
|
17
|
+
export type { AlertStyles } from "./types";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AlertDescriptionProps } from "./alert-description";
|
|
2
|
+
import type { AlertIconProps } from "./alert-icon";
|
|
3
|
+
import type { AlertRootProps } from "./alert-root";
|
|
4
|
+
import type { AlertTitleProps } from "./alert-title";
|
|
5
|
+
|
|
6
|
+
export interface AlertStyles {
|
|
7
|
+
root?: AlertRootProps["style"];
|
|
8
|
+
icon?: AlertIconProps["style"];
|
|
9
|
+
title?: AlertTitleProps["style"];
|
|
10
|
+
description?: AlertDescriptionProps["style"];
|
|
11
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type AlertStyles } from "@/primitives";
|
|
2
|
+
import { useThemedStyles } from "@/utils/use-themed-styles";
|
|
3
|
+
|
|
4
|
+
export const useAlertVariantDefault = (): AlertStyles => {
|
|
5
|
+
return useThemedStyles(
|
|
6
|
+
({ colors, radius, fontSize }): AlertStyles => ({
|
|
7
|
+
root: {
|
|
8
|
+
padding: 16,
|
|
9
|
+
backgroundColor: colors.background,
|
|
10
|
+
borderRadius: radius,
|
|
11
|
+
borderWidth: 1,
|
|
12
|
+
borderColor: colors.border,
|
|
13
|
+
flexDirection: "row",
|
|
14
|
+
gap: 12,
|
|
15
|
+
},
|
|
16
|
+
icon: {
|
|
17
|
+
marginTop: 2,
|
|
18
|
+
},
|
|
19
|
+
title: {
|
|
20
|
+
fontSize: fontSize,
|
|
21
|
+
fontWeight: "600",
|
|
22
|
+
color: colors.foreground,
|
|
23
|
+
marginBottom: 4,
|
|
24
|
+
},
|
|
25
|
+
description: {
|
|
26
|
+
fontSize: fontSize * 0.875,
|
|
27
|
+
color: colors.mutedForeground,
|
|
28
|
+
lineHeight: 20,
|
|
29
|
+
},
|
|
30
|
+
}),
|
|
31
|
+
);
|
|
32
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type AlertStyles } from "@/primitives";
|
|
2
|
+
import { useThemedStyles } from "@/utils/use-themed-styles";
|
|
3
|
+
|
|
4
|
+
export const useAlertVariantDestructive = (): AlertStyles => {
|
|
5
|
+
return useThemedStyles(
|
|
6
|
+
({ colors, radius, fontSize }): AlertStyles => ({
|
|
7
|
+
root: {
|
|
8
|
+
padding: 16,
|
|
9
|
+
backgroundColor: colors.background,
|
|
10
|
+
borderRadius: radius,
|
|
11
|
+
borderWidth: 1,
|
|
12
|
+
borderColor: colors.danger,
|
|
13
|
+
flexDirection: "row",
|
|
14
|
+
gap: 12,
|
|
15
|
+
},
|
|
16
|
+
icon: {
|
|
17
|
+
marginTop: 2,
|
|
18
|
+
},
|
|
19
|
+
title: {
|
|
20
|
+
fontSize: fontSize,
|
|
21
|
+
fontWeight: "600",
|
|
22
|
+
color: colors.danger,
|
|
23
|
+
marginBottom: 4,
|
|
24
|
+
},
|
|
25
|
+
description: {
|
|
26
|
+
fontSize: fontSize * 0.875,
|
|
27
|
+
color: colors.danger,
|
|
28
|
+
lineHeight: 20,
|
|
29
|
+
opacity: 0.9,
|
|
30
|
+
},
|
|
31
|
+
}),
|
|
32
|
+
);
|
|
33
|
+
};
|
package/src/primitives/index.ts
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./button";
|
|
4
|
-
export * from "./select";
|
|
1
|
+
export * from "./alert";
|
|
2
|
+
export * from "./alert-dialog";
|
|
5
3
|
export * from "./autocomplete";
|
|
6
|
-
export * from "./card";
|
|
7
|
-
export * from "./empty";
|
|
8
4
|
export * from "./avatar";
|
|
9
|
-
export * from "./toast";
|
|
10
5
|
export * from "./badge";
|
|
11
|
-
export * from "./
|
|
6
|
+
export * from "./button";
|
|
7
|
+
export * from "./calendar";
|
|
8
|
+
export * from "./card";
|
|
9
|
+
export * from "./checkbox";
|
|
12
10
|
export * from "./dropdown-menu";
|
|
11
|
+
export * from "./empty";
|
|
12
|
+
export * from "./field";
|
|
13
|
+
export * from "./input";
|
|
13
14
|
export * from "./popover";
|
|
14
15
|
export * from "./portal";
|
|
15
|
-
export * from "./calendar";
|
|
16
|
-
export * from "./tabs";
|
|
17
|
-
export * from "./checkbox";
|
|
18
|
-
export * from "./alert-dialog";
|
|
19
16
|
export * from "./progress";
|
|
17
|
+
export * from "./select";
|
|
18
|
+
export * from "./tabs";
|
|
19
|
+
export * from "./textarea";
|
|
20
|
+
export * from "./toast";
|