@base-framework/ui 1.0.2015 → 1.0.2017

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/atoms.es.js CHANGED
@@ -1,23 +1,24 @@
1
- import { B as e, C as t, F as o, L as r, P as n, R as p, S as u, a as I, T as i } from "./tooltip-PupzYM1r.js";
1
+ import { B as e, C as t, F as o, L as r, P as n, R as p, S as I, a as u, T as i } from "./tooltip-BP1ZmWxs.js";
2
2
  import { B as d, I as m, L as x } from "./buttons-CHEs54Wl.js";
3
- import { C as T, F as B } from "./form-group-CJzpq9Us.js";
4
- import { C as c, d as f, D as g, c as L, E as P, F as R, H as S, I as b, M as h, N as k, P as D, R as V, T as E, a as G, b as H, U as M, W as N } from "./inputs-9udyzkHR.js";
5
- import { V as W, a as w } from "./veil-CqnAmj-D.js";
3
+ import { C as T, F as g } from "./form-group-CJzpq9Us.js";
4
+ import { C as F, d as c, D as f, c as L, E as P, F as R, H as S, I as b, M as h, N as k, P as D, R as V, T as E, a as G, b as H, U as M, W as N } from "./inputs-9udyzkHR.js";
5
+ import { I as W, V as w, a as J } from "./image-DGInMcvV.js";
6
6
  export {
7
7
  e as Badge,
8
8
  d as Button,
9
9
  T as Card,
10
- c as Checkbox,
10
+ F as Checkbox,
11
11
  t as CircleGraph,
12
- f as ColorInput,
13
- g as DateInput,
12
+ c as ColorInput,
13
+ f as DateInput,
14
14
  L as DateTimeInput,
15
15
  P as EmailInput,
16
16
  o as Fieldset,
17
17
  R as FileInput,
18
- B as FormGroup,
18
+ g as FormGroup,
19
19
  S as HiddenInput,
20
20
  m as Icon,
21
+ W as Image,
21
22
  b as Input,
22
23
  r as Legend,
23
24
  x as LoadingButton,
@@ -27,14 +28,14 @@ export {
27
28
  n as ProgressBar,
28
29
  V as Radio,
29
30
  p as RangeSlider,
30
- u as Select,
31
- I as Skeleton,
31
+ I as Select,
32
+ u as Skeleton,
32
33
  E as TelInput,
33
34
  G as Textarea,
34
35
  H as TimeInput,
35
36
  i as Tooltip,
36
37
  M as UrlInput,
37
- W as Veil,
38
- w as VeilJot,
38
+ w as Veil,
39
+ J as VeilJot,
39
40
  N as WeekInput
40
41
  };
@@ -1,11 +1,11 @@
1
1
  import { Div as n, H5 as X, P as b, I as x, Li as q, Span as a, Ul as Y, Button as m, OnState as D, Label as A, H2 as S, Form as Z, Header as F, Footer as M, A as V, H3 as ee, Checkbox as te, Input as f, Img as _, Nav as se, UseParent as W, OnStateOpen as P, Time as oe, Dialog as ne } from "@base-framework/atoms";
2
2
  import { Atom as c, Component as y, Html as O, Dom as re, base as le, Data as T, Builder as G, Jot as w, Events as p, DateTime as L } from "@base-framework/base";
3
- import { P as I, b as ie, R as ae } from "./range-calendar-CCVC3e9d.js";
3
+ import { P as I, b as ie, R as ae } from "./range-calendar-KNBY64Zx.js";
4
4
  import { C as ce, F as ue } from "./form-group-CJzpq9Us.js";
5
5
  import { B as h, I as g } from "./buttons-CHEs54Wl.js";
6
6
  import { Icons as u } from "./icons.es.js";
7
7
  import { Timer as de, List as he, DynamicTime as fe } from "@base-framework/organisms";
8
- import { a as C } from "./veil-CqnAmj-D.js";
8
+ import { a as C } from "./image-DGInMcvV.js";
9
9
  import { F as j } from "./format-BmrNQptv.js";
10
10
  const z = {
11
11
  info: {
@@ -0,0 +1,31 @@
1
+ import { Jot as i, Component as r, Atom as o } from "@base-framework/base";
2
+ import { Img as a } from "@base-framework/atoms";
3
+ class s extends r {
4
+ /**
5
+ * This will set the component context.
6
+ *
7
+ * @param {object|null} context
8
+ * @returns {object|null}
9
+ */
10
+ setContext(l) {
11
+ if (this.data)
12
+ return null;
13
+ const e = this?.parent?.data ?? this?.parent?.context?.data ?? this?.parent?.state ?? null;
14
+ return e ? { data: e } : null;
15
+ }
16
+ }
17
+ const f = (t) => i(t, s), p = o(({ src: t, alt: l, class: e }) => !t || (e = e || "", t.indexOf(".") === -1 && t.indexOf("[[") === -1) ? null : a({
18
+ class: `absolute w-full h-full rounded-full object-cover fadeIn ${e}`,
19
+ src: t,
20
+ alt: l,
21
+ load: (n) => n.target.style.visibility = "visible",
22
+ /**
23
+ * If there's an error loading the image, hide it.
24
+ */
25
+ error: (n) => n.target.style.visibility = "hidden"
26
+ }));
27
+ export {
28
+ p as I,
29
+ s as V,
30
+ f as a
31
+ };
package/dist/index.es.js CHANGED
@@ -1,177 +1,178 @@
1
- import { B as s, C as o, F as t, L as r, P as n, R as l, S as i, a as p, T as d } from "./tooltip-PupzYM1r.js";
1
+ import { B as s, C as o, F as t, L as r, P as n, R as l, S as i, a as p, T as m } from "./tooltip-BP1ZmWxs.js";
2
2
  import { B as u, I as g, L as C } from "./buttons-CHEs54Wl.js";
3
3
  import { C as T, F as b } from "./form-group-CJzpq9Us.js";
4
- import { C as I, d as S, D as F, c as B, E as P, F as k, H as M, I as x, M as f, N as v, P as N, R as y, T as h, a as U, b as L, U as W, W as H } from "./inputs-9udyzkHR.js";
5
- import { V as w, a as A } from "./veil-CqnAmj-D.js";
6
- import { Icons as O } from "./icons.es.js";
7
- import { A as V, B as j, C as q, w as J, K as z, y as K, z as Q, E as _, G as X, D as Y, m as Z, n as $, Q as aa, O as ea, v as sa, c as oa, a as ta, b as ra, R as na, l as la, g as ia, i as pa, h as da, j as ma, e as ua, k as ga, F as Ca, d as ca, f as Ta, I as ba, L as Da, x as Ia, M as Sa, o as Fa, N as Ba, P as Pa, s as ka, t as Ma, S as xa, q as fa, r as va, T as Na, H as ya, J as ha, p as Ua, u as La } from "./empty-state-CkoAZpy0.js";
8
- import { A as Ha, b as Ra, C as wa, D as Aa, a as Ga, F as Oa, M as Ea, P as Va, R as ja, c as qa, g as Ja, p as za } from "./range-calendar-CCVC3e9d.js";
9
- import { B as Qa, p as _a, C as Xa, j as Ya, D as Za, m as $a, k as ae, H as ee, I as se, N as oe, O as te, P as re, S as ne, n as le, o as ie, x as pe, s as de, q as me, r as ue, T as ge, t as Ce, w as ce, u as Te, v as be, l as De, U as Ie, W as Se, f as Fe, h as Be, i as Pe, c as ke, d as Me, b as xe, e as fe, a as ve, g as Ne } from "./signature-panel-DIFmtS0f.js";
10
- import { B as he, I as Ue, M as Le, d as We, e as He, g as Re, N as we, b as Ae, a as Ge, f as Oe, P as Ee, c as Ve, S as je, T as qe } from "./mobile-nav-wrapper-Dm9DinRD.js";
11
- import { B as ze, a as Ke, C as Qe, F as _e, b as Xe, c as Ye, M as Ze, P as $e, S as as } from "./sidebar-menu-page-D4WMgz5U.js";
12
- import { A as ss, F as os, M as ts, a as rs, T as ns } from "./aside-template-sUm-F2f0.js";
13
- import { B as is } from "./bside-template-do_hXebn.js";
14
- import { F as ds, c as ms } from "./format-BmrNQptv.js";
15
- import { I as gs } from "./image-scaler-1G-JzJVG.js";
4
+ import { C as D, d as S, D as F, c as B, E as P, F as k, H as M, I as x, M as f, N as v, P as N, R as y, T as h, a as U, b as L, U as W, W as H } from "./inputs-9udyzkHR.js";
5
+ import { I as w, V as A, a as G } from "./image-DGInMcvV.js";
6
+ import { Icons as E } from "./icons.es.js";
7
+ import { A as j, B as q, C as J, w as z, K, y as Q, z as _, E as X, G as Y, D as Z, m as $, n as aa, Q as ea, O as sa, v as oa, c as ta, a as ra, b as na, R as la, l as ia, g as pa, i as ma, h as da, j as ua, e as ga, k as Ca, F as ca, d as Ta, f as ba, I as Ia, L as Da, x as Sa, M as Fa, o as Ba, N as Pa, P as ka, s as Ma, t as xa, S as fa, q as va, r as Na, T as ya, H as ha, J as Ua, p as La, u as Wa } from "./empty-state-E4ZW72TQ.js";
8
+ import { A as Ra, b as wa, C as Aa, D as Ga, a as Oa, F as Ea, M as Va, P as ja, R as qa, c as Ja, g as za, p as Ka } from "./range-calendar-KNBY64Zx.js";
9
+ import { B as _a, p as Xa, C as Ya, j as Za, D as $a, m as ae, k as ee, H as se, I as oe, N as te, O as re, P as ne, S as le, n as ie, o as pe, x as me, s as de, q as ue, r as ge, T as Ce, t as ce, w as Te, u as be, v as Ie, l as De, U as Se, W as Fe, f as Be, h as Pe, i as ke, c as Me, d as xe, b as fe, e as ve, a as Ne, g as ye } from "./signature-panel-BrbTbt2g.js";
10
+ import { B as Ue, I as Le, M as We, d as He, e as Re, g as we, N as Ae, b as Ge, a as Oe, f as Ee, P as Ve, c as je, S as qe, T as Je } from "./mobile-nav-wrapper-Dm9DinRD.js";
11
+ import { B as Ke, a as Qe, C as _e, F as Xe, b as Ye, c as Ze, M as $e, P as as, S as es } from "./sidebar-menu-page-D4WMgz5U.js";
12
+ import { A as os, F as ts, M as rs, a as ns, T as ls } from "./aside-template-sUm-F2f0.js";
13
+ import { B as ps } from "./bside-template-do_hXebn.js";
14
+ import { F as ds, c as us } from "./format-BmrNQptv.js";
15
+ import { I as Cs } from "./image-scaler-1G-JzJVG.js";
16
16
  export {
17
- V as Alert,
18
- ss as AsideTemplate,
19
- Ha as Avatar,
20
- Qa as BackButton,
21
- he as Backdrop,
17
+ j as Alert,
18
+ os as AsideTemplate,
19
+ Ra as Avatar,
20
+ _a as BackButton,
21
+ Ue as Backdrop,
22
22
  s as Badge,
23
- ze as BasicPage,
24
- Ke as BlankPage,
25
- j as Breadcrumb,
26
- is as BsideTemplate,
23
+ Ke as BasicPage,
24
+ Qe as BlankPage,
25
+ q as Breadcrumb,
26
+ ps as BsideTemplate,
27
27
  u as Button,
28
- _a as ButtonTab,
29
- Ra as Calendar,
30
- wa as CalendarCells,
28
+ Xa as ButtonTab,
29
+ wa as Calendar,
30
+ Aa as CalendarCells,
31
31
  T as Card,
32
- Qe as CenterPage,
33
- I as Checkbox,
34
- Xa as CheckboxCol,
32
+ _e as CenterPage,
33
+ D as Checkbox,
34
+ Ya as CheckboxCol,
35
35
  o as CircleGraph,
36
36
  S as ColorInput,
37
- q as ColumnRow,
38
- J as Combobox,
39
- z as Confirmation,
40
- K as CountDisplay,
41
- Q as Counter,
42
- Ya as DataTable,
43
- Za as DataTableBody,
37
+ J as ColumnRow,
38
+ z as Combobox,
39
+ K as Confirmation,
40
+ Q as CountDisplay,
41
+ _ as Counter,
42
+ Za as DataTable,
43
+ $a as DataTableBody,
44
44
  F as DateInput,
45
- _ as DatePicker,
46
- X as DateRangePicker,
45
+ X as DatePicker,
46
+ Y as DateRangePicker,
47
47
  B as DateTimeInput,
48
- Aa as DayCell,
49
- Ga as DayHeader,
50
- Y as DelayComponent,
51
- Z as DetailBody,
52
- $ as DetailSection,
53
- aa as Dialog,
54
- ea as DialogContainer,
55
- $a as DockableOverlay,
56
- sa as DotsIndicator,
57
- oa as Dropdown,
58
- ta as DropdownItem,
59
- ra as DropdownMenu,
60
- ae as DynamicDataTable,
48
+ Ga as DayCell,
49
+ Oa as DayHeader,
50
+ Z as DelayComponent,
51
+ $ as DetailBody,
52
+ aa as DetailSection,
53
+ ea as Dialog,
54
+ sa as DialogContainer,
55
+ ae as DockableOverlay,
56
+ oa as DotsIndicator,
57
+ ta as Dropdown,
58
+ ra as DropdownItem,
59
+ na as DropdownMenu,
60
+ ee as DynamicDataTable,
61
61
  P as EmailInput,
62
- na as EmptyState,
62
+ la as EmptyState,
63
63
  t as Fieldset,
64
64
  k as FileInput,
65
- la as Form,
66
- ia as FormCard,
67
- pa as FormCardContent,
65
+ ia as Form,
66
+ pa as FormCard,
67
+ ma as FormCardContent,
68
68
  da as FormCardGroup,
69
- ma as FormControl,
70
- ua as FormDescription,
71
- ga as FormField,
69
+ ua as FormControl,
70
+ ga as FormDescription,
71
+ Ca as FormField,
72
72
  b as FormGroup,
73
- Ca as FormItem,
74
- ca as FormLabel,
75
- Ta as FormMessage,
73
+ ca as FormItem,
74
+ Ta as FormLabel,
75
+ ba as FormMessage,
76
76
  ds as Format,
77
- Oa as FormatDate,
78
- _e as FullContainPage,
79
- Xe as FullPage,
80
- os as FullTemplate,
81
- Ye as FullscreenPage,
82
- ee as HeaderCol,
77
+ Ea as FormatDate,
78
+ Xe as FullContainPage,
79
+ Ye as FullPage,
80
+ ts as FullTemplate,
81
+ Ze as FullscreenPage,
82
+ se as HeaderCol,
83
83
  M as HiddenInput,
84
84
  g as Icon,
85
- O as Icons,
86
- gs as ImageScaler,
87
- ba as ImageUploader,
88
- Ue as InlineNavigation,
89
- se as InlineOverlay,
85
+ E as Icons,
86
+ w as Image,
87
+ Cs as ImageScaler,
88
+ Ia as ImageUploader,
89
+ Le as InlineNavigation,
90
+ oe as InlineOverlay,
90
91
  x as Input,
91
92
  r as Legend,
92
93
  C as LoadingButton,
93
94
  Da as LogoUploader,
94
- ts as MainColumn,
95
- Le as MainLink,
96
- Ze as MainSection,
97
- Ia as MinusButton,
98
- We as MobileNavButton,
99
- He as MobileNavWrapper,
100
- Sa as Modal,
101
- Ea as MonthCalendar,
95
+ rs as MainColumn,
96
+ We as MainLink,
97
+ $e as MainSection,
98
+ Sa as MinusButton,
99
+ He as MobileNavButton,
100
+ Re as MobileNavWrapper,
101
+ Fa as Modal,
102
+ Va as MonthCalendar,
102
103
  f as MonthInput,
103
- Re as NavButton,
104
- we as NavButtonLink,
105
- Ae as Navigation,
106
- Ge as NavigationGroup,
107
- oe as NavigationMenu,
108
- Oe as NavigationPopover,
109
- Fa as Notification,
110
- Ba as NotificationContainer,
104
+ we as NavButton,
105
+ Ae as NavButtonLink,
106
+ Ge as Navigation,
107
+ Oe as NavigationGroup,
108
+ te as NavigationMenu,
109
+ Ee as NavigationPopover,
110
+ Ba as Notification,
111
+ Pa as NotificationContainer,
111
112
  v as NumberInput,
112
- te as Overlay,
113
- $e as Page,
114
- re as Panel,
113
+ re as Overlay,
114
+ as as Page,
115
+ ne as Panel,
115
116
  N as PasswordInput,
116
- Pa as PlusButton,
117
- Va as PopOver,
118
- Ee as PopupHeader,
117
+ ka as PlusButton,
118
+ ja as PopOver,
119
+ Ve as PopupHeader,
119
120
  n as ProgressBar,
120
121
  y as Radio,
121
- ja as RangeCalendar,
122
+ qa as RangeCalendar,
122
123
  l as RangeSlider,
123
- ka as STATUSES,
124
- Ma as STATUS_CLASS,
125
- ne as ScrollableDataTable,
126
- le as SearchDropdown,
127
- ie as SearchInput,
124
+ Ma as STATUSES,
125
+ xa as STATUS_CLASS,
126
+ le as ScrollableDataTable,
127
+ ie as SearchDropdown,
128
+ pe as SearchInput,
128
129
  i as Select,
129
- Ve as SidebarMenu,
130
- as as SidebarMenuPage,
131
- pe as SignaturePanel,
130
+ je as SidebarMenu,
131
+ es as SidebarMenuPage,
132
+ me as SignaturePanel,
132
133
  p as Skeleton,
133
- xa as SplitRow,
134
- fa as StaticStatusIndicator,
135
- va as StatusIndicator,
136
- je as SubNavigation,
134
+ fa as SplitRow,
135
+ va as StaticStatusIndicator,
136
+ Na as StatusIndicator,
137
+ qe as SubNavigation,
137
138
  de as Tab,
138
- me as TabGroup,
139
- ue as TabNavigation,
140
- ge as TableHeader,
139
+ ue as TabGroup,
140
+ ge as TabNavigation,
141
+ Ce as TableHeader,
141
142
  h as TelInput,
142
- rs as Template,
143
+ ns as Template,
143
144
  U as Textarea,
144
- Na as ThemeToggle,
145
- ya as TimeFrame,
145
+ ya as ThemeToggle,
146
+ ha as TimeFrame,
146
147
  L as TimeInput,
147
- ha as TimePicker,
148
- qe as TitleHeader,
149
- Ua as Toggle,
150
- d as Tooltip,
151
- ns as TopBar,
152
- Ce as UnderlinedButtonTab,
153
- ce as UnderlinedTab,
154
- Te as UnderlinedTabGroup,
155
- be as UnderlinedTabNavigation,
148
+ Ua as TimePicker,
149
+ Je as TitleHeader,
150
+ La as Toggle,
151
+ m as Tooltip,
152
+ ls as TopBar,
153
+ ce as UnderlinedButtonTab,
154
+ Te as UnderlinedTab,
155
+ be as UnderlinedTabGroup,
156
+ Ie as UnderlinedTabNavigation,
156
157
  W as UrlInput,
157
158
  De as UserList,
158
- Ie as UserListItem,
159
- w as Veil,
160
- A as VeilJot,
161
- Se as WeekCalendar,
162
- Fe as WeekCell,
163
- Be as WeekCells,
164
- Pe as WeekHeader,
159
+ Se as UserListItem,
160
+ A as Veil,
161
+ G as VeilJot,
162
+ Fe as WeekCalendar,
163
+ Be as WeekCell,
164
+ Pe as WeekCells,
165
+ ke as WeekHeader,
165
166
  H as WeekInput,
166
- qa as addTime,
167
- ke as calculateWeekNumber,
168
- ms as createWatcherCallback,
169
- Me as generateWeeks,
170
- xe as getDateFromWeek,
171
- fe as getMonthDays,
172
- ve as getNextMonthDays,
173
- Ja as getPosition,
174
- Ne as getPreviousMonthDays,
175
- La as getStatusClass,
176
- za as pad
167
+ Ja as addTime,
168
+ Me as calculateWeekNumber,
169
+ us as createWatcherCallback,
170
+ xe as generateWeeks,
171
+ fe as getDateFromWeek,
172
+ ve as getMonthDays,
173
+ Ne as getNextMonthDays,
174
+ za as getPosition,
175
+ ye as getPreviousMonthDays,
176
+ Wa as getStatusClass,
177
+ Ka as pad
177
178
  };
@@ -1,5 +1,5 @@
1
- import { A as s, B as t, C as e, w as r, K as i, y as n, z as m, E as l, G as d, D as C, m as p, n as S, Q as g, O as u, v as D, c, a as F, b as T, R as P, l as A, g as I, i as f, h as w, j as b, e as y, k as B, F as M, d as k, f as x, I as L, L as R, x as U, M as v, o as E, N, P as h, s as G, t as O, S as j, q, r as z, T as H, H as J, J as K, p as Q, u as _ } from "./empty-state-CkoAZpy0.js";
2
- import { A as W, P as X, g as Y } from "./range-calendar-CCVC3e9d.js";
1
+ import { A as s, B as t, C as e, w as r, K as i, y as n, z as m, E as l, G as d, D as C, m as p, n as S, Q as g, O as u, v as D, c, a as F, b as T, R as P, l as A, g as I, i as f, h as w, j as b, e as y, k as B, F as M, d as k, f as x, I as L, L as R, x as U, M as v, o as E, N, P as h, s as G, t as O, S as j, q, r as z, T as H, H as J, J as K, p as Q, u as _ } from "./empty-state-E4ZW72TQ.js";
2
+ import { A as W, P as X, g as Y } from "./range-calendar-KNBY64Zx.js";
3
3
  export {
4
4
  s as Alert,
5
5
  W as Avatar,
@@ -1,5 +1,5 @@
1
- import { B as s, p as n, C as t, j as o, D as r, m as l, k as i, H as d, I as b, N as u, O as v, P as g, S as p, n as T, o as D, x as N, s as k, q as C, r as c, T as B, t as M, w as m, u as y, v as W, l as h, U as S, W as H, f as P, h as U, i as x, c as I, d as f, b as L, e as O, a as F, g as G } from "./signature-panel-DIFmtS0f.js";
2
- import { b as R, C as j, D as q, a as z, F as A, M as E, R as J, c as K, p as Q } from "./range-calendar-CCVC3e9d.js";
1
+ import { B as s, p as n, C as t, j as o, D as r, m as l, k as i, H as d, I as b, N as u, O as v, P as g, S as p, n as T, o as D, x as N, s as k, q as C, r as c, T as B, t as M, w as m, u as y, v as W, l as h, U as S, W as H, f as P, h as U, i as x, c as I, d as f, b as L, e as O, a as F, g as G } from "./signature-panel-BrbTbt2g.js";
2
+ import { b as R, C as j, D as q, a as z, F as A, M as E, R as J, c as K, p as Q } from "./range-calendar-KNBY64Zx.js";
3
3
  import { B as X, I as Y, M as Z, d as _, e as $, g as aa, N as ea, b as sa, a as na, f as ta, P as oa, c as ra, S as la, T as ia } from "./mobile-nav-wrapper-Dm9DinRD.js";
4
4
  export {
5
5
  s as BackButton,
@@ -1,14 +1,15 @@
1
- import { Div as h, Img as _, Span as H, Button as L, OnState as J, On as z } from "@base-framework/atoms";
1
+ import { Div as h, Span as H, Button as _, OnState as J, On as z } from "@base-framework/atoms";
2
2
  import { Component as Y, Data as B, Atom as j, DateTime as T } from "@base-framework/base";
3
- import { B as m } from "./buttons-CHEs54Wl.js";
3
+ import { I as L } from "./image-DGInMcvV.js";
4
+ import { B as f } from "./buttons-CHEs54Wl.js";
4
5
  import { Icons as P } from "./icons.es.js";
5
- const U = (n, t) => {
6
- const e = n ? n.getBoundingClientRect() : { top: 0, bottom: 0, left: 0 }, a = t.getBoundingClientRect(), s = 10, r = globalThis.scrollX, l = globalThis.scrollY;
7
- let i = e.left + r, d = e.bottom + l;
8
- const g = globalThis.innerHeight - e.bottom, f = e.top;
9
- return i + a.width > globalThis.innerWidth && (i = globalThis.innerWidth - a.width - s), g < a.height && f > g ? d = e.top + l - a.height - s : g < a.height && (d = e.bottom + l - (a.height - g) - s), { x: i, y: d };
6
+ const U = (e, t) => {
7
+ const n = e ? e.getBoundingClientRect() : { top: 0, bottom: 0, left: 0 }, a = t.getBoundingClientRect(), s = 10, r = globalThis.scrollX, l = globalThis.scrollY;
8
+ let i = n.left + r, d = n.bottom + l;
9
+ const g = globalThis.innerHeight - n.bottom, m = n.top;
10
+ return i + a.width > globalThis.innerWidth && (i = globalThis.innerWidth - a.width - s), g < a.height && m > g ? d = n.top + l - a.height - s : g < a.height && (d = n.bottom + l - (a.height - g) - s), { x: i, y: d };
10
11
  };
11
- class Pt extends Y {
12
+ class Tt extends Y {
12
13
  /**
13
14
  * This will set up the data.
14
15
  *
@@ -59,7 +60,7 @@ class Pt extends Y {
59
60
  return h({
60
61
  class: `absolute inset-auto fadeIn mt-2 rounded-md p-0 shadow-lg bg-popover min-h-12 backdrop:bg-transparent text-inherit r z-30 ${t}`,
61
62
  popover: "manual",
62
- toggle: (e, { state: a }) => e.newState === "closed" ? a.open = !1 : null,
63
+ toggle: (n, { state: a }) => n.newState === "closed" ? a.open = !1 : null,
63
64
  style: "top: [[position.y]]px; left: [[position.x]]px"
64
65
  }, this.children);
65
66
  }
@@ -84,7 +85,7 @@ class Pt extends Y {
84
85
  * @returns {void}
85
86
  */
86
87
  updatePosition() {
87
- const t = this.button ?? null, e = this.panel, a = U(t, e);
88
+ const t = this.button ?? null, n = this.panel, a = U(t, n);
88
89
  this.data.position = a;
89
90
  }
90
91
  /**
@@ -136,17 +137,11 @@ class Pt extends Y {
136
137
  this.panel.hidePopover();
137
138
  }
138
139
  }
139
- const q = j(({ src: n, alt: t }) => !n || n.indexOf(".") === -1 && n.indexOf("[[") === -1 ? null : _({
140
- class: "absolute w-full h-full rounded-full object-cover fadeIn",
141
- src: n,
142
- alt: t,
143
- load: (e) => e.target.style.visibility = "visible",
144
- /**
145
- * If there's an error loading the image, hide it.
146
- */
147
- error: (e) => e.target.style.visibility = "hidden"
148
- })), K = (n) => n && (Array.isArray(n) && (n = n.join(" ")), typeof n != "string" && (n = String(n)), n.split(" ").map((t) => t.charAt(0)).join("").toUpperCase()), G = (n) => !n || n.length < 2 ? n : K(n), Q = (n) => H([n, (t, e) => {
149
- e.textContent = G(t);
140
+ const q = j(({ src: e, alt: t }) => !e || e.indexOf(".") === -1 && e.indexOf("[[") === -1 ? null : L({
141
+ src: e,
142
+ alt: t
143
+ })), K = (e) => e && (Array.isArray(e) && (e = e.join(" ")), typeof e != "string" && (e = String(e)), e.split(" ").map((t) => t.charAt(0)).join("").toUpperCase()), G = (e) => !e || e.length < 2 ? e : K(e), Q = (e) => H([e, (t, n) => {
144
+ n.textContent = G(t);
150
145
  }]), A = {
151
146
  xs: "h-6 w-6",
152
147
  sm: "h-8 w-8",
@@ -167,8 +162,8 @@ const q = j(({ src: n, alt: t }) => !n || n.indexOf(".") === -1 && n.indexOf("[[
167
162
  "3xl": "text-4xl",
168
163
  "4xl": "text-5xl",
169
164
  default: "text-base"
170
- }, V = (n) => A[n] || A.default, Z = (n) => I[n] || I.default, tt = (n, t = null, e = "md") => {
171
- const a = G(n), s = Z(e);
165
+ }, V = (e) => A[e] || A.default, Z = (e) => I[e] || I.default, tt = (e, t = null, n = "md") => {
166
+ const a = G(e), s = Z(n);
172
167
  return h(
173
168
  {
174
169
  class: `
@@ -181,49 +176,49 @@ const q = j(({ src: n, alt: t }) => !n || n.indexOf(".") === -1 && n.indexOf("[[
181
176
  t ? Q(t) : H({ class: "uppercase" }, a)
182
177
  ]
183
178
  );
184
- }, Tt = j(({ src: n, alt: t, fallbackText: e, watcherFallback: a, size: s }) => {
179
+ }, Nt = j(({ src: e, alt: t, fallbackText: n, watcherFallback: a, size: s }) => {
185
180
  const r = V(s);
186
181
  return h(
187
182
  {
188
183
  class: `relative flex items-center justify-center ${r}`
189
184
  },
190
185
  [
191
- q({ src: n, alt: t }),
192
- tt(e, a, s)
186
+ q({ src: e, alt: t }),
187
+ tt(n, a, s)
193
188
  ]
194
189
  );
195
- }), et = ({ currentMonth: n, currentYear: t, onSelect: e }) => h(
190
+ }), et = ({ currentMonth: e, currentYear: t, onSelect: n }) => h(
196
191
  { class: "grid grid-cols-3 gap-2" },
197
192
  T.monthNames.map(
198
- (a, s) => m(
193
+ (a, s) => f(
199
194
  {
200
195
  click: (r) => {
201
- r.preventDefault(), r.stopPropagation(), e(s);
196
+ r.preventDefault(), r.stopPropagation(), n(s);
202
197
  },
203
- variant: n === s ? "primary" : "ghost",
198
+ variant: e === s ? "primary" : "ghost",
204
199
  "aria-label": `Select ${a} ${t}`
205
200
  },
206
201
  a.substring(0, 3)
207
202
  )
208
203
  )
209
- ), D = (n) => (n *= 1, n < 10 ? `0${n}` : String(n)), nt = (n) => (n.indexOf("T") === -1 && n.indexOf(" ") === -1 && (n += "T00:00:01"), n.replace(" ", "T"), n), w = (n, t, e) => `${n}-${D(t + 1)}-${D(e)}`, at = (n) => n ? "bg-accent text-primary" : "", st = (n) => n ? "text-muted-foreground opacity-50" : "", rt = (n, t) => n === t, ot = (n, t) => rt(n, t) ? "bg-primary text-primary-foreground" : "", it = (n, t, e, a) => {
204
+ ), D = (e) => (e *= 1, e < 10 ? `0${e}` : String(e)), nt = (e) => (e.indexOf("T") === -1 && e.indexOf(" ") === -1 && (e += "T00:00:01"), e.replace(" ", "T"), e), w = (e, t, n) => `${e}-${D(t + 1)}-${D(n)}`, at = (e) => e ? "bg-accent text-primary" : "", st = (e) => e ? "text-muted-foreground opacity-50" : "", rt = (e, t) => e === t, ot = (e, t) => rt(e, t) ? "bg-primary text-primary-foreground" : "", it = (e, t, n, a) => {
210
205
  const s = ot(t, a);
211
- return s || (n ? at(n) : e ? st(e) : "text-foreground");
212
- }, N = (n) => {
206
+ return s || (e ? at(e) : n ? st(n) : "text-foreground");
207
+ }, N = (e) => {
213
208
  const {
214
209
  day: t,
215
- currentDate: e,
210
+ currentDate: n,
216
211
  date: a,
217
212
  isToday: s,
218
213
  isOutsideMonth: r,
219
214
  select: l,
220
215
  disabled: i
221
- } = n;
222
- return L(
216
+ } = e;
217
+ return _(
223
218
  {
224
219
  class: `
225
220
  flex items-center justify-center h-9 w-auto p-0 font-normal text-sm rounded-md
226
- ${it(s, e, r, a)}
221
+ ${it(s, n, r, a)}
227
222
  hover:bg-muted/50 hover:text-muted-foreground focus:z-10
228
223
  disabled:pointer-events-none disabled:opacity-50
229
224
  `,
@@ -234,79 +229,79 @@ const q = j(({ src: n, alt: t }) => !n || n.indexOf(".") === -1 && n.indexOf("[[
234
229
  },
235
230
  t.toString()
236
231
  );
237
- }, O = (n, t, e, a) => n === a.date && t === a.month && e === a.year, lt = (n, t, e, a = !1) => {
238
- const { year: s, month: r } = n, l = w(s, r, n.date), i = new Date(s, r, 1).getDay(), d = new Date(s, r + 1, 0).getDate(), g = new Date(s, r, 0).getDate(), f = [], C = r === 0 ? 11 : r - 1, v = r === 0 ? s - 1 : s;
232
+ }, O = (e, t, n, a) => e === a.date && t === a.month && n === a.year, lt = (e, t, n, a = !1) => {
233
+ const { year: s, month: r } = e, l = w(s, r, e.date), i = new Date(s, r, 1).getDay(), d = new Date(s, r + 1, 0).getDate(), g = new Date(s, r, 0).getDate(), m = [], C = r === 0 ? 11 : r - 1, v = r === 0 ? s - 1 : s;
239
234
  for (let o = i - 1; o >= 0; o--) {
240
235
  const u = g - o, p = O(u, C, v, t), y = new Date(v, C, u) < new Date(t.year, t.month, t.date), x = a && y;
241
- f.push(
236
+ m.push(
242
237
  N({
243
238
  day: u,
244
239
  currentDate: l,
245
240
  date: w(v, C, u),
246
241
  isToday: p,
247
242
  isOutsideMonth: !0,
248
- select: e,
243
+ select: n,
249
244
  disabled: x
250
245
  })
251
246
  );
252
247
  }
253
248
  for (let o = 1; o <= d; o++) {
254
249
  const u = O(o, r, s, t), p = new Date(s, r, o) < new Date(t.year, t.month, t.date), y = a && p;
255
- f.push(
250
+ m.push(
256
251
  N({
257
252
  day: o,
258
253
  currentDate: l,
259
254
  date: w(s, r, o),
260
255
  isToday: u,
261
256
  isOutsideMonth: !1,
262
- select: e,
257
+ select: n,
263
258
  disabled: y
264
259
  })
265
260
  );
266
261
  }
267
- const b = r === 11 ? 0 : r + 1, $ = r === 11 ? s + 1 : s, c = (7 - f.length % 7) % 7;
262
+ const b = r === 11 ? 0 : r + 1, $ = r === 11 ? s + 1 : s, c = (7 - m.length % 7) % 7;
268
263
  for (let o = 1; o <= c; o++) {
269
264
  const u = O(o, b, $, t), p = new Date($, b, o) < new Date(t.year, t.month, t.date), y = a && p;
270
- f.push(
265
+ m.push(
271
266
  N({
272
267
  day: o,
273
268
  currentDate: l,
274
269
  date: w($, b, o),
275
270
  isToday: u,
276
271
  isOutsideMonth: !0,
277
- select: e,
272
+ select: n,
278
273
  disabled: y
279
274
  })
280
275
  );
281
276
  }
282
- return f;
283
- }, R = ({ label: n, click: t }) => m(
277
+ return m;
278
+ }, R = ({ label: e, click: t }) => f(
284
279
  {
285
280
  class: `
286
281
  inline-flex items-center justify-center h-7 w-7 bg-transparent p-0
287
282
  opacity-50 hover:opacity-100 text-muted-foreground absolute
288
- ${n === "Previous" ? "left-1" : "right-1"}
283
+ ${e === "Previous" ? "left-1" : "right-1"}
289
284
  focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2
290
285
  `,
291
286
  click: t,
292
- "aria-label": `${n} month`,
287
+ "aria-label": `${e} month`,
293
288
  variant: "icon",
294
- icon: n === "Previous" ? P.chevron.single.left : P.chevron.single.right
289
+ icon: e === "Previous" ? P.chevron.single.left : P.chevron.single.right
295
290
  }
296
- ), ct = ({ onMonthClick: n, onYearClick: t, next: e, previous: a }) => h({ class: "flex items-center justify-center gap-x-2 relative min-h-12 text-sm font-medium" }, [
297
- m({ click: n, variant: "ghost", "aria-label": "Select month" }, "[[monthName]]"),
298
- m({ click: t, variant: "ghost", "aria-label": "Select year" }, "[[current.year]]"),
291
+ ), ct = ({ onMonthClick: e, onYearClick: t, next: n, previous: a }) => h({ class: "flex items-center justify-center gap-x-2 relative min-h-12 text-sm font-medium" }, [
292
+ f({ click: e, variant: "ghost", "aria-label": "Select month" }, "[[monthName]]"),
293
+ f({ click: t, variant: "ghost", "aria-label": "Select year" }, "[[current.year]]"),
299
294
  R({ label: "Previous", click: a }),
300
- R({ label: "Next", click: e })
301
- ]), ht = (n) => h(
295
+ R({ label: "Next", click: n })
296
+ ]), ht = (e) => h(
302
297
  { class: "flex items-center justify-center h-9 w-auto text-[0.8rem] font-normal text-muted-foreground" },
303
- n
304
- ), ut = () => ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(ht), dt = (n) => h({ class: "rdp flex flex-auto flex-col w-full gap-y-1" }, [
298
+ e
299
+ ), ut = () => ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(ht), dt = (e) => h({ class: "rdp flex flex-auto flex-col w-full gap-y-1" }, [
305
300
  ct({
306
- onMonthClick: n.onMonthClick,
307
- onYearClick: n.onYearClick,
308
- next: n.next,
309
- previous: n.previous
301
+ onMonthClick: e.onMonthClick,
302
+ onYearClick: e.onYearClick,
303
+ next: e.next,
304
+ previous: e.previous
310
305
  }),
311
306
  h({
312
307
  class: "flex flex-auto flex-col w-full",
@@ -317,24 +312,24 @@ const q = j(({ src: n, alt: t }) => !n || n.indexOf(".") === -1 && n.indexOf("[[
317
312
  h(
318
313
  { class: "grid grid-cols-7" },
319
314
  lt(
320
- n.current,
321
- n.today,
322
- n.select,
323
- n.blockPriorDates
315
+ e.current,
316
+ e.today,
317
+ e.select,
318
+ e.blockPriorDates
324
319
  )
325
320
  )
326
321
  ]
327
322
  ]
328
323
  })
329
- ]), gt = ({ currentMonth: n, currentYear: t, onSelect: e }) => {
324
+ ]), gt = ({ currentMonth: e, currentYear: t, onSelect: n }) => {
330
325
  const a = t - 50, s = Array.from({ length: 101 }, (r, l) => a + l);
331
326
  return h(
332
327
  { class: "grid grid-cols-4 gap-2 overflow-y-auto max-h-72" },
333
328
  s.map(
334
- (r) => m(
329
+ (r) => f(
335
330
  {
336
331
  click: (l) => {
337
- l.preventDefault(), l.stopPropagation(), e(r);
332
+ l.preventDefault(), l.stopPropagation(), n(r);
338
333
  },
339
334
  variant: r === t ? "primary" : "ghost",
340
335
  "aria-label": `Select ${r}`
@@ -344,7 +339,7 @@ const q = j(({ src: n, alt: t }) => !n || n.indexOf(".") === -1 && n.indexOf("[[
344
339
  )
345
340
  );
346
341
  };
347
- class Nt extends Y {
342
+ class Ot extends Y {
348
343
  /**
349
344
  * This will declare the props for the compiler.
350
345
  *
@@ -360,8 +355,8 @@ class Nt extends Y {
360
355
  * @returns {Date}
361
356
  */
362
357
  getSelectedDate(t) {
363
- const e = this.selectedDate ? new Date(nt(this.selectedDate)) : t;
364
- return new Date(e.getFullYear(), e.getMonth(), e.getDate());
358
+ const n = this.selectedDate ? new Date(nt(this.selectedDate)) : t;
359
+ return new Date(n.getFullYear(), n.getMonth(), n.getDate());
365
360
  }
366
361
  /**
367
362
  * This will set up the data for the calendar.
@@ -369,13 +364,13 @@ class Nt extends Y {
369
364
  * @returns {Data}
370
365
  */
371
366
  setData() {
372
- const t = /* @__PURE__ */ new Date(), e = this.getSelectedDate(t), a = e.getMonth();
367
+ const t = /* @__PURE__ */ new Date(), n = this.getSelectedDate(t), a = n.getMonth();
373
368
  return new B({
374
369
  monthName: this.getMonthName(a),
375
- currentDate: `${e.getFullYear()}-${a + 1}-${e.getDate()}`,
370
+ currentDate: `${n.getFullYear()}-${a + 1}-${n.getDate()}`,
376
371
  current: {
377
- date: e.getDate(),
378
- year: e.getFullYear(),
372
+ date: n.getDate(),
373
+ year: n.getFullYear(),
379
374
  month: a
380
375
  },
381
376
  today: {
@@ -412,8 +407,8 @@ class Nt extends Y {
412
407
  */
413
408
  goToPreviousMonth() {
414
409
  const t = this.data;
415
- let e = t.current.month, a = t.current.year;
416
- e === 0 ? (e = 11, a--) : e--, this.setCurrentDate(e, a);
410
+ let n = t.current.month, a = t.current.year;
411
+ n === 0 ? (n = 11, a--) : n--, this.setCurrentDate(n, a);
417
412
  }
418
413
  /**
419
414
  * This will go to the next month.
@@ -422,8 +417,8 @@ class Nt extends Y {
422
417
  */
423
418
  goToNextMonth() {
424
419
  const t = this.data;
425
- let e = t.current.month, a = t.current.year;
426
- e === 11 ? (e = 0, a++) : e++, this.setCurrentDate(e, a);
420
+ let n = t.current.month, a = t.current.year;
421
+ n === 11 ? (n = 0, a++) : n++, this.setCurrentDate(n, a);
427
422
  }
428
423
  /**
429
424
  * This will set the current month and year.
@@ -433,9 +428,9 @@ class Nt extends Y {
433
428
  * @param {number} [date=null]
434
429
  * @returns {void}
435
430
  */
436
- setCurrentDate(t, e, a = null) {
431
+ setCurrentDate(t, n, a = null) {
437
432
  const s = this.data;
438
- s.current.month = t, s.current.year = e, typeof a == "number" && (s.current.date = D(a)), s.currentDate = `${e}-${D(t + 1)}-${s.current.date}`, s.monthName = this.getMonthName(t);
433
+ s.current.month = t, s.current.year = n, typeof a == "number" && (s.current.date = D(a)), s.currentDate = `${n}-${D(t + 1)}-${s.current.date}`, s.monthName = this.getMonthName(t);
439
434
  }
440
435
  /**
441
436
  * This will select a date.
@@ -444,8 +439,8 @@ class Nt extends Y {
444
439
  * @returns {void}
445
440
  */
446
441
  selectDate(t) {
447
- const e = /* @__PURE__ */ new Date(t + "T00:00:00");
448
- this.setCurrentDate(e.getMonth(), e.getFullYear(), e.getDate()), typeof this.selectedCallBack == "function" && this.selectedCallBack(this.data.currentDate);
442
+ const n = /* @__PURE__ */ new Date(t + "T00:00:00");
443
+ this.setCurrentDate(n.getMonth(), n.getFullYear(), n.getDate()), typeof this.selectedCallBack == "function" && this.selectedCallBack(this.data.currentDate);
449
444
  }
450
445
  /**
451
446
  * This will render the calendar.
@@ -461,8 +456,8 @@ class Nt extends Y {
461
456
  {
462
457
  currentMonth: this.data.current.month,
463
458
  currentYear: this.data.current.year,
464
- onSelect: (e) => {
465
- this.setCurrentDate(e, this.data.current.year), this.state.view = "calendar";
459
+ onSelect: (n) => {
460
+ this.setCurrentDate(n, this.data.current.year), this.state.view = "calendar";
466
461
  }
467
462
  }
468
463
  );
@@ -471,8 +466,8 @@ class Nt extends Y {
471
466
  {
472
467
  currentMonth: this.data.current.month,
473
468
  currentYear: this.data.current.year,
474
- onSelect: (e) => {
475
- this.setCurrentDate(this.data.current.month, e), this.state.view = "calendar";
469
+ onSelect: (n) => {
470
+ this.setCurrentDate(this.data.current.month, n), this.state.view = "calendar";
476
471
  }
477
472
  }
478
473
  );
@@ -480,15 +475,15 @@ class Nt extends Y {
480
475
  return dt({
481
476
  current: this.data.current,
482
477
  today: this.data.today,
483
- select: (e) => this.selectDate(e),
478
+ select: (n) => this.selectDate(n),
484
479
  next: () => this.goToNextMonth(),
485
480
  previous: () => this.goToPreviousMonth(),
486
481
  blockPriorDates: this.blockPriorDates || !1,
487
- onMonthClick: (e) => {
488
- e.preventDefault(), e.stopPropagation(), this.state.view = "months";
482
+ onMonthClick: (n) => {
483
+ n.preventDefault(), n.stopPropagation(), this.state.view = "months";
489
484
  },
490
- onYearClick: (e) => {
491
- e.preventDefault(), e.stopPropagation(), this.state.view = "years";
485
+ onYearClick: (n) => {
486
+ n.preventDefault(), n.stopPropagation(), this.state.view = "years";
492
487
  }
493
488
  });
494
489
  }
@@ -496,44 +491,44 @@ class Nt extends Y {
496
491
  ]);
497
492
  }
498
493
  }
499
- const W = ({ label: n, click: t }) => m(
494
+ const W = ({ label: e, click: t }) => f(
500
495
  {
501
496
  class: `
502
497
  inline-flex items-center justify-center h-7 w-7 bg-transparent p-0
503
498
  opacity-50 hover:opacity-100 text-muted-foreground absolute
504
- ${n === "Previous" ? "left-1" : "right-1"}
499
+ ${e === "Previous" ? "left-1" : "right-1"}
505
500
  focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2
506
501
  `,
507
502
  click: t,
508
- "aria-label": `${n} month`,
503
+ "aria-label": `${e} month`,
509
504
  variant: "icon",
510
- icon: n === "Previous" ? P.chevron.single.left : P.chevron.single.right
505
+ icon: e === "Previous" ? P.chevron.single.left : P.chevron.single.right
511
506
  }
512
- ), ft = ({ onMonthClick: n, onYearClick: t, next: e, previous: a }) => h({ class: "flex items-center justify-center gap-x-2 relative min-h-12 text-sm font-medium" }, [
513
- m({ click: n, variant: "ghost", "aria-label": "Select month" }, "[[monthName]]"),
514
- m({ click: t, variant: "ghost", "aria-label": "Select year" }, "[[current.year]]"),
507
+ ), mt = ({ onMonthClick: e, onYearClick: t, next: n, previous: a }) => h({ class: "flex items-center justify-center gap-x-2 relative min-h-12 text-sm font-medium" }, [
508
+ f({ click: e, variant: "ghost", "aria-label": "Select month" }, "[[monthName]]"),
509
+ f({ click: t, variant: "ghost", "aria-label": "Select year" }, "[[current.year]]"),
515
510
  W({ label: "Previous", click: a }),
516
- W({ label: "Next", click: e })
517
- ]), mt = (n) => h({ class: "h-9 flex items-center justify-center font-medium" }, n), pt = () => h(
511
+ W({ label: "Next", click: n })
512
+ ]), ft = (e) => h({ class: "h-9 flex items-center justify-center font-medium" }, e), pt = () => h(
518
513
  { class: "grid grid-cols-7 gap-1 text-center text-xs font-medium text-muted-foreground mb-2" },
519
- ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(mt)
520
- ), yt = ({ day: n, iso: t, disabled: e, isStart: a, isEnd: s, isBetween: r, isOtherMonth: l, click: i }) => {
514
+ ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(ft)
515
+ ), yt = ({ day: e, iso: t, disabled: n, isStart: a, isEnd: s, isBetween: r, isOtherMonth: l, click: i }) => {
521
516
  let d = "ghost", g = "";
522
- return a || s ? (d = "default", g = "bg-primary text-primary-foreground hover:bg-primary/90") : r && (g = "bg-accent text-accent-foreground hover:bg-accent/80"), e && (g += " opacity-50 cursor-not-allowed"), l && (g += " text-muted-foreground opacity-50"), m(
517
+ return a || s ? (d = "default", g = "bg-primary text-primary-foreground hover:bg-primary/90") : r && (g = "bg-accent text-accent-foreground hover:bg-accent/80"), n && (g += " opacity-50 cursor-not-allowed"), l && (g += " text-muted-foreground opacity-50"), f(
523
518
  {
524
519
  class: `flex items-center justify-center p-0 text-sm font-medium rounded-md transition-colors ${g}`,
525
520
  variant: d,
526
- disabled: e,
527
- click: (f) => {
528
- f.preventDefault(), f.stopPropagation(), e || i();
521
+ disabled: n,
522
+ click: (m) => {
523
+ m.preventDefault(), m.stopPropagation(), n || i();
529
524
  }
530
525
  },
531
- n.toString()
526
+ e.toString()
532
527
  );
533
- }, Dt = ({ today: n, current: t, blockPriorDates: e, onDateClick: a }) => {
534
- const { start: s, end: r } = t, l = new Date(t.year, t.month, 1).getDay(), i = new Date(t.year, t.month + 1, 0).getDate(), d = [], g = t.month === 0 ? 11 : t.month - 1, f = t.month === 0 ? t.year - 1 : t.year, C = new Date(f, g + 1, 0).getDate(), v = t.month === 11 ? 0 : t.month + 1, b = t.month === 11 ? t.year + 1 : t.year;
528
+ }, Dt = ({ today: e, current: t, blockPriorDates: n, onDateClick: a }) => {
529
+ const { start: s, end: r } = t, l = new Date(t.year, t.month, 1).getDay(), i = new Date(t.year, t.month + 1, 0).getDate(), d = [], g = t.month === 0 ? 11 : t.month - 1, m = t.month === 0 ? t.year - 1 : t.year, C = new Date(m, g + 1, 0).getDate(), v = t.month === 11 ? 0 : t.month + 1, b = t.month === 11 ? t.year + 1 : t.year;
535
530
  for (let c = l - 1; c >= 0; c--) {
536
- const o = C - c, u = w(f, g, o), p = new Date(f, g, o), y = new Date(n.year, n.month, n.date), x = p < y, M = e && x, S = s === u, k = r === u, X = s && r && u > s && u < r;
531
+ const o = C - c, u = w(m, g, o), p = new Date(m, g, o), y = new Date(e.year, e.month, e.date), x = p < y, M = n && x, S = s === u, k = r === u, X = s && r && u > s && u < r;
537
532
  d.push({
538
533
  day: o,
539
534
  iso: u,
@@ -546,7 +541,7 @@ const W = ({ label: n, click: t }) => m(
546
541
  });
547
542
  }
548
543
  for (let c = 1; c <= i; c++) {
549
- const o = w(t.year, t.month, c), u = new Date(t.year, t.month, c), p = new Date(n.year, n.month, n.date), y = u < p, x = e && y, M = s === o, S = r === o, k = s && r && o > s && o < r;
544
+ const o = w(t.year, t.month, c), u = new Date(t.year, t.month, c), p = new Date(e.year, e.month, e.date), y = u < p, x = n && y, M = s === o, S = r === o, k = s && r && o > s && o < r;
550
545
  d.push({
551
546
  day: c,
552
547
  iso: o,
@@ -562,7 +557,7 @@ const W = ({ label: n, click: t }) => m(
562
557
  }
563
558
  const F = (7 - d.length % 7) % 7;
564
559
  for (let c = 1; c <= F; c++) {
565
- const o = w(b, v, c), u = new Date(b, v, c), p = new Date(n.year, n.month, n.date), y = u < p, x = e && y, M = s === o, S = r === o, k = s && r && o > s && o < r;
560
+ const o = w(b, v, c), u = new Date(b, v, c), p = new Date(e.year, e.month, e.date), y = u < p, x = n && y, M = s === o, S = r === o, k = s && r && o > s && o < r;
566
561
  d.push({
567
562
  day: c,
568
563
  iso: o,
@@ -589,12 +584,12 @@ const W = ({ label: n, click: t }) => m(
589
584
  })
590
585
  )
591
586
  );
592
- }, xt = j((n, t) => h({ class: "flex flex-auto flex-col" }, [
593
- ft({
594
- onMonthClick: n.onMonthClick,
595
- onYearClick: n.onYearClick,
596
- next: n.next,
597
- previous: n.previous
587
+ }, xt = j((e, t) => h({ class: "flex flex-auto flex-col" }, [
588
+ mt({
589
+ onMonthClick: e.onMonthClick,
590
+ onYearClick: e.onYearClick,
591
+ next: e.next,
592
+ previous: e.previous
598
593
  }),
599
594
  h({
600
595
  class: "flex flex-auto flex-col w-full",
@@ -603,57 +598,57 @@ const W = ({ label: n, click: t }) => m(
603
598
  () => [
604
599
  pt(),
605
600
  Dt({
606
- today: n.today,
607
- current: n.current,
608
- blockPriorDates: n.blockPriorDates,
609
- onDateClick: n.onDateClick
601
+ today: e.today,
602
+ current: e.current,
603
+ blockPriorDates: e.blockPriorDates,
604
+ onDateClick: e.onDateClick
610
605
  })
611
606
  ]
612
607
  ]
613
608
  })
614
- ])), wt = ({ currentMonth: n, currentYear: t, onSelect: e }) => h(
609
+ ])), wt = ({ currentMonth: e, currentYear: t, onSelect: n }) => h(
615
610
  { class: "grid grid-cols-3 gap-2" },
616
611
  T.monthNames.map(
617
- (a, s) => m(
612
+ (a, s) => f(
618
613
  {
619
614
  click: (r) => {
620
- r.preventDefault(), r.stopPropagation(), e(s);
615
+ r.preventDefault(), r.stopPropagation(), n(s);
621
616
  },
622
- variant: n === s ? "primary" : "ghost",
617
+ variant: e === s ? "primary" : "ghost",
623
618
  "aria-label": `Select ${a} ${t}`
624
619
  },
625
620
  a.substring(0, 3)
626
621
  )
627
622
  )
628
- ), vt = ({ start: n, end: t, selecting: e, onSelectStart: a, onSelectEnd: s }) => h({ class: "flex gap-x-2 mb-4" }, [
629
- z("selecting", (r) => m({
623
+ ), vt = ({ start: e, end: t, selecting: n, onSelectStart: a, onSelectEnd: s }) => h({ class: "flex gap-x-2 mb-4" }, [
624
+ z("selecting", (r) => f({
630
625
  click: a,
631
626
  variant: r === "start" ? "primary" : "outline",
632
627
  class: "flex-1"
633
628
  }, [
634
629
  h({ class: "font-medium" }, E("current.start", "Start Date"))
635
630
  ])),
636
- z("selecting", (r) => m({
631
+ z("selecting", (r) => f({
637
632
  click: s,
638
633
  variant: r === "end" ? "primary" : "outline",
639
634
  class: "flex-1"
640
635
  }, [
641
636
  h({ class: "font-medium" }, E("current.end", "End Date"))
642
637
  ]))
643
- ]), E = (n, t) => [`[[${n}]]`, (e) => e == null ? t : bt(e)], bt = (n) => {
644
- const t = /* @__PURE__ */ new Date(n + "T00:00:00"), e = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], a = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
645
- return `${e[t.getDay()]}, ${t.getDate()} ${a[t.getMonth()]}`;
646
- }, Ct = ({ currentYear: n, onSelect: t }) => {
647
- const e = n - 50, a = Array.from({ length: 101 }, (s, r) => e + r);
638
+ ]), E = (e, t) => [`[[${e}]]`, (n) => n == null ? t : bt(n)], bt = (e) => {
639
+ const t = /* @__PURE__ */ new Date(e + "T00:00:00"), n = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], a = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
640
+ return `${n[t.getDay()]}, ${t.getDate()} ${a[t.getMonth()]}`;
641
+ }, Ct = ({ currentYear: e, onSelect: t }) => {
642
+ const n = e - 50, a = Array.from({ length: 101 }, (s, r) => n + r);
648
643
  return h(
649
644
  { class: "grid grid-cols-4 gap-2 overflow-y-auto max-h-72" },
650
645
  a.map(
651
- (s) => m(
646
+ (s) => f(
652
647
  {
653
648
  click: (r) => {
654
649
  r.preventDefault(), r.stopPropagation(), t(s);
655
650
  },
656
- variant: s === n ? "primary" : "ghost",
651
+ variant: s === e ? "primary" : "ghost",
657
652
  "aria-label": `Select ${s}`
658
653
  },
659
654
  s.toString()
@@ -661,7 +656,7 @@ const W = ({ label: n, click: t }) => m(
661
656
  )
662
657
  );
663
658
  };
664
- class Ot extends Y {
659
+ class Yt extends Y {
665
660
  /**
666
661
  * Declare compiler props.
667
662
  *
@@ -676,7 +671,7 @@ class Ot extends Y {
676
671
  * @returns {Data}
677
672
  */
678
673
  setData() {
679
- const t = /* @__PURE__ */ new Date(), e = this.startDate ? /* @__PURE__ */ new Date(this.startDate + "T00:00:00") : t, a = e.getMonth(), s = e.getFullYear();
674
+ const t = /* @__PURE__ */ new Date(), n = this.startDate ? /* @__PURE__ */ new Date(this.startDate + "T00:00:00") : t, a = n.getMonth(), s = n.getFullYear();
680
675
  return new B({
681
676
  today: {
682
677
  date: t.getDate(),
@@ -684,7 +679,7 @@ class Ot extends Y {
684
679
  year: t.getFullYear()
685
680
  },
686
681
  monthName: this.getMonthName(a),
687
- currentData: `${e.getFullYear()}-${D(e.getMonth() + 1)}-${D(e.getDate())}`,
682
+ currentData: `${n.getFullYear()}-${D(n.getMonth() + 1)}-${D(n.getDate())}`,
688
683
  current: {
689
684
  date: t.getDate(),
690
685
  month: a,
@@ -724,19 +719,19 @@ class Ot extends Y {
724
719
  handleClick(t) {
725
720
  if (this.data.selecting === "start") {
726
721
  this.data.current.start = t, this.data.current.end = null, this.data.selecting = "end";
727
- const e = /* @__PURE__ */ new Date(t + "T00:00:00");
722
+ const n = /* @__PURE__ */ new Date(t + "T00:00:00");
728
723
  this.setCurrent({
729
- month: e.getMonth(),
730
- year: e.getFullYear(),
731
- date: e.getDate()
724
+ month: n.getMonth(),
725
+ year: n.getFullYear(),
726
+ date: n.getDate()
732
727
  });
733
728
  } else {
734
729
  this.data.current.start && t < this.data.current.start ? (this.data.current.end = this.data.current.start, this.data.current.start = t) : this.data.current.end = t, this.data.selecting = "start";
735
- const e = /* @__PURE__ */ new Date(t + "T00:00:00");
730
+ const n = /* @__PURE__ */ new Date(t + "T00:00:00");
736
731
  this.setCurrent({
737
- month: e.getMonth(),
738
- year: e.getFullYear(),
739
- date: e.getDate()
732
+ month: n.getMonth(),
733
+ year: n.getFullYear(),
734
+ date: n.getDate()
740
735
  }), typeof this.onRangeSelect == "function" && this.onRangeSelect(this.data.current.start, this.data.current.end);
741
736
  }
742
737
  }
@@ -746,9 +741,9 @@ class Ot extends Y {
746
741
  * @param {object} obj
747
742
  * @returns {void}
748
743
  */
749
- setCurrent({ month: t, year: e, date: a = null }) {
744
+ setCurrent({ month: t, year: n, date: a = null }) {
750
745
  const s = this.data.current;
751
- s.month = (t + 12) % 12, s.year = e + (t < 0 ? -1 : t > 11 ? 1 : 0), a !== null && (s.date = a), this.data.monthName = this.getMonthName(s.month), this.data.currentDate = `${e}-${D(t + 1)}-${D(s.date)}`;
746
+ s.month = (t + 12) % 12, s.year = n + (t < 0 ? -1 : t > 11 ? 1 : 0), a !== null && (s.date = a), this.data.monthName = this.getMonthName(s.month), this.data.currentDate = `${n}-${D(t + 1)}-${D(s.date)}`;
752
747
  }
753
748
  /**
754
749
  * Render the range calendar.
@@ -756,7 +751,7 @@ class Ot extends Y {
756
751
  * @returns {object}
757
752
  */
758
753
  render() {
759
- const { today: t, current: e, selecting: a } = this.data, { start: s, end: r } = e;
754
+ const { today: t, current: n, selecting: a } = this.data, { start: s, end: r } = n;
760
755
  return h({ class: "range-calendar border border-border rounded-lg shadow-md p-4 w-full max-w-sm min-w-80" }, [
761
756
  vt({
762
757
  start: s,
@@ -774,28 +769,28 @@ class Ot extends Y {
774
769
  case "months":
775
770
  return wt(
776
771
  {
777
- currentMonth: e.month,
778
- currentYear: e.year,
772
+ currentMonth: n.month,
773
+ currentYear: n.year,
779
774
  onSelect: (i) => {
780
- this.setCurrent({ month: i, year: e.year }), this.state.view = "calendar";
775
+ this.setCurrent({ month: i, year: n.year }), this.state.view = "calendar";
781
776
  }
782
777
  }
783
778
  );
784
779
  case "years":
785
780
  return Ct(
786
781
  {
787
- currentYear: e.year,
782
+ currentYear: n.year,
788
783
  onSelect: (i) => {
789
- this.setCurrent({ month: e.month, year: i }), this.state.view = "calendar";
784
+ this.setCurrent({ month: n.month, year: i }), this.state.view = "calendar";
790
785
  }
791
786
  }
792
787
  );
793
788
  default:
794
789
  return xt({
795
790
  monthName: this.data.monthName,
796
- year: e.year,
791
+ year: n.year,
797
792
  today: t,
798
- current: e,
793
+ current: n,
799
794
  blockPriorDates: this.blockPriorDates,
800
795
  onDateClick: (i) => this.handleClick(i),
801
796
  onMonthClick: (i) => {
@@ -819,15 +814,15 @@ class Ot extends Y {
819
814
  }
820
815
  }
821
816
  export {
822
- Tt as A,
817
+ Nt as A,
823
818
  lt as C,
824
819
  N as D,
825
820
  w as F,
826
821
  dt as M,
827
- Pt as P,
828
- Ot as R,
822
+ Tt as P,
823
+ Yt as R,
829
824
  ht as a,
830
- Nt as b,
825
+ Ot as b,
831
826
  nt as c,
832
827
  U as g,
833
828
  D as p
@@ -4,8 +4,8 @@ import { B as P, I as J } from "./buttons-CHEs54Wl.js";
4
4
  import { Icons as S } from "./icons.es.js";
5
5
  import { TableBody as Z, DataTableBody as ee, ScrollableTableBody as te, List as se, IntervalTimer as ae } from "@base-framework/organisms";
6
6
  import { C as ie, I as ne, H as oe } from "./inputs-9udyzkHR.js";
7
- import { A as le, P as re } from "./range-calendar-CCVC3e9d.js";
8
- import { V as g } from "./veil-CqnAmj-D.js";
7
+ import { A as le, P as re } from "./range-calendar-KNBY64Zx.js";
8
+ import { V as g } from "./image-DGInMcvV.js";
9
9
  d((t, e) => ({
10
10
  class: "flex items-center px-4 py-2",
11
11
  ...t,
@@ -1,6 +1,6 @@
1
1
  import { Span as c, Legend as b, Fieldset as p, Div as l, UseParent as u, Input as C } from "@base-framework/atoms";
2
2
  import { Atom as s, Html as x } from "@base-framework/base";
3
- import { a as d } from "./veil-CqnAmj-D.js";
3
+ import { a as d } from "./image-DGInMcvV.js";
4
4
  import { f as h, e as y, g as k } from "./inputs-9udyzkHR.js";
5
5
  const a = {
6
6
  gray: {
@@ -9,6 +9,7 @@ export * from "./form/inputs/range-slider.js";
9
9
  export * from "./form/legend.js";
10
10
  export * from "./form/select.js";
11
11
  export * from "./icon.js";
12
+ export * from "./image.js";
12
13
  export * from "./progress/circle-graph.js";
13
14
  export * from "./progress/progress-bar.js";
14
15
  export * from "./skeleton.js";
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Image
3
+ *
4
+ * Creates an image element, hiding it on error.
5
+ *
6
+ * @param {object} props
7
+ * @returns {object}
8
+ */
9
+ export const Image: Function;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base-framework/ui",
3
- "version": "1.0.2015",
3
+ "version": "1.0.2017",
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": {
@@ -1,20 +0,0 @@
1
- import { Jot as n, Component as a } from "@base-framework/base";
2
- class s extends a {
3
- /**
4
- * This will set the component context.
5
- *
6
- * @param {object|null} context
7
- * @returns {object|null}
8
- */
9
- setContext(o) {
10
- if (this.data)
11
- return null;
12
- const e = this?.parent?.data ?? this?.parent?.context?.data ?? this?.parent?.state ?? null;
13
- return e ? { data: e } : null;
14
- }
15
- }
16
- const i = (t) => n(t, s);
17
- export {
18
- s as V,
19
- i as a
20
- };