@imfusion/web-ui 0.5.1-dev.7.ga571658e → 0.6.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 +55 -33
- package/bin/install.js +428 -0
- package/bin/install.test.ts +329 -0
- package/dist/build/vite-css-module-names/index.d.ts +20 -0
- package/dist/build/vite-css-module-names.js +17 -0
- package/dist/chunk-DmhlhrBa.js +11 -0
- package/dist/code-Blo48PGr.js +136 -0
- package/dist/codegen/gen-icons.d.ts +24 -0
- package/dist/components/callout/callout.d.ts +1 -1
- package/dist/components/chip-link/chip-link.d.ts +1 -1
- package/dist/components/code/code.d.ts +10 -18
- package/dist/components/field/field.d.ts +104 -0
- package/dist/components/field/field.meta.d.ts +2 -0
- package/dist/components/field/index.d.ts +2 -0
- package/dist/components/fieldset/fieldset.d.ts +29 -0
- package/dist/components/fieldset/fieldset.meta.d.ts +2 -0
- package/dist/components/fieldset/index.d.ts +2 -0
- package/dist/components/icon/icon.d.ts +16 -0
- package/dist/components/icon/icon.meta.d.ts +2 -0
- package/dist/components/icon/index.d.ts +4 -0
- package/dist/components/icon/types.d.ts +2 -0
- package/dist/components/input/input.d.ts +3 -1
- package/dist/components/typo/typo.d.ts +2 -2
- package/dist/docgen/component-sources.d.ts +7 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/use-resize-observer.d.ts +2 -0
- package/dist/icons/catalog.gen.d.ts +8357 -0
- package/dist/icons/icon-config-provider.d.ts +8 -0
- package/dist/icons/icon-context.d.ts +4 -0
- package/dist/icons/icons.gen.d.ts +1672 -0
- package/dist/icons/index.d.ts +3 -0
- package/dist/icons-wBmF0U2x.js +78 -0
- package/dist/icons.js +2 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +1793 -12210
- package/dist/integrations/code-highlight/code-highlight.d.ts +8 -6
- package/dist/integrations/code-highlight/highlighter.d.ts +32 -3
- package/dist/integrations/code-highlight/language-patterns.d.ts +7 -0
- package/dist/integrations/code-highlight/languages/cmake.d.ts +1 -0
- package/dist/integrations/code-highlight/languages/cpp.d.ts +1 -0
- package/dist/integrations/code-highlight/languages/python.d.ts +1 -0
- package/dist/integrations/code-highlight.js +198 -59
- package/dist/integrations/image-display-options.js +70 -69
- package/dist/llms/gen-tokens.d.ts +7 -0
- package/dist/meta-CySnRuVp.js +21 -0
- package/dist/provider/web-ui-provider.d.ts +4 -1
- package/dist/style.css +1 -1
- package/dist/tabs-CMKvMF4E.js +369 -0
- package/package.json +48 -26
- package/src/docgen/doc.gen.json +381 -38
- package/src/llms/icon-catalog.gen.json +11203 -0
- package/src/llms/install-templates/AGENTS.md +34 -0
- package/src/llms/install-templates/codex-hooks.json +44 -0
- package/src/llms/install-templates/hooks/baseline-staleness.sh +17 -0
- package/src/llms/install-templates/hooks/session-start.sh +5 -0
- package/src/llms/install-templates/hooks/stop.sh +18 -0
- package/src/llms/install-templates/hooks/subagent-start.sh +5 -0
- package/src/llms/install-templates/hooks/user-prompt-submit.sh +5 -0
- package/src/llms/install-templates/settings.json +45 -0
- package/src/llms/llms.gen.txt +17 -0
- package/src/llms/skills/imf-web-ui/SKILL.md +13 -12
- package/src/llms/skills/imf-web-ui-audit/SKILL.md +119 -0
- package/src/llms/skills/imf-web-ui-components/SKILL.md +56 -3
- package/src/llms/skills/imf-web-ui-conventions/SKILL.md +57 -0
- package/src/llms/skills/imf-web-ui-conventions/templates/AUDIT_CHECKLIST.md +141 -0
- package/src/llms/skills/imf-web-ui-conventions/templates/REPORT.md +45 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/agent-tooling.md +82 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/assets.md +27 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/authentication.md +65 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/class-names.md +50 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/components.md +101 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/data.md +221 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/docs-structure.md +40 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/git.md +34 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/library-boundary.md +35 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/library-setup.md +26 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/npm-project.md +53 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/project-structure.md +44 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/react.md +109 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/styling.md +88 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/testing.md +25 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/tokens.md +7 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/tooling.md +116 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/typescript.md +73 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/validation.md +62 -0
- package/src/llms/skills/imf-web-ui-setup/SKILL.md +67 -37
- package/src/llms/skills/imf-web-ui-update/SKILL.md +157 -0
- package/src/llms/skills/imf-web-ui-ux/SKILL.md +4 -4
- package/src/llms/skills/imf-web-ui-ux/references/forms.md +2 -2
- package/src/llms/tokens.gen.json +887 -0
- package/bin/install-skill.js +0 -203
- package/dist/code-qBbqAHK-.js +0 -190
- package/dist/meta-B8C51eyL.js +0 -74
- package/dist/tabs-DqBFSqq6.js +0 -3789
- package/src/llms/skills/imf-web-ui-frontend-patterns/SKILL.md +0 -93
- package/src/llms/skills/imf-web-ui-frontend-patterns/references/code-conventions.md +0 -133
- package/src/llms/skills/imf-web-ui-frontend-patterns/references/react-patterns.md +0 -94
- package/src/llms/skills/imf-web-ui-imfusion-frontend-setup/SKILL.md +0 -201
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { Field as FieldPrimitive } from '@base-ui/react/field';
|
|
2
|
+
type UpstreamRoot = React.ComponentProps<typeof FieldPrimitive.Root>;
|
|
3
|
+
type UpstreamItem = React.ComponentProps<typeof FieldPrimitive.Item>;
|
|
4
|
+
type UpstreamLabel = React.ComponentProps<typeof FieldPrimitive.Label>;
|
|
5
|
+
type UpstreamDescription = React.ComponentProps<typeof FieldPrimitive.Description>;
|
|
6
|
+
type UpstreamControl = React.ComponentProps<typeof FieldPrimitive.Control>;
|
|
7
|
+
type UpstreamError = React.ComponentProps<typeof FieldPrimitive.Error>;
|
|
8
|
+
type UpstreamValidity = React.ComponentProps<typeof FieldPrimitive.Validity>;
|
|
9
|
+
type RootProps = Omit<React.HTMLAttributes<HTMLDivElement>, "className" | "style"> & {
|
|
10
|
+
name?: string;
|
|
11
|
+
actionsRef?: UpstreamRoot["actionsRef"];
|
|
12
|
+
dirty?: boolean;
|
|
13
|
+
touched?: boolean;
|
|
14
|
+
/** @default false */
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
invalid?: boolean;
|
|
17
|
+
validate?: UpstreamRoot["validate"];
|
|
18
|
+
/** @default "onSubmit" */
|
|
19
|
+
validationMode?: UpstreamRoot["validationMode"];
|
|
20
|
+
/** @default 0 */
|
|
21
|
+
validationDebounceTime?: number;
|
|
22
|
+
className?: UpstreamRoot["className"];
|
|
23
|
+
style?: UpstreamRoot["style"];
|
|
24
|
+
render?: UpstreamRoot["render"];
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Field.Root — groups a label, control, validation state, and supporting copy.
|
|
28
|
+
*
|
|
29
|
+
* @doc https://base-ui.com/react/components/field
|
|
30
|
+
* @llm https://base-ui.com/react/components/field.md
|
|
31
|
+
*/
|
|
32
|
+
export declare function Root({ className, ...props }: RootProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export declare namespace Root {
|
|
34
|
+
var displayName: string;
|
|
35
|
+
}
|
|
36
|
+
type ItemProps = Omit<React.HTMLAttributes<HTMLDivElement>, "className" | "style"> & {
|
|
37
|
+
/** @default false */
|
|
38
|
+
disabled?: boolean;
|
|
39
|
+
className?: UpstreamItem["className"];
|
|
40
|
+
style?: UpstreamItem["style"];
|
|
41
|
+
render?: UpstreamItem["render"];
|
|
42
|
+
};
|
|
43
|
+
/** Field.Item — groups one checkable option with its label and description. */
|
|
44
|
+
export declare function Item({ className, ...props }: ItemProps): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
export declare namespace Item {
|
|
46
|
+
var displayName: string;
|
|
47
|
+
}
|
|
48
|
+
type LabelProps = Omit<React.LabelHTMLAttributes<HTMLLabelElement>, "className" | "style"> & {
|
|
49
|
+
/** @default true */
|
|
50
|
+
nativeLabel?: boolean;
|
|
51
|
+
className?: UpstreamLabel["className"];
|
|
52
|
+
style?: UpstreamLabel["style"];
|
|
53
|
+
render?: UpstreamLabel["render"];
|
|
54
|
+
};
|
|
55
|
+
/** Field.Label — an accessible label automatically associated with the control. */
|
|
56
|
+
export declare function Label({ className, ...props }: LabelProps): import("react/jsx-runtime").JSX.Element;
|
|
57
|
+
export declare namespace Label {
|
|
58
|
+
var displayName: string;
|
|
59
|
+
}
|
|
60
|
+
type DescriptionProps = Omit<React.HTMLAttributes<HTMLParagraphElement>, "className" | "style"> & {
|
|
61
|
+
className?: UpstreamDescription["className"];
|
|
62
|
+
style?: UpstreamDescription["style"];
|
|
63
|
+
render?: UpstreamDescription["render"];
|
|
64
|
+
};
|
|
65
|
+
/** Field.Description — supporting information for a field. */
|
|
66
|
+
export declare function Description({ className, ...props }: DescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
67
|
+
export declare namespace Description {
|
|
68
|
+
var displayName: string;
|
|
69
|
+
}
|
|
70
|
+
type ControlProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "className" | "style" | "defaultValue"> & {
|
|
71
|
+
defaultValue?: UpstreamControl["defaultValue"];
|
|
72
|
+
onValueChange?: UpstreamControl["onValueChange"];
|
|
73
|
+
className?: UpstreamControl["className"];
|
|
74
|
+
style?: UpstreamControl["style"];
|
|
75
|
+
render?: UpstreamControl["render"];
|
|
76
|
+
};
|
|
77
|
+
/** Field.Control — a native input control with Field labeling and validation. */
|
|
78
|
+
export declare function Control({ className, ...props }: ControlProps): import("react/jsx-runtime").JSX.Element;
|
|
79
|
+
export declare namespace Control {
|
|
80
|
+
var displayName: string;
|
|
81
|
+
}
|
|
82
|
+
type ErrorProps = Omit<React.HTMLAttributes<HTMLDivElement>, "className" | "style"> & {
|
|
83
|
+
match?: UpstreamError["match"];
|
|
84
|
+
className?: UpstreamError["className"];
|
|
85
|
+
style?: UpstreamError["style"];
|
|
86
|
+
render?: UpstreamError["render"];
|
|
87
|
+
};
|
|
88
|
+
/** Field.Error — an inline validation message shown when its match condition fails. */
|
|
89
|
+
export declare function Error({ className, ...props }: ErrorProps): import("react/jsx-runtime").JSX.Element;
|
|
90
|
+
export declare namespace Error {
|
|
91
|
+
var displayName: string;
|
|
92
|
+
}
|
|
93
|
+
type ValidityProps = {
|
|
94
|
+
children: UpstreamValidity["children"];
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* Field.Validity — renderless access to the field validity data for custom messages.
|
|
98
|
+
* Its function child owns the rendered element and therefore its identity and styling.
|
|
99
|
+
*/
|
|
100
|
+
export declare function Validity({ children }: ValidityProps): import("react/jsx-runtime").JSX.Element;
|
|
101
|
+
export declare namespace Validity {
|
|
102
|
+
var displayName: string;
|
|
103
|
+
}
|
|
104
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Fieldset as FieldsetPrimitive } from '@base-ui/react/fieldset';
|
|
2
|
+
type UpstreamRoot = React.ComponentProps<typeof FieldsetPrimitive.Root>;
|
|
3
|
+
type UpstreamLegend = React.ComponentProps<typeof FieldsetPrimitive.Legend>;
|
|
4
|
+
type RootProps = Omit<React.FieldsetHTMLAttributes<HTMLFieldSetElement>, "className" | "style"> & {
|
|
5
|
+
className?: UpstreamRoot["className"];
|
|
6
|
+
style?: UpstreamRoot["style"];
|
|
7
|
+
render?: UpstreamRoot["render"];
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Fieldset.Root — semantic grouping for related form controls and a shared legend.
|
|
11
|
+
*
|
|
12
|
+
* @doc https://base-ui.com/react/components/fieldset
|
|
13
|
+
* @llm https://base-ui.com/react/components/fieldset.md
|
|
14
|
+
*/
|
|
15
|
+
export declare function Root({ className, ...props }: RootProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare namespace Root {
|
|
17
|
+
var displayName: string;
|
|
18
|
+
}
|
|
19
|
+
type LegendProps = Omit<React.HTMLAttributes<HTMLDivElement>, "className" | "style"> & {
|
|
20
|
+
className?: UpstreamLegend["className"];
|
|
21
|
+
style?: UpstreamLegend["style"];
|
|
22
|
+
render?: UpstreamLegend["render"];
|
|
23
|
+
};
|
|
24
|
+
/** Fieldset.Legend — the accessible label for its related controls. */
|
|
25
|
+
export declare function Legend({ className, ...props }: LegendProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare namespace Legend {
|
|
27
|
+
var displayName: string;
|
|
28
|
+
}
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { IconComponent } from './types';
|
|
3
|
+
export declare const ICON_VARIANTS: readonly ["inherit", "main", "support", "minor", "brand", "primary", "positive", "negative", "warning", "info", "oncolor", "accent-1", "accent-2", "accent-3"];
|
|
4
|
+
export type IconVariant = (typeof ICON_VARIANTS)[number];
|
|
5
|
+
declare const icon: (props?: ({
|
|
6
|
+
variant?: "primary" | "positive" | "negative" | "main" | "inherit" | "support" | "minor" | "brand" | "warning" | "info" | "oncolor" | "accent-1" | "accent-2" | "accent-3" | null | undefined;
|
|
7
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
+
type Props = Omit<React.ComponentProps<IconComponent>, "color"> & VariantProps<typeof icon> & {
|
|
9
|
+
/** Icon component imported from `@imfusion/web-ui/icons`. */
|
|
10
|
+
glyph: IconComponent;
|
|
11
|
+
/** Sets both SVG dimensions unless `width` or `height` is provided. */
|
|
12
|
+
size?: React.SVGProps<SVGSVGElement>["width"];
|
|
13
|
+
};
|
|
14
|
+
/** Icon — renders an icon component with a semantic Web UI foreground color. */
|
|
15
|
+
export declare function Icon({ glyph: Glyph, variant, size, width, height, className, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -9,6 +9,8 @@ type Props = Omit<React.InputHTMLAttributes<HTMLInputElement>, "className" | "st
|
|
|
9
9
|
value?: UpstreamInput["value"];
|
|
10
10
|
defaultValue?: UpstreamInput["defaultValue"];
|
|
11
11
|
onValueChange?: UpstreamInput["onValueChange"];
|
|
12
|
+
/** Called when the search input's clear button is pressed. */
|
|
13
|
+
onClear?: () => void;
|
|
12
14
|
className?: UpstreamInput["className"];
|
|
13
15
|
style?: UpstreamInput["style"];
|
|
14
16
|
render?: UpstreamInput["render"];
|
|
@@ -21,5 +23,5 @@ type Props = Omit<React.InputHTMLAttributes<HTMLInputElement>, "className" | "st
|
|
|
21
23
|
* @see https://base-ui.com/react/components/input
|
|
22
24
|
* @llm https://base-ui.com/react/components/input.md
|
|
23
25
|
*/
|
|
24
|
-
export declare function Input({ variant, size, className, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare function Input({ variant, size, type, value, defaultValue, onValueChange, onClear, disabled, className, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
25
27
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import { Code } from '../code';
|
|
3
3
|
declare const typo: (props?: ({
|
|
4
|
-
variant?: "primary" | "positive" | "negative" | "main" | "support" | "minor" | "brand" | "warning" | "info" | "accent-1" | "accent-2" | "accent-3" |
|
|
4
|
+
variant?: "primary" | "positive" | "negative" | "main" | "support" | "minor" | "brand" | "warning" | "info" | "oncolor" | "accent-1" | "accent-2" | "accent-3" | null | undefined;
|
|
5
5
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
6
|
declare const spacingVariants: (props?: ({
|
|
7
7
|
spacing?: "none" | "default" | null | undefined;
|
|
@@ -82,7 +82,7 @@ export declare function Highlight({ variant, className, ...props }: InlineProps)
|
|
|
82
82
|
export declare namespace Highlight {
|
|
83
83
|
var displayName: string;
|
|
84
84
|
}
|
|
85
|
-
/** Typo.Link — inline anchor. Auto-appends a directional icon (
|
|
85
|
+
/** Typo.Link — inline anchor. Auto-appends a local Web UI directional icon (`ArrowUpRight` for external, `ArrowRight` for internal), mirroring ChipLink's affordance for prose links. */
|
|
86
86
|
export declare function Link({ variant, kind, className, ...props }: LinkProps): import("react/jsx-runtime").JSX.Element;
|
|
87
87
|
export declare namespace Link {
|
|
88
88
|
var displayName: string;
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -3,3 +3,4 @@ export type { UseClipboardOptions } from './use-clipboard';
|
|
|
3
3
|
export { useColorScheme } from './use-color-scheme';
|
|
4
4
|
export { useMediaQuery } from './use-media-query';
|
|
5
5
|
export type { UseMediaQueryOptions } from './use-media-query';
|
|
6
|
+
export { useResizeObserver } from './use-resize-observer';
|