@hashicorp/design-system-components 0.0.5 → 0.0.9

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.
@@ -1,3 +1,4 @@
1
+ //
1
2
  // CARD COMPONENT > CONTAINER
2
3
  //
3
4
  // properties within each class are sorted alphabetically
@@ -56,7 +57,6 @@
56
57
  }
57
58
 
58
59
  $hds-card-container-levels: ( 'base', 'mid', 'high' );
59
- $hds-card-container-backgrounds: ( 'neutral-0', 'neutral-50' );
60
60
 
61
61
  $hds-card-container-border-radius: 6px;
62
62
 
@@ -78,14 +78,18 @@ $hds-card-container-border-radius: 6px;
78
78
  }
79
79
  }
80
80
 
81
+
81
82
  // BACKGROUND
82
83
 
83
- @each $background-color in $hds-card-container-backgrounds {
84
- .hds-card__container--background-#{$background-color} {
85
- background-color: var(--token-color-neutral-#{$background-color});
86
- }
84
+ .hds-card__container--background-neutral-primary {
85
+ background-color: var(--token-color-neutral-background-primary);
87
86
  }
88
87
 
88
+ .hds-card__container--background-neutral-secondary {
89
+ background-color: var(--token-color-neutral-background-secondary);
90
+ }
91
+
92
+
89
93
  // OVERFLOW
90
94
 
91
95
  .hds-card__container--overflow-hidden {
@@ -1,3 +1,4 @@
1
+ //
1
2
  // CARD COMPONENT
2
3
  //
3
4
 
@@ -0,0 +1,147 @@
1
+ //
2
+ // ICON-TILE
3
+ //
4
+ // properties within each class are sorted alphabetically
5
+ //
6
+ //
7
+
8
+ $hds-icon-tile-sizes: ( 'small', 'medium', 'large' );
9
+ $hds-icon-tile-types: ( 'object','resource','logo' );
10
+ $hds-icon-tile-colors-products: ( 'boundary', 'consul', 'nomad', 'packer', 'terraform', 'vagrant', 'vault', 'waypoint' );
11
+
12
+ $hds-icon-tile-border-width: 1px;
13
+ $hds-icon-tile-box-shadow: 0px 1px 1px rgba(#656A76, 0.05);
14
+
15
+
16
+ .hds-icon-tile {
17
+ border-radius: 4px;
18
+ border: $hds-icon-tile-border-width solid transparent;
19
+ box-shadow: $hds-icon-tile-box-shadow;
20
+ box-sizing: border-box;
21
+ display: flex;
22
+ position: relative;
23
+ }
24
+
25
+ .hds-icon-tile__icon,
26
+ .hds-icon-tile__logo {
27
+ display: flex;
28
+ margin: auto;
29
+ }
30
+
31
+ .hds-icon-tile__extra {
32
+ background-color: var(--token-color-neutral-background-primary);
33
+ border: 1px solid var(--token-color-palette-alpha-200);
34
+ bottom: -6px;
35
+ box-shadow: $hds-icon-tile-box-shadow;
36
+ box-sizing: content-box; // the border is outside
37
+ right: -6px;
38
+ display: flex;
39
+ position: absolute;
40
+ }
41
+
42
+ .hds-icon-tile__extra-icon {
43
+ display: flex;
44
+ margin: auto;
45
+ color: var(--token-color-neutral-foreground-primary);
46
+ }
47
+
48
+ // SIZE
49
+
50
+ // these values later may come from the design tokens
51
+ $size-props: (
52
+ "small": (
53
+ "size": 1.75rem, // 28px
54
+ "border-radius": 5px,
55
+ "icon-size": 1rem,
56
+ "logo-size": 1.25rem,
57
+ 'extra-size': 1.125rem,
58
+ 'extra-border-radius': 4px,
59
+ 'extra-icon-size': 0.75rem,
60
+ ),
61
+ "medium": (
62
+ "size": 2.5rem, // 40px
63
+ "border-radius": 6px,
64
+ "icon-size": 1.5rem,
65
+ "logo-size": 2.25rem,
66
+ 'extra-size': 1.5rem,
67
+ 'extra-border-radius': 5px,
68
+ 'extra-icon-size': 1rem,
69
+ ),
70
+ "large": (
71
+ "size": 3rem, // 48px
72
+ "border-radius": 6px,
73
+ "icon-size": 1.5rem,
74
+ "logo-size": 2.25rem,
75
+ 'extra-size': 1.5rem,
76
+ 'extra-border-radius': 5px,
77
+ 'extra-icon-size': 1rem,
78
+ )
79
+ );
80
+
81
+ @each $size in $hds-icon-tile-sizes {
82
+ .hds-icon-tile--size-#{$size} {
83
+ width: map-get($size-props, $size, "size");
84
+ height: map-get($size-props, $size, "size");
85
+ border-radius: map-get($size-props, $size, "border-radius");
86
+
87
+ .hds-icon-tile__icon {
88
+ height: map-get($size-props, $size, "icon-size");
89
+ width: map-get($size-props, $size, "icon-size");
90
+ }
91
+
92
+ .hds-icon-tile__logo {
93
+ height: map-get($size-props, $size, "logo-size");
94
+ width: map-get($size-props, $size, "logo-size");
95
+ }
96
+
97
+ .hds-icon-tile__extra {
98
+ border-radius: map-get($size-props, $size, "extra-border-radius");
99
+ height: map-get($size-props, $size, "extra-size");
100
+ width: map-get($size-props, $size, "extra-size");
101
+ }
102
+
103
+ .hds-icon-tile__extra-icon {
104
+ height: map-get($size-props, $size, "extra-icon-size");
105
+ width: map-get($size-props, $size, "extra-icon-size");
106
+ }
107
+ }
108
+ }
109
+
110
+
111
+ // LOGO - COLOR
112
+
113
+ .hds-icon-tile--logo {
114
+ background-color: var(--token-color-neutral-background-primary);
115
+ border-color: var(--token-color-neutral-border-primary);
116
+
117
+ @each $product in $hds-icon-tile-colors-products {
118
+ &.hds-icon-tile--color-#{$product} {
119
+ color: var(--token-color-#{$product}-brand);
120
+ }
121
+ }
122
+
123
+ // exception for Vault, where the color of the logo needs to be the "alt" one
124
+ &.hds-icon-tile--color-vault {
125
+ color: var(--token-color-vault-brand-alt);
126
+ }
127
+ }
128
+
129
+ // ICON - COLOR
130
+
131
+ .hds-icon-tile--icon {
132
+
133
+ &.hds-icon-tile--color-neutral {
134
+ background-color: var(--token-color-neutral-background-secondary);
135
+ border-color: var(--token-color-neutral-border-primary);
136
+ color: var(--token-color-neutral-foreground-faint);
137
+ }
138
+
139
+ @each $product in $hds-icon-tile-colors-products {
140
+ &.hds-icon-tile--color-#{$product} {
141
+ background: linear-gradient(135deg, var(--token-color-#{$product}-gradient-faint-start) 0%, var(--token-color-#{$product}-gradient-faint-stop) 100%);
142
+ border-color: var(--token-color-#{$product}-border);
143
+ color: var(--token-color-#{$product}-foreground);
144
+ }
145
+ }
146
+ }
147
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hashicorp/design-system-components",
3
- "version": "0.0.5",
3
+ "version": "0.0.9",
4
4
  "description": "HashiCorp Design System Components",
5
5
  "keywords": [
6
6
  "hashicorp",
@@ -52,11 +52,17 @@
52
52
  "start": "ember serve",
53
53
  "test": "npm-run-all lint test:*",
54
54
  "test:ember": "ember test",
55
- "test:ember-compatibility": "ember try:each"
55
+ "test:ember-compatibility": "ember try:each",
56
+ "test:ember:percy": "percy exec ember test",
57
+ "bump": "./node_modules/.bin/bump package.json",
58
+ "release": "yarn publish --new-version $npm_package_version",
59
+ "postrelease:git-tag": "TAG_VERSION=\"${npm_package_name}/${npm_package_version}\" && git tag $TAG_VERSION && git push origin $TAG_VERSION",
60
+ "postrelease": "yarn postrelease:git-tag"
56
61
  },
57
62
  "dependencies": {
58
- "@hashicorp/design-system-tokens": "^0.0.9",
59
- "@hashicorp/ember-flight-icons": "^1.2.0",
63
+ "@hashicorp/design-system-tokens": "^0.0.13",
64
+ "@hashicorp/ember-flight-icons": "^1.2.1",
65
+ "@hashicorp/flight-icons": "^1.3.0",
60
66
  "ember-cli-babel": "^7.26.6",
61
67
  "ember-cli-htmlbars": "^5.7.1",
62
68
  "ember-cli-sass": "^10.0.1",
@@ -68,6 +74,8 @@
68
74
  "@embroider/test-setup": "^0.41.0",
69
75
  "@glimmer/component": "^1.0.4",
70
76
  "@glimmer/tracking": "^1.0.4",
77
+ "@percy/cli": "^1.0.0-beta.70",
78
+ "@percy/ember": "^3.0.0",
71
79
  "babel-eslint": "^10.1.0",
72
80
  "broccoli-asset-rev": "^3.0.0",
73
81
  "ember-auto-import": "^2.2.3",
@@ -87,6 +95,7 @@
87
95
  "ember-source": "~3.27.2",
88
96
  "ember-source-channel-url": "^3.0.0",
89
97
  "ember-template-lint": "^3.4.2",
98
+ "ember-truth-helpers": "^3.0.0",
90
99
  "ember-try": "^1.4.0",
91
100
  "eslint": "^7.27.0",
92
101
  "eslint-config-prettier": "^8.3.0",
@@ -99,6 +108,7 @@
99
108
  "prettier": "^2.3.0",
100
109
  "qunit": "^2.15.0",
101
110
  "qunit-dom": "^1.6.0",
111
+ "version-bump-prompt": "^6.1.0",
102
112
  "webpack": "^5.61.0"
103
113
  },
104
114
  "engines": {