@imfusion/web-ui 0.11.1-dev.6.gf4b6c627 → 0.11.1-dev.62.gfcd31b6e
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 +168 -1
- package/dist/{code-Cl9AzRyF.js → code-BaLXMEMa.js} +8 -8
- package/dist/components/autocomplete/autocomplete.d.ts +144 -0
- package/dist/components/autocomplete/autocomplete.meta.d.ts +2 -0
- package/dist/components/autocomplete/index.d.ts +2 -0
- package/dist/components/avatar/avatar.d.ts +1 -1
- package/dist/components/card/card.d.ts +3 -2
- package/dist/components/checkbox/checkbox.cva.d.ts +3 -0
- package/dist/components/combobox/combobox.cva.d.ts +37 -0
- package/dist/components/combobox/combobox.d.ts +171 -0
- package/dist/components/combobox/combobox.meta.d.ts +2 -0
- package/dist/components/combobox/index.d.ts +2 -0
- package/dist/components/dialog/dialog.d.ts +23 -3
- package/dist/components/file-drop-zone/collect-files.d.ts +56 -0
- package/dist/components/file-drop-zone/file-drop-zone-context.d.ts +15 -0
- package/dist/components/file-drop-zone/file-drop-zone.d.ts +185 -0
- package/dist/components/file-drop-zone/file-drop-zone.meta.d.ts +2 -0
- package/dist/components/file-drop-zone/format-bytes.d.ts +5 -0
- package/dist/components/file-drop-zone/index.d.ts +4 -0
- package/dist/components/image/image.d.ts +50 -0
- package/dist/components/image/image.meta.d.ts +2 -0
- package/dist/components/image/index.d.ts +2 -0
- package/dist/components/logo/logo.d.ts +1 -1
- package/dist/components/popover/popover.d.ts +2 -2
- package/dist/components/progress/index.d.ts +2 -0
- package/dist/components/progress/progress.d.ts +40 -0
- package/dist/components/progress/progress.meta.d.ts +2 -0
- package/dist/components/rich-link/rich-link.d.ts +1 -1
- package/dist/components/select/select.cva.d.ts +7 -0
- package/dist/components/select/select.d.ts +1 -1
- 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/table/table.d.ts +8 -0
- package/dist/components/tabs/tabs-underline.cva.d.ts +6 -0
- package/dist/components/tabs/tabs.d.ts +13 -4
- package/dist/components/textarea/index.d.ts +2 -0
- package/dist/components/textarea/textarea.d.ts +32 -0
- package/dist/components/textarea/textarea.meta.d.ts +2 -0
- package/dist/components/toast/toast.d.ts +2 -2
- package/dist/components/typo/typo.d.ts +5 -1
- package/dist/docgen/component-sources.d.ts +4 -0
- package/dist/icon-button-roSB497o.js +171 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +4536 -2958
- package/dist/integrations/code-highlight.js +2 -2
- package/dist/integrations/frame-selection.js +1 -1
- package/dist/integrations/image-display-options.js +73 -71
- package/dist/integrations/layout-mode/index.d.ts +2 -0
- package/dist/integrations/layout-mode/layout-mode-view.d.ts +32 -0
- package/dist/integrations/layout-mode/layout-mode.d.ts +13 -0
- package/dist/integrations/layout-mode/layout-mode.meta.d.ts +2 -0
- package/dist/integrations/layout-mode.js +103 -0
- package/dist/integrations/view-tools/index.d.ts +4 -0
- package/dist/integrations/view-tools/use-view-interaction.d.ts +21 -0
- package/dist/integrations/view-tools/view-tools-view.d.ts +23 -0
- package/dist/integrations/view-tools/view-tools.d.ts +14 -0
- package/dist/integrations/view-tools/view-tools.meta.d.ts +2 -0
- package/dist/integrations/view-tools.js +133 -0
- package/dist/{resolve-state-props-DQf9WiGv.js → rolldown-runtime-Dy4uBu1J.js} +1 -12
- package/dist/row-CImu8yXV.js +136 -0
- package/dist/{scroll-area-z9Lf9uIk.js → scroll-area-CXQ_SxPX.js} +2 -1
- package/dist/{slider-Bf274cMe.js → slider-CpIZMAFl.js} +2 -1
- package/dist/style.css +2 -1
- package/dist/tabs-BqgyMmo6.js +173 -0
- package/dist/toggle-group-Bhb3qicp.js +31 -0
- package/dist/toggle-group-eGr6_hgQ.js +125 -0
- package/dist/utils/email.d.ts +4 -1
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/initials.d.ts +4 -0
- package/dist/utils/item-parts.d.ts +23 -0
- package/dist/utils/stable-popup-height.d.ts +10 -0
- package/dist/utils-J6vbjIt1.js +46 -0
- package/package.json +4 -4
- package/src/docgen/doc.gen.json +5526 -1748
- package/src/llms/llms.gen.txt +52 -1
- package/src/llms/skills/imf-web-ui-audit/SKILL.md +5 -2
- package/src/llms/skills/imf-web-ui-conventions/SKILL.md +2 -2
- package/src/llms/skills/imf-web-ui-conventions/templates/AUDIT_CHECKLIST.md +19 -2
- package/src/llms/skills/imf-web-ui-conventions/topics/assets.md +28 -4
- package/src/llms/skills/imf-web-ui-conventions/topics/components.md +10 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/library-boundary.md +3 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/npm-project.md +2 -1
- package/src/llms/skills/imf-web-ui-conventions/topics/react/composition.md +54 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/react/effects.md +59 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/react/state.md +41 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/react.md +7 -60
- package/src/llms/skills/imf-web-ui-conventions/topics/styling.md +22 -1
- package/src/llms/skills/imf-web-ui-conventions/topics/tooling.md +3 -2
- package/src/llms/skills/imf-web-ui-conventions/topics/validation.md +7 -0
- package/src/llms/skills/imf-web-ui-ux/references/forms.md +3 -2
- package/src/llms/tokens.gen.json +19 -1
- package/dist/tabs-DsDSCA--.js +0 -376
|
@@ -2,7 +2,7 @@ import { IconComponent } from '../icon';
|
|
|
2
2
|
type Props = React.ComponentProps<"a"> & {
|
|
3
3
|
/** Leading icon from `@imfusion/web-ui/icons`, shown on a tile in the primary color. */
|
|
4
4
|
glyph?: IconComponent;
|
|
5
|
-
/** Second line under the label.
|
|
5
|
+
/** Second line under the label. */
|
|
6
6
|
description?: React.ReactNode;
|
|
7
7
|
/** Link target scope. `"external"` (default) opens in a new tab with a diagonal `ArrowUpRight` icon; `"internal"` stays in the current tab with a horizontal `ArrowRight` icon. */
|
|
8
8
|
kind?: "external" | "internal";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Popup, list, and item styles, shared with primitives that open the same list (Combobox, Autocomplete). */
|
|
2
|
+
export declare const selectPopup: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
3
|
+
export declare const selectList: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
4
|
+
export declare const selectItem: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
5
|
+
export declare const selectItemIndicator: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
6
|
+
export declare const selectItemText: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
7
|
+
export declare const selectItemDescription: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
@@ -2,7 +2,7 @@ import { Select as SelectPrimitive } from '@base-ui/react/select';
|
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
type UpstreamItem = React.ComponentProps<typeof SelectPrimitive.Item>;
|
|
4
4
|
declare const selectRoot: (props?: ({
|
|
5
|
-
width?: "auto" | "
|
|
5
|
+
width?: "auto" | "wide" | "full" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
interface RootProps<Value = unknown, Multiple extends boolean | undefined = false> extends React.ComponentProps<typeof SelectPrimitive.Root<Value, Multiple>> {
|
|
8
8
|
/** Trigger width: `auto` keeps the compact minimum; `wide` raises it; `full` fills the parent. @default "auto" */
|
|
@@ -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 {};
|
|
@@ -46,6 +46,14 @@ export declare function RowLink({ render, ...props }: useRender.ComponentProps<"
|
|
|
46
46
|
export declare namespace RowLink {
|
|
47
47
|
var displayName: string;
|
|
48
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Table.RowButton — a `<button>` that stands for its whole row, such as one that opens a drawer. Use it when the row acts
|
|
51
|
+
* instead of navigating; a link that goes to a page is a `Table.RowLink`.
|
|
52
|
+
*/
|
|
53
|
+
export declare function RowButton({ render, type, ...props }: useRender.ComponentProps<"button">): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
|
|
54
|
+
export declare namespace RowButton {
|
|
55
|
+
var displayName: string;
|
|
56
|
+
}
|
|
49
57
|
/**
|
|
50
58
|
* Table.HeaderButton — inline action button for header cells. Generic by
|
|
51
59
|
* design: sorting toggles, filter toggles, column menus all render through it
|
|
@@ -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 {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Input as InputPrimitive } from '@base-ui/react/input';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const textarea: (props?: ({
|
|
4
|
+
variant?: "outline" | "ghost" | "filled" | null | undefined;
|
|
5
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
6
|
+
resize?: "none" | "both" | "horizontal" | "vertical" | null | undefined;
|
|
7
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
+
type UpstreamInput = React.ComponentProps<typeof InputPrimitive>;
|
|
9
|
+
interface Props extends Omit<React.ComponentProps<"textarea">, "className" | "style" | "value" | "defaultValue">, Pick<UpstreamInput, "value" | "defaultValue" | "onValueChange" | "render">, VariantProps<typeof textarea> {
|
|
10
|
+
/** Number of visible text lines. */
|
|
11
|
+
rows?: number;
|
|
12
|
+
/**
|
|
13
|
+
* Which directions the user can drag to resize. `horizontal` and `both` size the textarea from `cols` and shrink-wrap
|
|
14
|
+
* the root, so the width follows the drag; `none` hides the resize corner.
|
|
15
|
+
*/
|
|
16
|
+
resize?: "vertical" | "horizontal" | "both" | "none";
|
|
17
|
+
/** Class of the root wrapper that lays the field out. */
|
|
18
|
+
className?: string;
|
|
19
|
+
/** Style of the root wrapper that lays the field out. */
|
|
20
|
+
style?: React.CSSProperties;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Multi-line text input. Also called a text area; use Input for a single line.
|
|
24
|
+
* Wraps Base UI Input rendered as a textarea for controlled/uncontrolled state, form integration,
|
|
25
|
+
* and Field context awareness (valid/invalid/dirty/touched/filled/focused). `className` and `style`
|
|
26
|
+
* go to the root wrapper; every other prop goes to the textarea.
|
|
27
|
+
*
|
|
28
|
+
* @see https://base-ui.com/react/components/input
|
|
29
|
+
* @llm https://base-ui.com/react/components/input.md
|
|
30
|
+
*/
|
|
31
|
+
export declare function Textarea({ variant, size, rows, resize, render, className, style, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export {};
|
|
@@ -2,10 +2,10 @@ import { Toast as ToastPrimitive } from '@base-ui/react/toast';
|
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const toastViewport: (props?: ({
|
|
4
4
|
position?: "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right" | null | undefined;
|
|
5
|
-
width?: "default" | "content" | "
|
|
5
|
+
width?: "default" | "content" | "wide" | "compact" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
declare const toastRoot: (props?: ({
|
|
8
|
-
variant?: "warning" | "info" | "
|
|
8
|
+
variant?: "warning" | "info" | "error" | "neutral" | "success" | null | undefined;
|
|
9
9
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
10
10
|
/**
|
|
11
11
|
* Toast.useToastManager — reads the queue and the add/close/update/promise
|
|
@@ -9,6 +9,10 @@ type WeightProps = {
|
|
|
9
9
|
/** Font weight. Omit to keep the member's default; `medium` firms up short body text on cards. */
|
|
10
10
|
weight?: "regular" | "medium" | "strong";
|
|
11
11
|
};
|
|
12
|
+
type MarkerProps = {
|
|
13
|
+
/** Colour of the dash. Omit to follow the text colour. */
|
|
14
|
+
markerVariant?: TypoProps["variant"];
|
|
15
|
+
};
|
|
12
16
|
type HeadingProps = useRender.ComponentProps<"h1"> & TypoProps;
|
|
13
17
|
type LongHeadingProps = HeadingProps & {
|
|
14
18
|
/** Whether lines after the first use a translucent text color. */
|
|
@@ -99,7 +103,7 @@ export declare namespace OrderedList {
|
|
|
99
103
|
var displayName: string;
|
|
100
104
|
}
|
|
101
105
|
/** Typo.UnorderedList — bulleted list. */
|
|
102
|
-
export declare function UnorderedList({ variant, weight, render, ...props }: useRender.ComponentProps<"ul"> & TypoProps & WeightProps): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
|
|
106
|
+
export declare function UnorderedList({ variant, markerVariant, weight, render, ...props }: useRender.ComponentProps<"ul"> & TypoProps & WeightProps & MarkerProps): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
|
|
103
107
|
export declare namespace UnorderedList {
|
|
104
108
|
var displayName: string;
|
|
105
109
|
}
|
|
@@ -4,4 +4,8 @@ export type ComponentSource = {
|
|
|
4
4
|
componentFile: string;
|
|
5
5
|
metaFile: string;
|
|
6
6
|
};
|
|
7
|
+
/**
|
|
8
|
+
* A component folder is public when the package index exports it; an unexported folder is internal.
|
|
9
|
+
* Integrations ship through their own entry points and are always public.
|
|
10
|
+
*/
|
|
7
11
|
export declare function publicComponentSources(srcDir: string): ComponentSource[];
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { _M as e } from "./icons-vc1WZCxX.js";
|
|
2
|
+
import { t } from "./meta-V_KyLeGn.js";
|
|
3
|
+
import { a as n, r } from "./toggle-group-eGr6_hgQ.js";
|
|
4
|
+
import { a as i } from "./utils-J6vbjIt1.js";
|
|
5
|
+
import { Button as a } from "@base-ui/react/button";
|
|
6
|
+
import { cva as o } from "class-variance-authority";
|
|
7
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
|
+
var l = {
|
|
9
|
+
chamfer: "imf-ui-button-module-chamfer",
|
|
10
|
+
contextOncolor: "imf-ui-button-module-contextOncolor",
|
|
11
|
+
endIcon: "imf-ui-button-module-endIcon",
|
|
12
|
+
justifySpread: "imf-ui-button-module-justifySpread",
|
|
13
|
+
label: "imf-ui-button-module-label",
|
|
14
|
+
radiusLg: "imf-ui-button-module-radiusLg",
|
|
15
|
+
radiusMd: "imf-ui-button-module-radiusMd",
|
|
16
|
+
radiusRound: "imf-ui-button-module-radiusRound",
|
|
17
|
+
radiusSm: "imf-ui-button-module-radiusSm",
|
|
18
|
+
root: "imf-ui-button-module-root",
|
|
19
|
+
shortcut: "imf-ui-button-module-shortcut",
|
|
20
|
+
sizeHero: "imf-ui-button-module-sizeHero",
|
|
21
|
+
sizeLg: "imf-ui-button-module-sizeLg",
|
|
22
|
+
sizeMd: "imf-ui-button-module-sizeMd",
|
|
23
|
+
sizeSm: "imf-ui-button-module-sizeSm",
|
|
24
|
+
startIcon: "imf-ui-button-module-startIcon",
|
|
25
|
+
variantGhost: "imf-ui-button-module-variantGhost",
|
|
26
|
+
variantNegative: "imf-ui-button-module-variantNegative",
|
|
27
|
+
variantOutline: "imf-ui-button-module-variantOutline",
|
|
28
|
+
variantPositive: "imf-ui-button-module-variantPositive",
|
|
29
|
+
variantPrimary: "imf-ui-button-module-variantPrimary",
|
|
30
|
+
variantSecondary: "imf-ui-button-module-variantSecondary"
|
|
31
|
+
}, u = o(l.root, { variants: {
|
|
32
|
+
variant: {
|
|
33
|
+
primary: l.variantPrimary,
|
|
34
|
+
secondary: l.variantSecondary,
|
|
35
|
+
positive: l.variantPositive,
|
|
36
|
+
negative: l.variantNegative,
|
|
37
|
+
outline: l.variantOutline,
|
|
38
|
+
ghost: l.variantGhost
|
|
39
|
+
},
|
|
40
|
+
size: {
|
|
41
|
+
sm: l.sizeSm,
|
|
42
|
+
md: l.sizeMd,
|
|
43
|
+
lg: l.sizeLg,
|
|
44
|
+
hero: l.sizeHero
|
|
45
|
+
},
|
|
46
|
+
chamfer: {
|
|
47
|
+
false: null,
|
|
48
|
+
true: l.chamfer
|
|
49
|
+
},
|
|
50
|
+
radius: {
|
|
51
|
+
none: null,
|
|
52
|
+
sm: l.radiusSm,
|
|
53
|
+
md: l.radiusMd,
|
|
54
|
+
lg: l.radiusLg,
|
|
55
|
+
round: l.radiusRound
|
|
56
|
+
},
|
|
57
|
+
context: {
|
|
58
|
+
default: null,
|
|
59
|
+
oncolor: l.contextOncolor
|
|
60
|
+
},
|
|
61
|
+
justify: {
|
|
62
|
+
center: null,
|
|
63
|
+
spread: l.justifySpread
|
|
64
|
+
}
|
|
65
|
+
} });
|
|
66
|
+
function d({ variant: e = "primary", size: t = "md", context: o = "default", chamfer: d = t === "hero", radius: f = "none", justify: p = "center", startIcon: m, endIcon: h, shortcut: g, children: _, ...v }) {
|
|
67
|
+
return /* @__PURE__ */ c(a, {
|
|
68
|
+
"aria-keyshortcuts": g ? r(g) : void 0,
|
|
69
|
+
...v,
|
|
70
|
+
"data-imf-ui-component": "Button",
|
|
71
|
+
className: (n) => u({
|
|
72
|
+
variant: e,
|
|
73
|
+
size: t,
|
|
74
|
+
chamfer: d,
|
|
75
|
+
radius: f,
|
|
76
|
+
context: o,
|
|
77
|
+
justify: p,
|
|
78
|
+
className: i(v.className, n)
|
|
79
|
+
}),
|
|
80
|
+
children: [
|
|
81
|
+
m != null && /* @__PURE__ */ s("span", {
|
|
82
|
+
className: l.startIcon,
|
|
83
|
+
"aria-hidden": !0,
|
|
84
|
+
children: m
|
|
85
|
+
}),
|
|
86
|
+
/* @__PURE__ */ s("span", {
|
|
87
|
+
className: l.label,
|
|
88
|
+
children: _
|
|
89
|
+
}),
|
|
90
|
+
h != null && /* @__PURE__ */ s("span", {
|
|
91
|
+
className: l.endIcon,
|
|
92
|
+
"aria-hidden": !0,
|
|
93
|
+
children: h
|
|
94
|
+
}),
|
|
95
|
+
g && /* @__PURE__ */ s(n, {
|
|
96
|
+
variant: "flat",
|
|
97
|
+
className: l.shortcut,
|
|
98
|
+
"aria-hidden": !0,
|
|
99
|
+
children: g
|
|
100
|
+
})
|
|
101
|
+
]
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
//#endregion
|
|
105
|
+
//#region src/components/button/button.meta.ts
|
|
106
|
+
var f = {
|
|
107
|
+
name: "Button",
|
|
108
|
+
category: t.buttons,
|
|
109
|
+
status: "stable",
|
|
110
|
+
description: "Triggers an action such as submit, confirm, cancel, navigate, or delete. Also called a CTA or action button; variants and sizes communicate its importance.",
|
|
111
|
+
origin: "adapted",
|
|
112
|
+
internalDependencies: ["Kbd"],
|
|
113
|
+
upstream: {
|
|
114
|
+
name: "Base UI",
|
|
115
|
+
websiteLink: "https://base-ui.com/",
|
|
116
|
+
docLink: "https://base-ui.com/react/components/button",
|
|
117
|
+
llmDocLink: "https://base-ui.com/react/components/button.md"
|
|
118
|
+
}
|
|
119
|
+
}, p = {
|
|
120
|
+
root: "imf-ui-icon-button-module-root",
|
|
121
|
+
sizeHero: "imf-ui-icon-button-module-sizeHero",
|
|
122
|
+
sizeLg: "imf-ui-icon-button-module-sizeLg",
|
|
123
|
+
sizeMd: "imf-ui-icon-button-module-sizeMd",
|
|
124
|
+
sizeSm: "imf-ui-icon-button-module-sizeSm"
|
|
125
|
+
}, m = o(p.root, { variants: { size: {
|
|
126
|
+
sm: p.sizeSm,
|
|
127
|
+
md: p.sizeMd,
|
|
128
|
+
lg: p.sizeLg,
|
|
129
|
+
hero: p.sizeHero
|
|
130
|
+
} } }), h = {
|
|
131
|
+
sm: 15,
|
|
132
|
+
md: 18,
|
|
133
|
+
lg: 20,
|
|
134
|
+
hero: 24
|
|
135
|
+
}, g = {
|
|
136
|
+
sm: "md",
|
|
137
|
+
md: "lg",
|
|
138
|
+
lg: "hero",
|
|
139
|
+
hero: "hero"
|
|
140
|
+
};
|
|
141
|
+
function _({ glyph: t, label: n, iconProps: r, size: a = "md", ...o }) {
|
|
142
|
+
let c = a ?? "md", l = o.shortcut ? g[c] : c;
|
|
143
|
+
return /* @__PURE__ */ s(d, {
|
|
144
|
+
...o,
|
|
145
|
+
size: c,
|
|
146
|
+
"aria-label": n,
|
|
147
|
+
className: (e) => m({
|
|
148
|
+
size: l,
|
|
149
|
+
className: i(o.className, e)
|
|
150
|
+
}),
|
|
151
|
+
children: /* @__PURE__ */ s(e, {
|
|
152
|
+
size: h[c],
|
|
153
|
+
...r,
|
|
154
|
+
glyph: t,
|
|
155
|
+
"aria-hidden": !0
|
|
156
|
+
})
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
_.displayName = "IconButton";
|
|
160
|
+
//#endregion
|
|
161
|
+
//#region src/components/icon-button/icon-button.meta.ts
|
|
162
|
+
var v = {
|
|
163
|
+
name: "IconButton",
|
|
164
|
+
category: t.buttons,
|
|
165
|
+
status: "experimental",
|
|
166
|
+
description: "Square button that shows a single icon and no visible text, with its accessible name from `label`. Also called an icon-only or toolbar button. Use Button with `startIcon` or `endIcon` when a text label is visible.",
|
|
167
|
+
origin: "native",
|
|
168
|
+
internalDependencies: ["Button", "Icon"]
|
|
169
|
+
};
|
|
170
|
+
//#endregion
|
|
171
|
+
export { d as i, _ as n, f as r, v as t };
|
package/dist/index.d.ts
CHANGED
|
@@ -3,15 +3,20 @@ export { ChipLink, chipLinkMeta } from './components/chip-link';
|
|
|
3
3
|
export { CopyButton, copyButtonMeta } from './components/copy-button';
|
|
4
4
|
export { IconButton, iconButtonMeta } from './components/icon-button';
|
|
5
5
|
export { RichLink, richLinkMeta } from './components/rich-link';
|
|
6
|
+
export { Autocomplete, autocompleteMeta } from './components/autocomplete';
|
|
6
7
|
export { Checkbox, checkboxMeta } from './components/checkbox';
|
|
7
8
|
export { ColorSchemeToggle, colorSchemeToggleMeta } from './components/color-scheme-toggle';
|
|
9
|
+
export { Combobox, comboboxMeta } from './components/combobox';
|
|
8
10
|
export { Field, fieldMeta } from './components/field';
|
|
9
11
|
export { Fieldset, fieldsetMeta } from './components/fieldset';
|
|
12
|
+
export { FileDropZone, fileDropZoneMeta } from './components/file-drop-zone';
|
|
13
|
+
export type { FileDropZoneItem, FileDropZoneUploadItem } from './components/file-drop-zone';
|
|
10
14
|
export { Input, inputMeta } from './components/input';
|
|
11
15
|
export { NumberField, numberFieldMeta } from './components/number-field';
|
|
12
16
|
export { Select, selectMeta } from './components/select';
|
|
13
17
|
export { Slider, sliderMeta } from './components/slider';
|
|
14
18
|
export { Switch, switchMeta } from './components/switch';
|
|
19
|
+
export { Textarea, textareaMeta } from './components/textarea';
|
|
15
20
|
export { Toggle, toggleMeta } from './components/toggle';
|
|
16
21
|
export { ToggleGroup, toggleGroupMeta } from './components/toggle-group';
|
|
17
22
|
export { AppShell, appShellMeta } from './components/app-shell';
|
|
@@ -31,13 +36,16 @@ export { Chip, chipMeta } from './components/chip';
|
|
|
31
36
|
export { Code, codeMeta } from './components/code';
|
|
32
37
|
export { Collapsible, collapsibleMeta } from './components/collapsible';
|
|
33
38
|
export { Icon, iconMeta } from './components/icon';
|
|
39
|
+
export { Image, imageMeta } from './components/image';
|
|
34
40
|
export { Kbd, kbdMeta } from './components/kbd';
|
|
35
41
|
export { Logo, logoMeta } from './components/logo';
|
|
36
42
|
export { Meter, meterMeta } from './components/meter';
|
|
37
43
|
export { NavigationMenu, navigationMenuMeta } from './components/navigation-menu';
|
|
44
|
+
export { Progress, progressMeta } from './components/progress';
|
|
38
45
|
export { Skeleton, skeletonMeta } from './components/skeleton';
|
|
39
46
|
export { Spinner, spinnerMeta } from './components/spinner';
|
|
40
47
|
export { Table, tableMeta } from './components/table';
|
|
48
|
+
export { TabNav, tabNavMeta } from './components/tab-nav';
|
|
41
49
|
export { Tabs, tabsMeta } from './components/tabs';
|
|
42
50
|
export { Toast, toastMeta } from './components/toast';
|
|
43
51
|
export { Tooltip, tooltipMeta } from './components/tooltip';
|
|
@@ -50,6 +58,7 @@ export { minWidth } from './breakpoints';
|
|
|
50
58
|
export type { BreakpointName } from './breakpoints';
|
|
51
59
|
export { cva, cx } from 'class-variance-authority';
|
|
52
60
|
export { initialsFromEmail, splitEmail } from './utils/email';
|
|
61
|
+
export { initialsFromName } from './utils/initials';
|
|
53
62
|
export { withBreakHints } from './utils/break-hints';
|
|
54
63
|
export { config } from './config';
|
|
55
64
|
export type { ColorScheme, ColorSchemePreference } from './types/theme';
|