@itcase/ui 1.5.1 → 1.6.0

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.
@@ -58,7 +58,6 @@ function Dropdown(props) {
58
58
  }, []);
59
59
  var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props);
60
60
  var alignmentClass = propsGenerator.alignmentClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, elevationClass = propsGenerator.elevationClass, shapeClass = propsGenerator.shapeClass;
61
- // @ts-expect-error
62
61
  var styles = useStyles.useStyles(props).styles;
63
62
  return (jsxRuntime.jsxs("div", { className: clsx(className, 'dropdown', alignmentClass && "alignment_".concat(alignmentClass), set && "dropdown_set_".concat(set), shapeClass && "dropdown_shape_".concat(shapeClass), elevationClass && "elevation_".concat(elevationClass), isOpen ? 'dropdown_state_open' : 'dropdown_state_close', animationState.className), ref: dropdownRef, style: styles, children: [before, children && (jsxRuntime.jsx("div", { className: clsx('dropdown__wrapper', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass)),
64
63
  // Add "onAnimationEnd" only for wrapper for ignore dropdown button
@@ -56,7 +56,6 @@ function Dropdown(props) {
56
56
  }, []);
57
57
  var propsGenerator = useDevicePropsGenerator(props);
58
58
  var alignmentClass = propsGenerator.alignmentClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, elevationClass = propsGenerator.elevationClass, shapeClass = propsGenerator.shapeClass;
59
- // @ts-expect-error
60
59
  var styles = useStyles(props).styles;
61
60
  return (jsxs("div", { className: clsx(className, 'dropdown', alignmentClass && "alignment_".concat(alignmentClass), set && "dropdown_set_".concat(set), shapeClass && "dropdown_shape_".concat(shapeClass), elevationClass && "elevation_".concat(elevationClass), isOpen ? 'dropdown_state_open' : 'dropdown_state_close', animationState.className), ref: dropdownRef, style: styles, children: [before, children && (jsx("div", { className: clsx('dropdown__wrapper', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass)),
62
61
  // Add "onAnimationEnd" only for wrapper for ignore dropdown button
@@ -67,7 +67,7 @@ function Checkbox(props) {
67
67
  var stateBorderColorDisabledClass = propsGenerator.getClassName(checked ? 'stateBorderColorDisabledChecked' : 'stateBorderColorDisabled', { prefix: 'border-color_' });
68
68
  return (jsxRuntime.jsxs(Tag, { className: clsx(className, 'checkbox', fillClass && "fill_".concat(fillClass), shapeClass && "checkbox_shape_".concat(shapeClass), widthClass && "width_".concat(widthClass), isSkeleton && "checkbox_skeleton"), htmlFor: Tag === 'label' && id, children: [before, jsxRuntime.jsxs("div", { className: clsx('checkbox__item', stateCheckmarkFillClass), children: [jsxRuntime.jsx("input", {
69
69
  // @ts-expect-error
70
- id: id, className: "checkbox__input", type: "checkbox", disabled: disabled, checked: checked, value: value, onBlur: onBlur, onChange: onChange, onFocus: onFocus }), jsxRuntime.jsx("div", { className: clsx('checkbox__state', disabled ? stateFillDisabledClass : stateFillClass, disabled ? stateBorderColorDisabledClass : stateBorderColorClass, stateShapeClass && "checkbox__state_shape_".concat(stateShapeClass), stateBorderWidthClass && "border-width_".concat(stateBorderWidthClass)), children: "\u00A0" }), jsxRuntime.jsx("div", { className: "checkbox__state-checkmark", children: "\u00A0" })] }), label && (jsxRuntime.jsx(Text.Text, { className: "checkbox__label", size: labelTextSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelTextSize), textColor: labelTextColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelTextColor), textWeight: labelTextWeight, children: label })), desc && (jsxRuntime.jsx(Text.Text, { className: "checkbox__desc", size: descTextSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.descTextSize), textColor: descTextColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.descTextColor), textWeight: descTextWeight, children: desc })), after && jsxRuntime.jsx("div", { className: "checkbox__after", children: after })] }));
70
+ id: id, className: "checkbox__input", type: "checkbox", disabled: disabled, checked: checked, value: value, onBlur: onBlur, onChange: onChange, onFocus: onFocus }), jsxRuntime.jsx("div", { className: clsx('checkbox__state', disabled ? stateFillDisabledClass : stateFillClass, disabled ? stateBorderColorDisabledClass : stateBorderColorClass, stateShapeClass && "checkbox__state_shape_".concat(stateShapeClass), stateBorderWidthClass && "border-width_".concat(stateBorderWidthClass)), children: "\u00A0" }), jsxRuntime.jsx("div", { className: "checkbox__state-checkmark", children: "\u00A0" })] }), label && (jsxRuntime.jsx(Text.Text, { className: "checkbox__label", size: labelTextSize, textColor: labelTextColor, textWeight: labelTextWeight, children: label })), desc && (jsxRuntime.jsx(Text.Text, { className: "checkbox__desc", size: descTextSize, textColor: descTextColor, textWeight: descTextWeight, children: desc })), after && jsxRuntime.jsx("div", { className: "checkbox__after", children: after })] }));
71
71
  }
