@semcore/feature-highlight 16.3.0 → 17.0.0-prerelease.17
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,89 +1,78 @@
|
|
|
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, CONTEXT_COMPONENT } from "@semcore/core";
|
|
8
3
|
import Radio, { RadioGroup } from "@semcore/radio";
|
|
9
4
|
import React from "react";
|
|
10
5
|
import { AnimatedSparkles } from "../../inner-components/sparkle/AnimatedSparkles.mjs";
|
|
11
6
|
/*!__reshadow-styles__:"./radio.shadow.css"*/
|
|
12
|
-
|
|
7
|
+
const style = (
|
|
13
8
|
/*__reshadow_css_start__*/
|
|
14
9
|
(sstyled.insert(
|
|
15
10
|
/*__inner_css_start__*/
|
|
16
|
-
'.
|
|
11
|
+
'.___SHighlightedRadio_lds44_gg_{position:relative}.___SHighlightedRadio_lds44_gg_:not(._state_invalid_lds44_gg_) [data-ui-name="Value.RadioMark"]{border-radius:50%;background:var(--intergalactic-border-feature-highlight, linear-gradient(90deg, #c695ff, #2bb3ff))}.___SHighlightedRadio_lds44_gg_:not(._state_invalid_lds44_gg_) [data-ui-name="Value.RadioMark"]::before{content:"";position:absolute;z-index:-1;top:0;right:0;bottom:0;left:0;margin:0;padding:2px;border-radius:50%;border-width:0;pointer-events:none;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(.9);transition:margin calc(var(--intergalactic-duration-extra-fast, 100)*1ms) ease-in-out,opacity calc(var(--intergalactic-duration-extra-fast, 100)*1ms) ease-in-out,transform calc(var(--intergalactic-duration-extra-fast, 100)*1ms) ease-in-out}.___SHighlightedRadio_lds44_gg_:not(._state_invalid_lds44_gg_) [data-ui-name="Value.RadioMark"]::after{content:"";position:absolute;right:0;bottom:0;border-radius:50%;background:var(--intergalactic-bg-primary-neutral, #ffffff);top:50%;left:50%;width:calc(100% - 2px);height:calc(100% - 2px);transition:width calc(var(--intergalactic-duration-extra-fast, 100)*1ms) ease-in-out,height calc(var(--intergalactic-duration-extra-fast, 100)*1ms) ease-in-out}.___SHighlightedRadio_lds44_gg_:not(._state_invalid_lds44_gg_) input[data-ui-name="RadioFH.Value"]:focus-visible+[data-ui-name="Value.RadioMark"]::before{margin:-4px;opacity:1;transform:scale(1);transition:inherit}@supports not (-webkit-mask-composite:xor){.___SHighlightedRadio_lds44_gg_:not(._state_invalid_lds44_gg_) input[data-ui-name="RadioFH.Value"]:focus-visible+[data-ui-name="Value.RadioMark"]{outline:0;box-shadow:0 0 0 2px #fff,0 0 0 4px #7078fc}.___SHighlightedRadio_lds44_gg_:not(._state_invalid_lds44_gg_) input[data-ui-name="RadioFH.Value"]:focus-visible+[data-ui-name="Value.RadioMark"]::before{display:none}.___SHighlightedRadio_lds44_gg_:not(._state_invalid_lds44_gg_) input[data-ui-name="RadioFH.Value"]:checked:focus-visible+[data-ui-name="Value.RadioMark"]::before{display:none}}',
|
|
17
12
|
/*__inner_css_end__*/
|
|
18
|
-
"
|
|
13
|
+
"lds44_gg_"
|
|
19
14
|
), /*__reshadow_css_end__*/
|
|
20
15
|
{
|
|
21
|
-
"__SHighlightedRadio": "
|
|
22
|
-
"_state_invalid": "
|
|
16
|
+
"__SHighlightedRadio": "___SHighlightedRadio_lds44_gg_",
|
|
17
|
+
"_state_invalid": "_state_invalid_lds44_gg_"
|
|
23
18
|
})
|
|
24
19
|
);
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
args[_key] = arguments[_key];
|
|
31
|
-
}
|
|
32
|
-
_this = _callSuper(this, RadioFHRoot2, [].concat(args));
|
|
33
|
-
_defineProperty(_this, "inputRef", /* @__PURE__ */ React.createRef());
|
|
34
|
-
_defineProperty(_this, "state", {
|
|
20
|
+
class RadioFHRoot extends Component {
|
|
21
|
+
constructor(...args) {
|
|
22
|
+
super(...args);
|
|
23
|
+
_defineProperty(this, "inputRef", /* @__PURE__ */ React.createRef());
|
|
24
|
+
_defineProperty(this, "state", {
|
|
35
25
|
checked: false
|
|
36
26
|
});
|
|
37
|
-
_defineProperty(
|
|
38
|
-
|
|
27
|
+
_defineProperty(this, "setChecked", () => {
|
|
28
|
+
this.setState({
|
|
39
29
|
checked: false
|
|
40
30
|
});
|
|
41
|
-
setTimeout(
|
|
42
|
-
var
|
|
43
|
-
|
|
44
|
-
checked: (
|
|
31
|
+
setTimeout(() => {
|
|
32
|
+
var _a;
|
|
33
|
+
this.setState({
|
|
34
|
+
checked: (_a = this.inputRef.current) == null ? void 0 : _a.checked
|
|
45
35
|
});
|
|
46
36
|
});
|
|
47
37
|
});
|
|
48
|
-
return _this;
|
|
49
38
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
39
|
+
getValueProps() {
|
|
40
|
+
return {
|
|
41
|
+
ref: this.inputRef,
|
|
42
|
+
onChange: this.setChecked,
|
|
43
|
+
// for click by label / programmatically changed
|
|
44
|
+
onClick: this.setChecked
|
|
45
|
+
// for click by radio
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
getAnimatedSparklesProps() {
|
|
49
|
+
const {
|
|
50
|
+
size
|
|
51
|
+
} = this.context;
|
|
52
|
+
const checked = this.state.checked;
|
|
53
|
+
return {
|
|
54
|
+
show: checked,
|
|
55
|
+
top: size === "l" ? "7px" : "5px",
|
|
56
|
+
left: size === "l" ? "5px" : "3px"
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
render() {
|
|
60
|
+
var _ref = this.asProps, _ref2;
|
|
61
|
+
const SHighlightedRadio = Radio;
|
|
62
|
+
const {
|
|
63
|
+
styles,
|
|
64
|
+
Children,
|
|
65
|
+
children: hasChildren
|
|
66
|
+
} = this.asProps;
|
|
67
|
+
return _ref2 = sstyled(styles), /* @__PURE__ */ React.createElement(SHighlightedRadio, _ref2.cn("SHighlightedRadio", {
|
|
68
|
+
...assignProps({}, _ref)
|
|
69
|
+
}), hasChildren ? /* @__PURE__ */ React.createElement(Children, _ref2.cn("Children", {})) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(RadioFH.Value, null), /* @__PURE__ */ React.createElement(RadioFH.Text, null)));
|
|
70
|
+
}
|
|
71
|
+
}
|
|
83
72
|
_defineProperty(RadioFHRoot, "displayName", "RadioFH");
|
|
84
73
|
_defineProperty(RadioFHRoot, "style", style);
|
|
85
74
|
_defineProperty(RadioFHRoot, "contextType", RadioGroup[CONTEXT_COMPONENT]);
|
|
86
|
-
|
|
75
|
+
const RadioFH = createComponent(RadioFHRoot, {
|
|
87
76
|
Text: Radio.Text,
|
|
88
77
|
Value: Radio.Value,
|
|
89
78
|
AnimatedSparkles
|
|
@@ -1,35 +1,26 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
6
|
-
import { createComponent,
|
|
2
|
+
import { createComponent, Component, assignProps } from "@semcore/core";
|
|
7
3
|
import Select from "@semcore/select";
|
|
8
4
|
import React from "react";
|
|
9
5
|
import { ButtonTriggerFH } from "../../inner-components/button-trigger/ButtonTrigger.mjs";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return
|
|
6
|
+
class SelectFHRoot extends Component {
|
|
7
|
+
render() {
|
|
8
|
+
var _ref = this.asProps;
|
|
9
|
+
return /* @__PURE__ */ React.createElement(Select, assignProps({}, _ref));
|
|
14
10
|
}
|
|
15
|
-
|
|
16
|
-
return _createClass(SelectFHRoot2, [{
|
|
17
|
-
key: "render",
|
|
18
|
-
value: function render() {
|
|
19
|
-
var _ref = this.asProps;
|
|
20
|
-
return /* @__PURE__ */ React.createElement(Select, assignProps({}, _ref));
|
|
21
|
-
}
|
|
22
|
-
}]);
|
|
23
|
-
})(Component);
|
|
11
|
+
}
|
|
24
12
|
_defineProperty(SelectFHRoot, "displayName", "SelectFH");
|
|
25
13
|
function Trigger(props) {
|
|
26
14
|
var _ref2 = arguments[0];
|
|
27
|
-
|
|
15
|
+
const {
|
|
16
|
+
Children,
|
|
17
|
+
children: hasChildren
|
|
18
|
+
} = props;
|
|
28
19
|
return /* @__PURE__ */ React.createElement(Select.Trigger, assignProps({
|
|
29
20
|
"tag": ButtonTriggerFH
|
|
30
21
|
}, _ref2), hasChildren ? /* @__PURE__ */ React.createElement(Children, null) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(SelectFH.Trigger.Addon, null), /* @__PURE__ */ React.createElement(SelectFH.Trigger.Text, null)));
|
|
31
22
|
}
|
|
32
|
-
|
|
23
|
+
const SelectFH = createComponent(SelectFHRoot, {
|
|
33
24
|
Trigger: [Trigger, {
|
|
34
25
|
Text: ButtonTriggerFH.Text,
|
|
35
26
|
Addon: ButtonTriggerFH.Addon
|
|
@@ -1,87 +1,73 @@
|
|
|
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 Switch from "@semcore/switch";
|
|
9
4
|
import React from "react";
|
|
10
5
|
import { AnimatedSparkles } from "../../inner-components/sparkle/AnimatedSparkles.mjs";
|
|
11
6
|
/*!__reshadow-styles__:"./switch.shadow.css"*/
|
|
12
|
-
|
|
7
|
+
const style = (
|
|
13
8
|
/*__reshadow_css_start__*/
|
|
14
9
|
(sstyled.insert(
|
|
15
10
|
/*__inner_css_start__*/
|
|
16
|
-
'.
|
|
11
|
+
'.___SToggle_12wh3_gg_{position:relative}.___SToggle_12wh3_gg_::before{content:"";position:absolute;z-index:-1;top:0;right:0;bottom:0;left:0;margin:0;padding:2px;border-radius:inherit;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);pointer-events:none;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}.___SToggle_12wh3_gg_.__checked_12wh3_gg_{color:var(--intergalactic-control-primary-info, #008ff8);background-image:var(--intergalactic-control-primary-feature-highlight, linear-gradient(90deg, #ab6cfe, #008ff8))}.___SToggle_12wh3_gg_:has(.___SInput_12wh3_gg_:focus-visible){box-shadow:none;outline:0}.___SToggle_12wh3_gg_:has(.___SInput_12wh3_gg_:focus-visible)::before{margin:-4px;opacity:1;transform:scale(1)}@supports not (-webkit-mask-composite:xor){.___SToggle_12wh3_gg_:has(.___SInput_12wh3_gg_:focus-visible){outline:0;box-shadow:0 0 0 2px #fff,0 0 0 4px #7078fc}.___SToggle_12wh3_gg_:has(.___SInput_12wh3_gg_:focus-visible)::before{display:none}}',
|
|
17
12
|
/*__inner_css_end__*/
|
|
18
|
-
"
|
|
13
|
+
"12wh3_gg_"
|
|
19
14
|
), /*__reshadow_css_end__*/
|
|
20
15
|
{
|
|
21
|
-
"__SToggle": "
|
|
22
|
-
"_checked": "
|
|
23
|
-
"__SInput": "
|
|
16
|
+
"__SToggle": "___SToggle_12wh3_gg_",
|
|
17
|
+
"_checked": "__checked_12wh3_gg_",
|
|
18
|
+
"__SInput": "___SInput_12wh3_gg_"
|
|
24
19
|
})
|
|
25
20
|
);
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
31
|
-
args[_key] = arguments[_key];
|
|
32
|
-
}
|
|
33
|
-
_this = _callSuper(this, SwitchFHRoot2, [].concat(args));
|
|
34
|
-
_defineProperty(_this, "inputRef", /* @__PURE__ */ React.createRef());
|
|
35
|
-
return _this;
|
|
21
|
+
class SwitchFHRoot extends Component {
|
|
22
|
+
constructor(...args) {
|
|
23
|
+
super(...args);
|
|
24
|
+
_defineProperty(this, "inputRef", /* @__PURE__ */ React.createRef());
|
|
36
25
|
}
|
|
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
|
-
var SInput = Switch;
|
|
71
|
-
return _ref3 = sstyled(this.asProps.styles), /* @__PURE__ */ React.createElement(SInput, _ref3.cn("SInput", _objectSpread({}, assignProps({}, _ref))));
|
|
72
|
-
}
|
|
73
|
-
}]);
|
|
74
|
-
})(Component);
|
|
26
|
+
getValueProps() {
|
|
27
|
+
return {
|
|
28
|
+
ref: this.inputRef,
|
|
29
|
+
onChange: () => {
|
|
30
|
+
setTimeout(() => {
|
|
31
|
+
this.forceUpdate();
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
getAnimatedSparklesProps() {
|
|
37
|
+
var _a;
|
|
38
|
+
const {
|
|
39
|
+
size
|
|
40
|
+
} = this.asProps;
|
|
41
|
+
const checked = (_a = this.inputRef.current) == null ? void 0 : _a.checked;
|
|
42
|
+
let left = "4px";
|
|
43
|
+
if (size === "l") left = "12px";
|
|
44
|
+
if (size === "xl") left = "14px";
|
|
45
|
+
return {
|
|
46
|
+
show: checked,
|
|
47
|
+
curve: size === "l" || size === "xl" ? 9 : void 0,
|
|
48
|
+
left
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
render() {
|
|
52
|
+
var _ref = this.asProps, _ref3;
|
|
53
|
+
const SInput = Switch;
|
|
54
|
+
return _ref3 = sstyled(this.asProps.styles), /* @__PURE__ */ React.createElement(SInput, _ref3.cn("SInput", {
|
|
55
|
+
...assignProps({}, _ref)
|
|
56
|
+
}));
|
|
57
|
+
}
|
|
58
|
+
}
|
|
75
59
|
_defineProperty(SwitchFHRoot, "displayName", "SwitchFH");
|
|
76
60
|
_defineProperty(SwitchFHRoot, "style", style);
|
|
77
61
|
function Value(props) {
|
|
78
62
|
var _ref2 = arguments[0], _ref4;
|
|
79
|
-
|
|
80
|
-
return _ref4 = sstyled(props.styles), /* @__PURE__ */ React.createElement(SToggle, _ref4.cn("SToggle",
|
|
81
|
-
|
|
82
|
-
|
|
63
|
+
const SToggle = Switch.Value;
|
|
64
|
+
return _ref4 = sstyled(props.styles), /* @__PURE__ */ React.createElement(SToggle, _ref4.cn("SToggle", {
|
|
65
|
+
...assignProps({
|
|
66
|
+
"onChange": props.onChange
|
|
67
|
+
}, _ref2)
|
|
68
|
+
}));
|
|
83
69
|
}
|
|
84
|
-
|
|
70
|
+
const SwitchFH = createComponent(SwitchFHRoot, {
|
|
85
71
|
Addon: Switch.Addon,
|
|
86
72
|
Value,
|
|
87
73
|
AnimatedSparkles
|
|
@@ -1,97 +1,78 @@
|
|
|
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 TabLine from "@semcore/tab-line";
|
|
10
5
|
import React from "react";
|
|
11
6
|
import { AnimatedSparkles } from "../../inner-components/sparkle/AnimatedSparkles.mjs";
|
|
12
7
|
/*!__reshadow-styles__:"./tabLine.shadow.css"*/
|
|
13
|
-
|
|
8
|
+
const style = (
|
|
14
9
|
/*__reshadow_css_start__*/
|
|
15
10
|
(sstyled.insert(
|
|
16
11
|
/*__inner_css_start__*/
|
|
17
|
-
'.
|
|
12
|
+
'.___SHighlightedItem_1tazm_gg_:focus-visible{outline:0}.___SHighlightedItem_1tazm_gg_:focus-visible::before{opacity:1;transform:scale(1)}.___SHighlightedItem_1tazm_gg_::after{opacity:0;transition:opacity calc(var(--intergalactic-duration-control, 200)*1ms) ease-in-out}.___SHighlightedItem_1tazm_gg_.__selected_1tazm_gg_::after{opacity:1}@media (hover:hover){.___SHighlightedItem_1tazm_gg_:hover:not(:focus-visible)::after{opacity:1;background:var(--intergalactic-border-feature-highlight-active, linear-gradient(90deg, #ab6cfe, #008ff8))}}.___SHighlightedItem_1tazm_gg_::before{content:"";position:absolute;z-index:0;top:0;right:0;bottom:0;left:0;height:auto;width:calc(100% + 4px);margin:-4px;padding:2px;box-sizing:content-box;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);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}.___SHighlightedCaret_1tazm_gg_,.___SHighlightedItem_1tazm_gg_.__selected_1tazm_gg_::after{background:var(--intergalactic-border-feature-highlight-active, linear-gradient(90deg, #ab6cfe, #008ff8))}',
|
|
18
13
|
/*__inner_css_end__*/
|
|
19
|
-
"
|
|
14
|
+
"1tazm_gg_"
|
|
20
15
|
), /*__reshadow_css_end__*/
|
|
21
16
|
{
|
|
22
|
-
"__SHighlightedCaret": "
|
|
23
|
-
"__SHighlightedItem": "
|
|
24
|
-
"_selected": "
|
|
17
|
+
"__SHighlightedCaret": "___SHighlightedCaret_1tazm_gg_",
|
|
18
|
+
"__SHighlightedItem": "___SHighlightedItem_1tazm_gg_",
|
|
19
|
+
"_selected": "__selected_1tazm_gg_"
|
|
25
20
|
})
|
|
26
21
|
);
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return
|
|
22
|
+
class TabLineFHRoot extends Component {
|
|
23
|
+
render() {
|
|
24
|
+
var _ref = this.asProps;
|
|
25
|
+
return /* @__PURE__ */ React.createElement(TabLine, assignProps({}, _ref));
|
|
31
26
|
}
|
|
32
|
-
|
|
33
|
-
return _createClass(TabLineFHRoot2, [{
|
|
34
|
-
key: "render",
|
|
35
|
-
value: function render() {
|
|
36
|
-
var _ref = this.asProps;
|
|
37
|
-
return /* @__PURE__ */ React.createElement(TabLine, assignProps({}, _ref));
|
|
38
|
-
}
|
|
39
|
-
}]);
|
|
40
|
-
})(Component);
|
|
27
|
+
}
|
|
41
28
|
_defineProperty(TabLineFHRoot, "displayName", "TabLineFH");
|
|
42
29
|
_defineProperty(TabLineFHRoot, "style", style);
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
48
|
-
args[_key] = arguments[_key];
|
|
49
|
-
}
|
|
50
|
-
_this = _callSuper(this, HighlightedItemRoot2, [].concat(args));
|
|
51
|
-
_defineProperty(_this, "state", {
|
|
30
|
+
class HighlightedItemRoot extends Component {
|
|
31
|
+
constructor(...args) {
|
|
32
|
+
super(...args);
|
|
33
|
+
_defineProperty(this, "state", {
|
|
52
34
|
clicked: false
|
|
53
35
|
});
|
|
54
|
-
return _this;
|
|
55
36
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
37
|
+
handleClick(e) {
|
|
38
|
+
const {
|
|
39
|
+
onClick
|
|
40
|
+
} = this.asProps;
|
|
41
|
+
onClick == null ? void 0 : onClick(e);
|
|
42
|
+
this.setState({
|
|
43
|
+
clicked: false
|
|
44
|
+
});
|
|
45
|
+
setTimeout(() => {
|
|
63
46
|
this.setState({
|
|
64
|
-
clicked:
|
|
47
|
+
clicked: true
|
|
65
48
|
});
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
}, {
|
|
80
|
-
key: "render",
|
|
81
|
-
value: function render() {
|
|
82
|
-
var _ref2 = this.asProps, _ref4;
|
|
83
|
-
var SHighlightedItem = TabLine.Item;
|
|
84
|
-
return _ref4 = sstyled(this.asProps.styles), /* @__PURE__ */ React.createElement(SHighlightedItem, _ref4.cn("SHighlightedItem", _objectSpread({}, assignProps({
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
getAddonProps() {
|
|
52
|
+
return {
|
|
53
|
+
clicked: this.state.clicked
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
render() {
|
|
57
|
+
var _ref2 = this.asProps, _ref4;
|
|
58
|
+
const SHighlightedItem = TabLine.Item;
|
|
59
|
+
return _ref4 = sstyled(this.asProps.styles), /* @__PURE__ */ React.createElement(SHighlightedItem, _ref4.cn("SHighlightedItem", {
|
|
60
|
+
...assignProps({
|
|
85
61
|
"onClick": this.handleClick.bind(this)
|
|
86
|
-
}, _ref2)
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
62
|
+
}, _ref2)
|
|
63
|
+
}));
|
|
64
|
+
}
|
|
65
|
+
}
|
|
90
66
|
_defineProperty(HighlightedItemRoot, "displayName", "HighlightedItem");
|
|
91
67
|
_defineProperty(HighlightedItemRoot, "style", style);
|
|
92
68
|
function HighlightedAddon(props) {
|
|
93
69
|
var _ref3 = arguments[0];
|
|
94
|
-
|
|
70
|
+
const {
|
|
71
|
+
clicked,
|
|
72
|
+
animatedSparkleCount,
|
|
73
|
+
Children,
|
|
74
|
+
children: hasChildren
|
|
75
|
+
} = props;
|
|
95
76
|
return /* @__PURE__ */ React.createElement(TabLine.Item.Addon, assignProps({}, _ref3), hasChildren ? /* @__PURE__ */ React.createElement(Children, null) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(SummaryAI, {
|
|
96
77
|
color: "--intergalactic-icon-primary-feature-highlight"
|
|
97
78
|
}), /* @__PURE__ */ React.createElement(AnimatedSparkles, {
|
|
@@ -99,7 +80,7 @@ function HighlightedAddon(props) {
|
|
|
99
80
|
count: animatedSparkleCount
|
|
100
81
|
})));
|
|
101
82
|
}
|
|
102
|
-
|
|
83
|
+
const TabLineFH = createComponent(TabLineFHRoot, {
|
|
103
84
|
Item: [TabLine.Item, {
|
|
104
85
|
Text: TabLine.Item.Text,
|
|
105
86
|
Addon: TabLine.Item.Addon
|
|
@@ -1,59 +1,55 @@
|
|
|
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 { ButtonTrigger } from "@semcore/base-trigger";
|
|
9
4
|
import SummaryAI from "@semcore/icon/SummaryAI/m";
|
|
10
5
|
import React from "react";
|
|
11
6
|
/*!__reshadow-styles__:"./buttonTrigger.shadow.css"*/
|
|
12
|
-
|
|
7
|
+
const style = (
|
|
13
8
|
/*__reshadow_css_start__*/
|
|
14
9
|
(sstyled.insert(
|
|
15
10
|
/*__inner_css_start__*/
|
|
16
|
-
'.
|
|
11
|
+
'.___SHighlightedButtonTrigger_1q2s6_gg_:not(._state_invalid_1q2s6_gg_):not(._state_valid_1q2s6_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;position:relative;z-index:1}.___SHighlightedButtonTrigger_1q2s6_gg_:not(._state_invalid_1q2s6_gg_):not(._state_valid_1q2s6_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);pointer-events:none;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}@media (hover:hover){.___SHighlightedButtonTrigger_1q2s6_gg_:not(._state_invalid_1q2s6_gg_):not(._state_valid_1q2s6_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}}.___SHighlightedButtonTrigger_1q2s6_gg_.__active_1q2s6_gg_:not(._state_invalid_1q2s6_gg_):not(._state_valid_1q2s6_gg_),.___SHighlightedButtonTrigger_1q2s6_gg_:not(._state_invalid_1q2s6_gg_):not(._state_valid_1q2s6_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_1q2s6_gg_:not(._state_invalid_1q2s6_gg_):not(._state_valid_1q2s6_gg_):focus-visible{outline:0;border-color:transparent}.___SHighlightedButtonTrigger_1q2s6_gg_:not(._state_invalid_1q2s6_gg_):not(._state_valid_1q2s6_gg_):focus-visible::before{opacity:1;transform:scale(1)}.___SHighlightedButtonTrigger_1q2s6_gg_._neighborLocation_left_1q2s6_gg_:not(._state_invalid_1q2s6_gg_):not(._state_valid_1q2s6_gg_)::before{border-top-left-radius:0;border-bottom-left-radius:0}.___SHighlightedButtonTrigger_1q2s6_gg_._neighborLocation_right_1q2s6_gg_:not(._state_invalid_1q2s6_gg_):not(._state_valid_1q2s6_gg_)::before{border-top-right-radius:0;border-bottom-right-radius:0}.___SHighlightedButtonTrigger_1q2s6_gg_._neighborLocation_both_1q2s6_gg_:not(._state_invalid_1q2s6_gg_):not(._state_valid_1q2s6_gg_)::before{border-radius:0}@supports not (-webkit-mask-composite:xor){.___SHighlightedButtonTrigger_1q2s6_gg_:not(._state_invalid_1q2s6_gg_):not(._state_valid_1q2s6_gg_):focus-visible{outline:0;box-shadow:0 0 0 2px #fff,0 0 0 4px #7078fc}.___SHighlightedButtonTrigger_1q2s6_gg_:not(._state_invalid_1q2s6_gg_):not(._state_valid_1q2s6_gg_):focus-visible::before{display:none}}',
|
|
17
12
|
/*__inner_css_end__*/
|
|
18
|
-
"
|
|
13
|
+
"1q2s6_gg_"
|
|
19
14
|
), /*__reshadow_css_end__*/
|
|
20
15
|
{
|
|
21
|
-
"__SHighlightedButtonTrigger": "
|
|
22
|
-
"_state_invalid": "
|
|
23
|
-
"_state_valid": "
|
|
24
|
-
"_active": "
|
|
25
|
-
"_neighborLocation_left": "
|
|
26
|
-
"_neighborLocation_right": "
|
|
27
|
-
"_neighborLocation_both": "
|
|
16
|
+
"__SHighlightedButtonTrigger": "___SHighlightedButtonTrigger_1q2s6_gg_",
|
|
17
|
+
"_state_invalid": "_state_invalid_1q2s6_gg_",
|
|
18
|
+
"_state_valid": "_state_valid_1q2s6_gg_",
|
|
19
|
+
"_active": "__active_1q2s6_gg_",
|
|
20
|
+
"_neighborLocation_left": "_neighborLocation_left_1q2s6_gg_",
|
|
21
|
+
"_neighborLocation_right": "_neighborLocation_right_1q2s6_gg_",
|
|
22
|
+
"_neighborLocation_both": "_neighborLocation_both_1q2s6_gg_"
|
|
28
23
|
})
|
|
29
24
|
);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
25
|
+
class ButtonTriggerFHRoot extends Component {
|
|
26
|
+
render() {
|
|
27
|
+
var _ref = this.asProps, _ref3;
|
|
28
|
+
const {
|
|
29
|
+
styles
|
|
30
|
+
} = this.asProps;
|
|
31
|
+
const SHighlightedButtonTrigger = ButtonTrigger;
|
|
32
|
+
return _ref3 = sstyled(styles), /* @__PURE__ */ React.createElement(SHighlightedButtonTrigger, _ref3.cn("SHighlightedButtonTrigger", {
|
|
33
|
+
...assignProps({}, _ref)
|
|
34
|
+
}));
|
|
34
35
|
}
|
|
35
|
-
|
|
36
|
-
return _createClass(ButtonTriggerFHRoot2, [{
|
|
37
|
-
key: "render",
|
|
38
|
-
value: function render() {
|
|
39
|
-
var _ref = this.asProps, _ref3;
|
|
40
|
-
var styles = this.asProps.styles;
|
|
41
|
-
var SHighlightedButtonTrigger = ButtonTrigger;
|
|
42
|
-
return _ref3 = sstyled(styles), /* @__PURE__ */ React.createElement(SHighlightedButtonTrigger, _ref3.cn("SHighlightedButtonTrigger", _objectSpread({}, assignProps({}, _ref))));
|
|
43
|
-
}
|
|
44
|
-
}]);
|
|
45
|
-
})(Component);
|
|
36
|
+
}
|
|
46
37
|
_defineProperty(ButtonTriggerFHRoot, "displayName", "ButtonTriggerFH");
|
|
47
38
|
_defineProperty(ButtonTriggerFHRoot, "style", style);
|
|
48
39
|
function Addon(props) {
|
|
49
40
|
var _ref2 = arguments[0], _ref4;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
41
|
+
const SAddon = ButtonTrigger.Addon;
|
|
42
|
+
const {
|
|
43
|
+
Children,
|
|
44
|
+
children: hasChildren
|
|
45
|
+
} = props;
|
|
46
|
+
return _ref4 = sstyled(props.styles), /* @__PURE__ */ React.createElement(SAddon, _ref4.cn("SAddon", {
|
|
47
|
+
...assignProps({}, _ref2)
|
|
48
|
+
}), hasChildren ? /* @__PURE__ */ React.createElement(Children, _ref4.cn("Children", {})) : /* @__PURE__ */ React.createElement(SummaryAI, _ref4.cn("SummaryAI", {
|
|
53
49
|
"color": "--intergalactic-icon-primary-feature-highlight"
|
|
54
50
|
})));
|
|
55
51
|
}
|
|
56
|
-
|
|
52
|
+
const ButtonTriggerFH = createComponent(ButtonTriggerFHRoot, {
|
|
57
53
|
Text: ButtonTrigger.Text,
|
|
58
54
|
Addon
|
|
59
55
|
});
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
1
|
import React from "react";
|
|
3
2
|
import Sparkle from "./Sparkle.mjs";
|
|
4
3
|
function AnimatedSparkles(props) {
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const {
|
|
5
|
+
count,
|
|
6
|
+
curve,
|
|
7
|
+
show,
|
|
8
|
+
top,
|
|
9
|
+
left
|
|
10
|
+
} = props;
|
|
11
|
+
return show && count !== void 0 && [...new Array(count)].map((_, index) => {
|
|
7
12
|
return /* @__PURE__ */ React.createElement(Sparkle, {
|
|
8
13
|
key: index,
|
|
9
14
|
index,
|