@semcore/tag 4.1.3 → 4.1.5

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 CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
+ ## [4.1.5] - 2022-10-04
6
+
7
+ ### Changed
8
+
9
+ - Version patch update due to children dependencies update (`@semcore/utils` [3.37.1 ~> 3.37.2], `@semcore/icon` [2.32.1 ~> 2.32.2], `@semcore/flex-box` [4.5.11 ~> 4.5.12]).
10
+
11
+ ## [4.1.4] - 2022-09-29
12
+
13
+ ### Changed
14
+
15
+ - Version patch update due to children dependencies update (`@semcore/icon` [2.30.4 ~> 2.31.0]).
16
+
5
17
  ## [4.1.3] - 2022-09-21
6
18
 
7
19
  ### Changed
package/lib/cjs/Tag.js CHANGED
@@ -52,31 +52,31 @@ var style = (
52
52
  /*__reshadow_css_start__*/
53
53
  _core.sstyled.insert(
54
54
  /*__inner_css_start__*/
55
- ".___STag_h7kg4_gg_{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;box-sizing:border-box;border-width:1px;border-style:solid;border-color:transparent;border-radius:24px;padding-left:4px;padding-right:4px;font-weight:500;background-color:var(--colorBg_h7kg4);color:var(--colorText_h7kg4);border-color:var(--colorBorder_h7kg4)}.___STag_h7kg4_gg_.__active_h7kg4_gg_,.___STag_h7kg4_gg_.__interactive_h7kg4_gg_:active,.___STag_h7kg4_gg_.__interactive_h7kg4_gg_:hover{background-color:var(--colorBgHover_h7kg4)}.___STag_h7kg4_gg_.__disabled_h7kg4_gg_{opacity:0.3;cursor:default;pointer-events:none}.___STag_h7kg4_gg_.__interactive_h7kg4_gg_{cursor:pointer}.___STag_h7kg4_gg_._size_m_h7kg4_gg_{height:20px;min-width:20px}.___STag_h7kg4_gg_._size_m_h7kg4_gg_ .___SCircle_h7kg4_gg_:first-child{margin-left:-2px}.___STag_h7kg4_gg_._size_m_h7kg4_gg_ .___SCircle_h7kg4_gg_:last-child{margin-right:-2px}.___STag_h7kg4_gg_._size_m_h7kg4_gg_ .___SText_h7kg4_gg_{font-size:12px;line-height:1.33}.___STag_h7kg4_gg_._size_l_h7kg4_gg_{height:28px;min-width:28px}.___STag_h7kg4_gg_._size_l_h7kg4_gg_ .___SText_h7kg4_gg_{font-size:14px;line-height:1.42}.___STag_h7kg4_gg_._size_xl_h7kg4_gg_{height:40px;min-width:40px}.___STag_h7kg4_gg_._size_xl_h7kg4_gg_ .___SText_h7kg4_gg_{font-size:16px;line-height:1.5}.___STag_h7kg4_gg_._theme_primary_h7kg4_gg_{background-color:var(--colorBg_h7kg4);border-color:var(--colorBg_h7kg4);color:var(--colorText_h7kg4)}.___STag_h7kg4_gg_._theme_primary_h7kg4_gg_.__active_h7kg4_gg_,.___STag_h7kg4_gg_._theme_primary_h7kg4_gg_.__interactive_h7kg4_gg_:active,.___STag_h7kg4_gg_._theme_primary_h7kg4_gg_.__interactive_h7kg4_gg_:hover{background-color:var(--colorBgHover_h7kg4)}.___STag_h7kg4_gg_._theme_primary-invert_h7kg4_gg_{background-color:hsla(0,0%,100%,.15);color:#ffffff}.___STag_h7kg4_gg_._theme_primary-invert_h7kg4_gg_.__active_h7kg4_gg_,.___STag_h7kg4_gg_._theme_primary-invert_h7kg4_gg_.__interactive_h7kg4_gg_:active,.___STag_h7kg4_gg_._theme_primary-invert_h7kg4_gg_.__interactive_h7kg4_gg_:hover{background-color:hsla(0,0%,100%,.3)}.___STag_h7kg4_gg_._theme_additional-invert_h7kg4_gg_,.___STag_h7kg4_gg_._theme_secondary-invert_h7kg4_gg_{color:#ffffff;border-color:hsla(0,0%,100%,.3)}.___STag_h7kg4_gg_._theme_additional-invert_h7kg4_gg_.__active_h7kg4_gg_,.___STag_h7kg4_gg_._theme_additional-invert_h7kg4_gg_.__interactive_h7kg4_gg_:active,.___STag_h7kg4_gg_._theme_additional-invert_h7kg4_gg_.__interactive_h7kg4_gg_:hover,.___STag_h7kg4_gg_._theme_secondary-invert_h7kg4_gg_.__active_h7kg4_gg_,.___STag_h7kg4_gg_._theme_secondary-invert_h7kg4_gg_.__interactive_h7kg4_gg_:active,.___STag_h7kg4_gg_._theme_secondary-invert_h7kg4_gg_.__interactive_h7kg4_gg_:hover{background-color:hsla(0,0%,100%,.1)}.___STag_h7kg4_gg_._theme_additional_h7kg4_gg_{border-style:dashed}.___SText_h7kg4_gg_{display:inline-block;padding-left:4px;padding-right:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.___SText_h7kg4_gg_:not(:only-child):first-child{padding-right:0}.___SText_h7kg4_gg_:not(:first-child):not(:last-child){padding-left:0;padding-right:0}.___SText_h7kg4_gg_:not(:only-child):last-child{padding-left:0}.___SAddon_h7kg4_gg_{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;padding-left:4px;padding-right:4px}.___SCircle_h7kg4_gg_{display:inline-flex;align-items:center;justify-content:center;overflow:hidden;border-radius:50%;margin:0 4px}.___SCircle_h7kg4_gg_:first-child{margin-left:0}.___SCircle_h7kg4_gg_:last-child{margin-right:0}.___SCircle_h7kg4_gg_._size_m_h7kg4_gg_{width:16px;height:16px}.___SCircle_h7kg4_gg_._size_l_h7kg4_gg_{width:20px;height:20px}.___SCircle_h7kg4_gg_._size_xl_h7kg4_gg_{width:20px;height:20px}.___SClose_h7kg4_gg_{cursor:pointer;display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;padding:4px}"
55
+ ".___STag_1cxz9_gg_{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;box-sizing:border-box;border-width:1px;border-style:solid;border-color:transparent;border-radius:24px;padding-left:4px;padding-right:4px;font-weight:500;background-color:var(--colorBg_1cxz9);color:var(--colorText_1cxz9);border-color:var(--colorBorder_1cxz9)}.___STag_1cxz9_gg_.__active_1cxz9_gg_,.___STag_1cxz9_gg_.__interactive_1cxz9_gg_:active,.___STag_1cxz9_gg_.__interactive_1cxz9_gg_:hover{background-color:var(--colorBgHover_1cxz9)}.___STag_1cxz9_gg_.__disabled_1cxz9_gg_{opacity:0.3;cursor:default;pointer-events:none}.___STag_1cxz9_gg_.__interactive_1cxz9_gg_{cursor:pointer}.___STag_1cxz9_gg_._size_m_1cxz9_gg_{height:20px;min-width:20px}.___STag_1cxz9_gg_._size_m_1cxz9_gg_ .___SCircle_1cxz9_gg_:first-child{margin-left:-2px}.___STag_1cxz9_gg_._size_m_1cxz9_gg_ .___SCircle_1cxz9_gg_:last-child{margin-right:-2px}.___STag_1cxz9_gg_._size_m_1cxz9_gg_ .___SText_1cxz9_gg_{font-size:12px;line-height:1.33}.___STag_1cxz9_gg_._size_l_1cxz9_gg_{height:28px;min-width:28px}.___STag_1cxz9_gg_._size_l_1cxz9_gg_ .___SText_1cxz9_gg_{font-size:14px;line-height:1.42}.___STag_1cxz9_gg_._size_xl_1cxz9_gg_{height:40px;min-width:40px}.___STag_1cxz9_gg_._size_xl_1cxz9_gg_ .___SText_1cxz9_gg_{font-size:16px;line-height:1.5}.___STag_1cxz9_gg_._theme_primary_1cxz9_gg_{background-color:var(--colorBg_1cxz9);border-color:var(--colorBg_1cxz9);color:var(--colorText_1cxz9)}.___STag_1cxz9_gg_._theme_primary_1cxz9_gg_.__active_1cxz9_gg_,.___STag_1cxz9_gg_._theme_primary_1cxz9_gg_.__interactive_1cxz9_gg_:active,.___STag_1cxz9_gg_._theme_primary_1cxz9_gg_.__interactive_1cxz9_gg_:hover{background-color:var(--colorBgHover_1cxz9)}.___STag_1cxz9_gg_._theme_primary-invert_1cxz9_gg_{background-color:hsla(0,0%,100%,.15);color:#ffffff}.___STag_1cxz9_gg_._theme_primary-invert_1cxz9_gg_.__active_1cxz9_gg_,.___STag_1cxz9_gg_._theme_primary-invert_1cxz9_gg_.__interactive_1cxz9_gg_:active,.___STag_1cxz9_gg_._theme_primary-invert_1cxz9_gg_.__interactive_1cxz9_gg_:hover{background-color:hsla(0,0%,100%,.3)}.___STag_1cxz9_gg_._theme_additional-invert_1cxz9_gg_,.___STag_1cxz9_gg_._theme_secondary-invert_1cxz9_gg_{color:#ffffff;border-color:hsla(0,0%,100%,.3)}.___STag_1cxz9_gg_._theme_additional-invert_1cxz9_gg_.__active_1cxz9_gg_,.___STag_1cxz9_gg_._theme_additional-invert_1cxz9_gg_.__interactive_1cxz9_gg_:active,.___STag_1cxz9_gg_._theme_additional-invert_1cxz9_gg_.__interactive_1cxz9_gg_:hover,.___STag_1cxz9_gg_._theme_secondary-invert_1cxz9_gg_.__active_1cxz9_gg_,.___STag_1cxz9_gg_._theme_secondary-invert_1cxz9_gg_.__interactive_1cxz9_gg_:active,.___STag_1cxz9_gg_._theme_secondary-invert_1cxz9_gg_.__interactive_1cxz9_gg_:hover{background-color:hsla(0,0%,100%,.1)}.___STag_1cxz9_gg_._theme_additional_1cxz9_gg_{border-style:dashed}.___SText_1cxz9_gg_{display:inline-block;padding-left:4px;padding-right:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.___SText_1cxz9_gg_:not(:only-child):first-child{padding-right:0}.___SText_1cxz9_gg_:not(:first-child):not(:last-child){padding-left:0;padding-right:0}.___SText_1cxz9_gg_:not(:only-child):last-child{padding-left:0}.___SAddon_1cxz9_gg_{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;padding-left:4px;padding-right:4px}.___SCircle_1cxz9_gg_{display:inline-flex;align-items:center;justify-content:center;overflow:hidden;border-radius:50%;margin:0 4px}.___SCircle_1cxz9_gg_:first-child{margin-left:0}.___SCircle_1cxz9_gg_:last-child{margin-right:0}.___SCircle_1cxz9_gg_._size_m_1cxz9_gg_{width:16px;height:16px}.___SCircle_1cxz9_gg_._size_l_1cxz9_gg_{width:20px;height:20px}.___SCircle_1cxz9_gg_._size_xl_1cxz9_gg_{width:20px;height:20px}.___SClose_1cxz9_gg_{cursor:pointer;display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;padding:4px}"
56
56
  /*__inner_css_end__*/
57
- , "h7kg4_gg_")
57
+ , "1cxz9_gg_")
58
58
  /*__reshadow_css_end__*/
