@symbo.ls/button 2.11.261 → 2.11.269

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 (2) hide show
  1. package/index.js +16 -23
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -37,6 +37,7 @@ export const Button = {
37
37
  fontFamily: 'inherit',
38
38
  round: 'C2'
39
39
  },
40
+
40
41
  attr: {
41
42
  type: ({ props }) => props.type
42
43
  }
@@ -49,6 +50,8 @@ export const SquareButton = {
49
50
  width: 'A',
50
51
  padding: 'Z',
51
52
  aspectRatio: '1 / 1',
53
+ icon: 'smile',
54
+ boxSize: 'fit-content fit-content',
52
55
  justifyContent: 'center',
53
56
  round: 'Z',
54
57
  boxSizing: 'content-box'
@@ -65,38 +68,28 @@ export const KangorooButton = {
65
68
  childExtend: IconText
66
69
  }
67
70
 
68
- export const CommonButton = {
71
+ export const FlexButton = {
69
72
  extend: Button,
73
+
70
74
  props: {
71
- theme: 'primary',
72
75
  boxSize: 'fit-content',
73
76
  padding: 'Z2 A2',
74
77
  round: 'Z1',
75
78
  gap: 'X1',
76
79
  position: 'relative'
77
80
  },
81
+
78
82
  Icon: {
79
83
  props: { fontSize: 'B1' }
80
84
  },
81
85
 
82
- text: 'Button'
83
- }
84
-
85
- export const IconCommonButton = {
86
- extend: CommonButton,
87
- props: {
88
- icon: 'smile',
89
- boxSize: 'fit-content fit-content',
90
- padding: 'Z2',
91
- theme: 'tertiary'
92
- },
93
- caption: null
86
+ Text: { text: 'Button' }
94
87
  }
95
88
 
96
89
  export const ButtonSet = {
97
90
  tag: 'nav',
98
91
  extend: Flex,
99
- childExtend: IconCommonButton
92
+ childExtend: SquareButton
100
93
  }
101
94
 
102
95
  export const CancelConfirmButtons = {
@@ -106,7 +99,7 @@ export const CancelConfirmButtons = {
106
99
  maxWidth: 'fit-content'
107
100
  },
108
101
  childExtend: {
109
- extend: CommonButton,
102
+ extend: FlexButton,
110
103
  props: {
111
104
  ':first-child': {
112
105
  theme: 'transparent',
@@ -115,13 +108,13 @@ export const CancelConfirmButtons = {
115
108
  }
116
109
  },
117
110
  ...[
118
- { caption: { props: { text: 'No' } } },
119
- { caption: { props: { text: 'Yes' } } }
111
+ { Text: 'No' },
112
+ { Text: 'Yes' }
120
113
  ]
121
114
  }
122
115
 
123
116
  export const IcontextButton = {
124
- extend: CommonButton,
117
+ extend: FlexButton,
125
118
  props: {
126
119
  position: 'relative',
127
120
  theme: 'tertiary',
@@ -131,7 +124,7 @@ export const IcontextButton = {
131
124
  }
132
125
 
133
126
  export const DropDownButton = {
134
- extend: CommonButton,
127
+ extend: FlexButton,
135
128
  props: {
136
129
  gap: 'X2',
137
130
  boxSize: 'fit-content fit-content',
@@ -141,7 +134,7 @@ export const DropDownButton = {
141
134
  Icon: {
142
135
  fontSize: 'D'
143
136
  },
144
- caption: { text: 'All' }
137
+ Text: { text: 'All' }
145
138
  }
146
139
  }
147
140
 
@@ -174,12 +167,12 @@ export const PlusMinusButtons = {
174
167
  gap: 'A'
175
168
  },
176
169
  Minus: {
177
- extend: IconCommonButton,
170
+ extend: SquareButton,
178
171
  props: { icon: 'minus' }
179
172
  },
180
173
  Value: { props: { text: '1' } },
181
174
  Plus: {
182
- extend: IconCommonButton,
175
+ extend: SquareButton,
183
176
  props: { icon: 'plus' }
184
177
  }
185
178
  }
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@symbo.ls/button",
3
- "version": "2.11.261",
3
+ "version": "2.11.269",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
- "gitHead": "53e63702105d8c7baf0f136c5756383533bf3b30",
6
+ "gitHead": "9539c62d29cc279dbe7e149aa96bb8ee019c7119",
7
7
  "dependencies": {
8
8
  "@symbo.ls/atoms": "latest",
9
9
  "@symbo.ls/icon": "latest"