@salyra-ui/calendar 0.1.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.
Files changed (89) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +27 -0
  3. package/dist/angular/Action.d.ts +13 -0
  4. package/dist/angular/CalendarNumber.d.ts +10 -0
  5. package/dist/angular/CalendarView.d.ts +16 -0
  6. package/dist/angular/Cell.d.ts +15 -0
  7. package/dist/angular/Continuous.d.ts +13 -0
  8. package/dist/angular/DateField.d.ts +15 -0
  9. package/dist/angular/DayTrigger.d.ts +15 -0
  10. package/dist/angular/Grid.d.ts +7 -0
  11. package/dist/angular/Heading.d.ts +11 -0
  12. package/dist/angular/MonthYearSelect.d.ts +11 -0
  13. package/dist/angular/PickerRoot.d.ts +51 -0
  14. package/dist/angular/TimeSegmentField.d.ts +16 -0
  15. package/dist/angular/Week.d.ts +7 -0
  16. package/dist/angular/Weekday.d.ts +15 -0
  17. package/dist/angular/index.d.ts +43 -0
  18. package/dist/angular/index.js +1 -0
  19. package/dist/astro/Action.astro +7 -0
  20. package/dist/astro/Calendar.astro +10 -0
  21. package/dist/astro/Cell.astro +13 -0
  22. package/dist/astro/Continuous.astro +9 -0
  23. package/dist/astro/DayTrigger.astro +7 -0
  24. package/dist/astro/Field.astro +11 -0
  25. package/dist/astro/Grid.astro +3 -0
  26. package/dist/astro/Heading.astro +7 -0
  27. package/dist/astro/MonthSelect.astro +13 -0
  28. package/dist/astro/Number.astro +7 -0
  29. package/dist/astro/Period.astro +10 -0
  30. package/dist/astro/Root.astro +15 -0
  31. package/dist/astro/Segment.astro +10 -0
  32. package/dist/astro/Week.astro +3 -0
  33. package/dist/astro/Weekday.astro +13 -0
  34. package/dist/astro/YearSelect.astro +13 -0
  35. package/dist/browser/calendar.js +1535 -0
  36. package/dist/browser/calendar.min.js +1 -0
  37. package/dist/core/calendar.d.ts +48 -0
  38. package/dist/core/day.d.ts +6 -0
  39. package/dist/core/dom.d.ts +50 -0
  40. package/dist/core/format.d.ts +10 -0
  41. package/dist/core/index.d.ts +9 -0
  42. package/dist/core/index.js +1 -0
  43. package/dist/core/popover.d.ts +6 -0
  44. package/dist/core/scroller.d.ts +13 -0
  45. package/dist/core/store.d.ts +107 -0
  46. package/dist/core/time.d.ts +12 -0
  47. package/dist/core/timezone.d.ts +3 -0
  48. package/dist/react/Calendar.d.ts +29 -0
  49. package/dist/react/Continuous.d.ts +5 -0
  50. package/dist/react/Fields.d.ts +25 -0
  51. package/dist/react/Root.d.ts +10 -0
  52. package/dist/react/context.d.ts +74 -0
  53. package/dist/react/index.d.ts +40 -0
  54. package/dist/react/index.js +1 -0
  55. package/dist/styles.css +115 -0
  56. package/dist/styles.min.css +1 -0
  57. package/dist/svelte/Action.svelte +12 -0
  58. package/dist/svelte/CalendarView.svelte +3 -0
  59. package/dist/svelte/Cell.svelte +5 -0
  60. package/dist/svelte/Continuous.svelte +3 -0
  61. package/dist/svelte/DateRoot.svelte +3 -0
  62. package/dist/svelte/DateTimeRoot.svelte +3 -0
  63. package/dist/svelte/DayTrigger.svelte +14 -0
  64. package/dist/svelte/Field.svelte +11 -0
  65. package/dist/svelte/Grid.svelte +5 -0
  66. package/dist/svelte/Heading.svelte +5 -0
  67. package/dist/svelte/MonthSelect.svelte +19 -0
  68. package/dist/svelte/Navigation.svelte +14 -0
  69. package/dist/svelte/Number.svelte +5 -0
  70. package/dist/svelte/Period.svelte +15 -0
  71. package/dist/svelte/Root.svelte +3 -0
  72. package/dist/svelte/Segment.svelte +14 -0
  73. package/dist/svelte/Time.svelte +12 -0
  74. package/dist/svelte/TimeRoot.svelte +3 -0
  75. package/dist/svelte/Week.svelte +5 -0
  76. package/dist/svelte/Weekday.svelte +10 -0
  77. package/dist/svelte/YearSelect.svelte +19 -0
  78. package/dist/svelte/context.ts +1 -0
  79. package/dist/svelte/index.ts +1 -0
  80. package/dist/vanilla/index.d.ts +41 -0
  81. package/dist/vanilla/index.js +1 -0
  82. package/dist/vue/Calendar.d.ts +106 -0
  83. package/dist/vue/Continuous.d.ts +9 -0
  84. package/dist/vue/Fields.d.ts +145 -0
  85. package/dist/vue/Root.d.ts +112 -0
  86. package/dist/vue/context.d.ts +40 -0
  87. package/dist/vue/index.d.ts +208 -0
  88. package/dist/vue/index.js +1 -0
  89. package/package.json +101 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Salyra UI contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,27 @@
