@ornikar/kitt-universal 32.0.1 → 32.1.1-canary.28d1f9f68cb643b8c67559f72df59006a88da1e9.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/CHANGELOG.md +19 -0
- package/dist/definitions/Choices/AnimatedChoiceItemView.d.ts +2 -1
- package/dist/definitions/Choices/AnimatedChoiceItemView.d.ts.map +1 -1
- package/dist/definitions/Choices/AnimatedChoiceItemView.web.d.ts +1 -1
- package/dist/definitions/Choices/AnimatedChoiceItemView.web.d.ts.map +1 -1
- package/dist/definitions/Choices/ChoiceItem.d.ts +2 -1
- package/dist/definitions/Choices/ChoiceItem.d.ts.map +1 -1
- package/dist/definitions/Choices/ChoiceItemContainer.d.ts +2 -1
- package/dist/definitions/Choices/ChoiceItemContainer.d.ts.map +1 -1
- package/dist/definitions/Choices/Choices.d.ts +5 -5
- package/dist/definitions/Choices/Choices.d.ts.map +1 -1
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +15 -3
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
- package/dist/definitions/themes/default.d.ts +15 -3
- package/dist/definitions/themes/default.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/colors.d.ts +11 -3
- package/dist/definitions/themes/late-ocean/colors.d.ts.map +1 -1
- package/dist/definitions/themes/palettes/deepPurpleColorPalette.d.ts +5 -0
- package/dist/definitions/themes/palettes/deepPurpleColorPalette.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +58 -16
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +58 -16
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.17.cjs.js +59 -14
- package/dist/index-node-22.17.cjs.js.map +1 -1
- package/dist/index-node-22.17.cjs.web.js +59 -14
- package/dist/index-node-22.17.cjs.web.js.map +1 -1
- package/dist/index-node-22.17.es.mjs +60 -15
- package/dist/index-node-22.17.es.mjs.map +1 -1
- package/dist/index-node-22.17.es.web.mjs +60 -15
- package/dist/index-node-22.17.es.web.mjs.map +1 -1
- package/dist/index.es.js +61 -16
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +61 -16
- package/dist/index.es.web.js.map +1 -1
- package/dist/linaria-themes-metro.es.android.js +23 -6
- package/dist/linaria-themes-metro.es.android.js.map +1 -1
- package/dist/linaria-themes-metro.es.ios.js +23 -6
- package/dist/linaria-themes-metro.es.ios.js.map +1 -1
- package/dist/linaria-themes-node-22.17.cjs.js +23 -6
- package/dist/linaria-themes-node-22.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-22.17.cjs.web.js +23 -6
- package/dist/linaria-themes-node-22.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-node-22.17.es.mjs +23 -6
- package/dist/linaria-themes-node-22.17.es.mjs.map +1 -1
- package/dist/linaria-themes-node-22.17.es.web.mjs +23 -6
- package/dist/linaria-themes-node-22.17.es.web.mjs.map +1 -1
- package/dist/linaria-themes.es.js +23 -6
- package/dist/linaria-themes.es.js.map +1 -1
- package/dist/linaria-themes.es.web.js +23 -6
- package/dist/linaria-themes.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -65,6 +65,9 @@ const hex2rgba = (hex, alpha = 1) => {
|
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
const createColorScale = colorScale => colorScale;
|
|
68
|
+
|
|
69
|
+
// WARNING
|
|
70
|
+
// If you update this palette, don't forget to update the palette in @ornikar/bumper as well.
|
|
68
71
|
const colorScales = {
|
|
69
72
|
deepPurple: createColorScale({
|
|
70
73
|
5: '#936C93',
|
|
@@ -129,9 +132,15 @@ const colorScales = {
|
|
|
129
132
|
red: createColorScale({
|
|
130
133
|
1: '#FDE4E3',
|
|
131
134
|
2: '#FAB8B8',
|
|
132
|
-
6: '#
|
|
135
|
+
6: '#E2483D',
|
|
133
136
|
7: '#BD100F'
|
|
134
137
|
}),
|
|
138
|
+
mauve: createColorScale({
|
|
139
|
+
1: '#F8E7FF',
|
|
140
|
+
2: '#F1D0FB',
|
|
141
|
+
3: '#E4A4F9',
|
|
142
|
+
4: '#D283EC'
|
|
143
|
+
}),
|
|
135
144
|
'beige-alpha': createColorScale({
|
|
136
145
|
'25': '#C1B59F40',
|
|
137
146
|
'40': '#C1B59F66',
|
|
@@ -241,8 +250,14 @@ const colors = {
|
|
|
241
250
|
}
|
|
242
251
|
},
|
|
243
252
|
highlight: {
|
|
244
|
-
|
|
245
|
-
|
|
253
|
+
mid: {
|
|
254
|
+
default: deepPurpleColorPalette['mauve.1'],
|
|
255
|
+
pressed: deepPurpleColorPalette['mauve.2']
|
|
256
|
+
},
|
|
257
|
+
hi: {
|
|
258
|
+
default: deepPurpleColorPalette['mauve.3'],
|
|
259
|
+
pressed: deepPurpleColorPalette['mauve.4']
|
|
260
|
+
}
|
|
246
261
|
},
|
|
247
262
|
info: {
|
|
248
263
|
hi: deepPurpleColorPalette['blue.6'],
|
|
@@ -270,17 +285,19 @@ const colors = {
|
|
|
270
285
|
base: {
|
|
271
286
|
hi: deepPurpleColorPalette['grey.9'],
|
|
272
287
|
mid: deepPurpleColorPalette['beige.3'],
|
|
288
|
+
low: deepPurpleColorPalette['beige.2'],
|
|
273
289
|
onContrasted: {
|
|
274
290
|
hi: deepPurpleColorPalette['grey.0'],
|
|
275
291
|
mid: deepPurpleColorPalette['white-alpha.20']
|
|
276
|
-
}
|
|
292
|
+
},
|
|
293
|
+
accent: deepPurpleColorPalette['deepPurple.8']
|
|
277
294
|
},
|
|
278
|
-
accent: deepPurpleColorPalette['deepPurple.8'],
|
|
279
295
|
info: deepPurpleColorPalette['blue.6'],
|
|
280
296
|
success: deepPurpleColorPalette['green.6'],
|
|
281
297
|
warning: deepPurpleColorPalette['yellow.6'],
|
|
282
298
|
danger: deepPurpleColorPalette['red.6'],
|
|
283
|
-
disabled: deepPurpleColorPalette['grey.2']
|
|
299
|
+
disabled: deepPurpleColorPalette['grey.2'],
|
|
300
|
+
highlight: deepPurpleColorPalette['mauve.3']
|
|
284
301
|
}
|
|
285
302
|
}
|
|
286
303
|
};
|
|
@@ -4821,6 +4838,7 @@ function AnimatedChoiceItemView({
|
|
|
4821
4838
|
isDisabled,
|
|
4822
4839
|
isSelected,
|
|
4823
4840
|
hasError,
|
|
4841
|
+
shouldExpand = false,
|
|
4824
4842
|
animatedStyles
|
|
4825
4843
|
}) {
|
|
4826
4844
|
const sx = nativeBase.useSx();
|
|
@@ -4839,7 +4857,9 @@ function AnimatedChoiceItemView({
|
|
|
4839
4857
|
isHovered,
|
|
4840
4858
|
isPressed
|
|
4841
4859
|
}),
|
|
4842
|
-
padding: size === 'small' ? 'kitt.2' : 'kitt.4'
|
|
4860
|
+
padding: size === 'small' ? 'kitt.2' : 'kitt.4',
|
|
4861
|
+
flexGrow: shouldExpand ? 1 : undefined,
|
|
4862
|
+
flexShrink: shouldExpand ? 1 : undefined
|
|
4843
4863
|
});
|
|
4844
4864
|
return /*#__PURE__*/jsxRuntime.jsx(Animated__default.View, {
|
|
4845
4865
|
style: [style, animatedStyles],
|
|
@@ -4903,6 +4923,7 @@ function ChoiceItem({
|
|
|
4903
4923
|
value,
|
|
4904
4924
|
selected,
|
|
4905
4925
|
disabled,
|
|
4926
|
+
shouldExpand = false,
|
|
4906
4927
|
children,
|
|
4907
4928
|
isPressedInternal,
|
|
4908
4929
|
isHoveredInternal,
|
|
@@ -4942,6 +4963,8 @@ function ChoiceItem({
|
|
|
4942
4963
|
checked: selected
|
|
4943
4964
|
},
|
|
4944
4965
|
style: style,
|
|
4966
|
+
flexGrow: shouldExpand ? 1 : undefined,
|
|
4967
|
+
flexShrink: shouldExpand ? 1 : undefined,
|
|
4945
4968
|
onBlur: onBlur,
|
|
4946
4969
|
onFocus: onFocus,
|
|
4947
4970
|
onPress: e => {
|
|
@@ -4961,6 +4984,8 @@ function ChoiceItem({
|
|
|
4961
4984
|
});
|
|
4962
4985
|
return /*#__PURE__*/jsxRuntime.jsxs(VStack, {
|
|
4963
4986
|
space: "kitt.2",
|
|
4987
|
+
flexGrow: shouldExpand ? 1 : undefined,
|
|
4988
|
+
flexShrink: shouldExpand ? 1 : undefined,
|
|
4964
4989
|
children: [/*#__PURE__*/jsxRuntime.jsxs(AnimatedChoiceItemView, {
|
|
4965
4990
|
animatedStyles: backgroundStyles,
|
|
4966
4991
|
isHovered: isHovered || isHoveredInternal,
|
|
@@ -4968,10 +4993,13 @@ function ChoiceItem({
|
|
|
4968
4993
|
isSelected: selected,
|
|
4969
4994
|
isPressed: isPressed || isPressedInternal,
|
|
4970
4995
|
hasError: hasError,
|
|
4996
|
+
shouldExpand: shouldExpand,
|
|
4971
4997
|
size: size,
|
|
4972
4998
|
children: [/*#__PURE__*/jsxRuntime.jsxs(Stack, {
|
|
4973
4999
|
alignItems: "center",
|
|
4974
5000
|
space: "kitt.2",
|
|
5001
|
+
flexGrow: shouldExpand ? 1 : undefined,
|
|
5002
|
+
flexShrink: shouldExpand ? 1 : undefined,
|
|
4975
5003
|
children: [icon ? /*#__PURE__*/jsxRuntime.jsx(TypographyIcon, {
|
|
4976
5004
|
color: textColor,
|
|
4977
5005
|
icon: icon
|
|
@@ -5000,36 +5028,49 @@ function ChoiceItem({
|
|
|
5000
5028
|
function ChoiceItemContainer({
|
|
5001
5029
|
children,
|
|
5002
5030
|
direction,
|
|
5031
|
+
shouldExpand,
|
|
5003
5032
|
isLast
|
|
5004
5033
|
}) {
|
|
5005
5034
|
const currentItemMarginValue = isLast ? undefined : 'kitt.3';
|
|
5006
|
-
const
|
|
5035
|
+
const directionFlexProps = direction === 'row' ? {
|
|
5007
5036
|
flexGrow: 1,
|
|
5008
5037
|
flexShrink: 1,
|
|
5009
5038
|
flexBasis: 0
|
|
5010
5039
|
} : {};
|
|
5040
|
+
const shouldExpandFlexProps = shouldExpand ? {
|
|
5041
|
+
flexGrow: 1,
|
|
5042
|
+
flexShrink: 1
|
|
5043
|
+
} : {};
|
|
5011
5044
|
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
5012
5045
|
marginRight: direction === 'row' ? currentItemMarginValue : undefined,
|
|
5013
5046
|
marginBottom: direction === 'column' ? currentItemMarginValue : undefined,
|
|
5014
|
-
...
|
|
5047
|
+
...directionFlexProps,
|
|
5048
|
+
...shouldExpandFlexProps,
|
|
5015
5049
|
children: children
|
|
5016
5050
|
});
|
|
5017
5051
|
}
|
|
5018
5052
|
|
|
5019
5053
|
function ChoicesContainer({
|
|
5020
5054
|
direction,
|
|
5055
|
+
shouldExpand,
|
|
5021
5056
|
contentContainerStyle,
|
|
5022
5057
|
...props
|
|
5023
5058
|
}) {
|
|
5059
|
+
const shouldExpandFlexProps = shouldExpand ? {
|
|
5060
|
+
flexGrow: 1,
|
|
5061
|
+
flexShrink: 1
|
|
5062
|
+
} : {};
|
|
5024
5063
|
if (direction === 'row') {
|
|
5025
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
5064
|
+
return /*#__PURE__*/jsxRuntime.jsx(ScrollView, {
|
|
5026
5065
|
horizontal: true,
|
|
5027
|
-
contentContainerStyle: contentContainerStyle,
|
|
5028
|
-
...props
|
|
5066
|
+
contentContainerStyle: shouldExpand ? shouldExpandFlexProps : contentContainerStyle,
|
|
5067
|
+
...props,
|
|
5068
|
+
...shouldExpandFlexProps
|
|
5029
5069
|
});
|
|
5030
5070
|
}
|
|
5031
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
5032
|
-
...props
|
|
5071
|
+
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
5072
|
+
...props,
|
|
5073
|
+
...shouldExpandFlexProps
|
|
5033
5074
|
});
|
|
5034
5075
|
}
|
|
5035
5076
|
|
|
@@ -5041,6 +5082,7 @@ function Choices({
|
|
|
5041
5082
|
type,
|
|
5042
5083
|
direction = 'column',
|
|
5043
5084
|
disabled,
|
|
5085
|
+
shouldExpand = false,
|
|
5044
5086
|
children,
|
|
5045
5087
|
value,
|
|
5046
5088
|
onPress,
|
|
@@ -5057,6 +5099,7 @@ function Choices({
|
|
|
5057
5099
|
const sharedProps = {
|
|
5058
5100
|
type,
|
|
5059
5101
|
disabled,
|
|
5102
|
+
shouldExpand,
|
|
5060
5103
|
onPress: !isForm ? onPress : undefined,
|
|
5061
5104
|
onChange: isForm ? newValue => {
|
|
5062
5105
|
setCurrentValue(newValue);
|
|
@@ -5068,6 +5111,7 @@ function Choices({
|
|
|
5068
5111
|
};
|
|
5069
5112
|
return /*#__PURE__*/jsxRuntime.jsx(ChoicesContainer, {
|
|
5070
5113
|
direction: direction,
|
|
5114
|
+
shouldExpand: shouldExpand,
|
|
5071
5115
|
testID: testID,
|
|
5072
5116
|
id: id,
|
|
5073
5117
|
style: style,
|
|
@@ -5079,6 +5123,7 @@ function Choices({
|
|
|
5079
5123
|
});
|
|
5080
5124
|
return /*#__PURE__*/jsxRuntime.jsx(ChoiceItemContainer, {
|
|
5081
5125
|
direction: direction,
|
|
5126
|
+
shouldExpand: shouldExpand,
|
|
5082
5127
|
isLast: index === childrenArray.length - 1,
|
|
5083
5128
|
children: element
|
|
5084
5129
|
}, child.key);
|