@mieweb/ui 0.1.1 → 0.2.0
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.
- package/dist/brands/index.cjs +7 -7
- package/dist/brands/index.js +2 -2
- package/dist/chunk-4T2ZNPTC.js +220 -0
- package/dist/chunk-4T2ZNPTC.js.map +1 -0
- package/dist/{chunk-NL3CZNBH.cjs → chunk-5UUL5EEO.cjs} +16 -5
- package/dist/chunk-5UUL5EEO.cjs.map +1 -0
- package/dist/chunk-BV75DAKO.cjs +245 -0
- package/dist/chunk-BV75DAKO.cjs.map +1 -0
- package/dist/{chunk-6DP6RKUA.cjs → chunk-CLJZHS7Y.cjs} +2 -2
- package/dist/{chunk-6DP6RKUA.cjs.map → chunk-CLJZHS7Y.cjs.map} +1 -1
- package/dist/{chunk-MFB4FS7D.js → chunk-QSMMFATL.js} +16 -5
- package/dist/chunk-QSMMFATL.js.map +1 -0
- package/dist/{chunk-FIUNOH6W.js → chunk-S4DK5WN6.js} +2 -2
- package/dist/{chunk-FIUNOH6W.js.map → chunk-S4DK5WN6.js.map} +1 -1
- package/dist/components/Select/index.cjs +3 -3
- package/dist/components/Select/index.js +1 -1
- package/dist/components/Slider/index.cjs +25 -0
- package/dist/components/Slider/index.cjs.map +1 -0
- package/dist/components/Slider/index.d.cts +82 -0
- package/dist/components/Slider/index.d.ts +82 -0
- package/dist/components/Slider/index.js +4 -0
- package/dist/components/Slider/index.js.map +1 -0
- package/dist/index.cjs +1032 -584
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +52 -14
- package/dist/index.d.ts +52 -14
- package/dist/index.js +1012 -580
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/chunk-MFB4FS7D.js.map +0 -1
- package/dist/chunk-NL3CZNBH.cjs.map +0 -1
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
declare const sliderTrackVariants: (props?: ({
|
|
6
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
7
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
8
|
+
declare const sliderRangeVariants: (props?: ({
|
|
9
|
+
variant?: "danger" | "default" | "success" | "warning" | "neutral" | null | undefined;
|
|
10
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
11
|
+
declare const sliderThumbVariants: (props?: ({
|
|
12
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
13
|
+
variant?: "danger" | "default" | "success" | "warning" | "neutral" | null | undefined;
|
|
14
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
15
|
+
interface SliderProps extends VariantProps<typeof sliderTrackVariants>, VariantProps<typeof sliderRangeVariants> {
|
|
16
|
+
/** Current value (controlled) */
|
|
17
|
+
value?: number;
|
|
18
|
+
/** Default value (uncontrolled) */
|
|
19
|
+
defaultValue?: number;
|
|
20
|
+
/** Minimum value */
|
|
21
|
+
min?: number;
|
|
22
|
+
/** Maximum value */
|
|
23
|
+
max?: number;
|
|
24
|
+
/** Step increment */
|
|
25
|
+
step?: number;
|
|
26
|
+
/** Callback when value changes */
|
|
27
|
+
onValueChange?: (value: number) => void;
|
|
28
|
+
/** Callback when interaction ends (mouseup / touchend) */
|
|
29
|
+
onValueCommit?: (value: number) => void;
|
|
30
|
+
/** Whether the slider is disabled */
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
/** Label for the slider */
|
|
33
|
+
label?: string;
|
|
34
|
+
/** Show the current value */
|
|
35
|
+
showValue?: boolean;
|
|
36
|
+
/** Format the displayed value */
|
|
37
|
+
formatValue?: (value: number) => string;
|
|
38
|
+
/** Description text below the label */
|
|
39
|
+
description?: string;
|
|
40
|
+
/** Min label displayed below the track (left) */
|
|
41
|
+
minLabel?: string;
|
|
42
|
+
/** Max label displayed below the track (right) */
|
|
43
|
+
maxLabel?: string;
|
|
44
|
+
/** Additional class name for the root container */
|
|
45
|
+
className?: string;
|
|
46
|
+
/** Additional class name for the track */
|
|
47
|
+
trackClassName?: string;
|
|
48
|
+
/** ID for the underlying input */
|
|
49
|
+
id?: string;
|
|
50
|
+
/** Name for form submission */
|
|
51
|
+
name?: string;
|
|
52
|
+
/** Accessible label for the slider */
|
|
53
|
+
'aria-label'?: string;
|
|
54
|
+
/** ID of the element that labels the slider */
|
|
55
|
+
'aria-labelledby'?: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* A fully branded, accessible slider/range input component.
|
|
59
|
+
*
|
|
60
|
+
* Uses brand design tokens for colors, border-radius, and sizing.
|
|
61
|
+
* Supports controlled and uncontrolled usage, labels, descriptions,
|
|
62
|
+
* min/max labels, value display, and multiple color variants.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```tsx
|
|
66
|
+
* <Slider label="Volume" min={0} max={100} defaultValue={50} />
|
|
67
|
+
* <Slider
|
|
68
|
+
* label="Border Radius"
|
|
69
|
+
* min={0}
|
|
70
|
+
* max={32}
|
|
71
|
+
* value={radius}
|
|
72
|
+
* onValueChange={setRadius}
|
|
73
|
+
* showValue
|
|
74
|
+
* formatValue={(v) => `${v}px`}
|
|
75
|
+
* minLabel="Square"
|
|
76
|
+
* maxLabel="Rounded"
|
|
77
|
+
* />
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
declare const Slider: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<HTMLInputElement>>;
|
|
81
|
+
|
|
82
|
+
export { Slider, type SliderProps, sliderRangeVariants, sliderThumbVariants, sliderTrackVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|