@@ -33,7 +33,6 @@ export const Template = ({
33
33
isPending = false ,
34
34
ariaExpanded,
35
35
ariaControls,
36
- < << << << HEAD
37
36
noWrap = false ,
38
37
} = { } , context = { } ) => {
39
38
const { updateArgs } = context ;
@@ -102,58 +101,6 @@ export const Template = ({
102
101
) }
103
102
</ button >
104
103
` ;
105
- = === ===
106
- ...globals
107
- } ) => {
108
- const [ , updateArgs ] = useArgs ( ) ;
109
-
110
- return html `
111
- < button
112
- class =${ classMap ( {
113
- [ rootClass ] : true ,
114
- [ `${ rootClass } --${ treatment } ` ] : typeof treatment !== "undefined" && treatment !== "fill" ,
115
- [ `${ rootClass } --${ variant } ` ] : typeof variant !== "undefined" ,
116
- [ `${ rootClass } --size${ size ?. toUpperCase ( ) } ` ] : typeof size !== "undefined" && size !== "m" ,
117
- [ `${ rootClass } --static${ capitalize ( lowerCase ( staticColor ) ) } ` ] : typeof staticColor !== "undefined" ,
118
- [ `${ rootClass } --iconOnly` ] : hideLabel ,
119
- [ "is-pending" ] : isPending ,
120
- [ "is-disabled" ] : isDisabled ,
121
- [ "is-hover" ] : isHovered ,
122
- [ "is-focus-visible" ] : isFocused ,
123
- [ "is-active" ] : isActive ,
124
- ...customClasses . reduce ( ( a , c ) => ( { ...a , [ c ] : true } ) , { } ) ,
125
- } ) }
126
- id =${ ifDefined ( id ) }
127
- style=${ ifDefined ( styleMap ( customStyles ) ) }
128
- ?disabled=${ isDisabled }
129
- @click=${ onclick ?? function ( ) {
130
- // Toggle the is-pending state on-click
131
- updateArgs ( { isPending : true } ) ;
132
- setTimeout ( ( ) => {
133
- updateArgs ( { isPending : false } ) ;
134
- } , 3000 ) ;
135
- } }
136
- aria-label=${ ifDefined ( hideLabel ? iconName : undefined ) }
137
- aria-expanded=${ ifDefined ( ariaExpanded ?. toString ( ) ) }
138
- aria-controls=${ ifDefined ( ariaControls ) }
139
- data-testid=${ ifDefined ( testId ) }
140
- >
141
- ${ when ( iconName && ! iconAfterLabel , ( ) => Icon ( { ...globals , iconName, size } ) ) }
142
- ${ when ( label && ! hideLabel ,
143
- ( ) => html `< span class =${ `${ rootClass } -label` } > ${ label } </ span > `
144
- ) }
145
- ${ when ( iconName && iconAfterLabel , ( ) => Icon ( { ...globals , iconName, size } ) ) }
146
- ${ when ( isPending , ( ) => ProgressCircle ( {
147
- ...globals ,
148
- size : "s" ,
149
- testId : "progress-circle" ,
150
- staticColor,
151
- isIndeterminate : true ,
152
- isInField : true
153
- } ) ) }
154
- </ button >
155
- ` ;
156
- > >>> >>> eb466e45f ( feat ( button ) : migrate to Spectrum 2 ( #2600 ) )
157
104
} ;
158
105
159
106
/**
0 commit comments