59
59
  , {
60
- "__STag": "___STag_h7kg4_gg_",
61
- "--colorBg": "--colorBg_h7kg4",
62
- "--colorText": "--colorText_h7kg4",
63
- "--colorBorder": "--colorBorder_h7kg4",
64
- "_active": "__active_h7kg4_gg_",
65
- "_interactive": "__interactive_h7kg4_gg_",
66
- "--colorBgHover": "--colorBgHover_h7kg4",
67
- "_disabled": "__disabled_h7kg4_gg_",
68
- "_size_m": "_size_m_h7kg4_gg_",
69
- "__SCircle": "___SCircle_h7kg4_gg_",
70
- "__SText": "___SText_h7kg4_gg_",
71
- "_size_l": "_size_l_h7kg4_gg_",
72
- "_size_xl": "_size_xl_h7kg4_gg_",
73
- "_theme_primary": "_theme_primary_h7kg4_gg_",
74
- "_theme_primary-invert": "_theme_primary-invert_h7kg4_gg_",
75
- "_theme_additional-invert": "_theme_additional-invert_h7kg4_gg_",
76
- "_theme_secondary-invert": "_theme_secondary-invert_h7kg4_gg_",
77
- "_theme_additional": "_theme_additional_h7kg4_gg_",
78
- "__SAddon": "___SAddon_h7kg4_gg_",
79
- "__SClose": "___SClose_h7kg4_gg_"
60
+ "__STag": "___STag_1cxz9_gg_",
61
+ "--colorBg": "--colorBg_1cxz9",
62
+ "--colorText": "--colorText_1cxz9",
63
+ "--colorBorder": "--colorBorder_1cxz9",
64
+ "_active": "__active_1cxz9_gg_",
65
+ "_interactive": "__interactive_1cxz9_gg_",
66
+ "--colorBgHover": "--colorBgHover_1cxz9",
67
+ "_disabled": "__disabled_1cxz9_gg_",
68
+ "_size_m": "_size_m_1cxz9_gg_",
69
+ "__SCircle": "___SCircle_1cxz9_gg_",
70
+ "__SText": "___SText_1cxz9_gg_",
71
+ "_size_l": "_size_l_1cxz9_gg_",
72
+ "_size_xl": "_size_xl_1cxz9_gg_",
73
+ "_theme_primary": "_theme_primary_1cxz9_gg_",
74
+ "_theme_primary-invert": "_theme_primary-invert_1cxz9_gg_",
75
+ "_theme_additional-invert": "_theme_additional-invert_1cxz9_gg_",
76
+ "_theme_secondary-invert": "_theme_secondary-invert_1cxz9_gg_",
77
+ "_theme_additional": "_theme_additional_1cxz9_gg_",
78
+ "__SAddon": "___SAddon_1cxz9_gg_",
79
+ "__SClose": "___SClose_1cxz9_gg_"
80
80
  });
