@imfusion/web-ui 0.11.1-dev.33.gefbd75be → 0.11.1-dev.35.g0028b4dd
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/CHANGELOG.md +6 -0
- package/dist/components/tab-nav/index.d.ts +2 -0
- package/dist/components/tab-nav/tab-nav.d.ts +26 -0
- package/dist/components/tab-nav/tab-nav.meta.d.ts +2 -0
- package/dist/components/tabs/tabs-underline.cva.d.ts +6 -0
- package/dist/components/tabs/tabs.d.ts +13 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1459 -1425
- package/dist/integrations/image-display-options.js +33 -33
- package/dist/style.css +1 -1
- package/dist/{tabs-U3Cg6YAw.js → tabs-D5DTlk0d.js} +174 -127
- package/package.json +1 -1
- package/src/docgen/doc.gen.json +60 -2
- package/src/llms/llms.gen.txt +6 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
### Added
|
|
6
6
|
|
|
7
|
+
- `TabNav` is a new row of links to routes with a bar under the current one, in the underline look of `Tabs`. `TabNav.Item`
|
|
8
|
+
renders an `<a>`, takes a router link as `render`, and sets `aria-current="page"` from `current`.
|
|
9
|
+
[TabNav](src/components/tab-nav/tab-nav.stories.tsx#InAProjectHeader) — Nikolaus Brunner <brunner@imfusion.com>
|
|
10
|
+
- `Tabs.Root` takes `appearance`: `"boxed"` (the default, unchanged) or `"underline"`, with mono labels, a 2px bar under the
|
|
11
|
+
active tab on a hairline rule, and an unframed panel. Underline is horizontal only; a vertical Tabs stays boxed.
|
|
12
|
+
[Tabs](src/components/tabs/tabs.stories.tsx#Underline) — Nikolaus Brunner <brunner@imfusion.com>
|
|
7
13
|
- `Textarea` is a new multi-line input adapted from Base UI, with the `Input` variants and sizes, a drag-to-resize corner, and
|
|
8
14
|
validation state from `Field`. [Textarea](src/components/textarea/textarea.mdx)
|
|
9
15
|
([WEBSDK-244](https://imfusion.atlassian.net/browse/WEBSDK-244)) — Nikolaus Brunner <brunner@imfusion.com>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
2
|
+
interface RootProps extends React.ComponentProps<"nav"> {
|
|
3
|
+
/** Names the navigation for screen readers, such as "Project". */
|
|
4
|
+
"aria-label": string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* TabNav.Root — a `<nav>` of links that draws the hairline under its items. Give it an `aria-label` that names the
|
|
8
|
+
* navigation, such as "Project".
|
|
9
|
+
* Not based on any upstream component.
|
|
10
|
+
*/
|
|
11
|
+
export declare function Root(props: RootProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare namespace Root {
|
|
13
|
+
var displayName: string;
|
|
14
|
+
}
|
|
15
|
+
type ItemProps = useRender.ComponentProps<"a"> & {
|
|
16
|
+
/** Marks the item as the page the user is on: sets `aria-current="page"` and `data-current`, and draws the bar. */
|
|
17
|
+
current?: boolean;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* TabNav.Item — a link in the row. Renders an `<a>`; pass a router link as `render` to navigate without a page load.
|
|
21
|
+
*/
|
|
22
|
+
export declare function Item({ current, render, ...props }: ItemProps): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
|
|
23
|
+
export declare namespace Item {
|
|
24
|
+
var displayName: string;
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The underline look shared by `Tabs` (appearance `"underline"`) and `TabNav`, which renders it on links. Keeping it here
|
|
3
|
+
* avoids cross-component imports between the two.
|
|
4
|
+
*/
|
|
5
|
+
export declare const tabsUnderlineRule: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
6
|
+
export declare const tabsUnderlineItem: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
@@ -2,18 +2,27 @@ import { Tabs as TabsPrimitive } from '@base-ui/react/tabs';
|
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const tabsList: (props?: ({
|
|
4
4
|
fill?: boolean | null | undefined;
|
|
5
|
+
appearance?: "underline" | "boxed" | null | undefined;
|
|
5
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
type TabsAppearance = "boxed" | "underline";
|
|
8
|
+
interface RootProps extends React.ComponentProps<typeof TabsPrimitive.Root> {
|
|
9
|
+
/**
|
|
10
|
+
* `"boxed"` outlines the active tab in a box that fuses into a framed panel. `"underline"` marks it with a bar under
|
|
11
|
+
* its label on a hairline rule, with an unframed panel. Underline is horizontal only: a vertical Tabs stays boxed.
|
|
12
|
+
*/
|
|
13
|
+
appearance?: TabsAppearance;
|
|
14
|
+
}
|
|
6
15
|
/**
|
|
7
16
|
* Tabs.Root — container that manages the active tab value and orientation context.
|
|
8
17
|
*
|
|
9
18
|
* @see https://base-ui.com/react/components/tabs
|
|
10
19
|
* @llm https://base-ui.com/react/components/tabs.md
|
|
11
20
|
*/
|
|
12
|
-
export declare function Root(props:
|
|
21
|
+
export declare function Root({ appearance, ...props }: RootProps): import("react/jsx-runtime").JSX.Element;
|
|
13
22
|
export declare namespace Root {
|
|
14
23
|
var displayName: string;
|
|
15
24
|
}
|
|
16
|
-
interface ListProps extends React.ComponentProps<typeof TabsPrimitive.List>, VariantProps<typeof tabsList> {
|
|
25
|
+
interface ListProps extends React.ComponentProps<typeof TabsPrimitive.List>, Pick<VariantProps<typeof tabsList>, "fill"> {
|
|
17
26
|
/**
|
|
18
27
|
* Give every tab an equal share of the list's length (equal width when
|
|
19
28
|
* horizontal). When vertical, this only takes effect if the list is stretched
|
|
@@ -32,7 +41,7 @@ export declare namespace Tab {
|
|
|
32
41
|
var displayName: string;
|
|
33
42
|
}
|
|
34
43
|
/**
|
|
35
|
-
* Tabs.Indicator — the bordered box marking the active tab, positioned via
|
|
44
|
+
* Tabs.Indicator — the bordered box (boxed) or bar (underline) marking the active tab, positioned via
|
|
36
45
|
* the `--active-tab-*` CSS custom properties Base UI writes onto it. Render
|
|
37
46
|
* once per Tabs.List, after the Tabs.Tab list.
|
|
38
47
|
*/
|
|
@@ -43,7 +52,7 @@ export declare namespace Indicator {
|
|
|
43
52
|
/**
|
|
44
53
|
* Tabs.PanelViewport — the shared frame Tabs.Panel elements render inside.
|
|
45
54
|
* No Base UI equivalent exists; it's surfaced as a named part since its
|
|
46
|
-
* hairline border is what Tabs.Indicator visually fuses into.
|
|
55
|
+
* hairline border is what the boxed Tabs.Indicator visually fuses into. The underline appearance draws no frame.
|
|
47
56
|
*/
|
|
48
57
|
export declare function PanelViewport(props: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
49
58
|
export declare namespace PanelViewport {
|
package/dist/index.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ export { NavigationMenu, navigationMenuMeta } from './components/navigation-menu
|
|
|
41
41
|
export { Skeleton, skeletonMeta } from './components/skeleton';
|
|
42
42
|
export { Spinner, spinnerMeta } from './components/spinner';
|
|
43
43
|
export { Table, tableMeta } from './components/table';
|
|
44
|
+
export { TabNav, tabNavMeta } from './components/tab-nav';
|
|
44
45
|
export { Tabs, tabsMeta } from './components/tabs';
|
|
45
46
|
export { Toast, toastMeta } from './components/toast';
|
|
46
47
|
export { Tooltip, tooltipMeta } from './components/tooltip';
|