@homecode/ui 4.18.55 → 4.18.57

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/dist/esm/index.js CHANGED
@@ -13,7 +13,6 @@ export { Form } from './src/components/Form/Form.js';
13
13
  export { Gallery } from './src/components/Gallery/Gallery.js';
14
14
  export { Heading } from './src/components/Heading/Heading.js';
15
15
  export { Icon, icons } from './src/components/Icon/Icon.js';
16
- export { IconButton } from './src/components/IconButton/IconButton.js';
17
16
  export { Input } from './src/components/Input/Input.js';
18
17
  export { InputFile } from './src/components/InputFile/InputFile.js';
19
18
  export { Label } from './src/components/Label/Label.js';
@@ -6,9 +6,9 @@ import S from './Button.styl.js';
6
6
  import { focusOnClick } from './Button.helpers.js';
7
7
 
8
8
  function Button(props) {
9
- const { className, loading, checked, square, onMouseUp, children, type = 'button', variant = 'default', size = 'm', prefixElem, postfixElem, onRef, ...rest } = props;
9
+ const { className, loading, checked, square, round, onMouseUp, children, type = 'button', variant = 'default', size = 'm', prefixElem, postfixElem, onRef, ...rest } = props;
10
10
  const { disabled } = props;
11
- const classes = cn(S.root, S[`size-${size}`], S[`variant-${variant}`], loading && S.loading, checked && S.checked, square && S.square, className);
11
+ const classes = cn(S.root, S[`size-${size}`], S[`variant-${variant}`], loading && S.loading, checked && S.checked, square && S.square, round && S.round, className);
12
12
  const [buttonElem, setButtonElem] = useState(null);
13
13
  const onRefHandler = useCallback(elem => {
14
14
  if (onRef)
@@ -1,7 +1,7 @@
1
1
  import styleInject from '../../../node_modules/style-inject/dist/style-inject.es.js';
2
2
 
3
- var css_248z = ".Button_root__SZns2{align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-shadow:inset 0 0 0 2px none;box-sizing:border-box;color:inherit;cursor:pointer;display:inline-flex;justify-content:center;line-height:1em;text-decoration:none;transition:.2s ease-out;transition-property:background-color,box-shadow,opacity;-webkit-user-select:none;-moz-user-select:none;user-select:none}.Button_root__SZns2:focus,.Button_root__SZns2:hover{background-color:var(--active-color-alpha-100)}.Button_root__SZns2[disabled]{background-color:var(--accent-color-alpha-100);opacity:.4;pointer-events:none}.Button_postfix__DwG-n,.Button_prefix__czqd5{display:flex}.Button_prefix__czqd5:not(:last-child){margin-right:.5em}.Button_postfix__DwG-n:not(:first-child){margin-left:.5em}.Button_size-s__-SIY1{border-radius:4px;font-size:16px;min-height:30px;min-width:30px;padding:0 8px}.Button_size-s__-SIY1.Button_square__eYSY3{max-height:30px;width:30px}.Button_size-m__TBXc-{border-radius:6px;font-size:20px;min-height:40px;min-width:40px;padding:0 12px}.Button_size-m__TBXc-.Button_square__eYSY3{max-height:40px;width:40px}.Button_size-l__Sx37T{border-radius:8px;font-size:24px;min-height:50px;min-width:50px;padding:0 14px}.Button_size-l__Sx37T.Button_square__eYSY3{max-height:50px}.Button_square__eYSY3{justify-content:center;padding:0}.Button_variant-clear__z1HZm:focus,.Button_variant-clear__z1HZm:hover,.Button_variant-default__vbo51:focus,.Button_variant-default__vbo51:hover{background-color:var(--active-color-alpha-300)}.Button_variant-clear__z1HZm{background-color:transparent}.Button_variant-default__vbo51{background-color:var(--accent-color-alpha-100)}.Button_variant-outlined__shnIq{background-color:transparent;box-shadow:inset 0 0 0 2px var(--accent-color)}.Button_variant-outlined__shnIq:focus{background-color:var(--active-color-alpha-300);box-shadow:inset 0 0 0 2px var(--active-color)}.Button_variant-primary__zhEQI{background-color:var(--active-color);color:var(--accent-color-alpha-900)}.Button_variant-primary__zhEQI:hover{background-color:var(--active-color-alpha-800)}.Button_variant-primary__zhEQI:focus{background-color:var(--active-color);box-shadow:inset 0 0 0 2px var(--accent-color)}.Button_spinner__ttaMr{margin-left:var(--indent-s)}.Button_root__SZns2:active,.Button_root__SZns2:hover{background-color:var(--active-color-alpha-300)}.Button_root__SZns2:active{opacity:.7}.Button_root__SZns2.Button_loading__c4pdo{pointer-events:none}.Button_root__SZns2.Button_checked__X7f58,.Button_root__SZns2.Button_checked__X7f58:hover{background-color:var(--accent-color);box-shadow:none;color:var(--decent-color)}.Button_root__SZns2.Button_checked__X7f58 path{fill:var(--decent-color)}";
4
- var S = {"root":"Button_root__SZns2","prefix":"Button_prefix__czqd5","postfix":"Button_postfix__DwG-n","size-s":"Button_size-s__-SIY1","square":"Button_square__eYSY3","size-m":"Button_size-m__TBXc-","size-l":"Button_size-l__Sx37T","variant-clear":"Button_variant-clear__z1HZm","variant-default":"Button_variant-default__vbo51","variant-outlined":"Button_variant-outlined__shnIq","variant-primary":"Button_variant-primary__zhEQI","spinner":"Button_spinner__ttaMr","loading":"Button_loading__c4pdo","checked":"Button_checked__X7f58"};
3
+ var css_248z = ".Button_root__SZns2{align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-shadow:inset 0 0 0 2px none;box-sizing:border-box;color:inherit;cursor:pointer;display:inline-flex;justify-content:center;line-height:1em;text-decoration:none;transition:.2s ease-out;transition-property:background-color,box-shadow,opacity;-webkit-user-select:none;-moz-user-select:none;user-select:none}.Button_root__SZns2:focus,.Button_root__SZns2:hover{background-color:var(--active-color-alpha-100)}.Button_root__SZns2[disabled]{background-color:var(--accent-color-alpha-100);opacity:.4;pointer-events:none}.Button_root__SZns2:active{opacity:.7}.Button_root__SZns2.Button_loading__c4pdo{pointer-events:none}.Button_root__SZns2.Button_checked__X7f58,.Button_root__SZns2.Button_checked__X7f58:hover{background-color:var(--accent-color);box-shadow:none;color:var(--decent-color)}.Button_root__SZns2.Button_checked__X7f58 path{fill:var(--decent-color)}.Button_postfix__DwG-n,.Button_prefix__czqd5{display:flex}.Button_prefix__czqd5:not(:last-child){margin-right:.5em}.Button_postfix__DwG-n:not(:first-child){margin-left:.5em}.Button_size-s__-SIY1{border-radius:4px;font-size:16px;min-height:30px;min-width:30px;padding:0 8px}.Button_size-s__-SIY1.Button_square__eYSY3{max-height:30px;width:30px}.Button_size-m__TBXc-{border-radius:6px;font-size:20px;min-height:40px;min-width:40px;padding:0 12px}.Button_size-m__TBXc-.Button_square__eYSY3{max-height:40px;width:40px}.Button_size-l__Sx37T{border-radius:8px;font-size:24px;min-height:50px;min-width:50px;padding:0 14px}.Button_size-l__Sx37T.Button_square__eYSY3{max-height:50px}.Button_square__eYSY3{justify-content:center;padding:0}.Button_round__Bxofy.Button_size-s__-SIY1{border-radius:15px}.Button_round__Bxofy.Button_size-m__TBXc-{border-radius:20px}.Button_round__Bxofy.Button_size-l__Sx37T{border-radius:25px}.Button_variant-clear__z1HZm:active,.Button_variant-clear__z1HZm:focus,.Button_variant-clear__z1HZm:hover,.Button_variant-default__vbo51:active,.Button_variant-default__vbo51:focus,.Button_variant-default__vbo51:hover,.Button_variant-outlined__shnIq:active,.Button_variant-outlined__shnIq:hover,.Button_variant-primary__zhEQI:active,.Button_variant-primary__zhEQI:hover{background-color:var(--active-color-alpha-300)}.Button_variant-text__oCx0X{background-color:transparent}.Button_variant-text__oCx0X:hover{background-color:transparent!important;color:var(--active-color)}.Button_variant-text__oCx0X:focus{background-color:transparent;color:var(--active-color)}.Button_variant-clear__z1HZm{background-color:transparent}.Button_variant-default__vbo51{background-color:var(--accent-color-alpha-100)}.Button_variant-outlined__shnIq{background-color:transparent;box-shadow:inset 0 0 0 2px var(--accent-color)}.Button_variant-outlined__shnIq:focus{background-color:var(--active-color-alpha-300);box-shadow:inset 0 0 0 2px var(--active-color)}.Button_variant-primary__zhEQI{background-color:var(--active-color);color:var(--accent-color-alpha-900)}.Button_variant-primary__zhEQI:hover{background-color:var(--active-color-alpha-800)}.Button_variant-primary__zhEQI:focus{background-color:var(--active-color);box-shadow:inset 0 0 0 2px var(--accent-color)}.Button_spinner__ttaMr{margin-left:var(--indent-s)}";
4
+ var S = {"root":"Button_root__SZns2","loading":"Button_loading__c4pdo","checked":"Button_checked__X7f58","prefix":"Button_prefix__czqd5","postfix":"Button_postfix__DwG-n","size-s":"Button_size-s__-SIY1","square":"Button_square__eYSY3","size-m":"Button_size-m__TBXc-","size-l":"Button_size-l__Sx37T","round":"Button_round__Bxofy","variant-clear":"Button_variant-clear__z1HZm","variant-default":"Button_variant-default__vbo51","variant-outlined":"Button_variant-outlined__shnIq","variant-primary":"Button_variant-primary__zhEQI","variant-text":"Button_variant-text__oCx0X","spinner":"Button_spinner__ttaMr"};
5
5
  styleInject(css_248z);
6
6
 
7
7
  export { S as default };
@@ -1,6 +1,6 @@
1
1
  import styleInject from '../../../node_modules/style-inject/dist/style-inject.es.js';
2
2
 
3
- var css_248z = ".Icon_root__Uzney{color:inherit;display:inline-block;pointer-events:none}.Icon_size-xs__T-Npk{height:8px;width:8px}.Icon_size-s__qftZG{height:12px;width:12px}.Icon_size-m__7xCDX{height:16px;width:16px}.Icon_size-l__Eq1Fb{height:20px;width:20px}.Icon_size-xl__ChZL5{height:26px;width:26px}";
3
+ var css_248z = ".Icon_root__Uzney{color:inherit;display:inline-block;pointer-events:none}.Icon_size-xs__T-Npk{height:12px;width:12px}.Icon_size-s__qftZG{height:18px;width:18px}.Icon_size-m__7xCDX{height:22px;width:22px}.Icon_size-l__Eq1Fb{height:28px;width:28px}.Icon_size-xl__ChZL5{height:34px;width:34px}";
4
4
  var S = {"root":"Icon_root__Uzney","size-xs":"Icon_size-xs__T-Npk","size-s":"Icon_size-s__qftZG","size-m":"Icon_size-m__7xCDX","size-l":"Icon_size-l__Eq1Fb","size-xl":"Icon_size-xl__ChZL5"};
5
5
  styleInject(css_248z);
6
6
 
@@ -37,7 +37,6 @@ import '../Form/SubmitButtons/SubmitButtons.styl.js';
37
37
  import '../Spinner/Spinner.styl.js';
38
38
  import '../Gallery/Gallery.styl.js';
39
39
  import '../Heading/Heading.js';
40
- import '../IconButton/IconButton.styl.js';
41
40
  import '../InputFile/InputFile.styl.js';
42
41
  import '../InputFile/Item/Item.styl.js';
43
42
  import '../LightBox/LightBox.styl.js';
@@ -39,7 +39,6 @@ import '../Form/Validator.js';
39
39
  import '../Form/SubmitButtons/SubmitButtons.styl.js';
40
40
  import '../Gallery/Gallery.styl.js';
41
41
  import '../Heading/Heading.js';
42
- import '../IconButton/IconButton.styl.js';
43
42
  import '../LightBox/LightBox.styl.js';
44
43
  import '../Notifications/Notifications.js';
45
44
  import '../PopupMenu/PopupMenu.styl.js';
@@ -13,6 +13,7 @@ const getEventCoords = e => ({
13
13
  x: e.clientX,
14
14
  y: e.clientY,
15
15
  });
16
+ const OFFSET_THRESHOL = 5;
16
17
  const AXES = ['x', 'y'];
17
18
  const BY_AXIS = {
18
19
  x: {
@@ -66,6 +67,12 @@ class Scroll extends Component {
66
67
  isScrolling: false,
67
68
  activeAxis: null,
68
69
  coeff: { x: 0, y: 0 },
70
+ hasOffset: {
71
+ top: false,
72
+ left: false,
73
+ right: false,
74
+ bottom: false,
75
+ },
69
76
  });
70
77
  }
71
78
  componentDidMount() {
@@ -81,13 +88,13 @@ class Scroll extends Component {
81
88
  eachAxis = fn => AXES.map(axis => this.props[axis] && fn(axis));
82
89
  observeScrollHeight = () => {
83
90
  this.eachAxis(axis => {
84
- if ((this.props[axis] && this.isScrollChanged(axis)) ||
85
- this.isBoudingsChanged(axis)) {
91
+ const needUpdate = (this.props[axis] && this.isScrollSizeChanged(axis)) ||
92
+ this.isBoudingsChanged(axis);
93
+ if (needUpdate)
86
94
  this.update(axis);
87
- }
88
95
  });
89
96
  };
90
- isScrollChanged(axis) {
97
+ isScrollSizeChanged(axis) {
91
98
  const currScrolls = this.getScrollSize(axis);
92
99
  const isChanged = this.prevScrolls[axis] !== currScrolls[axis];
93
100
  if (isChanged)
@@ -120,6 +127,7 @@ class Scroll extends Component {
120
127
  getPosStyle = axis => `${this.pos[axis]}px`;
121
128
  updateAll = () => {
122
129
  this.eachAxis(this.update);
130
+ this.updateHasOffsets();
123
131
  };
124
132
  update = axis => {
125
133
  this.updateCoeff(axis);
@@ -134,7 +142,7 @@ class Scroll extends Component {
134
142
  if (thumb)
135
143
  thumb.style[sizeField] = this.getCoeffStyle(axis);
136
144
  }
137
- updatePos = axis => {
145
+ updatePos(axis) {
138
146
  const thumb = this.thumbELem[axis].current;
139
147
  if (!this.innerElem || !thumb)
140
148
  return;
@@ -154,14 +162,29 @@ class Scroll extends Component {
154
162
  this.pos[axis] = pos;
155
163
  // thumb.style.transform = `translate${AXIS}(${pos}px)`;
156
164
  thumb.style[posField] = this.getPosStyle(axis);
157
- };
158
- updateScroll = (axis, e) => {
165
+ }
166
+ updateScroll(axis, e) {
159
167
  const coords = getEventCoords(e);
160
168
  const scrollPos = BY_AXIS[axis].scrollPos;
161
169
  const pos = coords[axis] - this.prevCoords[axis];
162
170
  this.prevCoords = coords;
163
171
  this.innerElem[scrollPos] += pos / this.store.coeff[axis];
164
- };
172
+ }
173
+ updateHasOffsets() {
174
+ const { x, y } = this.props;
175
+ const { hasOffset } = this.store;
176
+ const { scrollTop, scrollLeft, scrollHeight, scrollWidth, offsetHeight, offsetWidth, } = this.innerElem;
177
+ if (y) {
178
+ hasOffset.top = scrollTop > 0;
179
+ hasOffset.bottom =
180
+ scrollHeight - (scrollTop + offsetHeight) > OFFSET_THRESHOL;
181
+ }
182
+ if (x && !(hasOffset.top || hasOffset.bottom)) {
183
+ hasOffset.left = scrollLeft > 0;
184
+ hasOffset.right =
185
+ scrollWidth - (scrollLeft + offsetWidth) > OFFSET_THRESHOL;
186
+ }
187
+ }
165
188
  dropScrollingState = debounce(() => (this.store.isScrolling = false), 2000);
166
189
  subscribePointerMoveUp = () => {
167
190
  document.addEventListener('pointermove', this.onPointerMove, {
@@ -186,10 +209,11 @@ class Scroll extends Component {
186
209
  return;
187
210
  const { onScroll } = this.props;
188
211
  const { activeAxis, isScrolling } = this.store;
212
+ this.updateHasOffsets();
189
213
  onScroll?.(e);
190
214
  if (!activeAxis) {
191
215
  this.eachAxis(axis => {
192
- if (this.isScrollChanged(axis))
216
+ if (this.isScrollSizeChanged(axis))
193
217
  this.update(axis);
194
218
  });
195
219
  }
@@ -241,8 +265,8 @@ class Scroll extends Component {
241
265
  };
242
266
  renderInner() {
243
267
  const { innerClassName, innerProps, children, smooth } = this.props;
244
- const { activeAxis } = this.store;
245
- const innerClasses = cn(S.inner, innerProps?.className, innerClassName, !activeAxis && smooth && S.smooth);
268
+ const { activeAxis, hasOffset } = this.store;
269
+ const innerClasses = cn(S.inner, innerProps?.className, innerClassName, !activeAxis && smooth && S.smooth, hasOffset.top && S.hasOffsetTop, hasOffset.bottom && S.hasOffsetBottom, hasOffset.right && S.hasOffsetRight, hasOffset.left && S.hasOffsetLeft);
246
270
  const props = { ...innerProps };
247
271
  props.onScrollCapture = this.onInnerScroll;
248
272
  return (createElement("div", { ...props, className: innerClasses, ref: this.onInnerRef, key: "inner" }, children));
@@ -1,7 +1,7 @@
1
1
  import styleInject from '../../../node_modules/style-inject/dist/style-inject.es.js';
2
2
 
3
- var css_248z = ".Scroll_root__NNx5K{--hide-delay:0.3s;display:flex;overflow:hidden;position:relative}.Scroll_inner__DmxTb{-webkit-overflow-scrolling:touch;-ms-overflow-style:none;overflow:hidden;position:relative;scrollbar-width:none;width:100%}.Scroll_inner__DmxTb.Scroll_smooth__2vqKe{scroll-behavior:smooth}.Scroll_inner__DmxTb::-webkit-scrollbar{display:none}.Scroll_y__2xWol .Scroll_inner__DmxTb{max-height:100%;overflow-y:auto}.Scroll_x__--Ycm .Scroll_inner__DmxTb{max-width:100%;overflow-x:auto}.Scroll_y__2xWol.Scroll_fadeSize-s__WeI0f .Scroll_inner__DmxTb{-webkit-mask-image:linear-gradient(180deg,transparent 2px,#000 10px,#000 calc(100% - 10px),transparent);mask-image:linear-gradient(180deg,transparent 2px,#000 10px,#000 calc(100% - 10px),transparent)}.Scroll_x__--Ycm.Scroll_fadeSize-s__WeI0f .Scroll_inner__DmxTb{-webkit-mask-image:linear-gradient(90deg,transparent 2px,#000 10px,#000 calc(100% - 10px),transparent);mask-image:linear-gradient(90deg,transparent 2px,#000 10px,#000 calc(100% - 10px),transparent)}.Scroll_y__2xWol.Scroll_fadeSize-m__Hb-1p .Scroll_inner__DmxTb{-webkit-mask-image:linear-gradient(180deg,transparent 2px,#000 16px,#000 calc(100% - 16px),transparent);mask-image:linear-gradient(180deg,transparent 2px,#000 16px,#000 calc(100% - 16px),transparent)}.Scroll_x__--Ycm.Scroll_fadeSize-m__Hb-1p .Scroll_inner__DmxTb{-webkit-mask-image:linear-gradient(90deg,transparent 2px,#000 16px,#000 calc(100% - 16px),transparent);mask-image:linear-gradient(90deg,transparent 2px,#000 16px,#000 calc(100% - 16px),transparent)}.Scroll_y__2xWol.Scroll_fadeSize-l__E0CbA .Scroll_inner__DmxTb{-webkit-mask-image:linear-gradient(180deg,transparent 2px,#000 20px,#000 calc(100% - 20px),transparent);mask-image:linear-gradient(180deg,transparent 2px,#000 20px,#000 calc(100% - 20px),transparent)}.Scroll_x__--Ycm.Scroll_fadeSize-l__E0CbA .Scroll_inner__DmxTb{-webkit-mask-image:linear-gradient(90deg,transparent 2px,#000 20px,#000 calc(100% - 20px),transparent);mask-image:linear-gradient(90deg,transparent 2px,#000 20px,#000 calc(100% - 20px),transparent)}.Scroll_y__2xWol.Scroll_fadeSize-xl__jcYk0 .Scroll_inner__DmxTb{-webkit-mask-image:linear-gradient(180deg,transparent 2px,#000 30px,#000 calc(100% - 30px),transparent);mask-image:linear-gradient(180deg,transparent 2px,#000 30px,#000 calc(100% - 30px),transparent)}.Scroll_x__--Ycm.Scroll_fadeSize-xl__jcYk0 .Scroll_inner__DmxTb{-webkit-mask-image:linear-gradient(90deg,transparent 2px,#000 30px,#000 calc(100% - 30px),transparent);mask-image:linear-gradient(90deg,transparent 2px,#000 30px,#000 calc(100% - 30px),transparent)}.Scroll_autoHide__URLqx:not(:hover)>.Scroll_bar__6CL7R{opacity:0}.Scroll_isScrolling__yV2Pj.Scroll_autoHide__URLqx:not(:hover)>.Scroll_bar__6CL7R{opacity:1;transition:none}.Scroll_thumb__ccEPj{background-color:var(--accent-color-alpha-200);border-radius:1px;position:absolute;transform-origin:center;transition:background-color .1s ease-out}.Scroll_y__2xWol>.Scroll_thumb__ccEPj{min-height:30px;top:0;width:100%}.Scroll_x__--Ycm>.Scroll_thumb__ccEPj{height:100%;left:0;min-width:30px}.Scroll_bar__6CL7R{cursor:pointer;overflow:hidden;overscroll-behavior:contain;position:absolute;touch-action:none;transition:.1s opacity var(--hide-delay) ease-out;z-index:2}.Scroll_bar__6CL7R:before{background-color:var(--accent-color-alpha-100);border-radius:2px;content:\"\";opacity:0;position:absolute;transition:.3s opacity calc(var(--hide-delay)*.6) ease-out}.Scroll_bar__6CL7R.Scroll_isActive__Nkkmi,.Scroll_bar__6CL7R:hover{z-index:1}.Scroll_bar__6CL7R.Scroll_isActive__Nkkmi:before,.Scroll_bar__6CL7R:hover:before{opacity:1;transition-delay:0s}.Scroll_bar__6CL7R.Scroll_isActive__Nkkmi .Scroll_thumb__ccEPj,.Scroll_bar__6CL7R:hover .Scroll_thumb__ccEPj{background-color:var(--active-color)}.Scroll_bar__6CL7R.Scroll_y__2xWol{bottom:8px;right:0;top:8px;width:16px}.Scroll_isTouch__Vb2mT .Scroll_bar__6CL7R.Scroll_y__2xWol{width:32px}.Scroll_bar__6CL7R.Scroll_y__2xWol .Scroll_thumb__ccEPj,.Scroll_bar__6CL7R.Scroll_y__2xWol:before{right:30%}.Scroll_bar__6CL7R.Scroll_y__2xWol:before{height:100%}.Scroll_bar__6CL7R.Scroll_x__--Ycm{bottom:0;height:16px;left:8px;right:8px}.Scroll_isTouch__Vb2mT .Scroll_bar__6CL7R.Scroll_x__--Ycm{height:32px}.Scroll_bar__6CL7R.Scroll_x__--Ycm .Scroll_thumb__ccEPj,.Scroll_bar__6CL7R.Scroll_x__--Ycm:before{bottom:30%}.Scroll_bar__6CL7R.Scroll_x__--Ycm:before{width:100%}.Scroll_bar__6CL7R.Scroll_x__--Ycm{height:32px}.Scroll_size-s__px8sG>.Scroll_bar__6CL7R.Scroll_x__--Ycm .Scroll_thumb__ccEPj,.Scroll_size-s__px8sG>.Scroll_bar__6CL7R.Scroll_x__--Ycm:before{height:1px}.Scroll_size-m__gfTwB>.Scroll_bar__6CL7R.Scroll_x__--Ycm .Scroll_thumb__ccEPj,.Scroll_size-m__gfTwB>.Scroll_bar__6CL7R.Scroll_x__--Ycm:before{border-radius:2.5px;height:5px}.Scroll_size-l__Pe4z7>.Scroll_bar__6CL7R.Scroll_x__--Ycm .Scroll_thumb__ccEPj,.Scroll_size-l__Pe4z7>.Scroll_bar__6CL7R.Scroll_x__--Ycm:before{border-radius:4.5px;height:9px}.Scroll_bar__6CL7R.Scroll_y__2xWol{width:32px}.Scroll_size-s__px8sG>.Scroll_bar__6CL7R.Scroll_y__2xWol .Scroll_thumb__ccEPj,.Scroll_size-s__px8sG>.Scroll_bar__6CL7R.Scroll_y__2xWol:before{width:1px}.Scroll_size-m__gfTwB>.Scroll_bar__6CL7R.Scroll_y__2xWol .Scroll_thumb__ccEPj,.Scroll_size-m__gfTwB>.Scroll_bar__6CL7R.Scroll_y__2xWol:before{border-radius:2.5px;width:5px}.Scroll_size-l__Pe4z7>.Scroll_bar__6CL7R.Scroll_y__2xWol .Scroll_thumb__ccEPj,.Scroll_size-l__Pe4z7>.Scroll_bar__6CL7R.Scroll_y__2xWol:before{border-radius:4.5px;width:9px}.Scroll_extraWide__IL5ZI .Scroll_bar__6CL7R.Scroll_x__--Ycm{height:52px}.Scroll_extraWide__IL5ZI .Scroll_bar__6CL7R.Scroll_y__2xWol{width:52px}";
4
- var S = {"root":"Scroll_root__NNx5K","inner":"Scroll_inner__DmxTb","smooth":"Scroll_smooth__2vqKe","y":"Scroll_y__2xWol","x":"Scroll_x__--Ycm","fadeSize-s":"Scroll_fadeSize-s__WeI0f","fadeSize-m":"Scroll_fadeSize-m__Hb-1p","fadeSize-l":"Scroll_fadeSize-l__E0CbA","fadeSize-xl":"Scroll_fadeSize-xl__jcYk0","autoHide":"Scroll_autoHide__URLqx","bar":"Scroll_bar__6CL7R","isScrolling":"Scroll_isScrolling__yV2Pj","thumb":"Scroll_thumb__ccEPj","isActive":"Scroll_isActive__Nkkmi","isTouch":"Scroll_isTouch__Vb2mT","size-s":"Scroll_size-s__px8sG","size-m":"Scroll_size-m__gfTwB","size-l":"Scroll_size-l__Pe4z7","extraWide":"Scroll_extraWide__IL5ZI"};
3
+ var css_248z = ".Scroll_root__NNx5K{--hide-delay:0.3s;display:flex;overflow:hidden;position:relative}.Scroll_inner__DmxTb{-webkit-overflow-scrolling:touch;-ms-overflow-style:none;overflow:hidden;position:relative;scrollbar-width:none;transition:mast-image .3s ease-out;width:100%}.Scroll_inner__DmxTb.Scroll_smooth__2vqKe{scroll-behavior:smooth}.Scroll_inner__DmxTb::-webkit-scrollbar{display:none}.Scroll_y__2xWol .Scroll_inner__DmxTb{max-height:100%;overflow-y:auto}.Scroll_x__--Ycm .Scroll_inner__DmxTb{max-width:100%;overflow-x:auto}.Scroll_fadeSize-s__WeI0f .Scroll_inner__DmxTb{--fade-size:10px}.Scroll_fadeSize-m__Hb-1p .Scroll_inner__DmxTb{--fade-size:16px}.Scroll_fadeSize-l__E0CbA .Scroll_inner__DmxTb{--fade-size:20px}.Scroll_fadeSize-xl__jcYk0 .Scroll_inner__DmxTb{--fade-size:30px}.Scroll_y__2xWol .Scroll_inner__DmxTb.Scroll_hasOffsetTop__zEkUg.Scroll_hasOffsetBottom__S2rCM{-webkit-mask-image:linear-gradient(to bottom,transparent,#000 var(--fade-size),#000 calc(100% - var(--fade-size)),transparent);mask-image:linear-gradient(to bottom,transparent,#000 var(--fade-size),#000 calc(100% - var(--fade-size)),transparent)}.Scroll_y__2xWol .Scroll_inner__DmxTb.Scroll_hasOffsetTop__zEkUg{-webkit-mask-image:linear-gradient(to bottom,transparent,#000 var(--fade-size));mask-image:linear-gradient(to bottom,transparent,#000 var(--fade-size))}.Scroll_y__2xWol .Scroll_inner__DmxTb.Scroll_hasOffsetBottom__S2rCM{-webkit-mask-image:linear-gradient(to top,transparent,#000 var(--fade-size));mask-image:linear-gradient(to top,transparent,#000 var(--fade-size))}.Scroll_x__--Ycm .Scroll_inner__DmxTb.Scroll_hasOffsetLeft__WWEyC.Scroll_hasOffsetRight__HhJWt{-webkit-mask-image:linear-gradient(to right,transparent,#000 var(--fade-size),#000 calc(100% - var(--fade-size)),transparent);mask-image:linear-gradient(to right,transparent,#000 var(--fade-size),#000 calc(100% - var(--fade-size)),transparent)}.Scroll_x__--Ycm .Scroll_inner__DmxTb.Scroll_hasOffsetLeft__WWEyC{-webkit-mask-image:linear-gradient(to right,transparent,#000 var(--fade-size));mask-image:linear-gradient(to right,transparent,#000 var(--fade-size))}.Scroll_x__--Ycm .Scroll_inner__DmxTb.Scroll_hasOffsetRight__HhJWt{-webkit-mask-image:linear-gradient(to left,transparent,#000 var(--fade-size));mask-image:linear-gradient(to left,transparent,#000 var(--fade-size))}.Scroll_autoHide__URLqx:not(:hover)>.Scroll_bar__6CL7R{opacity:0}.Scroll_isScrolling__yV2Pj.Scroll_autoHide__URLqx:not(:hover)>.Scroll_bar__6CL7R{opacity:1;transition:none}.Scroll_thumb__ccEPj{background-color:var(--accent-color-alpha-200);border-radius:1px;position:absolute;transform-origin:center;transition:background-color .1s ease-out}.Scroll_y__2xWol>.Scroll_thumb__ccEPj{min-height:30px;top:0;width:100%}.Scroll_x__--Ycm>.Scroll_thumb__ccEPj{height:100%;left:0;min-width:30px}.Scroll_bar__6CL7R{cursor:pointer;overflow:hidden;overscroll-behavior:contain;position:absolute;touch-action:none;transition:.1s opacity var(--hide-delay) ease-out;z-index:2}.Scroll_bar__6CL7R:before{background-color:var(--accent-color-alpha-100);border-radius:2px;content:\"\";opacity:0;position:absolute;transition:.3s opacity calc(var(--hide-delay)*.6) ease-out}.Scroll_bar__6CL7R.Scroll_isActive__Nkkmi,.Scroll_bar__6CL7R:hover{z-index:1}.Scroll_bar__6CL7R.Scroll_isActive__Nkkmi:before,.Scroll_bar__6CL7R:hover:before{opacity:1;transition-delay:0s}.Scroll_bar__6CL7R.Scroll_isActive__Nkkmi .Scroll_thumb__ccEPj,.Scroll_bar__6CL7R:hover .Scroll_thumb__ccEPj{background-color:var(--active-color)}.Scroll_bar__6CL7R.Scroll_y__2xWol{bottom:8px;right:0;top:8px;width:16px}.Scroll_isTouch__Vb2mT .Scroll_bar__6CL7R.Scroll_y__2xWol{width:32px}.Scroll_bar__6CL7R.Scroll_y__2xWol .Scroll_thumb__ccEPj,.Scroll_bar__6CL7R.Scroll_y__2xWol:before{right:30%}.Scroll_bar__6CL7R.Scroll_y__2xWol:before{height:100%}.Scroll_bar__6CL7R.Scroll_x__--Ycm{bottom:0;height:16px;left:8px;right:8px}.Scroll_isTouch__Vb2mT .Scroll_bar__6CL7R.Scroll_x__--Ycm{height:32px}.Scroll_bar__6CL7R.Scroll_x__--Ycm .Scroll_thumb__ccEPj,.Scroll_bar__6CL7R.Scroll_x__--Ycm:before{bottom:30%}.Scroll_bar__6CL7R.Scroll_x__--Ycm:before{width:100%}.Scroll_bar__6CL7R.Scroll_x__--Ycm{height:32px}.Scroll_size-s__px8sG>.Scroll_bar__6CL7R.Scroll_x__--Ycm .Scroll_thumb__ccEPj,.Scroll_size-s__px8sG>.Scroll_bar__6CL7R.Scroll_x__--Ycm:before{height:1px}.Scroll_size-m__gfTwB>.Scroll_bar__6CL7R.Scroll_x__--Ycm .Scroll_thumb__ccEPj,.Scroll_size-m__gfTwB>.Scroll_bar__6CL7R.Scroll_x__--Ycm:before{border-radius:2.5px;height:5px}.Scroll_size-l__Pe4z7>.Scroll_bar__6CL7R.Scroll_x__--Ycm .Scroll_thumb__ccEPj,.Scroll_size-l__Pe4z7>.Scroll_bar__6CL7R.Scroll_x__--Ycm:before{border-radius:4.5px;height:9px}.Scroll_bar__6CL7R.Scroll_y__2xWol{width:32px}.Scroll_size-s__px8sG>.Scroll_bar__6CL7R.Scroll_y__2xWol .Scroll_thumb__ccEPj,.Scroll_size-s__px8sG>.Scroll_bar__6CL7R.Scroll_y__2xWol:before{width:1px}.Scroll_size-m__gfTwB>.Scroll_bar__6CL7R.Scroll_y__2xWol .Scroll_thumb__ccEPj,.Scroll_size-m__gfTwB>.Scroll_bar__6CL7R.Scroll_y__2xWol:before{border-radius:2.5px;width:5px}.Scroll_size-l__Pe4z7>.Scroll_bar__6CL7R.Scroll_y__2xWol .Scroll_thumb__ccEPj,.Scroll_size-l__Pe4z7>.Scroll_bar__6CL7R.Scroll_y__2xWol:before{border-radius:4.5px;width:9px}.Scroll_extraWide__IL5ZI .Scroll_bar__6CL7R.Scroll_x__--Ycm{height:52px}.Scroll_extraWide__IL5ZI .Scroll_bar__6CL7R.Scroll_y__2xWol{width:52px}";
4
+ var S = {"root":"Scroll_root__NNx5K","inner":"Scroll_inner__DmxTb","smooth":"Scroll_smooth__2vqKe","y":"Scroll_y__2xWol","x":"Scroll_x__--Ycm","fadeSize-s":"Scroll_fadeSize-s__WeI0f","fadeSize-m":"Scroll_fadeSize-m__Hb-1p","fadeSize-l":"Scroll_fadeSize-l__E0CbA","fadeSize-xl":"Scroll_fadeSize-xl__jcYk0","hasOffsetTop":"Scroll_hasOffsetTop__zEkUg","hasOffsetBottom":"Scroll_hasOffsetBottom__S2rCM","hasOffsetLeft":"Scroll_hasOffsetLeft__WWEyC","hasOffsetRight":"Scroll_hasOffsetRight__HhJWt","autoHide":"Scroll_autoHide__URLqx","bar":"Scroll_bar__6CL7R","isScrolling":"Scroll_isScrolling__yV2Pj","thumb":"Scroll_thumb__ccEPj","isActive":"Scroll_isActive__Nkkmi","isTouch":"Scroll_isTouch__Vb2mT","size-s":"Scroll_size-s__px8sG","size-m":"Scroll_size-m__gfTwB","size-l":"Scroll_size-l__Pe4z7","extraWide":"Scroll_extraWide__IL5ZI"};
5
5
  styleInject(css_248z);
6
6
 
7
7
  export { S as default };
@@ -3,11 +3,12 @@ import { Size } from 'uilib/types';
3
3
  export type Props = ButtonHTMLAttributes<HTMLButtonElement> & {
4
4
  className?: string;
5
5
  children: ReactNode;
6
- variant?: 'clear' | 'default' | 'outlined' | 'primary';
6
+ variant?: 'text' | 'clear' | 'default' | 'outlined' | 'primary';
7
7
  size?: Size;
8
8
  loading?: boolean;
9
9
  checked?: boolean;
10
10
  square?: boolean;
11
+ round?: boolean;
11
12
  prefixElem?: ReactNode;
12
13
  postfixElem?: ReactNode;
13
14
  onRef?: (ref: HTMLButtonElement) => void;
@@ -36,7 +36,7 @@ export declare class Scroll extends Component<T.Props> {
36
36
  componentWillUnmount(): void;
37
37
  eachAxis: (fn: any) => any[];
38
38
  observeScrollHeight: () => void;
39
- isScrollChanged(axis: any): boolean;
39
+ isScrollSizeChanged(axis: any): boolean;
40
40
  isBoudingsChanged(axis: any): boolean;
41
41
  getoffsetSize: (axis: any) => any;
42
42
  getInnerSize: (axis: any) => any;
@@ -51,8 +51,9 @@ export declare class Scroll extends Component<T.Props> {
51
51
  updateAll: () => void;
52
52
  update: (axis: any) => void;
53
53
  updateCoeff(axis: any): void;
54
- updatePos: (axis: any) => void;
55
- updateScroll: (axis: any, e: any) => void;
54
+ updatePos(axis: any): void;
55
+ updateScroll(axis: any, e: any): void;
56
+ updateHasOffsets(): void;
56
57
  dropScrollingState: any;
57
58
  subscribePointerMoveUp: () => void;
58
59
  unsubscribePointerMoveUp: () => void;
@@ -13,7 +13,6 @@ export * from './Form/Form';
13
13
  export * from './Gallery/Gallery';
14
14
  export * from './Heading/Heading';
15
15
  export * from './Icon/Icon';
16
- export * from './IconButton/IconButton';
17
16
  export * from './Input/Input';
18
17
  export * from './InputFile/InputFile';
19
18
  export * from './Label/Label';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homecode/ui",
3
- "version": "4.18.55",
3
+ "version": "4.18.57",
4
4
  "description": "React UI components library",
5
5
  "scripts": {
6
6
  "test": "jest",
@@ -1,13 +0,0 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import cn from 'classnames';
3
- import { Button } from '../Button/Button.js';
4
- import { Icon } from '../Icon/Icon.js';
5
- import S from './IconButton.styl.js';
6
-
7
- function IconButton({ type, size, className, contentBefore, contentAfter,
8
- // @ts-ignore
9
- ...rest }) {
10
- return (jsxs(Button, { ...rest, className: cn(S.root, className), variant: "clear", size: size, children: [contentBefore, jsx(Icon, { type: type, size: size }), contentAfter] }));
11
- }
12
-
13
- export { IconButton };
@@ -1,7 +0,0 @@
1
- import styleInject from '../../../node_modules/style-inject/dist/style-inject.es.js';
2
-
3
- var css_248z = ".IconButton_root__qAQqw{background-color:transparent!important}.IconButton_root__qAQqw:hover{color:var(--active-color)}";
4
- var S = {"root":"IconButton_root__qAQqw"};
5
- styleInject(css_248z);
6
-
7
- export { S as default };
@@ -1,12 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- import type { IconType } from 'uilib/components/Icon/Icon.types';
3
- import type { ButtonProps } from 'uilib/components/Button/Button';
4
- import type { Size } from 'uilib/types';
5
- export type IconButtonProps = Omit<ButtonProps, 'variant' | 'square' | 'children'> & {
6
- type: IconType;
7
- className?: string;
8
- size?: Size;
9
- contentBefore?: ReactNode;
10
- contentAfter?: ReactNode;
11
- };
12
- export declare function IconButton({ type, size, className, contentBefore, contentAfter, ...rest }: IconButtonProps): JSX.Element;