81
81
  var textColorToBgColor = {
82
82
  'gray-500': 'gray-100',
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=index.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React from 'react';\nimport { CProps, ReturnEl, PropGetterFn } from '@semcore/core';\nimport { IBoxProps } from '@semcore/flex-box';\nimport { IIconProps } from '@semcore/icon';\n\nexport type TagSize = 'xl' | 'l' | 'm';\nexport type TagThemeOld = 'muted' | 'info' | 'success' | 'warning' | 'danger' | 'invert';\nexport type TagTheme = 'primary' | 'secondary' | 'additional' | (string & TagThemeOld);\nexport type TagUse = 'primary' | 'secondary';\n\nexport interface ITagProps extends IBoxProps {\n /** Value responsible for tag availability\n */\n disabled?: boolean;\n /** Value responsible for tag activity\n */\n active?: boolean;\n /** Interactive tag\n */\n interactive?: boolean;\n /** Tag type\n * @default secondary\n * @deprecated v4.0.0\n * @use ITagProps.theme\n */\n use?: TagUse;\n /** Tag theme, there are several default themes or you can use your color\n * @default muted\n */\n theme?: TagTheme;\n /** Tag color text */\n color?: string;\n /** Tag size\n * @default m\n */\n size?: TagSize;\n /** Left addon tag */\n addonLeft?: React.ElementType;\n /** Right addon tag */\n addonRight?: React.ElementType;\n}\n\nexport interface ITagCloseProps extends IIconProps {\n /** Tag type\n * @default secondary\n */\n use?: TagUse;\n /** Tag theme, there are several default themes or you can use your color\n * @default muted\n */\n theme?: TagTheme;\n}\n\nexport interface ITagContext extends ITagProps {\n getCloseProps?: PropGetterFn;\n}\n\nexport interface ITagAddonProps extends IBoxProps {}\n\nexport interface ITagTextProps extends IBoxProps {}\n\ndeclare const Tag: (<T>(props: CProps<ITagProps & T, ITagContext>) => ReturnEl) & {\n Text: <T>(props: ITagTextProps & T) => ReturnEl;\n Addon: <T>(props: ITagAddonProps & T) => ReturnEl;\n Close: <T>(props: ITagCloseProps & T) => ReturnEl;\n Circle: <T>(props: ITagAddonProps & T) => ReturnEl;\n};\n\nexport default Tag;\n"],"mappings":""}
package/lib/es6/Tag.js CHANGED
@@ -32,31 +32,31 @@ var style = (
32
32
  /*__reshadow_css_start__*/
33
33
  _sstyled.insert(
34
34
  /*__inner_css_start__*/
35
- ".___STag_h7kg4_gg_{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;box-sizing:border-box;border-width:1px;border-style:solid;border-color:transparent;border-radius:24px;padding-left:4px;padding-right:4px;font-weight:500;background-color:var(--colorBg_h7kg4);color:var(--colorText_h7kg4);border-color:var(--colorBorder_h7kg4)}.___STag_h7kg4_gg_.__active_h7kg4_gg_,.___STag_h7kg4_gg_.__interactive_h7kg4_gg_:active,.___STag_h7kg4_gg_.__interactive_h7kg4_gg_:hover{background-color:var(--colorBgHover_h7kg4)}.___STag_h7kg4_gg_.__disabled_h7kg4_gg_{opacity:0.3;cursor:default;pointer-events:none}.___STag_h7kg4_gg_.__interactive_h7kg4_gg_{cursor:pointer}.___STag_h7kg4_gg_._size_m_h7kg4_gg_{height:20px;min-width:20px}.___STag_h7kg4_gg_._size_m_h7kg4_gg_ .___SCircle_h7kg4_gg_:first-child{margin-left:-2px}.___STag_h7kg4_gg_._size_m_h7kg4_gg_ .___SCircle_h7kg4_gg_:last-child{margin-right:-2px}.___STag_h7kg4_gg_._size_m_h7kg4_gg_ .___SText_h7kg4_gg_{font-size:12px;line-height:1.33}.___STag_h7kg4_gg_._size_l_h7kg4_gg_{height:28px;min-width:28px}.___STag_h7kg4_gg_._size_l_h7kg4_gg_ .___SText_h7kg4_gg_{font-size:14px;line-height:1.42}.___STag_h7kg4_gg_._size_xl_h7kg4_gg_{height:40px;min-width:40px}.___STag_h7kg4_gg_._size_xl_h7kg4_gg_ .___SText_h7kg4_gg_{font-size:16px;line-height:1.5}.___STag_h7kg4_gg_._theme_primary_h7kg4_gg_{background-color:var(--colorBg_h7kg4);border-color:var(--colorBg_h7kg4);color:var(--colorText_h7kg4)}.___STag_h7kg4_gg_._theme_primary_h7kg4_gg_.__active_h7kg4_gg_,.___STag_h7kg4_gg_._theme_primary_h7kg4_gg_.__interactive_h7kg4_gg_:active,.___STag_h7kg4_gg_._theme_primary_h7kg4_gg_.__interactive_h7kg4_gg_:hover{background-color:var(--colorBgHover_h7kg4)}.___STag_h7kg4_gg_._theme_primary-invert_h7kg4_gg_{background-color:hsla(0,0%,100%,.15);color:#ffffff}.___STag_h7kg4_gg_._theme_primary-invert_h7kg4_gg_.__active_h7kg4_gg_,.___STag_h7kg4_gg_._theme_primary-invert_h7kg4_gg_.__interactive_h7kg4_gg_:active,.___STag_h7kg4_gg_._theme_primary-invert_h7kg4_gg_.__interactive_h7kg4_gg_:hover{background-color:hsla(0,0%,100%,.3)}.___STag_h7kg4_gg_._theme_additional-invert_h7kg4_gg_,.___STag_h7kg4_gg_._theme_secondary-invert_h7kg4_gg_{color:#ffffff;border-color:hsla(0,0%,100%,.3)}.___STag_h7kg4_gg_._theme_additional-invert_h7kg4_gg_.__active_h7kg4_gg_,.___STag_h7kg4_gg_._theme_additional-invert_h7kg4_gg_.__interactive_h7kg4_gg_:active,.___STag_h7kg4_gg_._theme_additional-invert_h7kg4_gg_.__interactive_h7kg4_gg_:hover,.___STag_h7kg4_gg_._theme_secondary-invert_h7kg4_gg_.__active_h7kg4_gg_,.___STag_h7kg4_gg_._theme_secondary-invert_h7kg4_gg_.__interactive_h7kg4_gg_:active,.___STag_h7kg4_gg_._theme_secondary-invert_h7kg4_gg_.__interactive_h7kg4_gg_:hover{background-color:hsla(0,0%,100%,.1)}.___STag_h7kg4_gg_._theme_additional_h7kg4_gg_{border-style:dashed}.___SText_h7kg4_gg_{display:inline-block;padding-left:4px;padding-right:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.___SText_h7kg4_gg_:not(:only-child):first-child{padding-right:0}.___SText_h7kg4_gg_:not(:first-child):not(:last-child){padding-left:0;padding-right:0}.___SText_h7kg4_gg_:not(:only-child):last-child{padding-left:0}.___SAddon_h7kg4_gg_{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;padding-left:4px;padding-right:4px}.___SCircle_h7kg4_gg_{display:inline-flex;align-items:center;justify-content:center;overflow:hidden;border-radius:50%;margin:0 4px}.___SCircle_h7kg4_gg_:first-child{margin-left:0}.___SCircle_h7kg4_gg_:last-child{margin-right:0}.___SCircle_h7kg4_gg_._size_m_h7kg4_gg_{width:16px;height:16px}.___SCircle_h7kg4_gg_._size_l_h7kg4_gg_{width:20px;height:20px}.___SCircle_h7kg4_gg_._size_xl_h7kg4_gg_{width:20px;height:20px}.___SClose_h7kg4_gg_{cursor:pointer;display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;padding:4px}"
35
+ ".___STag_1cxz9_gg_{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;box-sizing:border-box;border-width:1px;border-style:solid;border-color:transparent;border-radius:24px;padding-left:4px;padding-right:4px;font-weight:500;background-color:var(--colorBg_1cxz9);color:var(--colorText_1cxz9);border-color:var(--colorBorder_1cxz9)}.___STag_1cxz9_gg_.__active_1cxz9_gg_,.___STag_1cxz9_gg_.__interactive_1cxz9_gg_:active,.___STag_1cxz9_gg_.__interactive_1cxz9_gg_:hover{background-color:var(--colorBgHover_1cxz9)}.___STag_1cxz9_gg_.__disabled_1cxz9_gg_{opacity:0.3;cursor:default;pointer-events:none}.___STag_1cxz9_gg_.__interactive_1cxz9_gg_{cursor:pointer}.___STag_1cxz9_gg_._size_m_1cxz9_gg_{height:20px;min-width:20px}.___STag_1cxz9_gg_._size_m_1cxz9_gg_ .___SCircle_1cxz9_gg_:first-child{margin-left:-2px}.___STag_1cxz9_gg_._size_m_1cxz9_gg_ .___SCircle_1cxz9_gg_:last-child{margin-right:-2px}.___STag_1cxz9_gg_._size_m_1cxz9_gg_ .___SText_1cxz9_gg_{font-size:12px;line-height:1.33}.___STag_1cxz9_gg_._size_l_1cxz9_gg_{height:28px;min-width:28px}.___STag_1cxz9_gg_._size_l_1cxz9_gg_ .___SText_1cxz9_gg_{font-size:14px;line-height:1.42}.___STag_1cxz9_gg_._size_xl_1cxz9_gg_{height:40px;min-width:40px}.___STag_1cxz9_gg_._size_xl_1cxz9_gg_ .___SText_1cxz9_gg_{font-size:16px;line-height:1.5}.___STag_1cxz9_gg_._theme_primary_1cxz9_gg_{background-color:var(--colorBg_1cxz9);border-color:var(--colorBg_1cxz9);color:var(--colorText_1cxz9)}.___STag_1cxz9_gg_._theme_primary_1cxz9_gg_.__active_1cxz9_gg_,.___STag_1cxz9_gg_._theme_primary_1cxz9_gg_.__interactive_1cxz9_gg_:active,.___STag_1cxz9_gg_._theme_primary_1cxz9_gg_.__interactive_1cxz9_gg_:hover{background-color:var(--colorBgHover_1cxz9)}.___STag_1cxz9_gg_._theme_primary-invert_1cxz9_gg_{background-color:hsla(0,0%,100%,.15);color:#ffffff}.___STag_1cxz9_gg_._theme_primary-invert_1cxz9_gg_.__active_1cxz9_gg_,.___STag_1cxz9_gg_._theme_primary-invert_1cxz9_gg_.__interactive_1cxz9_gg_:active,.___STag_1cxz9_gg_._theme_primary-invert_1cxz9_gg_.__interactive_1cxz9_gg_:hover{background-color:hsla(0,0%,100%,.3)}.___STag_1cxz9_gg_._theme_additional-invert_1cxz9_gg_,.___STag_1cxz9_gg_._theme_secondary-invert_1cxz9_gg_{color:#ffffff;border-color:hsla(0,0%,100%,.3)}.___STag_1cxz9_gg_._theme_additional-invert_1cxz9_gg_.__active_1cxz9_gg_,.___STag_1cxz9_gg_._theme_additional-invert_1cxz9_gg_.__interactive_1cxz9_gg_:active,.___STag_1cxz9_gg_._theme_additional-invert_1cxz9_gg_.__interactive_1cxz9_gg_:hover,.___STag_1cxz9_gg_._theme_secondary-invert_1cxz9_gg_.__active_1cxz9_gg_,.___STag_1cxz9_gg_._theme_secondary-invert_1cxz9_gg_.__interactive_1cxz9_gg_:active,.___STag_1cxz9_gg_._theme_secondary-invert_1cxz9_gg_.__interactive_1cxz9_gg_:hover{background-color:hsla(0,0%,100%,.1)}.___STag_1cxz9_gg_._theme_additional_1cxz9_gg_{border-style:dashed}.___SText_1cxz9_gg_{display:inline-block;padding-left:4px;padding-right:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.___SText_1cxz9_gg_:not(:only-child):first-child{padding-right:0}.___SText_1cxz9_gg_:not(:first-child):not(:last-child){padding-left:0;padding-right:0}.___SText_1cxz9_gg_:not(:only-child):last-child{padding-left:0}.___SAddon_1cxz9_gg_{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;padding-left:4px;padding-right:4px}.___SCircle_1cxz9_gg_{display:inline-flex;align-items:center;justify-content:center;overflow:hidden;border-radius:50%;margin:0 4px}.___SCircle_1cxz9_gg_:first-child{margin-left:0}.___SCircle_1cxz9_gg_:last-child{margin-right:0}.___SCircle_1cxz9_gg_._size_m_1cxz9_gg_{width:16px;height:16px}.___SCircle_1cxz9_gg_._size_l_1cxz9_gg_{width:20px;height:20px}.___SCircle_1cxz9_gg_._size_xl_1cxz9_gg_{width:20px;height:20px}.___SClose_1cxz9_gg_{cursor:pointer;display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;padding:4px}"
36
36
  /*__inner_css_end__*/
37
- , "h7kg4_gg_")
37
+ , "1cxz9_gg_")
38
38
  /*__reshadow_css_end__*/
39
39
  , {
40
- "__STag": "___STag_h7kg4_gg_",
41
- "--colorBg": "--colorBg_h7kg4",
42
- "--colorText": "--colorText_h7kg4",
43
- "--colorBorder": "--colorBorder_h7kg4",
44
- "_active": "__active_h7kg4_gg_",
45
- "_interactive": "__interactive_h7kg4_gg_",
46
- "--colorBgHover": "--colorBgHover_h7kg4",
47
- "_disabled": "__disabled_h7kg4_gg_",
48
- "_size_m": "_size_m_h7kg4_gg_",
49
- "__SCircle": "___SCircle_h7kg4_gg_",
50
- "__SText": "___SText_h7kg4_gg_",
51
- "_size_l": "_size_l_h7kg4_gg_",
52
- "_size_xl": "_size_xl_h7kg4_gg_",
53
- "_theme_primary": "_theme_primary_h7kg4_gg_",
54
- "_theme_primary-invert": "_theme_primary-invert_h7kg4_gg_",
55
- "_theme_additional-invert": "_theme_additional-invert_h7kg4_gg_",
56
- "_theme_secondary-invert": "_theme_secondary-invert_h7kg4_gg_",
57
- "_theme_additional": "_theme_additional_h7kg4_gg_",
58
- "__SAddon": "___SAddon_h7kg4_gg_",
59
- "__SClose": "___SClose_h7kg4_gg_"
40
+ "__STag": "___STag_1cxz9_gg_",
41
+ "--colorBg": "--colorBg_1cxz9",
42
+ "--colorText": "--colorText_1cxz9",
43
+ "--colorBorder": "--colorBorder_1cxz9",
44
+ "_active": "__active_1cxz9_gg_",
45
+ "_interactive": "__interactive_1cxz9_gg_",
46
+ "--colorBgHover": "--colorBgHover_1cxz9",
47
+ "_disabled": "__disabled_1cxz9_gg_",
48
+ "_size_m": "_size_m_1cxz9_gg_",
49
+ "__SCircle": "___SCircle_1cxz9_gg_",
50
+ "__SText": "___SText_1cxz9_gg_",
51
+ "_size_l": "_size_l_1cxz9_gg_",
52
+ "_size_xl": "_size_xl_1cxz9_gg_",
53
+ "_theme_primary": "_theme_primary_1cxz9_gg_",
54
+ "_theme_primary-invert": "_theme_primary-invert_1cxz9_gg_",
55
+ "_theme_additional-invert": "_theme_additional-invert_1cxz9_gg_",
56
+ "_theme_secondary-invert": "_theme_secondary-invert_1cxz9_gg_",
57
+ "_theme_additional": "_theme_additional_1cxz9_gg_",
58
+ "__SAddon": "___SAddon_1cxz9_gg_",
59
+ "__SClose": "___SClose_1cxz9_gg_"
60
60
  });
