@semcore/feature-highlight 16.0.1-prerelease.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/LICENSE +21 -0
- package/README.md +39 -0
- package/lib/cjs/components/badge/Badge.js +46 -0
- package/lib/cjs/components/badge/Badge.js.map +1 -0
- package/lib/cjs/components/badge/badge.shadow.css +14 -0
- package/lib/cjs/components/button/Button.js +107 -0
- package/lib/cjs/components/button/Button.js.map +1 -0
- package/lib/cjs/components/button/Button.type.js +2 -0
- package/lib/cjs/components/button/Button.type.js.map +1 -0
- package/lib/cjs/components/button/button.shadow.css +76 -0
- package/lib/cjs/components/checkbox/Checkbox.js +86 -0
- package/lib/cjs/components/checkbox/Checkbox.js.map +1 -0
- package/lib/cjs/components/checkbox/Checkbox.type.js +2 -0
- package/lib/cjs/components/checkbox/Checkbox.type.js.map +1 -0
- package/lib/cjs/components/checkbox/checkbox.shadow.css +38 -0
- package/lib/cjs/components/input/Input.js +63 -0
- package/lib/cjs/components/input/Input.js.map +1 -0
- package/lib/cjs/components/input/input.shadow.css +41 -0
- package/lib/cjs/components/notice/Notice.js +73 -0
- package/lib/cjs/components/notice/Notice.js.map +1 -0
- package/lib/cjs/components/notice/notice.shadow.css +26 -0
- package/lib/cjs/components/pills/Pills.js +117 -0
- package/lib/cjs/components/pills/Pills.js.map +1 -0
- package/lib/cjs/components/pills/Pills.type.js +2 -0
- package/lib/cjs/components/pills/Pills.type.js.map +1 -0
- package/lib/cjs/components/pills/pills.shadow.css +57 -0
- package/lib/cjs/components/radio/Radio.js +100 -0
- package/lib/cjs/components/radio/Radio.js.map +1 -0
- package/lib/cjs/components/radio/Radio.type.js +2 -0
- package/lib/cjs/components/radio/Radio.type.js.map +1 -0
- package/lib/cjs/components/radio/radio.shadow.css +43 -0
- package/lib/cjs/components/select/Select.js +53 -0
- package/lib/cjs/components/select/Select.js.map +1 -0
- package/lib/cjs/components/switch/Switch.js +94 -0
- package/lib/cjs/components/switch/Switch.js.map +1 -0
- package/lib/cjs/components/switch/Switch.type.js +2 -0
- package/lib/cjs/components/switch/Switch.type.js.map +1 -0
- package/lib/cjs/components/switch/switch.shadow.css +22 -0
- package/lib/cjs/components/tab-line/TabLine.js +119 -0
- package/lib/cjs/components/tab-line/TabLine.js.map +1 -0
- package/lib/cjs/components/tab-line/TabLine.type.js +2 -0
- package/lib/cjs/components/tab-line/TabLine.type.js.map +1 -0
- package/lib/cjs/components/tab-line/tabLine.shadow.css +25 -0
- package/lib/cjs/index.js +116 -0
- package/lib/cjs/index.js.map +1 -0
- package/lib/cjs/inner-components/button-trigger/ButtonTrigger.js +66 -0
- package/lib/cjs/inner-components/button-trigger/ButtonTrigger.js.map +1 -0
- package/lib/cjs/inner-components/button-trigger/ButtonTrigger.type.js +2 -0
- package/lib/cjs/inner-components/button-trigger/ButtonTrigger.type.js.map +1 -0
- package/lib/cjs/inner-components/button-trigger/buttonTrigger.shadow.css +57 -0
- package/lib/cjs/inner-components/sparkle/AnimatedSparkles.js +28 -0
- package/lib/cjs/inner-components/sparkle/AnimatedSparkles.js.map +1 -0
- package/lib/cjs/inner-components/sparkle/Sparkle.js +59 -0
- package/lib/cjs/inner-components/sparkle/Sparkle.js.map +1 -0
- package/lib/cjs/inner-components/sparkle/index.js +14 -0
- package/lib/cjs/inner-components/sparkle/index.js.map +1 -0
- package/lib/cjs/inner-components/sparkle/style/sparkle.shadow.css +31 -0
- package/lib/es6/components/badge/Badge.js +41 -0
- package/lib/es6/components/badge/Badge.js.map +1 -0
- package/lib/es6/components/badge/badge.shadow.css +14 -0
- package/lib/es6/components/button/Button.js +103 -0
- package/lib/es6/components/button/Button.js.map +1 -0
- package/lib/es6/components/button/Button.type.js +2 -0
- package/lib/es6/components/button/Button.type.js.map +1 -0
- package/lib/es6/components/button/button.shadow.css +76 -0
- package/lib/es6/components/checkbox/Checkbox.js +81 -0
- package/lib/es6/components/checkbox/Checkbox.js.map +1 -0
- package/lib/es6/components/checkbox/Checkbox.type.js +2 -0
- package/lib/es6/components/checkbox/Checkbox.type.js.map +1 -0
- package/lib/es6/components/checkbox/checkbox.shadow.css +38 -0
- package/lib/es6/components/input/Input.js +59 -0
- package/lib/es6/components/input/Input.js.map +1 -0
- package/lib/es6/components/input/input.shadow.css +41 -0
- package/lib/es6/components/notice/Notice.js +68 -0
- package/lib/es6/components/notice/Notice.js.map +1 -0
- package/lib/es6/components/notice/notice.shadow.css +26 -0
- package/lib/es6/components/pills/Pills.js +113 -0
- package/lib/es6/components/pills/Pills.js.map +1 -0
- package/lib/es6/components/pills/Pills.type.js +2 -0
- package/lib/es6/components/pills/Pills.type.js.map +1 -0
- package/lib/es6/components/pills/pills.shadow.css +57 -0
- package/lib/es6/components/radio/Radio.js +94 -0
- package/lib/es6/components/radio/Radio.js.map +1 -0
- package/lib/es6/components/radio/Radio.type.js +2 -0
- package/lib/es6/components/radio/Radio.type.js.map +1 -0
- package/lib/es6/components/radio/radio.shadow.css +43 -0
- package/lib/es6/components/select/Select.js +48 -0
- package/lib/es6/components/select/Select.js.map +1 -0
- package/lib/es6/components/switch/Switch.js +90 -0
- package/lib/es6/components/switch/Switch.js.map +1 -0
- package/lib/es6/components/switch/Switch.type.js +2 -0
- package/lib/es6/components/switch/Switch.type.js.map +1 -0
- package/lib/es6/components/switch/switch.shadow.css +22 -0
- package/lib/es6/components/tab-line/TabLine.js +116 -0
- package/lib/es6/components/tab-line/TabLine.js.map +1 -0
- package/lib/es6/components/tab-line/TabLine.type.js +2 -0
- package/lib/es6/components/tab-line/TabLine.type.js.map +1 -0
- package/lib/es6/components/tab-line/tabLine.shadow.css +25 -0
- package/lib/es6/index.js +11 -0
- package/lib/es6/index.js.map +1 -0
- package/lib/es6/inner-components/button-trigger/ButtonTrigger.js +62 -0
- package/lib/es6/inner-components/button-trigger/ButtonTrigger.js.map +1 -0
- package/lib/es6/inner-components/button-trigger/ButtonTrigger.type.js +2 -0
- package/lib/es6/inner-components/button-trigger/ButtonTrigger.type.js.map +1 -0
- package/lib/es6/inner-components/button-trigger/buttonTrigger.shadow.css +57 -0
- package/lib/es6/inner-components/sparkle/AnimatedSparkles.js +21 -0
- package/lib/es6/inner-components/sparkle/AnimatedSparkles.js.map +1 -0
- package/lib/es6/inner-components/sparkle/Sparkle.js +54 -0
- package/lib/es6/inner-components/sparkle/Sparkle.js.map +1 -0
- package/lib/es6/inner-components/sparkle/index.js +3 -0
- package/lib/es6/inner-components/sparkle/index.js.map +1 -0
- package/lib/es6/inner-components/sparkle/style/sparkle.shadow.css +31 -0
- package/lib/esm/components/badge/Badge.mjs +49 -0
- package/lib/esm/components/badge/badge.shadow.css +14 -0
- package/lib/esm/components/button/Button.mjs +106 -0
- package/lib/esm/components/button/button.shadow.css +76 -0
- package/lib/esm/components/checkbox/Checkbox.mjs +86 -0
- package/lib/esm/components/checkbox/checkbox.shadow.css +38 -0
- package/lib/esm/components/input/Input.mjs +65 -0
- package/lib/esm/components/input/input.shadow.css +41 -0
- package/lib/esm/components/notice/Notice.mjs +66 -0
- package/lib/esm/components/notice/notice.shadow.css +26 -0
- package/lib/esm/components/pills/Pills.mjs +117 -0
- package/lib/esm/components/pills/pills.shadow.css +57 -0
- package/lib/esm/components/radio/Radio.mjs +98 -0
- package/lib/esm/components/radio/radio.shadow.css +43 -0
- package/lib/esm/components/select/Select.mjs +49 -0
- package/lib/esm/components/switch/Switch.mjs +96 -0
- package/lib/esm/components/switch/switch.shadow.css +22 -0
- package/lib/esm/components/tab-line/TabLine.mjs +119 -0
- package/lib/esm/components/tab-line/tabLine.shadow.css +25 -0
- package/lib/esm/index.mjs +22 -0
- package/lib/esm/inner-components/button-trigger/ButtonTrigger.mjs +67 -0
- package/lib/esm/inner-components/button-trigger/buttonTrigger.shadow.css +57 -0
- package/lib/esm/inner-components/sparkle/AnimatedSparkles.mjs +19 -0
- package/lib/esm/inner-components/sparkle/Sparkle.mjs +57 -0
- package/lib/esm/inner-components/sparkle/style/sparkle.shadow.css +31 -0
- package/lib/types/components/badge/Badge.d.ts +3 -0
- package/lib/types/components/button/Button.d.ts +2 -0
- package/lib/types/components/button/Button.type.d.ts +8 -0
- package/lib/types/components/checkbox/Checkbox.d.ts +2 -0
- package/lib/types/components/checkbox/Checkbox.type.d.ts +8 -0
- package/lib/types/components/input/Input.d.ts +2 -0
- package/lib/types/components/notice/Notice.d.ts +3 -0
- package/lib/types/components/pills/Pills.d.ts +2 -0
- package/lib/types/components/pills/Pills.type.d.ts +13 -0
- package/lib/types/components/radio/Radio.d.ts +2 -0
- package/lib/types/components/radio/Radio.type.d.ts +9 -0
- package/lib/types/components/select/Select.d.ts +2 -0
- package/lib/types/components/switch/Switch.d.ts +2 -0
- package/lib/types/components/switch/Switch.type.d.ts +6 -0
- package/lib/types/components/tab-line/TabLine.d.ts +2 -0
- package/lib/types/components/tab-line/TabLine.type.d.ts +9 -0
- package/lib/types/index.d.ts +10 -0
- package/lib/types/inner-components/button-trigger/ButtonTrigger.d.ts +2 -0
- package/lib/types/inner-components/button-trigger/ButtonTrigger.type.d.ts +7 -0
- package/lib/types/inner-components/sparkle/AnimatedSparkles.d.ts +10 -0
- package/lib/types/inner-components/sparkle/Sparkle.d.ts +10 -0
- package/lib/types/inner-components/sparkle/index.d.ts +2 -0
- package/package.json +47 -0
- package/vite.config.ts +33 -0
|
@@ -0,0 +1,67 @@
|
|
|
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 _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
5
|
+
import _isNativeReflectConstruct from "@babel/runtime/helpers/esm/isNativeReflectConstruct";
|
|
6
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
7
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
8
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
9
|
+
import { createComponent, sstyled, assignProps, Component } from "@semcore/core";
|
|
10
|
+
import { ButtonTrigger } from "@semcore/base-trigger";
|
|
11
|
+
import SummaryAI from "@semcore/icon/SummaryAI/m";
|
|
12
|
+
import React from "react";
|
|
13
|
+
function _callSuper(t, o, e) {
|
|
14
|
+
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
15
|
+
}
|
|
16
|
+
/*!__reshadow-styles__:"./buttonTrigger.shadow.css"*/
|
|
17
|
+
var style = (
|
|
18
|
+
/*__reshadow_css_start__*/
|
|
19
|
+
(sstyled.insert(
|
|
20
|
+
/*__inner_css_start__*/
|
|
21
|
+
'.___SHighlightedButtonTrigger_17qw8_gg_:not(._state_invalid_17qw8_gg_):not(._state_valid_17qw8_gg_){border:1px solid transparent;background:linear-gradient(white,white) padding-box,var(--intergalactic-border-feature-highlight, linear-gradient(90deg, #c695ff, #2bb3ff)\n ) border-box;background-origin:border-box;background-clip:padding-box,border-box}@media (hover:hover){.___SHighlightedButtonTrigger_17qw8_gg_:not(._state_invalid_17qw8_gg_):not(._state_valid_17qw8_gg_):hover{background:var(--intergalactic-bg-primary-feature-highlight-hover-active, linear-gradient(90deg, #f9f2ff, #e9f7ff)) padding-box,var(--intergalactic-border-feature-highlight, linear-gradient(90deg, #c695ff, #2bb3ff)\n ) border-box}}.___SHighlightedButtonTrigger_17qw8_gg_.__active_17qw8_gg_:not(._state_invalid_17qw8_gg_):not(._state_valid_17qw8_gg_),.___SHighlightedButtonTrigger_17qw8_gg_:not(._state_invalid_17qw8_gg_):not(._state_valid_17qw8_gg_):active{background:linear-gradient(white,white) padding-box,var(--intergalactic-control-primary-feature-highlight-hover, linear-gradient(90deg, #8649e1, #006dca)) border-box;background-origin:border-box;background-clip:padding-box,border-box;border-color:transparent}.___SHighlightedButtonTrigger_17qw8_gg_:not(._state_invalid_17qw8_gg_):not(._state_valid_17qw8_gg_):focus-visible{outline:0;position:relative;border-color:transparent}.___SHighlightedButtonTrigger_17qw8_gg_:not(._state_invalid_17qw8_gg_):not(._state_valid_17qw8_gg_):focus-visible::before{content:"";position:absolute;z-index:-1;top:0;right:0;bottom:0;left:0;margin:-4px;padding:4px;border-radius:calc(var(--intergalactic-control-rounded, 6px) + 3px);background-image:var(--intergalactic-keyboard-focus-feature-highlight-outline, linear-gradient(90deg, rgba(171, 108, 254, 0.5), rgba(0, 143, 248, 0.5)));-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}.___SHighlightedButtonTrigger_17qw8_gg_._neighborLocation_left_17qw8_gg_:not(._state_invalid_17qw8_gg_):not(._state_valid_17qw8_gg_):focus-visible::before{border-top-left-radius:0;border-bottom-left-radius:0}.___SHighlightedButtonTrigger_17qw8_gg_._neighborLocation_right_17qw8_gg_:not(._state_invalid_17qw8_gg_):not(._state_valid_17qw8_gg_):focus-visible::before{border-top-right-radius:0;border-bottom-right-radius:0}.___SHighlightedButtonTrigger_17qw8_gg_._neighborLocation_both_17qw8_gg_:not(._state_invalid_17qw8_gg_):not(._state_valid_17qw8_gg_):focus-visible::before{border-radius:0}',
|
|
22
|
+
/*__inner_css_end__*/
|
|
23
|
+
"17qw8_gg_"
|
|
24
|
+
), /*__reshadow_css_end__*/
|
|
25
|
+
{
|
|
26
|
+
"__SHighlightedButtonTrigger": "___SHighlightedButtonTrigger_17qw8_gg_",
|
|
27
|
+
"_state_invalid": "_state_invalid_17qw8_gg_",
|
|
28
|
+
"_state_valid": "_state_valid_17qw8_gg_",
|
|
29
|
+
"_active": "__active_17qw8_gg_",
|
|
30
|
+
"_neighborLocation_left": "_neighborLocation_left_17qw8_gg_",
|
|
31
|
+
"_neighborLocation_right": "_neighborLocation_right_17qw8_gg_",
|
|
32
|
+
"_neighborLocation_both": "_neighborLocation_both_17qw8_gg_"
|
|
33
|
+
})
|
|
34
|
+
);
|
|
35
|
+
var ButtonTriggerFHRoot = /* @__PURE__ */ function(_Component) {
|
|
36
|
+
function ButtonTriggerFHRoot2() {
|
|
37
|
+
_classCallCheck(this, ButtonTriggerFHRoot2);
|
|
38
|
+
return _callSuper(this, ButtonTriggerFHRoot2, arguments);
|
|
39
|
+
}
|
|
40
|
+
_inherits(ButtonTriggerFHRoot2, _Component);
|
|
41
|
+
return _createClass(ButtonTriggerFHRoot2, [{
|
|
42
|
+
key: "render",
|
|
43
|
+
value: function render() {
|
|
44
|
+
var _ref = this.asProps, _ref3;
|
|
45
|
+
var styles = this.asProps.styles;
|
|
46
|
+
var SHighlightedButtonTrigger = ButtonTrigger;
|
|
47
|
+
return _ref3 = sstyled(styles), /* @__PURE__ */ React.createElement(SHighlightedButtonTrigger, _ref3.cn("SHighlightedButtonTrigger", _objectSpread({}, assignProps({}, _ref))));
|
|
48
|
+
}
|
|
49
|
+
}]);
|
|
50
|
+
}(Component);
|
|
51
|
+
_defineProperty(ButtonTriggerFHRoot, "displayName", "ButtonTriggerFH");
|
|
52
|
+
_defineProperty(ButtonTriggerFHRoot, "style", style);
|
|
53
|
+
function Addon(props) {
|
|
54
|
+
var _ref2 = arguments[0], _ref4;
|
|
55
|
+
var SAddon = ButtonTrigger.Addon;
|
|
56
|
+
var Children = props.Children, hasChildren = props.children;
|
|
57
|
+
return _ref4 = sstyled(props.styles), /* @__PURE__ */ React.createElement(SAddon, _ref4.cn("SAddon", _objectSpread({}, assignProps({}, _ref2))), hasChildren ? /* @__PURE__ */ React.createElement(Children, _ref4.cn("Children", {})) : /* @__PURE__ */ React.createElement(SummaryAI, _ref4.cn("SummaryAI", {
|
|
58
|
+
"color": "--intergalactic-icon-primary-feature-highlight"
|
|
59
|
+
})));
|
|
60
|
+
}
|
|
61
|
+
var ButtonTriggerFH = createComponent(ButtonTriggerFHRoot, {
|
|
62
|
+
Text: ButtonTrigger.Text,
|
|
63
|
+
Addon
|
|
64
|
+
});
|
|
65
|
+
export {
|
|
66
|
+
ButtonTriggerFH
|
|
67
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
SHighlightedButtonTrigger:not([state="invalid"]):not([state="valid"]) {
|
|
2
|
+
border: 1px solid transparent;
|
|
3
|
+
background:
|
|
4
|
+
linear-gradient(white, white) padding-box,
|
|
5
|
+
var(--intergalactic-border-feature-highlight, linear-gradient(90deg, #c695ff, #2bb3ff)
|
|
6
|
+
) border-box; /* border */
|
|
7
|
+
background-origin: border-box;
|
|
8
|
+
background-clip: padding-box, border-box;
|
|
9
|
+
|
|
10
|
+
&:hover {
|
|
11
|
+
background: var(--intergalactic-bg-primary-feature-highlight-hover-active, linear-gradient(90deg, #f9f2ff, #e9f7ff)) padding-box,
|
|
12
|
+
var(--intergalactic-border-feature-highlight, linear-gradient(90deg, #c695ff, #2bb3ff)
|
|
13
|
+
) border-box;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&:active,
|
|
17
|
+
&[active] {
|
|
18
|
+
background:
|
|
19
|
+
linear-gradient(white, white) padding-box,
|
|
20
|
+
var(--intergalactic-control-primary-feature-highlight-hover, linear-gradient(90deg, #8649e1, #006dca)) border-box;
|
|
21
|
+
background-origin: border-box;
|
|
22
|
+
background-clip: padding-box, border-box;
|
|
23
|
+
border-color: transparent;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
SHighlightedButtonTrigger:not([state="invalid"]):not([state="valid"]):focus-visible {
|
|
28
|
+
outline: none;
|
|
29
|
+
position: relative;
|
|
30
|
+
border-color: transparent;
|
|
31
|
+
|
|
32
|
+
&::before {
|
|
33
|
+
content: "";
|
|
34
|
+
position: absolute;
|
|
35
|
+
z-index: -1;
|
|
36
|
+
inset: 0;
|
|
37
|
+
margin: -4px;
|
|
38
|
+
padding: 4px;
|
|
39
|
+
border-radius: calc(var(--intergalactic-control-rounded, 6px) + 3px);
|
|
40
|
+
|
|
41
|
+
background-image: var(--intergalactic-keyboard-focus-feature-highlight-outline, linear-gradient(90deg, rgba(171, 108, 254, 0.5), rgba(0, 143, 248, 0.5)));
|
|
42
|
+
mask: linear-gradient(0deg, #fff, #fff) content-box, linear-gradient(0deg, #fff, #fff);
|
|
43
|
+
mask-composite: exclude;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&[neighborLocation='left']::before {
|
|
47
|
+
border-top-left-radius: 0;
|
|
48
|
+
border-bottom-left-radius: 0;
|
|
49
|
+
}
|
|
50
|
+
&[neighborLocation='right']::before {
|
|
51
|
+
border-top-right-radius: 0;
|
|
52
|
+
border-bottom-right-radius: 0;
|
|
53
|
+
}
|
|
54
|
+
&[neighborLocation='both']::before {
|
|
55
|
+
border-radius: 0;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import Sparkle from "./Sparkle.mjs";
|
|
4
|
+
function AnimatedSparkles(props) {
|
|
5
|
+
var count = props.count, curve = props.curve, show = props.show, top = props.top, left = props.left;
|
|
6
|
+
return show && count !== void 0 && _toConsumableArray(new Array(count)).map(function(_, index) {
|
|
7
|
+
return /* @__PURE__ */ React.createElement(Sparkle, {
|
|
8
|
+
key: index,
|
|
9
|
+
index,
|
|
10
|
+
num: count,
|
|
11
|
+
curve,
|
|
12
|
+
top,
|
|
13
|
+
left
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
AnimatedSparkles
|
|
19
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import { createBaseComponent, sstyled, assignProps } from "@semcore/core";
|
|
3
|
+
import React from "react";
|
|
4
|
+
/*!__reshadow-styles__:"./style/sparkle.shadow.css"*/
|
|
5
|
+
var styles = (
|
|
6
|
+
/*__reshadow_css_start__*/
|
|
7
|
+
(sstyled.insert(
|
|
8
|
+
/*__inner_css_start__*/
|
|
9
|
+
"@keyframes sparkles_10q33{50%{transform:rotate(calc(1deg*var(--angle_10q33))) translateY(200%) scale(var(--scale_10q33))}to{transform:rotate(calc(1deg*var(--angle_10q33))) translateY(200%) scale(0)}}.___SSparkle_10q33_gg_{position:absolute}.___SSparkle_10q33_gg_ path{fill:var(--intergalactic-icon-primary-feature-highlight, #8649e1)}.___SSparkle_10q33_gg_.__angle_10q33_gg_.__scale_10q33_gg_.__duration_10q33_gg_{transform:rotate(calc(1deg*var(--angle_10q33))) scale(var(--scale_10q33));animation-name:sparkles_10q33;animation-fill-mode:forwards;animation-duration:var(--duration_10q33)}.___SSparkle_10q33_gg_.__left_10q33_gg_{left:var(--left_10q33)}.___SSparkle_10q33_gg_.__top_10q33_gg_{top:var(--top_10q33)}",
|
|
10
|
+
/*__inner_css_end__*/
|
|
11
|
+
"10q33_gg_"
|
|
12
|
+
), /*__reshadow_css_end__*/
|
|
13
|
+
{
|
|
14
|
+
"__SSparkle": "___SSparkle_10q33_gg_",
|
|
15
|
+
"_angle": "__angle_10q33_gg_",
|
|
16
|
+
"_scale": "__scale_10q33_gg_",
|
|
17
|
+
"_duration": "__duration_10q33_gg_",
|
|
18
|
+
"--angle": "--angle_10q33",
|
|
19
|
+
"--scale": "--scale_10q33",
|
|
20
|
+
"--duration": "--duration_10q33",
|
|
21
|
+
"@sparkles": "sparkles_10q33",
|
|
22
|
+
"_left": "__left_10q33_gg_",
|
|
23
|
+
"--left": "--left_10q33",
|
|
24
|
+
"_top": "__top_10q33_gg_",
|
|
25
|
+
"--top": "--top_10q33"
|
|
26
|
+
})
|
|
27
|
+
);
|
|
28
|
+
function SvgSparkle(props) {
|
|
29
|
+
var _ref = arguments[0], _ref2;
|
|
30
|
+
var SSparkle = "svg";
|
|
31
|
+
var num = props.num, index = props.index, curve = props.curve, left = props.left;
|
|
32
|
+
var rand = Math.floor(Math.random() * 50);
|
|
33
|
+
var angle = 360 / num * index + rand;
|
|
34
|
+
var sin = Math.sin(Math.PI * angle / 180);
|
|
35
|
+
var x = curve ? Math.trunc(sin * -1 * curve) : 0;
|
|
36
|
+
var odd = index % 2;
|
|
37
|
+
var scale = 1 - odd * 0.3;
|
|
38
|
+
var animationDuration = "".concat(0.6 - odd * 0.2, "s");
|
|
39
|
+
return _ref2 = sstyled(styles), /* @__PURE__ */ React.createElement(SSparkle, _ref2.cn("SSparkle", _objectSpread({}, assignProps({
|
|
40
|
+
"aria-hidden": true,
|
|
41
|
+
"use:left": x ? "".concat(x + 14, "px") : left,
|
|
42
|
+
"scale": scale,
|
|
43
|
+
"duration": animationDuration,
|
|
44
|
+
"angle": angle,
|
|
45
|
+
"width": "10",
|
|
46
|
+
"height": "10",
|
|
47
|
+
"viewBox": "0 0 10 10",
|
|
48
|
+
"fill": "none",
|
|
49
|
+
"xmlns": "http://www.w3.org/2000/svg"
|
|
50
|
+
}, _ref))), /* @__PURE__ */ React.createElement("path", _ref2.cn("path", {
|
|
51
|
+
"d": "M5.371.269a.39.39 0 0 0-.742 0L3.704 3.08a.977.977 0 0 1-.623.623L.27 4.629a.39.39 0 0 0 0 .742l2.812.925a.977.977 0 0 1 .623.623l.925 2.812a.39.39 0 0 0 .742 0l.925-2.812a.977.977 0 0 1 .623-.623l2.812-.925a.39.39 0 0 0 0-.742L6.92 3.704a.977.977 0 0 1-.623-.623L5.371.27Z"
|
|
52
|
+
})));
|
|
53
|
+
}
|
|
54
|
+
const Sparkle = createBaseComponent(SvgSparkle);
|
|
55
|
+
export {
|
|
56
|
+
Sparkle as default
|
|
57
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
SSparkle {
|
|
2
|
+
position: absolute;
|
|
3
|
+
|
|
4
|
+
& path {
|
|
5
|
+
fill: var(--intergalactic-icon-primary-feature-highlight, #8649e1);
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
SSparkle[angle][scale][duration] {
|
|
10
|
+
transform: rotate(calc(1deg * var(--angle))) scale(var(--scale));
|
|
11
|
+
|
|
12
|
+
animation-name: sparkles;
|
|
13
|
+
animation-fill-mode: forwards;
|
|
14
|
+
animation-duration: var(--duration);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@keyframes sparkles {
|
|
18
|
+
50% {
|
|
19
|
+
transform: rotate(calc(1deg * var(--angle))) translateY(200%)
|
|
20
|
+
scale(var(--scale));
|
|
21
|
+
}
|
|
22
|
+
100% {
|
|
23
|
+
transform: rotate(calc(1deg * var(--angle))) translateY(200%) scale(0);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
SSparkle[left] {
|
|
27
|
+
left: var(--left);
|
|
28
|
+
}
|
|
29
|
+
SSparkle[top] {
|
|
30
|
+
top: var(--top);
|
|
31
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ButtonAddonProps, ButtonComponent } from '@semcore/button';
|
|
2
|
+
import type { Intergalactic } from '@semcore/core';
|
|
3
|
+
export type HighLightedButtonAddonProps = ButtonAddonProps & {
|
|
4
|
+
animatedSparkleCount?: number;
|
|
5
|
+
};
|
|
6
|
+
export type HighlightedButtonComponent = ButtonComponent & {
|
|
7
|
+
Addon: Intergalactic.Component<'div', HighLightedButtonAddonProps>;
|
|
8
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CheckboxContext, CheckboxProps, CheckboxTextProps, CheckboxValueProps } from '@semcore/checkbox';
|
|
2
|
+
import type { Intergalactic } from '@semcore/core';
|
|
3
|
+
import type { AnimatedSparklesProps } from '../../inner-components/sparkle/AnimatedSparkles';
|
|
4
|
+
export type HighlightedCheckboxComponent = Intergalactic.Component<'label', CheckboxProps, CheckboxContext> & {
|
|
5
|
+
Text: Intergalactic.Component<'span', CheckboxTextProps>;
|
|
6
|
+
Value: Intergalactic.Component<'input', CheckboxValueProps>;
|
|
7
|
+
AnimatedSparkles: Intergalactic.Component<'div', AnimatedSparklesProps>;
|
|
8
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Box } from '@semcore/base-components';
|
|
2
|
+
import type { Intergalactic } from '@semcore/core';
|
|
3
|
+
import type Pills from '@semcore/pills';
|
|
4
|
+
import type { PillProps } from '@semcore/pills';
|
|
5
|
+
export type HighlightedItemAddonProps = {
|
|
6
|
+
animatedSparkleCount?: number;
|
|
7
|
+
};
|
|
8
|
+
export type HighlightedPillComponent = typeof Pills & {
|
|
9
|
+
HighlightedItem: Intergalactic.Component<'div', PillProps> & {
|
|
10
|
+
Text: typeof Box;
|
|
11
|
+
Addon: Intergalactic.Component<'div', HighlightedItemAddonProps>;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Intergalactic } from '@semcore/core';
|
|
2
|
+
import type { RadioCtx, RadioProps, RadioValueProps } from '@semcore/radio';
|
|
3
|
+
import type { Text } from '@semcore/typography';
|
|
4
|
+
import type { AnimatedSparklesProps } from '../../inner-components/sparkle/AnimatedSparkles';
|
|
5
|
+
export type HighlightedRadioComponent = Intergalactic.Component<'label', RadioProps, RadioCtx> & {
|
|
6
|
+
Value: Intergalactic.Component<'input', RadioValueProps>;
|
|
7
|
+
Text: typeof Text;
|
|
8
|
+
AnimatedSparkles: Intergalactic.Component<'div', AnimatedSparklesProps>;
|
|
9
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Intergalactic } from '@semcore/core';
|
|
2
|
+
import type Switch from '@semcore/switch';
|
|
3
|
+
import type { AnimatedSparklesProps } from '../../inner-components/sparkle/AnimatedSparkles';
|
|
4
|
+
export type HighlightedSwitchComponent = typeof Switch & {
|
|
5
|
+
AnimatedSparkles: Intergalactic.Component<'div', AnimatedSparklesProps>;
|
|
6
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Intergalactic } from '@semcore/core';
|
|
2
|
+
import type TabLine from '@semcore/tab-line';
|
|
3
|
+
export type HighlightedTabLineComponent = typeof TabLine & {
|
|
4
|
+
HighlightedItem: typeof TabLine.Item & {
|
|
5
|
+
Addon: Intergalactic.Component<'div', {
|
|
6
|
+
animatedSparkleCount?: number;
|
|
7
|
+
}>;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './components/button/Button';
|
|
2
|
+
export * from './components/pills/Pills';
|
|
3
|
+
export * from './components/select/Select';
|
|
4
|
+
export * from './components/input/Input';
|
|
5
|
+
export * from './components/switch/Switch';
|
|
6
|
+
export * from './components/tab-line/TabLine';
|
|
7
|
+
export * from './components/notice/Notice';
|
|
8
|
+
export * from './components/badge/Badge';
|
|
9
|
+
export * from './components/radio/Radio';
|
|
10
|
+
export * from './components/checkbox/Checkbox';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ButtonTriggerProps } from '@semcore/base-trigger';
|
|
2
|
+
import type BaseTrigger from '@semcore/base-trigger';
|
|
3
|
+
import type { Intergalactic } from '@semcore/core';
|
|
4
|
+
export type HighlightedButtonTriggerComponent = Intergalactic.Component<'div', ButtonTriggerProps> & {
|
|
5
|
+
Text: typeof BaseTrigger.Text;
|
|
6
|
+
Addon: typeof BaseTrigger.Addon;
|
|
7
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type AnimatedSparklesProps = {
|
|
3
|
+
count?: number;
|
|
4
|
+
curve?: number;
|
|
5
|
+
top?: string;
|
|
6
|
+
left?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function AnimatedSparkles(props: AnimatedSparklesProps & {
|
|
9
|
+
show: boolean;
|
|
10
|
+
}): false | React.JSX.Element[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Intergalactic } from '@semcore/core';
|
|
2
|
+
type SparkleProps = {
|
|
3
|
+
index: number;
|
|
4
|
+
num: number;
|
|
5
|
+
curve?: number;
|
|
6
|
+
top?: string;
|
|
7
|
+
left?: string;
|
|
8
|
+
};
|
|
9
|
+
declare const _default: Intergalactic.Component<"svg", SparkleProps>;
|
|
10
|
+
export default _default;
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@semcore/feature-highlight",
|
|
3
|
+
"description": "Semrush toolkit for accent features",
|
|
4
|
+
"version": "16.0.1-prerelease.0",
|
|
5
|
+
"main": "lib/cjs/index.js",
|
|
6
|
+
"module": "lib/esm/index.mjs",
|
|
7
|
+
"typings": "lib/types/index.d.ts",
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"author": "UI-kit team <ui-kit-team@semrush.com>",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"require": "./lib/cjs/index.js",
|
|
14
|
+
"import": "./lib/esm/index.mjs",
|
|
15
|
+
"types": "./lib/types/index.d.ts"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@semcore/badge": "^16.0.0",
|
|
20
|
+
"@semcore/base-trigger": "^16.2.3-prerelease.0",
|
|
21
|
+
"@semcore/button": "^16.0.4-prerelease.0",
|
|
22
|
+
"@semcore/checkbox": "^16.0.4-prerelease.0",
|
|
23
|
+
"@semcore/input": "^16.0.4-prerelease.0",
|
|
24
|
+
"@semcore/notice": "^16.1.4-prerelease.0",
|
|
25
|
+
"@semcore/pills": "^16.0.4-prerelease.0",
|
|
26
|
+
"@semcore/radio": "^16.0.4-prerelease.0",
|
|
27
|
+
"@semcore/select": "^16.1.4-prerelease.0",
|
|
28
|
+
"@semcore/switch": "^16.0.4-prerelease.0",
|
|
29
|
+
"@semcore/tab-line": "^16.0.4-prerelease.0",
|
|
30
|
+
"@semcore/typography": "^16.1.4-prerelease.0"
|
|
31
|
+
},
|
|
32
|
+
"peerDependencies": {
|
|
33
|
+
"@semcore/base-components": "^16.1.1-prerelease.0"
|
|
34
|
+
},
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "https://github.com/semrush/intergalactic.git",
|
|
38
|
+
"directory": "semcore/feature-highlight"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@semcore/testing-utils": "1.0.0",
|
|
42
|
+
"@semcore/base-components": "16.1.1-prerelease.0"
|
|
43
|
+
},
|
|
44
|
+
"scripts": {
|
|
45
|
+
"build": "pnpm semcore-builder && pnpm vite build"
|
|
46
|
+
}
|
|
47
|
+
}
|
package/vite.config.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import copy from 'rollup-plugin-copy';
|
|
2
|
+
import { defineConfig, mergeConfig } from 'vite';
|
|
3
|
+
|
|
4
|
+
import viteConfig from '../../commonVite.config';
|
|
5
|
+
|
|
6
|
+
export default mergeConfig(
|
|
7
|
+
viteConfig,
|
|
8
|
+
defineConfig({
|
|
9
|
+
build: {
|
|
10
|
+
lib: {
|
|
11
|
+
entry: './src/index.ts',
|
|
12
|
+
},
|
|
13
|
+
rollupOptions: {
|
|
14
|
+
external: [
|
|
15
|
+
'react',
|
|
16
|
+
'react-dom',
|
|
17
|
+
'react/jsx-runtime',
|
|
18
|
+
/@babel\/runtime\/*/,
|
|
19
|
+
/@semcore\/*/,
|
|
20
|
+
],
|
|
21
|
+
plugins: [
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
copy({
|
|
24
|
+
targets: [
|
|
25
|
+
{ src: 'src/theme/**/*.css', dest: 'lib/esm' },
|
|
26
|
+
],
|
|
27
|
+
flatten: false,
|
|
28
|
+
}),
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
}),
|
|
33
|
+
);
|