@zohodesk/components 1.0.0-alpha-239 → 1.0.0-alpha-242
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/README.md +20 -6
- package/assets/Appearance/dark/mode/darkMode.module.css +2 -2
- package/assets/Appearance/default/mode/defaultMode.module.css +3 -3
- package/assets/Appearance/pureDark/mode/pureDarkMode.module.css +2 -2
- package/es/DateTime/DateTime.js +42 -21
- package/es/DateTime/DateWidget.module.css +0 -4
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +100 -75
- package/es/MultiSelect/AdvancedMultiSelect.js +75 -49
- package/es/MultiSelect/MultiSelect.js +80 -55
- package/es/MultiSelect/MultiSelect.module.css +6 -1
- package/es/MultiSelect/MultiSelectWithAvatar.js +77 -52
- package/es/PopOver/PopOver.js +10 -4
- package/es/Provider.js +5 -105
- package/es/ResponsiveDropBox/ResponsiveDropBox.js +74 -0
- package/es/ResponsiveDropBox/ResponsiveDropBox.module.css +6 -0
- package/es/Select/GroupSelect.js +99 -74
- package/es/Select/Select.js +95 -68
- package/es/Select/Select.module.css +6 -0
- package/es/Select/SelectWithAvatar.js +91 -66
- package/es/Select/SelectWithIcon.js +99 -74
- package/es/Tab/Tabs.js +68 -43
- package/es/Tab/Tabs.module.css +2 -1
- package/es/Tag/Tag.js +1 -1
- package/es/Tag/Tag.module.css +6 -2
- package/es/Tooltip/Tooltip.js +1 -1
- package/es/index.js +2 -1
- package/lib/DateTime/DateTime.js +42 -22
- package/lib/DateTime/DateWidget.module.css +0 -4
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +99 -77
- package/lib/MultiSelect/AdvancedMultiSelect.js +76 -50
- package/lib/MultiSelect/MultiSelect.js +81 -56
- package/lib/MultiSelect/MultiSelect.module.css +6 -1
- package/lib/MultiSelect/MultiSelectWithAvatar.js +78 -53
- package/lib/PopOver/PopOver.js +11 -4
- package/lib/Provider.js +6 -123
- package/lib/ResponsiveDropBox/ResponsiveDropBox.js +130 -0
- package/lib/ResponsiveDropBox/ResponsiveDropBox.module.css +6 -0
- package/lib/Select/GroupSelect.js +99 -76
- package/lib/Select/Select.js +102 -75
- package/lib/Select/Select.module.css +6 -0
- package/lib/Select/SelectWithAvatar.js +96 -71
- package/lib/Select/SelectWithIcon.js +97 -74
- package/lib/Tab/Tabs.js +67 -44
- package/lib/Tab/Tabs.module.css +2 -1
- package/lib/Tag/Tag.js +1 -1
- package/lib/Tag/Tag.module.css +6 -2
- package/lib/Tooltip/Tooltip.js +1 -1
- package/lib/index.js +10 -1
- package/package.json +3 -3
|
@@ -6,12 +6,13 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import Popup from '../Popup/Popup';
|
|
7
7
|
import TextBoxIcon from '../TextBoxIcon/TextBoxIcon';
|
|
8
8
|
import Icon from '@zohodesk/icons/lib/Icon';
|
|
9
|
-
import DropBox from '../DropBox/DropBox';
|
|
10
9
|
import ListItemWithIcon from '../ListItem/ListItemWithIcon';
|
|
11
10
|
import Card, { CardHeader, CardContent } from '../Card/Card';
|
|
12
11
|
import EmptyState from '../MultiSelect/EmptyState';
|
|
13
12
|
import { Container, Box } from '../Layout';
|
|
14
13
|
import { getUniqueId } from '../Provider/IdProvider';
|
|
14
|
+
import ResponsiveDropBox from '../ResponsiveDropBox/ResponsiveDropBox';
|
|
15
|
+
import { ResponsiveReceiver } from '../Responsive/CustomResponsive';
|
|
15
16
|
/**** Methods ****/
|
|
16
17
|
|
|
17
18
|
import { scrollTo } from '../utils/Common.js';
|
|
@@ -234,6 +235,17 @@ class SelectWithIcon extends Component {
|
|
|
234
235
|
}
|
|
235
236
|
}
|
|
236
237
|
|
|
238
|
+
responsiveFunc(_ref) {
|
|
239
|
+
let {
|
|
240
|
+
mediaQueryOR
|
|
241
|
+
} = _ref;
|
|
242
|
+
return {
|
|
243
|
+
tabletMode: mediaQueryOR([{
|
|
244
|
+
maxWidth: 700
|
|
245
|
+
}])
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
|
|
237
249
|
render() {
|
|
238
250
|
let {
|
|
239
251
|
animationStyle,
|
|
@@ -346,82 +358,95 @@ class SelectWithIcon extends Component {
|
|
|
346
358
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
347
359
|
name: "ZD-down",
|
|
348
360
|
size: "7"
|
|
349
|
-
})))))), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/React.createElement(
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
isAnimate: true,
|
|
354
|
-
isArrow: false,
|
|
355
|
-
onClick: removeClose,
|
|
356
|
-
getRef: getContainerRef,
|
|
357
|
-
needResponsive: needResponsive,
|
|
358
|
-
dataId: `${dataId}_suggestions`,
|
|
359
|
-
size: boxSize,
|
|
360
|
-
isPadding: false
|
|
361
|
-
}, /*#__PURE__*/React.createElement(Card, {
|
|
362
|
-
onScroll: this.handleScroll,
|
|
363
|
-
htmlId: setAriaId,
|
|
364
|
-
a11y: {
|
|
365
|
-
role: 'listbox'
|
|
366
|
-
}
|
|
367
|
-
}, needSearch ? /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement("div", {
|
|
368
|
-
className: `${style.search} ${style[size]}`
|
|
369
|
-
}, /*#__PURE__*/React.createElement(TextBoxIcon, {
|
|
370
|
-
onClear: this.onSearchClear,
|
|
371
|
-
onChange: this.onSearch,
|
|
372
|
-
placeHolder: searchBoxPlaceHolder,
|
|
373
|
-
value: searchValue,
|
|
374
|
-
maxLength: maxLength,
|
|
375
|
-
onKeyDown: this.handleKeyDown,
|
|
376
|
-
inputRef: this.searchInputRef,
|
|
377
|
-
size: searchBoxSize,
|
|
378
|
-
dataId: `${dataId}_search`,
|
|
379
|
-
a11y: {
|
|
380
|
-
ariaDescribedby: ariaErrorId
|
|
381
|
-
},
|
|
382
|
-
autoComplete: false
|
|
383
|
-
}))) : null, /*#__PURE__*/React.createElement(CardContent, {
|
|
384
|
-
customClass: `${style.dropBoxList} ${dropBoxSize ? style[dropBoxSize] : ''}`,
|
|
385
|
-
eleRef: this.scrollContentRef
|
|
386
|
-
}, options.length ? /*#__PURE__*/React.createElement(React.Fragment, null, options.map((options, i) => {
|
|
361
|
+
})))))), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
|
|
362
|
+
query: this.responsiveFunc,
|
|
363
|
+
responsiveId: "Helmet"
|
|
364
|
+
}, _ref2 => {
|
|
387
365
|
let {
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
onClick:
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
highlight: selectedIndex === i,
|
|
410
|
-
getRef: this.itemRef,
|
|
366
|
+
tabletMode
|
|
367
|
+
} = _ref2;
|
|
368
|
+
return /*#__PURE__*/React.createElement(ResponsiveDropBox, {
|
|
369
|
+
animationStyle: animationStyle,
|
|
370
|
+
boxPosition: position,
|
|
371
|
+
isActive: isPopupReady,
|
|
372
|
+
isAnimate: true,
|
|
373
|
+
isArrow: false,
|
|
374
|
+
onClick: removeClose,
|
|
375
|
+
getRef: getContainerRef,
|
|
376
|
+
needResponsive: needResponsive,
|
|
377
|
+
dataId: `${dataId}_suggestions`,
|
|
378
|
+
size: boxSize,
|
|
379
|
+
isPadding: false,
|
|
380
|
+
isResponsivePadding: true,
|
|
381
|
+
alignBox: "row"
|
|
382
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
383
|
+
flexible: true
|
|
384
|
+
}, /*#__PURE__*/React.createElement(Card, {
|
|
385
|
+
onScroll: this.handleScroll,
|
|
386
|
+
htmlId: setAriaId,
|
|
411
387
|
a11y: {
|
|
412
|
-
role: '
|
|
413
|
-
ariaSelected: selectedId === options[idKey]
|
|
388
|
+
role: 'listbox'
|
|
414
389
|
}
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
390
|
+
}, needSearch ? /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement("div", {
|
|
391
|
+
className: `${style.search} ${style[size]}`
|
|
392
|
+
}, /*#__PURE__*/React.createElement(TextBoxIcon, {
|
|
393
|
+
onClear: this.onSearchClear,
|
|
394
|
+
onChange: this.onSearch,
|
|
395
|
+
placeHolder: searchBoxPlaceHolder,
|
|
396
|
+
value: searchValue,
|
|
397
|
+
maxLength: maxLength,
|
|
398
|
+
onKeyDown: this.handleKeyDown,
|
|
399
|
+
inputRef: this.searchInputRef,
|
|
400
|
+
size: searchBoxSize,
|
|
401
|
+
dataId: `${dataId}_search`,
|
|
402
|
+
a11y: {
|
|
403
|
+
ariaDescribedby: ariaErrorId
|
|
404
|
+
},
|
|
405
|
+
autoComplete: false
|
|
406
|
+
}))) : null, /*#__PURE__*/React.createElement(CardContent, {
|
|
407
|
+
customClass: `${tabletMode ? style.responsivedropBoxList : style.dropBoxList} ${!tabletMode && dropBoxSize ? style[dropBoxSize] : ''}`,
|
|
408
|
+
shrink: true,
|
|
409
|
+
eleRef: this.scrollContentRef
|
|
410
|
+
}, options.length ? /*#__PURE__*/React.createElement(React.Fragment, null, options.map((options, i) => {
|
|
411
|
+
let {
|
|
412
|
+
iconName,
|
|
413
|
+
iconSize,
|
|
414
|
+
iconColor
|
|
415
|
+
} = options;
|
|
416
|
+
return /*#__PURE__*/React.createElement(ListItemWithIcon, {
|
|
417
|
+
key: options[idKey],
|
|
418
|
+
value: options[valueKey],
|
|
419
|
+
size: "medium",
|
|
420
|
+
onClick: this.handleChange,
|
|
421
|
+
id: options[idKey],
|
|
422
|
+
index: i,
|
|
423
|
+
title: options[valueKey],
|
|
424
|
+
palette: "default",
|
|
425
|
+
dataId: options[idKey],
|
|
426
|
+
iconName: iconName,
|
|
427
|
+
iconSize: iconSize,
|
|
428
|
+
iconClass: iconColor,
|
|
429
|
+
active: selectedId === options[idKey],
|
|
430
|
+
needBorder: needListBorder,
|
|
431
|
+
needTick: needTick,
|
|
432
|
+
onMouseEnter: this.handleMouseEnter,
|
|
433
|
+
highlight: selectedIndex === i,
|
|
434
|
+
getRef: this.itemRef,
|
|
435
|
+
a11y: {
|
|
436
|
+
role: 'option',
|
|
437
|
+
ariaSelected: selectedId === options[idKey]
|
|
438
|
+
}
|
|
439
|
+
});
|
|
440
|
+
})) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
441
|
+
isLoading: isFetchingOptions,
|
|
442
|
+
options: options,
|
|
443
|
+
searchString: searchValue,
|
|
444
|
+
suggestions: options,
|
|
445
|
+
dataId: dataId,
|
|
446
|
+
i18nKeys: i18nKeys,
|
|
447
|
+
htmlId: ariaErrorId
|
|
448
|
+
})))));
|
|
449
|
+
}) : null);
|
|
425
450
|
}
|
|
426
451
|
|
|
427
452
|
}
|
package/es/Tab/Tabs.js
CHANGED
|
@@ -14,12 +14,13 @@ import PropTypes from 'prop-types';
|
|
|
14
14
|
import { remConvert, getTotalDimension, cs, bind, throttle } from '../utils/Common';
|
|
15
15
|
import { Box, Container } from '../Layout';
|
|
16
16
|
import Tab from './Tab';
|
|
17
|
-
import DropBox from '../DropBox/DropBox';
|
|
18
17
|
import ResizeObserver from '../Responsive/ResizeObserver';
|
|
19
18
|
import ListItem from '../ListItem/ListItem';
|
|
20
19
|
import Icon from '@zohodesk/icons/lib/Icon';
|
|
21
20
|
import tabsStyle from './Tabs.module.css';
|
|
22
21
|
import Popup from '../Popup/Popup';
|
|
22
|
+
import ResponsiveDropBox from '../ResponsiveDropBox/ResponsiveDropBox';
|
|
23
|
+
import { ResponsiveReceiver } from '../Responsive/CustomResponsive';
|
|
23
24
|
|
|
24
25
|
class Tabs extends React.Component {
|
|
25
26
|
constructor(props) {
|
|
@@ -390,6 +391,17 @@ class Tabs extends React.Component {
|
|
|
390
391
|
togglePopup(e, boxPosition);
|
|
391
392
|
}
|
|
392
393
|
|
|
394
|
+
responsiveFunc(_ref) {
|
|
395
|
+
let {
|
|
396
|
+
mediaQueryOR
|
|
397
|
+
} = _ref;
|
|
398
|
+
return {
|
|
399
|
+
tabletMode: mediaQueryOR([{
|
|
400
|
+
maxWidth: 700
|
|
401
|
+
}])
|
|
402
|
+
};
|
|
403
|
+
}
|
|
404
|
+
|
|
393
405
|
renderTabs(mainTabs, moreTabs, isVirtual) {
|
|
394
406
|
let {
|
|
395
407
|
selectedTab,
|
|
@@ -463,51 +475,64 @@ class Tabs extends React.Component {
|
|
|
463
475
|
}, MoreButtonProps), /*#__PURE__*/React.createElement(Icon, {
|
|
464
476
|
name: iconName,
|
|
465
477
|
size: iconSize
|
|
466
|
-
})), isPopupOpen && /*#__PURE__*/React.createElement(
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
customClass: {
|
|
471
|
-
customDropBoxWrap: `${moreContainerClass} ${popupClass}`
|
|
472
|
-
},
|
|
473
|
-
boxPosition: position,
|
|
474
|
-
getRef: getContainerRef,
|
|
475
|
-
isBoxPaddingNeed: true,
|
|
476
|
-
isArrow: false
|
|
477
|
-
}, DropBoxProps), getCustomDropBoxHeaderPlaceHolder && getCustomDropBoxHeaderPlaceHolder(this.props), /*#__PURE__*/React.createElement("div", {
|
|
478
|
-
className: `${tabsStyle.menuBox} ${moreBoxClass}`,
|
|
479
|
-
onScroll: this.onScroll
|
|
480
|
-
}, React.Children.map(moreTabs, child => {
|
|
481
|
-
if (!child) {
|
|
482
|
-
return null;
|
|
483
|
-
}
|
|
484
|
-
|
|
478
|
+
})), isPopupOpen && /*#__PURE__*/React.createElement(ResponsiveReceiver, {
|
|
479
|
+
query: this.responsiveFunc,
|
|
480
|
+
responsiveId: "Helmet"
|
|
481
|
+
}, _ref2 => {
|
|
485
482
|
let {
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
dataId
|
|
493
|
-
} = child.props;
|
|
494
|
-
const value = text ? text : showTitleInMoreOptions ? title : null;
|
|
495
|
-
return /*#__PURE__*/React.isValidElement(child) && /*#__PURE__*/React.createElement(ListItem, _extends({
|
|
496
|
-
key: id,
|
|
497
|
-
value: value,
|
|
498
|
-
onClick: this.moreTabSelect,
|
|
499
|
-
id: id,
|
|
500
|
-
title: title || text,
|
|
501
|
-
isLink: isLink,
|
|
502
|
-
href: href,
|
|
503
|
-
autoHover: true,
|
|
483
|
+
tabletMode
|
|
484
|
+
} = _ref2;
|
|
485
|
+
return /*#__PURE__*/React.createElement(ResponsiveDropBox, _extends({
|
|
486
|
+
isActive: isPopupReady,
|
|
487
|
+
isAnimate: true,
|
|
488
|
+
size: "medium",
|
|
504
489
|
customClass: {
|
|
505
|
-
|
|
490
|
+
customDropBoxWrap: `${moreContainerClass} ${popupClass}`
|
|
506
491
|
},
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
492
|
+
boxPosition: position,
|
|
493
|
+
getRef: getContainerRef,
|
|
494
|
+
isBoxPaddingNeed: true,
|
|
495
|
+
isArrow: false
|
|
496
|
+
}, DropBoxProps, {
|
|
497
|
+
isResponsivePadding: true
|
|
498
|
+
}), getCustomDropBoxHeaderPlaceHolder && getCustomDropBoxHeaderPlaceHolder(this.props), /*#__PURE__*/React.createElement(Box, {
|
|
499
|
+
flexible: true,
|
|
500
|
+
shrink: true,
|
|
501
|
+
scroll: "vertical",
|
|
502
|
+
className: `${tabletMode ? '' : tabsStyle.menuBox} ${moreBoxClass}`,
|
|
503
|
+
onScroll: this.onScroll
|
|
504
|
+
}, React.Children.map(moreTabs, child => {
|
|
505
|
+
if (!child) {
|
|
506
|
+
return null;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
let {
|
|
510
|
+
text,
|
|
511
|
+
id,
|
|
512
|
+
title,
|
|
513
|
+
isLink,
|
|
514
|
+
href,
|
|
515
|
+
children,
|
|
516
|
+
dataId
|
|
517
|
+
} = child.props;
|
|
518
|
+
const value = text ? text : showTitleInMoreOptions ? title : null;
|
|
519
|
+
return /*#__PURE__*/React.isValidElement(child) && /*#__PURE__*/React.createElement(ListItem, _extends({
|
|
520
|
+
key: id,
|
|
521
|
+
value: value,
|
|
522
|
+
onClick: this.moreTabSelect,
|
|
523
|
+
id: id,
|
|
524
|
+
title: title || text,
|
|
525
|
+
isLink: isLink,
|
|
526
|
+
href: href,
|
|
527
|
+
autoHover: true,
|
|
528
|
+
customClass: {
|
|
529
|
+
customListItem: menuItemClass
|
|
530
|
+
},
|
|
531
|
+
target: "self",
|
|
532
|
+
dataId: `${dataId}_Tab`
|
|
533
|
+
}, ListItemProps), !showTitleInMoreOptions ? children : null);
|
|
534
|
+
})));
|
|
535
|
+
})) : null);
|
|
511
536
|
}
|
|
512
537
|
|
|
513
538
|
render() {
|
package/es/Tab/Tabs.module.css
CHANGED
|
@@ -118,13 +118,14 @@
|
|
|
118
118
|
}
|
|
119
119
|
.menuBox {
|
|
120
120
|
max-height: var(--zd_size220);
|
|
121
|
-
composes: oflowy from '../common/common.module.css';
|
|
122
121
|
}
|
|
123
122
|
|
|
123
|
+
|
|
124
124
|
[dir=ltr] .bottomRightToLeft, [dir=ltr] .topRightToLeft, [dir=ltr] .bottomCenterToLeft {
|
|
125
125
|
right: calc(var(--tab_position_gap) * -1);
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
+
|
|
128
129
|
[dir=rtl] .bottomRightToLeft, [dir=rtl] .topRightToLeft, [dir=rtl] .bottomCenterToLeft {
|
|
129
130
|
left: calc(var(--tab_position_gap) * -1);
|
|
130
131
|
}
|
package/es/Tag/Tag.js
CHANGED
|
@@ -170,7 +170,7 @@ Tag.propTypes = {
|
|
|
170
170
|
initial: PropTypes.string,
|
|
171
171
|
onRemove: PropTypes.func,
|
|
172
172
|
onSelectTag: PropTypes.func,
|
|
173
|
-
palette: PropTypes.oneOf(['default', 'danger', 'secondary', 'pureDotted', 'primaryDotted', 'dark', 'pureDarkDotted', 'darkPrimaryDotted']),
|
|
173
|
+
palette: PropTypes.oneOf(['default', 'danger', 'secondary', 'pureDotted', 'primaryDotted', 'dark', 'pureDarkDotted', 'darkPrimaryDotted', 'defaultLink']),
|
|
174
174
|
rounded: PropTypes.bool,
|
|
175
175
|
size: PropTypes.oneOf(['small', 'medium']),
|
|
176
176
|
text: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
package/es/Tag/Tag.module.css
CHANGED
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
--tag_closeicon_bg_color: var(--zdt_tag_closeprimary_bg);
|
|
159
159
|
}
|
|
160
160
|
.default,
|
|
161
|
-
.danger {
|
|
161
|
+
.danger,.defaultLink {
|
|
162
162
|
--tag_bg_color: var(--zdt_tag_default_danger_bg);
|
|
163
163
|
}
|
|
164
164
|
.effect.default:hover {
|
|
@@ -184,7 +184,6 @@
|
|
|
184
184
|
.activedangerClose:hover {
|
|
185
185
|
--tag_closeicon_bg_color: var(--zdt_tag_danger_bg);
|
|
186
186
|
}
|
|
187
|
-
|
|
188
187
|
.secondary {
|
|
189
188
|
--tag_bg_color: var(--zdt_tag_secondary_bg);
|
|
190
189
|
--tag_text_color: var(--zdt_tag_secondary_text);
|
|
@@ -193,6 +192,11 @@
|
|
|
193
192
|
.effect.secondary:hover {
|
|
194
193
|
--tag_bg_color: var(--zdt_tag_secondary_hover_bg);
|
|
195
194
|
}
|
|
195
|
+
.activedefaultLink,
|
|
196
|
+
.effect.defaultLink:hover{
|
|
197
|
+
--tag_bg_color: var(--zdt_tag_defaultLink_hover_bg);
|
|
198
|
+
--tag_text_color: var(--zdt_tag_defaultLink_hover_text);
|
|
199
|
+
};
|
|
196
200
|
|
|
197
201
|
.pureDotted {
|
|
198
202
|
--tag_bg_color: var(--zdt_tag_pure_bg);
|
package/es/Tooltip/Tooltip.js
CHANGED
package/es/index.js
CHANGED
|
@@ -153,4 +153,5 @@ export { default as FocusScope } from './a11y/FocusScope/FocusScope';
|
|
|
153
153
|
export { default as FocusScope__default } from './a11y/FocusScope/docs/FocusScope__default.docs';
|
|
154
154
|
export { default as FocusRing } from './beta/FocusRing/FocusRing';
|
|
155
155
|
export { default as FocusRing__default } from './beta/FocusRing/docs/FocusRing__default.docs';
|
|
156
|
-
export { default as LightNightMode__AlternativeColors } from './LightNightMode/docs/AlternativeColors.docs';
|
|
156
|
+
export { default as LightNightMode__AlternativeColors } from './LightNightMode/docs/AlternativeColors.docs';
|
|
157
|
+
export { default as ResponsiveDropBox } from './ResponsiveDropBox/ResponsiveDropBox';
|
package/lib/DateTime/DateTime.js
CHANGED
|
@@ -15,8 +15,6 @@ var _datetimejs = _interopRequireDefault(require("@zohodesk/datetimejs"));
|
|
|
15
15
|
|
|
16
16
|
var _CalendarView = _interopRequireDefault(require("./CalendarView"));
|
|
17
17
|
|
|
18
|
-
var _DropBox = _interopRequireDefault(require("../DropBox/DropBox"));
|
|
19
|
-
|
|
20
18
|
var _YearView = _interopRequireDefault(require("./YearView"));
|
|
21
19
|
|
|
22
20
|
var _DateTimePopupHeader = _interopRequireDefault(require("./DateTimePopupHeader"));
|
|
@@ -33,6 +31,12 @@ var _Common = require("../utils/Common");
|
|
|
33
31
|
|
|
34
32
|
var _constants = require("./constants");
|
|
35
33
|
|
|
34
|
+
var _ResponsiveDropBox = _interopRequireDefault(require("../ResponsiveDropBox/ResponsiveDropBox"));
|
|
35
|
+
|
|
36
|
+
var _CustomResponsive = require("../Responsive/CustomResponsive");
|
|
37
|
+
|
|
38
|
+
var _Layout = require("../Layout");
|
|
39
|
+
|
|
36
40
|
var _dateFormatUtils = require("./dateFormatUtils");
|
|
37
41
|
|
|
38
42
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -688,6 +692,16 @@ var DateTime = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
688
692
|
isMonthOpen: false
|
|
689
693
|
});
|
|
690
694
|
}
|
|
695
|
+
}, {
|
|
696
|
+
key: "responsiveFunc",
|
|
697
|
+
value: function responsiveFunc(_ref3) {
|
|
698
|
+
var mediaQueryOR = _ref3.mediaQueryOR;
|
|
699
|
+
return {
|
|
700
|
+
tabletMode: mediaQueryOR([{
|
|
701
|
+
maxWidth: 700
|
|
702
|
+
}])
|
|
703
|
+
};
|
|
704
|
+
}
|
|
691
705
|
}, {
|
|
692
706
|
key: "render",
|
|
693
707
|
value: function render() {
|
|
@@ -805,26 +819,32 @@ var DateTime = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
805
819
|
return isDefaultPosition ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
806
820
|
className: "".concat(_DateTimeModule["default"].dropBox, " ").concat(className),
|
|
807
821
|
"data-id": "".concat(dataId, "_dateBoxContainer")
|
|
808
|
-
}, childEle) : isReady ? /*#__PURE__*/_react["default"].createElement(
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
822
|
+
}, childEle) : isReady ? /*#__PURE__*/_react["default"].createElement(_CustomResponsive.ResponsiveReceiver, {
|
|
823
|
+
query: this.responsiveFunc,
|
|
824
|
+
responsiveId: "Helmet"
|
|
825
|
+
}, function (_ref4) {
|
|
826
|
+
var tabletMode = _ref4.tabletMode;
|
|
827
|
+
return /*#__PURE__*/_react["default"].createElement(_ResponsiveDropBox["default"], {
|
|
828
|
+
size: boxSize,
|
|
829
|
+
boxPosition: position,
|
|
830
|
+
isActive: isActive,
|
|
831
|
+
isArrow: false,
|
|
832
|
+
isAnimate: isAnimate,
|
|
833
|
+
animationStyle: "bounce",
|
|
834
|
+
getRef: getRef,
|
|
835
|
+
onClick: onClick,
|
|
836
|
+
dataId: "".concat(dataId, "_dateBoxContainer"),
|
|
837
|
+
needResponsive: needResponsive,
|
|
838
|
+
isAbsolutePositioningNeeded: isAbsolute,
|
|
839
|
+
customClass: {
|
|
840
|
+
customDropBoxWrap: className
|
|
841
|
+
},
|
|
842
|
+
isPadding: isPadding,
|
|
843
|
+
positionsOffset: positionsOffset,
|
|
844
|
+
targetOffset: targetOffset,
|
|
845
|
+
isRestrictScroll: isRestrictScroll
|
|
846
|
+
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, null, childEle));
|
|
847
|
+
}) : null;
|
|
828
848
|
}
|
|
829
849
|
}]);
|
|
830
850
|
|