@maggioli-design-system/mds-accordion-timer-item 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.
Files changed (121) hide show
  1. package/dist/cjs/index-2ee34dd7.js +1180 -0
  2. package/dist/cjs/index.cjs.js +2 -0
  3. package/dist/cjs/loader.cjs.js +21 -0
  4. package/dist/cjs/mds-accordion-timer-item.cjs.entry.js +100 -0
  5. package/dist/cjs/mds-accordion-timer-item.cjs.js +19 -0
  6. package/dist/collection/collection-manifest.json +12 -0
  7. package/dist/collection/components/mds-accordion-timer-item/mds-accordion-timer-item.css +109 -0
  8. package/dist/collection/components/mds-accordion-timer-item/mds-accordion-timer-item.js +206 -0
  9. package/dist/collection/components/mds-accordion-timer-item/test/mds-accordion-timer-item.stories.js +49 -0
  10. package/dist/collection/dictionary/autocomplete.js +59 -0
  11. package/dist/collection/dictionary/button.js +26 -0
  12. package/dist/collection/dictionary/color.js +19 -0
  13. package/dist/collection/dictionary/icon.js +3 -0
  14. package/dist/collection/dictionary/input-text-type.js +13 -0
  15. package/dist/collection/dictionary/loading.js +5 -0
  16. package/dist/collection/dictionary/typography.js +37 -0
  17. package/dist/collection/dictionary/variant.js +64 -0
  18. package/dist/collection/fixtures/cities.js +110 -0
  19. package/dist/collection/interface/input-value.js +1 -0
  20. package/dist/collection/types/autocomplete.js +1 -0
  21. package/dist/collection/types/button.js +1 -0
  22. package/dist/collection/types/form-rel.js +1 -0
  23. package/dist/collection/types/input-text-type.js +1 -0
  24. package/dist/collection/types/input-value-type.js +1 -0
  25. package/dist/collection/types/loading.js +1 -0
  26. package/dist/collection/types/typography.js +1 -0
  27. package/dist/collection/types/variant.js +1 -0
  28. package/dist/custom-elements/index.d.ts +45 -0
  29. package/dist/custom-elements/index.js +112 -0
  30. package/dist/esm/index-4339770f.js +1153 -0
  31. package/dist/esm/index.js +1 -0
  32. package/dist/esm/loader.js +17 -0
  33. package/dist/esm/mds-accordion-timer-item.entry.js +96 -0
  34. package/dist/esm/mds-accordion-timer-item.js +17 -0
  35. package/dist/esm/polyfills/core-js.js +11 -0
  36. package/dist/esm/polyfills/css-shim.js +1 -0
  37. package/dist/esm/polyfills/dom.js +79 -0
  38. package/dist/esm/polyfills/es5-html-element.js +1 -0
  39. package/dist/esm/polyfills/index.js +34 -0
  40. package/dist/esm/polyfills/system.js +6 -0
  41. package/dist/esm-es5/index-4339770f.js +1 -0
  42. package/dist/esm-es5/index.js +0 -0
  43. package/dist/esm-es5/loader.js +1 -0
  44. package/dist/esm-es5/mds-accordion-timer-item.entry.js +1 -0
  45. package/dist/esm-es5/mds-accordion-timer-item.js +1 -0
  46. package/dist/index.cjs.js +1 -0
  47. package/dist/index.js +1 -0
  48. package/dist/mds-accordion-timer-item/index.esm.js +0 -0
  49. package/dist/mds-accordion-timer-item/mds-accordion-timer-item.esm.js +1 -0
  50. package/dist/mds-accordion-timer-item/mds-accordion-timer-item.js +130 -0
  51. package/dist/mds-accordion-timer-item/p-08901cb1.entry.js +1 -0
  52. package/dist/mds-accordion-timer-item/p-50ea2036.system.js +1 -0
  53. package/dist/mds-accordion-timer-item/p-7e30d5f8.js +1 -0
  54. package/dist/mds-accordion-timer-item/p-9b9f6cb9.system.js +1 -0
  55. package/dist/mds-accordion-timer-item/p-c7b8cf9d.system.js +1 -0
  56. package/dist/mds-accordion-timer-item/p-d8623772.system.entry.js +1 -0
  57. package/dist/stats.json +705 -0
  58. package/dist/types/components/mds-accordion-timer-item/mds-accordion-timer-item.d.ts +43 -0
  59. package/dist/types/components.d.ts +90 -0
  60. package/dist/types/dictionary/autocomplete.d.ts +2 -0
  61. package/dist/types/dictionary/button.d.ts +5 -0
  62. package/dist/types/dictionary/color.d.ts +3 -0
  63. package/dist/types/dictionary/icon.d.ts +2 -0
  64. package/dist/types/dictionary/input-text-type.d.ts +2 -0
  65. package/dist/types/dictionary/loading.d.ts +2 -0
  66. package/dist/types/dictionary/typography.d.ts +5 -0
  67. package/dist/types/dictionary/variant.d.ts +9 -0
  68. package/dist/types/fixtures/cities.d.ts +2 -0
  69. package/dist/types/interface/input-value.d.ts +4 -0
  70. package/dist/types/stencil-public-runtime.d.ts +1563 -0
  71. package/dist/types/types/autocomplete.d.ts +2 -0
  72. package/dist/types/types/button.d.ts +4 -0
  73. package/dist/types/types/form-rel.d.ts +1 -0
  74. package/dist/types/types/input-text-type.d.ts +1 -0
  75. package/dist/types/types/input-value-type.d.ts +1 -0
  76. package/dist/types/types/loading.d.ts +1 -0
  77. package/dist/types/types/typography.d.ts +4 -0
  78. package/dist/types/types/variant.d.ts +10 -0
  79. package/loader/cdn.js +3 -0
  80. package/loader/index.cjs.js +3 -0
  81. package/loader/index.d.ts +12 -0
  82. package/loader/index.es2017.js +3 -0
  83. package/loader/index.js +4 -0
  84. package/loader/package.json +10 -0
  85. package/package.json +47 -0
  86. package/readme.md +54 -0
  87. package/src/components/mds-accordion-timer-item/mds-accordion-timer-item.css +69 -0
  88. package/src/components/mds-accordion-timer-item/mds-accordion-timer-item.tsx +99 -0
  89. package/src/components/mds-accordion-timer-item/readme.md +39 -0
  90. package/src/components/mds-accordion-timer-item/test/mds-accordion-timer-item.e2e.ts +11 -0
  91. package/src/components/mds-accordion-timer-item/test/mds-accordion-timer-item.spec.tsx +18 -0
  92. package/src/components/mds-accordion-timer-item/test/mds-accordion-timer-item.stories.js +49 -0
  93. package/src/components.d.ts +90 -0
  94. package/src/dictionary/autocomplete.ts +62 -0
  95. package/src/dictionary/button.ts +35 -0
  96. package/src/dictionary/color.ts +24 -0
  97. package/src/dictionary/icon.ts +5 -0
  98. package/src/dictionary/input-text-type.ts +17 -0
  99. package/src/dictionary/loading.ts +9 -0
  100. package/src/dictionary/typography.ts +46 -0
  101. package/src/dictionary/variant.ts +81 -0
  102. package/src/fixtures/cities.ts +116 -0
  103. package/src/interface/input-value.ts +5 -0
  104. package/src/types/autocomplete.ts +69 -0
  105. package/src/types/button.ts +24 -0
  106. package/src/types/form-rel.ts +11 -0
  107. package/src/types/input-text-type.ts +11 -0
  108. package/src/types/input-value-type.ts +5 -0
  109. package/src/types/loading.ts +3 -0
  110. package/src/types/typography.ts +35 -0
  111. package/src/types/variant.ts +72 -0
  112. package/www/build/index.esm.js +0 -0
  113. package/www/build/mds-accordion-timer-item.esm.js +1 -0
  114. package/www/build/mds-accordion-timer-item.js +130 -0
  115. package/www/build/p-08901cb1.entry.js +1 -0
  116. package/www/build/p-50ea2036.system.js +1 -0
  117. package/www/build/p-7e30d5f8.js +1 -0
  118. package/www/build/p-9b9f6cb9.system.js +1 -0
  119. package/www/build/p-c7b8cf9d.system.js +1 -0
  120. package/www/build/p-d8623772.system.entry.js +1 -0
  121. 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,3 @@
