@daffodil/design 0.93.0 → 0.93.1
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/beacon/README.md +61 -0
- package/beacon/src/beacon-theme.scss +61 -0
- package/fesm2022/daffodil-design-beacon.mjs +48 -0
- package/fesm2022/daffodil-design-beacon.mjs.map +1 -0
- package/fesm2022/daffodil-design-modal.mjs +2 -2
- package/fesm2022/daffodil-design-modal.mjs.map +1 -1
- package/fesm2022/daffodil-design-progress-bar.mjs +2 -2
- package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
- package/fesm2022/daffodil-design-sidebar.mjs +2 -2
- package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
- package/fesm2022/daffodil-design-spinner.mjs +2 -2
- package/fesm2022/daffodil-design-spinner.mjs.map +1 -1
- package/fesm2022/daffodil-design-tag.mjs +29 -21
- package/fesm2022/daffodil-design-tag.mjs.map +1 -1
- package/fesm2022/daffodil-design-toast.mjs +2 -2
- package/fesm2022/daffodil-design-toast.mjs.map +1 -1
- package/fesm2022/daffodil-design.mjs +16 -11
- package/fesm2022/daffodil-design.mjs.map +1 -1
- package/package.json +1 -1
- package/scss/global.scss +4 -0
- package/scss/theme.scss +2 -0
- package/tag/README.md +10 -6
- package/tag/src/tag-theme.scss +100 -3
- package/types/daffodil-design-beacon.d.ts +26 -0
- package/types/daffodil-design-tag.d.ts +20 -12
- package/types/daffodil-design.d.ts +8 -3
package/tag/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Tag
|
|
2
|
-
Tags are
|
|
2
|
+
Tags are interactive indicators and filters that can be edited or removed, used to represent selections, categories, or applied filters.
|
|
3
3
|
|
|
4
4
|
## Overview
|
|
5
|
-
Tag supports flexible content projection to allow for various combinations of icons, labels, and interactive elements within a consistent container.
|
|
5
|
+
Tag supports flexible content projection to allow for various combinations of icons, labels, and interactive elements within a consistent container. Tags can be dismissed to remove a selection or filter, making them well suited for filter chips, applied search criteria, and editable selections.
|
|
6
6
|
|
|
7
7
|
<daff-docs-example-viewer example="basic-tag"></daff-docs-example-viewer>
|
|
8
8
|
|
|
@@ -36,7 +36,7 @@ A tag is composed of a wrapper, an optional prefix, a label, and an optional clo
|
|
|
36
36
|
- **`<daff-tag>`**: The wrapper component that holds all tag content.
|
|
37
37
|
- **`[daffPrefix]`**: A leading visual, typically an icon, displayed before the label.
|
|
38
38
|
- **Label**: The text content of the tag, projected as a child element.
|
|
39
|
-
- **Close button**: A trailing
|
|
39
|
+
- **Close button**: A trailing remove button, displayed when `dismissible` is `true`.
|
|
40
40
|
|
|
41
41
|
## Features
|
|
42
42
|
|
|
@@ -46,7 +46,7 @@ Set `dismissible` to `true` to display a close button. The button emits a `close
|
|
|
46
46
|
<daff-docs-example-viewer example="dismissible-tag"></daff-docs-example-viewer>
|
|
47
47
|
|
|
48
48
|
### Disabled tags
|
|
49
|
-
Set `disabled` to `true` to disable the tag. Disabled tags cannot be
|
|
49
|
+
Set `disabled` to `true` to disable the tag. Disabled tags cannot be removed.
|
|
50
50
|
|
|
51
51
|
<daff-docs-example-viewer example="disabled-tag"></daff-docs-example-viewer>
|
|
52
52
|
|
|
@@ -63,15 +63,19 @@ Use the `color` property to change the color of a tag. Supported colors: `primar
|
|
|
63
63
|
### Statuses
|
|
64
64
|
Use the `status` property to convey semantic meaning. Supported statuses: `warn`, `critical`, `info`, `success`.
|
|
65
65
|
|
|
66
|
+
> **Deprecation notice:**
|
|
67
|
+
>
|
|
68
|
+
> The `status` property is deprecated. Tags are intended for selections, categories, and applied filters, so use the `color` property instead.
|
|
69
|
+
|
|
66
70
|
<daff-docs-example-viewer example="statusable-tag"></daff-docs-example-viewer>
|
|
67
71
|
|
|
68
72
|
## Accessibility
|
|
69
73
|
|
|
70
74
|
### Built-in behavior
|
|
71
75
|
- Default tags are not interactive and do not receive focus.
|
|
72
|
-
-
|
|
76
|
+
- Removable tags include a focusable close button that can be activated with `Enter` or `Space`.
|
|
73
77
|
- Disabled tags expose `aria-disabled="true"` and ignore close button activation.
|
|
74
78
|
|
|
75
79
|
### Developer responsibilities
|
|
76
80
|
- Always provide a text label unless the icon is universally understood and accessible.
|
|
77
|
-
-
|
|
81
|
+
- Communicate meaning through the tag's label or an accessible icon, rather than relying on color alone.
|
package/tag/src/tag-theme.scss
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// stylelint-disable selector-class-pattern
|
|
1
2
|
@use '../../scss/theming' as *;
|
|
2
3
|
|
|
3
4
|
@mixin daff-tag-theme($theme) {
|
|
@@ -18,119 +19,215 @@
|
|
|
18
19
|
background: daff-color($neutral, 20);
|
|
19
20
|
color: $black;
|
|
20
21
|
|
|
22
|
+
&::after {
|
|
23
|
+
background: daff-color($neutral, 30);
|
|
24
|
+
}
|
|
25
|
+
|
|
21
26
|
&.daff-primary {
|
|
22
27
|
background: daff-color($primary, 10);
|
|
23
28
|
color: daff-color($primary, 70);
|
|
29
|
+
|
|
30
|
+
&::after {
|
|
31
|
+
background: daff-color($primary, 20);
|
|
32
|
+
}
|
|
24
33
|
}
|
|
25
34
|
|
|
26
35
|
&.daff-secondary {
|
|
27
36
|
background: daff-color($secondary, 10);
|
|
28
37
|
color: daff-color($secondary, 70);
|
|
38
|
+
|
|
39
|
+
&::after {
|
|
40
|
+
background: daff-color($secondary, 20);
|
|
41
|
+
}
|
|
29
42
|
}
|
|
30
43
|
|
|
31
44
|
&.daff-tertiary {
|
|
32
45
|
background: daff-color($tertiary, 10);
|
|
33
46
|
color: daff-color($tertiary, 70);
|
|
47
|
+
|
|
48
|
+
&::after {
|
|
49
|
+
background: daff-color($tertiary, 20);
|
|
50
|
+
}
|
|
34
51
|
}
|
|
35
52
|
|
|
36
53
|
&.daff-dark {
|
|
37
54
|
background: daff-color($neutral, 90);
|
|
38
55
|
color: daff-color($neutral, 10);
|
|
56
|
+
|
|
57
|
+
&::after {
|
|
58
|
+
background: daff-color($neutral, 100);
|
|
59
|
+
}
|
|
39
60
|
}
|
|
40
61
|
|
|
41
62
|
&.daff-light {
|
|
42
63
|
background: daff-color($neutral, 10);
|
|
43
64
|
color: daff-color($neutral, 90);
|
|
65
|
+
|
|
66
|
+
&::after {
|
|
67
|
+
background: daff-color($neutral, 20);
|
|
68
|
+
}
|
|
44
69
|
}
|
|
45
70
|
|
|
46
71
|
&.daff-theme {
|
|
47
72
|
background: $white;
|
|
48
73
|
color: $black;
|
|
74
|
+
|
|
75
|
+
&::after {
|
|
76
|
+
background: daff-color($neutral, 20);
|
|
77
|
+
}
|
|
49
78
|
}
|
|
50
79
|
|
|
51
80
|
&.daff-theme-contrast {
|
|
52
81
|
background: $black;
|
|
53
82
|
color: $white;
|
|
83
|
+
|
|
84
|
+
&::after {
|
|
85
|
+
background: daff-color($neutral, 90);
|
|
86
|
+
}
|
|
54
87
|
}
|
|
55
88
|
|
|
56
89
|
&.daff-warn {
|
|
57
90
|
background: daff-color($warn, 10);
|
|
58
91
|
color: daff-color($warn, 70);
|
|
92
|
+
|
|
93
|
+
&::after {
|
|
94
|
+
background: daff-color($warn, 20);
|
|
95
|
+
}
|
|
59
96
|
}
|
|
60
97
|
|
|
61
98
|
&.daff-success {
|
|
62
99
|
background: daff-color($success, 10);
|
|
63
100
|
color: daff-color($success, 70);
|
|
101
|
+
|
|
102
|
+
&::after {
|
|
103
|
+
background: daff-color($success, 20);
|
|
104
|
+
}
|
|
64
105
|
}
|
|
65
106
|
|
|
66
107
|
&.daff-critical {
|
|
67
108
|
background: daff-color($critical, 10);
|
|
68
109
|
color: daff-color($critical, 70);
|
|
110
|
+
|
|
111
|
+
&::after {
|
|
112
|
+
background: daff-color($critical, 20);
|
|
113
|
+
}
|
|
69
114
|
}
|
|
70
115
|
|
|
71
116
|
&.daff-info {
|
|
72
117
|
background: daff-color($info, 10);
|
|
73
|
-
color: daff-color($info,
|
|
118
|
+
color: daff-color($info, 90);
|
|
119
|
+
|
|
120
|
+
&::after {
|
|
121
|
+
background: daff-color($info, 20);
|
|
122
|
+
}
|
|
74
123
|
}
|
|
75
124
|
}
|
|
76
125
|
|
|
77
126
|
@include dark($mode) {
|
|
78
|
-
background: daff-color($neutral,
|
|
127
|
+
background: daff-color($neutral, 80);
|
|
79
128
|
color: daff-color($neutral, 20);
|
|
80
129
|
|
|
130
|
+
&::after {
|
|
131
|
+
background: daff-color($neutral, 90);
|
|
132
|
+
}
|
|
133
|
+
|
|
81
134
|
&.daff-primary {
|
|
82
135
|
background: daff-color($primary, 90);
|
|
83
136
|
color: daff-color($primary, 10);
|
|
137
|
+
|
|
138
|
+
&::after {
|
|
139
|
+
background: daff-color($primary, 100);
|
|
140
|
+
}
|
|
84
141
|
}
|
|
85
142
|
|
|
86
143
|
&.daff-secondary {
|
|
87
144
|
background: daff-color($secondary, 90);
|
|
88
145
|
color: daff-color($secondary, 10);
|
|
146
|
+
|
|
147
|
+
&::after {
|
|
148
|
+
background: daff-color($secondary, 100);
|
|
149
|
+
}
|
|
89
150
|
}
|
|
90
151
|
|
|
91
152
|
&.daff-tertiary {
|
|
92
153
|
background: daff-color($tertiary, 90);
|
|
93
154
|
color: daff-color($tertiary, 10);
|
|
155
|
+
|
|
156
|
+
&::after {
|
|
157
|
+
background: daff-color($tertiary, 100);
|
|
158
|
+
}
|
|
94
159
|
}
|
|
95
160
|
|
|
96
161
|
&.daff-dark {
|
|
97
162
|
background: daff-color($neutral, 90);
|
|
98
163
|
color: daff-color($neutral, 10);
|
|
164
|
+
|
|
165
|
+
&::after {
|
|
166
|
+
background: daff-color($neutral, 100);
|
|
167
|
+
}
|
|
99
168
|
}
|
|
100
169
|
|
|
101
170
|
&.daff-light {
|
|
102
171
|
background: daff-color($neutral, 10);
|
|
103
172
|
color: daff-color($neutral, 90);
|
|
173
|
+
|
|
174
|
+
&::after {
|
|
175
|
+
background: daff-color($neutral, 30);
|
|
176
|
+
}
|
|
104
177
|
}
|
|
105
178
|
|
|
106
179
|
&.daff-theme {
|
|
107
180
|
background: $black;
|
|
108
181
|
color: $white;
|
|
182
|
+
|
|
183
|
+
&::after {
|
|
184
|
+
background: daff-color($neutral, 100);
|
|
185
|
+
}
|
|
109
186
|
}
|
|
110
187
|
|
|
111
188
|
&.daff-theme-contrast {
|
|
112
189
|
background: $white;
|
|
113
190
|
color: $black;
|
|
191
|
+
|
|
192
|
+
&::after {
|
|
193
|
+
background: daff-color($neutral, 20);
|
|
194
|
+
}
|
|
114
195
|
}
|
|
115
196
|
|
|
116
197
|
&.daff-warn {
|
|
117
198
|
background: daff-color($warn, 90);
|
|
118
199
|
color: daff-color($warn, 10);
|
|
200
|
+
|
|
201
|
+
&::after {
|
|
202
|
+
background: daff-color($warn, 100);
|
|
203
|
+
}
|
|
119
204
|
}
|
|
120
205
|
|
|
121
206
|
&.daff-success {
|
|
122
207
|
background: daff-color($success, 90);
|
|
123
208
|
color: daff-color($success, 10);
|
|
209
|
+
|
|
210
|
+
&::after {
|
|
211
|
+
background: daff-color($success, 100);
|
|
212
|
+
}
|
|
124
213
|
}
|
|
125
214
|
|
|
126
215
|
&.daff-critical {
|
|
127
216
|
background: daff-color($critical, 90);
|
|
128
217
|
color: daff-color($critical, 10);
|
|
218
|
+
|
|
219
|
+
&::after {
|
|
220
|
+
background: daff-color($critical, 100);
|
|
221
|
+
}
|
|
129
222
|
}
|
|
130
223
|
|
|
131
224
|
&.daff-info {
|
|
132
|
-
background: daff-color($info,
|
|
225
|
+
background: daff-color($info, 80);
|
|
133
226
|
color: daff-color($info, 10);
|
|
227
|
+
|
|
228
|
+
&::after {
|
|
229
|
+
background: daff-color($neutral, 80);
|
|
230
|
+
}
|
|
134
231
|
}
|
|
135
232
|
}
|
|
136
233
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import * as i1 from '@daffodil/design';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The cadence of the beacon ring, e.g. how long one expand-and-fade cycle takes.
|
|
6
|
+
*
|
|
7
|
+
* - `slow` - a relaxed 3.6s cycle.
|
|
8
|
+
* - `normal` - the default 2.4s cycle.
|
|
9
|
+
* - `fast` - an urgent 1.2s cycle.
|
|
10
|
+
*/
|
|
11
|
+
type DaffBeaconSpeed = 'slow' | 'normal' | 'fast';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* DaffBeaconComponent is a small indicator that draws visual attention to a specific location or element.
|
|
15
|
+
*/
|
|
16
|
+
declare class DaffBeaconComponent {
|
|
17
|
+
/**
|
|
18
|
+
* How fast the beacon pulses.
|
|
19
|
+
*/
|
|
20
|
+
speed: i0.InputSignal<DaffBeaconSpeed>;
|
|
21
|
+
constructor();
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffBeaconComponent, never>;
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DaffBeaconComponent, "daff-beacon", never, { "speed": { "alias": "speed"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, [{ directive: typeof i1.DaffColorableDirective; inputs: { "color": "color"; }; outputs: {}; }, { directive: typeof i1.DaffStatusableDirective; inputs: { "status": "status"; }; outputs: {}; }, { directive: typeof i1.DaffSizableDirective; inputs: { "size": "size"; }; outputs: {}; }]>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { DaffBeaconComponent };
|
|
@@ -2,7 +2,7 @@ import * as _fortawesome_fontawesome_common_types from '@fortawesome/fontawesome
|
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { EventEmitter } from '@angular/core';
|
|
4
4
|
import * as i1 from '@daffodil/design';
|
|
5
|
-
import { DaffSizableDirective, DaffSizeSmallType, DaffSizeMediumType, DaffSizeLargeType, DaffDisableable, DaffPrefixDirective, DaffDisableableDirective } from '@daffodil/design';
|
|
5
|
+
import { DaffSizableDirective, DaffSizeSmallType, DaffSizeMediumType, DaffSizeLargeType, DaffDisableable, DaffPrefixDirective, DaffStatus, DaffDisableableDirective, DaffStatusableDirective } from '@daffodil/design';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* The size types that the DaffTagComponent can implement.
|
|
@@ -14,19 +14,20 @@ declare class DaffTagSizableDirective extends DaffSizableDirective<DaffTagSize>
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* DaffTagComponent is an interactive indicator and filter that can be edited or removed, used to represent selections, categories, or applied filters.
|
|
18
18
|
*
|
|
19
19
|
* @example
|
|
20
20
|
* ```html
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
21
|
+
* <daff-tag [dismissible]="true" (closeTag)="onCloseTag()">
|
|
22
|
+
* <fa-icon daffPrefix [icon]="faCircleCheck"></fa-icon>
|
|
23
|
+
* Label
|
|
24
|
+
* </daff-tag>
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
|
27
27
|
declare class DaffTagComponent implements DaffDisableable {
|
|
28
28
|
private size;
|
|
29
29
|
private disabledDirective;
|
|
30
|
+
private statusable;
|
|
30
31
|
/**
|
|
31
32
|
* @docs-private
|
|
32
33
|
*/
|
|
@@ -41,12 +42,18 @@ declare class DaffTagComponent implements DaffDisableable {
|
|
|
41
42
|
* Internal function to access the disabled property of the DaffDisableableDirective.
|
|
42
43
|
*/
|
|
43
44
|
get disabled(): boolean;
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
/**
|
|
46
|
+
* @deprecated Deprecated in version 0.93.0. Deprecated in version 0.93.1. Will be removed in version 0.96.0.
|
|
47
|
+
*
|
|
48
|
+
* Sets the status on the tag.
|
|
49
|
+
*/
|
|
50
|
+
get status(): DaffStatus;
|
|
51
|
+
set status(value: DaffStatus);
|
|
52
|
+
/**
|
|
53
|
+
* Whether the tag can be dismissed by the user.
|
|
46
54
|
* Displays a close icon if `true`.
|
|
47
55
|
*/
|
|
48
|
-
|
|
49
|
-
set dismissible(value: any);
|
|
56
|
+
dismissible: boolean;
|
|
50
57
|
/**
|
|
51
58
|
* Emits when the tag is closed.
|
|
52
59
|
*/
|
|
@@ -57,9 +64,10 @@ declare class DaffTagComponent implements DaffDisableable {
|
|
|
57
64
|
* Internal handler for the close icon click.
|
|
58
65
|
*/
|
|
59
66
|
onCloseTag(event: Event): void;
|
|
60
|
-
constructor(size: DaffTagSizableDirective, disabledDirective: DaffDisableableDirective);
|
|
67
|
+
constructor(size: DaffTagSizableDirective, disabledDirective: DaffDisableableDirective, statusable: DaffStatusableDirective);
|
|
61
68
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffTagComponent, never>;
|
|
62
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DaffTagComponent, "daff-tag", never, { "dismissible": { "alias": "dismissible"; "required": false; }; }, { "closeTag": "closeTag"; }, ["_prefix"], ["[daffPrefix]", "*"], true, [{ directive: typeof i1.DaffArticleEncapsulatedDirective; inputs: {}; outputs: {}; }, { directive: typeof DaffTagSizableDirective; inputs: { "size": "size"; }; outputs: {}; }, { directive: typeof i1.DaffColorableDirective; inputs: { "color": "color"; }; outputs: {}; }, { directive: typeof i1.DaffStatusableDirective; inputs: {
|
|
69
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DaffTagComponent, "daff-tag", never, { "status": { "alias": "status"; "required": false; }; "dismissible": { "alias": "dismissible"; "required": false; }; }, { "closeTag": "closeTag"; }, ["_prefix"], ["[daffPrefix]", "*"], true, [{ directive: typeof i1.DaffArticleEncapsulatedDirective; inputs: {}; outputs: {}; }, { directive: typeof DaffTagSizableDirective; inputs: { "size": "size"; }; outputs: {}; }, { directive: typeof i1.DaffColorableDirective; inputs: { "color": "color"; }; outputs: {}; }, { directive: typeof i1.DaffStatusableDirective; inputs: {}; outputs: {}; }, { directive: typeof i1.DaffDisableableDirective; inputs: { "disabled": "disabled"; }; outputs: {}; }]>;
|
|
70
|
+
static ngAcceptInputType_dismissible: unknown;
|
|
63
71
|
}
|
|
64
72
|
|
|
65
73
|
/**
|
|
@@ -445,7 +445,7 @@ declare class DaffArticleEncapsulatedDirective {
|
|
|
445
445
|
declare enum DaffTheme {
|
|
446
446
|
Light = "light",
|
|
447
447
|
Dark = "dark",
|
|
448
|
-
|
|
448
|
+
System = "system"
|
|
449
449
|
}
|
|
450
450
|
|
|
451
451
|
/**
|
|
@@ -498,6 +498,11 @@ declare class DaffThemingService {
|
|
|
498
498
|
* Get the current theme.
|
|
499
499
|
*/
|
|
500
500
|
getTheme(): Observable<DaffTheme>;
|
|
501
|
+
/**
|
|
502
|
+
* Get the user's stored theme preference. Emits `DaffTheme.System` when no
|
|
503
|
+
* preference is stored and the theme follows the operating system.
|
|
504
|
+
*/
|
|
505
|
+
getThemePreference(): Observable<DaffTheme>;
|
|
501
506
|
/**
|
|
502
507
|
* Set the theme to dark mode.
|
|
503
508
|
*/
|
|
@@ -507,9 +512,9 @@ declare class DaffThemingService {
|
|
|
507
512
|
*/
|
|
508
513
|
lightMode(): void;
|
|
509
514
|
/**
|
|
510
|
-
*
|
|
515
|
+
* Follow the operating system's theme preference by clearing any stored theme.
|
|
511
516
|
*/
|
|
512
|
-
|
|
517
|
+
systemMode(): void;
|
|
513
518
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffThemingService, never>;
|
|
514
519
|
static ɵprov: i0.ɵɵInjectableDeclaration<DaffThemingService>;
|
|
515
520
|
}
|