@tenerife.music/ui 0.0.7 → 1.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/README.md +168 -136
- package/dist/ThemeProvider-CaUX_Jam.cjs +2 -0
- package/dist/ThemeProvider-ltuW-773.js +1227 -0
- package/dist/animation/index.d.ts +9 -0
- package/dist/animation/index.d.ts.map +1 -0
- package/dist/animation/presets.d.ts +304 -0
- package/dist/animation/presets.d.ts.map +1 -0
- package/dist/animation/tas.d.ts +80 -0
- package/dist/animation/tas.d.ts.map +1 -0
- package/dist/animation/types.d.ts +106 -0
- package/dist/animation/types.d.ts.map +1 -0
- package/dist/animation/utils.d.ts +7 -0
- package/dist/animation/utils.d.ts.map +1 -0
- package/dist/brand-C5R2semX.js +45 -0
- package/dist/brand-DQb18Frh.cjs +2 -0
- package/dist/components/SectionBuilder.d.ts +37 -0
- package/dist/components/SectionBuilder.d.ts.map +1 -0
- package/dist/components/SectionBuilder.presets.d.ts +229 -0
- package/dist/components/SectionBuilder.presets.d.ts.map +1 -0
- package/dist/components/SectionBuilder.types.d.ts +327 -0
- package/dist/components/SectionBuilder.types.d.ts.map +1 -0
- package/dist/components/admin/Dashboard.d.ts.map +1 -1
- package/dist/components/admin/UserManagement.d.ts.map +1 -1
- package/dist/components/auth/LoginForm.d.ts.map +1 -1
- package/dist/components/auth/ProfileCard.d.ts.map +1 -1
- package/dist/components/auth/RegisterForm.d.ts.map +1 -1
- package/dist/components/cards/EventCard.d.ts +32 -31
- package/dist/components/cards/EventCard.d.ts.map +1 -1
- package/dist/components/cards/VenueCard.d.ts +32 -33
- package/dist/components/cards/VenueCard.d.ts.map +1 -1
- package/dist/components/controls/LanguageSelector.d.ts.map +1 -1
- package/dist/components/data/List.d.ts.map +1 -1
- package/dist/components/data/Table.d.ts +2 -2
- package/dist/components/data/Table.d.ts.map +1 -1
- package/dist/components/data/Timeline.d.ts.map +1 -1
- package/dist/components/feedback/Alert.d.ts +1 -1
- package/dist/components/feedback/Alert.d.ts.map +1 -1
- package/dist/components/feedback/ConsentBanner.d.ts.map +1 -1
- package/dist/components/feedback/Progress.d.ts.map +1 -1
- package/dist/components/feedback/Skeleton.d.ts.map +1 -1
- package/dist/components/filters/DateRangePicker.d.ts.map +1 -1
- package/dist/components/filters/FilterBar.d.ts +14 -1
- package/dist/components/filters/FilterBar.d.ts.map +1 -1
- package/dist/components/filters/FilterSelect.d.ts +2 -2
- package/dist/components/filters/FilterSelect.d.ts.map +1 -1
- package/dist/components/filters/PriceRangeSlider.d.ts.map +1 -1
- package/dist/components/filters/SearchFilters.d.ts.map +1 -1
- package/dist/components/filters/SearchInput.d.ts +1 -1
- package/dist/components/filters/SearchInput.d.ts.map +1 -1
- package/dist/components/filters/types.d.ts +9 -9
- package/dist/components/filters/types.d.ts.map +1 -1
- package/dist/components/forms/FormInput.d.ts +3 -7
- package/dist/components/forms/FormInput.d.ts.map +1 -1
- package/dist/components/forms/FormSelect.d.ts.map +1 -1
- package/dist/components/forms/FormTextarea.d.ts +2 -6
- package/dist/components/forms/FormTextarea.d.ts.map +1 -1
- package/dist/components/icons/TrendingIcon.d.ts.map +1 -1
- package/dist/components/image/Image.d.ts +4 -4
- package/dist/components/image/Image.d.ts.map +1 -1
- package/dist/components/layout/Box.d.ts +90 -0
- package/dist/components/layout/Box.d.ts.map +1 -0
- package/dist/components/layout/Container.d.ts +2 -2
- package/dist/components/layout/Container.d.ts.map +1 -1
- package/dist/components/layout/Flex.d.ts +27 -6
- package/dist/components/layout/Flex.d.ts.map +1 -1
- package/dist/components/layout/Footer.d.ts.map +1 -1
- package/dist/components/layout/Grid.d.ts +43 -4
- package/dist/components/layout/Grid.d.ts.map +1 -1
- package/dist/components/layout/ModeHero.d.ts.map +1 -1
- package/dist/components/layout/Navbar.d.ts +2 -2
- package/dist/components/layout/Navbar.d.ts.map +1 -1
- package/dist/components/layout/Section.d.ts +2 -2
- package/dist/components/layout/Section.d.ts.map +1 -1
- package/dist/components/layout/Stack.d.ts +21 -4
- package/dist/components/layout/Stack.d.ts.map +1 -1
- package/dist/components/layout/index.d.ts +15 -0
- package/dist/components/layout/index.d.ts.map +1 -0
- package/dist/components/layout/layout.types.d.ts +92 -0
- package/dist/components/layout/layout.types.d.ts.map +1 -0
- package/dist/components/menus/DropdownMenu.d.ts +2 -2
- package/dist/components/menus/DropdownMenu.d.ts.map +1 -1
- package/dist/components/menus/NavigationMenu.d.ts +2 -2
- package/dist/components/menus/NavigationMenu.d.ts.map +1 -1
- package/dist/components/menus/Tabs.d.ts +2 -2
- package/dist/components/menus/Tabs.d.ts.map +1 -1
- package/dist/components/modals/ConfirmDialog.d.ts +2 -2
- package/dist/components/modals/ConfirmDialog.d.ts.map +1 -1
- package/dist/components/modals/CustomDialog.d.ts +1 -2
- package/dist/components/modals/CustomDialog.d.ts.map +1 -1
- package/dist/components/modals/Modal.d.ts +2 -2
- package/dist/components/modals/Modal.d.ts.map +1 -1
- package/dist/components/modals/ModalProvider.d.ts +2 -2
- package/dist/components/modals/ModalProvider.d.ts.map +1 -1
- package/dist/components/modals/SimpleModal.d.ts +3 -2
- package/dist/components/modals/SimpleModal.d.ts.map +1 -1
- package/dist/components/navigation/Breadcrumbs.d.ts +1 -0
- package/dist/components/navigation/Breadcrumbs.d.ts.map +1 -1
- package/dist/components/navigation/Pagination.d.ts +1 -0
- package/dist/components/navigation/Pagination.d.ts.map +1 -1
- package/dist/components/overlays/OverlayPortal.d.ts +3 -3
- package/dist/components/overlays/OverlayPortal.d.ts.map +1 -1
- package/dist/components/overlays/Popover.d.ts +11 -11
- package/dist/components/overlays/Popover.d.ts.map +1 -1
- package/dist/components/overlays/Tooltip.d.ts +9 -9
- package/dist/components/overlays/Tooltip.d.ts.map +1 -1
- package/dist/components/primitives/Badge.d.ts +1 -1
- package/dist/components/primitives/Badge.d.ts.map +1 -1
- package/dist/components/primitives/Button.d.ts +1 -1
- package/dist/components/primitives/Button.d.ts.map +1 -1
- package/dist/components/primitives/Card.d.ts +1 -1
- package/dist/components/primitives/Card.d.ts.map +1 -1
- package/dist/components/primitives/Divider.d.ts.map +1 -1
- package/dist/components/primitives/Link.d.ts +4 -2
- package/dist/components/primitives/Link.d.ts.map +1 -1
- package/dist/components/primitives/ThemeSwitch.d.ts +2 -2
- package/dist/components/primitives/ThemeSwitch.d.ts.map +1 -1
- package/dist/components/primitives/Typography.d.ts +4 -4
- package/dist/components/primitives/Typography.d.ts.map +1 -1
- package/dist/components/search/SearchBar.d.ts.map +1 -1
- package/dist/components/sections/ArticlesSection.d.ts +14 -4
- package/dist/components/sections/ArticlesSection.d.ts.map +1 -1
- package/dist/components/sections/CTASection.d.ts +38 -0
- package/dist/components/sections/CTASection.d.ts.map +1 -0
- package/dist/components/sections/FeatureSection.d.ts +34 -0
- package/dist/components/sections/FeatureSection.d.ts.map +1 -0
- package/dist/components/sections/HeroSection.d.ts +28 -0
- package/dist/components/sections/HeroSection.d.ts.map +1 -0
- package/dist/components/sections/TrendingSection.d.ts +19 -3
- package/dist/components/sections/TrendingSection.d.ts.map +1 -1
- package/dist/components/skeletons/EventCardSkeleton.d.ts.map +1 -1
- package/dist/components/skeletons/VenueCardSkeleton.d.ts.map +1 -1
- package/dist/components/toasts/Toast.d.ts +2 -2
- package/dist/components/toasts/Toast.d.ts.map +1 -1
- package/dist/components/toasts/ToastProvider.d.ts +3 -3
- package/dist/components/toasts/ToastProvider.d.ts.map +1 -1
- package/dist/components/ui/button.d.ts +4 -2
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/card.d.ts +1 -1
- package/dist/components/ui/card.d.ts.map +1 -1
- package/dist/components/ui/dialog.d.ts +2 -2
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/input.d.ts.map +1 -1
- package/dist/components/ui/label.d.ts +1 -1
- package/dist/components/ui/label.d.ts.map +1 -1
- package/dist/components/ui/toast.d.ts +3 -3
- package/dist/components/ui/toast.d.ts.map +1 -1
- package/dist/components/ui/toaster.d.ts.map +1 -1
- package/dist/components/ui/tooltip.d.ts +2 -2
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/dark-Cvoy1uFT.js +30 -0
- package/dist/dark-OOhiqt1q.cjs +2 -0
- package/dist/default-BKgH1D9-.js +8 -0
- package/dist/default-Ddg7Haf2.cjs +2 -0
- package/dist/hooks/use-toast.d.ts +3 -3
- package/dist/hooks/use-toast.d.ts.map +1 -1
- package/dist/hooks/useDebounce.d.ts +20 -0
- package/dist/hooks/useDebounce.d.ts.map +1 -0
- package/dist/hooks/useModal.d.ts +5 -5
- package/dist/hooks/useModal.d.ts.map +1 -1
- package/dist/hooks/useToast.d.ts +2 -2
- package/dist/hooks/useToast.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +41 -32
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +4303 -2807
- package/dist/lib/a11y.d.ts +16 -0
- package/dist/lib/a11y.d.ts.map +1 -0
- package/dist/lib/responsive-props.d.ts +64 -0
- package/dist/lib/responsive-props.d.ts.map +1 -0
- package/dist/motion-4SRNkZlz.cjs +2 -0
- package/dist/motion-CuHacXY1.js +722 -0
- package/dist/preset.cjs +1 -1
- package/dist/preset.d.ts.map +1 -1
- package/dist/preset.mjs +1 -1
- package/dist/radius-CAu4qr9R.js +185 -0
- package/dist/radius-Cz6tayZG.cjs +2 -0
- package/dist/test/animation-utils.d.ts +60 -0
- package/dist/test/animation-utils.d.ts.map +1 -0
- package/dist/theme/ThemeProvider.d.ts +56 -0
- package/dist/theme/ThemeProvider.d.ts.map +1 -0
- package/dist/theme/applyMode.d.ts +41 -1
- package/dist/theme/applyMode.d.ts.map +1 -1
- package/dist/theme/index.cjs +1 -1
- package/dist/theme/index.d.ts +5 -1
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.mjs +237 -97
- package/dist/theme/loader.d.ts +64 -0
- package/dist/theme/loader.d.ts.map +1 -0
- package/dist/theme/motion.d.ts.map +1 -1
- package/dist/theme/registry.d.ts +71 -0
- package/dist/theme/registry.d.ts.map +1 -0
- package/dist/theme/schema.d.ts +125 -0
- package/dist/theme/schema.d.ts.map +1 -0
- package/dist/theme/typography.d.ts.map +1 -1
- package/dist/themes/brand.d.ts +7 -0
- package/dist/themes/brand.d.ts.map +1 -0
- package/dist/themes/brand_engine.d.ts +102 -0
- package/dist/themes/brand_engine.d.ts.map +1 -0
- package/dist/themes/dark.d.ts +7 -0
- package/dist/themes/dark.d.ts.map +1 -0
- package/dist/themes/default.d.ts +7 -0
- package/dist/themes/default.d.ts.map +1 -0
- package/dist/themes/index.d.ts +25 -0
- package/dist/themes/index.d.ts.map +1 -0
- package/dist/themes/minimal.d.ts +7 -0
- package/dist/themes/minimal.d.ts.map +1 -0
- package/dist/themes/neon.d.ts +7 -0
- package/dist/themes/neon.d.ts.map +1 -0
- package/dist/themes/types.d.ts +279 -0
- package/dist/themes/types.d.ts.map +1 -0
- package/dist/tokens/colors.d.ts +260 -38
- package/dist/tokens/colors.d.ts.map +1 -1
- package/dist/tokens/css-variables.d.ts +271 -0
- package/dist/tokens/css-variables.d.ts.map +1 -0
- package/dist/tokens/index.cjs +4 -1
- package/dist/tokens/index.d.ts +4 -1
- package/dist/tokens/index.d.ts.map +1 -1
- package/dist/tokens/index.mjs +770 -168
- package/dist/tokens/motion.d.ts +435 -0
- package/dist/tokens/motion.d.ts.map +1 -0
- package/dist/tokens/radius.d.ts +130 -2
- package/dist/tokens/radius.d.ts.map +1 -1
- package/dist/tokens/shadows.d.ts +172 -0
- package/dist/tokens/shadows.d.ts.map +1 -0
- package/dist/tokens/spacing.d.ts +155 -1
- package/dist/tokens/spacing.d.ts.map +1 -1
- package/dist/tokens/typography.d.ts +285 -21
- package/dist/tokens/typography.d.ts.map +1 -1
- package/package.json +66 -18
- package/dist/radius-CuOZD6Mk.cjs +0 -2
- package/dist/radius-NOytgRst.js +0 -22
package/README.md
CHANGED
|
@@ -1,197 +1,229 @@
|
|
|
1
|
-
|
|
1
|
+
🌴 Tenerife UI — Premium React Component Library
|
|
2
|
+
Elegant. Token-driven. Fully Typed. Built for Luxury Interfaces.
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+

