@itcase/ui 1.0.10 → 1.0.13

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.
Files changed (41) hide show
  1. package/dist/components/Avatar.js +4 -2
  2. package/dist/components/Chips.js +2 -0
  3. package/dist/components/Choice.js +118 -0
  4. package/dist/components/DatePicker.js +10201 -0
  5. package/dist/components/Empty.js +95 -0
  6. package/dist/components/FormField.js +1 -1
  7. package/dist/components/Grid.js +8 -14
  8. package/dist/components/Input.js +2 -0
  9. package/dist/components/Label.js +0 -5
  10. package/dist/components/Logo.js +4 -4
  11. package/dist/components/Modal.js +3 -3
  12. package/dist/components/RangeSlider.js +7 -1978
  13. package/dist/components/Scrollbar.js +5 -3826
  14. package/dist/components/Search.js +4 -5
  15. package/dist/components/Segmented.js +5 -1
  16. package/dist/components/Select.js +348 -270
  17. package/dist/components/Swiper.js +4208 -188
  18. package/dist/components/Switch.js +3 -2
  19. package/dist/components/Tab.js +0 -1
  20. package/dist/components/Textarea.js +5 -1
  21. package/dist/components/Tile.js +0 -3
  22. package/dist/css/components/Choice/Choice.css +73 -0
  23. package/dist/css/components/DatePicker/DatePicker.css +924 -0
  24. package/dist/css/components/Empty/Empty.css +13 -0
  25. package/dist/css/components/Input/Input.css +12 -4
  26. package/dist/css/components/Segmented/Segmented.css +16 -0
  27. package/dist/css/components/Select/Select.css +11 -4
  28. package/dist/css/components/Select/css/__menu/select__menu.css +7 -3
  29. package/dist/css/components/Swiper/Swiper.css +128 -83
  30. package/dist/css/styles/fill/fill.css +4 -4
  31. package/dist/css/styles/fill/fill_active.css +5 -5
  32. package/dist/defineProperty-f9e5e1f3.js +166 -0
  33. package/dist/hooks/styleAttributes.js +5 -1
  34. package/package.json +30 -27
  35. package/dist/components/Emoji.js +0 -124
  36. package/dist/components/Profile.js +0 -105
  37. package/dist/css/components/Emoji/Emoji.css +0 -104
  38. package/dist/css/components/Emoji/css/__icon/emoji__icon-shape.css +0 -12
  39. package/dist/css/components/Emoji/css/__icon/emoji__icon.css +0 -5
  40. package/dist/css/components/Profile/Profile.css +0 -19
  41. package/dist/objectWithoutProperties-ea190611.js +0 -188
@@ -10,7 +10,7 @@ var React__default = /*#__PURE__*/_interopDefault(React);
10
10
  var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
11
11
  var clsx__default = /*#__PURE__*/_interopDefault(clsx);
12
12
 
13
- function Switch(props) {
13
+ var Switch = /*#__PURE__*/React__default.default.forwardRef(function Switch(props, ref) {
14
14
  var className = props.className,
15
15
  set = props.set,
16
16
  size = props.size,
@@ -25,6 +25,7 @@ function Switch(props) {
25
25
  className: "switch__checkbox",
26
26
  disabled: disabled,
27
27
  id: id,
28
+ ref: ref,
28
29
  type: "checkbox",
29
30
  onChange: onChange
30
31
  }), /*#__PURE__*/React__default.default.createElement("div", {
@@ -32,7 +33,7 @@ function Switch(props) {
32
33
  }, "\xA0"), /*#__PURE__*/React__default.default.createElement("div", {
33
34
  className: "switch__toggle"
34
35
  }, "\xA0"));
35
- }
36
+ });
36
37
  Switch.propTypes = {
37
38
  checked: PropTypes__default.default.bool,
38
39
  className: PropTypes__default.default.string,
@@ -135,7 +135,6 @@ function Tab(props) {
135
135
  });
136
136
  var _useStyles = useStyles.useStyles(props),
137
137
  tab = _useStyles.styles;
