@itcase/ui 1.0.43 → 1.0.44

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 (117) hide show
  1. package/dist/components/Accordion.js +56 -58
  2. package/dist/components/Avatar.js +31 -29
  3. package/dist/components/Background.js +15 -12
  4. package/dist/components/Badge.js +13 -11
  5. package/dist/components/Breadcrumbs.js +72 -71
  6. package/dist/components/Button.js +56 -53
  7. package/dist/components/Caption.js +11 -8
  8. package/dist/components/Card.js +22 -20
  9. package/dist/components/Cell.js +52 -50
  10. package/dist/components/Checkbox.js +31 -29
  11. package/dist/components/Chips.js +21 -18
  12. package/dist/components/Choice.js +43 -49
  13. package/dist/components/Code.js +260 -105
  14. package/dist/components/ContextMenu.js +38 -34
  15. package/dist/components/CookiesWarning.js +26 -27
  16. package/dist/components/DatePicker.js +64 -67
  17. package/dist/components/Divider.js +15 -12
  18. package/dist/components/Dot.js +8 -6
  19. package/dist/components/Dropdown.js +88 -88
  20. package/dist/components/Empty.js +21 -19
  21. package/dist/components/Fader.js +13 -10
  22. package/dist/components/Flex.js +43 -37
  23. package/dist/components/FormField.js +77 -66
  24. package/dist/components/Grid.js +66 -57
  25. package/dist/components/Group.js +33 -30
  26. package/dist/components/Icon.js +41 -38
  27. package/dist/components/Image.js +34 -28
  28. package/dist/components/Input.js +29 -28
  29. package/dist/components/InputPassword.js +45 -48
  30. package/dist/components/Label.js +29 -26
  31. package/dist/components/LanguageSelector.js +29 -30
  32. package/dist/components/Link.js +43 -39
  33. package/dist/components/List.js +35 -29
  34. package/dist/components/Loader.js +22 -19
  35. package/dist/components/Logo.js +17 -14
  36. package/dist/components/Menu.js +20 -19
  37. package/dist/components/MenuItem.js +55 -52
  38. package/dist/components/Modal.js +51 -63
  39. package/dist/components/Notification.js +41 -38
  40. package/dist/components/Pagination.js +17 -15
  41. package/dist/components/RadioButton.js +31 -29
  42. package/dist/components/RangeSlider.js +29 -26
  43. package/dist/components/Scrollbar.js +6 -4
  44. package/dist/components/Search.js +66 -61
  45. package/dist/components/Segmented.js +52 -58
  46. package/dist/components/Select.js +181 -168
  47. package/dist/components/SiteMenu.js +34 -28
  48. package/dist/components/Swiper.js +104 -92
  49. package/dist/components/Switch.js +11 -9
  50. package/dist/components/Tab.js +95 -80
  51. package/dist/components/Text.js +27 -24
  52. package/dist/components/Textarea.js +23 -21
  53. package/dist/components/Tile.js +37 -34
  54. package/dist/components/Title.js +38 -30
  55. package/dist/components/Tooltip.js +24 -21
  56. package/dist/components/Video.js +16 -13
  57. package/dist/components/Wrapper.js +23 -20
  58. package/dist/constants/componentProps/align.js +1 -1
  59. package/dist/constants/componentProps/alignDirection.js +1 -1
  60. package/dist/constants/componentProps/borderColor.js +1 -1
  61. package/dist/constants/componentProps/borderType.js +1 -1
  62. package/dist/constants/componentProps/captionPosition.js +1 -1
  63. package/dist/constants/componentProps/direction.js +1 -1
  64. package/dist/constants/componentProps/emojiSize.js +1 -1
  65. package/dist/constants/componentProps/fill.js +1 -1
  66. package/dist/constants/componentProps/fillGradient.js +1 -1
  67. package/dist/constants/componentProps/fillType.js +1 -1
  68. package/dist/constants/componentProps/flexAlign.js +1 -1
  69. package/dist/constants/componentProps/flexJustifyContent.js +1 -1
  70. package/dist/constants/componentProps/flexWrap.js +1 -1
  71. package/dist/constants/componentProps/gridAlign.js +1 -1
  72. package/dist/constants/componentProps/gridAlignSelf.js +1 -1
  73. package/dist/constants/componentProps/gridJustifyItems.js +1 -1
  74. package/dist/constants/componentProps/gridJustifySelf.js +1 -1
  75. package/dist/constants/componentProps/horizontalContentAlign.js +1 -1
  76. package/dist/constants/componentProps/horizontalResizeMode.js +1 -1
  77. package/dist/constants/componentProps/iconSize.js +1 -1
  78. package/dist/constants/componentProps/position.js +1 -1
  79. package/dist/constants/componentProps/resizeMode.js +1 -1
  80. package/dist/constants/componentProps/shape.js +1 -1
  81. package/dist/constants/componentProps/size.js +1 -1
  82. package/dist/constants/componentProps/stacking.js +1 -1
  83. package/dist/constants/componentProps/strokeColor.js +1 -1
  84. package/dist/constants/componentProps/textAlign.js +1 -1
  85. package/dist/constants/componentProps/textColor.js +1 -1
  86. package/dist/constants/componentProps/textColorActive.js +1 -1
  87. package/dist/constants/componentProps/textColorHover.js +1 -1
  88. package/dist/constants/componentProps/textGradient.js +1 -1
  89. package/dist/constants/componentProps/textStyle.js +1 -1
  90. package/dist/constants/componentProps/textTag.js +1 -1
  91. package/dist/constants/componentProps/textWeight.js +1 -1
  92. package/dist/constants/componentProps/titleSize.js +1 -1
  93. package/dist/constants/componentProps/type.js +1 -1
  94. package/dist/constants/componentProps/underline.js +1 -1
  95. package/dist/constants/componentProps/verticalContentAlign.js +1 -1
  96. package/dist/constants/componentProps/verticalResizeMode.js +1 -1
  97. package/dist/constants/componentProps/width.js +1 -1
  98. package/dist/constants/componentProps/wrap.js +1 -1
  99. package/dist/context/Notifications.js +38 -53
  100. package/dist/context/UIContext.js +14 -17
  101. package/dist/css/components/Choice/Choice.css +8 -0
  102. package/dist/css/components/Code/Code.css +35 -34
  103. package/dist/css/components/DatePicker/DatePicker.css +39 -0
  104. package/dist/css/components/Swiper/Swiper.css +6 -3
  105. package/dist/css/components/Tab/Tab.css +10 -1
  106. package/dist/css/styles/align/align.css +0 -1
  107. package/dist/css/styles/align/align_horizontal-reverse.css +6 -6
  108. package/dist/css/styles/align/align_horizontal.css +9 -9
  109. package/dist/css/styles/border-color/border-color.css +15 -1
  110. package/dist/css/styles/column-gap/column-gap.css +3 -1
  111. package/dist/css/styles/gap/gap.css +3 -1
  112. package/dist/css/styles/row-gap/row-gap.css +3 -1
  113. package/dist/hooks/useDeviceTargetClass.js +19 -18
  114. package/dist/hooks/useMediaQueries.js +7 -10
  115. package/dist/hooks/useStyles.js +127 -8
  116. package/package.json +30 -29
  117. package/dist/useStyles-e4accb53.js +0 -153
