@base-framework/ui 1.0.202 → 1.0.204

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,36 +1,37 @@
1
- import { B as e, C as t, a as n, F as o, L as p, P as r, R as u, S as I, b as i, T as l } from "./tooltip-CYtKjefM.js";
2
- import { B as m, I as T, L as x } from "./buttons-Cm9etaEG.js";
3
- import { C, d as c, D as g, c as b, E as f, F, H as L, I as P, M as R, N as S, P as h, R as k, T as D, a as V, b as E, U as H, W as M } from "./inputs-CMjx5-IX.js";
1
+ import { B as e, C as t, b as o, F as n, a as r, L as p, P as u, R as I, S as i, c as l, T as d } from "./tooltip-DRTWoAn9.js";
2
+ import { B as T, I as c, L as x } from "./buttons-Cm9etaEG.js";
3
+ import { C, d as g, D as F, c as b, E as f, F as L, H as P, I as R, M as S, N as h, P as k, R as D, T as V, a as E, b as G, U as H, W as M } from "./inputs-CMjx5-IX.js";
4
4
  import { V as U, a as W } from "./veil-D4dRxILB.js";
5
5
  export {
6
6
  e as Badge,
7
- m as Button,
7
+ T as Button,
8
8
  t as Card,
9
9
  C as Checkbox,
10
- n as CircleGraph,
11
- c as ColorInput,
12
- g as DateInput,
10
+ o as CircleGraph,
11
+ g as ColorInput,
12
+ F as DateInput,
13
13
  b as DateTimeInput,
14
14
  f as EmailInput,
15
- o as Fieldset,
16
- F as FileInput,
17
- L as HiddenInput,
18
- T as Icon,
19
- P as Input,
15
+ n as Fieldset,
16
+ L as FileInput,
17
+ r as FormGroup,
18
+ P as HiddenInput,
19
+ c as Icon,
20
+ R as Input,
20
21
  p as Legend,
21
22
  x as LoadingButton,
22
- R as MonthInput,
23
- S as NumberInput,
24
- h as PasswordInput,
25
- r as ProgressBar,
26
- k as Radio,
27
- u as RangeSlider,
28
- I as Select,
29
- i as Skeleton,
30
- D as TelInput,
31
- V as Textarea,
32
- E as TimeInput,
33
- l as Tooltip,
23
+ S as MonthInput,
24
+ h as NumberInput,
25
+ k as PasswordInput,
26
+ u as ProgressBar,
27
+ D as Radio,
28
+ I as RangeSlider,
29
+ i as Select,
30
+ l as Skeleton,
31
+ V as TelInput,
32
+ E as Textarea,
33
+ G as TimeInput,
34
+ d as Tooltip,
34
35
  H as UrlInput,
35
36
  U as Veil,
36
37
  W as VeilJot,
package/dist/index.es.js CHANGED
@@ -1,163 +1,164 @@
1
- import { B as s, C as t, a as o, F as r, L as n, P as l, R as i, S as p, b as u, T as m } from "./tooltip-CYtKjefM.js";
2
- import { B as c, I as g, L as C } from "./buttons-Cm9etaEG.js";
3
- import { C as b, d as D, D as I, c as S, E as B, F as P, H as F, I as M, M as k, N, P as f, R as v, T as x, a as y, b as h, U as W, W as H } from "./inputs-CMjx5-IX.js";
4
- import { V as A, a as w } from "./veil-D4dRxILB.js";
5
- import { Icons as R } from "./icons.es.js";
6
- import { A as O, B as G, C as V, t as j, E as q, v as z, w as J, x as _, D as K, j as Q, k as X, H as Y, G as Z, s as $, c as aa, a as ea, b as sa, I as ta, i as oa, g as ra, e as na, h as la, F as ia, d as pa, f as ua, u as ma, M as da, l as ca, N as ga, P as Ca, p as Ta, q as ba, S as Da, n as Ia, o as Sa, T as Ba, y as Pa, z as Fa, m as Ma, r as ka } from "./empty-state-CWXZVNA5.js";
7
- import { A as fa, b as va, C as xa, D as ya, a as ha, F as Wa, M as Ha, P as La, c as Aa, g as wa, p as Ua } from "./calendar-DQXME-2u.js";
8
- import { B as Ea, p as Oa, C as Ga, j as Va, D as ja, m as qa, k as za, H as Ja, I as _a, N as Ka, O as Qa, P as Xa, S as Ya, n as Za, o as $a, t as ae, s as ee, q as se, r as te, T as oe, l as re, U as ne, W as le, f as ie, h as pe, i as ue, c as me, d as de, b as ce, e as ge, a as Ce, g as Te } from "./signature-panel-CJVWNEzI.js";
9
- import { B as De, I as Ie, M as Se, d as Be, e as Pe, g as Fe, N as Me, b as ke, a as Ne, f as fe, P as ve, c as xe, S as ye, T as he } from "./mobile-nav-wrapper-Dj67Pb8l.js";
10
- import { B as He, a as Le, C as Ae, F as we, b as Ue, c as Re, M as Ee, P as Oe, S as Ge } from "./sidebar-menu-page-BVryQj2Z.js";
11
- import { A as je, F as qe, M as ze, a as Je, T as _e } from "./aside-template-McEj_Gxc.js";
12
- import { B as Qe } from "./bside-template-Du2m3rsE.js";
13
- import { F as Ye, I as Ze, c as $e } from "./image-scaler-BQ7WdtlV.js";
1
+ import { B as e, C as o, b as t, F as r, a as n, L as l, P as i, R as p, S as u, c as m, T as d } from "./tooltip-DRTWoAn9.js";
2
+ import { B as g, I as C, L as T } from "./buttons-Cm9etaEG.js";
3
+ import { C as D, d as I, D as S, c as B, E as P, F, H as M, I as k, M as N, N as f, P as v, R as x, T as y, a as h, b as W, U as H, W as L } from "./inputs-CMjx5-IX.js";
4
+ import { V as w, a as U } from "./veil-D4dRxILB.js";
5
+ import { Icons as E } from "./icons.es.js";
6
+ import { A as O, B as V, C as j, t as q, E as z, v as J, w as _, x as K, D as Q, j as X, k as Y, H as Z, G as $, s as aa, c as sa, a as ea, b as oa, I as ta, i as ra, g as na, e as la, h as ia, F as pa, d as ua, f as ma, u as da, M as ca, l as ga, N as Ca, P as Ta, p as ba, q as Da, S as Ia, n as Sa, o as Ba, T as Pa, y as Fa, z as Ma, m as ka, r as Na } from "./empty-state-CWXZVNA5.js";
7
+ import { A as va, b as xa, C as ya, D as ha, a as Wa, F as Ha, M as La, P as Aa, c as wa, g as Ua, p as Ra } from "./calendar-DQXME-2u.js";
8
+ import { B as Ga, p as Oa, C as Va, j as ja, D as qa, m as za, k as Ja, H as _a, I as Ka, N as Qa, O as Xa, P as Ya, S as Za, n as $a, o as as, t as ss, s as es, q as os, r as ts, T as rs, l as ns, U as ls, W as is, f as ps, h as us, i as ms, c as ds, d as cs, b as gs, e as Cs, a as Ts, g as bs } from "./signature-panel-CJVWNEzI.js";
9
+ import { B as Is, I as Ss, M as Bs, d as Ps, e as Fs, g as Ms, N as ks, b as Ns, a as fs, f as vs, P as xs, c as ys, S as hs, T as Ws } from "./mobile-nav-wrapper-Dj67Pb8l.js";
10
+ import { B as Ls, a as As, C as ws, F as Us, b as Rs, c as Es, M as Gs, P as Os, S as Vs } from "./sidebar-menu-page-BVryQj2Z.js";
11
+ import { A as qs, F as zs, M as Js, a as _s, T as Ks } from "./aside-template-McEj_Gxc.js";
12
+ import { B as Xs } from "./bside-template-Du2m3rsE.js";
13
+ import { F as Zs, I as $s, c as ae } from "./image-scaler-BQ7WdtlV.js";
14
14
  export {
15
15
  O as Alert,
16
- je as AsideTemplate,
17
- fa as Avatar,
18
- Ea as BackButton,
19
- De as Backdrop,
20
- s as Badge,
21
- He as BasicPage,
22
- Le as BlankPage,
23
- G as Breadcrumb,
24
- Qe as BsideTemplate,
25
- c as Button,
16
+ qs as AsideTemplate,
17
+ va as Avatar,
18
+ Ga as BackButton,
19
+ Is as Backdrop,
20
+ e as Badge,
21
+ Ls as BasicPage,
22
+ As as BlankPage,
23
+ V as Breadcrumb,
24
+ Xs as BsideTemplate,
25
+ g as Button,
26
26
  Oa as ButtonTab,
27
- va as Calendar,
28
- xa as CalendarCells,
29
- t as Card,
30
- Ae as CenterPage,
31
- b as Checkbox,
32
- Ga as CheckboxCol,
33
- o as CircleGraph,
34
- D as ColorInput,
35
- V as ColumnRow,
36
- j as Combobox,
37
- q as Confirmation,
38
- z as CountDisplay,
39
- J as Counter,
40
- Va as DataTable,
41
- ja as DataTableBody,
42
- I as DateInput,
43
- _ as DatePicker,
44
- S as DateTimeInput,
45
- ya as DayCell,
46
- ha as DayHeader,
47
- K as DelayComponent,
48
- Q as DetailBody,
49
- X as DetailSection,
50
- Y as Dialog,
51
- Z as DialogContainer,
52
- qa as DockableOverlay,
53
- $ as DotsIndicator,
54
- aa as Dropdown,
27
+ xa as Calendar,
28
+ ya as CalendarCells,
29
+ o as Card,
30
+ ws as CenterPage,
31
+ D as Checkbox,
32
+ Va as CheckboxCol,
33
+ t as CircleGraph,
34
+ I as ColorInput,
35
+ j as ColumnRow,
36
+ q as Combobox,
37
+ z as Confirmation,
38
+ J as CountDisplay,
39
+ _ as Counter,
40
+ ja as DataTable,
41
+ qa as DataTableBody,
42
+ S as DateInput,
43
+ K as DatePicker,
44
+ B as DateTimeInput,
45
+ ha as DayCell,
46
+ Wa as DayHeader,
47
+ Q as DelayComponent,
48
+ X as DetailBody,
49
+ Y as DetailSection,
50
+ Z as Dialog,
51
+ $ as DialogContainer,
52
+ za as DockableOverlay,
53
+ aa as DotsIndicator,
54
+ sa as Dropdown,
55
55
  ea as DropdownItem,
56
- sa as DropdownMenu,
57
- za as DynamicDataTable,
58
- B as EmailInput,
56
+ oa as DropdownMenu,
57
+ Ja as DynamicDataTable,
58
+ P as EmailInput,
59
59
  ta as EmptyState,
60
60
  r as Fieldset,
61
- P as FileInput,
62
- oa as Form,
63
- ra as FormControl,
64
- na as FormDescription,
65
- la as FormField,
66
- ia as FormItem,
67
- pa as FormLabel,
68
- ua as FormMessage,
69
- Ye as Format,
70
- Wa as FormatDate,
71
- we as FullContainPage,
72
- Ue as FullPage,
73
- qe as FullTemplate,
74
- Re as FullscreenPage,
75
- Ja as HeaderCol,
76
- F as HiddenInput,
77
- g as Icon,
78
- R as Icons,
79
- Ze as ImageScaler,
80
- Ie as InlineNavigation,
81
- _a as InlineOverlay,
82
- M as Input,
83
- n as Legend,
84
- C as LoadingButton,
85
- ze as MainColumn,
86
- Se as MainLink,
87
- Ee as MainSection,
88
- ma as MinusButton,
89
- Be as MobileNavButton,
90
- Pe as MobileNavWrapper,
91
- da as Modal,
92
- Ha as MonthCalendar,
93
- k as MonthInput,
94
- Fe as NavButton,
95
- Me as NavButtonLink,
96
- ke as Navigation,
97
- Ne as NavigationGroup,
98
- Ka as NavigationMenu,
99
- fe as NavigationPopover,
100
- ca as Notification,
101
- ga as NotificationContainer,
102
- N as NumberInput,
103
- Qa as Overlay,
104
- Oe as Page,
105
- Xa as Panel,
106
- f as PasswordInput,
107
- Ca as PlusButton,
108
- La as PopOver,
109
- ve as PopupHeader,
110
- l as ProgressBar,
111
- v as Radio,
112
- i as RangeSlider,
113
- Ta as STATUSES,
114
- ba as STATUS_CLASS,
115
- Ya as ScrollableDataTable,
116
- Za as SearchDropdown,
117
- $a as SearchInput,
118
- p as Select,
119
- xe as SidebarMenu,
120
- Ge as SidebarMenuPage,
121
- ae as SignaturePanel,
122
- u as Skeleton,
123
- Da as SplitRow,
124
- Ia as StaticStatusIndicator,
125
- Sa as StatusIndicator,
126
- ye as SubNavigation,
127
- ee as Tab,
128
- se as TabGroup,
129
- te as TabNavigation,
130
- oe as TableHeader,
131
- x as TelInput,
132
- Je as Template,
133
- y as Textarea,
134
- Ba as ThemeToggle,
135
- Pa as TimeFrame,
136
- h as TimeInput,
137
- Fa as TimePicker,
138
- he as TitleHeader,
139
- Ma as Toggle,
140
- m as Tooltip,
141
- _e as TopBar,
142
- W as UrlInput,
143
- re as UserList,
144
- ne as UserListItem,
145
- A as Veil,
146
- w as VeilJot,
147
- le as WeekCalendar,
148
- ie as WeekCell,
149
- pe as WeekCells,
150
- ue as WeekHeader,
151
- H as WeekInput,
152
- Aa as addTime,
153
- me as calculateWeekNumber,
154
- $e as createWatcherCallback,
155
- de as generateWeeks,
156
- ce as getDateFromWeek,
157
- ge as getMonthDays,
158
- Ce as getNextMonthDays,
159
- wa as getPosition,
160
- Te as getPreviousMonthDays,
161
- ka as getStatusClass,
162
- Ua as pad
61
+ F as FileInput,
62
+ ra as Form,
63
+ na as FormControl,
64
+ la as FormDescription,
65
+ ia as FormField,
66
+ n as FormGroup,
67
+ pa as FormItem,
68
+ ua as FormLabel,
69
+ ma as FormMessage,
70
+ Zs as Format,
71
+ Ha as FormatDate,
72
+ Us as FullContainPage,
73
+ Rs as FullPage,
74
+ zs as FullTemplate,
75
+ Es as FullscreenPage,
76
+ _a as HeaderCol,
77
+ M as HiddenInput,
78
+ C as Icon,
79
+ E as Icons,
80
+ $s as ImageScaler,
81
+ Ss as InlineNavigation,
82
+ Ka as InlineOverlay,
83
+ k as Input,
84
+ l as Legend,
85
+ T as LoadingButton,
86
+ Js as MainColumn,
87
+ Bs as MainLink,
88
+ Gs as MainSection,
89
+ da as MinusButton,
90
+ Ps as MobileNavButton,
91
+ Fs as MobileNavWrapper,
92
+ ca as Modal,
93
+ La as MonthCalendar,
94
+ N as MonthInput,
95
+ Ms as NavButton,
96
+ ks as NavButtonLink,
97
+ Ns as Navigation,
98
+ fs as NavigationGroup,
99
+ Qa as NavigationMenu,
100
+ vs as NavigationPopover,
101
+ ga as Notification,
102
+ Ca as NotificationContainer,
103
+ f as NumberInput,
104
+ Xa as Overlay,
105
+ Os as Page,
106
+ Ya as Panel,
107
+ v as PasswordInput,
108
+ Ta as PlusButton,
109
+ Aa as PopOver,
110
+ xs as PopupHeader,
111
+ i as ProgressBar,
112
+ x as Radio,
113
+ p as RangeSlider,
114
+ ba as STATUSES,
115
+ Da as STATUS_CLASS,
116
+ Za as ScrollableDataTable,
117
+ $a as SearchDropdown,
118
+ as as SearchInput,
119
+ u as Select,
120
+ ys as SidebarMenu,
121
+ Vs as SidebarMenuPage,
122
+ ss as SignaturePanel,
123
+ m as Skeleton,
124
+ Ia as SplitRow,
125
+ Sa as StaticStatusIndicator,
126
+ Ba as StatusIndicator,
127
+ hs as SubNavigation,
128
+ es as Tab,
129
+ os as TabGroup,
130
+ ts as TabNavigation,
131
+ rs as TableHeader,
132
+ y as TelInput,
133
+ _s as Template,
134
+ h as Textarea,
135
+ Pa as ThemeToggle,
136
+ Fa as TimeFrame,
137
+ W as TimeInput,
138
+ Ma as TimePicker,
139
+ Ws as TitleHeader,
140
+ ka as Toggle,
141
+ d as Tooltip,
142
+ Ks as TopBar,
143
+ H as UrlInput,
144
+ ns as UserList,
145
+ ls as UserListItem,
146
+ w as Veil,
147
+ U as VeilJot,
148
+ is as WeekCalendar,
149
+ ps as WeekCell,
150
+ us as WeekCells,
151
+ ms as WeekHeader,
152
+ L as WeekInput,
153
+ wa as addTime,
154
+ ds as calculateWeekNumber,
155
+ ae as createWatcherCallback,
156
+ cs as generateWeeks,
157
+ gs as getDateFromWeek,
158
+ Cs as getMonthDays,
159
+ Ts as getNextMonthDays,
160
+ Ua as getPosition,
161
+ bs as getPreviousMonthDays,
162
+ Na as getStatusClass,
163
+ Ra as pad
163
164
  };
@@ -1,7 +1,7 @@
1
- import { Span as c, Div as l, Legend as f, Fieldset as x, UseParent as u, Input as C } from "@base-framework/atoms";
2
- import { Atom as s, Html as h } from "@base-framework/base";
1
+ import { Span as g, Div as o, Legend as b, Fieldset as x, H4 as C, P as h, UseParent as u, Input as y } from "@base-framework/atoms";
2
+ import { Atom as s, Html as p } from "@base-framework/base";
3
3
  import { a as d } from "./veil-D4dRxILB.js";
4
- import { f as p, e as y, g as k } from "./inputs-CMjx5-IX.js";
4
+ import { f as k, e as w, g as $ } from "./inputs-CMjx5-IX.js";
5
5
  const a = {
6
6
  gray: {
7
7
  backgroundColor: "bg-gray-50",
@@ -78,31 +78,55 @@ const a = {
78
78
  textColor: "text-primary",
79
79
  ringColor: "ring-background"
80
80
  }
81
- }, w = (t) => a[t] || a.gray, $ = (t) => {
82
- const { backgroundColor: e, textColor: r, ringColor: o } = w(t);
83
- return `inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors ${e} ${r} ${o}`;
84
- }, T = s((t, e) => {
85
- const r = $(t == null ? void 0 : t.type);
86
- return c({ ...t, class: r }, e);
87
- }), L = s((t, e) => {
88
- const r = t.margin ?? "my-5 mx-5", o = t.padding ?? "p-4";
89
- return t.hover && (t.class += " hover:shadow-lg hover:bg-muted/50"), l({
81
+ }, v = (t) => a[t] || a.gray, P = (t) => {
82
+ const { backgroundColor: r, textColor: e, ringColor: l } = v(t);
83
+ return `inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors ${r} ${e} ${l}`;
84
+ }, G = s((t, r) => {
85
+ const e = P(t == null ? void 0 : t.type);
86
+ return g({ ...t, class: e }, r);
87
+ }), I = s((t, r) => {
88
+ const e = t.margin ?? "my-5 mx-5", l = t.padding ?? "p-4";
89
+ return t.hover && (t.class += " hover:shadow-lg hover:bg-muted/50"), o({
90
90
  ...t,
91
- class: `rounded-lg border bg-card text-card-foreground shadow-md min-w-[120px] min-h-[80px] ${r} ${o} ${t.class || ""}`
92
- }, e);
93
- }), v = s((t, e) => f({
91
+ class: `rounded-lg border bg-card text-card-foreground shadow-md min-w-[120px] min-h-[80px] ${e} ${l} ${t.class || ""}`
92
+ }, r);
93
+ }), S = s((t, r) => b({
94
94
  ...t,
95
95
  class: ` font-medium bg-background -mt-4 -mx-1 px-2 py-2 ${t.class || ""}`
96
- }, e)), I = s((t, e) => {
97
- const r = t.border === "full" ? "border rounded-md" : "border-t";
96
+ }, r)), R = s((t, r) => {
97
+ const e = t.border === "full" ? "border rounded-md" : "border-t";
98
98
  return x({
99
99
  ...t,
100
- class: `p-6 ${r} ${t.class || ""}`
100
+ class: `p-6 ${e} ${t.class || ""}`
101
101
  }, [
102
- t.legend && v(t.legend),
103
- l({ class: "flex flex-auto flex-col space-y-6" }, e)
102
+ t.legend && S(t.legend),
103
+ o({ class: "flex flex-auto flex-col space-y-6" }, r)
104
104
  ]);
105
- }), G = d(
105
+ }), O = s((t, r) => {
106
+ var e;
107
+ return o({
108
+ ...t,
109
+ class: `flex flex-col
110
+ sm:flex-row sm:items-center
111
+ ${t.class || ""}`
112
+ }, [
113
+ // Label container: 1/4 width on sm+, full-width on mobile
114
+ t.label && o({
115
+ ...t.labelProps,
116
+ class: `w-full
117
+ sm:w-1/3
118
+ text-base font-medium
119
+ ${((e = t.labelProps) == null ? void 0 : e.class) || ""}`
120
+ }, [
121
+ C({ class: "text-base font-medium" }, t.label),
122
+ t.description && h({ class: "text-muted-foreground" }, t.description)
123
+ ]),
124
+ // Controls container: grows to fill remaining space, spacing between items
125
+ o({
126
+ class: "w-full sm:flex-1 flex flex-col space-y-4"
127
+ }, r)
128
+ ]);
129
+ }), V = d(
106
130
  {
107
131
  /**
108
132
  * This will create the initial state of the RangeSlider.
@@ -132,17 +156,17 @@ const a = {
132
156
  * @returns {object}
133
157
  */
134
158
  render() {
135
- return l({ class: "relative w-full h-4 flex items-center" }, [
159
+ return o({ class: "relative w-full h-4 flex items-center" }, [
136
160
  // Track
137
- l({ class: "absolute h-2 w-full rounded-full bg-muted" }),
161
+ o({ class: "absolute h-2 w-full rounded-full bg-muted" }),
138
162
  u(({ state: t }) => [
139
163
  // Filled Track
140
- l({
164
+ o({
141
165
  class: "absolute h-2 bg-primary rounded-full",
142
166
  style: ["width: [[filledPercentage]]%", t]
143
167
  }),
144
168
  // Thumb
145
- l({
169
+ o({
146
170
  class: `
147
171
  absolute block h-5 w-5 rounded-full border-2 border-primary bg-background
148
172
  ring-offset-background transition-colors focus-visible:outline-none
@@ -152,7 +176,7 @@ const a = {
152
176
  style: ["left: [[filledPercentage]]%", t]
153
177
  }),
154
178
  // Hidden Range Input
155
- C({
179
+ y({
156
180
  type: "range",
157
181
  min: ["[[min]]", t],
158
182
  max: ["[[max]]", t],
@@ -160,35 +184,35 @@ const a = {
160
184
  // Incorporate your new classes here
161
185
  class: `
162
186
  absolute w-full h-full opacity-0 cursor-pointer
163
- ${p}
164
- ${y}
187
+ ${k}
188
+ ${w}
165
189
  ${this.class || ""}
166
190
  `.trim(),
167
191
  bind: this.bind,
168
- input: (e) => {
169
- const r = Number(e.target.value);
170
- this.state.value = r, this.state.filledPercentage = this.getFillPercentage(r), typeof this.change == "function" && this.change(r);
192
+ input: (r) => {
193
+ const e = Number(r.target.value);
194
+ this.state.value = e, this.state.filledPercentage = this.getFillPercentage(e), typeof this.change == "function" && this.change(e);
171
195
  }
172
196
  })
173
197
  ])
174
198
  ]);
175
199
  }
176
200
  }
177
- ), R = s((t) => ({
201
+ ), D = s((t) => ({
178
202
  tag: "select",
179
- onCreated(e) {
180
- t.options && h.setupSelectOptions(e, t.options);
203
+ onCreated(r) {
204
+ t.options && p.setupSelectOptions(r, t.options);
181
205
  },
182
206
  ...t,
183
- class: `${k} ${t.class || ""}`.trim()
184
- })), P = (t) => !t || isNaN(t) ? null : t, i = (t, e) => {
185
- const r = t, o = 16, n = 2 * Math.PI * o, m = r / 100 * n, b = `
207
+ class: `${$} ${t.class || ""}`.trim()
208
+ })), E = (t) => !t || isNaN(t) ? null : t, i = (t, r) => {
209
+ const e = t, l = 16, n = 2 * Math.PI * l, m = e / 100 * n, f = `
186
210
  <svg class="w-40 h-40 mx-auto" viewBox="0 0 36 36" xmlns="http://www.w3.org/2000/svg">
187
211
  <!-- Background Circle -->
188
212
  <circle
189
213
  cx="18"
190
214
  cy="18"
191
- r="${o}"
215
+ r="${l}"
192
216
  fill="none"
193
217
  stroke="currentColor"
194
218
  stroke-width="4"
@@ -199,7 +223,7 @@ const a = {
199
223
  <circle
200
224
  cx="18"
201
225
  cy="18"
202
- r="${o}"
226
+ r="${l}"
203
227
  fill="none"
204
228
  stroke="currentColor"
205
229
  stroke-width="4"
@@ -207,7 +231,7 @@ const a = {
207
231
  stroke-dasharray="${n}"
208
232
  stroke-dashoffset="${n - m}"
209
233
  stroke-linecap="round"
210
- class="${e}"
234
+ class="${r}"
211
235
  />
212
236
  <!-- Percentage Text -->
213
237
  <text
@@ -216,27 +240,27 @@ const a = {
216
240
  class="text-[0.25em] font-medium fill-primary"
217
241
  text-anchor="middle"
218
242
  dominant-baseline="middle">
219
- ${r}%
243
+ ${e}%
220
244
  </text>
221
245
  </svg>
222
246
  `;
223
- return l({
247
+ return o({
224
248
  class: "circle-graph text-inherit",
225
- html: b
249
+ html: f
226
250
  });
227
- }, O = s((t) => {
228
- const e = t.progress || 0, r = t.class || "", o = i(e, r);
229
- return l({
251
+ }, H = s((t) => {
252
+ const r = t.progress || 0, e = t.class || "", l = i(r, e);
253
+ return o({
230
254
  class: "circle-graph-wrap",
231
255
  onSet: [
232
256
  t.prop,
233
- (n) => (n = P(n), n ? i(n, r) : o)
257
+ (n) => (n = E(n), n ? i(n, e) : l)
234
258
  ]
235
- }, [o]);
236
- }), S = () => u(({ state: t }) => l({
259
+ }, [l]);
260
+ }), B = () => u(({ state: t }) => o({
237
261
  class: "absolute h-full rounded-full bg-primary transition-all duration-300",
238
262
  style: ["width: [[progress]]%;", t]
239
- })), V = d(
263
+ })), M = d(
240
264
  {
241
265
  /**
242
266
  * This will render the progress bar component.
@@ -244,8 +268,8 @@ const a = {
244
268
  * @returns {object}
245
269
  */
246
270
  render() {
247
- return l({ class: "relative w-full h-4 rounded-full bg-muted" }, [
248
- S()
271
+ return o({ class: "relative w-full h-4 rounded-full bg-muted" }, [
272
+ B()
249
273
  ]);
250
274
  },
251
275
  /**
@@ -274,8 +298,8 @@ const a = {
274
298
  */
275
299
  uploadProgress(t) {
276
300
  if (t.lengthComputable) {
277
- const r = Math.round(t.loaded * 100 / t.total);
278
- this.set(r);
301
+ const e = Math.round(t.loaded * 100 / t.total);
302
+ this.set(e);
279
303
  }
280
304
  },
281
305
  /**
@@ -288,9 +312,9 @@ const a = {
288
312
  t < 0 && (t = 0), t > 100 && (t = 100), this.state.progress = t;
289
313
  }
290
314
  }
291
- ), D = ({ class: t, shape: e = "rectangle", width: r = "w-full", height: o = "h-4" }) => l({
292
- class: `bg-muted animate-pulse ${r} ${o} ${e === "circle" ? "rounded-full" : "rounded-md"} ${t || ""}`
293
- }), g = {
315
+ ), _ = ({ class: t, shape: r = "rectangle", width: e = "w-full", height: l = "h-4" }) => o({
316
+ class: `bg-muted animate-pulse ${e} ${l} ${r === "circle" ? "rounded-full" : "rounded-md"} ${t || ""}`
317
+ }), c = {
294
318
  top: "bottom-full left-1/2 transform -translate-x-1/2 mb-2",
295
319
  "top-right": "bottom-full left-full transform -translate-x-1 mb-2",
296
320
  "top-left": "bottom-full right-full transform translate-x-1 mb-2",
@@ -299,28 +323,29 @@ const a = {
299
323
  "bottom-left": "top-full right-full transform translate-x-1 mt-2",
300
324
  left: "top-1/2 right-full transform -translate-y-1/2 mr-2",
301
325
  right: "top-1/2 left-full transform -translate-y-1/2 ml-2"
302
- }, E = (t) => g[t] || g.top, M = s(({ position: t = "top", content: e }, r) => {
303
- const o = E(t);
304
- return Array.isArray(r) === !1 && (r = [r]), l({ class: "relative group inline-block" }, [
305
- ...r,
326
+ }, F = (t) => c[t] || c.top, z = s(({ position: t = "top", content: r }, e) => {
327
+ const l = F(t);
328
+ return Array.isArray(e) === !1 && (e = [e]), o({ class: "relative group inline-block" }, [
329
+ ...e,
306
330
  // Tooltip box
307
- c({
331
+ g({
308
332
  class: `
309
333
  absolute z-20 px-2 py-1 border text-sm bg-background rounded shadow-md opacity-0 whitespace-nowrap
310
- group-hover:opacity-100 transition-opacity duration-200 ${o} pointer-events-none
334
+ group-hover:opacity-100 transition-opacity duration-200 ${l} pointer-events-none
311
335
  `
312
- }, e)
336
+ }, r)
313
337
  ]);
314
338
  });
315
339
  export {
316
- T as B,
317
- L as C,
318
- I as F,
319
- v as L,
320
- V as P,
321
- G as R,
322
- R as S,
323
- M as T,
340
+ G as B,
341
+ I as C,
342
+ R as F,
343
+ S as L,
344
+ M as P,
345
+ V as R,
346
+ D as S,
347
+ z as T,
324
348
  O as a,
325
- D as b
349
+ H as b,
350
+ _ as c
326
351
  };
@@ -2,6 +2,7 @@ export * from "./badges/badge.js";
2
2
  export * from "./buttons/buttons.js";
3
3
  export * from "./cards/card.js";
4
4
  export * from "./form/fieldset.js";
5
+ export * from "./form/form-group.js";
5
6
  export * from "./form/inputs/checkbox.js";
6
7
  export * from "./form/inputs/inputs.js";
7
8
  export * from "./form/inputs/range-slider.js";
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Creates a responsive form-group: label on the left, controls on the right.
3
+ *
4
+ * @param {object} props
5
+ * @param {string|object} props.label
6
+ * @param {object} [props.labelProps] any extra props for the label container
7
+ * @param {string} [props.class] extra classes for the outer container
8
+ * @param {array} children form controls (inputs, selects, etc)
9
+ * @returns {object}
10
+ */
11
+ export const FormGroup: Function;
12
+ export default FormGroup;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base-framework/ui",
3
- "version": "1.0.202",
3
+ "version": "1.0.204",
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": {