@db-ux/v-core-components 3.1.16 → 3.1.18
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 +11 -0
- package/agent/Accordion.md +42 -0
- package/agent/AccordionItem.md +31 -0
- package/agent/Badge.md +38 -0
- package/agent/Brand.md +19 -0
- package/agent/Button.md +47 -0
- package/agent/Card.md +29 -0
- package/agent/Checkbox.md +39 -0
- package/agent/CustomSelect.md +79 -0
- package/agent/Divider.md +27 -0
- package/agent/Drawer.md +91 -0
- package/agent/Header.md +35 -0
- package/agent/Icon.md +26 -0
- package/agent/Infotext.md +29 -0
- package/agent/Input.md +48 -0
- package/agent/Link.md +42 -0
- package/agent/Navigation.md +23 -0
- package/agent/NavigationItem.md +29 -0
- package/agent/Notification.md +40 -0
- package/agent/Page.md +33 -0
- package/agent/Popover.md +50 -0
- package/agent/Radio.md +29 -0
- package/agent/Section.md +27 -0
- package/agent/Select.md +70 -0
- package/agent/Stack.md +41 -0
- package/agent/Switch.md +36 -0
- package/agent/TabItem.md +29 -0
- package/agent/Tabs.md +55 -0
- package/agent/Tag.md +38 -0
- package/agent/Textarea.md +43 -0
- package/agent/Tooltip.md +48 -0
- package/agent/_instructions.md +31 -0
- package/dist/components/tabs/model.d.ts +1 -0
- package/dist/db-ux.es.js +1060 -1053
- package/dist/db-ux.umd.js +1 -1
- package/package.json +6 -4
package/README.md
CHANGED
|
@@ -95,6 +95,17 @@ Both Inputs in this example do the same:
|
|
|
95
95
|
</template>
|
|
96
96
|
```
|
|
97
97
|
|
|
98
|
+
## Documentation for AI Agents
|
|
99
|
+
|
|
100
|
+
We provide a documentation for every component in the DB UX Design System via `docs` folder.
|
|
101
|
+
To consume those documentation for AI Agents (currently GitHub Copilot) the best way is to copy the `docs` folder into your project.
|
|
102
|
+
|
|
103
|
+
We provide a [CLI tool (`@db-ux/agent-cli`)](https://www.npmjs.com/package/@db-ux/agent-cli) to do this automatically, which you can run with:
|
|
104
|
+
|
|
105
|
+
```shell
|
|
106
|
+
npx @db-ux/agent-cli
|
|
107
|
+
```
|
|
108
|
+
|
|
98
109
|
## Deutsche Bahn brand
|
|
99
110
|
|
|
100
111
|
As we'd like to perfectly support our users and customers on their digital journey, the usage of Deutsche Bahn brand and trademarks are bound of clear guidelines and restrictions even if being used with the code that we're providing with this product; Deutsche Bahn fully reserves all rights regarding the Deutsche Bahn brand, even though that we're providing the code of DB UX Design System products free to use and release it under the Apache 2.0 license.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
# Accordion Examples (vue)
|
|
4
|
+
|
|
5
|
+
```vue
|
|
6
|
+
<template>
|
|
7
|
+
<h1>DBAccordion Documentation Examples</h1>
|
|
8
|
+
<h2>1. Default Accordion</h2>
|
|
9
|
+
<DBAccordion>Default Accordion</DBAccordion>
|
|
10
|
+
<h2>2. Behavior Variants</h2>
|
|
11
|
+
<DBAccordion behavior="multiple">Multiple Behavior</DBAccordion>
|
|
12
|
+
<DBAccordion behavior="single">Single Behavior</DBAccordion>
|
|
13
|
+
<h2>3. Initial Open Index</h2>
|
|
14
|
+
<DBAccordion :initOpenIndex="[0, 1]">Initial Open Index</DBAccordion>
|
|
15
|
+
<h2>4. Items</h2>
|
|
16
|
+
<DBAccordion :items="getItems()">Accordion with Items</DBAccordion>
|
|
17
|
+
<h2>5. Name Attribute</h2>
|
|
18
|
+
<DBAccordion name="accordion-name">With Name</DBAccordion>
|
|
19
|
+
<h2>6. Variant Types</h2>
|
|
20
|
+
<DBAccordion variant="divider">Divider Variant</DBAccordion>
|
|
21
|
+
<DBAccordion variant="card">Card Variant</DBAccordion>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script setup lang="ts">
|
|
25
|
+
import { DBAccordion } from "@db-ux/v-v-core-components";
|
|
26
|
+
|
|
27
|
+
function getItems() {
|
|
28
|
+
return [
|
|
29
|
+
{
|
|
30
|
+
text: "Item 1 Content",
|
|
31
|
+
headlinePlain: "Item 1",
|
|
32
|
+
disabled: false,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
text: "Item 2 Content",
|
|
36
|
+
headlinePlain: "Item 2",
|
|
37
|
+
disabled: true,
|
|
38
|
+
},
|
|
39
|
+
];
|
|
40
|
+
}
|
|
41
|
+
</script>
|
|
42
|
+
```
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
# AccordionItem Examples (vue)
|
|
4
|
+
|
|
5
|
+
```vue
|
|
6
|
+
<template>
|
|
7
|
+
<h1>DBAccordionItem Documentation Examples</h1>
|
|
8
|
+
<h2>1. Default Accordion Item</h2>
|
|
9
|
+
<DBAccordionItem>Default Accordion Item</DBAccordionItem>
|
|
10
|
+
<h2>2. Initial State</h2>
|
|
11
|
+
<DBAccordionItem :defaultOpen="true">Initially Open</DBAccordionItem>
|
|
12
|
+
<DBAccordionItem :defaultOpen="false"> Initially Closed </DBAccordionItem>
|
|
13
|
+
<h2>3. Disabled State</h2>
|
|
14
|
+
<DBAccordionItem :disabled="true"> Disabled Accordion Item </DBAccordionItem>
|
|
15
|
+
<h2>4. Headline Variants</h2>
|
|
16
|
+
<DBAccordionItem :headline="<strong>Custom Headline</strong>">
|
|
17
|
+
With Custom Headline
|
|
18
|
+
</DBAccordionItem>
|
|
19
|
+
<DBAccordionItem headlinePlain="Plain Headline">
|
|
20
|
+
With Plain Headline
|
|
21
|
+
</DBAccordionItem>
|
|
22
|
+
<h2>5. Toggle Event</h2>
|
|
23
|
+
<DBAccordionItem :onToggle="(open) => console.log('Toggled:', open)">
|
|
24
|
+
With Toggle Event
|
|
25
|
+
</DBAccordionItem>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<script setup lang="ts">
|
|
29
|
+
import { DBAccordionItem } from "@db-ux/v-v-core-components";
|
|
30
|
+
</script>
|
|
31
|
+
```
|
package/agent/Badge.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
# Badge Examples (vue)
|
|
4
|
+
|
|
5
|
+
```vue
|
|
6
|
+
<template>
|
|
7
|
+
<h1>DBBadge Documentation Examples</h1>
|
|
8
|
+
<h2>1. Default Badge</h2>
|
|
9
|
+
<DBBadge>Default Badge</DBBadge>
|
|
10
|
+
<h2>2. Semantic Variants</h2>
|
|
11
|
+
<DBBadge semantic="adaptive">Adaptive</DBBadge>
|
|
12
|
+
<DBBadge semantic="neutral">Neutral</DBBadge>
|
|
13
|
+
<DBBadge semantic="critical">Critical</DBBadge>
|
|
14
|
+
<DBBadge semantic="informational">Informational</DBBadge>
|
|
15
|
+
<DBBadge semantic="warning">Warning</DBBadge>
|
|
16
|
+
<DBBadge semantic="successful">Successful</DBBadge>
|
|
17
|
+
<h2>3. Sizes</h2>
|
|
18
|
+
<DBBadge size="small">Small</DBBadge>
|
|
19
|
+
<DBBadge size="medium">Medium</DBBadge>
|
|
20
|
+
<h2>4. Emphasis Variants</h2>
|
|
21
|
+
<DBBadge emphasis="weak">Weak Emphasis</DBBadge>
|
|
22
|
+
<DBBadge emphasis="strong">Strong Emphasis</DBBadge>
|
|
23
|
+
<h2>5. Placement Variants</h2>
|
|
24
|
+
<DBBadge placement="inline">Inline</DBBadge>
|
|
25
|
+
<DBBadge placement="corner-top-left">Corner Top Left</DBBadge>
|
|
26
|
+
<DBBadge placement="corner-top-right">Corner Top Right</DBBadge>
|
|
27
|
+
<DBBadge placement="corner-center-left">Corner Center Left</DBBadge>
|
|
28
|
+
<DBBadge placement="corner-center-right"> Corner Center Right </DBBadge>
|
|
29
|
+
<DBBadge placement="corner-bottom-left">Corner Bottom Left</DBBadge>
|
|
30
|
+
<DBBadge placement="corner-bottom-right"> Corner Bottom Right </DBBadge>
|
|
31
|
+
<h2>6. Custom Label</h2>
|
|
32
|
+
<DBBadge label="Custom Label">With Custom Label</DBBadge>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<script setup lang="ts">
|
|
36
|
+
import { DBBadge } from "@db-ux/v-v-core-components";
|
|
37
|
+
</script>
|
|
38
|
+
```
|
package/agent/Brand.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
# Brand Examples (vue)
|
|
4
|
+
|
|
5
|
+
```vue
|
|
6
|
+
<template>
|
|
7
|
+
<h1>DBBrand Documentation Examples</h1>
|
|
8
|
+
<h2>1. Default Brand</h2>
|
|
9
|
+
<DBBrand>Default Brand</DBBrand>
|
|
10
|
+
<h2>2. Icon Visibility</h2>
|
|
11
|
+
<DBBrand :showIcon="false">Icon Hidden</DBBrand>
|
|
12
|
+
<h2>3. Custom Text</h2>
|
|
13
|
+
<DBBrand text="Custom Brand Text">With Custom Text</DBBrand>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script setup lang="ts">
|
|
17
|
+
import { DBBrand } from "@db-ux/v-v-core-components";
|
|
18
|
+
</script>
|
|
19
|
+
```
|
package/agent/Button.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
# Button Examples (vue)
|
|
4
|
+
|
|
5
|
+
```vue
|
|
6
|
+
<template>
|
|
7
|
+
<h1>DBButton Documentation Examples</h1>
|
|
8
|
+
<h2>1. Default Button</h2>
|
|
9
|
+
<DBButton>Button</DBButton>
|
|
10
|
+
<h2>2. Variants</h2>
|
|
11
|
+
<DBButton variant="filled">Filled</DBButton>
|
|
12
|
+
<DBButton variant="outlined">Outlined</DBButton>
|
|
13
|
+
<DBButton variant="ghost">Ghost</DBButton>
|
|
14
|
+
<DBButton variant="brand">Brand</DBButton>
|
|
15
|
+
<h2>3. Sizes</h2>
|
|
16
|
+
<DBButton size="small">Small</DBButton>
|
|
17
|
+
<DBButton size="medium">Medium</DBButton>
|
|
18
|
+
<h2>4. Icon Only</h2>
|
|
19
|
+
<DBButton icon="check" :noText="true"></DBButton>
|
|
20
|
+
<h2>5. Disabled</h2>
|
|
21
|
+
<DBButton :disabled="true">Disabled</DBButton>
|
|
22
|
+
<h2>6. Button Types</h2>
|
|
23
|
+
<DBButton type="button">Type=button</DBButton>
|
|
24
|
+
<DBButton type="submit">Type=submit</DBButton>
|
|
25
|
+
<DBButton type="reset">Type=reset</DBButton>
|
|
26
|
+
<h2>7. Form Association</h2>
|
|
27
|
+
<form id="example-form">
|
|
28
|
+
<input name="exampleInput" placeholder="Example input" />
|
|
29
|
+
</form>
|
|
30
|
+
<DBButton form="example-form" type="submit"> Submit Form </DBButton>
|
|
31
|
+
<h2>8. Name & Value</h2>
|
|
32
|
+
<DBButton name="testName" value="testValue"> Name/Value </DBButton>
|
|
33
|
+
<h2>9. Width</h2>
|
|
34
|
+
<DBButton width="full">Full width</DBButton>
|
|
35
|
+
<DBButton width="auto">Auto width</DBButton>
|
|
36
|
+
<h2>10. Icon Visibility</h2>
|
|
37
|
+
<DBButton icon="check" :showIcon="false"> Icon Hidden </DBButton>
|
|
38
|
+
<h2>11. Custom Class</h2>
|
|
39
|
+
<DBButton>Custom Class</DBButton>
|
|
40
|
+
<h2>12. Click Event</h2>
|
|
41
|
+
<DBButton :onClick="(event) => alert('Button clicked!')"> Click Me </DBButton>
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<script setup lang="ts">
|
|
45
|
+
import { DBButton } from "@db-ux/v-v-core-components";
|
|
46
|
+
</script>
|
|
47
|
+
```
|
package/agent/Card.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
# Card Examples (vue)
|
|
4
|
+
|
|
5
|
+
```vue
|
|
6
|
+
<template>
|
|
7
|
+
<h1>DBCard Documentation Examples</h1>
|
|
8
|
+
<h2>1. Default Card</h2>
|
|
9
|
+
<DBCard>Default Card</DBCard>
|
|
10
|
+
<h2>2. Behaviors</h2>
|
|
11
|
+
<DBCard behavior="static">Static</DBCard>
|
|
12
|
+
<DBCard behavior="interactive">Interactive</DBCard>
|
|
13
|
+
<h2>3. Elevation Levels</h2>
|
|
14
|
+
<DBCard elevationLevel="1">Elevation Level 1</DBCard>
|
|
15
|
+
<DBCard elevationLevel="2">Elevation Level 2</DBCard>
|
|
16
|
+
<DBCard elevationLevel="3">Elevation Level 3</DBCard>
|
|
17
|
+
<h2>4. Custom Class</h2>
|
|
18
|
+
<DBCard>Custom Class</DBCard>
|
|
19
|
+
<h2>5. Spacing</h2>
|
|
20
|
+
<DBCard spacing="medium">Medium Spacing</DBCard>
|
|
21
|
+
<DBCard spacing="small">Small Spacing</DBCard>
|
|
22
|
+
<DBCard spacing="large">Large Spacing</DBCard>
|
|
23
|
+
<DBCard spacing="none">No Spacing</DBCard>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<script setup lang="ts">
|
|
27
|
+
import { DBCard } from "@db-ux/v-v-core-components";
|
|
28
|
+
</script>
|
|
29
|
+
```
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
# Checkbox Examples (vue)
|
|
4
|
+
|
|
5
|
+
```vue
|
|
6
|
+
<template>
|
|
7
|
+
<h1>DBCheckbox Documentation Examples</h1>
|
|
8
|
+
<h2>1. Default Checkbox</h2>
|
|
9
|
+
<DBCheckbox label="Default Checkbox"></DBCheckbox>
|
|
10
|
+
<h2>2. Indeterminate State</h2>
|
|
11
|
+
<DBCheckbox label="Indeterminate Checkbox" :indeterminate="true"></DBCheckbox>
|
|
12
|
+
<h2>3. Sizes</h2>
|
|
13
|
+
<DBCheckbox size="small" label="Small Checkbox"></DBCheckbox>
|
|
14
|
+
<DBCheckbox size="medium" label="Medium Checkbox"></DBCheckbox>
|
|
15
|
+
<h2>4. Validation States</h2>
|
|
16
|
+
<DBCheckbox validation="valid" label="Valid Checkbox"></DBCheckbox>
|
|
17
|
+
<DBCheckbox validation="invalid" label="Invalid Checkbox"></DBCheckbox>
|
|
18
|
+
<DBCheckbox
|
|
19
|
+
validation="no-validation"
|
|
20
|
+
label="No Validation Checkbox"
|
|
21
|
+
></DBCheckbox>
|
|
22
|
+
<h2>5. Disabled State</h2>
|
|
23
|
+
<DBCheckbox label="Disabled Checkbox" :disabled="true"></DBCheckbox>
|
|
24
|
+
<h2>6. Message Property Example</h2>
|
|
25
|
+
<DBCheckbox
|
|
26
|
+
label="Checkbox with Message"
|
|
27
|
+
message="This is a helper message."
|
|
28
|
+
></DBCheckbox>
|
|
29
|
+
<h2>7. Change Event Example</h2>
|
|
30
|
+
<DBCheckbox
|
|
31
|
+
label="Change Event"
|
|
32
|
+
:onChange="(event) => console.log('Change event:', event.target.checked)"
|
|
33
|
+
></DBCheckbox>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
<script setup lang="ts">
|
|
37
|
+
import { DBCheckbox } from "@db-ux/v-v-core-components";
|
|
38
|
+
</script>
|
|
39
|
+
```
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
# CustomSelect Examples (vue)
|
|
4
|
+
|
|
5
|
+
```vue
|
|
6
|
+
<template>
|
|
7
|
+
<h1>DBCustomSelect Documentation Examples</h1>
|
|
8
|
+
<h2>1. Default Custom Select</h2>
|
|
9
|
+
<DBCustomSelect
|
|
10
|
+
label="Default Custom Select"
|
|
11
|
+
:options="getOptions()"
|
|
12
|
+
></DBCustomSelect>
|
|
13
|
+
<h2>3. Multiple Select</h2>
|
|
14
|
+
<DBCustomSelect
|
|
15
|
+
label="Multiple Custom Select"
|
|
16
|
+
:multiple="true"
|
|
17
|
+
:options="getOptions()"
|
|
18
|
+
></DBCustomSelect>
|
|
19
|
+
<h2>4. Disabled State</h2>
|
|
20
|
+
<DBCustomSelect
|
|
21
|
+
label="Disabled Custom Select"
|
|
22
|
+
:disabled="true"
|
|
23
|
+
:options="getOptions()"
|
|
24
|
+
></DBCustomSelect>
|
|
25
|
+
<h2>5. Validation States</h2>
|
|
26
|
+
<DBCustomSelect
|
|
27
|
+
validMessage="This is a valid selection"
|
|
28
|
+
validation="valid"
|
|
29
|
+
label="Valid Custom Select"
|
|
30
|
+
:options="getOptions()"
|
|
31
|
+
></DBCustomSelect>
|
|
32
|
+
<DBCustomSelect
|
|
33
|
+
invalidMessage="This is an invalid selection"
|
|
34
|
+
validation="invalid"
|
|
35
|
+
label="Invalid Custom Select"
|
|
36
|
+
:options="getOptions()"
|
|
37
|
+
></DBCustomSelect>
|
|
38
|
+
<DBCustomSelect
|
|
39
|
+
validation="no-validation"
|
|
40
|
+
label="No Validation Custom Select"
|
|
41
|
+
:options="getOptions()"
|
|
42
|
+
></DBCustomSelect>
|
|
43
|
+
<h2>6. Change Event Example</h2>
|
|
44
|
+
<DBCustomSelect
|
|
45
|
+
label="Change Event"
|
|
46
|
+
:onChange="(event) => console.log('Change event:', event.target.value)"
|
|
47
|
+
:options="getOptions()"
|
|
48
|
+
></DBCustomSelect>
|
|
49
|
+
<h2>7. Placeholder Example</h2>
|
|
50
|
+
<DBCustomSelect
|
|
51
|
+
label="Custom Select with Placeholder"
|
|
52
|
+
placeholder="Select an option"
|
|
53
|
+
:options="getOptions()"
|
|
54
|
+
></DBCustomSelect>
|
|
55
|
+
</template>
|
|
56
|
+
|
|
57
|
+
<script setup lang="ts">
|
|
58
|
+
import { DBCustomSelect } from "@db-ux/v-v-core-components";
|
|
59
|
+
|
|
60
|
+
function getOptions() {
|
|
61
|
+
return [
|
|
62
|
+
{
|
|
63
|
+
value: "1",
|
|
64
|
+
label: "Option 1",
|
|
65
|
+
selected: false,
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
value: "2",
|
|
69
|
+
label: "Option 2",
|
|
70
|
+
disabled: true,
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
value: "3",
|
|
74
|
+
label: "Option 3",
|
|
75
|
+
},
|
|
76
|
+
];
|
|
77
|
+
}
|
|
78
|
+
</script>
|
|
79
|
+
```
|
package/agent/Divider.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
# Divider Examples (vue)
|
|
4
|
+
|
|
5
|
+
```vue
|
|
6
|
+
<template>
|
|
7
|
+
<h1>DBDivider Documentation Examples</h1>
|
|
8
|
+
<h2>1. Default Divider</h2>
|
|
9
|
+
<DBDivider></DBDivider>
|
|
10
|
+
<h2>2. Margin Variants</h2>
|
|
11
|
+
<DBDivider margin="none"></DBDivider>
|
|
12
|
+
<DBDivider margin="_"></DBDivider>
|
|
13
|
+
<h2>3. Orientation Variants</h2>
|
|
14
|
+
<DBDivider variant="horizontal"></DBDivider>
|
|
15
|
+
<DBDivider variant="vertical"></DBDivider>
|
|
16
|
+
<h2>4. Emphasis Variants</h2>
|
|
17
|
+
<DBDivider emphasis="weak"></DBDivider>
|
|
18
|
+
<DBDivider emphasis="strong"></DBDivider>
|
|
19
|
+
<h2>5. Width Variants</h2>
|
|
20
|
+
<DBDivider width="full"></DBDivider>
|
|
21
|
+
<DBDivider width="auto"></DBDivider>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script setup lang="ts">
|
|
25
|
+
import { DBDivider } from "@db-ux/v-v-core-components";
|
|
26
|
+
</script>
|
|
27
|
+
```
|
package/agent/Drawer.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
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 (vue)
|
|
12
|
+
|
|
13
|
+
```vue
|
|
14
|
+
<template>
|
|
15
|
+
<h1>DBDrawer Documentation Examples</h1>
|
|
16
|
+
<h2>1. Default Drawer</h2>
|
|
17
|
+
<div>
|
|
18
|
+
<DBButton
|
|
19
|
+
:onClick="
|
|
20
|
+
(event) => {
|
|
21
|
+
open = true;
|
|
22
|
+
}
|
|
23
|
+
"
|
|
24
|
+
>
|
|
25
|
+
Open Me </DBButton
|
|
26
|
+
><DBDrawer
|
|
27
|
+
:open="open"
|
|
28
|
+
:onClose="
|
|
29
|
+
(event) => {
|
|
30
|
+
open = false;
|
|
31
|
+
}
|
|
32
|
+
"
|
|
33
|
+
:drawerHeader="<header>Optional drawer header</header>"
|
|
34
|
+
>
|
|
35
|
+
My Drawer content
|
|
36
|
+
</DBDrawer>
|
|
37
|
+
</div>
|
|
38
|
+
<h2>2. Drawer Variants</h2>
|
|
39
|
+
<div>
|
|
40
|
+
<DBButton
|
|
41
|
+
:onClick="
|
|
42
|
+
(event) => {
|
|
43
|
+
open = true;
|
|
44
|
+
}
|
|
45
|
+
"
|
|
46
|
+
>
|
|
47
|
+
Open Modal Drawer </DBButton
|
|
48
|
+
><DBDrawer
|
|
49
|
+
variant="modal"
|
|
50
|
+
:open="open"
|
|
51
|
+
:onClose="
|
|
52
|
+
(event) => {
|
|
53
|
+
open = false;
|
|
54
|
+
}
|
|
55
|
+
"
|
|
56
|
+
>
|
|
57
|
+
Modal Drawer content
|
|
58
|
+
</DBDrawer>
|
|
59
|
+
</div>
|
|
60
|
+
<div>
|
|
61
|
+
<DBButton
|
|
62
|
+
:onClick="
|
|
63
|
+
(event) => {
|
|
64
|
+
open = true;
|
|
65
|
+
}
|
|
66
|
+
"
|
|
67
|
+
>
|
|
68
|
+
Open Inside Drawer </DBButton
|
|
69
|
+
><DBDrawer
|
|
70
|
+
variant="inside"
|
|
71
|
+
:open="open"
|
|
72
|
+
:onClose="
|
|
73
|
+
(event) => {
|
|
74
|
+
open = false;
|
|
75
|
+
}
|
|
76
|
+
"
|
|
77
|
+
>
|
|
78
|
+
Inside Drawer content
|
|
79
|
+
</DBDrawer>
|
|
80
|
+
</div>
|
|
81
|
+
</template>
|
|
82
|
+
|
|
83
|
+
<script setup lang="ts">
|
|
84
|
+
import { ref } from "vue";
|
|
85
|
+
|
|
86
|
+
import { DBButton } from "@db-ux/v-v-core-components";
|
|
87
|
+
import { DBDrawer } from "@db-ux/v-v-core-components";
|
|
88
|
+
|
|
89
|
+
const open = ref<boolean>(false);
|
|
90
|
+
</script>
|
|
91
|
+
```
|
package/agent/Header.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
# Header Examples (vue)
|
|
4
|
+
|
|
5
|
+
```vue
|
|
6
|
+
<template>
|
|
7
|
+
<h1>DBHeader Documentation Examples</h1>
|
|
8
|
+
<h2>1. Default Header</h2>
|
|
9
|
+
<DBHeader :drawerOpen="drawerOpen" :onToggle="(open) => (drawerOpen = open)">
|
|
10
|
+
<template v-slot:brand><DBBrand>My Awesome App</DBBrand></template>
|
|
11
|
+
<template v-slot:metaNavigation><DBLink href="#">Imprint</DBLink><DBLink href="#">Help</DBLink></template>
|
|
12
|
+
<template v-slot:primaryAction><DBButton icon="magnifying_glass" variant="ghost" noText>Search</DBButton></template>
|
|
13
|
+
<template v-slot:secondaryAction><DBButton icon="x_placeholder" variant="ghost" noText>Profile</DBButton><DBButton icon="alert" variant="ghost" noText>Notification</DBButton><DBButton icon="help" variant="ghost" noText>Help</DBButton></template>
|
|
14
|
+
|
|
15
|
+
<DBNavigation
|
|
16
|
+
><DBNavigationItem><a href="#">Navi-Item 1</a></DBNavigationItem
|
|
17
|
+
><DBNavigationItem icon="x_placeholder"
|
|
18
|
+
><a href="#">Navi-Item 2</a></DBNavigationItem
|
|
19
|
+
><DBNavigationItem :disabled="true"
|
|
20
|
+
><a href="#">Navi-Item 3</a></DBNavigationItem
|
|
21
|
+
></DBNavigation
|
|
22
|
+
></DBHeader
|
|
23
|
+
>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<script setup lang="ts">
|
|
27
|
+
import { ref } from "vue";
|
|
28
|
+
|
|
29
|
+
import { DBNavigation } from "@db-ux/v-v-core-components";
|
|
30
|
+
import { DBNavigationItem } from "@db-ux/v-v-core-components";
|
|
31
|
+
import { DBHeader } from "@db-ux/v-v-core-components";
|
|
32
|
+
|
|
33
|
+
const drawerOpen = ref<boolean>(false);
|
|
34
|
+
</script>
|
|
35
|
+
```
|
package/agent/Icon.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
# Icon Examples (vue)
|
|
4
|
+
|
|
5
|
+
```vue
|
|
6
|
+
<template>
|
|
7
|
+
<h1>DBIcon Documentation Examples</h1>
|
|
8
|
+
<h2>1. Default Icon</h2>
|
|
9
|
+
<DBIcon>Default Icon</DBIcon>
|
|
10
|
+
<h2>2. Icon Variants</h2>
|
|
11
|
+
<DBIcon icon="user">User Icon</DBIcon>
|
|
12
|
+
<DBIcon icon="settings">Settings Icon</DBIcon>
|
|
13
|
+
<h2>3. Icon Weights</h2>
|
|
14
|
+
<DBIcon weight="16">16px Icon</DBIcon>
|
|
15
|
+
<DBIcon weight="24">24px Icon</DBIcon>
|
|
16
|
+
<DBIcon weight="32">32px Icon</DBIcon>
|
|
17
|
+
<h2>4. Custom Class</h2>
|
|
18
|
+
<DBIcon>Custom Class Icon</DBIcon>
|
|
19
|
+
<h2>5. Text Content</h2>
|
|
20
|
+
<DBIcon text="Icon with Text">Icon with Text</DBIcon>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script setup lang="ts">
|
|
24
|
+
import { DBIcon } from "@db-ux/v-v-core-components";
|
|
25
|
+
</script>
|
|
26
|
+
```
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
# Infotext Examples (vue)
|
|
4
|
+
|
|
5
|
+
```vue
|
|
6
|
+
<template>
|
|
7
|
+
<h1>DBInfotext Documentation Examples</h1>
|
|
8
|
+
<h2>1. Default Infotext</h2>
|
|
9
|
+
<DBInfotext>Default Infotext</DBInfotext>
|
|
10
|
+
<h2>2. Semantic Variants</h2>
|
|
11
|
+
<DBInfotext semantic="adaptive">Adaptive</DBInfotext>
|
|
12
|
+
<DBInfotext semantic="neutral">Neutral</DBInfotext>
|
|
13
|
+
<DBInfotext semantic="critical">Critical</DBInfotext>
|
|
14
|
+
<DBInfotext semantic="informational">Informational</DBInfotext>
|
|
15
|
+
<DBInfotext semantic="warning">Warning</DBInfotext>
|
|
16
|
+
<DBInfotext semantic="successful">Successful</DBInfotext>
|
|
17
|
+
<h2>3. Sizes</h2>
|
|
18
|
+
<DBInfotext size="small">Small</DBInfotext>
|
|
19
|
+
<DBInfotext size="medium">Medium</DBInfotext>
|
|
20
|
+
<h2>4. Icon Visibility</h2>
|
|
21
|
+
<DBInfotext icon="info" :showIcon="false"> Icon Hidden </DBInfotext>
|
|
22
|
+
<h2>5. Custom Class</h2>
|
|
23
|
+
<DBInfotext>Custom Class</DBInfotext>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<script setup lang="ts">
|
|
27
|
+
import { DBInfotext } from "@db-ux/v-v-core-components";
|
|
28
|
+
</script>
|
|
29
|
+
```
|
package/agent/Input.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
# Input Examples (vue)
|
|
4
|
+
|
|
5
|
+
```vue
|
|
6
|
+
<template>
|
|
7
|
+
<h1>DBInput Documentation Examples</h1>
|
|
8
|
+
<h2>1. Default Input</h2>
|
|
9
|
+
<DBInput label="Enter text here"></DBInput>
|
|
10
|
+
<h2>2. Input Types</h2>
|
|
11
|
+
<DBInput type="text" label="Text Input"></DBInput>
|
|
12
|
+
<DBInput type="email" label="Email Input"></DBInput>
|
|
13
|
+
<DBInput type="password" label="Password Input"></DBInput>
|
|
14
|
+
<DBInput type="number" label="Number Input"></DBInput>
|
|
15
|
+
<h2>3. Sizes</h2>
|
|
16
|
+
<DBInput size="small" label="Small Input"></DBInput>
|
|
17
|
+
<DBInput size="medium" label="Medium Input"></DBInput>
|
|
18
|
+
<h2>4. Icon Support</h2>
|
|
19
|
+
<DBInput icon="search" label="Search Input"></DBInput>
|
|
20
|
+
<DBInput iconLeading="user" label="Leading Icon"></DBInput>
|
|
21
|
+
<DBInput iconTrailing="check" label="Trailing Icon"></DBInput>
|
|
22
|
+
<h2>5. Validation States</h2>
|
|
23
|
+
<DBInput validation="valid" label="Valid Input"></DBInput>
|
|
24
|
+
<DBInput validation="invalid" label="Invalid Input"></DBInput>
|
|
25
|
+
<DBInput validation="no-validation" label="No Validation"></DBInput>
|
|
26
|
+
<h2>6. Disabled State</h2>
|
|
27
|
+
<DBInput label="Disabled Input" :disabled="true"></DBInput>
|
|
28
|
+
<h2>7. Custom Class</h2>
|
|
29
|
+
<DBInput label="Custom Class"></DBInput>
|
|
30
|
+
<h2>8. Placeholder Examples</h2>
|
|
31
|
+
<DBInput placeholder="Enter text here" label="With Placeholder"></DBInput>
|
|
32
|
+
<DBInput placeholder="Search here" label="Search Placeholder"></DBInput>
|
|
33
|
+
<h2>9. Input Event Example</h2>
|
|
34
|
+
<DBInput
|
|
35
|
+
label="Input Event"
|
|
36
|
+
:onInput="(event) => console.log('Input event:', event.target.value)"
|
|
37
|
+
></DBInput>
|
|
38
|
+
<h2>10. Message Property Example</h2>
|
|
39
|
+
<DBInput
|
|
40
|
+
label="Input with Message"
|
|
41
|
+
message="This is a helper message."
|
|
42
|
+
></DBInput>
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<script setup lang="ts">
|
|
46
|
+
import { DBInput } from "@db-ux/v-v-core-components";
|
|
47
|
+
</script>
|
|
48
|
+
```
|
package/agent/Link.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
# Link Examples (vue)
|
|
4
|
+
|
|
5
|
+
```vue
|
|
6
|
+
<template>
|
|
7
|
+
<h1>DBLink Documentation Examples</h1>
|
|
8
|
+
<h2>1. Default Link</h2>
|
|
9
|
+
<DBLink href="https://example.com">Default Link</DBLink>
|
|
10
|
+
<h2>2. Disabled Link</h2>
|
|
11
|
+
<DBLink href="https://example.com" :disabled="true"> Disabled Link </DBLink>
|
|
12
|
+
<h2>3. Target Variants</h2>
|
|
13
|
+
<DBLink href="https://example.com" target="_self"> Self Target </DBLink>
|
|
14
|
+
<DBLink href="https://example.com" target="_blank"> Blank Target </DBLink>
|
|
15
|
+
<h2>4. Custom Class</h2>
|
|
16
|
+
<DBLink href="https://example.com"> Custom Class </DBLink>
|
|
17
|
+
<h2>5. Rel Attribute</h2>
|
|
18
|
+
<DBLink href="https://example.com" rel="noopener noreferrer">
|
|
19
|
+
No Referrer
|
|
20
|
+
</DBLink>
|
|
21
|
+
<h2>6. Link Variants</h2>
|
|
22
|
+
<DBLink href="https://example.com" variant="adaptive">
|
|
23
|
+
Adaptive Variant
|
|
24
|
+
</DBLink>
|
|
25
|
+
<DBLink href="https://example.com" variant="brand"> Brand Variant </DBLink>
|
|
26
|
+
<DBLink href="https://example.com" variant="inline"> Inline Variant </DBLink>
|
|
27
|
+
<h2>7. Link Sizes</h2>
|
|
28
|
+
<DBLink href="https://example.com" size="medium"> Medium Size </DBLink>
|
|
29
|
+
<DBLink href="https://example.com" size="small"> Small Size </DBLink>
|
|
30
|
+
<h2>8. Link Content</h2>
|
|
31
|
+
<DBLink href="https://example.com" content="external">
|
|
32
|
+
External Content
|
|
33
|
+
</DBLink>
|
|
34
|
+
<DBLink href="https://example.com" content="internal">
|
|
35
|
+
Internal Content
|
|
36
|
+
</DBLink>
|
|
37
|
+
</template>
|
|
38
|
+
|
|
39
|
+
<script setup lang="ts">
|
|
40
|
+
import { DBLink } from "@db-ux/v-v-core-components";
|
|
41
|
+
</script>
|
|
42
|
+
```
|