@websolutespa/bom-mixer-ui 1.5.2 → 1.5.4
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/CHANGELOG.md +44 -29
- package/dist/cjs/index.js +108 -81
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/meta/meta.js +46 -45
- package/dist/esm/components/meta/meta.js.map +1 -1
- package/dist/esm/components/pagination/pagination-context.js +6 -3
- package/dist/esm/components/pagination/pagination-context.js.map +1 -1
- package/dist/esm/components/pagination/pagination-item.js +134 -4
- package/dist/esm/components/pagination/pagination-item.js.map +1 -1
- package/dist/esm/components/pagination/pagination-next.js +5 -2
- package/dist/esm/components/pagination/pagination-next.js.map +1 -1
- package/dist/esm/components/pagination/pagination-pages.js +7 -0
- package/dist/esm/components/pagination/pagination-pages.js.map +1 -1
- package/dist/esm/components/pagination/pagination-previous.js +5 -2
- package/dist/esm/components/pagination/pagination-previous.js.map +1 -1
- package/dist/esm/components/pagination/pagination.js +8 -5
- package/dist/esm/components/pagination/pagination.js.map +1 -1
- package/dist/types/components/breadcrumb/breadcrumb.d.ts +1 -1
- package/dist/types/components/meta/meta.d.ts +4 -1
- package/dist/types/components/meta/meta.d.ts.map +1 -1
- package/dist/types/components/pagination/pagination-context.d.ts +2 -0
- package/dist/types/components/pagination/pagination-context.d.ts.map +1 -1
- package/dist/types/components/pagination/pagination-item.d.ts +2 -1
- package/dist/types/components/pagination/pagination-item.d.ts.map +1 -1
- package/dist/types/components/pagination/pagination-next.d.ts.map +1 -1
- package/dist/types/components/pagination/pagination-pages.d.ts.map +1 -1
- package/dist/types/components/pagination/pagination-previous.d.ts.map +1 -1
- package/dist/types/components/pagination/pagination.d.ts +6 -4
- package/dist/types/components/pagination/pagination.d.ts.map +1 -1
- package/dist/types/forms/custom-select/custom-select.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/meta/meta.tsx +20 -18
- package/src/components/pagination/pagination-context.ts +9 -3
- package/src/components/pagination/pagination-item.tsx +8 -2
- package/src/components/pagination/pagination-next.tsx +2 -1
- package/src/components/pagination/pagination-pages.tsx +5 -0
- package/src/components/pagination/pagination-previous.tsx +2 -1
- package/src/components/pagination/pagination.tsx +10 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,25 @@
|
|
|
1
1
|
# @websolutespa/bom-mixer-ui
|
|
2
2
|
|
|
3
|
+
## 1.5.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Modified: Meta
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @websolutespa/bom-mixer-models@1.5.4
|
|
10
|
+
- @websolutespa/bom-mixer-store@1.4.3
|
|
11
|
+
|
|
12
|
+
## 1.5.3
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Modified: Pagination
|
|
17
|
+
|
|
3
18
|
## 1.5.2
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
6
21
|
|
|
7
|
-
- Modified: AccordionGroup, Media, Meta, Pagination, PopoverCollections, Popover, Tabs, utils
|
|
22
|
+
- Modified: AccordionGroup, Media, Meta, Pagination, PopoverCollections, Popover, Tabs, utils
|
|
8
23
|
- Updated dependencies
|
|
9
24
|
- @websolutespa/bom-mixer-models@1.5.2
|
|
10
25
|
- @websolutespa/bom-mixer-hooks@1.4.1
|
|
@@ -14,136 +29,136 @@
|
|
|
14
29
|
|
|
15
30
|
### Patch Changes
|
|
16
31
|
|
|
17
|
-
- Added: default href to Link
|
|
32
|
+
- Added: default href to Link
|
|
18
33
|
|
|
19
34
|
## 1.5.0
|
|
20
35
|
|
|
21
36
|
### Minor Changes
|
|
22
37
|
|
|
23
|
-
- Modified LazyLoader
|
|
38
|
+
- Modified LazyLoader
|
|
24
39
|
|
|
25
40
|
## 1.4.0
|
|
26
41
|
|
|
27
42
|
### Minor Changes
|
|
28
43
|
|
|
29
|
-
- Added: Main
|
|
30
|
-
- Modified: Pagination
|
|
44
|
+
- Added: Main
|
|
45
|
+
- Modified: Pagination
|
|
31
46
|
|
|
32
47
|
## 1.3.0
|
|
33
48
|
|
|
34
49
|
### Minor Changes
|
|
35
50
|
|
|
36
|
-
- Added: accessibility
|
|
37
|
-
- Modified: IThemeForm, form fields, LazyComponents, Media
|
|
51
|
+
- Added: accessibility
|
|
52
|
+
- Modified: IThemeForm, form fields, LazyComponents, Media
|
|
38
53
|
|
|
39
54
|
## 1.2.2
|
|
40
55
|
|
|
41
56
|
### Patch Changes
|
|
42
57
|
|
|
43
|
-
- Modified: MediaImage
|
|
58
|
+
- Modified: MediaImage
|
|
44
59
|
|
|
45
60
|
## 1.2.1
|
|
46
61
|
|
|
47
62
|
### Patch Changes
|
|
48
63
|
|
|
49
|
-
- Added: LayoutDefault
|
|
50
|
-
- Modified: GlobalStyle, toKebabCase
|
|
64
|
+
- Added: LayoutDefault
|
|
65
|
+
- Modified: GlobalStyle, toKebabCase
|
|
51
66
|
|
|
52
67
|
## 1.2.0
|
|
53
68
|
|
|
54
69
|
### Minor Changes
|
|
55
70
|
|
|
56
|
-
- Fixing: circular references
|
|
57
|
-
- Added: Link wrapper for next/link
|
|
58
|
-
- Updating: next 13
|
|
71
|
+
- Fixing: circular references
|
|
72
|
+
- Added: Link wrapper for next/link
|
|
73
|
+
- Updating: next 13
|
|
59
74
|
|
|
60
75
|
## 1.1.0
|
|
61
76
|
|
|
62
77
|
### Minor Changes
|
|
63
78
|
|
|
64
|
-
- Modified: useApi
|
|
79
|
+
- Modified: useApi
|
|
65
80
|
|
|
66
81
|
## 1.0.1
|
|
67
82
|
|
|
68
83
|
### Patch Changes
|
|
69
84
|
|
|
70
|
-
- Fixing: types
|
|
85
|
+
- Fixing: types
|
|
71
86
|
|
|
72
87
|
## 1.0.0
|
|
73
88
|
|
|
74
89
|
### Minor Changes
|
|
75
90
|
|
|
76
|
-
- Added: useFormTester
|
|
91
|
+
- Added: useFormTester
|
|
77
92
|
|
|
78
93
|
## 0.5.1
|
|
79
94
|
|
|
80
95
|
### Patch Changes
|
|
81
96
|
|
|
82
|
-
- Fixing: useVariant
|
|
97
|
+
- Fixing: useVariant
|
|
83
98
|
|
|
84
99
|
## 0.5.0
|
|
85
100
|
|
|
86
101
|
### Minor Changes
|
|
87
102
|
|
|
88
|
-
- Modified: ui variants Forms, theme.json
|
|
103
|
+
- Modified: ui variants Forms, theme.json
|
|
89
104
|
|
|
90
105
|
## 0.4.3
|
|
91
106
|
|
|
92
107
|
### Patch Changes
|
|
93
108
|
|
|
94
|
-
- Modified: Text added getFontVariantResponsive
|
|
109
|
+
- Modified: Text added getFontVariantResponsive
|
|
95
110
|
|
|
96
111
|
## 0.4.2
|
|
97
112
|
|
|
98
113
|
### Patch Changes
|
|
99
114
|
|
|
100
|
-
- Modified: ui variants Grid, Container, Text
|
|
115
|
+
- Modified: ui variants Grid, Container, Text
|
|
101
116
|
|
|
102
117
|
## 0.4.1
|
|
103
118
|
|
|
104
119
|
### Patch Changes
|
|
105
120
|
|
|
106
|
-
- Added: source files
|
|
121
|
+
- Added: source files
|
|
107
122
|
|
|
108
123
|
## 0.4.0
|
|
109
124
|
|
|
110
125
|
### Minor Changes
|
|
111
126
|
|
|
112
|
-
- Added: splat routes
|
|
113
|
-
- Added: variants
|
|
127
|
+
- Added: splat routes
|
|
128
|
+
- Added: variants
|
|
114
129
|
|
|
115
130
|
## 0.3.0
|
|
116
131
|
|
|
117
132
|
### Minor Changes
|
|
118
133
|
|
|
119
|
-
- Added: @websolutespa/bom-core
|
|
134
|
+
- Added: @websolutespa/bom-core
|
|
120
135
|
|
|
121
136
|
## 0.2.0
|
|
122
137
|
|
|
123
138
|
### Minor Changes
|
|
124
139
|
|
|
125
|
-
- Modified: ITheme, LazyLoader
|
|
140
|
+
- Modified: ITheme, LazyLoader
|
|
126
141
|
|
|
127
142
|
## 0.1.0
|
|
128
143
|
|
|
129
144
|
### Minor Changes
|
|
130
145
|
|
|
131
|
-
- mock refactor
|
|
146
|
+
- mock refactor
|
|
132
147
|
|
|
133
148
|
## 0.0.3
|
|
134
149
|
|
|
135
150
|
### Patch Changes
|
|
136
151
|
|
|
137
|
-
- Modified: assets
|
|
152
|
+
- Modified: assets
|
|
138
153
|
|
|
139
154
|
## 0.0.2
|
|
140
155
|
|
|
141
156
|
### Patch Changes
|
|
142
157
|
|
|
143
|
-
- Modified: assets
|
|
158
|
+
- Modified: assets
|
|
144
159
|
|
|
145
160
|
## 0.0.1
|
|
146
161
|
|
|
147
162
|
### Patch Changes
|
|
148
163
|
|
|
149
|
-
- Added: first release
|
|
164
|
+
- Added: first release
|
package/dist/cjs/index.js
CHANGED
|
@@ -5127,11 +5127,10 @@ const MediaGallery = /*#__PURE__*/React.forwardRef((_a, ref) => {
|
|
|
5127
5127
|
});
|
|
5128
5128
|
MediaGallery.displayName = 'MediaGallery';
|
|
5129
5129
|
|
|
5130
|
-
function
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
}
|
|
5134
|
-
function Meta() {
|
|
5130
|
+
function Meta(_ref) {
|
|
5131
|
+
let {
|
|
5132
|
+
children
|
|
5133
|
+
} = _ref;
|
|
5135
5134
|
var _a, _b, _e;
|
|
5136
5135
|
const page = bomMixerHooks.usePage();
|
|
5137
5136
|
const extra = bomMixerHooks.useExtra();
|
|
@@ -5142,7 +5141,7 @@ function Meta() {
|
|
|
5142
5141
|
// prev / next
|
|
5143
5142
|
let relPrev = null;
|
|
5144
5143
|
let relNext = null;
|
|
5145
|
-
if (bomMixerHooks.isPaginationInfo(extra.pagination)) {
|
|
5144
|
+
if (bomMixerHooks.isPaginationInfo(extra.pagination) && page.href) {
|
|
5146
5145
|
const pagination = extra.pagination;
|
|
5147
5146
|
title = title + ` - ${pagination.page}`;
|
|
5148
5147
|
description = description + ` - ${pagination.page}`;
|
|
@@ -5184,60 +5183,62 @@ function Meta() {
|
|
|
5184
5183
|
}) : jsxRuntime.jsx("meta", {
|
|
5185
5184
|
name: "robots",
|
|
5186
5185
|
content: "noindex, nofollow"
|
|
5187
|
-
}), page.href
|
|
5186
|
+
}), page.href && jsxRuntime.jsx("link", {
|
|
5188
5187
|
rel: "canonical",
|
|
5189
|
-
href: resolveHref(page.href)
|
|
5188
|
+
href: bomMixerModels.resolveHref(page.href)
|
|
5190
5189
|
}), relPrev && jsxRuntime.jsx("link", {
|
|
5191
5190
|
rel: "prev",
|
|
5192
|
-
href: resolveHref(relPrev)
|
|
5191
|
+
href: bomMixerModels.resolveHref(relPrev)
|
|
5193
5192
|
}), relNext && jsxRuntime.jsx("link", {
|
|
5194
5193
|
rel: "next",
|
|
5195
|
-
href: resolveHref(relNext)
|
|
5194
|
+
href: bomMixerModels.resolveHref(relNext)
|
|
5196
5195
|
}), page.alternates && page.alternates.map(alternate => jsxRuntime.jsx("link", {
|
|
5197
5196
|
rel: "alternate",
|
|
5198
|
-
href: resolveHref(alternate.id),
|
|
5197
|
+
href: bomMixerModels.resolveHref(alternate.id),
|
|
5199
5198
|
hrefLang: alternate.locale
|
|
5200
5199
|
}, `${alternate.locale}-${alternate.market}`)), page.media && jsxRuntime.jsx("meta", {
|
|
5201
5200
|
property: "og:image",
|
|
5202
|
-
content: resolveHref(page.media.src)
|
|
5203
|
-
}), false , jsxRuntime.jsx("
|
|
5204
|
-
rel: "apple-touch-icon",
|
|
5205
|
-
sizes: "180x180",
|
|
5206
|
-
href: "/apple-touch-icon.png"
|
|
5207
|
-
}), jsxRuntime.jsx("link", {
|
|
5208
|
-
rel: "icon",
|
|
5209
|
-
type: "image/png",
|
|
5210
|
-
sizes: "32x32",
|
|
5211
|
-
href: "/favicon-32x32.png"
|
|
5212
|
-
}), jsxRuntime.jsx("link", {
|
|
5213
|
-
rel: "icon",
|
|
5214
|
-
type: "image/png",
|
|
5215
|
-
sizes: "16x16",
|
|
5216
|
-
href: "/favicon-16x16.png"
|
|
5217
|
-
}), jsxRuntime.jsx("link", {
|
|
5218
|
-
rel: "shortcut icon",
|
|
5219
|
-
type: "image/x-icon",
|
|
5220
|
-
href: "/favicon.ico"
|
|
5221
|
-
}), jsxRuntime.jsx("link", {
|
|
5222
|
-
rel: "manifest",
|
|
5223
|
-
href: "/site.webmanifest",
|
|
5224
|
-
crossOrigin: "use-credentials"
|
|
5225
|
-
}), jsxRuntime.jsx("link", {
|
|
5226
|
-
rel: "mask-icon",
|
|
5227
|
-
href: "/safari-pinned-tab.svg",
|
|
5228
|
-
color: "#000000"
|
|
5229
|
-
}), jsxRuntime.jsx("meta", {
|
|
5230
|
-
name: "msapplication-TileColor",
|
|
5231
|
-
content: "#000000"
|
|
5232
|
-
}), jsxRuntime.jsx("meta", {
|
|
5233
|
-
name: "msapplication-config",
|
|
5234
|
-
content: "/browserconfig.xml"
|
|
5235
|
-
}), jsxRuntime.jsx("meta", {
|
|
5236
|
-
name: "theme-color",
|
|
5237
|
-
content: "#000"
|
|
5238
|
-
}), structuredData && jsxRuntime.jsx("script", {
|
|
5201
|
+
content: bomMixerModels.resolveHref(page.media.src)
|
|
5202
|
+
}), false , structuredData && jsxRuntime.jsx("script", {
|
|
5239
5203
|
type: "application/ld+json",
|
|
5240
5204
|
children: structuredData
|
|
5205
|
+
}), children ? children : jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
5206
|
+
children: [jsxRuntime.jsx("link", {
|
|
5207
|
+
rel: "apple-touch-icon",
|
|
5208
|
+
sizes: "180x180",
|
|
5209
|
+
href: "/apple-touch-icon.png"
|
|
5210
|
+
}), jsxRuntime.jsx("link", {
|
|
5211
|
+
rel: "icon",
|
|
5212
|
+
type: "image/png",
|
|
5213
|
+
sizes: "32x32",
|
|
5214
|
+
href: "/favicon-32x32.png"
|
|
5215
|
+
}), jsxRuntime.jsx("link", {
|
|
5216
|
+
rel: "icon",
|
|
5217
|
+
type: "image/png",
|
|
5218
|
+
sizes: "16x16",
|
|
5219
|
+
href: "/favicon-16x16.png"
|
|
5220
|
+
}), jsxRuntime.jsx("link", {
|
|
5221
|
+
rel: "shortcut icon",
|
|
5222
|
+
type: "image/x-icon",
|
|
5223
|
+
href: "/favicon.ico"
|
|
5224
|
+
}), jsxRuntime.jsx("link", {
|
|
5225
|
+
rel: "manifest",
|
|
5226
|
+
href: "/site.webmanifest",
|
|
5227
|
+
crossOrigin: "use-credentials"
|
|
5228
|
+
}), jsxRuntime.jsx("link", {
|
|
5229
|
+
rel: "mask-icon",
|
|
5230
|
+
href: "/safari-pinned-tab.svg",
|
|
5231
|
+
color: "#000000"
|
|
5232
|
+
}), jsxRuntime.jsx("meta", {
|
|
5233
|
+
name: "msapplication-TileColor",
|
|
5234
|
+
content: "#000000"
|
|
5235
|
+
}), jsxRuntime.jsx("meta", {
|
|
5236
|
+
name: "msapplication-config",
|
|
5237
|
+
content: "/browserconfig.xml"
|
|
5238
|
+
}), jsxRuntime.jsx("meta", {
|
|
5239
|
+
name: "theme-color",
|
|
5240
|
+
content: "#000"
|
|
5241
|
+
})]
|
|
5241
5242
|
})]
|
|
5242
5243
|
});
|
|
5243
5244
|
}
|
|
@@ -5419,29 +5420,12 @@ const Page = styled__default.default.div`
|
|
|
5419
5420
|
${props => getCssResponsive(props)}
|
|
5420
5421
|
`;
|
|
5421
5422
|
|
|
5422
|
-
const
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
return args;
|
|
5427
|
-
};
|
|
5428
|
-
const tupleNumber = function () {
|
|
5429
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
5430
|
-
args[_key2] = arguments[_key2];
|
|
5423
|
+
const defaultContext$5 = {
|
|
5424
|
+
currentPage: 1,
|
|
5425
|
+
resolveUrl: () => {
|
|
5426
|
+
return undefined;
|
|
5431
5427
|
}
|
|
5432
|
-
return args;
|
|
5433
5428
|
};
|
|
5434
|
-
tuple('default', 'secondary', 'success', 'warning', 'error', 'abort', 'secondary-light', 'success-light', 'warning-light', 'error-light');
|
|
5435
|
-
tuple('default', 'secondary', 'success', 'warning', 'error');
|
|
5436
|
-
tuple('default', 'secondary', 'success', 'warning', 'error', 'dark', 'lite');
|
|
5437
|
-
tuple('default', 'secondary', 'success', 'warning', 'error', 'dark', 'lite', 'alert', 'purple', 'violet', 'cyan');
|
|
5438
|
-
tuple('default', 'silent', 'prevent');
|
|
5439
|
-
tuple('hover', 'click');
|
|
5440
|
-
tuple('top', 'topStart', 'topEnd', 'left', 'leftStart', 'leftEnd', 'bottom', 'bottomStart', 'bottomEnd', 'right', 'rightStart', 'rightEnd');
|
|
5441
|
-
tuple('start', 'center', 'end', 'left', 'right');
|
|
5442
|
-
|
|
5443
|
-
tuple('prev', 'next', 'click');
|
|
5444
|
-
const defaultContext$5 = {};
|
|
5445
5429
|
const PaginationContext = /*#__PURE__*/React__default.default.createContext(defaultContext$5);
|
|
5446
5430
|
const usePaginationContext = () => React__default.default.useContext(PaginationContext);
|
|
5447
5431
|
|
|
@@ -5449,7 +5433,7 @@ const StyledPaginationItem$1 = styled__default.default.li`
|
|
|
5449
5433
|
margin-right: 0.428em;
|
|
5450
5434
|
display: inline-block;
|
|
5451
5435
|
|
|
5452
|
-
button {
|
|
5436
|
+
button, a {
|
|
5453
5437
|
box-sizing: border-box;
|
|
5454
5438
|
display: inline-flex;
|
|
5455
5439
|
align-items: center;
|
|
@@ -5504,14 +5488,18 @@ const StyledPaginationItem$1 = styled__default.default.li`
|
|
|
5504
5488
|
`;
|
|
5505
5489
|
const PaginationItem = _a => {
|
|
5506
5490
|
var {
|
|
5491
|
+
href,
|
|
5507
5492
|
className,
|
|
5508
5493
|
children,
|
|
5509
5494
|
active,
|
|
5510
5495
|
disabled,
|
|
5511
5496
|
onClick
|
|
5512
5497
|
} = _a,
|
|
5513
|
-
props = __rest(_a, ["className", "children", "active", "disabled", "onClick"]);
|
|
5498
|
+
props = __rest(_a, ["href", "className", "children", "active", "disabled", "onClick"]);
|
|
5514
5499
|
const onClick_ = event => {
|
|
5500
|
+
if (href) {
|
|
5501
|
+
event.preventDefault();
|
|
5502
|
+
}
|
|
5515
5503
|
if (disabled) {
|
|
5516
5504
|
return;
|
|
5517
5505
|
}
|
|
@@ -5526,7 +5514,10 @@ const PaginationItem = _a => {
|
|
|
5526
5514
|
"aria-label": props['aria-label'],
|
|
5527
5515
|
className: classNames,
|
|
5528
5516
|
onClick: onClick_
|
|
5529
|
-
},
|
|
5517
|
+
}, href ? {
|
|
5518
|
+
as: 'a',
|
|
5519
|
+
href
|
|
5520
|
+
} : {}, props, {
|
|
5530
5521
|
children: children
|
|
5531
5522
|
}))
|
|
5532
5523
|
});
|
|
@@ -5539,15 +5530,18 @@ const PaginationNext = _a => {
|
|
|
5539
5530
|
} = _a,
|
|
5540
5531
|
props = __rest(_a, ["children"]);
|
|
5541
5532
|
const {
|
|
5533
|
+
currentPage,
|
|
5534
|
+
isLast,
|
|
5542
5535
|
update,
|
|
5543
|
-
|
|
5536
|
+
resolveUrl
|
|
5544
5537
|
} = usePaginationContext();
|
|
5545
5538
|
return jsxRuntime.jsx(PaginationItem, Object.assign({
|
|
5546
5539
|
className: "pagination-next",
|
|
5547
5540
|
disabled: isLast,
|
|
5548
5541
|
"aria-disabled": isLast,
|
|
5549
5542
|
"aria-label": "next page",
|
|
5550
|
-
onClick: () => update && update('next')
|
|
5543
|
+
onClick: () => update && update('next'),
|
|
5544
|
+
href: resolveUrl(currentPage + 1)
|
|
5551
5545
|
}, props, {
|
|
5552
5546
|
children: children
|
|
5553
5547
|
}));
|
|
@@ -5643,6 +5637,9 @@ const PaginationPages = _ref => {
|
|
|
5643
5637
|
current,
|
|
5644
5638
|
setPage
|
|
5645
5639
|
} = _ref;
|
|
5640
|
+
const {
|
|
5641
|
+
resolveUrl
|
|
5642
|
+
} = usePaginationContext();
|
|
5646
5643
|
const showPages = React.useMemo(() => {
|
|
5647
5644
|
const oddLimit = limit % 2 === 0 ? limit - 1 : limit;
|
|
5648
5645
|
return oddLimit - 2;
|
|
@@ -5657,6 +5654,7 @@ const PaginationPages = _ref => {
|
|
|
5657
5654
|
"aria-label": `page ${value}`,
|
|
5658
5655
|
active: value === active,
|
|
5659
5656
|
onClick: () => setPage(value),
|
|
5657
|
+
href: resolveUrl(value),
|
|
5660
5658
|
children: value
|
|
5661
5659
|
}, `pagination-item-${value}`), [setPage]);
|
|
5662
5660
|
const renderStartItems = pagesArray.map((_, index) => {
|
|
@@ -5670,6 +5668,7 @@ const PaginationPages = _ref => {
|
|
|
5670
5668
|
"aria-label": `page ${value}`,
|
|
5671
5669
|
active: index + 1 === middleNumber,
|
|
5672
5670
|
onClick: () => setPage(value),
|
|
5671
|
+
href: resolveUrl(value),
|
|
5673
5672
|
children: value
|
|
5674
5673
|
}, `pagination-middle-${index}`);
|
|
5675
5674
|
});
|
|
@@ -5686,6 +5685,7 @@ const PaginationPages = _ref => {
|
|
|
5686
5685
|
"aria-label": `page ${value}`,
|
|
5687
5686
|
active: value === current,
|
|
5688
5687
|
onClick: () => setPage(value),
|
|
5688
|
+
href: resolveUrl(value),
|
|
5689
5689
|
children: value
|
|
5690
5690
|
}, `pagination-item-${value}`);
|
|
5691
5691
|
})
|
|
@@ -5712,8 +5712,10 @@ const PaginationPrevious = _a => {
|
|
|
5712
5712
|
} = _a,
|
|
5713
5713
|
props = __rest(_a, ["children"]);
|
|
5714
5714
|
const {
|
|
5715
|
+
currentPage,
|
|
5716
|
+
isFirst,
|
|
5715
5717
|
update,
|
|
5716
|
-
|
|
5718
|
+
resolveUrl
|
|
5717
5719
|
} = usePaginationContext();
|
|
5718
5720
|
return jsxRuntime.jsx(PaginationItem, Object.assign({
|
|
5719
5721
|
className: "pagination-previous",
|
|
@@ -5721,7 +5723,8 @@ const PaginationPrevious = _a => {
|
|
|
5721
5723
|
"aria-disabled": isFirst,
|
|
5722
5724
|
"aria-label": "previous page",
|
|
5723
5725
|
title: "previous page",
|
|
5724
|
-
onClick: () => update && update('prev')
|
|
5726
|
+
onClick: () => update && update('prev'),
|
|
5727
|
+
href: resolveUrl(currentPage - 1)
|
|
5725
5728
|
}, props, {
|
|
5726
5729
|
children: children
|
|
5727
5730
|
}));
|
|
@@ -5753,7 +5756,7 @@ const StyledNav = styled__default.default.ul`
|
|
|
5753
5756
|
margin-right: 0;
|
|
5754
5757
|
}
|
|
5755
5758
|
`;
|
|
5756
|
-
|
|
5759
|
+
function PaginationBase(_a) {
|
|
5757
5760
|
var {
|
|
5758
5761
|
className = '',
|
|
5759
5762
|
initialPage = 1,
|
|
@@ -5761,9 +5764,10 @@ const PaginationBase = _a => {
|
|
|
5761
5764
|
limit = 7,
|
|
5762
5765
|
page: customPage,
|
|
5763
5766
|
children,
|
|
5764
|
-
onChange
|
|
5767
|
+
onChange,
|
|
5768
|
+
urlResolver
|
|
5765
5769
|
} = _a,
|
|
5766
|
-
props = __rest(_a, ["className", "initialPage", "count", "limit", "page", "children", "onChange"]);
|
|
5770
|
+
props = __rest(_a, ["className", "initialPage", "count", "limit", "page", "children", "onChange", "urlResolver"]);
|
|
5767
5771
|
const label = bomMixerHooks.useLabel();
|
|
5768
5772
|
const [page, setPage, pageRef] = bomMixerHooks.useCurrentState(initialPage);
|
|
5769
5773
|
const [, prevChildren] = pickChild(children, PaginationPrevious);
|
|
@@ -5788,9 +5792,11 @@ const PaginationBase = _a => {
|
|
|
5788
5792
|
};
|
|
5789
5793
|
const values = React.useMemo(() => {
|
|
5790
5794
|
return {
|
|
5795
|
+
currentPage: page,
|
|
5791
5796
|
isFirst: page <= 1,
|
|
5792
5797
|
isLast: page >= count,
|
|
5793
|
-
update
|
|
5798
|
+
update,
|
|
5799
|
+
resolveUrl: page => urlResolver ? urlResolver(page) : undefined
|
|
5794
5800
|
};
|
|
5795
5801
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5796
5802
|
}, [page, count]);
|
|
@@ -5822,7 +5828,7 @@ const PaginationBase = _a => {
|
|
|
5822
5828
|
})
|
|
5823
5829
|
}))
|
|
5824
5830
|
});
|
|
5825
|
-
}
|
|
5831
|
+
}
|
|
5826
5832
|
const Pagination = bomCore.withSchema(PaginationBase, {
|
|
5827
5833
|
Previous: PaginationPrevious,
|
|
5828
5834
|
Next: PaginationNext,
|
|
@@ -9157,6 +9163,27 @@ const radioVariants = {
|
|
|
9157
9163
|
default: CssRadioDefault
|
|
9158
9164
|
};
|
|
9159
9165
|
|
|
9166
|
+
const tuple = function () {
|
|
9167
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
9168
|
+
args[_key] = arguments[_key];
|
|
9169
|
+
}
|
|
9170
|
+
return args;
|
|
9171
|
+
};
|
|
9172
|
+
const tupleNumber = function () {
|
|
9173
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
9174
|
+
args[_key2] = arguments[_key2];
|
|
9175
|
+
}
|
|
9176
|
+
return args;
|
|
9177
|
+
};
|
|
9178
|
+
tuple('default', 'secondary', 'success', 'warning', 'error', 'abort', 'secondary-light', 'success-light', 'warning-light', 'error-light');
|
|
9179
|
+
tuple('default', 'secondary', 'success', 'warning', 'error');
|
|
9180
|
+
tuple('default', 'secondary', 'success', 'warning', 'error', 'dark', 'lite');
|
|
9181
|
+
tuple('default', 'secondary', 'success', 'warning', 'error', 'dark', 'lite', 'alert', 'purple', 'violet', 'cyan');
|
|
9182
|
+
tuple('default', 'silent', 'prevent');
|
|
9183
|
+
tuple('hover', 'click');
|
|
9184
|
+
tuple('top', 'topStart', 'topEnd', 'left', 'leftStart', 'leftEnd', 'bottom', 'bottomStart', 'bottomEnd', 'right', 'rightStart', 'rightEnd');
|
|
9185
|
+
tuple('start', 'center', 'end', 'left', 'right');
|
|
9186
|
+
|
|
9160
9187
|
const RatingSvg = props => jsxRuntime.jsx("svg", {
|
|
9161
9188
|
viewBox: "0 0 24 24",
|
|
9162
9189
|
/*
|