@symbo.ls/button 1.1.5 → 1.2.5

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.
Files changed (3) hide show
  1. package/index.js +16 -21
  2. package/package.json +4 -4
  3. package/style.js +0 -13
package/index.js CHANGED
@@ -1,25 +1,23 @@
1
1
  'use strict'
2
2
 
3
- import { IconText } from '@symbo.ls/icon-text'
4
-
5
- const css = {
6
- appearance: 'none',
7
- border: 'none',
8
- outline: 0,
9
- cursor: 'pointer',
10
- fontFamily: 'inherit'
11
- }
3
+ import { FocusableComponent } from '@symbo.ls/atoms'
4
+ import { IconText } from '@symbo.ls/icon'
12
5
 
13
6
  export const Button = {
14
- extends: IconText,
7
+ extend: [FocusableComponent, IconText],
15
8
  tag: 'button',
16
9
  props: {
10
+ fontSize: 'A',
17
11
  type: 'button',
12
+ border: 'none',
18
13
  display: 'inline-flex',
19
- alignItems: 'center',
20
- justifyContent: 'center',
14
+ align: 'center center',
21
15
  textDecoration: 'none',
22
- css
16
+ lineHeight: '1',
17
+ whiteSpace: 'nowrap',
18
+ padding: 'Z A1',
19
+ fontFamily: 'inherit',
20
+ round: 'C2'
23
21
  },
24
22
  attr: {
25
23
  type: ({ props }) => props.type
@@ -27,7 +25,7 @@ export const Button = {
27
25
  }
28
26
 
29
27
  export const SquareButton = {
30
- extends: Button,
28
+ extend: Button,
31
29
  props: {
32
30
  fontSize: 'A',
33
31
  width: 'A',
@@ -35,19 +33,16 @@ export const SquareButton = {
35
33
  aspectRatio: '1 / 1',
36
34
  justifyContent: 'center',
37
35
  round: 'Z',
38
- css: { boxSizing: 'content-box' }
36
+ style: { boxSizing: 'content-box' }
39
37
  }
40
38
  }
41
39
 
42
40
  export const CircleButton = {
43
- extends: SquareButton,
41
+ extend: SquareButton,
44
42
  props: { round: 'C' }
45
43
  }
46
44
 
47
45
  export const KangorooButton = {
48
- tag: 'button',
49
- props: { css },
50
-
51
- iconText: { extends: IconText },
52
- child: { extends: IconText }
46
+ extend: Button,
47
+ childExtend: IconText
53
48
  }
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@symbo.ls/button",
3
- "version": "1.1.5",
3
+ "version": "1.2.5",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
- "gitHead": "8590863dfd2c60cbe59db0b4bb8239c8a7585259",
6
+ "gitHead": "8f97205ca57c54560c3f7489c518e2153c5c9b5e",
7
7
  "dependencies": {
8
- "@symbo.ls/direction": "latest",
9
- "@symbo.ls/icon-text": "latest"
8
+ "@symbo.ls/atoms": "latest",
9
+ "@symbo.ls/icon": "latest"
10
10
  },
11
11
  "source": "src/index.js"
12
12
  }
package/style.js DELETED
@@ -1,13 +0,0 @@
1
- 'use strict'
2
-
3
- export default {
4
- appearance: 'none',
5
- border: 'none',
6
- outline: 0,
7
- cursor: 'pointer',
8
- fontFamily: 'inherit',
9
- display: 'inline-flex',
10
- alignItems: 'center',
11
- justifyContent: 'center',
12
- textDecoration: 'none'
13
- }