@korsolutions/ui 0.0.46 → 0.0.47

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 (37) hide show
  1. package/dist/module/primitives/alert/alert-body.js +16 -0
  2. package/dist/module/primitives/alert/alert-body.js.map +1 -0
  3. package/dist/module/primitives/alert/alert-description.js.map +1 -1
  4. package/dist/module/primitives/alert/alert-icon.js.map +1 -1
  5. package/dist/module/primitives/alert/alert-root.js.map +1 -1
  6. package/dist/module/primitives/alert/alert-title.js.map +1 -1
  7. package/dist/module/primitives/alert/index.js +2 -0
  8. package/dist/module/primitives/alert/index.js.map +1 -1
  9. package/dist/module/primitives/alert/variants/default.js +3 -0
  10. package/dist/module/primitives/alert/variants/default.js.map +1 -1
  11. package/dist/module/primitives/alert/variants/destructive.js +3 -0
  12. package/dist/module/primitives/alert/variants/destructive.js.map +1 -1
  13. package/dist/typescript/src/primitives/alert/alert-body.d.ts +9 -0
  14. package/dist/typescript/src/primitives/alert/alert-body.d.ts.map +1 -0
  15. package/dist/typescript/src/primitives/alert/alert-description.d.ts +2 -1
  16. package/dist/typescript/src/primitives/alert/alert-description.d.ts.map +1 -1
  17. package/dist/typescript/src/primitives/alert/alert-title.d.ts +2 -1
  18. package/dist/typescript/src/primitives/alert/alert-title.d.ts.map +1 -1
  19. package/dist/typescript/src/primitives/alert/index.d.ts +3 -0
  20. package/dist/typescript/src/primitives/alert/index.d.ts.map +1 -1
  21. package/dist/typescript/src/primitives/alert/types.d.ts +2 -0
  22. package/dist/typescript/src/primitives/alert/types.d.ts.map +1 -1
  23. package/dist/typescript/src/primitives/alert/variants/default.d.ts.map +1 -1
  24. package/dist/typescript/src/primitives/alert/variants/destructive.d.ts.map +1 -1
  25. package/dist/typescript/src/types/element.types.d.ts +1 -0
  26. package/dist/typescript/src/types/element.types.d.ts.map +1 -1
  27. package/package.json +1 -1
  28. package/src/primitives/alert/alert-body.tsx +19 -0
  29. package/src/primitives/alert/alert-description.tsx +2 -1
  30. package/src/primitives/alert/alert-icon.tsx +1 -1
  31. package/src/primitives/alert/alert-root.tsx +1 -1
  32. package/src/primitives/alert/alert-title.tsx +2 -1
  33. package/src/primitives/alert/index.ts +3 -0
  34. package/src/primitives/alert/types.ts +2 -0
  35. package/src/primitives/alert/variants/default.tsx +3 -0
  36. package/src/primitives/alert/variants/destructive.tsx +3 -0
  37. package/src/types/element.types.ts +2 -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":";;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":[]}
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 +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":[]}
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,aAAmC,GAAG,CAACD,KAAK,CAACE,MAAM,EAAEC,IAAI,EAAEJ,KAAK,CAACK,KAAK,CAAC;EAE7E,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","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":[]}
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":";;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":[]}
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,EAAEJ,UAAU;EACjBK,WAAW,EAAER;AACf,CAAC","ignoreList":[]}
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":[]}
@@ -19,6 +19,9 @@ export const useAlertVariantDefault = () => {
19
19
  icon: {
20
20
  marginTop: 2
21
21
  },
22
+ body: {
23
+ flex: 1
24
+ },
22
25
  title: {
23
26
  fontSize: fontSize,
24
27
  fontWeight: "600",
@@ -1 +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":[]}
1
+ {"version":3,"names":["useThemedStyles","useAlertVariantDefault","colors","radius","fontSize","root","padding","backgroundColor","background","borderRadius","borderWidth","borderColor","border","flexDirection","gap","icon","marginTop","body","flex","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,IAAI,EAAE;MACJC,IAAI,EAAE;IACR,CAAC;IACDC,KAAK,EAAE;MACLf,QAAQ,EAAEA,QAAQ;MAClBgB,UAAU,EAAE,KAAK;MACjBC,KAAK,EAAEnB,MAAM,CAACoB,UAAU;MACxBC,YAAY,EAAE;IAChB,CAAC;IACDC,WAAW,EAAE;MACXpB,QAAQ,EAAEA,QAAQ,GAAG,KAAK;MAC1BiB,KAAK,EAAEnB,MAAM,CAACuB,eAAe;MAC7BC,UAAU,EAAE;IACd;EACF,CAAC,CACH,CAAC;AACH,CAAC","ignoreList":[]}
@@ -19,6 +19,9 @@ export const useAlertVariantDestructive = () => {
19
19
  icon: {
20
20
  marginTop: 2
21
21
  },
22
+ body: {
23
+ flex: 1
24
+ },
22
25
  title: {
23
26
  fontSize: fontSize,
24
27
  fontWeight: "600",
@@ -1 +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":[]}
1
+ {"version":3,"names":["useThemedStyles","useAlertVariantDestructive","colors","radius","fontSize","root","padding","backgroundColor","background","borderRadius","borderWidth","borderColor","danger","flexDirection","gap","icon","marginTop","body","flex","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,IAAI,EAAE;MACJC,IAAI,EAAE;IACR,CAAC;IACDC,KAAK,EAAE;MACLf,QAAQ,EAAEA,QAAQ;MAClBgB,UAAU,EAAE,KAAK;MACjBC,KAAK,EAAEnB,MAAM,CAACU,MAAM;MACpBU,YAAY,EAAE;IAChB,CAAC;IACDC,WAAW,EAAE;MACXnB,QAAQ,EAAEA,QAAQ,GAAG,KAAK;MAC1BiB,KAAK,EAAEnB,MAAM,CAACU,MAAM;MACpBY,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?: string;
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,MAAM,CAAC;IAElB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,eAAe,CAAC,qBAAqB,CAAC,qBAO7E"}
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,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?: string;
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,MAAM,CAAC;IAElB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,CAAC,eAAe,CAAC,qBAOjE"}
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;;;;;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"}
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,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,6 +6,7 @@ import type { AlertTitleProps } from "./alert-title";
5
6
  export interface AlertStyles {
6
7
  root?: AlertRootProps["style"];
7
8
  icon?: AlertIconProps["style"];
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,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 +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"}
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,WA+BzC,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,WA6B7C,CAAC"}
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,WAgC7C,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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@korsolutions/ui",
3
- "version": "0.0.46",
3
+ "version": "0.0.47",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -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?: string;
8
+ children?: TextChildren;
8
9
 
9
10
  style?: StyleProp<TextStyle>;
10
11
  }
@@ -12,7 +12,7 @@ export interface AlertIconProps {
12
12
  export function AlertIcon(props: PropsWithRender<AlertIconProps>) {
13
13
  const alert = useAlert();
14
14
 
15
- const composedStyle = [alert.styles?.icon, props.style];
15
+ const composedStyle: StyleProp<ViewStyle> = [alert.styles?.icon, props.style];
16
16
 
17
17
  const Component = props.render ?? View;
18
18
  return <Component {...props} style={composedStyle} />;
@@ -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?: string;
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";
@@ -6,6 +7,7 @@ import type { AlertTitleProps } from "./alert-title";
6
7
  export interface AlertStyles {
7
8
  root?: AlertRootProps["style"];
8
9
  icon?: AlertIconProps["style"];
10
+ body?: AlertBodyProps["style"];
9
11
  title?: AlertTitleProps["style"];
10
12
  description?: AlertDescriptionProps["style"];
11
13
  }
@@ -16,6 +16,9 @@ export const useAlertVariantDefault = (): AlertStyles => {
16
16
  icon: {
17
17
  marginTop: 2,
18
18
  },
19
+ body: {
20
+ flex: 1,
21
+ },
19
22
  title: {
20
23
  fontSize: fontSize,
21
24
  fontWeight: "600",
@@ -16,6 +16,9 @@ export const useAlertVariantDestructive = (): AlertStyles => {
16
16
  icon: {
17
17
  marginTop: 2,
18
18
  },
19
+ body: {
20
+ flex: 1,
21
+ },
19
22
  title: {
20
23
  fontSize: fontSize,
21
24
  fontWeight: "600",
@@ -9,3 +9,5 @@ export type TextInputRef = HostInstance & {
9
9
  getNativeRef: () => HostInstance;
10
10
  setSelection: (start: number, end?: number) => void;
11
11
  };
12
+
13
+ export type TextChildren = string | number | boolean | null | undefined | string[];