@ornikar/kitt-universal 25.54.0 → 25.55.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 +14 -0
- package/dist/definitions/Button/Button.d.ts +2 -0
- package/dist/definitions/Button/Button.d.ts.map +1 -1
- package/dist/definitions/Button/ButtonContent.d.ts +1 -1
- package/dist/definitions/Button/ButtonContent.d.ts.map +1 -1
- package/dist/definitions/Button/ButtonPadding.d.ts +2 -2
- package/dist/definitions/Button/ButtonPadding.d.ts.map +1 -1
- package/dist/definitions/ButtonBadge/ButtonBadge.d.ts +7 -0
- package/dist/definitions/ButtonBadge/ButtonBadge.d.ts.map +1 -0
- package/dist/definitions/IconButton/IconButton.d.ts +2 -2
- package/dist/definitions/IconButton/IconButton.d.ts.map +1 -1
- package/dist/definitions/index.d.ts +2 -0
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +24 -3
- 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/button.d.ts +3 -1
- package/dist/definitions/themes/late-ocean/button.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/buttonBadge.d.ts +21 -0
- package/dist/definitions/themes/late-ocean/buttonBadge.d.ts.map +1 -0
- package/dist/index-metro.es.android.js +103 -39
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +103 -39
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-20.10.cjs.js +102 -37
- package/dist/index-node-20.10.cjs.js.map +1 -1
- package/dist/index-node-20.10.cjs.web.js +102 -37
- package/dist/index-node-20.10.cjs.web.js.map +1 -1
- package/dist/index-node-20.10.es.mjs +102 -38
- package/dist/index-node-20.10.es.mjs.map +1 -1
- package/dist/index-node-20.10.es.web.mjs +102 -38
- package/dist/index-node-20.10.es.web.mjs.map +1 -1
- package/dist/index.es.js +102 -39
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +102 -39
- package/dist/index.es.web.js.map +1 -1
- package/dist/linaria-themes-metro.es.android.js +28 -4
- package/dist/linaria-themes-metro.es.android.js.map +1 -1
- package/dist/linaria-themes-metro.es.ios.js +28 -4
- package/dist/linaria-themes-metro.es.ios.js.map +1 -1
- package/dist/linaria-themes-node-20.10.cjs.js +28 -4
- package/dist/linaria-themes-node-20.10.cjs.js.map +1 -1
- package/dist/linaria-themes-node-20.10.cjs.web.js +28 -4
- package/dist/linaria-themes-node-20.10.cjs.web.js.map +1 -1
- package/dist/linaria-themes-node-20.10.es.mjs +28 -4
- package/dist/linaria-themes-node-20.10.es.mjs.map +1 -1
- package/dist/linaria-themes-node-20.10.es.web.mjs +28 -4
- package/dist/linaria-themes-node-20.10.es.web.mjs.map +1 -1
- package/dist/linaria-themes.es.js +28 -4
- package/dist/linaria-themes.es.js.map +1 -1
- package/dist/linaria-themes.es.web.js +28 -4
- package/dist/linaria-themes.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -664,20 +664,25 @@ const button = {
|
|
|
664
664
|
},
|
|
665
665
|
padding: {
|
|
666
666
|
default: {
|
|
667
|
+
hasBadge: {
|
|
668
|
+
right: 8
|
|
669
|
+
},
|
|
667
670
|
horizontal: 16,
|
|
668
671
|
vertical: 7
|
|
669
672
|
},
|
|
670
673
|
large: {
|
|
674
|
+
hasBadge: {
|
|
675
|
+
right: 12
|
|
676
|
+
},
|
|
671
677
|
horizontal: 24,
|
|
672
678
|
vertical: 11
|
|
673
679
|
},
|
|
674
680
|
xLarge: {
|
|
681
|
+
hasBadge: {
|
|
682
|
+
right: 12
|
|
683
|
+
},
|
|
675
684
|
horizontal: 24,
|
|
676
685
|
vertical: 15
|
|
677
|
-
},
|
|
678
|
-
disabled: {
|
|
679
|
-
horizontal: 14,
|
|
680
|
-
vertical: 5
|
|
681
686
|
}
|
|
682
687
|
},
|
|
683
688
|
transition: {
|
|
@@ -787,6 +792,24 @@ const button = {
|
|
|
787
792
|
}
|
|
788
793
|
};
|
|
789
794
|
|
|
795
|
+
const buttonBadge = {
|
|
796
|
+
backgroundColor: lateOceanColorPalette['coral.10'],
|
|
797
|
+
dimensions: {
|
|
798
|
+
withBadge: {
|
|
799
|
+
width: 10,
|
|
800
|
+
height: 10
|
|
801
|
+
},
|
|
802
|
+
badgeCount: {
|
|
803
|
+
width: 20,
|
|
804
|
+
height: 20
|
|
805
|
+
}
|
|
806
|
+
},
|
|
807
|
+
borderRadius: {
|
|
808
|
+
withBadge: 5,
|
|
809
|
+
badgeCount: 10
|
|
810
|
+
}
|
|
811
|
+
};
|
|
812
|
+
|
|
790
813
|
const card = {
|
|
791
814
|
borderRadius: 20,
|
|
792
815
|
borderWidth: 2,
|
|
@@ -2502,6 +2525,7 @@ const theme = {
|
|
|
2502
2525
|
forms,
|
|
2503
2526
|
highlight,
|
|
2504
2527
|
icon,
|
|
2528
|
+
buttonBadge,
|
|
2505
2529
|
iconButton,
|
|
2506
2530
|
listItem,
|
|
2507
2531
|
pageLoader,
|
|
@@ -3065,6 +3089,37 @@ Typography.h4 = createHeading(4, 'header4');
|
|
|
3065
3089
|
/** @deprecated use Typography.Header6 */
|
|
3066
3090
|
Typography.h5 = createHeading(5, 'header5');
|
|
3067
3091
|
|
|
3092
|
+
function ButtonBadge({
|
|
3093
|
+
withBadge,
|
|
3094
|
+
badgeCount
|
|
3095
|
+
}) {
|
|
3096
|
+
if (withBadge) {
|
|
3097
|
+
return /*#__PURE__*/jsx(View, {
|
|
3098
|
+
height: "kitt.buttonBadge.dimensions.withBadge.height",
|
|
3099
|
+
width: "kitt.buttonBadge.dimensions.withBadge.width",
|
|
3100
|
+
backgroundColor: "kitt.buttonBadge.backgroundColor",
|
|
3101
|
+
borderRadius: "kitt.buttonBadge.borderRadius.withBadge"
|
|
3102
|
+
});
|
|
3103
|
+
}
|
|
3104
|
+
if (badgeCount && badgeCount > 0) {
|
|
3105
|
+
return /*#__PURE__*/jsx(VStack, {
|
|
3106
|
+
alignItems: "center",
|
|
3107
|
+
justifyContent: "center",
|
|
3108
|
+
height: "kitt.buttonBadge.dimensions.badgeCount.height",
|
|
3109
|
+
width: "kitt.buttonBadge.dimensions.badgeCount.width",
|
|
3110
|
+
backgroundColor: "kitt.buttonBadge.backgroundColor",
|
|
3111
|
+
borderRadius: "kitt.buttonBadge.borderRadius.badgeCount",
|
|
3112
|
+
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
3113
|
+
base: "body-xs",
|
|
3114
|
+
variant: "bold",
|
|
3115
|
+
color: "white",
|
|
3116
|
+
children: (badgeCount || 0) > 5 ? '+5' : badgeCount
|
|
3117
|
+
})
|
|
3118
|
+
});
|
|
3119
|
+
}
|
|
3120
|
+
return null;
|
|
3121
|
+
}
|
|
3122
|
+
|
|
3068
3123
|
function Icon({
|
|
3069
3124
|
icon,
|
|
3070
3125
|
size = 'kitt.icon.defaultSize',
|
|
@@ -3189,6 +3244,8 @@ function ButtonContentChildren({
|
|
|
3189
3244
|
icon,
|
|
3190
3245
|
iconPosition,
|
|
3191
3246
|
innerSpacing,
|
|
3247
|
+
withBadge,
|
|
3248
|
+
badgeCount,
|
|
3192
3249
|
color,
|
|
3193
3250
|
children
|
|
3194
3251
|
}) {
|
|
@@ -3233,7 +3290,13 @@ function ButtonContentChildren({
|
|
|
3233
3290
|
children: children
|
|
3234
3291
|
}), icon && iconPosition === 'right' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread(_objectSpread({}, buttonIconSharedProps), {}, {
|
|
3235
3292
|
icon: icon
|
|
3236
|
-
})) : null
|
|
3293
|
+
})) : null, withBadge || badgeCount && badgeCount > 0 ? /*#__PURE__*/jsx(View, {
|
|
3294
|
+
marginLeft: "kitt.2",
|
|
3295
|
+
children: /*#__PURE__*/jsx(ButtonBadge, {
|
|
3296
|
+
withBadge: withBadge,
|
|
3297
|
+
badgeCount: badgeCount
|
|
3298
|
+
})
|
|
3299
|
+
}) : null]
|
|
3237
3300
|
});
|
|
3238
3301
|
}
|
|
3239
3302
|
function ButtonContent(_ref) {
|
|
@@ -3271,22 +3334,19 @@ function ButtonContent(_ref) {
|
|
|
3271
3334
|
}
|
|
3272
3335
|
|
|
3273
3336
|
function getCurrentPaddingConfig({
|
|
3274
|
-
size
|
|
3275
|
-
isDisabled
|
|
3337
|
+
size
|
|
3276
3338
|
}) {
|
|
3277
3339
|
if (size === 'large') return 'large';
|
|
3278
3340
|
if (size === 'xLarge') return 'xLarge';
|
|
3279
|
-
if (isDisabled) return 'disabled';
|
|
3280
3341
|
return 'default';
|
|
3281
3342
|
}
|
|
3282
3343
|
function ButtonPadding({
|
|
3283
3344
|
children,
|
|
3284
3345
|
size,
|
|
3285
|
-
|
|
3346
|
+
hasBadge
|
|
3286
3347
|
}) {
|
|
3287
3348
|
const currentPaddingKey = getCurrentPaddingConfig({
|
|
3288
|
-
size
|
|
3289
|
-
isDisabled
|
|
3349
|
+
size
|
|
3290
3350
|
});
|
|
3291
3351
|
return /*#__PURE__*/jsx(View, {
|
|
3292
3352
|
position: "relative",
|
|
@@ -3295,6 +3355,7 @@ function ButtonPadding({
|
|
|
3295
3355
|
justifyContent: "center",
|
|
3296
3356
|
paddingX: `kitt.button.padding.${currentPaddingKey}.horizontal`,
|
|
3297
3357
|
paddingY: `kitt.button.padding.${currentPaddingKey}.vertical`,
|
|
3358
|
+
paddingRight: hasBadge ? `kitt.button.padding.${currentPaddingKey}.hasBadge.right` : undefined,
|
|
3298
3359
|
minHeight: "kitt.button.minHeight",
|
|
3299
3360
|
children: children
|
|
3300
3361
|
});
|
|
@@ -3417,6 +3478,8 @@ const Button = /*#__PURE__*/forwardRef(({
|
|
|
3417
3478
|
testID,
|
|
3418
3479
|
href,
|
|
3419
3480
|
hrefAttrs,
|
|
3481
|
+
withBadge,
|
|
3482
|
+
badgeCount,
|
|
3420
3483
|
accessibilityRole: _accessibilityRole = 'button',
|
|
3421
3484
|
innerSpacing: _innerSpacing = 'center',
|
|
3422
3485
|
isHoveredInternal,
|
|
@@ -3481,13 +3544,15 @@ const Button = /*#__PURE__*/forwardRef(({
|
|
|
3481
3544
|
isStretch: stretch,
|
|
3482
3545
|
children: /*#__PURE__*/jsxs(ButtonPadding, {
|
|
3483
3546
|
size: size,
|
|
3484
|
-
|
|
3547
|
+
hasBadge: Boolean(withBadge || badgeCount && badgeCount > 0),
|
|
3485
3548
|
children: [/*#__PURE__*/jsx(ButtonContent, {
|
|
3486
3549
|
type: _type,
|
|
3487
3550
|
variant: _variant,
|
|
3488
3551
|
isDisabled: disabled,
|
|
3489
3552
|
icon: icon,
|
|
3490
3553
|
iconPosition: _iconPosition,
|
|
3554
|
+
withBadge: withBadge,
|
|
3555
|
+
badgeCount: badgeCount,
|
|
3491
3556
|
isHovered: isHovered,
|
|
3492
3557
|
isPressed: isPressed,
|
|
3493
3558
|
isFocused: isFocused,
|
|
@@ -8501,7 +8566,7 @@ function IconButton({
|
|
|
8501
8566
|
ariaLabel,
|
|
8502
8567
|
accessibilityRole = 'button',
|
|
8503
8568
|
withBadge,
|
|
8504
|
-
|
|
8569
|
+
badgeCount,
|
|
8505
8570
|
isHoveredInternal,
|
|
8506
8571
|
isPressedInternal,
|
|
8507
8572
|
isFocusedInternal,
|
|
@@ -8564,32 +8629,13 @@ function IconButton({
|
|
|
8564
8629
|
icon: icon
|
|
8565
8630
|
})
|
|
8566
8631
|
})]
|
|
8567
|
-
}), withBadge ? /*#__PURE__*/jsx(View, {
|
|
8568
|
-
height: "10px",
|
|
8569
|
-
width: "10px",
|
|
8570
|
-
backgroundColor: lateOceanColorPalette['coral.10'],
|
|
8571
|
-
borderRadius: "kitt.iconButton.borderRadius",
|
|
8572
|
-
position: "absolute",
|
|
8573
|
-
top: "1px",
|
|
8574
|
-
right: "1px"
|
|
8575
|
-
}) : null, !withBadge && bagdeCount && bagdeCount > 0 ? /*#__PURE__*/jsx(View, {
|
|
8576
|
-
height: "20px",
|
|
8577
|
-
width: "20px",
|
|
8578
|
-
backgroundColor: lateOceanColorPalette['coral.10'],
|
|
8579
|
-
borderRadius: "kitt.iconButton.borderRadius",
|
|
8632
|
+
}), withBadge || badgeCount && badgeCount > 0 ? /*#__PURE__*/jsx(View, {
|
|
8580
8633
|
position: "absolute",
|
|
8581
|
-
top:
|
|
8582
|
-
right:
|
|
8583
|
-
children: /*#__PURE__*/jsx(
|
|
8584
|
-
|
|
8585
|
-
|
|
8586
|
-
marginTop: "2px",
|
|
8587
|
-
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
8588
|
-
base: "body-xs",
|
|
8589
|
-
variant: "bold",
|
|
8590
|
-
color: "white",
|
|
8591
|
-
children: bagdeCount > 5 ? '+5' : bagdeCount
|
|
8592
|
-
})
|
|
8634
|
+
top: withBadge ? '1px' : '-6px',
|
|
8635
|
+
right: withBadge ? '1px' : '-6px',
|
|
8636
|
+
children: /*#__PURE__*/jsx(ButtonBadge, {
|
|
8637
|
+
withBadge: withBadge,
|
|
8638
|
+
badgeCount: badgeCount
|
|
8593
8639
|
})
|
|
8594
8640
|
}) : null]
|
|
8595
8641
|
});
|
|
@@ -9580,6 +9626,9 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
9580
9626
|
backgroundColor: theme.skeleton.backgroundColor,
|
|
9581
9627
|
flareColor: theme.skeleton.flareColor
|
|
9582
9628
|
},
|
|
9629
|
+
buttonBadge: {
|
|
9630
|
+
backgroundColor: theme.buttonBadge.backgroundColor
|
|
9631
|
+
},
|
|
9583
9632
|
iconButton: {
|
|
9584
9633
|
borderColor: theme.iconButton.borderColor,
|
|
9585
9634
|
disabled: {
|
|
@@ -9767,6 +9816,9 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
9767
9816
|
button: {
|
|
9768
9817
|
borderRadius: theme.button.borderRadius
|
|
9769
9818
|
},
|
|
9819
|
+
buttonBadge: {
|
|
9820
|
+
borderRadius: theme.buttonBadge.borderRadius
|
|
9821
|
+
},
|
|
9770
9822
|
card: {
|
|
9771
9823
|
borderRadius: theme.card.borderRadius
|
|
9772
9824
|
},
|
|
@@ -10143,6 +10195,18 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
10143
10195
|
maxWidth: theme.button.maxWidth,
|
|
10144
10196
|
minHeight: theme.button.minHeight
|
|
10145
10197
|
},
|
|
10198
|
+
buttonBadge: {
|
|
10199
|
+
dimensions: {
|
|
10200
|
+
withBadge: {
|
|
10201
|
+
width: theme.buttonBadge.dimensions.withBadge.width,
|
|
10202
|
+
height: theme.buttonBadge.dimensions.withBadge.height
|
|
10203
|
+
},
|
|
10204
|
+
badgeCount: {
|
|
10205
|
+
width: theme.buttonBadge.dimensions.badgeCount.width,
|
|
10206
|
+
height: theme.buttonBadge.dimensions.badgeCount.height
|
|
10207
|
+
}
|
|
10208
|
+
}
|
|
10209
|
+
},
|
|
10146
10210
|
icon: theme.icon,
|
|
10147
10211
|
cardModal: {
|
|
10148
10212
|
header: {
|
|
@@ -13982,5 +14046,5 @@ function VerticalSteps(_ref) {
|
|
|
13982
14046
|
VerticalSteps.Step = Step;
|
|
13983
14047
|
VerticalSteps.BorderlessStep = BorderlessStep;
|
|
13984
14048
|
|
|
13985
|
-
export { ActionCard, Actions, Autocomplete, Avatar, BottomSheet, Button, 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, FlatList as NativeOnlyFlatList, 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, 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 };
|
|
14049
|
+
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, FlatList as NativeOnlyFlatList, 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, 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 };
|
|
13986
14050
|
//# sourceMappingURL=index-metro.es.ios.js.map
|