@fluid-topics/ft-chip 1.2.73 → 1.3.1

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.
@@ -98,9 +98,8 @@ class FtdsChip extends FtdsBase {
98
98
  case DesignSystemSize.large:
99
99
  return FtTypographyVariants.body2medium;
100
100
  case DesignSystemSize.medium:
101
- return FtTypographyVariants.caption1medium;
102
101
  case DesignSystemSize.small:
103
- return FtTypographyVariants.caption2medium;
102
+ return FtTypographyVariants.caption1medium;
104
103
  }
105
104
  }
106
105
  }
@@ -14,6 +14,7 @@ export const designSystemStyle = [
14
14
  .ftds-chip {
15
15
  display: flex;
16
16
  align-items: center;
17
+ box-sizing: border-box;
17
18
  }
18
19
 
19
20
  .ftds-chip--icon-container {
@@ -26,6 +27,53 @@ export const designSystemStyle = [
26
27
  display: flex; /* For typo alignment in the chip */
27
28
  }
28
29
 
30
+
31
+ .ftds-chip--remove-button::part(icon) {
32
+ transform: scale(1.35); /* Little trick to have a bigger icon inside of the button */
33
+ }
34
+
35
+ .ftds-chip--remove-button {
36
+ position: relative;
37
+ }
38
+
39
+ /* SMALL VARIANT */
40
+ .ftds--size-small {
41
+ min-height: ${chip.smallMinHeight};
42
+ padding: 0 ${chip.smallHorizontalPadding};
43
+ border-radius: ${chip.smallBorderRadius};
44
+ border-width: ${chip.smallBorderWidth};
45
+ border-style: solid;
46
+ ${setVariable(FtIconCssVariables.size, chip.smallIconSize)}
47
+ }
48
+
49
+ .ftds--size-small.ftds-chip--with-action {
50
+ padding-right: ${chip.smallButtonRightPadding};
51
+ }
52
+
53
+ .ftds--size-small ft-typography {
54
+ overflow: visible;
55
+ padding: 0 2px;
56
+ }
57
+
58
+ .ftds--size-small .ftds-chip--icon-container {
59
+ overflow: visible;
60
+ height: ${chip.smallIconSize};
61
+ margin-right: ${chip.smallButtonRightPadding};
62
+ }
63
+
64
+ /* Dirty non-variabilized tweaks to properly center the icon */
65
+ .ftds--size-small .ftds-chip--remove-button {
66
+ overflow: visible;
67
+ top: -3px;
68
+ height: ${chip.smallIconSize};
69
+ transform: scale(.75); /* Little trick to have a (even) bigger icon inside of the button */
70
+ --ft-button-small-icon-only-width: 15px;
71
+ }
72
+
73
+ .ftds--size-small .ftds-chip--remove-button::part(icon) {
74
+ transform: scale(2); /* Same as above */
75
+ }
76
+
29
77
  /* MEDIUM VARIANT */
30
78
  .ftds--size-medium {
31
79
  min-height: ${chip.mediumMinHeight};
@@ -41,6 +89,9 @@ export const designSystemStyle = [
41
89
  padding-right: ${chip.mediumButtonRightPadding};
42
90
  }
43
91
 
92
+ .ftds--size-medium .ftds-chip--remove-button {
93
+ right: -1px; /* Fixing manually the alignement of the button with the border of the chip */
94
+ }
44
95
 
45
96
  /* LARGE VARIANT */
46
97
  .ftds--size-large {
@@ -57,6 +108,10 @@ export const designSystemStyle = [
57
108
  padding-right: ${chip.largeButtonRightPadding};
58
109
  }
59
110
 
111
+ .ftds--size-large .ftds-chip--remove-button {
112
+ right: -2px; /* Fixing manually the alignement of the button with the border of the chip */
113
+ }
114
+
60
115
 
61
116
  /* NEUTRAL COLORS */
62
117
  .ftds--family-neutral {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-chip",
3
- "version": "1.2.73",
3
+ "version": "1.3.1",
4
4
  "description": "A generic Fluid Topics chip",
5
5
  "keywords": [
6
6
  "Lit"
@@ -20,11 +20,11 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@fluid-topics/design-system-variables": "0.1.99",
23
- "@fluid-topics/ft-icon": "1.2.73",
24
- "@fluid-topics/ft-ripple": "1.2.73",
25
- "@fluid-topics/ft-typography": "1.2.73",
26
- "@fluid-topics/ft-wc-utils": "1.2.73",
23
+ "@fluid-topics/ft-icon": "1.3.1",
24
+ "@fluid-topics/ft-ripple": "1.3.1",
25
+ "@fluid-topics/ft-typography": "1.3.1",
26
+ "@fluid-topics/ft-wc-utils": "1.3.1",
27
27
  "lit": "3.1.0"
28
28
  },
29
- "gitHead": "4f8924d376dd8e1fc58e1cde50904618bfe6ac1d"
29
+ "gitHead": "ba07775e09d57ec38038f07f9c03b52aea08376b"
30
30
  }