@justeattakeaway/pie-divider 1.4.1 → 1.4.3

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
@@ -58,12 +58,8 @@ import '@justeattakeaway/pie-webc/components/divider.js';
58
58
  ```
59
59
 
60
60
  ```html
61
- <html>
62
- <body>
63
- <pie-divider orientation="horizontal" label="OR"></pie-divider>
64
- <script type="module" src="/main.js"></script>
65
- </body>
66
- </html>
61
+ <pie-divider orientation="horizontal" label="OR"></pie-divider>
62
+ <script type="module" src="/main.js"></script>
67
63
  ```
68
64
 
69
65
  **For Native JS Applications, Vue, Angular, Svelte etc.:**
@@ -34,7 +34,7 @@
34
34
  "type": {
35
35
  "text": "DefaultProps"
36
36
  },
37
- "default": "{\r\n variant: 'default',\r\n orientation: 'horizontal',\r\n label: '',\r\n}"
37
+ "default": "{\n variant: 'default',\n orientation: 'horizontal',\n label: '',\n}"
38
38
  }
39
39
  ],
40
40
  "exports": [
@@ -83,7 +83,8 @@
83
83
  "kind": "field",
84
84
  "name": "orientation",
85
85
  "privacy": "public",
86
- "attribute": "orientation"
86
+ "attribute": "orientation",
87
+ "reflects": true
87
88
  },
88
89
  {
89
90
  "kind": "field",
package/dist/index.js CHANGED
@@ -7,9 +7,9 @@ const v = class v extends u {
7
7
  this.getAttribute("v") || this.setAttribute("v", v.v);
8
8
  }
9
9
  };
10
- v.v = "1.4.1";
10
+ v.v = "1.4.3";
11
11
  let p = v;
12
- const x = "*,*:after,*:before{box-sizing:inherit}.c-divider{--divider-bg-color: var(--dt-color-divider-default);--divider-width: 100%;--divider-min-width: 16px;--divider-height: 1px;--divider-label-max-width: 90%;--divider-font-size: calc(var(--dt-font-body-l-size) * 1px);--divider-line-height: calc(var(--dt-font-body-l-line-height) * 1px);width:var(--divider-width)}.c-divider,.c-divider hr{margin:0;border:0;background-color:var(--divider-bg-color)}.c-divider:not(.c-divider--labelled){height:var(--divider-height)}.c-divider.c-divider--labelled{display:flex;align-items:center;text-align:center;gap:var(--dt-spacing-b);background-color:transparent;color:var(--dt-color-content-subdued)}.c-divider.c-divider--labelled .c-divider-label{font-size:var(--divider-font-size);line-height:var(--divider-line-height);max-width:var(--divider-label-max-width);word-wrap:break-word}.c-divider.c-divider--labelled hr{flex-grow:1;height:var(--divider-height);min-width:var(--divider-min-width)}.c-divider.c-divider--labelled.c-divider--inverse{color:var(--dt-color-content-inverse)}.c-divider.c-divider--inverse{--divider-bg-color: var(--dt-color-divider-inverse)}.c-divider.c-divider--vertical{--divider-width: 1px;--divider-height: 100%}", y = ["default", "inverse"], $ = ["horizontal", "vertical"], l = {
12
+ const x = "*,*:after,*:before{box-sizing:inherit}:host{display:block}:host([orientation=vertical]){height:100%}.c-divider{--divider-bg-color: var(--dt-color-divider-default);--divider-width: 100%;--divider-min-width: 16px;--divider-height: 1px;--divider-label-max-width: 90%;--divider-font-size: calc(var(--dt-font-body-l-size) * 1px);--divider-line-height: calc(var(--dt-font-body-l-line-height) * 1px);width:var(--divider-width)}.c-divider,.c-divider hr{margin:0;border:0;background-color:var(--divider-bg-color)}.c-divider:not(.c-divider--labelled){height:var(--divider-height)}.c-divider.c-divider--labelled{display:flex;align-items:center;text-align:center;gap:var(--dt-spacing-b);background-color:transparent;color:var(--dt-color-content-subdued)}.c-divider.c-divider--labelled .c-divider-label{font-size:var(--divider-font-size);line-height:var(--divider-line-height);max-width:var(--divider-label-max-width);word-wrap:break-word}.c-divider.c-divider--labelled hr{flex-grow:1;height:var(--divider-height);min-width:var(--divider-min-width)}.c-divider.c-divider--labelled.c-divider--inverse{color:var(--dt-color-content-inverse)}.c-divider.c-divider--inverse{--divider-bg-color: var(--dt-color-divider-inverse)}.c-divider.c-divider--vertical{--divider-width: 1px;--divider-height: 100%}", y = ["default", "inverse"], $ = ["horizontal", "vertical"], l = {
13
13
  variant: "default",
14
14
  orientation: "horizontal",
15
15
  label: ""
@@ -55,7 +55,7 @@ n([
55
55
  f(e, y, l.variant)
56
56
  ], a.prototype, "variant", 2);
57
57
  n([
58
- b({ type: String }),
58
+ b({ type: String, reflect: !0 }),
59
59
  f(e, $, l.orientation)
60
60
  ], a.prototype, "orientation", 2);
61
61
  n([
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@justeattakeaway/pie-divider",
3
3
  "description": "PIE Design System Divider built using Web Components",
4
- "version": "1.4.1",
4
+ "version": "1.4.3",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/justeattakeaway/pie",
package/src/divider.scss CHANGED
@@ -1,5 +1,13 @@
1
1
  @use '@justeattakeaway/pie-css/scss' as p;
2
2
 
3
+ :host {
4
+ display: block;
5
+ }
6
+
7
+ :host([orientation="vertical"]) {
8
+ height: 100%;
9
+ }
10
+
3
11
  .c-divider {
4
12
  --divider-bg-color: var(--dt-color-divider-default);
5
13
  --divider-width: 100%;
package/src/index.ts CHANGED
@@ -24,7 +24,7 @@ export class PieDivider extends PieElement implements DividerProps {
24
24
  @validPropertyValues(componentSelector, variants, defaultProps.variant)
25
25
  public variant = defaultProps.variant;
26
26
 
27
- @property({ type: String })
27
+ @property({ type: String, reflect: true })
28
28
  @validPropertyValues(componentSelector, orientations, defaultProps.orientation)
29
29
  public orientation = defaultProps.orientation;
30
30