@db-ux/react-core-components 4.9.0-stencil-bundle-ad37ca4 → 4.9.1
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 +19 -1
- package/dist/components/accordion/accordion.js +1 -1
- package/dist/components/accordion/model.d.ts +2 -2
- package/dist/components/accordion-item/accordion-item.d.ts +1 -2
- package/dist/components/accordion-item/accordion-item.js +1 -8
- package/dist/components/accordion-item/model.d.ts +1 -5
- package/dist/components/badge/model.d.ts +1 -1
- package/dist/components/brand/model.d.ts +1 -1
- package/dist/components/button/model.d.ts +1 -1
- package/dist/components/card/model.d.ts +1 -1
- package/dist/components/checkbox/model.d.ts +1 -1
- package/dist/components/custom-button/model.d.ts +2 -2
- package/dist/components/custom-select/model.d.ts +4 -4
- package/dist/components/custom-select-dropdown/model.d.ts +1 -1
- package/dist/components/custom-select-form-field/model.d.ts +1 -1
- package/dist/components/custom-select-list/model.d.ts +1 -1
- package/dist/components/custom-select-list-item/model.d.ts +1 -1
- package/dist/components/divider/model.d.ts +1 -1
- package/dist/components/drawer/drawer.js +4 -4
- package/dist/components/drawer/model.d.ts +1 -1
- package/dist/components/header/header.js +8 -8
- package/dist/components/header/model.d.ts +1 -1
- package/dist/components/icon/model.d.ts +1 -1
- package/dist/components/infotext/model.d.ts +1 -1
- package/dist/components/input/model.d.ts +1 -1
- package/dist/components/link/model.d.ts +1 -1
- package/dist/components/navigation/model.d.ts +1 -1
- package/dist/components/navigation-item/model.d.ts +2 -6
- package/dist/components/navigation-item/navigation-item.js +7 -6
- package/dist/components/notification/model.d.ts +1 -1
- package/dist/components/page/model.d.ts +1 -1
- package/dist/components/popover/model.d.ts +1 -1
- package/dist/components/radio/model.d.ts +1 -1
- package/dist/components/section/model.d.ts +1 -1
- package/dist/components/select/model.d.ts +1 -1
- package/dist/components/stack/model.d.ts +1 -1
- package/dist/components/switch/model.d.ts +1 -1
- package/dist/components/tab-item/model.d.ts +1 -1
- package/dist/components/tab-list/model.d.ts +1 -1
- package/dist/components/tab-panel/model.d.ts +1 -1
- package/dist/components/tabs/model.d.ts +3 -3
- package/dist/components/tag/model.d.ts +1 -1
- package/dist/components/textarea/model.d.ts +1 -1
- package/dist/components/tooltip/model.d.ts +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @db-ux/react-core-components
|
|
2
2
|
|
|
3
|
+
## 4.9.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fix(switch): use `2lh` unit and add `min-inline-size` to prevent track from shrinking - [see commit 78c9fde](https://github.com/db-ux-design-system/core-web/commit/78c9fde67d9677f61eaa41761a088b9c1a9773a1)
|
|
8
|
+
|
|
9
|
+
- fix(notification): remove empty grid gap when icon is hidden - [see commit 96f94c6](https://github.com/db-ux-design-system/core-web/commit/96f94c651391f014e2d073402c2700b524ccbf5e)
|
|
10
|
+
|
|
11
|
+
## 4.9.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- refactor: allow text and children to be used together in components - [see commit cecb833](https://github.com/db-ux-design-system/core-web/commit/cecb833e2d2b2d15b47f9ac1ed57ccf1040374f0):
|
|
16
|
+
- feat: add `text` property to components that previously only supported children for their label, like e.g. `DBTooltip`.
|
|
17
|
+
- refactor: allow `text` property and components children to be used in parallel in components. Previously, `text` and children were mutually exclusive.
|
|
18
|
+
- refactor(`DBRadio`, `DBCheckbox`, `DBSwitch`): `label` and `children` can now be used together. Previously they were mutually exclusive.
|
|
19
|
+
- fix(`DBTag`): changed render order of `children` and `text` to align with design (children rendered before text).
|
|
20
|
+
|
|
3
21
|
## 4.8.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
|
@@ -189,7 +207,7 @@ _version bump_
|
|
|
189
207
|
|
|
190
208
|
- fix: set DBTabItem internal state `_selected` correctly - [see commit f7625cb](https://github.com/db-ux-design-system/core-web/commit/f7625cbd9d64513527e826c9d2c1ef42b2734a4b):
|
|
191
209
|
|
|
192
|
-
|
|
210
|
+
- Now also sets aria-selected=true|false correctly which improves screen reader behaviour
|
|
193
211
|
|
|
194
212
|
## 4.2.1
|
|
195
213
|
|
|
@@ -31,7 +31,7 @@ function DBAccordionFn(props, component) {
|
|
|
31
31
|
useEffect(() => {
|
|
32
32
|
// If we have a single behavior we first check for
|
|
33
33
|
// props.name otherwise for state_id
|
|
34
|
-
if (initialized
|
|
34
|
+
if (initialized) {
|
|
35
35
|
if (props.behavior === "single") {
|
|
36
36
|
if (props.name) {
|
|
37
37
|
if (_name !== props.name) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GlobalProps, InitializedState } from '../../shared/model';
|
|
2
|
-
import { DBAccordionItemDefaultProps } from '../accordion-item/model';
|
|
1
|
+
import type { GlobalProps, InitializedState } from '../../shared/model';
|
|
2
|
+
import type { DBAccordionItemDefaultProps } from '../accordion-item/model';
|
|
3
3
|
export declare const AccordionVariantList: readonly ["divider", "card"];
|
|
4
4
|
export type AccordionVariantType = (typeof AccordionVariantList)[number];
|
|
5
5
|
export declare const AccordionBehaviorList: readonly ["multiple", "single"];
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
declare const DBAccordionItem: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<any>, keyof import("../../shared/model").GlobalProps | "name" | "text" | "defaultOpen" | "
|
|
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
|
-
open?: boolean;
|
|
5
4
|
disabled?: boolean | string;
|
|
6
5
|
headline?: any;
|
|
7
6
|
headlinePlain?: string;
|
|
@@ -27,9 +27,7 @@ function DBAccordionItemFn(props, component) {
|
|
|
27
27
|
if (props.onToggle) {
|
|
28
28
|
props.onToggle(newStateOpen);
|
|
29
29
|
}
|
|
30
|
-
|
|
31
|
-
set_open(newStateOpen);
|
|
32
|
-
}
|
|
30
|
+
set_open(newStateOpen);
|
|
33
31
|
}
|
|
34
32
|
useEffect(() => {
|
|
35
33
|
if (props.defaultOpen) {
|
|
@@ -47,11 +45,6 @@ function DBAccordionItemFn(props, component) {
|
|
|
47
45
|
set_name(props.name);
|
|
48
46
|
}
|
|
49
47
|
}, [props.name]);
|
|
50
|
-
useEffect(() => {
|
|
51
|
-
if (props.open !== undefined) {
|
|
52
|
-
set_open(props.open);
|
|
53
|
-
}
|
|
54
|
-
}, [props.open]);
|
|
55
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) }),
|
|
56
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 }),
|
|
57
50
|
React.createElement("summary", { onClick: (event) => handleToggle(event) },
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import { GlobalProps, InitializedState, NameProps, NameState, TextProps, ToggleEventProps, ToggleEventState } from '../../shared/model';
|
|
1
|
+
import type { GlobalProps, InitializedState, NameProps, NameState, TextProps, ToggleEventProps, ToggleEventState } from '../../shared/model';
|
|
2
2
|
export type DBAccordionItemDefaultProps = {
|
|
3
3
|
/**
|
|
4
4
|
* Initial state for the accordion item
|
|
5
5
|
*/
|
|
6
6
|
defaultOpen?: boolean;
|
|
7
|
-
/**
|
|
8
|
-
* State for the accordion item
|
|
9
|
-
*/
|
|
10
|
-
open?: boolean;
|
|
11
7
|
/**
|
|
12
8
|
* The disabled attribute can be set to keep a user from clicking on the element.
|
|
13
9
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EmphasisProps, GlobalProps, GlobalState, InitializedState, SemanticProps, SizeProps, TextProps, WrapProps } from '../../shared/model';
|
|
1
|
+
import type { 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 = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GlobalProps, GlobalState, IconProps, ShowIconProps, TextProps } from '../../shared/model';
|
|
1
|
+
import type { GlobalProps, GlobalState, IconProps, ShowIconProps, TextProps } from '../../shared/model';
|
|
2
2
|
export type DBBrandDefaultProps = {
|
|
3
3
|
/**
|
|
4
4
|
* @deprecated: Disable the default logo svg to pass in a custom `img`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClickEventProps, GlobalProps, GlobalState, IconLeadingProps, IconProps, IconTrailingProps, NoTextProps, ShowIconLeadingProps, ShowIconProps, ShowIconTrailingProps, SizeProps, TextProps, WidthProps, WrapProps } from '../../shared/model';
|
|
1
|
+
import type { 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"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClickEventProps, ClickEventState, GlobalProps, GlobalState, SpacingProps } from '../../shared/model';
|
|
1
|
+
import type { ClickEventProps, ClickEventState, GlobalProps, GlobalState, SpacingProps } from '../../shared/model';
|
|
2
2
|
export declare const CardBehaviorList: readonly ["static", "interactive"];
|
|
3
3
|
export type CardBehaviorType = (typeof CardBehaviorList)[number];
|
|
4
4
|
export declare const CardElevationLevelList: readonly ["1", "2", "3"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeEventProps, ChangeEventState, FocusEventProps, FocusEventState, FormCheckProps, FormMessageProps, FormProps, FormState, FromValidState, GlobalProps, GlobalState, InitializedState, SizeProps } from '../../shared/model';
|
|
1
|
+
import type { ChangeEventProps, ChangeEventState, FocusEventProps, FocusEventState, FormCheckProps, FormMessageProps, FormProps, FormState, FromValidState, GlobalProps, GlobalState, InitializedState, SizeProps } from '../../shared/model';
|
|
2
2
|
export type DBCheckboxDefaultProps = {
|
|
3
3
|
/**
|
|
4
4
|
* Define an [indeterminate](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#indeterminate) state of a checkbox
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GlobalProps, GlobalState, IconLeadingProps, IconProps, IconTrailingProps, NoTextProps, ShowIconLeadingProps, ShowIconProps, ShowIconTrailingProps, SizeProps, WidthProps, WrapProps } from '../../shared/model';
|
|
2
|
-
import { DBButtonSharedProps } from '../button/model';
|
|
1
|
+
import type { GlobalProps, GlobalState, IconLeadingProps, IconProps, IconTrailingProps, NoTextProps, ShowIconLeadingProps, ShowIconProps, ShowIconTrailingProps, SizeProps, WidthProps, WrapProps } from '../../shared/model';
|
|
2
|
+
import type { DBButtonSharedProps } from '../button/model';
|
|
3
3
|
export type DBCustomButtonDefaultProps = {};
|
|
4
4
|
export type DBCustomButtonProps = DBCustomButtonDefaultProps & DBButtonSharedProps & GlobalProps & IconProps & WidthProps & SizeProps & ShowIconProps & ShowIconLeadingProps & ShowIconTrailingProps & IconLeadingProps & IconTrailingProps & NoTextProps & WrapProps;
|
|
5
5
|
export type DBCustomButtonDefaultState = {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BaseFormProps, ClickEvent, CloseEventState, CustomFormProps, DocumentScrollState, FormMessageProps, FormState, FromValidState, GeneralEvent, GlobalProps, GlobalState, IconProps, InputEvent, InteractionEvent, PlacementVerticalType, RequiredProps, ShowIconProps, ShowLabelProps, ValidationType, WidthType } from '../../shared/model';
|
|
2
|
-
import { CustomSelectDropdownWidthType } from '../custom-select-dropdown/model';
|
|
3
|
-
import { DBCustomSelectFormFieldDefaultProps } from '../custom-select-form-field/model';
|
|
4
|
-
import { DBCustomSelectListItemExtraProps } from '../custom-select-list-item/model';
|
|
1
|
+
import type { BaseFormProps, ClickEvent, CloseEventState, CustomFormProps, DocumentScrollState, FormMessageProps, FormState, FromValidState, GeneralEvent, GlobalProps, GlobalState, IconProps, InputEvent, InteractionEvent, PlacementVerticalType, RequiredProps, ShowIconProps, ShowLabelProps, ValidationType, WidthType } from '../../shared/model';
|
|
2
|
+
import type { CustomSelectDropdownWidthType } from '../custom-select-dropdown/model';
|
|
3
|
+
import type { DBCustomSelectFormFieldDefaultProps } from '../custom-select-form-field/model';
|
|
4
|
+
import type { DBCustomSelectListItemExtraProps } from '../custom-select-list-item/model';
|
|
5
5
|
export type CustomSelectOptionType = {
|
|
6
6
|
/**
|
|
7
7
|
* Disables this option
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GlobalProps, GlobalState } from '../../shared/model';
|
|
1
|
+
import type { GlobalProps, GlobalState } from '../../shared/model';
|
|
2
2
|
export declare const CustomSelectDropdownWidthList: readonly ["fixed", "auto", "full"];
|
|
3
3
|
export type CustomSelectDropdownWidthType = (typeof CustomSelectDropdownWidthList)[number];
|
|
4
4
|
export type DBCustomSelectDropdownDefaultProps = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GlobalProps, GlobalState } from '../../shared/model';
|
|
1
|
+
import type { GlobalProps, GlobalState } from '../../shared/model';
|
|
2
2
|
export type DBCustomSelectFormFieldDefaultProps = {};
|
|
3
3
|
export type DBCustomSelectFormFieldProps = DBCustomSelectFormFieldDefaultProps & GlobalProps;
|
|
4
4
|
export type DBCustomSelectFormFieldDefaultState = {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseFormProps, ChangeEventProps, ChangeEventState, FormCheckProps, GlobalProps, IconProps, ShowIconProps, ValueProps } from '../../shared/model';
|
|
1
|
+
import type { BaseFormProps, ChangeEventProps, ChangeEventState, FormCheckProps, GlobalProps, IconProps, ShowIconProps, ValueProps } from '../../shared/model';
|
|
2
2
|
export declare const CustomSelectListItemTypeList: readonly ["checkbox", "radio"];
|
|
3
3
|
export type CustomSelectListItemTypeType = (typeof CustomSelectListItemTypeList)[number];
|
|
4
4
|
export type DBCustomSelectListItemExtraProps = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EmphasisProps, GlobalProps, GlobalState, MarginProps, WidthProps } from '../../shared/model';
|
|
1
|
+
import type { EmphasisProps, GlobalProps, GlobalState, MarginProps, WidthProps } from '../../shared/model';
|
|
2
2
|
export declare const DividerMarginList: readonly ["none", "_"];
|
|
3
3
|
export type DividerMarginType = (typeof DividerMarginList)[number];
|
|
4
4
|
export declare const DividerVariantList: readonly ["horizontal", "vertical"];
|
|
@@ -3,7 +3,7 @@ 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_CLOSE_BUTTON } from "../../shared/constants";
|
|
6
|
-
import { cls, delay,
|
|
6
|
+
import { cls, delay, getBooleanAsString, isKeyboardEvent } from "../../utils";
|
|
7
7
|
import DBButton from "../button/button";
|
|
8
8
|
function DBDrawerFn(props, component) {
|
|
9
9
|
var _a, _b, _c;
|
|
@@ -40,8 +40,8 @@ function DBDrawerFn(props, component) {
|
|
|
40
40
|
}
|
|
41
41
|
function handleDialogOpen() {
|
|
42
42
|
if (_ref.current) {
|
|
43
|
-
const
|
|
44
|
-
if (
|
|
43
|
+
const open = Boolean(props.open);
|
|
44
|
+
if (open && !_ref.current.open) {
|
|
45
45
|
if (dialogContainerRef.current) {
|
|
46
46
|
dialogContainerRef.current.removeAttribute("data-transition");
|
|
47
47
|
}
|
|
@@ -59,7 +59,7 @@ function DBDrawerFn(props, component) {
|
|
|
59
59
|
}
|
|
60
60
|
}, 1);
|
|
61
61
|
}
|
|
62
|
-
if (!
|
|
62
|
+
if (!open && _ref.current.open) {
|
|
63
63
|
if (dialogContainerRef.current) {
|
|
64
64
|
dialogContainerRef.current.dataset["transition"] =
|
|
65
65
|
"close";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClickEvent, CloseEventProps, CloseEventState, GeneralKeyboardEvent, GlobalProps, GlobalState, InitializedState, InnerCloseButtonProps, SpacingProps, WidthProps } from '../../shared/model';
|
|
1
|
+
import type { ClickEvent, CloseEventProps, CloseEventState, GeneralKeyboardEvent, GlobalProps, GlobalState, InitializedState, InnerCloseButtonProps, SpacingProps, WidthProps } from '../../shared/model';
|
|
2
2
|
export declare const DrawerBackdropList: readonly ["none", "strong", "weak", "invisible"];
|
|
3
3
|
export type DrawerBackdropType = (typeof DrawerBackdropList)[number];
|
|
4
4
|
export declare const DrawerDirectionList: readonly ["left", "right", "up", "down"];
|
|
@@ -41,6 +41,13 @@ function DBHeaderFn(props, component) {
|
|
|
41
41
|
}
|
|
42
42
|
}, [initialized, _ref.current]);
|
|
43
43
|
return (React.createElement("header", 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", "onToggle"]), 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-header", props.className), id: (_a = props.id) !== null && _a !== void 0 ? _a : (_b = props.propOverrides) === null || _b === void 0 ? void 0 : _b.id, "data-width": props.width, "data-on-forcing-mobile": props.forceMobile && !forcedToMobile }),
|
|
44
|
+
React.createElement(DBDrawer, { className: "db-header-drawer", spacing: "small", rounded: true, closeButtonId: props.closeButtonId, closeButtonText: props.closeButtonText, open: getBoolean(props.drawerOpen), onClose: (event) => handleToggle() },
|
|
45
|
+
React.createElement("div", { className: "db-header-drawer-navigation" },
|
|
46
|
+
React.createElement("div", { className: "db-header-navigation", onClick: (event) => handleNavigationItemClick(event) }, props.children),
|
|
47
|
+
React.createElement("div", { className: "db-header-meta-navigation" },
|
|
48
|
+
React.createElement(React.Fragment, null, props.metaNavigation))),
|
|
49
|
+
React.createElement("div", { className: "db-header-secondary-action" },
|
|
50
|
+
React.createElement(React.Fragment, null, props.secondaryAction))),
|
|
44
51
|
React.createElement("div", { className: "db-header-meta-navigation" },
|
|
45
52
|
React.createElement(React.Fragment, null, props.metaNavigation)),
|
|
46
53
|
React.createElement("div", { className: "db-header-navigation-bar" },
|
|
@@ -54,14 +61,7 @@ function DBHeaderFn(props, component) {
|
|
|
54
61
|
React.createElement("div", { className: "db-header-burger-menu-container" },
|
|
55
62
|
React.createElement(DBButton, { icon: "menu", variant: "ghost", noText: true, onClick: (event) => handleToggle() }, (_c = props.burgerMenuLabel) !== null && _c !== void 0 ? _c : DEFAULT_BURGER_MENU)),
|
|
56
63
|
React.createElement("div", { className: "db-header-secondary-action" },
|
|
57
|
-
React.createElement(React.Fragment, null, props.secondaryAction))))
|
|
58
|
-
React.createElement(DBDrawer, { className: "db-header-drawer", spacing: "small", rounded: true, closeButtonId: props.closeButtonId, closeButtonText: props.closeButtonText, open: getBoolean(props.drawerOpen), onClose: (event) => handleToggle() },
|
|
59
|
-
React.createElement("div", { className: "db-header-drawer-navigation" },
|
|
60
|
-
React.createElement("div", { className: "db-header-navigation", onClick: (event) => handleNavigationItemClick(event) }, props.children),
|
|
61
|
-
React.createElement("div", { className: "db-header-meta-navigation" },
|
|
62
|
-
React.createElement(React.Fragment, null, props.metaNavigation))),
|
|
63
|
-
React.createElement("div", { className: "db-header-secondary-action" },
|
|
64
|
-
React.createElement(React.Fragment, null, props.secondaryAction)))));
|
|
64
|
+
React.createElement(React.Fragment, null, props.secondaryAction))))));
|
|
65
65
|
}
|
|
66
66
|
const DBHeader = forwardRef(DBHeaderFn);
|
|
67
67
|
export default DBHeader;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ContainerWidthProps, GlobalProps, GlobalState, InitializedState, InnerCloseButtonProps, NavigationBehaviorState, ToggleEventProps, ToggleEventState } from '../../shared/model';
|
|
1
|
+
import type { ContainerWidthProps, GlobalProps, GlobalState, InitializedState, InnerCloseButtonProps, NavigationBehaviorState, ToggleEventProps, ToggleEventState } from '../../shared/model';
|
|
2
2
|
export type DBHeaderDefaultProps = {
|
|
3
3
|
/**
|
|
4
4
|
* Slot to pass in the DBBrand component
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GlobalProps, GlobalState, IconProps, TextProps } from '../../shared/model';
|
|
1
|
+
import type { GlobalProps, GlobalState, IconProps, TextProps } from '../../shared/model';
|
|
2
2
|
export declare const IconWeightList: readonly ["16", "20", "24", "32", "48", "64"];
|
|
3
3
|
export type IconWeightType = (typeof IconWeightList)[number];
|
|
4
4
|
export type DBIconDefaultProps = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GlobalProps, GlobalState, IconProps, SemanticProps, ShowIconProps, SizeProps, TextProps, WrapProps } from '../../shared/model';
|
|
1
|
+
import type { GlobalProps, GlobalState, IconProps, SemanticProps, ShowIconProps, SizeProps, TextProps, WrapProps } from '../../shared/model';
|
|
2
2
|
export type DBInfotextDefaultProps = {};
|
|
3
3
|
export type DBInfotextProps = DBInfotextDefaultProps & GlobalProps & SemanticProps & IconProps & SizeProps & ShowIconProps & TextProps & WrapProps;
|
|
4
4
|
export type DBInfotextDefaultState = {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeEventProps, ChangeEventState, FocusEventProps, FocusEventState, FormMessageProps, FormProps, FormSizeProps, FormState, FormTextProps, FromValidState, GlobalProps, GlobalState, IconLeadingProps, IconProps, IconTrailingProps, InputEventProps, InputEventState, ShowIconLeadingProps, ShowIconProps, ShowIconTrailingProps, SizeType, ValueLabelType } from '../../shared/model';
|
|
1
|
+
import type { ChangeEventProps, ChangeEventState, FocusEventProps, FocusEventState, FormMessageProps, FormProps, FormSizeProps, FormState, FormTextProps, FromValidState, GlobalProps, GlobalState, IconLeadingProps, IconProps, IconTrailingProps, InputEventProps, InputEventState, ShowIconLeadingProps, ShowIconProps, ShowIconTrailingProps, SizeType, ValueLabelType } from '../../shared/model';
|
|
2
2
|
export declare const InputTypeList: readonly ["color", "date", "datetime-local", "email", "file", "hidden", "month", "number", "password", "range", "search", "tel", "text", "time", "url", "week"];
|
|
3
3
|
export type InputTypeType = (typeof InputTypeList)[number];
|
|
4
4
|
export type DBInputDefaultProps = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClickEventProps, ClickEventState, GlobalProps, GlobalState, LinkProps, RoleProps, ShowIconProps, TextProps, WrapProps } from '../../shared/model';
|
|
1
|
+
import type { ClickEventProps, ClickEventState, GlobalProps, GlobalState, LinkProps, RoleProps, ShowIconProps, TextProps, WrapProps } from '../../shared/model';
|
|
2
2
|
export declare const LinkVariantList: readonly ["adaptive", "brand", "inline"];
|
|
3
3
|
export type LinkVariantType = (typeof LinkVariantList)[number];
|
|
4
4
|
export declare const LinkSizeList: readonly ["medium", "small"];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ClickEvent, ClickEventProps, ClickEventState, GlobalProps, GlobalState, IconProps, InitializedState, NavigationBackButtonProps, NavigationBehaviorState, ShowIconProps, TextProps, WidthProps, WrapProps } from '../../shared/model';
|
|
2
|
-
import { NavigationItemSafeTriangle } from '../../utils/navigation';
|
|
1
|
+
import type { ClickEvent, ClickEventProps, ClickEventState, GlobalProps, GlobalState, IconProps, InitializedState, NavigationBackButtonProps, NavigationBehaviorState, ShowIconProps, TextProps, WidthProps, WrapProps } from '../../shared/model';
|
|
2
|
+
import type { NavigationItemSafeTriangle } from '../../utils/navigation';
|
|
3
3
|
export type DBNavigationItemDefaultProps = {
|
|
4
4
|
/**
|
|
5
5
|
* Alternative indicator for active navigation item (bold font). In contrast to the use of aria-current="page" on the contained anchor, this does not guarantee correct a11y.
|
|
@@ -17,10 +17,6 @@ export type DBNavigationItemDefaultProps = {
|
|
|
17
17
|
* This is for mobile navigation only, if it is set the sub-navigation is a static overlay
|
|
18
18
|
*/
|
|
19
19
|
subNavigationExpanded?: boolean | string;
|
|
20
|
-
/**
|
|
21
|
-
* Force hide sub-navigation - for web component output
|
|
22
|
-
*/
|
|
23
|
-
hideSubNavigation?: boolean;
|
|
24
20
|
};
|
|
25
21
|
export type DBNavigationItemProps = DBNavigationItemDefaultProps & GlobalProps & ClickEventProps<HTMLButtonElement> & IconProps & WidthProps & WrapProps & NavigationBackButtonProps & ShowIconProps & TextProps;
|
|
26
22
|
export type DBNavigationItemDefaultState = {
|
|
@@ -70,13 +70,14 @@ function DBNavigationItemFn(props, component) {
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
}, [initialized, _ref.current]);
|
|
73
|
-
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, onMouseOver: (event) => navigationItemSafeTriangle === null || navigationItemSafeTriangle === void 0 ? void 0 : navigationItemSafeTriangle.enableFollow(), onMouseLeave: (event) => navigationItemSafeTriangle === null || navigationItemSafeTriangle === void 0 ? void 0 : navigationItemSafeTriangle.disableFollow(), onMouseMove: (event) => navigationItemSafeTriangle === null || navigationItemSafeTriangle === void 0 ? void 0 : navigationItemSafeTriangle.followByMouseEvent(event) }, 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-navigation-item", props.className), "data-width": props.width, "data-icon": props.icon, "data-show-icon": getBooleanAsString(props.showIcon), "data-active": props.active, "data-wrap": getBooleanAsString(props.wrap), "aria-disabled": getBooleanAsString(props.disabled) }),
|
|
73
|
+
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, onMouseOver: (event) => navigationItemSafeTriangle === null || navigationItemSafeTriangle === void 0 ? void 0 : navigationItemSafeTriangle.enableFollow(), onMouseLeave: (event) => navigationItemSafeTriangle === null || navigationItemSafeTriangle === void 0 ? void 0 : navigationItemSafeTriangle.disableFollow(), onMouseMove: (event) => navigationItemSafeTriangle === null || navigationItemSafeTriangle === void 0 ? void 0 : navigationItemSafeTriangle.followByMouseEvent(event) }, 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-navigation-item", props.className), "data-width": props.width, "data-icon": props.icon, "data-show-icon": getBooleanAsString(props.showIcon), "data-active": props.active, "data-wrap": getBooleanAsString(props.wrap), "aria-disabled": getBooleanAsString(props.disabled) }),
|
|
74
|
+
!hasSubNavigation ? (React.createElement(React.Fragment, null, props.text ? React.createElement(React.Fragment, null, props.text) : React.createElement(React.Fragment, null, props.children))) : null,
|
|
74
75
|
hasSubNavigation ? (React.createElement(React.Fragment, null,
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
React.createElement("button", { className: "db-navigation-item-expand-button", id: subNavigationToggleId, "aria-haspopup": hasAreaPopup ? "true" : undefined, "aria-expanded": isSubNavigationExpanded, "aria-controls": subNavigationId, disabled: getBoolean(props.disabled, "disabled"), onClick: (event) => handleClick(event) }, props.text ? React.createElement(React.Fragment, null, props.text) : React.createElement(React.Fragment, null, props.children)),
|
|
77
|
+
React.createElement("menu", { className: "db-sub-navigation", id: subNavigationId, "aria-labelledby": subNavigationToggleId, "data-force-close": autoClose, onClick: (event) => handleNavigationItemClick(event) },
|
|
78
|
+
hasAreaPopup ? (React.createElement("div", { className: "db-mobile-navigation-back" },
|
|
79
|
+
React.createElement(DBButton, { icon: "arrow_left", variant: "ghost", id: props.backButtonId, onClick: (event) => handleBackClick(event) }, (_c = props.backButtonText) !== null && _c !== void 0 ? _c : DEFAULT_BACK))) : null,
|
|
80
|
+
React.createElement(React.Fragment, null, props.subNavigation)))) : null));
|
|
80
81
|
}
|
|
81
82
|
const DBNavigationItem = forwardRef(DBNavigationItemFn);
|
|
82
83
|
export default DBNavigationItem;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClickEvent, CloseEventProps, CloseEventState, GlobalProps, GlobalState, IconProps, InnerCloseButtonProps, RoleProps, SemanticProps, ShowIconProps, TextProps } from '../../shared/model';
|
|
1
|
+
import type { ClickEvent, CloseEventProps, CloseEventState, GlobalProps, GlobalState, IconProps, InnerCloseButtonProps, RoleProps, SemanticProps, ShowIconProps, TextProps } from '../../shared/model';
|
|
2
2
|
export declare const NotificationVariantList: readonly ["docked", "standalone", "overlay"];
|
|
3
3
|
export type NotificationVariantType = (typeof NotificationVariantList)[number];
|
|
4
4
|
export declare const NotificationLinkVariantList: readonly ["block", "inline"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GlobalProps, GlobalState } from '../../shared/model';
|
|
1
|
+
import type { GlobalProps, GlobalState } from '../../shared/model';
|
|
2
2
|
export declare const PageVariantList: readonly ["auto", "fixed"];
|
|
3
3
|
export type PageVariantType = (typeof PageVariantList)[number];
|
|
4
4
|
export declare const PageDocumentOverflowList: readonly ["hidden", "auto"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GapProps, GlobalProps, GlobalState, InitializedState, PlacementProps, PopoverProps, PopoverState, SpacingProps } from '../../shared/model';
|
|
1
|
+
import type { GapProps, GlobalProps, GlobalState, InitializedState, PlacementProps, PopoverProps, PopoverState, SpacingProps } from '../../shared/model';
|
|
2
2
|
export type DBPopoverDefaultProps = {
|
|
3
3
|
/**
|
|
4
4
|
* Use open to disable the default hover/focus behavior to use it on click or other trigger.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeEventProps, ChangeEventState, FocusEventProps, FocusEventState, FormCheckProps, FormProps, FormState, GlobalProps, GlobalState, InitializedState, InputEventProps, InputEventState, SizeProps } from '../../shared/model';
|
|
1
|
+
import type { ChangeEventProps, ChangeEventState, FocusEventProps, FocusEventState, FormCheckProps, FormProps, FormState, GlobalProps, GlobalState, InitializedState, InputEventProps, InputEventState, SizeProps } from '../../shared/model';
|
|
2
2
|
export type DBRadioDefaultProps = {};
|
|
3
3
|
export type DBRadioProps = DBRadioDefaultProps & GlobalProps & InputEventProps<HTMLInputElement> & ChangeEventProps<HTMLInputElement> & FocusEventProps<HTMLInputElement> & FormProps & FormCheckProps & SizeProps;
|
|
4
4
|
export type DBRadioDefaultState = {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ContainerWidthProps, GlobalProps, SpacingProps } from '../../shared/model';
|
|
1
|
+
import type { ContainerWidthProps, GlobalProps, SpacingProps } from '../../shared/model';
|
|
2
2
|
export type DBSectionDefaultProps = {};
|
|
3
3
|
export type DBSectionProps = DBSectionDefaultProps & GlobalProps & SpacingProps & ContainerWidthProps;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeEventProps, ChangeEventState, ClickEventProps, ClickEventState, FocusEventProps, FocusEventState, FormMessageProps, FormProps, FormSizeProps, FormState, FromValidState, GlobalProps, GlobalState, IconProps, InitializedState, InputEventProps, InputEventState, ShowIconProps } from '../../shared/model';
|
|
1
|
+
import type { ChangeEventProps, ChangeEventState, ClickEventProps, ClickEventState, FocusEventProps, FocusEventState, FormMessageProps, FormProps, FormSizeProps, FormState, FromValidState, GlobalProps, GlobalState, IconProps, InitializedState, InputEventProps, InputEventState, ShowIconProps } from '../../shared/model';
|
|
2
2
|
export type DBSelectDefaultProps = {
|
|
3
3
|
/**
|
|
4
4
|
* @deprecated
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GapSpacingProps, GlobalProps, GlobalState } from '../../shared/model';
|
|
1
|
+
import type { GapSpacingProps, GlobalProps, GlobalState } from '../../shared/model';
|
|
2
2
|
export declare const StackVariantList: readonly ["simple", "divider"];
|
|
3
3
|
export type StackVariantType = (typeof StackVariantList)[number];
|
|
4
4
|
export declare const StackDirectionList: readonly ["row", "column"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeEventProps, ChangeEventState, FocusEventProps, FocusEventState, FormCheckProps, FormMessageProps, FormProps, FormState, FromValidState, GeneralKeyboardEvent, GlobalProps, GlobalState, IconLeadingProps, IconProps, IconTrailingProps, LabelVariantHorizontalType, SizeProps } from '../../shared/model';
|
|
1
|
+
import type { ChangeEventProps, ChangeEventState, FocusEventProps, FocusEventState, FormCheckProps, FormMessageProps, FormProps, FormState, FromValidState, GeneralKeyboardEvent, GlobalProps, GlobalState, IconLeadingProps, IconProps, IconTrailingProps, LabelVariantHorizontalType, SizeProps } from '../../shared/model';
|
|
2
2
|
export type DBSwitchDefaultProps = {
|
|
3
3
|
/**
|
|
4
4
|
* Add additional icons to indicate active/inactive state.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActiveProps, ChangeEventProps, ChangeEventState, GlobalProps, GlobalState, IconLeadingProps, IconProps, IconTrailingProps, InitializedState, NameProps, NameState, ShowIconLeadingProps, ShowIconProps, ShowIconTrailingProps } from '../../shared/model';
|
|
1
|
+
import type { ActiveProps, ChangeEventProps, ChangeEventState, GlobalProps, GlobalState, IconLeadingProps, IconProps, IconTrailingProps, InitializedState, NameProps, NameState, ShowIconLeadingProps, ShowIconProps, ShowIconTrailingProps } from '../../shared/model';
|
|
2
2
|
export type DBTabItemDefaultProps = {
|
|
3
3
|
/**
|
|
4
4
|
* To control the component
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AlignmentProps, GlobalProps, InitializedState, InputEvent, OrientationProps, WidthProps } from '../../shared/model';
|
|
2
|
-
import { DBTabItemProps } from '../tab-item/model';
|
|
3
|
-
import { DBTabPanelProps } from '../tab-panel/model';
|
|
1
|
+
import type { AlignmentProps, GlobalProps, InitializedState, InputEvent, OrientationProps, WidthProps } from '../../shared/model';
|
|
2
|
+
import type { DBTabItemProps } from '../tab-item/model';
|
|
3
|
+
import type { DBTabPanelProps } from '../tab-panel/model';
|
|
4
4
|
export declare const TabsBehaviorList: readonly ["scrollbar", "arrows"];
|
|
5
5
|
export type TabsBehaviorType = (typeof TabsBehaviorList)[number];
|
|
6
6
|
export declare const TabsInitialSelectedModeList: readonly ["auto", "manually"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClickEvent, ContentSlotProps, EmphasisProps, GlobalProps, GlobalState, IconProps, NoTextProps, OverflowProps, SemanticProps, ShowIconProps } from '../../shared/model';
|
|
1
|
+
import type { ClickEvent, ContentSlotProps, EmphasisProps, GlobalProps, GlobalState, IconProps, NoTextProps, OverflowProps, SemanticProps, ShowIconProps } from '../../shared/model';
|
|
2
2
|
export declare const TagBehaviorList: readonly ["static", "removable"];
|
|
3
3
|
export type TagBehaviorType = (typeof TagBehaviorList)[number];
|
|
4
4
|
export type DBTagEventsProps = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeEventProps, ChangeEventState, FocusEventProps, FocusEventState, FormMessageProps, FormProps, FormState, FormTextProps, FromValidState, GlobalProps, GlobalState, InputEventProps, InputEventState } from '../../shared/model';
|
|
1
|
+
import type { ChangeEventProps, ChangeEventState, FocusEventProps, FocusEventState, FormMessageProps, FormProps, FormState, FormTextProps, FromValidState, GlobalProps, GlobalState, InputEventProps, InputEventState } from '../../shared/model';
|
|
2
2
|
export declare const TextareaResizeList: readonly ["none", "both", "horizontal", "vertical"];
|
|
3
3
|
export type TextareaResizeType = (typeof TextareaResizeList)[number];
|
|
4
4
|
export declare const TextareaWrapList: readonly ["hard", "soft", "off"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClickEventState, DocumentScrollState, EmphasisProps, GlobalProps, GlobalState, InitializedState, PlacementProps, PopoverProps, PopoverState, ResetIdState, TextProps, WrapProps } from '../../shared/model';
|
|
1
|
+
import type { ClickEventState, DocumentScrollState, EmphasisProps, GlobalProps, GlobalState, InitializedState, PlacementProps, PopoverProps, PopoverState, ResetIdState, TextProps, WrapProps } from '../../shared/model';
|
|
2
2
|
export declare const TooltipVariantList: readonly ["description", "label"];
|
|
3
3
|
export type TooltipVariantType = (typeof TooltipVariantList)[number];
|
|
4
4
|
export type DBTooltipDefaultProps = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@db-ux/react-core-components",
|
|
3
|
-
"version": "4.9.
|
|
3
|
+
"version": "4.9.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "React components for @db-ux/core-components",
|
|
6
6
|
"repository": {
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"dist/"
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@db-ux/core-components": "4.9.
|
|
21
|
-
"@db-ux/core-foundations": "4.9.
|
|
20
|
+
"@db-ux/core-components": "4.9.1",
|
|
21
|
+
"@db-ux/core-foundations": "4.9.1"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@playwright/experimental-ct-react": "1.60.0",
|