@italia/card 1.0.0-alpha.8 → 1.0.0-beta.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.
@@ -8,4 +8,6 @@ export declare const CARD_SHADOWS: readonly ["none", "sm", "md", "lg"];
8
8
  export type CardShadow = (typeof CARD_SHADOWS)[number];
9
9
  export declare const CARD_HEADING_LEVELS: readonly ["h1", "h2", "h3", "h4", "h5", "h6"];
10
10
  export type CardHeadingLevel = (typeof CARD_HEADING_LEVELS)[number];
11
+ export declare const CARD_HEADING_SIZES: readonly ["sm", "md"];
12
+ export type CardHeadingSize = (typeof CARD_HEADING_SIZES)[number];
11
13
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,uNAahB,CAAC;AACX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,eAAO,MAAM,kBAAkB,mEAAoE,CAAC;AACpG,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAElE,eAAO,MAAM,iBAAiB,yCAA0C,CAAC;AACzE,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhE,eAAO,MAAM,YAAY,qCAAsC,CAAC;AAChE,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvD,eAAO,MAAM,mBAAmB,+CAAgD,CAAC;AACjF,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,uNAahB,CAAC;AACX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,eAAO,MAAM,kBAAkB,mEAAoE,CAAC;AACpG,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAElE,eAAO,MAAM,iBAAiB,yCAA0C,CAAC;AACzE,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhE,eAAO,MAAM,YAAY,qCAAsC,CAAC;AAChE,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvD,eAAO,MAAM,mBAAmB,+CAAgD,CAAC;AACjF,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE,eAAO,MAAM,kBAAkB,uBAAwB,CAAC;AACxD,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@italia/card",
3
3
  "description": "Web component it-card del Design system .italia",
4
- "version": "1.0.0-alpha.8",
4
+ "version": "1.0.0-beta.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -34,9 +34,9 @@
34
34
  "custom-elements.json"
35
35
  ],
36
36
  "dependencies": {
37
- "bootstrap-italia": "github:italia/bootstrap-italia#8c67506065fb844becbec9cc74f2d11de7101404",
37
+ "bootstrap-italia": "3.0.0-beta.1",
38
38
  "lit": "^3.3.0",
39
- "@italia/globals": "^1.0.0-alpha.8"
39
+ "@italia/globals": "^1.0.0-beta.0"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@custom-elements-manifest/analyzer": "^0.10.3",
@@ -51,8 +51,8 @@
51
51
  "sass": "^1.89.0",
52
52
  "tslib": "^2.6.3",
53
53
  "typescript": "^5.5.3",
54
- "@italia/test-config": "^0.0.0",
55
- "@italia/typescript-config": "^0.0.0"
54
+ "@italia/test-config": "^1.0.0-beta.0",
55
+ "@italia/typescript-config": "^1.0.0-beta.0"
56
56
  },
57
57
  "customElements": "custom-elements.json",