|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
## 📦 Installation
|
|
9
|
-
|
|
10
|
-
```bash
|
|
6
|
+
<p align="center"> <img src="https://raw.githubusercontent.com/Tureckiy-zart/tenerife-ui/main/.github/banner.png" width="100%" /> </p> <p align="center"> <strong> A high-end, fully tokenized design system crafted for modern React apps.<br/> Built with Tailwind, CVA, TypeScript and a luxury-first aesthetic. </strong> </p> <p align="center"> <img src="https://img.shields.io/badge/React-18+-blue?style=for-the-badge"/> <img src="https://img.shields.io/badge/TailwindCSS-3.4-38b2ac?style=for-the-badge"/> <img src="https://img.shields.io/badge/TypeScript-Strict-blue?style=for-the-badge"/> <img src="https://img.shields.io/badge/Design%20Tokens-Complete-purple?style=for-the-badge"/> <img src="https://img.shields.io/badge/CVA-Variants-success?style=for-the-badge"/> </p>
|
|
7
|
+
🚀 Quick Start
|
|
11
8
|
npm install @tenerife.music/ui
|
|
12
9
|
# or
|
|
13
10
|
pnpm add @tenerife.music/ui
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
import { Button, Card, EventCard } from '@tenerife.music/ui';
|
|
22
|
-
import '@tenerife.music/ui/styles'; // Import styles
|
|
23
|
-
|
|
24
|
-
function App() {
|
|
25
|
-
return (
|
|
26
|
-
<div>
|
|
27
|
-
<Button variant="default">Click me</Button>
|
|
28
|
-
<Card>
|
|
29
|
-
<CardHeader>Title</CardHeader>
|
|
30
|
-
<CardContent>Content</CardContent>
|
|
31
|
-
</Card>
|
|
32
|
-
</div>
|
|
33
|
-
);
|
|
11
|
+
|
|
12
|
+
Use a component:
|
|
13
|
+
|
|
14
|
+
import { Button } from "@tenerife.music/ui";
|
|
15
|
+
|
|
16
|
+
export function Demo() {
|
|
17
|
+
return <Button variant="primary">Book Now</Button>;
|
|
34
18
|
}
|
|
35
|
-
```
|
|
36
19
|
|
|
37
|
-
|
|
20
|
+
🎨 Tenerife UI Design Philosophy
|
|
38
21
|
|
|
39
|
-
|
|
22
|
+
Tenerife UI создана для:
|
|
40
23
|
|
|
41
|
-
|
|
24
|
+
luxury проектов
|
|
42
25
|
|
|
43
|
-
|
|
44
|
-
- **Day/Night Themes**: Automatic theme switching support
|
|
45
|
-
- **TypeScript**: Full type safety with TypeScript
|
|
46
|
-
- **Tailwind CSS**: Built with Tailwind CSS for styling
|
|
47
|
-
- **shadcn/ui Based**: Built on top of shadcn/ui primitives
|
|
48
|
-
- **Accessible**: ARIA-compliant components via Radix UI
|
|
49
|
-
- **Tree-shakeable**: Import only what you need
|
|
26
|
+
продвинутых приложений
|
|
50
27
|
|
|
51
|
-
|
|
28
|
+
маркетплейсов
|
|
52
29
|
|
|
53
|
-
|
|
30
|
+
платформ с глубокой эстетикой
|
|
54
31
|
|
|
55
|
-
|
|
56
|
-
2. **Tenerife Primitives**: Re-exported with Tenerife branding
|
|
57
|
-
3. **Complex Components**: Higher-level components (EventCard, VenueCard, etc.)
|
|
32
|
+
темных и светлых тем
|
|
58
33
|
|
|
59
|
-
|
|
34
|
+
брендированных интерфейсов
|
|
60
35
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
- **Forms**: FormInput, FormSelect, FormTextarea
|
|
64
|
-
- **Feedback**: Alert, Progress, Skeleton, Toast
|
|
65
|
-
- **Navigation**: Breadcrumbs, Pagination, Tabs
|
|
66
|
-
- **Data**: Table, List, Timeline
|
|
67
|
-
- **Cards**: EventCard, VenueCard
|
|
68
|
-
- **Modals**: Modal, Dialog, ConfirmDialog
|
|
36
|
+
Это библиотека не «ещё одна коллекция кнопок».
|
|
37
|
+
Это — архитектурно правильная, премиальная, коммерческая дизайн-система.
|
|
69
38
|
|
|
70
|
-
|
|
39
|
+
🧩 Component Overview
|
|
40
|
+
UI Primitives
|
|
71
41
|
|
|
72
|
-
|
|
42
|
+
Button
|
|
73
43
|
|
|
74
|
-
|
|
75
|
-
// Set theme
|
|
76
|
-
document.documentElement.setAttribute('data-mode', 'day'); // or 'night'
|
|
77
|
-
```
|
|
44
|
+
Input / Textarea / Select
|
|
78
45
|
|
|
79
|
-
|
|
46
|
+
Label
|
|
80
47
|
|
|
81
|
-
|
|
48
|
+
Card
|
|
82
49
|
|
|
83
|
-
|
|
84
|
-
import { Button, Input, Card } from '@tenerife.music/ui';
|
|
50
|
+
Badge
|
|
85
51
|
|
|
86
|
-
|
|
87
|
-
<Input placeholder="Enter text..." />
|
|
88
|
-
<Card>Card content</Card>
|
|
89
|
-
```
|
|
52
|
+
Overlays
|
|
90
53
|
|
|
91
|
-
|
|
54
|
+
Modal
|
|
92
55
|
|
|
93
|
-
|
|
94
|
-
import { EventCard, VenueCard, SearchBar } from '@tenerife.music/ui';
|
|
56
|
+
Tooltip
|
|
95
57
|
|
|
96
|
-
|
|
97
|
-
<VenueCard venue={venueData} />
|
|
98
|
-
<SearchBar onSearch={handleSearch} />
|
|
99
|
-
```
|
|
58
|
+
Popover
|
|
100
59
|
|
|
101
|
-
|
|
60
|
+
Toast
|
|
102
61
|
|
|
103
|
-
|
|
104
|
-
import { FormInput, FormSelect } from '@tenerife.music/ui';
|
|
105
|
-
import { useForm } from 'react-hook-form';
|
|
62
|
+
Search & Filters
|
|
106
63
|
|
|
107
|
-
|
|
64
|
+
SearchBar
|
|
108
65
|
|
|
109
|
-
|
|
110
|
-
<FormSelect {...register('category')} options={options} />
|
|
111
|
-
```
|
|
66
|
+
FilterBar
|
|
112
67
|
|
|
113
|
-
|
|
68
|
+
FilterSelect
|
|
114
69
|
|
|
115
|
-
|
|
70
|
+
Layout
|
|
116
71
|
|
|
117
|
-
|
|
118
|
-
- pnpm (recommended) or npm
|
|
72
|
+
Grid
|
|
119
73
|
|
|
120
|
-
|
|
74
|
+
Section
|
|
121
75
|
|
|
122
|
-
|
|
123
|
-
# Clone repository
|
|
124
|
-
git clone https://github.com/tenerife-music/tenerife-ui.git
|
|
125
|
-
cd tenerife-ui
|
|
76
|
+
Navbar
|
|
126
77
|
|
|
127
|
-
|
|
128
|
-
pnpm install
|
|
78
|
+
Hero / ModeHero
|
|
129
79
|
|
|
130
|
-
|
|
131
|
-
|
|
80
|
+
Data
|
|
81
|
+
|
|
82
|
+
Table
|
|
83
|
+
|
|
84
|
+
List
|
|
85
|
+
|
|
86
|
+
Complex
|
|
87
|
+
|
|
88
|
+
VenueCard
|
|
89
|
+
|
|
90
|
+
EventCard
|
|
91
|
+
|
|
92
|
+
CTA Blocks
|
|
93
|
+
|
|
94
|
+
📦 Core System Overview (DO NOT REMOVE)
|
|
95
|
+
|
|
96
|
+
Ключевой системный блок.
|
|
97
|
+
Не удалять, не переносить, не изменять структуру.
|
|
98
|
+
|
|
99
|
+
🏗 Installation
|
|
100
|
+
npm install @tenerife.music/ui
|
|
101
|
+
|
|
102
|
+
import { ThemeProvider } from "@tenerife.music/ui";
|
|
103
|
+
|
|
104
|
+
export default function App() {
|
|
105
|
+
return (
|
|
106
|
+
<ThemeProvider>
|
|
107
|
+
<YourApp />
|
|
108
|
+
</ThemeProvider>
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
🎨 Design Tokens System
|
|
113
|
+
Цвета
|
|
114
|
+
|
|
115
|
+
100+ токенов
|
|
116
|
+
|
|
117
|
+
Полные оттеночные шкалы
|
|
118
|
+
|
|
119
|
+
surface tokens
|
|
132
120
|
|
|
133
|
-
|
|
134
|
-
pnpm build
|
|
121
|
+
semantic + text tokens
|
|
135
122
|
|
|
136
|
-
|
|
137
|
-
pnpm test
|
|
138
|
-
```
|
|
123
|
+
day/night mode
|
|
139
124
|
|
|
140
|
-
|
|
125
|
+
Типографика
|
|
141
126
|
|
|
142
|
-
|
|
143
|
-
- `pnpm dev` - Watch mode for development
|
|
144
|
-
- `pnpm test` - Run tests
|
|
145
|
-
- `pnpm test:coverage` - Run tests with coverage
|
|
146
|
-
- `pnpm storybook` - Start Storybook
|
|
147
|
-
- `pnpm lint` - Lint code
|
|
148
|
-
- `pnpm typecheck` - Type check
|
|
127
|
+
fluid clamp scale
|
|
149
128
|
|
|
150
|
-
|
|
129
|
+
13 стилей
|
|
151
130
|
|
|
152
|
-
|
|
131
|
+
9 весов
|
|
153
132
|
|
|
154
|
-
|
|
155
|
-
# Update version
|
|
156
|
-
npm version patch|minor|major
|
|
133
|
+
6 line-heights
|
|
157
134
|
|
|
158
|
-
|
|
159
|
-
npm publish
|
|
160
|
-
```
|
|
135
|
+
6 tracking options
|
|
161
136
|
|
|
162
|
-
|
|
137
|
+
Spacing
|
|
163
138
|
|
|
164
|
-
|
|
139
|
+
scale 0–96
|
|
165
140
|
|
|
166
|
-
|
|
167
|
-
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
168
|
-
3. Commit your changes (`git commit -m 'feat: add amazing feature'`)
|
|
169
|
-
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
170
|
-
5. Open a Pull Request
|
|
141
|
+
semantic tokens
|
|
171
142
|
|
|
172
|
-
|
|
143
|
+
layout tokens
|
|
173
144
|
|
|
174
|
-
|
|
145
|
+
Shadows
|
|
175
146
|
|
|
176
|
-
|
|
147
|
+
elevation 1–5
|
|
177
148
|
|
|
178
|
-
|
|
179
|
-
- [Issues](https://github.com/tenerife-music/tenerife-ui/issues)
|
|
180
|
-
- [Changelog](CHANGELOG.md)
|
|
149
|
+
colored shadows
|
|
181
150
|
|
|
182
|
-
|
|
151
|
+
glow
|
|
152
|
+
|
|
153
|
+
focus rings
|
|
154
|
+
|
|
155
|
+
Radius
|
|
156
|
+
|
|
157
|
+
none → 3xl
|
|
158
|
+
|
|
159
|
+
full-radius
|
|
160
|
+
|
|
161
|
+
Motion
|
|
162
|
+
|
|
163
|
+
easing
|
|
164
|
+
|
|
165
|
+
durations
|
|
166
|
+
|
|
167
|
+
transitions
|
|
168
|
+
|
|
169
|
+
⚙️ How Tenerife UI Works
|
|
170
|
+
★ Token-first architecture
|
|
171
|
+
|
|
172
|
+
Никаких raw стилей.
|
|
173
|
+
Всё — через токены.
|
|
174
|
+
|
|
175
|
+
★ Tailwind + CSS Variables
|
|
176
|
+
|
|
177
|
+
Цвета, spacing, shadows, radius — генерируются автоматически.
|
|
178
|
+
|
|
179
|
+
★ CVA для вариативности
|
|
180
|
+
|
|
181
|
+
Компоненты имеют единый Variant API.
|
|
182
|
+
|
|
183
|
+
★ Strict TypeScript
|
|
184
|
+
|
|
185
|
+
Идеальный DX и подсказки.
|
|
186
|
+
|
|
187
|
+
★ Theme Engine
|
|
188
|
+
|
|
189
|
+
Instant day/night mode.
|
|
190
|
+
|
|
191
|
+
🧱 Folder Structure
|
|
192
|
+
src/
|
|
193
|
+
components/
|
|
194
|
+
tokens/
|
|
195
|
+
theme/
|
|
196
|
+
layouts/
|
|
197
|
+
overlays/
|
|
198
|
+
search/
|
|
199
|
+
data/
|
|
200
|
+
|
|
201
|
+
📸 Component Preview
|
|
202
|
+
|
|
203
|
+
[](https://Tureckiy-zart.github.io/tenerife-ui/)
|
|
204
|
+
|
|
205
|
+
(Добавить скриншоты/видео позже)
|
|
206
|
+
|
|
207
|
+
🔧 Development
|
|
208
|
+
pnpm install
|
|
209
|
+
pnpm dev
|
|
210
|
+
pnpm storybook
|
|
183
211
|
|
|
184
|
-
|
|
185
|
-
- [Radix UI](https://www.radix-ui.com/) - Accessible component primitives
|
|
186
|
-
- [Tailwind CSS](https://tailwindcss.com/) - Utility-first CSS framework
|
|
212
|
+
🛠 Contributing
|
|
187
213
|
|
|
188
|
-
|
|
214
|
+
Before contributing, please read:
|
|
189
215
|
|
|
190
|
-
|
|
191
|
-
**Last Updated:** 2025-01-29
|
|
216
|
+
TYPING_STANDARD.md
|
|
192
217
|
|
|
218
|
+
STRUCTURE_OF_WORK.md
|
|
193
219
|
|
|
220
|
+
COMPONENT_GUIDELINES.md
|
|
194
221
|
|
|
222
|
+
📜 License
|
|
195
223
|
|
|
224
|
+
MIT — Commercial-friendly.
|
|
196
225
|
|
|
226
|
+
🎤 Author’s Note
|
|
197
227
|
|
|
228
|
+
Tenerife UI — это мой личный подход к созданию коммерческой, красивой и премиальной UI-системы.
|
|
229
|
+
Если ты строишь интерфейсы с эстетикой “дорого, стильно и технологично” — ты дома
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";const ie=require("react/jsx-runtime"),d=require("react");require("./radius-Cz6tayZG.cjs");const x=require("./motion-4SRNkZlz.cjs"),ce={id:"minimal",name:"Minimal",description:"Clean, minimal brand theme with muted colors, light typography, and compact spacing",namespace:"minimal",version:"1.0.0",author:"Tenerife UI",themes:[{id:"minimal-day",name:"Minimal Day",description:"Light minimal theme with grayscale colors and subtle accents",mode:"day",overrides:{name:"minimal-day",description:"Light minimal theme for day mode",primaryColors:{400:"0 0% 60%",500:"0 0% 50%",600:"0 0% 40%",700:"0 0% 30%"},accentColors:{400:"210 20% 70%",500:"210 20% 60%",600:"210 20% 50%",700:"210 20% 40%"},secondaryColors:{400:"0 0% 70%",500:"0 0% 65%",600:"0 0% 55%",700:"0 0% 45%"},baseColorsDay:{primary:"0 0% 50%",primaryForeground:"0 0% 100%",secondary:"0 0% 96%",secondaryForeground:"0 0% 20%",accent:"210 20% 60%",accentForeground:"0 0% 100%"},semanticColorsDay:{success:"140 30% 45%",info:"210 30% 50%",warning:"40 30% 50%",error:"0 40% 55%"},typography:{fontWeight:{normal:"400",medium:"500",semibold:"600",bold:"700"},fontSize:{xs:["clamp(0.6875rem, 0.65rem + 0.125vw, 0.75rem)",{lineHeight:"1rem",letterSpacing:"0.05em"}],sm:["clamp(0.8125rem, 0.75rem + 0.25vw, 0.875rem)",{lineHeight:"1.25rem",letterSpacing:"0.025em"}],base:["clamp(0.9375rem, 0.875rem + 0.25vw, 1rem)",{lineHeight:"1.5rem",letterSpacing:"0em"}],lg:["clamp(1.0625rem, 0.95rem + 0.5vw, 1.125rem)",{lineHeight:"1.75rem",letterSpacing:"-0.025em"}],xl:["clamp(1.1875rem, 1rem + 0.75vw, 1.375rem)",{lineHeight:"1.75rem",letterSpacing:"-0.025em"}]}},spacing:{semanticSpacing:{xs:"0.125rem",sm:"0.25rem",md:"0.5rem",lg:"0.75rem",xl:"1rem","2xl":"1.5rem"}},shadows:{elevationShadows:{xs:"0 1px 1px 0 rgb(0 0 0 / 0.03)",sm:"0 1px 2px 0 rgb(0 0 0 / 0.05), 0 1px 1px -1px rgb(0 0 0 / 0.05)",md:"0 2px 4px -1px rgb(0 0 0 / 0.05), 0 1px 2px -2px rgb(0 0 0 / 0.05)",lg:"0 4px 8px -2px rgb(0 0 0 / 0.05), 0 2px 4px -3px rgb(0 0 0 / 0.05)",xl:"0 8px 12px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.05)"},glowEffects:{"glow-primary":"0 0 8px 0 hsl(0 0% 50% / 0.2)","glow-primary-subtle":"0 0 4px 0 hsl(0 0% 50% / 0.15)","glow-primary-medium":"0 0 8px 0 hsl(0 0% 50% / 0.25)","glow-primary-strong":"0 0 12px 0 hsl(0 0% 50% / 0.3)"}},radius:{borderRadius:{xs:"0.0625rem",sm:"0.125rem",md:"0.1875rem",lg:"0.25rem",xl:"0.375rem","2xl":"0.5rem"},componentRadius:{button:{sm:"0.125rem",md:"0.1875rem",lg:"0.25rem"},card:{sm:"0.1875rem",md:"0.25rem",lg:"0.375rem",xl:"0.5rem"},input:{sm:"0.125rem",md:"0.1875rem",lg:"0.25rem"},badge:{sm:"0.0625rem",md:"0.125rem",lg:"0.1875rem"}}}}},{id:"minimal-night",name:"Minimal Night",description:"Dark minimal theme with muted grayscale colors",mode:"night",overrides:{name:"minimal-night",description:"Dark minimal theme for night mode",primaryColors:{400:"0 0% 65%",500:"0 0% 55%",600:"0 0% 45%",700:"0 0% 35%"},accentColors:{400:"210 20% 75%",500:"210 20% 65%",600:"210 20% 55%",700:"210 20% 45%"},secondaryColors:{400:"0 0% 75%",500:"0 0% 70%",600:"0 0% 60%",700:"0 0% 50%"},baseColorsNight:{background:"240 10% 8%",foreground:"0 0% 95%",card:"240 10% 10%",cardForeground:"0 0% 95%"},surfaceColorsNight:{base:"240 10% 8%",elevated1:"240 10% 10%",elevated2:"240 10% 12%",elevated3:"240 10% 14%"},semanticColorsNight:{success:"140 30% 50%",info:"210 30% 55%",warning:"40 30% 55%",error:"0 40% 60%"},typography:{fontWeight:{normal:"400",medium:"500",semibold:"600",bold:"700"},fontSize:{xs:["clamp(0.6875rem, 0.65rem + 0.125vw, 0.75rem)",{lineHeight:"1rem",letterSpacing:"0.05em"}],sm:["clamp(0.8125rem, 0.75rem + 0.25vw, 0.875rem)",{lineHeight:"1.25rem",letterSpacing:"0.025em"}],base:["clamp(0.9375rem, 0.875rem + 0.25vw, 1rem)",{lineHeight:"1.5rem",letterSpacing:"0em"}],lg:["clamp(1.0625rem, 0.95rem + 0.5vw, 1.125rem)",{lineHeight:"1.75rem",letterSpacing:"-0.025em"}],xl:["clamp(1.1875rem, 1rem + 0.75vw, 1.375rem)",{lineHeight:"1.75rem",letterSpacing:"-0.025em"}]}},spacing:{semanticSpacing:{xs:"0.125rem",sm:"0.25rem",md:"0.5rem",lg:"0.75rem",xl:"1rem","2xl":"1.5rem"}},shadows:{elevationShadows:{xs:"0 1px 2px 0 rgb(0 0 0 / 0.15)",sm:"0 1px 3px 0 rgb(0 0 0 / 0.2), 0 1px 2px -1px rgb(0 0 0 / 0.2)",md:"0 2px 5px -1px rgb(0 0 0 / 0.2), 0 1px 3px -2px rgb(0 0 0 / 0.2)",lg:"0 4px 10px -2px rgb(0 0 0 / 0.2), 0 2px 5px -3px rgb(0 0 0 / 0.2)",xl:"0 8px 15px -3px rgb(0 0 0 / 0.2), 0 4px 8px -4px rgb(0 0 0 / 0.2)"},glowEffects:{"glow-primary":"0 0 8px 0 hsl(0 0% 55% / 0.25)","glow-primary-subtle":"0 0 4px 0 hsl(0 0% 55% / 0.2)","glow-primary-medium":"0 0 8px 0 hsl(0 0% 55% / 0.3)","glow-primary-strong":"0 0 12px 0 hsl(0 0% 55% / 0.35)"}},radius:{borderRadius:{xs:"0.0625rem",sm:"0.125rem",md:"0.1875rem",lg:"0.25rem",xl:"0.375rem","2xl":"0.5rem"},componentRadius:{button:{sm:"0.125rem",md:"0.1875rem",lg:"0.25rem"},card:{sm:"0.1875rem",md:"0.25rem",lg:"0.375rem",xl:"0.5rem"},input:{sm:"0.125rem",md:"0.1875rem",lg:"0.25rem"},badge:{sm:"0.0625rem",md:"0.125rem",lg:"0.1875rem"}}}}}]},me={id:"neon",name:"Neon",description:"Vibrant brand theme with high-saturation neon colors, bold typography, and enhanced visual effects",namespace:"neon",version:"1.0.0",author:"Tenerife UI",themes:[{id:"neon-day",name:"Neon Day",description:"Bright neon theme for day mode with vibrant cyan, magenta, and yellow accents",mode:"day",overrides:{name:"neon-day",description:"Bright neon theme for day mode",primaryColors:{400:"180 100% 50%",500:"180 100% 45%",600:"180 95% 40%",700:"180 90% 35%"},accentColors:{400:"320 100% 60%",500:"320 100% 55%",600:"320 95% 50%",700:"320 90% 45%"},secondaryColors:{400:"60 100% 60%",500:"60 100% 55%",600:"60 95% 50%",700:"60 90% 45%"},baseColorsDay:{primary:"180 100% 45%",primaryForeground:"0 0% 100%",accent:"320 100% 55%",accentForeground:"0 0% 100%"},semanticColorsDay:{success:"145 80% 45%",info:"180 100% 45%",warning:"60 100% 55%",error:"0 100% 60%"},typography:{fontWeight:{normal:"500",medium:"600",semibold:"700",bold:"800"},fontSize:{xs:["clamp(0.875rem, 0.8rem + 0.25vw, 1rem)",{lineHeight:"1.25rem",letterSpacing:"0.025em"}],sm:["clamp(1rem, 0.95rem + 0.25vw, 1.125rem)",{lineHeight:"1.5rem",letterSpacing:"0em"}],base:["clamp(1.125rem, 1rem + 0.5vw, 1.25rem)",{lineHeight:"1.75rem",letterSpacing:"-0.025em"}],lg:["clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem)",{lineHeight:"1.75rem",letterSpacing:"-0.025em"}],xl:["clamp(1.5rem, 1.25rem + 1.25vw, 2rem)",{lineHeight:"2rem",letterSpacing:"-0.05em"}]}},spacing:{semanticSpacing:{xs:"0.5rem",sm:"1rem",md:"1.5rem",lg:"2rem",xl:"3rem","2xl":"4rem"}},shadows:{elevationShadows:{xs:"0 2px 4px 0 rgb(0 0 0 / 0.1)",sm:"0 2px 6px 0 rgb(0 0 0 / 0.15), 0 2px 4px -1px rgb(0 0 0 / 0.15)",md:"0 6px 10px -1px rgb(0 0 0 / 0.15), 0 4px 6px -2px rgb(0 0 0 / 0.15)",lg:"0 12px 20px -3px rgb(0 0 0 / 0.15), 0 6px 10px -4px rgb(0 0 0 / 0.15)",xl:"0 24px 32px -5px rgb(0 0 0 / 0.15), 0 10px 14px -6px rgb(0 0 0 / 0.15)"},glowEffects:{"glow-primary":"0 0 30px 0 hsl(180 100% 45% / 0.7), 0 0 60px 0 hsl(180 100% 45% / 0.4)","glow-primary-subtle":"0 0 12px 0 hsl(180 100% 45% / 0.5)","glow-primary-medium":"0 0 24px 0 hsl(180 100% 45% / 0.7)","glow-primary-strong":"0 0 36px 0 hsl(180 100% 45% / 0.8)","glow-accent":"0 0 30px 0 hsl(320 100% 55% / 0.7), 0 0 60px 0 hsl(320 100% 55% / 0.4)","glow-accent-subtle":"0 0 12px 0 hsl(320 100% 55% / 0.5)","glow-accent-medium":"0 0 24px 0 hsl(320 100% 55% / 0.7)","glow-accent-strong":"0 0 36px 0 hsl(320 100% 55% / 0.8)"}},radius:{borderRadius:{sm:"0.375rem",md:"0.5rem",lg:"0.75rem",xl:"1rem","2xl":"1.5rem","3xl":"2rem"},componentRadius:{button:{sm:"0.5rem",md:"0.75rem",lg:"1rem"},card:{sm:"0.75rem",md:"1rem",lg:"1.25rem",xl:"1.5rem"},input:{sm:"0.5rem",md:"0.75rem",lg:"1rem"},badge:{sm:"0.375rem",md:"0.5rem",lg:"0.75rem"}}}}},{id:"neon-night",name:"Neon Night",description:"Dark neon theme for night mode with glowing neon accents on dark backgrounds",mode:"night",overrides:{name:"neon-night",description:"Dark neon theme for night mode",primaryColors:{400:"180 100% 55%",500:"180 100% 50%",600:"180 95% 45%",700:"180 90% 40%"},accentColors:{400:"320 100% 65%",500:"320 100% 60%",600:"320 95% 55%",700:"320 90% 50%"},secondaryColors:{400:"60 100% 65%",500:"60 100% 60%",600:"60 95% 55%",700:"60 90% 50%"},baseColorsNight:{background:"240 10% 5%",foreground:"0 0% 98%",card:"240 10% 6%",cardForeground:"0 0% 98%"},surfaceColorsNight:{base:"240 10% 5%",elevated1:"240 10% 7%",elevated2:"240 10% 9%",elevated3:"240 10% 11%"},semanticColorsNight:{success:"145 75% 50%",info:"180 100% 50%",warning:"60 100% 60%",error:"0 100% 65%"},typography:{fontWeight:{normal:"500",medium:"600",semibold:"700",bold:"800"},fontSize:{xs:["clamp(0.875rem, 0.8rem + 0.25vw, 1rem)",{lineHeight:"1.25rem",letterSpacing:"0.025em"}],sm:["clamp(1rem, 0.95rem + 0.25vw, 1.125rem)",{lineHeight:"1.5rem",letterSpacing:"0em"}],base:["clamp(1.125rem, 1rem + 0.5vw, 1.25rem)",{lineHeight:"1.75rem",letterSpacing:"-0.025em"}],lg:["clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem)",{lineHeight:"1.75rem",letterSpacing:"-0.025em"}],xl:["clamp(1.5rem, 1.25rem + 1.25vw, 2rem)",{lineHeight:"2rem",letterSpacing:"-0.05em"}]}},spacing:{semanticSpacing:{xs:"0.5rem",sm:"1rem",md:"1.5rem",lg:"2rem",xl:"3rem","2xl":"4rem"}},shadows:{elevationShadows:{xs:"0 2px 4px 0 rgb(0 0 0 / 0.2)",sm:"0 2px 6px 0 rgb(0 0 0 / 0.25), 0 2px 4px -1px rgb(0 0 0 / 0.25)",md:"0 6px 10px -1px rgb(0 0 0 / 0.25), 0 4px 6px -2px rgb(0 0 0 / 0.25)",lg:"0 12px 20px -3px rgb(0 0 0 / 0.25), 0 6px 10px -4px rgb(0 0 0 / 0.25)",xl:"0 24px 32px -5px rgb(0 0 0 / 0.25), 0 10px 14px -6px rgb(0 0 0 / 0.25)"},glowEffects:{"glow-primary":"0 0 40px 0 hsl(180 100% 50% / 0.8), 0 0 80px 0 hsl(180 100% 50% / 0.5)","glow-primary-subtle":"0 0 16px 0 hsl(180 100% 50% / 0.6)","glow-primary-medium":"0 0 32px 0 hsl(180 100% 50% / 0.8)","glow-primary-strong":"0 0 48px 0 hsl(180 100% 50% / 0.9)","glow-accent":"0 0 40px 0 hsl(320 100% 60% / 0.8), 0 0 80px 0 hsl(320 100% 60% / 0.5)","glow-accent-subtle":"0 0 16px 0 hsl(320 100% 60% / 0.6)","glow-accent-medium":"0 0 32px 0 hsl(320 100% 60% / 0.8)","glow-accent-strong":"0 0 48px 0 hsl(320 100% 60% / 0.9)"}},radius:{borderRadius:{sm:"0.375rem",md:"0.5rem",lg:"0.75rem",xl:"1rem","2xl":"1.5rem","3xl":"2rem"},componentRadius:{button:{sm:"0.5rem",md:"0.75rem",lg:"1rem"},card:{sm:"0.75rem",md:"1rem",lg:"1.25rem",xl:"1.5rem"},input:{sm:"0.5rem",md:"0.75rem",lg:"1rem"},badge:{sm:"0.375rem",md:"0.5rem",lg:"0.75rem"}}}}}]},E=new Map;let H=null,M=null;const v=new Map;function X(t){const e=[],i=[];if(!t||typeof t!="object")return{valid:!1,errors:["Brand must be an object"],warnings:[]};const r=t,s=["id","name","namespace"];for(const o of s)(!(o in r)||!r[o])&&e.push(`Missing required field: ${o}`);if(r.id&&typeof r.id=="string"&&(/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(r.id)||e.push(`Invalid brand ID format: "${r.id}". Must be kebab-case (e.g., "neon-brand")`)),r.namespace&&typeof r.namespace=="string"&&(/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(r.namespace)||e.push(`Invalid namespace format: "${r.namespace}". Must be kebab-case (e.g., "neon")`)),r.themes)if(!Array.isArray(r.themes))e.push("Brand themes must be an array");else{const o=r.themes;o.length===0&&i.push("Brand has no themes defined"),o.forEach((l,a)=>{if(!l||typeof l!="object"){e.push(`Theme at index ${a} must be an object`);return}const n=l;(!n.id||typeof n.id!="string")&&e.push(`Theme at index ${a} is missing required field: id`),(!n.name||typeof n.name!="string")&&e.push(`Theme at index ${a} is missing required field: name`),(!n.mode||!["day","night"].includes(n.mode))&&e.push(`Theme at index ${a} must have mode set to "day" or "night"`),(!n.overrides||typeof n.overrides!="object")&&e.push(`Theme at index ${a} is missing required field: overrides`)})}else e.push("Brand must have at least one theme");if(r.version&&typeof r.version=="string"&&(/^\d+\.\d+\.\d+$/.test(r.version)||i.push(`Invalid version format: "${r.version}". Should be semver (e.g., "1.0.0")`)),r.themes&&Array.isArray(r.themes)){const o=r.themes.map(a=>a==null?void 0:a.id),l=new Set(o);o.length!==l.size&&e.push("Brand contains duplicate theme IDs")}return{valid:e.length===0,errors:e,warnings:i}}function G(t,e){const i=X(t);if(!i.valid)throw new Error(`Invalid brand "${t.id}": ${i.errors.join(", ")}`);if(i.warnings.length>0&&console.warn(`Brand "${t.id}" validation warnings:`,i.warnings.join(", ")),E.has(t.id))throw new Error(`Brand "${t.id}" is already registered`);const r=Array.from(E.values()).find(s=>s.brand.namespace===t.namespace);if(r)throw new Error(`Brand namespace "${t.namespace}" is already used by brand "${r.brand.id}"`);E.set(t.id,{brand:t,enabled:(e==null?void 0:e.enabled)!==!1,loader:e==null?void 0:e.loader})}async function Y(t){if(v.has(t))return v.get(t);const e=E.get(t);if(!e)throw new Error(`Brand "${t}" not found in registry`);if(e.enabled===!1)throw new Error(`Brand "${t}" is disabled`);if(e.loader)try{const r=(await e.loader()).default,s=X(r);if(!s.valid)throw new Error(`Invalid loaded brand "${t}": ${s.errors.join(", ")}`);return v.set(t,r),r}catch(i){throw new Error(`Failed to load brand "${t}": ${i instanceof Error?i.message:String(i)}`)}return v.set(t,e.brand),e.brand}function Z(){return H}function j(t){H=t,M=(t==null?void 0:t.namespace)||null}function le(){H=null,M=null}function de(t,e){return t.themes.find(i=>i.mode===e)}function K(t,e){if(typeof document>"u")return;const i=de(t,e);if(!i){console.warn(`Brand "${t.id}" has no theme for mode "${e}"`);return}const r=document.documentElement,{namespace:s}=t,{overrides:o}=i;o.primaryColors&&Object.entries(o.primaryColors).forEach(([a,n])=>{r.style.setProperty(`--brand-${s}-primary-${a}`,n)}),o.accentColors&&Object.entries(o.accentColors).forEach(([a,n])=>{r.style.setProperty(`--brand-${s}-accent-${a}`,n)}),o.secondaryColors&&Object.entries(o.secondaryColors).forEach(([a,n])=>{r.style.setProperty(`--brand-${s}-secondary-${a}`,n)});const l=e==="day"?o.baseColorsDay:o.baseColorsNight;if(l&&Object.entries(l).forEach(([a,n])=>{r.style.setProperty(`--brand-${s}-${a}`,n)}),o.typography&&(o.typography.fontFamily&&Object.entries(o.typography.fontFamily).forEach(([a,n])=>{r.style.setProperty(`--brand-${s}-font-${a}`,Array.isArray(n)?n.join(", "):n)}),o.typography.fontSize&&Object.entries(o.typography.fontSize).forEach(([a,n])=>{const m=typeof n=="string"?n:n[0];r.style.setProperty(`--brand-${s}-font-size-${a}`,m)}),o.typography.fontWeight&&Object.entries(o.typography.fontWeight).forEach(([a,n])=>{r.style.setProperty(`--brand-${s}-font-weight-${a}`,n)}),o.typography.lineHeight&&Object.entries(o.typography.lineHeight).forEach(([a,n])=>{r.style.setProperty(`--brand-${s}-line-height-${a}`,n)}),o.typography.letterSpacing&&Object.entries(o.typography.letterSpacing).forEach(([a,n])=>{r.style.setProperty(`--brand-${s}-letter-spacing-${a}`,n)})),o.spacing&&(o.spacing.semanticSpacing&&Object.entries(o.spacing.semanticSpacing).forEach(([a,n])=>{r.style.setProperty(`--brand-${s}-spacing-${a}`,n)}),o.spacing.layoutSpacing)){const a=o.spacing.layoutSpacing;a.section&&Object.entries(a.section).forEach(([n,m])=>{typeof m=="string"&&r.style.setProperty(`--brand-${s}-layout-section-${n}`,m)}),a.container&&Object.entries(a.container).forEach(([n,m])=>{typeof m=="string"&&r.style.setProperty(`--brand-${s}-layout-container-${n}`,m)}),a.grid&&Object.entries(a.grid).forEach(([n,m])=>{typeof m=="string"&&r.style.setProperty(`--brand-${s}-layout-grid-${n}`,m)}),a.stack&&Object.entries(a.stack).forEach(([n,m])=>{typeof m=="string"&&r.style.setProperty(`--brand-${s}-layout-stack-${n}`,m)}),a.component&&Object.entries(a.component).forEach(([n,m])=>{typeof m=="string"&&r.style.setProperty(`--brand-${s}-layout-component-${n}`,m)})}if(o.shadows&&(o.shadows.elevationShadows&&Object.entries(o.shadows.elevationShadows).forEach(([a,n])=>{r.style.setProperty(`--brand-${s}-shadow-${a}`,n)}),o.shadows.primaryColoredShadows&&Object.entries(o.shadows.primaryColoredShadows).forEach(([a,n])=>{r.style.setProperty(`--brand-${s}-shadow-primary-${a}`,n)}),o.shadows.accentColoredShadows&&Object.entries(o.shadows.accentColoredShadows).forEach(([a,n])=>{r.style.setProperty(`--brand-${s}-shadow-accent-${a}`,n)}),o.shadows.glowEffects&&Object.entries(o.shadows.glowEffects).forEach(([a,n])=>{r.style.setProperty(`--brand-${s}-glow-${a}`,n)}),o.shadows.focusRings&&Object.entries(o.shadows.focusRings).forEach(([a,n])=>{r.style.setProperty(`--brand-${s}-focus-ring-${a}`,n)})),o.radius&&(o.radius.borderRadius&&Object.entries(o.radius.borderRadius).forEach(([a,n])=>{r.style.setProperty(`--brand-${s}-radius-${a}`,n)}),o.radius.componentRadius)){const{componentRadius:a}=o.radius;a.button&&Object.entries(a.button).forEach(([n,m])=>{r.style.setProperty(`--brand-${s}-radius-button-${n}`,m)}),a.card&&Object.entries(a.card).forEach(([n,m])=>{r.style.setProperty(`--brand-${s}-radius-card-${n}`,m)}),a.input&&Object.entries(a.input).forEach(([n,m])=>{r.style.setProperty(`--brand-${s}-radius-input-${n}`,m)})}j(t),r.setAttribute("data-brand",t.id),r.setAttribute("data-brand-namespace",s)}function ee(t){if(typeof document>"u")return;const e=document.documentElement,{style:i}=e,r=[];for(let s=0;s<i.length;s++){const o=i.item(s);o&&o.startsWith(`--brand-${t}-`)&&r.push(o)}r.forEach(s=>{i.removeProperty(s)}),e.removeAttribute("data-brand"),e.removeAttribute("data-brand-namespace"),M===t&&le()}const pe={default:()=>Promise.resolve().then(()=>require("./default-Ddg7Haf2.cjs")).then(t=>t.defaultTheme),dark:()=>Promise.resolve().then(()=>require("./dark-OOhiqt1q.cjs")).then(t=>t.darkTheme),brand:()=>Promise.resolve().then(()=>require("./brand-DQb18Frh.cjs")).then(t=>t.brandTheme)};async function ye(t){const e=pe[t];if(!e)throw new Error(`Theme "${t}" not found`);return await e()}const te="data-mode",O="data-theme-name",re="data-theme",J="dark";function oe(t="day",e="tm_mode",i=!0){if(typeof window>"u")return t;const r=document.documentElement,s=r.getAttribute(te);if(s==="day"||s==="night")return s;const o=r.getAttribute(re);if(o==="day"||o==="night")return o;try{const l=localStorage.getItem(e);if(l==="day"||l==="night")return l;const a=localStorage.getItem("theme");if(a==="dark")return"night";if(a==="light")return"day"}catch{}return i&&typeof window<"u"?window.matchMedia("(prefers-color-scheme: dark)").matches?"night":"day":t}let S=null;async function se(t){if(t==="default")return S=null,null;try{const e=await ye(t);return S=e,e}catch(e){return console.warn(`Failed to load theme "${t}":`,e),S=null,null}}function k(t,e){return e?{...t,...e}:t}function w(t,e){return e?{...t,...e}:t}function ne(t){const e=S,i=k(x.primaryColors,e==null?void 0:e.primaryColors),r=k(x.accentColors,e==null?void 0:e.accentColors),s=k(x.secondaryColors,e==null?void 0:e.secondaryColors),o={day:w(x.baseColors.day,e==null?void 0:e.baseColorsDay),night:w(x.baseColors.night,e==null?void 0:e.baseColorsNight)},l={day:w(x.surfaceColors.day,e==null?void 0:e.surfaceColorsDay),night:w(x.surfaceColors.night,e==null?void 0:e.surfaceColorsNight)},a={day:w(x.semanticColors.day,e==null?void 0:e.semanticColorsDay),night:w(x.semanticColors.night,e==null?void 0:e.semanticColorsNight)},n={day:w(x.textColors.day,e==null?void 0:e.textColorsDay),night:w(x.textColors.night,e==null?void 0:e.textColorsNight)};return{primaryColors:i,accentColors:r,secondaryColors:s,baseColors:o,surfaceColors:l,semanticColors:a,textColors:n}}function ge(t){if(typeof document>"u")return;const e=document.documentElement,i=ne(),{primaryColors:r,accentColors:s,secondaryColors:o,baseColors:l,surfaceColors:a,semanticColors:n,textColors:m}=i,p=l[t];e.style.setProperty("--background",p.background),e.style.setProperty("--foreground",p.foreground),e.style.setProperty("--card",p.card),e.style.setProperty("--card-foreground",p.cardForeground),e.style.setProperty("--popover",p.popover),e.style.setProperty("--popover-foreground",p.popoverForeground),e.style.setProperty("--border",p.border),e.style.setProperty("--input",p.input),e.style.setProperty("--ring",p.ring);const y=a[t];e.style.setProperty("--surface-base",y.base),e.style.setProperty("--surface-elevated1",y.elevated1),e.style.setProperty("--surface-elevated2",y.elevated2),e.style.setProperty("--surface-elevated3",y.elevated3),e.style.setProperty("--surface-overlay",y.overlay),e.style.setProperty("--surface-glass",y.glass);const h=n[t];e.style.setProperty("--semantic-success",h.success),e.style.setProperty("--semantic-success-foreground",h.successForeground),e.style.setProperty("--semantic-error",h.error),e.style.setProperty("--semantic-error-foreground",h.errorForeground),e.style.setProperty("--semantic-warning",h.warning),e.style.setProperty("--semantic-warning-foreground",h.warningForeground),e.style.setProperty("--semantic-info",h.info),e.style.setProperty("--semantic-info-foreground",h.infoForeground);const f=m[t];e.style.setProperty("--text-primary",f.primary),e.style.setProperty("--text-secondary",f.secondary),e.style.setProperty("--text-tertiary",f.tertiary),e.style.setProperty("--text-muted",f.muted),e.style.setProperty("--text-inverse",f.inverse),e.style.setProperty("--primary-50",r[50]),e.style.setProperty("--primary-100",r[100]),e.style.setProperty("--primary-200",r[200]),e.style.setProperty("--primary-300",r[300]),e.style.setProperty("--primary-400",r[400]),e.style.setProperty("--primary-500",r[500]),e.style.setProperty("--primary-600",r[600]),e.style.setProperty("--primary-700",r[700]),e.style.setProperty("--primary-800",r[800]),e.style.setProperty("--primary-900",r[900]),e.style.setProperty("--primary-950",r[950]),e.style.setProperty("--accent-50",s[50]),e.style.setProperty("--accent-100",s[100]),e.style.setProperty("--accent-200",s[200]),e.style.setProperty("--accent-300",s[300]),e.style.setProperty("--accent-400",s[400]),e.style.setProperty("--accent-500",s[500]),e.style.setProperty("--accent-600",s[600]),e.style.setProperty("--accent-700",s[700]),e.style.setProperty("--accent-800",s[800]),e.style.setProperty("--accent-900",s[900]),e.style.setProperty("--accent-950",s[950]),e.style.setProperty("--secondary-50",o[50]),e.style.setProperty("--secondary-100",o[100]),e.style.setProperty("--secondary-200",o[200]),e.style.setProperty("--secondary-300",o[300]),e.style.setProperty("--secondary-400",o[400]),e.style.setProperty("--secondary-500",o[500]),e.style.setProperty("--secondary-600",o[600]),e.style.setProperty("--secondary-700",o[700]),e.style.setProperty("--secondary-800",o[800]),e.style.setProperty("--secondary-900",o[900]),e.style.setProperty("--secondary-950",o[950]),t==="day"?(e.style.setProperty("--tm-primary",o[500]),e.style.setProperty("--tm-primary-foreground","0 0% 100%"),e.style.setProperty("--tm-secondary","0 0% 95.7%"),e.style.setProperty("--tm-secondary-foreground","0 0% 6.7%"),e.style.setProperty("--tm-accent","0 0% 89.8%"),e.style.setProperty("--tm-accent-foreground","0 0% 6.7%")):(e.style.setProperty("--tm-primary",s[500]),e.style.setProperty("--tm-primary-foreground","0 0% 100%"),e.style.setProperty("--tm-secondary","240 10% 7%"),e.style.setProperty("--tm-secondary-foreground","0 0% 89.8%"),e.style.setProperty("--tm-accent","240 10% 10%"),e.style.setProperty("--tm-accent-foreground","0 0% 89.8%")),e.style.setProperty("--muted",p.card),e.style.setProperty("--muted-foreground",p.cardForeground),e.style.setProperty("--destructive",h.error),e.style.setProperty("--destructive-foreground",h.errorForeground),Object.entries(x.motionCSSVariables).forEach(([$,b])=>{e.style.setProperty($,b)})}async function P(t,e="default",i=null){if(typeof document>"u")return;await se(e);const r=Z();if(r&&(!i||r.id!==i)&&ee(r.namespace),i)try{const m=await Y(i);K(m,t)}catch(m){console.warn(`Failed to apply brand "${i}":`,m)}const{documentElement:s,body:o}=document;s.setAttribute(te,t),s.setAttribute(re,t),s.setAttribute(O,e),t==="night"?s.classList.add(J):s.classList.remove(J),ge(t);const l=ne(),{background:a,foreground:n}=l.baseColors[t];o&&(o.dataset.mode=t,o.dataset.theme=e,i?o.dataset.brand=i:o.removeAttribute("data-brand"),o.style.backgroundColor=`hsl(${a})`,o.style.color=`hsl(${n})`)}async function ue(t){if(typeof document<"u"){const e=document.documentElement,i=e.getAttribute(O)||"default",r=e.getAttribute("data-brand")||null;await P(t,i,r)}else await P(t,"default",null)}function B(t="default",e="tm_theme"){if(typeof window>"u")return t;const r=document.documentElement.getAttribute(O);if(r==="default"||r==="dark"||r==="brand")return r;try{const s=localStorage.getItem(e);if(s==="default"||s==="dark"||s==="brand")return s}catch{}return t}function A(t,e="tm_mode"){if(!(typeof window>"u"))try{localStorage.setItem(e,t),localStorage.setItem("theme",t==="night"?"dark":"light")}catch{}}function R(t,e="tm_theme"){if(!(typeof window>"u"))try{localStorage.setItem(e,t)}catch{}}function D(t=null,e="tm_brand"){if(typeof window>"u")return t;const r=document.documentElement.getAttribute("data-brand");if(r)return r;try{const s=localStorage.getItem(e);if(s)return s}catch{}return t}function F(t,e="tm_brand"){if(!(typeof window>"u"))try{t?localStorage.setItem(e,t):localStorage.removeItem(e)}catch{}}const _=d.createContext(void 0);function fe(t){if(t!==void 0)return t;if(typeof window>"u")return!1;try{return window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch{return!1}}function he({children:t,defaultMode:e="day",defaultTheme:i="default",defaultBrand:r=null,storageKey:s="tm_mode",themeStorageKey:o="tm_theme",brandStorageKey:l="tm_brand",attribute:a="data-mode",enableSystem:n=!0,reduceMotion:m,enableAnimations:p=!0}){d.useEffect(()=>{try{G(me)}catch(c){console.warn("Failed to register neon brand:",c)}try{G(ce)}catch(c){console.warn("Failed to register minimal brand:",c)}},[]);const[y,h]=d.useState(()=>{if(typeof window>"u")return e;const g=document.documentElement.getAttribute(a);if(g==="day"||g==="night")return g;try{const u=localStorage.getItem(s);if(u==="day"||u==="night")return u}catch{}return n&&typeof window<"u"?window.matchMedia("(prefers-color-scheme: dark)").matches?"night":"day":e}),[f,$]=d.useState(()=>typeof window>"u"?i:B(i,o)),[b,I]=d.useState(()=>typeof window>"u"?r:D(r,l)),[q,T]=d.useState(()=>fe(m)),[z,N]=d.useState(()=>p),C=d.useCallback(c=>{h(c),P(c,f,b),A(c,s)},[f,b,s]),L=d.useCallback(async c=>{$(c),await P(y,c,b),R(c,o)},[y,b,o]),W=d.useCallback(async c=>{const g=Z();if(g&&ee(g.namespace),I(c),F(c,l),c)try{const u=await Y(c);K(u,y)}catch(u){console.error(`Failed to load brand "${c}":`,u),j(null)}else j(null);await P(y,f,c)},[y,f,l]),U=d.useCallback(()=>{C(y==="night"?"day":"night")},[y,C]),V=d.useCallback(c=>{T(c);try{localStorage.setItem("tm_reduce_motion",c?"true":"false")}catch{}},[]),Q=d.useCallback(c=>{N(c);try{localStorage.setItem("tm_enable_animations",c?"true":"false")}catch{}},[]);d.useEffect(()=>{if(m!==void 0)return;const c=window.matchMedia("(prefers-reduced-motion: reduce)"),g=u=>{T(u.matches)};return c.addEventListener("change",g),()=>c.removeEventListener("change",g)},[m]),d.useEffect(()=>{if(m===void 0)try{const c=localStorage.getItem("tm_reduce_motion");(c==="true"||c==="false")&&T(c==="true")}catch{}if(p===void 0)try{const c=localStorage.getItem("tm_enable_animations");(c==="true"||c==="false")&&N(c==="true")}catch{}},[m,p]),d.useEffect(()=>{const c=oe(e,s,n),g=B(i,o),u=D(r,l);h(c),$(g),I(u),P(c,g,u),A(c,s),R(g,o),F(u,l)},[e,i,r,s,o,l,n]),d.useEffect(()=>{if(!n)return;const c=window.matchMedia("(prefers-color-scheme: dark)"),g=u=>{try{localStorage.getItem(s)||C(u.matches?"night":"day")}catch{}};return c.addEventListener("change",g),()=>c.removeEventListener("change",g)},[n,s,C]),d.useEffect(()=>{P(y,f,b)},[y,f,b]);const ae=d.useMemo(()=>({mode:y,theme:f,brand:b,reduceMotion:m!==void 0?m:q,enableAnimations:p!==void 0?p:z,setMode:C,setTheme:L,setBrand:W,toggleMode:U,setReduceMotion:V,setEnableAnimations:Q}),[y,f,b,q,z,m,p,C,L,W,U,V,Q]);return ie.jsx(_.Provider,{value:ae,children:t})}function xe(){const t=d.useContext(_);if(t===void 0)throw new Error("useTheme must be used within a ThemeProvider");return t}exports.ThemeContext=_;exports.ThemeProvider=he;exports.applyDocumentMode=ue;exports.applyDocumentTheme=P;exports.getInitialBrand=D;exports.getInitialMode=oe;exports.getInitialTheme=B;exports.loadThemeOverride=se;exports.persistBrand=F;exports.persistMode=A;exports.persistTheme=R;exports.useTheme=xe;
|