@phillips/seldon 1.7.0 → 1.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/_virtual/_commonjsHelpers.js +3 -5
  2. package/dist/components/Button/Button.d.ts +13 -19
  3. package/dist/components/Button/Button.js +10 -15
  4. package/dist/components/Header/Header.js +3 -21
  5. package/dist/components/HeroBanner/HeroBanner.d.ts +6 -6
  6. package/dist/components/HeroBanner/HeroBanner.js +1 -9
  7. package/dist/components/Input/Input.js +48 -51
  8. package/dist/components/Select/Select.js +45 -48
  9. package/dist/index.d.ts +0 -1
  10. package/dist/index.js +12 -14
  11. package/dist/scss/_reset.scss +20 -5
  12. package/dist/scss/_typography.scss +20 -11
  13. package/dist/scss/_utils.scss +2 -2
  14. package/dist/scss/_vars.scss +1 -4
  15. package/dist/scss/components/Button/_button.scss +35 -5
  16. package/dist/scss/components/DatePicker/_datePicker.scss +3 -4
  17. package/dist/scss/components/Header/_header.scss +1 -1
  18. package/dist/scss/components/HeroBanner/_heroBanner.scss +81 -81
  19. package/dist/scss/components/Input/_input.scss +2 -2
  20. package/dist/scss/components/Toggle/_toggle.scss +19 -13
  21. package/dist/scss/pages/_page.scss +1 -1
  22. package/dist/scss/styles.scss +1 -1
  23. package/dist/utils/index.d.ts +10 -0
  24. package/dist/utils/index.js +7 -23
  25. package/package.json +7 -4
  26. package/dist/_virtual/index2.js +0 -4
  27. package/dist/components/DatePicker/DatePicker.d.ts +0 -90
  28. package/dist/components/DatePicker/DatePicker.js +0 -92
  29. package/dist/node_modules/flatpickr/dist/esm/index.js +0 -947
  30. package/dist/node_modules/flatpickr/dist/esm/l10n/default.js +0 -75
  31. package/dist/node_modules/flatpickr/dist/esm/types/options.js +0 -80
  32. package/dist/node_modules/flatpickr/dist/esm/utils/dates.js +0 -90
  33. package/dist/node_modules/flatpickr/dist/esm/utils/dom.js +0 -45
  34. package/dist/node_modules/flatpickr/dist/esm/utils/formatting.js +0 -170
  35. package/dist/node_modules/flatpickr/dist/esm/utils/index.js +0 -23
  36. package/dist/node_modules/flatpickr/dist/esm/utils/polyfills.js +0 -15
  37. package/dist/node_modules/flatpickr/dist/l10n/index.js +0 -3471
