@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,66 +1,71 @@
|
|
|
1
1
|
import { css } from '@melodicdev/core';
|
|
2
2
|
export const pageHeaderStyles = () => css `
|
|
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
|
+
* Padding
|
|
8
|
+
* --ml-page-header-padding: var(--ml-space-6) var(--ml-space-6) var(--ml-space-4)
|
|
9
|
+
* --ml-page-header-compact-padding: var(--ml-space-4) var(--ml-space-6) var(--ml-space-3)
|
|
10
|
+
* --ml-page-header-mobile-padding: var(--ml-space-4)
|
|
11
|
+
*
|
|
12
|
+
* Font
|
|
13
|
+
* --ml-page-header-font-family: var(--ml-font-sans)
|
|
14
|
+
* --ml-page-header-color: var(--ml-color-text)
|
|
15
|
+
*
|
|
16
|
+
* Border
|
|
17
|
+
* --ml-page-header-border-width: var(--ml-border)
|
|
18
|
+
* --ml-page-header-border-color: var(--ml-color-border)
|
|
19
|
+
*
|
|
20
|
+
* Title
|
|
21
|
+
* --ml-page-header-title-size: var(--ml-text-2xl)
|
|
22
|
+
* --ml-page-header-title-weight: var(--ml-font-semibold)
|
|
23
|
+
* --ml-page-header-title-line-height: var(--ml-leading-tight)
|
|
24
|
+
* --ml-page-header-title-color: var(--ml-color-text)
|
|
25
|
+
* --ml-page-header-compact-title-size: var(--ml-text-lg)
|
|
26
|
+
*
|
|
27
|
+
* Description
|
|
28
|
+
* --ml-page-header-description-size: var(--ml-text-sm)
|
|
29
|
+
* --ml-page-header-description-line-height: var(--ml-leading-normal)
|
|
30
|
+
* --ml-page-header-description-color: var(--ml-color-text-secondary)
|
|
31
|
+
*
|
|
32
|
+
* Spacing
|
|
33
|
+
* --ml-page-header-breadcrumb-margin: var(--ml-space-3)
|
|
34
|
+
* --ml-page-header-main-gap: var(--ml-space-4)
|
|
35
|
+
* --ml-page-header-content-gap: var(--ml-space-1)
|
|
36
|
+
* --ml-page-header-meta-gap: var(--ml-space-2)
|
|
37
|
+
* --ml-page-header-meta-margin: var(--ml-space-2)
|
|
38
|
+
* --ml-page-header-actions-gap: var(--ml-space-2)
|
|
39
|
+
* --ml-page-header-centered-actions-margin: var(--ml-space-4)
|
|
40
|
+
* --ml-page-header-tabs-margin: var(--ml-space-4)
|
|
41
|
+
*/
|
|
42
|
+
|
|
3
43
|
:host {
|
|
4
44
|
display: block;
|
|
5
|
-
|
|
6
|
-
/* Padding */
|
|
7
|
-
--ml-page-header-padding: var(--ml-space-6) var(--ml-space-6) var(--ml-space-4);
|
|
8
|
-
--ml-page-header-compact-padding: var(--ml-space-4) var(--ml-space-6) var(--ml-space-3);
|
|
9
|
-
--ml-page-header-mobile-padding: var(--ml-space-4);
|
|
10
|
-
|
|
11
|
-
/* Font */
|
|
12
|
-
--ml-page-header-font-family: var(--ml-font-sans);
|
|
13
|
-
--ml-page-header-color: var(--ml-color-text);
|
|
14
|
-
|
|
15
|
-
/* Border */
|
|
16
|
-
--ml-page-header-border-width: var(--ml-border);
|
|
17
|
-
--ml-page-header-border-color: var(--ml-color-border);
|
|
18
|
-
|
|
19
|
-
/* Title */
|
|
20
|
-
--ml-page-header-title-size: var(--ml-text-2xl);
|
|
21
|
-
--ml-page-header-title-weight: var(--ml-font-semibold);
|
|
22
|
-
--ml-page-header-title-line-height: var(--ml-leading-tight);
|
|
23
|
-
--ml-page-header-title-color: var(--ml-color-text);
|
|
24
|
-
--ml-page-header-compact-title-size: var(--ml-text-lg);
|
|
25
|
-
|
|
26
|
-
/* Description */
|
|
27
|
-
--ml-page-header-description-size: var(--ml-text-sm);
|
|
28
|
-
--ml-page-header-description-line-height: var(--ml-leading-normal);
|
|
29
|
-
--ml-page-header-description-color: var(--ml-color-text-secondary);
|
|
30
|
-
|
|
31
|
-
/* Spacing */
|
|
32
|
-
--ml-page-header-breadcrumb-margin: var(--ml-space-3);
|
|
33
|
-
--ml-page-header-main-gap: var(--ml-space-4);
|
|
34
|
-
--ml-page-header-content-gap: var(--ml-space-1);
|
|
35
|
-
--ml-page-header-meta-gap: var(--ml-space-2);
|
|
36
|
-
--ml-page-header-meta-margin: var(--ml-space-2);
|
|
37
|
-
--ml-page-header-actions-gap: var(--ml-space-2);
|
|
38
|
-
--ml-page-header-centered-actions-margin: var(--ml-space-4);
|
|
39
|
-
--ml-page-header-tabs-margin: var(--ml-space-4);
|
|
40
45
|
}
|
|
41
46
|
|
|
42
47
|
/* ============================================
|
|
43
48
|
PAGE HEADER CONTAINER
|
|
44
49
|
============================================ */
|
|
45
50
|
.ml-page-header {
|
|
46
|
-
padding: var(--ml-page-header-padding);
|
|
47
|
-
font-family: var(--ml-page-header-font-family);
|
|
48
|
-
color: var(--ml-page-header-color);
|
|
51
|
+
padding: var(--ml-page-header-padding, var(--ml-space-6) var(--ml-space-6) var(--ml-space-4));
|
|
52
|
+
font-family: var(--ml-page-header-font-family, var(--ml-font-sans));
|
|
53
|
+
color: var(--ml-page-header-color, var(--ml-color-text));
|
|
49
54
|
}
|
|
50
55
|
|
|
51
56
|
.ml-page-header--divider {
|
|
52
|
-
border-bottom: var(--ml-page-header-border-width) solid var(--ml-page-header-border-color);
|
|
57
|
+
border-bottom: var(--ml-page-header-border-width, var(--ml-border)) solid var(--ml-page-header-border-color, var(--ml-color-border));
|
|
53
58
|
}
|
|
54
59
|
|
|
55
60
|
/* ============================================
|
|
56
61
|
COMPACT VARIANT
|
|
57
62
|
============================================ */
|
|
58
63
|
.ml-page-header--compact {
|
|
59
|
-
padding: var(--ml-page-header-compact-padding);
|
|
64
|
+
padding: var(--ml-page-header-compact-padding, var(--ml-space-4) var(--ml-space-6) var(--ml-space-3));
|
|
60
65
|
}
|
|
61
66
|
|
|
62
67
|
.ml-page-header--compact .ml-page-header__title h1 {
|
|
63
|
-
font-size: var(--ml-page-header-compact-title-size);
|
|
68
|
+
font-size: var(--ml-page-header-compact-title-size, var(--ml-text-lg));
|
|
64
69
|
}
|
|
65
70
|
|
|
66
71
|
/* ============================================
|
|
@@ -80,7 +85,7 @@ export const pageHeaderStyles = () => css `
|
|
|
80
85
|
}
|
|
81
86
|
|
|
82
87
|
.ml-page-header--centered .ml-page-header__actions {
|
|
83
|
-
margin-top: var(--ml-page-header-centered-actions-margin);
|
|
88
|
+
margin-top: var(--ml-page-header-centered-actions-margin, var(--ml-space-4));
|
|
84
89
|
}
|
|
85
90
|
|
|
86
91
|
.ml-page-header--centered .ml-page-header__breadcrumb {
|
|
@@ -92,7 +97,7 @@ export const pageHeaderStyles = () => css `
|
|
|
92
97
|
============================================ */
|
|
93
98
|
.ml-page-header__breadcrumb {
|
|
94
99
|
display: flex;
|
|
95
|
-
margin-bottom: var(--ml-page-header-breadcrumb-margin);
|
|
100
|
+
margin-bottom: var(--ml-page-header-breadcrumb-margin, var(--ml-space-3));
|
|
96
101
|
}
|
|
97
102
|
|
|
98
103
|
/* ============================================
|
|
@@ -102,7 +107,7 @@ export const pageHeaderStyles = () => css `
|
|
|
102
107
|
display: flex;
|
|
103
108
|
align-items: flex-start;
|
|
104
109
|
justify-content: space-between;
|
|
105
|
-
gap: var(--ml-page-header-main-gap);
|
|
110
|
+
gap: var(--ml-page-header-main-gap, var(--ml-space-4));
|
|
106
111
|
}
|
|
107
112
|
|
|
108
113
|
/* ============================================
|
|
@@ -111,7 +116,7 @@ export const pageHeaderStyles = () => css `
|
|
|
111
116
|
.ml-page-header__content {
|
|
112
117
|
display: flex;
|
|
113
118
|
flex-direction: column;
|
|
114
|
-
gap: var(--ml-page-header-content-gap);
|
|
119
|
+
gap: var(--ml-page-header-content-gap, var(--ml-space-1));
|
|
115
120
|
min-width: 0;
|
|
116
121
|
flex: 1;
|
|
117
122
|
}
|
|
@@ -121,18 +126,18 @@ export const pageHeaderStyles = () => css `
|
|
|
121
126
|
============================================ */
|
|
122
127
|
.ml-page-header__title h1 {
|
|
123
128
|
margin: 0;
|
|
124
|
-
font-size: var(--ml-page-header-title-size);
|
|
125
|
-
font-weight: var(--ml-page-header-title-weight);
|
|
126
|
-
line-height: var(--ml-page-header-title-line-height);
|
|
127
|
-
color: var(--ml-page-header-title-color);
|
|
129
|
+
font-size: var(--ml-page-header-title-size, var(--ml-text-2xl));
|
|
130
|
+
font-weight: var(--ml-page-header-title-weight, var(--ml-font-semibold));
|
|
131
|
+
line-height: var(--ml-page-header-title-line-height, var(--ml-leading-tight));
|
|
132
|
+
color: var(--ml-page-header-title-color, var(--ml-color-text));
|
|
128
133
|
}
|
|
129
134
|
|
|
130
135
|
.ml-page-header__title ::slotted(*) {
|
|
131
136
|
margin: 0;
|
|
132
|
-
font-size: var(--ml-page-header-title-size);
|
|
133
|
-
font-weight: var(--ml-page-header-title-weight);
|
|
134
|
-
line-height: var(--ml-page-header-title-line-height);
|
|
135
|
-
color: var(--ml-page-header-title-color);
|
|
137
|
+
font-size: var(--ml-page-header-title-size, var(--ml-text-2xl));
|
|
138
|
+
font-weight: var(--ml-page-header-title-weight, var(--ml-font-semibold));
|
|
139
|
+
line-height: var(--ml-page-header-title-line-height, var(--ml-leading-tight));
|
|
140
|
+
color: var(--ml-page-header-title-color, var(--ml-color-text));
|
|
136
141
|
}
|
|
137
142
|
|
|
138
143
|
/* ============================================
|
|
@@ -140,16 +145,16 @@ export const pageHeaderStyles = () => css `
|
|
|
140
145
|
============================================ */
|
|
141
146
|
.ml-page-header__description p {
|
|
142
147
|
margin: 0;
|
|
143
|
-
font-size: var(--ml-page-header-description-size);
|
|
144
|
-
line-height: var(--ml-page-header-description-line-height);
|
|
145
|
-
color: var(--ml-page-header-description-color);
|
|
148
|
+
font-size: var(--ml-page-header-description-size, var(--ml-text-sm));
|
|
149
|
+
line-height: var(--ml-page-header-description-line-height, var(--ml-leading-normal));
|
|
150
|
+
color: var(--ml-page-header-description-color, var(--ml-color-text-secondary));
|
|
146
151
|
}
|
|
147
152
|
|
|
148
153
|
.ml-page-header__description ::slotted(*) {
|
|
149
154
|
margin: 0;
|
|
150
|
-
font-size: var(--ml-page-header-description-size);
|
|
151
|
-
line-height: var(--ml-page-header-description-line-height);
|
|
152
|
-
color: var(--ml-page-header-description-color);
|
|
155
|
+
font-size: var(--ml-page-header-description-size, var(--ml-text-sm));
|
|
156
|
+
line-height: var(--ml-page-header-description-line-height, var(--ml-leading-normal));
|
|
157
|
+
color: var(--ml-page-header-description-color, var(--ml-color-text-secondary));
|
|
153
158
|
}
|
|
154
159
|
|
|
155
160
|
/* ============================================
|
|
@@ -158,8 +163,8 @@ export const pageHeaderStyles = () => css `
|
|
|
158
163
|
.ml-page-header__meta {
|
|
159
164
|
display: flex;
|
|
160
165
|
align-items: center;
|
|
161
|
-
gap: var(--ml-page-header-meta-gap);
|
|
162
|
-
margin-top: var(--ml-page-header-meta-margin);
|
|
166
|
+
gap: var(--ml-page-header-meta-gap, var(--ml-space-2));
|
|
167
|
+
margin-top: var(--ml-page-header-meta-margin, var(--ml-space-2));
|
|
163
168
|
}
|
|
164
169
|
|
|
165
170
|
/* ============================================
|
|
@@ -168,7 +173,7 @@ export const pageHeaderStyles = () => css `
|
|
|
168
173
|
.ml-page-header__actions {
|
|
169
174
|
display: flex;
|
|
170
175
|
align-items: center;
|
|
171
|
-
gap: var(--ml-page-header-actions-gap);
|
|
176
|
+
gap: var(--ml-page-header-actions-gap, var(--ml-space-2));
|
|
172
177
|
flex-shrink: 0;
|
|
173
178
|
}
|
|
174
179
|
|
|
@@ -176,7 +181,7 @@ export const pageHeaderStyles = () => css `
|
|
|
176
181
|
TABS
|
|
177
182
|
============================================ */
|
|
178
183
|
.ml-page-header__tabs {
|
|
179
|
-
margin-top: var(--ml-page-header-tabs-margin);
|
|
184
|
+
margin-top: var(--ml-page-header-tabs-margin, var(--ml-space-4));
|
|
180
185
|
}
|
|
181
186
|
|
|
182
187
|
/* ============================================
|
|
@@ -193,7 +198,7 @@ export const pageHeaderStyles = () => css `
|
|
|
193
198
|
============================================ */
|
|
194
199
|
@media (max-width: 640px) {
|
|
195
200
|
.ml-page-header {
|
|
196
|
-
padding: var(--ml-page-header-mobile-padding);
|
|
201
|
+
padding: var(--ml-page-header-mobile-padding, var(--ml-space-4));
|
|
197
202
|
}
|
|
198
203
|
|
|
199
204
|
.ml-page-header__main {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-section.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/page-section/page-section.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"page-section.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/page-section/page-section.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,iDA+G7B,CAAC"}
|
|
@@ -1,45 +1,50 @@
|
|
|
1
1
|
import { css } from '@melodicdev/core';
|
|
2
2
|
export const pageSectionStyles = () => css `
|
|
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
|
+
* Header spacing
|
|
8
|
+
* --ml-page-section-gap: var(--ml-space-4)
|
|
9
|
+
* --ml-page-section-heading-gap: var(--ml-space-1)
|
|
10
|
+
*
|
|
11
|
+
* Title
|
|
12
|
+
* --ml-page-section-title-font: 'Cormorant Garamond', 'Georgia', serif
|
|
13
|
+
* --ml-page-section-title-size: var(--ml-text-2xl)
|
|
14
|
+
* --ml-page-section-title-weight: var(--ml-font-semibold)
|
|
15
|
+
* --ml-page-section-title-color: var(--ml-color-text)
|
|
16
|
+
* --ml-page-section-title-line-height: var(--ml-leading-tight)
|
|
17
|
+
*
|
|
18
|
+
* Subtitle
|
|
19
|
+
* --ml-page-section-subtitle-font: var(--ml-font-sans)
|
|
20
|
+
* --ml-page-section-subtitle-size: var(--ml-text-sm)
|
|
21
|
+
* --ml-page-section-subtitle-color: var(--ml-color-text-muted)
|
|
22
|
+
* --ml-page-section-subtitle-line-height: var(--ml-leading-normal)
|
|
23
|
+
*
|
|
24
|
+
* Action link
|
|
25
|
+
* --ml-page-section-action-font: var(--ml-font-sans)
|
|
26
|
+
* --ml-page-section-action-size: var(--ml-text-sm)
|
|
27
|
+
* --ml-page-section-action-weight: var(--ml-font-medium)
|
|
28
|
+
* --ml-page-section-action-color: var(--ml-color-primary)
|
|
29
|
+
* --ml-page-section-action-hover-color: var(--ml-color-primary-hover)
|
|
30
|
+
* --ml-page-section-action-transition: var(--ml-duration-150)
|
|
31
|
+
*
|
|
32
|
+
* Content padding variants
|
|
33
|
+
* --ml-page-section-pad-sm: var(--ml-space-2) 0
|
|
34
|
+
* --ml-page-section-pad-md: var(--ml-space-4) 0
|
|
35
|
+
* --ml-page-section-pad-lg: var(--ml-space-6) 0
|
|
36
|
+
*/
|
|
37
|
+
|
|
3
38
|
:host {
|
|
4
39
|
display: block;
|
|
5
|
-
|
|
6
|
-
/* Header spacing */
|
|
7
|
-
--ml-page-section-gap: var(--ml-space-4);
|
|
8
|
-
--ml-page-section-heading-gap: var(--ml-space-1);
|
|
9
|
-
|
|
10
|
-
/* Title */
|
|
11
|
-
--ml-page-section-title-font: 'Cormorant Garamond', 'Georgia', serif;
|
|
12
|
-
--ml-page-section-title-size: var(--ml-text-2xl);
|
|
13
|
-
--ml-page-section-title-weight: var(--ml-font-semibold);
|
|
14
|
-
--ml-page-section-title-color: var(--ml-color-text);
|
|
15
|
-
--ml-page-section-title-line-height: var(--ml-leading-tight);
|
|
16
|
-
|
|
17
|
-
/* Subtitle */
|
|
18
|
-
--ml-page-section-subtitle-font: var(--ml-font-sans);
|
|
19
|
-
--ml-page-section-subtitle-size: var(--ml-text-sm);
|
|
20
|
-
--ml-page-section-subtitle-color: var(--ml-color-text-muted);
|
|
21
|
-
--ml-page-section-subtitle-line-height: var(--ml-leading-normal);
|
|
22
|
-
|
|
23
|
-
/* Action link */
|
|
24
|
-
--ml-page-section-action-font: var(--ml-font-sans);
|
|
25
|
-
--ml-page-section-action-size: var(--ml-text-sm);
|
|
26
|
-
--ml-page-section-action-weight: var(--ml-font-medium);
|
|
27
|
-
--ml-page-section-action-color: var(--ml-color-primary);
|
|
28
|
-
--ml-page-section-action-hover-color: var(--ml-color-primary-hover);
|
|
29
|
-
--ml-page-section-action-transition: var(--ml-duration-150);
|
|
30
|
-
|
|
31
|
-
/* Content padding variants */
|
|
32
|
-
--ml-page-section-pad-sm: var(--ml-space-2) 0;
|
|
33
|
-
--ml-page-section-pad-md: var(--ml-space-4) 0;
|
|
34
|
-
--ml-page-section-pad-lg: var(--ml-space-6) 0;
|
|
35
40
|
}
|
|
36
41
|
|
|
37
42
|
.ml-page-section__header {
|
|
38
43
|
display: flex;
|
|
39
44
|
align-items: flex-start;
|
|
40
45
|
justify-content: space-between;
|
|
41
|
-
gap: var(--ml-page-section-gap);
|
|
42
|
-
margin-bottom: var(--ml-page-section-gap);
|
|
46
|
+
gap: var(--ml-page-section-gap, var(--ml-space-4));
|
|
47
|
+
margin-bottom: var(--ml-page-section-gap, var(--ml-space-4));
|
|
43
48
|
}
|
|
44
49
|
|
|
45
50
|
/* Header is always rendered (so the action slot's slotchange can fire);
|
|
@@ -51,24 +56,24 @@ export const pageSectionStyles = () => css `
|
|
|
51
56
|
.ml-page-section__heading {
|
|
52
57
|
display: flex;
|
|
53
58
|
flex-direction: column;
|
|
54
|
-
gap: var(--ml-page-section-heading-gap);
|
|
59
|
+
gap: var(--ml-page-section-heading-gap, var(--ml-space-1));
|
|
55
60
|
}
|
|
56
61
|
|
|
57
62
|
.ml-page-section__title {
|
|
58
63
|
margin: 0;
|
|
59
|
-
font-family: var(--ml-page-section-title-font);
|
|
60
|
-
font-size: var(--ml-page-section-title-size);
|
|
61
|
-
font-weight: var(--ml-page-section-title-weight);
|
|
62
|
-
color: var(--ml-page-section-title-color);
|
|
63
|
-
line-height: var(--ml-page-section-title-line-height);
|
|
64
|
+
font-family: var(--ml-page-section-title-font, 'Cormorant Garamond', 'Georgia', serif);
|
|
65
|
+
font-size: var(--ml-page-section-title-size, var(--ml-text-2xl));
|
|
66
|
+
font-weight: var(--ml-page-section-title-weight, var(--ml-font-semibold));
|
|
67
|
+
color: var(--ml-page-section-title-color, var(--ml-color-text));
|
|
68
|
+
line-height: var(--ml-page-section-title-line-height, var(--ml-leading-tight));
|
|
64
69
|
}
|
|
65
70
|
|
|
66
71
|
.ml-page-section__subtitle {
|
|
67
72
|
margin: 0;
|
|
68
|
-
font-family: var(--ml-page-section-subtitle-font);
|
|
69
|
-
font-size: var(--ml-page-section-subtitle-size);
|
|
70
|
-
color: var(--ml-page-section-subtitle-color);
|
|
71
|
-
line-height: var(--ml-page-section-subtitle-line-height);
|
|
73
|
+
font-family: var(--ml-page-section-subtitle-font, var(--ml-font-sans));
|
|
74
|
+
font-size: var(--ml-page-section-subtitle-size, var(--ml-text-sm));
|
|
75
|
+
color: var(--ml-page-section-subtitle-color, var(--ml-color-text-muted));
|
|
76
|
+
line-height: var(--ml-page-section-subtitle-line-height, var(--ml-leading-normal));
|
|
72
77
|
}
|
|
73
78
|
|
|
74
79
|
.ml-page-section__action {
|
|
@@ -76,16 +81,16 @@ export const pageSectionStyles = () => css `
|
|
|
76
81
|
}
|
|
77
82
|
|
|
78
83
|
.ml-page-section__action-link {
|
|
79
|
-
font-family: var(--ml-page-section-action-font);
|
|
80
|
-
font-size: var(--ml-page-section-action-size);
|
|
81
|
-
font-weight: var(--ml-page-section-action-weight);
|
|
82
|
-
color: var(--ml-page-section-action-color);
|
|
84
|
+
font-family: var(--ml-page-section-action-font, var(--ml-font-sans));
|
|
85
|
+
font-size: var(--ml-page-section-action-size, var(--ml-text-sm));
|
|
86
|
+
font-weight: var(--ml-page-section-action-weight, var(--ml-font-medium));
|
|
87
|
+
color: var(--ml-page-section-action-color, var(--ml-color-primary));
|
|
83
88
|
text-decoration: none;
|
|
84
|
-
transition: color var(--ml-page-section-action-transition) var(--ml-ease-in-out);
|
|
89
|
+
transition: color var(--ml-page-section-action-transition, var(--ml-duration-150)) var(--ml-ease-in-out);
|
|
85
90
|
}
|
|
86
91
|
|
|
87
92
|
.ml-page-section__action-link:hover {
|
|
88
|
-
color: var(--ml-page-section-action-hover-color);
|
|
93
|
+
color: var(--ml-page-section-action-hover-color, var(--ml-color-primary-hover));
|
|
89
94
|
text-decoration: underline;
|
|
90
95
|
}
|
|
91
96
|
|
|
@@ -95,14 +100,14 @@ export const pageSectionStyles = () => css `
|
|
|
95
100
|
}
|
|
96
101
|
|
|
97
102
|
.ml-page-section--pad-sm .ml-page-section__content {
|
|
98
|
-
padding: var(--ml-page-section-pad-sm);
|
|
103
|
+
padding: var(--ml-page-section-pad-sm, var(--ml-space-2) 0);
|
|
99
104
|
}
|
|
100
105
|
|
|
101
106
|
.ml-page-section--pad-md .ml-page-section__content {
|
|
102
|
-
padding: var(--ml-page-section-pad-md);
|
|
107
|
+
padding: var(--ml-page-section-pad-md, var(--ml-space-4) 0);
|
|
103
108
|
}
|
|
104
109
|
|
|
105
110
|
.ml-page-section--pad-lg .ml-page-section__content {
|
|
106
|
-
padding: var(--ml-page-section-pad-lg);
|
|
111
|
+
padding: var(--ml-page-section-pad-lg, var(--ml-space-6) 0);
|
|
107
112
|
}
|
|
108
113
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.directive.d.ts","sourceRoot":"","sources":["../../src/directives/tooltip.directive.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,2BAA2B,CAAC;AAEnF,OAAO,yCAAyC,CAAC;AAIjD;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,MAAM,WAAW,uBAAuB;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;
|
|
1
|
+
{"version":3,"file":"tooltip.directive.d.ts","sourceRoot":"","sources":["../../src/directives/tooltip.directive.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,2BAA2B,CAAC;AAEnF,OAAO,yCAAyC,CAAC;AAIjD;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,MAAM,WAAW,uBAAuB;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAsKD,iBAAS,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,iCAAiC,GAAG,IAAI,CA2CpG;AAID,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -56,8 +56,9 @@ function createState(element) {
|
|
|
56
56
|
element.addEventListener('focusout', hide);
|
|
57
57
|
const state = { tooltip, pendingRemoval: false, ownsDescribedBy: false, show, hide };
|
|
58
58
|
// Mirror ml-tooltip's slotted-trigger ARIA wiring. The content lives inside
|
|
59
|
-
// the tooltip's shadow root,
|
|
60
|
-
//
|
|
59
|
+
// the tooltip's shadow root, where neither an IDREF nor an element
|
|
60
|
+
// reference from this element can reach — its text is copied onto the
|
|
61
|
+
// element as `aria-description` instead.
|
|
61
62
|
//
|
|
62
63
|
// The tooltip has only just been created here, so its shadow content does
|
|
63
64
|
// not exist yet; wiring it synchronously silently described nothing at all.
|
|
@@ -95,14 +96,31 @@ function describeWhenReady(element, tooltip, state) {
|
|
|
95
96
|
}
|
|
96
97
|
});
|
|
97
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* The description is the tooltip's text copied onto the element, so it must
|
|
101
|
+
* be refreshed once the tooltip has re-rendered with new content.
|
|
102
|
+
*/
|
|
103
|
+
function redescribeAfterRender(element, state) {
|
|
104
|
+
if (!state.ownsDescribedBy) {
|
|
105
|
+
return; // first render (describeWhenReady handles it) or consumer-owned
|
|
106
|
+
}
|
|
107
|
+
const refresh = () => {
|
|
108
|
+
const content = state.tooltip.shadowRoot?.querySelector('.ml-tooltip__content');
|
|
109
|
+
if (content && !state.pendingRemoval && state.ownsDescribedBy) {
|
|
110
|
+
setCrossRootDescription(element, [content]);
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
void Promise.resolve().then(refresh);
|
|
114
|
+
setTimeout(refresh, 0);
|
|
115
|
+
}
|
|
98
116
|
function destroyState(element, state) {
|
|
99
117
|
element.removeEventListener('mouseenter', state.show);
|
|
100
118
|
element.removeEventListener('mouseleave', state.hide);
|
|
101
119
|
element.removeEventListener('focusin', state.show);
|
|
102
120
|
element.removeEventListener('focusout', state.hide);
|
|
103
121
|
if (state.ownsDescribedBy) {
|
|
122
|
+
state.ownsDescribedBy = false;
|
|
104
123
|
clearCrossRootDescription(element);
|
|
105
|
-
element.removeAttribute('aria-describedby');
|
|
106
124
|
}
|
|
107
125
|
state.tooltip.anchorEl = null;
|
|
108
126
|
// Disconnecting runs the tooltip component's onDestroy (timers, autoUpdate,
|
|
@@ -134,6 +152,7 @@ function tooltipDirective(element, value) {
|
|
|
134
152
|
// tooltip's attributeChangedCallback each time.
|
|
135
153
|
if (state.tooltip.getAttribute('content') !== content) {
|
|
136
154
|
state.tooltip.setAttribute('content', content);
|
|
155
|
+
redescribeAfterRender(element, state);
|
|
137
156
|
}
|
|
138
157
|
const resolvedPlacement = placement ?? 'top';
|
|
139
158
|
if (state.tooltip.getAttribute('placement') !== resolvedPlacement) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.preset.d.ts","sourceRoot":"","sources":["../../../src/theme/presets/base.preset.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"base.preset.d.ts","sourceRoot":"","sources":["../../../src/theme/presets/base.preset.ts"],"names":[],"mappings":"AAcA;;;GAGG;AACH,eAAO,MAAM,YAAY,QAWvB,CAAC"}
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import { allTokens, tokensToCss } from '../tokens/all-tokens.js';
|
|
2
|
+
import { transitionTokens } from '../tokens/transitions.tokens.js';
|
|
3
|
+
/**
|
|
4
|
+
* Every non-zero duration token, collapsed to 0ms. Component transitions and
|
|
5
|
+
* animations all take their duration from these tokens (directly or through a
|
|
6
|
+
* component token whose default is one), so redefining them is enough to
|
|
7
|
+
* switch motion off library-wide for users who ask for reduced motion.
|
|
8
|
+
*/
|
|
9
|
+
const reducedMotionDurations = Object.keys(transitionTokens)
|
|
10
|
+
.filter((name) => name.startsWith('--ml-duration-') && name !== '--ml-duration-0')
|
|
11
|
+
.map((name) => `${name}: 0ms;`)
|
|
12
|
+
.join('\n\t\t');
|
|
2
13
|
/**
|
|
3
14
|
* Base theme - includes all primitive tokens
|
|
4
15
|
* Applied to :root for both light and dark themes
|
|
@@ -8,4 +19,10 @@ export const baseThemeCss = `:root {
|
|
|
8
19
|
|
|
9
20
|
/* Default to light color scheme */
|
|
10
21
|
color-scheme: light;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@media (prefers-reduced-motion: reduce) {
|
|
25
|
+
:root {
|
|
26
|
+
${reducedMotionDurations}
|
|
27
|
+
}
|
|
11
28
|
}`;
|
|
@@ -7,10 +7,16 @@ export declare const darkTheme: {
|
|
|
7
7
|
readonly '--ml-color-surface-raised': "var(--ml-gray-800)";
|
|
8
8
|
readonly '--ml-color-surface-overlay': "var(--ml-gray-800)";
|
|
9
9
|
readonly '--ml-color-surface-sunken': "var(--ml-gray-950)";
|
|
10
|
+
readonly '--ml-color-surface-hover': "var(--ml-color-surface-raised)";
|
|
11
|
+
readonly '--ml-color-surface-secondary': "var(--ml-color-surface-raised)";
|
|
12
|
+
readonly '--ml-color-surface-tertiary': "var(--ml-color-surface-sunken)";
|
|
13
|
+
readonly '--ml-color-bg-secondary': "var(--ml-color-surface-raised)";
|
|
10
14
|
readonly '--ml-color-text': "var(--ml-gray-50)";
|
|
11
15
|
readonly '--ml-color-text-secondary': "var(--ml-gray-300)";
|
|
12
16
|
readonly '--ml-color-text-muted': "var(--ml-gray-400)";
|
|
13
17
|
readonly '--ml-color-text-subtle': "var(--ml-gray-500)";
|
|
18
|
+
readonly '--ml-color-text-tertiary': "var(--ml-color-text-muted)";
|
|
19
|
+
readonly '--ml-color-text-disabled': "var(--ml-color-text-subtle)";
|
|
14
20
|
readonly '--ml-color-text-inverse': "var(--ml-gray-900)";
|
|
15
21
|
readonly '--ml-color-border': "var(--ml-gray-700)";
|
|
16
22
|
readonly '--ml-color-border-strong': "var(--ml-gray-600)";
|
|
@@ -25,6 +31,8 @@ export declare const darkTheme: {
|
|
|
25
31
|
readonly '--ml-color-warning-subtle': "var(--ml-amber-950)";
|
|
26
32
|
readonly '--ml-color-danger': "var(--ml-red-500)";
|
|
27
33
|
readonly '--ml-color-danger-subtle': "var(--ml-red-950)";
|
|
34
|
+
readonly '--ml-color-error': "var(--ml-color-danger)";
|
|
35
|
+
readonly '--ml-color-error-subtle': "var(--ml-color-danger-subtle)";
|
|
28
36
|
readonly '--ml-color-info': "var(--ml-cyan-400)";
|
|
29
37
|
readonly '--ml-color-info-subtle': "var(--ml-cyan-950)";
|
|
30
38
|
readonly '--ml-color-input-bg': "var(--ml-gray-900)";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dark.preset.d.ts","sourceRoot":"","sources":["../../../src/theme/presets/dark.preset.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"dark.preset.d.ts","sourceRoot":"","sources":["../../../src/theme/presets/dark.preset.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0GZ,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,YAAY,QAgBvB,CAAC"}
|
|
@@ -8,11 +8,18 @@ export const darkTheme = {
|
|
|
8
8
|
'--ml-color-surface-raised': 'var(--ml-gray-800)',
|
|
9
9
|
'--ml-color-surface-overlay': 'var(--ml-gray-800)',
|
|
10
10
|
'--ml-color-surface-sunken': 'var(--ml-gray-950)',
|
|
11
|
+
// Aliases, restated so they follow this theme when it is set on a subtree
|
|
12
|
+
'--ml-color-surface-hover': 'var(--ml-color-surface-raised)',
|
|
13
|
+
'--ml-color-surface-secondary': 'var(--ml-color-surface-raised)',
|
|
14
|
+
'--ml-color-surface-tertiary': 'var(--ml-color-surface-sunken)',
|
|
15
|
+
'--ml-color-bg-secondary': 'var(--ml-color-surface-raised)',
|
|
11
16
|
// Text colors - lighter text for dark backgrounds
|
|
12
17
|
'--ml-color-text': 'var(--ml-gray-50)',
|
|
13
18
|
'--ml-color-text-secondary': 'var(--ml-gray-300)',
|
|
14
19
|
'--ml-color-text-muted': 'var(--ml-gray-400)',
|
|
15
20
|
'--ml-color-text-subtle': 'var(--ml-gray-500)',
|
|
21
|
+
'--ml-color-text-tertiary': 'var(--ml-color-text-muted)',
|
|
22
|
+
'--ml-color-text-disabled': 'var(--ml-color-text-subtle)',
|
|
16
23
|
'--ml-color-text-inverse': 'var(--ml-gray-900)',
|
|
17
24
|
// Border colors - more visible on dark
|
|
18
25
|
'--ml-color-border': 'var(--ml-gray-700)',
|
|
@@ -30,6 +37,8 @@ export const darkTheme = {
|
|
|
30
37
|
'--ml-color-warning-subtle': 'var(--ml-amber-950)',
|
|
31
38
|
'--ml-color-danger': 'var(--ml-red-500)',
|
|
32
39
|
'--ml-color-danger-subtle': 'var(--ml-red-950)',
|
|
40
|
+
'--ml-color-error': 'var(--ml-color-danger)',
|
|
41
|
+
'--ml-color-error-subtle': 'var(--ml-color-danger-subtle)',
|
|
33
42
|
'--ml-color-info': 'var(--ml-cyan-400)',
|
|
34
43
|
'--ml-color-info-subtle': 'var(--ml-cyan-950)',
|
|
35
44
|
// Input colors for dark mode
|
|
@@ -8,10 +8,16 @@ export declare const lightTheme: {
|
|
|
8
8
|
readonly '--ml-color-surface-raised': "var(--ml-gray-50)";
|
|
9
9
|
readonly '--ml-color-surface-overlay': "var(--ml-white)";
|
|
10
10
|
readonly '--ml-color-surface-sunken': "var(--ml-gray-100)";
|
|
11
|
+
readonly '--ml-color-surface-hover': "var(--ml-color-surface-raised)";
|
|
12
|
+
readonly '--ml-color-surface-secondary': "var(--ml-color-surface-raised)";
|
|
13
|
+
readonly '--ml-color-surface-tertiary': "var(--ml-color-surface-sunken)";
|
|
14
|
+
readonly '--ml-color-bg-secondary': "var(--ml-color-surface-raised)";
|
|
11
15
|
readonly '--ml-color-text': "var(--ml-gray-900)";
|
|
12
16
|
readonly '--ml-color-text-secondary': "var(--ml-gray-700)";
|
|
13
17
|
readonly '--ml-color-text-muted': "var(--ml-gray-500)";
|
|
14
18
|
readonly '--ml-color-text-subtle': "var(--ml-gray-400)";
|
|
19
|
+
readonly '--ml-color-text-tertiary': "var(--ml-color-text-muted)";
|
|
20
|
+
readonly '--ml-color-text-disabled': "var(--ml-color-text-subtle)";
|
|
15
21
|
readonly '--ml-color-text-inverse': "var(--ml-white)";
|
|
16
22
|
readonly '--ml-color-border': "var(--ml-gray-200)";
|
|
17
23
|
readonly '--ml-color-border-strong': "var(--ml-gray-300)";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"light.preset.d.ts","sourceRoot":"","sources":["../../../src/theme/presets/light.preset.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"light.preset.d.ts","sourceRoot":"","sources":["../../../src/theme/presets/light.preset.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;CA0Bb,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,aAAa,QAMxB,CAAC"}
|
|
@@ -9,11 +9,18 @@ export const lightTheme = {
|
|
|
9
9
|
'--ml-color-surface-raised': 'var(--ml-gray-50)',
|
|
10
10
|
'--ml-color-surface-overlay': 'var(--ml-white)',
|
|
11
11
|
'--ml-color-surface-sunken': 'var(--ml-gray-100)',
|
|
12
|
+
// Aliases, restated so they follow this theme when it is set on a subtree
|
|
13
|
+
'--ml-color-surface-hover': 'var(--ml-color-surface-raised)',
|
|
14
|
+
'--ml-color-surface-secondary': 'var(--ml-color-surface-raised)',
|
|
15
|
+
'--ml-color-surface-tertiary': 'var(--ml-color-surface-sunken)',
|
|
16
|
+
'--ml-color-bg-secondary': 'var(--ml-color-surface-raised)',
|
|
12
17
|
// Text colors
|
|
13
18
|
'--ml-color-text': 'var(--ml-gray-900)',
|
|
14
19
|
'--ml-color-text-secondary': 'var(--ml-gray-700)',
|
|
15
20
|
'--ml-color-text-muted': 'var(--ml-gray-500)',
|
|
16
21
|
'--ml-color-text-subtle': 'var(--ml-gray-400)',
|
|
22
|
+
'--ml-color-text-tertiary': 'var(--ml-color-text-muted)',
|
|
23
|
+
'--ml-color-text-disabled': 'var(--ml-color-text-subtle)',
|
|
17
24
|
'--ml-color-text-inverse': 'var(--ml-white)',
|
|
18
25
|
// Border colors
|
|
19
26
|
'--ml-color-border': 'var(--ml-gray-200)',
|
|
@@ -22,6 +22,7 @@ export declare const allTokens: {
|
|
|
22
22
|
readonly '--ml-ease-out': "cubic-bezier(0, 0, 0.2, 1)";
|
|
23
23
|
readonly '--ml-ease-in-out': "cubic-bezier(0.4, 0, 0.2, 1)";
|
|
24
24
|
readonly '--ml-ease-bounce': "cubic-bezier(0.68, -0.55, 0.265, 1.55)";
|
|
25
|
+
readonly '--ml-transition-normal': "var(--ml-duration-200) var(--ml-ease-in-out)";
|
|
25
26
|
readonly '--ml-transition-none': "none";
|
|
26
27
|
readonly '--ml-transition-all': "all var(--ml-duration-150) var(--ml-ease-in-out)";
|
|
27
28
|
readonly '--ml-transition-colors': "color var(--ml-duration-150) var(--ml-ease-in-out), background-color var(--ml-duration-150) var(--ml-ease-in-out), border-color var(--ml-duration-150) var(--ml-ease-in-out)";
|
|
@@ -89,6 +90,7 @@ export declare const allTokens: {
|
|
|
89
90
|
readonly '--ml-font-extralight': "200";
|
|
90
91
|
readonly '--ml-font-light': "300";
|
|
91
92
|
readonly '--ml-font-normal': "400";
|
|
93
|
+
readonly '--ml-font-regular': "var(--ml-font-normal)";
|
|
92
94
|
readonly '--ml-font-medium': "500";
|
|
93
95
|
readonly '--ml-font-semibold': "600";
|
|
94
96
|
readonly '--ml-font-bold': "700";
|
|
@@ -158,6 +160,8 @@ export declare const allTokens: {
|
|
|
158
160
|
readonly '--ml-color-danger': "var(--ml-red-600)";
|
|
159
161
|
readonly '--ml-color-danger-hover': "var(--ml-red-700)";
|
|
160
162
|
readonly '--ml-color-danger-subtle': "var(--ml-red-50)";
|
|
163
|
+
readonly '--ml-color-error': "var(--ml-color-danger)";
|
|
164
|
+
readonly '--ml-color-error-subtle': "var(--ml-color-danger-subtle)";
|
|
161
165
|
readonly '--ml-color-info': "var(--ml-cyan-600)";
|
|
162
166
|
readonly '--ml-color-info-hover': "var(--ml-cyan-700)";
|
|
163
167
|
readonly '--ml-color-info-subtle': "var(--ml-cyan-50)";
|
|
@@ -166,10 +170,16 @@ export declare const allTokens: {
|
|
|
166
170
|
readonly '--ml-color-surface-raised': "var(--ml-gray-50)";
|
|
167
171
|
readonly '--ml-color-surface-overlay': "var(--ml-white)";
|
|
168
172
|
readonly '--ml-color-surface-sunken': "var(--ml-gray-100)";
|
|
173
|
+
readonly '--ml-color-surface-hover': "var(--ml-color-surface-raised)";
|
|
174
|
+
readonly '--ml-color-surface-secondary': "var(--ml-color-surface-raised)";
|
|
175
|
+
readonly '--ml-color-surface-tertiary': "var(--ml-color-surface-sunken)";
|
|
176
|
+
readonly '--ml-color-bg-secondary': "var(--ml-color-surface-raised)";
|
|
169
177
|
readonly '--ml-color-text': "var(--ml-gray-900)";
|
|
170
178
|
readonly '--ml-color-text-secondary': "var(--ml-gray-700)";
|
|
171
179
|
readonly '--ml-color-text-muted': "var(--ml-gray-500)";
|
|
172
180
|
readonly '--ml-color-text-subtle': "var(--ml-gray-400)";
|
|
181
|
+
readonly '--ml-color-text-tertiary': "var(--ml-color-text-muted)";
|
|
182
|
+
readonly '--ml-color-text-disabled': "var(--ml-color-text-subtle)";
|
|
173
183
|
readonly '--ml-color-text-inverse': "var(--ml-white)";
|
|
174
184
|
readonly '--ml-color-text-link': "var(--ml-blue-600)";
|
|
175
185
|
readonly '--ml-color-text-link-hover': "var(--ml-blue-700)";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"all-tokens.d.ts","sourceRoot":"","sources":["../../../src/theme/tokens/all-tokens.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"all-tokens.d.ts","sourceRoot":"","sources":["../../../src/theme/tokens/all-tokens.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CASZ,CAAC;AAEX;;GAEG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAIlE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C"}
|