@zohodesk/components 1.0.0-temp-555 → 1.0.0-temp-999

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.
@@ -24,7 +24,10 @@ export default class AlternativeColors extends React.Component {
24
24
  }, "Light Mode Colors"), /*#__PURE__*/React.createElement(Box, {
25
25
  flexible: true,
26
26
  className: style.rgt
27
- }, "Alternate Night Mode Colors")), /*#__PURE__*/React.createElement(Container, {
27
+ }, "Alternate Night Mode Colors"), /*#__PURE__*/React.createElement(Box, {
28
+ flexible: true,
29
+ className: style.rgt
30
+ }, "Alternate Pure Dark Mode Colors")), /*#__PURE__*/React.createElement(Container, {
28
31
  alignBox: "row",
29
32
  className: style.content
30
33
  }, /*#__PURE__*/React.createElement(Box, {
@@ -62,6 +65,23 @@ export default class AlternativeColors extends React.Component {
62
65
  onClick: () => navigator.clipboard.writeText(clrValue),
63
66
  "data-title": `Copy ${clrValue}`
64
67
  }, clrValue));
68
+ })), /*#__PURE__*/React.createElement(Box, {
69
+ flexible: true,
70
+ className: style.rgt
71
+ }, index.equalPureDarkColors.toString().split(", ").map((clrValue, j) => {
72
+ return /*#__PURE__*/React.createElement("div", {
73
+ className: style.nestedDiv,
74
+ key: j
75
+ }, /*#__PURE__*/React.createElement("span", {
76
+ style: {
77
+ backgroundColor: `${clrValue}`
78
+ },
79
+ className: `${style.rect} ${style.gold}`
80
+ }), /*#__PURE__*/React.createElement("span", {
81
+ className: style.colorvalue,
82
+ onClick: () => navigator.clipboard.writeText(clrValue),
83
+ "data-title": `Copy ${clrValue}`
84
+ }, clrValue));
65
85
  }))))))));
66
86
  }
67
87
 
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
4
4
 
5
5
  import Loader from '@zohodesk/svg/lib/svg/Loader';
6
6
  import Popup from '../Popup/Popup';
7
- import TextBox from '../TextBox/TextBox';
7
+ import TextBoxIcon from '../TextBoxIcon/TextBoxIcon';
8
8
  import { Container, Box } from '../Layout';
9
9
  import DropDownHeading from '../DropDown/DropDownHeading';
10
10
  import MultiSelectHeader from '../MultiSelect/MultiSelectHeader';
@@ -897,6 +897,7 @@ class AdvancedGroupMultiSelect extends React.Component {
897
897
  } = this.handleFilterSuggestions();
898
898
  let setAriaId = this.getNextAriaId();
899
899
  let ariaErrorId = this.getNextAriaId();
