@skeletonlabs/skeleton-react 1.4.0 → 2.0.0-next.1
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/index.css +2 -0
- package/dist/index.d.ts +85 -17
- package/dist/index.js +162 -17
- package/package.json +30 -31
- package/dist/components/Accordion/Accordion.d.ts +0 -7
- package/dist/components/Accordion/Accordion.js +0 -62
- package/dist/components/Accordion/context.d.ts +0 -4
- package/dist/components/Accordion/context.js +0 -10
- package/dist/components/Accordion/types.d.ts +0 -73
- package/dist/components/Accordion/types.js +0 -2
- package/dist/components/AppBar/AppBar.d.ts +0 -9
- package/dist/components/AppBar/AppBar.js +0 -52
- package/dist/components/AppBar/types.d.ts +0 -63
- package/dist/components/AppBar/types.js +0 -1
- package/dist/components/Avatar/Avatar.d.ts +0 -3
- package/dist/components/Avatar/Avatar.js +0 -28
- package/dist/components/Avatar/types.d.ts +0 -36
- package/dist/components/Avatar/types.js +0 -1
- package/dist/components/FileUpload/FileUpload.d.ts +0 -3
- package/dist/components/FileUpload/FileUpload.js +0 -41
- package/dist/components/FileUpload/types.d.ts +0 -73
- package/dist/components/FileUpload/types.js +0 -1
- package/dist/components/Navigation/Navigation.d.ts +0 -10
- package/dist/components/Navigation/Navigation.js +0 -92
- package/dist/components/Navigation/context.d.ts +0 -2
- package/dist/components/Navigation/context.js +0 -7
- package/dist/components/Navigation/types.d.ts +0 -132
- package/dist/components/Navigation/types.js +0 -2
- package/dist/components/Pagination/Pagination.d.ts +0 -3
- package/dist/components/Pagination/Pagination.js +0 -39
- package/dist/components/Pagination/types.d.ts +0 -56
- package/dist/components/Pagination/types.js +0 -1
- package/dist/components/Progress/Progress.d.ts +0 -3
- package/dist/components/Progress/Progress.js +0 -28
- package/dist/components/Progress/types.d.ts +0 -44
- package/dist/components/Progress/types.js +0 -1
- package/dist/components/ProgressRing/ProgressRing.d.ts +0 -3
- package/dist/components/ProgressRing/ProgressRing.js +0 -34
- package/dist/components/ProgressRing/types.d.ts +0 -53
- package/dist/components/ProgressRing/types.js +0 -1
- package/dist/components/Rating/Rating.d.ts +0 -3
- package/dist/components/Rating/Rating.js +0 -50
- package/dist/components/Rating/types.d.ts +0 -36
- package/dist/components/Rating/types.js +0 -1
- package/dist/components/Segment/Segment.d.ts +0 -5
- package/dist/components/Segment/Segment.js +0 -58
- package/dist/components/Segment/context.d.ts +0 -2
- package/dist/components/Segment/context.js +0 -5
- package/dist/components/Segment/types.d.ts +0 -59
- package/dist/components/Segment/types.js +0 -2
- package/dist/components/Slider/Slider.d.ts +0 -3
- package/dist/components/Slider/Slider.js +0 -39
- package/dist/components/Slider/types.d.ts +0 -66
- package/dist/components/Slider/types.js +0 -1
- package/dist/components/Switch/Switch.d.ts +0 -3
- package/dist/components/Switch/Switch.js +0 -40
- package/dist/components/Switch/types.d.ts +0 -62
- package/dist/components/Switch/types.js +0 -1
- package/dist/components/Tabs/Tabs.d.ts +0 -12
- package/dist/components/Tabs/Tabs.js +0 -80
- package/dist/components/Tabs/context.d.ts +0 -2
- package/dist/components/Tabs/context.js +0 -5
- package/dist/components/Tabs/types.d.ts +0 -64
- package/dist/components/Tabs/types.js +0 -1
- package/dist/components/TagsInput/TagsInput.d.ts +0 -3
- package/dist/components/TagsInput/TagsInput.js +0 -39
- package/dist/components/TagsInput/types.d.ts +0 -40
- package/dist/components/TagsInput/types.js +0 -1
- package/dist/components/Toast/Toast.d.ts +0 -2
- package/dist/components/Toast/Toast.js +0 -49
- package/dist/components/Toast/Toaster.d.ts +0 -2
- package/dist/components/Toast/Toaster.js +0 -28
- package/dist/components/Toast/create-toaster.d.ts +0 -2
- package/dist/components/Toast/create-toaster.js +0 -4
- package/dist/components/Toast/types.d.ts +0 -46
- package/dist/components/Toast/types.js +0 -1
- package/dist/composed/accordion/anatomy/accordion-content.d.ts +0 -2
- package/dist/composed/accordion/anatomy/accordion-content.js +0 -14
- package/dist/composed/accordion/anatomy/accordion-heading.d.ts +0 -2
- package/dist/composed/accordion/anatomy/accordion-heading.js +0 -6
- package/dist/composed/accordion/anatomy/accordion-indicator.d.ts +0 -2
- package/dist/composed/accordion/anatomy/accordion-indicator.js +0 -11
- package/dist/composed/accordion/anatomy/accordion-item.d.ts +0 -2
- package/dist/composed/accordion/anatomy/accordion-item.js +0 -13
- package/dist/composed/accordion/anatomy/accordion-root.d.ts +0 -2
- package/dist/composed/accordion/anatomy/accordion-root.js +0 -19
- package/dist/composed/accordion/anatomy/accordion-trigger.d.ts +0 -2
- package/dist/composed/accordion/anatomy/accordion-trigger.js +0 -14
- package/dist/composed/accordion/index.d.ts +0 -2
- package/dist/composed/accordion/index.js +0 -2
- package/dist/composed/accordion/modules/anatomy.d.ts +0 -14
- package/dist/composed/accordion/modules/anatomy.js +0 -14
- package/dist/composed/accordion/modules/context.d.ts +0 -4
- package/dist/composed/accordion/modules/context.js +0 -5
- package/dist/composed/accordion/modules/types.d.ts +0 -28
- package/dist/composed/accordion/modules/types.js +0 -1
- package/dist/composed/avatar/anatomy/avatar-fallback.d.ts +0 -2
- package/dist/composed/avatar/anatomy/avatar-fallback.js +0 -13
- package/dist/composed/avatar/anatomy/avatar-image.d.ts +0 -2
- package/dist/composed/avatar/anatomy/avatar-image.js +0 -13
- package/dist/composed/avatar/anatomy/avatar-root.d.ts +0 -2
- package/dist/composed/avatar/anatomy/avatar-root.js +0 -19
- package/dist/composed/avatar/index.d.ts +0 -2
- package/dist/composed/avatar/index.js +0 -2
- package/dist/composed/avatar/modules/anatomy.d.ts +0 -8
- package/dist/composed/avatar/modules/anatomy.js +0 -8
- package/dist/composed/avatar/modules/context.d.ts +0 -3
- package/dist/composed/avatar/modules/context.js +0 -3
- package/dist/composed/avatar/modules/types.d.ts +0 -13
- package/dist/composed/avatar/modules/types.js +0 -1
- package/dist/composed/index.d.ts +0 -2
- package/dist/composed/index.js +0 -2
- package/dist/internal/props-with-child.d.ts +0 -7
- package/dist/internal/props-with-child.js +0 -1
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import * as progress from '@zag-js/progress';
|
|
4
|
-
import { normalizeProps, useMachine } from '@zag-js/react';
|
|
5
|
-
import { useId } from 'react';
|
|
6
|
-
export const Progress = ({
|
|
7
|
-
// Root
|
|
8
|
-
base = 'flex items-center gap-4', height = 'h-2', width = 'w-full', classes = '',
|
|
9
|
-
// Label
|
|
10
|
-
labelBase = 'whitespace-nowrap', labelText = 'text-xs', labelClasses = '',
|
|
11
|
-
// Track
|
|
12
|
-
trackBase = 'h-full w-full overflow-x-hidden', trackBg = 'bg-surface-200-800', trackRounded = 'rounded-base', trackClasses = '',
|
|
13
|
-
// Meter
|
|
14
|
-
meterBase = 'h-full w-full', meterBg = 'bg-surface-950-50', meterRounded = 'rounded-base', meterTransition = 'transition-[width]', meterAnimate = 'animate-progress-indeterminate', meterClasses = '',
|
|
15
|
-
// Children
|
|
16
|
-
children,
|
|
17
|
-
// Zag
|
|
18
|
-
...zagProps }) => {
|
|
19
|
-
// Zag
|
|
20
|
-
const service = useMachine(progress.machine, {
|
|
21
|
-
id: useId(),
|
|
22
|
-
...zagProps
|
|
23
|
-
});
|
|
24
|
-
const api = progress.connect(service, normalizeProps);
|
|
25
|
-
// Reactive
|
|
26
|
-
const rxIndeterminate = api.indeterminate ? meterAnimate : '';
|
|
27
|
-
return (_jsxs("figure", { ...api.getRootProps(), className: `${base} ${height} ${width} ${classes}`, "data-testid": "progress", children: [!!children && (_jsx("div", { ...api.getLabelProps(), className: `${labelBase} ${labelText} ${labelClasses}`, "data-testid": "progress-label", children: children })), _jsx("div", { ...api.getTrackProps(), className: `${trackBase} ${trackBg} ${trackRounded} ${trackClasses}`, "data-testid": "progress-track", children: _jsx("div", { ...api.getRangeProps(), className: `${meterBase} ${meterBg} ${meterRounded} ${meterTransition} ${rxIndeterminate} ${meterClasses}`, "data-testid": "progress-meter" }) })] }));
|
|
28
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import * as progress from '@zag-js/progress';
|
|
2
|
-
import type { ReactNode } from 'react';
|
|
3
|
-
export interface ProgressProps extends React.PropsWithChildren, Omit<progress.Props, 'id'> {
|
|
4
|
-
/** Set root base classes */
|
|
5
|
-
base?: string;
|
|
6
|
-
/** Set root background classes */
|
|
7
|
-
bg?: string;
|
|
8
|
-
/** Set root width classes */
|
|
9
|
-
width?: string;
|
|
10
|
-
/** Set root height classes */
|
|
11
|
-
height?: string;
|
|
12
|
-
/** Set root rounded classes */
|
|
13
|
-
rounded?: string;
|
|
14
|
-
/** Set root arbitrary classes */
|
|
15
|
-
classes?: string;
|
|
16
|
-
/** Set label base classes. */
|
|
17
|
-
labelBase?: string;
|
|
18
|
-
/** Set label text classes. */
|
|
19
|
-
labelText?: string;
|
|
20
|
-
/** Set label classes. */
|
|
21
|
-
labelClasses?: string;
|
|
22
|
-
/** Set the track base classes. */
|
|
23
|
-
trackBase?: string;
|
|
24
|
-
/** Set the track background classes. */
|
|
25
|
-
trackBg?: string;
|
|
26
|
-
/** Set the track border radius classes. */
|
|
27
|
-
trackRounded?: string;
|
|
28
|
-
/** Set arbitrary track classes. */
|
|
29
|
-
trackClasses?: string;
|
|
30
|
-
/** Set meter base classes. */
|
|
31
|
-
meterBase?: string;
|
|
32
|
-
/** Set meter bg classes */
|
|
33
|
-
meterBg?: string;
|
|
34
|
-
/** Set meter rounded classes. */
|
|
35
|
-
meterRounded?: string;
|
|
36
|
-
/** Set meter transition classes. */
|
|
37
|
-
meterTransition?: string;
|
|
38
|
-
/** Set meter animation classes for indeterminate mode. (value === undefined) */
|
|
39
|
-
meterAnimate?: string;
|
|
40
|
-
/** Set meter arbitrary classes. */
|
|
41
|
-
meterClasses?: string;
|
|
42
|
-
/** Set the label */
|
|
43
|
-
label?: ReactNode;
|
|
44
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import * as progress from '@zag-js/progress';
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useId } from 'react';
|
|
4
|
-
import { normalizeProps, useMachine } from '@zag-js/react';
|
|
5
|
-
import * as progress from '@zag-js/progress';
|
|
6
|
-
export const ProgressRing = ({ label, showLabel = false, strokeWidth = '10px', strokeLinecap = 'round',
|
|
7
|
-
// Root
|
|
8
|
-
base = 'relative', size = 'size-32', classes = '',
|
|
9
|
-
// Slot
|
|
10
|
-
childrenBase = 'absolute top-0 left-0 z-[1] flex justify-center items-center', childrenClasses = '',
|
|
11
|
-
// SVG
|
|
12
|
-
svgBase = 'absolute top-0 left-0 size-full rounded-full', svgClasses = '',
|
|
13
|
-
// Track
|
|
14
|
-
trackBase = 'fill-none', trackStroke = 'stroke-surface-200-800', trackClasses = '',
|
|
15
|
-
// Meter
|
|
16
|
-
meterBase = 'fill-none', meterStroke = 'stroke-primary-500', meterTransition = 'transition-[stroke-dashoffset] transition-[stroke-dashoffset]', meterAnimate = 'animate-ring-indeterminate', meterDuration = 'duration-200', meterClasses = '',
|
|
17
|
-
// Label
|
|
18
|
-
labelBase = '', labelFill = 'fill-surface-950-50', labelFontSize = 24, // px
|
|
19
|
-
labelFontWeight = 'bold', labelClasses = '',
|
|
20
|
-
// Children
|
|
21
|
-
children,
|
|
22
|
-
// Zag
|
|
23
|
-
...zagProps }) => {
|
|
24
|
-
// Zag
|
|
25
|
-
const service = useMachine(progress.machine, {
|
|
26
|
-
id: useId(),
|
|
27
|
-
...zagProps
|
|
28
|
-
});
|
|
29
|
-
const api = progress.connect(service, normalizeProps);
|
|
30
|
-
// Reactive Classes
|
|
31
|
-
const rxAnimCircle = api.indeterminate ? 'animate-spin' : '';
|
|
32
|
-
const rxAnimMeter = api.indeterminate ? meterAnimate : '';
|
|
33
|
-
return (_jsxs("figure", { ...api.getRootProps(), className: `${base} ${size} ${classes}`, "data-testid": "progress-ring", children: [_jsx("div", { ...api.getLabelProps(), className: `${childrenBase} ${size} ${childrenClasses}`, "data-testid": "progress-ring-children", children: children }), _jsxs("svg", { ...api.getCircleProps(), viewBox: "0 0 100 100", className: `${svgBase} ${svgClasses} ${rxAnimCircle}`, style: { '--size': '100px', '--thickness': strokeWidth }, "data-testid": "progress-ring-svg", children: [_jsx("circle", { ...api.getCircleTrackProps(), className: `${trackBase} ${trackStroke} ${trackClasses}`, "data-testid": "progress-ring-track" }), _jsx("circle", { ...api.getCircleRangeProps(), className: `${meterBase} ${meterStroke} ${meterTransition} ${meterDuration} ${meterClasses} ${rxAnimMeter}`, strokeLinecap: strokeLinecap, "data-testid": "progress-ring-meter" }), api.value !== null && !children && showLabel && (_jsx("text", { className: `${labelBase} ${labelFill} ${labelClasses}`, x: "50%", y: "50%", fontSize: labelFontSize, fontWeight: labelFontWeight, textAnchor: "middle", dominantBaseline: "central", "data-testid": "progress-ring-label", children: label ?? `${api.value}%` }))] })] }));
|
|
34
|
-
};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import * as progress from '@zag-js/progress';
|
|
2
|
-
export interface ProgressRingProps extends React.PropsWithChildren, Omit<progress.Props, 'id'> {
|
|
3
|
-
/** Set the text for the scalable label */
|
|
4
|
-
label?: string;
|
|
5
|
-
/** When enabled, show a text label with the percentage amount */
|
|
6
|
-
showLabel?: boolean;
|
|
7
|
-
/** Set the stroke size (ex: 15px) */
|
|
8
|
-
strokeWidth?: string;
|
|
9
|
-
/** Defines the shape of the meter */
|
|
10
|
-
strokeLinecap?: 'inherit' | 'butt' | 'round' | 'square';
|
|
11
|
-
/** Set the root base classes */
|
|
12
|
-
base?: string;
|
|
13
|
-
/** Set the root size classes */
|
|
14
|
-
size?: string;
|
|
15
|
-
/** Provide arbitrary classes to the root element */
|
|
16
|
-
classes?: string;
|
|
17
|
-
/** Set the nested children base classes */
|
|
18
|
-
childrenBase?: string;
|
|
19
|
-
/** Provide arbitrary classes to the nested children. */
|
|
20
|
-
childrenClasses?: string;
|
|
21
|
-
/** Set the SVG element base classes */
|
|
22
|
-
svgBase?: string;
|
|
23
|
-
/** Provide arbitrary classes to the SVG element */
|
|
24
|
-
svgClasses?: string;
|
|
25
|
-
/** Set the track base classes */
|
|
26
|
-
trackBase?: string;
|
|
27
|
-
/** Set the track stroke color classes */
|
|
28
|
-
trackStroke?: string;
|
|
29
|
-
/** Provide arbitrary classes to the track element */
|
|
30
|
-
trackClasses?: string;
|
|
31
|
-
/** Set the meter base classes */
|
|
32
|
-
meterBase?: string;
|
|
33
|
-
/** Set the meter stroke color classes */
|
|
34
|
-
meterStroke?: string;
|
|
35
|
-
/** Set the meter transition classes */
|
|
36
|
-
meterTransition?: string;
|
|
37
|
-
/** Set the meter animation classes */
|
|
38
|
-
meterAnimate?: string;
|
|
39
|
-
/** Set the meter transition duration classes */
|
|
40
|
-
meterDuration?: string;
|
|
41
|
-
/** Provide arbitrary classes to the meter element */
|
|
42
|
-
meterClasses?: string;
|
|
43
|
-
/** Set the label classes */
|
|
44
|
-
labelBase?: string;
|
|
45
|
-
/** Set the label fill color classes */
|
|
46
|
-
labelFill?: string;
|
|
47
|
-
/** Set the label font size */
|
|
48
|
-
labelFontSize?: number;
|
|
49
|
-
/** Set the label font weight */
|
|
50
|
-
labelFontWeight?: string;
|
|
51
|
-
/** Provide arbitrary classes to the label element */
|
|
52
|
-
labelClasses?: string;
|
|
53
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import * as progress from '@zag-js/progress';
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import * as rating from '@zag-js/rating-group';
|
|
4
|
-
import { useMachine, normalizeProps } from '@zag-js/react';
|
|
5
|
-
import { useId } from 'react';
|
|
6
|
-
const starEmpty = (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: "1.5", stroke: "currentColor", height: "24", width: "24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M11.48 3.499a.562.562 0 0 1 1.04 0l2.125 5.111a.563.563 0 0 0 .475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 0 0-.182.557l1.285 5.385a.562.562 0 0 1-.84.61l-4.725-2.885a.562.562 0 0 0-.586 0L6.982 20.54a.562.562 0 0 1-.84-.61l1.285-5.386a.562.562 0 0 0-.182-.557l-4.204-3.602a.562.562 0 0 1 .321-.988l5.518-.442a.563.563 0 0 0 .475-.345L11.48 3.5Z" }) }));
|
|
7
|
-
const starHalf = (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: "1.5", stroke: "currentColor", height: "24", width: "24", children: [_jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M11.48 3.499a.562.562 0 0 1 1.04 0l2.125 5.111a.563.563 0 0 0 .475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 0 0-.182.557l1.285 5.385a.562.562 0 0 1-.84.61l-4.725-2.885a.562.562 0 0 0-.586 0L6.982 20.54a.562.562 0 0 1-.84-.61l1.285-5.386a.562.562 0 0 0-.182-.557l-4.204-3.602a.562.562 0 0 1 .321-.988l5.518-.442a.563.563 0 0 0 .475-.345L11.48 3.5Z" }), _jsx("defs", { children: _jsxs("linearGradient", { id: "half-fill", children: [_jsx("stop", { offset: "50%", stopColor: "currentColor" }), _jsx("stop", { offset: "50%", stopColor: "transparent" })] }) }), _jsx("path", { fill: "url(#half-fill)", d: "M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.006 5.404.434c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.434 2.082-5.005Z" })] }));
|
|
8
|
-
const starFull = (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", height: "24", width: "24", children: _jsx("path", { fillRule: "evenodd", d: "M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.006 5.404.434c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.434 2.082-5.005Z", clipRule: "evenodd" }) }));
|
|
9
|
-
export const Rating = ({
|
|
10
|
-
// Root
|
|
11
|
-
base = '', classes = '',
|
|
12
|
-
// Control
|
|
13
|
-
controlBase = 'flex', controlGap = 'gap-2', controlClasses,
|
|
14
|
-
// Label
|
|
15
|
-
labelBase = 'label-text', labelClasses = '',
|
|
16
|
-
// Item
|
|
17
|
-
itemBase = 'cursor-pointer', itemClasses = '',
|
|
18
|
-
// State
|
|
19
|
-
stateReadOnly = '', stateDisabled = 'cursor-not-allowed opacity-50',
|
|
20
|
-
// Icons
|
|
21
|
-
iconEmpty = starEmpty, iconHalf = starHalf, iconFull = starFull,
|
|
22
|
-
// Children
|
|
23
|
-
label,
|
|
24
|
-
// Zag
|
|
25
|
-
...zagProps }) => {
|
|
26
|
-
// Zag
|
|
27
|
-
const service = useMachine(rating.machine, {
|
|
28
|
-
id: useId(),
|
|
29
|
-
...zagProps
|
|
30
|
-
});
|
|
31
|
-
const api = rating.connect(service, normalizeProps);
|
|
32
|
-
// Reactive
|
|
33
|
-
const rxReadOnly = service.prop('readOnly') ? stateReadOnly : '';
|
|
34
|
-
const rxDisabled = service.prop('disabled') ? stateDisabled : '';
|
|
35
|
-
return (_jsxs("div", { ...api.getRootProps(), className: `${base} ${classes}`, "data-testid": "rating", children: [!!label && (_jsx("label", { ...api.getLabelProps(), className: `${labelBase} ${labelClasses}`, "data-testid": "rating-label", children: label })), _jsx("div", { ...api.getControlProps(), className: `${controlBase} ${controlGap} ${rxReadOnly} ${rxDisabled} ${controlClasses}`, "data-testid": "rating-control", children: api.items.map((item) => {
|
|
36
|
-
const itemState = api.getItemState({ index: item });
|
|
37
|
-
const icon = (() => {
|
|
38
|
-
if (!itemState.highlighted) {
|
|
39
|
-
return iconEmpty;
|
|
40
|
-
}
|
|
41
|
-
else if (itemState.half) {
|
|
42
|
-
return iconHalf;
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
return iconFull;
|
|
46
|
-
}
|
|
47
|
-
})();
|
|
48
|
-
return (_jsx("span", { ...api.getItemProps({ index: item }), className: `${itemBase} ${itemClasses}`, "data-testid": "rating-item", children: icon }, item));
|
|
49
|
-
}) }), _jsx("input", { ...api.getHiddenInputProps(), "data-testid": "rating-input" })] }));
|
|
50
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import * as rating from '@zag-js/rating-group';
|
|
2
|
-
import type { ReactNode } from 'react';
|
|
3
|
-
export interface RatingProps extends Omit<rating.Props, 'id'> {
|
|
4
|
-
/** Set root base classes */
|
|
5
|
-
base?: string;
|
|
6
|
-
/** Set root gap classes */
|
|
7
|
-
gap?: string;
|
|
8
|
-
/** Set root arbitrary classes */
|
|
9
|
-
classes?: string;
|
|
10
|
-
/** Set control base classes */
|
|
11
|
-
controlBase?: string;
|
|
12
|
-
/** Set control gap classes */
|
|
13
|
-
controlGap?: string;
|
|
14
|
-
/** Set control arbitrary classes */
|
|
15
|
-
controlClasses?: string;
|
|
16
|
-
/** Set label base classes */
|
|
17
|
-
labelBase?: string;
|
|
18
|
-
/** Set label arbitrary classes */
|
|
19
|
-
labelClasses?: string;
|
|
20
|
-
/** Set item base classes */
|
|
21
|
-
itemBase?: string;
|
|
22
|
-
/** Set item arbitrary classes */
|
|
23
|
-
itemClasses?: string;
|
|
24
|
-
/** Set item read-only state classes */
|
|
25
|
-
stateReadOnly?: string;
|
|
26
|
-
/** Set item disabled state classes */
|
|
27
|
-
stateDisabled?: string;
|
|
28
|
-
/** Set the empty icon node */
|
|
29
|
-
iconEmpty?: ReactNode;
|
|
30
|
-
/** Set the half icon node */
|
|
31
|
-
iconHalf?: ReactNode;
|
|
32
|
-
/** Set the full icon node */
|
|
33
|
-
iconFull?: ReactNode;
|
|
34
|
-
/** Set the label node */
|
|
35
|
-
label?: ReactNode;
|
|
36
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import * as rating from '@zag-js/rating-group';
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useContext, useId } from 'react';
|
|
4
|
-
import * as radio from '@zag-js/radio-group';
|
|
5
|
-
import { useMachine, normalizeProps } from '@zag-js/react';
|
|
6
|
-
import { SegmentContext } from './context.js';
|
|
7
|
-
// Components ---
|
|
8
|
-
const SegmentRoot = ({
|
|
9
|
-
// Root
|
|
10
|
-
base = 'inline-flex items-stretch overflow-hidden', background = 'preset-outlined-surface-200-800', border = '', gap = 'gap-2', padding = 'p-2', rounded = 'rounded-container', width = '', classes = '',
|
|
11
|
-
// States
|
|
12
|
-
orientVertical = 'flex-col items-stretch', orientHorizontal = 'flex-row', stateDisabled = 'disabled', stateReadOnly = 'pointer-events-none',
|
|
13
|
-
// Indicator
|
|
14
|
-
indicatorBase = 'top-[var(--top)] left-[var(--left)] w-[var(--width)] h-[var(--height)]', indicatorBg = 'preset-filled', indicatorText = 'text-surface-contrast-950 dark:text-surface-contrast-50', indicatorRounded = 'rounded-base', indicatorClasses = '',
|
|
15
|
-
// Label
|
|
16
|
-
labelledby = '',
|
|
17
|
-
// Children
|
|
18
|
-
children,
|
|
19
|
-
// Zag
|
|
20
|
-
...zagProps }) => {
|
|
21
|
-
// Zag
|
|
22
|
-
const service = useMachine(radio.machine, {
|
|
23
|
-
id: useId(),
|
|
24
|
-
orientation: zagProps.orientation ?? 'horizontal',
|
|
25
|
-
...zagProps
|
|
26
|
-
});
|
|
27
|
-
const api = radio.connect(service, normalizeProps);
|
|
28
|
-
// Set Context
|
|
29
|
-
const ctx = { api, indicatorText };
|
|
30
|
-
// Reactive
|
|
31
|
-
const rxOrientation = service.prop('orientation') === 'vertical' ? orientVertical : orientHorizontal;
|
|
32
|
-
const rxDisabled = service.prop('disabled') ? stateDisabled : '';
|
|
33
|
-
const rxReadOnly = service.prop('readOnly') ? stateReadOnly : '';
|
|
34
|
-
return (_jsxs("div", { ...api.getRootProps(), className: `${base} ${rxOrientation} ${background} ${border} ${padding} ${gap} ${rounded} ${width} ${rxDisabled} ${rxReadOnly} ${classes}`, "data-testid": "segment", "aria-labelledby": labelledby, children: [_jsx("div", { ...api.getIndicatorProps(), className: `${indicatorBase} ${indicatorBg} ${indicatorRounded} ${indicatorClasses}`, "data-testid": "segment-indicator" }), _jsx(SegmentContext.Provider, { value: ctx, children: children })] }));
|
|
35
|
-
};
|
|
36
|
-
const SegmentItem = ({
|
|
37
|
-
// Root
|
|
38
|
-
base = 'btn cursor-pointer z-[1]', classes = '',
|
|
39
|
-
// Label
|
|
40
|
-
labelBase = 'pointer-events-none transition-colors duration-100', labelClasses = '',
|
|
41
|
-
// State
|
|
42
|
-
stateDisabled = 'disabled', stateFocused = 'focused',
|
|
43
|
-
// Children
|
|
44
|
-
children,
|
|
45
|
-
// Zag
|
|
46
|
-
...zagProps }) => {
|
|
47
|
-
// Get Context
|
|
48
|
-
const ctx = useContext(SegmentContext);
|
|
49
|
-
const state = ctx.api.getItemState(zagProps);
|
|
50
|
-
// Reactive
|
|
51
|
-
const rxDisabled = state.disabled ? stateDisabled : '';
|
|
52
|
-
const rxActiveText = state.checked ? ctx.indicatorText : '';
|
|
53
|
-
const rxFocused = state.focused ? stateFocused : '';
|
|
54
|
-
return (_jsxs("label", { ...ctx.api.getItemProps(zagProps), className: `${base} ${rxDisabled} ${rxFocused} ${classes}`, "data-testid": "segment-item", children: [_jsx("span", { ...ctx.api.getItemTextProps(zagProps), className: `${labelBase} ${rxActiveText} ${labelClasses}`, "data-testid": "segment-item-label", children: children }), _jsx("input", { ...ctx.api.getItemHiddenInputProps(zagProps), "data-testid": "segment-item-input" })] }));
|
|
55
|
-
};
|
|
56
|
-
export const Segment = /* @__PURE__ */ Object.assign(SegmentRoot, {
|
|
57
|
-
Item: SegmentItem
|
|
58
|
-
});
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import type * as radio from '@zag-js/radio-group';
|
|
2
|
-
export interface SegmentContextState {
|
|
3
|
-
api: ReturnType<typeof radio.connect>;
|
|
4
|
-
indicatorText: string;
|
|
5
|
-
}
|
|
6
|
-
export interface SegmentProps extends React.PropsWithChildren, Omit<radio.Props, 'id'> {
|
|
7
|
-
/** Sets base classes. */
|
|
8
|
-
base?: string;
|
|
9
|
-
/** Set background classes. */
|
|
10
|
-
background?: string;
|
|
11
|
-
/** Set border classes. */
|
|
12
|
-
border?: string;
|
|
13
|
-
/** Set flex direction classes. */
|
|
14
|
-
flexDirection?: string;
|
|
15
|
-
/** Set gap classes. */
|
|
16
|
-
gap?: string;
|
|
17
|
-
/** Set padding classes. */
|
|
18
|
-
padding?: string;
|
|
19
|
-
/** Set rounded classes. */
|
|
20
|
-
rounded?: string;
|
|
21
|
-
/** Set width classes. */
|
|
22
|
-
width?: string;
|
|
23
|
-
/** Provide arbitrary CSS classes. */
|
|
24
|
-
classes?: string;
|
|
25
|
-
/** Set classes to provide a vertical layout. */
|
|
26
|
-
orientVertical?: string;
|
|
27
|
-
/** Set classes to provide a horizontal layout. */
|
|
28
|
-
orientHorizontal?: string;
|
|
29
|
-
/** Set classes for the disabled state. */
|
|
30
|
-
stateDisabled?: string;
|
|
31
|
-
/** Set classes for the read-only state. */
|
|
32
|
-
stateReadOnly?: string;
|
|
33
|
-
/** Sets base classes to the indicator. */
|
|
34
|
-
indicatorBase?: string;
|
|
35
|
-
/** Sets background classes to the indicator. */
|
|
36
|
-
indicatorBg?: string;
|
|
37
|
-
/** Sets text classes to the indicator. */
|
|
38
|
-
indicatorText?: string;
|
|
39
|
-
/** Sets border radius classes to the indicator. */
|
|
40
|
-
indicatorRounded?: string;
|
|
41
|
-
/** Provide arbitrary CSS classes to the indicator. */
|
|
42
|
-
indicatorClasses?: string;
|
|
43
|
-
/** Set aria-labelledby for element */
|
|
44
|
-
labelledby?: string;
|
|
45
|
-
}
|
|
46
|
-
export interface SegmentItemsProps extends React.PropsWithChildren, Omit<radio.ItemProps, 'invalid'> {
|
|
47
|
-
/** Sets base classes. */
|
|
48
|
-
base?: string;
|
|
49
|
-
/** Provide arbitrary CSS classes. */
|
|
50
|
-
classes?: string;
|
|
51
|
-
/** Set classes for the disabled state. */
|
|
52
|
-
stateDisabled?: string;
|
|
53
|
-
/** Set classes for the focus state. */
|
|
54
|
-
stateFocused?: string;
|
|
55
|
-
/** Sets base classes for the label element. */
|
|
56
|
-
labelBase?: string;
|
|
57
|
-
/** Provide arbitrary CSS classes for the label element. */
|
|
58
|
-
labelClasses?: string;
|
|
59
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useId } from 'react';
|
|
4
|
-
import * as slider from '@zag-js/slider';
|
|
5
|
-
import { useMachine, normalizeProps } from '@zag-js/react';
|
|
6
|
-
export const Slider = ({ height = 'h-1.5', markers = [],
|
|
7
|
-
// Root ---
|
|
8
|
-
base = 'w-full', classes = '',
|
|
9
|
-
// Control ---
|
|
10
|
-
controlBase = '', controlClasses = '',
|
|
11
|
-
// Track ---
|
|
12
|
-
trackBase = 'overflow-hidden', trackBg = 'bg-surface-200-800', trackRounded = 'rounded-full', trackClasses = '',
|
|
13
|
-
// Meter ---
|
|
14
|
-
meterBase = '', meterBg = 'bg-surface-950-50', meterRounded = 'rounded-container', meterClasses = '',
|
|
15
|
-
// Thumb ---
|
|
16
|
-
thumbBase = 'ring-inset transition-scale duration-100 ease-in-out', thumbSize = 'size-8 md:size-5', thumbBg = 'bg-surface-50-950', thumbRingSize = 'ring-2', thumbRingColor = 'ring-surface-950-50', thumbRounded = 'rounded-full', thumbCursor = 'hover:cursor-pointer', thumbClasses = '',
|
|
17
|
-
// Markers ---
|
|
18
|
-
markersBase = '', markersClasses = '',
|
|
19
|
-
// Mark ---
|
|
20
|
-
markBase = '', markText = 'text-[10px]', markOpacity = 'opacity-50', markClasses = '',
|
|
21
|
-
// State ---
|
|
22
|
-
stateDisabled = 'disabled', stateReadOnly = 'cursor-not-allowed',
|
|
23
|
-
// Children ---
|
|
24
|
-
mark,
|
|
25
|
-
// Zag ---
|
|
26
|
-
...zagProps }) => {
|
|
27
|
-
// Zag
|
|
28
|
-
const service = useMachine(slider.machine, {
|
|
29
|
-
id: useId(),
|
|
30
|
-
...zagProps
|
|
31
|
-
});
|
|
32
|
-
const api = slider.connect(service, normalizeProps);
|
|
33
|
-
// Reactive
|
|
34
|
-
const rxDisabled = service.prop('disabled') ? stateDisabled : '';
|
|
35
|
-
const rxReadOnly = service.prop('readOnly') ? stateReadOnly : thumbCursor;
|
|
36
|
-
return (_jsxs("div", { ...api.getRootProps(), className: `${base} ${height} ${rxDisabled} ${classes}`, "data-testid": "slider", children: [_jsxs("div", { ...api.getControlProps(), className: `${controlBase} ${controlClasses}`, "data-testid": "slider-control", children: [_jsx("div", { ...api.getTrackProps(), className: `${trackBase} ${trackBg} ${height} ${trackRounded} ${trackClasses}`, "data-testid": "slider-track", children: _jsx("div", { ...api.getRangeProps(), className: `${meterBase} ${height} ${meterBg} ${meterRounded} ${meterClasses}`, "data-testid": "slider-meter" }) }), _jsx("div", { className: `${height}`, style: { display: 'flex', alignItems: 'center', transform: 'translateY(-100%)' }, "data-testid": "slider-thumb-wrapper", children: api.value.map((_, index) => (_jsxs("div", { ...api.getThumbProps({ index }), children: [_jsx("div", { className: `${thumbBase} ${thumbSize} ${thumbBg} ${thumbRingSize} ${thumbRingColor} ${thumbRounded} ${rxReadOnly} ${thumbClasses}`, "data-testid": "slider-thumb" }), _jsx("input", { ...api.getHiddenInputProps({ index }), "data-testid": "slider-input" })] }, index))) })] }), markers.length > 0 && (_jsx("div", { ...api.getMarkerGroupProps(), className: `${markersBase} ${markersClasses}`, "data-testid": "slider-markers", children: markers.map((value) => (
|
|
37
|
-
// Mark
|
|
38
|
-
_jsx("span", { ...api.getMarkerProps({ value }), className: `${markBase} ${markText} ${markOpacity} ${markClasses}`, "data-testid": "slider-mark", children: mark ? mark : value }, value))) }))] }));
|
|
39
|
-
};
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import * as slider from '@zag-js/slider';
|
|
2
|
-
import type { ReactNode } from 'react';
|
|
3
|
-
export interface SliderProps extends Omit<slider.Props, 'id' | 'thumbSize'> {
|
|
4
|
-
/** Provide an array of value markers */
|
|
5
|
-
markers?: number[];
|
|
6
|
-
/** Set height classes for the overall slider. */
|
|
7
|
-
height?: string;
|
|
8
|
-
/** Set base classes. */
|
|
9
|
-
base?: string;
|
|
10
|
-
/** Provide arbitrary classes for the root. */
|
|
11
|
-
classes?: string;
|
|
12
|
-
/** Set base classes for the control. */
|
|
13
|
-
controlBase?: string;
|
|
14
|
-
/** Provide arbitrary classes for the control. */
|
|
15
|
-
controlClasses?: string;
|
|
16
|
-
/** Set base classes for the track. */
|
|
17
|
-
trackBase?: string;
|
|
18
|
-
/** Set background classes for the track. */
|
|
19
|
-
trackBg?: string;
|
|
20
|
-
/** Set border radius classes for the track. */
|
|
21
|
-
trackRounded?: string;
|
|
22
|
-
/** Provide arbitrary classes for the track. */
|
|
23
|
-
trackClasses?: string;
|
|
24
|
-
/** Set base classes for the meter. */
|
|
25
|
-
meterBase?: string;
|
|
26
|
-
/** Set background classes for the meter. */
|
|
27
|
-
meterBg?: string;
|
|
28
|
-
/** Set border radius classes for the meter. */
|
|
29
|
-
meterRounded?: string;
|
|
30
|
-
/** Provide arbitrary classes for the meter. */
|
|
31
|
-
meterClasses?: string;
|
|
32
|
-
/** Set base classes for the thumb. */
|
|
33
|
-
thumbBase?: string;
|
|
34
|
-
/** Set size classes for the thumb. */
|
|
35
|
-
thumbSize?: string;
|
|
36
|
-
/** Set background classes for the thumb. */
|
|
37
|
-
thumbBg?: string;
|
|
38
|
-
/** Set ring size classes for the thumb. */
|
|
39
|
-
thumbRingSize?: string;
|
|
40
|
-
/** Set ring color classes for the thumb. */
|
|
41
|
-
thumbRingColor?: string;
|
|
42
|
-
/** Set border-radius classes for the thumb. */
|
|
43
|
-
thumbRounded?: string;
|
|
44
|
-
/** Set cursor classes for the thumb. */
|
|
45
|
-
thumbCursor?: string;
|
|
46
|
-
/** Provide arbitrary classes for the thumb. */
|
|
47
|
-
thumbClasses?: string;
|
|
48
|
-
/** Set base classes for the markers. */
|
|
49
|
-
markersBase?: string;
|
|
50
|
-
/** Provide arbitrary classes for the markers. */
|
|
51
|
-
markersClasses?: string;
|
|
52
|
-
/** Set base classes for each mark. */
|
|
53
|
-
markBase?: string;
|
|
54
|
-
/** Set text size classes for each mark. */
|
|
55
|
-
markText?: string;
|
|
56
|
-
/** Set opacity classes for each mark. */
|
|
57
|
-
markOpacity?: string;
|
|
58
|
-
/** Provide arbitrary classes for each mark. */
|
|
59
|
-
markClasses?: string;
|
|
60
|
-
/** Set disabled state classes for the root element. */
|
|
61
|
-
stateDisabled?: string;
|
|
62
|
-
/** Set read-only state classes for the root element. */
|
|
63
|
-
stateReadOnly?: string;
|
|
64
|
-
/** Replace numeric markers with symbol, such as a icon. */
|
|
65
|
-
mark?: ReactNode;
|
|
66
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import * as slider from '@zag-js/slider';
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import React, { useId } from 'react';
|
|
4
|
-
import * as zagSwitch from '@zag-js/switch';
|
|
5
|
-
import { useMachine, normalizeProps } from '@zag-js/react';
|
|
6
|
-
export const Switch = ({ compact = false,
|
|
7
|
-
// Root (Track)
|
|
8
|
-
base = 'inline-flex items-center gap-4',
|
|
9
|
-
// State
|
|
10
|
-
stateFocused = 'data-[focus-visible]:focused', classes = '',
|
|
11
|
-
// Control
|
|
12
|
-
controlBase = 'cursor-pointer transition duration-200', controlInactive = 'preset-filled-surface-200-800', controlActive = 'preset-filled-primary-500', controlDisabled = 'opacity-50 cursor-not-allowed', controlWidth = 'w-10', controlHeight = 'h-6', controlPadding = 'p-0.5', controlRounded = 'rounded-full', controlHover = 'hover:brightness-90 dark:hover:brightness-110', controlClasses = '',
|
|
13
|
-
// Thumb
|
|
14
|
-
thumbBase = 'right-0 aspect-square h-full flex justify-center items-center text-right cursor-pointer', thumbInactive = 'preset-filled-surface-50-950', thumbActive = 'bg-surface-50 text-surface-contrast-50', thumbRounded = 'rounded-full', thumbTranslateX = 'translate-x-4 rtl:-translate-x-4', thumbTransition = 'transition', thumbEase = 'ease-in-out', thumbDuration = 'duration-200', thumbClasses = '',
|
|
15
|
-
// Label
|
|
16
|
-
labelBase = '', labelClasses = '',
|
|
17
|
-
// Icons
|
|
18
|
-
iconInactiveBase = 'pointer-events-none', iconActiveBase = 'pointer-events-none',
|
|
19
|
-
// Children
|
|
20
|
-
children, inactiveChild, activeChild,
|
|
21
|
-
// Zag
|
|
22
|
-
...zagProps }) => {
|
|
23
|
-
// Zag
|
|
24
|
-
const service = useMachine(zagSwitch.machine, {
|
|
25
|
-
id: useId(),
|
|
26
|
-
...zagProps
|
|
27
|
-
});
|
|
28
|
-
const api = zagSwitch.connect(service, normalizeProps);
|
|
29
|
-
const rxControlBase = compact ? thumbBase : controlBase;
|
|
30
|
-
const rxControlHeight = compact ? '' : controlHeight;
|
|
31
|
-
const rxControlPadding = compact ? '' : controlPadding;
|
|
32
|
-
const rxThumbInactive = compact ? controlInactive : thumbInactive;
|
|
33
|
-
const rxThumbActive = compact ? controlActive : thumbActive;
|
|
34
|
-
const rxThumbTranslateX = compact ? '' : thumbTranslateX;
|
|
35
|
-
const rxTrackState = api.checked ? controlActive : controlInactive;
|
|
36
|
-
const rxThumbState = api.checked ? `${rxThumbActive} ${rxThumbTranslateX}` : rxThumbInactive;
|
|
37
|
-
const rxDisabled = api.disabled ? controlDisabled : '';
|
|
38
|
-
const rxFocused = api.focused ? stateFocused : '';
|
|
39
|
-
return (_jsxs("label", { ...api.getRootProps(), className: `${base} ${classes}`, "data-testid": "switch", children: [_jsx("input", { ...api.getHiddenInputProps(), "data-testid": "switch-input" }), _jsx("span", { ...api.getControlProps(), className: `${rxControlBase} ${rxTrackState} ${rxFocused} ${controlWidth} ${rxControlHeight} ${rxControlPadding} ${controlRounded} ${controlHover} ${rxDisabled} ${controlClasses}`, "data-testid": "switch-control", children: _jsxs("span", { ...api.getThumbProps(), className: `${thumbBase} ${rxThumbState} ${thumbRounded} ${thumbTransition} ${thumbEase} ${thumbDuration} ${thumbClasses}`, "data-testid": "switch-thumb", children: [!api.checked && inactiveChild ? (_jsx("span", { className: iconInactiveBase, "data-testid": "switch-icon-inactive", children: inactiveChild })) : null, api.checked && activeChild ? (_jsx("span", { className: iconActiveBase, "data-testid": "switch-icon-active", children: activeChild })) : null] }) }), children ? (_jsx("span", { ...api.getLabelProps(), className: `${labelBase} ${labelClasses}`, "data-testid": "switch-label", children: children })) : null] }));
|
|
40
|
-
};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import * as zagSwitch from '@zag-js/switch';
|
|
3
|
-
export interface SwitchProps extends React.PropsWithChildren, Omit<zagSwitch.Props, 'id'> {
|
|
4
|
-
/** Set the compact display mode. */
|
|
5
|
-
compact?: boolean;
|
|
6
|
-
/** Set base classes for the root element. */
|
|
7
|
-
base?: string;
|
|
8
|
-
/** Provide arbitrary classes to the root element. */
|
|
9
|
-
classes?: string;
|
|
10
|
-
/** Set classes for the focus state. */
|
|
11
|
-
stateFocused?: string;
|
|
12
|
-
/** Set base classes for the control element. */
|
|
13
|
-
controlBase?: string;
|
|
14
|
-
/** Set inactive state classes for the control element. */
|
|
15
|
-
controlInactive?: string;
|
|
16
|
-
/** Set active state classes for the control element. */
|
|
17
|
-
controlActive?: string;
|
|
18
|
-
/** Set disabled state classes for the control element. */
|
|
19
|
-
controlDisabled?: string;
|
|
20
|
-
/** Set width classes for the control element. */
|
|
21
|
-
controlWidth?: string;
|
|
22
|
-
/** Set height classes for the control element. */
|
|
23
|
-
controlHeight?: string;
|
|
24
|
-
/** Set padding classes for the control element. */
|
|
25
|
-
controlPadding?: string;
|
|
26
|
-
/** Set rounded classes for the control element. */
|
|
27
|
-
controlRounded?: string;
|
|
28
|
-
/** Set hover classes for the control element. */
|
|
29
|
-
controlHover?: string;
|
|
30
|
-
/** Provide arbitrary classes to the control element. */
|
|
31
|
-
controlClasses?: string;
|
|
32
|
-
/** Set base classes for the thumb element. */
|
|
33
|
-
thumbBase?: string;
|
|
34
|
-
/** Set inactive classes for the thumb element. */
|
|
35
|
-
thumbInactive?: string;
|
|
36
|
-
/** Set active classes for the thumb element. */
|
|
37
|
-
thumbActive?: string;
|
|
38
|
-
/** Set rounded classes for the thumb element. */
|
|
39
|
-
thumbRounded?: string;
|
|
40
|
-
/** Set animation X-axis translate classes for the thumb element. */
|
|
41
|
-
thumbTranslateX?: string;
|
|
42
|
-
/** Set animation transition classes for the thumb element. */
|
|
43
|
-
thumbTransition?: string;
|
|
44
|
-
/** Set animation easing classes for the thumb element. */
|
|
45
|
-
thumbEase?: string;
|
|
46
|
-
/** Set animation duration classes for the thumb element. */
|
|
47
|
-
thumbDuration?: string;
|
|
48
|
-
/** Provide arbitrary classes to the thumb element. */
|
|
49
|
-
thumbClasses?: string;
|
|
50
|
-
/** Set base classes for the label element. */
|
|
51
|
-
labelBase?: string;
|
|
52
|
-
/** Provide arbitrary classes to the label element. */
|
|
53
|
-
labelClasses?: string;
|
|
54
|
-
/** Set base classes for the inactive icon child. */
|
|
55
|
-
iconInactiveBase?: string;
|
|
56
|
-
/** Set base classes for the active icon child. */
|
|
57
|
-
iconActiveBase?: string;
|
|
58
|
-
/** The inactive state children. */
|
|
59
|
-
inactiveChild?: ReactNode;
|
|
60
|
-
/** The active state children. */
|
|
61
|
-
activeChild?: ReactNode;
|
|
62
|
-
}
|