Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions core/api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1475,9 +1475,25 @@ ion-range,css-prop,--pin-color,ios
ion-range,css-prop,--pin-color,md
ion-range,part,bar
ion-range,part,bar-active
ion-range,part,focused
ion-range,part,hover
ion-range,part,knob
ion-range,part,knob-a
ion-range,part,knob-b
ion-range,part,knob-handle
ion-range,part,knob-handle-a
ion-range,part,knob-handle-b
ion-range,part,knob-handle-lower
ion-range,part,knob-handle-upper
ion-range,part,knob-lower
ion-range,part,knob-upper
ion-range,part,label
ion-range,part,pin
ion-range,part,pin-a
ion-range,part,pin-b
ion-range,part,pin-lower
ion-range,part,pin-upper
ion-range,part,pressed
ion-range,part,tick
ion-range,part,tick-active

Expand Down
4 changes: 3 additions & 1 deletion core/setupJest.js
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is required otherwise it won't match knob when it has knob knob-a.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ expect.extend({
throw new Error('expected toHaveShadowPart to be called on an element with a shadow root');
}

const shadowPart = received.shadowRoot.querySelector(`[part="${part}"]`);
// Use attribute selector with ~= to match space-separated part values
// e.g., [part~="knob"] matches elements with part="knob" or part="knob knob-a"
const shadowPart = received.shadowRoot.querySelector(`[part~="${part}"]`);
const pass = shadowPart !== null;

const message = `expected ${received.tagName.toLowerCase()} to have shadow part "${part}"`;
Expand Down
2 changes: 2 additions & 0 deletions core/src/components/range/range-interface.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
export type KnobName = 'A' | 'B' | undefined;

export type KnobPosition = 'lower' | 'upper' | undefined;

export type RangeValue = number | { lower: number; upper: number };

export type PinFormatter = (value: number) => number | string;
Expand Down
Loading
Loading