@wireapp/react-ui-kit 9.52.1 → 9.54.0

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.
Files changed (77) hide show
  1. package/lib/Form/Select/BaseSelect/BaseSelect.styles.d.ts +46 -0
  2. package/lib/Form/Select/BaseSelect/BaseSelect.styles.d.ts.map +1 -0
  3. package/lib/Form/Select/BaseSelect/BaseSelect.styles.js +160 -0
  4. package/lib/Form/Select/BaseSelect/BaseSelectDropdownIndicator.d.ts +3 -0
  5. package/lib/Form/Select/BaseSelect/BaseSelectDropdownIndicator.d.ts.map +1 -0
  6. package/lib/Form/Select/BaseSelect/BaseSelectDropdownIndicator.js +29 -0
  7. package/lib/Form/Select/ComboboxSelect/ComboboxSelect.d.ts +17 -0
  8. package/lib/Form/Select/ComboboxSelect/ComboboxSelect.d.ts.map +1 -0
  9. package/lib/Form/Select/ComboboxSelect/ComboboxSelect.js +44 -0
  10. package/lib/Form/Select/ComboboxSelect/ComboboxSelect.stories.d.ts +33 -0
  11. package/lib/Form/Select/ComboboxSelect/ComboboxSelect.stories.d.ts.map +1 -0
  12. package/lib/Form/Select/ComboboxSelect/ComboboxSelect.stories.js +115 -0
  13. package/lib/Form/Select/ComboboxSelect/ComboboxSelect.styles.d.ts +17 -0
  14. package/lib/Form/Select/ComboboxSelect/ComboboxSelect.styles.d.ts.map +1 -0
  15. package/lib/Form/Select/ComboboxSelect/ComboboxSelect.styles.js +113 -0
  16. package/lib/Form/Select/Select.d.ts.map +1 -0
  17. package/lib/Form/{Select.js → Select/Select.js} +19 -13
  18. package/lib/Form/Select/Select.stories.d.ts +110 -0
  19. package/lib/Form/Select/Select.stories.d.ts.map +1 -0
  20. package/lib/Form/{Select.stories.js → Select/Select.stories.js} +8 -19
  21. package/lib/Form/Select/Select.styles.d.ts +14 -0
  22. package/lib/Form/Select/Select.styles.d.ts.map +1 -0
  23. package/lib/Form/Select/Select.styles.js +91 -0
  24. package/lib/Form/Select/SelectContainer/SelectContainer.d.ts +3 -0
  25. package/lib/Form/Select/SelectContainer/SelectContainer.d.ts.map +1 -0
  26. package/lib/Form/Select/SelectContainer/SelectContainer.js +28 -0
  27. package/lib/Form/Select/SelectIndicatorsContainer/SelectIndicatorsContainer.d.ts +4 -0
  28. package/lib/Form/Select/SelectIndicatorsContainer/SelectIndicatorsContainer.d.ts.map +1 -0
  29. package/lib/Form/Select/SelectIndicatorsContainer/SelectIndicatorsContainer.js +29 -0
  30. package/lib/Form/Select/SelectMenu/SelectMenu.d.ts +4 -0
  31. package/lib/Form/Select/SelectMenu/SelectMenu.d.ts.map +1 -0
  32. package/lib/Form/Select/SelectMenu/SelectMenu.js +13 -0
  33. package/lib/Form/Select/SelectMenuList/SelectMenuList.d.ts +6 -0
  34. package/lib/Form/Select/SelectMenuList/SelectMenuList.d.ts.map +1 -0
  35. package/lib/Form/Select/SelectMenuList/SelectMenuList.js +39 -0
  36. package/lib/Form/Select/SelectMenuList/SelectMenuList.styles.d.ts +5 -0
  37. package/lib/Form/Select/SelectMenuList/SelectMenuList.styles.d.ts.map +1 -0
  38. package/lib/Form/{SelectComponents.styles.js → Select/SelectMenuList/SelectMenuList.styles.js} +5 -5
  39. package/lib/Form/Select/SelectOption/SelectOption.d.ts +5 -0
  40. package/lib/Form/Select/SelectOption/SelectOption.d.ts.map +1 -0
  41. package/lib/Form/Select/SelectOption/SelectOption.js +53 -0
  42. package/lib/Form/Select/SelectValueContainer/SelectValueContainer.d.ts +4 -0
  43. package/lib/Form/Select/SelectValueContainer/SelectValueContainer.d.ts.map +1 -0
  44. package/lib/Form/Select/SelectValueContainer/SelectValueContainer.js +21 -0
  45. package/lib/Form/index.d.ts +2 -1
  46. package/lib/Form/index.d.ts.map +1 -1
  47. package/lib/Form/index.js +2 -1
  48. package/lib/Misc/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.d.ts +3 -2
  49. package/lib/Misc/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.d.ts.map +1 -1
  50. package/lib/Misc/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.js +2 -2
  51. package/lib/Misc/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.styles.d.ts.map +1 -1
  52. package/lib/Misc/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.styles.js +6 -1
  53. package/lib/Misc/Breadcrumbs/Breadcrumbs.d.ts +2 -0
  54. package/lib/Misc/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
  55. package/lib/Misc/Breadcrumbs/Breadcrumbs.js +2 -20
  56. package/lib/Misc/Breadcrumbs/Breadcrumbs.stories.d.ts +2 -0
  57. package/lib/Misc/Breadcrumbs/Breadcrumbs.stories.d.ts.map +1 -1
  58. package/lib/Misc/Breadcrumbs/Breadcrumbs.stories.js +14 -1
  59. package/lib/Misc/Breadcrumbs/CombainedBreadcrumbs/CombainedBreadcrumbs.d.ts +2 -0
  60. package/lib/Misc/Breadcrumbs/CombainedBreadcrumbs/CombainedBreadcrumbs.d.ts.map +1 -1
  61. package/lib/Misc/Breadcrumbs/CombainedBreadcrumbs/CombainedBreadcrumbs.js +1 -19
  62. package/lib/Misc/Breadcrumbs/CombainedBreadcrumbs/CombainedBreadcrumbs.styles.d.ts +1 -0
  63. package/lib/Misc/Breadcrumbs/CombainedBreadcrumbs/CombainedBreadcrumbs.styles.d.ts.map +1 -1
  64. package/lib/Misc/Breadcrumbs/CombainedBreadcrumbs/CombainedBreadcrumbs.styles.js +6 -1
  65. package/package.json +3 -3
  66. package/lib/Form/Select.d.ts.map +0 -1
  67. package/lib/Form/Select.stories.d.ts +0 -16
  68. package/lib/Form/Select.stories.d.ts.map +0 -1
  69. package/lib/Form/SelectComponents.d.ts +0 -16
  70. package/lib/Form/SelectComponents.d.ts.map +0 -1
  71. package/lib/Form/SelectComponents.js +0 -93
  72. package/lib/Form/SelectComponents.styles.d.ts +0 -5
  73. package/lib/Form/SelectComponents.styles.d.ts.map +0 -1
  74. package/lib/Form/SelectStyles.d.ts +0 -2802
  75. package/lib/Form/SelectStyles.d.ts.map +0 -1
  76. package/lib/Form/SelectStyles.js +0 -227
  77. /package/lib/Form/{Select.d.ts → Select/Select.d.ts} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"SelectStyles.d.ts","sourceRoot":"","sources":["../../src/Form/SelectStyles.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAKzC,OAAO,EAAC,KAAK,EAAC,MAAM,WAAW,CAAC;AAEhC,UAAU,kBAAkB;IAC1B,KAAK,EAAE,KAAK,CAAC;IACb,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;IACvC,UAAU,EAAE,SAAS,CAAC;IACtB,YAAY,EAAE,SAAS,CAAC;CACzB;AAED,eAAO,MAAM,YAAY,oEAMtB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2MnB,CAAC"}
