@ornikar/kitt-universal 23.2.5 → 23.3.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 +26 -0
- package/dist/definitions/Tag/Tag.d.ts +10 -6
- package/dist/definitions/Tag/Tag.d.ts.map +1 -1
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +46 -81
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/input.d.ts +1 -1
- package/dist/definitions/themes/late-ocean/input.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/tag.d.ts +22 -14
- package/dist/definitions/themes/late-ocean/tag.d.ts.map +1 -1
- package/dist/definitions/typography/Typography.d.ts +11 -11
- package/dist/index-metro.es.android.js +157 -160
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +157 -160
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-20.10.cjs.js +157 -160
- package/dist/index-node-20.10.cjs.js.map +1 -1
- package/dist/index-node-20.10.cjs.web.js +157 -160
- package/dist/index-node-20.10.cjs.web.js.map +1 -1
- package/dist/index-node-20.10.es.mjs +157 -160
- package/dist/index-node-20.10.es.mjs.map +1 -1
- package/dist/index-node-20.10.es.web.mjs +157 -160
- package/dist/index-node-20.10.es.web.mjs.map +1 -1
- package/dist/index.es.js +158 -161
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +158 -161
- package/dist/index.es.web.js.map +1 -1
- package/dist/linaria-themes-metro.es.android.js +40 -46
- package/dist/linaria-themes-metro.es.android.js.map +1 -1
- package/dist/linaria-themes-metro.es.ios.js +40 -46
- package/dist/linaria-themes-metro.es.ios.js.map +1 -1
- package/dist/linaria-themes-node-20.10.cjs.js +40 -46
- package/dist/linaria-themes-node-20.10.cjs.js.map +1 -1
- package/dist/linaria-themes-node-20.10.cjs.web.js +40 -46
- package/dist/linaria-themes-node-20.10.cjs.web.js.map +1 -1
- package/dist/linaria-themes-node-20.10.es.mjs +40 -46
- package/dist/linaria-themes-node-20.10.es.mjs.map +1 -1
- package/dist/linaria-themes-node-20.10.es.web.mjs +40 -46
- package/dist/linaria-themes-node-20.10.es.web.mjs.map +1 -1
- package/dist/linaria-themes.es.js +40 -46
- package/dist/linaria-themes.es.js.map +1 -1
- package/dist/linaria-themes.es.web.js +40 -46
- package/dist/linaria-themes.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -1001,7 +1001,7 @@ const webAnimationDuration = '200ms';
|
|
|
1001
1001
|
const webAnimationTimingFunction = 'ease-in-out';
|
|
1002
1002
|
const webAnimationProperties = ['border-color', 'background-color'];
|
|
1003
1003
|
const input = {
|
|
1004
|
-
|
|
1004
|
+
height: 40,
|
|
1005
1005
|
color: {
|
|
1006
1006
|
selection: lateOceanColorPalette['violine.9'],
|
|
1007
1007
|
placeholder: lateOceanColorPalette['eggshell.9']
|
|
@@ -1016,7 +1016,7 @@ const input = {
|
|
|
1016
1016
|
},
|
|
1017
1017
|
padding: {
|
|
1018
1018
|
horizontal: 16,
|
|
1019
|
-
vertical:
|
|
1019
|
+
vertical: 6
|
|
1020
1020
|
},
|
|
1021
1021
|
transition: {
|
|
1022
1022
|
properties: webAnimationProperties,
|
|
@@ -1631,57 +1631,51 @@ const skeleton$1 = {
|
|
|
1631
1631
|
};
|
|
1632
1632
|
|
|
1633
1633
|
const tag = {
|
|
1634
|
-
borderRadius:
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
fill: {
|
|
1640
|
-
backgroundColor: lateOceanColorPalette.moonPurpleLight1,
|
|
1641
|
-
borderWidth: 0,
|
|
1642
|
-
borderColor: colors.transparent
|
|
1643
|
-
},
|
|
1644
|
-
outline: {
|
|
1645
|
-
backgroundColor: colors.transparent,
|
|
1646
|
-
borderWidth: 1,
|
|
1647
|
-
borderColor: colors.primary
|
|
1648
|
-
}
|
|
1634
|
+
borderRadius: 16,
|
|
1635
|
+
icon: {
|
|
1636
|
+
small: 16,
|
|
1637
|
+
medium: 16,
|
|
1638
|
+
large: 20
|
|
1649
1639
|
},
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1640
|
+
withIcon: {
|
|
1641
|
+
small: {
|
|
1642
|
+
paddingLeft: 2,
|
|
1643
|
+
paddingRight: 8,
|
|
1644
|
+
height: 20
|
|
1655
1645
|
},
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
}
|
|
1661
|
-
},
|
|
1662
|
-
danger: {
|
|
1663
|
-
fill: {
|
|
1664
|
-
backgroundColor: colors.danger,
|
|
1665
|
-
borderWidth: 0,
|
|
1666
|
-
borderColor: colors.transparent
|
|
1646
|
+
medium: {
|
|
1647
|
+
paddingLeft: 4,
|
|
1648
|
+
paddingRight: 8,
|
|
1649
|
+
height: 24
|
|
1667
1650
|
},
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1651
|
+
large: {
|
|
1652
|
+
paddingLeft: 6,
|
|
1653
|
+
paddingRight: 8,
|
|
1654
|
+
height: 32
|
|
1672
1655
|
}
|
|
1673
1656
|
},
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1657
|
+
withoutIcon: {
|
|
1658
|
+
small: {
|
|
1659
|
+
paddingLeft: 8,
|
|
1660
|
+
paddingRight: 8,
|
|
1661
|
+
height: 20
|
|
1679
1662
|
},
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1663
|
+
medium: {
|
|
1664
|
+
paddingLeft: 8,
|
|
1665
|
+
paddingRight: 8,
|
|
1666
|
+
height: 22
|
|
1667
|
+
},
|
|
1668
|
+
large: {
|
|
1669
|
+
paddingLeft: 8,
|
|
1670
|
+
paddingRight: 8,
|
|
1671
|
+
height: 28
|
|
1684
1672
|
}
|
|
1673
|
+
},
|
|
1674
|
+
fill: {
|
|
1675
|
+
borderWidth: 0
|
|
1676
|
+
},
|
|
1677
|
+
outline: {
|
|
1678
|
+
borderWidth: 1
|
|
1685
1679
|
}
|
|
1686
1680
|
};
|
|
1687
1681
|
|
|
@@ -7060,48 +7054,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
7060
7054
|
}
|
|
7061
7055
|
}
|
|
7062
7056
|
},
|
|
7063
|
-
tag: {
|
|
7064
|
-
primary: {
|
|
7065
|
-
fill: {
|
|
7066
|
-
backgroundColor: theme.tag.primary.fill.backgroundColor,
|
|
7067
|
-
borderColor: theme.tag.primary.fill.borderColor
|
|
7068
|
-
},
|
|
7069
|
-
outline: {
|
|
7070
|
-
backgroundColor: theme.tag.primary.outline.backgroundColor,
|
|
7071
|
-
borderColor: theme.tag.primary.outline.borderColor
|
|
7072
|
-
}
|
|
7073
|
-
},
|
|
7074
|
-
default: {
|
|
7075
|
-
fill: {
|
|
7076
|
-
backgroundColor: theme.tag.default.fill.backgroundColor,
|
|
7077
|
-
borderColor: theme.tag.default.fill.borderColor
|
|
7078
|
-
},
|
|
7079
|
-
outline: {
|
|
7080
|
-
backgroundColor: theme.tag.default.outline.backgroundColor,
|
|
7081
|
-
borderColor: theme.tag.default.outline.borderColor
|
|
7082
|
-
}
|
|
7083
|
-
},
|
|
7084
|
-
danger: {
|
|
7085
|
-
fill: {
|
|
7086
|
-
backgroundColor: theme.tag.danger.fill.backgroundColor,
|
|
7087
|
-
borderColor: theme.tag.danger.fill.borderColor
|
|
7088
|
-
},
|
|
7089
|
-
outline: {
|
|
7090
|
-
backgroundColor: theme.tag.danger.outline.backgroundColor,
|
|
7091
|
-
borderColor: theme.tag.danger.outline.borderColor
|
|
7092
|
-
}
|
|
7093
|
-
},
|
|
7094
|
-
warn: {
|
|
7095
|
-
fill: {
|
|
7096
|
-
backgroundColor: theme.tag.warn.fill.backgroundColor,
|
|
7097
|
-
borderColor: theme.tag.warn.fill.borderColor
|
|
7098
|
-
},
|
|
7099
|
-
outline: {
|
|
7100
|
-
backgroundColor: theme.tag.warn.outline.backgroundColor,
|
|
7101
|
-
borderColor: theme.tag.warn.outline.borderColor
|
|
7102
|
-
}
|
|
7103
|
-
}
|
|
7104
|
-
},
|
|
7105
7057
|
tooltip: {
|
|
7106
7058
|
backgroundColor: theme.tooltip.backgroundColor
|
|
7107
7059
|
},
|
|
@@ -7590,37 +7542,11 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
7590
7542
|
borderWidth: theme.listItem.borderWidth
|
|
7591
7543
|
},
|
|
7592
7544
|
tag: {
|
|
7593
|
-
|
|
7594
|
-
|
|
7595
|
-
borderWidth: theme.tag.primary.fill.borderWidth
|
|
7596
|
-
},
|
|
7597
|
-
outline: {
|
|
7598
|
-
borderWidth: theme.tag.primary.outline.borderWidth
|
|
7599
|
-
}
|
|
7545
|
+
fill: {
|
|
7546
|
+
borderWidth: theme.tag.fill.borderWidth
|
|
7600
7547
|
},
|
|
7601
|
-
|
|
7602
|
-
|
|
7603
|
-
borderWidth: theme.tag.default.fill.borderWidth
|
|
7604
|
-
},
|
|
7605
|
-
outline: {
|
|
7606
|
-
borderWidth: theme.tag.default.outline.borderWidth
|
|
7607
|
-
}
|
|
7608
|
-
},
|
|
7609
|
-
danger: {
|
|
7610
|
-
fill: {
|
|
7611
|
-
borderWidth: theme.tag.danger.fill.borderWidth
|
|
7612
|
-
},
|
|
7613
|
-
outline: {
|
|
7614
|
-
borderWidth: theme.tag.danger.outline.borderWidth
|
|
7615
|
-
}
|
|
7616
|
-
},
|
|
7617
|
-
warn: {
|
|
7618
|
-
fill: {
|
|
7619
|
-
borderWidth: theme.tag.warn.fill.borderWidth
|
|
7620
|
-
},
|
|
7621
|
-
outline: {
|
|
7622
|
-
borderWidth: theme.tag.warn.outline.borderWidth
|
|
7623
|
-
}
|
|
7548
|
+
outline: {
|
|
7549
|
+
borderWidth: theme.tag.outline.borderWidth
|
|
7624
7550
|
}
|
|
7625
7551
|
}
|
|
7626
7552
|
},
|
|
@@ -7667,7 +7593,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
7667
7593
|
}
|
|
7668
7594
|
},
|
|
7669
7595
|
datePicker: {
|
|
7670
|
-
|
|
7596
|
+
height: theme.forms.input.height,
|
|
7671
7597
|
day: {
|
|
7672
7598
|
minWidth: theme.forms.datePicker.day.minWidth
|
|
7673
7599
|
},
|
|
@@ -7679,7 +7605,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
7679
7605
|
}
|
|
7680
7606
|
},
|
|
7681
7607
|
input: {
|
|
7682
|
-
|
|
7608
|
+
height: theme.forms.input.height
|
|
7683
7609
|
},
|
|
7684
7610
|
radioButtonGroup: {
|
|
7685
7611
|
item: {
|
|
@@ -7718,6 +7644,39 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
7718
7644
|
pageLoader: {
|
|
7719
7645
|
size: theme.pageLoader.size
|
|
7720
7646
|
},
|
|
7647
|
+
tag: {
|
|
7648
|
+
small: {
|
|
7649
|
+
iconSize: theme.tag.icon.small
|
|
7650
|
+
},
|
|
7651
|
+
medium: {
|
|
7652
|
+
iconSize: theme.tag.icon.medium
|
|
7653
|
+
},
|
|
7654
|
+
large: {
|
|
7655
|
+
iconSize: theme.tag.icon.large
|
|
7656
|
+
},
|
|
7657
|
+
withIcon: {
|
|
7658
|
+
small: {
|
|
7659
|
+
height: theme.tag.withIcon.small.height
|
|
7660
|
+
},
|
|
7661
|
+
medium: {
|
|
7662
|
+
height: theme.tag.withIcon.medium.height
|
|
7663
|
+
},
|
|
7664
|
+
large: {
|
|
7665
|
+
height: theme.tag.withIcon.large.height
|
|
7666
|
+
}
|
|
7667
|
+
},
|
|
7668
|
+
withoutIcon: {
|
|
7669
|
+
small: {
|
|
7670
|
+
height: theme.tag.withoutIcon.small.height
|
|
7671
|
+
},
|
|
7672
|
+
medium: {
|
|
7673
|
+
height: theme.tag.withoutIcon.medium.height
|
|
7674
|
+
},
|
|
7675
|
+
large: {
|
|
7676
|
+
height: theme.tag.withoutIcon.large.height
|
|
7677
|
+
}
|
|
7678
|
+
}
|
|
7679
|
+
},
|
|
7721
7680
|
tooltip: {
|
|
7722
7681
|
maxWidth: theme.tooltip.maxWidth,
|
|
7723
7682
|
arrow: {
|
|
@@ -7810,8 +7769,34 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
7810
7769
|
horizontalPadding: theme.listItem.horizontalPadding
|
|
7811
7770
|
},
|
|
7812
7771
|
tag: {
|
|
7813
|
-
|
|
7814
|
-
|
|
7772
|
+
withoutIcon: {
|
|
7773
|
+
small: {
|
|
7774
|
+
paddingLeft: theme.tag.withoutIcon.small.paddingLeft,
|
|
7775
|
+
paddingRight: theme.tag.withoutIcon.small.paddingRight
|
|
7776
|
+
},
|
|
7777
|
+
medium: {
|
|
7778
|
+
paddingLeft: theme.tag.withoutIcon.medium.paddingLeft,
|
|
7779
|
+
paddingRight: theme.tag.withoutIcon.medium.paddingRight
|
|
7780
|
+
},
|
|
7781
|
+
large: {
|
|
7782
|
+
paddingLeft: theme.tag.withoutIcon.large.paddingLeft,
|
|
7783
|
+
paddingRight: theme.tag.withoutIcon.large.paddingRight
|
|
7784
|
+
}
|
|
7785
|
+
},
|
|
7786
|
+
withIcon: {
|
|
7787
|
+
small: {
|
|
7788
|
+
paddingLeft: theme.tag.withIcon.small.paddingLeft,
|
|
7789
|
+
paddingRight: theme.tag.withIcon.small.paddingRight
|
|
7790
|
+
},
|
|
7791
|
+
medium: {
|
|
7792
|
+
paddingLeft: theme.tag.withIcon.medium.paddingLeft,
|
|
7793
|
+
paddingRight: theme.tag.withIcon.medium.paddingRight
|
|
7794
|
+
},
|
|
7795
|
+
large: {
|
|
7796
|
+
paddingLeft: theme.tag.withIcon.large.paddingLeft,
|
|
7797
|
+
paddingRight: theme.tag.withIcon.large.paddingRight
|
|
7798
|
+
}
|
|
7799
|
+
}
|
|
7815
7800
|
},
|
|
7816
7801
|
tooltip: {
|
|
7817
7802
|
horizontalPadding: theme.tooltip.horizontalPadding,
|
|
@@ -8477,7 +8462,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
8477
8462
|
Input: {
|
|
8478
8463
|
baseStyle: {
|
|
8479
8464
|
width: '100%',
|
|
8480
|
-
|
|
8465
|
+
height: theme.forms.input.height,
|
|
8481
8466
|
py: theme.forms.input.padding.vertical,
|
|
8482
8467
|
px: theme.forms.input.padding.horizontal,
|
|
8483
8468
|
borderRadius: theme.forms.input.borderRadius,
|
|
@@ -9741,48 +9726,68 @@ const StoryGrid = {
|
|
|
9741
9726
|
Col: StoryGridCol
|
|
9742
9727
|
};
|
|
9743
9728
|
|
|
9744
|
-
|
|
9729
|
+
function useKittTheme() {
|
|
9730
|
+
return useMemo(() => {
|
|
9731
|
+
return {
|
|
9732
|
+
kitt: theme
|
|
9733
|
+
};
|
|
9734
|
+
}, []);
|
|
9735
|
+
}
|
|
9736
|
+
|
|
9737
|
+
const getTypography = size => {
|
|
9738
|
+
switch (size) {
|
|
9739
|
+
case 'small':
|
|
9740
|
+
return 'body-xs';
|
|
9741
|
+
case 'medium':
|
|
9742
|
+
return 'body-s';
|
|
9743
|
+
case 'large':
|
|
9744
|
+
default:
|
|
9745
|
+
return 'body-m';
|
|
9746
|
+
}
|
|
9747
|
+
};
|
|
9748
|
+
const typeToColor = (color, type) => {
|
|
9749
|
+
if (color) return color;
|
|
9745
9750
|
switch (type) {
|
|
9746
|
-
case 'danger':
|
|
9747
|
-
{
|
|
9748
|
-
return variant === 'outline' ? 'danger' : 'black';
|
|
9749
|
-
}
|
|
9750
|
-
case 'warn':
|
|
9751
|
-
{
|
|
9752
|
-
return variant === 'outline' ? 'warning' : 'black';
|
|
9753
|
-
}
|
|
9754
9751
|
case 'primary':
|
|
9755
|
-
|
|
9756
|
-
|
|
9757
|
-
|
|
9752
|
+
return 'violine';
|
|
9753
|
+
case 'warn':
|
|
9754
|
+
return 'sun';
|
|
9755
|
+
case 'danger':
|
|
9756
|
+
return 'coral';
|
|
9758
9757
|
case 'default':
|
|
9759
|
-
{
|
|
9760
|
-
return 'black';
|
|
9761
|
-
}
|
|
9762
9758
|
default:
|
|
9763
|
-
|
|
9764
|
-
return 'black';
|
|
9765
|
-
}
|
|
9759
|
+
return 'eggshell';
|
|
9766
9760
|
}
|
|
9767
9761
|
};
|
|
9768
9762
|
function Tag({
|
|
9769
9763
|
label,
|
|
9770
|
-
|
|
9764
|
+
icon,
|
|
9765
|
+
color,
|
|
9766
|
+
type,
|
|
9767
|
+
size = 'medium',
|
|
9771
9768
|
variant = 'fill'
|
|
9772
9769
|
}) {
|
|
9773
|
-
|
|
9770
|
+
const kittTheme = useKittTheme();
|
|
9771
|
+
const tagColor = typeToColor(color, type);
|
|
9772
|
+
return /*#__PURE__*/jsxs(HStack, {
|
|
9774
9773
|
alignSelf: "flex-start",
|
|
9775
9774
|
borderRadius: "kitt.tag.borderRadius",
|
|
9776
|
-
|
|
9777
|
-
|
|
9778
|
-
|
|
9779
|
-
|
|
9780
|
-
|
|
9781
|
-
|
|
9782
|
-
|
|
9783
|
-
|
|
9775
|
+
height: `kitt.tag.${icon ? 'withIcon' : 'withoutIcon'}.${size}.height`,
|
|
9776
|
+
paddingLeft: `kitt.tag.${icon ? 'withIcon' : 'withoutIcon'}.${size}.paddingLeft`,
|
|
9777
|
+
paddingRight: `kitt.tag.${icon ? 'withIcon' : 'withoutIcon'}.${size}.paddingRight`,
|
|
9778
|
+
backgroundColor: variant === 'fill' ? kittTheme.kitt.palettes.lateOcean[`${tagColor}.4`] : 'kitt.transparent',
|
|
9779
|
+
borderColor: kittTheme.kitt.palettes.lateOcean[`${tagColor}.6`],
|
|
9780
|
+
borderWidth: `kitt.tag.${variant}.borderWidth`,
|
|
9781
|
+
space: "kitt.1",
|
|
9782
|
+
alignItems: "center",
|
|
9783
|
+
children: [icon ? /*#__PURE__*/jsx(TypographyIcon, {
|
|
9784
|
+
icon: icon,
|
|
9785
|
+
size: `kitt.tag.${size}.iconSize`
|
|
9786
|
+
}) : null, /*#__PURE__*/jsx(Typography.Text, {
|
|
9787
|
+
base: getTypography(size),
|
|
9788
|
+
color: "black",
|
|
9784
9789
|
children: label
|
|
9785
|
-
})
|
|
9790
|
+
})]
|
|
9786
9791
|
});
|
|
9787
9792
|
}
|
|
9788
9793
|
|
|
@@ -10320,14 +10325,6 @@ function TypographyLink({
|
|
|
10320
10325
|
});
|
|
10321
10326
|
}
|
|
10322
10327
|
|
|
10323
|
-
function useKittTheme() {
|
|
10324
|
-
return useMemo(() => {
|
|
10325
|
-
return {
|
|
10326
|
-
kitt: theme
|
|
10327
|
-
};
|
|
10328
|
-
}, []);
|
|
10329
|
-
}
|
|
10330
|
-
|
|
10331
10328
|
function KittThemeProvider({
|
|
10332
10329
|
isSSR,
|
|
10333
10330
|
children,
|