@daffodil/design 0.93.1 → 0.94.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 +0 -1
- package/accordion/src/accordion-theme.scss +2 -2
- package/article/src/article/_stops-article-cascade.scss +5 -1
- package/article/src/article-theme.scss +2 -2
- package/badge/README.md +85 -0
- package/badge/src/badge-theme.scss +197 -0
- package/breadcrumb/src/breadcrumb-theme.scss +2 -2
- package/button/src/button/basic/button-theme.scss +2 -2
- package/button/src/button/flat/flat-theme.scss +2 -2
- package/button/src/button/icon/icon-theme.scss +2 -2
- package/button/src/button/raised/raised-theme.scss +13 -13
- package/button/src/button/stroked/stroked-theme.scss +2 -2
- package/button/src/button/underline/underline-theme.scss +2 -2
- package/callout/src/callout-theme.scss +12 -2
- package/card/src/card/stroked/stroked-theme.scss +14 -22
- package/card/src/card-base-theme.scss +4 -4
- package/card/src/card-base.scss +13 -16
- package/fesm2022/daffodil-design-accordion.mjs +9 -15
- package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
- package/fesm2022/daffodil-design-article.mjs +2 -2
- package/fesm2022/daffodil-design-article.mjs.map +1 -1
- package/fesm2022/daffodil-design-badge.mjs +87 -0
- package/fesm2022/daffodil-design-badge.mjs.map +1 -0
- package/fesm2022/daffodil-design-breadcrumb.mjs +1 -1
- package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
- package/fesm2022/daffodil-design-button.mjs +1 -1
- package/fesm2022/daffodil-design-button.mjs.map +1 -1
- package/fesm2022/daffodil-design-callout.mjs +2 -2
- package/fesm2022/daffodil-design-card.mjs +9 -11
- package/fesm2022/daffodil-design-card.mjs.map +1 -1
- package/fesm2022/daffodil-design-form-field.mjs +95 -115
- package/fesm2022/daffodil-design-form-field.mjs.map +1 -1
- package/fesm2022/daffodil-design-form.mjs +5 -7
- package/fesm2022/daffodil-design-form.mjs.map +1 -1
- package/fesm2022/daffodil-design-image.mjs +41 -98
- package/fesm2022/daffodil-design-image.mjs.map +1 -1
- package/fesm2022/daffodil-design-input.mjs +3 -3
- package/fesm2022/daffodil-design-input.mjs.map +1 -1
- package/fesm2022/daffodil-design-list.mjs +16 -21
- package/fesm2022/daffodil-design-list.mjs.map +1 -1
- package/fesm2022/daffodil-design-media-gallery.mjs +56 -61
- package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
- package/fesm2022/daffodil-design-menu.mjs +61 -38
- package/fesm2022/daffodil-design-menu.mjs.map +1 -1
- package/fesm2022/daffodil-design-native-select.mjs +3 -3
- package/fesm2022/daffodil-design-native-select.mjs.map +1 -1
- package/fesm2022/daffodil-design-notification.mjs +17 -20
- package/fesm2022/daffodil-design-notification.mjs.map +1 -1
- package/fesm2022/daffodil-design-paginator.mjs +71 -76
- package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
- package/fesm2022/daffodil-design-progress-bar.mjs +33 -53
- package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
- package/fesm2022/daffodil-design-select.mjs +1 -1
- package/fesm2022/daffodil-design-select.mjs.map +1 -1
- package/fesm2022/daffodil-design-spinner.mjs +17 -16
- package/fesm2022/daffodil-design-spinner.mjs.map +1 -1
- package/fesm2022/daffodil-design-switch.mjs +20 -29
- package/fesm2022/daffodil-design-switch.mjs.map +1 -1
- package/fesm2022/daffodil-design-tabs.mjs +86 -88
- package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
- package/fesm2022/daffodil-design-tag.mjs +14 -17
- package/fesm2022/daffodil-design-tag.mjs.map +1 -1
- package/fesm2022/daffodil-design-text-snippet.mjs +18 -23
- package/fesm2022/daffodil-design-text-snippet.mjs.map +1 -1
- package/fesm2022/daffodil-design-textarea.mjs +3 -3
- package/fesm2022/daffodil-design-textarea.mjs.map +1 -1
- package/fesm2022/daffodil-design-toast.mjs +19 -20
- package/fesm2022/daffodil-design-toast.mjs.map +1 -1
- package/fesm2022/daffodil-design.mjs +95 -69
- package/fesm2022/daffodil-design.mjs.map +1 -1
- package/form/src/hint/hint-theme.scss +2 -2
- package/form-field/src/form-field-theme.scss +2 -2
- package/hero/src/hero-theme.scss +12 -2
- package/list/README.md +10 -0
- package/list/src/list-theme.scss +2 -2
- package/media-gallery/README.md +0 -5
- package/media-gallery/src/media-gallery-theme.scss +2 -2
- package/menu/README.md +5 -0
- package/menu/src/menu-theme.scss +4 -4
- package/notification/src/notification-theme.scss +2 -2
- package/package.json +1 -1
- package/paginator/src/paginator-theme.scss +2 -2
- package/progress-bar/README.md +1 -1
- package/progress-bar/src/progress-bar-theme.scss +2 -2
- package/scss/state/skeleton/_mixins.scss +2 -2
- package/scss/theme/default.scss +15 -0
- package/scss/theme.scss +2 -8
- package/scss/theming/_configure-palette.scss +5 -1
- package/scss/theming/_get-theme-mode.scss +1 -1
- package/scss/theming/_index.scss +2 -3
- package/scss/theming/_light-dark.scss +37 -12
- package/scss/theming/color-shift/_color-shift.scss +56 -0
- package/scss/theming/color-shift/_color-shift.spec.scss +107 -0
- package/scss/theming/color-shift/_index.scss +1 -0
- package/scss/theming/{_daff-theme.scss → default/_daff-theme.scss} +4 -4
- package/scss/theming/default/_index.scss +1 -0
- package/select/src/select-theme.scss +5 -3
- package/switch/src/switch-theme.scss +2 -2
- package/tabs/src/tabs-theme.scss +2 -2
- package/tag/src/tag-theme.scss +2 -2
- package/toast/src/toast-theme.scss +2 -2
- package/tree/src/tree-theme.scss +2 -2
- package/types/daffodil-design-accordion.d.ts +4 -4
- package/types/daffodil-design-badge.d.ts +63 -0
- package/types/daffodil-design-card.d.ts +2 -2
- package/types/daffodil-design-form-field.d.ts +34 -31
- package/types/daffodil-design-form.d.ts +2 -2
- package/types/daffodil-design-image.d.ts +15 -28
- package/types/daffodil-design-list.d.ts +3 -3
- package/types/daffodil-design-media-gallery.d.ts +31 -20
- package/types/daffodil-design-menu.d.ts +51 -20
- package/types/daffodil-design-notification.d.ts +5 -6
- package/types/daffodil-design-paginator.d.ts +20 -25
- package/types/daffodil-design-progress-bar.d.ts +16 -21
- package/types/daffodil-design-spinner.d.ts +2 -2
- package/types/daffodil-design-switch.d.ts +7 -8
- package/types/daffodil-design-tabs.d.ts +29 -29
- package/types/daffodil-design-tag.d.ts +5 -7
- package/types/daffodil-design-text-snippet.d.ts +9 -9
- package/types/daffodil-design.d.ts +53 -38
- package/fesm2022/daffodil-design-loading-icon.mjs +0 -67
- package/fesm2022/daffodil-design-loading-icon.mjs.map +0 -1
- package/loading-icon/README.md +0 -59
- package/loading-icon/src/loading-icon-theme.scss +0 -103
- package/scss/theming/illuminate/illuminate.scss +0 -149
- package/scss/theming/illuminate/illuminate.spec.scss +0 -15
- package/types/daffodil-design-loading-icon.d.ts +0 -31
package/README.md
CHANGED
|
@@ -37,7 +37,6 @@ Refer to the [Upgrade Guide](/libs/design/guides/upgrading.md).
|
|
|
37
37
|
* [Native Select](/libs/design/src/atoms/form/native-select/README.md)
|
|
38
38
|
* [Quantity Field](/libs/design/src/atoms/form/quantity-field/README.md)
|
|
39
39
|
* [Image](/libs/design/image/README.md)
|
|
40
|
-
* [Loading Icon](/libs/design/loading-icon/README.md)
|
|
41
40
|
* [Tag](/libs/design/tag/README.md)
|
|
42
41
|
|
|
43
42
|
### Molecules
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
$mode: daff-get-theme-mode($theme);
|
|
8
8
|
|
|
9
9
|
.daff-accordion-item {
|
|
10
|
-
@include light($mode) {
|
|
10
|
+
@include daff-light-mode($mode) {
|
|
11
11
|
border-top: 1px solid daff-color($neutral, 20);
|
|
12
12
|
|
|
13
13
|
&:last-child {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
@include dark($mode) {
|
|
26
|
+
@include daff-dark-mode($mode) {
|
|
27
27
|
border-top: 1px solid daff-color($neutral, 80);
|
|
28
28
|
|
|
29
29
|
&:last-child {
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
@mixin stopsArticleCascade($selector...) {
|
|
2
2
|
#{$selector} {
|
|
3
|
-
|
|
3
|
+
// `.daff-ae` only stops the cascade when it sits between the element and
|
|
4
|
+
// the article. Anchoring it to `.daff-article` keeps article styles
|
|
5
|
+
// working when an article is nested inside an encapsulated component.
|
|
6
|
+
// `:where` keeps the anchored selector from raising specificity.
|
|
7
|
+
&:not(.daff-ae, :where(.daff-article .daff-ae *)) {
|
|
4
8
|
@content;
|
|
5
9
|
}
|
|
6
10
|
}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
$table-border-dark: daff-color($neutral, 80);
|
|
15
15
|
|
|
16
16
|
.daff-article {
|
|
17
|
-
@include light($mode) {
|
|
17
|
+
@include daff-light-mode($mode) {
|
|
18
18
|
color: $text-color-light;
|
|
19
19
|
|
|
20
20
|
@include stopsArticleCascade(a) {
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
@include dark($mode) {
|
|
101
|
+
@include daff-dark-mode($mode) {
|
|
102
102
|
color: $text-color-dark;
|
|
103
103
|
|
|
104
104
|
@include stopsArticleCascade(a) {
|
package/badge/README.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Badge
|
|
2
|
+
A badge is a compact visual label or indicator used to convey status or display short pieces of information.
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
Badges are small visual indicators that highlight quick, essential information. Use a badge to draw attention to a piece of content, such as a count, a status, or a short label.
|
|
6
|
+
|
|
7
|
+
Because badges are not interactive, they aren't meant to group, sort, or filter information. When you need those interactions, use [tags](/libs/design/tag/README.md) instead.
|
|
8
|
+
|
|
9
|
+
<daff-docs-example-viewer example="basic-badge"></daff-docs-example-viewer>
|
|
10
|
+
|
|
11
|
+
## Best practices
|
|
12
|
+
|
|
13
|
+
**When to use**
|
|
14
|
+
- Show a status, such as success, error, or new
|
|
15
|
+
- Display a small piece of metadata
|
|
16
|
+
- Provide quick, scannable context inside a UI
|
|
17
|
+
|
|
18
|
+
**When not to use**
|
|
19
|
+
- To group, sort, or filter information (use [tags](/libs/design/tag/README.md) instead)
|
|
20
|
+
- For interactive elements, such as buttons or links
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
Import `DAFF_BADGE_COMPONENTS` into your component:
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
import { DAFF_BADGE_COMPONENTS } from '@daffodil/design/badge';
|
|
28
|
+
|
|
29
|
+
@Component({
|
|
30
|
+
selector: 'custom-component',
|
|
31
|
+
templateUrl: './custom-component.component.html',
|
|
32
|
+
imports: [
|
|
33
|
+
DAFF_BADGE_COMPONENTS,
|
|
34
|
+
],
|
|
35
|
+
})
|
|
36
|
+
export class CustomComponent {}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Anatomy
|
|
40
|
+
A badge is composed of a wrapper, an optional prefix, and a label:
|
|
41
|
+
|
|
42
|
+
```html
|
|
43
|
+
<daff-badge>
|
|
44
|
+
<fa-icon [icon]="faCircleCheck" daffPrefix></fa-icon>
|
|
45
|
+
Badge label
|
|
46
|
+
</daff-badge>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
- **`<daff-badge>`**: The wrapper component that holds the badge content.
|
|
50
|
+
- **`[daffPrefix]`**: A leading visual, typically an icon, displayed before the label.
|
|
51
|
+
- **Label**: The content of the badge, projected as a child element.
|
|
52
|
+
|
|
53
|
+
## Features
|
|
54
|
+
|
|
55
|
+
### Icon support
|
|
56
|
+
Use the `[daffPrefix]` element to display a leading visual icon before the badge label.
|
|
57
|
+
|
|
58
|
+
<daff-docs-example-viewer example="badge-prefix"></daff-docs-example-viewer>
|
|
59
|
+
|
|
60
|
+
### Appearances
|
|
61
|
+
Use the `appearance` property to change the visual style of a badge.
|
|
62
|
+
|
|
63
|
+
<daff-docs-example-viewer example="badge-appearances"></daff-docs-example-viewer>
|
|
64
|
+
|
|
65
|
+
### Colors
|
|
66
|
+
Use the `color` property to change the color of a badge. The default color is `light`.
|
|
67
|
+
|
|
68
|
+
<daff-docs-example-viewer example="badge-colors"></daff-docs-example-viewer>
|
|
69
|
+
|
|
70
|
+
### Sizes
|
|
71
|
+
Use the `size` property to change the size of a badge. The default size is `md`.
|
|
72
|
+
|
|
73
|
+
<daff-docs-example-viewer example="badge-sizes"></daff-docs-example-viewer>
|
|
74
|
+
|
|
75
|
+
### Statuses
|
|
76
|
+
Use the `status` property to convey semantic meaning. A `status` takes precedence over `color`.
|
|
77
|
+
|
|
78
|
+
<daff-docs-example-viewer example="badge-statuses"></daff-docs-example-viewer>
|
|
79
|
+
|
|
80
|
+
## Accessibility
|
|
81
|
+
Badges are not interactive and do not receive focus.
|
|
82
|
+
|
|
83
|
+
### Developer responsibilities
|
|
84
|
+
- Always provide a text label unless the icon is universally understood and accessible
|
|
85
|
+
- Use the `status` property to communicate semantic meaning
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
// stylelint-disable selector-class-pattern
|
|
2
|
+
@use '../../scss/theming' as *;
|
|
3
|
+
|
|
4
|
+
@mixin daff-badge-color-light-variants(
|
|
5
|
+
$variants,
|
|
6
|
+
$background,
|
|
7
|
+
$foreground,
|
|
8
|
+
$outline-shade
|
|
9
|
+
) {
|
|
10
|
+
@each $name, $palette in $variants {
|
|
11
|
+
&.daff-#{$name} {
|
|
12
|
+
background: daff-color($palette, $background);
|
|
13
|
+
color: daff-color($palette, $foreground);
|
|
14
|
+
|
|
15
|
+
&.outlined {
|
|
16
|
+
border-color: daff-color($palette, $outline-shade);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@mixin daff-badge-color-dark-variants(
|
|
23
|
+
$variants,
|
|
24
|
+
$shade,
|
|
25
|
+
$foreground,
|
|
26
|
+
$outline-shade
|
|
27
|
+
) {
|
|
28
|
+
@each $name, $palette in $variants {
|
|
29
|
+
&.daff-#{$name} {
|
|
30
|
+
background: daff-color($palette, $shade);
|
|
31
|
+
color: daff-color($palette, $foreground);
|
|
32
|
+
|
|
33
|
+
&.outlined {
|
|
34
|
+
border-color: daff-color($palette, $outline-shade);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@mixin daff-badge-theme($theme) {
|
|
41
|
+
$primary: daff-get-palette($theme, primary);
|
|
42
|
+
$secondary: daff-get-palette($theme, secondary);
|
|
43
|
+
$tertiary: daff-get-palette($theme, tertiary);
|
|
44
|
+
$info: daff-get-palette($theme, informational);
|
|
45
|
+
$warn: daff-get-palette($theme, warn);
|
|
46
|
+
$critical: daff-get-palette($theme, critical);
|
|
47
|
+
$success: daff-get-palette($theme, success);
|
|
48
|
+
$neutral: daff-get-palette($theme, neutral);
|
|
49
|
+
$black: daff-get-base-color($theme, 'black');
|
|
50
|
+
$white: daff-get-base-color($theme, 'white');
|
|
51
|
+
$mode: daff-get-theme-mode($theme);
|
|
52
|
+
|
|
53
|
+
.daff-badge {
|
|
54
|
+
@include daff-light-mode($mode) {
|
|
55
|
+
@include daff-badge-color-light-variants(
|
|
56
|
+
(
|
|
57
|
+
'primary': $primary,
|
|
58
|
+
'secondary': $secondary,
|
|
59
|
+
'tertiary': $tertiary,
|
|
60
|
+
),
|
|
61
|
+
10,
|
|
62
|
+
90,
|
|
63
|
+
20
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
&.daff-dark {
|
|
67
|
+
background: daff-color($neutral, 80);
|
|
68
|
+
color: daff-color($neutral, 10);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&.daff-light {
|
|
72
|
+
background: daff-color($neutral, 10);
|
|
73
|
+
color: daff-color($neutral, 100);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&.daff-theme {
|
|
77
|
+
background: $white;
|
|
78
|
+
color: $black;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&.daff-theme-contrast {
|
|
82
|
+
background: daff-color($neutral, 90);
|
|
83
|
+
color: daff-color($neutral, 10);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&.outlined {
|
|
87
|
+
&.daff-dark {
|
|
88
|
+
border-color: daff-color($neutral, 90);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&.daff-light {
|
|
92
|
+
border-color: daff-color($neutral, 20);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&.daff-theme {
|
|
96
|
+
border-color: daff-color($neutral, 30);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&.daff-theme-contrast {
|
|
100
|
+
border-color: daff-color($neutral, 100);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
&.daff-info {
|
|
104
|
+
border-color: daff-color($neutral, 30);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// `status` is a state modifier that must override `color`. Both apply
|
|
109
|
+
// equal-specificity `.daff-*` classes to the same element, so these
|
|
110
|
+
// rules are authored after every color variant above to win the cascade.
|
|
111
|
+
@include daff-badge-color-light-variants(
|
|
112
|
+
(
|
|
113
|
+
'warn': $warn,
|
|
114
|
+
'critical': $critical,
|
|
115
|
+
'success': $success,
|
|
116
|
+
),
|
|
117
|
+
10,
|
|
118
|
+
90,
|
|
119
|
+
20
|
|
120
|
+
);
|
|
121
|
+
|
|
122
|
+
&.daff-info {
|
|
123
|
+
background: daff-color($neutral, 20);
|
|
124
|
+
color: daff-color($neutral, 90);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
@include daff-dark-mode($mode) {
|
|
129
|
+
background: daff-color($neutral, 80);
|
|
130
|
+
color: daff-color($neutral, 20);
|
|
131
|
+
|
|
132
|
+
@include daff-badge-color-dark-variants(
|
|
133
|
+
(
|
|
134
|
+
'primary': $primary,
|
|
135
|
+
'secondary': $secondary,
|
|
136
|
+
'tertiary': $tertiary,
|
|
137
|
+
'dark': $neutral,
|
|
138
|
+
),
|
|
139
|
+
100,
|
|
140
|
+
20,
|
|
141
|
+
90
|
|
142
|
+
);
|
|
143
|
+
|
|
144
|
+
&.daff-light {
|
|
145
|
+
background: daff-color($neutral, 10);
|
|
146
|
+
color: daff-color($neutral, 100);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
&.daff-theme {
|
|
150
|
+
background: $black;
|
|
151
|
+
color: $white;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
&.daff-theme-contrast {
|
|
155
|
+
background: $white;
|
|
156
|
+
color: $black;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
&.outlined {
|
|
160
|
+
&.daff-light {
|
|
161
|
+
border-color: daff-color($neutral, 30);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
&.daff-theme {
|
|
165
|
+
border-color: daff-color($neutral, 90);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
&.daff-theme-contrast {
|
|
169
|
+
border-color: daff-color($neutral, 30);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
&.daff-info {
|
|
173
|
+
border-color: daff-color($neutral, 80);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// `status` is a state modifier that must override `color`. Both apply
|
|
178
|
+
// equal-specificity `.daff-*` classes to the same element, so these
|
|
179
|
+
// rules are authored after every color variant above to win the cascade.
|
|
180
|
+
@include daff-badge-color-dark-variants(
|
|
181
|
+
(
|
|
182
|
+
'warn': $warn,
|
|
183
|
+
'critical': $critical,
|
|
184
|
+
'success': $success,
|
|
185
|
+
),
|
|
186
|
+
100,
|
|
187
|
+
20,
|
|
188
|
+
90
|
|
189
|
+
);
|
|
190
|
+
|
|
191
|
+
&.daff-info {
|
|
192
|
+
background: daff-color($neutral, 90);
|
|
193
|
+
color: daff-color($neutral, 20);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
|
|
7
7
|
.daff-breadcrumb__item {
|
|
8
8
|
a, .daff-breadcrumb__menu-activator {
|
|
9
|
-
@include light($mode) {
|
|
9
|
+
@include daff-light-mode($mode) {
|
|
10
10
|
color: daff-color($neutral, 80);
|
|
11
11
|
text-decoration-color: daff-color($neutral, 80);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
@include dark($mode) {
|
|
14
|
+
@include daff-dark-mode($mode) {
|
|
15
15
|
color: daff-color($neutral, 30);
|
|
16
16
|
text-decoration-color: daff-color($neutral, 30);
|
|
17
17
|
}
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
$mode: daff-get-theme-mode($theme);
|
|
44
44
|
|
|
45
45
|
.daff-button {
|
|
46
|
-
@include light($mode) {
|
|
46
|
+
@include daff-light-mode($mode) {
|
|
47
47
|
@include daff-button-theme-variant(
|
|
48
48
|
daff-color($neutral, 10),
|
|
49
49
|
daff-color($neutral, 20),
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
@include dark($mode) {
|
|
134
|
+
@include daff-dark-mode($mode) {
|
|
135
135
|
@include daff-button-theme-variant(
|
|
136
136
|
daff-color($neutral, 90),
|
|
137
137
|
daff-color($neutral, 80),
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
$mode: daff-get-theme-mode($theme);
|
|
31
31
|
|
|
32
32
|
.daff-flat-button {
|
|
33
|
-
@include light($mode) {
|
|
33
|
+
@include daff-light-mode($mode) {
|
|
34
34
|
@include daff-flat-button-theme-variant(
|
|
35
35
|
$base-contrast,
|
|
36
36
|
);
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
@include dark($mode) {
|
|
99
|
+
@include daff-dark-mode($mode) {
|
|
100
100
|
@include daff-flat-button-theme-variant(
|
|
101
101
|
$base-contrast,
|
|
102
102
|
);
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
$mode: daff-get-theme-mode($theme);
|
|
42
42
|
|
|
43
43
|
.daff-icon-button {
|
|
44
|
-
@include light($mode) {
|
|
44
|
+
@include daff-light-mode($mode) {
|
|
45
45
|
@include daff-icon-button-theme-variant(
|
|
46
46
|
daff-color($neutral, 50),
|
|
47
47
|
daff-color($neutral, 60),
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
@include dark($mode) {
|
|
132
|
+
@include daff-dark-mode($mode) {
|
|
133
133
|
@include daff-icon-button-theme-variant(
|
|
134
134
|
daff-color($neutral, 50),
|
|
135
135
|
daff-color($neutral, 40),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@use '../../../../scss/theming' as *;
|
|
2
2
|
|
|
3
|
-
@mixin daff-raised-button-theme-variant($base-color) {
|
|
3
|
+
@mixin daff-raised-button-theme-variant($theme, $base-color) {
|
|
4
4
|
@if daff-contrast-ratio($base-color, daff-text-contrast($base-color)) < 4.5 {
|
|
5
5
|
@error 'Button Initial State: ' + map.get(a11y.$wcag-aa-errors, 'text-contrast');
|
|
6
6
|
}
|
|
@@ -37,39 +37,39 @@
|
|
|
37
37
|
$neutral: daff-get-palette($theme, neutral);
|
|
38
38
|
|
|
39
39
|
.daff-raised-button {
|
|
40
|
-
@include daff-raised-button-theme-variant(daff-color($neutral, 20));
|
|
40
|
+
@include daff-raised-button-theme-variant($theme, daff-color($neutral, 20));
|
|
41
41
|
|
|
42
42
|
&.daff-primary {
|
|
43
|
-
@include daff-raised-button-theme-variant(daff-color($primary));
|
|
43
|
+
@include daff-raised-button-theme-variant($theme, daff-color($primary));
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
&.daff-secondary {
|
|
47
|
-
@include daff-raised-button-theme-variant(daff-color($secondary));
|
|
47
|
+
@include daff-raised-button-theme-variant($theme, daff-color($secondary));
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
&.daff-tertiary {
|
|
51
|
-
@include daff-raised-button-theme-variant(daff-color($tertiary));
|
|
51
|
+
@include daff-raised-button-theme-variant($theme, daff-color($tertiary));
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
&.daff-dark {
|
|
55
|
-
@include daff-raised-button-theme-variant($black);
|
|
55
|
+
@include daff-raised-button-theme-variant($theme, $black);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
&.daff-light {
|
|
59
|
-
@include daff-raised-button-theme-variant($white);
|
|
59
|
+
@include daff-raised-button-theme-variant($theme, $white);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
&.daff-theme {
|
|
63
|
-
@include daff-raised-button-theme-variant($base);
|
|
63
|
+
@include daff-raised-button-theme-variant($theme, $base);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
&.daff-theme-contrast {
|
|
67
|
-
@include daff-raised-button-theme-variant($base-contrast);
|
|
67
|
+
@include daff-raised-button-theme-variant($theme, $base-contrast);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
&[disabled],
|
|
71
71
|
&.daff-disabled {
|
|
72
|
-
@include daff-raised-button-theme-variant(daff-color($neutral, 30));
|
|
72
|
+
@include daff-raised-button-theme-variant($theme, daff-color($neutral, 30));
|
|
73
73
|
color: daff-color($neutral, 50);
|
|
74
74
|
|
|
75
75
|
&::after {
|
|
@@ -78,15 +78,15 @@
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
&.daff-warn {
|
|
81
|
-
@include daff-raised-button-theme-variant(daff-color($warn));
|
|
81
|
+
@include daff-raised-button-theme-variant($theme, daff-color($warn));
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
&.daff-critical {
|
|
85
|
-
@include daff-raised-button-theme-variant(daff-color($critical));
|
|
85
|
+
@include daff-raised-button-theme-variant($theme, daff-color($critical));
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
&.daff-success {
|
|
89
|
-
@include daff-raised-button-theme-variant(daff-color($success));
|
|
89
|
+
@include daff-raised-button-theme-variant($theme, daff-color($success));
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
}
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
@include light($mode) {
|
|
49
|
+
@include daff-light-mode($mode) {
|
|
50
50
|
&.daff-primary {
|
|
51
51
|
@include daff-stroked-button-theme-variant(
|
|
52
52
|
daff-color($primary)
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
@include dark($mode) {
|
|
101
|
+
@include daff-dark-mode($mode) {
|
|
102
102
|
&.daff-primary {
|
|
103
103
|
@include daff-stroked-button-theme-variant(
|
|
104
104
|
daff-color($primary, 40)
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
$mode: daff-get-theme-mode($theme);
|
|
25
25
|
|
|
26
26
|
.daff-underline-button {
|
|
27
|
-
@include light($mode) {
|
|
27
|
+
@include daff-light-mode($mode) {
|
|
28
28
|
@include daff-underline-button-theme-variant(
|
|
29
29
|
daff-color($neutral, 70)
|
|
30
30
|
);
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
@include dark($mode) {
|
|
83
|
+
@include daff-dark-mode($mode) {
|
|
84
84
|
@include daff-underline-button-theme-variant(
|
|
85
85
|
daff-color($neutral, 40)
|
|
86
86
|
);
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
$mode: daff-get-theme-mode($theme);
|
|
18
18
|
|
|
19
19
|
.daff-callout {
|
|
20
|
-
@include light($mode) {
|
|
20
|
+
@include daff-light-mode($mode) {
|
|
21
21
|
@include daff-callout-theme-variant(daff-color($neutral, 10));
|
|
22
22
|
|
|
23
23
|
&.daff-primary {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
@include dark($mode) {
|
|
36
|
+
@include daff-dark-mode($mode) {
|
|
37
37
|
@include daff-callout-theme-variant(daff-color($neutral, 90));
|
|
38
38
|
|
|
39
39
|
&.daff-primary {
|
|
@@ -57,12 +57,22 @@
|
|
|
57
57
|
@include daff-callout-theme-variant($base-contrast);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
// remove when `DaffColorEnum.Black` is removed in v1.0.0
|
|
60
61
|
&.daff-black {
|
|
61
62
|
@include daff-callout-theme-variant($black);
|
|
62
63
|
}
|
|
63
64
|
|
|
65
|
+
// remove when `DaffColorEnum.White` is removed in v1.0.0
|
|
64
66
|
&.daff-white {
|
|
65
67
|
@include daff-callout-theme-variant($white);
|
|
66
68
|
}
|
|
69
|
+
|
|
70
|
+
&.daff-dark {
|
|
71
|
+
@include daff-callout-theme-variant($black);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&.daff-light {
|
|
75
|
+
@include daff-callout-theme-variant($white);
|
|
76
|
+
}
|
|
67
77
|
}
|
|
68
78
|
}
|
|
@@ -13,9 +13,11 @@
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
@media (hover: hover) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
&:hover {
|
|
17
|
+
.daff-card__wrapper {
|
|
18
|
+
&::after {
|
|
19
|
+
opacity: 1;
|
|
20
|
+
}
|
|
19
21
|
}
|
|
20
22
|
}
|
|
21
23
|
}
|
|
@@ -61,7 +63,7 @@
|
|
|
61
63
|
@include stroked-card-theme-variant(daff-color($neutral, 20));
|
|
62
64
|
}
|
|
63
65
|
|
|
64
|
-
@include light($mode) {
|
|
66
|
+
@include daff-light-mode($mode) {
|
|
65
67
|
@include stroked-card-theme-variant(daff-color($neutral, 20));
|
|
66
68
|
color: $base-contrast;
|
|
67
69
|
|
|
@@ -75,7 +77,7 @@
|
|
|
75
77
|
}
|
|
76
78
|
}
|
|
77
79
|
|
|
78
|
-
@include dark($mode) {
|
|
80
|
+
@include daff-dark-mode($mode) {
|
|
79
81
|
@include stroked-card-theme-variant(daff-color($neutral, 90));
|
|
80
82
|
color: $base-contrast;
|
|
81
83
|
|
|
@@ -92,14 +94,14 @@
|
|
|
92
94
|
|
|
93
95
|
a {
|
|
94
96
|
&.daff-stroked-card {
|
|
95
|
-
@include light($mode) {
|
|
97
|
+
@include daff-light-mode($mode) {
|
|
96
98
|
@include linkable-stroked-card-theme-variant(
|
|
97
99
|
daff-color($neutral, 20),
|
|
98
100
|
0.2
|
|
99
101
|
);
|
|
100
102
|
}
|
|
101
103
|
|
|
102
|
-
@include dark($mode) {
|
|
104
|
+
@include daff-dark-mode($mode) {
|
|
103
105
|
@include linkable-stroked-card-theme-variant(
|
|
104
106
|
daff-color($neutral, 90),
|
|
105
107
|
0.2
|
|
@@ -107,33 +109,23 @@
|
|
|
107
109
|
}
|
|
108
110
|
|
|
109
111
|
&.daff-primary {
|
|
110
|
-
@include linkable-stroked-card-theme-variant(
|
|
111
|
-
daff-color($primary)
|
|
112
|
-
);
|
|
112
|
+
@include linkable-stroked-card-theme-variant(daff-color($primary));
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
&.daff-secondary {
|
|
116
|
-
@include linkable-stroked-card-theme-variant(
|
|
117
|
-
daff-color($secondary)
|
|
118
|
-
);
|
|
116
|
+
@include linkable-stroked-card-theme-variant(daff-color($secondary));
|
|
119
117
|
}
|
|
120
118
|
|
|
121
119
|
&.daff-tertiary {
|
|
122
|
-
@include linkable-stroked-card-theme-variant(
|
|
123
|
-
daff-color($tertiary)
|
|
124
|
-
);
|
|
120
|
+
@include linkable-stroked-card-theme-variant(daff-color($tertiary));
|
|
125
121
|
}
|
|
126
122
|
|
|
127
123
|
&.daff-dark {
|
|
128
|
-
@include linkable-stroked-card-theme-variant(
|
|
129
|
-
daff-color($neutral, 90)
|
|
130
|
-
);
|
|
124
|
+
@include linkable-stroked-card-theme-variant(daff-color($neutral, 90));
|
|
131
125
|
}
|
|
132
126
|
|
|
133
127
|
&.daff-light {
|
|
134
|
-
@include linkable-stroked-card-theme-variant(
|
|
135
|
-
daff-color($neutral, 20)
|
|
136
|
-
);
|
|
128
|
+
@include linkable-stroked-card-theme-variant(daff-color($neutral, 20));
|
|
137
129
|
}
|
|
138
130
|
}
|
|
139
131
|
}
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
.daff-card {
|
|
57
|
-
@include light($mode) {
|
|
57
|
+
@include daff-light-mode($mode) {
|
|
58
58
|
@include daff-basic-card-theme-variant(daff-color($neutral, 10));
|
|
59
59
|
|
|
60
60
|
&.daff-primary {
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
@include dark($mode) {
|
|
73
|
+
@include daff-dark-mode($mode) {
|
|
74
74
|
@include daff-basic-card-theme-variant(daff-color($neutral, 90));
|
|
75
75
|
|
|
76
76
|
&.daff-primary {
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
&.daff-card {
|
|
120
|
-
@include light($mode) {
|
|
120
|
+
@include daff-light-mode($mode) {
|
|
121
121
|
@include daff-linkable-card-theme-variant(daff-color($neutral, 20));
|
|
122
122
|
|
|
123
123
|
&.daff-primary {
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
@include dark($mode) {
|
|
152
|
+
@include daff-dark-mode($mode) {
|
|
153
153
|
@include daff-linkable-card-theme-variant(daff-color($neutral, 80));
|
|
154
154
|
|
|
155
155
|
&.daff-primary {
|