@a.nemreen/dga-ui 0.3.7 → 0.3.11

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": "@a.nemreen/dga-ui",
3
- "version": "0.3.7",
3
+ "version": "0.3.11",
4
4
  "description": "DGA Angular UI library — standalone forms, overlays, navigation, and portal shell with RTL-first Tailwind styling",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -258,7 +258,7 @@ declare class DgaProgress {
258
258
  readonly clamped: _angular_core.Signal<number>;
259
259
  readonly dashOffset: _angular_core.Signal<number>;
260
260
  readonly displayValue: _angular_core.Signal<string>;
261
- readonly hostClasses: _angular_core.Signal<"inline-flex" | "block w-full">;
261
+ readonly hostClasses: _angular_core.Signal<"block w-full" | "inline-flex">;
262
262
  readonly trackClasses: _angular_core.Signal<string>;
263
263
  readonly barClasses: _angular_core.Signal<string>;
264
264
  readonly radialWrapClasses: _angular_core.Signal<string>;
@@ -2134,19 +2134,6 @@ declare class DgaPagination {
2134
2134
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<DgaPagination, "dga-pagination", never, { "page": { "alias": "page"; "required": false; "isSignal": true; }; "totalPages": { "alias": "totalPages"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "prevLabel": { "alias": "prevLabel"; "required": false; "isSignal": true; }; "nextLabel": { "alias": "nextLabel"; "required": false; "isSignal": true; }; }, { "page": "pageChange"; }, never, never, true, never>;
2135
2135
  }
2136
2136
 
2137
- declare class DgaTab {
2138
- private readonly tabs;
2139
- readonly value: _angular_core.InputSignal<string>;
2140
- readonly label: _angular_core.InputSignal<string>;
2141
- readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
2142
- readonly seq: number;
2143
- readonly tabId: string;
2144
- readonly panelId: string;
2145
- readonly active: _angular_core.Signal<boolean>;
2146
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<DgaTab, never>;
2147
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<DgaTab, "dga-tab", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
2148
- }
2149
-
2150
2137
  interface DgaTabItem {
2151
2138
  value: string;
2152
2139
  label: string;
@@ -2159,7 +2146,7 @@ declare class DgaTabs {
2159
2146
  readonly label: _angular_core.InputSignal<string>;
2160
2147
  /** Optional data-driven tab headers; when non-empty, renders the tablist from this list. */
2161
2148
  readonly items: _angular_core.InputSignal<DgaTabItem[]>;
2162
- readonly tabs: _angular_core.Signal<readonly DgaTab[]>;
2149
+ readonly tabs: _angular_core.Signal<readonly any[]>;
2163
2150
  readonly headerItems: _angular_core.Signal<DgaTabItem[]>;
2164
2151
  constructor();
2165
2152
  tabButtonClass(value: string, disabled: boolean): string;
@@ -2173,8 +2160,13 @@ declare class DgaTabs {
2173
2160
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<DgaTabs, "dga-tabs", never, { "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; }, { "selected": "selectedChange"; }, ["tabs"], ["*"], true, never>;
2174
2161
  }
2175
2162
 
2176
- declare class DgaContentSwitcherPanel {
2177
- private readonly switcher;
2163
+ declare class DgaTab {
2164
+ private readonly tabs;
2165
+ /**
2166
+ * Defaults instead of `input.required`: the parent reads these from
2167
+ * `contentChildren` during the first CD cycle, before Angular has bound
2168
+ * inputs. Required inputs throw NG0950 in that window.
2169
+ */
2178
2170
  readonly value: _angular_core.InputSignal<string>;
2179
2171
  readonly label: _angular_core.InputSignal<string>;
2180
2172
  readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
@@ -2182,8 +2174,8 @@ declare class DgaContentSwitcherPanel {
2182
2174
  readonly tabId: string;
2183
2175
  readonly panelId: string;
2184
2176
  readonly active: _angular_core.Signal<boolean>;
2185
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<DgaContentSwitcherPanel, never>;
2186
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<DgaContentSwitcherPanel, "dga-content-switcher-panel", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
2177
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DgaTab, never>;
2178
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<DgaTab, "dga-tab", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
2187
2179
  }
2188
2180
 
2189
2181
  interface DgaContentSwitcherItem {
@@ -2202,7 +2194,7 @@ declare class DgaContentSwitcher {
2202
2194
  readonly selected: _angular_core.ModelSignal<string>;
2203
2195
  readonly label: _angular_core.InputSignal<string>;
2204
2196
  readonly items: _angular_core.InputSignal<DgaContentSwitcherItem[]>;
2205
- readonly panels: _angular_core.Signal<readonly DgaContentSwitcherPanel[]>;
2197
+ readonly panels: _angular_core.Signal<readonly any[]>;
2206
2198
  readonly headerItems: _angular_core.Signal<DgaContentSwitcherItem[]>;
2207
2199
  constructor();
2208
2200
  segmentClass(value: string, disabled: boolean): string;
@@ -2216,6 +2208,24 @@ declare class DgaContentSwitcher {
2216
2208
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<DgaContentSwitcher, "dga-content-switcher", never, { "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; }, { "selected": "selectedChange"; }, ["panels"], ["*"], true, never>;
2217
2209
  }
2218
2210
 
2211
+ declare class DgaContentSwitcherPanel {
2212
+ private readonly switcher;
2213
+ /**
2214
+ * Defaults instead of `input.required`: the parent reads these from
2215
+ * `contentChildren` during the first CD cycle, before Angular has bound
2216
+ * inputs. Required inputs throw NG0950 in that window.
2217
+ */
2218
+ readonly value: _angular_core.InputSignal<string>;
2219
+ readonly label: _angular_core.InputSignal<string>;
2220
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
2221
+ readonly seq: number;
2222
+ readonly tabId: string;
2223
+ readonly panelId: string;
2224
+ readonly active: _angular_core.Signal<boolean>;
2225
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DgaContentSwitcherPanel, never>;
2226
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<DgaContentSwitcherPanel, "dga-content-switcher-panel", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
2227
+ }
2228
+
2219
2229
  type DgaStepStatus = 'pending' | 'active' | 'completed' | 'error';
2220
2230
  interface DgaStep {
2221
2231
  label: string;
@@ -2448,7 +2458,7 @@ declare class DgaToolbar {
2448
2458
 
2449
2459
  type DgaScrollTopPosition = 'end' | 'start' | 'left' | 'right';
2450
2460
  /**
2451
- * Small “back to top” control. Shows after the page scrolls past `threshold`.
2461
+ * “Back to top” control. Shows after the page scrolls past `threshold`.
2452
2462
  * Shares the FAB dock with `dga-accessibility` / `dga-chatbot` via `stack`.
2453
2463
  */
2454
2464
  declare class DgaScrollTop {
@@ -2472,8 +2482,7 @@ declare class DgaScrollTop {
2472
2482
  readonly clearFab: _angular_core.InputSignalWithTransform<boolean, unknown>;
2473
2483
  readonly visible: _angular_core.WritableSignal<boolean>;
2474
2484
  /**
2475
- * Same dock math as a11y/chatbot, plus a half-slot nudge so the smaller
2476
- * control sits centered in the large FAB slot (avoids overlap).
2485
+ * Same dock math as a11y / chatbot so the three FABs share one column.
2477
2486
  */
2478
2487
  readonly fabBottom: _angular_core.Signal<string>;
2479
2488
  private ticking;
@@ -2677,6 +2686,11 @@ declare class DgaAppShell {
2677
2686
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<DgaAppShell, "dga-app-shell", never, { "navLabel": { "alias": "navLabel"; "required": false; "isSignal": true; }; "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "padded": { "alias": "padded"; "required": false; "isSignal": true; }; }, {}, never, [".dga-app-shell-brand, [dgaAppShellBrand]", ".dga-app-shell-nav, [dgaAppShellNav]", ".dga-app-shell-nav-foot, [dgaAppShellNavFoot]", ".dga-app-shell-header, [dgaAppShellHeader]", "*"], true, never>;
2678
2687
  }
2679
2688
 
2689
+ interface DgaWeatherView {
2690
+ icon: DgaIconName;
2691
+ label: string;
2692
+ }
2693
+
2680
2694
  interface DgaStampNotice {
2681
2695
  title: string;
2682
2696
  /** Substring of `title` rendered bold in the primary color (e.g. `gov.sa`). */
@@ -2689,12 +2703,15 @@ type DgaTimeFormat = '12' | '24';
2689
2703
  /**
2690
2704
  * Exact shell size: 40px tall, sunken fill, 14px stamp copy.
2691
2705
  * Expand panel uses grid-template-rows for a smooth open/close.
2692
- * Optional date + live clock sit in the end cluster (Hijri ↔ Gregorian).
2706
+ * End cluster: weather · compact date (Hijri ↔ Gregorian) · live clock (12h ↔ 24h) · city.
2693
2707
  */
2694
2708
  declare class DgaTopBar {
2695
2709
  private readonly destroyRef;
2696
2710
  private clockTimer;
2711
+ private weatherAbort;
2697
2712
  readonly saFlagSrc: string;
2713
+ readonly clusterBtn: string;
2714
+ readonly clusterStatic: string;
2698
2715
  readonly panelId = "dga-digital-stamp";
2699
2716
  readonly open: _angular_core.ModelSignal<boolean>;
2700
2717
  /** Active calendar for the date widget. Click the date to switch. */
@@ -2703,6 +2720,15 @@ declare class DgaTopBar {
2703
2720
  readonly timeFormat: _angular_core.ModelSignal<DgaTimeFormat>;
2704
2721
  readonly showDate: _angular_core.InputSignal<boolean>;
2705
2722
  readonly showTime: _angular_core.InputSignal<boolean>;
2723
+ /** WMO weather condition for the resolved city (Open-Meteo). */
2724
+ readonly showWeather: _angular_core.InputSignal<boolean>;
2725
+ /** City name from geolocation, falling back to Riyadh. */
2726
+ readonly showLocation: _angular_core.InputSignal<boolean>;
2727
+ /**
2728
+ * When true, show an allow-location dialog once per session if the browser
2729
+ * permission is still `prompt`. Already-granted permission is used silently.
2730
+ */
2731
+ readonly autoRequestLocation: _angular_core.InputSignal<boolean>;
2706
2732
  /** Locale code for date/time formatting and default stamp copy (`ar` vs fallback English). */
2707
2733
  readonly locale: _angular_core.InputSignal<string>;
2708
2734
  /** Overrides the locale-aware default region `aria-label`. */
@@ -2727,7 +2753,68 @@ declare class DgaTopBar {
2727
2753
  /** Overrides the locale-aware default gov.sa / HTTPS notices. */
2728
2754
  readonly notices: _angular_core.InputSignal<DgaStampNotice[] | undefined>;
2729
2755
  private readonly now;
2730
- private readonly defaults;
2756
+ readonly defaults: _angular_core.Signal<{
2757
+ readonly regionLabel: "شريط الهوية الحكومية";
2758
+ readonly stampLabel: "ختم الحكومة الرقمية";
2759
+ readonly tabTextLg: "موقع حكومي مسجّل لدى هيئة الحكومة الرقمية.";
2760
+ readonly tabTextSm: "موقع حكومي مسجّل لدى هيئة الحكومة الرقمية";
2761
+ readonly verifyText: "كيف تتحقق؟";
2762
+ readonly registrationLabel: "مسجّل لدى هيئة الحكومة الرقمية برقم:";
2763
+ readonly locationAllowTitle: "السماح بالوصول إلى الموقع";
2764
+ readonly locationAllowBody: "لعرض حالة الطقس واسم مدينتك نحتاج إلى إذن موقعك. يمكنك الرفض وسيُعرض طقس الرياض افتراضياً.";
2765
+ readonly locationAllow: "السماح";
2766
+ readonly locationNotNow: "ليس الآن";
2767
+ readonly locationClose: "إغلاق";
2768
+ readonly locationTooltip: "السماح بالوصول إلى الموقع لعرض الطقس في مدينتك";
2769
+ readonly locationDeniedTooltip: "تم رفض إذن الموقع. يُعرض طقس الرياض.";
2770
+ readonly locationRefreshTooltip: "تحديث الموقع الحالي";
2771
+ readonly weatherLabel: "حالة الطقس";
2772
+ readonly notices: ({
2773
+ icon: "link";
2774
+ title: string;
2775
+ highlight: string;
2776
+ body: string;
2777
+ } | {
2778
+ icon: "lock";
2779
+ title: string;
2780
+ highlight: string;
2781
+ body: string;
2782
+ })[];
2783
+ } | {
2784
+ readonly regionLabel: "Government identity bar";
2785
+ readonly stampLabel: "Digital government stamp";
2786
+ readonly tabTextLg: "A government website registered with the Digital Government Authority.";
2787
+ readonly tabTextSm: "A government website registered with the Digital Government Authority";
2788
+ readonly verifyText: "How to verify?";
2789
+ readonly registrationLabel: "Registered with the Digital Government Authority under number:";
2790
+ readonly locationAllowTitle: "Allow location access";
2791
+ readonly locationAllowBody: "We use your location to show local weather and your city name. You can decline and we’ll show Riyadh weather instead.";
2792
+ readonly locationAllow: "Allow";
2793
+ readonly locationNotNow: "Not now";
2794
+ readonly locationClose: "Close";
2795
+ readonly locationTooltip: "Allow location access to show weather in your city";
2796
+ readonly locationDeniedTooltip: "Location permission denied. Showing Riyadh weather.";
2797
+ readonly locationRefreshTooltip: "Refresh current location";
2798
+ readonly weatherLabel: "Weather";
2799
+ readonly notices: ({
2800
+ icon: "link";
2801
+ title: string;
2802
+ highlight: string;
2803
+ body: string;
2804
+ } | {
2805
+ icon: "lock";
2806
+ title: string;
2807
+ highlight: string;
2808
+ body: string;
2809
+ })[];
2810
+ }>;
2811
+ readonly locationPromptOpen: _angular_core.WritableSignal<boolean>;
2812
+ private readonly geoDenied;
2813
+ private readonly geoGranted;
2814
+ private readonly coords;
2815
+ private readonly weatherSnap;
2816
+ private readonly resolvedCity;
2817
+ readonly weather: _angular_core.Signal<DgaWeatherView | null>;
2731
2818
  readonly resolvedRegionLabel: _angular_core.Signal<string>;
2732
2819
  readonly resolvedStampLabel: _angular_core.Signal<string>;
2733
2820
  readonly resolvedTabTextLg: _angular_core.Signal<string>;
@@ -2737,11 +2824,21 @@ declare class DgaTopBar {
2737
2824
  readonly resolvedNotices: _angular_core.Signal<DgaStampNotice[]>;
2738
2825
  readonly dateLabel: _angular_core.Signal<string>;
2739
2826
  readonly timeLabel: _angular_core.Signal<string>;
2827
+ readonly cityLabel: _angular_core.Signal<string>;
2828
+ readonly weatherAriaLabel: _angular_core.Signal<string>;
2829
+ readonly locationTooltip: _angular_core.Signal<"السماح بالوصول إلى الموقع لعرض الطقس في مدينتك" | "تم رفض إذن الموقع. يُعرض طقس الرياض." | "تحديث الموقع الحالي" | "Allow location access to show weather in your city" | "Location permission denied. Showing Riyadh weather." | "Refresh current location">;
2740
2830
  readonly calendarToggleLabel: _angular_core.Signal<"التبديل إلى التقويم الميلادي" | "Switch to Gregorian calendar" | "التبديل إلى التقويم الهجري" | "Switch to Hijri calendar">;
2741
2831
  readonly timeToggleLabel: _angular_core.Signal<"التبديل إلى تنسيق 24 ساعة" | "Switch to 24-hour format" | "التبديل إلى تنسيق 12 ساعة" | "Switch to 12-hour format">;
2742
2832
  readonly hostClasses: _angular_core.Signal<string>;
2743
2833
  constructor();
2744
2834
  private bindClock;
2835
+ private bindWeatherAndLocation;
2836
+ private syncGeolocation;
2837
+ onLocationClick(): void;
2838
+ allowLocation(): void;
2839
+ dismissLocationPrompt(): void;
2840
+ private requestBrowserLocation;
2841
+ private refreshPlace;
2745
2842
  private tick;
2746
2843
  private clearClock;
2747
2844
  private scheduleMinuteTick;
@@ -2754,7 +2851,7 @@ declare class DgaTopBar {
2754
2851
  toggleTimeFormat(): void;
2755
2852
  safeHref(href: string | undefined | null): string;
2756
2853
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DgaTopBar, never>;
2757
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<DgaTopBar, "dga-top-bar", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "calendar": { "alias": "calendar"; "required": false; "isSignal": true; }; "timeFormat": { "alias": "timeFormat"; "required": false; "isSignal": true; }; "showDate": { "alias": "showDate"; "required": false; "isSignal": true; }; "showTime": { "alias": "showTime"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "regionLabel": { "alias": "regionLabel"; "required": false; "isSignal": true; }; "stampLabel": { "alias": "stampLabel"; "required": false; "isSignal": true; }; "tabTextLg": { "alias": "tabTextLg"; "required": false; "isSignal": true; }; "tabTextSm": { "alias": "tabTextSm"; "required": false; "isSignal": true; }; "verifyText": { "alias": "verifyText"; "required": false; "isSignal": true; }; "registrationLabel": { "alias": "registrationLabel"; "required": false; "isSignal": true; }; "registrationId": { "alias": "registrationId"; "required": false; "isSignal": true; }; "registrationHref": { "alias": "registrationHref"; "required": false; "isSignal": true; }; "notices": { "alias": "notices"; "required": false; "isSignal": true; }; }, { "open": "openChange"; "calendar": "calendarChange"; "timeFormat": "timeFormatChange"; }, never, ["*"], true, never>;
2854
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<DgaTopBar, "dga-top-bar", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "calendar": { "alias": "calendar"; "required": false; "isSignal": true; }; "timeFormat": { "alias": "timeFormat"; "required": false; "isSignal": true; }; "showDate": { "alias": "showDate"; "required": false; "isSignal": true; }; "showTime": { "alias": "showTime"; "required": false; "isSignal": true; }; "showWeather": { "alias": "showWeather"; "required": false; "isSignal": true; }; "showLocation": { "alias": "showLocation"; "required": false; "isSignal": true; }; "autoRequestLocation": { "alias": "autoRequestLocation"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "regionLabel": { "alias": "regionLabel"; "required": false; "isSignal": true; }; "stampLabel": { "alias": "stampLabel"; "required": false; "isSignal": true; }; "tabTextLg": { "alias": "tabTextLg"; "required": false; "isSignal": true; }; "tabTextSm": { "alias": "tabTextSm"; "required": false; "isSignal": true; }; "verifyText": { "alias": "verifyText"; "required": false; "isSignal": true; }; "registrationLabel": { "alias": "registrationLabel"; "required": false; "isSignal": true; }; "registrationId": { "alias": "registrationId"; "required": false; "isSignal": true; }; "registrationHref": { "alias": "registrationHref"; "required": false; "isSignal": true; }; "notices": { "alias": "notices"; "required": false; "isSignal": true; }; }, { "open": "openChange"; "calendar": "calendarChange"; "timeFormat": "timeFormatChange"; }, never, ["*"], true, never>;
2758
2855
  }
2759
2856
 
2760
2857
  type DgaFooterAppearance = 'default' | 'brand';