1
+ # Salyra UI / Calendar
2
+
3
+ Composable calendar controls for React, Svelte, Vue, Angular, Astro and Vanilla.
4
+
5
+ ## Installation
6
+
7
+ Install with `npm install @salyra-ui/calendar`. npm resolves its declared Salyra dependencies. Import the framework entry your application uses.
8
+
9
+ ```sh
10
+ npm install @salyra-ui/calendar
11
+ ```
12
+
13
+ Import the adapter your app uses, such as `@salyra-ui/calendar/svelte`. Framework peers are optional. The default stylesheet is optional through `@salyra-ui/calendar/styles.css`.
14
+
15
+ Calendar owns the shared calculations, store and native primitives. DatePicker and TimePicker provide their own roots and defaults. DateTimePicker composes both packages. They share the same context, so their primitive components can be used in one editor.
16
+
17
+ Values remain in draft until complete and valid. Explicit Apply and Cancel are available. Time intervals use end dates or day offsets rather than guessing the next day.
18
+
19
+ The generated package contains dist, README and LICENSE, without sourcemaps. Vanilla has readable and minified standalone browser files. Each standalone browser bundle includes its dependencies and needs no additional Salyra script.
20
+
21
+ The workspace contains versioned API documentation, framework examples, tests and architecture notes.
22
+
23
+ ## Vanilla browser assets
24
+
25
+ The archive includes readable and minified standalone browser scripts at `dist/browser/calendar.js` and `dist/browser/calendar.min.js`. Each script includes its required Calendar core. Styles are available at `dist/styles.css` and `dist/styles.min.css`, without sourcemaps. Both JavaScript builds expose the same `SalyraCalendar` global.
26
+
27
+ For a bundled application, import `@salyra-ui/calendar/vanilla` and, when using the default appearance, `@salyra-ui/calendar/styles.min.css`. The `styles.standard.css` entry gives you the readable stylesheet. Custom compositions can omit these default styles.
@@ -0,0 +1,13 @@
1
+ import { OnInit, OnDestroy } from "@angular/core";
2
+ import * as i0 from "@angular/core";
3
+ export declare class Action implements OnInit, OnDestroy {
4
+ spNavigate?: number;
5
+ spAction?: "apply" | "cancel" | "clear";
6
+ private el;
7
+ private root;
8
+ private stop?;
9
+ ngOnInit(): void;
10
+ ngOnDestroy(): void;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<Action, never>;
12
+ static ɵdir: i0.ɵɵDirectiveDeclaration<Action, "button[spNavigate],button[spAction]", never, { "spNavigate": { "alias": "spNavigate"; "required": false; }; "spAction": { "alias": "spAction"; "required": false; }; }, {}, never, never, true, never>;
13
+ }
@@ -0,0 +1,10 @@
1
+ import { OnChanges } from "@angular/core";
2
+ import * as i0 from "@angular/core";
3
+ export declare class CalendarNumber implements OnChanges {
4
+ date: string;
5
+ label?: string;
6
+ private el;
7
+ ngOnChanges(): void;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<CalendarNumber, never>;
9
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CalendarNumber, "[spNumber]", never, { "date": { "alias": "spNumber"; "required": false; }; "label": { "alias": "label"; "required": false; }; }, {}, never, never, true, never>;
10
+ }
@@ -0,0 +1,16 @@
1
+ import { OnInit, OnChanges, OnDestroy } from "@angular/core";
2
+ import { type CalendarRenderOptions } from "../core";
3
+ import * as i0 from "@angular/core";
4
+ export declare class CalendarView implements OnInit, OnChanges, OnDestroy {
5
+ options: CalendarRenderOptions;
6
+ private el;
7
+ private root;
8
+ private stop?;
9
+ private started;
10
+ ngOnInit(): void;
11
+ ngOnChanges(): void;
12
+ private bind;
13
+ ngOnDestroy(): void;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<CalendarView, never>;
15
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CalendarView, "[spCalendar]", never, { "options": { "alias": "spCalendar"; "required": false; }; }, {}, never, never, true, never>;
16
+ }
@@ -0,0 +1,15 @@
1
+ import { OnInit, OnChanges, OnDestroy } from "@angular/core";
2
+ import * as i0 from "@angular/core";
3
+ export declare class Cell implements OnInit, OnChanges, OnDestroy {
4
+ date: string;
5
+ outside: boolean;
6
+ private el;
7
+ private root;
8
+ private stop?;
9
+ ngOnInit(): void;
10
+ ngOnChanges(): void;
11
+ private update;
12
+ ngOnDestroy(): void;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<Cell, never>;
14
+ static ɵdir: i0.ɵɵDirectiveDeclaration<Cell, "[spCell]", never, { "date": { "alias": "spCell"; "required": false; }; "outside": { "alias": "outside"; "required": false; }; }, {}, never, never, true, never>;
15
+ }
@@ -0,0 +1,13 @@
1
+ import { OnInit, OnDestroy } from "@angular/core";
2
+ import { type MonthScrollerOptions } from "../core";
3
+ import * as i0 from "@angular/core";
4
+ export declare class Continuous implements OnInit, OnDestroy {
5
+ options: MonthScrollerOptions;
6
+ private el;
7
+ private root;
8
+ private stop?;
9
+ ngOnInit(): void;
10
+ ngOnDestroy(): void;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<Continuous, never>;
12
+ static ɵdir: i0.ɵɵDirectiveDeclaration<Continuous, "[spContinuous]", never, { "options": { "alias": "spContinuous"; "required": false; }; }, {}, never, never, true, never>;
13
+ }
@@ -0,0 +1,15 @@
1
+ import { OnInit, OnChanges, OnDestroy } from "@angular/core";
2
+ import { type Endpoint } from "../core";
3
+ import * as i0 from "@angular/core";
4
+ export declare class DateField implements OnInit, OnChanges, OnDestroy {
5
+ endpoint: Endpoint;
6
+ private el;
7
+ private root;
8
+ private stop?;
9
+ ngOnChanges(): void;
10
+ ngOnInit(): void;
11
+ private bind;
12
+ ngOnDestroy(): void;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<DateField, never>;
14
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DateField, "input[spDateField]", never, { "endpoint": { "alias": "spDateField"; "required": false; }; }, {}, never, never, true, never>;
15
+ }
@@ -0,0 +1,15 @@
1
+ import { EventEmitter, OnInit, OnChanges, OnDestroy } from "@angular/core";
2
+ import * as i0 from "@angular/core";
3
+ export declare class DayTrigger implements OnInit, OnChanges, OnDestroy {
4
+ date: string;
5
+ dateSelect: EventEmitter<string>;
6
+ private el;
7
+ private root;
8
+ private stop?;
9
+ ngOnInit(): void;
10
+ ngOnChanges(): void;
11
+ private bind;
12
+ ngOnDestroy(): void;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<DayTrigger, never>;
14
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DayTrigger, "button[spDayTrigger]", never, { "date": { "alias": "spDayTrigger"; "required": false; }; }, { "dateSelect": "dateSelect"; }, never, never, true, never>;
15
+ }
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class Grid {
3
+ private el;
4
+ constructor();
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<Grid, never>;
6
+ static ɵdir: i0.ɵɵDirectiveDeclaration<Grid, "[spGrid]", never, {}, {}, never, never, true, never>;
7
+ }
@@ -0,0 +1,11 @@
1
+ import { OnInit, OnDestroy } from "@angular/core";
2
+ import * as i0 from "@angular/core";
3
+ export declare class Heading implements OnInit, OnDestroy {
4
+ private el;
5
+ private root;
6
+ private stop?;
7
+ ngOnInit(): void;
8
+ ngOnDestroy(): void;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<Heading, never>;
10
+ static ɵdir: i0.ɵɵDirectiveDeclaration<Heading, "[spHeading]", never, {}, {}, never, never, true, never>;
11
+ }
@@ -0,0 +1,11 @@
1
+ import { OnInit, OnDestroy } from "@angular/core";
2
+ import * as i0 from "@angular/core";
3
+ export declare class MonthYearSelect implements OnInit, OnDestroy {
4
+ private el;
5
+ private root;
6
+ private stop?;
7
+ ngOnInit(): void;
8
+ ngOnDestroy(): void;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<MonthYearSelect, never>;
10
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MonthYearSelect, "select[spMonthSelect],select[spYearSelect]", never, {}, {}, never, never, true, never>;
11
+ }
@@ -0,0 +1,51 @@
1
+ import { EventEmitter, OnInit, OnChanges, OnDestroy, InjectionToken } from "@angular/core";
2
+ import { type PickerOptions, type PickerStore } from "../core";
3
+ import * as i0 from "@angular/core";
4
+ export declare const PICKER_CONTEXT: InjectionToken<PickerRoot>;
5
+ export declare class PickerRoot implements OnInit, OnChanges, OnDestroy {
6
+ options: PickerOptions;
7
+ store?: PickerStore;
8
+ valueChange: EventEmitter<any>;
9
+ private stop?;
10
+ ngOnInit(): void;
11
+ ngOnChanges(): void;
12
+ ngOnDestroy(): void;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<PickerRoot, never>;
14
+ static ɵdir: i0.ɵɵDirectiveDeclaration<PickerRoot, "[spRoot]", never, { "options": { "alias": "spRoot"; "required": false; }; "store": { "alias": "store"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
15
+ }
16
+ export declare function usePickerStore(): {
17
+ getSnapshot: () => import(".").PickerSnapshot;
18
+ subscribe(fn: () => void): () => void;
19
+ subscribeValue(fn: (v: import(".").PickerValue) => void): () => void;
20
+ getMonth(offset?: number): import(".").CalendarMonth;
21
+ getDay(date: string): {
22
+ selected: boolean;
23
+ rangeStart: boolean;
24
+ rangeEnd: boolean;
25
+ inRange: boolean;
26
+ preview: boolean;
27
+ disabled: boolean;
28
+ today: boolean;
29
+ weekend: boolean;
30
+ focused: boolean;
31
+ };
32
+ setVisibleMonth(next: import(".").Month): void;
33
+ navigate(count: number): void;
34
+ focus(date: string): void;
35
+ moveFocus(key: string, shift?: boolean): boolean;
36
+ hover(date: string | null): void;
37
+ selectDate(date: string): boolean;
38
+ setDate(date: string, endpoint?: import(".").Endpoint): boolean;
39
+ setTime(time: string, endpoint?: import(".").Endpoint): boolean;
40
+ setDayOffset(offset: number, endpoint?: import(".").Endpoint): boolean;
41
+ setEndpoint(endpoint: import(".").Endpoint): void;
42
+ setValue(value: import(".").PickerValue): void;
43
+ apply(): boolean;
44
+ cancel(): void;
45
+ clear(): void;
46
+ setOpen(open: boolean): void;
47
+ setOptions(patch: Partial<PickerOptions>): void;
48
+ validate: () => string | null;
49
+ destroy(): void;
50
+ readonly cacheSize: number;
51
+ };
@@ -0,0 +1,16 @@
1
+ import { OnInit, OnChanges, OnDestroy } from "@angular/core";
2
+ import { type Endpoint, type TimeSegment } from "../core";
3
+ import * as i0 from "@angular/core";
4
+ export declare class TimeSegmentField implements OnInit, OnChanges, OnDestroy {
5
+ part: TimeSegment;
6
+ endpoint: Endpoint;
7
+ private el;
8
+ private root;
9
+ private stop?;
10
+ ngOnChanges(): void;
11
+ ngOnInit(): void;
12
+ private bind;
13
+ ngOnDestroy(): void;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<TimeSegmentField, never>;
15
+ static ɵdir: i0.ɵɵDirectiveDeclaration<TimeSegmentField, "input[spTimeSegment],select[spTimeSegment]", never, { "part": { "alias": "spTimeSegment"; "required": false; }; "endpoint": { "alias": "endpoint"; "required": false; }; }, {}, never, never, true, never>;
16
+ }
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class Week {
3
+ private el;
4
+ constructor();
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<Week, never>;
6
+ static ɵdir: i0.ɵɵDirectiveDeclaration<Week, "[spWeek]", never, {}, {}, never, never, true, never>;
7
+ }
@@ -0,0 +1,15 @@
1
+ import { OnInit, OnChanges, OnDestroy } from "@angular/core";
2
+ import * as i0 from "@angular/core";
3
+ export declare class Weekday implements OnInit, OnChanges, OnDestroy {
4
+ day: number;
5
+ label?: string;
6
+ private el;
7
+ private root;
8
+ private stop?;
9
+ ngOnInit(): void;
10
+ ngOnChanges(): void;
11
+ private update;
12
+ ngOnDestroy(): void;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<Weekday, never>;
14
+ static ɵdir: i0.ɵɵDirectiveDeclaration<Weekday, "[spWeekday]", never, { "day": { "alias": "spWeekday"; "required": false; }; "label": { "alias": "label"; "required": false; }; }, {}, never, never, true, never>;
15
+ }
@@ -0,0 +1,43 @@
1
+ export * from "../core";
2
+ export { PICKER_CONTEXT, usePickerStore } from "./PickerRoot";
3
+ import { PickerRoot } from "./PickerRoot";
4
+ export { PickerRoot } from "./PickerRoot";
5
+ import { CalendarView } from "./CalendarView";
6
+ export { CalendarView } from "./CalendarView";
7
+ import { DayTrigger } from "./DayTrigger";
8
+ export { DayTrigger } from "./DayTrigger";
9
+ export { DateField } from "./DateField";
10
+ export { TimeSegmentField } from "./TimeSegmentField";
11
+ import { CalendarNumber } from "./CalendarNumber";
12
+ export { CalendarNumber } from "./CalendarNumber";
13
+ import { Continuous } from "./Continuous";
14
+ export { Continuous } from "./Continuous";
15
+ import { Grid } from "./Grid";
16
+ export { Grid } from "./Grid";
17
+ import { Week } from "./Week";
18
+ export { Week } from "./Week";
19
+ import { Cell } from "./Cell";
20
+ export { Cell } from "./Cell";
21
+ import { Heading } from "./Heading";
22
+ export { Heading } from "./Heading";
23
+ import { Weekday } from "./Weekday";
24
+ export { Weekday } from "./Weekday";
25
+ import { MonthYearSelect } from "./MonthYearSelect";
26
+ export { MonthYearSelect } from "./MonthYearSelect";
27
+ import { Action } from "./Action";
28
+ export { Action } from "./Action";
29
+ export declare const Calendar: {
30
+ Root: typeof PickerRoot;
31
+ Continuous: typeof Continuous;
32
+ Grid: typeof Grid;
33
+ Week: typeof Week;
34
+ Cell: typeof Cell;
35
+ Heading: typeof Heading;
36
+ Weekday: typeof Weekday;
37
+ Navigation: typeof Action;
38
+ MonthSelect: typeof MonthYearSelect;
39
+ YearSelect: typeof MonthYearSelect;
40
+ View: typeof CalendarView;
41
+ DayTrigger: typeof DayTrigger;
42
+ Number: typeof CalendarNumber;
43
+ };
@@ -0,0 +1 @@
1
+ export*from"../core/index.js";import{Directive as _,Input as P,Output as tt,EventEmitter as et,inject as it,InjectionToken as rt,forwardRef as j}from"@angular/core";import{createPickerStore as ot}from"../core/index.js";import*as r from"@angular/core";var e=new rt("Salyra calendar"),v=class t{constructor(){this.options={},this.valueChange=new et}ngOnInit(){this.stop||(this.store??=ot(this.options),this.stop=this.store.subscribeValue(i=>this.valueChange.emit(i)))}ngOnChanges(){this.store&&this.store.setOptions(this.options)}ngOnDestroy(){this.stop?.()}static{this.\u0275fac=r.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.33",ngImport:r,type:t,deps:[],target:r.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=r.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.33",type:t,isStandalone:!0,selector:"[spRoot]",inputs:{options:["spRoot","options"],store:"store"},outputs:{valueChange:"valueChange"},providers:[{provide:e,useExisting:j(()=>t)}],usesOnChanges:!0,ngImport:r})}};r.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.33",ngImport:r,type:v,decorators:[{type:_,args:[{selector:"[spRoot]",standalone:!0,providers:[{provide:e,useExisting:j(()=>v)}]}]}],propDecorators:{options:[{type:P,args:["spRoot"]}],store:[{type:P}],valueChange:[{type:tt}]}});function st(){let t=it(e);return t.ngOnInit(),t.store}import{Directive as nt,ElementRef as at,Input as pt,inject as A}from"@angular/core";import{bindCalendar as ct,calendarMarkup as lt}from"../core/index.js";import*as o from"@angular/core";var I=class t{constructor(){this.options={},this.el=A(at),this.root=A(e),this.started=!1}ngOnInit(){this.root.ngOnInit(),this.started=!0,this.bind()}ngOnChanges(){this.started&&this.bind()}bind(){this.stop?.(),typeof window>"u"?this.el.nativeElement.innerHTML=lt(this.root.store,this.options):this.stop=ct(this.el.nativeElement,this.root.store,this.options)}ngOnDestroy(){this.stop?.()}static{this.\u0275fac=o.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.33",ngImport:o,type:t,deps:[],target:o.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=o.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.33",type:t,isStandalone:!0,selector:"[spCalendar]",inputs:{options:["spCalendar","options"]},usesOnChanges:!0,ngImport:o})}};o.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.33",ngImport:o,type:I,decorators:[{type:nt,args:[{selector:"[spCalendar]",standalone:!0}]}],propDecorators:{options:[{type:pt,args:["spCalendar"]}]}});import{Directive as mt,ElementRef as ht,Input as gt,Output as dt,EventEmitter as ut,inject as K}from"@angular/core";import{bindDayTrigger as ft}from"../core/index.js";import*as s from"@angular/core";var C=class t{constructor(){this.date="",this.dateSelect=new ut,this.el=K(ht),this.root=K(e)}ngOnInit(){this.bind()}ngOnChanges(){this.root.store&&this.bind()}bind(){this.root.ngOnInit(),this.stop?.(),typeof window<"u"&&(this.stop=ft(this.el.nativeElement,this.root.store,this.date,{onSelect:i=>this.dateSelect.emit(i)}))}ngOnDestroy(){this.stop?.()}static{this.\u0275fac=s.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.33",ngImport:s,type:t,deps:[],target:s.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=s.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.33",type:t,isStandalone:!0,selector:"button[spDayTrigger]",inputs:{date:["spDayTrigger","date"]},outputs:{dateSelect:"dateSelect"},usesOnChanges:!0,ngImport:s})}};s.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.33",ngImport:s,type:C,decorators:[{type:mt,args:[{selector:"button[spDayTrigger]",standalone:!0}]}],propDecorators:{date:[{type:gt,args:["spDayTrigger"]}],dateSelect:[{type:dt}]}});import{Directive as yt,ElementRef as vt,Input as Dt,inject as X}from"@angular/core";import{bindDateField as It,pointFor as Ct}from"../core/index.js";import*as n from"@angular/core";var N=class t{constructor(){this.endpoint="start",this.el=X(vt),this.root=X(e)}ngOnChanges(){this.root.store&&this.bind()}ngOnInit(){this.bind()}bind(){this.root.ngOnInit(),this.stop?.(),typeof window>"u"?this.el.nativeElement.setAttribute("value",Ct(this.root.store.getSnapshot().draft,this.endpoint)?.date??""):this.stop=It(this.el.nativeElement,this.root.store,this.endpoint)}ngOnDestroy(){this.stop?.()}static{this.\u0275fac=n.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.33",ngImport:n,type:t,deps:[],target:n.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=n.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.33",type:t,isStandalone:!0,selector:"input[spDateField]",inputs:{endpoint:["spDateField","endpoint"]},usesOnChanges:!0,ngImport:n})}};n.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.33",ngImport:n,type:N,decorators:[{type:yt,args:[{selector:"input[spDateField]",standalone:!0}]}],propDecorators:{endpoint:[{type:Dt,args:["spDateField"]}]}});import{Directive as bt,ElementRef as Et,Input as W,inject as L}from"@angular/core";import{bindTimeSegment as Ot,pointFor as St,timeSegmentValue as Tt}from"../core/index.js";import*as a from"@angular/core";var k=class t{constructor(){this.part="hour",this.endpoint="start",this.el=L(Et),this.root=L(e)}ngOnChanges(){this.root.store&&this.bind()}ngOnInit(){this.bind()}bind(){this.root.ngOnInit(),this.stop?.(),typeof window>"u"?this.el.nativeElement.setAttribute("value",Tt(St(this.root.store.getSnapshot().draft,this.endpoint)?.time,this.part,this.root.store.getSnapshot().options.hourCycle)):this.stop=Ot(this.el.nativeElement,this.root.store,this.part,this.endpoint)}ngOnDestroy(){this.stop?.()}static{this.\u0275fac=a.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.33",ngImport:a,type:t,deps:[],target:a.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=a.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.33",type:t,isStandalone:!0,selector:"input[spTimeSegment],select[spTimeSegment]",inputs:{part:["spTimeSegment","part"],endpoint:"endpoint"},usesOnChanges:!0,ngImport:a})}};a.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.33",ngImport:a,type:k,decorators:[{type:bt,args:[{selector:"input[spTimeSegment],select[spTimeSegment]",standalone:!0}]}],propDecorators:{part:[{type:W,args:["spTimeSegment"]}],endpoint:[{type:W}]}});import{Directive as Vt,ElementRef as xt,Input as H,inject as Ft}from"@angular/core";import*as p from"@angular/core";var b=class t{constructor(){this.date="",this.el=Ft(xt)}ngOnChanges(){this.el.nativeElement.textContent=this.label??String(Number(this.date.slice(-2)))}static{this.\u0275fac=p.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.33",ngImport:p,type:t,deps:[],target:p.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=p.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.33",type:t,isStandalone:!0,selector:"[spNumber]",inputs:{date:["spNumber","date"],label:"label"},usesOnChanges:!0,ngImport:p})}};p.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.33",ngImport:p,type:b,decorators:[{type:Vt,args:[{selector:"[spNumber]",standalone:!0}]}],propDecorators:{date:[{type:H,args:["spNumber"]}],label:[{type:H}]}});import{Directive as Rt,ElementRef as Mt,Input as Nt,inject as Y}from"@angular/core";import{bindMonthScroller as kt,monthScrollerMarkup as wt}from"../core/index.js";import*as c from"@angular/core";var E=class t{constructor(){this.options={},this.el=Y(Mt),this.root=Y(e)}ngOnInit(){this.root.ngOnInit(),typeof window<"u"?this.stop=kt(this.el.nativeElement,this.root.store,this.options):this.el.nativeElement.innerHTML=wt(this.root.store,this.options)}ngOnDestroy(){this.stop?.()}static{this.\u0275fac=c.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.33",ngImport:c,type:t,deps:[],target:c.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=c.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.33",type:t,isStandalone:!0,selector:"[spContinuous]",inputs:{options:["spContinuous","options"]},ngImport:c})}};c.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.33",ngImport:c,type:E,decorators:[{type:Rt,args:[{selector:"[spContinuous]",standalone:!0}]}],propDecorators:{options:[{type:Nt,args:["spContinuous"]}]}});import{Directive as Pt,ElementRef as jt,inject as At}from"@angular/core";import*as l from"@angular/core";var O=class t{constructor(){this.el=At(jt),this.el.nativeElement.setAttribute("role","grid")}static{this.\u0275fac=l.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.33",ngImport:l,type:t,deps:[],target:l.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=l.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.33",type:t,isStandalone:!0,selector:"[spGrid]",ngImport:l})}};l.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.33",ngImport:l,type:O,decorators:[{type:Pt,args:[{selector:"[spGrid]",standalone:!0}]}],ctorParameters:()=>[]});import{Directive as Kt,ElementRef as Xt,inject as Wt}from"@angular/core";import*as m from"@angular/core";var S=class t{constructor(){this.el=Wt(Xt),this.el.nativeElement.setAttribute("role","row")}static{this.\u0275fac=m.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.33",ngImport:m,type:t,deps:[],target:m.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=m.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.33",type:t,isStandalone:!0,selector:"[spWeek]",ngImport:m})}};m.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.33",ngImport:m,type:S,decorators:[{type:Kt,args:[{selector:"[spWeek]",standalone:!0}]}],ctorParameters:()=>[]});import{Directive as Lt,ElementRef as Ht,Input as G,inject as q}from"@angular/core";import{attribute as Yt,dayAttributes as Gt}from"../core/index.js";import*as h from"@angular/core";var T=class t{constructor(){this.date="",this.outside=!1,this.el=q(Ht),this.root=q(e)}ngOnInit(){this.root.ngOnInit(),this.update(),this.stop=this.root.store.subscribe(()=>this.update())}ngOnChanges(){this.root.store&&this.update()}update(){this.el.nativeElement.setAttribute("role","gridcell");for(let[i,y]of Object.entries(Gt(this.root.store,this.date,this.outside)))Yt(this.el.nativeElement,i,y)}ngOnDestroy(){this.stop?.()}static{this.\u0275fac=h.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.33",ngImport:h,type:t,deps:[],target:h.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=h.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.33",type:t,isStandalone:!0,selector:"[spCell]",inputs:{date:["spCell","date"],outside:"outside"},usesOnChanges:!0,ngImport:h})}};h.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.33",ngImport:h,type:T,decorators:[{type:Lt,args:[{selector:"[spCell]",standalone:!0}]}],propDecorators:{date:[{type:G,args:["spCell"]}],outside:[{type:G}]}});import{Directive as qt,ElementRef as zt,inject as z}from"@angular/core";import{formatMonth as Bt}from"../core/index.js";import*as g from"@angular/core";var V=class t{constructor(){this.el=z(zt),this.root=z(e)}ngOnInit(){this.root.ngOnInit();let i=()=>this.el.nativeElement.textContent=Bt(this.root.store.getSnapshot().visibleMonth,this.root.store.getSnapshot().options.locale);i(),this.stop=this.root.store.subscribe(i)}ngOnDestroy(){this.stop?.()}static{this.\u0275fac=g.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.33",ngImport:g,type:t,deps:[],target:g.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=g.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.33",type:t,isStandalone:!0,selector:"[spHeading]",ngImport:g})}};g.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.33",ngImport:g,type:V,decorators:[{type:qt,args:[{selector:"[spHeading]",standalone:!0}]}]});import{Directive as Jt,ElementRef as Qt,Input as B,inject as J}from"@angular/core";import{attribute as Q,weekdayLabels as Ut}from"../core/index.js";import*as d from"@angular/core";var x=class t{constructor(){this.day=0,this.el=J(Qt),this.root=J(e)}ngOnInit(){this.root.ngOnInit(),this.update(),this.stop=this.root.store.subscribe(()=>this.update())}ngOnChanges(){this.root.store&&this.update()}update(){let i=this.root.store.getSnapshot();this.el.nativeElement.textContent=this.label??Ut(i.options.locale,i.options.weekStartsOn).find(y=>y.weekday===this.day)?.label??"",Q(this.el.nativeElement,"data-weekend",i.options.weekend.includes(this.day)),Q(this.el.nativeElement,"data-weekday",String(this.day))}ngOnDestroy(){this.stop?.()}static{this.\u0275fac=d.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.33",ngImport:d,type:t,deps:[],target:d.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=d.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.33",type:t,isStandalone:!0,selector:"[spWeekday]",inputs:{day:["spWeekday","day"],label:"label"},usesOnChanges:!0,ngImport:d})}};d.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.33",ngImport:d,type:x,decorators:[{type:Jt,args:[{selector:"[spWeekday]",standalone:!0}]}],propDecorators:{day:[{type:B,args:["spWeekday"]}],label:[{type:B}]}});import{Directive as Zt,ElementRef as $t,inject as U}from"@angular/core";import*as u from"@angular/core";var D=class t{constructor(){this.el=U($t),this.root=U(e)}ngOnInit(){this.root.ngOnInit();let i=this.el.nativeElement,y=i.hasAttribute("spMonthSelect")?"month":"year",R=()=>{i.value=String(this.root.store.getSnapshot().visibleMonth[y]),i.disabled=!!this.root.store.getSnapshot().options.disabled},M=()=>{i.disabled||this.root.store.setVisibleMonth({...this.root.store.getSnapshot().visibleMonth,[y]:Number(i.value)})};R();let w=this.root.store.subscribe(R);typeof window<"u"&&i.addEventListener("change",M),this.stop=()=>{w(),i.removeEventListener("change",M)}}ngOnDestroy(){this.stop?.()}static{this.\u0275fac=u.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.33",ngImport:u,type:t,deps:[],target:u.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=u.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.33",type:t,isStandalone:!0,selector:"select[spMonthSelect],select[spYearSelect]",ngImport:u})}};u.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.33",ngImport:u,type:D,decorators:[{type:Zt,args:[{selector:"select[spMonthSelect],select[spYearSelect]",standalone:!0}]}]});import{Directive as _t,ElementRef as te,Input as Z,inject as $}from"@angular/core";import*as f from"@angular/core";var F=class t{constructor(){this.el=$(te),this.root=$(e)}ngOnInit(){this.root.ngOnInit();let i=()=>{this.el.nativeElement.disabled=!!this.root.store.getSnapshot().options.disabled},y=!0,R=w=>queueMicrotask(()=>{!y||w.defaultPrevented||this.el.nativeElement.disabled||(this.spNavigate!==void 0&&this.root.store.navigate(this.spNavigate),this.spAction&&this.root.store[this.spAction]())});i();let M=this.root.store.subscribe(i);typeof window<"u"&&this.el.nativeElement.addEventListener("click",R),this.stop=()=>{y=!1,M(),this.el.nativeElement.removeEventListener("click",R)}}ngOnDestroy(){this.stop?.()}static{this.\u0275fac=f.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.33",ngImport:f,type:t,deps:[],target:f.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=f.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.33",type:t,isStandalone:!0,selector:"button[spNavigate],button[spAction]",inputs:{spNavigate:"spNavigate",spAction:"spAction"},ngImport:f})}};f.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.33",ngImport:f,type:F,decorators:[{type:_t,args:[{selector:"button[spNavigate],button[spAction]",standalone:!0}]}],propDecorators:{spNavigate:[{type:Z}],spAction:[{type:Z}]}});var ni={Root:v,Continuous:E,Grid:O,Week:S,Cell:T,Heading:V,Weekday:x,Navigation:F,MonthSelect:D,YearSelect:D,View:I,DayTrigger:C,Number:b};export{F as Action,ni as Calendar,b as CalendarNumber,I as CalendarView,T as Cell,E as Continuous,N as DateField,C as DayTrigger,O as Grid,V as Heading,D as MonthYearSelect,e as PICKER_CONTEXT,v as PickerRoot,k as TimeSegmentField,S as Week,x as Weekday,st as usePickerStore};
@@ -0,0 +1,7 @@
1
+ ---
2
+ const{action,...attributes}=Astro.props;
3
+ ---
4
+
5
+ <button {...attributes} type="button" data-picker-action={action}>
6
+ <slot>{action}</slot>
7
+ </button>
@@ -0,0 +1,10 @@
1
+ ---
2
+ import{calendarMarkup,createPickerStore,type PickerOptions,type CalendarRenderOptions}from"../core/index.js";interface Props{options:PickerOptions;renderOptions?:Pick<CalendarRenderOptions,"weekdays">;class?:string}const{options,renderOptions={},...attributes}=Astro.props;const html=calendarMarkup(createPickerStore(options),renderOptions);
3
+ ---
4
+
5
+ <div
6
+ {...attributes}
7
+ data-calendar
8
+ data-calendar-options={JSON.stringify(renderOptions)}
9
+ set:html={html}
10
+ />
@@ -0,0 +1,13 @@
1
+ ---
2
+ import{createPickerStore,dayAttributes,type PickerOptions}from"../core/index.js";import type{HTMLAttributes}from"astro/types";interface Props extends HTMLAttributes<"div">{date:string;outside?:boolean;options?:PickerOptions}const{date,outside=false,options={},...attributes}=Astro.props;const store=createPickerStore(options);const state=dayAttributes(store,date,outside);store.destroy();
3
+ ---
4
+
5
+ <div
6
+ {...attributes}
7
+ {...state}
8
+ role="gridcell"
9
+ data-part="cell"
10
+ data-calendar-cell
11
+ >
12
+ <slot />
13
+ </div>
@@ -0,0 +1,9 @@
1
+ ---
2
+ import{createPickerStore,monthScrollerMarkup,type PickerOptions,type MonthScrollerOptions}from"../core/index.js";interface Props{options?:MonthScrollerOptions;pickerOptions?:PickerOptions;class?:string;style?:string}const{options={},pickerOptions={},...attributes}=Astro.props;const store=createPickerStore(pickerOptions),html=monthScrollerMarkup(store,options);store.destroy();
3
+ ---
4
+
5
+ <div
6
+ {...attributes}
7
+ data-continuous={JSON.stringify(options)}
8
+ set:html={html}
9
+ />
@@ -0,0 +1,7 @@
1
+ ---
2
+ const{date,...attributes}=Astro.props;
3
+ ---
4
+
5
+ <button {...attributes} type="button" data-day-trigger data-date={date}>
6
+ <slot />
7
+ </button>
@@ -0,0 +1,11 @@
1
+ ---
2
+ const{endpoint="start",...attributes}=Astro.props;
3
+ ---
4
+
5
+ <input
6
+ {...attributes}
7
+ type="text"
8
+ placeholder="YYYY-MM-DD"
9
+ data-date-field
10
+ data-endpoint={endpoint}
11
+ />
@@ -0,0 +1,3 @@
1
+ <div {...Astro.props} role="grid" data-part="grid">
2
+ <slot />
3
+ </div>
@@ -0,0 +1,7 @@
1
+ ---
2
+ import{createPickerStore,formatMonth,type PickerOptions}from"../core/index.js";interface Props{options?:PickerOptions;class?:string}const{options={},...attributes}=Astro.props;const store=createPickerStore(options),title=formatMonth(store.getSnapshot().visibleMonth,store.getSnapshot().options.locale);store.destroy();
3
+ ---
4
+
5
+ <h3 {...attributes} data-month-heading aria-live="polite">
6
+ <slot>{title}</slot>
7
+ </h3>
@@ -0,0 +1,13 @@
1
+ ---
2
+ const{month=1,...attributes}=Astro.props;
3
+ ---
4
+
5
+ <select {...attributes} data-month-select>
6
+ <slot>
7
+ {Array.from({ length: 12 }, (_, i) => (
8
+ <option value={i + 1} selected={i + 1 === month}>
9
+ {i + 1}
10
+ </option>
11
+ ))}
12
+ </slot>
13
+ </select>
@@ -0,0 +1,7 @@
1
+ ---
2
+ const{date,...attributes}=Astro.props;
3
+ ---
4
+
5
+ <span {...attributes} data-part="number">
6
+ <slot>{Number(date.slice(-2))}</slot>
7
+ </span>
@@ -0,0 +1,10 @@
1
+ ---
2
+ const{endpoint="start",...attributes}=Astro.props;
3
+ ---
4
+
5
+ <select {...attributes} data-time-segment="period" data-endpoint={endpoint}>
6
+ <slot>
7
+ <option>AM</option>
8
+ <option>PM</option>
9
+ </slot>
10
+ </select>
@@ -0,0 +1,15 @@
1
+ ---
2
+ import type{HTMLAttributes}from"astro/types";import type{PickerOptions}from"../core/index.js";interface Props extends HTMLAttributes<"div">{options:Omit<PickerOptions,"isDateUnavailable"|"isTimeUnavailable"|"isRangeUnavailable"|"onValueChange"|"onSelect">;class?:string}const{options,...attributes}=Astro.props;
3
+ ---
4
+
5
+ <sp-picker
6
+ {...attributes}
7
+ data-picker-root
8
+ data-config={JSON.stringify(options)}
9
+ aria-busy="true"
10
+ >
11
+ <fieldset disabled data-picker-pending style="display: contents">
12
+ <slot />
13
+ </fieldset>
14
+ </sp-picker>
15
+ <script>import{mountPicker}from"../vanilla/index.js";class PickerElement extends HTMLElement{cleanup?:()=>void;connectedCallback(){queueMicrotask(()=>{if(!this.isConnected||this.cleanup)return;const mounted=mountPicker(this,JSON.parse(this.dataset.config??"{}"));this.cleanup=mounted.destroy;const pending=this.querySelector<HTMLFieldSetElement>("fieldset[data-picker-pending]");if(pending)pending.disabled=false;this.setAttribute("aria-busy","false")})}disconnectedCallback(){this.cleanup?.();this.cleanup=undefined}}if(!customElements.get("sp-picker"))customElements.define("sp-picker",PickerElement);</script>
@@ -0,0 +1,10 @@
1
+ ---
2
+ const{part="hour",endpoint="start",...attributes}=Astro.props;
3
+ ---
4
+
5
+ <input
6
+ {...attributes}
7
+ type="number"
8
+ data-time-segment={part}
9
+ data-endpoint={endpoint}
10
+ />
@@ -0,0 +1,3 @@
1
+ <div {...Astro.props} role="row" data-part="week">
2
+ <slot />
3
+ </div>
@@ -0,0 +1,13 @@
1
+ ---
2
+ import{weekdayLabels,type PickerOptions}from"../core/index.js";interface Props{day:number;options?:PickerOptions;class?:string}const{day,options={},...attributes}=Astro.props;const label=weekdayLabels(options.locale??"en-GB",options.weekStartsOn??1).find(d=>d.weekday===day)?.label;
3
+ ---
4
+
5
+ <span
6
+ {...attributes}
7
+ role="columnheader"
8
+ data-part="weekday"
9
+ data-weekday={day}
10
+ data-weekend={(options.weekend ?? [0, 6]).includes(day)}
11
+ >
12
+ <slot>{label}</slot>
13
+ </span>
@@ -0,0 +1,13 @@
1
+ ---
2
+ const{year=2026,from=1900,to=2100,...attributes}=Astro.props;
3
+ ---
4
+
5
+ <select {...attributes} data-year-select>
6
+ <slot>
7
+ {Array.from({ length: to - from + 1 }, (_, i) => (
8
+ <option value={from + i} selected={from + i === year}>
9
+ {from + i}
10
+ </option>
11
+ ))}
12
+ </slot>
13
+ </select>