@efolusi/meridian 1.21.8 → 1.21.10
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/components.css +13 -2
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/navigation/SkipLink.d.ts +8 -0
- package/navigation/SkipLink.js +25 -0
- package/package.json +1 -1
package/components.css
CHANGED
|
@@ -908,7 +908,8 @@ a.ef-sourcecard:focus-visible{outline:none;box-shadow:var(--focus-ring)}
|
|
|
908
908
|
/* components/feedback/Alert.jsx */
|
|
909
909
|
.ef-alert{position:relative;display:grid;grid-template-columns:0 1fr;align-items:start;gap:2px 10px;width:100%;padding:12px 14px;border:1px solid var(--border-strong);border-radius:var(--radius-md);background:var(--surface-card);color:var(--text-primary)}
|
|
910
910
|
.ef-alert:has(>[data-slot=icon]){grid-template-columns:auto 1fr}
|
|
911
|
-
.ef-alert:has(>.ef-alert__action){
|
|
911
|
+
.ef-alert:has(>.ef-alert__action){grid-template-columns:0 1fr auto;column-gap:14px}
|
|
912
|
+
.ef-alert:has(>[data-slot=icon]):has(>.ef-alert__action){grid-template-columns:auto 1fr auto}
|
|
912
913
|
.ef-alert>[data-slot=icon]{grid-column:1;grid-row:1/3;margin-top:2px;color:currentColor}
|
|
913
914
|
.ef-alert>.ef-alert__title,.ef-alert>.ef-alert__description{grid-column:2}
|
|
914
915
|
.ef-alert--success{border-color:var(--success-300);color:var(--success-600)}
|
|
@@ -917,7 +918,8 @@ a.ef-sourcecard:focus-visible{outline:none;box-shadow:var(--focus-ring)}
|
|
|
917
918
|
.ef-alert__title{font-size:var(--text-md);font-weight:var(--weight-semibold);line-height:1.4;color:currentColor}
|
|
918
919
|
.ef-alert__description{font-size:var(--text-sm);line-height:1.5;color:var(--text-secondary)}
|
|
919
920
|
.ef-alert--danger>.ef-alert__description,.ef-alert--destructive>.ef-alert__description{color:var(--danger-700)}
|
|
920
|
-
.ef-alert__action{
|
|
921
|
+
.ef-alert>.ef-alert__action{grid-column:3;grid-row:1/3;align-self:start;margin-top:-2px}
|
|
922
|
+
@media (max-width:559px){.ef-alert:has(>.ef-alert__action){grid-template-columns:0 1fr}.ef-alert:has(>[data-slot=icon]):has(>.ef-alert__action){grid-template-columns:auto 1fr}.ef-alert>.ef-alert__action{grid-column:2;grid-row:auto;margin-top:8px}}
|
|
921
923
|
/* components/feedback/AlertDialog.jsx */
|
|
922
924
|
.ef-alertdialog__overlay{position:fixed;inset:0;z-index:var(--z-overlay);display:grid;place-items:center;padding:24px;background:var(--overlay-scrim);animation:ef-alertdialog-fade var(--dur-med) var(--ease-out)}
|
|
923
925
|
.ef-alertdialog__content{width:100%;max-width:512px;padding:24px;background:var(--surface-card);color:var(--text-primary);border:1px solid var(--border-default);border-radius:var(--radius-lg);box-shadow:var(--shadow-xl);animation:ef-alertdialog-pop var(--dur-slow) var(--ease-spring)}
|
|
@@ -1459,6 +1461,15 @@ input.ef-input-group__control{height:34px;padding:0 11px}textarea.ef-input-group
|
|
|
1459
1461
|
@media(max-width:767px){.ef-sidebar:not([data-collapsible=none]){display:none}.ef-sidebar-provider{min-height:100%}}
|
|
1460
1462
|
@media(min-width:768px){.ef-sidebar-mobile-backdrop,.ef-sidebar-mobile{display:none}}
|
|
1461
1463
|
@media(prefers-reduced-motion:reduce){.ef-sidebar,.ef-sidebar__panel{transition:none}}
|
|
1464
|
+
/* components/navigation/SkipLink.jsx */
|
|
1465
|
+
/* Off-screen rather than display:none or visibility:hidden: both of those
|
|
1466
|
+
remove the link from the focus order entirely, which is the one thing a skip
|
|
1467
|
+
link must never do. Clip-path keeps it reachable by Tab while invisible. */
|
|
1468
|
+
.ef-skip{position:absolute;inset-inline-start:var(--space-4);inset-block-start:var(--space-4);z-index:var(--z-modal);display:inline-flex;align-items:center;height:var(--control-h-md);min-height:var(--tap-min);padding:0 14px;border:1px solid var(--border-strong);border-radius:var(--radius-sm);background:var(--surface-card);color:var(--text-primary);font-family:var(--font-sans);font-size:var(--text-md);font-weight:var(--weight-semibold);text-decoration:none;box-shadow:var(--shadow-md);clip-path:inset(50%);white-space:nowrap}
|
|
1469
|
+
.ef-skip:focus-visible{clip-path:none;outline:none;box-shadow:var(--focus-ring),var(--shadow-md)}
|
|
1470
|
+
/* Some browsers still focus a link on click without :focus-visible; keep the
|
|
1471
|
+
plain :focus reveal so a pointer user never hits an invisible target. */
|
|
1472
|
+
.ef-skip:focus{clip-path:none}
|
|
1462
1473
|
/* components/navigation/Steps.jsx */
|
|
1463
1474
|
.ef-steps{display:flex;flex-direction:column;gap:0}
|
|
1464
1475
|
.ef-steps__item{display:flex;gap:12px}
|
package/index.d.ts
CHANGED
|
@@ -109,6 +109,7 @@ export * from './navigation/Pagination.js';
|
|
|
109
109
|
export * from './navigation/SegmentedControl.js';
|
|
110
110
|
export * from './navigation/SideNav.js';
|
|
111
111
|
export * from './navigation/Sidebar.js';
|
|
112
|
+
export * from './navigation/SkipLink.js';
|
|
112
113
|
export * from './navigation/Steps.js';
|
|
113
114
|
export * from './navigation/Tabs.js';
|
|
114
115
|
export * from './navigation/TopNav.js';
|
package/index.js
CHANGED
|
@@ -109,6 +109,7 @@ export { Pagination, PaginationContent, PaginationItem, PaginationLink, Paginati
|
|
|
109
109
|
export { SegmentedControl } from './navigation/SegmentedControl.js';
|
|
110
110
|
export { SideNav } from './navigation/SideNav.js';
|
|
111
111
|
export { useSidebar, SidebarProvider, Sidebar, SidebarTrigger, SidebarRail, SidebarInset, SidebarHeader, SidebarFooter, SidebarContent, SidebarGroup, SidebarGroupContent, SidebarMenu, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubItem, SidebarInput, SidebarSeparator, SidebarGroupLabel, SidebarGroupAction, SidebarMenuButton, SidebarMenuAction, SidebarMenuBadge, SidebarMenuSubButton, SidebarMenuSkeleton } from './navigation/Sidebar.js';
|
|
112
|
+
export { SkipLink } from './navigation/SkipLink.js';
|
|
112
113
|
export { Steps } from './navigation/Steps.js';
|
|
113
114
|
export { Tabs, TabsList, TabsTrigger, TabsContent } from './navigation/Tabs.js';
|
|
114
115
|
export { TopNav } from './navigation/TopNav.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface SkipLinkProps {
|
|
2
|
+
/** Target landmark; it needs tabIndex={-1} to receive focus @default '#main' */
|
|
3
|
+
href?: string;
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
style?: React.CSSProperties;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function SkipLink(props: SkipLinkProps): React.JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
|
+
import React from 'react';
|
|
4
|
+
/**
|
|
5
|
+
* First focusable element on the page: one Tab press moves a keyboard user past
|
|
6
|
+
* the whole header into the content.
|
|
7
|
+
*
|
|
8
|
+
* The target must be focusable for the jump to move focus, not just scroll:
|
|
9
|
+
* give the landmark `tabIndex={-1}` (`<main id="main" tabIndex={-1}>`). Without
|
|
10
|
+
* it Safari and Firefox scroll the page but leave focus in the header, so the
|
|
11
|
+
* next Tab returns to the navigation the user just skipped.
|
|
12
|
+
*/
|
|
13
|
+
export function SkipLink({
|
|
14
|
+
href = '#main',
|
|
15
|
+
children = 'Skip to content',
|
|
16
|
+
style,
|
|
17
|
+
className,
|
|
18
|
+
...rest
|
|
19
|
+
}) {
|
|
20
|
+
return /*#__PURE__*/React.createElement("a", _extends({}, rest, {
|
|
21
|
+
href: href,
|
|
22
|
+
className: `ef-skip${className ? ' ' + className : ''}`,
|
|
23
|
+
style: style
|
|
24
|
+
}), children);
|
|
25
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@efolusi/meridian",
|
|
3
|
-
"version": "1.21.
|
|
3
|
+
"version": "1.21.10",
|
|
4
4
|
"description": "A general-purpose open-source design system by Efolusi: accessible React components, design tokens, blocks and example apps.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://meridian.efolusi.com",
|