@semcore/divider 16.0.11 → 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/README.md +4 -4
- package/lib/cjs/Divider.js +34 -44
- package/lib/cjs/Divider.js.map +1 -1
- package/lib/cjs/index.d.js.map +1 -1
- package/lib/cjs/index.js +3 -3
- package/lib/es6/Divider.js +27 -37
- package/lib/es6/Divider.js.map +1 -1
- package/lib/es6/index.d.js.map +1 -1
- package/lib/esm/Divider.mjs +31 -38
- package/lib/types/index.d.ts +2 -4
- package/package.json +5 -7
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/@semcore/divider)
|
|
4
4
|
[](https://www.npmjs.com/package/@semcore/divider)
|
|
5
|
-
[](https://github.com/semrush/intergalactic/blob/
|
|
5
|
+
[](https://github.com/semrush/intergalactic/blob/HEAD/LICENSE)
|
|
6
6
|
|
|
7
7
|
> This component is part of the Intergalactic Design System
|
|
8
8
|
|
|
@@ -20,13 +20,13 @@ npm install @semcore/divider
|
|
|
20
20
|
|
|
21
21
|
## 👤 Author
|
|
22
22
|
|
|
23
|
-
[UI-kit team](https://github.com/semrush/intergalactic/blob/
|
|
23
|
+
[UI-kit team](https://github.com/semrush/intergalactic/blob/HEAD/MAINTAINERS) and [others ❤️](https://github.com/semrush/intergalactic/graphs/contributors)
|
|
24
24
|
|
|
25
25
|
## 🤝 Contributing
|
|
26
26
|
|
|
27
27
|
Contributions, issues and feature requests are welcome!
|
|
28
28
|
|
|
29
|
-
Feel free to check [issues page](https://github.com/semrush/intergalactic/issues). You can also take a look at the [contributing guide](https://github.com/semrush/intergalactic/blob/
|
|
29
|
+
Feel free to check [issues page](https://github.com/semrush/intergalactic/issues). You can also take a look at the [contributing guide](https://github.com/semrush/intergalactic/blob/HEAD/CONTRIBUTING.md).
|
|
30
30
|
|
|
31
31
|
## Show your support
|
|
32
32
|
|
|
@@ -34,4 +34,4 @@ Give a ⭐️ if this project helped you!
|
|
|
34
34
|
|
|
35
35
|
## 📝 License
|
|
36
36
|
|
|
37
|
-
This project is [MIT](https://github.com/semrush/intergalactic/blob/
|
|
37
|
+
This project is [MIT](https://github.com/semrush/intergalactic/blob/HEAD/LICENSE) licensed.
|
package/lib/cjs/Divider.js
CHANGED
|
@@ -1,64 +1,54 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports
|
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
|
-
var _callSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/callSuper"));
|
|
12
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
7
|
+
exports.default = void 0;
|
|
13
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
9
|
var _core = require("@semcore/core");
|
|
10
|
+
var _baseComponents = require("@semcore/base-components");
|
|
15
11
|
var _resolveColorEnhance = _interopRequireDefault(require("@semcore/core/lib/utils/enhances/resolveColorEnhance"));
|
|
16
|
-
var _flexBox = require("@semcore/flex-box");
|
|
17
12
|
var _react = _interopRequireDefault(require("react"));
|
|
18
13
|
/*!__reshadow-styles__:"./style/divider.shadow.css"*/
|
|
19
|
-
|
|
14
|
+
const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SDivider_j4ark_gg_{display:block}.___SDivider_j4ark_gg_._use_primary_j4ark_gg_{background-color:var(--theme_j4ark, var(--intergalactic-border-primary, #c4c7cf))}.___SDivider_j4ark_gg_._use_primary_j4ark_gg_.___SDivider_j4ark_gg_._theme_default_j4ark_gg_{background:var(--intergalactic-border-primary, #c4c7cf)}.___SDivider_j4ark_gg_._use_primary_j4ark_gg_.___SDivider_j4ark_gg_._theme_invert_j4ark_gg_{background-color:var(--intergalactic-border-primary-invert, #ffffff);opacity:.2}.___SDivider_j4ark_gg_._orientation_horizontal_j4ark_gg_.___SDivider_j4ark_gg_._use_secondary_j4ark_gg_{background-image:linear-gradient(to right,var(--intergalactic-border-primary, #c4c7cf) 3px,transparent 1px);background-size:5px 1px}.___SDivider_j4ark_gg_._orientation_horizontal_j4ark_gg_.___SDivider_j4ark_gg_._use_secondary_j4ark_gg_.___SDivider_j4ark_gg_._theme_default_j4ark_gg_{background:linear-gradient(to right,var(--intergalactic-border-primary, #c4c7cf) 3px,transparent 1px);background-size:5px 1px}.___SDivider_j4ark_gg_._orientation_horizontal_j4ark_gg_.___SDivider_j4ark_gg_._use_secondary_j4ark_gg_.___SDivider_j4ark_gg_._theme_invert_j4ark_gg_{background-image:linear-gradient(to right,var(--intergalactic-border-primary-invert, #ffffff) 3px,transparent 1px);opacity:.2;background-size:5px 1px}.___SDivider_j4ark_gg_._orientation_vertical_j4ark_gg_.___SDivider_j4ark_gg_._use_secondary_j4ark_gg_,.___SDivider_j4ark_gg_._orientation_vertical_j4ark_gg_.___SDivider_j4ark_gg_._use_secondary_j4ark_gg_.___SDivider_j4ark_gg_._theme_default_j4ark_gg_{background-image:linear-gradient(to bottom,var(--intergalactic-border-primary, #c4c7cf) 3px,transparent 1px);background-size:1px 5px}.___SDivider_j4ark_gg_._orientation_vertical_j4ark_gg_.___SDivider_j4ark_gg_._use_secondary_j4ark_gg_.___SDivider_j4ark_gg_._theme_invert_j4ark_gg_{background-image:linear-gradient(to bottom,var(--intergalactic-border-primary-invert, #ffffff) 3px,transparent 1px);opacity:.2;background-size:1px 5px}.___SDivider_j4ark_gg_._orientation_horizontal_j4ark_gg_{width:100%;height:1px}.___SDivider_j4ark_gg_._orientation_vertical_j4ark_gg_{width:1px;height:auto;min-height:100%;align-self:stretch;flex-shrink:0}.___SDivider_j4ark_gg_.__theme_j4ark_gg_._use_primary_j4ark_gg_:not(._theme_default_j4ark_gg_):not(._theme_invert_j4ark_gg_){background-color:var(--theme_j4ark)}.___SDivider_j4ark_gg_.__theme_j4ark_gg_._use_secondary_j4ark_gg_:not(._theme_default_j4ark_gg_):not(._theme_invert_j4ark_gg_){background-image:linear-gradient(to right,var(--theme_j4ark) 3px,transparent 1px)}", /*__inner_css_end__*/"j4ark_gg_"),
|
|
20
15
|
/*__reshadow_css_end__*/
|
|
21
16
|
{
|
|
22
|
-
"__SDivider": "
|
|
23
|
-
"_use_primary": "
|
|
24
|
-
"--theme": "--
|
|
25
|
-
"_theme_default": "
|
|
26
|
-
"_theme_invert": "
|
|
27
|
-
"_orientation_horizontal": "
|
|
28
|
-
"_use_secondary": "
|
|
29
|
-
"_orientation_vertical": "
|
|
30
|
-
"_theme": "
|
|
17
|
+
"__SDivider": "___SDivider_j4ark_gg_",
|
|
18
|
+
"_use_primary": "_use_primary_j4ark_gg_",
|
|
19
|
+
"--theme": "--theme_j4ark",
|
|
20
|
+
"_theme_default": "_theme_default_j4ark_gg_",
|
|
21
|
+
"_theme_invert": "_theme_invert_j4ark_gg_",
|
|
22
|
+
"_orientation_horizontal": "_orientation_horizontal_j4ark_gg_",
|
|
23
|
+
"_use_secondary": "_use_secondary_j4ark_gg_",
|
|
24
|
+
"_orientation_vertical": "_orientation_vertical_j4ark_gg_",
|
|
25
|
+
"_theme": "__theme_j4ark_gg_"
|
|
31
26
|
});
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
var _this$asProps = this.asProps,
|
|
45
|
-
orientation = _this$asProps.orientation,
|
|
46
|
-
resolveColor = _this$asProps.resolveColor,
|
|
47
|
-
theme = _this$asProps.theme;
|
|
48
|
-
return _ref2 = (0, _core.sstyled)(this.asProps.styles), /*#__PURE__*/_react["default"].createElement(SDivider, _ref2.cn("SDivider", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
|
|
27
|
+
class Divider extends _core.Component {
|
|
28
|
+
render() {
|
|
29
|
+
var _ref = this.asProps,
|
|
30
|
+
_ref2;
|
|
31
|
+
const SDivider = _baseComponents.Box;
|
|
32
|
+
const {
|
|
33
|
+
orientation,
|
|
34
|
+
resolveColor,
|
|
35
|
+
theme
|
|
36
|
+
} = this.asProps;
|
|
37
|
+
return _ref2 = (0, _core.sstyled)(this.asProps.styles), /*#__PURE__*/_react.default.createElement(SDivider, _ref2.cn("SDivider", {
|
|
38
|
+
...(0, _core.assignProps)({
|
|
49
39
|
"role": 'separator',
|
|
50
40
|
"aria-orientation": orientation,
|
|
51
41
|
"use:theme": resolveColor(theme)
|
|
52
|
-
}, _ref)
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
(0, _defineProperty2
|
|
57
|
-
(0, _defineProperty2
|
|
58
|
-
(0, _defineProperty2
|
|
59
|
-
(0, _defineProperty2
|
|
42
|
+
}, _ref)
|
|
43
|
+
}));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
(0, _defineProperty2.default)(Divider, "displayName", 'Divider');
|
|
47
|
+
(0, _defineProperty2.default)(Divider, "style", style);
|
|
48
|
+
(0, _defineProperty2.default)(Divider, "enhance", [(0, _resolveColorEnhance.default)()]);
|
|
49
|
+
(0, _defineProperty2.default)(Divider, "defaultProps", {
|
|
60
50
|
use: 'primary',
|
|
61
51
|
orientation: 'horizontal'
|
|
62
52
|
});
|
|
63
|
-
var _default = exports
|
|
53
|
+
var _default = exports.default = (0, _core.createComponent)(Divider);
|
|
64
54
|
//# sourceMappingURL=Divider.js.map
|
package/lib/cjs/Divider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Divider.js","names":["_core","require","
|
|
1
|
+
{"version":3,"file":"Divider.js","names":["_core","require","_baseComponents","_resolveColorEnhance","_interopRequireDefault","_react","style","sstyled","insert","Divider","Component","render","_ref","asProps","_ref2","SDivider","Box","orientation","resolveColor","theme","styles","default","createElement","cn","assignProps","_defineProperty2","resolveColorEnhance","use","_default","exports","createComponent"],"sources":["../../src/Divider.jsx"],"sourcesContent":["import { Box } from '@semcore/base-components';\nimport { createComponent, Component, Root, sstyled } from '@semcore/core';\nimport resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';\nimport React from 'react';\n\nimport style from './style/divider.shadow.css';\n\nclass Divider extends Component {\n static displayName = 'Divider';\n static style = style;\n static enhance = [resolveColorEnhance()];\n static defaultProps = {\n use: 'primary',\n orientation: 'horizontal',\n };\n\n render() {\n const SDivider = Root;\n const { orientation, resolveColor, theme } = this.asProps;\n\n return sstyled(this.asProps.styles)(\n <SDivider\n render={Box}\n role='separator'\n aria-orientation={orientation}\n use:theme={resolveColor(theme)}\n />,\n );\n }\n}\n\nexport default createComponent(Divider);\n"],"mappings":";;;;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AADA,IAAAC,eAAA,GAAAD,OAAA;AAEA,IAAAE,oBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,MAAA,GAAAD,sBAAA,CAAAH,OAAA;AAA0B;AAAA,MAAAK,KAAA,8BAAAN,KAAA,CAAAO,OAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAI1B,MAAMC,OAAO,SAASC,eAAS,CAAC;EAS9BC,MAAMA,CAAA,EAAG;IAAA,IAAAC,IAAA,QAAAC,OAAA;MAAAC,KAAA;IACP,MAAMC,QAAQ,GAKFC,mBAAG;IAJf,MAAM;MAAEC,WAAW;MAAEC,YAAY;MAAEC;IAAM,CAAC,GAAG,IAAI,CAACN,OAAO;IAEzD,OAAAC,KAAA,GAAO,IAAAP,aAAO,EAAC,IAAI,CAACM,OAAO,CAACO,MAAM,CAAC,eACjCf,MAAA,CAAAgB,OAAA,CAAAC,aAAA,CAACP,QAAQ,EAAAD,KAAA,CAAAS,EAAA;MAAA,OAAAvB,KAAA,CAAAwB,WAAA;QAAA,QAEF,WAAW;QAAA,oBACEP,WAAW;QAAA,aAClBC,YAAY,CAACC,KAAK;MAAC,GAAAP,IAAA;IAAA,EAC/B,CAAC;EAEN;AACF;AAAC,IAAAa,gBAAA,CAAAJ,OAAA,EAtBKZ,OAAO,iBACU,SAAS;AAAA,IAAAgB,gBAAA,CAAAJ,OAAA,EAD1BZ,OAAO,WAEIH,KAAK;AAAA,IAAAmB,gBAAA,CAAAJ,OAAA,EAFhBZ,OAAO,aAGM,CAAC,IAAAiB,4BAAmB,EAAC,CAAC,CAAC;AAAA,IAAAD,gBAAA,CAAAJ,OAAA,EAHpCZ,OAAO,kBAIW;EACpBkB,GAAG,EAAE,SAAS;EACdV,WAAW,EAAE;AACf,CAAC;AAAA,IAAAW,QAAA,GAAAC,OAAA,CAAAR,OAAA,GAiBY,IAAAS,qBAAe,EAACrB,OAAO,CAAC","ignoreList":[]}
|
package/lib/cjs/index.d.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { BoxProps } from '@semcore/base-components';\nimport type { Intergalactic } from '@semcore/core';\n\nexport type DividerProps = BoxProps & {\n /**\n * Type of the divider\n * @default primary\n */\n use?: 'primary' | 'secondary';\n /**\n * Theme of the divider\n */\n theme?: string | 'invert';\n /**\n * Orientation of the divider\n * @default horizontal\n */\n orientation?: 'horizontal' | 'vertical';\n};\n\ndeclare const Divider: Intergalactic.Component<'div', DividerProps>;\n\nexport default Divider;\n"],"mappings":"","ignoreList":[]}
|
package/lib/cjs/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
Object.defineProperty(exports, "default", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function
|
|
10
|
-
return _Divider
|
|
9
|
+
get: function () {
|
|
10
|
+
return _Divider.default;
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
13
|
var _Divider = _interopRequireDefault(require("./Divider"));
|
package/lib/es6/Divider.js
CHANGED
|
@@ -1,53 +1,43 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _callSuper from "@babel/runtime/helpers/callSuper";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
2
|
import { sstyled as _sstyled } from "@semcore/core";
|
|
8
3
|
import { assignProps as _assignProps } from "@semcore/core";
|
|
4
|
+
import { Box } from '@semcore/base-components';
|
|
9
5
|
import { createComponent, Component, Root, sstyled } from '@semcore/core';
|
|
10
6
|
import resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';
|
|
11
|
-
import { Box } from '@semcore/flex-box';
|
|
12
7
|
import React from 'react';
|
|
13
8
|
/*!__reshadow-styles__:"./style/divider.shadow.css"*/
|
|
14
|
-
|
|
9
|
+
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SDivider_j4ark_gg_{display:block}.___SDivider_j4ark_gg_._use_primary_j4ark_gg_{background-color:var(--theme_j4ark, var(--intergalactic-border-primary, #c4c7cf))}.___SDivider_j4ark_gg_._use_primary_j4ark_gg_.___SDivider_j4ark_gg_._theme_default_j4ark_gg_{background:var(--intergalactic-border-primary, #c4c7cf)}.___SDivider_j4ark_gg_._use_primary_j4ark_gg_.___SDivider_j4ark_gg_._theme_invert_j4ark_gg_{background-color:var(--intergalactic-border-primary-invert, #ffffff);opacity:.2}.___SDivider_j4ark_gg_._orientation_horizontal_j4ark_gg_.___SDivider_j4ark_gg_._use_secondary_j4ark_gg_{background-image:linear-gradient(to right,var(--intergalactic-border-primary, #c4c7cf) 3px,transparent 1px);background-size:5px 1px}.___SDivider_j4ark_gg_._orientation_horizontal_j4ark_gg_.___SDivider_j4ark_gg_._use_secondary_j4ark_gg_.___SDivider_j4ark_gg_._theme_default_j4ark_gg_{background:linear-gradient(to right,var(--intergalactic-border-primary, #c4c7cf) 3px,transparent 1px);background-size:5px 1px}.___SDivider_j4ark_gg_._orientation_horizontal_j4ark_gg_.___SDivider_j4ark_gg_._use_secondary_j4ark_gg_.___SDivider_j4ark_gg_._theme_invert_j4ark_gg_{background-image:linear-gradient(to right,var(--intergalactic-border-primary-invert, #ffffff) 3px,transparent 1px);opacity:.2;background-size:5px 1px}.___SDivider_j4ark_gg_._orientation_vertical_j4ark_gg_.___SDivider_j4ark_gg_._use_secondary_j4ark_gg_,.___SDivider_j4ark_gg_._orientation_vertical_j4ark_gg_.___SDivider_j4ark_gg_._use_secondary_j4ark_gg_.___SDivider_j4ark_gg_._theme_default_j4ark_gg_{background-image:linear-gradient(to bottom,var(--intergalactic-border-primary, #c4c7cf) 3px,transparent 1px);background-size:1px 5px}.___SDivider_j4ark_gg_._orientation_vertical_j4ark_gg_.___SDivider_j4ark_gg_._use_secondary_j4ark_gg_.___SDivider_j4ark_gg_._theme_invert_j4ark_gg_{background-image:linear-gradient(to bottom,var(--intergalactic-border-primary-invert, #ffffff) 3px,transparent 1px);opacity:.2;background-size:1px 5px}.___SDivider_j4ark_gg_._orientation_horizontal_j4ark_gg_{width:100%;height:1px}.___SDivider_j4ark_gg_._orientation_vertical_j4ark_gg_{width:1px;height:auto;min-height:100%;align-self:stretch;flex-shrink:0}.___SDivider_j4ark_gg_.__theme_j4ark_gg_._use_primary_j4ark_gg_:not(._theme_default_j4ark_gg_):not(._theme_invert_j4ark_gg_){background-color:var(--theme_j4ark)}.___SDivider_j4ark_gg_.__theme_j4ark_gg_._use_secondary_j4ark_gg_:not(._theme_default_j4ark_gg_):not(._theme_invert_j4ark_gg_){background-image:linear-gradient(to right,var(--theme_j4ark) 3px,transparent 1px)}", /*__inner_css_end__*/"j4ark_gg_"),
|
|
15
10
|
/*__reshadow_css_end__*/
|
|
16
11
|
{
|
|
17
|
-
"__SDivider": "
|
|
18
|
-
"_use_primary": "
|
|
19
|
-
"--theme": "--
|
|
20
|
-
"_theme_default": "
|
|
21
|
-
"_theme_invert": "
|
|
22
|
-
"_orientation_horizontal": "
|
|
23
|
-
"_use_secondary": "
|
|
24
|
-
"_orientation_vertical": "
|
|
25
|
-
"_theme": "
|
|
12
|
+
"__SDivider": "___SDivider_j4ark_gg_",
|
|
13
|
+
"_use_primary": "_use_primary_j4ark_gg_",
|
|
14
|
+
"--theme": "--theme_j4ark",
|
|
15
|
+
"_theme_default": "_theme_default_j4ark_gg_",
|
|
16
|
+
"_theme_invert": "_theme_invert_j4ark_gg_",
|
|
17
|
+
"_orientation_horizontal": "_orientation_horizontal_j4ark_gg_",
|
|
18
|
+
"_use_secondary": "_use_secondary_j4ark_gg_",
|
|
19
|
+
"_orientation_vertical": "_orientation_vertical_j4ark_gg_",
|
|
20
|
+
"_theme": "__theme_j4ark_gg_"
|
|
26
21
|
});
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
var _this$asProps = this.asProps,
|
|
40
|
-
orientation = _this$asProps.orientation,
|
|
41
|
-
resolveColor = _this$asProps.resolveColor,
|
|
42
|
-
theme = _this$asProps.theme;
|
|
43
|
-
return _ref2 = sstyled(this.asProps.styles), /*#__PURE__*/React.createElement(SDivider, _ref2.cn("SDivider", _objectSpread({}, _assignProps({
|
|
22
|
+
class Divider extends Component {
|
|
23
|
+
render() {
|
|
24
|
+
var _ref = this.asProps,
|
|
25
|
+
_ref2;
|
|
26
|
+
const SDivider = Box;
|
|
27
|
+
const {
|
|
28
|
+
orientation,
|
|
29
|
+
resolveColor,
|
|
30
|
+
theme
|
|
31
|
+
} = this.asProps;
|
|
32
|
+
return _ref2 = sstyled(this.asProps.styles), /*#__PURE__*/React.createElement(SDivider, _ref2.cn("SDivider", {
|
|
33
|
+
..._assignProps({
|
|
44
34
|
"role": 'separator',
|
|
45
35
|
"aria-orientation": orientation,
|
|
46
36
|
"use:theme": resolveColor(theme)
|
|
47
|
-
}, _ref)
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
37
|
+
}, _ref)
|
|
38
|
+
}));
|
|
39
|
+
}
|
|
40
|
+
}
|
|
51
41
|
_defineProperty(Divider, "displayName", 'Divider');
|
|
52
42
|
_defineProperty(Divider, "style", style);
|
|
53
43
|
_defineProperty(Divider, "enhance", [resolveColorEnhance()]);
|
package/lib/es6/Divider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Divider.js","names":["createComponent","Component","Root","sstyled","resolveColorEnhance","
|
|
1
|
+
{"version":3,"file":"Divider.js","names":["Box","createComponent","Component","Root","sstyled","resolveColorEnhance","React","style","_sstyled","insert","Divider","render","_ref","asProps","_ref2","SDivider","orientation","resolveColor","theme","styles","createElement","cn","_assignProps","_defineProperty","use"],"sources":["../../src/Divider.jsx"],"sourcesContent":["import { Box } from '@semcore/base-components';\nimport { createComponent, Component, Root, sstyled } from '@semcore/core';\nimport resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';\nimport React from 'react';\n\nimport style from './style/divider.shadow.css';\n\nclass Divider extends Component {\n static displayName = 'Divider';\n static style = style;\n static enhance = [resolveColorEnhance()];\n static defaultProps = {\n use: 'primary',\n orientation: 'horizontal',\n };\n\n render() {\n const SDivider = Root;\n const { orientation, resolveColor, theme } = this.asProps;\n\n return sstyled(this.asProps.styles)(\n <SDivider\n render={Box}\n role='separator'\n aria-orientation={orientation}\n use:theme={resolveColor(theme)}\n />,\n );\n }\n}\n\nexport default createComponent(Divider);\n"],"mappings":";;;AAAA,SAASA,GAAG,QAAQ,0BAA0B;AAC9C,SAASC,eAAe,EAAEC,SAAS,EAAEC,IAAI,EAAEC,OAAO,QAAQ,eAAe;AACzE,OAAOC,mBAAmB,MAAM,sDAAsD;AACtF,OAAOC,KAAK,MAAM,OAAO;AAAC;AAAA,MAAAC,KAAA,8BAAAC,QAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAI1B,MAAMC,OAAO,SAASR,SAAS,CAAC;EAS9BS,MAAMA,CAAA,EAAG;IAAA,IAAAC,IAAA,QAAAC,OAAA;MAAAC,KAAA;IACP,MAAMC,QAAQ,GAKFf,GAAG;IAJf,MAAM;MAAEgB,WAAW;MAAEC,YAAY;MAAEC;IAAM,CAAC,GAAG,IAAI,CAACL,OAAO;IAEzD,OAAAC,KAAA,GAAOV,OAAO,CAAC,IAAI,CAACS,OAAO,CAACM,MAAM,CAAC,eACjCb,KAAA,CAAAc,aAAA,CAACL,QAAQ,EAAAD,KAAA,CAAAO,EAAA;MAAA,GAAAC,YAAA;QAAA,QAEF,WAAW;QAAA,oBACEN,WAAW;QAAA,aAClBC,YAAY,CAACC,KAAK;MAAC,GAAAN,IAAA;IAAA,EAC/B,CAAC;EAEN;AACF;AAACW,eAAA,CAtBKb,OAAO,iBACU,SAAS;AAAAa,eAAA,CAD1Bb,OAAO,WAEIH,KAAK;AAAAgB,eAAA,CAFhBb,OAAO,aAGM,CAACL,mBAAmB,CAAC,CAAC,CAAC;AAAAkB,eAAA,CAHpCb,OAAO,kBAIW;EACpBc,GAAG,EAAE,SAAS;EACdR,WAAW,EAAE;AACf,CAAC;AAiBH,eAAef,eAAe,CAACS,OAAO,CAAC","ignoreList":[]}
|
package/lib/es6/index.d.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { BoxProps } from '@semcore/base-components';\nimport type { Intergalactic } from '@semcore/core';\n\nexport type DividerProps = BoxProps & {\n /**\n * Type of the divider\n * @default primary\n */\n use?: 'primary' | 'secondary';\n /**\n * Theme of the divider\n */\n theme?: string | 'invert';\n /**\n * Orientation of the divider\n * @default horizontal\n */\n orientation?: 'horizontal' | 'vertical';\n};\n\ndeclare const Divider: Intergalactic.Component<'div', DividerProps>;\n\nexport default Divider;\n"],"mappings":"","ignoreList":[]}
|
package/lib/esm/Divider.mjs
CHANGED
|
@@ -1,54 +1,47 @@
|
|
|
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,
|
|
2
|
+
import { createComponent, sstyled, Component, assignProps } from "@semcore/core";
|
|
3
|
+
import { Box } from "@semcore/base-components";
|
|
8
4
|
import resolveColorEnhance from "@semcore/core/lib/utils/enhances/resolveColorEnhance";
|
|
9
|
-
import { Box } from "@semcore/flex-box";
|
|
10
5
|
import React from "react";
|
|
11
6
|
/*!__reshadow-styles__:"./style/divider.shadow.css"*/
|
|
12
|
-
|
|
7
|
+
const style = (
|
|
13
8
|
/*__reshadow_css_start__*/
|
|
14
9
|
(sstyled.insert(
|
|
15
10
|
/*__inner_css_start__*/
|
|
16
|
-
".
|
|
11
|
+
".___SDivider_j4ark_gg_{display:block}.___SDivider_j4ark_gg_._use_primary_j4ark_gg_{background-color:var(--theme_j4ark, var(--intergalactic-border-primary, #c4c7cf))}.___SDivider_j4ark_gg_._use_primary_j4ark_gg_.___SDivider_j4ark_gg_._theme_default_j4ark_gg_{background:var(--intergalactic-border-primary, #c4c7cf)}.___SDivider_j4ark_gg_._use_primary_j4ark_gg_.___SDivider_j4ark_gg_._theme_invert_j4ark_gg_{background-color:var(--intergalactic-border-primary-invert, #ffffff);opacity:.2}.___SDivider_j4ark_gg_._orientation_horizontal_j4ark_gg_.___SDivider_j4ark_gg_._use_secondary_j4ark_gg_{background-image:linear-gradient(to right,var(--intergalactic-border-primary, #c4c7cf) 3px,transparent 1px);background-size:5px 1px}.___SDivider_j4ark_gg_._orientation_horizontal_j4ark_gg_.___SDivider_j4ark_gg_._use_secondary_j4ark_gg_.___SDivider_j4ark_gg_._theme_default_j4ark_gg_{background:linear-gradient(to right,var(--intergalactic-border-primary, #c4c7cf) 3px,transparent 1px);background-size:5px 1px}.___SDivider_j4ark_gg_._orientation_horizontal_j4ark_gg_.___SDivider_j4ark_gg_._use_secondary_j4ark_gg_.___SDivider_j4ark_gg_._theme_invert_j4ark_gg_{background-image:linear-gradient(to right,var(--intergalactic-border-primary-invert, #ffffff) 3px,transparent 1px);opacity:.2;background-size:5px 1px}.___SDivider_j4ark_gg_._orientation_vertical_j4ark_gg_.___SDivider_j4ark_gg_._use_secondary_j4ark_gg_,.___SDivider_j4ark_gg_._orientation_vertical_j4ark_gg_.___SDivider_j4ark_gg_._use_secondary_j4ark_gg_.___SDivider_j4ark_gg_._theme_default_j4ark_gg_{background-image:linear-gradient(to bottom,var(--intergalactic-border-primary, #c4c7cf) 3px,transparent 1px);background-size:1px 5px}.___SDivider_j4ark_gg_._orientation_vertical_j4ark_gg_.___SDivider_j4ark_gg_._use_secondary_j4ark_gg_.___SDivider_j4ark_gg_._theme_invert_j4ark_gg_{background-image:linear-gradient(to bottom,var(--intergalactic-border-primary-invert, #ffffff) 3px,transparent 1px);opacity:.2;background-size:1px 5px}.___SDivider_j4ark_gg_._orientation_horizontal_j4ark_gg_{width:100%;height:1px}.___SDivider_j4ark_gg_._orientation_vertical_j4ark_gg_{width:1px;height:auto;min-height:100%;align-self:stretch;flex-shrink:0}.___SDivider_j4ark_gg_.__theme_j4ark_gg_._use_primary_j4ark_gg_:not(._theme_default_j4ark_gg_):not(._theme_invert_j4ark_gg_){background-color:var(--theme_j4ark)}.___SDivider_j4ark_gg_.__theme_j4ark_gg_._use_secondary_j4ark_gg_:not(._theme_default_j4ark_gg_):not(._theme_invert_j4ark_gg_){background-image:linear-gradient(to right,var(--theme_j4ark) 3px,transparent 1px)}",
|
|
17
12
|
/*__inner_css_end__*/
|
|
18
|
-
"
|
|
13
|
+
"j4ark_gg_"
|
|
19
14
|
), /*__reshadow_css_end__*/
|
|
20
15
|
{
|
|
21
|
-
"__SDivider": "
|
|
22
|
-
"_use_primary": "
|
|
23
|
-
"--theme": "--
|
|
24
|
-
"_theme_default": "
|
|
25
|
-
"_theme_invert": "
|
|
26
|
-
"_orientation_horizontal": "
|
|
27
|
-
"_use_secondary": "
|
|
28
|
-
"_orientation_vertical": "
|
|
29
|
-
"_theme": "
|
|
16
|
+
"__SDivider": "___SDivider_j4ark_gg_",
|
|
17
|
+
"_use_primary": "_use_primary_j4ark_gg_",
|
|
18
|
+
"--theme": "--theme_j4ark",
|
|
19
|
+
"_theme_default": "_theme_default_j4ark_gg_",
|
|
20
|
+
"_theme_invert": "_theme_invert_j4ark_gg_",
|
|
21
|
+
"_orientation_horizontal": "_orientation_horizontal_j4ark_gg_",
|
|
22
|
+
"_use_secondary": "_use_secondary_j4ark_gg_",
|
|
23
|
+
"_orientation_vertical": "_orientation_vertical_j4ark_gg_",
|
|
24
|
+
"_theme": "__theme_j4ark_gg_"
|
|
30
25
|
})
|
|
31
26
|
);
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
var _this$asProps = this.asProps, orientation = _this$asProps.orientation, resolveColor = _this$asProps.resolveColor, theme = _this$asProps.theme;
|
|
44
|
-
return _ref2 = sstyled(this.asProps.styles), /* @__PURE__ */ React.createElement(SDivider, _ref2.cn("SDivider", _objectSpread({}, assignProps({
|
|
27
|
+
class Divider extends Component {
|
|
28
|
+
render() {
|
|
29
|
+
var _ref = this.asProps, _ref2;
|
|
30
|
+
const SDivider = Box;
|
|
31
|
+
const {
|
|
32
|
+
orientation,
|
|
33
|
+
resolveColor,
|
|
34
|
+
theme
|
|
35
|
+
} = this.asProps;
|
|
36
|
+
return _ref2 = sstyled(this.asProps.styles), /* @__PURE__ */ React.createElement(SDivider, _ref2.cn("SDivider", {
|
|
37
|
+
...assignProps({
|
|
45
38
|
"role": "separator",
|
|
46
39
|
"aria-orientation": orientation,
|
|
47
40
|
"use:theme": resolveColor(theme)
|
|
48
|
-
}, _ref)
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
41
|
+
}, _ref)
|
|
42
|
+
}));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
52
45
|
_defineProperty(Divider, "displayName", "Divider");
|
|
53
46
|
_defineProperty(Divider, "style", style);
|
|
54
47
|
_defineProperty(Divider, "enhance", [resolveColorEnhance()]);
|
|
@@ -56,7 +49,7 @@ _defineProperty(Divider, "defaultProps", {
|
|
|
56
49
|
use: "primary",
|
|
57
50
|
orientation: "horizontal"
|
|
58
51
|
});
|
|
59
|
-
const
|
|
52
|
+
const Divider_default = createComponent(Divider);
|
|
60
53
|
export {
|
|
61
|
-
|
|
54
|
+
Divider_default as default
|
|
62
55
|
};
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { BoxProps } from '@semcore/base-components';
|
|
2
|
+
import type { Intergalactic } from '@semcore/core';
|
|
3
3
|
|
|
4
|
-
/** @deprecated */
|
|
5
|
-
export interface IDividerProps extends DividerProps, UnknownProperties {}
|
|
6
4
|
export type DividerProps = BoxProps & {
|
|
7
5
|
/**
|
|
8
6
|
* Type of the divider
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/divider",
|
|
3
3
|
"description": "Semrush Divider Component",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "17.0.0-prerelease.18",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -13,11 +13,8 @@
|
|
|
13
13
|
"import": "./lib/esm/index.mjs",
|
|
14
14
|
"types": "./lib/types/index.d.ts"
|
|
15
15
|
},
|
|
16
|
-
"dependencies": {
|
|
17
|
-
"@semcore/flex-box": "16.0.11"
|
|
18
|
-
},
|
|
19
16
|
"peerDependencies": {
|
|
20
|
-
"@semcore/base-components": "^
|
|
17
|
+
"@semcore/base-components": "^17.0.0-prerelease.18"
|
|
21
18
|
},
|
|
22
19
|
"repository": {
|
|
23
20
|
"type": "git",
|
|
@@ -25,8 +22,9 @@
|
|
|
25
22
|
"directory": "semcore/divider"
|
|
26
23
|
},
|
|
27
24
|
"devDependencies": {
|
|
28
|
-
"@semcore/core": "
|
|
29
|
-
"@semcore/testing-utils": "1.0.0"
|
|
25
|
+
"@semcore/core": "17.0.0-prerelease.18",
|
|
26
|
+
"@semcore/testing-utils": "1.0.0",
|
|
27
|
+
"@semcore/base-components": "17.0.0-prerelease.18"
|
|
30
28
|
},
|
|
31
29
|
"scripts": {
|
|
32
30
|
"build": "pnpm semcore-builder --source=js && pnpm vite build"
|