72
72
 
73
73
  exports.Checkbox = Checkbox;
@@ -131,7 +131,6 @@ function Chips(props) {
131
131
  var alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, fillActiveClass = propsGenerator.fillActiveClass, fillActiveHoverClass = propsGenerator.fillActiveHoverClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, labelTextActiveColor = propsGenerator.labelTextActiveColor, labelTextActiveHoverColor = propsGenerator.labelTextActiveHoverColor, labelTextColor = propsGenerator.labelTextColor, labelTextHoverColor = propsGenerator.labelTextHoverColor, labelTextSize = propsGenerator.labelTextSize, labelTextWeight = propsGenerator.labelTextWeight, labelTextWrap = propsGenerator.labelTextWrap, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, cursorClass = propsGenerator.cursorClass, iconAfterFill = propsGenerator.iconAfterFill, iconAfterFillIcon = propsGenerator.iconAfterFillIcon, iconAfterFillSize = propsGenerator.iconAfterFillSize, iconAfterShape = propsGenerator.iconAfterShape, iconAfterSize = propsGenerator.iconAfterSize, iconBeforeFill = propsGenerator.iconBeforeFill, iconBeforeFillIcon = propsGenerator.iconBeforeFillIcon, iconBeforeFillSize = propsGenerator.iconBeforeFillSize, iconBeforeShape = propsGenerator.iconBeforeShape, iconBeforeSize = propsGenerator.iconBeforeSize, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass;
132
132
  // @ts-expect-error
133
133
  var chipsStyles = useStyles.useStyles(props).styles;
134
- console.log(fillClass);
135
134
  return (jsxRuntime.jsx("div", { className: clsx(className, 'chips', isActive && 'chips_state_active', fillClass && !isActive
136
135
  ? "fill_".concat(fillClass)
137
136
  : "fill_active_".concat(fillActiveClass), !isActive
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var DropdownItem = require('../../DropdownItem-CBJeJPbP.js');
3
+ var DropdownItem = require('../../DropdownItem-B2yfeMxS.js');
4
4
  require('react/jsx-runtime');
5
5
  require('react');
6
6
  require('clsx');
@@ -7,7 +7,7 @@ var clsx = require('clsx');
7
7
  var ceil = require('lodash/ceil');
8
8
  var ReactPaginate = require('react-paginate');
9
9
  var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
10
- var DropdownItem = require('../../DropdownItem-CBJeJPbP.js');
10
+ var DropdownItem = require('../../DropdownItem-B2yfeMxS.js');
11
11
  var Icon = require('../../Icon-DU2T-nfY.js');
12
12
  var Text = require('../../Text-CEcBg-F5.js');
13
13
  require('lodash/camelCase');
@@ -240,7 +240,6 @@ function Response(props) {
240
240
  var ImageComponent = React.useMemo(function () {
241
241
  var src = imageSrc || svgSrc;
242
242
  var Image = SvgImage;
243
- console.log(src);
244
243
  if (Image) {
245
244
  var sizes = {};
246
245
  if (width) {
@@ -31,16 +31,16 @@ var switchConfig = {
31
31
  },
32
32
  };
33
33
  var Switch = React.forwardRef(function Switch(props, ref) {
34
- var id = props.id, className = props.className, appearance = props.appearance, size = props.size, title = props.title, desc = props.desc, disabled = props.disabled, checked = props.checked, onChange = props.onChange;
34
+ var id = props.id, className = props.className, appearance = props.appearance, _a = props.align, align = _a === void 0 ? 'left' : _a, size = props.size, title = props.title, desc = props.desc, disabled = props.disabled, checked = props.checked, onChange = props.onChange;
35
35
  var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (resultAppearance, appearance) {
36
36
  var _a;
37
37
  return (tslib_es6.__assign(tslib_es6.__assign({}, resultAppearance), (_a = segmentedConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearance]));
38
38
  }, {});
39
39
  var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
40
- var titleDescColor = propsGenerator.titleDescColor, titleDescSize = propsGenerator.titleDescSize, titleTextColor = propsGenerator.titleTextColor, titleTextSize = propsGenerator.titleTextSize;
41
- return (jsxRuntime.jsxs("div", { className: clsx('switch', className, size && "switch_size_".concat(size)), children: [title && (jsxRuntime.jsx(Text.Text, { className: clsx('switch__title'), size: titleTextSize, textColor: titleTextColor, children: title })), desc && (jsxRuntime.jsx(Text.Text, { className: clsx('switch__desc'), size: titleDescSize, textColor: titleDescColor, children: desc })), jsxRuntime.jsx("input", { id: id, className: "switch__checkbox", type: "checkbox", disabled: disabled, checked: checked,
42
- // @ts-expect-error
43
- ref: ref, onChange: onChange }), jsxRuntime.jsx("div", { className: "switch__bg", children: "\u00A0" }), jsxRuntime.jsx("div", { className: "switch__toggle", children: "\u00A0" })] }));
40
+ var titleTextColor = propsGenerator.titleTextColor, titleTextSize = propsGenerator.titleTextSize, descTextColor = propsGenerator.descTextColor, descTextSize = propsGenerator.descTextSize;
41
+ return (jsxRuntime.jsxs("div", { className: clsx('switch', className, align && "switch_align_".concat(align), size && "switch_size_".concat(size)), children: [title && (jsxRuntime.jsx(Text.Text, { className: clsx('switch__title'), size: titleTextSize, textColor: titleTextColor, children: title })), desc && (jsxRuntime.jsx(Text.Text, { className: clsx('switch__desc'), size: descTextSize, textColor: descTextColor, children: desc })), jsxRuntime.jsxs("div", { className: 'switch__item', children: [jsxRuntime.jsx("input", { id: id, className: "switch__checkbox", type: "checkbox", disabled: disabled, checked: checked,
42
+ // @ts-expect-error
43
+ ref: ref, onChange: onChange }), jsxRuntime.jsx("div", { className: "switch__bg", children: "\u00A0" }), jsxRuntime.jsx("div", { className: "switch__toggle", children: "\u00A0" })] })] }));
44
44
  });
45
45
 
46
46
  exports.Switch = Switch;
@@ -65,7 +65,7 @@ function Checkbox(props) {
65
65
  var stateBorderColorDisabledClass = propsGenerator.getClassName(checked ? 'stateBorderColorDisabledChecked' : 'stateBorderColorDisabled', { prefix: 'border-color_' });
66
66
  return (jsxs(Tag, { className: clsx(className, 'checkbox', fillClass && "fill_".concat(fillClass), shapeClass && "checkbox_shape_".concat(shapeClass), widthClass && "width_".concat(widthClass), isSkeleton && "checkbox_skeleton"), htmlFor: Tag === 'label' && id, children: [before, jsxs("div", { className: clsx('checkbox__item', stateCheckmarkFillClass), children: [jsx("input", {
67
67
  // @ts-expect-error
68
- id: id, className: "checkbox__input", type: "checkbox", disabled: disabled, checked: checked, value: value, onBlur: onBlur, onChange: onChange, onFocus: onFocus }), jsx("div", { className: clsx('checkbox__state', disabled ? stateFillDisabledClass : stateFillClass, disabled ? stateBorderColorDisabledClass : stateBorderColorClass, stateShapeClass && "checkbox__state_shape_".concat(stateShapeClass), stateBorderWidthClass && "border-width_".concat(stateBorderWidthClass)), children: "\u00A0" }), jsx("div", { className: "checkbox__state-checkmark", children: "\u00A0" })] }), label && (jsx(Text, { className: "checkbox__label", size: labelTextSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelTextSize), textColor: labelTextColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelTextColor), textWeight: labelTextWeight, children: label })), desc && (jsx(Text, { className: "checkbox__desc", size: descTextSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.descTextSize), textColor: descTextColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.descTextColor), textWeight: descTextWeight, children: desc })), after && jsx("div", { className: "checkbox__after", children: after })] }));
68
+ id: id, className: "checkbox__input", type: "checkbox", disabled: disabled, checked: checked, value: value, onBlur: onBlur, onChange: onChange, onFocus: onFocus }), jsx("div", { className: clsx('checkbox__state', disabled ? stateFillDisabledClass : stateFillClass, disabled ? stateBorderColorDisabledClass : stateBorderColorClass, stateShapeClass && "checkbox__state_shape_".concat(stateShapeClass), stateBorderWidthClass && "border-width_".concat(stateBorderWidthClass)), children: "\u00A0" }), jsx("div", { className: "checkbox__state-checkmark", children: "\u00A0" })] }), label && (jsx(Text, { className: "checkbox__label", size: labelTextSize, textColor: labelTextColor, textWeight: labelTextWeight, children: label })), desc && (jsx(Text, { className: "checkbox__desc", size: descTextSize, textColor: descTextColor, textWeight: descTextWeight, children: desc })), after && jsx("div", { className: "checkbox__after", children: after })] }));
69
69
  }
