@grupalia/rn-ui-kit 0.122.0 → 0.124.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/PressableOpacity.js +5 -0
- package/lib/commonjs/components/PressableOpacity.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/styles/border-colors.js +14 -2
- package/lib/commonjs/styles/border-colors.js.map +1 -1
- package/lib/commonjs/types/requireAtLeastOne.js +2 -0
- package/lib/commonjs/types/requireAtLeastOne.js.map +1 -0
- package/lib/module/components/PressableOpacity.js +5 -0
- package/lib/module/components/PressableOpacity.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/styles/border-colors.js +14 -2
- package/lib/module/styles/border-colors.js.map +1 -1
- package/lib/module/types/requireAtLeastOne.js +2 -0
- package/lib/module/types/requireAtLeastOne.js.map +1 -0
- package/lib/typescript/commonjs/components/BackButton.d.ts +2 -12
- package/lib/typescript/commonjs/components/BackButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/BaseButton.d.ts +309 -4
- package/lib/typescript/commonjs/components/BaseButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/MenuBottomSheetModal.d.ts +2 -2
- package/lib/typescript/commonjs/components/MenuBottomSheetModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/PressableOpacity.d.ts +57 -4
- package/lib/typescript/commonjs/components/PressableOpacity.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/border-colors.d.ts.map +1 -1
- package/lib/typescript/commonjs/types/requireAtLeastOne.d.ts +15 -0
- package/lib/typescript/commonjs/types/requireAtLeastOne.d.ts.map +1 -0
- package/lib/typescript/module/components/BackButton.d.ts +2 -12
- package/lib/typescript/module/components/BackButton.d.ts.map +1 -1
- package/lib/typescript/module/components/BaseButton.d.ts +309 -4
- package/lib/typescript/module/components/BaseButton.d.ts.map +1 -1
- package/lib/typescript/module/components/MenuBottomSheetModal.d.ts +2 -2
- package/lib/typescript/module/components/MenuBottomSheetModal.d.ts.map +1 -1
- package/lib/typescript/module/components/PressableOpacity.d.ts +57 -4
- package/lib/typescript/module/components/PressableOpacity.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/border-colors.d.ts.map +1 -1
- package/lib/typescript/module/types/requireAtLeastOne.d.ts +15 -0
- package/lib/typescript/module/types/requireAtLeastOne.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/styles/border-colors.ts +14 -2
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Requires at least one of the keys `K` on `T` to be present (and non-nullable),
|
|
3
|
+
* while keeping the rest optional. Useful for props where several fields are
|
|
4
|
+
* individually optional but the object is meaningless if none are supplied.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* type Handlers = { onPress?: () => void; onLongPress?: () => void };
|
|
8
|
+
* type Props = RequireAtLeastOne<Handlers>;
|
|
9
|
+
* // { onPress: () => void; onLongPress?: () => void }
|
|
10
|
+
* // | { onLongPress: () => void; onPress?: () => void }
|
|
11
|
+
*/
|
|
12
|
+
export type RequireAtLeastOne<T, K extends keyof T = keyof T> = Omit<T, K> & {
|
|
13
|
+
[P in K]-?: Required<Pick<T, P>> & Partial<Pick<T, Exclude<K, P>>>;
|
|
14
|
+
}[K];
|
|
15
|
+
//# sourceMappingURL=requireAtLeastOne.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requireAtLeastOne.d.ts","sourceRoot":"","sources":["../../../../src/types/requireAtLeastOne.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;KAC1E,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;CACnE,CAAC,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -43,13 +43,25 @@ const borderColors: BorderColorsType = {
|
|
|
43
43
|
light: colors.brand['600'],
|
|
44
44
|
dark: colors.gray_dark['700'],
|
|
45
45
|
},
|
|
46
|
+
'border-brand-secondary': {
|
|
47
|
+
light: colors.brand['200'],
|
|
48
|
+
dark: colors.brand['700'],
|
|
49
|
+
},
|
|
46
50
|
'border-error': {
|
|
47
51
|
light: colors.error['500'],
|
|
48
52
|
dark: colors.error['400'],
|
|
49
53
|
},
|
|
50
54
|
'border-error_subtle': {
|
|
51
|
-
light: colors.error['
|
|
52
|
-
dark: colors.error['
|
|
55
|
+
light: colors.error['100'],
|
|
56
|
+
dark: colors.error['700'],
|
|
57
|
+
},
|
|
58
|
+
'border-success': {
|
|
59
|
+
light: colors.success['500'],
|
|
60
|
+
dark: colors.success['400'],
|
|
61
|
+
},
|
|
62
|
+
'border-success_subtle': {
|
|
63
|
+
light: colors.success['100'],
|
|
64
|
+
dark: colors.success['700'],
|
|
53
65
|
},
|
|
54
66
|
};
|
|
55
67
|
|