900
+ const isShowClearIcon = !isReadOnly && !isDisabled && selectedGroupOptions.length > 1;
900
901
  return /*#__PURE__*/React.createElement("div", {
901
902
  className: `${style.wrapper} ${isDisabled ? style.disabled : ''} ${needEffect && !(isDisabled || isReadOnly) ? style.effect : ''}`,
902
903
  "data-id": `${isDisabled ? `${dataId}_disabled` : isReadOnly ? `${dataId}_readOnly` : dataId}`,
@@ -927,8 +928,9 @@ class AdvancedGroupMultiSelect extends React.Component {
927
928
  adjust: true,
928
929
  shrink: true
929
930
  }, /*#__PURE__*/React.createElement("span", {
930
- className: ` ${style.custmSpan} ${textBoxSize == 'xmedium' ? style.custmSpanXmedium : style.custmSpanMedium} `
931
- }, searchStr), /*#__PURE__*/React.createElement(TextBox, {
931
+ className: ` ${style.custmSpan} ${textBoxSize === 'xmedium' ? style.custmSpanXmedium : style.custmSpanMedium} ${isShowClearIcon ? style.clearIconSpace : ''}
932
+ `
933
+ }, searchStr), /*#__PURE__*/React.createElement(TextBoxIcon, {
932
934
  isDisabled: isDisabled,
933
935
  inputRef: this.searchInputRef,
934
936
  needBorder: false,
@@ -943,7 +945,9 @@ class AdvancedGroupMultiSelect extends React.Component {
943
945
  variant: variant,
944
946
  dataId: `${dataId}_textBox`,
945
947
  isReadOnly: isReadOnly,
946
- customClass: style.custmInputWrapper,
948
+ customClass: {
949
+ customTBoxWrap: style.custmInputWrapper
950
+ },
947
951
  tabindex: isDisabled && '-1',
948
952
  htmlId: htmlId,
949
953
  a11y: {
@@ -955,8 +959,11 @@ class AdvancedGroupMultiSelect extends React.Component {
955
959
  ariaDescribedby: ariaErrorId
956
960
  },
957
961
  autoComplete: autoComplete
958
- })), !isReadOnly && !isDisabled && selectedGroupOptions.length > 1 ? /*#__PURE__*/React.createElement(Box, {
959
- className: style.delete,
962
+ }, isShowClearIcon ? /*#__PURE__*/React.createElement(Container, {
963
+ alignBox: "row",
964
+ align: "vertical"
965
+ }, /*#__PURE__*/React.createElement(Box, {
966
+ className: `${style.delete} ${style[`${palette}Delete`]}`,
960
967
  dataId: `${dataId}_clearIcon`,
961
968
  "data-title": clearText,
962
969
  onClick: this.handleDeselectAll,
@@ -965,7 +972,7 @@ class AdvancedGroupMultiSelect extends React.Component {
965
972
  }, /*#__PURE__*/React.createElement(Icon, {
966
973
  name: "ZD-delete",
967
974
  size: "15"
968
- })) : null), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
975
+ }))) : null))), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
969
976
  query: this.responsiveFunc,
970
977
  responsiveId: "Helmet"
971
978
  }, _ref2 => {
@@ -11,7 +11,7 @@ import Suggestions from './Suggestions';
11
11
  import EmptyState from './EmptyState';
12
12
  import MultiSelectHeader from './MultiSelectHeader';
13
13
  import Popup from '../Popup/Popup';
14
- import Textbox from '../TextBox/TextBox';
14
+ import TextBoxIcon from '../TextBoxIcon/TextBoxIcon';
15
15
  import { Container, Box } from '../Layout';
16
16
  import Card, { CardContent, CardHeader, CardFooter } from '../Card/Card';
17
17
  import Icon from '@zohodesk/icons/lib/Icon';
@@ -20,7 +20,7 @@ import ResponsiveDropBox from '../ResponsiveDropBox/ResponsiveDropBox';
20
20
  import { ResponsiveReceiver } from '../Responsive/CustomResponsive';
21
21
  /**** CSS ****/
22
22
 
23
- import style from './AdvancedMultiSelect.module.css';
23
+ import style from './MultiSelect.module.css';
24
24
  /**** Methods ****/
25
25
 
26
26
  import { getIsEmptyValue, getSearchString } from '../utils/Common.js';
@@ -428,8 +428,14 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
428
428
  onClick: this.handleMoreClick,
429
429
  tagName: "button"
430
430
  }, `+ ${moreCount} More`) : null, /*#__PURE__*/React.createElement(Box, {
431
- flexible: true
432
- }, /*#__PURE__*/React.createElement(Textbox, {
431
+ flexible: true,
432
+ className: style.wrapper,
433
+ adjust: true,
434
+ shrink: true
435
+ }, /*#__PURE__*/React.createElement("span", {
436
+ className: ` ${style.custmSpan} ${textBoxSize === 'xmedium' ? style.custmSpanXmedium : style.custmSpanMedium} ${isShowClearIcon ? style.clearIconSpace : ''}
437
+ `
438
+ }, searchStr), /*#__PURE__*/React.createElement(TextBoxIcon, {
433
439
  isDisabled: isDisabled,
434
440
  inputRef: this.searchInputRef,
435
441
  needBorder: false,
@@ -444,6 +450,9 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
444
450
  variant: variant,
445
451
  isReadOnly: isReadOnly,
446
452
  tabindex: isDisabled && '-1',
453
+ customClass: {
454
+ customTBoxWrap: style.custmInputWrapper
455
+ },
447
456
  htmlId: htmlId,
448
457
  a11y: {
449
458
  role: 'combobox',
@@ -454,8 +463,11 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
454
463
  ariaDescribedby: ariaErrorId
455
464
  },
456
465
  autoComplete: false
457
- })), isShowClearIcon ? /*#__PURE__*/React.createElement(Box, {
458
- className: style.delete,
466
+ }, isShowClearIcon ? /*#__PURE__*/React.createElement(Container, {
467
+ alignBox: "row",
468
+ align: "vertical"
469
+ }, /*#__PURE__*/React.createElement(Box, {
470
+ className: `${style.delete}`,
459
471
  dataId: dataIdClearIcon,
460
472
  "data-title": clearText,
461
473
  onClick: this.handleDeselectAll,
@@ -464,7 +476,7 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
464
476
  }, /*#__PURE__*/React.createElement(Icon, {
465
477
  name: "ZD-delete",
466
478
  size: "15"
467
- })) : null), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
479
+ }))) : null))), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
468
480
  query: this.responsiveFunc,
