@db-ux/ngx-core-components 3.0.2-copilot2-e7bf98b → 3.0.2-shell2-badc28f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -11
- package/components/accordion/accordion.d.ts +30 -0
- package/components/accordion/index.d.ts +1 -0
- package/components/accordion/model.d.ts +41 -0
- package/components/accordion-item/accordion-item.d.ts +33 -0
- package/components/accordion-item/index.d.ts +1 -0
- package/components/accordion-item/model.d.ts +24 -0
- package/components/badge/badge.d.ts +27 -0
- package/components/badge/index.d.ts +1 -0
- package/components/badge/model.d.ts +16 -0
- package/components/button/button.d.ts +39 -0
- package/components/button/index.d.ts +1 -0
- package/components/button/model.d.ts +40 -0
- package/components/card/card.d.ts +25 -0
- package/components/card/index.d.ts +1 -0
- package/components/card/model.d.ts +18 -0
- package/components/checkbox/checkbox.d.ts +64 -0
- package/components/checkbox/index.d.ts +1 -0
- package/components/checkbox/model.d.ts +10 -0
- package/components/control-panel-brand/control-panel-brand.d.ts +24 -0
- package/components/control-panel-brand/index.d.ts +1 -0
- package/components/control-panel-brand/model.d.ts +5 -0
- package/components/control-panel-desktop/control-panel-desktop.d.ts +32 -0
- package/components/control-panel-desktop/index.d.ts +1 -0
- package/components/control-panel-desktop/model.d.ts +7 -0
- package/components/control-panel-flat-icon-navigation/control-panel-flat-icon-navigation.d.ts +22 -0
- package/components/control-panel-flat-icon-navigation/index.d.ts +1 -0
- package/components/control-panel-flat-icon-navigation/model.d.ts +7 -0
- package/components/control-panel-meta-navigation/control-panel-meta-navigation.d.ts +19 -0
- package/components/control-panel-meta-navigation/index.d.ts +1 -0
- package/components/control-panel-meta-navigation/model.d.ts +5 -0
- package/components/control-panel-mobile/control-panel-mobile.d.ts +29 -0
- package/components/control-panel-mobile/index.d.ts +1 -0
- package/components/control-panel-mobile/model.d.ts +30 -0
- package/components/control-panel-primary-actions/control-panel-primary-actions.d.ts +19 -0
- package/components/control-panel-primary-actions/index.d.ts +1 -0
- package/components/control-panel-primary-actions/model.d.ts +5 -0
- package/components/control-panel-secondary-actions/control-panel-secondary-actions.d.ts +19 -0
- package/components/control-panel-secondary-actions/index.d.ts +1 -0
- package/components/control-panel-secondary-actions/model.d.ts +5 -0
- package/components/custom-select/custom-select.d.ts +150 -0
- package/components/custom-select/index.d.ts +1 -0
- package/components/custom-select/model.d.ts +223 -0
- package/components/custom-select-dropdown/custom-select-dropdown.d.ts +20 -0
- package/components/custom-select-dropdown/index.d.ts +1 -0
- package/components/custom-select-dropdown/model.d.ts +15 -0
- package/components/custom-select-form-field/custom-select-form-field.d.ts +19 -0
- package/components/custom-select-form-field/index.d.ts +1 -0
- package/components/custom-select-form-field/model.d.ts +5 -0
- package/components/custom-select-list/custom-select-list.d.ts +21 -0
- package/components/custom-select-list/index.d.ts +1 -0
- package/components/custom-select-list/model.d.ts +8 -0
- package/components/custom-select-list-item/custom-select-list-item.d.ts +45 -0
- package/components/custom-select-list-item/index.d.ts +1 -0
- package/components/custom-select-list-item/model.d.ts +29 -0
- package/components/divider/divider.d.ts +23 -0
- package/components/divider/index.d.ts +1 -0
- package/components/divider/model.d.ts +18 -0
- package/components/drawer/drawer.d.ts +38 -0
- package/components/drawer/index.d.ts +1 -0
- package/components/drawer/model.d.ts +54 -0
- package/components/icon/icon.d.ts +23 -0
- package/components/icon/index.d.ts +1 -0
- package/components/icon/model.d.ts +10 -0
- package/components/infotext/index.d.ts +1 -0
- package/components/infotext/infotext.d.ts +25 -0
- package/components/infotext/model.d.ts +5 -0
- package/components/input/index.d.ts +1 -0
- package/components/input/input.d.ts +98 -0
- package/components/input/model.d.ts +43 -0
- package/components/link/index.d.ts +1 -0
- package/components/link/link.d.ts +32 -0
- package/components/link/model.d.ts +24 -0
- package/components/navigation/index.d.ts +1 -0
- package/components/navigation/model.d.ts +14 -0
- package/components/navigation/navigation.d.ts +35 -0
- package/components/navigation-item/index.d.ts +1 -0
- package/components/navigation-item/model.d.ts +19 -0
- package/components/navigation-item/navigation-item.d.ts +26 -0
- package/components/navigation-item-group/index.d.ts +1 -0
- package/components/navigation-item-group/model.d.ts +26 -0
- package/components/navigation-item-group/navigation-item-group.d.ts +49 -0
- package/components/notification/index.d.ts +1 -0
- package/components/notification/model.d.ts +57 -0
- package/components/notification/notification.d.ts +40 -0
- package/components/popover/index.d.ts +1 -0
- package/components/popover/model.d.ts +17 -0
- package/components/popover/popover.d.ts +37 -0
- package/components/radio/index.d.ts +1 -0
- package/components/radio/model.d.ts +5 -0
- package/components/radio/radio.d.ts +47 -0
- package/components/section/index.d.ts +1 -0
- package/components/section/model.d.ts +5 -0
- package/components/section/section.d.ts +22 -0
- package/components/select/index.d.ts +1 -0
- package/components/select/model.d.ts +44 -0
- package/components/select/select.d.ts +83 -0
- package/components/shell/index.d.ts +1 -0
- package/components/shell/model.d.ts +50 -0
- package/components/shell/shell.d.ts +28 -0
- package/components/shell-sub-navigation/index.d.ts +1 -0
- package/components/shell-sub-navigation/model.d.ts +5 -0
- package/components/shell-sub-navigation/shell-sub-navigation.d.ts +27 -0
- package/components/stack/index.d.ts +1 -0
- package/components/stack/model.d.ts +34 -0
- package/components/stack/stack.d.ts +26 -0
- package/components/switch/index.d.ts +1 -0
- package/components/switch/model.d.ts +10 -0
- package/components/switch/switch.d.ts +52 -0
- package/components/tab-item/index.d.ts +1 -0
- package/components/tab-item/model.d.ts +24 -0
- package/components/tab-item/tab-item.d.ts +46 -0
- package/components/tab-list/index.d.ts +1 -0
- package/components/tab-list/model.d.ts +5 -0
- package/components/tab-list/tab-list.d.ts +20 -0
- package/components/tab-panel/index.d.ts +1 -0
- package/components/tab-panel/model.d.ts +10 -0
- package/components/tab-panel/tab-panel.d.ts +20 -0
- package/components/tabs/index.d.ts +1 -0
- package/components/tabs/model.d.ts +58 -0
- package/components/tabs/tabs.d.ts +45 -0
- package/components/tag/index.d.ts +1 -0
- package/components/tag/model.d.ts +47 -0
- package/components/tag/tag.d.ts +34 -0
- package/components/textarea/index.d.ts +1 -0
- package/components/textarea/model.d.ts +34 -0
- package/components/textarea/textarea.d.ts +84 -0
- package/components/tooltip/index.d.ts +1 -0
- package/components/tooltip/model.d.ts +20 -0
- package/components/tooltip/tooltip.d.ts +39 -0
- package/fesm2022/db-ux-ngx-core-components.mjs +8583 -0
- package/fesm2022/db-ux-ngx-core-components.mjs.map +1 -0
- package/index.d.ts +92 -0
- package/package.json +3 -7
- package/shared/constants.d.ts +91 -0
- package/shared/model.d.ts +601 -0
- package/utils/document-click-listener.d.ts +8 -0
- package/utils/document-scroll-listener.d.ts +9 -0
- package/utils/floating-components.d.ts +36 -0
- package/utils/form-components.d.ts +2 -0
- package/utils/index.d.ts +40 -0
- package/utils/navigation.d.ts +28 -0
- package/agent/Accordion.md +0 -52
- package/agent/AccordionItem.md +0 -45
- package/agent/Badge.md +0 -48
- package/agent/Brand.md +0 -29
- package/agent/Button.md +0 -59
- package/agent/Card.md +0 -39
- package/agent/Checkbox.md +0 -52
- package/agent/CustomSelect.md +0 -89
- package/agent/Divider.md +0 -37
- package/agent/Drawer.md +0 -90
- package/agent/Header.md +0 -45
- package/agent/Icon.md +0 -36
- package/agent/Infotext.md +0 -41
- package/agent/Input.md +0 -58
- package/agent/Link.md +0 -60
- package/agent/Navigation.md +0 -34
- package/agent/NavigationItem.md +0 -45
- package/agent/Notification.md +0 -52
- package/agent/Page.md +0 -45
- package/agent/Popover.md +0 -69
- package/agent/Radio.md +0 -39
- package/agent/Section.md +0 -39
- package/agent/Select.md +0 -80
- package/agent/Stack.md +0 -51
- package/agent/Switch.md +0 -55
- package/agent/TabItem.md +0 -41
- package/agent/Tabs.md +0 -80
- package/agent/Tag.md +0 -48
- package/agent/Textarea.md +0 -57
- package/agent/Tooltip.md +0 -64
- package/agent/_instructions.md +0 -31
|
@@ -0,0 +1,601 @@
|
|
|
1
|
+
import { IconTypes } from '@db-ux/core-foundations';
|
|
2
|
+
export type GlobalProps = {
|
|
3
|
+
/**
|
|
4
|
+
* default slot
|
|
5
|
+
*/
|
|
6
|
+
children?: any;
|
|
7
|
+
/**
|
|
8
|
+
* React specific for adding className to the component.
|
|
9
|
+
*/
|
|
10
|
+
className?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Workaround for TypeScript using class for all components.
|
|
13
|
+
*/
|
|
14
|
+
class?: string | any;
|
|
15
|
+
/**
|
|
16
|
+
* [ID](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id) of the component, generated automatically for some components as a fallback if unset.
|
|
17
|
+
*/
|
|
18
|
+
id?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Before using please check for the [accessibility concerns](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus#accessibility_concerns)
|
|
21
|
+
*/
|
|
22
|
+
autofocus?: boolean | string;
|
|
23
|
+
};
|
|
24
|
+
export type GlobalState = {
|
|
25
|
+
_id?: string;
|
|
26
|
+
};
|
|
27
|
+
export declare const SemanticList: readonly ["adaptive", "neutral", "critical", "informational", "warning", "successful"];
|
|
28
|
+
export type SemanticType = (typeof SemanticList)[number];
|
|
29
|
+
export type SemanticProps = {
|
|
30
|
+
/**
|
|
31
|
+
* The semantic defines the default variants for most components.
|
|
32
|
+
*/
|
|
33
|
+
semantic?: SemanticType;
|
|
34
|
+
};
|
|
35
|
+
export type IconProps = {
|
|
36
|
+
/**
|
|
37
|
+
* Define an icon by its identifier (like e.g. _user_, compare to [Icons](https://design-system.deutschebahn.com/core-web/review/main/foundations/icons/overview)) to get displayed in front of the elements content.
|
|
38
|
+
*/
|
|
39
|
+
icon?: IconTypes;
|
|
40
|
+
};
|
|
41
|
+
export type ShowIconProps = {
|
|
42
|
+
/**
|
|
43
|
+
* Enables or disables the visibility of the icon. The default value depends on the component.
|
|
44
|
+
* For many components this property is optional to reflect Figma properties.
|
|
45
|
+
*/
|
|
46
|
+
showIcon?: boolean | string;
|
|
47
|
+
};
|
|
48
|
+
export type ShowIconLeadingProps = {
|
|
49
|
+
/**
|
|
50
|
+
* Enables or disables the visibility of the leading icon.
|
|
51
|
+
* For many components this property is optional to reflect Figma properties.
|
|
52
|
+
*/
|
|
53
|
+
showIconLeading?: boolean | string;
|
|
54
|
+
};
|
|
55
|
+
export type ShowIconTrailingProps = {
|
|
56
|
+
/**
|
|
57
|
+
* Enables or disables the visibility of the trailing icon.
|
|
58
|
+
* For many components this property is optional to reflect Figma properties.
|
|
59
|
+
*/
|
|
60
|
+
showIconTrailing?: boolean | string;
|
|
61
|
+
};
|
|
62
|
+
export type IconLeadingProps = {
|
|
63
|
+
/**
|
|
64
|
+
* Define an icon by its identifier (like e.g. _user_, compare to [Icons](https://design-system.deutschebahn.com/core-web/review/main/foundations/icons/overview)) to get displayed in front of the elements content.
|
|
65
|
+
*/
|
|
66
|
+
iconLeading?: IconTypes;
|
|
67
|
+
};
|
|
68
|
+
export type IconTrailingProps = {
|
|
69
|
+
/**
|
|
70
|
+
* Define an icon by its identifier (like e.g. _user_, compare to [Icons](https://design-system.deutschebahn.com/core-web/review/main/foundations/icons/overview)) to get displayed in front of the elements content.
|
|
71
|
+
*/
|
|
72
|
+
iconTrailing?: IconTypes;
|
|
73
|
+
};
|
|
74
|
+
export declare const SpacingList: readonly ["medium", "small", "large", "none"];
|
|
75
|
+
export type SpacingType = (typeof SpacingList)[number];
|
|
76
|
+
export type SpacingProps = {
|
|
77
|
+
/**
|
|
78
|
+
* The spacing attribute changes the padding of the component.
|
|
79
|
+
*/
|
|
80
|
+
spacing?: SpacingType | string;
|
|
81
|
+
};
|
|
82
|
+
export declare const MarginList: readonly ["medium", "small", "large", "none"];
|
|
83
|
+
export type MarginType = (typeof MarginList)[number];
|
|
84
|
+
export type MarginProps = {
|
|
85
|
+
/**
|
|
86
|
+
* The margin attribute changes the margin of the component.
|
|
87
|
+
*/
|
|
88
|
+
margin?: MarginType;
|
|
89
|
+
};
|
|
90
|
+
export declare const ShellControlPanelDesktopPosition: readonly ["top", "left"];
|
|
91
|
+
export type ShellControlPanelDesktopPositionType = (typeof ShellControlPanelDesktopPosition)[number];
|
|
92
|
+
export declare const ShellControlPanelMobilePosition: readonly ["top", "bottom"];
|
|
93
|
+
export type ShellControlPanelMobilePositionType = (typeof ShellControlPanelMobilePosition)[number];
|
|
94
|
+
export declare const PlacementHorizontalList: readonly ["left", "right", "left-start", "left-end", "right-start", "right-end"];
|
|
95
|
+
export type PlacementHorizontalType = (typeof PlacementHorizontalList)[number];
|
|
96
|
+
export declare const PlacementVerticalList: readonly ["top", "bottom", "top-start", "top-end", "bottom-start", "bottom-end"];
|
|
97
|
+
export type PlacementVerticalType = (typeof PlacementVerticalList)[number];
|
|
98
|
+
export declare const PlacementList: readonly ["left", "right", "left-start", "left-end", "right-start", "right-end", "top", "bottom", "top-start", "top-end", "bottom-start", "bottom-end"];
|
|
99
|
+
export type PlacementType = (typeof PlacementList)[number];
|
|
100
|
+
export type PlacementProps = {
|
|
101
|
+
/**
|
|
102
|
+
* The `placement` attributes values change the position to absolute and adds a transform based on the placement.
|
|
103
|
+
*/
|
|
104
|
+
placement?: PlacementType;
|
|
105
|
+
};
|
|
106
|
+
export type NavigationBehaviorState = {
|
|
107
|
+
handleNavigationItemClick: (event: any) => void;
|
|
108
|
+
};
|
|
109
|
+
export type GapProps = {
|
|
110
|
+
/**
|
|
111
|
+
* If the absolute element should have a gap between the parent element.
|
|
112
|
+
*/
|
|
113
|
+
gap?: boolean | string;
|
|
114
|
+
};
|
|
115
|
+
export declare const GapSpacingList: readonly ["none", "3x-large", "2x-large", "x-large", "large", "medium", "small", "x-small", "2x-small", "3x-small"];
|
|
116
|
+
export type GapSpacingType = (typeof GapSpacingList)[number];
|
|
117
|
+
export type GapSpacingProps = {
|
|
118
|
+
/**
|
|
119
|
+
* Set the gap/spacing between elements
|
|
120
|
+
*/
|
|
121
|
+
gap?: GapSpacingType;
|
|
122
|
+
};
|
|
123
|
+
export type OverflowProps = {
|
|
124
|
+
/**
|
|
125
|
+
* The overflow attribute sets a max-width and longer text will be dotted.
|
|
126
|
+
*/
|
|
127
|
+
overflow?: boolean | string;
|
|
128
|
+
};
|
|
129
|
+
export type WrapProps = {
|
|
130
|
+
/**
|
|
131
|
+
* Determines whether the text should wrap when its parent container is too small, preventing overflow.
|
|
132
|
+
*/
|
|
133
|
+
wrap?: boolean | string;
|
|
134
|
+
};
|
|
135
|
+
export declare const OrientationList: readonly ["horizontal", "vertical"];
|
|
136
|
+
export type OrientationType = (typeof OrientationList)[number];
|
|
137
|
+
export type OrientationProps = {
|
|
138
|
+
/**
|
|
139
|
+
* Change the orientation. Defaults to horizontal.
|
|
140
|
+
*/
|
|
141
|
+
orientation?: OrientationType;
|
|
142
|
+
};
|
|
143
|
+
export declare const WidthList: readonly ["full", "auto"];
|
|
144
|
+
export type WidthType = (typeof WidthList)[number];
|
|
145
|
+
export type WidthProps = {
|
|
146
|
+
/**
|
|
147
|
+
* Width of the component. Auto width based on children size, full width based on parent elements width.
|
|
148
|
+
*/
|
|
149
|
+
width?: WidthType | string;
|
|
150
|
+
};
|
|
151
|
+
export declare const MaxWidthList: readonly ["full", "medium", "large", "small"];
|
|
152
|
+
export type MaxWidthType = (typeof MaxWidthList)[number];
|
|
153
|
+
export type ContainerWidthProps = {
|
|
154
|
+
/**
|
|
155
|
+
* Set max width for the component
|
|
156
|
+
*/
|
|
157
|
+
width?: MaxWidthType;
|
|
158
|
+
};
|
|
159
|
+
export declare const PopoverDelayList: readonly ["none", "slow", "fast"];
|
|
160
|
+
export type PopoverDelayType = (typeof PopoverDelayList)[number];
|
|
161
|
+
export declare const PopoverWidthList: readonly ["auto", "fixed"];
|
|
162
|
+
export type PopoverWidthType = (typeof PopoverWidthList)[number];
|
|
163
|
+
export type PopoverProps = {
|
|
164
|
+
/**
|
|
165
|
+
* Add a delay before showing the tooltip
|
|
166
|
+
*/
|
|
167
|
+
delay?: PopoverDelayType;
|
|
168
|
+
/**
|
|
169
|
+
* Disable animation
|
|
170
|
+
*/
|
|
171
|
+
animation?: boolean | string;
|
|
172
|
+
/**
|
|
173
|
+
* Use fixed with for default max-width
|
|
174
|
+
*/
|
|
175
|
+
width?: PopoverWidthType;
|
|
176
|
+
};
|
|
177
|
+
export type NameProps = {
|
|
178
|
+
/**
|
|
179
|
+
* The name attribute gives the name of the element to group it.
|
|
180
|
+
*/
|
|
181
|
+
name?: string;
|
|
182
|
+
};
|
|
183
|
+
export type NameState = {
|
|
184
|
+
_name?: string;
|
|
185
|
+
handleNameAttribute: () => void;
|
|
186
|
+
};
|
|
187
|
+
export type ContentSlotProps = {
|
|
188
|
+
/**
|
|
189
|
+
* Default slot which is used to pass in additional content.
|
|
190
|
+
*/
|
|
191
|
+
content?: any;
|
|
192
|
+
};
|
|
193
|
+
export declare const SizeList: readonly ["small", "medium"];
|
|
194
|
+
export type SizeType = (typeof SizeList)[number];
|
|
195
|
+
export type SizeProps = {
|
|
196
|
+
/**
|
|
197
|
+
* The size attribute changes the font-size and other related sizes of the component.
|
|
198
|
+
*/
|
|
199
|
+
size?: SizeType;
|
|
200
|
+
};
|
|
201
|
+
export declare const EmphasisList: readonly ["weak", "strong"];
|
|
202
|
+
export type EmphasisType = (typeof EmphasisList)[number];
|
|
203
|
+
export type EmphasisProps = {
|
|
204
|
+
/**
|
|
205
|
+
* The emphasis attribute divides in between a weak or strong importance.
|
|
206
|
+
*/
|
|
207
|
+
emphasis?: EmphasisType;
|
|
208
|
+
};
|
|
209
|
+
export declare const ValidationList: readonly ["invalid", "valid", "no-validation"];
|
|
210
|
+
export type ValidationType = (typeof ValidationList)[number];
|
|
211
|
+
/**
|
|
212
|
+
* Properties to control the required state and its visual annotation for input components.
|
|
213
|
+
*/
|
|
214
|
+
export type RequiredProps = {
|
|
215
|
+
/**
|
|
216
|
+
* When the required attribute specified, the user will be required to fill the form element before submitting the form.
|
|
217
|
+
* The form element will be marked semantically as required and by default also visually with an asterisk '*' next to the label (unless the property `showRequiredAsterisk` is also set with the value `false`).
|
|
218
|
+
*/
|
|
219
|
+
required?: boolean | string;
|
|
220
|
+
/**
|
|
221
|
+
* This attribute allows to specify whether a form field which is marked as required will show a visual indicator (an asterisk '*').
|
|
222
|
+
* It allows to prevent adding the visual indicator but still keep the field semantically required by setting its value to `false`.
|
|
223
|
+
* By default, its value is `true`, so the asterisk is shown when `required` is set.
|
|
224
|
+
*/
|
|
225
|
+
showRequiredAsterisk?: boolean | string;
|
|
226
|
+
};
|
|
227
|
+
export type ShowLabelProps = {
|
|
228
|
+
/**
|
|
229
|
+
* Enables/disables the visibility of the label
|
|
230
|
+
*/
|
|
231
|
+
showLabel?: boolean | string;
|
|
232
|
+
};
|
|
233
|
+
export type ValueProps = {
|
|
234
|
+
/**
|
|
235
|
+
* The value property is to receive results from the native form element.
|
|
236
|
+
*/
|
|
237
|
+
value?: any;
|
|
238
|
+
};
|
|
239
|
+
export type DisabledProps = {
|
|
240
|
+
/**
|
|
241
|
+
* The disabled attribute can be set to keep a user from clicking on the item.
|
|
242
|
+
*/
|
|
243
|
+
disabled?: boolean | string;
|
|
244
|
+
};
|
|
245
|
+
export type BaseFormProps = {
|
|
246
|
+
/**
|
|
247
|
+
* The label attribute specifies the caption of the form element.
|
|
248
|
+
*/
|
|
249
|
+
label?: string;
|
|
250
|
+
/**
|
|
251
|
+
* The name attribute gives the name of the form control, as used in form submission and in the form element's elements object.
|
|
252
|
+
*/
|
|
253
|
+
name?: string;
|
|
254
|
+
} & DisabledProps;
|
|
255
|
+
export type CustomFormProps = {
|
|
256
|
+
/**
|
|
257
|
+
* Overwrites auto handling for aria-describedby.
|
|
258
|
+
*/
|
|
259
|
+
ariaDescribedBy?: string;
|
|
260
|
+
/**
|
|
261
|
+
* Associates the control with a form element
|
|
262
|
+
*/
|
|
263
|
+
form?: string;
|
|
264
|
+
/**
|
|
265
|
+
* Marks an input element as invalid (red) / valid (green) / no-validation (grey). Overwrites the :user-valid selector.
|
|
266
|
+
*/
|
|
267
|
+
validation?: ValidationType;
|
|
268
|
+
};
|
|
269
|
+
export type FormProps = CustomFormProps & BaseFormProps & RequiredProps & ShowLabelProps & ValueProps;
|
|
270
|
+
export declare const FieldSizingList: readonly ["fixed", "content"];
|
|
271
|
+
export type FieldSizingType = (typeof FieldSizingList)[number];
|
|
272
|
+
export type FormTextProps = {
|
|
273
|
+
/**
|
|
274
|
+
* Maximum length (number of characters) of value
|
|
275
|
+
*/
|
|
276
|
+
maxLength?: number | string;
|
|
277
|
+
/**
|
|
278
|
+
* Minimum length (number of characters) of value
|
|
279
|
+
*/
|
|
280
|
+
minLength?: number | string;
|
|
281
|
+
/**
|
|
282
|
+
* Maximum length (number of characters) of value
|
|
283
|
+
*/
|
|
284
|
+
maxlength?: number | string;
|
|
285
|
+
/**
|
|
286
|
+
* Minimum length (number of characters) of value
|
|
287
|
+
*/
|
|
288
|
+
minlength?: number | string;
|
|
289
|
+
/**
|
|
290
|
+
* The disabled attribute can be set to keep a user from edit on the form element
|
|
291
|
+
*/
|
|
292
|
+
readOnly?: boolean | string;
|
|
293
|
+
/**
|
|
294
|
+
* The disabled attribute can be set to keep a user from edit on the form element
|
|
295
|
+
*/
|
|
296
|
+
readonly?: boolean | string;
|
|
297
|
+
/**
|
|
298
|
+
* Adds shrinkwrap for input and textarea: https://developer.mozilla.org/en-US/docs/Web/CSS/field-sizing
|
|
299
|
+
* Note: Only supported in Chromium browsers so far
|
|
300
|
+
*/
|
|
301
|
+
fieldSizing?: FieldSizingType;
|
|
302
|
+
};
|
|
303
|
+
export type FormSizeProps = {
|
|
304
|
+
/**
|
|
305
|
+
* Size of the control
|
|
306
|
+
*/
|
|
307
|
+
size?: number;
|
|
308
|
+
};
|
|
309
|
+
export type FormCheckProps = {
|
|
310
|
+
/**
|
|
311
|
+
* Define the radio or checkbox elements checked state
|
|
312
|
+
*/
|
|
313
|
+
checked?: boolean | string;
|
|
314
|
+
};
|
|
315
|
+
export declare const LabelVariantList: readonly ["above", "floating"];
|
|
316
|
+
export type LabelVariantType = (typeof LabelVariantList)[number];
|
|
317
|
+
export declare const AutoCompleteList: readonly ["off", "on", "name", "honorific-prefix", "given-name", "additional-name", "family-name", "honorific-suffix", "nickname", "email", "username", "new-password", "current-password", "one-time-code", "organization-title", "organization", "street-address", "shipping", "billing", "address-line1", "address-line2", "address-line3", "address-level4", "address-level3", "address-level2", "address-level1", "country", "country-name", "postal-code", "cc-name", "cc-given-name", "cc-additional-name", "cc-family-name", "cc-number", "cc-exp", "cc-exp-month", "cc-exp-year", "cc-csc", "cc-type", "transaction-currency", "transaction-amount", "language", "bday", "bday-day", "bday-month", "bday-year", "sex", "tel", "tel-country-code", "tel-national", "tel-area-code", "tel-local", "tel-extension", "impp", "url", "photo", "webauthn"];
|
|
318
|
+
export type AutoCompleteType = (typeof AutoCompleteList)[number];
|
|
319
|
+
export type FormMessageProps = {
|
|
320
|
+
/**
|
|
321
|
+
* Change the variant of the label to float or hidden
|
|
322
|
+
*/
|
|
323
|
+
variant?: LabelVariantType;
|
|
324
|
+
/**
|
|
325
|
+
* Text that appears in the form control when it has no value set
|
|
326
|
+
*/
|
|
327
|
+
placeholder?: string;
|
|
328
|
+
/**
|
|
329
|
+
* Optional helper message for form components
|
|
330
|
+
*/
|
|
331
|
+
message?: string;
|
|
332
|
+
/**
|
|
333
|
+
* Helper message for valid form components
|
|
334
|
+
*/
|
|
335
|
+
validMessage?: string;
|
|
336
|
+
/**
|
|
337
|
+
* Helper message for invalid form components
|
|
338
|
+
*/
|
|
339
|
+
invalidMessage?: string;
|
|
340
|
+
/**
|
|
341
|
+
* Set/overwrite icon for helper message for form components
|
|
342
|
+
*/
|
|
343
|
+
messageIcon?: IconTypes;
|
|
344
|
+
/**
|
|
345
|
+
* See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete
|
|
346
|
+
*/
|
|
347
|
+
autocomplete?: string | AutoCompleteType;
|
|
348
|
+
/**
|
|
349
|
+
* Enables or disables the visibility of the message.
|
|
350
|
+
*/
|
|
351
|
+
showMessage?: boolean | string;
|
|
352
|
+
};
|
|
353
|
+
export type FromValidState = {
|
|
354
|
+
hasValidState: () => boolean;
|
|
355
|
+
handleValidation: () => void;
|
|
356
|
+
_invalidMessage?: string;
|
|
357
|
+
};
|
|
358
|
+
export type FormState = {
|
|
359
|
+
_messageId?: string;
|
|
360
|
+
_validMessageId?: string;
|
|
361
|
+
_invalidMessageId?: string;
|
|
362
|
+
_descByIds?: string;
|
|
363
|
+
_value?: string;
|
|
364
|
+
_invalidMessage?: string;
|
|
365
|
+
/**
|
|
366
|
+
* https://www.davidmacd.com/blog/test-aria-describedby-errormessage-aria-live.html
|
|
367
|
+
* Currently VoiceOver isn't supporting changes from aria-describedby.
|
|
368
|
+
* This is an internal Fallback
|
|
369
|
+
*/
|
|
370
|
+
_voiceOverFallback?: string;
|
|
371
|
+
};
|
|
372
|
+
export type InitializedState = {
|
|
373
|
+
initialized: boolean;
|
|
374
|
+
};
|
|
375
|
+
export declare const LinkTargetList: readonly ["_self", "_blank", "_parent", "_top"];
|
|
376
|
+
export type LinkTargetType = (typeof LinkTargetList)[number];
|
|
377
|
+
export declare const LinkReferrerPolicyList: readonly ["no-referrer", "no-referrer-when-downgrade", "origin", "origin-when-cross-origin", "same-origin", "strict-origin", "strict-origin-when-cross-origin", "unsafe-url"];
|
|
378
|
+
export type LinkReferrerPolicyType = (typeof LinkReferrerPolicyList)[number];
|
|
379
|
+
export type LinkProps = {
|
|
380
|
+
/**
|
|
381
|
+
* Disables the link.
|
|
382
|
+
*/
|
|
383
|
+
disabled?: boolean | string;
|
|
384
|
+
/**
|
|
385
|
+
* The [URL that the hyperlink points to](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#href).
|
|
386
|
+
*/
|
|
387
|
+
href?: string;
|
|
388
|
+
/**
|
|
389
|
+
* Hints for the human [language of the linked page or document](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#hreflang).
|
|
390
|
+
*/
|
|
391
|
+
hreflang?: string;
|
|
392
|
+
/**
|
|
393
|
+
* Where to open the linked URL, as the name for a [browsing context](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#target).
|
|
394
|
+
*/
|
|
395
|
+
target?: LinkTargetType;
|
|
396
|
+
/**
|
|
397
|
+
* The relationship of the linked URL as space-separated link types.
|
|
398
|
+
*/
|
|
399
|
+
rel?: string;
|
|
400
|
+
/**
|
|
401
|
+
* Sets aria role based on [`aria-role`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles).
|
|
402
|
+
*/
|
|
403
|
+
role?: string;
|
|
404
|
+
/**
|
|
405
|
+
* How much of the referrer to send when following the link.
|
|
406
|
+
*/
|
|
407
|
+
referrerpolicy?: LinkReferrerPolicyType;
|
|
408
|
+
};
|
|
409
|
+
export type TextProps = {
|
|
410
|
+
/**
|
|
411
|
+
* Alternative for default slot/children.
|
|
412
|
+
*/
|
|
413
|
+
text?: string;
|
|
414
|
+
};
|
|
415
|
+
export type GeneralEvent<T> = Event;
|
|
416
|
+
export type GeneralKeyboardEvent<T> = KeyboardEvent;
|
|
417
|
+
export type ClickEvent<T> = MouseEvent;
|
|
418
|
+
export type ClickEventProps<T> = {
|
|
419
|
+
/**
|
|
420
|
+
* React specific onClick to pass to forward ref.
|
|
421
|
+
*/
|
|
422
|
+
onClick?: (event: ClickEvent<T>) => void;
|
|
423
|
+
};
|
|
424
|
+
export type ClickEventState<T> = {
|
|
425
|
+
handleClick: (event: ClickEvent<T> | any) => void;
|
|
426
|
+
};
|
|
427
|
+
export type ToggleEventProps = {
|
|
428
|
+
toggle?: (open: boolean) => void;
|
|
429
|
+
onToggle?: (open: boolean) => void;
|
|
430
|
+
};
|
|
431
|
+
export type ToggleEventState<T> = {
|
|
432
|
+
handleToggle: (event?: ClickEvent<T> | any) => void;
|
|
433
|
+
};
|
|
434
|
+
export type CloseEventProps<T> = {
|
|
435
|
+
/**
|
|
436
|
+
* Function to handle button click (close).
|
|
437
|
+
*/
|
|
438
|
+
onClose?: (event?: T) => void;
|
|
439
|
+
/**
|
|
440
|
+
* Function to handle button click (close).
|
|
441
|
+
*/
|
|
442
|
+
close?: (event?: T) => void;
|
|
443
|
+
};
|
|
444
|
+
export type CloseEventState<T> = {
|
|
445
|
+
handleClose: (event?: T | void, forceClose?: boolean) => void;
|
|
446
|
+
};
|
|
447
|
+
export declare const AlignmentList: readonly ["start", "center"];
|
|
448
|
+
export type AlignmentType = (typeof AlignmentList)[number];
|
|
449
|
+
export type AlignmentProps = {
|
|
450
|
+
/**
|
|
451
|
+
* Define the content alignment in full width
|
|
452
|
+
*/
|
|
453
|
+
alignment?: AlignmentType | string;
|
|
454
|
+
};
|
|
455
|
+
export type ActiveProps = {
|
|
456
|
+
/**
|
|
457
|
+
* If the tab is checked/active.
|
|
458
|
+
*/
|
|
459
|
+
active?: boolean | string;
|
|
460
|
+
};
|
|
461
|
+
export type InputEvent<T> = Event;
|
|
462
|
+
export type InputEventProps<T> = {
|
|
463
|
+
input?: (event: InputEvent<T>) => void;
|
|
464
|
+
onInput?: (event: InputEvent<T>) => void;
|
|
465
|
+
};
|
|
466
|
+
export type InputEventState<T> = {
|
|
467
|
+
handleInput: (event: InputEvent<T> | any) => void;
|
|
468
|
+
};
|
|
469
|
+
export type ChangeEvent<T> = Event;
|
|
470
|
+
export type ChangeEventProps<T> = {
|
|
471
|
+
change?: (event: ChangeEvent<T>) => void;
|
|
472
|
+
onChange?: (event: ChangeEvent<T>) => void;
|
|
473
|
+
};
|
|
474
|
+
export type ChangeEventState<T> = {
|
|
475
|
+
handleChange: (event: ChangeEvent<T> | any) => void;
|
|
476
|
+
};
|
|
477
|
+
export type InteractionEvent<T> = FocusEvent;
|
|
478
|
+
export type FocusEventProps<T> = {
|
|
479
|
+
blur?: (event: InteractionEvent<T>) => void;
|
|
480
|
+
onBlur?: (event: InteractionEvent<T>) => void;
|
|
481
|
+
focus?: (event: InteractionEvent<T>) => void;
|
|
482
|
+
onFocus?: (event: InteractionEvent<T>) => void;
|
|
483
|
+
};
|
|
484
|
+
export type FocusEventState<T> = {
|
|
485
|
+
handleBlur: (event: InteractionEvent<T> | any) => void;
|
|
486
|
+
handleFocus: (event: InteractionEvent<T> | any) => void;
|
|
487
|
+
};
|
|
488
|
+
export type InnerCloseButtonProps = {
|
|
489
|
+
/**
|
|
490
|
+
* The closeButtonId attribute changes the id inside the close button.
|
|
491
|
+
*/
|
|
492
|
+
closeButtonId?: string;
|
|
493
|
+
/**
|
|
494
|
+
* The closeButtonText attribute changes the text inside the close button.
|
|
495
|
+
*/
|
|
496
|
+
closeButtonText?: string;
|
|
497
|
+
};
|
|
498
|
+
export type NavigationBackButtonProps = {
|
|
499
|
+
/**
|
|
500
|
+
* The backButtonId attribute changes the id inside the back button.
|
|
501
|
+
*/
|
|
502
|
+
backButtonId?: string;
|
|
503
|
+
/**
|
|
504
|
+
* The backButtonText attribute changes the text inside the back button.
|
|
505
|
+
*/
|
|
506
|
+
backButtonText?: string;
|
|
507
|
+
};
|
|
508
|
+
export type AriaControlsProps = {
|
|
509
|
+
/**
|
|
510
|
+
* Pass `aria-controls` to inner element
|
|
511
|
+
*/
|
|
512
|
+
controls?: string;
|
|
513
|
+
};
|
|
514
|
+
export type ControlPanelProps = {
|
|
515
|
+
/**
|
|
516
|
+
* Slot to pass in the DBControlPanelBrand component
|
|
517
|
+
*/
|
|
518
|
+
brand?: any;
|
|
519
|
+
/**
|
|
520
|
+
* Slot to pass in a meta navigation.
|
|
521
|
+
* Desktop: Above the regular control-panel-desktop
|
|
522
|
+
* Mobile: Inside the drawer
|
|
523
|
+
*/
|
|
524
|
+
metaNavigation?: any;
|
|
525
|
+
/**
|
|
526
|
+
* Slot to pass one or more elements like DBButton (e.g. search) as primary action.
|
|
527
|
+
* Desktop: Shown next to the main-navigation
|
|
528
|
+
* Mobile: Shown next to the control-panel-brand
|
|
529
|
+
*/
|
|
530
|
+
primaryActions?: any;
|
|
531
|
+
/**
|
|
532
|
+
* Slot to pass one or more elements like DBButton (e.g. profile, language, etc.) as secondary action.
|
|
533
|
+
* Desktop: Shown seperated by divider at the end of the control-panel-desktop
|
|
534
|
+
* Mobile: Shown inside the drawer at the bottom.
|
|
535
|
+
*/
|
|
536
|
+
secondaryActions?: any;
|
|
537
|
+
/**
|
|
538
|
+
* Adds ``aria-labelledby`` to the <nav> element.
|
|
539
|
+
*/
|
|
540
|
+
navigationLabeledBy?: string;
|
|
541
|
+
};
|
|
542
|
+
export type ValueLabelType = {
|
|
543
|
+
value: string;
|
|
544
|
+
label?: string;
|
|
545
|
+
};
|
|
546
|
+
export type OverflowScrollButtonProps = {
|
|
547
|
+
/**
|
|
548
|
+
* Change amount of distance if you click on an arrow, only available with behavior="arrows"
|
|
549
|
+
*/
|
|
550
|
+
arrowScrollDistance?: number | string;
|
|
551
|
+
};
|
|
552
|
+
export type OverflowScrollButtonState = {
|
|
553
|
+
scroll: (left?: boolean) => void;
|
|
554
|
+
showScrollLeft?: boolean;
|
|
555
|
+
showScrollRight?: boolean;
|
|
556
|
+
evaluateScrollButtons: (tabList: Element) => void;
|
|
557
|
+
};
|
|
558
|
+
export type SidebarProps = {
|
|
559
|
+
/**
|
|
560
|
+
* Set the expanded/collapsed state initially for the left sidebar
|
|
561
|
+
*/
|
|
562
|
+
expanded?: boolean | string;
|
|
563
|
+
/**
|
|
564
|
+
* Set the tooltip for the expand/collapse button
|
|
565
|
+
*/
|
|
566
|
+
expandButtonTooltip?: string;
|
|
567
|
+
/**
|
|
568
|
+
* Set the tooltip for the expand/collapse button based on the state. (only react|vue)
|
|
569
|
+
*/
|
|
570
|
+
expandButtonTooltipFn?: (open: boolean) => string;
|
|
571
|
+
/**
|
|
572
|
+
* Set the tooltip for the expand/collapse button based on the state. (only react|vue)
|
|
573
|
+
*/
|
|
574
|
+
onExpandButtonTooltipFn?: (open: boolean) => string;
|
|
575
|
+
};
|
|
576
|
+
export type SidebarState = {
|
|
577
|
+
_open: boolean;
|
|
578
|
+
getToggleButtonText: () => string;
|
|
579
|
+
};
|
|
580
|
+
export declare const NavigationItemGroupVariantList: readonly ["popover", "tree"];
|
|
581
|
+
export type NavigationItemGroupVariantType = (typeof NavigationItemGroupVariantList)[number];
|
|
582
|
+
export type NavigationItemGroupVariant = {
|
|
583
|
+
variant?: NavigationItemGroupVariantType;
|
|
584
|
+
};
|
|
585
|
+
export type AdditionalInformationSlotProps = {
|
|
586
|
+
/**
|
|
587
|
+
* Slot to add additional information most likely a DBBadge
|
|
588
|
+
*/
|
|
589
|
+
additionalInformation?: any;
|
|
590
|
+
};
|
|
591
|
+
export type DocumentScrollState = {
|
|
592
|
+
_documentScrollListenerCallbackId?: string;
|
|
593
|
+
handleDocumentScroll: (event: any, parent?: HTMLElement) => void;
|
|
594
|
+
_observer?: IntersectionObserver;
|
|
595
|
+
};
|
|
596
|
+
export type PopoverState = {
|
|
597
|
+
handleEscape: (event: any) => void;
|
|
598
|
+
handleAutoPlacement: (parent?: HTMLElement) => void;
|
|
599
|
+
handleEnter: (parent?: HTMLElement) => void;
|
|
600
|
+
handleLeave: (event?: any) => void;
|
|
601
|
+
} & DocumentScrollState;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface DBDataOutsidePair {
|
|
2
|
+
vx?: 'left' | 'right';
|
|
3
|
+
vy?: 'top' | 'bottom';
|
|
4
|
+
}
|
|
5
|
+
export declare const handleDataOutside: (el: HTMLElement) => DBDataOutsidePair;
|
|
6
|
+
export declare const handleFixedDropdown: (element: HTMLElement, parent: HTMLElement, placement: string) => void;
|
|
7
|
+
export declare const getFloatingProps: (element: HTMLElement, parent: HTMLElement, placement: string) => {
|
|
8
|
+
top: number;
|
|
9
|
+
bottom: number;
|
|
10
|
+
right: number;
|
|
11
|
+
height: number;
|
|
12
|
+
width: number;
|
|
13
|
+
left: number;
|
|
14
|
+
childHeight: number;
|
|
15
|
+
childWidth: number;
|
|
16
|
+
correctedPlacement: string;
|
|
17
|
+
innerWidth: number;
|
|
18
|
+
innerHeight: number;
|
|
19
|
+
outsideYBoth?: undefined;
|
|
20
|
+
outsideXBoth?: undefined;
|
|
21
|
+
} | {
|
|
22
|
+
top: number;
|
|
23
|
+
bottom: number;
|
|
24
|
+
right: number;
|
|
25
|
+
height: number;
|
|
26
|
+
width: number;
|
|
27
|
+
left: number;
|
|
28
|
+
childHeight: number;
|
|
29
|
+
childWidth: number;
|
|
30
|
+
correctedPlacement: string;
|
|
31
|
+
innerWidth: number;
|
|
32
|
+
innerHeight: number;
|
|
33
|
+
outsideYBoth: boolean;
|
|
34
|
+
outsideXBoth: boolean;
|
|
35
|
+
};
|
|
36
|
+
export declare const handleFixedPopover: (element: HTMLElement, parent: HTMLElement, placement?: string) => void;
|