@1024pix/pix-ui 55.1.0 → 55.3.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.
@@ -1,4 +1,4 @@
1
- <div class="pix-block {{concat 'pix-block--shadow-' this.getShadowWeight}}" ...attributes>
1
+ <div class="pix-block {{concat 'pix-block--' this.variant}}" ...attributes>
2
2
 
3
3
  {{yield}}
4
4
 
@@ -1,11 +1,19 @@
1
+ import { warn } from '@ember/debug';
1
2
  import Component from '@glimmer/component';
2
3
 
3
4
  export default class PixBlockComponent extends Component {
4
5
  text = 'pix-block';
5
6
 
6
- get getShadowWeight() {
7
- const shadowParam = this.args.shadow;
8
- const correctsWeight = ['light', 'heavy'];
9
- return correctsWeight.includes(shadowParam) ? shadowParam : 'light';
7
+ get variant() {
8
+ const value = this.args.variant ?? 'default';
9
+ warn(
10
+ `PixBlock: @variant "${value}" should be default, certif, orga or admin`,
11
+ ['default', 'orga', 'certif', 'admin'].includes(value),
12
+ {
13
+ id: 'pix-ui.pix-block.variant.not-valid',
14
+ },
15
+ );
16
+
17
+ return value;
10
18
  }
11
19
  }
@@ -3,13 +3,25 @@
3
3
  .pix-block {
4
4
  position: relative;
5
5
  background-color: var(--pix-neutral-0);
6
- border-radius: 5px;
6
+ border-radius: var(--pix-spacing-2x);
7
7
 
8
- &--shadow-light {
9
- @extend %pix-shadow-sm;
8
+ &--default {
9
+ padding: var(--pix-spacing-6x);
10
+ border: solid 1px var(--pix-primary-100);
10
11
  }
11
12
 
12
- &--shadow-heavy {
13
- @extend %pix-shadow-xl;
13
+ &--orga {
14
+ padding: var(--pix-spacing-3x);
15
+ border: solid 1px rgb(var(--pix-orga-500-inline), 0.45);
16
+ }
17
+
18
+ &--certif {
19
+ padding: var(--pix-spacing-3x);
20
+ border: solid 1px rgb(var(--pix-certif-500-inline), 0.45);
21
+ }
22
+
23
+ &--admin {
24
+ padding: var(--pix-spacing-3x);
25
+ border: solid 1px var(--pix-primary-100);
14
26
  }
15
27
  }
@@ -80,6 +80,17 @@
80
80
  letter-spacing: calc(-0.01 * var(--font-size-title));
81
81
  }
82
82
 
83
+ %pix-title-xxs,
84
+ .pix-title-xxs {
85
+ @extend %-pix-title;
86
+
87
+ --font-size-title: 1.125rem;
88
+
89
+ font-size: var(--font-size-title);
90
+ line-height: 1.625;
91
+ letter-spacing: calc(-0.01 * var(--font-size-title));
92
+ }
93
+
83
94
  %-pix-body {
84
95
  font-weight: var(--pix-font-normal);
85
96
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1024pix/pix-ui",
3
- "version": "55.1.0",
3
+ "version": "55.3.0",
4
4
  "description": "Pix-UI is the implementation of Pix design principles and guidelines for its products.",
5
5
  "keywords": [
6
6
  "ember-addon"