@semcore/feature-highlight 16.3.0 → 17.0.0-prerelease.18
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 +6 -0
- package/lib/cjs/components/badge/Badge.js +31 -27
- package/lib/cjs/components/badge/Badge.js.map +1 -1
- package/lib/cjs/components/badge/badge.shadow.css +6 -0
- package/lib/cjs/components/button/Button.js +59 -69
- package/lib/cjs/components/button/Button.js.map +1 -1
- package/lib/cjs/components/checkbox/Checkbox.js +48 -64
- package/lib/cjs/components/checkbox/Checkbox.js.map +1 -1
- package/lib/cjs/components/input/Input.js +27 -36
- package/lib/cjs/components/input/Input.js.map +1 -1
- package/lib/cjs/components/notice/Notice.js +64 -77
- package/lib/cjs/components/notice/Notice.js.map +1 -1
- package/lib/cjs/components/pills/Pills.js +59 -81
- package/lib/cjs/components/pills/Pills.js.map +1 -1
- package/lib/cjs/components/radio/Radio.js +55 -70
- package/lib/cjs/components/radio/Radio.js.map +1 -1
- package/lib/cjs/components/select/Select.js +18 -28
- package/lib/cjs/components/select/Select.js.map +1 -1
- package/lib/cjs/components/switch/Switch.js +52 -67
- package/lib/cjs/components/switch/Switch.js.map +1 -1
- package/lib/cjs/components/tab-line/TabLine.js +58 -80
- package/lib/cjs/components/tab-line/TabLine.js.map +1 -1
- package/lib/cjs/index.js +10 -10
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/inner-components/button-trigger/ButtonTrigger.js +33 -38
- package/lib/cjs/inner-components/button-trigger/ButtonTrigger.js.map +1 -1
- package/lib/cjs/inner-components/sparkle/AnimatedSparkles.js +10 -9
- package/lib/cjs/inner-components/sparkle/AnimatedSparkles.js.map +1 -1
- package/lib/cjs/inner-components/sparkle/Sparkle.js +45 -42
- package/lib/cjs/inner-components/sparkle/Sparkle.js.map +1 -1
- package/lib/cjs/inner-components/sparkle/index.js +3 -3
- package/lib/es6/components/badge/Badge.js +28 -24
- package/lib/es6/components/badge/Badge.js.map +1 -1
- package/lib/es6/components/badge/badge.shadow.css +6 -0
- package/lib/es6/components/button/Button.js +54 -64
- package/lib/es6/components/button/Button.js.map +1 -1
- package/lib/es6/components/checkbox/Checkbox.js +44 -60
- package/lib/es6/components/checkbox/Checkbox.js.map +1 -1
- package/lib/es6/components/input/Input.js +22 -31
- package/lib/es6/components/input/Input.js.map +1 -1
- package/lib/es6/components/notice/Notice.js +56 -69
- package/lib/es6/components/notice/Notice.js.map +1 -1
- package/lib/es6/components/pills/Pills.js +50 -72
- package/lib/es6/components/pills/Pills.js.map +1 -1
- package/lib/es6/components/radio/Radio.js +49 -64
- package/lib/es6/components/radio/Radio.js.map +1 -1
- package/lib/es6/components/select/Select.js +10 -20
- package/lib/es6/components/select/Select.js.map +1 -1
- package/lib/es6/components/switch/Switch.js +49 -64
- package/lib/es6/components/switch/Switch.js.map +1 -1
- package/lib/es6/components/tab-line/TabLine.js +47 -69
- package/lib/es6/components/tab-line/TabLine.js.map +1 -1
- package/lib/es6/inner-components/button-trigger/ButtonTrigger.js +30 -35
- package/lib/es6/inner-components/button-trigger/ButtonTrigger.js.map +1 -1
- package/lib/es6/inner-components/sparkle/AnimatedSparkles.js +8 -7
- package/lib/es6/inner-components/sparkle/AnimatedSparkles.js.map +1 -1
- package/lib/es6/inner-components/sparkle/Sparkle.js +42 -39
- package/lib/es6/inner-components/sparkle/Sparkle.js.map +1 -1
- package/lib/esm/components/badge/Badge.mjs +30 -26
- package/lib/esm/components/badge/badge.shadow.css +6 -0
- package/lib/esm/components/button/Button.mjs +56 -63
- package/lib/esm/components/checkbox/Checkbox.mjs +46 -58
- package/lib/esm/components/input/Input.mjs +24 -32
- package/lib/esm/components/notice/Notice.mjs +58 -59
- package/lib/esm/components/pills/Pills.mjs +52 -71
- package/lib/esm/components/radio/Radio.mjs +51 -62
- package/lib/esm/components/select/Select.mjs +11 -20
- package/lib/esm/components/switch/Switch.mjs +51 -65
- package/lib/esm/components/tab-line/TabLine.mjs +49 -68
- package/lib/esm/inner-components/button-trigger/ButtonTrigger.mjs +31 -35
- package/lib/esm/inner-components/sparkle/AnimatedSparkles.mjs +8 -3
- package/lib/esm/inner-components/sparkle/Sparkle.mjs +44 -38
- package/lib/types/components/badge/Badge.d.ts +11 -3
- package/lib/types/inner-components/sparkle/Sparkle.d.ts +1 -2
- package/package.json +17 -16
|
@@ -1,77 +1,65 @@
|
|
|
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 _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
7
|
-
import { createComponent, sstyled, assignProps
|
|
2
|
+
import { createComponent, Component, sstyled, assignProps } from "@semcore/core";
|
|
8
3
|
import Checkbox from "@semcore/checkbox";
|
|
9
4
|
import React from "react";
|
|
10
5
|
import { AnimatedSparkles } from "../../inner-components/sparkle/AnimatedSparkles.mjs";
|
|
11
6
|
/*!__reshadow-styles__:"./checkbox.shadow.css"*/
|
|
12
|
-
|
|
7
|
+
const style = (
|
|
13
8
|
/*__reshadow_css_start__*/
|
|
14
9
|
(sstyled.insert(
|
|
15
10
|
/*__inner_css_start__*/
|
|
16
|
-
'.
|
|
11
|
+
'.___SHighlightedCheckbox_q9m7q_gg_:not(._state_invalid_q9m7q_gg_) [data-ui-name="Value.CheckMark"]{border:1px solid transparent;border-radius:var(--intergalactic-addon-rounded, 4px);background:linear-gradient(white,white) padding-box,var(--intergalactic-border-feature-highlight, linear-gradient(90deg, #c695ff, #2bb3ff)) border-box;background-origin:border-box;background-clip:padding-box,border-box}.___SHighlightedCheckbox_q9m7q_gg_:not(._state_invalid_q9m7q_gg_) input[data-ui-name="CheckboxFH.Value"]:checked+[data-ui-name="Value.CheckMark"]{border-color:transparent;background:var(--intergalactic-border-feature-highlight-active, linear-gradient(90deg, #ab6cfe, #008ff8)) padding-box,var(--intergalactic-border-feature-highlight-active, linear-gradient(90deg, #ab6cfe, #008ff8)) border-box}.___SHighlightedCheckbox_q9m7q_gg_:not(._state_invalid_q9m7q_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:transparent;pointer-events:none;background:linear-gradient(white,white) padding-box,var(--intergalactic-border-feature-highlight, linear-gradient(90deg, #c695ff, #2bb3ff)) 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}.___SHighlightedCheckbox_q9m7q_gg_:not(._state_invalid_q9m7q_gg_) input[data-ui-name="CheckboxFH.Value"]:checked:not(:focus-visible)+[data-ui-name="Value.CheckMark"]::before{opacity:0;transform:scale(.9)}.___SHighlightedCheckbox_q9m7q_gg_:not(._state_invalid_q9m7q_gg_) input[data-ui-name="CheckboxFH.Value"]:focus-visible+[data-ui-name="Value.CheckMark"]::before{opacity:1;transform:scale(1)}.___SHighlightedCheckbox_q9m7q_gg_:not(._state_invalid_q9m7q_gg_) input[data-ui-name="CheckboxFH.Value"]:checked:focus-visible+[data-ui-name="Value.CheckMark"]::before{border-color:transparent;background:linear-gradient(white,white) padding-box,var(--intergalactic-border-feature-highlight-active, linear-gradient(90deg, #ab6cfe, #008ff8)) border-box}',
|
|
17
12
|
/*__inner_css_end__*/
|
|
18
|
-
"
|
|
13
|
+
"q9m7q_gg_"
|
|
19
14
|
), /*__reshadow_css_end__*/
|
|
20
15
|
{
|
|
21
|
-
"__SHighlightedCheckbox": "
|
|
22
|
-
"_state_invalid": "
|
|
16
|
+
"__SHighlightedCheckbox": "___SHighlightedCheckbox_q9m7q_gg_",
|
|
17
|
+
"_state_invalid": "_state_invalid_q9m7q_gg_"
|
|
23
18
|
})
|
|
24
19
|
);
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
30
|
-
args[_key] = arguments[_key];
|
|
31
|
-
}
|
|
32
|
-
_this = _callSuper(this, CheckboxFHRoot2, [].concat(args));
|
|
33
|
-
_defineProperty(_this, "inputRef", /* @__PURE__ */ React.createRef());
|
|
34
|
-
return _this;
|
|
20
|
+
class CheckboxFHRoot extends Component {
|
|
21
|
+
constructor(...args) {
|
|
22
|
+
super(...args);
|
|
23
|
+
_defineProperty(this, "inputRef", /* @__PURE__ */ React.createRef());
|
|
35
24
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
})(Component);
|
|
25
|
+
getValueProps() {
|
|
26
|
+
return {
|
|
27
|
+
ref: this.inputRef,
|
|
28
|
+
onChange: () => {
|
|
29
|
+
setTimeout(() => {
|
|
30
|
+
this.forceUpdate();
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
getAnimatedSparklesProps() {
|
|
36
|
+
var _a;
|
|
37
|
+
const {
|
|
38
|
+
size
|
|
39
|
+
} = this.asProps;
|
|
40
|
+
const checked = (_a = this.inputRef.current) == null ? void 0 : _a.checked;
|
|
41
|
+
return {
|
|
42
|
+
show: checked,
|
|
43
|
+
top: size === "l" ? "7px" : "5px",
|
|
44
|
+
left: size === "l" ? "5px" : "3px"
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
render() {
|
|
48
|
+
var _ref = this.asProps, _ref2;
|
|
49
|
+
const SHighlightedCheckbox = Checkbox;
|
|
50
|
+
const {
|
|
51
|
+
styles,
|
|
52
|
+
Children,
|
|
53
|
+
children: hasChildren
|
|
54
|
+
} = this.asProps;
|
|
55
|
+
return _ref2 = sstyled(styles), /* @__PURE__ */ React.createElement(SHighlightedCheckbox, _ref2.cn("SHighlightedCheckbox", {
|
|
56
|
+
...assignProps({}, _ref)
|
|
57
|
+
}), hasChildren ? /* @__PURE__ */ React.createElement(Children, _ref2.cn("Children", {})) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(CheckboxFH.Value, null), /* @__PURE__ */ React.createElement(CheckboxFH.Text, null)));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
72
60
|
_defineProperty(CheckboxFHRoot, "displayName", "CheckboxFH");
|
|
73
61
|
_defineProperty(CheckboxFHRoot, "style", style);
|
|
74
|
-
|
|
62
|
+
const CheckboxFH = createComponent(CheckboxFHRoot, {
|
|
75
63
|
Text: Checkbox.Text,
|
|
76
64
|
Value: Checkbox.Value,
|
|
77
65
|
AnimatedSparkles
|
|
@@ -1,57 +1,49 @@
|
|
|
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 _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
7
|
-
import { createComponent, sstyled, assignProps
|
|
2
|
+
import { createComponent, Component, sstyled, assignProps } from "@semcore/core";
|
|
8
3
|
import SummaryAI from "@semcore/icon/SummaryAI/m";
|
|
9
4
|
import Input from "@semcore/input";
|
|
10
5
|
import React from "react";
|
|
11
6
|
/*!__reshadow-styles__:"./input.shadow.css"*/
|
|
12
|
-
|
|
7
|
+
const style = (
|
|
13
8
|
/*__reshadow_css_start__*/
|
|
14
9
|
(sstyled.insert(
|
|
15
10
|
/*__inner_css_start__*/
|
|
16
|
-
'.
|
|
11
|
+
'.___SHighlightedInput_1l7wj_gg_._state_normal_1l7wj_gg_ .___SOutline_1l7wj_gg_{background:linear-gradient(white,white) padding-box,var(--intergalactic-border-feature-highlight, linear-gradient(90deg, #c695ff, #2bb3ff)) border-box;background-origin:border-box;background-clip:padding-box,border-box;border-color:transparent}.___SHighlightedInput_1l7wj_gg_._state_normal_1l7wj_gg_ .___SOutline_1l7wj_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, #ab6cfe, #008ff8));-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}.___SHighlightedInput_1l7wj_gg_._state_normal_1l7wj_gg_:has(.___SValue_1l7wj_gg_:focus-visible) .___SOutline_1l7wj_gg_{outline:0}.___SHighlightedInput_1l7wj_gg_._state_normal_1l7wj_gg_:has(.___SValue_1l7wj_gg_:focus-visible) .___SOutline_1l7wj_gg_::before{opacity:1}.___SHighlightedInput_1l7wj_gg_._state_normal_1l7wj_gg_._neighborLocation_left_1l7wj_gg_ .___SOutline_1l7wj_gg_::before{border-top-left-radius:0;border-bottom-left-radius:0}.___SHighlightedInput_1l7wj_gg_._state_normal_1l7wj_gg_._neighborLocation_right_1l7wj_gg_ .___SOutline_1l7wj_gg_::before{border-top-right-radius:0;border-bottom-right-radius:0}.___SHighlightedInput_1l7wj_gg_._state_normal_1l7wj_gg_._neighborLocation_both_1l7wj_gg_ .___SOutline_1l7wj_gg_::before{border-radius:0}@supports not (-webkit-mask-composite:xor){.___SHighlightedInput_1l7wj_gg_._state_normal_1l7wj_gg_:has(.___SValue_1l7wj_gg_:focus-visible) .___SOutline_1l7wj_gg_{outline:0;border-color:#7078fc;box-shadow:0 0 0 0#fff,0 0 0 2px #7078fc}.___SHighlightedInput_1l7wj_gg_._state_normal_1l7wj_gg_:has(.___SValue_1l7wj_gg_:focus-visible) .___SOutline_1l7wj_gg_::before{display:none}}',
|
|
17
12
|
/*__inner_css_end__*/
|
|
18
|
-
"
|
|
13
|
+
"1l7wj_gg_"
|
|
19
14
|
), /*__reshadow_css_end__*/
|
|
20
15
|
{
|
|
21
|
-
"__SHighlightedInput": "
|
|
22
|
-
"_state_normal": "
|
|
23
|
-
"__SValue": "
|
|
24
|
-
"__SOutline": "
|
|
25
|
-
"_neighborLocation_left": "
|
|
26
|
-
"_neighborLocation_right": "
|
|
27
|
-
"_neighborLocation_both": "
|
|
16
|
+
"__SHighlightedInput": "___SHighlightedInput_1l7wj_gg_",
|
|
17
|
+
"_state_normal": "_state_normal_1l7wj_gg_",
|
|
18
|
+
"__SValue": "___SValue_1l7wj_gg_",
|
|
19
|
+
"__SOutline": "___SOutline_1l7wj_gg_",
|
|
20
|
+
"_neighborLocation_left": "_neighborLocation_left_1l7wj_gg_",
|
|
21
|
+
"_neighborLocation_right": "_neighborLocation_right_1l7wj_gg_",
|
|
22
|
+
"_neighborLocation_both": "_neighborLocation_both_1l7wj_gg_"
|
|
28
23
|
})
|
|
29
24
|
);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
25
|
+
class InputFHRoot extends Component {
|
|
26
|
+
render() {
|
|
27
|
+
var _ref = this.asProps, _ref3;
|
|
28
|
+
const SHighlightedInput = Input;
|
|
29
|
+
return _ref3 = sstyled(this.asProps.styles), /* @__PURE__ */ React.createElement(SHighlightedInput, _ref3.cn("SHighlightedInput", {
|
|
30
|
+
...assignProps({}, _ref)
|
|
31
|
+
}));
|
|
34
32
|
}
|
|
35
|
-
|
|
36
|
-
return _createClass(InputFHRoot2, [{
|
|
37
|
-
key: "render",
|
|
38
|
-
value: function render() {
|
|
39
|
-
var _ref = this.asProps, _ref3;
|
|
40
|
-
var SHighlightedInput = Input;
|
|
41
|
-
return _ref3 = sstyled(this.asProps.styles), /* @__PURE__ */ React.createElement(SHighlightedInput, _ref3.cn("SHighlightedInput", _objectSpread({}, assignProps({}, _ref))));
|
|
42
|
-
}
|
|
43
|
-
}]);
|
|
44
|
-
})(Component);
|
|
33
|
+
}
|
|
45
34
|
_defineProperty(InputFHRoot, "displayName", "InputFH");
|
|
46
35
|
_defineProperty(InputFHRoot, "style", style);
|
|
47
36
|
function HighlightAddon(props) {
|
|
48
37
|
var _ref2 = arguments[0];
|
|
49
|
-
|
|
38
|
+
const {
|
|
39
|
+
Children,
|
|
40
|
+
children: hasChildren
|
|
41
|
+
} = props;
|
|
50
42
|
return /* @__PURE__ */ React.createElement(Input.Addon, assignProps({}, _ref2), hasChildren ? /* @__PURE__ */ React.createElement(Children, null) : /* @__PURE__ */ React.createElement(SummaryAI, {
|
|
51
43
|
color: "--intergalactic-icon-primary-feature-highlight"
|
|
52
44
|
}));
|
|
53
45
|
}
|
|
54
|
-
|
|
46
|
+
const InputFH = createComponent(InputFHRoot, {
|
|
55
47
|
Addon: HighlightAddon,
|
|
56
48
|
Value: Input.Value
|
|
57
49
|
});
|
|
@@ -1,87 +1,86 @@
|
|
|
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 _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
7
|
-
import { createComponent, sstyled, assignProps
|
|
2
|
+
import { createComponent, Component, sstyled, assignProps } from "@semcore/core";
|
|
8
3
|
import { isAdvanceMode } from "@semcore/core/lib/utils/findComponent";
|
|
9
4
|
import isNode from "@semcore/core/lib/utils/isNode";
|
|
10
5
|
import Notice from "@semcore/notice";
|
|
11
6
|
import React from "react";
|
|
12
7
|
/*!__reshadow-styles__:"./notice.shadow.css"*/
|
|
13
|
-
|
|
8
|
+
const style = (
|
|
14
9
|
/*__reshadow_css_start__*/
|
|
15
10
|
(sstyled.insert(
|
|
16
11
|
/*__inner_css_start__*/
|
|
17
|
-
'.
|
|
12
|
+
'.___SHighlightedNotice_1agzh_gg_.__beforeVisibility_1agzh_gg_{background-image:var(--intergalactic-bg-secondary-feature-highlight, linear-gradient(90deg, #f9f2ff, #e9f7ff));border-color:transparent;background-clip:padding-box;position:relative}.___SHighlightedNotice_1agzh_gg_.__beforeVisibility_1agzh_gg_:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1;margin:-1px;border-radius:inherit;visibility:var(--beforeVisibility_1agzh);background:var(--intergalactic-border-feature-highlight, linear-gradient(90deg, #c695ff, #2bb3ff)\n ) border-box,var(--intergalactic-border-feature-highlight-active, linear-gradient(90deg, #ab6cfe, #008ff8)) padding-box}.___SHighlightedNotice_1agzh_gg_.__beforeVisibility_1agzh_gg_ .___SLabel_1agzh_gg_{color:var(--intergalactic-icon-primary-feature-highlight, #8649e1)}.___SHighlightedNotice_1agzh_gg_.__beforeVisibility_1agzh_gg_ .___SCloseIcon_1agzh_gg_{color:var(--intergalactic-icon-primary-neutral, #6c6e79)}@media (hover:hover){.___SHighlightedNotice_1agzh_gg_.__beforeVisibility_1agzh_gg_ .___SCloseIcon_1agzh_gg_:hover{color:var(--intergalactic-icon-primary-neutral-hover-active, #565861)}}',
|
|
18
13
|
/*__inner_css_end__*/
|
|
19
|
-
"
|
|
14
|
+
"1agzh_gg_"
|
|
20
15
|
), /*__reshadow_css_end__*/
|
|
21
16
|
{
|
|
22
|
-
"__SHighlightedNotice": "
|
|
23
|
-
"_beforeVisibility": "
|
|
24
|
-
"--beforeVisibility": "--
|
|
25
|
-
"__SLabel": "
|
|
26
|
-
"__SCloseIcon": "
|
|
17
|
+
"__SHighlightedNotice": "___SHighlightedNotice_1agzh_gg_",
|
|
18
|
+
"_beforeVisibility": "__beforeVisibility_1agzh_gg_",
|
|
19
|
+
"--beforeVisibility": "--beforeVisibility_1agzh",
|
|
20
|
+
"__SLabel": "___SLabel_1agzh_gg_",
|
|
21
|
+
"__SCloseIcon": "___SCloseIcon_1agzh_gg_"
|
|
27
22
|
})
|
|
28
23
|
);
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
if (typeof Children.origin === "string") {
|
|
41
|
-
textContent = isNode(title) || isNode(label) || closable ? /* @__PURE__ */ React.createElement(Notice.Text, null, /* @__PURE__ */ React.createElement(Children, null)) : /* @__PURE__ */ React.createElement(Children, null);
|
|
42
|
-
}
|
|
43
|
-
return textContent;
|
|
44
|
-
}
|
|
45
|
-
}, {
|
|
46
|
-
key: "renderSmartMode",
|
|
47
|
-
value: function renderSmartMode() {
|
|
48
|
-
var _this$asProps2 = this.asProps, label = _this$asProps2.label, title = _this$asProps2.title, actions = _this$asProps2.actions, closable = _this$asProps2.closable, onClose = _this$asProps2.onClose;
|
|
49
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, isNode(label) && /* @__PURE__ */ React.createElement(Notice.Label, null, label), /* @__PURE__ */ React.createElement(Notice.Content, null, isNode(title) && /* @__PURE__ */ React.createElement(Notice.Title, null, title), this.renderContent(), isNode(actions) && /* @__PURE__ */ React.createElement(Notice.Actions, null, actions)), closable && /* @__PURE__ */ React.createElement(Notice.Close, {
|
|
50
|
-
onClick: onClose
|
|
51
|
-
}));
|
|
24
|
+
class NoticeFHRoot extends Component {
|
|
25
|
+
renderContent() {
|
|
26
|
+
const {
|
|
27
|
+
Children,
|
|
28
|
+
label,
|
|
29
|
+
title,
|
|
30
|
+
closable
|
|
31
|
+
} = this.asProps;
|
|
32
|
+
let textContent = /* @__PURE__ */ React.createElement(Children, null);
|
|
33
|
+
if (typeof Children.origin === "string") {
|
|
34
|
+
textContent = isNode(title) || isNode(label) || closable ? /* @__PURE__ */ React.createElement(Notice.Text, null, /* @__PURE__ */ React.createElement(Children, null)) : /* @__PURE__ */ React.createElement(Children, null);
|
|
52
35
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
36
|
+
return textContent;
|
|
37
|
+
}
|
|
38
|
+
renderSmartMode() {
|
|
39
|
+
const {
|
|
40
|
+
label,
|
|
41
|
+
title,
|
|
42
|
+
actions,
|
|
43
|
+
closable,
|
|
44
|
+
onClose
|
|
45
|
+
} = this.asProps;
|
|
46
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, isNode(label) && /* @__PURE__ */ React.createElement(Notice.Label, null, label), /* @__PURE__ */ React.createElement(Notice.Content, null, isNode(title) && /* @__PURE__ */ React.createElement(Notice.Title, null, title), this.renderContent(), isNode(actions) && /* @__PURE__ */ React.createElement(Notice.Actions, null, actions)), closable && /* @__PURE__ */ React.createElement(Notice.Close, {
|
|
47
|
+
onClick: onClose
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
50
|
+
renderAdvancedMode() {
|
|
51
|
+
const {
|
|
52
|
+
Children
|
|
53
|
+
} = this.asProps;
|
|
54
|
+
return /* @__PURE__ */ React.createElement(Children, null);
|
|
55
|
+
}
|
|
56
|
+
render() {
|
|
57
|
+
var _ref = this.asProps, _ref2;
|
|
58
|
+
const SHighlightedNotice = Notice;
|
|
59
|
+
const {
|
|
60
|
+
styles,
|
|
61
|
+
Children,
|
|
62
|
+
visible
|
|
63
|
+
} = this.asProps;
|
|
64
|
+
const advancedMode = isAdvanceMode(Children, [NoticeFH.Label.displayName, NoticeFH.Actions.displayName, NoticeFH.Content.displayName, NoticeFH.Title.displayName, NoticeFH.Text.displayName, NoticeFH.Close.displayName]);
|
|
65
|
+
const beforeVisibility = visible === void 0 || visible ? "visible" : "hidden";
|
|
66
|
+
return _ref2 = sstyled(styles), /* @__PURE__ */ React.createElement(SHighlightedNotice, _ref2.cn("SHighlightedNotice", {
|
|
67
|
+
...assignProps({
|
|
68
68
|
"beforeVisibility": beforeVisibility,
|
|
69
69
|
"__excludeProps": ["title"],
|
|
70
70
|
"use:theme": void 0
|
|
71
|
-
}, _ref)
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
71
|
+
}, _ref)
|
|
72
|
+
}), advancedMode ? this.renderAdvancedMode() : this.renderSmartMode());
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
75
|
_defineProperty(NoticeFHRoot, "displayName", "NoticeFH");
|
|
76
76
|
_defineProperty(NoticeFHRoot, "style", style);
|
|
77
|
-
|
|
77
|
+
const NoticeFH = createComponent(NoticeFHRoot, {
|
|
78
78
|
Label: Notice.Label,
|
|
79
79
|
Actions: Notice.Actions,
|
|
80
80
|
Content: Notice.Content,
|
|
81
81
|
Title: Notice.Title,
|
|
82
82
|
Text: Notice.Text,
|
|
83
|
-
Close: Notice.Close
|
|
84
|
-
CloseIcon: Notice.CloseIcon
|
|
83
|
+
Close: Notice.Close
|
|
85
84
|
});
|
|
86
85
|
export {
|
|
87
86
|
NoticeFH
|
|
@@ -1,100 +1,81 @@
|
|
|
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 _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
7
|
-
import { createComponent,
|
|
2
|
+
import { createComponent, Component, assignProps, sstyled } from "@semcore/core";
|
|
8
3
|
import SummaryAI from "@semcore/icon/SummaryAI/m";
|
|
9
4
|
import Pills from "@semcore/pills";
|
|
10
5
|
import React from "react";
|
|
11
6
|
import { AnimatedSparkles } from "../../inner-components/sparkle/AnimatedSparkles.mjs";
|
|
12
7
|
/*!__reshadow-styles__:"./pills.shadow.css"*/
|
|
13
|
-
|
|
8
|
+
const style = (
|
|
14
9
|
/*__reshadow_css_start__*/
|
|
15
10
|
(sstyled.insert(
|
|
16
11
|
/*__inner_css_start__*/
|
|
17
|
-
'.
|
|
12
|
+
'.___SHighlightedPill_1hgp1_gg_{border:1px solid transparent;background:linear-gradient(white,white) padding-box,var(--intergalactic-border-feature-highlight, linear-gradient(90deg, #c695ff, #2bb3ff)) border-box;background-origin:border-box;background-clip:padding-box,border-box;z-index:1;position:relative}.___SHighlightedPill_1hgp1_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, #ab6cfe, #008ff8));-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}.___SHighlightedPill_1hgp1_gg_._neighborLocation_left_1hgp1_gg_::before{border-top-left-radius:0;border-bottom-left-radius:0}.___SHighlightedPill_1hgp1_gg_._neighborLocation_right_1hgp1_gg_::before{border-top-right-radius:0;border-bottom-right-radius:0}.___SHighlightedPill_1hgp1_gg_._neighborLocation_both_1hgp1_gg_::before{border-radius:0}@media (hover:hover){.___SHighlightedPill_1hgp1_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)) border-box}}.___SHighlightedPill_1hgp1_gg_.__selected_1hgp1_gg_{background:var(--intergalactic-bg-primary-feature-highlight-hover-active, linear-gradient(90deg, #f9f2ff, #e9f7ff)) 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}.___SPills_1hgp1_gg_ .___SHighlightedPill_1hgp1_gg_:focus-visible{outline:0}.___SPills_1hgp1_gg_ .___SHighlightedPill_1hgp1_gg_:focus-visible::before{opacity:1;transform:scale(1)}@supports not (-webkit-mask-composite:xor){.___SHighlightedPill_1hgp1_gg_:focus-visible{outline:0;box-shadow:0 0 0 2px #fff,0 0 0 4px #7078fc}.___SHighlightedPill_1hgp1_gg_:focus-visible::before{display:none}}',
|
|
18
13
|
/*__inner_css_end__*/
|
|
19
|
-
"
|
|
14
|
+
"1hgp1_gg_"
|
|
20
15
|
), /*__reshadow_css_end__*/
|
|
21
16
|
{
|
|
22
|
-
"__SHighlightedPill": "
|
|
23
|
-
"_neighborLocation_left": "
|
|
24
|
-
"_neighborLocation_right": "
|
|
25
|
-
"_neighborLocation_both": "
|
|
26
|
-
"_selected": "
|
|
27
|
-
"__SPills": "
|
|
17
|
+
"__SHighlightedPill": "___SHighlightedPill_1hgp1_gg_",
|
|
18
|
+
"_neighborLocation_left": "_neighborLocation_left_1hgp1_gg_",
|
|
19
|
+
"_neighborLocation_right": "_neighborLocation_right_1hgp1_gg_",
|
|
20
|
+
"_neighborLocation_both": "_neighborLocation_both_1hgp1_gg_",
|
|
21
|
+
"_selected": "__selected_1hgp1_gg_",
|
|
22
|
+
"__SPills": "___SPills_1hgp1_gg_"
|
|
28
23
|
})
|
|
29
24
|
);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
return
|
|
25
|
+
class PillsFHRoot extends Component {
|
|
26
|
+
render() {
|
|
27
|
+
var _ref = this.asProps;
|
|
28
|
+
return /* @__PURE__ */ React.createElement(Pills, assignProps({}, _ref));
|
|
34
29
|
}
|
|
35
|
-
|
|
36
|
-
return _createClass(PillsFHRoot2, [{
|
|
37
|
-
key: "render",
|
|
38
|
-
value: function render() {
|
|
39
|
-
var _ref = this.asProps;
|
|
40
|
-
return /* @__PURE__ */ React.createElement(Pills, assignProps({}, _ref));
|
|
41
|
-
}
|
|
42
|
-
}]);
|
|
43
|
-
})(Component);
|
|
30
|
+
}
|
|
44
31
|
_defineProperty(PillsFHRoot, "displayName", "PillsFH");
|
|
45
32
|
_defineProperty(PillsFHRoot, "style", style);
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
51
|
-
args[_key] = arguments[_key];
|
|
52
|
-
}
|
|
53
|
-
_this = _callSuper(this, HighlightedItemRoot2, [].concat(args));
|
|
54
|
-
_defineProperty(_this, "state", {
|
|
33
|
+
class HighlightedItemRoot extends Component {
|
|
34
|
+
constructor(...args) {
|
|
35
|
+
super(...args);
|
|
36
|
+
_defineProperty(this, "state", {
|
|
55
37
|
clicked: false
|
|
56
38
|
});
|
|
57
|
-
return _this;
|
|
58
39
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
40
|
+
handleClick(e) {
|
|
41
|
+
const {
|
|
42
|
+
onClick
|
|
43
|
+
} = this.asProps;
|
|
44
|
+
onClick == null ? void 0 : onClick(e);
|
|
45
|
+
this.setState({
|
|
46
|
+
clicked: false
|
|
47
|
+
});
|
|
48
|
+
setTimeout(() => {
|
|
66
49
|
this.setState({
|
|
67
|
-
clicked:
|
|
50
|
+
clicked: true
|
|
68
51
|
});
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
}, {
|
|
83
|
-
key: "render",
|
|
84
|
-
value: function render() {
|
|
85
|
-
var _ref2 = this.asProps, _ref4;
|
|
86
|
-
var SHighlightedPill = Pills.Item;
|
|
87
|
-
return _ref4 = sstyled(this.asProps.styles), /* @__PURE__ */ React.createElement(SHighlightedPill, _ref4.cn("SHighlightedPill", _objectSpread({}, assignProps({
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
getAddonProps() {
|
|
55
|
+
return {
|
|
56
|
+
clicked: this.state.clicked
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
render() {
|
|
60
|
+
var _ref2 = this.asProps, _ref4;
|
|
61
|
+
const SHighlightedPill = Pills.Item;
|
|
62
|
+
return _ref4 = sstyled(this.asProps.styles), /* @__PURE__ */ React.createElement(SHighlightedPill, _ref4.cn("SHighlightedPill", {
|
|
63
|
+
...assignProps({
|
|
88
64
|
"onClick": this.handleClick.bind(this)
|
|
89
|
-
}, _ref2)
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
65
|
+
}, _ref2)
|
|
66
|
+
}));
|
|
67
|
+
}
|
|
68
|
+
}
|
|
93
69
|
_defineProperty(HighlightedItemRoot, "displayName", "HighlightedItem");
|
|
94
70
|
_defineProperty(HighlightedItemRoot, "style", style);
|
|
95
71
|
function HighlightedItemAddon(props) {
|
|
96
72
|
var _ref3 = arguments[0];
|
|
97
|
-
|
|
73
|
+
const {
|
|
74
|
+
clicked,
|
|
75
|
+
animatedSparkleCount,
|
|
76
|
+
Children,
|
|
77
|
+
children
|
|
78
|
+
} = props;
|
|
98
79
|
return /* @__PURE__ */ React.createElement(Pills.Item.Addon, assignProps({}, _ref3), children !== void 0 ? /* @__PURE__ */ React.createElement(Children, null) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(SummaryAI, {
|
|
99
80
|
color: "--intergalactic-icon-primary-feature-highlight"
|
|
100
81
|
}), /* @__PURE__ */ React.createElement(AnimatedSparkles, {
|
|
@@ -102,7 +83,7 @@ function HighlightedItemAddon(props) {
|
|
|
102
83
|
count: animatedSparkleCount
|
|
103
84
|
})));
|
|
104
85
|
}
|
|
105
|
-
|
|
86
|
+
const PillsFH = createComponent(PillsFHRoot, {
|
|
106
87
|
Item: Pills.Item,
|
|
107
88
|
HighlightedItem: createComponent(HighlightedItemRoot, {
|
|
108
89
|
Text: Pills.Item.Text,
|