@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
|
@@ -1027,7 +1027,7 @@ const webAnimationDuration = '200ms';
|
|
|
1027
1027
|
const webAnimationTimingFunction = 'ease-in-out';
|
|
1028
1028
|
const webAnimationProperties = ['border-color', 'background-color'];
|
|
1029
1029
|
const input = {
|
|
1030
|
-
|
|
1030
|
+
height: 40,
|
|
1031
1031
|
color: {
|
|
1032
1032
|
selection: lateOceanColorPalette['violine.9'],
|
|
1033
1033
|
placeholder: lateOceanColorPalette['eggshell.9']
|
|
@@ -1042,7 +1042,7 @@ const input = {
|
|
|
1042
1042
|
},
|
|
1043
1043
|
padding: {
|
|
1044
1044
|
horizontal: 16,
|
|
1045
|
-
vertical:
|
|
1045
|
+
vertical: 6
|
|
1046
1046
|
},
|
|
1047
1047
|
transition: {
|
|
1048
1048
|
properties: webAnimationProperties,
|
|
@@ -1657,57 +1657,51 @@ const skeleton = {
|
|
|
1657
1657
|
};
|
|
1658
1658
|
|
|
1659
1659
|
const tag = {
|
|
1660
|
-
borderRadius:
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
fill: {
|
|
1666
|
-
backgroundColor: lateOceanColorPalette.moonPurpleLight1,
|
|
1667
|
-
borderWidth: 0,
|
|
1668
|
-
borderColor: colors.transparent
|
|
1669
|
-
},
|
|
1670
|
-
outline: {
|
|
1671
|
-
backgroundColor: colors.transparent,
|
|
1672
|
-
borderWidth: 1,
|
|
1673
|
-
borderColor: colors.primary
|
|
1674
|
-
}
|
|
1660
|
+
borderRadius: 16,
|
|
1661
|
+
icon: {
|
|
1662
|
+
small: 16,
|
|
1663
|
+
medium: 16,
|
|
1664
|
+
large: 20
|
|
1675
1665
|
},
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1666
|
+
withIcon: {
|
|
1667
|
+
small: {
|
|
1668
|
+
paddingLeft: 2,
|
|
1669
|
+
paddingRight: 8,
|
|
1670
|
+
height: 20
|
|
1681
1671
|
},
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
}
|
|
1687
|
-
},
|
|
1688
|
-
danger: {
|
|
1689
|
-
fill: {
|
|
1690
|
-
backgroundColor: colors.danger,
|
|
1691
|
-
borderWidth: 0,
|
|
1692
|
-
borderColor: colors.transparent
|
|
1672
|
+
medium: {
|
|
1673
|
+
paddingLeft: 4,
|
|
1674
|
+
paddingRight: 8,
|
|
1675
|
+
height: 24
|
|
1693
1676
|
},
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1677
|
+
large: {
|
|
1678
|
+
paddingLeft: 6,
|
|
1679
|
+
paddingRight: 8,
|
|
1680
|
+
height: 32
|
|
1698
1681
|
}
|
|
1699
1682
|
},
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1683
|
+
withoutIcon: {
|
|
1684
|
+
small: {
|
|
1685
|
+
paddingLeft: 8,
|
|
1686
|
+
paddingRight: 8,
|
|
1687
|
+
height: 20
|
|
1705
1688
|
},
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1689
|
+
medium: {
|
|
1690
|
+
paddingLeft: 8,
|
|
1691
|
+
paddingRight: 8,
|
|
1692
|
+
height: 22
|
|
1693
|
+
},
|
|
1694
|
+
large: {
|
|
1695
|
+
paddingLeft: 8,
|
|
1696
|
+
paddingRight: 8,
|
|
1697
|
+
height: 28
|
|
1710
1698
|
}
|
|
1699
|
+
},
|
|
1700
|
+
fill: {
|
|
1701
|
+
borderWidth: 0
|
|
1702
|
+
},
|
|
1703
|
+
outline: {
|
|
1704
|
+
borderWidth: 1
|
|
1711
1705
|
}
|
|
1712
1706
|
};
|
|
1713
1707
|
|
|
@@ -7730,48 +7724,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
7730
7724
|
}
|
|
7731
7725
|
}
|
|
7732
7726
|
},
|
|
7733
|
-
tag: {
|
|
7734
|
-
primary: {
|
|
7735
|
-
fill: {
|
|
7736
|
-
backgroundColor: theme.tag.primary.fill.backgroundColor,
|
|
7737
|
-
borderColor: theme.tag.primary.fill.borderColor
|
|
7738
|
-
},
|
|
7739
|
-
outline: {
|
|
7740
|
-
backgroundColor: theme.tag.primary.outline.backgroundColor,
|
|
7741
|
-
borderColor: theme.tag.primary.outline.borderColor
|
|
7742
|
-
}
|
|
7743
|
-
},
|
|
7744
|
-
default: {
|
|
7745
|
-
fill: {
|
|
7746
|
-
backgroundColor: theme.tag.default.fill.backgroundColor,
|
|
7747
|
-
borderColor: theme.tag.default.fill.borderColor
|
|
7748
|
-
},
|
|
7749
|
-
outline: {
|
|
7750
|
-
backgroundColor: theme.tag.default.outline.backgroundColor,
|
|
7751
|
-
borderColor: theme.tag.default.outline.borderColor
|
|
7752
|
-
}
|
|
7753
|
-
},
|
|
7754
|
-
danger: {
|
|
7755
|
-
fill: {
|
|
7756
|
-
backgroundColor: theme.tag.danger.fill.backgroundColor,
|
|
7757
|
-
borderColor: theme.tag.danger.fill.borderColor
|
|
7758
|
-
},
|
|
7759
|
-
outline: {
|
|
7760
|
-
backgroundColor: theme.tag.danger.outline.backgroundColor,
|
|
7761
|
-
borderColor: theme.tag.danger.outline.borderColor
|
|
7762
|
-
}
|
|
7763
|
-
},
|
|
7764
|
-
warn: {
|
|
7765
|
-
fill: {
|
|
7766
|
-
backgroundColor: theme.tag.warn.fill.backgroundColor,
|
|
7767
|
-
borderColor: theme.tag.warn.fill.borderColor
|
|
7768
|
-
},
|
|
7769
|
-
outline: {
|
|
7770
|
-
backgroundColor: theme.tag.warn.outline.backgroundColor,
|
|
7771
|
-
borderColor: theme.tag.warn.outline.borderColor
|
|
7772
|
-
}
|
|
7773
|
-
}
|
|
7774
|
-
},
|
|
7775
7727
|
tooltip: {
|
|
7776
7728
|
backgroundColor: theme.tooltip.backgroundColor
|
|
7777
7729
|
},
|
|
@@ -8260,37 +8212,11 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
8260
8212
|
borderWidth: theme.listItem.borderWidth
|
|
8261
8213
|
},
|
|
8262
8214
|
tag: {
|
|
8263
|
-
|
|
8264
|
-
|
|
8265
|
-
borderWidth: theme.tag.primary.fill.borderWidth
|
|
8266
|
-
},
|
|
8267
|
-
outline: {
|
|
8268
|
-
borderWidth: theme.tag.primary.outline.borderWidth
|
|
8269
|
-
}
|
|
8215
|
+
fill: {
|
|
8216
|
+
borderWidth: theme.tag.fill.borderWidth
|
|
8270
8217
|
},
|
|
8271
|
-
|
|
8272
|
-
|
|
8273
|
-
borderWidth: theme.tag.default.fill.borderWidth
|
|
8274
|
-
},
|
|
8275
|
-
outline: {
|
|
8276
|
-
borderWidth: theme.tag.default.outline.borderWidth
|
|
8277
|
-
}
|
|
8278
|
-
},
|
|
8279
|
-
danger: {
|
|
8280
|
-
fill: {
|
|
8281
|
-
borderWidth: theme.tag.danger.fill.borderWidth
|
|
8282
|
-
},
|
|
8283
|
-
outline: {
|
|
8284
|
-
borderWidth: theme.tag.danger.outline.borderWidth
|
|
8285
|
-
}
|
|
8286
|
-
},
|
|
8287
|
-
warn: {
|
|
8288
|
-
fill: {
|
|
8289
|
-
borderWidth: theme.tag.warn.fill.borderWidth
|
|
8290
|
-
},
|
|
8291
|
-
outline: {
|
|
8292
|
-
borderWidth: theme.tag.warn.outline.borderWidth
|
|
8293
|
-
}
|
|
8218
|
+
outline: {
|
|
8219
|
+
borderWidth: theme.tag.outline.borderWidth
|
|
8294
8220
|
}
|
|
8295
8221
|
}
|
|
8296
8222
|
},
|
|
@@ -8337,7 +8263,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
8337
8263
|
}
|
|
8338
8264
|
},
|
|
8339
8265
|
datePicker: {
|
|
8340
|
-
|
|
8266
|
+
height: theme.forms.input.height,
|
|
8341
8267
|
day: {
|
|
8342
8268
|
minWidth: theme.forms.datePicker.day.minWidth
|
|
8343
8269
|
},
|
|
@@ -8349,7 +8275,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
8349
8275
|
}
|
|
8350
8276
|
},
|
|
8351
8277
|
input: {
|
|
8352
|
-
|
|
8278
|
+
height: theme.forms.input.height
|
|
8353
8279
|
},
|
|
8354
8280
|
radioButtonGroup: {
|
|
8355
8281
|
item: {
|
|
@@ -8388,6 +8314,39 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
8388
8314
|
pageLoader: {
|
|
8389
8315
|
size: theme.pageLoader.size
|
|
8390
8316
|
},
|
|
8317
|
+
tag: {
|
|
8318
|
+
small: {
|
|
8319
|
+
iconSize: theme.tag.icon.small
|
|
8320
|
+
},
|
|
8321
|
+
medium: {
|
|
8322
|
+
iconSize: theme.tag.icon.medium
|
|
8323
|
+
},
|
|
8324
|
+
large: {
|
|
8325
|
+
iconSize: theme.tag.icon.large
|
|
8326
|
+
},
|
|
8327
|
+
withIcon: {
|
|
8328
|
+
small: {
|
|
8329
|
+
height: theme.tag.withIcon.small.height
|
|
8330
|
+
},
|
|
8331
|
+
medium: {
|
|
8332
|
+
height: theme.tag.withIcon.medium.height
|
|
8333
|
+
},
|
|
8334
|
+
large: {
|
|
8335
|
+
height: theme.tag.withIcon.large.height
|
|
8336
|
+
}
|
|
8337
|
+
},
|
|
8338
|
+
withoutIcon: {
|
|
8339
|
+
small: {
|
|
8340
|
+
height: theme.tag.withoutIcon.small.height
|
|
8341
|
+
},
|
|
8342
|
+
medium: {
|
|
8343
|
+
height: theme.tag.withoutIcon.medium.height
|
|
8344
|
+
},
|
|
8345
|
+
large: {
|
|
8346
|
+
height: theme.tag.withoutIcon.large.height
|
|
8347
|
+
}
|
|
8348
|
+
}
|
|
8349
|
+
},
|
|
8391
8350
|
tooltip: {
|
|
8392
8351
|
maxWidth: theme.tooltip.maxWidth,
|
|
8393
8352
|
arrow: {
|
|
@@ -8480,8 +8439,34 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
8480
8439
|
horizontalPadding: theme.listItem.horizontalPadding
|
|
8481
8440
|
},
|
|
8482
8441
|
tag: {
|
|
8483
|
-
|
|
8484
|
-
|
|
8442
|
+
withoutIcon: {
|
|
8443
|
+
small: {
|
|
8444
|
+
paddingLeft: theme.tag.withoutIcon.small.paddingLeft,
|
|
8445
|
+
paddingRight: theme.tag.withoutIcon.small.paddingRight
|
|
8446
|
+
},
|
|
8447
|
+
medium: {
|
|
8448
|
+
paddingLeft: theme.tag.withoutIcon.medium.paddingLeft,
|
|
8449
|
+
paddingRight: theme.tag.withoutIcon.medium.paddingRight
|
|
8450
|
+
},
|
|
8451
|
+
large: {
|
|
8452
|
+
paddingLeft: theme.tag.withoutIcon.large.paddingLeft,
|
|
8453
|
+
paddingRight: theme.tag.withoutIcon.large.paddingRight
|
|
8454
|
+
}
|
|
8455
|
+
},
|
|
8456
|
+
withIcon: {
|
|
8457
|
+
small: {
|
|
8458
|
+
paddingLeft: theme.tag.withIcon.small.paddingLeft,
|
|
8459
|
+
paddingRight: theme.tag.withIcon.small.paddingRight
|
|
8460
|
+
},
|
|
8461
|
+
medium: {
|
|
8462
|
+
paddingLeft: theme.tag.withIcon.medium.paddingLeft,
|
|
8463
|
+
paddingRight: theme.tag.withIcon.medium.paddingRight
|
|
8464
|
+
},
|
|
8465
|
+
large: {
|
|
8466
|
+
paddingLeft: theme.tag.withIcon.large.paddingLeft,
|
|
8467
|
+
paddingRight: theme.tag.withIcon.large.paddingRight
|
|
8468
|
+
}
|
|
8469
|
+
}
|
|
8485
8470
|
},
|
|
8486
8471
|
tooltip: {
|
|
8487
8472
|
horizontalPadding: theme.tooltip.horizontalPadding,
|
|
@@ -9147,7 +9132,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
9147
9132
|
Input: {
|
|
9148
9133
|
baseStyle: {
|
|
9149
9134
|
width: '100%',
|
|
9150
|
-
|
|
9135
|
+
height: theme.forms.input.height,
|
|
9151
9136
|
py: theme.forms.input.padding.vertical,
|
|
9152
9137
|
px: theme.forms.input.padding.horizontal,
|
|
9153
9138
|
borderRadius: theme.forms.input.borderRadius,
|
|
@@ -10462,48 +10447,68 @@ const StoryGrid = {
|
|
|
10462
10447
|
Col: StoryGridCol
|
|
10463
10448
|
};
|
|
10464
10449
|
|
|
10465
|
-
|
|
10450
|
+
function useKittTheme() {
|
|
10451
|
+
return React.useMemo(() => {
|
|
10452
|
+
return {
|
|
10453
|
+
kitt: theme
|
|
10454
|
+
};
|
|
10455
|
+
}, []);
|
|
10456
|
+
}
|
|
10457
|
+
|
|
10458
|
+
const getTypography = size => {
|
|
10459
|
+
switch (size) {
|
|
10460
|
+
case 'small':
|
|
10461
|
+
return 'body-xs';
|
|
10462
|
+
case 'medium':
|
|
10463
|
+
return 'body-s';
|
|
10464
|
+
case 'large':
|
|
10465
|
+
default:
|
|
10466
|
+
return 'body-m';
|
|
10467
|
+
}
|
|
10468
|
+
};
|
|
10469
|
+
const typeToColor = (color, type) => {
|
|
10470
|
+
if (color) return color;
|
|
10466
10471
|
switch (type) {
|
|
10467
|
-
case 'danger':
|
|
10468
|
-
{
|
|
10469
|
-
return variant === 'outline' ? 'danger' : 'black';
|
|
10470
|
-
}
|
|
10471
|
-
case 'warn':
|
|
10472
|
-
{
|
|
10473
|
-
return variant === 'outline' ? 'warning' : 'black';
|
|
10474
|
-
}
|
|
10475
10472
|
case 'primary':
|
|
10476
|
-
|
|
10477
|
-
|
|
10478
|
-
|
|
10473
|
+
return 'violine';
|
|
10474
|
+
case 'warn':
|
|
10475
|
+
return 'sun';
|
|
10476
|
+
case 'danger':
|
|
10477
|
+
return 'coral';
|
|
10479
10478
|
case 'default':
|
|
10480
|
-
{
|
|
10481
|
-
return 'black';
|
|
10482
|
-
}
|
|
10483
10479
|
default:
|
|
10484
|
-
|
|
10485
|
-
return 'black';
|
|
10486
|
-
}
|
|
10480
|
+
return 'eggshell';
|
|
10487
10481
|
}
|
|
10488
10482
|
};
|
|
10489
10483
|
function Tag({
|
|
10490
10484
|
label,
|
|
10491
|
-
|
|
10485
|
+
icon,
|
|
10486
|
+
color,
|
|
10487
|
+
type,
|
|
10488
|
+
size = 'medium',
|
|
10492
10489
|
variant = 'fill'
|
|
10493
10490
|
}) {
|
|
10494
|
-
|
|
10491
|
+
const kittTheme = useKittTheme();
|
|
10492
|
+
const tagColor = typeToColor(color, type);
|
|
10493
|
+
return /*#__PURE__*/jsxRuntime.jsxs(HStack, {
|
|
10495
10494
|
alignSelf: "flex-start",
|
|
10496
10495
|
borderRadius: "kitt.tag.borderRadius",
|
|
10497
|
-
|
|
10498
|
-
|
|
10499
|
-
|
|
10500
|
-
|
|
10501
|
-
|
|
10502
|
-
|
|
10503
|
-
|
|
10504
|
-
|
|
10496
|
+
height: `kitt.tag.${icon ? 'withIcon' : 'withoutIcon'}.${size}.height`,
|
|
10497
|
+
paddingLeft: `kitt.tag.${icon ? 'withIcon' : 'withoutIcon'}.${size}.paddingLeft`,
|
|
10498
|
+
paddingRight: `kitt.tag.${icon ? 'withIcon' : 'withoutIcon'}.${size}.paddingRight`,
|
|
10499
|
+
backgroundColor: variant === 'fill' ? kittTheme.kitt.palettes.lateOcean[`${tagColor}.4`] : 'kitt.transparent',
|
|
10500
|
+
borderColor: kittTheme.kitt.palettes.lateOcean[`${tagColor}.6`],
|
|
10501
|
+
borderWidth: `kitt.tag.${variant}.borderWidth`,
|
|
10502
|
+
space: "kitt.1",
|
|
10503
|
+
alignItems: "center",
|
|
10504
|
+
children: [icon ? /*#__PURE__*/jsxRuntime.jsx(TypographyIcon, {
|
|
10505
|
+
icon: icon,
|
|
10506
|
+
size: `kitt.tag.${size}.iconSize`
|
|
10507
|
+
}) : null, /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
|
|
10508
|
+
base: getTypography(size),
|
|
10509
|
+
color: "black",
|
|
10505
10510
|
children: label
|
|
10506
|
-
})
|
|
10511
|
+
})]
|
|
10507
10512
|
});
|
|
10508
10513
|
}
|
|
10509
10514
|
|
|
@@ -11071,14 +11076,6 @@ function TypographyLink({
|
|
|
11071
11076
|
});
|
|
11072
11077
|
}
|
|
11073
11078
|
|
|
11074
|
-
function useKittTheme() {
|
|
11075
|
-
return React.useMemo(() => {
|
|
11076
|
-
return {
|
|
11077
|
-
kitt: theme
|
|
11078
|
-
};
|
|
11079
|
-
}, []);
|
|
11080
|
-
}
|
|
11081
|
-
|
|
11082
11079
|
function KittThemeProvider({
|
|
11083
11080
|
isSSR,
|
|
11084
11081
|
children,
|