@itcase/ui 1.8.78 → 1.8.80

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.
@@ -12,7 +12,7 @@ var Text = require('./Text_cjs_B8nNXWBA.js');
12
12
  var tslib_es6 = require('./tslib.es6_cjs_CCZ3TN_7.js');
13
13
 
14
14
  function Dropdown(props) {
15
- var className = props.className, appearance = props.appearance, _a = props.animationClose, animationClose = _a === void 0 ? 'dropdown_animation_close' : _a, _b = props.animationOpen, animationOpen = _b === void 0 ? 'dropdown_animation_open' : _b, dropdownList = props.dropdownList, before = props.before, after = props.after, isOpen = props.isOpen, isSkeleton = props.isSkeleton, setIsOpen = props.setIsOpen, children = props.children;
15
+ var className = props.className, appearance = props.appearance, _a = props.animationClose, animationClose = _a === void 0 ? 'dropdown_animation_close' : _a, _b = props.animationOpen, animationOpen = _b === void 0 ? 'dropdown_animation_open' : _b, dropdownList = props.dropdownList, before = props.before, after = props.after, isOpen = props.isOpen, isSkeleton = props.isSkeleton, setIsOpen = props.setIsOpen, onClickItem = props.onClickItem, children = props.children;
16
16
  var dropdownRef = React.useRef(null);
17
17
  // const [isOpen, setIsOpen] = useState(false)
18
18
  var _c = React.useState({
@@ -63,7 +63,7 @@ function Dropdown(props) {
63
63
  var styles = useStyles.useStyles(props).styles;
64
64
  return (jsxRuntime.jsxs("div", { className: clsx(className, 'dropdown', alignmentClass && "alignment_".concat(alignmentClass), shapeClass && "shape_".concat(shapeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass), elevationClass && "elevation_".concat(elevationClass), isOpen ? 'dropdown_state_open' : 'dropdown_state_close', animationState.className), ref: dropdownRef, style: styles, children: [before, (children || dropdownList) && (jsxRuntime.jsxs("div", { className: clsx('dropdown__wrapper', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass)),
65
65
  // Add "onAnimationEnd" only for wrapper for ignore dropdown button
66
- onAnimationEnd: onAnimationEnd, children: [dropdownList === null || dropdownList === void 0 ? void 0 : dropdownList.map(function (item) { return (jsxRuntime.jsx(DropdownItem, { appearance: appearance, label: item.label, badgeValue: item.badgeValue, emptyMessage: item.emptyMessage, iconAfter: item.iconAfter, iconBefore: item.iconBefore, iconSrc: item.icon, isActive: item.isActive, isSkeleton: isSkeleton }, item.key)); }), children] })), after] }));
66
+ onAnimationEnd: onAnimationEnd, children: [dropdownList === null || dropdownList === void 0 ? void 0 : dropdownList.map(function (item) { return (jsxRuntime.jsx(DropdownItem, { appearance: appearance, label: item.label, badgeValue: item.badgeValue, emptyMessage: item.emptyMessage, iconAfter: item.iconAfter, iconBefore: item.iconBefore, iconSrc: item.icon, isActive: item.isActive, isSkeleton: isSkeleton, onClick: item.onClick || (function (event) { return onClickItem === null || onClickItem === void 0 ? void 0 : onClickItem(item, event); }) }, item.key)); }), children] })), after] }));
67
67
  }
68
68
 
