@1024pix/pix-ui 51.2.0 → 51.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.
@@ -3,7 +3,7 @@
3
3
  {{yield to="header"}}
4
4
  </th>
5
5
  {{else}}
6
- <td ...attributes>
6
+ <td ...attributes class={{this.typeClass}}>
7
7
  {{yield to="cell"}}
8
8
  </td>
9
9
  {{/if}}
@@ -1,7 +1,20 @@
1
1
  import Component from '@glimmer/component';
2
+ import { warn } from '@ember/debug';
2
3
 
3
4
  export default class PixTableColumn extends Component {
4
5
  get displayHeader() {
5
6
  return this.args.context === 'header';
6
7
  }
8
+
9
+ get typeClass() {
10
+ const correctTypes = ['number', 'text'];
11
+ const type = this.args.type ?? 'text';
12
+ warn('PixTableColumn: you need to provide a valid type', correctTypes.includes(type), {
13
+ id: 'pix-ui.table-column.type.incorrect',
14
+ });
15
+ if (this.args.type === 'number') {
16
+ return `pix-table-column--number`;
17
+ }
18
+ return '';
19
+ }
7
20
  }
@@ -1,4 +1,4 @@
1
- td.pix-table-basic-column {
1
+ .pix-table-column {
2
2
  &--number{
3
3
  text-align: right;
4
4
  }
@@ -1,4 +1,4 @@
1
- @import 'pix-table-basic-column';
1
+ @import 'pix-table-column';
2
2
 
3
3
  .pix-table {
4
4
  width: 100%;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1024pix/pix-ui",
3
- "version": "51.2.0",
3
+ "version": "51.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"
@@ -1,8 +0,0 @@
1
- <PixTableColumn @context={{@context}} class={{this.typeClass}}>
2
- <:header>
3
- {{@name}}
4
- </:header>
5
- <:cell>
6
- {{@value}}
7
- </:cell>
8
- </PixTableColumn>
@@ -1,16 +0,0 @@
1
- import Component from '@glimmer/component';
2
- import { warn } from '@ember/debug';
3
-
4
- export default class PixTableBasicColumn extends Component {
5
- get typeClass() {
6
- const correctTypes = ['number', 'text'];
7
- const type = this.args.type ?? 'text';
8
- warn('PixTableBasicColumn: you need to provide a valid type', correctTypes.includes(type), {
9
- id: 'pix-ui.table-basic-column.type.incorrect',
10
- });
11
- if (this.args.type === 'number') {
12
- return `pix-table-basic-column--number`;
13
- }
14
- return '';
15
- }
16
- }
@@ -1 +0,0 @@
1
- export { default } from '@1024pix/pix-ui/components/pix-table-basic-column';