-
-
-
x.handleThumbMouseDown(c.event as MouseEvent)}"
- @touchstart="${(x, c) => x.handleThumbMouseDown(c.event as MouseEvent)}"
- >
- ${staticallyCompose(options.thumb)}
-
+
+
x.handleThumbPointerDown(c.event as PointerEvent)}"
+ >
+ ${staticallyCompose(options.thumb)}
`;
}
export const template: ElementViewTemplate
= sliderTemplate({
- thumb: ``,
+ thumb: ``,
});
diff --git a/packages/web-components/src/slider/slider.ts b/packages/web-components/src/slider/slider.ts
index d9b8e2c64ce2b..56804727aec2d 100644
--- a/packages/web-components/src/slider/slider.ts
+++ b/packages/web-components/src/slider/slider.ts
@@ -1,4 +1,4 @@
-import { attr, css, nullableNumberConverter, observable, Observable } from '@microsoft/fast-element';
+import { attr, css, FASTElement, observable, Observable } from '@microsoft/fast-element';
import type { ElementStyles } from '@microsoft/fast-element';
import {
Direction,
@@ -11,16 +11,47 @@ import {
limit,
Orientation,
} from '@microsoft/fast-web-utilities';
-import { getDirection } from '../utils/index.js';
-import { SliderConfiguration, SliderMode, SliderSize } from './slider.options.js';
-import { FormAssociatedSlider } from './slider.form-associated.js';
+import { numberLikeStringConverter } from '../utils/converters.js';
+import { getDirection } from '../utils/direction.js';
+import { toggleState } from '../utils/element-internals.js';
+import { SliderConfiguration, SliderMode, SliderOrientation, SliderSize } from './slider.options.js';
import { convertPixelToPercent } from './slider-utilities.js';
/**
* The base class used for constructing a fluent-slider custom element
+ *
+ * @slot thumb - The slot for a custom thumb element.
+ * @csspart thumb-container - The container element of the thumb.
+ * @csspart track-container - The container element of the track.
+ * @fire change - Fires a custom 'change' event when the value changes.
+ *
* @public
*/
-export class Slider extends FormAssociatedSlider implements SliderConfiguration {
+export class Slider extends FASTElement implements SliderConfiguration {
+ /**
+ * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
+ *
+ * @internal
+ */
+ public elementInternals: ElementInternals = this.attachInternals();
+
+ /**
+ * The form-associated flag.
+ * @see {@link https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-face-example | Form-associated custom elements}
+ *
+ * @public
+ */
+ public static formAssociated = true;
+
+ /**
+ * A reference to all associated `