@rededor/cura 0.5.0 → 0.5.2
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/{app-globals-0e3b7fc6.js → app-globals-2988084b.js} +5 -5
- package/dist/cjs/app-globals-2988084b.js.map +1 -0
- package/dist/cjs/cura-accordion_8.cjs.entry.js +452 -0
- package/dist/cjs/cura-accordion_8.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-button-outline.cjs.entry.js +83 -0
- package/dist/cjs/cura-button-outline.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-button-transparent.cjs.entry.js +83 -0
- package/dist/cjs/cura-button-transparent.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-display.cjs.entry.js +74 -0
- package/dist/cjs/cura-display.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-icons-view.cjs.entry.js +29 -0
- package/dist/cjs/cura-icons-view.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-label.cjs.entry.js +69 -0
- package/dist/cjs/cura-label.cjs.entry.js.map +1 -0
- package/dist/cjs/cura.cjs.js +3 -3
- package/dist/cjs/{index-72217b50.js → index-404d93e9.js} +247 -3
- package/dist/cjs/index-404d93e9.js.map +1 -0
- package/dist/cjs/index.cjs.js +7 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/collection/api/cura-api.type.js.map +1 -1
- package/dist/collection/api/modules/cura-theme-breakpoints-module.js +1 -1
- package/dist/collection/api/modules/cura-theme-breakpoints-module.js.map +1 -1
- package/dist/collection/api/modules/cura-theme-colors-module.js +1 -1
- package/dist/collection/api/modules/cura-theme-colors-module.js.map +1 -1
- package/dist/collection/api/theme-presets/static.js +2 -2
- package/dist/collection/api/theme-presets/static.js.map +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/accordion/cura-accordion/cura-accordion.stories.js +1 -1
- package/dist/collection/components/accordion/cura-accordion/cura-accordion.stories.js.map +1 -1
- package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.css +10 -6
- package/dist/collection/components/buttons/cura-button/cura-button.js +4 -3
- package/dist/collection/components/buttons/cura-button/cura-button.js.map +1 -1
- package/dist/collection/components/buttons/cura-button/cura-button.stories.js +1 -1
- package/dist/collection/components/buttons/cura-button/cura-button.stories.js.map +1 -1
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js +4 -3
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js.map +1 -1
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.stories.js +1 -1
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.stories.js.map +1 -1
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js +4 -3
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js.map +1 -1
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.stories.js +1 -1
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.stories.js.map +1 -1
- package/dist/collection/components/cura-icon/cura-icon.stories.js +1 -1
- package/dist/collection/components/cura-icon/cura-icon.stories.js.map +1 -1
- package/dist/collection/components/cura-icons-view/cura-icons-view.stories.js +1 -1
- package/dist/collection/components/cura-icons-view/cura-icons-view.stories.js.map +1 -1
- package/dist/collection/components/cura-page-template/cura-page-template.css +13 -9
- package/dist/collection/components/forms/cura-label/cura-label.css +70 -0
- package/dist/collection/components/forms/cura-label/cura-label.js +190 -0
- package/dist/collection/components/forms/cura-label/cura-label.js.map +1 -0
- package/dist/collection/components/forms/cura-label/cura-label.stories.js +137 -0
- package/dist/collection/components/forms/cura-label/cura-label.stories.js.map +1 -0
- package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.stories.js +1 -1
- package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.stories.js.map +1 -1
- package/dist/collection/components/text/cura-display/cura-display.css +21 -38
- package/dist/collection/components/text/cura-display/cura-display.js +80 -49
- package/dist/collection/components/text/cura-display/cura-display.js.map +1 -1
- package/dist/collection/components/text/cura-display/cura-display.stories.js +79 -34
- package/dist/collection/components/text/cura-display/cura-display.stories.js.map +1 -1
- package/dist/collection/components/text/cura-heading/cura-heading.css +50 -24
- package/dist/collection/components/text/cura-heading/cura-heading.js +94 -39
- package/dist/collection/components/text/cura-heading/cura-heading.js.map +1 -1
- package/dist/collection/components/text/cura-heading/cura-heading.stories.js +93 -37
- package/dist/collection/components/text/cura-heading/cura-heading.stories.js.map +1 -1
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.css +37 -38
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +62 -41
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.js.map +1 -1
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.stories.js +79 -47
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.stories.js.map +1 -1
- package/dist/collection/index.js +3 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/components/cura-accordion-item.js +1 -1
- package/dist/components/cura-accordion-item.js.map +1 -1
- package/dist/components/cura-button-outline.js +1 -1
- package/dist/components/cura-button-outline.js.map +1 -1
- package/dist/components/cura-button-transparent.js +1 -1
- package/dist/components/cura-button-transparent.js.map +1 -1
- package/dist/components/cura-button.js +1 -1
- package/dist/components/cura-button.js.map +1 -1
- package/dist/components/cura-display.js +41 -35
- package/dist/components/cura-display.js.map +1 -1
- package/dist/components/cura-heading.js +34 -21
- package/dist/components/cura-heading.js.map +1 -1
- package/dist/components/cura-label.d.ts +11 -0
- package/dist/components/cura-label.js +91 -0
- package/dist/components/cura-label.js.map +1 -0
- package/dist/components/cura-page-template.js +1 -1
- package/dist/components/cura-page-template.js.map +1 -1
- package/dist/components/cura-paragraph.js +25 -23
- package/dist/components/cura-paragraph.js.map +1 -1
- package/dist/components/index.js +11 -5
- package/dist/components/index.js.map +1 -1
- package/dist/cura/cura.esm.js +1 -1
- package/dist/cura/cura.esm.js.map +1 -1
- package/dist/cura/cura.js +1 -1
- package/dist/cura/index.esm.js +1 -1
- package/dist/cura/index.esm.js.map +1 -1
- package/dist/cura/p-03047b3e.entry.js +2 -0
- package/dist/cura/p-03047b3e.entry.js.map +1 -0
- package/dist/cura/p-0c79c54e.entry.js +2 -0
- package/dist/cura/p-0c79c54e.entry.js.map +1 -0
- package/dist/cura/p-120926c5.system.js +2 -0
- package/dist/cura/p-120926c5.system.js.map +1 -0
- package/dist/cura/p-223924fb.system.entry.js +2 -0
- package/dist/cura/p-223924fb.system.entry.js.map +1 -0
- package/dist/cura/p-46d20db3.js +3 -0
- package/dist/cura/p-46d20db3.js.map +1 -0
- package/dist/cura/p-48426f60.system.js +2 -0
- package/dist/cura/p-48426f60.system.js.map +1 -0
- package/dist/cura/p-49813052.entry.js +2 -0
- package/dist/cura/p-49813052.entry.js.map +1 -0
- package/dist/cura/p-4bdbcdf0.system.entry.js +2 -0
- package/dist/cura/p-4bdbcdf0.system.entry.js.map +1 -0
- package/dist/cura/p-7c8f3c77.system.entry.js +2 -0
- package/dist/cura/p-7c8f3c77.system.entry.js.map +1 -0
- package/dist/cura/p-8b18b5f7.system.js +2 -0
- package/dist/cura/p-8b18b5f7.system.js.map +1 -0
- package/dist/cura/p-91b0f78e.entry.js +2 -0
- package/dist/cura/p-91b0f78e.entry.js.map +1 -0
- package/dist/cura/p-a0395f90.entry.js +2 -0
- package/dist/cura/p-a0395f90.entry.js.map +1 -0
- package/dist/cura/p-a7ef255f.entry.js +2 -0
- package/dist/cura/p-a7ef255f.entry.js.map +1 -0
- package/dist/cura/p-c0c00396.system.js +3 -0
- package/dist/cura/p-c0c00396.system.js.map +1 -0
- package/dist/cura/p-ca054b07.system.entry.js +2 -0
- package/dist/cura/p-ca054b07.system.entry.js.map +1 -0
- package/dist/cura/p-d47b9cfe.system.entry.js +2 -0
- package/dist/cura/p-d47b9cfe.system.entry.js.map +1 -0
- package/dist/cura/p-f8fffdc1.js +2 -0
- package/dist/cura/p-f8fffdc1.js.map +1 -0
- package/dist/cura/p-fc77814b.system.entry.js +2 -0
- package/dist/cura/p-fc77814b.system.entry.js.map +1 -0
- package/dist/esm/{app-globals-cc003eaf.js → app-globals-29001758.js} +5 -5
- package/dist/esm/app-globals-29001758.js.map +1 -0
- package/dist/esm/cura-accordion_8.entry.js +441 -0
- package/dist/esm/cura-accordion_8.entry.js.map +1 -0
- package/dist/esm/cura-button-outline.entry.js +79 -0
- package/dist/esm/cura-button-outline.entry.js.map +1 -0
- package/dist/esm/cura-button-transparent.entry.js +79 -0
- package/dist/esm/cura-button-transparent.entry.js.map +1 -0
- package/dist/esm/cura-display.entry.js +70 -0
- package/dist/esm/cura-display.entry.js.map +1 -0
- package/dist/esm/cura-icons-view.entry.js +25 -0
- package/dist/esm/cura-icons-view.entry.js.map +1 -0
- package/dist/esm/cura-label.entry.js +65 -0
- package/dist/esm/cura-label.entry.js.map +1 -0
- package/dist/esm/cura.js +4 -4
- package/dist/esm/{index-9af0cdbd.js → index-d99da69e.js} +247 -3
- package/dist/esm/index-d99da69e.js.map +1 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +4 -4
- package/dist/esm-es5/app-globals-29001758.js +2 -0
- package/dist/esm-es5/app-globals-29001758.js.map +1 -0
- package/dist/esm-es5/cura-accordion_8.entry.js +2 -0
- package/dist/esm-es5/cura-accordion_8.entry.js.map +1 -0
- package/dist/esm-es5/cura-button-outline.entry.js +2 -0
- package/dist/esm-es5/cura-button-outline.entry.js.map +1 -0
- package/dist/esm-es5/cura-button-transparent.entry.js +2 -0
- package/dist/esm-es5/cura-button-transparent.entry.js.map +1 -0
- package/dist/esm-es5/cura-display.entry.js +2 -0
- package/dist/esm-es5/cura-display.entry.js.map +1 -0
- package/dist/esm-es5/cura-icons-view.entry.js +2 -0
- package/dist/esm-es5/cura-icons-view.entry.js.map +1 -0
- package/dist/esm-es5/cura-label.entry.js +2 -0
- package/dist/esm-es5/cura-label.entry.js.map +1 -0
- package/dist/esm-es5/cura.js +1 -1
- package/dist/esm-es5/cura.js.map +1 -1
- package/dist/esm-es5/index-d99da69e.js +3 -0
- package/dist/esm-es5/index-d99da69e.js.map +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/index.js.map +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/types/api/cura-api.type.d.ts +1 -0
- package/dist/types/components/buttons/cura-button/cura-button.d.ts +1 -1
- package/dist/types/components/buttons/cura-button-outline/cura-button-outline.d.ts +1 -1
- package/dist/types/components/buttons/cura-button-transparent/cura-button-transparent.d.ts +1 -1
- package/dist/types/components/forms/cura-label/cura-label.d.ts +54 -0
- package/dist/types/components/forms/cura-label/cura-label.stories.d.ts +126 -0
- package/dist/types/components/text/cura-display/cura-display.d.ts +29 -18
- package/dist/types/components/text/cura-display/cura-display.stories.d.ts +52 -14
- package/dist/types/components/text/cura-heading/cura-heading.d.ts +34 -17
- package/dist/types/components/text/cura-heading/cura-heading.stories.d.ts +58 -6
- package/dist/types/components/text/cura-paragraph/cura-paragraph.d.ts +24 -12
- package/dist/types/components/text/cura-paragraph/cura-paragraph.stories.d.ts +47 -9
- package/dist/types/components.d.ts +145 -52
- package/dist/types/index.d.ts +9 -0
- package/package.json +2 -4
- package/dist/cjs/app-globals-0e3b7fc6.js.map +0 -1
- package/dist/cjs/cura-accordion_12.cjs.entry.js +0 -674
- package/dist/cjs/cura-accordion_12.cjs.entry.js.map +0 -1
- package/dist/cjs/index-72217b50.js.map +0 -1
- package/dist/cura/p-2cbf52f1.js +0 -3
- package/dist/cura/p-2cbf52f1.js.map +0 -1
- package/dist/cura/p-4cdbc8a1.system.entry.js +0 -2
- package/dist/cura/p-4cdbc8a1.system.entry.js.map +0 -1
- package/dist/cura/p-50ea2036.system.js +0 -2
- package/dist/cura/p-50ea2036.system.js.map +0 -1
- package/dist/cura/p-788e035b.system.js +0 -2
- package/dist/cura/p-788e035b.system.js.map +0 -1
- package/dist/cura/p-8da635b7.system.js +0 -3
- package/dist/cura/p-8da635b7.system.js.map +0 -1
- package/dist/cura/p-c54ce246.entry.js +0 -2
- package/dist/cura/p-c54ce246.entry.js.map +0 -1
- package/dist/cura/p-d5c64a5f.js +0 -2
- package/dist/cura/p-d5c64a5f.js.map +0 -1
- package/dist/cura/p-f4232daa.system.js +0 -2
- package/dist/cura/p-f4232daa.system.js.map +0 -1
- package/dist/esm/app-globals-cc003eaf.js.map +0 -1
- package/dist/esm/cura-accordion_12.entry.js +0 -659
- package/dist/esm/cura-accordion_12.entry.js.map +0 -1
- package/dist/esm/index-9af0cdbd.js.map +0 -1
- package/dist/esm-es5/app-globals-cc003eaf.js +0 -2
- package/dist/esm-es5/app-globals-cc003eaf.js.map +0 -1
- package/dist/esm-es5/cura-accordion_12.entry.js +0 -2
- package/dist/esm-es5/cura-accordion_12.entry.js.map +0 -1
- package/dist/esm-es5/index-9af0cdbd.js +0 -3
- package/dist/esm-es5/index-9af0cdbd.js.map +0 -1
|
@@ -11,92 +11,87 @@
|
|
|
11
11
|
* Responsive media for large only.
|
|
12
12
|
* Use: @include large-only() { ... }
|
|
13
13
|
*/
|
|
14
|
-
/**
|
|
15
|
-
* Responsive media for large and up.
|
|
16
|
-
* Use: @include large-up() { ... }
|
|
17
|
-
*/
|
|
18
14
|
/**
|
|
19
15
|
* Responsive media for xlarge only.
|
|
20
16
|
* Use: @include xlarge-only() { ... }
|
|
21
17
|
*/
|
|
18
|
+
/**
|
|
19
|
+
* Responsive media for medium to large.
|
|
20
|
+
* Use: @include medium-large() { ... }
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* Responsive media for large and up.
|
|
24
|
+
* Use: @include large-up() { ... }
|
|
25
|
+
*/
|
|
22
26
|
:host {
|
|
23
27
|
display: block;
|
|
24
|
-
font-size: var(--font-size);
|
|
28
|
+
font-size: var(--font-size-base);
|
|
25
29
|
}
|
|
26
30
|
:host p {
|
|
27
31
|
font-family: var(--font-family);
|
|
28
|
-
font-size: var(--font-size);
|
|
32
|
+
font-size: var(--font-size-base);
|
|
29
33
|
font-weight: var(--font-weight-regular);
|
|
30
34
|
color: var(--color-body);
|
|
31
35
|
line-height: var(--line-height);
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
margin-block-end: var(--block-margin);
|
|
36
|
+
margin-block: var(--margin-block);
|
|
37
|
+
letter-spacing: 0.28px;
|
|
35
38
|
}
|
|
36
39
|
:host p.large {
|
|
37
|
-
font-size: 1.
|
|
40
|
+
font-size: 1.214em;
|
|
38
41
|
line-height: calc(var(--line-height) + 10%);
|
|
39
|
-
|
|
40
|
-
/* letter-spacing: normal; */
|
|
42
|
+
letter-spacing: 0px;
|
|
41
43
|
}
|
|
42
44
|
:host p.small {
|
|
43
45
|
font-size: 0.85em;
|
|
44
46
|
line-height: calc(var(--line-height) - 5%);
|
|
45
|
-
|
|
46
|
-
/* letter-spacing: 0.04em; */
|
|
47
|
+
letter-spacing: 0.48px;
|
|
47
48
|
}
|
|
48
|
-
:host p.caption {
|
|
49
|
-
font-size: 0.
|
|
49
|
+
:host p.caption, :host p.xsmall {
|
|
50
|
+
font-size: 0.714em;
|
|
50
51
|
line-height: calc(var(--line-height) - 5%);
|
|
51
|
-
|
|
52
|
-
/* letter-spacing: 0.06em; */
|
|
52
|
+
letter-spacing: 0.6px;
|
|
53
53
|
}
|
|
54
|
-
@media (min-width:
|
|
54
|
+
@media (min-width: 769px) and (max-width: 1920px) {
|
|
55
55
|
:host p {
|
|
56
|
-
font-size: 1.
|
|
56
|
+
font-size: 1.143em;
|
|
57
57
|
line-height: calc(var(--line-height) + 5%);
|
|
58
|
-
|
|
58
|
+
letter-spacing: 0.32px;
|
|
59
59
|
}
|
|
60
60
|
:host p.large {
|
|
61
|
-
font-size: 1.
|
|
61
|
+
font-size: 1.357em;
|
|
62
62
|
line-height: calc(var(--line-height) + 10%);
|
|
63
|
-
|
|
63
|
+
letter-spacing: 0px;
|
|
64
64
|
}
|
|
65
65
|
:host p.small {
|
|
66
66
|
font-size: 1em;
|
|
67
67
|
line-height: calc(var(--line-height) - 5%);
|
|
68
|
-
|
|
68
|
+
letter-spacing: 0.56px;
|
|
69
69
|
}
|
|
70
|
-
:host p.caption {
|
|
70
|
+
:host p.caption, :host p.xsmall {
|
|
71
71
|
font-size: 0.85em;
|
|
72
72
|
line-height: calc(var(--line-height) - 5%);
|
|
73
|
-
|
|
74
|
-
/* letter-spacing: 0.06em; */
|
|
73
|
+
letter-spacing: 0.72px;
|
|
75
74
|
}
|
|
76
75
|
}
|
|
77
|
-
@media (min-width:
|
|
76
|
+
@media (min-width: 1921px) {
|
|
78
77
|
:host p {
|
|
79
|
-
font-size: 1.
|
|
78
|
+
font-size: 1.429em;
|
|
80
79
|
line-height: calc(var(--line-height) + 10%);
|
|
81
|
-
|
|
82
|
-
/* letter-spacing: normal; */
|
|
80
|
+
letter-spacing: 0px;
|
|
83
81
|
}
|
|
84
82
|
:host p.large {
|
|
85
|
-
font-size: 1.
|
|
83
|
+
font-size: 1.714em;
|
|
86
84
|
line-height: calc(var(--line-height) + 20%);
|
|
87
|
-
/* line-height: 160%; */
|
|
88
85
|
}
|
|
89
86
|
:host p.small {
|
|
90
87
|
font-size: 1.21em;
|
|
91
88
|
line-height: calc(var(--line-height) + 5%);
|
|
92
|
-
|
|
93
|
-
/* letter-spacing: normal; */
|
|
89
|
+
letter-spacing: 0px;
|
|
94
90
|
}
|
|
95
|
-
:host p.caption {
|
|
91
|
+
:host p.caption, :host p.xsmall {
|
|
96
92
|
font-size: 1em;
|
|
97
93
|
line-height: calc(var(--line-height) + 5%);
|
|
98
|
-
|
|
99
|
-
/* letter-spacing: 0.02em; */
|
|
94
|
+
letter-spacing: 0.28px;
|
|
100
95
|
}
|
|
101
96
|
}
|
|
102
97
|
:host ::slotted(b), :host ::slotted(strong) {
|
|
@@ -107,6 +102,10 @@
|
|
|
107
102
|
color: var(--color-link);
|
|
108
103
|
text-underline-offset: 10%;
|
|
109
104
|
}
|
|
105
|
+
:host ::slotted(u) {
|
|
106
|
+
font-weight: var(--font-weight-medium);
|
|
107
|
+
text-underline-offset: 10%;
|
|
108
|
+
}
|
|
110
109
|
:host ::slotted(abbr) {
|
|
111
110
|
color: var(--color-link);
|
|
112
111
|
text-decoration: underline dashed 1px var(--color-link);
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { Host, h } from '@stencil/core';
|
|
2
2
|
export class CuraParagraph {
|
|
3
3
|
constructor() {
|
|
4
|
-
this.
|
|
5
|
-
this.
|
|
6
|
-
this.spotColor = '
|
|
4
|
+
this.theme = window.CuraAPI.theme;
|
|
5
|
+
this.size = 'medium';
|
|
6
|
+
this.spotColor = 'accent-dark';
|
|
7
7
|
this.color = undefined;
|
|
8
|
+
this.marginBlock = '1.25em';
|
|
9
|
+
this.lineHeight = '140%';
|
|
8
10
|
this.styles = {};
|
|
9
11
|
}
|
|
10
12
|
handleChangeColor() {
|
|
11
13
|
this.setColors();
|
|
12
14
|
}
|
|
13
15
|
connectedCallback() {
|
|
14
|
-
this.weights = window.CuraAPI.theme.fonts.getWeights();
|
|
15
16
|
this.setFontProperties();
|
|
16
17
|
this.setColors();
|
|
17
18
|
}
|
|
@@ -21,31 +22,30 @@ export class CuraParagraph {
|
|
|
21
22
|
return sizeclass;
|
|
22
23
|
}
|
|
23
24
|
setFontProperties() {
|
|
25
|
+
this.weights = this.theme.fonts.getWeights();
|
|
26
|
+
this.fontSizeBase = this.theme.fonts.getSize();
|
|
24
27
|
this.styles = {
|
|
25
|
-
'--font-family':
|
|
26
|
-
'--font-size': window.CuraAPI.theme.fonts.getSize(),
|
|
28
|
+
'--font-family': this.theme.fonts.getFamily('body'),
|
|
27
29
|
'--font-weight-regular': this.weights.regular,
|
|
28
30
|
'--font-weight-medium': this.weights.medium,
|
|
29
31
|
'--font-weight-bold': this.weights.bold
|
|
30
32
|
};
|
|
31
|
-
this.setHostProperty('--font-size', window.CuraAPI.theme.fonts.getSize());
|
|
32
|
-
this.setHostProperty('--block-margin', '1.25em');
|
|
33
|
-
this.setHostProperty('--line-height', '140%');
|
|
34
33
|
}
|
|
35
34
|
setColors() {
|
|
36
|
-
const fontColor = this.color
|
|
37
|
-
this.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
this.styles = Object.assign(Object.assign({}, this.styles), { '--color-body': fontColor || window.CuraAPI.theme.colors.getColor('neutral-darker'), '--color-link': this.inverted
|
|
41
|
-
? window.CuraAPI.theme.colors.getColor(`${this.spotColor}-lighter`)
|
|
42
|
-
: window.CuraAPI.theme.colors.getColor(`${this.spotColor}-dark`) });
|
|
35
|
+
const fontColor = this.color
|
|
36
|
+
? this.theme.colors.getColor(this.color)
|
|
37
|
+
: this.theme.fonts.getColor();
|
|
38
|
+
this.styles = Object.assign(Object.assign({}, this.styles), { '--color-body': fontColor || this.theme.colors.getColor('neutral-darker'), '--color-link': this.theme.colors.getColor(`${this.spotColor}`) });
|
|
43
39
|
}
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
hostCSSProperties() {
|
|
41
|
+
return {
|
|
42
|
+
'--margin-block': this.marginBlock,
|
|
43
|
+
'--font-size-base': this.fontSizeBase,
|
|
44
|
+
'--line-height': this.lineHeight
|
|
45
|
+
};
|
|
46
46
|
}
|
|
47
47
|
render() {
|
|
48
|
-
return (h(Host,
|
|
48
|
+
return (h(Host, { style: this.hostCSSProperties() }, h("p", { style: this.styles, class: this.setsizeClass() }, h("slot", null))));
|
|
49
49
|
}
|
|
50
50
|
static get is() { return "cura-paragraph"; }
|
|
51
51
|
static get encapsulation() { return "shadow"; }
|
|
@@ -65,39 +65,39 @@ export class CuraParagraph {
|
|
|
65
65
|
"type": "string",
|
|
66
66
|
"mutable": false,
|
|
67
67
|
"complexType": {
|
|
68
|
-
"original": "'regular' | 'large' | 'small' | 'caption'",
|
|
69
|
-
"resolved": "\"caption\" | \"large\" | \"regular\" | \"small\"",
|
|
68
|
+
"original": "'regular' | 'medium' | 'large' | 'small' | 'caption' | 'xsmall'",
|
|
69
|
+
"resolved": "\"caption\" | \"large\" | \"medium\" | \"regular\" | \"small\" | \"xsmall\"",
|
|
70
70
|
"references": {}
|
|
71
71
|
},
|
|
72
72
|
"required": false,
|
|
73
73
|
"optional": false,
|
|
74
74
|
"docs": {
|
|
75
75
|
"tags": [],
|
|
76
|
-
"text": "Set size of body text.\nValues: regular (default) | large | small | caption."
|
|
76
|
+
"text": "Set size of body text.\nValues: regular (deprecated), medium (default) | large | small | caption (deprecated) | xsmall."
|
|
77
77
|
},
|
|
78
78
|
"attribute": "size",
|
|
79
79
|
"reflect": true,
|
|
80
|
-
"defaultValue": "'
|
|
80
|
+
"defaultValue": "'medium'"
|
|
81
81
|
},
|
|
82
|
-
"
|
|
83
|
-
"type": "
|
|
82
|
+
"spotColor": {
|
|
83
|
+
"type": "string",
|
|
84
84
|
"mutable": false,
|
|
85
85
|
"complexType": {
|
|
86
|
-
"original": "
|
|
87
|
-
"resolved": "
|
|
86
|
+
"original": "string",
|
|
87
|
+
"resolved": "string",
|
|
88
88
|
"references": {}
|
|
89
89
|
},
|
|
90
90
|
"required": false,
|
|
91
91
|
"optional": false,
|
|
92
92
|
"docs": {
|
|
93
93
|
"tags": [],
|
|
94
|
-
"text": "Apply
|
|
94
|
+
"text": "Apply design system color to interactive elements like <a> and <abbr> inside the text.\nValues: Color from design system scheme. Default to 'accent-dark'."
|
|
95
95
|
},
|
|
96
|
-
"attribute": "
|
|
96
|
+
"attribute": "spot-color",
|
|
97
97
|
"reflect": true,
|
|
98
|
-
"defaultValue": "
|
|
98
|
+
"defaultValue": "'accent-dark'"
|
|
99
99
|
},
|
|
100
|
-
"
|
|
100
|
+
"color": {
|
|
101
101
|
"type": "string",
|
|
102
102
|
"mutable": false,
|
|
103
103
|
"complexType": {
|
|
@@ -109,28 +109,46 @@ export class CuraParagraph {
|
|
|
109
109
|
"optional": false,
|
|
110
110
|
"docs": {
|
|
111
111
|
"tags": [],
|
|
112
|
-
"text": "
|
|
112
|
+
"text": "Text color.\nValues: Color from design system scheme. Default to the font color from the theme."
|
|
113
113
|
},
|
|
114
|
-
"attribute": "
|
|
114
|
+
"attribute": "color",
|
|
115
|
+
"reflect": false
|
|
116
|
+
},
|
|
117
|
+
"marginBlock": {
|
|
118
|
+
"type": "string",
|
|
119
|
+
"mutable": false,
|
|
120
|
+
"complexType": {
|
|
121
|
+
"original": "string",
|
|
122
|
+
"resolved": "string",
|
|
123
|
+
"references": {}
|
|
124
|
+
},
|
|
125
|
+
"required": false,
|
|
126
|
+
"optional": false,
|
|
127
|
+
"docs": {
|
|
128
|
+
"tags": [],
|
|
129
|
+
"text": "CSS margin-block property values.\nDefault to 1.25em"
|
|
130
|
+
},
|
|
131
|
+
"attribute": "margin-block",
|
|
115
132
|
"reflect": true,
|
|
116
|
-
"defaultValue": "'
|
|
133
|
+
"defaultValue": "'1.25em'"
|
|
117
134
|
},
|
|
118
|
-
"
|
|
119
|
-
"type": "
|
|
135
|
+
"lineHeight": {
|
|
136
|
+
"type": "string",
|
|
120
137
|
"mutable": false,
|
|
121
138
|
"complexType": {
|
|
122
|
-
"original": "
|
|
123
|
-
"resolved": "
|
|
139
|
+
"original": "string",
|
|
140
|
+
"resolved": "string",
|
|
124
141
|
"references": {}
|
|
125
142
|
},
|
|
126
143
|
"required": false,
|
|
127
144
|
"optional": false,
|
|
128
145
|
"docs": {
|
|
129
146
|
"tags": [],
|
|
130
|
-
"text": "
|
|
147
|
+
"text": "CSS line-height property values.\nDefault to 140%"
|
|
131
148
|
},
|
|
132
|
-
"attribute": "
|
|
133
|
-
"reflect":
|
|
149
|
+
"attribute": "line-height",
|
|
150
|
+
"reflect": true,
|
|
151
|
+
"defaultValue": "'140%'"
|
|
134
152
|
}
|
|
135
153
|
};
|
|
136
154
|
}
|
|
@@ -144,6 +162,9 @@ export class CuraParagraph {
|
|
|
144
162
|
return [{
|
|
145
163
|
"propName": "color",
|
|
146
164
|
"methodName": "handleChangeColor"
|
|
165
|
+
}, {
|
|
166
|
+
"propName": "spotColor",
|
|
167
|
+
"methodName": "handleChangeColor"
|
|
147
168
|
}];
|
|
148
169
|
}
|
|
149
170
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cura-paragraph.js","sourceRoot":"","sources":["../../../../src/components/text/cura-paragraph/cura-paragraph.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAOhF,MAAM,OAAO,aAAa;;
|
|
1
|
+
{"version":3,"file":"cura-paragraph.js","sourceRoot":"","sources":["../../../../src/components/text/cura-paragraph/cura-paragraph.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAOhF,MAAM,OAAO,aAAa;;IAgDxB,UAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;gBA1CkE,QAAQ;qBAMpE,aAAa;;uBAiBX,QAAQ;sBAMT,MAAM;kBAYxB,EAAE;;EA1BpB,iBAAiB;IACf,IAAI,CAAC,SAAS,EAAE,CAAC;EACnB,CAAC;EA2BD,iBAAiB;IACf,IAAI,CAAC,iBAAiB,EAAE,CAAC;IACzB,IAAI,CAAC,SAAS,EAAE,CAAC;EACnB,CAAC;EAED,YAAY;IACV,MAAM,SAAS,GAAG,EAAE,CAAC;IACrB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,GAAG,IAAI,CAAC;IAC1C,OAAO,SAAS,CAAC;EACnB,CAAC;EAED,iBAAiB;IACf,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;IAC7C,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;IAC/C,IAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Host, Prop, h, Element, Watch, State } from '@stencil/core';\n\n@Component({\n tag: 'cura-paragraph',\n styleUrl: 'cura-paragraph.scss',\n shadow: true,\n})\nexport class CuraParagraph {\n\n /**\n * Set size of body text.\n * Values: regular (deprecated), medium (default) | large | small | caption (deprecated) | xsmall.\n */\n @Prop({reflect: true}) size: 'regular' | 'medium' | 'large' | 'small' | 'caption' | 'xsmall' = 'medium';\n\n /**\n * Apply design system color to interactive elements like <a> and <abbr> inside the text.\n * Values: Color from design system scheme. Default to 'accent-dark'.\n */\n @Prop({reflect: true}) spotColor = 'accent-dark';\n\n /**\n * Text color.\n * Values: Color from design system scheme. Default to the font color from the theme.\n */\n @Prop() color: string;\n @Watch('color')\n @Watch('spotColor')\n handleChangeColor() {\n this.setColors();\n }\n\n /**\n * CSS margin-block property values.\n * Default to 1.25em\n */\n @Prop({reflect: true}) marginBlock = '1.25em';\n\n /**\n * CSS line-height property values.\n * Default to 140%\n */\n @Prop({reflect: true}) lineHeight = '140%';\n\n /**\n * Host element <cura-paragraph>\n */\n @Element() host: HTMLElement;\n\n /**\n * Internal Props\n */\n weights: any;\n fontSizeBase: string;\n @State() styles = {};\n theme = window.CuraAPI.theme;\n\n connectedCallback() {\n this.setFontProperties();\n this.setColors();\n }\n\n setsizeClass() {\n const sizeclass = {};\n sizeclass[this.size.toLowerCase()] = true;\n return sizeclass;\n }\n\n setFontProperties() {\n this.weights = this.theme.fonts.getWeights();\n this.fontSizeBase = this.theme.fonts.getSize();\n this.styles = {\n '--font-family': this.theme.fonts.getFamily('body'),\n '--font-weight-regular': this.weights.regular,\n '--font-weight-medium': this.weights.medium,\n '--font-weight-bold': this.weights.bold\n };\n }\n\n setColors() {\n const fontColor = this.color\n ? this.theme.colors.getColor(this.color)\n : this.theme.fonts.getColor();\n this.styles = {\n ...this.styles,\n '--color-body': fontColor || this.theme.colors.getColor('neutral-darker'),\n '--color-link': this.theme.colors.getColor(`${this.spotColor}`)\n };\n }\n\n hostCSSProperties() {\n return {\n '--margin-block': this.marginBlock,\n '--font-size-base': this.fontSizeBase,\n '--line-height': this.lineHeight\n };\n }\n\n render() {\n return (\n <Host style={this.hostCSSProperties()}>\n <p style={this.styles} class={this.setsizeClass()}>\n <slot></slot>\n </p>\n </Host>\n );\n }\n\n}\n"]}
|
|
@@ -10,85 +10,117 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
}
|
|
11
11
|
return t;
|
|
12
12
|
};
|
|
13
|
+
import { getColorsWithDepths } from "../../../utils/utils";
|
|
14
|
+
const colors = getColorsWithDepths();
|
|
15
|
+
const renderCuraParagraph = (label, args) => {
|
|
16
|
+
const styles = args.cssMarginBlock || args.cssLineHeight ? `<style>
|
|
17
|
+
cura-paragraph { ${args.cssMarginBlock ? `
|
|
18
|
+
--margin-block: ${args.cssMarginBlock} !important;` : ``}${args.cssLineHeight ? `
|
|
19
|
+
--line-height: ${args.cssLineHeight} !important;` : ``}
|
|
20
|
+
}
|
|
21
|
+
</style>
|
|
22
|
+
|
|
23
|
+
` : '';
|
|
24
|
+
const block = `<cura-paragraph${args.size && (args.size !== 'medium' && args.size !== 'regular') ? `
|
|
25
|
+
size="${args.size}"` : ``}${args.color ? `
|
|
26
|
+
color="${args.color}"` : ''}${args.spotColor ? `
|
|
27
|
+
spot-color="${args.spotColor}"` : ''}${args.marginBlock ? `
|
|
28
|
+
margin-block="${args.marginBlock}"` : ''}${args.lineHeight ? `
|
|
29
|
+
line-height="${args.lineHeight}"` : ''}>
|
|
30
|
+
${label}
|
|
31
|
+
</cura-paragraph>
|
|
32
|
+
`;
|
|
33
|
+
return `${styles}${block}${block}${block}`;
|
|
34
|
+
};
|
|
13
35
|
export default {
|
|
14
|
-
title: '
|
|
36
|
+
title: 'Componentes/Text/Paragraph',
|
|
15
37
|
tags: ['autodocs'],
|
|
16
38
|
render: (_a) => {
|
|
17
39
|
var { label } = _a, args = __rest(_a, ["label"]);
|
|
18
|
-
|
|
19
|
-
// return `<div>${label}</div>`;
|
|
20
|
-
return `<cura-paragraph
|
|
21
|
-
spot-color="${args.spotColor}"
|
|
22
|
-
size="${args.size}"
|
|
23
|
-
inverted="${args.inverted}"
|
|
24
|
-
color="${args.color}">
|
|
25
|
-
${label}
|
|
26
|
-
</cura-paragraph>
|
|
27
|
-
<cura-paragraph
|
|
28
|
-
spot-color="${args.spotColor}"
|
|
29
|
-
size="${args.size}"
|
|
30
|
-
inverted="${args.inverted}"
|
|
31
|
-
color="${args.color}">
|
|
32
|
-
${label}
|
|
33
|
-
</cura-paragraph>
|
|
34
|
-
<cura-paragraph
|
|
35
|
-
spot-color="${args.spotColor}"
|
|
36
|
-
size="${args.size}"
|
|
37
|
-
inverted="${args.inverted}"
|
|
38
|
-
color="${args.color}">
|
|
39
|
-
${label}
|
|
40
|
-
</cura-paragraph>`;
|
|
40
|
+
return renderCuraParagraph(label, args);
|
|
41
41
|
},
|
|
42
42
|
argTypes: {
|
|
43
43
|
label: {
|
|
44
44
|
control: 'text',
|
|
45
|
-
description: '
|
|
45
|
+
description: 'Define o texto do componente diretamente. São válidas todas as tags HTML pertinentes ao `<p>`.',
|
|
46
46
|
name: 'Content'
|
|
47
47
|
},
|
|
48
|
-
|
|
49
|
-
control: '
|
|
50
|
-
|
|
48
|
+
size: {
|
|
49
|
+
control: { type: 'select' },
|
|
50
|
+
options: ['xsmall', 'small', 'medium', 'large'],
|
|
51
|
+
description: 'Define o tamanho do bloco de texto considerando `caption` (depreciado, use xsmall), `xsmall`, `small`, `regular` (depreciado, use medium), `medium` e `large` como valores válidos.',
|
|
51
52
|
table: {
|
|
52
53
|
category: 'Properties',
|
|
53
|
-
defaultValue: { summary: '
|
|
54
|
+
defaultValue: { summary: 'medium' }
|
|
54
55
|
}
|
|
55
56
|
},
|
|
56
|
-
|
|
57
|
+
color: {
|
|
57
58
|
control: { type: 'select' },
|
|
58
|
-
options: ['
|
|
59
|
-
description: '
|
|
59
|
+
options: ['', ...colors],
|
|
60
|
+
description: 'Define a cor de texto do bloco. Aceita qualquer valor do esquema de cores do design system.',
|
|
60
61
|
table: {
|
|
61
62
|
category: 'Properties',
|
|
62
|
-
defaultValue: { summary: '
|
|
63
|
+
defaultValue: { summary: 'Cor de texto padrão do tema' }
|
|
63
64
|
}
|
|
64
65
|
},
|
|
65
66
|
spotColor: {
|
|
66
67
|
control: { type: 'select' },
|
|
67
|
-
options: ['
|
|
68
|
-
description: '
|
|
68
|
+
options: ['', ...colors],
|
|
69
|
+
description: 'Define a cor dos itens de interação dentro do bloco de texto como as tags `<a>`. Aceita qualquer valor do esquema de cores do design system.',
|
|
70
|
+
name: 'spot-color',
|
|
69
71
|
table: {
|
|
70
72
|
category: 'Properties',
|
|
71
|
-
defaultValue: { summary: '
|
|
73
|
+
defaultValue: { summary: 'accent-dark' }
|
|
72
74
|
}
|
|
73
75
|
},
|
|
74
|
-
|
|
75
|
-
control:
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
marginBlock: {
|
|
77
|
+
control: 'text',
|
|
78
|
+
description: 'Define o tamanho do espaçamento superior e inferior do bloco. Valores válidos para a propriedade CSS `margin-block`.',
|
|
79
|
+
name: 'margin-block',
|
|
78
80
|
table: {
|
|
79
81
|
category: 'Properties',
|
|
80
|
-
defaultValue: { summary: '
|
|
82
|
+
defaultValue: { summary: '1.25em' }
|
|
81
83
|
}
|
|
82
|
-
}
|
|
84
|
+
},
|
|
85
|
+
lineHeight: {
|
|
86
|
+
control: 'text',
|
|
87
|
+
description: 'Define a altura de linha base a ser considerada pelo componente em sua responsividade. Valores válidos para a propriedade CSS `line-height`.',
|
|
88
|
+
name: 'line-height',
|
|
89
|
+
table: {
|
|
90
|
+
category: 'Properties',
|
|
91
|
+
defaultValue: { summary: '140%' }
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
cssMarginBlock: {
|
|
95
|
+
control: 'text',
|
|
96
|
+
description: 'Permite a definição da propriedade `margin-block` por folhas de estilo. É necessário o uso do `!important` conforme o exemplo de código.',
|
|
97
|
+
name: '--margin-block',
|
|
98
|
+
table: {
|
|
99
|
+
category: 'CSS Properties',
|
|
100
|
+
defaultValue: { summary: '1.25em' }
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
cssLineHeight: {
|
|
104
|
+
control: 'text',
|
|
105
|
+
description: 'Permite a definição da propriedade `line-height` por folhas de estilo. É necessário o uso do `!important` conforme o exemplo de código.',
|
|
106
|
+
name: '--line-height',
|
|
107
|
+
table: {
|
|
108
|
+
category: 'CSS Properties',
|
|
109
|
+
defaultValue: { summary: '140%' }
|
|
110
|
+
}
|
|
111
|
+
},
|
|
83
112
|
},
|
|
84
113
|
};
|
|
85
114
|
export const Paragraph = {
|
|
86
115
|
args: {
|
|
87
|
-
label: 'Proin quis <b>turpis</b> et <strong>turpis</strong> efficitur dictum. Suspendisse <i>egestas</i> posuere libero. Sed non dapibus urna. Sed <a href="https://www.rededorsaoluiz.com.br" target="_blank">luctus tincidunt nibh</a>, eu tincidunt justo.
|
|
88
|
-
size: '
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
116
|
+
label: 'Proin quis <b>turpis</b> et <strong>turpis</strong> efficitur dictum. Suspendisse <i>egestas</i> posuere libero. Sed non dapibus urna. Sed <a href="https://www.rededorsaoluiz.com.br" target="_blank">luctus tincidunt nibh</a>, eu tincidunt justo. Curabitur at ullamcorper mauris, feugiat fermentum nulla. <u>Quisque sed nibh in odio blandit mollis at quis dolor</u>. Sed urna lacus, ultricies ac vulputate at, luctus eu ex. Duis at elit facilisis, iaculis orci sed, suscipit nisl. Phasellus semper lorem sed tincidunt semper. Morbi lobortis eu mi sed ultricies. Sed consequat id orci at iaculis.',
|
|
117
|
+
size: 'medium',
|
|
118
|
+
color: '',
|
|
119
|
+
spotColor: '',
|
|
120
|
+
marginBlock: '',
|
|
121
|
+
lineHeight: '',
|
|
122
|
+
cssMarginBlock: '',
|
|
123
|
+
cssLineHeight: ''
|
|
92
124
|
},
|
|
93
125
|
};
|
|
94
126
|
//# sourceMappingURL=cura-paragraph.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cura-paragraph.stories.js","sourceRoot":"","sources":["../../../../src/components/text/cura-paragraph/cura-paragraph.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"cura-paragraph.stories.js","sourceRoot":"","sources":["../../../../src/components/text/cura-paragraph/cura-paragraph.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,MAAM,MAAM,GAAG,mBAAmB,EAAE,CAAC;AAErC,MAAM,mBAAmB,GAAG,CAAC,KAAa,EAAE,IAAS,EAAE,EAAE;EACvD,MAAM,MAAM,GAAG,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;qBACxC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;sBACrB,IAAI,CAAC,cAAc,cAAc,CAAC,CAAC,CAAC,EAAE,GAAI,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;qBAChE,IAAI,CAAC,aAAa,cAAc,CAAC,CAAC,CAAC,EAAE;;;;CAIzD,CAAC,CAAC,CAAC,EAAE,CAAC;EACL,MAAM,KAAK,GAAG,kBAAkB,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC;UAC3F,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;WAChC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;gBACjC,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,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AE;IAClB,aAAa,EAAE,EAAE;GAClB;CACF,CAAC","sourcesContent":["import { getColorsWithDepths } from \"../../../utils/utils\";\n\nconst colors = getColorsWithDepths();\n\nconst renderCuraParagraph = (label: string, args: any) => {\n const styles = args.cssMarginBlock || args.cssLineHeight ? `<style>\n cura-paragraph { ${args.cssMarginBlock ? `\n --margin-block: ${args.cssMarginBlock} !important;` : ``}${ args.cssLineHeight ? `\n --line-height: ${args.cssLineHeight} !important;` : ``}\n }\n</style>\n\n` : '';\n const block = `<cura-paragraph${args.size && (args.size !== 'medium' && args.size !== 'regular') ? `\n size=\"${args.size}\"` : ``}${args.color ? `\n color=\"${args.color}\"` : ''}${args.spotColor ? `\n spot-color=\"${args.spotColor}\"` : ''}${args.marginBlock ? `\n margin-block=\"${args.marginBlock}\"` : ''}${args.lineHeight ? `\n line-height=\"${args.lineHeight}\"` : ''}>\n ${label}\n</cura-paragraph>\n`;\n return `${styles}${block}${block}${block}`;\n}\n\nexport default {\n title: 'Componentes/Text/Paragraph',\n tags: ['autodocs'],\n render: ({ label, ...args }) => {\n return renderCuraParagraph(label, args);\n },\n argTypes: {\n label: {\n control: 'text',\n description: 'Define o texto do componente diretamente. São válidas todas as tags HTML pertinentes ao `<p>`.',\n name: 'Content'\n },\n size: {\n control: { type: 'select' },\n options: ['xsmall', 'small', 'medium', 'large'],\n description: 'Define o tamanho do bloco de texto considerando `caption` (depreciado, use xsmall), `xsmall`, `small`, `regular` (depreciado, use medium), `medium` e `large` como valores válidos.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'medium'}\n }\n },\n color: {\n control: { type: 'select' },\n options: ['', ...colors],\n description: 'Define a cor de texto do bloco. Aceita qualquer valor do esquema de cores do design system.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'Cor de texto padrão do tema'}\n }\n },\n spotColor: {\n control: { type: 'select' },\n options: ['', ...colors],\n description: 'Define a cor dos itens de interação dentro do bloco de texto como as tags `<a>`. Aceita qualquer valor do esquema de cores do design system.',\n name: 'spot-color',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'accent-dark'}\n }\n },\n marginBlock: {\n control: 'text',\n description: 'Define o tamanho do espaçamento superior e inferior do bloco. Valores válidos para a propriedade CSS `margin-block`.',\n name: 'margin-block',\n table: {\n category: 'Properties',\n defaultValue: { summary: '1.25em'}\n }\n },\n lineHeight: {\n control: 'text',\n description: 'Define a altura de linha base a ser considerada pelo componente em sua responsividade. Valores válidos para a propriedade CSS `line-height`.',\n name: 'line-height',\n table: {\n category: 'Properties',\n defaultValue: { summary: '140%'}\n }\n },\n cssMarginBlock: {\n control: 'text',\n description: 'Permite a definição da propriedade `margin-block` por folhas de estilo. É necessário o uso do `!important` conforme o exemplo de código.',\n name: '--margin-block',\n table: {\n category: 'CSS Properties',\n defaultValue: { summary: '1.25em'}\n }\n },\n cssLineHeight: {\n control: 'text',\n description: 'Permite a definição da propriedade `line-height` por folhas de estilo. É necessário o uso do `!important` conforme o exemplo de código.',\n name: '--line-height',\n table: {\n category: 'CSS Properties',\n defaultValue: { summary: '140%'}\n }\n },\n },\n};\n\nexport const Paragraph = {\n args: {\n label: 'Proin quis <b>turpis</b> et <strong>turpis</strong> efficitur dictum. Suspendisse <i>egestas</i> posuere libero. Sed non dapibus urna. Sed <a href=\"https://www.rededorsaoluiz.com.br\" target=\"_blank\">luctus tincidunt nibh</a>, eu tincidunt justo. Curabitur at ullamcorper mauris, feugiat fermentum nulla. <u>Quisque sed nibh in odio blandit mollis at quis dolor</u>. Sed urna lacus, ultricies ac vulputate at, luctus eu ex. Duis at elit facilisis, iaculis orci sed, suscipit nisl. Phasellus semper lorem sed tincidunt semper. Morbi lobortis eu mi sed ultricies. Sed consequat id orci at iaculis.',\n size: 'medium',\n color: '',\n spotColor: '',\n marginBlock: '',\n lineHeight: '',\n cssMarginBlock: '',\n cssLineHeight: ''\n },\n};\n"]}
|
package/dist/collection/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"","sourcesContent":["export { Components, JSX } from './components';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAWA,MAAM,UAAU,QAAQ,CAAC,OAAmB,EAAE,CAAC,GAAG,MAAM;EACtD,CAAC,CAAC,QAAQ,GAAG,OAAO,CAAC;AACvB,CAAC","sourcesContent":["export { Components, JSX } from './components';\nimport CuraAPI from './api/cura-api';\nimport { CuraConfig } from './api/cura-api.type';\n\ndeclare global {\n export interface Window {\n CuraAPI?: CuraAPI,\n CuraInit?: CuraConfig\n }\n}\n\nexport function CuraInit(options: CuraConfig, w = window) {\n w.CuraInit = options;\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { d as defineCustomElement$2 } from './cura-icon2.js';
|
|
3
3
|
|
|
4
|
-
const curaAccordionItemCss = ":host{display:block}:host .accordion-item{width:100%}:host .accordion-item .label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .accordion-item .label::before{content:\"\";display:block;border-top:solid 1px var(--neutral-base);width:100%}:host .accordion-item .label .label-container{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;gap:calc(var(--base-spacing) * 2px);min-height:40px;word-break:break-word;cursor:pointer;font-size:1.14em;font-weight:var(--font-weight-regular);color:var(--color-base);padding:0px}:host .accordion-item .label .label-container cura-icon{margin-right:4px}:host .accordion-item .label .label-container:hover{color:var(--color-light)}:host .accordion-item .label .label-container:hover cura-icon{--color:var(--icon-color-light) !important}:host .accordion-item .label .label-container:active{color:var(--color-dark)}:host .accordion-item .label .label-container:active cura-icon{--color:var(--icon-color-dark) !important}:host .accordion-item .content{font-size:1em;overflow:hidden;max-height:0;-webkit-transition:max-height 0.25s ease;transition:max-height 0.25s ease}:host .accordion-item .content .content-wrapper{padding:calc(var(--base-spacing) * 2px) 0px;border-top:solid 1px var(--neutral-base)}:host .accordion-item.active .label .label-container{color:var(--color-active-base)}:host .accordion-item.active .label .label-container:hover{color:var(--color-active-light)}:host .accordion-item.active .label .label-container:hover cura-icon{--color:var(--icon-color-active-light) !important}:host .accordion-item.active .label .label-container:active{color:var(--color-active-dark)}:host .accordion-item.active .label .label-container:active cura-icon{--color:var(--icon-color-active-dark) !important}:host .accordion-item.active .content{max-height:200vh;overflow-y:auto;-webkit-transition:max-height 0.5s ease 0.14s;transition:max-height 0.5s ease 0.14s}:host .accordion-item.inverted .label .label-container{color:var(--neutral-lighter)}:host .accordion-item.inverted .label .label-container:hover{color:var(--color-lighter)}:host .accordion-item.inverted .label .label-container:hover cura-icon{--color:var(--icon-color-lighter) !important}:host .accordion-item.inverted .label .label-container:active{color:var(--color-light)}:host .accordion-item.inverted .label .label-container:active cura-icon{--color:var(--icon-color-light) !important}:host .accordion-item.active.inverted .label .label-container{color:var(--neutral-purewhite)}:host .accordion-item.active.inverted .label .label-container:hover{color:var(--color-active-lighter)}:host .accordion-item.active.inverted .label .label-container:hover cura-icon{--color:var(--icon-color-active-lighter) !important}:host .accordion-item.active.inverted .label .label-container:active{color:var(--color-active-light)}:host .accordion-item.active.inverted .label .label-container:active cura-icon{--color:var(--icon-color-active-light) !important}@media (min-width:
|
|
4
|
+
const curaAccordionItemCss = ":host{display:block}:host .accordion-item{width:100%}:host .accordion-item .label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .accordion-item .label::before{content:\"\";display:block;border-top:solid 1px var(--neutral-base);width:100%}:host .accordion-item .label .label-container{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;gap:calc(var(--base-spacing) * 2px);min-height:40px;word-break:break-word;cursor:pointer;font-size:1.14em;font-weight:var(--font-weight-regular);color:var(--color-base);padding:0px}:host .accordion-item .label .label-container cura-icon{margin-right:4px}:host .accordion-item .label .label-container:hover{color:var(--color-light)}:host .accordion-item .label .label-container:hover cura-icon{--color:var(--icon-color-light) !important}:host .accordion-item .label .label-container:active{color:var(--color-dark)}:host .accordion-item .label .label-container:active cura-icon{--color:var(--icon-color-dark) !important}:host .accordion-item .content{font-size:1em;overflow:hidden;max-height:0;-webkit-transition:max-height 0.25s ease;transition:max-height 0.25s ease}:host .accordion-item .content .content-wrapper{padding:calc(var(--base-spacing) * 2px) 0px;border-top:solid 1px var(--neutral-base)}:host .accordion-item.active .label .label-container{color:var(--color-active-base)}:host .accordion-item.active .label .label-container:hover{color:var(--color-active-light)}:host .accordion-item.active .label .label-container:hover cura-icon{--color:var(--icon-color-active-light) !important}:host .accordion-item.active .label .label-container:active{color:var(--color-active-dark)}:host .accordion-item.active .label .label-container:active cura-icon{--color:var(--icon-color-active-dark) !important}:host .accordion-item.active .content{max-height:200vh;overflow-y:auto;-webkit-transition:max-height 0.5s ease 0.14s;transition:max-height 0.5s ease 0.14s}:host .accordion-item.inverted .label .label-container{color:var(--neutral-lighter)}:host .accordion-item.inverted .label .label-container:hover{color:var(--color-lighter)}:host .accordion-item.inverted .label .label-container:hover cura-icon{--color:var(--icon-color-lighter) !important}:host .accordion-item.inverted .label .label-container:active{color:var(--color-light)}:host .accordion-item.inverted .label .label-container:active cura-icon{--color:var(--icon-color-light) !important}:host .accordion-item.active.inverted .label .label-container{color:var(--neutral-purewhite)}:host .accordion-item.active.inverted .label .label-container:hover{color:var(--color-active-lighter)}:host .accordion-item.active.inverted .label .label-container:hover cura-icon{--color:var(--icon-color-active-lighter) !important}:host .accordion-item.active.inverted .label .label-container:active{color:var(--color-active-light)}:host .accordion-item.active.inverted .label .label-container:active cura-icon{--color:var(--icon-color-active-light) !important}@media (min-width: 769px) and (max-width: 992px){:host .accordion-item .label .label-container{font-size:1.29em}:host .accordion-item .content{font-size:1.14em}}@media (min-width: 993px){:host .accordion-item .label .label-container{font-size:1.29em}:host .accordion-item .content{font-size:1.14em}}";
|
|
5
5
|
|
|
6
6
|
const CuraAccordionItem$1 = /*@__PURE__*/ proxyCustomElement(class CuraAccordionItem extends HTMLElement {
|
|
7
7
|
constructor() {
|