File tree Expand file tree Collapse file tree 4 files changed +31
-10
lines changed
Expand file tree Collapse file tree 4 files changed +31
-10
lines changed Original file line number Diff line number Diff line change 283283 --neo-btn-border-color ,
284284 var (--neo-glass-top-border-color ) var (--neo-glass-right-border-color ) var (--neo-glass-bottom-border-color ) var (--neo-glass-left-border-color )
285285 );
286- backdrop-filter : var (--neo-blur-2 ) var (--neo-saturate-3 );
286+ backdrop-filter : var (--neo-btn-backdrop-filter , var ( --neo- blur-2 ) var (--neo-saturate-3 ) );
287287
288288 & :focus-visible {
289- background-color : var (--neo-glass-background-color-focus );
290- backdrop-filter : var (--neo-blur-1 ) var (--neo-saturate-3 );
289+ background-color : var (--neo-btn-bg-color , var ( --neo- glass-background-color-focus) );
290+ backdrop-filter : var (--neo-btn-backdrop-filter-focus , var ( --neo- blur-1 ) var (--neo-saturate-3 ) );
291291 }
292292
293293 & :hover {
294- background-color : var (--neo-glass-background-color-hover );
295- backdrop-filter : var (--neo-blur-1 ) var (--neo-saturate-2 );
294+ background-color : var (--neo-btn-bg-color , var ( --neo- glass-background-color-hover) );
295+ backdrop-filter : var (--neo-btn-backdrop-filter-hover , var ( --neo- blur-1 ) var (--neo-saturate-2 ) );
296296 }
297297
298298 & .neo-pressed ,
299299 & :active:not (.neo-loading ) {
300- backdrop-filter : var (--neo-blur-0 ) var (--neo-saturate-2 );
300+ backdrop-filter : var (--neo-btn-backdrop-filter-active , var ( --neo- blur-0 ) var (--neo-saturate-2 ) );
301301 }
302302
303303 & :disabled ,
304304 & [disabled ]:not ([disabled = ' false' ]) {
305- backdrop-filter : var (--neo-blur-1 );
305+ backdrop-filter : var (--neo-btn-backdrop-filter-disabled , var ( --neo- blur-1) );
306306 }
307307
308308 & .neo-inset {
Original file line number Diff line number Diff line change 616616 --neo-btn-padding : 0.5rem 0.75rem ;
617617 --neo-btn-margin : auto ;
618618 --neo-btn-box-shadow-active-flat-toggle : var (--neo-box-shadow-inset-2 );
619+ --neo-btn-bg-color : transparent ;
620+ --neo-btn-backdrop-filter : none ;
619621 }
620622
621623 & .neo-inset :global(.neo-button ) {
734736 opacity : var (--neo-input-opacity-disabled , var (--neo-opacity-disabled ));
735737
736738 & :not (.neo-borderless ) {
737- border-color : var (--neo-btn -border-color-disabled , var (--neo-border-color-disabled )) !important ;
739+ border-color : var (--neo-input -border-color-disabled , var (--neo-border-color-disabled )) !important ;
738740 }
739741
740742 .neo-input-label {
Original file line number Diff line number Diff line change 77 import IconAdd from ' ~/icons/IconAdd.svelte' ;
88 import IconMinus from ' ~/icons/IconMinus.svelte' ;
99 import NeoInput from ' ~/inputs/NeoInput.svelte' ;
10+ import { toTransition , toTransitionProps } from ' ~/utils/action.utils.js' ;
1011 import { DefaultShadowElevation } from ' ~/utils/shadow.utils.js' ;
1112
1213 /* eslint-disable prefer-const -- necessary for binding checked */
2021 type = ' number' ,
2122 placeholder = ' 0' ,
2223
24+ // Transition
25+ in : inAction,
26+ out : outAction,
27+ transition : transitionAction,
28+
2329 // Events
2430 onStepUp,
2531 onStepDown,
8490 });
8591
8692 const affix = $derived (rest .clearable || rest .loading !== undefined || rest .validation );
93+
94+ const inFn = $derived (toTransition (inAction ?? transitionAction ));
95+ const inProps = $derived (toTransitionProps (inAction ?? transitionAction ));
96+ const outFn = $derived (toTransition (outAction ?? transitionAction ));
97+ const outProps = $derived (toTransitionProps (outAction ?? transitionAction ));
8798 </script >
8899
89100{#snippet before ()}
102113 </NeoButton >
103114{/ snippet }
104115
105- <svelte:element this ={numberTag } class:neo-number-step ={true } class:neo-label ={rest .label } class:neo-affix ={affix } {...numberProps }>
116+ <svelte:element
117+ this ={numberTag }
118+ class:neo-number-step ={true }
119+ class:neo-label ={rest .label }
120+ class:neo-affix ={affix }
121+ out:outFn ={outProps }
122+ in:inFn ={inProps }
123+ {...numberProps }
124+ >
106125 <NeoInput bind:ref bind:labelRef bind:beforeRef bind:value bind:valid bind:dirty bind:touched {type } {placeholder } {before } {after } {...rest } />
107126</svelte:element >
108127
Original file line number Diff line number Diff line change 691691 opacity : var (--neo-textarea-opacity-disabled , var (--neo-opacity-disabled ));
692692
693693 & :not (.neo-borderless ) {
694- border-color : var (--neo-btn -border-color-disabled , var (--neo-border-color-disabled )) !important ;
694+ border-color : var (--neo-input -border-color-disabled , var (--neo-border-color-disabled )) !important ;
695695 }
696696
697697 .neo-textarea-label {
You can’t perform that action at this time.
0 commit comments