@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,130 @@
1
+ import "./862.css";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { MenuIcon, XIcon } from "@vinyasa/icons";
4
+ import { useThemedRef } from "@vinyasa/tokens";
5
+ import { createContext, forwardRef, useContext, useState } from "react";
6
+ import { createRuntimeFn } from "./953.js";
7
+ var actions = '_383lbb3';
8
+ var brand = '_383lbb1';
9
+ var content = '_383lbb2';
10
+ var item = createRuntimeFn({
11
+ defaultClassName: '_383lbb4',
12
+ variantClassNames: {
13
+ active: {
14
+ true: '_383lbb5'
15
+ }
16
+ },
17
+ defaultVariants: {},
18
+ compoundVariants: []
19
+ });
20
+ var mobileTrigger = '_383lbb6';
21
+ var root = '_383lbb0';
22
+ const TopNavigationContext = /*#__PURE__*/ createContext(null);
23
+ const useTopNavigationContext = ()=>{
24
+ const context = useContext(TopNavigationContext);
25
+ if (!context) throw new Error('TopNavigation parts must be rendered inside <TopNavigation.Root>.');
26
+ return context;
27
+ };
28
+ const TopNavigationRoot = /*#__PURE__*/ forwardRef(({ open: openProp, defaultOpen = false, onOpenChange, className, children, ...rest }, ref)=>{
29
+ const [internalOpen, setInternalOpen] = useState(defaultOpen);
30
+ const isControlled = void 0 !== openProp;
31
+ const open = isControlled ? openProp : internalOpen;
32
+ const themedRef = useThemedRef(ref);
33
+ const setOpen = (next)=>{
34
+ if (!isControlled) setInternalOpen(next);
35
+ onOpenChange?.(next);
36
+ };
37
+ return /*#__PURE__*/ jsx(TopNavigationContext.Provider, {
38
+ value: {
39
+ open,
40
+ setOpen
41
+ },
42
+ children: /*#__PURE__*/ jsx("nav", {
43
+ ref: themedRef,
44
+ className: className ? `${root} ${className}` : root,
45
+ ...rest,
46
+ children: children
47
+ })
48
+ });
49
+ });
50
+ TopNavigationRoot.displayName = 'TopNavigationRoot';
51
+ const TopNavigationBrand = ({ as: Component = 'a', className, ...rest })=>/*#__PURE__*/ jsx(Component, {
52
+ className: className ? `${brand} ${className}` : brand,
53
+ ...rest
54
+ });
55
+ TopNavigationBrand.displayName = 'TopNavigationBrand';
56
+ const TopNavigationContent = ({ className, ...rest })=>{
57
+ const { open } = useTopNavigationContext();
58
+ return /*#__PURE__*/ jsx("div", {
59
+ "data-open": open,
60
+ className: className ? `${content} ${className}` : content,
61
+ ...rest
62
+ });
63
+ };
64
+ TopNavigationContent.displayName = 'TopNavigationContent';
65
+ const TopNavigationActions = ({ className, ...rest })=>/*#__PURE__*/ jsx("div", {
66
+ className: className ? `${actions} ${className}` : actions,
67
+ ...rest
68
+ });
69
+ TopNavigationActions.displayName = 'TopNavigationActions';
70
+ const TopNavigationItem = /*#__PURE__*/ forwardRef(({ as: Component = 'button', active, className, ...rest }, ref)=>/*#__PURE__*/ jsx(Component, {
71
+ ref: ref,
72
+ className: className ? `${item({
73
+ active
74
+ })} ${className}` : item({
75
+ active
76
+ }),
77
+ ...rest
78
+ }));
79
+ TopNavigationItem.displayName = 'TopNavigationItem';
80
+ const TopNavigationMobileTrigger = ({ className, ...rest })=>{
81
+ const { open, setOpen } = useTopNavigationContext();
82
+ return /*#__PURE__*/ jsx("button", {
83
+ type: "button",
84
+ className: className ? `${mobileTrigger} ${className}` : mobileTrigger,
85
+ "aria-label": open ? 'Close menu' : 'Open menu',
86
+ "aria-expanded": open,
87
+ onClick: ()=>{
88
+ setOpen(!open);
89
+ },
90
+ ...rest,
91
+ children: open ? /*#__PURE__*/ jsx(XIcon, {}) : /*#__PURE__*/ jsx(MenuIcon, {})
92
+ });
93
+ };
94
+ TopNavigationMobileTrigger.displayName = 'TopNavigationMobileTrigger';
95
+ const TopNavigationImpl = ({ brand: brandContent, brandHref, items, actions: actionsContent, linkComponent, open, defaultOpen, onOpenChange })=>/*#__PURE__*/ jsxs(TopNavigationRoot, {
96
+ open: open,
97
+ defaultOpen: defaultOpen,
98
+ onOpenChange: onOpenChange,
99
+ children: [
100
+ brandContent ? /*#__PURE__*/ jsx(TopNavigationBrand, {
101
+ as: linkComponent,
102
+ href: brandHref,
103
+ children: brandContent
104
+ }) : null,
105
+ /*#__PURE__*/ jsx(TopNavigationContent, {
106
+ children: items.map((itemSpec)=>/*#__PURE__*/ jsx(TopNavigationItem, {
107
+ as: itemSpec.href ? linkComponent ?? 'a' : 'button',
108
+ href: itemSpec.href,
109
+ active: itemSpec.active,
110
+ disabled: itemSpec.disabled,
111
+ onClick: itemSpec.onClick,
112
+ children: itemSpec.label
113
+ }, itemSpec.key))
114
+ }),
115
+ actionsContent ? /*#__PURE__*/ jsx(TopNavigationActions, {
116
+ children: actionsContent
117
+ }) : null,
118
+ /*#__PURE__*/ jsx(TopNavigationMobileTrigger, {})
119
+ ]
120
+ });
121
+ TopNavigationImpl.displayName = 'TopNavigation';
122
+ const TopNavigation = Object.assign(TopNavigationImpl, {
123
+ Root: TopNavigationRoot,
124
+ Brand: TopNavigationBrand,
125
+ Content: TopNavigationContent,
126
+ Item: TopNavigationItem,
127
+ Actions: TopNavigationActions,
128
+ MobileTrigger: TopNavigationMobileTrigger
129
+ });
130
+ export { TopNavigation };
@@ -0,0 +1,119 @@
1
+ @keyframes _1n0eqzz4 {
2
+ from {
3
+ opacity: 0;
4
+ transform: translateY(.25rem);
5
+ }
6
+
7
+ to {
8
+ opacity: 1;
9
+ transform: translateY(0);
10
+ }
11
+ }
12
+
13
+ ._1n0eqzz0[data-orientation="vertical"] {
14
+ gap: var(--vinyasa-space5);
15
+ display: flex;
16
+ }
17
+
18
+ ._1n0eqzz1 {
19
+ align-items: center;
20
+ gap: var(--vinyasa-space1);
21
+ border-bottom: var(--vinyasa-border-width-thin) solid var(--vinyasa-border-color-default);
22
+ display: flex;
23
+ position: relative;
24
+ }
25
+
26
+ ._1n0eqzz1[data-orientation="vertical"] {
27
+ border-bottom: none;
28
+ border-right: var(--vinyasa-border-width-thin) solid var(--vinyasa-border-color-default);
29
+ flex-direction: column;
30
+ flex-shrink: 0;
31
+ align-items: stretch;
32
+ min-width: 10rem;
33
+ }
34
+
35
+ ._1n0eqzz2 {
36
+ background-color: var(--vinyasa-primary);
37
+ opacity: 0;
38
+ height: 2px;
39
+ transition: transform var(--vinyasa-motion-duration-fast) var(--vinyasa-motion-easing-standard), width var(--vinyasa-motion-duration-fast) var(--vinyasa-motion-easing-standard), height var(--vinyasa-motion-duration-fast) var(--vinyasa-motion-easing-standard), opacity var(--vinyasa-motion-duration-fast) var(--vinyasa-motion-easing-standard);
40
+ position: absolute;
41
+ bottom: -1px;
42
+ left: 0;
43
+ }
44
+
45
+ [data-orientation="vertical"] ._1n0eqzz2 {
46
+ width: 2px;
47
+ height: 0;
48
+ inset: 0 -1px auto auto;
49
+ }
50
+
51
+ ._1n0eqzz3 {
52
+ height: 2.5rem;
53
+ padding: 0 var(--vinyasa-space3);
54
+ color: var(--vinyasa-text-muted);
55
+ font-family: var(--vinyasa-font-family-sans);
56
+ font-size: var(--vinyasa-font-size-sm);
57
+ font-weight: var(--vinyasa-font-weight-medium);
58
+ cursor: pointer;
59
+ transition: color var(--vinyasa-motion-duration-fast) var(--vinyasa-motion-easing-standard);
60
+ background-color: #0000;
61
+ border: none;
62
+ align-items: center;
63
+ display: inline-flex;
64
+ }
65
+
66
+ ._1n0eqzz3:hover:not([data-disabled]) {
67
+ color: var(--vinyasa-text-default);
68
+ }
69
+
70
+ ._1n0eqzz3:focus-visible {
71
+ outline: 2px solid var(--vinyasa-focus);
72
+ outline-offset: -2px;
73
+ }
74
+
75
+ ._1n0eqzz3[data-disabled] {
76
+ opacity: var(--vinyasa-opacity-disabled);
77
+ cursor: not-allowed;
78
+ }
79
+
80
+ ._1n0eqzz3[data-state="active"] {
81
+ color: var(--vinyasa-text-default);
82
+ }
83
+
84
+ [data-orientation="vertical"] ._1n0eqzz3 {
85
+ justify-content: flex-start;
86
+ }
87
+
88
+ ._1n0eqzz5 {
89
+ padding-top: var(--vinyasa-space4);
90
+ grid-area: 1 / 1;
91
+ }
92
+
93
+ ._1n0eqzz5:focus-visible {
94
+ outline: 2px solid var(--vinyasa-focus);
95
+ outline-offset: 2px;
96
+ }
97
+
98
+ [data-orientation="vertical"] ._1n0eqzz5 {
99
+ padding-top: 0;
100
+ }
101
+
102
+ ._1n0eqzz5[data-state="active"] {
103
+ animation: _1n0eqzz4 var(--vinyasa-motion-duration-fast) var(--vinyasa-motion-easing-standard);
104
+ }
105
+
106
+ ._1n0eqzz5[data-state="inactive"] {
107
+ visibility: hidden;
108
+ pointer-events: none;
109
+ }
110
+
111
+ ._1n0eqzz6 {
112
+ display: grid;
113
+ position: relative;
114
+ }
115
+
116
+ [data-orientation="vertical"] ._1n0eqzz6 {
117
+ flex: 1;
118
+ }
119
+
@@ -0,0 +1,121 @@
1
+ import "./913.css";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { useThemedRef } from "@vinyasa/tokens";
4
+ import { forwardRef, useCallback, useLayoutEffect, useRef } from "react";
5
+ import * as __rspack_external__radix_ui_react_tabs_7bf5a77b from "@radix-ui/react-tabs";
6
+ var content = '_1n0eqzz5';
7
+ var contentGroup = '_1n0eqzz6';
8
+ var indicator = '_1n0eqzz2';
9
+ var list = '_1n0eqzz1';
10
+ var root = '_1n0eqzz0';
11
+ var trigger = '_1n0eqzz3';
12
+ const TabsRoot = /*#__PURE__*/ forwardRef(({ className, ...rest }, ref)=>{
13
+ const themedRef = useThemedRef(ref);
14
+ return /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_tabs_7bf5a77b.Root, {
15
+ ref: themedRef,
16
+ className: className ? `${root} ${className}` : root,
17
+ ...rest
18
+ });
19
+ });
20
+ TabsRoot.displayName = 'TabsRoot';
21
+ const TabsList = ({ className, children, ...rest })=>{
22
+ const listRef = useRef(null);
23
+ const indicatorRef = useRef(null);
24
+ const updateIndicator = useCallback(()=>{
25
+ const listEl = listRef.current;
26
+ const indicatorEl = indicatorRef.current;
27
+ if (!listEl || !indicatorEl) return;
28
+ const activeTab = listEl.querySelector('[role="tab"][data-state="active"]');
29
+ if (!activeTab) {
30
+ indicatorEl.style.opacity = '0';
31
+ return;
32
+ }
33
+ indicatorEl.style.opacity = '1';
34
+ if ('vertical' === listEl.getAttribute('data-orientation')) {
35
+ indicatorEl.style.transform = `translateY(${String(activeTab.offsetTop)}px)`;
36
+ indicatorEl.style.height = `${String(activeTab.offsetHeight)}px`;
37
+ } else {
38
+ indicatorEl.style.transform = `translateX(${String(activeTab.offsetLeft)}px)`;
39
+ indicatorEl.style.width = `${String(activeTab.offsetWidth)}px`;
40
+ }
41
+ }, []);
42
+ useLayoutEffect(()=>{
43
+ updateIndicator();
44
+ const listEl = listRef.current;
45
+ if (!listEl) return;
46
+ const mutationObserver = new MutationObserver(updateIndicator);
47
+ mutationObserver.observe(listEl, {
48
+ attributes: true,
49
+ attributeFilter: [
50
+ 'data-state'
51
+ ],
52
+ subtree: true
53
+ });
54
+ const resizeObserver = new ResizeObserver(updateIndicator);
55
+ resizeObserver.observe(listEl);
56
+ return ()=>{
57
+ mutationObserver.disconnect();
58
+ resizeObserver.disconnect();
59
+ };
60
+ }, [
61
+ updateIndicator
62
+ ]);
63
+ return /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_tabs_7bf5a77b.List, {
64
+ ref: listRef,
65
+ className: className ? `${list} ${className}` : list,
66
+ ...rest,
67
+ children: [
68
+ children,
69
+ /*#__PURE__*/ jsx("div", {
70
+ ref: indicatorRef,
71
+ className: indicator,
72
+ "aria-hidden": true
73
+ })
74
+ ]
75
+ });
76
+ };
77
+ TabsList.displayName = 'TabsList';
78
+ const TabsTrigger = /*#__PURE__*/ forwardRef(({ className, ...rest }, ref)=>/*#__PURE__*/ jsx(__rspack_external__radix_ui_react_tabs_7bf5a77b.Trigger, {
79
+ ref: ref,
80
+ className: className ? `${trigger} ${className}` : trigger,
81
+ ...rest
82
+ }));
83
+ TabsTrigger.displayName = 'TabsTrigger';
84
+ const TabsContent = ({ className, ...rest })=>/*#__PURE__*/ jsx(__rspack_external__radix_ui_react_tabs_7bf5a77b.Content, {
85
+ forceMount: true,
86
+ className: className ? `${content} ${className}` : content,
87
+ ...rest
88
+ });
89
+ TabsContent.displayName = 'TabsContent';
90
+ const TabsContentGroup = ({ children, className })=>/*#__PURE__*/ jsx("div", {
91
+ className: className ? `${contentGroup} ${className}` : contentGroup,
92
+ children: children
93
+ });
94
+ TabsContentGroup.displayName = 'TabsContentGroup';
95
+ const TabsImpl = ({ tabs, ...rest })=>/*#__PURE__*/ jsxs(TabsRoot, {
96
+ ...rest,
97
+ children: [
98
+ /*#__PURE__*/ jsx(TabsList, {
99
+ children: tabs.map((tab)=>/*#__PURE__*/ jsx(TabsTrigger, {
100
+ value: tab.value,
101
+ disabled: tab.disabled,
102
+ children: tab.label
103
+ }, tab.value))
104
+ }),
105
+ /*#__PURE__*/ jsx(TabsContentGroup, {
106
+ children: tabs.map((tab)=>/*#__PURE__*/ jsx(TabsContent, {
107
+ value: tab.value,
108
+ children: tab.content
109
+ }, tab.value))
110
+ })
111
+ ]
112
+ });
113
+ TabsImpl.displayName = 'Tabs';
114
+ const Tabs = Object.assign(TabsImpl, {
115
+ Root: TabsRoot,
116
+ List: TabsList,
117
+ Trigger: TabsTrigger,
118
+ Content: TabsContent,
119
+ ContentGroup: TabsContentGroup
120
+ });
121
+ export { Tabs };
@@ -0,0 +1,87 @@
1
+ function toPrimitive(t, r) {
2
+ if ("object" != typeof t || !t) return t;
3
+ var e = t[Symbol.toPrimitive];
4
+ if (void 0 !== e) {
5
+ var i = e.call(t, r || "default");
6
+ if ("object" != typeof i) return i;
7
+ throw new TypeError("@@toPrimitive must return a primitive value.");
8
+ }
9
+ return ("string" === r ? String : Number)(t);
10
+ }
11
+ function toPropertyKey(t) {
12
+ var i = toPrimitive(t, "string");
13
+ return "symbol" == typeof i ? i : String(i);
14
+ }
15
+ function _defineProperty(obj, key, value) {
16
+ key = toPropertyKey(key);
17
+ if (key in obj) Object.defineProperty(obj, key, {
18
+ value: value,
19
+ enumerable: true,
20
+ configurable: true,
21
+ writable: true
22
+ });
23
+ else obj[key] = value;
24
+ return obj;
25
+ }
26
+ function ownKeys(e, r) {
27
+ var t = Object.keys(e);
28
+ if (Object.getOwnPropertySymbols) {
29
+ var o = Object.getOwnPropertySymbols(e);
30
+ r && (o = o.filter(function(r) {
31
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
32
+ })), t.push.apply(t, o);
33
+ }
34
+ return t;
35
+ }
36
+ function _objectSpread2(e) {
37
+ for(var r = 1; r < arguments.length; r++){
38
+ var t = null != arguments[r] ? arguments[r] : {};
39
+ r % 2 ? ownKeys(Object(t), !0).forEach(function(r) {
40
+ _defineProperty(e, r, t[r]);
41
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) {
42
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
43
+ });
44
+ }
45
+ return e;
46
+ }
47
+ function mapValues(input, fn) {
48
+ var result = {};
49
+ for(var _key in input)result[_key] = fn(input[_key], _key);
50
+ return result;
51
+ }
52
+ var shouldApplyCompound = (compoundCheck, selections, defaultVariants)=>{
53
+ for (var key of Object.keys(compoundCheck)){
54
+ var _selections$key;
55
+ if (compoundCheck[key] !== (null != (_selections$key = selections[key]) ? _selections$key : defaultVariants[key])) return false;
56
+ }
57
+ return true;
58
+ };
59
+ var createRuntimeFn = (config)=>{
60
+ var runtimeFn = (options)=>{
61
+ var className = config.defaultClassName;
62
+ var selections = _objectSpread2(_objectSpread2({}, config.defaultVariants), options);
63
+ for(var variantName in selections){
64
+ var _selections$variantNa;
65
+ var variantSelection = null != (_selections$variantNa = selections[variantName]) ? _selections$variantNa : config.defaultVariants[variantName];
66
+ if (null != variantSelection) {
67
+ var selection = variantSelection;
68
+ if ('boolean' == typeof selection) selection = true === selection ? 'true' : 'false';
69
+ var selectionClassName = config.variantClassNames[variantName][selection];
70
+ if (selectionClassName) className += ' ' + selectionClassName;
71
+ }
72
+ }
73
+ for (var [compoundCheck, compoundClassName] of config.compoundVariants)if (shouldApplyCompound(compoundCheck, selections, config.defaultVariants)) className += ' ' + compoundClassName;
74
+ return className;
75
+ };
76
+ runtimeFn.variants = ()=>Object.keys(config.variantClassNames);
77
+ runtimeFn.classNames = {
78
+ get base () {
79
+ return config.defaultClassName.split(' ')[0];
80
+ },
81
+ get variants () {
82
+ return mapValues(config.variantClassNames, (classNames)=>mapValues(classNames, (className)=>className.split(' ')[0]));
83
+ }
84
+ };
85
+ return runtimeFn;
86
+ };
87
+ export { createRuntimeFn };
@@ -0,0 +1,2 @@
1
+ export * from './components/breadcrumbs/index';
2
+ export { default } from './components/breadcrumbs/index';
@@ -0,0 +1 @@
1
+ export { Breadcrumbs } from "./655.js";
@@ -0,0 +1,2 @@
1
+ export * from './components/command-navigation/index';
2
+ export { default } from './components/command-navigation/index';
@@ -0,0 +1 @@
1
+ export { CommandNavigation } from "./66.js";
@@ -0,0 +1,6 @@
1
+ export declare const list: string;
2
+ export declare const item: string;
3
+ export declare const link: string;
4
+ export declare const page: string;
5
+ export declare const separator: string;
6
+ export declare const truncatedLabel: string;
@@ -0,0 +1,58 @@
1
+ import { type ComponentPropsWithoutRef, type ElementType, type ReactNode } from 'react';
2
+ export interface BreadcrumbsRootProps extends ComponentPropsWithoutRef<'nav'> {
3
+ /** Screen-reader label for the trail. Defaults to "Breadcrumb". */
4
+ label?: string;
5
+ }
6
+ export type BreadcrumbsListProps = ComponentPropsWithoutRef<'ol'>;
7
+ export type BreadcrumbsItemProps = ComponentPropsWithoutRef<'li'>;
8
+ export interface BreadcrumbsLinkProps extends ComponentPropsWithoutRef<'a'> {
9
+ /** Renders as this element/component instead of a native `<a>` — e.g. your router's own `Link`. */
10
+ as?: ElementType;
11
+ }
12
+ export type BreadcrumbsPageProps = ComponentPropsWithoutRef<'span'>;
13
+ export type BreadcrumbsSeparatorProps = ComponentPropsWithoutRef<'li'>;
14
+ export interface BreadcrumbsItemSpec {
15
+ /** Unique within the trail — used as the React key. Defaults to `label` when omitted. */
16
+ key?: string;
17
+ label: ReactNode;
18
+ href?: string;
19
+ }
20
+ export interface BreadcrumbsProps extends BreadcrumbsRootProps {
21
+ items: BreadcrumbsItemSpec[];
22
+ /** Rendered between each pair of items. Defaults to a chevron icon. */
23
+ separator?: ReactNode;
24
+ /**
25
+ * Component to render a non-final item's link with — swap in your
26
+ * router's own `Link` for client-side navigation instead of a plain
27
+ * `<a>`'s full page reload. Receives `href` like a native anchor; if
28
+ * your router's `Link` takes `to` instead, wrap it: `({ href, ...props })
29
+ * => <RouterLink to={href} {...props} />`. Defaults to `'a'`.
30
+ */
31
+ linkComponent?: ElementType;
32
+ }
33
+ export declare const Breadcrumbs: {
34
+ ({ items, separator: separatorNode, linkComponent, label, className, ...rest }: BreadcrumbsProps): import("react").JSX.Element;
35
+ displayName: string;
36
+ } & {
37
+ Root: import("react").ForwardRefExoticComponent<BreadcrumbsRootProps & import("react").RefAttributes<HTMLElement>>;
38
+ List: {
39
+ ({ className, ...rest }: BreadcrumbsListProps): import("react").JSX.Element;
40
+ displayName: string;
41
+ };
42
+ Item: {
43
+ ({ className, ...rest }: BreadcrumbsItemProps): import("react").JSX.Element;
44
+ displayName: string;
45
+ };
46
+ Link: {
47
+ ({ as: Component, className, ...rest }: BreadcrumbsLinkProps): import("react").JSX.Element;
48
+ displayName: string;
49
+ };
50
+ Page: {
51
+ ({ className, ...rest }: BreadcrumbsPageProps): import("react").JSX.Element;
52
+ displayName: string;
53
+ };
54
+ Separator: {
55
+ ({ className, children, ...rest }: BreadcrumbsSeparatorProps): import("react").JSX.Element;
56
+ displayName: string;
57
+ };
58
+ };
@@ -0,0 +1 @@
1
+ export { Breadcrumbs, type BreadcrumbsItemProps, type BreadcrumbsItemSpec, type BreadcrumbsLinkProps, type BreadcrumbsListProps, type BreadcrumbsPageProps, type BreadcrumbsProps, type BreadcrumbsRootProps, type BreadcrumbsSeparatorProps, } from './Breadcrumbs';
@@ -0,0 +1,4 @@
1
+ export declare const trigger: string;
2
+ export declare const triggerIcon: string;
3
+ export declare const triggerText: string;
4
+ export declare const triggerKbd: string;
@@ -0,0 +1,50 @@
1
+ import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
2
+ export interface CommandNavigationItemSpec {
3
+ /** Unique across the whole palette — used as the React key and cmdk's own item value. */
4
+ key: string;
5
+ label: ReactNode;
6
+ /** Navigated to via `onNavigate` on select. Ignored when `onSelect` is also given. */
7
+ href?: string;
8
+ /** Runs instead of navigating — for a non-navigation action alongside the rest (e.g. "Create new project"). */
9
+ onSelect?: () => void;
10
+ disabled?: boolean;
11
+ icon?: ReactNode;
12
+ shortcut?: ReactNode;
13
+ /** Extra terms to match against when filtering, beyond `label`'s own text. */
14
+ keywords?: string[];
15
+ }
16
+ export interface CommandNavigationGroupSpec {
17
+ /** Unique across the whole palette — used as the React key and cmdk's own group value. */
18
+ key: string;
19
+ heading?: ReactNode;
20
+ items: CommandNavigationItemSpec[];
21
+ }
22
+ export interface CommandNavigationProps {
23
+ groups: CommandNavigationGroupSpec[];
24
+ /** Accessible name for the dialog — never shown visually, only exposed to assistive tech. Defaults to "Command navigation". */
25
+ label?: string;
26
+ placeholder?: string;
27
+ emptyMessage?: ReactNode;
28
+ /** Called with an item's `href` on select — wire this to your router's own navigate function. Defaults to `window.location.assign`. */
29
+ onNavigate?: (href: string) => void;
30
+ open?: boolean;
31
+ defaultOpen?: boolean;
32
+ onOpenChange?: (open: boolean) => void;
33
+ /** Disables the built-in ⌘K/Ctrl+K listener — e.g. when driving `open` entirely from your own trigger and shortcut. Defaults to false. */
34
+ disableShortcut?: boolean;
35
+ }
36
+ export interface CommandNavigationTriggerProps extends ComponentPropsWithoutRef<'button'> {
37
+ /** Shown next to the search icon unless `children` is given. Defaults to `"Search or jump to..."`. */
38
+ placeholder?: string;
39
+ /** Shown as the trailing keyboard hint. Defaults to `"⌘K"` — a literal, platform-neutral label most apps (Linear, Vercel, Raycast) already show regardless of OS, rather than sniffing `navigator.platform` and risking a server/client mismatch. */
40
+ shortcutLabel?: ReactNode;
41
+ }
42
+ export declare const CommandNavigation: {
43
+ ({ groups, label, placeholder, emptyMessage, onNavigate, open: openProp, defaultOpen, onOpenChange, disableShortcut, }: CommandNavigationProps): import("react").JSX.Element;
44
+ displayName: string;
45
+ } & {
46
+ Trigger: {
47
+ ({ placeholder, shortcutLabel, className, children, ...rest }: CommandNavigationTriggerProps): import("react").JSX.Element;
48
+ displayName: string;
49
+ };
50
+ };
@@ -0,0 +1 @@
1
+ export { CommandNavigation, type CommandNavigationGroupSpec, type CommandNavigationItemSpec, type CommandNavigationProps, type CommandNavigationTriggerProps, } from './CommandNavigation';
@@ -0,0 +1,13 @@
1
+ export declare const root: string;
2
+ export declare const list: string;
3
+ export declare const trigger: string;
4
+ export declare const triggerIcon: string;
5
+ export declare const link: string;
6
+ export declare const indicator: string;
7
+ export declare const viewportPosition: string;
8
+ export declare const viewport: string;
9
+ export declare const content: string;
10
+ export declare const contentGrid: string;
11
+ export declare const contentLink: string;
12
+ export declare const contentLinkTitle: string;
13
+ export declare const contentLinkDescription: string;