@symbo.ls/button 0.6.15 → 0.6.18

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/dist/index.js ADDED
@@ -0,0 +1,99 @@
1
+ var $eKWst$symbolsshape = require("@symbo.ls/shape");
2
+ var $eKWst$symbolsicontext = require("@symbo.ls/icon-text");
3
+ var $eKWst$symbolsblock = require("@symbo.ls/block");
4
+ var $eKWst$symbolsdirection = require("@symbo.ls/direction");
5
+
6
+ function $parcel$defineInteropFlag(a) {
7
+ Object.defineProperty(a, '__esModule', {value: true, configurable: true});
8
+ }
9
+ function $parcel$export(e, n, v, s) {
10
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
11
+ }
12
+
13
+ $parcel$defineInteropFlag(module.exports);
14
+
15
+ $parcel$export(module.exports, "Button", () => $d81ab3f5655f26d0$export$353f5b6fc5456de1);
16
+ $parcel$export(module.exports, "SquareButton", () => $d81ab3f5655f26d0$export$51cd5c72b5e560c6);
17
+ $parcel$export(module.exports, "CircleButton", () => $d81ab3f5655f26d0$export$235c11ae4b685dbd);
18
+ $parcel$export(module.exports, "KangorooButton", () => $d81ab3f5655f26d0$export$6fbe98cd572b6a70);
19
+ $parcel$export(module.exports, "default", () => $d81ab3f5655f26d0$export$2e2bcd8739ae039);
20
+
21
+
22
+
23
+
24
+ 'use strict';
25
+ var $a066f8277a467f68$export$2e2bcd8739ae039 = {
26
+ appearance: 'none',
27
+ border: 'none',
28
+ outline: 0,
29
+ cursor: 'pointer',
30
+ fontFamily: 'inherit',
31
+ display: 'inline-flex',
32
+ alignItems: 'center',
33
+ justifyContent: 'center',
34
+ textDecoration: 'none'
35
+ };
36
+
37
+
38
+ 'use strict';
39
+ const $d81ab3f5655f26d0$export$353f5b6fc5456de1 = {
40
+ proto: [
41
+ $eKWst$symbolsshape.Shape,
42
+ $eKWst$symbolsblock.Block,
43
+ $eKWst$symbolsicontext.IconText,
44
+ $eKWst$symbolsdirection.Direction
45
+ ],
46
+ tag: 'button',
47
+ style: $a066f8277a467f68$export$2e2bcd8739ae039,
48
+ props: {
49
+ type: 'button'
50
+ },
51
+ attr: {
52
+ type: ({ props: props })=>props.type
53
+ }
54
+ };
55
+ const $d81ab3f5655f26d0$export$51cd5c72b5e560c6 = {
56
+ proto: $d81ab3f5655f26d0$export$353f5b6fc5456de1,
57
+ props: {
58
+ size: 'A',
59
+ width: 'A',
60
+ padding: 'Z',
61
+ aspectRatio: '1 / 1',
62
+ round: 'Z'
63
+ },
64
+ class: {
65
+ squareButton: {
66
+ justifyContent: 'center',
67
+ boxSizing: 'content-box'
68
+ }
69
+ }
70
+ };
71
+ const $d81ab3f5655f26d0$export$235c11ae4b685dbd = {
72
+ proto: $d81ab3f5655f26d0$export$51cd5c72b5e560c6,
73
+ props: {
74
+ round: 'C'
75
+ }
76
+ };
77
+ const $d81ab3f5655f26d0$export$6fbe98cd572b6a70 = {
78
+ tag: 'button',
79
+ proto: [
80
+ $eKWst$symbolsshape.Shape,
81
+ $eKWst$symbolsdirection.Direction,
82
+ $eKWst$symbolsblock.Block
83
+ ],
84
+ style: $a066f8277a467f68$export$2e2bcd8739ae039,
85
+ iconText: {
86
+ proto: $eKWst$symbolsicontext.IconText
87
+ },
88
+ child: {
89
+ proto: [
90
+ $eKWst$symbolsshape.Shape,
91
+ $eKWst$symbolsblock.Block,
92
+ $eKWst$symbolsicontext.IconText
93
+ ]
94
+ }
95
+ };
96
+ var $d81ab3f5655f26d0$export$2e2bcd8739ae039 = $d81ab3f5655f26d0$export$353f5b6fc5456de1;
97
+
98
+
99
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;ACAA,CAAY;IAEZ,wCAUC,GAVc,CAAC;IACd,UAAU,EAAE,CAAM;IAClB,MAAM,EAAE,CAAM;IACd,OAAO,EAAE,CAAC;IACV,MAAM,EAAE,CAAS;IACjB,UAAU,EAAE,CAAS;IACrB,O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BAAQ;QAAA,CAAC;IACjC,CAAC;AACH,CAAC;IAED,wCAAqB,GAAN,yCAAM","sources":["packages/button/src/index.js","packages/button/src/style.js"],"sourcesContent":["'use strict'\n\nimport { Shape } from '@symbo.ls/shape'\nimport { IconText } from '@symbo.ls/icon-text'\nimport { Block } from '@symbo.ls/block'\nimport { Direction } from '@symbo.ls/direction'\n\nimport style from './style'\n\nexport const Button = {\n proto: [Shape, Block, IconText, Direction],\n tag: 'button',\n style,\n props: {\n type: 'button'\n },\n attr: {\n type: ({ props }) => props.type\n }\n}\n\nexport const SquareButton = {\n proto: Button,\n props: {\n size: 'A',\n width: 'A',\n padding: 'Z',\n aspectRatio: '1 / 1',\n round: 'Z'\n },\n class: {\n squareButton: {\n justifyContent: 'center',\n boxSizing: 'content-box'\n }\n }\n}\n\nexport const CircleButton = {\n proto: SquareButton,\n props: { round: 'C' }\n}\n\nexport const KangorooButton = {\n tag: 'button',\n proto: [Shape, Direction, Block],\n style,\n\n iconText: {\n proto: IconText\n },\n\n child: {\n proto: [Shape, Block, IconText]\n }\n}\n\nexport default Button\n","'use strict'\n\nexport default {\n appearance: 'none',\n border: 'none',\n outline: 0,\n cursor: 'pointer',\n fontFamily: 'inherit',\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n textDecoration: 'none'\n}\n"],"names":[],"version":3,"file":"index.js.map"}
package/index.js CHANGED
@@ -8,7 +8,7 @@ import { Direction } from '@symbo.ls/direction'
8
8
  import style from './style'
