fix(range): update tokens usage, and add pressed state (#30601)
Issue number: internal --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - improve tokens usage; - increase white space to 44px square; ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer for more information. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> - [Basic](https://ionic-framework-git-rou-12075-ionic1.vercel.app/src/components/range/test/basic?ionic:theme=ionic) - [States](https://ionic-framework-git-rou-12075-ionic1.vercel.app/src/components/range/test/states?ionic:theme=ionic) - [Custom](https://ionic-framework-git-rou-12075-ionic1.vercel.app/src/components/range/test/custom?ionic:theme=ionic) --------- Co-authored-by: ionitron <hi@ionicframework.com> Co-authored-by: Brandy Smith <brandyscarney@users.noreply.github.com>
@ -6,15 +6,15 @@
|
||||
|
||||
:host {
|
||||
--knob-border-radius: #{globals.$ion-border-radius-full};
|
||||
--knob-background: #{globals.$ion-primitives-base-white};
|
||||
--knob-background: #{globals.$ion-bg-input-default};
|
||||
--knob-box-shadow: none;
|
||||
--knob-size: #{globals.$ion-scale-600};
|
||||
--knob-handle-size: #{globals.$ion-scale-1000};
|
||||
--knob-handle-size: #{globals.$ion-scale-1100};
|
||||
--bar-height: #{globals.$ion-scale-200};
|
||||
--bar-background: #{globals.$ion-primitives-neutral-100};
|
||||
--bar-background: #{globals.$ion-bg-neutral-subtle-default};
|
||||
--bar-background-active: #{globals.ion-color(primary, base)};
|
||||
--bar-border-radius: #{globals.$ion-border-radius-400};
|
||||
--height: #{globals.$ion-scale-1000};
|
||||
--height: #{globals.$ion-scale-1100};
|
||||
|
||||
@include globals.typography(globals.$ion-body-md-regular);
|
||||
|
||||
@ -75,7 +75,7 @@
|
||||
@include margin(null, null, calc(globals.$ion-space-200 + globals.$ion-font-size-300), null);
|
||||
}
|
||||
|
||||
.range-bar-active {
|
||||
.range-bar.range-bar-active {
|
||||
bottom: 0;
|
||||
|
||||
width: auto;
|
||||
@ -115,6 +115,8 @@
|
||||
|
||||
background: transparent;
|
||||
|
||||
color: globals.$ion-text-default;
|
||||
|
||||
font-size: globals.$ion-font-size-300;
|
||||
|
||||
text-align: center;
|
||||
@ -123,7 +125,7 @@
|
||||
.range-knob {
|
||||
border-width: globals.$ion-border-size-025;
|
||||
border-style: globals.$ion-border-style-solid;
|
||||
border-color: globals.ion-color(primary, base);
|
||||
border-color: globals.$ion-border-primary;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@ -134,7 +136,13 @@
|
||||
// icons need to receive the same opacity.
|
||||
|
||||
:host(.range-disabled) {
|
||||
opacity: 0.3;
|
||||
--bar-background: #{globals.$ion-bg-neutral-subtle-default};
|
||||
|
||||
.range-knob {
|
||||
border-color: globals.$ion-border-input-default;
|
||||
|
||||
background: globals.$ion-bg-input-disabled;
|
||||
}
|
||||
}
|
||||
|
||||
// Range Label Placement - Start
|
||||
@ -207,3 +215,10 @@
|
||||
.range-knob-handle.ion-focused .range-knob {
|
||||
@include globals.focused-state();
|
||||
}
|
||||
|
||||
// Range Pressed
|
||||
// ----------------------------------------------------------------
|
||||
.range-knob-handle.ion-activated .range-knob,
|
||||
.range-knob-handle.range-knob-pressed .range-knob {
|
||||
background: globals.$ion-bg-input-press;
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |