@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
|
@@ -1006,7 +1006,7 @@ const webAnimationDuration = '200ms';
|
|
|
1006
1006
|
const webAnimationTimingFunction = 'ease-in-out';
|
|
1007
1007
|
const webAnimationProperties = ['border-color', 'background-color'];
|
|
1008
1008
|
const input = {
|
|
1009
|
-
|
|
1009
|
+
height: 40,
|
|
1010
1010
|
color: {
|
|
1011
1011
|
selection: lateOceanColorPalette['violine.9'],
|
|
1012
1012
|
placeholder: lateOceanColorPalette['eggshell.9']
|
|
@@ -1021,7 +1021,7 @@ const input = {
|
|
|
1021
1021
|
},
|
|
1022
1022
|
padding: {
|
|
1023
1023
|
horizontal: 16,
|
|
1024
|
-
vertical:
|
|
1024
|
+
vertical: 6
|
|
1025
1025
|
},
|
|
1026
1026
|
transition: {
|
|
1027
1027
|
properties: webAnimationProperties,
|
|
@@ -1636,57 +1636,51 @@ const skeleton$1 = {
|
|
|
1636
1636
|
};
|
|
1637
1637
|
|
|
1638
1638
|
const tag = {
|
|
1639
|
-
borderRadius:
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
fill: {
|
|
1645
|
-
backgroundColor: lateOceanColorPalette.moonPurpleLight1,
|
|
1646
|
-
borderWidth: 0,
|
|
1647
|
-
borderColor: colors.transparent
|
|
1648
|
-
},
|
|
1649
|
-
outline: {
|
|
1650
|
-
backgroundColor: colors.transparent,
|
|
1651
|
-
borderWidth: 1,
|
|
1652
|
-
borderColor: colors.primary
|
|
1653
|
-
}
|
|
1639
|
+
borderRadius: 16,
|
|
1640
|
+
icon: {
|
|
1641
|
+
small: 16,
|
|
1642
|
+
medium: 16,
|
|
1643
|
+
large: 20
|
|
1654
1644
|
},
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1645
|
+
withIcon: {
|
|
1646
|
+
small: {
|
|
1647
|
+
paddingLeft: 2,
|
|
1648
|
+
paddingRight: 8,
|
|
1649
|
+
height: 20
|
|
1660
1650
|
},
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
}
|
|
1666
|
-
},
|
|
1667
|
-
danger: {
|
|
1668
|
-
fill: {
|
|
1669
|
-
backgroundColor: colors.danger,
|
|
1670
|
-
borderWidth: 0,
|
|
1671
|
-
borderColor: colors.transparent
|
|
1651
|
+
medium: {
|
|
1652
|
+
paddingLeft: 4,
|
|
1653
|
+
paddingRight: 8,
|
|
1654
|
+
height: 24
|
|
1672
1655
|
},
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1656
|
+
large: {
|
|
1657
|
+
paddingLeft: 6,
|
|
1658
|
+
paddingRight: 8,
|
|
1659
|
+
height: 32
|
|
1677
1660
|
}
|
|
1678
1661
|
},
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1662
|
+
withoutIcon: {
|
|
1663
|
+
small: {
|
|
1664
|
+
paddingLeft: 8,
|
|
1665
|
+
paddingRight: 8,
|
|
1666
|
+
height: 20
|
|
1684
1667
|
},
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1668
|
+
medium: {
|
|
1669
|
+
paddingLeft: 8,
|
|
1670
|
+
paddingRight: 8,
|
|
1671
|
+
height: 22
|
|
1672
|
+
},
|
|
1673
|
+
large: {
|
|
1674
|
+
paddingLeft: 8,
|
|
1675
|
+
paddingRight: 8,
|
|
1676
|
+
height: 28
|
|
1689
1677
|
}
|
|
1678
|
+
},
|
|
1679
|
+
fill: {
|
|
1680
|
+
borderWidth: 0
|
|
1681
|
+
},
|
|
1682
|
+
outline: {
|
|
1683
|
+
borderWidth: 1
|
|
1690
1684
|
}
|
|
1691
1685
|
};
|
|
1692
1686
|
|
|
@@ -7065,48 +7059,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
7065
7059
|
}
|
|
7066
7060
|
}
|
|
7067
7061
|
},
|
|
7068
|
-
tag: {
|
|
7069
|
-
primary: {
|
|
7070
|
-
fill: {
|
|
7071
|
-
backgroundColor: theme.tag.primary.fill.backgroundColor,
|
|
7072
|
-
borderColor: theme.tag.primary.fill.borderColor
|
|
7073
|
-
},
|
|
7074
|
-
outline: {
|
|
7075
|
-
backgroundColor: theme.tag.primary.outline.backgroundColor,
|
|
7076
|
-
borderColor: theme.tag.primary.outline.borderColor
|
|
7077
|
-
}
|
|
7078
|
-
},
|
|
7079
|
-
default: {
|
|
7080
|
-
fill: {
|
|
7081
|
-
backgroundColor: theme.tag.default.fill.backgroundColor,
|
|
7082
|
-
borderColor: theme.tag.default.fill.borderColor
|
|
7083
|
-
},
|
|
7084
|
-
outline: {
|
|
7085
|
-
backgroundColor: theme.tag.default.outline.backgroundColor,
|
|
7086
|
-
borderColor: theme.tag.default.outline.borderColor
|
|
7087
|
-
}
|
|
7088
|
-
},
|
|
7089
|
-
danger: {
|
|
7090
|
-
fill: {
|
|
7091
|
-
backgroundColor: theme.tag.danger.fill.backgroundColor,
|
|
7092
|
-
borderColor: theme.tag.danger.fill.borderColor
|
|
7093
|
-
},
|
|
7094
|
-
outline: {
|
|
7095
|
-
backgroundColor: theme.tag.danger.outline.backgroundColor,
|
|
7096
|
-
borderColor: theme.tag.danger.outline.borderColor
|
|
7097
|
-
}
|
|
7098
|
-
},
|
|
7099
|
-
warn: {
|
|
7100
|
-
fill: {
|
|
7101
|
-
backgroundColor: theme.tag.warn.fill.backgroundColor,
|
|
7102
|
-
borderColor: theme.tag.warn.fill.borderColor
|
|
7103
|
-
},
|
|
7104
|
-
outline: {
|
|
7105
|
-
backgroundColor: theme.tag.warn.outline.backgroundColor,
|
|
7106
|
-
borderColor: theme.tag.warn.outline.borderColor
|
|
7107
|
-
}
|
|
7108
|
-
}
|
|
7109
|
-
},
|
|
7110
7062
|
tooltip: {
|
|
7111
7063
|
backgroundColor: theme.tooltip.backgroundColor
|
|
7112
7064
|
},
|
|
@@ -7595,37 +7547,11 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
7595
7547
|
borderWidth: theme.listItem.borderWidth
|
|
7596
7548
|
},
|
|
7597
7549
|
tag: {
|
|
7598
|
-
|
|
7599
|
-
|
|
7600
|
-
borderWidth: theme.tag.primary.fill.borderWidth
|
|
7601
|
-
},
|
|
7602
|
-
outline: {
|
|
7603
|
-
borderWidth: theme.tag.primary.outline.borderWidth
|
|
7604
|
-
}
|
|
7550
|
+
fill: {
|
|
7551
|
+
borderWidth: theme.tag.fill.borderWidth
|
|
7605
7552
|
},
|
|
7606
|
-
|
|
7607
|
-
|
|
7608
|
-
borderWidth: theme.tag.default.fill.borderWidth
|
|
7609
|
-
},
|
|
7610
|
-
outline: {
|
|
7611
|
-
borderWidth: theme.tag.default.outline.borderWidth
|
|
7612
|
-
}
|
|
7613
|
-
},
|
|
7614
|
-
danger: {
|
|
7615
|
-
fill: {
|
|
7616
|
-
borderWidth: theme.tag.danger.fill.borderWidth
|
|
7617
|
-
},
|
|
7618
|
-
outline: {
|
|
7619
|
-
borderWidth: theme.tag.danger.outline.borderWidth
|
|
7620
|
-
}
|
|
7621
|
-
},
|
|
7622
|
-
warn: {
|
|
7623
|
-
fill: {
|
|
7624
|
-
borderWidth: theme.tag.warn.fill.borderWidth
|
|
7625
|
-
},
|
|
7626
|
-
outline: {
|
|
7627
|
-
borderWidth: theme.tag.warn.outline.borderWidth
|
|
7628
|
-
}
|
|
7553
|
+
outline: {
|
|
7554
|
+
borderWidth: theme.tag.outline.borderWidth
|
|
7629
7555
|
}
|
|
7630
7556
|
}
|
|
7631
7557
|
},
|
|
@@ -7672,7 +7598,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
7672
7598
|
}
|
|
7673
7599
|
},
|
|
7674
7600
|
datePicker: {
|
|
7675
|
-
|
|
7601
|
+
height: theme.forms.input.height,
|
|
7676
7602
|
day: {
|
|
7677
7603
|
minWidth: theme.forms.datePicker.day.minWidth
|
|
7678
7604
|
},
|
|
@@ -7684,7 +7610,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
7684
7610
|
}
|
|
7685
7611
|
},
|
|
7686
7612
|
input: {
|
|
7687
|
-
|
|
7613
|
+
height: theme.forms.input.height
|
|
7688
7614
|
},
|
|
7689
7615
|
radioButtonGroup: {
|
|
7690
7616
|
item: {
|
|
@@ -7723,6 +7649,39 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
7723
7649
|
pageLoader: {
|
|
7724
7650
|
size: theme.pageLoader.size
|
|
7725
7651
|
},
|
|
7652
|
+
tag: {
|
|
7653
|
+
small: {
|
|
7654
|
+
iconSize: theme.tag.icon.small
|
|
7655
|
+
},
|
|
7656
|
+
medium: {
|
|
7657
|
+
iconSize: theme.tag.icon.medium
|
|
7658
|
+
},
|
|
7659
|
+
large: {
|
|
7660
|
+
iconSize: theme.tag.icon.large
|
|
7661
|
+
},
|
|
7662
|
+
withIcon: {
|
|
7663
|
+
small: {
|
|
7664
|
+
height: theme.tag.withIcon.small.height
|
|
7665
|
+
},
|
|
7666
|
+
medium: {
|
|
7667
|
+
height: theme.tag.withIcon.medium.height
|
|
7668
|
+
},
|
|
7669
|
+
large: {
|
|
7670
|
+
height: theme.tag.withIcon.large.height
|
|
7671
|
+
}
|
|
7672
|
+
},
|
|
7673
|
+
withoutIcon: {
|
|
7674
|
+
small: {
|
|
7675
|
+
height: theme.tag.withoutIcon.small.height
|
|
7676
|
+
},
|
|
7677
|
+
medium: {
|
|
7678
|
+
height: theme.tag.withoutIcon.medium.height
|
|
7679
|
+
},
|
|
7680
|
+
large: {
|
|
7681
|
+
height: theme.tag.withoutIcon.large.height
|
|
7682
|
+
}
|
|
7683
|
+
}
|
|
7684
|
+
},
|
|
7726
7685
|
tooltip: {
|
|
7727
7686
|
maxWidth: theme.tooltip.maxWidth,
|
|
7728
7687
|
arrow: {
|
|
@@ -7815,8 +7774,34 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
7815
7774
|
horizontalPadding: theme.listItem.horizontalPadding
|
|
7816
7775
|
},
|
|
7817
7776
|
tag: {
|
|
7818
|
-
|
|
7819
|
-
|
|
7777
|
+
withoutIcon: {
|
|
7778
|
+
small: {
|
|
7779
|
+
paddingLeft: theme.tag.withoutIcon.small.paddingLeft,
|
|
7780
|
+
paddingRight: theme.tag.withoutIcon.small.paddingRight
|
|
7781
|
+
},
|
|
7782
|
+
medium: {
|
|
7783
|
+
paddingLeft: theme.tag.withoutIcon.medium.paddingLeft,
|
|
7784
|
+
paddingRight: theme.tag.withoutIcon.medium.paddingRight
|
|
7785
|
+
},
|
|
7786
|
+
large: {
|
|
7787
|
+
paddingLeft: theme.tag.withoutIcon.large.paddingLeft,
|
|
7788
|
+
paddingRight: theme.tag.withoutIcon.large.paddingRight
|
|
7789
|
+
}
|
|
7790
|
+
},
|
|
7791
|
+
withIcon: {
|
|
7792
|
+
small: {
|
|
7793
|
+
paddingLeft: theme.tag.withIcon.small.paddingLeft,
|
|
7794
|
+
paddingRight: theme.tag.withIcon.small.paddingRight
|
|
7795
|
+
},
|
|
7796
|
+
medium: {
|
|
7797
|
+
paddingLeft: theme.tag.withIcon.medium.paddingLeft,
|
|
7798
|
+
paddingRight: theme.tag.withIcon.medium.paddingRight
|
|
7799
|
+
},
|
|
7800
|
+
large: {
|
|
7801
|
+
paddingLeft: theme.tag.withIcon.large.paddingLeft,
|
|
7802
|
+
paddingRight: theme.tag.withIcon.large.paddingRight
|
|
7803
|
+
}
|
|
7804
|
+
}
|
|
7820
7805
|
},
|
|
7821
7806
|
tooltip: {
|
|
7822
7807
|
horizontalPadding: theme.tooltip.horizontalPadding,
|
|
@@ -8482,7 +8467,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
8482
8467
|
Input: {
|
|
8483
8468
|
baseStyle: {
|
|
8484
8469
|
width: '100%',
|
|
8485
|
-
|
|
8470
|
+
height: theme.forms.input.height,
|
|
8486
8471
|
py: theme.forms.input.padding.vertical,
|
|
8487
8472
|
px: theme.forms.input.padding.horizontal,
|
|
8488
8473
|
borderRadius: theme.forms.input.borderRadius,
|
|
@@ -9746,48 +9731,68 @@ const StoryGrid = {
|
|
|
9746
9731
|
Col: StoryGridCol
|
|
9747
9732
|
};
|
|
9748
9733
|
|
|
9749
|
-
|
|
9734
|
+
function useKittTheme() {
|
|
9735
|
+
return react.useMemo(() => {
|
|
9736
|
+
return {
|
|
9737
|
+
kitt: theme
|
|
9738
|
+
};
|
|
9739
|
+
}, []);
|
|
9740
|
+
}
|
|
9741
|
+
|
|
9742
|
+
const getTypography = size => {
|
|
9743
|
+
switch (size) {
|
|
9744
|
+
case 'small':
|
|
9745
|
+
return 'body-xs';
|
|
9746
|
+
case 'medium':
|
|
9747
|
+
return 'body-s';
|
|
9748
|
+
case 'large':
|
|
9749
|
+
default:
|
|
9750
|
+
return 'body-m';
|
|
9751
|
+
}
|
|
9752
|
+
};
|
|
9753
|
+
const typeToColor = (color, type) => {
|
|
9754
|
+
if (color) return color;
|
|
9750
9755
|
switch (type) {
|
|
9751
|
-
case 'danger':
|
|
9752
|
-
{
|
|
9753
|
-
return variant === 'outline' ? 'danger' : 'black';
|
|
9754
|
-
}
|
|
9755
|
-
case 'warn':
|
|
9756
|
-
{
|
|
9757
|
-
return variant === 'outline' ? 'warning' : 'black';
|
|
9758
|
-
}
|
|
9759
9756
|
case 'primary':
|
|
9760
|
-
|
|
9761
|
-
|
|
9762
|
-
|
|
9757
|
+
return 'violine';
|
|
9758
|
+
case 'warn':
|
|
9759
|
+
return 'sun';
|
|
9760
|
+
case 'danger':
|
|
9761
|
+
return 'coral';
|
|
9763
9762
|
case 'default':
|
|
9764
|
-
{
|
|
9765
|
-
return 'black';
|
|
9766
|
-
}
|
|
9767
9763
|
default:
|
|
9768
|
-
|
|
9769
|
-
return 'black';
|
|
9770
|
-
}
|
|
9764
|
+
return 'eggshell';
|
|
9771
9765
|
}
|
|
9772
9766
|
};
|
|
9773
9767
|
function Tag({
|
|
9774
9768
|
label,
|
|
9775
|
-
|
|
9769
|
+
icon,
|
|
9770
|
+
color,
|
|
9771
|
+
type,
|
|
9772
|
+
size = 'medium',
|
|
9776
9773
|
variant = 'fill'
|
|
9777
9774
|
}) {
|
|
9778
|
-
|
|
9775
|
+
const kittTheme = useKittTheme();
|
|
9776
|
+
const tagColor = typeToColor(color, type);
|
|
9777
|
+
return /*#__PURE__*/jsxRuntime.jsxs(HStack, {
|
|
9779
9778
|
alignSelf: "flex-start",
|
|
9780
9779
|
borderRadius: "kitt.tag.borderRadius",
|
|
9781
|
-
|
|
9782
|
-
|
|
9783
|
-
|
|
9784
|
-
|
|
9785
|
-
|
|
9786
|
-
|
|
9787
|
-
|
|
9788
|
-
|
|
9780
|
+
height: `kitt.tag.${icon ? 'withIcon' : 'withoutIcon'}.${size}.height`,
|
|
9781
|
+
paddingLeft: `kitt.tag.${icon ? 'withIcon' : 'withoutIcon'}.${size}.paddingLeft`,
|
|
9782
|
+
paddingRight: `kitt.tag.${icon ? 'withIcon' : 'withoutIcon'}.${size}.paddingRight`,
|
|
9783
|
+
backgroundColor: variant === 'fill' ? kittTheme.kitt.palettes.lateOcean[`${tagColor}.4`] : 'kitt.transparent',
|
|
9784
|
+
borderColor: kittTheme.kitt.palettes.lateOcean[`${tagColor}.6`],
|
|
9785
|
+
borderWidth: `kitt.tag.${variant}.borderWidth`,
|
|
9786
|
+
space: "kitt.1",
|
|
9787
|
+
alignItems: "center",
|
|
9788
|
+
children: [icon ? /*#__PURE__*/jsxRuntime.jsx(TypographyIcon, {
|
|
9789
|
+
icon: icon,
|
|
9790
|
+
size: `kitt.tag.${size}.iconSize`
|
|
9791
|
+
}) : null, /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
|
|
9792
|
+
base: getTypography(size),
|
|
9793
|
+
color: "black",
|
|
9789
9794
|
children: label
|
|
9790
|
-
})
|
|
9795
|
+
})]
|
|
9791
9796
|
});
|
|
9792
9797
|
}
|
|
9793
9798
|
|
|
@@ -10325,14 +10330,6 @@ function TypographyLink({
|
|
|
10325
10330
|
});
|
|
10326
10331
|
}
|
|
10327
10332
|
|
|
10328
|
-
function useKittTheme() {
|
|
10329
|
-
return react.useMemo(() => {
|
|
10330
|
-
return {
|
|
10331
|
-
kitt: theme
|
|
10332
|
-
};
|
|
10333
|
-
}, []);
|
|
10334
|
-
}
|
|
10335
|
-
|
|
10336
10333
|
function KittThemeProvider({
|
|
10337
10334
|
isSSR,
|
|
10338
10335
|
children,
|