@daffodil/design 0.84.0 → 0.85.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/src/accordion-theme.scss +11 -13
- package/article/src/article-theme.scss +36 -38
- package/atoms/form/form-field/form-field/form-field.component.d.ts +22 -1
- package/atoms/form/form-field/form-field-control.d.ts +1 -0
- package/atoms/form/hint/hint.component.d.ts +5 -1
- package/breadcrumb/src/breadcrumb-theme.scss +9 -11
- package/button/button/raised/raised.component.d.ts +1 -1
- package/button/src/button/basic/button-theme.scss +80 -82
- package/button/src/button/flat/flat-theme.scss +28 -30
- package/button/src/button/icon/icon-theme.scss +74 -76
- package/button/src/button/raised/raised-theme.scss +28 -30
- package/button/src/button/stroked/stroked-theme.scss +31 -33
- package/button/src/button/underline/underline-theme.scss +30 -32
- package/callout/src/callout-theme.scss +21 -23
- package/card/src/card/raised/raised-theme.scss +9 -11
- package/card/src/card/stroked/stroked-theme.scss +32 -34
- package/card/src/card-base-theme.scss +42 -44
- package/core/colorable/colorable.d.ts +2 -2
- package/fesm2022/daffodil-design-accordion-examples.mjs +10 -10
- package/fesm2022/daffodil-design-accordion-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-accordion.mjs +15 -15
- package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
- package/fesm2022/daffodil-design-article-examples.mjs +31 -31
- package/fesm2022/daffodil-design-article-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-article.mjs +11 -11
- package/fesm2022/daffodil-design-article.mjs.map +1 -1
- package/fesm2022/daffodil-design-breadcrumb-examples.mjs +7 -7
- package/fesm2022/daffodil-design-breadcrumb-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-breadcrumb.mjs +11 -11
- package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
- package/fesm2022/daffodil-design-button-examples.mjs +28 -28
- package/fesm2022/daffodil-design-button-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-button.mjs +30 -30
- package/fesm2022/daffodil-design-button.mjs.map +1 -1
- package/fesm2022/daffodil-design-callout-examples.mjs +13 -13
- package/fesm2022/daffodil-design-callout-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-callout.mjs +23 -23
- package/fesm2022/daffodil-design-callout.mjs.map +1 -1
- package/fesm2022/daffodil-design-card-examples.mjs +19 -19
- package/fesm2022/daffodil-design-card-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-card.mjs +35 -35
- package/fesm2022/daffodil-design-card.mjs.map +1 -1
- package/fesm2022/daffodil-design-checkbox-examples.mjs +7 -7
- package/fesm2022/daffodil-design-checkbox-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-container-examples.mjs +4 -4
- package/fesm2022/daffodil-design-container-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-container.mjs +8 -8
- package/fesm2022/daffodil-design-container.mjs.map +1 -1
- package/fesm2022/daffodil-design-hero-examples.mjs +13 -13
- package/fesm2022/daffodil-design-hero-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-hero.mjs +23 -23
- package/fesm2022/daffodil-design-hero.mjs.map +1 -1
- package/fesm2022/daffodil-design-image-examples.mjs +10 -10
- package/fesm2022/daffodil-design-image-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-image.mjs +8 -8
- package/fesm2022/daffodil-design-image.mjs.map +1 -1
- package/fesm2022/daffodil-design-input-examples.mjs +38 -17
- package/fesm2022/daffodil-design-input-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-input.mjs +96 -0
- package/fesm2022/daffodil-design-input.mjs.map +1 -0
- package/fesm2022/daffodil-design-link-set.mjs +17 -17
- package/fesm2022/daffodil-design-link-set.mjs.map +1 -1
- package/fesm2022/daffodil-design-list-examples.mjs +13 -13
- package/fesm2022/daffodil-design-list-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-list.mjs +12 -12
- 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 +8 -8
- package/fesm2022/daffodil-design-loading-icon.mjs.map +1 -1
- package/fesm2022/daffodil-design-media-gallery-examples.mjs +16 -16
- package/fesm2022/daffodil-design-media-gallery-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-media-gallery.mjs +14 -21
- package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
- package/fesm2022/daffodil-design-menu-examples.mjs +7 -7
- package/fesm2022/daffodil-design-menu-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-menu.mjs +17 -17
- package/fesm2022/daffodil-design-menu.mjs.map +1 -1
- 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 -28
- package/fesm2022/daffodil-design-modal.mjs.map +1 -1
- package/fesm2022/daffodil-design-navbar-examples.mjs +13 -13
- package/fesm2022/daffodil-design-navbar-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-navbar.mjs +8 -8
- package/fesm2022/daffodil-design-navbar.mjs.map +1 -1
- package/fesm2022/daffodil-design-notification-examples.mjs +16 -16
- package/fesm2022/daffodil-design-notification-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-notification.mjs +20 -20
- package/fesm2022/daffodil-design-notification.mjs.map +1 -1
- package/fesm2022/daffodil-design-paginator-examples.mjs +7 -7
- package/fesm2022/daffodil-design-paginator-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-paginator.mjs +8 -8
- 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 +12 -12
- package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
- package/fesm2022/daffodil-design-quantity-field-examples.mjs +19 -18
- package/fesm2022/daffodil-design-quantity-field-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-quantity-field.mjs +355 -0
- package/fesm2022/daffodil-design-quantity-field.mjs.map +1 -0
- package/fesm2022/daffodil-design-radio-examples.mjs +4 -4
- package/fesm2022/daffodil-design-radio-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-sidebar-examples.mjs +13 -13
- package/fesm2022/daffodil-design-sidebar-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-sidebar.mjs +27 -27
- package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
- package/fesm2022/daffodil-design-switch-examples.mjs +16 -16
- package/fesm2022/daffodil-design-switch-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-switch.mjs +4 -4
- package/fesm2022/daffodil-design-switch.mjs.map +1 -1
- package/fesm2022/daffodil-design-tabs-examples.mjs +16 -16
- package/fesm2022/daffodil-design-tabs-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-tabs.mjs +16 -16
- package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
- package/fesm2022/daffodil-design-text-snippet-examples.mjs +4 -4
- package/fesm2022/daffodil-design-text-snippet-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-text-snippet.mjs +4 -4
- package/fesm2022/daffodil-design-text-snippet.mjs.map +1 -1
- package/fesm2022/daffodil-design-toast-examples.mjs +16 -16
- package/fesm2022/daffodil-design-toast-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-toast.mjs +22 -22
- package/fesm2022/daffodil-design-toast.mjs.map +1 -1
- package/fesm2022/daffodil-design-tree-examples.mjs +7 -7
- package/fesm2022/daffodil-design-tree-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-tree.mjs +11 -11
- package/fesm2022/daffodil-design-tree.mjs.map +1 -1
- package/fesm2022/daffodil-design-youtube-player.mjs +7 -7
- package/fesm2022/daffodil-design-youtube-player.mjs.map +1 -1
- package/fesm2022/daffodil-design.mjs +252 -616
- package/fesm2022/daffodil-design.mjs.map +1 -1
- package/hero/src/hero-theme.scss +21 -23
- package/input/README.md +66 -0
- package/input/examples/input-hint-and-error/input-hint-and-error.component.d.ts +9 -0
- package/input/index.d.ts +1 -0
- package/{atoms/form/input → input}/input.component.d.ts +1 -1
- package/list/src/list-theme.scss +9 -11
- package/loading-icon/src/loading-icon-theme.scss +20 -22
- package/media-gallery/media-gallery/media-gallery.component.d.ts +0 -4
- package/media-gallery/src/media-gallery-theme.scss +10 -12
- package/menu/helpers/create-overlay.d.ts +1 -1
- package/menu/src/menu-theme.scss +10 -11
- package/modal/src/modal-theme.scss +2 -2
- package/navbar/src/navbar-theme.scss +18 -20
- package/notification/src/notification-theme.scss +44 -46
- package/package.json +1 -1
- package/paginator/src/paginator-theme.scss +9 -11
- package/progress-bar/src/progress-bar-theme.scss +18 -20
- package/public_api.d.ts +0 -2
- package/quantity-field/README.md +63 -0
- package/quantity-field/index.d.ts +1 -0
- package/quantity-field/public_api.d.ts +2 -0
- package/{atoms/form/quantity-field → quantity-field}/quantity-field.component.d.ts +3 -3
- package/quantity-field/quantity-field.module.d.ts +11 -0
- package/{atoms/form/quantity-field → quantity-field}/quantity-input/quantity-input.component.d.ts +2 -2
- package/{atoms/form/quantity-field → quantity-field}/quantity-select/quantity-select.component.d.ts +2 -2
- package/scss/state/skeleton/_mixins.scss +8 -9
- package/scss/theme.scss +0 -2
- package/scss/theming/_configure-theme.scss +16 -16
- package/scss/theming/_get-base-color.scss +19 -0
- package/scss/theming/_get-palette.scss +27 -0
- package/scss/theming/_get-theme-mode.scss +9 -0
- package/scss/theming/_index.scss +3 -0
- package/scss/theming/_light-dark.scss +4 -4
- package/scss/theming/_theme-css-variables.scss +20 -20
- package/sidebar/src/sidebar-theme.scss +4 -5
- package/src/atoms/form/error-message/error-message-theme.scss +3 -4
- package/src/atoms/form/form-field/form-field/form-field-theme.scss +42 -31
- package/src/atoms/form/hint/hint-theme.scss +13 -8
- package/src/atoms/form/native-select/native-select-theme.scss +5 -7
- package/switch/src/switch-theme.scss +13 -15
- package/tabs/src/tabs-theme.scss +13 -15
- package/toast/src/toast-theme.scss +36 -38
- package/tree/src/tree-theme.scss +20 -22
- package/atoms/form/quantity-field/public_api.d.ts +0 -4
- package/atoms/form/quantity-field/quantity-field.module.d.ts +0 -13
- package/src/atoms/form/input/input-theme.scss +0 -12
- /package/{atoms/form/input → input}/input.module.d.ts +0 -0
- /package/{atoms/form/input → input}/public_api.d.ts +0 -0
package/package.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"name":"@daffodil/design","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/design"]}}},"version":"0.
|
1
|
+
{"name":"@daffodil/design","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/design"]}}},"version":"0.85.0","author":"Graycore LLC","license":"MIT","bugs":{"url":"https://github.com/graycoreio/daffodil/issues"},"homepage":"https://github.com/graycoreio/daffodil","description":"A consistent, sane api driver that works with different ecommerce systems.","repository":{"type":"git","url":"https://github.com/graycoreio/daffodil"},"peerDependencies":{"@angular/animations":"^19.0.0","@angular/common":"^19.0.0","@angular/core":"^19.0.0","@angular/forms":"^19.0.0","@angular/cdk":"^19.0.0","@daffodil/core":"0.85.0","@fortawesome/angular-fontawesome":"^1.0.0","@fortawesome/fontawesome-svg-core":"^6.4.2","@fortawesome/free-solid-svg-icons":"^6.4.2","@fortawesome/free-brands-svg-icons":"^6.4.2","@fortawesome/free-regular-svg-icons":"^6.4.2","modern-normalize":"^3.0.1","rxjs":"7.8.1"},"optionalDependencies":{"@faker-js/faker":"^9.8.0"},"exports":{"./scss/global":{"sass":"./scss/global.scss"},"./scss/theme":{"sass":"./scss/theme.scss"},"./scss/utilities":{"sass":"./scss/utilities.scss"},"./scss/typography":{"sass":"./scss/typography/_index.scss"},"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","default":"./fesm2022/daffodil-design.mjs"},"./accordion":{"types":"./accordion/index.d.ts","default":"./fesm2022/daffodil-design-accordion.mjs"},"./article":{"types":"./article/index.d.ts","default":"./fesm2022/daffodil-design-article.mjs"},"./breadcrumb":{"types":"./breadcrumb/index.d.ts","default":"./fesm2022/daffodil-design-breadcrumb.mjs"},"./button":{"types":"./button/index.d.ts","default":"./fesm2022/daffodil-design-button.mjs"},"./callout":{"types":"./callout/index.d.ts","default":"./fesm2022/daffodil-design-callout.mjs"},"./card":{"types":"./card/index.d.ts","default":"./fesm2022/daffodil-design-card.mjs"},"./container":{"types":"./container/index.d.ts","default":"./fesm2022/daffodil-design-container.mjs"},"./hero":{"types":"./hero/index.d.ts","default":"./fesm2022/daffodil-design-hero.mjs"},"./image":{"types":"./image/index.d.ts","default":"./fesm2022/daffodil-design-image.mjs"},"./input":{"types":"./input/index.d.ts","default":"./fesm2022/daffodil-design-input.mjs"},"./link-set":{"types":"./link-set/index.d.ts","default":"./fesm2022/daffodil-design-link-set.mjs"},"./list":{"types":"./list/index.d.ts","default":"./fesm2022/daffodil-design-list.mjs"},"./loading-icon":{"types":"./loading-icon/index.d.ts","default":"./fesm2022/daffodil-design-loading-icon.mjs"},"./media-gallery":{"types":"./media-gallery/index.d.ts","default":"./fesm2022/daffodil-design-media-gallery.mjs"},"./menu":{"types":"./menu/index.d.ts","default":"./fesm2022/daffodil-design-menu.mjs"},"./modal":{"types":"./modal/index.d.ts","default":"./fesm2022/daffodil-design-modal.mjs"},"./navbar":{"types":"./navbar/index.d.ts","default":"./fesm2022/daffodil-design-navbar.mjs"},"./notification":{"types":"./notification/index.d.ts","default":"./fesm2022/daffodil-design-notification.mjs"},"./paginator":{"types":"./paginator/index.d.ts","default":"./fesm2022/daffodil-design-paginator.mjs"},"./progress-bar":{"types":"./progress-bar/index.d.ts","default":"./fesm2022/daffodil-design-progress-bar.mjs"},"./quantity-field":{"types":"./quantity-field/index.d.ts","default":"./fesm2022/daffodil-design-quantity-field.mjs"},"./sidebar":{"types":"./sidebar/index.d.ts","default":"./fesm2022/daffodil-design-sidebar.mjs"},"./switch":{"types":"./switch/index.d.ts","default":"./fesm2022/daffodil-design-switch.mjs"},"./tabs":{"types":"./tabs/index.d.ts","default":"./fesm2022/daffodil-design-tabs.mjs"},"./text-snippet":{"types":"./text-snippet/index.d.ts","default":"./fesm2022/daffodil-design-text-snippet.mjs"},"./toast":{"types":"./toast/index.d.ts","default":"./fesm2022/daffodil-design-toast.mjs"},"./tree":{"types":"./tree/index.d.ts","default":"./fesm2022/daffodil-design-tree.mjs"},"./youtube-player":{"types":"./youtube-player/index.d.ts","default":"./fesm2022/daffodil-design-youtube-player.mjs"},"./accordion/examples":{"types":"./accordion/examples/index.d.ts","default":"./fesm2022/daffodil-design-accordion-examples.mjs"},"./article/examples":{"types":"./article/examples/index.d.ts","default":"./fesm2022/daffodil-design-article-examples.mjs"},"./breadcrumb/examples":{"types":"./breadcrumb/examples/index.d.ts","default":"./fesm2022/daffodil-design-breadcrumb-examples.mjs"},"./button/examples":{"types":"./button/examples/index.d.ts","default":"./fesm2022/daffodil-design-button-examples.mjs"},"./callout/examples":{"types":"./callout/examples/index.d.ts","default":"./fesm2022/daffodil-design-callout-examples.mjs"},"./card/examples":{"types":"./card/examples/index.d.ts","default":"./fesm2022/daffodil-design-card-examples.mjs"},"./checkbox/examples":{"types":"./checkbox/examples/index.d.ts","default":"./fesm2022/daffodil-design-checkbox-examples.mjs"},"./container/examples":{"types":"./container/examples/index.d.ts","default":"./fesm2022/daffodil-design-container-examples.mjs"},"./hero/examples":{"types":"./hero/examples/index.d.ts","default":"./fesm2022/daffodil-design-hero-examples.mjs"},"./image/examples":{"types":"./image/examples/index.d.ts","default":"./fesm2022/daffodil-design-image-examples.mjs"},"./input/examples":{"types":"./input/examples/index.d.ts","default":"./fesm2022/daffodil-design-input-examples.mjs"},"./list/examples":{"types":"./list/examples/index.d.ts","default":"./fesm2022/daffodil-design-list-examples.mjs"},"./loading-icon/examples":{"types":"./loading-icon/examples/index.d.ts","default":"./fesm2022/daffodil-design-loading-icon-examples.mjs"},"./media-gallery/examples":{"types":"./media-gallery/examples/index.d.ts","default":"./fesm2022/daffodil-design-media-gallery-examples.mjs"},"./menu/examples":{"types":"./menu/examples/index.d.ts","default":"./fesm2022/daffodil-design-menu-examples.mjs"},"./modal/examples":{"types":"./modal/examples/index.d.ts","default":"./fesm2022/daffodil-design-modal-examples.mjs"},"./navbar/examples":{"types":"./navbar/examples/index.d.ts","default":"./fesm2022/daffodil-design-navbar-examples.mjs"},"./notification/examples":{"types":"./notification/examples/index.d.ts","default":"./fesm2022/daffodil-design-notification-examples.mjs"},"./paginator/examples":{"types":"./paginator/examples/index.d.ts","default":"./fesm2022/daffodil-design-paginator-examples.mjs"},"./progress-bar/examples":{"types":"./progress-bar/examples/index.d.ts","default":"./fesm2022/daffodil-design-progress-bar-examples.mjs"},"./quantity-field/examples":{"types":"./quantity-field/examples/index.d.ts","default":"./fesm2022/daffodil-design-quantity-field-examples.mjs"},"./radio/examples":{"types":"./radio/examples/index.d.ts","default":"./fesm2022/daffodil-design-radio-examples.mjs"},"./sidebar/examples":{"types":"./sidebar/examples/index.d.ts","default":"./fesm2022/daffodil-design-sidebar-examples.mjs"},"./switch/examples":{"types":"./switch/examples/index.d.ts","default":"./fesm2022/daffodil-design-switch-examples.mjs"},"./tabs/examples":{"types":"./tabs/examples/index.d.ts","default":"./fesm2022/daffodil-design-tabs-examples.mjs"},"./text-snippet/examples":{"types":"./text-snippet/examples/index.d.ts","default":"./fesm2022/daffodil-design-text-snippet-examples.mjs"},"./toast/examples":{"types":"./toast/examples/index.d.ts","default":"./fesm2022/daffodil-design-toast-examples.mjs"},"./tree/examples":{"types":"./tree/examples/index.d.ts","default":"./fesm2022/daffodil-design-tree-examples.mjs"}},"module":"fesm2022/daffodil-design.mjs","typings":"index.d.ts","sideEffects":false,"dependencies":{"tslib":"^2.3.0"}}
|
@@ -1,13 +1,11 @@
|
|
1
|
-
@use '
|
2
|
-
@use '../../scss/core';
|
3
|
-
@use '../../scss/theming';
|
1
|
+
@use '../../scss/theming' as *;
|
4
2
|
|
5
3
|
// stylelint-disable selector-class-pattern
|
6
4
|
@mixin daff-paginator-theme($theme) {
|
7
|
-
$base-contrast:
|
8
|
-
$white:
|
9
|
-
$neutral:
|
10
|
-
$
|
5
|
+
$base-contrast: daff-get-base-color($theme, base-contrast);
|
6
|
+
$white: daff-get-base-color($theme, 'white');
|
7
|
+
$neutral: daff-get-palette($theme, neutral);
|
8
|
+
$mode: daff-get-theme-mode($theme);
|
11
9
|
|
12
10
|
.daff-paginator {
|
13
11
|
&__previous,
|
@@ -16,23 +14,23 @@
|
|
16
14
|
color: $base-contrast;
|
17
15
|
}
|
18
16
|
|
19
|
-
@include
|
17
|
+
@include light($mode) {
|
20
18
|
&__page-link {
|
21
19
|
&:hover,
|
22
20
|
&.selected {
|
23
21
|
&::after {
|
24
|
-
background:
|
22
|
+
background: daff-color($neutral, 20);
|
25
23
|
}
|
26
24
|
}
|
27
25
|
}
|
28
26
|
}
|
29
27
|
|
30
|
-
@include
|
28
|
+
@include dark($mode) {
|
31
29
|
&__page-link {
|
32
30
|
&:hover,
|
33
31
|
&.selected {
|
34
32
|
&::after {
|
35
|
-
background:
|
33
|
+
background: daff-color($neutral, 90);
|
36
34
|
}
|
37
35
|
}
|
38
36
|
}
|
@@ -1,52 +1,50 @@
|
|
1
|
-
@use '
|
2
|
-
@use '../../scss/core';
|
3
|
-
@use '../../scss/theming';
|
1
|
+
@use '../../scss/theming' as *;
|
4
2
|
|
5
3
|
@mixin daff-progress-bar-theme($theme) {
|
6
|
-
$primary:
|
7
|
-
$secondary:
|
8
|
-
$tertiary:
|
9
|
-
$base:
|
10
|
-
$base-contrast:
|
11
|
-
$white:
|
12
|
-
$black:
|
13
|
-
$neutral:
|
14
|
-
$
|
4
|
+
$primary: daff-get-palette($theme, primary);
|
5
|
+
$secondary: daff-get-palette($theme, secondary);
|
6
|
+
$tertiary: daff-get-palette($theme, tertiary);
|
7
|
+
$base: daff-get-base-color($theme, base);
|
8
|
+
$base-contrast: daff-get-base-color($theme, base-contrast);
|
9
|
+
$white: daff-get-base-color($theme, 'white');
|
10
|
+
$black: daff-get-base-color($theme, 'black');
|
11
|
+
$neutral: daff-get-palette($theme, neutral);
|
12
|
+
$mode: daff-get-theme-mode($theme);
|
15
13
|
|
16
14
|
.daff-progress-bar {
|
17
15
|
$root: '.daff-progress-bar';
|
18
16
|
|
19
17
|
#{$root}__label {
|
20
|
-
color:
|
18
|
+
color: daff-text-contrast($base);
|
21
19
|
}
|
22
20
|
|
23
|
-
@include
|
21
|
+
@include light($mode) {
|
24
22
|
#{$root}__track {
|
25
|
-
background:
|
23
|
+
background: daff-color($neutral, 30);
|
26
24
|
}
|
27
25
|
}
|
28
26
|
|
29
|
-
@include
|
27
|
+
@include dark($mode) {
|
30
28
|
#{$root}__track {
|
31
|
-
background:
|
29
|
+
background: daff-color($neutral, 80);
|
32
30
|
}
|
33
31
|
}
|
34
32
|
|
35
33
|
&.daff-primary {
|
36
34
|
#{$root}__fill {
|
37
|
-
background:
|
35
|
+
background: daff-color($primary);
|
38
36
|
}
|
39
37
|
}
|
40
38
|
|
41
39
|
&.daff-secondary {
|
42
40
|
#{$root}__fill {
|
43
|
-
background:
|
41
|
+
background: daff-color($secondary);
|
44
42
|
}
|
45
43
|
}
|
46
44
|
|
47
45
|
&.daff-tertiary {
|
48
46
|
#{$root}__fill {
|
49
|
-
background:
|
47
|
+
background: daff-color($tertiary);
|
50
48
|
}
|
51
49
|
}
|
52
50
|
|
package/public_api.d.ts
CHANGED
@@ -2,10 +2,8 @@ export * from './atoms/form/core/public_api';
|
|
2
2
|
export * from './atoms/form/form-field/public_api';
|
3
3
|
export * from './atoms/form/error-message/public_api';
|
4
4
|
export * from './atoms/form/hint/public_api';
|
5
|
-
export * from './atoms/form/input/public_api';
|
6
5
|
export * from './atoms/form/native-select/public_api';
|
7
6
|
export * from './atoms/form/checkbox/public_api';
|
8
|
-
export * from './atoms/form/quantity-field/public_api';
|
9
7
|
export * from './atoms/form/radio/public_api';
|
10
8
|
export * from './atoms/form/form-label/public_api';
|
11
9
|
export * from './core/public_api';
|
@@ -0,0 +1,63 @@
|
|
1
|
+
# Quantity Field
|
2
|
+
Quantity field is a form control element that switches between a native select and input element.
|
3
|
+
|
4
|
+
## Overview
|
5
|
+
Quantity field is intended for use with cart items and product quantities. The maximum number accepted in a quantity select is configurable and set to 10 by default. It will switch to a quantity input if 10+ is selected.
|
6
|
+
|
7
|
+
<design-land-example-viewer-container example="basic-quantity-field"></design-land-example-viewer-container>
|
8
|
+
|
9
|
+
## Usage
|
10
|
+
|
11
|
+
### Within a standalone component
|
12
|
+
To use form field in a standalone component, import `DaffQuantityFieldComponent` directly into your custom component:
|
13
|
+
|
14
|
+
```ts
|
15
|
+
import { DaffQuantityFieldComponent } from '@daffodil/design/quantity-field';
|
16
|
+
|
17
|
+
@Component({
|
18
|
+
selector: 'custom-component',
|
19
|
+
templateUrl: './custom-component.component.html',
|
20
|
+
imports: [
|
21
|
+
DaffQuantityFieldComponent,
|
22
|
+
],
|
23
|
+
})
|
24
|
+
export class CustomComponent {}
|
25
|
+
```
|
26
|
+
|
27
|
+
### Within a module (deprecated)
|
28
|
+
To use form field in a module, import `DaffQuantityFieldModule` into your custom module:
|
29
|
+
|
30
|
+
```ts
|
31
|
+
import { NgModule } from '@angular/core';
|
32
|
+
import { DaffQuantityFieldModule } from '@daffodil/design/quantity-field';
|
33
|
+
import { CustomComponent } from './custom.component';
|
34
|
+
|
35
|
+
@NgModule({
|
36
|
+
declarations: [
|
37
|
+
CustomComponent,
|
38
|
+
],
|
39
|
+
exports: [
|
40
|
+
CustomComponent,
|
41
|
+
],
|
42
|
+
imports: [
|
43
|
+
DaffQuantityFieldModule,
|
44
|
+
],
|
45
|
+
})
|
46
|
+
export class CustomComponentModule { }
|
47
|
+
```
|
48
|
+
|
49
|
+
> This method is deprecated. It's recommended to update all custom components to standalone.
|
50
|
+
|
51
|
+
## Range Limits
|
52
|
+
The default allowed range of numbers is 1 to 500. This can be changed by passing in the desired min and max values as inputs. Note that this does not validate the actual input. It merely informs the select which options it should generate and sets the input's min and max attributes. See [input#min](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number#min) and [input#max](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number#max) for more information.
|
53
|
+
|
54
|
+
## Disabled quantity field
|
55
|
+
<design-land-example-viewer-container example="disabled-quantity-field"></design-land-example-viewer-container>
|
56
|
+
|
57
|
+
## Custom Select Max Value (15)
|
58
|
+
The maximum value at which the field will switch to using an input is configurable.
|
59
|
+
<design-land-example-viewer-container example="select-max-quantity-field"></design-land-example-viewer-container>
|
60
|
+
|
61
|
+
## Custom Range Limits (5 - 50)
|
62
|
+
Custom range limits is the absolute minimum and maximum values can be specified.
|
63
|
+
<design-land-example-viewer-container example="custom-range-quantity-field"></design-land-example-viewer-container>
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './public_api';
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { ChangeDetectorRef } from '@angular/core';
|
2
2
|
import { ControlValueAccessor, NgControl } from '@angular/forms';
|
3
|
+
import { DaffFormFieldControl } from '@daffodil/design';
|
3
4
|
import { DaffQuantityInputComponent } from './quantity-input/quantity-input.component';
|
4
5
|
import { DaffQuantitySelectComponent } from './quantity-select/quantity-select.component';
|
5
|
-
import { DaffFormFieldControl } from '../form-field/form-field-control';
|
6
6
|
import * as i0 from "@angular/core";
|
7
7
|
export declare class DaffQuantityFieldComponent extends DaffFormFieldControl<number> implements ControlValueAccessor, DaffFormFieldControl<number> {
|
8
8
|
ngControl: NgControl;
|
@@ -38,7 +38,7 @@ export declare class DaffQuantityFieldComponent extends DaffFormFieldControl<num
|
|
38
38
|
* Returns the lesser of max and selectMax.
|
39
39
|
*/
|
40
40
|
get _maxFloor(): number;
|
41
|
-
get controlType(): "native-
|
41
|
+
get controlType(): "native-input" | "native-select";
|
42
42
|
get showInputField(): boolean;
|
43
43
|
get showSelectField(): boolean;
|
44
44
|
constructor(ngControl: NgControl, cd: ChangeDetectorRef);
|
@@ -51,5 +51,5 @@ export declare class DaffQuantityFieldComponent extends DaffFormFieldControl<num
|
|
51
51
|
focus(): void;
|
52
52
|
get value(): any;
|
53
53
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffQuantityFieldComponent, [{ optional: true; self: true; }, null]>;
|
54
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DaffQuantityFieldComponent, "daff-quantity-field", never, { "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "selectMax": { "alias": "selectMax"; "required": false; }; "id": { "alias": "id"; "required": false; }; }, {}, never, never,
|
54
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DaffQuantityFieldComponent, "daff-quantity-field", never, { "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "selectMax": { "alias": "selectMax"; "required": false; }; "id": { "alias": "id"; "required": false; }; }, {}, never, never, true, never>;
|
55
55
|
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
import * as i1 from "@angular/common";
|
3
|
+
import * as i2 from "./quantity-field.component";
|
4
|
+
/**
|
5
|
+
* @deprecated in favor of standalone components. Deprecated in version 0.84.0. Will be removed in version 1.0.0.
|
6
|
+
*/
|
7
|
+
export declare class DaffQuantityFieldModule {
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffQuantityFieldModule, never>;
|
9
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffQuantityFieldModule, never, [typeof i1.CommonModule, typeof i2.DaffQuantityFieldComponent], [typeof i2.DaffQuantityFieldComponent]>;
|
10
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DaffQuantityFieldModule>;
|
11
|
+
}
|
package/{atoms/form/quantity-field → quantity-field}/quantity-input/quantity-input.component.d.ts
RENAMED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ChangeDetectorRef, OnInit, OnDestroy } from '@angular/core';
|
2
2
|
import { UntypedFormControl, NgControl } from '@angular/forms';
|
3
3
|
import { Subject } from 'rxjs';
|
4
|
-
import { DaffInputComponent } from '
|
4
|
+
import { DaffInputComponent } from '@daffodil/design/input';
|
5
5
|
import * as i0 from "@angular/core";
|
6
6
|
export declare class DaffQuantityInputComponent implements OnInit, OnDestroy {
|
7
7
|
ngControl: NgControl;
|
@@ -45,5 +45,5 @@ export declare class DaffQuantityInputComponent implements OnInit, OnDestroy {
|
|
45
45
|
onValueChange(e: any): void;
|
46
46
|
private setInputDisabled;
|
47
47
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffQuantityInputComponent, never>;
|
48
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DaffQuantityInputComponent, "daff-quantity-input", never, { "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; }, {}, never, never,
|
48
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DaffQuantityInputComponent, "daff-quantity-input", never, { "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; }, {}, never, never, true, never>;
|
49
49
|
}
|
package/{atoms/form/quantity-field → quantity-field}/quantity-select/quantity-select.component.d.ts
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ChangeDetectorRef } from '@angular/core';
|
2
2
|
import { NgControl } from '@angular/forms';
|
3
|
-
import { DaffNativeSelectComponent } from '
|
3
|
+
import { DaffNativeSelectComponent } from '@daffodil/design';
|
4
4
|
import * as i0 from "@angular/core";
|
5
5
|
/**
|
6
6
|
* Create an array of numbers from min to max, not including max.
|
@@ -47,5 +47,5 @@ export declare class DaffQuantitySelectComponent {
|
|
47
47
|
*/
|
48
48
|
get valueArray(): number[];
|
49
49
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffQuantitySelectComponent, never>;
|
50
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DaffQuantitySelectComponent, "daff-quantity-select", never, { "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "extendable": { "alias": "extendable"; "required": false; }; }, {}, never, never,
|
50
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DaffQuantitySelectComponent, "daff-quantity-select", never, { "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "extendable": { "alias": "extendable"; "required": false; }; }, {}, never, never, true, never>;
|
51
51
|
}
|
@@ -1,23 +1,22 @@
|
|
1
|
-
@use '../../
|
2
|
-
@use '../../theming';
|
1
|
+
@use '../../theming' as *;
|
3
2
|
|
4
3
|
@mixin daff-skeleton-theme($theme) {
|
5
|
-
$neutral:
|
6
|
-
$base:
|
7
|
-
$
|
4
|
+
$neutral: daff-get-palette($theme, neutral);
|
5
|
+
$base: daff-get-base-color($theme, base);
|
6
|
+
$mode: daff-get-theme-mode($theme);
|
8
7
|
|
9
8
|
.daff-skeleton {
|
10
|
-
@include
|
9
|
+
@include light($mode) {
|
11
10
|
&::before,
|
12
11
|
::before {
|
13
|
-
background:
|
12
|
+
background: daff-color($neutral, 20);
|
14
13
|
}
|
15
14
|
}
|
16
15
|
|
17
|
-
@include
|
16
|
+
@include dark($mode) {
|
18
17
|
&::before,
|
19
18
|
::before {
|
20
|
-
background:
|
19
|
+
background: daff-color($neutral, 90);
|
21
20
|
}
|
22
21
|
}
|
23
22
|
}
|
package/scss/theme.scss
CHANGED
@@ -29,7 +29,6 @@
|
|
29
29
|
@use '../src/atoms/form/error-message/error-message-theme' as error-message;
|
30
30
|
@use '../src/atoms/form/hint/hint-theme' as hint;
|
31
31
|
@use '../src/atoms/form/form-field/form-field/form-field-theme' as form-field;
|
32
|
-
@use '../src/atoms/form/input/input-theme' as input;
|
33
32
|
@use '../src/atoms/form/native-select/native-select-theme' as native-select;
|
34
33
|
@use '../loading-icon/src/loading-icon-theme' as loading-icon;
|
35
34
|
@use '../accordion/src/accordion-theme' as accordion;
|
@@ -88,7 +87,6 @@
|
|
88
87
|
@include form-field.daff-form-field-theme($theme);
|
89
88
|
@include error-message.daff-error-message-theme($theme);
|
90
89
|
@include hint.daff-hint-theme($theme);
|
91
|
-
@include input.daff-input-theme($theme);
|
92
90
|
@include native-select.daff-native-select-theme($theme);
|
93
91
|
|
94
92
|
@include hero.daff-hero-theme($theme);
|
@@ -4,7 +4,7 @@
|
|
4
4
|
@use 'get-color';
|
5
5
|
|
6
6
|
$daff-light-theme: (
|
7
|
-
'
|
7
|
+
'mode': 'light',
|
8
8
|
'font-color': get-color.daff-color(palette.$daff-neutral, 110),
|
9
9
|
'base': get-color.daff-color(palette.$daff-neutral, 0),
|
10
10
|
'base-contrast': get-color.daff-color(palette.$daff-neutral, 110),
|
@@ -14,7 +14,7 @@ $daff-light-theme: (
|
|
14
14
|
);
|
15
15
|
|
16
16
|
$daff-dark-theme: (
|
17
|
-
'
|
17
|
+
'mode': 'dark',
|
18
18
|
'font-color': get-color.daff-color(palette.$daff-neutral, 0),
|
19
19
|
'base': get-color.daff-color(palette.$daff-neutral, 100),
|
20
20
|
'base-contrast': get-color.daff-color(palette.$daff-neutral, 0),
|
@@ -23,7 +23,7 @@ $daff-dark-theme: (
|
|
23
23
|
'neutral': configure-palette.daff-configure-palette(palette.$daff-neutral, 50),
|
24
24
|
);
|
25
25
|
|
26
|
-
$supported-theme-
|
26
|
+
$supported-theme-modes: (
|
27
27
|
'light': $daff-light-theme,
|
28
28
|
'dark': $daff-dark-theme
|
29
29
|
);
|
@@ -36,31 +36,31 @@ $supported-theme-types: (
|
|
36
36
|
// that can be overriden by using the `daff-configure-theme-status` function.
|
37
37
|
//
|
38
38
|
// @usage
|
39
|
-
// ```
|
39
|
+
// ```scss
|
40
40
|
// $primary: configure-palette.daff-configure-palette(palette.$daff-blue, 60);
|
41
41
|
// $secondary: configure-palette.daff-configure-palette(palette.$daff-purple, 60);
|
42
42
|
// $tertiary: configure-palette.daff-configure-palette(palette.$daff-turquoise, 60);
|
43
43
|
//
|
44
|
-
// $theme: daff-configure-theme($primary, $secondary, $tertiary)
|
44
|
+
// $theme: daff-configure-theme($primary, $secondary, $tertiary, 'light');
|
45
45
|
// ```
|
46
46
|
@function daff-configure-theme(
|
47
47
|
$primary,
|
48
48
|
$secondary,
|
49
49
|
$tertiary,
|
50
|
-
$
|
50
|
+
$mode: 'light'
|
51
51
|
) {
|
52
52
|
$info: null;
|
53
53
|
$warn: null;
|
54
54
|
$critical: null;
|
55
55
|
$success: null;
|
56
56
|
|
57
|
-
@if($
|
57
|
+
@if($mode == 'dark') {
|
58
58
|
$info: configure-palette.daff-configure-palette(palette.$daff-neutral, 50);
|
59
59
|
$warn: configure-palette.daff-configure-palette(palette.$daff-bronze, 50);
|
60
60
|
$critical: configure-palette.daff-configure-palette(palette.$daff-red, 50);
|
61
61
|
$success: configure-palette.daff-configure-palette(palette.$daff-green, 50);
|
62
62
|
}
|
63
|
-
@if($
|
63
|
+
@if($mode == 'light') {
|
64
64
|
$info: configure-palette.daff-configure-palette(palette.$daff-neutral, 60);
|
65
65
|
$warn: configure-palette.daff-configure-palette(palette.$daff-bronze, 60);
|
66
66
|
$critical: configure-palette.daff-configure-palette(palette.$daff-red, 60);
|
@@ -75,7 +75,7 @@ $supported-theme-types: (
|
|
75
75
|
'warn': $warn,
|
76
76
|
'critical': $critical,
|
77
77
|
'success': $success,
|
78
|
-
'core': daff-build-theme-core($
|
78
|
+
'core': daff-build-theme-core($mode)
|
79
79
|
);
|
80
80
|
}
|
81
81
|
|
@@ -111,18 +111,18 @@ $supported-theme-types: (
|
|
111
111
|
//
|
112
112
|
// @docs
|
113
113
|
//
|
114
|
-
//
|
115
|
-
// $
|
114
|
+
// Retrieves the core theme given a theme mode
|
115
|
+
// $mode: "light" | "dark"
|
116
116
|
//
|
117
117
|
// ```
|
118
118
|
// @usage
|
119
119
|
// daff-build-theme-core("light")
|
120
120
|
// ```
|
121
|
-
@function daff-build-theme-core($
|
122
|
-
$error-msg: 'is not a valid theme
|
123
|
-
@if (not map.has-key($supported-theme-
|
124
|
-
@error '`#{$
|
121
|
+
@function daff-build-theme-core($mode: 'light') {
|
122
|
+
$error-msg: 'is not a valid theme mode - valid modes:';
|
123
|
+
@if (not map.has-key($supported-theme-modes, $mode)) {
|
124
|
+
@error '`#{$mode}` `#{$error-msg}` `#{map-keys($supported-theme-modes)}`';
|
125
125
|
}
|
126
126
|
|
127
|
-
@return map.get($supported-theme-
|
127
|
+
@return map.get($supported-theme-modes, $mode);
|
128
128
|
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
@use '../core/map/map-get/map-get';
|
2
|
+
|
3
|
+
// Retrieves a base color from Daffodil's theme configurations.
|
4
|
+
// $color must be one of these values: `white`, `black`, `base`, and `base-contrast`.
|
5
|
+
// ```scss
|
6
|
+
// $base: daff-get-base-color($theme, base);
|
7
|
+
// ```
|
8
|
+
@function daff-get-base-color($theme, $color) {
|
9
|
+
@if (
|
10
|
+
$color != 'white' and
|
11
|
+
$color != 'black' and
|
12
|
+
$color != base and
|
13
|
+
$color != base-contrast
|
14
|
+
) {
|
15
|
+
@error '' + $color + ' is not supported as part of Daffodil`s core colors.';
|
16
|
+
}
|
17
|
+
|
18
|
+
@return map-get.daff-map-get($theme, 'core', $color);
|
19
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
@use '../core/map/map-get/map-get';
|
2
|
+
|
3
|
+
// Retrieves a specific color palette from Daffodil's theme configurations.
|
4
|
+
// $palette must be one of these values:
|
5
|
+
// `primary`, `secondary`, `tertiary`, `informational`, `warn`, `critical`, `success`, and `neutral`.
|
6
|
+
//
|
7
|
+
// ```scss
|
8
|
+
// $primary: daff-get-palette($theme, primary);
|
9
|
+
// ```
|
10
|
+
@function daff-get-palette($theme, $palette) {
|
11
|
+
@if (
|
12
|
+
$palette != primary and
|
13
|
+
$palette != secondary and
|
14
|
+
$palette != tertiary and
|
15
|
+
$palette != informational and
|
16
|
+
$palette != warn and
|
17
|
+
$palette != critical and
|
18
|
+
$palette != success and
|
19
|
+
$palette != neutral
|
20
|
+
) {
|
21
|
+
@error '' + $palette + ' is not a supported palette in Daffodil`s theme configurations.';
|
22
|
+
}
|
23
|
+
@if ($palette == 'neutral') {
|
24
|
+
@return map-get.daff-map-get($theme, 'core', $palette);
|
25
|
+
}
|
26
|
+
@return map-get.daff-map-get($theme, $palette);
|
27
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
@use '../core/map/map-get/map-get';
|
2
|
+
|
3
|
+
// Retrieves the mode from Daffodil's theme configurations.
|
4
|
+
// ```scss
|
5
|
+
// $mode: daff-get-theme-mode($theme);
|
6
|
+
// ```
|
7
|
+
@function daff-get-theme-mode($theme) {
|
8
|
+
@return map-get.daff-map-get($theme, 'core', 'mode');
|
9
|
+
}
|
package/scss/theming/_index.scss
CHANGED
@@ -5,9 +5,9 @@
|
|
5
5
|
// ```scss
|
6
6
|
// @use 'theme' as daff-theme;
|
7
7
|
//
|
8
|
-
// $
|
8
|
+
// $mode: daff-theme.daff-get-theme-mode($theme);
|
9
9
|
//
|
10
|
-
// @include daff-theme.light($
|
10
|
+
// @include daff-theme.light($mode) {
|
11
11
|
// color: blue;
|
12
12
|
//
|
13
13
|
// .class {
|
@@ -28,9 +28,9 @@
|
|
28
28
|
// ```scss
|
29
29
|
// @use 'theme' as daff-theme;
|
30
30
|
//
|
31
|
-
// $
|
31
|
+
// $mode: daff-theme.daff-get-theme-mode($theme);
|
32
32
|
//
|
33
|
-
// @include daff-theme.dark($
|
33
|
+
// @include daff-theme.dark($mode) {
|
34
34
|
// color: blue;
|
35
35
|
//
|
36
36
|
// .class {
|
@@ -1,40 +1,40 @@
|
|
1
1
|
@use 'sass:map';
|
2
2
|
@use 'sass:color';
|
3
3
|
@use '../core';
|
4
|
-
@use '../theming'
|
4
|
+
@use '../theming' as *;
|
5
5
|
|
6
6
|
// @docs
|
7
7
|
//
|
8
8
|
// Global theme tokens
|
9
9
|
@mixin daff-root-theme-tokens($theme) {
|
10
|
-
$base:
|
11
|
-
$base-contrast:
|
12
|
-
$primary:
|
13
|
-
$secondary:
|
14
|
-
$tertiary:
|
15
|
-
$warn:
|
16
|
-
$success:
|
17
|
-
$critical:
|
18
|
-
$neutral:
|
19
|
-
$white:
|
20
|
-
$black:
|
10
|
+
$base: daff-get-base-color($theme, base);
|
11
|
+
$base-contrast: daff-get-base-color($theme, base-contrast);
|
12
|
+
$primary: daff-get-palette($theme, primary);
|
13
|
+
$secondary: daff-get-palette($theme, secondary);
|
14
|
+
$tertiary: daff-get-palette($theme, tertiary);
|
15
|
+
$warn: daff-get-palette($theme, warn);
|
16
|
+
$success: daff-get-palette($theme, success);
|
17
|
+
$critical: daff-get-palette($theme, critical);
|
18
|
+
$neutral: daff-get-palette($theme, neutral);
|
19
|
+
$white: daff-get-base-color($theme, 'white');
|
20
|
+
$black: daff-get-base-color($theme, 'black');
|
21
21
|
|
22
22
|
--daff-theme-rgb: #{color.red($base), color.green($base), color.blue($base)};
|
23
23
|
--daff-theme-contrast-rgb: #{color.red($base-contrast), color.green($base-contrast),
|
24
24
|
color.blue($base-contrast)};
|
25
25
|
--daff-theme: #{$base};
|
26
26
|
--daff-theme-contrast: #{$base-contrast};
|
27
|
-
--daff-theme-primary: #{
|
28
|
-
--daff-theme-secondary: #{
|
29
|
-
--daff-theme-tertiary: #{
|
30
|
-
--daff-theme-warn: #{
|
31
|
-
--daff-theme-success: #{
|
32
|
-
--daff-theme-critical: #{
|
27
|
+
--daff-theme-primary: #{daff-color($primary)};
|
28
|
+
--daff-theme-secondary: #{daff-color($secondary)};
|
29
|
+
--daff-theme-tertiary: #{daff-color($tertiary)};
|
30
|
+
--daff-theme-warn: #{daff-color($warn)};
|
31
|
+
--daff-theme-success: #{daff-color($success)};
|
32
|
+
--daff-theme-critical: #{daff-color($critical)};
|
33
33
|
--daff-theme-white: #{$white};
|
34
34
|
--daff-theme-black: #{$black};
|
35
|
-
--daff-theme-gray: #{
|
35
|
+
--daff-theme-gray: #{daff-color($neutral)};
|
36
36
|
--daff-base-bg: #{$base};
|
37
|
-
--daff-base-text: #{
|
37
|
+
--daff-base-text: #{daff-text-contrast($base)};
|
38
38
|
}
|
39
39
|
|
40
40
|
@mixin daff-theme-css-variables($theme) {
|