@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.
Files changed (136) hide show
  1. package/LICENSE +26 -26
  2. package/README.md +179 -179
  3. package/dist/display/Alert.svelte +179 -179
  4. package/dist/display/Avatar.svelte +166 -166
  5. package/dist/display/LinkCollection.svelte +161 -161
  6. package/dist/display/Paper.svelte +118 -118
  7. package/dist/form/Autocomplete.svelte +223 -191
  8. package/dist/form/Autocomplete.svelte.d.ts +3 -1
  9. package/dist/form/AutocompleteMulti.svelte +356 -0
  10. package/dist/form/AutocompleteMulti.svelte.d.ts +28 -0
  11. package/dist/form/Checkbox.svelte +201 -201
  12. package/dist/form/Chips.svelte +128 -128
  13. package/dist/form/ComboBox.svelte +158 -158
  14. package/dist/form/ComboBox.svelte.d.ts +1 -1
  15. package/dist/form/ComboBoxItemBuilder.svelte +460 -460
  16. package/dist/form/ComboBoxMulti.svelte +197 -197
  17. package/dist/form/ComboBoxMulti.svelte.d.ts +1 -1
  18. package/dist/form/CronBuilder.svelte +693 -693
  19. package/dist/form/DatePicker.svelte +672 -672
  20. package/dist/form/DateTimePicker.svelte +712 -712
  21. package/dist/form/FileInput.svelte +235 -235
  22. package/dist/form/FormGroup.svelte +68 -68
  23. package/dist/form/Number.svelte +238 -238
  24. package/dist/form/PasswordInput.svelte +252 -252
  25. package/dist/form/RadioGroup.svelte +210 -210
  26. package/dist/form/Rating.svelte +235 -235
  27. package/dist/form/SegmentedControl.svelte +149 -149
  28. package/dist/form/Select.svelte +590 -590
  29. package/dist/form/Select.svelte.d.ts +1 -1
  30. package/dist/form/SelectMulti.svelte +613 -613
  31. package/dist/form/SelectMulti.svelte.d.ts +1 -1
  32. package/dist/form/Slider.svelte +358 -358
  33. package/dist/form/Switch.svelte +147 -147
  34. package/dist/form/TextArea.svelte +148 -148
  35. package/dist/form/Textbox.svelte +228 -228
  36. package/dist/form/TimePicker.svelte +267 -267
  37. package/dist/icon/Icon.svelte +52 -52
  38. package/dist/icon/alert-octagon.svg +5 -5
  39. package/dist/icon/alert-triangle.svg +5 -5
  40. package/dist/icon/archive.svg +1 -1
  41. package/dist/icon/arrow-down.svg +1 -1
  42. package/dist/icon/arrow-left.svg +1 -1
  43. package/dist/icon/arrow-right.svg +1 -1
  44. package/dist/icon/arrow-up.svg +1 -1
  45. package/dist/icon/at.svg +1 -1
  46. package/dist/icon/bell.svg +1 -1
  47. package/dist/icon/bookmark.svg +1 -1
  48. package/dist/icon/calendar.svg +1 -1
  49. package/dist/icon/camera.svg +1 -1
  50. package/dist/icon/chart-bar.svg +1 -1
  51. package/dist/icon/chart-line.svg +1 -1
  52. package/dist/icon/chart-pie.svg +1 -1
  53. package/dist/icon/checkbox.svg +1 -1
  54. package/dist/icon/checklist.svg +1 -1
  55. package/dist/icon/circle-check.svg +1 -1
  56. package/dist/icon/circle-x.svg +1 -1
  57. package/dist/icon/clock.svg +1 -1
  58. package/dist/icon/credit-card.svg +1 -1
  59. package/dist/icon/dots-vertical.svg +1 -1
  60. package/dist/icon/dots.svg +1 -1
  61. package/dist/icon/external-link.svg +1 -1
  62. package/dist/icon/eye-off.svg +1 -1
  63. package/dist/icon/eye.svg +1 -1
  64. package/dist/icon/filter.svg +1 -1
  65. package/dist/icon/fingerprint.svg +1 -1
  66. package/dist/icon/flag.svg +1 -1
  67. package/dist/icon/heart.svg +1 -1
  68. package/dist/icon/home.svg +1 -1
  69. package/dist/icon/key.svg +1 -1
  70. package/dist/icon/list-check.svg +1 -1
  71. package/dist/icon/login.svg +1 -1
  72. package/dist/icon/logout.svg +1 -1
  73. package/dist/icon/map-pin.svg +1 -1
  74. package/dist/icon/maximize.svg +1 -1
  75. package/dist/icon/microphone.svg +1 -1
  76. package/dist/icon/minimize.svg +1 -1
  77. package/dist/icon/note.svg +1 -1
  78. package/dist/icon/player-pause.svg +1 -1
  79. package/dist/icon/printer.svg +1 -1
  80. package/dist/icon/qrcode.svg +1 -1
  81. package/dist/icon/send.svg +1 -1
  82. package/dist/icon/settings.svg +1 -1
  83. package/dist/icon/share.svg +1 -1
  84. package/dist/icon/shopping-cart.svg +1 -1
  85. package/dist/icon/sort-ascending.svg +1 -1
  86. package/dist/icon/sort-descending.svg +1 -1
  87. package/dist/icon/star.svg +1 -1
  88. package/dist/icon/tag.svg +1 -1
  89. package/dist/icon/trending-down.svg +1 -1
  90. package/dist/icon/trending-up.svg +1 -1
  91. package/dist/icon/upload.svg +1 -1
  92. package/dist/icon/volume-off.svg +1 -1
  93. package/dist/icon/volume.svg +1 -1
  94. package/dist/icon/world.svg +1 -1
  95. package/dist/icon/zoom-in.svg +1 -1
  96. package/dist/icon/zoom-out.svg +1 -1
  97. package/dist/index.d.ts +1 -0
  98. package/dist/index.js +1 -0
  99. package/dist/layout/AppShell.svelte +169 -169
  100. package/dist/layout/CustomNavbar.svelte +61 -61
  101. package/dist/layout/Navbar.svelte +206 -206
  102. package/dist/layout/NavbarItemDisplay.svelte +29 -29
  103. package/dist/layout/Sidenav.svelte +712 -712
  104. package/dist/styles/components.css +199 -199
  105. package/dist/styles/dark.css +146 -146
  106. package/dist/styles/index.css +116 -116
  107. package/dist/styles/reset.css +110 -110
  108. package/dist/styles/semantic.css +86 -86
  109. package/dist/styles/tokens.css +203 -197
  110. package/dist/styles/utilities.css +523 -523
  111. package/dist/ui/Accordion.svelte +289 -289
  112. package/dist/ui/ActionIcon.svelte +76 -76
  113. package/dist/ui/Badge.svelte +329 -279
  114. package/dist/ui/Breadcrumbs.svelte +131 -131
  115. package/dist/ui/Button.svelte +432 -370
  116. package/dist/ui/ButtonVariant.d.ts +1 -1
  117. package/dist/ui/Dialog.svelte +307 -307
  118. package/dist/ui/Drawer.svelte +524 -524
  119. package/dist/ui/Dropdown.svelte +97 -97
  120. package/dist/ui/Dropzone.svelte +122 -122
  121. package/dist/ui/Link.svelte +32 -32
  122. package/dist/ui/Loader.svelte +70 -70
  123. package/dist/ui/LoadingOverlay.svelte +53 -53
  124. package/dist/ui/Pagination.svelte +135 -135
  125. package/dist/ui/Popover.svelte +225 -225
  126. package/dist/ui/Progress.svelte +191 -191
  127. package/dist/ui/RingProgress.svelte +141 -141
  128. package/dist/ui/Skeleton.svelte +85 -85
  129. package/dist/ui/Stepper.svelte +355 -355
  130. package/dist/ui/Table.svelte +345 -345
  131. package/dist/ui/Tabs.svelte +146 -146
  132. package/dist/ui/ThemeSwitcher.svelte +39 -39
  133. package/dist/ui/Timeline.svelte +225 -225
  134. package/dist/ui/Toaster.svelte +6 -6
  135. package/dist/ui/Tooltip.svelte +434 -434
  136. 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).