@db-ux/react-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 +47 -0
- package/agent/AccordionItem.md +36 -0
- package/agent/Badge.md +43 -0
- package/agent/Brand.md +24 -0
- package/agent/Button.md +60 -0
- package/agent/Card.md +34 -0
- package/agent/Checkbox.md +41 -0
- package/agent/CustomSelect.md +81 -0
- package/agent/Divider.md +32 -0
- package/agent/Drawer.md +87 -0
- package/agent/Header.md +45 -0
- package/agent/Icon.md +31 -0
- package/agent/Infotext.md +36 -0
- package/agent/Input.md +50 -0
- package/agent/Link.md +63 -0
- package/agent/Navigation.md +31 -0
- package/agent/NavigationItem.md +34 -0
- package/agent/Notification.md +45 -0
- package/agent/Page.md +36 -0
- package/agent/Popover.md +55 -0
- package/agent/Radio.md +34 -0
- package/agent/Section.md +32 -0
- package/agent/Select.md +90 -0
- package/agent/Stack.md +46 -0
- package/agent/Switch.md +41 -0
- package/agent/TabItem.md +34 -0
- package/agent/Tabs.md +75 -0
- package/agent/Tag.md +56 -0
- package/agent/Textarea.md +45 -0
- package/agent/Tooltip.md +47 -0
- package/agent/_instructions.md +31 -0
- package/dist/components/tabs/model.d.ts +1 -0
- package/dist/components/tabs/tabs.js +15 -0
- package/package.json +5 -3
package/agent/Link.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
# Link Examples (react)
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { DBLink } from "@db-ux/react-react-core-components";
|
|
8
|
+
|
|
9
|
+
function Link(props: any) {
|
|
10
|
+
return (
|
|
11
|
+
<>
|
|
12
|
+
<h1>DBLink Documentation Examples</h1>
|
|
13
|
+
<h2>1. Default Link</h2>
|
|
14
|
+
<DBLink href="https://example.com">Default Link</DBLink>
|
|
15
|
+
<h2>2. Disabled Link</h2>
|
|
16
|
+
<DBLink href="https://example.com" disabled>
|
|
17
|
+
Disabled Link
|
|
18
|
+
</DBLink>
|
|
19
|
+
<h2>3. Target Variants</h2>
|
|
20
|
+
<DBLink href="https://example.com" target="_self">
|
|
21
|
+
Self Target
|
|
22
|
+
</DBLink>
|
|
23
|
+
<DBLink href="https://example.com" target="_blank">
|
|
24
|
+
Blank Target
|
|
25
|
+
</DBLink>
|
|
26
|
+
<h2>4. Custom Class</h2>
|
|
27
|
+
<DBLink href="https://example.com" className="my-custom-class">
|
|
28
|
+
Custom Class
|
|
29
|
+
</DBLink>
|
|
30
|
+
<h2>5. Rel Attribute</h2>
|
|
31
|
+
<DBLink href="https://example.com" rel="noopener noreferrer">
|
|
32
|
+
No Referrer
|
|
33
|
+
</DBLink>
|
|
34
|
+
<h2>6. Link Variants</h2>
|
|
35
|
+
<DBLink href="https://example.com" variant="adaptive">
|
|
36
|
+
Adaptive Variant
|
|
37
|
+
</DBLink>
|
|
38
|
+
<DBLink href="https://example.com" variant="brand">
|
|
39
|
+
Brand Variant
|
|
40
|
+
</DBLink>
|
|
41
|
+
<DBLink href="https://example.com" variant="inline">
|
|
42
|
+
Inline Variant
|
|
43
|
+
</DBLink>
|
|
44
|
+
<h2>7. Link Sizes</h2>
|
|
45
|
+
<DBLink href="https://example.com" size="medium">
|
|
46
|
+
Medium Size
|
|
47
|
+
</DBLink>
|
|
48
|
+
<DBLink href="https://example.com" size="small">
|
|
49
|
+
Small Size
|
|
50
|
+
</DBLink>
|
|
51
|
+
<h2>8. Link Content</h2>
|
|
52
|
+
<DBLink href="https://example.com" content="external">
|
|
53
|
+
External Content
|
|
54
|
+
</DBLink>
|
|
55
|
+
<DBLink href="https://example.com" content="internal">
|
|
56
|
+
Internal Content
|
|
57
|
+
</DBLink>
|
|
58
|
+
</>
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export default Link;
|
|
63
|
+
```
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
# Navigation Examples (react)
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { DBNavigationItem } from "@db-ux/react-react-core-components";
|
|
8
|
+
import { DBNavigation } from "@db-ux/react-react-core-components";
|
|
9
|
+
|
|
10
|
+
function Navigation(props: any) {
|
|
11
|
+
return (
|
|
12
|
+
<>
|
|
13
|
+
<h1>DBNavigation Documentation Examples</h1>
|
|
14
|
+
<h2>1. Default Navigation</h2>
|
|
15
|
+
<DBNavigation>
|
|
16
|
+
<DBNavigationItem>
|
|
17
|
+
<a href="#">Navi-Item 1</a>
|
|
18
|
+
</DBNavigationItem>
|
|
19
|
+
<DBNavigationItem icon="x_placeholder">
|
|
20
|
+
<a href="#">Navi-Item 2</a>
|
|
21
|
+
</DBNavigationItem>
|
|
22
|
+
<DBNavigationItem disabled>
|
|
23
|
+
<a href="#">Navi-Item 3</a>
|
|
24
|
+
</DBNavigationItem>
|
|
25
|
+
</DBNavigation>
|
|
26
|
+
</>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export default Navigation;
|
|
31
|
+
```
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
# NavigationItem Examples (react)
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { DBNavigationItem } from "@db-ux/react-react-core-components";
|
|
8
|
+
|
|
9
|
+
function NavigationItem(props: any) {
|
|
10
|
+
return (
|
|
11
|
+
<>
|
|
12
|
+
<h1>DBNavigationItem Documentation Examples</h1>
|
|
13
|
+
<h2>1. Default Navigation Item</h2>
|
|
14
|
+
<DBNavigationItem>Default Navigation Item</DBNavigationItem>
|
|
15
|
+
<h2>2. Active State</h2>
|
|
16
|
+
<DBNavigationItem active>Active Navigation Item</DBNavigationItem>
|
|
17
|
+
<h2>3. Disabled State</h2>
|
|
18
|
+
<DBNavigationItem disabled>Disabled Navigation Item</DBNavigationItem>
|
|
19
|
+
<h2>4. Sub-Navigation</h2>
|
|
20
|
+
<DBNavigationItem subNavigation={<div>Sub Navigation Content</div>}>
|
|
21
|
+
Navigation Item with Sub-Navigation
|
|
22
|
+
</DBNavigationItem>
|
|
23
|
+
<h2>5. Icon Support</h2>
|
|
24
|
+
<DBNavigationItem icon="user">Navigation Item with Icon</DBNavigationItem>
|
|
25
|
+
<h2>6. Custom Class</h2>
|
|
26
|
+
<DBNavigationItem className="custom-class">
|
|
27
|
+
Navigation Item with Custom Class
|
|
28
|
+
</DBNavigationItem>
|
|
29
|
+
</>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export default NavigationItem;
|
|
34
|
+
```
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
# Notification Examples (react)
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { DBNotification } from "@db-ux/react-react-core-components";
|
|
8
|
+
|
|
9
|
+
function Notification(props: any) {
|
|
10
|
+
return (
|
|
11
|
+
<>
|
|
12
|
+
<h1>DBNotification Documentation Examples</h1>
|
|
13
|
+
<h2>1. Default Notification</h2>
|
|
14
|
+
<DBNotification>Default Notification</DBNotification>
|
|
15
|
+
<h2>2. Semantic Variants</h2>
|
|
16
|
+
<DBNotification semantic="adaptive">Adaptive</DBNotification>
|
|
17
|
+
<DBNotification semantic="neutral">Neutral</DBNotification>
|
|
18
|
+
<DBNotification semantic="critical">Critical</DBNotification>
|
|
19
|
+
<DBNotification semantic="informational">Informational</DBNotification>
|
|
20
|
+
<DBNotification semantic="warning">Warning</DBNotification>
|
|
21
|
+
<DBNotification semantic="successful">Successful</DBNotification>
|
|
22
|
+
<h2>3. Variants</h2>
|
|
23
|
+
<DBNotification variant="docked">Docked</DBNotification>
|
|
24
|
+
<DBNotification variant="standalone">Standalone</DBNotification>
|
|
25
|
+
<DBNotification variant="overlay">Overlay</DBNotification>
|
|
26
|
+
<h2>4. Closeable</h2>
|
|
27
|
+
<DBNotification closeable>Closeable Notification</DBNotification>
|
|
28
|
+
<h2>5. Headline</h2>
|
|
29
|
+
<DBNotification headline="Important Update">
|
|
30
|
+
Notification with Headline
|
|
31
|
+
</DBNotification>
|
|
32
|
+
<h2>6. Timestamp</h2>
|
|
33
|
+
<DBNotification timestamp="10:30 AM">
|
|
34
|
+
Notification with Timestamp
|
|
35
|
+
</DBNotification>
|
|
36
|
+
<h2>7. Icon Support</h2>
|
|
37
|
+
<DBNotification icon="info">Notification with Icon</DBNotification>
|
|
38
|
+
<h2>8. Custom Class</h2>
|
|
39
|
+
<DBNotification className="my-custom-class">Custom Class</DBNotification>
|
|
40
|
+
</>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export default Notification;
|
|
45
|
+
```
|
package/agent/Page.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
# Page Examples (react)
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { DBPage } from "@db-ux/react-react-core-components";
|
|
8
|
+
|
|
9
|
+
function Page(props: any) {
|
|
10
|
+
return (
|
|
11
|
+
<>
|
|
12
|
+
<h1>DBPage Documentation Examples</h1>
|
|
13
|
+
<h2>1. Default Page</h2>
|
|
14
|
+
<DBPage header={<DBHeader>Header Content</DBHeader>}
|
|
15
|
+
>Main Page</DBPage>
|
|
16
|
+
<h2>2. Document Overflow Variants</h2>
|
|
17
|
+
<DBPage documentOverflow="hidden" header={<DBHeader>Header Content</DBHeader>}
|
|
18
|
+
> Main Page with Hidden Overflow
|
|
19
|
+
</DBPage>
|
|
20
|
+
<DBPage documentOverflow="auto" header={<DBHeader>Header Content</DBHeader>}
|
|
21
|
+
> Main Page with Auto Overflow
|
|
22
|
+
</DBPage>
|
|
23
|
+
<h2>3. Fade-In Effect</h2>
|
|
24
|
+
<DBPage fadeIn header={<DBHeader>Header Content</DBHeader>}
|
|
25
|
+
>Main Page with Fade-In</DBPage>
|
|
26
|
+
<h2>4. Variant Examples</h2>
|
|
27
|
+
<DBPage variant="auto" header={<DBHeader>Header Content</DBHeader>}
|
|
28
|
+
>Page with Auto Variant</DBPage>
|
|
29
|
+
<DBPage variant="fixed" header={<DBHeader>Header Content</DBHeader>}
|
|
30
|
+
>Page with Fixed Variant</DBPage>
|
|
31
|
+
</>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export default Page;
|
|
36
|
+
```
|
package/agent/Popover.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
# Popover Examples (react)
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { DBButton } from "@db-ux/react-react-core-components";
|
|
8
|
+
import { DBPopover } from "@db-ux/react-react-core-components";
|
|
9
|
+
|
|
10
|
+
function Popover(props: any) {
|
|
11
|
+
return (
|
|
12
|
+
<>
|
|
13
|
+
<h1>DBPopover Documentation Examples</h1>
|
|
14
|
+
<h2>1. Default Popover</h2>
|
|
15
|
+
<DBPopover trigger={<DBButton>Hover on me to open Popover</DBButton>}>
|
|
16
|
+
Use any HTML code here like e.g. a <code>button</code>:
|
|
17
|
+
<button type="button">Test</button>
|
|
18
|
+
</DBPopover>
|
|
19
|
+
<h2>2. Placement Variants</h2>
|
|
20
|
+
<DBPopover placement="top" trigger={<DBButton>Top Placement</DBButton>}>
|
|
21
|
+
Popover with top placement
|
|
22
|
+
</DBPopover>
|
|
23
|
+
<DBPopover
|
|
24
|
+
placement="bottom"
|
|
25
|
+
trigger={<DBButton>Bottom Placement</DBButton>}
|
|
26
|
+
>
|
|
27
|
+
Popover with bottom placement
|
|
28
|
+
</DBPopover>
|
|
29
|
+
<h2>3. Delay Variants</h2>
|
|
30
|
+
<DBPopover delay="fast" trigger={<DBButton>Fast Delay</DBButton>}>
|
|
31
|
+
Popover with fast delay
|
|
32
|
+
</DBPopover>
|
|
33
|
+
<DBPopover delay="slow" trigger={<DBButton>Slow Delay</DBButton>}>
|
|
34
|
+
Popover with slow delay
|
|
35
|
+
</DBPopover>
|
|
36
|
+
<h2>4. Animation</h2>
|
|
37
|
+
<DBPopover animation trigger={<DBButton>With Animation</DBButton>}>
|
|
38
|
+
Popover with animation
|
|
39
|
+
</DBPopover>
|
|
40
|
+
<DBPopover animation={false} trigger={<DBButton>No Animation</DBButton>}>
|
|
41
|
+
Popover without animation
|
|
42
|
+
</DBPopover>
|
|
43
|
+
<h2>5. Width Variants</h2>
|
|
44
|
+
<DBPopover width="auto" trigger={<DBButton>Auto Width</DBButton>}>
|
|
45
|
+
Popover with auto width
|
|
46
|
+
</DBPopover>
|
|
47
|
+
<DBPopover width="fixed" trigger={<DBButton>Fixed Width</DBButton>}>
|
|
48
|
+
Popover with fixed width
|
|
49
|
+
</DBPopover>
|
|
50
|
+
</>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export default Popover;
|
|
55
|
+
```
|
package/agent/Radio.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
# Radio Examples (react)
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { DBRadio } from "@db-ux/react-react-core-components";
|
|
8
|
+
|
|
9
|
+
function Radio(props: any) {
|
|
10
|
+
return (
|
|
11
|
+
<>
|
|
12
|
+
<h1>DBRadio Documentation Examples</h1>
|
|
13
|
+
<h2>1. Default Radio</h2>
|
|
14
|
+
<DBRadio label="Default Radio" />
|
|
15
|
+
<h2>2. Sizes</h2>
|
|
16
|
+
<DBRadio size="small" label="Small Radio" />
|
|
17
|
+
<DBRadio size="medium" label="Medium Radio" />
|
|
18
|
+
<h2>3. Validation States</h2>
|
|
19
|
+
<DBRadio validation="valid" label="Valid Radio" />
|
|
20
|
+
<DBRadio validation="invalid" label="Invalid Radio" />
|
|
21
|
+
<DBRadio validation="no-validation" label="No Validation Radio" />
|
|
22
|
+
<h2>4. Disabled State</h2>
|
|
23
|
+
<DBRadio label="Disabled Radio" disabled />
|
|
24
|
+
<h2>5. Change Event Example</h2>
|
|
25
|
+
<DBRadio
|
|
26
|
+
label="Change Event"
|
|
27
|
+
onChange={(event) => console.log("Change event:", event.target.checked)}
|
|
28
|
+
/>
|
|
29
|
+
</>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export default Radio;
|
|
34
|
+
```
|
package/agent/Section.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
# Section Examples (react)
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { DBSection } from "@db-ux/react-react-core-components";
|
|
8
|
+
|
|
9
|
+
function Section(props: any) {
|
|
10
|
+
return (
|
|
11
|
+
<>
|
|
12
|
+
<h1>DBSection Documentation Examples</h1>
|
|
13
|
+
<h2>1. Default Section</h2>
|
|
14
|
+
<DBSection>Default Section</DBSection>
|
|
15
|
+
<h2>2. Spacing Variants</h2>
|
|
16
|
+
<DBSection spacing="medium">Medium Spacing</DBSection>
|
|
17
|
+
<DBSection spacing="small">Small Spacing</DBSection>
|
|
18
|
+
<DBSection spacing="large">Large Spacing</DBSection>
|
|
19
|
+
<DBSection spacing="none">No Spacing</DBSection>
|
|
20
|
+
<h2>3. Container Width</h2>
|
|
21
|
+
<DBSection width="full">Full Width</DBSection>
|
|
22
|
+
<DBSection width="medium">Medium Width</DBSection>
|
|
23
|
+
<DBSection width="large">Large Width</DBSection>
|
|
24
|
+
<DBSection width="small">Small Width</DBSection>
|
|
25
|
+
<h2>4. Custom Class</h2>
|
|
26
|
+
<DBSection className="my-custom-class">Custom Class</DBSection>
|
|
27
|
+
</>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export default Section;
|
|
32
|
+
```
|
package/agent/Select.md
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
# Select Examples (react)
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { DBSelect } from "@db-ux/react-react-core-components";
|
|
8
|
+
|
|
9
|
+
function Select(props: any) {
|
|
10
|
+
function getOptions() {
|
|
11
|
+
return [
|
|
12
|
+
{
|
|
13
|
+
id: "1",
|
|
14
|
+
label: "Option 1",
|
|
15
|
+
selected: false,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
id: "2",
|
|
19
|
+
label: "Option 2",
|
|
20
|
+
selected: true,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id: "3",
|
|
24
|
+
label: "Option 3",
|
|
25
|
+
disabled: true,
|
|
26
|
+
},
|
|
27
|
+
];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<>
|
|
32
|
+
<h1>DBSelect Documentation Examples</h1>
|
|
33
|
+
<h2>1. Default Select</h2>
|
|
34
|
+
<DBSelect label="Default Select">
|
|
35
|
+
<option value="1">Option 1</option>
|
|
36
|
+
<option value="2" disabled>
|
|
37
|
+
Option 2
|
|
38
|
+
</option>
|
|
39
|
+
</DBSelect>
|
|
40
|
+
<h2>2. Options Array</h2>
|
|
41
|
+
<DBSelect label="Select with Options" options={getOptions()} />
|
|
42
|
+
<h2>3. Multiple Select</h2>
|
|
43
|
+
<DBSelect label="Multiple Select" multiple>
|
|
44
|
+
<option value="1">Option 1</option>
|
|
45
|
+
<option value="2" disabled>
|
|
46
|
+
Option 2
|
|
47
|
+
</option>
|
|
48
|
+
</DBSelect>
|
|
49
|
+
<h2>4. Disabled State</h2>
|
|
50
|
+
<DBSelect label="Disabled Select" disabled>
|
|
51
|
+
<option value="1">Option 1</option>
|
|
52
|
+
<option value="2" disabled>
|
|
53
|
+
Option 2
|
|
54
|
+
</option>
|
|
55
|
+
</DBSelect>
|
|
56
|
+
<h2>5. Validation States</h2>
|
|
57
|
+
<DBSelect validation="valid" label="Valid Select">
|
|
58
|
+
<option value="1">Option 1</option>
|
|
59
|
+
<option value="2" disabled>
|
|
60
|
+
Option 2
|
|
61
|
+
</option>
|
|
62
|
+
</DBSelect>
|
|
63
|
+
<DBSelect validation="invalid" label="Invalid Select">
|
|
64
|
+
<option value="1">Option 1</option>
|
|
65
|
+
<option value="2" disabled>
|
|
66
|
+
Option 2
|
|
67
|
+
</option>
|
|
68
|
+
</DBSelect>
|
|
69
|
+
<DBSelect validation="no-validation" label="No Validation Select">
|
|
70
|
+
<option value="1">Option 1</option>
|
|
71
|
+
<option value="2" disabled>
|
|
72
|
+
Option 2
|
|
73
|
+
</option>
|
|
74
|
+
</DBSelect>
|
|
75
|
+
<h2>6. Change Event Example</h2>
|
|
76
|
+
<DBSelect
|
|
77
|
+
label="Change Event"
|
|
78
|
+
onChange={(event) => console.log("Change event:", event.target.value)}
|
|
79
|
+
>
|
|
80
|
+
<option value="1">Option 1</option>
|
|
81
|
+
<option value="2" disabled>
|
|
82
|
+
Option 2
|
|
83
|
+
</option>
|
|
84
|
+
</DBSelect>
|
|
85
|
+
</>
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export default Select;
|
|
90
|
+
```
|
package/agent/Stack.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
# Stack Examples (react)
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { DBStack } from "@db-ux/react-react-core-components";
|
|
8
|
+
|
|
9
|
+
function Stack(props: any) {
|
|
10
|
+
return (
|
|
11
|
+
<>
|
|
12
|
+
<h1>DBStack Documentation Examples</h1>
|
|
13
|
+
<h2>1. Default Stack</h2>
|
|
14
|
+
<DBStack>Default Stack</DBStack>
|
|
15
|
+
<h2>2. Variants</h2>
|
|
16
|
+
<DBStack variant="simple">Simple Variant</DBStack>
|
|
17
|
+
<DBStack variant="divider">Divider Variant</DBStack>
|
|
18
|
+
<h2>3. Directions</h2>
|
|
19
|
+
<DBStack direction="row">Row Direction</DBStack>
|
|
20
|
+
<DBStack direction="column">Column Direction</DBStack>
|
|
21
|
+
<h2>4. Alignment</h2>
|
|
22
|
+
<DBStack alignment="stretch">Stretch Alignment</DBStack>
|
|
23
|
+
<DBStack alignment="start">Start Alignment</DBStack>
|
|
24
|
+
<DBStack alignment="end">End Alignment</DBStack>
|
|
25
|
+
<DBStack alignment="center">Center Alignment</DBStack>
|
|
26
|
+
<h2>5. Justify Content</h2>
|
|
27
|
+
<DBStack justifyContent="space-between">Space Between</DBStack>
|
|
28
|
+
<DBStack justifyContent="start">Start Justify</DBStack>
|
|
29
|
+
<DBStack justifyContent="end">End Justify</DBStack>
|
|
30
|
+
<DBStack justifyContent="center">Center Justify</DBStack>
|
|
31
|
+
<h2>6. Gap Spacing</h2>
|
|
32
|
+
<DBStack gap="medium">Medium Gap</DBStack>
|
|
33
|
+
<DBStack gap="small">Small Gap</DBStack>
|
|
34
|
+
<DBStack gap="large">Large Gap</DBStack>
|
|
35
|
+
<DBStack gap="none">No Gap</DBStack>
|
|
36
|
+
<h2>7. Wrap</h2>
|
|
37
|
+
<DBStack wrap>Wrap Enabled</DBStack>
|
|
38
|
+
<DBStack wrap={false}>Wrap Disabled</DBStack>
|
|
39
|
+
<h2>8. Custom Class</h2>
|
|
40
|
+
<DBStack className="my-custom-class">Custom Class</DBStack>
|
|
41
|
+
</>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export default Stack;
|
|
46
|
+
```
|
package/agent/Switch.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
# Switch Examples (react)
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { DBSwitch } from "@db-ux/react-react-core-components";
|
|
8
|
+
|
|
9
|
+
function Switch(props: any) {
|
|
10
|
+
return (
|
|
11
|
+
<>
|
|
12
|
+
<h1>DBSwitch Documentation Examples</h1>
|
|
13
|
+
<h2>1. Default Switch</h2>
|
|
14
|
+
<DBSwitch label="Default Switch" />
|
|
15
|
+
<h2>2. Visual Aid</h2>
|
|
16
|
+
<DBSwitch label="Switch with Visual Aid" visualAid />
|
|
17
|
+
<DBSwitch label="Switch without Visual Aid" visualAid={false} />
|
|
18
|
+
<h2>3. Sizes</h2>
|
|
19
|
+
<DBSwitch size="small" label="Small Switch" />
|
|
20
|
+
<DBSwitch size="medium" label="Medium Switch" />
|
|
21
|
+
<h2>4. Validation States</h2>
|
|
22
|
+
<DBSwitch validation="valid" label="Valid Switch" />
|
|
23
|
+
<DBSwitch validation="invalid" label="Invalid Switch" />
|
|
24
|
+
<DBSwitch validation="no-validation" label="No Validation Switch" />
|
|
25
|
+
<h2>5. Disabled State</h2>
|
|
26
|
+
<DBSwitch label="Disabled Switch" disabled />
|
|
27
|
+
<h2>6. Icon Support</h2>
|
|
28
|
+
<DBSwitch icon="check" label="Switch with Icon" />
|
|
29
|
+
<DBSwitch iconLeading="user" label="Switch with Leading Icon" />
|
|
30
|
+
<DBSwitch iconTrailing="arrow" label="Switch with Trailing Icon" />
|
|
31
|
+
<h2>7. Change Event Example</h2>
|
|
32
|
+
<DBSwitch
|
|
33
|
+
label="Change Event"
|
|
34
|
+
onChange={(event) => console.log("Change event:", event.target.checked)}
|
|
35
|
+
/>
|
|
36
|
+
</>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export default Switch;
|
|
41
|
+
```
|
package/agent/TabItem.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
# TabItem Examples (react)
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { DBTabItem } from "@db-ux/react-react-core-components";
|
|
8
|
+
|
|
9
|
+
function TabItem(props: any) {
|
|
10
|
+
return (
|
|
11
|
+
<>
|
|
12
|
+
<h1>DBTabItem Documentation Examples</h1>
|
|
13
|
+
<h2>1. Default Tab Item</h2>
|
|
14
|
+
<DBTabItem>Default Tab Item</DBTabItem>
|
|
15
|
+
<h2>2. Active State</h2>
|
|
16
|
+
<DBTabItem active>Active Tab Item</DBTabItem>
|
|
17
|
+
<h2>3. Disabled State</h2>
|
|
18
|
+
<DBTabItem disabled>Disabled Tab Item</DBTabItem>
|
|
19
|
+
<h2>4. Icon Variants</h2>
|
|
20
|
+
<DBTabItem icon="user">Tab Item with Icon</DBTabItem>
|
|
21
|
+
<DBTabItem iconLeading="arrow-left">Tab Item with Leading Icon</DBTabItem>
|
|
22
|
+
<DBTabItem iconTrailing="arrow-right">
|
|
23
|
+
Tab Item with Trailing Icon
|
|
24
|
+
</DBTabItem>
|
|
25
|
+
<h2>5. Label Property</h2>
|
|
26
|
+
<DBTabItem label="Tab Item Label">Tab Item with Label</DBTabItem>
|
|
27
|
+
<h2>6. No Text</h2>
|
|
28
|
+
<DBTabItem icon="user" noText />
|
|
29
|
+
</>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export default TabItem;
|
|
34
|
+
```
|
package/agent/Tabs.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
# Tabs Examples (react)
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { DBTabItem } from "@db-ux/react-react-core-components";
|
|
8
|
+
import { DBTabList } from "@db-ux/react-react-core-components";
|
|
9
|
+
import { DBTabPanel } from "@db-ux/react-react-core-components";
|
|
10
|
+
import { DBTabs } from "@db-ux/react-react-core-components";
|
|
11
|
+
|
|
12
|
+
function Tabs(props: any) {
|
|
13
|
+
return (
|
|
14
|
+
<>
|
|
15
|
+
<h1>DBTabs Documentation Examples</h1>
|
|
16
|
+
<h2>1. Default Tabs</h2>
|
|
17
|
+
<DBTabs>
|
|
18
|
+
<DBTabList>
|
|
19
|
+
<DBTabItem>Tab 1</DBTabItem>
|
|
20
|
+
<DBTabItem>Tab 2</DBTabItem>
|
|
21
|
+
<DBTabItem>Tab 3</DBTabItem>
|
|
22
|
+
</DBTabList>
|
|
23
|
+
<DBTabPanel>Tab Panel 1</DBTabPanel>
|
|
24
|
+
<DBTabPanel>Tab Panel 2</DBTabPanel>
|
|
25
|
+
<DBTabPanel>Tab Panel 3</DBTabPanel>
|
|
26
|
+
</DBTabs>
|
|
27
|
+
<h2>2. Behavior Variants</h2>
|
|
28
|
+
<DBTabs behavior="scrollbar">
|
|
29
|
+
<DBTabList>
|
|
30
|
+
<DBTabItem>Tab 1</DBTabItem>
|
|
31
|
+
<DBTabItem>Tab 2</DBTabItem>
|
|
32
|
+
<DBTabItem>Tab 3</DBTabItem>
|
|
33
|
+
</DBTabList>
|
|
34
|
+
<DBTabPanel>Tab Panel 1</DBTabPanel>
|
|
35
|
+
<DBTabPanel>Tab Panel 2</DBTabPanel>
|
|
36
|
+
<DBTabPanel>Tab Panel 3</DBTabPanel>
|
|
37
|
+
</DBTabs>
|
|
38
|
+
<DBTabs behavior="arrows">
|
|
39
|
+
<DBTabList>
|
|
40
|
+
<DBTabItem>Tab 1</DBTabItem>
|
|
41
|
+
<DBTabItem>Tab 2</DBTabItem>
|
|
42
|
+
<DBTabItem>Tab 3</DBTabItem>
|
|
43
|
+
</DBTabList>
|
|
44
|
+
<DBTabPanel>Tab Panel 1</DBTabPanel>
|
|
45
|
+
<DBTabPanel>Tab Panel 2</DBTabPanel>
|
|
46
|
+
<DBTabPanel>Tab Panel 3</DBTabPanel>
|
|
47
|
+
</DBTabs>
|
|
48
|
+
<h2>3. Initial Selected Index</h2>
|
|
49
|
+
<DBTabs initialSelectedIndex={1}>
|
|
50
|
+
<DBTabList>
|
|
51
|
+
<DBTabItem>Tab 1</DBTabItem>
|
|
52
|
+
<DBTabItem>Tab 2</DBTabItem>
|
|
53
|
+
<DBTabItem>Tab 3</DBTabItem>
|
|
54
|
+
</DBTabList>
|
|
55
|
+
<DBTabPanel>Tab Panel 1</DBTabPanel>
|
|
56
|
+
<DBTabPanel>Tab Panel 2</DBTabPanel>
|
|
57
|
+
<DBTabPanel>Tab Panel 3</DBTabPanel>
|
|
58
|
+
</DBTabs>
|
|
59
|
+
<h2>4. Initial Selected Mode</h2>
|
|
60
|
+
<DBTabs initialSelectedMode="manually">
|
|
61
|
+
<DBTabList>
|
|
62
|
+
<DBTabItem>Tab 1</DBTabItem>
|
|
63
|
+
<DBTabItem>Tab 2</DBTabItem>
|
|
64
|
+
<DBTabItem>Tab 3</DBTabItem>
|
|
65
|
+
</DBTabList>
|
|
66
|
+
<DBTabPanel>Tab Panel 1</DBTabPanel>
|
|
67
|
+
<DBTabPanel>Tab Panel 2</DBTabPanel>
|
|
68
|
+
<DBTabPanel>Tab Panel 3</DBTabPanel>
|
|
69
|
+
</DBTabs>
|
|
70
|
+
</>
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export default Tabs;
|
|
75
|
+
```
|