138
- console.log(tabConfig.appearance);
139
138
  return /*#__PURE__*/React__default.default.createElement("div", {
140
139
  className: clsx__default.default('tab', isActive && 'tab_state_active', isHover && 'tab_state_hover', appearance && ("fill_" + tabConfig.appearance[appearance].fillClass).replace(/([A-Z])/g, '-$1').toLowerCase(), appearance && ("fill_hover_" + tabConfig.appearance[appearance].fillHoverClass).replace(/([A-Z])/g, '-$1').toLowerCase(), className, sizeClass, fillClass, fillHoverClass, fillActiveClass, fillActiveHoverClass, fillDisabledClass, shapeClass, typeClass, widthClass, set && "tab_set_" + set, justifyContentClass),
141
140
  style: tab,
@@ -36,6 +36,10 @@ function Textarea(props) {
36
36
  prefix: 'fill_',
37
37
  propsKey: 'fill'
38
38
  });
39
+ var borderColorClass = useDeviceTargetClass.useDeviceTargetClass(props, {
40
+ prefix: 'border-color_',
41
+ propsKey: 'borderColor'
42
+ });
39
43
  var sizeClass = useDeviceTargetClass.useDeviceTargetClass(props, {
40
44
  prefix: 'textarea_size_',
41
45
  propsKey: 'size'
@@ -69,7 +73,7 @@ function Textarea(props) {
69
73
  propsKey: 'width'
70
74
  });
71
75
  return /*#__PURE__*/React__default.default.createElement("textarea", {
72
- className: clsx__default.default(className, 'textarea', (textSizeClass || textColorClass || weightClass) && 'text', caretClass, fillClass, placeholderClass, shapeClass, textSizeClass, textColorClass, weightClass, widthClass, sizeClass),
76
+ className: clsx__default.default(className, 'textarea', (textSizeClass || textColorClass || weightClass) && 'text', caretClass, fillClass, borderColorClass, placeholderClass, shapeClass, textSizeClass, textColorClass, weightClass, widthClass, sizeClass),
73
77
  id: id,
74
78
  disabled: disabled,
75
79
  placeholder: placeholder,
@@ -4,7 +4,6 @@ var React = require('react');
4
4
  var PropTypes = require('prop-types');
5
5
  var clsx = require('clsx');
6
6
  var index$2 = require('./Badge.js');
7
- require('./Emoji.js');
8
7
  require('./Icon.js');
9
8
  var index = require('./Title.js');
10
9
  var index$1 = require('./Text.js');
@@ -32,8 +31,6 @@ require('../context/UIContext.js');
32
31
  require('../hooks/useMediaQueries.js');
33
32
  require('react-responsive');
34
33
  require('lodash/castArray');
35
- require('../constants/componentProps/direction.js');
36
- require('../constants/componentProps/emojiSize.js');
37
34
  require('react-inlinesvg');
38
35
  require('../constants/componentProps/iconSize.js');
39
36
  require('../constants/componentProps/strokeColor.js');
@@ -0,0 +1,73 @@
1
+ .choice {
2
+ display: flex;
3
+ align-items: center;
4
+ &__wrapper {
5
+ position: relative;
6
+ display: flex;
7
+ ^&__item {
8
+ min-width: 80px;
9
+ position: relative;
10
+ display: flex;
11
+ border-top: 0;
12
+ border-left: 0;
13
+ border-bottom: 0;
14
+ &:hover {
15
+ background: var(--choice-item-background-hover);
16
+ }
17
+ &last-child {
18
+ border-right: 0;
19
+ }
20
+ &_state_active {
21
+ }
22
+ & input {
23
+ width: 100%;
24
+ height: 100%;
25
+ position: absolute;
26
+ left: 0;
27
+ top: 0;
28
+ right: 0;
29
+ bottom: 0;
30
+ z-index: 2;
31
+ opacity: 0%;
32
+ cursor: pointer;
33
+ border: 0;
34
+ margin: 0;
35
+ }
36
+ &-label {
37
+ width: 100%;
38
+ text-align: center;
39
+ position: relative;
40
+ display: block;
41
+ z-index: 3;
42
+ transition: color 0.5s ease;
43
+ cursor: pointer;
44
+ }
45
+ }
46
+ }
47
+ }
48
+ .choice {
49
+ &_shape {
50
+ &_rounded {
51
+ border-radius: 8px;
52
+ }
53
+ &_circular {
54
+ border-radius: 50%;
55
+ }
56
+ }
57
+ }
58
+ .choice {
59
+ &_size {
60
+ @each $size in normal, compact {
61
+ &_$(size) {
62
+ ^^&__item {
63
+ &-label {
64
+ padding: var(--choice-item-size-$(size)-padding, 10px 16px);
65
+ }
66
+ }
67
+ }
68
+ }
69
+ }
70
+ }
71
+ :root {
72
+ --choice-item-background-hover: var(--color-surface-secondary);
73
+ }