@daffodil/design 0.40.1 → 0.41.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/atoms/form/quantity-field/quantity-field.component.d.ts +1 -1
- package/atoms/form/quantity-field/quantity-input/quantity-input.component.d.ts +1 -1
- package/atoms/form/quantity-field/quantity-select/quantity-select.component.d.ts +1 -0
- package/daff-theme.scss +27 -21
- package/esm2020/atoms/form/quantity-field/quantity-field.component.mjs +4 -3
- package/esm2020/atoms/form/quantity-field/quantity-input/quantity-input.component.mjs +4 -6
- package/esm2020/atoms/form/quantity-field/quantity-select/quantity-select.component.mjs +6 -3
- package/esm2020/core/theming/services/storage/theme-storage.service.mjs +5 -3
- package/esm2020/image/examples/basic-image/basic-image.component.mjs +12 -0
- package/esm2020/image/examples/basic-image/basic-image.module.mjs +26 -0
- package/esm2020/image/examples/daffodil-design-image-examples.mjs +5 -0
- package/esm2020/image/examples/index.mjs +2 -0
- package/esm2020/image/examples/load-image/load-image.component.mjs +19 -0
- package/esm2020/image/examples/load-image/load-image.module.mjs +30 -0
- package/esm2020/image/examples/public_api.mjs +9 -0
- package/esm2020/molecules/article/article/article.component.mjs +2 -2
- package/esm2020/quantity-field/examples/{basic → basic-quantity-field}/basic-quantity-field.component.mjs +1 -1
- package/esm2020/quantity-field/examples/{basic → basic-quantity-field}/basic-quantity-field.module.mjs +1 -1
- package/esm2020/quantity-field/examples/{customRange → custom-range-quantity-field}/custom-range-quantity-field.component.mjs +1 -1
- package/esm2020/quantity-field/examples/{customRange → custom-range-quantity-field}/custom-range-quantity-field.module.mjs +1 -1
- package/esm2020/quantity-field/examples/{disabled → disabled-quantity-field}/disabled-quantity-field.component.mjs +2 -2
- package/esm2020/quantity-field/examples/{disabled → disabled-quantity-field}/disabled-quantity-field.module.mjs +1 -1
- package/esm2020/quantity-field/examples/public_api.mjs +16 -10
- package/esm2020/quantity-field/examples/{selectMax → select-max-quantity-field}/select-max-quantity-field.component.mjs +1 -1
- package/esm2020/quantity-field/examples/{selectMax → select-max-quantity-field}/select-max-quantity-field.module.mjs +1 -1
- package/fesm2015/daffodil-design-image-examples.mjs +89 -0
- package/fesm2015/daffodil-design-image-examples.mjs.map +1 -0
- package/fesm2015/daffodil-design-quantity-field-examples.mjs +8 -8
- package/fesm2015/daffodil-design-quantity-field-examples.mjs.map +1 -1
- package/fesm2015/daffodil-design.mjs +18 -12
- package/fesm2015/daffodil-design.mjs.map +1 -1
- package/fesm2020/daffodil-design-image-examples.mjs +89 -0
- package/fesm2020/daffodil-design-image-examples.mjs.map +1 -0
- package/fesm2020/daffodil-design-quantity-field-examples.mjs +8 -8
- package/fesm2020/daffodil-design-quantity-field-examples.mjs.map +1 -1
- package/fesm2020/daffodil-design.mjs +16 -12
- package/fesm2020/daffodil-design.mjs.map +1 -1
- package/image/examples/basic-image/basic-image.component.d.ts +5 -0
- package/image/examples/basic-image/basic-image.module.d.ts +8 -0
- package/image/examples/daffodil-design-image-examples.d.ts +5 -0
- package/image/examples/index.d.ts +1 -0
- package/image/examples/load-image/load-image.component.d.ts +7 -0
- package/image/examples/load-image/load-image.module.d.ts +9 -0
- package/image/examples/package.json +10 -0
- package/image/examples/public_api.d.ts +2 -0
- package/package.json +10 -2
- package/quantity-field/examples/{basic → basic-quantity-field}/basic-quantity-field.component.d.ts +0 -0
- package/quantity-field/examples/{basic → basic-quantity-field}/basic-quantity-field.module.d.ts +0 -0
- package/quantity-field/examples/{customRange → custom-range-quantity-field}/custom-range-quantity-field.component.d.ts +0 -0
- package/quantity-field/examples/{customRange → custom-range-quantity-field}/custom-range-quantity-field.module.d.ts +0 -0
- package/quantity-field/examples/{disabled → disabled-quantity-field}/disabled-quantity-field.component.d.ts +0 -0
- package/quantity-field/examples/{disabled → disabled-quantity-field}/disabled-quantity-field.module.d.ts +0 -0
- package/quantity-field/examples/public_api.d.ts +10 -9
- package/quantity-field/examples/{selectMax → select-max-quantity-field}/select-max-quantity-field.component.d.ts +0 -0
- package/quantity-field/examples/{selectMax → select-max-quantity-field}/select-max-quantity-field.module.d.ts +0 -0
- package/src/atoms/form/quantity-field/README.md +14 -15
- package/src/atoms/image/README.md +17 -7
- package/esm2020/quantity-field/examples/examples.mjs +0 -11
- package/quantity-field/examples/examples.d.ts +0 -2
@@ -0,0 +1,8 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
import * as i1 from "./basic-image.component";
|
3
|
+
import * as i2 from "@daffodil/design";
|
4
|
+
export declare class BasicImageModule {
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BasicImageModule, never>;
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<BasicImageModule, [typeof i1.BasicImageComponent], [typeof i2.DaffImageModule], [typeof i1.BasicImageComponent]>;
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<BasicImageModule>;
|
8
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './public_api';
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
export declare class LoadImageComponent {
|
3
|
+
loaded: boolean;
|
4
|
+
load(): void;
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LoadImageComponent, never>;
|
6
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LoadImageComponent, "load-image", never, {}, {}, never, never>;
|
7
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
import * as i1 from "./load-image.component";
|
3
|
+
import * as i2 from "@angular/common";
|
4
|
+
import * as i3 from "@daffodil/design";
|
5
|
+
export declare class LoadImageModule {
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LoadImageModule, never>;
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<LoadImageModule, [typeof i1.LoadImageComponent], [typeof i2.CommonModule, typeof i3.DaffImageModule], [typeof i1.LoadImageComponent]>;
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<LoadImageModule>;
|
9
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
{
|
2
|
+
"name": "@daffodil/design/image/examples",
|
3
|
+
"module": "../../fesm2015/daffodil-design-image-examples.mjs",
|
4
|
+
"es2020": "../../fesm2020/daffodil-design-image-examples.mjs",
|
5
|
+
"esm2020": "../../esm2020/image/examples/daffodil-design-image-examples.mjs",
|
6
|
+
"fesm2020": "../../fesm2020/daffodil-design-image-examples.mjs",
|
7
|
+
"fesm2015": "../../fesm2015/daffodil-design-image-examples.mjs",
|
8
|
+
"typings": "daffodil-design-image-examples.d.ts",
|
9
|
+
"sideEffects": false
|
10
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@daffodil/design",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.41.0",
|
4
4
|
"author": "Graycore LLC",
|
5
5
|
"license": "MIT",
|
6
6
|
"bugs": {
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"@fortawesome/angular-fontawesome": "^0.10.0",
|
22
22
|
"@fortawesome/fontawesome-svg-core": "^1.2.32",
|
23
23
|
"@fortawesome/free-solid-svg-icons": "^5.10.0",
|
24
|
-
"rxjs": "
|
24
|
+
"rxjs": "7.5.5"
|
25
25
|
},
|
26
26
|
"optionalDependencies": {
|
27
27
|
"@faker-js/faker": "^5.5.3"
|
@@ -108,6 +108,14 @@
|
|
108
108
|
"node": "./fesm2015/daffodil-design-hero-examples.mjs",
|
109
109
|
"default": "./fesm2020/daffodil-design-hero-examples.mjs"
|
110
110
|
},
|
111
|
+
"./image/examples": {
|
112
|
+
"types": "./image/examples/daffodil-design-image-examples.d.ts",
|
113
|
+
"esm2020": "./esm2020/image/examples/daffodil-design-image-examples.mjs",
|
114
|
+
"es2020": "./fesm2020/daffodil-design-image-examples.mjs",
|
115
|
+
"es2015": "./fesm2015/daffodil-design-image-examples.mjs",
|
116
|
+
"node": "./fesm2015/daffodil-design-image-examples.mjs",
|
117
|
+
"default": "./fesm2020/daffodil-design-image-examples.mjs"
|
118
|
+
},
|
111
119
|
"./list/examples": {
|
112
120
|
"types": "./list/examples/daffodil-design-list-examples.d.ts",
|
113
121
|
"esm2020": "./esm2020/list/examples/daffodil-design-list-examples.mjs",
|
package/quantity-field/examples/{basic → basic-quantity-field}/basic-quantity-field.component.d.ts
RENAMED
File without changes
|
package/quantity-field/examples/{basic → basic-quantity-field}/basic-quantity-field.module.d.ts
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,9 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
export {
|
6
|
-
export {
|
7
|
-
export {
|
8
|
-
export { SelectMaxQuantityFieldModule } from './
|
9
|
-
export
|
1
|
+
import { BasicQuantityFieldComponent } from './basic-quantity-field/basic-quantity-field.component';
|
2
|
+
import { CustomRangeQuantityFieldComponent } from './custom-range-quantity-field/custom-range-quantity-field.component';
|
3
|
+
import { DisabledQuantityFieldComponent } from './disabled-quantity-field/disabled-quantity-field.component';
|
4
|
+
import { SelectMaxQuantityFieldComponent } from './select-max-quantity-field/select-max-quantity-field.component';
|
5
|
+
export { BasicQuantityFieldModule } from './basic-quantity-field/basic-quantity-field.module';
|
6
|
+
export { CustomRangeQuantityFieldModule } from './custom-range-quantity-field/custom-range-quantity-field.module';
|
7
|
+
export { DisabledQuantityFieldModule } from './disabled-quantity-field/disabled-quantity-field.module';
|
8
|
+
export { SelectMaxQuantityFieldModule } from './select-max-quantity-field/select-max-quantity-field.module';
|
9
|
+
export declare const QUANTITY_FIELD_EXAMPLES: (typeof BasicQuantityFieldComponent)[];
|
10
|
+
export { BasicQuantityFieldComponent, CustomRangeQuantityFieldComponent, DisabledQuantityFieldComponent, SelectMaxQuantityFieldComponent, };
|
File without changes
|
File without changes
|
@@ -1,25 +1,24 @@
|
|
1
1
|
# Quantity Field
|
2
|
-
|
2
|
+
Quantity field is a form control element that switches between a native select and input element.
|
3
3
|
|
4
|
-
|
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.
|
5
6
|
|
6
7
|
## Range Limits
|
7
|
-
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
|
8
|
+
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.
|
8
9
|
|
9
10
|
## Usage
|
10
11
|
|
11
|
-
###
|
12
|
+
### Basic
|
13
|
+
<design-land-example-viewer-container example="basic-quantity-field"></design-land-example-viewer-container>
|
12
14
|
|
13
|
-
|
14
|
-
<
|
15
|
-
```
|
15
|
+
### Disabled
|
16
|
+
<design-land-example-viewer-container example="disabled-quantity-field"></design-land-example-viewer-container>
|
16
17
|
|
17
|
-
### Custom Max
|
18
|
-
|
19
|
-
<
|
20
|
-
```
|
18
|
+
### Custom Select Max Value (15)
|
19
|
+
The maximum value at which the field will switch to using an input is configurable.
|
20
|
+
<design-land-example-viewer-container example="select-max-quantity-field"></design-land-example-viewer-container>
|
21
21
|
|
22
|
-
### Custom Range Limits
|
23
|
-
|
24
|
-
<
|
25
|
-
```
|
22
|
+
### Custom Range Limits (5 - 50)
|
23
|
+
Custom range limits is the absolute minimum and maximum values can be specified.
|
24
|
+
<design-land-example-viewer-container example="custom-range-quantity-field"></design-land-example-viewer-container>
|
@@ -1,21 +1,31 @@
|
|
1
1
|
# Image
|
2
|
-
|
2
|
+
Image utilizes the native HTML `<img>` element to display responsive images on a page and prevent content jumping while images are loading. `<daff-image>` is an opinionated version that encourages friendly end-user usage.
|
3
3
|
|
4
4
|
## Attributes
|
5
|
-
The `
|
5
|
+
The `src`, `width`, `height`, and `alt` attributes must be defined. An error will be thrown any of these attributes are missing.
|
6
6
|
|
7
|
-
`width` and `height` are
|
7
|
+
`width` and `height` are required to calculate the aspect ratio of an image, used for the [aspect ratio padding trick](https://css-tricks.com/aspect-ratio-boxes/) that helps to prevent content jumping while images are loading. The `width` and `height` values are rendered as pixels.
|
8
8
|
|
9
9
|
## Errors
|
10
10
|
|
11
|
-
|
11
|
+
**DaffImageComponent must have a defined src attribute.**
|
12
|
+
This error appears when `<daff-image>` is missing a `src` attribute.
|
13
|
+
|
14
|
+
**DaffImageComponent must have a defined alt attribute.**
|
12
15
|
This error appears when `<daff-image>` is missing an `alt` attribute. The `alt` tag specifies an alternate text for an image.
|
13
16
|
|
14
|
-
|
17
|
+
**DaffImageComponent must have a defined width attribute.**
|
15
18
|
This error appears when `<daff-image>` is missing a `width` attribute. The width must be defined in order to correctly calculate the aspect ratio of the image.
|
16
19
|
|
17
|
-
|
20
|
+
**DaffImageComponent must have a defined height attribute.**
|
18
21
|
This error appears when `<daff-image>` is missing a `height` attribute. The height must be defined in order to correctly calculate the aspect ratio of the image.
|
19
22
|
|
23
|
+
## Accessbility
|
24
|
+
Images should be given a meaningful description using the native `alt` attribute to ensure an accessible experience by default. An error will be thrown if the `alt` attribute is missing.
|
25
|
+
|
20
26
|
## Usage
|
21
|
-
|
27
|
+
### Basic Image
|
28
|
+
<design-land-example-viewer-container example="load-image"></design-land-example-viewer-container>
|
29
|
+
|
30
|
+
### Image Load Output
|
31
|
+
<design-land-example-viewer-container example="load-image"></design-land-example-viewer-container>
|
@@ -1,11 +0,0 @@
|
|
1
|
-
import { BasicQuantityFieldComponent } from './basic/basic-quantity-field.component';
|
2
|
-
import { CustomRangeQuantityFieldComponent } from './customRange/custom-range-quantity-field.component';
|
3
|
-
import { DisabledQuantityFieldComponent } from './disabled/disabled-quantity-field.component';
|
4
|
-
import { SelectMaxQuantityFieldComponent } from './selectMax/select-max-quantity-field.component';
|
5
|
-
export const QUANTITY_FIELD_EXAMPLES = [
|
6
|
-
BasicQuantityFieldComponent,
|
7
|
-
CustomRangeQuantityFieldComponent,
|
8
|
-
DisabledQuantityFieldComponent,
|
9
|
-
SelectMaxQuantityFieldComponent,
|
10
|
-
];
|
11
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhhbXBsZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzL2Rlc2lnbi9xdWFudGl0eS1maWVsZC9leGFtcGxlcy9zcmMvZXhhbXBsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLDJCQUEyQixFQUFFLE1BQU0sd0NBQXdDLENBQUM7QUFDckYsT0FBTyxFQUFFLGlDQUFpQyxFQUFFLE1BQU0scURBQXFELENBQUM7QUFDeEcsT0FBTyxFQUFFLDhCQUE4QixFQUFFLE1BQU0sOENBQThDLENBQUM7QUFDOUYsT0FBTyxFQUFFLCtCQUErQixFQUFFLE1BQU0saURBQWlELENBQUM7QUFFbEcsTUFBTSxDQUFDLE1BQU0sdUJBQXVCLEdBQUc7SUFDckMsMkJBQTJCO0lBQzNCLGlDQUFpQztJQUNqQyw4QkFBOEI7SUFDOUIsK0JBQStCO0NBQ2hDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBCYXNpY1F1YW50aXR5RmllbGRDb21wb25lbnQgfSBmcm9tICcuL2Jhc2ljL2Jhc2ljLXF1YW50aXR5LWZpZWxkLmNvbXBvbmVudCc7XG5pbXBvcnQgeyBDdXN0b21SYW5nZVF1YW50aXR5RmllbGRDb21wb25lbnQgfSBmcm9tICcuL2N1c3RvbVJhbmdlL2N1c3RvbS1yYW5nZS1xdWFudGl0eS1maWVsZC5jb21wb25lbnQnO1xuaW1wb3J0IHsgRGlzYWJsZWRRdWFudGl0eUZpZWxkQ29tcG9uZW50IH0gZnJvbSAnLi9kaXNhYmxlZC9kaXNhYmxlZC1xdWFudGl0eS1maWVsZC5jb21wb25lbnQnO1xuaW1wb3J0IHsgU2VsZWN0TWF4UXVhbnRpdHlGaWVsZENvbXBvbmVudCB9IGZyb20gJy4vc2VsZWN0TWF4L3NlbGVjdC1tYXgtcXVhbnRpdHktZmllbGQuY29tcG9uZW50JztcblxuZXhwb3J0IGNvbnN0IFFVQU5USVRZX0ZJRUxEX0VYQU1QTEVTID0gW1xuICBCYXNpY1F1YW50aXR5RmllbGRDb21wb25lbnQsXG4gIEN1c3RvbVJhbmdlUXVhbnRpdHlGaWVsZENvbXBvbmVudCxcbiAgRGlzYWJsZWRRdWFudGl0eUZpZWxkQ29tcG9uZW50LFxuICBTZWxlY3RNYXhRdWFudGl0eUZpZWxkQ29tcG9uZW50LFxuXTtcbiJdfQ==
|