@korsolutions/ui 0.0.46 → 0.0.48
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/primitives/alert/alert-body.js +16 -0
- package/dist/module/primitives/alert/alert-body.js.map +1 -0
- package/dist/module/primitives/alert/alert-description.js.map +1 -1
- package/dist/module/primitives/alert/alert-icon.js +11 -6
- package/dist/module/primitives/alert/alert-icon.js.map +1 -1
- package/dist/module/primitives/alert/alert-root.js.map +1 -1
- package/dist/module/primitives/alert/alert-title.js.map +1 -1
- package/dist/module/primitives/alert/index.js +2 -0
- package/dist/module/primitives/alert/index.js.map +1 -1
- package/dist/module/primitives/alert/variants/default.js +8 -1
- package/dist/module/primitives/alert/variants/default.js.map +1 -1
- package/dist/module/primitives/alert/variants/destructive.js +8 -1
- package/dist/module/primitives/alert/variants/destructive.js.map +1 -1
- package/dist/module/types/props.types.js +2 -0
- package/dist/typescript/src/primitives/alert/alert-body.d.ts +9 -0
- package/dist/typescript/src/primitives/alert/alert-body.d.ts.map +1 -0
- package/dist/typescript/src/primitives/alert/alert-description.d.ts +2 -1
- package/dist/typescript/src/primitives/alert/alert-description.d.ts.map +1 -1
- package/dist/typescript/src/primitives/alert/alert-icon.d.ts +3 -7
- package/dist/typescript/src/primitives/alert/alert-icon.d.ts.map +1 -1
- package/dist/typescript/src/primitives/alert/alert-title.d.ts +2 -1
- package/dist/typescript/src/primitives/alert/alert-title.d.ts.map +1 -1
- package/dist/typescript/src/primitives/alert/index.d.ts +3 -0
- package/dist/typescript/src/primitives/alert/index.d.ts.map +1 -1
- package/dist/typescript/src/primitives/alert/types.d.ts +3 -1
- package/dist/typescript/src/primitives/alert/types.d.ts.map +1 -1
- package/dist/typescript/src/primitives/alert/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/primitives/alert/variants/destructive.d.ts.map +1 -1
- package/dist/typescript/src/types/element.types.d.ts +1 -0
- package/dist/typescript/src/types/element.types.d.ts.map +1 -1
- package/dist/typescript/src/types/props.types.d.ts +11 -0
- package/dist/typescript/src/types/props.types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/primitives/alert/alert-body.tsx +19 -0
- package/src/primitives/alert/alert-description.tsx +2 -1
- package/src/primitives/alert/alert-icon.tsx +9 -11
- package/src/primitives/alert/alert-root.tsx +1 -1
- package/src/primitives/alert/alert-title.tsx +2 -1
- package/src/primitives/alert/index.ts +3 -0
- package/src/primitives/alert/types.ts +3 -1
- package/src/primitives/alert/variants/default.tsx +8 -1
- package/src/primitives/alert/variants/destructive.tsx +8 -1
- package/src/types/element.types.ts +2 -0
- package/src/types/props.types.ts +14 -0
|
@@ -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 AlertBody(props) {
|
|
8
|
+
const alert = useAlert();
|
|
9
|
+
const composedStyle = [alert.styles?.body, props.style];
|
|
10
|
+
const Component = props.render ?? View;
|
|
11
|
+
return /*#__PURE__*/_jsx(Component, {
|
|
12
|
+
...props,
|
|
13
|
+
style: composedStyle
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=alert-body.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","useAlert","jsx","_jsx","AlertBody","props","alert","composedStyle","styles","body","style","Component","render"],"sourceRoot":"../../../../src","sources":["primitives/alert/alert-body.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":[]}
|
|
@@ -1 +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":";;
|
|
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":";;AAEA,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":[]}
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { View } from "react-native";
|
|
5
4
|
import { useAlert } from "./context.js";
|
|
6
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
export function AlertIcon(
|
|
6
|
+
export function AlertIcon({
|
|
7
|
+
render: Component,
|
|
8
|
+
...props
|
|
9
|
+
}) {
|
|
8
10
|
const alert = useAlert();
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
return /*#__PURE__*/_jsx(Component, {
|
|
11
|
+
const composedProps = {
|
|
12
|
+
...alert.styles?.icon,
|
|
12
13
|
...props,
|
|
13
|
-
style:
|
|
14
|
+
style: [alert.styles?.icon?.style, props.style]
|
|
15
|
+
};
|
|
16
|
+
return /*#__PURE__*/_jsx(Component, {
|
|
17
|
+
absoluteStrokeWidth: true,
|
|
18
|
+
...composedProps
|
|
14
19
|
});
|
|
15
20
|
}
|
|
16
21
|
//# sourceMappingURL=alert-icon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","
|
|
1
|
+
{"version":3,"names":["React","useAlert","jsx","_jsx","AlertIcon","render","Component","props","alert","composedProps","styles","icon","style","absoluteStrokeWidth"],"sourceRoot":"../../../../src","sources":["primitives/alert/alert-icon.tsx"],"mappings":";;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ;AAAoB,SAAAC,GAAA,IAAAC,IAAA;AAIrC,OAAO,SAASC,SAASA,CAAC;EAAEC,MAAM,EAAEC,SAAS;EAAE,GAAGC;AAA+C,CAAC,EAAE;EAClG,MAAMC,KAAK,GAAGP,QAAQ,CAAC,CAAC;EAExB,MAAMQ,aAAa,GAAG;IACpB,GAAGD,KAAK,CAACE,MAAM,EAAEC,IAAI;IACrB,GAAGJ,KAAK;IACRK,KAAK,EAAE,CAACJ,KAAK,CAACE,MAAM,EAAEC,IAAI,EAAEC,KAAK,EAAEL,KAAK,CAACK,KAAK;EAChD,CAAC;EAED,oBAAOT,IAAA,CAACG,SAAS;IAACO,mBAAmB;IAAA,GAAKJ;EAAa,CAAG,CAAC;AAC7D","ignoreList":[]}
|
|
@@ -1 +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,
|
|
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,aAAmC,GAAG,CAACF,aAAa,CAACG,IAAI,EAAEJ,KAAK,CAACK,KAAK,CAAC;EAE7E,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":[]}
|
|
@@ -1 +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":";;
|
|
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":";;AAEA,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":[]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import { AlertBody } from "./alert-body.js";
|
|
3
4
|
import { AlertDescription } from "./alert-description.js";
|
|
4
5
|
import { AlertIcon } from "./alert-icon.js";
|
|
5
6
|
import { AlertRoot } from "./alert-root.js";
|
|
@@ -7,6 +8,7 @@ import { AlertTitle } from "./alert-title.js";
|
|
|
7
8
|
export const Alert = {
|
|
8
9
|
Root: AlertRoot,
|
|
9
10
|
Icon: AlertIcon,
|
|
11
|
+
Body: AlertBody,
|
|
10
12
|
Title: AlertTitle,
|
|
11
13
|
Description: AlertDescription
|
|
12
14
|
};
|
|
@@ -1 +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,
|
|
1
|
+
{"version":3,"names":["AlertBody","AlertDescription","AlertIcon","AlertRoot","AlertTitle","Alert","Root","Icon","Body","Title","Description"],"sourceRoot":"../../../../src","sources":["primitives/alert/index.ts"],"mappings":";;AAAA,SAASA,SAAS;AAClB,SAASC,gBAAgB;AACzB,SAASC,SAAS;AAClB,SAASC,SAAS;AAClB,SAASC,UAAU;AAEnB,OAAO,MAAMC,KAAK,GAAG;EACnBC,IAAI,EAAEH,SAAS;EACfI,IAAI,EAAEL,SAAS;EACfM,IAAI,EAAER,SAAS;EACfS,KAAK,EAAEL,UAAU;EACjBM,WAAW,EAAET;AACf,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useThemedStyles","useAlertVariantDefault","colors","radius","fontSize","root","padding","backgroundColor","background","borderRadius","borderWidth","borderColor","border","flexDirection","gap","icon","marginTop","
|
|
1
|
+
{"version":3,"names":["useThemedStyles","useAlertVariantDefault","colors","radius","fontSize","root","padding","backgroundColor","background","borderRadius","borderWidth","borderColor","border","flexDirection","gap","icon","color","foreground","size","style","marginTop","body","flex","title","fontWeight","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,KAAK,EAAEd,MAAM,CAACe,UAAU;MACxBC,IAAI,EAAE,EAAE;MACRC,KAAK,EAAE;QACLC,SAAS,EAAE;MACb;IACF,CAAC;IACDC,IAAI,EAAE;MACJC,IAAI,EAAE;IACR,CAAC;IACDC,KAAK,EAAE;MACLnB,QAAQ,EAAEA,QAAQ;MAClBoB,UAAU,EAAE,KAAK;MACjBR,KAAK,EAAEd,MAAM,CAACe,UAAU;MACxBQ,YAAY,EAAE;IAChB,CAAC;IACDC,WAAW,EAAE;MACXtB,QAAQ,EAAEA,QAAQ,GAAG,KAAK;MAC1BY,KAAK,EAAEd,MAAM,CAACyB,eAAe;MAC7BC,UAAU,EAAE;IACd;EACF,CAAC,CACH,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useThemedStyles","useAlertVariantDestructive","colors","radius","fontSize","root","padding","backgroundColor","background","borderRadius","borderWidth","borderColor","danger","flexDirection","gap","icon","marginTop","
|
|
1
|
+
{"version":3,"names":["useThemedStyles","useAlertVariantDestructive","colors","radius","fontSize","root","padding","backgroundColor","background","borderRadius","borderWidth","borderColor","danger","flexDirection","gap","icon","color","size","style","marginTop","body","flex","title","fontWeight","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,KAAK,EAAEd,MAAM,CAACU,MAAM;MACpBK,IAAI,EAAE,EAAE;MACRC,KAAK,EAAE;QACLC,SAAS,EAAE;MACb;IACF,CAAC;IACDC,IAAI,EAAE;MACJC,IAAI,EAAE;IACR,CAAC;IACDC,KAAK,EAAE;MACLlB,QAAQ,EAAEA,QAAQ;MAClBmB,UAAU,EAAE,KAAK;MACjBP,KAAK,EAAEd,MAAM,CAACU,MAAM;MACpBY,YAAY,EAAE;IAChB,CAAC;IACDC,WAAW,EAAE;MACXrB,QAAQ,EAAEA,QAAQ,GAAG,KAAK;MAC1BY,KAAK,EAAEd,MAAM,CAACU,MAAM;MACpBc,UAAU,EAAE,EAAE;MACdC,OAAO,EAAE;IACX;EACF,CAAC,CACH,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -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 AlertBodyProps {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
style?: StyleProp<ViewStyle>;
|
|
7
|
+
}
|
|
8
|
+
export declare function AlertBody(props: PropsWithRender<AlertBodyProps>): React.JSX.Element;
|
|
9
|
+
//# sourceMappingURL=alert-body.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-body.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/alert/alert-body.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"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type { TextChildren } from "../../types/element.types";
|
|
1
2
|
import type { PropsWithRender } from "../../types/props.types";
|
|
2
3
|
import React from "react";
|
|
3
4
|
import { type StyleProp, type TextStyle } from "react-native";
|
|
4
5
|
export interface AlertDescriptionProps {
|
|
5
|
-
children?:
|
|
6
|
+
children?: TextChildren;
|
|
6
7
|
style?: StyleProp<TextStyle>;
|
|
7
8
|
}
|
|
8
9
|
export declare function AlertDescription(props: PropsWithRender<AlertDescriptionProps>): React.JSX.Element;
|
|
@@ -1 +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,
|
|
1
|
+
{"version":3,"file":"alert-description.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/alert/alert-description.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,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,YAAY,CAAC;IAExB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,eAAe,CAAC,qBAAqB,CAAC,qBAO7E"}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PropsWithRequiredRender, SvgProps } from "../../types/props.types";
|
|
2
2
|
import React from "react";
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
children?: React.ReactNode;
|
|
6
|
-
style?: StyleProp<ViewStyle>;
|
|
7
|
-
}
|
|
8
|
-
export declare function AlertIcon(props: PropsWithRender<AlertIconProps>): React.JSX.Element;
|
|
3
|
+
export type AlertIconProps = SvgProps;
|
|
4
|
+
export declare function AlertIcon({ render: Component, ...props }: PropsWithRequiredRender<AlertIconProps>): React.JSX.Element;
|
|
9
5
|
//# sourceMappingURL=alert-icon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert-icon.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/alert/alert-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"alert-icon.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/alert/alert-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC;AAEtC,wBAAgB,SAAS,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,uBAAuB,CAAC,cAAc,CAAC,qBAUjG"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type { TextChildren } from "../../types/element.types";
|
|
1
2
|
import type { PropsWithRender } from "../../types/props.types";
|
|
2
3
|
import React from "react";
|
|
3
4
|
import { type StyleProp, type TextStyle } from "react-native";
|
|
4
5
|
export interface AlertTitleProps {
|
|
5
|
-
children?:
|
|
6
|
+
children?: TextChildren;
|
|
6
7
|
style?: StyleProp<TextStyle>;
|
|
7
8
|
}
|
|
8
9
|
export declare function AlertTitle(props: PropsWithRender<AlertTitleProps>): React.JSX.Element;
|
|
@@ -1 +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,
|
|
1
|
+
{"version":3,"file":"alert-title.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/alert/alert-title.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,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,YAAY,CAAC;IAExB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,CAAC,eAAe,CAAC,qBAOjE"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AlertBody } from "./alert-body";
|
|
1
2
|
import { AlertDescription } from "./alert-description";
|
|
2
3
|
import { AlertIcon } from "./alert-icon";
|
|
3
4
|
import { AlertRoot } from "./alert-root";
|
|
@@ -5,9 +6,11 @@ import { AlertTitle } from "./alert-title";
|
|
|
5
6
|
export declare const Alert: {
|
|
6
7
|
Root: typeof AlertRoot;
|
|
7
8
|
Icon: typeof AlertIcon;
|
|
9
|
+
Body: typeof AlertBody;
|
|
8
10
|
Title: typeof AlertTitle;
|
|
9
11
|
Description: typeof AlertDescription;
|
|
10
12
|
};
|
|
13
|
+
export type { AlertBodyProps } from "./alert-body";
|
|
11
14
|
export type { AlertDescriptionProps } from "./alert-description";
|
|
12
15
|
export type { AlertIconProps } from "./alert-icon";
|
|
13
16
|
export type { AlertRootProps } from "./alert-root";
|
|
@@ -1 +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
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/alert/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,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;;;;;;CAMjB,CAAC;AAEF,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,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"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import type { AlertBodyProps } from "./alert-body";
|
|
1
2
|
import type { AlertDescriptionProps } from "./alert-description";
|
|
2
3
|
import type { AlertIconProps } from "./alert-icon";
|
|
3
4
|
import type { AlertRootProps } from "./alert-root";
|
|
4
5
|
import type { AlertTitleProps } from "./alert-title";
|
|
5
6
|
export interface AlertStyles {
|
|
6
7
|
root?: AlertRootProps["style"];
|
|
7
|
-
icon?: AlertIconProps
|
|
8
|
+
icon?: AlertIconProps;
|
|
9
|
+
body?: AlertBodyProps["style"];
|
|
8
10
|
title?: AlertTitleProps["style"];
|
|
9
11
|
description?: AlertDescriptionProps["style"];
|
|
10
12
|
}
|
|
@@ -1 +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"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/alert/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,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;IACtB,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"}
|
|
@@ -1 +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,
|
|
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,WAmCzC,CAAC"}
|
|
@@ -1 +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,
|
|
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,WAoC7C,CAAC"}
|
|
@@ -8,4 +8,5 @@ export type TextInputRef = HostInstance & {
|
|
|
8
8
|
getNativeRef: () => HostInstance;
|
|
9
9
|
setSelection: (start: number, end?: number) => void;
|
|
10
10
|
};
|
|
11
|
+
export type TextChildren = string | number | boolean | null | undefined | string[];
|
|
11
12
|
//# sourceMappingURL=element.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"element.types.d.ts","sourceRoot":"","sources":["../../../../src/types/element.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjD,MAAM,MAAM,OAAO,GAAG,YAAY,CAAC;AACnC,MAAM,MAAM,YAAY,GAAG,YAAY,GAAG;IACxC,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,SAAS,EAAE,MAAM,OAAO,CAAC;IACzB,YAAY,EAAE,MAAM,YAAY,CAAC;IACjC,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACrD,CAAC"}
|
|
1
|
+
{"version":3,"file":"element.types.d.ts","sourceRoot":"","sources":["../../../../src/types/element.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjD,MAAM,MAAM,OAAO,GAAG,YAAY,CAAC;AACnC,MAAM,MAAM,YAAY,GAAG,YAAY,GAAG;IACxC,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,SAAS,EAAE,MAAM,OAAO,CAAC;IACzB,YAAY,EAAE,MAAM,YAAY,CAAC;IACjC,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACrD,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,EAAE,CAAC"}
|
|
@@ -1,4 +1,15 @@
|
|
|
1
|
+
import type { ColorValue, StyleProp, TextStyle, ViewStyle } from "react-native";
|
|
1
2
|
export type PropsWithRender<P> = P & {
|
|
2
3
|
render?: (props: P) => React.ReactNode;
|
|
3
4
|
};
|
|
5
|
+
export type PropsWithRequiredRender<P> = P & {
|
|
6
|
+
render: (props: P) => React.ReactNode;
|
|
7
|
+
};
|
|
8
|
+
export type SvgProps = {
|
|
9
|
+
size?: number;
|
|
10
|
+
color?: ColorValue;
|
|
11
|
+
strokeWidth?: number;
|
|
12
|
+
absoluteStrokeWidth?: boolean;
|
|
13
|
+
style?: StyleProp<ViewStyle & TextStyle>;
|
|
14
|
+
};
|
|
4
15
|
//# sourceMappingURL=props.types.d.ts.map
|
|
@@ -1 +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"}
|
|
1
|
+
{"version":3,"file":"props.types.d.ts","sourceRoot":"","sources":["../../../../src/types/props.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEhF,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,CAAC,GAAG;IACnC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,uBAAuB,CAAC,CAAC,IAAI,CAAC,GAAG;IAC3C,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC;CAC1C,CAAC"}
|
package/package.json
CHANGED
|
@@ -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 AlertBodyProps {
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
|
|
9
|
+
style?: StyleProp<ViewStyle>;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function AlertBody(props: PropsWithRender<AlertBodyProps>) {
|
|
13
|
+
const alert = useAlert();
|
|
14
|
+
|
|
15
|
+
const composedStyle = [alert.styles?.body, props.style];
|
|
16
|
+
|
|
17
|
+
const Component = props.render ?? View;
|
|
18
|
+
return <Component {...props} style={composedStyle} />;
|
|
19
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import type { TextChildren } from "@/types/element.types";
|
|
1
2
|
import type { PropsWithRender } from "@/types/props.types";
|
|
2
3
|
import React from "react";
|
|
3
4
|
import { type StyleProp, Text, type TextStyle } from "react-native";
|
|
4
5
|
import { useAlert } from "./context";
|
|
5
6
|
|
|
6
7
|
export interface AlertDescriptionProps {
|
|
7
|
-
children?:
|
|
8
|
+
children?: TextChildren;
|
|
8
9
|
|
|
9
10
|
style?: StyleProp<TextStyle>;
|
|
10
11
|
}
|
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PropsWithRequiredRender, SvgProps } from "@/types/props.types";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { type StyleProp, View, type ViewStyle } from "react-native";
|
|
4
3
|
import { useAlert } from "./context";
|
|
5
4
|
|
|
6
|
-
export
|
|
7
|
-
children?: React.ReactNode;
|
|
5
|
+
export type AlertIconProps = SvgProps;
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export function AlertIcon(props: PropsWithRender<AlertIconProps>) {
|
|
7
|
+
export function AlertIcon({ render: Component, ...props }: PropsWithRequiredRender<AlertIconProps>) {
|
|
13
8
|
const alert = useAlert();
|
|
14
9
|
|
|
15
|
-
const
|
|
10
|
+
const composedProps = {
|
|
11
|
+
...alert.styles?.icon,
|
|
12
|
+
...props,
|
|
13
|
+
style: [alert.styles?.icon?.style, props.style],
|
|
14
|
+
};
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
return <Component {...props} style={composedStyle} />;
|
|
16
|
+
return <Component absoluteStrokeWidth {...composedProps} />;
|
|
19
17
|
}
|
|
@@ -13,7 +13,7 @@ export interface AlertRootProps {
|
|
|
13
13
|
|
|
14
14
|
export function AlertRoot(props: PropsWithRender<AlertRootProps>) {
|
|
15
15
|
const variantStyles = AlertVariants[props.variant ?? "default"]();
|
|
16
|
-
const composedStyle = [variantStyles.root, props.style];
|
|
16
|
+
const composedStyle: StyleProp<ViewStyle> = [variantStyles.root, props.style];
|
|
17
17
|
|
|
18
18
|
const Component = props.render ?? View;
|
|
19
19
|
return (
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import type { TextChildren } from "@/types/element.types";
|
|
1
2
|
import type { PropsWithRender } from "@/types/props.types";
|
|
2
3
|
import React from "react";
|
|
3
4
|
import { type StyleProp, Text, type TextStyle } from "react-native";
|
|
4
5
|
import { useAlert } from "./context";
|
|
5
6
|
|
|
6
7
|
export interface AlertTitleProps {
|
|
7
|
-
children?:
|
|
8
|
+
children?: TextChildren;
|
|
8
9
|
|
|
9
10
|
style?: StyleProp<TextStyle>;
|
|
10
11
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AlertBody } from "./alert-body";
|
|
1
2
|
import { AlertDescription } from "./alert-description";
|
|
2
3
|
import { AlertIcon } from "./alert-icon";
|
|
3
4
|
import { AlertRoot } from "./alert-root";
|
|
@@ -6,10 +7,12 @@ import { AlertTitle } from "./alert-title";
|
|
|
6
7
|
export const Alert = {
|
|
7
8
|
Root: AlertRoot,
|
|
8
9
|
Icon: AlertIcon,
|
|
10
|
+
Body: AlertBody,
|
|
9
11
|
Title: AlertTitle,
|
|
10
12
|
Description: AlertDescription,
|
|
11
13
|
};
|
|
12
14
|
|
|
15
|
+
export type { AlertBodyProps } from "./alert-body";
|
|
13
16
|
export type { AlertDescriptionProps } from "./alert-description";
|
|
14
17
|
export type { AlertIconProps } from "./alert-icon";
|
|
15
18
|
export type { AlertRootProps } from "./alert-root";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AlertBodyProps } from "./alert-body";
|
|
1
2
|
import type { AlertDescriptionProps } from "./alert-description";
|
|
2
3
|
import type { AlertIconProps } from "./alert-icon";
|
|
3
4
|
import type { AlertRootProps } from "./alert-root";
|
|
@@ -5,7 +6,8 @@ import type { AlertTitleProps } from "./alert-title";
|
|
|
5
6
|
|
|
6
7
|
export interface AlertStyles {
|
|
7
8
|
root?: AlertRootProps["style"];
|
|
8
|
-
icon?: AlertIconProps
|
|
9
|
+
icon?: AlertIconProps;
|
|
10
|
+
body?: AlertBodyProps["style"];
|
|
9
11
|
title?: AlertTitleProps["style"];
|
|
10
12
|
description?: AlertDescriptionProps["style"];
|
|
11
13
|
}
|
|
@@ -14,7 +14,14 @@ export const useAlertVariantDefault = (): AlertStyles => {
|
|
|
14
14
|
gap: 12,
|
|
15
15
|
},
|
|
16
16
|
icon: {
|
|
17
|
-
|
|
17
|
+
color: colors.foreground,
|
|
18
|
+
size: 20,
|
|
19
|
+
style: {
|
|
20
|
+
marginTop: 2,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
body: {
|
|
24
|
+
flex: 1,
|
|
18
25
|
},
|
|
19
26
|
title: {
|
|
20
27
|
fontSize: fontSize,
|
|
@@ -14,7 +14,14 @@ export const useAlertVariantDestructive = (): AlertStyles => {
|
|
|
14
14
|
gap: 12,
|
|
15
15
|
},
|
|
16
16
|
icon: {
|
|
17
|
-
|
|
17
|
+
color: colors.danger,
|
|
18
|
+
size: 20,
|
|
19
|
+
style: {
|
|
20
|
+
marginTop: 2,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
body: {
|
|
24
|
+
flex: 1,
|
|
18
25
|
},
|
|
19
26
|
title: {
|
|
20
27
|
fontSize: fontSize,
|
package/src/types/props.types.ts
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
import type { ColorValue, StyleProp, TextStyle, ViewStyle } from "react-native";
|
|
2
|
+
|
|
1
3
|
export type PropsWithRender<P> = P & {
|
|
2
4
|
render?: (props: P) => React.ReactNode;
|
|
3
5
|
};
|
|
6
|
+
|
|
7
|
+
export type PropsWithRequiredRender<P> = P & {
|
|
8
|
+
render: (props: P) => React.ReactNode;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export type SvgProps = {
|
|
12
|
+
size?: number;
|
|
13
|
+
color?: ColorValue;
|
|
14
|
+
strokeWidth?: number;
|
|
15
|
+
absoluteStrokeWidth?: boolean;
|
|
16
|
+
style?: StyleProp<ViewStyle & TextStyle>;
|
|
17
|
+
};
|