@db-ux/ngx-core-components 3.0.2-copilot2-e7bf98b → 3.0.2-shell2-badc28f
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 -11
- package/components/accordion/accordion.d.ts +30 -0
- package/components/accordion/index.d.ts +1 -0
- package/components/accordion/model.d.ts +41 -0
- package/components/accordion-item/accordion-item.d.ts +33 -0
- package/components/accordion-item/index.d.ts +1 -0
- package/components/accordion-item/model.d.ts +24 -0
- package/components/badge/badge.d.ts +27 -0
- package/components/badge/index.d.ts +1 -0
- package/components/badge/model.d.ts +16 -0
- package/components/button/button.d.ts +39 -0
- package/components/button/index.d.ts +1 -0
- package/components/button/model.d.ts +40 -0
- package/components/card/card.d.ts +25 -0
- package/components/card/index.d.ts +1 -0
- package/components/card/model.d.ts +18 -0
- package/components/checkbox/checkbox.d.ts +64 -0
- package/components/checkbox/index.d.ts +1 -0
- package/components/checkbox/model.d.ts +10 -0
- package/components/control-panel-brand/control-panel-brand.d.ts +24 -0
- package/components/control-panel-brand/index.d.ts +1 -0
- package/components/control-panel-brand/model.d.ts +5 -0
- package/components/control-panel-desktop/control-panel-desktop.d.ts +32 -0
- package/components/control-panel-desktop/index.d.ts +1 -0
- package/components/control-panel-desktop/model.d.ts +7 -0
- package/components/control-panel-flat-icon-navigation/control-panel-flat-icon-navigation.d.ts +22 -0
- package/components/control-panel-flat-icon-navigation/index.d.ts +1 -0
- package/components/control-panel-flat-icon-navigation/model.d.ts +7 -0
- package/components/control-panel-meta-navigation/control-panel-meta-navigation.d.ts +19 -0
- package/components/control-panel-meta-navigation/index.d.ts +1 -0
- package/components/control-panel-meta-navigation/model.d.ts +5 -0
- package/components/control-panel-mobile/control-panel-mobile.d.ts +29 -0
- package/components/control-panel-mobile/index.d.ts +1 -0
- package/components/control-panel-mobile/model.d.ts +30 -0
- package/components/control-panel-primary-actions/control-panel-primary-actions.d.ts +19 -0
- package/components/control-panel-primary-actions/index.d.ts +1 -0
- package/components/control-panel-primary-actions/model.d.ts +5 -0
- package/components/control-panel-secondary-actions/control-panel-secondary-actions.d.ts +19 -0
- package/components/control-panel-secondary-actions/index.d.ts +1 -0
- package/components/control-panel-secondary-actions/model.d.ts +5 -0
- package/components/custom-select/custom-select.d.ts +150 -0
- package/components/custom-select/index.d.ts +1 -0
- package/components/custom-select/model.d.ts +223 -0
- package/components/custom-select-dropdown/custom-select-dropdown.d.ts +20 -0
- package/components/custom-select-dropdown/index.d.ts +1 -0
- package/components/custom-select-dropdown/model.d.ts +15 -0
- package/components/custom-select-form-field/custom-select-form-field.d.ts +19 -0
- package/components/custom-select-form-field/index.d.ts +1 -0
- package/components/custom-select-form-field/model.d.ts +5 -0
- package/components/custom-select-list/custom-select-list.d.ts +21 -0
- package/components/custom-select-list/index.d.ts +1 -0
- package/components/custom-select-list/model.d.ts +8 -0
- package/components/custom-select-list-item/custom-select-list-item.d.ts +45 -0
- package/components/custom-select-list-item/index.d.ts +1 -0
- package/components/custom-select-list-item/model.d.ts +29 -0
- package/components/divider/divider.d.ts +23 -0
- package/components/divider/index.d.ts +1 -0
- package/components/divider/model.d.ts +18 -0
- package/components/drawer/drawer.d.ts +38 -0
- package/components/drawer/index.d.ts +1 -0
- package/components/drawer/model.d.ts +54 -0
- package/components/icon/icon.d.ts +23 -0
- package/components/icon/index.d.ts +1 -0
- package/components/icon/model.d.ts +10 -0
- package/components/infotext/index.d.ts +1 -0
- package/components/infotext/infotext.d.ts +25 -0
- package/components/infotext/model.d.ts +5 -0
- package/components/input/index.d.ts +1 -0
- package/components/input/input.d.ts +98 -0
- package/components/input/model.d.ts +43 -0
- package/components/link/index.d.ts +1 -0
- package/components/link/link.d.ts +32 -0
- package/components/link/model.d.ts +24 -0
- package/components/navigation/index.d.ts +1 -0
- package/components/navigation/model.d.ts +14 -0
- package/components/navigation/navigation.d.ts +35 -0
- package/components/navigation-item/index.d.ts +1 -0
- package/components/navigation-item/model.d.ts +19 -0
- package/components/navigation-item/navigation-item.d.ts +26 -0
- package/components/navigation-item-group/index.d.ts +1 -0
- package/components/navigation-item-group/model.d.ts +26 -0
- package/components/navigation-item-group/navigation-item-group.d.ts +49 -0
- package/components/notification/index.d.ts +1 -0
- package/components/notification/model.d.ts +57 -0
- package/components/notification/notification.d.ts +40 -0
- package/components/popover/index.d.ts +1 -0
- package/components/popover/model.d.ts +17 -0
- package/components/popover/popover.d.ts +37 -0
- package/components/radio/index.d.ts +1 -0
- package/components/radio/model.d.ts +5 -0
- package/components/radio/radio.d.ts +47 -0
- package/components/section/index.d.ts +1 -0
- package/components/section/model.d.ts +5 -0
- package/components/section/section.d.ts +22 -0
- package/components/select/index.d.ts +1 -0
- package/components/select/model.d.ts +44 -0
- package/components/select/select.d.ts +83 -0
- package/components/shell/index.d.ts +1 -0
- package/components/shell/model.d.ts +50 -0
- package/components/shell/shell.d.ts +28 -0
- package/components/shell-sub-navigation/index.d.ts +1 -0
- package/components/shell-sub-navigation/model.d.ts +5 -0
- package/components/shell-sub-navigation/shell-sub-navigation.d.ts +27 -0
- package/components/stack/index.d.ts +1 -0
- package/components/stack/model.d.ts +34 -0
- package/components/stack/stack.d.ts +26 -0
- package/components/switch/index.d.ts +1 -0
- package/components/switch/model.d.ts +10 -0
- package/components/switch/switch.d.ts +52 -0
- package/components/tab-item/index.d.ts +1 -0
- package/components/tab-item/model.d.ts +24 -0
- package/components/tab-item/tab-item.d.ts +46 -0
- package/components/tab-list/index.d.ts +1 -0
- package/components/tab-list/model.d.ts +5 -0
- package/components/tab-list/tab-list.d.ts +20 -0
- package/components/tab-panel/index.d.ts +1 -0
- package/components/tab-panel/model.d.ts +10 -0
- package/components/tab-panel/tab-panel.d.ts +20 -0
- package/components/tabs/index.d.ts +1 -0
- package/components/tabs/model.d.ts +58 -0
- package/components/tabs/tabs.d.ts +45 -0
- package/components/tag/index.d.ts +1 -0
- package/components/tag/model.d.ts +47 -0
- package/components/tag/tag.d.ts +34 -0
- package/components/textarea/index.d.ts +1 -0
- package/components/textarea/model.d.ts +34 -0
- package/components/textarea/textarea.d.ts +84 -0
- package/components/tooltip/index.d.ts +1 -0
- package/components/tooltip/model.d.ts +20 -0
- package/components/tooltip/tooltip.d.ts +39 -0
- package/fesm2022/db-ux-ngx-core-components.mjs +8583 -0
- package/fesm2022/db-ux-ngx-core-components.mjs.map +1 -0
- package/index.d.ts +92 -0
- package/package.json +3 -7
- package/shared/constants.d.ts +91 -0
- package/shared/model.d.ts +601 -0
- package/utils/document-click-listener.d.ts +8 -0
- package/utils/document-scroll-listener.d.ts +9 -0
- package/utils/floating-components.d.ts +36 -0
- package/utils/form-components.d.ts +2 -0
- package/utils/index.d.ts +40 -0
- package/utils/navigation.d.ts +28 -0
- package/agent/Accordion.md +0 -52
- package/agent/AccordionItem.md +0 -45
- package/agent/Badge.md +0 -48
- package/agent/Brand.md +0 -29
- package/agent/Button.md +0 -59
- package/agent/Card.md +0 -39
- package/agent/Checkbox.md +0 -52
- package/agent/CustomSelect.md +0 -89
- package/agent/Divider.md +0 -37
- package/agent/Drawer.md +0 -90
- package/agent/Header.md +0 -45
- package/agent/Icon.md +0 -36
- package/agent/Infotext.md +0 -41
- package/agent/Input.md +0 -58
- package/agent/Link.md +0 -60
- package/agent/Navigation.md +0 -34
- package/agent/NavigationItem.md +0 -45
- package/agent/Notification.md +0 -52
- package/agent/Page.md +0 -45
- package/agent/Popover.md +0 -69
- package/agent/Radio.md +0 -39
- package/agent/Section.md +0 -39
- package/agent/Select.md +0 -80
- package/agent/Stack.md +0 -51
- package/agent/Switch.md +0 -55
- package/agent/TabItem.md +0 -41
- package/agent/Tabs.md +0 -80
- package/agent/Tag.md +0 -48
- package/agent/Textarea.md +0 -57
- package/agent/Tooltip.md +0 -64
- package/agent/_instructions.md +0 -31
package/utils/index.d.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ClickEvent, GeneralKeyboardEvent } from '../shared/model';
|
|
2
|
+
export declare const uuid: () => string;
|
|
3
|
+
export declare const addAttributeToChildren: (element: Element, attribute: {
|
|
4
|
+
key: string;
|
|
5
|
+
value: string;
|
|
6
|
+
}) => void;
|
|
7
|
+
export type ClassNameArg = string | {
|
|
8
|
+
[key: string]: boolean | undefined;
|
|
9
|
+
} | undefined;
|
|
10
|
+
export declare const cls: (...args: ClassNameArg[]) => string;
|
|
11
|
+
export declare const isArrayOfStrings: (value: unknown) => value is string[];
|
|
12
|
+
export declare const hasVoiceOver: () => boolean;
|
|
13
|
+
export declare const delay: (fn: () => void, ms: number) => Promise<unknown>;
|
|
14
|
+
/**
|
|
15
|
+
* Some frameworks like stencil would not add "true" as value for a prop
|
|
16
|
+
* if it is used in a framework like angular e.g.: [disabled]="myDisabledProp"
|
|
17
|
+
* @param originBool Some boolean to convert to string
|
|
18
|
+
*/
|
|
19
|
+
export declare const getBooleanAsString: (originBool?: boolean | string) => any;
|
|
20
|
+
export declare const getBoolean: (originBool?: boolean | string, propertyName?: string) => boolean | undefined;
|
|
21
|
+
export declare const getNumber: (originNumber?: number | string, alternativeNumber?: number | string) => number | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Retrieves the input value based on the provided value and input type.
|
|
24
|
+
*
|
|
25
|
+
* If the input type is "number" or "range", the value is processed as a number.
|
|
26
|
+
* Otherwise, the value is returned as-is.
|
|
27
|
+
*
|
|
28
|
+
* @param value - The input value, which can be a number, string, or undefined.
|
|
29
|
+
* @param inputType - The type of the input, such as "number", "range", or other string types.
|
|
30
|
+
* @returns The processed input value as a string, number, or undefined.
|
|
31
|
+
*/
|
|
32
|
+
export declare const getInputValue: (value?: number | string, inputType?: string) => string | number | undefined;
|
|
33
|
+
export declare const getHideProp: (show?: boolean | string) => any;
|
|
34
|
+
export declare const stringPropVisible: (givenString?: string, showString?: boolean | string) => boolean;
|
|
35
|
+
export declare const getSearchInput: (element: HTMLElement) => HTMLInputElement | null;
|
|
36
|
+
export declare const getOptionKey: (option: {
|
|
37
|
+
id?: string;
|
|
38
|
+
value?: string | number | string[] | undefined;
|
|
39
|
+
}, prefix: string) => string;
|
|
40
|
+
export declare const isKeyboardEvent: <T>(event?: ClickEvent<T> | GeneralKeyboardEvent<T>) => event is GeneralKeyboardEvent<T>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type TriangleData = {
|
|
2
|
+
itemRect: DOMRect;
|
|
3
|
+
parentElementWidth: number;
|
|
4
|
+
subNavigationHeight: number;
|
|
5
|
+
padding: number;
|
|
6
|
+
outsideVX: 'left' | 'right' | undefined;
|
|
7
|
+
outsideVY: 'top' | 'bottom' | undefined;
|
|
8
|
+
};
|
|
9
|
+
export declare const isEventTargetNavigationItem: (event: unknown) => boolean;
|
|
10
|
+
export declare class NavigationItemSafeTriangle {
|
|
11
|
+
private readonly element;
|
|
12
|
+
private readonly subNavigation;
|
|
13
|
+
private readonly parentSubNavigation;
|
|
14
|
+
private triangleData?;
|
|
15
|
+
private initialized;
|
|
16
|
+
private mouseX;
|
|
17
|
+
private mouseY;
|
|
18
|
+
constructor(element: HTMLElement | null, subNavigation: HTMLElement | null);
|
|
19
|
+
private init;
|
|
20
|
+
enableFollow(): void;
|
|
21
|
+
disableFollow(): void;
|
|
22
|
+
private getTriangleTipX;
|
|
23
|
+
private getTriangleTipY;
|
|
24
|
+
private hasMouseEnteredSubNavigation;
|
|
25
|
+
private getTriangleCoordinates;
|
|
26
|
+
followByMouseEvent(event: any): void;
|
|
27
|
+
}
|
|
28
|
+
export declare const handleSubNavigationPosition: (element: HTMLElement, level?: number) => void;
|
package/agent/Accordion.md
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
# Accordion Examples (angular)
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
import { Component, effect } from "@angular/core";
|
|
7
|
-
import { CommonModule } from "@angular/common";
|
|
8
|
-
|
|
9
|
-
import { DBAccordion } from "../index";
|
|
10
|
-
|
|
11
|
-
@Component({
|
|
12
|
-
selector: "accordion",
|
|
13
|
-
standalone: true,
|
|
14
|
-
imports: [CommonModule, DBAccordion],
|
|
15
|
-
template: `<ng-container
|
|
16
|
-
><h1>DBAccordion Documentation Examples</h1>
|
|
17
|
-
<h2>1. Default Accordion</h2>
|
|
18
|
-
<db-accordion>Default Accordion</db-accordion>
|
|
19
|
-
<h2>2. Behavior Variants</h2>
|
|
20
|
-
<db-accordion behavior="multiple">Multiple Behavior</db-accordion>
|
|
21
|
-
<db-accordion behavior="single">Single Behavior</db-accordion>
|
|
22
|
-
<h2>3. Initial Open Index</h2>
|
|
23
|
-
<db-accordion [initOpenIndex]="[0, 1]">Initial Open Index</db-accordion>
|
|
24
|
-
<h2>4. Items</h2>
|
|
25
|
-
<db-accordion [items]="getItems()">Accordion with Items</db-accordion>
|
|
26
|
-
<h2>5. Name Attribute</h2>
|
|
27
|
-
<db-accordion name="accordion-name">With Name</db-accordion>
|
|
28
|
-
<h2>6. Variant Types</h2>
|
|
29
|
-
<db-accordion variant="divider">Divider Variant</db-accordion>
|
|
30
|
-
<db-accordion variant="card">Card Variant</db-accordion></ng-container
|
|
31
|
-
> `,
|
|
32
|
-
styles: `:host { display: contents; }`,
|
|
33
|
-
})
|
|
34
|
-
export class Accordion {
|
|
35
|
-
getItems() {
|
|
36
|
-
return [
|
|
37
|
-
{
|
|
38
|
-
text: "Item 1 Content",
|
|
39
|
-
headlinePlain: "Item 1",
|
|
40
|
-
disabled: false,
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
text: "Item 2 Content",
|
|
44
|
-
headlinePlain: "Item 2",
|
|
45
|
-
disabled: true,
|
|
46
|
-
},
|
|
47
|
-
];
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
constructor() {}
|
|
51
|
-
}
|
|
52
|
-
```
|
package/agent/AccordionItem.md
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
# AccordionItem Examples (angular)
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
import { Component, effect } from "@angular/core";
|
|
7
|
-
import { CommonModule } from "@angular/common";
|
|
8
|
-
|
|
9
|
-
import { DBAccordionItem } from "../index";
|
|
10
|
-
|
|
11
|
-
@Component({
|
|
12
|
-
selector: "accordion-item",
|
|
13
|
-
standalone: true,
|
|
14
|
-
imports: [CommonModule, DBAccordionItem],
|
|
15
|
-
template: `<ng-container
|
|
16
|
-
><h1>DBAccordionItem Documentation Examples</h1>
|
|
17
|
-
<h2>1. Default Accordion Item</h2>
|
|
18
|
-
<db-accordion-item>Default Accordion Item</db-accordion-item>
|
|
19
|
-
<h2>2. Initial State</h2>
|
|
20
|
-
<db-accordion-item [defaultOpen]="true">Initially Open</db-accordion-item>
|
|
21
|
-
<db-accordion-item [defaultOpen]="false">
|
|
22
|
-
Initially Closed
|
|
23
|
-
</db-accordion-item>
|
|
24
|
-
<h2>3. Disabled State</h2>
|
|
25
|
-
<db-accordion-item [disabled]="true">
|
|
26
|
-
Disabled Accordion Item
|
|
27
|
-
</db-accordion-item>
|
|
28
|
-
<h2>4. Headline Variants</h2>
|
|
29
|
-
<db-accordion-item [headline]="<strong>Custom Headline</strong>">
|
|
30
|
-
With Custom Headline
|
|
31
|
-
</db-accordion-item>
|
|
32
|
-
<db-accordion-item headlinePlain="Plain Headline">
|
|
33
|
-
With Plain Headline
|
|
34
|
-
</db-accordion-item>
|
|
35
|
-
<h2>5. Toggle Event</h2>
|
|
36
|
-
<db-accordion-item (toggle)="console.log('Toggled:', $event)">
|
|
37
|
-
With Toggle Event
|
|
38
|
-
</db-accordion-item></ng-container
|
|
39
|
-
> `,
|
|
40
|
-
styles: `:host { display: contents; }`,
|
|
41
|
-
})
|
|
42
|
-
export class AccordionItem {
|
|
43
|
-
constructor() {}
|
|
44
|
-
}
|
|
45
|
-
```
|
package/agent/Badge.md
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
# Badge Examples (angular)
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
import { Component, effect } from "@angular/core";
|
|
7
|
-
import { CommonModule } from "@angular/common";
|
|
8
|
-
|
|
9
|
-
import { DBBadge } from "../index";
|
|
10
|
-
|
|
11
|
-
@Component({
|
|
12
|
-
selector: "badge",
|
|
13
|
-
standalone: true,
|
|
14
|
-
imports: [CommonModule, DBBadge],
|
|
15
|
-
template: `<ng-container
|
|
16
|
-
><h1>DBBadge Documentation Examples</h1>
|
|
17
|
-
<h2>1. Default Badge</h2>
|
|
18
|
-
<db-badge>Default Badge</db-badge>
|
|
19
|
-
<h2>2. Semantic Variants</h2>
|
|
20
|
-
<db-badge semantic="adaptive">Adaptive</db-badge>
|
|
21
|
-
<db-badge semantic="neutral">Neutral</db-badge>
|
|
22
|
-
<db-badge semantic="critical">Critical</db-badge>
|
|
23
|
-
<db-badge semantic="informational">Informational</db-badge>
|
|
24
|
-
<db-badge semantic="warning">Warning</db-badge>
|
|
25
|
-
<db-badge semantic="successful">Successful</db-badge>
|
|
26
|
-
<h2>3. Sizes</h2>
|
|
27
|
-
<db-badge size="small">Small</db-badge>
|
|
28
|
-
<db-badge size="medium">Medium</db-badge>
|
|
29
|
-
<h2>4. Emphasis Variants</h2>
|
|
30
|
-
<db-badge emphasis="weak">Weak Emphasis</db-badge>
|
|
31
|
-
<db-badge emphasis="strong">Strong Emphasis</db-badge>
|
|
32
|
-
<h2>5. Placement Variants</h2>
|
|
33
|
-
<db-badge placement="inline">Inline</db-badge>
|
|
34
|
-
<db-badge placement="corner-top-left">Corner Top Left</db-badge>
|
|
35
|
-
<db-badge placement="corner-top-right">Corner Top Right</db-badge>
|
|
36
|
-
<db-badge placement="corner-center-left">Corner Center Left</db-badge>
|
|
37
|
-
<db-badge placement="corner-center-right"> Corner Center Right </db-badge>
|
|
38
|
-
<db-badge placement="corner-bottom-left">Corner Bottom Left</db-badge>
|
|
39
|
-
<db-badge placement="corner-bottom-right"> Corner Bottom Right </db-badge>
|
|
40
|
-
<h2>6. Custom Label</h2>
|
|
41
|
-
<db-badge label="Custom Label">With Custom Label</db-badge></ng-container
|
|
42
|
-
> `,
|
|
43
|
-
styles: `:host { display: contents; }`,
|
|
44
|
-
})
|
|
45
|
-
export class Badge {
|
|
46
|
-
constructor() {}
|
|
47
|
-
}
|
|
48
|
-
```
|
package/agent/Brand.md
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
# Brand Examples (angular)
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
import { Component, effect } from "@angular/core";
|
|
7
|
-
import { CommonModule } from "@angular/common";
|
|
8
|
-
|
|
9
|
-
import { DBBrand } from "../index";
|
|
10
|
-
|
|
11
|
-
@Component({
|
|
12
|
-
selector: "brand",
|
|
13
|
-
standalone: true,
|
|
14
|
-
imports: [CommonModule, DBBrand],
|
|
15
|
-
template: `<ng-container
|
|
16
|
-
><h1>DBBrand Documentation Examples</h1>
|
|
17
|
-
<h2>1. Default Brand</h2>
|
|
18
|
-
<db-brand>Default Brand</db-brand>
|
|
19
|
-
<h2>2. Icon Visibility</h2>
|
|
20
|
-
<db-brand [showIcon]="false">Icon Hidden</db-brand>
|
|
21
|
-
<h2>3. Custom Text</h2>
|
|
22
|
-
<db-brand text="Custom Brand Text">With Custom Text</db-brand></ng-container
|
|
23
|
-
> `,
|
|
24
|
-
styles: `:host { display: contents; }`,
|
|
25
|
-
})
|
|
26
|
-
export class Brand {
|
|
27
|
-
constructor() {}
|
|
28
|
-
}
|
|
29
|
-
```
|
package/agent/Button.md
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
# Button Examples (angular)
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
import { Component, effect } from "@angular/core";
|
|
7
|
-
import { CommonModule } from "@angular/common";
|
|
8
|
-
|
|
9
|
-
import { DBButton } from "../index";
|
|
10
|
-
|
|
11
|
-
@Component({
|
|
12
|
-
selector: "button",
|
|
13
|
-
standalone: true,
|
|
14
|
-
imports: [CommonModule, DBButton],
|
|
15
|
-
template: `<ng-container
|
|
16
|
-
><h1>DBButton Documentation Examples</h1>
|
|
17
|
-
<h2>1. Default Button</h2>
|
|
18
|
-
<db-button>Button</db-button>
|
|
19
|
-
<h2>2. Variants</h2>
|
|
20
|
-
<db-button variant="filled">Filled</db-button>
|
|
21
|
-
<db-button variant="outlined">Outlined</db-button>
|
|
22
|
-
<db-button variant="ghost">Ghost</db-button>
|
|
23
|
-
<db-button variant="brand">Brand</db-button>
|
|
24
|
-
<h2>3. Sizes</h2>
|
|
25
|
-
<db-button size="small">Small</db-button>
|
|
26
|
-
<db-button size="medium">Medium</db-button>
|
|
27
|
-
<h2>4. Icon Only</h2>
|
|
28
|
-
<db-button icon="check" [noText]="true"></db-button>
|
|
29
|
-
<h2>5. Disabled</h2>
|
|
30
|
-
<db-button [disabled]="true">Disabled</db-button>
|
|
31
|
-
<h2>6. Button Types</h2>
|
|
32
|
-
<db-button type="button">Type=button</db-button>
|
|
33
|
-
<db-button type="submit">Type=submit</db-button>
|
|
34
|
-
<db-button type="reset">Type=reset</db-button>
|
|
35
|
-
<h2>7. Form Association</h2>
|
|
36
|
-
<form id="example-form">
|
|
37
|
-
<input name="exampleInput" placeholder="Example input" />
|
|
38
|
-
</form>
|
|
39
|
-
<db-button form="example-form" type="submit"> Submit Form </db-button>
|
|
40
|
-
<h2>8. Name & Value</h2>
|
|
41
|
-
<db-button name="testName" value="testValue"> Name/Value </db-button>
|
|
42
|
-
<h2>9. Width</h2>
|
|
43
|
-
<db-button width="full">Full width</db-button>
|
|
44
|
-
<db-button width="auto">Auto width</db-button>
|
|
45
|
-
<h2>10. Icon Visibility</h2>
|
|
46
|
-
<db-button icon="check" [showIcon]="false"> Icon Hidden </db-button>
|
|
47
|
-
<h2>11. Custom Class</h2>
|
|
48
|
-
<db-button className="my-custom-class">Custom Class</db-button>
|
|
49
|
-
<h2>12. Click Event</h2>
|
|
50
|
-
<db-button (click)="alert('Button clicked!')">
|
|
51
|
-
Click Me
|
|
52
|
-
</db-button></ng-container
|
|
53
|
-
> `,
|
|
54
|
-
styles: `:host { display: contents; }`,
|
|
55
|
-
})
|
|
56
|
-
export class Button {
|
|
57
|
-
constructor() {}
|
|
58
|
-
}
|
|
59
|
-
```
|
package/agent/Card.md
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
# Card Examples (angular)
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
import { Component, effect } from "@angular/core";
|
|
7
|
-
import { CommonModule } from "@angular/common";
|
|
8
|
-
|
|
9
|
-
import { DBCard } from "../index";
|
|
10
|
-
|
|
11
|
-
@Component({
|
|
12
|
-
selector: "card",
|
|
13
|
-
standalone: true,
|
|
14
|
-
imports: [CommonModule, DBCard],
|
|
15
|
-
template: `<ng-container
|
|
16
|
-
><h1>DBCard Documentation Examples</h1>
|
|
17
|
-
<h2>1. Default Card</h2>
|
|
18
|
-
<db-card>Default Card</db-card>
|
|
19
|
-
<h2>2. Behaviors</h2>
|
|
20
|
-
<db-card behavior="static">Static</db-card>
|
|
21
|
-
<db-card behavior="interactive">Interactive</db-card>
|
|
22
|
-
<h2>3. Elevation Levels</h2>
|
|
23
|
-
<db-card elevationLevel="1">Elevation Level 1</db-card>
|
|
24
|
-
<db-card elevationLevel="2">Elevation Level 2</db-card>
|
|
25
|
-
<db-card elevationLevel="3">Elevation Level 3</db-card>
|
|
26
|
-
<h2>4. Custom Class</h2>
|
|
27
|
-
<db-card className="my-custom-class">Custom Class</db-card>
|
|
28
|
-
<h2>5. Spacing</h2>
|
|
29
|
-
<db-card spacing="medium">Medium Spacing</db-card>
|
|
30
|
-
<db-card spacing="small">Small Spacing</db-card>
|
|
31
|
-
<db-card spacing="large">Large Spacing</db-card>
|
|
32
|
-
<db-card spacing="none">No Spacing</db-card></ng-container
|
|
33
|
-
> `,
|
|
34
|
-
styles: `:host { display: contents; }`,
|
|
35
|
-
})
|
|
36
|
-
export class Card {
|
|
37
|
-
constructor() {}
|
|
38
|
-
}
|
|
39
|
-
```
|
package/agent/Checkbox.md
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
# Checkbox Examples (angular)
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
import { Component, effect } from "@angular/core";
|
|
7
|
-
import { CommonModule } from "@angular/common";
|
|
8
|
-
|
|
9
|
-
import { DBCheckbox } from "../index";
|
|
10
|
-
|
|
11
|
-
@Component({
|
|
12
|
-
selector: "checkbox",
|
|
13
|
-
standalone: true,
|
|
14
|
-
imports: [CommonModule, DBCheckbox],
|
|
15
|
-
template: `<ng-container
|
|
16
|
-
><h1>DBCheckbox Documentation Examples</h1>
|
|
17
|
-
<h2>1. Default Checkbox</h2>
|
|
18
|
-
<db-checkbox label="Default Checkbox"></db-checkbox>
|
|
19
|
-
<h2>2. Indeterminate State</h2>
|
|
20
|
-
<db-checkbox
|
|
21
|
-
label="Indeterminate Checkbox"
|
|
22
|
-
[indeterminate]="true"
|
|
23
|
-
></db-checkbox>
|
|
24
|
-
<h2>3. Sizes</h2>
|
|
25
|
-
<db-checkbox size="small" label="Small Checkbox"></db-checkbox>
|
|
26
|
-
<db-checkbox size="medium" label="Medium Checkbox"></db-checkbox>
|
|
27
|
-
<h2>4. Validation States</h2>
|
|
28
|
-
<db-checkbox validation="valid" label="Valid Checkbox"></db-checkbox>
|
|
29
|
-
<db-checkbox validation="invalid" label="Invalid Checkbox"></db-checkbox>
|
|
30
|
-
<db-checkbox
|
|
31
|
-
validation="no-validation"
|
|
32
|
-
label="No Validation Checkbox"
|
|
33
|
-
></db-checkbox>
|
|
34
|
-
<h2>5. Disabled State</h2>
|
|
35
|
-
<db-checkbox label="Disabled Checkbox" [disabled]="true"></db-checkbox>
|
|
36
|
-
<h2>6. Message Property Example</h2>
|
|
37
|
-
<db-checkbox
|
|
38
|
-
label="Checkbox with Message"
|
|
39
|
-
message="This is a helper message."
|
|
40
|
-
></db-checkbox>
|
|
41
|
-
<h2>7. Change Event Example</h2>
|
|
42
|
-
<db-checkbox
|
|
43
|
-
label="Change Event"
|
|
44
|
-
(change)="console.log('Change event:', $event.target.checked)"
|
|
45
|
-
></db-checkbox
|
|
46
|
-
></ng-container> `,
|
|
47
|
-
styles: `:host { display: contents; }`,
|
|
48
|
-
})
|
|
49
|
-
export class Checkbox {
|
|
50
|
-
constructor() {}
|
|
51
|
-
}
|
|
52
|
-
```
|
package/agent/CustomSelect.md
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
# CustomSelect Examples (angular)
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
import { Component, effect } from "@angular/core";
|
|
7
|
-
import { CommonModule } from "@angular/common";
|
|
8
|
-
|
|
9
|
-
import { DBCustomSelect } from "../index";
|
|
10
|
-
|
|
11
|
-
@Component({
|
|
12
|
-
selector: "custom-select",
|
|
13
|
-
standalone: true,
|
|
14
|
-
imports: [CommonModule, DBCustomSelect],
|
|
15
|
-
template: `<ng-container
|
|
16
|
-
><h1>DBCustomSelect Documentation Examples</h1>
|
|
17
|
-
<h2>1. Default Custom Select</h2>
|
|
18
|
-
<db-custom-select
|
|
19
|
-
label="Default Custom Select"
|
|
20
|
-
[options]="getOptions()"
|
|
21
|
-
></db-custom-select>
|
|
22
|
-
<h2>3. Multiple Select</h2>
|
|
23
|
-
<db-custom-select
|
|
24
|
-
label="Multiple Custom Select"
|
|
25
|
-
[multiple]="true"
|
|
26
|
-
[options]="getOptions()"
|
|
27
|
-
></db-custom-select>
|
|
28
|
-
<h2>4. Disabled State</h2>
|
|
29
|
-
<db-custom-select
|
|
30
|
-
label="Disabled Custom Select"
|
|
31
|
-
[disabled]="true"
|
|
32
|
-
[options]="getOptions()"
|
|
33
|
-
></db-custom-select>
|
|
34
|
-
<h2>5. Validation States</h2>
|
|
35
|
-
<db-custom-select
|
|
36
|
-
validMessage="This is a valid selection"
|
|
37
|
-
validation="valid"
|
|
38
|
-
label="Valid Custom Select"
|
|
39
|
-
[options]="getOptions()"
|
|
40
|
-
></db-custom-select>
|
|
41
|
-
<db-custom-select
|
|
42
|
-
invalidMessage="This is an invalid selection"
|
|
43
|
-
validation="invalid"
|
|
44
|
-
label="Invalid Custom Select"
|
|
45
|
-
[options]="getOptions()"
|
|
46
|
-
></db-custom-select>
|
|
47
|
-
<db-custom-select
|
|
48
|
-
validation="no-validation"
|
|
49
|
-
label="No Validation Custom Select"
|
|
50
|
-
[options]="getOptions()"
|
|
51
|
-
></db-custom-select>
|
|
52
|
-
<h2>6. Change Event Example</h2>
|
|
53
|
-
<db-custom-select
|
|
54
|
-
label="Change Event"
|
|
55
|
-
(change)="console.log('Change event:', $event.target.value)"
|
|
56
|
-
[options]="getOptions()"
|
|
57
|
-
></db-custom-select>
|
|
58
|
-
<h2>7. Placeholder Example</h2>
|
|
59
|
-
<db-custom-select
|
|
60
|
-
label="Custom Select with Placeholder"
|
|
61
|
-
placeholder="Select an option"
|
|
62
|
-
[options]="getOptions()"
|
|
63
|
-
></db-custom-select
|
|
64
|
-
></ng-container> `,
|
|
65
|
-
styles: `:host { display: contents; }`,
|
|
66
|
-
})
|
|
67
|
-
export class CustomSelect {
|
|
68
|
-
getOptions() {
|
|
69
|
-
return [
|
|
70
|
-
{
|
|
71
|
-
value: "1",
|
|
72
|
-
label: "Option 1",
|
|
73
|
-
selected: false,
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
value: "2",
|
|
77
|
-
label: "Option 2",
|
|
78
|
-
disabled: true,
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
value: "3",
|
|
82
|
-
label: "Option 3",
|
|
83
|
-
},
|
|
84
|
-
];
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
constructor() {}
|
|
88
|
-
}
|
|
89
|
-
```
|
package/agent/Divider.md
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
# Divider Examples (angular)
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
import { Component, effect } from "@angular/core";
|
|
7
|
-
import { CommonModule } from "@angular/common";
|
|
8
|
-
|
|
9
|
-
import { DBDivider } from "../index";
|
|
10
|
-
|
|
11
|
-
@Component({
|
|
12
|
-
selector: "divider",
|
|
13
|
-
standalone: true,
|
|
14
|
-
imports: [CommonModule, DBDivider],
|
|
15
|
-
template: `<ng-container
|
|
16
|
-
><h1>DBDivider Documentation Examples</h1>
|
|
17
|
-
<h2>1. Default Divider</h2>
|
|
18
|
-
<db-divider></db-divider>
|
|
19
|
-
<h2>2. Margin Variants</h2>
|
|
20
|
-
<db-divider margin="none"></db-divider>
|
|
21
|
-
<db-divider margin="_"></db-divider>
|
|
22
|
-
<h2>3. Orientation Variants</h2>
|
|
23
|
-
<db-divider variant="horizontal"></db-divider>
|
|
24
|
-
<db-divider variant="vertical"></db-divider>
|
|
25
|
-
<h2>4. Emphasis Variants</h2>
|
|
26
|
-
<db-divider emphasis="weak"></db-divider>
|
|
27
|
-
<db-divider emphasis="strong"></db-divider>
|
|
28
|
-
<h2>5. Width Variants</h2>
|
|
29
|
-
<db-divider width="full"></db-divider>
|
|
30
|
-
<db-divider width="auto"></db-divider
|
|
31
|
-
></ng-container> `,
|
|
32
|
-
styles: `:host { display: contents; }`,
|
|
33
|
-
})
|
|
34
|
-
export class Divider {
|
|
35
|
-
constructor() {}
|
|
36
|
-
}
|
|
37
|
-
```
|
package/agent/Drawer.md
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
## CSS Properties
|
|
2
|
-
|
|
3
|
-
| CSS Variable | Default | CSS Property | Description | Example |
|
|
4
|
-
| --- | --- | --- | --- | --- |
|
|
5
|
-
| `--db-drawer-max-height` | `calc(100% - #{variables.$db-spacing-fixed-xl})` | max-block-size | Sets the maximum height of the drawer | — |
|
|
6
|
-
| `--db-drawer-header-padding-block-end` | `#{map.get($spacing, "block")}` | padding-block-end | Controls the bottom padding inside the drawer header | — |
|
|
7
|
-
| `--db-drawer-content-padding-inline` | `#{map.get($spacing, "inline")}` | padding-inline | Controls left/right padding inside the drawer content area | — |
|
|
8
|
-
| `--db-drawer-max-width` | `calc(100% - #{variables.$db-spacing-fixed-xl})` | max-inline-size | Sets the maximum width of the drawer and some default values for the drawer | <pre>css - Wide drawer<br>.db-drawer-wide {<br>--db-drawer-max-width: 800px;<br>}<br><div class="db-drawer db-drawer-wide"><br><!-- wide drawer --><br></div><br></pre> |
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
# Drawer Examples (angular)
|
|
12
|
-
|
|
13
|
-
```ts
|
|
14
|
-
import { Component, effect, signal } from "@angular/core";
|
|
15
|
-
import { CommonModule } from "@angular/common";
|
|
16
|
-
|
|
17
|
-
import { DBButton } from "../../button";
|
|
18
|
-
import { DBDrawer } from "../index";
|
|
19
|
-
|
|
20
|
-
@Component({
|
|
21
|
-
selector: "drawer",
|
|
22
|
-
standalone: true,
|
|
23
|
-
imports: [CommonModule, DBButton, DBDrawer],
|
|
24
|
-
template: `<ng-container
|
|
25
|
-
><h1>DBDrawer Documentation Examples</h1>
|
|
26
|
-
<h2>1. Default Drawer</h2>
|
|
27
|
-
<div>
|
|
28
|
-
<db-button
|
|
29
|
-
(click)="{
|
|
30
|
-
open.set(true);
|
|
31
|
-
}"
|
|
32
|
-
>
|
|
33
|
-
Open Me
|
|
34
|
-
</db-button>
|
|
35
|
-
<db-drawer
|
|
36
|
-
[open]="open()"
|
|
37
|
-
(close)="{
|
|
38
|
-
open.set(false);
|
|
39
|
-
}"
|
|
40
|
-
[drawerHeader]="<header>Optional drawer header</header>"
|
|
41
|
-
>
|
|
42
|
-
My Drawer content
|
|
43
|
-
</db-drawer>
|
|
44
|
-
</div>
|
|
45
|
-
<h2>2. Drawer Variants</h2>
|
|
46
|
-
<div>
|
|
47
|
-
<db-button
|
|
48
|
-
(click)="{
|
|
49
|
-
open.set(true);
|
|
50
|
-
}"
|
|
51
|
-
>
|
|
52
|
-
Open Modal Drawer
|
|
53
|
-
</db-button>
|
|
54
|
-
<db-drawer
|
|
55
|
-
variant="modal"
|
|
56
|
-
[open]="open()"
|
|
57
|
-
(close)="{
|
|
58
|
-
open.set(false);
|
|
59
|
-
}"
|
|
60
|
-
>
|
|
61
|
-
Modal Drawer content
|
|
62
|
-
</db-drawer>
|
|
63
|
-
</div>
|
|
64
|
-
<div>
|
|
65
|
-
<db-button
|
|
66
|
-
(click)="{
|
|
67
|
-
open.set(true);
|
|
68
|
-
}"
|
|
69
|
-
>
|
|
70
|
-
Open Inside Drawer
|
|
71
|
-
</db-button>
|
|
72
|
-
<db-drawer
|
|
73
|
-
variant="inside"
|
|
74
|
-
[open]="open()"
|
|
75
|
-
(close)="{
|
|
76
|
-
open.set(false);
|
|
77
|
-
}"
|
|
78
|
-
>
|
|
79
|
-
Inside Drawer content
|
|
80
|
-
</db-drawer>
|
|
81
|
-
</div></ng-container
|
|
82
|
-
> `,
|
|
83
|
-
styles: `:host { display: contents; }`,
|
|
84
|
-
})
|
|
85
|
-
export class Drawer {
|
|
86
|
-
open = signal<boolean>(false);
|
|
87
|
-
|
|
88
|
-
constructor() {}
|
|
89
|
-
}
|
|
90
|
-
```
|
package/agent/Header.md
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
# Header Examples (angular)
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
import { Component, effect, signal } from "@angular/core";
|
|
7
|
-
import { CommonModule } from "@angular/common";
|
|
8
|
-
|
|
9
|
-
import { DBNavigation } from "../../navigation";
|
|
10
|
-
import { DBNavigationItem } from "../../navigation-item";
|
|
11
|
-
import { DBHeader } from "../index";
|
|
12
|
-
|
|
13
|
-
@Component({
|
|
14
|
-
selector: "header",
|
|
15
|
-
standalone: true,
|
|
16
|
-
imports: [CommonModule, DBHeader, DBNavigation, DBNavigationItem],
|
|
17
|
-
template: `<ng-container
|
|
18
|
-
><h1>DBHeader Documentation Examples</h1>
|
|
19
|
-
<h2>1. Default Header</h2>
|
|
20
|
-
<db-header [drawerOpen]="drawerOpen()" (toggle)="drawerOpen.set($event)">
|
|
21
|
-
<db-brand brand>My Awesome App</db-header>
|
|
22
|
-
<ng-container *dbMetaNavigation><db-link href="#">Imprint</db-link><db-link href="#">Help</db-link></ng-container>
|
|
23
|
-
<ng-container primary-action><db-button icon="magnifying_glass" variant="ghost" noText>Search</db-button></ng-container>
|
|
24
|
-
<ng-container *secondaryAction><db-button icon="x_placeholder" variant="ghost" noText>Profile</db-button><db-button icon="alert" variant="ghost" noText>Notification</db-button><db-button icon="help" variant="ghost" noText>Help</db-button></ng-container>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
<db-navigation
|
|
28
|
-
><db-navigation-item><a href="#">Navi-Item 1</a></db-navigation-item>
|
|
29
|
-
<db-navigation-item icon="x_placeholder"
|
|
30
|
-
><a href="#">Navi-Item 2</a></db-navigation-item
|
|
31
|
-
>
|
|
32
|
-
<db-navigation-item [disabled]="true"
|
|
33
|
-
><a href="#">Navi-Item 3</a></db-navigation-item
|
|
34
|
-
></db-navigation
|
|
35
|
-
></db-header
|
|
36
|
-
></ng-container
|
|
37
|
-
> `,
|
|
38
|
-
styles: `:host { display: contents; }`,
|
|
39
|
-
})
|
|
40
|
-
export class Header {
|
|
41
|
-
drawerOpen = signal<boolean>(false);
|
|
42
|
-
|
|
43
|
-
constructor() {}
|
|
44
|
-
}
|
|
45
|
-
```
|