@@ -1,227 +0,0 @@
1
- "use strict";
2
- /*
3
- * Wire
4
- * Copyright (C) 2022 Wire Swiss GmbH
5
- *
6
- * This program is free software: you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License as published by
8
- * the Free Software Foundation, either version 3 of the License, or
9
- * (at your option) any later version.
10
- *
11
- * This program is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- * GNU General Public License for more details.
15
- *
16
- * You should have received a copy of the GNU General Public License
17
- * along with this program. If not, see http://www.gnu.org/licenses/.
18
- *
19
- */
20
- Object.defineProperty(exports, "__esModule", { value: true });
21
- exports.customStyles = void 0;
22
- const Input_1 = require("./Input");
23
- const SelectComponents_1 = require("./SelectComponents");
24
- const customStyles = ({ theme, markInvalid = false, menuPosition = 'absolute', controlCSS, containerCSS, }) => ({
25
- indicatorSeparator: () => ({
26
- display: 'none',
27
- }),
28
- indicatorsContainer: provided => ({
29
- ...provided,
30
- }),
31
- container: (_, { options }) => {
32
- return {
33
- '& > div': (0, SelectComponents_1.isGroup)(options)
34
- ? {
35
- display: 'inline',
36
- position: 'relative',
37
- top: '-10px',
38
- ...containerCSS,
39
- }
40
- : {
41
- padding: 0,
42
- height: 'auto',
43
- minHeight: '48px',
44
- '&:-moz-focusring': {
45
- color: 'transparent',
46
- textShadow: '0 0 0 #000',
47
- },
48
- position: 'relative',
49
- ...containerCSS,
50
- },
51
- };
52
- },
53
- control: (_provided, { isDisabled, selectProps, options }) => ({
54
- display: 'flex',
55
- alignItems: 'center',
56
- appearance: 'none',
57
- padding: '0 8px 0 16px',
58
- height: 'auto',
59
- minHeight: '48px',
60
- ...((0, SelectComponents_1.isGroup)(options) && {
61
- position: 'absolute',
62
- zIndex: -9999,
63
- }),
64
- ...(0, Input_1.inputStyle)(theme, { disabled: selectProps.isDisabled, markInvalid }),
65
- borderRadius: 12,
66
- ...(isDisabled && {
67
- backgroundColor: theme.Input.backgroundColorDisabled,
68
- color: theme.Select.disabledColor,
69
- cursor: 'default',
70
- }),
71
- ...(markInvalid && {
72
- boxShadow: `0 0 0 1px ${theme.general.dangerColor}`,
73
- }),
74
- ...(selectProps.menuIsOpen && {
75
- boxShadow: `0 0 0 1px ${theme.general.primaryColor}`,
76
- '&:hover': {
77
- boxShadow: `0 0 0 1px ${theme.general.primaryColor}`,
78
- },
79
- }),
80
- cursor: !selectProps.isDisabled && 'pointer',
81
- '&:focus:visible, active': {
82
- boxShadow: !selectProps.isDisabled && `0 0 0 1px ${theme.general.primaryColor}`,
83
- },
84
- ...controlCSS,
85
- }),
86
- dropdownIndicator: (provided, selectProps) => {
87
- const isSelectDisabled = selectProps.isDisabled;
88
- return {
89
- ...provided,
90
- '& > svg': {
91
- fill: isSelectDisabled && theme.Input.placeholderColor,
92
- },
93
- };
94
- },
95
- group: provided => ({
96
- ...provided,
97
- padding: 0,
98
- backgroundColor: theme.Input.backgroundColor,
99
- }),
100
- groupHeading: provided => ({
101
- ...provided,
102
- display: 'flex',
103
- fontSize: theme.fontSizes.small,
104
- lineHeight: '14px',
105
- color: theme.Select.disabledColor,
106
- padding: '8px 16px 6px 16px',
107
- }),
108
- menu: (provided, { options }) => ({
109
- ...provided,
110
- boxShadow: `0 0 0 1px ${theme.general.primaryColor}, 0 4px 11px hsl(0deg 0% 0% / 10%)`,
111
- borderRadius: 12,
112
- marginBottom: 0,
113
- marginTop: 4,
114
- overflowY: 'overlay',
115
- position: menuPosition,
116
- ...((0, SelectComponents_1.isGroup)(options) && {
117
- minWidth: '400px',
118
- }),
119
- }),
120
- menuList: provided => ({
121
- ...provided,
122
- borderRadius: 0,
123
- paddingBottom: 0,
124
- paddingTop: 0,
125
- maxHeight: 400,
126
- }),
127
- option: (provided, { isMulti, isDisabled, isFocused, isSelected, options, data }) => ({
128
- ...provided,
129
- backgroundColor: theme.Input.backgroundColor,
130
- color: theme.general.color,
131
- padding: (0, SelectComponents_1.isGroup)(options) ? '6px 16px' : '10px 18px',
132
- cursor: isDisabled ? 'not-allowed' : 'pointer',
133
- fontSize: theme.fontSizes.base,
134
- fontWeight: isSelected && (0, SelectComponents_1.isGroup)(options) ? 600 : 400,
135
- lineHeight: '1.5rem',
136
- ...(isSelected &&
137
- !isDisabled &&
138
- !isMulti && {
139
- background: theme.general.primaryColor,
140
- borderColor: theme.general.primaryColor,
141
- color: theme.Select.contrastTextColor,
142
- '&:hover': {
143
- backgroundColor: theme.Select.selectedActiveBg,
144
- },
145
- '&:active': {
146
- backgroundColor: theme.general.primaryColor,
147
- boxShadow: `inset 0 0 0 1px ${theme.Select.selectedActiveBg}`,
148
- color: theme.general.contrastColor,
149
- },
150
- }),
151
- ...(isFocused &&
152
- !isDisabled &&
153
- !isSelected && {
154
- backgroundColor: theme.Select.optionHoverBg,
155
- borderColor: theme.Select.optionHoverBg,
156
- color: theme.general.color,
157
- '&:active': {
158
- background: theme.Select.optionHoverBg,
159
- boxShadow: `inset 0 0 0 1px ${theme.Select.selectedActiveBg}`,
160
- color: theme.general.color,
161
- },
162
- }),
163
- ...(isMulti &&
164
- isSelected && {
165
- backgroundColor: theme.Input.backgroundColor,
166
- '&:hover': {
167
- backgroundColor: theme.Select.optionHoverBg,
168
- },
169
- '&:active': {
170
- background: theme.Select.optionHoverBg,
171
- boxShadow: `inset 0 0 0 1px ${theme.Select.selectedActiveBg}`,
172
- color: theme.general.color,
173
- },
174
- }),
175
- ...(isDisabled && {
176
- backgroundColor: theme.Input.backgroundColorDisabled,
177
- color: theme.Select.disabledColor,
178
- '&:hover, &:active, &:focus': {
179
- backgroundColor: theme.Select.borderColor,
180
- color: theme.Select.disabledColor,
181
- },
182
- ...(isFocused && {
183
- backgroundColor: theme.Select.borderColor,
184
- color: theme.Select.disabledColor,
185
- }),
186
- }),
187
- ...((0, SelectComponents_1.isGroup)(options) && {
188
- 'div > svg': {
189
- fill: theme.general.contrastColor,
190
- },
191
- }),
192
- ...(!(0, SelectComponents_1.isGroup)(options) && {
193
- '&:not(:last-of-type)': {
194
- borderBottom: `1px solid ${theme.Select.borderColor}`,
195
- },
196
- }),
197
- ...(!(0, SelectComponents_1.isGroup)(options) && {
198
- '&:first-of-type': {
199
- borderRadius: '0',
200
- },
201
- }),
202
- ...((0, SelectComponents_1.isGroup)(options) && {
203
- textAlign: 'left',
204
- }),
205
- '&:last-of-type': {
206
- ...(!(0, SelectComponents_1.isGroup)(options) && { borderRadius: '0' }),
207
- ...((0, SelectComponents_1.isGroup)(options) &&
208
- !options[options.length - 1].options.includes(data) && {
209
- borderBottom: `1px solid ${theme.Select.borderColor}`,
210
- }),
211
- },
212
- }),
213
- valueContainer: provided => ({
214
- ...provided,
215
- padding: 0,
216
- width: '100%',
217
- display: 'grid',
218
- }),
219
- singleValue: (provided, selectProps) => {
220
- const isSelectDisabled = selectProps.isDisabled;
221
- return {
222
- ...provided,
223
- color: isSelectDisabled ? theme.Input.placeholderColor : theme.general.color,
224
- };
225
- },
226
- });
227
- exports.customStyles = customStyles;
File without changes