@radix-ng/primitives 0.33.0 → 0.33.2

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.
Files changed (41) hide show
  1. package/calendar/README.md +1 -0
  2. package/calendar/index.d.ts +30 -0
  3. package/calendar/src/calendar-cell-trigger.directive.d.ts +54 -0
  4. package/calendar/src/calendar-cell.directive.d.ts +11 -0
  5. package/calendar/src/calendar-grid-body.directive.d.ts +5 -0
  6. package/calendar/src/calendar-grid-head.directive.d.ts +5 -0
  7. package/calendar/src/calendar-grid-row.directive.d.ts +5 -0
  8. package/calendar/src/calendar-grid.directive.d.ts +8 -0
  9. package/calendar/src/calendar-head-cell.directive.d.ts +5 -0
  10. package/calendar/src/calendar-header.directive.d.ts +5 -0
  11. package/calendar/src/calendar-heading.directive.d.ts +7 -0
  12. package/calendar/src/calendar-next.directive.d.ts +16 -0
  13. package/calendar/src/calendar-prev.directive.d.ts +16 -0
  14. package/calendar/src/calendar-root.directive.d.ts +148 -0
  15. package/calendar/src/calendar.d.ts +44 -0
  16. package/calendar/src//321/201alendar-/321/201ontext.token.d.ts +24 -0
  17. package/core/index.d.ts +2 -0
  18. package/core/src/chunk.d.ts +12 -0
  19. package/core/src/date-time/calendar.d.ts +33 -0
  20. package/core/src/date-time/comparators.d.ts +92 -0
  21. package/core/src/date-time/formatter.d.ts +30 -0
  22. package/core/src/date-time/index.d.ts +6 -0
  23. package/core/src/date-time/placeholders.d.ts +8 -0
  24. package/core/src/date-time/types.d.ts +28 -0
  25. package/core/src/date-time/utils.d.ts +1 -0
  26. package/core/src/kbd-constants.d.ts +1 -0
  27. package/core/src/watch.d.ts +41 -0
  28. package/fesm2022/radix-ng-primitives-calendar.mjs +941 -0
  29. package/fesm2022/radix-ng-primitives-calendar.mjs.map +1 -0
  30. package/fesm2022/radix-ng-primitives-core.mjs +544 -2
  31. package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
  32. package/fesm2022/radix-ng-primitives-hover-card.mjs +0 -1
  33. package/fesm2022/radix-ng-primitives-hover-card.mjs.map +1 -1
  34. package/fesm2022/radix-ng-primitives-navigation-menu.mjs +296 -171
  35. package/fesm2022/radix-ng-primitives-navigation-menu.mjs.map +1 -1
  36. package/hover-card/src/hover-card-root.directive.d.ts +4 -4
  37. package/navigation-menu/src/navigation-menu-viewport.directive.d.ts +30 -7
  38. package/navigation-menu/src/utils.d.ts +1 -1
  39. package/package.json +5 -1
  40. package/popover/src/popover-root.directive.d.ts +4 -4
  41. package/tooltip/src/tooltip-root.directive.d.ts +4 -4
@@ -0,0 +1 @@
1
+ export declare function handleCalendarInitialFocus(calendar: HTMLElement): void;
@@ -38,3 +38,4 @@ export declare const p = "p";
38
38
  export declare const n = "n";
39
39
  export declare const j = "j";
40
40
  export declare const k = "k";
41
+ export declare const SPACE_CODE = "Space";
@@ -0,0 +1,41 @@
1
+ import { CreateEffectOptions, EffectCleanupRegisterFn, EffectRef } from '@angular/core';
2
+ /**
3
+ * We want to have the Tuple in order to use the types in the function signature
4
+ */
5
+ type ExplicitEffectValues<T> = {
6
+ [K in keyof T]: () => T[K];
7
+ };
8
+ /**
9
+ * Extend the regular set of effect options
10
+ */
11
+ declare interface CreateExplicitEffectOptions extends CreateEffectOptions {
12
+ /**
13
+ * Option that allows the computation not to execute immediately, but only run on first change.
14
+ */
15
+ defer?: boolean;
16
+ }
17
+ /**
18
+ * This explicit effect function will take the dependencies and the function to run when the dependencies change.
19
+ *
20
+ * @example
21
+ * ```typescript
22
+ * import { watch } from 'radix-ng/primitives/core';
23
+ *
24
+ * const count = signal(0);
25
+ * const state = signal('idle');
26
+ *
27
+ * watch([count, state], ([count, state], cleanup) => {
28
+ * console.log('count updated', count, state);
29
+ *
30
+ * cleanup(() => {
31
+ * console.log('cleanup');
32
+ * });
33
+ * });
34
+ * ```
35
+ *
36
+ * @param deps - The dependencies that the effect will run on
37
+ * @param fn - The function to run when the dependencies change
38
+ * @param options - The options for the effect with the addition of defer (it allows the computation to run on first change, not immediately)
39
+ */
40
+ export declare function watch<Input extends readonly unknown[], Params = Input>(deps: readonly [...ExplicitEffectValues<Input>], fn: (deps: Params, onCleanup: EffectCleanupRegisterFn) => void, options?: CreateExplicitEffectOptions | undefined): EffectRef;
41
+ export {};