@mirohq/design-system-calendar 0.4.7 → 1.0.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.
- package/dist/main.js +482 -482
- package/dist/main.js.map +1 -1
- package/dist/module.js +488 -488
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +278 -44
- package/package.json +16 -11
package/dist/types.d.ts
CHANGED
|
@@ -1,89 +1,323 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import react__default, { ComponentPropsWithRef, ReactNode, ForwardRefExoticComponent } from 'react';
|
|
3
|
+
import { DateValue, DateRange } from 'react-aria';
|
|
1
4
|
import * as _stitches_react_types_styled_component from '@stitches/react/types/styled-component';
|
|
2
5
|
import * as _mirohq_design_system_stitches from '@mirohq/design-system-stitches';
|
|
6
|
+
import { StrictComponentProps } from '@mirohq/design-system-stitches';
|
|
3
7
|
import * as _mirohq_design_system_primitive from '@mirohq/design-system-primitive';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
+
import * as packages_components_internal_base_button_src_base_button from 'packages/components/internal/base-button/src/base-button';
|
|
9
|
+
import * as _mirohq_design_system_hooks_use_press from '@mirohq/design-system-hooks/use-press';
|
|
10
|
+
import * as _radix_ui_react_popover from '@radix-ui/react-popover';
|
|
11
|
+
import * as _mirohq_design_system_components_primitive from '@mirohq/design-system-components/primitive';
|
|
12
|
+
import { BaseButtonProps } from '@mirohq/design-system-base-button';
|
|
8
13
|
|
|
9
|
-
|
|
10
|
-
id: string;
|
|
11
|
-
label: string;
|
|
12
|
-
date?: CalendarDate;
|
|
13
|
-
range?: DateRange;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
declare const StyledCalendar: React.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<React.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"div">>>, never> & _stitches_react_types_styled_component.TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & React.RefAttributes<HTMLDivElement>> & _mirohq_design_system_stitches.StitchesInternals<React.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"div">>, {}, {}>;
|
|
14
|
+
declare const StyledCalendar: react.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<react.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"div">>>, never> & _stitches_react_types_styled_component.TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & react.RefAttributes<HTMLDivElement>> & _mirohq_design_system_stitches.StitchesInternals<react.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"div">>, {}, {}>;
|
|
17
15
|
declare type StyledCalendarProps = ComponentPropsWithRef<typeof StyledCalendar>;
|
|
18
|
-
|
|
16
|
+
|
|
17
|
+
interface CalendarBaseProps extends Omit<StyledCalendarProps, 'defaultValue' | 'onChange'> {
|
|
18
|
+
/**
|
|
19
|
+
* The number of months visible on page
|
|
20
|
+
* @default 1
|
|
21
|
+
*/
|
|
22
|
+
visibleMonths?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Minimum allowed date to select from
|
|
25
|
+
*/
|
|
26
|
+
minDate?: DateValue;
|
|
27
|
+
/**
|
|
28
|
+
* Maximum allowed date to select from
|
|
29
|
+
*/
|
|
30
|
+
maxDate?: DateValue;
|
|
31
|
+
/**
|
|
32
|
+
* The content
|
|
33
|
+
*/
|
|
34
|
+
children?: ReactNode;
|
|
35
|
+
/**
|
|
36
|
+
* The open state of the calendar when it is initially rendered. Use when you do
|
|
37
|
+
* not need to control its open state.
|
|
38
|
+
* @default false
|
|
39
|
+
*/
|
|
40
|
+
defaultOpen?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* The controlled open state of the calendar. Must be used in conjunction with
|
|
43
|
+
* onOpen and onClose.
|
|
44
|
+
*/
|
|
45
|
+
open?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Event handler called when the calendar opens.
|
|
48
|
+
*/
|
|
49
|
+
onOpen?: () => void;
|
|
50
|
+
/**
|
|
51
|
+
* Event handler called when the calendar closes.
|
|
52
|
+
*/
|
|
53
|
+
onClose?: () => void;
|
|
54
|
+
}
|
|
55
|
+
interface CalendarDatePickerProps extends CalendarBaseProps {
|
|
19
56
|
/**
|
|
20
57
|
* Type of calendar
|
|
21
58
|
*/
|
|
22
|
-
picker
|
|
59
|
+
picker: 'single';
|
|
23
60
|
/**
|
|
24
61
|
* Value given for already pre-selected date
|
|
25
62
|
*/
|
|
26
|
-
defaultValue?:
|
|
63
|
+
defaultValue?: DateValue;
|
|
27
64
|
/**
|
|
28
|
-
*
|
|
65
|
+
* The controlled value of the Calendar. Should be used in conjunction with
|
|
66
|
+
* onValueChange.
|
|
29
67
|
*/
|
|
30
|
-
|
|
68
|
+
value?: DateValue;
|
|
31
69
|
/**
|
|
32
|
-
*
|
|
70
|
+
* Event handler called when the date value changes
|
|
33
71
|
*/
|
|
34
|
-
|
|
72
|
+
onValueChange?: (value: DateValue | undefined) => void;
|
|
73
|
+
}
|
|
74
|
+
interface CalendarRangePickerProps extends CalendarBaseProps {
|
|
35
75
|
/**
|
|
36
|
-
*
|
|
76
|
+
* Type of calendar
|
|
37
77
|
*/
|
|
38
|
-
|
|
78
|
+
picker: 'range';
|
|
39
79
|
/**
|
|
40
|
-
*
|
|
80
|
+
* Value given for already pre-selected date
|
|
41
81
|
*/
|
|
42
|
-
|
|
82
|
+
defaultValue?: DateRange;
|
|
83
|
+
/**
|
|
84
|
+
* The controlled value of the Calendar. Should be used in conjunction with
|
|
85
|
+
* onValueChange.
|
|
86
|
+
*/
|
|
87
|
+
value?: DateRange;
|
|
43
88
|
/**
|
|
44
|
-
*
|
|
89
|
+
* Event handler called when the date value changes
|
|
45
90
|
*/
|
|
46
|
-
|
|
91
|
+
onValueChange?: (value: DateRange | undefined) => void;
|
|
92
|
+
}
|
|
93
|
+
declare type PointerDownOutsideEvent = CustomEvent<{
|
|
94
|
+
originalEvent: PointerEvent;
|
|
95
|
+
}>;
|
|
96
|
+
declare type Side = 'top' | 'right' | 'bottom' | 'left';
|
|
97
|
+
declare type Align = 'start' | 'center' | 'end';
|
|
98
|
+
declare type Sticky = 'partial' | 'always';
|
|
99
|
+
|
|
100
|
+
declare const StyledTrigger: react.ForwardRefExoticComponent<(Omit<Omit<Omit<Omit<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<react.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"button">>>, never> & _stitches_react_types_styled_component.TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & react.RefAttributes<HTMLButtonElement> & _mirohq_design_system_hooks_use_press.PressProps & packages_components_internal_base_button_src_base_button.HoverEvents, "ref"> & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>, _mirohq_design_system_stitches.ForbiddenProps> & {
|
|
101
|
+
children?: react.ReactNode;
|
|
102
|
+
}, "v1" | "withClearButton"> & _stitches_react_types_styled_component.TransformProps<{
|
|
103
|
+
v1?: boolean | "false" | "true" | undefined;
|
|
104
|
+
withClearButton?: boolean | "true" | undefined;
|
|
105
|
+
}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> | Omit<Omit<Omit<Omit<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<react.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"button">>>, never> & _stitches_react_types_styled_component.TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & react.RefAttributes<HTMLButtonElement> & _mirohq_design_system_hooks_use_press.PressProps & packages_components_internal_base_button_src_base_button.HoverEvents & react.AnchorHTMLAttributes<"a"> & {
|
|
106
|
+
href: string;
|
|
107
|
+
}, "ref"> & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>, _mirohq_design_system_stitches.ForbiddenProps> & {
|
|
108
|
+
children?: react.ReactNode;
|
|
109
|
+
}, "v1" | "withClearButton"> & _stitches_react_types_styled_component.TransformProps<{
|
|
110
|
+
v1?: boolean | "false" | "true" | undefined;
|
|
111
|
+
withClearButton?: boolean | "true" | undefined;
|
|
112
|
+
}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref">) & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>> & _mirohq_design_system_stitches.StitchesInternals<react.ForwardRefExoticComponent<(Omit<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<react.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"button">>>, never> & _stitches_react_types_styled_component.TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & react.RefAttributes<HTMLButtonElement> & _mirohq_design_system_hooks_use_press.PressProps & packages_components_internal_base_button_src_base_button.HoverEvents, "ref"> | Omit<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<react.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"button">>>, never> & _stitches_react_types_styled_component.TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & react.RefAttributes<HTMLButtonElement> & _mirohq_design_system_hooks_use_press.PressProps & packages_components_internal_base_button_src_base_button.HoverEvents & react.AnchorHTMLAttributes<"a"> & {
|
|
113
|
+
href: string;
|
|
114
|
+
}, "ref">) & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>, {
|
|
115
|
+
v1?: boolean | "false" | "true" | undefined;
|
|
116
|
+
withClearButton?: boolean | "true" | undefined;
|
|
117
|
+
}, {}>;
|
|
118
|
+
declare type StyledTriggerProps = StrictComponentProps<typeof StyledTrigger>;
|
|
119
|
+
|
|
120
|
+
declare type TriggerSharedProps = Omit<StyledTriggerProps, 'v1' | 'withClearButton'> & {
|
|
47
121
|
/**
|
|
48
|
-
*
|
|
122
|
+
* The content that will be rendered inside the Calendar trigger when there is no value
|
|
49
123
|
*/
|
|
50
|
-
|
|
124
|
+
placeholder?: string;
|
|
51
125
|
/**
|
|
52
|
-
*
|
|
126
|
+
* Show a button to clear the Calendar value
|
|
127
|
+
* @default false
|
|
53
128
|
*/
|
|
54
|
-
|
|
129
|
+
clearable?: boolean;
|
|
130
|
+
};
|
|
131
|
+
declare type TriggerProps = TriggerSharedProps & ({
|
|
132
|
+
clearable: false;
|
|
133
|
+
clearLabel?: never;
|
|
134
|
+
onClear?: never;
|
|
135
|
+
} | {
|
|
55
136
|
/**
|
|
56
137
|
* Event handler called when the calendar is cleared
|
|
57
138
|
*/
|
|
58
139
|
onClear?: () => void;
|
|
59
140
|
/**
|
|
60
|
-
*
|
|
141
|
+
* The label text for Trigger's action button when Combobox has values selected. Will be rendered in a Tooltip.
|
|
61
142
|
*/
|
|
62
|
-
|
|
143
|
+
clearLabel: string;
|
|
144
|
+
});
|
|
145
|
+
declare const Trigger: react__default.ForwardRefExoticComponent<(Omit<Omit<StyledTriggerProps, "v1" | "withClearButton"> & {
|
|
63
146
|
/**
|
|
64
|
-
* The
|
|
147
|
+
* The content that will be rendered inside the Calendar trigger when there is no value
|
|
148
|
+
*/
|
|
149
|
+
placeholder?: string | undefined;
|
|
150
|
+
/**
|
|
151
|
+
* Show a button to clear the Calendar value
|
|
152
|
+
* @default false
|
|
65
153
|
*/
|
|
66
|
-
|
|
154
|
+
clearable?: boolean | undefined;
|
|
155
|
+
} & {
|
|
156
|
+
clearable: false;
|
|
157
|
+
clearLabel?: undefined;
|
|
158
|
+
onClear?: undefined;
|
|
159
|
+
}, "ref"> | Omit<Omit<StyledTriggerProps, "v1" | "withClearButton"> & {
|
|
67
160
|
/**
|
|
68
161
|
* The content that will be rendered inside the Calendar trigger when there is no value
|
|
69
162
|
*/
|
|
70
|
-
placeholder?: string;
|
|
163
|
+
placeholder?: string | undefined;
|
|
71
164
|
/**
|
|
72
|
-
*
|
|
165
|
+
* Show a button to clear the Calendar value
|
|
166
|
+
* @default false
|
|
73
167
|
*/
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
|
|
168
|
+
clearable?: boolean | undefined;
|
|
169
|
+
} & {
|
|
170
|
+
/**
|
|
171
|
+
* Event handler called when the calendar is cleared
|
|
172
|
+
*/
|
|
173
|
+
onClear?: (() => void) | undefined;
|
|
174
|
+
/**
|
|
175
|
+
* The label text for Trigger's action button when Combobox has values selected. Will be rendered in a Tooltip.
|
|
176
|
+
*/
|
|
177
|
+
clearLabel: string;
|
|
178
|
+
}, "ref">) & react__default.RefAttributes<HTMLButtonElement>>;
|
|
77
179
|
|
|
78
|
-
|
|
180
|
+
declare const StyledContent: react.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<react.ForwardRefExoticComponent<_radix_ui_react_popover.PopoverContentProps & react.RefAttributes<HTMLDivElement>>>, never> & _stitches_react_types_styled_component.TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & react.RefAttributes<HTMLDivElement>> & _mirohq_design_system_stitches.StitchesInternals<react.ForwardRefExoticComponent<_radix_ui_react_popover.PopoverContentProps & react.RefAttributes<HTMLDivElement>>, {}, {}>;
|
|
181
|
+
declare type StyledContentProps = ComponentPropsWithRef<typeof StyledContent>;
|
|
182
|
+
|
|
183
|
+
declare type ContentProps = StyledContentProps & {
|
|
79
184
|
/**
|
|
80
|
-
*
|
|
185
|
+
* Calendar's content.
|
|
81
186
|
*/
|
|
82
|
-
|
|
187
|
+
children?: ReactNode;
|
|
83
188
|
/**
|
|
84
|
-
* Event handler called when the
|
|
189
|
+
* Event handler called when focus moves to the trigger after closing. It can
|
|
190
|
+
* be prevented by calling event.preventDefault.
|
|
191
|
+
*/
|
|
192
|
+
onCloseAutoFocus?: (event: Event) => void;
|
|
193
|
+
/**
|
|
194
|
+
* Event handler called when focus moves to the trigger after closing. It can
|
|
195
|
+
* be prevented by calling event.preventDefault.
|
|
196
|
+
*/
|
|
197
|
+
onEscapeKeyDown?: (event: KeyboardEvent) => void;
|
|
198
|
+
/**
|
|
199
|
+
* Event handler called when a pointer event occurs outside the bounds of the
|
|
200
|
+
* component. It can be prevented by calling event.preventDefault.
|
|
201
|
+
*/
|
|
202
|
+
onPointerDownOutside?: (event: PointerDownOutsideEvent) => void;
|
|
203
|
+
/**
|
|
204
|
+
* The preferred side of the anchor to render against when open. Will be
|
|
205
|
+
* reversed when collisions occur and avoidCollisions is enabled.
|
|
206
|
+
* @default 'bottom'
|
|
207
|
+
*/
|
|
208
|
+
side?: Side;
|
|
209
|
+
/**
|
|
210
|
+
* The distance in pixels from the anchor.
|
|
211
|
+
* @default CONTENT_OFFSET
|
|
212
|
+
*/
|
|
213
|
+
sideOffset?: number;
|
|
214
|
+
/**
|
|
215
|
+
* The preferred alignment against the anchor. May change when collisions
|
|
216
|
+
* occur.
|
|
217
|
+
* @default 'start'
|
|
218
|
+
*/
|
|
219
|
+
align?: Align;
|
|
220
|
+
/**
|
|
221
|
+
* An offset in pixels from the "start" or "end" alignment options.
|
|
222
|
+
* @default 0
|
|
223
|
+
*/
|
|
224
|
+
alignOffset?: number;
|
|
225
|
+
/**
|
|
226
|
+
* When true, overrides the side and align preferences to prevent collisions
|
|
227
|
+
* with boundary edges.
|
|
228
|
+
* @default true
|
|
229
|
+
*/
|
|
230
|
+
avoidCollisions?: boolean;
|
|
231
|
+
/**
|
|
232
|
+
* The element used as the collision boundary. By default this is the
|
|
233
|
+
* viewport, though you can provide additional element(s) to be included in
|
|
234
|
+
* this check.
|
|
235
|
+
*/
|
|
236
|
+
collisionBoundary?: Element | null;
|
|
237
|
+
/**
|
|
238
|
+
* The distance in pixels from the boundary edges where collision detection
|
|
239
|
+
* should occur. Accepts a number (same for all sides), or a partial padding
|
|
240
|
+
* object, for example: { top: 20, left: 20 }.
|
|
241
|
+
* @default 0
|
|
242
|
+
*/
|
|
243
|
+
collisionPadding?: number | Partial<Record<Side, number>>;
|
|
244
|
+
/**
|
|
245
|
+
* The sticky behavior on the align axis. "partial" will keep the content in the
|
|
246
|
+
* boundary as long as the trigger is at least partially in the boundary whilst
|
|
247
|
+
* "always" will keep the content in the boundary regardless.
|
|
248
|
+
* @default 'partial'
|
|
249
|
+
*/
|
|
250
|
+
sticky?: Sticky;
|
|
251
|
+
/**
|
|
252
|
+
* Whether to hide the content when the trigger becomes fully occluded.
|
|
253
|
+
* @default true
|
|
254
|
+
*/
|
|
255
|
+
hideWhenDetached?: boolean;
|
|
256
|
+
};
|
|
257
|
+
declare const Content: react__default.ForwardRefExoticComponent<Omit<ContentProps, "ref"> & react__default.RefAttributes<HTMLDivElement>>;
|
|
258
|
+
|
|
259
|
+
declare const StyledValue: react.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<react.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"span">>>, never> & _stitches_react_types_styled_component.TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & react.RefAttributes<HTMLSpanElement>> & _mirohq_design_system_stitches.StitchesInternals<react.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"span">>, {}, {}>;
|
|
260
|
+
declare type StyledValueProps = ComponentPropsWithRef<typeof StyledValue>;
|
|
261
|
+
|
|
262
|
+
declare type FormatOptions = Pick<Intl.DateTimeFormatOptions, 'weekday' | 'era' | 'year' | 'month' | 'day' | 'formatMatcher'>;
|
|
263
|
+
declare type ValueProps = StyledValueProps & {
|
|
264
|
+
format?: FormatOptions;
|
|
265
|
+
};
|
|
266
|
+
declare const Value: react__default.ForwardRefExoticComponent<Omit<ValueProps, "ref"> & react__default.RefAttributes<HTMLSpanElement>>;
|
|
267
|
+
|
|
268
|
+
declare type ClearButtonProps = BaseButtonProps & {
|
|
269
|
+
/**
|
|
270
|
+
* Event handler called when the calendar value is cleared
|
|
271
|
+
*/
|
|
272
|
+
onClear?: () => void;
|
|
273
|
+
};
|
|
274
|
+
declare const ClearButton: react__default.ForwardRefExoticComponent<(Omit<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<react__default.ForwardRefExoticComponent<_mirohq_design_system_components_primitive.PrimitiveProps<"button">>>, never> & _stitches_react_types_styled_component.TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & react__default.RefAttributes<HTMLButtonElement> & _mirohq_design_system_hooks_use_press.PressProps & packages_components_internal_base_button_src_base_button.HoverEvents & {
|
|
275
|
+
/**
|
|
276
|
+
* Event handler called when the calendar value is cleared
|
|
277
|
+
*/
|
|
278
|
+
onClear?: (() => void) | undefined;
|
|
279
|
+
}, "ref"> | Omit<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<react__default.ForwardRefExoticComponent<_mirohq_design_system_components_primitive.PrimitiveProps<"button">>>, never> & _stitches_react_types_styled_component.TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & react__default.RefAttributes<HTMLButtonElement> & _mirohq_design_system_hooks_use_press.PressProps & packages_components_internal_base_button_src_base_button.HoverEvents & react__default.AnchorHTMLAttributes<"a"> & {
|
|
280
|
+
href: string;
|
|
281
|
+
} & {
|
|
282
|
+
/**
|
|
283
|
+
* Event handler called when the calendar value is cleared
|
|
284
|
+
*/
|
|
285
|
+
onClear?: (() => void) | undefined;
|
|
286
|
+
}, "ref">) & react__default.RefAttributes<HTMLButtonElement>>;
|
|
287
|
+
|
|
288
|
+
declare type SaveButtonProps = BaseButtonProps & {
|
|
289
|
+
/**
|
|
290
|
+
* Event handler called when the calendar value is saved
|
|
291
|
+
*/
|
|
292
|
+
onSave?: () => void;
|
|
293
|
+
};
|
|
294
|
+
declare const SaveButton: react__default.ForwardRefExoticComponent<(Omit<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<react__default.ForwardRefExoticComponent<_mirohq_design_system_components_primitive.PrimitiveProps<"button">>>, never> & _stitches_react_types_styled_component.TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & react__default.RefAttributes<HTMLButtonElement> & _mirohq_design_system_hooks_use_press.PressProps & packages_components_internal_base_button_src_base_button.HoverEvents & {
|
|
295
|
+
/**
|
|
296
|
+
* Event handler called when the calendar value is saved
|
|
297
|
+
*/
|
|
298
|
+
onSave?: (() => void) | undefined;
|
|
299
|
+
}, "ref"> | Omit<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<react__default.ForwardRefExoticComponent<_mirohq_design_system_components_primitive.PrimitiveProps<"button">>>, never> & _stitches_react_types_styled_component.TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & react__default.RefAttributes<HTMLButtonElement> & _mirohq_design_system_hooks_use_press.PressProps & packages_components_internal_base_button_src_base_button.HoverEvents & react__default.AnchorHTMLAttributes<"a"> & {
|
|
300
|
+
href: string;
|
|
301
|
+
} & {
|
|
302
|
+
/**
|
|
303
|
+
* Event handler called when the calendar value is saved
|
|
304
|
+
*/
|
|
305
|
+
onSave?: (() => void) | undefined;
|
|
306
|
+
}, "ref">) & react__default.RefAttributes<HTMLButtonElement>>;
|
|
307
|
+
|
|
308
|
+
declare type CalendarProps = (CalendarDatePickerProps | CalendarRangePickerProps) & {
|
|
309
|
+
/**
|
|
310
|
+
* The locale for Calendar internationalization
|
|
85
311
|
*/
|
|
86
|
-
|
|
312
|
+
locale?: string;
|
|
313
|
+
};
|
|
314
|
+
declare const Calendar: ForwardRefExoticComponent<CalendarProps> & Partials;
|
|
315
|
+
interface Partials {
|
|
316
|
+
Trigger: typeof Trigger;
|
|
317
|
+
Content: typeof Content;
|
|
318
|
+
Value: typeof Value;
|
|
319
|
+
ClearButton: typeof ClearButton;
|
|
320
|
+
SaveButton: typeof SaveButton;
|
|
87
321
|
}
|
|
88
322
|
|
|
89
|
-
export { Calendar,
|
|
323
|
+
export { Calendar, ClearButtonProps as CalendarClearButtonProps, ContentProps as CalendarContentProps, CalendarProps, SaveButtonProps as CalendarSaveButtonProps, TriggerProps as CalendarTriggerProps, ValueProps as CalendarValueProps };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mirohq/design-system-calendar",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Miro",
|
|
6
6
|
"source": "src/index.ts",
|
|
@@ -23,24 +23,29 @@
|
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@stitches/react": "^1.2.8",
|
|
26
|
-
"react": "^16.14 || ^17 || ^18"
|
|
26
|
+
"react": "^16.14 || ^17 || ^18",
|
|
27
|
+
"react-dom": "^16.14 || ^17 || ^18"
|
|
27
28
|
},
|
|
28
29
|
"dependencies": {
|
|
29
30
|
"@internationalized/date": "^3.3.0",
|
|
31
|
+
"@radix-ui/react-popover": "^1.0.7",
|
|
32
|
+
"@radix-ui/react-use-controllable-state": "1.0.1",
|
|
30
33
|
"@react-types/datepicker": "^3.4.0",
|
|
34
|
+
"@react-types/shared": "^3.18.1",
|
|
31
35
|
"react-aria": "^3.25.0",
|
|
32
36
|
"react-stately": "^3.23.0",
|
|
33
|
-
"@mirohq/design-system-base-button": "^0.4.
|
|
34
|
-
"@mirohq/design-system-base-form": "^0.3.
|
|
35
|
-
"@mirohq/design-system-base-text-field": "^0.2.
|
|
36
|
-
"@mirohq/design-system-button": "^4.2.5",
|
|
37
|
+
"@mirohq/design-system-base-button": "^0.4.68",
|
|
38
|
+
"@mirohq/design-system-base-form": "^0.3.4",
|
|
39
|
+
"@mirohq/design-system-base-text-field": "^0.2.3",
|
|
37
40
|
"@mirohq/design-system-experiments": "^0.2.0",
|
|
38
|
-
"@mirohq/design-system-flex": "^2.1.
|
|
39
|
-
"@mirohq/design-system-
|
|
41
|
+
"@mirohq/design-system-flex": "^2.1.66",
|
|
42
|
+
"@mirohq/design-system-button": "^4.2.6",
|
|
43
|
+
"@mirohq/design-system-icons": "^0.62.1",
|
|
40
44
|
"@mirohq/design-system-primitive": "^1.1.2",
|
|
41
|
-
"@mirohq/design-system-
|
|
42
|
-
"@mirohq/design-system-
|
|
43
|
-
"@mirohq/design-system-tooltip": "^3.5.
|
|
45
|
+
"@mirohq/design-system-styles": "^1.2.30",
|
|
46
|
+
"@mirohq/design-system-stitches": "^2.6.30",
|
|
47
|
+
"@mirohq/design-system-tooltip": "^3.5.9",
|
|
48
|
+
"@mirohq/design-system-utils": "^0.15.5"
|
|
44
49
|
},
|
|
45
50
|
"scripts": {
|
|
46
51
|
"build": "rollup -c ../../../rollup.config.js",
|