@nu-art/ts-styles 0.200.72 → 0.200.74

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/icons/icons.d.ts CHANGED
@@ -67,6 +67,10 @@ export declare const TS_Icons: {
67
67
  component: (props: IconAttributes) => JSX.Element;
68
68
  url: any;
69
69
  };
70
+ menu: {
71
+ component: (props: IconAttributes) => JSX.Element;
72
+ url: any;
73
+ };
70
74
  };
71
75
  export declare const tsIconKeys: () => TSIcons[];
72
76
  export type TSIconsType = typeof TS_Icons;
package/icons/icons.js CHANGED
@@ -17,10 +17,11 @@ const icon__information_svg_1 = require("./svgs/icon__information.svg");
17
17
  const icon__filter_stop_svg_1 = require("./svgs/icon__filter-stop.svg");
18
18
  const icon__clear_svg_1 = require("./svgs/icon__clear.svg");
19
19
  const icon__save_svg_1 = require("./svgs/icon__save.svg");
20
+ const icon__menu_svg_1 = require("./svgs/icon__menu.svg");
20
21
  class RenderIcon extends React.Component {
21
22
  render() {
22
23
  var _a;
23
- const className = 'icon--wrapper' + ((_a = this.props.className) !== null && _a !== void 0 ? _a : '');
24
+ const className = 'icon--wrapper ' + ((_a = this.props.className) !== null && _a !== void 0 ? _a : '');
24
25
  return React.createElement("div", Object.assign({}, this.props, { className: className, style: { WebkitMaskImage: `url(${this.props.icon})`, maskImage: `url(${this.props.icon})` } }));
25
26
  }
26
27
  }
@@ -31,7 +32,7 @@ exports.iconsRenderer = iconsRenderer;
31
32
  const genIcon = (Icon) => {
32
33
  return (props) => {
33
34
  var _a;
34
- return React.createElement("div", Object.assign({}, props, { className: 'icon--wrapper' + ((_a = props.className) !== null && _a !== void 0 ? _a : '') }),
35
+ return React.createElement("div", Object.assign({}, props, { className: 'icon--wrapper ' + ((_a = props.className) !== null && _a !== void 0 ? _a : '') }),
35
36
  React.createElement(Icon, null));
36
37
  };
37
38
  };
@@ -50,6 +51,7 @@ exports.TS_Icons = {
50
51
  filterStop: { component: genIcon(icon__filter_stop_svg_1.ReactComponent), url: icon__filter_stop_svg_1.default },
51
52
  clear: { component: genIcon(icon__clear_svg_1.ReactComponent), url: icon__clear_svg_1.default },
52
53
  save: { component: genIcon(icon__save_svg_1.ReactComponent), url: icon__save_svg_1.default },
54
+ menu: { component: genIcon(icon__menu_svg_1.ReactComponent), url: icon__menu_svg_1.default },
53
55
  };
54
56
  const tsIconKeys = () => {
55
57
  return (0, ts_common_1._keys)(exports.TS_Icons);
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
2
+ <path
3
+ d="M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"/>
4
+ </svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nu-art/ts-styles",
3
- "version": "0.200.72",
3
+ "version": "0.200.74",
4
4
  "author": "nu-art",
5
5
  "description": "Styles by Cipher",
6
6
  "main": "dist/index.js",
@@ -13,7 +13,7 @@
13
13
  "linkDirectory": true
14
14
  },
15
15
  "dependencies": {
16
- "@nu-art/ts-common": "0.200.72",
16
+ "@nu-art/ts-common": "0.200.74",
17
17
  "react": "^18.2.0"
18
18
  },
19
19
  "devDependencies": {
@@ -0,0 +1,25 @@
1
+ /// Sets backgrounds for element based on mouse interaction
2
+ ///
3
+ /// @param $bg - base background
4
+ /// @param $bgh - background when mouse hover
5
+ /// @param $bga - background when mouse click
6
+ ///
7
+ @mixin mouse-interactive-background($bg, $bg-h: $bg ,$bg-a: $bg-h) {
8
+ background: $bg;
9
+ &:hover {
10
+ background: $bg-h;
11
+ }
12
+ &:active {
13
+ background: $bg-a;
14
+ }
15
+ }
16
+
17
+ @mixin mouse-interactive-text($c,$c-h,$c-a) {
18
+ color: $c;
19
+ &:hover {
20
+ color: $c-h;
21
+ }
22
+ &:active {
23
+ color: $c-a;
24
+ }
25
+ }
@@ -0,0 +1,2 @@
1
+ @forward "elements";
2
+ @forward "svgs";
@@ -1,18 +1,14 @@
1
1
  @use '../consts' as consts;
2
2
 
3
- /// Sets backgrounds for element based on mouse interaction
4
- ///
5
- /// @param $bg - base background
6
- /// @param $bgh - background when mouse hover
7
- /// @param $bga - background when mouse click
8
- ///
9
- @mixin mouse-interactive-background($bg, $bg-h: $bg ,$bg-a: $bg-h) {
10
- background: $bg;
11
- &:hover {
12
- background: $bg-h;
3
+ @mixin setIconProp($prop,$value) {
4
+ *:not([data-no-#{$prop}="true"]):not(g) {
5
+ #{$prop}: $value;
13
6
  }
14
- &:active {
15
- background: $bg-a;
7
+ }
8
+
9
+ @mixin color-svg($color) {
10
+ @each $rule in consts.$svg-prop-rules {
11
+ @include setIconProp($rule, $color);
16
12
  }
17
13
  }
18
14
 
@@ -36,10 +32,4 @@
36
32
  @include setIconProp($rule, $color-a);
37
33
  }
38
34
  }
39
- }
40
-
41
- @mixin setIconProp($prop,$value) {
42
- *:not([data-no-#{$prop}="true"]):not(g) {
43
- #{$prop}: $value;
44
- }
45
35
  }
package/styles/index.scss CHANGED
@@ -1,5 +1,5 @@
1
+ @forward "colors";
1
2
  @forward "palette";
2
- @forward "mouse-interaction";
3
3
  @forward "scroll-bar";
4
4
  @forward "shapes";
5
5
  @forward "text";
@@ -0,0 +1,7 @@
1
+ @mixin hide-scroll-bar {
2
+ -ms-overflow-style: none; // IE10+
3
+ scrollbar-width: none; // Firefox
4
+ &::-webkit-scrollbar {
5
+ display: none; // Safari & Chrome
6
+ }
7
+ }
@@ -1 +1,2 @@
1
- @forward "custom-scroll-bar";
1
+ @forward "custom-scroll-bar";
2
+ @forward "general";
@@ -1 +0,0 @@
1
- @forward "mouse-interactive-colors";