@grupalia/rn-ui-kit 0.10.0 → 0.12.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 +65 -72
- package/lib/commonjs/components/BaseAlert.js.map +1 -1
- package/lib/commonjs/components/BaseBadge.js +2 -1
- package/lib/commonjs/components/BaseBadge.js.map +1 -1
- package/lib/commonjs/components/BaseButton.js +9 -15
- package/lib/commonjs/components/BaseButton.js.map +1 -1
- package/lib/commonjs/components/BaseDateInput.js +5 -4
- package/lib/commonjs/components/BaseDateInput.js.map +1 -1
- package/lib/commonjs/components/BaseHorizontalTabs.js +2 -1
- package/lib/commonjs/components/BaseHorizontalTabs.js.map +1 -1
- package/lib/commonjs/components/BaseRadioGroup.js +3 -2
- package/lib/commonjs/components/BaseRadioGroup.js.map +1 -1
- package/lib/commonjs/components/BaseSelect.js +7 -6
- package/lib/commonjs/components/BaseSelect.js.map +1 -1
- package/lib/commonjs/components/BaseSelectionItem.js +2 -1
- package/lib/commonjs/components/BaseSelectionItem.js.map +1 -1
- package/lib/commonjs/components/BaseStackedList.js +4 -3
- package/lib/commonjs/components/BaseStackedList.js.map +1 -1
- package/lib/commonjs/index.js +9 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/styles/text-colors.js +0 -16
- package/lib/commonjs/styles/text-colors.js.map +1 -1
- package/lib/commonjs/utils/clabe.js +30 -0
- package/lib/commonjs/utils/clabe.js.map +1 -0
- package/lib/commonjs/utils/mx-banks.js +10 -0
- package/lib/commonjs/utils/mx-banks.js.map +1 -0
- package/lib/commonjs/utils/mx-banks.json +492 -0
- package/lib/module/components/BaseAlert.js +67 -74
- package/lib/module/components/BaseAlert.js.map +1 -1
- package/lib/module/components/BaseBadge.js +3 -2
- package/lib/module/components/BaseBadge.js.map +1 -1
- package/lib/module/components/BaseButton.js +10 -16
- package/lib/module/components/BaseButton.js.map +1 -1
- package/lib/module/components/BaseDateInput.js +6 -5
- package/lib/module/components/BaseDateInput.js.map +1 -1
- package/lib/module/components/BaseHorizontalTabs.js +3 -2
- package/lib/module/components/BaseHorizontalTabs.js.map +1 -1
- package/lib/module/components/BaseRadioGroup.js +4 -3
- package/lib/module/components/BaseRadioGroup.js.map +1 -1
- package/lib/module/components/BaseSelect.js +8 -7
- package/lib/module/components/BaseSelect.js.map +1 -1
- package/lib/module/components/BaseSelectionItem.js +3 -2
- package/lib/module/components/BaseSelectionItem.js.map +1 -1
- package/lib/module/components/BaseStackedList.js +5 -4
- package/lib/module/components/BaseStackedList.js.map +1 -1
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/styles/text-colors.js +0 -16
- package/lib/module/styles/text-colors.js.map +1 -1
- package/lib/module/utils/clabe.js +24 -0
- package/lib/module/utils/clabe.js.map +1 -0
- package/lib/module/utils/mx-banks.js +5 -0
- package/lib/module/utils/mx-banks.js.map +1 -0
- package/lib/module/utils/mx-banks.json +492 -0
- package/lib/typescript/commonjs/components/BaseAlert.d.ts +1 -1
- package/lib/typescript/commonjs/components/BaseAlert.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/BaseBadge.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/BaseButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/BaseDateInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/BaseHorizontalTabs.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/BaseRadioGroup.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/BaseSelect.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/BaseSelectionItem.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/BaseStackedList.d.ts.map +1 -1
- package/lib/typescript/commonjs/hoc-components.d.ts +2 -2
- package/lib/typescript/commonjs/hoc-components.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +1 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/styles/text-colors.d.ts.map +1 -1
- package/lib/typescript/commonjs/utils/clabe.d.ts +5 -0
- package/lib/typescript/commonjs/utils/clabe.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/mx-banks.d.ts +7 -0
- package/lib/typescript/commonjs/utils/mx-banks.d.ts.map +1 -0
- package/lib/typescript/module/components/BaseAlert.d.ts +1 -1
- package/lib/typescript/module/components/BaseAlert.d.ts.map +1 -1
- package/lib/typescript/module/components/BaseBadge.d.ts.map +1 -1
- package/lib/typescript/module/components/BaseButton.d.ts.map +1 -1
- package/lib/typescript/module/components/BaseDateInput.d.ts.map +1 -1
- package/lib/typescript/module/components/BaseHorizontalTabs.d.ts.map +1 -1
- package/lib/typescript/module/components/BaseRadioGroup.d.ts.map +1 -1
- package/lib/typescript/module/components/BaseSelect.d.ts.map +1 -1
- package/lib/typescript/module/components/BaseSelectionItem.d.ts.map +1 -1
- package/lib/typescript/module/components/BaseStackedList.d.ts.map +1 -1
- package/lib/typescript/module/hoc-components.d.ts +2 -2
- package/lib/typescript/module/hoc-components.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +1 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/styles/text-colors.d.ts.map +1 -1
- package/lib/typescript/module/utils/clabe.d.ts +5 -0
- package/lib/typescript/module/utils/clabe.d.ts.map +1 -0
- package/lib/typescript/module/utils/mx-banks.d.ts +7 -0
- package/lib/typescript/module/utils/mx-banks.d.ts.map +1 -0
- package/package.json +3 -3
- package/src/components/BaseAlert.tsx +79 -76
- package/src/components/BaseBadge.tsx +3 -2
- package/src/components/BaseButton.tsx +11 -20
- package/src/components/BaseDateInput.tsx +7 -6
- package/src/components/BaseHorizontalTabs.tsx +4 -8
- package/src/components/BaseRadioGroup.tsx +4 -3
- package/src/components/BaseSelect.tsx +11 -14
- package/src/components/BaseSelectionItem.tsx +3 -2
- package/src/components/BaseStackedList.tsx +6 -5
- package/src/styles/text-colors.ts +0 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseBadge.d.ts","sourceRoot":"","sources":["../../../../src/components/BaseBadge.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseBadge.d.ts","sourceRoot":"","sources":["../../../../src/components/BaseBadge.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAKzC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,MAAM,MAAM,YAAY,GACtB,MAAM,GACN,OAAO,GACP,OAAO,GACP,SAAS,GACT,SAAS,GACT,WAAW,GACX,YAAY,GACZ,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,QAAQ,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE3C,UAAU,cAAe,SAAQ,SAAS;IACxC,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC3B,SAAS,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;CAC7B;;;;;;;AA8JD,wBAAiC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseButton.d.ts","sourceRoot":"","sources":["../../../../src/components/BaseButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseButton.d.ts","sourceRoot":"","sources":["../../../../src/components/BaseButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,UAAU,WAAY,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC;IACzE,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,YAAY,GAAG,WAAW,CAAC;IAC5E,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACxC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC3B,SAAS,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;;AAqSD,wBAAkC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseDateInput.d.ts","sourceRoot":"","sources":["../../../../src/components/BaseDateInput.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAgC,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAmB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseDateInput.d.ts","sourceRoot":"","sources":["../../../../src/components/BaseDateInput.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAgC,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAmB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAQvE,UAAU,kBAAmB,SAAQ,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,GAAG,WAAW,GAAG,UAAU,CAAC;IACpG,KAAK,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,KAAK,EACL,QAAQ,EACR,KAAK,EACL,WAAW,EACX,SAAc,EACd,KAAU,EACV,QAAgB,EAChB,OAAe,EACf,aAA8B,EAC9B,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,WAAiC,EACjC,KAAK,EACL,OAAe,EACf,GAAG,KAAK,EACT,EAAE,kBAAkB,qBAsGpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseHorizontalTabs.d.ts","sourceRoot":"","sources":["../../../../src/components/BaseHorizontalTabs.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseHorizontalTabs.d.ts","sourceRoot":"","sources":["../../../../src/components/BaseHorizontalTabs.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAIzC,OAAmB,EAAE,eAAe,EAAgB,MAAM,cAAc,CAAC;AAGzE,MAAM,MAAM,OAAO,GAAG,cAAc,GAAG,WAAW,GAAG,aAAa,GAAG,eAAe,GAAG,gBAAgB,CAAC;AAExG,MAAM,WAAW,GAAG;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,UAAU,uBAAuB;IAC/B,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAAC,CAAA;IACrE,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC9B,KAAK,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;CAC5B;;;;;;;AAkMD,wBAA0C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseRadioGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/BaseRadioGroup.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseRadioGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/BaseRadioGroup.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAMzC,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB;AAED,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACpC,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;;;;;;;AAkDD,wBAAsC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseSelect.d.ts","sourceRoot":"","sources":["../../../../src/components/BaseSelect.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,SAAS,EAAc,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseSelect.d.ts","sourceRoot":"","sources":["../../../../src/components/BaseSelect.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,SAAS,EAAc,MAAM,cAAc,CAAC;AAUrD,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;;;;;;;AAwID,wBAAkC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseSelectionItem.d.ts","sourceRoot":"","sources":["../../../../src/components/BaseSelectionItem.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseSelectionItem.d.ts","sourceRoot":"","sources":["../../../../src/components/BaseSelectionItem.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAMzC,MAAM,WAAW,sBAAuB,SAAQ,SAAS;IACvD,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,OAAO,GAAG,UAAU,CAAC;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACpC;;;;;;;AAgED,wBAAyC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseStackedList.d.ts","sourceRoot":"","sources":["../../../../src/components/BaseStackedList.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAW,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseStackedList.d.ts","sourceRoot":"","sources":["../../../../src/components/BaseStackedList.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAW,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAUzC,MAAM,WAAW,oBAAoB,CAAC,CAAC,CAAE,SAAQ,SAAS;IACxD,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC;IAClD,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAClD,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAuBD,iBAAS,eAAe,CAAC,CAAC,EAAE,EAC1B,UAAU,EACV,KAAK,EACL,UAAU,EACV,UAAU,EACV,UAAU,EACV,MAAM,EACN,QAAQ,EACR,OAAe,EACf,WAAe,EACf,YAAY,EACZ,qBAAqB,EACrB,SAAa,EACb,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,CAAC,CAAC,qBA+EzB;AAED,QAAA,MAAM,WAAW,wBAAoD,CAAC;AAEtE,eAAe,WAAW,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { View as RNView } from 'react-native';
|
|
3
3
|
/**
|
|
4
4
|
* Hello!
|
|
5
5
|
*
|
|
@@ -58,7 +58,7 @@ export declare const ScrollView: import("react").ForwardRefExoticComponent<impor
|
|
|
58
58
|
baseClassName?: string | undefined;
|
|
59
59
|
baseTw?: string | undefined;
|
|
60
60
|
} & import("react").RefAttributes<unknown>>;
|
|
61
|
-
export declare const GestureScrollView: import("react").ForwardRefExoticComponent<Omit<import("nativewind").StyledProps<import("react-native").ScrollViewProps & import("react-native-gesture-handler").NativeViewGestureHandlerProps & import("react").RefAttributes<
|
|
61
|
+
export declare const GestureScrollView: import("react").ForwardRefExoticComponent<Omit<import("nativewind").StyledProps<import("react-native").ScrollViewProps & import("react-native-gesture-handler").NativeViewGestureHandlerProps & import("react").RefAttributes<import("react").ComponentType<any>>>, "ref"> & import("react").RefAttributes<import("react").ComponentType<any>>>;
|
|
62
62
|
export declare const SectionList: import("react").ForwardRefExoticComponent<import("react-native").SectionListProps<unknown, unknown> & {
|
|
63
63
|
className?: string | undefined;
|
|
64
64
|
tw?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hoc-components.d.ts","sourceRoot":"","sources":["../../../src/hoc-components.ts"],"names":[],"mappings":";AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"hoc-components.d.ts","sourceRoot":"","sources":["../../../src/hoc-components.ts"],"names":[],"mappings":";AACA,OAAO,EAiBL,IAAI,IAAI,MAAM,EAMf,MAAM,cAAc,CAAC;AAGtB;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB;;;;;2CAA8B,CAAC;AAC7D,eAAO,MAAM,QAAQ;;;;;2CAAqB,CAAC;AAC3C,eAAO,MAAM,KAAK;;;;;2CAAkB,CAAC;AACrC,eAAO,MAAM,eAAe;;;;;2CAA4B,CAAC;AACzD,eAAO,MAAM,oBAAoB;;;;;2CAAiC,CAAC;AACnE,eAAO,MAAM,KAAK;;;;;2CAAkB,CAAC;AACrC,eAAO,MAAM,SAAS,iNAAsB,CAAC;AAC7C,eAAO,MAAM,cAAc;;;;;2CAA2B,CAAC;AACvD,eAAO,MAAM,UAAU;;;;;2CAAuB,CAAC;AAC/C,eAAO,MAAM,iBAAiB,iVAAyB,CAAC;AACxD,eAAO,MAAM,WAAW;;;;;2CAAwB,CAAC;AACjD,eAAO,MAAM,MAAM;;;;;2CAAmB,CAAC;AACvC,eAAO,MAAM,IAAI;;;;;2CAAiB,CAAC;AACnC,eAAO,MAAM,SAAS;;;;;2CAAsB,CAAC;AAC7C,eAAO,MAAM,kBAAkB;;;;;2CAA+B,CAAC;AAC/D,eAAO,MAAM,gBAAgB;;;;;2CAA6B,CAAC;AAC3D,eAAO,MAAM,wBAAwB;;;;;2CAAqC,CAAC;AAC3E,eAAO,MAAM,IAAI;;;;;2CAAiB,CAAC;AACnC,eAAO,MAAM,eAAe;;;;;2CAA4B,CAAC;AACzD,eAAO,MAAM,mBAAmB;;;;;2CAAgC,CAAC;AACjE,eAAO,MAAM,uBAAuB;;;;;2CAAoC,CAAC;AACzE,eAAO,MAAM,kBAAkB;;;;;2CAA+B,CAAC;AAC/D,eAAO,MAAM,YAAY;;;;;2CAAyB,CAAC"}
|
|
@@ -2,4 +2,5 @@ export * from './components';
|
|
|
2
2
|
export { default as preset } from './preset';
|
|
3
3
|
export { default as foregroundColors } from './styles/foreground-colors';
|
|
4
4
|
export { default as utilityColors } from './styles/utility-colors';
|
|
5
|
+
export { default as colors } from './styles/colors';
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-colors.d.ts","sourceRoot":"","sources":["../../../../src/styles/text-colors.ts"],"names":[],"mappings":"AAGA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAAC;CAC5B,CAAC;AAEF,QAAA,MAAM,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"text-colors.d.ts","sourceRoot":"","sources":["../../../../src/styles/text-colors.ts"],"names":[],"mappings":"AAGA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAAC;CAC5B,CAAC;AAEF,QAAA,MAAM,UAAU,EAAE,cA6EjB,CAAC;AASF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type Bank } from './mx-banks';
|
|
2
|
+
export declare const VERIFICATION_DIGIT_WEIGHTS: number[];
|
|
3
|
+
export declare function getBankFromCode(code: string): Bank | undefined;
|
|
4
|
+
export declare function isValidClabe(clabe: string): boolean;
|
|
5
|
+
//# sourceMappingURL=clabe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clabe.d.ts","sourceRoot":"","sources":["../../../../src/utils/clabe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAEjD,eAAO,MAAM,0BAA0B,UAAsD,CAAC;AAE9F,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAE9D;AAgBD,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAQnD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mx-banks.d.ts","sourceRoot":"","sources":["../../../../src/utils/mx-banks.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,QAAQ,EAAE,IAAI,EAAY,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grupalia/rn-ui-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Grupalia React Native UI Kit",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/module/index.d.ts",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"react": "*",
|
|
28
28
|
"react-native": "*",
|
|
29
29
|
"react-native-date-picker": "^5.0.12",
|
|
30
|
-
"react-native-gesture-handler": "
|
|
30
|
+
"react-native-gesture-handler": "2.16.1",
|
|
31
31
|
"react-native-heroicons": "^4.0.0",
|
|
32
32
|
"react-native-svg": "*",
|
|
33
33
|
"tailwindcss": "3.3.2"
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"react-native": "0.74.5",
|
|
55
55
|
"react-native-builder-bob": "^0.40.6",
|
|
56
56
|
"react-native-date-picker": "^5.0.12",
|
|
57
|
-
"react-native-gesture-handler": "
|
|
57
|
+
"react-native-gesture-handler": "2.16.1",
|
|
58
58
|
"react-native-heroicons": "^4.0.0",
|
|
59
59
|
"react-native-svg": "^15.11.2",
|
|
60
60
|
"tailwindcss": "3.3.2",
|
|
@@ -4,62 +4,63 @@ import { InformationCircleIcon as OutlinedInformationCircleIcon } from 'react-na
|
|
|
4
4
|
import {
|
|
5
5
|
ExclamationTriangleIcon,
|
|
6
6
|
CheckCircleIcon,
|
|
7
|
-
InformationCircleIcon,
|
|
8
7
|
XCircleIcon,
|
|
8
|
+
InformationCircleIcon as SolidInformationCircleIcon,
|
|
9
9
|
} from 'react-native-heroicons/solid';
|
|
10
10
|
|
|
11
|
-
import { View
|
|
11
|
+
import { View } from '../hoc-components';
|
|
12
12
|
import BaseIcon from './BaseIcon';
|
|
13
|
+
import BaseText from './BaseText';
|
|
13
14
|
import { useIsAboveBreakpoint } from '../hooks/useIsAboveBreakpoint';
|
|
14
15
|
|
|
15
16
|
interface IconComponentProps {
|
|
16
|
-
type: 'error' | 'success' | 'alert' | '
|
|
17
|
+
type: 'error' | 'success' | 'alert' | 'brand';
|
|
17
18
|
variant?: 'primary' | 'secondary';
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
function IconComponent({ type, variant = 'primary' }: IconComponentProps) {
|
|
21
22
|
const iconColors = {
|
|
23
|
+
brand: {
|
|
24
|
+
primary: 'fg-white',
|
|
25
|
+
secondary: 'fg-brand-primary',
|
|
26
|
+
},
|
|
22
27
|
error: {
|
|
23
|
-
primary: 'fg-
|
|
24
|
-
secondary: 'fg-error-
|
|
28
|
+
primary: 'fg-white',
|
|
29
|
+
secondary: 'fg-error-primary',
|
|
25
30
|
},
|
|
26
31
|
success: {
|
|
27
|
-
primary: 'fg-
|
|
28
|
-
secondary: 'fg-success-
|
|
32
|
+
primary: 'fg-white',
|
|
33
|
+
secondary: 'fg-success-primary',
|
|
29
34
|
},
|
|
30
35
|
alert: {
|
|
31
|
-
primary: 'fg-
|
|
32
|
-
secondary: 'fg-warning-
|
|
33
|
-
},
|
|
34
|
-
info: {
|
|
35
|
-
primary: 'utility-gray-500',
|
|
36
|
-
secondary: 'utility-gray-400',
|
|
37
|
-
},
|
|
38
|
-
notice: {
|
|
39
|
-
primary: 'utility-blue-500',
|
|
40
|
-
secondary: 'utility-blue-400',
|
|
36
|
+
primary: 'fg-white',
|
|
37
|
+
secondary: 'fg-warning-primary',
|
|
41
38
|
},
|
|
42
39
|
} as const;
|
|
43
40
|
|
|
44
41
|
const icons = {
|
|
42
|
+
brand: SolidInformationCircleIcon,
|
|
45
43
|
error: XCircleIcon,
|
|
46
44
|
success: CheckCircleIcon,
|
|
47
45
|
alert: ExclamationTriangleIcon,
|
|
48
|
-
info: OutlinedInformationCircleIcon,
|
|
49
|
-
notice: InformationCircleIcon,
|
|
50
46
|
};
|
|
51
47
|
|
|
48
|
+
if (variant === 'secondary') {
|
|
49
|
+
icons.brand = OutlinedInformationCircleIcon;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
52
|
return (
|
|
53
53
|
<BaseIcon
|
|
54
54
|
icon={icons[type]}
|
|
55
|
-
size={
|
|
55
|
+
size={18}
|
|
56
56
|
color={iconColors[type][variant]}
|
|
57
|
+
className="mr-1"
|
|
57
58
|
/>
|
|
58
59
|
);
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
interface Props extends React.ComponentProps<typeof View> {
|
|
62
|
-
type: '
|
|
63
|
+
type: 'brand' | 'error' | 'success' | 'alert';
|
|
63
64
|
message: string;
|
|
64
65
|
description?: string;
|
|
65
66
|
variant?: 'primary' | 'secondary';
|
|
@@ -75,73 +76,66 @@ function BaseAlert({
|
|
|
75
76
|
}: Props) {
|
|
76
77
|
const largePhone = useIsAboveBreakpoint('xs');
|
|
77
78
|
const alertClasses = () => {
|
|
78
|
-
if (variant === '
|
|
79
|
-
return 'bg-white border';
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
switch (type) {
|
|
83
|
-
case 'error':
|
|
84
|
-
return 'bg-error-secondary';
|
|
85
|
-
case 'success':
|
|
86
|
-
return 'bg-success-secondary';
|
|
87
|
-
case 'alert':
|
|
88
|
-
return 'bg-yellow-50 border-yellow-400';
|
|
89
|
-
case 'info':
|
|
90
|
-
return 'bg-white border border-gray-300';
|
|
91
|
-
case 'notice':
|
|
92
|
-
default:
|
|
93
|
-
return 'bg-blue-100';
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
const textColor = () => {
|
|
98
|
-
if (variant === 'secondary') {
|
|
79
|
+
if (variant === 'primary') {
|
|
99
80
|
switch (type) {
|
|
100
81
|
case 'error':
|
|
101
|
-
return '
|
|
82
|
+
return 'bg-error-solid';
|
|
102
83
|
case 'success':
|
|
103
|
-
return '
|
|
84
|
+
return 'bg-success-solid';
|
|
104
85
|
case 'alert':
|
|
105
|
-
return '
|
|
106
|
-
case '
|
|
107
|
-
case 'notice':
|
|
86
|
+
return 'bg-warning-solid';
|
|
87
|
+
case 'brand':
|
|
108
88
|
default:
|
|
109
|
-
return '
|
|
89
|
+
return 'bg-brand-solid';
|
|
110
90
|
}
|
|
111
91
|
} else {
|
|
112
92
|
switch (type) {
|
|
113
93
|
case 'error':
|
|
114
|
-
return '
|
|
94
|
+
return 'bg-white border border-error';
|
|
115
95
|
case 'success':
|
|
116
|
-
return 'text-green-700';
|
|
117
96
|
case 'alert':
|
|
118
|
-
return '
|
|
119
|
-
case '
|
|
120
|
-
return 'text-gray-500';
|
|
121
|
-
case 'notice':
|
|
97
|
+
return 'bg-white border border-primary';
|
|
98
|
+
case 'brand':
|
|
122
99
|
default:
|
|
123
|
-
return '
|
|
100
|
+
return 'bg-white border border-brand';
|
|
124
101
|
}
|
|
125
102
|
}
|
|
126
103
|
};
|
|
127
104
|
|
|
128
|
-
const
|
|
129
|
-
if (variant === '
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
105
|
+
const messageTextColor = () => {
|
|
106
|
+
if (variant === 'primary') {
|
|
107
|
+
return 'text-white';
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
switch (type) {
|
|
111
|
+
case 'error':
|
|
112
|
+
return 'text-error-primary';
|
|
113
|
+
case 'success':
|
|
114
|
+
return 'text-success-primary';
|
|
115
|
+
case 'alert':
|
|
116
|
+
return 'text-warning-primary';
|
|
117
|
+
case 'brand':
|
|
118
|
+
default:
|
|
119
|
+
return 'text-brand-secondary';
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
const descriptionTextColor = () => {
|
|
124
|
+
if (variant === 'primary') {
|
|
125
|
+
return 'text-utility-gray-100';
|
|
142
126
|
}
|
|
143
127
|
|
|
144
|
-
|
|
128
|
+
switch (type) {
|
|
129
|
+
case 'error':
|
|
130
|
+
return 'text-error-primary';
|
|
131
|
+
case 'success':
|
|
132
|
+
return 'text-success-primary';
|
|
133
|
+
case 'alert':
|
|
134
|
+
return 'text-warning-primary';
|
|
135
|
+
case 'brand':
|
|
136
|
+
default:
|
|
137
|
+
return 'text-brand-tertiary';
|
|
138
|
+
}
|
|
145
139
|
};
|
|
146
140
|
|
|
147
141
|
return (
|
|
@@ -149,7 +143,6 @@ function BaseAlert({
|
|
|
149
143
|
className={clsx(
|
|
150
144
|
'flex flex-row rounded-lg',
|
|
151
145
|
alertClasses(),
|
|
152
|
-
borderColor(),
|
|
153
146
|
largePhone ? 'px-2 py-4' : 'px-1 py-2',
|
|
154
147
|
)}
|
|
155
148
|
{...props}
|
|
@@ -160,14 +153,24 @@ function BaseAlert({
|
|
|
160
153
|
variant={variant}
|
|
161
154
|
/>
|
|
162
155
|
</View>
|
|
163
|
-
<View className={clsx('flex flex-1 flex-col', largePhone ? 'ml-3' : 'ml-1')}>
|
|
164
|
-
<
|
|
156
|
+
<View className={clsx('flex flex-1 flex-col pr-2', largePhone ? 'ml-3' : 'ml-1')}>
|
|
157
|
+
<BaseText className={clsx(
|
|
158
|
+
'flex-1 font-semibold',
|
|
159
|
+
messageTextColor(),
|
|
160
|
+
largePhone ? 'text-base' : 'text-sm',
|
|
161
|
+
)}
|
|
162
|
+
>
|
|
165
163
|
{message}
|
|
166
|
-
</
|
|
164
|
+
</BaseText>
|
|
167
165
|
{description && (
|
|
168
|
-
<
|
|
166
|
+
<BaseText className={clsx(
|
|
167
|
+
'flex-1 text-sm',
|
|
168
|
+
descriptionTextColor(),
|
|
169
|
+
largePhone ? 'mt-3' : 'mt-1',
|
|
170
|
+
)}
|
|
171
|
+
>
|
|
169
172
|
{description}
|
|
170
|
-
</
|
|
173
|
+
</BaseText>
|
|
171
174
|
)}
|
|
172
175
|
{children}
|
|
173
176
|
</View>
|
|
@@ -2,8 +2,9 @@ import clsx from 'clsx';
|
|
|
2
2
|
import { styled } from 'nativewind';
|
|
3
3
|
import { ViewProps } from 'react-native';
|
|
4
4
|
|
|
5
|
-
import { View
|
|
5
|
+
import { View } from '../hoc-components';
|
|
6
6
|
import BaseIcon from './BaseIcon';
|
|
7
|
+
import BaseText from './BaseText';
|
|
7
8
|
import { HeroIcon } from '../types/heroicons';
|
|
8
9
|
|
|
9
10
|
export type BadgeVariant =
|
|
@@ -174,7 +175,7 @@ function BaseBadge({
|
|
|
174
175
|
/>
|
|
175
176
|
</View>
|
|
176
177
|
)}
|
|
177
|
-
<
|
|
178
|
+
<BaseText className={textStyles}>{text}</BaseText>
|
|
178
179
|
{rightIcon && (
|
|
179
180
|
<View className={iconSpacingStyles.right}>
|
|
180
181
|
<BaseIcon
|
|
@@ -3,10 +3,9 @@ import { styled } from 'nativewind';
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { GestureResponderEvent } from 'react-native';
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
Text, View, ActivityIndicator,
|
|
8
|
-
} from '../hoc-components';
|
|
6
|
+
import { View, ActivityIndicator } from '../hoc-components';
|
|
9
7
|
import BaseIcon from './BaseIcon';
|
|
8
|
+
import BaseText from './BaseText';
|
|
10
9
|
import PressableOpacity from './PressableOpacity';
|
|
11
10
|
import { Color as ForegroundColor } from '../styles/foreground-colors';
|
|
12
11
|
import { HeroIcon } from '../types/heroicons';
|
|
@@ -98,11 +97,11 @@ function BaseButton({
|
|
|
98
97
|
}
|
|
99
98
|
|
|
100
99
|
const sizeClasses = {
|
|
101
|
-
xs: 'rounded-md h-
|
|
102
|
-
sm: 'rounded-md h-
|
|
103
|
-
md: 'rounded-lg h-
|
|
104
|
-
lg: 'rounded-lg h-
|
|
105
|
-
xl: 'rounded-lg h-
|
|
100
|
+
xs: 'rounded-md h-8 px-4',
|
|
101
|
+
sm: 'rounded-md h-9 px-4',
|
|
102
|
+
md: 'rounded-lg h-10 px-5',
|
|
103
|
+
lg: 'rounded-lg h-11 px-5',
|
|
104
|
+
xl: 'rounded-lg h-12 px-6',
|
|
106
105
|
};
|
|
107
106
|
|
|
108
107
|
const iconOnlyClasses = {
|
|
@@ -177,14 +176,6 @@ function BaseButton({
|
|
|
177
176
|
xl: 'text-base',
|
|
178
177
|
};
|
|
179
178
|
|
|
180
|
-
const iconSizes = {
|
|
181
|
-
xs: 16,
|
|
182
|
-
sm: 18,
|
|
183
|
-
md: 20,
|
|
184
|
-
lg: 22,
|
|
185
|
-
xl: 24,
|
|
186
|
-
};
|
|
187
|
-
|
|
188
179
|
let buttonState: 'default' | 'disabled' | 'loading' = 'default';
|
|
189
180
|
if (loading) {
|
|
190
181
|
buttonState = 'loading';
|
|
@@ -283,22 +274,22 @@ function BaseButton({
|
|
|
283
274
|
{leftIcon && (
|
|
284
275
|
<BaseIcon
|
|
285
276
|
icon={leftIcon}
|
|
286
|
-
size={
|
|
277
|
+
size={20}
|
|
287
278
|
color={iconColors[variant][buttonState] as ForegroundColor}
|
|
288
279
|
className={isIconOnly ? '' : 'mr-1.5'}
|
|
289
280
|
/>
|
|
290
281
|
)}
|
|
291
282
|
{text && (
|
|
292
|
-
<
|
|
283
|
+
<BaseText className={textStyles}>
|
|
293
284
|
{text}
|
|
294
285
|
{timer > 0 ? ` (${timer})` : ''}
|
|
295
286
|
{debounce > 0 ? ` (${debounce})` : ''}
|
|
296
|
-
</
|
|
287
|
+
</BaseText>
|
|
297
288
|
)}
|
|
298
289
|
{rightIcon && (
|
|
299
290
|
<BaseIcon
|
|
300
291
|
icon={rightIcon}
|
|
301
|
-
size={
|
|
292
|
+
size={20}
|
|
302
293
|
color={iconColors[variant][buttonState] as ForegroundColor}
|
|
303
294
|
className={isIconOnly ? '' : 'ml-1.5'}
|
|
304
295
|
/>
|
|
@@ -5,9 +5,10 @@ import { ViewProps } from 'react-native';
|
|
|
5
5
|
import DatePicker, { DatePickerProps } from 'react-native-date-picker';
|
|
6
6
|
import { CalendarIcon } from 'react-native-heroicons/outline';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { View, Pressable } from '../hoc-components';
|
|
9
9
|
import BaseIcon from './BaseIcon';
|
|
10
10
|
import BaseSpinner from './BaseSpinner';
|
|
11
|
+
import BaseText from './BaseText';
|
|
11
12
|
|
|
12
13
|
interface BaseDateInputProps extends Omit<DatePickerProps, 'open' | 'date' | 'onConfirm' | 'onCancel'> {
|
|
13
14
|
value?: Date | null;
|
|
@@ -91,8 +92,8 @@ export default function BaseDateInput({
|
|
|
91
92
|
className={clsx('flex flex-col', className)}
|
|
92
93
|
style={style}
|
|
93
94
|
>
|
|
94
|
-
{label && <
|
|
95
|
-
{description && <
|
|
95
|
+
{label && <BaseText className="mb-2 font-semibold text-secondary">{label}</BaseText>}
|
|
96
|
+
{description && <BaseText className="mb-2 text-tertiary">{description}</BaseText>}
|
|
96
97
|
<Pressable
|
|
97
98
|
onPress={() => {
|
|
98
99
|
if (!disabled) {
|
|
@@ -123,13 +124,13 @@ export default function BaseDateInput({
|
|
|
123
124
|
/>
|
|
124
125
|
)}
|
|
125
126
|
</View>
|
|
126
|
-
<
|
|
127
|
+
<BaseText className={clsx(
|
|
127
128
|
'flex-1',
|
|
128
129
|
formattedDate ? 'text-primary' : 'text-placeholder',
|
|
129
130
|
)}
|
|
130
131
|
>
|
|
131
132
|
{formattedDate || placeholder}
|
|
132
|
-
</
|
|
133
|
+
</BaseText>
|
|
133
134
|
</Pressable>
|
|
134
135
|
<DatePicker
|
|
135
136
|
{...props}
|
|
@@ -142,7 +143,7 @@ export default function BaseDateInput({
|
|
|
142
143
|
}}
|
|
143
144
|
/>
|
|
144
145
|
{touched && error && (
|
|
145
|
-
<
|
|
146
|
+
<BaseText className="text-error-primary">{error}</BaseText>
|
|
146
147
|
)}
|
|
147
148
|
</View>
|
|
148
149
|
);
|
|
@@ -3,14 +3,10 @@ import { styled } from 'nativewind';
|
|
|
3
3
|
import React, { useState } from 'react';
|
|
4
4
|
import { ViewProps } from 'react-native';
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
View,
|
|
8
|
-
Text,
|
|
9
|
-
ScrollView,
|
|
10
|
-
Pressable,
|
|
11
|
-
} from '../hoc-components';
|
|
6
|
+
import { View, ScrollView, Pressable } from '../hoc-components';
|
|
12
7
|
import BaseBadge from './BaseBadge';
|
|
13
8
|
import BaseSelect, { BaseSelectProps, SelectOption } from './BaseSelect';
|
|
9
|
+
import BaseText from './BaseText';
|
|
14
10
|
|
|
15
11
|
export type Variant = 'button-brand' | 'underline' | 'button-gray' | 'button-border' | 'button-minimal';
|
|
16
12
|
|
|
@@ -192,9 +188,9 @@ function BaseHorizontalTabs({
|
|
|
192
188
|
className={getTabStyles(tab.id === selectedTab)}
|
|
193
189
|
>
|
|
194
190
|
<View className="flex-row items-center space-x-2">
|
|
195
|
-
<
|
|
191
|
+
<BaseText className={getTextStyles(tab.id === selectedTab)}>
|
|
196
192
|
{tab.label}
|
|
197
|
-
</
|
|
193
|
+
</BaseText>
|
|
198
194
|
{(tab.badge || tab.badge === 0) && (
|
|
199
195
|
<BaseBadge
|
|
200
196
|
text={String(tab.badge)}
|
|
@@ -2,8 +2,9 @@ import { styled } from 'nativewind';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ViewProps } from 'react-native';
|
|
4
4
|
|
|
5
|
-
import { View
|
|
5
|
+
import { View } from '../hoc-components';
|
|
6
6
|
import BaseSelectionItem from './BaseSelectionItem';
|
|
7
|
+
import BaseText from './BaseText';
|
|
7
8
|
|
|
8
9
|
export interface RadioOption {
|
|
9
10
|
label?: string;
|
|
@@ -59,13 +60,13 @@ function BaseRadioGroup({
|
|
|
59
60
|
>
|
|
60
61
|
{option.children || (
|
|
61
62
|
<View className="ml-3 flex-1">
|
|
62
|
-
<
|
|
63
|
+
<BaseText className="text-base text-primary">{option.label}</BaseText>
|
|
63
64
|
</View>
|
|
64
65
|
)}
|
|
65
66
|
</BaseSelectionItem>
|
|
66
67
|
))}
|
|
67
68
|
{hasError && (
|
|
68
|
-
<
|
|
69
|
+
<BaseText className="mt-1.5 text-sm text-error-primary">{error}</BaseText>
|
|
69
70
|
)}
|
|
70
71
|
</View>
|
|
71
72
|
);
|