@hashicorp/design-system-components 0.0.1 → 0.0.6

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/README.md CHANGED
@@ -1,7 +1,10 @@
1
1
  design-system-components
2
2
  ==============================================================================
3
3
 
4
- Components for the HashiCorp Design System.
4
+ A package containing the components for the HashiCorp Design System.
5
+
6
+ [![npm version](https://badge.fury.io/js/%40hashicorp%2Fdesign-system-components.svg)](https://badge.fury.io/js/%40hashicorp%2Fdesign-system-components)
7
+
5
8
 
6
9
  Compatibility
7
10
  ------------------------------------------------------------------------------
@@ -15,7 +18,13 @@ Installation
15
18
  ------------------------------------------------------------------------------
16
19
 
17
20
  ```
18
- ember install design-system-components
21
+ yarn add @hashicorp/design-system-components
22
+ ```
23
+
24
+ Then add this line to the top of your app's style file (`app.scss` or similar):
25
+
26
+ ```
27
+ @import '@hashicorp/design-system-components';
19
28
  ```
20
29
 
21
30
  Contributing
@@ -27,4 +36,4 @@ See the [Contributing](CONTRIBUTING.md) guide for details.
27
36
  License
28
37
  ------------------------------------------------------------------------------
29
38
 
30
- This project is licensed under the [MIT License](LICENSE.md).
39
+ This project is licensed under the [Mozilla Public License 2.0](LICENSE.md).
@@ -1,4 +1,4 @@
1
- <div class="hds-badge {{this.colorClass}} {{this.typeClass}} {{this.sizeClass}}" ...attributes >
1
+ <div class="hds-badge {{this.sizeClass}} {{this.typeClass}} {{this.colorClass}}" ...attributes>
2
2
  {{#if @icon}}
3
3
  <div class="hds-badge__icon">
4
4
  <FlightIcon @name={{this.icon}} @size="16" @stretched="true" />
@@ -1,12 +1,12 @@
1
1
  import Component from '@glimmer/component';
2
2
  import { assert } from '@ember/debug';
3
3
 
4
- const DEFAULT_SIZE = 'medium';
5
- const DEFAULT_COLOR = 'neutral';
6
- const DEFAULT_TYPE = 'filled';
7
- const SIZES = ['small', 'medium', 'large'];
8
- const TYPES = ['filled', 'inverted', 'outlined'];
9
- const COLORS = [
4
+ export const DEFAULT_SIZE = 'medium';
5
+ export const DEFAULT_TYPE = 'filled';
6
+ export const DEFAULT_COLOR = 'neutral';
7
+ export const SIZES = ['small', 'medium', 'large'];
8
+ export const TYPES = ['filled', 'inverted', 'outlined'];
9
+ export const COLORS = [
10
10
  'neutral',
11
11
  'neutral-dark-mode',
12
12
  'highlight',
@@ -17,8 +17,8 @@ const COLORS = [
17
17
 
18
18
  export default class HdsBadgeIndexComponent extends Component {
19
19
  /**
20
- * Sets the size for the badge
21
- * Accepted sizes: small, medium, large
20
+ * Sets the size for the component
21
+ * Accepted values: small, medium, large
22
22
  *
23
23
  * @param size
24
24
  * @type {string}
@@ -29,7 +29,7 @@ export default class HdsBadgeIndexComponent extends Component {
29
29
 
30
30
  if (size) {
31
31
  assert(
32
- `@size for ${this.toString()} must be one of the following: ${SIZES.join(
32
+ `@size for "Hds::Badge" must be one of the following: ${SIZES.join(
33
33
  ', '
34
34
  )}, received: ${size}`,
35
35
  SIZES.includes(size)
@@ -40,16 +40,16 @@ export default class HdsBadgeIndexComponent extends Component {
40
40
  }
41
41
 
42
42
  /**
43
- * Get a class to apply to the badge based on the size argument.
43
+ * Get a class to apply to the component based on the size argument.
44
44
  * @method Badge#sizeClass
45
- * @return {string} The css class to apply to the Badge.
45
+ * @return {string} The css class to apply to the component.
46
46
  */
47
47
  get sizeClass() {
48
48
  return `hds-badge--size-${this.size}`;
49
49
  }
50
50
 
51
51
  /**
52
- * Sets the type of badge
52
+ * Sets the type of the component
53
53
  * Accepted values: filled, inverted, outlined
54
54
  *
55
55
  * @param type
@@ -61,7 +61,7 @@ export default class HdsBadgeIndexComponent extends Component {
61
61
 
62
62
  if (type) {
63
63
  assert(
64
- `@type for ${this.toString()} must be one of the following: ${TYPES.join(
64
+ `@type for "Hds::Badge" must be one of the following: ${TYPES.join(
65
65
  ', '
66
66
  )}, received: ${type}`,
67
67
  TYPES.includes(type)
@@ -72,17 +72,17 @@ export default class HdsBadgeIndexComponent extends Component {
72
72
  }
73
73
 
74
74
  /**
75
- * Get a class to apply to the badge based on the type argument.
75
+ * Get a class to apply to the component based on the type argument.
76
76
  * @method Badge#typeClass
77
- * @return {string} The css class to apply to the Badge.
77
+ * @return {string} The css class to apply to the component.
78
78
  */
79
79
  get typeClass() {
80
80
  return `hds-badge--type-${this.type}`;
81
81
  }
82
82
 
83
83
  /**
84
- * Sets the color scheme for the badge
85
- * Accepted colors: neutral, neutral-dark-mode, highlight, success, warning, critical
84
+ * Sets the color scheme for the component
85
+ * Accepted values: neutral, neutral-dark-mode, highlight, success, warning, critical
86
86
  *
87
87
  * @param color
88
88
  * @type {string}
@@ -93,7 +93,7 @@ export default class HdsBadgeIndexComponent extends Component {
93
93
 
94
94
  if (color) {
95
95
  assert(
96
- `@color for ${this.toString()} must be one of the following: ${COLORS.join(
96
+ `@color for "Hds::Badge" must be one of the following: ${COLORS.join(
97
97
  ', '
98
98
  )}, received: ${color}`,
99
99
  COLORS.includes(color)
@@ -104,9 +104,9 @@ export default class HdsBadgeIndexComponent extends Component {
104
104
  }
105
105
 
106
106
  /**
107
- * Get a class to apply to the badge based on the color argument.
107
+ * Get a class to apply to the component based on the color argument.
108
108
  * @method Badge#colorClass
109
- * @return {string} The css class to apply to the Badge.
109
+ * @return {string} The css class to apply to the component.
110
110
  */
111
111
  get colorClass() {
112
112
  return `hds-badge--color-${this.color}`;
@@ -0,0 +1,3 @@
1
+ <div class="hds-badge-count {{this.sizeClass}} {{this.typeClass}} {{this.colorClass}}" ...attributes >
2
+ {{@text}}
3
+ </div>
@@ -0,0 +1,107 @@
1
+ import Component from '@glimmer/component';
2
+ import { assert } from '@ember/debug';
3
+
4
+ export const DEFAULT_SIZE = 'medium';
5
+ export const DEFAULT_TYPE = 'filled';
6
+ export const DEFAULT_COLOR = 'neutral';
7
+ export const SIZES = ['small', 'medium', 'large'];
8
+ export const TYPES = ['filled', 'inverted', 'outlined'];
9
+ export const COLORS = ['neutral', 'neutral-dark-mode'];
10
+
11
+ export default class HdsBadgeCountIndexComponent extends Component {
12
+ /**
13
+ * Sets the size for the component
14
+ * Accepted sizes: small, medium, large
15
+ *
16
+ * @param size
17
+ * @type {string}
18
+ * @default 'medium'
19
+ */
20
+ get size() {
21
+ let { size = DEFAULT_SIZE } = this.args;
22
+
23
+ if (size) {
24
+ assert(
25
+ `@size for "Hds::BadgeCount" must be one of the following: ${SIZES.join(
26
+ ', '
27
+ )}, received: ${size}`,
28
+ SIZES.includes(size)
29
+ );
30
+ }
31
+
32
+ return size;
33
+ }
34
+
35
+ /**
36
+ * Get a class to apply to the component based on the size argument.
37
+ * @method BadgeCount#sizeClass
38
+ * @return {string} The css class to apply to the component.
39
+ */
40
+ get sizeClass() {
41
+ return `hds-badge-count--size-${this.size}`;
42
+ }
43
+
44
+ /**
45
+ * Sets the type of the component
46
+ * Accepted values: filled, inverted, outlined
47
+ *
48
+ * @param type
49
+ * @type {string}
50
+ * @default 'filled'
51
+ */
52
+ get type() {
53
+ let { type = DEFAULT_TYPE } = this.args;
54
+
55
+ if (type) {
56
+ assert(
57
+ `@type for "Hds::BadgeCount" must be one of the following: ${TYPES.join(
58
+ ', '
59
+ )}, received: ${type}`,
60
+ TYPES.includes(type)
61
+ );
62
+ }
63
+
64
+ return type;
65
+ }
66
+
67
+ /**
68
+ * Get a class to apply to the component based on the type argument.
69
+ * @method BadgeCount#typeClass
70
+ * @return {string} The css class to apply to the component.
71
+ */
72
+ get typeClass() {
73
+ return `hds-badge-count--type-${this.type}`;
74
+ }
75
+
76
+ /**
77
+ * Sets the color scheme for the component
78
+ * Accepted colors: neutral, neutral-dark-mode
79
+ *
80
+ * @param color
81
+ * @type {string}
82
+ * @default 'neutral'
83
+ */
84
+ get color() {
85
+ let { color = DEFAULT_COLOR } = this.args;
86
+
87
+ if (color) {
88
+ assert(
89
+ `@color for "Hds::BadgeCount" must be one of the following: ${COLORS.join(
90
+ ', '
91
+ )}, received: ${color}`,
92
+ COLORS.includes(color)
93
+ );
94
+ }
95
+
96
+ return color;
97
+ }
98
+
99
+ /**
100
+ * Get a class to apply to the component based on the color argument.
101
+ * @method BadgeCount#colorClass
102
+ * @return {string} The css class to apply to the component.
103
+ */
104
+ get colorClass() {
105
+ return `hds-badge-count--color-${this.color}`;
106
+ }
107
+ }
@@ -0,0 +1,3 @@
1
+ <div class="hds-card__container {{this.levelClass}} {{this.borderClass}} {{this.backgroundClass}} {{this.overflowClass}}" ...attributes>
2
+ {{yield}}
3
+ </div>
@@ -0,0 +1,116 @@
1
+ import Component from '@glimmer/component';
2
+ import { assert } from '@ember/debug';
3
+
4
+ export const DEFAULT_LEVEL = 'base';
5
+ export const DEFAULT_BACKGROUND = 'neutral-primary';
6
+ export const DEFAULT_OVERFLOW = 'hidden';
7
+ export const LEVELS = ['base', 'mid', 'high'];
8
+ export const BACKGROUNDS = ['neutral-primary', 'neutral-secondary'];
9
+ export const OVERFLOWS = ['hidden', 'visible'];
10
+
11
+ export default class HdsCardContainerComponent extends Component {
12
+ /**
13
+ * Sets the "elevation" level for the component
14
+ * Accepted values: base, mid, high
15
+ *
16
+ * @param level
17
+ * @type {string}
18
+ * @default 'base'
19
+ */
20
+ get level() {
21
+ let { level = DEFAULT_LEVEL } = this.args;
22
+
23
+ if (level) {
24
+ assert(
25
+ `@level for "Hds::CardContainer" must be one of the following: ${LEVELS.join(
26
+ ', '
27
+ )}, received: ${level}`,
28
+ LEVELS.includes(level)
29
+ );
30
+ }
31
+
32
+ return level;
33
+ }
34
+
35
+ /**
36
+ * Get a class to apply to the component based on the level argument.
37
+ * @method Card#levelClass
38
+ * @return {string} The css class to apply to the component.
39
+ */
40
+ get levelClass() {
41
+ return `hds-card__container--level-${this.level}`;
42
+ }
43
+
44
+ /**
45
+ * Sets the background for the component
46
+ * Accepted values: neutral-primary, neutral-secondary
47
+ *
48
+ * @param background
49
+ * @type {string}
50
+ * @default 'base'
51
+ */
52
+ get background() {
53
+ let { background = DEFAULT_BACKGROUND } = this.args;
54
+
55
+ if (background) {
56
+ assert(
57
+ `@background for "Hds::CardContainer" must be one of the following: ${BACKGROUNDS.join(
58
+ ', '
59
+ )}, received: ${background}`,
60
+ BACKGROUNDS.includes(background)
61
+ );
62
+ }
63
+
64
+ return background;
65
+ }
66
+
67
+ /**
68
+ * Get a class to apply to the component based on the background argument.
69
+ * @method Card#backgroundClass
70
+ * @return {string} The css class to apply to the component.
71
+ */
72
+ get backgroundClass() {
73
+ return `hds-card__container--background-${this.background}`;
74
+ }
75
+
76
+ /**
77
+ * Get a class to apply to the component based on the hasBorder argument.
78
+ * @method Card#hasBorderClass
79
+ * @return {string} The css class to apply to the component.
80
+ */
81
+ get borderClass() {
82
+ return this.args.hasBorder ? `hds-card__container--has-border` : undefined;
83
+ }
84
+
85
+ /**
86
+ * Sets the level for the card
87
+ * Accepted values: visible, hidden
88
+ *
89
+ * @param overflow
90
+ * @type {string}
91
+ * @default 'hidden'
92
+ */
93
+ get overflow() {
94
+ let { overflow = DEFAULT_OVERFLOW } = this.args;
95
+
96
+ if (overflow) {
97
+ assert(
98
+ `@overflow for "Hds::CardContainer" must be one of the following: ${OVERFLOWS.join(
99
+ ', '
100
+ )}, received: ${overflow}`,
101
+ OVERFLOWS.includes(overflow)
102
+ );
103
+ }
104
+
105
+ return overflow;
106
+ }
107
+
108
+ /**
109
+ * Get a class to apply to the component based on the overflow argument.
110
+ * @method Card#overflowClass
111
+ * @return {string} The css class to apply to the component.
112
+ */
113
+ get overflowClass() {
114
+ return `hds-card__container--overflow-${this.overflow}`;
115
+ }
116
+ }
@@ -0,0 +1 @@
1
+ export { default } from '@hashicorp/design-system-components/components/hds/badge-count/index';
@@ -0,0 +1 @@
1
+ export { default } from '@hashicorp/design-system-components/components/hds/card/container';
@@ -1,6 +1,8 @@
1
1
  @use "tokens";
2
2
 
3
- @use "./components/badge";
3
+ @use "../components/badge";
4
+ @use "../components/badge-count";
5
+ @use "../components/card";
4
6
 
5
7
  .sr-only {
6
8
  border: 0 !important;
@@ -0,0 +1,97 @@
1
+ // BADGE-COUNT
2
+ //
3
+ // properties within each class are sorted alphabetically
4
+ //
5
+
6
+ @use 'sass:math';
7
+
8
+ $hds-badge-count-types: ( 'flat','inverted','outlined' );
9
+ $hds-badge-count-sizes: ( 'small', 'medium', 'large' );
10
+
11
+ $hds-badge-count-border-width: 1px;
12
+
13
+
14
+ .hds-badge-count {
15
+ align-items: center;
16
+ border: $hds-badge-count-border-width solid transparent;
17
+ box-sizing: border-box;
18
+ display: inline-flex;
19
+ font-family: var(--token-typography-tag-font-family);
20
+ max-width: 100%;
21
+ }
22
+
23
+ // SIZE
24
+
25
+ // these values later may come from the design tokens
26
+ $size-props: (
27
+ "small": (
28
+ "font-size": 0.8125rem, // 13px
29
+ "height": 1.25rem,
30
+ "line-height": 1.23077, // 16px
31
+ "padding-vertical": 0.125rem,
32
+ "padding-horizontal": 0.5rem,
33
+ ),
34
+ "medium": (
35
+ "font-size": 0.8125rem, // 13px
36
+ "height": 1.5rem,
37
+ "line-height": 1.23077, // 16px
38
+ "padding-vertical": 0.25rem,
39
+ "padding-horizontal": 0.75rem,
40
+ ),
41
+ "large": (
42
+ "font-size": 1rem, // 16px
43
+ "height": 2rem,
44
+ "line-height": 1.5, // 24px
45
+ "padding-vertical": 0.25rem,
46
+ "padding-horizontal": 0.875rem,
47
+ )
48
+ );
49
+
50
+ @each $size in $hds-badge-count-sizes {
51
+ .hds-badge-count--size-#{$size} {
52
+ border-radius: math.div(map-get($size-props, $size, "height"), 2);
53
+ font-size: map-get($size-props, $size, "font-size");
54
+ line-height: map-get($size-props, $size, "line-height");
55
+ min-height: map-get($size-props, $size, "height");
56
+ padding: calc(#{map-get($size-props, $size, "padding-vertical")} - #{$hds-badge-count-border-width}) calc(#{map-get($size-props, $size, "padding-horizontal")} - #{$hds-badge-count-border-width});
57
+ }
58
+ }
59
+
60
+
61
+ // COLOR + TYPE COMBINATIONS
62
+
63
+ .hds-badge-count--color-neutral {
64
+ &.hds-badge-count--type-filled {
65
+ background-color: var(--token-color-palette-neutral-100);
66
+ color: var(--token-color-palette-neutral-600);
67
+ }
68
+
69
+ &.hds-badge-count--type-inverted {
70
+ background-color: var(--token-color-palette-neutral-500);
71
+ color: var(--token-color-palette-neutral-0);
72
+ }
73
+
74
+ &.hds-badge-count--type-outlined {
75
+ background-color: transparent;
76
+ border-color: currentColor;
77
+ color: var(--token-color-palette-neutral-500);;
78
+ }
79
+ }
80
+
81
+ .hds-badge-count--color-neutral-dark-mode {
82
+ &.hds-badge-count--type-filled {
83
+ background-color: var(--token-color-palette-neutral-500);
84
+ color: var(--token-color-palette-neutral-0);
85
+ }
86
+
87
+ &.hds-badge-count--type-inverted {
88
+ background-color: var(--token-color-palette-neutral-50);
89
+ color: var(--token-color-palette-neutral-600);
90
+ }
91
+
92
+ &.hds-badge-count--type-outlined {
93
+ background-color: transparent;
94
+ border-color: currentColor;
95
+ color: var(--token-color-palette-neutral-0);;
96
+ }
97
+ }
@@ -68,7 +68,7 @@ $size-props: (
68
68
  @each $size in $hds-badge-sizes {
69
69
  .hds-badge--size-#{$size} {
70
70
  min-height: map-get($size-props, $size, "height");
71
- padding: calc(map-get($size-props, $size, "padding-vertical") - $hds-badge-border-width) calc(map-get($size-props, $size, "padding-horizontal") - $hds-badge-border-width);
71
+ padding: calc(#{map-get($size-props, $size, "padding-vertical")} - #{$hds-badge-border-width}) calc(#{map-get($size-props, $size, "padding-horizontal")} - #{$hds-badge-border-width});
72
72
 
73
73
  .hds-badge__icon {
74
74
  height: map-get($size-props, $size, "icon-size");
@@ -91,37 +91,37 @@ $size-props: (
91
91
 
92
92
  .hds-badge--color-neutral {
93
93
  &.hds-badge--type-filled {
94
- background-color: var(--token-color-neutral-neutral-100);
95
- color: var(--token-color-neutral-neutral-600);
94
+ background-color: var(--token-color-palette-neutral-100);
95
+ color: var(--token-color-palette-neutral-600);
96
96
  }
97
97
 
98
98
  &.hds-badge--type-inverted {
99
- background-color: var(--token-color-neutral-neutral-500);
100
- color: var(--token-color-neutral-neutral-0);
99
+ background-color: var(--token-color-palette-neutral-500);
100
+ color: var(--token-color-palette-neutral-0);
101
101
  }
102
102
 
103
103
  &.hds-badge--type-outlined {
104
104
  background-color: transparent;
105
105
  border-color: currentColor;
106
- color: var(--token-color-neutral-neutral-500);;
106
+ color: var(--token-color-palette-neutral-500);;
107
107
  }
108
108
  }
109
109
 
110
110
  .hds-badge--color-neutral-dark-mode {
111
111
  &.hds-badge--type-filled {
112
- background-color: var(--token-color-neutral-neutral-500);
113
- color: var(--token-color-neutral-neutral-0);
112
+ background-color: var(--token-color-palette-neutral-500);
113
+ color: var(--token-color-palette-neutral-0);
114
114
  }
115
115
 
116
116
  &.hds-badge--type-inverted {
117
- background-color: var(--token-color-neutral-neutral-600);
118
- color: var(--token-color-neutral-neutral-50);
117
+ background-color: var(--token-color-palette-neutral-50);
118
+ color: var(--token-color-palette-neutral-600);
119
119
  }
120
120
 
121
121
  &.hds-badge--type-outlined {
122
122
  background-color: transparent;
123
123
  border-color: currentColor;
124
- color: var(--token-color-neutral-neutral-0);;
124
+ color: var(--token-color-palette-neutral-0);;
125
125
  }
126
126
  }
127
127
 
@@ -134,7 +134,7 @@ $size-props: (
134
134
 
135
135
  &.hds-badge--type-inverted {
136
136
  background-color: var(--token-color-#{$color}-background-primary);
137
- color: var(--token-color-neutral-neutral-0);
137
+ color: var(--token-color-palette-neutral-0);
138
138
  }
139
139
 
140
140
  &.hds-badge--type-outlined {
@@ -0,0 +1,100 @@
1
+ // CARD COMPONENT > CONTAINER
2
+ //
3
+ // properties within each class are sorted alphabetically
4
+ //
5
+ //
6
+
7
+ // this mixin is used to apply the "elevation" styles to the card container
8
+ // depending on the "elevation level" and if it has a border applied to it.
9
+ // we are mimicking the way this effect is defined in Figma, through a set of
10
+ // multiple drop shadows (also the border is a 1px shadow); we tried using an
11
+ // outline but Safari still doesn't support rounded edges for outlines.
12
+ // for details see: https://www.figma.com/file/oQsMzMMnynfPWpMEt91OpH/?node-id=1988%3A2
13
+
14
+ @mixin getElevationStyle($level, $has-border: false) {
15
+ $drop-shadow: false;
16
+ $border-shadow: false;
17
+
18
+ // here we define the "drop-shadow" values (there are two shadows applied)
19
+ // notice: the "base" level doesn't have a "drop shadow" effect applied (no elevation)
20
+ @if ($level != 'base') {
21
+ $drop-shadow:
22
+ var(--token-elevation-#{$level}-shadow-01-x)
23
+ var(--token-elevation-#{$level}-shadow-01-y)
24
+ var(--token-elevation-#{$level}-shadow-01-blur)
25
+ var(--token-elevation-#{$level}-shadow-01-spread)
26
+ var(--token-elevation-#{$level}-shadow-01-color),
27
+ var(--token-elevation-#{$level}-shadow-02-x)
28
+ var(--token-elevation-#{$level}-shadow-02-y)
29
+ var(--token-elevation-#{$level}-shadow-02-blur)
30
+ var(--token-elevation-#{$level}-shadow-02-spread)
31
+ var(--token-elevation-#{$level}-shadow-02-color)
32
+ ;
33
+ }
34
+
35
+ // here we define the "border-shadow" values
36
+ // notice: we create a border via a shadow, so we have zero values for x/y/blur
37
+ @if ($has-border) {
38
+ $border-shadow:
39
+ 0
40
+ 0
41
+ 0
42
+ var(--token-elevation-#{$level}-border-width)
43
+ var(--token-elevation-#{$level}-border-color);
44
+ }
45
+
46
+ // here we join the two effects in a single box-shadow (depending on the different cases)
47
+ @if ($drop-shadow and not $border-shadow) {
48
+ box-shadow: $drop-shadow;
49
+ } @else if($border-shadow and not $drop-shadow) {
50
+ box-shadow: $border-shadow;
51
+ } @else {
52
+ // notice: we put the "border-shadow" first because the final rendering in the browser looks better
53
+ // see: https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow - "The z-ordering of multiple box shadows is the same as multiple text shadows (the first specified shadow is on top)."
54
+ box-shadow: $border-shadow, $drop-shadow;
55
+ }
56
+ }
57
+
58
+ $hds-card-container-levels: ( 'base', 'mid', 'high' );
59
+
60
+ $hds-card-container-border-radius: 6px;
61
+
62
+ .hds-card__container {
63
+ background-color: #fff;
64
+ border-radius: $hds-card-container-border-radius;
65
+ position: relative;
66
+ }
67
+
68
+ // LEVEL (elevation style as "drop" + "border" shadow effects)
69
+
70
+ @each $level in $hds-card-container-levels {
71
+ .hds-card__container--level-#{$level} {
72
+ @include getElevationStyle($level);
73
+
74
+ &.hds-card__container--has-border {
75
+ @include getElevationStyle($level, true);
76
+ }
77
+ }
78
+ }
79
+
80
+
81
+ // BACKGROUND
82
+
83
+ .hds-card__container--background-neutral-primary {
84
+ background-color: var(--token-color-neutral-background-primary);
85
+ }
86
+
87
+ .hds-card__container--background-neutral-secondary {
88
+ background-color: var(--token-color-neutral-background-secondary);
89
+ }
90
+
91
+
92
+ // OVERFLOW
93
+
94
+ .hds-card__container--overflow-hidden {
95
+ overflow: hidden;
96
+ }
97
+
98
+ .hds-card__container--overflow-visible {
99
+ overflow: visible;
100
+ }
@@ -0,0 +1,4 @@
1
+ // CARD COMPONENT
2
+ //
3
+
4
+ @use "./container";
package/index.js CHANGED
@@ -2,4 +2,12 @@
2
2
 
3
3
  module.exports = {
4
4
  name: require('./package').name,
5
+
6
+ isDevelopingAddon() {
7
+ return true;
8
+ },
9
+
10
+ included: function (/* app */) {
11
+ this._super.included.apply(this, arguments);
12
+ },
5
13
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hashicorp/design-system-components",
3
- "version": "0.0.1",
3
+ "version": "0.0.6",
4
4
  "description": "HashiCorp Design System Components",
5
5
  "keywords": [
6
6
  "hashicorp",
@@ -55,11 +55,12 @@
55
55
  "test:ember-compatibility": "ember try:each"
56
56
  },
57
57
  "dependencies": {
58
- "@hashicorp/design-system-tokens": "^0.0.3",
58
+ "@hashicorp/design-system-tokens": "^0.0.10",
59
59
  "@hashicorp/ember-flight-icons": "^1.2.0",
60
60
  "ember-cli-babel": "^7.26.6",
61
61
  "ember-cli-htmlbars": "^5.7.1",
62
- "ember-cli-sass": "^10.0.1"
62
+ "ember-cli-sass": "^10.0.1",
63
+ "sass": "^1.43.4"
63
64
  },
64
65
  "devDependencies": {
65
66
  "@ember/optional-features": "^2.0.0",
@@ -98,11 +99,10 @@
98
99
  "prettier": "^2.3.0",
99
100
  "qunit": "^2.15.0",
100
101
  "qunit-dom": "^1.6.0",
101
- "sass": "^1.43.4",
102
102
  "webpack": "^5.61.0"
103
103
  },
104
104
  "engines": {
105
- "node": "10.* || >= 12"
105
+ "node": "10.* || >= 12 || >= 14"
106
106
  },
107
107
  "ember": {
108
108
  "edition": "octane"