@grupalia/rn-ui-kit 0.0.4 → 0.1.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/BaseBadge.js +151 -0
- package/lib/commonjs/components/BaseBadge.js.map +1 -0
- package/lib/commonjs/components/BaseButton.js +96 -114
- package/lib/commonjs/components/BaseButton.js.map +1 -1
- package/lib/commonjs/components/BaseIcon.js +23 -0
- package/lib/commonjs/components/BaseIcon.js.map +1 -0
- package/lib/commonjs/components/BaseSpinner.js +21 -0
- package/lib/commonjs/components/BaseSpinner.js.map +1 -0
- package/lib/commonjs/components/BaseStackedList.js +108 -0
- package/lib/commonjs/components/BaseStackedList.js.map +1 -0
- package/lib/commonjs/components/index.js +28 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/hoc-components.js +40 -0
- package/lib/commonjs/hoc-components.js.map +1 -0
- package/lib/commonjs/preset.js +1 -1
- package/lib/commonjs/preset.js.map +1 -1
- package/lib/commonjs/styles/background-colors.js +27 -19
- package/lib/commonjs/styles/background-colors.js.map +1 -1
- package/lib/commonjs/styles/border-colors.js +9 -1
- package/lib/commonjs/styles/border-colors.js.map +1 -1
- package/lib/commonjs/styles/colors.js +42 -0
- package/lib/commonjs/styles/colors.js.map +1 -1
- package/lib/commonjs/styles/text-colors.js +32 -8
- package/lib/commonjs/styles/text-colors.js.map +1 -1
- package/lib/commonjs/styles/utility-colors.js +507 -0
- package/lib/commonjs/styles/utility-colors.js.map +1 -0
- package/lib/commonjs/types/heroicons.js +6 -0
- package/lib/commonjs/types/heroicons.js.map +1 -0
- package/lib/module/components/BaseBadge.js +146 -0
- package/lib/module/components/BaseBadge.js.map +1 -0
- package/lib/module/components/BaseButton.js +94 -112
- package/lib/module/components/BaseButton.js.map +1 -1
- package/lib/module/components/BaseIcon.js +19 -0
- package/lib/module/components/BaseIcon.js.map +1 -0
- package/lib/module/components/BaseSpinner.js +16 -0
- package/lib/module/components/BaseSpinner.js.map +1 -0
- package/lib/module/components/BaseStackedList.js +102 -0
- package/lib/module/components/BaseStackedList.js.map +1 -0
- package/lib/module/components/index.js +4 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/hoc-components.js +37 -0
- package/lib/module/hoc-components.js.map +1 -0
- package/lib/module/preset.js +1 -1
- package/lib/module/preset.js.map +1 -1
- package/lib/module/styles/background-colors.js +27 -19
- package/lib/module/styles/background-colors.js.map +1 -1
- package/lib/module/styles/border-colors.js +9 -1
- package/lib/module/styles/border-colors.js.map +1 -1
- package/lib/module/styles/colors.js +42 -0
- package/lib/module/styles/colors.js.map +1 -1
- package/lib/module/styles/text-colors.js +32 -8
- package/lib/module/styles/text-colors.js.map +1 -1
- package/lib/module/styles/utility-colors.js +502 -0
- package/lib/module/styles/utility-colors.js.map +1 -0
- package/lib/module/types/heroicons.js +4 -0
- package/lib/module/types/heroicons.js.map +1 -0
- package/lib/typescript/commonjs/components/BaseBadge.d.ts +22 -0
- package/lib/typescript/commonjs/components/BaseBadge.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/BaseButton.d.ts +12 -5
- package/lib/typescript/commonjs/components/BaseButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/BaseIcon.d.ts +15 -0
- package/lib/typescript/commonjs/components/BaseIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/BaseSpinner.d.ts +8 -0
- package/lib/typescript/commonjs/components/BaseSpinner.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/BaseStackedList.d.ts +23 -0
- package/lib/typescript/commonjs/components/BaseStackedList.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/index.d.ts +4 -0
- package/lib/typescript/commonjs/components/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/hoc-components.d.ts +139 -0
- package/lib/typescript/commonjs/hoc-components.d.ts.map +1 -0
- package/lib/typescript/commonjs/preset.d.ts.map +1 -1
- package/lib/typescript/commonjs/styles/background-colors.d.ts +8 -126
- package/lib/typescript/commonjs/styles/background-colors.d.ts.map +1 -1
- package/lib/typescript/commonjs/styles/border-colors.d.ts +8 -42
- package/lib/typescript/commonjs/styles/border-colors.d.ts.map +1 -1
- package/lib/typescript/commonjs/styles/colors.d.ts +42 -0
- package/lib/typescript/commonjs/styles/colors.d.ts.map +1 -1
- package/lib/typescript/commonjs/styles/text-colors.d.ts +8 -90
- package/lib/typescript/commonjs/styles/text-colors.d.ts.map +1 -1
- package/lib/typescript/commonjs/styles/utility-colors.d.ts +500 -0
- package/lib/typescript/commonjs/styles/utility-colors.d.ts.map +1 -0
- package/lib/typescript/commonjs/types/heroicons.d.ts +10 -0
- package/lib/typescript/commonjs/types/heroicons.d.ts.map +1 -0
- package/lib/typescript/module/components/BaseBadge.d.ts +22 -0
- package/lib/typescript/module/components/BaseBadge.d.ts.map +1 -0
- package/lib/typescript/module/components/BaseButton.d.ts +12 -5
- package/lib/typescript/module/components/BaseButton.d.ts.map +1 -1
- package/lib/typescript/module/components/BaseIcon.d.ts +15 -0
- package/lib/typescript/module/components/BaseIcon.d.ts.map +1 -0
- package/lib/typescript/module/components/BaseSpinner.d.ts +8 -0
- package/lib/typescript/module/components/BaseSpinner.d.ts.map +1 -0
- package/lib/typescript/module/components/BaseStackedList.d.ts +23 -0
- package/lib/typescript/module/components/BaseStackedList.d.ts.map +1 -0
- package/lib/typescript/module/components/index.d.ts +4 -0
- package/lib/typescript/module/components/index.d.ts.map +1 -1
- package/lib/typescript/module/hoc-components.d.ts +139 -0
- package/lib/typescript/module/hoc-components.d.ts.map +1 -0
- package/lib/typescript/module/preset.d.ts.map +1 -1
- package/lib/typescript/module/styles/background-colors.d.ts +8 -126
- package/lib/typescript/module/styles/background-colors.d.ts.map +1 -1
- package/lib/typescript/module/styles/border-colors.d.ts +8 -42
- package/lib/typescript/module/styles/border-colors.d.ts.map +1 -1
- package/lib/typescript/module/styles/colors.d.ts +42 -0
- package/lib/typescript/module/styles/colors.d.ts.map +1 -1
- package/lib/typescript/module/styles/text-colors.d.ts +8 -90
- package/lib/typescript/module/styles/text-colors.d.ts.map +1 -1
- package/lib/typescript/module/styles/utility-colors.d.ts +500 -0
- package/lib/typescript/module/styles/utility-colors.d.ts.map +1 -0
- package/lib/typescript/module/types/heroicons.d.ts +10 -0
- package/lib/typescript/module/types/heroicons.d.ts.map +1 -0
- package/package.json +12 -6
- package/src/components/BaseBadge.tsx +193 -0
- package/src/components/BaseButton.tsx +288 -0
- package/src/components/BaseIcon.tsx +27 -0
- package/src/components/BaseSpinner.tsx +18 -0
- package/src/components/BaseStackedList.tsx +137 -0
- package/src/components/index.ts +5 -0
- package/src/preset.cjs +1 -1
- package/src/preset.ts +3 -1
- package/src/styles/background-colors.ts +38 -19
- package/src/styles/border-colors.ts +20 -1
- package/src/styles/colors.ts +42 -0
- package/src/styles/text-colors.ts +43 -8
- package/src/styles/utility-colors.ts +500 -0
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
8
|
+
var _nativewind = require("nativewind");
|
|
9
|
+
var _hocComponents = require("../hoc-components");
|
|
10
|
+
var _BaseIcon = _interopRequireDefault(require("./BaseIcon"));
|
|
11
|
+
var _utilityColors = _interopRequireDefault(require("../styles/utility-colors"));
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
function BaseBadge({
|
|
15
|
+
variant = 'gray',
|
|
16
|
+
size = 'md',
|
|
17
|
+
text,
|
|
18
|
+
transparent = false,
|
|
19
|
+
squared = false,
|
|
20
|
+
LeftIcon = null,
|
|
21
|
+
RightIcon = null,
|
|
22
|
+
...props
|
|
23
|
+
}) {
|
|
24
|
+
const variantStyles = {
|
|
25
|
+
gray: {
|
|
26
|
+
bg: 'bg-utility-gray-50',
|
|
27
|
+
text: 'text-utility-gray-700',
|
|
28
|
+
border: 'border-utility-gray-200'
|
|
29
|
+
},
|
|
30
|
+
brand: {
|
|
31
|
+
bg: 'bg-utility-brand-50',
|
|
32
|
+
text: 'text-utility-brand-700',
|
|
33
|
+
border: 'border-utility-brand-200'
|
|
34
|
+
},
|
|
35
|
+
error: {
|
|
36
|
+
bg: 'bg-utility-error-50',
|
|
37
|
+
text: 'text-utility-error-700',
|
|
38
|
+
border: 'border-utility-error-200'
|
|
39
|
+
},
|
|
40
|
+
warning: {
|
|
41
|
+
bg: 'bg-utility-warning-50',
|
|
42
|
+
text: 'text-utility-warning-700',
|
|
43
|
+
border: 'border-utility-warning-200'
|
|
44
|
+
},
|
|
45
|
+
success: {
|
|
46
|
+
bg: 'bg-utility-success-50',
|
|
47
|
+
text: 'text-utility-success-700',
|
|
48
|
+
border: 'border-utility-success-200'
|
|
49
|
+
},
|
|
50
|
+
blue_gray: {
|
|
51
|
+
bg: 'bg-utility-gray_blue-50',
|
|
52
|
+
text: 'text-utility-gray_blue-700',
|
|
53
|
+
border: 'border-utility-gray_blue-200'
|
|
54
|
+
},
|
|
55
|
+
blue_light: {
|
|
56
|
+
bg: 'bg-utility-blue_light-50',
|
|
57
|
+
text: 'text-utility-blue_light-700',
|
|
58
|
+
border: 'border-utility-blue_light-200'
|
|
59
|
+
},
|
|
60
|
+
blue: {
|
|
61
|
+
bg: 'bg-utility-blue-50',
|
|
62
|
+
text: 'text-utility-blue-700',
|
|
63
|
+
border: 'border-utility-blue-200'
|
|
64
|
+
},
|
|
65
|
+
indigo: {
|
|
66
|
+
bg: 'bg-utility-indigo-50',
|
|
67
|
+
text: 'text-utility-indigo-700',
|
|
68
|
+
border: 'border-utility-indigo-200'
|
|
69
|
+
},
|
|
70
|
+
purple: {
|
|
71
|
+
bg: 'bg-utility-purple-50',
|
|
72
|
+
text: 'text-utility-purple-700',
|
|
73
|
+
border: 'border-utility-purple-200'
|
|
74
|
+
},
|
|
75
|
+
pink: {
|
|
76
|
+
bg: 'bg-utility-pink-50',
|
|
77
|
+
text: 'text-utility-pink-700',
|
|
78
|
+
border: 'border-utility-pink-200'
|
|
79
|
+
},
|
|
80
|
+
orange: {
|
|
81
|
+
bg: 'bg-utility-orange-50',
|
|
82
|
+
text: 'text-utility-orange-700',
|
|
83
|
+
border: 'border-utility-orange-200'
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
const sizeStyles = {
|
|
87
|
+
sm: {
|
|
88
|
+
container: 'px-1.5 py-0.5',
|
|
89
|
+
text: 'text-xs'
|
|
90
|
+
},
|
|
91
|
+
md: {
|
|
92
|
+
container: 'px-2.5 py-0.5',
|
|
93
|
+
text: 'text-sm'
|
|
94
|
+
},
|
|
95
|
+
lg: {
|
|
96
|
+
container: 'px-3 py-1',
|
|
97
|
+
text: 'text-base'
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
const iconSizes = {
|
|
101
|
+
sm: 12,
|
|
102
|
+
md: 14,
|
|
103
|
+
lg: 16
|
|
104
|
+
};
|
|
105
|
+
const containerStyles = (0, _clsx.default)('flex-row items-center justify-center border', squared ? 'rounded-md' : 'rounded-full', transparent ? 'bg-transparent' : variantStyles[variant].bg, transparent ? 'border-primary' : variantStyles[variant].border, sizeStyles[size].container);
|
|
106
|
+
const textStyles = (0, _clsx.default)('font-medium', variantStyles[variant].text, sizeStyles[size].text);
|
|
107
|
+
const iconSpacingStyles = {
|
|
108
|
+
left: 'mr-1.5',
|
|
109
|
+
right: 'ml-1.5'
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
// @TODO handle dark mode
|
|
113
|
+
const iconColors = {
|
|
114
|
+
gray: _utilityColors.default['gray-500'].light,
|
|
115
|
+
brand: _utilityColors.default['brand-500'].light,
|
|
116
|
+
error: _utilityColors.default['error-500'].light,
|
|
117
|
+
warning: _utilityColors.default['warning-500'].light,
|
|
118
|
+
success: _utilityColors.default['success-500'].light,
|
|
119
|
+
blue_gray: _utilityColors.default['gray_blue-500'].light,
|
|
120
|
+
blue_light: _utilityColors.default['blue_light-500'].light,
|
|
121
|
+
blue: _utilityColors.default['blue-500'].light,
|
|
122
|
+
indigo: _utilityColors.default['indigo-500'].light,
|
|
123
|
+
purple: _utilityColors.default['purple-500'].light,
|
|
124
|
+
pink: _utilityColors.default['pink-500'].light,
|
|
125
|
+
orange: _utilityColors.default['orange-500'].light
|
|
126
|
+
};
|
|
127
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_hocComponents.View, {
|
|
128
|
+
className: containerStyles,
|
|
129
|
+
...props,
|
|
130
|
+
children: [LeftIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_hocComponents.View, {
|
|
131
|
+
className: iconSpacingStyles.left,
|
|
132
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_BaseIcon.default, {
|
|
133
|
+
icon: LeftIcon,
|
|
134
|
+
size: iconSizes[size],
|
|
135
|
+
color: iconColors[variant]
|
|
136
|
+
})
|
|
137
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_hocComponents.Text, {
|
|
138
|
+
className: textStyles,
|
|
139
|
+
children: text
|
|
140
|
+
}), RightIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_hocComponents.View, {
|
|
141
|
+
className: iconSpacingStyles.right,
|
|
142
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_BaseIcon.default, {
|
|
143
|
+
icon: RightIcon,
|
|
144
|
+
size: iconSizes[size],
|
|
145
|
+
color: iconColors[variant]
|
|
146
|
+
})
|
|
147
|
+
})]
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
var _default = exports.default = (0, _nativewind.styled)(BaseBadge);
|
|
151
|
+
//# sourceMappingURL=BaseBadge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_nativewind","_hocComponents","_BaseIcon","_utilityColors","_jsxRuntime","e","__esModule","default","BaseBadge","variant","size","text","transparent","squared","LeftIcon","RightIcon","props","variantStyles","gray","bg","border","brand","error","warning","success","blue_gray","blue_light","blue","indigo","purple","pink","orange","sizeStyles","sm","container","md","lg","iconSizes","containerStyles","clsx","textStyles","iconSpacingStyles","left","right","iconColors","utilityColors","light","jsxs","View","className","children","jsx","icon","color","Text","_default","exports","styled"],"sourceRoot":"../../../src","sources":["components/BaseBadge.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAGA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,cAAA,GAAAL,sBAAA,CAAAC,OAAA;AAAqD,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAD,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AA6BrD,SAASG,SAASA,CAAC;EACjBC,OAAO,GAAG,MAAM;EAChBC,IAAI,GAAG,IAAI;EACXC,IAAI;EACJC,WAAW,GAAG,KAAK;EACnBC,OAAO,GAAG,KAAK;EACfC,QAAQ,GAAG,IAAI;EACfC,SAAS,GAAG,IAAI;EAChB,GAAGC;AACW,CAAC,EAAE;EACjB,MAAMC,aAAa,GAAG;IACpBC,IAAI,EAAE;MACJC,EAAE,EAAE,oBAAoB;MACxBR,IAAI,EAAE,uBAAuB;MAC7BS,MAAM,EAAE;IACV,CAAC;IACDC,KAAK,EAAE;MACLF,EAAE,EAAE,qBAAqB;MACzBR,IAAI,EAAE,wBAAwB;MAC9BS,MAAM,EAAE;IACV,CAAC;IACDE,KAAK,EAAE;MACLH,EAAE,EAAE,qBAAqB;MACzBR,IAAI,EAAE,wBAAwB;MAC9BS,MAAM,EAAE;IACV,CAAC;IACDG,OAAO,EAAE;MACPJ,EAAE,EAAE,uBAAuB;MAC3BR,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.default = void 0;
|
|
7
7
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
8
|
+
var _nativewind = require("nativewind");
|
|
8
9
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var
|
|
10
|
+
var _hocComponents = require("../hoc-components");
|
|
11
|
+
var _BaseIcon = _interopRequireDefault(require("./BaseIcon"));
|
|
12
|
+
var _textColors = _interopRequireDefault(require("../styles/text-colors"));
|
|
10
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
15
|
function BaseButton({
|
|
@@ -15,6 +18,7 @@ function BaseButton({
|
|
|
15
18
|
text = '',
|
|
16
19
|
loading = false,
|
|
17
20
|
disabled = false,
|
|
21
|
+
destructive = false,
|
|
18
22
|
LeftIcon = null,
|
|
19
23
|
RightIcon = null,
|
|
20
24
|
hitSlop = 6,
|
|
@@ -23,7 +27,6 @@ function BaseButton({
|
|
|
23
27
|
}) {
|
|
24
28
|
const [timer, setTimer] = _react.default.useState(countdownSecs);
|
|
25
29
|
const [isDisabled, setIsDisabled] = _react.default.useState(disabled || countdownSecs > 0);
|
|
26
|
-
const [isFocused, setIsFocused] = _react.default.useState(false);
|
|
27
30
|
_react.default.useEffect(() => {
|
|
28
31
|
let intervalId;
|
|
29
32
|
if (countdownSecs > 0) {
|
|
@@ -47,145 +50,123 @@ function BaseButton({
|
|
|
47
50
|
};
|
|
48
51
|
}, [countdownSecs, disabled]);
|
|
49
52
|
const sizeClasses = {
|
|
50
|
-
xs: '
|
|
51
|
-
sm: '
|
|
52
|
-
md: '
|
|
53
|
-
lg: '
|
|
54
|
-
xl: '
|
|
53
|
+
xs: 'rounded-md h-7',
|
|
54
|
+
sm: 'rounded-md h-8',
|
|
55
|
+
md: 'rounded-lg h-9',
|
|
56
|
+
lg: 'rounded-lg h-10',
|
|
57
|
+
xl: 'rounded-lg h-11'
|
|
55
58
|
};
|
|
56
59
|
const iconOnlyClasses = {
|
|
57
|
-
xs: '
|
|
58
|
-
sm: '
|
|
59
|
-
md: '
|
|
60
|
-
lg: '
|
|
61
|
-
xl: '
|
|
60
|
+
xs: 'rounded-md h-8 w-8',
|
|
61
|
+
sm: 'rounded-md h-9 w-9',
|
|
62
|
+
md: 'rounded-lg h-10 w-10',
|
|
63
|
+
lg: 'rounded-lg h-11 w-11',
|
|
64
|
+
xl: 'rounded-lg h-12 w-12'
|
|
62
65
|
};
|
|
63
|
-
const
|
|
66
|
+
const containerClasses = {
|
|
64
67
|
primary: {
|
|
65
|
-
default: 'bg-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
disabled: 'bg-disabled',
|
|
69
|
-
loading: 'bg-brand_solid_hover'
|
|
68
|
+
default: destructive ? 'bg-error-solid' : 'bg-brand-solid',
|
|
69
|
+
disabled: 'bg-disabled border border-disabled_subtle',
|
|
70
|
+
loading: destructive ? 'bg-error-solid' : 'bg-brand-solid_hover'
|
|
70
71
|
},
|
|
71
72
|
secondary: {
|
|
72
|
-
default: 'bg-primary border border-primary',
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
disabled: 'bg-primary border border-disabled',
|
|
76
|
-
loading: 'bg-primary_hover border border-primary'
|
|
73
|
+
default: destructive ? 'bg-primary border border-error_subtle' : 'bg-primary border border-primary',
|
|
74
|
+
disabled: 'bg-primary border border-disabled_subtle',
|
|
75
|
+
loading: destructive ? 'bg-error-primary border border-error_subtle' : 'bg-primary_hover border border-primary'
|
|
77
76
|
},
|
|
78
77
|
tertiary: {
|
|
79
78
|
default: 'bg-transparent',
|
|
80
|
-
hover: 'bg-primary_hover',
|
|
81
|
-
focused: 'bg-transparent',
|
|
82
79
|
disabled: 'bg-transparent',
|
|
83
|
-
loading: 'bg-primary_hover'
|
|
80
|
+
loading: destructive ? 'bg-error-primary' : 'bg-primary_hover'
|
|
84
81
|
},
|
|
85
82
|
'link-color': {
|
|
86
83
|
default: 'bg-transparent',
|
|
87
|
-
hover: 'bg-transparent',
|
|
88
|
-
focused: 'bg-transparent',
|
|
89
84
|
disabled: 'bg-transparent',
|
|
90
85
|
loading: 'bg-transparent'
|
|
91
86
|
},
|
|
92
87
|
'link-gray': {
|
|
93
88
|
default: 'bg-transparent',
|
|
94
|
-
hover: 'bg-transparent',
|
|
95
|
-
focused: 'bg-transparent',
|
|
96
89
|
disabled: 'bg-transparent',
|
|
97
90
|
loading: 'bg-transparent'
|
|
98
|
-
},
|
|
99
|
-
destructive: {
|
|
100
|
-
default: 'bg-error',
|
|
101
|
-
hover: 'bg-error',
|
|
102
|
-
focused: 'bg-error',
|
|
103
|
-
disabled: 'bg-disabled',
|
|
104
|
-
loading: 'bg-error'
|
|
105
91
|
}
|
|
106
92
|
};
|
|
107
93
|
const textColorClasses = {
|
|
108
94
|
primary: {
|
|
109
95
|
default: 'text-white',
|
|
110
|
-
hover: 'text-white',
|
|
111
|
-
focused: 'text-white',
|
|
112
96
|
disabled: 'text-disabled',
|
|
113
97
|
loading: 'text-white'
|
|
114
98
|
},
|
|
115
99
|
secondary: {
|
|
116
|
-
default: 'text-secondary',
|
|
117
|
-
hover: 'text-secondary_hover',
|
|
118
|
-
focused: 'text-secondary',
|
|
100
|
+
default: destructive ? 'text-error' : 'text-secondary',
|
|
119
101
|
disabled: 'text-disabled',
|
|
120
|
-
loading: 'text-
|
|
102
|
+
loading: destructive ? 'text-error-primary' : 'text-secondary'
|
|
121
103
|
},
|
|
122
104
|
tertiary: {
|
|
123
|
-
default: 'text-tertiary',
|
|
124
|
-
hover: 'text-tertiary_hover',
|
|
125
|
-
focused: 'text-tertiary',
|
|
105
|
+
default: destructive ? 'text-error' : 'text-tertiary',
|
|
126
106
|
disabled: 'text-disabled',
|
|
127
|
-
loading: 'text-
|
|
107
|
+
loading: destructive ? 'text-error-primary' : 'text-tertiary'
|
|
128
108
|
},
|
|
129
109
|
'link-color': {
|
|
130
|
-
default: 'text-brand-tertiary',
|
|
131
|
-
hover: 'text-brand-secondary',
|
|
132
|
-
focused: 'text-brand-tertiary',
|
|
110
|
+
default: destructive ? 'text-error' : 'text-brand-tertiary',
|
|
133
111
|
disabled: 'text-disabled',
|
|
134
|
-
loading: 'text-brand-tertiary'
|
|
112
|
+
loading: destructive ? 'text-error' : 'text-brand-tertiary'
|
|
135
113
|
},
|
|
136
114
|
'link-gray': {
|
|
137
|
-
default: 'text-tertiary',
|
|
138
|
-
hover: 'text-tertiary_hover',
|
|
139
|
-
focused: 'text-tertiary',
|
|
140
|
-
disabled: 'text-disabled',
|
|
141
|
-
loading: 'text-tertiary'
|
|
142
|
-
},
|
|
143
|
-
destructive: {
|
|
144
|
-
default: 'text-white',
|
|
145
|
-
hover: 'text-white',
|
|
146
|
-
focused: 'text-white',
|
|
115
|
+
default: destructive ? 'text-error' : 'text-tertiary',
|
|
147
116
|
disabled: 'text-disabled',
|
|
148
|
-
loading: 'text-
|
|
117
|
+
loading: destructive ? 'text-error' : 'text-tertiary'
|
|
149
118
|
}
|
|
150
119
|
};
|
|
151
|
-
|
|
152
|
-
// Focus effects
|
|
153
|
-
const focusClasses = {
|
|
154
|
-
primary: 'shadow-focus-brand',
|
|
155
|
-
secondary: 'shadow-focus-brand',
|
|
156
|
-
tertiary: 'shadow-focus-brand',
|
|
157
|
-
'link-color': 'shadow-focus-brand',
|
|
158
|
-
'link-gray': 'shadow-focus-brand',
|
|
159
|
-
destructive: 'shadow-focus-error'
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
// Text size classes based on button size
|
|
163
120
|
const textSizeClasses = {
|
|
164
121
|
xs: 'text-xs',
|
|
165
122
|
sm: 'text-sm',
|
|
166
|
-
md: 'text-
|
|
167
|
-
lg: 'text-
|
|
168
|
-
xl: 'text-
|
|
123
|
+
md: 'text-sm',
|
|
124
|
+
lg: 'text-sm',
|
|
125
|
+
xl: 'text-base'
|
|
126
|
+
};
|
|
127
|
+
const iconSizes = {
|
|
128
|
+
xs: 16,
|
|
129
|
+
sm: 18,
|
|
130
|
+
md: 20,
|
|
131
|
+
lg: 22,
|
|
132
|
+
xl: 24
|
|
169
133
|
};
|
|
170
|
-
|
|
171
|
-
// Determine state for styling (default, hover, focused, disabled, loading)
|
|
172
134
|
let buttonState = 'default';
|
|
173
135
|
if (loading) {
|
|
174
136
|
buttonState = 'loading';
|
|
175
137
|
} else if (isDisabled) {
|
|
176
138
|
buttonState = 'disabled';
|
|
177
|
-
} else if (isFocused) {
|
|
178
|
-
buttonState = 'focused';
|
|
179
139
|
}
|
|
180
|
-
|
|
181
|
-
// Determine if it's an icon-only button (no text and has icon)
|
|
182
140
|
const isIconOnly = !text && (LeftIcon || RightIcon);
|
|
183
|
-
const buttonStyles = (0, _clsx.default)('flex-row items-center justify-center', isIconOnly ? iconOnlyClasses[size] : sizeClasses[size],
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
141
|
+
const buttonStyles = (0, _clsx.default)('flex flex-row items-center justify-center', isIconOnly ? iconOnlyClasses[size] : (0, _clsx.default)('w-full', sizeClasses[size]), containerClasses[variant][buttonState]);
|
|
142
|
+
const textStyles = (0, _clsx.default)('font-medium', textSizeClasses[size], textColorClasses[variant][buttonState]);
|
|
143
|
+
const iconColors = {
|
|
144
|
+
primary: {
|
|
145
|
+
default: _textColors.default['text-primary'].light,
|
|
146
|
+
disabled: _textColors.default['text-disabled'].light,
|
|
147
|
+
loading: _textColors.default['text-primary'].light
|
|
148
|
+
},
|
|
149
|
+
secondary: {
|
|
150
|
+
default: _textColors.default['text-secondary'].light,
|
|
151
|
+
disabled: _textColors.default['text-disabled'].light,
|
|
152
|
+
loading: _textColors.default['text-secondary'].light
|
|
153
|
+
},
|
|
154
|
+
tertiary: {
|
|
155
|
+
default: _textColors.default['text-tertiary'].light,
|
|
156
|
+
disabled: _textColors.default['text-disabled'].light,
|
|
157
|
+
loading: _textColors.default['text-tertiary'].light
|
|
158
|
+
},
|
|
159
|
+
'link-color': {
|
|
160
|
+
default: _textColors.default['text-brand-tertiary'].light,
|
|
161
|
+
disabled: _textColors.default['text-disabled'].light,
|
|
162
|
+
loading: _textColors.default['text-brand-tertiary'].light
|
|
163
|
+
},
|
|
164
|
+
'link-gray': {
|
|
165
|
+
default: _textColors.default['text-tertiary'].light,
|
|
166
|
+
disabled: _textColors.default['text-disabled'].light,
|
|
167
|
+
loading: _textColors.default['text-tertiary'].light
|
|
168
|
+
}
|
|
169
|
+
};
|
|
189
170
|
const spinnerColorMap = {
|
|
190
171
|
primary: {
|
|
191
172
|
default: '#fff',
|
|
@@ -194,38 +175,30 @@ function BaseButton({
|
|
|
194
175
|
loading: '#fff'
|
|
195
176
|
},
|
|
196
177
|
secondary: {
|
|
197
|
-
default: '#667085',
|
|
178
|
+
default: destructive ? '#F04438' : '#667085',
|
|
198
179
|
disabled: '#9AA4B2',
|
|
199
180
|
// text-disabled color
|
|
200
|
-
loading: '#667085'
|
|
181
|
+
loading: destructive ? '#F04438' : '#667085'
|
|
201
182
|
},
|
|
202
183
|
tertiary: {
|
|
203
|
-
default: '#667085',
|
|
184
|
+
default: destructive ? '#F04438' : '#667085',
|
|
204
185
|
disabled: '#9AA4B2',
|
|
205
186
|
// text-disabled color
|
|
206
|
-
loading: '#667085'
|
|
187
|
+
loading: destructive ? '#F04438' : '#667085'
|
|
207
188
|
},
|
|
208
189
|
'link-color': {
|
|
209
|
-
default: '#7F56D9',
|
|
190
|
+
default: destructive ? '#F04438' : '#7F56D9',
|
|
210
191
|
disabled: '#9AA4B2',
|
|
211
192
|
// text-disabled color
|
|
212
|
-
loading: '#7F56D9'
|
|
193
|
+
loading: destructive ? '#F04438' : '#7F56D9'
|
|
213
194
|
},
|
|
214
195
|
'link-gray': {
|
|
215
|
-
default: '#667085',
|
|
196
|
+
default: destructive ? '#F04438' : '#667085',
|
|
216
197
|
disabled: '#9AA4B2',
|
|
217
198
|
// text-disabled color
|
|
218
|
-
loading: '#667085'
|
|
219
|
-
},
|
|
220
|
-
destructive: {
|
|
221
|
-
default: '#fff',
|
|
222
|
-
disabled: '#9AA4B2',
|
|
223
|
-
// text-disabled color
|
|
224
|
-
loading: '#fff'
|
|
199
|
+
loading: destructive ? '#F04438' : '#667085'
|
|
225
200
|
}
|
|
226
201
|
};
|
|
227
|
-
|
|
228
|
-
// Determine current spinner color based on variant and button state
|
|
229
202
|
let spinnerColor = '#fff';
|
|
230
203
|
if (buttonState === 'disabled') {
|
|
231
204
|
spinnerColor = spinnerColorMap[variant].disabled;
|
|
@@ -234,20 +207,28 @@ function BaseButton({
|
|
|
234
207
|
} else {
|
|
235
208
|
spinnerColor = spinnerColorMap[variant].default;
|
|
236
209
|
}
|
|
237
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(
|
|
210
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_hocComponents.Pressable, {
|
|
238
211
|
disabled: isDisabled || loading,
|
|
239
212
|
className: buttonStyles,
|
|
240
213
|
hitSlop: hitSlop,
|
|
241
|
-
onFocus: () => setIsFocused(true),
|
|
242
|
-
onBlur: () => setIsFocused(false),
|
|
243
214
|
...props,
|
|
244
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(
|
|
245
|
-
className: (0, _clsx.default)('flex flex-row items-center justify-center
|
|
246
|
-
children: [LeftIcon
|
|
215
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_hocComponents.View, {
|
|
216
|
+
className: (0, _clsx.default)('flex flex-row items-center justify-center', loading && 'opacity-0'),
|
|
217
|
+
children: [LeftIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_BaseIcon.default, {
|
|
218
|
+
icon: LeftIcon,
|
|
219
|
+
size: iconSizes[size],
|
|
220
|
+
color: iconColors[variant][buttonState],
|
|
221
|
+
className: "mr-1.5"
|
|
222
|
+
}), text && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_hocComponents.Text, {
|
|
247
223
|
className: textStyles,
|
|
248
224
|
children: [text, timer > 0 ? ` (${timer})` : '']
|
|
249
|
-
}), RightIcon
|
|
250
|
-
|
|
225
|
+
}), RightIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_BaseIcon.default, {
|
|
226
|
+
icon: RightIcon,
|
|
227
|
+
size: iconSizes[size],
|
|
228
|
+
color: iconColors[variant][buttonState],
|
|
229
|
+
className: "ml-1.5"
|
|
230
|
+
})]
|
|
231
|
+
}), loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(_hocComponents.ActivityIndicator, {
|
|
251
232
|
size: "small",
|
|
252
233
|
color: spinnerColor,
|
|
253
234
|
style: {
|
|
@@ -262,4 +243,5 @@ function BaseButton({
|
|
|
262
243
|
})]
|
|
263
244
|
});
|
|
264
245
|
}
|
|
246
|
+
var _default = exports.default = (0, _nativewind.styled)(BaseButton);
|
|
265
247
|
//# sourceMappingURL=BaseButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_react","
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_nativewind","_react","_hocComponents","_BaseIcon","_textColors","_jsxRuntime","e","__esModule","default","BaseButton","variant","size","text","loading","disabled","destructive","LeftIcon","RightIcon","hitSlop","countdownSecs","props","timer","setTimer","React","useState","isDisabled","setIsDisabled","useEffect","intervalId","setInterval","prevTimer","clearInterval","Boolean","sizeClasses","xs","sm","md","lg","xl","iconOnlyClasses","containerClasses","primary","secondary","tertiary","textColorClasses","textSizeClasses","iconSizes","buttonState","isIconOnly","buttonStyles","clsx","textStyles","iconColors","textColors","light","spinnerColorMap","spinnerColor","jsxs","Pressable","className","children","View","jsx","icon","color","Text","ActivityIndicator","style","position","top","left","right","bottom","justifyContent","alignItems","_default","exports","styled"],"sourceRoot":"../../../src","sources":["components/BaseButton.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAH,sBAAA,CAAAC,OAAA;AAGA,IAAAG,cAAA,GAAAH,OAAA;AA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AAR,WAAA,CAAAyD,GAAA,EAAC5D,cAAA,CAAAgE,iBAAiB;MAChBvD,IAAI,EAAC,OAAO;MACZqD,KAAK,EAAER,YAAa;MACpBW,KAAK,EAAE;QACLC,QAAQ,EAAE,UAAU;QACpBC,GAAG,EAAE,CAAC;QACNC,IAAI,EAAE,CAAC;QACPC,KAAK,EAAE,CAAC;QACRC,MAAM,EAAE,CAAC;QACTC,cAAc,EAAE,QAAQ;QACxBC,UAAU,EAAE;MACd;IAAE,CACH,CACF;EAAA,CACQ,CAAC;AAEhB;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAApE,OAAA,GAEc,IAAAqE,kBAAM,EAACpE,UAAU,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _nativewind = require("nativewind");
|
|
8
|
+
var _hocComponents = require("../hoc-components");
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
function BaseIcon({
|
|
11
|
+
icon: Icon,
|
|
12
|
+
size = 20,
|
|
13
|
+
color
|
|
14
|
+
}) {
|
|
15
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_hocComponents.View, {
|
|
16
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Icon, {
|
|
17
|
+
size: size,
|
|
18
|
+
color: color
|
|
19
|
+
})
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
var _default = exports.default = (0, _nativewind.styled)(BaseIcon);
|
|
23
|
+
//# sourceMappingURL=BaseIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_nativewind","require","_hocComponents","_jsxRuntime","BaseIcon","icon","Icon","size","color","jsx","View","children","_default","exports","default","styled"],"sourceRoot":"../../../src","sources":["components/BaseIcon.tsx"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAD,OAAA;AAAyC,IAAAE,WAAA,GAAAF,OAAA;AASzC,SAASG,QAAQA,CAAC;EAChBC,IAAI,EAAEC,IAAI;EACVC,IAAI,GAAG,EAAE;EACTC;AACa,CAAC,EAAE;EAChB,oBACE,IAAAL,WAAA,CAAAM,GAAA,EAACP,cAAA,CAAAQ,IAAI;IAAAC,QAAA,eACH,IAAAR,WAAA,CAAAM,GAAA,EAACH,IAAI;MACHC,IAAI,EAAEA,IAAK;MACXC,KAAK,EAAEA;IAAM,CACd;EAAC,CACE,CAAC;AAEX;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc,IAAAC,kBAAM,EAACX,QAAQ,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = BaseSpinner;
|
|
7
|
+
var _hocComponents = require("../hoc-components");
|
|
8
|
+
var _colors = _interopRequireDefault(require("../styles/colors"));
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
function BaseSpinner({
|
|
12
|
+
size = 'large',
|
|
13
|
+
...props
|
|
14
|
+
}) {
|
|
15
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_hocComponents.ActivityIndicator, {
|
|
16
|
+
size: size,
|
|
17
|
+
color: _colors.default.brand[600],
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=BaseSpinner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_hocComponents","require","_colors","_interopRequireDefault","_jsxRuntime","e","__esModule","default","BaseSpinner","size","props","jsx","ActivityIndicator","color","colors","brand"],"sourceRoot":"../../../src","sources":["components/BaseSpinner.tsx"],"mappings":";;;;;;AAEA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAsC,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAE,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAMvB,SAASG,WAAWA,CAAC;EAAEC,IAAI,GAAG,OAAO;EAAE,GAAGC;AAAwB,CAAC,EAAE;EAClF,oBACE,IAAAN,WAAA,CAAAO,GAAA,EAACX,cAAA,CAAAY,iBAAiB;IAChBH,IAAI,EAAEA,IAAK;IACXI,KAAK,EAAEC,eAAM,CAACC,KAAK,CAAC,GAAG,CAAE;IAAA,GACrBL;EAAK,CACV,CAAC;AAEN","ignoreList":[]}
|