@db-ux/react-core-components 3.0.1 → 3.0.2-copilot2-e7bf98b

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/agent/Tag.md ADDED
@@ -0,0 +1,56 @@
1
+
2
+
3
+ # Tag Examples (react)
4
+
5
+ ```tsx
6
+ import * as React from "react";
7
+ import { DBButton } from "@db-ux/react-react-core-components";
8
+ import { DBCheckbox } from "@db-ux/react-react-core-components";
9
+ import { DBLink } from "@db-ux/react-react-core-components";
10
+ import { DBRadio } from "@db-ux/react-react-core-components";
11
+ import { DBTag } from "@db-ux/react-react-core-components";
12
+
13
+ function Tag(props: any) {
14
+ return (
15
+ <>
16
+ <h1>DBTag Documentation Examples</h1>
17
+ <h2>1. Default Tags</h2>
18
+ <DBTag>
19
+ <DBButton>Tag as Button</DBButton>
20
+ </DBTag>
21
+ <DBTag>
22
+ <DBLink>Tag as Link</DBLink>
23
+ </DBTag>
24
+ <DBTag>
25
+ <DBCheckbox>Tag as Checkbox</DBCheckbox>
26
+ </DBTag>
27
+ <DBTag>
28
+ <DBRadio>Tag as Radio</DBRadio>
29
+ </DBTag>
30
+ <DBTag>Static Tag</DBTag>
31
+ <h2>2. Overflow Example</h2>
32
+ <DBTag overflow>
33
+ <span>Static Tag with overflow</span>
34
+ </DBTag>
35
+ <h2>3. Removable Tag</h2>
36
+ <DBTag
37
+ behavior="removable"
38
+ onRemove={(event) => console.log("Tag removed")}
39
+ >
40
+ Removable Tag
41
+ </DBTag>
42
+ <h2>4. Semantic Variants</h2>
43
+ <DBTag semantic="adaptive">Adaptive Tag</DBTag>
44
+ <DBTag semantic="neutral">Neutral Tag</DBTag>
45
+ <DBTag semantic="critical">Critical Tag</DBTag>
46
+ <DBTag semantic="informational">Informational Tag</DBTag>
47
+ <DBTag semantic="warning">Warning Tag</DBTag>
48
+ <DBTag semantic="successful">Successful Tag</DBTag>
49
+ <h2>5. Icon Support</h2>
50
+ <DBTag icon="user">Tag with Icon</DBTag>
51
+ </>
52
+ );
53
+ }
54
+
55
+ export default Tag;
56
+ ```
@@ -0,0 +1,45 @@
1
+
2
+
3
+ # Textarea Examples (react)
4
+
5
+ ```tsx
6
+ import * as React from "react";
7
+ import { DBTextarea } from "@db-ux/react-react-core-components";
8
+
9
+ function Textarea(props: any) {
10
+ return (
11
+ <>
12
+ <h1>DBTextarea Documentation Examples</h1>
13
+ <h2>1. Default Textarea</h2>
14
+ <DBTextarea label="Default Textarea" />
15
+ <h2>2. Resizable Variants</h2>
16
+ <DBTextarea resize="none" label="No Resize" />
17
+ <DBTextarea resize="both" label="Resize Both" />
18
+ <DBTextarea resize="horizontal" label="Resize Horizontal" />
19
+ <DBTextarea resize="vertical" label="Resize Vertical" />
20
+ <h2>3. Rows and Columns</h2>
21
+ <DBTextarea label="Custom Rows and Columns" rows={5} cols={30} />
22
+ <h2>4. Wrap Variants</h2>
23
+ <DBTextarea wrap="hard" label="Hard Wrap" />
24
+ <DBTextarea wrap="soft" label="Soft Wrap" />
25
+ <DBTextarea wrap="off" label="No Wrap" />
26
+ <h2>5. Disabled State</h2>
27
+ <DBTextarea label="Disabled Textarea" disabled />
28
+ <h2>6. Placeholder Examples</h2>
29
+ <DBTextarea placeholder="Enter text here" label="With Placeholder" />
30
+ <h2>7. Message Property Example</h2>
31
+ <DBTextarea
32
+ label="Textarea with Message"
33
+ message="This is a helper message."
34
+ />
35
+ <h2>8. Input Event Example</h2>
36
+ <DBTextarea
37
+ label="Input Event"
38
+ onInput={(event) => console.log("Input event:", event.target.value)}
39
+ />
40
+ </>
41
+ );
42
+ }
43
+
44
+ export default Textarea;
45
+ ```
@@ -0,0 +1,47 @@
1
+
2
+
3
+ # Tooltip Examples (react)
4
+
5
+ ```tsx
6
+ import * as React from "react";
7
+ import { DBButton } from "@db-ux/react-react-core-components";
8
+ import { DBTooltip } from "@db-ux/react-react-core-components";
9
+
10
+ function Tooltip(props: any) {
11
+ return (
12
+ <>
13
+ <h1>DBTooltip Documentation Examples</h1>
14
+ <h2>1. Default Tooltip</h2>
15
+ <DBButton>
16
+ Hover on me to open Tooltip
17
+ <DBTooltip>Tooltip</DBTooltip>
18
+ </DBButton>
19
+ <h2>2. Tooltip Variants</h2>
20
+ <DBButton>
21
+ Description Tooltip
22
+ <DBTooltip variant="description">Description Tooltip Content</DBTooltip>
23
+ </DBButton>
24
+ <DBButton>
25
+ Label Tooltip
26
+ <DBTooltip variant="label">Label Tooltip Content</DBTooltip>
27
+ </DBButton>
28
+ <h2>3. Tooltip with Arrow</h2>
29
+ <DBButton>
30
+ Tooltip with Arrow
31
+ <DBTooltip showArrow>Tooltip Content with Arrow</DBTooltip>
32
+ </DBButton>
33
+ <h2>4. Placement Variants</h2>
34
+ <DBButton>
35
+ Top Placement
36
+ <DBTooltip placement="top">Tooltip Content at Top</DBTooltip>
37
+ </DBButton>
38
+ <DBButton>
39
+ Bottom Placement
40
+ <DBTooltip placement="bottom">Tooltip Content at Bottom</DBTooltip>
41
+ </DBButton>
42
+ </>
43
+ );
44
+ }
45
+
46
+ export default Tooltip;
47
+ ```
@@ -0,0 +1,31 @@
1
+ - Use "@db-ux/react-core-components" as import for components:
2
+ - use for `DBDrawer` or `Drawer` the file __agent-path__/Drawer.md
3
+ - use for `DBTooltip` or `Tooltip` the file __agent-path__/Tooltip.md
4
+ - use for `DBTextarea` or `Textarea` the file __agent-path__/Textarea.md
5
+ - use for `DBTag` or `Tag` the file __agent-path__/Tag.md
6
+ - use for `DBTabs` or `Tabs` the file __agent-path__/Tabs.md
7
+ - use for `DBTabItem` or `TabItem` the file __agent-path__/TabItem.md
8
+ - use for `DBSwitch` or `Switch` the file __agent-path__/Switch.md
9
+ - use for `DBStack` or `Stack` the file __agent-path__/Stack.md
10
+ - use for `DBSelect` or `Select` the file __agent-path__/Select.md
11
+ - use for `DBSection` or `Section` the file __agent-path__/Section.md
12
+ - use for `DBRadio` or `Radio` the file __agent-path__/Radio.md
13
+ - use for `DBPopover` or `Popover` the file __agent-path__/Popover.md
14
+ - use for `DBPage` or `Page` the file __agent-path__/Page.md
15
+ - use for `DBNotification` or `Notification` the file __agent-path__/Notification.md
16
+ - use for `DBNavigationItem` or `NavigationItem` the file __agent-path__/NavigationItem.md
17
+ - use for `DBNavigation` or `Navigation` the file __agent-path__/Navigation.md
18
+ - use for `DBLink` or `Link` the file __agent-path__/Link.md
19
+ - use for `DBInput` or `Input` the file __agent-path__/Input.md
20
+ - use for `DBInfotext` or `Infotext` the file __agent-path__/Infotext.md
21
+ - use for `DBIcon` or `Icon` the file __agent-path__/Icon.md
22
+ - use for `DBHeader` or `Header` the file __agent-path__/Header.md
23
+ - use for `DBDivider` or `Divider` the file __agent-path__/Divider.md
24
+ - use for `DBCustomSelect` or `CustomSelect` the file __agent-path__/CustomSelect.md
25
+ - use for `DBCheckbox` or `Checkbox` the file __agent-path__/Checkbox.md
26
+ - use for `DBCard` or `Card` the file __agent-path__/Card.md
27
+ - use for `DBButton` or `Button` the file __agent-path__/Button.md
28
+ - use for `DBBrand` or `Brand` the file __agent-path__/Brand.md
29
+ - use for `DBBadge` or `Badge` the file __agent-path__/Badge.md
30
+ - use for `DBAccordionItem` or `AccordionItem` the file __agent-path__/AccordionItem.md
31
+ - use for `DBAccordion` or `Accordion` the file __agent-path__/Accordion.md
@@ -102,24 +102,29 @@ function DBTabsFn(props, component) {
102
102
  }
