@maggioli-design-system/mds-progress 1.0.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/dist/cjs/index-fd4954d5.js +1080 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +21 -0
- package/dist/cjs/mds-progress.cjs.entry.js +33 -0
- package/dist/cjs/mds-progress.cjs.js +19 -0
- package/dist/collection/collection-manifest.json +12 -0
- package/dist/collection/components/mds-progress/mds-progress.css +113 -0
- package/dist/collection/components/mds-progress/mds-progress.js +97 -0
- package/dist/collection/components/mds-progress/meta/dictionary.js +5 -0
- package/dist/collection/components/mds-progress/meta/types.js +1 -0
- package/dist/collection/components/mds-progress/test/mds-progress.stories.js +37 -0
- package/dist/collection/dictionary/autocomplete.js +59 -0
- package/dist/collection/dictionary/button.js +26 -0
- package/dist/collection/dictionary/color.js +19 -0
- package/dist/collection/dictionary/icon.js +3 -0
- package/dist/collection/dictionary/input-text-type.js +13 -0
- package/dist/collection/dictionary/loading.js +5 -0
- package/dist/collection/dictionary/typography.js +37 -0
- package/dist/collection/dictionary/variant.js +64 -0
- package/dist/collection/fixtures/cities.js +110 -0
- package/dist/collection/interface/input-value.js +1 -0
- package/dist/collection/types/autocomplete.js +1 -0
- package/dist/collection/types/button.js +1 -0
- package/dist/collection/types/form-rel.js +1 -0
- package/dist/collection/types/input-text-type.js +1 -0
- package/dist/collection/types/input-value-type.js +1 -0
- package/dist/collection/types/loading.js +1 -0
- package/dist/collection/types/typography.js +1 -0
- package/dist/collection/types/variant.js +1 -0
- package/dist/custom-elements/index.d.ts +45 -0
- package/dist/custom-elements/index.js +45 -0
- package/dist/esm/index-28e8e05c.js +1054 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +17 -0
- package/dist/esm/mds-progress.entry.js +29 -0
- package/dist/esm/mds-progress.js +17 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm-es5/index-28e8e05c.js +1 -0
- package/dist/esm-es5/index.js +0 -0
- package/dist/esm-es5/loader.js +1 -0
- package/dist/esm-es5/mds-progress.entry.js +1 -0
- package/dist/esm-es5/mds-progress.js +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/mds-progress/index.esm.js +0 -0
- package/dist/mds-progress/mds-progress.esm.js +1 -0
- package/dist/mds-progress/mds-progress.js +130 -0
- package/dist/mds-progress/p-23f79c39.js +1 -0
- package/dist/mds-progress/p-50ea2036.system.js +1 -0
- package/dist/mds-progress/p-96a127a8.system.js +1 -0
- package/dist/mds-progress/p-9d788a47.system.entry.js +1 -0
- package/dist/mds-progress/p-e655d83d.system.js +1 -0
- package/dist/mds-progress/p-f3c59b19.entry.js +1 -0
- package/dist/stats.json +496 -0
- package/dist/types/components/mds-progress/mds-progress.d.ts +17 -0
- package/dist/types/components/mds-progress/meta/dictionary.d.ts +2 -0
- package/dist/types/components/mds-progress/meta/types.d.ts +1 -0
- package/dist/types/components.d.ts +63 -0
- package/dist/types/dictionary/autocomplete.d.ts +2 -0
- package/dist/types/dictionary/button.d.ts +5 -0
- package/dist/types/dictionary/color.d.ts +3 -0
- package/dist/types/dictionary/icon.d.ts +2 -0
- package/dist/types/dictionary/input-text-type.d.ts +2 -0
- package/dist/types/dictionary/loading.d.ts +2 -0
- package/dist/types/dictionary/typography.d.ts +5 -0
- package/dist/types/dictionary/variant.d.ts +9 -0
- package/dist/types/fixtures/cities.d.ts +2 -0
- package/dist/types/interface/input-value.d.ts +4 -0
- package/dist/types/stencil-public-runtime.d.ts +1563 -0
- package/dist/types/types/autocomplete.d.ts +2 -0
- package/dist/types/types/button.d.ts +4 -0
- package/dist/types/types/form-rel.d.ts +1 -0
- package/dist/types/types/input-text-type.d.ts +1 -0
- package/dist/types/types/input-value-type.d.ts +1 -0
- package/dist/types/types/loading.d.ts +1 -0
- package/dist/types/types/typography.d.ts +4 -0
- package/dist/types/types/variant.d.ts +10 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +12 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +10 -0
- package/package.json +44 -0
- package/readme.md +34 -0
- package/src/components/mds-progress/css/mds-progress-variant-dark.css +7 -0
- package/src/components/mds-progress/css/mds-progress-variant-error.css +7 -0
- package/src/components/mds-progress/css/mds-progress-variant-info.css +7 -0
- package/src/components/mds-progress/css/mds-progress-variant-light.css +7 -0
- package/src/components/mds-progress/css/mds-progress-variant-success.css +7 -0
- package/src/components/mds-progress/css/mds-progress-variant-warning.css +7 -0
- package/src/components/mds-progress/mds-progress.css +59 -0
- package/src/components/mds-progress/mds-progress.tsx +38 -0
- package/src/components/mds-progress/meta/dictionary.ts +9 -0
- package/src/components/mds-progress/meta/types.ts +3 -0
- package/src/components/mds-progress/readme.md +19 -0
- package/src/components/mds-progress/test/mds-progress.e2e.ts +11 -0
- package/src/components/mds-progress/test/mds-progress.spec.tsx +18 -0
- package/src/components/mds-progress/test/mds-progress.stories.js +37 -0
- package/src/components.d.ts +63 -0
- package/src/dictionary/autocomplete.ts +62 -0
- package/src/dictionary/button.ts +35 -0
- package/src/dictionary/color.ts +24 -0
- package/src/dictionary/icon.ts +5 -0
- package/src/dictionary/input-text-type.ts +17 -0
- package/src/dictionary/loading.ts +9 -0
- package/src/dictionary/typography.ts +46 -0
- package/src/dictionary/variant.ts +81 -0
- package/src/fixtures/cities.ts +116 -0
- package/src/interface/input-value.ts +5 -0
- package/src/types/autocomplete.ts +69 -0
- package/src/types/button.ts +24 -0
- package/src/types/form-rel.ts +11 -0
- package/src/types/input-text-type.ts +11 -0
- package/src/types/input-value-type.ts +5 -0
- package/src/types/loading.ts +3 -0
- package/src/types/typography.ts +35 -0
- package/src/types/variant.ts +72 -0
- package/www/build/index.esm.js +0 -0
- package/www/build/mds-progress.esm.js +1 -0
- package/www/build/mds-progress.js +130 -0
- package/www/build/p-23f79c39.js +1 -0
- package/www/build/p-50ea2036.system.js +1 -0
- package/www/build/p-96a127a8.system.js +1 -0
- package/www/build/p-9d788a47.system.entry.js +1 -0
- package/www/build/p-e655d83d.system.js +1 -0
- package/www/build/p-f3c59b19.entry.js +1 -0
- package/www/host.config.json +15 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare type AutocompleteType = 'additional-name' | 'address' | 'address-level1' | 'address-level2' | 'address-level3' | 'address-level4' | 'address-line1' | 'address-line2' | 'address-line3' | 'bday' | 'bday-day' | 'bday-month' | 'bday-year' | 'cc-additional-name' | 'cc-csc' | 'cc-exp' | 'cc-exp-month' | 'cc-exp-year' | 'cc-family-name' | 'cc-family-name' | 'cc-given-name' | 'cc-name' | 'cc-number' | 'cc-type' | 'country' | 'country-name' | 'current-password' | 'email' | 'family-name' | 'given-name' | 'honorific-prefix' | 'honorific-suffix' | 'impp' | 'language' | 'name' | 'new-password' | 'nickname' | 'off' | 'on' | 'one-time-code' | 'organization' | 'organization-title' | 'photo' | 'postal-code' | 'sex' | 'street-address' | 'tel' | 'tel-area-code' | 'tel-country-code' | 'tel-extension' | 'tel-local' | 'tel-national' | 'transaction-amount' | 'transaction-currency' | 'url' | 'username';
|
|
2
|
+
export declare type InputTextType = 'date' | 'email' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'textarea' | 'time' | 'url';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare type ButtonType = 'a' | 'button' | 'reset' | 'submit';
|
|
2
|
+
export declare type ButtonSizeType = 'sm' | 'md' | 'lg' | 'xl';
|
|
3
|
+
export declare type ButtonIconPositionType = 'left' | 'right';
|
|
4
|
+
export declare type ButtonVariantType = 'primary' | 'dark' | 'light' | 'error' | 'info' | 'success' | 'warning';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type FormRelType = 'external' | 'help' | 'license' | 'next' | 'nofollow' | 'noopener' | 'noreferrer' | 'opener' | 'prev' | 'search';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type InputTextType = 'date' | 'email' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'textarea' | 'time' | 'url';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type InputValueType = null | number | string | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type LoadingType = 'eager' | 'lazy';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare type TypographyType = 'action' | 'caption' | 'code' | 'detail' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'hack' | 'label' | 'option' | 'paragraph';
|
|
2
|
+
export declare type TypographyPrimaryType = 'action' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
3
|
+
export declare type TypographySecondaryType = 'caption' | 'detail' | 'label' | 'option' | 'paragraph';
|
|
4
|
+
export declare type TypographyMonoType = 'code' | 'hack';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare type ThemeStatusVariantType = 'error' | 'info' | 'success' | 'warning';
|
|
2
|
+
export declare type ThemeVariantType = 'dark' | 'light' | 'error' | 'info' | 'success' | 'warning';
|
|
3
|
+
export declare type ThemeFullVariantType = 'amaranth' | 'aqua' | 'blue' | 'dark' | 'error' | 'green' | 'info' | 'light' | 'lime' | 'orange' | 'orchid' | 'sky' | 'success' | 'violet' | 'warning' | 'yellow';
|
|
4
|
+
export declare type ThemeLuminanceVariantType = 'dark' | 'light';
|
|
5
|
+
export declare type LabelVariantType = 'amaranth' | 'aqua' | 'blue' | 'green' | 'lime' | 'orange' | 'orchid' | 'sky' | 'violet' | 'yellow';
|
|
6
|
+
export declare type ActionVariantType = 'primary' | 'dark' | 'light';
|
|
7
|
+
export declare type StateVariantType = 'disabled' | 'focused' | 'readonly';
|
|
8
|
+
export declare type ToneVariantType = 'strong' | 'weak' | 'ghost' | 'quiet';
|
|
9
|
+
export declare type ToneSimpleVariantType = 'strong' | 'weak' | 'quiet';
|
|
10
|
+
export declare type ToneMinimalVariantType = 'strong' | 'weak';
|
package/loader/cdn.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from '../dist/types/components';
|
|
2
|
+
export interface CustomElementsDefineOptions {
|
|
3
|
+
exclude?: string[];
|
|
4
|
+
resourcesUrl?: string;
|
|
5
|
+
syncQueue?: boolean;
|
|
6
|
+
jmp?: (c: Function) => any;
|
|
7
|
+
raf?: (c: FrameRequestCallback) => number;
|
|
8
|
+
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
9
|
+
rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions): Promise<void>;
|
|
12
|
+
export declare function applyPolyfills(): Promise<void>;
|
package/loader/index.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
|
|
2
|
+
(function(){if("undefined"!==typeof window&&void 0!==window.Reflect&&void 0!==window.customElements){var a=HTMLElement;window.HTMLElement=function(){return Reflect.construct(a,[],this.constructor)};HTMLElement.prototype=a.prototype;HTMLElement.prototype.constructor=HTMLElement;Object.setPrototypeOf(HTMLElement,a)}})();
|
|
3
|
+
export * from '../dist/esm/polyfills/index.js';
|
|
4
|
+
export * from '../dist/esm-es5/loader.js';
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@maggioli-design-system/mds-progress",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "mds-progress is a web-component from Maggioli Design System Magma, built with StencilJS, TypeScript, Storybook. It's based on the web-component standard and it's designed to be agnostic from the JavaScirpt framework you are using.",
|
|
5
|
+
"main": "dist/index.cjs.js",
|
|
6
|
+
"module": "dist/custom-elements/index.js",
|
|
7
|
+
"es2015": "dist/esm/index.mjs",
|
|
8
|
+
"es2017": "dist/esm/index.mjs",
|
|
9
|
+
"types": "dist/custom-elements/index.d.ts",
|
|
10
|
+
"collection": "dist/collection/collection-manifest.json",
|
|
11
|
+
"collection:main": "dist/collection/index.js",
|
|
12
|
+
"unpkg": "dist/mds-progress/mds-progress.esm.js",
|
|
13
|
+
"files": [
|
|
14
|
+
"dist/",
|
|
15
|
+
"loader/",
|
|
16
|
+
"readme.md",
|
|
17
|
+
"src/",
|
|
18
|
+
"www/"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "stencil build --docs-readme"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@stencil/core": "^2.10.0"
|
|
25
|
+
},
|
|
26
|
+
"license": "MIT",
|
|
27
|
+
"author": {
|
|
28
|
+
"name": "Vittorio Vittori",
|
|
29
|
+
"email": "vittorio.vittori@maggioli.it",
|
|
30
|
+
"url": "http://vit.to"
|
|
31
|
+
},
|
|
32
|
+
"contributors": [
|
|
33
|
+
{
|
|
34
|
+
"name": "Andrea Pruccoli",
|
|
35
|
+
"email": "andrea.pruccoli@maggioli.it",
|
|
36
|
+
"role": "Software Engineer"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "Vittorio Vittori",
|
|
40
|
+
"email": "vittorio.vittori@maggioli.it",
|
|
41
|
+
"role": "UX UI Designer"
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# mds-progress
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
<!-- Auto Generated Below -->
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## Properties
|
|
9
|
+
|
|
10
|
+
| Property | Attribute | Description | Type | Default |
|
|
11
|
+
| ----------- | ----------- | ---------------------------------------------------------------------- | ------------------------------------------------------------------ | -------------- |
|
|
12
|
+
| `direction` | `direction` | Specifies the direction of the progress bar, if horizonatl or vertical | `"horizontal" \| "vertical"` | `'horizontal'` |
|
|
13
|
+
| `progress` | `progress` | A value between 0 and 1 that rapresents the status progress | `number` | `0` |
|
|
14
|
+
| `variant` | `variant` | Sets the theme variant colors | `"dark" \| "error" \| "info" \| "light" \| "success" \| "warning"` | `'dark'` |
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## Dependencies
|
|
18
|
+
|
|
19
|
+
### Used by
|
|
20
|
+
|
|
21
|
+
- [mds-accordion-timer-item](../mds-accordion-timer-item)
|
|
22
|
+
- [mds-benchmark-bar](../mds-benchmark-bar)
|
|
23
|
+
|
|
24
|
+
### Graph
|
|
25
|
+
```mermaid
|
|
26
|
+
graph TD;
|
|
27
|
+
mds-accordion-timer-item --> mds-progress
|
|
28
|
+
mds-benchmark-bar --> mds-progress
|
|
29
|
+
style mds-progress fill:#f9f,stroke:#333,stroke-width:4px
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
----------------------------------------------
|
|
33
|
+
|
|
34
|
+
Built with love @ **Maggioli Informatica / R&D Department**
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
@tailwind utilities;
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* @prop --background: Sets the background-color of the component
|
|
5
|
+
* @prop --progress-background: Sets the background-color of the progress
|
|
6
|
+
* @prop --radius: Sets the border-radius of the component
|
|
7
|
+
* @prop --thickness: Sets the thickness of the progress bar
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
:host {
|
|
11
|
+
|
|
12
|
+
--background: theme('colors.adjust-tone-09');
|
|
13
|
+
--progress-background: theme('colors.brand-maggioli-03');
|
|
14
|
+
--radius: theme('borderRadius.lg');
|
|
15
|
+
--thickness: theme('height.2');
|
|
16
|
+
|
|
17
|
+
@apply
|
|
18
|
+
flex
|
|
19
|
+
overflow-hidden
|
|
20
|
+
transition-colors;
|
|
21
|
+
|
|
22
|
+
background-color: var(--background);
|
|
23
|
+
border-radius: var(--radius);
|
|
24
|
+
height: var(--thickness);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:host ( .horizontal ) {
|
|
28
|
+
@apply w-full;
|
|
29
|
+
|
|
30
|
+
height: var(--thickness);
|
|
31
|
+
min-width: var(--thickness);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:host ( .vertical ) {
|
|
35
|
+
@apply
|
|
36
|
+
h-full
|
|
37
|
+
min-h-8
|
|
38
|
+
flex-col;
|
|
39
|
+
|
|
40
|
+
width: var(--thickness);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.progress {
|
|
44
|
+
|
|
45
|
+
@apply
|
|
46
|
+
duration-500
|
|
47
|
+
ease-out-expo;
|
|
48
|
+
|
|
49
|
+
background-color: var(--progress-background);
|
|
50
|
+
border-radius: var(--radius);
|
|
51
|
+
transition-property: background-color, flex-grow;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@import './css/mds-progress-variant-dark.css';
|
|
55
|
+
@import './css/mds-progress-variant-error.css';
|
|
56
|
+
@import './css/mds-progress-variant-info.css';
|
|
57
|
+
@import './css/mds-progress-variant-light.css';
|
|
58
|
+
@import './css/mds-progress-variant-success.css';
|
|
59
|
+
@import './css/mds-progress-variant-warning.css';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Component, Host, h, Prop } from '@stencil/core'
|
|
2
|
+
import { DirectionType } from './meta/types'
|
|
3
|
+
import { ThemeVariantType } from '../../types/variant'
|
|
4
|
+
|
|
5
|
+
@Component({
|
|
6
|
+
tag: 'mds-progress',
|
|
7
|
+
styleUrl: 'mds-progress.css',
|
|
8
|
+
shadow: true,
|
|
9
|
+
})
|
|
10
|
+
export class MdsProgress {
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* A value between 0 and 1 that rapresents the status progress
|
|
14
|
+
*/
|
|
15
|
+
@Prop() readonly progress?: number = 0
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Specifies the direction of the progress bar, if horizonatl or vertical
|
|
19
|
+
*/
|
|
20
|
+
@Prop() readonly direction?: DirectionType = 'horizontal'
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Sets the theme variant colors
|
|
24
|
+
*/
|
|
25
|
+
@Prop({ reflect: true }) readonly variant?: ThemeVariantType = 'dark'
|
|
26
|
+
|
|
27
|
+
render () {
|
|
28
|
+
return (
|
|
29
|
+
<Host class={this.direction}>
|
|
30
|
+
<div class="progress" style={
|
|
31
|
+
this.direction === 'horizontal'
|
|
32
|
+
? { flexGrow: `${this.progress}` }
|
|
33
|
+
: { flexGrow: `${this.progress}`, width: '100%' }
|
|
34
|
+
}></div>
|
|
35
|
+
</Host>
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# mds-progress
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
<!-- Auto Generated Below -->
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## Properties
|
|
9
|
+
|
|
10
|
+
| Property | Attribute | Description | Type | Default |
|
|
11
|
+
| ----------- | ----------- | ---------------------------------------------------------------------- | ------------------------------------------------------------------ | -------------- |
|
|
12
|
+
| `direction` | `direction` | Specifies the direction of the progress bar, if horizonatl or vertical | `"horizontal" \| "vertical"` | `'horizontal'` |
|
|
13
|
+
| `progress` | `progress` | A value between 0 and 1 that rapresents the status progress | `number` | `0` |
|
|
14
|
+
| `variant` | `variant` | Sets the theme variant colors | `"dark" \| "error" \| "info" \| "light" \| "success" \| "warning"` | `'dark'` |
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
----------------------------------------------
|
|
18
|
+
|
|
19
|
+
Built with love @ **Maggioli Informatica / R&D Department**
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { newE2EPage } from '@stencil/core/testing'
|
|
2
|
+
|
|
3
|
+
describe('mds-progress', () => {
|
|
4
|
+
it('renders', async () => {
|
|
5
|
+
const page = await newE2EPage()
|
|
6
|
+
await page.setContent('<mds-progress></mds-progress>')
|
|
7
|
+
|
|
8
|
+
const element = await page.find('mds-progress')
|
|
9
|
+
expect(element).toHaveClass('hydrated')
|
|
10
|
+
})
|
|
11
|
+
})
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { newSpecPage } from '@stencil/core/testing'
|
|
2
|
+
import { MdsProgress } from '../mds-progress'
|
|
3
|
+
|
|
4
|
+
describe('mds-progress', () => {
|
|
5
|
+
it('renders', async () => {
|
|
6
|
+
const page = await newSpecPage({
|
|
7
|
+
components: [MdsProgress],
|
|
8
|
+
html: '<mds-progress></mds-progress>',
|
|
9
|
+
})
|
|
10
|
+
expect(page.root).toEqualHtml(`
|
|
11
|
+
<mds-progress>
|
|
12
|
+
<mock:shadow-root>
|
|
13
|
+
<slot></slot>
|
|
14
|
+
</mock:shadow-root>
|
|
15
|
+
</mds-progress>
|
|
16
|
+
`)
|
|
17
|
+
})
|
|
18
|
+
})
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import faker from 'faker'
|
|
3
|
+
import MdsProgress from '@component/mds-progress/mds-progress'
|
|
4
|
+
import { directionDictionary } from '../meta/dictionary'
|
|
5
|
+
import { themeVariantDictionary } from '@dictionary/variant'
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
title: 'UI / Progress',
|
|
9
|
+
component: MdsProgress,
|
|
10
|
+
argTypes: {
|
|
11
|
+
direction: {
|
|
12
|
+
type: { name: 'string', required: false },
|
|
13
|
+
control: { type: 'select' },
|
|
14
|
+
description: 'Specifies the direction of the progress bar, if horizonatl or vertical',
|
|
15
|
+
options: directionDictionary,
|
|
16
|
+
},
|
|
17
|
+
progress: {
|
|
18
|
+
control: { type: 'range', step: 0.01, min: 0, max: 1 },
|
|
19
|
+
type: { name: 'number', required: false },
|
|
20
|
+
description: 'A value between 0 and 1 that rapresents the status progress',
|
|
21
|
+
},
|
|
22
|
+
variant: {
|
|
23
|
+
type: { name: 'string', required: false },
|
|
24
|
+
description: 'Sets the theme variant colors',
|
|
25
|
+
options: themeVariantDictionary,
|
|
26
|
+
control: { type: 'select' },
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const Template = args =>
|
|
32
|
+
<mds-progress {...args}/>
|
|
33
|
+
|
|
34
|
+
export const Default = Template.bind({})
|
|
35
|
+
Default.args = {
|
|
36
|
+
progress: 0.35,
|
|
37
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/**
|
|
4
|
+
* This is an autogenerated file created by the Stencil compiler.
|
|
5
|
+
* It contains typing information for all components that exist in this project.
|
|
6
|
+
*/
|
|
7
|
+
import { HTMLStencilElement, JSXBase } from "@stencil/core/internal";
|
|
8
|
+
import { DirectionType } from "./components/mds-progress/meta/types";
|
|
9
|
+
import { ThemeVariantType } from "./types/variant";
|
|
10
|
+
export namespace Components {
|
|
11
|
+
interface MdsProgress {
|
|
12
|
+
/**
|
|
13
|
+
* Specifies the direction of the progress bar, if horizonatl or vertical
|
|
14
|
+
*/
|
|
15
|
+
"direction"?: DirectionType;
|
|
16
|
+
/**
|
|
17
|
+
* A value between 0 and 1 that rapresents the status progress
|
|
18
|
+
*/
|
|
19
|
+
"progress"?: number;
|
|
20
|
+
/**
|
|
21
|
+
* Sets the theme variant colors
|
|
22
|
+
*/
|
|
23
|
+
"variant"?: ThemeVariantType;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
declare global {
|
|
27
|
+
interface HTMLMdsProgressElement extends Components.MdsProgress, HTMLStencilElement {
|
|
28
|
+
}
|
|
29
|
+
var HTMLMdsProgressElement: {
|
|
30
|
+
prototype: HTMLMdsProgressElement;
|
|
31
|
+
new (): HTMLMdsProgressElement;
|
|
32
|
+
};
|
|
33
|
+
interface HTMLElementTagNameMap {
|
|
34
|
+
"mds-progress": HTMLMdsProgressElement;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
declare namespace LocalJSX {
|
|
38
|
+
interface MdsProgress {
|
|
39
|
+
/**
|
|
40
|
+
* Specifies the direction of the progress bar, if horizonatl or vertical
|
|
41
|
+
*/
|
|
42
|
+
"direction"?: DirectionType;
|
|
43
|
+
/**
|
|
44
|
+
* A value between 0 and 1 that rapresents the status progress
|
|
45
|
+
*/
|
|
46
|
+
"progress"?: number;
|
|
47
|
+
/**
|
|
48
|
+
* Sets the theme variant colors
|
|
49
|
+
*/
|
|
50
|
+
"variant"?: ThemeVariantType;
|
|
51
|
+
}
|
|
52
|
+
interface IntrinsicElements {
|
|
53
|
+
"mds-progress": MdsProgress;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export { LocalJSX as JSX };
|
|
57
|
+
declare module "@stencil/core" {
|
|
58
|
+
export namespace JSX {
|
|
59
|
+
interface IntrinsicElements {
|
|
60
|
+
"mds-progress": LocalJSX.MdsProgress & JSXBase.HTMLAttributes<HTMLMdsProgressElement>;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
const autoCompleteDictionary = [
|
|
2
|
+
'additional-name',
|
|
3
|
+
'address',
|
|
4
|
+
'address-level1',
|
|
5
|
+
'address-level2',
|
|
6
|
+
'address-level3',
|
|
7
|
+
'address-level4',
|
|
8
|
+
'address-line1',
|
|
9
|
+
'address-line2',
|
|
10
|
+
'address-line3',
|
|
11
|
+
'bday',
|
|
12
|
+
'bday-day',
|
|
13
|
+
'bday-month',
|
|
14
|
+
'bday-year',
|
|
15
|
+
'cc-additional-name',
|
|
16
|
+
'cc-csc',
|
|
17
|
+
'cc-exp',
|
|
18
|
+
'cc-exp-month',
|
|
19
|
+
'cc-exp-year',
|
|
20
|
+
'cc-family-name',
|
|
21
|
+
'cc-family-name',
|
|
22
|
+
'cc-given-name',
|
|
23
|
+
'cc-name',
|
|
24
|
+
'cc-number',
|
|
25
|
+
'cc-type',
|
|
26
|
+
'country',
|
|
27
|
+
'country-name',
|
|
28
|
+
'current-password',
|
|
29
|
+
'email',
|
|
30
|
+
'family-name',
|
|
31
|
+
'given-name',
|
|
32
|
+
'honorific-prefix',
|
|
33
|
+
'honorific-suffix',
|
|
34
|
+
'impp',
|
|
35
|
+
'language',
|
|
36
|
+
'name',
|
|
37
|
+
'new-password',
|
|
38
|
+
'nickname',
|
|
39
|
+
'off',
|
|
40
|
+
'on',
|
|
41
|
+
'one-time-code',
|
|
42
|
+
'organization',
|
|
43
|
+
'organization-title',
|
|
44
|
+
'photo',
|
|
45
|
+
'postal-code',
|
|
46
|
+
'sex',
|
|
47
|
+
'street-address',
|
|
48
|
+
'tel',
|
|
49
|
+
'tel-area-code',
|
|
50
|
+
'tel-country-code',
|
|
51
|
+
'tel-extension',
|
|
52
|
+
'tel-local',
|
|
53
|
+
'tel-national',
|
|
54
|
+
'transaction-amount',
|
|
55
|
+
'transaction-currency',
|
|
56
|
+
'url',
|
|
57
|
+
'username',
|
|
58
|
+
]
|
|
59
|
+
|
|
60
|
+
export {
|
|
61
|
+
autoCompleteDictionary,
|
|
62
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
const buttonVariantDictionary = [
|
|
2
|
+
'dark',
|
|
3
|
+
'error',
|
|
4
|
+
'info',
|
|
5
|
+
'light',
|
|
6
|
+
'primary',
|
|
7
|
+
'success',
|
|
8
|
+
'warning',
|
|
9
|
+
]
|
|
10
|
+
|
|
11
|
+
const buttonToneVariantDictionary = [
|
|
12
|
+
'strong',
|
|
13
|
+
'weak',
|
|
14
|
+
'ghost',
|
|
15
|
+
'quiet',
|
|
16
|
+
]
|
|
17
|
+
|
|
18
|
+
const buttonSizeDictionary = [
|
|
19
|
+
'sm',
|
|
20
|
+
'md',
|
|
21
|
+
'lg',
|
|
22
|
+
'xl',
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
const buttonIconPositionDictionary = [
|
|
26
|
+
'left',
|
|
27
|
+
'right',
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
export {
|
|
31
|
+
buttonSizeDictionary,
|
|
32
|
+
buttonToneVariantDictionary,
|
|
33
|
+
buttonVariantDictionary,
|
|
34
|
+
buttonIconPositionDictionary,
|
|
35
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const colorLabelDictionary = [
|
|
2
|
+
'amaranth',
|
|
3
|
+
'aqua',
|
|
4
|
+
'blue',
|
|
5
|
+
'green',
|
|
6
|
+
'lime',
|
|
7
|
+
'orange',
|
|
8
|
+
'orchid',
|
|
9
|
+
'sky',
|
|
10
|
+
'violet',
|
|
11
|
+
'yellow',
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
const colorStatusDictionary = [
|
|
15
|
+
'error',
|
|
16
|
+
'info',
|
|
17
|
+
'success',
|
|
18
|
+
'warning',
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
export {
|
|
22
|
+
colorLabelDictionary,
|
|
23
|
+
colorStatusDictionary,
|
|
24
|
+
}
|