@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,39 +1,44 @@
|
|
|
1
1
|
import { css } from '@melodicdev/core';
|
|
2
2
|
export const buttonStyles = () => 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
|
+
* Colors
|
|
8
|
+
* --ml-button-bg: var(--ml-color-primary)
|
|
9
|
+
* --ml-button-border-color: var(--ml-color-primary)
|
|
10
|
+
* --ml-button-color: var(--ml-color-text-inverse)
|
|
11
|
+
* --ml-button-hover-bg: var(--ml-color-primary-hover)
|
|
12
|
+
* --ml-button-hover-border-color: var(--ml-color-primary-hover)
|
|
13
|
+
* --ml-button-hover-color: var(--ml-color-text-inverse)
|
|
14
|
+
* --ml-button-active-bg: var(--ml-color-primary-active)
|
|
15
|
+
* --ml-button-active-border-color: var(--ml-color-primary-active)
|
|
16
|
+
* --ml-button-shadow: var(--ml-shadow-xs)
|
|
17
|
+
* --ml-button-focus-shadow: var(--ml-shadow-focus-ring)
|
|
18
|
+
*
|
|
19
|
+
* Typography
|
|
20
|
+
* --ml-button-font-family: var(--ml-font-sans)
|
|
21
|
+
* --ml-button-font-weight: var(--ml-font-semibold)
|
|
22
|
+
* --ml-button-font-size: var(--ml-text-sm)
|
|
23
|
+
* --ml-button-line-height: var(--ml-leading-tight)
|
|
24
|
+
*
|
|
25
|
+
* Spacing
|
|
26
|
+
* --ml-button-height: 2.5rem
|
|
27
|
+
* --ml-button-padding: 0 var(--ml-space-3-5)
|
|
28
|
+
* --ml-button-gap: var(--ml-space-2)
|
|
29
|
+
* --ml-button-border-width: var(--ml-border)
|
|
30
|
+
* --ml-button-border-radius: var(--ml-radius)
|
|
31
|
+
*
|
|
32
|
+
* Disabled
|
|
33
|
+
* --ml-button-disabled-opacity: 0.5
|
|
34
|
+
*
|
|
35
|
+
* Transition
|
|
36
|
+
* --ml-button-transition-duration: var(--ml-duration-150)
|
|
37
|
+
* --ml-button-transition-easing: var(--ml-ease-in-out)
|
|
38
|
+
*/
|
|
39
|
+
|
|
3
40
|
:host {
|
|
4
41
|
display: inline-block;
|
|
5
|
-
|
|
6
|
-
/* --- Colors --- */
|
|
7
|
-
--ml-button-bg: var(--ml-color-primary);
|
|
8
|
-
--ml-button-border-color: var(--ml-color-primary);
|
|
9
|
-
--ml-button-color: var(--ml-color-text-inverse);
|
|
10
|
-
--ml-button-hover-bg: var(--ml-color-primary-hover);
|
|
11
|
-
--ml-button-hover-border-color: var(--ml-color-primary-hover);
|
|
12
|
-
--ml-button-hover-color: var(--ml-color-text-inverse);
|
|
13
|
-
--ml-button-active-bg: var(--ml-color-primary-active);
|
|
14
|
-
--ml-button-active-border-color: var(--ml-color-primary-active);
|
|
15
|
-
--ml-button-shadow: var(--ml-shadow-xs);
|
|
16
|
-
--ml-button-focus-shadow: var(--ml-shadow-focus-ring);
|
|
17
|
-
|
|
18
|
-
/* --- Typography --- */
|
|
19
|
-
--ml-button-font-family: var(--ml-font-sans);
|
|
20
|
-
--ml-button-font-weight: var(--ml-font-semibold);
|
|
21
|
-
--ml-button-font-size: var(--ml-text-sm);
|
|
22
|
-
--ml-button-line-height: var(--ml-leading-tight);
|
|
23
|
-
|
|
24
|
-
/* --- Spacing --- */
|
|
25
|
-
--ml-button-height: 2.5rem;
|
|
26
|
-
--ml-button-padding: 0 var(--ml-space-3-5);
|
|
27
|
-
--ml-button-gap: var(--ml-space-2);
|
|
28
|
-
--ml-button-border-width: var(--ml-border);
|
|
29
|
-
--ml-button-border-radius: var(--ml-radius);
|
|
30
|
-
|
|
31
|
-
/* --- Disabled --- */
|
|
32
|
-
--ml-button-disabled-opacity: 0.5;
|
|
33
|
-
|
|
34
|
-
/* --- Transition --- */
|
|
35
|
-
--ml-button-transition-duration: var(--ml-duration-150);
|
|
36
|
-
--ml-button-transition-easing: var(--ml-ease-in-out);
|
|
37
42
|
}
|
|
38
43
|
|
|
39
44
|
:host([full-width]) {
|
|
@@ -50,27 +55,27 @@ export const buttonStyles = () => css `
|
|
|
50
55
|
display: inline-flex;
|
|
51
56
|
align-items: center;
|
|
52
57
|
justify-content: center;
|
|
53
|
-
gap: var(--ml-button-gap);
|
|
58
|
+
gap: var(--ml-button-gap, var(--ml-space-2));
|
|
54
59
|
position: relative;
|
|
55
|
-
font-family: var(--ml-button-font-family);
|
|
56
|
-
font-weight: var(--ml-button-font-weight);
|
|
57
|
-
font-size: var(--ml-button-font-size);
|
|
58
|
-
line-height: var(--ml-button-line-height);
|
|
60
|
+
font-family: var(--ml-button-font-family, var(--ml-font-sans));
|
|
61
|
+
font-weight: var(--ml-button-font-weight, var(--ml-font-semibold));
|
|
62
|
+
font-size: var(--ml-button-font-size, var(--ml-text-sm));
|
|
63
|
+
line-height: var(--ml-button-line-height, var(--ml-leading-tight));
|
|
59
64
|
white-space: nowrap;
|
|
60
65
|
text-align: center;
|
|
61
|
-
height: var(--ml-button-height);
|
|
62
|
-
padding: var(--ml-button-padding);
|
|
63
|
-
border: var(--ml-button-border-width) solid var(--ml-button-border-color);
|
|
64
|
-
border-radius: var(--ml-button-border-radius);
|
|
65
|
-
background-color: var(--ml-button-bg);
|
|
66
|
-
color: var(--ml-button-color);
|
|
67
|
-
box-shadow: var(--ml-button-shadow);
|
|
66
|
+
height: var(--ml-button-height, 2.5rem);
|
|
67
|
+
padding: var(--ml-button-padding, 0 var(--ml-space-3-5));
|
|
68
|
+
border: var(--ml-button-border-width, var(--ml-border)) solid var(--ml-button-border-color, var(--ml-color-primary));
|
|
69
|
+
border-radius: var(--ml-button-border-radius, var(--ml-radius));
|
|
70
|
+
background-color: var(--ml-button-bg, var(--ml-color-primary));
|
|
71
|
+
color: var(--ml-button-color, var(--ml-color-text-inverse));
|
|
72
|
+
box-shadow: var(--ml-button-shadow, var(--ml-shadow-xs));
|
|
68
73
|
transition:
|
|
69
|
-
background-color var(--ml-button-transition-duration) var(--ml-button-transition-easing),
|
|
70
|
-
border-color var(--ml-button-transition-duration) var(--ml-button-transition-easing),
|
|
71
|
-
color var(--ml-button-transition-duration) var(--ml-button-transition-easing),
|
|
72
|
-
box-shadow var(--ml-button-transition-duration) var(--ml-button-transition-easing),
|
|
73
|
-
transform var(--ml-button-transition-duration) var(--ml-button-transition-easing);
|
|
74
|
+
background-color var(--ml-button-transition-duration, var(--ml-duration-150)) var(--ml-button-transition-easing, var(--ml-ease-in-out)),
|
|
75
|
+
border-color var(--ml-button-transition-duration, var(--ml-duration-150)) var(--ml-button-transition-easing, var(--ml-ease-in-out)),
|
|
76
|
+
color var(--ml-button-transition-duration, var(--ml-duration-150)) var(--ml-button-transition-easing, var(--ml-ease-in-out)),
|
|
77
|
+
box-shadow var(--ml-button-transition-duration, var(--ml-duration-150)) var(--ml-button-transition-easing, var(--ml-ease-in-out)),
|
|
78
|
+
transform var(--ml-button-transition-duration, var(--ml-duration-150)) var(--ml-button-transition-easing, var(--ml-ease-in-out));
|
|
74
79
|
}
|
|
75
80
|
|
|
76
81
|
.ml-button:focus {
|
|
@@ -78,18 +83,18 @@ export const buttonStyles = () => css `
|
|
|
78
83
|
}
|
|
79
84
|
|
|
80
85
|
.ml-button:focus-visible {
|
|
81
|
-
box-shadow: var(--ml-button-focus-shadow);
|
|
86
|
+
box-shadow: var(--ml-button-focus-shadow, var(--ml-shadow-focus-ring));
|
|
82
87
|
}
|
|
83
88
|
|
|
84
89
|
.ml-button:hover:not(:disabled) {
|
|
85
|
-
background-color: var(--ml-button-hover-bg);
|
|
86
|
-
border-color: var(--ml-button-hover-border-color);
|
|
87
|
-
color: var(--ml-button-hover-color);
|
|
90
|
+
background-color: var(--ml-button-hover-bg, var(--ml-color-primary-hover));
|
|
91
|
+
border-color: var(--ml-button-hover-border-color, var(--ml-color-primary-hover));
|
|
92
|
+
color: var(--ml-button-hover-color, var(--ml-color-text-inverse));
|
|
88
93
|
}
|
|
89
94
|
|
|
90
95
|
.ml-button:active:not(:disabled) {
|
|
91
|
-
background-color: var(--ml-button-active-bg);
|
|
92
|
-
border-color: var(--ml-button-active-border-color);
|
|
96
|
+
background-color: var(--ml-button-active-bg, var(--ml-color-primary-active));
|
|
97
|
+
border-color: var(--ml-button-active-border-color, var(--ml-color-primary-active));
|
|
93
98
|
}
|
|
94
99
|
|
|
95
100
|
/* --- Size variants --- */
|
|
@@ -211,7 +216,7 @@ export const buttonStyles = () => css `
|
|
|
211
216
|
|
|
212
217
|
/* --- Disabled --- */
|
|
213
218
|
.ml-button--disabled {
|
|
214
|
-
opacity: var(--ml-button-disabled-opacity);
|
|
219
|
+
opacity: var(--ml-button-disabled-opacity, 0.5);
|
|
215
220
|
cursor: not-allowed;
|
|
216
221
|
pointer-events: none;
|
|
217
222
|
box-shadow: none;
|
|
@@ -236,7 +241,7 @@ export const buttonStyles = () => css `
|
|
|
236
241
|
.ml-button__content {
|
|
237
242
|
display: inline-flex;
|
|
238
243
|
align-items: center;
|
|
239
|
-
gap: var(--ml-button-gap);
|
|
244
|
+
gap: var(--ml-button-gap, var(--ml-space-2));
|
|
240
245
|
}
|
|
241
246
|
|
|
242
247
|
::slotted([slot='icon-start']),
|
|
@@ -251,4 +256,15 @@ export const buttonStyles = () => css `
|
|
|
251
256
|
::slotted(ml-icon) {
|
|
252
257
|
--ml-icon-size: 1.125em;
|
|
253
258
|
}
|
|
259
|
+
|
|
260
|
+
/*
|
|
261
|
+
* Forced colors (Windows High Contrast): box-shadow rings and background
|
|
262
|
+
* highlights are not painted there, so focus falls back to a real outline.
|
|
263
|
+
*/
|
|
264
|
+
@media (forced-colors: active) {
|
|
265
|
+
.ml-button:focus-visible {
|
|
266
|
+
outline: 2px solid Highlight;
|
|
267
|
+
outline-offset: 2px;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
254
270
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-group-item.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/button-group/button-group-item.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"button-group-item.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/button-group/button-group-item.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,qBAAqB,iDAsHjC,CAAC"}
|
|
@@ -106,4 +106,15 @@ export const buttonGroupItemStyles = () => css `
|
|
|
106
106
|
opacity: 0.5;
|
|
107
107
|
cursor: not-allowed;
|
|
108
108
|
}
|
|
109
|
+
|
|
110
|
+
/*
|
|
111
|
+
* Forced colors (Windows High Contrast): box-shadow rings and background
|
|
112
|
+
* highlights are not painted there, so focus falls back to a real outline.
|
|
113
|
+
*/
|
|
114
|
+
@media (forced-colors: active) {
|
|
115
|
+
.ml-button-group-item:focus-visible {
|
|
116
|
+
outline: 2px solid Highlight;
|
|
117
|
+
outline-offset: 2px;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
109
120
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-group.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/button-group/button-group.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"button-group.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/button-group/button-group.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,iDA+C7B,CAAC"}
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
import { css } from '@melodicdev/core';
|
|
2
2
|
export const buttonGroupStyles = () => 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
|
+
* Disabled
|
|
8
|
+
* --ml-button-group-disabled-opacity: 0.5
|
|
9
|
+
*
|
|
10
|
+
* Spacing
|
|
11
|
+
* --ml-button-group-item-offset: -1px
|
|
12
|
+
*
|
|
13
|
+
* Error
|
|
14
|
+
* --ml-button-group-error-font-size: var(--ml-text-sm)
|
|
15
|
+
* --ml-button-group-error-color: var(--ml-color-danger)
|
|
16
|
+
* --ml-button-group-error-margin-top: var(--ml-space-1)
|
|
17
|
+
* --ml-button-group-error-line-height: var(--ml-leading-tight)
|
|
18
|
+
*/
|
|
19
|
+
|
|
3
20
|
:host {
|
|
4
21
|
display: inline-block;
|
|
5
|
-
|
|
6
|
-
/* --- Disabled --- */
|
|
7
|
-
--ml-button-group-disabled-opacity: 0.5;
|
|
8
|
-
|
|
9
|
-
/* --- Spacing --- */
|
|
10
|
-
--ml-button-group-item-offset: -1px;
|
|
11
|
-
|
|
12
|
-
/* --- Error --- */
|
|
13
|
-
--ml-button-group-error-font-size: var(--ml-text-sm);
|
|
14
|
-
--ml-button-group-error-color: var(--ml-color-danger);
|
|
15
|
-
--ml-button-group-error-margin-top: var(--ml-space-1);
|
|
16
|
-
--ml-button-group-error-line-height: var(--ml-leading-tight);
|
|
17
22
|
}
|
|
18
23
|
|
|
19
24
|
.ml-button-group {
|
|
@@ -22,23 +27,23 @@ export const buttonGroupStyles = () => css `
|
|
|
22
27
|
}
|
|
23
28
|
|
|
24
29
|
.ml-button-group--disabled {
|
|
25
|
-
opacity: var(--ml-button-group-disabled-opacity);
|
|
30
|
+
opacity: var(--ml-button-group-disabled-opacity, 0.5);
|
|
26
31
|
pointer-events: none;
|
|
27
32
|
}
|
|
28
33
|
|
|
29
34
|
.ml-button-group__error {
|
|
30
35
|
display: block;
|
|
31
|
-
margin-top: var(--ml-button-group-error-margin-top);
|
|
32
|
-
font-size: var(--ml-button-group-error-font-size);
|
|
33
|
-
color: var(--ml-button-group-error-color);
|
|
34
|
-
line-height: var(--ml-button-group-error-line-height);
|
|
36
|
+
margin-top: var(--ml-button-group-error-margin-top, var(--ml-space-1));
|
|
37
|
+
font-size: var(--ml-button-group-error-font-size, var(--ml-text-sm));
|
|
38
|
+
color: var(--ml-button-group-error-color, var(--ml-color-danger));
|
|
39
|
+
line-height: var(--ml-button-group-error-line-height, var(--ml-leading-tight));
|
|
35
40
|
}
|
|
36
41
|
|
|
37
42
|
::slotted(ml-button-group-item) {
|
|
38
|
-
margin-
|
|
43
|
+
margin-inline-start: var(--ml-button-group-item-offset, -1px);
|
|
39
44
|
}
|
|
40
45
|
|
|
41
46
|
::slotted(ml-button-group-item:first-child) {
|
|
42
|
-
margin-
|
|
47
|
+
margin-inline-start: 0;
|
|
43
48
|
}
|
|
44
49
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/checkbox/checkbox.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"checkbox.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/checkbox/checkbox.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,iDAuL1B,CAAC"}
|
|
@@ -1,66 +1,71 @@
|
|
|
1
1
|
import { css } from '@melodicdev/core';
|
|
2
2
|
export const checkboxStyles = () => 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
|
+
* Box
|
|
8
|
+
* --ml-checkbox-box-size: 1.25rem
|
|
9
|
+
* --ml-checkbox-box-bg: var(--ml-color-input-bg)
|
|
10
|
+
* --ml-checkbox-box-border-width: var(--ml-border)
|
|
11
|
+
* --ml-checkbox-box-border-color: var(--ml-color-border-strong)
|
|
12
|
+
* --ml-checkbox-box-border-radius: var(--ml-radius-xs)
|
|
13
|
+
* --ml-checkbox-box-color: var(--ml-color-text-inverse)
|
|
14
|
+
*
|
|
15
|
+
* Checked
|
|
16
|
+
* --ml-checkbox-checked-bg: var(--ml-color-primary)
|
|
17
|
+
* --ml-checkbox-checked-border-color: var(--ml-color-primary)
|
|
18
|
+
* --ml-checkbox-checked-hover-bg: var(--ml-color-primary-hover)
|
|
19
|
+
* --ml-checkbox-checked-hover-border-color: var(--ml-color-primary-hover)
|
|
20
|
+
*
|
|
21
|
+
* Hover
|
|
22
|
+
* --ml-checkbox-hover-border-color: var(--ml-color-primary)
|
|
23
|
+
*
|
|
24
|
+
* Focus
|
|
25
|
+
* --ml-checkbox-focus-border-color: var(--ml-color-primary)
|
|
26
|
+
* --ml-checkbox-focus-shadow: var(--ml-shadow-focus-ring)
|
|
27
|
+
*
|
|
28
|
+
* Label
|
|
29
|
+
* --ml-checkbox-label-font-size: var(--ml-text-sm)
|
|
30
|
+
* --ml-checkbox-label-font-weight: var(--ml-font-medium)
|
|
31
|
+
* --ml-checkbox-label-color: var(--ml-color-text-secondary)
|
|
32
|
+
* --ml-checkbox-label-line-height: 1.25rem
|
|
33
|
+
*
|
|
34
|
+
* Hint
|
|
35
|
+
* --ml-checkbox-hint-font-size: var(--ml-text-sm)
|
|
36
|
+
* --ml-checkbox-hint-color: var(--ml-color-text-muted)
|
|
37
|
+
*
|
|
38
|
+
* Error
|
|
39
|
+
* --ml-checkbox-error-border-color: var(--ml-color-danger)
|
|
40
|
+
* --ml-checkbox-error-color: var(--ml-color-danger)
|
|
41
|
+
* --ml-checkbox-error-margin-top: var(--ml-space-0-5)
|
|
42
|
+
* --ml-checkbox-error-line-height: var(--ml-leading-tight)
|
|
43
|
+
*
|
|
44
|
+
* Gap
|
|
45
|
+
* --ml-checkbox-gap: var(--ml-space-3)
|
|
46
|
+
*
|
|
47
|
+
* Disabled
|
|
48
|
+
* --ml-checkbox-disabled-opacity: 0.5
|
|
49
|
+
*
|
|
50
|
+
* Transition
|
|
51
|
+
* --ml-checkbox-transition-duration: var(--ml-duration-150)
|
|
52
|
+
* --ml-checkbox-transition-easing: var(--ml-ease-in-out)
|
|
53
|
+
*/
|
|
54
|
+
|
|
3
55
|
:host {
|
|
4
56
|
display: block;
|
|
5
|
-
|
|
6
|
-
/* --- Box --- */
|
|
7
|
-
--ml-checkbox-box-size: 1.25rem;
|
|
8
|
-
--ml-checkbox-box-bg: var(--ml-color-input-bg);
|
|
9
|
-
--ml-checkbox-box-border-width: var(--ml-border);
|
|
10
|
-
--ml-checkbox-box-border-color: var(--ml-color-border-strong);
|
|
11
|
-
--ml-checkbox-box-border-radius: var(--ml-radius-xs);
|
|
12
|
-
--ml-checkbox-box-color: var(--ml-color-text-inverse);
|
|
13
|
-
|
|
14
|
-
/* --- Checked --- */
|
|
15
|
-
--ml-checkbox-checked-bg: var(--ml-color-primary);
|
|
16
|
-
--ml-checkbox-checked-border-color: var(--ml-color-primary);
|
|
17
|
-
--ml-checkbox-checked-hover-bg: var(--ml-color-primary-hover);
|
|
18
|
-
--ml-checkbox-checked-hover-border-color: var(--ml-color-primary-hover);
|
|
19
|
-
|
|
20
|
-
/* --- Hover --- */
|
|
21
|
-
--ml-checkbox-hover-border-color: var(--ml-color-primary);
|
|
22
|
-
|
|
23
|
-
/* --- Focus --- */
|
|
24
|
-
--ml-checkbox-focus-border-color: var(--ml-color-primary);
|
|
25
|
-
--ml-checkbox-focus-shadow: var(--ml-shadow-focus-ring);
|
|
26
|
-
|
|
27
|
-
/* --- Label --- */
|
|
28
|
-
--ml-checkbox-label-font-size: var(--ml-text-sm);
|
|
29
|
-
--ml-checkbox-label-font-weight: var(--ml-font-medium);
|
|
30
|
-
--ml-checkbox-label-color: var(--ml-color-text-secondary);
|
|
31
|
-
--ml-checkbox-label-line-height: 1.25rem;
|
|
32
|
-
|
|
33
|
-
/* --- Hint --- */
|
|
34
|
-
--ml-checkbox-hint-font-size: var(--ml-text-sm);
|
|
35
|
-
--ml-checkbox-hint-color: var(--ml-color-text-muted);
|
|
36
|
-
|
|
37
|
-
/* --- Error --- */
|
|
38
|
-
--ml-checkbox-error-border-color: var(--ml-color-danger);
|
|
39
|
-
--ml-checkbox-error-color: var(--ml-color-danger);
|
|
40
|
-
--ml-checkbox-error-margin-top: var(--ml-space-0-5);
|
|
41
|
-
--ml-checkbox-error-line-height: var(--ml-leading-tight);
|
|
42
|
-
|
|
43
|
-
/* --- Gap --- */
|
|
44
|
-
--ml-checkbox-gap: var(--ml-space-3);
|
|
45
|
-
|
|
46
|
-
/* --- Disabled --- */
|
|
47
|
-
--ml-checkbox-disabled-opacity: 0.5;
|
|
48
|
-
|
|
49
|
-
/* --- Transition --- */
|
|
50
|
-
--ml-checkbox-transition-duration: var(--ml-duration-150);
|
|
51
|
-
--ml-checkbox-transition-easing: var(--ml-ease-in-out);
|
|
52
57
|
}
|
|
53
58
|
|
|
54
59
|
.ml-checkbox {
|
|
55
60
|
display: inline-flex;
|
|
56
61
|
align-items: flex-start;
|
|
57
|
-
gap: var(--ml-checkbox-gap);
|
|
62
|
+
gap: var(--ml-checkbox-gap, var(--ml-space-3));
|
|
58
63
|
cursor: pointer;
|
|
59
64
|
user-select: none;
|
|
60
65
|
}
|
|
61
66
|
|
|
62
67
|
.ml-checkbox:hover:not(.ml-checkbox--disabled) .ml-checkbox__box {
|
|
63
|
-
border-color: var(--ml-checkbox-hover-border-color);
|
|
68
|
+
border-color: var(--ml-checkbox-hover-border-color, var(--ml-color-primary));
|
|
64
69
|
}
|
|
65
70
|
|
|
66
71
|
.ml-checkbox__input {
|
|
@@ -71,24 +76,24 @@ export const checkboxStyles = () => css `
|
|
|
71
76
|
}
|
|
72
77
|
|
|
73
78
|
.ml-checkbox__input:focus-visible + .ml-checkbox__box {
|
|
74
|
-
border-color: var(--ml-checkbox-focus-border-color);
|
|
75
|
-
box-shadow: var(--ml-checkbox-focus-shadow);
|
|
79
|
+
border-color: var(--ml-checkbox-focus-border-color, var(--ml-color-primary));
|
|
80
|
+
box-shadow: var(--ml-checkbox-focus-shadow, var(--ml-shadow-focus-ring));
|
|
76
81
|
}
|
|
77
82
|
|
|
78
83
|
.ml-checkbox__box {
|
|
79
84
|
position: relative;
|
|
80
85
|
flex-shrink: 0;
|
|
81
86
|
display: block;
|
|
82
|
-
width: var(--ml-checkbox-box-size);
|
|
83
|
-
height: var(--ml-checkbox-box-size);
|
|
84
|
-
background-color: var(--ml-checkbox-box-bg);
|
|
85
|
-
border: var(--ml-checkbox-box-border-width) solid var(--ml-checkbox-box-border-color);
|
|
86
|
-
border-radius: var(--ml-checkbox-box-border-radius);
|
|
87
|
-
color: var(--ml-checkbox-box-color);
|
|
87
|
+
width: var(--ml-checkbox-box-size, 1.25rem);
|
|
88
|
+
height: var(--ml-checkbox-box-size, 1.25rem);
|
|
89
|
+
background-color: var(--ml-checkbox-box-bg, var(--ml-color-input-bg));
|
|
90
|
+
border: var(--ml-checkbox-box-border-width, var(--ml-border)) solid var(--ml-checkbox-box-border-color, var(--ml-color-border-strong));
|
|
91
|
+
border-radius: var(--ml-checkbox-box-border-radius, var(--ml-radius-xs));
|
|
92
|
+
color: var(--ml-checkbox-box-color, var(--ml-color-text-inverse));
|
|
88
93
|
transition:
|
|
89
|
-
background-color var(--ml-checkbox-transition-duration) var(--ml-checkbox-transition-easing),
|
|
90
|
-
border-color var(--ml-checkbox-transition-duration) var(--ml-checkbox-transition-easing),
|
|
91
|
-
box-shadow var(--ml-checkbox-transition-duration) var(--ml-checkbox-transition-easing);
|
|
94
|
+
background-color var(--ml-checkbox-transition-duration, var(--ml-duration-150)) var(--ml-checkbox-transition-easing, var(--ml-ease-in-out)),
|
|
95
|
+
border-color var(--ml-checkbox-transition-duration, var(--ml-duration-150)) var(--ml-checkbox-transition-easing, var(--ml-ease-in-out)),
|
|
96
|
+
box-shadow var(--ml-checkbox-transition-duration, var(--ml-duration-150)) var(--ml-checkbox-transition-easing, var(--ml-ease-in-out));
|
|
92
97
|
}
|
|
93
98
|
|
|
94
99
|
.ml-checkbox__check,
|
|
@@ -102,32 +107,32 @@ export const checkboxStyles = () => css `
|
|
|
102
107
|
}
|
|
103
108
|
|
|
104
109
|
.ml-checkbox__label {
|
|
105
|
-
font-size: var(--ml-checkbox-label-font-size);
|
|
106
|
-
font-weight: var(--ml-checkbox-label-font-weight);
|
|
107
|
-
color: var(--ml-checkbox-label-color);
|
|
108
|
-
line-height: var(--ml-checkbox-label-line-height);
|
|
110
|
+
font-size: var(--ml-checkbox-label-font-size, var(--ml-text-sm));
|
|
111
|
+
font-weight: var(--ml-checkbox-label-font-weight, var(--ml-font-medium));
|
|
112
|
+
color: var(--ml-checkbox-label-color, var(--ml-color-text-secondary));
|
|
113
|
+
line-height: var(--ml-checkbox-label-line-height, 1.25rem);
|
|
109
114
|
}
|
|
110
115
|
|
|
111
116
|
.ml-checkbox__hint {
|
|
112
117
|
display: block;
|
|
113
118
|
margin-top: var(--ml-space-0-5);
|
|
114
|
-
margin-
|
|
115
|
-
font-size: var(--ml-checkbox-hint-font-size);
|
|
116
|
-
color: var(--ml-checkbox-hint-color);
|
|
119
|
+
margin-inline-start: calc(var(--ml-checkbox-box-size, 1.25rem) + var(--ml-checkbox-gap, var(--ml-space-3)));
|
|
120
|
+
font-size: var(--ml-checkbox-hint-font-size, var(--ml-text-sm));
|
|
121
|
+
color: var(--ml-checkbox-hint-color, var(--ml-color-text-muted));
|
|
117
122
|
line-height: var(--ml-leading-tight);
|
|
118
123
|
}
|
|
119
124
|
|
|
120
125
|
.ml-checkbox__error {
|
|
121
126
|
display: block;
|
|
122
|
-
margin-top: var(--ml-checkbox-error-margin-top);
|
|
123
|
-
margin-
|
|
124
|
-
font-size: var(--ml-checkbox-hint-font-size);
|
|
125
|
-
color: var(--ml-checkbox-error-color);
|
|
126
|
-
line-height: var(--ml-checkbox-error-line-height);
|
|
127
|
+
margin-top: var(--ml-checkbox-error-margin-top, var(--ml-space-0-5));
|
|
128
|
+
margin-inline-start: calc(var(--ml-checkbox-box-size, 1.25rem) + var(--ml-checkbox-gap, var(--ml-space-3)));
|
|
129
|
+
font-size: var(--ml-checkbox-hint-font-size, var(--ml-text-sm));
|
|
130
|
+
color: var(--ml-checkbox-error-color, var(--ml-color-danger));
|
|
131
|
+
line-height: var(--ml-checkbox-error-line-height, var(--ml-leading-tight));
|
|
127
132
|
}
|
|
128
133
|
|
|
129
134
|
.ml-checkbox--error .ml-checkbox__box {
|
|
130
|
-
border-color: var(--ml-checkbox-error-border-color);
|
|
135
|
+
border-color: var(--ml-checkbox-error-border-color, var(--ml-color-danger));
|
|
131
136
|
}
|
|
132
137
|
|
|
133
138
|
.ml-checkbox--disabled {
|
|
@@ -137,19 +142,19 @@ export const checkboxStyles = () => css `
|
|
|
137
142
|
|
|
138
143
|
.ml-checkbox--disabled .ml-checkbox__box,
|
|
139
144
|
.ml-checkbox--disabled .ml-checkbox__label {
|
|
140
|
-
opacity: var(--ml-checkbox-disabled-opacity);
|
|
145
|
+
opacity: var(--ml-checkbox-disabled-opacity, 0.5);
|
|
141
146
|
}
|
|
142
147
|
|
|
143
148
|
.ml-checkbox--checked .ml-checkbox__box,
|
|
144
149
|
.ml-checkbox--indeterminate .ml-checkbox__box {
|
|
145
|
-
background-color: var(--ml-checkbox-checked-bg);
|
|
146
|
-
border-color: var(--ml-checkbox-checked-border-color);
|
|
150
|
+
background-color: var(--ml-checkbox-checked-bg, var(--ml-color-primary));
|
|
151
|
+
border-color: var(--ml-checkbox-checked-border-color, var(--ml-color-primary));
|
|
147
152
|
}
|
|
148
153
|
|
|
149
154
|
.ml-checkbox--checked:hover:not(.ml-checkbox--disabled) .ml-checkbox__box,
|
|
150
155
|
.ml-checkbox--indeterminate:hover:not(.ml-checkbox--disabled) .ml-checkbox__box {
|
|
151
|
-
background-color: var(--ml-checkbox-checked-hover-bg);
|
|
152
|
-
border-color: var(--ml-checkbox-checked-hover-border-color);
|
|
156
|
+
background-color: var(--ml-checkbox-checked-hover-bg, var(--ml-color-primary-hover));
|
|
157
|
+
border-color: var(--ml-checkbox-checked-hover-border-color, var(--ml-color-primary-hover));
|
|
153
158
|
}
|
|
154
159
|
|
|
155
160
|
/* --- Size variants --- */
|
|
@@ -166,4 +171,15 @@ export const checkboxStyles = () => css `
|
|
|
166
171
|
--ml-checkbox-label-font-size: var(--ml-text-base);
|
|
167
172
|
--ml-checkbox-label-line-height: 1.5rem;
|
|
168
173
|
}
|
|
174
|
+
|
|
175
|
+
/*
|
|
176
|
+
* Forced colors (Windows High Contrast): box-shadow rings and background
|
|
177
|
+
* highlights are not painted there, so focus falls back to a real outline.
|
|
178
|
+
*/
|
|
179
|
+
@media (forced-colors: active) {
|
|
180
|
+
.ml-checkbox__input:focus-visible + .ml-checkbox__box {
|
|
181
|
+
outline: 2px solid Highlight;
|
|
182
|
+
outline-offset: 2px;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
169
185
|
`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IElementRef, OnInit,
|
|
1
|
+
import type { IElementRef, OnInit, OnRender } from '@melodicdev/core';
|
|
2
2
|
export interface CalendarDay {
|
|
3
3
|
date: number;
|
|
4
4
|
month: number;
|
|
@@ -36,7 +36,7 @@ export type CalendarView = 'day' | 'month' | 'year';
|
|
|
36
36
|
*
|
|
37
37
|
* @fires ml:select - Emitted when a date is selected. Detail: { value: string }
|
|
38
38
|
*/
|
|
39
|
-
export declare class CalendarComponent implements IElementRef, OnInit,
|
|
39
|
+
export declare class CalendarComponent implements IElementRef, OnInit, OnRender {
|
|
40
40
|
elementRef: HTMLElement;
|
|
41
41
|
/** Selected date in ISO format (YYYY-MM-DD) */
|
|
42
42
|
value: string;
|
|
@@ -57,12 +57,10 @@ export declare class CalendarComponent implements IElementRef, OnInit, OnAttribu
|
|
|
57
57
|
/** First year shown on the current page of the year grid */
|
|
58
58
|
yearPageStart: number;
|
|
59
59
|
onInit(): void;
|
|
60
|
-
onAttributeChange(name: string, _: unknown, newVal: unknown): void;
|
|
61
60
|
/**
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
* attribute write also lands on the property.
|
|
61
|
+
* Navigate to a newly set date. This is the only hook needed: an observed
|
|
62
|
+
* attribute write lands on the property too, while `.value=${iso}` never
|
|
63
|
+
* writes an attribute (so an attribute hook alone missed it).
|
|
66
64
|
*/
|
|
67
65
|
onPropertyChange(name: string, _: unknown, newValue: unknown): void;
|
|
68
66
|
private navigateToValue;
|
|
@@ -108,6 +106,21 @@ export declare class CalendarComponent implements IElementRef, OnInit, OnAttribu
|
|
|
108
106
|
get monthTabStop(): number;
|
|
109
107
|
/** Year cell that carries the tab stop. */
|
|
110
108
|
get yearTabStop(): number;
|
|
109
|
+
/** Cell to focus once the next render has produced it (month changed by keyboard). */
|
|
110
|
+
private _pendingFocusKey;
|
|
111
|
+
onRender(): void;
|
|
112
|
+
/**
|
|
113
|
+
* Day-grid keyboard navigation (WAI-ARIA date picker pattern).
|
|
114
|
+
*
|
|
115
|
+
* Arrows move by a day / a week and cross month boundaries, PageUp /
|
|
116
|
+
* PageDown move by a month (with Shift: a year), Home / End go to the
|
|
117
|
+
* start / end of the week. Movement used to be index arithmetic over the
|
|
118
|
+
* enabled buttons of the visible month, so it stopped dead at the month's
|
|
119
|
+
* edges and jumped unevenly around disabled dates.
|
|
120
|
+
*
|
|
121
|
+
* Returns true when the key was handled.
|
|
122
|
+
*/
|
|
123
|
+
private handleDayGridKey;
|
|
111
124
|
handleGridKeyDown: (event: KeyboardEvent) => void;
|
|
112
125
|
private computeYearPageStart;
|
|
113
126
|
private selectedMonthForYear;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar.component.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/date-picker/calendar.component.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"calendar.component.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/date-picker/calendar.component.ts"],"names":[],"mappings":"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"}
|