70
70
 
71
71
  export { Checkbox, checkboxAppearance, checkboxConfig, checkboxState };
@@ -129,7 +129,6 @@ function Chips(props) {
129
129
  var alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, fillActiveClass = propsGenerator.fillActiveClass, fillActiveHoverClass = propsGenerator.fillActiveHoverClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, labelTextActiveColor = propsGenerator.labelTextActiveColor, labelTextActiveHoverColor = propsGenerator.labelTextActiveHoverColor, labelTextColor = propsGenerator.labelTextColor, labelTextHoverColor = propsGenerator.labelTextHoverColor, labelTextSize = propsGenerator.labelTextSize, labelTextWeight = propsGenerator.labelTextWeight, labelTextWrap = propsGenerator.labelTextWrap, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, cursorClass = propsGenerator.cursorClass, iconAfterFill = propsGenerator.iconAfterFill, iconAfterFillIcon = propsGenerator.iconAfterFillIcon, iconAfterFillSize = propsGenerator.iconAfterFillSize, iconAfterShape = propsGenerator.iconAfterShape, iconAfterSize = propsGenerator.iconAfterSize, iconBeforeFill = propsGenerator.iconBeforeFill, iconBeforeFillIcon = propsGenerator.iconBeforeFillIcon, iconBeforeFillSize = propsGenerator.iconBeforeFillSize, iconBeforeShape = propsGenerator.iconBeforeShape, iconBeforeSize = propsGenerator.iconBeforeSize, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass;
130
130
  // @ts-expect-error
131
131
  var chipsStyles = useStyles(props).styles;
132
- console.log(fillClass);
133
132
  return (jsx("div", { className: clsx(className, 'chips', isActive && 'chips_state_active', fillClass && !isActive
134
133
  ? "fill_".concat(fillClass)
135
134
  : "fill_active_".concat(fillActiveClass), !isActive
@@ -1,4 +1,4 @@
1
- export { D as Dropdown, a as DropdownItem, d as dropdownItemAppearance, b as dropdownItemConfig } from '../DropdownItem-C8CumsgX.js';
1
+ export { D as Dropdown, a as DropdownItem, d as dropdownItemAppearance, b as dropdownItemConfig } from '../DropdownItem-Cr7XLcHZ.js';
2
2
  import 'react/jsx-runtime';
3
3
  import 'react';
4
4
  import 'clsx';
@@ -5,7 +5,7 @@ import clsx from 'clsx';
5
5
  import ceil from 'lodash/ceil';
6
6
  import ReactPaginate from 'react-paginate';
7
7
  import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
8
- import { D as Dropdown, a as DropdownItem } from '../DropdownItem-C8CumsgX.js';
8
+ import { D as Dropdown, a as DropdownItem } from '../DropdownItem-Cr7XLcHZ.js';
9
9
  import { I as Icon } from '../Icon-BOEOspTF.js';
10
10
  import { T as Text } from '../Text-CI2prtf6.js';
11
11
  import 'lodash/camelCase';
@@ -238,7 +238,6 @@ function Response(props) {
238
238
  var ImageComponent = useMemo(function () {
239
239
  var src = imageSrc || svgSrc;
240
240
  var Image = SvgImage;
241
- console.log(src);
242
241
  if (Image) {
243
242
  var sizes = {};
244
243
  if (width) {
@@ -29,16 +29,16 @@ var switchConfig = {
29
29
  },
30
30
  };
31
31
  var Switch = React.forwardRef(function Switch(props, ref) {
32
- var id = props.id, className = props.className, appearance = props.appearance, size = props.size, title = props.title, desc = props.desc, disabled = props.disabled, checked = props.checked, onChange = props.onChange;
32
+ var id = props.id, className = props.className, appearance = props.appearance, _a = props.align, align = _a === void 0 ? 'left' : _a, size = props.size, title = props.title, desc = props.desc, disabled = props.disabled, checked = props.checked, onChange = props.onChange;
33
33
  var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (resultAppearance, appearance) {
34
34
  var _a;
35
35
  return (__assign(__assign({}, resultAppearance), (_a = segmentedConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearance]));
36
36
  }, {});
37
37
  var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
38
- var titleDescColor = propsGenerator.titleDescColor, titleDescSize = propsGenerator.titleDescSize, titleTextColor = propsGenerator.titleTextColor, titleTextSize = propsGenerator.titleTextSize;
39
- return (jsxs("div", { className: clsx('switch', className, size && "switch_size_".concat(size)), children: [title && (jsx(Text, { className: clsx('switch__title'), size: titleTextSize, textColor: titleTextColor, children: title })), desc && (jsx(Text, { className: clsx('switch__desc'), size: titleDescSize, textColor: titleDescColor, children: desc })), jsx("input", { id: id, className: "switch__checkbox", type: "checkbox", disabled: disabled, checked: checked,
40
- // @ts-expect-error
41
- ref: ref, onChange: onChange }), jsx("div", { className: "switch__bg", children: "\u00A0" }), jsx("div", { className: "switch__toggle", children: "\u00A0" })] }));
38
+ var titleTextColor = propsGenerator.titleTextColor, titleTextSize = propsGenerator.titleTextSize, descTextColor = propsGenerator.descTextColor, descTextSize = propsGenerator.descTextSize;
39
+ return (jsxs("div", { className: clsx('switch', className, align && "switch_align_".concat(align), size && "switch_size_".concat(size)), children: [title && (jsx(Text, { className: clsx('switch__title'), size: titleTextSize, textColor: titleTextColor, children: title })), desc && (jsx(Text, { className: clsx('switch__desc'), size: descTextSize, textColor: descTextColor, children: desc })), jsxs("div", { className: 'switch__item', children: [jsx("input", { id: id, className: "switch__checkbox", type: "checkbox", disabled: disabled, checked: checked,
40
+ // @ts-expect-error
41
+ ref: ref, onChange: onChange }), jsx("div", { className: "switch__bg", children: "\u00A0" }), jsx("div", { className: "switch__toggle", children: "\u00A0" })] })] }));
42
42
  });
43
43
 
44
44
  export { Switch, switchAppearance, switchConfig };
@@ -1,30 +1,42 @@
1
1
  .switch {
2
- position: relative;
3
- height: 100%;
4
- border-radius: 50px;
5
- cursor: pointer;
6
- transition: 0.4s;
7
- overflow: hidden;
8
- display: flex;
2
+ display: grid;
3
+ &__title {
4
+ padding: 0 8px 0 0;
5
+ align-self: start;
6
+ }
7
+ &__desc {
8
+ padding: 0 8px 0 0;
9
+ align-self: start;
10
+ }
11
+ &__item {
12
+ border-radius: 50px;
13
+ position: relative;
14
+ overflow: hidden;
15
+ display: flex;
16
+ align-self: start;
17
+ transition: 0.4s;
18
+ cursor: pointer;
19
+ grid-row: 1/3;
20
+ }
9
21
  &__checkbox {
10
- position: absolute;
11
22
  width: 100%;
12
23
  height: 100%;
24
+ margin: 0;
25
+ border: 0;
26
+ position: absolute;
13
27
  left: 0;
14
28
  top: 0;
29
+ z-index: 2;
15
30
  cursor: pointer;
16
31
  appearance: none;
17
- border: 0;
18
- margin: 0;
19
- z-index: 2;
20
32
  &:checked {
21
33
  & + .switch__bg {
22
34
  background: var(--color-accent-primary);
23
35
  }
24
36
  & ~ .switch__toggle {
25
- left: 100%;
26
- margin: 0 0 0 -3px;
27
37
  background: var(--color-accent-item-primary);
38
+ margin: 0 0 0 -3px;
39
+ left: 100%;
28
40
  transform: translate(-100%, -50%);
29
41
  }
30
42
  }
@@ -36,32 +48,60 @@
36
48
  }
37
49
  &__bg {
38
50
  width: 100%;
39
- flex: 1;
40
51
  background: var(--color-surface-tertiary);
52
+ flex: 1;
41
53
  transition: all 0.25s;
42
54
  }
43
55
  &__toggle {
44
- box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
45
56
  height: calc(100% - 6px);
46
- position: absolute;
47
57
  aspect-ratio: 1/1;
48
- top: 50%;
49
- transform: translate(3px, -50%);
50
- left: 0;
51
58
  background: #fff;
52
59
  border-radius: 50%;
53
- box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
60
+ position: absolute;
61
+ box-shadow: inset 0 0 5px rgb(0, 0, 0, 0.2);
62
+ box-shadow: 0 0 5px rgb(0, 0, 0, 0.2);
63
+ left: 0;
64
+ top: 50%;
65
+ transform: translate(3px, -50%);
54
66
  transition: all 0.25s;
55
67
  }
56
68
  }
69
+ .switch {
70
+ &_align {
71
+ &_left {
72
+ grid-template-columns: 1fr auto;
73
+ ^^&__title,
74
+ ^^&__desc {
75
+ grid-column-start: 2;
76
+ padding: 0 0 0 8px;
77
+ }
78
+ ^^&__item {
79
+ grid-column-start: 1;
80
+ }
81
+ }
82
+ &_right {
83
+ grid-template-columns: auto 1fr;
84
+ ^^&__title,
85
+ ^^&__desc {
86
+ grid-column-start: 1;
87
+ padding: 0 8px 0 0;
88
+ }
89
+ ^^&__item {
90
+ grid-column-start: 2;
91
+ }
92
+ }
93
+ }
94
+ }
57
95
  .switch {
58
96
  &&_size {
59
- @each $size in xxl, xl, l, m, s, xs, xxs, normal, compact, s, m {
97
+ @each $size in xxl, xl, l, m, s, xs, xxs {
60
98
  &_$(size) {
61
- min-width: var(--switch-size-$(size)-width);
62
- min-height: var(--switch-size-$(size)-height);
63
- max-width: var(--switch-size-$(size)-width);
64
- max-height: var(--switch-size-$(size)-height);
99
+ & .switch__item {
100
+ min-width: var(--switch-size-$(size)-width);
101
+ min-height: var(--switch-size-$(size)-height);
102
+ max-width: var(--switch-size-$(size)-width);
103
+ max-height: var(--switch-size-$(size)-height);
104
+ }
65
105
  }
66
106
  }
67
107
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcase/ui",
3
- "version": "1.5.1",
3
+ "version": "1.6.0",
4
4
  "description": "UI components (Modal, Loader, Popup, etc)",
5
5
  "keywords": [
6
6
  "Modal",