@skeletonlabs/skeleton-react 1.0.0-next.10 → 1.0.0-next.12
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/components/Navigation/Navigation.d.ts +1 -1
- package/dist/components/Navigation/Navigation.js +1 -1
- package/dist/components/Pagination/Pagination.js +5 -4
- package/dist/components/Pagination/types.d.ts +7 -1
- package/dist/components/ProgressRing/ProgressRing.js +2 -2
- package/dist/components/ProgressRing/types.d.ts +2 -0
- package/dist/components/Rating/Rating.js +3 -3
- package/dist/components/Segment/Segment.js +3 -1
- package/dist/components/Segment/types.d.ts +5 -3
- package/dist/components/Slider/Slider.js +2 -2
- package/dist/components/Slider/types.d.ts +0 -2
- package/dist/components/Switch/Switch.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/nodes.js +1 -1
- package/package.json +27 -27
|
@@ -4,7 +4,7 @@ export declare const NavContext: React.Context<NavContextState>;
|
|
|
4
4
|
export declare const NavRail: React.FC<NavRailProps>;
|
|
5
5
|
export declare const NavBar: React.FC<NavBarProps>;
|
|
6
6
|
export declare const NavTile: React.FC<NavTileProps>;
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const Navigation: (() => null) & {
|
|
8
8
|
Rail: React.FC<NavRailProps>;
|
|
9
9
|
Bar: React.FC<NavBarProps>;
|
|
10
10
|
Tile: React.FC<NavTileProps>;
|
|
@@ -96,7 +96,7 @@ children }) => {
|
|
|
96
96
|
return (_jsxs(TileElement, { className: `${base} ${width} ${rounded} ${rxBackground} ${rxMode}`, href: href, target: target, type: TileElement === 'button' ? type : undefined, title: title, role: role, onClick: onClickHandler, "data-parent": ctx.parent, "data-expanded": ctx.expanded, "data-testid": "nav-tile", children: [children && _jsx("div", { children: children }), label && !ctx.expanded && (_jsx("div", { className: `${labelBase} ${labelClasses}`, "data-testid": "nav-tile-label", children: label })), labelExpanded && ctx.expanded && (_jsx("div", { className: `${labelExpandedBase} ${labelExpandedClasses}`, "data-testid": "nav-tile-label-expanded", children: labelExpanded }))] }));
|
|
97
97
|
};
|
|
98
98
|
// Exports ---
|
|
99
|
-
export const
|
|
99
|
+
export const Navigation = Object.assign(() => null, {
|
|
100
100
|
Rail: NavRail,
|
|
101
101
|
Bar: NavBar,
|
|
102
102
|
Tile: NavTile
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
3
3
|
import { useId } from 'react';
|
|
4
4
|
import * as pagination from '@zag-js/pagination';
|
|
5
5
|
import { useMachine, normalizeProps } from '@zag-js/react';
|
|
6
|
-
export const Pagination = ({ data, alternative = false, textSeparator = 'of',
|
|
6
|
+
export const Pagination = ({ data, alternative = false, textSeparator = 'of', showFirstLastButtons = false,
|
|
7
7
|
// Titles
|
|
8
8
|
titleFirst, titlePrevious, titleNumeral, titleNext, titleLast,
|
|
9
9
|
// Root
|
|
@@ -17,14 +17,15 @@ labelFirst = '\u00AB', labelPrevious = '\u2190', labelEllipsis = '\u22EF', label
|
|
|
17
17
|
// Zag
|
|
18
18
|
const [state, send] = useMachine(pagination.machine({
|
|
19
19
|
id: useId(),
|
|
20
|
-
count
|
|
20
|
+
// Use 'count' if specified; required for server-side pagination.
|
|
21
|
+
count: zagProps.count ?? data.length
|
|
21
22
|
}), { context: zagProps });
|
|
22
23
|
const api = pagination.connect(state, send, normalizeProps);
|
|
23
24
|
// Reactive
|
|
24
25
|
const rxButtonActive = (page) => {
|
|
25
26
|
return state.context.page === page.value ? buttonActive : `${buttonInactive} ${buttonHover}`;
|
|
26
27
|
};
|
|
27
|
-
return (_jsx(_Fragment, { children: api.totalPages > 1 && (_jsxs("div", { ...api.getRootProps(), className: `${base} ${background} ${border} ${gap} ${padding} ${rounded} ${classes}`, "data-testid": "pagination", children: [
|
|
28
|
+
return (_jsx(_Fragment, { children: api.totalPages > 1 && (_jsxs("div", { ...api.getRootProps(), className: `${base} ${background} ${border} ${gap} ${padding} ${rounded} ${classes}`, "data-testid": "pagination", children: [showFirstLastButtons && (_jsx("button", { type: "button", onClick: api.goToFirstPage, className: `${buttonBase} ${buttonInactive} ${buttonHover} ${buttonClasses}`, title: titleFirst, disabled: api.page === 1, "data-testid": "pagination-button-first", children: labelFirst })), _jsx("button", { type: "button", ...api.getPrevTriggerProps(), className: `${buttonBase} ${buttonInactive} ${buttonHover} ${buttonClasses}`, title: titlePrevious, disabled: api.page === 1, "data-testid": "pagination-button-previous", children: labelPrevious }), !alternative &&
|
|
28
29
|
api.pages.map((page, i) => {
|
|
29
30
|
if (page.type === 'page')
|
|
30
31
|
return (
|
|
@@ -34,5 +35,5 @@ labelFirst = '\u00AB', labelPrevious = '\u2190', labelEllipsis = '\u22EF', label
|
|
|
34
35
|
return (
|
|
35
36
|
// Ellipsis
|
|
36
37
|
_jsx("span", { ...api.getEllipsisProps({ index: i }), className: `${buttonBase} ${buttonInactive} ${buttonClasses}`, "data-testid": "pagination-ellipsis", children: labelEllipsis }, `ellipsis-${i}`));
|
|
37
|
-
}), alternative && (_jsxs("span", { className: `${buttonBase} ${buttonInactive} ${buttonClasses}`, "data-testid": "pagination-alt-ui", children: [_jsxs("span", { children: [api.pageRange.start + 1, " - ", api.pageRange.end] }), _jsxs("span", { className: "opacity-60", children: [api.page, " ", textSeparator, " ", api.totalPages] })] })), _jsx("button", { type: "button", ...api.getNextTriggerProps(), className: `${buttonBase} ${buttonInactive} ${buttonHover} ${buttonClasses}`, title: titleNext, disabled: !api.nextPage, "data-testid": "pagination-button-next", children: labelNext }),
|
|
38
|
+
}), alternative && (_jsxs("span", { className: `${buttonBase} ${buttonInactive} ${buttonClasses}`, "data-testid": "pagination-alt-ui", children: [_jsxs("span", { children: [api.pageRange.start + 1, " - ", api.pageRange.end] }), _jsxs("span", { className: "opacity-60", children: [api.page, " ", textSeparator, " ", api.totalPages] })] })), _jsx("button", { type: "button", ...api.getNextTriggerProps(), className: `${buttonBase} ${buttonInactive} ${buttonHover} ${buttonClasses}`, title: titleNext, disabled: !api.nextPage, "data-testid": "pagination-button-next", children: labelNext }), showFirstLastButtons && (_jsx("button", { type: "button", onClick: api.goToLastPage, className: `${buttonBase} ${buttonInactive} ${buttonHover} ${buttonClasses}`, title: titleLast, disabled: !api.nextPage, "data-testid": "pagination-button-last", children: labelLast }))] })) }));
|
|
38
39
|
};
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import * as pagination from '@zag-js/pagination';
|
|
3
|
-
export interface PaginationProps extends Omit<pagination.Context, 'id'> {
|
|
3
|
+
export interface PaginationProps extends Omit<pagination.Context, 'id' | 'count'> {
|
|
4
|
+
/** Provide source data as an array. */
|
|
4
5
|
data: unknown[];
|
|
6
|
+
/** Total number of data items. Required for server-side pagination. */
|
|
7
|
+
count?: number;
|
|
8
|
+
/** Enables alternative display with stats and first/last buttons. */
|
|
5
9
|
alternative?: boolean;
|
|
6
10
|
/** Set the separator text or character, such as "of" in "X of Y". */
|
|
7
11
|
textSeparator?: string;
|
|
12
|
+
/** Show first and last page button. */
|
|
13
|
+
showFirstLastButtons?: boolean;
|
|
8
14
|
/** Set an optional title for the first button. */
|
|
9
15
|
titleFirst?: string;
|
|
10
16
|
/** Set an optional title for the previous button. */
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { useId } from 'react';
|
|
4
4
|
import { normalizeProps, useMachine } from '@zag-js/react';
|
|
5
5
|
import * as progress from '@zag-js/progress';
|
|
6
|
-
export const ProgressRing = ({ label, strokeWidth = '10px', strokeLinecap = 'round',
|
|
6
|
+
export const ProgressRing = ({ label, showLabel = false, strokeWidth = '10px', strokeLinecap = 'round',
|
|
7
7
|
// Root
|
|
8
8
|
base = 'relative', size = 'size-32', classes = '',
|
|
9
9
|
// Slot
|
|
@@ -27,5 +27,5 @@ children,
|
|
|
27
27
|
// Reactive Classes
|
|
28
28
|
const rxAnimCircle = api.indeterminate ? 'animate-spin' : '';
|
|
29
29
|
const rxAnimMeter = api.indeterminate ? meterAnimate : '';
|
|
30
|
-
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(), className: `${svgBase} ${svgClasses} ${rxAnimCircle}`, style: { '--size': '100%', '--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 && (_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}%` }))] })] }));
|
|
30
|
+
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(), className: `${svgBase} ${svgClasses} ${rxAnimCircle}`, style: { '--size': '100%', '--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}%` }))] })] }));
|
|
31
31
|
};
|
|
@@ -2,6 +2,8 @@ import * as progress from '@zag-js/progress';
|
|
|
2
2
|
export interface ProgressRingProps extends React.PropsWithChildren, Omit<progress.Context, 'id'> {
|
|
3
3
|
/** Set the text for the scalable label */
|
|
4
4
|
label?: string;
|
|
5
|
+
/** When enabled, show a text label with the percentage amount */
|
|
6
|
+
showLabel?: boolean;
|
|
5
7
|
/** Set the stroke size (ex: 15px) */
|
|
6
8
|
strokeWidth?: string;
|
|
7
9
|
/** Defines the shape of the meter */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx,
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as rating from '@zag-js/rating-group';
|
|
4
4
|
import { useMachine, normalizeProps } from '@zag-js/react';
|
|
5
5
|
import { useId } from 'react';
|
|
@@ -11,7 +11,7 @@ base = '', classes = '',
|
|
|
11
11
|
// Control
|
|
12
12
|
controlBase = 'flex', controlGap = 'gap-2', controlClasses,
|
|
13
13
|
// Label
|
|
14
|
-
labelBase = '', labelClasses = '',
|
|
14
|
+
labelBase = 'label-text', labelClasses = '',
|
|
15
15
|
// Item
|
|
16
16
|
itemBase = '', itemClasses = '',
|
|
17
17
|
// State
|
|
@@ -47,6 +47,6 @@ onValueChange = noop,
|
|
|
47
47
|
return iconFull;
|
|
48
48
|
}
|
|
49
49
|
})();
|
|
50
|
-
return (_jsx(
|
|
50
|
+
return (_jsx("span", { ...api.getItemProps({ index: item }), className: `${itemBase} ${itemClasses}`, "data-testid": "rating-item", children: icon }, item));
|
|
51
51
|
}) }), _jsx("input", { ...api.getHiddenInputProps(), "data-testid": "rating-input" })] }));
|
|
52
52
|
};
|
|
@@ -19,6 +19,8 @@ orientVertical = 'flex-col', orientHorizontal = 'flex-row', stateDisabled = 'dis
|
|
|
19
19
|
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', indicatorClasses = '',
|
|
20
20
|
// Events
|
|
21
21
|
onValueChange = noop,
|
|
22
|
+
// Label
|
|
23
|
+
labelledby = '',
|
|
22
24
|
// Children
|
|
23
25
|
children,
|
|
24
26
|
// Zag
|
|
@@ -36,7 +38,7 @@ children,
|
|
|
36
38
|
const rxOrientation = state.context.orientation === 'vertical' ? orientVertical : orientHorizontal;
|
|
37
39
|
const rxDisabled = state.context.disabled ? stateDisabled : '';
|
|
38
40
|
const rxReadOnly = state.context.readOnly ? stateReadOnly : '';
|
|
39
|
-
return (_jsxs("div", { ...api.getRootProps(), className: `${base} ${rxOrientation} ${background} ${border} ${padding} ${gap} ${rounded} ${width} ${rxDisabled} ${rxReadOnly} ${classes}`, "data-testid": "segment", children: [_jsx("div", { ...api.getIndicatorProps(), className: `${indicatorBase} ${indicatorBg} ${indicatorRounded} ${indicatorClasses}`, "data-testid": "segment-indicator" }), _jsx(SegmentContext.Provider, { value: ctx, children: children })] }));
|
|
41
|
+
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 })] }));
|
|
40
42
|
};
|
|
41
43
|
const SegmentItem = ({
|
|
42
44
|
// Root
|
|
@@ -26,11 +26,11 @@ export interface SegmentProps extends React.PropsWithChildren, Omit<radio.Contex
|
|
|
26
26
|
classes?: string;
|
|
27
27
|
/** Set classes to provide a vertical layout. */
|
|
28
28
|
orientVertical?: string;
|
|
29
|
-
/** Set classes to provide a
|
|
29
|
+
/** Set classes to provide a horizontal layout. */
|
|
30
30
|
orientHorizontal?: string;
|
|
31
|
-
/** Set
|
|
31
|
+
/** Set classes for the disabled state. */
|
|
32
32
|
stateDisabled?: string;
|
|
33
|
-
/** Set
|
|
33
|
+
/** Set classes for the read-only state. */
|
|
34
34
|
stateReadOnly?: string;
|
|
35
35
|
/** Sets base classes to the indicator. */
|
|
36
36
|
indicatorBase?: string;
|
|
@@ -42,6 +42,8 @@ export interface SegmentProps extends React.PropsWithChildren, Omit<radio.Contex
|
|
|
42
42
|
indicatorRounded?: string;
|
|
43
43
|
/** Provide arbitrary CSS classes to the indicator. */
|
|
44
44
|
indicatorClasses?: string;
|
|
45
|
+
/** Set aria-labelledby for element */
|
|
46
|
+
labelledby?: string;
|
|
45
47
|
/** Triggers when the value state is changed. */
|
|
46
48
|
onValueChange?: (value: string) => void;
|
|
47
49
|
}
|
|
@@ -14,7 +14,7 @@ trackBase = 'overflow-hidden', trackBg = 'bg-surface-200-800', trackRounded = 'r
|
|
|
14
14
|
// Meter ---
|
|
15
15
|
meterBase = '', meterBg = 'bg-surface-950-50', materRounded = 'rounded-container', meterClasses = '',
|
|
16
16
|
// Thumb ---
|
|
17
|
-
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',
|
|
17
|
+
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 = '',
|
|
18
18
|
// Markers ---
|
|
19
19
|
markersBase = '', markerslasses = '',
|
|
20
20
|
// Mark ---
|
|
@@ -36,7 +36,7 @@ mark,
|
|
|
36
36
|
const api = slider.connect(state, send, normalizeProps);
|
|
37
37
|
// Reactive
|
|
38
38
|
const rxDisabled = state.context.disabled ? stateDisabled : '';
|
|
39
|
-
const rxReadOnly = state.context.readOnly ? stateReadOnly :
|
|
39
|
+
const rxReadOnly = state.context.readOnly ? stateReadOnly : thumbCursor;
|
|
40
40
|
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} ${materRounded} ${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} ${markerslasses}`, "data-testid": "slider-markers", children: markers.map((value) => (
|
|
41
41
|
// Mark
|
|
42
42
|
_jsx("span", { ...api.getMarkerProps({ value }), className: `${markBase} ${markText} ${markOpacity} ${markClasses}`, "data-testid": "slider-mark", children: mark ? mark : value }, value))) }))] }));
|
|
@@ -41,8 +41,6 @@ export interface SliderProps extends Omit<slider.Context, 'id' | 'onValueChange'
|
|
|
41
41
|
thumbRingColor?: string;
|
|
42
42
|
/** Set border-radius classes for the thumb. */
|
|
43
43
|
thumbRounded?: string;
|
|
44
|
-
/** Set scale classes for the thumb. */
|
|
45
|
-
thumbScale?: string;
|
|
46
44
|
/** Set cursor classes for the thumb. */
|
|
47
45
|
thumbCursor?: string;
|
|
48
46
|
/** Provide arbitrary classes for the thumb. */
|
|
@@ -8,7 +8,7 @@ export const Switch = ({ name = '', checked = false, disabled = false, compact =
|
|
|
8
8
|
// Root (Track)
|
|
9
9
|
base = 'inline-flex items-center gap-4',
|
|
10
10
|
// State
|
|
11
|
-
stateFocused = '[
|
|
11
|
+
stateFocused = 'data-[focus-visible]:focused', classes = '',
|
|
12
12
|
// Control
|
|
13
13
|
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 = '',
|
|
14
14
|
// Thumb
|
|
@@ -47,5 +47,5 @@ children, inactiveChild, activeChild }) => {
|
|
|
47
47
|
const rxThumbState = api.checked ? `${thumbActive} ${thumbTranslateX}` : thumbInactive;
|
|
48
48
|
const rxDisabled = api.disabled ? controlDisabled : '';
|
|
49
49
|
const rxFocused = api.focused ? stateFocused : '';
|
|
50
|
-
return (_jsxs("label", { ...api.getRootProps(), className: `${base} ${
|
|
50
|
+
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: `${controlBase} ${rxTrackState} ${rxFocused} ${controlWidth} ${controlHeight} ${controlPadding} ${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: [!checked && inactiveChild ? (_jsx("span", { className: iconInactiveBase, "data-testid": "switch-icon-inactive", children: inactiveChild })) : null, 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] }));
|
|
51
51
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { Accordion } from './components/Accordion/Accordion.js';
|
|
|
2
2
|
export { Avatar } from './components/Avatar/Avatar.js';
|
|
3
3
|
export { AppBar } from './components/AppBar/AppBar.js';
|
|
4
4
|
export { FileUpload } from './components/FileUpload/FileUpload.js';
|
|
5
|
-
export {
|
|
5
|
+
export { Navigation } from './components/Navigation/Navigation.js';
|
|
6
6
|
export { Pagination } from './components/Pagination/Pagination.js';
|
|
7
7
|
export { Progress } from './components/Progress/Progress.js';
|
|
8
8
|
export { ProgressRing } from './components/ProgressRing/ProgressRing.js';
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ export { Accordion } from './components/Accordion/Accordion.js';
|
|
|
3
3
|
export { Avatar } from './components/Avatar/Avatar.js';
|
|
4
4
|
export { AppBar } from './components/AppBar/AppBar.js';
|
|
5
5
|
export { FileUpload } from './components/FileUpload/FileUpload.js';
|
|
6
|
-
export {
|
|
6
|
+
export { Navigation } from './components/Navigation/Navigation.js';
|
|
7
7
|
export { Pagination } from './components/Pagination/Pagination.js';
|
|
8
8
|
export { Progress } from './components/Progress/Progress.js';
|
|
9
9
|
export { ProgressRing } from './components/ProgressRing/ProgressRing.js';
|
package/dist/internal/nodes.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
export 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" }) }));
|
|
3
|
-
export const starHalf = (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24",
|
|
3
|
+
export 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" })] }));
|
|
4
4
|
export 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" }) }));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skeletonlabs/skeleton-react",
|
|
3
|
-
"version": "1.0.0-next.
|
|
3
|
+
"version": "1.0.0-next.12",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -29,45 +29,45 @@
|
|
|
29
29
|
"!./dist/schemas.d.ts"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@zag-js/accordion": "^0.
|
|
33
|
-
"@zag-js/avatar": "^0.
|
|
34
|
-
"@zag-js/file-upload": "^0.
|
|
35
|
-
"@zag-js/pagination": "^0.
|
|
36
|
-
"@zag-js/progress": "^0.
|
|
37
|
-
"@zag-js/radio-group": "^0.
|
|
38
|
-
"@zag-js/rating-group": "^0.
|
|
39
|
-
"@zag-js/react": "^0.
|
|
40
|
-
"@zag-js/slider": "^0.
|
|
41
|
-
"@zag-js/switch": "^0.
|
|
42
|
-
"@zag-js/tabs": "^0.
|
|
43
|
-
"@zag-js/tags-input": "^0.
|
|
32
|
+
"@zag-js/accordion": "^0.78.3",
|
|
33
|
+
"@zag-js/avatar": "^0.78.3",
|
|
34
|
+
"@zag-js/file-upload": "^0.78.3",
|
|
35
|
+
"@zag-js/pagination": "^0.78.3",
|
|
36
|
+
"@zag-js/progress": "^0.78.3",
|
|
37
|
+
"@zag-js/radio-group": "^0.78.3",
|
|
38
|
+
"@zag-js/rating-group": "^0.78.3",
|
|
39
|
+
"@zag-js/react": "^0.78.3",
|
|
40
|
+
"@zag-js/slider": "^0.78.3",
|
|
41
|
+
"@zag-js/switch": "^0.78.3",
|
|
42
|
+
"@zag-js/tabs": "^0.78.3",
|
|
43
|
+
"@zag-js/tags-input": "^0.78.3"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"react": "^18.0.0",
|
|
47
|
-
"react-dom": "^18.0.0"
|
|
46
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
47
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@tailwindcss/forms": "^0.5.9",
|
|
51
|
-
"@testing-library/jest-dom": "^6.6.
|
|
51
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
52
52
|
"@testing-library/react": "^16.0.1",
|
|
53
53
|
"@testing-library/user-event": "^14.5.2",
|
|
54
|
-
"@types/react": "^18.3.
|
|
54
|
+
"@types/react": "^18.3.13",
|
|
55
55
|
"@types/react-dom": "^18.3.1",
|
|
56
|
-
"@vitejs/plugin-react": "^4.3.
|
|
56
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
57
57
|
"autoprefixer": "^10.4.20",
|
|
58
58
|
"jsdom": "^25.0.1",
|
|
59
|
-
"lucide-react": "^0.
|
|
60
|
-
"postcss": "^8.4.
|
|
59
|
+
"lucide-react": "^0.465.0",
|
|
60
|
+
"postcss": "^8.4.49",
|
|
61
61
|
"react": "^18.3.1",
|
|
62
62
|
"react-dom": "^18.3.1",
|
|
63
|
-
"react-router-dom": "^
|
|
64
|
-
"tailwindcss": "^3.4.
|
|
63
|
+
"react-router-dom": "^7.0.2",
|
|
64
|
+
"tailwindcss": "^3.4.16",
|
|
65
65
|
"typescript": "^5.6.3",
|
|
66
|
-
"vite": "^
|
|
66
|
+
"vite": "^6.0.2",
|
|
67
67
|
"vite-plugin-remix-router": "^2.0.0",
|
|
68
|
-
"vitest": "^2.1.
|
|
69
|
-
"
|
|
70
|
-
"
|
|
68
|
+
"vitest": "^2.1.8",
|
|
69
|
+
"vite-plugin-tw-plugin-watcher": "0.0.1-next.0",
|
|
70
|
+
"@skeletonlabs/skeleton": "3.0.0-next.10"
|
|
71
71
|
},
|
|
72
72
|
"scripts": {
|
|
73
73
|
"dev": "vite",
|
|
@@ -75,6 +75,6 @@
|
|
|
75
75
|
"preview": "vite preview",
|
|
76
76
|
"package": "tsc --project tsconfig.package.json",
|
|
77
77
|
"package:watch": "tsc --project tsconfig.package.json --watch --preserveWatchOutput",
|
|
78
|
-
"test": "vitest"
|
|
78
|
+
"test": "vitest run"
|
|
79
79
|
}
|
|
80
80
|
}
|