@placeholderco/placeholder-ui 1.0.3 → 1.0.6
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/LICENSE +26 -26
- package/README.md +179 -179
- package/dist/display/Alert.svelte +179 -179
- package/dist/display/Avatar.svelte +166 -166
- package/dist/display/LinkCollection.svelte +161 -161
- package/dist/display/Paper.svelte +118 -118
- package/dist/form/Autocomplete.svelte +223 -191
- package/dist/form/Autocomplete.svelte.d.ts +3 -1
- package/dist/form/AutocompleteMulti.svelte +356 -0
- package/dist/form/AutocompleteMulti.svelte.d.ts +28 -0
- package/dist/form/Checkbox.svelte +201 -201
- package/dist/form/Chips.svelte +128 -128
- package/dist/form/ComboBox.svelte +158 -158
- package/dist/form/ComboBox.svelte.d.ts +1 -1
- package/dist/form/ComboBoxItemBuilder.svelte +460 -460
- package/dist/form/ComboBoxMulti.svelte +197 -197
- package/dist/form/ComboBoxMulti.svelte.d.ts +1 -1
- package/dist/form/CronBuilder.svelte +693 -693
- package/dist/form/DatePicker.svelte +672 -672
- package/dist/form/DateTimePicker.svelte +712 -712
- package/dist/form/FileInput.svelte +235 -235
- package/dist/form/FormGroup.svelte +68 -68
- package/dist/form/Number.svelte +238 -238
- package/dist/form/PasswordInput.svelte +252 -252
- package/dist/form/RadioGroup.svelte +210 -210
- package/dist/form/Rating.svelte +235 -235
- package/dist/form/SegmentedControl.svelte +149 -149
- package/dist/form/Select.svelte +590 -590
- package/dist/form/Select.svelte.d.ts +1 -1
- package/dist/form/SelectMulti.svelte +613 -613
- package/dist/form/SelectMulti.svelte.d.ts +1 -1
- package/dist/form/Slider.svelte +358 -358
- package/dist/form/Switch.svelte +147 -147
- package/dist/form/TextArea.svelte +148 -148
- package/dist/form/Textbox.svelte +228 -228
- package/dist/form/TimePicker.svelte +267 -267
- package/dist/icon/Icon.svelte +52 -52
- package/dist/icon/alert-octagon.svg +5 -5
- package/dist/icon/alert-triangle.svg +5 -5
- package/dist/icon/archive.svg +1 -1
- package/dist/icon/arrow-down.svg +1 -1
- package/dist/icon/arrow-left.svg +1 -1
- package/dist/icon/arrow-right.svg +1 -1
- package/dist/icon/arrow-up.svg +1 -1
- package/dist/icon/at.svg +1 -1
- package/dist/icon/bell.svg +1 -1
- package/dist/icon/bookmark.svg +1 -1
- package/dist/icon/calendar.svg +1 -1
- package/dist/icon/camera.svg +1 -1
- package/dist/icon/chart-bar.svg +1 -1
- package/dist/icon/chart-line.svg +1 -1
- package/dist/icon/chart-pie.svg +1 -1
- package/dist/icon/checkbox.svg +1 -1
- package/dist/icon/checklist.svg +1 -1
- package/dist/icon/circle-check.svg +1 -1
- package/dist/icon/circle-x.svg +1 -1
- package/dist/icon/clock.svg +1 -1
- package/dist/icon/credit-card.svg +1 -1
- package/dist/icon/dots-vertical.svg +1 -1
- package/dist/icon/dots.svg +1 -1
- package/dist/icon/external-link.svg +1 -1
- package/dist/icon/eye-off.svg +1 -1
- package/dist/icon/eye.svg +1 -1
- package/dist/icon/filter.svg +1 -1
- package/dist/icon/fingerprint.svg +1 -1
- package/dist/icon/flag.svg +1 -1
- package/dist/icon/heart.svg +1 -1
- package/dist/icon/home.svg +1 -1
- package/dist/icon/key.svg +1 -1
- package/dist/icon/list-check.svg +1 -1
- package/dist/icon/login.svg +1 -1
- package/dist/icon/logout.svg +1 -1
- package/dist/icon/map-pin.svg +1 -1
- package/dist/icon/maximize.svg +1 -1
- package/dist/icon/microphone.svg +1 -1
- package/dist/icon/minimize.svg +1 -1
- package/dist/icon/note.svg +1 -1
- package/dist/icon/player-pause.svg +1 -1
- package/dist/icon/printer.svg +1 -1
- package/dist/icon/qrcode.svg +1 -1
- package/dist/icon/send.svg +1 -1
- package/dist/icon/settings.svg +1 -1
- package/dist/icon/share.svg +1 -1
- package/dist/icon/shopping-cart.svg +1 -1
- package/dist/icon/sort-ascending.svg +1 -1
- package/dist/icon/sort-descending.svg +1 -1
- package/dist/icon/star.svg +1 -1
- package/dist/icon/tag.svg +1 -1
- package/dist/icon/trending-down.svg +1 -1
- package/dist/icon/trending-up.svg +1 -1
- package/dist/icon/upload.svg +1 -1
- package/dist/icon/volume-off.svg +1 -1
- package/dist/icon/volume.svg +1 -1
- package/dist/icon/world.svg +1 -1
- package/dist/icon/zoom-in.svg +1 -1
- package/dist/icon/zoom-out.svg +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/layout/AppShell.svelte +169 -169
- package/dist/layout/CustomNavbar.svelte +61 -61
- package/dist/layout/Navbar.svelte +206 -206
- package/dist/layout/NavbarItemDisplay.svelte +29 -29
- package/dist/layout/Sidenav.svelte +712 -712
- package/dist/styles/components.css +199 -199
- package/dist/styles/dark.css +146 -146
- package/dist/styles/index.css +116 -116
- package/dist/styles/reset.css +110 -110
- package/dist/styles/semantic.css +86 -86
- package/dist/styles/tokens.css +203 -197
- package/dist/styles/utilities.css +523 -523
- package/dist/ui/Accordion.svelte +289 -289
- package/dist/ui/ActionIcon.svelte +76 -76
- package/dist/ui/Badge.svelte +329 -279
- package/dist/ui/Breadcrumbs.svelte +131 -131
- package/dist/ui/Button.svelte +432 -370
- package/dist/ui/ButtonVariant.d.ts +1 -1
- package/dist/ui/Dialog.svelte +307 -307
- package/dist/ui/Drawer.svelte +524 -524
- package/dist/ui/Dropdown.svelte +97 -97
- package/dist/ui/Dropzone.svelte +122 -122
- package/dist/ui/Link.svelte +32 -32
- package/dist/ui/Loader.svelte +70 -70
- package/dist/ui/LoadingOverlay.svelte +53 -53
- package/dist/ui/Pagination.svelte +135 -135
- package/dist/ui/Popover.svelte +225 -225
- package/dist/ui/Progress.svelte +191 -191
- package/dist/ui/RingProgress.svelte +141 -141
- package/dist/ui/Skeleton.svelte +85 -85
- package/dist/ui/Stepper.svelte +355 -355
- package/dist/ui/Table.svelte +345 -345
- package/dist/ui/Tabs.svelte +146 -146
- package/dist/ui/ThemeSwitcher.svelte +39 -39
- package/dist/ui/Timeline.svelte +225 -225
- package/dist/ui/Toaster.svelte +6 -6
- package/dist/ui/Tooltip.svelte +434 -434
- package/package.json +14 -14
package/LICENSE
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2024
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
This library includes icons derived from Tabler Icons (https://tabler-icons.io/)
|
|
26
|
-
which are also licensed under the MIT License.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
This library includes icons derived from Tabler Icons (https://tabler-icons.io/)
|
|
26
|
+
which are also licensed under the MIT License.
|
package/README.md
CHANGED
|
@@ -1,179 +1,179 @@
|
|
|
1
|
-
# Placeholder UI
|
|
2
|
-
|
|
3
|
-
A modern, customizable Svelte 5 UI component library with comprehensive theming support via CSS variables.
|
|
4
|
-
|
|
5
|
-
## Features
|
|
6
|
-
|
|
7
|
-
- **70+ Components** - Buttons, forms, dialogs, tables, and more
|
|
8
|
-
- **CSS Variable Theming** - Fully customizable via CSS custom properties
|
|
9
|
-
- **Dark Mode** - Built-in light/dark theme support
|
|
10
|
-
- **Svelte 5** - Built with modern Svelte 5 runes
|
|
11
|
-
- **TypeScript** - Full TypeScript support
|
|
12
|
-
- **Accessible** - Built with accessibility in mind
|
|
13
|
-
- **Lightweight** - Built for simple DX with just enough flexibility
|
|
14
|
-
|
|
15
|
-
## Installation
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
npm install @placeholderco/placeholder-ui
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Quick Start
|
|
22
|
-
|
|
23
|
-
```svelte
|
|
24
|
-
<script>
|
|
25
|
-
import { Button, Paper } from '@placeholderco/placeholder-ui';
|
|
26
|
-
</script>
|
|
27
|
-
|
|
28
|
-
<Paper>
|
|
29
|
-
<h1>Hello World</h1>
|
|
30
|
-
<Button variant="primary">Click Me</Button>
|
|
31
|
-
</Paper>
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## Components
|
|
35
|
-
|
|
36
|
-
### UI Components
|
|
37
|
-
- `Button` - Buttons with multiple variants and sizes
|
|
38
|
-
- `ActionIcon` - Icon buttons
|
|
39
|
-
- `Badge` - Status badges
|
|
40
|
-
- `Dialog` - Modal dialogs
|
|
41
|
-
- `Drawer` - Slide-out panels
|
|
42
|
-
- `Dropdown` - Dropdown menus
|
|
43
|
-
- `Loader` - Loading spinners
|
|
44
|
-
- `Pagination` - Page navigation
|
|
45
|
-
- `Popover` - Floating content
|
|
46
|
-
- `Table` - Data tables
|
|
47
|
-
- `Tabs` - Tab navigation
|
|
48
|
-
- `Tooltip` - Hover tooltips
|
|
49
|
-
- `Toaster` - Toast notifications
|
|
50
|
-
|
|
51
|
-
### Form Components
|
|
52
|
-
- `Textbox` - Text input
|
|
53
|
-
- `TextArea` - Multi-line text input
|
|
54
|
-
- `Number` - Numeric input
|
|
55
|
-
- `Select` / `SelectMulti` - Dropdowns
|
|
56
|
-
- `Checkbox` - Checkboxes
|
|
57
|
-
- `RadioGroup` - Radio buttons
|
|
58
|
-
- `Switch` - Toggle switches
|
|
59
|
-
- `DatePicker` / `TimePicker` / `DateTimePicker` - Date/time selection
|
|
60
|
-
- `Autocomplete` - Autocomplete input
|
|
61
|
-
- `Chips` - Tag input
|
|
62
|
-
|
|
63
|
-
### Display Components
|
|
64
|
-
- `Paper` - Card/panel container
|
|
65
|
-
- `Alert` - Alert messages
|
|
66
|
-
- `Avatar` - User avatars
|
|
67
|
-
- `LinkCollection` - Link lists
|
|
68
|
-
|
|
69
|
-
### Layout Components
|
|
70
|
-
- `Navbar` - Navigation bar
|
|
71
|
-
- `Sidenav` - Side navigation
|
|
72
|
-
|
|
73
|
-
### Editors (separate package)
|
|
74
|
-
|
|
75
|
-
For code and rich text editors, install the editors package:
|
|
76
|
-
|
|
77
|
-
```bash
|
|
78
|
-
npm install @placeholderco/placeholder-ui-editors
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
```svelte
|
|
82
|
-
<script>
|
|
83
|
-
import { CodeMirror } from '@placeholderco/placeholder-ui-editors';
|
|
84
|
-
</script>
|
|
85
|
-
|
|
86
|
-
<CodeMirror bind:value={code} language="javascript" />
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
## Theming
|
|
90
|
-
|
|
91
|
-
The library uses CSS variables for theming. Override variables after importing styles:
|
|
92
|
-
|
|
93
|
-
```css
|
|
94
|
-
:root {
|
|
95
|
-
/* Brand colors */
|
|
96
|
-
--pui-color-primary: #1a365d;
|
|
97
|
-
--pui-color-secondary: #48bb78;
|
|
98
|
-
--pui-color-accent: #4fd1c5;
|
|
99
|
-
|
|
100
|
-
/* Typography */
|
|
101
|
-
--pui-font-family-sans: 'Inter', sans-serif;
|
|
102
|
-
|
|
103
|
-
/* Spacing, radius, shadows, etc. */
|
|
104
|
-
--pui-radius-md: 8px;
|
|
105
|
-
}
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
### Dark Mode
|
|
109
|
-
|
|
110
|
-
Dark mode is activated by adding the `.dark` class to the document:
|
|
111
|
-
|
|
112
|
-
```javascript
|
|
113
|
-
document.documentElement.classList.add('dark');
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
Or use the built-in theme utilities:
|
|
117
|
-
|
|
118
|
-
```javascript
|
|
119
|
-
import { setTheme } from '@placeholderco/placeholder-ui';
|
|
120
|
-
|
|
121
|
-
setTheme('dark'); // 'light', 'dark', or 'system'
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
## CSS Variable Reference
|
|
125
|
-
|
|
126
|
-
### Primitives (tokens.css)
|
|
127
|
-
- `--pui-color-*` - Color palette
|
|
128
|
-
- `--pui-font-size-*` - Typography sizes
|
|
129
|
-
- `--pui-spacing-*` - Spacing scale
|
|
130
|
-
- `--pui-radius-*` - Border radius
|
|
131
|
-
- `--pui-shadow-*` - Box shadows
|
|
132
|
-
|
|
133
|
-
### Semantic (semantic.css)
|
|
134
|
-
- `--pui-bg-*` - Background colors
|
|
135
|
-
- `--pui-text-*` - Text colors
|
|
136
|
-
- `--pui-border-*` - Border colors
|
|
137
|
-
|
|
138
|
-
### Components (components.css)
|
|
139
|
-
- `--pui-btn-*` - Button styles
|
|
140
|
-
- `--pui-input-*` - Input styles
|
|
141
|
-
- `--pui-paper-*` - Paper styles
|
|
142
|
-
- And more per component...
|
|
143
|
-
|
|
144
|
-
## Icons
|
|
145
|
-
|
|
146
|
-
The library includes 145 SVG icons based on Tabler Icons:
|
|
147
|
-
|
|
148
|
-
```svelte
|
|
149
|
-
<script>
|
|
150
|
-
import { Icon, iconCheck, iconX } from '@placeholderco/placeholder-ui';
|
|
151
|
-
</script>
|
|
152
|
-
|
|
153
|
-
<Icon svg={iconCheck} size="24px" />
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
## Development
|
|
157
|
-
|
|
158
|
-
```bash
|
|
159
|
-
# Install dependencies
|
|
160
|
-
npm install
|
|
161
|
-
|
|
162
|
-
# Start dev server
|
|
163
|
-
npm run dev
|
|
164
|
-
|
|
165
|
-
# Type check
|
|
166
|
-
npm run check
|
|
167
|
-
|
|
168
|
-
# Build
|
|
169
|
-
npm run build
|
|
170
|
-
|
|
171
|
-
# Run tests
|
|
172
|
-
npm run test
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
## License
|
|
176
|
-
|
|
177
|
-
MIT License - see [LICENSE](LICENSE) for details.
|
|
178
|
-
|
|
179
|
-
Icons derived from [Tabler Icons](https://tabler-icons.io/) (MIT License).
|
|
1
|
+
# Placeholder UI
|
|
2
|
+
|
|
3
|
+
A modern, customizable Svelte 5 UI component library with comprehensive theming support via CSS variables.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **70+ Components** - Buttons, forms, dialogs, tables, and more
|
|
8
|
+
- **CSS Variable Theming** - Fully customizable via CSS custom properties
|
|
9
|
+
- **Dark Mode** - Built-in light/dark theme support
|
|
10
|
+
- **Svelte 5** - Built with modern Svelte 5 runes
|
|
11
|
+
- **TypeScript** - Full TypeScript support
|
|
12
|
+
- **Accessible** - Built with accessibility in mind
|
|
13
|
+
- **Lightweight** - Built for simple DX with just enough flexibility
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @placeholderco/placeholder-ui
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Quick Start
|
|
22
|
+
|
|
23
|
+
```svelte
|
|
24
|
+
<script>
|
|
25
|
+
import { Button, Paper } from '@placeholderco/placeholder-ui';
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<Paper>
|
|
29
|
+
<h1>Hello World</h1>
|
|
30
|
+
<Button variant="primary">Click Me</Button>
|
|
31
|
+
</Paper>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Components
|
|
35
|
+
|
|
36
|
+
### UI Components
|
|
37
|
+
- `Button` - Buttons with multiple variants and sizes
|
|
38
|
+
- `ActionIcon` - Icon buttons
|
|
39
|
+
- `Badge` - Status badges
|
|
40
|
+
- `Dialog` - Modal dialogs
|
|
41
|
+
- `Drawer` - Slide-out panels
|
|
42
|
+
- `Dropdown` - Dropdown menus
|
|
43
|
+
- `Loader` - Loading spinners
|
|
44
|
+
- `Pagination` - Page navigation
|
|
45
|
+
- `Popover` - Floating content
|
|
46
|
+
- `Table` - Data tables
|
|
47
|
+
- `Tabs` - Tab navigation
|
|
48
|
+
- `Tooltip` - Hover tooltips
|
|
49
|
+
- `Toaster` - Toast notifications
|
|
50
|
+
|
|
51
|
+
### Form Components
|
|
52
|
+
- `Textbox` - Text input
|
|
53
|
+
- `TextArea` - Multi-line text input
|
|
54
|
+
- `Number` - Numeric input
|
|
55
|
+
- `Select` / `SelectMulti` - Dropdowns
|
|
56
|
+
- `Checkbox` - Checkboxes
|
|
57
|
+
- `RadioGroup` - Radio buttons
|
|
58
|
+
- `Switch` - Toggle switches
|
|
59
|
+
- `DatePicker` / `TimePicker` / `DateTimePicker` - Date/time selection
|
|
60
|
+
- `Autocomplete` - Autocomplete input
|
|
61
|
+
- `Chips` - Tag input
|
|
62
|
+
|
|
63
|
+
### Display Components
|
|
64
|
+
- `Paper` - Card/panel container
|
|
65
|
+
- `Alert` - Alert messages
|
|
66
|
+
- `Avatar` - User avatars
|
|
67
|
+
- `LinkCollection` - Link lists
|
|
68
|
+
|
|
69
|
+
### Layout Components
|
|
70
|
+
- `Navbar` - Navigation bar
|
|
71
|
+
- `Sidenav` - Side navigation
|
|
72
|
+
|
|
73
|
+
### Editors (separate package)
|
|
74
|
+
|
|
75
|
+
For code and rich text editors, install the editors package:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
npm install @placeholderco/placeholder-ui-editors
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
```svelte
|
|
82
|
+
<script>
|
|
83
|
+
import { CodeMirror } from '@placeholderco/placeholder-ui-editors';
|
|
84
|
+
</script>
|
|
85
|
+
|
|
86
|
+
<CodeMirror bind:value={code} language="javascript" />
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Theming
|
|
90
|
+
|
|
91
|
+
The library uses CSS variables for theming. Override variables after importing styles:
|
|
92
|
+
|
|
93
|
+
```css
|
|
94
|
+
:root {
|
|
95
|
+
/* Brand colors */
|
|
96
|
+
--pui-color-primary: #1a365d;
|
|
97
|
+
--pui-color-secondary: #48bb78;
|
|
98
|
+
--pui-color-accent: #4fd1c5;
|
|
99
|
+
|
|
100
|
+
/* Typography */
|
|
101
|
+
--pui-font-family-sans: 'Inter', sans-serif;
|
|
102
|
+
|
|
103
|
+
/* Spacing, radius, shadows, etc. */
|
|
104
|
+
--pui-radius-md: 8px;
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Dark Mode
|
|
109
|
+
|
|
110
|
+
Dark mode is activated by adding the `.dark` class to the document:
|
|
111
|
+
|
|
112
|
+
```javascript
|
|
113
|
+
document.documentElement.classList.add('dark');
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Or use the built-in theme utilities:
|
|
117
|
+
|
|
118
|
+
```javascript
|
|
119
|
+
import { setTheme } from '@placeholderco/placeholder-ui';
|
|
120
|
+
|
|
121
|
+
setTheme('dark'); // 'light', 'dark', or 'system'
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## CSS Variable Reference
|
|
125
|
+
|
|
126
|
+
### Primitives (tokens.css)
|
|
127
|
+
- `--pui-color-*` - Color palette
|
|
128
|
+
- `--pui-font-size-*` - Typography sizes
|
|
129
|
+
- `--pui-spacing-*` - Spacing scale
|
|
130
|
+
- `--pui-radius-*` - Border radius
|
|
131
|
+
- `--pui-shadow-*` - Box shadows
|
|
132
|
+
|
|
133
|
+
### Semantic (semantic.css)
|
|
134
|
+
- `--pui-bg-*` - Background colors
|
|
135
|
+
- `--pui-text-*` - Text colors
|
|
136
|
+
- `--pui-border-*` - Border colors
|
|
137
|
+
|
|
138
|
+
### Components (components.css)
|
|
139
|
+
- `--pui-btn-*` - Button styles
|
|
140
|
+
- `--pui-input-*` - Input styles
|
|
141
|
+
- `--pui-paper-*` - Paper styles
|
|
142
|
+
- And more per component...
|
|
143
|
+
|
|
144
|
+
## Icons
|
|
145
|
+
|
|
146
|
+
The library includes 145 SVG icons based on Tabler Icons:
|
|
147
|
+
|
|
148
|
+
```svelte
|
|
149
|
+
<script>
|
|
150
|
+
import { Icon, iconCheck, iconX } from '@placeholderco/placeholder-ui';
|
|
151
|
+
</script>
|
|
152
|
+
|
|
153
|
+
<Icon svg={iconCheck} size="24px" />
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## Development
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
# Install dependencies
|
|
160
|
+
npm install
|
|
161
|
+
|
|
162
|
+
# Start dev server
|
|
163
|
+
npm run dev
|
|
164
|
+
|
|
165
|
+
# Type check
|
|
166
|
+
npm run check
|
|
167
|
+
|
|
168
|
+
# Build
|
|
169
|
+
npm run build
|
|
170
|
+
|
|
171
|
+
# Run tests
|
|
172
|
+
npm run test
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## License
|
|
176
|
+
|
|
177
|
+
MIT License - see [LICENSE](LICENSE) for details.
|
|
178
|
+
|
|
179
|
+
Icons derived from [Tabler Icons](https://tabler-icons.io/) (MIT License).
|