@umituz/web-dashboard 11.5.0 → 11.6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/web-dashboard",
3
- "version": "11.5.0",
3
+ "version": "11.6.1",
4
4
  "description": "Installable app skeleton for the fleet — layouts, analytics (dependency-free SVG charts), calendar, onboarding flow permissions/module registry; udb-* stylesheet on design-system tokens",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -1,5 +1,5 @@
1
1
  import { useCallback, useEffect, useMemo, useRef } from 'react';
2
- import type { OnboardingScreen } from '../types/screens';
2
+ import type { OnboardingScreen, ValueDeliveryScreenConfig } from '../types/screens';
3
3
  import type { OnboardingConfig } from '../types/config';
4
4
  import { useOnboardingProgress } from '../hooks/useOnboardingProgress';
5
5
  import { useOnboardingAnalytics } from '../hooks/useOnboardingAnalytics';
@@ -111,8 +111,18 @@ function renderScreen(
111
111
  return <ProcessingScreen config={screen} onComplete={(data) => onStepCompleted(data)} />;
112
112
  case 'app-demo':
113
113
  return <AppDemoScreen config={screen} onNext={(data) => onStepCompleted(data)} />;
114
- case 'value-delivery':
115
- return <ValueDeliveryScreen config={screen} onNext={() => onStepCompleted(undefined)} />;
114
+ case 'value-delivery': {
115
+ const deliveryConfig = screen as ValueDeliveryScreenConfig;
116
+ const resolvedItems = deliveryConfig.itemsFromCollected
117
+ ? deliveryConfig.itemsFromCollected(progress.collected)
118
+ : deliveryConfig.items;
119
+ return (
120
+ <ValueDeliveryScreen
121
+ config={{ ...screen, items: resolvedItems } as typeof screen}
122
+ onNext={() => onStepCompleted(undefined)}
123
+ />
124
+ );
125
+ }
116
126
  case 'account-gate':
117
127
  return <AccountGateScreen config={screen} onNext={(data) => onStepCompleted(data)} />;
118
128
  case 'paywall':
@@ -133,6 +133,7 @@ export type ValueDeliveryScreenConfig<TResult = unknown> = BaseScreen<
133
133
  title: string;
134
134
  result: TResult;
135
135
  items?: ReadonlyArray<ValueDeliveryItem>;
136
+ itemsFromCollected?: (collected: Record<string, unknown>) => ReadonlyArray<ValueDeliveryItem>;
136
137
  shareConfig?: {
137
138
  text: string;
138
139
  url?: string;
@@ -1503,38 +1503,43 @@
1503
1503
  font-size: var(--udb-font-size-md);
1504
1504
  line-height: 1.5;
1505
1505
  }
1506
- .udb-onb h1,
1507
- .udb-onb h2,
1508
- .udb-onb h3,
1509
- .udb-onb p,
1510
- .udb-onb ul,
1511
- .udb-onb ol,
1512
- .udb-onb figure,
1513
- .udb-onb blockquote,
1514
- .udb-onb pre {
1515
- margin: 0;
1516
- }
1517
- .udb-onb ul,
1518
- .udb-onb ol {
1519
- list-style: none;
1520
- padding: 0;
1521
- }
1522
- .udb-onb button,
1523
- .udb-onb input,
1524
- .udb-onb select,
1525
- .udb-onb textarea {
1526
- font: inherit;
1527
- color: inherit;
1528
- margin: 0;
1529
- }
1530
- .udb-onb button {
1531
- padding: 0;
1532
- background: none;
1533
- border: 0;
1534
- cursor: pointer;
1535
- }
1536
- .udb-onb cite {
1537
- font-style: normal;
1506
+ /* Element resets live in the base layer so consumer utility classes
1507
+ * (e.g. a Button's bg-primary/p-4 from @umituz/web-design-system) can
1508
+ * override them — unlayered resets would always win the cascade. */
1509
+ @layer base {
1510
+ .udb-onb h1,
1511
+ .udb-onb h2,
1512
+ .udb-onb h3,
1513
+ .udb-onb p,
1514
+ .udb-onb ul,
1515
+ .udb-onb ol,
1516
+ .udb-onb figure,
1517
+ .udb-onb blockquote,
1518
+ .udb-onb pre {
1519
+ margin: 0;
1520
+ }
1521
+ .udb-onb ul,
1522
+ .udb-onb ol {
1523
+ list-style: none;
1524
+ padding: 0;
1525
+ }
1526
+ .udb-onb button,
1527
+ .udb-onb input,
1528
+ .udb-onb select,
1529
+ .udb-onb textarea {
1530
+ font: inherit;
1531
+ color: inherit;
1532
+ margin: 0;
1533
+ }
1534
+ .udb-onb button {
1535
+ padding: 0;
1536
+ background: none;
1537
+ border: 0;
1538
+ cursor: pointer;
1539
+ }
1540
+ .udb-onb cite {
1541
+ font-style: normal;
1542
+ }
1538
1543
  }
1539
1544
  .udb-onb img,
1540
1545
  .udb-onb svg {