103
103
  }
104
104
  function handleChange(event) {
105
- var _a, _b;
105
+ var _a;
106
106
  event.stopPropagation();
107
- const closest = (_a = event.target) === null || _a === void 0 ? void 0 : _a.closest;
108
- if (!closest)
109
- return;
110
- const list = closest("ul");
111
- const listItem =
112
- // db-tab-item for angular and stencil wrapping elements
113
- (_b = closest("db-tab-item")) !== null && _b !== void 0 ? _b : closest("li");
114
- if (list !== null && listItem !== null) {
115
- const indices = Array.from(list.childNodes).indexOf(listItem);
116
- if (props.onIndexChange) {
117
- props.onIndexChange(indices);
107
+ if (event.target) {
108
+ const target = event.target;
109
+ const parent = target.parentElement;
110
+ if (parent &&
111
+ parent.parentElement &&
112
+ ((_a = parent.parentElement) === null || _a === void 0 ? void 0 : _a.nodeName) === "LI") {
113
+ const tabItem = parent.parentElement;
114
+ if (tabItem) {
115
+ const list = tabItem.parentElement;
116
+ if (list) {
117
+ const indices = Array.from(list.childNodes).indexOf(tabItem);
118
+ if (props.onIndexChange) {
119
+ props.onIndexChange(indices);
120
+ }
121
+ if (props.onTabSelect) {
122
+ props.onTabSelect(event);
123
+ }
124
+ }
125
+ }
118
126
  }
119
127
  }
120
- if (props.onTabSelect) {
121
- props.onTabSelect(event);
122
- }
123
128
  }
124
129
  useEffect(() => {
125
130
  set_id(props.id || _id);
@@ -148,7 +153,7 @@ function DBTabsFn(props, component) {
148
153
  setInitialized(false);
149
154
  }
150
155
  }, [_ref.current, initialized]);
151
- return (React.createElement("div", Object.assign({ ref: _ref }, filterPassingProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "onTabSelect", "onIndexChange"]), { id: _id }, getRootProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font"]), { className: cls("db-tabs", props.className), "data-orientation": props.orientation, "data-scroll-behavior": props.behavior, "data-alignment": (_a = props.alignment) !== null && _a !== void 0 ? _a : "start", "data-width": (_b = props.width) !== null && _b !== void 0 ? _b : "auto", onInput: (event) => handleChange(event) }),
156
+ return (React.createElement("div", Object.assign({ ref: _ref }, filterPassingProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "onTabSelect", "onIndexChange"]), { id: _id }, getRootProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font"]), { className: cls("db-tabs", props.className), "data-orientation": props.orientation, "data-scroll-behavior": props.behavior, "data-alignment": (_a = props.alignment) !== null && _a !== void 0 ? _a : "start", "data-width": (_b = props.width) !== null && _b !== void 0 ? _b : "auto", onInput: (event) => handleChange(event), onChange: (event) => handleChange(event) }),
152
157
  showScrollLeft ? (React.createElement(DBButton, { className: "tabs-scroll-left", variant: "ghost", icon: "chevron_left", type: "button", noText: true, onClick: (event) => scroll(true) }, "Scroll left")) : null,
153
158
  props.tabs ? (React.createElement(React.Fragment, null,
154
159
  React.createElement(DBTabList, null, (_c = convertTabs()) === null || _c === void 0 ? void 0 : _c.map((tab, index) => (React.createElement(DBTabItem, { key: props.name + "tab-item" + index, active: tab.active, label: tab.label, iconTrailing: tab.iconTrailing, icon: tab.icon, noText: tab.noText })))), (_d = convertTabs()) === null || _d === void 0 ? void 0 :
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@db-ux/react-core-components",
3
- "version": "3.0.1",
3
+ "version": "3.0.2-copilot2-e7bf98b",
4
4
  "description": "React components for @db-ux/core-components",
5
5
  "repository": {
6
6
  "type": "git",
@@ -11,11 +11,13 @@
11
11
  "module": "./dist/index.js",
12
12
  "types": "./dist/index.d.ts",
13
13
  "files": [
14
- "dist/"
14
+ "dist/",
15
+ "agent"
15
16
  ],
16
17
  "scripts": {
17
18
  "build": "npm-run-all tsc",
18
19
  "mv:dist": "cpr dist ../../build-outputs/react/dist --overwrite",
20
+ "mv:agent": "cpr agent ../../build-outputs/react/agent -o",
19
21
  "mv:package.json": "cpr package.json ../../build-outputs/react/package.json --overwrite",
20
22
  "mv:readme": "cpr README.md ../../build-outputs/react/README.md --overwrite",
21
23
  "open:report": "npx playwright show-report",
@@ -38,7 +40,7 @@
38
40
  },
39
41
  "sideEffects": false,
40
42
  "dependencies": {
41
- "@db-ux/core-components": "3.0.1",
42
- "@db-ux/core-foundations": "3.0.1"
43
+ "@db-ux/core-components": "3.0.2-copilot2-e7bf98b",
44
+ "@db-ux/core-foundations": "3.0.2-copilot2-e7bf98b"
43
45
  }
44
46
  }