@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.
Files changed (98) hide show
  1. package/README.md +45 -0
  2. package/dist/cjs/breadcrumbs.cjs +240 -0
  3. package/dist/cjs/breadcrumbs.css +58 -0
  4. package/dist/cjs/command-navigation.cjs +215 -0
  5. package/dist/cjs/command-navigation.css +46 -0
  6. package/dist/cjs/index.cjs +2681 -0
  7. package/dist/cjs/index.css +1162 -0
  8. package/dist/cjs/navigation-menu.cjs +302 -0
  9. package/dist/cjs/navigation-menu.css +197 -0
  10. package/dist/cjs/pagination.cjs +462 -0
  11. package/dist/cjs/pagination.css +79 -0
  12. package/dist/cjs/sidebar.cjs +476 -0
  13. package/dist/cjs/sidebar.css +171 -0
  14. package/dist/cjs/stepper.cjs +270 -0
  15. package/dist/cjs/stepper.css +153 -0
  16. package/dist/cjs/tabs.cjs +260 -0
  17. package/dist/cjs/tabs.css +122 -0
  18. package/dist/cjs/top-navigation.cjs +363 -0
  19. package/dist/cjs/top-navigation.css +127 -0
  20. package/dist/cjs/tree-view.cjs +373 -0
  21. package/dist/cjs/tree-view.css +109 -0
  22. package/dist/cjs/workspace-switcher.cjs +249 -0
  23. package/dist/cjs/workspace-switcher.css +100 -0
  24. package/dist/esm/217.css +79 -0
  25. package/dist/esm/217.js +202 -0
  26. package/dist/esm/294.css +100 -0
  27. package/dist/esm/294.js +114 -0
  28. package/dist/esm/375.css +153 -0
  29. package/dist/esm/375.js +120 -0
  30. package/dist/esm/555.css +171 -0
  31. package/dist/esm/555.js +232 -0
  32. package/dist/esm/655.css +58 -0
  33. package/dist/esm/655.js +87 -0
  34. package/dist/esm/66.css +46 -0
  35. package/dist/esm/66.js +92 -0
  36. package/dist/esm/694.css +109 -0
  37. package/dist/esm/694.js +227 -0
  38. package/dist/esm/814.css +197 -0
  39. package/dist/esm/814.js +146 -0
  40. package/dist/esm/862.css +127 -0
  41. package/dist/esm/862.js +130 -0
  42. package/dist/esm/913.css +119 -0
  43. package/dist/esm/913.js +121 -0
  44. package/dist/esm/953.js +87 -0
  45. package/dist/esm/breadcrumbs.d.ts +2 -0
  46. package/dist/esm/breadcrumbs.js +1 -0
  47. package/dist/esm/command-navigation.d.ts +2 -0
  48. package/dist/esm/command-navigation.js +1 -0
  49. package/dist/esm/components/breadcrumbs/Breadcrumbs.css.d.ts +6 -0
  50. package/dist/esm/components/breadcrumbs/Breadcrumbs.d.ts +58 -0
  51. package/dist/esm/components/breadcrumbs/index.d.ts +1 -0
  52. package/dist/esm/components/command-navigation/CommandNavigation.css.d.ts +4 -0
  53. package/dist/esm/components/command-navigation/CommandNavigation.d.ts +50 -0
  54. package/dist/esm/components/command-navigation/index.d.ts +1 -0
  55. package/dist/esm/components/navigation-menu/NavigationMenu.css.d.ts +13 -0
  56. package/dist/esm/components/navigation-menu/NavigationMenu.d.ts +69 -0
  57. package/dist/esm/components/navigation-menu/index.d.ts +1 -0
  58. package/dist/esm/components/pagination/Pagination.css.d.ts +13 -0
  59. package/dist/esm/components/pagination/Pagination.d.ts +69 -0
  60. package/dist/esm/components/pagination/getPaginationRange.d.ts +15 -0
  61. package/dist/esm/components/pagination/index.d.ts +2 -0
  62. package/dist/esm/components/sidebar/Sidebar.css.d.ts +60 -0
  63. package/dist/esm/components/sidebar/Sidebar.d.ts +82 -0
  64. package/dist/esm/components/sidebar/index.d.ts +1 -0
  65. package/dist/esm/components/stepper/Stepper.css.d.ts +10 -0
  66. package/dist/esm/components/stepper/Stepper.d.ts +57 -0
  67. package/dist/esm/components/stepper/index.d.ts +1 -0
  68. package/dist/esm/components/tabs/Tabs.css.d.ts +6 -0
  69. package/dist/esm/components/tabs/Tabs.d.ts +39 -0
  70. package/dist/esm/components/tabs/index.d.ts +1 -0
  71. package/dist/esm/components/top-navigation/TopNavigation.css.d.ts +13 -0
  72. package/dist/esm/components/top-navigation/TopNavigation.d.ts +67 -0
  73. package/dist/esm/components/top-navigation/index.d.ts +1 -0
  74. package/dist/esm/components/tree-view/TreeView.css.d.ts +8 -0
  75. package/dist/esm/components/tree-view/TreeView.d.ts +43 -0
  76. package/dist/esm/components/tree-view/index.d.ts +1 -0
  77. package/dist/esm/components/workspace-switcher/WorkspaceSwitcher.css.d.ts +9 -0
  78. package/dist/esm/components/workspace-switcher/WorkspaceSwitcher.d.ts +43 -0
  79. package/dist/esm/components/workspace-switcher/index.d.ts +1 -0
  80. package/dist/esm/index.d.ts +10 -0
  81. package/dist/esm/index.js +10 -0
  82. package/dist/esm/navigation-menu.d.ts +2 -0
  83. package/dist/esm/navigation-menu.js +1 -0
  84. package/dist/esm/pagination.d.ts +2 -0
  85. package/dist/esm/pagination.js +1 -0
  86. package/dist/esm/sidebar.d.ts +2 -0
  87. package/dist/esm/sidebar.js +1 -0
  88. package/dist/esm/stepper.d.ts +2 -0
  89. package/dist/esm/stepper.js +1 -0
  90. package/dist/esm/tabs.d.ts +2 -0
  91. package/dist/esm/tabs.js +1 -0
  92. package/dist/esm/top-navigation.d.ts +2 -0
  93. package/dist/esm/top-navigation.js +1 -0
  94. package/dist/esm/tree-view.d.ts +2 -0
  95. package/dist/esm/tree-view.js +1 -0
  96. package/dist/esm/workspace-switcher.d.ts +2 -0
  97. package/dist/esm/workspace-switcher.js +1 -0
  98. package/package.json +146 -0
