carbon-react 110.2.2 → 110.3.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.
- package/esm/__internal__/checkable-input/checkable-input-svg-wrapper.style.d.ts +1 -1
- package/esm/__internal__/checkable-input/checkable-input.component.d.ts +50 -0
- package/esm/__internal__/checkable-input/checkable-input.component.js +360 -98
- package/esm/__internal__/checkable-input/checkable-input.style.d.ts +11 -2
- package/esm/__internal__/checkable-input/checkable-input.style.js +0 -7
- package/esm/__internal__/checkable-input/hidden-checkable-input.component.d.ts +31 -0
- package/esm/__internal__/checkable-input/hidden-checkable-input.component.js +301 -45
- package/esm/__internal__/checkable-input/hidden-checkable-input.style.d.ts +1 -1
- package/esm/__internal__/checkable-input/index.d.ts +2 -5
- package/esm/__internal__/input/input-presentation.style.d.ts +1 -1
- package/esm/__internal__/input/input.style.d.ts +1 -1
- package/esm/__internal__/sticky-footer/index.d.ts +1 -0
- package/esm/__internal__/sticky-footer/sticky-footer.component.d.ts +15 -0
- package/esm/__internal__/sticky-footer/sticky-footer.style.d.ts +2 -0
- package/esm/__spec_helper__/mock-resize-observer.d.ts +1 -1
- package/esm/__spec_helper__/mock-resize-observer.js +2 -2
- package/esm/components/definition-list/dd.component.d.ts +4 -1
- package/esm/components/definition-list/dd.component.js +1 -0
- package/esm/components/definition-list/dl.component.d.ts +4 -1
- package/esm/components/definition-list/dl.component.js +1 -0
- package/esm/components/definition-list/dt.component.d.ts +4 -1
- package/esm/components/definition-list/dt.component.js +1 -0
- package/esm/components/drawer/drawer.component.d.ts +37 -0
- package/esm/components/drawer/drawer.component.js +43 -54
- package/esm/components/drawer/drawer.style.d.ts +27 -0
- package/esm/components/drawer/drawer.style.js +2 -2
- package/esm/components/drawer/index.d.ts +2 -1
- package/esm/components/drawer/index.js +1 -2
- package/esm/components/flat-table/flat-table-row/flat-table-row.style.js +1 -0
- package/esm/components/menu/__internal__/submenu/submenu.component.js +22 -4
- package/esm/components/menu/menu-item/menu-item.component.js +6 -1
- package/esm/components/menu/menu-item/menu-item.d.ts +4 -0
- package/esm/components/menu/menu-item/menu-item.style.js +158 -149
- package/esm/components/menu/scrollable-block/scrollable-block.component.js +21 -5
- package/esm/components/menu/scrollable-block/scrollable-block.d.ts +6 -0
- package/esm/components/menu/scrollable-block/scrollable-block.style.js +1 -1
- package/esm/components/tabs/__internal__/tabs-header/tabs-header.style.d.ts +6 -0
- package/esm/components/tabs/tab/tab.style.d.ts +2 -0
- package/esm/components/tabs/tabs.style.d.ts +2 -0
- package/lib/__internal__/checkable-input/checkable-input-svg-wrapper.style.d.ts +1 -1
- package/lib/__internal__/checkable-input/checkable-input.component.d.ts +50 -0
- package/lib/__internal__/checkable-input/checkable-input.component.js +360 -98
- package/lib/__internal__/checkable-input/checkable-input.style.d.ts +11 -2
- package/lib/__internal__/checkable-input/checkable-input.style.js +1 -9
- package/lib/__internal__/checkable-input/hidden-checkable-input.component.d.ts +31 -0
- package/lib/__internal__/checkable-input/hidden-checkable-input.component.js +301 -45
- package/lib/__internal__/checkable-input/hidden-checkable-input.style.d.ts +1 -1
- package/lib/__internal__/checkable-input/index.d.ts +2 -5
- package/lib/__internal__/input/input-presentation.style.d.ts +1 -1
- package/lib/__internal__/input/input.style.d.ts +1 -1
- package/lib/__internal__/sticky-footer/index.d.ts +1 -0
- package/lib/__internal__/sticky-footer/sticky-footer.component.d.ts +15 -0
- package/lib/__internal__/sticky-footer/sticky-footer.style.d.ts +2 -0
- package/lib/__spec_helper__/mock-resize-observer.d.ts +1 -1
- package/lib/__spec_helper__/mock-resize-observer.js +2 -2
- package/lib/components/definition-list/dd.component.d.ts +4 -1
- package/lib/components/definition-list/dd.component.js +1 -0
- package/lib/components/definition-list/dl.component.d.ts +4 -1
- package/lib/components/definition-list/dl.component.js +1 -0
- package/lib/components/definition-list/dt.component.d.ts +4 -1
- package/lib/components/definition-list/dt.component.js +1 -0
- package/lib/components/drawer/drawer.component.d.ts +37 -0
- package/lib/components/drawer/drawer.component.js +43 -55
- package/lib/components/drawer/drawer.style.d.ts +27 -0
- package/lib/components/drawer/drawer.style.js +3 -3
- package/lib/components/drawer/index.d.ts +2 -1
- package/lib/components/flat-table/flat-table-row/flat-table-row.style.js +1 -0
- package/lib/components/menu/__internal__/submenu/submenu.component.js +23 -4
- package/lib/components/menu/menu-item/menu-item.component.js +6 -1
- package/lib/components/menu/menu-item/menu-item.d.ts +4 -0
- package/lib/components/menu/menu-item/menu-item.style.js +158 -149
- package/lib/components/menu/scrollable-block/scrollable-block.component.js +22 -5
- package/lib/components/menu/scrollable-block/scrollable-block.d.ts +6 -0
- package/lib/components/menu/scrollable-block/scrollable-block.style.js +1 -1
- package/lib/components/tabs/__internal__/tabs-header/tabs-header.style.d.ts +6 -0
- package/lib/components/tabs/tab/tab.style.d.ts +2 -0
- package/lib/components/tabs/tabs.style.d.ts +2 -0
- package/package.json +1 -1
- package/esm/__internal__/checkable-input/checkable-input.d.ts +0 -55
- package/esm/__internal__/checkable-input/hidden-checkable-input.d.ts +0 -42
- package/esm/components/drawer/drawer.d.ts +0 -44
- package/lib/__internal__/checkable-input/checkable-input.d.ts +0 -55
- package/lib/__internal__/checkable-input/hidden-checkable-input.d.ts +0 -42
- package/lib/components/drawer/drawer.d.ts +0 -44
|
@@ -32,6 +32,7 @@ const StyledMenuItemWrapper = _styledComponents.default.a`
|
|
|
32
32
|
clickToOpen,
|
|
33
33
|
maxWidth,
|
|
34
34
|
inFullscreenView,
|
|
35
|
+
overrideColor,
|
|
35
36
|
as
|
|
36
37
|
}) => (0, _styledComponents.css)`
|
|
37
38
|
display: inline-block;
|
|
@@ -40,43 +41,51 @@ const StyledMenuItemWrapper = _styledComponents.default.a`
|
|
|
40
41
|
height: 40px;
|
|
41
42
|
position: relative;
|
|
42
43
|
cursor: pointer;
|
|
43
|
-
|
|
44
|
+
${!overrideColor && (0, _styledComponents.css)`
|
|
45
|
+
background-color: ${_menu.default[menuType].background};
|
|
46
|
+
`}};
|
|
47
|
+
|
|
48
|
+
${overrideColor && (0, _styledComponents.css)`
|
|
49
|
+
&&&& {
|
|
50
|
+
background-color: ${variant === "alternate" ? _menu.default[menuType].alternate : _menu.default[menuType].submenuItemBackground};
|
|
51
|
+
}
|
|
52
|
+
`}
|
|
44
53
|
|
|
45
54
|
${!inFullscreenView && (0, _styledComponents.css)`
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
a:focus,
|
|
61
|
-
button:focus {
|
|
62
|
-
box-shadow: inset 0 0 0 var(--borderWidth300)
|
|
63
|
-
var(--colorsSemanticFocus500);
|
|
64
|
-
background-color: ${_menu.default[menuType].background};
|
|
65
|
-
color: ${_menu.default[menuType].color};
|
|
66
|
-
z-index: 1;
|
|
67
|
-
position: relative;
|
|
68
|
-
}
|
|
55
|
+
max-width: inherit;
|
|
56
|
+
|
|
57
|
+
a,
|
|
58
|
+
button {
|
|
59
|
+
${maxWidth && (0, _styledComponents.css)`
|
|
60
|
+
box-sizing: border-box;
|
|
61
|
+
max-width: inherit;
|
|
62
|
+
text-overflow: ellipsis;
|
|
63
|
+
overflow: hidden;
|
|
64
|
+
white-space: nowrap;
|
|
65
|
+
vertical-align: bottom;
|
|
66
|
+
`}
|
|
67
|
+
}
|
|
69
68
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
a:focus,
|
|
70
|
+
button:focus {
|
|
71
|
+
box-shadow: inset 0 0 0 var(--borderWidth300)
|
|
72
|
+
var(--colorsSemanticFocus500);
|
|
73
|
+
background-color: ${_menu.default[menuType].background};
|
|
74
|
+
color: ${_menu.default[menuType].color};
|
|
75
|
+
z-index: 1;
|
|
76
|
+
position: relative;
|
|
77
|
+
}
|
|
74
78
|
|
|
75
|
-
|
|
79
|
+
a:hover,
|
|
80
|
+
button:hover {
|
|
81
|
+
background-color: var(--colorsComponentsMenuAutumnStandard600);
|
|
76
82
|
color: var(--colorsComponentsMenuYang100);
|
|
83
|
+
|
|
84
|
+
[data-component="icon"] {
|
|
85
|
+
color: var(--colorsComponentsMenuYang100);
|
|
86
|
+
}
|
|
77
87
|
}
|
|
78
|
-
}
|
|
79
|
-
`}
|
|
88
|
+
`}
|
|
80
89
|
|
|
81
90
|
a,
|
|
82
91
|
${_link.StyledLink} a,
|
|
@@ -109,159 +118,159 @@ const StyledMenuItemWrapper = _styledComponents.default.a`
|
|
|
109
118
|
}
|
|
110
119
|
|
|
111
120
|
${selected && (0, _styledComponents.css)`
|
|
112
|
-
background-color: ${_menu.default[menuType].selected};
|
|
113
|
-
|
|
114
|
-
a:focus,
|
|
115
|
-
button:focus {
|
|
116
121
|
background-color: ${_menu.default[menuType].selected};
|
|
117
|
-
}
|
|
118
122
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
123
|
+
a:focus,
|
|
124
|
+
button:focus {
|
|
125
|
+
background-color: ${_menu.default[menuType].selected};
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
a:hover,
|
|
129
|
+
button:hover {
|
|
130
|
+
background-color: var(--colorsComponentsMenuAutumnStandard600);
|
|
131
|
+
}
|
|
132
|
+
`}
|
|
124
133
|
|
|
125
134
|
${variant === "alternate" && !inFullscreenView && (0, _styledComponents.css)`
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
135
|
+
&&& {
|
|
136
|
+
background-color: ${_menu.default[menuType].alternate};
|
|
137
|
+
}
|
|
129
138
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
139
|
+
&&& a:focus,
|
|
140
|
+
&&& button:focus {
|
|
141
|
+
background-color: ${_menu.default[menuType].alternate};
|
|
142
|
+
}
|
|
134
143
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
144
|
+
&&& a:hover,
|
|
145
|
+
&&& button:hover {
|
|
146
|
+
background-color: ${_menu.default[menuType].alternateHover};
|
|
147
|
+
}
|
|
148
|
+
`}
|
|
140
149
|
|
|
141
150
|
${isOpen && (0, _styledComponents.css)`
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
151
|
+
a,
|
|
152
|
+
button {
|
|
153
|
+
background-color: ${_menu.default[menuType].submenuItemBackground};
|
|
154
|
+
color: ${_menu.default[menuType].color};
|
|
155
|
+
}
|
|
156
|
+
`}
|
|
148
157
|
|
|
149
158
|
${hasSubmenu && (0, _styledComponents.css)`
|
|
150
|
-
background-color: ${_menu.default[menuType].submenuBackground};
|
|
151
|
-
|
|
152
|
-
a:focus,
|
|
153
|
-
button:focus {
|
|
154
159
|
background-color: ${_menu.default[menuType].submenuBackground};
|
|
155
|
-
color: ${_menu.default[menuType].color};
|
|
156
160
|
|
|
157
|
-
|
|
161
|
+
a:focus,
|
|
162
|
+
button:focus {
|
|
163
|
+
background-color: ${_menu.default[menuType].submenuBackground};
|
|
158
164
|
color: ${_menu.default[menuType].color};
|
|
165
|
+
|
|
166
|
+
[data-component="icon"] {
|
|
167
|
+
color: ${_menu.default[menuType].color};
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
${clickToOpen && isOpen && (0, _styledComponents.css)`
|
|
171
|
+
background-color: ${_menu.default[menuType].submenuOpenedBackground};
|
|
172
|
+
`}
|
|
159
173
|
}
|
|
160
174
|
|
|
161
|
-
|
|
175
|
+
a:hover,
|
|
176
|
+
button:hover {
|
|
162
177
|
background-color: ${_menu.default[menuType].submenuOpenedBackground};
|
|
163
|
-
|
|
164
|
-
}
|
|
178
|
+
color: var(--colorsComponentsMenuYang100);
|
|
165
179
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
180
|
+
${!(href || clickToOpen) && (0, _styledComponents.css)`
|
|
181
|
+
cursor: default;
|
|
182
|
+
background-color: ${_menu.default[menuType].submenuItemBackground};
|
|
183
|
+
color: ${_menu.default[menuType].color};
|
|
184
|
+
`}
|
|
170
185
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
color: ${_menu.default[menuType].color};
|
|
175
|
-
`}
|
|
176
|
-
|
|
177
|
-
[data-component="icon"] {
|
|
178
|
-
color: ${_menu.default[menuType].color};
|
|
186
|
+
[data-component="icon"] {
|
|
187
|
+
color: ${_menu.default[menuType].color};
|
|
188
|
+
}
|
|
179
189
|
}
|
|
180
|
-
}
|
|
181
190
|
|
|
182
|
-
|
|
183
|
-
background-color: ${_menu.default[menuType].submenuSelected};
|
|
184
|
-
|
|
185
|
-
a:focus,
|
|
186
|
-
button:focus {
|
|
191
|
+
${selected && (0, _styledComponents.css)`
|
|
187
192
|
background-color: ${_menu.default[menuType].submenuSelected};
|
|
188
|
-
}
|
|
189
193
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
}
|
|
195
|
-
`}
|
|
194
|
+
a:focus,
|
|
195
|
+
button:focus {
|
|
196
|
+
background-color: ${_menu.default[menuType].submenuSelected};
|
|
197
|
+
}
|
|
196
198
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
199
|
+
a:hover,
|
|
200
|
+
button:hover {
|
|
201
|
+
background-color: var(--colorsComponentsMenuAutumnStandard600);
|
|
202
|
+
color: var(--colorsComponentsMenuYang100);
|
|
203
|
+
}
|
|
204
|
+
`}
|
|
202
205
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
206
|
+
${showDropdownArrow && (0, _styledComponents.css)`
|
|
207
|
+
> a,
|
|
208
|
+
> button {
|
|
209
|
+
padding-right: 32px;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
a::before,
|
|
213
|
+
button::before {
|
|
214
|
+
display: block;
|
|
215
|
+
margin-top: -2px;
|
|
216
|
+
pointer-events: none;
|
|
217
|
+
position: absolute;
|
|
218
|
+
right: 16px;
|
|
219
|
+
top: 50%;
|
|
220
|
+
z-index: 2;
|
|
221
|
+
content: "";
|
|
222
|
+
width: 0;
|
|
223
|
+
height: 0;
|
|
224
|
+
border-top: 5px solid ${_menu.default[menuType].text};
|
|
225
|
+
border-right: 4px solid transparent;
|
|
226
|
+
border-bottom: 4px solid transparent;
|
|
227
|
+
border-left: 4px solid transparent;
|
|
228
|
+
}
|
|
229
|
+
`}
|
|
230
|
+
`}
|
|
222
231
|
|
|
223
232
|
${isSearch && (0, _styledComponents.css)`
|
|
224
|
-
|
|
225
|
-
|
|
233
|
+
padding: 2px 16px;
|
|
234
|
+
`}
|
|
226
235
|
|
|
227
236
|
${inFullscreenView && (0, _styledComponents.css)`
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
237
|
+
${as === "div" && (0, _styledComponents.css)`
|
|
238
|
+
cursor: default;
|
|
239
|
+
padding: 0 16px;
|
|
231
240
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
241
|
+
:hover {
|
|
242
|
+
background: transparent;
|
|
243
|
+
}
|
|
244
|
+
`}
|
|
236
245
|
|
|
237
|
-
|
|
246
|
+
a,
|
|
238
247
|
${_link.StyledLink} a,
|
|
239
248
|
button,
|
|
240
249
|
${_link.StyledLink} button {
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
color: var(--colorsComponentsMenuYang100);
|
|
259
|
-
|
|
260
|
-
[data-component="icon"] {
|
|
250
|
+
width: 100vw;
|
|
251
|
+
box-sizing: border-box;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
a:focus,
|
|
255
|
+
button:focus {
|
|
256
|
+
box-shadow: inset 0 0 0 var(--borderWidth300)
|
|
257
|
+
var(--colorsSemanticFocus500);
|
|
258
|
+
z-index: 1;
|
|
259
|
+
position: relative;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
a:focus,
|
|
263
|
+
a:hover,
|
|
264
|
+
button:focus,
|
|
265
|
+
button:hover {
|
|
266
|
+
background-color: var(--colorsComponentsMenuAutumnStandard600);
|
|
261
267
|
color: var(--colorsComponentsMenuYang100);
|
|
268
|
+
|
|
269
|
+
[data-component="icon"] {
|
|
270
|
+
color: var(--colorsComponentsMenuYang100);
|
|
271
|
+
}
|
|
262
272
|
}
|
|
263
|
-
}
|
|
264
|
-
`}
|
|
273
|
+
`}
|
|
265
274
|
`}
|
|
266
275
|
`;
|
|
267
276
|
var _default = StyledMenuItemWrapper;
|
|
@@ -11,6 +11,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
|
|
12
12
|
var _menu = _interopRequireDefault(require("../menu.context"));
|
|
13
13
|
|
|
14
|
+
var _menuItem = _interopRequireDefault(require("../menu-item"));
|
|
15
|
+
|
|
14
16
|
var _submenu = _interopRequireDefault(require("../__internal__/submenu/submenu.context"));
|
|
15
17
|
|
|
16
18
|
var _scrollableBlock = _interopRequireDefault(require("./scrollable-block.style"));
|
|
@@ -29,6 +31,8 @@ const ScrollableBlock = ({
|
|
|
29
31
|
children,
|
|
30
32
|
height,
|
|
31
33
|
variant = "default",
|
|
34
|
+
parent,
|
|
35
|
+
parentVariant,
|
|
32
36
|
...rest
|
|
33
37
|
}) => {
|
|
34
38
|
const menuContext = (0, _react.useContext)(_menu.default);
|
|
@@ -47,14 +51,19 @@ const ScrollableBlock = ({
|
|
|
47
51
|
return /*#__PURE__*/_react.default.createElement(_scrollableBlock.default, _extends({
|
|
48
52
|
"data-component": "submenu-scrollable-block",
|
|
49
53
|
menuType: menuContext.menuType,
|
|
50
|
-
variant: variant
|
|
51
|
-
|
|
52
|
-
|
|
54
|
+
variant: variant
|
|
55
|
+
}, rest), parent && /*#__PURE__*/_react.default.createElement(_menuItem.default, {
|
|
56
|
+
overrideColor: true,
|
|
57
|
+
variant: parentVariant,
|
|
58
|
+
as: "div",
|
|
59
|
+
href: "#"
|
|
60
|
+
}, parent), /*#__PURE__*/_react.default.createElement(_box.default, {
|
|
53
61
|
overflowY: "scroll",
|
|
54
62
|
scrollVariant: scrollVariants[menuContext.menuType],
|
|
55
63
|
height: height,
|
|
56
64
|
p: 0,
|
|
57
|
-
|
|
65
|
+
as: "ul",
|
|
66
|
+
role: "list"
|
|
58
67
|
}, _react.default.Children.map(children, (child, index) => {
|
|
59
68
|
let isFocused = false;
|
|
60
69
|
const blockItemFocused = focusIndex >= blockIndex;
|
|
@@ -80,7 +89,15 @@ ScrollableBlock.propTypes = {
|
|
|
80
89
|
height: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
|
|
81
90
|
|
|
82
91
|
/** set the colour variant for a menuType */
|
|
83
|
-
variant: _propTypes.default.oneOf(["default", "alternate"])
|
|
92
|
+
variant: _propTypes.default.oneOf(["default", "alternate"]),
|
|
93
|
+
|
|
94
|
+
/** the element, if any, displayed at the top of the block to be its semantic "parent",
|
|
95
|
+
* but not part of the scrollable section
|
|
96
|
+
*/
|
|
97
|
+
parent: _propTypes.default.node,
|
|
98
|
+
|
|
99
|
+
/** the colour variant for the parent element, if different from the variant of the block */
|
|
100
|
+
parentVariant: _propTypes.default.oneOf(["default", "alternate"])
|
|
84
101
|
};
|
|
85
102
|
var _default = ScrollableBlock;
|
|
86
103
|
exports.default = _default;
|
|
@@ -7,6 +7,12 @@ export interface ScrollableBlockProps {
|
|
|
7
7
|
height?: string | number;
|
|
8
8
|
/** set the colour variant for a menuType */
|
|
9
9
|
variant?: "default" | "alternate";
|
|
10
|
+
/** the element, if any, displayed at the top of the block to be its semantic "parent",
|
|
11
|
+
* but not part of the scrollable section
|
|
12
|
+
*/
|
|
13
|
+
parent?: React.ReactElement;
|
|
14
|
+
/** the colour variant for the parent element, if different from the variant of the block */
|
|
15
|
+
parentVariant?: "default" | "alternate";
|
|
10
16
|
}
|
|
11
17
|
|
|
12
18
|
declare function ScrollableBlock(props: ScrollableBlockProps): JSX.Element;
|
|
@@ -17,7 +17,7 @@ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
19
|
|
|
20
|
-
const StyledScrollableBlock = _styledComponents.default.
|
|
20
|
+
const StyledScrollableBlock = _styledComponents.default.li`
|
|
21
21
|
${({
|
|
22
22
|
menuType,
|
|
23
23
|
variant
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export const StyledTabsHeaderWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export const StyledTabsHeaderList: import("styled-components").StyledComponent<"div", any, {
|
|
3
|
+
alternateStyling: any;
|
|
4
|
+
isInSidebar: any;
|
|
5
|
+
position: any;
|
|
6
|
+
}, never>;
|
package/package.json
CHANGED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
import { ValidationProps } from "../validations";
|
|
4
|
-
import { CommonHiddenCheckableInputProps } from "./hidden-checkable-input";
|
|
5
|
-
|
|
6
|
-
export interface CommonCheckableInputProps
|
|
7
|
-
extends ValidationProps,
|
|
8
|
-
CommonHiddenCheckableInputProps {
|
|
9
|
-
/** If true, the component will be disabled */
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
/** Help content to be displayed under an input */
|
|
12
|
-
fieldHelp?: React.ReactNode;
|
|
13
|
-
/**
|
|
14
|
-
* If true, the FieldHelp will be displayed inline
|
|
15
|
-
* To be used with labelInline prop set to true
|
|
16
|
-
*/
|
|
17
|
-
fieldHelpInline?: boolean;
|
|
18
|
-
/** Unique Identifier for the input. Will use a randomly generated GUID if none is provided */
|
|
19
|
-
id?: string;
|
|
20
|
-
/** Sets percentage-based input width */
|
|
21
|
-
inputWidth?: number | string;
|
|
22
|
-
/** Label content */
|
|
23
|
-
label?: React.ReactNode;
|
|
24
|
-
/** The content for the help tooltip, to appear next to the Label */
|
|
25
|
-
labelHelp?: string | React.ReactNode;
|
|
26
|
-
/** Spacing between label and a field for inline label, given number will be multiplied by base spacing unit (8) */
|
|
27
|
-
labelSpacing?: 1 | 2;
|
|
28
|
-
/** Label width */
|
|
29
|
-
labelWidth?: number;
|
|
30
|
-
/** Flag to configure component as mandatory */
|
|
31
|
-
required?: boolean;
|
|
32
|
-
/** If true the label switches position with the input */
|
|
33
|
-
reverse?: boolean;
|
|
34
|
-
/** Size of the component */
|
|
35
|
-
size?: "small" | "large";
|
|
36
|
-
/** The id of the element that labels the input */
|
|
37
|
-
ariaLabelledBy?: string;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export interface CheckableInputProps extends CommonCheckableInputProps {
|
|
41
|
-
/** Used to set the visible aspect of the input (i.e. the checkbox sprite, input slider etc) */
|
|
42
|
-
children?: React.ReactNode;
|
|
43
|
-
/** HTML type attribute of the input */
|
|
44
|
-
type: string;
|
|
45
|
-
/** Value passed to the input */
|
|
46
|
-
value?: string;
|
|
47
|
-
/** Text alignment of the label */
|
|
48
|
-
labelAlign?: "left" | "right";
|
|
49
|
-
/** When true label is inline */
|
|
50
|
-
labelInline?: boolean;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
declare function CheckableInput(props: CheckableInputProps): JSX.Element;
|
|
54
|
-
|
|
55
|
-
export default CheckableInput;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
export interface CommonHiddenCheckableInputProps
|
|
4
|
-
extends Omit<
|
|
5
|
-
React.InputHTMLAttributes<HTMLInputElement>,
|
|
6
|
-
"value" | "size" | "type"
|
|
7
|
-
> {
|
|
8
|
-
/** If true the Component will be focused when page load */
|
|
9
|
-
autoFocus?: boolean;
|
|
10
|
-
/** Checked state of the input */
|
|
11
|
-
checked?: boolean;
|
|
12
|
-
/** Input name */
|
|
13
|
-
name?: string;
|
|
14
|
-
/** OnChange event handler */
|
|
15
|
-
onChange?: (ev: React.ChangeEvent<HTMLInputElement>) => void;
|
|
16
|
-
/** OnFocus event handler */
|
|
17
|
-
onFocus?: (ev: React.FocusEvent<HTMLInputElement>) => void;
|
|
18
|
-
/** Blur event handler */
|
|
19
|
-
onBlur?: (ev: React.FocusEvent<HTMLInputElement>) => void;
|
|
20
|
-
/** OnMouseLeave event handler */
|
|
21
|
-
onMouseLeave?: (ev: React.MouseEvent<HTMLInputElement>) => void;
|
|
22
|
-
/** OnMouseEnter event handler */
|
|
23
|
-
onMouseEnter?: (ev: React.MouseEvent<HTMLInputElement>) => void;
|
|
24
|
-
/** Value of the input */
|
|
25
|
-
value?: string;
|
|
26
|
-
/** A callback to retrieve the input reference */
|
|
27
|
-
inputRef?: React.Ref<HTMLInputElement>;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export interface HiddenCheckableInputProps
|
|
31
|
-
extends CommonHiddenCheckableInputProps {
|
|
32
|
-
/** HTML type attribute of the input */
|
|
33
|
-
type: string;
|
|
34
|
-
/** Role attribute of the input */
|
|
35
|
-
role?: string;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
declare function HiddenCheckableInput(
|
|
39
|
-
props: HiddenCheckableInputProps
|
|
40
|
-
): JSX.Element;
|
|
41
|
-
|
|
42
|
-
export default HiddenCheckableInput;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
export interface DrawerSidebarContextProps {
|
|
4
|
-
isInSidebar: boolean;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export interface DrawerPropTypes {
|
|
8
|
-
/** Duration of a animation */
|
|
9
|
-
animationDuration?: string;
|
|
10
|
-
/** Sets color of sidebar's background */
|
|
11
|
-
backgroundColor?: string;
|
|
12
|
-
children: React.ReactNode;
|
|
13
|
-
/** Set the default state of expansion of the Drawer if component is meant to be used as uncontrolled */
|
|
14
|
-
defaultExpanded?: boolean;
|
|
15
|
-
/** Sets the expansion state of the Drawer if component is meant to be used as controlled */
|
|
16
|
-
expanded?: boolean;
|
|
17
|
-
/* The (% or px) width of the expanded sidebar */
|
|
18
|
-
expandedWidth?: string;
|
|
19
|
-
/** Sets custom height to Drawer component */
|
|
20
|
-
height?: string;
|
|
21
|
-
/** Callback fired when expansion state changes */
|
|
22
|
-
onChange?: (
|
|
23
|
-
e: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,
|
|
24
|
-
isExpanded: boolean
|
|
25
|
-
) => void;
|
|
26
|
-
/* Sidebar object either html or react component */
|
|
27
|
-
sidebar?: React.ReactNode;
|
|
28
|
-
/** Enables expand/collapse button that controls drawer */
|
|
29
|
-
showControls?: boolean;
|
|
30
|
-
/** Sets title heading of sidebar's content */
|
|
31
|
-
title?: string;
|
|
32
|
-
/** Content to display inside of a footer */
|
|
33
|
-
footer?: React.ReactNode;
|
|
34
|
-
/** Makes the header of the drawer sticky. Title prop must also be set. */
|
|
35
|
-
stickyHeader?: boolean;
|
|
36
|
-
/** Makes the footer of the drawer sticky. Footer prop must also be set. */
|
|
37
|
-
stickyFooter?: boolean;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
declare const DrawerSidebarContext: React.Context<DrawerSidebarContextProps>;
|
|
41
|
-
declare function Drawer(props: DrawerPropTypes): JSX.Element;
|
|
42
|
-
|
|
43
|
-
export { DrawerSidebarContext };
|
|
44
|
-
export default Drawer;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
import { ValidationProps } from "../validations";
|
|
4
|
-
import { CommonHiddenCheckableInputProps } from "./hidden-checkable-input";
|
|
5
|
-
|
|
6
|
-
export interface CommonCheckableInputProps
|
|
7
|
-
extends ValidationProps,
|
|
8
|
-
CommonHiddenCheckableInputProps {
|
|
9
|
-
/** If true, the component will be disabled */
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
/** Help content to be displayed under an input */
|
|
12
|
-
fieldHelp?: React.ReactNode;
|
|
13
|
-
/**
|
|
14
|
-
* If true, the FieldHelp will be displayed inline
|
|
15
|
-
* To be used with labelInline prop set to true
|
|
16
|
-
*/
|
|
17
|
-
fieldHelpInline?: boolean;
|
|
18
|
-
/** Unique Identifier for the input. Will use a randomly generated GUID if none is provided */
|
|
19
|
-
id?: string;
|
|
20
|
-
/** Sets percentage-based input width */
|
|
21
|
-
inputWidth?: number | string;
|
|
22
|
-
/** Label content */
|
|
23
|
-
label?: React.ReactNode;
|
|
24
|
-
/** The content for the help tooltip, to appear next to the Label */
|
|
25
|
-
labelHelp?: string | React.ReactNode;
|
|
26
|
-
/** Spacing between label and a field for inline label, given number will be multiplied by base spacing unit (8) */
|
|
27
|
-
labelSpacing?: 1 | 2;
|
|
28
|
-
/** Label width */
|
|
29
|
-
labelWidth?: number;
|
|
30
|
-
/** Flag to configure component as mandatory */
|
|
31
|
-
required?: boolean;
|
|
32
|
-
/** If true the label switches position with the input */
|
|
33
|
-
reverse?: boolean;
|
|
34
|
-
/** Size of the component */
|
|
35
|
-
size?: "small" | "large";
|
|
36
|
-
/** The id of the element that labels the input */
|
|
37
|
-
ariaLabelledBy?: string;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export interface CheckableInputProps extends CommonCheckableInputProps {
|
|
41
|
-
/** Used to set the visible aspect of the input (i.e. the checkbox sprite, input slider etc) */
|
|
42
|
-
children?: React.ReactNode;
|
|
43
|
-
/** HTML type attribute of the input */
|
|
44
|
-
type: string;
|
|
45
|
-
/** Value passed to the input */
|
|
46
|
-
value?: string;
|
|
47
|
-
/** Text alignment of the label */
|
|
48
|
-
labelAlign?: "left" | "right";
|
|
49
|
-
/** When true label is inline */
|
|
50
|
-
labelInline?: boolean;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
declare function CheckableInput(props: CheckableInputProps): JSX.Element;
|
|
54
|
-
|
|
55
|
-
export default CheckableInput;
|