@sabrenski/spire-ui 0.0.1
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 +21 -0
- package/README.md +233 -0
- package/dist/index.d.ts +4981 -0
- package/dist/spire-ui.css +1 -0
- package/dist/spire-ui.es.js +18403 -0
- package/dist/spire-ui.umd.js +45 -0
- package/package.json +83 -0
- package/src/components/Accordion/Accordion.test.ts +218 -0
- package/src/components/Accordion/AccordionContent.vue +112 -0
- package/src/components/Accordion/AccordionItem.vue +87 -0
- package/src/components/Accordion/AccordionRoot.vue +111 -0
- package/src/components/Accordion/AccordionTrigger.vue +125 -0
- package/src/components/Accordion/index.ts +11 -0
- package/src/components/Accordion/keys.ts +23 -0
- package/src/components/Avatar/Avatar.test.ts +181 -0
- package/src/components/Avatar/Avatar.vue +150 -0
- package/src/components/Avatar/index.ts +2 -0
- package/src/components/Badge/Badge.test.ts +141 -0
- package/src/components/Badge/Badge.vue +133 -0
- package/src/components/Badge/index.ts +2 -0
- package/src/components/BadgeContainer/BadgeContainer.test.ts +150 -0
- package/src/components/BadgeContainer/BadgeContainer.vue +90 -0
- package/src/components/BadgeContainer/index.ts +2 -0
- package/src/components/Breadcrumb/Breadcrumb.test.ts +342 -0
- package/src/components/Breadcrumb/BreadcrumbEllipsis.vue +96 -0
- package/src/components/Breadcrumb/BreadcrumbItem.vue +16 -0
- package/src/components/Breadcrumb/BreadcrumbLink.vue +67 -0
- package/src/components/Breadcrumb/BreadcrumbList.vue +20 -0
- package/src/components/Breadcrumb/BreadcrumbPage.vue +25 -0
- package/src/components/Breadcrumb/BreadcrumbRoot.vue +41 -0
- package/src/components/Breadcrumb/BreadcrumbSeparator.vue +63 -0
- package/src/components/Breadcrumb/index.ts +13 -0
- package/src/components/Breadcrumb/keys.ts +7 -0
- package/src/components/Button/Button.test.ts +231 -0
- package/src/components/Button/Button.vue +349 -0
- package/src/components/Button/index.ts +2 -0
- package/src/components/Callout/Callout.test.ts +260 -0
- package/src/components/Callout/Callout.vue +341 -0
- package/src/components/Callout/index.ts +2 -0
- package/src/components/Card/Card.test.ts +565 -0
- package/src/components/Card/Card.vue +209 -0
- package/src/components/Card/CardContent.vue +57 -0
- package/src/components/Card/CardFooter.vue +72 -0
- package/src/components/Card/CardHeader.vue +111 -0
- package/src/components/Card/CardImage.vue +124 -0
- package/src/components/Card/index.ts +14 -0
- package/src/components/Chart/BarChart.vue +208 -0
- package/src/components/Chart/BaseChart.vue +444 -0
- package/src/components/Chart/Chart.test.ts +359 -0
- package/src/components/Chart/DonutChart.vue +283 -0
- package/src/components/Chart/LineChart.vue +211 -0
- package/src/components/Chart/index.ts +20 -0
- package/src/components/Chart/useChartTheme.ts +192 -0
- package/src/components/Checkbox/Checkbox.test.ts +209 -0
- package/src/components/Checkbox/Checkbox.vue +285 -0
- package/src/components/Checkbox/index.ts +2 -0
- package/src/components/ChoiceChip/ChoiceChip.test.ts +142 -0
- package/src/components/ChoiceChip/ChoiceChip.vue +218 -0
- package/src/components/ChoiceChip/index.ts +2 -0
- package/src/components/ChoiceChipGroup/ChoiceChipGroup.test.ts +151 -0
- package/src/components/ChoiceChipGroup/ChoiceChipGroup.vue +70 -0
- package/src/components/ChoiceChipGroup/index.ts +2 -0
- package/src/components/ColorPicker/ColorArea.vue +159 -0
- package/src/components/ColorPicker/ColorPicker.test.ts +250 -0
- package/src/components/ColorPicker/ColorPicker.vue +339 -0
- package/src/components/ColorPicker/ColorSlider.vue +191 -0
- package/src/components/ColorPicker/index.ts +7 -0
- package/src/components/Combobox/Combobox.test.ts +891 -0
- package/src/components/Combobox/Combobox.vue +934 -0
- package/src/components/Combobox/index.ts +2 -0
- package/src/components/DataTable/DataTable.test.ts +1221 -0
- package/src/components/DataTable/DataTable.vue +1415 -0
- package/src/components/DataTable/index.ts +10 -0
- package/src/components/DatePicker/DatePicker.test.ts +625 -0
- package/src/components/DatePicker/DatePicker.vue +1586 -0
- package/src/components/DatePicker/index.ts +2 -0
- package/src/components/Drawer/Drawer.test.ts +336 -0
- package/src/components/Drawer/Drawer.vue +466 -0
- package/src/components/Drawer/index.ts +2 -0
- package/src/components/Dropdown/Dropdown.test.ts +607 -0
- package/src/components/Dropdown/Dropdown.vue +807 -0
- package/src/components/Dropdown/DropdownItem.vue +227 -0
- package/src/components/Dropdown/DropdownSeparator.vue +14 -0
- package/src/components/Dropdown/DropdownSub.vue +104 -0
- package/src/components/Dropdown/DropdownSubContent.vue +187 -0
- package/src/components/Dropdown/DropdownSubTrigger.vue +151 -0
- package/src/components/Dropdown/index.ts +14 -0
- package/src/components/EmptyState/EmptyState.test.ts +180 -0
- package/src/components/EmptyState/EmptyState.vue +137 -0
- package/src/components/EmptyState/index.ts +2 -0
- package/src/components/FileUpload/FileUpload.test.ts +1151 -0
- package/src/components/FileUpload/FileUpload.vue +1042 -0
- package/src/components/FileUpload/index.ts +2 -0
- package/src/components/Heading/Heading.test.ts +107 -0
- package/src/components/Heading/Heading.vue +67 -0
- package/src/components/Heading/index.ts +2 -0
- package/src/components/Icon/Icon.test.ts +157 -0
- package/src/components/Icon/Icon.vue +86 -0
- package/src/components/Icon/index.ts +2 -0
- package/src/components/Input/Input.test.ts +273 -0
- package/src/components/Input/Input.vue +388 -0
- package/src/components/Input/index.ts +2 -0
- package/src/components/Layout/Container.vue +67 -0
- package/src/components/Layout/Grid.vue +159 -0
- package/src/components/Layout/GridItem.vue +154 -0
- package/src/components/Layout/Layout.test.ts +202 -0
- package/src/components/Layout/Stack.vue +128 -0
- package/src/components/Layout/index.ts +9 -0
- package/src/components/Layout/keys.ts +7 -0
- package/src/components/Modal/Modal.test.ts +311 -0
- package/src/components/Modal/Modal.vue +336 -0
- package/src/components/Modal/index.ts +2 -0
- package/src/components/Pagination/Pagination.test.ts +303 -0
- package/src/components/Pagination/Pagination.vue +212 -0
- package/src/components/Pagination/index.ts +3 -0
- package/src/components/Pagination/utils.ts +86 -0
- package/src/components/Popover/Popover.test.ts +285 -0
- package/src/components/Popover/Popover.vue +441 -0
- package/src/components/Popover/index.ts +2 -0
- package/src/components/Progress/Progress.test.ts +361 -0
- package/src/components/Progress/Progress.vue +363 -0
- package/src/components/Progress/index.ts +7 -0
- package/src/components/Radio/Radio.test.ts +216 -0
- package/src/components/Radio/Radio.vue +214 -0
- package/src/components/Radio/index.ts +2 -0
- package/src/components/Rating/Rating.test.ts +319 -0
- package/src/components/Rating/Rating.vue +247 -0
- package/src/components/Rating/index.ts +2 -0
- package/src/components/SegmentedControl/SegmentedControl.test.ts +292 -0
- package/src/components/SegmentedControl/SegmentedControl.vue +288 -0
- package/src/components/SegmentedControl/index.ts +2 -0
- package/src/components/Select/Select.test.ts +589 -0
- package/src/components/Select/Select.vue +666 -0
- package/src/components/Select/index.ts +2 -0
- package/src/components/Sidebar/Sidebar.test.ts +301 -0
- package/src/components/Sidebar/SidebarGroup.vue +103 -0
- package/src/components/Sidebar/SidebarItem.vue +196 -0
- package/src/components/Sidebar/SidebarLayout.vue +42 -0
- package/src/components/Sidebar/SidebarRoot.vue +122 -0
- package/src/components/Sidebar/index.ts +11 -0
- package/src/components/Sidebar/keys.ts +14 -0
- package/src/components/Skeleton/Skeleton.test.ts +130 -0
- package/src/components/Skeleton/Skeleton.vue +104 -0
- package/src/components/Skeleton/index.ts +2 -0
- package/src/components/Slider/Slider.test.ts +416 -0
- package/src/components/Slider/Slider.vue +435 -0
- package/src/components/Slider/index.ts +2 -0
- package/src/components/Slider/utils.ts +91 -0
- package/src/components/Spinner/Spinner.test.ts +79 -0
- package/src/components/Spinner/Spinner.vue +159 -0
- package/src/components/Spinner/index.ts +2 -0
- package/src/components/SpireProvider/SpireProvider.vue +71 -0
- package/src/components/SpireProvider/index.ts +11 -0
- package/src/components/Stepper/Stepper.test.ts +221 -0
- package/src/components/Stepper/StepperContent.vue +51 -0
- package/src/components/Stepper/StepperItem.vue +89 -0
- package/src/components/Stepper/StepperRoot.vue +101 -0
- package/src/components/Stepper/StepperSeparator.vue +52 -0
- package/src/components/Stepper/StepperTrigger.vue +144 -0
- package/src/components/Stepper/index.ts +11 -0
- package/src/components/Stepper/keys.ts +27 -0
- package/src/components/Switch/Switch.test.ts +214 -0
- package/src/components/Switch/Switch.vue +235 -0
- package/src/components/Switch/index.ts +2 -0
- package/src/components/Tabs/Tabs.test.ts +363 -0
- package/src/components/Tabs/Tabs.vue +318 -0
- package/src/components/Tabs/index.ts +2 -0
- package/src/components/Text/Text.test.ts +154 -0
- package/src/components/Text/Text.vue +100 -0
- package/src/components/Text/index.ts +2 -0
- package/src/components/Textarea/Textarea.test.ts +432 -0
- package/src/components/Textarea/Textarea.vue +411 -0
- package/src/components/Textarea/index.ts +2 -0
- package/src/components/TimePicker/TimePicker.test.ts +352 -0
- package/src/components/TimePicker/TimePicker.vue +569 -0
- package/src/components/TimePicker/index.ts +2 -0
- package/src/components/Timeline/Timeline.test.ts +193 -0
- package/src/components/Timeline/Timeline.vue +111 -0
- package/src/components/Timeline/TimelineItem.vue +167 -0
- package/src/components/Timeline/index.ts +13 -0
- package/src/components/Timeline/keys.ts +21 -0
- package/src/components/Toast/ToastItem.test.ts +289 -0
- package/src/components/Toast/ToastItem.vue +370 -0
- package/src/components/Toast/ToastProvider.test.ts +158 -0
- package/src/components/Toast/ToastProvider.vue +181 -0
- package/src/components/Toast/index.ts +83 -0
- package/src/components/Toast/toastState.test.ts +165 -0
- package/src/components/Toast/toastState.ts +161 -0
- package/src/components/ToggleButton/ToggleButton.test.ts +166 -0
- package/src/components/ToggleButton/ToggleButton.vue +197 -0
- package/src/components/ToggleButton/index.ts +2 -0
- package/src/components/ToggleGroup/ToggleGroup.test.ts +181 -0
- package/src/components/ToggleGroup/ToggleGroup.vue +130 -0
- package/src/components/ToggleGroup/index.ts +2 -0
- package/src/components/Tooltip/Tooltip.test.ts +238 -0
- package/src/components/Tooltip/Tooltip.vue +217 -0
- package/src/components/Tooltip/index.ts +2 -0
- package/src/components/TreeView/TreeView.test.ts +357 -0
- package/src/components/TreeView/TreeView.vue +251 -0
- package/src/components/TreeView/TreeViewItem.vue +288 -0
- package/src/components/TreeView/index.ts +11 -0
- package/src/components/TreeView/keys.ts +35 -0
- package/src/composables/index.ts +12 -0
- package/src/composables/useClickOutside.ts +36 -0
- package/src/composables/useClipboard.ts +35 -0
- package/src/composables/useEventListener.ts +48 -0
- package/src/composables/useFocusTrap.ts +58 -0
- package/src/composables/useHoverReveal.ts +98 -0
- package/src/composables/useId.ts +10 -0
- package/src/composables/useMagnetic.ts +171 -0
- package/src/composables/useRelativePosition.ts +127 -0
- package/src/composables/useRipple.ts +146 -0
- package/src/composables/useScrollLock.ts +25 -0
- package/src/composables/useSpireConfig.ts +27 -0
- package/src/composables/useStagger.ts +224 -0
- package/src/config/icons.test.ts +115 -0
- package/src/config/icons.ts +170 -0
- package/src/index.ts +361 -0
- package/src/styles/depth.css +129 -0
- package/src/styles/effects.css +169 -0
- package/src/styles/fallback.css +152 -0
- package/src/styles/main.css +25 -0
- package/src/styles/mood.css +211 -0
- package/src/styles/motion.css +159 -0
- package/src/styles/reset.css +97 -0
- package/src/styles/theme.css +708 -0
- package/src/styles/tokens.css +183 -0
- package/src/utils/.gitkeep +0 -0
- package/src/utils/color.ts +277 -0
- package/src/utils/date.test.ts +522 -0
- package/src/utils/date.ts +380 -0
- package/src/utils/index.ts +23 -0
- package/src/utils/object.test.ts +80 -0
- package/src/utils/object.ts +25 -0
- package/src/utils/string.test.ts +64 -0
- package/src/utils/string.ts +32 -0
- package/src/utils/time.ts +156 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Sabri Stratos
|
|
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.
|
package/README.md
ADDED
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
# Spire UI
|
|
2
|
+
|
|
3
|
+
A dependency-free Vue 3 component library built with pure CSS. Uses OKLCH color space for perceptually uniform colors and follows a 3-layer CSS architecture.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Zero runtime dependencies** - Pure CSS styling with no external CSS frameworks
|
|
8
|
+
- **Vue 3 Composition API** - Built with `<script setup>` and TypeScript
|
|
9
|
+
- **OKLCH Color Space** - Perceptually uniform colors for consistent UI
|
|
10
|
+
- **3-Layer CSS Architecture** - Tokens, theme, and component styles
|
|
11
|
+
- **Polymorphic Components** - Flexible `as` prop for semantic HTML
|
|
12
|
+
- **Accessible** - ARIA attributes and keyboard navigation
|
|
13
|
+
- **Tree-shakeable** - Import only what you need
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install spire-ui
|
|
19
|
+
# or
|
|
20
|
+
pnpm add spire-ui
|
|
21
|
+
# or
|
|
22
|
+
yarn add spire-ui
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Peer Dependencies
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm install vue@^3.3.0
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Optional peer dependency for chart components:
|
|
32
|
+
```bash
|
|
33
|
+
npm install chart.js@^4.4.0
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Quick Start
|
|
37
|
+
|
|
38
|
+
```typescript
|
|
39
|
+
// main.ts
|
|
40
|
+
import { createApp } from 'vue'
|
|
41
|
+
import App from './App.vue'
|
|
42
|
+
|
|
43
|
+
// Import Spire UI styles
|
|
44
|
+
import 'spire-ui/style.css'
|
|
45
|
+
|
|
46
|
+
createApp(App).mount('#app')
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
```vue
|
|
50
|
+
<script setup lang="ts">
|
|
51
|
+
import { Button, Input, Modal, useToast } from 'spire-ui'
|
|
52
|
+
|
|
53
|
+
const toast = useToast()
|
|
54
|
+
|
|
55
|
+
function handleClick() {
|
|
56
|
+
toast.success('Button clicked!')
|
|
57
|
+
}
|
|
58
|
+
</script>
|
|
59
|
+
|
|
60
|
+
<template>
|
|
61
|
+
<Button @click="handleClick">Click me</Button>
|
|
62
|
+
</template>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Components
|
|
66
|
+
|
|
67
|
+
### Layout & Structure
|
|
68
|
+
- **Card** - Container with header, content, footer, and image slots
|
|
69
|
+
- **Modal** - Dialog overlay with focus trap and scroll lock
|
|
70
|
+
- **Drawer** - Slide-in panel from any edge
|
|
71
|
+
- **Tabs** - Tabbed content navigation
|
|
72
|
+
- **Accordion** - Collapsible content sections
|
|
73
|
+
|
|
74
|
+
### Form Controls
|
|
75
|
+
- **Button** - Primary action element with variants and states
|
|
76
|
+
- **Input** - Text input with validation states
|
|
77
|
+
- **Textarea** - Multi-line text input
|
|
78
|
+
- **Select** - Dropdown selection
|
|
79
|
+
- **Combobox** - Searchable dropdown with autocomplete
|
|
80
|
+
- **Checkbox** - Boolean toggle with indeterminate state
|
|
81
|
+
- **Radio** - Single selection from group
|
|
82
|
+
- **Switch** - Toggle switch control
|
|
83
|
+
- **FileUpload** - File input with drag-and-drop
|
|
84
|
+
|
|
85
|
+
### Selection
|
|
86
|
+
- **SegmentedControl** - Mutually exclusive options
|
|
87
|
+
- **ToggleButton** - Pressable button with on/off state
|
|
88
|
+
- **ToggleGroup** - Group of toggle buttons
|
|
89
|
+
- **ChoiceChip** - Selectable chip
|
|
90
|
+
- **ChoiceChipGroup** - Group of choice chips
|
|
91
|
+
|
|
92
|
+
### Display
|
|
93
|
+
- **Avatar** - User profile image with fallback
|
|
94
|
+
- **Badge** - Status indicator
|
|
95
|
+
- **BadgeContainer** - Position badges relative to content
|
|
96
|
+
- **Icon** - Flexible icon adapter
|
|
97
|
+
- **Heading** - Typography for headings (h1-h6)
|
|
98
|
+
- **Text** - Typography for body text
|
|
99
|
+
- **Spinner** - Loading indicator
|
|
100
|
+
- **Skeleton** - Loading placeholder
|
|
101
|
+
- **Progress** - Progress indicator
|
|
102
|
+
|
|
103
|
+
### Feedback
|
|
104
|
+
- **Toast** - Notification messages
|
|
105
|
+
- **Tooltip** - Contextual information on hover
|
|
106
|
+
- **Callout** - Highlighted information block
|
|
107
|
+
- **EmptyState** - Placeholder for empty content
|
|
108
|
+
|
|
109
|
+
### Data Display
|
|
110
|
+
- **DataTable** - Sortable data table
|
|
111
|
+
- **Breadcrumb** - Navigation breadcrumbs
|
|
112
|
+
|
|
113
|
+
### Overlay
|
|
114
|
+
- **Dropdown** - Floating menu with submenus
|
|
115
|
+
- **Popover** - Floating content panel
|
|
116
|
+
|
|
117
|
+
### Charts (requires chart.js)
|
|
118
|
+
- **LineChart** - Line/area charts
|
|
119
|
+
- **BarChart** - Vertical/horizontal bar charts
|
|
120
|
+
- **DonutChart** - Donut/pie charts
|
|
121
|
+
|
|
122
|
+
## Composables
|
|
123
|
+
|
|
124
|
+
```typescript
|
|
125
|
+
import {
|
|
126
|
+
useClickOutside,
|
|
127
|
+
useClipboard,
|
|
128
|
+
useEventListener,
|
|
129
|
+
useFocusTrap,
|
|
130
|
+
useHoverReveal,
|
|
131
|
+
useId,
|
|
132
|
+
useMagnetic,
|
|
133
|
+
useRelativePosition,
|
|
134
|
+
useRipple,
|
|
135
|
+
useScrollLock,
|
|
136
|
+
useStagger,
|
|
137
|
+
useToast
|
|
138
|
+
} from 'spire-ui'
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## CSS Architecture
|
|
142
|
+
|
|
143
|
+
Spire UI uses a 3-layer CSS system:
|
|
144
|
+
|
|
145
|
+
1. **Tokens** (`tokens.css`) - Primitive values (colors, spacing, typography)
|
|
146
|
+
2. **Theme** (`theme.css`) - Semantic tokens mapping to intent
|
|
147
|
+
3. **Components** - Scoped styles using semantic tokens
|
|
148
|
+
|
|
149
|
+
Colors are defined in OKLCH format for perceptual uniformity:
|
|
150
|
+
```css
|
|
151
|
+
--color-primary: oklch(0.55 0.25 275);
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Icon Integration
|
|
155
|
+
|
|
156
|
+
The Icon component accepts:
|
|
157
|
+
- Vue components from any icon library
|
|
158
|
+
- HugeIcons data array format
|
|
159
|
+
|
|
160
|
+
```vue
|
|
161
|
+
<script setup>
|
|
162
|
+
import { Icon } from 'spire-ui'
|
|
163
|
+
import { Home01Icon } from '@hugeicons/core-free-icons'
|
|
164
|
+
</script>
|
|
165
|
+
|
|
166
|
+
<template>
|
|
167
|
+
<Icon :icon="Home01Icon" size="md" />
|
|
168
|
+
</template>
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Configure default icons globally:
|
|
172
|
+
```typescript
|
|
173
|
+
import { configureIcons } from 'spire-ui'
|
|
174
|
+
import { CheckIcon, AlertIcon } from '@hugeicons/core-free-icons'
|
|
175
|
+
|
|
176
|
+
configureIcons({
|
|
177
|
+
check: CheckIcon,
|
|
178
|
+
alert: AlertIcon
|
|
179
|
+
})
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
## Theme Provider
|
|
183
|
+
|
|
184
|
+
Wrap your app with SpireProvider for theming:
|
|
185
|
+
|
|
186
|
+
```vue
|
|
187
|
+
<script setup>
|
|
188
|
+
import { SpireProvider } from 'spire-ui'
|
|
189
|
+
</script>
|
|
190
|
+
|
|
191
|
+
<template>
|
|
192
|
+
<SpireProvider theme="light" mood="professional">
|
|
193
|
+
<App />
|
|
194
|
+
</SpireProvider>
|
|
195
|
+
</template>
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## Development
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
# Install dependencies
|
|
202
|
+
pnpm install
|
|
203
|
+
|
|
204
|
+
# Start playground dev server
|
|
205
|
+
pnpm dev
|
|
206
|
+
|
|
207
|
+
# Run tests
|
|
208
|
+
pnpm test
|
|
209
|
+
|
|
210
|
+
# Build for production
|
|
211
|
+
pnpm build
|
|
212
|
+
|
|
213
|
+
# Type check
|
|
214
|
+
pnpm typecheck
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
## Project Structure
|
|
218
|
+
|
|
219
|
+
```
|
|
220
|
+
packages/
|
|
221
|
+
ui/ # Component library
|
|
222
|
+
src/
|
|
223
|
+
components/ # Vue components
|
|
224
|
+
composables/ # Vue composables
|
|
225
|
+
styles/ # CSS tokens and theme
|
|
226
|
+
utils/ # Utility functions
|
|
227
|
+
config/ # Configuration
|
|
228
|
+
playground/ # Development environment
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
## License
|
|
232
|
+
|
|
233
|
+
MIT
|