@@ -18,7 +18,7 @@ require('../constants/componentProps/textColorHover.js');
18
18
  require('../constants/componentProps/size.js');
19
19
  require('../constants/componentProps/textStyle.js');
20
20
  require('../constants/componentProps/textWeight.js');
21
- require('../useStyles-e4accb53.js');
21
+ require('../hooks/useStyles.js');
22
22
  require('../hooks/styleAttributes.js');
23
23
  require('../constants/componentProps/borderType.js');
24
24
  require('../constants/componentProps/fill.js');
@@ -49,53 +49,52 @@ var Cookies__default = /*#__PURE__*/_interopDefault(Cookies);
49
49
  var clsx__default = /*#__PURE__*/_interopDefault(clsx);
50
50
 
51
51
  function CookiesWarning(props) {
52
- var message = props.message,
53
- className = props.className,
54
- buttonFill = props.buttonFill,
55
- buttonFillHover = props.buttonFillHover,
56
- buttonLabel = props.buttonLabel,
57
- buttonLabelSize = props.buttonLabelSize,
58
- buttonLabelTextColor = props.buttonLabelTextColor,
59
- buttonShape = props.buttonShape,
60
- buttonSize = props.buttonSize,
61
- textSize = props.textSize,
62
- textColor = props.textColor,
63
- buttonWidth = props.buttonWidth,
64
- isHideOnScroll = props.isHideOnScroll;
65
- var cookiesWarningRef = React.useRef(null);
66
- var isOpen = React.useMemo(function () {
67
- return Cookies__default.default.get('cookies-warning') !== 'close';
68
- }, []);
69
- var closeCookiesWarning = React.useCallback(function () {
70
- var _cookiesWarningRef$cu;
71
- (_cookiesWarningRef$cu = cookiesWarningRef.current) == null ? void 0 : _cookiesWarningRef$cu.classList.add('cookies-warning_state_hidden');
52
+ const {
53
+ message,
54
+ className,
55
+ buttonFill,
56
+ buttonFillHover,
57
+ buttonLabel,
58
+ buttonLabelSize,
59
+ buttonLabelTextColor,
60
+ buttonShape,
61
+ buttonSize,
62
+ textSize,
63
+ textColor,
64
+ buttonWidth,
65
+ isHideOnScroll
66
+ } = props;
67
+ const cookiesWarningRef = React.useRef(null);
68
+ const isOpen = React.useMemo(() => Cookies__default.default.get('cookies-warning') !== 'close', []);
69
+ const closeCookiesWarning = React.useCallback(() => {
70
+ cookiesWarningRef.current?.classList.add('cookies-warning_state_hidden');
72
71
  Cookies__default.default.set('cookies-warning', 'close');
73
72
  }, []);
74
- React.useEffect(function () {
73
+ React.useEffect(() => {
75
74
  if (isHideOnScroll) {
76
75
  window.addEventListener('scroll', closeCookiesWarning, true);
77
76
  }
78
- return function () {
77
+ return () => {
79
78
  window.removeEventListener('scroll', closeCookiesWarning, true);
80
79
  };
81
80
  }, []); // eslint-disable-line
82
81
 
83
- React.useEffect(function () {
82
+ React.useEffect(() => {
84
83
  // isHideOnScroll &&
85
84
  if (!isOpen) {
86
85
  window.removeEventListener('scroll', closeCookiesWarning, true);
87
86
  }
88
87
  }, [isOpen]); // eslint-disable-line
89
88
 
90
- var fillClass = useDeviceTargetClass.useDeviceTargetClass(props, {
89
+ const fillClass = useDeviceTargetClass.useDeviceTargetClass(props, {
91
90
  prefix: 'fill_',
92
91
  propsKey: 'fill'
93
92
  });
94
- var fillGradientClass = useDeviceTargetClass.useDeviceTargetClass(props, {
93
+ const fillGradientClass = useDeviceTargetClass.useDeviceTargetClass(props, {
95
94
  prefix: 'fill-gradient_',
96
95
  propsKey: 'fillGradient'
97
96
  });
98
- var gap = useDeviceTargetClass.useDeviceTargetClass(props, {
97
+ const gap = useDeviceTargetClass.useDeviceTargetClass(props, {
99
98
  propsKey: 'gap'
100
99
  });
101
100
  return isOpen ? /*#__PURE__*/React__default.default.createElement("div", {