@@ -0,0 +1,2681 @@
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
+ Breadcrumbs: ()=>Breadcrumbs,
32
+ CommandNavigation: ()=>CommandNavigation,
33
+ ELLIPSIS: ()=>ELLIPSIS,
34
+ NavigationMenu: ()=>NavigationMenu,
35
+ Pagination: ()=>Pagination,
36
+ Sidebar: ()=>Sidebar,
37
+ Stepper: ()=>Stepper,
38
+ Tabs: ()=>Tabs,
39
+ TopNavigation: ()=>TopNavigation,
40
+ TreeView: ()=>TreeView,
41
+ WorkspaceSwitcher: ()=>WorkspaceSwitcher,
42
+ avatarImage: ()=>avatarImage,
43
+ getPaginationRange: ()=>getPaginationRange,
44
+ useSidebarCollapsed: ()=>useSidebarCollapsed
45
+ });
46
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
47
+ const icons_namespaceObject = require("@vinyasa/icons");
48
+ const tokens_namespaceObject = require("@vinyasa/tokens");
49
+ const external_react_namespaceObject = require("react");
50
+ function toPrimitive(t, r) {
51
+ if ("object" != typeof t || !t) return t;
52
+ var e = t[Symbol.toPrimitive];
53
+ if (void 0 !== e) {
54
+ var i = e.call(t, r || "default");
55
+ if ("object" != typeof i) return i;
56
+ throw new TypeError("@@toPrimitive must return a primitive value.");
57
+ }
58
+ return ("string" === r ? String : Number)(t);
59
+ }
60
+ function toPropertyKey(t) {
61
+ var i = toPrimitive(t, "string");
62
+ return "symbol" == typeof i ? i : String(i);
63
+ }
64
+ function _defineProperty(obj, key, value) {
65
+ key = toPropertyKey(key);
66
+ if (key in obj) Object.defineProperty(obj, key, {
67
+ value: value,
68
+ enumerable: true,
69
+ configurable: true,
70
+ writable: true
71
+ });
72
+ else obj[key] = value;
73
+ return obj;
74
+ }
75
+ function createRuntimeFn_62c9670f_esm_ownKeys(e, r) {
76
+ var t = Object.keys(e);
77
+ if (Object.getOwnPropertySymbols) {
78
+ var o = Object.getOwnPropertySymbols(e);
79
+ r && (o = o.filter(function(r) {
80
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
81
+ })), t.push.apply(t, o);
82
+ }
83
+ return t;
84
+ }
85
+ function _objectSpread2(e) {
86
+ for(var r = 1; r < arguments.length; r++){
87
+ var t = null != arguments[r] ? arguments[r] : {};
88
+ r % 2 ? createRuntimeFn_62c9670f_esm_ownKeys(Object(t), !0).forEach(function(r) {
89
+ _defineProperty(e, r, t[r]);
90
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : createRuntimeFn_62c9670f_esm_ownKeys(Object(t)).forEach(function(r) {
91
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
92
+ });
93
+ }
94
+ return e;
95
+ }
96
+ function mapValues(input, fn) {
97
+ var result = {};
98
+ for(var _key in input)result[_key] = fn(input[_key], _key);
99
+ return result;
100
+ }
101
+ var shouldApplyCompound = (compoundCheck, selections, defaultVariants)=>{
102
+ for (var key of Object.keys(compoundCheck)){
103
+ var _selections$key;
104
+ if (compoundCheck[key] !== (null != (_selections$key = selections[key]) ? _selections$key : defaultVariants[key])) return false;
105
+ }
106
+ return true;
107
+ };
108
+ var createRuntimeFn = (config)=>{
109
+ var runtimeFn = (options)=>{
110
+ var className = config.defaultClassName;
111
+ var selections = _objectSpread2(_objectSpread2({}, config.defaultVariants), options);
112
+ for(var variantName in selections){
113
+ var _selections$variantNa;
114
+ var variantSelection = null != (_selections$variantNa = selections[variantName]) ? _selections$variantNa : config.defaultVariants[variantName];
115
+ if (null != variantSelection) {
116
+ var selection = variantSelection;
117
+ if ('boolean' == typeof selection) selection = true === selection ? 'true' : 'false';
118
+ var selectionClassName = config.variantClassNames[variantName][selection];
119
+ if (selectionClassName) className += ' ' + selectionClassName;
120
+ }
121
+ }
122
+ for (var [compoundCheck, compoundClassName] of config.compoundVariants)if (shouldApplyCompound(compoundCheck, selections, config.defaultVariants)) className += ' ' + compoundClassName;
123
+ return className;
124
+ };
125
+ runtimeFn.variants = ()=>Object.keys(config.variantClassNames);
126
+ runtimeFn.classNames = {
127
+ get base () {
128
+ return config.defaultClassName.split(' ')[0];
129
+ },
130
+ get variants () {
131
+ return mapValues(config.variantClassNames, (classNames)=>mapValues(classNames, (className)=>className.split(' ')[0]));
132
+ }
133
+ };
134
+ return runtimeFn;
135
+ };
136
+ var collapseTrigger = '_1nqk067i';
137
+ var collapseTriggerIcon = createRuntimeFn({
138
+ defaultClassName: '_1nqk067j',
139
+ variantClassNames: {
140
+ collapsed: {
141
+ true: '_1nqk067k'
142
+ }
143
+ },
144
+ defaultVariants: {},
145
+ compoundVariants: []
146
+ });
147
+ var content = '_1nqk0675';
148
+ var footer = '_1nqk0676';
149
+ var header = '_1nqk0673';
150
+ var Sidebar_css_item = createRuntimeFn({
151
+ defaultClassName: '_1nqk067b',
152
+ variantClassNames: {
153
+ active: {
154
+ true: '_1nqk067c'
155
+ },
156
+ collapsed: {
157
+ true: '_1nqk067d'
158
+ }
159
+ },
160
+ defaultVariants: {},
161
+ compoundVariants: []
162
+ });
163
+ var itemIcon = '_1nqk067e';
164
+ var itemLabel = createRuntimeFn({
165
+ defaultClassName: '_1nqk067f',
166
+ variantClassNames: {
167
+ collapsed: {
168
+ true: '_1nqk067g',
169
+ false: '_1nqk067h'
170
+ }
171
+ },
172
+ defaultVariants: {},
173
+ compoundVariants: []
174
+ });
175
+ var root = createRuntimeFn({
176
+ defaultClassName: '_1nqk0670',
177
+ variantClassNames: {
178
+ collapsed: {
179
+ true: '_1nqk0671',
180
+ false: '_1nqk0672'
181
+ }
182
+ },
183
+ defaultVariants: {
184
+ collapsed: false
185
+ },
186
+ compoundVariants: []
187
+ });
188
+ var section = '_1nqk0677';
189
+ var sectionLabel = createRuntimeFn({
190
+ defaultClassName: '_1nqk0678',
191
+ variantClassNames: {
192
+ collapsed: {
193
+ true: '_1nqk0679',
194
+ false: '_1nqk067a'
195
+ }
196
+ },
197
+ defaultVariants: {},
198
+ compoundVariants: []
199
+ });
200
+ var truncatedContent = '_1nqk0674';
201
+ function _define_property(obj, key, value) {
202
+ if (key in obj) Object.defineProperty(obj, key, {
203
+ value: value,
204
+ enumerable: true,
205
+ configurable: true,
206
+ writable: true
207
+ });
208
+ else obj[key] = value;
209
+ return obj;
210
+ }
211
+ function _object_spread(target) {
212
+ for(var i = 1; i < arguments.length; i++){
213
+ var source = null != arguments[i] ? arguments[i] : {};
214
+ var ownKeys = Object.keys(source);
215
+ if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
216
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
217
+ }));
218
+ ownKeys.forEach(function(key) {
219
+ _define_property(target, key, source[key]);
220
+ });
221
+ }
222
+ return target;
223
+ }
224
+ function Sidebar_ownKeys(object, enumerableOnly) {
225
+ var keys = Object.keys(object);
226
+ if (Object.getOwnPropertySymbols) {
227
+ var symbols = Object.getOwnPropertySymbols(object);
228
+ if (enumerableOnly) symbols = symbols.filter(function(sym) {
229
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
230
+ });
231
+ keys.push.apply(keys, symbols);
232
+ }
233
+ return keys;
234
+ }
235
+ function _object_spread_props(target, source) {
236
+ source = null != source ? source : {};
237
+ if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
238
+ else Sidebar_ownKeys(Object(source)).forEach(function(key) {
239
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
240
+ });
241
+ return target;
242
+ }
243
+ function _object_without_properties(source, excluded) {
244
+ if (null == source) return {};
245
+ var target = {}, sourceKeys, key, i;
246
+ if ("u" > typeof Reflect && Reflect.ownKeys) {
247
+ sourceKeys = Reflect.ownKeys(Object(source));
248
+ for(i = 0; i < sourceKeys.length; i++){
249
+ key = sourceKeys[i];
250
+ if (!(excluded.indexOf(key) >= 0)) {
251
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
252
+ }
253
+ }
254
+ return target;
255
+ }
256
+ target = _object_without_properties_loose(source, excluded);
257
+ if (Object.getOwnPropertySymbols) {
258
+ sourceKeys = Object.getOwnPropertySymbols(source);
259
+ for(i = 0; i < sourceKeys.length; i++){
260
+ key = sourceKeys[i];
261
+ if (!(excluded.indexOf(key) >= 0)) {
262
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
263
+ }
264
+ }
265
+ }
266
+ return target;
267
+ }
268
+ function _object_without_properties_loose(source, excluded) {
269
+ if (null == source) return {};
270
+ var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
271
+ for(i = 0; i < sourceKeys.length; i++){
272
+ key = sourceKeys[i];
273
+ if (!(excluded.indexOf(key) >= 0)) {
274
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
275
+ }
276
+ }
277
+ return target;
278
+ }
279
+ const SidebarContext = /*#__PURE__*/ (0, external_react_namespaceObject.createContext)(null);
280
+ const useSidebarContext = ()=>{
281
+ const context = (0, external_react_namespaceObject.useContext)(SidebarContext);
282
+ if (!context) throw new Error('Sidebar parts must be rendered inside <Sidebar.Root>.');
283
+ return context;
284
+ };
285
+ const useSidebarCollapsed = ()=>useSidebarContext().collapsed;
286
+ const SidebarRoot = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _1)=>{
287
+ let _ref = [
288
+ _0,
289
+ _1
290
+ ], [_ref1, ..._rest] = _ref, { collapsed: collapsedProp, defaultCollapsed = false, onCollapsedChange, className, children } = _ref1, rest = _object_without_properties(_ref1, [
291
+ "collapsed",
292
+ "defaultCollapsed",
293
+ "onCollapsedChange",
294
+ "className",
295
+ "children"
296
+ ]), [ref] = _rest;
297
+ const [internalCollapsed, setInternalCollapsed] = (0, external_react_namespaceObject.useState)(defaultCollapsed);
298
+ const isControlled = void 0 !== collapsedProp;
299
+ const collapsed = isControlled ? collapsedProp : internalCollapsed;
300
+ const themedRef = (0, tokens_namespaceObject.useThemedRef)(ref);
301
+ const setCollapsed = (next)=>{
302
+ if (!isControlled) setInternalCollapsed(next);
303
+ null == onCollapsedChange || onCollapsedChange(next);
304
+ };
305
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(SidebarContext.Provider, {
306
+ value: {
307
+ collapsed,
308
+ setCollapsed
309
+ },
310
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("nav", _object_spread_props(_object_spread({
311
+ ref: themedRef,
312
+ className: className ? `${root({
313
+ collapsed
314
+ })} ${className}` : root({
315
+ collapsed
316
+ })
317
+ }, rest), {
318
+ children: children
319
+ }))
320
+ });
321
+ });
322
+ SidebarRoot.displayName = 'SidebarRoot';
323
+ const SidebarHeader = (_0)=>{
324
+ let { className } = _0, rest = _object_without_properties(_0, [
325
+ "className"
326
+ ]);
327
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", _object_spread({
328
+ className: className ? `${header} ${className}` : header
329
+ }, rest));
330
+ };
331
+ SidebarHeader.displayName = 'SidebarHeader';
332
+ const SidebarContent = (_0)=>{
333
+ let { className } = _0, rest = _object_without_properties(_0, [
334
+ "className"
335
+ ]);
336
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", _object_spread({
337
+ className: className ? `${content} ${className}` : content
338
+ }, rest));
339
+ };
340
+ SidebarContent.displayName = 'SidebarContent';
341
+ const SidebarFooter = (_0)=>{
342
+ let { className } = _0, rest = _object_without_properties(_0, [
343
+ "className"
344
+ ]);
345
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", _object_spread({
346
+ className: className ? `${footer} ${className}` : footer
347
+ }, rest));
348
+ };
349
+ SidebarFooter.displayName = 'SidebarFooter';
350
+ const SidebarSection = (_0)=>{
351
+ let { label, className, children } = _0, rest = _object_without_properties(_0, [
352
+ "label",
353
+ "className",
354
+ "children"
355
+ ]);
356
+ const collapsed = useSidebarCollapsed();
357
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", _object_spread_props(_object_spread({
358
+ className: className ? `${section} ${className}` : section
359
+ }, rest), {
360
+ children: [
361
+ label ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
362
+ className: sectionLabel({
363
+ collapsed
364
+ }),
365
+ children: label
366
+ }) : null,
367
+ children
368
+ ]
369
+ }));
370
+ };
371
+ SidebarSection.displayName = 'SidebarSection';
372
+ const SidebarItem = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _1)=>{
373
+ let _ref = [
374
+ _0,
375
+ _1
376
+ ], [_ref1, ..._rest] = _ref, { as: Component = 'button', icon, active, className, children, title } = _ref1, rest = _object_without_properties(_ref1, [
377
+ "as",
378
+ "icon",
379
+ "active",
380
+ "className",
381
+ "children",
382
+ "title"
383
+ ]), [ref] = _rest;
384
+ const collapsed = useSidebarCollapsed();
385
+ const classes = className ? `${Sidebar_css_item({
386
+ active,
387
+ collapsed
388
+ })} ${className}` : Sidebar_css_item({
389
+ active,
390
+ collapsed
391
+ });
392
+ const resolvedTitle = null != title ? title : collapsed && 'string' == typeof children ? children : void 0;
393
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(Component, _object_spread_props(_object_spread({
394
+ ref: ref,
395
+ className: classes,
396
+ title: resolvedTitle
397
+ }, rest), {
398
+ children: [
399
+ icon ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
400
+ className: itemIcon,
401
+ children: icon
402
+ }) : null,
403
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
404
+ className: itemLabel({
405
+ collapsed
406
+ }),
407
+ children: children
408
+ })
409
+ ]
410
+ }));
411
+ });
412
+ SidebarItem.displayName = 'SidebarItem';
413
+ const SidebarCollapseTrigger = (_0)=>{
414
+ let { className } = _0, rest = _object_without_properties(_0, [
415
+ "className"
416
+ ]);
417
+ const { collapsed, setCollapsed } = useSidebarContext();
418
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", _object_spread_props(_object_spread({
419
+ type: "button",
420
+ className: className ? `${collapseTrigger} ${className}` : collapseTrigger,
421
+ "aria-label": collapsed ? 'Expand sidebar' : 'Collapse sidebar',
422
+ onClick: ()=>{
423
+ setCollapsed(!collapsed);
424
+ }
425
+ }, rest), {
426
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.ChevronLeftIcon, {
427
+ className: collapseTriggerIcon({
428
+ collapsed
429
+ })
430
+ })
431
+ }));
432
+ };
433
+ SidebarCollapseTrigger.displayName = 'SidebarCollapseTrigger';
434
+ const SidebarImpl = ({ header: headerContent, footer: footerContent, sections, collapsible = true, linkComponent, collapsed, defaultCollapsed, onCollapsedChange })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(SidebarRoot, {
435
+ collapsed: collapsed,
436
+ defaultCollapsed: defaultCollapsed,
437
+ onCollapsedChange: onCollapsedChange,
438
+ children: [
439
+ headerContent || collapsible ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(SidebarHeader, {
440
+ children: [
441
+ headerContent ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
442
+ className: truncatedContent,
443
+ children: headerContent
444
+ }) : null,
445
+ collapsible ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(SidebarCollapseTrigger, {}) : null
446
+ ]
447
+ }) : null,
448
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(SidebarContent, {
449
+ children: sections.map((sectionSpec)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(SidebarSection, {
450
+ label: sectionSpec.label,
451
+ children: sectionSpec.items.map((itemSpec)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(SidebarItem, {
452
+ as: itemSpec.href ? null != linkComponent ? linkComponent : 'a' : 'button',
453
+ href: itemSpec.href,
454
+ icon: itemSpec.icon,
455
+ active: itemSpec.active,
456
+ disabled: itemSpec.disabled,
457
+ onClick: itemSpec.onClick,
458
+ children: itemSpec.label
459
+ }, itemSpec.key))
460
+ }, sectionSpec.key))
461
+ }),
462
+ footerContent ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(SidebarFooter, {
463
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
464
+ className: truncatedContent,
465
+ children: footerContent
466
+ })
467
+ }) : null
468
+ ]
469
+ });
470
+ SidebarImpl.displayName = 'Sidebar';
471
+ const Sidebar = Object.assign(SidebarImpl, {
472
+ Root: SidebarRoot,
473
+ Header: SidebarHeader,
474
+ Content: SidebarContent,
475
+ Section: SidebarSection,
476
+ Item: SidebarItem,
477
+ Footer: SidebarFooter,
478
+ CollapseTrigger: SidebarCollapseTrigger
479
+ });
480
+ var actions = '_383lbb3';
481
+ var brand = '_383lbb1';
482
+ var TopNavigation_css_content = '_383lbb2';
483
+ var TopNavigation_css_item = createRuntimeFn({
484
+ defaultClassName: '_383lbb4',
485
+ variantClassNames: {
486
+ active: {
487
+ true: '_383lbb5'
488
+ }
489
+ },
490
+ defaultVariants: {},
491
+ compoundVariants: []
492
+ });
493
+ var mobileTrigger = '_383lbb6';
494
+ var TopNavigation_css_root = '_383lbb0';
495
+ function TopNavigation_define_property(obj, key, value) {
496
+ if (key in obj) Object.defineProperty(obj, key, {
497
+ value: value,
498
+ enumerable: true,
499
+ configurable: true,
500
+ writable: true
501
+ });
502
+ else obj[key] = value;
503
+ return obj;
504
+ }
505
+ function TopNavigation_object_spread(target) {
506
+ for(var i = 1; i < arguments.length; i++){
507
+ var source = null != arguments[i] ? arguments[i] : {};
508
+ var ownKeys = Object.keys(source);
509
+ if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
510
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
511
+ }));
512
+ ownKeys.forEach(function(key) {
513
+ TopNavigation_define_property(target, key, source[key]);
514
+ });
515
+ }
516
+ return target;
517
+ }
518
+ function TopNavigation_ownKeys(object, enumerableOnly) {
519
+ var keys = Object.keys(object);
520
+ if (Object.getOwnPropertySymbols) {
521
+ var symbols = Object.getOwnPropertySymbols(object);
522
+ if (enumerableOnly) symbols = symbols.filter(function(sym) {
523
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
524
+ });
525
+ keys.push.apply(keys, symbols);
526
+ }
527
+ return keys;
528
+ }
529
+ function TopNavigation_object_spread_props(target, source) {
530
+ source = null != source ? source : {};
531
+ if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
532
+ else TopNavigation_ownKeys(Object(source)).forEach(function(key) {
533
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
534
+ });
535
+ return target;
536
+ }
537
+ function TopNavigation_object_without_properties(source, excluded) {
538
+ if (null == source) return {};
539
+ var target = {}, sourceKeys, key, i;
540
+ if ("u" > typeof Reflect && Reflect.ownKeys) {
541
+ sourceKeys = Reflect.ownKeys(Object(source));
542
+ for(i = 0; i < sourceKeys.length; i++){
543
+ key = sourceKeys[i];
544
+ if (!(excluded.indexOf(key) >= 0)) {
545
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
546
+ }
547
+ }
548
+ return target;
549
+ }
550
+ target = TopNavigation_object_without_properties_loose(source, excluded);
551
+ if (Object.getOwnPropertySymbols) {
552
+ sourceKeys = Object.getOwnPropertySymbols(source);
553
+ for(i = 0; i < sourceKeys.length; i++){
554
+ key = sourceKeys[i];
555
+ if (!(excluded.indexOf(key) >= 0)) {
556
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
557
+ }
558
+ }
559
+ }
560
+ return target;
561
+ }
562
+ function TopNavigation_object_without_properties_loose(source, excluded) {
563
+ if (null == source) return {};
564
+ var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
565
+ for(i = 0; i < sourceKeys.length; i++){
566
+ key = sourceKeys[i];
567
+ if (!(excluded.indexOf(key) >= 0)) {
568
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
569
+ }
570
+ }
571
+ return target;
572
+ }
573
+ const TopNavigationContext = /*#__PURE__*/ (0, external_react_namespaceObject.createContext)(null);
574
+ const useTopNavigationContext = ()=>{
575
+ const context = (0, external_react_namespaceObject.useContext)(TopNavigationContext);
576
+ if (!context) throw new Error('TopNavigation parts must be rendered inside <TopNavigation.Root>.');
577
+ return context;
578
+ };
579
+ const TopNavigationRoot = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _1)=>{
580
+ let _ref = [
581
+ _0,
582
+ _1
583
+ ], [_ref1, ..._rest] = _ref, { open: openProp, defaultOpen = false, onOpenChange, className, children } = _ref1, rest = TopNavigation_object_without_properties(_ref1, [
584
+ "open",
585
+ "defaultOpen",
586
+ "onOpenChange",
587
+ "className",
588
+ "children"
589
+ ]), [ref] = _rest;
590
+ const [internalOpen, setInternalOpen] = (0, external_react_namespaceObject.useState)(defaultOpen);
591
+ const isControlled = void 0 !== openProp;
592
+ const open = isControlled ? openProp : internalOpen;
593
+ const themedRef = (0, tokens_namespaceObject.useThemedRef)(ref);
594
+ const setOpen = (next)=>{
595
+ if (!isControlled) setInternalOpen(next);
596
+ null == onOpenChange || onOpenChange(next);
597
+ };
598
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TopNavigationContext.Provider, {
599
+ value: {
600
+ open,
601
+ setOpen
602
+ },
603
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("nav", TopNavigation_object_spread_props(TopNavigation_object_spread({
604
+ ref: themedRef,
605
+ className: className ? `${TopNavigation_css_root} ${className}` : TopNavigation_css_root
606
+ }, rest), {
607
+ children: children
608
+ }))
609
+ });
610
+ });
611
+ TopNavigationRoot.displayName = 'TopNavigationRoot';
612
+ const TopNavigationBrand = (_0)=>{
613
+ let { as: Component = 'a', className } = _0, rest = TopNavigation_object_without_properties(_0, [
614
+ "as",
615
+ "className"
616
+ ]);
617
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Component, TopNavigation_object_spread({
618
+ className: className ? `${brand} ${className}` : brand
619
+ }, rest));
620
+ };
621
+ TopNavigationBrand.displayName = 'TopNavigationBrand';
622
+ const TopNavigationContent = (_0)=>{
623
+ let { className } = _0, rest = TopNavigation_object_without_properties(_0, [
624
+ "className"
625
+ ]);
626
+ const { open } = useTopNavigationContext();
627
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", TopNavigation_object_spread({
628
+ "data-open": open,
629
+ className: className ? `${TopNavigation_css_content} ${className}` : TopNavigation_css_content
630
+ }, rest));
631
+ };
632
+ TopNavigationContent.displayName = 'TopNavigationContent';
633
+ const TopNavigationActions = (_0)=>{
634
+ let { className } = _0, rest = TopNavigation_object_without_properties(_0, [
635
+ "className"
636
+ ]);
637
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", TopNavigation_object_spread({
638
+ className: className ? `${actions} ${className}` : actions
639
+ }, rest));
640
+ };
641
+ TopNavigationActions.displayName = 'TopNavigationActions';
642
+ const TopNavigationItem = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _1)=>{
643
+ let _ref = [
644
+ _0,
645
+ _1
646
+ ], [_ref1, ..._rest] = _ref, { as: Component = 'button', active, className } = _ref1, rest = TopNavigation_object_without_properties(_ref1, [
647
+ "as",
648
+ "active",
649
+ "className"
650
+ ]), [ref] = _rest;
651
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Component, TopNavigation_object_spread({
652
+ ref: ref,
653
+ className: className ? `${TopNavigation_css_item({
654
+ active
655
+ })} ${className}` : TopNavigation_css_item({
656
+ active
657
+ })
658
+ }, rest));
659
+ });
660
+ TopNavigationItem.displayName = 'TopNavigationItem';
661
+ const TopNavigationMobileTrigger = (_0)=>{
662
+ let { className } = _0, rest = TopNavigation_object_without_properties(_0, [
663
+ "className"
664
+ ]);
665
+ const { open, setOpen } = useTopNavigationContext();
666
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", TopNavigation_object_spread_props(TopNavigation_object_spread({
667
+ type: "button",
668
+ className: className ? `${mobileTrigger} ${className}` : mobileTrigger,
669
+ "aria-label": open ? 'Close menu' : 'Open menu',
670
+ "aria-expanded": open,
671
+ onClick: ()=>{
672
+ setOpen(!open);
673
+ }
674
+ }, rest), {
675
+ children: open ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.XIcon, {}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.MenuIcon, {})
676
+ }));
677
+ };
678
+ TopNavigationMobileTrigger.displayName = 'TopNavigationMobileTrigger';
679
+ const TopNavigationImpl = ({ brand: brandContent, brandHref, items, actions: actionsContent, linkComponent, open, defaultOpen, onOpenChange })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(TopNavigationRoot, {
680
+ open: open,
681
+ defaultOpen: defaultOpen,
682
+ onOpenChange: onOpenChange,
683
+ children: [
684
+ brandContent ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TopNavigationBrand, {
685
+ as: linkComponent,
686
+ href: brandHref,
687
+ children: brandContent
688
+ }) : null,
689
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TopNavigationContent, {
690
+ children: items.map((itemSpec)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TopNavigationItem, {
691
+ as: itemSpec.href ? null != linkComponent ? linkComponent : 'a' : 'button',
692
+ href: itemSpec.href,
693
+ active: itemSpec.active,
694
+ disabled: itemSpec.disabled,
695
+ onClick: itemSpec.onClick,
696
+ children: itemSpec.label
697
+ }, itemSpec.key))
698
+ }),
699
+ actionsContent ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TopNavigationActions, {
700
+ children: actionsContent
701
+ }) : null,
702
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TopNavigationMobileTrigger, {})
703
+ ]
704
+ });
705
+ TopNavigationImpl.displayName = 'TopNavigation';
706
+ const TopNavigation = Object.assign(TopNavigationImpl, {
707
+ Root: TopNavigationRoot,
708
+ Brand: TopNavigationBrand,
709
+ Content: TopNavigationContent,
710
+ Item: TopNavigationItem,
711
+ Actions: TopNavigationActions,
712
+ MobileTrigger: TopNavigationMobileTrigger
713
+ });
714
+ const react_tabs_namespaceObject = require("@radix-ui/react-tabs");
715
+ var Tabs_css_content = '_1n0eqzz5';
716
+ var contentGroup = '_1n0eqzz6';
717
+ var indicator = '_1n0eqzz2';
718
+ var list = '_1n0eqzz1';
719
+ var Tabs_css_root = '_1n0eqzz0';
720
+ var trigger = '_1n0eqzz3';
721
+ function Tabs_define_property(obj, key, value) {
722
+ if (key in obj) Object.defineProperty(obj, key, {
723
+ value: value,
724
+ enumerable: true,
725
+ configurable: true,
726
+ writable: true
727
+ });
728
+ else obj[key] = value;
729
+ return obj;
730
+ }
731
+ function Tabs_object_spread(target) {
732
+ for(var i = 1; i < arguments.length; i++){
733
+ var source = null != arguments[i] ? arguments[i] : {};
734
+ var ownKeys = Object.keys(source);
735
+ if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
736
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
737
+ }));
738
+ ownKeys.forEach(function(key) {
739
+ Tabs_define_property(target, key, source[key]);
740
+ });
741
+ }
742
+ return target;
743
+ }
744
+ function Tabs_ownKeys(object, enumerableOnly) {
745
+ var keys = Object.keys(object);
746
+ if (Object.getOwnPropertySymbols) {
747
+ var symbols = Object.getOwnPropertySymbols(object);
748
+ if (enumerableOnly) symbols = symbols.filter(function(sym) {
749
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
750
+ });
751
+ keys.push.apply(keys, symbols);
752
+ }
753
+ return keys;
754
+ }
755
+ function Tabs_object_spread_props(target, source) {
756
+ source = null != source ? source : {};
757
+ if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
758
+ else Tabs_ownKeys(Object(source)).forEach(function(key) {
759
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
760
+ });
761
+ return target;
762
+ }
763
+ function Tabs_object_without_properties(source, excluded) {
764
+ if (null == source) return {};
765
+ var target = {}, sourceKeys, key, i;
766
+ if ("u" > typeof Reflect && Reflect.ownKeys) {
767
+ sourceKeys = Reflect.ownKeys(Object(source));
768
+ for(i = 0; i < sourceKeys.length; i++){
769
+ key = sourceKeys[i];
770
+ if (!(excluded.indexOf(key) >= 0)) {
771
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
772
+ }
773
+ }
774
+ return target;
775
+ }
776
+ target = Tabs_object_without_properties_loose(source, excluded);
777
+ if (Object.getOwnPropertySymbols) {
778
+ sourceKeys = Object.getOwnPropertySymbols(source);
779
+ for(i = 0; i < sourceKeys.length; i++){
780
+ key = sourceKeys[i];
781
+ if (!(excluded.indexOf(key) >= 0)) {
782
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
783
+ }
784
+ }
785
+ }
786
+ return target;
787
+ }
788
+ function Tabs_object_without_properties_loose(source, excluded) {
789
+ if (null == source) return {};
790
+ var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
791
+ for(i = 0; i < sourceKeys.length; i++){
792
+ key = sourceKeys[i];
793
+ if (!(excluded.indexOf(key) >= 0)) {
794
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
795
+ }
796
+ }
797
+ return target;
798
+ }
799
+ const TabsRoot = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _1)=>{
800
+ let _ref = [
801
+ _0,
802
+ _1
803
+ ], [_ref1, ..._rest] = _ref, { className } = _ref1, rest = Tabs_object_without_properties(_ref1, [
804
+ "className"
805
+ ]), [ref] = _rest;
806
+ const themedRef = (0, tokens_namespaceObject.useThemedRef)(ref);
807
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_tabs_namespaceObject.Root, Tabs_object_spread({
808
+ ref: themedRef,
809
+ className: className ? `${Tabs_css_root} ${className}` : Tabs_css_root
810
+ }, rest));
811
+ });
812
+ TabsRoot.displayName = 'TabsRoot';
813
+ const TabsList = (_0)=>{
814
+ let { className, children } = _0, rest = Tabs_object_without_properties(_0, [
815
+ "className",
816
+ "children"
817
+ ]);
818
+ const listRef = (0, external_react_namespaceObject.useRef)(null);
819
+ const indicatorRef = (0, external_react_namespaceObject.useRef)(null);
820
+ const updateIndicator = (0, external_react_namespaceObject.useCallback)(()=>{
821
+ const listEl = listRef.current;
822
+ const indicatorEl = indicatorRef.current;
823
+ if (!listEl || !indicatorEl) return;
824
+ const activeTab = listEl.querySelector('[role="tab"][data-state="active"]');
825
+ if (!activeTab) {
826
+ indicatorEl.style.opacity = '0';
827
+ return;
828
+ }
829
+ indicatorEl.style.opacity = '1';
830
+ if ('vertical' === listEl.getAttribute('data-orientation')) {
831
+ indicatorEl.style.transform = `translateY(${String(activeTab.offsetTop)}px)`;
832
+ indicatorEl.style.height = `${String(activeTab.offsetHeight)}px`;
833
+ } else {
834
+ indicatorEl.style.transform = `translateX(${String(activeTab.offsetLeft)}px)`;
835
+ indicatorEl.style.width = `${String(activeTab.offsetWidth)}px`;
836
+ }
837
+ }, []);
838
+ (0, external_react_namespaceObject.useLayoutEffect)(()=>{
839
+ updateIndicator();
840
+ const listEl = listRef.current;
841
+ if (!listEl) return;
842
+ const mutationObserver = new MutationObserver(updateIndicator);
843
+ mutationObserver.observe(listEl, {
844
+ attributes: true,
845
+ attributeFilter: [
846
+ 'data-state'
847
+ ],
848
+ subtree: true
849
+ });
850
+ const resizeObserver = new ResizeObserver(updateIndicator);
851
+ resizeObserver.observe(listEl);
852
+ return ()=>{
853
+ mutationObserver.disconnect();
854
+ resizeObserver.disconnect();
855
+ };
856
+ }, [
857
+ updateIndicator
858
+ ]);
859
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_tabs_namespaceObject.List, Tabs_object_spread_props(Tabs_object_spread({
860
+ ref: listRef,
861
+ className: className ? `${list} ${className}` : list
862
+ }, rest), {
863
+ children: [
864
+ children,
865
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
866
+ ref: indicatorRef,
867
+ className: indicator,
868
+ "aria-hidden": true
869
+ })
870
+ ]
871
+ }));
872
+ };
873
+ TabsList.displayName = 'TabsList';
874
+ const TabsTrigger = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _1)=>{
875
+ let _ref = [
876
+ _0,
877
+ _1
878
+ ], [_ref1, ..._rest] = _ref, { className } = _ref1, rest = Tabs_object_without_properties(_ref1, [
879
+ "className"
880
+ ]), [ref] = _rest;
881
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_tabs_namespaceObject.Trigger, Tabs_object_spread({
882
+ ref: ref,
883
+ className: className ? `${trigger} ${className}` : trigger
884
+ }, rest));
885
+ });
886
+ TabsTrigger.displayName = 'TabsTrigger';
887
+ const TabsContent = (_0)=>{
888
+ let { className } = _0, rest = Tabs_object_without_properties(_0, [
889
+ "className"
890
+ ]);
891
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_tabs_namespaceObject.Content, Tabs_object_spread({
892
+ forceMount: true,
893
+ className: className ? `${Tabs_css_content} ${className}` : Tabs_css_content
894
+ }, rest));
895
+ };
896
+ TabsContent.displayName = 'TabsContent';
897
+ const TabsContentGroup = ({ children, className })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
898
+ className: className ? `${contentGroup} ${className}` : contentGroup,
899
+ children: children
900
+ });
901
+ TabsContentGroup.displayName = 'TabsContentGroup';
902
+ const TabsImpl = (_0)=>{
903
+ let { tabs } = _0, rest = Tabs_object_without_properties(_0, [
904
+ "tabs"
905
+ ]);
906
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(TabsRoot, Tabs_object_spread_props(Tabs_object_spread({}, rest), {
907
+ children: [
908
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TabsList, {
909
+ children: tabs.map((tab)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TabsTrigger, {
910
+ value: tab.value,
911
+ disabled: tab.disabled,
912
+ children: tab.label
913
+ }, tab.value))
914
+ }),
915
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TabsContentGroup, {
916
+ children: tabs.map((tab)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TabsContent, {
917
+ value: tab.value,
918
+ children: tab.content
919
+ }, tab.value))
920
+ })
921
+ ]
922
+ }));
923
+ };
924
+ TabsImpl.displayName = 'Tabs';
925
+ const Tabs = Object.assign(TabsImpl, {
926
+ Root: TabsRoot,
927
+ List: TabsList,
928
+ Trigger: TabsTrigger,
929
+ Content: TabsContent,
930
+ ContentGroup: TabsContentGroup
931
+ });
932
+ var Breadcrumbs_css_item = '_48ex311';
933
+ var Breadcrumbs_css_link = '_48ex312';
934
+ var Breadcrumbs_css_list = '_48ex310';
935
+ var Breadcrumbs_css_page = '_48ex313';
936
+ var separator = '_48ex314';
937
+ var truncatedLabel = '_48ex315';
938
+ function Breadcrumbs_define_property(obj, key, value) {
939
+ if (key in obj) Object.defineProperty(obj, key, {
940
+ value: value,
941
+ enumerable: true,
942
+ configurable: true,
943
+ writable: true
944
+ });
945
+ else obj[key] = value;
946
+ return obj;
947
+ }
948
+ function Breadcrumbs_object_spread(target) {
949
+ for(var i = 1; i < arguments.length; i++){
950
+ var source = null != arguments[i] ? arguments[i] : {};
951
+ var ownKeys = Object.keys(source);
952
+ if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
953
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
954
+ }));
955
+ ownKeys.forEach(function(key) {
956
+ Breadcrumbs_define_property(target, key, source[key]);
957
+ });
958
+ }
959
+ return target;
960
+ }
961
+ function Breadcrumbs_ownKeys(object, enumerableOnly) {
962
+ var keys = Object.keys(object);
963
+ if (Object.getOwnPropertySymbols) {
964
+ var symbols = Object.getOwnPropertySymbols(object);
965
+ if (enumerableOnly) symbols = symbols.filter(function(sym) {
966
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
967
+ });
968
+ keys.push.apply(keys, symbols);
969
+ }
970
+ return keys;
971
+ }
972
+ function Breadcrumbs_object_spread_props(target, source) {
973
+ source = null != source ? source : {};
974
+ if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
975
+ else Breadcrumbs_ownKeys(Object(source)).forEach(function(key) {
976
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
977
+ });
978
+ return target;
979
+ }
980
+ function Breadcrumbs_object_without_properties(source, excluded) {
981
+ if (null == source) return {};
982
+ var target = {}, sourceKeys, key, i;
983
+ if ("u" > typeof Reflect && Reflect.ownKeys) {
984
+ sourceKeys = Reflect.ownKeys(Object(source));
985
+ for(i = 0; i < sourceKeys.length; i++){
986
+ key = sourceKeys[i];
987
+ if (!(excluded.indexOf(key) >= 0)) {
988
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
989
+ }
990
+ }
991
+ return target;
992
+ }
993
+ target = Breadcrumbs_object_without_properties_loose(source, excluded);
994
+ if (Object.getOwnPropertySymbols) {
995
+ sourceKeys = Object.getOwnPropertySymbols(source);
996
+ for(i = 0; i < sourceKeys.length; i++){
997
+ key = sourceKeys[i];
998
+ if (!(excluded.indexOf(key) >= 0)) {
999
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
1000
+ }
1001
+ }
1002
+ }
1003
+ return target;
1004
+ }
1005
+ function Breadcrumbs_object_without_properties_loose(source, excluded) {
1006
+ if (null == source) return {};
1007
+ var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
1008
+ for(i = 0; i < sourceKeys.length; i++){
1009
+ key = sourceKeys[i];
1010
+ if (!(excluded.indexOf(key) >= 0)) {
1011
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
1012
+ }
1013
+ }
1014
+ return target;
1015
+ }
1016
+ const BreadcrumbsRoot = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _1)=>{
1017
+ let _ref = [
1018
+ _0,
1019
+ _1
1020
+ ], [_ref1, ..._rest] = _ref, { label = 'Breadcrumb' } = _ref1, rest = Breadcrumbs_object_without_properties(_ref1, [
1021
+ "label"
1022
+ ]), [ref] = _rest;
1023
+ const themedRef = (0, tokens_namespaceObject.useThemedRef)(ref);
1024
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("nav", Breadcrumbs_object_spread({
1025
+ ref: themedRef,
1026
+ "aria-label": label
1027
+ }, rest));
1028
+ });
1029
+ BreadcrumbsRoot.displayName = 'BreadcrumbsRoot';
1030
+ const BreadcrumbsList = (_0)=>{
1031
+ let { className } = _0, rest = Breadcrumbs_object_without_properties(_0, [
1032
+ "className"
1033
+ ]);
1034
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("ol", Breadcrumbs_object_spread({
1035
+ className: className ? `${Breadcrumbs_css_list} ${className}` : Breadcrumbs_css_list
1036
+ }, rest));
1037
+ };
1038
+ BreadcrumbsList.displayName = 'BreadcrumbsList';
1039
+ const BreadcrumbsItem = (_0)=>{
1040
+ let { className } = _0, rest = Breadcrumbs_object_without_properties(_0, [
1041
+ "className"
1042
+ ]);
1043
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("li", Breadcrumbs_object_spread({
1044
+ className: className ? `${Breadcrumbs_css_item} ${className}` : Breadcrumbs_css_item
1045
+ }, rest));
1046
+ };
1047
+ BreadcrumbsItem.displayName = 'BreadcrumbsItem';
1048
+ const BreadcrumbsLink = (_0)=>{
1049
+ let { as: Component = 'a', className } = _0, rest = Breadcrumbs_object_without_properties(_0, [
1050
+ "as",
1051
+ "className"
1052
+ ]);
1053
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Component, Breadcrumbs_object_spread({
1054
+ className: className ? `${Breadcrumbs_css_link} ${className}` : Breadcrumbs_css_link
1055
+ }, rest));
1056
+ };
1057
+ BreadcrumbsLink.displayName = 'BreadcrumbsLink';
1058
+ const BreadcrumbsPage = (_0)=>{
1059
+ let { className } = _0, rest = Breadcrumbs_object_without_properties(_0, [
1060
+ "className"
1061
+ ]);
1062
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", Breadcrumbs_object_spread({
1063
+ className: className ? `${Breadcrumbs_css_page} ${className}` : Breadcrumbs_css_page,
1064
+ "aria-current": "page"
1065
+ }, rest));
1066
+ };
1067
+ BreadcrumbsPage.displayName = 'BreadcrumbsPage';
1068
+ const BreadcrumbsSeparator = (_0)=>{
1069
+ let { className, children } = _0, rest = Breadcrumbs_object_without_properties(_0, [
1070
+ "className",
1071
+ "children"
1072
+ ]);
1073
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("li", Breadcrumbs_object_spread_props(Breadcrumbs_object_spread({
1074
+ "aria-hidden": "true",
1075
+ className: className ? `${separator} ${className}` : separator
1076
+ }, rest), {
1077
+ children: null != children ? children : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.ChevronRightIcon, {})
1078
+ }));
1079
+ };
1080
+ BreadcrumbsSeparator.displayName = 'BreadcrumbsSeparator';
1081
+ const BreadcrumbsImpl = (_0)=>{
1082
+ let { items, separator: separatorNode, linkComponent, label, className } = _0, rest = Breadcrumbs_object_without_properties(_0, [
1083
+ "items",
1084
+ "separator",
1085
+ "linkComponent",
1086
+ "label",
1087
+ "className"
1088
+ ]);
1089
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(BreadcrumbsRoot, Breadcrumbs_object_spread_props(Breadcrumbs_object_spread({
1090
+ label: label,
1091
+ className: className
1092
+ }, rest), {
1093
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(BreadcrumbsList, {
1094
+ children: items.map((itemSpec, index)=>{
1095
+ var _itemSpec_key;
1096
+ const isLast = index === items.length - 1;
1097
+ const key = null != (_itemSpec_key = itemSpec.key) ? _itemSpec_key : 'string' == typeof itemSpec.label ? itemSpec.label : index;
1098
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_react_namespaceObject.Fragment, {
1099
+ children: [
1100
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(BreadcrumbsItem, {
1101
+ children: isLast ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(BreadcrumbsPage, {
1102
+ className: truncatedLabel,
1103
+ children: itemSpec.label
1104
+ }) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(BreadcrumbsLink, {
1105
+ as: null != linkComponent ? linkComponent : 'a',
1106
+ href: itemSpec.href,
1107
+ className: truncatedLabel,
1108
+ children: itemSpec.label
1109
+ })
1110
+ }),
1111
+ isLast ? null : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(BreadcrumbsSeparator, {
1112
+ children: separatorNode
1113
+ })
1114
+ ]
1115
+ }, key);
1116
+ })
1117
+ })
1118
+ }));
1119
+ };
1120
+ BreadcrumbsImpl.displayName = 'Breadcrumbs';
1121
+ const Breadcrumbs = Object.assign(BreadcrumbsImpl, {
1122
+ Root: BreadcrumbsRoot,
1123
+ List: BreadcrumbsList,
1124
+ Item: BreadcrumbsItem,
1125
+ Link: BreadcrumbsLink,
1126
+ Page: BreadcrumbsPage,
1127
+ Separator: BreadcrumbsSeparator
1128
+ });
1129
+ const ELLIPSIS = 'ellipsis';
1130
+ const range = (start, end)=>Array.from({
1131
+ length: Math.max(0, end - start + 1)
1132
+ }, (_, index)=>start + index);
1133
+ const getPaginationRange = (page, totalPages, siblingCount = 1, boundaryCount = 1)=>{
1134
+ const startPages = range(1, Math.min(boundaryCount, totalPages));
1135
+ const endPages = range(Math.max(totalPages - boundaryCount + 1, boundaryCount + 1), totalPages);
1136
+ const siblingsStart = Math.max(Math.min(page - siblingCount, totalPages - boundaryCount - 2 * siblingCount - 1), boundaryCount + 2);
1137
+ const siblingsEnd = Math.min(Math.max(page + siblingCount, boundaryCount + 2 * siblingCount + 2), endPages.length > 0 ? endPages[0] - 2 : totalPages - 1);
1138
+ return [
1139
+ ...startPages,
1140
+ ...siblingsStart > boundaryCount + 2 ? [
1141
+ ELLIPSIS
1142
+ ] : boundaryCount + 1 < totalPages - boundaryCount ? [
1143
+ boundaryCount + 1
1144
+ ] : [],
1145
+ ...range(siblingsStart, siblingsEnd),
1146
+ ...siblingsEnd < totalPages - boundaryCount - 1 ? [
1147
+ ELLIPSIS
1148
+ ] : totalPages - boundaryCount > boundaryCount ? [
1149
+ totalPages - boundaryCount
1150
+ ] : [],
1151
+ ...endPages
1152
+ ];
1153
+ };
1154
+ var boundaryIcon = 'oewhtx6';
1155
+ var ellipsis = 'oewhtx5';
1156
+ var Pagination_css_indicator = 'oewhtx2';
1157
+ var Pagination_css_item = 'oewhtx1';
1158
+ var Pagination_css_link = createRuntimeFn({
1159
+ defaultClassName: 'oewhtx3',
1160
+ variantClassNames: {
1161
+ active: {
1162
+ true: 'oewhtx4'
1163
+ }
1164
+ },
1165
+ defaultVariants: {},
1166
+ compoundVariants: []
1167
+ });
1168
+ var Pagination_css_list = 'oewhtx0';
1169
+ function Pagination_define_property(obj, key, value) {
1170
+ if (key in obj) Object.defineProperty(obj, key, {
1171
+ value: value,
1172
+ enumerable: true,
1173
+ configurable: true,
1174
+ writable: true
1175
+ });
1176
+ else obj[key] = value;
1177
+ return obj;
1178
+ }
1179
+ function _extends() {
1180
+ _extends = Object.assign || function(target) {
1181
+ for(var i = 1; i < arguments.length; i++){
1182
+ var source = arguments[i];
1183
+ for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
1184
+ }
1185
+ return target;
1186
+ };
1187
+ return _extends.apply(this, arguments);
1188
+ }
1189
+ function Pagination_object_spread(target) {
1190
+ for(var i = 1; i < arguments.length; i++){
1191
+ var source = null != arguments[i] ? arguments[i] : {};
1192
+ var ownKeys = Object.keys(source);
1193
+ if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
1194
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1195
+ }));
1196
+ ownKeys.forEach(function(key) {
1197
+ Pagination_define_property(target, key, source[key]);
1198
+ });
1199
+ }
1200
+ return target;
1201
+ }
1202
+ function Pagination_ownKeys(object, enumerableOnly) {
1203
+ var keys = Object.keys(object);
1204
+ if (Object.getOwnPropertySymbols) {
1205
+ var symbols = Object.getOwnPropertySymbols(object);
1206
+ if (enumerableOnly) symbols = symbols.filter(function(sym) {
1207
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
1208
+ });
1209
+ keys.push.apply(keys, symbols);
1210
+ }
1211
+ return keys;
1212
+ }
1213
+ function Pagination_object_spread_props(target, source) {
1214
+ source = null != source ? source : {};
1215
+ if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1216
+ else Pagination_ownKeys(Object(source)).forEach(function(key) {
1217
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1218
+ });
1219
+ return target;
1220
+ }
1221
+ function Pagination_object_without_properties(source, excluded) {
1222
+ if (null == source) return {};
1223
+ var target = {}, sourceKeys, key, i;
1224
+ if ("u" > typeof Reflect && Reflect.ownKeys) {
1225
+ sourceKeys = Reflect.ownKeys(Object(source));
1226
+ for(i = 0; i < sourceKeys.length; i++){
1227
+ key = sourceKeys[i];
1228
+ if (!(excluded.indexOf(key) >= 0)) {
1229
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
1230
+ }
1231
+ }
1232
+ return target;
1233
+ }
1234
+ target = Pagination_object_without_properties_loose(source, excluded);
1235
+ if (Object.getOwnPropertySymbols) {
1236
+ sourceKeys = Object.getOwnPropertySymbols(source);
1237
+ for(i = 0; i < sourceKeys.length; i++){
1238
+ key = sourceKeys[i];
1239
+ if (!(excluded.indexOf(key) >= 0)) {
1240
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
1241
+ }
1242
+ }
1243
+ }
1244
+ return target;
1245
+ }
1246
+ function Pagination_object_without_properties_loose(source, excluded) {
1247
+ if (null == source) return {};
1248
+ var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
1249
+ for(i = 0; i < sourceKeys.length; i++){
1250
+ key = sourceKeys[i];
1251
+ if (!(excluded.indexOf(key) >= 0)) {
1252
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
1253
+ }
1254
+ }
1255
+ return target;
1256
+ }
1257
+ const PaginationRoot = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _1)=>{
1258
+ let _ref = [
1259
+ _0,
1260
+ _1
1261
+ ], [_ref1, ..._rest] = _ref, {} = _ref1, rest = _extends({}, _ref1), [ref] = _rest;
1262
+ const themedRef = (0, tokens_namespaceObject.useThemedRef)(ref);
1263
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("nav", Pagination_object_spread({
1264
+ ref: themedRef,
1265
+ "aria-label": "Pagination"
1266
+ }, rest));
1267
+ });
1268
+ PaginationRoot.displayName = 'PaginationRoot';
1269
+ const PaginationList = (_0)=>{
1270
+ let { className, children } = _0, rest = Pagination_object_without_properties(_0, [
1271
+ "className",
1272
+ "children"
1273
+ ]);
1274
+ const listRef = (0, external_react_namespaceObject.useRef)(null);
1275
+ const indicatorRef = (0, external_react_namespaceObject.useRef)(null);
1276
+ const updateIndicator = (0, external_react_namespaceObject.useCallback)(()=>{
1277
+ const listEl = listRef.current;
1278
+ const indicatorEl = indicatorRef.current;
1279
+ if (!listEl || !indicatorEl) return;
1280
+ const activeLink = listEl.querySelector('[aria-current="page"]');
1281
+ if (!activeLink) {
1282
+ indicatorEl.style.opacity = '0';
1283
+ return;
1284
+ }
1285
+ indicatorEl.style.opacity = '1';
1286
+ indicatorEl.style.transform = `translate(${String(activeLink.offsetLeft)}px, ${String(activeLink.offsetTop)}px)`;
1287
+ indicatorEl.style.width = `${String(activeLink.offsetWidth)}px`;
1288
+ indicatorEl.style.height = `${String(activeLink.offsetHeight)}px`;
1289
+ }, []);
1290
+ (0, external_react_namespaceObject.useLayoutEffect)(()=>{
1291
+ updateIndicator();
1292
+ const listEl = listRef.current;
1293
+ if (!listEl) return;
1294
+ const mutationObserver = new MutationObserver(updateIndicator);
1295
+ mutationObserver.observe(listEl, {
1296
+ attributes: true,
1297
+ attributeFilter: [
1298
+ 'aria-current'
1299
+ ],
1300
+ subtree: true
1301
+ });
1302
+ const resizeObserver = new ResizeObserver(updateIndicator);
1303
+ resizeObserver.observe(listEl);
1304
+ return ()=>{
1305
+ mutationObserver.disconnect();
1306
+ resizeObserver.disconnect();
1307
+ };
1308
+ }, [
1309
+ updateIndicator
1310
+ ]);
1311
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("ul", Pagination_object_spread_props(Pagination_object_spread({
1312
+ ref: listRef,
1313
+ className: className ? `${Pagination_css_list} ${className}` : Pagination_css_list
1314
+ }, rest), {
1315
+ children: [
1316
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("li", {
1317
+ ref: indicatorRef,
1318
+ "aria-hidden": "true",
1319
+ className: Pagination_css_indicator
1320
+ }),
1321
+ children
1322
+ ]
1323
+ }));
1324
+ };
1325
+ PaginationList.displayName = 'PaginationList';
1326
+ const PaginationItem = (_0)=>{
1327
+ let { className } = _0, rest = Pagination_object_without_properties(_0, [
1328
+ "className"
1329
+ ]);
1330
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("li", Pagination_object_spread({
1331
+ className: className ? `${Pagination_css_item} ${className}` : Pagination_css_item
1332
+ }, rest));
1333
+ };
1334
+ PaginationItem.displayName = 'PaginationItem';
1335
+ const PaginationLink = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _1)=>{
1336
+ let _ref = [
1337
+ _0,
1338
+ _1
1339
+ ], [_ref1, ..._rest] = _ref, { as: Component = 'button', active, className } = _ref1, rest = Pagination_object_without_properties(_ref1, [
1340
+ "as",
1341
+ "active",
1342
+ "className"
1343
+ ]), [ref] = _rest;
1344
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Component, Pagination_object_spread({
1345
+ ref: ref,
1346
+ className: className ? `${Pagination_css_link({
1347
+ active
1348
+ })} ${className}` : Pagination_css_link({
1349
+ active
1350
+ }),
1351
+ "aria-current": active ? 'page' : void 0
1352
+ }, rest));
1353
+ });
1354
+ PaginationLink.displayName = 'PaginationLink';
1355
+ const PaginationEllipsis = (_0)=>{
1356
+ let { className, children } = _0, rest = Pagination_object_without_properties(_0, [
1357
+ "className",
1358
+ "children"
1359
+ ]);
1360
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", Pagination_object_spread_props(Pagination_object_spread({
1361
+ "aria-hidden": "true",
1362
+ className: className ? `${ellipsis} ${className}` : ellipsis
1363
+ }, rest), {
1364
+ children: null != children ? children : '…'
1365
+ }));
1366
+ };
1367
+ PaginationEllipsis.displayName = 'PaginationEllipsis';
1368
+ const PaginationPrevious = (_0)=>{
1369
+ let { children } = _0, rest = Pagination_object_without_properties(_0, [
1370
+ "children"
1371
+ ]);
1372
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(PaginationLink, Pagination_object_spread_props(Pagination_object_spread({
1373
+ "aria-label": "Previous page"
1374
+ }, rest), {
1375
+ children: null != children ? children : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.ChevronLeftIcon, {
1376
+ className: boundaryIcon
1377
+ })
1378
+ }));
1379
+ };
1380
+ PaginationPrevious.displayName = 'PaginationPrevious';
1381
+ const PaginationNext = (_0)=>{
1382
+ let { children } = _0, rest = Pagination_object_without_properties(_0, [
1383
+ "children"
1384
+ ]);
1385
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(PaginationLink, Pagination_object_spread_props(Pagination_object_spread({
1386
+ "aria-label": "Next page"
1387
+ }, rest), {
1388
+ children: null != children ? children : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.ChevronRightIcon, {
1389
+ className: boundaryIcon
1390
+ })
1391
+ }));
1392
+ };
1393
+ PaginationNext.displayName = 'PaginationNext';
1394
+ const PaginationImpl = (_0)=>{
1395
+ let { page, totalPages, onPageChange, siblingCount = 1, boundaryCount = 1, getHref, linkComponent } = _0, rest = Pagination_object_without_properties(_0, [
1396
+ "page",
1397
+ "totalPages",
1398
+ "onPageChange",
1399
+ "siblingCount",
1400
+ "boundaryCount",
1401
+ "getHref",
1402
+ "linkComponent"
1403
+ ]);
1404
+ const pageRange = getPaginationRange(page, totalPages, siblingCount, boundaryCount);
1405
+ const asProp = getHref ? null != linkComponent ? linkComponent : 'a' : 'button';
1406
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(PaginationRoot, Pagination_object_spread_props(Pagination_object_spread({}, rest), {
1407
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(PaginationList, {
1408
+ children: [
1409
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(PaginationItem, {
1410
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(PaginationPrevious, {
1411
+ as: asProp,
1412
+ href: getHref && page > 1 ? getHref(page - 1) : void 0,
1413
+ disabled: page <= 1,
1414
+ onClick: ()=>{
1415
+ if (page > 1) onPageChange(page - 1);
1416
+ }
1417
+ })
1418
+ }),
1419
+ pageRange.map((pageNumber, index)=>pageNumber === ELLIPSIS ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(PaginationItem, {
1420
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(PaginationEllipsis, {})
1421
+ }, `ellipsis-${String(index)}`) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(PaginationItem, {
1422
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(PaginationLink, {
1423
+ as: asProp,
1424
+ href: null == getHref ? void 0 : getHref(pageNumber),
1425
+ active: pageNumber === page,
1426
+ onClick: ()=>{
1427
+ onPageChange(pageNumber);
1428
+ },
1429
+ children: pageNumber
1430
+ })
1431
+ }, pageNumber)),
1432
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(PaginationItem, {
1433
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(PaginationNext, {
1434
+ as: asProp,
1435
+ href: getHref && page < totalPages ? getHref(page + 1) : void 0,
1436
+ disabled: page >= totalPages,
1437
+ onClick: ()=>{
1438
+ if (page < totalPages) onPageChange(page + 1);
1439
+ }
1440
+ })
1441
+ })
1442
+ ]
1443
+ })
1444
+ }));
1445
+ };
1446
+ PaginationImpl.displayName = 'Pagination';
1447
+ const Pagination = Object.assign(PaginationImpl, {
1448
+ Root: PaginationRoot,
1449
+ List: PaginationList,
1450
+ Item: PaginationItem,
1451
+ Link: PaginationLink,
1452
+ Previous: PaginationPrevious,
1453
+ Next: PaginationNext,
1454
+ Ellipsis: PaginationEllipsis
1455
+ });
1456
+ const react_navigation_menu_namespaceObject = require("@radix-ui/react-navigation-menu");
1457
+ var NavigationMenu_css_content = 'bzjbii9';
1458
+ var contentGrid = 'bzjbiia';
1459
+ var contentLink = 'bzjbiib';
1460
+ var contentLinkDescription = 'bzjbiid';
1461
+ var contentLinkTitle = 'bzjbiic';
1462
+ var NavigationMenu_css_indicator = 'bzjbii5';
1463
+ var NavigationMenu_css_link = 'bzjbii4';
1464
+ var NavigationMenu_css_list = 'bzjbii1';
1465
+ var NavigationMenu_css_root = 'bzjbii0';
1466
+ var NavigationMenu_css_trigger = 'bzjbii2';
1467
+ var triggerIcon = 'bzjbii3';
1468
+ var viewport = 'bzjbii8';
1469
+ var viewportPosition = 'bzjbii6';
1470
+ function NavigationMenu_define_property(obj, key, value) {
1471
+ if (key in obj) Object.defineProperty(obj, key, {
1472
+ value: value,
1473
+ enumerable: true,
1474
+ configurable: true,
1475
+ writable: true
1476
+ });
1477
+ else obj[key] = value;
1478
+ return obj;
1479
+ }
1480
+ function NavigationMenu_object_spread(target) {
1481
+ for(var i = 1; i < arguments.length; i++){
1482
+ var source = null != arguments[i] ? arguments[i] : {};
1483
+ var ownKeys = Object.keys(source);
1484
+ if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
1485
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1486
+ }));
1487
+ ownKeys.forEach(function(key) {
1488
+ NavigationMenu_define_property(target, key, source[key]);
1489
+ });
1490
+ }
1491
+ return target;
1492
+ }
1493
+ function NavigationMenu_ownKeys(object, enumerableOnly) {
1494
+ var keys = Object.keys(object);
1495
+ if (Object.getOwnPropertySymbols) {
1496
+ var symbols = Object.getOwnPropertySymbols(object);
1497
+ if (enumerableOnly) symbols = symbols.filter(function(sym) {
1498
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
1499
+ });
1500
+ keys.push.apply(keys, symbols);
1501
+ }
1502
+ return keys;
1503
+ }
1504
+ function NavigationMenu_object_spread_props(target, source) {
1505
+ source = null != source ? source : {};
1506
+ if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1507
+ else NavigationMenu_ownKeys(Object(source)).forEach(function(key) {
1508
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1509
+ });
1510
+ return target;
1511
+ }
1512
+ function NavigationMenu_object_without_properties(source, excluded) {
1513
+ if (null == source) return {};
1514
+ var target = {}, sourceKeys, key, i;
1515
+ if ("u" > typeof Reflect && Reflect.ownKeys) {
1516
+ sourceKeys = Reflect.ownKeys(Object(source));
1517
+ for(i = 0; i < sourceKeys.length; i++){
1518
+ key = sourceKeys[i];
1519
+ if (!(excluded.indexOf(key) >= 0)) {
1520
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
1521
+ }
1522
+ }
1523
+ return target;
1524
+ }
1525
+ target = NavigationMenu_object_without_properties_loose(source, excluded);
1526
+ if (Object.getOwnPropertySymbols) {
1527
+ sourceKeys = Object.getOwnPropertySymbols(source);
1528
+ for(i = 0; i < sourceKeys.length; i++){
1529
+ key = sourceKeys[i];
1530
+ if (!(excluded.indexOf(key) >= 0)) {
1531
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
1532
+ }
1533
+ }
1534
+ }
1535
+ return target;
1536
+ }
1537
+ function NavigationMenu_object_without_properties_loose(source, excluded) {
1538
+ if (null == source) return {};
1539
+ var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
1540
+ for(i = 0; i < sourceKeys.length; i++){
1541
+ key = sourceKeys[i];
1542
+ if (!(excluded.indexOf(key) >= 0)) {
1543
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
1544
+ }
1545
+ }
1546
+ return target;
1547
+ }
1548
+ const NavigationMenuRoot = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _1)=>{
1549
+ let _ref = [
1550
+ _0,
1551
+ _1
1552
+ ], [_ref1, ..._rest] = _ref, { className, children } = _ref1, rest = NavigationMenu_object_without_properties(_ref1, [
1553
+ "className",
1554
+ "children"
1555
+ ]), [ref] = _rest;
1556
+ const themedRef = (0, tokens_namespaceObject.useThemedRef)(ref);
1557
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_navigation_menu_namespaceObject.Root, NavigationMenu_object_spread_props(NavigationMenu_object_spread({
1558
+ ref: themedRef,
1559
+ className: className ? `${NavigationMenu_css_root} ${className}` : NavigationMenu_css_root
1560
+ }, rest), {
1561
+ children: children
1562
+ }));
1563
+ });
1564
+ NavigationMenuRoot.displayName = 'NavigationMenuRoot';
1565
+ const NavigationMenuList = (_0)=>{
1566
+ let { className } = _0, rest = NavigationMenu_object_without_properties(_0, [
1567
+ "className"
1568
+ ]);
1569
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_navigation_menu_namespaceObject.List, NavigationMenu_object_spread({
1570
+ className: className ? `${NavigationMenu_css_list} ${className}` : NavigationMenu_css_list
1571
+ }, rest));
1572
+ };
1573
+ NavigationMenuList.displayName = 'NavigationMenuList';
1574
+ const NavigationMenuItem = react_navigation_menu_namespaceObject.Item;
1575
+ const NavigationMenuTrigger = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _1)=>{
1576
+ let _ref = [
1577
+ _0,
1578
+ _1
1579
+ ], [_ref1, ..._rest] = _ref, { className, children } = _ref1, rest = NavigationMenu_object_without_properties(_ref1, [
1580
+ "className",
1581
+ "children"
1582
+ ]), [ref] = _rest;
1583
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_navigation_menu_namespaceObject.Trigger, NavigationMenu_object_spread_props(NavigationMenu_object_spread({
1584
+ ref: ref,
1585
+ className: className ? `${NavigationMenu_css_trigger} ${className}` : NavigationMenu_css_trigger
1586
+ }, rest), {
1587
+ children: [
1588
+ children,
1589
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.ChevronDownIcon, {
1590
+ className: triggerIcon,
1591
+ "aria-hidden": true
1592
+ })
1593
+ ]
1594
+ }));
1595
+ });
1596
+ NavigationMenuTrigger.displayName = 'NavigationMenuTrigger';
1597
+ const NavigationMenuLink = (_0)=>{
1598
+ let { className } = _0, rest = NavigationMenu_object_without_properties(_0, [
1599
+ "className"
1600
+ ]);
1601
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_navigation_menu_namespaceObject.Link, NavigationMenu_object_spread({
1602
+ className: className ? `${NavigationMenu_css_link} ${className}` : NavigationMenu_css_link
1603
+ }, rest));
1604
+ };
1605
+ NavigationMenuLink.displayName = 'NavigationMenuLink';
1606
+ const NavigationMenuContent = (_0)=>{
1607
+ let { className } = _0, rest = NavigationMenu_object_without_properties(_0, [
1608
+ "className"
1609
+ ]);
1610
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_navigation_menu_namespaceObject.Content, NavigationMenu_object_spread({
1611
+ className: className ? `${NavigationMenu_css_content} ${className}` : NavigationMenu_css_content
1612
+ }, rest));
1613
+ };
1614
+ NavigationMenuContent.displayName = 'NavigationMenuContent';
1615
+ const NavigationMenuIndicator = (_0)=>{
1616
+ let { className } = _0, rest = NavigationMenu_object_without_properties(_0, [
1617
+ "className"
1618
+ ]);
1619
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_navigation_menu_namespaceObject.Indicator, NavigationMenu_object_spread({
1620
+ className: className ? `${NavigationMenu_css_indicator} ${className}` : NavigationMenu_css_indicator
1621
+ }, rest));
1622
+ };
1623
+ NavigationMenuIndicator.displayName = 'NavigationMenuIndicator';
1624
+ const NavigationMenuViewport = (_0)=>{
1625
+ let { className } = _0, rest = NavigationMenu_object_without_properties(_0, [
1626
+ "className"
1627
+ ]);
1628
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
1629
+ className: viewportPosition,
1630
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_navigation_menu_namespaceObject.Viewport, NavigationMenu_object_spread({
1631
+ className: className ? `${viewport} ${className}` : viewport
1632
+ }, rest))
1633
+ });
1634
+ };
1635
+ NavigationMenuViewport.displayName = 'NavigationMenuViewport';
1636
+ const SimpleLink = ({ href, active, linkComponent: Link, className, children })=>{
1637
+ if (Link) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(NavigationMenuLink, {
1638
+ asChild: true,
1639
+ active: active,
1640
+ className: className,
1641
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Link, {
1642
+ href: href,
1643
+ children: children
1644
+ })
1645
+ });
1646
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(NavigationMenuLink, {
1647
+ href: href,
1648
+ active: active,
1649
+ className: className,
1650
+ children: children
1651
+ });
1652
+ };
1653
+ const NavigationMenuImpl = (_0)=>{
1654
+ let { items, linkComponent } = _0, rest = NavigationMenu_object_without_properties(_0, [
1655
+ "items",
1656
+ "linkComponent"
1657
+ ]);
1658
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(NavigationMenuRoot, NavigationMenu_object_spread_props(NavigationMenu_object_spread({}, rest), {
1659
+ children: [
1660
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(NavigationMenuList, {
1661
+ children: [
1662
+ items.map((itemSpec)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(NavigationMenuItem, {
1663
+ children: itemSpec.links ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
1664
+ children: [
1665
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(NavigationMenuTrigger, {
1666
+ children: itemSpec.label
1667
+ }),
1668
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(NavigationMenuContent, {
1669
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
1670
+ className: contentGrid,
1671
+ children: itemSpec.links.map((linkSpec)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(SimpleLink, {
1672
+ href: linkSpec.href,
1673
+ active: linkSpec.active,
1674
+ linkComponent: linkComponent,
1675
+ className: contentLink,
1676
+ children: [
1677
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
1678
+ className: contentLinkTitle,
1679
+ children: linkSpec.label
1680
+ }),
1681
+ linkSpec.description ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
1682
+ className: contentLinkDescription,
1683
+ children: linkSpec.description
1684
+ }) : null
1685
+ ]
1686
+ }, linkSpec.key))
1687
+ })
1688
+ })
1689
+ ]
1690
+ }) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(SimpleLink, {
1691
+ href: itemSpec.href,
1692
+ active: itemSpec.active,
1693
+ linkComponent: linkComponent,
1694
+ children: itemSpec.label
1695
+ })
1696
+ }, itemSpec.key)),
1697
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(NavigationMenuIndicator, {})
1698
+ ]
1699
+ }),
1700
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(NavigationMenuViewport, {})
1701
+ ]
1702
+ }));
1703
+ };
1704
+ NavigationMenuImpl.displayName = 'NavigationMenu';
1705
+ const NavigationMenu = Object.assign(NavigationMenuImpl, {
1706
+ Root: NavigationMenuRoot,
1707
+ List: NavigationMenuList,
1708
+ Item: NavigationMenuItem,
1709
+ Trigger: NavigationMenuTrigger,
1710
+ Link: NavigationMenuLink,
1711
+ Content: NavigationMenuContent,
1712
+ Indicator: NavigationMenuIndicator,
1713
+ Viewport: NavigationMenuViewport
1714
+ });
1715
+ var connector = '_1szfqcu3';
1716
+ var Stepper_css_content = '_1szfqcu7';
1717
+ var description = '_1szfqcu9';
1718
+ var Stepper_css_indicator = '_1szfqcu4';
1719
+ var indicatorArea = '_1szfqcu2';
1720
+ var indicatorButton = '_1szfqcu6 _1szfqcu4';
1721
+ var indicatorIcon = '_1szfqcu5';
1722
+ var Stepper_css_label = '_1szfqcu8';
1723
+ var Stepper_css_root = '_1szfqcu0';
1724
+ var step = '_1szfqcu1';
1725
+ function Stepper_define_property(obj, key, value) {
1726
+ if (key in obj) Object.defineProperty(obj, key, {
1727
+ value: value,
1728
+ enumerable: true,
1729
+ configurable: true,
1730
+ writable: true
1731
+ });
1732
+ else obj[key] = value;
1733
+ return obj;
1734
+ }
1735
+ function Stepper_object_spread(target) {
1736
+ for(var i = 1; i < arguments.length; i++){
1737
+ var source = null != arguments[i] ? arguments[i] : {};
1738
+ var ownKeys = Object.keys(source);
1739
+ if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
1740
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1741
+ }));
1742
+ ownKeys.forEach(function(key) {
1743
+ Stepper_define_property(target, key, source[key]);
1744
+ });
1745
+ }
1746
+ return target;
1747
+ }
1748
+ function Stepper_ownKeys(object, enumerableOnly) {
1749
+ var keys = Object.keys(object);
1750
+ if (Object.getOwnPropertySymbols) {
1751
+ var symbols = Object.getOwnPropertySymbols(object);
1752
+ if (enumerableOnly) symbols = symbols.filter(function(sym) {
1753
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
1754
+ });
1755
+ keys.push.apply(keys, symbols);
1756
+ }
1757
+ return keys;
1758
+ }
1759
+ function Stepper_object_spread_props(target, source) {
1760
+ source = null != source ? source : {};
1761
+ if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1762
+ else Stepper_ownKeys(Object(source)).forEach(function(key) {
1763
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1764
+ });
1765
+ return target;
1766
+ }
1767
+ function Stepper_object_without_properties(source, excluded) {
1768
+ if (null == source) return {};
1769
+ var target = {}, sourceKeys, key, i;
1770
+ if ("u" > typeof Reflect && Reflect.ownKeys) {
1771
+ sourceKeys = Reflect.ownKeys(Object(source));
1772
+ for(i = 0; i < sourceKeys.length; i++){
1773
+ key = sourceKeys[i];
1774
+ if (!(excluded.indexOf(key) >= 0)) {
1775
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
1776
+ }
1777
+ }
1778
+ return target;
1779
+ }
1780
+ target = Stepper_object_without_properties_loose(source, excluded);
1781
+ if (Object.getOwnPropertySymbols) {
1782
+ sourceKeys = Object.getOwnPropertySymbols(source);
1783
+ for(i = 0; i < sourceKeys.length; i++){
1784
+ key = sourceKeys[i];
1785
+ if (!(excluded.indexOf(key) >= 0)) {
1786
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
1787
+ }
1788
+ }
1789
+ }
1790
+ return target;
1791
+ }
1792
+ function Stepper_object_without_properties_loose(source, excluded) {
1793
+ if (null == source) return {};
1794
+ var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
1795
+ for(i = 0; i < sourceKeys.length; i++){
1796
+ key = sourceKeys[i];
1797
+ if (!(excluded.indexOf(key) >= 0)) {
1798
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
1799
+ }
1800
+ }
1801
+ return target;
1802
+ }
1803
+ const StepperContext = /*#__PURE__*/ (0, external_react_namespaceObject.createContext)({
1804
+ orientation: 'horizontal'
1805
+ });
1806
+ const StepperRoot = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _1)=>{
1807
+ let _ref = [
1808
+ _0,
1809
+ _1
1810
+ ], [_ref1, ..._rest] = _ref, { orientation = 'horizontal', className } = _ref1, rest = Stepper_object_without_properties(_ref1, [
1811
+ "orientation",
1812
+ "className"
1813
+ ]), [ref] = _rest;
1814
+ const themedRef = (0, tokens_namespaceObject.useThemedRef)(ref);
1815
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(StepperContext.Provider, {
1816
+ value: {
1817
+ orientation
1818
+ },
1819
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("ol", Stepper_object_spread({
1820
+ ref: themedRef,
1821
+ "data-orientation": orientation,
1822
+ className: className ? `${Stepper_css_root} ${className}` : Stepper_css_root
1823
+ }, rest))
1824
+ });
1825
+ });
1826
+ StepperRoot.displayName = 'StepperRoot';
1827
+ const StepperStep = (_0)=>{
1828
+ let { state = 'upcoming', className } = _0, rest = Stepper_object_without_properties(_0, [
1829
+ "state",
1830
+ "className"
1831
+ ]);
1832
+ const { orientation } = (0, external_react_namespaceObject.useContext)(StepperContext);
1833
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("li", Stepper_object_spread({
1834
+ "data-state": state,
1835
+ "data-orientation": orientation,
1836
+ className: className ? `${step} ${className}` : step
1837
+ }, rest));
1838
+ };
1839
+ StepperStep.displayName = 'StepperStep';
1840
+ const StepperIndicator = (_0)=>{
1841
+ let { children, onClick, className } = _0, rest = Stepper_object_without_properties(_0, [
1842
+ "children",
1843
+ "onClick",
1844
+ "className"
1845
+ ]);
1846
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
1847
+ className: indicatorArea,
1848
+ children: [
1849
+ onClick ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", Stepper_object_spread_props(Stepper_object_spread({
1850
+ type: "button",
1851
+ onClick: onClick,
1852
+ className: className ? `${indicatorButton} ${className}` : indicatorButton
1853
+ }, rest), {
1854
+ children: children
1855
+ })) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
1856
+ className: className ? `${Stepper_css_indicator} ${className}` : Stepper_css_indicator,
1857
+ children: children
1858
+ }),
1859
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
1860
+ className: connector,
1861
+ "aria-hidden": "true"
1862
+ })
1863
+ ]
1864
+ });
1865
+ };
1866
+ StepperIndicator.displayName = 'StepperIndicator';
1867
+ const StepperContent = (_0)=>{
1868
+ let { className } = _0, rest = Stepper_object_without_properties(_0, [
1869
+ "className"
1870
+ ]);
1871
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", Stepper_object_spread({
1872
+ className: className ? `${Stepper_css_content} ${className}` : Stepper_css_content
1873
+ }, rest));
1874
+ };
1875
+ StepperContent.displayName = 'StepperContent';
1876
+ const StepperLabel = (_0)=>{
1877
+ let { className } = _0, rest = Stepper_object_without_properties(_0, [
1878
+ "className"
1879
+ ]);
1880
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", Stepper_object_spread({
1881
+ className: className ? `${Stepper_css_label} ${className}` : Stepper_css_label
1882
+ }, rest));
1883
+ };
1884
+ StepperLabel.displayName = 'StepperLabel';
1885
+ const StepperDescription = (_0)=>{
1886
+ let { className } = _0, rest = Stepper_object_without_properties(_0, [
1887
+ "className"
1888
+ ]);
1889
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", Stepper_object_spread({
1890
+ className: className ? `${description} ${className}` : description
1891
+ }, rest));
1892
+ };
1893
+ StepperDescription.displayName = "StepperDescription";
1894
+ const StepperImpl = (_0)=>{
1895
+ let { steps, activeStep, onStepClick } = _0, rest = Stepper_object_without_properties(_0, [
1896
+ "steps",
1897
+ "activeStep",
1898
+ "onStepClick"
1899
+ ]);
1900
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(StepperRoot, Stepper_object_spread_props(Stepper_object_spread({}, rest), {
1901
+ children: steps.map((stepSpec, index)=>{
1902
+ var _stepSpec_key;
1903
+ const state = stepSpec.error ? 'error' : index < activeStep ? 'completed' : index === activeStep ? 'current' : 'upcoming';
1904
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(StepperStep, {
1905
+ state: state,
1906
+ children: [
1907
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(StepperIndicator, {
1908
+ onClick: onStepClick ? ()=>{
1909
+ onStepClick(index);
1910
+ } : void 0,
1911
+ "aria-label": 'string' == typeof stepSpec.label ? `Step ${String(index + 1)}: ${stepSpec.label}` : void 0,
1912
+ children: 'completed' === state ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.CheckIcon, {
1913
+ className: indicatorIcon
1914
+ }) : 'error' === state ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.AlertTriangleIcon, {
1915
+ className: indicatorIcon
1916
+ }) : index + 1
1917
+ }),
1918
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(StepperContent, {
1919
+ children: [
1920
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(StepperLabel, {
1921
+ children: stepSpec.label
1922
+ }),
1923
+ stepSpec.description ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(StepperDescription, {
1924
+ children: stepSpec.description
1925
+ }) : null
1926
+ ]
1927
+ })
1928
+ ]
1929
+ }, null != (_stepSpec_key = stepSpec.key) ? _stepSpec_key : index);
1930
+ })
1931
+ }));
1932
+ };
1933
+ StepperImpl.displayName = 'Stepper';
1934
+ const Stepper = Object.assign(StepperImpl, {
1935
+ Root: StepperRoot,
1936
+ Step: StepperStep,
1937
+ Indicator: StepperIndicator,
1938
+ Content: StepperContent,
1939
+ Label: StepperLabel,
1940
+ Description: StepperDescription
1941
+ });
1942
+ var avatar = '_1glbv700';
1943
+ var avatarImage = '_1glbv701';
1944
+ var WorkspaceSwitcher_css_item = '_1glbv707';
1945
+ var itemCheck = '_1glbv708';
1946
+ var WorkspaceSwitcher_css_trigger = '_1glbv702';
1947
+ var triggerDescription = '_1glbv705';
1948
+ var WorkspaceSwitcher_css_triggerIcon = '_1glbv706';
1949
+ var triggerName = '_1glbv704';
1950
+ var triggerText = '_1glbv703';
1951
+ const dropdown_menu_namespaceObject = require("@vinyasa/overlay/dropdown-menu");
1952
+ function WorkspaceSwitcher_define_property(obj, key, value) {
1953
+ if (key in obj) Object.defineProperty(obj, key, {
1954
+ value: value,
1955
+ enumerable: true,
1956
+ configurable: true,
1957
+ writable: true
1958
+ });
1959
+ else obj[key] = value;
1960
+ return obj;
1961
+ }
1962
+ function WorkspaceSwitcher_object_spread(target) {
1963
+ for(var i = 1; i < arguments.length; i++){
1964
+ var source = null != arguments[i] ? arguments[i] : {};
1965
+ var ownKeys = Object.keys(source);
1966
+ if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
1967
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1968
+ }));
1969
+ ownKeys.forEach(function(key) {
1970
+ WorkspaceSwitcher_define_property(target, key, source[key]);
1971
+ });
1972
+ }
1973
+ return target;
1974
+ }
1975
+ function WorkspaceSwitcher_ownKeys(object, enumerableOnly) {
1976
+ var keys = Object.keys(object);
1977
+ if (Object.getOwnPropertySymbols) {
1978
+ var symbols = Object.getOwnPropertySymbols(object);
1979
+ if (enumerableOnly) symbols = symbols.filter(function(sym) {
1980
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
1981
+ });
1982
+ keys.push.apply(keys, symbols);
1983
+ }
1984
+ return keys;
1985
+ }
1986
+ function WorkspaceSwitcher_object_spread_props(target, source) {
1987
+ source = null != source ? source : {};
1988
+ if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1989
+ else WorkspaceSwitcher_ownKeys(Object(source)).forEach(function(key) {
1990
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1991
+ });
1992
+ return target;
1993
+ }
1994
+ function WorkspaceSwitcher_object_without_properties(source, excluded) {
1995
+ if (null == source) return {};
1996
+ var target = {}, sourceKeys, key, i;
1997
+ if ("u" > typeof Reflect && Reflect.ownKeys) {
1998
+ sourceKeys = Reflect.ownKeys(Object(source));
1999
+ for(i = 0; i < sourceKeys.length; i++){
2000
+ key = sourceKeys[i];
2001
+ if (!(excluded.indexOf(key) >= 0)) {
2002
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
2003
+ }
2004
+ }
2005
+ return target;
2006
+ }
2007
+ target = WorkspaceSwitcher_object_without_properties_loose(source, excluded);
2008
+ if (Object.getOwnPropertySymbols) {
2009
+ sourceKeys = Object.getOwnPropertySymbols(source);
2010
+ for(i = 0; i < sourceKeys.length; i++){
2011
+ key = sourceKeys[i];
2012
+ if (!(excluded.indexOf(key) >= 0)) {
2013
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
2014
+ }
2015
+ }
2016
+ }
2017
+ return target;
2018
+ }
2019
+ function WorkspaceSwitcher_object_without_properties_loose(source, excluded) {
2020
+ if (null == source) return {};
2021
+ var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
2022
+ for(i = 0; i < sourceKeys.length; i++){
2023
+ key = sourceKeys[i];
2024
+ if (!(excluded.indexOf(key) >= 0)) {
2025
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
2026
+ }
2027
+ }
2028
+ return target;
2029
+ }
2030
+ const initials = (name)=>name.trim().split(/\s+/).slice(0, 2).map((word)=>word[0]).join('').toUpperCase();
2031
+ const WorkspaceAvatar = (_0)=>{
2032
+ let { workspace, className } = _0, rest = WorkspaceSwitcher_object_without_properties(_0, [
2033
+ "workspace",
2034
+ "className"
2035
+ ]);
2036
+ var _workspace_avatar;
2037
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", WorkspaceSwitcher_object_spread_props(WorkspaceSwitcher_object_spread({
2038
+ className: className ? `${avatar} ${className}` : avatar,
2039
+ "aria-hidden": "true"
2040
+ }, rest), {
2041
+ children: null != (_workspace_avatar = workspace.avatar) ? _workspace_avatar : initials(workspace.name)
2042
+ }));
2043
+ };
2044
+ WorkspaceAvatar.displayName = 'WorkspaceAvatar';
2045
+ const WorkspaceSwitcherTrigger = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _1)=>{
2046
+ let _ref = [
2047
+ _0,
2048
+ _1
2049
+ ], [_ref1, ..._rest] = _ref, { workspace, className } = _ref1, rest = WorkspaceSwitcher_object_without_properties(_ref1, [
2050
+ "workspace",
2051
+ "className"
2052
+ ]), [ref] = _rest;
2053
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("button", WorkspaceSwitcher_object_spread_props(WorkspaceSwitcher_object_spread({
2054
+ ref: ref,
2055
+ type: "button",
2056
+ className: className ? `${WorkspaceSwitcher_css_trigger} ${className}` : WorkspaceSwitcher_css_trigger
2057
+ }, rest), {
2058
+ children: [
2059
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(WorkspaceAvatar, {
2060
+ workspace: workspace
2061
+ }),
2062
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
2063
+ className: triggerText,
2064
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
2065
+ className: triggerName,
2066
+ children: workspace.name
2067
+ })
2068
+ }),
2069
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.ChevronDownIcon, {
2070
+ className: WorkspaceSwitcher_css_triggerIcon
2071
+ })
2072
+ ]
2073
+ }));
2074
+ });
2075
+ WorkspaceSwitcherTrigger.displayName = 'WorkspaceSwitcherTrigger';
2076
+ const WorkspaceSwitcherItem = ({ workspace, active })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
2077
+ className: WorkspaceSwitcher_css_item,
2078
+ children: [
2079
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(WorkspaceAvatar, {
2080
+ workspace: workspace
2081
+ }),
2082
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
2083
+ className: triggerText,
2084
+ children: [
2085
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
2086
+ className: triggerName,
2087
+ children: workspace.name
2088
+ }),
2089
+ workspace.description ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
2090
+ className: triggerDescription,
2091
+ children: workspace.description
2092
+ }) : null
2093
+ ]
2094
+ }),
2095
+ active ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.CheckIcon, {
2096
+ className: itemCheck,
2097
+ "aria-hidden": "true"
2098
+ }) : null
2099
+ ]
2100
+ });
2101
+ WorkspaceSwitcherItem.displayName = 'WorkspaceSwitcherItem';
2102
+ const WorkspaceSwitcherImpl = ({ workspaces, activeWorkspaceId, onWorkspaceChange, onCreateWorkspace, createWorkspaceLabel = 'Create workspace' })=>{
2103
+ var _workspaces_find;
2104
+ if (0 === workspaces.length) return null;
2105
+ const activeWorkspace = null != (_workspaces_find = workspaces.find((workspace)=>workspace.id === activeWorkspaceId)) ? _workspaces_find : workspaces[0];
2106
+ const entries = [
2107
+ ...workspaces.map((workspace)=>({
2108
+ type: 'item',
2109
+ key: workspace.id,
2110
+ label: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(WorkspaceSwitcherItem, {
2111
+ workspace: workspace,
2112
+ active: workspace.id === activeWorkspaceId
2113
+ }),
2114
+ onSelect: ()=>{
2115
+ onWorkspaceChange(workspace.id);
2116
+ }
2117
+ })),
2118
+ ...onCreateWorkspace ? [
2119
+ {
2120
+ type: 'separator',
2121
+ key: 'create-workspace-separator'
2122
+ },
2123
+ {
2124
+ type: 'item',
2125
+ key: 'create-workspace',
2126
+ label: createWorkspaceLabel,
2127
+ icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.PlusIcon, {}),
2128
+ onSelect: onCreateWorkspace
2129
+ }
2130
+ ] : []
2131
+ ];
2132
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(dropdown_menu_namespaceObject.DropdownMenu, {
2133
+ trigger: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(WorkspaceSwitcherTrigger, {
2134
+ workspace: activeWorkspace
2135
+ }),
2136
+ items: entries,
2137
+ align: "start"
2138
+ });
2139
+ };
2140
+ WorkspaceSwitcherImpl.displayName = 'WorkspaceSwitcher';
2141
+ const WorkspaceSwitcher = Object.assign(WorkspaceSwitcherImpl, {
2142
+ Trigger: WorkspaceSwitcherTrigger,
2143
+ Item: WorkspaceSwitcherItem,
2144
+ Avatar: WorkspaceAvatar
2145
+ });
2146
+ var expandTrigger = '_1o0hep24';
2147
+ var expandTriggerSpacer = '_1o0hep25';
2148
+ var TreeView_css_group = '_1o0hep21';
2149
+ var TreeView_css_icon = '_1o0hep26';
2150
+ var TreeView_css_item = '_1o0hep22';
2151
+ var TreeView_css_label = '_1o0hep27';
2152
+ var TreeView_css_root = '_1o0hep20';
2153
+ var row = '_1o0hep23';
2154
+ function TreeView_define_property(obj, key, value) {
2155
+ if (key in obj) Object.defineProperty(obj, key, {
2156
+ value: value,
2157
+ enumerable: true,
2158
+ configurable: true,
2159
+ writable: true
2160
+ });
2161
+ else obj[key] = value;
2162
+ return obj;
2163
+ }
2164
+ function TreeView_object_spread(target) {
2165
+ for(var i = 1; i < arguments.length; i++){
2166
+ var source = null != arguments[i] ? arguments[i] : {};
2167
+ var ownKeys = Object.keys(source);
2168
+ if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
2169
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
2170
+ }));
2171
+ ownKeys.forEach(function(key) {
2172
+ TreeView_define_property(target, key, source[key]);
2173
+ });
2174
+ }
2175
+ return target;
2176
+ }
2177
+ function TreeView_ownKeys(object, enumerableOnly) {
2178
+ var keys = Object.keys(object);
2179
+ if (Object.getOwnPropertySymbols) {
2180
+ var symbols = Object.getOwnPropertySymbols(object);
2181
+ if (enumerableOnly) symbols = symbols.filter(function(sym) {
2182
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
2183
+ });
2184
+ keys.push.apply(keys, symbols);
2185
+ }
2186
+ return keys;
2187
+ }
2188
+ function TreeView_object_spread_props(target, source) {
2189
+ source = null != source ? source : {};
2190
+ if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
2191
+ else TreeView_ownKeys(Object(source)).forEach(function(key) {
2192
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
2193
+ });
2194
+ return target;
2195
+ }
2196
+ function TreeView_object_without_properties(source, excluded) {
2197
+ if (null == source) return {};
2198
+ var target = {}, sourceKeys, key, i;
2199
+ if ("u" > typeof Reflect && Reflect.ownKeys) {
2200
+ sourceKeys = Reflect.ownKeys(Object(source));
2201
+ for(i = 0; i < sourceKeys.length; i++){
2202
+ key = sourceKeys[i];
2203
+ if (!(excluded.indexOf(key) >= 0)) {
2204
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
2205
+ }
2206
+ }
2207
+ return target;
2208
+ }
2209
+ target = TreeView_object_without_properties_loose(source, excluded);
2210
+ if (Object.getOwnPropertySymbols) {
2211
+ sourceKeys = Object.getOwnPropertySymbols(source);
2212
+ for(i = 0; i < sourceKeys.length; i++){
2213
+ key = sourceKeys[i];
2214
+ if (!(excluded.indexOf(key) >= 0)) {
2215
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
2216
+ }
2217
+ }
2218
+ }
2219
+ return target;
2220
+ }
2221
+ function TreeView_object_without_properties_loose(source, excluded) {
2222
+ if (null == source) return {};
2223
+ var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
2224
+ for(i = 0; i < sourceKeys.length; i++){
2225
+ key = sourceKeys[i];
2226
+ if (!(excluded.indexOf(key) >= 0)) {
2227
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
2228
+ }
2229
+ }
2230
+ return target;
2231
+ }
2232
+ const TreeViewContext = /*#__PURE__*/ (0, external_react_namespaceObject.createContext)(null);
2233
+ const useTreeViewContext = ()=>{
2234
+ const context = (0, external_react_namespaceObject.useContext)(TreeViewContext);
2235
+ if (!context) throw new Error('TreeView parts must be rendered inside <TreeView.Root>.');
2236
+ return context;
2237
+ };
2238
+ const TreeViewLevelContext = /*#__PURE__*/ (0, external_react_namespaceObject.createContext)(1);
2239
+ const TreeViewRoot = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _1)=>{
2240
+ let _ref = [
2241
+ _0,
2242
+ _1
2243
+ ], [_ref1, ..._rest] = _ref, { selectedId, onSelect, expandedIds: expandedIdsProp, defaultExpandedIds = [], onExpandedChange, className, children } = _ref1, rest = TreeView_object_without_properties(_ref1, [
2244
+ "selectedId",
2245
+ "onSelect",
2246
+ "expandedIds",
2247
+ "defaultExpandedIds",
2248
+ "onExpandedChange",
2249
+ "className",
2250
+ "children"
2251
+ ]), [ref] = _rest;
2252
+ const [internalExpandedIds, setInternalExpandedIds] = (0, external_react_namespaceObject.useState)(defaultExpandedIds);
2253
+ const [activeId, setActiveId] = (0, external_react_namespaceObject.useState)(null);
2254
+ const rootElementRef = (0, external_react_namespaceObject.useRef)(null);
2255
+ const themedRef = (0, tokens_namespaceObject.useThemedRef)(ref);
2256
+ const isControlled = void 0 !== expandedIdsProp;
2257
+ const expandedIdsArray = isControlled ? expandedIdsProp : internalExpandedIds;
2258
+ const expandedIds = new Set(expandedIdsArray);
2259
+ const toggleExpanded = (id)=>{
2260
+ const next = expandedIds.has(id) ? expandedIdsArray.filter((existing)=>existing !== id) : [
2261
+ ...expandedIdsArray,
2262
+ id
2263
+ ];
2264
+ if (!isControlled) setInternalExpandedIds(next);
2265
+ null == onExpandedChange || onExpandedChange(next);
2266
+ };
2267
+ (0, external_react_namespaceObject.useLayoutEffect)(()=>{
2268
+ var _rootElementRef_current;
2269
+ if (null !== activeId) return;
2270
+ const firstItem = null == (_rootElementRef_current = rootElementRef.current) ? void 0 : _rootElementRef_current.querySelector('[role="treeitem"]');
2271
+ const firstId = null == firstItem ? void 0 : firstItem.dataset.treeId;
2272
+ if (firstId) setActiveId(firstId);
2273
+ }, [
2274
+ activeId
2275
+ ]);
2276
+ const focusItem = (element)=>{
2277
+ if (!element) return;
2278
+ element.focus();
2279
+ const id = element.dataset.treeId;
2280
+ if (id) setActiveId(id);
2281
+ };
2282
+ const focusSibling = (rootElement, target, delta)=>{
2283
+ const items = Array.from(rootElement.querySelectorAll('[role="treeitem"]'));
2284
+ focusItem(items[items.indexOf(target) + delta]);
2285
+ };
2286
+ const focusFirst = (rootElement)=>{
2287
+ focusItem(rootElement.querySelector('[role="treeitem"]'));
2288
+ };
2289
+ const focusLast = (rootElement)=>{
2290
+ const items = rootElement.querySelectorAll('[role="treeitem"]');
2291
+ focusItem(items[items.length - 1]);
2292
+ };
2293
+ const expandOrFocusFirstChild = (target, targetId)=>{
2294
+ var _target_parentElement;
2295
+ if ('true' !== target.dataset.hasChildren) return;
2296
+ if ('true' !== target.getAttribute('aria-expanded')) return void toggleExpanded(targetId);
2297
+ const childGroup = null == (_target_parentElement = target.parentElement) ? void 0 : _target_parentElement.querySelector(':scope > [role="group"]');
2298
+ focusItem(null == childGroup ? void 0 : childGroup.querySelector('[role="treeitem"]'));
2299
+ };
2300
+ const collapseOrFocusParent = (target, targetId)=>{
2301
+ var _parentGroup_parentElement;
2302
+ if ('true' === target.getAttribute('aria-expanded')) return void toggleExpanded(targetId);
2303
+ const parentGroup = target.closest('[role="group"]');
2304
+ focusItem(null == parentGroup ? void 0 : null == (_parentGroup_parentElement = parentGroup.parentElement) ? void 0 : _parentGroup_parentElement.querySelector(':scope > [role="treeitem"]'));
2305
+ };
2306
+ const keyHandlers = {
2307
+ ArrowDown: (rootElement, target)=>{
2308
+ focusSibling(rootElement, target, 1);
2309
+ },
2310
+ ArrowUp: (rootElement, target)=>{
2311
+ focusSibling(rootElement, target, -1);
2312
+ },
2313
+ Home: (rootElement)=>{
2314
+ focusFirst(rootElement);
2315
+ },
2316
+ End: (rootElement)=>{
2317
+ focusLast(rootElement);
2318
+ },
2319
+ ArrowRight: (_rootElement, target, targetId)=>{
2320
+ expandOrFocusFirstChild(target, targetId);
2321
+ },
2322
+ ArrowLeft: (_rootElement, target, targetId)=>{
2323
+ collapseOrFocusParent(target, targetId);
2324
+ },
2325
+ Enter: (_rootElement, _target, targetId)=>{
2326
+ null == onSelect || onSelect(targetId);
2327
+ },
2328
+ ' ': (_rootElement, _target, targetId)=>{
2329
+ null == onSelect || onSelect(targetId);
2330
+ }
2331
+ };
2332
+ const handleKeyDown = (event)=>{
2333
+ const target = event.target;
2334
+ if (!(target instanceof HTMLElement) || 'treeitem' !== target.getAttribute('role')) return;
2335
+ const rootElement = rootElementRef.current;
2336
+ const targetId = target.dataset.treeId;
2337
+ const handler = keyHandlers[event.key];
2338
+ if (!rootElement || !targetId || !handler) return;
2339
+ event.preventDefault();
2340
+ handler(rootElement, target, targetId);
2341
+ };
2342
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TreeViewContext.Provider, {
2343
+ value: {
2344
+ expandedIds,
2345
+ toggleExpanded,
2346
+ selectedId,
2347
+ onSelect: null != onSelect ? onSelect : ()=>void 0,
2348
+ activeId,
2349
+ setActiveId
2350
+ },
2351
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("ul", TreeView_object_spread_props(TreeView_object_spread({
2352
+ ref: (node)=>{
2353
+ rootElementRef.current = node;
2354
+ if ('function' == typeof themedRef) themedRef(node);
2355
+ },
2356
+ role: "tree",
2357
+ className: className ? `${TreeView_css_root} ${className}` : TreeView_css_root,
2358
+ onKeyDown: handleKeyDown
2359
+ }, rest), {
2360
+ children: children
2361
+ }))
2362
+ });
2363
+ });
2364
+ TreeViewRoot.displayName = 'TreeViewRoot';
2365
+ const TreeViewGroup = (_0)=>{
2366
+ let { className, children } = _0, rest = TreeView_object_without_properties(_0, [
2367
+ "className",
2368
+ "children"
2369
+ ]);
2370
+ const level = (0, external_react_namespaceObject.useContext)(TreeViewLevelContext);
2371
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TreeViewLevelContext.Provider, {
2372
+ value: level + 1,
2373
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("ul", TreeView_object_spread_props(TreeView_object_spread({
2374
+ role: "group",
2375
+ className: className ? `${TreeView_css_group} ${className}` : TreeView_css_group
2376
+ }, rest), {
2377
+ children: children
2378
+ }))
2379
+ });
2380
+ };
2381
+ TreeViewGroup.displayName = 'TreeViewGroup';
2382
+ const TreeViewItem = (_0)=>{
2383
+ let { id, label: labelContent, icon: iconContent, disabled, children, className } = _0, rest = TreeView_object_without_properties(_0, [
2384
+ "id",
2385
+ "label",
2386
+ "icon",
2387
+ "disabled",
2388
+ "children",
2389
+ "className"
2390
+ ]);
2391
+ const { expandedIds, toggleExpanded, selectedId, onSelect, activeId, setActiveId } = useTreeViewContext();
2392
+ const level = (0, external_react_namespaceObject.useContext)(TreeViewLevelContext);
2393
+ const hasChildren = Boolean(children);
2394
+ const isExpanded = expandedIds.has(id);
2395
+ const isSelected = selectedId === id;
2396
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("li", TreeView_object_spread_props(TreeView_object_spread({
2397
+ className: className ? `${TreeView_css_item} ${className}` : TreeView_css_item,
2398
+ role: "none"
2399
+ }, rest), {
2400
+ children: [
2401
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
2402
+ role: "treeitem",
2403
+ "data-tree-id": id,
2404
+ "data-has-children": hasChildren,
2405
+ "aria-expanded": hasChildren ? isExpanded : void 0,
2406
+ "aria-selected": isSelected,
2407
+ "aria-disabled": disabled,
2408
+ "aria-level": level,
2409
+ tabIndex: activeId === id ? 0 : -1,
2410
+ className: row,
2411
+ onFocus: ()=>{
2412
+ setActiveId(id);
2413
+ },
2414
+ onClick: ()=>{
2415
+ if (disabled) return;
2416
+ onSelect(id);
2417
+ if (hasChildren) toggleExpanded(id);
2418
+ },
2419
+ children: [
2420
+ hasChildren ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
2421
+ type: "button",
2422
+ tabIndex: -1,
2423
+ "aria-hidden": "true",
2424
+ "data-expanded": isExpanded,
2425
+ className: expandTrigger,
2426
+ onClick: (event)=>{
2427
+ event.stopPropagation();
2428
+ if (!disabled) toggleExpanded(id);
2429
+ },
2430
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.ChevronRightIcon, {})
2431
+ }) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
2432
+ className: expandTriggerSpacer,
2433
+ "aria-hidden": "true"
2434
+ }),
2435
+ iconContent ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
2436
+ className: TreeView_css_icon,
2437
+ "aria-hidden": "true",
2438
+ children: iconContent
2439
+ }) : null,
2440
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
2441
+ className: TreeView_css_label,
2442
+ children: labelContent
2443
+ })
2444
+ ]
2445
+ }),
2446
+ hasChildren && isExpanded ? children : null
2447
+ ]
2448
+ }));
2449
+ };
2450
+ TreeViewItem.displayName = 'TreeViewItem';
2451
+ const renderNodes = (nodes)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(jsx_runtime_namespaceObject.Fragment, {
2452
+ children: nodes.map((node)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TreeViewItem, {
2453
+ id: node.id,
2454
+ label: node.label,
2455
+ icon: node.icon,
2456
+ disabled: node.disabled,
2457
+ children: node.children && node.children.length > 0 ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TreeViewGroup, {
2458
+ children: renderNodes(node.children)
2459
+ }) : void 0
2460
+ }, node.id))
2461
+ });
2462
+ const TreeViewImpl = (_0)=>{
2463
+ let { items } = _0, rest = TreeView_object_without_properties(_0, [
2464
+ "items"
2465
+ ]);
2466
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TreeViewRoot, TreeView_object_spread_props(TreeView_object_spread({}, rest), {
2467
+ children: renderNodes(items)
2468
+ }));
2469
+ };
2470
+ TreeViewImpl.displayName = 'TreeView';
2471
+ const TreeView = Object.assign(TreeViewImpl, {
2472
+ Root: TreeViewRoot,
2473
+ Group: TreeViewGroup,
2474
+ Item: TreeViewItem
2475
+ });
2476
+ const command_palette_namespaceObject = require("@vinyasa/overlay/command-palette");
2477
+ const typography_namespaceObject = require("@vinyasa/typography");
2478
+ var CommandNavigation_css_trigger = '_1pp4pc70';
2479
+ var CommandNavigation_css_triggerIcon = '_1pp4pc71';
2480
+ var triggerKbd = '_1pp4pc73';
2481
+ var CommandNavigation_css_triggerText = '_1pp4pc72';
2482
+ function CommandNavigation_define_property(obj, key, value) {
2483
+ if (key in obj) Object.defineProperty(obj, key, {
2484
+ value: value,
2485
+ enumerable: true,
2486
+ configurable: true,
2487
+ writable: true
2488
+ });
2489
+ else obj[key] = value;
2490
+ return obj;
2491
+ }
2492
+ function CommandNavigation_object_spread(target) {
2493
+ for(var i = 1; i < arguments.length; i++){
2494
+ var source = null != arguments[i] ? arguments[i] : {};
2495
+ var ownKeys = Object.keys(source);
2496
+ if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
2497
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
2498
+ }));
2499
+ ownKeys.forEach(function(key) {
2500
+ CommandNavigation_define_property(target, key, source[key]);
2501
+ });
2502
+ }
2503
+ return target;
2504
+ }
2505
+ function CommandNavigation_ownKeys(object, enumerableOnly) {
2506
+ var keys = Object.keys(object);
2507
+ if (Object.getOwnPropertySymbols) {
2508
+ var symbols = Object.getOwnPropertySymbols(object);
2509
+ if (enumerableOnly) symbols = symbols.filter(function(sym) {
2510
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
2511
+ });
2512
+ keys.push.apply(keys, symbols);
2513
+ }
2514
+ return keys;
2515
+ }
2516
+ function CommandNavigation_object_spread_props(target, source) {
2517
+ source = null != source ? source : {};
2518
+ if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
2519
+ else CommandNavigation_ownKeys(Object(source)).forEach(function(key) {
2520
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
2521
+ });
2522
+ return target;
2523
+ }
2524
+ function CommandNavigation_object_without_properties(source, excluded) {
2525
+ if (null == source) return {};
2526
+ var target = {}, sourceKeys, key, i;
2527
+ if ("u" > typeof Reflect && Reflect.ownKeys) {
2528
+ sourceKeys = Reflect.ownKeys(Object(source));
2529
+ for(i = 0; i < sourceKeys.length; i++){
2530
+ key = sourceKeys[i];
2531
+ if (!(excluded.indexOf(key) >= 0)) {
2532
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
2533
+ }
2534
+ }
2535
+ return target;
2536
+ }
2537
+ target = CommandNavigation_object_without_properties_loose(source, excluded);
2538
+ if (Object.getOwnPropertySymbols) {
2539
+ sourceKeys = Object.getOwnPropertySymbols(source);
2540
+ for(i = 0; i < sourceKeys.length; i++){
2541
+ key = sourceKeys[i];
2542
+ if (!(excluded.indexOf(key) >= 0)) {
2543
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
2544
+ }
2545
+ }
2546
+ }
2547
+ return target;
2548
+ }
2549
+ function CommandNavigation_object_without_properties_loose(source, excluded) {
2550
+ if (null == source) return {};
2551
+ var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
2552
+ for(i = 0; i < sourceKeys.length; i++){
2553
+ key = sourceKeys[i];
2554
+ if (!(excluded.indexOf(key) >= 0)) {
2555
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
2556
+ }
2557
+ }
2558
+ return target;
2559
+ }
2560
+ const defaultNavigate = (href)=>{
2561
+ window.location.assign(href);
2562
+ };
2563
+ const CommandNavigationImpl = ({ groups, label = 'Command navigation', placeholder = 'Search or jump to...', emptyMessage, onNavigate = defaultNavigate, open: openProp, defaultOpen = false, onOpenChange, disableShortcut = false })=>{
2564
+ const [internalOpen, setInternalOpen] = (0, external_react_namespaceObject.useState)(defaultOpen);
2565
+ const isControlled = void 0 !== openProp;
2566
+ const open = isControlled ? openProp : internalOpen;
2567
+ const openRef = (0, external_react_namespaceObject.useRef)(open);
2568
+ (0, external_react_namespaceObject.useEffect)(()=>{
2569
+ openRef.current = open;
2570
+ }, [
2571
+ open
2572
+ ]);
2573
+ const setOpen = (next)=>{
2574
+ if (!isControlled) setInternalOpen(next);
2575
+ null == onOpenChange || onOpenChange(next);
2576
+ };
2577
+ (0, external_react_namespaceObject.useEffect)(()=>{
2578
+ if (disableShortcut) return;
2579
+ const handleKeyDown = (event)=>{
2580
+ if ('k' === event.key.toLowerCase() && (event.metaKey || event.ctrlKey)) {
2581
+ event.preventDefault();
2582
+ setOpen(!openRef.current);
2583
+ }
2584
+ };
2585
+ window.addEventListener('keydown', handleKeyDown);
2586
+ return ()=>{
2587
+ window.removeEventListener('keydown', handleKeyDown);
2588
+ };
2589
+ }, [
2590
+ disableShortcut
2591
+ ]);
2592
+ const paletteGroups = groups.map((group)=>({
2593
+ key: group.key,
2594
+ heading: group.heading,
2595
+ items: group.items.map((item)=>({
2596
+ key: item.key,
2597
+ label: item.label,
2598
+ icon: item.icon,
2599
+ shortcut: item.shortcut,
2600
+ keywords: item.keywords,
2601
+ disabled: item.disabled,
2602
+ onSelect: ()=>{
2603
+ setOpen(false);
2604
+ if (item.onSelect) item.onSelect();
2605
+ else if (item.href) onNavigate(item.href);
2606
+ }
2607
+ }))
2608
+ }));
2609
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(command_palette_namespaceObject.CommandPalette, {
2610
+ label: label,
2611
+ placeholder: placeholder,
2612
+ emptyMessage: emptyMessage,
2613
+ groups: paletteGroups,
2614
+ open: open,
2615
+ onOpenChange: setOpen
2616
+ });
2617
+ };
2618
+ CommandNavigationImpl.displayName = 'CommandNavigation';
2619
+ const CommandNavigationTrigger = (_0)=>{
2620
+ let { placeholder = 'Search or jump to...', shortcutLabel = '⌘K', className, children } = _0, rest = CommandNavigation_object_without_properties(_0, [
2621
+ "placeholder",
2622
+ "shortcutLabel",
2623
+ "className",
2624
+ "children"
2625
+ ]);
2626
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("button", CommandNavigation_object_spread_props(CommandNavigation_object_spread({
2627
+ type: "button",
2628
+ className: className ? `${CommandNavigation_css_trigger} ${className}` : CommandNavigation_css_trigger
2629
+ }, rest), {
2630
+ children: [
2631
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.SearchIcon, {
2632
+ className: CommandNavigation_css_triggerIcon
2633
+ }),
2634
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
2635
+ className: CommandNavigation_css_triggerText,
2636
+ children: null != children ? children : placeholder
2637
+ }),
2638
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(typography_namespaceObject.Kbd, {
2639
+ className: triggerKbd,
2640
+ children: shortcutLabel
2641
+ })
2642
+ ]
2643
+ }));
2644
+ };
2645
+ CommandNavigationTrigger.displayName = 'CommandNavigationTrigger';
2646
+ const CommandNavigation = Object.assign(CommandNavigationImpl, {
2647
+ Trigger: CommandNavigationTrigger
2648
+ });
2649
+ exports.Breadcrumbs = __webpack_exports__.Breadcrumbs;
2650
+ exports.CommandNavigation = __webpack_exports__.CommandNavigation;
2651
+ exports.ELLIPSIS = __webpack_exports__.ELLIPSIS;
2652
+ exports.NavigationMenu = __webpack_exports__.NavigationMenu;
2653
+ exports.Pagination = __webpack_exports__.Pagination;
2654
+ exports.Sidebar = __webpack_exports__.Sidebar;
2655
+ exports.Stepper = __webpack_exports__.Stepper;
2656
+ exports.Tabs = __webpack_exports__.Tabs;
2657
+ exports.TopNavigation = __webpack_exports__.TopNavigation;
2658
+ exports.TreeView = __webpack_exports__.TreeView;
2659
+ exports.WorkspaceSwitcher = __webpack_exports__.WorkspaceSwitcher;
2660
+ exports.avatarImage = __webpack_exports__.avatarImage;
2661
+ exports.getPaginationRange = __webpack_exports__.getPaginationRange;
2662
+ exports.useSidebarCollapsed = __webpack_exports__.useSidebarCollapsed;
2663
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
2664
+ "Breadcrumbs",
2665
+ "CommandNavigation",
2666
+ "ELLIPSIS",
2667
+ "NavigationMenu",
2668
+ "Pagination",
2669
+ "Sidebar",
2670
+ "Stepper",
2671
+ "Tabs",
2672
+ "TopNavigation",
2673
+ "TreeView",
2674
+ "WorkspaceSwitcher",
2675
+ "avatarImage",
2676
+ "getPaginationRange",
2677
+ "useSidebarCollapsed"
2678
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
2679
+ Object.defineProperty(exports, '__esModule', {
2680
+ value: true
2681
+ });