@base-framework/ui 1.0.216 → 1.0.218

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.
@@ -0,0 +1,7 @@
1
+ export function CalendarHeader({ onMonthClick, onYearClick, next, previous }: {
2
+ onMonthClick: Function;
3
+ onYearClick: Function;
4
+ next: Function;
5
+ previous: Function;
6
+ }): object;
7
+ export default CalendarHeader;
@@ -0,0 +1 @@
1
+ export function DayHeader(day: string): object;
@@ -0,0 +1 @@
1
+ export function DaysOfWeekHeader(): object;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Create a month calendar component.
3
+ *
4
+ * @param {object} props
5
+ * @param {function} props.onMonthClick
6
+ * @param {function} props.onYearClick
7
+ * @param {function} props.next
8
+ * @param {function} props.previous
9
+ * @param {Array} props.cells
10
+ * @returns {object}
11
+ */
12
+ export const MonthCalendar: Function;
@@ -0,0 +1,5 @@
1
+ export function MonthSelector({ currentMonth, currentYear, onSelect }: {
2
+ currentMonth: number;
3
+ currentYear: number;
4
+ onSelect: Function;
5
+ }): object;
@@ -0,0 +1 @@
1
+ export function NavigationButton({ label, click }: object): object;
@@ -0,0 +1,71 @@
1
+ /**
2
+ * RangeCalendar
3
+ *
4
+ * A calendar component for selecting a start and end date.
5
+ *
6
+ * @class RangeCalendar
7
+ */
8
+ export class RangeCalendar extends Component {
9
+ /**
10
+ * Initial start ISO date (YYYY-MM-DD).
11
+ * @member {string|null} startDate
12
+ */
13
+ startDate: any;
14
+ /**
15
+ * Initial end ISO date (YYYY-MM-DD).
16
+ * @member {string|null} endDate
17
+ */
18
+ endDate: any;
19
+ /**
20
+ * Callback after both dates are chosen.
21
+ * @member {function|null} onRangeSelect
22
+ */
23
+ onRangeSelect: any;
24
+ /**
25
+ * Block dates before today.
26
+ * @member {boolean} blockPriorDates
27
+ */
28
+ blockPriorDates: boolean;
29
+ /**
30
+ * Initialize reactive data for today and current view.
31
+ *
32
+ * @returns {Data}
33
+ */
34
+ setData(): Data;
35
+ /**
36
+ * Initialize component state.
37
+ *
38
+ * @returns {{view:string,selecting:string,start:string|null,end:string|null}}
39
+ */
40
+ setupStates(): {
41
+ view: string;
42
+ selecting: string;
43
+ start: string | null;
44
+ end: string | null;
45
+ };
46
+ /**
47
+ * Handle a date cell click.
48
+ *
49
+ * @param {string} isoDate
50
+ * @returns {void}
51
+ */
52
+ handleClick(isoDate: string): void;
53
+ /**
54
+ * Update current month/year in data.
55
+ *
56
+ * @param {{month:number,year:number}} obj
57
+ * @returns {void}
58
+ */
59
+ setCurrent({ month, year }: {
60
+ month: number;
61
+ year: number;
62
+ }): void;
63
+ /**
64
+ * Render the range calendar.
65
+ *
66
+ * @returns {object}
67
+ */
68
+ render(): object;
69
+ }
70
+ import { Component } from '@base-framework/base';
71
+ import { Data } from '@base-framework/base';
@@ -0,0 +1,9 @@
1
+ export function RangeDayCell({ day, iso, disabled, isStart, isEnd, isBetween, click }: {
2
+ day: number;
3
+ iso: string;
4
+ disabled: boolean;
5
+ isStart: boolean;
6
+ isEnd: boolean;
7
+ isBetween: boolean;
8
+ click: Function;
9
+ }): object;
@@ -0,0 +1,3 @@
1
+ export function RangeDaysGrid({ cells }: {
2
+ cells: Array<object | null>;
3
+ }): object;
@@ -0,0 +1,7 @@
1
+ export function RangeToggle({ start, end, selecting, onSelectStart, onSelectEnd }: {
2
+ start: string | null;
3
+ end: string | null;
4
+ selecting: string;
5
+ onSelectStart: Function;
6
+ onSelectEnd: Function;
7
+ }): object;
@@ -0,0 +1,4 @@
1
+ export function YearSelector({ currentYear, onSelect }: {
2
+ currentYear: number;
3
+ onSelect: Function;
4
+ }): object;
@@ -9,6 +9,7 @@ export * from "./calendar/week/week-calendar.js";
9
9
  export * from "./calendar/week/week-cell.js";
10
10
  export * from "./calendar/week/week-cells.js";
11
11
  export * from "./calendar/week/week-header.js";
12
+ export * from "./calendar/range/range-calendar.js";
12
13
  export * from "./calendar/calendar.js";
13
14
  export * from "./calendar/utils.js";
14
15
  export * from "./lists/checkbox-col.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base-framework/ui",
3
- "version": "1.0.216",
3
+ "version": "1.0.218",
4
4
  "description": "This is a UI package that adds components and atoms that use Tailwind CSS and a theme based on Shadcn.",
5
5
  "main": "./dist/index.es.js",
6
6
  "scripts": {