@ornikar/kitt-universal 28.1.0 → 29.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/CHANGELOG.md +22 -0
- package/dist/definitions/Sticker/Sticker.d.ts +10 -0
- package/dist/definitions/Sticker/Sticker.d.ts.map +1 -0
- package/dist/definitions/index.d.ts +1 -0
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +7 -4
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
- package/dist/definitions/themes/default.d.ts +1 -0
- package/dist/definitions/themes/default.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/sticker.d.ts +9 -0
- package/dist/definitions/themes/late-ocean/sticker.d.ts.map +1 -0
- package/dist/definitions/typography/Typography.d.ts +6 -2
- package/dist/definitions/typography/Typography.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +105 -1
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +105 -1
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.17.cjs.js +105 -0
- package/dist/index-node-22.17.cjs.js.map +1 -1
- package/dist/index-node-22.17.cjs.web.js +105 -0
- package/dist/index-node-22.17.cjs.web.js.map +1 -1
- package/dist/index-node-22.17.es.mjs +105 -1
- package/dist/index-node-22.17.es.mjs.map +1 -1
- package/dist/index-node-22.17.es.web.mjs +105 -1
- package/dist/index-node-22.17.es.web.mjs.map +1 -1
- package/dist/index.es.js +196 -91
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +167 -62
- package/dist/index.es.web.js.map +1 -1
- package/dist/linaria-themes-metro.es.android.js +6 -0
- package/dist/linaria-themes-metro.es.android.js.map +1 -1
- package/dist/linaria-themes-metro.es.ios.js +6 -0
- package/dist/linaria-themes-metro.es.ios.js.map +1 -1
- package/dist/linaria-themes-node-22.17.cjs.js +6 -0
- package/dist/linaria-themes-node-22.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-22.17.cjs.web.js +6 -0
- package/dist/linaria-themes-node-22.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-node-22.17.es.mjs +6 -0
- package/dist/linaria-themes-node-22.17.es.mjs.map +1 -1
- package/dist/linaria-themes-node-22.17.es.web.mjs +6 -0
- package/dist/linaria-themes-node-22.17.es.web.mjs.map +1 -1
- package/dist/linaria-themes.es.js +7 -1
- package/dist/linaria-themes.es.js.map +1 -1
- package/dist/linaria-themes.es.web.js +7 -1
- package/dist/linaria-themes.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +26 -26
package/dist/index.es.web.js
CHANGED
|
@@ -2332,6 +2332,11 @@ var skeleton$1 = {
|
|
|
2332
2332
|
}
|
|
2333
2333
|
};
|
|
2334
2334
|
|
|
2335
|
+
var sticker = {
|
|
2336
|
+
borderRadius: 2,
|
|
2337
|
+
padding: 4
|
|
2338
|
+
};
|
|
2339
|
+
|
|
2335
2340
|
var tabBar = {
|
|
2336
2341
|
underline: {
|
|
2337
2342
|
"default": {
|
|
@@ -2624,7 +2629,7 @@ var breakpoints = {
|
|
|
2624
2629
|
// TODO : seperate brand color usage definition from proper theme definition and add typings - https://ornikar.atlassian.net/browse/CME-156
|
|
2625
2630
|
var theme = {
|
|
2626
2631
|
spacing: spacing,
|
|
2627
|
-
getSpacing: function
|
|
2632
|
+
getSpacing: function (multiplier) {
|
|
2628
2633
|
return spacing * multiplier;
|
|
2629
2634
|
},
|
|
2630
2635
|
colors: colors,
|
|
@@ -2652,6 +2657,7 @@ var theme = {
|
|
|
2652
2657
|
skeleton: skeleton$1,
|
|
2653
2658
|
tabBar: tabBar,
|
|
2654
2659
|
tag: tag,
|
|
2660
|
+
sticker: sticker,
|
|
2655
2661
|
tooltip: tooltip,
|
|
2656
2662
|
typography: typography,
|
|
2657
2663
|
fullscreenModal: fullscreenModal,
|
|
@@ -2812,7 +2818,7 @@ var ActionCardPressable = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
2812
2818
|
onPress: onPress,
|
|
2813
2819
|
onHoverIn: onHoverIn,
|
|
2814
2820
|
onHoverOut: onHoverOut,
|
|
2815
|
-
children: function
|
|
2821
|
+
children: function (_ref3) {
|
|
2816
2822
|
var isHovered = _ref3.isHovered,
|
|
2817
2823
|
isPressed = _ref3.isPressed,
|
|
2818
2824
|
isFocused = _ref3.isFocused;
|
|
@@ -3648,7 +3654,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
3648
3654
|
onHoverOut: onHoverOut,
|
|
3649
3655
|
onFocus: onFocus,
|
|
3650
3656
|
onBlur: onBlur,
|
|
3651
|
-
children: function
|
|
3657
|
+
children: function (_ref2) {
|
|
3652
3658
|
var isHovered = _ref2.isHovered,
|
|
3653
3659
|
isPressed = _ref2.isPressed,
|
|
3654
3660
|
isFocused = _ref2.isFocused;
|
|
@@ -3745,7 +3751,7 @@ var ActionsItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
3745
3751
|
stretch: stretch,
|
|
3746
3752
|
disabled: isLoading ? true : disabled,
|
|
3747
3753
|
icon: isLoading ? /*#__PURE__*/jsx(LoaderIcon, {}) : icon,
|
|
3748
|
-
onPress: function
|
|
3754
|
+
onPress: function (e) {
|
|
3749
3755
|
var callPressAndUpdateLoadingState = /*#__PURE__*/function () {
|
|
3750
3756
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
3751
3757
|
return _regeneratorRuntime().wrap(function (_context) {
|
|
@@ -4074,7 +4080,7 @@ function CloseButton$1(_ref) {
|
|
|
4074
4080
|
onPress = _ref.onPress;
|
|
4075
4081
|
var onCloseContextCallback = useOnCloseModalBehaviour();
|
|
4076
4082
|
return /*#__PURE__*/cloneElement(children, {
|
|
4077
|
-
onPress: function
|
|
4083
|
+
onPress: function () {
|
|
4078
4084
|
if (onPress) onPress();
|
|
4079
4085
|
onCloseContextCallback();
|
|
4080
4086
|
}
|
|
@@ -4224,7 +4230,7 @@ function CardModalBehaviour(_ref) {
|
|
|
4224
4230
|
onClose: onClose,
|
|
4225
4231
|
children: /*#__PURE__*/jsx(CardModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
|
|
4226
4232
|
visible: visible,
|
|
4227
|
-
onExited: function
|
|
4233
|
+
onExited: function () {
|
|
4228
4234
|
if (onExited) onExited();
|
|
4229
4235
|
setIsModalBehaviourVisible(false);
|
|
4230
4236
|
},
|
|
@@ -4518,8 +4524,8 @@ function AnimatedChoiceItemView(_ref) {
|
|
|
4518
4524
|
|
|
4519
4525
|
var useNativeAnimation$3 = function () {
|
|
4520
4526
|
return {
|
|
4521
|
-
onPressIn: function
|
|
4522
|
-
onPressOut: function
|
|
4527
|
+
onPressIn: function () {},
|
|
4528
|
+
onPressOut: function () {},
|
|
4523
4529
|
backgroundStyles: undefined
|
|
4524
4530
|
};
|
|
4525
4531
|
};
|
|
@@ -4576,7 +4582,7 @@ function ChoiceItem(_ref) {
|
|
|
4576
4582
|
style: style,
|
|
4577
4583
|
onBlur: onBlur,
|
|
4578
4584
|
onFocus: onFocus,
|
|
4579
|
-
onPress: function
|
|
4585
|
+
onPress: function (e) {
|
|
4580
4586
|
if (onFocus) onFocus(e);
|
|
4581
4587
|
if (onPress) onPress();
|
|
4582
4588
|
handleChange();
|
|
@@ -4584,7 +4590,7 @@ function ChoiceItem(_ref) {
|
|
|
4584
4590
|
},
|
|
4585
4591
|
onPressIn: onPressIn,
|
|
4586
4592
|
onPressOut: onPressOut,
|
|
4587
|
-
children: function
|
|
4593
|
+
children: function (_ref2) {
|
|
4588
4594
|
var isHovered = _ref2.isHovered,
|
|
4589
4595
|
isPressed = _ref2.isPressed;
|
|
4590
4596
|
var textColor = getCurrentTextColor$1({
|
|
@@ -4688,7 +4694,7 @@ function Choices(_ref2) {
|
|
|
4688
4694
|
type: type,
|
|
4689
4695
|
disabled: disabled,
|
|
4690
4696
|
onPress: !isForm ? onPress : undefined,
|
|
4691
|
-
onChange: isForm ? function
|
|
4697
|
+
onChange: isForm ? function (newValue) {
|
|
4692
4698
|
setCurrentValue(newValue);
|
|
4693
4699
|
if (onChange) onChange(newValue);
|
|
4694
4700
|
} : undefined,
|
|
@@ -4825,7 +4831,7 @@ function DialogModalBehaviour(_ref) {
|
|
|
4825
4831
|
},
|
|
4826
4832
|
children: /*#__PURE__*/jsx(DialogModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
|
|
4827
4833
|
visible: visible,
|
|
4828
|
-
onExited: function
|
|
4834
|
+
onExited: function () {
|
|
4829
4835
|
if (onExited) onExited();
|
|
4830
4836
|
setIsModalBehaviourVisible(false);
|
|
4831
4837
|
},
|
|
@@ -5272,7 +5278,7 @@ function isReactElement(element) {
|
|
|
5272
5278
|
return _typeof(element) === 'object' && element !== null && 'type' in element && 'props' in element;
|
|
5273
5279
|
}
|
|
5274
5280
|
function Autocomplete(_ref) {
|
|
5275
|
-
var
|
|
5281
|
+
var children = _ref.children,
|
|
5276
5282
|
name = _ref.name,
|
|
5277
5283
|
disabled = _ref.disabled,
|
|
5278
5284
|
placeholder = _ref.placeholder,
|
|
@@ -5299,7 +5305,7 @@ function Autocomplete(_ref) {
|
|
|
5299
5305
|
zIndex = _ref$zIndex === void 0 ? 1000 : _ref$zIndex,
|
|
5300
5306
|
maxItemContainerHeight = _ref.maxItemContainerHeight,
|
|
5301
5307
|
props = _objectWithoutProperties(_ref, _excluded$v);
|
|
5302
|
-
var childrenArray = Children.toArray(
|
|
5308
|
+
var childrenArray = Children.toArray(children);
|
|
5303
5309
|
var items = childrenArray.filter(isReactElement).map(function (child) {
|
|
5304
5310
|
return {
|
|
5305
5311
|
child: child,
|
|
@@ -5310,12 +5316,12 @@ function Autocomplete(_ref) {
|
|
|
5310
5316
|
defaultIsOpen: isInitialOpen,
|
|
5311
5317
|
initialSelectedItem: initialValue,
|
|
5312
5318
|
initialInputValue: initialValue ? itemToString(initialValue) : undefined,
|
|
5313
|
-
itemToString: function
|
|
5319
|
+
itemToString: function (item) {
|
|
5314
5320
|
// Prevents returning null values
|
|
5315
5321
|
if (!itemToString) return '';
|
|
5316
5322
|
return itemToString(item || undefined);
|
|
5317
5323
|
},
|
|
5318
|
-
stateReducer: function
|
|
5324
|
+
stateReducer: function (state, changes) {
|
|
5319
5325
|
switch (changes.type) {
|
|
5320
5326
|
case Downshift.stateChangeTypes.changeInput:
|
|
5321
5327
|
return _objectSpread(_objectSpread({}, changes), {}, {
|
|
@@ -5325,7 +5331,7 @@ function Autocomplete(_ref) {
|
|
|
5325
5331
|
return changes;
|
|
5326
5332
|
}
|
|
5327
5333
|
},
|
|
5328
|
-
onChange: function
|
|
5334
|
+
onChange: function (selectedItem, stateAndHelpers) {
|
|
5329
5335
|
if (_onChange) {
|
|
5330
5336
|
_onChange(selectedItem, stateAndHelpers);
|
|
5331
5337
|
}
|
|
@@ -5333,7 +5339,7 @@ function Autocomplete(_ref) {
|
|
|
5333
5339
|
onSelect: onSelectItem,
|
|
5334
5340
|
onOuterClick: onOuterPress,
|
|
5335
5341
|
onInputValueChange: onInputChange,
|
|
5336
|
-
children: function
|
|
5342
|
+
children: function (_ref2) {
|
|
5337
5343
|
var getRootProps = _ref2.getRootProps,
|
|
5338
5344
|
getInputProps = _ref2.getInputProps,
|
|
5339
5345
|
getMenuProps = _ref2.getMenuProps,
|
|
@@ -5385,20 +5391,20 @@ function Autocomplete(_ref) {
|
|
|
5385
5391
|
right: right || (canDisplayCollapseButton ? /*#__PURE__*/jsx(InputPressable, _objectSpread(_objectSpread({}, toggleProps), {}, {
|
|
5386
5392
|
testID: "kitt.Autocomplete.listToggle",
|
|
5387
5393
|
hitSlop: 40,
|
|
5388
|
-
onPress: function
|
|
5394
|
+
onPress: function (e) {
|
|
5389
5395
|
onClickToggle(e);
|
|
5390
5396
|
},
|
|
5391
5397
|
children: /*#__PURE__*/jsx(InputIcon, {
|
|
5392
5398
|
icon: isCurrentlyOpen ? /*#__PURE__*/jsx(CaretUpFillIcon, {}) : /*#__PURE__*/jsx(CaretDownFillIcon, {})
|
|
5393
5399
|
})
|
|
5394
5400
|
})) : null),
|
|
5395
|
-
onFocus: function
|
|
5401
|
+
onFocus: function (e) {
|
|
5396
5402
|
openMenu();
|
|
5397
5403
|
/** @ts-expect-error onFocus wants web events */
|
|
5398
5404
|
if (onSearchInputFocus) onSearchInputFocus(e);
|
|
5399
5405
|
if (_onFocus) _onFocus(e);
|
|
5400
5406
|
},
|
|
5401
|
-
onBlur: function
|
|
5407
|
+
onBlur: function (e) {
|
|
5402
5408
|
/** @ts-expect-error onBlur wants web events */
|
|
5403
5409
|
if (onSearchInputBlur) onSearchInputBlur(e);
|
|
5404
5410
|
|
|
@@ -5434,10 +5440,10 @@ function Autocomplete(_ref) {
|
|
|
5434
5440
|
selected: ariaSelected
|
|
5435
5441
|
},
|
|
5436
5442
|
disabled: disabled,
|
|
5437
|
-
onPress: function
|
|
5443
|
+
onPress: function (e) {
|
|
5438
5444
|
if (onClick) onClick(e);
|
|
5439
5445
|
},
|
|
5440
|
-
children: function
|
|
5446
|
+
children: function (_ref5) {
|
|
5441
5447
|
var isHovered = _ref5.isHovered,
|
|
5442
5448
|
isFocused = _ref5.isFocused,
|
|
5443
5449
|
isPressed = _ref5.isPressed;
|
|
@@ -5527,12 +5533,12 @@ var Checkbox = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
5527
5533
|
disabled: disabled
|
|
5528
5534
|
},
|
|
5529
5535
|
disabled: disabled,
|
|
5530
|
-
onPress: function
|
|
5536
|
+
onPress: function (e) {
|
|
5531
5537
|
if (onFocus) onFocus();
|
|
5532
5538
|
if (onChange) onChange(!checked, e);
|
|
5533
5539
|
if (onBlur) onBlur();
|
|
5534
5540
|
},
|
|
5535
|
-
children: function
|
|
5541
|
+
children: function (_ref2) {
|
|
5536
5542
|
var isHovered = _ref2.isHovered,
|
|
5537
5543
|
isPressed = _ref2.isPressed,
|
|
5538
5544
|
isFocused = _ref2.isFocused;
|
|
@@ -6341,10 +6347,10 @@ var GoogleMapsAutocompleteContext = /*#__PURE__*/createContext({
|
|
|
6341
6347
|
isLoadingResultDetails: false,
|
|
6342
6348
|
shouldDisplayEmptyStateWhenNoResults: false
|
|
6343
6349
|
},
|
|
6344
|
-
onInputChange: function
|
|
6350
|
+
onInputChange: function () {
|
|
6345
6351
|
return Promise.resolve();
|
|
6346
6352
|
},
|
|
6347
|
-
onSelectItem: function
|
|
6353
|
+
onSelectItem: function () {}
|
|
6348
6354
|
});
|
|
6349
6355
|
function GoogleMapsAutocompleteProvider(_ref) {
|
|
6350
6356
|
var children = _ref.children,
|
|
@@ -6595,7 +6601,7 @@ function InputAddress(_ref) {
|
|
|
6595
6601
|
return /*#__PURE__*/jsx(Autocomplete, _objectSpread(_objectSpread({}, props), {}, {
|
|
6596
6602
|
itemToString: itemToString,
|
|
6597
6603
|
initialValue: formattedInitialValue,
|
|
6598
|
-
checkSelectedItem: function
|
|
6604
|
+
checkSelectedItem: function (selectedItem, item) {
|
|
6599
6605
|
return (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.place_id) === item.place_id;
|
|
6600
6606
|
},
|
|
6601
6607
|
right: state.isLoadingSearch || state.isLoadingResultDetails ? /*#__PURE__*/jsx(Icon, {
|
|
@@ -6604,10 +6610,10 @@ function InputAddress(_ref) {
|
|
|
6604
6610
|
}) : undefined,
|
|
6605
6611
|
errorElement: state.hasSearchError || state.hasSelectResultError ? errorElement : null,
|
|
6606
6612
|
emptyResultsElement: state.items.length === 0 ? emptyResultsElement : null,
|
|
6607
|
-
onInputChange: function
|
|
6613
|
+
onInputChange: function (v) {
|
|
6608
6614
|
_onInputChange(v);
|
|
6609
6615
|
},
|
|
6610
|
-
onChange: function
|
|
6616
|
+
onChange: function (v) {
|
|
6611
6617
|
onSelectItem(v, _onChange);
|
|
6612
6618
|
},
|
|
6613
6619
|
children: state.items.map(function (item) {
|
|
@@ -6689,7 +6695,7 @@ var InputNumber = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6689
6695
|
ref: ref
|
|
6690
6696
|
}, props), {}, {
|
|
6691
6697
|
inputMode: "numeric",
|
|
6692
|
-
onChange: function
|
|
6698
|
+
onChange: function (event) {
|
|
6693
6699
|
if (!onChange) return;
|
|
6694
6700
|
var value = parseFloat(event.nativeEvent.text);
|
|
6695
6701
|
|
|
@@ -6721,7 +6727,7 @@ var InputPassword = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6721
6727
|
testID: "kitt.InputPassword.passwordToggle",
|
|
6722
6728
|
hitSlop: 20,
|
|
6723
6729
|
accessibilityRole: "button",
|
|
6724
|
-
onPress: function
|
|
6730
|
+
onPress: function () {
|
|
6725
6731
|
return setIsVisible(function (prev) {
|
|
6726
6732
|
return !prev;
|
|
6727
6733
|
});
|
|
@@ -6756,7 +6762,7 @@ var InputPhone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6756
6762
|
enterKeyHint: currentEnterKeyHint,
|
|
6757
6763
|
autoComplete: autoComplete,
|
|
6758
6764
|
textContentType: "telephoneNumber",
|
|
6759
|
-
onChange: function
|
|
6765
|
+
onChange: function (event) {
|
|
6760
6766
|
var number = parseNumber(event.nativeEvent.text);
|
|
6761
6767
|
|
|
6762
6768
|
// When intl phone number is valid :
|
|
@@ -6948,14 +6954,14 @@ function Radio(_ref, ref) {
|
|
|
6948
6954
|
focusable: checked && !disabled,
|
|
6949
6955
|
flexDirection: "row",
|
|
6950
6956
|
alignItems: "center",
|
|
6951
|
-
onPress: function
|
|
6957
|
+
onPress: function (event) {
|
|
6952
6958
|
if (onFocus) onFocus();
|
|
6953
6959
|
if (onChange) onChange(value, event);
|
|
6954
6960
|
if (onBlur) onBlur();
|
|
6955
6961
|
},
|
|
6956
6962
|
onFocus: onFocus,
|
|
6957
6963
|
onBlur: onBlur,
|
|
6958
|
-
children: function
|
|
6964
|
+
children: function (_ref2) {
|
|
6959
6965
|
var isHovered = _ref2.isHovered,
|
|
6960
6966
|
isPressed = _ref2.isPressed,
|
|
6961
6967
|
isFocused = _ref2.isFocused;
|
|
@@ -7131,7 +7137,7 @@ function RadioButton(_ref) {
|
|
|
7131
7137
|
flexShrink: createResponsiveStyleFromProp(stretch, 1, undefined),
|
|
7132
7138
|
flexBasis: createResponsiveStyleFromProp(stretch, 0),
|
|
7133
7139
|
disabled: disabled,
|
|
7134
|
-
onPress: function
|
|
7140
|
+
onPress: function (e) {
|
|
7135
7141
|
if (onFocus) onFocus(e);
|
|
7136
7142
|
if (onChange) onChange(value);
|
|
7137
7143
|
if (onBlur) onBlur(e);
|
|
@@ -7140,7 +7146,7 @@ function RadioButton(_ref) {
|
|
|
7140
7146
|
onPressOut: onPressOut,
|
|
7141
7147
|
onFocus: onFocus,
|
|
7142
7148
|
onBlur: onBlur,
|
|
7143
|
-
children: function
|
|
7149
|
+
children: function (_ref2) {
|
|
7144
7150
|
var isHovered = _ref2.isHovered,
|
|
7145
7151
|
isPressed = _ref2.isPressed,
|
|
7146
7152
|
isFocused = _ref2.isFocused;
|
|
@@ -7259,7 +7265,7 @@ var TextArea = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
7259
7265
|
textAlignVertical: "top",
|
|
7260
7266
|
minHeight: "kitt.forms.textArea.minHeight"
|
|
7261
7267
|
}, props), {}, {
|
|
7262
|
-
onChange: function
|
|
7268
|
+
onChange: function (e) {
|
|
7263
7269
|
if (!limit || e.nativeEvent.text.length <= limit) {
|
|
7264
7270
|
var _props$onChange;
|
|
7265
7271
|
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, e);
|
|
@@ -7422,10 +7428,10 @@ function Toggle(_ref) {
|
|
|
7422
7428
|
children: [/*#__PURE__*/jsx(Pressable, {
|
|
7423
7429
|
accessibilityRole: "togglebutton",
|
|
7424
7430
|
disabled: isDisabled,
|
|
7425
|
-
onPress: function
|
|
7431
|
+
onPress: function () {
|
|
7426
7432
|
onChange(!value);
|
|
7427
7433
|
},
|
|
7428
|
-
children: function
|
|
7434
|
+
children: function (_ref2) {
|
|
7429
7435
|
var isHovered = _ref2.isHovered,
|
|
7430
7436
|
isPressed = _ref2.isPressed,
|
|
7431
7437
|
isFocused = _ref2.isFocused;
|
|
@@ -7590,7 +7596,7 @@ function FullscreenModalBehaviour(_ref) {
|
|
|
7590
7596
|
onClose: onClose,
|
|
7591
7597
|
children: /*#__PURE__*/jsx(FullscreenModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
|
|
7592
7598
|
visible: visible,
|
|
7593
|
-
onExited: function
|
|
7599
|
+
onExited: function () {
|
|
7594
7600
|
if (onExited) onExited();
|
|
7595
7601
|
setIsModalBehaviourVisible(false);
|
|
7596
7602
|
},
|
|
@@ -7842,13 +7848,13 @@ function Highlight(_ref) {
|
|
|
7842
7848
|
});
|
|
7843
7849
|
}
|
|
7844
7850
|
return /*#__PURE__*/jsx(Pressable, {
|
|
7845
|
-
onPress: function
|
|
7851
|
+
onPress: function () {
|
|
7846
7852
|
setIsExpanded(!isExpanded);
|
|
7847
7853
|
setIsInitialRender(false);
|
|
7848
7854
|
},
|
|
7849
7855
|
onPressIn: onPressIn,
|
|
7850
7856
|
onPressOut: onPressOut,
|
|
7851
|
-
children: function
|
|
7857
|
+
children: function (_ref2) {
|
|
7852
7858
|
var isHovered = _ref2.isHovered;
|
|
7853
7859
|
return /*#__PURE__*/jsxs(AnimatedContainer, {
|
|
7854
7860
|
isHovered: isHovered,
|
|
@@ -8269,7 +8275,7 @@ function MapMarker(_ref2) {
|
|
|
8269
8275
|
return /*#__PURE__*/jsx(Pressable$1, {
|
|
8270
8276
|
testID: testID,
|
|
8271
8277
|
onPress: onPress,
|
|
8272
|
-
children: function
|
|
8278
|
+
children: function (_ref3) {
|
|
8273
8279
|
var isHovered = _ref3.isHovered;
|
|
8274
8280
|
return /*#__PURE__*/jsx(StaticMapMarker$1, _objectSpread(_objectSpread({}, props), {}, {
|
|
8275
8281
|
isHovered: isHovered
|
|
@@ -9375,6 +9381,9 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
9375
9381
|
tag: {
|
|
9376
9382
|
borderRadius: theme.tag.borderRadius
|
|
9377
9383
|
},
|
|
9384
|
+
sticker: {
|
|
9385
|
+
borderRadius: theme.sticker.borderRadius
|
|
9386
|
+
},
|
|
9378
9387
|
tooltip: {
|
|
9379
9388
|
borderRadius: theme.tooltip.borderRadius
|
|
9380
9389
|
},
|
|
@@ -10161,6 +10170,9 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
10161
10170
|
}
|
|
10162
10171
|
}
|
|
10163
10172
|
},
|
|
10173
|
+
sticker: {
|
|
10174
|
+
padding: theme.sticker.padding
|
|
10175
|
+
},
|
|
10164
10176
|
toggle: {
|
|
10165
10177
|
primary: {
|
|
10166
10178
|
enabled: {
|
|
@@ -11011,19 +11023,19 @@ function NavigationModalBehaviour(_ref) {
|
|
|
11011
11023
|
children: /*#__PURE__*/jsx(AnimationComponent, _objectSpread(_objectSpread({}, props), {}, {
|
|
11012
11024
|
appear: shouldAppear,
|
|
11013
11025
|
visible: visible,
|
|
11014
|
-
onEnter: function
|
|
11026
|
+
onEnter: function () {
|
|
11015
11027
|
if (onEnter) onEnter();
|
|
11016
11028
|
|
|
11017
11029
|
// Once a children as been displayed, we force appear to false in order to avoid replaying animation on breakpoint change
|
|
11018
11030
|
setShouldAppear(false);
|
|
11019
11031
|
},
|
|
11020
|
-
onExit: function
|
|
11032
|
+
onExit: function () {
|
|
11021
11033
|
if (onExit) onExit();
|
|
11022
11034
|
|
|
11023
11035
|
// Reset appear value to its original value for future modal display
|
|
11024
11036
|
setShouldAppear(appear);
|
|
11025
11037
|
},
|
|
11026
|
-
onExited: function
|
|
11038
|
+
onExited: function () {
|
|
11027
11039
|
if (onExited) onExited();
|
|
11028
11040
|
setIsModalBehaviourVisible(false);
|
|
11029
11041
|
},
|
|
@@ -11283,18 +11295,18 @@ function Picker(_ref) {
|
|
|
11283
11295
|
items: items,
|
|
11284
11296
|
initialSelectedItem: initialValueIndex > -1 ? items[initialValueIndex] : undefined,
|
|
11285
11297
|
initialIsOpen: isInitialOpen,
|
|
11286
|
-
stateReducer: function
|
|
11298
|
+
stateReducer: function (state, actionAndChanges) {
|
|
11287
11299
|
return webUseSelectReducer(state, actionAndChanges, {
|
|
11288
11300
|
keepOpenOnChange: keepOpenOnChange
|
|
11289
11301
|
});
|
|
11290
11302
|
},
|
|
11291
11303
|
selectedItem: syncStateWithSourceValue ? sourceValue : undefined,
|
|
11292
|
-
onIsOpenChange: function
|
|
11304
|
+
onIsOpenChange: function (changes) {
|
|
11293
11305
|
if (changes.isOpen === false) {
|
|
11294
11306
|
if (onClose) onClose();
|
|
11295
11307
|
}
|
|
11296
11308
|
},
|
|
11297
|
-
onSelectedItemChange: function
|
|
11309
|
+
onSelectedItemChange: function (changes) {
|
|
11298
11310
|
if (!onChange) return;
|
|
11299
11311
|
if (changes.selectedItem === null) {
|
|
11300
11312
|
onChange(undefined);
|
|
@@ -11514,7 +11526,7 @@ function Skeleton(_ref) {
|
|
|
11514
11526
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
11515
11527
|
overflow: "hidden",
|
|
11516
11528
|
style: style,
|
|
11517
|
-
onLayout: function
|
|
11529
|
+
onLayout: function (_ref2) {
|
|
11518
11530
|
var nativeEvent = _ref2.nativeEvent;
|
|
11519
11531
|
return setWidth(nativeEvent.layout.width);
|
|
11520
11532
|
},
|
|
@@ -11740,7 +11752,7 @@ function StaticMap(_ref) {
|
|
|
11740
11752
|
position: "relative",
|
|
11741
11753
|
maxWidth: mapBoxMaxPictureWidth,
|
|
11742
11754
|
height: height,
|
|
11743
|
-
onLayout: function
|
|
11755
|
+
onLayout: function (event) {
|
|
11744
11756
|
var nativeEvent = event.nativeEvent;
|
|
11745
11757
|
var rangedMapWidth = getPictureWidth(nativeEvent.layout.width);
|
|
11746
11758
|
setCurrentWidth(rangedMapWidth);
|
|
@@ -11752,11 +11764,11 @@ function StaticMap(_ref) {
|
|
|
11752
11764
|
width: currentWidth,
|
|
11753
11765
|
height: height,
|
|
11754
11766
|
alt: alt,
|
|
11755
|
-
onLoadEnd: function
|
|
11767
|
+
onLoadEnd: function () {
|
|
11756
11768
|
setIsLoading(false);
|
|
11757
11769
|
if (onLoaded) onLoaded();
|
|
11758
11770
|
},
|
|
11759
|
-
onError: function
|
|
11771
|
+
onError: function () {
|
|
11760
11772
|
setHasError(true);
|
|
11761
11773
|
if (onError) onError();
|
|
11762
11774
|
}
|
|
@@ -11781,7 +11793,7 @@ function StaticMap(_ref) {
|
|
|
11781
11793
|
width: "100%",
|
|
11782
11794
|
height: "100%",
|
|
11783
11795
|
children: /*#__PURE__*/jsx(StaticMapError, {
|
|
11784
|
-
onReload: function
|
|
11796
|
+
onReload: function () {
|
|
11785
11797
|
setHasError(false);
|
|
11786
11798
|
setIsLoading(true);
|
|
11787
11799
|
setCurrentMapKey(function (prev) {
|
|
@@ -11797,6 +11809,99 @@ StaticMap.Loader = StaticMapLoader;
|
|
|
11797
11809
|
StaticMap.Error = StaticMapError;
|
|
11798
11810
|
StaticMap.Marker = StaticMapMarker;
|
|
11799
11811
|
|
|
11812
|
+
var getTypographySize = function (size) {
|
|
11813
|
+
switch (size) {
|
|
11814
|
+
case 'small':
|
|
11815
|
+
return 'content-caps-xs';
|
|
11816
|
+
case 'medium':
|
|
11817
|
+
return 'content-caps-m';
|
|
11818
|
+
case 'large':
|
|
11819
|
+
default:
|
|
11820
|
+
return 'content-caps-l';
|
|
11821
|
+
}
|
|
11822
|
+
};
|
|
11823
|
+
function Sticker(_ref) {
|
|
11824
|
+
var label = _ref.label,
|
|
11825
|
+
_ref$color = _ref.color,
|
|
11826
|
+
color = _ref$color === void 0 ? 'linen' : _ref$color,
|
|
11827
|
+
_ref$size = _ref.size,
|
|
11828
|
+
size = _ref$size === void 0 ? 'medium' : _ref$size;
|
|
11829
|
+
var kittTheme = useKittTheme();
|
|
11830
|
+
var colorMatching = {
|
|
11831
|
+
green: {
|
|
11832
|
+
background: kittTheme.kitt.palettes.deepPurple['rainbow.green-grass'],
|
|
11833
|
+
font: kittTheme.kitt.palettes.deepPurple['rainbow.green-apple']
|
|
11834
|
+
},
|
|
11835
|
+
darkGreen: {
|
|
11836
|
+
background: kittTheme.kitt.palettes.deepPurple['rainbow.green-pine'],
|
|
11837
|
+
font: kittTheme.kitt.palettes.deepPurple['rainbow.blue-sky']
|
|
11838
|
+
},
|
|
11839
|
+
blue: {
|
|
11840
|
+
background: kittTheme.kitt.palettes.deepPurple['rainbow.blue-sky'],
|
|
11841
|
+
font: kittTheme.kitt.palettes.deepPurple['rainbow.green-pine']
|
|
11842
|
+
},
|
|
11843
|
+
darkBlue: {
|
|
11844
|
+
background: kittTheme.kitt.palettes.deepPurple['rainbow.blue-electric'],
|
|
11845
|
+
font: kittTheme.kitt.palettes.deepPurple['beige.3']
|
|
11846
|
+
},
|
|
11847
|
+
red: {
|
|
11848
|
+
background: kittTheme.kitt.palettes.deepPurple['rainbow.brick'],
|
|
11849
|
+
font: kittTheme.kitt.palettes.deepPurple['rainbow.sun']
|
|
11850
|
+
},
|
|
11851
|
+
orange: {
|
|
11852
|
+
background: kittTheme.kitt.palettes.deepPurple['rainbow.orange'],
|
|
11853
|
+
font: kittTheme.kitt.palettes.deepPurple['beige.2']
|
|
11854
|
+
},
|
|
11855
|
+
pink: {
|
|
11856
|
+
background: kittTheme.kitt.palettes.deepPurple['rainbow.pink'],
|
|
11857
|
+
font: kittTheme.kitt.palettes.deepPurple['rainbow.brick']
|
|
11858
|
+
},
|
|
11859
|
+
gold: {
|
|
11860
|
+
background: kittTheme.kitt.palettes.deepPurple['rainbow.gold'],
|
|
11861
|
+
font: kittTheme.kitt.palettes.deepPurple['beige.1']
|
|
11862
|
+
},
|
|
11863
|
+
cream: {
|
|
11864
|
+
background: kittTheme.kitt.palettes.deepPurple['beige.1'],
|
|
11865
|
+
font: kittTheme.kitt.palettes.deepPurple['rainbow.brick']
|
|
11866
|
+
},
|
|
11867
|
+
linen: {
|
|
11868
|
+
background: kittTheme.kitt.palettes.deepPurple['beige.3'],
|
|
11869
|
+
font: kittTheme.kitt.palettes.deepPurple['deepPurple.8']
|
|
11870
|
+
},
|
|
11871
|
+
promo: {
|
|
11872
|
+
background: kittTheme.kitt.palettes.deepPurple['lightning.5'],
|
|
11873
|
+
font: kittTheme.kitt.palettes.deepPurple['lightning.7']
|
|
11874
|
+
},
|
|
11875
|
+
darkPromo: {
|
|
11876
|
+
background: kittTheme.kitt.palettes.deepPurple['lightning.7'],
|
|
11877
|
+
font: kittTheme.kitt.palettes.deepPurple['lightning.5']
|
|
11878
|
+
},
|
|
11879
|
+
disabled: {
|
|
11880
|
+
background: kittTheme.kitt.palettes.deepPurple['beige.6'],
|
|
11881
|
+
font: kittTheme.kitt.palettes.deepPurple['beige.2']
|
|
11882
|
+
}
|
|
11883
|
+
};
|
|
11884
|
+
return /*#__PURE__*/jsx(HStack, {
|
|
11885
|
+
alignSelf: "flex-start",
|
|
11886
|
+
borderRadius: "kitt.sticker.borderRadius",
|
|
11887
|
+
padding: "kitt.sticker.padding",
|
|
11888
|
+
backgroundColor: colorMatching[color].background,
|
|
11889
|
+
space: "kitt.1",
|
|
11890
|
+
alignItems: "center",
|
|
11891
|
+
maxWidth: "100%",
|
|
11892
|
+
children: /*#__PURE__*/jsx(View, {
|
|
11893
|
+
flexShrink: 1,
|
|
11894
|
+
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
11895
|
+
base: getTypographySize(size),
|
|
11896
|
+
color: colorMatching[color].font,
|
|
11897
|
+
numberOfLines: 1,
|
|
11898
|
+
ellipsizeMode: "tail",
|
|
11899
|
+
children: label
|
|
11900
|
+
})
|
|
11901
|
+
})
|
|
11902
|
+
});
|
|
11903
|
+
}
|
|
11904
|
+
|
|
11800
11905
|
var _excluded$6 = ["direction", "wrap"];
|
|
11801
11906
|
function Flex(_ref) {
|
|
11802
11907
|
var direction = _ref.direction,
|
|
@@ -12023,7 +12128,7 @@ function StoryContainer(_ref) {
|
|
|
12023
12128
|
var StoryDecorator = makeDecorator({
|
|
12024
12129
|
name: 'StoryDecorator',
|
|
12025
12130
|
parameterName: 'storyDecorator',
|
|
12026
|
-
wrapper: function
|
|
12131
|
+
wrapper: function (storyFn, context) {
|
|
12027
12132
|
var story = storyFn(context);
|
|
12028
12133
|
if (context.parameters.disableStoryContainer) {
|
|
12029
12134
|
return story;
|
|
@@ -12127,7 +12232,7 @@ function TabBarItem(_ref) {
|
|
|
12127
12232
|
disabled: disabled,
|
|
12128
12233
|
testID: testID,
|
|
12129
12234
|
onPress: onPress,
|
|
12130
|
-
children: function
|
|
12235
|
+
children: function (_ref2) {
|
|
12131
12236
|
var isHovered = _ref2.isHovered,
|
|
12132
12237
|
isPressed = _ref2.isPressed,
|
|
12133
12238
|
isFocused = _ref2.isFocused;
|
|
@@ -12216,7 +12321,7 @@ function TabBar(_ref) {
|
|
|
12216
12321
|
color: color,
|
|
12217
12322
|
variant: definedVariant,
|
|
12218
12323
|
type: type,
|
|
12219
|
-
onPress: function
|
|
12324
|
+
onPress: function (event) {
|
|
12220
12325
|
var _child$props$onPress, _child$props;
|
|
12221
12326
|
onChangeTab({
|
|
12222
12327
|
tab: tab,
|
|
@@ -12395,7 +12500,7 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
12395
12500
|
isFocusedInternal: isFocusedInternal,
|
|
12396
12501
|
isPressedInternal: isPressedInternal
|
|
12397
12502
|
}),
|
|
12398
|
-
onChange: function
|
|
12503
|
+
onChange: function (event) {
|
|
12399
12504
|
var currentValue = event.nativeEvent.text;
|
|
12400
12505
|
if (currentValue.length === 0) {
|
|
12401
12506
|
setInputValue(currentValue);
|
|
@@ -12446,7 +12551,7 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
12446
12551
|
setInputValue(sanitizedValue);
|
|
12447
12552
|
handleChange(sanitizedValue);
|
|
12448
12553
|
},
|
|
12449
|
-
onBlur: function
|
|
12554
|
+
onBlur: function () {
|
|
12450
12555
|
if (inputValue.indexOf(':') === 1) {
|
|
12451
12556
|
setInputValue("0".concat(inputValue));
|
|
12452
12557
|
}
|
|
@@ -13002,7 +13107,7 @@ function KittThemeProvider(_ref) {
|
|
|
13002
13107
|
var KittThemeDecorator = makeDecorator({
|
|
13003
13108
|
name: 'ThemeDecorator',
|
|
13004
13109
|
parameterName: 'theme',
|
|
13005
|
-
wrapper: function
|
|
13110
|
+
wrapper: function (storyFn, context, _ref2) {
|
|
13006
13111
|
var _parameters$isSSR;
|
|
13007
13112
|
var _ref2$options = _ref2.options,
|
|
13008
13113
|
options = _ref2$options === void 0 ? {} : _ref2$options,
|
|
@@ -13340,5 +13445,5 @@ function VerticalSteps(_ref) {
|
|
|
13340
13445
|
VerticalSteps.Step = Step;
|
|
13341
13446
|
VerticalSteps.BorderlessStep = BorderlessStep;
|
|
13342
13447
|
|
|
13343
|
-
export { ActionCard, Actions, Autocomplete, Avatar, BottomSheet, Button, ButtonBadge, CardModal, Center, Checkbox, ChoicesElements, CloseIconButton, DatePicker, DialogModal, DocumentPicker, Emoji, ExternalAppLink, ExternalLink, FilePicker, FlatList, Flex, FullscreenModal, GoogleMapsApiKeyProvider, GoogleMapsAutocompleteProvider, GroupTags, HStack, Highlight, Icon, IconButton, Image, ImagePicker, InfoCard, InputAddress, InputEmail, InputFeedback, InputField, InputIban, InputIcon, InputNumber, InputPassword, InputPhone, InputPressable, InputTag, InputText, KittBreakpointNameEnum, KittBreakpoints, KittBreakpointsMax, KittMapConfigProvider, KittNativeBaseProvider, KittThemeDecorator, KittThemeProvider, Label, ListItem, LoaderIcon, MapMarker, MapMarkerVariantEnum, MatchWindowSize, Message, ModalBehaviour, NativeOnlyFlatList, NavigationBottomSheet, NavigationModal, Notification, Overlay, PageLoader, Picker, Pressable, RadioWithRef as Radio, RadioButtonGroup, ScrollView, DeprecatedSection as Section, SectionList, SegmentedProgressBar, Skeleton, SpinningIcon, Stack, StaticMap, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, SwitchBreakpoints, TabBar, Tag, TextArea, TimePicker, ToastComponent, Toggle, Tooltip, TopNavBar, Typography, TypographyEmoji, TypographyIcon, TypographyLink, VStack, VerticalSteps, View, createChoicesComponent, createResponsiveStyleFromProp, getStaticMapImageUrl, getValueForBreakpoint, hex2rgba, matchWindowSize, storyPadding, theme, useBottomSheet, useBreakpointValue, useCurrentBreakpointName, useGetStaticMapImageUrl, useKittMapConfig, useKittTheme, useMatchWindowSize, useOpenExternalLink, useStaticBottomSheet, useStoryBlockColor, useTheme };
|
|
13448
|
+
export { ActionCard, Actions, Autocomplete, Avatar, BottomSheet, Button, ButtonBadge, CardModal, Center, Checkbox, ChoicesElements, CloseIconButton, DatePicker, DialogModal, DocumentPicker, Emoji, ExternalAppLink, ExternalLink, FilePicker, FlatList, Flex, FullscreenModal, GoogleMapsApiKeyProvider, GoogleMapsAutocompleteProvider, GroupTags, HStack, Highlight, Icon, IconButton, Image, ImagePicker, InfoCard, InputAddress, InputEmail, InputFeedback, InputField, InputIban, InputIcon, InputNumber, InputPassword, InputPhone, InputPressable, InputTag, InputText, KittBreakpointNameEnum, KittBreakpoints, KittBreakpointsMax, KittMapConfigProvider, KittNativeBaseProvider, KittThemeDecorator, KittThemeProvider, Label, ListItem, LoaderIcon, MapMarker, MapMarkerVariantEnum, MatchWindowSize, Message, ModalBehaviour, NativeOnlyFlatList, NavigationBottomSheet, NavigationModal, Notification, Overlay, PageLoader, Picker, Pressable, RadioWithRef as Radio, RadioButtonGroup, ScrollView, DeprecatedSection as Section, SectionList, SegmentedProgressBar, Skeleton, SpinningIcon, Stack, StaticMap, Sticker, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, SwitchBreakpoints, TabBar, Tag, TextArea, TimePicker, ToastComponent, Toggle, Tooltip, TopNavBar, Typography, TypographyEmoji, TypographyIcon, TypographyLink, VStack, VerticalSteps, View, createChoicesComponent, createResponsiveStyleFromProp, getStaticMapImageUrl, getValueForBreakpoint, hex2rgba, matchWindowSize, storyPadding, theme, useBottomSheet, useBreakpointValue, useCurrentBreakpointName, useGetStaticMapImageUrl, useKittMapConfig, useKittTheme, useMatchWindowSize, useOpenExternalLink, useStaticBottomSheet, useStoryBlockColor, useTheme };
|
|
13344
13449
|
//# sourceMappingURL=index.es.web.js.map
|