@melodicdev/components 4.0.0 → 4.1.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/README.md +4 -4
- package/assets/fonts/phosphor/phosphor.css +5 -25
- package/assets/melodic-components.css +50 -25
- package/assets/melodic-components.js +9230 -7814
- package/assets/melodic-components.js.map +1 -1
- package/assets/melodic-components.min.css +1 -21
- package/assets/melodic-components.min.js +1895 -26471
- package/lib/components/data-display/activity-feed/activity-feed-item.styles.d.ts.map +1 -1
- package/lib/components/data-display/activity-feed/activity-feed-item.styles.js +83 -78
- package/lib/components/data-display/activity-feed/activity-feed.styles.d.ts.map +1 -1
- package/lib/components/data-display/activity-feed/activity-feed.styles.js +10 -5
- package/lib/components/data-display/avatar/avatar.styles.d.ts.map +1 -1
- package/lib/components/data-display/avatar/avatar.styles.js +23 -18
- package/lib/components/data-display/badge/badge.styles.d.ts.map +1 -1
- package/lib/components/data-display/badge/badge.styles.js +54 -48
- package/lib/components/data-display/badge-group/badge-group.styles.d.ts.map +1 -1
- package/lib/components/data-display/badge-group/badge-group.styles.js +34 -29
- package/lib/components/data-display/calendar-view/calendar-view.styles.d.ts.map +1 -1
- package/lib/components/data-display/calendar-view/calendar-view.styles.js +174 -155
- package/lib/components/data-display/data-grid/data-grid.component.d.ts +43 -2
- package/lib/components/data-display/data-grid/data-grid.component.d.ts.map +1 -1
- package/lib/components/data-display/data-grid/data-grid.component.js +94 -8
- package/lib/components/data-display/data-grid/data-grid.styles.d.ts.map +1 -1
- package/lib/components/data-display/data-grid/data-grid.styles.js +139 -117
- package/lib/components/data-display/data-grid/data-grid.template.d.ts.map +1 -1
- package/lib/components/data-display/data-grid/data-grid.template.js +19 -10
- package/lib/components/data-display/data-grid/index.d.ts +1 -0
- package/lib/components/data-display/data-grid/index.d.ts.map +1 -1
- package/lib/components/data-display/list/list-item.styles.d.ts.map +1 -1
- package/lib/components/data-display/list/list-item.styles.js +40 -35
- package/lib/components/data-display/list/list.styles.d.ts.map +1 -1
- package/lib/components/data-display/list/list.styles.js +10 -5
- package/lib/components/data-display/profile-card/profile-card.styles.d.ts.map +1 -1
- package/lib/components/data-display/profile-card/profile-card.styles.js +71 -66
- package/lib/components/data-display/stat-card/stat-card.styles.d.ts.map +1 -1
- package/lib/components/data-display/stat-card/stat-card.styles.js +67 -63
- package/lib/components/data-display/table/index.d.ts +1 -0
- package/lib/components/data-display/table/index.d.ts.map +1 -1
- package/lib/components/data-display/table/table.component.d.ts +16 -0
- package/lib/components/data-display/table/table.component.d.ts.map +1 -1
- package/lib/components/data-display/table/table.component.js +28 -3
- package/lib/components/data-display/table/table.styles.d.ts.map +1 -1
- package/lib/components/data-display/table/table.styles.js +101 -90
- package/lib/components/data-display/table/table.template.d.ts.map +1 -1
- package/lib/components/data-display/table/table.template.js +8 -6
- package/lib/components/data-display/table-core/index.d.ts +2 -2
- package/lib/components/data-display/table-core/index.d.ts.map +1 -1
- package/lib/components/data-display/table-core/index.js +1 -1
- package/lib/components/data-display/table-core/table-core.d.ts +16 -2
- package/lib/components/data-display/table-core/table-core.d.ts.map +1 -1
- package/lib/components/data-display/table-core/table-core.js +32 -5
- package/lib/components/data-display/tag/tag.styles.d.ts.map +1 -1
- package/lib/components/data-display/tag/tag.styles.js +78 -66
- package/lib/components/feedback/alert/alert.styles.d.ts.map +1 -1
- package/lib/components/feedback/alert/alert.styles.js +89 -76
- package/lib/components/feedback/progress/progress.styles.d.ts.map +1 -1
- package/lib/components/feedback/progress/progress.styles.js +110 -106
- package/lib/components/feedback/spinner/spinner.styles.d.ts.map +1 -1
- package/lib/components/feedback/spinner/spinner.styles.js +18 -13
- package/lib/components/feedback/toast/index.d.ts +1 -0
- package/lib/components/feedback/toast/index.d.ts.map +1 -1
- package/lib/components/feedback/toast/toast-container.styles.d.ts.map +1 -1
- package/lib/components/feedback/toast/toast-container.styles.js +20 -0
- package/lib/components/feedback/toast/toast.component.d.ts +16 -0
- package/lib/components/feedback/toast/toast.component.d.ts.map +1 -1
- package/lib/components/feedback/toast/toast.component.js +63 -5
- package/lib/components/feedback/toast/toast.service.d.ts +14 -0
- package/lib/components/feedback/toast/toast.service.d.ts.map +1 -1
- package/lib/components/feedback/toast/toast.service.js +41 -0
- package/lib/components/feedback/toast/toast.styles.d.ts.map +1 -1
- package/lib/components/feedback/toast/toast.styles.js +80 -69
- package/lib/components/feedback/toast/toast.template.js +1 -1
- package/lib/components/forms/autocomplete/autocomplete.component.d.ts +14 -4
- package/lib/components/forms/autocomplete/autocomplete.component.d.ts.map +1 -1
- package/lib/components/forms/autocomplete/autocomplete.component.js +40 -96
- package/lib/components/forms/autocomplete/autocomplete.styles.d.ts.map +1 -1
- package/lib/components/forms/autocomplete/autocomplete.styles.js +191 -170
- package/lib/components/forms/autocomplete/autocomplete.template.js +7 -1
- package/lib/components/forms/button/button.styles.d.ts.map +1 -1
- package/lib/components/forms/button/button.styles.js +73 -57
- package/lib/components/forms/button-group/button-group-item.styles.d.ts.map +1 -1
- package/lib/components/forms/button-group/button-group-item.styles.js +11 -0
- package/lib/components/forms/button-group/button-group.styles.d.ts.map +1 -1
- package/lib/components/forms/button-group/button-group.styles.js +24 -19
- package/lib/components/forms/checkbox/checkbox.styles.d.ts.map +1 -1
- package/lib/components/forms/checkbox/checkbox.styles.js +94 -78
- package/lib/components/forms/date-picker/calendar.component.d.ts +20 -7
- package/lib/components/forms/date-picker/calendar.component.d.ts.map +1 -1
- package/lib/components/forms/date-picker/calendar.component.js +88 -13
- package/lib/components/forms/date-picker/calendar.styles.d.ts.map +1 -1
- package/lib/components/forms/date-picker/calendar.styles.js +171 -147
- package/lib/components/forms/date-picker/date-picker.component.d.ts +2 -3
- package/lib/components/forms/date-picker/date-picker.component.d.ts.map +1 -1
- package/lib/components/forms/date-picker/date-picker.component.js +70 -18
- package/lib/components/forms/date-picker/date-picker.styles.d.ts.map +1 -1
- package/lib/components/forms/date-picker/date-picker.styles.js +109 -92
- package/lib/components/forms/date-time-picker/date-time-picker.styles.d.ts.map +1 -1
- package/lib/components/forms/date-time-picker/date-time-picker.styles.js +99 -83
- package/lib/components/forms/date-time-picker/tz-utils.d.ts.map +1 -1
- package/lib/components/forms/date-time-picker/tz-utils.js +24 -3
- package/lib/components/forms/file-upload/file-upload-item.styles.d.ts.map +1 -1
- package/lib/components/forms/file-upload/file-upload-item.styles.js +13 -1
- package/lib/components/forms/file-upload/file-upload.styles.d.ts.map +1 -1
- package/lib/components/forms/file-upload/file-upload.styles.js +108 -92
- package/lib/components/forms/form-field/form-field.component.d.ts +18 -1
- package/lib/components/forms/form-field/form-field.component.d.ts.map +1 -1
- package/lib/components/forms/form-field/form-field.component.js +55 -16
- package/lib/components/forms/form-field/form-field.styles.d.ts.map +1 -1
- package/lib/components/forms/form-field/form-field.styles.js +92 -74
- package/lib/components/forms/input/input.styles.d.ts.map +1 -1
- package/lib/components/forms/input/input.styles.js +98 -82
- package/lib/components/forms/listbox-core/index.d.ts +3 -0
- package/lib/components/forms/listbox-core/index.d.ts.map +1 -0
- package/lib/components/forms/listbox-core/index.js +2 -0
- package/lib/components/forms/listbox-core/listbox-core.d.ts +57 -0
- package/lib/components/forms/listbox-core/listbox-core.d.ts.map +1 -0
- package/lib/components/forms/listbox-core/listbox-core.js +168 -0
- package/lib/components/forms/radio/radio-group.styles.js +1 -1
- package/lib/components/forms/radio/radio.styles.d.ts.map +1 -1
- package/lib/components/forms/radio/radio.styles.js +89 -73
- package/lib/components/forms/radio-card-group/radio-card-group.styles.d.ts.map +1 -1
- package/lib/components/forms/radio-card-group/radio-card-group.styles.js +40 -35
- package/lib/components/forms/radio-card-group/radio-card.styles.d.ts.map +1 -1
- package/lib/components/forms/radio-card-group/radio-card.styles.js +124 -108
- package/lib/components/forms/select/select.component.d.ts +12 -4
- package/lib/components/forms/select/select.component.d.ts.map +1 -1
- package/lib/components/forms/select/select.component.js +41 -110
- package/lib/components/forms/select/select.styles.d.ts.map +1 -1
- package/lib/components/forms/select/select.styles.js +181 -159
- package/lib/components/forms/select/select.template.d.ts.map +1 -1
- package/lib/components/forms/select/select.template.js +25 -9
- package/lib/components/forms/slider/slider.component.js +1 -1
- package/lib/components/forms/slider/slider.styles.d.ts.map +1 -1
- package/lib/components/forms/slider/slider.styles.js +93 -77
- package/lib/components/forms/slider/slider.template.d.ts.map +1 -1
- package/lib/components/forms/slider/slider.template.js +5 -1
- package/lib/components/forms/textarea/textarea.styles.d.ts.map +1 -1
- package/lib/components/forms/textarea/textarea.styles.js +97 -81
- package/lib/components/forms/time-picker/time-picker.component.d.ts +1 -2
- package/lib/components/forms/time-picker/time-picker.component.d.ts.map +1 -1
- package/lib/components/forms/time-picker/time-picker.component.js +8 -17
- package/lib/components/forms/time-picker/time-picker.styles.d.ts.map +1 -1
- package/lib/components/forms/time-picker/time-picker.styles.js +220 -194
- package/lib/components/forms/toggle/toggle.styles.d.ts.map +1 -1
- package/lib/components/forms/toggle/toggle.styles.js +95 -79
- package/lib/components/foundation/card/card.styles.d.ts.map +1 -1
- package/lib/components/foundation/card/card.styles.js +62 -46
- package/lib/components/foundation/container/container.styles.d.ts.map +1 -1
- package/lib/components/foundation/container/container.styles.js +15 -10
- package/lib/components/foundation/divider/divider.styles.d.ts.map +1 -1
- package/lib/components/foundation/divider/divider.styles.js +29 -24
- package/lib/components/foundation/stack/stack.styles.d.ts.map +1 -1
- package/lib/components/foundation/stack/stack.styles.js +16 -10
- package/lib/components/general/icon/icon.styles.d.ts.map +1 -1
- package/lib/components/general/icon/icon.styles.js +12 -8
- package/lib/components/navigation/breadcrumb/breadcrumb-item.template.d.ts.map +1 -1
- package/lib/components/navigation/breadcrumb/breadcrumb-item.template.js +5 -3
- package/lib/components/navigation/breadcrumb/breadcrumb.styles.d.ts.map +1 -1
- package/lib/components/navigation/breadcrumb/breadcrumb.styles.js +9 -4
- package/lib/components/navigation/pagination/pagination.styles.d.ts.map +1 -1
- package/lib/components/navigation/pagination/pagination.styles.js +74 -69
- package/lib/components/navigation/sidebar/sidebar-group.styles.d.ts.map +1 -1
- package/lib/components/navigation/sidebar/sidebar-group.styles.js +23 -18
- package/lib/components/navigation/sidebar/sidebar-item.styles.d.ts.map +1 -1
- package/lib/components/navigation/sidebar/sidebar-item.styles.js +105 -100
- package/lib/components/navigation/sidebar/sidebar-item.template.js +2 -2
- package/lib/components/navigation/sidebar/sidebar.styles.d.ts.map +1 -1
- package/lib/components/navigation/sidebar/sidebar.styles.js +180 -175
- package/lib/components/navigation/sidebar/sidebar.template.js +2 -2
- package/lib/components/navigation/steps/step.styles.d.ts.map +1 -1
- package/lib/components/navigation/steps/step.styles.js +155 -150
- package/lib/components/navigation/steps/steps.styles.d.ts.map +1 -1
- package/lib/components/navigation/steps/steps.styles.js +175 -170
- package/lib/components/navigation/tabs/tab-panel.styles.d.ts.map +1 -1
- package/lib/components/navigation/tabs/tab-panel.styles.js +12 -7
- package/lib/components/navigation/tabs/tab.styles.d.ts.map +1 -1
- package/lib/components/navigation/tabs/tab.styles.js +41 -36
- package/lib/components/navigation/tabs/tabs.component.d.ts.map +1 -1
- package/lib/components/navigation/tabs/tabs.component.js +4 -1
- package/lib/components/navigation/tabs/tabs.styles.d.ts.map +1 -1
- package/lib/components/navigation/tabs/tabs.styles.js +134 -129
- package/lib/components/overlays/dialog/dialog.component.d.ts +15 -2
- package/lib/components/overlays/dialog/dialog.component.d.ts.map +1 -1
- package/lib/components/overlays/dialog/dialog.component.js +33 -1
- package/lib/components/overlays/dialog/dialog.service.d.ts +8 -2
- package/lib/components/overlays/dialog/dialog.service.d.ts.map +1 -1
- package/lib/components/overlays/dialog/dialog.service.js +1 -0
- package/lib/components/overlays/dialog/dialog.styles.d.ts.map +1 -1
- package/lib/components/overlays/dialog/dialog.styles.js +78 -73
- package/lib/components/overlays/dialog/index.d.ts +1 -0
- package/lib/components/overlays/dialog/index.d.ts.map +1 -1
- package/lib/components/overlays/drawer/drawer.component.d.ts +18 -3
- package/lib/components/overlays/drawer/drawer.component.d.ts.map +1 -1
- package/lib/components/overlays/drawer/drawer.component.js +59 -16
- package/lib/components/overlays/drawer/drawer.styles.d.ts.map +1 -1
- package/lib/components/overlays/drawer/drawer.styles.js +82 -77
- package/lib/components/overlays/dropdown/dropdown-item.styles.d.ts.map +1 -1
- package/lib/components/overlays/dropdown/dropdown-item.styles.js +60 -43
- package/lib/components/overlays/dropdown/dropdown.styles.d.ts.map +1 -1
- package/lib/components/overlays/dropdown/dropdown.styles.js +35 -30
- package/lib/components/overlays/popover/popover.component.d.ts +12 -0
- package/lib/components/overlays/popover/popover.component.d.ts.map +1 -1
- package/lib/components/overlays/popover/popover.component.js +28 -1
- package/lib/components/overlays/popover/popover.styles.d.ts.map +1 -1
- package/lib/components/overlays/popover/popover.styles.js +36 -31
- package/lib/components/overlays/popover/popover.template.d.ts.map +1 -1
- package/lib/components/overlays/popover/popover.template.js +2 -0
- package/lib/components/overlays/tooltip/tooltip.component.d.ts +8 -5
- package/lib/components/overlays/tooltip/tooltip.component.d.ts.map +1 -1
- package/lib/components/overlays/tooltip/tooltip.component.js +10 -3
- package/lib/components/overlays/tooltip/tooltip.styles.d.ts.map +1 -1
- package/lib/components/overlays/tooltip/tooltip.styles.js +34 -28
- package/lib/components/pages/auth/auth-layout.styles.d.ts +1 -1
- package/lib/components/pages/auth/auth-layout.styles.d.ts.map +1 -1
- package/lib/components/pages/auth/auth-layout.styles.js +86 -81
- package/lib/components/pages/dashboard/dashboard-page.styles.d.ts.map +1 -1
- package/lib/components/pages/dashboard/dashboard-page.styles.js +39 -34
- package/lib/components/sections/app-shell/app-shell.styles.d.ts.map +1 -1
- package/lib/components/sections/app-shell/app-shell.styles.js +63 -57
- package/lib/components/sections/hero/hero-section.styles.js +97 -97
- package/lib/components/sections/page-header/page-header.styles.d.ts.map +1 -1
- package/lib/components/sections/page-header/page-header.styles.js +69 -64
- package/lib/components/sections/page-section/page-section.styles.d.ts.map +1 -1
- package/lib/components/sections/page-section/page-section.styles.js +56 -51
- package/lib/directives/tooltip.directive.d.ts.map +1 -1
- package/lib/directives/tooltip.directive.js +22 -3
- package/lib/theme/presets/base.preset.d.ts.map +1 -1
- package/lib/theme/presets/base.preset.js +17 -0
- package/lib/theme/presets/dark.preset.d.ts +8 -0
- package/lib/theme/presets/dark.preset.d.ts.map +1 -1
- package/lib/theme/presets/dark.preset.js +9 -0
- package/lib/theme/presets/light.preset.d.ts +6 -0
- package/lib/theme/presets/light.preset.d.ts.map +1 -1
- package/lib/theme/presets/light.preset.js +7 -0
- package/lib/theme/tokens/all-tokens.d.ts +10 -0
- package/lib/theme/tokens/all-tokens.d.ts.map +1 -1
- package/lib/theme/tokens/colors.tokens.d.ts +8 -0
- package/lib/theme/tokens/colors.tokens.d.ts.map +1 -1
- package/lib/theme/tokens/colors.tokens.js +11 -0
- package/lib/theme/tokens/transitions.tokens.d.ts +1 -0
- package/lib/theme/tokens/transitions.tokens.d.ts.map +1 -1
- package/lib/theme/tokens/transitions.tokens.js +3 -0
- package/lib/theme/tokens/typography.tokens.d.ts +1 -0
- package/lib/theme/tokens/typography.tokens.d.ts.map +1 -1
- package/lib/theme/tokens/typography.tokens.js +1 -0
- package/lib/utils/accessibility/cross-root-aria.d.ts +16 -8
- package/lib/utils/accessibility/cross-root-aria.d.ts.map +1 -1
- package/lib/utils/accessibility/cross-root-aria.js +58 -22
- package/lib/utils/accessibility/focus-trap.d.ts.map +1 -1
- package/lib/utils/accessibility/focus-trap.js +9 -19
- package/lib/utils/accessibility/focus-utils.d.ts +10 -1
- package/lib/utils/accessibility/focus-utils.d.ts.map +1 -1
- package/lib/utils/accessibility/focus-utils.js +48 -14
- package/lib/utils/accessibility/index.d.ts +2 -1
- package/lib/utils/accessibility/index.d.ts.map +1 -1
- package/lib/utils/accessibility/index.js +1 -1
- package/lib/utils/positioning/compute-position.d.ts +6 -1
- package/lib/utils/positioning/compute-position.d.ts.map +1 -1
- package/lib/utils/positioning/compute-position.js +3 -2
- package/lib/utils/positioning/middlewares/flip.middleware.js +2 -51
- package/package.json +8 -5
- package/assets/fonts/phosphor/Phosphor-Bold.svg +0 -3057
- package/assets/fonts/phosphor/Phosphor-Bold.ttf +0 -0
- package/assets/fonts/phosphor/Phosphor-Bold.woff +0 -0
- package/assets/fonts/phosphor/Phosphor-Fill.svg +0 -3057
- package/assets/fonts/phosphor/Phosphor-Fill.ttf +0 -0
- package/assets/fonts/phosphor/Phosphor-Fill.woff +0 -0
- package/assets/fonts/phosphor/Phosphor-Light.svg +0 -3057
- package/assets/fonts/phosphor/Phosphor-Light.ttf +0 -0
- package/assets/fonts/phosphor/Phosphor-Light.woff +0 -0
- package/assets/fonts/phosphor/Phosphor-Thin.svg +0 -3057
- package/assets/fonts/phosphor/Phosphor-Thin.ttf +0 -0
- package/assets/fonts/phosphor/Phosphor-Thin.woff +0 -0
- package/assets/fonts/phosphor/Phosphor.svg +0 -3056
- package/assets/fonts/phosphor/Phosphor.ttf +0 -0
- package/assets/fonts/phosphor/Phosphor.woff +0 -0
|
@@ -1,65 +1,69 @@
|
|
|
1
1
|
import { css } from '@melodicdev/core';
|
|
2
2
|
export const progressStyles = () => css `
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
/*
|
|
4
|
+
* Tokens. Rules read each one with its default as the var() fallback,
|
|
5
|
+
* so a value set on the element or inherited from any ancestor wins.
|
|
6
|
+
*
|
|
7
|
+
* Progress: track heights
|
|
8
|
+
* --ml-progress-sm-height: 4px
|
|
9
|
+
* --ml-progress-md-height: 8px
|
|
10
|
+
* --ml-progress-lg-height: 12px
|
|
11
|
+
*
|
|
12
|
+
* Track
|
|
13
|
+
* --ml-progress-track-color: var(--ml-color-surface-sunken)
|
|
14
|
+
* --ml-progress-track-radius: var(--ml-radius-full)
|
|
15
|
+
*
|
|
16
|
+
* Fill
|
|
17
|
+
* --ml-progress-fill-color: var(--ml-color-primary)
|
|
18
|
+
* --ml-progress-fill-radius: var(--ml-radius-full)
|
|
19
|
+
*
|
|
20
|
+
* Label / value text
|
|
21
|
+
* --ml-progress-label-font-size: var(--ml-text-sm)
|
|
22
|
+
* --ml-progress-label-font-weight: var(--ml-font-medium)
|
|
23
|
+
* --ml-progress-label-color: var(--ml-color-text)
|
|
24
|
+
*
|
|
25
|
+
* Floating tooltip
|
|
26
|
+
* --ml-progress-floating-font-size: var(--ml-text-xs)
|
|
27
|
+
* --ml-progress-floating-font-weight: var(--ml-font-medium)
|
|
28
|
+
* --ml-progress-floating-color: var(--ml-color-text-inverse)
|
|
29
|
+
* --ml-progress-floating-bg: var(--ml-color-text)
|
|
30
|
+
* --ml-progress-floating-radius: var(--ml-radius-md)
|
|
31
|
+
* --ml-progress-floating-padding-y: var(--ml-space-1)
|
|
32
|
+
* --ml-progress-floating-padding-x: var(--ml-space-2)
|
|
33
|
+
*
|
|
34
|
+
* Spacing
|
|
35
|
+
* --ml-progress-header-margin-bottom: var(--ml-space-2)
|
|
36
|
+
* --ml-progress-value-bottom-margin-top: var(--ml-space-2)
|
|
37
|
+
* --ml-progress-bar-row-gap: var(--ml-space-3)
|
|
38
|
+
*
|
|
39
|
+
* Transition
|
|
40
|
+
* --ml-progress-transition-duration: var(--ml-duration-300)
|
|
41
|
+
* --ml-progress-transition-easing: var(--ml-ease-out)
|
|
42
|
+
*
|
|
43
|
+
* Circle
|
|
44
|
+
* --ml-progress-circle-track-color: var(--ml-color-surface-sunken)
|
|
45
|
+
* --ml-progress-circle-fill-color: var(--ml-color-primary)
|
|
46
|
+
* --ml-progress-circle-value-font-weight: var(--ml-font-semibold)
|
|
47
|
+
* --ml-progress-circle-value-color: var(--ml-color-text)
|
|
48
|
+
* --ml-progress-circle-label-font-size: var(--ml-text-xs)
|
|
49
|
+
* --ml-progress-circle-label-color: var(--ml-color-text-muted)
|
|
50
|
+
* --ml-progress-circle-label-margin-top: var(--ml-space-0-5)
|
|
51
|
+
*
|
|
52
|
+
* Half circle
|
|
53
|
+
* --ml-progress-half-track-color: var(--ml-color-surface-sunken)
|
|
54
|
+
* --ml-progress-half-fill-color: var(--ml-color-primary)
|
|
55
|
+
* --ml-progress-half-value-font-weight: var(--ml-font-semibold)
|
|
56
|
+
* --ml-progress-half-value-color: var(--ml-color-text)
|
|
57
|
+
* --ml-progress-half-label-font-size: var(--ml-text-xs)
|
|
58
|
+
* --ml-progress-half-label-color: var(--ml-color-text-muted)
|
|
59
|
+
* --ml-progress-half-label-margin-top: var(--ml-space-0-5)
|
|
60
|
+
* --ml-progress-half-center-padding-bottom: var(--ml-space-1)
|
|
61
|
+
*/
|
|
8
62
|
|
|
63
|
+
:host {
|
|
9
64
|
display: block;
|
|
10
65
|
|
|
11
66
|
/* ---- Linear ---- */
|
|
12
|
-
|
|
13
|
-
/* Track */
|
|
14
|
-
--ml-progress-track-color: var(--ml-color-surface-sunken);
|
|
15
|
-
--ml-progress-track-radius: var(--ml-radius-full);
|
|
16
|
-
/* Fill */
|
|
17
|
-
--ml-progress-fill-color: var(--ml-color-primary);
|
|
18
|
-
--ml-progress-fill-radius: var(--ml-radius-full);
|
|
19
|
-
|
|
20
|
-
/* Label / value text */
|
|
21
|
-
--ml-progress-label-font-size: var(--ml-text-sm);
|
|
22
|
-
--ml-progress-label-font-weight: var(--ml-font-medium);
|
|
23
|
-
--ml-progress-label-color: var(--ml-color-text);
|
|
24
|
-
|
|
25
|
-
/* Floating tooltip */
|
|
26
|
-
--ml-progress-floating-font-size: var(--ml-text-xs);
|
|
27
|
-
--ml-progress-floating-font-weight: var(--ml-font-medium);
|
|
28
|
-
--ml-progress-floating-color: var(--ml-color-text-inverse);
|
|
29
|
-
--ml-progress-floating-bg: var(--ml-color-text);
|
|
30
|
-
--ml-progress-floating-radius: var(--ml-radius-md);
|
|
31
|
-
--ml-progress-floating-padding-y: var(--ml-space-1);
|
|
32
|
-
--ml-progress-floating-padding-x: var(--ml-space-2);
|
|
33
|
-
|
|
34
|
-
/* Spacing */
|
|
35
|
-
--ml-progress-header-margin-bottom: var(--ml-space-2);
|
|
36
|
-
--ml-progress-value-bottom-margin-top: var(--ml-space-2);
|
|
37
|
-
--ml-progress-bar-row-gap: var(--ml-space-3);
|
|
38
|
-
|
|
39
|
-
/* Transition */
|
|
40
|
-
--ml-progress-transition-duration: var(--ml-duration-300);
|
|
41
|
-
--ml-progress-transition-easing: var(--ml-ease-out);
|
|
42
|
-
|
|
43
|
-
/* ---- Circle ---- */
|
|
44
|
-
|
|
45
|
-
--ml-progress-circle-track-color: var(--ml-color-surface-sunken);
|
|
46
|
-
--ml-progress-circle-fill-color: var(--ml-color-primary);
|
|
47
|
-
--ml-progress-circle-value-font-weight: var(--ml-font-semibold);
|
|
48
|
-
--ml-progress-circle-value-color: var(--ml-color-text);
|
|
49
|
-
--ml-progress-circle-label-font-size: var(--ml-text-xs);
|
|
50
|
-
--ml-progress-circle-label-color: var(--ml-color-text-muted);
|
|
51
|
-
--ml-progress-circle-label-margin-top: var(--ml-space-0-5);
|
|
52
|
-
|
|
53
|
-
/* ---- Half circle ---- */
|
|
54
|
-
|
|
55
|
-
--ml-progress-half-track-color: var(--ml-color-surface-sunken);
|
|
56
|
-
--ml-progress-half-fill-color: var(--ml-color-primary);
|
|
57
|
-
--ml-progress-half-value-font-weight: var(--ml-font-semibold);
|
|
58
|
-
--ml-progress-half-value-color: var(--ml-color-text);
|
|
59
|
-
--ml-progress-half-label-font-size: var(--ml-text-xs);
|
|
60
|
-
--ml-progress-half-label-color: var(--ml-color-text-muted);
|
|
61
|
-
--ml-progress-half-label-margin-top: var(--ml-space-0-5);
|
|
62
|
-
--ml-progress-half-center-padding-bottom: var(--ml-space-1);
|
|
63
67
|
}
|
|
64
68
|
|
|
65
69
|
/* ===================== LINEAR ===================== */
|
|
@@ -68,31 +72,31 @@ export const progressStyles = () => css `
|
|
|
68
72
|
display: flex;
|
|
69
73
|
align-items: center;
|
|
70
74
|
justify-content: space-between;
|
|
71
|
-
margin-bottom: var(--ml-progress-header-margin-bottom);
|
|
75
|
+
margin-bottom: var(--ml-progress-header-margin-bottom, var(--ml-space-2));
|
|
72
76
|
}
|
|
73
77
|
|
|
74
78
|
.ml-progress__label {
|
|
75
|
-
font-size: var(--ml-progress-label-font-size);
|
|
76
|
-
font-weight: var(--ml-progress-label-font-weight);
|
|
77
|
-
color: var(--ml-progress-label-color);
|
|
79
|
+
font-size: var(--ml-progress-label-font-size, var(--ml-text-sm));
|
|
80
|
+
font-weight: var(--ml-progress-label-font-weight, var(--ml-font-medium));
|
|
81
|
+
color: var(--ml-progress-label-color, var(--ml-color-text));
|
|
78
82
|
}
|
|
79
83
|
|
|
80
84
|
.ml-progress__value {
|
|
81
|
-
font-size: var(--ml-progress-label-font-size);
|
|
82
|
-
font-weight: var(--ml-progress-label-font-weight);
|
|
83
|
-
color: var(--ml-progress-label-color);
|
|
85
|
+
font-size: var(--ml-progress-label-font-size, var(--ml-text-sm));
|
|
86
|
+
font-weight: var(--ml-progress-label-font-weight, var(--ml-font-medium));
|
|
87
|
+
color: var(--ml-progress-label-color, var(--ml-color-text));
|
|
84
88
|
}
|
|
85
89
|
|
|
86
90
|
.ml-progress__value--bottom {
|
|
87
91
|
display: block;
|
|
88
|
-
margin-top: var(--ml-progress-value-bottom-margin-top);
|
|
92
|
+
margin-top: var(--ml-progress-value-bottom-margin-top, var(--ml-space-2));
|
|
89
93
|
}
|
|
90
94
|
|
|
91
95
|
/* Bar row for label-right layout */
|
|
92
96
|
.ml-progress__bar-row {
|
|
93
97
|
display: flex;
|
|
94
98
|
align-items: center;
|
|
95
|
-
gap: var(--ml-progress-bar-row-gap);
|
|
99
|
+
gap: var(--ml-progress-bar-row-gap, var(--ml-space-3));
|
|
96
100
|
}
|
|
97
101
|
|
|
98
102
|
.ml-progress__track-wrapper {
|
|
@@ -103,28 +107,28 @@ export const progressStyles = () => css `
|
|
|
103
107
|
|
|
104
108
|
.ml-progress__track {
|
|
105
109
|
width: 100%;
|
|
106
|
-
background-color: var(--ml-progress-track-color);
|
|
107
|
-
border-radius: var(--ml-progress-track-radius);
|
|
110
|
+
background-color: var(--ml-progress-track-color, var(--ml-color-surface-sunken));
|
|
111
|
+
border-radius: var(--ml-progress-track-radius, var(--ml-radius-full));
|
|
108
112
|
overflow: hidden;
|
|
109
113
|
}
|
|
110
114
|
|
|
111
115
|
.ml-progress--sm .ml-progress__track {
|
|
112
|
-
height: var(--ml-progress-sm-height);
|
|
116
|
+
height: var(--ml-progress-sm-height, 4px);
|
|
113
117
|
}
|
|
114
118
|
|
|
115
119
|
.ml-progress--md .ml-progress__track {
|
|
116
|
-
height: var(--ml-progress-md-height);
|
|
120
|
+
height: var(--ml-progress-md-height, 8px);
|
|
117
121
|
}
|
|
118
122
|
|
|
119
123
|
.ml-progress--lg .ml-progress__track {
|
|
120
|
-
height: var(--ml-progress-lg-height);
|
|
124
|
+
height: var(--ml-progress-lg-height, 12px);
|
|
121
125
|
}
|
|
122
126
|
|
|
123
127
|
.ml-progress__fill {
|
|
124
128
|
height: 100%;
|
|
125
|
-
background-color: var(--ml-progress-fill-color);
|
|
126
|
-
border-radius: var(--ml-progress-fill-radius);
|
|
127
|
-
transition: width var(--ml-progress-transition-duration) var(--ml-progress-transition-easing);
|
|
129
|
+
background-color: var(--ml-progress-fill-color, var(--ml-color-primary));
|
|
130
|
+
border-radius: var(--ml-progress-fill-radius, var(--ml-radius-full));
|
|
131
|
+
transition: width var(--ml-progress-transition-duration, var(--ml-duration-300)) var(--ml-progress-transition-easing, var(--ml-ease-out));
|
|
128
132
|
}
|
|
129
133
|
|
|
130
134
|
/* Floating label */
|
|
@@ -148,12 +152,12 @@ export const progressStyles = () => css `
|
|
|
148
152
|
}
|
|
149
153
|
|
|
150
154
|
.ml-progress__floating-value {
|
|
151
|
-
font-size: var(--ml-progress-floating-font-size);
|
|
152
|
-
font-weight: var(--ml-progress-floating-font-weight);
|
|
153
|
-
color: var(--ml-progress-floating-color);
|
|
154
|
-
background-color: var(--ml-progress-floating-bg);
|
|
155
|
-
padding: var(--ml-progress-floating-padding-y) var(--ml-progress-floating-padding-x);
|
|
156
|
-
border-radius: var(--ml-progress-floating-radius);
|
|
155
|
+
font-size: var(--ml-progress-floating-font-size, var(--ml-text-xs));
|
|
156
|
+
font-weight: var(--ml-progress-floating-font-weight, var(--ml-font-medium));
|
|
157
|
+
color: var(--ml-progress-floating-color, var(--ml-color-text-inverse));
|
|
158
|
+
background-color: var(--ml-progress-floating-bg, var(--ml-color-text));
|
|
159
|
+
padding: var(--ml-progress-floating-padding-y, var(--ml-space-1)) var(--ml-progress-floating-padding-x, var(--ml-space-2));
|
|
160
|
+
border-radius: var(--ml-progress-floating-radius, var(--ml-radius-md));
|
|
157
161
|
white-space: nowrap;
|
|
158
162
|
line-height: 1;
|
|
159
163
|
}
|
|
@@ -166,11 +170,11 @@ export const progressStyles = () => css `
|
|
|
166
170
|
}
|
|
167
171
|
|
|
168
172
|
.ml-progress__floating-arrow--down {
|
|
169
|
-
border-top: 5px solid var(--ml-progress-floating-bg);
|
|
173
|
+
border-top: 5px solid var(--ml-progress-floating-bg, var(--ml-color-text));
|
|
170
174
|
}
|
|
171
175
|
|
|
172
176
|
.ml-progress__floating-arrow--up {
|
|
173
|
-
border-bottom: 5px solid var(--ml-progress-floating-bg);
|
|
177
|
+
border-bottom: 5px solid var(--ml-progress-floating-bg, var(--ml-color-text));
|
|
174
178
|
}
|
|
175
179
|
|
|
176
180
|
/* Linear color variants */
|
|
@@ -204,12 +208,12 @@ export const progressStyles = () => css `
|
|
|
204
208
|
}
|
|
205
209
|
|
|
206
210
|
.ml-progress-circle__track {
|
|
207
|
-
stroke: var(--ml-progress-circle-track-color);
|
|
211
|
+
stroke: var(--ml-progress-circle-track-color, var(--ml-color-surface-sunken));
|
|
208
212
|
}
|
|
209
213
|
|
|
210
214
|
.ml-progress-circle__fill {
|
|
211
|
-
stroke: var(--ml-progress-circle-fill-color);
|
|
212
|
-
transition: stroke-dashoffset var(--ml-progress-transition-duration) var(--ml-progress-transition-easing);
|
|
215
|
+
stroke: var(--ml-progress-circle-fill-color, var(--ml-color-primary));
|
|
216
|
+
transition: stroke-dashoffset var(--ml-progress-transition-duration, var(--ml-duration-300)) var(--ml-progress-transition-easing, var(--ml-ease-out));
|
|
213
217
|
}
|
|
214
218
|
|
|
215
219
|
.ml-progress-circle__center {
|
|
@@ -224,29 +228,29 @@ export const progressStyles = () => css `
|
|
|
224
228
|
|
|
225
229
|
.ml-progress-circle--sm .ml-progress-circle__value {
|
|
226
230
|
font-size: var(--ml-text-sm);
|
|
227
|
-
font-weight: var(--ml-progress-circle-value-font-weight);
|
|
228
|
-
color: var(--ml-progress-circle-value-color);
|
|
231
|
+
font-weight: var(--ml-progress-circle-value-font-weight, var(--ml-font-semibold));
|
|
232
|
+
color: var(--ml-progress-circle-value-color, var(--ml-color-text));
|
|
229
233
|
line-height: 1;
|
|
230
234
|
}
|
|
231
235
|
|
|
232
236
|
.ml-progress-circle--md .ml-progress-circle__value {
|
|
233
237
|
font-size: var(--ml-text-lg);
|
|
234
|
-
font-weight: var(--ml-progress-circle-value-font-weight);
|
|
235
|
-
color: var(--ml-progress-circle-value-color);
|
|
238
|
+
font-weight: var(--ml-progress-circle-value-font-weight, var(--ml-font-semibold));
|
|
239
|
+
color: var(--ml-progress-circle-value-color, var(--ml-color-text));
|
|
236
240
|
line-height: 1;
|
|
237
241
|
}
|
|
238
242
|
|
|
239
243
|
.ml-progress-circle--lg .ml-progress-circle__value {
|
|
240
244
|
font-size: var(--ml-text-2xl);
|
|
241
|
-
font-weight: var(--ml-progress-circle-value-font-weight);
|
|
242
|
-
color: var(--ml-progress-circle-value-color);
|
|
245
|
+
font-weight: var(--ml-progress-circle-value-font-weight, var(--ml-font-semibold));
|
|
246
|
+
color: var(--ml-progress-circle-value-color, var(--ml-color-text));
|
|
243
247
|
line-height: 1;
|
|
244
248
|
}
|
|
245
249
|
|
|
246
250
|
.ml-progress-circle__label {
|
|
247
|
-
font-size: var(--ml-progress-circle-label-font-size);
|
|
248
|
-
color: var(--ml-progress-circle-label-color);
|
|
249
|
-
margin-top: var(--ml-progress-circle-label-margin-top);
|
|
251
|
+
font-size: var(--ml-progress-circle-label-font-size, var(--ml-text-xs));
|
|
252
|
+
color: var(--ml-progress-circle-label-color, var(--ml-color-text-muted));
|
|
253
|
+
margin-top: var(--ml-progress-circle-label-margin-top, var(--ml-space-0-5));
|
|
250
254
|
line-height: 1;
|
|
251
255
|
}
|
|
252
256
|
|
|
@@ -286,12 +290,12 @@ export const progressStyles = () => css `
|
|
|
286
290
|
}
|
|
287
291
|
|
|
288
292
|
.ml-progress-half__track {
|
|
289
|
-
stroke: var(--ml-progress-half-track-color);
|
|
293
|
+
stroke: var(--ml-progress-half-track-color, var(--ml-color-surface-sunken));
|
|
290
294
|
}
|
|
291
295
|
|
|
292
296
|
.ml-progress-half__fill {
|
|
293
|
-
stroke: var(--ml-progress-half-fill-color);
|
|
294
|
-
transition: stroke-dashoffset var(--ml-progress-transition-duration) var(--ml-progress-transition-easing);
|
|
297
|
+
stroke: var(--ml-progress-half-fill-color, var(--ml-color-primary));
|
|
298
|
+
transition: stroke-dashoffset var(--ml-progress-transition-duration, var(--ml-duration-300)) var(--ml-progress-transition-easing, var(--ml-ease-out));
|
|
295
299
|
}
|
|
296
300
|
|
|
297
301
|
.ml-progress-half__center {
|
|
@@ -302,34 +306,34 @@ export const progressStyles = () => css `
|
|
|
302
306
|
align-items: center;
|
|
303
307
|
justify-content: flex-end;
|
|
304
308
|
text-align: center;
|
|
305
|
-
padding-bottom: var(--ml-progress-half-center-padding-bottom);
|
|
309
|
+
padding-bottom: var(--ml-progress-half-center-padding-bottom, var(--ml-space-1));
|
|
306
310
|
}
|
|
307
311
|
|
|
308
312
|
.ml-progress-half--sm .ml-progress-half__value {
|
|
309
313
|
font-size: var(--ml-text-sm);
|
|
310
|
-
font-weight: var(--ml-progress-half-value-font-weight);
|
|
311
|
-
color: var(--ml-progress-half-value-color);
|
|
314
|
+
font-weight: var(--ml-progress-half-value-font-weight, var(--ml-font-semibold));
|
|
315
|
+
color: var(--ml-progress-half-value-color, var(--ml-color-text));
|
|
312
316
|
line-height: 1;
|
|
313
317
|
}
|
|
314
318
|
|
|
315
319
|
.ml-progress-half--md .ml-progress-half__value {
|
|
316
320
|
font-size: var(--ml-text-lg);
|
|
317
|
-
font-weight: var(--ml-progress-half-value-font-weight);
|
|
318
|
-
color: var(--ml-progress-half-value-color);
|
|
321
|
+
font-weight: var(--ml-progress-half-value-font-weight, var(--ml-font-semibold));
|
|
322
|
+
color: var(--ml-progress-half-value-color, var(--ml-color-text));
|
|
319
323
|
line-height: 1;
|
|
320
324
|
}
|
|
321
325
|
|
|
322
326
|
.ml-progress-half--lg .ml-progress-half__value {
|
|
323
327
|
font-size: var(--ml-text-2xl);
|
|
324
|
-
font-weight: var(--ml-progress-half-value-font-weight);
|
|
325
|
-
color: var(--ml-progress-half-value-color);
|
|
328
|
+
font-weight: var(--ml-progress-half-value-font-weight, var(--ml-font-semibold));
|
|
329
|
+
color: var(--ml-progress-half-value-color, var(--ml-color-text));
|
|
326
330
|
line-height: 1;
|
|
327
331
|
}
|
|
328
332
|
|
|
329
333
|
.ml-progress-half__label {
|
|
330
|
-
font-size: var(--ml-progress-half-label-font-size);
|
|
331
|
-
color: var(--ml-progress-half-label-color);
|
|
332
|
-
margin-top: var(--ml-progress-half-label-margin-top);
|
|
334
|
+
font-size: var(--ml-progress-half-label-font-size, var(--ml-text-xs));
|
|
335
|
+
color: var(--ml-progress-half-label-color, var(--ml-color-text-muted));
|
|
336
|
+
margin-top: var(--ml-progress-half-label-margin-top, var(--ml-space-0-5));
|
|
333
337
|
line-height: 1;
|
|
334
338
|
}
|
|
335
339
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spinner.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/spinner/spinner.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"spinner.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/spinner/spinner.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,iDAiFzB,CAAC"}
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import { css } from '@melodicdev/core';
|
|
2
2
|
import { visuallyHiddenStyles } from '../../../utils/styles/visually-hidden.styles.js';
|
|
3
3
|
export const spinnerStyles = () => css `
|
|
4
|
+
/*
|
|
5
|
+
* Tokens. Rules read each one with its default as the var() fallback,
|
|
6
|
+
* so a value set on the element or inherited from any ancestor wins.
|
|
7
|
+
*
|
|
8
|
+
* Size — default md (1.5rem)
|
|
9
|
+
* --ml-spinner-size: 1.5rem
|
|
10
|
+
*
|
|
11
|
+
* Track opacity
|
|
12
|
+
* --ml-spinner-track-opacity: 0.25
|
|
13
|
+
*
|
|
14
|
+
* Animation
|
|
15
|
+
* --ml-spinner-animation-duration: 0.75s
|
|
16
|
+
*/
|
|
17
|
+
|
|
4
18
|
:host {
|
|
5
19
|
display: inline-flex;
|
|
6
20
|
align-items: center;
|
|
@@ -8,15 +22,6 @@ export const spinnerStyles = () => css `
|
|
|
8
22
|
|
|
9
23
|
/* Color — defaults to currentColor via stroke in SVG */
|
|
10
24
|
--ml-spinner-color: currentColor;
|
|
11
|
-
|
|
12
|
-
/* Size — default md (1.5rem) */
|
|
13
|
-
--ml-spinner-size: 1.5rem;
|
|
14
|
-
|
|
15
|
-
/* Track opacity */
|
|
16
|
-
--ml-spinner-track-opacity: 0.25;
|
|
17
|
-
|
|
18
|
-
/* Animation */
|
|
19
|
-
--ml-spinner-animation-duration: 0.75s;
|
|
20
25
|
}
|
|
21
26
|
|
|
22
27
|
.spinner {
|
|
@@ -26,11 +31,11 @@ export const spinnerStyles = () => css `
|
|
|
26
31
|
}
|
|
27
32
|
|
|
28
33
|
.spinner__svg {
|
|
29
|
-
animation: spin var(--ml-spinner-animation-duration) linear infinite;
|
|
34
|
+
animation: spin var(--ml-spinner-animation-duration, 0.75s) linear infinite;
|
|
30
35
|
}
|
|
31
36
|
|
|
32
37
|
.spinner__track {
|
|
33
|
-
opacity: var(--ml-spinner-track-opacity);
|
|
38
|
+
opacity: var(--ml-spinner-track-opacity, 0.25);
|
|
34
39
|
}
|
|
35
40
|
|
|
36
41
|
.spinner__indicator {
|
|
@@ -62,8 +67,8 @@ export const spinnerStyles = () => css `
|
|
|
62
67
|
.spinner--md .spinner__svg,
|
|
63
68
|
.spinner--lg .spinner__svg,
|
|
64
69
|
.spinner--xl .spinner__svg {
|
|
65
|
-
width: var(--ml-spinner-size);
|
|
66
|
-
height: var(--ml-spinner-size);
|
|
70
|
+
width: var(--ml-spinner-size, 1.5rem);
|
|
71
|
+
height: var(--ml-spinner-size, 1.5rem);
|
|
67
72
|
}
|
|
68
73
|
|
|
69
74
|
@keyframes spin {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { ToastService } from './toast.service.js';
|
|
2
|
+
export type { IToastRef } from './toast.service.js';
|
|
2
3
|
export type { IToastConfig, ToastVariant, ToastPosition } from './toast-config.interface.js';
|
|
3
4
|
export { ToastComponent } from './toast.component.js';
|
|
4
5
|
export { toastTemplate } from './toast.template.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/toast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE7F,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/toast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE7F,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast-container.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/toast/toast-container.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"toast-container.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/toast/toast-container.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,iDAiFhC,CAAC"}
|
|
@@ -4,6 +4,26 @@ export const toastContainerStyles = () => css `
|
|
|
4
4
|
display: block;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
+
/*
|
|
8
|
+
* ToastService shows the container as a manual popover so it renders in
|
|
9
|
+
* the top layer (above modal dialogs). Undo the UA popover box so the
|
|
10
|
+
* host stays what it always was: an unstyled, click-through wrapper
|
|
11
|
+
* around the fixed-position stack.
|
|
12
|
+
*/
|
|
13
|
+
:host([popover]) {
|
|
14
|
+
position: fixed;
|
|
15
|
+
inset: 0;
|
|
16
|
+
width: auto;
|
|
17
|
+
height: auto;
|
|
18
|
+
margin: 0;
|
|
19
|
+
padding: 0;
|
|
20
|
+
border: 0;
|
|
21
|
+
background: transparent;
|
|
22
|
+
color: inherit;
|
|
23
|
+
overflow: visible;
|
|
24
|
+
pointer-events: none;
|
|
25
|
+
}
|
|
26
|
+
|
|
7
27
|
.ml-toast-container {
|
|
8
28
|
position: fixed;
|
|
9
29
|
z-index: 9999;
|
|
@@ -26,8 +26,24 @@ export declare class ToastComponent implements IElementRef, OnCreate, OnDestroy
|
|
|
26
26
|
/** @deprecated Use `toastTitle` (attribute `toast-title`); `title` collides with the global HTML attribute. */
|
|
27
27
|
get title(): string;
|
|
28
28
|
set title(value: string);
|
|
29
|
+
/** Time left on the auto-dismiss timer, in ms (0 = no timer pending). */
|
|
30
|
+
private _remaining;
|
|
31
|
+
private _startedAt;
|
|
29
32
|
onCreate(): void;
|
|
30
33
|
onDestroy(): void;
|
|
34
|
+
/**
|
|
35
|
+
* Role for the inner wrapper. ToastService puts the live-region role on the
|
|
36
|
+
* host element; repeating it on the wrapper nested one live region inside
|
|
37
|
+
* another and some screen readers announced the toast twice. A standalone
|
|
38
|
+
* `<ml-toast>` with no host role keeps the role here.
|
|
39
|
+
*/
|
|
40
|
+
get innerRole(): string | undefined;
|
|
41
|
+
private startTimer;
|
|
42
|
+
private clearTimer;
|
|
43
|
+
private _hovered;
|
|
44
|
+
private _focused;
|
|
45
|
+
private readonly handleHoldStart;
|
|
46
|
+
private readonly handleHoldEnd;
|
|
31
47
|
dismiss: () => void;
|
|
32
48
|
renderIcon: () => import("@melodicdev/core").TemplateResult;
|
|
33
49
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast.component.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/toast/toast.component.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAKhE;;;;;;;;;GASG;AACH,qBAMa,cAAe,YAAW,WAAW,EAAE,QAAQ,EAAE,SAAS;IAC/D,UAAU,EAAG,WAAW,CAAC;IAEhC,oBAAoB;IACb,OAAO,EAAE,YAAY,CAAU;IAEtC,2CAA2C;IACpC,UAAU,SAAM;IAEvB,oBAAoB;IACb,OAAO,SAAM;IAEpB,wDAAwD;IACjD,QAAQ,SAAQ;IAEvB,0BAA0B;IACnB,WAAW,UAAQ;IAE1B,OAAO,CAAC,MAAM,CAA8C;IAE5D,+GAA+G;IAC/G,IAAW,KAAK,IAAI,MAAM,CAEzB;IACD,IAAW,KAAK,CAAC,KAAK,EAAE,MAAM,EAG7B;
|
|
1
|
+
{"version":3,"file":"toast.component.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/toast/toast.component.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAKhE;;;;;;;;;GASG;AACH,qBAMa,cAAe,YAAW,WAAW,EAAE,QAAQ,EAAE,SAAS;IAC/D,UAAU,EAAG,WAAW,CAAC;IAEhC,oBAAoB;IACb,OAAO,EAAE,YAAY,CAAU;IAEtC,2CAA2C;IACpC,UAAU,SAAM;IAEvB,oBAAoB;IACb,OAAO,SAAM;IAEpB,wDAAwD;IACjD,QAAQ,SAAQ;IAEvB,0BAA0B;IACnB,WAAW,UAAQ;IAE1B,OAAO,CAAC,MAAM,CAA8C;IAE5D,+GAA+G;IAC/G,IAAW,KAAK,IAAI,MAAM,CAEzB;IACD,IAAW,KAAK,CAAC,KAAK,EAAE,MAAM,EAG7B;IAED,yEAAyE;IACzE,OAAO,CAAC,UAAU,CAAK;IACvB,OAAO,CAAC,UAAU,CAAK;IAEhB,QAAQ,IAAI,IAAI;IAchB,SAAS,IAAI,IAAI;IAaxB;;;;;OAKG;IACH,IAAW,SAAS,IAAI,MAAM,GAAG,SAAS,CAKzC;IAED,OAAO,CAAC,UAAU;IAOlB,OAAO,CAAC,UAAU;IAOlB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,QAAQ,CAAS;IAEzB,OAAO,CAAC,QAAQ,CAAC,eAAe,CAS9B;IAEF,OAAO,CAAC,QAAQ,CAAC,aAAa,CAS5B;IAEK,OAAO,QAAO,IAAI,CAYvB;IAEK,UAAU,kDASf;CACF"}
|
|
@@ -31,11 +31,36 @@ let ToastComponent = class ToastComponent {
|
|
|
31
31
|
/** Show dismiss button */
|
|
32
32
|
this.dismissible = true;
|
|
33
33
|
this._timer = null;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
/** Time left on the auto-dismiss timer, in ms (0 = no timer pending). */
|
|
35
|
+
this._remaining = 0;
|
|
36
|
+
this._startedAt = 0;
|
|
37
|
+
this._hovered = false;
|
|
38
|
+
this._focused = false;
|
|
39
|
+
this.handleHoldStart = (event) => {
|
|
40
|
+
if (event.type === 'mouseenter')
|
|
41
|
+
this._hovered = true;
|
|
42
|
+
else
|
|
43
|
+
this._focused = true;
|
|
44
|
+
if (!this._timer) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
this.clearTimer();
|
|
48
|
+
this._remaining = Math.max(0, this._remaining - (Date.now() - this._startedAt));
|
|
49
|
+
};
|
|
50
|
+
this.handleHoldEnd = (event) => {
|
|
51
|
+
if (event.type === 'mouseleave')
|
|
52
|
+
this._hovered = false;
|
|
53
|
+
else
|
|
54
|
+
this._focused = false;
|
|
55
|
+
// Still held by the other input modality, or nothing left to resume.
|
|
56
|
+
if (this._hovered || this._focused || this._timer || this._remaining <= 0) {
|
|
57
|
+
return;
|
|
38
58
|
}
|
|
59
|
+
this.startTimer(this._remaining);
|
|
60
|
+
};
|
|
61
|
+
this.dismiss = () => {
|
|
62
|
+
this.clearTimer();
|
|
63
|
+
this._remaining = 0;
|
|
39
64
|
this.elementRef.dispatchEvent(new CustomEvent('ml:dismiss', {
|
|
40
65
|
bubbles: true,
|
|
41
66
|
composed: true
|
|
@@ -61,8 +86,15 @@ let ToastComponent = class ToastComponent {
|
|
|
61
86
|
this.toastTitle = value;
|
|
62
87
|
}
|
|
63
88
|
onCreate() {
|
|
89
|
+
// WCAG 2.2.1: a message that disappears on a timer must be pausable.
|
|
90
|
+
// Hovering or focusing the toast holds it open; leaving resumes the
|
|
91
|
+
// countdown with whatever time was left.
|
|
92
|
+
this.elementRef.addEventListener('mouseenter', this.handleHoldStart);
|
|
93
|
+
this.elementRef.addEventListener('mouseleave', this.handleHoldEnd);
|
|
94
|
+
this.elementRef.addEventListener('focusin', this.handleHoldStart);
|
|
95
|
+
this.elementRef.addEventListener('focusout', this.handleHoldEnd);
|
|
64
96
|
if (this.duration > 0) {
|
|
65
|
-
this.
|
|
97
|
+
this.startTimer(this.duration);
|
|
66
98
|
}
|
|
67
99
|
}
|
|
68
100
|
onDestroy() {
|
|
@@ -70,6 +102,32 @@ let ToastComponent = class ToastComponent {
|
|
|
70
102
|
// the container being torn down) left the timer armed; it then ran
|
|
71
103
|
// dismiss() on a detached element and kept the component alive until
|
|
72
104
|
// it fired.
|
|
105
|
+
this.clearTimer();
|
|
106
|
+
this._remaining = 0;
|
|
107
|
+
this.elementRef.removeEventListener('mouseenter', this.handleHoldStart);
|
|
108
|
+
this.elementRef.removeEventListener('mouseleave', this.handleHoldEnd);
|
|
109
|
+
this.elementRef.removeEventListener('focusin', this.handleHoldStart);
|
|
110
|
+
this.elementRef.removeEventListener('focusout', this.handleHoldEnd);
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Role for the inner wrapper. ToastService puts the live-region role on the
|
|
114
|
+
* host element; repeating it on the wrapper nested one live region inside
|
|
115
|
+
* another and some screen readers announced the toast twice. A standalone
|
|
116
|
+
* `<ml-toast>` with no host role keeps the role here.
|
|
117
|
+
*/
|
|
118
|
+
get innerRole() {
|
|
119
|
+
if (this.elementRef?.hasAttribute('role')) {
|
|
120
|
+
return undefined;
|
|
121
|
+
}
|
|
122
|
+
return this.variant === 'error' ? 'alert' : 'status';
|
|
123
|
+
}
|
|
124
|
+
startTimer(ms) {
|
|
125
|
+
this.clearTimer();
|
|
126
|
+
this._remaining = ms;
|
|
127
|
+
this._startedAt = Date.now();
|
|
128
|
+
this._timer = setTimeout(() => this.dismiss(), ms);
|
|
129
|
+
}
|
|
130
|
+
clearTimer() {
|
|
73
131
|
if (this._timer) {
|
|
74
132
|
clearTimeout(this._timer);
|
|
75
133
|
this._timer = null;
|
|
@@ -48,5 +48,19 @@ export declare class ToastService {
|
|
|
48
48
|
private forget;
|
|
49
49
|
private enforceMaxVisible;
|
|
50
50
|
private ensureContainer;
|
|
51
|
+
/**
|
|
52
|
+
* Put the container in the top layer, above everything already there.
|
|
53
|
+
*
|
|
54
|
+
* As an ordinary fixed-position child of <body> the container sat UNDER
|
|
55
|
+
* any modal `<dialog>` (ml-dialog, ml-drawer), whatever its z-index — a
|
|
56
|
+
* toast raised while a dialog was open was hidden behind the backdrop.
|
|
57
|
+
* A manual popover is rendered in the top layer; re-showing it for each
|
|
58
|
+
* new toast moves it above a dialog opened since the last one.
|
|
59
|
+
*
|
|
60
|
+
* Note: the platform still makes everything outside an open modal dialog
|
|
61
|
+
* inert, so such a toast is visible but its dismiss button is not
|
|
62
|
+
* clickable until the dialog closes.
|
|
63
|
+
*/
|
|
64
|
+
private raiseContainer;
|
|
51
65
|
}
|
|
52
66
|
//# sourceMappingURL=toast.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast.service.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/toast/toast.service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE/E;;;;;;;;;;;;GAYG;AACH,mEAAmE;AACnE,MAAM,WAAW,SAAS;IACzB,yDAAyD;IACzD,OAAO,IAAI,IAAI,CAAC;IAChB,mEAAmE;IACnE,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;CAC9B;AAED,qBACa,YAAY;IACxB,OAAO,CAAC,YAAY,CAA4B;IAChD,OAAO,CAAC,SAAS,CAA8B;IAC/C,gDAAgD;IAChD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAqB;IAC7C,OAAO,CAAC,WAAW,CAAK;IAExB;;;;OAIG;IACI,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAKvC,8CAA8C;IACvC,WAAW,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI;IAQjD,gFAAgF;IACzE,IAAI,CAAC,MAAM,EAAE,YAAY,GAAG,SAAS;
|
|
1
|
+
{"version":3,"file":"toast.service.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/toast/toast.service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE/E;;;;;;;;;;;;GAYG;AACH,mEAAmE;AACnE,MAAM,WAAW,SAAS;IACzB,yDAAyD;IACzD,OAAO,IAAI,IAAI,CAAC;IAChB,mEAAmE;IACnE,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;CAC9B;AAED,qBACa,YAAY;IACxB,OAAO,CAAC,YAAY,CAA4B;IAChD,OAAO,CAAC,SAAS,CAA8B;IAC/C,gDAAgD;IAChD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAqB;IAC7C,OAAO,CAAC,WAAW,CAAK;IAExB;;;;OAIG;IACI,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAKvC,8CAA8C;IACvC,WAAW,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI;IAQjD,gFAAgF;IACzE,IAAI,CAAC,MAAM,EAAE,YAAY,GAAG,SAAS;IA+B5C,yBAAyB;IAClB,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS;IAIvD,2BAA2B;IACpB,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS;IAI1D,2BAA2B;IACpB,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS;IAI1D,0BAA0B;IACnB,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS;IAIxD,8CAA8C;IACvC,UAAU,IAAI,IAAI;IAOzB,OAAO,CAAC,MAAM;IAOd,OAAO,CAAC,iBAAiB;IAWzB,OAAO,CAAC,eAAe;IAYvB;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,cAAc;CA4BtB"}
|
|
@@ -49,6 +49,7 @@ let ToastService = class ToastService {
|
|
|
49
49
|
// to be role="alert", which interrupts.
|
|
50
50
|
toast.setAttribute('role', config.variant === 'error' ? 'alert' : 'status');
|
|
51
51
|
container.appendChild(toast);
|
|
52
|
+
this.raiseContainer(container);
|
|
52
53
|
this._active.push(toast);
|
|
53
54
|
toast.addEventListener('ml:dismiss', () => this.forget(toast), { once: true });
|
|
54
55
|
this.enforceMaxVisible();
|
|
@@ -107,6 +108,46 @@ let ToastService = class ToastService {
|
|
|
107
108
|
document.body.appendChild(this._containerEl);
|
|
108
109
|
return this._containerEl;
|
|
109
110
|
}
|
|
111
|
+
/**
|
|
112
|
+
* Put the container in the top layer, above everything already there.
|
|
113
|
+
*
|
|
114
|
+
* As an ordinary fixed-position child of <body> the container sat UNDER
|
|
115
|
+
* any modal `<dialog>` (ml-dialog, ml-drawer), whatever its z-index — a
|
|
116
|
+
* toast raised while a dialog was open was hidden behind the backdrop.
|
|
117
|
+
* A manual popover is rendered in the top layer; re-showing it for each
|
|
118
|
+
* new toast moves it above a dialog opened since the last one.
|
|
119
|
+
*
|
|
120
|
+
* Note: the platform still makes everything outside an open modal dialog
|
|
121
|
+
* inert, so such a toast is visible but its dismiss button is not
|
|
122
|
+
* clickable until the dialog closes.
|
|
123
|
+
*/
|
|
124
|
+
raiseContainer(container) {
|
|
125
|
+
if (typeof container.showPopover !== 'function') {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
if (container.getAttribute('popover') !== 'manual') {
|
|
129
|
+
container.setAttribute('popover', 'manual');
|
|
130
|
+
}
|
|
131
|
+
// Hiding first re-inserts it at the top of the top layer. Skip that
|
|
132
|
+
// while the user has focus inside a toast — hiding a popover moves
|
|
133
|
+
// focus out of it.
|
|
134
|
+
if (!container.contains(document.activeElement)) {
|
|
135
|
+
try {
|
|
136
|
+
container.hidePopover();
|
|
137
|
+
}
|
|
138
|
+
catch {
|
|
139
|
+
// Not showing yet.
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
try {
|
|
143
|
+
container.showPopover();
|
|
144
|
+
}
|
|
145
|
+
catch {
|
|
146
|
+
// Popover API refused: fall back to plain fixed positioning
|
|
147
|
+
// rather than leaving a hidden [popover] element behind.
|
|
148
|
+
container.removeAttribute('popover');
|
|
149
|
+
}
|
|
150
|
+
}
|
|
110
151
|
};
|
|
111
152
|
ToastService = __decorate([
|
|
112
153
|
Injectable()
|