@skeletonlabs/skeleton-react 1.0.0-next.14 → 1.0.0-next.15
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/Accordion/Accordion.js +2 -2
- package/dist/components/Avatar/Avatar.js +1 -1
- package/dist/components/FileUpload/FileUpload.js +1 -1
- package/dist/components/Navigation/Navigation.js +3 -2
- package/dist/components/Progress/Progress.js +2 -2
- package/dist/components/Segment/Segment.js +1 -1
- package/dist/components/Tabs/Tabs.js +1 -1
- package/dist/components/TagsInput/TagsInput.js +1 -1
- package/package.json +9 -13
|
@@ -18,7 +18,7 @@ export const AccordionItemContext = createContext({
|
|
|
18
18
|
// Components ---
|
|
19
19
|
const AccordionRoot = ({ animDuration = 0.2,
|
|
20
20
|
// Root
|
|
21
|
-
base = '', padding = '', spaceY = 'space-y-2', rounded = 'rounded', width = 'w-full', classes = '',
|
|
21
|
+
base = '', padding = '', spaceY = 'space-y-2', rounded = 'rounded-base', width = 'w-full', classes = '',
|
|
22
22
|
// Icons
|
|
23
23
|
iconOpen = '-', iconClosed = '+',
|
|
24
24
|
// Events
|
|
@@ -45,7 +45,7 @@ children, ...zagProps }) => {
|
|
|
45
45
|
};
|
|
46
46
|
const AccordionControl = ({ headingElement = 'h3',
|
|
47
47
|
// Control
|
|
48
|
-
base = 'flex text-start items-center space-x-4 w-full', hover = 'hover:preset-tonal-primary', padding = 'py-2 px-4', rounded = 'rounded', classes = '',
|
|
48
|
+
base = 'flex text-start items-center space-x-4 w-full', hover = 'hover:preset-tonal-primary', padding = 'py-2 px-4', rounded = 'rounded-base', classes = '',
|
|
49
49
|
// Lead
|
|
50
50
|
leadBase = '', leadClasses = '',
|
|
51
51
|
// Content
|
|
@@ -21,5 +21,5 @@ children }) => {
|
|
|
21
21
|
.map((word) => word[0])
|
|
22
22
|
.join('');
|
|
23
23
|
}
|
|
24
|
-
return (_jsxs("figure", { ...api.getRootProps(), className: `${base} ${background} ${size} ${font} ${border} ${rounded} ${shadow} ${classes}`, "data-testid": "avatar", children: [(src || srcSet) && (_jsx("img", {
|
|
24
|
+
return (_jsxs("figure", { ...api.getRootProps(), className: `${base} ${background} ${size} ${font} ${border} ${rounded} ${shadow} ${classes}`, "data-testid": "avatar", children: [(src || srcSet) && (_jsx("img", { src: src, srcSet: srcSet, alt: name, className: `${imageBase} ${imageClasses}`, style: { ...style, filter: filter ? `url(${filter})` : undefined }, "data-testid": "avatar-image", ...api.getImageProps() })), _jsx("span", { ...api.getFallbackProps(), className: `${fallbackBase} ${fallbackClasses}`, "data-testid": "avatar-fallback", children: children ? children : getInitials(name) })] }));
|
|
25
25
|
};
|
|
@@ -13,7 +13,7 @@ interfaceIcon = '', interfaceText = '', interfaceSubtext = 'type-scale-1 opacity
|
|
|
13
13
|
// Files List
|
|
14
14
|
filesListBase = 'mt-2 space-y-2', filesListClasses = '',
|
|
15
15
|
// File
|
|
16
|
-
fileBase = 'grid grid-cols-[auto_1fr_auto] rtl:grid-cols-[1fr_auto_auto] items-center', fileBg = 'preset-tonal', fileGap = 'gap-4 px-4', filePadding = 'py-2', fileRounded = 'rounded', fileClasses = '',
|
|
16
|
+
fileBase = 'grid grid-cols-[auto_1fr_auto] rtl:grid-cols-[1fr_auto_auto] items-center', fileBg = 'preset-tonal', fileGap = 'gap-4 px-4', filePadding = 'py-2', fileRounded = 'rounded-base', fileClasses = '',
|
|
17
17
|
// File (content)
|
|
18
18
|
fileIcon = '', fileName = 'type-scale-2 flex items-center gap-4', fileSize = 'type-scale-1 opacity-60', fileButton = '',
|
|
19
19
|
// State
|
|
@@ -61,7 +61,7 @@ children }) => {
|
|
|
61
61
|
};
|
|
62
62
|
return (_jsx("aside", { className: `${base} ${background} ${width} ${height} ${padding} ${classes}`, "data-testid": "nav-bar", children: _jsx(NavContext.Provider, { value: ctx, children: children ? (_jsx("nav", { className: `${tilesBase} ${tilesFlexDirection} ${tilesJustify} ${tilesItems} ${tilesGap} ${tilesClasses}`, children: children })) : null }) }));
|
|
63
63
|
};
|
|
64
|
-
export const NavTile = ({ id, href, target, label, labelExpanded, title, selected =
|
|
64
|
+
export const NavTile = ({ id, href, target, label, labelExpanded, title, selected = undefined, type = 'button',
|
|
65
65
|
// Root
|
|
66
66
|
base = 'flex items-center', width = 'w-full', aspect = 'aspect-square', background = '', hover = 'hover:preset-filled-surface-50-950', active = 'preset-filled-primary-500', padding = 'p-2', gap = 'gap-1', rounded = 'rounded-container', classes = 'flex-col justify-center',
|
|
67
67
|
// Expanded
|
|
@@ -88,7 +88,8 @@ children }) => {
|
|
|
88
88
|
const classesCollapsed = `${rxSize} ${padding} ${gap} ${classes}`;
|
|
89
89
|
const classesExtended = `${expandedPadding} ${expandedGap} ${expandedClasses}`;
|
|
90
90
|
const rxMode = ctx.expanded ? classesExtended : classesCollapsed;
|
|
91
|
-
const
|
|
91
|
+
const isActive = selected !== undefined ? selected : ctx.value === id;
|
|
92
|
+
const rxBackground = isActive ? active : `${background} ${hover}`;
|
|
92
93
|
function onClickHandler() {
|
|
93
94
|
if (onClick && !id)
|
|
94
95
|
throw new Error('No ID was provided');
|
|
@@ -9,9 +9,9 @@ base = 'flex items-center gap-4', height = 'h-2', width = 'w-full', classes = ''
|
|
|
9
9
|
// Label
|
|
10
10
|
labelBase = 'whitespace-nowrap', labelText = 'text-xs', labelClasses = '',
|
|
11
11
|
// Track
|
|
12
|
-
trackBase = 'h-full w-full overflow-x-hidden', trackBg = 'bg-surface-200-800', trackRounded = 'rounded', trackClasses = '',
|
|
12
|
+
trackBase = 'h-full w-full overflow-x-hidden', trackBg = 'bg-surface-200-800', trackRounded = 'rounded-base', trackClasses = '',
|
|
13
13
|
// Meter
|
|
14
|
-
meterBase = 'h-full w-full', meterBg = 'bg-surface-950-50', meterRounded = 'rounded', meterTransition = 'transition-[width]', meterAnimate = 'animate-progress-indeterminate', meterClasses = '',
|
|
14
|
+
meterBase = 'h-full w-full', meterBg = 'bg-surface-950-50', meterRounded = 'rounded-base', meterTransition = 'transition-[width]', meterAnimate = 'animate-progress-indeterminate', meterClasses = '',
|
|
15
15
|
// Children
|
|
16
16
|
children,
|
|
17
17
|
// Zag
|
|
@@ -16,7 +16,7 @@ base = 'inline-flex items-stretch overflow-hidden', background = 'preset-outline
|
|
|
16
16
|
// States
|
|
17
17
|
orientVertical = 'flex-col', orientHorizontal = 'flex-row', stateDisabled = 'disabled', stateReadOnly = 'pointer-events-none',
|
|
18
18
|
// Indicator
|
|
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 = '',
|
|
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-base', indicatorClasses = '',
|
|
20
20
|
// Events
|
|
21
21
|
onValueChange = noop,
|
|
22
22
|
// Label
|
|
@@ -41,7 +41,7 @@ base = 'border-b-[1px] border-transparent', padding = 'pb-2', translateX = 'tran
|
|
|
41
41
|
// Label
|
|
42
42
|
labelBase = 'btn hover:preset-tonal-primary', labelClasses = '',
|
|
43
43
|
// State
|
|
44
|
-
stateInactive = '[&:not(:hover)]:opacity-50', stateActive = 'border-surface-950-50 opacity-100', stateLabelInactive = '', stateLabelActive = '',
|
|
44
|
+
stateInactive = '[&:not(:hover)]:opacity-50', stateActive = 'border-b-surface-950-50 opacity-100', stateLabelInactive = '', stateLabelActive = '',
|
|
45
45
|
// Nodes
|
|
46
46
|
lead,
|
|
47
47
|
// Children
|
|
@@ -6,7 +6,7 @@ import { useMachine, normalizeProps } from '@zag-js/react';
|
|
|
6
6
|
import { noop } from '../../internal/noop.js';
|
|
7
7
|
export const TagsInput = ({ placeholder = '',
|
|
8
8
|
// Root
|
|
9
|
-
base = 'grid input', gap = 'gap-2', padding = 'p-3', classes = '',
|
|
9
|
+
base = 'grid input !h-auto', gap = 'gap-2', padding = 'p-3', classes = '',
|
|
10
10
|
// Input: Add
|
|
11
11
|
inputBase = 'input-ghost', inputClasses = '',
|
|
12
12
|
// Tag List
|
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.15",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -47,6 +47,8 @@
|
|
|
47
47
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
+
"tailwindcss": "^4.0.7",
|
|
51
|
+
"@tailwindcss/vite": "^4.0.2",
|
|
50
52
|
"@tailwindcss/forms": "^0.5.9",
|
|
51
53
|
"@testing-library/jest-dom": "^6.6.3",
|
|
52
54
|
"@testing-library/react": "^16.0.1",
|
|
@@ -54,27 +56,21 @@
|
|
|
54
56
|
"@types/react": "^18.3.13",
|
|
55
57
|
"@types/react-dom": "^18.3.1",
|
|
56
58
|
"@vitejs/plugin-react": "^4.3.4",
|
|
57
|
-
"autoprefixer": "^10.4.20",
|
|
58
59
|
"jsdom": "^25.0.1",
|
|
59
60
|
"lucide-react": "^0.465.0",
|
|
60
|
-
"postcss": "^8.4.49",
|
|
61
61
|
"react": "^18.3.1",
|
|
62
62
|
"react-dom": "^18.3.1",
|
|
63
63
|
"react-router-dom": "^7.0.2",
|
|
64
|
-
"
|
|
65
|
-
"typescript": "^5.6.3",
|
|
64
|
+
"typescript": "^5.7.3",
|
|
66
65
|
"vite": "^6.0.2",
|
|
67
66
|
"vite-plugin-remix-router": "^2.0.0",
|
|
68
67
|
"vitest": "^2.1.8",
|
|
69
|
-
"@skeletonlabs/skeleton": "3.0.0-next.
|
|
70
|
-
"vite-plugin-tw-plugin-watcher": "0.0.1-next.0"
|
|
68
|
+
"@skeletonlabs/skeleton": "3.0.0-next.11"
|
|
71
69
|
},
|
|
72
70
|
"scripts": {
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"package:watch": "tsc --project tsconfig.package.json --watch --preserveWatchOutput",
|
|
78
|
-
"test": "vitest run"
|
|
71
|
+
"build": "tsc --noCheck --project tsconfig.package.json",
|
|
72
|
+
"dev": "tsc --noCheck --project tsconfig.package.json --watch --preserveWatchOutput",
|
|
73
|
+
"test": "vitest run",
|
|
74
|
+
"test:watch": "vitest run --watch"
|
|
79
75
|
}
|
|
80
76
|
}
|