61
61
  var textColorToBgColor = {
62
62
  'gray-500': 'gray-100',
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React from 'react';\nimport { CProps, ReturnEl, PropGetterFn } from '@semcore/core';\nimport { IBoxProps } from '@semcore/flex-box';\nimport { IIconProps } from '@semcore/icon';\n\nexport type TagSize = 'xl' | 'l' | 'm';\nexport type TagThemeOld = 'muted' | 'info' | 'success' | 'warning' | 'danger' | 'invert';\nexport type TagTheme = 'primary' | 'secondary' | 'additional' | (string & TagThemeOld);\nexport type TagUse = 'primary' | 'secondary';\n\nexport interface ITagProps extends IBoxProps {\n /** Value responsible for tag availability\n */\n disabled?: boolean;\n /** Value responsible for tag activity\n */\n active?: boolean;\n /** Interactive tag\n */\n interactive?: boolean;\n /** Tag type\n * @default secondary\n * @deprecated v4.0.0\n * @use ITagProps.theme\n */\n use?: TagUse;\n /** Tag theme, there are several default themes or you can use your color\n * @default muted\n */\n theme?: TagTheme;\n /** Tag color text */\n color?: string;\n /** Tag size\n * @default m\n */\n size?: TagSize;\n /** Left addon tag */\n addonLeft?: React.ElementType;\n /** Right addon tag */\n addonRight?: React.ElementType;\n}\n\nexport interface ITagCloseProps extends IIconProps {\n /** Tag type\n * @default secondary\n */\n use?: TagUse;\n /** Tag theme, there are several default themes or you can use your color\n * @default muted\n */\n theme?: TagTheme;\n}\n\nexport interface ITagContext extends ITagProps {\n getCloseProps?: PropGetterFn;\n}\n\nexport interface ITagAddonProps extends IBoxProps {}\n\nexport interface ITagTextProps extends IBoxProps {}\n\ndeclare const Tag: (<T>(props: CProps<ITagProps & T, ITagContext>) => ReturnEl) & {\n Text: <T>(props: ITagTextProps & T) => ReturnEl;\n Addon: <T>(props: ITagAddonProps & T) => ReturnEl;\n Close: <T>(props: ITagCloseProps & T) => ReturnEl;\n Circle: <T>(props: ITagAddonProps & T) => ReturnEl;\n};\n\nexport default Tag;\n"],"mappings":""}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/tag",
3
3
  "description": "Semrush Tag Component",
4
- "version": "4.1.3",
4
+ "version": "4.1.5",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
@@ -9,7 +9,7 @@
9
9
  "author": "UI-kit team <ui-kit-team@semrush.com>",
10
10
  "license": "MIT",
11
11
  "scripts": {
12
- "build": "build --source=js",
12
+ "build": "pnpm semcore-builder --source=js",
13
13
  "test": "jest"
14
14
  },
15
15
  "dependencies": {
@@ -30,6 +30,7 @@
30
30
  "directory": "semcore/tag"
31
31
  },
32
32
  "devDependencies": {
33
+ "@types/react": "16.8 - 17",
33
34
  "@semcore/jest-preset-ui": "1.0.0"
34
35
  }
35
36
  }
