@surflane/ui 0.1.0 → 0.2.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/README.md +8 -8
- package/dist/advanced-forms.d.ts +2 -2
- package/dist/advanced-forms.js +39 -39
- package/dist/app-shell.d.ts +1 -1
- package/dist/app-shell.js +11 -11
- package/dist/button.d.ts +5 -5
- package/dist/button.js +12 -12
- package/dist/chart.d.ts +3 -3
- package/dist/chart.js +36 -34
- package/dist/commands.d.ts +5 -5
- package/dist/commands.js +17 -17
- package/dist/content.d.ts +2 -2
- package/dist/content.js +66 -28
- package/dist/context-overlays.d.ts +3 -3
- package/dist/context-overlays.js +11 -11
- package/dist/data.d.ts +1 -1
- package/dist/data.js +18 -18
- package/dist/date-picker.d.ts +8 -8
- package/dist/date-picker.js +18 -18
- package/dist/dialog-focus.js +7 -7
- package/dist/dialog.d.ts +5 -5
- package/dist/dialog.js +16 -16
- package/dist/feedback.d.ts +5 -5
- package/dist/feedback.js +20 -20
- package/dist/file-upload.d.ts +9 -9
- package/dist/file-upload.js +64 -63
- package/dist/filter-bar.d.ts +1 -1
- package/dist/filter-bar.js +9 -9
- package/dist/form-state.d.ts +1 -1
- package/dist/form-state.js +11 -11
- package/dist/forms.d.ts +5 -5
- package/dist/forms.js +32 -32
- package/dist/foundations.d.ts +10 -10
- package/dist/foundations.js +26 -26
- package/dist/icon.d.ts +7 -7
- package/dist/icon.js +22 -22
- package/dist/index.d.ts +37 -37
- package/dist/index.js +38 -38
- package/dist/input-extensions.d.ts +3 -3
- package/dist/input-extensions.js +21 -21
- package/dist/input.d.ts +2 -2
- package/dist/input.js +7 -7
- package/dist/markdown.d.ts +2 -2
- package/dist/markdown.js +38 -38
- package/dist/menu.d.ts +2 -2
- package/dist/menu.js +19 -19
- package/dist/messages.d.ts +2 -2
- package/dist/messages.js +18 -18
- package/dist/navigation-menu.d.ts +2 -2
- package/dist/navigation-menu.js +16 -16
- package/dist/navigation.d.ts +5 -5
- package/dist/navigation.js +40 -40
- package/dist/otp-field.d.ts +1 -1
- package/dist/otp-field.js +14 -14
- package/dist/pagination.d.ts +2 -2
- package/dist/pagination.js +12 -12
- package/dist/panels.d.ts +8 -8
- package/dist/panels.js +39 -39
- package/dist/parts.d.ts +2 -2
- package/dist/parts.js +8 -8
- package/dist/popover.d.ts +3 -3
- package/dist/popover.js +6 -6
- package/dist/scroll-area.d.ts +1 -1
- package/dist/scroll-area.js +20 -20
- package/dist/select.d.ts +8 -8
- package/dist/select.js +21 -21
- package/dist/sizing.d.ts +3 -3
- package/dist/sizing.js +9 -9
- package/dist/slot.d.ts +1 -1
- package/dist/slot.js +4 -4
- package/dist/status.d.ts +4 -4
- package/dist/status.js +8 -8
- package/dist/syntax-engine.js +43 -43
- package/dist/syntax-highlighter.d.ts +2 -2
- package/dist/syntax-highlighter.js +32 -32
- package/dist/toast.d.ts +4 -4
- package/dist/toast.js +33 -33
- package/dist/tone-transition.d.ts +1 -1
- package/dist/tone-transition.js +17 -17
- package/dist/tooltip.d.ts +1 -1
- package/dist/tooltip.js +4 -4
- package/dist/tree.d.ts +4 -4
- package/dist/tree.js +60 -60
- package/package.json +2 -2
- package/src/styles.css +233 -142
package/dist/markdown.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import * as React from
|
|
4
|
-
import ReactMarkdown from
|
|
5
|
-
import remarkGfm from
|
|
6
|
-
import { CodeBlock } from
|
|
7
|
-
import { Table } from
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import ReactMarkdown from 'react-markdown';
|
|
5
|
+
import remarkGfm from 'remark-gfm';
|
|
6
|
+
import { CodeBlock } from './content.js';
|
|
7
|
+
import { Table } from './data.js';
|
|
8
8
|
function text(node) {
|
|
9
|
-
return
|
|
9
|
+
return 'value' in node
|
|
10
10
|
? node.value
|
|
11
|
-
:
|
|
12
|
-
? node.children.map((child) => text(child)).join(
|
|
13
|
-
:
|
|
11
|
+
: 'children' in node
|
|
12
|
+
? node.children.map((child) => text(child)).join('')
|
|
13
|
+
: '';
|
|
14
14
|
}
|
|
15
15
|
function visit(node, callback) {
|
|
16
|
-
if (node.type ===
|
|
16
|
+
if (node.type === 'element')
|
|
17
17
|
callback(node);
|
|
18
|
-
if (
|
|
18
|
+
if ('children' in node)
|
|
19
19
|
node.children.forEach((child) => visit(child, callback));
|
|
20
20
|
}
|
|
21
21
|
/** CommonMark + GFM. HTML stays disabled, URLs use react-markdown's safe default.
|
|
22
22
|
* Fetching, permissions, frontmatter, MDX and script execution are caller concerns. */
|
|
23
|
-
export const Markdown = React.forwardRef(function Markdown({ source, label =
|
|
24
|
-
const prefix = `md-${React.useId().replace(/[^a-zA-Z0-9_-]/g,
|
|
23
|
+
export const Markdown = React.forwardRef(function Markdown({ source, label = 'Markdown content', headingLevel = 2, codeWrap = false, className, ...props }, ref) {
|
|
24
|
+
const prefix = `md-${React.useId().replace(/[^a-zA-Z0-9_-]/g, '')}`;
|
|
25
25
|
const headings = React.useMemo(() => () => (tree) => {
|
|
26
26
|
const counts = new Map();
|
|
27
27
|
const anchors = new Map();
|
|
@@ -30,43 +30,43 @@ export const Markdown = React.forwardRef(function Markdown({ source, label = "Ma
|
|
|
30
30
|
if (!/^h[1-6]$/.test(node.tagName))
|
|
31
31
|
return;
|
|
32
32
|
const slug = text(node)
|
|
33
|
-
.normalize(
|
|
33
|
+
.normalize('NFKC')
|
|
34
34
|
.toLowerCase()
|
|
35
|
-
.replace(/[^\p{L}\p{N}\s_-]/gu,
|
|
35
|
+
.replace(/[^\p{L}\p{N}\s_-]/gu, '')
|
|
36
36
|
.trim()
|
|
37
|
-
.replace(/\s+/g,
|
|
37
|
+
.replace(/\s+/g, '-') || 'section';
|
|
38
38
|
const count = counts.get(slug) ?? 0;
|
|
39
39
|
counts.set(slug, count + 1);
|
|
40
40
|
const key = count ? `${slug}-${count}` : slug;
|
|
41
41
|
const id = `${prefix}-${key}`;
|
|
42
|
-
if (typeof node.properties.id ===
|
|
42
|
+
if (typeof node.properties.id === 'string')
|
|
43
43
|
previousIds.set(node.properties.id, id);
|
|
44
44
|
node.properties.id = id;
|
|
45
45
|
anchors.set(key, id);
|
|
46
46
|
});
|
|
47
47
|
visit(tree, (node) => {
|
|
48
|
-
if (node.tagName ===
|
|
49
|
-
String(node.properties.className ??
|
|
50
|
-
const taskLabel = text(node).trim() ||
|
|
48
|
+
if (node.tagName === 'li' &&
|
|
49
|
+
String(node.properties.className ?? '').includes('task-list-item')) {
|
|
50
|
+
const taskLabel = text(node).trim() || 'Task list item';
|
|
51
51
|
visit(node, (child) => {
|
|
52
|
-
if (child.tagName ===
|
|
53
|
-
child.properties.type ===
|
|
52
|
+
if (child.tagName === 'input' &&
|
|
53
|
+
child.properties.type === 'checkbox')
|
|
54
54
|
child.properties.ariaLabel = taskLabel;
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
|
-
for (const property of [
|
|
57
|
+
for (const property of ['ariaDescribedBy', 'ariaLabelledBy']) {
|
|
58
58
|
const references = node.properties[property];
|
|
59
59
|
if (Array.isArray(references))
|
|
60
60
|
node.properties[property] = references.map((value) => previousIds.get(String(value)) ?? value);
|
|
61
|
-
else if (typeof references ===
|
|
61
|
+
else if (typeof references === 'string')
|
|
62
62
|
node.properties[property] = references
|
|
63
63
|
.split(/\s+/)
|
|
64
64
|
.map((value) => previousIds.get(value) ?? value)
|
|
65
|
-
.join(
|
|
65
|
+
.join(' ');
|
|
66
66
|
}
|
|
67
|
-
if (node.tagName !==
|
|
68
|
-
typeof node.properties.href !==
|
|
69
|
-
!node.properties.href.startsWith(
|
|
67
|
+
if (node.tagName !== 'a' ||
|
|
68
|
+
typeof node.properties.href !== 'string' ||
|
|
69
|
+
!node.properties.href.startsWith('#'))
|
|
70
70
|
return;
|
|
71
71
|
try {
|
|
72
72
|
const target = anchors.get(decodeURIComponent(node.properties.href.slice(1)));
|
|
@@ -91,31 +91,31 @@ export const Markdown = React.forwardRef(function Markdown({ source, label = "Ma
|
|
|
91
91
|
const child = React.Children.toArray(children)[0];
|
|
92
92
|
if (!React.isValidElement(child))
|
|
93
93
|
return _jsx("pre", { children: children });
|
|
94
|
-
const language = /(?:^|\s)language-([^\s]+)/.exec(child.props.className ??
|
|
95
|
-
const code = String(child.props.children ??
|
|
94
|
+
const language = /(?:^|\s)language-([^\s]+)/.exec(child.props.className ?? '')?.[1] ?? 'text';
|
|
95
|
+
const code = String(child.props.children ?? '').replace(/\n$/, '');
|
|
96
96
|
return (_jsx(CodeBlock, { code: code, language: language, wrap: codeWrap, label: `${label}: code at line ${node?.position?.start.line ?? 1}` }));
|
|
97
97
|
},
|
|
98
98
|
code({ node: _node, ...codeProps }) {
|
|
99
|
-
return _jsx("code", { ...codeProps, className:
|
|
99
|
+
return _jsx("code", { ...codeProps, className: 'pui-markdown-inline-code' });
|
|
100
100
|
},
|
|
101
101
|
table({ node, children, ...tableProps }) {
|
|
102
|
-
return (_jsx(Table.Container, { label: `${label}: table at line ${node?.position?.start.line ?? 1}`, orientation:
|
|
102
|
+
return (_jsx(Table.Container, { label: `${label}: table at line ${node?.position?.start.line ?? 1}`, orientation: 'horizontal', children: _jsx("table", { ...tableProps, className: 'pui-table', children: children }) }));
|
|
103
103
|
},
|
|
104
104
|
th({ node: _node, ...cellProps }) {
|
|
105
|
-
return (_jsx("th", { ...cellProps, scope:
|
|
105
|
+
return (_jsx("th", { ...cellProps, scope: 'col', className: 'pui-table-cell pui-table-header' }));
|
|
106
106
|
},
|
|
107
107
|
td({ node: _node, ...cellProps }) {
|
|
108
|
-
return _jsx("td", { ...cellProps, className:
|
|
108
|
+
return _jsx("td", { ...cellProps, className: 'pui-table-cell' });
|
|
109
109
|
},
|
|
110
110
|
a({ node: _node, href, children, ...linkProps }) {
|
|
111
111
|
return href ? (_jsx("a", { ...linkProps, href: href, children: children })) : (_jsx("span", { children: children }));
|
|
112
112
|
},
|
|
113
113
|
img({ node: _node, src, alt, ...imageProps }) {
|
|
114
|
-
return src ? (_jsx("img", { ...imageProps, src: src, alt: alt ??
|
|
114
|
+
return src ? (_jsx("img", { ...imageProps, src: src, alt: alt ?? '', loading: 'lazy' })) : (_jsx("span", { children: alt }));
|
|
115
115
|
},
|
|
116
116
|
};
|
|
117
117
|
}, [headingLevel, label, codeWrap]);
|
|
118
|
-
return (_jsx("div", { ...props, ref: ref, role:
|
|
118
|
+
return (_jsx("div", { ...props, ref: ref, role: 'article', className: ['pui-prose pui-markdown', className]
|
|
119
119
|
.filter(Boolean)
|
|
120
|
-
.join(
|
|
120
|
+
.join(' '), "aria-label": label, children: _jsx(ReactMarkdown, { remarkPlugins: [remarkGfm], rehypePlugins: [headings], remarkRehypeOptions: { clobberPrefix: `${prefix}-` }, skipHtml: true, components: components, children: source }) }));
|
|
121
121
|
});
|
package/dist/menu.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { Menu as BaseMenu } from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Menu as BaseMenu } from '@base-ui/react/menu';
|
|
3
3
|
declare const MenuPopup: React.ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react/menu").MenuPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
4
4
|
size?: import("./sizing.js").ComponentSize;
|
|
5
5
|
} & React.RefAttributes<HTMLDivElement>>;
|
package/dist/menu.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import * as React from
|
|
4
|
-
import { Menu as BaseMenu } from
|
|
5
|
-
import { skin, part } from
|
|
6
|
-
const MenuPopup = part(BaseMenu.Popup,
|
|
7
|
-
const MenuPositioner = part(BaseMenu.Positioner,
|
|
8
|
-
const MenuContent = React.forwardRef(function MenuContent({ align =
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Menu as BaseMenu } from '@base-ui/react/menu';
|
|
5
|
+
import { skin, part } from './parts.js';
|
|
6
|
+
const MenuPopup = part(BaseMenu.Popup, 'pui-menu');
|
|
7
|
+
const MenuPositioner = part(BaseMenu.Positioner, 'pui-positioner');
|
|
8
|
+
const MenuContent = React.forwardRef(function MenuContent({ align = 'end', sideOffset = 6, side, collisionPadding, className, ...props }, ref) {
|
|
9
9
|
return (_jsx(MenuPositioner, { align: align, side: side, sideOffset: sideOffset, collisionPadding: collisionPadding, children: _jsx(MenuPopup, { ...props, ref: ref, className: className }) }));
|
|
10
10
|
});
|
|
11
11
|
const MenuTrigger = React.forwardRef(function MenuTrigger({ className, ...props }, ref) {
|
|
12
|
-
return (_jsx(BaseMenu.Trigger, { "data-variant":
|
|
12
|
+
return (_jsx(BaseMenu.Trigger, { "data-variant": 'ghost', ...props, ref: ref, className: skin('pui-button pui-menu-trigger', className) }));
|
|
13
13
|
});
|
|
14
14
|
const CheckboxIndicator = React.forwardRef(function CheckboxIndicator({ className, children, ...props }, ref) {
|
|
15
|
-
return (_jsx(BaseMenu.CheckboxItemIndicator, { keepMounted: true, ...props, ref: ref, className: skin(
|
|
15
|
+
return (_jsx(BaseMenu.CheckboxItemIndicator, { keepMounted: true, ...props, ref: ref, className: skin('pui-menu-indicator', className), children: children ?? (_jsx("svg", { width: '16', height: '16', viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: '1.6', "aria-hidden": 'true', children: _jsx("path", { d: 'm5 12 4 4L19 6' }) })) }));
|
|
16
16
|
});
|
|
17
17
|
const RadioIndicator = React.forwardRef(function RadioIndicator({ className, children, ...props }, ref) {
|
|
18
|
-
return (_jsx(BaseMenu.RadioItemIndicator, { keepMounted: true, ...props, ref: ref, className: skin(
|
|
18
|
+
return (_jsx(BaseMenu.RadioItemIndicator, { keepMounted: true, ...props, ref: ref, className: skin('pui-menu-indicator', className), children: children ?? (_jsx("svg", { width: '16', height: '16', viewBox: '0 0 24 24', fill: 'currentColor', "aria-hidden": 'true', children: _jsx("circle", { cx: '12', cy: '12', r: '4' }) })) }));
|
|
19
19
|
});
|
|
20
20
|
const SubmenuTrigger = React.forwardRef(function SubmenuTrigger({ className, children, indicator, ...props }, ref) {
|
|
21
|
-
return (_jsxs(BaseMenu.SubmenuTrigger, { ...props, ref: ref, className: skin(
|
|
21
|
+
return (_jsxs(BaseMenu.SubmenuTrigger, { ...props, ref: ref, className: skin('pui-menu-item pui-menu-submenu-trigger', className), children: [children, indicator === false
|
|
22
22
|
? null
|
|
23
|
-
: (indicator ?? (_jsx("svg", { className:
|
|
23
|
+
: (indicator ?? (_jsx("svg", { className: 'pui-submenu-arrow', width: '16', height: '16', viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: '1.6', "aria-hidden": 'true', children: _jsx("path", { d: 'm9 6 6 6-6 6' }) })))] }));
|
|
24
24
|
});
|
|
25
25
|
export const Menu = {
|
|
26
26
|
...BaseMenu,
|
|
@@ -31,13 +31,13 @@ export const Menu = {
|
|
|
31
31
|
CheckboxItemIndicator: CheckboxIndicator,
|
|
32
32
|
RadioItemIndicator: RadioIndicator,
|
|
33
33
|
SubmenuTrigger,
|
|
34
|
-
Item: part(BaseMenu.Item,
|
|
35
|
-
LinkItem: part(BaseMenu.LinkItem,
|
|
36
|
-
CheckboxItem: part(BaseMenu.CheckboxItem,
|
|
37
|
-
RadioItem: part(BaseMenu.RadioItem,
|
|
38
|
-
GroupLabel: part(BaseMenu.GroupLabel,
|
|
39
|
-
Separator: part(BaseMenu.Separator,
|
|
40
|
-
Input: part(BaseMenu.Input,
|
|
34
|
+
Item: part(BaseMenu.Item, 'pui-menu-item'),
|
|
35
|
+
LinkItem: part(BaseMenu.LinkItem, 'pui-menu-item'),
|
|
36
|
+
CheckboxItem: part(BaseMenu.CheckboxItem, 'pui-menu-item pui-menu-check-item'),
|
|
37
|
+
RadioItem: part(BaseMenu.RadioItem, 'pui-menu-item pui-menu-check-item'),
|
|
38
|
+
GroupLabel: part(BaseMenu.GroupLabel, 'pui-menu-group-label'),
|
|
39
|
+
Separator: part(BaseMenu.Separator, 'pui-menu-separator'),
|
|
40
|
+
Input: part(BaseMenu.Input, 'pui-input'),
|
|
41
41
|
};
|
|
42
42
|
// Flat names for React Server Components, which cannot dot into client exports.
|
|
43
43
|
export { MenuPopup, MenuPositioner, MenuTrigger, MenuContent };
|
package/dist/messages.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { type StatusTone } from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type StatusTone } from './status.js';
|
|
3
3
|
export declare const InlineMessage: {
|
|
4
4
|
Root: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
5
5
|
tone?: StatusTone;
|
package/dist/messages.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import * as React from
|
|
4
|
-
import { useToneTransition } from
|
|
5
|
-
import { part } from
|
|
6
|
-
import { StatusIcon } from
|
|
7
|
-
const MessageRoot = React.forwardRef(function MessageRoot({ tone =
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { useToneTransition } from './tone-transition.js';
|
|
5
|
+
import { part } from './parts.js';
|
|
6
|
+
import { StatusIcon } from './status.js';
|
|
7
|
+
const MessageRoot = React.forwardRef(function MessageRoot({ tone = 'neutral', className, ...props }, ref) {
|
|
8
8
|
const elementRef = useToneTransition(tone, ref);
|
|
9
|
-
return (_jsx("div", { ...props, ref: elementRef, "data-tone": tone, className: [
|
|
9
|
+
return (_jsx("div", { ...props, ref: elementRef, "data-tone": tone, className: ['pui-message', className].filter(Boolean).join(' ') }));
|
|
10
10
|
});
|
|
11
|
-
const MessageIcon = React.forwardRef(function MessageIcon({ tone =
|
|
12
|
-
return (_jsx("span", { ...props, ref: ref, "aria-hidden":
|
|
11
|
+
const MessageIcon = React.forwardRef(function MessageIcon({ tone = 'neutral', children, className, ...props }, ref) {
|
|
12
|
+
return (_jsx("span", { ...props, ref: ref, "aria-hidden": 'true', className: ['pui-message-icon', className].filter(Boolean).join(' '), children: children ?? _jsx(StatusIcon, { tone: tone }) }));
|
|
13
13
|
});
|
|
14
14
|
export const InlineMessage = {
|
|
15
15
|
Root: MessageRoot,
|
|
16
16
|
Icon: MessageIcon,
|
|
17
|
-
Content: part(
|
|
18
|
-
Title: part(
|
|
19
|
-
Description: part(
|
|
20
|
-
Actions: part(
|
|
17
|
+
Content: part('div', 'pui-message-content'),
|
|
18
|
+
Title: part('strong', 'pui-message-title'),
|
|
19
|
+
Description: part('p', 'pui-message-description'),
|
|
20
|
+
Actions: part('div', 'pui-message-actions'),
|
|
21
21
|
};
|
|
22
22
|
const EmptyTitle = React.forwardRef(function EmptyTitle({ level = 3, className, ...props }, ref) {
|
|
23
23
|
return React.createElement(`h${level}`, {
|
|
24
24
|
...props,
|
|
25
25
|
ref,
|
|
26
|
-
className: [
|
|
26
|
+
className: ['pui-empty-title', className].filter(Boolean).join(' '),
|
|
27
27
|
});
|
|
28
28
|
});
|
|
29
29
|
export const EmptyState = {
|
|
30
|
-
Root: part(
|
|
31
|
-
Icon: part(
|
|
30
|
+
Root: part('div', 'pui-empty'),
|
|
31
|
+
Icon: part('div', 'pui-empty-icon'),
|
|
32
32
|
Title: EmptyTitle,
|
|
33
|
-
Description: part(
|
|
34
|
-
Actions: part(
|
|
33
|
+
Description: part('p', 'pui-empty-description'),
|
|
34
|
+
Actions: part('div', 'pui-empty-actions'),
|
|
35
35
|
};
|
|
36
36
|
// Flat names for React Server Components, which cannot dot into client exports.
|
|
37
37
|
export const { Root: EmptyStateRoot, Icon: EmptyStateIcon, Title: EmptyStateTitle, Description: EmptyStateDescription, Actions: EmptyStateActions, } = EmptyState;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { NavigationMenu as BaseNavigationMenu } from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { NavigationMenu as BaseNavigationMenu } from '@base-ui/react/navigation-menu';
|
|
3
3
|
declare function Root<Value>(props: BaseNavigationMenu.Root.Props<Value>): React.JSX.Element;
|
|
4
4
|
export declare const NavigationMenu: {
|
|
5
5
|
Root: typeof Root;
|
package/dist/navigation-menu.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import * as React from
|
|
4
|
-
import { NavigationMenu as BaseNavigationMenu } from
|
|
5
|
-
import { part, skin } from
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { NavigationMenu as BaseNavigationMenu } from '@base-ui/react/navigation-menu';
|
|
5
|
+
import { part, skin } from './parts.js';
|
|
6
6
|
function Root(props) {
|
|
7
|
-
const { className, orientation =
|
|
8
|
-
return (_jsx(BaseNavigationMenu.Root, { ...rest, orientation: orientation, "data-orientation": orientation, className: skin(
|
|
7
|
+
const { className, orientation = 'horizontal', ...rest } = props;
|
|
8
|
+
return (_jsx(BaseNavigationMenu.Root, { ...rest, orientation: orientation, "data-orientation": orientation, className: skin('pui-navigation-menu', className) }));
|
|
9
9
|
}
|
|
10
10
|
const Trigger = React.forwardRef(function Trigger({ className, children, indicator, ...props }, ref) {
|
|
11
|
-
return (_jsxs(BaseNavigationMenu.Trigger, { "data-variant":
|
|
11
|
+
return (_jsxs(BaseNavigationMenu.Trigger, { "data-variant": 'ghost', ...props, ref: ref, className: skin('pui-button pui-navigation-trigger', className), children: [children, indicator === false
|
|
12
12
|
? null
|
|
13
|
-
: (indicator ?? (_jsx(BaseNavigationMenu.Icon, { className:
|
|
13
|
+
: (indicator ?? (_jsx(BaseNavigationMenu.Icon, { className: 'pui-navigation-icon', children: _jsx("svg", { width: '16', height: '16', viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: '1.6', "aria-hidden": 'true', children: _jsx("path", { d: 'm6 9 6 6 6-6' }) }) })))] }));
|
|
14
14
|
});
|
|
15
15
|
export const NavigationMenu = {
|
|
16
16
|
...BaseNavigationMenu,
|
|
17
17
|
Root,
|
|
18
18
|
Trigger,
|
|
19
|
-
List: part(BaseNavigationMenu.List,
|
|
20
|
-
Item: part(BaseNavigationMenu.Item,
|
|
21
|
-
Link: part(BaseNavigationMenu.Link,
|
|
22
|
-
Content: part(BaseNavigationMenu.Content,
|
|
23
|
-
Positioner: part(BaseNavigationMenu.Positioner,
|
|
24
|
-
Popup: part(BaseNavigationMenu.Popup,
|
|
25
|
-
Viewport: part(BaseNavigationMenu.Viewport,
|
|
19
|
+
List: part(BaseNavigationMenu.List, 'pui-navigation-list'),
|
|
20
|
+
Item: part(BaseNavigationMenu.Item, 'pui-navigation-item'),
|
|
21
|
+
Link: part(BaseNavigationMenu.Link, 'pui-navigation-link'),
|
|
22
|
+
Content: part(BaseNavigationMenu.Content, 'pui-navigation-content'),
|
|
23
|
+
Positioner: part(BaseNavigationMenu.Positioner, 'pui-positioner pui-navigation-positioner'),
|
|
24
|
+
Popup: part(BaseNavigationMenu.Popup, 'pui-navigation-popup'),
|
|
25
|
+
Viewport: part(BaseNavigationMenu.Viewport, 'pui-navigation-viewport'),
|
|
26
26
|
Icon: React.forwardRef(function Icon({ children, className, ...props }, ref) {
|
|
27
|
-
return (_jsx(BaseNavigationMenu.Icon, { ...props, ref: ref, className: skin(
|
|
27
|
+
return (_jsx(BaseNavigationMenu.Icon, { ...props, ref: ref, className: skin('pui-navigation-icon', className), children: children ?? (_jsx("svg", { width: '16', height: '16', viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: '1.6', "aria-hidden": 'true', children: _jsx("path", { d: 'm6 9 6 6 6-6' }) })) }));
|
|
28
28
|
}),
|
|
29
29
|
};
|
|
30
30
|
// Flat names for React Server Components, which cannot dot into client exports.
|
package/dist/navigation.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { type ComponentSizeAlias } from
|
|
3
|
-
import { Accordion as BaseAccordion } from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type ComponentSizeAlias } from './sizing.js';
|
|
3
|
+
import { Accordion as BaseAccordion } from '@base-ui/react/accordion';
|
|
4
4
|
export declare const Tabs: {
|
|
5
5
|
Root: React.ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react/tabs").TabsRootProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
6
6
|
size?: import("./sizing.js").ComponentSize;
|
|
@@ -69,8 +69,8 @@ export declare const Separator: React.ForwardRefExoticComponent<Omit<Omit<import
|
|
|
69
69
|
inset?: boolean;
|
|
70
70
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
71
71
|
export declare const Link: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
72
|
-
declare function BreadcrumbSeparator({ className, ...props }: React.ComponentProps<
|
|
73
|
-
declare function BreadcrumbCurrent({ className, ...props }: React.ComponentProps<
|
|
72
|
+
declare function BreadcrumbSeparator({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
73
|
+
declare function BreadcrumbCurrent({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
74
74
|
export declare const Breadcrumbs: {
|
|
75
75
|
Root: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
76
76
|
List: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
|
package/dist/navigation.js
CHANGED
|
@@ -1,95 +1,95 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import * as React from
|
|
4
|
-
import { useComponentSize } from
|
|
5
|
-
import { Tabs as BaseTabs } from
|
|
6
|
-
import { Accordion as BaseAccordion } from
|
|
7
|
-
import { Collapsible as BaseCollapsible } from
|
|
8
|
-
import { Avatar as BaseAvatar } from
|
|
9
|
-
import { Separator as BaseSeparator } from
|
|
10
|
-
import { skin, part } from
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { useComponentSize } from './sizing.js';
|
|
5
|
+
import { Tabs as BaseTabs } from '@base-ui/react/tabs';
|
|
6
|
+
import { Accordion as BaseAccordion } from '@base-ui/react/accordion';
|
|
7
|
+
import { Collapsible as BaseCollapsible } from '@base-ui/react/collapsible';
|
|
8
|
+
import { Avatar as BaseAvatar } from '@base-ui/react/avatar';
|
|
9
|
+
import { Separator as BaseSeparator } from '@base-ui/react/separator';
|
|
10
|
+
import { skin, part } from './parts.js';
|
|
11
11
|
export const Tabs = {
|
|
12
12
|
...BaseTabs,
|
|
13
|
-
Root: part(BaseTabs.Root,
|
|
14
|
-
List: part(BaseTabs.List,
|
|
15
|
-
Tab: part(BaseTabs.Tab,
|
|
16
|
-
Panel: part(BaseTabs.Panel,
|
|
17
|
-
Indicator: part(BaseTabs.Indicator,
|
|
13
|
+
Root: part(BaseTabs.Root, 'pui-tabs'),
|
|
14
|
+
List: part(BaseTabs.List, 'pui-tabs-list'),
|
|
15
|
+
Tab: part(BaseTabs.Tab, 'pui-tabs-tab'),
|
|
16
|
+
Panel: part(BaseTabs.Panel, 'pui-tabs-panel'),
|
|
17
|
+
Indicator: part(BaseTabs.Indicator, 'pui-tabs-indicator'),
|
|
18
18
|
};
|
|
19
19
|
function Chevron() {
|
|
20
|
-
return (_jsx("svg", { className:
|
|
20
|
+
return (_jsx("svg", { className: 'pui-disclosure-chevron', width: '16', height: '16', viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: '1.5', "aria-hidden": 'true', children: _jsx("path", { d: 'm9 6 6 6-6 6' }) }));
|
|
21
21
|
}
|
|
22
22
|
function AccordionRoot({ className, ...props }) {
|
|
23
|
-
return (_jsx(BaseAccordion.Root, { ...props, className: skin(
|
|
23
|
+
return (_jsx(BaseAccordion.Root, { ...props, className: skin('pui-accordion', className) }));
|
|
24
24
|
}
|
|
25
25
|
const AccordionTrigger = React.forwardRef(function AccordionTrigger({ className, children, indicator, ...props }, ref) {
|
|
26
|
-
return (_jsxs(BaseAccordion.Trigger, { ...props, ref: ref, className: skin(
|
|
26
|
+
return (_jsxs(BaseAccordion.Trigger, { ...props, ref: ref, className: skin('pui-disclosure-trigger', className), children: [_jsx("span", { className: 'pui-disclosure-label', children: children }), indicator === undefined ? _jsx(Chevron, {}) : indicator] }));
|
|
27
27
|
});
|
|
28
28
|
const AccordionPanel = React.forwardRef(function AccordionPanel({ className, children, render, ...props }, ref) {
|
|
29
|
-
return (_jsx(BaseAccordion.Panel, { ...props, ref: ref, className: skin(
|
|
30
|
-
((panelProps, state) => (_jsx("div", { ...panelProps, inert: state.transitionStatus ===
|
|
29
|
+
return (_jsx(BaseAccordion.Panel, { ...props, ref: ref, className: skin('pui-accordion-panel', className), render: render ??
|
|
30
|
+
((panelProps, state) => (_jsx("div", { ...panelProps, inert: state.transitionStatus === 'ending' || undefined, "aria-hidden": state.transitionStatus === 'ending' || undefined }))), children: _jsx("div", { className: 'pui-disclosure-body', children: children }) }));
|
|
31
31
|
});
|
|
32
32
|
export const Accordion = {
|
|
33
33
|
...BaseAccordion,
|
|
34
34
|
Root: AccordionRoot,
|
|
35
|
-
Item: part(BaseAccordion.Item,
|
|
36
|
-
Header: part(BaseAccordion.Header,
|
|
35
|
+
Item: part(BaseAccordion.Item, 'pui-accordion-item'),
|
|
36
|
+
Header: part(BaseAccordion.Header, 'pui-accordion-header'),
|
|
37
37
|
Trigger: AccordionTrigger,
|
|
38
38
|
Panel: AccordionPanel,
|
|
39
39
|
};
|
|
40
40
|
const CollapsibleTrigger = React.forwardRef(function CollapsibleTrigger({ className, children, indicator, ...props }, ref) {
|
|
41
|
-
return (_jsxs(BaseCollapsible.Trigger, { ...props, ref: ref, className: skin(
|
|
41
|
+
return (_jsxs(BaseCollapsible.Trigger, { ...props, ref: ref, className: skin('pui-disclosure-trigger', className), children: [_jsx("span", { className: 'pui-disclosure-label', children: children }), indicator === undefined ? _jsx(Chevron, {}) : indicator] }));
|
|
42
42
|
});
|
|
43
43
|
const CollapsiblePanel = React.forwardRef(function CollapsiblePanel({ className, children, ...props }, ref) {
|
|
44
|
-
return (_jsx(BaseCollapsible.Panel, { ...props, ref: ref, className: skin(
|
|
44
|
+
return (_jsx(BaseCollapsible.Panel, { ...props, ref: ref, className: skin('pui-collapsible-panel', className), children: _jsx("div", { className: 'pui-disclosure-body', children: children }) }));
|
|
45
45
|
});
|
|
46
46
|
export const Collapsible = {
|
|
47
47
|
...BaseCollapsible,
|
|
48
|
-
Root: part(BaseCollapsible.Root,
|
|
48
|
+
Root: part(BaseCollapsible.Root, 'pui-collapsible'),
|
|
49
49
|
Trigger: CollapsibleTrigger,
|
|
50
50
|
Panel: CollapsiblePanel,
|
|
51
51
|
};
|
|
52
52
|
const AvatarRoot = React.forwardRef(function AvatarRoot({ size, className, ...props }, ref) {
|
|
53
53
|
const scheme = useComponentSize(size);
|
|
54
|
-
return (_jsx(BaseAvatar.Root, { ...props, ref: ref, "data-size": size, "data-ui-size": scheme, className: skin(
|
|
54
|
+
return (_jsx(BaseAvatar.Root, { ...props, ref: ref, "data-size": size, "data-ui-size": scheme, className: skin('pui-avatar', className) }));
|
|
55
55
|
});
|
|
56
56
|
function Person() {
|
|
57
|
-
return (_jsxs("svg", { width:
|
|
57
|
+
return (_jsxs("svg", { width: '18', height: '18', viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: '1.5', "aria-hidden": 'true', children: [_jsx("circle", { cx: '12', cy: '8', r: '4' }), _jsx("path", { d: 'M4 21v-2a8 8 0 0 1 16 0v2' })] }));
|
|
58
58
|
}
|
|
59
59
|
const AvatarFallback = React.forwardRef(function AvatarFallback({ children, className, ...props }, ref) {
|
|
60
|
-
return (_jsx(BaseAvatar.Fallback, { ...props, ref: ref, className: skin(
|
|
60
|
+
return (_jsx(BaseAvatar.Fallback, { ...props, ref: ref, className: skin('pui-avatar-fallback', className), children: children ?? _jsx(Person, {}) }));
|
|
61
61
|
});
|
|
62
62
|
export const Avatar = {
|
|
63
63
|
...BaseAvatar,
|
|
64
64
|
Root: AvatarRoot,
|
|
65
|
-
Status: part(
|
|
65
|
+
Status: part('span', 'pui-avatar-status'),
|
|
66
66
|
Fallback: AvatarFallback,
|
|
67
|
-
Image: part(BaseAvatar.Image,
|
|
67
|
+
Image: part(BaseAvatar.Image, 'pui-avatar-image'),
|
|
68
68
|
};
|
|
69
69
|
export const Separator = React.forwardRef(function Separator({ inset = false, className, ...props }, ref) {
|
|
70
|
-
return (_jsx(BaseSeparator, { ...props, ref: ref, "data-inset": inset || undefined, className: skin(
|
|
70
|
+
return (_jsx(BaseSeparator, { ...props, ref: ref, "data-inset": inset || undefined, className: skin('pui-separator', className) }));
|
|
71
71
|
});
|
|
72
72
|
export const Link = React.forwardRef(function Link({ className, ...props }, ref) {
|
|
73
|
-
return (_jsx("a", { ...props, ref: ref, className: [
|
|
73
|
+
return (_jsx("a", { ...props, ref: ref, className: ['pui-link', className].filter(Boolean).join(' ') }));
|
|
74
74
|
});
|
|
75
|
-
const BreadcrumbRoot = React.forwardRef(function BreadcrumbRoot({ className,
|
|
76
|
-
return (_jsx("nav", { ...props, ref: ref, "aria-label": label, className: [
|
|
75
|
+
const BreadcrumbRoot = React.forwardRef(function BreadcrumbRoot({ className, 'aria-label': label = 'Breadcrumb', ...props }, ref) {
|
|
76
|
+
return (_jsx("nav", { ...props, ref: ref, "aria-label": label, className: ['pui-breadcrumbs', className].filter(Boolean).join(' ') }));
|
|
77
77
|
});
|
|
78
|
-
const BreadcrumbList = React.forwardRef(function BreadcrumbList({ className, role =
|
|
79
|
-
return (_jsx("ol", { ...props, role: role, ref: ref, className: [
|
|
78
|
+
const BreadcrumbList = React.forwardRef(function BreadcrumbList({ className, role = 'list', ...props }, ref) {
|
|
79
|
+
return (_jsx("ol", { ...props, role: role, ref: ref, className: ['pui-breadcrumb-list', className].filter(Boolean).join(' ') }));
|
|
80
80
|
});
|
|
81
81
|
const BreadcrumbItem = React.forwardRef(function BreadcrumbItem({ className, ...props }, ref) {
|
|
82
|
-
return (_jsx("li", { ...props, ref: ref, className: [
|
|
82
|
+
return (_jsx("li", { ...props, ref: ref, className: ['pui-breadcrumb-item', className].filter(Boolean).join(' ') }));
|
|
83
83
|
});
|
|
84
84
|
function BreadcrumbSeparator({ className, ...props }) {
|
|
85
|
-
return (_jsx("span", { ...props, className: [
|
|
85
|
+
return (_jsx("span", { ...props, className: ['pui-breadcrumb-separator', className]
|
|
86
86
|
.filter(Boolean)
|
|
87
|
-
.join(
|
|
87
|
+
.join(' '), "aria-hidden": 'true', children: _jsx(Chevron, {}) }));
|
|
88
88
|
}
|
|
89
89
|
function BreadcrumbCurrent({ className, ...props }) {
|
|
90
|
-
return (_jsx("span", { ...props, className: [
|
|
90
|
+
return (_jsx("span", { ...props, className: ['pui-breadcrumb-current', className]
|
|
91
91
|
.filter(Boolean)
|
|
92
|
-
.join(
|
|
92
|
+
.join(' '), "aria-current": 'page' }));
|
|
93
93
|
}
|
|
94
94
|
export const Breadcrumbs = {
|
|
95
95
|
Root: BreadcrumbRoot,
|
package/dist/otp-field.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as React from
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
export declare const OTPField: {
|
|
3
3
|
Root: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react/otp-field").OTPFieldRootProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
4
|
Input: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react/otp-field").OTPFieldInputProps, "ref"> & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
package/dist/otp-field.js
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import * as React from
|
|
4
|
-
import { useRender } from
|
|
5
|
-
import { OTPField as BaseOTPField } from
|
|
6
|
-
import { part, skin } from
|
|
7
|
-
import { useResetValue, useRootRef } from
|
|
8
|
-
const Root = React.forwardRef(function Root({ value, defaultValue =
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
5
|
+
import { OTPField as BaseOTPField } from '@base-ui/react/otp-field';
|
|
6
|
+
import { part, skin } from './parts.js';
|
|
7
|
+
import { useResetValue, useRootRef } from './form-state.js';
|
|
8
|
+
const Root = React.forwardRef(function Root({ value, defaultValue = '', form, onValueChange, className, ...props }, forwardedRef) {
|
|
9
9
|
const [element, ref] = useRootRef(forwardedRef);
|
|
10
10
|
const [local, setLocal, revision] = useResetValue(value, defaultValue, element, form);
|
|
11
|
-
return (_jsx(BaseOTPField.Root, { ...props, ref: ref, form: form, value: local, className: skin(
|
|
11
|
+
return (_jsx(BaseOTPField.Root, { ...props, ref: ref, form: form, value: local, className: skin('pui-otp-field', className), onValueChange: (next, event) => {
|
|
12
12
|
onValueChange?.(next, event);
|
|
13
13
|
if (value === undefined && !event.isCanceled)
|
|
14
14
|
setLocal(next);
|
|
15
15
|
} }, revision));
|
|
16
16
|
});
|
|
17
17
|
const Separator = React.forwardRef(function Separator({ className, ...props }, ref) {
|
|
18
|
-
return (_jsx(BaseOTPField.Separator, { "aria-hidden":
|
|
18
|
+
return (_jsx(BaseOTPField.Separator, { "aria-hidden": 'true', ...props, ref: ref, className: skin('pui-otp-separator', className) }));
|
|
19
19
|
});
|
|
20
20
|
// Preserve Base UI's DOM refs and user render composition while fixing native-validation ARIA.
|
|
21
21
|
function SlotElement({ domProps, state, render, }) {
|
|
22
22
|
const { ref, ...props } = domProps;
|
|
23
23
|
return useRender({
|
|
24
|
-
defaultTagName:
|
|
24
|
+
defaultTagName: 'input',
|
|
25
25
|
ref,
|
|
26
|
-
render: typeof render ===
|
|
26
|
+
render: typeof render === 'function'
|
|
27
27
|
? (nextProps) => render(nextProps, state)
|
|
28
28
|
: render,
|
|
29
29
|
props: {
|
|
30
30
|
...props,
|
|
31
|
-
|
|
31
|
+
'aria-invalid': !state.disabled && state.valid === false ? true : props['aria-invalid'],
|
|
32
32
|
},
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
const Input = React.forwardRef(function Input({ render, className, ...props }, ref) {
|
|
36
|
-
return (_jsx(BaseOTPField.Input, { ...props, ref: ref, className: skin(
|
|
36
|
+
return (_jsx(BaseOTPField.Input, { ...props, ref: ref, className: skin('pui-input pui-otp-input', className), render: (domProps, state) => (_jsx(SlotElement, { domProps: domProps, state: state, render: render })) }));
|
|
37
37
|
});
|
|
38
38
|
export const OTPField = {
|
|
39
39
|
...BaseOTPField,
|
|
40
40
|
Root,
|
|
41
41
|
Input,
|
|
42
|
-
Group: part(
|
|
42
|
+
Group: part('div', 'pui-otp-group'),
|
|
43
43
|
Separator,
|
|
44
44
|
};
|
|
45
45
|
// Flat names for React Server Components, which cannot dot into client exports.
|
package/dist/pagination.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
type CommonPaginationProps = Omit<React.ComponentPropsWithoutRef<
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type CommonPaginationProps = Omit<React.ComponentPropsWithoutRef<'nav'>, 'children'> & {
|
|
3
3
|
page: number;
|
|
4
4
|
pageCount: number;
|
|
5
5
|
siblings?: 0 | 1 | 2;
|