@ornikar/kitt-universal 23.2.7 → 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 +9 -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 +43 -78
- package/dist/definitions/native-base/KittNativeBaseProvider.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/index-metro.es.android.js +152 -155
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +152 -155
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-20.10.cjs.js +152 -155
- package/dist/index-node-20.10.cjs.js.map +1 -1
- package/dist/index-node-20.10.cjs.web.js +152 -155
- package/dist/index-node-20.10.cjs.web.js.map +1 -1
- package/dist/index-node-20.10.es.mjs +152 -155
- package/dist/index-node-20.10.es.mjs.map +1 -1
- package/dist/index-node-20.10.es.web.mjs +152 -155
- package/dist/index-node-20.10.es.web.mjs.map +1 -1
- package/dist/index.es.js +153 -156
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +153 -156
- package/dist/index.es.web.js.map +1 -1
- package/dist/linaria-themes-metro.es.android.js +38 -44
- package/dist/linaria-themes-metro.es.android.js.map +1 -1
- package/dist/linaria-themes-metro.es.ios.js +38 -44
- package/dist/linaria-themes-metro.es.ios.js.map +1 -1
- package/dist/linaria-themes-node-20.10.cjs.js +38 -44
- package/dist/linaria-themes-node-20.10.cjs.js.map +1 -1
- package/dist/linaria-themes-node-20.10.cjs.web.js +38 -44
- package/dist/linaria-themes-node-20.10.cjs.web.js.map +1 -1
- package/dist/linaria-themes-node-20.10.es.mjs +38 -44
- package/dist/linaria-themes-node-20.10.es.mjs.map +1 -1
- package/dist/linaria-themes-node-20.10.es.web.mjs +38 -44
- package/dist/linaria-themes-node-20.10.es.web.mjs.map +1 -1
- package/dist/linaria-themes.es.js +38 -44
- package/dist/linaria-themes.es.js.map +1 -1
- package/dist/linaria-themes.es.web.js +38 -44
- package/dist/linaria-themes.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -1659,57 +1659,51 @@ var skeleton = {
|
|
|
1659
1659
|
};
|
|
1660
1660
|
|
|
1661
1661
|
var tag = {
|
|
1662
|
-
borderRadius:
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
fill: {
|
|
1668
|
-
backgroundColor: lateOceanColorPalette.moonPurpleLight1,
|
|
1669
|
-
borderWidth: 0,
|
|
1670
|
-
borderColor: colors.transparent
|
|
1671
|
-
},
|
|
1672
|
-
outline: {
|
|
1673
|
-
backgroundColor: colors.transparent,
|
|
1674
|
-
borderWidth: 1,
|
|
1675
|
-
borderColor: colors.primary
|
|
1676
|
-
}
|
|
1662
|
+
borderRadius: 16,
|
|
1663
|
+
icon: {
|
|
1664
|
+
small: 16,
|
|
1665
|
+
medium: 16,
|
|
1666
|
+
large: 20
|
|
1677
1667
|
},
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1668
|
+
withIcon: {
|
|
1669
|
+
small: {
|
|
1670
|
+
paddingLeft: 2,
|
|
1671
|
+
paddingRight: 8,
|
|
1672
|
+
height: 20
|
|
1683
1673
|
},
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
}
|
|
1689
|
-
},
|
|
1690
|
-
danger: {
|
|
1691
|
-
fill: {
|
|
1692
|
-
backgroundColor: colors.danger,
|
|
1693
|
-
borderWidth: 0,
|
|
1694
|
-
borderColor: colors.transparent
|
|
1674
|
+
medium: {
|
|
1675
|
+
paddingLeft: 4,
|
|
1676
|
+
paddingRight: 8,
|
|
1677
|
+
height: 24
|
|
1695
1678
|
},
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1679
|
+
large: {
|
|
1680
|
+
paddingLeft: 6,
|
|
1681
|
+
paddingRight: 8,
|
|
1682
|
+
height: 32
|
|
1700
1683
|
}
|
|
1701
1684
|
},
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1685
|
+
withoutIcon: {
|
|
1686
|
+
small: {
|
|
1687
|
+
paddingLeft: 8,
|
|
1688
|
+
paddingRight: 8,
|
|
1689
|
+
height: 20
|
|
1707
1690
|
},
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1691
|
+
medium: {
|
|
1692
|
+
paddingLeft: 8,
|
|
1693
|
+
paddingRight: 8,
|
|
1694
|
+
height: 22
|
|
1695
|
+
},
|
|
1696
|
+
large: {
|
|
1697
|
+
paddingLeft: 8,
|
|
1698
|
+
paddingRight: 8,
|
|
1699
|
+
height: 28
|
|
1712
1700
|
}
|
|
1701
|
+
},
|
|
1702
|
+
fill: {
|
|
1703
|
+
borderWidth: 0
|
|
1704
|
+
},
|
|
1705
|
+
outline: {
|
|
1706
|
+
borderWidth: 1
|
|
1713
1707
|
}
|
|
1714
1708
|
};
|
|
1715
1709
|
|
|
@@ -7927,48 +7921,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
7927
7921
|
}
|
|
7928
7922
|
}
|
|
7929
7923
|
},
|
|
7930
|
-
tag: {
|
|
7931
|
-
primary: {
|
|
7932
|
-
fill: {
|
|
7933
|
-
backgroundColor: theme.tag.primary.fill.backgroundColor,
|
|
7934
|
-
borderColor: theme.tag.primary.fill.borderColor
|
|
7935
|
-
},
|
|
7936
|
-
outline: {
|
|
7937
|
-
backgroundColor: theme.tag.primary.outline.backgroundColor,
|
|
7938
|
-
borderColor: theme.tag.primary.outline.borderColor
|
|
7939
|
-
}
|
|
7940
|
-
},
|
|
7941
|
-
"default": {
|
|
7942
|
-
fill: {
|
|
7943
|
-
backgroundColor: theme.tag["default"].fill.backgroundColor,
|
|
7944
|
-
borderColor: theme.tag["default"].fill.borderColor
|
|
7945
|
-
},
|
|
7946
|
-
outline: {
|
|
7947
|
-
backgroundColor: theme.tag["default"].outline.backgroundColor,
|
|
7948
|
-
borderColor: theme.tag["default"].outline.borderColor
|
|
7949
|
-
}
|
|
7950
|
-
},
|
|
7951
|
-
danger: {
|
|
7952
|
-
fill: {
|
|
7953
|
-
backgroundColor: theme.tag.danger.fill.backgroundColor,
|
|
7954
|
-
borderColor: theme.tag.danger.fill.borderColor
|
|
7955
|
-
},
|
|
7956
|
-
outline: {
|
|
7957
|
-
backgroundColor: theme.tag.danger.outline.backgroundColor,
|
|
7958
|
-
borderColor: theme.tag.danger.outline.borderColor
|
|
7959
|
-
}
|
|
7960
|
-
},
|
|
7961
|
-
warn: {
|
|
7962
|
-
fill: {
|
|
7963
|
-
backgroundColor: theme.tag.warn.fill.backgroundColor,
|
|
7964
|
-
borderColor: theme.tag.warn.fill.borderColor
|
|
7965
|
-
},
|
|
7966
|
-
outline: {
|
|
7967
|
-
backgroundColor: theme.tag.warn.outline.backgroundColor,
|
|
7968
|
-
borderColor: theme.tag.warn.outline.borderColor
|
|
7969
|
-
}
|
|
7970
|
-
}
|
|
7971
|
-
},
|
|
7972
7924
|
tooltip: {
|
|
7973
7925
|
backgroundColor: theme.tooltip.backgroundColor
|
|
7974
7926
|
},
|
|
@@ -8456,37 +8408,11 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
8456
8408
|
borderWidth: theme.listItem.borderWidth
|
|
8457
8409
|
},
|
|
8458
8410
|
tag: {
|
|
8459
|
-
|
|
8460
|
-
|
|
8461
|
-
borderWidth: theme.tag.primary.fill.borderWidth
|
|
8462
|
-
},
|
|
8463
|
-
outline: {
|
|
8464
|
-
borderWidth: theme.tag.primary.outline.borderWidth
|
|
8465
|
-
}
|
|
8466
|
-
},
|
|
8467
|
-
"default": {
|
|
8468
|
-
fill: {
|
|
8469
|
-
borderWidth: theme.tag["default"].fill.borderWidth
|
|
8470
|
-
},
|
|
8471
|
-
outline: {
|
|
8472
|
-
borderWidth: theme.tag["default"].outline.borderWidth
|
|
8473
|
-
}
|
|
8411
|
+
fill: {
|
|
8412
|
+
borderWidth: theme.tag.fill.borderWidth
|
|
8474
8413
|
},
|
|
8475
|
-
|
|
8476
|
-
|
|
8477
|
-
borderWidth: theme.tag.danger.fill.borderWidth
|
|
8478
|
-
},
|
|
8479
|
-
outline: {
|
|
8480
|
-
borderWidth: theme.tag.danger.outline.borderWidth
|
|
8481
|
-
}
|
|
8482
|
-
},
|
|
8483
|
-
warn: {
|
|
8484
|
-
fill: {
|
|
8485
|
-
borderWidth: theme.tag.warn.fill.borderWidth
|
|
8486
|
-
},
|
|
8487
|
-
outline: {
|
|
8488
|
-
borderWidth: theme.tag.warn.outline.borderWidth
|
|
8489
|
-
}
|
|
8414
|
+
outline: {
|
|
8415
|
+
borderWidth: theme.tag.outline.borderWidth
|
|
8490
8416
|
}
|
|
8491
8417
|
}
|
|
8492
8418
|
},
|
|
@@ -8581,6 +8507,39 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
8581
8507
|
pageLoader: {
|
|
8582
8508
|
size: theme.pageLoader.size
|
|
8583
8509
|
},
|
|
8510
|
+
tag: {
|
|
8511
|
+
small: {
|
|
8512
|
+
iconSize: theme.tag.icon.small
|
|
8513
|
+
},
|
|
8514
|
+
medium: {
|
|
8515
|
+
iconSize: theme.tag.icon.medium
|
|
8516
|
+
},
|
|
8517
|
+
large: {
|
|
8518
|
+
iconSize: theme.tag.icon.large
|
|
8519
|
+
},
|
|
8520
|
+
withIcon: {
|
|
8521
|
+
small: {
|
|
8522
|
+
height: theme.tag.withIcon.small.height
|
|
8523
|
+
},
|
|
8524
|
+
medium: {
|
|
8525
|
+
height: theme.tag.withIcon.medium.height
|
|
8526
|
+
},
|
|
8527
|
+
large: {
|
|
8528
|
+
height: theme.tag.withIcon.large.height
|
|
8529
|
+
}
|
|
8530
|
+
},
|
|
8531
|
+
withoutIcon: {
|
|
8532
|
+
small: {
|
|
8533
|
+
height: theme.tag.withoutIcon.small.height
|
|
8534
|
+
},
|
|
8535
|
+
medium: {
|
|
8536
|
+
height: theme.tag.withoutIcon.medium.height
|
|
8537
|
+
},
|
|
8538
|
+
large: {
|
|
8539
|
+
height: theme.tag.withoutIcon.large.height
|
|
8540
|
+
}
|
|
8541
|
+
}
|
|
8542
|
+
},
|
|
8584
8543
|
tooltip: {
|
|
8585
8544
|
maxWidth: theme.tooltip.maxWidth,
|
|
8586
8545
|
arrow: {
|
|
@@ -8670,8 +8629,34 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
8670
8629
|
horizontalPadding: theme.listItem.horizontalPadding
|
|
8671
8630
|
},
|
|
8672
8631
|
tag: {
|
|
8673
|
-
|
|
8674
|
-
|
|
8632
|
+
withoutIcon: {
|
|
8633
|
+
small: {
|
|
8634
|
+
paddingLeft: theme.tag.withoutIcon.small.paddingLeft,
|
|
8635
|
+
paddingRight: theme.tag.withoutIcon.small.paddingRight
|
|
8636
|
+
},
|
|
8637
|
+
medium: {
|
|
8638
|
+
paddingLeft: theme.tag.withoutIcon.medium.paddingLeft,
|
|
8639
|
+
paddingRight: theme.tag.withoutIcon.medium.paddingRight
|
|
8640
|
+
},
|
|
8641
|
+
large: {
|
|
8642
|
+
paddingLeft: theme.tag.withoutIcon.large.paddingLeft,
|
|
8643
|
+
paddingRight: theme.tag.withoutIcon.large.paddingRight
|
|
8644
|
+
}
|
|
8645
|
+
},
|
|
8646
|
+
withIcon: {
|
|
8647
|
+
small: {
|
|
8648
|
+
paddingLeft: theme.tag.withIcon.small.paddingLeft,
|
|
8649
|
+
paddingRight: theme.tag.withIcon.small.paddingRight
|
|
8650
|
+
},
|
|
8651
|
+
medium: {
|
|
8652
|
+
paddingLeft: theme.tag.withIcon.medium.paddingLeft,
|
|
8653
|
+
paddingRight: theme.tag.withIcon.medium.paddingRight
|
|
8654
|
+
},
|
|
8655
|
+
large: {
|
|
8656
|
+
paddingLeft: theme.tag.withIcon.large.paddingLeft,
|
|
8657
|
+
paddingRight: theme.tag.withIcon.large.paddingRight
|
|
8658
|
+
}
|
|
8659
|
+
}
|
|
8675
8660
|
},
|
|
8676
8661
|
tooltip: {
|
|
8677
8662
|
horizontalPadding: theme.tooltip.horizontalPadding,
|
|
@@ -10647,49 +10632,69 @@ var StoryGrid = {
|
|
|
10647
10632
|
Col: StoryGridCol
|
|
10648
10633
|
};
|
|
10649
10634
|
|
|
10650
|
-
|
|
10635
|
+
function useKittTheme() {
|
|
10636
|
+
return useMemo(function () {
|
|
10637
|
+
return {
|
|
10638
|
+
kitt: theme
|
|
10639
|
+
};
|
|
10640
|
+
}, []);
|
|
10641
|
+
}
|
|
10642
|
+
|
|
10643
|
+
var getTypography = function (size) {
|
|
10644
|
+
switch (size) {
|
|
10645
|
+
case 'small':
|
|
10646
|
+
return 'body-xs';
|
|
10647
|
+
case 'medium':
|
|
10648
|
+
return 'body-s';
|
|
10649
|
+
case 'large':
|
|
10650
|
+
default:
|
|
10651
|
+
return 'body-m';
|
|
10652
|
+
}
|
|
10653
|
+
};
|
|
10654
|
+
var typeToColor = function (color, type) {
|
|
10655
|
+
if (color) return color;
|
|
10651
10656
|
switch (type) {
|
|
10652
|
-
case 'danger':
|
|
10653
|
-
{
|
|
10654
|
-
return variant === 'outline' ? 'danger' : 'black';
|
|
10655
|
-
}
|
|
10656
|
-
case 'warn':
|
|
10657
|
-
{
|
|
10658
|
-
return variant === 'outline' ? 'warning' : 'black';
|
|
10659
|
-
}
|
|
10660
10657
|
case 'primary':
|
|
10661
|
-
|
|
10662
|
-
|
|
10663
|
-
|
|
10658
|
+
return 'violine';
|
|
10659
|
+
case 'warn':
|
|
10660
|
+
return 'sun';
|
|
10661
|
+
case 'danger':
|
|
10662
|
+
return 'coral';
|
|
10664
10663
|
case 'default':
|
|
10665
|
-
{
|
|
10666
|
-
return 'black';
|
|
10667
|
-
}
|
|
10668
10664
|
default:
|
|
10669
|
-
|
|
10670
|
-
return 'black';
|
|
10671
|
-
}
|
|
10665
|
+
return 'eggshell';
|
|
10672
10666
|
}
|
|
10673
10667
|
};
|
|
10674
10668
|
function Tag(_ref) {
|
|
10675
10669
|
var label = _ref.label,
|
|
10676
|
-
|
|
10677
|
-
|
|
10670
|
+
icon = _ref.icon,
|
|
10671
|
+
color = _ref.color,
|
|
10672
|
+
type = _ref.type,
|
|
10673
|
+
_ref$size = _ref.size,
|
|
10674
|
+
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
10678
10675
|
_ref$variant = _ref.variant,
|
|
10679
10676
|
variant = _ref$variant === void 0 ? 'fill' : _ref$variant;
|
|
10680
|
-
|
|
10677
|
+
var kittTheme = useKittTheme();
|
|
10678
|
+
var tagColor = typeToColor(color, type);
|
|
10679
|
+
return /*#__PURE__*/jsxs(HStack, {
|
|
10681
10680
|
alignSelf: "flex-start",
|
|
10682
10681
|
borderRadius: "kitt.tag.borderRadius",
|
|
10683
|
-
|
|
10684
|
-
|
|
10685
|
-
|
|
10686
|
-
|
|
10687
|
-
|
|
10688
|
-
|
|
10689
|
-
|
|
10690
|
-
|
|
10682
|
+
height: "kitt.tag.".concat(icon ? 'withIcon' : 'withoutIcon', ".").concat(size, ".height"),
|
|
10683
|
+
paddingLeft: "kitt.tag.".concat(icon ? 'withIcon' : 'withoutIcon', ".").concat(size, ".paddingLeft"),
|
|
10684
|
+
paddingRight: "kitt.tag.".concat(icon ? 'withIcon' : 'withoutIcon', ".").concat(size, ".paddingRight"),
|
|
10685
|
+
backgroundColor: variant === 'fill' ? kittTheme.kitt.palettes.lateOcean["".concat(tagColor, ".4")] : 'kitt.transparent',
|
|
10686
|
+
borderColor: kittTheme.kitt.palettes.lateOcean["".concat(tagColor, ".6")],
|
|
10687
|
+
borderWidth: "kitt.tag.".concat(variant, ".borderWidth"),
|
|
10688
|
+
space: "kitt.1",
|
|
10689
|
+
alignItems: "center",
|
|
10690
|
+
children: [icon ? /*#__PURE__*/jsx(TypographyIcon, {
|
|
10691
|
+
icon: icon,
|
|
10692
|
+
size: "kitt.tag.".concat(size, ".iconSize")
|
|
10693
|
+
}) : null, /*#__PURE__*/jsx(Typography.Text, {
|
|
10694
|
+
base: getTypography(size),
|
|
10695
|
+
color: "black",
|
|
10691
10696
|
children: label
|
|
10692
|
-
})
|
|
10697
|
+
})]
|
|
10693
10698
|
});
|
|
10694
10699
|
}
|
|
10695
10700
|
|
|
@@ -11276,14 +11281,6 @@ function TypographyLink(_ref) {
|
|
|
11276
11281
|
});
|
|
11277
11282
|
}
|
|
11278
11283
|
|
|
11279
|
-
function useKittTheme() {
|
|
11280
|
-
return useMemo(function () {
|
|
11281
|
-
return {
|
|
11282
|
-
kitt: theme
|
|
11283
|
-
};
|
|
11284
|
-
}, []);
|
|
11285
|
-
}
|
|
11286
|
-
|
|
11287
11284
|
function KittThemeProvider(_ref) {
|
|
11288
11285
|
var isSSR = _ref.isSSR,
|
|
11289
11286
|
children = _ref.children,
|