@symbo.ls/button 2.11.198 → 2.11.210
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/index.js +30 -13
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -1,11 +1,29 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
import { Flex, FocusableComponent } from '@symbo.ls/atoms'
|
|
4
|
-
import { IconText } from '@symbo.ls/
|
|
4
|
+
import { IconText } from '@symbo.ls/Icon'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A Button component
|
|
8
|
+
* The `Button` component represents a clickable button element with customizable styles and properties.
|
|
9
|
+
*
|
|
10
|
+
* @description
|
|
11
|
+
* @extends {FocusableComponent, IconText}
|
|
12
|
+
* @typedef {Object} Button
|
|
13
|
+
* @property {string} tag - The HTML tag used to render the button (e.g., 'button').
|
|
14
|
+
* @property {string} props.type - The type attribute of the button ('button' by default).
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* // Example usage of the Button component:
|
|
18
|
+
* const myButton = {
|
|
19
|
+
* extend: Button
|
|
20
|
+
* }
|
|
21
|
+
*/
|
|
5
22
|
|
|
6
23
|
export const Button = {
|
|
7
24
|
extend: [FocusableComponent, IconText],
|
|
8
25
|
tag: 'button',
|
|
26
|
+
|
|
9
27
|
props: {
|
|
10
28
|
fontSize: 'A',
|
|
11
29
|
type: 'button',
|
|
@@ -50,15 +68,14 @@ export const KangorooButton = {
|
|
|
50
68
|
export const CommonButton = {
|
|
51
69
|
extend: Button,
|
|
52
70
|
props: {
|
|
53
|
-
|
|
54
|
-
background: 'blue',
|
|
71
|
+
theme: 'primary',
|
|
55
72
|
boxSize: 'fit-content',
|
|
56
73
|
padding: 'A A2',
|
|
57
74
|
round: 'Z2',
|
|
58
75
|
gap: 'Y2',
|
|
59
76
|
position: 'relative'
|
|
60
77
|
},
|
|
61
|
-
|
|
78
|
+
Icon: {
|
|
62
79
|
props: { fontSize: 'C' }
|
|
63
80
|
},
|
|
64
81
|
Caption: {
|
|
@@ -72,7 +89,7 @@ export const CommonButton = {
|
|
|
72
89
|
export const IconCommonButton = {
|
|
73
90
|
extend: CommonButton,
|
|
74
91
|
props: {
|
|
75
|
-
|
|
92
|
+
Icon: { name: 'smile' },
|
|
76
93
|
boxSize: 'fit-content fit-content',
|
|
77
94
|
padding: 'A',
|
|
78
95
|
background: 'gray3'
|
|
@@ -114,27 +131,27 @@ export const CancelConfirmButtons = {
|
|
|
114
131
|
export const IcontextButton = {
|
|
115
132
|
extend: CommonButton,
|
|
116
133
|
props: {
|
|
117
|
-
padding: 'A',
|
|
134
|
+
padding: 'A A1',
|
|
118
135
|
position: 'relative',
|
|
119
136
|
background: 'gray3',
|
|
120
|
-
|
|
137
|
+
Icon: { name: 'smile' }
|
|
121
138
|
}
|
|
122
139
|
}
|
|
123
140
|
|
|
124
141
|
export const DropDownButton = {
|
|
125
142
|
extend: CommonButton,
|
|
126
143
|
props: {
|
|
127
|
-
gap: '
|
|
144
|
+
gap: 'X2',
|
|
128
145
|
boxSize: 'fit-content fit-content',
|
|
129
|
-
padding: '
|
|
146
|
+
padding: 'Z2 B Z2 A',
|
|
130
147
|
round: 'Z',
|
|
131
148
|
background: '#141416',
|
|
132
149
|
color: 'white',
|
|
133
|
-
|
|
150
|
+
Icon: {
|
|
134
151
|
name: 'chevronDown',
|
|
135
152
|
fontSize: 'D'
|
|
136
153
|
},
|
|
137
|
-
Caption: { text: '
|
|
154
|
+
Caption: { text: 'All' }
|
|
138
155
|
}
|
|
139
156
|
}
|
|
140
157
|
|
|
@@ -166,11 +183,11 @@ export const PlusMinusButtons = {
|
|
|
166
183
|
},
|
|
167
184
|
Minus: {
|
|
168
185
|
extend: IconCommonButton,
|
|
169
|
-
props: {
|
|
186
|
+
props: { Icon: { name: 'minus' } }
|
|
170
187
|
},
|
|
171
188
|
Value: { props: { text: '1' } },
|
|
172
189
|
Plus: {
|
|
173
190
|
extend: IconCommonButton,
|
|
174
|
-
props: {
|
|
191
|
+
props: { Icon: { name: 'plus' } }
|
|
175
192
|
}
|
|
176
193
|
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/button",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.210",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"gitHead": "
|
|
6
|
+
"gitHead": "45ec4a9a2ab3233c83b705202980d45b0c3cb91e",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@symbo.ls/atoms": "latest",
|
|
9
9
|
"@symbo.ls/icon": "latest"
|