@justeattakeaway/pie-divider 0.11.0 → 0.12.1

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.
@@ -2,6 +2,12 @@
2
2
  "schemaVersion": "1.0.0",
3
3
  "readme": "",
4
4
  "modules": [
5
+ {
6
+ "kind": "javascript-module",
7
+ "path": "src/defs-react.js",
8
+ "declarations": [],
9
+ "exports": []
10
+ },
5
11
  {
6
12
  "kind": "javascript-module",
7
13
  "path": "src/defs.js",
package/dist/index.d.ts CHANGED
@@ -6,11 +6,11 @@ export declare interface DividerProps {
6
6
  /**
7
7
  * What style variant the divider should be such as default or vertical.
8
8
  */
9
- variant: typeof variants[number];
9
+ variant?: typeof variants[number];
10
10
  /**
11
11
  * What orientation the divider should be such as horizontal or inverse.
12
12
  */
13
- orientation: typeof orientations[number];
13
+ orientation?: typeof orientations[number];
14
14
  }
15
15
 
16
16
  export declare const orientations: readonly ["horizontal", "vertical"];
package/dist/index.js CHANGED
@@ -20,8 +20,8 @@ class o extends h {
20
20
  data-test-id="pie-divider"
21
21
  aria-hidden="true"
22
22
  class="c-divider"
23
- variant=${i}
24
- orientation=${e}
23
+ variant=${i || "default"}
24
+ orientation=${e || "horizontal"}
25
25
  />`;
26
26
  }
27
27
  }
package/dist/react.d.ts CHANGED
@@ -1,22 +1,22 @@
1
1
  import type { CSSResult } from 'lit';
2
2
  import type { LitElement } from 'lit';
3
- import type { ReactWebComponent } from '@lit/react';
3
+ import * as React_2 from 'react';
4
4
  import type { TemplateResult } from 'lit-html';
5
5
 
6
6
  export declare interface DividerProps {
7
7
  /**
8
8
  * What style variant the divider should be such as default or vertical.
9
9
  */
10
- variant: typeof variants[number];
10
+ variant?: typeof variants[number];
11
11
  /**
12
12
  * What orientation the divider should be such as horizontal or inverse.
13
13
  */
14
- orientation: typeof orientations[number];
14
+ orientation?: typeof orientations[number];
15
15
  }
16
16
 
17
17
  export declare const orientations: readonly ["horizontal", "vertical"];
18
18
 
19
- export declare const PieDivider: ReactWebComponent<PieDivider_2, {}>;
19
+ export declare const PieDivider: React_2.ForwardRefExoticComponent<DividerProps & React_2.RefAttributes<PieDivider_2> & ReactBaseType>;
20
20
 
21
21
  /**
22
22
  * @tagname pie-divider
@@ -28,6 +28,8 @@ declare class PieDivider_2 extends LitElement implements DividerProps {
28
28
  static styles: CSSResult;
29
29
  }
30
30
 
31
+ declare type ReactBaseType = React_2.HTMLAttributes<HTMLHRElement>;
32
+
31
33
  export declare const variants: readonly ["default", "inverse"];
32
34
 
33
35
  export { }
package/dist/react.js CHANGED
@@ -1,19 +1,19 @@
1
1
  import * as e from "react";
2
2
  import { createComponent as i } from "@lit/react";
3
3
  import { PieDivider as r } from "./index.js";
4
- import { orientations as v, variants as c } from "./index.js";
4
+ import { orientations as c, variants as D } from "./index.js";
5
5
  import "lit";
6
6
  import "lit/decorators.js";
7
7
  import "@justeattakeaway/pie-webc-core";
8
- const s = i({
8
+ const t = i({
9
9
  displayName: "PieDivider",
10
10
  elementClass: r,
11
11
  react: e,
12
12
  tagName: "pie-divider",
13
13
  events: {}
14
- });
14
+ }), n = t;
15
15
  export {
16
- s as PieDivider,
17
- v as orientations,
18
- c as variants
16
+ n as PieDivider,
17
+ c as orientations,
18
+ D as variants
19
19
  };
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": "0.11.0",
4
+ "version": "0.12.1",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -32,12 +32,12 @@
32
32
  "license": "Apache-2.0",
33
33
  "devDependencies": {
34
34
  "@custom-elements-manifest/analyzer": "0.9.0",
35
- "@justeattakeaway/pie-components-config": "0.8.0",
36
- "@justeattakeaway/pie-wrapper-react": "0.12.0",
35
+ "@justeattakeaway/pie-components-config": "0.9.0",
36
+ "@justeattakeaway/pie-wrapper-react": "0.14.0",
37
37
  "cem-plugin-module-file-extensions": "0.0.5"
38
38
  },
39
39
  "dependencies": {
40
- "@justeattakeaway/pie-webc-core": "0.16.0"
40
+ "@justeattakeaway/pie-webc-core": "0.17.1"
41
41
  },
42
42
  "volta": {
43
43
  "extends": "../../../package.json"
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+
3
+ export type ReactBaseType = React.HTMLAttributes<HTMLHRElement>
package/src/defs.ts CHANGED
@@ -5,9 +5,9 @@ export interface DividerProps {
5
5
  /**
6
6
  * What style variant the divider should be such as default or vertical.
7
7
  */
8
- variant: typeof variants[number];
8
+ variant?: typeof variants[number];
9
9
  /**
10
10
  * What orientation the divider should be such as horizontal or inverse.
11
11
  */
12
- orientation: typeof orientations[number];
12
+ orientation?: typeof orientations[number];
13
13
  }
package/src/index.ts CHANGED
@@ -29,8 +29,8 @@ export class PieDivider extends LitElement implements DividerProps {
29
29
  data-test-id="pie-divider"
30
30
  aria-hidden="true"
31
31
  class="c-divider"
32
- variant=${variant}
33
- orientation=${orientation}
32
+ variant=${variant || 'default'}
33
+ orientation=${orientation || 'horizontal'}
34
34
  />`;
35
35
  }
36
36
 
package/src/react.ts CHANGED
@@ -1,14 +1,19 @@
1
-
2
1
  import * as React from 'react';
3
2
  import { createComponent } from '@lit/react';
4
- import { PieDivider as PieDividerReact } from './index';
3
+ import { PieDivider as PieDividerLit } from './index';
4
+ import { DividerProps } from './defs';
5
5
 
6
6
  export * from './defs';
7
7
 
8
- export const PieDivider = createComponent({
8
+ const PieDividerReact = createComponent({
9
9
  displayName: 'PieDivider',
10
- elementClass: PieDividerReact,
10
+ elementClass: PieDividerLit,
11
11
  react: React,
12
12
  tagName: 'pie-divider',
13
13
  events: {},
14
14
  });
15
+
16
+ type ReactBaseType = React.HTMLAttributes<HTMLHRElement>
17
+
18
+ export const PieDivider = PieDividerReact as React.ForwardRefExoticComponent<React.PropsWithoutRef<DividerProps>
19
+ & React.RefAttributes<PieDividerLit> & ReactBaseType>;