aeico-components 0.1.1
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 +0 -0
- package/dist/index.cjs +4226 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.js +4226 -0
- package/dist/index.js.map +1 -0
- package/dist/types/aeico-component.d.ts +8 -0
- package/dist/types/aeico-field.d.ts +132 -0
- package/dist/types/alert/alert.d.ts +49 -0
- package/dist/types/alert/defines.d.ts +3 -0
- package/dist/types/alert/index.d.ts +3 -0
- package/dist/types/badge/badge.d.ts +34 -0
- package/dist/types/badge/defines.d.ts +3 -0
- package/dist/types/badge/index.d.ts +3 -0
- package/dist/types/breadcrumb/breadcrumb-item.d.ts +31 -0
- package/dist/types/breadcrumb/breadcrumb.d.ts +60 -0
- package/dist/types/breadcrumb/defines.d.ts +1 -0
- package/dist/types/breadcrumb/index.d.ts +5 -0
- package/dist/types/button/button.d.ts +60 -0
- package/dist/types/button/defines.d.ts +3 -0
- package/dist/types/button/index.d.ts +3 -0
- package/dist/types/button-group/button-group.d.ts +56 -0
- package/dist/types/button-group/index.d.ts +2 -0
- package/dist/types/card/card.d.ts +19 -0
- package/dist/types/card/defines.d.ts +2 -0
- package/dist/types/card/index.d.ts +3 -0
- package/dist/types/checkbox/checkbox.d.ts +37 -0
- package/dist/types/checkbox/defines.d.ts +1 -0
- package/dist/types/checkbox/index.d.ts +3 -0
- package/dist/types/detail/defines.d.ts +2 -0
- package/dist/types/detail/detail.d.ts +40 -0
- package/dist/types/detail/index.d.ts +3 -0
- package/dist/types/dialog/dialog.d.ts +29 -0
- package/dist/types/dialog/index.d.ts +2 -0
- package/dist/types/divider/divider.d.ts +34 -0
- package/dist/types/divider/index.d.ts +2 -0
- package/dist/types/dropdown/defines.d.ts +1 -0
- package/dist/types/dropdown/dropdown-button.d.ts +60 -0
- package/dist/types/dropdown/dropdown-item.d.ts +56 -0
- package/dist/types/dropdown/dropdown.d.ts +84 -0
- package/dist/types/dropdown/index.d.ts +7 -0
- package/dist/types/icon/defines.d.ts +10 -0
- package/dist/types/icon/icon.d.ts +21 -0
- package/dist/types/icon/index.d.ts +4 -0
- package/dist/types/icon/registry.d.ts +8 -0
- package/dist/types/icon-button/icon-button.d.ts +32 -0
- package/dist/types/icon-button/index.d.ts +2 -0
- package/dist/types/index.d.ts +74 -0
- package/dist/types/navbar/defines.d.ts +2 -0
- package/dist/types/navbar/index.d.ts +3 -0
- package/dist/types/navbar/navbar.d.ts +73 -0
- package/dist/types/radio-group/defines.d.ts +6 -0
- package/dist/types/radio-group/index.d.ts +5 -0
- package/dist/types/radio-group/radio-group.d.ts +41 -0
- package/dist/types/radio-group/radio.d.ts +47 -0
- package/dist/types/select/defines.d.ts +8 -0
- package/dist/types/select/index.d.ts +5 -0
- package/dist/types/select/select-option.d.ts +20 -0
- package/dist/types/select/select.d.ts +60 -0
- package/dist/types/slider/defines.d.ts +31 -0
- package/dist/types/slider/index.d.ts +3 -0
- package/dist/types/slider/slider.d.ts +45 -0
- package/dist/types/switch/index.d.ts +2 -0
- package/dist/types/switch/switch.d.ts +35 -0
- package/dist/types/tabs/defines.d.ts +1 -0
- package/dist/types/tabs/index.d.ts +3 -0
- package/dist/types/tabs/tab-panel.d.ts +11 -0
- package/dist/types/tabs/tab.d.ts +18 -0
- package/dist/types/tabs/tabs.d.ts +24 -0
- package/dist/types/tag/defines.d.ts +3 -0
- package/dist/types/tag/index.d.ts +3 -0
- package/dist/types/tag/tag.d.ts +36 -0
- package/dist/types/text-input/index.d.ts +2 -0
- package/dist/types/text-input/text-input.d.ts +26 -0
- package/dist/types/utils.d.ts +2 -0
- package/package.json +63 -0
- package/src/aeico-component.ts +17 -0
- package/src/aeico-field.ts +228 -0
- package/src/alert/alert.ts +107 -0
- package/src/alert/defines.ts +11 -0
- package/src/alert/index.ts +3 -0
- package/src/badge/badge.ts +62 -0
- package/src/badge/defines.ts +12 -0
- package/src/badge/index.ts +3 -0
- package/src/breadcrumb/breadcrumb-item.ts +61 -0
- package/src/breadcrumb/breadcrumb.ts +138 -0
- package/src/breadcrumb/defines.ts +10 -0
- package/src/breadcrumb/index.ts +5 -0
- package/src/button/button.ts +147 -0
- package/src/button/defines.ts +12 -0
- package/src/button/index.ts +3 -0
- package/src/button-group/button-group.ts +140 -0
- package/src/button-group/index.ts +2 -0
- package/src/card/card.ts +57 -0
- package/src/card/defines.ts +11 -0
- package/src/card/index.ts +3 -0
- package/src/checkbox/checkbox.ts +90 -0
- package/src/checkbox/defines.ts +1 -0
- package/src/checkbox/index.ts +3 -0
- package/src/detail/defines.ts +11 -0
- package/src/detail/detail.ts +122 -0
- package/src/detail/index.ts +3 -0
- package/src/dialog/dialog.ts +149 -0
- package/src/dialog/index.ts +2 -0
- package/src/divider/divider.ts +56 -0
- package/src/divider/index.ts +2 -0
- package/src/dropdown/defines.ts +13 -0
- package/src/dropdown/dropdown-button.ts +130 -0
- package/src/dropdown/dropdown-item.ts +136 -0
- package/src/dropdown/dropdown.ts +211 -0
- package/src/dropdown/index.ts +7 -0
- package/src/icon/defines.ts +21 -0
- package/src/icon/icon.ts +84 -0
- package/src/icon/index.ts +4 -0
- package/src/icon/registry.ts +25 -0
- package/src/icon-button/icon-button.ts +64 -0
- package/src/icon-button/index.ts +2 -0
- package/src/index.ts +85 -0
- package/src/navbar/defines.ts +11 -0
- package/src/navbar/index.ts +3 -0
- package/src/navbar/navbar.ts +162 -0
- package/src/radio-group/defines.ts +5 -0
- package/src/radio-group/index.ts +5 -0
- package/src/radio-group/radio-group.ts +227 -0
- package/src/radio-group/radio.ts +58 -0
- package/src/select/defines.ts +12 -0
- package/src/select/index.ts +5 -0
- package/src/select/select-option.ts +59 -0
- package/src/select/select.ts +387 -0
- package/src/slider/defines.ts +33 -0
- package/src/slider/index.ts +3 -0
- package/src/slider/slider.ts +364 -0
- package/src/styles/color.css +117 -0
- package/src/styles/components/alert.css +104 -0
- package/src/styles/components/badge.css +67 -0
- package/src/styles/components/breadcrumb-item.css +59 -0
- package/src/styles/components/breadcrumb.css +19 -0
- package/src/styles/components/button-group.css +25 -0
- package/src/styles/components/button.css +213 -0
- package/src/styles/components/card.css +64 -0
- package/src/styles/components/checkbox.css +78 -0
- package/src/styles/components/detail.css +127 -0
- package/src/styles/components/dialog.css +103 -0
- package/src/styles/components/divider.css +18 -0
- package/src/styles/components/dropdown-item.css +91 -0
- package/src/styles/components/dropdown.css +179 -0
- package/src/styles/components/icon-button.css +116 -0
- package/src/styles/components/icon.css +29 -0
- package/src/styles/components/navbar.css +250 -0
- package/src/styles/components/radio-group.css +360 -0
- package/src/styles/components/select-option.css +43 -0
- package/src/styles/components/select.css +222 -0
- package/src/styles/components/slider.css +326 -0
- package/src/styles/components/switch.css +117 -0
- package/src/styles/components/tab-panel.css +8 -0
- package/src/styles/components/tab.css +44 -0
- package/src/styles/components/tabs.css +16 -0
- package/src/styles/components/tag.css +107 -0
- package/src/styles/components/text-input.css +110 -0
- package/src/styles/layout.css +43 -0
- package/src/styles/size.css +7 -0
- package/src/styles/variables.css +368 -0
- package/src/switch/index.ts +2 -0
- package/src/switch/switch.ts +88 -0
- package/src/tabs/defines.ts +1 -0
- package/src/tabs/index.ts +3 -0
- package/src/tabs/tab-panel.ts +23 -0
- package/src/tabs/tab.ts +62 -0
- package/src/tabs/tabs.ts +134 -0
- package/src/tag/defines.ts +12 -0
- package/src/tag/index.ts +3 -0
- package/src/tag/tag.ts +85 -0
- package/src/text-input/index.ts +2 -0
- package/src/text-input/text-input.ts +75 -0
- package/src/utils.ts +6 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { InferProps, Props } from 'aeico';
|
|
2
|
+
import AeicoComponent from '../aeico-component';
|
|
3
|
+
import type { AlertColor, AlertSize, AlertVariant } from './defines';
|
|
4
|
+
/**
|
|
5
|
+
* Alert Component
|
|
6
|
+
*
|
|
7
|
+
* A customizable alert/notification component with multiple variants and sizes.
|
|
8
|
+
* Supports dismissible alerts and icon display.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* // Using the static create method
|
|
13
|
+
* const alert = Alert.create({
|
|
14
|
+
* variant: 'info',
|
|
15
|
+
* dismissible: true
|
|
16
|
+
* })
|
|
17
|
+
* alert.textContent = 'This is an informational message'
|
|
18
|
+
* document.body.appendChild(alert)
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```html
|
|
23
|
+
* <!-- Using as Web Component -->
|
|
24
|
+
* <ae-alert variant="info">Information message</ae-alert>
|
|
25
|
+
* <ae-alert variant="success" dismissible>Operation successful!</ae-alert>
|
|
26
|
+
* <ae-alert variant="warning" size="sm">Small warning</ae-alert>
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
declare class Alert extends AeicoComponent {
|
|
30
|
+
static props: Props;
|
|
31
|
+
protected static useStyles: string[];
|
|
32
|
+
protected static styles: string[];
|
|
33
|
+
color?: AlertColor;
|
|
34
|
+
variant?: AlertVariant;
|
|
35
|
+
size?: AlertSize;
|
|
36
|
+
dismissible?: boolean;
|
|
37
|
+
invisible?: boolean;
|
|
38
|
+
protected render(): import("aeico-view").RenderResult;
|
|
39
|
+
show(): void;
|
|
40
|
+
hide(): void;
|
|
41
|
+
private _handleClose;
|
|
42
|
+
}
|
|
43
|
+
declare global {
|
|
44
|
+
interface HTMLElementTagNameMap {
|
|
45
|
+
'ae-alert': Alert;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
export default Alert;
|
|
49
|
+
export type AlertProps = InferProps<typeof Alert>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { InferProps } from 'aeico';
|
|
2
|
+
import AeicoComponent from '../aeico-component';
|
|
3
|
+
import type { BadgeColor, BadgeSize, BadgeVariant } from './defines';
|
|
4
|
+
/**
|
|
5
|
+
* Badge Component
|
|
6
|
+
*
|
|
7
|
+
* A small inline label for status, category, or count indicators.
|
|
8
|
+
* Supports color, variant, size, and an optional leading/trailing ae-icon slot.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```html
|
|
12
|
+
* <ae-badge color="primary">New</ae-badge>
|
|
13
|
+
* <ae-badge variant="outlined" color="success">Active</ae-badge>
|
|
14
|
+
* <ae-badge variant="subtle" color="danger" size="sm">
|
|
15
|
+
* <ae-icon slot="start" name="warning"></ae-icon>
|
|
16
|
+
* Error
|
|
17
|
+
* </ae-badge>
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
declare class Badge extends AeicoComponent {
|
|
21
|
+
protected static styles: string[];
|
|
22
|
+
accessor color: BadgeColor;
|
|
23
|
+
accessor variant: BadgeVariant;
|
|
24
|
+
accessor size: BadgeSize;
|
|
25
|
+
accessor pill: boolean;
|
|
26
|
+
protected render(): import("aeico-view").RenderResult;
|
|
27
|
+
}
|
|
28
|
+
declare global {
|
|
29
|
+
interface HTMLElementTagNameMap {
|
|
30
|
+
'ae-badge': Badge;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export default Badge;
|
|
34
|
+
export type BadgeProps = InferProps<typeof Badge>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { InferProps } from 'aeico';
|
|
2
|
+
import AeicoComponent from '../aeico-component';
|
|
3
|
+
/**
|
|
4
|
+
* BreadcrumbItem Component
|
|
5
|
+
*
|
|
6
|
+
* A single item in the `ae-breadcrumb` navigation trail.
|
|
7
|
+
* Renders as a link (`<a>`) when `href` is provided, otherwise as plain text.
|
|
8
|
+
* The separator is injected by the parent `ae-breadcrumb`.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```html
|
|
12
|
+
* <ae-breadcrumb>
|
|
13
|
+
* <ae-breadcrumb-item href="/">Home</ae-breadcrumb-item>
|
|
14
|
+
* <ae-breadcrumb-item href="/docs">Docs</ae-breadcrumb-item>
|
|
15
|
+
* <ae-breadcrumb-item>Current Page</ae-breadcrumb-item>
|
|
16
|
+
* </ae-breadcrumb>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
declare class BreadcrumbItem extends AeicoComponent {
|
|
20
|
+
static tagName: string;
|
|
21
|
+
protected static styles: string[];
|
|
22
|
+
accessor href: string | undefined;
|
|
23
|
+
protected render(): import("aeico-view").RenderResult;
|
|
24
|
+
}
|
|
25
|
+
declare global {
|
|
26
|
+
interface HTMLElementTagNameMap {
|
|
27
|
+
'ae-breadcrumb-item': BreadcrumbItem;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export default BreadcrumbItem;
|
|
31
|
+
export type BreadcrumbItemProps = InferProps<typeof BreadcrumbItem>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { InferProps } from 'aeico';
|
|
2
|
+
import AeicoComponent from '../aeico-component';
|
|
3
|
+
/**
|
|
4
|
+
* Breadcrumb Component
|
|
5
|
+
*
|
|
6
|
+
* A navigation trail that shows the user's location in a hierarchy.
|
|
7
|
+
* Automatically injects separators between items and marks the last item
|
|
8
|
+
* as `aria-current="page"`.
|
|
9
|
+
*
|
|
10
|
+
* The separator is configurable via:
|
|
11
|
+
* - `separator` attribute (text, default `/`) — simple and concise
|
|
12
|
+
* - `slot="separator"` (any element, e.g. `ae-icon`) — takes priority over the attribute
|
|
13
|
+
*
|
|
14
|
+
* Supports `color` for theming item link colors. The separator intentionally
|
|
15
|
+
* uses a fixed muted color and does NOT respond to the `color` prop.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```html
|
|
19
|
+
* <!-- Default separator "/" -->
|
|
20
|
+
* <ae-breadcrumb>
|
|
21
|
+
* <ae-breadcrumb-item href="/">Home</ae-breadcrumb-item>
|
|
22
|
+
* <ae-breadcrumb-item href="/docs">Docs</ae-breadcrumb-item>
|
|
23
|
+
* <ae-breadcrumb-item>Getting Started</ae-breadcrumb-item>
|
|
24
|
+
* </ae-breadcrumb>
|
|
25
|
+
*
|
|
26
|
+
* <!-- Custom text separator -->
|
|
27
|
+
* <ae-breadcrumb separator=">">
|
|
28
|
+
* <ae-breadcrumb-item href="/">Home</ae-breadcrumb-item>
|
|
29
|
+
* <ae-breadcrumb-item>Current</ae-breadcrumb-item>
|
|
30
|
+
* </ae-breadcrumb>
|
|
31
|
+
*
|
|
32
|
+
* <!-- Icon separator (slot takes priority over separator attribute) -->
|
|
33
|
+
* <ae-breadcrumb>
|
|
34
|
+
* <ae-icon slot="separator" name="chevron-right" size="xs"></ae-icon>
|
|
35
|
+
* <ae-breadcrumb-item href="/">Home</ae-breadcrumb-item>
|
|
36
|
+
* <ae-breadcrumb-item>Current</ae-breadcrumb-item>
|
|
37
|
+
* </ae-breadcrumb>
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
declare class Breadcrumb extends AeicoComponent {
|
|
41
|
+
static tagName: string;
|
|
42
|
+
protected static styles: string[];
|
|
43
|
+
/** Text separator shown between items. Ignored when `slot="separator"` is provided. */
|
|
44
|
+
accessor separator: string;
|
|
45
|
+
accessor color: string | undefined;
|
|
46
|
+
private _itemsSlot;
|
|
47
|
+
private _sepSlot;
|
|
48
|
+
protected render(): import("aeico-view").RenderResult;
|
|
49
|
+
protected onUpdated(): void;
|
|
50
|
+
private _getItems;
|
|
51
|
+
private _getSepElement;
|
|
52
|
+
private _syncSeparators;
|
|
53
|
+
}
|
|
54
|
+
declare global {
|
|
55
|
+
interface HTMLElementTagNameMap {
|
|
56
|
+
'ae-breadcrumb': Breadcrumb;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
export default Breadcrumb;
|
|
60
|
+
export type BreadcrumbProps = InferProps<typeof Breadcrumb>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type BreadcrumbColor = 'default' | 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default, default as Breadcrumb } from './breadcrumb';
|
|
2
|
+
export { default as BreadcrumbItem } from './breadcrumb-item';
|
|
3
|
+
export type { BreadcrumbProps } from './breadcrumb';
|
|
4
|
+
export type { BreadcrumbItemProps } from './breadcrumb-item';
|
|
5
|
+
export type { BreadcrumbColor } from './defines';
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { InferProps } from 'aeico';
|
|
2
|
+
import AeicoComponent from '../aeico-component';
|
|
3
|
+
import { ButtonColor, ButtonSize, ButtonVariant } from './defines';
|
|
4
|
+
/**
|
|
5
|
+
* Button Component
|
|
6
|
+
*
|
|
7
|
+
* A customizable button component with multiple variants and sizes.
|
|
8
|
+
* Supports theme and internationalization through mixins.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* // Using the static create method
|
|
13
|
+
* const button = Button.create({
|
|
14
|
+
* variant: 'primary',
|
|
15
|
+
* size: 'md'
|
|
16
|
+
* })
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```html
|
|
21
|
+
* <!-- Using as Web Component -->
|
|
22
|
+
* <ae-button variant="primary" size="md">Save</ae-button>
|
|
23
|
+
* <ae-button variant="danger" size="sm">Delete</ae-button>
|
|
24
|
+
* <ae-button variant="subtle">Cancel</ae-button>
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
declare class Button extends AeicoComponent {
|
|
28
|
+
protected static styles: string[];
|
|
29
|
+
color?: ButtonColor;
|
|
30
|
+
variant?: ButtonVariant;
|
|
31
|
+
size?: ButtonSize;
|
|
32
|
+
disabled?: boolean;
|
|
33
|
+
type?: 'button' | 'submit' | 'reset';
|
|
34
|
+
active?: boolean;
|
|
35
|
+
block?: boolean;
|
|
36
|
+
private buttonElement;
|
|
37
|
+
private _autoAriaLabel;
|
|
38
|
+
protected onMounted(): void;
|
|
39
|
+
private _handleSlotChange;
|
|
40
|
+
protected render(): import("aeico-view").RenderResult;
|
|
41
|
+
/**
|
|
42
|
+
* Programmatically click the button
|
|
43
|
+
*/
|
|
44
|
+
click(): void;
|
|
45
|
+
/**
|
|
46
|
+
* Focus the button
|
|
47
|
+
*/
|
|
48
|
+
focus(): void;
|
|
49
|
+
/**
|
|
50
|
+
* Blur the button
|
|
51
|
+
*/
|
|
52
|
+
blur(): void;
|
|
53
|
+
}
|
|
54
|
+
declare global {
|
|
55
|
+
interface HTMLElementTagNameMap {
|
|
56
|
+
'ae-button': Button;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
export default Button;
|
|
60
|
+
export type ButtonProps = InferProps<typeof Button>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type ButtonColor = 'default' | 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark';
|
|
2
|
+
export type ButtonVariant = 'filled' | 'outlined' | 'faint' | 'subtle' | 'text';
|
|
3
|
+
export type ButtonSize = '3xs' | '2xs' | 'xs' | 'sm' | 'md' | 'lg';
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { InferProps, Props } from 'aeico';
|
|
2
|
+
import AeicoComponent from '../aeico-component';
|
|
3
|
+
import type { ButtonColor, ButtonVariant, ButtonSize } from '../button';
|
|
4
|
+
/**
|
|
5
|
+
* ButtonGroup Component
|
|
6
|
+
*
|
|
7
|
+
* Groups multiple `ae-button` elements, propagating shared `variant`, `color`,
|
|
8
|
+
* `size`, and `disabled` props to each child. Supports a `compact` mode that
|
|
9
|
+
* joins buttons into a seamless connected strip (like Bootstrap's button group).
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```html
|
|
13
|
+
* <!-- Loose group (gap between buttons) -->
|
|
14
|
+
* <ae-button-group variant="outlined" color="primary">
|
|
15
|
+
* <ae-button>One</ae-button>
|
|
16
|
+
* <ae-button>Two</ae-button>
|
|
17
|
+
* <ae-button>Three</ae-button>
|
|
18
|
+
* </ae-button-group>
|
|
19
|
+
*
|
|
20
|
+
* <!-- Compact — joined strip -->
|
|
21
|
+
* <ae-button-group compact color="primary">
|
|
22
|
+
* <ae-button>Left</ae-button>
|
|
23
|
+
* <ae-button>Middle</ae-button>
|
|
24
|
+
* <ae-button>Right</ae-button>
|
|
25
|
+
* </ae-button-group>
|
|
26
|
+
*
|
|
27
|
+
* <!-- Full-width -->
|
|
28
|
+
* <ae-button-group block color="danger" variant="outlined">
|
|
29
|
+
* <ae-button>Delete</ae-button>
|
|
30
|
+
* <ae-button>Archive</ae-button>
|
|
31
|
+
* </ae-button-group>
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
declare class ButtonGroup extends AeicoComponent {
|
|
35
|
+
static props: Props;
|
|
36
|
+
protected static styles: string[];
|
|
37
|
+
variant?: ButtonVariant;
|
|
38
|
+
color?: ButtonColor;
|
|
39
|
+
size?: ButtonSize;
|
|
40
|
+
compact?: boolean;
|
|
41
|
+
block?: boolean;
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
private slotEl;
|
|
44
|
+
connectedCallback(): void;
|
|
45
|
+
protected render(): import("aeico-view").RenderResult;
|
|
46
|
+
private _getButtons;
|
|
47
|
+
private _syncChildren;
|
|
48
|
+
private _clearRadius;
|
|
49
|
+
}
|
|
50
|
+
declare global {
|
|
51
|
+
interface HTMLElementTagNameMap {
|
|
52
|
+
'ae-button-group': ButtonGroup;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
export default ButtonGroup;
|
|
56
|
+
export type ButtonGroupProps = InferProps<typeof ButtonGroup>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { InferProps } from 'aeico';
|
|
2
|
+
import AeicoComponent from '../aeico-component';
|
|
3
|
+
import type { CardVariant, CardColor } from './defines';
|
|
4
|
+
declare class Card extends AeicoComponent {
|
|
5
|
+
static tagName: string;
|
|
6
|
+
protected static styles: string[];
|
|
7
|
+
accessor color: CardColor;
|
|
8
|
+
accessor variant: CardVariant;
|
|
9
|
+
protected render(): import("aeico-view").RenderResult;
|
|
10
|
+
private _onHeaderSlotChange;
|
|
11
|
+
private _onFooterSlotChange;
|
|
12
|
+
}
|
|
13
|
+
declare global {
|
|
14
|
+
interface HTMLElementTagNameMap {
|
|
15
|
+
'ae-card': Card;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export default Card;
|
|
19
|
+
export type CardProps = InferProps<typeof Card>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import AeicoField from '../aeico-field';
|
|
2
|
+
import type { InferProps, Props } from 'aeico';
|
|
3
|
+
import { CheckboxVariant } from './defines';
|
|
4
|
+
declare class Checkbox extends AeicoField {
|
|
5
|
+
protected fieldElement: HTMLInputElement | null;
|
|
6
|
+
static tagName: string;
|
|
7
|
+
static props: Props;
|
|
8
|
+
checked?: boolean;
|
|
9
|
+
defaultChecked?: boolean;
|
|
10
|
+
variant?: CheckboxVariant;
|
|
11
|
+
protected static styles: string[];
|
|
12
|
+
protected getValue(): boolean;
|
|
13
|
+
protected writeValue(checked: boolean): void;
|
|
14
|
+
protected getEventPayload(checked: boolean, oldChecked: boolean, action: any): {
|
|
15
|
+
checked: boolean;
|
|
16
|
+
oldChecked: boolean;
|
|
17
|
+
action: any;
|
|
18
|
+
};
|
|
19
|
+
protected setValue(checked: boolean, options?: {
|
|
20
|
+
silent?: boolean;
|
|
21
|
+
action?: any;
|
|
22
|
+
}): void;
|
|
23
|
+
reset(checked?: boolean, options?: {
|
|
24
|
+
silent?: boolean;
|
|
25
|
+
}): void;
|
|
26
|
+
clear(options?: {
|
|
27
|
+
silent?: boolean;
|
|
28
|
+
}): void;
|
|
29
|
+
render(): import("aeico-view").RenderResult;
|
|
30
|
+
}
|
|
31
|
+
declare global {
|
|
32
|
+
interface HTMLElementTagNameMap {
|
|
33
|
+
'ae-checkbox': Checkbox;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export default Checkbox;
|
|
37
|
+
export type CheckboxProps = InferProps<typeof Checkbox>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type CheckboxVariant = 'checkbox';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { InferProps } from 'aeico';
|
|
2
|
+
import AeicoComponent from '../aeico-component';
|
|
3
|
+
import type { DetailColor, DetailVariant } from './defines';
|
|
4
|
+
/**
|
|
5
|
+
* Detail component that can be used to show/hide additional content.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```html
|
|
9
|
+
* <ae-detail summary="Click Me">
|
|
10
|
+
* <ae-icon name="plus" slot="expand"></ae-icon>
|
|
11
|
+
* <ae-icon name="minus" slot="collapse"></ae-icon>
|
|
12
|
+
* Detail.....
|
|
13
|
+
* </ae-detail>
|
|
14
|
+
*/
|
|
15
|
+
declare class Detail extends AeicoComponent {
|
|
16
|
+
static tagName: string;
|
|
17
|
+
protected static styles: string[];
|
|
18
|
+
accessor summary: string;
|
|
19
|
+
accessor variant: DetailVariant;
|
|
20
|
+
accessor color: DetailColor;
|
|
21
|
+
accessor disabled: boolean;
|
|
22
|
+
private _open;
|
|
23
|
+
/** Opens the detail panel. */
|
|
24
|
+
open(): void;
|
|
25
|
+
/** Closes the detail panel. */
|
|
26
|
+
close(): void;
|
|
27
|
+
/** Toggles the detail panel open/closed. */
|
|
28
|
+
toggle(): void;
|
|
29
|
+
/** Returns whether the detail panel is currently open. */
|
|
30
|
+
isOpen(): boolean;
|
|
31
|
+
private _handleSummaryClick;
|
|
32
|
+
protected render(): import("aeico-view").RenderResult;
|
|
33
|
+
}
|
|
34
|
+
declare global {
|
|
35
|
+
interface HTMLElementTagNameMap {
|
|
36
|
+
'ae-detail': Detail;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
export default Detail;
|
|
40
|
+
export type DetailProps = InferProps<typeof Detail>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { InferProps, Props } from 'aeico';
|
|
2
|
+
import AeicoComponent from '../aeico-component';
|
|
3
|
+
declare class Dialog extends AeicoComponent {
|
|
4
|
+
static props: Props;
|
|
5
|
+
label?: string;
|
|
6
|
+
width?: string;
|
|
7
|
+
height?: string;
|
|
8
|
+
modal?: boolean;
|
|
9
|
+
closable?: boolean;
|
|
10
|
+
header?: boolean;
|
|
11
|
+
closeOnOverlayClick?: boolean;
|
|
12
|
+
protected static styles: string[];
|
|
13
|
+
private _dialogEl;
|
|
14
|
+
private _hasFooter;
|
|
15
|
+
protected render(): import("aeico-view").RenderResult;
|
|
16
|
+
private _handleDialogClick;
|
|
17
|
+
private _handleNativeClose;
|
|
18
|
+
private _handleFooterSlotChange;
|
|
19
|
+
open(): void;
|
|
20
|
+
close(): void;
|
|
21
|
+
isOpen(): boolean;
|
|
22
|
+
}
|
|
23
|
+
declare global {
|
|
24
|
+
interface HTMLElementTagNameMap {
|
|
25
|
+
'ae-dialog': Dialog;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export default Dialog;
|
|
29
|
+
export type DialogProps = InferProps<typeof Dialog>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import AeicoComponent from '../aeico-component';
|
|
2
|
+
import type { InferProps } from 'aeico';
|
|
3
|
+
/**
|
|
4
|
+
* A simple divider component that can be used to separate content. It supports both horizontal and vertical orientations, as well as customizable thickness and color.
|
|
5
|
+
* @example
|
|
6
|
+
* ```html
|
|
7
|
+
* <ae-divider></ae-divider>
|
|
8
|
+
* <ae-divider vertical></ae-divider>
|
|
9
|
+
* <ae-divider thickness="4px" color="primary"></ae-divider>
|
|
10
|
+
* ```
|
|
11
|
+
* @props
|
|
12
|
+
* - `vertical` (boolean): If true, the divider will be vertical. Default is false (horizontal).
|
|
13
|
+
* - `thickness` (string): Custom thickness for the divider (e.g., "2px", "0.5rem"). If not provided, it will use the default thickness defined in CSS.
|
|
14
|
+
* - `color` (string): Color variant for the divider (e.g., "primary", "secondary"). If not provided, it will use the default color defined in CSS.
|
|
15
|
+
*
|
|
16
|
+
* @csspart divider - The main divider element that can be styled.
|
|
17
|
+
*
|
|
18
|
+
* @cssproperty --thickness - Custom property to set the thickness of the divider when the `thickness` prop is used.
|
|
19
|
+
*/
|
|
20
|
+
declare class Divider extends AeicoComponent {
|
|
21
|
+
static tagName: string;
|
|
22
|
+
accessor vertical: boolean;
|
|
23
|
+
accessor thickness: string | undefined;
|
|
24
|
+
accessor color: string | undefined;
|
|
25
|
+
protected static styles: string[];
|
|
26
|
+
protected render(): void;
|
|
27
|
+
}
|
|
28
|
+
declare global {
|
|
29
|
+
interface HTMLElementTagNameMap {
|
|
30
|
+
'ae-divider': Divider;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export default Divider;
|
|
34
|
+
export type DividerProps = InferProps<typeof Divider>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type DropdownPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'right' | 'right-start' | 'right-end' | 'left' | 'left-start' | 'left-end';
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import AeicoComponent from '../aeico-component';
|
|
2
|
+
import type { InferProps } from 'aeico';
|
|
3
|
+
import type { ButtonColor, ButtonSize, ButtonVariant } from '../button/defines';
|
|
4
|
+
import type { DropdownPlacement } from './defines';
|
|
5
|
+
import './dropdown';
|
|
6
|
+
import '../button/button';
|
|
7
|
+
/**
|
|
8
|
+
* DropdownButton — a pre-composed trigger + dropdown panel.
|
|
9
|
+
*
|
|
10
|
+
* Renders an `ae-button`-styled trigger with a built-in chevron,
|
|
11
|
+
* and a floating panel for `<ae-dropdown-item>` children.
|
|
12
|
+
* Accepts the same `variant`, `color`, `size`, and `disabled` props
|
|
13
|
+
* as `ae-button`, making it a drop-in inside `ae-button-group`.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```html
|
|
17
|
+
* <ae-dropdown-button variant="outlined" color="primary">
|
|
18
|
+
* Actions
|
|
19
|
+
* <ae-dropdown-item value="edit">Edit</ae-dropdown-item>
|
|
20
|
+
* <ae-dropdown-item value="delete">Delete</ae-dropdown-item>
|
|
21
|
+
* </ae-dropdown-button>
|
|
22
|
+
*
|
|
23
|
+
* <!-- Inside ae-button-group -->
|
|
24
|
+
* <ae-button-group compact color="primary">
|
|
25
|
+
* <ae-button>Save</ae-button>
|
|
26
|
+
* <ae-dropdown-button placement="bottom-end">
|
|
27
|
+
* <ae-dropdown-item value="draft">Save as draft</ae-dropdown-item>
|
|
28
|
+
* <ae-dropdown-item value="template">Save as template</ae-dropdown-item>
|
|
29
|
+
* </ae-dropdown-button>
|
|
30
|
+
* </ae-button-group>
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* Emits:
|
|
34
|
+
* - `open` — when the panel opens
|
|
35
|
+
* - `close` — when the panel closes
|
|
36
|
+
* - `select` — `{ detail: { value, label } }` when a menu item is selected
|
|
37
|
+
*/
|
|
38
|
+
declare class DropdownButton extends AeicoComponent {
|
|
39
|
+
static tagName: string;
|
|
40
|
+
protected static styles: string[];
|
|
41
|
+
accessor variant: ButtonVariant;
|
|
42
|
+
accessor color: ButtonColor;
|
|
43
|
+
accessor size: ButtonSize;
|
|
44
|
+
accessor disabled: boolean;
|
|
45
|
+
accessor placement: DropdownPlacement;
|
|
46
|
+
accessor closeOnSelect: boolean;
|
|
47
|
+
private _dropdownEl;
|
|
48
|
+
show(): void;
|
|
49
|
+
hide(): void;
|
|
50
|
+
toggle(): void;
|
|
51
|
+
get open(): boolean;
|
|
52
|
+
protected render(): import("aeico-view").RenderResult;
|
|
53
|
+
}
|
|
54
|
+
declare global {
|
|
55
|
+
interface HTMLElementTagNameMap {
|
|
56
|
+
'ae-dropdown-button': DropdownButton;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
export default DropdownButton;
|
|
60
|
+
export type DropdownButtonProps = InferProps<typeof DropdownButton>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import AeicoComponent from '../aeico-component';
|
|
2
|
+
import type { InferProps } from 'aeico';
|
|
3
|
+
import '../icon/icon';
|
|
4
|
+
/**
|
|
5
|
+
* Dropdown menu item — used as a direct child of `<ae-dropdown>`.
|
|
6
|
+
*
|
|
7
|
+
* Renders as a `<button>` by default, or as an `<a>` anchor when `href` is set.
|
|
8
|
+
* Use `<ae-icon>` inside to add icons, and CSS `color` / `--dropdown-item-color`
|
|
9
|
+
* to apply danger or custom colours.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```html
|
|
13
|
+
* <ae-dropdown-item value="edit"><ae-icon name="edit"></ae-icon>Edit</ae-dropdown-item>
|
|
14
|
+
* <ae-dropdown-item value="delete" style="--dropdown-item-color:var(--color-danger)">Delete</ae-dropdown-item>
|
|
15
|
+
* <ae-dropdown-item href="/profile">Profile</ae-dropdown-item>
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
declare class DropdownItem extends AeicoComponent {
|
|
19
|
+
static tagName: string;
|
|
20
|
+
/** Value emitted in the `select` event detail on the parent dropdown. */
|
|
21
|
+
accessor value: string | undefined;
|
|
22
|
+
/** Disables the item — it becomes non-interactive and visually dimmed. */
|
|
23
|
+
accessor disabled: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* When set, the item renders as an `<a>` anchor element instead of a
|
|
26
|
+
* `<button>`. Useful for navigation items.
|
|
27
|
+
*/
|
|
28
|
+
accessor href: string | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* When `type="checkbox"`, the item behaves as a toggle: each click flips
|
|
31
|
+
* `checked` and includes the new state in the `select` event detail.
|
|
32
|
+
*/
|
|
33
|
+
accessor type: 'checkbox' | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Whether the item is checked. Only meaningful when `type="checkbox"`.
|
|
36
|
+
* Reflects as the `checked` attribute.
|
|
37
|
+
*/
|
|
38
|
+
accessor checked: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Marks the item as the currently active/selected option (e.g. current route,
|
|
41
|
+
* current sort order). Purely visual — applies a highlighted background and
|
|
42
|
+
* accent colour.
|
|
43
|
+
*/
|
|
44
|
+
accessor active: boolean;
|
|
45
|
+
protected static styles: string[];
|
|
46
|
+
connectedCallback(): void;
|
|
47
|
+
private _handleClick;
|
|
48
|
+
protected render(): import("aeico-view").RenderResult;
|
|
49
|
+
}
|
|
50
|
+
declare global {
|
|
51
|
+
interface HTMLElementTagNameMap {
|
|
52
|
+
'ae-dropdown-item': DropdownItem;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
export default DropdownItem;
|
|
56
|
+
export type DropdownItemProps = InferProps<typeof DropdownItem>;
|