@grupalia/rn-ui-kit 0.43.0 → 0.44.0
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/lib/commonjs/components/BaseAlert.js +14 -4
- package/lib/commonjs/components/BaseAlert.js.map +1 -1
- package/lib/module/components/BaseAlert.js +15 -5
- package/lib/module/components/BaseAlert.js.map +1 -1
- package/lib/typescript/commonjs/components/BaseAlert.d.ts +2 -1
- package/lib/typescript/commonjs/components/BaseAlert.d.ts.map +1 -1
- package/lib/typescript/module/components/BaseAlert.d.ts +2 -1
- package/lib/typescript/module/components/BaseAlert.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -20,10 +20,17 @@ function IconComponent({
|
|
|
20
20
|
const iconColors = {
|
|
21
21
|
brand: 'fg-brand-primary',
|
|
22
22
|
error: 'fg-error-primary',
|
|
23
|
-
alert: 'fg-warning-primary'
|
|
23
|
+
alert: 'fg-warning-primary',
|
|
24
|
+
success: 'fg-success-primary'
|
|
24
25
|
};
|
|
26
|
+
const icon = {
|
|
27
|
+
success: _outline.CheckCircleIcon,
|
|
28
|
+
error: _outline.InformationCircleIcon,
|
|
29
|
+
alert: _outline.InformationCircleIcon,
|
|
30
|
+
brand: _outline.InformationCircleIcon
|
|
31
|
+
}[type];
|
|
25
32
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_BaseIcon.default, {
|
|
26
|
-
icon:
|
|
33
|
+
icon: icon,
|
|
27
34
|
size: 16,
|
|
28
35
|
color: iconColors[type],
|
|
29
36
|
strokeWidth: 2,
|
|
@@ -46,6 +53,8 @@ function BaseAlert({
|
|
|
46
53
|
return 'bg-error-primary';
|
|
47
54
|
case 'alert':
|
|
48
55
|
return 'bg-warning-primary';
|
|
56
|
+
case 'success':
|
|
57
|
+
return 'bg-success-primary';
|
|
49
58
|
case 'brand':
|
|
50
59
|
default:
|
|
51
60
|
return 'bg-brand-primary';
|
|
@@ -56,13 +65,14 @@ function BaseAlert({
|
|
|
56
65
|
const iconBorderColors = {
|
|
57
66
|
brand: _foregroundColors.default['fg-brand-primary'].light,
|
|
58
67
|
error: _foregroundColors.default['fg-error-primary'].light,
|
|
59
|
-
alert: _foregroundColors.default['fg-warning-primary'].light
|
|
68
|
+
alert: _foregroundColors.default['fg-warning-primary'].light,
|
|
69
|
+
success: _foregroundColors.default['fg-success-primary'].light
|
|
60
70
|
};
|
|
61
71
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_hocComponents.View, {
|
|
62
72
|
className: (0, _clsx.default)('flex w-full flex-col rounded-xl border border-primary', alertClasses(), largePhone ? 'p-4' : 'p-2'),
|
|
63
73
|
...props,
|
|
64
74
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_hocComponents.View, {
|
|
65
|
-
className: "
|
|
75
|
+
className: "-ml-1.5 items-center justify-center self-start rounded-full border-2 p-[4px]",
|
|
66
76
|
style: {
|
|
67
77
|
borderColor: `${iconBorderColors[type]}19`
|
|
68
78
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_nativewind","_outline","_hocComponents","_BaseIcon","_BaseText","_useIsAboveBreakpoint","_foregroundColors","_jsxRuntime","e","__esModule","default","IconComponent","type","iconColors","brand","error","alert","
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_nativewind","_outline","_hocComponents","_BaseIcon","_BaseText","_useIsAboveBreakpoint","_foregroundColors","_jsxRuntime","e","__esModule","default","IconComponent","type","iconColors","brand","error","alert","success","icon","CheckCircleIcon","InformationCircleIcon","jsx","size","color","strokeWidth","className","BaseAlert","message","description","variant","children","props","largePhone","useIsAboveBreakpoint","alertClasses","iconBorderColors","foregroundColors","light","jsxs","View","clsx","style","borderColor","_default","exports","styled"],"sourceRoot":"../../../src","sources":["components/BaseAlert.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA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SAAA,CAAAM,OAAQ;MAACe,SAAS,EAAE,IAAAe,aAAI,EACvB,mCAAmC,EACnCR,UAAU,GAAG,SAAS,GAAG,SAC3B,CAAE;MAAAF,QAAA,EAECH;IAAO,CACA,CAAC,EACVC,WAAW,iBACV,IAAArB,WAAA,CAAAc,GAAA,EAACjB,SAAA,CAAAM,OAAQ;MAACe,SAAS,EAAE,IAAAe,aAAI,EACvB,yBAAyB,EACzBR,UAAU,GAAG,MAAM,GAAG,MACxB,CAAE;MAAAF,QAAA,EAECF;IAAW,CACJ,CACX,EACAE,QAAQ;EAAA,CACL,CAAC;AAEX;AAAC,IAAAa,QAAA,GAAAC,OAAA,CAAAlC,OAAA,GAEc,IAAAmC,kBAAM,EAACnB,SAAS,CAAC","ignoreList":[]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { styled } from 'nativewind';
|
|
5
|
-
import { InformationCircleIcon } from 'react-native-heroicons/outline';
|
|
5
|
+
import { CheckCircleIcon, InformationCircleIcon } from 'react-native-heroicons/outline';
|
|
6
6
|
import { View } from "../hoc-components.js";
|
|
7
7
|
import BaseIcon from "./BaseIcon.js";
|
|
8
8
|
import BaseText from "./BaseText.js";
|
|
@@ -15,10 +15,17 @@ function IconComponent({
|
|
|
15
15
|
const iconColors = {
|
|
16
16
|
brand: 'fg-brand-primary',
|
|
17
17
|
error: 'fg-error-primary',
|
|
18
|
-
alert: 'fg-warning-primary'
|
|
18
|
+
alert: 'fg-warning-primary',
|
|
19
|
+
success: 'fg-success-primary'
|
|
19
20
|
};
|
|
21
|
+
const icon = {
|
|
22
|
+
success: CheckCircleIcon,
|
|
23
|
+
error: InformationCircleIcon,
|
|
24
|
+
alert: InformationCircleIcon,
|
|
25
|
+
brand: InformationCircleIcon
|
|
26
|
+
}[type];
|
|
20
27
|
return /*#__PURE__*/_jsx(BaseIcon, {
|
|
21
|
-
icon:
|
|
28
|
+
icon: icon,
|
|
22
29
|
size: 16,
|
|
23
30
|
color: iconColors[type],
|
|
24
31
|
strokeWidth: 2,
|
|
@@ -41,6 +48,8 @@ function BaseAlert({
|
|
|
41
48
|
return 'bg-error-primary';
|
|
42
49
|
case 'alert':
|
|
43
50
|
return 'bg-warning-primary';
|
|
51
|
+
case 'success':
|
|
52
|
+
return 'bg-success-primary';
|
|
44
53
|
case 'brand':
|
|
45
54
|
default:
|
|
46
55
|
return 'bg-brand-primary';
|
|
@@ -51,13 +60,14 @@ function BaseAlert({
|
|
|
51
60
|
const iconBorderColors = {
|
|
52
61
|
brand: foregroundColors['fg-brand-primary'].light,
|
|
53
62
|
error: foregroundColors['fg-error-primary'].light,
|
|
54
|
-
alert: foregroundColors['fg-warning-primary'].light
|
|
63
|
+
alert: foregroundColors['fg-warning-primary'].light,
|
|
64
|
+
success: foregroundColors['fg-success-primary'].light
|
|
55
65
|
};
|
|
56
66
|
return /*#__PURE__*/_jsxs(View, {
|
|
57
67
|
className: clsx('flex w-full flex-col rounded-xl border border-primary', alertClasses(), largePhone ? 'p-4' : 'p-2'),
|
|
58
68
|
...props,
|
|
59
69
|
children: [/*#__PURE__*/_jsx(View, {
|
|
60
|
-
className: "
|
|
70
|
+
className: "-ml-1.5 items-center justify-center self-start rounded-full border-2 p-[4px]",
|
|
61
71
|
style: {
|
|
62
72
|
borderColor: `${iconBorderColors[type]}19`
|
|
63
73
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["clsx","styled","InformationCircleIcon","View","BaseIcon","BaseText","useIsAboveBreakpoint","foregroundColors","jsx","_jsx","jsxs","_jsxs","IconComponent","type","iconColors","brand","error","alert","icon","size","color","strokeWidth","className","BaseAlert","message","description","variant","children","props","largePhone","alertClasses","iconBorderColors","light","style","borderColor"],"sourceRoot":"../../../src","sources":["components/BaseAlert.tsx"],"mappings":";;AAAA,OAAOA,IAAI,MAAM,MAAM;AACvB,SAASC,MAAM,QAAQ,YAAY;AACnC,SAASC,qBAAqB,QAAQ,gCAAgC;
|
|
1
|
+
{"version":3,"names":["clsx","styled","CheckCircleIcon","InformationCircleIcon","View","BaseIcon","BaseText","useIsAboveBreakpoint","foregroundColors","jsx","_jsx","jsxs","_jsxs","IconComponent","type","iconColors","brand","error","alert","success","icon","size","color","strokeWidth","className","BaseAlert","message","description","variant","children","props","largePhone","alertClasses","iconBorderColors","light","style","borderColor"],"sourceRoot":"../../../src","sources":["components/BaseAlert.tsx"],"mappings":";;AAAA,OAAOA,IAAI,MAAM,MAAM;AACvB,SAASC,MAAM,QAAQ,YAAY;AACnC,SAASC,eAAe,EAAEC,qBAAqB,QAAQ,gCAAgC;AAEvF,SAASC,IAAI,QAAQ,sBAAmB;AACxC,OAAOC,QAAQ,MAAM,eAAY;AACjC,OAAOC,QAAQ,MAAM,eAAY;AACjC,SAASC,oBAAoB,QAAQ,kCAA+B;AACpE,OAAOC,gBAAgB,MAAM,gCAA6B;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAQ3D,SAASC,aAAaA,CAAC;EAAEC;AAAyB,CAAC,EAAE;EACnD,MAAMC,UAAU,GAAG;IACjBC,KAAK,EAAE,kBAAkB;IACzBC,KAAK,EAAE,kBAAkB;IACzBC,KAAK,EAAE,oBAAoB;IAC3BC,OAAO,EAAE;EACX,CAAU;EAEV,MAAMC,IAAI,GAAG;IACXD,OAAO,EAAEjB,eAAe;IACxBe,KAAK,EAAEd,qBAAqB;IAC5Be,KAAK,EAAEf,qBAAqB;IAC5Ba,KAAK,EAAEb;EACT,CAAC,CAACW,IAAI,CAAC;EAEP,oBACEJ,IAAA,CAACL,QAAQ;IACPe,IAAI,EAAEA,IAAK;IACXC,IAAI,EAAE,EAAG;IACTC,KAAK,EAAEP,UAAU,CAACD,IAAI,CAAE;IACxBS,WAAW,EAAE,CAAE;IACfC,SAAS,EAAC;EAAU,CACrB,CAAC;AAEN;AASA,SAASC,SAASA,CAAC;EACjBX,IAAI;EACJY,OAAO;EACPC,WAA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QAAK,CACZ;MAAC,CACE;IAAC,CACH,CAAC,eACPJ,IAAA,CAACJ,QAAQ;MAACkB,SAAS,EAAExB,IAAI,CACvB,mCAAmC,EACnC+B,UAAU,GAAG,SAAS,GAAG,SAC3B,CAAE;MAAAF,QAAA,EAECH;IAAO,CACA,CAAC,EACVC,WAAW,iBACVjB,IAAA,CAACJ,QAAQ;MAACkB,SAAS,EAAExB,IAAI,CACvB,yBAAyB,EACzB+B,UAAU,GAAG,MAAM,GAAG,MACxB,CAAE;MAAAF,QAAA,EAECF;IAAW,CACJ,CACX,EACAE,QAAQ;EAAA,CACL,CAAC;AAEX;AAEA,eAAe5B,MAAM,CAACwB,SAAS,CAAC","ignoreList":[]}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { View } from '../hoc-components';
|
|
3
|
+
type AlertType = 'brand' | 'error' | 'alert' | 'success';
|
|
3
4
|
interface Props extends React.ComponentProps<typeof View> {
|
|
4
|
-
type:
|
|
5
|
+
type: AlertType;
|
|
5
6
|
message: string;
|
|
6
7
|
description?: string;
|
|
7
8
|
variant?: 'primary' | 'secondary';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseAlert.d.ts","sourceRoot":"","sources":["../../../../src/components/BaseAlert.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseAlert.d.ts","sourceRoot":"","sources":["../../../../src/components/BaseAlert.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAMzC,KAAK,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;AAgCzD,UAAU,KAAM,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC;IACvD,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;CACnC;;AA8ED,wBAAiC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { View } from '../hoc-components';
|
|
3
|
+
type AlertType = 'brand' | 'error' | 'alert' | 'success';
|
|
3
4
|
interface Props extends React.ComponentProps<typeof View> {
|
|
4
|
-
type:
|
|
5
|
+
type: AlertType;
|
|
5
6
|
message: string;
|
|
6
7
|
description?: string;
|
|
7
8
|
variant?: 'primary' | 'secondary';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseAlert.d.ts","sourceRoot":"","sources":["../../../../src/components/BaseAlert.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseAlert.d.ts","sourceRoot":"","sources":["../../../../src/components/BaseAlert.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAMzC,KAAK,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;AAgCzD,UAAU,KAAM,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC;IACvD,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;CACnC;;AA8ED,wBAAiC"}
|