58
58
  "scripts": {
package/styles/_fouc.scss CHANGED
@@ -1,12 +1,26 @@
1
+ @use 'bootstrap-italia/src/scss/base/config' as *;
2
+
1
3
  it-card:not(:defined) {
4
+ position: relative;
2
5
  display: flex;
3
6
  flex-wrap: wrap;
4
7
  justify-content: space-between;
8
+ padding: var(--#{$prefix}spacing-s) var(--#{$prefix}spacing-s);
9
+ border: var(--#{$prefix}border-base) var(--#{$prefix}border-style) var(--#{$prefix}border-color);
5
10
  column-gap: 1em;
6
11
 
7
12
  [slot='image'] {
8
- width: 100%;
9
- order: -1;
13
+ &:not(it-avatar):not(it-icon):not(.it-card-profile-image-icon-wrapper) {
14
+ width: 100%;
15
+ order: -1;
16
+ }
17
+ }
18
+
19
+ it-avatar[slot='image'],
20
+ .it-card-profile-image-icon-wrapper {
21
+ position: absolute;
22
+ top: var(--#{$prefix}spacing-s);
23
+ right: var(--#{$prefix}spacing-s);
10
24
  }
11
25
 
12
26
  &:not([ratio]),
@@ -28,6 +42,41 @@ it-card:not(:defined) {
28
42
  aspect-ratio: 1 / 1;
29
43
  }
30
44
 
45
+ &[variant='banner'] {
46
+ it-icon[slot='image'] {
47
+ order: -1;
48
+ margin-right: auto;
49
+ margin-left: auto;
50
+ }
51
+ }
52
+
53
+ &[variant^='inline-banner'] {
54
+ * {
55
+ margin-left: calc(var(--#{$prefix}spacing-xl) + 2 * var(--#{$prefix}spacing-s));
56
+ }
57
+
58
+ it-icon[slot='image'] {
59
+ position: absolute;
60
+ top: var(--#{$prefix}spacing-s);
61
+ left: var(--#{$prefix}spacing-s);
62
+ margin-left: 0;
63
+ }
64
+
65
+ &[variant$='reverse'] {
66
+ * {
67
+ margin-right: calc(var(--#{$prefix}spacing-xl) + 2 * var(--#{$prefix}spacing-s));
68
+ margin-left: 0;
69
+ }
70
+
71
+ it-icon[slot='image'] {
72
+ right: var(--#{$prefix}spacing-s);
73
+ left: unset;
74
+ margin-right: 0;
75
+ margin-left: unset;
76
+ }
77
+ }
78
+ }
79
+
31
80
  [slot='title'] {
32
81
  display: flex;
33
82
  width: 100%;
@@ -36,10 +85,11 @@ it-card:not(:defined) {
36
85
  margin-bottom: var(--#{$prefix}heading-spacing);
37
86
  font-size: var(--#{$prefix}heading-3-font-size);
38
87
  font-weight: var(--#{$prefix}heading-font-weight);
39
- line-height: var(--#{$prefix}heading-line-height);
88
+ line-height: var(--#{$prefix}heading-leading);
40
89
  }
41
90
 
42
- [slot='text'] {
91
+ [slot='text'],
92
+ [slot='body'] {
43
93
  width: 100%;
44
94
  }
45
95
  }
@@ -1,3 +1,10 @@
1
+ @use 'bootstrap-italia/src/scss/base/functions' as *;
2
+ @use 'bootstrap-italia/src/scss/base/config' as *;
3
+ @use 'bootstrap-italia/src/scss/base/variables' as *;
4
+ @use 'bootstrap-italia/src/scss/base/mixins' as *;
5
+ @use 'bootstrap-italia/src/scss/base/maps' as *;
6
+ @use './fouc';
7
+
1
8
  it-card {
2
9
  figure {
3
10
  margin-bottom: 0;
@@ -8,6 +15,14 @@ it-card {
8
15
  border-top-right-radius: var(--#{$prefix}card-border-radius-inner);
9
16
  }
10
17
 
18
+ //focus
19
+ a[slot='title'],
20
+ a {
21
+ &:focus-visible {
22
+ display: inline-flex;
23
+ }
24
+ }
25
+
11
26
  .it-card-title-icon-wrapper {
12
27
  margin-left: var(--#{$prefix}icon-spacing);
13
28
  }
@@ -57,7 +72,7 @@ it-card {
57
72
  color: var(--#{$prefix}card-description-color);
58
73
  font-size: var(--#{$prefix}label-font-size);
59
74
  gap: var(--#{$prefix}spacing-s);
60
- line-height: var(--#{$prefix}label-leading);
75
+ line-height: var(--#{$prefix}body-leading);
61
76
 
62
77
  @include media-breakpoint-down(sm) {
63
78
  display: flex;
@@ -80,7 +95,7 @@ it-card {
80
95
  display: flex;
81
96
  align-items: center;
82
97
  justify-content: center;
83
- background-color: $color-background-primary-lighter;
98
+ background-color: var(--#{$prefix}color-background-primary-lighter);
84
99
  }
85
100
 
86
101
  .list-group {
@@ -231,5 +246,3 @@ ul.it-card-list {
231
246
  justify-content: flex-end;
232
247
  }
233
248
  }
234
-
235
- @import './fouc';