@@ -1,75 +0,0 @@
1
- var r = {
2
- weekdays: {
3
- shorthand: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
4
- longhand: [
5
- "Sunday",
6
- "Monday",
7
- "Tuesday",
8
- "Wednesday",
9
- "Thursday",
10
- "Friday",
11
- "Saturday"
12
- ]
13
- },
14
- months: {
15
- shorthand: [
16
- "Jan",
17
- "Feb",
18
- "Mar",
19
- "Apr",
20
- "May",
21
- "Jun",
22
- "Jul",
23
- "Aug",
24
- "Sep",
25
- "Oct",
26
- "Nov",
27
- "Dec"
28
- ],
29
- longhand: [
30
- "January",
31
- "February",
32
- "March",
33
- "April",
34
- "May",
35
- "June",
36
- "July",
37
- "August",
38
- "September",
39
- "October",
40
- "November",
41
- "December"
42
- ]
43
- },
44
- daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
45
- firstDayOfWeek: 0,
46
- ordinal: function(a) {
47
- var e = a % 100;
48
- if (e > 3 && e < 21)
49
- return "th";
50
- switch (e % 10) {
51
- case 1:
52
- return "st";
53
- case 2:
54
- return "nd";
55
- case 3:
56
- return "rd";
57
- default:
58
- return "th";
59
- }
60
- },
61
- rangeSeparator: " to ",
62
- weekAbbreviation: "Wk",
63
- scrollTitle: "Scroll to increment",
64
- toggleTitle: "Click to toggle",
65
- amPM: ["AM", "PM"],
66
- yearAriaLabel: "Year",
67
- monthAriaLabel: "Month",
68
- hourAriaLabel: "Hour",
69
- minuteAriaLabel: "Minute",
70
- time_24hr: !1
71
- };
72
- export {
73
- r as default,
74
- r as english
75
- };
@@ -1,80 +0,0 @@
1
- var a = [
2
- "onChange",
3
- "onClose",
4
- "onDayCreate",
5
- "onDestroy",
6
- "onKeyDown",
7
- "onMonthChange",
8
- "onOpen",
9
- "onParseConfig",
10
- "onReady",
11
- "onValueUpdate",
12
- "onYearChange",
13
- "onPreCalendarPosition"
14
- ], t = {
15
- _disable: [],
16
- allowInput: !1,
17
- allowInvalidPreload: !1,
18
- altFormat: "F j, Y",
19
- altInput: !1,
20
- altInputClass: "form-control input",
21
- animate: typeof window == "object" && window.navigator.userAgent.indexOf("MSIE") === -1,
22
- ariaDateFormat: "F j, Y",
23
- autoFillDefaultTime: !0,
24
- clickOpens: !0,
25
- closeOnSelect: !0,
26
- conjunction: ", ",
27
- dateFormat: "Y-m-d",
28
- defaultHour: 12,
29
- defaultMinute: 0,
30
- defaultSeconds: 0,
31
- disable: [],
32
- disableMobile: !1,
33
- enableSeconds: !1,
34
- enableTime: !1,
35
- errorHandler: function(n) {
36
- return typeof console < "u" && console.warn(n);
37
- },
38
- getWeek: function(n) {
39
- var e = new Date(n.getTime());
40
- e.setHours(0, 0, 0, 0), e.setDate(e.getDate() + 3 - (e.getDay() + 6) % 7);
41
- var o = new Date(e.getFullYear(), 0, 4);
42
- return 1 + Math.round(((e.getTime() - o.getTime()) / 864e5 - 3 + (o.getDay() + 6) % 7) / 7);
43
- },
44
- hourIncrement: 1,
45
- ignoredFocusElements: [],
46
- inline: !1,
47
- locale: "default",
48
- minuteIncrement: 5,
49
- mode: "single",
50
- monthSelectorType: "dropdown",
51
- nextArrow: "<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",
52
- noCalendar: !1,
53
- now: /* @__PURE__ */ new Date(),
54
- onChange: [],
55
- onClose: [],
56
- onDayCreate: [],
57
- onDestroy: [],
58
- onKeyDown: [],
59
- onMonthChange: [],
60
- onOpen: [],
61
- onParseConfig: [],
62
- onReady: [],
63
- onValueUpdate: [],
64
- onYearChange: [],
65
- onPreCalendarPosition: [],
66
- plugins: [],
67
- position: "auto",
68
- positionElement: void 0,
69
- prevArrow: "<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",
70
- shorthandCurrentMonth: !1,
71
- showMonths: 1,
72
- static: !1,
73
- time_24hr: !1,
74
- weekNumbers: !1,
75
- wrap: !1
76
- };
77
- export {
78
- a as HOOKS,
79
- t as defaults
80
- };
@@ -1,90 +0,0 @@
1
- import { formats as F, tokenRegex as H, revFormat as N } from "./formatting.js";
2
- import { defaults as g } from "../types/options.js";
3
- import { english as b } from "../l10n/default.js";
4
- var C = function(e) {
5
- var t = e.config, r = t === void 0 ? g : t, i = e.l10n, f = i === void 0 ? b : i, n = e.isMobile, l = n === void 0 ? !1 : n;
6
- return function(u, o, c) {
7
- var a = c || f;
8
- return r.formatDate !== void 0 && !l ? r.formatDate(u, o, a) : o.split("").map(function(v, s, D) {
9
- return F[v] && D[s - 1] !== "\\" ? F[v](u, a, r) : v !== "\\" ? v : "";
10
- }).join("");
11
- };
12
- }, G = function(e) {
13
- var t = e.config, r = t === void 0 ? g : t, i = e.l10n, f = i === void 0 ? b : i;
14
- return function(n, l, u, o) {
15
- if (!(n !== 0 && !n)) {
16
- var c = o || f, a, v = n;
17
- if (n instanceof Date)
18
- a = new Date(n.getTime());
19
- else if (typeof n != "string" && n.toFixed !== void 0)
20
- a = new Date(n);
21
- else if (typeof n == "string") {
22
- var s = l || (r || g).dateFormat, D = String(n).trim();
23
- if (D === "today")
24
- a = /* @__PURE__ */ new Date(), u = !0;
25
- else if (r && r.parseDate)
26
- a = r.parseDate(n, s);
27
- else if (/Z$/.test(D) || /GMT$/.test(D))
28
- a = new Date(n);
29
- else {
30
- for (var w = void 0, h = [], m = 0, y = 0, p = ""; m < s.length; m++) {
31
- var d = s[m], M = d === "\\", E = s[m - 1] === "\\" || M;
32
- if (H[d] && !E) {
33
- p += H[d];
34
- var T = new RegExp(p).exec(n);
35
- T && (w = !0) && h[d !== "Y" ? "push" : "unshift"]({
36
- fn: N[d],
37
- val: T[++y]
38
- });
39
- } else
40
- M || (p += ".");
41
- }
42
- a = !r || !r.noCalendar ? new Date((/* @__PURE__ */ new Date()).getFullYear(), 0, 1, 0, 0, 0, 0) : new Date((/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0)), h.forEach(function(x) {
43
- var S = x.fn, Y = x.val;
44
- return a = S(a, Y, c) || a;
45
- }), a = w ? a : void 0;
46
- }
47
- }
48
- if (!(a instanceof Date && !isNaN(a.getTime()))) {
49
- r.errorHandler(new Error("Invalid date provided: " + v));
50
- return;
51
- }
52
- return u === !0 && a.setHours(0, 0, 0, 0), a;
53
- }
54
- };
55
- };
56
- function I(e, t, r) {
57
- return r === void 0 && (r = !0), r !== !1 ? new Date(e.getTime()).setHours(0, 0, 0, 0) - new Date(t.getTime()).setHours(0, 0, 0, 0) : e.getTime() - t.getTime();
58
- }
59
- var P = function(e, t, r) {
60
- return e > Math.min(t, r) && e < Math.max(t, r);
61
- }, Z = function(e, t, r) {
62
- return e * 3600 + t * 60 + r;
63
- }, _ = function(e) {
64
- var t = Math.floor(e / 3600), r = (e - t * 3600) / 60;
65
- return [t, r, e - t * 3600 - r * 60];
66
- }, j = {
67
- DAY: 864e5
68
- };
69
- function q(e) {
70
- var t = e.defaultHour, r = e.defaultMinute, i = e.defaultSeconds;
71
- if (e.minDate !== void 0) {
72
- var f = e.minDate.getHours(), n = e.minDate.getMinutes(), l = e.minDate.getSeconds();
73
- t < f && (t = f), t === f && r < n && (r = n), t === f && r === n && i < l && (i = e.minDate.getSeconds());
74
- }
75
- if (e.maxDate !== void 0) {
76
- var u = e.maxDate.getHours(), o = e.maxDate.getMinutes();
77
- t = Math.min(t, u), t === u && (r = Math.min(o, r)), t === u && r === o && (i = e.maxDate.getSeconds());
78
- }
79
- return { hours: t, minutes: r, seconds: i };
80
- }
81
- export {
82
- Z as calculateSecondsSinceMidnight,
83
- I as compareDates,
84
- C as createDateFormatter,
85
- G as createDateParser,
86
- j as duration,
87
- q as getDefaultHours,
88
- P as isBetween,
89
- _ as parseSeconds
90
- };
@@ -1,45 +0,0 @@
1
- function d(r, e, t) {
2
- if (t === !0)
3
- return r.classList.add(e);
4
- r.classList.remove(e);
5
- }
6
- function i(r, e, t) {
7
- var n = window.document.createElement(r);
8
- return e = e || "", t = t || "", n.className = e, t !== void 0 && (n.textContent = t), n;
9
- }
10
- function o(r) {
11
- for (; r.firstChild; )
12
- r.removeChild(r.firstChild);
13
- }
14
- function f(r, e) {
15
- if (e(r))
16
- return r;
17
- if (r.parentNode)
18
- return f(r.parentNode, e);
19
- }
20
- function l(r, e) {
21
- var t = i("div", "numInputWrapper"), n = i("input", "numInput " + r), a = i("span", "arrowUp"), p = i("span", "arrowDown");
22
- if (navigator.userAgent.indexOf("MSIE 9.0") === -1 ? n.type = "number" : (n.type = "text", n.pattern = "\\d*"), e !== void 0)
23
- for (var u in e)
24
- n.setAttribute(u, e[u]);
25
- return t.appendChild(n), t.appendChild(a), t.appendChild(p), t;
26
- }
27
- function c(r) {
28
- try {
29
- if (typeof r.composedPath == "function") {
30
- var e = r.composedPath();
31
- return e[0];
32
- }
33
- return r.target;
34
- } catch {
35
- return r.target;
36
- }
37
- }
38
- export {
39
- o as clearNode,
40
- i as createElement,
41
- l as createNumberInput,
42
- f as findParent,
43
- c as getEventTarget,
44
- d as toggleClass
45
- };
@@ -1,170 +0,0 @@
1
- import { int as i, pad as r } from "./index.js";
2
- var u = function() {
3
- }, s = function(t, n, e) {
4
- return e.months[n ? "shorthand" : "longhand"][t];
5
- }, c = {
6
- D: u,
7
- F: function(t, n, e) {
8
- t.setMonth(e.months.longhand.indexOf(n));
9
- },
10
- G: function(t, n) {
11
- t.setHours((t.getHours() >= 12 ? 12 : 0) + parseFloat(n));
12
- },
13
- H: function(t, n) {
14
- t.setHours(parseFloat(n));
15
- },
16
- J: function(t, n) {
17
- t.setDate(parseFloat(n));
18
- },
19
- K: function(t, n, e) {
20
- t.setHours(t.getHours() % 12 + 12 * i(new RegExp(e.amPM[1], "i").test(n)));
21
- },
22
- M: function(t, n, e) {
23
- t.setMonth(e.months.shorthand.indexOf(n));
24
- },
25
- S: function(t, n) {
26
- t.setSeconds(parseFloat(n));
27
- },
28
- U: function(t, n) {
29
- return new Date(parseFloat(n) * 1e3);
30
- },
31
- W: function(t, n, e) {
32
- var d = parseInt(n), o = new Date(t.getFullYear(), 0, 2 + (d - 1) * 7, 0, 0, 0, 0);
33
- return o.setDate(o.getDate() - o.getDay() + e.firstDayOfWeek), o;
34
- },
35
- Y: function(t, n) {
36
- t.setFullYear(parseFloat(n));
37
- },
38
- Z: function(t, n) {
39
- return new Date(n);
40
- },
41
- d: function(t, n) {
42
- t.setDate(parseFloat(n));
43
- },
44
- h: function(t, n) {
45
- t.setHours((t.getHours() >= 12 ? 12 : 0) + parseFloat(n));
46
- },
47
- i: function(t, n) {
48
- t.setMinutes(parseFloat(n));
49
- },
50
- j: function(t, n) {
51
- t.setDate(parseFloat(n));
52
- },
53
- l: u,
54
- m: function(t, n) {
55
- t.setMonth(parseFloat(n) - 1);
56
- },
57
- n: function(t, n) {
58
- t.setMonth(parseFloat(n) - 1);
59
- },
60
- s: function(t, n) {
61
- t.setSeconds(parseFloat(n));
62
- },
63
- u: function(t, n) {
64
- return new Date(parseFloat(n));
65
- },
66
- w: u,
67
- y: function(t, n) {
68
- t.setFullYear(2e3 + parseFloat(n));
69
- }
70
- }, g = {
71
- D: "",
72
- F: "",
73
- G: "(\\d\\d|\\d)",
74
- H: "(\\d\\d|\\d)",
75
- J: "(\\d\\d|\\d)\\w+",
76
- K: "",
77
- M: "",
78
- S: "(\\d\\d|\\d)",
79
- U: "(.+)",
80
- W: "(\\d\\d|\\d)",
81
- Y: "(\\d{4})",
82
- Z: "(.+)",
83
- d: "(\\d\\d|\\d)",
84
- h: "(\\d\\d|\\d)",
85
- i: "(\\d\\d|\\d)",
86
- j: "(\\d\\d|\\d)",
87
- l: "",
88
- m: "(\\d\\d|\\d)",
89
- n: "(\\d\\d|\\d)",
90
- s: "(\\d\\d|\\d)",
91
- u: "(.+)",
92
- w: "(\\d\\d|\\d)",
93
- y: "(\\d{2})"
94
- }, a = {
95
- Z: function(t) {
96
- return t.toISOString();
97
- },
98
- D: function(t, n, e) {
99
- return n.weekdays.shorthand[a.w(t, n, e)];
100
- },
101
- F: function(t, n, e) {
102
- return s(a.n(t, n, e) - 1, !1, n);
103
- },
104
- G: function(t, n, e) {
105
- return r(a.h(t, n, e));
106
- },
107
- H: function(t) {
108
- return r(t.getHours());
109
- },
110
- J: function(t, n) {
111
- return n.ordinal !== void 0 ? t.getDate() + n.ordinal(t.getDate()) : t.getDate();
112
- },
113
- K: function(t, n) {
114
- return n.amPM[i(t.getHours() > 11)];
115
- },
116
- M: function(t, n) {
117
- return s(t.getMonth(), !0, n);
118
- },
119
- S: function(t) {
120
- return r(t.getSeconds());
121
- },
122
- U: function(t) {
123
- return t.getTime() / 1e3;
124
- },
125
- W: function(t, n, e) {
126
- return e.getWeek(t);
127
- },
128
- Y: function(t) {
129
- return r(t.getFullYear(), 4);
130
- },
131
- d: function(t) {
132
- return r(t.getDate());
133
- },
134
- h: function(t) {
135
- return t.getHours() % 12 ? t.getHours() % 12 : 12;
136
- },
137
- i: function(t) {
138
- return r(t.getMinutes());
139
- },
140
- j: function(t) {
141
- return t.getDate();
142
- },
143
- l: function(t, n) {
144
- return n.weekdays.longhand[t.getDay()];
145
- },
146
- m: function(t) {
147
- return r(t.getMonth() + 1);
148
- },
149
- n: function(t) {
150
- return t.getMonth() + 1;
151
- },
152
- s: function(t) {
153
- return t.getSeconds();
154
- },
155
- u: function(t) {
156
- return t.getTime();
157
- },
158
- w: function(t) {
159
- return t.getDay();
160
- },
161
- y: function(t) {
162
- return String(t.getFullYear()).substring(2);
163
- }
164
- };
165
- export {
166
- a as formats,
167
- s as monthToStr,
168
- c as revFormat,
169
- g as tokenRegex
170
- };
@@ -1,23 +0,0 @@
1
- var a = function(r, n) {
2
- return n === void 0 && (n = 2), ("000" + r).slice(n * -1);
3
- }, e = function(r) {
4
- return r === !0 ? 1 : 0;
5
- };
6
- function c(r, n) {
7
- var t;
8
- return function() {
9
- var i = this, u = arguments;
10
- clearTimeout(t), t = setTimeout(function() {
11
- return r.apply(i, u);
12
- }, n);
13
- };
14
- }
15
- var o = function(r) {
16
- return r instanceof Array ? r : [r];
17
- };
18
- export {
19
- o as arrayify,
20
- c as debounce,
21
- e as int,
22
- a as pad
23
- };
@@ -1,15 +0,0 @@
1
- typeof Object.assign != "function" && (Object.assign = function(r) {
2
- for (var f = [], n = 1; n < arguments.length; n++)
3
- f[n - 1] = arguments[n];
4
- if (!r)
5
- throw TypeError("Cannot convert undefined or null to object");
6
- for (var u = function(t) {
7
- t && Object.keys(t).forEach(function(c) {
8
- return r[c] = t[c];
9
- });
10
- }, o = 0, e = f; o < e.length; o++) {
11
- var a = e[o];
12
- u(a);
13
- }
14
- return r;
15
- });