@vinyasa/navigation 1.0.26
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/README.md +45 -0
- package/dist/cjs/breadcrumbs.cjs +240 -0
- package/dist/cjs/breadcrumbs.css +58 -0
- package/dist/cjs/command-navigation.cjs +215 -0
- package/dist/cjs/command-navigation.css +46 -0
- package/dist/cjs/index.cjs +2681 -0
- package/dist/cjs/index.css +1162 -0
- package/dist/cjs/navigation-menu.cjs +302 -0
- package/dist/cjs/navigation-menu.css +197 -0
- package/dist/cjs/pagination.cjs +462 -0
- package/dist/cjs/pagination.css +79 -0
- package/dist/cjs/sidebar.cjs +476 -0
- package/dist/cjs/sidebar.css +171 -0
- package/dist/cjs/stepper.cjs +270 -0
- package/dist/cjs/stepper.css +153 -0
- package/dist/cjs/tabs.cjs +260 -0
- package/dist/cjs/tabs.css +122 -0
- package/dist/cjs/top-navigation.cjs +363 -0
- package/dist/cjs/top-navigation.css +127 -0
- package/dist/cjs/tree-view.cjs +373 -0
- package/dist/cjs/tree-view.css +109 -0
- package/dist/cjs/workspace-switcher.cjs +249 -0
- package/dist/cjs/workspace-switcher.css +100 -0
- package/dist/esm/217.css +79 -0
- package/dist/esm/217.js +202 -0
- package/dist/esm/294.css +100 -0
- package/dist/esm/294.js +114 -0
- package/dist/esm/375.css +153 -0
- package/dist/esm/375.js +120 -0
- package/dist/esm/555.css +171 -0
- package/dist/esm/555.js +232 -0
- package/dist/esm/655.css +58 -0
- package/dist/esm/655.js +87 -0
- package/dist/esm/66.css +46 -0
- package/dist/esm/66.js +92 -0
- package/dist/esm/694.css +109 -0
- package/dist/esm/694.js +227 -0
- package/dist/esm/814.css +197 -0
- package/dist/esm/814.js +146 -0
- package/dist/esm/862.css +127 -0
- package/dist/esm/862.js +130 -0
- package/dist/esm/913.css +119 -0
- package/dist/esm/913.js +121 -0
- package/dist/esm/953.js +87 -0
- package/dist/esm/breadcrumbs.d.ts +2 -0
- package/dist/esm/breadcrumbs.js +1 -0
- package/dist/esm/command-navigation.d.ts +2 -0
- package/dist/esm/command-navigation.js +1 -0
- package/dist/esm/components/breadcrumbs/Breadcrumbs.css.d.ts +6 -0
- package/dist/esm/components/breadcrumbs/Breadcrumbs.d.ts +58 -0
- package/dist/esm/components/breadcrumbs/index.d.ts +1 -0
- package/dist/esm/components/command-navigation/CommandNavigation.css.d.ts +4 -0
- package/dist/esm/components/command-navigation/CommandNavigation.d.ts +50 -0
- package/dist/esm/components/command-navigation/index.d.ts +1 -0
- package/dist/esm/components/navigation-menu/NavigationMenu.css.d.ts +13 -0
- package/dist/esm/components/navigation-menu/NavigationMenu.d.ts +69 -0
- package/dist/esm/components/navigation-menu/index.d.ts +1 -0
- package/dist/esm/components/pagination/Pagination.css.d.ts +13 -0
- package/dist/esm/components/pagination/Pagination.d.ts +69 -0
- package/dist/esm/components/pagination/getPaginationRange.d.ts +15 -0
- package/dist/esm/components/pagination/index.d.ts +2 -0
- package/dist/esm/components/sidebar/Sidebar.css.d.ts +60 -0
- package/dist/esm/components/sidebar/Sidebar.d.ts +82 -0
- package/dist/esm/components/sidebar/index.d.ts +1 -0
- package/dist/esm/components/stepper/Stepper.css.d.ts +10 -0
- package/dist/esm/components/stepper/Stepper.d.ts +57 -0
- package/dist/esm/components/stepper/index.d.ts +1 -0
- package/dist/esm/components/tabs/Tabs.css.d.ts +6 -0
- package/dist/esm/components/tabs/Tabs.d.ts +39 -0
- package/dist/esm/components/tabs/index.d.ts +1 -0
- package/dist/esm/components/top-navigation/TopNavigation.css.d.ts +13 -0
- package/dist/esm/components/top-navigation/TopNavigation.d.ts +67 -0
- package/dist/esm/components/top-navigation/index.d.ts +1 -0
- package/dist/esm/components/tree-view/TreeView.css.d.ts +8 -0
- package/dist/esm/components/tree-view/TreeView.d.ts +43 -0
- package/dist/esm/components/tree-view/index.d.ts +1 -0
- package/dist/esm/components/workspace-switcher/WorkspaceSwitcher.css.d.ts +9 -0
- package/dist/esm/components/workspace-switcher/WorkspaceSwitcher.d.ts +43 -0
- package/dist/esm/components/workspace-switcher/index.d.ts +1 -0
- package/dist/esm/index.d.ts +10 -0
- package/dist/esm/index.js +10 -0
- package/dist/esm/navigation-menu.d.ts +2 -0
- package/dist/esm/navigation-menu.js +1 -0
- package/dist/esm/pagination.d.ts +2 -0
- package/dist/esm/pagination.js +1 -0
- package/dist/esm/sidebar.d.ts +2 -0
- package/dist/esm/sidebar.js +1 -0
- package/dist/esm/stepper.d.ts +2 -0
- package/dist/esm/stepper.js +1 -0
- package/dist/esm/tabs.d.ts +2 -0
- package/dist/esm/tabs.js +1 -0
- package/dist/esm/top-navigation.d.ts +2 -0
- package/dist/esm/top-navigation.js +1 -0
- package/dist/esm/tree-view.d.ts +2 -0
- package/dist/esm/tree-view.js +1 -0
- package/dist/esm/workspace-switcher.d.ts +2 -0
- package/dist/esm/workspace-switcher.js +1 -0
- package/package.json +146 -0
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
+
var define = (defs, kind)=>{
|
|
6
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
[kind]: defs[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
define(getters, "get");
|
|
12
|
+
define(values, "value");
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
17
|
+
})();
|
|
18
|
+
(()=>{
|
|
19
|
+
__webpack_require__.r = (exports1)=>{
|
|
20
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
21
|
+
value: 'Module'
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
24
|
+
value: true
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
})();
|
|
28
|
+
var __webpack_exports__ = {};
|
|
29
|
+
__webpack_require__.r(__webpack_exports__);
|
|
30
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
31
|
+
ELLIPSIS: ()=>ELLIPSIS,
|
|
32
|
+
Pagination: ()=>Pagination,
|
|
33
|
+
getPaginationRange: ()=>getPaginationRange
|
|
34
|
+
});
|
|
35
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
36
|
+
const icons_namespaceObject = require("@vinyasa/icons");
|
|
37
|
+
const tokens_namespaceObject = require("@vinyasa/tokens");
|
|
38
|
+
const external_react_namespaceObject = require("react");
|
|
39
|
+
const ELLIPSIS = 'ellipsis';
|
|
40
|
+
const range = (start, end)=>Array.from({
|
|
41
|
+
length: Math.max(0, end - start + 1)
|
|
42
|
+
}, (_, index)=>start + index);
|
|
43
|
+
const getPaginationRange = (page, totalPages, siblingCount = 1, boundaryCount = 1)=>{
|
|
44
|
+
const startPages = range(1, Math.min(boundaryCount, totalPages));
|
|
45
|
+
const endPages = range(Math.max(totalPages - boundaryCount + 1, boundaryCount + 1), totalPages);
|
|
46
|
+
const siblingsStart = Math.max(Math.min(page - siblingCount, totalPages - boundaryCount - 2 * siblingCount - 1), boundaryCount + 2);
|
|
47
|
+
const siblingsEnd = Math.min(Math.max(page + siblingCount, boundaryCount + 2 * siblingCount + 2), endPages.length > 0 ? endPages[0] - 2 : totalPages - 1);
|
|
48
|
+
return [
|
|
49
|
+
...startPages,
|
|
50
|
+
...siblingsStart > boundaryCount + 2 ? [
|
|
51
|
+
ELLIPSIS
|
|
52
|
+
] : boundaryCount + 1 < totalPages - boundaryCount ? [
|
|
53
|
+
boundaryCount + 1
|
|
54
|
+
] : [],
|
|
55
|
+
...range(siblingsStart, siblingsEnd),
|
|
56
|
+
...siblingsEnd < totalPages - boundaryCount - 1 ? [
|
|
57
|
+
ELLIPSIS
|
|
58
|
+
] : totalPages - boundaryCount > boundaryCount ? [
|
|
59
|
+
totalPages - boundaryCount
|
|
60
|
+
] : [],
|
|
61
|
+
...endPages
|
|
62
|
+
];
|
|
63
|
+
};
|
|
64
|
+
function toPrimitive(t, r) {
|
|
65
|
+
if ("object" != typeof t || !t) return t;
|
|
66
|
+
var e = t[Symbol.toPrimitive];
|
|
67
|
+
if (void 0 !== e) {
|
|
68
|
+
var i = e.call(t, r || "default");
|
|
69
|
+
if ("object" != typeof i) return i;
|
|
70
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
71
|
+
}
|
|
72
|
+
return ("string" === r ? String : Number)(t);
|
|
73
|
+
}
|
|
74
|
+
function toPropertyKey(t) {
|
|
75
|
+
var i = toPrimitive(t, "string");
|
|
76
|
+
return "symbol" == typeof i ? i : String(i);
|
|
77
|
+
}
|
|
78
|
+
function _defineProperty(obj, key, value) {
|
|
79
|
+
key = toPropertyKey(key);
|
|
80
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
81
|
+
value: value,
|
|
82
|
+
enumerable: true,
|
|
83
|
+
configurable: true,
|
|
84
|
+
writable: true
|
|
85
|
+
});
|
|
86
|
+
else obj[key] = value;
|
|
87
|
+
return obj;
|
|
88
|
+
}
|
|
89
|
+
function createRuntimeFn_62c9670f_esm_ownKeys(e, r) {
|
|
90
|
+
var t = Object.keys(e);
|
|
91
|
+
if (Object.getOwnPropertySymbols) {
|
|
92
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
93
|
+
r && (o = o.filter(function(r) {
|
|
94
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
95
|
+
})), t.push.apply(t, o);
|
|
96
|
+
}
|
|
97
|
+
return t;
|
|
98
|
+
}
|
|
99
|
+
function _objectSpread2(e) {
|
|
100
|
+
for(var r = 1; r < arguments.length; r++){
|
|
101
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
102
|
+
r % 2 ? createRuntimeFn_62c9670f_esm_ownKeys(Object(t), !0).forEach(function(r) {
|
|
103
|
+
_defineProperty(e, r, t[r]);
|
|
104
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : createRuntimeFn_62c9670f_esm_ownKeys(Object(t)).forEach(function(r) {
|
|
105
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
return e;
|
|
109
|
+
}
|
|
110
|
+
function mapValues(input, fn) {
|
|
111
|
+
var result = {};
|
|
112
|
+
for(var _key in input)result[_key] = fn(input[_key], _key);
|
|
113
|
+
return result;
|
|
114
|
+
}
|
|
115
|
+
var shouldApplyCompound = (compoundCheck, selections, defaultVariants)=>{
|
|
116
|
+
for (var key of Object.keys(compoundCheck)){
|
|
117
|
+
var _selections$key;
|
|
118
|
+
if (compoundCheck[key] !== (null != (_selections$key = selections[key]) ? _selections$key : defaultVariants[key])) return false;
|
|
119
|
+
}
|
|
120
|
+
return true;
|
|
121
|
+
};
|
|
122
|
+
var createRuntimeFn = (config)=>{
|
|
123
|
+
var runtimeFn = (options)=>{
|
|
124
|
+
var className = config.defaultClassName;
|
|
125
|
+
var selections = _objectSpread2(_objectSpread2({}, config.defaultVariants), options);
|
|
126
|
+
for(var variantName in selections){
|
|
127
|
+
var _selections$variantNa;
|
|
128
|
+
var variantSelection = null != (_selections$variantNa = selections[variantName]) ? _selections$variantNa : config.defaultVariants[variantName];
|
|
129
|
+
if (null != variantSelection) {
|
|
130
|
+
var selection = variantSelection;
|
|
131
|
+
if ('boolean' == typeof selection) selection = true === selection ? 'true' : 'false';
|
|
132
|
+
var selectionClassName = config.variantClassNames[variantName][selection];
|
|
133
|
+
if (selectionClassName) className += ' ' + selectionClassName;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
for (var [compoundCheck, compoundClassName] of config.compoundVariants)if (shouldApplyCompound(compoundCheck, selections, config.defaultVariants)) className += ' ' + compoundClassName;
|
|
137
|
+
return className;
|
|
138
|
+
};
|
|
139
|
+
runtimeFn.variants = ()=>Object.keys(config.variantClassNames);
|
|
140
|
+
runtimeFn.classNames = {
|
|
141
|
+
get base () {
|
|
142
|
+
return config.defaultClassName.split(' ')[0];
|
|
143
|
+
},
|
|
144
|
+
get variants () {
|
|
145
|
+
return mapValues(config.variantClassNames, (classNames)=>mapValues(classNames, (className)=>className.split(' ')[0]));
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
return runtimeFn;
|
|
149
|
+
};
|
|
150
|
+
var boundaryIcon = 'oewhtx6';
|
|
151
|
+
var ellipsis = 'oewhtx5';
|
|
152
|
+
var indicator = 'oewhtx2';
|
|
153
|
+
var item = 'oewhtx1';
|
|
154
|
+
var Pagination_css_link = createRuntimeFn({
|
|
155
|
+
defaultClassName: 'oewhtx3',
|
|
156
|
+
variantClassNames: {
|
|
157
|
+
active: {
|
|
158
|
+
true: 'oewhtx4'
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
defaultVariants: {},
|
|
162
|
+
compoundVariants: []
|
|
163
|
+
});
|
|
164
|
+
var list = 'oewhtx0';
|
|
165
|
+
function _define_property(obj, key, value) {
|
|
166
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
167
|
+
value: value,
|
|
168
|
+
enumerable: true,
|
|
169
|
+
configurable: true,
|
|
170
|
+
writable: true
|
|
171
|
+
});
|
|
172
|
+
else obj[key] = value;
|
|
173
|
+
return obj;
|
|
174
|
+
}
|
|
175
|
+
function _extends() {
|
|
176
|
+
_extends = Object.assign || function(target) {
|
|
177
|
+
for(var i = 1; i < arguments.length; i++){
|
|
178
|
+
var source = arguments[i];
|
|
179
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
180
|
+
}
|
|
181
|
+
return target;
|
|
182
|
+
};
|
|
183
|
+
return _extends.apply(this, arguments);
|
|
184
|
+
}
|
|
185
|
+
function _object_spread(target) {
|
|
186
|
+
for(var i = 1; i < arguments.length; i++){
|
|
187
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
188
|
+
var ownKeys = Object.keys(source);
|
|
189
|
+
if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
190
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
191
|
+
}));
|
|
192
|
+
ownKeys.forEach(function(key) {
|
|
193
|
+
_define_property(target, key, source[key]);
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
return target;
|
|
197
|
+
}
|
|
198
|
+
function Pagination_ownKeys(object, enumerableOnly) {
|
|
199
|
+
var keys = Object.keys(object);
|
|
200
|
+
if (Object.getOwnPropertySymbols) {
|
|
201
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
202
|
+
if (enumerableOnly) symbols = symbols.filter(function(sym) {
|
|
203
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
204
|
+
});
|
|
205
|
+
keys.push.apply(keys, symbols);
|
|
206
|
+
}
|
|
207
|
+
return keys;
|
|
208
|
+
}
|
|
209
|
+
function _object_spread_props(target, source) {
|
|
210
|
+
source = null != source ? source : {};
|
|
211
|
+
if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
212
|
+
else Pagination_ownKeys(Object(source)).forEach(function(key) {
|
|
213
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
214
|
+
});
|
|
215
|
+
return target;
|
|
216
|
+
}
|
|
217
|
+
function _object_without_properties(source, excluded) {
|
|
218
|
+
if (null == source) return {};
|
|
219
|
+
var target = {}, sourceKeys, key, i;
|
|
220
|
+
if ("u" > typeof Reflect && Reflect.ownKeys) {
|
|
221
|
+
sourceKeys = Reflect.ownKeys(Object(source));
|
|
222
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
223
|
+
key = sourceKeys[i];
|
|
224
|
+
if (!(excluded.indexOf(key) >= 0)) {
|
|
225
|
+
if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
return target;
|
|
229
|
+
}
|
|
230
|
+
target = _object_without_properties_loose(source, excluded);
|
|
231
|
+
if (Object.getOwnPropertySymbols) {
|
|
232
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
233
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
234
|
+
key = sourceKeys[i];
|
|
235
|
+
if (!(excluded.indexOf(key) >= 0)) {
|
|
236
|
+
if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
return target;
|
|
241
|
+
}
|
|
242
|
+
function _object_without_properties_loose(source, excluded) {
|
|
243
|
+
if (null == source) return {};
|
|
244
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
245
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
246
|
+
key = sourceKeys[i];
|
|
247
|
+
if (!(excluded.indexOf(key) >= 0)) {
|
|
248
|
+
if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
return target;
|
|
252
|
+
}
|
|
253
|
+
const PaginationRoot = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _1)=>{
|
|
254
|
+
let _ref = [
|
|
255
|
+
_0,
|
|
256
|
+
_1
|
|
257
|
+
], [_ref1, ..._rest] = _ref, {} = _ref1, rest = _extends({}, _ref1), [ref] = _rest;
|
|
258
|
+
const themedRef = (0, tokens_namespaceObject.useThemedRef)(ref);
|
|
259
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("nav", _object_spread({
|
|
260
|
+
ref: themedRef,
|
|
261
|
+
"aria-label": "Pagination"
|
|
262
|
+
}, rest));
|
|
263
|
+
});
|
|
264
|
+
PaginationRoot.displayName = 'PaginationRoot';
|
|
265
|
+
const PaginationList = (_0)=>{
|
|
266
|
+
let { className, children } = _0, rest = _object_without_properties(_0, [
|
|
267
|
+
"className",
|
|
268
|
+
"children"
|
|
269
|
+
]);
|
|
270
|
+
const listRef = (0, external_react_namespaceObject.useRef)(null);
|
|
271
|
+
const indicatorRef = (0, external_react_namespaceObject.useRef)(null);
|
|
272
|
+
const updateIndicator = (0, external_react_namespaceObject.useCallback)(()=>{
|
|
273
|
+
const listEl = listRef.current;
|
|
274
|
+
const indicatorEl = indicatorRef.current;
|
|
275
|
+
if (!listEl || !indicatorEl) return;
|
|
276
|
+
const activeLink = listEl.querySelector('[aria-current="page"]');
|
|
277
|
+
if (!activeLink) {
|
|
278
|
+
indicatorEl.style.opacity = '0';
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
indicatorEl.style.opacity = '1';
|
|
282
|
+
indicatorEl.style.transform = `translate(${String(activeLink.offsetLeft)}px, ${String(activeLink.offsetTop)}px)`;
|
|
283
|
+
indicatorEl.style.width = `${String(activeLink.offsetWidth)}px`;
|
|
284
|
+
indicatorEl.style.height = `${String(activeLink.offsetHeight)}px`;
|
|
285
|
+
}, []);
|
|
286
|
+
(0, external_react_namespaceObject.useLayoutEffect)(()=>{
|
|
287
|
+
updateIndicator();
|
|
288
|
+
const listEl = listRef.current;
|
|
289
|
+
if (!listEl) return;
|
|
290
|
+
const mutationObserver = new MutationObserver(updateIndicator);
|
|
291
|
+
mutationObserver.observe(listEl, {
|
|
292
|
+
attributes: true,
|
|
293
|
+
attributeFilter: [
|
|
294
|
+
'aria-current'
|
|
295
|
+
],
|
|
296
|
+
subtree: true
|
|
297
|
+
});
|
|
298
|
+
const resizeObserver = new ResizeObserver(updateIndicator);
|
|
299
|
+
resizeObserver.observe(listEl);
|
|
300
|
+
return ()=>{
|
|
301
|
+
mutationObserver.disconnect();
|
|
302
|
+
resizeObserver.disconnect();
|
|
303
|
+
};
|
|
304
|
+
}, [
|
|
305
|
+
updateIndicator
|
|
306
|
+
]);
|
|
307
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("ul", _object_spread_props(_object_spread({
|
|
308
|
+
ref: listRef,
|
|
309
|
+
className: className ? `${list} ${className}` : list
|
|
310
|
+
}, rest), {
|
|
311
|
+
children: [
|
|
312
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("li", {
|
|
313
|
+
ref: indicatorRef,
|
|
314
|
+
"aria-hidden": "true",
|
|
315
|
+
className: indicator
|
|
316
|
+
}),
|
|
317
|
+
children
|
|
318
|
+
]
|
|
319
|
+
}));
|
|
320
|
+
};
|
|
321
|
+
PaginationList.displayName = 'PaginationList';
|
|
322
|
+
const PaginationItem = (_0)=>{
|
|
323
|
+
let { className } = _0, rest = _object_without_properties(_0, [
|
|
324
|
+
"className"
|
|
325
|
+
]);
|
|
326
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("li", _object_spread({
|
|
327
|
+
className: className ? `${item} ${className}` : item
|
|
328
|
+
}, rest));
|
|
329
|
+
};
|
|
330
|
+
PaginationItem.displayName = 'PaginationItem';
|
|
331
|
+
const PaginationLink = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _1)=>{
|
|
332
|
+
let _ref = [
|
|
333
|
+
_0,
|
|
334
|
+
_1
|
|
335
|
+
], [_ref1, ..._rest] = _ref, { as: Component = 'button', active, className } = _ref1, rest = _object_without_properties(_ref1, [
|
|
336
|
+
"as",
|
|
337
|
+
"active",
|
|
338
|
+
"className"
|
|
339
|
+
]), [ref] = _rest;
|
|
340
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Component, _object_spread({
|
|
341
|
+
ref: ref,
|
|
342
|
+
className: className ? `${Pagination_css_link({
|
|
343
|
+
active
|
|
344
|
+
})} ${className}` : Pagination_css_link({
|
|
345
|
+
active
|
|
346
|
+
}),
|
|
347
|
+
"aria-current": active ? 'page' : void 0
|
|
348
|
+
}, rest));
|
|
349
|
+
});
|
|
350
|
+
PaginationLink.displayName = 'PaginationLink';
|
|
351
|
+
const PaginationEllipsis = (_0)=>{
|
|
352
|
+
let { className, children } = _0, rest = _object_without_properties(_0, [
|
|
353
|
+
"className",
|
|
354
|
+
"children"
|
|
355
|
+
]);
|
|
356
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", _object_spread_props(_object_spread({
|
|
357
|
+
"aria-hidden": "true",
|
|
358
|
+
className: className ? `${ellipsis} ${className}` : ellipsis
|
|
359
|
+
}, rest), {
|
|
360
|
+
children: null != children ? children : '…'
|
|
361
|
+
}));
|
|
362
|
+
};
|
|
363
|
+
PaginationEllipsis.displayName = 'PaginationEllipsis';
|
|
364
|
+
const PaginationPrevious = (_0)=>{
|
|
365
|
+
let { children } = _0, rest = _object_without_properties(_0, [
|
|
366
|
+
"children"
|
|
367
|
+
]);
|
|
368
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(PaginationLink, _object_spread_props(_object_spread({
|
|
369
|
+
"aria-label": "Previous page"
|
|
370
|
+
}, rest), {
|
|
371
|
+
children: null != children ? children : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.ChevronLeftIcon, {
|
|
372
|
+
className: boundaryIcon
|
|
373
|
+
})
|
|
374
|
+
}));
|
|
375
|
+
};
|
|
376
|
+
PaginationPrevious.displayName = 'PaginationPrevious';
|
|
377
|
+
const PaginationNext = (_0)=>{
|
|
378
|
+
let { children } = _0, rest = _object_without_properties(_0, [
|
|
379
|
+
"children"
|
|
380
|
+
]);
|
|
381
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(PaginationLink, _object_spread_props(_object_spread({
|
|
382
|
+
"aria-label": "Next page"
|
|
383
|
+
}, rest), {
|
|
384
|
+
children: null != children ? children : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.ChevronRightIcon, {
|
|
385
|
+
className: boundaryIcon
|
|
386
|
+
})
|
|
387
|
+
}));
|
|
388
|
+
};
|
|
389
|
+
PaginationNext.displayName = 'PaginationNext';
|
|
390
|
+
const PaginationImpl = (_0)=>{
|
|
391
|
+
let { page, totalPages, onPageChange, siblingCount = 1, boundaryCount = 1, getHref, linkComponent } = _0, rest = _object_without_properties(_0, [
|
|
392
|
+
"page",
|
|
393
|
+
"totalPages",
|
|
394
|
+
"onPageChange",
|
|
395
|
+
"siblingCount",
|
|
396
|
+
"boundaryCount",
|
|
397
|
+
"getHref",
|
|
398
|
+
"linkComponent"
|
|
399
|
+
]);
|
|
400
|
+
const pageRange = getPaginationRange(page, totalPages, siblingCount, boundaryCount);
|
|
401
|
+
const asProp = getHref ? null != linkComponent ? linkComponent : 'a' : 'button';
|
|
402
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(PaginationRoot, _object_spread_props(_object_spread({}, rest), {
|
|
403
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(PaginationList, {
|
|
404
|
+
children: [
|
|
405
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(PaginationItem, {
|
|
406
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(PaginationPrevious, {
|
|
407
|
+
as: asProp,
|
|
408
|
+
href: getHref && page > 1 ? getHref(page - 1) : void 0,
|
|
409
|
+
disabled: page <= 1,
|
|
410
|
+
onClick: ()=>{
|
|
411
|
+
if (page > 1) onPageChange(page - 1);
|
|
412
|
+
}
|
|
413
|
+
})
|
|
414
|
+
}),
|
|
415
|
+
pageRange.map((pageNumber, index)=>pageNumber === ELLIPSIS ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(PaginationItem, {
|
|
416
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(PaginationEllipsis, {})
|
|
417
|
+
}, `ellipsis-${String(index)}`) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(PaginationItem, {
|
|
418
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(PaginationLink, {
|
|
419
|
+
as: asProp,
|
|
420
|
+
href: null == getHref ? void 0 : getHref(pageNumber),
|
|
421
|
+
active: pageNumber === page,
|
|
422
|
+
onClick: ()=>{
|
|
423
|
+
onPageChange(pageNumber);
|
|
424
|
+
},
|
|
425
|
+
children: pageNumber
|
|
426
|
+
})
|
|
427
|
+
}, pageNumber)),
|
|
428
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(PaginationItem, {
|
|
429
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(PaginationNext, {
|
|
430
|
+
as: asProp,
|
|
431
|
+
href: getHref && page < totalPages ? getHref(page + 1) : void 0,
|
|
432
|
+
disabled: page >= totalPages,
|
|
433
|
+
onClick: ()=>{
|
|
434
|
+
if (page < totalPages) onPageChange(page + 1);
|
|
435
|
+
}
|
|
436
|
+
})
|
|
437
|
+
})
|
|
438
|
+
]
|
|
439
|
+
})
|
|
440
|
+
}));
|
|
441
|
+
};
|
|
442
|
+
PaginationImpl.displayName = 'Pagination';
|
|
443
|
+
const Pagination = Object.assign(PaginationImpl, {
|
|
444
|
+
Root: PaginationRoot,
|
|
445
|
+
List: PaginationList,
|
|
446
|
+
Item: PaginationItem,
|
|
447
|
+
Link: PaginationLink,
|
|
448
|
+
Previous: PaginationPrevious,
|
|
449
|
+
Next: PaginationNext,
|
|
450
|
+
Ellipsis: PaginationEllipsis
|
|
451
|
+
});
|
|
452
|
+
exports.ELLIPSIS = __webpack_exports__.ELLIPSIS;
|
|
453
|
+
exports.Pagination = __webpack_exports__.Pagination;
|
|
454
|
+
exports.getPaginationRange = __webpack_exports__.getPaginationRange;
|
|
455
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
456
|
+
"ELLIPSIS",
|
|
457
|
+
"Pagination",
|
|
458
|
+
"getPaginationRange"
|
|
459
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
460
|
+
Object.defineProperty(exports, '__esModule', {
|
|
461
|
+
value: true
|
|
462
|
+
});
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
.oewhtx0 {
|
|
2
|
+
align-items: center;
|
|
3
|
+
gap: var(--vinyasa-space1);
|
|
4
|
+
margin: 0;
|
|
5
|
+
padding: 0;
|
|
6
|
+
list-style: none;
|
|
7
|
+
display: flex;
|
|
8
|
+
position: relative;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.oewhtx1 {
|
|
12
|
+
display: flex;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.oewhtx2 {
|
|
16
|
+
z-index: 0;
|
|
17
|
+
border-radius: var(--vinyasa-radius-sm);
|
|
18
|
+
background-color: var(--vinyasa-tertiary);
|
|
19
|
+
opacity: 0;
|
|
20
|
+
transition: transform var(--vinyasa-motion-duration-fast) var(--vinyasa-motion-easing-standard), width var(--vinyasa-motion-duration-fast) var(--vinyasa-motion-easing-standard), height var(--vinyasa-motion-duration-fast) var(--vinyasa-motion-easing-standard), opacity var(--vinyasa-motion-duration-fast) var(--vinyasa-motion-easing-standard);
|
|
21
|
+
position: absolute;
|
|
22
|
+
top: 0;
|
|
23
|
+
left: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.oewhtx3 {
|
|
27
|
+
z-index: 1;
|
|
28
|
+
min-width: 2.25rem;
|
|
29
|
+
height: 2.25rem;
|
|
30
|
+
padding: 0 var(--vinyasa-space2);
|
|
31
|
+
border-radius: var(--vinyasa-radius-sm);
|
|
32
|
+
color: var(--vinyasa-text-muted);
|
|
33
|
+
font-family: var(--vinyasa-font-family-sans);
|
|
34
|
+
font-size: var(--vinyasa-font-size-sm);
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
transition: color var(--vinyasa-motion-duration-fast) var(--vinyasa-motion-easing-standard);
|
|
37
|
+
background-color: rgba(0, 0, 0, 0);
|
|
38
|
+
border: none;
|
|
39
|
+
justify-content: center;
|
|
40
|
+
align-items: center;
|
|
41
|
+
text-decoration: none;
|
|
42
|
+
display: inline-flex;
|
|
43
|
+
position: relative;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.oewhtx3:hover:not(:disabled) {
|
|
47
|
+
background-color: var(--vinyasa-secondary);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.oewhtx3:focus-visible {
|
|
51
|
+
outline: 2px solid var(--vinyasa-focus);
|
|
52
|
+
outline-offset: 2px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.oewhtx3:disabled {
|
|
56
|
+
opacity: var(--vinyasa-opacity-disabled);
|
|
57
|
+
cursor: not-allowed;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.oewhtx4 {
|
|
61
|
+
color: var(--vinyasa-on-tertiary);
|
|
62
|
+
font-weight: var(--vinyasa-font-weight-medium);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.oewhtx5 {
|
|
66
|
+
min-width: 2.25rem;
|
|
67
|
+
height: 2.25rem;
|
|
68
|
+
color: var(--vinyasa-text-muted);
|
|
69
|
+
font-size: var(--vinyasa-font-size-sm);
|
|
70
|
+
justify-content: center;
|
|
71
|
+
align-items: center;
|
|
72
|
+
display: inline-flex;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.oewhtx6 {
|
|
76
|
+
font-size: 1rem;
|
|
77
|
+
display: inline-flex;
|
|
78
|
+
}
|
|
79
|
+
|