@mohirlab/react 0.4.0 → 0.5.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/navigation/index.d.ts +3 -0
- package/dist/components/navigation/nav.d.ts +67 -0
- package/dist/components/navigation/nav.d.ts.map +1 -0
- package/dist/components/navigation/nav.js +144 -0
- package/dist/components/navigation/nav.js.map +1 -0
- package/dist/components/navigation/navigation.styles.js +21 -0
- package/dist/components/navigation/navigation.styles.js.map +1 -0
- package/dist/components/navigation/tabs.d.ts +30 -0
- package/dist/components/navigation/tabs.d.ts.map +1 -0
- package/dist/components/navigation/tabs.js +97 -0
- package/dist/components/navigation/tabs.js.map +1 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +3 -1
- package/dist/styles.css +291 -3
- package/package.json +5 -5
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Tab, TabList, TabListProps, TabPanel, TabPanelProps, TabProps, Tabs, TabsProps } from "./tabs.js";
|
|
2
|
+
import { BottomNav, BottomNavItem, BottomNavProps, BottomNavSpacer, Breadcrumbs, BreadcrumbsProps, Crumb, SegmentedControl, SegmentedControlProps, SegmentedOption } from "./nav.js";
|
|
3
|
+
export { BottomNav, BottomNavItem, type BottomNavProps, BottomNavSpacer, Breadcrumbs, type BreadcrumbsProps, type Crumb, SegmentedControl, type SegmentedControlProps, type SegmentedOption, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Tabs, type TabsProps };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { ComponentPropsWithRef, ReactNode } from "react";
|
|
2
|
+
import { IconData } from "@mohirlab/icons";
|
|
3
|
+
export interface SegmentedOption {
|
|
4
|
+
value: string;
|
|
5
|
+
label: ReactNode;
|
|
6
|
+
icon?: IconData;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface SegmentedControlProps extends Omit<ComponentPropsWithRef<'div'>, 'defaultValue' | 'onChange' | 'children'> {
|
|
10
|
+
/** Names the choice, e.g. "View". */
|
|
11
|
+
'aria-label': string;
|
|
12
|
+
options: SegmentedOption[];
|
|
13
|
+
value?: string;
|
|
14
|
+
defaultValue?: string;
|
|
15
|
+
onValueChange?: (value: string) => void;
|
|
16
|
+
name?: string;
|
|
17
|
+
/** Stretch to the container width, segments sharing it equally. */
|
|
18
|
+
fullWidth?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* One choice from two to five short options, such as a view or a time range. Native
|
|
22
|
+
* radios underneath: arrow keys move the choice, and it submits with forms.
|
|
23
|
+
*/
|
|
24
|
+
export declare function SegmentedControl({ options, value, defaultValue, onValueChange, name, fullWidth, className, ...rest }: SegmentedControlProps): import("react").JSX.Element;
|
|
25
|
+
export interface BottomNavProps extends ComponentPropsWithRef<'nav'> {
|
|
26
|
+
/** Names the navigation, e.g. "Main". */
|
|
27
|
+
'aria-label': string;
|
|
28
|
+
/** Hide from this breakpoint up, where a sidebar or top bar takes over. Default tablet. */
|
|
29
|
+
hideFrom?: 'tablet' | 'desktop' | 'never';
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The phone tab bar: three to five top-level destinations, fixed to the bottom and
|
|
33
|
+
* clear of the home indicator. Add a `BottomNavSpacer` at the end of the page so
|
|
34
|
+
* content can scroll past it.
|
|
35
|
+
*/
|
|
36
|
+
export declare function BottomNav({ hideFrom, className, ...rest }: BottomNavProps): import("react").JSX.Element;
|
|
37
|
+
type BottomNavItemProps = {
|
|
38
|
+
icon: IconData;
|
|
39
|
+
label: string;
|
|
40
|
+
/** Marks the current destination (`aria-current="page"`). */
|
|
41
|
+
current?: boolean;
|
|
42
|
+
/** A count such as unread messages; announced with the label. */
|
|
43
|
+
badge?: number;
|
|
44
|
+
className?: string;
|
|
45
|
+
} & (({
|
|
46
|
+
href: string;
|
|
47
|
+
} & Omit<ComponentPropsWithRef<'a'>, 'children'>) | ({
|
|
48
|
+
href?: undefined;
|
|
49
|
+
} & Omit<ComponentPropsWithRef<'button'>, 'children'>));
|
|
50
|
+
export declare function BottomNavItem({ icon, label, current, badge, className, ...rest }: BottomNavItemProps): import("react").JSX.Element;
|
|
51
|
+
/** Reserves room under the page content for the bottom nav (on the same breakpoints). */
|
|
52
|
+
export declare function BottomNavSpacer({ hideFrom }: Pick<BottomNavProps, 'hideFrom'>): import("react").JSX.Element;
|
|
53
|
+
export interface Crumb {
|
|
54
|
+
label: ReactNode;
|
|
55
|
+
href?: string;
|
|
56
|
+
}
|
|
57
|
+
export interface BreadcrumbsProps extends Omit<ComponentPropsWithRef<'nav'>, 'children'> {
|
|
58
|
+
/** From the top level down to the current page (last, not linked). */
|
|
59
|
+
items: Crumb[];
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Where the current page sits in the hierarchy. On phones it collapses to a single
|
|
63
|
+
* "← Parent" back link, the thing people actually use a trail for on a small screen.
|
|
64
|
+
*/
|
|
65
|
+
export declare function Breadcrumbs({ items, className, 'aria-label': ariaLabel, ...rest }: BreadcrumbsProps): import("react").JSX.Element;
|
|
66
|
+
export {};
|
|
67
|
+
//# sourceMappingURL=nav.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nav.d.ts","names":[],"sources":["../../../src/components/navigation/nav.tsx"],"mappings":";;iBAQiB;EACf;EACA,OAAO;EACP,OAAO;EACP;;iBAGe,8BAA8B,KAC7C;;EAIA;EACA,SAAS;EACT;EACA;EACA,iBAAiB;EACjB;;EAEA;;;;;;wBAOc,mBACd,SACA,OACA,cACA,eACA,MACA,WACA,cACG,QACF,wCAAqB,IAAA;iBAqCP,uBAAuB;;EAEtC;;EAEA;;;;;;;wBAQc,YAAY,UAAqB,cAAc,QAAQ,iCAAc,IAAA;KAIhF;EACH,MAAM;EACN;;EAEA;;EAEA;EACA;;EAEK;IAAiB,KAAK;EACtB;IAAqB,KAAK;wBAGjB,gBAAgB,MAAM,OAAO,SAAS,OAAO,cAAc,QAAQ,qCAAkB,IAAA;;wBAiCrF,kBAAkB,YAAuB,KAAK,8CAA2B,IAAA;iBAMxE;EACf,OAAO;EACP;;iBAGe,yBAAyB,KAAK;;EAE7C,OAAO;;;;;;wBAOO,cACd,OACA,yBACc,cACX,QACF,mCAAgB,IAAA"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { useId, useState } from "react";
|
|
2
|
+
import { iconArrowLeft, iconChevronRight } from "@mohirlab/icons";
|
|
3
|
+
import { cx } from "../../utils/cx.js";
|
|
4
|
+
import { Icon } from "../icon/icon.js";
|
|
5
|
+
import { bottomBadge, bottomItem, bottomNav, bottomNavSpacer, crumb, crumbCurrent, crumbLink, crumbs, segment, segmentInput, segmentLabel, segmented } from "./navigation.styles.js";
|
|
6
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
// src/components/navigation/nav.tsx
|
|
8
|
+
/**
|
|
9
|
+
* One choice from two to five short options, such as a view or a time range. Native
|
|
10
|
+
* radios underneath: arrow keys move the choice, and it submits with forms.
|
|
11
|
+
*/
|
|
12
|
+
function SegmentedControl({ options, value, defaultValue, onValueChange, name, fullWidth, className, ...rest }) {
|
|
13
|
+
const generated = useId();
|
|
14
|
+
const [internal, setInternal] = useState(defaultValue ?? options[0]?.value);
|
|
15
|
+
const current = value ?? internal;
|
|
16
|
+
return /* @__PURE__ */ jsx("div", {
|
|
17
|
+
...rest,
|
|
18
|
+
role: "radiogroup",
|
|
19
|
+
"data-full-width": fullWidth || void 0,
|
|
20
|
+
className: cx(segmented, className),
|
|
21
|
+
children: options.map((option) => /* @__PURE__ */ jsxs("label", {
|
|
22
|
+
className: segment,
|
|
23
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
24
|
+
type: "radio",
|
|
25
|
+
className: segmentInput,
|
|
26
|
+
name: name ?? `ml-seg-${generated}`,
|
|
27
|
+
value: option.value,
|
|
28
|
+
checked: current === option.value,
|
|
29
|
+
disabled: option.disabled,
|
|
30
|
+
onChange: () => {
|
|
31
|
+
if (value === void 0) setInternal(option.value);
|
|
32
|
+
onValueChange?.(option.value);
|
|
33
|
+
}
|
|
34
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
35
|
+
className: segmentLabel,
|
|
36
|
+
children: [option.icon && /* @__PURE__ */ jsx(Icon, {
|
|
37
|
+
icon: option.icon,
|
|
38
|
+
size: 16
|
|
39
|
+
}), option.label]
|
|
40
|
+
})]
|
|
41
|
+
}, option.value))
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* The phone tab bar: three to five top-level destinations, fixed to the bottom and
|
|
46
|
+
* clear of the home indicator. Add a `BottomNavSpacer` at the end of the page so
|
|
47
|
+
* content can scroll past it.
|
|
48
|
+
*/
|
|
49
|
+
function BottomNav({ hideFrom = "tablet", className, ...rest }) {
|
|
50
|
+
return /* @__PURE__ */ jsx("nav", {
|
|
51
|
+
...rest,
|
|
52
|
+
"data-hide-from": hideFrom,
|
|
53
|
+
className: cx(bottomNav, className)
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
function BottomNavItem({ icon, label, current, badge, className, ...rest }) {
|
|
57
|
+
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
58
|
+
/* @__PURE__ */ jsx(Icon, {
|
|
59
|
+
icon,
|
|
60
|
+
size: 22
|
|
61
|
+
}),
|
|
62
|
+
/* @__PURE__ */ jsx("span", { children: label }),
|
|
63
|
+
badge ? /* @__PURE__ */ jsx("span", {
|
|
64
|
+
className: bottomBadge,
|
|
65
|
+
"aria-hidden": "true",
|
|
66
|
+
children: badge > 99 ? "99+" : badge
|
|
67
|
+
}) : null
|
|
68
|
+
] });
|
|
69
|
+
const shared = {
|
|
70
|
+
className: cx(bottomItem, className),
|
|
71
|
+
"aria-current": current ? "page" : void 0,
|
|
72
|
+
"aria-label": badge ? `${label}, ${badge}` : void 0
|
|
73
|
+
};
|
|
74
|
+
if (rest.href !== void 0) return /* @__PURE__ */ jsx("a", {
|
|
75
|
+
...rest,
|
|
76
|
+
...shared,
|
|
77
|
+
children: content
|
|
78
|
+
});
|
|
79
|
+
return /* @__PURE__ */ jsx("button", {
|
|
80
|
+
type: "button",
|
|
81
|
+
...rest,
|
|
82
|
+
...shared,
|
|
83
|
+
children: content
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
/** Reserves room under the page content for the bottom nav (on the same breakpoints). */
|
|
87
|
+
function BottomNavSpacer({ hideFrom = "tablet" }) {
|
|
88
|
+
return /* @__PURE__ */ jsx("div", {
|
|
89
|
+
"aria-hidden": "true",
|
|
90
|
+
"data-hide-from": hideFrom,
|
|
91
|
+
className: bottomNavSpacer
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Where the current page sits in the hierarchy. On phones it collapses to a single
|
|
96
|
+
* "← Parent" back link, the thing people actually use a trail for on a small screen.
|
|
97
|
+
*/
|
|
98
|
+
function Breadcrumbs({ items, className, "aria-label": ariaLabel = "Breadcrumb", ...rest }) {
|
|
99
|
+
const parent = items.length > 1 ? items[items.length - 2] : void 0;
|
|
100
|
+
return /* @__PURE__ */ jsx("nav", {
|
|
101
|
+
...rest,
|
|
102
|
+
"aria-label": ariaLabel,
|
|
103
|
+
className,
|
|
104
|
+
children: /* @__PURE__ */ jsxs("ol", {
|
|
105
|
+
className: crumbs,
|
|
106
|
+
children: [parent?.href && /* @__PURE__ */ jsx("li", {
|
|
107
|
+
className: "ml_gp95tng",
|
|
108
|
+
children: /* @__PURE__ */ jsxs("a", {
|
|
109
|
+
className: "ml_gp95tnd",
|
|
110
|
+
href: parent.href,
|
|
111
|
+
children: [
|
|
112
|
+
/* @__PURE__ */ jsx(Icon, {
|
|
113
|
+
icon: iconArrowLeft,
|
|
114
|
+
size: 16
|
|
115
|
+
}),
|
|
116
|
+
" ",
|
|
117
|
+
parent.label
|
|
118
|
+
]
|
|
119
|
+
})
|
|
120
|
+
}), items.map((item, index) => {
|
|
121
|
+
const last = index === items.length - 1;
|
|
122
|
+
return /* @__PURE__ */ jsxs("li", {
|
|
123
|
+
className: crumb,
|
|
124
|
+
children: [last || !item.href ? /* @__PURE__ */ jsx("span", {
|
|
125
|
+
className: crumbCurrent,
|
|
126
|
+
"aria-current": last ? "page" : void 0,
|
|
127
|
+
children: item.label
|
|
128
|
+
}) : /* @__PURE__ */ jsx("a", {
|
|
129
|
+
className: crumbLink,
|
|
130
|
+
href: item.href,
|
|
131
|
+
children: item.label
|
|
132
|
+
}), !last && /* @__PURE__ */ jsx(Icon, {
|
|
133
|
+
icon: iconChevronRight,
|
|
134
|
+
size: 14,
|
|
135
|
+
className: "ml_gp95tnf"
|
|
136
|
+
})]
|
|
137
|
+
}, index);
|
|
138
|
+
})]
|
|
139
|
+
})
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
export { BottomNav, BottomNavItem, BottomNavSpacer, Breadcrumbs, SegmentedControl };
|
|
143
|
+
|
|
144
|
+
//# sourceMappingURL=nav.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nav.js","names":["styles.segmented","styles.segment","styles.segmentInput","styles.segmentLabel","styles.bottomNav","styles.bottomBadge","styles.bottomItem","styles.bottomNavSpacer","styles.crumbs","styles.crumb","styles.crumbCurrent","styles.crumbLink"],"sources":["../../../src/components/navigation/nav.tsx"],"sourcesContent":["import { useId, useState, type ComponentPropsWithRef, type ReactNode } from 'react';\nimport { iconArrowLeft, iconChevronRight, type IconData } from '@mohirlab/icons';\nimport { cx } from '../../utils/cx';\nimport { Icon } from '../icon';\nimport * as styles from './navigation.css';\n\n/* ---------------------------------------------------- Segmented control */\n\nexport interface SegmentedOption {\n value: string;\n label: ReactNode;\n icon?: IconData;\n disabled?: boolean;\n}\n\nexport interface SegmentedControlProps extends Omit<\n ComponentPropsWithRef<'div'>,\n 'defaultValue' | 'onChange' | 'children'\n> {\n /** Names the choice, e.g. \"View\". */\n 'aria-label': string;\n options: SegmentedOption[];\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n name?: string;\n /** Stretch to the container width, segments sharing it equally. */\n fullWidth?: boolean;\n}\n\n/**\n * One choice from two to five short options, such as a view or a time range. Native\n * radios underneath: arrow keys move the choice, and it submits with forms.\n */\nexport function SegmentedControl({\n options,\n value,\n defaultValue,\n onValueChange,\n name,\n fullWidth,\n className,\n ...rest\n}: SegmentedControlProps) {\n const generated = useId();\n const [internal, setInternal] = useState(defaultValue ?? options[0]?.value);\n const current = value ?? internal;\n return (\n <div\n {...rest}\n role=\"radiogroup\"\n data-full-width={fullWidth || undefined}\n className={cx(styles.segmented, className)}\n >\n {options.map((option) => (\n <label key={option.value} className={styles.segment}>\n <input\n type=\"radio\"\n className={styles.segmentInput}\n name={name ?? `ml-seg-${generated}`}\n value={option.value}\n checked={current === option.value}\n disabled={option.disabled}\n onChange={() => {\n if (value === undefined) setInternal(option.value);\n onValueChange?.(option.value);\n }}\n />\n <span className={styles.segmentLabel}>\n {option.icon && <Icon icon={option.icon} size={16} />}\n {option.label}\n </span>\n </label>\n ))}\n </div>\n );\n}\n\n/* ---------------------------------------------------------- Bottom nav */\n\nexport interface BottomNavProps extends ComponentPropsWithRef<'nav'> {\n /** Names the navigation, e.g. \"Main\". */\n 'aria-label': string;\n /** Hide from this breakpoint up, where a sidebar or top bar takes over. Default tablet. */\n hideFrom?: 'tablet' | 'desktop' | 'never';\n}\n\n/**\n * The phone tab bar: three to five top-level destinations, fixed to the bottom and\n * clear of the home indicator. Add a `BottomNavSpacer` at the end of the page so\n * content can scroll past it.\n */\nexport function BottomNav({ hideFrom = 'tablet', className, ...rest }: BottomNavProps) {\n return <nav {...rest} data-hide-from={hideFrom} className={cx(styles.bottomNav, className)} />;\n}\n\ntype BottomNavItemProps = {\n icon: IconData;\n label: string;\n /** Marks the current destination (`aria-current=\"page\"`). */\n current?: boolean;\n /** A count such as unread messages; announced with the label. */\n badge?: number;\n className?: string;\n} & (\n | ({ href: string } & Omit<ComponentPropsWithRef<'a'>, 'children'>)\n | ({ href?: undefined } & Omit<ComponentPropsWithRef<'button'>, 'children'>)\n);\n\nexport function BottomNavItem({ icon, label, current, badge, className, ...rest }: BottomNavItemProps) {\n const content = (\n <>\n <Icon icon={icon} size={22} />\n <span>{label}</span>\n {badge ? (\n <span className={styles.bottomBadge} aria-hidden=\"true\">\n {badge > 99 ? '99+' : badge}\n </span>\n ) : null}\n </>\n );\n const shared = {\n className: cx(styles.bottomItem, className),\n 'aria-current': current ? ('page' as const) : undefined,\n // The visual badge is hidden; the count is part of the accessible name instead.\n 'aria-label': badge ? `${label}, ${badge}` : undefined,\n };\n if (rest.href !== undefined) {\n return (\n <a {...(rest as ComponentPropsWithRef<'a'>)} {...shared}>\n {content}\n </a>\n );\n }\n return (\n <button type=\"button\" {...(rest as ComponentPropsWithRef<'button'>)} {...shared}>\n {content}\n </button>\n );\n}\n\n/** Reserves room under the page content for the bottom nav (on the same breakpoints). */\nexport function BottomNavSpacer({ hideFrom = 'tablet' }: Pick<BottomNavProps, 'hideFrom'>) {\n return <div aria-hidden=\"true\" data-hide-from={hideFrom} className={styles.bottomNavSpacer} />;\n}\n\n/* --------------------------------------------------------- Breadcrumbs */\n\nexport interface Crumb {\n label: ReactNode;\n href?: string;\n}\n\nexport interface BreadcrumbsProps extends Omit<ComponentPropsWithRef<'nav'>, 'children'> {\n /** From the top level down to the current page (last, not linked). */\n items: Crumb[];\n}\n\n/**\n * Where the current page sits in the hierarchy. On phones it collapses to a single\n * \"← Parent\" back link, the thing people actually use a trail for on a small screen.\n */\nexport function Breadcrumbs({\n items,\n className,\n 'aria-label': ariaLabel = 'Breadcrumb',\n ...rest\n}: BreadcrumbsProps) {\n const parent = items.length > 1 ? items[items.length - 2] : undefined;\n return (\n <nav {...rest} aria-label={ariaLabel} className={className}>\n <ol className={styles.crumbs}>\n {parent?.href && (\n <li className={styles.crumbBack}>\n <a className={styles.crumbLink} href={parent.href}>\n <Icon icon={iconArrowLeft} size={16} /> {parent.label}\n </a>\n </li>\n )}\n {items.map((item, index) => {\n const last = index === items.length - 1;\n return (\n <li key={index} className={styles.crumb}>\n {last || !item.href ? (\n <span className={styles.crumbCurrent} aria-current={last ? 'page' : undefined}>\n {item.label}\n </span>\n ) : (\n <a className={styles.crumbLink} href={item.href}>\n {item.label}\n </a>\n )}\n {!last && <Icon icon={iconChevronRight} size={14} className={styles.crumbSeparator} />}\n </li>\n );\n })}\n </ol>\n </nav>\n );\n}\n"],"mappings":";;;;;;;;;;;AAkCA,SAAgB,iBAAiB,EAC/B,SACA,OACA,cACA,eACA,MACA,WACA,WACA,GAAG,QACqB;CACxB,MAAM,YAAY,MAAM;CACxB,MAAM,CAAC,UAAU,eAAe,SAAS,gBAAgB,QAAQ,EAAE,EAAE,KAAK;CAC1E,MAAM,UAAU,SAAS;CACzB,OACE,oBAAC,OAAD;EACE,GAAI;EACJ,MAAK;EACL,mBAAiB,aAAa,KAAA;EAC9B,WAAW,GAAGA,WAAkB,SAAS;EAExC,UAAA,QAAQ,KAAK,WACZ,qBAAC,SAAD;GAA0B,WAAWC;GAArC,UAAA,CACE,oBAAC,SAAD;IACE,MAAK;IACL,WAAWC;IACX,MAAM,QAAQ,UAAU;IACxB,OAAO,OAAO;IACd,SAAS,YAAY,OAAO;IAC5B,UAAU,OAAO;IACjB,gBAAgB;KACd,IAAI,UAAU,KAAA,GAAW,YAAY,OAAO,KAAK;KACjD,gBAAgB,OAAO,KAAK;IAC9B;GACD,CAAA,GACD,qBAAC,QAAD;IAAM,WAAWC;IAAjB,UAAA,CACG,OAAO,QAAQ,oBAAC,MAAD;KAAM,MAAM,OAAO;KAAM,MAAM;IAAK,CAAA,GACnD,OAAO,KACJ;GACD,CAAA,CAAA;EAjBK,GAAA,OAAO,KAiBZ,CACR;CACE,CAAA;AAET;;;;;;AAgBA,SAAgB,UAAU,EAAE,WAAW,UAAU,WAAW,GAAG,QAAwB;CACrF,OAAO,oBAAC,OAAD;EAAK,GAAI;EAAM,kBAAgB;EAAU,WAAW,GAAGC,WAAkB,SAAS;CAAI,CAAA;AAC/F;AAeA,SAAgB,cAAc,EAAE,MAAM,OAAO,SAAS,OAAO,WAAW,GAAG,QAA4B;CACrG,MAAM,UACJ,qBAAA,UAAA,EAAA,UAAA;EACE,oBAAC,MAAD;GAAY;GAAM,MAAM;EAAK,CAAA;EAC7B,oBAAC,QAAD,EAAA,UAAO,MAAY,CAAA;EAClB,QACC,oBAAC,QAAD;GAAM,WAAWC;GAAoB,eAAY;GAC9C,UAAA,QAAQ,KAAK,QAAQ;EAClB,CAAA,IACJ;CACJ,EAAA,CAAA;CAEJ,MAAM,SAAS;EACb,WAAW,GAAGC,YAAmB,SAAS;EAC1C,gBAAgB,UAAW,SAAmB,KAAA;EAE9C,cAAc,QAAQ,GAAG,MAAM,IAAI,UAAU,KAAA;CAC/C;CACA,IAAI,KAAK,SAAS,KAAA,GAChB,OACE,oBAAC,KAAD;EAAG,GAAK;EAAqC,GAAI;EAC9C,UAAA;CACA,CAAA;CAGP,OACE,oBAAC,UAAD;EAAQ,MAAK;EAAS,GAAK;EAA0C,GAAI;EACtE,UAAA;CACK,CAAA;AAEZ;;AAGA,SAAgB,gBAAgB,EAAE,WAAW,YAA8C;CACzF,OAAO,oBAAC,OAAD;EAAK,eAAY;EAAO,kBAAgB;EAAU,WAAWC;CAAyB,CAAA;AAC/F;;;;;AAkBA,SAAgB,YAAY,EAC1B,OACA,WACA,cAAc,YAAY,cAC1B,GAAG,QACgB;CACnB,MAAM,SAAS,MAAM,SAAS,IAAI,MAAM,MAAM,SAAS,KAAK,KAAA;CAC5D,OACE,oBAAC,OAAD;EAAK,GAAI;EAAM,cAAY;EAAsB;EAC/C,UAAA,qBAAC,MAAD;GAAI,WAAWC;GAAf,UAAA,CACG,QAAQ,QACP,oBAAC,MAAD;IAAI,WAAW;IACb,UAAA,qBAAC,KAAD;KAAG,WAAW;KAAkB,MAAM,OAAO;KAA7C,UAAA;MACE,oBAAC,MAAD;OAAM,MAAM;OAAe,MAAM;MAAK,CAAA;MAAC;MAAE,OAAO;KAC/C;;GACD,CAAA,GAEL,MAAM,KAAK,MAAM,UAAU;IAC1B,MAAM,OAAO,UAAU,MAAM,SAAS;IACtC,OACE,qBAAC,MAAD;KAAgB,WAAWC;KAA3B,UAAA,CACG,QAAQ,CAAC,KAAK,OACb,oBAAC,QAAD;MAAM,WAAWC;MAAqB,gBAAc,OAAO,SAAS,KAAA;MACjE,UAAA,KAAK;KACF,CAAA,IAEN,oBAAC,KAAD;MAAG,WAAWC;MAAkB,MAAM,KAAK;MACxC,UAAA,KAAK;KACL,CAAA,GAEJ,CAAC,QAAQ,oBAAC,MAAD;MAAM,MAAM;MAAkB,MAAM;MAAI,WAAW;KAAwB,CAAA,CACnF;IAXK,GAAA,KAWL;GAER,CAAC,CACC;;CACD,CAAA;AAET"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// src/components/navigation/navigation.css.ts
|
|
2
|
+
var bottomBadge = "ml_gp95tn9";
|
|
3
|
+
var bottomItem = "ml_gp95tn8";
|
|
4
|
+
var bottomNav = "ml_gp95tn7";
|
|
5
|
+
var bottomNavSpacer = "ml_gp95tna";
|
|
6
|
+
var crumb = "ml_gp95tnc";
|
|
7
|
+
var crumbBack = "ml_gp95tng";
|
|
8
|
+
var crumbCurrent = "ml_gp95tne";
|
|
9
|
+
var crumbLink = "ml_gp95tnd";
|
|
10
|
+
var crumbSeparator = "ml_gp95tnf";
|
|
11
|
+
var crumbs = "ml_gp95tnb";
|
|
12
|
+
var segment = "ml_gp95tn4";
|
|
13
|
+
var segmentInput = "ml_gp95tn5";
|
|
14
|
+
var segmentLabel = "ml_gp95tn6";
|
|
15
|
+
var segmented = "ml_gp95tn3";
|
|
16
|
+
var tab = "ml_gp95tn1";
|
|
17
|
+
var tabList = "ml_gp95tn0";
|
|
18
|
+
var tabPanel = "ml_gp95tn2";
|
|
19
|
+
export { bottomBadge, bottomItem, bottomNav, bottomNavSpacer, crumb, crumbBack, crumbCurrent, crumbLink, crumbSeparator, crumbs, segment, segmentInput, segmentLabel, segmented, tab, tabList, tabPanel };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=navigation.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation.styles.js","names":[],"sources":[],"mappings":""}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ComponentPropsWithRef, ReactNode } from "react";
|
|
2
|
+
export interface TabsProps extends Omit<ComponentPropsWithRef<'div'>, 'defaultValue' | 'onChange'> {
|
|
3
|
+
/** The selected tab (controlled). */
|
|
4
|
+
value?: string;
|
|
5
|
+
/** The tab selected first (uncontrolled). One of `value` or `defaultValue` is required. */
|
|
6
|
+
defaultValue?: string;
|
|
7
|
+
onValueChange?: (value: string) => void;
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Tabs switch between panels of related content in place. For moving between pages,
|
|
12
|
+
* use links instead. Follows the WAI-ARIA tabs pattern with automatic activation.
|
|
13
|
+
*/
|
|
14
|
+
export declare function Tabs({ value, defaultValue, onValueChange, children, ...rest }: TabsProps): import("react").JSX.Element;
|
|
15
|
+
export interface TabListProps extends ComponentPropsWithRef<'div'> {
|
|
16
|
+
/** Names the set of tabs, e.g. "Invoice views". */
|
|
17
|
+
'aria-label': string;
|
|
18
|
+
}
|
|
19
|
+
/** The row of tabs. Arrow keys, Home and End move between tabs and select them. */
|
|
20
|
+
export declare function TabList({ className, onKeyDown, ...rest }: TabListProps): import("react").JSX.Element;
|
|
21
|
+
export interface TabProps extends Omit<ComponentPropsWithRef<'button'>, 'value'> {
|
|
22
|
+
value: string;
|
|
23
|
+
}
|
|
24
|
+
export declare function Tab({ value, className, onClick, ...rest }: TabProps): import("react").JSX.Element;
|
|
25
|
+
export interface TabPanelProps extends ComponentPropsWithRef<'div'> {
|
|
26
|
+
value: string;
|
|
27
|
+
}
|
|
28
|
+
/** Content for one tab. Hidden panels stay in the DOM (state is kept) but are not shown. */
|
|
29
|
+
export declare function TabPanel({ value, className, ...rest }: TabPanelProps): import("react").JSX.Element;
|
|
30
|
+
//# sourceMappingURL=tabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.d.ts","names":[],"sources":["../../../src/components/navigation/tabs.tsx"],"mappings":";iBAyBiB,kBAAkB,KAAK;;EAEtC;;EAEA;EACA,iBAAiB;EACjB,UAAU;;;;;;wBAOI,OAAO,OAAO,cAAmB,eAAe,aAAa,QAAQ,4BAAS,IAAA;iBAmB7E,qBAAqB;;EAEpC;;;wBAIc,UAAU,WAAW,cAAc,QAAQ,+BAAY,IAAA;iBAyBtD,iBAAiB,KAAK;EACrC;;wBAGc,MAAM,OAAO,WAAW,YAAY,QAAQ,2BAAQ,IAAA;iBAsBnD,sBAAsB;EACrC;;;wBAIc,WAAW,OAAO,cAAc,QAAQ,gCAAa,IAAA"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { createContext, useContext, useId, useState } from "react";
|
|
2
|
+
import { cx } from "../../utils/cx.js";
|
|
3
|
+
import { tab, tabList, tabPanel } from "./navigation.styles.js";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
// src/components/navigation/tabs.tsx
|
|
6
|
+
const TabsContext = createContext(null);
|
|
7
|
+
const useTabs = () => {
|
|
8
|
+
const context = useContext(TabsContext);
|
|
9
|
+
if (!context) throw new Error("Tab parts must be used inside <Tabs>.");
|
|
10
|
+
return context;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Tabs switch between panels of related content in place. For moving between pages,
|
|
14
|
+
* use links instead. Follows the WAI-ARIA tabs pattern with automatic activation.
|
|
15
|
+
*/
|
|
16
|
+
function Tabs({ value, defaultValue = "", onValueChange, children, ...rest }) {
|
|
17
|
+
const base = useId();
|
|
18
|
+
const [internal, setInternal] = useState(defaultValue);
|
|
19
|
+
const context = {
|
|
20
|
+
value: value ?? internal,
|
|
21
|
+
select: (next) => {
|
|
22
|
+
if (value === void 0) setInternal(next);
|
|
23
|
+
onValueChange?.(next);
|
|
24
|
+
},
|
|
25
|
+
idFor: (kind, v) => `${base}-${kind}-${v.replace(/[^\w-]/g, "_")}`
|
|
26
|
+
};
|
|
27
|
+
return /* @__PURE__ */ jsx(TabsContext.Provider, {
|
|
28
|
+
value: context,
|
|
29
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
30
|
+
...rest,
|
|
31
|
+
children
|
|
32
|
+
})
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/** The row of tabs. Arrow keys, Home and End move between tabs and select them. */
|
|
36
|
+
function TabList({ className, onKeyDown, ...rest }) {
|
|
37
|
+
const onKey = (event) => {
|
|
38
|
+
onKeyDown?.(event);
|
|
39
|
+
const tabs = [...event.currentTarget.querySelectorAll("[role=\"tab\"]:not(:disabled)")];
|
|
40
|
+
const index = tabs.indexOf(document.activeElement);
|
|
41
|
+
if (index === -1) return;
|
|
42
|
+
const rtl = getComputedStyle(event.currentTarget).direction === "rtl";
|
|
43
|
+
const step = {
|
|
44
|
+
ArrowRight: rtl ? -1 : 1,
|
|
45
|
+
ArrowLeft: rtl ? 1 : -1
|
|
46
|
+
}[event.key];
|
|
47
|
+
let next;
|
|
48
|
+
if (step) next = tabs[(index + step + tabs.length) % tabs.length];
|
|
49
|
+
else if (event.key === "Home") next = tabs[0];
|
|
50
|
+
else if (event.key === "End") next = tabs.at(-1);
|
|
51
|
+
if (!next) return;
|
|
52
|
+
event.preventDefault();
|
|
53
|
+
next.focus();
|
|
54
|
+
next.click();
|
|
55
|
+
};
|
|
56
|
+
return /* @__PURE__ */ jsx("div", {
|
|
57
|
+
...rest,
|
|
58
|
+
role: "tablist",
|
|
59
|
+
className: cx(tabList, className),
|
|
60
|
+
onKeyDown: onKey
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
function Tab({ value, className, onClick, ...rest }) {
|
|
64
|
+
const tabs = useTabs();
|
|
65
|
+
const selected = tabs.value === value;
|
|
66
|
+
return /* @__PURE__ */ jsx("button", {
|
|
67
|
+
...rest,
|
|
68
|
+
type: "button",
|
|
69
|
+
role: "tab",
|
|
70
|
+
id: tabs.idFor("tab", value),
|
|
71
|
+
"aria-controls": tabs.idFor("panel", value),
|
|
72
|
+
"aria-selected": selected,
|
|
73
|
+
tabIndex: selected ? 0 : -1,
|
|
74
|
+
className: cx(tab, className),
|
|
75
|
+
onClick: (event) => {
|
|
76
|
+
onClick?.(event);
|
|
77
|
+
tabs.select(value);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
/** Content for one tab. Hidden panels stay in the DOM (state is kept) but are not shown. */
|
|
82
|
+
function TabPanel({ value, className, ...rest }) {
|
|
83
|
+
const tabs = useTabs();
|
|
84
|
+
const selected = tabs.value === value;
|
|
85
|
+
return /* @__PURE__ */ jsx("div", {
|
|
86
|
+
...rest,
|
|
87
|
+
role: "tabpanel",
|
|
88
|
+
id: tabs.idFor("panel", value),
|
|
89
|
+
"aria-labelledby": tabs.idFor("tab", value),
|
|
90
|
+
tabIndex: 0,
|
|
91
|
+
hidden: !selected,
|
|
92
|
+
className: cx(tabPanel, className)
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
export { Tab, TabList, TabPanel, Tabs };
|
|
96
|
+
|
|
97
|
+
//# sourceMappingURL=tabs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.js","names":["styles.tabList","styles.tab","styles.tabPanel"],"sources":["../../../src/components/navigation/tabs.tsx"],"sourcesContent":["import {\n createContext,\n useContext,\n useId,\n useState,\n type ComponentPropsWithRef,\n type KeyboardEvent,\n type ReactNode,\n} from 'react';\nimport { cx } from '../../utils/cx';\nimport * as styles from './navigation.css';\n\ninterface TabsContextValue {\n value: string;\n select: (value: string) => void;\n idFor: (kind: 'tab' | 'panel', value: string) => string;\n}\n\nconst TabsContext = createContext<TabsContextValue | null>(null);\nconst useTabs = () => {\n const context = useContext(TabsContext);\n if (!context) throw new Error('Tab parts must be used inside <Tabs>.');\n return context;\n};\n\nexport interface TabsProps extends Omit<ComponentPropsWithRef<'div'>, 'defaultValue' | 'onChange'> {\n /** The selected tab (controlled). */\n value?: string;\n /** The tab selected first (uncontrolled). One of `value` or `defaultValue` is required. */\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n children: ReactNode;\n}\n\n/**\n * Tabs switch between panels of related content in place. For moving between pages,\n * use links instead. Follows the WAI-ARIA tabs pattern with automatic activation.\n */\nexport function Tabs({ value, defaultValue = '', onValueChange, children, ...rest }: TabsProps) {\n const base = useId();\n const [internal, setInternal] = useState(defaultValue);\n const current = value ?? internal;\n const context: TabsContextValue = {\n value: current,\n select: (next) => {\n if (value === undefined) setInternal(next);\n onValueChange?.(next);\n },\n idFor: (kind, v) => `${base}-${kind}-${v.replace(/[^\\w-]/g, '_')}`,\n };\n return (\n <TabsContext.Provider value={context}>\n <div {...rest}>{children}</div>\n </TabsContext.Provider>\n );\n}\n\nexport interface TabListProps extends ComponentPropsWithRef<'div'> {\n /** Names the set of tabs, e.g. \"Invoice views\". */\n 'aria-label': string;\n}\n\n/** The row of tabs. Arrow keys, Home and End move between tabs and select them. */\nexport function TabList({ className, onKeyDown, ...rest }: TabListProps) {\n const onKey = (event: KeyboardEvent<HTMLDivElement>) => {\n onKeyDown?.(event);\n const tabs = [...event.currentTarget.querySelectorAll<HTMLButtonElement>('[role=\"tab\"]:not(:disabled)')];\n const index = tabs.indexOf(document.activeElement as HTMLButtonElement);\n if (index === -1) return;\n const rtl = getComputedStyle(event.currentTarget).direction === 'rtl';\n const step = { ArrowRight: rtl ? -1 : 1, ArrowLeft: rtl ? 1 : -1 }[event.key];\n let next: HTMLButtonElement | undefined;\n if (step) next = tabs[(index + step + tabs.length) % tabs.length];\n else if (event.key === 'Home') next = tabs[0];\n else if (event.key === 'End') next = tabs.at(-1);\n if (!next) return;\n event.preventDefault();\n next.focus();\n next.click();\n };\n return (\n // WAI-ARIA tabs pattern: focus lives on the tabs (roving tabindex), not on the list.\n // The list only handles keys that bubble up from the focused tab.\n // oxlint-disable-next-line jsx-a11y/interactive-supports-focus\n <div {...rest} role=\"tablist\" className={cx(styles.tabList, className)} onKeyDown={onKey} />\n );\n}\n\nexport interface TabProps extends Omit<ComponentPropsWithRef<'button'>, 'value'> {\n value: string;\n}\n\nexport function Tab({ value, className, onClick, ...rest }: TabProps) {\n const tabs = useTabs();\n const selected = tabs.value === value;\n return (\n <button\n {...rest}\n type=\"button\"\n role=\"tab\"\n id={tabs.idFor('tab', value)}\n aria-controls={tabs.idFor('panel', value)}\n aria-selected={selected}\n // Roving tabindex: Tab moves into the list once, arrows move within it.\n tabIndex={selected ? 0 : -1}\n className={cx(styles.tab, className)}\n onClick={(event) => {\n onClick?.(event);\n tabs.select(value);\n }}\n />\n );\n}\n\nexport interface TabPanelProps extends ComponentPropsWithRef<'div'> {\n value: string;\n}\n\n/** Content for one tab. Hidden panels stay in the DOM (state is kept) but are not shown. */\nexport function TabPanel({ value, className, ...rest }: TabPanelProps) {\n const tabs = useTabs();\n const selected = tabs.value === value;\n return (\n <div\n {...rest}\n role=\"tabpanel\"\n id={tabs.idFor('panel', value)}\n aria-labelledby={tabs.idFor('tab', value)}\n tabIndex={0}\n hidden={!selected}\n className={cx(styles.tabPanel, className)}\n />\n );\n}\n"],"mappings":";;;;;AAkBA,MAAM,cAAc,cAAuC,IAAI;AAC/D,MAAM,gBAAgB;CACpB,MAAM,UAAU,WAAW,WAAW;CACtC,IAAI,CAAC,SAAS,MAAM,IAAI,MAAM,uCAAuC;CACrE,OAAO;AACT;;;;;AAeA,SAAgB,KAAK,EAAE,OAAO,eAAe,IAAI,eAAe,UAAU,GAAG,QAAmB;CAC9F,MAAM,OAAO,MAAM;CACnB,MAAM,CAAC,UAAU,eAAe,SAAS,YAAY;CAErD,MAAM,UAA4B;EAChC,OAFc,SAAS;EAGvB,SAAS,SAAS;GAChB,IAAI,UAAU,KAAA,GAAW,YAAY,IAAI;GACzC,gBAAgB,IAAI;EACtB;EACA,QAAQ,MAAM,MAAM,GAAG,KAAK,GAAG,KAAK,GAAG,EAAE,QAAQ,WAAW,GAAG;CACjE;CACA,OACE,oBAAC,YAAY,UAAb;EAAsB,OAAO;EAC3B,UAAA,oBAAC,OAAD;GAAK,GAAI;GAAO;EAAc,CAAA;CACV,CAAA;AAE1B;;AAQA,SAAgB,QAAQ,EAAE,WAAW,WAAW,GAAG,QAAsB;CACvE,MAAM,SAAS,UAAyC;EACtD,YAAY,KAAK;EACjB,MAAM,OAAO,CAAC,GAAG,MAAM,cAAc,iBAAoC,+BAA6B,CAAC;EACvG,MAAM,QAAQ,KAAK,QAAQ,SAAS,aAAkC;EACtE,IAAI,UAAU,IAAI;EAClB,MAAM,MAAM,iBAAiB,MAAM,aAAa,CAAC,CAAC,cAAc;EAChE,MAAM,OAAO;GAAE,YAAY,MAAM,KAAK;GAAG,WAAW,MAAM,IAAI;EAAG,EAAE,MAAM;EACzE,IAAI;EACJ,IAAI,MAAM,OAAO,MAAM,QAAQ,OAAO,KAAK,UAAU,KAAK;OACrD,IAAI,MAAM,QAAQ,QAAQ,OAAO,KAAK;OACtC,IAAI,MAAM,QAAQ,OAAO,OAAO,KAAK,GAAG,EAAE;EAC/C,IAAI,CAAC,MAAM;EACX,MAAM,eAAe;EACrB,KAAK,MAAM;EACX,KAAK,MAAM;CACb;CACA,OAIE,oBAAC,OAAD;EAAK,GAAI;EAAM,MAAK;EAAU,WAAW,GAAGA,SAAgB,SAAS;EAAG,WAAW;CAAQ,CAAA;AAE/F;AAMA,SAAgB,IAAI,EAAE,OAAO,WAAW,SAAS,GAAG,QAAkB;CACpE,MAAM,OAAO,QAAQ;CACrB,MAAM,WAAW,KAAK,UAAU;CAChC,OACE,oBAAC,UAAD;EACE,GAAI;EACJ,MAAK;EACL,MAAK;EACL,IAAI,KAAK,MAAM,OAAO,KAAK;EAC3B,iBAAe,KAAK,MAAM,SAAS,KAAK;EACxC,iBAAe;EAEf,UAAU,WAAW,IAAI;EACzB,WAAW,GAAGC,KAAY,SAAS;EACnC,UAAU,UAAU;GAClB,UAAU,KAAK;GACf,KAAK,OAAO,KAAK;EACnB;CACD,CAAA;AAEL;;AAOA,SAAgB,SAAS,EAAE,OAAO,WAAW,GAAG,QAAuB;CACrE,MAAM,OAAO,QAAQ;CACrB,MAAM,WAAW,KAAK,UAAU;CAChC,OACE,oBAAC,OAAD;EACE,GAAI;EACJ,MAAK;EACL,IAAI,KAAK,MAAM,SAAS,KAAK;EAC7B,mBAAiB,KAAK,MAAM,OAAO,KAAK;EACxC,UAAU;EACV,QAAQ,CAAC;EACT,WAAW,GAAGC,UAAiB,SAAS;CACzC,CAAA;AAEL"}
|
package/dist/index.d.ts
CHANGED
|
@@ -21,6 +21,9 @@ import { Icon, IconProps } from "./components/icon/icon.js";
|
|
|
21
21
|
import "./components/icon/index.js";
|
|
22
22
|
import { Input, InputProps, Textarea, TextareaProps } from "./components/input/input.js";
|
|
23
23
|
import "./components/input/index.js";
|
|
24
|
+
import { Tab, TabList, TabListProps, TabPanel, TabPanelProps, TabProps, Tabs, TabsProps } from "./components/navigation/tabs.js";
|
|
25
|
+
import { BottomNav, BottomNavItem, BottomNavProps, BottomNavSpacer, Breadcrumbs, BreadcrumbsProps, Crumb, SegmentedControl, SegmentedControlProps, SegmentedOption } from "./components/navigation/nav.js";
|
|
26
|
+
import "./components/navigation/index.js";
|
|
24
27
|
import { Placement } from "./components/popover/popover.css.js";
|
|
25
28
|
import { Popover, PopoverProps, Tooltip, TooltipProps } from "./components/popover/popover.js";
|
|
26
29
|
import "./components/popover/index.js";
|
|
@@ -37,4 +40,4 @@ import { PresenceState, usePresence } from "./hooks/use-presence.js";
|
|
|
37
40
|
import { useDisclosure } from "./hooks/use-disclosure.js";
|
|
38
41
|
import "./hooks/index.js";
|
|
39
42
|
import { cx } from "./utils/cx.js";
|
|
40
|
-
export { Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Button, type ButtonProps, Card, CardHeader, CardMedia, type CardMediaProps, type CardProps, Checkbox, type CheckboxProps, Dialog, DialogActions, DialogBody, type DialogProps, Field, type FieldContextValue, type FieldProps, Heading, type HeadingProps, Icon, type IconProps, Input, type InputProps, type MarginProps, type Placement, Popover, type PopoverProps, type PresenceState, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Select, type SelectProps, Slider, type SliderProps, SliderValue, Stack, type StackProps, Switch, type SwitchProps, Text, type TextProps, Textarea, type TextareaProps, ThemeScope, type ThemeScopeProps, type ToastOptions, ToastProvider, type ToastProviderProps, type ToastTone, Tooltip, type TooltipProps, cx, splitSprinkles, useDisclosure, useField, usePresence, useToast };
|
|
43
|
+
export { Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, Badge, type BadgeProps, BottomNav, BottomNavItem, type BottomNavProps, BottomNavSpacer, Box, type BoxProps, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, Card, CardHeader, CardMedia, type CardMediaProps, type CardProps, Checkbox, type CheckboxProps, type Crumb, Dialog, DialogActions, DialogBody, type DialogProps, Field, type FieldContextValue, type FieldProps, Heading, type HeadingProps, Icon, type IconProps, Input, type InputProps, type MarginProps, type Placement, Popover, type PopoverProps, type PresenceState, Radio, RadioGroup, type RadioGroupProps, type RadioProps, SegmentedControl, type SegmentedControlProps, type SegmentedOption, Select, type SelectProps, Slider, type SliderProps, SliderValue, Stack, type StackProps, Switch, type SwitchProps, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Tabs, type TabsProps, Text, type TextProps, Textarea, type TextareaProps, ThemeScope, type ThemeScopeProps, type ToastOptions, ToastProvider, type ToastProviderProps, type ToastTone, Tooltip, type TooltipProps, cx, splitSprinkles, useDisclosure, useField, usePresence, useToast };
|
package/dist/index.js
CHANGED
|
@@ -13,6 +13,8 @@ import { Dialog, DialogActions, DialogBody } from "./components/dialog/dialog.js
|
|
|
13
13
|
import { useField } from "./components/field/field-context.js";
|
|
14
14
|
import { Field } from "./components/field/field.js";
|
|
15
15
|
import { Input, Textarea } from "./components/input/input.js";
|
|
16
|
+
import { Tab, TabList, TabPanel, Tabs } from "./components/navigation/tabs.js";
|
|
17
|
+
import { BottomNav, BottomNavItem, BottomNavSpacer, Breadcrumbs, SegmentedControl } from "./components/navigation/nav.js";
|
|
16
18
|
import { Popover, Tooltip } from "./components/popover/popover.js";
|
|
17
19
|
import { Select } from "./components/select/select.js";
|
|
18
20
|
import { Slider, SliderValue } from "./components/slider/slider.js";
|
|
@@ -20,4 +22,4 @@ import { Heading, Text } from "./components/text/text.js";
|
|
|
20
22
|
import { ToastProvider, useToast } from "./components/toast/toast.js";
|
|
21
23
|
import { cx } from "./utils/cx.js";
|
|
22
24
|
import { useDisclosure } from "./hooks/use-disclosure.js";
|
|
23
|
-
export { Avatar, AvatarGroup, Badge, Box, Button, Card, CardHeader, CardMedia, Checkbox, Dialog, DialogActions, DialogBody, Field, Heading, Icon, Input, Popover, Radio, RadioGroup, Select, Slider, SliderValue, Stack, Switch, Text, Textarea, ThemeScope, ToastProvider, Tooltip, cx, splitSprinkles, useDisclosure, useField, usePresence, useToast };
|
|
25
|
+
export { Avatar, AvatarGroup, Badge, BottomNav, BottomNavItem, BottomNavSpacer, Box, Breadcrumbs, Button, Card, CardHeader, CardMedia, Checkbox, Dialog, DialogActions, DialogBody, Field, Heading, Icon, Input, Popover, Radio, RadioGroup, SegmentedControl, Select, Slider, SliderValue, Stack, Switch, Tab, TabList, TabPanel, Tabs, Text, Textarea, ThemeScope, ToastProvider, Tooltip, cx, splitSprinkles, useDisclosure, useField, usePresence, useToast };
|
package/dist/styles.css
CHANGED
|
@@ -695,7 +695,7 @@
|
|
|
695
695
|
max-width: 100%;
|
|
696
696
|
max-height: 92dvh;
|
|
697
697
|
border-radius: var(--ml_radius-xl_uyc1fj1j) var(--ml_radius-xl_uyc1fj1j) 0 0;
|
|
698
|
-
padding-bottom: env(safe-area-inset-bottom);
|
|
698
|
+
padding-bottom: env(safe-area-inset-bottom, 0px);
|
|
699
699
|
}
|
|
700
700
|
.ml_placement_sheet_iy25f53[data-state="open"] {
|
|
701
701
|
animation: ml_sheet-in_ato5m6 var(--ml_motion-duration-slow_uyc1fj28) var(--ml_motion-easing-enter_uyc1fj2a) both;
|
|
@@ -715,7 +715,7 @@
|
|
|
715
715
|
max-width: 100%;
|
|
716
716
|
max-height: 92dvh;
|
|
717
717
|
border-radius: var(--ml_radius-xl_uyc1fj1j) var(--ml_radius-xl_uyc1fj1j) 0 0;
|
|
718
|
-
padding-bottom: env(safe-area-inset-bottom);
|
|
718
|
+
padding-bottom: env(safe-area-inset-bottom, 0px);
|
|
719
719
|
}
|
|
720
720
|
.ml_placement_auto_iy25f54[data-state="open"] {
|
|
721
721
|
animation: ml_sheet-in_ato5m6 var(--ml_motion-duration-slow_uyc1fj28) var(--ml_motion-easing-enter_uyc1fj2a) both;
|
|
@@ -944,6 +944,294 @@
|
|
|
944
944
|
@layer ml-theme;
|
|
945
945
|
@layer ml-components;
|
|
946
946
|
@layer ml-utilities;
|
|
947
|
+
@layer ml-components {
|
|
948
|
+
.ml_gp95tn0 {
|
|
949
|
+
display: flex;
|
|
950
|
+
gap: var(--ml_space-1_uyc1fj10);
|
|
951
|
+
border-bottom: 1px solid var(--ml_color-hairline_uyc1fj8);
|
|
952
|
+
overflow-x: auto;
|
|
953
|
+
scrollbar-width: none;
|
|
954
|
+
scroll-snap-type: x proximity;
|
|
955
|
+
}
|
|
956
|
+
.ml_gp95tn0::-webkit-scrollbar {
|
|
957
|
+
display: none;
|
|
958
|
+
}
|
|
959
|
+
.ml_gp95tn1 {
|
|
960
|
+
outline: none;
|
|
961
|
+
transition-property: color, background-color;
|
|
962
|
+
transition-duration: var(--ml_motion-duration-quick_uyc1fj26);
|
|
963
|
+
transition-timing-function: var(--ml_motion-easing-standard_uyc1fj29);
|
|
964
|
+
position: relative;
|
|
965
|
+
flex-shrink: 0;
|
|
966
|
+
scroll-snap-align: start;
|
|
967
|
+
appearance: none;
|
|
968
|
+
border: 0;
|
|
969
|
+
margin: 0;
|
|
970
|
+
padding-inline: var(--ml_space-3_uyc1fj12);
|
|
971
|
+
padding-block: 0.625rem;
|
|
972
|
+
min-height: 2.75rem;
|
|
973
|
+
background: none;
|
|
974
|
+
font: inherit;
|
|
975
|
+
font-size: var(--ml_font-size-sm_uyc1fj1o);
|
|
976
|
+
font-weight: var(--ml_font-weight-medium_uyc1fj1w);
|
|
977
|
+
color: var(--ml_color-textMuted_uyc1fj5);
|
|
978
|
+
cursor: pointer;
|
|
979
|
+
border-radius: var(--ml_radius-sm_uyc1fj1g) var(--ml_radius-sm_uyc1fj1g) 0 0;
|
|
980
|
+
}
|
|
981
|
+
.ml_gp95tn1:focus-visible {
|
|
982
|
+
box-shadow: 0 0 0 2px var(--ml_color-canvas_uyc1fj0), 0 0 0 4px var(--ml_color-focus_uyc1fjs);
|
|
983
|
+
}
|
|
984
|
+
.ml_gp95tn1:hover {
|
|
985
|
+
color: var(--ml_color-text_uyc1fj4);
|
|
986
|
+
}
|
|
987
|
+
.ml_gp95tn1[aria-selected="true"] {
|
|
988
|
+
color: var(--ml_color-text_uyc1fj4);
|
|
989
|
+
}
|
|
990
|
+
.ml_gp95tn1::after {
|
|
991
|
+
content: "";
|
|
992
|
+
position: absolute;
|
|
993
|
+
inset-inline: var(--ml_space-3_uyc1fj12);
|
|
994
|
+
bottom: -1px;
|
|
995
|
+
height: 2px;
|
|
996
|
+
border-radius: var(--ml_radius-round_uyc1fj1k);
|
|
997
|
+
background-color: var(--ml_color-accent_uyc1fjb);
|
|
998
|
+
transform: scaleX(0);
|
|
999
|
+
transition: transform var(--ml_motion-duration-settle_uyc1fj27) var(--ml_motion-easing-standard_uyc1fj29);
|
|
1000
|
+
}
|
|
1001
|
+
.ml_gp95tn1[aria-selected="true"]::after {
|
|
1002
|
+
transform: scaleX(1);
|
|
1003
|
+
}
|
|
1004
|
+
.ml_gp95tn1:disabled {
|
|
1005
|
+
cursor: not-allowed;
|
|
1006
|
+
opacity: 0.45;
|
|
1007
|
+
}
|
|
1008
|
+
.ml_gp95tn2 {
|
|
1009
|
+
outline: none;
|
|
1010
|
+
padding-top: var(--ml_space-4_uyc1fj13);
|
|
1011
|
+
border-radius: var(--ml_radius-sm_uyc1fj1g);
|
|
1012
|
+
}
|
|
1013
|
+
.ml_gp95tn2:focus-visible {
|
|
1014
|
+
box-shadow: 0 0 0 2px var(--ml_color-canvas_uyc1fj0), 0 0 0 4px var(--ml_color-focus_uyc1fjs);
|
|
1015
|
+
}
|
|
1016
|
+
.ml_gp95tn3 {
|
|
1017
|
+
display: inline-flex;
|
|
1018
|
+
gap: 0.125rem;
|
|
1019
|
+
padding: 0.1875rem;
|
|
1020
|
+
border: 0;
|
|
1021
|
+
margin: 0;
|
|
1022
|
+
min-width: 0;
|
|
1023
|
+
border-radius: var(--ml_radius-md_uyc1fj1h);
|
|
1024
|
+
background-color: var(--ml_color-surfaceSunken_uyc1fj2);
|
|
1025
|
+
}
|
|
1026
|
+
.ml_gp95tn3[data-full-width] {
|
|
1027
|
+
display: flex;
|
|
1028
|
+
}
|
|
1029
|
+
.ml_gp95tn4 {
|
|
1030
|
+
position: relative;
|
|
1031
|
+
flex: 1 1 0;
|
|
1032
|
+
display: flex;
|
|
1033
|
+
}
|
|
1034
|
+
.ml_gp95tn3[data-full-width] .ml_gp95tn4 {
|
|
1035
|
+
min-width: 0;
|
|
1036
|
+
}
|
|
1037
|
+
.ml_gp95tn5 {
|
|
1038
|
+
position: absolute;
|
|
1039
|
+
inset: 0;
|
|
1040
|
+
margin: 0;
|
|
1041
|
+
opacity: 0;
|
|
1042
|
+
cursor: pointer;
|
|
1043
|
+
}
|
|
1044
|
+
.ml_gp95tn5:disabled {
|
|
1045
|
+
cursor: not-allowed;
|
|
1046
|
+
}
|
|
1047
|
+
.ml_gp95tn6 {
|
|
1048
|
+
transition-property: background-color, color, box-shadow;
|
|
1049
|
+
transition-duration: var(--ml_motion-duration-quick_uyc1fj26);
|
|
1050
|
+
transition-timing-function: var(--ml_motion-easing-standard_uyc1fj29);
|
|
1051
|
+
flex: 1;
|
|
1052
|
+
display: inline-flex;
|
|
1053
|
+
align-items: center;
|
|
1054
|
+
justify-content: center;
|
|
1055
|
+
gap: var(--ml_space-1_5_uyc1fj1d);
|
|
1056
|
+
min-height: 2rem;
|
|
1057
|
+
padding-inline: var(--ml_space-3_uyc1fj12);
|
|
1058
|
+
border-radius: calc(var(--ml_radius-md_uyc1fj1h) - 3px);
|
|
1059
|
+
font-size: var(--ml_font-size-sm_uyc1fj1o);
|
|
1060
|
+
font-weight: var(--ml_font-weight-medium_uyc1fj1w);
|
|
1061
|
+
color: var(--ml_color-textMuted_uyc1fj5);
|
|
1062
|
+
white-space: nowrap;
|
|
1063
|
+
pointer-events: none;
|
|
1064
|
+
}
|
|
1065
|
+
.ml_gp95tn5:hover ~ .ml_gp95tn6 {
|
|
1066
|
+
color: var(--ml_color-text_uyc1fj4);
|
|
1067
|
+
}
|
|
1068
|
+
.ml_gp95tn5:checked ~ .ml_gp95tn6 {
|
|
1069
|
+
color: var(--ml_color-text_uyc1fj4);
|
|
1070
|
+
background-color: var(--ml_color-surface_uyc1fj1);
|
|
1071
|
+
box-shadow: var(--ml_shadow-hairline_uyc1fjv), var(--ml_shadow-control_uyc1fjy);
|
|
1072
|
+
}
|
|
1073
|
+
.ml_gp95tn5:focus-visible ~ .ml_gp95tn6 {
|
|
1074
|
+
box-shadow: 0 0 0 2px var(--ml_color-focus_uyc1fjs);
|
|
1075
|
+
}
|
|
1076
|
+
.ml_gp95tn5:disabled ~ .ml_gp95tn6 {
|
|
1077
|
+
opacity: 0.45;
|
|
1078
|
+
}
|
|
1079
|
+
.ml_gp95tn7 {
|
|
1080
|
+
position: fixed;
|
|
1081
|
+
inset-inline: 0;
|
|
1082
|
+
bottom: 0;
|
|
1083
|
+
z-index: 100;
|
|
1084
|
+
display: grid;
|
|
1085
|
+
grid-auto-columns: 1fr;
|
|
1086
|
+
grid-auto-flow: column;
|
|
1087
|
+
padding-bottom: env(safe-area-inset-bottom, 0px);
|
|
1088
|
+
padding-inline: max(var(--ml_space-1_uyc1fj10), env(safe-area-inset-left, 0px)) max(var(--ml_space-1_uyc1fj10), env(safe-area-inset-right, 0px));
|
|
1089
|
+
background-color: color-mix(in oklch, var(--ml_color-surface_uyc1fj1) 88%, transparent);
|
|
1090
|
+
backdrop-filter: saturate(1.4) blur(14px);
|
|
1091
|
+
border-top: 1px solid var(--ml_color-hairline_uyc1fj8);
|
|
1092
|
+
}
|
|
1093
|
+
.ml_gp95tn8 {
|
|
1094
|
+
outline: none;
|
|
1095
|
+
position: relative;
|
|
1096
|
+
display: flex;
|
|
1097
|
+
flex-direction: column;
|
|
1098
|
+
align-items: center;
|
|
1099
|
+
justify-content: center;
|
|
1100
|
+
gap: 0.1875rem;
|
|
1101
|
+
min-height: 3.5rem;
|
|
1102
|
+
padding-block: var(--ml_space-1_5_uyc1fj1d);
|
|
1103
|
+
border: 0;
|
|
1104
|
+
background: none;
|
|
1105
|
+
font-family: inherit;
|
|
1106
|
+
font-size: 0.6875rem;
|
|
1107
|
+
font-weight: var(--ml_font-weight-medium_uyc1fj1w);
|
|
1108
|
+
color: var(--ml_color-textSubtle_uyc1fj6);
|
|
1109
|
+
text-decoration: none;
|
|
1110
|
+
cursor: pointer;
|
|
1111
|
+
border-radius: var(--ml_radius-md_uyc1fj1h);
|
|
1112
|
+
-webkit-tap-highlight-color: transparent;
|
|
1113
|
+
}
|
|
1114
|
+
.ml_gp95tn8:focus-visible {
|
|
1115
|
+
box-shadow: 0 0 0 2px var(--ml_color-canvas_uyc1fj0), 0 0 0 4px var(--ml_color-focus_uyc1fjs);
|
|
1116
|
+
}
|
|
1117
|
+
.ml_gp95tn8[aria-current="page"] {
|
|
1118
|
+
color: var(--ml_color-accentText_uyc1fjf);
|
|
1119
|
+
}
|
|
1120
|
+
.ml_gp95tn8:active {
|
|
1121
|
+
background-color: var(--ml_color-surfaceSunken_uyc1fj2);
|
|
1122
|
+
}
|
|
1123
|
+
.ml_gp95tn9 {
|
|
1124
|
+
position: absolute;
|
|
1125
|
+
top: var(--ml_space-1_uyc1fj10);
|
|
1126
|
+
left: calc(50% + 0.5rem);
|
|
1127
|
+
min-width: 1.125rem;
|
|
1128
|
+
height: 1.125rem;
|
|
1129
|
+
padding-inline: 0.3125rem;
|
|
1130
|
+
border-radius: var(--ml_radius-round_uyc1fj1k);
|
|
1131
|
+
background-color: var(--ml_color-danger_uyc1fjh);
|
|
1132
|
+
color: var(--ml_color-onDanger_uyc1fjl);
|
|
1133
|
+
font-size: 0.625rem;
|
|
1134
|
+
font-weight: var(--ml_font-weight-strong_uyc1fj1x);
|
|
1135
|
+
line-height: 1.125rem;
|
|
1136
|
+
text-align: center;
|
|
1137
|
+
font-variant-numeric: tabular-nums;
|
|
1138
|
+
box-shadow: 0 0 0 2px var(--ml_color-surface_uyc1fj1);
|
|
1139
|
+
}
|
|
1140
|
+
.ml_gp95tna {
|
|
1141
|
+
height: calc(3.5rem + var(--ml_space-3_uyc1fj12) + env(safe-area-inset-bottom, 0px));
|
|
1142
|
+
}
|
|
1143
|
+
.ml_gp95tnb {
|
|
1144
|
+
display: flex;
|
|
1145
|
+
align-items: center;
|
|
1146
|
+
flex-wrap: wrap;
|
|
1147
|
+
gap: var(--ml_space-1_uyc1fj10);
|
|
1148
|
+
margin: 0;
|
|
1149
|
+
padding: 0;
|
|
1150
|
+
list-style: none;
|
|
1151
|
+
font-size: var(--ml_font-size-sm_uyc1fj1o);
|
|
1152
|
+
color: var(--ml_color-textMuted_uyc1fj5);
|
|
1153
|
+
}
|
|
1154
|
+
.ml_gp95tnc {
|
|
1155
|
+
display: inline-flex;
|
|
1156
|
+
align-items: center;
|
|
1157
|
+
gap: var(--ml_space-1_uyc1fj10);
|
|
1158
|
+
min-width: 0;
|
|
1159
|
+
}
|
|
1160
|
+
.ml_gp95tnd {
|
|
1161
|
+
outline: none;
|
|
1162
|
+
color: inherit;
|
|
1163
|
+
text-decoration: none;
|
|
1164
|
+
border-radius: var(--ml_radius-xs_uyc1fj1f);
|
|
1165
|
+
}
|
|
1166
|
+
.ml_gp95tnd:focus-visible {
|
|
1167
|
+
box-shadow: 0 0 0 2px var(--ml_color-canvas_uyc1fj0), 0 0 0 4px var(--ml_color-focus_uyc1fjs);
|
|
1168
|
+
}
|
|
1169
|
+
.ml_gp95tnd:hover {
|
|
1170
|
+
color: var(--ml_color-text_uyc1fj4);
|
|
1171
|
+
text-decoration: underline;
|
|
1172
|
+
text-underline-offset: 0.2em;
|
|
1173
|
+
}
|
|
1174
|
+
.ml_gp95tne {
|
|
1175
|
+
color: var(--ml_color-text_uyc1fj4);
|
|
1176
|
+
font-weight: var(--ml_font-weight-medium_uyc1fj1w);
|
|
1177
|
+
overflow: hidden;
|
|
1178
|
+
text-overflow: ellipsis;
|
|
1179
|
+
white-space: nowrap;
|
|
1180
|
+
}
|
|
1181
|
+
.ml_gp95tnf {
|
|
1182
|
+
color: var(--ml_color-textSubtle_uyc1fj6);
|
|
1183
|
+
flex-shrink: 0;
|
|
1184
|
+
}
|
|
1185
|
+
.ml_gp95tng {
|
|
1186
|
+
display: none;
|
|
1187
|
+
}
|
|
1188
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1189
|
+
.ml_gp95tn1 {
|
|
1190
|
+
transition-duration: 1ms;
|
|
1191
|
+
}
|
|
1192
|
+
.ml_gp95tn1::after {
|
|
1193
|
+
transition: none;
|
|
1194
|
+
}
|
|
1195
|
+
.ml_gp95tn6 {
|
|
1196
|
+
transition-duration: 1ms;
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
@media (pointer: coarse) {
|
|
1200
|
+
.ml_gp95tn6 {
|
|
1201
|
+
min-height: 2.5rem;
|
|
1202
|
+
}
|
|
1203
|
+
}
|
|
1204
|
+
@media screen and (min-width: 768px) {
|
|
1205
|
+
.ml_gp95tn7[data-hide-from="tablet"] {
|
|
1206
|
+
display: none;
|
|
1207
|
+
}
|
|
1208
|
+
.ml_gp95tna[data-hide-from="tablet"] {
|
|
1209
|
+
display: none;
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
@media screen and (min-width: 1024px) {
|
|
1213
|
+
.ml_gp95tn7[data-hide-from="desktop"] {
|
|
1214
|
+
display: none;
|
|
1215
|
+
}
|
|
1216
|
+
.ml_gp95tna[data-hide-from="desktop"] {
|
|
1217
|
+
display: none;
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
@media not screen and (min-width: 768px) {
|
|
1221
|
+
.ml_gp95tnc {
|
|
1222
|
+
display: none;
|
|
1223
|
+
}
|
|
1224
|
+
.ml_gp95tng {
|
|
1225
|
+
display: inline-flex;
|
|
1226
|
+
align-items: center;
|
|
1227
|
+
gap: var(--ml_space-1_uyc1fj10);
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
@layer ml-reset;
|
|
1232
|
+
@layer ml-theme;
|
|
1233
|
+
@layer ml-components;
|
|
1234
|
+
@layer ml-utilities;
|
|
947
1235
|
@layer ml-components {
|
|
948
1236
|
.ml_12557yp0 {
|
|
949
1237
|
position: fixed;
|
|
@@ -1323,7 +1611,7 @@
|
|
|
1323
1611
|
position: fixed;
|
|
1324
1612
|
z-index: 2147483000;
|
|
1325
1613
|
inset-inline: var(--ml_space-4_uyc1fj13);
|
|
1326
|
-
bottom: max(var(--ml_space-4_uyc1fj13), env(safe-area-inset-bottom));
|
|
1614
|
+
bottom: max(var(--ml_space-4_uyc1fj13), env(safe-area-inset-bottom, 0px));
|
|
1327
1615
|
display: flex;
|
|
1328
1616
|
flex-direction: column;
|
|
1329
1617
|
align-items: center;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mohirlab/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Mohirlab React components.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"design-system",
|
|
@@ -35,15 +35,15 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@mohirlab/assets": "^0.2.0",
|
|
37
37
|
"@mohirlab/icons": "^0.1.1",
|
|
38
|
-
"@mohirlab/motion": "^0.1.
|
|
39
|
-
"@mohirlab/sprinkles": "^0.1.
|
|
40
|
-
"@mohirlab/themes": "^0.
|
|
38
|
+
"@mohirlab/motion": "^0.1.3",
|
|
39
|
+
"@mohirlab/sprinkles": "^0.1.4",
|
|
40
|
+
"@mohirlab/themes": "^0.4.0",
|
|
41
41
|
"@vanilla-extract/dynamic": "^2.1.5",
|
|
42
42
|
"@vanilla-extract/recipes": "^0.5.7",
|
|
43
43
|
"@vanilla-extract/sprinkles": "^1.7.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@mohirlab/recipes": "^0.2.
|
|
46
|
+
"@mohirlab/recipes": "^0.2.1",
|
|
47
47
|
"@testing-library/react": "^16.3.0",
|
|
48
48
|
"@types/react": "^19.2.0",
|
|
49
49
|
"@types/react-dom": "^19.2.0",
|