@zag-js/slider 0.2.5 → 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,6 @@
1
+ import * as _zag_js_anatomy from '@zag-js/anatomy';
2
+
3
+ declare const anatomy: _zag_js_anatomy.AnatomyInstance<"root" | "label" | "thumb" | "hiddenInput" | "output" | "track" | "range" | "control" | "markerGroup" | "marker">;
4
+ declare const parts: Record<"root" | "label" | "thumb" | "hiddenInput" | "output" | "track" | "range" | "control" | "markerGroup" | "marker", _zag_js_anatomy.AnatomyPart>;
5
+
6
+ export { anatomy, parts };
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/slider.anatomy.ts
21
+ var slider_anatomy_exports = {};
22
+ __export(slider_anatomy_exports, {
23
+ anatomy: () => anatomy,
24
+ parts: () => parts
25
+ });
26
+ module.exports = __toCommonJS(slider_anatomy_exports);
27
+ var import_anatomy = require("@zag-js/anatomy");
28
+ var anatomy = (0, import_anatomy.createAnatomy)("slider").parts(
29
+ "root",
30
+ "label",
31
+ "thumb",
32
+ "hiddenInput",
33
+ "output",
34
+ "track",
35
+ "range",
36
+ "control",
37
+ "markerGroup",
38
+ "marker"
39
+ );
40
+ var parts = anatomy.build();
41
+ // Annotate the CommonJS export names for ESM import in node:
42
+ 0 && (module.exports = {
43
+ anatomy,
44
+ parts
45
+ });
@@ -0,0 +1,8 @@
1
+ import {
2
+ anatomy,
3
+ parts
4
+ } from "./chunk-3Y7IIPR5.mjs";
5
+ export {
6
+ anatomy,
7
+ parts
8
+ };
@@ -0,0 +1,29 @@
1
+ import { PropTypes, NormalizeProps } from '@zag-js/types';
2
+ import { State, Send } from './slider.types.js';
3
+ import '@zag-js/core';
4
+
5
+ declare function connect<T extends PropTypes>(state: State, send: Send, normalize: NormalizeProps<T>): {
6
+ isFocused: boolean;
7
+ isDragging: boolean;
8
+ value: number;
9
+ percent: number;
10
+ setValue(value: number): void;
11
+ getPercentValue(percent: number): number;
12
+ focus(): void;
13
+ increment(): void;
14
+ decrement(): void;
15
+ rootProps: T["element"];
16
+ labelProps: T["label"];
17
+ thumbProps: T["element"];
18
+ hiddenInputProps: T["input"];
19
+ outputProps: T["output"];
20
+ trackProps: T["element"];
21
+ rangeProps: T["element"];
22
+ controlProps: T["element"];
23
+ markerGroupProps: T["element"];
24
+ getMarkerProps({ value }: {
25
+ value: number;
26
+ }): T["element"];
27
+ };
28
+
29
+ export { connect };