aeico-components 0.1.5 → 0.1.6
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 +0 -0
- package/dist/chunks/action-button.cjs +296 -0
- package/dist/chunks/action-button.cjs.map +1 -0
- package/dist/chunks/action-button.js +297 -0
- package/dist/chunks/action-button.js.map +1 -0
- package/dist/chunks/alert.cjs +4 -4
- package/dist/chunks/alert.cjs.map +1 -1
- package/dist/chunks/alert.js +5 -5
- package/dist/chunks/alert.js.map +1 -1
- package/dist/chunks/badge.cjs +1 -1
- package/dist/chunks/badge.cjs.map +1 -1
- package/dist/chunks/badge.js +2 -2
- package/dist/chunks/badge.js.map +1 -1
- package/dist/chunks/breadcrumb-item.cjs +2 -2
- package/dist/chunks/breadcrumb-item.cjs.map +1 -1
- package/dist/chunks/breadcrumb-item.js +3 -3
- package/dist/chunks/breadcrumb-item.js.map +1 -1
- package/dist/chunks/button-group.cjs +1 -1
- package/dist/chunks/button-group.cjs.map +1 -1
- package/dist/chunks/button-group.js +2 -2
- package/dist/chunks/button-group.js.map +1 -1
- package/dist/chunks/button.cjs +1 -1
- package/dist/chunks/button.cjs.map +1 -1
- package/dist/chunks/button.js +2 -2
- package/dist/chunks/button.js.map +1 -1
- package/dist/chunks/card.cjs +1 -1
- package/dist/chunks/card.cjs.map +1 -1
- package/dist/chunks/card.js +2 -2
- package/dist/chunks/card.js.map +1 -1
- package/dist/chunks/checkbox.cjs +18 -5
- package/dist/chunks/checkbox.cjs.map +1 -1
- package/dist/chunks/checkbox.js +18 -5
- package/dist/chunks/checkbox.js.map +1 -1
- package/dist/chunks/copy-button.cjs +168 -0
- package/dist/chunks/copy-button.cjs.map +1 -0
- package/dist/chunks/copy-button.js +169 -0
- package/dist/chunks/copy-button.js.map +1 -0
- package/dist/chunks/detail.cjs +7 -4
- package/dist/chunks/detail.cjs.map +1 -1
- package/dist/chunks/detail.js +8 -5
- package/dist/chunks/detail.js.map +1 -1
- package/dist/chunks/dialog.cjs +1 -1
- package/dist/chunks/dialog.cjs.map +1 -1
- package/dist/chunks/dialog.js +2 -2
- package/dist/chunks/dialog.js.map +1 -1
- package/dist/chunks/divider.cjs +1 -1
- package/dist/chunks/divider.cjs.map +1 -1
- package/dist/chunks/divider.js +2 -2
- package/dist/chunks/divider.js.map +1 -1
- package/dist/chunks/drawer.cjs +180 -0
- package/dist/chunks/drawer.cjs.map +1 -0
- package/dist/chunks/drawer.js +181 -0
- package/dist/chunks/drawer.js.map +1 -0
- package/dist/chunks/dropdown-button.cjs +2 -2
- package/dist/chunks/dropdown-button.cjs.map +1 -1
- package/dist/chunks/dropdown-button.js +3 -3
- package/dist/chunks/dropdown-button.js.map +1 -1
- package/dist/chunks/icon.cjs +31 -1
- package/dist/chunks/icon.cjs.map +1 -1
- package/dist/chunks/icon.js +32 -2
- package/dist/chunks/icon.js.map +1 -1
- package/dist/chunks/menu.cjs +396 -0
- package/dist/chunks/menu.cjs.map +1 -0
- package/dist/chunks/menu.js +397 -0
- package/dist/chunks/menu.js.map +1 -0
- package/dist/chunks/navbar.cjs +1 -1
- package/dist/chunks/navbar.cjs.map +1 -1
- package/dist/chunks/navbar.js +2 -2
- package/dist/chunks/navbar.js.map +1 -1
- package/dist/chunks/pagination.cjs +475 -0
- package/dist/chunks/pagination.cjs.map +1 -0
- package/dist/chunks/pagination.js +476 -0
- package/dist/chunks/pagination.js.map +1 -0
- package/dist/chunks/progress-bar.cjs +101 -0
- package/dist/chunks/progress-bar.cjs.map +1 -0
- package/dist/chunks/progress-bar.js +102 -0
- package/dist/chunks/progress-bar.js.map +1 -0
- package/dist/chunks/radio.cjs +11 -7
- package/dist/chunks/radio.cjs.map +1 -1
- package/dist/chunks/radio.js +11 -7
- package/dist/chunks/radio.js.map +1 -1
- package/dist/chunks/select.cjs +97 -66
- package/dist/chunks/select.cjs.map +1 -1
- package/dist/chunks/select.js +97 -66
- package/dist/chunks/select.js.map +1 -1
- package/dist/chunks/slider.cjs +9 -46
- package/dist/chunks/slider.cjs.map +1 -1
- package/dist/chunks/slider.js +9 -46
- package/dist/chunks/slider.js.map +1 -1
- package/dist/chunks/spinner.cjs +102 -0
- package/dist/chunks/spinner.cjs.map +1 -0
- package/dist/chunks/spinner.js +103 -0
- package/dist/chunks/spinner.js.map +1 -0
- package/dist/chunks/switch.cjs +110 -16
- package/dist/chunks/switch.cjs.map +1 -1
- package/dist/chunks/switch.js +111 -17
- package/dist/chunks/switch.js.map +1 -1
- package/dist/chunks/tab-panel.cjs +3 -3
- package/dist/chunks/tab-panel.cjs.map +1 -1
- package/dist/chunks/tab-panel.js +4 -4
- package/dist/chunks/tab-panel.js.map +1 -1
- package/dist/chunks/tag.cjs +1 -1
- package/dist/chunks/tag.cjs.map +1 -1
- package/dist/chunks/tag.js +2 -2
- package/dist/chunks/tag.js.map +1 -1
- package/dist/chunks/text-input.cjs +11 -16
- package/dist/chunks/text-input.cjs.map +1 -1
- package/dist/chunks/text-input.js +11 -16
- package/dist/chunks/text-input.js.map +1 -1
- package/dist/chunks/textarea.cjs +137 -0
- package/dist/chunks/textarea.cjs.map +1 -0
- package/dist/chunks/textarea.js +138 -0
- package/dist/chunks/textarea.js.map +1 -0
- package/dist/chunks/tooltip.cjs +293 -0
- package/dist/chunks/tooltip.cjs.map +1 -0
- package/dist/chunks/tooltip.js +294 -0
- package/dist/chunks/tooltip.js.map +1 -0
- package/dist/chunks/tree.cjs +468 -0
- package/dist/chunks/tree.cjs.map +1 -0
- package/dist/chunks/tree.js +469 -0
- package/dist/chunks/tree.js.map +1 -0
- package/dist/chunks/variables.cjs +2 -2
- package/dist/chunks/variables.js +2 -2
- package/dist/copy-button.cjs +6 -0
- package/dist/copy-button.cjs.map +1 -0
- package/dist/copy-button.js +6 -0
- package/dist/copy-button.js.map +1 -0
- package/dist/drawer.cjs +6 -0
- package/dist/drawer.cjs.map +1 -0
- package/dist/drawer.js +6 -0
- package/dist/drawer.js.map +1 -0
- package/dist/index.cjs +175 -88
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +186 -99
- package/dist/index.js.map +1 -1
- package/dist/menu.cjs +6 -0
- package/dist/menu.cjs.map +1 -0
- package/dist/menu.js +6 -0
- package/dist/menu.js.map +1 -0
- package/dist/pagination.cjs +6 -0
- package/dist/pagination.cjs.map +1 -0
- package/dist/pagination.js +6 -0
- package/dist/pagination.js.map +1 -0
- package/dist/progress-bar.cjs +6 -0
- package/dist/progress-bar.cjs.map +1 -0
- package/dist/progress-bar.js +6 -0
- package/dist/progress-bar.js.map +1 -0
- package/dist/select.cjs +1 -1
- package/dist/select.cjs.map +1 -1
- package/dist/select.js +2 -2
- package/dist/select.js.map +1 -1
- package/dist/spinner.cjs +6 -0
- package/dist/spinner.cjs.map +1 -0
- package/dist/spinner.js +6 -0
- package/dist/spinner.js.map +1 -0
- package/dist/textarea.cjs +5 -0
- package/dist/textarea.cjs.map +1 -0
- package/dist/textarea.js +5 -0
- package/dist/textarea.js.map +1 -0
- package/dist/tooltip.cjs +6 -0
- package/dist/tooltip.cjs.map +1 -0
- package/dist/tooltip.js +6 -0
- package/dist/tooltip.js.map +1 -0
- package/dist/tree.cjs +6 -0
- package/dist/tree.cjs.map +1 -0
- package/dist/tree.js +6 -0
- package/dist/tree.js.map +1 -0
- package/dist/types/aeico-field.d.ts +52 -0
- package/dist/types/alert/alert.d.ts +1 -0
- package/dist/types/copy-button/copy-button.d.ts +32 -0
- package/dist/types/copy-button/defines.d.ts +1 -0
- package/dist/types/copy-button/index.d.ts +3 -0
- package/dist/types/detail/defines.d.ts +1 -0
- package/dist/types/detail/detail.d.ts +3 -1
- package/dist/types/detail/index.d.ts +1 -1
- package/dist/types/detail-group/detail-group.d.ts +39 -0
- package/dist/types/detail-group/index.d.ts +2 -0
- package/dist/types/drawer/defines.d.ts +1 -0
- package/dist/types/drawer/drawer.d.ts +31 -0
- package/dist/types/drawer/index.d.ts +3 -0
- package/dist/types/icon/built-in-icons.d.ts +1 -0
- package/dist/types/icon/icon.d.ts +1 -0
- package/dist/types/icon/registry.d.ts +8 -0
- package/dist/types/index.d.ts +17 -0
- package/dist/types/menu/defines.d.ts +15 -0
- package/dist/types/menu/index.d.ts +5 -0
- package/dist/types/menu/menu-item.d.ts +63 -0
- package/dist/types/menu/menu.d.ts +34 -0
- package/dist/types/number-input/index.d.ts +2 -0
- package/dist/types/number-input/number-input.d.ts +35 -0
- package/dist/types/pagination/defines.d.ts +2 -0
- package/dist/types/pagination/index.d.ts +3 -0
- package/dist/types/pagination/pagination.d.ts +77 -0
- package/dist/types/select/select.d.ts +2 -2
- package/dist/types/spinner/defines.d.ts +3 -0
- package/dist/types/spinner/index.d.ts +3 -0
- package/dist/types/spinner/spinner.d.ts +35 -0
- package/dist/types/switch/defines.d.ts +1 -0
- package/dist/types/switch/switch.d.ts +8 -4
- package/dist/types/text-input/text-input.d.ts +0 -4
- package/dist/types/textarea/index.d.ts +1 -0
- package/dist/types/textarea/textarea.d.ts +26 -0
- package/dist/types/tooltip/defines.d.ts +2 -0
- package/dist/types/tooltip/index.d.ts +4 -0
- package/dist/types/tooltip/tooltip.d.ts +48 -0
- package/dist/types/tree/defines.d.ts +23 -0
- package/dist/types/tree/index.d.ts +5 -0
- package/dist/types/tree/tree-item.d.ts +54 -0
- package/dist/types/tree/tree.d.ts +64 -0
- package/package.json +5 -5
- package/src/aeico-field.ts +142 -7
- package/src/alert/alert.ts +3 -2
- package/src/checkbox/checkbox.ts +17 -2
- package/src/copy-button/copy-button.ts +146 -0
- package/src/copy-button/defines.ts +5 -0
- package/src/copy-button/index.ts +3 -0
- package/src/detail/defines.ts +1 -0
- package/src/detail/detail.ts +5 -1
- package/src/detail/index.ts +1 -1
- package/src/detail-group/detail-group.ts +104 -0
- package/src/detail-group/index.ts +2 -0
- package/src/drawer/defines.ts +1 -0
- package/src/drawer/drawer.ts +157 -0
- package/src/drawer/index.ts +3 -0
- package/src/icon/built-in-icons.ts +21 -0
- package/src/icon/icon.ts +1 -0
- package/src/icon/registry.ts +22 -0
- package/src/index.ts +30 -0
- package/src/menu/defines.ts +17 -0
- package/src/menu/index.ts +5 -0
- package/src/menu/menu-item.ts +315 -0
- package/src/menu/menu.ts +81 -0
- package/src/number-input/index.ts +2 -0
- package/src/number-input/number-input.ts +137 -0
- package/src/pagination/defines.ts +2 -0
- package/src/pagination/index.ts +3 -0
- package/src/pagination/pagination.ts +310 -0
- package/src/radio-group/radio-group.ts +11 -4
- package/src/select/select.ts +111 -70
- package/src/slider/slider.ts +9 -2
- package/src/spinner/defines.ts +12 -0
- package/src/spinner/index.ts +3 -0
- package/src/spinner/spinner.ts +81 -0
- package/src/styles/components/action-button.css +37 -0
- package/src/styles/components/checkbox.css +4 -26
- package/src/styles/components/copy-button.css +119 -0
- package/src/styles/components/detail-group.css +10 -0
- package/src/styles/components/detail.css +10 -1
- package/src/styles/components/drawer.css +161 -0
- package/src/styles/components/field-label.css +120 -0
- package/src/styles/components/menu-item.css +168 -0
- package/src/styles/components/menu.css +17 -0
- package/src/styles/components/number-input.css +167 -0
- package/src/styles/components/pagination.css +205 -0
- package/src/styles/components/radio-group.css +0 -23
- package/src/styles/components/select.css +12 -39
- package/src/styles/components/slider.css +0 -42
- package/src/styles/components/spinner.css +80 -0
- package/src/styles/components/switch.css +68 -19
- package/src/styles/components/tab-panel.css +1 -1
- package/src/styles/components/tabs.css +1 -0
- package/src/styles/components/text-input.css +7 -45
- package/src/styles/components/textarea.css +75 -0
- package/src/styles/components/tooltip.css +103 -0
- package/src/styles/components/tree-item.css +152 -0
- package/src/styles/components/tree.css +10 -0
- package/src/styles/layout.css +457 -25
- package/src/switch/defines.ts +1 -0
- package/src/switch/switch.ts +61 -12
- package/src/text-input/text-input.ts +10 -15
- package/src/textarea/index.ts +1 -0
- package/src/textarea/textarea.ts +107 -0
- package/src/tooltip/defines.ts +11 -0
- package/src/tooltip/index.ts +4 -0
- package/src/tooltip/tooltip.ts +183 -0
- package/src/tree/defines.ts +26 -0
- package/src/tree/index.ts +5 -0
- package/src/tree/tree-item.ts +258 -0
- package/src/tree/tree.ts +237 -0
- package/dist/chunks/aeico-field.cjs +0 -179
- package/dist/chunks/aeico-field.cjs.map +0 -1
- package/dist/chunks/aeico-field.js +0 -180
- package/dist/chunks/aeico-field.js.map +0 -1
|
@@ -2,6 +2,7 @@ import type { InferProps, Props, Watchers } from 'aeico';
|
|
|
2
2
|
import AeicoComponent from './aeico-component';
|
|
3
3
|
export type FieldAction = 'clear' | 'reset' | 'change';
|
|
4
4
|
export type FieldElement = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;
|
|
5
|
+
export type ActionButtonStyle = 'standalone' | 'integrated';
|
|
5
6
|
/**
|
|
6
7
|
* Base class for form field components
|
|
7
8
|
*
|
|
@@ -21,6 +22,9 @@ declare class AeicoField<TValue = string> extends AeicoComponent {
|
|
|
21
22
|
* Property watchers
|
|
22
23
|
*/
|
|
23
24
|
static watchers: Watchers;
|
|
25
|
+
private static _fieldIdCounter;
|
|
26
|
+
private readonly _fieldId;
|
|
27
|
+
constructor();
|
|
24
28
|
/**
|
|
25
29
|
* The underlying form control element (input, select, etc.)
|
|
26
30
|
* Subclasses should set this to their specific element
|
|
@@ -35,10 +39,18 @@ declare class AeicoField<TValue = string> extends AeicoComponent {
|
|
|
35
39
|
defaultValue?: TValue | string;
|
|
36
40
|
resettable?: boolean;
|
|
37
41
|
resetText?: string;
|
|
42
|
+
resetTitle?: string;
|
|
38
43
|
clearable?: boolean;
|
|
39
44
|
clearText?: string;
|
|
45
|
+
clearTitle?: string;
|
|
46
|
+
actionButtonStyle?: ActionButtonStyle;
|
|
40
47
|
size?: string;
|
|
41
48
|
disabled?: boolean;
|
|
49
|
+
label?: string;
|
|
50
|
+
labelPlacement?: 'top' | 'left';
|
|
51
|
+
required?: boolean;
|
|
52
|
+
helperText?: string;
|
|
53
|
+
error?: string;
|
|
42
54
|
/**
|
|
43
55
|
* Lifecycle: Component connected to DOM
|
|
44
56
|
*/
|
|
@@ -54,10 +66,50 @@ declare class AeicoField<TValue = string> extends AeicoComponent {
|
|
|
54
66
|
protected renderActionButtons(force?: boolean): void;
|
|
55
67
|
protected renderResetButton(force?: boolean): void;
|
|
56
68
|
protected renderClearButton(force?: boolean): void;
|
|
69
|
+
/**
|
|
70
|
+
* Returns a stable unique ID for this field instance,
|
|
71
|
+
* used to associate <label htmlFor> with the underlying input.
|
|
72
|
+
*/
|
|
73
|
+
protected getFieldId(): string;
|
|
74
|
+
/**
|
|
75
|
+
* Renders a <label> element when the `label` prop is set.
|
|
76
|
+
* Call this as the first statement inside the render() html() callback.
|
|
77
|
+
* @param fieldId - The id to set on the underlying form control element (pass to input via id prop)
|
|
78
|
+
*/
|
|
79
|
+
protected renderLabel(fieldId: string): void;
|
|
80
|
+
/**
|
|
81
|
+
* Renders helper text below the field. Hidden when `error` is set.
|
|
82
|
+
* Call this after the field-body div in render().
|
|
83
|
+
*/
|
|
84
|
+
protected renderHelperText(): void;
|
|
85
|
+
/**
|
|
86
|
+
* Renders an error message below the field when `error` is set.
|
|
87
|
+
* Call this after renderHelperText() in render().
|
|
88
|
+
*/
|
|
89
|
+
protected renderError(): void;
|
|
57
90
|
/**
|
|
58
91
|
* Watcher for disabled property
|
|
59
92
|
*/
|
|
60
93
|
protected onDisabledChanged(newValue: boolean): void;
|
|
94
|
+
/**
|
|
95
|
+
* Watcher for error property — syncs aria-invalid on the field element
|
|
96
|
+
*/
|
|
97
|
+
protected onErrorChanged(newValue: string | undefined): void;
|
|
98
|
+
/**
|
|
99
|
+
* Lifecycle: called after every render update.
|
|
100
|
+
* Keeps aria-invalid on fieldElement in sync regardless of watcher timing.
|
|
101
|
+
*/
|
|
102
|
+
protected onUpdated(_changedProps: Map<string, unknown>): void;
|
|
103
|
+
/**
|
|
104
|
+
* Returns true if the field passes constraint validation.
|
|
105
|
+
* Delegates to the underlying fieldElement when available;
|
|
106
|
+
* falls back to a manual required-check otherwise.
|
|
107
|
+
*/
|
|
108
|
+
checkValidity(): boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Reports validity, showing the browser's built-in validation UI when possible.
|
|
111
|
+
*/
|
|
112
|
+
reportValidity(): boolean;
|
|
61
113
|
/**
|
|
62
114
|
* Render the field component
|
|
63
115
|
* Override in subclass to provide custom rendering
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { InferProps } from 'aeico';
|
|
2
|
+
import AeicoComponent from '../aeico-component';
|
|
3
|
+
import '../icon/icon';
|
|
4
|
+
import '../tooltip/tooltip';
|
|
5
|
+
import type { TooltipPlacement } from '../tooltip/defines';
|
|
6
|
+
import type { CopyButtonColor, CopyButtonSize, CopyButtonVariant } from './defines';
|
|
7
|
+
declare class CopyButton extends AeicoComponent {
|
|
8
|
+
protected static styles: string[];
|
|
9
|
+
accessor text: string | undefined;
|
|
10
|
+
accessor color: CopyButtonColor | undefined;
|
|
11
|
+
accessor variant: CopyButtonVariant | undefined;
|
|
12
|
+
accessor size: CopyButtonSize | undefined;
|
|
13
|
+
accessor disabled: boolean | undefined;
|
|
14
|
+
accessor duration: number | undefined;
|
|
15
|
+
accessor tooltip: string;
|
|
16
|
+
accessor tooltipCopied: string;
|
|
17
|
+
accessor tooltipPlacement: TooltipPlacement;
|
|
18
|
+
private _slotElement;
|
|
19
|
+
private _tooltipEl;
|
|
20
|
+
private _resetTimer;
|
|
21
|
+
private _getTextToCopy;
|
|
22
|
+
private _handleClick;
|
|
23
|
+
protected onUnmounted(): void;
|
|
24
|
+
protected render(): import("aeico-view").RenderResult;
|
|
25
|
+
}
|
|
26
|
+
declare global {
|
|
27
|
+
interface HTMLElementTagNameMap {
|
|
28
|
+
'ae-copy-button': CopyButton;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export default CopyButton;
|
|
32
|
+
export type CopyButtonProps = InferProps<typeof CopyButton>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { ButtonColor as CopyButtonColor, ButtonVariant as CopyButtonVariant, ButtonSize as CopyButtonSize, } from '../button/defines';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { InferProps } from 'aeico';
|
|
2
2
|
import AeicoComponent from '../aeico-component';
|
|
3
|
-
import type { DetailColor, DetailVariant } from './defines';
|
|
3
|
+
import type { DetailColor, DetailVariant, DetailIconPlacement } from './defines';
|
|
4
4
|
/**
|
|
5
5
|
* Detail component that can be used to show/hide additional content.
|
|
6
6
|
*
|
|
@@ -19,6 +19,7 @@ declare class Detail extends AeicoComponent {
|
|
|
19
19
|
accessor variant: DetailVariant;
|
|
20
20
|
accessor color: DetailColor;
|
|
21
21
|
accessor disabled: boolean;
|
|
22
|
+
accessor iconPlacement: DetailIconPlacement;
|
|
22
23
|
private _open;
|
|
23
24
|
/** Opens the detail panel. */
|
|
24
25
|
open(): void;
|
|
@@ -38,3 +39,4 @@ declare global {
|
|
|
38
39
|
}
|
|
39
40
|
export default Detail;
|
|
40
41
|
export type DetailProps = InferProps<typeof Detail>;
|
|
42
|
+
export type { DetailIconPlacement };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { InferProps, Props } from 'aeico';
|
|
2
|
+
import AeicoComponent from '../aeico-component';
|
|
3
|
+
import type { DetailColor, DetailVariant } from '../detail/defines';
|
|
4
|
+
/**
|
|
5
|
+
* DetailGroup component — wraps multiple `ae-detail` elements into an
|
|
6
|
+
* accordion-style group. By default only one item can be open at a time;
|
|
7
|
+
* set `multiple` to allow several items open simultaneously.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```html
|
|
11
|
+
* <ae-detail-group>
|
|
12
|
+
* <ae-detail summary="Section 1">Content 1</ae-detail>
|
|
13
|
+
* <ae-detail summary="Section 2">Content 2</ae-detail>
|
|
14
|
+
* <ae-detail summary="Section 3">Content 3</ae-detail>
|
|
15
|
+
* </ae-detail-group>
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
declare class DetailGroup extends AeicoComponent {
|
|
19
|
+
static tagName: string;
|
|
20
|
+
static props: Props;
|
|
21
|
+
protected static styles: string[];
|
|
22
|
+
multiple?: boolean;
|
|
23
|
+
variant?: DetailVariant;
|
|
24
|
+
color?: DetailColor;
|
|
25
|
+
private slotEl;
|
|
26
|
+
private readonly DETAIL_RADIUS;
|
|
27
|
+
connectedCallback(): void;
|
|
28
|
+
private _getDetails;
|
|
29
|
+
private _syncChildren;
|
|
30
|
+
private _handleOpen;
|
|
31
|
+
protected render(): import("aeico-view").RenderResult;
|
|
32
|
+
}
|
|
33
|
+
declare global {
|
|
34
|
+
interface HTMLElementTagNameMap {
|
|
35
|
+
'ae-detail-group': DetailGroup;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
export default DetailGroup;
|
|
39
|
+
export type DetailGroupProps = InferProps<typeof DetailGroup>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type DrawerPlacement = 'left' | 'right' | 'top' | 'bottom';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { InferProps } from 'aeico';
|
|
2
|
+
import AeicoComponent from '../aeico-component';
|
|
3
|
+
import type { DrawerPlacement } from './defines';
|
|
4
|
+
declare class Drawer extends AeicoComponent {
|
|
5
|
+
protected static styles: string[];
|
|
6
|
+
accessor label: string | undefined;
|
|
7
|
+
accessor placement: DrawerPlacement | undefined;
|
|
8
|
+
accessor size: string | undefined;
|
|
9
|
+
accessor modal: boolean;
|
|
10
|
+
accessor closable: boolean;
|
|
11
|
+
accessor header: boolean;
|
|
12
|
+
accessor closeOnOverlayClick: boolean;
|
|
13
|
+
private _panelEl;
|
|
14
|
+
private _hasFooter;
|
|
15
|
+
protected render(): import("aeico-view").RenderResult;
|
|
16
|
+
private _handleBackdropClick;
|
|
17
|
+
private _handlePanelClick;
|
|
18
|
+
private _handleKeydown;
|
|
19
|
+
private _handleFooterSlotChange;
|
|
20
|
+
open(): void;
|
|
21
|
+
close(): void;
|
|
22
|
+
isOpen(): boolean;
|
|
23
|
+
disconnectedCallback(): void;
|
|
24
|
+
}
|
|
25
|
+
declare global {
|
|
26
|
+
interface HTMLElementTagNameMap {
|
|
27
|
+
'ae-drawer': Drawer;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export default Drawer;
|
|
31
|
+
export type DrawerProps = InferProps<typeof Drawer>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { InferProps, Props } from 'aeico';
|
|
2
2
|
import AeicoComponent from '../aeico-component';
|
|
3
3
|
import type { IconSize, IconColor } from './defines';
|
|
4
|
+
import './built-in-icons';
|
|
4
5
|
declare class Icon extends AeicoComponent {
|
|
5
6
|
static tagName: string;
|
|
6
7
|
static props: Props;
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import { IconDefinition, IconRegistryData } from './defines';
|
|
2
2
|
declare class IconRegistry {
|
|
3
3
|
private static _icons;
|
|
4
|
+
/** Names registered via addBuiltIn — can be overridden by user add() calls */
|
|
5
|
+
private static _builtInKeys;
|
|
6
|
+
/** Register user icons. Always takes priority over built-in icons. */
|
|
4
7
|
static add(icons: IconRegistryData): void;
|
|
8
|
+
/**
|
|
9
|
+
* Register built-in icons provided by the library.
|
|
10
|
+
* A built-in icon will NOT overwrite an icon already registered by the user.
|
|
11
|
+
*/
|
|
12
|
+
static addBuiltIn(icons: IconRegistryData): void;
|
|
5
13
|
static get(name: string): IconDefinition | undefined;
|
|
6
14
|
static has(name: string): boolean;
|
|
7
15
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -31,6 +31,8 @@
|
|
|
31
31
|
* ```
|
|
32
32
|
*/
|
|
33
33
|
export { default as TextInput } from './text-input';
|
|
34
|
+
export { default as NumberInput } from './number-input';
|
|
35
|
+
export { default as Textarea, type TextareaResize } from './textarea';
|
|
34
36
|
export { default as Select } from './select';
|
|
35
37
|
export { default as Slider } from './slider';
|
|
36
38
|
export { default as Checkbox } from './checkbox';
|
|
@@ -39,12 +41,14 @@ export { Radio } from './radio-group';
|
|
|
39
41
|
export { default as Switch } from './switch';
|
|
40
42
|
export { default as Breadcrumb, BreadcrumbItem } from './breadcrumb';
|
|
41
43
|
export { default as Button } from './button';
|
|
44
|
+
export { default as CopyButton } from './copy-button';
|
|
42
45
|
export { default as Dropdown, DropdownItem, DropdownButton } from './dropdown';
|
|
43
46
|
export { default as ButtonGroup } from './button-group';
|
|
44
47
|
export { default as Badge } from './badge';
|
|
45
48
|
export { default as Tag } from './tag';
|
|
46
49
|
export { default as Alert } from './alert';
|
|
47
50
|
export { default as Dialog } from './dialog';
|
|
51
|
+
export { default as Drawer } from './drawer';
|
|
48
52
|
export { default as Icon } from './icon/icon';
|
|
49
53
|
export { default as IconRegistry } from './icon/registry';
|
|
50
54
|
export { default as IconButton } from './icon-button';
|
|
@@ -52,8 +56,14 @@ export { Tabs, Tab, TabPanel } from './tabs';
|
|
|
52
56
|
export { default as Divider } from './divider';
|
|
53
57
|
export { default as Card } from './card';
|
|
54
58
|
export { default as Navbar } from './navbar';
|
|
59
|
+
export { default as Spinner } from './spinner';
|
|
55
60
|
export { default as Detail } from './detail';
|
|
61
|
+
export { default as DetailGroup } from './detail-group';
|
|
56
62
|
export { default as ProgressBar } from './progress-bar';
|
|
63
|
+
export { Menu, MenuItem } from './menu';
|
|
64
|
+
export { default as Tooltip } from './tooltip';
|
|
65
|
+
export { default as Pagination } from './pagination';
|
|
66
|
+
export { Tree, TreeItem } from './tree';
|
|
57
67
|
export type { SelectProps, SelectOption, SelectOptions, SelectOptionValue } from './select';
|
|
58
68
|
export type { SliderProps, SliderOption, SliderOptions, SliderOptionValue } from './slider';
|
|
59
69
|
export type { CheckboxProps, CheckboxVariant } from './checkbox';
|
|
@@ -61,12 +71,16 @@ export type { RadioGroupProps, RadioGroupMode, RadioGroupOption, RadioGroupOptio
|
|
|
61
71
|
export type { RadioProps } from './radio-group';
|
|
62
72
|
export type { SwitchProps } from './switch';
|
|
63
73
|
export type { TextInputProps } from './text-input';
|
|
74
|
+
export type { NumberInputProps } from './number-input';
|
|
75
|
+
export type { TextareaProps } from './textarea';
|
|
64
76
|
export type { ButtonProps, ButtonColor, ButtonSize, ButtonVariant } from './button';
|
|
65
77
|
export type { ButtonGroupProps } from './button-group';
|
|
78
|
+
export type { PaginationProps, PaginationSize } from './pagination';
|
|
66
79
|
export type { AlertProps, AlertColor, AlertSize, AlertVariant } from './alert';
|
|
67
80
|
export type { BadgeProps, BadgeColor, BadgeSize, BadgeVariant } from './badge';
|
|
68
81
|
export type { TagProps, TagColor, TagSize, TagVariant } from './tag';
|
|
69
82
|
export type { DialogProps } from './dialog';
|
|
83
|
+
export type { DrawerProps, DrawerPlacement } from './drawer';
|
|
70
84
|
export type { IconProps, IconSize, IconColor, IconDefinition, IconRegistryData } from './icon';
|
|
71
85
|
export type { ProgressBarProps, ProgressBarColor } from './progress-bar';
|
|
72
86
|
export type { IconButtonProps, IconButtonVariant, IconButtonSize } from './icon-button';
|
|
@@ -74,3 +88,6 @@ export type { DividerProps } from './divider';
|
|
|
74
88
|
export type { CardProps, CardVariant, CardColor } from './card';
|
|
75
89
|
export type { NavbarProps, NavbarColor, NavbarAppearance } from './navbar';
|
|
76
90
|
export type { DetailProps, DetailVariant, DetailColor } from './detail';
|
|
91
|
+
export type { MenuProps, MenuItemProps, MenuMode, MenuOrientation, MenuTrigger, MenuSelectDetail, } from './menu';
|
|
92
|
+
export type { TooltipProps, TooltipPlacement, TooltipTrigger } from './tooltip';
|
|
93
|
+
export type { TreeProps, TreeItemProps, TreeSelectDetail, TreeExpandDetail, TreeCheckDetail, } from './tree';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type MenuMode = 'flyout' | 'inline';
|
|
2
|
+
export type MenuOrientation = 'horizontal' | 'vertical';
|
|
3
|
+
export type MenuTrigger = 'click' | 'hover';
|
|
4
|
+
export type MenuIconPlacement = 'start' | 'end';
|
|
5
|
+
/** Minimal interface used by menu-item to read config from its parent ae-menu. */
|
|
6
|
+
export interface ParentMenuLike extends Element {
|
|
7
|
+
mode?: MenuMode;
|
|
8
|
+
orientation?: MenuOrientation;
|
|
9
|
+
trigger?: MenuTrigger;
|
|
10
|
+
}
|
|
11
|
+
export interface MenuSelectDetail {
|
|
12
|
+
key: string;
|
|
13
|
+
label: string;
|
|
14
|
+
keyPath: string[];
|
|
15
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as Menu } from './menu';
|
|
2
|
+
export { default as MenuItem } from './menu-item';
|
|
3
|
+
export type { MenuProps } from './menu';
|
|
4
|
+
export type { MenuItemProps } from './menu-item';
|
|
5
|
+
export type { MenuMode, MenuOrientation, MenuTrigger, MenuSelectDetail } from './defines';
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import AeicoComponent from '../aeico-component';
|
|
2
|
+
import type { InferProps } from 'aeico';
|
|
3
|
+
import type { MenuIconPlacement } from './defines';
|
|
4
|
+
/**
|
|
5
|
+
* Menu item — used as a direct child of `<ae-menu>` or nested inside another
|
|
6
|
+
* `<ae-menu-item>` to create a two-level submenu.
|
|
7
|
+
*
|
|
8
|
+
* - **Leaf item**: omit `label`; slot contains the item text.
|
|
9
|
+
* - **Parent item**: set `label` to the trigger text; slot children are
|
|
10
|
+
* `<ae-menu-item>` elements that appear in the submenu panel/section.
|
|
11
|
+
*
|
|
12
|
+
* **Slots (parent items only)**
|
|
13
|
+
* - `expand` — icon shown when the submenu is closed (default: CSS triangle).
|
|
14
|
+
* - `collapse` — icon shown when the submenu is open (default: rotated CSS triangle).
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```html
|
|
18
|
+
* <ae-menu-item label="Settings" icon-placement="start">
|
|
19
|
+
* <ae-icon name="chevron-right" slot="expand"></ae-icon>
|
|
20
|
+
* <ae-icon name="chevron-down" slot="collapse"></ae-icon>
|
|
21
|
+
* <ae-menu-item key="profile">Profile</ae-menu-item>
|
|
22
|
+
* </ae-menu-item>
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
declare class MenuItem extends AeicoComponent {
|
|
26
|
+
static tagName: string;
|
|
27
|
+
protected static styles: string[];
|
|
28
|
+
accessor key: string | undefined;
|
|
29
|
+
accessor label: string | undefined;
|
|
30
|
+
accessor disabled: boolean;
|
|
31
|
+
accessor href: string | undefined;
|
|
32
|
+
accessor selected: boolean;
|
|
33
|
+
accessor open: boolean;
|
|
34
|
+
accessor iconPlacement: MenuIconPlacement;
|
|
35
|
+
private _outsideClickHandler;
|
|
36
|
+
private _closeTimer;
|
|
37
|
+
connectedCallback(): void;
|
|
38
|
+
disconnectedCallback(): void;
|
|
39
|
+
private get _parentMenu();
|
|
40
|
+
private get _mode();
|
|
41
|
+
private get _orientation();
|
|
42
|
+
private get _trigger();
|
|
43
|
+
private get _isParent();
|
|
44
|
+
/** Compute flyout panel placement based on depth and parent orientation. */
|
|
45
|
+
private get _panelPlacement();
|
|
46
|
+
private _isHoverTrigger;
|
|
47
|
+
private _handleMouseEnter;
|
|
48
|
+
private _handleMouseLeave;
|
|
49
|
+
private _handleParentClick;
|
|
50
|
+
private _handleLeafClick;
|
|
51
|
+
private _handleChildSelect;
|
|
52
|
+
private _handleKeydown;
|
|
53
|
+
private _buildKeyPath;
|
|
54
|
+
protected render(): import("aeico-view").RenderResult;
|
|
55
|
+
}
|
|
56
|
+
declare global {
|
|
57
|
+
interface HTMLElementTagNameMap {
|
|
58
|
+
'ae-menu-item': MenuItem;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
export default MenuItem;
|
|
62
|
+
export type MenuItemProps = InferProps<typeof MenuItem>;
|
|
63
|
+
export type { MenuIconPlacement };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import AeicoComponent from '../aeico-component';
|
|
2
|
+
import type { InferProps } from 'aeico';
|
|
3
|
+
import type { MenuMode, MenuOrientation, MenuTrigger } from './defines';
|
|
4
|
+
import './menu-item';
|
|
5
|
+
/**
|
|
6
|
+
* Menu navigation component. Renders a horizontal or vertical menu with
|
|
7
|
+
* optional two-level flyout or inline (accordion) submenus.
|
|
8
|
+
*
|
|
9
|
+
* Two modes:
|
|
10
|
+
* - `flyout` (default) — submenus open as floating panels (like a nav bar or
|
|
11
|
+
* context menu).
|
|
12
|
+
* - `inline` — submenus expand in-place (accordion-style sidebar).
|
|
13
|
+
*
|
|
14
|
+
* Emits:
|
|
15
|
+
* - `select` — `{ detail: { key, label, keyPath } }` when a leaf item is clicked.
|
|
16
|
+
*/
|
|
17
|
+
declare class Menu extends AeicoComponent {
|
|
18
|
+
static tagName: string;
|
|
19
|
+
protected static styles: string[];
|
|
20
|
+
accessor mode: MenuMode;
|
|
21
|
+
accessor orientation: MenuOrientation;
|
|
22
|
+
accessor trigger: MenuTrigger;
|
|
23
|
+
accessor selectedKey: string | undefined;
|
|
24
|
+
connectedCallback(): void;
|
|
25
|
+
private _handleItemSelect;
|
|
26
|
+
protected render(): import("aeico-view").RenderResult;
|
|
27
|
+
}
|
|
28
|
+
declare global {
|
|
29
|
+
interface HTMLElementTagNameMap {
|
|
30
|
+
'ae-menu': Menu;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export default Menu;
|
|
34
|
+
export type MenuProps = InferProps<typeof Menu>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import AeicoField from '../aeico-field';
|
|
2
|
+
import type { InferProps, Props } from 'aeico';
|
|
3
|
+
declare class NumberInput extends AeicoField<number> {
|
|
4
|
+
protected fieldElement: HTMLInputElement | null;
|
|
5
|
+
static tagName: string;
|
|
6
|
+
static props: Props;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
min?: number;
|
|
9
|
+
max?: number;
|
|
10
|
+
step?: number;
|
|
11
|
+
controls?: boolean;
|
|
12
|
+
protected static styles: string[];
|
|
13
|
+
render(): import("aeico-view").RenderResult;
|
|
14
|
+
protected readonly boundOnIncrement: () => void;
|
|
15
|
+
protected readonly boundOnDecrement: () => void;
|
|
16
|
+
/**
|
|
17
|
+
* Get current value as number
|
|
18
|
+
*/
|
|
19
|
+
protected getValue(): number;
|
|
20
|
+
/**
|
|
21
|
+
* Write value to the input element (DOM only)
|
|
22
|
+
*/
|
|
23
|
+
protected writeValue(value: number): void;
|
|
24
|
+
/**
|
|
25
|
+
* Get event payload for change events
|
|
26
|
+
*/
|
|
27
|
+
protected getEventPayload(value: number, oldValue: number, action: import('../aeico-field').FieldAction): Record<string, unknown>;
|
|
28
|
+
}
|
|
29
|
+
declare global {
|
|
30
|
+
interface HTMLElementTagNameMap {
|
|
31
|
+
'ae-number-input': NumberInput;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
export default NumberInput;
|
|
35
|
+
export type NumberInputProps = InferProps<typeof NumberInput>;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { InferProps } from 'aeico';
|
|
2
|
+
import AeicoComponent from '../aeico-component';
|
|
3
|
+
import type { PaginationSize, PaginationVariant } from './defines';
|
|
4
|
+
import '../icon/icon';
|
|
5
|
+
/**
|
|
6
|
+
* Pagination component for navigating between pages of content.
|
|
7
|
+
*
|
|
8
|
+
* @prop {number} page - Current page number (1-indexed). Default: 1.
|
|
9
|
+
* @prop {number} pageSize - Number of items per page. Default: 10.
|
|
10
|
+
* @prop {number} total - Total number of items. Used to compute pageCount when pageCount is not set.
|
|
11
|
+
* @prop {number} pageCount - Total number of pages. Overrides total/pageSize calculation when set.
|
|
12
|
+
* @prop {number} siblingCount - Number of page buttons to show on each side of the current page. Default: 1.
|
|
13
|
+
* @prop {'xs'|'sm'|'md'|'lg'} size - Size variant.
|
|
14
|
+
* @prop {boolean} disabled - Disables all interactive controls.
|
|
15
|
+
* @prop {boolean} simple - Simple mode: shows only prev/next buttons and a page number input.
|
|
16
|
+
* @prop {boolean} showFirstLast - Show dedicated first-page and last-page jump buttons.
|
|
17
|
+
* @prop {'borderless'|'link'} variant - Visual variant. `borderless` removes borders; `link` renders page numbers as plain text links with no borders or backgrounds.
|
|
18
|
+
*
|
|
19
|
+
* @event {CustomEvent<{page: number}>} change - Fired when the page changes.
|
|
20
|
+
*
|
|
21
|
+
* @slot prev - Custom content for the previous-page button (default: chevron-left icon).
|
|
22
|
+
* @slot next - Custom content for the next-page button (default: chevron-right icon).
|
|
23
|
+
* @slot first - Custom content for the first-page button (default: chevrons-left icon). Requires showFirstLast.
|
|
24
|
+
* @slot last - Custom content for the last-page button (default: chevrons-right icon). Requires showFirstLast.
|
|
25
|
+
*
|
|
26
|
+
* @csspart root - The outer <nav> element.
|
|
27
|
+
* @csspart prev - The previous-page button.
|
|
28
|
+
* @csspart next - The next-page button.
|
|
29
|
+
* @csspart first - The first-page button (visible when showFirstLast).
|
|
30
|
+
* @csspart last - The last-page button (visible when showFirstLast).
|
|
31
|
+
* @csspart item - A page number button.
|
|
32
|
+
* @csspart ellipsis - An ellipsis span between page groups.
|
|
33
|
+
* @csspart page-input - The page number input in simple mode.
|
|
34
|
+
* @csspart page-total - The "/ N" label in simple mode.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```html
|
|
38
|
+
* <ae-pagination total="100" page-size="10" page="1"></ae-pagination>
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
declare class Pagination extends AeicoComponent {
|
|
42
|
+
static tagName: string;
|
|
43
|
+
protected static styles: string[];
|
|
44
|
+
accessor page: number;
|
|
45
|
+
accessor pageSize: number;
|
|
46
|
+
accessor total: number;
|
|
47
|
+
accessor pageCount: number | undefined;
|
|
48
|
+
accessor siblingCount: number;
|
|
49
|
+
accessor size: PaginationSize | undefined;
|
|
50
|
+
accessor disabled: boolean;
|
|
51
|
+
accessor simple: boolean;
|
|
52
|
+
accessor showFirstLast: boolean;
|
|
53
|
+
accessor variant: PaginationVariant | undefined;
|
|
54
|
+
private _simpleInput;
|
|
55
|
+
private get _computedPageCount();
|
|
56
|
+
private get _currentPage();
|
|
57
|
+
private _getPageItems;
|
|
58
|
+
private _goToPage;
|
|
59
|
+
private _handleItemClick;
|
|
60
|
+
private _handlePrevClick;
|
|
61
|
+
private _handleNextClick;
|
|
62
|
+
private _handleFirstClick;
|
|
63
|
+
private _handleLastClick;
|
|
64
|
+
private _handleSimpleInputChange;
|
|
65
|
+
protected onUpdated(): void;
|
|
66
|
+
private _renderNavBtn;
|
|
67
|
+
private _renderSimpleMode;
|
|
68
|
+
private _renderPageItems;
|
|
69
|
+
protected render(): import("aeico-view").RenderResult;
|
|
70
|
+
}
|
|
71
|
+
declare global {
|
|
72
|
+
interface HTMLElementTagNameMap {
|
|
73
|
+
'ae-pagination': Pagination;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
export default Pagination;
|
|
77
|
+
export type PaginationProps = InferProps<typeof Pagination>;
|
|
@@ -14,7 +14,7 @@ import '../tag/tag';
|
|
|
14
14
|
*
|
|
15
15
|
*/
|
|
16
16
|
declare class Select extends AeicoField<SelectOptionValue | SelectMultiValue> {
|
|
17
|
-
protected fieldElement: null;
|
|
17
|
+
protected fieldElement: HTMLInputElement | null;
|
|
18
18
|
private _isOpen;
|
|
19
19
|
private _triggerEl;
|
|
20
20
|
private _dropdownEl;
|
|
@@ -35,7 +35,7 @@ declare class Select extends AeicoField<SelectOptionValue | SelectMultiValue> {
|
|
|
35
35
|
protected getValue(): SelectOptionValue | SelectMultiValue;
|
|
36
36
|
private _getMultiValues;
|
|
37
37
|
protected onDisabledChanged(_newValue: boolean): void;
|
|
38
|
-
protected onUpdated(
|
|
38
|
+
protected onUpdated(changedProps: Map<string, unknown>): void;
|
|
39
39
|
private _findLabel;
|
|
40
40
|
private _onSlotChange;
|
|
41
41
|
private _toggleDropdown;
|