69
69
  var dropdownAppearanceAccent = {
@@ -10,7 +10,7 @@ import { T as Text } from './Text_es_BvmOR4nv.js';
10
10
  import { _ as __assign } from './tslib.es6_es_Bwu1Cn-t.js';
11
11
 
12
12
  function Dropdown(props) {
13
- var className = props.className, appearance = props.appearance, _a = props.animationClose, animationClose = _a === void 0 ? 'dropdown_animation_close' : _a, _b = props.animationOpen, animationOpen = _b === void 0 ? 'dropdown_animation_open' : _b, dropdownList = props.dropdownList, before = props.before, after = props.after, isOpen = props.isOpen, isSkeleton = props.isSkeleton, setIsOpen = props.setIsOpen, children = props.children;
13
+ var className = props.className, appearance = props.appearance, _a = props.animationClose, animationClose = _a === void 0 ? 'dropdown_animation_close' : _a, _b = props.animationOpen, animationOpen = _b === void 0 ? 'dropdown_animation_open' : _b, dropdownList = props.dropdownList, before = props.before, after = props.after, isOpen = props.isOpen, isSkeleton = props.isSkeleton, setIsOpen = props.setIsOpen, onClickItem = props.onClickItem, children = props.children;
14
14
  var dropdownRef = useRef(null);
15
15
  // const [isOpen, setIsOpen] = useState(false)
16
16
  var _c = useState({
@@ -61,7 +61,7 @@ function Dropdown(props) {
61
61
  var styles = useStyles(props).styles;
62
62
  return (jsxs("div", { className: clsx(className, 'dropdown', alignmentClass && "alignment_".concat(alignmentClass), shapeClass && "shape_".concat(shapeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass), elevationClass && "elevation_".concat(elevationClass), isOpen ? 'dropdown_state_open' : 'dropdown_state_close', animationState.className), ref: dropdownRef, style: styles, children: [before, (children || dropdownList) && (jsxs("div", { className: clsx('dropdown__wrapper', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass)),
63
63
  // Add "onAnimationEnd" only for wrapper for ignore dropdown button
64
- onAnimationEnd: onAnimationEnd, children: [dropdownList === null || dropdownList === void 0 ? void 0 : dropdownList.map(function (item) { return (jsx(DropdownItem, { appearance: appearance, label: item.label, badgeValue: item.badgeValue, emptyMessage: item.emptyMessage, iconAfter: item.iconAfter, iconBefore: item.iconBefore, iconSrc: item.icon, isActive: item.isActive, isSkeleton: isSkeleton }, item.key)); }), children] })), after] }));
64
+ onAnimationEnd: onAnimationEnd, children: [dropdownList === null || dropdownList === void 0 ? void 0 : dropdownList.map(function (item) { return (jsx(DropdownItem, { appearance: appearance, label: item.label, badgeValue: item.badgeValue, emptyMessage: item.emptyMessage, iconAfter: item.iconAfter, iconBefore: item.iconBefore, iconSrc: item.icon, isActive: item.isActive, isSkeleton: isSkeleton, onClick: item.onClick || (function (event) { return onClickItem === null || onClickItem === void 0 ? void 0 : onClickItem(item, event); }) }, item.key)); }), children] })), after] }));
65
65
  }
66
66
 
67
67
  var dropdownAppearanceAccent = {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var DropdownItem = require('../../DropdownItem_cjs_sK2QBHIa.js');
3
+ var DropdownItem = require('../../DropdownItem_cjs_HeDIPuKd.js');
4
4
  require('react/jsx-runtime');
5
5
  require('react');
6
6
  require('clsx');
@@ -8,7 +8,7 @@ var ReactPaginate = require('react-paginate');
8
8
  var useAppearanceConfig = require('../hooks/useAppearanceConfig/useAppearanceConfig.js');
9
9
  var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
10
10
  var useStyles = require('../hooks/useStyles/useStyles.js');
11
- var DropdownItem = require('../../DropdownItem_cjs_sK2QBHIa.js');
11
+ var DropdownItem = require('../../DropdownItem_cjs_HeDIPuKd.js');
12
12
  var Icon = require('../../Icon_cjs_Zv-F7ZYW.js');
13
13
  var Text = require('../../Text_cjs_B8nNXWBA.js');
14
14
  var tslib_es6 = require('../../tslib.es6_cjs_CCZ3TN_7.js');
@@ -1,4 +1,4 @@
1
- export { D as Dropdown, a as DropdownItem, d as dropdownItemAppearance, b as dropdownItemConfig } from '../DropdownItem_es_CLVNB92B.js';
1
+ export { D as Dropdown, a as DropdownItem, d as dropdownItemAppearance, b as dropdownItemConfig } from '../DropdownItem_es_C7P-fBm9.js';
2
2
  import 'react/jsx-runtime';
3
3
  import 'react';
4
4
  import 'clsx';
@@ -6,7 +6,7 @@ import ReactPaginate from 'react-paginate';
6
6
  import { useAppearanceConfig } from '../hooks/useAppearanceConfig/useAppearanceConfig.js';
7
7
  import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
8
8
  import { useStyles } from '../hooks/useStyles/useStyles.js';
9
- import { D as Dropdown, a as DropdownItem } from '../DropdownItem_es_CLVNB92B.js';
9
+ import { D as Dropdown, a as DropdownItem } from '../DropdownItem_es_C7P-fBm9.js';
10
10
  import { I as Icon } from '../Icon_es_U8q1esww.js';
11
11
  import { T as Text } from '../Text_es_BvmOR4nv.js';
12
12
  import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcase/ui",
3
- "version": "1.8.78",
3
+ "version": "1.8.80",
4
4
  "description": "UI components (Modal, Loader, Popup, etc)",
5
5
  "keywords": [
6
6
  "Modal",