@phillips/seldon 1.144.0 → 1.145.1
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/_virtual/build.js +4 -0
- package/dist/_virtual/defaults.js +4 -0
- package/dist/_virtual/encode-new-lines.js +4 -0
- package/dist/_virtual/encode-param-value.js +4 -0
- package/dist/_virtual/fold-line.js +4 -0
- package/dist/_virtual/format-date.js +4 -0
- package/dist/_virtual/format-duration.js +4 -0
- package/dist/_virtual/format-text.js +4 -0
- package/dist/_virtual/format.js +4 -0
- package/dist/_virtual/index.browser.js +6 -0
- package/dist/_virtual/index.cjs.production.min.js +4 -0
- package/dist/_virtual/index.esm.js +6 -0
- package/dist/_virtual/index10.js +4 -0
- package/dist/_virtual/index11.js +4 -0
- package/dist/_virtual/index12.js +4 -0
- package/dist/_virtual/index7.js +4 -0
- package/dist/_virtual/index8.js +4 -0
- package/dist/_virtual/index9.js +4 -0
- package/dist/_virtual/set-alarm.js +4 -0
- package/dist/_virtual/set-contact.js +4 -0
- package/dist/_virtual/set-description.js +4 -0
- package/dist/_virtual/set-geolocation.js +4 -0
- package/dist/_virtual/set-location.js +4 -0
- package/dist/_virtual/set-organizer.js +4 -0
- package/dist/_virtual/set-summary.js +4 -0
- package/dist/_virtual/validate.js +4 -0
- package/dist/components/AddToCalendar/AddToCalendar.d.ts +10 -0
- package/dist/components/AddToCalendar/AddToCalendar.js +62 -0
- package/dist/components/AddToCalendar/AddToCalendar.stories.d.ts +25 -0
- package/dist/components/AddToCalendar/AddToCalendar.test.d.ts +1 -0
- package/dist/components/AddToCalendar/calendarLinks.d.ts +6 -0
- package/dist/components/AddToCalendar/calendarLinks.js +89 -0
- package/dist/components/AddToCalendar/calendarLinks.test.d.ts +1 -0
- package/dist/components/AddToCalendar/index.d.ts +1 -0
- package/dist/components/AddToCalendar/types.d.ts +8 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +27 -25
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +49 -34
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +12 -12
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +208 -0
- package/dist/node_modules/{cmdk → @radix-ui/react-dropdown-menu}/node_modules/@radix-ui/react-primitive/dist/index.js +7 -6
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-slot/dist/index.js +49 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +52 -0
- package/dist/node_modules/@radix-ui/react-menu/dist/index.js +608 -0
- package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-arrow/dist/index.js +24 -0
- package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-collection/dist/index.js +48 -0
- package/dist/node_modules/@radix-ui/{react-dialog → react-menu}/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +4 -4
- package/dist/node_modules/@radix-ui/{react-dialog → react-menu}/node_modules/@radix-ui/react-focus-scope/dist/index.js +2 -2
- package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-popper/dist/index.js +218 -0
- package/dist/node_modules/@radix-ui/{react-dialog → react-menu}/node_modules/@radix-ui/react-portal/dist/index.js +1 -1
- package/dist/node_modules/@radix-ui/{react-dialog → react-menu}/node_modules/@radix-ui/react-presence/dist/index.js +4 -4
- package/dist/node_modules/@radix-ui/{react-dialog → react-menu}/node_modules/@radix-ui/react-primitive/dist/index.js +6 -5
- package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-roving-focus/dist/index.js +183 -0
- package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-slot/dist/index.js +49 -0
- package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +52 -0
- package/dist/node_modules/@radix-ui/react-popover/dist/index.js +5 -5
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +4 -4
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-focus-scope/dist/index.js +2 -2
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-popper/dist/index.js +5 -5
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-portal/dist/index.js +1 -1
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-presence/dist/index.js +2 -2
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-slot/dist/index.js +31 -30
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +1 -1
- package/dist/node_modules/cmdk/dist/index.js +2 -2
- package/dist/node_modules/date-fns/_lib/addLeadingZeros.js +7 -0
- package/dist/node_modules/date-fns/_lib/format/formatters.js +517 -0
- package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +59 -0
- package/dist/node_modules/date-fns/_lib/format/longFormatters.js +52 -0
- package/dist/node_modules/date-fns/_lib/protectedTokens.js +20 -0
- package/dist/node_modules/date-fns/addHours.js +9 -0
- package/dist/node_modules/date-fns/addMilliseconds.js +9 -0
- package/dist/node_modules/date-fns/constants.js +6 -5
- package/dist/node_modules/date-fns/format.js +58 -0
- package/dist/node_modules/date-fns/getDayOfYear.js +11 -0
- package/dist/node_modules/date-fns/getISOWeek.js +12 -0
- package/dist/node_modules/date-fns/getISOWeekYear.js +15 -0
- package/dist/node_modules/date-fns/getWeek.js +12 -0
- package/dist/node_modules/date-fns/getWeekYear.js +16 -0
- package/dist/node_modules/date-fns/isDate.js +7 -0
- package/dist/node_modules/date-fns/isValid.js +9 -0
- package/dist/node_modules/date-fns/startOfISOWeek.js +8 -0
- package/dist/node_modules/date-fns/startOfISOWeekYear.js +11 -0
- package/dist/node_modules/date-fns/startOfWeekYear.js +12 -0
- package/dist/node_modules/date-fns/startOfYear.js +9 -0
- package/dist/node_modules/date-fns-tz/dist/esm/_lib/getTimezoneOffsetInMilliseconds/index.js +7 -0
- package/dist/node_modules/date-fns-tz/dist/esm/_lib/newDateUTC/index.js +7 -0
- package/dist/node_modules/date-fns-tz/dist/esm/_lib/tzParseTimezone/index.js +63 -0
- package/dist/node_modules/date-fns-tz/dist/esm/_lib/tzPattern/index.js +4 -0
- package/dist/node_modules/date-fns-tz/dist/esm/_lib/tzTokenizeDate/index.js +71 -0
- package/dist/node_modules/date-fns-tz/dist/esm/toDate/index.js +180 -0
- package/dist/node_modules/date-fns-tz/dist/esm/toZonedTime/index.js +10 -0
- package/dist/node_modules/ics/dist/defaults.js +23 -0
- package/dist/node_modules/ics/dist/index.js +115 -0
- package/dist/node_modules/ics/dist/pipeline/build.js +50 -0
- package/dist/node_modules/ics/dist/pipeline/format.js +70 -0
- package/dist/node_modules/ics/dist/pipeline/index.js +53 -0
- package/dist/node_modules/ics/dist/pipeline/validate.js +17 -0
- package/dist/node_modules/ics/dist/schema/index.js +211 -0
- package/dist/node_modules/ics/dist/utils/encode-new-lines.js +9 -0
- package/dist/node_modules/ics/dist/utils/encode-param-value.js +9 -0
- package/dist/node_modules/ics/dist/utils/fold-line.js +14 -0
- package/dist/node_modules/ics/dist/utils/format-date.js +68 -0
- package/dist/node_modules/ics/dist/utils/format-duration.js +10 -0
- package/dist/node_modules/ics/dist/utils/format-text.js +9 -0
- package/dist/node_modules/ics/dist/utils/index.js +87 -0
- package/dist/node_modules/ics/dist/utils/set-alarm.js +49 -0
- package/dist/node_modules/ics/dist/utils/set-contact.js +18 -0
- package/dist/node_modules/ics/dist/utils/set-description.js +15 -0
- package/dist/node_modules/ics/dist/utils/set-geolocation.js +10 -0
- package/dist/node_modules/ics/dist/utils/set-location.js +15 -0
- package/dist/node_modules/ics/dist/utils/set-organizer.js +16 -0
- package/dist/node_modules/ics/dist/utils/set-summary.js +15 -0
- package/dist/node_modules/nanoid/index.browser.js +19 -0
- package/dist/node_modules/nanoid/url-alphabet/index.js +4 -0
- package/dist/node_modules/property-expr/index.js +77 -0
- package/dist/node_modules/runes2/dist/index.cjs.development.js +139 -0
- package/dist/node_modules/runes2/dist/index.cjs.production.min.js +86 -0
- package/dist/node_modules/runes2/dist/index.js +8 -0
- package/dist/node_modules/tiny-case/index.js +17 -0
- package/dist/node_modules/toposort/index.js +65 -0
- package/dist/node_modules/yup/index.esm.js +1899 -0
- package/dist/patterns/AccountPageHeader/AccountPageHeader.d.ts +2 -2
- package/dist/patterns/AccountPageHeader/AccountPageHeader.js +21 -21
- package/dist/patterns/AccountPageHeader/AccountPageHeader.stories.d.ts +1 -1
- package/dist/scss/componentStyles.scss +1 -0
- package/dist/scss/components/AddToCalendar/_addToCalendar.scss +64 -0
- package/dist/scss/patterns/AccountPageHeader/_accountPageHeader.scss +6 -1
- package/package.json +5 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/primitive/dist/index.js +0 -9
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-compose-refs/dist/index.js +0 -29
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.js +0 -68
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-guards/dist/index.js +0 -17
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-id/dist/index.js +0 -13
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.js +0 -48
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +0 -10
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -32
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +0 -14
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +0 -6
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/primitive/dist/index.js +0 -9
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-compose-refs/dist/index.js +0 -29
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-context/dist/index.js +0 -53
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-focus-guards/dist/index.js +0 -17
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-id/dist/index.js +0 -13
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +0 -10
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +0 -14
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +0 -6
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-use-size/dist/index.js +0 -27
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-compose-refs/dist/index.js +0 -25
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-slot/dist/index.js +0 -48
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ComponentProps, ElementType } from 'react';
|
|
2
|
+
import { CalendarEvent } from './types';
|
|
3
|
+
import { LinkProps } from '../Link';
|
|
4
|
+
export interface AddToCalendarProps extends ComponentProps<'div'> {
|
|
5
|
+
event: CalendarEvent;
|
|
6
|
+
linkElement?: ElementType<LinkProps>;
|
|
7
|
+
label?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const AddToCalendar: import('react').ForwardRefExoticComponent<Omit<AddToCalendarProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export default AddToCalendar;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsx as e, jsxs as C } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as h, useState as u } from "react";
|
|
3
|
+
import { getCommonProps as g, px as s } from "../../utils/index.js";
|
|
4
|
+
import N from "../../node_modules/classnames/index.js";
|
|
5
|
+
import { TextVariants as O } from "../Text/types.js";
|
|
6
|
+
import T from "../Text/Text.js";
|
|
7
|
+
import { Root as $, Trigger as x, Portal as y, Content as w, Item as A } from "../../node_modules/@radix-ui/react-dropdown-menu/dist/index.js";
|
|
8
|
+
import I from "../Icon/Icon.js";
|
|
9
|
+
import "../Link/types.js";
|
|
10
|
+
import L from "../Link/Link.js";
|
|
11
|
+
import { generateGoogleCalendarLink as P, generateOutlookOnlineLink as R, generateYahooCalendarLink as S, generateCalendarFile as j } from "./calendarLinks.js";
|
|
12
|
+
const G = h(
|
|
13
|
+
({ className: c, event: o, label: d = "Add to calendar", linkElement: m = L, ...n }, b) => {
|
|
14
|
+
const { className: l, ...f } = g(n, "AddToCalendar"), [t, i] = u(!1), k = (a, r) => {
|
|
15
|
+
a === "file" ? j(o) : a === "link" && r && window.open(r, "_blank");
|
|
16
|
+
}, p = [
|
|
17
|
+
{ label: "iCalendar", action: "file" },
|
|
18
|
+
{ label: "Google Calendar", action: "link", link: P(o) },
|
|
19
|
+
{ label: "Outlook", action: "file" },
|
|
20
|
+
{ label: "Outlook Online", action: "link", link: R(o) },
|
|
21
|
+
{ label: "Yahoo Calendar", action: "link", link: S(o) }
|
|
22
|
+
];
|
|
23
|
+
return /* @__PURE__ */ e("div", { ...f, className: N(l, c), ...n, ref: b, children: /* @__PURE__ */ C($, { open: t, onOpenChange: i, children: [
|
|
24
|
+
/* @__PURE__ */ e(x, { asChild: !0, children: /* @__PURE__ */ e(
|
|
25
|
+
"button",
|
|
26
|
+
{
|
|
27
|
+
"aria-label": d,
|
|
28
|
+
className: `${s}-icon-button ${s}-icon-button--small ${l}-icon-button`,
|
|
29
|
+
type: "button",
|
|
30
|
+
children: /* @__PURE__ */ e(I, { icon: t ? "CloseX" : "Calendar" })
|
|
31
|
+
}
|
|
32
|
+
) }),
|
|
33
|
+
/* @__PURE__ */ e(y, { children: /* @__PURE__ */ e(
|
|
34
|
+
w,
|
|
35
|
+
{
|
|
36
|
+
sideOffset: 5,
|
|
37
|
+
align: "start",
|
|
38
|
+
side: "bottom",
|
|
39
|
+
"data-side": "bottom",
|
|
40
|
+
avoidCollisions: !1,
|
|
41
|
+
className: `${l}-atcb-list`,
|
|
42
|
+
onKeyDown: (a) => {
|
|
43
|
+
a.key === "Tab" && i(!1);
|
|
44
|
+
},
|
|
45
|
+
children: p.map((a) => /* @__PURE__ */ e(
|
|
46
|
+
A,
|
|
47
|
+
{
|
|
48
|
+
className: `${l}-atcb-item`,
|
|
49
|
+
onSelect: () => k(a.action, a.link),
|
|
50
|
+
children: a.action === "link" ? /* @__PURE__ */ e(m, { className: `${l}-atcb-item-link`, href: a.link, children: a.label }) : /* @__PURE__ */ e("button", { className: `${l}-atcb-item-link`, children: /* @__PURE__ */ e(T, { variant: O.body2, children: a.label }) })
|
|
51
|
+
},
|
|
52
|
+
a.label
|
|
53
|
+
))
|
|
54
|
+
}
|
|
55
|
+
) })
|
|
56
|
+
] }) });
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
G.displayName = "AddToCalendar";
|
|
60
|
+
export {
|
|
61
|
+
G as default
|
|
62
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AddToCalendarProps } from './AddToCalendar';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import('react').ForwardRefExoticComponent<Omit<AddToCalendarProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
5
|
+
parameters: {
|
|
6
|
+
viewport: {
|
|
7
|
+
defaultViewport: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
export declare const Playground: {
|
|
13
|
+
(props: AddToCalendarProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
args: {
|
|
15
|
+
event: {
|
|
16
|
+
title: string;
|
|
17
|
+
description: string;
|
|
18
|
+
start: Date;
|
|
19
|
+
end: null;
|
|
20
|
+
location: string;
|
|
21
|
+
timezone: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
argTypes: {};
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CalendarEvent } from './types';
|
|
2
|
+
declare const generateGoogleCalendarLink: (event: CalendarEvent) => string;
|
|
3
|
+
declare const generateOutlookOnlineLink: (event: CalendarEvent) => string;
|
|
4
|
+
declare const generateYahooCalendarLink: (event: CalendarEvent) => string;
|
|
5
|
+
declare const generateCalendarFile: (event: CalendarEvent) => void;
|
|
6
|
+
export { generateGoogleCalendarLink, generateOutlookOnlineLink, generateYahooCalendarLink, generateCalendarFile };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { createEvent as y } from "../../node_modules/ics/dist/index.js";
|
|
2
|
+
import { isValid as p } from "../../node_modules/date-fns/isValid.js";
|
|
3
|
+
import { toZonedTime as d } from "../../node_modules/date-fns-tz/dist/esm/toZonedTime/index.js";
|
|
4
|
+
import { addHours as m } from "../../node_modules/date-fns/addHours.js";
|
|
5
|
+
import { formatDate as s } from "../../node_modules/date-fns/format.js";
|
|
6
|
+
const i = {
|
|
7
|
+
google: "https://calendar.google.com/calendar/u/0/r/eventedit",
|
|
8
|
+
outlook: "https://outlook.office.com/calendar/0/deeplink/compose",
|
|
9
|
+
yahoo: "https://calendar.yahoo.com/"
|
|
10
|
+
}, h = () => {
|
|
11
|
+
try {
|
|
12
|
+
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
13
|
+
} catch {
|
|
14
|
+
return console.warn("Unable to determine user's timezone. Using UTC as a fallback."), "UTC";
|
|
15
|
+
}
|
|
16
|
+
}, g = (t) => new URLSearchParams(t), l = (t, o) => {
|
|
17
|
+
if (!o.start || !p(o.start))
|
|
18
|
+
return console.error("Invalid event start date:", o), "#";
|
|
19
|
+
const e = h(), n = d(o.start, t === "google" ? o.timezone : e), r = o.end ? d(o.end, t === "google" ? o.timezone : e) : m(n, 1);
|
|
20
|
+
switch (t) {
|
|
21
|
+
case "google":
|
|
22
|
+
return k(n, r, o);
|
|
23
|
+
case "outlook":
|
|
24
|
+
return f(n, r, o);
|
|
25
|
+
case "yahoo":
|
|
26
|
+
return L(n, r, o);
|
|
27
|
+
default:
|
|
28
|
+
return console.error("Invalid calendar type:", t), "#";
|
|
29
|
+
}
|
|
30
|
+
}, k = (t, o, e) => {
|
|
31
|
+
const n = g({
|
|
32
|
+
text: e.title,
|
|
33
|
+
dates: `${s(t, "yyyyMMdd'T'HHmmss")}/${s(o, "yyyyMMdd'T'HHmmss")}`,
|
|
34
|
+
ctz: e.timezone,
|
|
35
|
+
details: e.description,
|
|
36
|
+
location: e.location
|
|
37
|
+
}), r = new URL(i.google);
|
|
38
|
+
return r.search = n.toString(), r.toString();
|
|
39
|
+
}, f = (t, o, e) => {
|
|
40
|
+
const n = g({
|
|
41
|
+
path: "/calendar/action/compose",
|
|
42
|
+
rru: "addevent",
|
|
43
|
+
subject: e.title,
|
|
44
|
+
startdt: s(t, "yyyy-MM-dd'T'HH:mm:ssXXX"),
|
|
45
|
+
enddt: s(o, "yyyy-MM-dd'T'HH:mm:ssXXX"),
|
|
46
|
+
body: e.description,
|
|
47
|
+
location: e.location,
|
|
48
|
+
allday: "false"
|
|
49
|
+
}), r = new URL(i.outlook);
|
|
50
|
+
return r.search = n.toString(), r.toString();
|
|
51
|
+
}, L = (t, o, e) => {
|
|
52
|
+
const n = encodeURIComponent(e.title), r = encodeURIComponent(e.description), c = encodeURIComponent(e.location), a = s(t, "yyyyMMdd'T'HHmmss"), u = s(o, "yyyyMMdd'T'HHmmss");
|
|
53
|
+
return `${i.yahoo}?v=60&view=d&type=20&title=${n}&st=${a}&et=${u}&desc=${r}&in_loc=${c}`;
|
|
54
|
+
}, T = (t) => l("google", t), $ = (t) => l("outlook", t), b = (t) => l("yahoo", t), w = (t) => {
|
|
55
|
+
if (!t.start) {
|
|
56
|
+
console.error("Invalid event start date:", t);
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
const o = t.end ? t.end : m(t.start, 1);
|
|
60
|
+
y(
|
|
61
|
+
{
|
|
62
|
+
title: t.title,
|
|
63
|
+
description: t.description,
|
|
64
|
+
start: [
|
|
65
|
+
t.start.getFullYear(),
|
|
66
|
+
t.start.getMonth() + 1,
|
|
67
|
+
t.start.getDate(),
|
|
68
|
+
t.start.getHours(),
|
|
69
|
+
t.start.getMinutes()
|
|
70
|
+
],
|
|
71
|
+
end: [o.getFullYear(), o.getMonth() + 1, o.getDate(), o.getHours(), o.getMinutes()],
|
|
72
|
+
location: t.location
|
|
73
|
+
},
|
|
74
|
+
(e, n) => {
|
|
75
|
+
if (e)
|
|
76
|
+
console.error("Error creating iCalendar event:", e);
|
|
77
|
+
else {
|
|
78
|
+
const r = new File([n], `${t.title}.ics`, { type: "text/calendar" }), c = URL.createObjectURL(r), a = document.createElement("a");
|
|
79
|
+
a.href = c, a.download = r.name, document.body.appendChild(a), a.click(), document.body.removeChild(a), URL.revokeObjectURL(c);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
};
|
|
84
|
+
export {
|
|
85
|
+
w as generateCalendarFile,
|
|
86
|
+
T as generateGoogleCalendarLink,
|
|
87
|
+
$ as generateOutlookOnlineLink,
|
|
88
|
+
b as generateYahooCalendarLink
|
|
89
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as AddToCalendar, type AddToCalendarProps } from './AddToCalendar';
|
package/dist/index.d.ts
CHANGED
|
@@ -74,6 +74,7 @@ export * from './components/FavoritingTileButton';
|
|
|
74
74
|
export * from './components/Filter';
|
|
75
75
|
export * from './components/Icon';
|
|
76
76
|
export * from './components/TextArea';
|
|
77
|
+
export * from './components/AddToCalendar';
|
|
77
78
|
export * from './patterns/AccountPageHeader';
|
|
78
79
|
export * from './patterns/BidSnapshot';
|
|
79
80
|
export * from './patterns/FilterMenu';
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PaddingTokens as a, SpacingTokens as f, defaultYear as s, emailValidation as l, encodeURLSearchParams as d, findChildrenExcludingTypes as m, findChildrenOfType as p, focusElementById as u, generatePaddingClassName as i, getCommonProps as n, noOp as x, px as g, useNormalizedInputProps as c } from "./utils/index.js";
|
|
2
2
|
import { default as C } from "./pages/Page.js";
|
|
3
|
-
import { SSRMediaQuery as B, ssrMediaQueryStyle as
|
|
4
|
-
import { usePendingState as
|
|
3
|
+
import { SSRMediaQuery as B, ssrMediaQueryStyle as A } from "./providers/SeldonProvider/utils.js";
|
|
4
|
+
import { usePendingState as P } from "./utils/hooks.js";
|
|
5
5
|
import { AuctionStatus as b, LotStatus as V, SupportedLanguages as h } from "./types/commonTypes.js";
|
|
6
6
|
import { default as w } from "./components/Button/Button.js";
|
|
7
7
|
import { ButtonVariants as v } from "./components/Button/types.js";
|
|
@@ -28,7 +28,7 @@ import { default as xe } from "./components/Drawer/Drawer.js";
|
|
|
28
28
|
import { default as ce } from "./components/Dropdown/Dropdown.js";
|
|
29
29
|
import { default as Ce } from "./components/ErrorBoundary/ErrorBoundary.js";
|
|
30
30
|
import { Grid as Be } from "./components/Grid/Grid.js";
|
|
31
|
-
import { default as
|
|
31
|
+
import { default as Le } from "./components/GridItem/GridItem.js";
|
|
32
32
|
import { GridItemAlign as Ie } from "./components/GridItem/types.js";
|
|
33
33
|
import { default as Ve } from "./components/Input/Input.js";
|
|
34
34
|
import { default as ke } from "./components/Link/Link.js";
|
|
@@ -54,7 +54,7 @@ import { Tag as it, default as nt } from "./components/Tags/Tags.js";
|
|
|
54
54
|
import { TextAlignments as gt, TextVariants as ct } from "./components/Text/types.js";
|
|
55
55
|
import { default as Ct } from "./components/Text/Text.js";
|
|
56
56
|
import { TextSymbolVariants as Bt } from "./components/TextSymbol/types.js";
|
|
57
|
-
import { default as
|
|
57
|
+
import { default as Lt } from "./components/TextSymbol/TextSymbol.js";
|
|
58
58
|
import { default as It } from "./components/Video/Video.js";
|
|
59
59
|
import { default as Vt } from "./patterns/DetailList/DetailList.js";
|
|
60
60
|
import { DetailListAlignment as kt } from "./patterns/DetailList/types.js";
|
|
@@ -80,29 +80,31 @@ import { default as no } from "./components/Countdown/Countdown.js";
|
|
|
80
80
|
import { CountdownVariants as go } from "./components/Countdown/types.js";
|
|
81
81
|
import { default as So } from "./components/Divider/Divider.js";
|
|
82
82
|
import { default as To } from "./components/FavoritingTileButton/FavoritingTileButton.js";
|
|
83
|
-
import { default as
|
|
84
|
-
import { default as
|
|
83
|
+
import { default as Ao } from "./components/Filter/Filter.js";
|
|
84
|
+
import { default as Po } from "./components/Filter/FilterInput.js";
|
|
85
85
|
import { default as bo } from "./components/Filter/FilterHeader.js";
|
|
86
86
|
import { default as ho } from "./components/TextArea/TextArea.js";
|
|
87
|
-
import { default as wo } from "./
|
|
88
|
-
import { default as vo } from "./patterns/
|
|
89
|
-
import { default as Do } from "./patterns/BidSnapshot/
|
|
90
|
-
import {
|
|
91
|
-
import {
|
|
92
|
-
import { default as Oo } from "./patterns/
|
|
87
|
+
import { default as wo } from "./components/AddToCalendar/AddToCalendar.js";
|
|
88
|
+
import { default as vo } from "./patterns/AccountPageHeader/AccountPageHeader.js";
|
|
89
|
+
import { default as Do } from "./patterns/BidSnapshot/BidSnapshot.js";
|
|
90
|
+
import { default as Mo } from "./patterns/BidSnapshot/BidMessage.js";
|
|
91
|
+
import { BidMessageVariants as Eo, BidStatusEnum as Uo } from "./patterns/BidSnapshot/types.js";
|
|
92
|
+
import { default as Oo } from "./patterns/FilterMenu/FilterMenu.js";
|
|
93
|
+
import { default as Qo } from "./patterns/ObjectTile/ObjectTile.js";
|
|
93
94
|
export {
|
|
94
95
|
M as Accordion,
|
|
95
96
|
E as AccordionItem,
|
|
96
97
|
G as AccordionItemVariant,
|
|
97
98
|
O as AccordionVariants,
|
|
98
|
-
|
|
99
|
+
vo as AccountPageHeader,
|
|
100
|
+
wo as AddToCalendar,
|
|
99
101
|
uo as Article,
|
|
100
102
|
b as AuctionStatus,
|
|
101
103
|
Yt as AuthState,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
Mo as BidMessage,
|
|
105
|
+
Eo as BidMessageVariants,
|
|
106
|
+
Do as BidSnapshot,
|
|
107
|
+
Uo as BidStatusEnum,
|
|
106
108
|
Q as Breadcrumb,
|
|
107
109
|
w as Button,
|
|
108
110
|
v as ButtonVariants,
|
|
@@ -128,13 +130,13 @@ export {
|
|
|
128
130
|
Ce as ErrorBoundary,
|
|
129
131
|
yt as FavoritesCollectionTile,
|
|
130
132
|
To as FavoritingTileButton,
|
|
131
|
-
|
|
133
|
+
Ao as Filter,
|
|
132
134
|
bo as FilterHeader,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
+
Po as FilterInput,
|
|
136
|
+
Oo as FilterMenu,
|
|
135
137
|
so as Footer,
|
|
136
138
|
Be as Grid,
|
|
137
|
-
|
|
139
|
+
Le as GridItem,
|
|
138
140
|
Ie as GridItemAlign,
|
|
139
141
|
mo as Header,
|
|
140
142
|
Ht as HeroBanner,
|
|
@@ -152,7 +154,7 @@ export {
|
|
|
152
154
|
Oe as NavigationItem,
|
|
153
155
|
Qe as NavigationItemTrigger,
|
|
154
156
|
ze as NavigationList,
|
|
155
|
-
|
|
157
|
+
Qo as ObjectTile,
|
|
156
158
|
a as PaddingTokens,
|
|
157
159
|
C as Page,
|
|
158
160
|
ao as PageContentWrapper,
|
|
@@ -182,7 +184,7 @@ export {
|
|
|
182
184
|
gt as TextAlignments,
|
|
183
185
|
ho as TextArea,
|
|
184
186
|
Bt as TextSymbolVariants,
|
|
185
|
-
|
|
187
|
+
Lt as TextSymbols,
|
|
186
188
|
ct as TextVariants,
|
|
187
189
|
qt as UserManagement,
|
|
188
190
|
It as Video,
|
|
@@ -197,7 +199,7 @@ export {
|
|
|
197
199
|
n as getCommonProps,
|
|
198
200
|
x as noOp,
|
|
199
201
|
g as px,
|
|
200
|
-
|
|
202
|
+
A as ssrMediaQueryStyle,
|
|
201
203
|
c as useNormalizedInputProps,
|
|
202
|
-
|
|
204
|
+
P as usePendingState
|
|
203
205
|
};
|
|
@@ -1,53 +1,68 @@
|
|
|
1
1
|
import * as u from "react";
|
|
2
|
-
import { jsx as
|
|
3
|
-
function
|
|
2
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
3
|
+
function $(t, c) {
|
|
4
|
+
const n = u.createContext(c), p = (r) => {
|
|
5
|
+
const { children: e, ...o } = r, s = u.useMemo(() => o, Object.values(o));
|
|
6
|
+
return /* @__PURE__ */ f(n.Provider, { value: s, children: e });
|
|
7
|
+
};
|
|
8
|
+
p.displayName = t + "Provider";
|
|
9
|
+
function i(r) {
|
|
10
|
+
const e = u.useContext(n);
|
|
11
|
+
if (e) return e;
|
|
12
|
+
if (c !== void 0) return c;
|
|
13
|
+
throw new Error(`\`${r}\` must be used within \`${t}\``);
|
|
14
|
+
}
|
|
15
|
+
return [p, i];
|
|
16
|
+
}
|
|
17
|
+
function w(t, c = []) {
|
|
4
18
|
let n = [];
|
|
5
|
-
function
|
|
6
|
-
const o = u.createContext(
|
|
7
|
-
n = [...n,
|
|
8
|
-
const
|
|
9
|
-
const { scope:
|
|
10
|
-
return /* @__PURE__ */
|
|
19
|
+
function p(r, e) {
|
|
20
|
+
const o = u.createContext(e), s = n.length;
|
|
21
|
+
n = [...n, e];
|
|
22
|
+
const d = (x) => {
|
|
23
|
+
const { scope: m, children: v, ...a } = x, S = m?.[t]?.[s] || o, h = u.useMemo(() => a, Object.values(a));
|
|
24
|
+
return /* @__PURE__ */ f(S.Provider, { value: h, children: v });
|
|
11
25
|
};
|
|
12
|
-
|
|
13
|
-
function
|
|
14
|
-
const
|
|
15
|
-
if (
|
|
16
|
-
if (
|
|
17
|
-
throw new Error(`\`${
|
|
26
|
+
d.displayName = r + "Provider";
|
|
27
|
+
function C(x, m) {
|
|
28
|
+
const v = m?.[t]?.[s] || o, a = u.useContext(v);
|
|
29
|
+
if (a) return a;
|
|
30
|
+
if (e !== void 0) return e;
|
|
31
|
+
throw new Error(`\`${x}\` must be used within \`${r}\``);
|
|
18
32
|
}
|
|
19
|
-
return [
|
|
33
|
+
return [d, C];
|
|
20
34
|
}
|
|
21
|
-
const
|
|
22
|
-
const
|
|
35
|
+
const i = () => {
|
|
36
|
+
const r = n.map((e) => u.createContext(e));
|
|
23
37
|
return function(o) {
|
|
24
|
-
const
|
|
38
|
+
const s = o?.[t] || r;
|
|
25
39
|
return u.useMemo(
|
|
26
|
-
() => ({ [`__scope${
|
|
27
|
-
[o,
|
|
40
|
+
() => ({ [`__scope${t}`]: { ...o, [t]: s } }),
|
|
41
|
+
[o, s]
|
|
28
42
|
);
|
|
29
43
|
};
|
|
30
44
|
};
|
|
31
|
-
return
|
|
45
|
+
return i.scopeName = t, [p, P(i, ...c)];
|
|
32
46
|
}
|
|
33
|
-
function
|
|
34
|
-
const
|
|
35
|
-
if (
|
|
47
|
+
function P(...t) {
|
|
48
|
+
const c = t[0];
|
|
49
|
+
if (t.length === 1) return c;
|
|
36
50
|
const n = () => {
|
|
37
|
-
const
|
|
38
|
-
useScope:
|
|
39
|
-
scopeName:
|
|
51
|
+
const p = t.map((i) => ({
|
|
52
|
+
useScope: i(),
|
|
53
|
+
scopeName: i.scopeName
|
|
40
54
|
}));
|
|
41
|
-
return function(
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
return { ...o, ...
|
|
55
|
+
return function(r) {
|
|
56
|
+
const e = p.reduce((o, { useScope: s, scopeName: d }) => {
|
|
57
|
+
const x = s(r)[`__scope${d}`];
|
|
58
|
+
return { ...o, ...x };
|
|
45
59
|
}, {});
|
|
46
|
-
return u.useMemo(() => ({ [`__scope${
|
|
60
|
+
return u.useMemo(() => ({ [`__scope${c.scopeName}`]: e }), [e]);
|
|
47
61
|
};
|
|
48
62
|
};
|
|
49
|
-
return n.scopeName =
|
|
63
|
+
return n.scopeName = c.scopeName, n;
|
|
50
64
|
}
|
|
51
65
|
export {
|
|
52
|
-
|
|
66
|
+
$ as createContext,
|
|
67
|
+
w as createContextScope
|
|
53
68
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import * as s from "react";
|
|
2
|
-
import { composeEventHandlers as p } from "
|
|
3
|
-
import { useComposedRefs as R } from "
|
|
4
|
-
import { createContextScope as H, createContext as V } from "
|
|
5
|
-
import { useId as C } from "
|
|
6
|
-
import { useControllableState as q } from "
|
|
7
|
-
import { DismissableLayer as K } from "
|
|
8
|
-
import { FocusScope as U } from "
|
|
9
|
-
import { Portal as Y } from "
|
|
10
|
-
import { Presence as _ } from "
|
|
11
|
-
import { Primitive as g } from "
|
|
12
|
-
import { useFocusGuards as Z } from "
|
|
2
|
+
import { composeEventHandlers as p } from "../../primitive/dist/index.js";
|
|
3
|
+
import { useComposedRefs as R } from "../../react-compose-refs/dist/index.js";
|
|
4
|
+
import { createContextScope as H, createContext as V } from "../../react-context/dist/index.js";
|
|
5
|
+
import { useId as C } from "../../react-id/dist/index.js";
|
|
6
|
+
import { useControllableState as q } from "../../react-use-controllable-state/dist/index.js";
|
|
7
|
+
import { DismissableLayer as K } from "../../react-dismissable-layer/dist/index.js";
|
|
8
|
+
import { FocusScope as U } from "../../react-focus-scope/dist/index.js";
|
|
9
|
+
import { Portal as Y } from "../../react-portal/dist/index.js";
|
|
10
|
+
import { Presence as _ } from "../../react-presence/dist/index.js";
|
|
11
|
+
import { Primitive as g } from "../../react-primitive/dist/index.js";
|
|
12
|
+
import { useFocusGuards as Z } from "../../react-focus-guards/dist/index.js";
|
|
13
13
|
import z from "../../../react-remove-scroll/dist/es2015/Combination.js";
|
|
14
14
|
import { hideOthers as J } from "../../../aria-hidden/dist/es2015/index.js";
|
|
15
|
-
import { createSlot as Q } from "
|
|
15
|
+
import { createSlot as Q } from "../../react-slot/dist/index.js";
|
|
16
16
|
import { jsx as i, jsxs as P, Fragment as O } from "react/jsx-runtime";
|
|
17
17
|
var h = "Dialog", [I, Ne] = H(h), [X, u] = I(h), x = (e) => {
|
|
18
18
|
const {
|