@zohodesk/components 1.0.0-temp-199.18 → 1.0.0-temp-242.1
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 +31 -1
- package/es/AppContainer/AppContainer.js +1 -0
- package/es/AppContainer/AppContainer.module.css +3 -2
- package/es/Button/css/Button.module.css +13 -4
- package/es/ColorSelect/ColorSingleSelect.js +0 -1
- package/es/ColorSelect/__tests__/ColorMultiSelect.spec.js +15 -3
- package/es/ColorSelect/__tests__/ColorSingleSelect.spec.js +15 -3
- package/es/ColorSelect/__tests__/__snapshots__/ColorMultiSelect.spec.js.snap +2 -2
- package/es/ColorSelect/__tests__/__snapshots__/ColorSingleSelect.spec.js.snap +8 -8
- package/es/ColorSelect/_shared/ColorIndicator/ColorIndicator.js +7 -3
- package/es/ColorSelect/_shared/ColorIndicator/__tests__/ColorIndicator.spec.js +17 -4
- package/es/ColorSelect/_shared/ColorIndicator/__tests__/__snapshots__/ColorIndicator.spec.js.snap +3 -3
- package/es/ColorSelect/_shared/ColorIndicator/props/propTypes.js +1 -1
- package/es/ColorSelect/_shared/ColoredTag/props/propTypes.js +1 -0
- package/es/ColorSelect/_shared/helpers/renderHelpers.js +14 -10
- package/es/ColorSelect/props/propTypes.js +1 -0
- package/es/DateTime/DateTime.module.css +12 -9
- package/es/DateTime/YearView.module.css +1 -1
- package/es/DropBox/DropBoxElement/DropBoxElement.js +1 -1
- package/es/DropBox/utils/isMobilePopover.js +3 -14
- package/es/Heading/Heading.module.css +1 -1
- package/es/Label/Label.module.css +8 -8
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +2 -6
- package/es/MultiSelect/MultiSelect.js +2 -2
- package/es/MultiSelect/MultiSelect.module.css +1 -1
- package/es/MultiSelect/Suggestions.js +2 -7
- package/es/MultiSelect/props/defaultProps.js +0 -2
- package/es/MultiSelect/props/propTypes.js +3 -11
- package/es/Popup/Popup.js +21 -1045
- package/es/Select/GroupSelect.js +1 -1
- package/es/Select/SelectWithAvatar.js +3 -3
- package/es/Select/SelectWithIcon.js +3 -10
- package/es/Select/props/defaultProps.js +2 -4
- package/es/Select/props/propTypes.js +3 -11
- package/es/Tab/Tabs.module.css +1 -1
- package/es/TextBox/TextBox.module.css +4 -4
- package/es/TextBoxIcon/TextBoxIcon.module.css +0 -6
- package/es/Textarea/Textarea.module.css +1 -1
- package/es/Tooltip/Tooltip.module.css +1 -1
- package/es/Typography/Typography.js +9 -2
- package/es/Typography/__tests__/Typography.spec.js +427 -0
- package/es/Typography/__tests__/__snapshots__/Typography.spec.js.snap +506 -0
- package/es/Typography/css/Typography.module.css +4 -4
- package/es/Typography/props/defaultProps.js +2 -1
- package/es/Typography/props/propTypes.js +24 -5
- package/es/Typography/utils/textHighlighter.js +139 -0
- package/es/common/basic.module.css +39 -6
- package/es/common/basicReset.module.css +2 -2
- package/es/common/common.module.css +6 -6
- package/es/shared/ArrowIcon/ArrowIcon.js +6 -3
- package/es/shared/ArrowIcon/ArrowIcon.module.css +9 -0
- package/es/shared/ArrowIcon/__tests__/ArrowIcon.spec.js +24 -0
- package/es/shared/ArrowIcon/__tests__/__snapshots__/ArrowIcon.spec.js.snap +70 -7
- package/es/shared/ArrowIcon/props/defaultProps.js +2 -0
- package/es/shared/ArrowIcon/props/propTypes.js +3 -1
- package/es/shared/InputFieldLine/InputFieldLine.module.css +1 -1
- package/es/utils/Common.js +1 -1
- package/es/utils/dropDownUtils.js +3 -3
- package/es/v1/Popup/Popup.js +1 -1
- package/es/v1/Tab/v1Tabs.module.css +1 -1
- package/es/v1/Typography/css/v1_Typography.module.css +4 -4
- package/lib/AppContainer/AppContainer.js +2 -0
- package/lib/AppContainer/AppContainer.module.css +3 -2
- package/lib/Button/css/Button.module.css +13 -4
- package/lib/ColorSelect/ColorSingleSelect.js +1 -2
- package/lib/ColorSelect/__tests__/ColorMultiSelect.spec.js +15 -3
- package/lib/ColorSelect/__tests__/ColorSingleSelect.spec.js +15 -3
- package/lib/ColorSelect/__tests__/__snapshots__/ColorMultiSelect.spec.js.snap +2 -2
- package/lib/ColorSelect/__tests__/__snapshots__/ColorSingleSelect.spec.js.snap +8 -8
- package/lib/ColorSelect/_shared/ColorIndicator/ColorIndicator.js +10 -4
- package/lib/ColorSelect/_shared/ColorIndicator/__tests__/ColorIndicator.spec.js +17 -4
- package/lib/ColorSelect/_shared/ColorIndicator/__tests__/__snapshots__/ColorIndicator.spec.js.snap +3 -3
- package/lib/ColorSelect/_shared/ColorIndicator/props/propTypes.js +1 -1
- package/lib/ColorSelect/_shared/ColoredTag/props/propTypes.js +1 -0
- package/lib/ColorSelect/_shared/helpers/renderHelpers.js +19 -13
- package/lib/ColorSelect/props/propTypes.js +1 -0
- package/lib/DateTime/DateTime.module.css +12 -9
- package/lib/DateTime/YearView.module.css +1 -1
- package/lib/DropBox/DropBoxElement/DropBoxElement.js +5 -5
- package/lib/DropBox/utils/isMobilePopover.js +4 -14
- package/lib/Heading/Heading.module.css +1 -1
- package/lib/Label/Label.module.css +8 -8
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +3 -8
- package/lib/MultiSelect/MultiSelect.js +2 -2
- package/lib/MultiSelect/MultiSelect.module.css +1 -1
- package/lib/MultiSelect/Suggestions.js +2 -6
- package/lib/MultiSelect/props/defaultProps.js +0 -2
- package/lib/MultiSelect/props/propTypes.js +5 -13
- package/lib/Popup/Popup.js +25 -1152
- package/lib/Select/GroupSelect.js +1 -2
- package/lib/Select/SelectWithAvatar.js +3 -4
- package/lib/Select/SelectWithIcon.js +3 -10
- package/lib/Select/props/defaultProps.js +3 -5
- package/lib/Select/props/propTypes.js +3 -11
- package/lib/Tab/Tabs.module.css +1 -1
- package/lib/TextBox/TextBox.module.css +4 -4
- package/lib/TextBoxIcon/TextBoxIcon.module.css +0 -6
- package/lib/Textarea/Textarea.module.css +1 -1
- package/lib/Tooltip/Tooltip.module.css +1 -1
- package/lib/Typography/Typography.js +9 -2
- package/lib/Typography/__tests__/Typography.spec.js +436 -0
- package/lib/Typography/__tests__/__snapshots__/Typography.spec.js.snap +506 -0
- package/lib/Typography/css/Typography.module.css +4 -4
- package/lib/Typography/props/defaultProps.js +2 -1
- package/lib/Typography/props/propTypes.js +31 -6
- package/lib/Typography/utils/textHighlighter.js +160 -0
- package/lib/common/basic.module.css +39 -6
- package/lib/common/basicReset.module.css +2 -2
- package/lib/common/common.module.css +6 -6
- package/lib/shared/ArrowIcon/ArrowIcon.js +6 -3
- package/lib/shared/ArrowIcon/ArrowIcon.module.css +9 -0
- package/lib/shared/ArrowIcon/__tests__/ArrowIcon.spec.js +34 -10
- package/lib/shared/ArrowIcon/__tests__/__snapshots__/ArrowIcon.spec.js.snap +70 -7
- package/lib/shared/ArrowIcon/props/defaultProps.js +2 -0
- package/lib/shared/ArrowIcon/props/propTypes.js +3 -1
- package/lib/shared/InputFieldLine/InputFieldLine.module.css +1 -1
- package/lib/utils/Common.js +1 -1
- package/lib/utils/dropDownUtils.js +3 -3
- package/lib/v1/Popup/Popup.js +1 -1
- package/lib/v1/Tab/v1Tabs.module.css +1 -1
- package/lib/v1/Typography/css/v1_Typography.module.css +4 -4
- package/package.json +6 -6
- package/es/DropBox/DropBoxPositionMapping.js +0 -142
- package/es/Popup/PositionMapping.js +0 -72
- package/es/Popup/Registry.js +0 -36
- package/es/Popup/intersectionObserver.js +0 -49
- package/es/Popup/viewPort.js +0 -373
- package/lib/DropBox/DropBoxPositionMapping.js +0 -149
- package/lib/Popup/PositionMapping.js +0 -81
- package/lib/Popup/Registry.js +0 -46
- package/lib/Popup/intersectionObserver.js +0 -72
- package/lib/Popup/viewPort.js +0 -367
package/README.md
CHANGED
|
@@ -1,6 +1,36 @@
|
|
|
1
1
|
# DOT Style Guide
|
|
2
2
|
|
|
3
3
|
Dot UI is a customizable React component library built to deliver a clean, accessible, and developer-friendly UI experience. It offers a growing set of reusable components designed to align with modern design systems and streamline application development across projects.
|
|
4
|
+
# 1.5.3
|
|
5
|
+
- **Popup**
|
|
6
|
+
- Refactored to use the dotkit `Popup` component.
|
|
7
|
+
|
|
8
|
+
# 1.5.2
|
|
9
|
+
|
|
10
|
+
- **TextBoxIcon**
|
|
11
|
+
- Removed `--textboxicon_line_height` and `--textboxicon_line_color` to avoid overriding the InputFieldLine border properties.
|
|
12
|
+
|
|
13
|
+
# 1.5.1
|
|
14
|
+
|
|
15
|
+
- Font Family Migrated to Font-weight across all css (Impacted)
|
|
16
|
+
|
|
17
|
+
# 1.5.2
|
|
18
|
+
|
|
19
|
+
- **TextBoxIcon**
|
|
20
|
+
- Removed `--textboxicon_line_height` and `--textboxicon_line_color` to avoid overriding the InputFieldLine border properties.
|
|
21
|
+
|
|
22
|
+
# 1.5.1
|
|
23
|
+
|
|
24
|
+
- Font Family Migrated to Font-weight across all css (Impacted)
|
|
25
|
+
|
|
26
|
+
# 1.4.24
|
|
27
|
+
- **Popup**
|
|
28
|
+
- Refactored to use the dotkit `Popup` component.
|
|
29
|
+
|
|
30
|
+
# 1.4.23
|
|
31
|
+
|
|
32
|
+
- **Typography**
|
|
33
|
+
- Added support for text highlighting via `$ui_highlightConfig` prop.
|
|
4
34
|
|
|
5
35
|
# 1.4.22
|
|
6
36
|
|
|
@@ -26,7 +56,7 @@ Dot UI is a customizable React component library built to deliver a clean, acces
|
|
|
26
56
|
- `renderCustomSelectedValue` prop added.
|
|
27
57
|
|
|
28
58
|
- **dropDownUtils**
|
|
29
|
-
- `
|
|
59
|
+
- `colorConfig` option added in makeFormatOptions method.
|
|
30
60
|
|
|
31
61
|
- **common/utils**
|
|
32
62
|
- `DUMMY_ARRAY`, `DUMMY_OBJECT` and `DUMMY_FUNCTION` constants added.
|
|
@@ -9,6 +9,7 @@ import '@zohodesk/variables/assets/dotVariables.module.css';
|
|
|
9
9
|
import '@zohodesk/variables/assets/sizeVariables.module.css';
|
|
10
10
|
import '@zohodesk/variables/assets/fontsizeVariables.module.css';
|
|
11
11
|
import '@zohodesk/variables/es/fontFamilyVariables.module.css';
|
|
12
|
+
import '@zohodesk/variables/es/fontWeightVariables.module.css';
|
|
12
13
|
import '@zohodesk/variables/assets/transitionVariables.module.css';
|
|
13
14
|
import '@zohodesk/variables/assets/no_transitionVariables.module.css';
|
|
14
15
|
import "../common/a11y.module.css";
|
|
@@ -8,8 +8,9 @@
|
|
|
8
8
|
-moz-box-sizing: border-box;
|
|
9
9
|
-ms-box-sizing: border-box;
|
|
10
10
|
}
|
|
11
|
-
.container {
|
|
12
|
-
font-family: var(--zd_regular);
|
|
11
|
+
.container, .container button, .container input, .container textarea ,.container select {
|
|
12
|
+
/* font-family: var(--zd_regular); */
|
|
13
|
+
font-family: var(--zd-font-family), var(--zd_fallback_font, ZDLato);
|
|
13
14
|
}
|
|
14
15
|
.tooltip {
|
|
15
16
|
height: 0 ;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
--button_cursor: pointer;
|
|
6
6
|
--button_font_size: var(--zd_font_size13);
|
|
7
7
|
--button_text_color: var(--zdt_button_default_text);
|
|
8
|
-
--
|
|
8
|
+
--button_font_weight: var(--zd-fw-normal);
|
|
9
9
|
--button_text_transform: capitalize;
|
|
10
10
|
--button_bg_color: var(--zdt_button_default_bg);
|
|
11
11
|
--button_border_radius: 4px;
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
position: relative;
|
|
50
50
|
font-size: var(--button_font_size);
|
|
51
51
|
color: var(--button_text_color);
|
|
52
|
-
font-
|
|
52
|
+
font-weight: var(--button_font_weight);
|
|
53
53
|
text-transform: var(--button_text_transform);
|
|
54
54
|
min-width: var(--button_min_width);
|
|
55
55
|
height: var(--button_height);
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
.bold {
|
|
66
|
-
--
|
|
66
|
+
--button_font_weight: var(--zd-fw-semibold);
|
|
67
67
|
composes: ftsmooth from '../../common/common.module.css';
|
|
68
68
|
}
|
|
69
69
|
|
|
@@ -623,7 +623,7 @@
|
|
|
623
623
|
}
|
|
624
624
|
|
|
625
625
|
.loader {
|
|
626
|
-
color: var(--dot_mirror)
|
|
626
|
+
color: var(--dot_mirror);
|
|
627
627
|
}
|
|
628
628
|
|
|
629
629
|
[dir=ltr] .strike {
|
|
@@ -633,34 +633,43 @@
|
|
|
633
633
|
[dir=rtl] .strike {
|
|
634
634
|
background-image: repeating-linear-gradient(-120deg, var(--button_strike_color) 0 1px, transparent 1px 8px);
|
|
635
635
|
}
|
|
636
|
+
|
|
636
637
|
.primaryStrike {
|
|
637
638
|
--button_strike_color: var(--zdt_button_primary_strike);
|
|
638
639
|
}
|
|
640
|
+
|
|
639
641
|
.primaryfilledStrike {
|
|
640
642
|
--button_strike_color: var(--zdt_button_primaryFilled_strike);
|
|
641
643
|
--button_border_color: var(--zdt_button_primaryfill_bg);
|
|
642
644
|
}
|
|
645
|
+
|
|
643
646
|
.dangerStrike {
|
|
644
647
|
--button_strike_color: var(--zdt_button_danger_strike);
|
|
645
648
|
}
|
|
649
|
+
|
|
646
650
|
.dangerfilledStrike {
|
|
647
651
|
--button_strike_color: var(--zdt_button_dangerFilled_strike);
|
|
648
652
|
--button_border_color: var(--zdt_button_dangerfill_bg);
|
|
649
653
|
}
|
|
654
|
+
|
|
650
655
|
.secondaryStrike {
|
|
651
656
|
--button_strike_color: var(--zdt_button_secondary_border);
|
|
652
657
|
}
|
|
658
|
+
|
|
653
659
|
.secondaryfilledStrike {
|
|
654
660
|
--button_strike_color: var(--zdt_button_secondaryFilled_strike);
|
|
655
661
|
--button_border_color: var(--zdt_button_secondaryfill_bg);
|
|
656
662
|
}
|
|
663
|
+
|
|
657
664
|
.tertiaryfilledStrike {
|
|
658
665
|
--button_strike_color: var(--zdt_button_tertiaryFilled_strike);
|
|
659
666
|
--button_border_color: var(--zdt_button_tertiaryfill_bg);
|
|
660
667
|
}
|
|
668
|
+
|
|
661
669
|
.successStrike {
|
|
662
670
|
--button_strike_color: var(--zdt_button_success_strike);
|
|
663
671
|
}
|
|
672
|
+
|
|
664
673
|
.successfilledStrike {
|
|
665
674
|
--button_strike_color: var(--zdt_button_successFilled_strike);
|
|
666
675
|
--button_border_color: var(--zdt_button_successfill_border);
|
|
@@ -4,15 +4,27 @@ import ColorMultiSelect from "../ColorMultiSelect";
|
|
|
4
4
|
const options = [{
|
|
5
5
|
id: 1,
|
|
6
6
|
text: 'Red',
|
|
7
|
-
|
|
7
|
+
colorConfig: {
|
|
8
|
+
text: 'black',
|
|
9
|
+
background: '#ff6e6e',
|
|
10
|
+
border: 'black'
|
|
11
|
+
}
|
|
8
12
|
}, {
|
|
9
13
|
id: 2,
|
|
10
14
|
text: 'Green',
|
|
11
|
-
|
|
15
|
+
colorConfig: {
|
|
16
|
+
text: 'black',
|
|
17
|
+
background: '#77d779',
|
|
18
|
+
border: 'black'
|
|
19
|
+
}
|
|
12
20
|
}, {
|
|
13
21
|
id: 3,
|
|
14
22
|
text: 'Blue',
|
|
15
|
-
|
|
23
|
+
colorConfig: {
|
|
24
|
+
text: 'black',
|
|
25
|
+
background: '#649cff',
|
|
26
|
+
border: 'black'
|
|
27
|
+
}
|
|
16
28
|
}];
|
|
17
29
|
describe('ColorMultiSelect', () => {
|
|
18
30
|
test('rendering the defult props', () => {
|
|
@@ -4,15 +4,27 @@ import ColorSingleSelect from "../ColorSingleSelect";
|
|
|
4
4
|
const options = [{
|
|
5
5
|
id: 1,
|
|
6
6
|
text: 'Red',
|
|
7
|
-
|
|
7
|
+
colorConfig: {
|
|
8
|
+
text: 'black',
|
|
9
|
+
background: '#ff6e6e',
|
|
10
|
+
border: 'black'
|
|
11
|
+
}
|
|
8
12
|
}, {
|
|
9
13
|
id: 2,
|
|
10
14
|
text: 'Green',
|
|
11
|
-
|
|
15
|
+
colorConfig: {
|
|
16
|
+
text: 'black',
|
|
17
|
+
background: '#77d779',
|
|
18
|
+
border: 'black'
|
|
19
|
+
}
|
|
12
20
|
}, {
|
|
13
21
|
id: 3,
|
|
14
22
|
text: 'Blue',
|
|
15
|
-
|
|
23
|
+
colorConfig: {
|
|
24
|
+
text: 'black',
|
|
25
|
+
background: '#649cff',
|
|
26
|
+
border: 'black'
|
|
27
|
+
}
|
|
16
28
|
}];
|
|
17
29
|
describe('ColorSingleSelect', () => {
|
|
18
30
|
test('rendering the defult props', () => {
|
|
@@ -110,7 +110,7 @@ exports[`ColorMultiSelect Should render the selected value 1`] = `
|
|
|
110
110
|
data-selector-id="tag"
|
|
111
111
|
data-test-id="tag_Tag"
|
|
112
112
|
data-title="Red"
|
|
113
|
-
style="--tag_bg_color:
|
|
113
|
+
style="--tag_bg_color: #ff6e6e; --tag_text_color: black; --tag_border_color: black;"
|
|
114
114
|
tabindex="0"
|
|
115
115
|
>
|
|
116
116
|
<div
|
|
@@ -161,7 +161,7 @@ exports[`ColorMultiSelect Should render the selected value 1`] = `
|
|
|
161
161
|
data-selector-id="tag"
|
|
162
162
|
data-test-id="tag_Tag"
|
|
163
163
|
data-title="Green"
|
|
164
|
-
style="--tag_bg_color:
|
|
164
|
+
style="--tag_bg_color: #77d779; --tag_text_color: black; --tag_border_color: black;"
|
|
165
165
|
tabindex="0"
|
|
166
166
|
>
|
|
167
167
|
<div
|
|
@@ -43,7 +43,7 @@ exports[`ColorSingleSelect Should render the default selected value 1`] = `
|
|
|
43
43
|
data-selector-id="tag"
|
|
44
44
|
data-test-id="tag_Tag"
|
|
45
45
|
data-title="Red"
|
|
46
|
-
style="--tag_bg_color:
|
|
46
|
+
style="--tag_bg_color: #ff6e6e; --tag_text_color: black; --tag_border_color: black;"
|
|
47
47
|
tabindex="0"
|
|
48
48
|
>
|
|
49
49
|
<div
|
|
@@ -57,7 +57,7 @@ exports[`ColorSingleSelect Should render the default selected value 1`] = `
|
|
|
57
57
|
</div>
|
|
58
58
|
<div
|
|
59
59
|
aria-hidden="true"
|
|
60
|
-
class="arrowIcon
|
|
60
|
+
class="arrowIcon inflex coldir both"
|
|
61
61
|
data-id="undefined_downIcon"
|
|
62
62
|
data-selector-id="container"
|
|
63
63
|
data-test-id="undefined_downIcon"
|
|
@@ -131,7 +131,7 @@ exports[`ColorSingleSelect Should render the selected value 1`] = `
|
|
|
131
131
|
</div>
|
|
132
132
|
<div
|
|
133
133
|
aria-hidden="true"
|
|
134
|
-
class="arrowIcon
|
|
134
|
+
class="arrowIcon inflex coldir both"
|
|
135
135
|
data-id="undefined_downIcon"
|
|
136
136
|
data-selector-id="container"
|
|
137
137
|
data-test-id="undefined_downIcon"
|
|
@@ -194,7 +194,7 @@ exports[`ColorSingleSelect rendering the defult props 1`] = `
|
|
|
194
194
|
</div>
|
|
195
195
|
<div
|
|
196
196
|
aria-hidden="true"
|
|
197
|
-
class="arrowIcon
|
|
197
|
+
class="arrowIcon inflex coldir both"
|
|
198
198
|
data-id="undefined_downIcon"
|
|
199
199
|
data-selector-id="container"
|
|
200
200
|
data-test-id="undefined_downIcon"
|
|
@@ -259,7 +259,7 @@ exports[`ColorSingleSelect rendering with isDefaultSelectValue is false 1`] = `
|
|
|
259
259
|
</div>
|
|
260
260
|
<div
|
|
261
261
|
aria-hidden="true"
|
|
262
|
-
class="arrowIcon
|
|
262
|
+
class="arrowIcon inflex coldir both"
|
|
263
263
|
data-id="undefined_downIcon"
|
|
264
264
|
data-selector-id="container"
|
|
265
265
|
data-test-id="undefined_downIcon"
|
|
@@ -323,7 +323,7 @@ exports[`ColorSingleSelect renders with renderCustomColorIndicator 1`] = `
|
|
|
323
323
|
data-selector-id="tag"
|
|
324
324
|
data-test-id="tag_Tag"
|
|
325
325
|
data-title="Red"
|
|
326
|
-
style="--tag_bg_color:
|
|
326
|
+
style="--tag_bg_color: #ff6e6e; --tag_text_color: black; --tag_border_color: black;"
|
|
327
327
|
tabindex="0"
|
|
328
328
|
>
|
|
329
329
|
<div
|
|
@@ -337,7 +337,7 @@ exports[`ColorSingleSelect renders with renderCustomColorIndicator 1`] = `
|
|
|
337
337
|
</div>
|
|
338
338
|
<div
|
|
339
339
|
aria-hidden="true"
|
|
340
|
-
class="arrowIcon
|
|
340
|
+
class="arrowIcon inflex coldir both"
|
|
341
341
|
data-id="undefined_downIcon"
|
|
342
342
|
data-selector-id="container"
|
|
343
343
|
data-test-id="undefined_downIcon"
|
|
@@ -400,7 +400,7 @@ exports[`ColorSingleSelect renders with renderCustomSelectedValue 1`] = `
|
|
|
400
400
|
</div>
|
|
401
401
|
<div
|
|
402
402
|
aria-hidden="true"
|
|
403
|
-
class="arrowIcon
|
|
403
|
+
class="arrowIcon inflex coldir both"
|
|
404
404
|
data-id="undefined_downIcon"
|
|
405
405
|
data-selector-id="container"
|
|
406
406
|
data-test-id="undefined_downIcon"
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import style from "./ColorIndicator.module.css";
|
|
3
2
|
import { defaultProps } from "./props/defaultProps";
|
|
4
3
|
import { propTypes } from "./props/propTypes";
|
|
4
|
+
import { DUMMY_OBJECT } from "../../../utils/Common";
|
|
5
|
+
import style from "./ColorIndicator.module.css";
|
|
5
6
|
|
|
6
7
|
function ColorIndicator(props) {
|
|
7
8
|
const {
|
|
8
|
-
|
|
9
|
+
colorConfig,
|
|
9
10
|
shape,
|
|
10
11
|
customClass,
|
|
11
12
|
customId,
|
|
@@ -13,11 +14,14 @@ function ColorIndicator(props) {
|
|
|
13
14
|
tagAttributes,
|
|
14
15
|
a11yAttributes
|
|
15
16
|
} = props;
|
|
17
|
+
const {
|
|
18
|
+
background
|
|
19
|
+
} = colorConfig || DUMMY_OBJECT;
|
|
16
20
|
return /*#__PURE__*/React.createElement("div", { ...tagAttributes,
|
|
17
21
|
...a11yAttributes,
|
|
18
22
|
className: `${style.varClass} ${style.indicator} ${style[shape]} ${customClass}`,
|
|
19
23
|
style: {
|
|
20
|
-
backgroundColor:
|
|
24
|
+
backgroundColor: background
|
|
21
25
|
},
|
|
22
26
|
"data-id": customId,
|
|
23
27
|
"data-test-id": testId
|
|
@@ -16,13 +16,26 @@ describe('ColorIndicator', () => {
|
|
|
16
16
|
testId: "test-id"
|
|
17
17
|
}));
|
|
18
18
|
expect(asFragment()).toMatchSnapshot();
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
}); // const colors = ['#ff0000', '#00ff00', '#0000ff'];
|
|
20
|
+
|
|
21
|
+
const colorConfigurations = [{
|
|
22
|
+
background: '#ff0000',
|
|
23
|
+
text: '#000000',
|
|
24
|
+
border: '#ffffff'
|
|
25
|
+
}, {
|
|
26
|
+
background: '#00ff00',
|
|
27
|
+
text: '#000000',
|
|
28
|
+
border: '#ffffff'
|
|
29
|
+
}, {
|
|
30
|
+
background: '#0000ff',
|
|
31
|
+
text: '#ffffff',
|
|
32
|
+
border: '#000000'
|
|
33
|
+
}];
|
|
34
|
+
test.each(colorConfigurations)('rendering the color of- %s', color => {
|
|
22
35
|
const {
|
|
23
36
|
asFragment
|
|
24
37
|
} = render( /*#__PURE__*/React.createElement(ColorIndicator, {
|
|
25
|
-
|
|
38
|
+
colorConfig: color
|
|
26
39
|
}));
|
|
27
40
|
expect(asFragment()).toMatchSnapshot();
|
|
28
41
|
});
|
package/es/ColorSelect/_shared/ColorIndicator/__tests__/__snapshots__/ColorIndicator.spec.js.snap
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`ColorIndicator rendering the color of- #0000ff 1`] = `
|
|
3
|
+
exports[`ColorIndicator rendering the color of- { background: '#0000ff', text: '#ffffff', border: '#000000' } 1`] = `
|
|
4
4
|
<DocumentFragment>
|
|
5
5
|
<div
|
|
6
6
|
class="varClass indicator circle "
|
|
@@ -11,7 +11,7 @@ exports[`ColorIndicator rendering the color of- #0000ff 1`] = `
|
|
|
11
11
|
</DocumentFragment>
|
|
12
12
|
`;
|
|
13
13
|
|
|
14
|
-
exports[`ColorIndicator rendering the color of- #00ff00 1`] = `
|
|
14
|
+
exports[`ColorIndicator rendering the color of- { background: '#00ff00', text: '#000000', border: '#ffffff' } 1`] = `
|
|
15
15
|
<DocumentFragment>
|
|
16
16
|
<div
|
|
17
17
|
class="varClass indicator circle "
|
|
@@ -22,7 +22,7 @@ exports[`ColorIndicator rendering the color of- #00ff00 1`] = `
|
|
|
22
22
|
</DocumentFragment>
|
|
23
23
|
`;
|
|
24
24
|
|
|
25
|
-
exports[`ColorIndicator rendering the color of- #ff0000 1`] = `
|
|
25
|
+
exports[`ColorIndicator rendering the color of- { background: '#ff0000', text: '#000000', border: '#ffffff' } 1`] = `
|
|
26
26
|
<DocumentFragment>
|
|
27
27
|
<div
|
|
28
28
|
class="varClass indicator circle "
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import { propTypes as tagPropTypes } from "../../../../Tag/props/propTypes";
|
|
3
3
|
export const propTypes = { ...tagPropTypes,
|
|
4
|
+
isActive: PropTypes.bool,
|
|
4
5
|
colorConfig: PropTypes.shape({
|
|
5
6
|
textColor: PropTypes.string,
|
|
6
7
|
backgroundColor: PropTypes.string,
|
|
@@ -1,24 +1,28 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import Color from 'color';
|
|
3
2
|
import ColoredTag from "../ColoredTag/ColoredTag";
|
|
4
3
|
import ColorIndicator from "../ColorIndicator/ColorIndicator";
|
|
4
|
+
import { DUMMY_OBJECT } from "../../../utils/Common";
|
|
5
5
|
export function renderColoredTag(data) {
|
|
6
6
|
const {
|
|
7
7
|
option,
|
|
8
8
|
...otherData
|
|
9
|
-
} = data;
|
|
9
|
+
} = data || DUMMY_OBJECT;
|
|
10
10
|
const {
|
|
11
|
-
|
|
11
|
+
colorConfig,
|
|
12
12
|
value,
|
|
13
13
|
id
|
|
14
|
-
} = option;
|
|
15
|
-
const
|
|
14
|
+
} = option || DUMMY_OBJECT;
|
|
15
|
+
const {
|
|
16
|
+
text,
|
|
17
|
+
background,
|
|
18
|
+
border
|
|
19
|
+
} = colorConfig || DUMMY_OBJECT;
|
|
16
20
|
|
|
17
21
|
function getColorConfig() {
|
|
18
22
|
return {
|
|
19
|
-
backgroundColor:
|
|
20
|
-
textColor:
|
|
21
|
-
borderColor:
|
|
23
|
+
backgroundColor: background,
|
|
24
|
+
textColor: text,
|
|
25
|
+
borderColor: border
|
|
22
26
|
};
|
|
23
27
|
}
|
|
24
28
|
|
|
@@ -31,9 +35,9 @@ export function renderColoredTag(data) {
|
|
|
31
35
|
}
|
|
32
36
|
export function renderColorIndicator(data) {
|
|
33
37
|
const {
|
|
34
|
-
|
|
38
|
+
colorConfig
|
|
35
39
|
} = data;
|
|
36
40
|
return /*#__PURE__*/React.createElement(ColorIndicator, {
|
|
37
|
-
|
|
41
|
+
colorConfig: colorConfig
|
|
38
42
|
});
|
|
39
43
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.semibold {
|
|
2
|
-
font-
|
|
2
|
+
font-weight: var(--zd-fw-semibold);
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
[dir=ltr] .boxPadding {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
.datesStr {
|
|
32
|
-
font-
|
|
32
|
+
font-weight: var(--zd-fw-normal);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
.grid {
|
|
@@ -122,7 +122,8 @@
|
|
|
122
122
|
color: var(--zdt_datetime_invalid_text);
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
.invalidDate.holiday
|
|
125
|
+
.invalidDate.holiday,
|
|
126
|
+
.inActiveDate.holiday:hover {
|
|
126
127
|
color: var(--zdt_datetime_invaliddate_text);
|
|
127
128
|
}
|
|
128
129
|
|
|
@@ -147,15 +148,17 @@
|
|
|
147
148
|
background-color: var(--zdt_datetime_selected_bg);
|
|
148
149
|
border-radius: 50%;
|
|
149
150
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
151
|
+
|
|
152
|
+
.inActiveDate {
|
|
153
|
+
color: var(--zdt_datetime_invalid_text);
|
|
154
|
+
cursor: no-drop;
|
|
153
155
|
}
|
|
154
|
-
|
|
155
|
-
{
|
|
156
|
+
|
|
157
|
+
.inActiveDate:hover {
|
|
156
158
|
color: var(--zdt_datetime_invalid_text);
|
|
157
159
|
}
|
|
158
|
-
|
|
160
|
+
|
|
161
|
+
.inActiveDate:hover, .inActiveDate.holiday:hover {
|
|
159
162
|
background-color: var(--zdt_datetime_inactivedate_hover_bg);
|
|
160
163
|
|
|
161
164
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import useDropboxPosCalc from "./useDropboxPosCalc";
|
|
4
4
|
import cssJSLogic from "./css/cssJSLogic";
|
|
5
|
-
import { positionMapping } from
|
|
5
|
+
import { positionMapping } from '@zohodesk/dotkit/es/react/components/Popup/utils/positioning';
|
|
6
6
|
import { DropBoxElementDefaultProps } from "./props/defaultProps";
|
|
7
7
|
import { DropBoxElementPropTypes } from "./props/propTypes";
|
|
8
8
|
import { mergeStyle } from '@zohodesk/utils';
|
|
@@ -1,17 +1,6 @@
|
|
|
1
1
|
import { getLibraryConfig } from "../../Provider/Config";
|
|
2
|
+
import { isMobilePopover as isMobile } from '@zohodesk/dotkit/es/react/components/Popup/utils';
|
|
2
3
|
export default function isMobilePopover(needResponsive) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
mobileWidth = getLibraryConfig('mobileWidth'),
|
|
6
|
-
isModel = false;
|
|
7
|
-
|
|
8
|
-
if (needResponsive) {
|
|
9
|
-
windowWidth = window.innerWidth;
|
|
10
|
-
|
|
11
|
-
if (windowWidth <= mobileWidth) {
|
|
12
|
-
isModel = true;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
return isModel ? true : false;
|
|
4
|
+
const mobileWidth = getLibraryConfig('mobileWidth');
|
|
5
|
+
return isMobile(needResponsive, mobileWidth);
|
|
17
6
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* label default variables */
|
|
3
3
|
--label_font_size: var(--zd_font_size14);
|
|
4
4
|
--label_text_color: var(--zdt_label_default_text);
|
|
5
|
-
--
|
|
5
|
+
--label_font_weight: var(--zd-fw-normal);
|
|
6
6
|
--label_cursor: default;
|
|
7
7
|
--label_line_height: 1.286;
|
|
8
8
|
}
|
|
@@ -13,24 +13,24 @@
|
|
|
13
13
|
line-height: var(--label_line_height);
|
|
14
14
|
font-size: var(--label_font_size);
|
|
15
15
|
color: var(--label_text_color);
|
|
16
|
-
font-
|
|
16
|
+
font-weight: var(--label_font_weight);
|
|
17
17
|
cursor: var(--label_cursor);
|
|
18
18
|
}
|
|
19
19
|
.xsmall {
|
|
20
20
|
--label_font_size: var(--zd_font_size12);
|
|
21
|
-
--label_line_height:1.5;
|
|
21
|
+
--label_line_height: 1.5;
|
|
22
22
|
}
|
|
23
23
|
.small {
|
|
24
24
|
--label_font_size: var(--zd_font_size13);
|
|
25
|
-
--label_line_height:1.385;
|
|
25
|
+
--label_line_height: 1.385;
|
|
26
26
|
}
|
|
27
27
|
.medium {
|
|
28
28
|
--label_font_size: var(--zd_font_size14);
|
|
29
|
-
--label_line_height:1.286;
|
|
29
|
+
--label_line_height: 1.286;
|
|
30
30
|
}
|
|
31
31
|
.large {
|
|
32
32
|
--label_font_size: var(--zd_font_size26);
|
|
33
|
-
--label_line_height:0.6923;
|
|
33
|
+
--label_line_height: 0.6923;
|
|
34
34
|
composes: semibold from '../common/common.module.css';
|
|
35
35
|
}
|
|
36
36
|
.pointer {
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
display: inline-block;
|
|
47
47
|
}
|
|
48
48
|
.font_default {
|
|
49
|
-
--
|
|
49
|
+
--label_font_weight: var(--zd-fw-normal);
|
|
50
50
|
}
|
|
51
51
|
.font_primary {
|
|
52
|
-
--
|
|
52
|
+
--label_font_weight: var(--zd-fw-semibold);
|
|
53
53
|
composes: ftsmooth from '../common/common.module.css';
|
|
54
54
|
}
|
|
55
55
|
.dotted {
|
|
@@ -889,12 +889,8 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
889
889
|
autoComplete,
|
|
890
890
|
getTargetRef,
|
|
891
891
|
isFocus,
|
|
892
|
-
limit
|
|
893
|
-
customProps
|
|
892
|
+
limit
|
|
894
893
|
} = this.props;
|
|
895
|
-
const {
|
|
896
|
-
SuggestionsProps = {}
|
|
897
|
-
} = customProps;
|
|
898
894
|
let {
|
|
899
895
|
clearText = MULTISELECT_I18N_KEYS.clearText,
|
|
900
896
|
limitReachedMessage = MULTISELECT_I18N_KEYS.limitReachedMessage
|
|
@@ -1063,7 +1059,7 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
1063
1059
|
a11y: {
|
|
1064
1060
|
role: 'heading'
|
|
1065
1061
|
}
|
|
1066
|
-
})), /*#__PURE__*/React.createElement(Suggestions, {
|
|
1062
|
+
})), /*#__PURE__*/React.createElement(Suggestions, {
|
|
1067
1063
|
suggestions: suggestions,
|
|
1068
1064
|
selectedOptions: selectedOptionIds,
|
|
1069
1065
|
getRef: this.suggestionItemRef,
|
|
@@ -1095,9 +1095,9 @@ export class MultiSelectComponent extends React.Component {
|
|
|
1095
1095
|
isLoading,
|
|
1096
1096
|
selectAllText,
|
|
1097
1097
|
needSelectAll,
|
|
1098
|
+
customProps,
|
|
1098
1099
|
isVirtualizerEnabled,
|
|
1099
|
-
limit
|
|
1100
|
-
customProps
|
|
1100
|
+
limit
|
|
1101
1101
|
} = this.props;
|
|
1102
1102
|
const {
|
|
1103
1103
|
selectedOptions,
|