@ornikar/kitt-universal 25.41.2 → 25.41.3
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/GroupTags/GroupTags.d.ts.map +1 -1
- package/dist/definitions/Tag/Tag.d.ts +1 -1
- package/dist/definitions/Tag/Tag.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +28 -7
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +28 -7
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-20.10.cjs.js +26 -6
- package/dist/index-node-20.10.cjs.js.map +1 -1
- package/dist/index-node-20.10.cjs.web.js +26 -6
- package/dist/index-node-20.10.cjs.web.js.map +1 -1
- package/dist/index-node-20.10.es.mjs +26 -6
- package/dist/index-node-20.10.es.mjs.map +1 -1
- package/dist/index-node-20.10.es.web.mjs +26 -6
- package/dist/index-node-20.10.es.web.mjs.map +1 -1
- package/dist/index.es.js +28 -7
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +28 -7
- package/dist/index.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,15 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [25.41.3](https://github.com/ornikar/kitt/compare/@ornikar/kitt-universal@25.41.2...@ornikar/kitt-universal@25.41.3) (2025-02-12)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* key on GroupTags and primary version on Tag [no issue] ([#2548](https://github.com/ornikar/kitt/issues/2548)) ([8e904a8](https://github.com/ornikar/kitt/commit/8e904a841fce6dd0dceeb2b746a94524eb80661f))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
6
15
|
## [25.41.2](https://github.com/ornikar/kitt/compare/@ornikar/kitt-universal@25.41.1...@ornikar/kitt-universal@25.41.2) (2025-02-12)
|
|
7
16
|
|
|
8
17
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupTags.d.ts","sourceRoot":"","sources":["../../../src/GroupTags/GroupTags.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,SAAS,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAI3C,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC5D,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,cAAc,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"GroupTags.d.ts","sourceRoot":"","sources":["../../../src/GroupTags/GroupTags.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,SAAS,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAI3C,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC5D,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,cAAc,GAAG,SAAS,CA8BvE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactElement, ReactNode } from 'react';
|
|
2
|
-
export type TagColor = 'eggshell' | 'sun' | 'coral' | 'raspberry' | 'lavender' | 'violine' | 'blue' | 'green';
|
|
2
|
+
export type TagColor = 'eggshell' | 'sun' | 'coral' | 'raspberry' | 'lavender' | 'violine' | 'blue' | 'green' | 'primary';
|
|
3
3
|
export type TagSize = 'small' | 'medium' | 'large';
|
|
4
4
|
export type TagVariant = 'outline' | 'fill';
|
|
5
5
|
export type TagType = 'primary' | 'default' | 'danger' | 'warn';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../src/Tag/Tag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOrD,MAAM,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../src/Tag/Tag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOrD,MAAM,MAAM,QAAQ,GAChB,UAAU,GACV,KAAK,GACL,OAAO,GACP,WAAW,GACX,UAAU,GACV,SAAS,GACT,MAAM,GACN,OAAO,GACP,SAAS,CAAC;AACd,MAAM,MAAM,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AACnD,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,MAAM,CAAC;AAC5C,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEhE,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,uCAAuC;IACvC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AA6BD,wBAAgB,GAAG,CAAC,EAClB,KAAK,EACL,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,IAAe,EACf,OAAgB,EAChB,eAAuB,GACxB,EAAE,QAAQ,GAAG,SAAS,CA+CtB"}
|
|
@@ -8008,17 +8008,20 @@ function GroupTags({
|
|
|
8008
8008
|
return /*#__PURE__*/jsx(HStack, {
|
|
8009
8009
|
alignItems: "center",
|
|
8010
8010
|
children: childrenArray.map((tag, index) => {
|
|
8011
|
-
|
|
8011
|
+
// According to design specs, only the first tag can display an icon
|
|
8012
|
+
|
|
8012
8013
|
const clonedTagWithBorder = /*#__PURE__*/cloneElement(tag, {
|
|
8013
8014
|
withWhiteBorder: true,
|
|
8014
8015
|
size,
|
|
8015
8016
|
icon: index === 0 ? tag.props.icon : undefined
|
|
8016
8017
|
});
|
|
8017
|
-
return /*#__PURE__*/jsx(View
|
|
8018
|
+
return /*#__PURE__*/jsx(View
|
|
8019
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
8020
|
+
, {
|
|
8018
8021
|
marginLeft: index === 0 ? 0 : '-kitt.1',
|
|
8019
8022
|
zIndex: childrenArray.length - index,
|
|
8020
8023
|
children: clonedTagWithBorder
|
|
8021
|
-
},
|
|
8024
|
+
}, index);
|
|
8022
8025
|
})
|
|
8023
8026
|
});
|
|
8024
8027
|
}
|
|
@@ -12735,23 +12738,41 @@ function Tag({
|
|
|
12735
12738
|
}) {
|
|
12736
12739
|
const kittTheme = useKittTheme();
|
|
12737
12740
|
const tagColor = typeToColor$1(color, type);
|
|
12741
|
+
const primaryVersion = tagColor === 'primary';
|
|
12742
|
+
const getFontColor = () => {
|
|
12743
|
+
if (primaryVersion) {
|
|
12744
|
+
return 'white';
|
|
12745
|
+
}
|
|
12746
|
+
return 'black';
|
|
12747
|
+
};
|
|
12738
12748
|
return /*#__PURE__*/jsxs(HStack, {
|
|
12739
12749
|
alignSelf: "flex-start",
|
|
12740
12750
|
borderRadius: "kitt.tag.borderRadius",
|
|
12741
12751
|
height: `kitt.tag.${icon ? 'withIcon' : 'withoutIcon'}.${size}.height`,
|
|
12742
12752
|
paddingLeft: `kitt.tag.${icon ? 'withIcon' : 'withoutIcon'}.${size}.paddingLeft`,
|
|
12743
12753
|
paddingRight: `kitt.tag.${icon ? 'withIcon' : 'withoutIcon'}.${size}.paddingRight`,
|
|
12744
|
-
backgroundColor: variant === 'fill' ?
|
|
12745
|
-
|
|
12754
|
+
backgroundColor: variant === 'fill' ? (() => {
|
|
12755
|
+
if (primaryVersion) {
|
|
12756
|
+
return kittTheme.kitt.palettes.lateOcean['violine.9'];
|
|
12757
|
+
}
|
|
12758
|
+
return kittTheme.kitt.palettes.lateOcean[`${tagColor}.4`];
|
|
12759
|
+
})() : 'kitt.transparent',
|
|
12760
|
+
borderColor: withWhiteBorder ? 'kitt.white' : (() => {
|
|
12761
|
+
if (primaryVersion) {
|
|
12762
|
+
return 'kitt.transparent';
|
|
12763
|
+
}
|
|
12764
|
+
return kittTheme.kitt.palettes.lateOcean[`${tagColor}.6`];
|
|
12765
|
+
})(),
|
|
12746
12766
|
borderWidth: withWhiteBorder ? 1 : `kitt.tag.${variant}.borderWidth`,
|
|
12747
12767
|
space: "kitt.1",
|
|
12748
12768
|
alignItems: "center",
|
|
12749
12769
|
children: [icon ? /*#__PURE__*/jsx(TypographyIcon, {
|
|
12750
12770
|
icon: icon,
|
|
12751
|
-
size: `kitt.tag.${size}.iconSize
|
|
12771
|
+
size: `kitt.tag.${size}.iconSize`,
|
|
12772
|
+
color: getFontColor()
|
|
12752
12773
|
}) : null, /*#__PURE__*/jsx(Typography.Text, {
|
|
12753
12774
|
base: getTypography(size),
|
|
12754
|
-
color:
|
|
12775
|
+
color: getFontColor(),
|
|
12755
12776
|
children: label
|
|
12756
12777
|
})]
|
|
12757
12778
|
});
|