@db-ux/react-core-components 1.0.0-test-13b991d
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 +76 -0
- package/dist/components/accordion/accordion.d.ts +3 -0
- package/dist/components/accordion/accordion.js +92 -0
- package/dist/components/accordion/index.d.ts +1 -0
- package/dist/components/accordion/index.js +1 -0
- package/dist/components/accordion/model.d.ts +41 -0
- package/dist/components/accordion/model.js +2 -0
- package/dist/components/accordion-item/accordion-item.d.ts +8 -0
- package/dist/components/accordion-item/accordion-item.js +34 -0
- package/dist/components/accordion-item/index.d.ts +1 -0
- package/dist/components/accordion-item/index.js +1 -0
- package/dist/components/accordion-item/model.d.ts +24 -0
- package/dist/components/accordion-item/model.js +1 -0
- package/dist/components/badge/badge.d.ts +3 -0
- package/dist/components/badge/badge.js +32 -0
- package/dist/components/badge/index.d.ts +1 -0
- package/dist/components/badge/index.js +1 -0
- package/dist/components/badge/model.d.ts +16 -0
- package/dist/components/badge/model.js +1 -0
- package/dist/components/brand/brand.d.ts +3 -0
- package/dist/components/brand/brand.js +13 -0
- package/dist/components/brand/index.d.ts +1 -0
- package/dist/components/brand/index.js +1 -0
- package/dist/components/brand/model.d.ts +10 -0
- package/dist/components/brand/model.js +1 -0
- package/dist/components/button/button.d.ts +3 -0
- package/dist/components/button/button.js +16 -0
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/button/index.js +1 -0
- package/dist/components/button/model.d.ts +52 -0
- package/dist/components/button/model.js +3 -0
- package/dist/components/card/card.d.ts +3 -0
- package/dist/components/card/card.js +16 -0
- package/dist/components/card/index.d.ts +1 -0
- package/dist/components/card/index.js +1 -0
- package/dist/components/card/model.d.ts +18 -0
- package/dist/components/card/model.js +2 -0
- package/dist/components/checkbox/checkbox.d.ts +3 -0
- package/dist/components/checkbox/checkbox.js +112 -0
- package/dist/components/checkbox/index.d.ts +1 -0
- package/dist/components/checkbox/index.js +1 -0
- package/dist/components/checkbox/model.d.ts +10 -0
- package/dist/components/checkbox/model.js +1 -0
- package/dist/components/divider/divider.d.ts +3 -0
- package/dist/components/divider/divider.js +11 -0
- package/dist/components/divider/index.d.ts +1 -0
- package/dist/components/divider/index.js +1 -0
- package/dist/components/divider/model.d.ts +18 -0
- package/dist/components/divider/model.js +2 -0
- package/dist/components/drawer/drawer.d.ts +3 -0
- package/dist/components/drawer/drawer.js +70 -0
- package/dist/components/drawer/index.d.ts +1 -0
- package/dist/components/drawer/index.js +1 -0
- package/dist/components/drawer/model.d.ts +41 -0
- package/dist/components/drawer/model.js +3 -0
- package/dist/components/header/header.d.ts +3 -0
- package/dist/components/header/header.js +68 -0
- package/dist/components/header/index.d.ts +1 -0
- package/dist/components/header/index.js +1 -0
- package/dist/components/header/model.d.ts +44 -0
- package/dist/components/header/model.js +1 -0
- package/dist/components/icon/icon.d.ts +3 -0
- package/dist/components/icon/icon.js +11 -0
- package/dist/components/icon/index.d.ts +1 -0
- package/dist/components/icon/index.js +1 -0
- package/dist/components/icon/model.d.ts +12 -0
- package/dist/components/icon/model.js +2 -0
- package/dist/components/infotext/index.d.ts +1 -0
- package/dist/components/infotext/index.js +1 -0
- package/dist/components/infotext/infotext.d.ts +3 -0
- package/dist/components/infotext/infotext.js +12 -0
- package/dist/components/infotext/model.d.ts +5 -0
- package/dist/components/infotext/model.js +1 -0
- package/dist/components/input/index.d.ts +1 -0
- package/dist/components/input/index.js +1 -0
- package/dist/components/input/input.d.ts +3 -0
- package/dist/components/input/input.js +119 -0
- package/dist/components/input/model.d.ts +39 -0
- package/dist/components/input/model.js +5 -0
- package/dist/components/link/index.d.ts +1 -0
- package/dist/components/link/index.js +1 -0
- package/dist/components/link/link.d.ts +3 -0
- package/dist/components/link/link.js +17 -0
- package/dist/components/link/model.d.ts +24 -0
- package/dist/components/link/model.js +3 -0
- package/dist/components/navigation/index.d.ts +1 -0
- package/dist/components/navigation/index.js +1 -0
- package/dist/components/navigation/model.d.ts +5 -0
- package/dist/components/navigation/model.js +1 -0
- package/dist/components/navigation/navigation.d.ts +3 -0
- package/dist/components/navigation/navigation.js +17 -0
- package/dist/components/navigation-item/index.d.ts +1 -0
- package/dist/components/navigation-item/index.js +1 -0
- package/dist/components/navigation-item/model.d.ts +34 -0
- package/dist/components/navigation-item/model.js +1 -0
- package/dist/components/navigation-item/navigation-item.d.ts +3 -0
- package/dist/components/navigation-item/navigation-item.js +68 -0
- package/dist/components/notification/index.d.ts +1 -0
- package/dist/components/notification/index.js +1 -0
- package/dist/components/notification/model.d.ts +57 -0
- package/dist/components/notification/model.js +3 -0
- package/dist/components/notification/notification.d.ts +3 -0
- package/dist/components/notification/notification.js +25 -0
- package/dist/components/page/index.d.ts +1 -0
- package/dist/components/page/index.js +1 -0
- package/dist/components/page/model.d.ts +32 -0
- package/dist/components/page/model.js +2 -0
- package/dist/components/page/page.d.ts +3 -0
- package/dist/components/page/page.js +47 -0
- package/dist/components/popover/index.d.ts +1 -0
- package/dist/components/popover/index.js +1 -0
- package/dist/components/popover/model.d.ts +18 -0
- package/dist/components/popover/model.js +1 -0
- package/dist/components/popover/popover.d.ts +3 -0
- package/dist/components/popover/popover.js +74 -0
- package/dist/components/radio/index.d.ts +1 -0
- package/dist/components/radio/index.js +1 -0
- package/dist/components/radio/model.d.ts +7 -0
- package/dist/components/radio/model.js +1 -0
- package/dist/components/radio/radio.d.ts +3 -0
- package/dist/components/radio/radio.js +54 -0
- package/dist/components/section/index.d.ts +1 -0
- package/dist/components/section/index.js +1 -0
- package/dist/components/section/model.d.ts +5 -0
- package/dist/components/section/model.js +1 -0
- package/dist/components/section/section.d.ts +3 -0
- package/dist/components/section/section.js +16 -0
- package/dist/components/select/index.d.ts +1 -0
- package/dist/components/select/index.js +1 -0
- package/dist/components/select/model.d.ts +43 -0
- package/dist/components/select/model.js +1 -0
- package/dist/components/select/select.d.ts +3 -0
- package/dist/components/select/select.js +132 -0
- package/dist/components/stack/index.d.ts +1 -0
- package/dist/components/stack/index.js +1 -0
- package/dist/components/stack/model.d.ts +34 -0
- package/dist/components/stack/model.js +4 -0
- package/dist/components/stack/stack.d.ts +3 -0
- package/dist/components/stack/stack.js +11 -0
- package/dist/components/switch/index.d.ts +1 -0
- package/dist/components/switch/index.js +1 -0
- package/dist/components/switch/model.d.ts +12 -0
- package/dist/components/switch/model.js +1 -0
- package/dist/components/switch/switch.d.ts +3 -0
- package/dist/components/switch/switch.js +47 -0
- package/dist/components/tab-item/index.d.ts +1 -0
- package/dist/components/tab-item/index.js +1 -0
- package/dist/components/tab-item/model.d.ts +24 -0
- package/dist/components/tab-item/model.js +1 -0
- package/dist/components/tab-item/tab-item.d.ts +3 -0
- package/dist/components/tab-item/tab-item.js +37 -0
- package/dist/components/tab-list/index.d.ts +1 -0
- package/dist/components/tab-list/index.js +1 -0
- package/dist/components/tab-list/model.d.ts +5 -0
- package/dist/components/tab-list/model.js +1 -0
- package/dist/components/tab-list/tab-list.d.ts +3 -0
- package/dist/components/tab-list/tab-list.js +17 -0
- package/dist/components/tab-panel/index.d.ts +1 -0
- package/dist/components/tab-panel/index.js +1 -0
- package/dist/components/tab-panel/model.d.ts +10 -0
- package/dist/components/tab-panel/model.js +1 -0
- package/dist/components/tab-panel/tab-panel.d.ts +3 -0
- package/dist/components/tab-panel/tab-panel.js +14 -0
- package/dist/components/tabs/index.d.ts +1 -0
- package/dist/components/tabs/index.js +1 -0
- package/dist/components/tabs/model.d.ts +47 -0
- package/dist/components/tabs/model.js +2 -0
- package/dist/components/tabs/tabs.d.ts +3 -0
- package/dist/components/tabs/tabs.js +138 -0
- package/dist/components/tag/index.d.ts +1 -0
- package/dist/components/tag/index.js +1 -0
- package/dist/components/tag/model.d.ts +45 -0
- package/dist/components/tag/model.js +1 -0
- package/dist/components/tag/tag.d.ts +3 -0
- package/dist/components/tag/tag.js +46 -0
- package/dist/components/textarea/index.d.ts +1 -0
- package/dist/components/textarea/index.js +1 -0
- package/dist/components/textarea/model.d.ts +30 -0
- package/dist/components/textarea/model.js +2 -0
- package/dist/components/textarea/textarea.d.ts +3 -0
- package/dist/components/textarea/textarea.js +105 -0
- package/dist/components/tooltip/index.d.ts +1 -0
- package/dist/components/tooltip/index.js +1 -0
- package/dist/components/tooltip/model.d.ts +7 -0
- package/dist/components/tooltip/model.js +1 -0
- package/dist/components/tooltip/tooltip.d.ts +3 -0
- package/dist/components/tooltip/tooltip.js +43 -0
- package/dist/index.d.ts +36 -0
- package/dist/index.js +36 -0
- package/dist/shared/constants.d.ts +83 -0
- package/dist/shared/constants.js +87 -0
- package/dist/shared/model.d.ts +446 -0
- package/dist/shared/model.js +20 -0
- package/dist/utils/form-components.d.ts +2 -0
- package/dist/utils/form-components.js +10 -0
- package/dist/utils/index.d.ts +61 -0
- package/dist/utils/index.js +166 -0
- package/dist/utils/navigation.d.ts +32 -0
- package/dist/utils/navigation.js +136 -0
- package/package.json +43 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { useState, useRef, useEffect, forwardRef } from "react";
|
|
4
|
+
import { cls, getBooleanAsString, handleDataOutside, uuid, filterPassingProps, getRootProps } from "../../utils";
|
|
5
|
+
import { DEFAULT_ID } from "../../shared/constants";
|
|
6
|
+
function DBTooltipFn(props, component) {
|
|
7
|
+
var _a, _b;
|
|
8
|
+
const _ref = component || useRef(component);
|
|
9
|
+
const [_id, set_id] = useState(() => DEFAULT_ID);
|
|
10
|
+
const [initialized, setInitialized] = useState(() => false);
|
|
11
|
+
function handleClick(event) {
|
|
12
|
+
event.stopPropagation();
|
|
13
|
+
}
|
|
14
|
+
function handleAutoPlacement() {
|
|
15
|
+
if (_ref.current)
|
|
16
|
+
handleDataOutside(_ref.current);
|
|
17
|
+
}
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
set_id(props.id || "tooltip-" + uuid());
|
|
20
|
+
setInitialized(true);
|
|
21
|
+
}, []);
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
if (_ref.current && initialized && _id) {
|
|
24
|
+
let parent = _ref.current.parentElement;
|
|
25
|
+
if (parent && parent.localName.includes("tooltip")) {
|
|
26
|
+
// Angular workaround
|
|
27
|
+
parent = parent.parentElement;
|
|
28
|
+
}
|
|
29
|
+
if (parent) {
|
|
30
|
+
["mouseenter", "focus"].forEach((event) => {
|
|
31
|
+
parent.addEventListener(event, () => handleAutoPlacement());
|
|
32
|
+
});
|
|
33
|
+
parent.setAttribute("data-has-tooltip", "true");
|
|
34
|
+
parent.setAttribute("aria-describedby", _id);
|
|
35
|
+
}
|
|
36
|
+
setInitialized(false);
|
|
37
|
+
}
|
|
38
|
+
}, [_ref.current, initialized]);
|
|
39
|
+
return (React.createElement("i", Object.assign({ role: "tooltip", "aria-hidden": "true", "data-gap": "true", 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"]), getRootProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font"]), { className: cls("db-tooltip", props.className), id: _id, "data-emphasis": props.emphasis, "data-animation": getBooleanAsString((_a = props.animation) !== null && _a !== void 0 ? _a : true), "data-delay": props.delay, "data-width": props.width, "data-show-arrow": getBooleanAsString((_b = props.showArrow) !== null && _b !== void 0 ? _b : true), "data-placement": props.placement, onClick: (event) => handleClick(event) }), props.children));
|
|
40
|
+
}
|
|
41
|
+
const DBTooltip = forwardRef(DBTooltipFn);
|
|
42
|
+
DBTooltip.defaultProps = {};
|
|
43
|
+
export default DBTooltip;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export * from './components/notification';
|
|
2
|
+
export * from './components/badge';
|
|
3
|
+
export * from './components/brand';
|
|
4
|
+
export * from './components/button';
|
|
5
|
+
export * from './components/card';
|
|
6
|
+
export * from './components/checkbox';
|
|
7
|
+
export * from './components/divider';
|
|
8
|
+
export * from './components/drawer';
|
|
9
|
+
export * from './components/header';
|
|
10
|
+
export * from './components/icon';
|
|
11
|
+
export * from './components/infotext';
|
|
12
|
+
export * from './components/input';
|
|
13
|
+
export * from './components/link';
|
|
14
|
+
export * from './components/page';
|
|
15
|
+
export * from './components/radio';
|
|
16
|
+
export * from './components/section';
|
|
17
|
+
export * from './components/select';
|
|
18
|
+
export * from './components/switch';
|
|
19
|
+
export * from './components/tab-item';
|
|
20
|
+
export * from './components/tag';
|
|
21
|
+
export * from './components/textarea';
|
|
22
|
+
export * from './components/navigation-item';
|
|
23
|
+
export * from './components/accordion';
|
|
24
|
+
export * from './components/accordion-item';
|
|
25
|
+
export * from './components/navigation';
|
|
26
|
+
export * from './components/badge';
|
|
27
|
+
export * from './components/popover';
|
|
28
|
+
export * from './components/tooltip';
|
|
29
|
+
export * from './components/tab-list';
|
|
30
|
+
export * from './components/tabs';
|
|
31
|
+
export * from './components/tab-panel';
|
|
32
|
+
export * from './shared/constants';
|
|
33
|
+
export * from './shared/model';
|
|
34
|
+
export * from './utils/index';
|
|
35
|
+
export * from './utils/navigation';
|
|
36
|
+
export * from './components/stack';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export * from './components/notification';
|
|
2
|
+
export * from './components/badge';
|
|
3
|
+
export * from './components/brand';
|
|
4
|
+
export * from './components/button';
|
|
5
|
+
export * from './components/card';
|
|
6
|
+
export * from './components/checkbox';
|
|
7
|
+
export * from './components/divider';
|
|
8
|
+
export * from './components/drawer';
|
|
9
|
+
export * from './components/header';
|
|
10
|
+
export * from './components/icon';
|
|
11
|
+
export * from './components/infotext';
|
|
12
|
+
export * from './components/input';
|
|
13
|
+
export * from './components/link';
|
|
14
|
+
export * from './components/page';
|
|
15
|
+
export * from './components/radio';
|
|
16
|
+
export * from './components/section';
|
|
17
|
+
export * from './components/select';
|
|
18
|
+
export * from './components/switch';
|
|
19
|
+
export * from './components/tab-item';
|
|
20
|
+
export * from './components/tag';
|
|
21
|
+
export * from './components/textarea';
|
|
22
|
+
export * from './components/navigation-item';
|
|
23
|
+
export * from './components/accordion';
|
|
24
|
+
export * from './components/accordion-item';
|
|
25
|
+
export * from './components/navigation';
|
|
26
|
+
export * from './components/badge';
|
|
27
|
+
export * from './components/popover';
|
|
28
|
+
export * from './components/tooltip';
|
|
29
|
+
export * from './components/tab-list';
|
|
30
|
+
export * from './components/tabs';
|
|
31
|
+
export * from './components/tab-panel';
|
|
32
|
+
export * from './shared/constants';
|
|
33
|
+
export * from './shared/model';
|
|
34
|
+
export * from './utils/index';
|
|
35
|
+
export * from './utils/navigation';
|
|
36
|
+
export * from './components/stack';
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
export declare const DEFAULT_ID: string;
|
|
2
|
+
export declare const DEFAULT_LABEL: string;
|
|
3
|
+
export declare const DEFAULT_PLACEHOLDER: string;
|
|
4
|
+
export declare const DEFAULT_MESSAGE_ID_SUFFIX: string;
|
|
5
|
+
export declare const DEFAULT_VALID_MESSAGE_ID_SUFFIX: string;
|
|
6
|
+
export declare const DEFAULT_INVALID_MESSAGE_ID_SUFFIX: string;
|
|
7
|
+
export declare const DEFAULT_PLACEHOLDER_ID_SUFFIX: string;
|
|
8
|
+
export declare const DEFAULT_DATALIST_ID_SUFFIX: string;
|
|
9
|
+
export declare const DEFAULT_VALID_MESSAGE: string;
|
|
10
|
+
export declare const DEFAULT_INVALID_MESSAGE: string;
|
|
11
|
+
export declare const DEFAULT_BACK: string;
|
|
12
|
+
export declare const DEFAULT_BURGER_MENU: string;
|
|
13
|
+
export declare const DEFAULT_ICON: string;
|
|
14
|
+
export declare const DEFAULT_ROWS: number;
|
|
15
|
+
export declare const DEFAULT_CLOSE_BUTTON: string;
|
|
16
|
+
export declare const DENSITY_CONST: string;
|
|
17
|
+
export declare const COLOR_CONST: string;
|
|
18
|
+
export declare enum DENSITY {
|
|
19
|
+
'FUNCTIONAL' = "functional",
|
|
20
|
+
'REGULAR' = "regular",
|
|
21
|
+
'EXPRESSIVE' = "expressive"
|
|
22
|
+
}
|
|
23
|
+
export declare const DENSITIES: DENSITY[];
|
|
24
|
+
export declare enum COLOR_SIMPLE {
|
|
25
|
+
'PRIMARY' = "primary"
|
|
26
|
+
}
|
|
27
|
+
export declare enum COLOR {
|
|
28
|
+
'NEUTRAL_BG_LEVEL_1' = "neutral-bg-basic-level-1",
|
|
29
|
+
'NEUTRAL_BG_LEVEL_2' = "neutral-bg-basic-level-2",
|
|
30
|
+
'NEUTRAL_BG_LEVEL_3' = "neutral-bg-basic-level-3",
|
|
31
|
+
'NEUTRAL_BG_TRANSPARENT_SEMI' = "neutral-bg-basic-transparent-semi",
|
|
32
|
+
'NEUTRAL_BG_TRANSPARENT_FULL' = "neutral-bg-basic-transparent-full",
|
|
33
|
+
'BRAND_BG_LEVEL_1' = "brand-bg-basic-level-1",
|
|
34
|
+
'BRAND_BG_LEVEL_2' = "brand-bg-basic-level-2",
|
|
35
|
+
'BRAND_BG_LEVEL_3' = "brand-bg-basic-level-3",
|
|
36
|
+
'BRAND_BG_TRANSPARENT_SEMI' = "brand-bg-basic-transparent-semi",
|
|
37
|
+
'BRAND_BG_TRANSPARENT_FULL' = "brand-bg-basic-transparent-full",
|
|
38
|
+
'SUCCESSFUL_BG_LEVEL_1' = "successful-bg-basic-level-1",
|
|
39
|
+
'SUCCESSFUL_BG_LEVEL_2' = "successful-bg-basic-level-2",
|
|
40
|
+
'SUCCESSFUL_BG_LEVEL_3' = "successful-bg-basic-level-3",
|
|
41
|
+
'SUCCESSFUL_BG_TRANSPARENT_SEMI' = "successful-bg-basic-transparent-semi",
|
|
42
|
+
'SUCCESSFUL_BG_TRANSPARENT_FULL' = "successful-bg-basic-transparent-full",
|
|
43
|
+
'CRITICAL_BG_LEVEL_1' = "critical-bg-basic-level-1",
|
|
44
|
+
'CRITICAL_BG_LEVEL_2' = "critical-bg-basic-level-2",
|
|
45
|
+
'CRITICAL_BG_LEVEL_3' = "critical-bg-basic-level-3",
|
|
46
|
+
'CRITICAL_BG_TRANSPARENT_SEMI' = "critical-bg-basic-transparent-semi",
|
|
47
|
+
'CRITICAL_BG_TRANSPARENT_Full' = "critical-bg-basic-transparent-full",
|
|
48
|
+
'WARNING_BG_LEVEL_1' = "warning-bg-basic-level-1",
|
|
49
|
+
'WARNING_BG_LEVEL_2' = "warning-bg-basic-level-2",
|
|
50
|
+
'WARNING_BG_LEVEL_3' = "warning-bg-basic-level-3",
|
|
51
|
+
'WARNING_BG_TRANSPARENT_SEMI' = "warning-bg-basic-transparent-semi",
|
|
52
|
+
'WARNING_BG_TRANSPARENT_FULL' = "warning-bg-basic-transparent-full",
|
|
53
|
+
'INFORMATIONAL_BG_LEVEL_1' = "informational-bg-basic-level-1",
|
|
54
|
+
'INFORMATIONAL_BG_LEVEL_2' = "informational-bg-basic-level-2",
|
|
55
|
+
'INFORMATIONAL_BG_LEVEL_3' = "informational-bg-basic-level-3",
|
|
56
|
+
'INFORMATIONAL_BG_TRANSPARENT_SEMI' = "informational-bg-basic-transparent-semi",
|
|
57
|
+
'INFORMATIONAL_BG_TRANSPARENT_FULL' = "informational-bg-basic-transparent-full"
|
|
58
|
+
}
|
|
59
|
+
export declare const COLORS: COLOR[];
|
|
60
|
+
export declare const COLORS_SIMPLE: COLOR_SIMPLE[];
|
|
61
|
+
export declare enum SEMANTIC {
|
|
62
|
+
'CRITICAL' = "critical",
|
|
63
|
+
'INFORMATIONAL' = "informational",
|
|
64
|
+
'WARNING' = "warning",
|
|
65
|
+
'SUCCESSFUL' = "successful"
|
|
66
|
+
}
|
|
67
|
+
export declare const SEMANTICS: SEMANTIC[];
|
|
68
|
+
export declare const DEFAULT_VIEWPORT: {
|
|
69
|
+
width: number;
|
|
70
|
+
height: number;
|
|
71
|
+
};
|
|
72
|
+
export declare const DESKTOP_VIEWPORT: {
|
|
73
|
+
width: number;
|
|
74
|
+
height: number;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Use those viewports if your component has a css media-query otherwise use the DEFAULT_VIEWPORT
|
|
78
|
+
*/
|
|
79
|
+
export declare const TESTING_VIEWPORTS: {
|
|
80
|
+
width: number;
|
|
81
|
+
height: number;
|
|
82
|
+
name: string;
|
|
83
|
+
}[];
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
export const DEFAULT_ID = 'OVERWRITE_DEFAULT_ID';
|
|
2
|
+
export const DEFAULT_LABEL = 'LABEL SHOULD BE SET';
|
|
3
|
+
export const DEFAULT_PLACEHOLDER = ' ';
|
|
4
|
+
export const DEFAULT_MESSAGE_ID_SUFFIX = '-message';
|
|
5
|
+
export const DEFAULT_VALID_MESSAGE_ID_SUFFIX = '-valid-message';
|
|
6
|
+
export const DEFAULT_INVALID_MESSAGE_ID_SUFFIX = '-invalid-message';
|
|
7
|
+
export const DEFAULT_PLACEHOLDER_ID_SUFFIX = '-placeholder';
|
|
8
|
+
export const DEFAULT_DATALIST_ID_SUFFIX = '-datalist';
|
|
9
|
+
export const DEFAULT_VALID_MESSAGE = 'TODO: Add a validMessage';
|
|
10
|
+
export const DEFAULT_INVALID_MESSAGE = 'TODO: Add an invalidMessage';
|
|
11
|
+
export const DEFAULT_BACK = 'Back';
|
|
12
|
+
export const DEFAULT_BURGER_MENU = 'BurgerMenu';
|
|
13
|
+
export const DEFAULT_ICON = 'brand';
|
|
14
|
+
export const DEFAULT_ROWS = 4;
|
|
15
|
+
export const DEFAULT_CLOSE_BUTTON = 'Close Button';
|
|
16
|
+
export const DENSITY_CONST = 'density';
|
|
17
|
+
export const COLOR_CONST = 'color';
|
|
18
|
+
export var DENSITY;
|
|
19
|
+
(function (DENSITY) {
|
|
20
|
+
DENSITY["FUNCTIONAL"] = "functional";
|
|
21
|
+
DENSITY["REGULAR"] = "regular";
|
|
22
|
+
DENSITY["EXPRESSIVE"] = "expressive";
|
|
23
|
+
})(DENSITY || (DENSITY = {}));
|
|
24
|
+
export const DENSITIES = Object.entries(DENSITY).map(([, value]) => value);
|
|
25
|
+
export var COLOR_SIMPLE;
|
|
26
|
+
(function (COLOR_SIMPLE) {
|
|
27
|
+
COLOR_SIMPLE["PRIMARY"] = "primary";
|
|
28
|
+
})(COLOR_SIMPLE || (COLOR_SIMPLE = {}));
|
|
29
|
+
export var COLOR;
|
|
30
|
+
(function (COLOR) {
|
|
31
|
+
COLOR["NEUTRAL_BG_LEVEL_1"] = "neutral-bg-basic-level-1";
|
|
32
|
+
COLOR["NEUTRAL_BG_LEVEL_2"] = "neutral-bg-basic-level-2";
|
|
33
|
+
COLOR["NEUTRAL_BG_LEVEL_3"] = "neutral-bg-basic-level-3";
|
|
34
|
+
COLOR["NEUTRAL_BG_TRANSPARENT_SEMI"] = "neutral-bg-basic-transparent-semi";
|
|
35
|
+
COLOR["NEUTRAL_BG_TRANSPARENT_FULL"] = "neutral-bg-basic-transparent-full";
|
|
36
|
+
COLOR["BRAND_BG_LEVEL_1"] = "brand-bg-basic-level-1";
|
|
37
|
+
COLOR["BRAND_BG_LEVEL_2"] = "brand-bg-basic-level-2";
|
|
38
|
+
COLOR["BRAND_BG_LEVEL_3"] = "brand-bg-basic-level-3";
|
|
39
|
+
COLOR["BRAND_BG_TRANSPARENT_SEMI"] = "brand-bg-basic-transparent-semi";
|
|
40
|
+
COLOR["BRAND_BG_TRANSPARENT_FULL"] = "brand-bg-basic-transparent-full";
|
|
41
|
+
COLOR["SUCCESSFUL_BG_LEVEL_1"] = "successful-bg-basic-level-1";
|
|
42
|
+
COLOR["SUCCESSFUL_BG_LEVEL_2"] = "successful-bg-basic-level-2";
|
|
43
|
+
COLOR["SUCCESSFUL_BG_LEVEL_3"] = "successful-bg-basic-level-3";
|
|
44
|
+
COLOR["SUCCESSFUL_BG_TRANSPARENT_SEMI"] = "successful-bg-basic-transparent-semi";
|
|
45
|
+
COLOR["SUCCESSFUL_BG_TRANSPARENT_FULL"] = "successful-bg-basic-transparent-full";
|
|
46
|
+
COLOR["CRITICAL_BG_LEVEL_1"] = "critical-bg-basic-level-1";
|
|
47
|
+
COLOR["CRITICAL_BG_LEVEL_2"] = "critical-bg-basic-level-2";
|
|
48
|
+
COLOR["CRITICAL_BG_LEVEL_3"] = "critical-bg-basic-level-3";
|
|
49
|
+
COLOR["CRITICAL_BG_TRANSPARENT_SEMI"] = "critical-bg-basic-transparent-semi";
|
|
50
|
+
COLOR["CRITICAL_BG_TRANSPARENT_Full"] = "critical-bg-basic-transparent-full";
|
|
51
|
+
COLOR["WARNING_BG_LEVEL_1"] = "warning-bg-basic-level-1";
|
|
52
|
+
COLOR["WARNING_BG_LEVEL_2"] = "warning-bg-basic-level-2";
|
|
53
|
+
COLOR["WARNING_BG_LEVEL_3"] = "warning-bg-basic-level-3";
|
|
54
|
+
COLOR["WARNING_BG_TRANSPARENT_SEMI"] = "warning-bg-basic-transparent-semi";
|
|
55
|
+
COLOR["WARNING_BG_TRANSPARENT_FULL"] = "warning-bg-basic-transparent-full";
|
|
56
|
+
COLOR["INFORMATIONAL_BG_LEVEL_1"] = "informational-bg-basic-level-1";
|
|
57
|
+
COLOR["INFORMATIONAL_BG_LEVEL_2"] = "informational-bg-basic-level-2";
|
|
58
|
+
COLOR["INFORMATIONAL_BG_LEVEL_3"] = "informational-bg-basic-level-3";
|
|
59
|
+
COLOR["INFORMATIONAL_BG_TRANSPARENT_SEMI"] = "informational-bg-basic-transparent-semi";
|
|
60
|
+
COLOR["INFORMATIONAL_BG_TRANSPARENT_FULL"] = "informational-bg-basic-transparent-full";
|
|
61
|
+
})(COLOR || (COLOR = {}));
|
|
62
|
+
export const COLORS = Object.entries(COLOR).map(([, value]) => value);
|
|
63
|
+
export const COLORS_SIMPLE = Object.entries(COLOR_SIMPLE).map(([, value]) => value);
|
|
64
|
+
export var SEMANTIC;
|
|
65
|
+
(function (SEMANTIC) {
|
|
66
|
+
SEMANTIC["CRITICAL"] = "critical";
|
|
67
|
+
SEMANTIC["INFORMATIONAL"] = "informational";
|
|
68
|
+
SEMANTIC["WARNING"] = "warning";
|
|
69
|
+
SEMANTIC["SUCCESSFUL"] = "successful";
|
|
70
|
+
})(SEMANTIC || (SEMANTIC = {}));
|
|
71
|
+
export const SEMANTICS = Object.entries(SEMANTIC).map(([, value]) => value);
|
|
72
|
+
export const DEFAULT_VIEWPORT = {
|
|
73
|
+
width: 390,
|
|
74
|
+
height: 884
|
|
75
|
+
};
|
|
76
|
+
export const DESKTOP_VIEWPORT = {
|
|
77
|
+
width: 1920,
|
|
78
|
+
height: 1280
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Use those viewports if your component has a css media-query otherwise use the DEFAULT_VIEWPORT
|
|
82
|
+
*/
|
|
83
|
+
export const TESTING_VIEWPORTS = [Object.assign({ name: 'desktop' }, DESKTOP_VIEWPORT), {
|
|
84
|
+
name: 'tablet',
|
|
85
|
+
width: 768,
|
|
86
|
+
height: 1024
|
|
87
|
+
}, Object.assign({ name: 'mobile' }, DEFAULT_VIEWPORT)];
|