@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
|
@@ -1008,7 +1008,7 @@ const webAnimationDuration = '200ms';
|
|
|
1008
1008
|
const webAnimationTimingFunction = 'ease-in-out';
|
|
1009
1009
|
const webAnimationProperties = ['border-color', 'background-color'];
|
|
1010
1010
|
const input = {
|
|
1011
|
-
|
|
1011
|
+
height: 40,
|
|
1012
1012
|
color: {
|
|
1013
1013
|
selection: lateOceanColorPalette['violine.9'],
|
|
1014
1014
|
placeholder: lateOceanColorPalette['eggshell.9']
|
|
@@ -1023,7 +1023,7 @@ const input = {
|
|
|
1023
1023
|
},
|
|
1024
1024
|
padding: {
|
|
1025
1025
|
horizontal: 16,
|
|
1026
|
-
vertical:
|
|
1026
|
+
vertical: 6
|
|
1027
1027
|
},
|
|
1028
1028
|
transition: {
|
|
1029
1029
|
properties: webAnimationProperties,
|
|
@@ -1638,57 +1638,51 @@ const skeleton = {
|
|
|
1638
1638
|
};
|
|
1639
1639
|
|
|
1640
1640
|
const tag = {
|
|
1641
|
-
borderRadius:
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
fill: {
|
|
1647
|
-
backgroundColor: lateOceanColorPalette.moonPurpleLight1,
|
|
1648
|
-
borderWidth: 0,
|
|
1649
|
-
borderColor: colors.transparent
|
|
1650
|
-
},
|
|
1651
|
-
outline: {
|
|
1652
|
-
backgroundColor: colors.transparent,
|
|
1653
|
-
borderWidth: 1,
|
|
1654
|
-
borderColor: colors.primary
|
|
1655
|
-
}
|
|
1641
|
+
borderRadius: 16,
|
|
1642
|
+
icon: {
|
|
1643
|
+
small: 16,
|
|
1644
|
+
medium: 16,
|
|
1645
|
+
large: 20
|
|
1656
1646
|
},
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1647
|
+
withIcon: {
|
|
1648
|
+
small: {
|
|
1649
|
+
paddingLeft: 2,
|
|
1650
|
+
paddingRight: 8,
|
|
1651
|
+
height: 20
|
|
1662
1652
|
},
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
}
|
|
1668
|
-
},
|
|
1669
|
-
danger: {
|
|
1670
|
-
fill: {
|
|
1671
|
-
backgroundColor: colors.danger,
|
|
1672
|
-
borderWidth: 0,
|
|
1673
|
-
borderColor: colors.transparent
|
|
1653
|
+
medium: {
|
|
1654
|
+
paddingLeft: 4,
|
|
1655
|
+
paddingRight: 8,
|
|
1656
|
+
height: 24
|
|
1674
1657
|
},
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1658
|
+
large: {
|
|
1659
|
+
paddingLeft: 6,
|
|
1660
|
+
paddingRight: 8,
|
|
1661
|
+
height: 32
|
|
1679
1662
|
}
|
|
1680
1663
|
},
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1664
|
+
withoutIcon: {
|
|
1665
|
+
small: {
|
|
1666
|
+
paddingLeft: 8,
|
|
1667
|
+
paddingRight: 8,
|
|
1668
|
+
height: 20
|
|
1686
1669
|
},
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1670
|
+
medium: {
|
|
1671
|
+
paddingLeft: 8,
|
|
1672
|
+
paddingRight: 8,
|
|
1673
|
+
height: 22
|
|
1674
|
+
},
|
|
1675
|
+
large: {
|
|
1676
|
+
paddingLeft: 8,
|
|
1677
|
+
paddingRight: 8,
|
|
1678
|
+
height: 28
|
|
1691
1679
|
}
|
|
1680
|
+
},
|
|
1681
|
+
fill: {
|
|
1682
|
+
borderWidth: 0
|
|
1683
|
+
},
|
|
1684
|
+
outline: {
|
|
1685
|
+
borderWidth: 1
|
|
1692
1686
|
}
|
|
1693
1687
|
};
|
|
1694
1688
|
|
|
@@ -7662,48 +7656,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
7662
7656
|
}
|
|
7663
7657
|
}
|
|
7664
7658
|
},
|
|
7665
|
-
tag: {
|
|
7666
|
-
primary: {
|
|
7667
|
-
fill: {
|
|
7668
|
-
backgroundColor: theme.tag.primary.fill.backgroundColor,
|
|
7669
|
-
borderColor: theme.tag.primary.fill.borderColor
|
|
7670
|
-
},
|
|
7671
|
-
outline: {
|
|
7672
|
-
backgroundColor: theme.tag.primary.outline.backgroundColor,
|
|
7673
|
-
borderColor: theme.tag.primary.outline.borderColor
|
|
7674
|
-
}
|
|
7675
|
-
},
|
|
7676
|
-
default: {
|
|
7677
|
-
fill: {
|
|
7678
|
-
backgroundColor: theme.tag.default.fill.backgroundColor,
|
|
7679
|
-
borderColor: theme.tag.default.fill.borderColor
|
|
7680
|
-
},
|
|
7681
|
-
outline: {
|
|
7682
|
-
backgroundColor: theme.tag.default.outline.backgroundColor,
|
|
7683
|
-
borderColor: theme.tag.default.outline.borderColor
|
|
7684
|
-
}
|
|
7685
|
-
},
|
|
7686
|
-
danger: {
|
|
7687
|
-
fill: {
|
|
7688
|
-
backgroundColor: theme.tag.danger.fill.backgroundColor,
|
|
7689
|
-
borderColor: theme.tag.danger.fill.borderColor
|
|
7690
|
-
},
|
|
7691
|
-
outline: {
|
|
7692
|
-
backgroundColor: theme.tag.danger.outline.backgroundColor,
|
|
7693
|
-
borderColor: theme.tag.danger.outline.borderColor
|
|
7694
|
-
}
|
|
7695
|
-
},
|
|
7696
|
-
warn: {
|
|
7697
|
-
fill: {
|
|
7698
|
-
backgroundColor: theme.tag.warn.fill.backgroundColor,
|
|
7699
|
-
borderColor: theme.tag.warn.fill.borderColor
|
|
7700
|
-
},
|
|
7701
|
-
outline: {
|
|
7702
|
-
backgroundColor: theme.tag.warn.outline.backgroundColor,
|
|
7703
|
-
borderColor: theme.tag.warn.outline.borderColor
|
|
7704
|
-
}
|
|
7705
|
-
}
|
|
7706
|
-
},
|
|
7707
7659
|
tooltip: {
|
|
7708
7660
|
backgroundColor: theme.tooltip.backgroundColor
|
|
7709
7661
|
},
|
|
@@ -8191,37 +8143,11 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
8191
8143
|
borderWidth: theme.listItem.borderWidth
|
|
8192
8144
|
},
|
|
8193
8145
|
tag: {
|
|
8194
|
-
|
|
8195
|
-
|
|
8196
|
-
borderWidth: theme.tag.primary.fill.borderWidth
|
|
8197
|
-
},
|
|
8198
|
-
outline: {
|
|
8199
|
-
borderWidth: theme.tag.primary.outline.borderWidth
|
|
8200
|
-
}
|
|
8201
|
-
},
|
|
8202
|
-
default: {
|
|
8203
|
-
fill: {
|
|
8204
|
-
borderWidth: theme.tag.default.fill.borderWidth
|
|
8205
|
-
},
|
|
8206
|
-
outline: {
|
|
8207
|
-
borderWidth: theme.tag.default.outline.borderWidth
|
|
8208
|
-
}
|
|
8209
|
-
},
|
|
8210
|
-
danger: {
|
|
8211
|
-
fill: {
|
|
8212
|
-
borderWidth: theme.tag.danger.fill.borderWidth
|
|
8213
|
-
},
|
|
8214
|
-
outline: {
|
|
8215
|
-
borderWidth: theme.tag.danger.outline.borderWidth
|
|
8216
|
-
}
|
|
8146
|
+
fill: {
|
|
8147
|
+
borderWidth: theme.tag.fill.borderWidth
|
|
8217
8148
|
},
|
|
8218
|
-
|
|
8219
|
-
|
|
8220
|
-
borderWidth: theme.tag.warn.fill.borderWidth
|
|
8221
|
-
},
|
|
8222
|
-
outline: {
|
|
8223
|
-
borderWidth: theme.tag.warn.outline.borderWidth
|
|
8224
|
-
}
|
|
8149
|
+
outline: {
|
|
8150
|
+
borderWidth: theme.tag.outline.borderWidth
|
|
8225
8151
|
}
|
|
8226
8152
|
}
|
|
8227
8153
|
},
|
|
@@ -8265,7 +8191,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
8265
8191
|
}
|
|
8266
8192
|
},
|
|
8267
8193
|
datePicker: {
|
|
8268
|
-
|
|
8194
|
+
height: theme.forms.input.height,
|
|
8269
8195
|
day: {
|
|
8270
8196
|
minWidth: theme.forms.datePicker.day.minWidth
|
|
8271
8197
|
},
|
|
@@ -8277,7 +8203,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
8277
8203
|
}
|
|
8278
8204
|
},
|
|
8279
8205
|
input: {
|
|
8280
|
-
|
|
8206
|
+
height: theme.forms.input.height
|
|
8281
8207
|
},
|
|
8282
8208
|
radioButtonGroup: {
|
|
8283
8209
|
item: {
|
|
@@ -8316,6 +8242,39 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
8316
8242
|
pageLoader: {
|
|
8317
8243
|
size: theme.pageLoader.size
|
|
8318
8244
|
},
|
|
8245
|
+
tag: {
|
|
8246
|
+
small: {
|
|
8247
|
+
iconSize: theme.tag.icon.small
|
|
8248
|
+
},
|
|
8249
|
+
medium: {
|
|
8250
|
+
iconSize: theme.tag.icon.medium
|
|
8251
|
+
},
|
|
8252
|
+
large: {
|
|
8253
|
+
iconSize: theme.tag.icon.large
|
|
8254
|
+
},
|
|
8255
|
+
withIcon: {
|
|
8256
|
+
small: {
|
|
8257
|
+
height: theme.tag.withIcon.small.height
|
|
8258
|
+
},
|
|
8259
|
+
medium: {
|
|
8260
|
+
height: theme.tag.withIcon.medium.height
|
|
8261
|
+
},
|
|
8262
|
+
large: {
|
|
8263
|
+
height: theme.tag.withIcon.large.height
|
|
8264
|
+
}
|
|
8265
|
+
},
|
|
8266
|
+
withoutIcon: {
|
|
8267
|
+
small: {
|
|
8268
|
+
height: theme.tag.withoutIcon.small.height
|
|
8269
|
+
},
|
|
8270
|
+
medium: {
|
|
8271
|
+
height: theme.tag.withoutIcon.medium.height
|
|
8272
|
+
},
|
|
8273
|
+
large: {
|
|
8274
|
+
height: theme.tag.withoutIcon.large.height
|
|
8275
|
+
}
|
|
8276
|
+
}
|
|
8277
|
+
},
|
|
8319
8278
|
tooltip: {
|
|
8320
8279
|
maxWidth: theme.tooltip.maxWidth,
|
|
8321
8280
|
arrow: {
|
|
@@ -8405,8 +8364,34 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
8405
8364
|
horizontalPadding: theme.listItem.horizontalPadding
|
|
8406
8365
|
},
|
|
8407
8366
|
tag: {
|
|
8408
|
-
|
|
8409
|
-
|
|
8367
|
+
withoutIcon: {
|
|
8368
|
+
small: {
|
|
8369
|
+
paddingLeft: theme.tag.withoutIcon.small.paddingLeft,
|
|
8370
|
+
paddingRight: theme.tag.withoutIcon.small.paddingRight
|
|
8371
|
+
},
|
|
8372
|
+
medium: {
|
|
8373
|
+
paddingLeft: theme.tag.withoutIcon.medium.paddingLeft,
|
|
8374
|
+
paddingRight: theme.tag.withoutIcon.medium.paddingRight
|
|
8375
|
+
},
|
|
8376
|
+
large: {
|
|
8377
|
+
paddingLeft: theme.tag.withoutIcon.large.paddingLeft,
|
|
8378
|
+
paddingRight: theme.tag.withoutIcon.large.paddingRight
|
|
8379
|
+
}
|
|
8380
|
+
},
|
|
8381
|
+
withIcon: {
|
|
8382
|
+
small: {
|
|
8383
|
+
paddingLeft: theme.tag.withIcon.small.paddingLeft,
|
|
8384
|
+
paddingRight: theme.tag.withIcon.small.paddingRight
|
|
8385
|
+
},
|
|
8386
|
+
medium: {
|
|
8387
|
+
paddingLeft: theme.tag.withIcon.medium.paddingLeft,
|
|
8388
|
+
paddingRight: theme.tag.withIcon.medium.paddingRight
|
|
8389
|
+
},
|
|
8390
|
+
large: {
|
|
8391
|
+
paddingLeft: theme.tag.withIcon.large.paddingLeft,
|
|
8392
|
+
paddingRight: theme.tag.withIcon.large.paddingRight
|
|
8393
|
+
}
|
|
8394
|
+
}
|
|
8410
8395
|
},
|
|
8411
8396
|
tooltip: {
|
|
8412
8397
|
horizontalPadding: theme.tooltip.horizontalPadding,
|
|
@@ -9070,7 +9055,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
9070
9055
|
Input: {
|
|
9071
9056
|
baseStyle: {
|
|
9072
9057
|
width: '100%',
|
|
9073
|
-
|
|
9058
|
+
height: theme.forms.input.height,
|
|
9074
9059
|
py: theme.forms.input.padding.vertical,
|
|
9075
9060
|
px: theme.forms.input.padding.horizontal,
|
|
9076
9061
|
borderRadius: theme.forms.input.borderRadius,
|
|
@@ -10390,48 +10375,68 @@ const StoryGrid = {
|
|
|
10390
10375
|
Col: StoryGridCol
|
|
10391
10376
|
};
|
|
10392
10377
|
|
|
10393
|
-
|
|
10378
|
+
function useKittTheme() {
|
|
10379
|
+
return useMemo(() => {
|
|
10380
|
+
return {
|
|
10381
|
+
kitt: theme
|
|
10382
|
+
};
|
|
10383
|
+
}, []);
|
|
10384
|
+
}
|
|
10385
|
+
|
|
10386
|
+
const getTypography = size => {
|
|
10387
|
+
switch (size) {
|
|
10388
|
+
case 'small':
|
|
10389
|
+
return 'body-xs';
|
|
10390
|
+
case 'medium':
|
|
10391
|
+
return 'body-s';
|
|
10392
|
+
case 'large':
|
|
10393
|
+
default:
|
|
10394
|
+
return 'body-m';
|
|
10395
|
+
}
|
|
10396
|
+
};
|
|
10397
|
+
const typeToColor = (color, type) => {
|
|
10398
|
+
if (color) return color;
|
|
10394
10399
|
switch (type) {
|
|
10395
|
-
case 'danger':
|
|
10396
|
-
{
|
|
10397
|
-
return variant === 'outline' ? 'danger' : 'black';
|
|
10398
|
-
}
|
|
10399
|
-
case 'warn':
|
|
10400
|
-
{
|
|
10401
|
-
return variant === 'outline' ? 'warning' : 'black';
|
|
10402
|
-
}
|
|
10403
10400
|
case 'primary':
|
|
10404
|
-
|
|
10405
|
-
|
|
10406
|
-
|
|
10401
|
+
return 'violine';
|
|
10402
|
+
case 'warn':
|
|
10403
|
+
return 'sun';
|
|
10404
|
+
case 'danger':
|
|
10405
|
+
return 'coral';
|
|
10407
10406
|
case 'default':
|
|
10408
|
-
{
|
|
10409
|
-
return 'black';
|
|
10410
|
-
}
|
|
10411
10407
|
default:
|
|
10412
|
-
|
|
10413
|
-
return 'black';
|
|
10414
|
-
}
|
|
10408
|
+
return 'eggshell';
|
|
10415
10409
|
}
|
|
10416
10410
|
};
|
|
10417
10411
|
function Tag({
|
|
10418
10412
|
label,
|
|
10419
|
-
|
|
10413
|
+
icon,
|
|
10414
|
+
color,
|
|
10415
|
+
type,
|
|
10416
|
+
size = 'medium',
|
|
10420
10417
|
variant = 'fill'
|
|
10421
10418
|
}) {
|
|
10422
|
-
|
|
10419
|
+
const kittTheme = useKittTheme();
|
|
10420
|
+
const tagColor = typeToColor(color, type);
|
|
10421
|
+
return /*#__PURE__*/jsxs(HStack, {
|
|
10423
10422
|
alignSelf: "flex-start",
|
|
10424
10423
|
borderRadius: "kitt.tag.borderRadius",
|
|
10425
|
-
|
|
10426
|
-
|
|
10427
|
-
|
|
10428
|
-
|
|
10429
|
-
|
|
10430
|
-
|
|
10431
|
-
|
|
10432
|
-
|
|
10424
|
+
height: `kitt.tag.${icon ? 'withIcon' : 'withoutIcon'}.${size}.height`,
|
|
10425
|
+
paddingLeft: `kitt.tag.${icon ? 'withIcon' : 'withoutIcon'}.${size}.paddingLeft`,
|
|
10426
|
+
paddingRight: `kitt.tag.${icon ? 'withIcon' : 'withoutIcon'}.${size}.paddingRight`,
|
|
10427
|
+
backgroundColor: variant === 'fill' ? kittTheme.kitt.palettes.lateOcean[`${tagColor}.4`] : 'kitt.transparent',
|
|
10428
|
+
borderColor: kittTheme.kitt.palettes.lateOcean[`${tagColor}.6`],
|
|
10429
|
+
borderWidth: `kitt.tag.${variant}.borderWidth`,
|
|
10430
|
+
space: "kitt.1",
|
|
10431
|
+
alignItems: "center",
|
|
10432
|
+
children: [icon ? /*#__PURE__*/jsx(TypographyIcon, {
|
|
10433
|
+
icon: icon,
|
|
10434
|
+
size: `kitt.tag.${size}.iconSize`
|
|
10435
|
+
}) : null, /*#__PURE__*/jsx(Typography.Text, {
|
|
10436
|
+
base: getTypography(size),
|
|
10437
|
+
color: "black",
|
|
10433
10438
|
children: label
|
|
10434
|
-
})
|
|
10439
|
+
})]
|
|
10435
10440
|
});
|
|
10436
10441
|
}
|
|
10437
10442
|
|
|
@@ -11003,14 +11008,6 @@ function TypographyLink(_ref) {
|
|
|
11003
11008
|
});
|
|
11004
11009
|
}
|
|
11005
11010
|
|
|
11006
|
-
function useKittTheme() {
|
|
11007
|
-
return useMemo(() => {
|
|
11008
|
-
return {
|
|
11009
|
-
kitt: theme
|
|
11010
|
-
};
|
|
11011
|
-
}, []);
|
|
11012
|
-
}
|
|
11013
|
-
|
|
11014
11011
|
function KittThemeProvider({
|
|
11015
11012
|
isSSR,
|
|
11016
11013
|
children,
|