mtrl 0.9.8 → 0.10.0-next.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/dist/components/badge/api.d.ts +14 -20
- package/dist/components/badge/api.js +4 -5
- package/dist/components/badge/config.d.ts +549 -17
- package/dist/components/badge/config.js +7 -0
- package/dist/components/badge/features.d.ts +9 -7
- package/dist/components/badge/features.js +13 -12
- package/dist/components/badge/types.d.ts +38 -0
- package/dist/components/bottom-app-bar/bottom-app-bar.js +6 -2
- package/dist/components/bottom-app-bar/constants.d.ts +2 -2
- package/dist/components/bottom-app-bar/constants.js +2 -2
- package/dist/components/bottom-app-bar/types.d.ts +4 -4
- package/dist/components/bottom-sheet/config.d.ts +531 -17
- package/dist/components/bottom-sheet/constants.d.ts +6 -6
- package/dist/components/bottom-sheet/constants.js +6 -6
- package/dist/components/bottom-sheet/features/structure.d.ts +3 -3
- package/dist/components/button/api.d.ts +3 -2
- package/dist/components/button/api.js +1 -1
- package/dist/components/button/button.d.ts +2 -2
- package/dist/components/button/config.d.ts +531 -17
- package/dist/components/button/constants.d.ts +2 -2
- package/dist/components/button/constants.js +2 -2
- package/dist/components/button/features/progress.js +4 -4
- package/dist/components/button/types.d.ts +50 -6
- package/dist/components/button-group/button-group.js +5 -5
- package/dist/components/button-group/config.d.ts +64 -25
- package/dist/components/button-group/types.d.ts +24 -2
- package/dist/components/card/config.d.ts +532 -18
- package/dist/components/card/features.js +10 -8
- package/dist/components/card/types.d.ts +10 -0
- package/dist/components/carousel/config.d.ts +531 -17
- package/dist/components/checkbox/config.d.ts +531 -17
- package/dist/components/checkbox/config.js +1 -1
- package/dist/components/checkbox/constants.d.ts +3 -3
- package/dist/components/checkbox/constants.js +3 -3
- package/dist/components/checkbox/types.d.ts +10 -0
- package/dist/components/chips/api.d.ts +12 -3
- package/dist/components/chips/chip/config.d.ts +534 -20
- package/dist/components/chips/config.d.ts +562 -53
- package/dist/components/chips/config.js +10 -8
- package/dist/components/chips/features/chip-items.d.ts +33 -2
- package/dist/components/chips/features/container.d.ts +68 -1
- package/dist/components/chips/features/container.js +1 -1
- package/dist/components/chips/features/controller.d.ts +53 -2
- package/dist/components/chips/features/controller.js +2 -6
- package/dist/components/chips/features/dom.js +2 -2
- package/dist/components/chips/features/label.d.ts +69 -1
- package/dist/components/chips/features/label.js +2 -2
- package/dist/components/chips/schema.d.ts +8 -6
- package/dist/components/chips/schema.js +2 -2
- package/dist/components/chips/types.d.ts +49 -0
- package/dist/components/datepicker/config.d.ts +1596 -54
- package/dist/components/datepicker/datepicker.js +6 -5
- package/dist/components/dialog/api.d.ts +6 -1
- package/dist/components/dialog/api.js +1 -1
- package/dist/components/dialog/config.d.ts +549 -63
- package/dist/components/dialog/constants.d.ts +9 -9
- package/dist/components/dialog/constants.js +9 -9
- package/dist/components/dialog/features.d.ts +18 -8
- package/dist/components/dialog/features.js +44 -42
- package/dist/components/dialog/types.d.ts +77 -0
- package/dist/components/divider/features.d.ts +4 -4
- package/dist/components/divider/types.d.ts +31 -13
- package/dist/components/drawer/config.d.ts +533 -19
- package/dist/components/drawer/drawer.d.ts +2 -2
- package/dist/components/extended-fab/config.d.ts +531 -17
- package/dist/components/extended-fab/constants.d.ts +2 -2
- package/dist/components/extended-fab/constants.js +2 -2
- package/dist/components/fab/config.d.ts +533 -19
- package/dist/components/fab/config.js +7 -6
- package/dist/components/fab/constants.d.ts +1 -1
- package/dist/components/fab/constants.js +1 -1
- package/dist/components/fab/fab.d.ts +1 -1
- package/dist/components/fab/fab.js +1 -1
- package/dist/components/fab/types.d.ts +6 -1
- package/dist/components/icon-button/config.d.ts +534 -20
- package/dist/components/icon-button/config.js +8 -7
- package/dist/components/icon-button/icon-button.d.ts +1 -1
- package/dist/components/icon-button/icon-button.js +1 -1
- package/dist/components/icon-button/types.d.ts +6 -1
- package/dist/components/index.d.ts +0 -2
- package/dist/components/index.js +0 -2
- package/dist/components/list/api.d.ts +865 -13
- package/dist/components/list/api.js +18 -18
- package/dist/components/list/config.d.ts +589 -42
- package/dist/components/list/config.js +3 -2
- package/dist/components/list/features/renderer.d.ts +4 -1
- package/dist/components/list/features/renderer.js +3 -8
- package/dist/components/list/features/selection.d.ts +2 -1
- package/dist/components/list/features/selection.js +42 -32
- package/dist/components/list/list.d.ts +4 -22
- package/dist/components/list/list.js +0 -1
- package/dist/components/list/types.d.ts +103 -0
- package/dist/components/loading-indicator/config.d.ts +531 -17
- package/dist/components/menu/api.d.ts +5 -1
- package/dist/components/menu/config.d.ts +535 -47
- package/dist/components/menu/config.js +9 -11
- package/dist/components/menu/features/controller.d.ts +4 -2
- package/dist/components/menu/features/controller.js +26 -46
- package/dist/components/menu/features/keyboard.d.ts +3 -19
- package/dist/components/menu/features/keyboard.js +11 -11
- package/dist/components/menu/features/opener.d.ts +8 -2
- package/dist/components/menu/features/opener.js +1 -5
- package/dist/components/menu/features/position.d.ts +3 -3
- package/dist/components/menu/features/submenu.d.ts +20 -2
- package/dist/components/menu/features/submenu.js +4 -11
- package/dist/components/menu/features/tasks.d.ts +1 -1
- package/dist/components/menu/types.d.ts +131 -0
- package/dist/components/navigation-rail/navigation-rail.js +2 -1
- package/dist/components/navigation-rail/types.d.ts +10 -0
- package/dist/components/progress/api.js +3 -2
- package/dist/components/progress/config.d.ts +567 -29
- package/dist/components/progress/config.js +9 -15
- package/dist/components/progress/features/canvas.js +1 -1
- package/dist/components/progress/features/state.d.ts +2 -3
- package/dist/components/progress/features/state.js +2 -1
- package/dist/components/radios/config.d.ts +537 -21
- package/dist/components/radios/radio.d.ts +19 -2
- package/dist/components/radios/radio.js +18 -13
- package/dist/components/search/config.d.ts +548 -34
- package/dist/components/search/features/input.d.ts +85 -2
- package/dist/components/search/features/states.d.ts +99 -2
- package/dist/components/search/features/structure.d.ts +10 -2
- package/dist/components/search/features/suggestions.d.ts +53 -1
- package/dist/components/segmented-button/config.d.ts +5 -5
- package/dist/components/segmented-button/segment.js +1 -1
- package/dist/components/segmented-button/segmented-button.js +20 -7
- package/dist/components/select/features.js +26 -4
- package/dist/components/select/types.d.ts +2 -2
- package/dist/components/side-sheet/config.d.ts +531 -17
- package/dist/components/side-sheet/constants.d.ts +8 -8
- package/dist/components/side-sheet/constants.js +8 -8
- package/dist/components/side-sheet/features/structure.d.ts +3 -3
- package/dist/components/slider/api.d.ts +10 -6
- package/dist/components/slider/config.d.ts +570 -56
- package/dist/components/slider/config.js +7 -6
- package/dist/components/slider/features/controller.d.ts +520 -2
- package/dist/components/slider/features/controller.js +9 -11
- package/dist/components/slider/features/dom.js +5 -5
- package/dist/components/slider/features/handlers.d.ts +11 -20
- package/dist/components/slider/features/handlers.js +21 -18
- package/dist/components/slider/features/range.d.ts +7 -1
- package/dist/components/slider/features/range.js +3 -3
- package/dist/components/slider/features/states.d.ts +71 -1
- package/dist/components/slider/features/tracks.d.ts +28 -2
- package/dist/components/slider/features/tracks.js +9 -9
- package/dist/components/slider/types.d.ts +135 -0
- package/dist/components/snackbar/config.d.ts +531 -17
- package/dist/components/snackbar/constants.d.ts +3 -3
- package/dist/components/snackbar/constants.js +3 -3
- package/dist/components/snackbar/index.d.ts +1 -1
- package/dist/components/snackbar/types.d.ts +27 -4
- package/dist/components/split-button/api.js +2 -2
- package/dist/components/split-button/config.d.ts +531 -17
- package/dist/components/switch/config.d.ts +531 -17
- package/dist/components/switch/constants.d.ts +8 -8
- package/dist/components/switch/constants.js +8 -8
- package/dist/components/switch/features.js +8 -8
- package/dist/components/switch/types.d.ts +10 -0
- package/dist/components/tabs/api.d.ts +6 -9
- package/dist/components/tabs/api.js +14 -3
- package/dist/components/tabs/config.d.ts +3 -18
- package/dist/components/tabs/config.js +1 -12
- package/dist/components/tabs/constants.d.ts +3 -3
- package/dist/components/tabs/constants.js +3 -3
- package/dist/components/tabs/features.d.ts +5 -3
- package/dist/components/tabs/features.js +5 -3
- package/dist/components/tabs/indicator.js +4 -4
- package/dist/components/tabs/scroll-indicators.js +11 -11
- package/dist/components/tabs/tab.d.ts +13 -0
- package/dist/components/tabs/tab.js +5 -13
- package/dist/components/tabs/types.d.ts +20 -6
- package/dist/components/tabs/utils.d.ts +31 -1
- package/dist/components/tabs/utils.js +44 -29
- package/dist/components/textfield/config.d.ts +536 -20
- package/dist/components/textfield/config.js +3 -3
- package/dist/components/textfield/constants.d.ts +5 -5
- package/dist/components/textfield/constants.js +5 -5
- package/dist/components/textfield/features/density.d.ts +1 -1
- package/dist/components/textfield/features/leading-icon.d.ts +16 -2
- package/dist/components/textfield/features/leading-icon.js +1 -1
- package/dist/components/textfield/features/placement.js +3 -3
- package/dist/components/textfield/features/prefix-text.d.ts +16 -2
- package/dist/components/textfield/features/prefix-text.js +1 -1
- package/dist/components/textfield/features/suffix-text.d.ts +16 -2
- package/dist/components/textfield/features/suffix-text.js +1 -1
- package/dist/components/textfield/features/supporting-text.js +2 -2
- package/dist/components/textfield/features/trailing-icon.d.ts +16 -2
- package/dist/components/textfield/features/trailing-icon.js +1 -1
- package/dist/components/textfield/types.d.ts +10 -0
- package/dist/components/timepicker/api.d.ts +2 -2
- package/dist/components/timepicker/api.js +3 -1
- package/dist/components/timepicker/clockdial.js +7 -8
- package/dist/components/timepicker/config.d.ts +1602 -60
- package/dist/components/timepicker/render.d.ts +2 -2
- package/dist/components/timepicker/render.js +44 -29
- package/dist/components/timepicker/types.d.ts +11 -0
- package/dist/components/tooltip/config.d.ts +534 -19
- package/dist/components/tooltip/constants.d.ts +1 -1
- package/dist/components/tooltip/constants.js +1 -1
- package/dist/components/tooltip/tooltip.d.ts +2 -2
- package/dist/components/top-app-bar/constants.d.ts +6 -6
- package/dist/components/top-app-bar/constants.js +6 -6
- package/dist/components/top-app-bar/top-app-bar.js +11 -7
- package/dist/components/top-app-bar/types.d.ts +5 -5
- package/dist/core/compose/component.d.ts +5 -3
- package/dist/core/compose/component.js +1 -1
- package/dist/core/compose/features/events.d.ts +3 -3
- package/dist/core/compose/features/icon.js +1 -1
- package/dist/core/compose/features/input.d.ts +18 -5
- package/dist/core/compose/features/input.js +2 -1
- package/dist/core/compose/features/text.js +1 -1
- package/dist/core/compose/features/textinput.d.ts +22 -8
- package/dist/core/compose/features/textinput.js +2 -1
- package/dist/core/compose/features/textlabel.js +1 -1
- package/dist/core/compose/features/track.js +3 -3
- package/dist/core/compose/features/withEvents.d.ts +2 -2
- package/dist/core/compose/features/withEvents.js +8 -2
- package/dist/core/config/component.d.ts +546 -42
- package/dist/core/config/component.js +3 -11
- package/dist/core/config/global.d.ts +0 -22
- package/dist/core/config.d.ts +0 -33
- package/dist/core/config.js +1 -58
- package/dist/core/dom/attributes.js +9 -3
- package/dist/core/dom/classes.js +8 -26
- package/dist/core/dom/create.d.ts +11 -1
- package/dist/core/dom/create.js +3 -7
- package/dist/core/dom/utils.js +2 -1
- package/dist/core/index.d.ts +1 -5
- package/dist/core/index.js +1 -3
- package/dist/core/state/index.d.ts +0 -4
- package/dist/core/state/index.js +0 -2
- package/dist/core/utils/attributes.d.ts +29 -0
- package/dist/core/utils/attributes.js +11 -0
- package/dist/core/utils/warn.d.ts +8 -0
- package/dist/core/utils/warn.js +15 -0
- package/dist/index.cjs +0 -0
- package/dist/package.json +1 -1
- package/dist/styles/badge.css +2 -2
- package/dist/styles/base.css +2 -2
- package/dist/styles/bottom-app-bar.css +2 -2
- package/dist/styles/bottom-sheet.css +2 -2
- package/dist/styles/button-group.css +2 -2
- package/dist/styles/button.css +2 -2
- package/dist/styles/card.css +2 -2
- package/dist/styles/carousel.css +2 -2
- package/dist/styles/checkbox.css +2 -2
- package/dist/styles/chips.css +2 -2
- package/dist/styles/dialog.css +2 -2
- package/dist/styles/divider.css +2 -2
- package/dist/styles/drawer.css +2 -2
- package/dist/styles/extended-fab.css +2 -2
- package/dist/styles/fab.css +2 -2
- package/dist/styles/icon-button.css +2 -2
- package/dist/styles/list.css +2 -2
- package/dist/styles/loading-indicator.css +2 -2
- package/dist/styles/menu.css +2 -2
- package/dist/styles/navigation-rail.css +2 -2
- package/dist/styles/progress.css +2 -2
- package/dist/styles/radios.css +2 -2
- package/dist/styles/search.css +2 -2
- package/dist/styles/segmented-button.css +2 -2
- package/dist/styles/select.css +2 -2
- package/dist/styles/side-sheet.css +2 -2
- package/dist/styles/slider.css +2 -2
- package/dist/styles/snackbar.css +2 -2
- package/dist/styles/split-button.css +2 -2
- package/dist/styles/switch.css +2 -2
- package/dist/styles/tabs.css +2 -2
- package/dist/styles/textfield.css +2 -2
- package/dist/styles/timepicker.css +2 -2
- package/dist/styles/tooltip.css +2 -2
- package/dist/styles/top-app-bar.css +2 -2
- package/dist/styles/utilities.css +2 -2
- package/dist/styles.css +2 -2
- package/dist/themes/autumn.css +1 -1
- package/dist/themes/baseline.css +1 -1
- package/dist/themes/brownbeige.css +1 -1
- package/dist/themes/browngreen.css +1 -1
- package/dist/themes/desert.css +1 -1
- package/dist/themes/forest.css +1 -1
- package/dist/themes/highcontrast.css +1 -1
- package/dist/themes/legacy.css +1 -1
- package/dist/themes/material.css +1 -1
- package/dist/themes/ocean.css +1 -1
- package/dist/themes/sageivory.css +1 -1
- package/dist/themes/spring.css +1 -1
- package/dist/themes/summer.css +1 -1
- package/dist/themes/sunset.css +1 -1
- package/dist/themes/tealcaramel.css +1 -1
- package/dist/themes/winter.css +1 -1
- package/package.json +5 -1
- package/src/styles/components/_badge.scss +1 -1
- package/src/styles/components/_bottom-app-bar.scss +5 -5
- package/src/styles/components/_bottom-sheet.scss +17 -17
- package/src/styles/components/_button-group.scss +2 -2
- package/src/styles/components/_button.scss +12 -12
- package/src/styles/components/_checkbox.scss +25 -25
- package/src/styles/components/_chips.scss +5 -5
- package/src/styles/components/_dialog.scss +36 -36
- package/src/styles/components/_extended-fab.scss +7 -7
- package/src/styles/components/_fab.scss +4 -4
- package/src/styles/components/_icon-button.scss +5 -5
- package/src/styles/components/_menu.scss +25 -25
- package/src/styles/components/_progress.scss +1 -1
- package/src/styles/components/_radios.scss +18 -18
- package/src/styles/components/_segmented-button.scss +6 -6
- package/src/styles/components/_select.scss +22 -22
- package/src/styles/components/_side-sheet.scss +20 -20
- package/src/styles/components/_slider.scss +20 -20
- package/src/styles/components/_snackbar.scss +7 -7
- package/src/styles/components/_split-button.scss +1 -1
- package/src/styles/components/_switch.scss +36 -36
- package/src/styles/components/_tabs.scss +31 -20
- package/src/styles/components/_textfield.scss +153 -153
- package/src/styles/components/_timepicker.scss +24 -8
- package/src/styles/components/_top-app-bar.scss +20 -20
- package/src/styles/main.scss +0 -1
- package/dist/components/navigation/api.d.ts +0 -8
- package/dist/components/navigation/api.js +0 -117
- package/dist/components/navigation/config.d.ts +0 -45
- package/dist/components/navigation/config.js +0 -39
- package/dist/components/navigation/constants.d.ts +0 -137
- package/dist/components/navigation/constants.js +0 -65
- package/dist/components/navigation/features/controller.d.ts +0 -28
- package/dist/components/navigation/features/controller.js +0 -173
- package/dist/components/navigation/features/items.d.ts +0 -32
- package/dist/components/navigation/features/items.js +0 -236
- package/dist/components/navigation/index.d.ts +0 -3
- package/dist/components/navigation/index.js +0 -2
- package/dist/components/navigation/nav-item.d.ts +0 -30
- package/dist/components/navigation/nav-item.js +0 -119
- package/dist/components/navigation/navigation.d.ts +0 -8
- package/dist/components/navigation/navigation.js +0 -52
- package/dist/components/navigation/system/core.d.ts +0 -72
- package/dist/components/navigation/system/core.js +0 -148
- package/dist/components/navigation/system/events.d.ts +0 -35
- package/dist/components/navigation/system/events.js +0 -126
- package/dist/components/navigation/system/index.d.ts +0 -10
- package/dist/components/navigation/system/index.js +0 -92
- package/dist/components/navigation/system/mobile.d.ts +0 -52
- package/dist/components/navigation/system/mobile.js +0 -140
- package/dist/components/navigation/system/state.d.ts +0 -22
- package/dist/components/navigation/system/state.js +0 -44
- package/dist/components/navigation/system/types.d.ts +0 -337
- package/dist/components/navigation/system/types.js +0 -1
- package/dist/components/navigation/types.d.ts +0 -225
- package/dist/components/navigation/types.js +0 -33
- package/dist/core/state/disabled.d.ts +0 -32
- package/dist/core/state/disabled.js +0 -26
- package/dist/core/state/lifecycle.d.ts +0 -56
- package/dist/core/state/lifecycle.js +0 -51
- package/dist/styles/navigation.css +0 -2
- package/dist/styles/navigation.d.ts +0 -1
- package/dist/styles/navigation.js +0 -2
- package/src/styles/components/_navigation-mobile.scss +0 -244
- package/src/styles/components/_navigation-system.scss +0 -153
- package/src/styles/components/_navigation.scss +0 -407
|
@@ -1,37 +1,31 @@
|
|
|
1
|
-
import { BadgeComponent } from "./types.js";
|
|
1
|
+
import { BadgeComponent, BadgeFeatureHost, BadgeVisibility } from "./types.js";
|
|
2
2
|
/**
|
|
3
3
|
* API configuration options for badge component
|
|
4
4
|
* @category Components
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
7
7
|
interface ApiOptions {
|
|
8
|
-
visibility:
|
|
9
|
-
show: () => void;
|
|
10
|
-
hide: () => void;
|
|
11
|
-
toggle: (visible?: boolean) => void;
|
|
12
|
-
isVisible: () => boolean;
|
|
13
|
-
};
|
|
8
|
+
visibility: BadgeVisibility;
|
|
14
9
|
lifecycle: {
|
|
15
10
|
destroy: () => void;
|
|
16
11
|
};
|
|
17
12
|
}
|
|
18
13
|
/**
|
|
19
|
-
*
|
|
14
|
+
* What withAPI needs from the component it wraps: everything a badge feature
|
|
15
|
+
* needs, plus the events withEvents installs.
|
|
16
|
+
*
|
|
17
|
+
* This was a hand-written interface that described `config` as three optional
|
|
18
|
+
* properties. All-optional made it a weak type, so the real component -- whose
|
|
19
|
+
* config is the badge's own -- had "no properties in common" with it, and
|
|
20
|
+
* `addClass` was declared as returning the interface itself, which is the
|
|
21
|
+
* narrowing #120 removed from the source.
|
|
22
|
+
*
|
|
20
23
|
* @category Components
|
|
21
24
|
* @internal
|
|
22
25
|
*/
|
|
23
|
-
interface ComponentWithElements {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
config: {
|
|
27
|
-
max?: number;
|
|
28
|
-
label?: string | number;
|
|
29
|
-
variant?: string;
|
|
30
|
-
};
|
|
31
|
-
getClass: (name: string) => string;
|
|
32
|
-
addClass: (...classes: string[]) => ComponentWithElements;
|
|
33
|
-
on: (event: string, handler: Function) => ComponentWithElements;
|
|
34
|
-
off: (event: string, handler: Function) => ComponentWithElements;
|
|
26
|
+
interface ComponentWithElements extends BadgeFeatureHost {
|
|
27
|
+
on(event: string, handler: Function): this;
|
|
28
|
+
off(event: string, handler: Function): this;
|
|
35
29
|
}
|
|
36
30
|
/**
|
|
37
31
|
* Enhances a badge component with API methods.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isBadgeOverflow, isEmptyBadgeLabel } from "./config.js";
|
|
1
2
|
import { formatBadgeLabel } from "./config.js";
|
|
2
3
|
const VARIANT_SMALL = "small";
|
|
3
4
|
const ALL_COLORS = [
|
|
@@ -25,12 +26,10 @@ export const withAPI = ({ visibility, lifecycle }) => (component) => {
|
|
|
25
26
|
const formattedLabel = formatBadgeLabel(label, component.config.max);
|
|
26
27
|
component.element.textContent = formattedLabel;
|
|
27
28
|
component.element.classList.remove(`${component.getClass("badge")}--overflow`);
|
|
28
|
-
if (
|
|
29
|
-
component.config.max !== undefined &&
|
|
30
|
-
label > component.config.max) {
|
|
29
|
+
if (isBadgeOverflow(label, component.config.max)) {
|
|
31
30
|
component.element.classList.add(`${component.getClass("badge")}--overflow`);
|
|
32
31
|
}
|
|
33
|
-
if (formattedLabel
|
|
32
|
+
if (isEmptyBadgeLabel(formattedLabel)) {
|
|
34
33
|
badgeComponent.hide();
|
|
35
34
|
}
|
|
36
35
|
else {
|
|
@@ -109,7 +108,7 @@ export const withAPI = ({ visibility, lifecycle }) => (component) => {
|
|
|
109
108
|
component.wrapper.removeChild(component.element);
|
|
110
109
|
}
|
|
111
110
|
const wrapper = document.createElement("div");
|
|
112
|
-
wrapper.classList.add(component.getClass("
|
|
111
|
+
wrapper.classList.add(component.getClass("badge__wrapper"));
|
|
113
112
|
wrapper.style.position = "relative";
|
|
114
113
|
const parent = target.parentNode;
|
|
115
114
|
if (parent) {
|
|
@@ -28,25 +28,539 @@ export declare const createBaseConfig: (config?: BadgeConfig) => BadgeConfig;
|
|
|
28
28
|
*/
|
|
29
29
|
export declare const getElementConfig: (config: BadgeConfig) => {
|
|
30
30
|
tag: string;
|
|
31
|
-
componentName: string;
|
|
31
|
+
componentName: string | undefined;
|
|
32
32
|
attributes: Record<string, unknown>;
|
|
33
|
-
className: string[];
|
|
34
|
-
rawClass: string | string[];
|
|
35
|
-
id: string;
|
|
36
|
-
name: string;
|
|
37
|
-
title: string;
|
|
38
|
-
tabIndex: number;
|
|
39
|
-
style:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
33
|
+
className: string[] | undefined;
|
|
34
|
+
rawClass: string | string[] | undefined;
|
|
35
|
+
id: string | undefined;
|
|
36
|
+
name: string | undefined;
|
|
37
|
+
title: string | undefined;
|
|
38
|
+
tabIndex: number | undefined;
|
|
39
|
+
style: {
|
|
40
|
+
[x: number]: string | undefined;
|
|
41
|
+
accentColor?: string | undefined;
|
|
42
|
+
alignContent?: string | undefined;
|
|
43
|
+
alignItems?: string | undefined;
|
|
44
|
+
alignSelf?: string | undefined;
|
|
45
|
+
alignmentBaseline?: string | undefined;
|
|
46
|
+
all?: string | undefined;
|
|
47
|
+
animation?: string | undefined;
|
|
48
|
+
animationComposition?: string | undefined;
|
|
49
|
+
animationDelay?: string | undefined;
|
|
50
|
+
animationDirection?: string | undefined;
|
|
51
|
+
animationDuration?: string | undefined;
|
|
52
|
+
animationFillMode?: string | undefined;
|
|
53
|
+
animationIterationCount?: string | undefined;
|
|
54
|
+
animationName?: string | undefined;
|
|
55
|
+
animationPlayState?: string | undefined;
|
|
56
|
+
animationTimingFunction?: string | undefined;
|
|
57
|
+
appearance?: string | undefined;
|
|
58
|
+
aspectRatio?: string | undefined;
|
|
59
|
+
backdropFilter?: string | undefined;
|
|
60
|
+
backfaceVisibility?: string | undefined;
|
|
61
|
+
background?: string | undefined;
|
|
62
|
+
backgroundAttachment?: string | undefined;
|
|
63
|
+
backgroundBlendMode?: string | undefined;
|
|
64
|
+
backgroundClip?: string | undefined;
|
|
65
|
+
backgroundColor?: string | undefined;
|
|
66
|
+
backgroundImage?: string | undefined;
|
|
67
|
+
backgroundOrigin?: string | undefined;
|
|
68
|
+
backgroundPosition?: string | undefined;
|
|
69
|
+
backgroundPositionX?: string | undefined;
|
|
70
|
+
backgroundPositionY?: string | undefined;
|
|
71
|
+
backgroundRepeat?: string | undefined;
|
|
72
|
+
backgroundSize?: string | undefined;
|
|
73
|
+
baselineShift?: string | undefined;
|
|
74
|
+
baselineSource?: string | undefined;
|
|
75
|
+
blockSize?: string | undefined;
|
|
76
|
+
border?: string | undefined;
|
|
77
|
+
borderBlock?: string | undefined;
|
|
78
|
+
borderBlockColor?: string | undefined;
|
|
79
|
+
borderBlockEnd?: string | undefined;
|
|
80
|
+
borderBlockEndColor?: string | undefined;
|
|
81
|
+
borderBlockEndStyle?: string | undefined;
|
|
82
|
+
borderBlockEndWidth?: string | undefined;
|
|
83
|
+
borderBlockStart?: string | undefined;
|
|
84
|
+
borderBlockStartColor?: string | undefined;
|
|
85
|
+
borderBlockStartStyle?: string | undefined;
|
|
86
|
+
borderBlockStartWidth?: string | undefined;
|
|
87
|
+
borderBlockStyle?: string | undefined;
|
|
88
|
+
borderBlockWidth?: string | undefined;
|
|
89
|
+
borderBottom?: string | undefined;
|
|
90
|
+
borderBottomColor?: string | undefined;
|
|
91
|
+
borderBottomLeftRadius?: string | undefined;
|
|
92
|
+
borderBottomRightRadius?: string | undefined;
|
|
93
|
+
borderBottomStyle?: string | undefined;
|
|
94
|
+
borderBottomWidth?: string | undefined;
|
|
95
|
+
borderCollapse?: string | undefined;
|
|
96
|
+
borderColor?: string | undefined;
|
|
97
|
+
borderEndEndRadius?: string | undefined;
|
|
98
|
+
borderEndStartRadius?: string | undefined;
|
|
99
|
+
borderImage?: string | undefined;
|
|
100
|
+
borderImageOutset?: string | undefined;
|
|
101
|
+
borderImageRepeat?: string | undefined;
|
|
102
|
+
borderImageSlice?: string | undefined;
|
|
103
|
+
borderImageSource?: string | undefined;
|
|
104
|
+
borderImageWidth?: string | undefined;
|
|
105
|
+
borderInline?: string | undefined;
|
|
106
|
+
borderInlineColor?: string | undefined;
|
|
107
|
+
borderInlineEnd?: string | undefined;
|
|
108
|
+
borderInlineEndColor?: string | undefined;
|
|
109
|
+
borderInlineEndStyle?: string | undefined;
|
|
110
|
+
borderInlineEndWidth?: string | undefined;
|
|
111
|
+
borderInlineStart?: string | undefined;
|
|
112
|
+
borderInlineStartColor?: string | undefined;
|
|
113
|
+
borderInlineStartStyle?: string | undefined;
|
|
114
|
+
borderInlineStartWidth?: string | undefined;
|
|
115
|
+
borderInlineStyle?: string | undefined;
|
|
116
|
+
borderInlineWidth?: string | undefined;
|
|
117
|
+
borderLeft?: string | undefined;
|
|
118
|
+
borderLeftColor?: string | undefined;
|
|
119
|
+
borderLeftStyle?: string | undefined;
|
|
120
|
+
borderLeftWidth?: string | undefined;
|
|
121
|
+
borderRadius?: string | undefined;
|
|
122
|
+
borderRight?: string | undefined;
|
|
123
|
+
borderRightColor?: string | undefined;
|
|
124
|
+
borderRightStyle?: string | undefined;
|
|
125
|
+
borderRightWidth?: string | undefined;
|
|
126
|
+
borderSpacing?: string | undefined;
|
|
127
|
+
borderStartEndRadius?: string | undefined;
|
|
128
|
+
borderStartStartRadius?: string | undefined;
|
|
129
|
+
borderStyle?: string | undefined;
|
|
130
|
+
borderTop?: string | undefined;
|
|
131
|
+
borderTopColor?: string | undefined;
|
|
132
|
+
borderTopLeftRadius?: string | undefined;
|
|
133
|
+
borderTopRightRadius?: string | undefined;
|
|
134
|
+
borderTopStyle?: string | undefined;
|
|
135
|
+
borderTopWidth?: string | undefined;
|
|
136
|
+
borderWidth?: string | undefined;
|
|
137
|
+
bottom?: string | undefined;
|
|
138
|
+
boxDecorationBreak?: string | undefined;
|
|
139
|
+
boxShadow?: string | undefined;
|
|
140
|
+
boxSizing?: string | undefined;
|
|
141
|
+
breakAfter?: string | undefined;
|
|
142
|
+
breakBefore?: string | undefined;
|
|
143
|
+
breakInside?: string | undefined;
|
|
144
|
+
captionSide?: string | undefined;
|
|
145
|
+
caretColor?: string | undefined;
|
|
146
|
+
clear?: string | undefined;
|
|
147
|
+
clip?: string | undefined;
|
|
148
|
+
clipPath?: string | undefined;
|
|
149
|
+
clipRule?: string | undefined;
|
|
150
|
+
color?: string | undefined;
|
|
151
|
+
colorInterpolation?: string | undefined;
|
|
152
|
+
colorInterpolationFilters?: string | undefined;
|
|
153
|
+
colorScheme?: string | undefined;
|
|
154
|
+
columnCount?: string | undefined;
|
|
155
|
+
columnFill?: string | undefined;
|
|
156
|
+
columnGap?: string | undefined;
|
|
157
|
+
columnRule?: string | undefined;
|
|
158
|
+
columnRuleColor?: string | undefined;
|
|
159
|
+
columnRuleStyle?: string | undefined;
|
|
160
|
+
columnRuleWidth?: string | undefined;
|
|
161
|
+
columnSpan?: string | undefined;
|
|
162
|
+
columnWidth?: string | undefined;
|
|
163
|
+
columns?: string | undefined;
|
|
164
|
+
contain?: string | undefined;
|
|
165
|
+
containIntrinsicBlockSize?: string | undefined;
|
|
166
|
+
containIntrinsicHeight?: string | undefined;
|
|
167
|
+
containIntrinsicInlineSize?: string | undefined;
|
|
168
|
+
containIntrinsicSize?: string | undefined;
|
|
169
|
+
containIntrinsicWidth?: string | undefined;
|
|
170
|
+
container?: string | undefined;
|
|
171
|
+
containerName?: string | undefined;
|
|
172
|
+
containerType?: string | undefined;
|
|
173
|
+
content?: string | undefined;
|
|
174
|
+
contentVisibility?: string | undefined;
|
|
175
|
+
counterIncrement?: string | undefined;
|
|
176
|
+
counterReset?: string | undefined;
|
|
177
|
+
counterSet?: string | undefined;
|
|
178
|
+
cssFloat?: string | undefined;
|
|
179
|
+
cssText?: string | undefined;
|
|
180
|
+
cursor?: string | undefined;
|
|
181
|
+
cx?: string | undefined;
|
|
182
|
+
cy?: string | undefined;
|
|
183
|
+
d?: string | undefined;
|
|
184
|
+
direction?: string | undefined;
|
|
185
|
+
display?: string | undefined;
|
|
186
|
+
dominantBaseline?: string | undefined;
|
|
187
|
+
emptyCells?: string | undefined;
|
|
188
|
+
fill?: string | undefined;
|
|
189
|
+
fillOpacity?: string | undefined;
|
|
190
|
+
fillRule?: string | undefined;
|
|
191
|
+
filter?: string | undefined;
|
|
192
|
+
flex?: string | undefined;
|
|
193
|
+
flexBasis?: string | undefined;
|
|
194
|
+
flexDirection?: string | undefined;
|
|
195
|
+
flexFlow?: string | undefined;
|
|
196
|
+
flexGrow?: string | undefined;
|
|
197
|
+
flexShrink?: string | undefined;
|
|
198
|
+
flexWrap?: string | undefined;
|
|
199
|
+
float?: string | undefined;
|
|
200
|
+
floodColor?: string | undefined;
|
|
201
|
+
floodOpacity?: string | undefined;
|
|
202
|
+
font?: string | undefined;
|
|
203
|
+
fontFamily?: string | undefined;
|
|
204
|
+
fontFeatureSettings?: string | undefined;
|
|
205
|
+
fontKerning?: string | undefined;
|
|
206
|
+
fontOpticalSizing?: string | undefined;
|
|
207
|
+
fontPalette?: string | undefined;
|
|
208
|
+
fontSize?: string | undefined;
|
|
209
|
+
fontSizeAdjust?: string | undefined;
|
|
210
|
+
fontStretch?: string | undefined;
|
|
211
|
+
fontStyle?: string | undefined;
|
|
212
|
+
fontSynthesis?: string | undefined;
|
|
213
|
+
fontSynthesisSmallCaps?: string | undefined;
|
|
214
|
+
fontSynthesisStyle?: string | undefined;
|
|
215
|
+
fontSynthesisWeight?: string | undefined;
|
|
216
|
+
fontVariant?: string | undefined;
|
|
217
|
+
fontVariantAlternates?: string | undefined;
|
|
218
|
+
fontVariantCaps?: string | undefined;
|
|
219
|
+
fontVariantEastAsian?: string | undefined;
|
|
220
|
+
fontVariantLigatures?: string | undefined;
|
|
221
|
+
fontVariantNumeric?: string | undefined;
|
|
222
|
+
fontVariantPosition?: string | undefined;
|
|
223
|
+
fontVariationSettings?: string | undefined;
|
|
224
|
+
fontWeight?: string | undefined;
|
|
225
|
+
forcedColorAdjust?: string | undefined;
|
|
226
|
+
gap?: string | undefined;
|
|
227
|
+
grid?: string | undefined;
|
|
228
|
+
gridArea?: string | undefined;
|
|
229
|
+
gridAutoColumns?: string | undefined;
|
|
230
|
+
gridAutoFlow?: string | undefined;
|
|
231
|
+
gridAutoRows?: string | undefined;
|
|
232
|
+
gridColumn?: string | undefined;
|
|
233
|
+
gridColumnEnd?: string | undefined;
|
|
234
|
+
gridColumnGap?: string | undefined;
|
|
235
|
+
gridColumnStart?: string | undefined;
|
|
236
|
+
gridGap?: string | undefined;
|
|
237
|
+
gridRow?: string | undefined;
|
|
238
|
+
gridRowEnd?: string | undefined;
|
|
239
|
+
gridRowGap?: string | undefined;
|
|
240
|
+
gridRowStart?: string | undefined;
|
|
241
|
+
gridTemplate?: string | undefined;
|
|
242
|
+
gridTemplateAreas?: string | undefined;
|
|
243
|
+
gridTemplateColumns?: string | undefined;
|
|
244
|
+
gridTemplateRows?: string | undefined;
|
|
245
|
+
height?: string | undefined;
|
|
246
|
+
hyphenateCharacter?: string | undefined;
|
|
247
|
+
hyphens?: string | undefined;
|
|
248
|
+
imageOrientation?: string | undefined;
|
|
249
|
+
imageRendering?: string | undefined;
|
|
250
|
+
inlineSize?: string | undefined;
|
|
251
|
+
inset?: string | undefined;
|
|
252
|
+
insetBlock?: string | undefined;
|
|
253
|
+
insetBlockEnd?: string | undefined;
|
|
254
|
+
insetBlockStart?: string | undefined;
|
|
255
|
+
insetInline?: string | undefined;
|
|
256
|
+
insetInlineEnd?: string | undefined;
|
|
257
|
+
insetInlineStart?: string | undefined;
|
|
258
|
+
isolation?: string | undefined;
|
|
259
|
+
justifyContent?: string | undefined;
|
|
260
|
+
justifyItems?: string | undefined;
|
|
261
|
+
justifySelf?: string | undefined;
|
|
262
|
+
left?: string | undefined;
|
|
263
|
+
length?: number | undefined;
|
|
264
|
+
letterSpacing?: string | undefined;
|
|
265
|
+
lightingColor?: string | undefined;
|
|
266
|
+
lineBreak?: string | undefined;
|
|
267
|
+
lineHeight?: string | undefined;
|
|
268
|
+
listStyle?: string | undefined;
|
|
269
|
+
listStyleImage?: string | undefined;
|
|
270
|
+
listStylePosition?: string | undefined;
|
|
271
|
+
listStyleType?: string | undefined;
|
|
272
|
+
margin?: string | undefined;
|
|
273
|
+
marginBlock?: string | undefined;
|
|
274
|
+
marginBlockEnd?: string | undefined;
|
|
275
|
+
marginBlockStart?: string | undefined;
|
|
276
|
+
marginBottom?: string | undefined;
|
|
277
|
+
marginInline?: string | undefined;
|
|
278
|
+
marginInlineEnd?: string | undefined;
|
|
279
|
+
marginInlineStart?: string | undefined;
|
|
280
|
+
marginLeft?: string | undefined;
|
|
281
|
+
marginRight?: string | undefined;
|
|
282
|
+
marginTop?: string | undefined;
|
|
283
|
+
marker?: string | undefined;
|
|
284
|
+
markerEnd?: string | undefined;
|
|
285
|
+
markerMid?: string | undefined;
|
|
286
|
+
markerStart?: string | undefined;
|
|
287
|
+
mask?: string | undefined;
|
|
288
|
+
maskClip?: string | undefined;
|
|
289
|
+
maskComposite?: string | undefined;
|
|
290
|
+
maskImage?: string | undefined;
|
|
291
|
+
maskMode?: string | undefined;
|
|
292
|
+
maskOrigin?: string | undefined;
|
|
293
|
+
maskPosition?: string | undefined;
|
|
294
|
+
maskRepeat?: string | undefined;
|
|
295
|
+
maskSize?: string | undefined;
|
|
296
|
+
maskType?: string | undefined;
|
|
297
|
+
mathDepth?: string | undefined;
|
|
298
|
+
mathStyle?: string | undefined;
|
|
299
|
+
maxBlockSize?: string | undefined;
|
|
300
|
+
maxHeight?: string | undefined;
|
|
301
|
+
maxInlineSize?: string | undefined;
|
|
302
|
+
maxWidth?: string | undefined;
|
|
303
|
+
minBlockSize?: string | undefined;
|
|
304
|
+
minHeight?: string | undefined;
|
|
305
|
+
minInlineSize?: string | undefined;
|
|
306
|
+
minWidth?: string | undefined;
|
|
307
|
+
mixBlendMode?: string | undefined;
|
|
308
|
+
objectFit?: string | undefined;
|
|
309
|
+
objectPosition?: string | undefined;
|
|
310
|
+
offset?: string | undefined;
|
|
311
|
+
offsetAnchor?: string | undefined;
|
|
312
|
+
offsetDistance?: string | undefined;
|
|
313
|
+
offsetPath?: string | undefined;
|
|
314
|
+
offsetPosition?: string | undefined;
|
|
315
|
+
offsetRotate?: string | undefined;
|
|
316
|
+
opacity?: string | undefined;
|
|
317
|
+
order?: string | undefined;
|
|
318
|
+
orphans?: string | undefined;
|
|
319
|
+
outline?: string | undefined;
|
|
320
|
+
outlineColor?: string | undefined;
|
|
321
|
+
outlineOffset?: string | undefined;
|
|
322
|
+
outlineStyle?: string | undefined;
|
|
323
|
+
outlineWidth?: string | undefined;
|
|
324
|
+
overflow?: string | undefined;
|
|
325
|
+
overflowAnchor?: string | undefined;
|
|
326
|
+
overflowClipMargin?: string | undefined;
|
|
327
|
+
overflowWrap?: string | undefined;
|
|
328
|
+
overflowX?: string | undefined;
|
|
329
|
+
overflowY?: string | undefined;
|
|
330
|
+
overscrollBehavior?: string | undefined;
|
|
331
|
+
overscrollBehaviorBlock?: string | undefined;
|
|
332
|
+
overscrollBehaviorInline?: string | undefined;
|
|
333
|
+
overscrollBehaviorX?: string | undefined;
|
|
334
|
+
overscrollBehaviorY?: string | undefined;
|
|
335
|
+
padding?: string | undefined;
|
|
336
|
+
paddingBlock?: string | undefined;
|
|
337
|
+
paddingBlockEnd?: string | undefined;
|
|
338
|
+
paddingBlockStart?: string | undefined;
|
|
339
|
+
paddingBottom?: string | undefined;
|
|
340
|
+
paddingInline?: string | undefined;
|
|
341
|
+
paddingInlineEnd?: string | undefined;
|
|
342
|
+
paddingInlineStart?: string | undefined;
|
|
343
|
+
paddingLeft?: string | undefined;
|
|
344
|
+
paddingRight?: string | undefined;
|
|
345
|
+
paddingTop?: string | undefined;
|
|
346
|
+
page?: string | undefined;
|
|
347
|
+
pageBreakAfter?: string | undefined;
|
|
348
|
+
pageBreakBefore?: string | undefined;
|
|
349
|
+
pageBreakInside?: string | undefined;
|
|
350
|
+
paintOrder?: string | undefined;
|
|
351
|
+
parentRule?: CSSRule | null | undefined;
|
|
352
|
+
perspective?: string | undefined;
|
|
353
|
+
perspectiveOrigin?: string | undefined;
|
|
354
|
+
placeContent?: string | undefined;
|
|
355
|
+
placeItems?: string | undefined;
|
|
356
|
+
placeSelf?: string | undefined;
|
|
357
|
+
pointerEvents?: string | undefined;
|
|
358
|
+
position?: string | undefined;
|
|
359
|
+
printColorAdjust?: string | undefined;
|
|
360
|
+
quotes?: string | undefined;
|
|
361
|
+
r?: string | undefined;
|
|
362
|
+
resize?: string | undefined;
|
|
363
|
+
right?: string | undefined;
|
|
364
|
+
rotate?: string | undefined;
|
|
365
|
+
rowGap?: string | undefined;
|
|
366
|
+
rubyAlign?: string | undefined;
|
|
367
|
+
rubyPosition?: string | undefined;
|
|
368
|
+
rx?: string | undefined;
|
|
369
|
+
ry?: string | undefined;
|
|
370
|
+
scale?: string | undefined;
|
|
371
|
+
scrollBehavior?: string | undefined;
|
|
372
|
+
scrollMargin?: string | undefined;
|
|
373
|
+
scrollMarginBlock?: string | undefined;
|
|
374
|
+
scrollMarginBlockEnd?: string | undefined;
|
|
375
|
+
scrollMarginBlockStart?: string | undefined;
|
|
376
|
+
scrollMarginBottom?: string | undefined;
|
|
377
|
+
scrollMarginInline?: string | undefined;
|
|
378
|
+
scrollMarginInlineEnd?: string | undefined;
|
|
379
|
+
scrollMarginInlineStart?: string | undefined;
|
|
380
|
+
scrollMarginLeft?: string | undefined;
|
|
381
|
+
scrollMarginRight?: string | undefined;
|
|
382
|
+
scrollMarginTop?: string | undefined;
|
|
383
|
+
scrollPadding?: string | undefined;
|
|
384
|
+
scrollPaddingBlock?: string | undefined;
|
|
385
|
+
scrollPaddingBlockEnd?: string | undefined;
|
|
386
|
+
scrollPaddingBlockStart?: string | undefined;
|
|
387
|
+
scrollPaddingBottom?: string | undefined;
|
|
388
|
+
scrollPaddingInline?: string | undefined;
|
|
389
|
+
scrollPaddingInlineEnd?: string | undefined;
|
|
390
|
+
scrollPaddingInlineStart?: string | undefined;
|
|
391
|
+
scrollPaddingLeft?: string | undefined;
|
|
392
|
+
scrollPaddingRight?: string | undefined;
|
|
393
|
+
scrollPaddingTop?: string | undefined;
|
|
394
|
+
scrollSnapAlign?: string | undefined;
|
|
395
|
+
scrollSnapStop?: string | undefined;
|
|
396
|
+
scrollSnapType?: string | undefined;
|
|
397
|
+
scrollbarColor?: string | undefined;
|
|
398
|
+
scrollbarGutter?: string | undefined;
|
|
399
|
+
scrollbarWidth?: string | undefined;
|
|
400
|
+
shapeImageThreshold?: string | undefined;
|
|
401
|
+
shapeMargin?: string | undefined;
|
|
402
|
+
shapeOutside?: string | undefined;
|
|
403
|
+
shapeRendering?: string | undefined;
|
|
404
|
+
stopColor?: string | undefined;
|
|
405
|
+
stopOpacity?: string | undefined;
|
|
406
|
+
stroke?: string | undefined;
|
|
407
|
+
strokeDasharray?: string | undefined;
|
|
408
|
+
strokeDashoffset?: string | undefined;
|
|
409
|
+
strokeLinecap?: string | undefined;
|
|
410
|
+
strokeLinejoin?: string | undefined;
|
|
411
|
+
strokeMiterlimit?: string | undefined;
|
|
412
|
+
strokeOpacity?: string | undefined;
|
|
413
|
+
strokeWidth?: string | undefined;
|
|
414
|
+
tabSize?: string | undefined;
|
|
415
|
+
tableLayout?: string | undefined;
|
|
416
|
+
textAlign?: string | undefined;
|
|
417
|
+
textAlignLast?: string | undefined;
|
|
418
|
+
textAnchor?: string | undefined;
|
|
419
|
+
textBox?: string | undefined;
|
|
420
|
+
textBoxEdge?: string | undefined;
|
|
421
|
+
textBoxTrim?: string | undefined;
|
|
422
|
+
textCombineUpright?: string | undefined;
|
|
423
|
+
textDecoration?: string | undefined;
|
|
424
|
+
textDecorationColor?: string | undefined;
|
|
425
|
+
textDecorationLine?: string | undefined;
|
|
426
|
+
textDecorationSkipInk?: string | undefined;
|
|
427
|
+
textDecorationStyle?: string | undefined;
|
|
428
|
+
textDecorationThickness?: string | undefined;
|
|
429
|
+
textEmphasis?: string | undefined;
|
|
430
|
+
textEmphasisColor?: string | undefined;
|
|
431
|
+
textEmphasisPosition?: string | undefined;
|
|
432
|
+
textEmphasisStyle?: string | undefined;
|
|
433
|
+
textIndent?: string | undefined;
|
|
434
|
+
textOrientation?: string | undefined;
|
|
435
|
+
textOverflow?: string | undefined;
|
|
436
|
+
textRendering?: string | undefined;
|
|
437
|
+
textShadow?: string | undefined;
|
|
438
|
+
textTransform?: string | undefined;
|
|
439
|
+
textUnderlineOffset?: string | undefined;
|
|
440
|
+
textUnderlinePosition?: string | undefined;
|
|
441
|
+
textWrap?: string | undefined;
|
|
442
|
+
textWrapMode?: string | undefined;
|
|
443
|
+
textWrapStyle?: string | undefined;
|
|
444
|
+
top?: string | undefined;
|
|
445
|
+
touchAction?: string | undefined;
|
|
446
|
+
transform?: string | undefined;
|
|
447
|
+
transformBox?: string | undefined;
|
|
448
|
+
transformOrigin?: string | undefined;
|
|
449
|
+
transformStyle?: string | undefined;
|
|
450
|
+
transition?: string | undefined;
|
|
451
|
+
transitionBehavior?: string | undefined;
|
|
452
|
+
transitionDelay?: string | undefined;
|
|
453
|
+
transitionDuration?: string | undefined;
|
|
454
|
+
transitionProperty?: string | undefined;
|
|
455
|
+
transitionTimingFunction?: string | undefined;
|
|
456
|
+
translate?: string | undefined;
|
|
457
|
+
unicodeBidi?: string | undefined;
|
|
458
|
+
userSelect?: string | undefined;
|
|
459
|
+
vectorEffect?: string | undefined;
|
|
460
|
+
verticalAlign?: string | undefined;
|
|
461
|
+
viewTransitionClass?: string | undefined;
|
|
462
|
+
viewTransitionName?: string | undefined;
|
|
463
|
+
visibility?: string | undefined;
|
|
464
|
+
webkitAlignContent?: string | undefined;
|
|
465
|
+
webkitAlignItems?: string | undefined;
|
|
466
|
+
webkitAlignSelf?: string | undefined;
|
|
467
|
+
webkitAnimation?: string | undefined;
|
|
468
|
+
webkitAnimationDelay?: string | undefined;
|
|
469
|
+
webkitAnimationDirection?: string | undefined;
|
|
470
|
+
webkitAnimationDuration?: string | undefined;
|
|
471
|
+
webkitAnimationFillMode?: string | undefined;
|
|
472
|
+
webkitAnimationIterationCount?: string | undefined;
|
|
473
|
+
webkitAnimationName?: string | undefined;
|
|
474
|
+
webkitAnimationPlayState?: string | undefined;
|
|
475
|
+
webkitAnimationTimingFunction?: string | undefined;
|
|
476
|
+
webkitAppearance?: string | undefined;
|
|
477
|
+
webkitBackfaceVisibility?: string | undefined;
|
|
478
|
+
webkitBackgroundClip?: string | undefined;
|
|
479
|
+
webkitBackgroundOrigin?: string | undefined;
|
|
480
|
+
webkitBackgroundSize?: string | undefined;
|
|
481
|
+
webkitBorderBottomLeftRadius?: string | undefined;
|
|
482
|
+
webkitBorderBottomRightRadius?: string | undefined;
|
|
483
|
+
webkitBorderRadius?: string | undefined;
|
|
484
|
+
webkitBorderTopLeftRadius?: string | undefined;
|
|
485
|
+
webkitBorderTopRightRadius?: string | undefined;
|
|
486
|
+
webkitBoxAlign?: string | undefined;
|
|
487
|
+
webkitBoxFlex?: string | undefined;
|
|
488
|
+
webkitBoxOrdinalGroup?: string | undefined;
|
|
489
|
+
webkitBoxOrient?: string | undefined;
|
|
490
|
+
webkitBoxPack?: string | undefined;
|
|
491
|
+
webkitBoxShadow?: string | undefined;
|
|
492
|
+
webkitBoxSizing?: string | undefined;
|
|
493
|
+
webkitFilter?: string | undefined;
|
|
494
|
+
webkitFlex?: string | undefined;
|
|
495
|
+
webkitFlexBasis?: string | undefined;
|
|
496
|
+
webkitFlexDirection?: string | undefined;
|
|
497
|
+
webkitFlexFlow?: string | undefined;
|
|
498
|
+
webkitFlexGrow?: string | undefined;
|
|
499
|
+
webkitFlexShrink?: string | undefined;
|
|
500
|
+
webkitFlexWrap?: string | undefined;
|
|
501
|
+
webkitJustifyContent?: string | undefined;
|
|
502
|
+
webkitLineClamp?: string | undefined;
|
|
503
|
+
webkitMask?: string | undefined;
|
|
504
|
+
webkitMaskBoxImage?: string | undefined;
|
|
505
|
+
webkitMaskBoxImageOutset?: string | undefined;
|
|
506
|
+
webkitMaskBoxImageRepeat?: string | undefined;
|
|
507
|
+
webkitMaskBoxImageSlice?: string | undefined;
|
|
508
|
+
webkitMaskBoxImageSource?: string | undefined;
|
|
509
|
+
webkitMaskBoxImageWidth?: string | undefined;
|
|
510
|
+
webkitMaskClip?: string | undefined;
|
|
511
|
+
webkitMaskComposite?: string | undefined;
|
|
512
|
+
webkitMaskImage?: string | undefined;
|
|
513
|
+
webkitMaskOrigin?: string | undefined;
|
|
514
|
+
webkitMaskPosition?: string | undefined;
|
|
515
|
+
webkitMaskRepeat?: string | undefined;
|
|
516
|
+
webkitMaskSize?: string | undefined;
|
|
517
|
+
webkitOrder?: string | undefined;
|
|
518
|
+
webkitPerspective?: string | undefined;
|
|
519
|
+
webkitPerspectiveOrigin?: string | undefined;
|
|
520
|
+
webkitTextFillColor?: string | undefined;
|
|
521
|
+
webkitTextSizeAdjust?: string | undefined;
|
|
522
|
+
webkitTextStroke?: string | undefined;
|
|
523
|
+
webkitTextStrokeColor?: string | undefined;
|
|
524
|
+
webkitTextStrokeWidth?: string | undefined;
|
|
525
|
+
webkitTransform?: string | undefined;
|
|
526
|
+
webkitTransformOrigin?: string | undefined;
|
|
527
|
+
webkitTransformStyle?: string | undefined;
|
|
528
|
+
webkitTransition?: string | undefined;
|
|
529
|
+
webkitTransitionDelay?: string | undefined;
|
|
530
|
+
webkitTransitionDuration?: string | undefined;
|
|
531
|
+
webkitTransitionProperty?: string | undefined;
|
|
532
|
+
webkitTransitionTimingFunction?: string | undefined;
|
|
533
|
+
webkitUserSelect?: string | undefined;
|
|
534
|
+
whiteSpace?: string | undefined;
|
|
535
|
+
whiteSpaceCollapse?: string | undefined;
|
|
536
|
+
widows?: string | undefined;
|
|
537
|
+
width?: string | undefined;
|
|
538
|
+
willChange?: string | undefined;
|
|
539
|
+
wordBreak?: string | undefined;
|
|
540
|
+
wordSpacing?: string | undefined;
|
|
541
|
+
wordWrap?: string | undefined;
|
|
542
|
+
writingMode?: string | undefined;
|
|
543
|
+
x?: string | undefined;
|
|
544
|
+
y?: string | undefined;
|
|
545
|
+
zIndex?: string | undefined;
|
|
546
|
+
zoom?: string | undefined;
|
|
547
|
+
getPropertyPriority?: ((property: string) => string) | undefined;
|
|
548
|
+
getPropertyValue?: ((property: string) => string) | undefined;
|
|
549
|
+
item?: ((index: number) => string) | undefined;
|
|
550
|
+
removeProperty?: ((property: string) => string) | undefined;
|
|
551
|
+
setProperty?: ((property: string, value: string | null, priority?: string) => void) | undefined;
|
|
552
|
+
[Symbol.iterator]?: (() => ArrayIterator<string>) | undefined;
|
|
553
|
+
} | undefined;
|
|
554
|
+
data: Record<string, string> | undefined;
|
|
555
|
+
role: string | undefined;
|
|
556
|
+
ariaLabel: string | undefined;
|
|
557
|
+
ariaDescribedBy: string | undefined;
|
|
558
|
+
ariaLabelledBy: string | undefined;
|
|
559
|
+
ariaHidden: boolean | undefined;
|
|
560
|
+
html: string | undefined;
|
|
561
|
+
text: string | undefined;
|
|
48
562
|
forwardEvents: Record<string, import("../../core/dom/create.js").EventCondition>;
|
|
49
|
-
interactive: boolean;
|
|
563
|
+
interactive: boolean | undefined;
|
|
50
564
|
};
|
|
51
565
|
/**
|
|
52
566
|
* Creates API configuration for the Badge component.
|
|
@@ -96,5 +610,23 @@ export declare const getApiConfig: (comp: {
|
|
|
96
610
|
* formatBadgeLabel("New") // "New"
|
|
97
611
|
* formatBadgeLabel("VeryLong") // "Very" (truncated)
|
|
98
612
|
*/
|
|
613
|
+
/**
|
|
614
|
+
* Whether a formatted label has nothing worth showing.
|
|
615
|
+
*
|
|
616
|
+
* A badge is a count, and a count of nothing is not news -- so an empty label
|
|
617
|
+
* and a zero are both hidden. The setter has always done this; creation did
|
|
618
|
+
* not, so `createBadge({ label: 0 })` was visible while `setLabel(0)` on the
|
|
619
|
+
* same badge hid it. One rule now, used by both. FLO-108.
|
|
620
|
+
*/
|
|
621
|
+
export declare const isEmptyBadgeLabel: (formattedLabel: string) => boolean;
|
|
622
|
+
/**
|
|
623
|
+
* Whether {@link formatBadgeLabel} truncated the label to `max+`.
|
|
624
|
+
*
|
|
625
|
+
* Asked of the same value the formatter reads, rather than of its type. Both
|
|
626
|
+
* callers used to require `typeof label === "number"`, so `"1250"` with a max
|
|
627
|
+
* of 999 rendered "999+" without the overflow class that 1250 received --
|
|
628
|
+
* the formatter has always used `Number(label)`. FLO-108.
|
|
629
|
+
*/
|
|
630
|
+
export declare const isBadgeOverflow: (label: string | number, max?: number) => boolean;
|
|
99
631
|
export declare const formatBadgeLabel: (label: string | number, max?: number) => string;
|
|
100
632
|
export default defaultConfig;
|
|
@@ -34,6 +34,13 @@ export const getApiConfig = (comp) => ({
|
|
|
34
34
|
destroy: () => comp.lifecycle.destroy(),
|
|
35
35
|
},
|
|
36
36
|
});
|
|
37
|
+
export const isEmptyBadgeLabel = (formattedLabel) => formattedLabel === "" || formattedLabel === "0";
|
|
38
|
+
export const isBadgeOverflow = (label, max) => {
|
|
39
|
+
if (max === undefined || label === "" || label === null)
|
|
40
|
+
return false;
|
|
41
|
+
const numeric = Number(label);
|
|
42
|
+
return !Number.isNaN(numeric) && numeric > max;
|
|
43
|
+
};
|
|
37
44
|
export const formatBadgeLabel = (label, max) => {
|
|
38
45
|
if (label === undefined || label === null || label === "") {
|
|
39
46
|
return "";
|