@efolusi/meridian 1.21.7 → 1.21.9
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 +9 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/landing.css +103 -0
- package/navigation/SkipLink.d.ts +8 -0
- package/navigation/SkipLink.js +25 -0
- package/package.json +2 -1
package/components.css
CHANGED
|
@@ -1459,6 +1459,15 @@ input.ef-input-group__control{height:34px;padding:0 11px}textarea.ef-input-group
|
|
|
1459
1459
|
@media(max-width:767px){.ef-sidebar:not([data-collapsible=none]){display:none}.ef-sidebar-provider{min-height:100%}}
|
|
1460
1460
|
@media(min-width:768px){.ef-sidebar-mobile-backdrop,.ef-sidebar-mobile{display:none}}
|
|
1461
1461
|
@media(prefers-reduced-motion:reduce){.ef-sidebar,.ef-sidebar__panel{transition:none}}
|
|
1462
|
+
/* components/navigation/SkipLink.jsx */
|
|
1463
|
+
/* Off-screen rather than display:none or visibility:hidden: both of those
|
|
1464
|
+
remove the link from the focus order entirely, which is the one thing a skip
|
|
1465
|
+
link must never do. Clip-path keeps it reachable by Tab while invisible. */
|
|
1466
|
+
.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}
|
|
1467
|
+
.ef-skip:focus-visible{clip-path:none;outline:none;box-shadow:var(--focus-ring),var(--shadow-md)}
|
|
1468
|
+
/* Some browsers still focus a link on click without :focus-visible; keep the
|
|
1469
|
+
plain :focus reveal so a pointer user never hits an invisible target. */
|
|
1470
|
+
.ef-skip:focus{clip-path:none}
|
|
1462
1471
|
/* components/navigation/Steps.jsx */
|
|
1463
1472
|
.ef-steps{display:flex;flex-direction:column;gap:0}
|
|
1464
1473
|
.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';
|
package/landing.css
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/* Meridian landing layer — OPT-IN, not part of the core token contract.
|
|
2
|
+
*
|
|
3
|
+
* Page rhythm is not a component contract: a Button must look the same
|
|
4
|
+
* everywhere, but how much air sits between marketing sections is a property
|
|
5
|
+
* of the page, so these values deliberately live outside tokens/.
|
|
6
|
+
*
|
|
7
|
+
* They exist because every Efolusi product landing page had reinvented the
|
|
8
|
+
* same fluid clamp and landed on a different number (~69–81px) that matched no
|
|
9
|
+
* step of the spacing scale, while efolusi.com — the reference — sat on the
|
|
10
|
+
* scale at 96px. This file is that reference, written down once.
|
|
11
|
+
*
|
|
12
|
+
* Usage (after the Meridian tokens, because it builds on --space-*):
|
|
13
|
+
* <link rel="stylesheet" href="https://meridian.efolusi.com/landing.css">
|
|
14
|
+
* or, from the npm package: @import "@efolusi/meridian/landing.css";
|
|
15
|
+
*
|
|
16
|
+
* Then either use the tokens directly (padding-block: var(--section-y)) or the
|
|
17
|
+
* thin classes below. Both are fine; the classes only save the boilerplate.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
:root {
|
|
21
|
+
/* Phone. Matches efolusi.com at 375 through 640. */
|
|
22
|
+
--section-y: 64px;
|
|
23
|
+
--hero-top: 48px;
|
|
24
|
+
--hero-bottom: 56px;
|
|
25
|
+
--page-hero-top: 48px;
|
|
26
|
+
--page-hero-bottom: 40px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* Tablet. efolusi.com switches here: 640 is still 64px, 641 is 80px. */
|
|
30
|
+
@media (min-width: 641px) {
|
|
31
|
+
:root {
|
|
32
|
+
--section-y: 80px;
|
|
33
|
+
--hero-top: 64px;
|
|
34
|
+
--hero-bottom: 72px;
|
|
35
|
+
--page-hero-top: 64px;
|
|
36
|
+
--page-hero-bottom: 48px;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* Desktop. efolusi.com switches here: 1020 is still 80px, 1021 is 96px.
|
|
41
|
+
--section-y is --space-24. */
|
|
42
|
+
@media (min-width: 1021px) {
|
|
43
|
+
:root {
|
|
44
|
+
--section-y: 96px;
|
|
45
|
+
--hero-top: 80px;
|
|
46
|
+
--hero-bottom: 88px;
|
|
47
|
+
--page-hero-top: 80px;
|
|
48
|
+
--page-hero-bottom: 56px;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@layer meridian {
|
|
53
|
+
/* A marketing section: vertical rhythm plus the standard page gutter. The
|
|
54
|
+
gutter is 18px on phones because that is what the docs site and the
|
|
55
|
+
reference both use below 760px. */
|
|
56
|
+
.mrd-section {
|
|
57
|
+
padding-block: var(--section-y);
|
|
58
|
+
padding-inline: 18px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@media (min-width: 641px) {
|
|
62
|
+
.mrd-section {
|
|
63
|
+
padding-inline: 32px;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* The first section of a landing page: less air above (the nav is already
|
|
68
|
+
there), a little more below than a normal section. */
|
|
69
|
+
.mrd-hero {
|
|
70
|
+
padding-block: var(--hero-top) var(--hero-bottom);
|
|
71
|
+
padding-inline: 18px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@media (min-width: 641px) {
|
|
75
|
+
.mrd-hero {
|
|
76
|
+
padding-inline: 32px;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* The header of a sub-page (pricing, docs index, changelog): tighter than a
|
|
81
|
+
landing hero, because content follows immediately. */
|
|
82
|
+
.mrd-page-hero {
|
|
83
|
+
padding-block: var(--page-hero-top) var(--page-hero-bottom);
|
|
84
|
+
padding-inline: 18px;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
@media (min-width: 641px) {
|
|
88
|
+
.mrd-page-hero {
|
|
89
|
+
padding-inline: 32px;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* Centres the content of any of the above on the shared measure. */
|
|
94
|
+
.mrd-container {
|
|
95
|
+
max-width: var(--container-max);
|
|
96
|
+
margin-inline: auto;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.mrd-container--text {
|
|
100
|
+
max-width: var(--container-text);
|
|
101
|
+
margin-inline: auto;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -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.9",
|
|
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",
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"./styles.css": "./styles.css",
|
|
23
23
|
"./components.css": "./components.css",
|
|
24
|
+
"./landing.css": "./landing.css",
|
|
24
25
|
"./tokens/*": "./tokens/*",
|
|
25
26
|
"./package.json": "./package.json",
|
|
26
27
|
"./tokens.json": "./tokens.json",
|