@@ -1,69 +0,0 @@
1
- import React from 'react';
2
- import { CProps, ReturnEl, PropGetterFn } from '@semcore/core';
3
- import { IBoxProps } from '@semcore/flex-box';
4
- import { IIconProps } from '@semcore/icon';
5
-
6
- export type TagSize = 'xl' | 'l' | 'm';
7
- export type TagThemeOld = 'muted' | 'info' | 'success' | 'warning' | 'danger' | 'invert';
8
- export type TagTheme = 'primary' | 'secondary' | 'additional' | (string & TagThemeOld);
9
- export type TagUse = 'primary' | 'secondary';
10
-
11
- export interface ITagProps extends IBoxProps {
12
- /** Value responsible for tag availability
13
- */
14
- disabled?: boolean;
15
- /** Value responsible for tag activity
16
- */
17
- active?: boolean;
18
- /** Interactive tag
19
- */
20
- interactive?: boolean;
21
- /** Tag type
22
- * @default secondary
23
- * @deprecated v4.0.0
24
- * @use ITagProps.theme
25
- */
26
- use?: TagUse;
27
- /** Tag theme, there are several default themes or you can use your color
28
- * @default muted
29
- */
30
- theme?: TagTheme;
31
- /** Tag color text */
32
- color?: string;
33
- /** Tag size
34
- * @default m
35
- */
36
- size?: TagSize;
37
- /** Left addon tag */
38
- addonLeft?: React.ElementType;
39
- /** Right addon tag */
40
- addonRight?: React.ElementType;
41
- }
42
-
43
- export interface ITagCloseProps extends IIconProps {
44
- /** Tag type
45
- * @default secondary
46
- */
47
- use?: TagUse;
48
- /** Tag theme, there are several default themes or you can use your color
49
- * @default muted
50
- */
51
- theme?: TagTheme;
52
- }
53
-
54
- export interface ITagContext extends ITagProps {
55
- getCloseProps?: PropGetterFn;
56
- }
57
-
58
- export interface ITagAddonProps extends IBoxProps {}
59
-
60
- export interface ITagTextProps extends IBoxProps {}
61
-
62
- declare const Tag: (<T>(props: CProps<ITagProps & T, ITagContext>) => ReturnEl) & {
63
- Text: <T>(props: ITagTextProps & T) => ReturnEl;
64
- Addon: <T>(props: ITagAddonProps & T) => ReturnEl;
65
- Close: <T>(props: ITagCloseProps & T) => ReturnEl;
66
- Circle: <T>(props: ITagAddonProps & T) => ReturnEl;
67
- };
68
-
69
- export default Tag;
@@ -1,69 +0,0 @@
1
- import React from 'react';
2
- import { CProps, ReturnEl, PropGetterFn } from '@semcore/core';
3
- import { IBoxProps } from '@semcore/flex-box';
4
- import { IIconProps } from '@semcore/icon';
5
-
6
- export type TagSize = 'xl' | 'l' | 'm';
7
- export type TagThemeOld = 'muted' | 'info' | 'success' | 'warning' | 'danger' | 'invert';
8
- export type TagTheme = 'primary' | 'secondary' | 'additional' | (string & TagThemeOld);
9
- export type TagUse = 'primary' | 'secondary';
10
-
11
- export interface ITagProps extends IBoxProps {
12
- /** Value responsible for tag availability
13
- */
14
- disabled?: boolean;
15
- /** Value responsible for tag activity
16
- */
17
- active?: boolean;
18
- /** Interactive tag
19
- */
20
- interactive?: boolean;
21
- /** Tag type
22
- * @default secondary
23
- * @deprecated v4.0.0
24
- * @use ITagProps.theme
25
- */
26
- use?: TagUse;
27
- /** Tag theme, there are several default themes or you can use your color
28
- * @default muted
29
- */
30
- theme?: TagTheme;
31
- /** Tag color text */
32
- color?: string;
33
- /** Tag size
34
- * @default m
35
- */
36
- size?: TagSize;
37
- /** Left addon tag */
38
- addonLeft?: React.ElementType;
39
- /** Right addon tag */
40
- addonRight?: React.ElementType;
41
- }
42
-
43
- export interface ITagCloseProps extends IIconProps {
44
- /** Tag type
45
- * @default secondary
46
- */
47
- use?: TagUse;
48
- /** Tag theme, there are several default themes or you can use your color
49
- * @default muted
50
- */
51
- theme?: TagTheme;
52
- }
53
-
54
- export interface ITagContext extends ITagProps {
55
- getCloseProps?: PropGetterFn;
56
- }
57
-
58
- export interface ITagAddonProps extends IBoxProps {}
59
-
60
- export interface ITagTextProps extends IBoxProps {}
61
-
62
- declare const Tag: (<T>(props: CProps<ITagProps & T, ITagContext>) => ReturnEl) & {
63
- Text: <T>(props: ITagTextProps & T) => ReturnEl;
64
- Addon: <T>(props: ITagAddonProps & T) => ReturnEl;
65
- Close: <T>(props: ITagCloseProps & T) => ReturnEl;
66
- Circle: <T>(props: ITagAddonProps & T) => ReturnEl;
67
- };
68
-
69
- export default Tag;