@daffodil/design 0.81.1 → 0.83.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/accordion/README.md +44 -29
- package/accordion/accordion/accordion/accordion.component.d.ts +3 -0
- package/accordion/accordion/accordion-item/accordion-item.component.d.ts +23 -12
- package/accordion/accordion/accordion-item-title/accordion-item-title.directive.d.ts +3 -0
- package/accordion/accordion.d.ts +5 -0
- package/accordion/examples/disabled-accordion/disabled-accordion.component.d.ts +5 -0
- package/accordion/examples/initially-expanded-accordion/initially-expanded-accordion.component.d.ts +5 -0
- package/accordion/examples/public_api.d.ts +2 -0
- package/accordion/src/accordion-theme.scss +28 -6
- package/article/README.md +4 -3
- package/article/article.d.ts +3 -0
- package/article/src/article-theme.scss +128 -51
- package/breadcrumb/README.md +38 -28
- package/breadcrumb/breadcrumb/breadcrumb.component.d.ts +15 -2
- package/breadcrumb/breadcrumb-item/breadcrumb-item.directive.d.ts +18 -4
- package/breadcrumb/breadcrumb.d.ts +3 -0
- package/breadcrumb/examples/iterated-breadcrumb/iterated-breadcrumb.component.d.ts +6 -0
- package/breadcrumb/public_api.d.ts +2 -2
- package/button/README.md +43 -23
- package/button/button/basic/button.component.d.ts +5 -1
- package/button/button/button-base.directive.d.ts +11 -3
- package/button/button/button-sizable.directive.d.ts +1 -1
- package/button/button/raised/raised.component.d.ts +2 -0
- package/button/button/stroked/stroked.component.d.ts +5 -1
- package/button/button.d.ts +4 -2
- package/button/button.module.d.ts +1 -2
- package/button/examples/elevated-button/elevated-button.component.d.ts +6 -0
- package/button/examples/examples.d.ts +2 -1
- package/button/examples/public_api.d.ts +1 -0
- package/button/public_api.d.ts +0 -1
- package/button/src/button/basic/button-theme.scss +185 -80
- package/button/src/button/button-base.scss +41 -16
- package/button/src/button/flat/flat-theme.scss +144 -85
- package/button/src/button/icon/icon-theme.scss +183 -79
- package/button/src/button/raised/raised-theme.scss +2 -7
- package/button/src/button/stroked/stroked-theme.scss +128 -94
- package/button/src/button/underline/underline-theme.scss +112 -44
- package/callout/README.md +4 -3
- package/callout/callout.d.ts +3 -0
- package/card/README.md +6 -3
- package/card/card/basic/basic.component.d.ts +7 -0
- package/card/card/raised/raised.component.d.ts +7 -0
- package/card/card/stroked/stroked.component.d.ts +7 -0
- package/card/card-base.directive.d.ts +25 -0
- package/card/card.d.ts +18 -1
- package/card/card.module.d.ts +10 -8
- package/card/examples/card-theming/card-theming.component.d.ts +2 -1
- package/card/examples/public_api.d.ts +1 -1
- package/card/public_api.d.ts +6 -1
- package/card/src/card/raised/raised-theme.scss +30 -0
- package/card/src/card/stroked/stroked-theme.scss +135 -0
- package/card/src/card-base-theme.scss +197 -0
- package/card/src/card-base.scss +134 -0
- package/container/README.md +5 -3
- package/container/container.d.ts +3 -0
- package/core/colorable/colorable.d.ts +20 -14
- package/core/colorable/colorable.directive.d.ts +9 -6
- package/fesm2022/daffodil-design-accordion-examples.mjs +28 -4
- package/fesm2022/daffodil-design-accordion-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-accordion.mjs +56 -29
- package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
- package/fesm2022/daffodil-design-article-examples.mjs +30 -30
- package/fesm2022/daffodil-design-article.mjs +14 -11
- package/fesm2022/daffodil-design-article.mjs.map +1 -1
- package/fesm2022/daffodil-design-breadcrumb-examples.mjs +24 -4
- package/fesm2022/daffodil-design-breadcrumb-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-breadcrumb.mjs +78 -40
- package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
- package/fesm2022/daffodil-design-button-examples.mjs +55 -33
- package/fesm2022/daffodil-design-button-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-button.mjs +79 -69
- package/fesm2022/daffodil-design-button.mjs.map +1 -1
- package/fesm2022/daffodil-design-callout-examples.mjs +12 -12
- package/fesm2022/daffodil-design-callout-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-callout.mjs +25 -22
- package/fesm2022/daffodil-design-callout.mjs.map +1 -1
- package/fesm2022/daffodil-design-card-examples.mjs +35 -31
- package/fesm2022/daffodil-design-card-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-card.mjs +140 -86
- package/fesm2022/daffodil-design-card.mjs.map +1 -1
- package/fesm2022/daffodil-design-checkbox-examples.mjs +6 -6
- package/fesm2022/daffodil-design-checkbox-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-container-examples.mjs +3 -3
- package/fesm2022/daffodil-design-container.mjs +10 -7
- package/fesm2022/daffodil-design-container.mjs.map +1 -1
- package/fesm2022/daffodil-design-hero-examples.mjs +12 -12
- package/fesm2022/daffodil-design-hero-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-hero.mjs +25 -22
- package/fesm2022/daffodil-design-hero.mjs.map +1 -1
- package/fesm2022/daffodil-design-image-examples.mjs +9 -9
- package/fesm2022/daffodil-design-image.mjs +36 -19
- package/fesm2022/daffodil-design-image.mjs.map +1 -1
- package/fesm2022/daffodil-design-input-examples.mjs +12 -12
- package/fesm2022/daffodil-design-link-set.mjs +19 -16
- package/fesm2022/daffodil-design-link-set.mjs.map +1 -1
- package/fesm2022/daffodil-design-list-examples.mjs +12 -12
- package/fesm2022/daffodil-design-list.mjs +13 -10
- package/fesm2022/daffodil-design-list.mjs.map +1 -1
- package/fesm2022/daffodil-design-loading-icon-examples.mjs +4 -4
- package/fesm2022/daffodil-design-loading-icon-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-loading-icon.mjs +11 -8
- package/fesm2022/daffodil-design-loading-icon.mjs.map +1 -1
- package/fesm2022/daffodil-design-media-gallery-examples.mjs +62 -13
- package/fesm2022/daffodil-design-media-gallery-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-media-gallery.mjs +204 -250
- package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
- package/fesm2022/daffodil-design-menu-examples.mjs +6 -6
- package/fesm2022/daffodil-design-menu-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-menu.mjs +16 -16
- package/fesm2022/daffodil-design-modal-examples.mjs +7 -7
- package/fesm2022/daffodil-design-modal-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-modal.mjs +28 -25
- package/fesm2022/daffodil-design-modal.mjs.map +1 -1
- package/fesm2022/daffodil-design-navbar-examples.mjs +12 -12
- package/fesm2022/daffodil-design-navbar-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-navbar.mjs +10 -7
- package/fesm2022/daffodil-design-navbar.mjs.map +1 -1
- package/fesm2022/daffodil-design-notification-examples.mjs +17 -16
- package/fesm2022/daffodil-design-notification-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-notification.mjs +23 -20
- package/fesm2022/daffodil-design-notification.mjs.map +1 -1
- package/fesm2022/daffodil-design-paginator-examples.mjs +6 -6
- package/fesm2022/daffodil-design-paginator.mjs +13 -7
- package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
- package/fesm2022/daffodil-design-progress-bar-examples.mjs +10 -10
- package/fesm2022/daffodil-design-progress-bar-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-progress-bar.mjs +13 -13
- package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
- package/fesm2022/daffodil-design-quantity-field-examples.mjs +12 -12
- package/fesm2022/daffodil-design-radio-examples.mjs +3 -3
- package/fesm2022/daffodil-design-sidebar-examples.mjs +14 -14
- package/fesm2022/daffodil-design-sidebar-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-sidebar.mjs +150 -61
- package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
- package/fesm2022/daffodil-design-switch-examples.mjs +15 -15
- package/fesm2022/daffodil-design-switch-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-switch.mjs +38 -10
- package/fesm2022/daffodil-design-switch.mjs.map +1 -1
- package/fesm2022/daffodil-design-tabs-examples.mjs +23 -17
- package/fesm2022/daffodil-design-tabs-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-tabs.mjs +67 -35
- package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
- package/fesm2022/daffodil-design-text-snippet-examples.mjs +3 -3
- package/fesm2022/daffodil-design-text-snippet.mjs +4 -5
- package/fesm2022/daffodil-design-text-snippet.mjs.map +1 -1
- package/fesm2022/daffodil-design-toast-examples.mjs +40 -15
- package/fesm2022/daffodil-design-toast-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-toast.mjs +296 -239
- package/fesm2022/daffodil-design-toast.mjs.map +1 -1
- package/fesm2022/daffodil-design-tree-examples.mjs +6 -6
- package/fesm2022/daffodil-design-tree.mjs +15 -12
- package/fesm2022/daffodil-design-tree.mjs.map +1 -1
- package/fesm2022/daffodil-design-youtube-player.mjs +104 -0
- package/fesm2022/daffodil-design-youtube-player.mjs.map +1 -0
- package/fesm2022/daffodil-design.mjs +167 -155
- package/fesm2022/daffodil-design.mjs.map +1 -1
- package/hero/README.md +4 -3
- package/hero/hero.d.ts +3 -0
- package/image/README.md +4 -3
- package/image/image/image.component.d.ts +22 -1
- package/image/image.d.ts +3 -0
- package/link-set/README.md +4 -3
- package/link-set/link-set.d.ts +3 -0
- package/list/README.md +4 -3
- package/list/list.d.ts +3 -0
- package/loading-icon/README.md +10 -7
- package/loading-icon/loading-icon.d.ts +3 -0
- package/loading-icon/src/loading-icon-theme.scss +66 -38
- package/media-gallery/README.md +19 -10
- package/media-gallery/examples/iterated-media-gallery/iterated-media-gallery.component.d.ts +13 -0
- package/media-gallery/examples/media-gallery-with-video/media-gallery-with-video.component.d.ts +5 -0
- package/media-gallery/examples/public_api.d.ts +2 -0
- package/media-gallery/helpers/media-gallery-registration.interface.d.ts +1 -1
- package/media-gallery/media-gallery/media-gallery.component.d.ts +89 -11
- package/media-gallery/media-gallery.d.ts +4 -2
- package/media-gallery/media-gallery.module.d.ts +1 -2
- package/media-gallery/public_api.d.ts +3 -4
- package/media-gallery/src/media-gallery-theme.scss +30 -4
- package/media-gallery/thumbnail/thumbnail.directive.d.ts +45 -22
- package/menu/README.md +1 -2
- package/modal/README.md +3 -2
- package/modal/modal.d.ts +3 -0
- package/navbar/README.md +3 -2
- package/navbar/navbar.d.ts +3 -0
- package/notification/README.md +5 -4
- package/notification/notification.d.ts +3 -0
- package/notification/src/notification-theme.scss +62 -23
- package/package.json +1 -1
- package/paginator/README.md +3 -2
- package/paginator/paginator/paginator.component.d.ts +3 -0
- package/paginator/paginator.d.ts +3 -0
- package/progress-bar/README.md +5 -6
- package/progress-bar/progress-bar.component.d.ts +0 -3
- package/progress-bar/progress-bar.d.ts +3 -0
- package/progress-bar/src/progress-bar-theme.scss +17 -8
- package/scss/theme.scss +36 -17
- package/scss/theming/_configure-theme.scss +2 -0
- package/scss/theming/_index.scss +1 -0
- package/scss/theming/_light-dark.scss +45 -0
- package/sidebar/README.md +20 -21
- package/sidebar/helper/sidebar-mode.d.ts +9 -15
- package/sidebar/public_api.d.ts +10 -11
- package/sidebar/sidebar/sidebar.component.d.ts +22 -7
- package/sidebar/sidebar-footer/sidebar-footer.component.d.ts +11 -0
- package/sidebar/sidebar-header/sidebar-header-title/sidebar-header-title.directive.d.ts +8 -0
- package/sidebar/sidebar-header/sidebar-header.component.d.ts +19 -1
- package/sidebar/sidebar-viewport/sidebar-viewport.component.d.ts +36 -15
- package/sidebar/sidebar-viewport-backdrop/sidebar-viewport-backdrop.component.d.ts +17 -0
- package/sidebar/sidebar.d.ts +4 -2
- package/sidebar/sidebar.module.d.ts +1 -2
- package/switch/README.md +3 -2
- package/switch/src/switch-theme.scss +29 -10
- package/switch/switch/switch.component.d.ts +31 -6
- package/switch/switch.d.ts +3 -0
- package/tabs/README.md +33 -3
- package/tabs/src/tabs-theme.scss +31 -13
- package/tabs/tabs/tab/tab.component.d.ts +1 -1
- package/tabs/tabs/tab-label/tab-label.component.d.ts +6 -0
- package/tabs/tabs/tab-panel/tab-panel.component.d.ts +8 -0
- package/tabs/tabs/tabs.component.d.ts +21 -4
- package/tabs/tabs.d.ts +8 -2
- package/text-snippet/README.md +19 -1
- package/toast/README.md +21 -151
- package/toast/examples/dismissible-toast/dismissible-toast.component.d.ts +11 -0
- package/toast/examples/public_api.d.ts +2 -1
- package/toast/interfaces/toast-action.d.ts +22 -11
- package/toast/interfaces/toast-action.type.d.ts +10 -0
- package/toast/interfaces/toast.d.ts +11 -5
- package/toast/options/daff-toast-options.d.ts +2 -1
- package/toast/public_api.d.ts +2 -6
- package/toast/service/position.service.d.ts +9 -1
- package/toast/service/toast.service.d.ts +63 -0
- package/toast/src/toast-theme.scss +80 -33
- package/toast/toast/toast-config.d.ts +24 -1
- package/toast/toast/toast-provider.d.ts +16 -0
- package/toast/toast/toast.component.d.ts +20 -1
- package/toast/toast-actions/toast-actions.directive.d.ts +3 -0
- package/toast/toast-message/toast-message.directive.d.ts +3 -0
- package/toast/toast-title/toast-title.directive.d.ts +3 -0
- package/tree/README.md +6 -10
- package/tree/src/tree-theme.scss +39 -13
- package/tree/tree.d.ts +3 -0
- package/youtube-player/index.d.ts +1 -0
- package/youtube-player/public_api.d.ts +3 -0
- package/youtube-player/safe-url.pipe.d.ts +10 -0
- package/youtube-player/youtube-player.component.d.ts +23 -0
- package/youtube-player/youtube-player.d.ts +6 -0
- package/card/card/card.component.d.ts +0 -48
- package/card/src/card-theme-variants/basic-card.scss +0 -6
- package/card/src/card-theme-variants/linkable-card.scss +0 -16
- package/card/src/card-theme-variants/stroked-card.scss +0 -3
- package/card/src/card-theme.scss +0 -170
- package/media-gallery/media-renderer/media-renderer.component.d.ts +0 -29
- package/media-gallery/registry/media-gallery.registry.d.ts +0 -34
- package/media-gallery/thumbnail/thumbnail-compat.token.d.ts +0 -1
- package/media-gallery/thumbnail/thumbnail-registration.interface.d.ts +0 -9
- package/scss/theming/prebuilt/internal-theme.scss +0 -13
- package/toast/toast.module.d.ts +0 -19
package/accordion/README.md
CHANGED
@@ -2,28 +2,26 @@
|
|
2
2
|
An accordion is a group of vertically stacked headings used to toggle the visibility of a section of content.
|
3
3
|
|
4
4
|
## Overview
|
5
|
-
Accordions are
|
5
|
+
Accordions are helpful to shorten pages and reduce scrolling by hiding content that's not crucial to display at all times. The accordion component consists of several pre-styled components and directives.
|
6
6
|
|
7
7
|
<design-land-example-viewer-container example="basic-accordion"></design-land-example-viewer-container>
|
8
8
|
|
9
|
-
##
|
10
|
-
|
9
|
+
## Formatting
|
10
|
+
Accordions are built using `<daff-accordion>`, `<daff-accordion-item>`, and `[daffAccordionItemTitle]`.
|
11
11
|
|
12
|
-
|
12
|
+
- **`<daff-accordion>`**: A wrapper for grouping accordion items.
|
13
|
+
- **`<daff-accordion-item>`**: The wrapper for the title and content. It handles the expansion and collapse of the inner content when clicked.
|
14
|
+
- **`[daffAccordionItemTitle]`**: Used to provide a high level overview of the content.
|
13
15
|
|
14
|
-
|
15
|
-
An item content can be visibile on render by setting the `initiallyExpanded` property to `true` on `daff-accordion-item`.
|
16
|
+
Any additional content placed inside of an accordion item will be displayed as part of the collapsible content.
|
16
17
|
|
17
18
|
## Usage
|
18
|
-
|
19
|
-
### Within a standalone component
|
20
|
-
To use accordion in a standalone component, import it directly into your custom component:
|
21
|
-
|
22
19
|
```ts
|
20
|
+
import { DAFF_ACCORDION_COMPONENTS } from '@daffodil/design/accordion';
|
21
|
+
|
23
22
|
@Component({
|
24
23
|
selector: 'custom-component',
|
25
24
|
templateUrl: './custom-component.component.html',
|
26
|
-
standalone: true,
|
27
25
|
imports: [
|
28
26
|
DAFF_ACCORDION_COMPONENTS,
|
29
27
|
],
|
@@ -31,26 +29,43 @@ To use accordion in a standalone component, import it directly into your custom
|
|
31
29
|
export class CustomComponent {}
|
32
30
|
```
|
33
31
|
|
34
|
-
|
35
|
-
|
32
|
+
```html
|
33
|
+
<daff-accordion>
|
34
|
+
<daff-accordion-item>
|
35
|
+
<div daffAccordionItemTitle></div>
|
36
|
+
<p>Item Content</p>
|
37
|
+
</daff-accordion-item>
|
38
|
+
<daff-accordion-item>
|
39
|
+
<div daffAccordionItemTitle></div>
|
40
|
+
<p>Item Content</p>
|
41
|
+
</daff-accordion-item>
|
42
|
+
</daff-accordion>
|
43
|
+
```
|
36
44
|
|
37
|
-
|
38
|
-
import { NgModule } from '@angular/core';
|
45
|
+
## Examples
|
39
46
|
|
40
|
-
|
47
|
+
### Expand an item by default
|
48
|
+
Use the `initiallyExpanded` property on the accordion item to have it opened by default.
|
41
49
|
|
42
|
-
|
43
|
-
|
44
|
-
CustomComponent,
|
45
|
-
],
|
46
|
-
exports: [
|
47
|
-
CustomComponent,
|
48
|
-
],
|
49
|
-
imports: [
|
50
|
-
DaffAccordionModule,
|
51
|
-
],
|
52
|
-
})
|
53
|
-
export class CustomComponentModule { }
|
50
|
+
```html
|
51
|
+
<daff-accordion-item [initiallyExpanded]="true"></daff-accordion-item>
|
54
52
|
```
|
55
53
|
|
56
|
-
|
54
|
+
### Disable an item
|
55
|
+
Use the `disabled` property on the accordion item to prevent it from being expanded or collapsed.
|
56
|
+
|
57
|
+
```html
|
58
|
+
<daff-accordion-item [disabled]="true"></daff-accordion-item>
|
59
|
+
```
|
60
|
+
|
61
|
+
## Accessibility
|
62
|
+
Accordion follows the [Accordion WAI-ARIA design pattern](https://www.w3.org/WAI/ARIA/apg/patterns/accordion/).
|
63
|
+
|
64
|
+
- Titles have an `id`, the `button` role, the `aria-expanded` state, and the `aria-controls` property set to the ID specified by the `contentId` property. It uses an autogenerated value by default but can be customized.
|
65
|
+
- Content blocks have an `id`, the `region` role, and the `aria-labelledby` property set to the ID specified by the `itemId` property. It uses an autogenerated value by default but can be customized.
|
66
|
+
|
67
|
+
### Keyboard interactions
|
68
|
+
| Key | Action |
|
69
|
+
| --- | ------ |
|
70
|
+
| `Tab` | Moves focus to the next focusable element. |
|
71
|
+
| `Space` or `Enter` | When focus is on the accordion item, it collapses or expands the associated content panel. |
|
@@ -1,5 +1,8 @@
|
|
1
1
|
import * as i0 from "@angular/core";
|
2
2
|
import * as i1 from "@daffodil/design";
|
3
|
+
/**
|
4
|
+
* A wrapper for grouping accordion items.
|
5
|
+
*/
|
3
6
|
export declare class DaffAccordionComponent {
|
4
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffAccordionComponent, never>;
|
5
8
|
static ɵcmp: i0.ɵɵComponentDeclaration<DaffAccordionComponent, "daff-accordion", never, {}, {}, never, ["*"], true, [{ directive: typeof i1.DaffArticleEncapsulatedDirective; inputs: {}; outputs: {}; }]>;
|
@@ -2,24 +2,32 @@ import { OnInit } from '@angular/core';
|
|
2
2
|
import { DaffOpenable, DaffOpenableDirective } from '@daffodil/design';
|
3
3
|
import * as i0 from "@angular/core";
|
4
4
|
import * as i1 from "@daffodil/design";
|
5
|
+
/**
|
6
|
+
* The wrapper for the title and content. It handles the expansion and collapse of the inner content when clicked.
|
7
|
+
* All `daff-accordion-item`s should be grouped inside the `daff-accordion` component.
|
8
|
+
*/
|
5
9
|
export declare class DaffAccordionItemComponent implements OnInit, DaffOpenable {
|
6
10
|
private openDirective;
|
7
11
|
/**
|
8
12
|
* @docs-private
|
9
13
|
*/
|
10
|
-
|
14
|
+
class: boolean;
|
11
15
|
/**
|
12
|
-
*
|
16
|
+
* The unique id of an accordion item. Defaults to an autogenerated value.
|
13
17
|
*/
|
14
|
-
|
18
|
+
itemId: string;
|
15
19
|
/**
|
16
|
-
*
|
20
|
+
* The unique id of an accordion item content. Defaults to an autogenerated value.
|
21
|
+
*/
|
22
|
+
contentId: string;
|
23
|
+
/**
|
24
|
+
* Whether or not the item is initially opened by default.
|
17
25
|
*/
|
18
|
-
class: boolean;
|
19
|
-
_daffAccordionItemId: string;
|
20
|
-
id: string;
|
21
|
-
/** Whether or not the item is initiallyExpanded by default. */
|
22
26
|
initiallyExpanded: boolean;
|
27
|
+
/**
|
28
|
+
* Disables an accordion item and prevents it from being expanded or collapsed.
|
29
|
+
*/
|
30
|
+
disabled: boolean;
|
23
31
|
/**
|
24
32
|
* @docs-private
|
25
33
|
*/
|
@@ -29,19 +37,22 @@ export declare class DaffAccordionItemComponent implements OnInit, DaffOpenable
|
|
29
37
|
* @docs-private
|
30
38
|
*/
|
31
39
|
ngOnInit(): void;
|
40
|
+
/**
|
41
|
+
* @docs-private
|
42
|
+
*/
|
32
43
|
get open(): boolean;
|
33
44
|
/**
|
34
|
-
* Reveals the contents of the accordion item
|
45
|
+
* Reveals the contents of the accordion item.
|
35
46
|
*/
|
36
47
|
reveal(): void;
|
37
48
|
/**
|
38
|
-
* Hides the contents of the accordion item
|
49
|
+
* Hides the contents of the accordion item.
|
39
50
|
*/
|
40
51
|
hide(): void;
|
41
52
|
/**
|
42
|
-
* Toggles the visibility of the contents of the accordion item
|
53
|
+
* Toggles the visibility of the contents of the accordion item.
|
43
54
|
*/
|
44
55
|
toggle(): void;
|
45
56
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffAccordionItemComponent, never>;
|
46
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DaffAccordionItemComponent, "daff-accordion-item", never, { "
|
57
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DaffAccordionItemComponent, "daff-accordion-item", never, { "itemId": { "alias": "itemId"; "required": false; }; "contentId": { "alias": "contentId"; "required": false; }; "initiallyExpanded": { "alias": "initiallyExpanded"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, ["[daffAccordionItemTitle]", "*"], true, [{ directive: typeof i1.DaffOpenableDirective; inputs: { "open": "open"; }; outputs: { "toggled": "toggled"; }; }]>;
|
47
58
|
}
|
package/accordion/accordion.d.ts
CHANGED
@@ -1,4 +1,9 @@
|
|
1
1
|
import { DaffAccordionComponent } from './accordion/accordion/accordion.component';
|
2
2
|
import { DaffAccordionItemComponent } from './accordion/accordion-item/accordion-item.component';
|
3
3
|
import { DaffAccordionItemTitleDirective } from './accordion/accordion-item-title/accordion-item-title.directive';
|
4
|
+
/**
|
5
|
+
* @docs-private
|
6
|
+
*
|
7
|
+
* `DAFF_ACCORDION_COMPONENTS` imports all the available components and directives related to the component.
|
8
|
+
*/
|
4
9
|
export declare const DAFF_ACCORDION_COMPONENTS: readonly [typeof DaffAccordionComponent, typeof DaffAccordionItemComponent, typeof DaffAccordionItemTitleDirective];
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
export declare class DisabledAccordionComponent {
|
3
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DisabledAccordionComponent, never>;
|
4
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DisabledAccordionComponent, "disabled-accordion", never, {}, {}, never, never, true, never>;
|
5
|
+
}
|
package/accordion/examples/initially-expanded-accordion/initially-expanded-accordion.component.d.ts
ADDED
@@ -0,0 +1,5 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
export declare class InitiallyExpandedAccordionComponent {
|
3
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InitiallyExpandedAccordionComponent, never>;
|
4
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InitiallyExpandedAccordionComponent, "initially-expanded-accordion", never, {}, {}, never, never, true, never>;
|
5
|
+
}
|
@@ -1,2 +1,4 @@
|
|
1
1
|
export { BasicAccordionComponent } from './basic-accordion/basic-accordion.component';
|
2
|
+
export { InitiallyExpandedAccordionComponent } from './initially-expanded-accordion/initially-expanded-accordion.component';
|
3
|
+
export { DisabledAccordionComponent } from './disabled-accordion/disabled-accordion.component';
|
2
4
|
export { ACCORDION_EXAMPLES } from './examples';
|
@@ -5,17 +5,39 @@
|
|
5
5
|
@mixin daff-accordion-theme($theme) {
|
6
6
|
$neutral: core.daff-map-get($theme, 'core', 'neutral');
|
7
7
|
$base: core.daff-map-get($theme, 'core', 'base');
|
8
|
+
$base-contrast: core.daff-map-get($theme, 'core', 'base-contrast');
|
9
|
+
$type: core.daff-map-get($theme, 'core', 'type');
|
8
10
|
|
9
11
|
.daff-accordion-item {
|
10
|
-
|
12
|
+
@include theming.light($type) {
|
13
|
+
border-top: 1px solid theming.daff-color($neutral, 20);
|
11
14
|
|
12
|
-
|
13
|
-
|
15
|
+
&:last-child {
|
16
|
+
border-bottom: 1px solid theming.daff-color($neutral, 20);
|
17
|
+
}
|
18
|
+
|
19
|
+
.daff-accordion-item__header {
|
20
|
+
color: $base-contrast;
|
21
|
+
|
22
|
+
&::after {
|
23
|
+
border-color: $base-contrast;
|
24
|
+
}
|
25
|
+
}
|
14
26
|
}
|
15
27
|
|
16
|
-
|
17
|
-
|
18
|
-
|
28
|
+
@include theming.dark($type) {
|
29
|
+
border-top: 1px solid theming.daff-color($neutral, 80);
|
30
|
+
|
31
|
+
&:last-child {
|
32
|
+
border-bottom: 1px solid theming.daff-color($neutral, 80);
|
33
|
+
}
|
34
|
+
|
35
|
+
.daff-accordion-item__header {
|
36
|
+
color: $base-contrast;
|
37
|
+
|
38
|
+
&::after {
|
39
|
+
border-color: $base-contrast;
|
40
|
+
}
|
19
41
|
}
|
20
42
|
}
|
21
43
|
}
|
package/article/README.md
CHANGED
@@ -51,13 +51,14 @@ Articles also support other custom "non-native" components like [accordions](/li
|
|
51
51
|
## Usage
|
52
52
|
|
53
53
|
### Within a standalone component
|
54
|
-
To use article in a standalone component, import
|
54
|
+
To use article in a standalone component, import `DAFF_ARTICLE_COMPONENTS` directly into your custom component:
|
55
55
|
|
56
56
|
```ts
|
57
|
+
import { DAFF_ARTICLE_COMPONENTS } from '@daffodil/design/article';
|
58
|
+
|
57
59
|
@Component({
|
58
60
|
selector: 'custom-component',
|
59
61
|
templateUrl: './custom-component.component.html',
|
60
|
-
standalone: true,
|
61
62
|
imports: [
|
62
63
|
DAFF_ARTICLE_COMPONENTS,
|
63
64
|
],
|
@@ -70,8 +71,8 @@ To use article in a module, import `DaffArticleModule` into your custom module:
|
|
70
71
|
|
71
72
|
```ts
|
72
73
|
import { NgModule } from '@angular/core';
|
73
|
-
|
74
74
|
import { DaffArticleModule } from '@daffodil/design/article';
|
75
|
+
import { CustomComponent } from './custom.component';
|
75
76
|
|
76
77
|
@NgModule({
|
77
78
|
declarations: [
|
package/article/article.d.ts
CHANGED
@@ -1,3 +1,6 @@
|
|
1
1
|
import { DaffArticleComponent } from './article/article.component';
|
2
2
|
import { DaffArticleMetaDirective } from './article-meta/article-meta.directive';
|
3
|
+
/**
|
4
|
+
* @docs-private
|
5
|
+
*/
|
3
6
|
export declare const DAFF_ARTICLE_COMPONENTS: readonly [typeof DaffArticleComponent, typeof DaffArticleMetaDirective];
|
@@ -5,83 +5,160 @@
|
|
5
5
|
|
6
6
|
@mixin daff-article-theme($theme) {
|
7
7
|
$primary: core.daff-map-get($theme, primary);
|
8
|
-
$secondary: core.daff-map-get($theme, secondary);
|
9
|
-
$tertiary: core.daff-map-get($theme, tertiary);
|
10
|
-
$base: core.daff-map-get($theme, 'core', 'base');
|
11
|
-
$base-contrast: core.daff-map-get($theme, 'core', 'base-contrast');
|
12
|
-
$white: core.daff-map-get($theme, 'core', 'white');
|
13
|
-
$black: core.daff-map-get($theme, 'core', 'black');
|
14
8
|
$neutral: core.daff-map-get($theme, 'core', 'neutral');
|
9
|
+
$type: core.daff-map-get($theme, 'core', 'type');
|
15
10
|
|
16
|
-
$
|
17
|
-
$
|
11
|
+
$link-color-light: theming.daff-color($primary);
|
12
|
+
$link-color-dark: theming.daff-color($primary, 40);
|
13
|
+
$text-color-light: theming.daff-color($neutral, 90);
|
14
|
+
$text-color-dark: theming.daff-color($neutral, 10);
|
15
|
+
$table-border-light: theming.daff-color($neutral, 20);
|
16
|
+
$table-border-dark: theming.daff-color($neutral, 80);
|
18
17
|
|
19
18
|
.daff-article {
|
20
|
-
|
19
|
+
@include theming.light($type) {
|
20
|
+
color: $text-color-light;
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
@include stopsArticleCascade(a) {
|
27
|
-
color: theming.daff-color($primary);
|
22
|
+
@include stopsArticleCascade(a) {
|
23
|
+
color: $link-color-light;
|
24
|
+
text-decoration-color: $link-color-light;
|
25
|
+
}
|
28
26
|
|
29
27
|
code {
|
30
|
-
background: theming.daff-
|
31
|
-
color: theming.daff-illuminate($base-contrast, $primary, 4);
|
28
|
+
background: rgba(theming.daff-color($neutral, 20), 0.5);
|
32
29
|
}
|
33
|
-
}
|
34
30
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
color: $base-contrast;
|
31
|
+
pre {
|
32
|
+
background: rgba(theming.daff-color($neutral, 20), 0.3);
|
33
|
+
border: 1px solid theming.daff-color($neutral, 20);
|
39
34
|
|
40
|
-
|
41
|
-
|
42
|
-
|
35
|
+
code {
|
36
|
+
background: none;
|
37
|
+
border: none;
|
38
|
+
}
|
43
39
|
}
|
44
|
-
}
|
45
40
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
}
|
41
|
+
hr {
|
42
|
+
background: theming.daff-color($neutral, 20);
|
43
|
+
}
|
50
44
|
|
51
|
-
|
52
|
-
|
53
|
-
|
45
|
+
blockquote {
|
46
|
+
background: rgba(theming.daff-color($primary), 0.1);
|
47
|
+
border-left: 4px solid theming.daff-color($primary, 50);
|
48
|
+
color: theming.daff-color($primary, 100);
|
54
49
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
color: theming.daff-illuminate($base-contrast, $primary, 1);
|
50
|
+
code {
|
51
|
+
background: rgba(theming.daff-color($primary), 0.12);
|
52
|
+
color: theming.daff-color($primary, 100);
|
59
53
|
|
60
|
-
|
61
|
-
|
62
|
-
|
54
|
+
@include stopsArticleCascade(a) {
|
55
|
+
color: theming.daff-color($primary, 70);
|
56
|
+
text-decoration-color: theming.daff-color($primary, 70);
|
57
|
+
}
|
58
|
+
}
|
63
59
|
}
|
64
60
|
|
65
|
-
|
66
|
-
|
61
|
+
table {
|
62
|
+
border: 1px solid $table-border-light;
|
63
|
+
|
64
|
+
th {
|
65
|
+
background: theming.daff-color($neutral, 10);
|
66
|
+
}
|
67
|
+
|
68
|
+
th,
|
69
|
+
td {
|
70
|
+
&:not(:last-child) {
|
71
|
+
border-right: 1px solid $table-border-light;
|
72
|
+
}
|
73
|
+
}
|
74
|
+
|
75
|
+
thead {
|
76
|
+
th {
|
77
|
+
border-bottom: 1px solid $table-border-light;
|
78
|
+
}
|
79
|
+
}
|
80
|
+
|
81
|
+
tr {
|
82
|
+
&:not(:last-child) {
|
83
|
+
th,
|
84
|
+
td {
|
85
|
+
border-bottom: 1px solid $table-border-light;
|
86
|
+
}
|
87
|
+
}
|
88
|
+
}
|
67
89
|
}
|
90
|
+
}
|
91
|
+
|
92
|
+
@include theming.dark($type) {
|
93
|
+
color: $text-color-dark;
|
68
94
|
|
69
95
|
@include stopsArticleCascade(a) {
|
96
|
+
color: $link-color-dark;
|
97
|
+
text-decoration-color: $link-color-dark;
|
98
|
+
}
|
99
|
+
|
100
|
+
code {
|
101
|
+
background: rgba(theming.daff-color($neutral, 20), 0.15);
|
102
|
+
}
|
103
|
+
|
104
|
+
pre {
|
105
|
+
background: rgba(theming.daff-color($neutral, 20), 0.15);
|
106
|
+
border: 1px solid rgba(theming.daff-color($neutral, 20), 0.15);
|
107
|
+
|
70
108
|
code {
|
71
|
-
background:
|
72
|
-
|
109
|
+
background: none;
|
110
|
+
border: none;
|
73
111
|
}
|
74
112
|
}
|
75
|
-
}
|
76
113
|
|
77
|
-
|
78
|
-
|
79
|
-
background: theming.daff-illuminate($base, $neutral, 1);
|
80
|
-
border: 1px solid $table-border-color;
|
114
|
+
hr {
|
115
|
+
background: theming.daff-color($neutral, 80);
|
81
116
|
}
|
82
117
|
|
83
|
-
|
84
|
-
|
118
|
+
blockquote {
|
119
|
+
background: rgba(theming.daff-color($primary), 0.12);
|
120
|
+
border-left: 4px solid theming.daff-color($primary, 40);
|
121
|
+
color: theming.daff-color($primary, 10);
|
122
|
+
|
123
|
+
code {
|
124
|
+
background: rgba(theming.daff-color($primary), 0.18);
|
125
|
+
color: theming.daff-color($primary, 10);
|
126
|
+
|
127
|
+
@include stopsArticleCascade(a) {
|
128
|
+
color: theming.daff-color($primary, 40);
|
129
|
+
text-decoration-color: theming.daff-color($primary, 40);
|
130
|
+
}
|
131
|
+
}
|
132
|
+
}
|
133
|
+
|
134
|
+
table {
|
135
|
+
border: 1px solid $table-border-dark;
|
136
|
+
|
137
|
+
th {
|
138
|
+
background: theming.daff-color($neutral, 90);
|
139
|
+
}
|
140
|
+
|
141
|
+
th,
|
142
|
+
td {
|
143
|
+
&:not(:last-child) {
|
144
|
+
border-right: 1px solid $table-border-dark;
|
145
|
+
}
|
146
|
+
}
|
147
|
+
|
148
|
+
thead {
|
149
|
+
th {
|
150
|
+
border-bottom: 1px solid $table-border-dark;
|
151
|
+
}
|
152
|
+
}
|
153
|
+
|
154
|
+
tr {
|
155
|
+
&:not(:last-child) {
|
156
|
+
th,
|
157
|
+
td {
|
158
|
+
border-bottom: 1px solid $table-border-dark;
|
159
|
+
}
|
160
|
+
}
|
161
|
+
}
|
85
162
|
}
|
86
163
|
}
|
87
164
|
}
|
package/breadcrumb/README.md
CHANGED
@@ -2,21 +2,27 @@
|
|
2
2
|
Breadcrumbs are a secondary navigation that displays a user's location within a website or application.
|
3
3
|
|
4
4
|
## Overview
|
5
|
-
Breadcrumbs are a visual representation of the site's navigational hierarchy. They indicate the current page's location and allows users to easily move up to a parent level.
|
5
|
+
Breadcrumbs are a visual representation of the site's navigational hierarchy. They indicate the current page's location and allows users to easily move up to a parent level.
|
6
6
|
|
7
|
-
##
|
8
|
-
|
7
|
+
## Requirements
|
8
|
+
- `[daff-breadcrumb]` is required to be used with the native HTML `<ol>` element.
|
9
|
+
- Each `[daffBreadcrumbItem]` needs to be a `<li>` element.
|
9
10
|
|
10
|
-
##
|
11
|
+
## Structure
|
12
|
+
Breadcrumbs are built using `[daff-breadcrumb]` and `[daffBreadCrumbItem]`.
|
11
13
|
|
12
|
-
|
13
|
-
|
14
|
+
- **`[daff-breadcrumb]`**: a wrapper for grouping breadcrumb items.
|
15
|
+
- **`[daffBreacrumbItem]`**: used to display each breadcrumb item.
|
16
|
+
|
17
|
+
<design-land-example-viewer-container example="basic-breadcrumb"></design-land-example-viewer-container>
|
14
18
|
|
19
|
+
## Usage
|
15
20
|
```ts
|
21
|
+
import { DAFF_BREADCRUMB_COMPONENTS } from '@daffodil/design/breadcrumb';
|
22
|
+
|
16
23
|
@Component({
|
17
24
|
selector: 'custom-component',
|
18
25
|
templateUrl: './custom-component.component.html',
|
19
|
-
standalone: true,
|
20
26
|
imports: [
|
21
27
|
DAFF_BREADCRUMB_COMPONENTS,
|
22
28
|
],
|
@@ -24,29 +30,33 @@ To use breadcrumb in a standalone component, import it directly into your custom
|
|
24
30
|
export class CustomComponent {}
|
25
31
|
```
|
26
32
|
|
27
|
-
|
28
|
-
|
33
|
+
```html
|
34
|
+
<ol daff-breadcrumb>
|
35
|
+
<li daffBreadcrumbItem>
|
36
|
+
<a routerLink="/link">Link</a>
|
37
|
+
</li>
|
38
|
+
<li daffBreadcrumbItem>
|
39
|
+
<a routerLink="/link">Link</a>
|
40
|
+
</li>
|
41
|
+
<li daffBreacrumbItem>
|
42
|
+
<span>Active Link</span>
|
43
|
+
</li>
|
44
|
+
</ol>
|
45
|
+
```
|
29
46
|
|
30
|
-
|
31
|
-
|
47
|
+
## Accessibility
|
48
|
+
Breadcrumb follows the [Breadcrumb WAI-ARIA design pattern](https://www.w3.org/WAI/ARIA/apg/patterns/breadcrumb/).
|
32
49
|
|
33
|
-
|
50
|
+
- `aria-current="page"` is automatically applied to the last item to indicate that it represents the current page.
|
34
51
|
|
35
|
-
|
36
|
-
declarations: [
|
37
|
-
CustomComponent,
|
38
|
-
],
|
39
|
-
exports: [
|
40
|
-
CustomComponent,
|
41
|
-
],
|
42
|
-
imports: [
|
43
|
-
DaffBreadcrumbModule,
|
44
|
-
],
|
45
|
-
})
|
46
|
-
export class CustomComponentModule { }
|
47
|
-
```
|
52
|
+
In order to fully comply with the WAI-ARIA design pattern:
|
48
53
|
|
49
|
-
|
54
|
+
- Breadcrumbs should be wrapped in a native HTML `<nav>` element so that assistive technologies can present the breadcrumbs as a navigational element on the page.
|
55
|
+
- Use `aria-label="Breadcrumb"` on the `nav` element to provide more context into what kind of navigation it is.
|
50
56
|
|
51
|
-
|
52
|
-
|
57
|
+
```html
|
58
|
+
<nav aria-label="breadcrumb">
|
59
|
+
<ol daff-breadcrumb>
|
60
|
+
</ol>
|
61
|
+
</nav>
|
62
|
+
```
|
@@ -1,7 +1,20 @@
|
|
1
|
+
import { QueryList, AfterContentInit, DestroyRef } from '@angular/core';
|
2
|
+
import { DaffBreadcrumbItemDirective } from '../breadcrumb-item/breadcrumb-item.directive';
|
1
3
|
import * as i0 from "@angular/core";
|
2
4
|
import * as i1 from "@daffodil/design";
|
3
|
-
export declare class DaffBreadcrumbComponent {
|
5
|
+
export declare class DaffBreadcrumbComponent implements AfterContentInit {
|
6
|
+
private destroyRef;
|
7
|
+
constructor(destroyRef: DestroyRef);
|
8
|
+
/**
|
9
|
+
* @docs-private
|
10
|
+
*/
|
4
11
|
class: boolean;
|
12
|
+
/**
|
13
|
+
* @docs-private
|
14
|
+
*/
|
15
|
+
breadcrumbItems: QueryList<DaffBreadcrumbItemDirective>;
|
16
|
+
ngAfterContentInit(): void;
|
17
|
+
private updateActiveState;
|
5
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffBreadcrumbComponent, never>;
|
6
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DaffBreadcrumbComponent, "ol[daff-breadcrumb]", never, {}, {},
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DaffBreadcrumbComponent, "ol[daff-breadcrumb]", never, {}, {}, ["breadcrumbItems"], ["[daffBreadcrumbItem]"], true, [{ directive: typeof i1.DaffArticleEncapsulatedDirective; inputs: {}; outputs: {}; }, { directive: typeof i1.DaffSkeletonableDirective; inputs: { "skeleton": "skeleton"; }; outputs: {}; }]>;
|
7
20
|
}
|
@@ -1,9 +1,23 @@
|
|
1
|
+
import { ChangeDetectorRef } from '@angular/core';
|
1
2
|
import * as i0 from "@angular/core";
|
2
3
|
export declare class DaffBreadcrumbItemDirective {
|
4
|
+
private cdRef;
|
5
|
+
/**
|
6
|
+
* @docs-private
|
7
|
+
*/
|
3
8
|
class: boolean;
|
4
|
-
|
5
|
-
|
6
|
-
|
9
|
+
/**
|
10
|
+
* @docs-private
|
11
|
+
*/
|
12
|
+
get activeClass(): boolean;
|
13
|
+
/**
|
14
|
+
* @docs-private
|
15
|
+
*/
|
16
|
+
get ariaCurrent(): string;
|
17
|
+
private _active;
|
18
|
+
constructor(cdRef: ChangeDetectorRef);
|
19
|
+
/** Called by the DaffBreadcrumbComponent to set the active state */
|
20
|
+
setActive(value: boolean): void;
|
7
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffBreadcrumbItemDirective, never>;
|
8
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DaffBreadcrumbItemDirective, "li[daffBreadcrumbItem]", never, {
|
22
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DaffBreadcrumbItemDirective, "li[daffBreadcrumbItem]", never, {}, {}, never, never, true, never>;
|
9
23
|
}
|
@@ -1,3 +1,6 @@
|
|
1
1
|
import { DaffBreadcrumbComponent } from './breadcrumb/breadcrumb.component';
|
2
2
|
import { DaffBreadcrumbItemDirective } from './breadcrumb-item/breadcrumb-item.directive';
|
3
|
+
/**
|
4
|
+
* @docs-private
|
5
|
+
*/
|
3
6
|
export declare const DAFF_BREADCRUMB_COMPONENTS: readonly [typeof DaffBreadcrumbComponent, typeof DaffBreadcrumbItemDirective];
|