@justeattakeaway/pie-textarea 0.3.0 → 0.3.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.
- package/custom-elements.json +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +13 -12
- package/dist/react.d.ts +2 -2
- package/package.json +2 -2
- package/src/defs.ts +3 -2
package/custom-elements.json
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"type": {
|
|
27
27
|
"text": "DefaultProps"
|
|
28
28
|
},
|
|
29
|
-
"default": "{\n size: 'medium',\n}",
|
|
29
|
+
"default": "{\n disabled: false,\n size: 'medium',\n}",
|
|
30
30
|
"description": "Default values for optional properties that have default fallback values in the component."
|
|
31
31
|
}
|
|
32
32
|
],
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentDefaultProps } from '@justeattakeaway/pie-webc-core';
|
|
2
2
|
import type { CSSResult } from 'lit';
|
|
3
3
|
import type { GenericConstructor } from '@justeattakeaway/pie-webc-core';
|
|
4
4
|
import type { LitElement } from 'lit';
|
|
@@ -8,7 +8,7 @@ import type { TemplateResult } from 'lit-html';
|
|
|
8
8
|
/**
|
|
9
9
|
* The default values for the `TextareaProps` that are required (i.e. they have a fallback value in the component).
|
|
10
10
|
*/
|
|
11
|
-
declare type DefaultProps =
|
|
11
|
+
declare type DefaultProps = ComponentDefaultProps<TextareaProps>;
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Default values for optional properties that have default fallback values in the component.
|
package/dist/index.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { LitElement as l, html as c, unsafeCSS as m } from "lit";
|
|
2
|
-
import { property as
|
|
2
|
+
import { property as d } from "lit/decorators.js";
|
|
3
3
|
import { ifDefined as f } from "lit/directives/if-defined.js";
|
|
4
4
|
import { RtlMixin as u, validPropertyValues as g, defineCustomElement as z } from "@justeattakeaway/pie-webc-core";
|
|
5
5
|
const v = `*,*:after,*:before{box-sizing:inherit}.c-textarea{--textarea-height: 72px;height:var(--textarea-height)}.c-textarea[data-pie-size=large]{--textarea-height: 80px}.c-textarea[data-pie-size=small]{--textarea-height: 64px}.c-textarea textarea{width:100%;height:100%}
|
|
6
|
-
`,
|
|
6
|
+
`, b = ["small", "medium", "large"], n = {
|
|
7
|
+
disabled: !1,
|
|
7
8
|
size: "medium"
|
|
8
9
|
};
|
|
9
|
-
var
|
|
10
|
-
for (var e =
|
|
11
|
-
(p =
|
|
12
|
-
return
|
|
10
|
+
var y = Object.defineProperty, P = Object.getOwnPropertyDescriptor, x = (i, t, a, s) => {
|
|
11
|
+
for (var e = s > 1 ? void 0 : s ? P(t, a) : t, o = i.length - 1, p; o >= 0; o--)
|
|
12
|
+
(p = i[o]) && (e = (s ? p(t, a, e) : p(e)) || e);
|
|
13
|
+
return s && e && y(t, a, e), e;
|
|
13
14
|
};
|
|
14
15
|
const h = "pie-textarea";
|
|
15
16
|
class r extends u(l) {
|
|
16
17
|
constructor() {
|
|
17
|
-
super(...arguments), this.size =
|
|
18
|
+
super(...arguments), this.size = n.size;
|
|
18
19
|
}
|
|
19
20
|
render() {
|
|
20
21
|
const {
|
|
@@ -36,15 +37,15 @@ class r extends u(l) {
|
|
|
36
37
|
r.shadowRootOptions = { ...l.shadowRootOptions, delegatesFocus: !0 };
|
|
37
38
|
r.styles = m(v);
|
|
38
39
|
x([
|
|
39
|
-
|
|
40
|
+
d({ type: Boolean, reflect: !0 })
|
|
40
41
|
], r.prototype, "disabled", 2);
|
|
41
42
|
x([
|
|
42
|
-
|
|
43
|
-
g(h,
|
|
43
|
+
d({ type: String }),
|
|
44
|
+
g(h, b, n.size)
|
|
44
45
|
], r.prototype, "size", 2);
|
|
45
46
|
z(h, r);
|
|
46
47
|
export {
|
|
47
48
|
r as PieTextarea,
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
n as defaultProps,
|
|
50
|
+
b as sizes
|
|
50
51
|
};
|
package/dist/react.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentDefaultProps } from '@justeattakeaway/pie-webc-core';
|
|
2
2
|
import type { CSSResult } from 'lit';
|
|
3
3
|
import type { GenericConstructor } from '@justeattakeaway/pie-webc-core';
|
|
4
4
|
import type { LitElement } from 'lit';
|
|
@@ -9,7 +9,7 @@ import type { TemplateResult } from 'lit-html';
|
|
|
9
9
|
/**
|
|
10
10
|
* The default values for the `TextareaProps` that are required (i.e. they have a fallback value in the component).
|
|
11
11
|
*/
|
|
12
|
-
declare type DefaultProps =
|
|
12
|
+
declare type DefaultProps = ComponentDefaultProps<TextareaProps>;
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Default values for optional properties that have default fallback values in the component.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justeattakeaway/pie-textarea",
|
|
3
3
|
"description": "PIE Design System Textarea built using Web Components",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"cem-plugin-module-file-extensions": "0.0.5"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@justeattakeaway/pie-webc-core": "0.
|
|
43
|
+
"@justeattakeaway/pie-webc-core": "0.24.0"
|
|
44
44
|
},
|
|
45
45
|
"volta": {
|
|
46
46
|
"extends": "../../../package.json"
|
package/src/defs.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ComponentDefaultProps } from '@justeattakeaway/pie-webc-core';
|
|
2
2
|
|
|
3
3
|
export const sizes = ['small', 'medium', 'large'] as const;
|
|
4
4
|
|
|
@@ -17,11 +17,12 @@ export interface TextareaProps {
|
|
|
17
17
|
/**
|
|
18
18
|
* The default values for the `TextareaProps` that are required (i.e. they have a fallback value in the component).
|
|
19
19
|
*/
|
|
20
|
-
type DefaultProps =
|
|
20
|
+
type DefaultProps = ComponentDefaultProps<TextareaProps>;
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Default values for optional properties that have default fallback values in the component.
|
|
24
24
|
*/
|
|
25
25
|
export const defaultProps: DefaultProps = {
|
|
26
|
+
disabled: false,
|
|
26
27
|
size: 'medium',
|
|
27
28
|
};
|