1
+
2
+ module.exports = require('../dist/cjs/loader.cjs.js');
3
+ module.exports.applyPolyfills = function() { return Promise.resolve() };
@@ -0,0 +1,3 @@
1
+
2
+ module.exports = require('../dist/cjs/loader.cjs.js');
3
+ module.exports.applyPolyfills = function() { return Promise.resolve() };
@@ -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>;
@@ -0,0 +1,3 @@
1
+
2
+ export * from '../dist/esm/polyfills/index.js';
3
+ export * from '../dist/esm/loader.js';
@@ -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';
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "mds-accordion-timer-item-loader",
3
+ "typings": "./index.d.ts",
4
+ "module": "./index.js",
5
+ "main": "./index.cjs.js",
6
+ "jsnext:main": "./index.es2017.js",
7
+ "es2015": "./index.es2017.js",
8
+ "es2017": "./index.es2017.js",
9
+ "unpkg": "./cdn.js"
10
+ }
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "@maggioli-design-system/mds-accordion-timer-item",
3
+ "version": "1.0.0",
4
+ "description": "mds-accordion-timer-item 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-accordion-timer-item/mds-accordion-timer-item.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
+ "@maggioli-design-system/mds-accordion-timer": "^1.0.0",
25
+ "@maggioli-design-system/mds-progress": "^1.0.0",
26
+ "@maggioli-design-system/mds-text": "^1.2.1",
27
+ "@stencil/core": "^2.10.0"
28
+ },
29
+ "license": "MIT",
30
+ "author": {
31
+ "name": "Vittorio Vittori",
32
+ "email": "vittorio.vittori@maggioli.it",
33
+ "url": "http://vit.to"
34
+ },
35
+ "contributors": [
36
+ {
37
+ "name": "Andrea Pruccoli",
38
+ "email": "andrea.pruccoli@maggioli.it",
39
+ "role": "Software Engineer"
40
+ },
41
+ {
42
+ "name": "Vittorio Vittori",
43
+ "email": "vittorio.vittori@maggioli.it",
44
+ "role": "UX UI Designer"
45
+ }
46
+ ]
47
+ }
package/readme.md ADDED
@@ -0,0 +1,54 @@
1
+ # mds-accordion-timer-item
2
+
3
+
4
+
5
+ <!-- Auto Generated Below -->
6
+
7
+
8
+ ## Properties
9
+
10
+ | Property | Attribute | Description | Type | Default |
11
+ | -------------------------- | ------------- | ----------------------------------------------------------------------- | ---------------------------------------------------------- | ----------- |
12
+ | `active` | `active` | Specifies if the accordion item is opened or not | `boolean` | `undefined` |
13
+ | `description` _(required)_ | `description` | Specifies the title shown when the accordion is closed or opened | `string` | `undefined` |
14
+ | `progress` | `progress` | A value between 0 and 100 that rapresents the status progress | `number` | `0` |
15
+ | `typography` | `typography` | Specifies the typography of the element | `"action" \| "h1" \| "h2" \| "h3" \| "h4" \| "h5" \| "h6"` | `'h5'` |
16
+ | `uuid` | `uuid` | Used automatically by MdsAccordionTimer wrapper to handle it's siblings | `number` | `0` |
17
+
18
+
19
+ ## Events
20
+
21
+ | Event | Description | Type |
22
+ | ------------------ | ------------------------------------------------ | --------------------- |
23
+ | `clickActive` | Emits when the accordion is clicked by the mouse | `CustomEvent<string>` |
24
+ | `mouseEnterActive` | Emits when the accordion is hovered by the mouse | `CustomEvent<string>` |
25
+ | `mouseLeaveActive` | Emits when the accordion is hovered by the mouse | `CustomEvent<string>` |
26
+
27
+
28
+ ## CSS Custom Properties
29
+
30
+ | Name | Description |
31
+ | --------------------- | ----------------------------------------------------------------------- |
32
+ | `--background-active` | Sets the background-color of the progress bar when the item is selected |
33
+ | `--color` | Sets the text color of the component |
34
+ | `--thickness` | Sets thickness of the progress bar |
35
+
36
+
37
+ ## Dependencies
38
+
39
+ ### Depends on
40
+
41
+ - [mds-progress](../mds-progress)
42
+ - [mds-text](../mds-text)
43
+
44
+ ### Graph
45
+ ```mermaid
46
+ graph TD;
47
+ mds-accordion-timer-item --> mds-progress
48
+ mds-accordion-timer-item --> mds-text
49
+ style mds-accordion-timer-item fill:#f9f,stroke:#333,stroke-width:4px
50
+ ```
51
+
52
+ ----------------------------------------------
53
+
54
+ Built with love @ **Maggioli Informatica / R&D Department**
@@ -0,0 +1,69 @@
1
+ @tailwind utilities;
2
+
3
+ /**
4
+ * @prop --background-active: Sets the background-color of the progress bar when the item is selected
5
+ * @prop --color: Sets the text color of the component
6
+ * @prop --thickness: Sets thickness of the progress bar
7
+ */
8
+
9
+ :host {
10
+
11
+ @apply
12
+ duration-500
13
+ ease-out-expo
14
+ grid
15
+ py-4
16
+ relative
17
+ transition-cosmetic;
18
+
19
+ color: var(--color, theme('colors.adjust-tone-02'));
20
+ }
21
+
22
+ :host ( :hover:not(.active) ) .progress-bar {
23
+
24
+ --background-active: theme('colors.adjust-tone-07');
25
+ }
26
+
27
+ .row {
28
+ @apply
29
+ flex
30
+ gap-4;
31
+ }
32
+
33
+ .accordion {
34
+ @apply grid;
35
+ }
36
+
37
+ .progress-bar {
38
+ @apply flex-shrink-0;
39
+
40
+ --thickness: theme('width.1');
41
+ }
42
+
43
+ .header {
44
+ @apply cursor-pointer;
45
+ }
46
+
47
+ :host ( .active ) .header {
48
+ @apply cursor-auto;
49
+ }
50
+
51
+ .contents {
52
+ @apply
53
+ duration-300
54
+ ease-out-quad
55
+ gap-4
56
+ grid
57
+ h-0
58
+ opacity-0
59
+ overflow-hidden
60
+ pt-0
61
+ transition-cosmetic;
62
+ }
63
+
64
+ .contents--opened {
65
+ @apply
66
+ h-auto
67
+ opacity-100
68
+ pt-4;
69
+ }
@@ -0,0 +1,99 @@
1
+ import { Component, Host, h, Prop, State, Event, EventEmitter, Watch } from '@stencil/core'
2
+ import clsx from 'clsx'
3
+ import { TypographyPrimaryType } from '../../types/typography'
4
+
5
+ @Component({
6
+ tag: 'mds-accordion-timer-item',
7
+ styleUrl: 'mds-accordion-timer-item.css',
8
+ shadow: true,
9
+ })
10
+ export class MdsAccordionTimerItem {
11
+
12
+ @State() isActive:boolean
13
+
14
+ /**
15
+ * Specifies the typography of the element
16
+ */
17
+ @Prop() readonly typography?: TypographyPrimaryType = 'h5'
18
+
19
+ /**
20
+ * Specifies if the accordion item is opened or not
21
+ */
22
+ @Prop({ reflect: true }) readonly active?: boolean
23
+
24
+ /**
25
+ * Specifies the title shown when the accordion is closed or opened
26
+ */
27
+ @Prop() readonly description!: string
28
+
29
+ /**
30
+ * A value between 0 and 100 that rapresents the status progress
31
+ */
32
+ @Prop() readonly progress?: number = 0
33
+
34
+ /**
35
+ * Used automatically by MdsAccordionTimer wrapper to handle it's siblings
36
+ */
37
+ @Prop() readonly uuid?: number = 0
38
+
39
+ componentWillLoad (): void {
40
+ this.isActive = this.active
41
+ }
42
+
43
+ private toggle = () => {
44
+ if (!this.isActive) {
45
+ this.isActive = true
46
+ this.clickActive.emit(this.description)
47
+ }
48
+ }
49
+
50
+ private mouseEnter = () => {
51
+ if (this.isActive) {
52
+ this.mouseEnterActive.emit(this.description)
53
+ }
54
+ }
55
+
56
+ private mouseLeave = () => {
57
+ if (this.isActive) {
58
+ this.mouseLeaveActive.emit(this.description)
59
+ }
60
+ }
61
+
62
+ /**
63
+ * Emits when the accordion is clicked by the mouse
64
+ */
65
+ @Event() clickActive: EventEmitter<string>
66
+
67
+ /**
68
+ * Emits when the accordion is hovered by the mouse
69
+ */
70
+ @Event() mouseEnterActive: EventEmitter<string>
71
+
72
+ /**
73
+ * Emits when the accordion is hovered by the mouse
74
+ */
75
+ @Event() mouseLeaveActive: EventEmitter<string>
76
+
77
+ @Watch('active')
78
+ validateOpened (newValue: boolean): void {
79
+ this.isActive = newValue
80
+ }
81
+
82
+ render () {
83
+ return (
84
+ <Host class={ clsx(this.isActive && 'active') } onMouseEnter={ this.mouseEnter } onMouseLeave={ this.mouseLeave }>
85
+ <div class="row">
86
+ <mds-progress class="progress-bar" progress={this.progress} direction="vertical"/>
87
+ <div class="accordion">
88
+ <div class="header" onClick={ this.toggle }>
89
+ <mds-text typography={ this.typography }>{ this.description }</mds-text>
90
+ </div>
91
+ <div class={ clsx('contents', this.isActive && 'contents--opened') }>
92
+ <slot/>
93
+ </div>
94
+ </div>
95
+ </div>
96
+ </Host>
97
+ )
98
+ }
99
+ }
@@ -0,0 +1,39 @@
1
+ # mds-accordion-timer-item
2
+
3
+
4
+
5
+ <!-- Auto Generated Below -->
6
+
7
+
8
+ ## Properties
9
+
10
+ | Property | Attribute | Description | Type | Default |
11
+ | -------------------------- | ------------- | ----------------------------------------------------------------------- | ---------------------------------------------------------- | ----------- |
12
+ | `active` | `active` | Specifies if the accordion item is opened or not | `boolean` | `undefined` |
13
+ | `description` _(required)_ | `description` | Specifies the title shown when the accordion is closed or opened | `string` | `undefined` |
14
+ | `progress` | `progress` | A value between 0 and 100 that rapresents the status progress | `number` | `0` |
15
+ | `typography` | `typography` | Specifies the typography of the element | `"action" \| "h1" \| "h2" \| "h3" \| "h4" \| "h5" \| "h6"` | `'h5'` |
16
+ | `uuid` | `uuid` | Used automatically by MdsAccordionTimer wrapper to handle it's siblings | `number` | `0` |
17
+
18
+
19
+ ## Events
20
+
21
+ | Event | Description | Type |
22
+ | ------------------ | ------------------------------------------------ | --------------------- |
23
+ | `clickActive` | Emits when the accordion is clicked by the mouse | `CustomEvent<string>` |
24
+ | `mouseEnterActive` | Emits when the accordion is hovered by the mouse | `CustomEvent<string>` |
25
+ | `mouseLeaveActive` | Emits when the accordion is hovered by the mouse | `CustomEvent<string>` |
26
+
27
+
28
+ ## CSS Custom Properties
29
+
30
+ | Name | Description |
31
+ | --------------------- | ----------------------------------------------------------------------- |
32
+ | `--background-active` | Sets the background-color of the progress bar when the item is selected |
33
+ | `--color` | Sets the text color of the component |
34
+ | `--thickness` | Sets thickness of the progress bar |
35
+
36
+
37
+ ----------------------------------------------
38
+
39
+ Built with love @ **Maggioli Informatica / R&D Department**
@@ -0,0 +1,11 @@
1
+ import { newE2EPage } from '@stencil/core/testing'
2
+
3
+ describe('mds-accordion-timer-item', () => {
4
+ it('renders', async () => {
5
+ const page = await newE2EPage()
6
+ await page.setContent('<mds-accordion-timer-item></mds-accordion-timer-item>')
7
+
8
+ const element = await page.find('mds-accordion-timer-item')
9
+ expect(element).toHaveClass('hydrated')
10
+ })
11
+ })
@@ -0,0 +1,18 @@
1
+ import { newSpecPage } from '@stencil/core/testing'
2
+ import { MdsAccordionTimerItem } from '../mds-accordion-timer-item'
3
+
4
+ describe('mds-accordion-timer-item', () => {
5
+ it('renders', async () => {
6
+ const page = await newSpecPage({
7
+ components: [MdsAccordionTimerItem],
8
+ html: '<mds-accordion-timer-item></mds-accordion-timer-item>',
9
+ })
10
+ expect(page.root).toEqualHtml(`
11
+ <mds-accordion-timer-item>
12
+ <mock:shadow-root>
13
+ <slot></slot>
14
+ </mock:shadow-root>
15
+ </mds-accordion-timer-item>
16
+ `)
17
+ })
18
+ })
@@ -0,0 +1,49 @@
1
+ import React from 'react'
2
+ import MdsAccordionTimerItem from '@component/mds-accordion-timer-item/mds-accordion-timer-item'
3
+ import { typographyPrimaryDictionary } from '@dictionary/typography'
4
+ import faker from 'faker'
5
+
6
+ export default {
7
+ title: 'UI / Accordion Timer / Accordion Timer Item',
8
+ component: MdsAccordionTimerItem,
9
+ argTypes: {
10
+ description: {
11
+ type: { name: 'string', required: true },
12
+ description: 'Specifies the title shown when the accordion is closed or opened',
13
+ },
14
+ active: {
15
+ type: { name: 'boolean', required: false },
16
+ description: 'Specifies if the accordion item is opened or not',
17
+ },
18
+ progress: {
19
+ control: { type: 'range', step: 0.01, min: 0, max: 1 },
20
+ type: { name: 'number', required: false },
21
+ description: 'A value between 0 and 100 that rapresents the status progress',
22
+ },
23
+ typography: {
24
+ type: { name: 'string', required: false },
25
+ description: 'Specifies the typography of the element',
26
+ options: typographyPrimaryDictionary,
27
+ control: { type: 'select' },
28
+ },
29
+ },
30
+ }
31
+
32
+ const Template = args =>
33
+ <div>
34
+ <mds-accordion-timer-item {...args}>
35
+ <mds-text typography="paragraph" class="text-adjust-tone-08">{ faker.lorem.paragraphs(2) }</mds-text>
36
+ </mds-accordion-timer-item>
37
+ </div>
38
+
39
+ export const Default = Template.bind({})
40
+ Default.args = {
41
+ progress: 0.15,
42
+ description: 'Come funziona il monitoraggio del sonno?',
43
+ }
44
+
45
+ export const active = Template.bind({})
46
+ active.args = {
47
+ active: true,
48
+ description: 'Come funziona il monitoraggio del sonno?',
49
+ }
@@ -0,0 +1,90 @@
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 { TypographyPrimaryType } from "./types/typography";
9
+ export namespace Components {
10
+ interface MdsAccordionTimerItem {
11
+ /**
12
+ * Specifies if the accordion item is opened or not
13
+ */
14
+ "active"?: boolean;
15
+ /**
16
+ * Specifies the title shown when the accordion is closed or opened
17
+ */
18
+ "description": string;
19
+ /**
20
+ * A value between 0 and 100 that rapresents the status progress
21
+ */
22
+ "progress"?: number;
23
+ /**
24
+ * Specifies the typography of the element
25
+ */
26
+ "typography"?: TypographyPrimaryType;
27
+ /**
28
+ * Used automatically by MdsAccordionTimer wrapper to handle it's siblings
29
+ */
30
+ "uuid"?: number;
31
+ }
32
+ }
33
+ declare global {
34
+ interface HTMLMdsAccordionTimerItemElement extends Components.MdsAccordionTimerItem, HTMLStencilElement {
35
+ }
36
+ var HTMLMdsAccordionTimerItemElement: {
37
+ prototype: HTMLMdsAccordionTimerItemElement;
38
+ new (): HTMLMdsAccordionTimerItemElement;
39
+ };
40
+ interface HTMLElementTagNameMap {
41
+ "mds-accordion-timer-item": HTMLMdsAccordionTimerItemElement;
42
+ }
43
+ }
44
+ declare namespace LocalJSX {
45
+ interface MdsAccordionTimerItem {
46
+ /**
47
+ * Specifies if the accordion item is opened or not
48
+ */
49
+ "active"?: boolean;
50
+ /**
51
+ * Specifies the title shown when the accordion is closed or opened
52
+ */
53
+ "description": string;
54
+ /**
55
+ * Emits when the accordion is clicked by the mouse
56
+ */
57
+ "onClickActive"?: (event: CustomEvent<string>) => void;
58
+ /**
59
+ * Emits when the accordion is hovered by the mouse
60
+ */
61
+ "onMouseEnterActive"?: (event: CustomEvent<string>) => void;
62
+ /**
63
+ * Emits when the accordion is hovered by the mouse
64
+ */
65
+ "onMouseLeaveActive"?: (event: CustomEvent<string>) => void;
66
+ /**
67
+ * A value between 0 and 100 that rapresents the status progress
68
+ */
69
+ "progress"?: number;
70
+ /**
71
+ * Specifies the typography of the element
72
+ */
73
+ "typography"?: TypographyPrimaryType;
74
+ /**
75
+ * Used automatically by MdsAccordionTimer wrapper to handle it's siblings
76
+ */
77
+ "uuid"?: number;
78
+ }
79
+ interface IntrinsicElements {
80
+ "mds-accordion-timer-item": MdsAccordionTimerItem;
81
+ }
82
+ }
83
+ export { LocalJSX as JSX };
84
+ declare module "@stencil/core" {
85
+ export namespace JSX {
86
+ interface IntrinsicElements {
87
+ "mds-accordion-timer-item": LocalJSX.MdsAccordionTimerItem & JSXBase.HTMLAttributes<HTMLMdsAccordionTimerItemElement>;
88
+ }
89
+ }
90
+ }
@@ -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
+ }