@flipdish/ui-library 0.9.1 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/molecules/Pagination/index.cjs +1 -1
- package/dist/components/molecules/Pagination/index.cjs.map +1 -1
- package/dist/components/molecules/Pagination/index.js +1 -1
- package/dist/components/molecules/Pagination/index.js.map +1 -1
- package/dist/components/molecules/Select/components/multi-select.cjs +37 -4
- package/dist/components/molecules/Select/components/multi-select.cjs.map +1 -1
- package/dist/components/molecules/Select/components/multi-select.d.ts +3 -1
- package/dist/components/molecules/Select/components/multi-select.d.ts.map +1 -1
- package/dist/components/molecules/Select/components/multi-select.js +38 -5
- package/dist/components/molecules/Select/components/multi-select.js.map +1 -1
- package/dist/components/molecules/Select/index.cjs +2 -0
- package/dist/components/molecules/Select/index.cjs.map +1 -1
- package/dist/components/molecules/Select/index.d.ts +8 -0
- package/dist/components/molecules/Select/index.d.ts.map +1 -1
- package/dist/components/molecules/Select/index.js +1 -0
- package/dist/components/molecules/Select/index.js.map +1 -1
- package/dist/components/organisms/DatePicker/components/date-range-picker.d.ts +1 -2
- package/dist/components/organisms/DatePicker/components/date-range-picker.d.ts.map +1 -1
- package/dist/components/organisms/DatePicker/components/range-calendar.d.ts +1 -1
- package/dist/components/organisms/DatePicker/components/range-calendar.d.ts.map +1 -1
- package/dist/components/organisms/DatePicker/index.d.ts +2 -2
- package/dist/components/organisms/DatePicker/index.d.ts.map +1 -1
- package/dist/components/organisms/SidebarNavigation/components/nav-button.cjs +5 -2
- package/dist/components/organisms/SidebarNavigation/components/nav-button.cjs.map +1 -1
- package/dist/components/organisms/SidebarNavigation/components/nav-button.d.ts +4 -2
- package/dist/components/organisms/SidebarNavigation/components/nav-button.d.ts.map +1 -1
- package/dist/components/organisms/SidebarNavigation/components/nav-button.js +6 -3
- package/dist/components/organisms/SidebarNavigation/components/nav-button.js.map +1 -1
- package/dist/components/organisms/SidebarNavigation/components/nav-item.cjs +12 -7
- package/dist/components/organisms/SidebarNavigation/components/nav-item.cjs.map +1 -1
- package/dist/components/organisms/SidebarNavigation/components/nav-item.d.ts +6 -2
- package/dist/components/organisms/SidebarNavigation/components/nav-item.d.ts.map +1 -1
- package/dist/components/organisms/SidebarNavigation/components/nav-item.js +13 -8
- package/dist/components/organisms/SidebarNavigation/components/nav-item.js.map +1 -1
- package/dist/components/organisms/SidebarNavigation/components/nav-list.cjs +3 -3
- package/dist/components/organisms/SidebarNavigation/components/nav-list.cjs.map +1 -1
- package/dist/components/organisms/SidebarNavigation/components/nav-list.d.ts +3 -1
- package/dist/components/organisms/SidebarNavigation/components/nav-list.d.ts.map +1 -1
- package/dist/components/organisms/SidebarNavigation/components/nav-list.js +3 -3
- package/dist/components/organisms/SidebarNavigation/components/nav-list.js.map +1 -1
- package/dist/components/organisms/SidebarNavigation/hooks/use-dual-tier-keyboard.cjs +56 -0
- package/dist/components/organisms/SidebarNavigation/hooks/use-dual-tier-keyboard.cjs.map +1 -0
- package/dist/components/organisms/SidebarNavigation/hooks/use-dual-tier-keyboard.d.ts +24 -0
- package/dist/components/organisms/SidebarNavigation/hooks/use-dual-tier-keyboard.d.ts.map +1 -0
- package/dist/components/organisms/SidebarNavigation/hooks/use-dual-tier-keyboard.js +54 -0
- package/dist/components/organisms/SidebarNavigation/hooks/use-dual-tier-keyboard.js.map +1 -0
- package/dist/components/organisms/SidebarNavigation/index.cjs +49 -67
- package/dist/components/organisms/SidebarNavigation/index.cjs.map +1 -1
- package/dist/components/organisms/SidebarNavigation/index.d.ts +4 -3
- package/dist/components/organisms/SidebarNavigation/index.d.ts.map +1 -1
- package/dist/components/organisms/SidebarNavigation/index.js +50 -68
- package/dist/components/organisms/SidebarNavigation/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/molecules/MultiSelect/index.cjs +0 -8
- package/dist/components/molecules/MultiSelect/index.cjs.map +0 -1
- package/dist/components/molecules/MultiSelect/index.d.ts +0 -8
- package/dist/components/molecules/MultiSelect/index.d.ts.map +0 -1
- package/dist/components/molecules/MultiSelect/index.js +0 -2
- package/dist/components/molecules/MultiSelect/index.js.map +0 -1
|
@@ -13,6 +13,7 @@ var navAccountCard = require('./components/nav-account-card.cjs');
|
|
|
13
13
|
var navButton = require('./components/nav-button.cjs');
|
|
14
14
|
var navItem = require('./components/nav-item.cjs');
|
|
15
15
|
var navList = require('./components/nav-list.cjs');
|
|
16
|
+
var useDualTierKeyboard = require('./hooks/use-dual-tier-keyboard.cjs');
|
|
16
17
|
var sidebarMenuButton = require('./components/sidebar-menu-button.cjs');
|
|
17
18
|
|
|
18
19
|
const COLLAPSED_WIDTH = 68;
|
|
@@ -22,11 +23,12 @@ const SECONDARY_SIDEBAR_WIDTH = 256;
|
|
|
22
23
|
* The primary app-shell navigation rail. It renders a logo, a list of
|
|
23
24
|
* destinations, footer links, and an account card, and can be toggled between a
|
|
24
25
|
* labelled list and an icon-only strip (the choice persists across reloads).
|
|
25
|
-
* Hovering
|
|
26
|
-
*
|
|
26
|
+
* Hovering (or focusing) the sidebar reveals a secondary sub-navigation panel
|
|
27
|
+
* listing the current section's children; clicking a primary item switches the
|
|
28
|
+
* current section and navigates. Below the `lg` breakpoint it collapses into a
|
|
27
29
|
* mobile header with a slide-over menu.
|
|
28
30
|
*
|
|
29
|
-
* @summary
|
|
31
|
+
* @summary Navigate app sections through a collapsible, dual-tier sidebar rail.
|
|
30
32
|
*/
|
|
31
33
|
const SidebarNavigation = ({ activeUrl, items, footerItems = [], account, collapsed, defaultCollapsed = false, onCollapsedChange, persistCollapsed = true, hideBorder, hideRightBorder, showMobileHeader = true, mobileMenuOpen, onMobileMenuOpenChange, }) => {
|
|
32
34
|
const isControlled = collapsed !== undefined;
|
|
@@ -58,87 +60,67 @@ const SidebarNavigation = ({ activeUrl, items, footerItems = [], account, collap
|
|
|
58
60
|
localStorageUtils.sidebarCollapsedStorage.set(next);
|
|
59
61
|
};
|
|
60
62
|
const isActive = (item) => item.href === activeUrl || item.items?.some((sub) => sub.href === activeUrl);
|
|
61
|
-
//
|
|
62
|
-
//
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
// Dual-tier reveal: the secondary panel is shown whenever the
|
|
64
|
+
// pointer is over — or focus is within — the sidebar, and it always lists the
|
|
65
|
+
// children of `currentItem`. `currentItem` is seeded from the active route and
|
|
66
|
+
// switched by clicking (or keyboard-activating) a primary item, which also
|
|
67
|
+
// navigates. Only `currentItem` is highlighted, so exactly one item is ever active.
|
|
68
|
+
const sections = [...items, ...footerItems];
|
|
69
|
+
const activeItem = sections.find((item) => isActive(item));
|
|
70
|
+
const activeLabel = activeItem?.label;
|
|
71
|
+
// Track the current section by its (unique) label rather than the object, so it
|
|
72
|
+
// survives the consumer passing a fresh `items` array and never collides on href.
|
|
73
|
+
const [currentLabel, setCurrentLabel] = React.useState(activeLabel);
|
|
74
|
+
// Keep the selected section in sync with the active route when it changes externally
|
|
75
|
+
// (browser navigation, a controlled `activeUrl`, or asynchronously-loaded items).
|
|
76
|
+
React.useEffect(() => {
|
|
77
|
+
if (activeLabel !== undefined)
|
|
78
|
+
setCurrentLabel(activeLabel);
|
|
79
|
+
}, [activeLabel]);
|
|
80
|
+
const currentItem = sections.find((item) => item.label === currentLabel);
|
|
81
|
+
const [isHovering, setIsHovering] = React.useState(false);
|
|
82
|
+
const [isFocusWithin, setIsFocusWithin] = React.useState(false);
|
|
83
|
+
const isSecondarySidebarVisible = (isHovering || isFocusWithin) && Boolean(currentItem?.items?.length);
|
|
66
84
|
const panelId = React.useId();
|
|
67
85
|
// Ties the built-in mobile toggle to the drawer it opens via `aria-controls`.
|
|
68
86
|
const mobileMenuId = React.useId();
|
|
69
|
-
|
|
70
|
-
//
|
|
71
|
-
|
|
72
|
-
//
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
const suppressReveal = React.useRef(false);
|
|
76
|
-
const focusFirstPanelItem = () => panelRef.current?.querySelector('a, button')?.focus();
|
|
77
|
-
// Move focus into the panel once it has rendered after a keyboard-triggered open.
|
|
78
|
-
// biome-ignore lint/correctness/useExhaustiveDependencies: focusFirstPanelItem only reads the stable panelRef
|
|
79
|
-
React.useEffect(() => {
|
|
80
|
-
if (isSecondarySidebarVisible && focusPanelOnOpen.current) {
|
|
81
|
-
focusPanelOnOpen.current = false;
|
|
82
|
-
focusFirstPanelItem();
|
|
83
|
-
}
|
|
84
|
-
}, [isSecondarySidebarVisible]);
|
|
85
|
-
const revealSubNav = (item) => {
|
|
86
|
-
if (suppressReveal.current) {
|
|
87
|
-
suppressReveal.current = false;
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
if (item.items?.length) {
|
|
91
|
-
setPanelItem(item);
|
|
92
|
-
setShowSubNav(true);
|
|
93
|
-
}
|
|
94
|
-
else {
|
|
95
|
-
// Hovering/focusing a leaf destination closes any open panel.
|
|
96
|
-
setShowSubNav(false);
|
|
97
|
-
}
|
|
87
|
+
// Only *keyboard* focus holds the panel open. Focus parked on a just-clicked link
|
|
88
|
+
// (pointer modality) must not — otherwise the panel lingers after a mouse click even
|
|
89
|
+
// once the pointer leaves. Gating on `:focus-visible` keeps the mouse behaviour
|
|
90
|
+
// identical to Untitled UI (closes on pointer-leave) while preserving keyboard reach.
|
|
91
|
+
const handleContainerFocus = (event) => {
|
|
92
|
+
setIsFocusWithin(event.target.matches(':focus-visible'));
|
|
98
93
|
};
|
|
99
|
-
const hideSubNav = () => setShowSubNav(false);
|
|
100
94
|
const handleContainerBlur = (event) => {
|
|
101
95
|
if (!event.currentTarget.contains(event.relatedTarget))
|
|
102
|
-
|
|
103
|
-
};
|
|
104
|
-
// ArrowRight on a parent item opens (if needed) and moves focus into the panel.
|
|
105
|
-
const handlePrimaryKeyDown = (item) => (event) => {
|
|
106
|
-
if (event.key !== 'ArrowRight' || !item.items?.length)
|
|
107
|
-
return;
|
|
108
|
-
event.preventDefault();
|
|
109
|
-
triggerRef.current = event.currentTarget.querySelector('a, button');
|
|
110
|
-
if (isSecondarySidebarVisible && panelItem?.label === item.label) {
|
|
111
|
-
focusFirstPanelItem();
|
|
112
|
-
}
|
|
113
|
-
else {
|
|
114
|
-
focusPanelOnOpen.current = true;
|
|
115
|
-
setPanelItem(item);
|
|
116
|
-
setShowSubNav(true);
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
// ArrowLeft/Escape inside the panel closes it and restores focus to the parent.
|
|
120
|
-
const handlePanelKeyDown = (event) => {
|
|
121
|
-
if (event.key !== 'ArrowLeft' && event.key !== 'Escape')
|
|
122
|
-
return;
|
|
123
|
-
event.preventDefault();
|
|
124
|
-
suppressReveal.current = true;
|
|
125
|
-
hideSubNav();
|
|
126
|
-
triggerRef.current?.focus();
|
|
96
|
+
setIsFocusWithin(false);
|
|
127
97
|
};
|
|
98
|
+
const { panelRef, handleTriggerKeyDown, handlePanelKeyDown } = useDualTierKeyboard.useDualTierKeyboard({
|
|
99
|
+
isPanelVisible: isSecondarySidebarVisible,
|
|
100
|
+
currentLabel,
|
|
101
|
+
onSelectSection: setCurrentLabel,
|
|
102
|
+
onReveal: () => setIsFocusWithin(true),
|
|
103
|
+
});
|
|
128
104
|
const renderPrimaryItems = (list) => list.map((item) => {
|
|
129
105
|
const hasChildren = Boolean(item.items?.length);
|
|
130
|
-
|
|
106
|
+
// `isCurrentPage` (exact URL match) drives `aria-current`; `isSelected` (the open
|
|
107
|
+
// section) drives the brand highlight. A parent whose child is active is selected
|
|
108
|
+
// but is NOT the current page.
|
|
109
|
+
const isCurrentPage = item.href === activeUrl;
|
|
110
|
+
const isSelected = currentLabel === item.label;
|
|
111
|
+
const isOpen = hasChildren && isSelected && isSecondarySidebarVisible;
|
|
131
112
|
// Disclosure semantics: parents announce their expanded state and, once open, the panel they control.
|
|
132
113
|
const disclosure = {
|
|
133
114
|
'aria-expanded': hasChildren ? isOpen : undefined,
|
|
134
115
|
'aria-controls': isOpen ? panelId : undefined,
|
|
135
116
|
};
|
|
136
|
-
|
|
117
|
+
const selectSection = () => setCurrentLabel(item.label);
|
|
118
|
+
return (jsxRuntime.jsx("li", { className: isCollapsed ? undefined : 'py-px', onKeyDown: handleTriggerKeyDown(item.label, hasChildren), children: isCollapsed ? (jsxRuntime.jsx(navButton.NavButton, { current: isCurrentPage, selected: isSelected, href: item.href, onClick: selectSection, label: item.label || '', icon: item.icon, ...disclosure })) : (jsxRuntime.jsx(navItem.NavItemBase, { type: "link", current: isCurrentPage, selected: isSelected, href: item.href, icon: item.icon, badge: item.badge, hasSubmenu: hasChildren, onClick: selectSection, ...disclosure, children: item.label })) }, item.label));
|
|
137
119
|
});
|
|
138
120
|
const mainSidebar = (jsxRuntime.jsxs(react.motion.aside, { animate: { width: isCollapsed ? COLLAPSED_WIDTH : EXPANDED_WIDTH }, transition: { type: 'spring', damping: 26, stiffness: 220, bounce: 0 }, className: cx.cx('flex h-full max-h-full flex-col justify-between overflow-x-hidden overflow-y-auto bg-secondary', !hideBorder && 'border-r border-secondary'), children: [jsxRuntime.jsxs("div", { className: "flex flex-col", children: [isCollapsed ? (jsxRuntime.jsx("div", { className: "flex justify-center px-3 py-5", children: jsxRuntime.jsx(UtilityButton.ButtonUtility, { size: "sm", color: "tertiary", tooltip: "Expand", "aria-label": "Expand navigation", icon: uiIcons.ChevronRightDouble, onClick: () => setCollapsed(false) }) })) : (jsxRuntime.jsxs("div", { className: "relative flex items-center px-5 py-5", children: [jsxRuntime.jsx(FlipdishLogo.FlipdishLogo, { size: "md" }), jsxRuntime.jsx("div", { className: "absolute top-5 right-4", children: jsxRuntime.jsx(UtilityButton.ButtonUtility, { size: "sm", color: "tertiary", tooltip: "Collapse", "aria-label": "Collapse navigation", icon: uiIcons.ChevronLeftDouble, onClick: () => setCollapsed(true) }) })] })), jsxRuntime.jsx("ul", { className: cx.cx('flex flex-col gap-0.5', isCollapsed ? 'items-center px-3.5' : 'px-4 pt-1'), children: renderPrimaryItems(items) })] }), jsxRuntime.jsxs("div", { className: cx.cx('mt-auto flex flex-col gap-3 py-4', isCollapsed ? 'items-center px-3' : 'px-4'), children: [footerItems.length > 0 && jsxRuntime.jsx("ul", { className: cx.cx('flex flex-col gap-0.5', isCollapsed && 'items-center'), children: renderPrimaryItems(footerItems) }), account &&
|
|
139
121
|
(isCollapsed ? (jsxRuntime.jsx(navAccountCard.NavAccountCard, { variant: "avatar", account: account.account, menuItems: account.menuItems, bottomMenuItems: account.bottomMenuItems })) : (jsxRuntime.jsx(navAccountCard.NavAccountCard, { account: account.account, menuItems: account.menuItems, bottomMenuItems: account.bottomMenuItems })))] })] }));
|
|
140
|
-
const secondarySidebar =
|
|
141
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: "z-50 hidden lg:fixed lg:inset-y-0 lg:left-0 lg:flex",
|
|
122
|
+
const secondarySidebar = currentItem && (jsxRuntime.jsx(react.AnimatePresence, { initial: false, children: isSecondarySidebarVisible && (jsxRuntime.jsx(react.motion.div, { ref: panelRef, id: panelId, onKeyDown: handlePanelKeyDown, role: "group", "aria-label": `${currentItem.label} pages`, initial: { width: 0, borderColor: 'var(--color-border-secondary)' }, animate: { width: SECONDARY_SIDEBAR_WIDTH, borderColor: 'var(--color-border-secondary)' }, exit: { width: 0, borderColor: 'rgba(0,0,0,0)', transition: { borderColor: { type: 'tween', delay: 0.05 } } }, transition: { type: 'spring', damping: 26, stiffness: 220, bounce: 0 }, className: cx.cx('relative h-full overflow-x-hidden overflow-y-auto bg-primary', !(hideBorder || hideRightBorder) && 'box-content border-r border-secondary'), children: jsxRuntime.jsxs("div", { style: { width: SECONDARY_SIDEBAR_WIDTH }, className: "flex h-full flex-col px-4 pt-6", children: [jsxRuntime.jsx("h3", { className: "px-2 text-sm font-semibold text-tertiary", children: currentItem.label }), jsxRuntime.jsx("ul", { className: "py-2", children: currentItem.items?.map((item) => (jsxRuntime.jsx("li", { className: "py-px", children: jsxRuntime.jsx(navItem.NavItemBase, { type: "link", current: activeUrl === item.href, href: item.href, icon: item.icon, badge: item.badge, children: item.label }) }, item.label))) })] }) })) }));
|
|
123
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: "z-50 hidden lg:fixed lg:inset-y-0 lg:left-0 lg:flex", onPointerEnter: () => setIsHovering(true), onPointerLeave: () => setIsHovering(false), onFocus: handleContainerFocus, onBlur: handleContainerBlur, children: [mainSidebar, secondarySidebar] }), jsxRuntime.jsx("div", { style: { paddingLeft: isCollapsed ? COLLAPSED_WIDTH : EXPANDED_WIDTH }, className: "invisible hidden lg:sticky lg:top-0 lg:bottom-0 lg:left-0 lg:block" }), showMobileHeader && jsxRuntime.jsx(mobileHeader.MobileNavigationHeader, { isOpen: isMobileMenuOpen, onOpenChange: setMobileMenuOpen, controls: mobileMenuId }), jsxRuntime.jsx(mobileHeader.MobileNavigationDrawer, { id: mobileMenuId, isOpen: isMobileMenuOpen, onOpenChange: setMobileMenuOpen, children: jsxRuntime.jsxs("aside", { className: "group flex h-full max-h-full w-full max-w-full flex-col justify-between overflow-y-auto bg-secondary pt-4", children: [jsxRuntime.jsx("div", { className: "px-4", children: jsxRuntime.jsx(FlipdishLogo.FlipdishLogo, { size: "sm" }) }), jsxRuntime.jsx(navList.NavList, { activeUrl: activeUrl, items: items, onNavigate: () => setMobileMenuOpen(false) }), jsxRuntime.jsxs("div", { className: "mt-auto flex flex-col gap-3 p-4", children: [footerItems.length > 0 && (jsxRuntime.jsx("ul", { className: "flex flex-col gap-0.5", children: footerItems.map((item) => (jsxRuntime.jsx("li", { children: jsxRuntime.jsx(navItem.NavItemBase, { type: "link", current: activeUrl === item.href, href: item.href, icon: item.icon, badge: item.badge, onClick: () => setMobileMenuOpen(false), children: item.label }) }, item.label))) })), account && jsxRuntime.jsx(navAccountCard.NavAccountCard, { account: account.account, menuItems: account.menuItems, bottomMenuItems: account.bottomMenuItems })] })] }) })] }));
|
|
142
124
|
};
|
|
143
125
|
|
|
144
126
|
exports.NavAccountCard = navAccountCard.NavAccountCard;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../src/components/organisms/SidebarNavigation/index.tsx"],"sourcesContent":[null],"names":["useState","useEffect","sidebarCollapsedStorage","useId","
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../src/components/organisms/SidebarNavigation/index.tsx"],"sourcesContent":[null],"names":["useState","useEffect","sidebarCollapsedStorage","useId","useDualTierKeyboard","_jsx","NavButton","NavItemBase","_jsxs","motion","cx","ButtonUtility","ChevronRightDouble","FlipdishLogo","ChevronLeftDouble","NavAccountCard","AnimatePresence","_Fragment","MobileNavigationHeader","MobileNavigationDrawer","NavList"],"mappings":";;;;;;;;;;;;;;;;;;AA0DA,MAAM,eAAe,GAAG,EAAE;AAC1B,MAAM,cAAc,GAAG,GAAG;AAC1B,MAAM,uBAAuB,GAAG,GAAG;AAEnC;;;;;;;;;;AAUG;AACI,MAAM,iBAAiB,GAAG,CAAC,EAChC,SAAS,EACT,KAAK,EACL,WAAW,GAAG,EAAE,EAChB,OAAO,EACP,SAAS,EACT,gBAAgB,GAAG,KAAK,EACxB,iBAAiB,EACjB,gBAAgB,GAAG,IAAI,EACvB,UAAU,EACV,eAAe,EACf,gBAAgB,GAAG,IAAI,EACvB,cAAc,EACd,sBAAsB,GACC,KAAI;AAC3B,IAAA,MAAM,YAAY,GAAG,SAAS,KAAK,SAAS;IAC5C,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAGA,cAAQ,CAAC,gBAAgB,CAAC;IAC5E,MAAM,WAAW,GAAG,YAAY,GAAG,SAAS,GAAG,iBAAiB;;AAGhE,IAAA,MAAM,sBAAsB,GAAG,cAAc,KAAK,SAAS;IAC3D,MAAM,CAAC,sBAAsB,EAAE,yBAAyB,CAAC,GAAGA,cAAQ,CAAC,KAAK,CAAC;IAC3E,MAAM,gBAAgB,GAAG,sBAAsB,GAAG,cAAc,GAAG,sBAAsB;AACzF,IAAA,MAAM,iBAAiB,GAAG,CAAC,IAAa,KAAI;AAC1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I,MACpBA,cAAA,CAAA,IAAA,EAAA,EAAA,QAAA,EACEA,cAAA,CAACE,mBAAW,EAAA,EACV,IAAI,EAAC,MAAM,EACX,OAAO,EAAE,SAAS,KAAK,IAAI,CAAC,IAAI,EAChC,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,OAAO,EAAE,MAAM,iBAAiB,CAAC,KAAK,CAAC,EAAA,QAAA,EAEtC,IAAI,CAAC,KAAK,EAAA,CACC,EAAA,EAVP,IAAI,CAAC,KAAK,CAWd,CACN,CAAC,EAAA,CACC,CACN,EAEA,OAAO,IAAIF,cAAA,CAACU,6BAAc,EAAA,EAAC,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,eAAe,EAAE,OAAO,CAAC,eAAe,EAAA,CAAI,CAAA,EAAA,CAC5H,CAAA,EAAA,CACA,EAAA,CACe,CAAA,EAAA,CACxB;AAEP;;;;;;;;"}
|
|
@@ -46,11 +46,12 @@ export interface SidebarNavigationProps {
|
|
|
46
46
|
* The primary app-shell navigation rail. It renders a logo, a list of
|
|
47
47
|
* destinations, footer links, and an account card, and can be toggled between a
|
|
48
48
|
* labelled list and an icon-only strip (the choice persists across reloads).
|
|
49
|
-
* Hovering
|
|
50
|
-
*
|
|
49
|
+
* Hovering (or focusing) the sidebar reveals a secondary sub-navigation panel
|
|
50
|
+
* listing the current section's children; clicking a primary item switches the
|
|
51
|
+
* current section and navigates. Below the `lg` breakpoint it collapses into a
|
|
51
52
|
* mobile header with a slide-over menu.
|
|
52
53
|
*
|
|
53
|
-
* @summary
|
|
54
|
+
* @summary Navigate app sections through a collapsible, dual-tier sidebar rail.
|
|
54
55
|
*/
|
|
55
56
|
export declare const SidebarNavigation: ({ activeUrl, items, footerItems, account, collapsed, defaultCollapsed, onCollapsedChange, persistCollapsed, hideBorder, hideRightBorder, showMobileHeader, mobileMenuOpen, onMobileMenuOpenChange, }: SidebarNavigationProps) => import("react").JSX.Element;
|
|
56
57
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/SidebarNavigation/index.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/SidebarNavigation/index.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,EAAE,EAAc,MAAM,OAAO,CAAC;AAG5C,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAKpF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,EAAE,cAAc,EAAE,KAAK,cAAc,EAAE,cAAc,EAAE,KAAK,sBAAsB,EAAE,KAAK,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACtJ,OAAO,EAAE,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,KAAK,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAElG,KAAK,cAAc,GAAG,WAAW,GAAG;IAAE,IAAI,EAAE,EAAE,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC;AAEzE,MAAM,WAAW,sBAAsB;IACrC,wCAAwC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oFAAoF;IACpF,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,uCAAuC;IACvC,WAAW,CAAC,EAAE,cAAc,EAAE,CAAC;IAC/B,sHAAsH;IACtH,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,8GAA8G;IAC9G,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gEAAgE;IAChE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iDAAiD;IACjD,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD,0FAA0F;IAC1F,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,qEAAqE;IACrE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oEAAoE;IACpE,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,4FAA4F;IAC5F,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,yDAAyD;IACzD,sBAAsB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CAClD;AAMD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB,GAAI,sMAc/B,sBAAsB,gCAiRxB,CAAC"}
|
|
@@ -5,13 +5,14 @@ import { ButtonUtility } from '@flipdish/ui-library/components/atoms/UtilityButt
|
|
|
5
5
|
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
6
6
|
import { sidebarCollapsedStorage } from '@flipdish/ui-library/utilities/localStorageUtils';
|
|
7
7
|
import { motion, AnimatePresence } from 'motion/react';
|
|
8
|
-
import { useState, useEffect, useId
|
|
8
|
+
import { useState, useEffect, useId } from 'react';
|
|
9
9
|
import { MobileNavigationHeader, MobileNavigationDrawer } from './components/mobile-header.js';
|
|
10
10
|
import { NavAccountCard } from './components/nav-account-card.js';
|
|
11
11
|
export { NavAccountMenu } from './components/nav-account-card.js';
|
|
12
12
|
import { NavButton } from './components/nav-button.js';
|
|
13
13
|
import { NavItemBase } from './components/nav-item.js';
|
|
14
14
|
import { NavList } from './components/nav-list.js';
|
|
15
|
+
import { useDualTierKeyboard } from './hooks/use-dual-tier-keyboard.js';
|
|
15
16
|
export { SidebarMenuButton } from './components/sidebar-menu-button.js';
|
|
16
17
|
|
|
17
18
|
const COLLAPSED_WIDTH = 68;
|
|
@@ -21,11 +22,12 @@ const SECONDARY_SIDEBAR_WIDTH = 256;
|
|
|
21
22
|
* The primary app-shell navigation rail. It renders a logo, a list of
|
|
22
23
|
* destinations, footer links, and an account card, and can be toggled between a
|
|
23
24
|
* labelled list and an icon-only strip (the choice persists across reloads).
|
|
24
|
-
* Hovering
|
|
25
|
-
*
|
|
25
|
+
* Hovering (or focusing) the sidebar reveals a secondary sub-navigation panel
|
|
26
|
+
* listing the current section's children; clicking a primary item switches the
|
|
27
|
+
* current section and navigates. Below the `lg` breakpoint it collapses into a
|
|
26
28
|
* mobile header with a slide-over menu.
|
|
27
29
|
*
|
|
28
|
-
* @summary
|
|
30
|
+
* @summary Navigate app sections through a collapsible, dual-tier sidebar rail.
|
|
29
31
|
*/
|
|
30
32
|
const SidebarNavigation = ({ activeUrl, items, footerItems = [], account, collapsed, defaultCollapsed = false, onCollapsedChange, persistCollapsed = true, hideBorder, hideRightBorder, showMobileHeader = true, mobileMenuOpen, onMobileMenuOpenChange, }) => {
|
|
31
33
|
const isControlled = collapsed !== undefined;
|
|
@@ -57,87 +59,67 @@ const SidebarNavigation = ({ activeUrl, items, footerItems = [], account, collap
|
|
|
57
59
|
sidebarCollapsedStorage.set(next);
|
|
58
60
|
};
|
|
59
61
|
const isActive = (item) => item.href === activeUrl || item.items?.some((sub) => sub.href === activeUrl);
|
|
60
|
-
//
|
|
61
|
-
//
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
// Dual-tier reveal: the secondary panel is shown whenever the
|
|
63
|
+
// pointer is over — or focus is within — the sidebar, and it always lists the
|
|
64
|
+
// children of `currentItem`. `currentItem` is seeded from the active route and
|
|
65
|
+
// switched by clicking (or keyboard-activating) a primary item, which also
|
|
66
|
+
// navigates. Only `currentItem` is highlighted, so exactly one item is ever active.
|
|
67
|
+
const sections = [...items, ...footerItems];
|
|
68
|
+
const activeItem = sections.find((item) => isActive(item));
|
|
69
|
+
const activeLabel = activeItem?.label;
|
|
70
|
+
// Track the current section by its (unique) label rather than the object, so it
|
|
71
|
+
// survives the consumer passing a fresh `items` array and never collides on href.
|
|
72
|
+
const [currentLabel, setCurrentLabel] = useState(activeLabel);
|
|
73
|
+
// Keep the selected section in sync with the active route when it changes externally
|
|
74
|
+
// (browser navigation, a controlled `activeUrl`, or asynchronously-loaded items).
|
|
75
|
+
useEffect(() => {
|
|
76
|
+
if (activeLabel !== undefined)
|
|
77
|
+
setCurrentLabel(activeLabel);
|
|
78
|
+
}, [activeLabel]);
|
|
79
|
+
const currentItem = sections.find((item) => item.label === currentLabel);
|
|
80
|
+
const [isHovering, setIsHovering] = useState(false);
|
|
81
|
+
const [isFocusWithin, setIsFocusWithin] = useState(false);
|
|
82
|
+
const isSecondarySidebarVisible = (isHovering || isFocusWithin) && Boolean(currentItem?.items?.length);
|
|
65
83
|
const panelId = useId();
|
|
66
84
|
// Ties the built-in mobile toggle to the drawer it opens via `aria-controls`.
|
|
67
85
|
const mobileMenuId = useId();
|
|
68
|
-
|
|
69
|
-
//
|
|
70
|
-
|
|
71
|
-
//
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
const suppressReveal = useRef(false);
|
|
75
|
-
const focusFirstPanelItem = () => panelRef.current?.querySelector('a, button')?.focus();
|
|
76
|
-
// Move focus into the panel once it has rendered after a keyboard-triggered open.
|
|
77
|
-
// biome-ignore lint/correctness/useExhaustiveDependencies: focusFirstPanelItem only reads the stable panelRef
|
|
78
|
-
useEffect(() => {
|
|
79
|
-
if (isSecondarySidebarVisible && focusPanelOnOpen.current) {
|
|
80
|
-
focusPanelOnOpen.current = false;
|
|
81
|
-
focusFirstPanelItem();
|
|
82
|
-
}
|
|
83
|
-
}, [isSecondarySidebarVisible]);
|
|
84
|
-
const revealSubNav = (item) => {
|
|
85
|
-
if (suppressReveal.current) {
|
|
86
|
-
suppressReveal.current = false;
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
if (item.items?.length) {
|
|
90
|
-
setPanelItem(item);
|
|
91
|
-
setShowSubNav(true);
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
94
|
-
// Hovering/focusing a leaf destination closes any open panel.
|
|
95
|
-
setShowSubNav(false);
|
|
96
|
-
}
|
|
86
|
+
// Only *keyboard* focus holds the panel open. Focus parked on a just-clicked link
|
|
87
|
+
// (pointer modality) must not — otherwise the panel lingers after a mouse click even
|
|
88
|
+
// once the pointer leaves. Gating on `:focus-visible` keeps the mouse behaviour
|
|
89
|
+
// identical to Untitled UI (closes on pointer-leave) while preserving keyboard reach.
|
|
90
|
+
const handleContainerFocus = (event) => {
|
|
91
|
+
setIsFocusWithin(event.target.matches(':focus-visible'));
|
|
97
92
|
};
|
|
98
|
-
const hideSubNav = () => setShowSubNav(false);
|
|
99
93
|
const handleContainerBlur = (event) => {
|
|
100
94
|
if (!event.currentTarget.contains(event.relatedTarget))
|
|
101
|
-
|
|
102
|
-
};
|
|
103
|
-
// ArrowRight on a parent item opens (if needed) and moves focus into the panel.
|
|
104
|
-
const handlePrimaryKeyDown = (item) => (event) => {
|
|
105
|
-
if (event.key !== 'ArrowRight' || !item.items?.length)
|
|
106
|
-
return;
|
|
107
|
-
event.preventDefault();
|
|
108
|
-
triggerRef.current = event.currentTarget.querySelector('a, button');
|
|
109
|
-
if (isSecondarySidebarVisible && panelItem?.label === item.label) {
|
|
110
|
-
focusFirstPanelItem();
|
|
111
|
-
}
|
|
112
|
-
else {
|
|
113
|
-
focusPanelOnOpen.current = true;
|
|
114
|
-
setPanelItem(item);
|
|
115
|
-
setShowSubNav(true);
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
// ArrowLeft/Escape inside the panel closes it and restores focus to the parent.
|
|
119
|
-
const handlePanelKeyDown = (event) => {
|
|
120
|
-
if (event.key !== 'ArrowLeft' && event.key !== 'Escape')
|
|
121
|
-
return;
|
|
122
|
-
event.preventDefault();
|
|
123
|
-
suppressReveal.current = true;
|
|
124
|
-
hideSubNav();
|
|
125
|
-
triggerRef.current?.focus();
|
|
95
|
+
setIsFocusWithin(false);
|
|
126
96
|
};
|
|
97
|
+
const { panelRef, handleTriggerKeyDown, handlePanelKeyDown } = useDualTierKeyboard({
|
|
98
|
+
isPanelVisible: isSecondarySidebarVisible,
|
|
99
|
+
currentLabel,
|
|
100
|
+
onSelectSection: setCurrentLabel,
|
|
101
|
+
onReveal: () => setIsFocusWithin(true),
|
|
102
|
+
});
|
|
127
103
|
const renderPrimaryItems = (list) => list.map((item) => {
|
|
128
104
|
const hasChildren = Boolean(item.items?.length);
|
|
129
|
-
|
|
105
|
+
// `isCurrentPage` (exact URL match) drives `aria-current`; `isSelected` (the open
|
|
106
|
+
// section) drives the brand highlight. A parent whose child is active is selected
|
|
107
|
+
// but is NOT the current page.
|
|
108
|
+
const isCurrentPage = item.href === activeUrl;
|
|
109
|
+
const isSelected = currentLabel === item.label;
|
|
110
|
+
const isOpen = hasChildren && isSelected && isSecondarySidebarVisible;
|
|
130
111
|
// Disclosure semantics: parents announce their expanded state and, once open, the panel they control.
|
|
131
112
|
const disclosure = {
|
|
132
113
|
'aria-expanded': hasChildren ? isOpen : undefined,
|
|
133
114
|
'aria-controls': isOpen ? panelId : undefined,
|
|
134
115
|
};
|
|
135
|
-
|
|
116
|
+
const selectSection = () => setCurrentLabel(item.label);
|
|
117
|
+
return (jsx("li", { className: isCollapsed ? undefined : 'py-px', onKeyDown: handleTriggerKeyDown(item.label, hasChildren), children: isCollapsed ? (jsx(NavButton, { current: isCurrentPage, selected: isSelected, href: item.href, onClick: selectSection, label: item.label || '', icon: item.icon, ...disclosure })) : (jsx(NavItemBase, { type: "link", current: isCurrentPage, selected: isSelected, href: item.href, icon: item.icon, badge: item.badge, hasSubmenu: hasChildren, onClick: selectSection, ...disclosure, children: item.label })) }, item.label));
|
|
136
118
|
});
|
|
137
119
|
const mainSidebar = (jsxs(motion.aside, { animate: { width: isCollapsed ? COLLAPSED_WIDTH : EXPANDED_WIDTH }, transition: { type: 'spring', damping: 26, stiffness: 220, bounce: 0 }, className: cx('flex h-full max-h-full flex-col justify-between overflow-x-hidden overflow-y-auto bg-secondary', !hideBorder && 'border-r border-secondary'), children: [jsxs("div", { className: "flex flex-col", children: [isCollapsed ? (jsx("div", { className: "flex justify-center px-3 py-5", children: jsx(ButtonUtility, { size: "sm", color: "tertiary", tooltip: "Expand", "aria-label": "Expand navigation", icon: ChevronRightDouble, onClick: () => setCollapsed(false) }) })) : (jsxs("div", { className: "relative flex items-center px-5 py-5", children: [jsx(FlipdishLogo, { size: "md" }), jsx("div", { className: "absolute top-5 right-4", children: jsx(ButtonUtility, { size: "sm", color: "tertiary", tooltip: "Collapse", "aria-label": "Collapse navigation", icon: ChevronLeftDouble, onClick: () => setCollapsed(true) }) })] })), jsx("ul", { className: cx('flex flex-col gap-0.5', isCollapsed ? 'items-center px-3.5' : 'px-4 pt-1'), children: renderPrimaryItems(items) })] }), jsxs("div", { className: cx('mt-auto flex flex-col gap-3 py-4', isCollapsed ? 'items-center px-3' : 'px-4'), children: [footerItems.length > 0 && jsx("ul", { className: cx('flex flex-col gap-0.5', isCollapsed && 'items-center'), children: renderPrimaryItems(footerItems) }), account &&
|
|
138
120
|
(isCollapsed ? (jsx(NavAccountCard, { variant: "avatar", account: account.account, menuItems: account.menuItems, bottomMenuItems: account.bottomMenuItems })) : (jsx(NavAccountCard, { account: account.account, menuItems: account.menuItems, bottomMenuItems: account.bottomMenuItems })))] })] }));
|
|
139
|
-
const secondarySidebar =
|
|
140
|
-
return (jsxs(Fragment, { children: [jsxs("div", { className: "z-50 hidden lg:fixed lg:inset-y-0 lg:left-0 lg:flex",
|
|
121
|
+
const secondarySidebar = currentItem && (jsx(AnimatePresence, { initial: false, children: isSecondarySidebarVisible && (jsx(motion.div, { ref: panelRef, id: panelId, onKeyDown: handlePanelKeyDown, role: "group", "aria-label": `${currentItem.label} pages`, initial: { width: 0, borderColor: 'var(--color-border-secondary)' }, animate: { width: SECONDARY_SIDEBAR_WIDTH, borderColor: 'var(--color-border-secondary)' }, exit: { width: 0, borderColor: 'rgba(0,0,0,0)', transition: { borderColor: { type: 'tween', delay: 0.05 } } }, transition: { type: 'spring', damping: 26, stiffness: 220, bounce: 0 }, className: cx('relative h-full overflow-x-hidden overflow-y-auto bg-primary', !(hideBorder || hideRightBorder) && 'box-content border-r border-secondary'), children: jsxs("div", { style: { width: SECONDARY_SIDEBAR_WIDTH }, className: "flex h-full flex-col px-4 pt-6", children: [jsx("h3", { className: "px-2 text-sm font-semibold text-tertiary", children: currentItem.label }), jsx("ul", { className: "py-2", children: currentItem.items?.map((item) => (jsx("li", { className: "py-px", children: jsx(NavItemBase, { type: "link", current: activeUrl === item.href, href: item.href, icon: item.icon, badge: item.badge, children: item.label }) }, item.label))) })] }) })) }));
|
|
122
|
+
return (jsxs(Fragment, { children: [jsxs("div", { className: "z-50 hidden lg:fixed lg:inset-y-0 lg:left-0 lg:flex", onPointerEnter: () => setIsHovering(true), onPointerLeave: () => setIsHovering(false), onFocus: handleContainerFocus, onBlur: handleContainerBlur, children: [mainSidebar, secondarySidebar] }), jsx("div", { style: { paddingLeft: isCollapsed ? COLLAPSED_WIDTH : EXPANDED_WIDTH }, className: "invisible hidden lg:sticky lg:top-0 lg:bottom-0 lg:left-0 lg:block" }), showMobileHeader && jsx(MobileNavigationHeader, { isOpen: isMobileMenuOpen, onOpenChange: setMobileMenuOpen, controls: mobileMenuId }), jsx(MobileNavigationDrawer, { id: mobileMenuId, isOpen: isMobileMenuOpen, onOpenChange: setMobileMenuOpen, children: jsxs("aside", { className: "group flex h-full max-h-full w-full max-w-full flex-col justify-between overflow-y-auto bg-secondary pt-4", children: [jsx("div", { className: "px-4", children: jsx(FlipdishLogo, { size: "sm" }) }), jsx(NavList, { activeUrl: activeUrl, items: items, onNavigate: () => setMobileMenuOpen(false) }), jsxs("div", { className: "mt-auto flex flex-col gap-3 p-4", children: [footerItems.length > 0 && (jsx("ul", { className: "flex flex-col gap-0.5", children: footerItems.map((item) => (jsx("li", { children: jsx(NavItemBase, { type: "link", current: activeUrl === item.href, href: item.href, icon: item.icon, badge: item.badge, onClick: () => setMobileMenuOpen(false), children: item.label }) }, item.label))) })), account && jsx(NavAccountCard, { account: account.account, menuItems: account.menuItems, bottomMenuItems: account.bottomMenuItems })] })] }) })] }));
|
|
141
123
|
};
|
|
142
124
|
|
|
143
125
|
export { NavAccountCard, NavItemBase, SidebarNavigation };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/organisms/SidebarNavigation/index.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/organisms/SidebarNavigation/index.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs","_Fragment"],"mappings":";;;;;;;;;;;;;;;;;AA0DA,MAAM,eAAe,GAAG,EAAE;AAC1B,MAAM,cAAc,GAAG,GAAG;AAC1B,MAAM,uBAAuB,GAAG,GAAG;AAEnC;;;;;;;;;;AAUG;AACI,MAAM,iBAAiB,GAAG,CAAC,EAChC,SAAS,EACT,KAAK,EACL,WAAW,GAAG,EAAE,EAChB,OAAO,EACP,SAAS,EACT,gBAAgB,GAAG,KAAK,EACxB,iBAAiB,EACjB,gBAAgB,GAAG,IAAI,EACvB,UAAU,EACV,eAAe,EACf,gBAAgB,GAAG,IAAI,EACvB,cAAc,EACd,sBAAsB,GACC,KAAI;AAC3B,IAAA,MAAM,YAAY,GAAG,SAAS,KAAK,SAAS;IAC5C,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAC,gBAAgB,CAAC;IAC5E,MAAM,WAAW,GAAG,YAAY,GAAG,SAAS,GAAG,iBAAiB;;AAGhE,IAAA,MAAM,sBAAsB,GAAG,cAAc,KAAK,SAAS;IAC3D,MAAM,CAAC,sBAAsB,EAAE,yBAAyB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC;IAC3E,MAAM,gBAAgB,GAAG,sBAAsB,GAAG,cAAc,GAAG,sBAAsB;AAC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CAAC,IAAI,MACpBA,GAAA,CAAA,IAAA,EAAA,EAAA,QAAA,EACEA,GAAA,CAAC,WAAW,EAAA,EACV,IAAI,EAAC,MAAM,EACX,OAAO,EAAE,SAAS,KAAK,IAAI,CAAC,IAAI,EAChC,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,OAAO,EAAE,MAAM,iBAAiB,CAAC,KAAK,CAAC,EAAA,QAAA,EAEtC,IAAI,CAAC,KAAK,EAAA,CACC,EAAA,EAVP,IAAI,CAAC,KAAK,CAWd,CACN,CAAC,EAAA,CACC,CACN,EAEA,OAAO,IAAIA,GAAA,CAAC,cAAc,EAAA,EAAC,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,eAAe,EAAE,OAAO,CAAC,eAAe,EAAA,CAAI,CAAA,EAAA,CAC5H,CAAA,EAAA,CACA,EAAA,CACe,CAAA,EAAA,CACxB;AAEP;;;;"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* An interactive dropdown that lets the user select multiple options from a
|
|
3
|
-
* searchable list, with built-in Reset and Select all footer actions.
|
|
4
|
-
*
|
|
5
|
-
* @summary pick multiple options from a searchable dropdown list
|
|
6
|
-
*/
|
|
7
|
-
export { MultiSelect } from '../Select/components/multi-select';
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/MultiSelect/index.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|