pixelplay 1.0.13 → 1.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/CHANGELOG.md +93 -61
- package/README.md +91 -91
- package/dist/index.js +19 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +38 -21
- package/dist/index.mjs.map +1 -1
- package/dist/server.js.map +1 -1
- package/dist/server.mjs.map +1 -1
- package/package.json +75 -80
package/CHANGELOG.md
CHANGED
|
@@ -1,61 +1,93 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to **PixelPlay UI** are documented here.
|
|
4
|
-
|
|
5
|
-
This project adheres to [Semantic Versioning](https://semver.org/).
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## [1.0
|
|
10
|
-
|
|
11
|
-
### Added
|
|
12
|
-
|
|
13
|
-
- **
|
|
14
|
-
- **
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
- **
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
- **
|
|
29
|
-
- **
|
|
30
|
-
- **
|
|
31
|
-
- **
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
- **
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to **PixelPlay UI** are documented here.
|
|
4
|
+
|
|
5
|
+
This project adheres to [Semantic Versioning](https://semver.org/).
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## [1.2.0] — 2026-04-03
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- **Theme generator**: Full-featured live theme generator page with accent picker, harmony selector, font selector, roundness presets, and surface tint controls — changes apply site-wide in real time
|
|
14
|
+
- **Color harmony engine** (`color-harmony.ts`): Six standard color harmonies — monochromatic, complementary, split-complementary, analogous, triadic, and tetradic — with gap-bisection algorithm for 10-slot graphic palette distribution
|
|
15
|
+
- **Custom theme builder** (`build-custom-theme.ts`): Generates full token sets (primary, secondary, tertiary, surfaces, graphics) from accent + harmony + options; shade-level differentiation for triadic vs other harmonies
|
|
16
|
+
- **Toolbar component**: Reusable `Toolbar` with `floating`/`fixed` variants, `showLabels` prop (`"above"` | `"side"`), `ToolbarDivider`, and `useToolbarLabels()` context hook
|
|
17
|
+
- **Toolbar docs page**: Component documentation with interactive demos for variant, size, and label placement
|
|
18
|
+
- **Export panel**: TypeScript and CSS export formats for generated themes with one-click copy
|
|
19
|
+
- **Split-complementary harmony**: ±30° from complement (150° and 210° from primary hue)
|
|
20
|
+
- **Getting started page**: Expanded documentation with setup instructions
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
|
|
24
|
+
- **Harmony naming**: Renamed to standard color theory terms — single-tone → monochromatic, contrast → complementary, neighbors → analogous, balanced → triadic, vibrant → tetradic
|
|
25
|
+
- **Default theme**: Changed from Inkwell to Rosewood
|
|
26
|
+
- **Graphic palette algorithm**: Replaced fixed 30° hue stepping with gap-bisection algorithm so chart colors adapt to each harmony's unique hue distribution
|
|
27
|
+
- **Triadic shade differentiation**: Triadic harmony uses softer shades (500 vs 600 light, 300 vs 400 dark) to visually distinguish from tetradic
|
|
28
|
+
- **Toolbar positioning**: Removed built-in `fixed` positioning from Toolbar component — positioning is now consumer-controlled via `className`, making the component composable in any layout context
|
|
29
|
+
- **Select dropdown positioning**: Replaced `useEffect` + `setState` with `useCallback`-based toggle to fix React `setState` in effect warning
|
|
30
|
+
- **DocsLayoutShell padding**: Reduced mobile padding (`px-3 py-6 sm:px-6 sm:py-10`) to prevent compounding with page-level padding
|
|
31
|
+
- **npm package**: Restructured with `tsup` bundler, added license validation, server utilities, and CSS generation script
|
|
32
|
+
|
|
33
|
+
### Fixed
|
|
34
|
+
|
|
35
|
+
- **Build error**: Added missing `"use client"` directive to Toolbar component
|
|
36
|
+
- **Select dropdown clipping**: Added `pb-72` to dropdown preview containers for overflow room
|
|
37
|
+
- **Toolbar swatch clipping**: Added `overflow-visible` to prevent border-radius from clipping ring/scale effects on accent swatches
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## [1.0.3] — 2026-04-01
|
|
42
|
+
|
|
43
|
+
### Added
|
|
44
|
+
|
|
45
|
+
- **Auth examples**: `auth-03` (split-screen sign-in with testimonial carousel) and `auth-04` (split-screen sign-in with image only)
|
|
46
|
+
- **Sign-up examples**: `signup-01` (centered email + social), `signup-02` (header + tabs), `signup-03` (split-screen + testimonial carousel), `signup-04` (split-screen + image only)
|
|
47
|
+
- **`SplitImagePanel` widget**: New generic widget accepting any overlay content as `children`. Replaces the testimonial-specific panel. Supports image-only mode or any custom JSX overlay
|
|
48
|
+
- **`SplitImagePanel` docs page**: Component documentation with three demo sections — image only, with overlay content, and with navigation carousel
|
|
49
|
+
|
|
50
|
+
### Changed
|
|
51
|
+
|
|
52
|
+
- **Sidebar nav**: Renamed "Auth testimonial panel" entry to "Split image panel" with updated href
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## [1.0.2] — 2026-04-01
|
|
57
|
+
|
|
58
|
+
### Changed
|
|
59
|
+
|
|
60
|
+
- **Feature section grid**: Updated to 4-column layout on large screens
|
|
61
|
+
- **Feature section images**: Full-width responsive images replacing aspect-ratio crop — no content is clipped
|
|
62
|
+
- **Feature section images**: Added primary-colored overlay with `mix-blend-color` tint for grayscale thumbnails
|
|
63
|
+
- **Dark mode image previews**: Boosted brightness and reduced overlay opacity for better visibility in dark mode
|
|
64
|
+
- **Example preview containers**: Replaced raw Tailwind color scales with theme tokens for dark mode consistency
|
|
65
|
+
- **Dark mode scrim token**: Changed from opaque black to subtle white tint across all themes (default, Rosewood, Botanica, Inkwell)
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## [1.0.1] — 2026-04-01
|
|
70
|
+
|
|
71
|
+
### Added
|
|
72
|
+
|
|
73
|
+
- **Dashboard examples**: New dashboard variants (`dashboards-05`, `dashboards-06`) — analytics/map dashboard and personal finance dashboard
|
|
74
|
+
- **Country icon set**: Added `CountryFlag` component for displaying country flag icons
|
|
75
|
+
|
|
76
|
+
### Fixed
|
|
77
|
+
|
|
78
|
+
- **Button `isIconOnly`**: Icon-only buttons now correctly render `children` — previously only `startContent`/`endContent` were visible, leaving icon-only buttons empty
|
|
79
|
+
- **Button hover visibility**: Improved hover background tokens for `ghost`, `bordered`, and `light` variants (default color) — hover state is now clearly visible against surface backgrounds
|
|
80
|
+
- Removed stale `import { start } from "repl"` in Button component
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## [1.0.0] — 2026-03-30
|
|
85
|
+
|
|
86
|
+
### Added
|
|
87
|
+
|
|
88
|
+
- Initial public release of PixelPlay UI
|
|
89
|
+
- Base components: `Button`, `ButtonGroup`, `Input`, `Textarea`, `Badge`, `BadgeGroup`, `Tag`, `Card`, `Spinner`, `Avatar`, `SocialButton`, `StoreButton`, `DropdownMenu`, `Select`, `Toggle`, `Checkbox`, `CheckboxGroup`, `Progress`, `CircularProgress`, `Slider`, `Tooltip`
|
|
90
|
+
- Application components: `Modal`, `Chart`, `Pagination`, `Messaging`, `DataTable`, `Tabs`, `Breadcrumb`, `Alert`, `Toast`, `DatePicker`, `Calendar`, `FileTypeIcon`, `FileUpload`
|
|
91
|
+
- Full TypeScript type definitions
|
|
92
|
+
- Tailwind CSS 4 theme token system with light/dark mode support
|
|
93
|
+
- Three built-in themes: Rosewood, Botanica, Inkwell
|
package/README.md
CHANGED
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
# PixelPlay UI
|
|
2
|
-
|
|
3
|
-
> A scalable React component library with production-ready components, layouts, and themes for SaaS products.
|
|
4
|
-
|
|
5
|
-
Built by [Dennis Isaac](https://dennisisaac.com) · [Live Docs](https://dennisisaac.com/ui-kit)
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Installation
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
npm install pixelplay
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
yarn add pixelplay
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
pnpm add pixelplay
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Requirements
|
|
24
|
-
|
|
25
|
-
- React 18+
|
|
26
|
-
- Tailwind CSS 4+
|
|
27
|
-
- TypeScript 5+ (recommended)
|
|
28
|
-
|
|
29
|
-
## Quick Start
|
|
30
|
-
|
|
31
|
-
```tsx
|
|
32
|
-
import { Button, Badge, Avatar, Input } from "pixelplay";
|
|
33
|
-
|
|
34
|
-
export function MyComponent() {
|
|
35
|
-
return (
|
|
36
|
-
<div>
|
|
37
|
-
<Avatar name="Dennis Isaac" size="md" />
|
|
38
|
-
<Badge color="purple">New</Badge>
|
|
39
|
-
<Button color="primary" variant="solid">Get Started</Button>
|
|
40
|
-
</div>
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
## Theme Setup
|
|
46
|
-
|
|
47
|
-
Add the PixelPlay theme tokens to your global CSS:
|
|
48
|
-
|
|
49
|
-
```css
|
|
50
|
-
@import "pixelplay/styles";
|
|
51
|
-
|
|
52
|
-
:root {
|
|
53
|
-
/* Override theme tokens as needed */
|
|
54
|
-
--primary: oklch(55% 0.22 264);
|
|
55
|
-
}
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
## Components
|
|
59
|
-
|
|
60
|
-
| Component | Description |
|
|
61
|
-
|-----------|-------------|
|
|
62
|
-
| `Button` | Versatile button with variants, sizes, and states |
|
|
63
|
-
| `Input` | Text input with labels, validation, and add-ons |
|
|
64
|
-
| `Badge` | Status and label badges with colors |
|
|
65
|
-
| `Avatar` | User avatars with initials, images, and status |
|
|
66
|
-
| `Card` | Content container with header, body, and footer |
|
|
67
|
-
| `Toggle` | Boolean toggle switch |
|
|
68
|
-
| `Checkbox` | Checkbox with variants and groups |
|
|
69
|
-
| `Select` | Dropdown select with search |
|
|
70
|
-
| `Slider` | Range slider with dual handles |
|
|
71
|
-
| `Tooltip` | Contextual tooltips |
|
|
72
|
-
| `Modal` | Dialog modals |
|
|
73
|
-
| `Spinner` | Loading indicators |
|
|
74
|
-
| `Tag` | Dismissable tags |
|
|
75
|
-
| `Progress` | Progress bars and circular indicators |
|
|
76
|
-
|
|
77
|
-
[View all components →](https://dennisisaac.com/ui-kit)
|
|
78
|
-
|
|
79
|
-
## Versioning
|
|
80
|
-
|
|
81
|
-
PixelPlay UI follows [Semantic Versioning](https://semver.org/):
|
|
82
|
-
|
|
83
|
-
- **Patch** (`x.x.1`) — bug fixes and minor adjustments
|
|
84
|
-
- **Minor** (`x.1.0`) — new components, non-breaking additions
|
|
85
|
-
- **Major** (`1.0.0`) — breaking API changes
|
|
86
|
-
|
|
87
|
-
See [CHANGELOG.md](./CHANGELOG.md) for the full release history.
|
|
88
|
-
|
|
89
|
-
## License
|
|
90
|
-
|
|
91
|
-
MIT © [Dennis Isaac](https://dennisisaac.com)
|
|
1
|
+
# PixelPlay UI
|
|
2
|
+
|
|
3
|
+
> A scalable React component library with production-ready components, layouts, and themes for SaaS products.
|
|
4
|
+
|
|
5
|
+
Built by [Dennis Isaac](https://dennisisaac.com) · [Live Docs](https://dennisisaac.com/ui-kit)
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install pixelplay
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
yarn add pixelplay
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pnpm add pixelplay
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Requirements
|
|
24
|
+
|
|
25
|
+
- React 18+
|
|
26
|
+
- Tailwind CSS 4+
|
|
27
|
+
- TypeScript 5+ (recommended)
|
|
28
|
+
|
|
29
|
+
## Quick Start
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
import { Button, Badge, Avatar, Input } from "pixelplay";
|
|
33
|
+
|
|
34
|
+
export function MyComponent() {
|
|
35
|
+
return (
|
|
36
|
+
<div>
|
|
37
|
+
<Avatar name="Dennis Isaac" size="md" />
|
|
38
|
+
<Badge color="purple">New</Badge>
|
|
39
|
+
<Button color="primary" variant="solid">Get Started</Button>
|
|
40
|
+
</div>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Theme Setup
|
|
46
|
+
|
|
47
|
+
Add the PixelPlay theme tokens to your global CSS:
|
|
48
|
+
|
|
49
|
+
```css
|
|
50
|
+
@import "pixelplay/styles";
|
|
51
|
+
|
|
52
|
+
:root {
|
|
53
|
+
/* Override theme tokens as needed */
|
|
54
|
+
--primary: oklch(55% 0.22 264);
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Components
|
|
59
|
+
|
|
60
|
+
| Component | Description |
|
|
61
|
+
|-----------|-------------|
|
|
62
|
+
| `Button` | Versatile button with variants, sizes, and states |
|
|
63
|
+
| `Input` | Text input with labels, validation, and add-ons |
|
|
64
|
+
| `Badge` | Status and label badges with colors |
|
|
65
|
+
| `Avatar` | User avatars with initials, images, and status |
|
|
66
|
+
| `Card` | Content container with header, body, and footer |
|
|
67
|
+
| `Toggle` | Boolean toggle switch |
|
|
68
|
+
| `Checkbox` | Checkbox with variants and groups |
|
|
69
|
+
| `Select` | Dropdown select with search |
|
|
70
|
+
| `Slider` | Range slider with dual handles |
|
|
71
|
+
| `Tooltip` | Contextual tooltips |
|
|
72
|
+
| `Modal` | Dialog modals |
|
|
73
|
+
| `Spinner` | Loading indicators |
|
|
74
|
+
| `Tag` | Dismissable tags |
|
|
75
|
+
| `Progress` | Progress bars and circular indicators |
|
|
76
|
+
|
|
77
|
+
[View all components →](https://dennisisaac.com/ui-kit)
|
|
78
|
+
|
|
79
|
+
## Versioning
|
|
80
|
+
|
|
81
|
+
PixelPlay UI follows [Semantic Versioning](https://semver.org/):
|
|
82
|
+
|
|
83
|
+
- **Patch** (`x.x.1`) — bug fixes and minor adjustments
|
|
84
|
+
- **Minor** (`x.1.0`) — new components, non-breaking additions
|
|
85
|
+
- **Major** (`1.0.0`) — breaking API changes
|
|
86
|
+
|
|
87
|
+
See [CHANGELOG.md](./CHANGELOG.md) for the full release history.
|
|
88
|
+
|
|
89
|
+
## License
|
|
90
|
+
|
|
91
|
+
MIT © [Dennis Isaac](https://dennisisaac.com)
|
package/dist/index.js
CHANGED
|
@@ -1989,6 +1989,7 @@ function Select({
|
|
|
1989
1989
|
}) {
|
|
1990
1990
|
const [open, setOpen] = (0, import_react12.useState)(false);
|
|
1991
1991
|
const [search, setSearch] = (0, import_react12.useState)("");
|
|
1992
|
+
const [openAbove, setOpenAbove] = (0, import_react12.useState)(false);
|
|
1992
1993
|
const containerRef = (0, import_react12.useRef)(null);
|
|
1993
1994
|
(0, import_react12.useEffect)(() => {
|
|
1994
1995
|
function onOutsideClick(e) {
|
|
@@ -2000,6 +2001,21 @@ function Select({
|
|
|
2000
2001
|
document.addEventListener("mousedown", onOutsideClick);
|
|
2001
2002
|
return () => document.removeEventListener("mousedown", onOutsideClick);
|
|
2002
2003
|
}, []);
|
|
2004
|
+
const computeOpenAbove = (0, import_react12.useCallback)(() => {
|
|
2005
|
+
if (!containerRef.current) return false;
|
|
2006
|
+
const rect = containerRef.current.getBoundingClientRect();
|
|
2007
|
+
const spaceBelow = window.innerHeight - rect.bottom;
|
|
2008
|
+
const panelHeight = 280;
|
|
2009
|
+
return spaceBelow < panelHeight && rect.top > spaceBelow;
|
|
2010
|
+
}, []);
|
|
2011
|
+
const toggleOpen = (0, import_react12.useCallback)(() => {
|
|
2012
|
+
setOpen((prev) => {
|
|
2013
|
+
if (!prev) {
|
|
2014
|
+
setOpenAbove(computeOpenAbove());
|
|
2015
|
+
}
|
|
2016
|
+
return !prev;
|
|
2017
|
+
});
|
|
2018
|
+
}, [computeOpenAbove]);
|
|
2003
2019
|
const selectedOption = options.find((o) => o.value === value);
|
|
2004
2020
|
const filtered = isSearchable ? options.filter(
|
|
2005
2021
|
(o) => o.label.toLowerCase().includes(search.toLowerCase())
|
|
@@ -2019,7 +2035,7 @@ function Select({
|
|
|
2019
2035
|
{
|
|
2020
2036
|
type: "button",
|
|
2021
2037
|
disabled: isDisabled,
|
|
2022
|
-
onClick: () => !isDisabled &&
|
|
2038
|
+
onClick: () => !isDisabled && toggleOpen(),
|
|
2023
2039
|
className: cn(
|
|
2024
2040
|
"flex w-full items-center rounded-lg border transition-all",
|
|
2025
2041
|
"bg-[var(--surface-container-lowest)] border-[var(--outline)]",
|
|
@@ -2055,7 +2071,8 @@ function Select({
|
|
|
2055
2071
|
"div",
|
|
2056
2072
|
{
|
|
2057
2073
|
className: cn(
|
|
2058
|
-
"absolute left-0
|
|
2074
|
+
"absolute left-0 z-50 w-full overflow-hidden rounded-lg",
|
|
2075
|
+
openAbove ? "bottom-full mb-1" : "top-full mt-1",
|
|
2059
2076
|
"bg-[var(--surface-container-lowest)]",
|
|
2060
2077
|
"shadow-[0px_4px_6px_-2px_rgba(10,13,18,0.05),0px_12px_16px_-4px_rgba(10,13,18,0.10)]",
|
|
2061
2078
|
"outline outline-1 outline-offset-[-1px] outline-[var(--outline)]"
|