@iquji-web/web-component 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +135 -2
- package/dist/calendar.d.ts +27 -0
- package/dist/color-picker.d.ts +24 -0
- package/dist/confirmation.d.ts +12 -0
- package/dist/data-table.d.ts +16 -0
- package/dist/date-picker.d.ts +37 -0
- package/dist/desktop-account.d.ts +45 -0
- package/dist/desktop-rail.d.ts +21 -0
- package/dist/desktop-shell.d.ts +9 -0
- package/dist/desktop-tabs.d.ts +24 -0
- package/dist/desktop-titlebar.d.ts +17 -0
- package/dist/drawer.d.ts +24 -0
- package/dist/emoji-picker.d.ts +21 -0
- package/dist/feedback.d.ts +27 -0
- package/dist/floating.d.ts +65 -0
- package/dist/form-dialog-resize.d.ts +24 -0
- package/dist/form-dialog.d.ts +9 -0
- package/dist/form-steps.d.ts +18 -0
- package/dist/forms.d.ts +77 -0
- package/dist/index.d.ts +139 -0
- package/dist/index.js +4712 -0
- package/dist/layout.d.ts +15 -0
- package/dist/multi-select.d.ts +22 -0
- package/dist/navigation.d.ts +17 -0
- package/dist/notification.d.ts +27 -0
- package/dist/overlay-focus.d.ts +8 -0
- package/dist/overlay-layer.d.ts +32 -0
- package/dist/overlay-presence.d.ts +6 -0
- package/dist/overlay-scope.d.ts +8 -0
- package/dist/overlays.d.ts +22 -0
- package/dist/pagination.d.ts +13 -0
- package/dist/progress-bar.d.ts +12 -0
- package/dist/scroll-area.d.ts +10 -0
- package/dist/search-dialog.d.ts +26 -0
- package/dist/settings-layout.d.ts +24 -0
- package/dist/settings-nav.d.ts +31 -0
- package/dist/settings-rows.d.ts +53 -0
- package/dist/styles.css +4131 -0
- package/dist/timeline.d.ts +17 -0
- package/dist/tooltip.d.ts +12 -0
- package/dist/utils.d.ts +1 -0
- package/dist/workbench.d.ts +32 -0
- package/package.json +43 -4
package/dist/forms.d.ts
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { type ButtonHTMLAttributes, type InputHTMLAttributes, type Key, type ReactElement, type ReactNode, type Ref, type TextareaHTMLAttributes } from "react";
|
|
2
|
+
type FieldControlProps = {
|
|
3
|
+
id?: string;
|
|
4
|
+
"aria-describedby"?: string;
|
|
5
|
+
"aria-invalid"?: boolean | "false" | "true";
|
|
6
|
+
required?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type IqujiFieldProps = {
|
|
9
|
+
children: ReactElement<FieldControlProps>;
|
|
10
|
+
label: ReactNode;
|
|
11
|
+
description?: ReactNode;
|
|
12
|
+
error?: ReactNode;
|
|
13
|
+
id?: string;
|
|
14
|
+
required?: boolean;
|
|
15
|
+
className?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare function IqujiField({ children, className, description, error, id, label, required, }: IqujiFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export type IqujiInputProps = InputHTMLAttributes<HTMLInputElement>;
|
|
19
|
+
export declare const IqujiInput: import("react").ForwardRefExoticComponent<IqujiInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
20
|
+
export type IqujiTextareaProps = TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
21
|
+
export declare const IqujiTextarea: import("react").ForwardRefExoticComponent<IqujiTextareaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
22
|
+
export type IqujiSelectOption<Value> = {
|
|
23
|
+
label: ReactNode;
|
|
24
|
+
value: Value;
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
key?: Key;
|
|
27
|
+
};
|
|
28
|
+
export type IqujiSelectOptionGroup<Value> = {
|
|
29
|
+
key: Key;
|
|
30
|
+
label: ReactNode;
|
|
31
|
+
options: readonly IqujiSelectOption<Value>[];
|
|
32
|
+
};
|
|
33
|
+
/** Select 触发器的展示方式。icon-only 仅显示传入的图标,选项文字仍保留在弹层中。 */
|
|
34
|
+
export type IqujiSelectTriggerPresentation = "value" | "icon-only";
|
|
35
|
+
export type IqujiSelectProps<Value> = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" | "defaultValue" | "disabled" | "name" | "onChange" | "value"> & {
|
|
36
|
+
options: readonly IqujiSelectOption<Value>[];
|
|
37
|
+
groups?: readonly IqujiSelectOptionGroup<Value>[];
|
|
38
|
+
value?: Value | null;
|
|
39
|
+
defaultValue?: Value | null;
|
|
40
|
+
onValueChange?: (value: Value | null) => void;
|
|
41
|
+
placeholder?: ReactNode;
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
invalid?: boolean;
|
|
44
|
+
required?: boolean;
|
|
45
|
+
compact?: boolean;
|
|
46
|
+
iconStart?: ReactNode;
|
|
47
|
+
triggerPresentation?: IqujiSelectTriggerPresentation;
|
|
48
|
+
name?: string;
|
|
49
|
+
autoComplete?: string;
|
|
50
|
+
ref?: Ref<HTMLButtonElement>;
|
|
51
|
+
};
|
|
52
|
+
export declare function IqujiSelect<Value>({ "aria-invalid": ariaInvalid, autoComplete, className, compact, defaultValue, disabled, groups, iconStart, id, invalid, name, onValueChange, options, placeholder, ref, required, triggerPresentation, value, ...triggerProps }: IqujiSelectProps<Value>): import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
type ChoiceProps = Omit<InputHTMLAttributes<HTMLInputElement>, "children" | "type"> & {
|
|
54
|
+
label: ReactNode;
|
|
55
|
+
description?: ReactNode;
|
|
56
|
+
};
|
|
57
|
+
export type IqujiCheckboxProps = ChoiceProps;
|
|
58
|
+
export declare function IqujiCheckbox(props: IqujiCheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
export type IqujiRadioProps = ChoiceProps;
|
|
60
|
+
export declare function IqujiRadio(props: IqujiRadioProps): import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
export type IqujiSwitchProps = ChoiceProps;
|
|
62
|
+
export declare function IqujiSwitch({ className, ...props }: IqujiSwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
63
|
+
export type IqujiSegmentedOption<Value extends string> = {
|
|
64
|
+
label: ReactNode;
|
|
65
|
+
value: Value;
|
|
66
|
+
disabled?: boolean;
|
|
67
|
+
};
|
|
68
|
+
export type IqujiSegmentedControlProps<Value extends string> = {
|
|
69
|
+
label: string;
|
|
70
|
+
options: readonly IqujiSegmentedOption<Value>[];
|
|
71
|
+
value: Value;
|
|
72
|
+
onChange: (value: Value) => void;
|
|
73
|
+
className?: string;
|
|
74
|
+
disabled?: boolean;
|
|
75
|
+
};
|
|
76
|
+
export declare function IqujiSegmentedControl<Value extends string>({ className, disabled, label, onChange, options, value, }: IqujiSegmentedControlProps<Value>): import("react/jsx-runtime").JSX.Element;
|
|
77
|
+
export {};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import type { AnchorHTMLAttributes, ButtonHTMLAttributes, HTMLAttributes, MouseEventHandler, ReactNode } from "react";
|
|
2
|
+
export type AppNavigationItem = {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
href?: string;
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
active?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
onNavigate?: MouseEventHandler<HTMLAnchorElement>;
|
|
10
|
+
onIntent?: () => void;
|
|
11
|
+
};
|
|
12
|
+
export type AppShellProps = {
|
|
13
|
+
brand: ReactNode;
|
|
14
|
+
navigationLabel: string;
|
|
15
|
+
navigation: readonly AppNavigationItem[];
|
|
16
|
+
navigationGroups?: readonly {
|
|
17
|
+
id: string;
|
|
18
|
+
label: string;
|
|
19
|
+
items: readonly AppNavigationItem[];
|
|
20
|
+
}[];
|
|
21
|
+
header: ReactNode;
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
mainId?: string;
|
|
24
|
+
skipLinkLabel?: string;
|
|
25
|
+
};
|
|
26
|
+
export declare function AppShell({ brand, navigationLabel, navigation, navigationGroups, header, children, mainId, skipLinkLabel, }: AppShellProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export type IconButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "aria-label" | "children" | "title"> & {
|
|
28
|
+
label: string;
|
|
29
|
+
icon: ReactNode;
|
|
30
|
+
compact?: boolean;
|
|
31
|
+
loading?: boolean;
|
|
32
|
+
variant?: "secondary" | "ghost" | "primary" | "danger";
|
|
33
|
+
};
|
|
34
|
+
export declare const IconButton: import("react").ForwardRefExoticComponent<Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" | "aria-label" | "title"> & {
|
|
35
|
+
label: string;
|
|
36
|
+
icon: ReactNode;
|
|
37
|
+
compact?: boolean;
|
|
38
|
+
loading?: boolean;
|
|
39
|
+
variant?: "secondary" | "ghost" | "primary" | "danger";
|
|
40
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
41
|
+
export type StatusBadgeProps = HTMLAttributes<HTMLSpanElement> & {
|
|
42
|
+
tone?: "neutral" | "positive" | "warning" | "critical";
|
|
43
|
+
};
|
|
44
|
+
export declare function StatusBadge({ tone, className, ...props }: StatusBadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
export type IqujiButtonVariant = "primary" | "secondary" | "ghost" | "text" | "danger" | "inverse";
|
|
46
|
+
export type IqujiButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "className"> & {
|
|
47
|
+
variant?: IqujiButtonVariant;
|
|
48
|
+
compact?: boolean;
|
|
49
|
+
block?: boolean;
|
|
50
|
+
className?: string;
|
|
51
|
+
iconStart?: ReactNode;
|
|
52
|
+
iconEnd?: ReactNode;
|
|
53
|
+
loading?: boolean;
|
|
54
|
+
allowLabelWrap?: boolean;
|
|
55
|
+
};
|
|
56
|
+
export declare const IqujiButton: import("react").ForwardRefExoticComponent<Omit<ButtonHTMLAttributes<HTMLButtonElement>, "className"> & {
|
|
57
|
+
variant?: IqujiButtonVariant;
|
|
58
|
+
compact?: boolean;
|
|
59
|
+
block?: boolean;
|
|
60
|
+
className?: string;
|
|
61
|
+
iconStart?: ReactNode;
|
|
62
|
+
iconEnd?: ReactNode;
|
|
63
|
+
loading?: boolean;
|
|
64
|
+
allowLabelWrap?: boolean;
|
|
65
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
66
|
+
export type IqujiButtonLinkProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "className"> & {
|
|
67
|
+
disabled?: boolean;
|
|
68
|
+
variant?: IqujiButtonVariant;
|
|
69
|
+
compact?: boolean;
|
|
70
|
+
block?: boolean;
|
|
71
|
+
className?: string;
|
|
72
|
+
iconStart?: ReactNode;
|
|
73
|
+
iconEnd?: ReactNode;
|
|
74
|
+
loading?: boolean;
|
|
75
|
+
allowLabelWrap?: boolean;
|
|
76
|
+
};
|
|
77
|
+
export declare function IqujiButtonLink({ "aria-disabled": ariaDisabled, allowLabelWrap, block, children, className, compact, disabled, href, iconEnd, iconStart, loading, onClick, tabIndex, variant, ...anchorProps }: IqujiButtonLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
78
|
+
export type IqujiPanelProps = HTMLAttributes<HTMLElement> & {
|
|
79
|
+
header?: ReactNode;
|
|
80
|
+
className?: string;
|
|
81
|
+
};
|
|
82
|
+
export declare function IqujiPanel({ className, header, children, ...sectionProps }: IqujiPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
83
|
+
export type IqujiPageHeadingProps = {
|
|
84
|
+
kicker?: string;
|
|
85
|
+
title: string;
|
|
86
|
+
titleId?: string;
|
|
87
|
+
summary?: string;
|
|
88
|
+
aside?: ReactNode;
|
|
89
|
+
className?: string;
|
|
90
|
+
};
|
|
91
|
+
export declare function IqujiPageHeading({ aside, className, kicker, summary, title, titleId, }: IqujiPageHeadingProps): import("react/jsx-runtime").JSX.Element;
|
|
92
|
+
export type IqujiEmptyStateProps = HTMLAttributes<HTMLElement> & {
|
|
93
|
+
icon?: ReactNode;
|
|
94
|
+
title?: string;
|
|
95
|
+
titleId?: string;
|
|
96
|
+
body?: string;
|
|
97
|
+
action?: ReactNode;
|
|
98
|
+
className?: string;
|
|
99
|
+
};
|
|
100
|
+
export declare function IqujiEmptyState({ action, body, className, icon, title, titleId, children, ...sectionProps }: IqujiEmptyStateProps): import("react/jsx-runtime").JSX.Element;
|
|
101
|
+
export type IqujiLoadingStateProps = HTMLAttributes<HTMLDivElement> & {
|
|
102
|
+
label: string;
|
|
103
|
+
className?: string;
|
|
104
|
+
};
|
|
105
|
+
export declare function IqujiLoadingState({ className, label, ...divProps }: IqujiLoadingStateProps): import("react/jsx-runtime").JSX.Element;
|
|
106
|
+
export * from "./calendar.js";
|
|
107
|
+
export * from "./color-picker.js";
|
|
108
|
+
export * from "./confirmation.js";
|
|
109
|
+
export * from "./data-table.js";
|
|
110
|
+
export * from "./date-picker.js";
|
|
111
|
+
export * from "./desktop-account.js";
|
|
112
|
+
export * from "./desktop-rail.js";
|
|
113
|
+
export * from "./desktop-shell.js";
|
|
114
|
+
export * from "./desktop-tabs.js";
|
|
115
|
+
export * from "./desktop-titlebar.js";
|
|
116
|
+
export * from "./drawer.js";
|
|
117
|
+
export * from "./feedback.js";
|
|
118
|
+
export * from "./floating.js";
|
|
119
|
+
export * from "./form-dialog.js";
|
|
120
|
+
export * from "./form-steps.js";
|
|
121
|
+
export * from "./forms.js";
|
|
122
|
+
export * from "./layout.js";
|
|
123
|
+
export * from "./multi-select.js";
|
|
124
|
+
export * from "./navigation.js";
|
|
125
|
+
export * from "./notification.js";
|
|
126
|
+
export { IqujiOverlayProvider } from "./overlay-layer.js";
|
|
127
|
+
export * from "./overlay-scope.js";
|
|
128
|
+
export * from "./overlays.js";
|
|
129
|
+
export * from "./pagination.js";
|
|
130
|
+
export * from "./progress-bar.js";
|
|
131
|
+
export * from "./scroll-area.js";
|
|
132
|
+
export * from "./search-dialog.js";
|
|
133
|
+
export * from "./settings-layout.js";
|
|
134
|
+
export * from "./settings-nav.js";
|
|
135
|
+
export * from "./settings-rows.js";
|
|
136
|
+
export * from "./timeline.js";
|
|
137
|
+
export * from "./tooltip.js";
|
|
138
|
+
export * from "./workbench.js";
|
|
139
|
+
export * from "./emoji-picker.js";
|