@saasicat/ui-vue 0.22.2 → 0.23.0
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 +1 -1
- package/dist/{chunk-LY52T4N4.js → chunk-TQQMKWN6.js} +58 -1
- package/dist/index.cjs +213 -159
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +7 -1
- package/dist/quasar/index.cjs +116 -20
- package/dist/quasar/index.d.cts +48 -3
- package/dist/quasar/index.d.ts +48 -3
- package/dist/quasar/index.js +58 -3
- package/dist/{use-super-admin-i18n-CgTuNi8h.d.cts → use-sa-theme-B5t7oXph.d.cts} +51 -1
- package/dist/{use-super-admin-i18n-CHNdsSlm.d.ts → use-sa-theme-OUBlaqgl.d.ts} +51 -1
- package/package.json +5 -2
- package/src/components/BundleVersionPublishDialog.vue +17 -17
- package/src/components/KvBlock.vue +6 -6
- package/src/components/MarketingPromotionsTab.vue +78 -78
- package/src/components/MfaPromptDialog.vue +2 -2
- package/src/components/TenantActionConfirmDialog.vue +5 -5
- package/src/components/VersionDiffPreview.vue +18 -18
- package/src/components/bundle-editor/BundleCreatePanel.vue +52 -52
- package/src/components/bundle-editor/BundleFeaturesEditor.vue +20 -20
- package/src/components/bundle-editor/BundlePlanCompatPicker.vue +33 -33
- package/src/components/bundle-editor/BundleQuotasEditor.vue +26 -26
- package/src/components/bundle-editor/BundleStatusBanner.vue +21 -21
- package/src/components/bundle-editor/BundleVersionInlineEditor.vue +48 -48
- package/src/components/bundle-editor/BundleVersionStrip.vue +30 -30
- package/src/components/dialogs/PilotCreateDialog.vue +20 -20
- package/src/components/dialogs/PilotEditDialog.vue +6 -6
- package/src/components/dialogs/PromoCodeCreateDialog.vue +9 -9
- package/src/components/dialogs/PromoCodeDialogFields.vue +61 -61
- package/src/components/dialogs/PromoCodeEditDialog.vue +11 -11
- package/src/components/dialogs/pilot-dialog.css +48 -48
- package/src/components/plan/PlanCycleToggle.vue +9 -16
- package/src/components/plan/PlanGrid.vue +30 -34
- package/src/components/plan/PriceSummary.vue +35 -35
- package/src/components/plan/PromoCodeInput.vue +26 -26
- package/src/components/plan/PublicBundleGrid.vue +32 -28
- package/src/components/plan-create-dialog/PlanCreateDialog.vue +49 -49
- package/src/components/plan-detail/PlanDetail.vue +172 -156
- package/src/components/plan-detail/PlanTitleEdit.vue +11 -11
- package/src/components/plan-list/PlanList.vue +98 -77
- package/src/components/plan-matrix/PlanMatrix.vue +89 -89
- package/src/components/plan-review/PlanReview.vue +60 -56
- package/src/components/plan-version-editor/PlanVersionEditor.vue +224 -200
- package/src/components/wizard-stepper/WizardStepper.vue +17 -17
- package/src/index.ts +1 -0
- package/src/pages-standard/AdminLayout.vue +58 -37
- package/src/pages-standard/AdminManifestErrorPage.vue +6 -6
- package/src/pages-standard/AuditPage.vue +3 -3
- package/src/pages-standard/BundlesPage.vue +36 -36
- package/src/pages-standard/DashboardPage.vue +17 -17
- package/src/pages-standard/DiscoveryPage.vue +55 -49
- package/src/pages-standard/EmailHistoryPage.vue +53 -71
- package/src/pages-standard/MarketingCatalogPage.vue +226 -218
- package/src/pages-standard/PilotsPage.vue +7 -6
- package/src/pages-standard/PlatformEmailPage.vue +18 -18
- package/src/pages-standard/PromoCodeDetailPage.vue +3 -3
- package/src/pages-standard/PromoCodesPage.vue +7 -6
- package/src/pages-standard/SuperAdminLoginPage.vue +39 -25
- package/src/pages-standard/SuperAdminSetupWizard.vue +44 -33
- package/src/pages-standard/TenantDetailPage.vue +7 -7
- package/src/pages-standard/TenantsPage.vue +11 -46
- package/src/pages-standard/bundles-page/BundleAccordionList.vue +13 -13
- package/src/pages-standard/discovery-page/CatalogEntryTransPanel.vue +24 -24
- package/src/pages-standard/discovery-page/DiscoveryCapList.vue +22 -22
- package/src/pages-standard/discovery-page/DiscoveryFeatureCard.vue +39 -39
- package/src/pages-standard/discovery-page/DiscoveryQuotaCard.vue +26 -26
- package/src/pages-standard/discovery-page/DiscoveryStatusControl.vue +1 -1
- package/src/pages-standard/plan-versions/PlanDiffCard.vue +16 -16
- package/src/pages-standard/plan-versions/PlanVersionsDiff.vue +21 -15
- package/src/pages-standard/plan-versions/PlanVersionsTimeline.vue +45 -45
- package/src/pages-standard/plans-page/PlanBundleOverview.vue +21 -15
- package/src/pages-standard/plans-page/PlanPublishDialog.vue +4 -4
- package/src/pages-standard/plans-page/PlansPageToast.vue +6 -6
- package/src/pages-standard/sa-theme.css +9 -687
- package/src/pages-standard/tenants/StatusPill.vue +13 -13
- package/src/pages-tenant/LimitsRow.vue +4 -4
- package/src/pages-tenant/MySubscriptionBundlesPage.vue +61 -61
- package/src/pages-tenant/OnboardingConfigurator.vue +24 -24
- package/src/pages-tenant/PackageSnapshotPanel.vue +10 -16
- package/src/pages-tenant/PendingVersionBanner.vue +12 -12
- package/src/pages-tenant/PlanChangeWizard.vue +20 -27
- package/src/pages-tenant/TenantPlanSection.vue +13 -21
- package/src/pages-tenant/UsageBar.vue +7 -7
- package/src/pages-tenant/tenant-plan-section/BundlePreviewDialog.vue +14 -14
- package/src/pages-tenant/tenant-plan-section/TenantBundleStore.vue +10 -10
- package/src/pages-tenant/tenant-plan-section/TenantFeatureMatrix.vue +2 -2
- package/src/quasar/create-super-admin-app.ts +96 -1
- package/src/quasar/dark-bridge.ts +66 -0
- package/src/quasar/index.ts +1 -0
- package/src/ui/theme/_breakpoints.scss +28 -0
- package/src/ui/theme/base.css +50 -0
- package/src/ui/theme/components/body.css +23 -0
- package/src/ui/theme/components/button.css +158 -0
- package/src/ui/theme/components/card.css +48 -0
- package/src/ui/theme/components/field.css +38 -0
- package/src/ui/theme/components/hero.css +46 -0
- package/src/ui/theme/components/paginator.css +63 -0
- package/src/ui/theme/components/section.css +67 -0
- package/src/ui/theme/components/statistics.css +189 -0
- package/src/ui/theme/components/table.css +60 -0
- package/src/ui/theme/index.css +42 -0
- package/src/ui/theme/tokens.legacy.css +147 -0
- package/src/ui/theme/tokens.primitive.css +108 -0
- package/src/ui/theme/tokens.scale.css +103 -0
- package/src/ui/theme/tokens.semantic.dark.css +173 -0
- package/src/ui/theme/tokens.semantic.light.css +212 -0
- package/src/vue/use-sa-theme.ts +154 -0
package/README.md
CHANGED
|
@@ -98,7 +98,7 @@ own call: `i18n.locales` narrows the set, `i18n.additionalLocales` adds
|
|
|
98
98
|
languages the platform does not ship, `i18n.overrides` replaces individual
|
|
99
99
|
strings, and `i18n.switcher: false` drops the control entirely. Components read
|
|
100
100
|
the catalog via `useSaMessages('<namespace>')` / `useSuperAdminI18n()`.
|
|
101
|
-
See [handbook §8.
|
|
101
|
+
See [handbook §8.7](https://github.com/uelker70/saasicat/blob/main/docs/handbook.md#87-ui-language-i18n).
|
|
102
102
|
|
|
103
103
|
## Build
|
|
104
104
|
|
|
@@ -125,6 +125,60 @@ function useSaMessages(namespace) {
|
|
|
125
125
|
return computed(() => messages.value[namespace]);
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
+
// src/vue/use-sa-theme.ts
|
|
129
|
+
import {
|
|
130
|
+
computed as computed2,
|
|
131
|
+
inject as inject2,
|
|
132
|
+
isRef as isRef2,
|
|
133
|
+
ref as ref2,
|
|
134
|
+
watch as watch2
|
|
135
|
+
} from "vue";
|
|
136
|
+
var SCHEMES = ["light", "dark", "system"];
|
|
137
|
+
var STORAGE_KEY = "saasicat.theme.scheme";
|
|
138
|
+
function isScheme(value) {
|
|
139
|
+
return typeof value === "string" && SCHEMES.includes(value);
|
|
140
|
+
}
|
|
141
|
+
function systemScheme() {
|
|
142
|
+
const value = ref2("light");
|
|
143
|
+
if (typeof window === "undefined" || typeof window.matchMedia !== "function") {
|
|
144
|
+
return { value, unsubscribe: () => {
|
|
145
|
+
} };
|
|
146
|
+
}
|
|
147
|
+
const query = window.matchMedia("(prefers-color-scheme: dark)");
|
|
148
|
+
value.value = query.matches ? "dark" : "light";
|
|
149
|
+
const onChange = (event) => {
|
|
150
|
+
value.value = event.matches ? "dark" : "light";
|
|
151
|
+
};
|
|
152
|
+
query.addEventListener("change", onChange);
|
|
153
|
+
return { value, unsubscribe: () => query.removeEventListener("change", onChange) };
|
|
154
|
+
}
|
|
155
|
+
function createSaTheme(options = {}) {
|
|
156
|
+
const storage = options.storage ?? defaultKvStore();
|
|
157
|
+
const persist = options.persist !== false;
|
|
158
|
+
const provided = options.scheme;
|
|
159
|
+
const appOwnsIt = isRef2(provided);
|
|
160
|
+
const stored = persist && !appOwnsIt ? storage.get(STORAGE_KEY) : null;
|
|
161
|
+
const scheme = isRef2(provided) ? provided : ref2(isScheme(stored) ? stored : provided ?? "system");
|
|
162
|
+
const { value: system, unsubscribe } = systemScheme();
|
|
163
|
+
const stopPersisting = persist && !appOwnsIt ? watch2(scheme, (next) => storage.set(STORAGE_KEY, next)) : null;
|
|
164
|
+
return {
|
|
165
|
+
scheme,
|
|
166
|
+
resolved: computed2(() => scheme.value === "system" ? system.value : scheme.value),
|
|
167
|
+
dispose: () => {
|
|
168
|
+
unsubscribe();
|
|
169
|
+
stopPersisting?.();
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
var SA_THEME_KEY = /* @__PURE__ */ Symbol.for("@saasicat/ui-vue/SA_THEME");
|
|
174
|
+
var fallbackTheme = null;
|
|
175
|
+
function useSaTheme() {
|
|
176
|
+
const injected = inject2(SA_THEME_KEY, null);
|
|
177
|
+
if (injected) return injected;
|
|
178
|
+
fallbackTheme ??= createSaTheme({ persist: false });
|
|
179
|
+
return fallbackTheme;
|
|
180
|
+
}
|
|
181
|
+
|
|
128
182
|
export {
|
|
129
183
|
SUPER_ADMIN_BRAND_KEY,
|
|
130
184
|
SUPER_ADMIN_ENDPOINTS_KEY,
|
|
@@ -140,5 +194,8 @@ export {
|
|
|
140
194
|
SUPER_ADMIN_I18N_KEY,
|
|
141
195
|
createSuperAdminI18n,
|
|
142
196
|
useSuperAdminI18n,
|
|
143
|
-
useSaMessages
|
|
197
|
+
useSaMessages,
|
|
198
|
+
createSaTheme,
|
|
199
|
+
SA_THEME_KEY,
|
|
200
|
+
useSaTheme
|
|
144
201
|
};
|