@db-ux/react-core-components 4.4.3 → 4.5.0
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/CHANGELOG.md +10 -0
- package/dist/components/accordion/accordion.js +3 -3
- package/dist/components/accordion-item/accordion-item.d.ts +1 -1
- package/dist/components/accordion-item/accordion-item.js +2 -1
- package/dist/components/badge/badge.d.ts +1 -1
- package/dist/components/badge/badge.js +3 -3
- package/dist/components/badge/model.d.ts +2 -2
- package/dist/components/brand/brand.d.ts +1 -1
- package/dist/components/brand/brand.js +2 -2
- package/dist/components/button/button.d.ts +1 -1
- package/dist/components/button/button.js +2 -2
- package/dist/components/button/model.d.ts +8 -10
- package/dist/components/card/card.js +2 -1
- package/dist/components/checkbox/checkbox.js +15 -6
- package/dist/components/custom-button/custom-button.d.ts +3 -0
- package/dist/components/custom-button/custom-button.js +12 -0
- package/dist/components/custom-button/index.d.ts +1 -0
- package/dist/components/custom-button/index.js +1 -0
- package/dist/components/custom-button/model.d.ts +6 -0
- package/dist/components/custom-button/model.js +1 -0
- package/dist/components/custom-select/custom-select.js +26 -17
- package/dist/components/custom-select-dropdown/custom-select-dropdown.js +2 -1
- package/dist/components/custom-select-form-field/custom-select-form-field.js +2 -1
- package/dist/components/custom-select-list/custom-select-list.js +2 -1
- package/dist/components/custom-select-list-item/custom-select-list-item.js +2 -1
- package/dist/components/divider/divider.js +2 -1
- package/dist/components/drawer/drawer.js +3 -3
- package/dist/components/header/header.js +3 -3
- package/dist/components/icon/icon.d.ts +1 -1
- package/dist/components/icon/icon.js +2 -1
- package/dist/components/infotext/infotext.d.ts +1 -1
- package/dist/components/infotext/infotext.js +2 -2
- package/dist/components/infotext/model.d.ts +2 -2
- package/dist/components/input/input.js +18 -9
- package/dist/components/link/link.d.ts +1 -1
- package/dist/components/link/link.js +2 -2
- package/dist/components/navigation/navigation.js +2 -1
- package/dist/components/navigation-item/navigation-item.d.ts +1 -1
- package/dist/components/navigation-item/navigation-item.js +3 -3
- package/dist/components/notification/model.d.ts +2 -2
- package/dist/components/notification/notification.d.ts +1 -1
- package/dist/components/notification/notification.js +3 -3
- package/dist/components/page/page.js +2 -1
- package/dist/components/popover/popover.js +3 -3
- package/dist/components/radio/radio.js +12 -2
- package/dist/components/section/section.js +2 -1
- package/dist/components/select/select.js +17 -8
- package/dist/components/stack/stack.js +2 -1
- package/dist/components/switch/switch.js +25 -8
- package/dist/components/tab-item/tab-item.d.ts +1 -1
- package/dist/components/tab-item/tab-item.js +3 -3
- package/dist/components/tab-list/tab-list.js +2 -1
- package/dist/components/tab-panel/tab-panel.js +2 -1
- package/dist/components/tabs/tabs.js +4 -4
- package/dist/components/tag/model.d.ts +2 -6
- package/dist/components/tag/tag.d.ts +1 -1
- package/dist/components/tag/tag.js +2 -2
- package/dist/components/textarea/textarea.js +16 -7
- package/dist/components/tooltip/model.d.ts +3 -3
- package/dist/components/tooltip/tooltip.d.ts +1 -1
- package/dist/components/tooltip/tooltip.js +11 -6
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/shared/model.d.ts +15 -1
- package/dist/utils/index.js +6 -7
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @db-ux/react-core-components
|
|
2
2
|
|
|
3
|
+
## 4.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- feat: add `wrap` property for possible inline components (badge, button, infotext, tooltip) besides link and navigation-item, which already have the `wrap` property - [see commit c08970c](https://github.com/db-ux-design-system/core-web/commit/c08970c640f24abee93ed17de258f4e15fa7cb7f)
|
|
8
|
+
|
|
9
|
+
- feat: add `propOverrides` property for components to provide a possibility for avoiding duplicated `id` property on Angular and Web Components - [see commit 9720ebb](https://github.com/db-ux-design-system/core-web/commit/9720ebb9c47302ed0d9939ce219a7d876ba0155c)
|
|
10
|
+
|
|
11
|
+
- feat: add DBCustomButton for development to style `<a>` or `<label><input/>` children - [see commit a50323b](https://github.com/db-ux-design-system/core-web/commit/a50323b21363981c02bbabf7828a6f2d94f11e4d)
|
|
12
|
+
|
|
3
13
|
## 4.4.3
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -6,7 +6,7 @@ import { cls } from "../../utils";
|
|
|
6
6
|
import DBAccordionItem from "../accordion-item/accordion-item";
|
|
7
7
|
import { useId } from "react";
|
|
8
8
|
function DBAccordionFn(props, component) {
|
|
9
|
-
var _a;
|
|
9
|
+
var _a, _b, _c;
|
|
10
10
|
const uuid = useId();
|
|
11
11
|
const _ref = component || useRef(component);
|
|
12
12
|
const [_name, set_name] = useState(() => "");
|
|
@@ -80,9 +80,9 @@ function DBAccordionFn(props, component) {
|
|
|
80
80
|
set_initOpenIndexDone(false);
|
|
81
81
|
}
|
|
82
82
|
}, [_ref.current, _initOpenIndexDone, props.initOpenIndex]);
|
|
83
|
-
return (React.createElement("ul", 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", "data-density"]), { id: props.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", "data-density"]), { className: cls("db-accordion", props.className), "data-variant": props.variant }),
|
|
83
|
+
return (React.createElement("ul", 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", "data-density"]), { id: (_a = props.id) !== null && _a !== void 0 ? _a : (_b = props.propOverrides) === null || _b === void 0 ? void 0 : _b.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", "data-density"]), { className: cls("db-accordion", props.className), "data-variant": props.variant }),
|
|
84
84
|
!props.items ? React.createElement(React.Fragment, null, props.children) : null,
|
|
85
|
-
props.items ? (React.createElement(React.Fragment, null, (
|
|
85
|
+
props.items ? (React.createElement(React.Fragment, null, (_c = convertItems()) === null || _c === void 0 ? void 0 : _c.map((item, index) => (React.createElement(DBAccordionItem, { key: `accordion-item-${index}`, headlinePlain: item.headlinePlain, disabled: item.disabled, text: item.text }))))) : null));
|
|
86
86
|
}
|
|
87
87
|
const DBAccordion = forwardRef(DBAccordionFn);
|
|
88
88
|
export default DBAccordion;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
declare const DBAccordionItem: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<any>, "name" | "text" | "defaultOpen" | "disabled" | "headline" | "headlinePlain" | keyof import("../../shared/model").
|
|
2
|
+
declare const DBAccordionItem: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<any>, keyof import("../../shared/model").GlobalProps | "name" | "text" | "defaultOpen" | "disabled" | "headline" | "headlinePlain" | keyof import("../../shared/model").ToggleEventProps> & {
|
|
3
3
|
defaultOpen?: boolean;
|
|
4
4
|
disabled?: boolean | string;
|
|
5
5
|
headline?: any;
|
|
@@ -4,6 +4,7 @@ import { filterPassingProps, getRootProps } from "../../utils/react";
|
|
|
4
4
|
import { useState, useRef, useEffect, forwardRef } from "react";
|
|
5
5
|
import { cls, getBooleanAsString } from "../../utils";
|
|
6
6
|
function DBAccordionItemFn(props, component) {
|
|
7
|
+
var _a, _b;
|
|
7
8
|
const _ref = component || useRef(component);
|
|
8
9
|
const [_open, set_open] = useState(() => false);
|
|
9
10
|
const [_name, set_name] = useState(() => undefined);
|
|
@@ -44,7 +45,7 @@ function DBAccordionItemFn(props, component) {
|
|
|
44
45
|
set_name(props.name);
|
|
45
46
|
}
|
|
46
47
|
}, [props.name]);
|
|
47
|
-
return (React.createElement("li", Object.assign({ id: props.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", "data-density"]), { className: cls("db-accordion-item", props.className) }),
|
|
48
|
+
return (React.createElement("li", Object.assign({ id: (_a = props.id) !== null && _a !== void 0 ? _a : (_b = props.propOverrides) === null || _b === void 0 ? void 0 : _b.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", "data-density"]), { className: cls("db-accordion-item", props.className) }),
|
|
48
49
|
React.createElement("details", Object.assign({ "aria-disabled": getBooleanAsString(props.disabled), 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", "data-density", "onToggle"]), { name: _name, open: _open }),
|
|
49
50
|
React.createElement("summary", { onClick: (event) => handleToggle(event) },
|
|
50
51
|
props.headlinePlain ? React.createElement(React.Fragment, null, props.headlinePlain) : null,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
declare const DBBadge: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<any>, "
|
|
2
|
+
declare const DBBadge: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<any>, keyof import("../..").GlobalProps | "semantic" | "text" | keyof import("./model").DBBadgeDefaultProps | "size" | "emphasis" | "wrap"> & import("./model").DBBadgeDefaultProps & import("../..").GlobalProps & import("../..").SemanticProps & import("../..").SizeProps & import("../..").EmphasisProps & import("../..").TextProps & import("../..").WrapProps & React.RefAttributes<any>>;
|
|
3
3
|
export default DBBadge;
|
|
@@ -3,9 +3,9 @@ import * as React from "react";
|
|
|
3
3
|
import { filterPassingProps, getRootProps } from "../../utils/react";
|
|
4
4
|
import { useState, useRef, useEffect, forwardRef } from "react";
|
|
5
5
|
import { DEFAULT_LABEL } from "../../shared/constants";
|
|
6
|
-
import { cls } from "../../utils";
|
|
6
|
+
import { cls, getBooleanAsString } from "../../utils";
|
|
7
7
|
function DBBadgeFn(props, component) {
|
|
8
|
-
var _a, _b;
|
|
8
|
+
var _a, _b, _c, _d;
|
|
9
9
|
const _ref = component || useRef(component);
|
|
10
10
|
const [initialized, setInitialized] = useState(() => false);
|
|
11
11
|
useEffect(() => {
|
|
@@ -26,7 +26,7 @@ function DBBadgeFn(props, component) {
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
}, [_ref.current, initialized]);
|
|
29
|
-
return (React.createElement("span", 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", "data-density"]), { id: props.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", "data-density"]), { className: cls("db-badge", props.className), "data-semantic": props.semantic, "data-size": props.size, "data-emphasis": props.emphasis, "data-placement": props.placement, "data-label": ((
|
|
29
|
+
return (React.createElement("span", 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", "data-density"]), { id: (_a = props.id) !== null && _a !== void 0 ? _a : (_b = props.propOverrides) === null || _b === void 0 ? void 0 : _b.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", "data-density"]), { className: cls("db-badge", props.className), "data-semantic": props.semantic, "data-size": props.size, "data-emphasis": props.emphasis, "data-placement": props.placement, "data-wrap": getBooleanAsString(props.wrap), "data-label": ((_c = props.placement) === null || _c === void 0 ? void 0 : _c.startsWith("corner")) && ((_d = props.label) !== null && _d !== void 0 ? _d : DEFAULT_LABEL) }), props.text ? React.createElement(React.Fragment, null, props.text) : React.createElement(React.Fragment, null, props.children)));
|
|
30
30
|
}
|
|
31
31
|
const DBBadge = forwardRef(DBBadgeFn);
|
|
32
32
|
export default DBBadge;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EmphasisProps, GlobalProps, GlobalState, InitializedState, SemanticProps, SizeProps, TextProps } from '../../shared/model';
|
|
1
|
+
import { EmphasisProps, GlobalProps, GlobalState, InitializedState, SemanticProps, SizeProps, TextProps, WrapProps } from '../../shared/model';
|
|
2
2
|
export declare const BadgePlacementList: readonly ["inline", "corner-top-left", "corner-top-right", "corner-center-left", "corner-center-right", "corner-bottom-left", "corner-bottom-right"];
|
|
3
3
|
export type BadgePlacementType = (typeof BadgePlacementList)[number];
|
|
4
4
|
export type DBBadgeDefaultProps = {
|
|
@@ -11,6 +11,6 @@ export type DBBadgeDefaultProps = {
|
|
|
11
11
|
*/
|
|
12
12
|
label?: string;
|
|
13
13
|
};
|
|
14
|
-
export type DBBadgeProps = DBBadgeDefaultProps & GlobalProps & SemanticProps & SizeProps & EmphasisProps & TextProps;
|
|
14
|
+
export type DBBadgeProps = DBBadgeDefaultProps & GlobalProps & SemanticProps & SizeProps & EmphasisProps & TextProps & WrapProps;
|
|
15
15
|
export type DBBadgeDefaultState = {};
|
|
16
16
|
export type DBBadgeState = DBBadgeDefaultState & GlobalState & InitializedState;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
declare const DBBrand: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<any>,
|
|
2
|
+
declare const DBBrand: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<any>, keyof import("../..").GlobalProps | "text" | "hideLogo" | "icon" | "showIcon"> & import("./model").DBBrandDefaultProps & import("../..").GlobalProps & import("../..").IconProps & import("../..").ShowIconProps & import("../..").TextProps & React.RefAttributes<any>>;
|
|
3
3
|
export default DBBrand;
|
|
@@ -5,9 +5,9 @@ import { useRef, forwardRef } from "react";
|
|
|
5
5
|
import { DEFAULT_ICON } from "../../shared/constants";
|
|
6
6
|
import { cls, getBooleanAsString } from "../../utils";
|
|
7
7
|
function DBBrandFn(props, component) {
|
|
8
|
-
var _a;
|
|
8
|
+
var _a, _b, _c;
|
|
9
9
|
const _ref = component || useRef(component);
|
|
10
|
-
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", "data-density"]), { "data-icon": props.hideLogo ? "none" : (_a = props.icon) !== null && _a !== void 0 ? _a : DEFAULT_ICON, "data-show-icon": getBooleanAsString(props.showIcon), id: props.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", "data-density"]), { className: cls("db-brand", props.className) }), props.text ? React.createElement(React.Fragment, null, props.text) : React.createElement(React.Fragment, null, props.children)));
|
|
10
|
+
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", "data-density"]), { "data-icon": props.hideLogo ? "none" : (_a = props.icon) !== null && _a !== void 0 ? _a : DEFAULT_ICON, "data-show-icon": getBooleanAsString(props.showIcon), id: (_b = props.id) !== null && _b !== void 0 ? _b : (_c = props.propOverrides) === null || _c === void 0 ? void 0 : _c.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", "data-density"]), { className: cls("db-brand", props.className) }), props.text ? React.createElement(React.Fragment, null, props.text) : React.createElement(React.Fragment, null, props.children)));
|
|
11
11
|
}
|
|
12
12
|
const DBBrand = forwardRef(DBBrandFn);
|
|
13
13
|
export default DBBrand;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
declare const DBButton: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<any>,
|
|
2
|
+
declare const DBButton: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<any>, keyof import("../..").GlobalProps | "text" | "variant" | "size" | "wrap" | "icon" | "showIcon" | keyof import("./model").DBButtonDefaultProps | keyof import("../..").ClickEventProps<HTMLButtonElement> | "width" | "showIconLeading" | "showIconTrailing" | "iconLeading" | "iconTrailing" | "noText"> & import("./model").DBButtonDefaultProps & import("./model").DBButtonSharedProps & import("../..").GlobalProps & import("../..").ClickEventProps<HTMLButtonElement> & import("../..").IconProps & import("../..").WidthProps & import("../..").SizeProps & import("../..").ShowIconProps & import("../..").TextProps & import("../..").ShowIconLeadingProps & import("../..").ShowIconTrailingProps & import("../..").IconLeadingProps & import("../..").IconTrailingProps & import("../..").WrapProps & import("../..").NoTextProps & React.RefAttributes<any>>;
|
|
3
3
|
export default DBButton;
|
|
@@ -4,7 +4,7 @@ import { filterPassingProps, getRootProps } from "../../utils/react";
|
|
|
4
4
|
import { useRef, forwardRef } from "react";
|
|
5
5
|
import { cls, getBoolean, getBooleanAsString } from "../../utils";
|
|
6
6
|
function DBButtonFn(props, component) {
|
|
7
|
-
var _a, _b;
|
|
7
|
+
var _a, _b, _c, _d;
|
|
8
8
|
const _ref = component || useRef(component);
|
|
9
9
|
function getButtonType() {
|
|
10
10
|
if (props.type) {
|
|
@@ -15,7 +15,7 @@ function DBButtonFn(props, component) {
|
|
|
15
15
|
}
|
|
16
16
|
return "submit";
|
|
17
17
|
}
|
|
18
|
-
return (React.createElement("button", 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", "data-density"]), { id: props.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", "data-density"]), { className: cls("db-button", props.className), type: getButtonType(), disabled: getBoolean(props.disabled, "disabled"), "data-icon": (
|
|
18
|
+
return (React.createElement("button", 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", "data-density"]), { id: (_a = props.id) !== null && _a !== void 0 ? _a : (_b = props.propOverrides) === null || _b === void 0 ? void 0 : _b.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", "data-density"]), { className: cls("db-button", props.className), type: getButtonType(), disabled: getBoolean(props.disabled, "disabled"), "data-icon": (_c = props.iconLeading) !== null && _c !== void 0 ? _c : props.icon, "data-show-icon": getBooleanAsString((_d = props.showIconLeading) !== null && _d !== void 0 ? _d : props.showIcon), "data-icon-trailing": props.iconTrailing, "data-show-icon-trailing": getBooleanAsString(props.showIconTrailing), "data-size": props.size, "data-width": props.width, "data-variant": props.variant, "data-wrap": getBooleanAsString(props.wrap), "data-no-text": getBooleanAsString(props.noText), name: props.name, form: props.form, value: props.value }), props.text ? React.createElement(React.Fragment, null, props.text) : React.createElement(React.Fragment, null, props.children)));
|
|
19
19
|
}
|
|
20
20
|
const DBButton = forwardRef(DBButtonFn);
|
|
21
21
|
export default DBButton;
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import { ClickEventProps, GlobalProps, GlobalState, IconLeadingProps, IconProps, IconTrailingProps, ShowIconLeadingProps, ShowIconProps, ShowIconTrailingProps, SizeProps, TextProps, WidthProps } from '../../shared/model';
|
|
1
|
+
import { ClickEventProps, GlobalProps, GlobalState, IconLeadingProps, IconProps, IconTrailingProps, NoTextProps, ShowIconLeadingProps, ShowIconProps, ShowIconTrailingProps, SizeProps, TextProps, WidthProps, WrapProps } from '../../shared/model';
|
|
2
2
|
export declare const ButtonVariantList: readonly ["outlined", "brand", "filled", "ghost"];
|
|
3
3
|
export type ButtonVariantType = (typeof ButtonVariantList)[number];
|
|
4
4
|
export declare const ButtonTypeList: readonly ["button", "reset", "submit"];
|
|
5
5
|
export type ButtonTypeType = (typeof ButtonTypeList)[number];
|
|
6
|
+
export type DBButtonSharedProps = {
|
|
7
|
+
/**
|
|
8
|
+
* Variant of the button. Only use one primary button as a CTA on a page; otherwise, use one of the adaptive buttons.
|
|
9
|
+
*/
|
|
10
|
+
variant?: ButtonVariantType | string;
|
|
11
|
+
};
|
|
6
12
|
export type DBButtonDefaultProps = {
|
|
7
13
|
/**
|
|
8
14
|
* The disabled attribute can be set to [keep a user from clicking on the button](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#disabled).
|
|
@@ -16,10 +22,6 @@ export type DBButtonDefaultProps = {
|
|
|
16
22
|
* The name attribute specifies a [name attributes value](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#name) for the button.
|
|
17
23
|
*/
|
|
18
24
|
name?: string;
|
|
19
|
-
/**
|
|
20
|
-
* Define the text next to the icon specified via the icon Property to get hidden.
|
|
21
|
-
*/
|
|
22
|
-
noText?: boolean | string;
|
|
23
25
|
/**
|
|
24
26
|
* The type attribute specifies the [type of button](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#type).
|
|
25
27
|
*/
|
|
@@ -28,12 +30,8 @@ export type DBButtonDefaultProps = {
|
|
|
28
30
|
* The value attribute specifies an initial [value for the button](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#value).
|
|
29
31
|
*/
|
|
30
32
|
value?: string;
|
|
31
|
-
/**
|
|
32
|
-
* Variant of the button. Use only 1 primary button on a page as CTA otherwise use one of the adaptive buttons.
|
|
33
|
-
*/
|
|
34
|
-
variant?: ButtonVariantType | string;
|
|
35
33
|
};
|
|
36
|
-
export type DBButtonProps = DBButtonDefaultProps & GlobalProps & ClickEventProps<HTMLButtonElement> & IconProps & WidthProps & SizeProps & ShowIconProps & TextProps & ShowIconLeadingProps & ShowIconTrailingProps & IconLeadingProps & IconTrailingProps;
|
|
34
|
+
export type DBButtonProps = DBButtonDefaultProps & DBButtonSharedProps & GlobalProps & ClickEventProps<HTMLButtonElement> & IconProps & WidthProps & SizeProps & ShowIconProps & TextProps & ShowIconLeadingProps & ShowIconTrailingProps & IconLeadingProps & IconTrailingProps & WrapProps & NoTextProps;
|
|
37
35
|
export type DBButtonDefaultState = {
|
|
38
36
|
getButtonType: () => ButtonTypeType;
|
|
39
37
|
};
|
|
@@ -4,13 +4,14 @@ import { filterPassingProps, getRootProps } from "../../utils/react";
|
|
|
4
4
|
import { useRef, forwardRef } from "react";
|
|
5
5
|
import { cls } from "../../utils";
|
|
6
6
|
function DBCardFn(props, component) {
|
|
7
|
+
var _a, _b;
|
|
7
8
|
const _ref = component || useRef(component);
|
|
8
9
|
function handleClick(event) {
|
|
9
10
|
if (props.onClick) {
|
|
10
11
|
props.onClick(event);
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
|
-
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", "data-density"]), { id: props.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", "data-density"]), { className: cls("db-card", props.className), "data-behavior": props.behavior, "data-elevation-level": props.elevationLevel, "data-spacing": props.spacing, onClick: (event) => handleClick(event) }), props.children));
|
|
14
|
+
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", "data-density"]), { id: (_a = props.id) !== null && _a !== void 0 ? _a : (_b = props.propOverrides) === null || _b === void 0 ? void 0 : _b.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", "data-density"]), { className: cls("db-card", props.className), "data-behavior": props.behavior, "data-elevation-level": props.elevationLevel, "data-spacing": props.spacing, onClick: (event) => handleClick(event) }), props.children));
|
|
14
15
|
}
|
|
15
16
|
const DBCard = forwardRef(DBCardFn);
|
|
16
17
|
export default DBCard;
|
|
@@ -8,7 +8,7 @@ import { addCheckedResetEventListener, } from "../../utils/form-components";
|
|
|
8
8
|
import DBInfotext from "../infotext/infotext";
|
|
9
9
|
import { useId } from "react";
|
|
10
10
|
function DBCheckboxFn(props, component) {
|
|
11
|
-
var _a;
|
|
11
|
+
var _a, _b;
|
|
12
12
|
const uuid = useId();
|
|
13
13
|
const _ref = component || useRef(component);
|
|
14
14
|
const [initialized, setInitialized] = useState(() => false);
|
|
@@ -69,16 +69,25 @@ function DBCheckboxFn(props, component) {
|
|
|
69
69
|
props.onFocus(event);
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
|
|
73
|
-
var _a;
|
|
74
|
-
|
|
75
|
-
const mId = (_a = props.id) !== null && _a !== void 0 ? _a : `checkbox-${uuid}`;
|
|
72
|
+
function resetIds() {
|
|
73
|
+
var _a, _b, _c;
|
|
74
|
+
const mId = (_c = (_a = props.id) !== null && _a !== void 0 ? _a : (_b = props.propOverrides) === null || _b === void 0 ? void 0 : _b.id) !== null && _c !== void 0 ? _c : `checkbox-${uuid}`;
|
|
76
75
|
set_id(mId);
|
|
77
76
|
set_messageId(mId + DEFAULT_MESSAGE_ID_SUFFIX);
|
|
78
77
|
set_validMessageId(mId + DEFAULT_VALID_MESSAGE_ID_SUFFIX);
|
|
79
78
|
set_invalidMessageId(mId + DEFAULT_INVALID_MESSAGE_ID_SUFFIX);
|
|
79
|
+
}
|
|
80
|
+
useEffect(() => {
|
|
81
|
+
setInitialized(true);
|
|
82
|
+
resetIds();
|
|
80
83
|
set_invalidMessage(props.invalidMessage || DEFAULT_INVALID_MESSAGE);
|
|
81
84
|
}, []);
|
|
85
|
+
useEffect(() => {
|
|
86
|
+
var _a, _b;
|
|
87
|
+
if ((_a = props.id) !== null && _a !== void 0 ? _a : (_b = props.propOverrides) === null || _b === void 0 ? void 0 : _b.id) {
|
|
88
|
+
resetIds();
|
|
89
|
+
}
|
|
90
|
+
}, [props.id, (_a = props.propOverrides) === null || _a === void 0 ? void 0 : _a.id]);
|
|
82
91
|
useEffect(() => {
|
|
83
92
|
var _a;
|
|
84
93
|
set_invalidMessage(props.invalidMessage ||
|
|
@@ -138,7 +147,7 @@ function DBCheckboxFn(props, component) {
|
|
|
138
147
|
}, []);
|
|
139
148
|
return (React.createElement("div", Object.assign({}, 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", "data-density"]), { className: cls("db-checkbox", props.className), "data-size": props.size, "data-hide-asterisk": getHideProp(props.showRequiredAsterisk), "data-hide-label": getHideProp(props.showLabel) }),
|
|
140
149
|
React.createElement("label", { htmlFor: _id },
|
|
141
|
-
React.createElement("input", Object.assign({ type: "checkbox", "aria-invalid": props.validation === "invalid", "data-custom-validity": props.validation, 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", "data-density"]), { id: _id, name: props.name, checked: getBoolean(props.checked, "checked"), disabled: getBoolean(props.disabled, "disabled"), value: props.value, required: getBoolean(props.required, "required"), onChange: (event) => handleChange(event), onBlur: (event) => handleBlur(event), onFocus: (event) => handleFocus(event), "aria-describedby": (
|
|
150
|
+
React.createElement("input", Object.assign({ type: "checkbox", "aria-invalid": props.validation === "invalid", "data-custom-validity": props.validation, 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", "data-density"]), { id: _id, name: props.name, checked: getBoolean(props.checked, "checked"), disabled: getBoolean(props.disabled, "disabled"), value: props.value, required: getBoolean(props.required, "required"), onChange: (event) => handleChange(event), onBlur: (event) => handleBlur(event), onFocus: (event) => handleFocus(event), "aria-describedby": (_b = props.ariaDescribedBy) !== null && _b !== void 0 ? _b : _descByIds })),
|
|
142
151
|
props.label ? React.createElement(React.Fragment, null, props.label) : React.createElement(React.Fragment, null, props.children)),
|
|
143
152
|
stringPropVisible(props.message, props.showMessage) ? (React.createElement(DBInfotext, { size: "small", icon: props.messageIcon, id: _messageId }, props.message)) : null,
|
|
144
153
|
hasValidState() ? (React.createElement(DBInfotext, { size: "small", semantic: "successful", id: _validMessageId }, props.validMessage || DEFAULT_VALID_MESSAGE)) : null,
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const DBCustomButton: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLDivElement>, keyof import("../..").GlobalProps | "variant" | "size" | "wrap" | "icon" | "showIcon" | "width" | "showIconLeading" | "showIconTrailing" | "iconLeading" | "iconTrailing" | "noText"> & import("../..").DBButtonSharedProps & import("../..").GlobalProps & import("../..").IconProps & import("../..").WidthProps & import("../..").SizeProps & import("../..").ShowIconProps & import("../..").ShowIconLeadingProps & import("../..").ShowIconTrailingProps & import("../..").IconLeadingProps & import("../..").IconTrailingProps & import("../..").NoTextProps & import("../..").WrapProps & React.RefAttributes<HTMLDivElement>>;
|
|
3
|
+
export default DBCustomButton;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { filterPassingProps, getRootProps } from "../../utils/react";
|
|
4
|
+
import { useRef, forwardRef } from "react";
|
|
5
|
+
import { cls, getBooleanAsString } from "../../utils";
|
|
6
|
+
function DBCustomButtonFn(props, component) {
|
|
7
|
+
var _a, _b, _c, _d;
|
|
8
|
+
const _ref = component || useRef(component);
|
|
9
|
+
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", "data-density"]), { id: (_a = props.id) !== null && _a !== void 0 ? _a : (_b = props.propOverrides) === null || _b === void 0 ? void 0 : _b.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", "data-density"]), { className: cls("db-custom-button", props.className), "data-icon": (_c = props.iconLeading) !== null && _c !== void 0 ? _c : props.icon, "data-show-icon": getBooleanAsString((_d = props.showIconLeading) !== null && _d !== void 0 ? _d : props.showIcon), "data-icon-trailing": props.iconTrailing, "data-show-icon-trailing": getBooleanAsString(props.showIconTrailing), "data-size": props.size, "data-width": props.width, "data-variant": props.variant, "data-no-text": getBooleanAsString(props.noText) }), props.children));
|
|
10
|
+
}
|
|
11
|
+
const DBCustomButton = forwardRef(DBCustomButtonFn);
|
|
12
|
+
export default DBCustomButton;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as DBCustomButton } from './custom-button';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as DBCustomButton } from './custom-button';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { GlobalProps, GlobalState, IconLeadingProps, IconProps, IconTrailingProps, NoTextProps, ShowIconLeadingProps, ShowIconProps, ShowIconTrailingProps, SizeProps, WidthProps, WrapProps } from '../../shared/model';
|
|
2
|
+
import { DBButtonSharedProps } from '../button/model';
|
|
3
|
+
export type DBCustomButtonDefaultProps = {};
|
|
4
|
+
export type DBCustomButtonProps = DBCustomButtonDefaultProps & DBButtonSharedProps & GlobalProps & IconProps & WidthProps & SizeProps & ShowIconProps & ShowIconLeadingProps & ShowIconTrailingProps & IconLeadingProps & IconTrailingProps & NoTextProps & WrapProps;
|
|
5
|
+
export type DBCustomButtonDefaultState = {};
|
|
6
|
+
export type DBCustomButtonState = DBCustomButtonDefaultState & GlobalState;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -18,7 +18,7 @@ import DBTag from "../tag/tag";
|
|
|
18
18
|
import DBTooltip from "../tooltip/tooltip";
|
|
19
19
|
import { useId } from "react";
|
|
20
20
|
function DBCustomSelectFn(props, component) {
|
|
21
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
21
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
22
22
|
props = Object.assign({ clearSelectionText: "Clear selection", showClearSelection: true }, props);
|
|
23
23
|
const uuid = useId();
|
|
24
24
|
const _ref = component || useRef(component);
|
|
@@ -468,13 +468,9 @@ function DBCustomSelectFn(props, component) {
|
|
|
468
468
|
}
|
|
469
469
|
const [selectAllChecked, setSelectAllChecked] = useState(() => false);
|
|
470
470
|
const [selectAllIndeterminate, setSelectAllIndeterminate] = useState(() => false);
|
|
471
|
-
function
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
}
|
|
475
|
-
useEffect(() => {
|
|
476
|
-
var _a;
|
|
477
|
-
const mId = (_a = props.id) !== null && _a !== void 0 ? _a : `custom-select-${uuid}`;
|
|
471
|
+
function resetIds() {
|
|
472
|
+
var _a, _b, _c;
|
|
473
|
+
const mId = (_c = (_a = props.id) !== null && _a !== void 0 ? _a : (_b = props.propOverrides) === null || _b === void 0 ? void 0 : _b.id) !== null && _c !== void 0 ? _c : `custom-select-${uuid}`;
|
|
478
474
|
set_id(mId);
|
|
479
475
|
set_messageId(mId + DEFAULT_MESSAGE_ID_SUFFIX);
|
|
480
476
|
set_validMessageId(mId + DEFAULT_VALID_MESSAGE_ID_SUFFIX);
|
|
@@ -485,6 +481,13 @@ function DBCustomSelectFn(props, component) {
|
|
|
485
481
|
set_placeholderId(mId + DEFAULT_PLACEHOLDER_ID_SUFFIX);
|
|
486
482
|
set_selectedLabelsId(mId + "-selected-labels");
|
|
487
483
|
set_infoTextId(mId + "-info");
|
|
484
|
+
}
|
|
485
|
+
function satisfyReact(event) {
|
|
486
|
+
// This is a function to satisfy React
|
|
487
|
+
event.stopPropagation();
|
|
488
|
+
}
|
|
489
|
+
useEffect(() => {
|
|
490
|
+
resetIds();
|
|
488
491
|
set_invalidMessage(props.invalidMessage || DEFAULT_INVALID_MESSAGE);
|
|
489
492
|
if (typeof window !== "undefined" && "IntersectionObserver" in window) {
|
|
490
493
|
set_observer(new IntersectionObserver((payload) => {
|
|
@@ -497,6 +500,12 @@ function DBCustomSelectFn(props, component) {
|
|
|
497
500
|
}));
|
|
498
501
|
}
|
|
499
502
|
}, []);
|
|
503
|
+
useEffect(() => {
|
|
504
|
+
var _a, _b;
|
|
505
|
+
if ((_a = props.id) !== null && _a !== void 0 ? _a : (_b = props.propOverrides) === null || _b === void 0 ? void 0 : _b.id) {
|
|
506
|
+
resetIds();
|
|
507
|
+
}
|
|
508
|
+
}, [props.id, (_a = props.propOverrides) === null || _a === void 0 ? void 0 : _a.id]);
|
|
500
509
|
useEffect(() => {
|
|
501
510
|
if (detailsRef.current) {
|
|
502
511
|
detailsRef.current.addEventListener("focusout", (event) => handleClose(event));
|
|
@@ -676,8 +685,8 @@ function DBCustomSelectFn(props, component) {
|
|
|
676
685
|
props.multiple
|
|
677
686
|
? "above"
|
|
678
687
|
: props.variant, "data-required": getBooleanAsString(props.required), "data-hide-asterisk": getHideProp(props.showRequiredAsterisk), "data-placement": props.placement, "data-selected-type": props.multiple ? props.selectedType : "text", "data-hide-label": getHideProp(props.showLabel), "data-icon": props.icon, "data-show-icon": getBooleanAsString(props.showIcon) }),
|
|
679
|
-
React.createElement("label", { id: _labelId }, (
|
|
680
|
-
React.createElement("select", { role: "none", hidden: true, id: _selectId, tabIndex: -1, ref: selectRef, form: props.form, name: props.name, "data-custom-validity": _validity, multiple: getBoolean(props.multiple, "multiple"), disabled: getBoolean(props.disabled, "disabled"), required: getBoolean(props.required, "required"), onChange: (event) => satisfyReact(event) }, ((
|
|
688
|
+
React.createElement("label", { id: _labelId }, (_b = props.label) !== null && _b !== void 0 ? _b : DEFAULT_LABEL,
|
|
689
|
+
React.createElement("select", { role: "none", hidden: true, id: _selectId, tabIndex: -1, ref: selectRef, form: props.form, name: props.name, "data-custom-validity": _validity, multiple: getBoolean(props.multiple, "multiple"), disabled: getBoolean(props.disabled, "disabled"), required: getBoolean(props.required, "required"), onChange: (event) => satisfyReact(event) }, ((_c = props.options) === null || _c === void 0 ? void 0 : _c.length) ? (React.createElement(React.Fragment, null, (_d = props.options) === null || _d === void 0 ? void 0 : _d.map((option) => (React.createElement("option", { disabled: option.disabled, value: option.value, key: getOptionKey(option, "native-select-option-") }, getOptionLabel(option)))))) : null)),
|
|
681
690
|
React.createElement("details", { ref: detailsRef, open: props.open, onToggle: (event) => handleDropdownToggle(event), onKeyDown: (event) => handleKeyboardPress(event) },
|
|
682
691
|
props.children,
|
|
683
692
|
props.options ? (React.createElement(React.Fragment, null,
|
|
@@ -688,25 +697,25 @@ function DBCustomSelectFn(props, component) {
|
|
|
688
697
|
props.selectedType === "tag" ? (React.createElement("div", null, _selectedOptions === null || _selectedOptions === void 0 ? void 0 : _selectedOptions.map((option, index) => (React.createElement(DBTag, { emphasis: "strong", behavior: "removable", removeButton: getTagRemoveLabel(option), onRemove: (event) => handleTagRemove(option, event), key: getOptionKey(option, "tag-") }, getOptionLabel(option)))))) : null),
|
|
689
698
|
React.createElement(DBCustomSelectDropdown, { width: props.dropdownWidth },
|
|
690
699
|
searchEnabled ? (React.createElement("div", null,
|
|
691
|
-
React.createElement(DBInput, { type: "search", ref: searchInputRef, name: _id, form: _id, showLabel: false, value: _searchValue, label: (
|
|
700
|
+
React.createElement(DBInput, { type: "search", ref: searchInputRef, name: _id, form: _id, showLabel: false, value: _searchValue, label: (_e = props.searchLabel) !== null && _e !== void 0 ? _e : DEFAULT_LABEL, placeholder: (_f = props.searchPlaceholder) !== null && _f !== void 0 ? _f : props.searchLabel, ariaDescribedBy: _hasNoOptions || props.showLoading
|
|
692
701
|
? _infoTextId
|
|
693
702
|
: undefined, onInput: (event) => handleSearch(event) }))) : null,
|
|
694
|
-
_hasNoOptions || props.showLoading ? (React.createElement(DBInfotext, { id: _infoTextId, icon: props.showLoading ? "circular_arrows" : undefined, semantic: props.showLoading ? "informational" : "warning" }, (
|
|
703
|
+
_hasNoOptions || props.showLoading ? (React.createElement(DBInfotext, { id: _infoTextId, icon: props.showLoading ? "circular_arrows" : undefined, semantic: props.showLoading ? "informational" : "warning" }, (_g = (props.showLoading
|
|
695
704
|
? props.loadingText
|
|
696
|
-
: props.noResultsText)) !== null &&
|
|
705
|
+
: props.noResultsText)) !== null && _g !== void 0 ? _g : DEFAULT_MESSAGE)) : (React.createElement(React.Fragment, null,
|
|
697
706
|
React.createElement(React.Fragment, null,
|
|
698
707
|
selectAllEnabled ? (React.createElement("div", null,
|
|
699
708
|
React.createElement("div", { className: "db-checkbox db-custom-select-list-item" },
|
|
700
709
|
React.createElement("label", null,
|
|
701
710
|
React.createElement("input", { type: "checkbox", value: "select-all", ref: selectAllRef, form: _id, checked: selectAllChecked, onChange: (event) => handleSelectAll(event) }),
|
|
702
711
|
getSelectAllLabel())))) : null,
|
|
703
|
-
React.createElement(DBCustomSelectList, { multiple: getBoolean(props.multiple, "multiple"), label: (
|
|
712
|
+
React.createElement(DBCustomSelectList, { multiple: getBoolean(props.multiple, "multiple"), label: (_j = (_h = props.listLabel) !== null && _h !== void 0 ? _h : props.label) !== null && _j !== void 0 ? _j : DEFAULT_LABEL }, _options === null || _options === void 0 ? void 0 : _options.map((option) => (React.createElement(DBCustomSelectListItem, { type: props.multiple ? "checkbox" : "radio", showDivider: option.showDivider, icon: option.icon, isGroupTitle: option.isGroupTitle, groupTitle: getOptionLabel(option), name: _id, checked: getOptionChecked(option.value), disabled: option.disabled, value: option.value, onChange: (event) => handleSelect(option.value), key: getOptionKey(option, "custom-select-list-item-") }, !option.isGroupTitle ? (React.createElement(React.Fragment, null, getOptionLabel(option))) : null))))))),
|
|
704
713
|
React.createElement("div", null,
|
|
705
|
-
React.createElement(DBButton, { variant: "ghost", width: "full", icon: "cross", size: "small", name: _id, form: _id, onClick: (event) => handleClose(undefined, true) }, (
|
|
706
|
-
((
|
|
714
|
+
React.createElement(DBButton, { variant: "ghost", width: "full", icon: "cross", size: "small", name: _id, form: _id, onClick: (event) => handleClose(undefined, true) }, (_k = props.mobileCloseButtonText) !== null && _k !== void 0 ? _k : DEFAULT_CLOSE_BUTTON))))) : null),
|
|
715
|
+
((_l = props.showClearSelection) !== null && _l !== void 0 ? _l : true) && (_values === null || _values === void 0 ? void 0 : _values.length) ? (React.createElement(DBButton, { icon: "cross", variant: "ghost", size: "small", noText: true, name: _id, form: _id, disabled: getBoolean(props.disabled, "disabled"), onClick: (event) => handleClearAll(event) },
|
|
707
716
|
props.clearSelectionText,
|
|
708
717
|
React.createElement(DBTooltip, { placement: "top" }, props.clearSelectionText))) : null,
|
|
709
|
-
React.createElement("span", { className: "db-custom-select-placeholder", "aria-hidden": getBooleanAsString(true), id: _placeholderId }, (
|
|
718
|
+
React.createElement("span", { className: "db-custom-select-placeholder", "aria-hidden": getBooleanAsString(true), id: _placeholderId }, (_m = props.placeholder) !== null && _m !== void 0 ? _m : props.label),
|
|
710
719
|
stringPropVisible(props.message, props.showMessage) ? (React.createElement(DBInfotext, { size: "small", icon: props.messageIcon, id: _messageId }, props.message)) : null,
|
|
711
720
|
hasValidState() ? (React.createElement(DBInfotext, { size: "small", semantic: "successful", id: _validMessageId }, props.validMessage || DEFAULT_VALID_MESSAGE)) : null,
|
|
712
721
|
React.createElement(DBInfotext, { size: "small", semantic: "critical", id: _invalidMessageId }, _invalidMessage),
|
|
@@ -4,9 +4,10 @@ import { filterPassingProps, getRootProps } from "../../utils/react";
|
|
|
4
4
|
import { useRef, forwardRef } from "react";
|
|
5
5
|
import { cls } from "../../utils";
|
|
6
6
|
function DBCustomSelectDropdownFn(props, component) {
|
|
7
|
+
var _a, _b;
|
|
7
8
|
props = Object.assign({ width: "fixed" }, props);
|
|
8
9
|
const _ref = component || useRef(component);
|
|
9
|
-
return (React.createElement("article", Object.assign({ "data-spacing": "none", 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", "data-density"]), { id: props.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", "data-density"]), { className: cls("db-custom-select-dropdown db-card", props.className), "data-width": props.width }), props.children));
|
|
10
|
+
return (React.createElement("article", Object.assign({ "data-spacing": "none", 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", "data-density"]), { id: (_a = props.id) !== null && _a !== void 0 ? _a : (_b = props.propOverrides) === null || _b === void 0 ? void 0 : _b.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", "data-density"]), { className: cls("db-custom-select-dropdown db-card", props.className), "data-width": props.width }), props.children));
|
|
10
11
|
}
|
|
11
12
|
const DBCustomSelectDropdown = forwardRef(DBCustomSelectDropdownFn);
|
|
12
13
|
export default DBCustomSelectDropdown;
|
|
@@ -4,8 +4,9 @@ import { filterPassingProps, getRootProps } from "../../utils/react";
|
|
|
4
4
|
import { useRef, forwardRef } from "react";
|
|
5
5
|
import { cls } from "../../utils";
|
|
6
6
|
function DBCustomSelectFormFieldFn(props, component) {
|
|
7
|
+
var _a, _b;
|
|
7
8
|
const _ref = component || useRef(component);
|
|
8
|
-
return (React.createElement("summary", 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", "data-density"]), { id: props.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", "data-density"]), { className: cls("db-custom-select-form-field", props.className) }), props.children));
|
|
9
|
+
return (React.createElement("summary", 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", "data-density"]), { id: (_a = props.id) !== null && _a !== void 0 ? _a : (_b = props.propOverrides) === null || _b === void 0 ? void 0 : _b.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", "data-density"]), { className: cls("db-custom-select-form-field", props.className) }), props.children));
|
|
9
10
|
}
|
|
10
11
|
const DBCustomSelectFormField = forwardRef(DBCustomSelectFormFieldFn);
|
|
11
12
|
export default DBCustomSelectFormField;
|
|
@@ -4,8 +4,9 @@ import { filterPassingProps, getRootProps } from "../../utils/react";
|
|
|
4
4
|
import { useRef, forwardRef } from "react";
|
|
5
5
|
import { cls } from "../../utils";
|
|
6
6
|
function DBCustomSelectListFn(props, component) {
|
|
7
|
+
var _a, _b;
|
|
7
8
|
const _ref = component || useRef(component);
|
|
8
|
-
return (React.createElement("div", Object.assign({ role: props.multiple ? "group" : "radiogroup", "aria-label": props.label, 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", "data-density"]), { id: props.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", "data-density"]), { className: cls("db-custom-select-list", props.className) }),
|
|
9
|
+
return (React.createElement("div", Object.assign({ role: props.multiple ? "group" : "radiogroup", "aria-label": props.label, 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", "data-density"]), { id: (_a = props.id) !== null && _a !== void 0 ? _a : (_b = props.propOverrides) === null || _b === void 0 ? void 0 : _b.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", "data-density"]), { className: cls("db-custom-select-list", props.className) }),
|
|
9
10
|
React.createElement("ul", null, props.children)));
|
|
10
11
|
}
|
|
11
12
|
const DBCustomSelectList = forwardRef(DBCustomSelectListFn);
|
|
@@ -4,6 +4,7 @@ import { filterPassingProps, getRootProps } from "../../utils/react";
|
|
|
4
4
|
import { useState, useRef, useEffect, forwardRef } from "react";
|
|
5
5
|
import { cls, getBoolean, getBooleanAsString } from "../../utils";
|
|
6
6
|
function DBCustomSelectListItemFn(props, component) {
|
|
7
|
+
var _a, _b;
|
|
7
8
|
const _ref = component || useRef(component);
|
|
8
9
|
const [hasDivider, setHasDivider] = useState(() => false);
|
|
9
10
|
function handleChange(event) {
|
|
@@ -21,7 +22,7 @@ function DBCustomSelectListItemFn(props, component) {
|
|
|
21
22
|
useEffect(() => {
|
|
22
23
|
setHasDivider(Boolean(props.isGroupTitle || props.showDivider));
|
|
23
24
|
}, [props.isGroupTitle, props.showDivider]);
|
|
24
|
-
return (React.createElement("li", 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", "data-density"]), { id: props.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", "data-density"]), { className: cls("db-custom-select-list-item", props.className, {
|
|
25
|
+
return (React.createElement("li", 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", "data-density"]), { id: (_a = props.id) !== null && _a !== void 0 ? _a : (_b = props.propOverrides) === null || _b === void 0 ? void 0 : _b.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", "data-density"]), { className: cls("db-custom-select-list-item", props.className, {
|
|
25
26
|
"db-checkbox": props.type === "checkbox" && !props.isGroupTitle,
|
|
26
27
|
"db-radio": props.type !== "checkbox" && !props.isGroupTitle,
|
|
27
28
|
}), "data-divider": getBooleanAsString(hasDivider) }), !props.isGroupTitle ? (React.createElement("label", { "data-icon": props.type !== "checkbox" && props.icon ? props.icon : undefined, "data-show-icon": getBooleanAsString(props.showIcon), "data-icon-trailing": getIconTrailing() },
|
|
@@ -4,8 +4,9 @@ import { filterPassingProps, getRootProps } from "../../utils/react";
|
|
|
4
4
|
import { useRef, forwardRef } from "react";
|
|
5
5
|
import { cls } from "../../utils";
|
|
6
6
|
function DBDividerFn(props, component) {
|
|
7
|
+
var _a, _b;
|
|
7
8
|
const _ref = component || useRef(component);
|
|
8
|
-
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", "data-density"]), { id: props.id, "data-margin": props.margin, "data-variant": props.variant, "data-emphasis": props.emphasis, "data-width": props.width }, 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", "data-density"]), { className: cls("db-divider", props.className) })));
|
|
9
|
+
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", "data-density"]), { id: (_a = props.id) !== null && _a !== void 0 ? _a : (_b = props.propOverrides) === null || _b === void 0 ? void 0 : _b.id, "data-margin": props.margin, "data-variant": props.variant, "data-emphasis": props.emphasis, "data-width": props.width }, 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", "data-density"]), { className: cls("db-divider", props.className) })));
|
|
9
10
|
}
|
|
10
11
|
const DBDivider = forwardRef(DBDividerFn);
|
|
11
12
|
export default DBDivider;
|
|
@@ -6,7 +6,7 @@ import { DEFAULT_CLOSE_BUTTON } from "../../shared/constants";
|
|
|
6
6
|
import { cls, delay, getBooleanAsString, isKeyboardEvent } from "../../utils";
|
|
7
7
|
import DBButton from "../button/button";
|
|
8
8
|
function DBDrawerFn(props, component) {
|
|
9
|
-
var _a;
|
|
9
|
+
var _a, _b, _c;
|
|
10
10
|
const _ref = component || useRef(component);
|
|
11
11
|
const dialogContainerRef = useRef(null);
|
|
12
12
|
const [initialized, setInitialized] = useState(() => false);
|
|
@@ -87,12 +87,12 @@ function DBDrawerFn(props, component) {
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
}, [_ref.current, initialized, props.position]);
|
|
90
|
-
return (React.createElement("dialog", Object.assign({ className: "db-drawer", id: props.id, 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", "data-density", "onClose"]), { onClick: (event) => handleClose(event), onKeyDown: (event) => handleClose(event), "data-position": props.position, "data-backdrop": props.backdrop, "data-direction": props.direction, "data-variant": props.variant }),
|
|
90
|
+
return (React.createElement("dialog", Object.assign({ className: "db-drawer", id: (_a = props.id) !== null && _a !== void 0 ? _a : (_b = props.propOverrides) === null || _b === void 0 ? void 0 : _b.id, 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", "data-density", "onClose"]), { onClick: (event) => handleClose(event), onKeyDown: (event) => handleClose(event), "data-position": props.position, "data-backdrop": props.backdrop, "data-direction": props.direction, "data-variant": props.variant }),
|
|
91
91
|
React.createElement("article", Object.assign({ ref: dialogContainerRef }, 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", "data-density"]), { className: cls("db-drawer-container", props.className), "data-spacing": props.spacing, "data-width": props.width, "data-direction": props.direction, "data-rounded": getBooleanAsString(props.rounded) }),
|
|
92
92
|
React.createElement("header", { className: "db-drawer-header" },
|
|
93
93
|
React.createElement("div", { className: "db-drawer-header-text" },
|
|
94
94
|
React.createElement(React.Fragment, null, props.drawerHeader)),
|
|
95
|
-
React.createElement(DBButton, { className: "button-close-drawer", icon: "cross", variant: "ghost", id: props.closeButtonId, noText: true, onClick: (event) => handleClose(event, true) }, (
|
|
95
|
+
React.createElement(DBButton, { className: "button-close-drawer", icon: "cross", variant: "ghost", id: props.closeButtonId, noText: true, onClick: (event) => handleClose(event, true) }, (_c = props.closeButtonText) !== null && _c !== void 0 ? _c : DEFAULT_CLOSE_BUTTON)),
|
|
96
96
|
React.createElement("div", { className: "db-drawer-content" }, props.children))));
|
|
97
97
|
}
|
|
98
98
|
const DBDrawer = forwardRef(DBDrawerFn);
|