@semcore/tag 16.0.0-prerelease.4 → 16.0.0-prerelease.7

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/lib/esm/Tag.mjs CHANGED
@@ -1,53 +1,52 @@
1
- import v from "@babel/runtime/helpers/esm/objectSpread2";
2
- import P from "@babel/runtime/helpers/esm/classCallCheck";
3
- import A from "@babel/runtime/helpers/esm/createClass";
4
- import M from "@babel/runtime/helpers/esm/assertThisInitialized";
5
- import k from "@babel/runtime/helpers/esm/inherits";
6
- import E from "@babel/runtime/helpers/esm/createSuper";
7
- import s from "@babel/runtime/helpers/esm/defineProperty";
8
- import { sstyled as p, createComponent as V, assignProps as f, Component as I } from "@semcore/core";
9
- import o from "react";
10
- import { Box as m } from "@semcore/flex-box";
11
- import J from "@semcore/core/lib/utils/addonTextChildren";
12
- import O from "@semcore/core/lib/utils/logger";
13
- import Q from "@semcore/icon/Close/m";
14
- import { localizedMessages as z } from "./translations/__intergalactic-dynamic-locales.mjs";
15
- import $ from "@semcore/core/lib/utils/enhances/i18nEnhance";
16
- import D from "@semcore/core/lib/utils/enhances/resolveColorEnhance";
17
- import K from "@semcore/core/lib/utils/uniqueID";
18
- import { isAdvanceMode as U } from "@semcore/core/lib/utils/findComponent";
19
- var N = (
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
3
+ import _createClass from "@babel/runtime/helpers/esm/createClass";
4
+ import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
5
+ import _inherits from "@babel/runtime/helpers/esm/inherits";
6
+ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
7
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
8
+ import { sstyled, createComponent, assignProps, Component } from "@semcore/core";
9
+ import React from "react";
10
+ import { Box } from "@semcore/flex-box";
11
+ import addonTextChildren from "@semcore/core/lib/utils/addonTextChildren";
12
+ import logger from "@semcore/core/lib/utils/logger";
13
+ import CloseM from "@semcore/icon/Close/m";
14
+ import { localizedMessages } from "./translations/__intergalactic-dynamic-locales.mjs";
15
+ import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
16
+ import resolveColorEnhance from "@semcore/core/lib/utils/enhances/resolveColorEnhance";
17
+ import uniqueIDEnhancement from "@semcore/core/lib/utils/uniqueID";
18
+ import { isAdvanceMode } from "@semcore/core/lib/utils/findComponent";
19
+ var style = (
20
20
  /*__reshadow_css_start__*/
21
- (p.insert(
21
+ (sstyled.insert(
22
22
  /*__inner_css_start__*/
23
- `.___SCircle_1b256_gg_{display:inline-flex;align-items:center;justify-content:center;overflow:hidden;border-radius:50%;margin:0 var(--intergalactic-spacing-1x, 4px)}.___SCircle_1b256_gg_:first-child{margin-left:0}.___SCircle_1b256_gg_:last-child{margin-right:0}.___SCircle_1b256_gg_._size_m_1b256_gg_{width:16px;height:16px}.___SCircle_1b256_gg_._size_l_1b256_gg_,.___SCircle_1b256_gg_._size_xl_1b256_gg_{width:20px;height:20px}.___SAddon_1b256_gg_,.___STagContainerClose_1b256_gg_,.___STag_1b256_gg_{position:relative;display:inline-flex;align-items:center;justify-content:center;padding-left:var(--intergalactic-spacing-1x, 4px);padding-right:var(--intergalactic-spacing-1x, 4px)}.___SAddon_1b256_gg_{flex-shrink:0}.___STagContainer_1b256_gg_ .___SAddon_1b256_gg_{padding-left:0;padding-right:0}.___STagContainerClose_1b256_gg_,.___STag_1b256_gg_{vertical-align:middle;border:1px solid var(--intergalactic-bg-primary-neutral, #ffffff);box-sizing:border-box;background-color:var(--intergalactic-bg-primary-neutral, #ffffff);border-radius:var(--intergalactic-tag-rounded, 24px);font-weight:var(--intergalactic-medium, 500);color:var(--tag-color_1b256)}.___STagContainerClose_1b256_gg_.__interactive_1b256_gg_:focus-visible,.___STag_1b256_gg_.__interactive_1b256_gg_:focus-visible{z-index:1}.___STagContainerClose_1b256_gg_::before,.___STag_1b256_gg_::before{content:"";position:absolute;top:0;left:0;right:0;bottom:0;border-radius:var(--intergalactic-tag-rounded, 24px);background-color:var(--tag-color_1b256);opacity:.2;filter:brightness(150%)}.___STagContainerClose_1b256_gg_::after,.___STag_1b256_gg_::after{content:"";position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;border-radius:var(--intergalactic-tag-rounded, 24px);pointer-events:none;border:1px solid var(--tag-color_1b256);opacity:.1;filter:brightness(150%)}.___STagContainerClose_1b256_gg_:active,.___STag_1b256_gg_:active{-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.___STagContainerClose_1b256_gg_:hover,.___STag_1b256_gg_:hover{-webkit-text-decoration:none;text-decoration:none}}.___STagContainerClose_1b256_gg_.__disabled_1b256_gg_,.___STag_1b256_gg_.__disabled_1b256_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}.___STag_1b256_gg_.__interactiveView_1b256_gg_{cursor:pointer}.___STagContainerClose_1b256_gg_._size_m_1b256_gg_,.___STagContainer_1b256_gg_._size_m_1b256_gg_ .___SAddon_1b256_gg_,.___STag_1b256_gg_._size_m_1b256_gg_{height:20px;min-width:20px}.___STagContainerClose_1b256_gg_._size_m_1b256_gg_ .___SCircle_1b256_gg_:first-child,.___STagContainer_1b256_gg_._size_m_1b256_gg_ .___SAddon_1b256_gg_ .___SCircle_1b256_gg_:first-child,.___STag_1b256_gg_._size_m_1b256_gg_ .___SCircle_1b256_gg_:first-child{margin-left:calc(-1*var(--intergalactic-spacing-05x, 2px))}.___STagContainerClose_1b256_gg_._size_m_1b256_gg_ .___SCircle_1b256_gg_:last-child,.___STagContainer_1b256_gg_._size_m_1b256_gg_ .___SAddon_1b256_gg_ .___SCircle_1b256_gg_:last-child,.___STag_1b256_gg_._size_m_1b256_gg_ .___SCircle_1b256_gg_:last-child{margin-right:calc(-1*var(--intergalactic-spacing-05x, 2px))}.___STagContainerClose_1b256_gg_._size_m_1b256_gg_ .___SText_1b256_gg_,.___STagContainer_1b256_gg_._size_m_1b256_gg_ .___SAddon_1b256_gg_ .___SText_1b256_gg_,.___STag_1b256_gg_._size_m_1b256_gg_ .___SText_1b256_gg_{font-size:var(--intergalactic-fs-100, 12px);line-height:var(--intergalactic-lh-100, 133%)}.___STagContainerClose_1b256_gg_._size_l_1b256_gg_,.___STagContainer_1b256_gg_._size_l_1b256_gg_ .___SAddon_1b256_gg_,.___STag_1b256_gg_._size_l_1b256_gg_{height:28px;min-width:28px}.___STagContainerClose_1b256_gg_._size_l_1b256_gg_ .___SText_1b256_gg_,.___STagContainer_1b256_gg_._size_l_1b256_gg_ .___SAddon_1b256_gg_ .___SText_1b256_gg_,.___STag_1b256_gg_._size_l_1b256_gg_ .___SText_1b256_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___STagContainerClose_1b256_gg_._size_xl_1b256_gg_,.___STag_1b256_gg_._size_xl_1b256_gg_{height:40px;min-width:40px;padding:0 var(--intergalactic-spacing-2x, 8px)}.___STagContainerClose_1b256_gg_._size_xl_1b256_gg_ .___SText_1b256_gg_,.___STag_1b256_gg_._size_xl_1b256_gg_ .___SText_1b256_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%)}.___STagContainerClose_1b256_gg_._theme_primary_1b256_gg_::before,.___STagContainer_1b256_gg_._theme_primary_1b256_gg_ .___SAddon_1b256_gg_::before,.___STag_1b256_gg_._theme_primary_1b256_gg_::before{top:-1px;left:-1px;right:-1px;bottom:-1px}.___STagContainerClose_1b256_gg_._theme_primary_1b256_gg_:after,.___STagContainer_1b256_gg_._theme_primary_1b256_gg_ .___SAddon_1b256_gg_:after,.___STag_1b256_gg_._theme_primary_1b256_gg_:after{display:none}.___STagContainerClose_1b256_gg_._theme_primary_1b256_gg_.__active_1b256_gg_:before,.___STagContainerClose_1b256_gg_._theme_primary_1b256_gg_.__interactiveView_1b256_gg_:active:before,.___STagContainer_1b256_gg_._theme_primary_1b256_gg_ .___SAddon_1b256_gg_.__active_1b256_gg_:before,.___STagContainer_1b256_gg_._theme_primary_1b256_gg_ .___SAddon_1b256_gg_.__interactiveView_1b256_gg_:active:before,.___STag_1b256_gg_._theme_primary_1b256_gg_.__active_1b256_gg_:before,.___STag_1b256_gg_._theme_primary_1b256_gg_.__interactiveView_1b256_gg_:active:before{opacity:.3}@media (hover:hover){.___STagContainerClose_1b256_gg_._theme_primary_1b256_gg_.__interactiveView_1b256_gg_:hover:before,.___STagContainer_1b256_gg_._theme_primary_1b256_gg_ .___SAddon_1b256_gg_.__interactiveView_1b256_gg_:hover:before,.___STag_1b256_gg_._theme_primary_1b256_gg_.__interactiveView_1b256_gg_:hover:before{opacity:.3}}.___STagContainerClose_1b256_gg_._theme_additional_1b256_gg_::before,.___STagContainerClose_1b256_gg_._theme_secondary_1b256_gg_::before,.___STag_1b256_gg_._theme_additional_1b256_gg_::before,.___STag_1b256_gg_._theme_secondary_1b256_gg_::before{opacity:.01}.___STagContainerClose_1b256_gg_._theme_additional_1b256_gg_.__active_1b256_gg_:before,.___STagContainerClose_1b256_gg_._theme_additional_1b256_gg_.__interactiveView_1b256_gg_:active:before,.___STagContainerClose_1b256_gg_._theme_secondary_1b256_gg_.__active_1b256_gg_:before,.___STagContainerClose_1b256_gg_._theme_secondary_1b256_gg_.__interactiveView_1b256_gg_:active:before,.___STag_1b256_gg_._theme_additional_1b256_gg_.__active_1b256_gg_:before,.___STag_1b256_gg_._theme_additional_1b256_gg_.__interactiveView_1b256_gg_:active:before,.___STag_1b256_gg_._theme_secondary_1b256_gg_.__active_1b256_gg_:before,.___STag_1b256_gg_._theme_secondary_1b256_gg_.__interactiveView_1b256_gg_:active:before{opacity:.1}@media (hover:hover){.___STagContainerClose_1b256_gg_._theme_additional_1b256_gg_.__interactiveView_1b256_gg_:hover:before,.___STagContainerClose_1b256_gg_._theme_secondary_1b256_gg_.__interactiveView_1b256_gg_:hover:before,.___STag_1b256_gg_._theme_additional_1b256_gg_.__interactiveView_1b256_gg_:hover:before,.___STag_1b256_gg_._theme_secondary_1b256_gg_.__interactiveView_1b256_gg_:hover:before{opacity:.1}}.___SClose_1b256_gg_ path,.___STagContainerClose_1b256_gg_._theme_additional-invert_1b256_gg_::after,.___STagContainerClose_1b256_gg_._theme_additional_1b256_gg_::after,.___STagContainerClose_1b256_gg_._theme_secondary-invert_1b256_gg_::after,.___STagContainerClose_1b256_gg_._theme_secondary_1b256_gg_::after,.___STagContainer_1b256_gg_ .___STagContainerClose_1b256_gg_ svg path,.___STag_1b256_gg_._theme_additional-invert_1b256_gg_::after,.___STag_1b256_gg_._theme_additional_1b256_gg_::after,.___STag_1b256_gg_._theme_secondary-invert_1b256_gg_::after,.___STag_1b256_gg_._theme_secondary_1b256_gg_::after{opacity:.5}.___STagContainerClose_1b256_gg_._theme_primary-invert_1b256_gg_,.___STag_1b256_gg_._theme_primary-invert_1b256_gg_{background-color:var(--intergalactic-tag-primary-white-normal,
24
- rgba(255, 255, 255, 0.15)
25
- );color:var(--intergalactic-text-primary-invert, #ffffff)}.___STagContainerClose_1b256_gg_._theme_additional-invert_1b256_gg_,.___STagContainerClose_1b256_gg_._theme_secondary-invert_1b256_gg_,.___STag_1b256_gg_._theme_additional-invert_1b256_gg_,.___STag_1b256_gg_._theme_secondary-invert_1b256_gg_{color:var(--intergalactic-text-primary-invert, #ffffff)}.___STag_1b256_gg_._theme_additional_1b256_gg_::after{border-style:dashed}.___SText_1b256_gg_{display:inline-block;padding-left:var(--intergalactic-spacing-1x, 4px);padding-right:var(--intergalactic-spacing-1x, 4px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative}.___SText_1b256_gg_:not(:only-child):first-child{padding-right:0}.___SText_1b256_gg_:not(:first-child):not(:last-child){padding-left:0;padding-right:0}.___SText_1b256_gg_:not(:only-child):last-child{padding-left:0}.___SClose_1b256_gg_{cursor:pointer;flex-shrink:0;padding:var(--intergalactic-spacing-1x, 4px)}@media (hover:hover){.___SClose_1b256_gg_:hover path{opacity:1}}.___SClose_1b256_gg_,.___STagContainer_1b256_gg_{display:inline-flex;position:relative;align-items:center;justify-content:center}.___STagContainer_1b256_gg_ .___SAddon_1b256_gg_:not(:last-child),.___STagContainer_1b256_gg_ .___STag_1b256_gg_:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0;padding-right:var(--intergalactic-spacing-05x, 2px)}.___STagContainer_1b256_gg_ .___SAddon_1b256_gg_:not(:last-child)::after,.___STagContainer_1b256_gg_ .___SAddon_1b256_gg_:not(:last-child)::before,.___STagContainer_1b256_gg_ .___STag_1b256_gg_:not(:last-child)::after,.___STagContainer_1b256_gg_ .___STag_1b256_gg_:not(:last-child)::before{border-right:0;border-top-right-radius:0;border-bottom-right-radius:0;margin-right:-1px}.___STagContainer_1b256_gg_ .___SAddon_1b256_gg_:not(:last-child) .___SText_1b256_gg_,.___STagContainer_1b256_gg_ .___STag_1b256_gg_:not(:last-child) .___SText_1b256_gg_{padding-right:0}.___STagContainer_1b256_gg_ .___SAddon_1b256_gg_:not(:first-child),.___STagContainer_1b256_gg_ .___STag_1b256_gg_:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0;padding-left:var(--intergalactic-spacing-05x, 2px)}.___STagContainer_1b256_gg_ .___SAddon_1b256_gg_:not(:first-child)::after,.___STagContainer_1b256_gg_ .___SAddon_1b256_gg_:not(:first-child)::before,.___STagContainer_1b256_gg_ .___STag_1b256_gg_:not(:first-child)::after,.___STagContainer_1b256_gg_ .___STag_1b256_gg_:not(:first-child)::before{border-left:0;border-top-left-radius:0;border-bottom-left-radius:0}.___STagContainer_1b256_gg_ .___SAddon_1b256_gg_:not(:first-child) .___SText_1b256_gg_,.___STagContainer_1b256_gg_ .___STag_1b256_gg_:not(:first-child) .___SText_1b256_gg_{padding-left:0}.___STagContainer_1b256_gg_ .___STagContainerClose_1b256_gg_{cursor:pointer;border-top-left-radius:0;border-bottom-left-radius:0;padding-left:0;padding-right:0;min-width:20px}.___STagContainer_1b256_gg_ .___STagContainerClose_1b256_gg_::after,.___STagContainer_1b256_gg_ .___STagContainerClose_1b256_gg_::before{border-left:0;border-top-left-radius:0;border-bottom-left-radius:0}.___STagContainer_1b256_gg_ .___STagContainerClose_1b256_gg_::before{left:-1px}.___STagContainer_1b256_gg_ .___STagContainerClose_1b256_gg_ svg{padding-left:0;padding-right:var(--intergalactic-spacing-1x, 4px)}@media (hover:hover){.___STagContainer_1b256_gg_ .___STagContainerClose_1b256_gg_:hover svg path{opacity:1}}.___STagContainer_1b256_gg_ .___STagContainerClose_1b256_gg_._size_xl_1b256_gg_ svg{padding-left:var(--intergalactic-spacing-1x, 4px);padding-right:var(--intergalactic-spacing-2x, 8px)}`,
23
+ '.___SCircle_1b256_gg_{display:inline-flex;align-items:center;justify-content:center;overflow:hidden;border-radius:50%;margin:0 var(--intergalactic-spacing-1x, 4px)}.___SCircle_1b256_gg_:first-child{margin-left:0}.___SCircle_1b256_gg_:last-child{margin-right:0}.___SCircle_1b256_gg_._size_m_1b256_gg_{width:16px;height:16px}.___SCircle_1b256_gg_._size_l_1b256_gg_,.___SCircle_1b256_gg_._size_xl_1b256_gg_{width:20px;height:20px}.___SAddon_1b256_gg_,.___STagContainerClose_1b256_gg_,.___STag_1b256_gg_{position:relative;display:inline-flex;align-items:center;justify-content:center;padding-left:var(--intergalactic-spacing-1x, 4px);padding-right:var(--intergalactic-spacing-1x, 4px)}.___SAddon_1b256_gg_{flex-shrink:0}.___STagContainer_1b256_gg_ .___SAddon_1b256_gg_{padding-left:0;padding-right:0}.___STagContainerClose_1b256_gg_,.___STag_1b256_gg_{vertical-align:middle;border:1px solid var(--intergalactic-bg-primary-neutral, #ffffff);box-sizing:border-box;background-color:var(--intergalactic-bg-primary-neutral, #ffffff);border-radius:var(--intergalactic-tag-rounded, 24px);font-weight:var(--intergalactic-medium, 500);color:var(--tag-color_1b256)}.___STagContainerClose_1b256_gg_.__interactive_1b256_gg_:focus-visible,.___STag_1b256_gg_.__interactive_1b256_gg_:focus-visible{z-index:1}.___STagContainerClose_1b256_gg_::before,.___STag_1b256_gg_::before{content:"";position:absolute;top:0;left:0;right:0;bottom:0;border-radius:var(--intergalactic-tag-rounded, 24px);background-color:var(--tag-color_1b256);opacity:.2;filter:brightness(150%)}.___STagContainerClose_1b256_gg_::after,.___STag_1b256_gg_::after{content:"";position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;border-radius:var(--intergalactic-tag-rounded, 24px);pointer-events:none;border:1px solid var(--tag-color_1b256);opacity:.1;filter:brightness(150%)}.___STagContainerClose_1b256_gg_:active,.___STag_1b256_gg_:active{-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.___STagContainerClose_1b256_gg_:hover,.___STag_1b256_gg_:hover{-webkit-text-decoration:none;text-decoration:none}}.___STagContainerClose_1b256_gg_.__disabled_1b256_gg_,.___STag_1b256_gg_.__disabled_1b256_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}.___STag_1b256_gg_.__interactiveView_1b256_gg_{cursor:pointer}.___STagContainerClose_1b256_gg_._size_m_1b256_gg_,.___STagContainer_1b256_gg_._size_m_1b256_gg_ .___SAddon_1b256_gg_,.___STag_1b256_gg_._size_m_1b256_gg_{height:20px;min-width:20px}.___STagContainerClose_1b256_gg_._size_m_1b256_gg_ .___SCircle_1b256_gg_:first-child,.___STagContainer_1b256_gg_._size_m_1b256_gg_ .___SAddon_1b256_gg_ .___SCircle_1b256_gg_:first-child,.___STag_1b256_gg_._size_m_1b256_gg_ .___SCircle_1b256_gg_:first-child{margin-left:calc(-1*var(--intergalactic-spacing-05x, 2px))}.___STagContainerClose_1b256_gg_._size_m_1b256_gg_ .___SCircle_1b256_gg_:last-child,.___STagContainer_1b256_gg_._size_m_1b256_gg_ .___SAddon_1b256_gg_ .___SCircle_1b256_gg_:last-child,.___STag_1b256_gg_._size_m_1b256_gg_ .___SCircle_1b256_gg_:last-child{margin-right:calc(-1*var(--intergalactic-spacing-05x, 2px))}.___STagContainerClose_1b256_gg_._size_m_1b256_gg_ .___SText_1b256_gg_,.___STagContainer_1b256_gg_._size_m_1b256_gg_ .___SAddon_1b256_gg_ .___SText_1b256_gg_,.___STag_1b256_gg_._size_m_1b256_gg_ .___SText_1b256_gg_{font-size:var(--intergalactic-fs-100, 12px);line-height:var(--intergalactic-lh-100, 133%)}.___STagContainerClose_1b256_gg_._size_l_1b256_gg_,.___STagContainer_1b256_gg_._size_l_1b256_gg_ .___SAddon_1b256_gg_,.___STag_1b256_gg_._size_l_1b256_gg_{height:28px;min-width:28px}.___STagContainerClose_1b256_gg_._size_l_1b256_gg_ .___SText_1b256_gg_,.___STagContainer_1b256_gg_._size_l_1b256_gg_ .___SAddon_1b256_gg_ .___SText_1b256_gg_,.___STag_1b256_gg_._size_l_1b256_gg_ .___SText_1b256_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___STagContainerClose_1b256_gg_._size_xl_1b256_gg_,.___STag_1b256_gg_._size_xl_1b256_gg_{height:40px;min-width:40px;padding:0 var(--intergalactic-spacing-2x, 8px)}.___STagContainerClose_1b256_gg_._size_xl_1b256_gg_ .___SText_1b256_gg_,.___STag_1b256_gg_._size_xl_1b256_gg_ .___SText_1b256_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%)}.___STagContainerClose_1b256_gg_._theme_primary_1b256_gg_::before,.___STagContainer_1b256_gg_._theme_primary_1b256_gg_ .___SAddon_1b256_gg_::before,.___STag_1b256_gg_._theme_primary_1b256_gg_::before{top:-1px;left:-1px;right:-1px;bottom:-1px}.___STagContainerClose_1b256_gg_._theme_primary_1b256_gg_:after,.___STagContainer_1b256_gg_._theme_primary_1b256_gg_ .___SAddon_1b256_gg_:after,.___STag_1b256_gg_._theme_primary_1b256_gg_:after{display:none}.___STagContainerClose_1b256_gg_._theme_primary_1b256_gg_.__active_1b256_gg_:before,.___STagContainerClose_1b256_gg_._theme_primary_1b256_gg_.__interactiveView_1b256_gg_:active:before,.___STagContainer_1b256_gg_._theme_primary_1b256_gg_ .___SAddon_1b256_gg_.__active_1b256_gg_:before,.___STagContainer_1b256_gg_._theme_primary_1b256_gg_ .___SAddon_1b256_gg_.__interactiveView_1b256_gg_:active:before,.___STag_1b256_gg_._theme_primary_1b256_gg_.__active_1b256_gg_:before,.___STag_1b256_gg_._theme_primary_1b256_gg_.__interactiveView_1b256_gg_:active:before{opacity:.3}@media (hover:hover){.___STagContainerClose_1b256_gg_._theme_primary_1b256_gg_.__interactiveView_1b256_gg_:hover:before,.___STagContainer_1b256_gg_._theme_primary_1b256_gg_ .___SAddon_1b256_gg_.__interactiveView_1b256_gg_:hover:before,.___STag_1b256_gg_._theme_primary_1b256_gg_.__interactiveView_1b256_gg_:hover:before{opacity:.3}}.___STagContainerClose_1b256_gg_._theme_additional_1b256_gg_::before,.___STagContainerClose_1b256_gg_._theme_secondary_1b256_gg_::before,.___STag_1b256_gg_._theme_additional_1b256_gg_::before,.___STag_1b256_gg_._theme_secondary_1b256_gg_::before{opacity:.01}.___STagContainerClose_1b256_gg_._theme_additional_1b256_gg_.__active_1b256_gg_:before,.___STagContainerClose_1b256_gg_._theme_additional_1b256_gg_.__interactiveView_1b256_gg_:active:before,.___STagContainerClose_1b256_gg_._theme_secondary_1b256_gg_.__active_1b256_gg_:before,.___STagContainerClose_1b256_gg_._theme_secondary_1b256_gg_.__interactiveView_1b256_gg_:active:before,.___STag_1b256_gg_._theme_additional_1b256_gg_.__active_1b256_gg_:before,.___STag_1b256_gg_._theme_additional_1b256_gg_.__interactiveView_1b256_gg_:active:before,.___STag_1b256_gg_._theme_secondary_1b256_gg_.__active_1b256_gg_:before,.___STag_1b256_gg_._theme_secondary_1b256_gg_.__interactiveView_1b256_gg_:active:before{opacity:.1}@media (hover:hover){.___STagContainerClose_1b256_gg_._theme_additional_1b256_gg_.__interactiveView_1b256_gg_:hover:before,.___STagContainerClose_1b256_gg_._theme_secondary_1b256_gg_.__interactiveView_1b256_gg_:hover:before,.___STag_1b256_gg_._theme_additional_1b256_gg_.__interactiveView_1b256_gg_:hover:before,.___STag_1b256_gg_._theme_secondary_1b256_gg_.__interactiveView_1b256_gg_:hover:before{opacity:.1}}.___SClose_1b256_gg_ path,.___STagContainerClose_1b256_gg_._theme_additional-invert_1b256_gg_::after,.___STagContainerClose_1b256_gg_._theme_additional_1b256_gg_::after,.___STagContainerClose_1b256_gg_._theme_secondary-invert_1b256_gg_::after,.___STagContainerClose_1b256_gg_._theme_secondary_1b256_gg_::after,.___STagContainer_1b256_gg_ .___STagContainerClose_1b256_gg_ svg path,.___STag_1b256_gg_._theme_additional-invert_1b256_gg_::after,.___STag_1b256_gg_._theme_additional_1b256_gg_::after,.___STag_1b256_gg_._theme_secondary-invert_1b256_gg_::after,.___STag_1b256_gg_._theme_secondary_1b256_gg_::after{opacity:.5}.___STagContainerClose_1b256_gg_._theme_primary-invert_1b256_gg_,.___STag_1b256_gg_._theme_primary-invert_1b256_gg_{background-color:var(--intergalactic-tag-primary-white-normal,\n rgba(255, 255, 255, 0.15)\n );color:var(--intergalactic-text-primary-invert, #ffffff)}.___STagContainerClose_1b256_gg_._theme_additional-invert_1b256_gg_,.___STagContainerClose_1b256_gg_._theme_secondary-invert_1b256_gg_,.___STag_1b256_gg_._theme_additional-invert_1b256_gg_,.___STag_1b256_gg_._theme_secondary-invert_1b256_gg_{color:var(--intergalactic-text-primary-invert, #ffffff)}.___STag_1b256_gg_._theme_additional_1b256_gg_::after{border-style:dashed}.___SText_1b256_gg_{display:inline-block;padding-left:var(--intergalactic-spacing-1x, 4px);padding-right:var(--intergalactic-spacing-1x, 4px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative}.___SText_1b256_gg_:not(:only-child):first-child{padding-right:0}.___SText_1b256_gg_:not(:first-child):not(:last-child){padding-left:0;padding-right:0}.___SText_1b256_gg_:not(:only-child):last-child{padding-left:0}.___SClose_1b256_gg_{cursor:pointer;flex-shrink:0;padding:var(--intergalactic-spacing-1x, 4px)}@media (hover:hover){.___SClose_1b256_gg_:hover path{opacity:1}}.___SClose_1b256_gg_,.___STagContainer_1b256_gg_{display:inline-flex;position:relative;align-items:center;justify-content:center}.___STagContainer_1b256_gg_ .___SAddon_1b256_gg_:not(:last-child),.___STagContainer_1b256_gg_ .___STag_1b256_gg_:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0;padding-right:var(--intergalactic-spacing-05x, 2px)}.___STagContainer_1b256_gg_ .___SAddon_1b256_gg_:not(:last-child)::after,.___STagContainer_1b256_gg_ .___SAddon_1b256_gg_:not(:last-child)::before,.___STagContainer_1b256_gg_ .___STag_1b256_gg_:not(:last-child)::after,.___STagContainer_1b256_gg_ .___STag_1b256_gg_:not(:last-child)::before{border-right:0;border-top-right-radius:0;border-bottom-right-radius:0;margin-right:-1px}.___STagContainer_1b256_gg_ .___SAddon_1b256_gg_:not(:last-child) .___SText_1b256_gg_,.___STagContainer_1b256_gg_ .___STag_1b256_gg_:not(:last-child) .___SText_1b256_gg_{padding-right:0}.___STagContainer_1b256_gg_ .___SAddon_1b256_gg_:not(:first-child),.___STagContainer_1b256_gg_ .___STag_1b256_gg_:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0;padding-left:var(--intergalactic-spacing-05x, 2px)}.___STagContainer_1b256_gg_ .___SAddon_1b256_gg_:not(:first-child)::after,.___STagContainer_1b256_gg_ .___SAddon_1b256_gg_:not(:first-child)::before,.___STagContainer_1b256_gg_ .___STag_1b256_gg_:not(:first-child)::after,.___STagContainer_1b256_gg_ .___STag_1b256_gg_:not(:first-child)::before{border-left:0;border-top-left-radius:0;border-bottom-left-radius:0}.___STagContainer_1b256_gg_ .___SAddon_1b256_gg_:not(:first-child) .___SText_1b256_gg_,.___STagContainer_1b256_gg_ .___STag_1b256_gg_:not(:first-child) .___SText_1b256_gg_{padding-left:0}.___STagContainer_1b256_gg_ .___STagContainerClose_1b256_gg_{cursor:pointer;border-top-left-radius:0;border-bottom-left-radius:0;padding-left:0;padding-right:0;min-width:20px}.___STagContainer_1b256_gg_ .___STagContainerClose_1b256_gg_::after,.___STagContainer_1b256_gg_ .___STagContainerClose_1b256_gg_::before{border-left:0;border-top-left-radius:0;border-bottom-left-radius:0}.___STagContainer_1b256_gg_ .___STagContainerClose_1b256_gg_::before{left:-1px}.___STagContainer_1b256_gg_ .___STagContainerClose_1b256_gg_ svg{padding-left:0;padding-right:var(--intergalactic-spacing-1x, 4px)}@media (hover:hover){.___STagContainer_1b256_gg_ .___STagContainerClose_1b256_gg_:hover svg path{opacity:1}}.___STagContainer_1b256_gg_ .___STagContainerClose_1b256_gg_._size_xl_1b256_gg_ svg{padding-left:var(--intergalactic-spacing-1x, 4px);padding-right:var(--intergalactic-spacing-2x, 8px)}',
26
24
  "1b256_gg_"
27
25
  ), {
28
- __SCircle: "___SCircle_1b256_gg_",
29
- _size_m: "_size_m_1b256_gg_",
30
- _size_l: "_size_l_1b256_gg_",
31
- _size_xl: "_size_xl_1b256_gg_",
32
- __SAddon: "___SAddon_1b256_gg_",
33
- __STagContainer: "___STagContainer_1b256_gg_",
34
- __STag: "___STag_1b256_gg_",
35
- _disabled: "__disabled_1b256_gg_",
36
- __STagContainerClose: "___STagContainerClose_1b256_gg_",
37
- _interactiveView: "__interactiveView_1b256_gg_",
26
+ "__SCircle": "___SCircle_1b256_gg_",
27
+ "_size_m": "_size_m_1b256_gg_",
28
+ "_size_l": "_size_l_1b256_gg_",
29
+ "_size_xl": "_size_xl_1b256_gg_",
30
+ "__SAddon": "___SAddon_1b256_gg_",
31
+ "__STagContainer": "___STagContainer_1b256_gg_",
32
+ "__STag": "___STag_1b256_gg_",
33
+ "_disabled": "__disabled_1b256_gg_",
34
+ "__STagContainerClose": "___STagContainerClose_1b256_gg_",
35
+ "_interactiveView": "__interactiveView_1b256_gg_",
38
36
  "_theme_primary-invert": "_theme_primary-invert_1b256_gg_",
39
37
  "_theme_secondary-invert": "_theme_secondary-invert_1b256_gg_",
40
38
  "_theme_additional-invert": "_theme_additional-invert_1b256_gg_",
41
- __SText: "___SText_1b256_gg_",
39
+ "__SText": "___SText_1b256_gg_",
42
40
  "--tag-color": "--tag-color_1b256",
43
- _interactive: "__interactive_1b256_gg_",
44
- _theme_primary: "_theme_primary_1b256_gg_",
45
- _active: "__active_1b256_gg_",
46
- _theme_secondary: "_theme_secondary_1b256_gg_",
47
- _theme_additional: "_theme_additional_1b256_gg_",
48
- __SClose: "___SClose_1b256_gg_"
41
+ "_interactive": "__interactive_1b256_gg_",
42
+ "_theme_primary": "_theme_primary_1b256_gg_",
43
+ "_active": "__active_1b256_gg_",
44
+ "_theme_secondary": "_theme_secondary_1b256_gg_",
45
+ "_theme_additional": "_theme_additional_1b256_gg_",
46
+ "__SClose": "___SClose_1b256_gg_"
49
47
  })
50
- ), W = {
48
+ );
49
+ var legacyThemeRecommendedMigration = {
51
50
  primary: {
52
51
  muted: "gray-500",
53
52
  info: "blue-500",
@@ -58,228 +57,273 @@ var N = (
58
57
  secondary: {
59
58
  muted: "gray-50"
60
59
  }
61
- }, u = /* @__PURE__ */ function(i) {
62
- k(t, i);
63
- var n = E(t);
64
- function t(a) {
65
- var _, g;
66
- return P(this, t), g = n.call(this, a), s(M(g), "handleKeyDown", function(r) {
67
- switch (r.key) {
60
+ };
61
+ var RootTag = /* @__PURE__ */ function(_Component) {
62
+ _inherits(RootTag2, _Component);
63
+ var _super = _createSuper(RootTag2);
64
+ function RootTag2(props) {
65
+ var _legacyThemeRecommend;
66
+ var _this;
67
+ _classCallCheck(this, RootTag2);
68
+ _this = _super.call(this, props);
69
+ _defineProperty(_assertThisInitialized(_this), "handleKeyDown", function(event) {
70
+ switch (event.key) {
68
71
  case " ":
69
72
  case "Enter":
70
- g.asProps.onClick && (r.preventDefault(), g.asProps.onClick(r));
73
+ if (_this.asProps.onClick) {
74
+ event.preventDefault();
75
+ _this.asProps.onClick(event);
76
+ }
71
77
  break;
72
78
  }
73
- }), O.warn(a.use, `Property 'use' is deprecated, replace property to "theme='`.concat(a.use, "' color='").concat((_ = W[a.use]) === null || _ === void 0 ? void 0 : _[a.theme], `'"`), a["data-ui-name"] || h.displayName), g;
79
+ });
80
+ logger.warn(props.use, `Property 'use' is deprecated, replace property to "theme='`.concat(props.use, "' color='").concat((_legacyThemeRecommend = legacyThemeRecommendedMigration[props.use]) === null || _legacyThemeRecommend === void 0 ? void 0 : _legacyThemeRecommend[props.theme], `'"`), props["data-ui-name"] || Tag.displayName);
81
+ return _this;
74
82
  }
75
- return A(t, [{
83
+ _createClass(RootTag2, [{
76
84
  key: "getCircleProps",
77
- value: function() {
78
- var _ = this.asProps, g = _.size, r = _.color, e = _.resolveColor;
85
+ value: function getCircleProps() {
86
+ var _this$asProps = this.asProps, size = _this$asProps.size, color = _this$asProps.color, resolveColor = _this$asProps.resolveColor;
79
87
  return {
80
- size: g,
81
- color: r,
82
- resolveColor: e
88
+ size,
89
+ color,
90
+ resolveColor
83
91
  };
84
92
  }
85
93
  }, {
86
94
  key: "getTextProps",
87
- value: function() {
88
- var _ = this.asProps.id || "igc-".concat(this.asProps.uid, "-tag");
95
+ value: function getTextProps() {
96
+ var id = this.asProps.id || "igc-".concat(this.asProps.uid, "-tag");
89
97
  return {
90
98
  tabIndex: -1,
91
- id: "".concat(_, "-text"),
99
+ id: "".concat(id, "-text"),
92
100
  role: void 0
93
101
  };
94
102
  }
95
103
  }, {
96
104
  key: "render",
97
- value: function() {
98
- var _ = this.asProps, g, r = m, e = this.asProps, b = e.Children, l = e.styles, d = e.color, c = e.interactive, S = e.disabled, C = e.addonLeft, R = e.addonRight, q = e.resolveColor, B = e.id, F = e.uid, G = B || "igc-".concat(F, "-tag"), H = !S && c, w = !S && c;
99
- return g = p(l), /* @__PURE__ */ o.createElement(r, g.cn("STag", v({}, f({
100
- id: G,
101
- "use:interactive": w,
102
- "use:interactiveView": H,
103
- "tag-color": q(d),
104
- onKeyDown: this.handleKeyDown,
105
- "use:tabIndex": w ? 0 : -1,
106
- role: w ? "button" : void 0
107
- }, _))), C ? /* @__PURE__ */ o.createElement(h.Addon, {
108
- tag: C
109
- }) : null, J(b, h.Text, [h.Addon, T.Circle]), R ? /* @__PURE__ */ o.createElement(h.Addon, {
110
- tag: R
105
+ value: function render() {
106
+ var _ref = this.asProps, _ref8;
107
+ var STag = Box;
108
+ var _this$asProps2 = this.asProps, Children = _this$asProps2.Children, styles = _this$asProps2.styles, color = _this$asProps2.color, interactive = _this$asProps2.interactive, disabled = _this$asProps2.disabled, addonLeft = _this$asProps2.addonLeft, addonRight = _this$asProps2.addonRight, resolveColor = _this$asProps2.resolveColor, outerId = _this$asProps2.id, uid = _this$asProps2.uid;
109
+ var id = outerId || "igc-".concat(uid, "-tag");
110
+ var isInteractiveView = !disabled && interactive;
111
+ var isInteractive = !disabled && interactive;
112
+ return _ref8 = sstyled(styles), /* @__PURE__ */ React.createElement(STag, _ref8.cn("STag", _objectSpread({}, assignProps({
113
+ "id": id,
114
+ "use:interactive": isInteractive,
115
+ "use:interactiveView": isInteractiveView,
116
+ "tag-color": resolveColor(color),
117
+ "onKeyDown": this.handleKeyDown,
118
+ "use:tabIndex": isInteractive ? 0 : -1,
119
+ "role": isInteractive ? "button" : void 0
120
+ }, _ref))), addonLeft ? /* @__PURE__ */ React.createElement(Tag.Addon, {
121
+ tag: addonLeft
122
+ }) : null, addonTextChildren(Children, Tag.Text, [Tag.Addon, TagContainer.Circle]), addonRight ? /* @__PURE__ */ React.createElement(Tag.Addon, {
123
+ tag: addonRight
111
124
  }) : null);
112
125
  }
113
- }]), t;
114
- }(I);
115
- s(u, "displayName", "Tag");
116
- s(u, "style", N);
117
- s(u, "enhance", [$(z), K(), D()]);
118
- s(u, "defaultProps", {
126
+ }]);
127
+ return RootTag2;
128
+ }(Component);
129
+ _defineProperty(RootTag, "displayName", "Tag");
130
+ _defineProperty(RootTag, "style", style);
131
+ _defineProperty(RootTag, "enhance", [i18nEnhance(localizedMessages), uniqueIDEnhancement(), resolveColorEnhance()]);
132
+ _defineProperty(RootTag, "defaultProps", {
119
133
  theme: "primary",
120
134
  color: "gray-500",
121
135
  size: "m",
122
- i18n: z,
136
+ i18n: localizedMessages,
123
137
  locale: "en"
124
138
  });
125
- var y = /* @__PURE__ */ function(i) {
126
- k(t, i);
127
- var n = E(t);
128
- function t() {
129
- return P(this, t), n.apply(this, arguments);
139
+ var RootTagContainer = /* @__PURE__ */ function(_Component2) {
140
+ _inherits(RootTagContainer2, _Component2);
141
+ var _super2 = _createSuper(RootTagContainer2);
142
+ function RootTagContainer2() {
143
+ _classCallCheck(this, RootTagContainer2);
144
+ return _super2.apply(this, arguments);
130
145
  }
131
- return A(t, [{
146
+ _createClass(RootTagContainer2, [{
132
147
  key: "getTagProps",
133
- value: function() {
134
- var _ = this.asProps, g = _.size, r = _.theme, e = _.color, b = _.disabled, l = _.uid, d = _.id, c = _.interactive, S = _.resolveColor, C = d || "igc-".concat(l, "-tag");
148
+ value: function getTagProps() {
149
+ var _this$asProps3 = this.asProps, size = _this$asProps3.size, theme = _this$asProps3.theme, color = _this$asProps3.color, disabled = _this$asProps3.disabled, uid = _this$asProps3.uid, outerId = _this$asProps3.id, interactive = _this$asProps3.interactive, resolveColor = _this$asProps3.resolveColor;
150
+ var id = outerId || "igc-".concat(uid, "-tag");
135
151
  return {
136
- id: "".concat(C, "-text"),
137
- disabled: b,
138
- size: g,
139
- theme: r,
140
- color: e,
141
- tag: c ? "button" : void 0,
142
- interactive: c,
143
- resolveColor: S
152
+ id: "".concat(id, "-text"),
153
+ disabled,
154
+ size,
155
+ theme,
156
+ color,
157
+ tag: interactive ? "button" : void 0,
158
+ interactive,
159
+ resolveColor
144
160
  };
145
161
  }
146
162
  }, {
147
163
  key: "getCircleProps",
148
- value: function() {
149
- var _ = this.asProps, g = _.color, r = _.resolveColor, e = _.size;
164
+ value: function getCircleProps() {
165
+ var _this$asProps4 = this.asProps, color = _this$asProps4.color, resolveColor = _this$asProps4.resolveColor, size = _this$asProps4.size;
150
166
  return {
151
- color: g,
152
- resolveColor: r,
153
- size: e
167
+ color,
168
+ resolveColor,
169
+ size
154
170
  };
155
171
  }
156
172
  }, {
157
173
  key: "getAddonProps",
158
- value: function() {
159
- var _ = this.asProps, g = _.color, r = _.resolveColor;
174
+ value: function getAddonProps() {
175
+ var _this$asProps5 = this.asProps, color = _this$asProps5.color, resolveColor = _this$asProps5.resolveColor;
160
176
  return {
161
- color: g,
162
- resolveColor: r
177
+ color,
178
+ resolveColor
163
179
  };
164
180
  }
165
181
  }, {
166
182
  key: "getCloseProps",
167
- value: function() {
168
- var _ = this.asProps, g = _.size, r = _.theme, e = _.color, b = _.disabled, l = _.uid, d = _.id, c = _.getI18nText, S = _.resolveColor, C = d || "igc-".concat(l, "-tag");
183
+ value: function getCloseProps() {
184
+ var _this$asProps6 = this.asProps, size = _this$asProps6.size, theme = _this$asProps6.theme, color = _this$asProps6.color, disabled = _this$asProps6.disabled, uid = _this$asProps6.uid, outerId = _this$asProps6.id, getI18nText = _this$asProps6.getI18nText, resolveColor = _this$asProps6.resolveColor;
185
+ var id = outerId || "igc-".concat(uid, "-tag");
169
186
  return {
170
- disabled: b,
171
- size: g,
172
- theme: r,
173
- color: e,
174
- id: "".concat(C, "-clear"),
175
- "aria-labelledby": "".concat(C, "-clear ").concat(C, "-text"),
176
- "aria-label": c("remove"),
177
- resolveColor: S
187
+ disabled,
188
+ size,
189
+ theme,
190
+ color,
191
+ id: "".concat(id, "-clear"),
192
+ "aria-labelledby": "".concat(id, "-clear ").concat(id, "-text"),
193
+ "aria-label": getI18nText("remove"),
194
+ resolveColor
178
195
  };
179
196
  }
180
197
  }, {
181
198
  key: "render",
182
- value: function() {
183
- var _ = this.asProps, g, r = m, e = this.asProps, b = e.styles, l = e.Children, d = e.forcedAdvancedMode, c = d || U(l, ["InputTags." + h.Text.displayName, "InputTags." + h.Addon.displayName, "InputTags." + h.Circle.displayName, T.Tag.displayName, T.Addon.displayName, T.Close.displayName, T.Circle.displayName], !0);
184
- return g = p(b), /* @__PURE__ */ o.createElement(r, g.cn("STagContainer", v({}, f({}, _))), c ? /* @__PURE__ */ o.createElement(l, g.cn("Children", {})) : /* @__PURE__ */ o.createElement(T.Tag, null, /* @__PURE__ */ o.createElement(l, g.cn("Children", {}))));
199
+ value: function render() {
200
+ var _ref2 = this.asProps, _ref9;
201
+ var STagContainer = Box;
202
+ var _this$asProps7 = this.asProps, styles = _this$asProps7.styles, Children = _this$asProps7.Children, forcedAdvancedMode = _this$asProps7.forcedAdvancedMode;
203
+ var advancedMode = forcedAdvancedMode || isAdvanceMode(Children, ["InputTags." + Tag.Text.displayName, "InputTags." + Tag.Addon.displayName, "InputTags." + Tag.Circle.displayName, TagContainer.Tag.displayName, TagContainer.Addon.displayName, TagContainer.Close.displayName, TagContainer.Circle.displayName], true);
204
+ return _ref9 = sstyled(styles), /* @__PURE__ */ React.createElement(STagContainer, _ref9.cn("STagContainer", _objectSpread({}, assignProps({}, _ref2))), advancedMode ? /* @__PURE__ */ React.createElement(Children, _ref9.cn("Children", {})) : /* @__PURE__ */ React.createElement(TagContainer.Tag, null, /* @__PURE__ */ React.createElement(Children, _ref9.cn("Children", {}))));
185
205
  }
186
- }]), t;
187
- }(I);
188
- s(y, "displayName", "TagContainer");
189
- s(y, "style", N);
190
- s(y, "enhance", [$(z), K(), D()]);
191
- s(y, "defaultProps", {
206
+ }]);
207
+ return RootTagContainer2;
208
+ }(Component);
209
+ _defineProperty(RootTagContainer, "displayName", "TagContainer");
210
+ _defineProperty(RootTagContainer, "style", style);
211
+ _defineProperty(RootTagContainer, "enhance", [i18nEnhance(localizedMessages), uniqueIDEnhancement(), resolveColorEnhance()]);
212
+ _defineProperty(RootTagContainer, "defaultProps", {
192
213
  color: "gray-500",
193
214
  theme: "primary"
194
215
  });
195
- var x = /* @__PURE__ */ function(i) {
196
- k(t, i);
197
- var n = E(t);
198
- function t() {
199
- var a;
200
- P(this, t);
201
- for (var _ = arguments.length, g = new Array(_), r = 0; r < _; r++)
202
- g[r] = arguments[r];
203
- return a = n.call.apply(n, [this].concat(g)), s(M(a), "handleKeyDown", function(e) {
204
- var b = a.asProps, l = b.onKeyDown, d = b.onClick;
205
- if (l)
206
- return l(e);
207
- d && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), d(e));
208
- }), a;
216
+ var RootCloseTagContainer = /* @__PURE__ */ function(_Component3) {
217
+ _inherits(RootCloseTagContainer2, _Component3);
218
+ var _super3 = _createSuper(RootCloseTagContainer2);
219
+ function RootCloseTagContainer2() {
220
+ var _this2;
221
+ _classCallCheck(this, RootCloseTagContainer2);
222
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
223
+ args[_key] = arguments[_key];
224
+ }
225
+ _this2 = _super3.call.apply(_super3, [this].concat(args));
226
+ _defineProperty(_assertThisInitialized(_this2), "handleKeyDown", function(event) {
227
+ var _this2$asProps = _this2.asProps, onKeyDown = _this2$asProps.onKeyDown, onClick = _this2$asProps.onClick;
228
+ if (onKeyDown) {
229
+ return onKeyDown(event);
230
+ }
231
+ if (onClick && (event.key === "Enter" || event.key === " ")) {
232
+ event.preventDefault();
233
+ onClick(event);
234
+ }
235
+ });
236
+ return _this2;
209
237
  }
210
- return A(t, [{
238
+ _createClass(RootCloseTagContainer2, [{
211
239
  key: "render",
212
- value: function() {
213
- var _ = this.asProps, g, r = m, e = this.asProps, b = e.Children, l = e.styles, d = e.color, c = e.resolveColor;
214
- return g = p(l), /* @__PURE__ */ o.createElement(r, g.cn("STagContainerClose", v({}, f({
215
- tag: "button",
216
- type: "button",
217
- interactive: !0,
218
- interactiveView: !0,
219
- "tag-color": c(d),
220
- onKeyDown: this.handleKeyDown
221
- }, _))), /* @__PURE__ */ o.createElement(b, g.cn("Children", {})));
240
+ value: function render() {
241
+ var _ref3 = this.asProps, _ref10;
242
+ var STagContainerClose = Box;
243
+ var _this$asProps8 = this.asProps, Children = _this$asProps8.Children, styles = _this$asProps8.styles, color = _this$asProps8.color, resolveColor = _this$asProps8.resolveColor;
244
+ return _ref10 = sstyled(styles), /* @__PURE__ */ React.createElement(STagContainerClose, _ref10.cn("STagContainerClose", _objectSpread({}, assignProps({
245
+ "tag": "button",
246
+ "type": "button",
247
+ "interactive": true,
248
+ "interactiveView": true,
249
+ "tag-color": resolveColor(color),
250
+ "onKeyDown": this.handleKeyDown
251
+ }, _ref3))), /* @__PURE__ */ React.createElement(Children, _ref10.cn("Children", {})));
222
252
  }
223
- }]), t;
224
- }(I);
225
- s(x, "displayName", "CloseTagContainer");
226
- s(x, "style", N);
227
- s(x, "defaultProps", function() {
253
+ }]);
254
+ return RootCloseTagContainer2;
255
+ }(Component);
256
+ _defineProperty(RootCloseTagContainer, "displayName", "CloseTagContainer");
257
+ _defineProperty(RootCloseTagContainer, "style", style);
258
+ _defineProperty(RootCloseTagContainer, "defaultProps", function() {
228
259
  return {
229
260
  theme: "primary",
230
261
  color: "gray-500",
231
262
  size: "m",
232
- i18n: z,
263
+ i18n: localizedMessages,
233
264
  locale: "en",
234
- children: /* @__PURE__ */ o.createElement(L.Close, null)
265
+ children: /* @__PURE__ */ React.createElement(CloseTagContainer.Close, null)
235
266
  };
236
267
  });
237
- s(x, "enhance", [D()]);
238
- function X(i) {
239
- var n = arguments[0], t, a = m, _ = m, g = i.styles, r = i.color, e = i.resolveColor;
240
- return t = p(g), /* @__PURE__ */ o.createElement(a, t.cn("SAddon", {
241
- "tag-color": e(r)
242
- }), /* @__PURE__ */ o.createElement(_, t.cn("SCircle", v({}, f({}, n)))));
268
+ _defineProperty(RootCloseTagContainer, "enhance", [resolveColorEnhance()]);
269
+ function TagContainerCircle(props) {
270
+ var _ref4 = arguments[0], _ref11;
271
+ var SAddon = Box;
272
+ var SCircle = Box;
273
+ var styles = props.styles, color = props.color, resolveColor = props.resolveColor;
274
+ return _ref11 = sstyled(styles), /* @__PURE__ */ React.createElement(SAddon, _ref11.cn("SAddon", {
275
+ "tag-color": resolveColor(color)
276
+ }), /* @__PURE__ */ React.createElement(SCircle, _ref11.cn("SCircle", _objectSpread({}, assignProps({}, _ref4)))));
243
277
  }
244
- function Y(i) {
245
- var n = arguments[0], t, a = m, _ = i.styles;
246
- return t = p(_), /* @__PURE__ */ o.createElement(a, t.cn("SText", v({}, f({
247
- tag: "span"
248
- }, n))));
278
+ function Text(props) {
279
+ var _ref5 = arguments[0], _ref12;
280
+ var SText = Box;
281
+ var styles = props.styles;
282
+ return _ref12 = sstyled(styles), /* @__PURE__ */ React.createElement(SText, _ref12.cn("SText", _objectSpread({}, assignProps({
283
+ "tag": "span"
284
+ }, _ref5))));
249
285
  }
250
- function j(i) {
251
- var n = arguments[0], t, a = m, _ = i.styles, g = i.color, r = i.resolveColor, e = o.useMemo(function() {
252
- if (typeof r == "function")
253
- return r(g);
254
- }, [g, r]);
255
- return t = p(_), /* @__PURE__ */ o.createElement(a, t.cn("SAddon", v({}, f({
256
- tag: "div",
257
- "tag-color": e
258
- }, n))));
286
+ function Addon(props) {
287
+ var _ref6 = arguments[0], _ref13;
288
+ var SAddon = Box;
289
+ var styles = props.styles, color = props.color, resolveColor = props.resolveColor;
290
+ var tagColor = React.useMemo(function() {
291
+ if (typeof resolveColor !== "function") return;
292
+ return resolveColor(color);
293
+ }, [color, resolveColor]);
294
+ return _ref13 = sstyled(styles), /* @__PURE__ */ React.createElement(SAddon, _ref13.cn("SAddon", _objectSpread({}, assignProps({
295
+ "tag": "div",
296
+ "tag-color": tagColor
297
+ }, _ref6))));
259
298
  }
260
- function Z(i) {
261
- var n = arguments[0], t, a = m, _ = i.styles, g = i.color, r = i.resolveColor, e = o.useMemo(function() {
262
- if (typeof r == "function")
263
- return r(g);
264
- }, [g, r]);
265
- return t = p(_), /* @__PURE__ */ o.createElement(a, t.cn("SCircle", v({}, f({
266
- tag: "span",
267
- "tag-color": e
268
- }, n))));
299
+ function Circle(props) {
300
+ var _ref7 = arguments[0], _ref14;
301
+ var SCircle = Box;
302
+ var styles = props.styles, color = props.color, resolveColor = props.resolveColor;
303
+ var tagColor = React.useMemo(function() {
304
+ if (typeof resolveColor !== "function") return;
305
+ return resolveColor(color);
306
+ }, [color, resolveColor]);
307
+ return _ref14 = sstyled(styles), /* @__PURE__ */ React.createElement(SCircle, _ref14.cn("SCircle", _objectSpread({}, assignProps({
308
+ "tag": "span",
309
+ "tag-color": tagColor
310
+ }, _ref7))));
269
311
  }
270
- var h = V(u, {
271
- Text: Y,
272
- Addon: j,
273
- Circle: Z
274
- }), L = V(x, {
275
- Close: Q
276
- }), T = V(y, {
277
- Tag: h,
278
- Addon: j,
279
- Close: L,
280
- Circle: X
312
+ var Tag = createComponent(RootTag, {
313
+ Text,
314
+ Addon,
315
+ Circle
316
+ });
317
+ var CloseTagContainer = createComponent(RootCloseTagContainer, {
318
+ Close: CloseM
319
+ });
320
+ var TagContainer = createComponent(RootTagContainer, {
321
+ Tag,
322
+ Addon,
323
+ Close: CloseTagContainer,
324
+ Circle: TagContainerCircle
281
325
  });
282
326
  export {
283
- T as TagContainer,
284
- h as default
327
+ TagContainer,
328
+ Tag as default
285
329
  };
package/lib/esm/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { TagContainer as o, default as r } from "./Tag.mjs";
1
+ import { TagContainer, default as default2 } from "./Tag.mjs";
2
2
  export {
3
- o as TagContainer,
4
- r as default
3
+ TagContainer,
4
+ default2 as default
5
5
  };
@@ -1,33 +1,33 @@
1
- import r from "./de.json.mjs";
2
- import o from "./en.json.mjs";
3
- import m from "./es.json.mjs";
4
- import t from "./fr.json.mjs";
5
- import i from "./it.json.mjs";
6
- import p from "./ja.json.mjs";
7
- import f from "./ko.json.mjs";
8
- import e from "./nl.json.mjs";
9
- import s from "./pt.json.mjs";
10
- import a from "./tr.json.mjs";
11
- import l from "./vi.json.mjs";
12
- import v from "./zh.json.mjs";
13
- import d from "./pl.json.mjs";
14
- import n from "./sv.json.mjs";
15
- var B = {
16
- de: r,
17
- en: o,
18
- es: m,
19
- fr: t,
20
- it: i,
21
- ja: p,
22
- ko: f,
23
- nl: e,
24
- pt: s,
25
- tr: a,
26
- vi: l,
27
- zh: v,
28
- pl: d,
29
- sv: n
1
+ import de from "./de.json.mjs";
2
+ import en from "./en.json.mjs";
3
+ import es from "./es.json.mjs";
4
+ import fr from "./fr.json.mjs";
5
+ import it from "./it.json.mjs";
6
+ import ja from "./ja.json.mjs";
7
+ import ko from "./ko.json.mjs";
8
+ import nl from "./nl.json.mjs";
9
+ import pt from "./pt.json.mjs";
10
+ import tr from "./tr.json.mjs";
11
+ import vi from "./vi.json.mjs";
12
+ import zh from "./zh.json.mjs";
13
+ import pl from "./pl.json.mjs";
14
+ import sv from "./sv.json.mjs";
15
+ var localizedMessages = {
16
+ de,
17
+ en,
18
+ es,
19
+ fr,
20
+ it,
21
+ ja,
22
+ ko,
23
+ nl,
24
+ pt,
25
+ tr,
26
+ vi,
27
+ zh,
28
+ pl,
29
+ sv
30
30
  };
31
31
  export {
32
- B as localizedMessages
32
+ localizedMessages
33
33
  };
@@ -1,7 +1,8 @@
1
- const e = "Entfernen", n = {
2
- remove: e
1
+ const remove = "Entfernen";
2
+ const de = {
3
+ remove
3
4
  };
4
5
  export {
5
- n as default,
6
- e as remove
6
+ de as default,
7
+ remove
7
8
  };
@@ -1,7 +1,8 @@
1
- const e = "Delete", o = {
2
- remove: e
1
+ const remove = "Delete";
2
+ const en = {
3
+ remove
3
4
  };
4
5
  export {
5
- o as default,
6
- e as remove
6
+ en as default,
7
+ remove
7
8
  };
@@ -1,7 +1,8 @@
1
- const e = "Eliminar", o = {
2
- remove: e
1
+ const remove = "Eliminar";
2
+ const es = {
3
+ remove
3
4
  };
4
5
  export {
5
- o as default,
6
- e as remove
6
+ es as default,
7
+ remove
7
8
  };
@@ -1,7 +1,8 @@
1
- const e = "Supprimer", r = {
2
- remove: e
1
+ const remove = "Supprimer";
2
+ const fr = {
3
+ remove
3
4
  };
4
5
  export {
5
- r as default,
6
- e as remove
6
+ fr as default,
7
+ remove
7
8
  };
@@ -1,7 +1,8 @@
1
- const e = "Rimuovi", o = {
2
- remove: e
1
+ const remove = "Rimuovi";
2
+ const it = {
3
+ remove
3
4
  };
4
5
  export {
5
- o as default,
6
- e as remove
6
+ it as default,
7
+ remove
7
8
  };
@@ -1,7 +1,8 @@
1
- const e = "削除", o = {
2
- remove: e
1
+ const remove = "削除";
2
+ const ja = {
3
+ remove
3
4
  };
4
5
  export {
5
- o as default,
6
- e as remove
6
+ ja as default,
7
+ remove
7
8
  };
@@ -1,7 +1,8 @@
1
- const e = "제거", o = {
2
- remove: e
1
+ const remove = "제거";
2
+ const ko = {
3
+ remove
3
4
  };
4
5
  export {
5
- o as default,
6
- e as remove
6
+ ko as default,
7
+ remove
7
8
  };
@@ -1,7 +1,8 @@
1
- const e = "Verwijderen", o = {
2
- remove: e
1
+ const remove = "Verwijderen";
2
+ const nl = {
3
+ remove
3
4
  };
4
5
  export {
5
- o as default,
6
- e as remove
6
+ nl as default,
7
+ remove
7
8
  };
@@ -1,7 +1,8 @@
1
- const e = "Usuń", o = {
2
- remove: e
1
+ const remove = "Usuń";
2
+ const pl = {
3
+ remove
3
4
  };
4
5
  export {
5
- o as default,
6
- e as remove
6
+ pl as default,
7
+ remove
7
8
  };
@@ -1,7 +1,8 @@
1
- const e = "Remover", o = {
2
- remove: e
1
+ const remove = "Remover";
2
+ const pt = {
3
+ remove
3
4
  };
4
5
  export {
5
- o as default,
6
- e as remove
6
+ pt as default,
7
+ remove
7
8
  };
@@ -1,7 +1,8 @@
1
- const e = "Ta bort", o = {
2
- remove: e
1
+ const remove = "Ta bort";
2
+ const sv = {
3
+ remove
3
4
  };
4
5
  export {
5
- o as default,
6
- e as remove
6
+ sv as default,
7
+ remove
7
8
  };
@@ -1,7 +1,8 @@
1
- const e = "Kaldır", o = {
2
- remove: e
1
+ const remove = "Kaldır";
2
+ const tr = {
3
+ remove
3
4
  };
4
5
  export {
5
- o as default,
6
- e as remove
6
+ tr as default,
7
+ remove
7
8
  };
@@ -1,7 +1,8 @@
1
- const e = "Loại bỏ", o = {
2
- remove: e
1
+ const remove = "Loại bỏ";
2
+ const vi = {
3
+ remove
3
4
  };
4
5
  export {
5
- o as default,
6
- e as remove
6
+ vi as default,
7
+ remove
7
8
  };
@@ -1,7 +1,8 @@
1
- const e = "移除", o = {
2
- remove: e
1
+ const remove = "移除";
2
+ const zh = {
3
+ remove
3
4
  };
4
5
  export {
5
- o as default,
6
- e as remove
6
+ zh as default,
7
+ remove
7
8
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/tag",
3
3
  "description": "Semrush Tag Component",
4
- "version": "16.0.0-prerelease.4",
4
+ "version": "16.0.0-prerelease.7",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
@@ -14,11 +14,11 @@
14
14
  "types": "./lib/types/index.d.ts"
15
15
  },
16
16
  "dependencies": {
17
- "@semcore/flex-box": "16.0.0-prerelease.4",
18
- "@semcore/icon": "16.0.0-prerelease.4"
17
+ "@semcore/flex-box": "16.0.0-prerelease.7",
18
+ "@semcore/icon": "16.0.0-prerelease.7"
19
19
  },
20
20
  "peerDependencies": {
21
- "@semcore/base-components": "^16.0.0-prerelease.4"
21
+ "@semcore/base-components": "^16.0.0-prerelease.7"
22
22
  },
23
23
  "repository": {
24
24
  "type": "git",