@base-framework/ui 1.0.2016 → 1.0.2018

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-BB7dLJir.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-DqVS8ooC.js";
4
- import { C as ce, F as ue } from "./form-group-CJzpq9Us.js";
3
+ import { P as I, b as ie, R as ae } from "./range-calendar-KNBY64Zx.js";
4
+ import { C as ce, F as ue } from "./form-group-BB7dLJir.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,29 @@
1
+ import { Div as r, H4 as s, P as c } from "@base-framework/atoms";
2
+ import { Atom as d } from "@base-framework/base";
3
+ const g = d((e, a) => {
4
+ const l = e.margin ?? "my-5 mx-5", t = e.padding ?? "p-4", o = e.border ?? "border-border";
5
+ return e.hover && (e.class += " hover:shadow-lg hover:bg-muted/50"), r({
6
+ ...e,
7
+ class: `rounded-lg ${o} bg-card text-card-foreground shadow-md min-w-[120px] min-h-[80px] ${l} ${t} ${e.class || ""}`
8
+ }, a);
9
+ }), i = d((e, a) => {
10
+ const l = e.border === !0 ? "border-t" : "";
11
+ return r({
12
+ ...e,
13
+ class: `grid grid-cols-1 gap-y-4 sm:grid-cols-[1fr_2fr] sm:gap-x-6 pt-8 ${l} ${e.class || ""}`
14
+ }, [
15
+ e.label && r({
16
+ ...e.labelProps,
17
+ class: `flex flex-auto flex-col gap-y-1 ${e.labelProps?.class || ""}`
18
+ }, [
19
+ s({ class: "text-base" }, e.label),
20
+ e.description && c({ class: "text-sm text-muted-foreground" }, e.description)
21
+ ]),
22
+ // Controls container: grows to fill remaining space, spacing between items
23
+ r({ class: "flex flex-col gap-y-4" }, a)
24
+ ]);
25
+ });
26
+ export {
27
+ g as C,
28
+ i as F
29
+ };
@@ -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
- 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-B2M6T2d1.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-DqVS8ooC.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-C50P9GW4.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";
3
+ import { C as T, F as b } from "./form-group-BB7dLJir.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-ChnuRE7a.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-B2M6T2d1.js";
2
- import { A as W, P as X, g as Y } from "./range-calendar-DqVS8ooC.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-ChnuRE7a.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-C50P9GW4.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-DqVS8ooC.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,21 +1,22 @@
1
- import { Div as h, Img as _, Span as H, Button as L, OnState as J, On as z } from "@base-framework/atoms";
2
- import { Component as B, Data as j, Atom as T, DateTime as O } from "@base-framework/base";
3
- import { B as m } from "./buttons-CHEs54Wl.js";
1
+ import { Div as h, Span as H, Button as _, OnState as J, On as z } from "@base-framework/atoms";
2
+ import { Component as Y, Data as B, Atom as j, DateTime as T } from "@base-framework/base";
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
6
  const U = (e, t) => {
6
7
  const n = e ? e.getBoundingClientRect() : { top: 0, bottom: 0, left: 0 }, a = t.getBoundingClientRect(), s = 10, r = globalThis.scrollX, l = globalThis.scrollY;
7
8
  let i = n.left + r, d = n.bottom + l;
8
- const g = globalThis.innerHeight - n.bottom, f = n.top;
9
- return i + a.width > globalThis.innerWidth && (i = globalThis.innerWidth - a.width - s), g < a.height && f > g ? d = n.top + l - a.height - s : g < a.height && (d = n.bottom + l - (a.height - g) - s), { x: i, y: d };
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 Tt extends B {
12
+ class Tt extends Y {
12
13
  /**
13
14
  * This will set up the data.
14
15
  *
15
16
  * @returns {object}
16
17
  */
17
18
  setData() {
18
- const t = this.parent.data || new j();
19
+ const t = this.parent.data || new B();
19
20
  return t.set({
20
21
  position: { x: 0, y: 0 }
21
22
  }), t;
@@ -136,19 +137,10 @@ class Tt extends B {
136
137
  this.panel.hidePopover();
137
138
  }
138
139
  }
139
- const q = T(({ src: e, alt: t, class: n }) => !e || (n = n || "", e.indexOf(".") === -1 && e.indexOf("[[") === -1) ? null : _({
140
- class: `absolute w-full h-full rounded-full object-cover fadeIn ${n}`,
141
- src: e,
142
- alt: t,
143
- load: (a) => a.target.style.visibility = "visible",
144
- /**
145
- * If there's an error loading the image, hide it.
146
- */
147
- error: (a) => a.target.style.visibility = "hidden"
148
- })), K = T(({ src: e, alt: t }) => !e || e.indexOf(".") === -1 && e.indexOf("[[") === -1 ? null : q({
140
+ const q = j(({ src: e, alt: t }) => !e || e.indexOf(".") === -1 && e.indexOf("[[") === -1 ? null : L({
149
141
  src: e,
150
142
  alt: t
151
- })), Q = (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 : Q(e), V = (e) => H([e, (t, n) => {
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) => {
152
144
  n.textContent = G(t);
153
145
  }]), A = {
154
146
  xs: "h-6 w-6",
@@ -170,8 +162,8 @@ const q = T(({ src: e, alt: t, class: n }) => !e || (n = n || "", e.indexOf(".")
170
162
  "3xl": "text-4xl",
171
163
  "4xl": "text-5xl",
172
164
  default: "text-base"
173
- }, Z = (e) => A[e] || A.default, tt = (e) => I[e] || I.default, et = (e, t = null, n = "md") => {
174
- const a = G(e), s = tt(n);
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);
175
167
  return h(
176
168
  {
177
169
  class: `
@@ -181,24 +173,24 @@ const q = T(({ src: e, alt: t, class: n }) => !e || (n = n || "", e.indexOf(".")
181
173
  `
182
174
  },
183
175
  [
184
- t ? V(t) : H({ class: "uppercase" }, a)
176
+ t ? Q(t) : H({ class: "uppercase" }, a)
185
177
  ]
186
178
  );
187
- }, Ot = T(({ src: e, alt: t, fallbackText: n, watcherFallback: a, size: s }) => {
188
- const r = Z(s);
179
+ }, Nt = j(({ src: e, alt: t, fallbackText: n, watcherFallback: a, size: s }) => {
180
+ const r = V(s);
189
181
  return h(
190
182
  {
191
183
  class: `relative flex items-center justify-center ${r}`
192
184
  },
193
185
  [
194
- K({ src: e, alt: t }),
195
- et(n, a, s)
186
+ q({ src: e, alt: t }),
187
+ tt(n, a, s)
196
188
  ]
197
189
  );
198
- }), nt = ({ currentMonth: e, currentYear: t, onSelect: n }) => h(
190
+ }), et = ({ currentMonth: e, currentYear: t, onSelect: n }) => h(
199
191
  { class: "grid grid-cols-3 gap-2" },
200
- O.monthNames.map(
201
- (a, s) => m(
192
+ T.monthNames.map(
193
+ (a, s) => f(
202
194
  {
203
195
  click: (r) => {
204
196
  r.preventDefault(), r.stopPropagation(), n(s);
@@ -209,9 +201,9 @@ const q = T(({ src: e, alt: t, class: n }) => !e || (n = n || "", e.indexOf(".")
209
201
  a.substring(0, 3)
210
202
  )
211
203
  )
212
- ), D = (e) => (e *= 1, e < 10 ? `0${e}` : String(e)), at = (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)}`, st = (e) => e ? "bg-accent text-primary" : "", rt = (e) => e ? "text-muted-foreground opacity-50" : "", ot = (e, t) => e === t, it = (e, t) => ot(e, t) ? "bg-primary text-primary-foreground" : "", lt = (e, t, n, a) => {
213
- const s = it(t, a);
214
- return s || (e ? st(e) : n ? rt(n) : "text-foreground");
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) => {
205
+ const s = ot(t, a);
206
+ return s || (e ? at(e) : n ? st(n) : "text-foreground");
215
207
  }, N = (e) => {
216
208
  const {
217
209
  day: t,
@@ -222,11 +214,11 @@ const q = T(({ src: e, alt: t, class: n }) => !e || (n = n || "", e.indexOf(".")
222
214
  select: l,
223
215
  disabled: i
224
216
  } = e;
225
- return L(
217
+ return _(
226
218
  {
227
219
  class: `
228
220
  flex items-center justify-center h-9 w-auto p-0 font-normal text-sm rounded-md
229
- ${lt(s, n, r, a)}
221
+ ${it(s, n, r, a)}
230
222
  hover:bg-muted/50 hover:text-muted-foreground focus:z-10
231
223
  disabled:pointer-events-none disabled:opacity-50
232
224
  `,
@@ -237,11 +229,11 @@ const q = T(({ src: e, alt: t, class: n }) => !e || (n = n || "", e.indexOf(".")
237
229
  },
238
230
  t.toString()
239
231
  );
240
- }, Y = (e, t, n, a) => e === a.date && t === a.month && n === a.year, ct = (e, t, n, a = !1) => {
241
- 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(), 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;
242
234
  for (let o = i - 1; o >= 0; o--) {
243
- const u = g - o, p = Y(u, C, v, t), y = new Date(v, C, u) < new Date(t.year, t.month, t.date), x = a && y;
244
- f.push(
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;
236
+ m.push(
245
237
  N({
246
238
  day: u,
247
239
  currentDate: l,
@@ -254,8 +246,8 @@ const q = T(({ src: e, alt: t, class: n }) => !e || (n = n || "", e.indexOf(".")
254
246
  );
255
247
  }
256
248
  for (let o = 1; o <= d; o++) {
257
- const u = Y(o, r, s, t), p = new Date(s, r, o) < new Date(t.year, t.month, t.date), y = a && p;
258
- f.push(
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;
250
+ m.push(
259
251
  N({
260
252
  day: o,
261
253
  currentDate: l,
@@ -267,10 +259,10 @@ const q = T(({ src: e, alt: t, class: n }) => !e || (n = n || "", e.indexOf(".")
267
259
  })
268
260
  );
269
261
  }
270
- 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;
271
263
  for (let o = 1; o <= c; o++) {
272
- const u = Y(o, b, $, t), p = new Date($, b, o) < new Date(t.year, t.month, t.date), y = a && p;
273
- f.push(
264
+ const u = O(o, b, $, t), p = new Date($, b, o) < new Date(t.year, t.month, t.date), y = a && p;
265
+ m.push(
274
266
  N({
275
267
  day: o,
276
268
  currentDate: l,
@@ -282,8 +274,8 @@ const q = T(({ src: e, alt: t, class: n }) => !e || (n = n || "", e.indexOf(".")
282
274
  })
283
275
  );
284
276
  }
285
- return f;
286
- }, R = ({ label: e, click: t }) => m(
277
+ return m;
278
+ }, R = ({ label: e, click: t }) => f(
287
279
  {
288
280
  class: `
289
281
  inline-flex items-center justify-center h-7 w-7 bg-transparent p-0
@@ -296,16 +288,16 @@ const q = T(({ src: e, alt: t, class: n }) => !e || (n = n || "", e.indexOf(".")
296
288
  variant: "icon",
297
289
  icon: e === "Previous" ? P.chevron.single.left : P.chevron.single.right
298
290
  }
299
- ), ht = ({ 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" }, [
300
- m({ click: e, variant: "ghost", "aria-label": "Select month" }, "[[monthName]]"),
301
- 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]]"),
302
294
  R({ label: "Previous", click: a }),
303
295
  R({ label: "Next", click: n })
304
- ]), ut = (e) => h(
296
+ ]), ht = (e) => h(
305
297
  { class: "flex items-center justify-center h-9 w-auto text-[0.8rem] font-normal text-muted-foreground" },
306
298
  e
307
- ), dt = () => ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(ut), gt = (e) => h({ class: "rdp flex flex-auto flex-col w-full gap-y-1" }, [
308
- ht({
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" }, [
300
+ ct({
309
301
  onMonthClick: e.onMonthClick,
310
302
  onYearClick: e.onYearClick,
311
303
  next: e.next,
@@ -316,10 +308,10 @@ const q = T(({ src: e, alt: t, class: n }) => !e || (n = n || "", e.indexOf(".")
316
308
  onSet: [
317
309
  "currentDate",
318
310
  () => [
319
- h({ class: "grid grid-cols-7" }, dt()),
311
+ h({ class: "grid grid-cols-7" }, ut()),
320
312
  h(
321
313
  { class: "grid grid-cols-7" },
322
- ct(
314
+ lt(
323
315
  e.current,
324
316
  e.today,
325
317
  e.select,
@@ -329,12 +321,12 @@ const q = T(({ src: e, alt: t, class: n }) => !e || (n = n || "", e.indexOf(".")
329
321
  ]
330
322
  ]
331
323
  })
332
- ]), ft = ({ currentMonth: e, currentYear: t, onSelect: n }) => {
324
+ ]), gt = ({ currentMonth: e, currentYear: t, onSelect: n }) => {
333
325
  const a = t - 50, s = Array.from({ length: 101 }, (r, l) => a + l);
334
326
  return h(
335
327
  { class: "grid grid-cols-4 gap-2 overflow-y-auto max-h-72" },
336
328
  s.map(
337
- (r) => m(
329
+ (r) => f(
338
330
  {
339
331
  click: (l) => {
340
332
  l.preventDefault(), l.stopPropagation(), n(r);
@@ -347,7 +339,7 @@ const q = T(({ src: e, alt: t, class: n }) => !e || (n = n || "", e.indexOf(".")
347
339
  )
348
340
  );
349
341
  };
350
- class Nt extends B {
342
+ class Ot extends Y {
351
343
  /**
352
344
  * This will declare the props for the compiler.
353
345
  *
@@ -363,7 +355,7 @@ class Nt extends B {
363
355
  * @returns {Date}
364
356
  */
365
357
  getSelectedDate(t) {
366
- const n = this.selectedDate ? new Date(at(this.selectedDate)) : t;
358
+ const n = this.selectedDate ? new Date(nt(this.selectedDate)) : t;
367
359
  return new Date(n.getFullYear(), n.getMonth(), n.getDate());
368
360
  }
369
361
  /**
@@ -373,7 +365,7 @@ class Nt extends B {
373
365
  */
374
366
  setData() {
375
367
  const t = /* @__PURE__ */ new Date(), n = this.getSelectedDate(t), a = n.getMonth();
376
- return new j({
368
+ return new B({
377
369
  monthName: this.getMonthName(a),
378
370
  currentDate: `${n.getFullYear()}-${a + 1}-${n.getDate()}`,
379
371
  current: {
@@ -406,7 +398,7 @@ class Nt extends B {
406
398
  * @returns {string}
407
399
  */
408
400
  getMonthName(t) {
409
- return O.monthNames[t];
401
+ return T.monthNames[t];
410
402
  }
411
403
  /**
412
404
  * This will go to the previous month.
@@ -460,7 +452,7 @@ class Nt extends B {
460
452
  J("view", (t) => {
461
453
  switch (t) {
462
454
  case "months":
463
- return nt(
455
+ return et(
464
456
  {
465
457
  currentMonth: this.data.current.month,
466
458
  currentYear: this.data.current.year,
@@ -470,7 +462,7 @@ class Nt extends B {
470
462
  }
471
463
  );
472
464
  case "years":
473
- return ft(
465
+ return gt(
474
466
  {
475
467
  currentMonth: this.data.current.month,
476
468
  currentYear: this.data.current.year,
@@ -480,7 +472,7 @@ class Nt extends B {
480
472
  }
481
473
  );
482
474
  default:
483
- return gt({
475
+ return dt({
484
476
  current: this.data.current,
485
477
  today: this.data.today,
486
478
  select: (n) => this.selectDate(n),
@@ -499,7 +491,7 @@ class Nt extends B {
499
491
  ]);
500
492
  }
501
493
  }
502
- const W = ({ label: e, click: t }) => m(
494
+ const W = ({ label: e, click: t }) => f(
503
495
  {
504
496
  class: `
505
497
  inline-flex items-center justify-center h-7 w-7 bg-transparent p-0
@@ -513,30 +505,30 @@ const W = ({ label: e, click: t }) => m(
513
505
  icon: e === "Previous" ? P.chevron.single.left : P.chevron.single.right
514
506
  }
515
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" }, [
516
- m({ click: e, variant: "ghost", "aria-label": "Select month" }, "[[monthName]]"),
517
- m({ click: t, variant: "ghost", "aria-label": "Select year" }, "[[current.year]]"),
508
+ f({ click: e, variant: "ghost", "aria-label": "Select month" }, "[[monthName]]"),
509
+ f({ click: t, variant: "ghost", "aria-label": "Select year" }, "[[current.year]]"),
518
510
  W({ label: "Previous", click: a }),
519
511
  W({ label: "Next", click: n })
520
- ]), pt = (e) => h({ class: "h-9 flex items-center justify-center font-medium" }, e), yt = () => h(
512
+ ]), ft = (e) => h({ class: "h-9 flex items-center justify-center font-medium" }, e), pt = () => h(
521
513
  { class: "grid grid-cols-7 gap-1 text-center text-xs font-medium text-muted-foreground mb-2" },
522
- ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(pt)
523
- ), Dt = ({ day: e, iso: t, disabled: n, 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 }) => {
524
516
  let d = "ghost", g = "";
525
- 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"), 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(
526
518
  {
527
519
  class: `flex items-center justify-center p-0 text-sm font-medium rounded-md transition-colors ${g}`,
528
520
  variant: d,
529
521
  disabled: n,
530
- click: (f) => {
531
- f.preventDefault(), f.stopPropagation(), n || i();
522
+ click: (m) => {
523
+ m.preventDefault(), m.stopPropagation(), n || i();
532
524
  }
533
525
  },
534
526
  e.toString()
535
527
  );
536
- }, xt = ({ today: e, current: t, blockPriorDates: n, onDateClick: a }) => {
537
- 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;
538
530
  for (let c = l - 1; c >= 0; c--) {
539
- const o = C - c, u = w(f, g, o), p = new Date(f, 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;
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;
540
532
  d.push({
541
533
  day: o,
542
534
  iso: u,
@@ -580,7 +572,7 @@ const W = ({ label: e, click: t }) => m(
580
572
  return h(
581
573
  { class: "grid grid-cols-7 gap-1" },
582
574
  d.map(
583
- (c, o) => Dt({
575
+ (c, o) => yt({
584
576
  day: c.day,
585
577
  iso: c.iso,
586
578
  disabled: c.disabled,
@@ -592,7 +584,7 @@ const W = ({ label: e, click: t }) => m(
592
584
  })
593
585
  )
594
586
  );
595
- }, wt = T((e, t) => h({ class: "flex flex-auto flex-col" }, [
587
+ }, xt = j((e, t) => h({ class: "flex flex-auto flex-col" }, [
596
588
  mt({
597
589
  onMonthClick: e.onMonthClick,
598
590
  onYearClick: e.onYearClick,
@@ -604,8 +596,8 @@ const W = ({ label: e, click: t }) => m(
604
596
  onSet: [
605
597
  "currentDate",
606
598
  () => [
607
- yt(),
608
- xt({
599
+ pt(),
600
+ Dt({
609
601
  today: e.today,
610
602
  current: e.current,
611
603
  blockPriorDates: e.blockPriorDates,
@@ -614,10 +606,10 @@ const W = ({ label: e, click: t }) => m(
614
606
  ]
615
607
  ]
616
608
  })
617
- ])), vt = ({ currentMonth: e, currentYear: t, onSelect: n }) => h(
609
+ ])), wt = ({ currentMonth: e, currentYear: t, onSelect: n }) => h(
618
610
  { class: "grid grid-cols-3 gap-2" },
619
- O.monthNames.map(
620
- (a, s) => m(
611
+ T.monthNames.map(
612
+ (a, s) => f(
621
613
  {
622
614
  click: (r) => {
623
615
  r.preventDefault(), r.stopPropagation(), n(s);
@@ -628,30 +620,30 @@ const W = ({ label: e, click: t }) => m(
628
620
  a.substring(0, 3)
629
621
  )
630
622
  )
631
- ), bt = ({ start: e, end: t, selecting: n, onSelectStart: a, onSelectEnd: s }) => h({ class: "flex gap-x-2 mb-4" }, [
632
- 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({
633
625
  click: a,
634
626
  variant: r === "start" ? "primary" : "outline",
635
627
  class: "flex-1"
636
628
  }, [
637
629
  h({ class: "font-medium" }, E("current.start", "Start Date"))
638
630
  ])),
639
- z("selecting", (r) => m({
631
+ z("selecting", (r) => f({
640
632
  click: s,
641
633
  variant: r === "end" ? "primary" : "outline",
642
634
  class: "flex-1"
643
635
  }, [
644
636
  h({ class: "font-medium" }, E("current.end", "End Date"))
645
637
  ]))
646
- ]), E = (e, t) => [`[[${e}]]`, (n) => n == null ? t : Ct(n)], Ct = (e) => {
638
+ ]), E = (e, t) => [`[[${e}]]`, (n) => n == null ? t : bt(n)], bt = (e) => {
647
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"];
648
640
  return `${n[t.getDay()]}, ${t.getDate()} ${a[t.getMonth()]}`;
649
- }, Mt = ({ currentYear: e, onSelect: t }) => {
641
+ }, Ct = ({ currentYear: e, onSelect: t }) => {
650
642
  const n = e - 50, a = Array.from({ length: 101 }, (s, r) => n + r);
651
643
  return h(
652
644
  { class: "grid grid-cols-4 gap-2 overflow-y-auto max-h-72" },
653
645
  a.map(
654
- (s) => m(
646
+ (s) => f(
655
647
  {
656
648
  click: (r) => {
657
649
  r.preventDefault(), r.stopPropagation(), t(s);
@@ -664,7 +656,7 @@ const W = ({ label: e, click: t }) => m(
664
656
  )
665
657
  );
666
658
  };
667
- class Yt extends B {
659
+ class Yt extends Y {
668
660
  /**
669
661
  * Declare compiler props.
670
662
  *
@@ -680,7 +672,7 @@ class Yt extends B {
680
672
  */
681
673
  setData() {
682
674
  const t = /* @__PURE__ */ new Date(), n = this.startDate ? /* @__PURE__ */ new Date(this.startDate + "T00:00:00") : t, a = n.getMonth(), s = n.getFullYear();
683
- return new j({
675
+ return new B({
684
676
  today: {
685
677
  date: t.getDate(),
686
678
  month: t.getMonth(),
@@ -705,7 +697,7 @@ class Yt extends B {
705
697
  * @returns {string}
706
698
  */
707
699
  getMonthName(t) {
708
- return O.monthNames[t];
700
+ return T.monthNames[t];
709
701
  }
710
702
  /**
711
703
  * Initialize component state.
@@ -761,7 +753,7 @@ class Yt extends B {
761
753
  render() {
762
754
  const { today: t, current: n, selecting: a } = this.data, { start: s, end: r } = n;
763
755
  return h({ class: "range-calendar border border-border rounded-lg shadow-md p-4 w-full max-w-sm min-w-80" }, [
764
- bt({
756
+ vt({
765
757
  start: s,
766
758
  end: r,
767
759
  selecting: a,
@@ -775,7 +767,7 @@ class Yt extends B {
775
767
  J("view", (l) => {
776
768
  switch (l) {
777
769
  case "months":
778
- return vt(
770
+ return wt(
779
771
  {
780
772
  currentMonth: n.month,
781
773
  currentYear: n.year,
@@ -785,7 +777,7 @@ class Yt extends B {
785
777
  }
786
778
  );
787
779
  case "years":
788
- return Mt(
780
+ return Ct(
789
781
  {
790
782
  currentYear: n.year,
791
783
  onSelect: (i) => {
@@ -794,7 +786,7 @@ class Yt extends B {
794
786
  }
795
787
  );
796
788
  default:
797
- return wt({
789
+ return xt({
798
790
  monthName: this.data.monthName,
799
791
  year: n.year,
800
792
  today: t,
@@ -822,16 +814,16 @@ class Yt extends B {
822
814
  }
823
815
  }
824
816
  export {
825
- Ot as A,
826
- ct as C,
817
+ Nt as A,
818
+ lt as C,
827
819
  N as D,
828
820
  w as F,
829
- gt as M,
821
+ dt as M,
830
822
  Tt as P,
831
823
  Yt as R,
832
- ut as a,
833
- Nt as b,
834
- at as c,
824
+ ht as a,
825
+ Ot as b,
826
+ nt as c,
835
827
  U as g,
836
828
  D as p
837
829
  };
@@ -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-DqVS8ooC.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";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base-framework/ui",
3
- "version": "1.0.2016",
3
+ "version": "1.0.2018",
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,29 +0,0 @@
1
- import { Div as a, H4 as d, P as c } from "@base-framework/atoms";
2
- import { Atom as t } from "@base-framework/base";
3
- const n = t((e, l) => {
4
- const r = e.margin ?? "my-5 mx-5", s = e.padding ?? "p-4";
5
- return e.hover && (e.class += " hover:shadow-lg hover:bg-muted/50"), a({
6
- ...e,
7
- class: `rounded-lg border bg-card text-card-foreground shadow-md min-w-[120px] min-h-[80px] ${r} ${s} ${e.class || ""}`
8
- }, l);
9
- }), g = t((e, l) => {
10
- const r = e.border === !0 ? "border-t" : "";
11
- return a({
12
- ...e,
13
- class: `grid grid-cols-1 gap-y-4 sm:grid-cols-[1fr_2fr] sm:gap-x-6 pt-8 ${r} ${e.class || ""}`
14
- }, [
15
- e.label && a({
16
- ...e.labelProps,
17
- class: `flex flex-auto flex-col gap-y-1 ${e.labelProps?.class || ""}`
18
- }, [
19
- d({ class: "text-base" }, e.label),
20
- e.description && c({ class: "text-sm text-muted-foreground" }, e.description)
21
- ]),
22
- // Controls container: grows to fill remaining space, spacing between items
23
- a({ class: "flex flex-col gap-y-4" }, l)
24
- ]);
25
- });
26
- export {
27
- n as C,
28
- g as F
29
- };
@@ -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
- };