469
481
  responsiveId: "Helmet"
470
482
  }, _ref2 => {
@@ -1,7 +1,6 @@
1
1
  .wrapper {
2
2
  position: relative;
3
3
  }
4
-
5
4
  .disabled,
6
5
  .readOnly {
7
6
  cursor: not-allowed;
@@ -178,4 +177,13 @@
178
177
  }
179
178
  .search{
180
179
  padding: 0px 20px;
180
+ }
181
+ .more {
182
+ font-size: var(--zd_font_size14);
183
+ color: var(--zdt_multiselect_more_text);
184
+ cursor: pointer;
185
+ margin-top: var(--zd_size5);
186
+ font-family: inherit;
187
+ background-color: var(--zdt_multiselect_delete_bg);
188
+ border: 0;
181
189
  }
@@ -25,7 +25,8 @@ export default class ResizeComponent extends React.Component {
25
25
  this.isAnimating = false;
26
26
  this.state = {
27
27
  responsiveHook: true,
28
- validListCount: this.props.childrenList ? this.props.childrenList.length : 0
28
+ validListCount: this.props.childrenList ? this.props.childrenList.length : 0,
29
+ emptyDataCount: this.props.childrenList ? this.props.childrenList.length : 0
29
30
  };
30
31
  }
31
32
 
@@ -225,23 +226,28 @@ export default class ResizeComponent extends React.Component {
225
226
  // let responsive = arguments.length > 1 ? arguments[1] : undefined;
226
227
  //let isResize = arguments.length > 2 ? arguments[2] : false;
227
228
 
228
- dataCount = dataCount || childrenList && childrenList.length; // dataCount = responsive ? dataCount : dataCount || (childrenList && childrenList.length);
229
+ dataCount = dataCount || childrenList && childrenList.length;
230
+ let rederElementCount = this.querySelector().length;
231
+ let emptyCount = childrenList.length - rederElementCount; // dataCount = responsive ? dataCount : dataCount || (childrenList && childrenList.length);
229
232
  //dataCount = !isResize ? dataCount : dataCount || (childrenList && childrenList.length);
230
233
 
231
234
  this.setState({
232
235
  responsiveHook: responsive,
233
- validListCount: this.noSpaceForChildren ? 0 : dataCount
236
+ validListCount: this.noSpaceForChildren ? 0 : dataCount,
237
+ emptyDataCount: emptyCount
234
238
  });
235
239
  }
236
240
 
237
241
  render() {
238
242
  let {
239
243
  responsiveHook,
240
- validListCount
244
+ validListCount,
245
+ emptyDataCount
241
246
  } = this.state;
242
247
  return /*#__PURE__*/React.createElement(React.Fragment, null, this.props.children({
243
248
  responsiveHook,
244
- validListCount
249
+ validListCount,
250
+ emptyDataCount
245
251
  }));
246
252
  }
247
253
 
package/es/css.js CHANGED
@@ -25,7 +25,6 @@ import './Tab/TabContent.module.css';
25
25
  import './TextBoxIcon/TextBoxIcon.module.css';
26
26
  import './Ribbon/Ribbon.module.css';
27
27
  import './MultiSelect/MultiSelect.module.css';
28
- import './MultiSelect/AdvancedMultiSelect.module.css';
29
28
  import './Select/Select.module.css';
30
29
  import './ListItem/ListItem.module.css';
31
30
  import './Tag/Tag.module.css';
@@ -0,0 +1,113 @@
1
+ .wrapper {
2
+ position: relative;
3
+ }
4
+ .disabled,
5
+ .readOnly {
6
+ cursor: not-allowed;
7
+ }
8
+ .container {
9
+ max-height: var(--zd_size120);
10
+ composes: oflowy from '../common/common.module.css';
11
+ }
12
+ .hasBorder {
13
+ border-bottom-style: solid;
14
+ border-bottom-width: 1px;
15
+ transition: border var(--zd_transition2) linear 0s;
16
+ }
17
+ .borderColor_transparent {
18
+ border-bottom-color: var(--zdt_advancedmultiselect_transparent_border);
19
+ }
20
+ .effect .borderColor_transparent:hover {
21
+ border-bottom-color: var(--zdt_advancedmultiselect_transparent_hover_border);
22
+ }
23
+ .effect .borderColor_transparent.active {
24
+ border-bottom-color: var(--zdt_advancedmultiselect_transparent_active_border);
25
+ }
26
+ .borderColor_default {
27
+ border-bottom-color: var(--zdt_advancedmultiselect_default_border);
28
+ }
29
+ .effect .borderColor_default:hover {
30
+ border-bottom-color: var(--zdt_advancedmultiselect_default_hover_border);
31
+ }
32
+ .effect .borderColor_default.active {
33
+ border-bottom-color: var(--zdt_advancedmultiselect_default_active_border);
34
+ }
35
+ .borderColor_dark {
36
+ border-bottom-color: var(--zdt_advancedmultiselect_dark_border);
37
+ }
38
+ .effect .borderColor_dark:hover {
39
+ border-bottom-color: var(--zdt_advancedmultiselect_dark_hover_border);
40
+ }
41
+ .effect .borderColor_dark.active {
42
+ border-bottom-color: var(--zdt_advancedmultiselect_dark_active_border);
43
+ }
44
+ .container.medium {
45
+ padding: 0 var(--zd_size34) var(--zd_size7) 0;
46
+ }
47
+ .container.xmedium {
48
+ padding: 0 var(--zd_size34) var(--zd_size1) 0;
49
+ min-height: var(--zd_size30);
50
+ }
51
+
52
+ .delete {
53
+ position: absolute;
54
+ bottom: 0;
55
+ right: var(--zd_size15);
56
+ padding-bottom: var(--zd_size10);
57
+ color: var(--zdt_advancedmultiselect_delete_text);
58
+ cursor: pointer;
59
+ background-color: var(--zdt_advancedmultiselect_delete_bg);
60
+ border: 0;
61
+ }
62
+
63
+ .delete:hover {
64
+ color: var(--zdt_advancedmultiselect_delete_hover_text);
65
+ }
66
+ .transparentContainer .delete {
67
+ opacity: 0;
68
+ visibility: hidden;
69
+ }
70
+ .transparentContainer:hover .delete {
71
+ opacity: 1;
72
+ visibility: visible;
73
+ }
74
+
75
+ .box {
76
+ background: var(--zdt_advancedmultiselect_box_bg);
77
+ }
78
+
79
+ .small {
80
+ max-height: var(--zd_size200);
81
+ }
82
+
83
+ .medium {
84
+ max-height: var(--zd_size350);
85
+ }
86
+
87
+ .large {
88
+ max-height: var(--zd_size400);
89
+ }
90
+
91
+ .dropContainer {
92
+ display: inline-block;
93
+ max-width: 100%;
94
+ margin-bottom: var(--zd_size5);
95
+ }
96
+
97
+ .dropPopup {
98
+ font-size: var(--zd_font_size13);
99
+ }
100
+
101
+ .dropPopup :global .toggleDropIcon {
102
+ color: var(--zdt_advancedmultiselect_droppopup_text);
103
+ }
104
+
105
+ .more {
106
+ font-size: var(--zd_font_size14);
107
+ color: var(--zdt_advancedmultiselect_more_text);
108
+ cursor: pointer;
109
+ margin-top: var(--zd_size5);
110
+ font-family: inherit;
111
+ background-color: var(--zdt_advancedmultiselect_delete_bg);
112
+ border: 0;
113
+ }
@@ -0,0 +1,80 @@
1
+ const componentAppearanceVariables = [{
2
+ "comment": "advanced multiselect",
3
+ "data": {
4
+ "zdt_advancedmultiselect_default_border": {
5
+ 'light': ['var(--dot_inputLine)'],
6
+ 'dark': ['var(--dot_inputLine)'],
7
+ 'pureDark': ['var(--dot_inputLine)']
8
+ },
9
+ "zdt_advancedmultiselect_transparent_border": {
10
+ 'light': ['var(--dot_mirror)'],
11
+ 'dark': ['var(--dot_mirror)'],
12
+ 'pureDark': ['var(--dot_mirror)']
13
+ },
14
+ "zdt_advancedmultiselect_dark_border": {
15
+ 'light': ['var(--dot_mulledwine)'],
16
+ 'dark': ['var(--dot_mulledwine)'],
17
+ 'pureDark': ['var(--dot_mulledwine)']
18
+ },
19
+ "zdt_advancedmultiselect_default_hover_border": {
20
+ 'light': ['var(--dot_inputLineHover)'],
21
+ 'dark': ['var(--dot_inputLineHover)'],
22
+ 'pureDark': ['var(--dot_inputLineHover)']
23
+ },
24
+ "zdt_advancedmultiselect_transparent_hover_border": {
25
+ 'light': ['var(--dot_inputLineHover)'],
26
+ 'dark': ['var(--dot_inputLineHover)'],
27
+ 'pureDark': ['var(--dot_inputLineHover)']
28
+ },
29
+ "zdt_advancedmultiselect_dark_hover_border": {
30
+ 'light': ['var(--dot_stardust)'],
31
+ 'dark': ['var(--dot_stardust)'],
32
+ 'pureDark': ['var(--dot_stardust)']
33
+ },
34
+ "zdt_advancedmultiselect_default_active_border": {
35
+ 'light': ['var(--dot_inputLineFocus)'],
36
+ 'dark': ['var(--dot_inputLineFocus)'],
37
+ 'pureDark': ['var(--dot_inputLineFocus)']
38
+ },
39
+ "zdt_advancedmultiselect_transparent_active_border": {
40
+ 'light': ['var(--dot_inputLineFocus)'],
41
+ 'dark': ['var(--dot_inputLineFocus)'],
42
+ 'pureDark': ['var(--dot_inputLineFocus)']
43
+ },
44
+ "zdt_advancedmultiselect_dark_active_border": {
45
+ 'light': ['var(--dot_stardust)'],
46
+ 'dark': ['var(--dot_stardust)'],
47
+ 'pureDark': ['var(--dot_stardust)']
48
+ },
49
+ "zdt_advancedmultiselect_delete_text": {
50
+ 'light': ['var(--dot_shuttleGrey)'],
51
+ 'dark': ['var(--dot_cadetblue)'],
52
+ 'pureDark': ['#999']
53
+ },
54
+ "zdt_advancedmultiselect_delete_hover_text": {
55
+ 'light': ['var(--dot_black)'],
56
+ 'dark': ['var(--dot_platinum)'],
57
+ 'pureDark': ['var(--dot_platinum)']
58
+ },
59
+ "zdt_advancedmultiselect_delete_bg": {
60
+ 'light': ['var(--dot_mirror)'],
61
+ 'dark': ['var(--dot_mirror)'],
62
+ 'pureDark': ['var(--dot_mirror)']
63
+ },
64
+ "zdt_advancedmultiselect_box_bg": {
65
+ 'light': ['var(--dot_white)'],
66
+ 'dark': ['var(--dot_ebonyclay)'],
67
+ 'pureDark': ['#212121']
68
+ },
69
+ "zdt_advancedmultiselect_droppopup_text": {
70
+ 'light': ['var(--dot_slateGrey)'],
71
+ 'dark': ['var(--dot_oslogrey)'],
72
+ 'pureDark': ['var(--dot_oslogrey)']
73
+ },
74
+ "zdt_advancedmultiselect_more_text": {
75
+ 'light': ['var(--zdt_cta_primary_text)'],
76
+ 'dark': ['var(--zdt_cta_primary_text)'],
77
+ 'pureDark': ['var(--zdt_cta_primary_text)']
78
+ }
79
+ }
80
+ }];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/components",
3
- "version": "1.0.0-temp-555",
3
+ "version": "1.0.0-temp-999",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.js",
6
6
  "jsnext:main": "es/index.js",
@@ -16,8 +16,9 @@
16
16
  "init": "npm run clean && cd ../assets && npm run componentsassets && cd ../components && npm run build:variables",
17
17
  "build:variables": "node ./preprocess/index",
18
18
  "rtl": "react-cli rtl ./src ./lib && react-cli rtl ./src ./es",
19
+ "common_package_build":"cd ../common && npm run build && cd ../components",
19
20
  "start": "react-cli start",
20
- "docs": "npm run dubCheck && react-cli docs",
21
+ "docs": "npm run common_package_build && npm run dubCheck && react-cli docs",
21
22
  "build": " react-cli build:component:cmjs",
22
23
  "buildlocal": " react-cli build:component:cmjs && npm run rtl",
23
24
  "build:dev": "npm run build:variables && npm run build && npm run build:es --module:mode=dev -- -w",
@@ -37,11 +38,11 @@
37
38
  "devDependencies": {
38
39
  "@zohodesk/docstool": "1.0.0-alpha-2",
39
40
  "@zohodesk/variables": "1.0.0-beta.29",
40
- "@zohodesk/icons": "1.0.0-beta.105",
41
+ "@zohodesk/icons": "1.0.0-beta.109",
41
42
  "@zohodesk/virtualizer": "1.0.3",
42
43
  "velocity-react": "1.4.3",
43
44
  "react-sortable-hoc": "^0.8.3",
44
- "@zohodesk/svg": "1.0.0-beta.47"
45
+ "@zohodesk/svg": "1.0.0-beta.48"
45
46
  },
46
47
  "dependencies": {
47
48
  "hoist-non-react-statics": "3.0.1",
@@ -50,9 +51,9 @@
50
51
  "selectn": "1.1.2"
51
52
  },
52
53
  "peerDependencies": {
53
- "@zohodesk/icons": "1.0.0-beta.105",
54
+ "@zohodesk/icons": "1.0.0-beta.109",
54
55
  "@zohodesk/variables": "1.0.0-beta.29",
55
- "@zohodesk/svg": "1.0.0-beta.47",
56
+ "@zohodesk/svg": "1.0.0-beta.49",
56
57
  "@zohodesk/virtualizer": "1.0.3",
57
58
  "velocity-react": "1.4.3",
58
59
  "react-sortable-hoc": "^0.8.3"