@semcore/feature-highlight 17.1.0 → 17.2.0-prerelease.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 +10 -0
- package/lib/cjs/components/badge/Badge.js +11 -5
- package/lib/cjs/components/badge/Badge.js.map +1 -1
- package/lib/cjs/components/button/Button.js +22 -9
- package/lib/cjs/components/button/Button.js.map +1 -1
- package/lib/cjs/components/button/Button.type.js.map +1 -1
- package/lib/cjs/components/checkbox/Checkbox.js +9 -3
- package/lib/cjs/components/checkbox/Checkbox.js.map +1 -1
- package/lib/cjs/components/input/Input.js +14 -8
- package/lib/cjs/components/input/Input.js.map +1 -1
- package/lib/cjs/components/notice/Notice.js +12 -6
- package/lib/cjs/components/notice/Notice.js.map +1 -1
- package/lib/cjs/components/notice/notice.shadow.css +2 -3
- package/lib/cjs/components/pills/Pills.js +18 -11
- package/lib/cjs/components/pills/Pills.js.map +1 -1
- package/lib/cjs/components/pills/Pills.type.js.map +1 -1
- package/lib/cjs/components/radio/Radio.js +9 -3
- package/lib/cjs/components/radio/Radio.js.map +1 -1
- package/lib/cjs/components/select/Select.js +6 -0
- package/lib/cjs/components/select/Select.js.map +1 -1
- package/lib/cjs/components/switch/Switch.js +10 -4
- package/lib/cjs/components/switch/Switch.js.map +1 -1
- package/lib/cjs/components/tab-line/TabLine.js +15 -8
- package/lib/cjs/components/tab-line/TabLine.js.map +1 -1
- package/lib/cjs/components/tab-line/TabLine.type.js.map +1 -1
- package/lib/cjs/inner-components/button-trigger/ButtonTrigger.js +8 -8
- package/lib/cjs/inner-components/button-trigger/ButtonTrigger.js.map +1 -1
- package/lib/cjs/inner-components/sparkle/Sparkle.js +13 -13
- package/lib/cjs/inner-components/sparkle/Sparkle.js.map +1 -1
- package/lib/es6/components/badge/Badge.js +11 -5
- package/lib/es6/components/badge/Badge.js.map +1 -1
- package/lib/es6/components/button/Button.js +23 -9
- package/lib/es6/components/button/Button.js.map +1 -1
- package/lib/es6/components/button/Button.type.js.map +1 -1
- package/lib/es6/components/checkbox/Checkbox.js +9 -3
- package/lib/es6/components/checkbox/Checkbox.js.map +1 -1
- package/lib/es6/components/input/Input.js +14 -8
- package/lib/es6/components/input/Input.js.map +1 -1
- package/lib/es6/components/notice/Notice.js +12 -6
- package/lib/es6/components/notice/Notice.js.map +1 -1
- package/lib/es6/components/notice/notice.shadow.css +2 -3
- package/lib/es6/components/pills/Pills.js +18 -11
- package/lib/es6/components/pills/Pills.js.map +1 -1
- package/lib/es6/components/pills/Pills.type.js.map +1 -1
- package/lib/es6/components/radio/Radio.js +9 -3
- package/lib/es6/components/radio/Radio.js.map +1 -1
- package/lib/es6/components/select/Select.js +6 -0
- package/lib/es6/components/select/Select.js.map +1 -1
- package/lib/es6/components/switch/Switch.js +10 -4
- package/lib/es6/components/switch/Switch.js.map +1 -1
- package/lib/es6/components/tab-line/TabLine.js +15 -8
- package/lib/es6/components/tab-line/TabLine.js.map +1 -1
- package/lib/es6/components/tab-line/TabLine.type.js.map +1 -1
- package/lib/es6/inner-components/button-trigger/ButtonTrigger.js +8 -8
- package/lib/es6/inner-components/button-trigger/ButtonTrigger.js.map +1 -1
- package/lib/es6/inner-components/sparkle/Sparkle.js +13 -13
- package/lib/es6/inner-components/sparkle/Sparkle.js.map +1 -1
- package/lib/esm/components/badge/Badge.mjs +7 -7
- package/lib/esm/components/button/Button.mjs +11 -11
- package/lib/esm/components/checkbox/Checkbox.mjs +5 -5
- package/lib/esm/components/input/Input.mjs +10 -10
- package/lib/esm/components/notice/Notice.mjs +8 -8
- package/lib/esm/components/notice/notice.shadow.css +2 -3
- package/lib/esm/components/pills/Pills.mjs +14 -13
- package/lib/esm/components/radio/Radio.mjs +5 -5
- package/lib/esm/components/select/Select.mjs +1 -1
- package/lib/esm/components/switch/Switch.mjs +6 -6
- package/lib/esm/components/tab-line/TabLine.mjs +11 -10
- package/lib/esm/inner-components/button-trigger/ButtonTrigger.mjs +10 -10
- package/lib/esm/inner-components/sparkle/Sparkle.mjs +14 -14
- package/lib/types/components/badge/Badge.d.ts +8 -1
- package/lib/types/components/button/Button.d.ts +5 -0
- package/lib/types/components/button/Button.type.d.ts +3 -0
- package/lib/types/components/checkbox/Checkbox.d.ts +5 -0
- package/lib/types/components/input/Input.d.ts +9 -2
- package/lib/types/components/notice/Notice.d.ts +5 -0
- package/lib/types/components/pills/Pills.d.ts +5 -0
- package/lib/types/components/pills/Pills.type.d.ts +5 -4
- package/lib/types/components/radio/Radio.d.ts +5 -0
- package/lib/types/components/select/Select.d.ts +5 -0
- package/lib/types/components/switch/Switch.d.ts +5 -0
- package/lib/types/components/tab-line/TabLine.d.ts +5 -0
- package/lib/types/components/tab-line/TabLine.type.d.ts +6 -5
- package/lib/types/inner-components/sparkle/Sparkle.d.ts +3 -1
- package/package.json +16 -16
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
+
## [17.2.0] - 2026-06-05
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Links to the API and examples in the docs.
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- Unnecessary line breaks in `Notice` styles.
|
|
14
|
+
|
|
5
15
|
## [17.1.0] - 2026-05-13
|
|
6
16
|
|
|
7
17
|
### Added
|
|
@@ -11,13 +11,13 @@ var _badge = _interopRequireDefault(require("@semcore/badge"));
|
|
|
11
11
|
var _resolveColorEnhance = _interopRequireDefault(require("@semcore/core/lib/utils/enhances/resolveColorEnhance"));
|
|
12
12
|
var _react = _interopRequireDefault(require("react"));
|
|
13
13
|
/*!__reshadow-styles__:"./badge.shadow.css"*/
|
|
14
|
-
const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".
|
|
14
|
+
const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SHighlightedBadge_1r3dh_gg_{color:var(--intergalactic-text-primary-invert,#fefffff2)}.___SHighlightedBadge_1r3dh_gg_._use_accent_1r3dh_gg_{background-image:var(--intergalactic-control-primary-feature-highlight,linear-gradient(90deg in oklch,#a261fd,#94a5f5))}.___SHighlightedBadge_1r3dh_gg_.__bg_1r3dh_gg_{background-color:var(--bg_1r3dh)}", /*__inner_css_end__*/"1r3dh_gg_"),
|
|
15
15
|
/*__reshadow_css_end__*/
|
|
16
16
|
{
|
|
17
|
-
"__SHighlightedBadge": "
|
|
18
|
-
"_use_accent": "
|
|
19
|
-
"_bg": "
|
|
20
|
-
"--bg": "--
|
|
17
|
+
"__SHighlightedBadge": "___SHighlightedBadge_1r3dh_gg_",
|
|
18
|
+
"_use_accent": "_use_accent_1r3dh_gg_",
|
|
19
|
+
"_bg": "__bg_1r3dh_gg_",
|
|
20
|
+
"--bg": "--bg_1r3dh"
|
|
21
21
|
});
|
|
22
22
|
class BadgeFHRoot extends _core.Component {
|
|
23
23
|
render() {
|
|
@@ -37,6 +37,12 @@ class BadgeFHRoot extends _core.Component {
|
|
|
37
37
|
}));
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Badge FeatureHighlight
|
|
43
|
+
*
|
|
44
|
+
* {@link https://developer.semrush.com/intergalactic/patterns/feature-highlight/feature-highlight#badge|Docs}
|
|
45
|
+
*/
|
|
40
46
|
(0, _defineProperty2.default)(BadgeFHRoot, "displayName", 'BadgeFH');
|
|
41
47
|
(0, _defineProperty2.default)(BadgeFHRoot, "style", style);
|
|
42
48
|
(0, _defineProperty2.default)(BadgeFHRoot, "enhance", [(0, _resolveColorEnhance.default)()]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.js","names":["_core","require","_badge","_interopRequireDefault","_resolveColorEnhance","_react","style","sstyled","insert","BadgeFHRoot","Component","render","_ref","asProps","_ref2","SHighlightedBadge","Badge","styles","use","resolveColor","bg","undefined","default","createElement","cn","assignProps","_defineProperty2","resolveColorEnhance","BadgeFH","exports","createComponent"],"sources":["../../../../src/components/badge/Badge.tsx"],"sourcesContent":["import Badge, { type BadgeMargins } from '@semcore/badge';\nimport { createComponent, Component, Root, sstyled } from '@semcore/core';\nimport resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';\nimport React from 'react';\n\nimport style from './badge.shadow.css';\n\ntype BadgeFHUse = 'accent' | 'neutral';\n\ntype BadgeFHProps = BadgeMargins & {\n /**\n * Type of feature badge.\n * @default accent\n */\n use?: BadgeFHUse;\n};\n\ntype DefaultProps = {\n use: BadgeFHUse;\n};\n\nclass BadgeFHRoot extends Component
|
|
1
|
+
{"version":3,"file":"Badge.js","names":["_core","require","_badge","_interopRequireDefault","_resolveColorEnhance","_react","style","sstyled","insert","BadgeFHRoot","Component","render","_ref","asProps","_ref2","SHighlightedBadge","Badge","styles","use","resolveColor","bg","undefined","default","createElement","cn","assignProps","_defineProperty2","resolveColorEnhance","BadgeFH","exports","createComponent"],"sources":["../../../../src/components/badge/Badge.tsx"],"sourcesContent":["import Badge, { type BadgeMargins } from '@semcore/badge';\nimport type { Intergalactic } from '@semcore/core';\nimport { createComponent, Component, Root, sstyled } from '@semcore/core';\nimport resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';\nimport React from 'react';\n\nimport style from './badge.shadow.css';\n\ntype BadgeFHUse = 'accent' | 'neutral';\n\ntype BadgeFHProps = BadgeMargins & {\n /**\n * Type of feature badge.\n * @default accent\n */\n use?: BadgeFHUse;\n};\n\ntype DefaultProps = {\n use: BadgeFHUse;\n};\n\ntype BadgeFHComponent = Intergalactic.Component<'span', BadgeFHProps>;\n\nclass BadgeFHRoot extends Component<\n BadgeFHProps,\n typeof BadgeFHRoot.enhance,\n {},\n {},\n {},\n DefaultProps\n> {\n static displayName = 'BadgeFH';\n static style = style;\n static enhance = [resolveColorEnhance()] as const;\n static defaultProps = {\n use: 'accent',\n } as const;\n\n render() {\n const SHighlightedBadge = Root;\n const { styles, use, resolveColor } = this.asProps;\n\n const bg = use === 'neutral' ? resolveColor('--violet-400') : undefined;\n\n return sstyled(styles)(\n <SHighlightedBadge\n render={Badge}\n use:bg={bg}\n />,\n );\n }\n}\n\n/**\n * Badge FeatureHighlight\n *\n * {@link https://developer.semrush.com/intergalactic/patterns/feature-highlight/feature-highlight#badge|Docs}\n */\nexport const BadgeFH = createComponent<\n BadgeFHComponent,\n typeof BadgeFHRoot\n>(BadgeFHRoot);\n"],"mappings":";;;;;;;;AAEA,IAAAA,KAAA,GAAAC,OAAA;AAFA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAGA,IAAAG,oBAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,MAAA,GAAAF,sBAAA,CAAAF,OAAA;AAA0B;AAAA,MAAAK,KAAA,8BAAAN,KAAA,CAAAO,OAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAoB1B,MAAMC,WAAW,SAASC,eAAS,CAOjC;EAQAC,MAAMA,CAAA,EAAG;IAAA,IAAAC,IAAA,QAAAC,OAAA;MAAAC,KAAA;IACP,MAAMC,iBAAiB,GAOXC,cAAK;IANjB,MAAM;MAAEC,MAAM;MAAEC,GAAG;MAAEC;IAAa,CAAC,GAAG,IAAI,CAACN,OAAO;IAElD,MAAMO,EAAE,GAAGF,GAAG,KAAK,SAAS,GAAGC,YAAY,CAAC,cAAc,CAAC,GAAGE,SAAS;IAEvE,OAAAP,KAAA,GAAO,IAAAP,aAAO,EAACU,MAAM,CAAC,eACpBZ,MAAA,CAAAiB,OAAA,CAAAC,aAAA,CAACR,iBAAiB,EAAAD,KAAA,CAAAU,EAAA;MAAA,OAAAxB,KAAA,CAAAyB,WAAA;QAAA,UAERL;MAAE,GAAAR,IAAA;IAAA,EACX,CAAC;EAEN;AACF;;AAEA;AACA;AACA;AACA;AACA;AAJA,IAAAc,gBAAA,CAAAJ,OAAA,EA9BMb,WAAW,iBAQM,SAAS;AAAA,IAAAiB,gBAAA,CAAAJ,OAAA,EAR1Bb,WAAW,WASAH,KAAK;AAAA,IAAAoB,gBAAA,CAAAJ,OAAA,EAThBb,WAAW,aAUE,CAAC,IAAAkB,4BAAmB,EAAC,CAAC,CAAC;AAAA,IAAAD,gBAAA,CAAAJ,OAAA,EAVpCb,WAAW,kBAWO;EACpBS,GAAG,EAAE;AACP,CAAC;AAsBI,MAAMU,OAAO,GAAAC,OAAA,CAAAD,OAAA,GAAG,IAAAE,qBAAe,EAGpCrB,WAAW,CAAC","ignoreList":[]}
|
|
@@ -12,18 +12,25 @@ var _m = _interopRequireDefault(require("@semcore/icon/SummaryAI/m"));
|
|
|
12
12
|
var _react = _interopRequireDefault(require("react"));
|
|
13
13
|
var _AnimatedSparkles = require("../../inner-components/sparkle/AnimatedSparkles");
|
|
14
14
|
/*!__reshadow-styles__:"./button.shadow.css"*/
|
|
15
|
-
const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".
|
|
15
|
+
const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SHighlightedButton_1ql7e_gg_._theme_primary-highlighted_1ql7e_gg_{color:var(--intergalactic-text-primary-invert,#fefffff2);background-image:linear-gradient(90deg,var(--intergalactic-violet-500,#8029ec),var(--intergalactic-blue-500,#5c5cc4),var(--intergalactic-violet-400,#a261fd),var(--intergalactic-blue-400,#666bdb));background-position-x:99%;background-size:300%;transition:background-position-x .3s cubic-bezier(.22,.61,.36,1)}@media (hover:hover){.___SHighlightedButton_1ql7e_gg_._theme_primary-highlighted_1ql7e_gg_:hover{color:var(--intergalactic-text-primary-invert,#fefffff2);background-position-x:1%}}.___SHighlightedButton_1ql7e_gg_._theme_primary-highlighted_1ql7e_gg_.__active_1ql7e_gg_,.___SHighlightedButton_1ql7e_gg_._theme_primary-highlighted_1ql7e_gg_:active{color:var(--intergalactic-text-primary-invert,#fefffff2);background-image:var(--intergalactic-control-primary-feature-highlight-active,linear-gradient(90deg in oklch,#a261fd,#666bdb));background-size:100%}.___SHighlightedButton_1ql7e_gg_._theme_primary-highlighted_1ql7e_gg_:focus-visible{outline:none}.___SHighlightedButton_1ql7e_gg_._theme_secondary-highlighted_1ql7e_gg_{color:var(--intergalactic-icon-primary-feature-highlight,#9041fa);background:var(--intergalactic-control-secondary-feature-highlight,linear-gradient(90deg in oklch,#f7f3ff,#f0f5ff)) padding-box,var(--intergalactic-border-feature-highlight-secondary,linear-gradient(90deg in oklch,#c08eff,#94a5f5)) border-box;background-origin:border-box;background-clip:padding-box,border-box}@supports (background:linear-gradient(in oklch,red 0%,red 0% 1%,red 2%)) and (color:color(display-p3 0 0 0%)){.___SHighlightedButton_1ql7e_gg_._theme_secondary-highlighted_1ql7e_gg_{background:var(--intergalactic-control-secondary-feature-highlight,linear-gradient(90deg in oklch,#f7f3ff,#f0f5ff)) padding-box,var(--intergalactic-border-feature-highlight-secondary,linear-gradient(90deg in oklch,#c08eff,#94a5f5)) border-box}@media (color-gamut:p3){.___SHighlightedButton_1ql7e_gg_._theme_secondary-highlighted_1ql7e_gg_{background:var(--intergalactic-control-secondary-feature-highlight,linear-gradient(90deg in oklch,color(display-p3 .96716 .95079 .99961),color(display-p3 .94438 .95907 .99998))) padding-box,var(--intergalactic-border-feature-highlight-secondary,linear-gradient(90deg in oklch,color(display-p3 .72564 .56096 .98326),#94a5f5)) border-box}}}.___SHighlightedButton_1ql7e_gg_._theme_secondary-highlighted_1ql7e_gg_ .___SText_1ql7e_gg_{background-color:var(--intergalactic-icon-primary-feature-highlight,#9041fa);background-image:var(--intergalactic-text-feature-highlight,linear-gradient(90deg in oklch,#8029ec,#5c5cc4));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:#0000}@media (hover:hover){.___SHighlightedButton_1ql7e_gg_._theme_secondary-highlighted_1ql7e_gg_:hover{background:var(--intergalactic-control-secondary-feature-highlight-hover,linear-gradient(90deg in oklch,#e6d5ff,#cfddff)) padding-box,var(--intergalactic-border-feature-highlight-secondary,linear-gradient(90deg in oklch,#c08eff,#94a5f5)) border-box;color:var(--intergalactic-icon-primary-feature-highlight-hover-active,#8029ec)}@supports (background:linear-gradient(in oklch,red 0%,red 0% 1%,red 2%)) and (color:color(display-p3 0 0 0%)){.___SHighlightedButton_1ql7e_gg_._theme_secondary-highlighted_1ql7e_gg_:hover{background:var(--intergalactic-control-secondary-feature-highlight-hover,linear-gradient(90deg in oklch,#e6d5ff,#cfddff)) padding-box,var(--intergalactic-border-feature-highlight-secondary,linear-gradient(90deg in oklch,#c08eff,#94a5f5)) border-box}@media (color-gamut:p3){.___SHighlightedButton_1ql7e_gg_._theme_secondary-highlighted_1ql7e_gg_:hover{background:var(--intergalactic-control-secondary-feature-highlight-hover,linear-gradient(90deg in oklch,color(display-p3 .89136 .83496 .99956),color(display-p3 .8189 .86425 1))) padding-box,var(--intergalactic-border-feature-highlight-secondary,linear-gradient(90deg in oklch,color(display-p3 .72564 .56096 .98326),#94a5f5)) border-box}}}}@media (hover:hover){.___SHighlightedButton_1ql7e_gg_._theme_secondary-highlighted_1ql7e_gg_:hover .___SText_1ql7e_gg_{background-color:var(--intergalactic-icon-primary-feature-highlight-hover-active,#8029ec);background-image:var(--intergalactic-text-feature-highlight-hover-active,linear-gradient(90deg in oklch,#8029ec,#5c5cc4))}}.___SHighlightedButton_1ql7e_gg_._theme_secondary-highlighted_1ql7e_gg_.__active_1ql7e_gg_,.___SHighlightedButton_1ql7e_gg_._theme_secondary-highlighted_1ql7e_gg_:active{background:var(--intergalactic-control-secondary-feature-highlight-active,linear-gradient(90deg in oklch,#e6d5ff,#cfddff)) padding-box,var(--intergalactic-border-feature-highlight-secondary,linear-gradient(90deg in oklch,#c08eff,#94a5f5)) border-box;color:var(--intergalactic-icon-primary-feature-highlight-hover-active,#8029ec)}@supports (background:linear-gradient(in oklch,red 0%,red 0% 1%,red 2%)) and (color:color(display-p3 0 0 0%)){.___SHighlightedButton_1ql7e_gg_._theme_secondary-highlighted_1ql7e_gg_.__active_1ql7e_gg_,.___SHighlightedButton_1ql7e_gg_._theme_secondary-highlighted_1ql7e_gg_:active{background:var(--intergalactic-control-secondary-feature-highlight-active,linear-gradient(90deg in oklch,#e6d5ff,#cfddff)) padding-box,var(--intergalactic-border-feature-highlight-secondary,linear-gradient(90deg in oklch,#c08eff,#94a5f5)) border-box}@media (color-gamut:p3){.___SHighlightedButton_1ql7e_gg_._theme_secondary-highlighted_1ql7e_gg_.__active_1ql7e_gg_,.___SHighlightedButton_1ql7e_gg_._theme_secondary-highlighted_1ql7e_gg_:active{background:var(--intergalactic-control-secondary-feature-highlight-active,linear-gradient(90deg in oklch,color(display-p3 .89136 .83496 .99956),color(display-p3 .8189 .86425 1))) padding-box,var(--intergalactic-border-feature-highlight-secondary,linear-gradient(90deg in oklch,color(display-p3 .72564 .56096 .98326),#94a5f5)) border-box}}}:is(.___SHighlightedButton_1ql7e_gg_._theme_secondary-highlighted_1ql7e_gg_.__active_1ql7e_gg_,.___SHighlightedButton_1ql7e_gg_._theme_secondary-highlighted_1ql7e_gg_:active) .___SText_1ql7e_gg_{background-color:var(--intergalactic-icon-primary-feature-highlight-hover-active,#8029ec);background-image:var(--intergalactic-text-feature-highlight-hover-active,linear-gradient(90deg in oklch,#8029ec,#5c5cc4))}.___SHighlightedButton_1ql7e_gg_._theme_secondary-highlighted_1ql7e_gg_:focus-visible{outline:none}.___SHighlightedButton_1ql7e_gg_{position:relative}.___SHighlightedButton_1ql7e_gg_:before{content:\"\";position:absolute;z-index:-1;top:0;right:0;bottom:0;left:0;margin:-5px;padding:2px;border-radius:calc(var(--intergalactic-control-rounded, 6px) + 3px);background-image:var(--intergalactic-keyboard-focus-feature-highlight-outline,linear-gradient(90deg in oklch,#c08eff,#666bdb));-webkit-mask:linear-gradient(0deg,#fff,#fff) content-box,linear-gradient(0deg,#fff,#fff);mask:linear-gradient(0deg,#fff,#fff) content-box,linear-gradient(0deg,#fff,#fff);-webkit-mask-composite:xor;mask-composite:exclude;opacity:0;transform:scale(.96);transition:opacity calc(var(--intergalactic-duration-extra-fast, 100)*1ms) ease-in-out,transform calc(var(--intergalactic-duration-extra-fast, 100)*1ms) ease-in-out}@supports (background:linear-gradient(in oklch,red 0%,red 0% 1%,red 2%)) and (color:color(display-p3 0 0 0%)){.___SHighlightedButton_1ql7e_gg_:before{background-image:var(--intergalactic-keyboard-focus-feature-highlight-outline,linear-gradient(90deg in oklch,#c08eff,#666bdb))}@media (color-gamut:p3){.___SHighlightedButton_1ql7e_gg_:before{background-image:var(--intergalactic-keyboard-focus-feature-highlight-outline,linear-gradient(90deg in oklch,color(display-p3 .72564 .56096 .98326),#666bdb))}}}.___SHighlightedButton_1ql7e_gg_._neighborLocation_left_1ql7e_gg_:before{border-top-left-radius:0;border-bottom-left-radius:0}.___SHighlightedButton_1ql7e_gg_._neighborLocation_right_1ql7e_gg_:before{border-top-right-radius:0;border-bottom-right-radius:0}.___SHighlightedButton_1ql7e_gg_._neighborLocation_both_1ql7e_gg_:before{border-radius:0}.___SHighlightedButton_1ql7e_gg_:focus-visible:before{opacity:1;transform:scale(1)}@supports not (-webkit-mask-composite:xor){.___SHighlightedButton_1ql7e_gg_:focus-visible{outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #7078fc}.___SHighlightedButton_1ql7e_gg_:focus-visible:before{display:none}}", /*__inner_css_end__*/"1ql7e_gg_"),
|
|
16
16
|
/*__reshadow_css_end__*/
|
|
17
17
|
{
|
|
18
|
-
"__SHighlightedButton": "
|
|
19
|
-
"_theme_primary-highlighted": "_theme_primary-
|
|
20
|
-
"_active": "
|
|
21
|
-
"_theme_secondary-highlighted": "_theme_secondary-
|
|
22
|
-
"__SText": "
|
|
23
|
-
"_neighborLocation_left": "
|
|
24
|
-
"_neighborLocation_right": "
|
|
25
|
-
"_neighborLocation_both": "
|
|
18
|
+
"__SHighlightedButton": "___SHighlightedButton_1ql7e_gg_",
|
|
19
|
+
"_theme_primary-highlighted": "_theme_primary-highlighted_1ql7e_gg_",
|
|
20
|
+
"_active": "__active_1ql7e_gg_",
|
|
21
|
+
"_theme_secondary-highlighted": "_theme_secondary-highlighted_1ql7e_gg_",
|
|
22
|
+
"__SText": "___SText_1ql7e_gg_",
|
|
23
|
+
"_neighborLocation_left": "_neighborLocation_left_1ql7e_gg_",
|
|
24
|
+
"_neighborLocation_right": "_neighborLocation_right_1ql7e_gg_",
|
|
25
|
+
"_neighborLocation_both": "_neighborLocation_both_1ql7e_gg_"
|
|
26
26
|
});
|
|
27
|
+
/*
|
|
28
|
+
* `highlighted` is an internal-only value and cannot be represented in the public prop type.
|
|
29
|
+
* During composition the `highlighted` prop is intentionally stripped, so it never reaches
|
|
30
|
+
* the final component interface. Because of that, this implementation relies on the current approach.
|
|
31
|
+
* Public props are `ButtonProps`.
|
|
32
|
+
*/
|
|
33
|
+
|
|
27
34
|
class ButtonFHRoot extends _core.Component {
|
|
28
35
|
constructor(...args) {
|
|
29
36
|
super(...args);
|
|
@@ -86,6 +93,12 @@ function HighlightAddon(props) {
|
|
|
86
93
|
"count": animatedSparkleCount
|
|
87
94
|
}))));
|
|
88
95
|
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Button FeatureHighlight
|
|
99
|
+
*
|
|
100
|
+
* {@link https://developer.semrush.com/intergalactic/patterns/feature-highlight/feature-highlight#button|Docs}
|
|
101
|
+
*/
|
|
89
102
|
const ButtonFH = exports.ButtonFH = (0, _core.createComponent)(ButtonFHRoot, {
|
|
90
103
|
Addon: HighlightAddon,
|
|
91
104
|
Text: _button.default.Text
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","names":["_core","require","_button","_interopRequireDefault","_m","_react","_AnimatedSparkles","style","sstyled","insert","ButtonFHRoot","Component","constructor","args","_defineProperty2","default","clicked","handleClick","e","onClick","asProps","setState","setTimeout","getAddonProps","state","render","_ref","_ref3","styles","SHighlightedButton","Button","createElement","cn","assignProps","bind","theme","HighlightAddon","props","_ref2","arguments[0]","_ref4","SAddon","Addon","animatedSparkleCount","Children","children","hasChildren","Fragment","AnimatedSparkles","ButtonFH","exports","createComponent","Text"],"sources":["../../../../src/components/button/Button.tsx"],"sourcesContent":["import Button from '@semcore/button';\nimport { createComponent, Root, sstyled, Component, type IRootNodeProps } from '@semcore/core';\nimport SummaryAI from '@semcore/icon/SummaryAI/m';\nimport React from 'react';\n\nimport style from './button.shadow.css';\nimport type { HighLightedButtonAddonProps, HighlightedButtonComponent } from './Button.type';\nimport { AnimatedSparkles } from '../../inner-components/sparkle/AnimatedSparkles';\n\nclass ButtonFHRoot extends Component {\n static displayName = 'ButtonFH';\n static style = style;\n\n static defaultProps = {\n theme: 'highlighted',\n };\n\n state = {\n clicked: false,\n };\n\n handleClick(e: React.MouseEvent<HTMLButtonElement>) {\n const { onClick } = this.asProps;\n\n onClick?.(e);\n this.setState({ clicked: false });\n setTimeout(() => {\n this.setState({ clicked: true });\n });\n }\n\n getAddonProps() {\n return {\n clicked: this.state.clicked,\n };\n }\n\n render() {\n const { styles } = this.asProps;\n const SHighlightedButton = Root;\n return sstyled(styles)(\n <SHighlightedButton render={Button} use:onClick={this.handleClick.bind(this)} />,\n );\n }\n}\n\nfunction HighlightAddon(props: HighLightedButtonAddonProps & { clicked: boolean } & IRootNodeProps) {\n const SAddon = Root;\n const { clicked, animatedSparkleCount, Children, children: hasChildren } = props;\n return sstyled(props.styles)(\n <SAddon render={Button.Addon}>\n {hasChildren\n ? (<Children />)\n : (\n <>\n <SummaryAI />\n <AnimatedSparkles show={clicked} count={animatedSparkleCount} />\n </>\n )}\n </SAddon>,\n );\n}\n\nexport const ButtonFH = createComponent(ButtonFHRoot, {\n Addon: HighlightAddon,\n Text: Button.Text,\n})
|
|
1
|
+
{"version":3,"file":"Button.js","names":["_core","require","_button","_interopRequireDefault","_m","_react","_AnimatedSparkles","style","sstyled","insert","ButtonFHRoot","Component","constructor","args","_defineProperty2","default","clicked","handleClick","e","onClick","asProps","setState","setTimeout","getAddonProps","state","render","_ref","_ref3","styles","SHighlightedButton","Button","createElement","cn","assignProps","bind","theme","HighlightAddon","props","_ref2","arguments[0]","_ref4","SAddon","Addon","animatedSparkleCount","Children","children","hasChildren","Fragment","AnimatedSparkles","ButtonFH","exports","createComponent","Text"],"sources":["../../../../src/components/button/Button.tsx"],"sourcesContent":["import type { ButtonProps } from '@semcore/button';\nimport Button from '@semcore/button';\nimport { createComponent, Root, sstyled, Component, type IRootNodeProps } from '@semcore/core';\nimport SummaryAI from '@semcore/icon/SummaryAI/m';\nimport React from 'react';\n\nimport style from './button.shadow.css';\nimport type { HighLightedButtonAddonProps, HighlightedButtonComponent, HighlightedButtonDefaultProps } from './Button.type';\nimport { AnimatedSparkles } from '../../inner-components/sparkle/AnimatedSparkles';\n\n/*\n * `highlighted` is an internal-only value and cannot be represented in the public prop type.\n * During composition the `highlighted` prop is intentionally stripped, so it never reaches\n * the final component interface. Because of that, this implementation relies on the current approach.\n * Public props are `ButtonProps`.\n*/\ntype HighlightedButtonProps = Omit<ButtonProps, 'theme'> & {\n theme?: ButtonProps['theme'] | 'highlighted';\n};\n\nclass ButtonFHRoot extends Component<\n HighlightedButtonProps,\n [],\n {},\n {},\n {},\n HighlightedButtonDefaultProps\n> {\n static displayName = 'ButtonFH';\n static style = style;\n\n static defaultProps = {\n theme: 'highlighted',\n } as const;\n\n state = {\n clicked: false,\n };\n\n handleClick(e: React.MouseEvent<HTMLButtonElement>) {\n const { onClick } = this.asProps;\n\n onClick?.(e);\n this.setState({ clicked: false });\n setTimeout(() => {\n this.setState({ clicked: true });\n });\n }\n\n getAddonProps() {\n return {\n clicked: this.state.clicked,\n };\n }\n\n render() {\n const { styles } = this.asProps;\n const SHighlightedButton = Root;\n return sstyled(styles)(\n <SHighlightedButton render={Button} use:onClick={this.handleClick.bind(this)} />,\n );\n }\n}\n\nfunction HighlightAddon(props: HighLightedButtonAddonProps & { clicked: boolean } & IRootNodeProps) {\n const SAddon = Root;\n const { clicked, animatedSparkleCount, Children, children: hasChildren } = props;\n return sstyled(props.styles)(\n <SAddon render={Button.Addon}>\n {hasChildren\n ? (<Children />)\n : (\n <>\n <SummaryAI />\n <AnimatedSparkles show={clicked} count={animatedSparkleCount} />\n </>\n )}\n </SAddon>,\n );\n}\n\n/**\n * Button FeatureHighlight\n *\n * {@link https://developer.semrush.com/intergalactic/patterns/feature-highlight/feature-highlight#button|Docs}\n */\nexport const ButtonFH = createComponent<\n HighlightedButtonComponent,\n typeof ButtonFHRoot\n>(ButtonFHRoot, {\n Addon: HighlightAddon,\n Text: Button.Text,\n});\n"],"mappings":";;;;;;;;AAEA,IAAAA,KAAA,GAAAC,OAAA;AADA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,EAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,MAAA,GAAAF,sBAAA,CAAAF,OAAA;AAIA,IAAAK,iBAAA,GAAAL,OAAA;AAAmF;AAAA,MAAAM,KAAA,8BAAAP,KAAA,CAAAQ,OAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAEnF;AACA;AACA;AACA;AACA;AACA;;AAKA,MAAMC,YAAY,SAASC,eAAS,CAOlC;EAAAC,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAA,IAAAC,gBAAA,CAAAC,OAAA,iBAQQ;MACNC,OAAO,EAAE;IACX,CAAC;EAAA;EAEDC,WAAWA,CAACC,CAAsC,EAAE;IAClD,MAAM;MAAEC;IAAQ,CAAC,GAAG,IAAI,CAACC,OAAO;IAEhCD,OAAO,GAAGD,CAAC,CAAC;IACZ,IAAI,CAACG,QAAQ,CAAC;MAAEL,OAAO,EAAE;IAAM,CAAC,CAAC;IACjCM,UAAU,CAAC,MAAM;MACf,IAAI,CAACD,QAAQ,CAAC;QAAEL,OAAO,EAAE;MAAK,CAAC,CAAC;IACl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PzC,MAAA,CAAAU,OAAA,CAAAgB,aAAA,CAACa,QAAQ,EAAAJ,KAAA,CAAAR,EAAA,gBAAE,CAAC,gBAEX3B,MAAA,CAAAU,OAAA,CAAAgB,aAAA,CAAA1B,MAAA,CAAAU,OAAA,CAAAgC,QAAA,qBACE1C,MAAA,CAAAU,OAAA,CAAAgB,aAAA,CAAC3B,EAAA,CAAAW,OAAS,EAAAyB,KAAA,CAAAR,EAAA,iBAAE,CAAC,eACb3B,MAAA,CAAAU,OAAA,CAAAgB,aAAA,CAACzB,iBAAA,CAAA0C,gBAAgB,EAAAR,KAAA,CAAAR,EAAA;IAAA,QAAOhB,OAAO;IAAA,SAAS2B;EAAoB,EAAG,CAC/D,CAEF,CAAC;AAEb;;AAEA;AACA;AACA;AACA;AACA;AACO,MAAMM,QAAQ,GAAAC,OAAA,CAAAD,QAAA,GAAG,IAAAE,qBAAe,EAGrCzC,YAAY,EAAE;EACdgC,KAAK,EAAEN,cAAc;EACrBgB,IAAI,EAAEtB,eAAM,CAACsB;AACf,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.type.js","names":[],"sources":["../../../../src/components/button/Button.type.ts"],"sourcesContent":["import type { ButtonAddonProps, ButtonComponent } from '@semcore/button';\nimport type { Intergalactic } from '@semcore/core';\n\nexport type HighLightedButtonAddonProps = ButtonAddonProps & {\n animatedSparkleCount?: number;\n};\n\nexport type HighlightedButtonComponent = ButtonComponent & {\n Addon: Intergalactic.Component<'div', HighLightedButtonAddonProps>;\n};\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"Button.type.js","names":[],"sources":["../../../../src/components/button/Button.type.ts"],"sourcesContent":["import type { ButtonAddonProps, ButtonComponent, ButtonProps } from '@semcore/button';\nimport type { Intergalactic } from '@semcore/core';\n\nexport type HighlightedButtonDefaultProps = {\n theme: 'highlighted';\n};\n\nexport type HighLightedButtonAddonProps = ButtonAddonProps & {\n animatedSparkleCount?: number;\n};\n\nexport type HighlightedButtonComponent = ButtonComponent & {\n Addon: Intergalactic.Component<'div', HighLightedButtonAddonProps>;\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -11,11 +11,11 @@ var _checkbox = _interopRequireDefault(require("@semcore/checkbox"));
|
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
12
|
var _AnimatedSparkles = require("../../inner-components/sparkle/AnimatedSparkles");
|
|
13
13
|
/*!__reshadow-styles__:"./checkbox.shadow.css"*/
|
|
14
|
-
const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".
|
|
14
|
+
const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SHighlightedCheckbox_goyxa_gg_:not(._state_invalid_goyxa_gg_) [data-ui-name=\"Value.CheckMark\"]{position:relative;transform:translate(0);border:1px solid #0000;border-radius:var(--intergalactic-addon-rounded,4px);background:linear-gradient(#fff,#fff) padding-box,var(--intergalactic-border-feature-highlight,linear-gradient(90deg in oklch,#d2b3ff,#b0c1fe)) border-box;background-origin:border-box;background-clip:padding-box,border-box}@supports (background:linear-gradient(in oklch,red 0%,red 0% 1%,red 2%)) and (color:color(display-p3 0 0 0%)){.___SHighlightedCheckbox_goyxa_gg_:not(._state_invalid_goyxa_gg_) [data-ui-name=\"Value.CheckMark\"]{background:linear-gradient(#fff,#fff) padding-box,var(--intergalactic-border-feature-highlight,linear-gradient(90deg in oklch,#d2b3ff,#b0c1fe)) border-box}@media (color-gamut:p3){.___SHighlightedCheckbox_goyxa_gg_:not(._state_invalid_goyxa_gg_) [data-ui-name=\"Value.CheckMark\"]{background:linear-gradient(#fff,#fff) padding-box,var(--intergalactic-border-feature-highlight,linear-gradient(90deg in oklch,color(display-p3 .80738 .70018 .99486),#b0c1fe)) border-box}}}.___SHighlightedCheckbox_goyxa_gg_:not(._state_invalid_goyxa_gg_) input[data-ui-name=\"CheckboxFH.Value\"]:checked+[data-ui-name=\"Value.CheckMark\"]{border-color:#0000;background:var(--intergalactic-border-feature-highlight-active,linear-gradient(90deg in oklch,#c08eff,#94a5f5)) padding-box,var(--intergalactic-border-feature-highlight-active,linear-gradient(90deg in oklch,#c08eff,#94a5f5)) border-box}@supports (background:linear-gradient(in oklch,red 0%,red 0% 1%,red 2%)) and (color:color(display-p3 0 0 0%)){.___SHighlightedCheckbox_goyxa_gg_:not(._state_invalid_goyxa_gg_) input[data-ui-name=\"CheckboxFH.Value\"]:checked+[data-ui-name=\"Value.CheckMark\"]{background:var(--intergalactic-border-feature-highlight-active,linear-gradient(90deg in oklch,#c08eff,#94a5f5)) padding-box,var(--intergalactic-border-feature-highlight-active,linear-gradient(90deg in oklch,#c08eff,#94a5f5)) border-box}@media (color-gamut:p3){.___SHighlightedCheckbox_goyxa_gg_:not(._state_invalid_goyxa_gg_) input[data-ui-name=\"CheckboxFH.Value\"]:checked+[data-ui-name=\"Value.CheckMark\"]{background:var(--intergalactic-border-feature-highlight-active,linear-gradient(90deg in oklch,color(display-p3 .72564 .56096 .98326),#94a5f5)) padding-box,var(--intergalactic-border-feature-highlight-active,linear-gradient(90deg in oklch,color(display-p3 .72564 .56096 .98326),#94a5f5)) border-box}}}.___SHighlightedCheckbox_goyxa_gg_:not(._state_invalid_goyxa_gg_) [data-ui-name=\"Value.CheckMark\"]:before{content:\"\";position:absolute;z-index:-1;top:0;right:0;bottom:0;left:0;margin:-5px;padding:1px;border-width:2px;border-radius:calc(var(--intergalactic-addon-rounded, 4px) + 3px);border-color:#0000;pointer-events:none;background:linear-gradient(#fff,#fff) padding-box,var(--intergalactic-border-feature-highlight,linear-gradient(90deg in oklch,#d2b3ff,#b0c1fe)) border-box;-webkit-mask:linear-gradient(0deg,#fff,#fff) content-box,linear-gradient(0deg,#fff,#fff);mask:linear-gradient(0deg,#fff,#fff) content-box,linear-gradient(0deg,#fff,#fff);-webkit-mask-composite:xor;mask-composite:exclude;opacity:0;transform:scale(.9);transition:opacity calc(var(--intergalactic-duration-extra-fast, 100)*1ms) ease-in-out,transform calc(var(--intergalactic-duration-extra-fast, 100)*1ms) ease-in-out}@supports (background:linear-gradient(in oklch,red 0%,red 0% 1%,red 2%)) and (color:color(display-p3 0 0 0%)){.___SHighlightedCheckbox_goyxa_gg_:not(._state_invalid_goyxa_gg_) [data-ui-name=\"Value.CheckMark\"]:before{background:linear-gradient(#fff,#fff) padding-box,var(--intergalactic-border-feature-highlight,linear-gradient(90deg in oklch,#d2b3ff,#b0c1fe)) border-box}@media (color-gamut:p3){.___SHighlightedCheckbox_goyxa_gg_:not(._state_invalid_goyxa_gg_) [data-ui-name=\"Value.CheckMark\"]:before{background:linear-gradient(#fff,#fff) padding-box,var(--intergalactic-border-feature-highlight,linear-gradient(90deg in oklch,color(display-p3 .80738 .70018 .99486),#b0c1fe)) border-box}}}.___SHighlightedCheckbox_goyxa_gg_:not(._state_invalid_goyxa_gg_) input[data-ui-name=\"CheckboxFH.Value\"]:checked:not(:focus-visible)+[data-ui-name=\"Value.CheckMark\"]:before{opacity:0;transform:scale(.9)}.___SHighlightedCheckbox_goyxa_gg_:not(._state_invalid_goyxa_gg_) input[data-ui-name=\"CheckboxFH.Value\"]:focus-visible+[data-ui-name=\"Value.CheckMark\"]:before{opacity:1;transform:scale(1)}.___SHighlightedCheckbox_goyxa_gg_:not(._state_invalid_goyxa_gg_) input[data-ui-name=\"CheckboxFH.Value\"]:checked:focus-visible+[data-ui-name=\"Value.CheckMark\"]:before{border-color:#0000;background:linear-gradient(#fff,#fff) padding-box,var(--intergalactic-border-feature-highlight-active,linear-gradient(90deg in oklch,#c08eff,#94a5f5)) border-box}@supports (background:linear-gradient(in oklch,red 0%,red 0% 1%,red 2%)) and (color:color(display-p3 0 0 0%)){.___SHighlightedCheckbox_goyxa_gg_:not(._state_invalid_goyxa_gg_) input[data-ui-name=\"CheckboxFH.Value\"]:checked:focus-visible+[data-ui-name=\"Value.CheckMark\"]:before{background:linear-gradient(#fff,#fff) padding-box,var(--intergalactic-border-feature-highlight-active,linear-gradient(90deg in oklch,#c08eff,#94a5f5)) border-box}@media (color-gamut:p3){.___SHighlightedCheckbox_goyxa_gg_:not(._state_invalid_goyxa_gg_) input[data-ui-name=\"CheckboxFH.Value\"]:checked:focus-visible+[data-ui-name=\"Value.CheckMark\"]:before{background:linear-gradient(#fff,#fff) padding-box,var(--intergalactic-border-feature-highlight-active,linear-gradient(90deg in oklch,color(display-p3 .72564 .56096 .98326),#94a5f5)) border-box}}}", /*__inner_css_end__*/"goyxa_gg_"),
|
|
15
15
|
/*__reshadow_css_end__*/
|
|
16
16
|
{
|
|
17
|
-
"__SHighlightedCheckbox": "
|
|
18
|
-
"_state_invalid": "
|
|
17
|
+
"__SHighlightedCheckbox": "___SHighlightedCheckbox_goyxa_gg_",
|
|
18
|
+
"_state_invalid": "_state_invalid_goyxa_gg_"
|
|
19
19
|
});
|
|
20
20
|
class CheckboxFHRoot extends _core.Component {
|
|
21
21
|
constructor(...args) {
|
|
@@ -57,6 +57,12 @@ class CheckboxFHRoot extends _core.Component {
|
|
|
57
57
|
}), hasChildren ? /*#__PURE__*/_react.default.createElement(Children, _ref2.cn("Children", {})) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(CheckboxFH.Value, null), /*#__PURE__*/_react.default.createElement(CheckboxFH.Text, null)));
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Checkbox FeatureHighlight
|
|
63
|
+
*
|
|
64
|
+
* {@link https://developer.semrush.com/intergalactic/patterns/feature-highlight/feature-highlight#checkbox|Docs}
|
|
65
|
+
*/
|
|
60
66
|
(0, _defineProperty2.default)(CheckboxFHRoot, "displayName", 'CheckboxFH');
|
|
61
67
|
(0, _defineProperty2.default)(CheckboxFHRoot, "style", style);
|
|
62
68
|
const CheckboxFH = exports.CheckboxFH = (0, _core.createComponent)(CheckboxFHRoot, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","names":["_core","require","_checkbox","_interopRequireDefault","_react","_AnimatedSparkles","style","sstyled","insert","CheckboxFHRoot","Component","constructor","args","_defineProperty2","default","React","createRef","getValueProps","ref","inputRef","onChange","setTimeout","forceUpdate","getAnimatedSparklesProps","size","asProps","checked","current","show","top","left","render","_ref","_ref2","SHighlightedCheckbox","Checkbox","styles","Children","children","hasChildren","createElement","cn","assignProps","Fragment","CheckboxFH","Value","Text","exports","createComponent","AnimatedSparkles"],"sources":["../../../../src/components/checkbox/Checkbox.tsx"],"sourcesContent":["import type { NSCheckbox } from '@semcore/checkbox';\nimport Checkbox from '@semcore/checkbox';\nimport { Component, createComponent, Root, sstyled } from '@semcore/core';\nimport React from 'react';\n\nimport style from './checkbox.shadow.css';\nimport type { HighlightedCheckboxComponent } from './Checkbox.type';\nimport { AnimatedSparkles } from '../../inner-components/sparkle/AnimatedSparkles';\n\nclass CheckboxFHRoot extends Component<NSCheckbox.Props> {\n static displayName = 'CheckboxFH';\n static style = style;\n\n inputRef = React.createRef<HTMLInputElement>();\n\n getValueProps() {\n return {\n ref: this.inputRef,\n onChange: () => {\n setTimeout(() => {\n this.forceUpdate();\n });\n },\n };\n }\n\n getAnimatedSparklesProps() {\n const { size } = this.asProps;\n const checked = this.inputRef.current?.checked;\n\n return {\n show: checked,\n top: size === 'l' ? '7px' : '5px',\n left: size === 'l' ? '5px' : '3px',\n };\n }\n\n render() {\n const SHighlightedCheckbox = Root;\n const { styles, Children, children: hasChildren } = this.asProps;\n\n return sstyled(styles)(\n <SHighlightedCheckbox render={Checkbox}>\n {hasChildren\n ? <Children />\n : (\n <>\n <CheckboxFH.Value />\n <CheckboxFH.Text />\n </>\n )}\n </SHighlightedCheckbox>,\n );\n }\n}\n\nexport const CheckboxFH = createComponent(CheckboxFHRoot, {\n Text: Checkbox.Text,\n Value: Checkbox.Value,\n AnimatedSparkles,\n})
|
|
1
|
+
{"version":3,"file":"Checkbox.js","names":["_core","require","_checkbox","_interopRequireDefault","_react","_AnimatedSparkles","style","sstyled","insert","CheckboxFHRoot","Component","constructor","args","_defineProperty2","default","React","createRef","getValueProps","ref","inputRef","onChange","setTimeout","forceUpdate","getAnimatedSparklesProps","size","asProps","checked","current","show","top","left","render","_ref","_ref2","SHighlightedCheckbox","Checkbox","styles","Children","children","hasChildren","createElement","cn","assignProps","Fragment","CheckboxFH","Value","Text","exports","createComponent","AnimatedSparkles"],"sources":["../../../../src/components/checkbox/Checkbox.tsx"],"sourcesContent":["import type { NSCheckbox } from '@semcore/checkbox';\nimport Checkbox from '@semcore/checkbox';\nimport { Component, createComponent, Root, sstyled } from '@semcore/core';\nimport React from 'react';\n\nimport style from './checkbox.shadow.css';\nimport type { HighlightedCheckboxComponent } from './Checkbox.type';\nimport { AnimatedSparkles } from '../../inner-components/sparkle/AnimatedSparkles';\n\nclass CheckboxFHRoot extends Component<NSCheckbox.Props> {\n static displayName = 'CheckboxFH';\n static style = style;\n\n inputRef = React.createRef<HTMLInputElement>();\n\n getValueProps() {\n return {\n ref: this.inputRef,\n onChange: () => {\n setTimeout(() => {\n this.forceUpdate();\n });\n },\n };\n }\n\n getAnimatedSparklesProps() {\n const { size } = this.asProps;\n const checked = this.inputRef.current?.checked;\n\n return {\n show: checked,\n top: size === 'l' ? '7px' : '5px',\n left: size === 'l' ? '5px' : '3px',\n };\n }\n\n render() {\n const SHighlightedCheckbox = Root;\n const { styles, Children, children: hasChildren } = this.asProps;\n\n return sstyled(styles)(\n <SHighlightedCheckbox render={Checkbox}>\n {hasChildren\n ? <Children />\n : (\n <>\n <CheckboxFH.Value />\n <CheckboxFH.Text />\n </>\n )}\n </SHighlightedCheckbox>,\n );\n }\n}\n\n/**\n * Checkbox FeatureHighlight\n *\n * {@link https://developer.semrush.com/intergalactic/patterns/feature-highlight/feature-highlight#checkbox|Docs}\n */\nexport const CheckboxFH = createComponent<\n HighlightedCheckboxComponent,\n typeof CheckboxFHRoot\n>(CheckboxFHRoot, {\n Text: Checkbox.Text,\n Value: Checkb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AA,GAAO,IAAA1B,aAAO,EAAC6B,MAAM,CAAC,eACpBhC,MAAA,CAAAU,OAAA,CAAA0B,aAAA,CAACN,oBAAoB,EAAAD,KAAA,CAAAQ,EAAA;MAAA,OAAAzC,KAAA,CAAA0C,WAAA,MAAAV,IAAA;IAAA,IAClBO,WAAW,gBACRnC,MAAA,CAAAU,OAAA,CAAA0B,aAAA,CAACH,QAAQ,EAAAJ,KAAA,CAAAQ,EAAA,gBAAE,CAAC,gBAEVrC,MAAA,CAAAU,OAAA,CAAA0B,aAAA,CAAApC,MAAA,CAAAU,OAAA,CAAA6B,QAAA,qBACEvC,MAAA,CAAAU,OAAA,CAAA0B,aAAA,CAACI,UAAU,CAACC,KAAK,MAAE,CAAC,eACpBzC,MAAA,CAAAU,OAAA,CAAA0B,aAAA,CAACI,UAAU,CAACE,IAAI,MAAE,CAClB,CAEY,CAAC;EAE3B;AACF;;AAEA;AACA;AACA;AACA;AACA;AAJA,IAAAjC,gBAAA,CAAAC,OAAA,EA/CML,cAAc,iBACG,YAAY;AAAA,IAAAI,gBAAA,CAAAC,OAAA,EAD7BL,cAAc,WAEHH,KAAK;AAkDf,MAAMsC,UAAU,GAAAG,OAAA,CAAAH,UAAA,GAAG,IAAAI,qBAAe,EAGvCvC,cAAc,EAAE;EAChBqC,IAAI,EAAEX,iBAAQ,CAACW,IAAI;EACnBD,KAAK,EAAEV,iBAAQ,CAACU,KAAK;EACrBI,gBAAgB,EAAhBA;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -11,16 +11,16 @@ var _m = _interopRequireDefault(require("@semcore/icon/SummaryAI/m"));
|
|
|
11
11
|
var _input = _interopRequireDefault(require("@semcore/input"));
|
|
12
12
|
var _react = _interopRequireDefault(require("react"));
|
|
13
13
|
/*!__reshadow-styles__:"./input.shadow.css"*/
|
|
14
|
-
const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".
|
|
14
|
+
const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SHighlightedInput_82xo3_gg_._state_normal_82xo3_gg_ .___SOutline_82xo3_gg_{background:linear-gradient(#fff,#fff) padding-box,var(--intergalactic-border-feature-highlight,linear-gradient(90deg in oklch,#d2b3ff,#b0c1fe)) border-box;background-origin:border-box;background-clip:padding-box,border-box;border-color:#0000}@supports (background:linear-gradient(in oklch,red 0%,red 0% 1%,red 2%)) and (color:color(display-p3 0 0 0%)){.___SHighlightedInput_82xo3_gg_._state_normal_82xo3_gg_ .___SOutline_82xo3_gg_{background:linear-gradient(#fff,#fff) padding-box,var(--intergalactic-border-feature-highlight,linear-gradient(90deg in oklch,#d2b3ff,#b0c1fe)) border-box}@media (color-gamut:p3){.___SHighlightedInput_82xo3_gg_._state_normal_82xo3_gg_ .___SOutline_82xo3_gg_{background:linear-gradient(#fff,#fff) padding-box,var(--intergalactic-border-feature-highlight,linear-gradient(90deg in oklch,color(display-p3 .80738 .70018 .99486),#b0c1fe)) border-box}}}.___SHighlightedInput_82xo3_gg_._state_normal_82xo3_gg_ .___SOutline_82xo3_gg_:before{content:\"\";position:absolute;z-index:-1;top:0;right:0;bottom:0;left:0;margin:-3px;padding:3px;border-radius:calc(var(--intergalactic-control-rounded, 6px) + 3px);background-image:var(--intergalactic-keyboard-focus-feature-highlight-outline,linear-gradient(90deg in oklch,#c08eff,#666bdb));-webkit-mask:linear-gradient(0deg,#fff,#fff) content-box,linear-gradient(0deg,#fff,#fff);mask:linear-gradient(0deg,#fff,#fff) content-box,linear-gradient(0deg,#fff,#fff);-webkit-mask-composite:xor;mask-composite:exclude;opacity:0;transition:opacity calc(var(--intergalactic-duration-extra-fast, 100)*1ms) ease-in-out}@supports (background:linear-gradient(in oklch,red 0%,red 0% 1%,red 2%)) and (color:color(display-p3 0 0 0%)){.___SHighlightedInput_82xo3_gg_._state_normal_82xo3_gg_ .___SOutline_82xo3_gg_:before{background-image:var(--intergalactic-keyboard-focus-feature-highlight-outline,linear-gradient(90deg in oklch,#c08eff,#666bdb))}@media (color-gamut:p3){.___SHighlightedInput_82xo3_gg_._state_normal_82xo3_gg_ .___SOutline_82xo3_gg_:before{background-image:var(--intergalactic-keyboard-focus-feature-highlight-outline,linear-gradient(90deg in oklch,color(display-p3 .72564 .56096 .98326),#666bdb))}}}.___SHighlightedInput_82xo3_gg_._state_normal_82xo3_gg_:has(.___SValue_82xo3_gg_:focus-visible) .___SOutline_82xo3_gg_{outline:none}.___SHighlightedInput_82xo3_gg_._state_normal_82xo3_gg_:has(.___SValue_82xo3_gg_:focus-visible) .___SOutline_82xo3_gg_:before{opacity:1}.___SHighlightedInput_82xo3_gg_._state_normal_82xo3_gg_._neighborLocation_left_82xo3_gg_ .___SOutline_82xo3_gg_:before{border-top-left-radius:0;border-bottom-left-radius:0}.___SHighlightedInput_82xo3_gg_._state_normal_82xo3_gg_._neighborLocation_right_82xo3_gg_ .___SOutline_82xo3_gg_:before{border-top-right-radius:0;border-bottom-right-radius:0}.___SHighlightedInput_82xo3_gg_._state_normal_82xo3_gg_._neighborLocation_both_82xo3_gg_ .___SOutline_82xo3_gg_:before{border-radius:0}@supports not (-webkit-mask-composite:xor){.___SHighlightedInput_82xo3_gg_._state_normal_82xo3_gg_:has(.___SValue_82xo3_gg_:focus-visible) .___SOutline_82xo3_gg_{outline:none;border-color:#7078fc;box-shadow:0 0 0 0 #fff,0 0 0 2px #7078fc}.___SHighlightedInput_82xo3_gg_._state_normal_82xo3_gg_:has(.___SValue_82xo3_gg_:focus-visible) .___SOutline_82xo3_gg_:before{display:none}}", /*__inner_css_end__*/"82xo3_gg_"),
|
|
15
15
|
/*__reshadow_css_end__*/
|
|
16
16
|
{
|
|
17
|
-
"__SHighlightedInput": "
|
|
18
|
-
"_state_normal": "
|
|
19
|
-
"__SValue": "
|
|
20
|
-
"__SOutline": "
|
|
21
|
-
"_neighborLocation_left": "
|
|
22
|
-
"_neighborLocation_right": "
|
|
23
|
-
"_neighborLocation_both": "
|
|
17
|
+
"__SHighlightedInput": "___SHighlightedInput_82xo3_gg_",
|
|
18
|
+
"_state_normal": "_state_normal_82xo3_gg_",
|
|
19
|
+
"__SValue": "___SValue_82xo3_gg_",
|
|
20
|
+
"__SOutline": "___SOutline_82xo3_gg_",
|
|
21
|
+
"_neighborLocation_left": "_neighborLocation_left_82xo3_gg_",
|
|
22
|
+
"_neighborLocation_right": "_neighborLocation_right_82xo3_gg_",
|
|
23
|
+
"_neighborLocation_both": "_neighborLocation_both_82xo3_gg_"
|
|
24
24
|
});
|
|
25
25
|
class InputFHRoot extends _core.Component {
|
|
26
26
|
render() {
|
|
@@ -44,6 +44,12 @@ function HighlightAddon(props) {
|
|
|
44
44
|
color: "--intergalactic-icon-primary-feature-highlight"
|
|
45
45
|
}));
|
|
46
46
|
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Input FeatureHighlight
|
|
50
|
+
*
|
|
51
|
+
* {@link https://developer.semrush.com/intergalactic/patterns/feature-highlight/feature-highlight#input|Docs}
|
|
52
|
+
*/
|
|
47
53
|
const InputFH = exports.InputFH = (0, _core.createComponent)(InputFHRoot, {
|
|
48
54
|
Addon: HighlightAddon,
|
|
49
55
|
Value: _input.default.Value
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","names":["_core","require","_m","_interopRequireDefault","_input","_react","style","sstyled","insert","InputFHRoot","Component","render","_ref","asProps","_ref3","SHighlightedInput","Input","styles","default","createElement","cn","assignProps","_defineProperty2","HighlightAddon","props","_ref2","arguments[0]","Children","children","hasChildren","Addon","color","InputFH","exports","createComponent","Value"],"sources":["../../../../src/components/input/Input.tsx"],"sourcesContent":["import type { IRootComponentProps } from '@semcore/core';\nimport { Component, createComponent, Root, sstyled } from '@semcore/core';\nimport SummaryAI from '@semcore/icon/SummaryAI/m';\nimport Input from '@semcore/input';\nimport React from 'react';\n\nimport style from './input.shadow.css';\n\nclass InputFHRoot extends Component {\n static displayName = 'InputFH';\n static style = style;\n\n render() {\n const SHighlightedInput = Root;\n return sstyled(this.asProps.styles)(\n <SHighlightedInput render={Input} />,\n );\n }\n}\n\nfunction HighlightAddon(props: IRootComponentProps) {\n const { Children, children: hasChildren } = props;\n return (\n <Root render={Input.Addon}>\n {hasChildren ? (<Children />) : (<SummaryAI color='--intergalactic-icon-primary-feature-highlight' />)}\n </Root>\n );\n}\n\nexport const InputFH = createComponent(InputFHRoot, {\n Addon: HighlightAddon,\n Value: Input.Value,\n})
|
|
1
|
+
{"version":3,"file":"Input.js","names":["_core","require","_m","_interopRequireDefault","_input","_react","style","sstyled","insert","InputFHRoot","Component","render","_ref","asProps","_ref3","SHighlightedInput","Input","styles","default","createElement","cn","assignProps","_defineProperty2","HighlightAddon","props","_ref2","arguments[0]","Children","children","hasChildren","Addon","color","InputFH","exports","createComponent","Value"],"sources":["../../../../src/components/input/Input.tsx"],"sourcesContent":["import type { IRootComponentProps } from '@semcore/core';\nimport { Component, createComponent, Root, sstyled } from '@semcore/core';\nimport SummaryAI from '@semcore/icon/SummaryAI/m';\nimport Input from '@semcore/input';\nimport React from 'react';\n\nimport style from './input.shadow.css';\n\nclass InputFHRoot extends Component {\n static displayName = 'InputFH';\n static style = style;\n\n render() {\n const SHighlightedInput = Root;\n return sstyled(this.asProps.styles)(\n <SHighlightedInput render={Input} />,\n );\n }\n}\n\nfunction HighlightAddon(props: IRootComponentProps) {\n const { Children, children: hasChildren } = props;\n return (\n <Root render={Input.Addon}>\n {hasChildren ? (<Children />) : (<SummaryAI color='--intergalactic-icon-primary-feature-highlight' />)}\n </Root>\n );\n}\n\n/**\n * Input FeatureHighlight\n *\n * {@link https://developer.semrush.com/intergalactic/patterns/feature-highlight/feature-highlight#input|Docs}\n */\nexport const InputFH = createComponent<\n typeof Input,\n typeof InputFHRoot\n>(InputFHRoot, {\n Addon: HighlightAddon,\n Value: Input.Value,\n});\n"],"mappings":";;;;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,EAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG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AAA,CAAAD,OAAA,GAAG,IAAAE,qBAAe,EAGpCzB,WAAW,EAAE;EACbqB,KAAK,EAAEP,cAAc;EACrBY,KAAK,EAAEnB,cAAK,CAACmB;AACf,CAAC,CAAC","ignoreList":[]}
|
|
@@ -12,14 +12,14 @@ var _isNode = _interopRequireDefault(require("@semcore/core/lib/utils/isNode"));
|
|
|
12
12
|
var _notice = _interopRequireDefault(require("@semcore/notice"));
|
|
13
13
|
var _react = _interopRequireDefault(require("react"));
|
|
14
14
|
/*!__reshadow-styles__:"./notice.shadow.css"*/
|
|
15
|
-
const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".
|
|
15
|
+
const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SHighlightedNotice_v4i66_gg_.__beforeVisibility_v4i66_gg_{background-image:var(--intergalactic-bg-secondary-feature-highlight,linear-gradient(90deg in oklch,#f7f3ff,#dee7ff));border-color:#0000;background-clip:padding-box;position:relative}@supports (background:linear-gradient(in oklch,red 0%,red 0% 1%,red 2%)) and (color:color(display-p3 0 0 0%)){.___SHighlightedNotice_v4i66_gg_.__beforeVisibility_v4i66_gg_{background-image:var(--intergalactic-bg-secondary-feature-highlight,linear-gradient(90deg in oklch,#f7f3ff,#dee7ff))}@media (color-gamut:p3){.___SHighlightedNotice_v4i66_gg_.__beforeVisibility_v4i66_gg_{background-image:var(--intergalactic-bg-secondary-feature-highlight,linear-gradient(90deg in oklch,color(display-p3 .96716 .95079 .99961),color(display-p3 .87344 .9059 .99962)))}}}.___SHighlightedNotice_v4i66_gg_.__beforeVisibility_v4i66_gg_:before{content:\"\";position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1;margin:-1px;border-radius:inherit;visibility:var(--beforeVisibility_v4i66);background:var(--intergalactic-border-feature-highlight,linear-gradient(90deg in oklch,#d2b3ff,#b0c1fe)) border-box,var(--intergalactic-border-feature-highlight-active,linear-gradient(90deg in oklch,#c08eff,#94a5f5)) padding-box}@supports (background:linear-gradient(in oklch,red 0%,red 0% 1%,red 2%)) and (color:color(display-p3 0 0 0%)){.___SHighlightedNotice_v4i66_gg_.__beforeVisibility_v4i66_gg_:before{background:var(--intergalactic-border-feature-highlight,linear-gradient(90deg in oklch,#d2b3ff,#b0c1fe)) border-box,var(--intergalactic-border-feature-highlight-active,linear-gradient(90deg in oklch,#c08eff,#94a5f5)) padding-box}@media (color-gamut:p3){.___SHighlightedNotice_v4i66_gg_.__beforeVisibility_v4i66_gg_:before{background:var(--intergalactic-border-feature-highlight,linear-gradient(90deg in oklch,color(display-p3 .80738 .70018 .99486),#b0c1fe)) border-box,var(--intergalactic-border-feature-highlight-active,linear-gradient(90deg in oklch,color(display-p3 .72564 .56096 .98326),#94a5f5)) padding-box}}}.___SHighlightedNotice_v4i66_gg_.__beforeVisibility_v4i66_gg_ .___SLabel_v4i66_gg_{color:var(--intergalactic-icon-primary-feature-highlight,#9041fa)}.___SHighlightedNotice_v4i66_gg_.__beforeVisibility_v4i66_gg_ .___SCloseIcon_v4i66_gg_{color:var(--intergalactic-icon-primary-neutral,#00040186)}@media (hover:hover){.___SHighlightedNotice_v4i66_gg_.__beforeVisibility_v4i66_gg_ .___SCloseIcon_v4i66_gg_:hover{color:var(--intergalactic-icon-primary-neutral-hover-active,#00030095)}@supports (color:color(display-p3 0 0 0%)){.___SHighlightedNotice_v4i66_gg_.__beforeVisibility_v4i66_gg_ .___SCloseIcon_v4i66_gg_:hover{color:var(--intergalactic-icon-primary-neutral-hover-active,#00030095)}@media (color-gamut:p3){.___SHighlightedNotice_v4i66_gg_.__beforeVisibility_v4i66_gg_ .___SCloseIcon_v4i66_gg_:hover{color:var(--intergalactic-icon-primary-neutral-hover-active,color(display-p3 .00228 .01289 .00252/.583))}}}}", /*__inner_css_end__*/"v4i66_gg_"),
|
|
16
16
|
/*__reshadow_css_end__*/
|
|
17
17
|
{
|
|
18
|
-
"__SHighlightedNotice": "
|
|
19
|
-
"_beforeVisibility": "
|
|
20
|
-
"--beforeVisibility": "--
|
|
21
|
-
"__SLabel": "
|
|
22
|
-
"__SCloseIcon": "
|
|
18
|
+
"__SHighlightedNotice": "___SHighlightedNotice_v4i66_gg_",
|
|
19
|
+
"_beforeVisibility": "__beforeVisibility_v4i66_gg_",
|
|
20
|
+
"--beforeVisibility": "--beforeVisibility_v4i66",
|
|
21
|
+
"__SLabel": "___SLabel_v4i66_gg_",
|
|
22
|
+
"__SCloseIcon": "___SCloseIcon_v4i66_gg_"
|
|
23
23
|
});
|
|
24
24
|
class NoticeFHRoot extends _core.Component {
|
|
25
25
|
renderSmartMode() {
|
|
@@ -61,6 +61,12 @@ class NoticeFHRoot extends _core.Component {
|
|
|
61
61
|
}), advancedMode ? this.renderAdvancedMode() : this.renderSmartMode());
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Notice FeatureHighlight
|
|
67
|
+
*
|
|
68
|
+
* {@link https://developer.semrush.com/intergalactic/patterns/feature-highlight/feature-highlight#notice|Docs}
|
|
69
|
+
*/
|
|
64
70
|
(0, _defineProperty2.default)(NoticeFHRoot, "displayName", 'NoticeFH');
|
|
65
71
|
(0, _defineProperty2.default)(NoticeFHRoot, "style", style);
|
|
66
72
|
const NoticeFH = exports.NoticeFH = (0, _core.createComponent)(NoticeFHRoot, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Notice.js","names":["_core","require","_findComponent","_isNode","_interopRequireDefault","_notice","_react","style","sstyled","insert","NoticeFHRoot","Component","renderSmartMode","label","title","text","actions","closable","onClose","asProps","default","createElement","Fragment","isNode","Label","Content","Title","Text","Actions","Close","onClick","renderAdvancedMode","Children","render","_ref","_ref2","SHighlightedNotice","Notice","styles","visible","advancedMode","isAdvanceMode","NoticeFH","displayName","beforeVisibility","undefined","cn","assignProps","_defineProperty2","exports","createComponent"],"sources":["../../../../src/components/notice/Notice.tsx"],"sourcesContent":["import { createComponent, Component, Root, sstyled } from '@semcore/core';\nimport { isAdvanceMode } from '@semcore/core/lib/utils/findComponent';\nimport isNode from '@semcore/core/lib/utils/isNode';\nimport type { NoticeSmartProps } from '@semcore/notice';\nimport Notice from '@semcore/notice';\nimport React from 'react';\n\nimport style from './notice.shadow.css';\nimport type { HighlightedNoticeComponent } from './Notice.type';\n\nclass NoticeFHRoot extends Component<NoticeSmartProps> {\n static displayName = 'NoticeFH';\n static style = style;\n\n renderSmartMode() {\n const { label, title, text, actions, closable, onClose } = this.asProps;\n\n return (\n <>\n {isNode(label) && <Notice.Label>{label}</Notice.Label>}\n <Notice.Content>\n {isNode(title) && <Notice.Title>{title}</Notice.Title>}\n {isNode(text) && <Notice.Text>{text}</Notice.Text>}\n {isNode(actions) && <Notice.Actions>{actions}</Notice.Actions>}\n </Notice.Content>\n {closable && <Notice.Close onClick={onClose} />}\n </>\n );\n }\n\n renderAdvancedMode() {\n const { Children } = this.asProps;\n\n return <Children />;\n }\n\n render() {\n const SHighlightedNotice = Root;\n const { styles, Children, visible } = this.asProps;\n\n const advancedMode = isAdvanceMode(Children, [\n NoticeFH.Label.displayName,\n NoticeFH.Actions.displayName,\n NoticeFH.Content.displayName,\n NoticeFH.Title.displayName,\n NoticeFH.Text.displayName,\n NoticeFH.Close.displayName,\n ]);\n\n const beforeVisibility = visible === undefined || visible ? 'visible' : 'hidden';\n\n return sstyled(styles)(\n <SHighlightedNotice render={Notice} beforeVisibility={beforeVisibility} __excludeProps={['title']} use:theme={undefined}>\n {advancedMode ? this.renderAdvancedMode() : this.renderSmartMode()}\n </SHighlightedNotice>,\n );\n }\n}\n\nexport const NoticeFH = createComponent(NoticeFHRoot, {\n Label: Notice.Label,\n Actions: Notice.Actions,\n Content: Notice.Content,\n Title: Notice.Title,\n Text: Notice.Text,\n Close: Notice.Close,\n})
|
|
1
|
+
{"version":3,"file":"Notice.js","names":["_core","require","_findComponent","_isNode","_interopRequireDefault","_notice","_react","style","sstyled","insert","NoticeFHRoot","Component","renderSmartMode","label","title","text","actions","closable","onClose","asProps","default","createElement","Fragment","isNode","Label","Content","Title","Text","Actions","Close","onClick","renderAdvancedMode","Children","render","_ref","_ref2","SHighlightedNotice","Notice","styles","visible","advancedMode","isAdvanceMode","NoticeFH","displayName","beforeVisibility","undefined","cn","assignProps","_defineProperty2","exports","createComponent"],"sources":["../../../../src/components/notice/Notice.tsx"],"sourcesContent":["import { createComponent, Component, Root, sstyled } from '@semcore/core';\nimport { isAdvanceMode } from '@semcore/core/lib/utils/findComponent';\nimport isNode from '@semcore/core/lib/utils/isNode';\nimport type { NoticeSmartProps } from '@semcore/notice';\nimport Notice from '@semcore/notice';\nimport React from 'react';\n\nimport style from './notice.shadow.css';\nimport type { HighlightedNoticeComponent } from './Notice.type';\n\nclass NoticeFHRoot extends Component<NoticeSmartProps> {\n static displayName = 'NoticeFH';\n static style = style;\n\n renderSmartMode() {\n const { label, title, text, actions, closable, onClose } = this.asProps;\n\n return (\n <>\n {isNode(label) && <Notice.Label>{label}</Notice.Label>}\n <Notice.Content>\n {isNode(title) && <Notice.Title>{title}</Notice.Title>}\n {isNode(text) && <Notice.Text>{text}</Notice.Text>}\n {isNode(actions) && <Notice.Actions>{actions}</Notice.Actions>}\n </Notice.Content>\n {closable && <Notice.Close onClick={onClose} />}\n </>\n );\n }\n\n renderAdvancedMode() {\n const { Children } = this.asProps;\n\n return <Children />;\n }\n\n render() {\n const SHighlightedNotice = Root;\n const { styles, Children, visible } = this.asProps;\n\n const advancedMode = isAdvanceMode(Children, [\n NoticeFH.Label.displayName,\n NoticeFH.Actions.displayName,\n NoticeFH.Content.displayName,\n NoticeFH.Title.displayName,\n NoticeFH.Text.displayName,\n NoticeFH.Close.displayName,\n ]);\n\n const beforeVisibility = visible === undefined || visible ? 'visible' : 'hidden';\n\n return sstyled(styles)(\n <SHighlightedNotice render={Notice} beforeVisibility={beforeVisibility} __excludeProps={['title']} use:theme={undefined}>\n {advancedMode ? this.renderAdvancedMode() : this.renderSmartMode()}\n </SHighlightedNotice>,\n );\n }\n}\n\n/**\n * Notice FeatureHighlight\n *\n * {@link https://developer.semrush.com/intergalactic/patterns/feature-highlight/feature-highlight#notice|Docs}\n */\nexport const NoticeFH = createComponent<\n HighlightedNoticeComponent,\n typeof NoticeFHRoot\n>(NoticeFHRoot, {\n Label: Notice.Label,\n Actions: Notice.Actions,\n Content: Notice.Content,\n Title: Notice.Title,\n Text: Notice.Text,\n Close: Notice.Close,\n});\n"],"mappings":";;;;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,IAAAI,OAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,MAAA,GAAAF,sBAAA,CAAAH,OAAA;AAA0B;AAAA,MAAAM,KAAA,8BAAAP,KAAA,CAAAQ,OAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAK1B,MAAMC,YAAY,SAASC,eAAS,CAAmB;EAIrDC,eAAeA,CAAA,EAAG;IAChB,MAAM;MAAEC,KAAK;MAAEC,KAAK;MAAEC,IAAI;MAAEC,OAAO;MAAEC,QAAQ;MAAEC;IAAQ,CAAC,GAAG,IAAI,CAACC,OAAO;IAEvE,oBACEb,MAAA,CAAAc,OAAA,CAAAC,aAAA,CAAAf,MAAA,CAAAc,OAAA,CAAAE,QAAA,QACG,IAAAC,eAAM,EAACV,KAAK,CAAC,iBAAIP,MAAA,CAAAc,OAAA,CAAAC,aAAA,CAAChB,OAAA,CAAAe,OAAM,CAACI,KAAK,QAAEX,KAAoB,CAAC,eACtDP,MAAA,CAAAc,OAAA,CAAAC,aAAA,CAAChB,OAAA,CAAAe,OAAM,CAACK,OAAO,QACZ,IAAAF,eAAM,EAACT,KAAK,CAAC,iBAAIR,MAAA,CAAAc,OAAA,CAAAC,aAAA,CAAChB,OAAA,CAAAe,OAAM,CAACM,KAAK,QAAEZ,KAAoB,CAAC,EACr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O,EAAC8B,MAAM,CAAC,eACpBhC,MAAA,CAAAc,OAAA,CAAAC,aAAA,CAACe,kBAAkB,EAAAD,KAAA,CAAAW,EAAA;MAAA,OAAA9C,KAAA,CAAA+C,WAAA;QAAA,oBAAmCH,gBAAgB;QAAA,kBAAkB,CAAC,OAAO,CAAC;QAAA,aAAaC;MAAS,GAAAX,IAAA;IAAA,IACpHM,YAAY,GAAG,IAAI,CAACT,kBAAkB,CAAC,CAAC,GAAG,IAAI,CAACnB,eAAe,CAAC,CAC/C,CAAC;EAEzB;AACF;;AAEA;AACA;AACA;AACA;AACA;AAJA,IAAAoC,gBAAA,CAAA5B,OAAA,EAjDMV,YAAY,iBACK,UAAU;AAAA,IAAAsC,gBAAA,CAAA5B,OAAA,EAD3BV,YAAY,WAEDH,KAAK;AAoDf,MAAMmC,QAAQ,GAAAO,OAAA,CAAAP,QAAA,GAAG,IAAAQ,qBAAe,EAGrCxC,YAAY,EAAE;EACdc,KAAK,EAAEa,eAAM,CAACb,KAAK;EACnBI,OAAO,EAAES,eAAM,CAACT,OAAO;EACvBH,OAAO,EAAEY,eAAM,CAACZ,OAAO;EACvBC,KAAK,EAAEW,eAAM,CAACX,KAAK;EACnBC,IAAI,EAAEU,eAAM,CAACV,IAAI;EACjBE,KAAK,EAAEQ,eAAM,CAACR;AAChB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -13,8 +13,7 @@ SHighlightedNotice[beforeVisibility] {
|
|
|
13
13
|
border-radius: inherit;
|
|
14
14
|
visibility: var(--beforeVisibility);
|
|
15
15
|
|
|
16
|
-
background: var(--intergalactic-border-feature-highlight, linear-gradient(90deg in oklch, oklch(0.82 0.118 303), oklch(0.82 0.088 272.1))
|
|
17
|
-
) border-box, var(--intergalactic-border-feature-highlight-active, linear-gradient(90deg in oklch, oklch(0.74 0.17 303), oklch(0.74 0.117 274.1))) padding-box;
|
|
16
|
+
background: var(--intergalactic-border-feature-highlight, linear-gradient(90deg in oklch, oklch(0.82 0.118 303), oklch(0.82 0.088 272.1))) border-box, var(--intergalactic-border-feature-highlight-active, linear-gradient(90deg in oklch, oklch(0.74 0.17 303), oklch(0.74 0.117 274.1))) padding-box;
|
|
18
17
|
}
|
|
19
18
|
|
|
20
19
|
& SLabel {
|
|
@@ -28,4 +27,4 @@ SHighlightedNotice[beforeVisibility] {
|
|
|
28
27
|
color: var(--intergalactic-icon-primary-neutral-hover-active, oklch(0.088 0.026 147.7 / 0.583));
|
|
29
28
|
}
|
|
30
29
|
}
|
|
31
|
-
}
|
|
30
|
+
}
|
|
@@ -12,15 +12,15 @@ var _pills = _interopRequireDefault(require("@semcore/pills"));
|
|
|
12
12
|
var _react = _interopRequireDefault(require("react"));
|
|
13
13
|
var _AnimatedSparkles = require("../../inner-components/sparkle/AnimatedSparkles");
|
|
14
14
|
/*!__reshadow-styles__:"./pills.shadow.css"*/
|
|
15
|
-
const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".
|
|
15
|
+
const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SHighlightedPill_1l6cc_gg_{border:1px solid #0000;background:linear-gradient(#fff,#fff) padding-box,var(--intergalactic-border-feature-highlight,linear-gradient(90deg in oklch,#d2b3ff,#b0c1fe)) border-box;background-origin:border-box;background-clip:padding-box,border-box;z-index:1;position:relative}@supports (background:linear-gradient(in oklch,red 0%,red 0% 1%,red 2%)) and (color:color(display-p3 0 0 0%)){.___SHighlightedPill_1l6cc_gg_{background:linear-gradient(#fff,#fff) padding-box,var(--intergalactic-border-feature-highlight,linear-gradient(90deg in oklch,#d2b3ff,#b0c1fe)) border-box}@media (color-gamut:p3){.___SHighlightedPill_1l6cc_gg_{background:linear-gradient(#fff,#fff) padding-box,var(--intergalactic-border-feature-highlight,linear-gradient(90deg in oklch,color(display-p3 .80738 .70018 .99486),#b0c1fe)) border-box}}}.___SHighlightedPill_1l6cc_gg_:before{content:\"\";position:absolute;z-index:-1;top:0;right:0;bottom:0;left:0;margin:-5px;padding:2px;border-radius:calc(var(--intergalactic-control-rounded, 6px) + 3px);background-image:var(--intergalactic-keyboard-focus-feature-highlight-outline,linear-gradient(90deg in oklch,#c08eff,#666bdb));-webkit-mask:linear-gradient(0deg,#fff,#fff) content-box,linear-gradient(0deg,#fff,#fff);mask:linear-gradient(0deg,#fff,#fff) content-box,linear-gradient(0deg,#fff,#fff);-webkit-mask-composite:xor;mask-composite:exclude;opacity:0;transform:scale(.96);will-change:opacity,transform;transition:opacity calc(var(--intergalactic-duration-extra-fast, 100)*1ms) ease-in-out,transform calc(var(--intergalactic-duration-extra-fast, 100)*1ms) ease-in-out}@supports (background:linear-gradient(in oklch,red 0%,red 0% 1%,red 2%)) and (color:color(display-p3 0 0 0%)){.___SHighlightedPill_1l6cc_gg_:before{background-image:var(--intergalactic-keyboard-focus-feature-highlight-outline,linear-gradient(90deg in oklch,#c08eff,#666bdb))}@media (color-gamut:p3){.___SHighlightedPill_1l6cc_gg_:before{background-image:var(--intergalactic-keyboard-focus-feature-highlight-outline,linear-gradient(90deg in oklch,color(display-p3 .72564 .56096 .98326),#666bdb))}}}.___SHighlightedPill_1l6cc_gg_._neighborLocation_left_1l6cc_gg_:before{border-top-left-radius:0;border-bottom-left-radius:0}.___SHighlightedPill_1l6cc_gg_._neighborLocation_right_1l6cc_gg_:before{border-top-right-radius:0;border-bottom-right-radius:0}.___SHighlightedPill_1l6cc_gg_._neighborLocation_both_1l6cc_gg_:before{border-radius:0}@media (hover:hover){.___SHighlightedPill_1l6cc_gg_:hover{background:var(--intergalactic-bg-primary-feature-highlight-hover-active,linear-gradient(90deg in oklch,#f7f3ff,#dee7ff)) padding-box,var(--intergalactic-border-feature-highlight,linear-gradient(90deg in oklch,#d2b3ff,#b0c1fe)) border-box}@supports (background:linear-gradient(in oklch,red 0%,red 0% 1%,red 2%)) and (color:color(display-p3 0 0 0%)){.___SHighlightedPill_1l6cc_gg_:hover{background:var(--intergalactic-bg-primary-feature-highlight-hover-active,linear-gradient(90deg in oklch,#f7f3ff,#dee7ff)) padding-box,var(--intergalactic-border-feature-highlight,linear-gradient(90deg in oklch,#d2b3ff,#b0c1fe)) border-box}@media (color-gamut:p3){.___SHighlightedPill_1l6cc_gg_:hover{background:var(--intergalactic-bg-primary-feature-highlight-hover-active,linear-gradient(90deg in oklch,color(display-p3 .96716 .95079 .99961),color(display-p3 .87344 .9059 .99962))) padding-box,var(--intergalactic-border-feature-highlight,linear-gradient(90deg in oklch,color(display-p3 .80738 .70018 .99486),#b0c1fe)) border-box}}}}.___SHighlightedPill_1l6cc_gg_.__selected_1l6cc_gg_{background:var(--intergalactic-bg-primary-feature-highlight-hover-active,linear-gradient(90deg in oklch,#f7f3ff,#dee7ff)) padding-box,var(--intergalactic-control-primary-feature-highlight-hover,linear-gradient(90deg in oklch,#a261fd,#94a5f5)) border-box;background-origin:border-box;background-clip:padding-box,border-box;border-color:#0000}@supports (background:linear-gradient(in oklch,red 0%,red 0% 1%,red 2%)) and (color:color(display-p3 0 0 0%)){.___SHighlightedPill_1l6cc_gg_.__selected_1l6cc_gg_{background:var(--intergalactic-bg-primary-feature-highlight-hover-active,linear-gradient(90deg in oklch,#f7f3ff,#dee7ff)) padding-box,var(--intergalactic-control-primary-feature-highlight-hover,linear-gradient(90deg in oklch,#a261fd,#94a5f5)) border-box}@media (color-gamut:p3){.___SHighlightedPill_1l6cc_gg_.__selected_1l6cc_gg_{background:var(--intergalactic-bg-primary-feature-highlight-hover-active,linear-gradient(90deg in oklch,color(display-p3 .96716 .95079 .99961),color(display-p3 .87344 .9059 .99962))) padding-box,var(--intergalactic-control-primary-feature-highlight-hover,linear-gradient(90deg in oklch,#a261fd,#94a5f5)) border-box}}}.___SPills_1l6cc_gg_ .___SHighlightedPill_1l6cc_gg_:focus-visible{outline:none}.___SPills_1l6cc_gg_ .___SHighlightedPill_1l6cc_gg_:focus-visible:before{opacity:1;transform:scale(1)}@supports not (-webkit-mask-composite:xor){.___SHighlightedPill_1l6cc_gg_:focus-visible{outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #7078fc}.___SHighlightedPill_1l6cc_gg_:focus-visible:before{display:none}}", /*__inner_css_end__*/"1l6cc_gg_"),
|
|
16
16
|
/*__reshadow_css_end__*/
|
|
17
17
|
{
|
|
18
|
-
"__SHighlightedPill": "
|
|
19
|
-
"_neighborLocation_left": "
|
|
20
|
-
"_neighborLocation_right": "
|
|
21
|
-
"_neighborLocation_both": "
|
|
22
|
-
"_selected": "
|
|
23
|
-
"__SPills": "
|
|
18
|
+
"__SHighlightedPill": "___SHighlightedPill_1l6cc_gg_",
|
|
19
|
+
"_neighborLocation_left": "_neighborLocation_left_1l6cc_gg_",
|
|
20
|
+
"_neighborLocation_right": "_neighborLocation_right_1l6cc_gg_",
|
|
21
|
+
"_neighborLocation_both": "_neighborLocation_both_1l6cc_gg_",
|
|
22
|
+
"_selected": "__selected_1l6cc_gg_",
|
|
23
|
+
"__SPills": "___SPills_1l6cc_gg_"
|
|
24
24
|
});
|
|
25
25
|
class PillsFHRoot extends _core.Component {
|
|
26
26
|
render() {
|
|
@@ -84,11 +84,18 @@ function HighlightedItemAddon(props) {
|
|
|
84
84
|
count: animatedSparkleCount
|
|
85
85
|
})));
|
|
86
86
|
}
|
|
87
|
+
const HighlightedItem = (0, _core.createComponent)(HighlightedItemRoot, {
|
|
88
|
+
Text: _pills.default.Item.Text,
|
|
89
|
+
Addon: HighlightedItemAddon
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Pills FeatureHighlight
|
|
94
|
+
*
|
|
95
|
+
* {@link https://developer.semrush.com/intergalactic/patterns/feature-highlight/feature-highlight#pills|Docs}
|
|
96
|
+
*/
|
|
87
97
|
const PillsFH = exports.PillsFH = (0, _core.createComponent)(PillsFHRoot, {
|
|
88
98
|
Item: _pills.default.Item,
|
|
89
|
-
HighlightedItem
|
|
90
|
-
Text: _pills.default.Item.Text,
|
|
91
|
-
Addon: HighlightedItemAddon
|
|
92
|
-
})
|
|
99
|
+
HighlightedItem
|
|
93
100
|
});
|
|
94
101
|
//# sourceMappingURL=Pills.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pills.js","names":["_core","require","_m","_interopRequireDefault","_pills","_react","_AnimatedSparkles","style","sstyled","insert","PillsFHRoot","Component","render","_ref","asProps","default","createElement","Pills","assignProps","_defineProperty2","HighlightedItemRoot","constructor","args","clicked","handleClick","e","onClick","setState","setTimeout","getAddonProps","state","_ref2","_ref4","SHighlightedPill","Item","styles","cn","bind","HighlightedItemAddon","props","_ref3","arguments[0]","animatedSparkleCount","Children","children","Addon","undefined","Fragment","color","AnimatedSparkles","show","count","
|
|
1
|
+
{"version":3,"file":"Pills.js","names":["_core","require","_m","_interopRequireDefault","_pills","_react","_AnimatedSparkles","style","sstyled","insert","PillsFHRoot","Component","render","_ref","asProps","default","createElement","Pills","assignProps","_defineProperty2","HighlightedItemRoot","constructor","args","clicked","handleClick","e","onClick","setState","setTimeout","getAddonProps","state","_ref2","_ref4","SHighlightedPill","Item","styles","cn","bind","HighlightedItemAddon","props","_ref3","arguments[0]","animatedSparkleCount","Children","children","Addon","undefined","Fragment","color","AnimatedSparkles","show","count","HighlightedItem","createComponent","Text","PillsFH","exports"],"sources":["../../../../src/components/pills/Pills.tsx"],"sourcesContent":["import type { IRootComponentProps } from '@semcore/core';\nimport { createComponent, Root, Component, sstyled } from '@semcore/core';\nimport SummaryAI from '@semcore/icon/SummaryAI/m';\nimport Pills from '@semcore/pills';\nimport React from 'react';\n\nimport style from './pills.shadow.css';\nimport type { HighlightedItemAddonProps, HighlightedPillComponent, HighlightedPillItemComponent } from './Pills.type';\nimport { AnimatedSparkles } from '../../inner-components/sparkle/AnimatedSparkles';\n\nclass PillsFHRoot extends Component {\n static displayName = 'PillsFH';\n static style = style;\n\n render() {\n return (<Root render={Pills} />);\n }\n}\n\nclass HighlightedItemRoot extends Component {\n static displayName = 'HighlightedItem';\n static style = style;\n\n state = {\n clicked: false,\n };\n\n handleClick(e: React.MouseEvent<HTMLButtonElement>) {\n const { onClick } = this.asProps;\n\n onClick?.(e);\n this.setState({ clicked: false });\n setTimeout(() => {\n this.setState({ clicked: true });\n });\n }\n\n getAddonProps() {\n return {\n clicked: this.state.clicked,\n };\n }\n\n render() {\n const SHighlightedPill = Root;\n\n return sstyled(this.asProps.styles)(<SHighlightedPill render={Pills.Item} onClick={this.handleClick.bind(this)} />);\n }\n}\n\nfunction HighlightedItemAddon(props: HighlightedItemAddonProps & { clicked: boolean } & IRootComponentProps) {\n const { clicked, animatedSparkleCount, Children, children } = props;\n return (\n <Root render={Pills.Item.Addon}>\n {children !== undefined\n ? (<Children />)\n : (\n <>\n <SummaryAI color='--intergalactic-icon-primary-feature-highlight' />\n <AnimatedSparkles show={clicked} count={animatedSparkleCount} />\n </>\n )}\n </Root>\n );\n}\n\nconst HighlightedItem = createComponent<\n HighlightedPillItemComponent,\n typeof HighlightedItemRoot\n>(HighlightedItemRoot, {\n Text: Pills.Item.Text,\n Addon: HighlightedItemAddon,\n});\n\n/**\n * Pills FeatureHighlight\n *\n * {@link https://developer.semrush.com/intergalactic/patterns/feature-highlight/feature-highlight#pills|Docs}\n */\nexport const PillsFH = createComponent<\n HighlightedPillComponent,\n typeof PillsFHRoot\n>(PillsFHRoot, {\n Item: Pills.Item,\n HighlightedItem,\n});\n"],"mappings":";;;;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,EAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,MAAA,GAAAF,sBAAA,CAAAF,OAAA;AAIA,IAAAK,iBAAA,GAAAL,OAAA;AAAmF;AAAA,MAAAM,KAAA,8BAAAP,KAAA,CAAAQ,OAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAEnF,MAAMC,WAAW,SAASC,eAAS,CAAC;EAIlCC,MAAMA,CA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iB,IAAI;EAChBkB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pills.type.js","names":[],"sources":["../../../../src/components/pills/Pills.type.ts"],"sourcesContent":["import type { Box } from '@semcore/base-components';\nimport type { Intergalactic } from '@semcore/core';\nimport type Pills from '@semcore/pills';\nimport type { PillProps } from '@semcore/pills';\n\nexport type HighlightedItemAddonProps = {\n animatedSparkleCount?: number;\n};\n\nexport type
|
|
1
|
+
{"version":3,"file":"Pills.type.js","names":[],"sources":["../../../../src/components/pills/Pills.type.ts"],"sourcesContent":["import type { Box } from '@semcore/base-components';\nimport type { Intergalactic } from '@semcore/core';\nimport type Pills from '@semcore/pills';\nimport type { PillProps } from '@semcore/pills';\n\nexport type HighlightedItemAddonProps = {\n animatedSparkleCount?: number;\n};\n\nexport type HighlightedPillItemComponent = Intergalactic.Component<'div', PillProps> & {\n Text: typeof Box;\n Addon: Intergalactic.Component<'div', HighlightedItemAddonProps>;\n};\n\nexport type HighlightedPillComponent = typeof Pills & {\n HighlightedItem: HighlightedPillItemComponent;\n};\n"],"mappings":"","ignoreList":[]}
|