9
9
 
10
10
  export const Button = {
11
- proto: [Shape, Block, IconText, Direction],
11
+ extends: [Shape, Block, IconText, Direction],
12
12
  tag: 'button',
13
13
  style,
14
14
  props: {
@@ -16,11 +16,17 @@ export const Button = {
16
16
  },
17
17
  attr: {
18
18
  type: ({ props }) => props.type
19
+ },
20
+
21
+ on: {
22
+ click: (event, { key, value, props }) => {
23
+ props.onClick && props.onClick(event)
24
+ }
19
25
  }
20
26
  }
21
27
 
22
28
  export const SquareButton = {
23
- proto: Button,
29
+ extends: Button,
24
30
  props: {
25
31
  size: 'A',
26
32
  width: 'A',
@@ -37,21 +43,21 @@ export const SquareButton = {
37
43
  }
38
44
 
39
45
  export const CircleButton = {
40
- proto: SquareButton,
46
+ extends: SquareButton,
41
47
  props: { round: 'C' }
42
48
  }
43
49
 
44
50
  export const KangorooButton = {
45
51
  tag: 'button',
46
- proto: [Shape, Direction, Block],
52
+ extends: [Shape, Direction, Block],
47
53
  style,
48
54
 
49
55
  iconText: {
50
- proto: IconText
56
+ extends: IconText
51
57
  },
52
58
 
53
59
  child: {
54
- proto: [Shape, Block, IconText]
60
+ extends: [Shape, Block, IconText]
55
61
  }
56
62
  }
57
63
 
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@symbo.ls/button",
3
- "version": "0.6.15",
4
- "main": "dist/index.js",
3
+ "version": "0.6.18",
4
+ "main": "index.js",
5
5
  "license": "MIT",
6
- "gitHead": "538c70b8727a5c40d70155d34fecdfc914e26a5b",
6
+ "gitHead": "eabd5282ecb233f09e8654db6c42186b0f73c2fd",
7
7
  "dependencies": {
8
- "@symbo.ls/block": "^0.6.15",
9
- "@symbo.ls/direction": "^0.6.15",
10
- "@symbo.ls/icon-text": "^0.6.15",
11
- "@symbo.ls/shape": "^0.6.15"
8
+ "@symbo.ls/block": "^0.6.18",
9
+ "@symbo.ls/direction": "^0.6.18",
10
+ "@symbo.ls/icon-text": "^0.6.18",
11
+ "@symbo.ls/shape": "^0.6.18"
12
12
  },
13
13
  "source": "src/index.js"
14
14
  }
@@ -0,0 +1,17 @@
1
+ var $4nQLP$symbolsreacttransformer = require("@symbo.ls/react-transformer");
2
+ var $4nQLP$symbolsbutton = require("@symbo.ls/button");
3
+
4
+ function $parcel$export(e, n, v, s) {
5
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
6
+ }
7
+
8
+ $parcel$export(module.exports, "Button", () => $d19727fd684347e6$export$353f5b6fc5456de1);
9
+
10
+
11
+ 'use strict';
12
+ const $d19727fd684347e6$export$353f5b6fc5456de1 = (props, state)=>{
13
+ return $4nQLP$symbolsreacttransformer.reactTransformer($4nQLP$symbolsbutton.Button, props, state);
14
+ };
15
+
16
+
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;AAAA,CAAY;AAKL,KAAK,CAAC,yCAAM,IAAI,KAAK,EAAE,KAAK,GAAK,CAAC;IACvC,MAAM,CAAC,+CAAgB,CAAC,2BAAS,EAAE,KAAK,EAAE,KAAK;AACjD,CAAC","sources":["packages/button/packages/react/src/index.js"],"sourcesContent":["'use strict'\n\nimport { reactTransformer } from '@symbo.ls/react-transformer'\nimport { Button as component } from '@symbo.ls/button'\n\nexport const Button = (props, state) => {\n return reactTransformer(component, props, state)\n}\n"],"names":[],"version":3,"file":"index.js.map"}
@@ -1,8 +1,12 @@
1
1
  'use strict'
2
2
 
3
3
  import { DOMQLReact } from '@symbo.ls/transform-react'
4
- import { Button as component } from '@symbo.ls/button'
4
+ import { Button as ButtonCopy, SquareButton as SquareButtonCopy } from '@symbo.ls/button'
5
5
 
6
6
  export const Button = (props, state) => {
7
- return DOMQLReact(component, props, state)
7
+ return DOMQLReact(ButtonCopy, props, state)
8
+ }
9
+
10
+ export const SquareButton = (props, state) => {
11
+ return DOMQLReact(SquareButtonCopy, props, state)
8
12
  }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@symbo.ls/react-button",
3
- "version": "0.6.15",
3
+ "version": "0.6.18",
4
4
  "main": "dist/index.js",
5
5
  "license": "MIT",
6
- "gitHead": "538c70b8727a5c40d70155d34fecdfc914e26a5b",
6
+ "gitHead": "eabd5282ecb233f09e8654db6c42186b0f73c2fd",
7
7
  "dependencies": {
8
- "@symbo.ls/button": "^0.6.15",
9
- "@symbo.ls/transform-react": "^0.6.15"
8
+ "@symbo.ls/button": "^0.6.18",
9
+ "@symbo.ls/transform-react": "^0.6.18"
10
10
  },
11
11
  "source": "src/index.js"
12
12
  }