@canonical/react-components 0.47.0 → 0.47.2
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/dist/__mocks__/nanoid.js +3 -3
- package/dist/components/Accordion/Accordion.js +28 -41
- package/dist/components/Accordion/AccordionSection/AccordionSection.js +18 -18
- package/dist/components/Accordion/AccordionSection/index.js +1 -1
- package/dist/components/Accordion/index.js +1 -1
- package/dist/components/ActionButton/ActionButton.js +34 -66
- package/dist/components/ActionButton/index.js +1 -1
- package/dist/components/ArticlePagination/ArticlePagination.js +10 -12
- package/dist/components/ArticlePagination/index.js +1 -1
- package/dist/components/Badge/Badge.js +24 -29
- package/dist/components/Badge/index.js +1 -1
- package/dist/components/Button/Button.js +21 -26
- package/dist/components/Button/index.js +4 -5
- package/dist/components/Card/Card.js +12 -14
- package/dist/components/Card/index.js +1 -1
- package/dist/components/CheckboxInput/CheckableInput/CheckableInput.js +15 -19
- package/dist/components/CheckboxInput/CheckableInput/index.js +1 -1
- package/dist/components/CheckboxInput/CheckboxInput.js +7 -10
- package/dist/components/CheckboxInput/index.js +1 -1
- package/dist/components/Chip/Chip.js +23 -33
- package/dist/components/Chip/index.js +1 -1
- package/dist/components/Code/Code.js +14 -17
- package/dist/components/Code/index.js +1 -1
- package/dist/components/CodeSnippet/CodeSnippet.js +9 -14
- package/dist/components/CodeSnippet/CodeSnippetBlock.js +24 -29
- package/dist/components/CodeSnippet/CodeSnippetDropdown.js +11 -11
- package/dist/components/CodeSnippet/index.js +2 -2
- package/dist/components/Col/Col.js +24 -26
- package/dist/components/Col/index.js +4 -5
- package/dist/components/ConfirmationButton/ConfirmationButton.js +18 -21
- package/dist/components/ConfirmationButton/index.js +1 -1
- package/dist/components/ConfirmationModal/ConfirmationModal.js +11 -15
- package/dist/components/ConfirmationModal/index.js +1 -1
- package/dist/components/ContextualMenu/ContextualMenu.js +89 -107
- package/dist/components/ContextualMenu/ContextualMenuDropdown/ContextualMenuDropdown.d.ts +4 -4
- package/dist/components/ContextualMenu/ContextualMenuDropdown/ContextualMenuDropdown.js +97 -107
- package/dist/components/ContextualMenu/ContextualMenuDropdown/index.js +1 -1
- package/dist/components/ContextualMenu/index.js +1 -1
- package/dist/components/EmptyState/EmptyState.js +9 -11
- package/dist/components/EmptyState/index.js +1 -1
- package/dist/components/Field/Field.js +66 -65
- package/dist/components/Field/index.js +1 -1
- package/dist/components/Form/Form.js +9 -11
- package/dist/components/Form/index.js +1 -1
- package/dist/components/Icon/Icon.js +9 -12
- package/dist/components/Icon/index.js +4 -5
- package/dist/components/Input/Input.js +38 -45
- package/dist/components/Input/index.js +1 -1
- package/dist/components/Label/Label.js +9 -11
- package/dist/components/Label/index.js +1 -1
- package/dist/components/Link/Link.js +12 -18
- package/dist/components/Link/index.js +1 -1
- package/dist/components/List/List.js +50 -54
- package/dist/components/List/index.js +1 -1
- package/dist/components/Loader/Loader.js +2 -3
- package/dist/components/Loader/index.js +1 -1
- package/dist/components/MainTable/MainTable.js +87 -104
- package/dist/components/MainTable/index.js +1 -1
- package/dist/components/Modal/Modal.js +45 -40
- package/dist/components/Modal/index.js +1 -1
- package/dist/components/ModularTable/ModularTable.js +63 -77
- package/dist/components/ModularTable/index.js +1 -1
- package/dist/components/Navigation/Navigation.js +63 -97
- package/dist/components/Navigation/NavigationLink/NavigationLink.js +32 -35
- package/dist/components/Navigation/NavigationLink/index.js +1 -1
- package/dist/components/Navigation/NavigationMenu/NavigationMenu.js +26 -45
- package/dist/components/Navigation/NavigationMenu/index.js +1 -1
- package/dist/components/Navigation/index.js +1 -1
- package/dist/components/Notification/Notification.js +49 -59
- package/dist/components/Notification/index.js +4 -5
- package/dist/components/NotificationProvider/NotificationProvider.js +47 -68
- package/dist/components/NotificationProvider/index.js +7 -7
- package/dist/components/NotificationProvider/messageBuilder.js +9 -9
- package/dist/components/NotificationProvider/types.d.ts +1 -0
- package/dist/components/Pagination/Pagination.js +55 -74
- package/dist/components/Pagination/PaginationButton/PaginationButton.js +11 -12
- package/dist/components/Pagination/PaginationButton/index.js +1 -1
- package/dist/components/Pagination/PaginationItem/PaginationItem.js +7 -7
- package/dist/components/Pagination/PaginationItem/index.js +1 -1
- package/dist/components/Pagination/index.js +1 -1
- package/dist/components/PasswordToggle/PasswordToggle.d.ts +1 -1
- package/dist/components/PasswordToggle/PasswordToggle.js +25 -40
- package/dist/components/PasswordToggle/index.js +1 -1
- package/dist/components/RadioInput/RadioInput.js +6 -8
- package/dist/components/RadioInput/index.js +1 -1
- package/dist/components/Row/Row.js +7 -9
- package/dist/components/Row/index.js +1 -1
- package/dist/components/SearchAndFilter/FilterPanelSection/FilterPanelSection.js +38 -51
- package/dist/components/SearchAndFilter/FilterPanelSection/index.js +1 -1
- package/dist/components/SearchAndFilter/SearchAndFilter.js +75 -135
- package/dist/components/SearchAndFilter/index.js +1 -1
- package/dist/components/SearchAndFilter/utils.js +4 -8
- package/dist/components/SearchBox/SearchBox.js +25 -33
- package/dist/components/SearchBox/index.js +1 -1
- package/dist/components/Select/Select.js +38 -44
- package/dist/components/Select/index.js +1 -1
- package/dist/components/Slider/Slider.js +27 -35
- package/dist/components/Slider/index.js +1 -1
- package/dist/components/Spinner/Spinner.js +10 -15
- package/dist/components/Spinner/index.js +1 -1
- package/dist/components/StatusLabel/StatusLabel.js +11 -13
- package/dist/components/StatusLabel/index.js +4 -5
- package/dist/components/Strip/Strip.js +27 -34
- package/dist/components/Strip/index.js +1 -1
- package/dist/components/SummaryButton/SummaryButton.js +9 -8
- package/dist/components/SummaryButton/index.js +1 -1
- package/dist/components/Switch/Switch.js +7 -10
- package/dist/components/Switch/index.js +1 -1
- package/dist/components/Table/Table.js +9 -13
- package/dist/components/Table/index.js +1 -1
- package/dist/components/TableCell/TableCell.js +11 -17
- package/dist/components/TableCell/index.js +1 -1
- package/dist/components/TableHeader/TableHeader.js +7 -9
- package/dist/components/TableHeader/index.js +1 -1
- package/dist/components/TablePagination/TablePagination.d.ts +37 -0
- package/dist/components/TablePagination/TablePagination.js +125 -0
- package/dist/components/TablePagination/TablePagination.scss +40 -0
- package/dist/components/TablePagination/TablePaginationControls/TablePaginationControls.d.ts +16 -0
- package/dist/components/TablePagination/TablePaginationControls/TablePaginationControls.js +66 -0
- package/dist/components/TablePagination/TablePaginationControls/index.d.ts +2 -0
- package/dist/components/TablePagination/TablePaginationControls/index.js +13 -0
- package/dist/components/TablePagination/index.d.ts +2 -0
- package/dist/components/TablePagination/index.js +13 -0
- package/dist/components/TableRow/TableRow.js +6 -8
- package/dist/components/TableRow/index.js +1 -1
- package/dist/components/Tabs/Tabs.js +17 -17
- package/dist/components/Tabs/index.js +1 -1
- package/dist/components/Textarea/Textarea.js +51 -45
- package/dist/components/Textarea/index.js +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +5 -1
- package/dist/components/Tooltip/Tooltip.js +76 -79
- package/dist/components/Tooltip/index.js +4 -5
- package/dist/enums.js +2 -3
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.js +16 -10
- package/dist/hooks/useId.js +1 -3
- package/dist/hooks/useListener.d.ts +2 -1
- package/dist/hooks/useListener.js +25 -24
- package/dist/hooks/useOnClickOutside.d.ts +12 -0
- package/dist/hooks/useOnClickOutside.js +45 -0
- package/dist/hooks/useOnEscapePressed.d.ts +3 -1
- package/dist/hooks/useOnEscapePressed.js +13 -6
- package/dist/hooks/usePagination.js +17 -29
- package/dist/hooks/usePrevious.js +4 -4
- package/dist/hooks/useThrottle.js +16 -25
- package/dist/hooks/useWindowFitment.js +30 -28
- package/dist/index.d.ts +3 -1
- package/dist/index.js +86 -74
- package/dist/utils.js +6 -13
- package/package.json +56 -49
- package/dist/hooks/useClickOutside.d.ts +0 -6
- package/dist/hooks/useClickOutside.js +0 -32
package/dist/index.js
CHANGED
|
@@ -1,432 +1,443 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
Object.defineProperty(exports, "Accordion", {
|
|
8
7
|
enumerable: true,
|
|
9
|
-
get: function
|
|
8
|
+
get: function () {
|
|
10
9
|
return _Accordion.default;
|
|
11
10
|
}
|
|
12
11
|
});
|
|
13
12
|
Object.defineProperty(exports, "ActionButton", {
|
|
14
13
|
enumerable: true,
|
|
15
|
-
get: function
|
|
14
|
+
get: function () {
|
|
16
15
|
return _ActionButton.default;
|
|
17
16
|
}
|
|
18
17
|
});
|
|
19
18
|
Object.defineProperty(exports, "ArticlePagination", {
|
|
20
19
|
enumerable: true,
|
|
21
|
-
get: function
|
|
20
|
+
get: function () {
|
|
22
21
|
return _ArticlePagination.default;
|
|
23
22
|
}
|
|
24
23
|
});
|
|
25
24
|
Object.defineProperty(exports, "Badge", {
|
|
26
25
|
enumerable: true,
|
|
27
|
-
get: function
|
|
26
|
+
get: function () {
|
|
28
27
|
return _Badge.default;
|
|
29
28
|
}
|
|
30
29
|
});
|
|
31
30
|
Object.defineProperty(exports, "Button", {
|
|
32
31
|
enumerable: true,
|
|
33
|
-
get: function
|
|
32
|
+
get: function () {
|
|
34
33
|
return _Button.default;
|
|
35
34
|
}
|
|
36
35
|
});
|
|
37
36
|
Object.defineProperty(exports, "ButtonAppearance", {
|
|
38
37
|
enumerable: true,
|
|
39
|
-
get: function
|
|
38
|
+
get: function () {
|
|
40
39
|
return _Button.ButtonAppearance;
|
|
41
40
|
}
|
|
42
41
|
});
|
|
43
42
|
Object.defineProperty(exports, "Card", {
|
|
44
43
|
enumerable: true,
|
|
45
|
-
get: function
|
|
44
|
+
get: function () {
|
|
46
45
|
return _Card.default;
|
|
47
46
|
}
|
|
48
47
|
});
|
|
49
48
|
Object.defineProperty(exports, "CheckboxInput", {
|
|
50
49
|
enumerable: true,
|
|
51
|
-
get: function
|
|
50
|
+
get: function () {
|
|
52
51
|
return _CheckboxInput.default;
|
|
53
52
|
}
|
|
54
53
|
});
|
|
55
54
|
Object.defineProperty(exports, "Chip", {
|
|
56
55
|
enumerable: true,
|
|
57
|
-
get: function
|
|
56
|
+
get: function () {
|
|
58
57
|
return _Chip.default;
|
|
59
58
|
}
|
|
60
59
|
});
|
|
61
60
|
Object.defineProperty(exports, "Code", {
|
|
62
61
|
enumerable: true,
|
|
63
|
-
get: function
|
|
62
|
+
get: function () {
|
|
64
63
|
return _Code.default;
|
|
65
64
|
}
|
|
66
65
|
});
|
|
67
66
|
Object.defineProperty(exports, "CodeSnippet", {
|
|
68
67
|
enumerable: true,
|
|
69
|
-
get: function
|
|
68
|
+
get: function () {
|
|
70
69
|
return _CodeSnippet.default;
|
|
71
70
|
}
|
|
72
71
|
});
|
|
73
72
|
Object.defineProperty(exports, "CodeSnippetBlockAppearance", {
|
|
74
73
|
enumerable: true,
|
|
75
|
-
get: function
|
|
74
|
+
get: function () {
|
|
76
75
|
return _CodeSnippet.CodeSnippetBlockAppearance;
|
|
77
76
|
}
|
|
78
77
|
});
|
|
79
78
|
Object.defineProperty(exports, "Col", {
|
|
80
79
|
enumerable: true,
|
|
81
|
-
get: function
|
|
80
|
+
get: function () {
|
|
82
81
|
return _Col.default;
|
|
83
82
|
}
|
|
84
83
|
});
|
|
85
84
|
Object.defineProperty(exports, "ConfirmationButton", {
|
|
86
85
|
enumerable: true,
|
|
87
|
-
get: function
|
|
86
|
+
get: function () {
|
|
88
87
|
return _ConfirmationButton.default;
|
|
89
88
|
}
|
|
90
89
|
});
|
|
91
90
|
Object.defineProperty(exports, "ConfirmationModal", {
|
|
92
91
|
enumerable: true,
|
|
93
|
-
get: function
|
|
92
|
+
get: function () {
|
|
94
93
|
return _ConfirmationModal.default;
|
|
95
94
|
}
|
|
96
95
|
});
|
|
97
96
|
Object.defineProperty(exports, "ContextualMenu", {
|
|
98
97
|
enumerable: true,
|
|
99
|
-
get: function
|
|
98
|
+
get: function () {
|
|
100
99
|
return _ContextualMenu.default;
|
|
101
100
|
}
|
|
102
101
|
});
|
|
103
102
|
Object.defineProperty(exports, "EmptyState", {
|
|
104
103
|
enumerable: true,
|
|
105
|
-
get: function
|
|
104
|
+
get: function () {
|
|
106
105
|
return _EmptyState.default;
|
|
107
106
|
}
|
|
108
107
|
});
|
|
109
108
|
Object.defineProperty(exports, "Field", {
|
|
110
109
|
enumerable: true,
|
|
111
|
-
get: function
|
|
110
|
+
get: function () {
|
|
112
111
|
return _Field.default;
|
|
113
112
|
}
|
|
114
113
|
});
|
|
115
114
|
Object.defineProperty(exports, "Form", {
|
|
116
115
|
enumerable: true,
|
|
117
|
-
get: function
|
|
116
|
+
get: function () {
|
|
118
117
|
return _Form.default;
|
|
119
118
|
}
|
|
120
119
|
});
|
|
121
120
|
Object.defineProperty(exports, "ICONS", {
|
|
122
121
|
enumerable: true,
|
|
123
|
-
get: function
|
|
122
|
+
get: function () {
|
|
124
123
|
return _Icon.ICONS;
|
|
125
124
|
}
|
|
126
125
|
});
|
|
127
126
|
Object.defineProperty(exports, "Icon", {
|
|
128
127
|
enumerable: true,
|
|
129
|
-
get: function
|
|
128
|
+
get: function () {
|
|
130
129
|
return _Icon.default;
|
|
131
130
|
}
|
|
132
131
|
});
|
|
133
132
|
Object.defineProperty(exports, "Input", {
|
|
134
133
|
enumerable: true,
|
|
135
|
-
get: function
|
|
134
|
+
get: function () {
|
|
136
135
|
return _Input.default;
|
|
137
136
|
}
|
|
138
137
|
});
|
|
139
138
|
Object.defineProperty(exports, "Label", {
|
|
140
139
|
enumerable: true,
|
|
141
|
-
get: function
|
|
140
|
+
get: function () {
|
|
142
141
|
return _Label.default;
|
|
143
142
|
}
|
|
144
143
|
});
|
|
145
144
|
Object.defineProperty(exports, "Link", {
|
|
146
145
|
enumerable: true,
|
|
147
|
-
get: function
|
|
146
|
+
get: function () {
|
|
148
147
|
return _Link.default;
|
|
149
148
|
}
|
|
150
149
|
});
|
|
151
150
|
Object.defineProperty(exports, "List", {
|
|
152
151
|
enumerable: true,
|
|
153
|
-
get: function
|
|
152
|
+
get: function () {
|
|
154
153
|
return _List.default;
|
|
155
154
|
}
|
|
156
155
|
});
|
|
157
156
|
Object.defineProperty(exports, "Loader", {
|
|
158
157
|
enumerable: true,
|
|
159
|
-
get: function
|
|
158
|
+
get: function () {
|
|
160
159
|
return _Loader.default;
|
|
161
160
|
}
|
|
162
161
|
});
|
|
163
162
|
Object.defineProperty(exports, "MainTable", {
|
|
164
163
|
enumerable: true,
|
|
165
|
-
get: function
|
|
164
|
+
get: function () {
|
|
166
165
|
return _MainTable.default;
|
|
167
166
|
}
|
|
168
167
|
});
|
|
169
168
|
Object.defineProperty(exports, "Modal", {
|
|
170
169
|
enumerable: true,
|
|
171
|
-
get: function
|
|
170
|
+
get: function () {
|
|
172
171
|
return _Modal.default;
|
|
173
172
|
}
|
|
174
173
|
});
|
|
175
174
|
Object.defineProperty(exports, "ModularTable", {
|
|
176
175
|
enumerable: true,
|
|
177
|
-
get: function
|
|
176
|
+
get: function () {
|
|
178
177
|
return _ModularTable.default;
|
|
179
178
|
}
|
|
180
179
|
});
|
|
181
180
|
Object.defineProperty(exports, "Navigation", {
|
|
182
181
|
enumerable: true,
|
|
183
|
-
get: function
|
|
182
|
+
get: function () {
|
|
184
183
|
return _Navigation.default;
|
|
185
184
|
}
|
|
186
185
|
});
|
|
187
186
|
Object.defineProperty(exports, "Notification", {
|
|
188
187
|
enumerable: true,
|
|
189
|
-
get: function
|
|
188
|
+
get: function () {
|
|
190
189
|
return _Notification.default;
|
|
191
190
|
}
|
|
192
191
|
});
|
|
193
192
|
Object.defineProperty(exports, "NotificationConsumer", {
|
|
194
193
|
enumerable: true,
|
|
195
|
-
get: function
|
|
194
|
+
get: function () {
|
|
196
195
|
return _NotificationProvider.NotificationConsumer;
|
|
197
196
|
}
|
|
198
197
|
});
|
|
199
198
|
Object.defineProperty(exports, "NotificationProvider", {
|
|
200
199
|
enumerable: true,
|
|
201
|
-
get: function
|
|
200
|
+
get: function () {
|
|
202
201
|
return _NotificationProvider.NotificationProvider;
|
|
203
202
|
}
|
|
204
203
|
});
|
|
205
204
|
Object.defineProperty(exports, "NotificationSeverity", {
|
|
206
205
|
enumerable: true,
|
|
207
|
-
get: function
|
|
206
|
+
get: function () {
|
|
208
207
|
return _Notification.NotificationSeverity;
|
|
209
208
|
}
|
|
210
209
|
});
|
|
211
210
|
Object.defineProperty(exports, "Pagination", {
|
|
212
211
|
enumerable: true,
|
|
213
|
-
get: function
|
|
212
|
+
get: function () {
|
|
214
213
|
return _Pagination.default;
|
|
215
214
|
}
|
|
216
215
|
});
|
|
217
216
|
Object.defineProperty(exports, "PasswordToggle", {
|
|
218
217
|
enumerable: true,
|
|
219
|
-
get: function
|
|
218
|
+
get: function () {
|
|
220
219
|
return _PasswordToggle.default;
|
|
221
220
|
}
|
|
222
221
|
});
|
|
223
222
|
Object.defineProperty(exports, "RadioInput", {
|
|
224
223
|
enumerable: true,
|
|
225
|
-
get: function
|
|
224
|
+
get: function () {
|
|
226
225
|
return _RadioInput.default;
|
|
227
226
|
}
|
|
228
227
|
});
|
|
229
228
|
Object.defineProperty(exports, "Row", {
|
|
230
229
|
enumerable: true,
|
|
231
|
-
get: function
|
|
230
|
+
get: function () {
|
|
232
231
|
return _Row.default;
|
|
233
232
|
}
|
|
234
233
|
});
|
|
235
234
|
Object.defineProperty(exports, "SearchAndFilter", {
|
|
236
235
|
enumerable: true,
|
|
237
|
-
get: function
|
|
236
|
+
get: function () {
|
|
238
237
|
return _SearchAndFilter.default;
|
|
239
238
|
}
|
|
240
239
|
});
|
|
241
240
|
Object.defineProperty(exports, "SearchBox", {
|
|
242
241
|
enumerable: true,
|
|
243
|
-
get: function
|
|
242
|
+
get: function () {
|
|
244
243
|
return _SearchBox.default;
|
|
245
244
|
}
|
|
246
245
|
});
|
|
247
246
|
Object.defineProperty(exports, "Select", {
|
|
248
247
|
enumerable: true,
|
|
249
|
-
get: function
|
|
248
|
+
get: function () {
|
|
250
249
|
return _Select.default;
|
|
251
250
|
}
|
|
252
251
|
});
|
|
253
252
|
Object.defineProperty(exports, "Slider", {
|
|
254
253
|
enumerable: true,
|
|
255
|
-
get: function
|
|
254
|
+
get: function () {
|
|
256
255
|
return _Slider.default;
|
|
257
256
|
}
|
|
258
257
|
});
|
|
259
258
|
Object.defineProperty(exports, "Spinner", {
|
|
260
259
|
enumerable: true,
|
|
261
|
-
get: function
|
|
260
|
+
get: function () {
|
|
262
261
|
return _Spinner.default;
|
|
263
262
|
}
|
|
264
263
|
});
|
|
265
264
|
Object.defineProperty(exports, "StatusLabel", {
|
|
266
265
|
enumerable: true,
|
|
267
|
-
get: function
|
|
266
|
+
get: function () {
|
|
268
267
|
return _StatusLabel.default;
|
|
269
268
|
}
|
|
270
269
|
});
|
|
271
270
|
Object.defineProperty(exports, "StatusLabelAppearance", {
|
|
272
271
|
enumerable: true,
|
|
273
|
-
get: function
|
|
272
|
+
get: function () {
|
|
274
273
|
return _StatusLabel.StatusLabelAppearance;
|
|
275
274
|
}
|
|
276
275
|
});
|
|
277
276
|
Object.defineProperty(exports, "Strip", {
|
|
278
277
|
enumerable: true,
|
|
279
|
-
get: function
|
|
278
|
+
get: function () {
|
|
280
279
|
return _Strip.default;
|
|
281
280
|
}
|
|
282
281
|
});
|
|
283
282
|
Object.defineProperty(exports, "SummaryButton", {
|
|
284
283
|
enumerable: true,
|
|
285
|
-
get: function
|
|
284
|
+
get: function () {
|
|
286
285
|
return _SummaryButton.default;
|
|
287
286
|
}
|
|
288
287
|
});
|
|
289
288
|
Object.defineProperty(exports, "Switch", {
|
|
290
289
|
enumerable: true,
|
|
291
|
-
get: function
|
|
290
|
+
get: function () {
|
|
292
291
|
return _Switch.default;
|
|
293
292
|
}
|
|
294
293
|
});
|
|
295
294
|
Object.defineProperty(exports, "Table", {
|
|
296
295
|
enumerable: true,
|
|
297
|
-
get: function
|
|
296
|
+
get: function () {
|
|
298
297
|
return _Table.default;
|
|
299
298
|
}
|
|
300
299
|
});
|
|
301
300
|
Object.defineProperty(exports, "TableCell", {
|
|
302
301
|
enumerable: true,
|
|
303
|
-
get: function
|
|
302
|
+
get: function () {
|
|
304
303
|
return _TableCell.default;
|
|
305
304
|
}
|
|
306
305
|
});
|
|
307
306
|
Object.defineProperty(exports, "TableHeader", {
|
|
308
307
|
enumerable: true,
|
|
309
|
-
get: function
|
|
308
|
+
get: function () {
|
|
310
309
|
return _TableHeader.default;
|
|
311
310
|
}
|
|
312
311
|
});
|
|
312
|
+
Object.defineProperty(exports, "TablePagination", {
|
|
313
|
+
enumerable: true,
|
|
314
|
+
get: function () {
|
|
315
|
+
return _TablePagination.default;
|
|
316
|
+
}
|
|
317
|
+
});
|
|
313
318
|
Object.defineProperty(exports, "TableRow", {
|
|
314
319
|
enumerable: true,
|
|
315
|
-
get: function
|
|
320
|
+
get: function () {
|
|
316
321
|
return _TableRow.default;
|
|
317
322
|
}
|
|
318
323
|
});
|
|
319
324
|
Object.defineProperty(exports, "Tabs", {
|
|
320
325
|
enumerable: true,
|
|
321
|
-
get: function
|
|
326
|
+
get: function () {
|
|
322
327
|
return _Tabs.default;
|
|
323
328
|
}
|
|
324
329
|
});
|
|
325
330
|
Object.defineProperty(exports, "Textarea", {
|
|
326
331
|
enumerable: true,
|
|
327
|
-
get: function
|
|
332
|
+
get: function () {
|
|
328
333
|
return _Textarea.default;
|
|
329
334
|
}
|
|
330
335
|
});
|
|
331
336
|
Object.defineProperty(exports, "Theme", {
|
|
332
337
|
enumerable: true,
|
|
333
|
-
get: function
|
|
338
|
+
get: function () {
|
|
334
339
|
return _enums.Theme;
|
|
335
340
|
}
|
|
336
341
|
});
|
|
337
342
|
Object.defineProperty(exports, "Tooltip", {
|
|
338
343
|
enumerable: true,
|
|
339
|
-
get: function
|
|
344
|
+
get: function () {
|
|
340
345
|
return _Tooltip.default;
|
|
341
346
|
}
|
|
342
347
|
});
|
|
343
348
|
Object.defineProperty(exports, "failure", {
|
|
344
349
|
enumerable: true,
|
|
345
|
-
get: function
|
|
350
|
+
get: function () {
|
|
346
351
|
return _NotificationProvider.failure;
|
|
347
352
|
}
|
|
348
353
|
});
|
|
349
354
|
Object.defineProperty(exports, "info", {
|
|
350
355
|
enumerable: true,
|
|
351
|
-
get: function
|
|
356
|
+
get: function () {
|
|
352
357
|
return _NotificationProvider.info;
|
|
353
358
|
}
|
|
354
359
|
});
|
|
355
360
|
Object.defineProperty(exports, "isNavigationAnchor", {
|
|
356
361
|
enumerable: true,
|
|
357
|
-
get: function
|
|
362
|
+
get: function () {
|
|
358
363
|
return _utils.isNavigationAnchor;
|
|
359
364
|
}
|
|
360
365
|
});
|
|
361
366
|
Object.defineProperty(exports, "isNavigationButton", {
|
|
362
367
|
enumerable: true,
|
|
363
|
-
get: function
|
|
368
|
+
get: function () {
|
|
364
369
|
return _utils.isNavigationButton;
|
|
365
370
|
}
|
|
366
371
|
});
|
|
367
372
|
Object.defineProperty(exports, "queue", {
|
|
368
373
|
enumerable: true,
|
|
369
|
-
get: function
|
|
374
|
+
get: function () {
|
|
370
375
|
return _NotificationProvider.queue;
|
|
371
376
|
}
|
|
372
377
|
});
|
|
373
378
|
Object.defineProperty(exports, "success", {
|
|
374
379
|
enumerable: true,
|
|
375
|
-
get: function
|
|
380
|
+
get: function () {
|
|
376
381
|
return _NotificationProvider.success;
|
|
377
382
|
}
|
|
378
383
|
});
|
|
379
384
|
Object.defineProperty(exports, "useClickOutside", {
|
|
380
385
|
enumerable: true,
|
|
381
|
-
get: function
|
|
386
|
+
get: function () {
|
|
382
387
|
return _hooks.useClickOutside;
|
|
383
388
|
}
|
|
384
389
|
});
|
|
385
390
|
Object.defineProperty(exports, "useId", {
|
|
386
391
|
enumerable: true,
|
|
387
|
-
get: function
|
|
392
|
+
get: function () {
|
|
388
393
|
return _hooks.useId;
|
|
389
394
|
}
|
|
390
395
|
});
|
|
391
396
|
Object.defineProperty(exports, "useListener", {
|
|
392
397
|
enumerable: true,
|
|
393
|
-
get: function
|
|
398
|
+
get: function () {
|
|
394
399
|
return _hooks.useListener;
|
|
395
400
|
}
|
|
396
401
|
});
|
|
397
402
|
Object.defineProperty(exports, "useNotify", {
|
|
398
403
|
enumerable: true,
|
|
399
|
-
get: function
|
|
404
|
+
get: function () {
|
|
400
405
|
return _NotificationProvider.useNotify;
|
|
401
406
|
}
|
|
402
407
|
});
|
|
408
|
+
Object.defineProperty(exports, "useOnClickOutside", {
|
|
409
|
+
enumerable: true,
|
|
410
|
+
get: function () {
|
|
411
|
+
return _hooks.useOnClickOutside;
|
|
412
|
+
}
|
|
413
|
+
});
|
|
403
414
|
Object.defineProperty(exports, "useOnEscapePressed", {
|
|
404
415
|
enumerable: true,
|
|
405
|
-
get: function
|
|
416
|
+
get: function () {
|
|
406
417
|
return _hooks.useOnEscapePressed;
|
|
407
418
|
}
|
|
408
419
|
});
|
|
409
420
|
Object.defineProperty(exports, "usePagination", {
|
|
410
421
|
enumerable: true,
|
|
411
|
-
get: function
|
|
422
|
+
get: function () {
|
|
412
423
|
return _hooks.usePagination;
|
|
413
424
|
}
|
|
414
425
|
});
|
|
415
426
|
Object.defineProperty(exports, "usePrevious", {
|
|
416
427
|
enumerable: true,
|
|
417
|
-
get: function
|
|
428
|
+
get: function () {
|
|
418
429
|
return _hooks.usePrevious;
|
|
419
430
|
}
|
|
420
431
|
});
|
|
421
432
|
Object.defineProperty(exports, "useThrottle", {
|
|
422
433
|
enumerable: true,
|
|
423
|
-
get: function
|
|
434
|
+
get: function () {
|
|
424
435
|
return _hooks.useThrottle;
|
|
425
436
|
}
|
|
426
437
|
});
|
|
427
438
|
Object.defineProperty(exports, "useWindowFitment", {
|
|
428
439
|
enumerable: true,
|
|
429
|
-
get: function
|
|
440
|
+
get: function () {
|
|
430
441
|
return _hooks.useWindowFitment;
|
|
431
442
|
}
|
|
432
443
|
});
|
|
@@ -479,9 +490,10 @@ var _TableRow = _interopRequireDefault(require("./components/TableRow"));
|
|
|
479
490
|
var _Tabs = _interopRequireDefault(require("./components/Tabs"));
|
|
480
491
|
var _Textarea = _interopRequireDefault(require("./components/Textarea"));
|
|
481
492
|
var _Tooltip = _interopRequireDefault(require("./components/Tooltip"));
|
|
493
|
+
var _TablePagination = _interopRequireDefault(require("./components/TablePagination"));
|
|
482
494
|
var _hooks = require("./hooks");
|
|
483
495
|
var _utils = require("./utils");
|
|
484
496
|
var _enums = require("./enums");
|
|
485
|
-
function _getRequireWildcardCache(
|
|
486
|
-
function _interopRequireWildcard(
|
|
497
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
498
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
487
499
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
package/dist/utils.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.isNavigationButton = exports.isNavigationAnchor = exports.highlightSubString = exports.IS_DEV = void 0;
|
|
7
|
-
|
|
7
|
+
const IS_DEV = exports.IS_DEV = process.env.NODE_ENV === "development";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Find substring and wrap in <strong /> tag
|
|
@@ -12,18 +12,15 @@ var IS_DEV = process.env.NODE_ENV === "development";
|
|
|
12
12
|
* @param {string} subString - The substring to find
|
|
13
13
|
* @return {Obj} newStr - Object with text and match bool
|
|
14
14
|
*/
|
|
15
|
-
|
|
16
|
-
var highlightSubString = function highlightSubString(str, subString) {
|
|
15
|
+
const highlightSubString = (str, subString) => {
|
|
17
16
|
if (typeof str !== "string" || typeof subString !== "string") {
|
|
18
17
|
return {
|
|
19
18
|
text: str || "",
|
|
20
19
|
match: false
|
|
21
20
|
};
|
|
22
21
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return "<strong>".concat(match, "</strong>");
|
|
26
|
-
});
|
|
22
|
+
const caseInsensitiveRegex = new RegExp(subString, "gi");
|
|
23
|
+
const newStr = str.replace(caseInsensitiveRegex, match => "<strong>".concat(match, "</strong>"));
|
|
27
24
|
return {
|
|
28
25
|
text: subString === "" ? str : newStr,
|
|
29
26
|
match: newStr !== str
|
|
@@ -35,16 +32,12 @@ var highlightSubString = function highlightSubString(str, subString) {
|
|
|
35
32
|
* @param link - The navigation item.
|
|
36
33
|
*/
|
|
37
34
|
exports.highlightSubString = highlightSubString;
|
|
38
|
-
|
|
39
|
-
return !!link.url;
|
|
40
|
-
};
|
|
35
|
+
const isNavigationAnchor = link => !!link.url;
|
|
41
36
|
|
|
42
37
|
/**
|
|
43
38
|
* Whether a navigation item is a button.
|
|
44
39
|
* @param link - The navigation item.
|
|
45
40
|
*/
|
|
46
41
|
exports.isNavigationAnchor = isNavigationAnchor;
|
|
47
|
-
|
|
48
|
-
return !link.url;
|
|
49
|
-
};
|
|
42
|
+
const isNavigationButton = link => !link.url;
|
|
50
43
|
exports.isNavigationButton = isNavigationButton;
|