@base-framework/ui 0.0.0
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/LICENSE +21 -0
- package/README.md +106 -0
- package/dist/aside-template-D0KANPjh.js +35 -0
- package/dist/atoms.es.js +39 -0
- package/dist/bside-template-CDbINL4X.js +15 -0
- package/dist/calendar-DR_svCOR.js +424 -0
- package/dist/confirmation-D1Y_SgzE.js +1526 -0
- package/dist/icon-B9QUT2NY.js +47 -0
- package/dist/icons.es.js +658 -0
- package/dist/index.es.js +154 -0
- package/dist/inputs-BF3C3KfF.js +204 -0
- package/dist/mobile-nav-wrapper-7Qul1-mt.js +578 -0
- package/dist/molecules.es.js +45 -0
- package/dist/organisms.es.js +55 -0
- package/dist/pages.es.js +12 -0
- package/dist/sidebar-menu-page-M8hr9onX.js +224 -0
- package/dist/style.css +1 -0
- package/dist/tab-C_dZb2qH.js +1425 -0
- package/dist/templates.es.js +10 -0
- package/dist/tooltip-DCszmsxe.js +324 -0
- package/dist/types/components/atoms/atoms.d.ts +15 -0
- package/dist/types/components/atoms/badges/badge.d.ts +8 -0
- package/dist/types/components/atoms/buttons/buttons.d.ts +17 -0
- package/dist/types/components/atoms/cards/card.d.ts +8 -0
- package/dist/types/components/atoms/form/fieldset.d.ts +9 -0
- package/dist/types/components/atoms/form/inputs/checkbox.d.ts +10 -0
- package/dist/types/components/atoms/form/inputs/input-classes.d.ts +30 -0
- package/dist/types/components/atoms/form/inputs/inputs.d.ts +113 -0
- package/dist/types/components/atoms/form/inputs/range-slider.d.ts +10 -0
- package/dist/types/components/atoms/form/legend.d.ts +9 -0
- package/dist/types/components/atoms/form/select.d.ts +8 -0
- package/dist/types/components/atoms/icon.d.ts +8 -0
- package/dist/types/components/atoms/progress/circle-graph.d.ts +7 -0
- package/dist/types/components/atoms/progress/progress-bar.d.ts +9 -0
- package/dist/types/components/atoms/progress/semi-circle-graph.d.ts +7 -0
- package/dist/types/components/atoms/skeleton.d.ts +2 -0
- package/dist/types/components/atoms/tooltip.d.ts +12 -0
- package/dist/types/components/atoms/veil.d.ts +26 -0
- package/dist/types/components/icons/icons.d.ts +10 -0
- package/dist/types/components/molecules/alert.d.ts +7 -0
- package/dist/types/components/molecules/avatars/avatar.d.ts +15 -0
- package/dist/types/components/molecules/avatars/static-status-indicator.d.ts +2 -0
- package/dist/types/components/molecules/avatars/status-indicator.d.ts +2 -0
- package/dist/types/components/molecules/avatars/statuses.d.ts +13 -0
- package/dist/types/components/molecules/breadcrumb/breadcrumb.d.ts +11 -0
- package/dist/types/components/molecules/breadcrumb/dots-indicator.d.ts +12 -0
- package/dist/types/components/molecules/combobox/combobox.d.ts +10 -0
- package/dist/types/components/molecules/counters/atoms.d.ts +3 -0
- package/dist/types/components/molecules/counters/counter.d.ts +11 -0
- package/dist/types/components/molecules/date-time/date-picker.d.ts +11 -0
- package/dist/types/components/molecules/date-time/time-frame.d.ts +1 -0
- package/dist/types/components/molecules/date-time/time-picker.d.ts +10 -0
- package/dist/types/components/molecules/delay-component.d.ts +18 -0
- package/dist/types/components/molecules/dialogs/confirmation.d.ts +27 -0
- package/dist/types/components/molecules/dialogs/dialog-container.d.ts +8 -0
- package/dist/types/components/molecules/dialogs/dialog.d.ts +78 -0
- package/dist/types/components/molecules/dropdowns/dropdown-item.d.ts +1 -0
- package/dist/types/components/molecules/dropdowns/dropdown-menu.d.ts +61 -0
- package/dist/types/components/molecules/dropdowns/dropdown.d.ts +1 -0
- package/dist/types/components/molecules/form/form-atoms.d.ts +40 -0
- package/dist/types/components/molecules/form/form-control.d.ts +10 -0
- package/dist/types/components/molecules/form/form-field.d.ts +10 -0
- package/dist/types/components/molecules/form/form.d.ts +14 -0
- package/dist/types/components/molecules/modals/atoms.d.ts +17 -0
- package/dist/types/components/molecules/modals/modal-container.d.ts +8 -0
- package/dist/types/components/molecules/modals/modal.d.ts +124 -0
- package/dist/types/components/molecules/molecules.d.ts +31 -0
- package/dist/types/components/molecules/notifications/notification-container.d.ts +31 -0
- package/dist/types/components/molecules/notifications/notification.d.ts +79 -0
- package/dist/types/components/molecules/popover.d.ts +57 -0
- package/dist/types/components/molecules/theme-toggle.d.ts +8 -0
- package/dist/types/components/molecules/toggle/toggle.d.ts +11 -0
- package/dist/types/components/organisms/button-group.d.ts +23 -0
- package/dist/types/components/organisms/calendar/calendar.d.ts +77 -0
- package/dist/types/components/organisms/calendar/month/calendar-cells.d.ts +1 -0
- package/dist/types/components/organisms/calendar/month/day-cell.d.ts +1 -0
- package/dist/types/components/organisms/calendar/month/day-header.d.ts +1 -0
- package/dist/types/components/organisms/calendar/month/month-calendar.d.ts +1 -0
- package/dist/types/components/organisms/calendar/month/navigation-button.d.ts +1 -0
- package/dist/types/components/organisms/calendar/utils.d.ts +3 -0
- package/dist/types/components/organisms/calendar/week/utils.d.ts +6 -0
- package/dist/types/components/organisms/calendar/week/week-calendar.d.ts +90 -0
- package/dist/types/components/organisms/calendar/week/week-cell.d.ts +1 -0
- package/dist/types/components/organisms/calendar/week/week-cells.d.ts +1 -0
- package/dist/types/components/organisms/calendar/week/week-header.d.ts +1 -0
- package/dist/types/components/organisms/lists/checkbox-col.d.ts +1 -0
- package/dist/types/components/organisms/lists/data-table-body.d.ts +5 -0
- package/dist/types/components/organisms/lists/data-table.d.ts +13 -0
- package/dist/types/components/organisms/lists/header-col.d.ts +2 -0
- package/dist/types/components/organisms/lists/table-header.d.ts +5 -0
- package/dist/types/components/organisms/lists/user-list.d.ts +15 -0
- package/dist/types/components/organisms/navigation/inline-navigation.d.ts +75 -0
- package/dist/types/components/organisms/navigation/main-link.d.ts +81 -0
- package/dist/types/components/organisms/navigation/mobile/nav-wrapper/mobile-nav-wrapper.d.ts +14 -0
- package/dist/types/components/organisms/navigation/mobile/nav-wrapper/navigation-popover.d.ts +36 -0
- package/dist/types/components/organisms/navigation/mobile/nav-wrapper/popup-header.d.ts +1 -0
- package/dist/types/components/organisms/navigation/mobile/nav-wrapper/title-header.d.ts +2 -0
- package/dist/types/components/organisms/navigation/nav-button-link.d.ts +44 -0
- package/dist/types/components/organisms/navigation/navigation-atoms.d.ts +8 -0
- package/dist/types/components/organisms/navigation/navigation-menu/navigation-menu.d.ts +58 -0
- package/dist/types/components/organisms/navigation/navigation.d.ts +58 -0
- package/dist/types/components/organisms/navigation/sidebar-menu/sidebar-menu.d.ts +2 -0
- package/dist/types/components/organisms/organisms.d.ts +38 -0
- package/dist/types/components/organisms/overlays/dockable-overlay.d.ts +38 -0
- package/dist/types/components/organisms/overlays/inline-overlay.d.ts +18 -0
- package/dist/types/components/organisms/overlays/overlay.d.ts +73 -0
- package/dist/types/components/organisms/panel.d.ts +22 -0
- package/dist/types/components/organisms/search/dropdown.d.ts +8 -0
- package/dist/types/components/organisms/search/search-dropdown.d.ts +10 -0
- package/dist/types/components/organisms/search/search-input.d.ts +7 -0
- package/dist/types/components/organisms/tabs/button-tab.d.ts +65 -0
- package/dist/types/components/organisms/tabs/tab-group.d.ts +48 -0
- package/dist/types/components/organisms/tabs/tab-navigation.d.ts +62 -0
- package/dist/types/components/organisms/tabs/tab.d.ts +35 -0
- package/dist/types/components/pages/basic-page.d.ts +19 -0
- package/dist/types/components/pages/blank-page.d.ts +17 -0
- package/dist/types/components/pages/center-page.d.ts +17 -0
- package/dist/types/components/pages/full-contain-page.d.ts +17 -0
- package/dist/types/components/pages/full-page.d.ts +25 -0
- package/dist/types/components/pages/fullscreen-page.d.ts +17 -0
- package/dist/types/components/pages/main-section.d.ts +8 -0
- package/dist/types/components/pages/page.d.ts +16 -0
- package/dist/types/components/pages/pages.d.ts +10 -0
- package/dist/types/components/pages/sidebar-menu-page.d.ts +70 -0
- package/dist/types/components/pages/templates/aside-template.d.ts +8 -0
- package/dist/types/components/pages/templates/bside-template.d.ts +8 -0
- package/dist/types/components/pages/templates/full-template.d.ts +8 -0
- package/dist/types/components/pages/templates/row.d.ts +8 -0
- package/dist/types/components/pages/templates/template-atoms.d.ts +16 -0
- package/dist/types/components/pages/templates/template.d.ts +8 -0
- package/dist/types/components/pages/templates/templates.d.ts +5 -0
- package/dist/types/ui.d.ts +6 -0
- package/dist/veil-B9GQfH0d.js +29 -0
- package/package.json +57 -0
package/dist/index.es.js
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { B as e, C as o, a as t, F as r, L as n, P as i, R as l, S as p, b as u, T as m } from "./tooltip-DCszmsxe.js";
|
|
2
|
+
import { B as g, I as C, L as T } from "./icon-B9QUT2NY.js";
|
|
3
|
+
import { C as D, d as I, D as b, c as S, E as B, F as P, H as F, I as M, M as k, N, P as v, R as f, S as x, T as h, a as y, b as W, U as L, W as A } from "./inputs-BF3C3KfF.js";
|
|
4
|
+
import { V as w, a as U } from "./veil-B9GQfH0d.js";
|
|
5
|
+
import { Icons as R } from "./icons.es.js";
|
|
6
|
+
import { A as G, B as V, C as j, z as q, u as z, v as J, w as _, D as K, j as Q, k as X, G as Y, E as Z, s as $, c as aa, a as sa, b as ea, i as oa, g as ta, e as ra, h as na, F as ia, d as la, f as pa, t as ua, M as ma, l as da, N as ga, P as Ca, p as Ta, q as ca, S as Da, n as Ia, o as ba, T as Sa, x as Ba, y as Pa, m as Fa, r as Ma } from "./confirmation-D1Y_SgzE.js";
|
|
7
|
+
import { A as Na, b as va, C as fa, D as xa, a as ha, F as ya, M as Wa, P as La, c as Aa, g as Ha, p as wa } from "./calendar-DR_svCOR.js";
|
|
8
|
+
import { B as Oa, m as Ra, C as Ea, j as Ga, D as Va, l as ja, H as qa, I as za, N as Ja, O as _a, P as Ka, S as Qa, p as Xa, n as Ya, o as Za, T as $a, k as as, U as ss, W as es, f as os, h as ts, i as rs, c as ns, d as is, b as ls, e as ps, a as us, g as ms } from "./tab-C_dZb2qH.js";
|
|
9
|
+
import { B as gs, I as Cs, M as Ts, d as cs, e as Ds, g as Is, N as bs, b as Ss, a as Bs, f as Ps, P as Fs, c as Ms, S as ks, T as Ns } from "./mobile-nav-wrapper-7Qul1-mt.js";
|
|
10
|
+
import { B as fs, a as xs, C as hs, F as ys, b as Ws, c as Ls, M as As, P as Hs, S as ws } from "./sidebar-menu-page-M8hr9onX.js";
|
|
11
|
+
import { A as Os, F as Rs, M as Es, a as Gs, T as Vs } from "./aside-template-D0KANPjh.js";
|
|
12
|
+
import { B as qs } from "./bside-template-CDbINL4X.js";
|
|
13
|
+
export {
|
|
14
|
+
G as Alert,
|
|
15
|
+
Os as AsideTemplate,
|
|
16
|
+
Na as Avatar,
|
|
17
|
+
Oa as BackButton,
|
|
18
|
+
gs as Backdrop,
|
|
19
|
+
e as Badge,
|
|
20
|
+
fs as BasicPage,
|
|
21
|
+
xs as BlankPage,
|
|
22
|
+
V as Breadcrumb,
|
|
23
|
+
qs as BsideTemplate,
|
|
24
|
+
g as Button,
|
|
25
|
+
Ra as ButtonTab,
|
|
26
|
+
va as Calendar,
|
|
27
|
+
fa as CalendarCells,
|
|
28
|
+
o as Card,
|
|
29
|
+
hs as CenterPage,
|
|
30
|
+
D as Checkbox,
|
|
31
|
+
Ea as CheckboxCol,
|
|
32
|
+
t as CircleGraph,
|
|
33
|
+
I as ColorInput,
|
|
34
|
+
j as Combobox,
|
|
35
|
+
q as Confirmation,
|
|
36
|
+
z as CountDisplay,
|
|
37
|
+
J as Counter,
|
|
38
|
+
Ga as DataTable,
|
|
39
|
+
Va as DataTableBody,
|
|
40
|
+
b as DateInput,
|
|
41
|
+
_ as DatePicker,
|
|
42
|
+
S as DateTimeInput,
|
|
43
|
+
xa as DayCell,
|
|
44
|
+
ha as DayHeader,
|
|
45
|
+
K as DelayComponent,
|
|
46
|
+
Q as DetailBody,
|
|
47
|
+
X as DetailSection,
|
|
48
|
+
Y as Dialog,
|
|
49
|
+
Z as DialogContainer,
|
|
50
|
+
ja as DockableOverlay,
|
|
51
|
+
$ as DotsIndicator,
|
|
52
|
+
aa as Dropdown,
|
|
53
|
+
sa as DropdownItem,
|
|
54
|
+
ea as DropdownMenu,
|
|
55
|
+
B as EmailInput,
|
|
56
|
+
r as Fieldset,
|
|
57
|
+
P as FileInput,
|
|
58
|
+
oa as Form,
|
|
59
|
+
ta as FormControl,
|
|
60
|
+
ra as FormDescription,
|
|
61
|
+
na as FormField,
|
|
62
|
+
ia as FormItem,
|
|
63
|
+
la as FormLabel,
|
|
64
|
+
pa as FormMessage,
|
|
65
|
+
ya as FormatDate,
|
|
66
|
+
ys as FullContainPage,
|
|
67
|
+
Ws as FullPage,
|
|
68
|
+
Rs as FullTemplate,
|
|
69
|
+
Ls as FullscreenPage,
|
|
70
|
+
qa as HeaderCol,
|
|
71
|
+
F as HiddenInput,
|
|
72
|
+
C as Icon,
|
|
73
|
+
R as Icons,
|
|
74
|
+
Cs as InlineNavigation,
|
|
75
|
+
za as InlineOverlay,
|
|
76
|
+
M as Input,
|
|
77
|
+
n as Legend,
|
|
78
|
+
T as LoadingButton,
|
|
79
|
+
Es as MainColumn,
|
|
80
|
+
Ts as MainLink,
|
|
81
|
+
As as MainSection,
|
|
82
|
+
ua as MinusButton,
|
|
83
|
+
cs as MobileNavButton,
|
|
84
|
+
Ds as MobileNavWrapper,
|
|
85
|
+
ma as Modal,
|
|
86
|
+
Wa as MonthCalendar,
|
|
87
|
+
k as MonthInput,
|
|
88
|
+
Is as NavButton,
|
|
89
|
+
bs as NavButtonLink,
|
|
90
|
+
Ss as Navigation,
|
|
91
|
+
Bs as NavigationGroup,
|
|
92
|
+
Ja as NavigationMenu,
|
|
93
|
+
Ps as NavigationPopover,
|
|
94
|
+
da as Notification,
|
|
95
|
+
ga as NotificationContainer,
|
|
96
|
+
N as NumberInput,
|
|
97
|
+
_a as Overlay,
|
|
98
|
+
Hs as Page,
|
|
99
|
+
Ka as Panel,
|
|
100
|
+
v as PasswordInput,
|
|
101
|
+
Ca as PlusButton,
|
|
102
|
+
La as PopOver,
|
|
103
|
+
Fs as PopupHeader,
|
|
104
|
+
i as ProgressBar,
|
|
105
|
+
f as Radio,
|
|
106
|
+
l as RangeSlider,
|
|
107
|
+
Ta as STATUSES,
|
|
108
|
+
ca as STATUS_CLASS,
|
|
109
|
+
Qa as SearchDropdown,
|
|
110
|
+
x as SearchInput,
|
|
111
|
+
p as Select,
|
|
112
|
+
Ms as SidebarMenu,
|
|
113
|
+
ws as SidebarMenuPage,
|
|
114
|
+
u as Skeleton,
|
|
115
|
+
Da as SplitRow,
|
|
116
|
+
Ia as StaticStatusIndicator,
|
|
117
|
+
ba as StatusIndicator,
|
|
118
|
+
ks as SubNavigation,
|
|
119
|
+
Xa as Tab,
|
|
120
|
+
Ya as TabGroup,
|
|
121
|
+
Za as TabNavigation,
|
|
122
|
+
$a as TableHeader,
|
|
123
|
+
h as TelInput,
|
|
124
|
+
Gs as Template,
|
|
125
|
+
y as Textarea,
|
|
126
|
+
Sa as ThemeToggle,
|
|
127
|
+
Ba as TimeFrame,
|
|
128
|
+
W as TimeInput,
|
|
129
|
+
Pa as TimePicker,
|
|
130
|
+
Ns as TitleHeader,
|
|
131
|
+
Fa as Toggle,
|
|
132
|
+
m as Tooltip,
|
|
133
|
+
Vs as TopBar,
|
|
134
|
+
L as UrlInput,
|
|
135
|
+
as as UserList,
|
|
136
|
+
ss as UserListItem,
|
|
137
|
+
w as Veil,
|
|
138
|
+
U as VeilJot,
|
|
139
|
+
es as WeekCalendar,
|
|
140
|
+
os as WeekCell,
|
|
141
|
+
ts as WeekCells,
|
|
142
|
+
rs as WeekHeader,
|
|
143
|
+
A as WeekInput,
|
|
144
|
+
Aa as addTime,
|
|
145
|
+
ns as calculateWeekNumber,
|
|
146
|
+
is as generateWeeks,
|
|
147
|
+
ls as getDateFromWeek,
|
|
148
|
+
ps as getMonthDays,
|
|
149
|
+
us as getNextMonthDays,
|
|
150
|
+
Ha as getPosition,
|
|
151
|
+
ms as getPreviousMonthDays,
|
|
152
|
+
Ma as getStatusClass,
|
|
153
|
+
wa as pad
|
|
154
|
+
};
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import { Div as l, Label as d, Checkbox as u, Span as g, OnState as p, I as x, Input as r, Textarea as k } from "@base-framework/atoms";
|
|
2
|
+
import { Icons as y } from "./icons.es.js";
|
|
3
|
+
import { a as $ } from "./veil-B9GQfH0d.js";
|
|
4
|
+
import { Atom as t } from "@base-framework/base";
|
|
5
|
+
const v = "flex h-10 w-full px-3 py-2 text-sm", b = "rounded-md border border-input bg-background", n = "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background", i = "disabled:cursor-not-allowed disabled:opacity-50", f = "placeholder:text-muted-foreground", h = `${v} ${b} ${n} ${f} ${i}`, I = ({ id: e, checked: o, bind: s, required: a }) => u({
|
|
6
|
+
id: e,
|
|
7
|
+
cache: "checkbox",
|
|
8
|
+
class: "absolute opacity-0 w-full h-full cursor-pointer pointer-events-none",
|
|
9
|
+
aria: {
|
|
10
|
+
checked: ["checked"]
|
|
11
|
+
},
|
|
12
|
+
required: a,
|
|
13
|
+
checked: o,
|
|
14
|
+
bind: s
|
|
15
|
+
}), C = () => g({ class: "absolute text-xs pointer-events-none" }, [
|
|
16
|
+
p(
|
|
17
|
+
"checked",
|
|
18
|
+
(e) => e ? x({
|
|
19
|
+
class: "w-2 h-2 pointer-events-none",
|
|
20
|
+
html: y.check
|
|
21
|
+
}) : null
|
|
22
|
+
)
|
|
23
|
+
]), w = ({ id: e, bind: o, checked: s, required: a, clickHandler: m }) => l({
|
|
24
|
+
class: `relative flex items-center justify-center w-5 h-5 transition-colors duration-200 border-primary hover:border-accent-foreground
|
|
25
|
+
${b}
|
|
26
|
+
${n}
|
|
27
|
+
${i}`.trim(),
|
|
28
|
+
onState: [
|
|
29
|
+
"checked",
|
|
30
|
+
{
|
|
31
|
+
"bg-primary": !0,
|
|
32
|
+
"text-primary-foreground": !0,
|
|
33
|
+
"border-primary": !0
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
role: "checkbox",
|
|
37
|
+
aria: {
|
|
38
|
+
checked: ["checked"]
|
|
39
|
+
},
|
|
40
|
+
tabIndex: 0,
|
|
41
|
+
click: m
|
|
42
|
+
}, [
|
|
43
|
+
I({ bind: o, checked: s, id: e, required: a }),
|
|
44
|
+
C()
|
|
45
|
+
]), H = ({ id: e, label: o, clickHandler: s }) => d({
|
|
46
|
+
class: "text-base cursor-pointer",
|
|
47
|
+
htmlFor: e,
|
|
48
|
+
click: s
|
|
49
|
+
}, o), F = $(
|
|
50
|
+
{
|
|
51
|
+
/**
|
|
52
|
+
* This will initialize the state of the checkbox.
|
|
53
|
+
*
|
|
54
|
+
* @returns {object}
|
|
55
|
+
*/
|
|
56
|
+
state() {
|
|
57
|
+
return {
|
|
58
|
+
checked: this.checked ?? !1
|
|
59
|
+
};
|
|
60
|
+
},
|
|
61
|
+
/**
|
|
62
|
+
* This is added to check the checkbox after the component is rendered
|
|
63
|
+
* to see if the bind updated the checked value.
|
|
64
|
+
*
|
|
65
|
+
* @returns {void}
|
|
66
|
+
*/
|
|
67
|
+
after() {
|
|
68
|
+
this.state.checked = this.checkbox.checked;
|
|
69
|
+
},
|
|
70
|
+
/**
|
|
71
|
+
* This will handle the click event for the checkbox.
|
|
72
|
+
*
|
|
73
|
+
* @returns {void}
|
|
74
|
+
*/
|
|
75
|
+
clickHandler() {
|
|
76
|
+
this.state.toggle("checked"), this.checkbox.checked = this.state.checked, typeof this.onChange == "function" && this.onChange(this.state.checked);
|
|
77
|
+
},
|
|
78
|
+
/**
|
|
79
|
+
* This will render the checkbox component.
|
|
80
|
+
*
|
|
81
|
+
* @returns {object}
|
|
82
|
+
*/
|
|
83
|
+
render() {
|
|
84
|
+
const e = this.getId();
|
|
85
|
+
return l({ class: `flex items-center space-x-2 cursor-pointer ${this.class || ""}` }, [
|
|
86
|
+
w({
|
|
87
|
+
id: e,
|
|
88
|
+
bind: this.bind,
|
|
89
|
+
checked: this.state.checked,
|
|
90
|
+
required: this.required,
|
|
91
|
+
clickHandler: () => this.clickHandler()
|
|
92
|
+
}),
|
|
93
|
+
this.label && H({ id: e, label: this.label, clickHandler: () => this.clickHandler() })
|
|
94
|
+
]);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
), T = (e) => {
|
|
98
|
+
if (!e || e.length === 0) return "";
|
|
99
|
+
const s = e.replace(/\D/g, "").match(/^(\d{0,3})(\d{0,3})(\d{0,4})$/);
|
|
100
|
+
return s ? s[2] ? `(${s[1]}) ${s[2]}${s[3] ? "-" + s[3] : ""}` : s[1] || "" : e;
|
|
101
|
+
}, E = (e) => {
|
|
102
|
+
const o = e.target, s = T(o.value);
|
|
103
|
+
s && (o.value = s);
|
|
104
|
+
}, c = t((e) => r({
|
|
105
|
+
...e,
|
|
106
|
+
class: `${h} ${e.class || ""}`.trim()
|
|
107
|
+
})), L = t((e) => c({
|
|
108
|
+
...e,
|
|
109
|
+
type: "tel",
|
|
110
|
+
name: e.name || "Phone",
|
|
111
|
+
label: e.label || "Phone",
|
|
112
|
+
placeholder: "(555) 555-5555",
|
|
113
|
+
required: !0,
|
|
114
|
+
pattern: e.pattern || "\\(\\d{3}\\) \\d{3}-\\d{4}",
|
|
115
|
+
keyup: E
|
|
116
|
+
})), M = t((e) => c({
|
|
117
|
+
...e,
|
|
118
|
+
type: "email",
|
|
119
|
+
name: e.name || "Email",
|
|
120
|
+
label: e.label || "Email",
|
|
121
|
+
placeholder: "Email address"
|
|
122
|
+
})), R = t((e) => k({
|
|
123
|
+
...e,
|
|
124
|
+
as: "textarea",
|
|
125
|
+
class: `flex w-full h-24 px-3 py-2 text-sm rounded-md border border-input bg-background ${n} ${f} ${i} ${e.class || ""}`.trim()
|
|
126
|
+
})), U = (e = {}) => l({ class: "flex items-center space-x-2" }, [
|
|
127
|
+
r({
|
|
128
|
+
...e,
|
|
129
|
+
type: "radio",
|
|
130
|
+
class: "cursor-pointer appearance-none h-4 w-4 border rounded-full checked:border-primary checked:bg-primary focus:ring focus:ring-primary".trim()
|
|
131
|
+
}),
|
|
132
|
+
e.label && d({ forHTML: e.value, class: "cursor-pointer" }, e.label)
|
|
133
|
+
]), W = t((e) => r({
|
|
134
|
+
...e,
|
|
135
|
+
type: "date",
|
|
136
|
+
class: `rounded-md border px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 ${e.class || ""}`.trim()
|
|
137
|
+
})), j = t((e) => r({
|
|
138
|
+
...e,
|
|
139
|
+
type: "time",
|
|
140
|
+
class: `rounded-md border px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 ${e.class || ""}`.trim()
|
|
141
|
+
})), z = t((e) => r({
|
|
142
|
+
...e,
|
|
143
|
+
type: "datetime-local",
|
|
144
|
+
class: `rounded-md border px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 ${e.class || ""}`.trim()
|
|
145
|
+
})), A = t((e) => r({
|
|
146
|
+
...e,
|
|
147
|
+
type: "month",
|
|
148
|
+
class: `rounded-md border px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 ${e.class || ""}`.trim()
|
|
149
|
+
})), B = t((e) => r({
|
|
150
|
+
...e,
|
|
151
|
+
type: "week",
|
|
152
|
+
class: `rounded-md border px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 ${e.class || ""}`.trim()
|
|
153
|
+
})), J = t((e) => c({
|
|
154
|
+
...e,
|
|
155
|
+
type: "number"
|
|
156
|
+
})), O = t((e) => c({
|
|
157
|
+
...e,
|
|
158
|
+
type: "password"
|
|
159
|
+
})), V = t((e) => c({
|
|
160
|
+
...e,
|
|
161
|
+
type: "search"
|
|
162
|
+
})), G = t((e) => c({
|
|
163
|
+
...e,
|
|
164
|
+
type: "url"
|
|
165
|
+
})), K = t((e) => c({
|
|
166
|
+
...e,
|
|
167
|
+
type: "hidden"
|
|
168
|
+
})), Q = t((e) => r({
|
|
169
|
+
...e,
|
|
170
|
+
type: "color",
|
|
171
|
+
class: `border rounded-md border-input bg-background text-foreground p-0 disabled:cursor-not-allowed disabled:opacity-50 ${e.class || ""}`.trim()
|
|
172
|
+
}));
|
|
173
|
+
t((e) => u({
|
|
174
|
+
...e,
|
|
175
|
+
class: `flex h-4 w-4 rounded-md border border-input bg-background text-foreground ${n} ${i} ${e.class || ""}`.trim()
|
|
176
|
+
}));
|
|
177
|
+
const D = "file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground", X = t((e) => r({
|
|
178
|
+
...e,
|
|
179
|
+
type: "file",
|
|
180
|
+
class: `${h} ${D} ${e.class || ""}`.trim()
|
|
181
|
+
}));
|
|
182
|
+
export {
|
|
183
|
+
F as C,
|
|
184
|
+
W as D,
|
|
185
|
+
M as E,
|
|
186
|
+
X as F,
|
|
187
|
+
K as H,
|
|
188
|
+
c as I,
|
|
189
|
+
A as M,
|
|
190
|
+
J as N,
|
|
191
|
+
O as P,
|
|
192
|
+
U as R,
|
|
193
|
+
V as S,
|
|
194
|
+
L as T,
|
|
195
|
+
G as U,
|
|
196
|
+
B as W,
|
|
197
|
+
R as a,
|
|
198
|
+
j as b,
|
|
199
|
+
z as c,
|
|
200
|
+
Q as d,
|
|
201
|
+
i as e,
|
|
202
|
+
n as f,
|
|
203
|
+
h as g
|
|
204
|
+
};
|