@classic-homes/theme-svelte 0.1.34 → 0.1.36
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 +35 -0
- package/dist/lib/components/layout/ErrorLayout.svelte +4 -1
- package/dist/lib/components/layout/ErrorLayout.svelte.d.ts +2 -0
- package/dist/lib/components/layout/PublicLayout.svelte +4 -1
- package/dist/lib/components/layout/PublicLayout.svelte.d.ts +2 -0
- package/dist/lib/components/notifications/index.d.ts +5 -1
- package/dist/lib/components/notifications/index.js +5 -1
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.js +5 -2
- package/package.json +13 -2
package/README.md
CHANGED
|
@@ -107,6 +107,41 @@ Or in your root layout:
|
|
|
107
107
|
- `LogoMain` - Main logo component
|
|
108
108
|
- `LoadingLogo` - Animated loading logo
|
|
109
109
|
|
|
110
|
+
### Notification Components (Optional)
|
|
111
|
+
|
|
112
|
+
Notification UI components are available via a separate entry point. This makes the `@classic-homes/notifications` dependency optional - you only need it if you use these components.
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
# Install the notifications package if using notification components
|
|
116
|
+
npm install @classic-homes/notifications
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
```svelte
|
|
120
|
+
<script>
|
|
121
|
+
// Import notification components from the /notifications subpath
|
|
122
|
+
import {
|
|
123
|
+
NotificationList,
|
|
124
|
+
NotificationItem,
|
|
125
|
+
NotificationBadge,
|
|
126
|
+
NotificationDialog,
|
|
127
|
+
NotificationFilters,
|
|
128
|
+
NotificationBulkActions,
|
|
129
|
+
} from '@classic-homes/theme-svelte/notifications';
|
|
130
|
+
|
|
131
|
+
// Import types and utilities from the notifications package
|
|
132
|
+
import type { Notification } from '@classic-homes/notifications/core';
|
|
133
|
+
</script>
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Available notification components:
|
|
137
|
+
|
|
138
|
+
- `NotificationBadge` - Unread count badge
|
|
139
|
+
- `NotificationItem` - Single notification card
|
|
140
|
+
- `NotificationList` - List of notifications with empty state
|
|
141
|
+
- `NotificationDialog` - Detail dialog for a notification
|
|
142
|
+
- `NotificationFilters` - Filter tabs (all/read/unread)
|
|
143
|
+
- `NotificationBulkActions` - Bulk action toolbar
|
|
144
|
+
|
|
110
145
|
## Error Handling
|
|
111
146
|
|
|
112
147
|
### Overview
|
|
@@ -38,6 +38,8 @@
|
|
|
38
38
|
homeUrl?: string;
|
|
39
39
|
/** Home button text */
|
|
40
40
|
homeText?: string;
|
|
41
|
+
/** URL for logo link (defaults to '/') */
|
|
42
|
+
logoHref?: string;
|
|
41
43
|
/** Show "Go Back" button */
|
|
42
44
|
showBackButton?: boolean;
|
|
43
45
|
/** Go back button text */
|
|
@@ -63,6 +65,7 @@
|
|
|
63
65
|
showHomeButton = true,
|
|
64
66
|
homeUrl = '/',
|
|
65
67
|
homeText = 'Go Home',
|
|
68
|
+
logoHref = '/',
|
|
66
69
|
showBackButton = true,
|
|
67
70
|
backText = 'Go Back',
|
|
68
71
|
illustration,
|
|
@@ -138,7 +141,7 @@
|
|
|
138
141
|
{#if logo}
|
|
139
142
|
{@render logo()}
|
|
140
143
|
{:else}
|
|
141
|
-
<a href=
|
|
144
|
+
<a href={logoHref} class="block">
|
|
142
145
|
<LogoMain variant="horizontal" color="dark" size="md" />
|
|
143
146
|
</a>
|
|
144
147
|
{/if}
|
|
@@ -40,6 +40,8 @@
|
|
|
40
40
|
darkFooter?: boolean;
|
|
41
41
|
/** Header search configuration */
|
|
42
42
|
headerSearch?: HeaderSearchConfig;
|
|
43
|
+
/** URL for logo link (defaults to '/') */
|
|
44
|
+
logoHref?: string;
|
|
43
45
|
/** Main content */
|
|
44
46
|
children: Snippet;
|
|
45
47
|
}
|
|
@@ -56,6 +58,7 @@
|
|
|
56
58
|
strongFooterBorder = false,
|
|
57
59
|
darkFooter = false,
|
|
58
60
|
headerSearch,
|
|
61
|
+
logoHref = '/',
|
|
59
62
|
children,
|
|
60
63
|
}: Props = $props();
|
|
61
64
|
|
|
@@ -74,7 +77,7 @@
|
|
|
74
77
|
search={headerSearch}
|
|
75
78
|
>
|
|
76
79
|
{#snippet start()}
|
|
77
|
-
<a href=
|
|
80
|
+
<a href={logoHref} class="flex items-center">
|
|
78
81
|
{#if logo}
|
|
79
82
|
{@render logo()}
|
|
80
83
|
{:else}
|
|
@@ -4,9 +4,13 @@
|
|
|
4
4
|
* UI components for displaying and managing notifications.
|
|
5
5
|
* Used in conjunction with @classic-homes/notifications for data and API.
|
|
6
6
|
*
|
|
7
|
+
* These components are available via a separate entry point to make the
|
|
8
|
+
* @classic-homes/notifications dependency optional.
|
|
9
|
+
*
|
|
7
10
|
* @example
|
|
8
11
|
* ```svelte
|
|
9
12
|
* <script>
|
|
13
|
+
* // Import from the /notifications subpath
|
|
10
14
|
* import {
|
|
11
15
|
* NotificationList,
|
|
12
16
|
* NotificationItem,
|
|
@@ -14,7 +18,7 @@
|
|
|
14
18
|
* NotificationDialog,
|
|
15
19
|
* NotificationFilters,
|
|
16
20
|
* NotificationBulkActions,
|
|
17
|
-
* } from '@classic-homes/theme-svelte';
|
|
21
|
+
* } from '@classic-homes/theme-svelte/notifications';
|
|
18
22
|
* import { notificationsApi, type Notification } from '@classic-homes/notifications/core';
|
|
19
23
|
*
|
|
20
24
|
* let notifications = $state<Notification[]>([]);
|
|
@@ -4,9 +4,13 @@
|
|
|
4
4
|
* UI components for displaying and managing notifications.
|
|
5
5
|
* Used in conjunction with @classic-homes/notifications for data and API.
|
|
6
6
|
*
|
|
7
|
+
* These components are available via a separate entry point to make the
|
|
8
|
+
* @classic-homes/notifications dependency optional.
|
|
9
|
+
*
|
|
7
10
|
* @example
|
|
8
11
|
* ```svelte
|
|
9
12
|
* <script>
|
|
13
|
+
* // Import from the /notifications subpath
|
|
10
14
|
* import {
|
|
11
15
|
* NotificationList,
|
|
12
16
|
* NotificationItem,
|
|
@@ -14,7 +18,7 @@
|
|
|
14
18
|
* NotificationDialog,
|
|
15
19
|
* NotificationFilters,
|
|
16
20
|
* NotificationBulkActions,
|
|
17
|
-
* } from '@classic-homes/theme-svelte';
|
|
21
|
+
* } from '@classic-homes/theme-svelte/notifications';
|
|
18
22
|
* import { notificationsApi, type Notification } from '@classic-homes/notifications/core';
|
|
19
23
|
*
|
|
20
24
|
* let notifications = $state<Notification[]>([]);
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -62,6 +62,7 @@ export { default as AuthLayout } from './components/layout/AuthLayout.svelte';
|
|
|
62
62
|
export { default as ErrorLayout } from './components/layout/ErrorLayout.svelte';
|
|
63
63
|
export { default as FormPageLayout } from './components/layout/FormPageLayout.svelte';
|
|
64
64
|
export { default as Sidebar } from './components/layout/Sidebar.svelte';
|
|
65
|
+
export { SidebarNavItem, SidebarSection, SidebarSearch, SidebarFlyout, } from './components/layout/sidebar/index.js';
|
|
65
66
|
export { default as Header } from './components/layout/Header.svelte';
|
|
66
67
|
export { default as Footer } from './components/layout/Footer.svelte';
|
|
67
68
|
export { default as QuickLinks } from './components/layout/QuickLinks.svelte';
|
|
@@ -79,4 +80,3 @@ export { perfStart, perfEnd, measure, measureAsync, getPerformanceEntries, clear
|
|
|
79
80
|
export { useForm, useAsync, runAsync, usePersistedForm, type UseFormOptions, type UseFormReturn, type FieldError, type FormState, type InferFormData, type UseAsyncOptions, type UseAsyncReturn, type UsePersistedFormOptions, type UsePersistedFormReturn, type InferPersistedFormData, } from './composables/index.js';
|
|
80
81
|
export * from './schemas/index.js';
|
|
81
82
|
export { type Notice, type NoticeConfig, type NoticeLocation, type NoticeVariant, type NoticePage, type ActiveNotice, NoticeSchema, NoticeLinkSchema, validateNotice, validateNotices, initializeNotices, setCurrentPath, dismissNotice, clearDismissedNotices, isNoticeDismissed, activeNotices, bannerNotices, cardNotices, getNoticesForPage, refreshNotices, cleanupDismissedNotices, isNoticeActive, isNoticeForPage, isNoticeForLocation, sanitizeHtml, initSanitizer, NoticeBanner, NoticeCard, } from './notices/index.js';
|
|
82
|
-
export { NotificationItem, NotificationList, NotificationBadge, NotificationDialog, NotificationFilters, NotificationBulkActions, } from './components/notifications/index.js';
|
package/dist/lib/index.js
CHANGED
|
@@ -81,6 +81,8 @@ export { default as AuthLayout } from './components/layout/AuthLayout.svelte';
|
|
|
81
81
|
export { default as ErrorLayout } from './components/layout/ErrorLayout.svelte';
|
|
82
82
|
export { default as FormPageLayout } from './components/layout/FormPageLayout.svelte';
|
|
83
83
|
export { default as Sidebar } from './components/layout/Sidebar.svelte';
|
|
84
|
+
// Sidebar Subcomponents - for custom sidebar implementations
|
|
85
|
+
export { SidebarNavItem, SidebarSection, SidebarSearch, SidebarFlyout, } from './components/layout/sidebar/index.js';
|
|
84
86
|
export { default as Header } from './components/layout/Header.svelte';
|
|
85
87
|
export { default as Footer } from './components/layout/Footer.svelte';
|
|
86
88
|
export { default as QuickLinks } from './components/layout/QuickLinks.svelte';
|
|
@@ -115,5 +117,6 @@ initializeNotices, setCurrentPath, dismissNotice, clearDismissedNotices, isNotic
|
|
|
115
117
|
sanitizeHtml, initSanitizer,
|
|
116
118
|
// Components
|
|
117
119
|
NoticeBanner, NoticeCard, } from './notices/index.js';
|
|
118
|
-
// Notification Components -
|
|
119
|
-
|
|
120
|
+
// Notification Components - available via '@classic-homes/theme-svelte/notifications'
|
|
121
|
+
// Import separately to avoid requiring @classic-homes/notifications as a dependency
|
|
122
|
+
// Example: import { NotificationList } from '@classic-homes/theme-svelte/notifications';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@classic-homes/theme-svelte",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.36",
|
|
4
4
|
"description": "Svelte components for the Classic theme system",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"svelte": "./dist/lib/index.js",
|
|
@@ -11,6 +11,11 @@
|
|
|
11
11
|
"svelte": "./dist/lib/index.js",
|
|
12
12
|
"default": "./dist/lib/index.js"
|
|
13
13
|
},
|
|
14
|
+
"./notifications": {
|
|
15
|
+
"types": "./dist/lib/components/notifications/index.d.ts",
|
|
16
|
+
"svelte": "./dist/lib/components/notifications/index.js",
|
|
17
|
+
"default": "./dist/lib/components/notifications/index.js"
|
|
18
|
+
},
|
|
14
19
|
"./styles.css": "./dist/styles.css"
|
|
15
20
|
},
|
|
16
21
|
"files": [
|
|
@@ -39,7 +44,13 @@
|
|
|
39
44
|
"access": "public"
|
|
40
45
|
},
|
|
41
46
|
"peerDependencies": {
|
|
42
|
-
"svelte": "^5.0.0"
|
|
47
|
+
"svelte": "^5.0.0",
|
|
48
|
+
"@classic-homes/notifications": "*"
|
|
49
|
+
},
|
|
50
|
+
"peerDependenciesMeta": {
|
|
51
|
+
"@classic-homes/notifications": {
|
|
52
|
+
"optional": true
|
|
53
|
+
}
|
|
43
54
|
},
|
|
44
55
|
"dependencies": {
|
|
45
56
|
"@classic-homes/theme-tokens": "*",
|