@zohodesk/components 1.4.8 → 1.4.10-exp.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/.cli/propValidation_report.html +1 -1
- package/README.md +11 -0
- 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/DateTime/DateTime.module.css +12 -9
- package/es/DateTime/YearView.module.css +1 -1
- package/es/Heading/Heading.module.css +0 -1
- package/es/Label/Label.module.css +8 -8
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +16 -8
- package/es/MultiSelect/AdvancedMultiSelect.js +13 -6
- package/es/MultiSelect/EmptyState.js +2 -1
- package/es/MultiSelect/MultiSelect.js +26 -15
- package/es/MultiSelect/MultiSelect.module.css +1 -1
- package/es/MultiSelect/MultiSelectWithAvatar.js +9 -2
- package/es/MultiSelect/SelectedOptions.js +4 -2
- package/es/MultiSelect/Suggestions.js +10 -2
- package/es/MultiSelect/__tests__/MultiSelect.spec.js +25 -0
- package/es/MultiSelect/__tests__/Suggestions.spec.js +58 -0
- package/es/MultiSelect/__tests__/__snapshots__/MultiSelect.spec.js.snap +253 -0
- package/es/MultiSelect/__tests__/__snapshots__/Suggestions.spec.js.snap +343 -0
- package/es/MultiSelect/constants.js +6 -0
- package/es/MultiSelect/props/propTypes.js +15 -55
- package/es/Select/SelectWithIcon.js +1 -1
- package/es/Select/__tests__/Select.spec.js +16 -8
- package/es/Select/__tests__/__snapshots__/Select.spec.js.snap +281 -0
- package/es/Tab/Tabs.module.css +1 -1
- package/es/TextBox/TextBox.module.css +4 -4
- package/es/Textarea/Textarea.module.css +1 -1
- package/es/Tooltip/Tooltip.module.css +1 -1
- package/es/Typography/css/Typography.module.css +4 -4
- package/es/common/basic.module.css +39 -6
- package/es/common/basicReset.module.css +2 -2
- package/es/common/common.module.css +5 -5
- package/es/utils/Common.js +1 -1
- package/es/utils/dropDownUtils.js +25 -6
- 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/DateTime/DateTime.module.css +12 -9
- package/lib/DateTime/YearView.module.css +1 -1
- package/lib/Heading/Heading.module.css +0 -1
- package/lib/Label/Label.module.css +8 -8
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +94 -83
- package/lib/MultiSelect/AdvancedMultiSelect.js +16 -7
- package/lib/MultiSelect/EmptyState.js +3 -1
- package/lib/MultiSelect/MultiSelect.js +28 -15
- package/lib/MultiSelect/MultiSelect.module.css +1 -1
- package/lib/MultiSelect/MultiSelectWithAvatar.js +11 -3
- package/lib/MultiSelect/SelectedOptions.js +4 -2
- package/lib/MultiSelect/Suggestions.js +10 -2
- package/lib/MultiSelect/__tests__/MultiSelect.spec.js +25 -0
- package/lib/MultiSelect/__tests__/Suggestions.spec.js +58 -0
- package/lib/MultiSelect/__tests__/__snapshots__/MultiSelect.spec.js.snap +253 -0
- package/lib/MultiSelect/__tests__/__snapshots__/Suggestions.spec.js.snap +343 -0
- package/lib/MultiSelect/constants.js +13 -0
- package/lib/MultiSelect/props/propTypes.js +14 -55
- package/lib/Select/SelectWithIcon.js +1 -1
- package/lib/Select/__tests__/Select.spec.js +165 -155
- package/lib/Select/__tests__/__snapshots__/Select.spec.js.snap +281 -0
- package/lib/Tab/Tabs.module.css +1 -1
- package/lib/TextBox/TextBox.module.css +4 -4
- package/lib/Textarea/Textarea.module.css +1 -1
- package/lib/Tooltip/Tooltip.module.css +1 -1
- package/lib/Typography/css/Typography.module.css +4 -4
- package/lib/common/basic.module.css +39 -6
- package/lib/common/basicReset.module.css +2 -2
- package/lib/common/common.module.css +5 -5
- package/lib/utils/Common.js +1 -1
- package/lib/utils/dropDownUtils.js +24 -3
- package/lib/v1/Tab/v1Tabs.module.css +1 -1
- package/lib/v1/Typography/css/v1_Typography.module.css +4 -4
- package/package.json +7 -6
|
@@ -1926,6 +1926,287 @@ exports[`Select - Should render the only options matching search value 1`] = `
|
|
|
1926
1926
|
</DocumentFragment>
|
|
1927
1927
|
`;
|
|
1928
1928
|
|
|
1929
|
+
exports[`Select - Should render the only options matching search value even with additional spaces before and after 1`] = `
|
|
1930
|
+
<DocumentFragment>
|
|
1931
|
+
<div
|
|
1932
|
+
class="container box_medium "
|
|
1933
|
+
data-selector-id="select"
|
|
1934
|
+
>
|
|
1935
|
+
<div
|
|
1936
|
+
class=""
|
|
1937
|
+
data-id="selectComponent"
|
|
1938
|
+
data-test-id="selectComponent"
|
|
1939
|
+
>
|
|
1940
|
+
<div
|
|
1941
|
+
class="container effect effectFocused input flex rowdir"
|
|
1942
|
+
data-id="containerComponent"
|
|
1943
|
+
data-selector-id="textBoxIcon"
|
|
1944
|
+
data-test-id="containerComponent"
|
|
1945
|
+
>
|
|
1946
|
+
<div
|
|
1947
|
+
class="grow basis shrinkOff"
|
|
1948
|
+
data-id="boxComponent"
|
|
1949
|
+
data-selector-id="box"
|
|
1950
|
+
data-test-id="boxComponent"
|
|
1951
|
+
>
|
|
1952
|
+
<input
|
|
1953
|
+
aria-activedescendant="1"
|
|
1954
|
+
aria-controls="1"
|
|
1955
|
+
aria-expanded="true"
|
|
1956
|
+
aria-haspopup="true"
|
|
1957
|
+
aria-label="click to select options"
|
|
1958
|
+
aria-owns="1"
|
|
1959
|
+
aria-readonly="true"
|
|
1960
|
+
autocomplete="off"
|
|
1961
|
+
class=" pointer container medium default effect focus borderColor_default inputDotted "
|
|
1962
|
+
data-id="selectComponent_textBox"
|
|
1963
|
+
data-selector-id="textBoxIcon"
|
|
1964
|
+
data-test-id="selectComponent_textBox"
|
|
1965
|
+
data-title="Option 1"
|
|
1966
|
+
maxlength="250"
|
|
1967
|
+
placeholder=""
|
|
1968
|
+
readonly=""
|
|
1969
|
+
role="Menuitem"
|
|
1970
|
+
type="text"
|
|
1971
|
+
value="Option 1"
|
|
1972
|
+
/>
|
|
1973
|
+
</div>
|
|
1974
|
+
<div
|
|
1975
|
+
class="iconContainer shrinkOff"
|
|
1976
|
+
data-id="boxComponent"
|
|
1977
|
+
data-selector-id="box"
|
|
1978
|
+
data-test-id="boxComponent"
|
|
1979
|
+
>
|
|
1980
|
+
<div
|
|
1981
|
+
class="flex cover rowdir"
|
|
1982
|
+
data-id="containerComponent"
|
|
1983
|
+
data-selector-id="container"
|
|
1984
|
+
data-test-id="containerComponent"
|
|
1985
|
+
>
|
|
1986
|
+
<div
|
|
1987
|
+
class="icon rotated shrinkOff"
|
|
1988
|
+
data-id="boxComponent"
|
|
1989
|
+
data-selector-id="box"
|
|
1990
|
+
data-test-id="boxComponent"
|
|
1991
|
+
>
|
|
1992
|
+
<div
|
|
1993
|
+
class="rightPlaceholder inflex rowdir both"
|
|
1994
|
+
data-id="containerComponent"
|
|
1995
|
+
data-selector-id="container"
|
|
1996
|
+
data-test-id="containerComponent"
|
|
1997
|
+
>
|
|
1998
|
+
<div
|
|
1999
|
+
aria-hidden="true"
|
|
2000
|
+
class="arrowIcon flex cover coldir both"
|
|
2001
|
+
data-id="selectComponent_downIcon"
|
|
2002
|
+
data-selector-id="container"
|
|
2003
|
+
data-test-id="selectComponent_downIcon"
|
|
2004
|
+
>
|
|
2005
|
+
<i
|
|
2006
|
+
aria-hidden="true"
|
|
2007
|
+
class="zd_font_icons basic icon-down "
|
|
2008
|
+
data-id="fontIcon"
|
|
2009
|
+
data-selector-id="fontIcon"
|
|
2010
|
+
data-test-id="fontIcon"
|
|
2011
|
+
style="--zd-iconfont-size: var(--zd_font_size7);"
|
|
2012
|
+
/>
|
|
2013
|
+
</div>
|
|
2014
|
+
</div>
|
|
2015
|
+
</div>
|
|
2016
|
+
</div>
|
|
2017
|
+
</div>
|
|
2018
|
+
<div
|
|
2019
|
+
class="line borderColor_default "
|
|
2020
|
+
/>
|
|
2021
|
+
</div>
|
|
2022
|
+
</div>
|
|
2023
|
+
<div
|
|
2024
|
+
class="main container bottomMid default"
|
|
2025
|
+
data-a11y-focus-main-area="true"
|
|
2026
|
+
data-arrow-position="mid"
|
|
2027
|
+
data-box-direction="bottom"
|
|
2028
|
+
data-id="selectComponent_suggestions"
|
|
2029
|
+
data-position="bottomMid"
|
|
2030
|
+
data-selector-id="dropBox"
|
|
2031
|
+
data-test-id="selectComponent_suggestions"
|
|
2032
|
+
dot-ui-element="dropbox"
|
|
2033
|
+
style="z-index: 4;"
|
|
2034
|
+
>
|
|
2035
|
+
<div
|
|
2036
|
+
class="subContainer shadow radius bounce defaultPalette"
|
|
2037
|
+
data-id="selectComponent_suggestions_subcontainer"
|
|
2038
|
+
data-selector-id="dropBox_subcontainer"
|
|
2039
|
+
data-test-id="selectComponent_suggestions_subcontainer"
|
|
2040
|
+
tabindex="-1"
|
|
2041
|
+
>
|
|
2042
|
+
<div
|
|
2043
|
+
class="flex rowdir"
|
|
2044
|
+
data-id="containerComponent"
|
|
2045
|
+
data-selector-id="container"
|
|
2046
|
+
data-test-id="containerComponent"
|
|
2047
|
+
>
|
|
2048
|
+
<div
|
|
2049
|
+
class="grow basis shrinkOff"
|
|
2050
|
+
data-id="boxComponent"
|
|
2051
|
+
data-selector-id="box"
|
|
2052
|
+
data-test-id="boxComponent"
|
|
2053
|
+
>
|
|
2054
|
+
<div
|
|
2055
|
+
class="flex cover coldir"
|
|
2056
|
+
data-id="containerComponent"
|
|
2057
|
+
data-selector-id="container"
|
|
2058
|
+
data-test-id="containerComponent"
|
|
2059
|
+
>
|
|
2060
|
+
<div
|
|
2061
|
+
class="notScroll shrinkOff"
|
|
2062
|
+
data-id="CardHeader"
|
|
2063
|
+
data-selector-id="cardHeader"
|
|
2064
|
+
data-test-id="CardHeader"
|
|
2065
|
+
>
|
|
2066
|
+
<div
|
|
2067
|
+
class="search medium"
|
|
2068
|
+
>
|
|
2069
|
+
<div
|
|
2070
|
+
class="container effect effectFocused flex rowdir"
|
|
2071
|
+
data-id="containerComponent"
|
|
2072
|
+
data-selector-id="textBoxIcon"
|
|
2073
|
+
data-test-id="containerComponent"
|
|
2074
|
+
>
|
|
2075
|
+
<div
|
|
2076
|
+
class="grow basis shrinkOff"
|
|
2077
|
+
data-id="boxComponent"
|
|
2078
|
+
data-selector-id="box"
|
|
2079
|
+
data-test-id="boxComponent"
|
|
2080
|
+
>
|
|
2081
|
+
<input
|
|
2082
|
+
aria-autocomplete="list"
|
|
2083
|
+
aria-controls="1"
|
|
2084
|
+
aria-describedby="2"
|
|
2085
|
+
autocomplete="off"
|
|
2086
|
+
class=" container small default effect borderColor_default "
|
|
2087
|
+
data-id="selectComponent_search"
|
|
2088
|
+
data-selector-id="textBoxIcon"
|
|
2089
|
+
data-test-id="selectComponent_search"
|
|
2090
|
+
maxlength="250"
|
|
2091
|
+
placeholder="Search"
|
|
2092
|
+
type="text"
|
|
2093
|
+
value=" 2 "
|
|
2094
|
+
/>
|
|
2095
|
+
</div>
|
|
2096
|
+
<div
|
|
2097
|
+
class="iconContainer shrinkOff"
|
|
2098
|
+
data-id="boxComponent"
|
|
2099
|
+
data-selector-id="box"
|
|
2100
|
+
data-test-id="boxComponent"
|
|
2101
|
+
>
|
|
2102
|
+
<div
|
|
2103
|
+
class="flex cover rowdir"
|
|
2104
|
+
data-id="containerComponent"
|
|
2105
|
+
data-selector-id="container"
|
|
2106
|
+
data-test-id="containerComponent"
|
|
2107
|
+
>
|
|
2108
|
+
<button
|
|
2109
|
+
class="buttonReset icon shrinkOff"
|
|
2110
|
+
data-id="selectComponent_search_ClearIcon"
|
|
2111
|
+
data-selector-id="box"
|
|
2112
|
+
data-test-id="selectComponent_search_ClearIcon"
|
|
2113
|
+
data-title="Clear"
|
|
2114
|
+
>
|
|
2115
|
+
<div
|
|
2116
|
+
aria-hidden="true"
|
|
2117
|
+
class="flex cover coldir both"
|
|
2118
|
+
data-id="containerComponent"
|
|
2119
|
+
data-selector-id="container"
|
|
2120
|
+
data-test-id="containerComponent"
|
|
2121
|
+
>
|
|
2122
|
+
<i
|
|
2123
|
+
aria-hidden="true"
|
|
2124
|
+
class="zd_font_icons basic icon-delete rtl "
|
|
2125
|
+
data-id="fontIcon"
|
|
2126
|
+
data-selector-id="fontIcon"
|
|
2127
|
+
data-test-id="fontIcon"
|
|
2128
|
+
style="--zd-iconfont-size: var(--zd_font_size14);"
|
|
2129
|
+
/>
|
|
2130
|
+
</div>
|
|
2131
|
+
</button>
|
|
2132
|
+
</div>
|
|
2133
|
+
</div>
|
|
2134
|
+
<div
|
|
2135
|
+
class="line borderColor_default "
|
|
2136
|
+
/>
|
|
2137
|
+
</div>
|
|
2138
|
+
</div>
|
|
2139
|
+
</div>
|
|
2140
|
+
<div
|
|
2141
|
+
class="small grow basis shrinkOn scrolly"
|
|
2142
|
+
data-id="CardContent"
|
|
2143
|
+
data-selector-id="cardContent"
|
|
2144
|
+
data-test-id="CardContent"
|
|
2145
|
+
>
|
|
2146
|
+
<div
|
|
2147
|
+
class="flex coldir"
|
|
2148
|
+
data-id="containerComponent"
|
|
2149
|
+
data-selector-id="container"
|
|
2150
|
+
data-test-id="containerComponent"
|
|
2151
|
+
id="1"
|
|
2152
|
+
role="listbox"
|
|
2153
|
+
tabindex="0"
|
|
2154
|
+
>
|
|
2155
|
+
<div
|
|
2156
|
+
class="listItemContainer shrinkOff"
|
|
2157
|
+
data-id="selectComponent_Options"
|
|
2158
|
+
data-selector-id="box"
|
|
2159
|
+
data-test-id="selectComponent_Options"
|
|
2160
|
+
>
|
|
2161
|
+
<li
|
|
2162
|
+
aria-label="Option 2"
|
|
2163
|
+
aria-selected="false"
|
|
2164
|
+
ariaparentrole="listbox"
|
|
2165
|
+
class="list medium default defaultHover mediumwithTick flex rowdir vCenter"
|
|
2166
|
+
data-a11y-inset-focus="true"
|
|
2167
|
+
data-a11y-list-active="true"
|
|
2168
|
+
data-id="Option 2"
|
|
2169
|
+
data-selector-id="listItem"
|
|
2170
|
+
data-test-id="Option 2"
|
|
2171
|
+
data-title="Option 2"
|
|
2172
|
+
role="option"
|
|
2173
|
+
tabindex="0"
|
|
2174
|
+
>
|
|
2175
|
+
<div
|
|
2176
|
+
class="leftBox grow basis shrinkOff"
|
|
2177
|
+
data-id="boxComponent"
|
|
2178
|
+
data-selector-id="box"
|
|
2179
|
+
data-test-id="boxComponent"
|
|
2180
|
+
>
|
|
2181
|
+
<div
|
|
2182
|
+
class="titleBox shrinkOff"
|
|
2183
|
+
data-id="boxComponent"
|
|
2184
|
+
data-selector-id="box"
|
|
2185
|
+
data-test-id="boxComponent"
|
|
2186
|
+
>
|
|
2187
|
+
<div
|
|
2188
|
+
class="value basisAuto shrinkOn"
|
|
2189
|
+
data-id="boxComponent"
|
|
2190
|
+
data-selector-id="box"
|
|
2191
|
+
data-test-id="boxComponent"
|
|
2192
|
+
>
|
|
2193
|
+
Option 2
|
|
2194
|
+
</div>
|
|
2195
|
+
</div>
|
|
2196
|
+
</div>
|
|
2197
|
+
</li>
|
|
2198
|
+
</div>
|
|
2199
|
+
</div>
|
|
2200
|
+
</div>
|
|
2201
|
+
</div>
|
|
2202
|
+
</div>
|
|
2203
|
+
</div>
|
|
2204
|
+
</div>
|
|
2205
|
+
</div>
|
|
2206
|
+
</div>
|
|
2207
|
+
</DocumentFragment>
|
|
2208
|
+
`;
|
|
2209
|
+
|
|
1929
2210
|
exports[`Select - Should render the placeholder when there is no default value 1`] = `
|
|
1930
2211
|
<DocumentFragment>
|
|
1931
2212
|
<div
|
package/lib/Tab/Tabs.module.css
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
--textbox_width: 100%;
|
|
10
10
|
--textbox_height: var(--zd_size35);
|
|
11
11
|
--textbox_border_radius: none;
|
|
12
|
-
--
|
|
12
|
+
--textbox_font_weight: var(--zd-fw-normal);
|
|
13
13
|
/* Variable:Ignore */
|
|
14
14
|
--textbox_letter_spacing: 0.1px;
|
|
15
15
|
--textbox_padding: 0;
|
|
@@ -166,18 +166,18 @@
|
|
|
166
166
|
.primary,
|
|
167
167
|
.secondary,
|
|
168
168
|
.light {
|
|
169
|
-
font-
|
|
169
|
+
font-weight: var(--textbox_font_weight);
|
|
170
170
|
}
|
|
171
171
|
|
|
172
172
|
.primary {
|
|
173
173
|
--textbox_text_color: var(--zdt_textbox_default_text);
|
|
174
|
-
--
|
|
174
|
+
--textbox_font_weight: var(--zd-fw-semibold);
|
|
175
175
|
composes: ftsmooth from '../common/common.module.css';
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
.secondary {
|
|
179
179
|
--textbox_text_color: var(--zdt_textbox_secondary_text);
|
|
180
|
-
--
|
|
180
|
+
--textbox_font_weight: var(--zd-fw-light);
|
|
181
181
|
}
|
|
182
182
|
|
|
183
183
|
.light {
|
|
@@ -25,20 +25,20 @@
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
.font_regular {
|
|
28
|
-
font-
|
|
28
|
+
font-weight: var(--zd-fw-normal);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
.font_light {
|
|
32
|
-
font-
|
|
32
|
+
font-weight: var(--zd-fw-light);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
.font_semibold {
|
|
36
|
-
font-
|
|
36
|
+
font-weight: var(--zd-fw-semibold);
|
|
37
37
|
composes: ftsmooth from '../../common/common.module.css';
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
.font_bold {
|
|
41
|
-
font-
|
|
41
|
+
font-weight: var(--zd-fw-bold);
|
|
42
42
|
composes: ftsmooth from '../../common/common.module.css';
|
|
43
43
|
}
|
|
44
44
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
@font-face {
|
|
2
|
-
font-family:
|
|
3
|
-
src: url('https://static.zohocdn.com/webfonts/
|
|
4
|
-
font-weight:
|
|
2
|
+
font-family: Light;
|
|
3
|
+
src: url('https://static.zohocdn.com/webfonts/lato2light/font.woff2') format('woff2');
|
|
4
|
+
font-weight: 300;
|
|
5
5
|
font-style: normal;
|
|
6
6
|
font-display: swap;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
@font-face {
|
|
10
|
-
font-family:
|
|
11
|
-
src: url('https://static.zohocdn.com/webfonts/
|
|
12
|
-
font-weight:
|
|
10
|
+
font-family: Regular;
|
|
11
|
+
src: url('https://static.zohocdn.com/webfonts/lato2regular/font.woff2') format('woff2');
|
|
12
|
+
font-weight: 400;
|
|
13
13
|
font-style: normal;
|
|
14
14
|
font-display: swap;
|
|
15
15
|
}
|
|
@@ -29,3 +29,36 @@
|
|
|
29
29
|
font-style: normal;
|
|
30
30
|
font-display: swap;
|
|
31
31
|
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
@font-face {
|
|
35
|
+
font-family: ZDLato;
|
|
36
|
+
src: url('https://static.zohocdn.com/webfonts/lato2light/font.woff2') format('woff2');
|
|
37
|
+
font-weight: 100 300;
|
|
38
|
+
font-style: normal;
|
|
39
|
+
font-display: swap;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@font-face {
|
|
43
|
+
font-family: ZDLato;
|
|
44
|
+
src: url('https://static.zohocdn.com/webfonts/lato2regular/font.woff2') format('woff2');
|
|
45
|
+
font-weight: 400;
|
|
46
|
+
font-style: normal;
|
|
47
|
+
font-display: swap;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@font-face {
|
|
51
|
+
font-family: ZDLato;
|
|
52
|
+
src: url('https://static.zohocdn.com/webfonts/lato2semibold/font.woff2') format('woff2');
|
|
53
|
+
font-weight: 500 600;
|
|
54
|
+
font-style: normal;
|
|
55
|
+
font-display: swap;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@font-face {
|
|
59
|
+
font-family: ZDLato;
|
|
60
|
+
src: url('https://static.zohocdn.com/webfonts/lato2bold/font.woff2') format('woff2');
|
|
61
|
+
font-weight: 700 900;
|
|
62
|
+
font-style: normal;
|
|
63
|
+
font-display: swap;
|
|
64
|
+
}
|
|
@@ -27,7 +27,7 @@ html {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
textarea {
|
|
30
|
-
font-
|
|
30
|
+
font-weight: var(--zd-fw-normal);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
label, input[type='button'], input[type='submit'], input[type='file'], button {
|
|
@@ -37,4 +37,4 @@ label, input[type='button'], input[type='submit'], input[type='file'], button {
|
|
|
37
37
|
/*Moz Required Box shadow Isssue*/
|
|
38
38
|
input[required]:-moz-ui-invalid {
|
|
39
39
|
box-shadow: none;
|
|
40
|
-
}
|
|
40
|
+
}
|
|
@@ -303,22 +303,22 @@
|
|
|
303
303
|
resize: vertical;
|
|
304
304
|
}
|
|
305
305
|
|
|
306
|
-
/*font-
|
|
306
|
+
/*font-weight*/
|
|
307
307
|
.regular {
|
|
308
|
-
font-
|
|
308
|
+
font-weight: var(--zd-fw-normal);
|
|
309
309
|
}
|
|
310
310
|
|
|
311
311
|
.light {
|
|
312
|
-
font-
|
|
312
|
+
font-weight: var(--zd-fw-light);
|
|
313
313
|
}
|
|
314
314
|
|
|
315
315
|
.semibold {
|
|
316
|
-
font-
|
|
316
|
+
font-weight: var(--zd-fw-semibold);
|
|
317
317
|
composes: ftsmooth;
|
|
318
318
|
}
|
|
319
319
|
|
|
320
320
|
.bold {
|
|
321
|
-
font-
|
|
321
|
+
font-weight: var(--zd-fw-bold);
|
|
322
322
|
composes: ftsmooth;
|
|
323
323
|
}
|
|
324
324
|
|
package/lib/utils/Common.js
CHANGED
|
@@ -475,7 +475,7 @@ function getElementSpace(elementRef) {
|
|
|
475
475
|
|
|
476
476
|
function getSearchString() {
|
|
477
477
|
var charachers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
478
|
-
return (charachers || '').toString().toLowerCase(); //.replace(/\s+/g, '');
|
|
478
|
+
return (charachers || '').toString().toLowerCase().trim(); //.replace(/\s+/g, '');
|
|
479
479
|
}
|
|
480
480
|
|
|
481
481
|
function findScrollEnd(element) {
|
|
@@ -52,6 +52,10 @@ var getOptionsOrder = function getOptionsOrder(props) {
|
|
|
52
52
|
return props.optionsOrder || dummyArray;
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
+
var getLimit = function getLimit(props) {
|
|
56
|
+
return props.limit || 0;
|
|
57
|
+
};
|
|
58
|
+
|
|
55
59
|
var getSelectedOptionsSel = function getSelectedOptionsSel(props) {
|
|
56
60
|
return props.selectedOptions || dummyArray;
|
|
57
61
|
};
|
|
@@ -339,7 +343,7 @@ var makeFormatOptions = function makeFormatOptions() {
|
|
|
339
343
|
exports.makeFormatOptions = makeFormatOptions;
|
|
340
344
|
|
|
341
345
|
var makeGetMultiSelectSelectedOptions = function makeGetMultiSelectSelectedOptions() {
|
|
342
|
-
return (0, _reselect.createSelector)([getSelectedOptionsSel, getNormalizedFormatOptions, getSelectedOptionsLength, getAllowValueFallback], function (selectedOptions, normalizedFormatOptions, selectedOptionsLength, allowValueFallback) {
|
|
346
|
+
return (0, _reselect.createSelector)([getSelectedOptionsSel, getNormalizedFormatOptions, getSelectedOptionsLength, getAllowValueFallback, getLimit], function (selectedOptions, normalizedFormatOptions, selectedOptionsLength, allowValueFallback, limit) {
|
|
343
347
|
var output = [];
|
|
344
348
|
var revampSelectedOptions = [];
|
|
345
349
|
var normalizedSelectedOptions = {};
|
|
@@ -367,6 +371,12 @@ var makeGetMultiSelectSelectedOptions = function makeGetMultiSelectSelectedOptio
|
|
|
367
371
|
}
|
|
368
372
|
}
|
|
369
373
|
|
|
374
|
+
if (limit && limit > 0) {
|
|
375
|
+
output = output.slice(0, limit);
|
|
376
|
+
revampSelectedOptions = revampSelectedOptions.slice(0, limit);
|
|
377
|
+
normalizedSelectedOptions = Object.fromEntries(Object.entries(normalizedSelectedOptions).slice(0, limit));
|
|
378
|
+
}
|
|
379
|
+
|
|
370
380
|
return {
|
|
371
381
|
formatSelectedOptions: output,
|
|
372
382
|
normalizedSelectedOptions: normalizedSelectedOptions,
|
|
@@ -593,7 +603,8 @@ var filterSelectedOptions = function filterSelectedOptions() {
|
|
|
593
603
|
_ref4$propSelectedOpt = _ref4.propSelectedOptions,
|
|
594
604
|
propSelectedOptions = _ref4$propSelectedOpt === void 0 ? dummyArray : _ref4$propSelectedOpt,
|
|
595
605
|
_ref4$disabledOptions = _ref4.disabledOptions,
|
|
596
|
-
disabledOptions = _ref4$disabledOptions === void 0 ? dummyArray : _ref4$disabledOptions
|
|
606
|
+
disabledOptions = _ref4$disabledOptions === void 0 ? dummyArray : _ref4$disabledOptions,
|
|
607
|
+
limit = _ref4.limit;
|
|
597
608
|
|
|
598
609
|
// eslint-disable-next-line no-param-reassign
|
|
599
610
|
selectedOptions = selectedOptions || dummyArray; // eslint-disable-next-line no-param-reassign
|
|
@@ -617,8 +628,18 @@ var filterSelectedOptions = function filterSelectedOptions() {
|
|
|
617
628
|
|
|
618
629
|
return true;
|
|
619
630
|
});
|
|
631
|
+
var totalSelectedOptions = [].concat(_toConsumableArray(oldValidSelectedOptions), _toConsumableArray(newlyAddedOptions));
|
|
632
|
+
|
|
633
|
+
if (limit && limit > 0) {
|
|
634
|
+
if (totalSelectedOptions.length > limit) {
|
|
635
|
+
return {
|
|
636
|
+
newSelectedOptions: totalSelectedOptions.slice(0, limit)
|
|
637
|
+
};
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
|
|
620
641
|
return {
|
|
621
|
-
newSelectedOptions:
|
|
642
|
+
newSelectedOptions: totalSelectedOptions
|
|
622
643
|
};
|
|
623
644
|
};
|
|
624
645
|
|
|
@@ -19,17 +19,17 @@
|
|
|
19
19
|
display: initial;
|
|
20
20
|
}
|
|
21
21
|
.font_regular {
|
|
22
|
-
font-
|
|
22
|
+
font-weight: var(--zd-fw-normal);
|
|
23
23
|
}
|
|
24
24
|
.font_light {
|
|
25
|
-
font-
|
|
25
|
+
font-weight: var(--zd-fw-light);
|
|
26
26
|
}
|
|
27
27
|
.font_semibold {
|
|
28
|
-
font-
|
|
28
|
+
font-weight: var(--zd-fw-semibold);
|
|
29
29
|
composes: ftsmooth from '../../../common/common.module.css';
|
|
30
30
|
}
|
|
31
31
|
.font_bold {
|
|
32
|
-
font-
|
|
32
|
+
font-weight: var(--zd-fw-bold);
|
|
33
33
|
composes: ftsmooth from '../../../common/common.module.css';
|
|
34
34
|
}
|
|
35
35
|
.fontStyles_normal{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.10-exp.1",
|
|
4
4
|
"main": "es/index.js",
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"private": false,
|
|
@@ -77,18 +77,19 @@
|
|
|
77
77
|
"@zohodesk-private/css-variable-migrator": "1.0.9",
|
|
78
78
|
"@zohodesk-private/node-plugins": "1.1.13",
|
|
79
79
|
"@zohodesk-private/react-prop-validator": "1.2.3",
|
|
80
|
-
"@zohodesk/a11y": "2.3.
|
|
80
|
+
"@zohodesk/a11y": "2.3.7",
|
|
81
81
|
"@zohodesk/docstool": "1.0.0-alpha-2",
|
|
82
82
|
"@zohodesk/dotkit": "1.0.3",
|
|
83
83
|
"@zohodesk/hooks": "2.0.5",
|
|
84
84
|
"@zohodesk/icons": "1.1.0",
|
|
85
85
|
"@zohodesk/layout": "3.1.0",
|
|
86
|
-
"@zohodesk/svg": "1.2.
|
|
86
|
+
"@zohodesk/svg": "1.2.2",
|
|
87
87
|
"@zohodesk/utils": "1.3.14",
|
|
88
88
|
"@zohodesk/variables": "1.1.0",
|
|
89
89
|
"@zohodesk/virtualizer": "1.0.3",
|
|
90
90
|
"react-sortable-hoc": "^0.8.3",
|
|
91
|
-
"velocity-react": "1.4.3"
|
|
91
|
+
"velocity-react": "1.4.3",
|
|
92
|
+
"@zohodesk/react-cli": "1.1.27"
|
|
92
93
|
},
|
|
93
94
|
"dependencies": {
|
|
94
95
|
"hoist-non-react-statics": "3.0.1",
|
|
@@ -99,13 +100,13 @@
|
|
|
99
100
|
"peerDependencies": {
|
|
100
101
|
"@zohodesk/icons": "1.1.0",
|
|
101
102
|
"@zohodesk/variables": "1.1.0",
|
|
102
|
-
"@zohodesk/svg": "1.2.
|
|
103
|
+
"@zohodesk/svg": "1.2.2",
|
|
103
104
|
"@zohodesk/virtualizer": "1.0.3",
|
|
104
105
|
"velocity-react": "1.4.3",
|
|
105
106
|
"react-sortable-hoc": "^0.8.3",
|
|
106
107
|
"@zohodesk/hooks": "2.0.5",
|
|
107
108
|
"@zohodesk/utils": "1.3.14",
|
|
108
|
-
"@zohodesk/a11y": "2.3.
|
|
109
|
+
"@zohodesk/a11y": "2.3.7",
|
|
109
110
|
"@zohodesk/layout": "3.1.0",
|
|
110
111
|
"@zohodesk/dotkit": "1.0.3"
|
|
111
112
|
}
|