@db-ux/react-core-components 4.9.1 → 4.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -1
- package/README.md +97 -35
- package/dist/components/accordion/accordion.js +102 -86
- package/dist/components/accordion/model.js +4 -2
- package/dist/components/accordion-item/accordion-item.d.ts +2 -1
- package/dist/components/accordion-item/accordion-item.js +89 -56
- package/dist/components/accordion-item/model.d.ts +4 -0
- package/dist/components/badge/badge.js +72 -32
- package/dist/components/badge/model.js +12 -1
- package/dist/components/brand/brand.js +60 -13
- package/dist/components/button/button.js +75 -21
- package/dist/components/button/model.js +13 -2
- package/dist/components/card/card.js +65 -15
- package/dist/components/card/model.js +8 -2
- package/dist/components/checkbox/checkbox.js +163 -157
- package/dist/components/custom-button/custom-button.js +65 -10
- package/dist/components/custom-select/custom-select.js +509 -727
- package/dist/components/custom-select/model.js +8 -1
- package/dist/components/custom-select-dropdown/custom-select-dropdown.js +62 -11
- package/dist/components/custom-select-dropdown/model.js +8 -1
- package/dist/components/custom-select-form-field/custom-select-form-field.js +57 -10
- package/dist/components/custom-select-list/custom-select-list.js +60 -11
- package/dist/components/custom-select-list-item/custom-select-list-item.js +89 -32
- package/dist/components/custom-select-list-item/model.js +4 -1
- package/dist/components/divider/divider.js +60 -10
- package/dist/components/divider/model.js +4 -2
- package/dist/components/drawer/drawer.js +118 -97
- package/dist/components/drawer/model.js +14 -4
- package/dist/components/header/header.js +143 -65
- package/dist/components/icon/icon.js +61 -12
- package/dist/components/icon/model.js +11 -1
- package/dist/components/infotext/infotext.js +62 -12
- package/dist/components/input/input.js +198 -167
- package/dist/components/input/model.js +21 -5
- package/dist/components/link/link.js +70 -12
- package/dist/components/link/model.js +8 -3
- package/dist/components/navigation/navigation.js +57 -11
- package/dist/components/navigation-item/model.d.ts +4 -0
- package/dist/components/navigation-item/navigation-item.js +117 -81
- package/dist/components/notification/model.js +12 -3
- package/dist/components/notification/notification.js +100 -32
- package/dist/components/page/model.js +4 -2
- package/dist/components/page/page.js +74 -46
- package/dist/components/popover/popover.js +126 -125
- package/dist/components/radio/radio.js +124 -85
- package/dist/components/section/section.js +59 -10
- package/dist/components/select/select.js +188 -191
- package/dist/components/stack/model.js +14 -4
- package/dist/components/stack/stack.js +63 -10
- package/dist/components/switch/switch.js +182 -150
- package/dist/components/tab-item/tab-item.js +105 -76
- package/dist/components/tab-list/tab-list.js +60 -11
- package/dist/components/tab-panel/tab-panel.js +59 -13
- package/dist/components/tabs/model.js +4 -2
- package/dist/components/tabs/tabs.js +191 -178
- package/dist/components/tag/model.js +4 -1
- package/dist/components/tag/tag.js +91 -32
- package/dist/components/textarea/model.js +13 -2
- package/dist/components/textarea/textarea.js +165 -150
- package/dist/components/tooltip/model.js +4 -1
- package/dist/components/tooltip/tooltip.js +119 -115
- package/dist/index.js +64 -81
- package/dist/shared/constants.js +32 -94
- package/dist/shared/figma.d.ts +12 -6
- package/dist/shared/model.js +73 -22
- package/dist/utils/document-click-listener.js +26 -29
- package/dist/utils/document-scroll-listener.js +30 -38
- package/dist/utils/floating-components.js +107 -358
- package/dist/utils/form-components.js +34 -60
- package/dist/utils/index.js +49 -167
- package/dist/utils/navigation.js +68 -135
- package/dist/utils/react.js +10 -15
- package/package.json +11 -8
- package/dist/components/accordion/index.js +0 -1
- package/dist/components/accordion-item/index.js +0 -1
- package/dist/components/accordion-item/model.js +0 -1
- package/dist/components/badge/index.js +0 -1
- package/dist/components/brand/index.js +0 -1
- package/dist/components/brand/model.js +0 -1
- package/dist/components/button/index.js +0 -1
- package/dist/components/card/index.js +0 -1
- package/dist/components/checkbox/index.js +0 -1
- package/dist/components/checkbox/model.js +0 -1
- package/dist/components/custom-button/index.js +0 -1
- package/dist/components/custom-button/model.js +0 -1
- package/dist/components/custom-select/index.js +0 -1
- package/dist/components/custom-select-dropdown/index.js +0 -1
- package/dist/components/custom-select-form-field/index.js +0 -1
- package/dist/components/custom-select-form-field/model.js +0 -1
- package/dist/components/custom-select-list/index.js +0 -1
- package/dist/components/custom-select-list/model.js +0 -1
- package/dist/components/custom-select-list-item/index.js +0 -1
- package/dist/components/divider/index.js +0 -1
- package/dist/components/drawer/index.js +0 -1
- package/dist/components/header/index.js +0 -1
- package/dist/components/header/model.js +0 -1
- package/dist/components/icon/index.js +0 -1
- package/dist/components/infotext/index.js +0 -1
- package/dist/components/infotext/model.js +0 -1
- package/dist/components/input/index.js +0 -1
- package/dist/components/link/index.js +0 -1
- package/dist/components/navigation/index.js +0 -1
- package/dist/components/navigation/model.js +0 -1
- package/dist/components/navigation-item/index.js +0 -1
- package/dist/components/navigation-item/model.js +0 -1
- package/dist/components/notification/index.js +0 -1
- package/dist/components/page/index.js +0 -1
- package/dist/components/popover/index.js +0 -1
- package/dist/components/popover/model.js +0 -1
- package/dist/components/radio/index.js +0 -1
- package/dist/components/radio/model.js +0 -1
- package/dist/components/section/index.js +0 -1
- package/dist/components/section/model.js +0 -1
- package/dist/components/select/index.js +0 -1
- package/dist/components/select/model.js +0 -1
- package/dist/components/stack/index.js +0 -1
- package/dist/components/switch/index.js +0 -1
- package/dist/components/switch/model.js +0 -1
- package/dist/components/tab-item/index.js +0 -1
- package/dist/components/tab-item/model.js +0 -1
- package/dist/components/tab-list/index.js +0 -1
- package/dist/components/tab-list/model.js +0 -1
- package/dist/components/tab-panel/index.js +0 -1
- package/dist/components/tab-panel/model.js +0 -1
- package/dist/components/tabs/index.js +0 -1
- package/dist/components/tag/index.js +0 -1
- package/dist/components/textarea/index.js +0 -1
- package/dist/components/tooltip/index.js +0 -1
- package/dist/shared/examples/index.js +0 -4
- package/dist/shared/figma.js +0 -1
- package/dist/shared/showcase/show-code-link.js +0 -51
package/dist/index.js
CHANGED
|
@@ -1,81 +1,64 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
export
|
|
65
|
-
export * from './components/tab-panel';
|
|
66
|
-
export * from './components/tab-panel/model';
|
|
67
|
-
export * from './components/tabs';
|
|
68
|
-
export * from './components/tabs/model';
|
|
69
|
-
export * from './components/tag';
|
|
70
|
-
export * from './components/tag/model';
|
|
71
|
-
export * from './components/textarea';
|
|
72
|
-
export * from './components/textarea/model';
|
|
73
|
-
export * from './components/tooltip';
|
|
74
|
-
export * from './components/tooltip/model';
|
|
75
|
-
export * from './shared/constants';
|
|
76
|
-
export * from './shared/model';
|
|
77
|
-
export * from './utils/document-click-listener';
|
|
78
|
-
export * from './utils/document-scroll-listener';
|
|
79
|
-
export * from './utils/floating-components';
|
|
80
|
-
export * from './utils/index';
|
|
81
|
-
export * from './utils/navigation';
|
|
1
|
+
import { addAttributeToChildren as e, cls as t, delay as n, getBoolean as r, getBooleanAsString as i, getHideProp as a, getInputValue as o, getNotificationRole as s, getNumber as c, getOptionKey as l, getSearchInput as u, getStep as d, hasVoiceOver as f, isArrayOfStrings as p, isIOSSafari as m, isKeyboardEvent as h, stringPropVisible as g, uuid as _ } from "./utils/index.js";
|
|
2
|
+
import v from "./components/accordion-item/accordion-item.js";
|
|
3
|
+
import y from "./components/accordion/accordion.js";
|
|
4
|
+
import { AccordionBehaviorList as b, AccordionVariantList as x } from "./components/accordion/model.js";
|
|
5
|
+
import { COLOR as S, COLORS as C, COLORS_SIMPLE as w, COLOR_CONST as T, COLOR_SIMPLE as E, DB_UX_LOCAL_STORAGE_FRAMEWORK as D, DB_UX_LOCAL_STORAGE_MODE as O, DEFAULT_BACK as k, DEFAULT_BURGER_MENU as A, DEFAULT_CLOSE_BUTTON as j, DEFAULT_DATALIST_ID_SUFFIX as M, DEFAULT_ICON as N, DEFAULT_ID as P, DEFAULT_INVALID_MESSAGE as F, DEFAULT_INVALID_MESSAGE_ID_SUFFIX as I, DEFAULT_LABEL as L, DEFAULT_LABEL_ID_SUFFIX as R, DEFAULT_MESSAGE as z, DEFAULT_MESSAGE_ID_SUFFIX as B, DEFAULT_PLACEHOLDER as V, DEFAULT_PLACEHOLDER_ID_SUFFIX as H, DEFAULT_REMOVE as U, DEFAULT_ROWS as W, DEFAULT_SELECTED as G, DEFAULT_SELECT_ID_SUFFIX as K, DEFAULT_VALID_MESSAGE as q, DEFAULT_VALID_MESSAGE_ID_SUFFIX as J, DEFAULT_VIEWPORT as Y, DENSITIES as X, DENSITY as Z, DENSITY_CONST as Q, DESKTOP_VIEWPORT as $, SEMANTIC as ee, SEMANTICS as te, TESTING_VIEWPORTS as ne } from "./shared/constants.js";
|
|
6
|
+
import re from "./components/badge/badge.js";
|
|
7
|
+
import { BadgePlacementList as ie } from "./components/badge/model.js";
|
|
8
|
+
import ae from "./components/brand/brand.js";
|
|
9
|
+
import oe from "./components/button/button.js";
|
|
10
|
+
import { ButtonTypeList as se, ButtonVariantList as ce } from "./components/button/model.js";
|
|
11
|
+
import le from "./components/card/card.js";
|
|
12
|
+
import { CardBehaviorList as ue, CardElevationLevelList as de } from "./components/card/model.js";
|
|
13
|
+
import fe from "./components/infotext/infotext.js";
|
|
14
|
+
import pe from "./components/checkbox/checkbox.js";
|
|
15
|
+
import me from "./components/custom-button/custom-button.js";
|
|
16
|
+
import { DocumentClickListener as he } from "./utils/document-click-listener.js";
|
|
17
|
+
import { DocumentScrollListener as ge } from "./utils/document-scroll-listener.js";
|
|
18
|
+
import { getFloatingProps as _e, handleDataOutside as ve, handleFixedDropdown as ye, handleFixedPopover as be } from "./utils/floating-components.js";
|
|
19
|
+
import xe from "./components/custom-select-dropdown/custom-select-dropdown.js";
|
|
20
|
+
import Se from "./components/custom-select-list-item/custom-select-list-item.js";
|
|
21
|
+
import Ce from "./components/custom-select-list/custom-select-list.js";
|
|
22
|
+
import we from "./components/input/input.js";
|
|
23
|
+
import Te from "./components/tooltip/tooltip.js";
|
|
24
|
+
import Ee from "./components/tag/tag.js";
|
|
25
|
+
import De from "./components/custom-select/custom-select.js";
|
|
26
|
+
import { CustomSelectDropdownWidthList as Oe } from "./components/custom-select-dropdown/model.js";
|
|
27
|
+
import ke from "./components/custom-select-form-field/custom-select-form-field.js";
|
|
28
|
+
import { CustomSelectListItemTypeList as Ae } from "./components/custom-select-list-item/model.js";
|
|
29
|
+
import { SelectedTypeList as je } from "./components/custom-select/model.js";
|
|
30
|
+
import Me from "./components/divider/divider.js";
|
|
31
|
+
import { DividerMarginList as Ne, DividerVariantList as Pe } from "./components/divider/model.js";
|
|
32
|
+
import Fe from "./components/drawer/drawer.js";
|
|
33
|
+
import { DrawerBackdropList as Ie, DrawerDirectionList as Le, DrawerPositionList as Re, DrawerVariantList as ze } from "./components/drawer/model.js";
|
|
34
|
+
import { NavigationItemSafeTriangle as Be, isEventTargetNavigationItem as Ve } from "./utils/navigation.js";
|
|
35
|
+
import He from "./components/header/header.js";
|
|
36
|
+
import Ue from "./components/icon/icon.js";
|
|
37
|
+
import { IconWeightList as We } from "./components/icon/model.js";
|
|
38
|
+
import { InputTypeList as Ge } from "./components/input/model.js";
|
|
39
|
+
import Ke from "./components/link/link.js";
|
|
40
|
+
import { LinkContentList as qe, LinkSizeList as Je, LinkVariantList as Ye } from "./components/link/model.js";
|
|
41
|
+
import Xe from "./components/navigation/navigation.js";
|
|
42
|
+
import Ze from "./components/navigation-item/navigation-item.js";
|
|
43
|
+
import Qe from "./components/notification/notification.js";
|
|
44
|
+
import { NotificationAriaLiveList as $e, NotificationLinkVariantList as et, NotificationVariantList as tt } from "./components/notification/model.js";
|
|
45
|
+
import nt from "./components/page/page.js";
|
|
46
|
+
import { PageDocumentOverflowList as rt, PageVariantList as it } from "./components/page/model.js";
|
|
47
|
+
import at from "./components/popover/popover.js";
|
|
48
|
+
import ot from "./components/radio/radio.js";
|
|
49
|
+
import st from "./components/section/section.js";
|
|
50
|
+
import ct from "./components/select/select.js";
|
|
51
|
+
import lt from "./components/stack/stack.js";
|
|
52
|
+
import { StackAlignmentList as ut, StackDirectionList as dt, StackJustifyContentList as ft, StackVariantList as pt } from "./components/stack/model.js";
|
|
53
|
+
import mt from "./components/switch/switch.js";
|
|
54
|
+
import ht from "./components/tab-item/tab-item.js";
|
|
55
|
+
import gt from "./components/tab-list/tab-list.js";
|
|
56
|
+
import _t from "./components/tab-panel/tab-panel.js";
|
|
57
|
+
import vt from "./components/tabs/tabs.js";
|
|
58
|
+
import { TabsBehaviorList as yt, TabsInitialSelectedModeList as bt } from "./components/tabs/model.js";
|
|
59
|
+
import { TagBehaviorList as xt } from "./components/tag/model.js";
|
|
60
|
+
import St from "./components/textarea/textarea.js";
|
|
61
|
+
import { TextareaResizeList as Ct, TextareaWrapList as wt } from "./components/textarea/model.js";
|
|
62
|
+
import { TooltipVariantList as Tt } from "./components/tooltip/model.js";
|
|
63
|
+
import { AlignmentList as Et, AutoCompleteList as Dt, EmphasisList as Ot, FieldSizingList as kt, GapSpacingList as At, LabelVariantHorizontalList as jt, LabelVariantList as Mt, LinkReferrerPolicyList as Nt, LinkTargetList as Pt, MarginList as Ft, MaxWidthList as It, OrientationList as Lt, PlacementHorizontalList as Rt, PlacementList as zt, PlacementVerticalList as Bt, PopoverDelayList as Vt, PopoverWidthList as Ht, SemanticList as Ut, SizeList as Wt, SpacingList as Gt, ValidationList as Kt, WidthList as qt } from "./shared/model.js";
|
|
64
|
+
export { b as AccordionBehaviorList, x as AccordionVariantList, Et as AlignmentList, Dt as AutoCompleteList, ie as BadgePlacementList, se as ButtonTypeList, ce as ButtonVariantList, S as COLOR, C as COLORS, w as COLORS_SIMPLE, T as COLOR_CONST, E as COLOR_SIMPLE, ue as CardBehaviorList, de as CardElevationLevelList, Oe as CustomSelectDropdownWidthList, Ae as CustomSelectListItemTypeList, y as DBAccordion, v as DBAccordionItem, re as DBBadge, ae as DBBrand, oe as DBButton, le as DBCard, pe as DBCheckbox, me as DBCustomButton, De as DBCustomSelect, xe as DBCustomSelectDropdown, ke as DBCustomSelectFormField, Ce as DBCustomSelectList, Se as DBCustomSelectListItem, Me as DBDivider, Fe as DBDrawer, He as DBHeader, Ue as DBIcon, fe as DBInfotext, we as DBInput, Ke as DBLink, Xe as DBNavigation, Ze as DBNavigationItem, Qe as DBNotification, nt as DBPage, at as DBPopover, ot as DBRadio, st as DBSection, ct as DBSelect, lt as DBStack, mt as DBSwitch, ht as DBTabItem, gt as DBTabList, _t as DBTabPanel, vt as DBTabs, Ee as DBTag, St as DBTextarea, Te as DBTooltip, D as DB_UX_LOCAL_STORAGE_FRAMEWORK, O as DB_UX_LOCAL_STORAGE_MODE, k as DEFAULT_BACK, A as DEFAULT_BURGER_MENU, j as DEFAULT_CLOSE_BUTTON, M as DEFAULT_DATALIST_ID_SUFFIX, N as DEFAULT_ICON, P as DEFAULT_ID, F as DEFAULT_INVALID_MESSAGE, I as DEFAULT_INVALID_MESSAGE_ID_SUFFIX, L as DEFAULT_LABEL, R as DEFAULT_LABEL_ID_SUFFIX, z as DEFAULT_MESSAGE, B as DEFAULT_MESSAGE_ID_SUFFIX, V as DEFAULT_PLACEHOLDER, H as DEFAULT_PLACEHOLDER_ID_SUFFIX, U as DEFAULT_REMOVE, W as DEFAULT_ROWS, G as DEFAULT_SELECTED, K as DEFAULT_SELECT_ID_SUFFIX, q as DEFAULT_VALID_MESSAGE, J as DEFAULT_VALID_MESSAGE_ID_SUFFIX, Y as DEFAULT_VIEWPORT, X as DENSITIES, Z as DENSITY, Q as DENSITY_CONST, $ as DESKTOP_VIEWPORT, Ne as DividerMarginList, Pe as DividerVariantList, he as DocumentClickListener, ge as DocumentScrollListener, Ie as DrawerBackdropList, Le as DrawerDirectionList, Re as DrawerPositionList, ze as DrawerVariantList, Ot as EmphasisList, kt as FieldSizingList, At as GapSpacingList, We as IconWeightList, Ge as InputTypeList, jt as LabelVariantHorizontalList, Mt as LabelVariantList, qe as LinkContentList, Nt as LinkReferrerPolicyList, Je as LinkSizeList, Pt as LinkTargetList, Ye as LinkVariantList, Ft as MarginList, It as MaxWidthList, Be as NavigationItemSafeTriangle, $e as NotificationAriaLiveList, et as NotificationLinkVariantList, tt as NotificationVariantList, Lt as OrientationList, rt as PageDocumentOverflowList, it as PageVariantList, Rt as PlacementHorizontalList, zt as PlacementList, Bt as PlacementVerticalList, Vt as PopoverDelayList, Ht as PopoverWidthList, ee as SEMANTIC, te as SEMANTICS, je as SelectedTypeList, Ut as SemanticList, Wt as SizeList, Gt as SpacingList, ut as StackAlignmentList, dt as StackDirectionList, ft as StackJustifyContentList, pt as StackVariantList, ne as TESTING_VIEWPORTS, yt as TabsBehaviorList, bt as TabsInitialSelectedModeList, xt as TagBehaviorList, Ct as TextareaResizeList, wt as TextareaWrapList, Tt as TooltipVariantList, Kt as ValidationList, qt as WidthList, e as addAttributeToChildren, t as cls, n as delay, r as getBoolean, i as getBooleanAsString, _e as getFloatingProps, a as getHideProp, o as getInputValue, s as getNotificationRole, c as getNumber, l as getOptionKey, u as getSearchInput, d as getStep, ve as handleDataOutside, ye as handleFixedDropdown, be as handleFixedPopover, f as hasVoiceOver, p as isArrayOfStrings, Ve as isEventTargetNavigationItem, m as isIOSSafari, h as isKeyboardEvent, g as stringPropVisible, _ as uuid };
|
package/dist/shared/constants.js
CHANGED
|
@@ -1,94 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
})(COLOR_SIMPLE || (COLOR_SIMPLE = {}));
|
|
34
|
-
export var COLOR;
|
|
35
|
-
(function (COLOR) {
|
|
36
|
-
COLOR["NEUTRAL_BG_LEVEL_1"] = "neutral-bg-basic-level-1";
|
|
37
|
-
COLOR["NEUTRAL_BG_LEVEL_2"] = "neutral-bg-basic-level-2";
|
|
38
|
-
COLOR["NEUTRAL_BG_LEVEL_3"] = "neutral-bg-basic-level-3";
|
|
39
|
-
COLOR["NEUTRAL_BG_TRANSPARENT_SEMI"] = "neutral-bg-basic-transparent-semi";
|
|
40
|
-
COLOR["NEUTRAL_BG_TRANSPARENT_FULL"] = "neutral-bg-basic-transparent-full";
|
|
41
|
-
COLOR["BRAND_BG_LEVEL_1"] = "brand-bg-basic-level-1";
|
|
42
|
-
COLOR["BRAND_BG_LEVEL_2"] = "brand-bg-basic-level-2";
|
|
43
|
-
COLOR["BRAND_BG_LEVEL_3"] = "brand-bg-basic-level-3";
|
|
44
|
-
COLOR["BRAND_BG_TRANSPARENT_SEMI"] = "brand-bg-basic-transparent-semi";
|
|
45
|
-
COLOR["BRAND_BG_TRANSPARENT_FULL"] = "brand-bg-basic-transparent-full";
|
|
46
|
-
COLOR["SUCCESSFUL_BG_LEVEL_1"] = "successful-bg-basic-level-1";
|
|
47
|
-
COLOR["SUCCESSFUL_BG_LEVEL_2"] = "successful-bg-basic-level-2";
|
|
48
|
-
COLOR["SUCCESSFUL_BG_LEVEL_3"] = "successful-bg-basic-level-3";
|
|
49
|
-
COLOR["SUCCESSFUL_BG_TRANSPARENT_SEMI"] = "successful-bg-basic-transparent-semi";
|
|
50
|
-
COLOR["SUCCESSFUL_BG_TRANSPARENT_FULL"] = "successful-bg-basic-transparent-full";
|
|
51
|
-
COLOR["CRITICAL_BG_LEVEL_1"] = "critical-bg-basic-level-1";
|
|
52
|
-
COLOR["CRITICAL_BG_LEVEL_2"] = "critical-bg-basic-level-2";
|
|
53
|
-
COLOR["CRITICAL_BG_LEVEL_3"] = "critical-bg-basic-level-3";
|
|
54
|
-
COLOR["CRITICAL_BG_TRANSPARENT_SEMI"] = "critical-bg-basic-transparent-semi";
|
|
55
|
-
COLOR["CRITICAL_BG_TRANSPARENT_Full"] = "critical-bg-basic-transparent-full";
|
|
56
|
-
COLOR["WARNING_BG_LEVEL_1"] = "warning-bg-basic-level-1";
|
|
57
|
-
COLOR["WARNING_BG_LEVEL_2"] = "warning-bg-basic-level-2";
|
|
58
|
-
COLOR["WARNING_BG_LEVEL_3"] = "warning-bg-basic-level-3";
|
|
59
|
-
COLOR["WARNING_BG_TRANSPARENT_SEMI"] = "warning-bg-basic-transparent-semi";
|
|
60
|
-
COLOR["WARNING_BG_TRANSPARENT_FULL"] = "warning-bg-basic-transparent-full";
|
|
61
|
-
COLOR["INFORMATIONAL_BG_LEVEL_1"] = "informational-bg-basic-level-1";
|
|
62
|
-
COLOR["INFORMATIONAL_BG_LEVEL_2"] = "informational-bg-basic-level-2";
|
|
63
|
-
COLOR["INFORMATIONAL_BG_LEVEL_3"] = "informational-bg-basic-level-3";
|
|
64
|
-
COLOR["INFORMATIONAL_BG_TRANSPARENT_SEMI"] = "informational-bg-basic-transparent-semi";
|
|
65
|
-
COLOR["INFORMATIONAL_BG_TRANSPARENT_FULL"] = "informational-bg-basic-transparent-full";
|
|
66
|
-
})(COLOR || (COLOR = {}));
|
|
67
|
-
export const COLORS = Object.entries(COLOR).map(([, value]) => value);
|
|
68
|
-
export const COLORS_SIMPLE = Object.entries(COLOR_SIMPLE).map(([, value]) => value);
|
|
69
|
-
export var SEMANTIC;
|
|
70
|
-
(function (SEMANTIC) {
|
|
71
|
-
SEMANTIC["CRITICAL"] = "critical";
|
|
72
|
-
SEMANTIC["INFORMATIONAL"] = "informational";
|
|
73
|
-
SEMANTIC["WARNING"] = "warning";
|
|
74
|
-
SEMANTIC["SUCCESSFUL"] = "successful";
|
|
75
|
-
})(SEMANTIC || (SEMANTIC = {}));
|
|
76
|
-
export const SEMANTICS = Object.entries(SEMANTIC).map(([, value]) => value);
|
|
77
|
-
export const DEFAULT_VIEWPORT = {
|
|
78
|
-
width: 390,
|
|
79
|
-
height: 884
|
|
80
|
-
};
|
|
81
|
-
export const DESKTOP_VIEWPORT = {
|
|
82
|
-
width: 1920,
|
|
83
|
-
height: 1280
|
|
84
|
-
};
|
|
85
|
-
/**
|
|
86
|
-
* Use those viewports if your component has a css media-query otherwise use the DEFAULT_VIEWPORT
|
|
87
|
-
*/
|
|
88
|
-
export const TESTING_VIEWPORTS = [Object.assign({ name: 'desktop' }, DESKTOP_VIEWPORT), {
|
|
89
|
-
name: 'tablet',
|
|
90
|
-
width: 768,
|
|
91
|
-
height: 1024
|
|
92
|
-
}, Object.assign({ name: 'mobile' }, DEFAULT_VIEWPORT)];
|
|
93
|
-
export const DB_UX_LOCAL_STORAGE_FRAMEWORK = 'db-ux-framework';
|
|
94
|
-
export const DB_UX_LOCAL_STORAGE_MODE = 'db-ux-mode';
|
|
1
|
+
//#region src/shared/constants.ts
|
|
2
|
+
var e = "OVERWRITE_DEFAULT_ID", t = "LABEL SHOULD BE SET", n = " ", r = "MESSAGE SHOULD BE SET", i = "-label", a = "-select", o = "-message", s = "-valid-message", c = "-invalid-message", l = "-placeholder", u = "-datalist", d = "TODO: Add a validMessage", f = "TODO: Add an invalidMessage", p = "Remove", m = "Back", h = "Selected", g = "BurgerMenu", _ = "brand", v = 4, y = "Close", b = "density", x = "color", S = /* @__PURE__ */ function(e) {
|
|
3
|
+
return e.FUNCTIONAL = "functional", e.REGULAR = "regular", e.EXPRESSIVE = "expressive", e;
|
|
4
|
+
}({}), C = Object.entries(S).map(([, e]) => e), w = /* @__PURE__ */ function(e) {
|
|
5
|
+
return e.PRIMARY = "primary", e;
|
|
6
|
+
}({}), T = /* @__PURE__ */ function(e) {
|
|
7
|
+
return e.NEUTRAL_BG_LEVEL_1 = "neutral-bg-basic-level-1", e.NEUTRAL_BG_LEVEL_2 = "neutral-bg-basic-level-2", e.NEUTRAL_BG_LEVEL_3 = "neutral-bg-basic-level-3", e.NEUTRAL_BG_TRANSPARENT_SEMI = "neutral-bg-basic-transparent-semi", e.NEUTRAL_BG_TRANSPARENT_FULL = "neutral-bg-basic-transparent-full", e.BRAND_BG_LEVEL_1 = "brand-bg-basic-level-1", e.BRAND_BG_LEVEL_2 = "brand-bg-basic-level-2", e.BRAND_BG_LEVEL_3 = "brand-bg-basic-level-3", e.BRAND_BG_TRANSPARENT_SEMI = "brand-bg-basic-transparent-semi", e.BRAND_BG_TRANSPARENT_FULL = "brand-bg-basic-transparent-full", e.SUCCESSFUL_BG_LEVEL_1 = "successful-bg-basic-level-1", e.SUCCESSFUL_BG_LEVEL_2 = "successful-bg-basic-level-2", e.SUCCESSFUL_BG_LEVEL_3 = "successful-bg-basic-level-3", e.SUCCESSFUL_BG_TRANSPARENT_SEMI = "successful-bg-basic-transparent-semi", e.SUCCESSFUL_BG_TRANSPARENT_FULL = "successful-bg-basic-transparent-full", e.CRITICAL_BG_LEVEL_1 = "critical-bg-basic-level-1", e.CRITICAL_BG_LEVEL_2 = "critical-bg-basic-level-2", e.CRITICAL_BG_LEVEL_3 = "critical-bg-basic-level-3", e.CRITICAL_BG_TRANSPARENT_SEMI = "critical-bg-basic-transparent-semi", e.CRITICAL_BG_TRANSPARENT_Full = "critical-bg-basic-transparent-full", e.WARNING_BG_LEVEL_1 = "warning-bg-basic-level-1", e.WARNING_BG_LEVEL_2 = "warning-bg-basic-level-2", e.WARNING_BG_LEVEL_3 = "warning-bg-basic-level-3", e.WARNING_BG_TRANSPARENT_SEMI = "warning-bg-basic-transparent-semi", e.WARNING_BG_TRANSPARENT_FULL = "warning-bg-basic-transparent-full", e.INFORMATIONAL_BG_LEVEL_1 = "informational-bg-basic-level-1", e.INFORMATIONAL_BG_LEVEL_2 = "informational-bg-basic-level-2", e.INFORMATIONAL_BG_LEVEL_3 = "informational-bg-basic-level-3", e.INFORMATIONAL_BG_TRANSPARENT_SEMI = "informational-bg-basic-transparent-semi", e.INFORMATIONAL_BG_TRANSPARENT_FULL = "informational-bg-basic-transparent-full", e;
|
|
8
|
+
}({}), E = Object.entries(T).map(([, e]) => e), D = Object.entries(w).map(([, e]) => e), O = /* @__PURE__ */ function(e) {
|
|
9
|
+
return e.CRITICAL = "critical", e.INFORMATIONAL = "informational", e.WARNING = "warning", e.SUCCESSFUL = "successful", e;
|
|
10
|
+
}({}), k = Object.entries(O).map(([, e]) => e), A = {
|
|
11
|
+
width: 390,
|
|
12
|
+
height: 884
|
|
13
|
+
}, j = {
|
|
14
|
+
width: 1920,
|
|
15
|
+
height: 1280
|
|
16
|
+
}, M = [
|
|
17
|
+
{
|
|
18
|
+
name: "desktop",
|
|
19
|
+
...j
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: "tablet",
|
|
23
|
+
width: 768,
|
|
24
|
+
height: 1024
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: "mobile",
|
|
28
|
+
...A
|
|
29
|
+
}
|
|
30
|
+
], N = "db-ux-framework", P = "db-ux-mode";
|
|
31
|
+
//#endregion
|
|
32
|
+
export { T as COLOR, E as COLORS, D as COLORS_SIMPLE, x as COLOR_CONST, w as COLOR_SIMPLE, N as DB_UX_LOCAL_STORAGE_FRAMEWORK, P as DB_UX_LOCAL_STORAGE_MODE, m as DEFAULT_BACK, g as DEFAULT_BURGER_MENU, y as DEFAULT_CLOSE_BUTTON, u as DEFAULT_DATALIST_ID_SUFFIX, _ as DEFAULT_ICON, e as DEFAULT_ID, f as DEFAULT_INVALID_MESSAGE, c as DEFAULT_INVALID_MESSAGE_ID_SUFFIX, t as DEFAULT_LABEL, i as DEFAULT_LABEL_ID_SUFFIX, r as DEFAULT_MESSAGE, o as DEFAULT_MESSAGE_ID_SUFFIX, n as DEFAULT_PLACEHOLDER, l as DEFAULT_PLACEHOLDER_ID_SUFFIX, p as DEFAULT_REMOVE, v as DEFAULT_ROWS, h as DEFAULT_SELECTED, a as DEFAULT_SELECT_ID_SUFFIX, d as DEFAULT_VALID_MESSAGE, s as DEFAULT_VALID_MESSAGE_ID_SUFFIX, A as DEFAULT_VIEWPORT, C as DENSITIES, S as DENSITY, b as DENSITY_CONST, j as DESKTOP_VIEWPORT, O as SEMANTIC, k as SEMANTICS, M as TESTING_VIEWPORTS };
|
package/dist/shared/figma.d.ts
CHANGED
|
@@ -12,6 +12,12 @@ export type FigmaEnumProp = {
|
|
|
12
12
|
key: string;
|
|
13
13
|
/** Map of Figma variant value → code value. Values can be strings, booleans, numbers, or instance swaps. */
|
|
14
14
|
value: Record<string, string | boolean | number | FigmaInstanceProp>;
|
|
15
|
+
/**
|
|
16
|
+
* Optional Figma boolean property key that guards this prop.
|
|
17
|
+
* When set, the resolved value is only emitted if getPropertyValue(guardKey) === 'True'.
|
|
18
|
+
* Useful for icon swaps that are only present when a show-flag is enabled.
|
|
19
|
+
*/
|
|
20
|
+
guardKey?: string;
|
|
15
21
|
};
|
|
16
22
|
/** A simple scalar prop. */
|
|
17
23
|
export type FigmaSimpleProp = {
|
|
@@ -86,19 +92,19 @@ export type FigmaConnectedInstancesProp = {
|
|
|
86
92
|
*/
|
|
87
93
|
export type FigmaNestedConnectedInstancesProp = {
|
|
88
94
|
type: 'nestedConnectedInstances';
|
|
89
|
-
/** Import string to filter by (e.g. 'DBAccordionItem'). Only instances whose template nestedImports contain this string are included. */
|
|
90
|
-
filter
|
|
95
|
+
/** Import string to filter by (e.g. 'DBAccordionItem'). Only instances whose template nestedImports contain this string are included. When omitted, all connected instances are included. */
|
|
96
|
+
filter?: string;
|
|
91
97
|
};
|
|
92
98
|
/**
|
|
93
|
-
* Wraps an iconSwap prop so it is only rendered when a boolean
|
|
94
|
-
* Generates: let icon = ''; if (
|
|
99
|
+
* Wraps an iconSwap prop so it is only rendered when a boolean Figma property is enabled.
|
|
100
|
+
* Generates: let icon = ''; if (getPropertyValue(guardKey) === true || getPropertyValue(guardKey) === 'True') { icon = `\n\t\ticon="${iconLeading}"` }
|
|
95
101
|
*/
|
|
96
102
|
export type FigmaConditionalProp = {
|
|
97
103
|
type: 'conditionalProp';
|
|
98
104
|
/** The Figma property key of the icon instance swap. */
|
|
99
105
|
key: string;
|
|
100
|
-
/** The
|
|
101
|
-
|
|
106
|
+
/** The Figma boolean property key that guards this prop (e.g. 'Show Icon Leading'). */
|
|
107
|
+
guardKey: string;
|
|
102
108
|
/** The attribute name to render (e.g. 'icon'). */
|
|
103
109
|
attrName: string;
|
|
104
110
|
};
|
package/dist/shared/model.js
CHANGED
|
@@ -1,22 +1,73 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
//#region src/shared/model.ts
|
|
2
|
+
var e = [
|
|
3
|
+
"adaptive",
|
|
4
|
+
"neutral",
|
|
5
|
+
"critical",
|
|
6
|
+
"informational",
|
|
7
|
+
"warning",
|
|
8
|
+
"successful"
|
|
9
|
+
], t = [
|
|
10
|
+
"medium",
|
|
11
|
+
"small",
|
|
12
|
+
"large",
|
|
13
|
+
"none"
|
|
14
|
+
], n = [
|
|
15
|
+
"medium",
|
|
16
|
+
"small",
|
|
17
|
+
"large",
|
|
18
|
+
"none"
|
|
19
|
+
], r = [
|
|
20
|
+
"left",
|
|
21
|
+
"right",
|
|
22
|
+
"left-start",
|
|
23
|
+
"left-end",
|
|
24
|
+
"right-start",
|
|
25
|
+
"right-end"
|
|
26
|
+
], i = [
|
|
27
|
+
"top",
|
|
28
|
+
"bottom",
|
|
29
|
+
"top-start",
|
|
30
|
+
"top-end",
|
|
31
|
+
"bottom-start",
|
|
32
|
+
"bottom-end"
|
|
33
|
+
], a = [...r, ...i], o = [
|
|
34
|
+
"none",
|
|
35
|
+
"3x-large",
|
|
36
|
+
"2x-large",
|
|
37
|
+
"x-large",
|
|
38
|
+
"large",
|
|
39
|
+
"medium",
|
|
40
|
+
"small",
|
|
41
|
+
"x-small",
|
|
42
|
+
"2x-small",
|
|
43
|
+
"3x-small"
|
|
44
|
+
], s = ["horizontal", "vertical"], c = ["full", "auto"], l = [
|
|
45
|
+
"full",
|
|
46
|
+
"medium",
|
|
47
|
+
"large",
|
|
48
|
+
"small"
|
|
49
|
+
], u = [
|
|
50
|
+
"none",
|
|
51
|
+
"slow",
|
|
52
|
+
"fast"
|
|
53
|
+
], d = ["auto", "fixed"], f = ["small", "medium"], p = ["weak", "strong"], m = [
|
|
54
|
+
"invalid",
|
|
55
|
+
"valid",
|
|
56
|
+
"no-validation"
|
|
57
|
+
], h = ["fixed", "content"], g = ["above", "floating"], _ = ["leading", "trailing"], v = /* @__PURE__ */ "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".split("."), y = [
|
|
58
|
+
"_self",
|
|
59
|
+
"_blank",
|
|
60
|
+
"_parent",
|
|
61
|
+
"_top"
|
|
62
|
+
], b = [
|
|
63
|
+
"no-referrer",
|
|
64
|
+
"no-referrer-when-downgrade",
|
|
65
|
+
"origin",
|
|
66
|
+
"origin-when-cross-origin",
|
|
67
|
+
"same-origin",
|
|
68
|
+
"strict-origin",
|
|
69
|
+
"strict-origin-when-cross-origin",
|
|
70
|
+
"unsafe-url"
|
|
71
|
+
], x = ["start", "center"];
|
|
72
|
+
//#endregion
|
|
73
|
+
export { x as AlignmentList, v as AutoCompleteList, p as EmphasisList, h as FieldSizingList, o as GapSpacingList, _ as LabelVariantHorizontalList, g as LabelVariantList, b as LinkReferrerPolicyList, y as LinkTargetList, n as MarginList, l as MaxWidthList, s as OrientationList, r as PlacementHorizontalList, a as PlacementList, i as PlacementVerticalList, u as PopoverDelayList, d as PopoverWidthList, e as SemanticList, f as SizeList, t as SpacingList, m as ValidationList, c as WidthList };
|
|
@@ -1,29 +1,26 @@
|
|
|
1
|
-
import { uuid } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
DocumentClickListener.callbacks = {};
|
|
29
|
-
DocumentClickListener._instance = null;
|
|
1
|
+
import { uuid as e } from "./index.js";
|
|
2
|
+
//#region src/utils/document-click-listener.ts
|
|
3
|
+
var t = class t {
|
|
4
|
+
static {
|
|
5
|
+
this.callbacks = {};
|
|
6
|
+
}
|
|
7
|
+
static {
|
|
8
|
+
this._instance = null;
|
|
9
|
+
}
|
|
10
|
+
static runCallbacks(e) {
|
|
11
|
+
for (let n of Object.values(t.callbacks)) typeof n == "function" && n(e);
|
|
12
|
+
}
|
|
13
|
+
constructor() {
|
|
14
|
+
if (t._instance) return t._instance;
|
|
15
|
+
t._instance = this, self.document && self.document.addEventListener("click", (e) => t.runCallbacks(e));
|
|
16
|
+
}
|
|
17
|
+
addCallback(n) {
|
|
18
|
+
let r = e();
|
|
19
|
+
return t.callbacks[r] = n, r;
|
|
20
|
+
}
|
|
21
|
+
removeCallback(e) {
|
|
22
|
+
delete t.callbacks[e];
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
//#endregion
|
|
26
|
+
export { t as DocumentClickListener };
|
|
@@ -1,38 +1,30 @@
|
|
|
1
|
-
import { uuid } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return callbackID;
|
|
32
|
-
}
|
|
33
|
-
removeCallback(id) {
|
|
34
|
-
delete DocumentScrollListener.callbacks[id];
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
DocumentScrollListener.callbacks = {};
|
|
38
|
-
DocumentScrollListener._instance = null;
|
|
1
|
+
import { uuid as e } from "./index.js";
|
|
2
|
+
//#region src/utils/document-scroll-listener.ts
|
|
3
|
+
var t = class t {
|
|
4
|
+
static {
|
|
5
|
+
this.callbacks = {};
|
|
6
|
+
}
|
|
7
|
+
static {
|
|
8
|
+
this._instance = null;
|
|
9
|
+
}
|
|
10
|
+
static runCallbacks(e) {
|
|
11
|
+
for (let n of Object.values(t.callbacks)) typeof n == "function" && n(e);
|
|
12
|
+
}
|
|
13
|
+
constructor() {
|
|
14
|
+
if (this.ticking = !1, t._instance) return t._instance;
|
|
15
|
+
t._instance = this, self.document && self.document.addEventListener("scroll", (e) => {
|
|
16
|
+
this.ticking ||= (window.requestAnimationFrame(() => {
|
|
17
|
+
t.runCallbacks(e), this.ticking = !1;
|
|
18
|
+
}), !0);
|
|
19
|
+
}, !0);
|
|
20
|
+
}
|
|
21
|
+
addCallback(n) {
|
|
22
|
+
let r = e();
|
|
23
|
+
return t.callbacks[r] = n, r;
|
|
24
|
+
}
|
|
25
|
+
removeCallback(e) {
|
|
26
|
+
delete t.callbacks[e];
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
//#endregion
|
|
30
|
+
export { t as DocumentScrollListener };
|