@base-framework/ui 1.1.14 → 1.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/README.md +44 -0
  2. package/dist/atoms.es.js +37 -34
  3. package/dist/buttons-snATS4J5.js +118 -0
  4. package/dist/{empty-state-CuciIYY7.js → empty-state-BR5Aa8lA.js} +324 -321
  5. package/dist/full-page-DccgwWsM.js +69 -0
  6. package/dist/icons.es.js +127 -1
  7. package/dist/image-BhZbKYDj.js +237 -0
  8. package/dist/index.es.js +179 -173
  9. package/dist/{mobile-nav-wrapper-C3Lvz7CH.js → mobile-nav-wrapper-1erstN34.js} +77 -84
  10. package/dist/molecules.es.js +5 -5
  11. package/dist/organisms.es.js +52 -51
  12. package/dist/pages.es.js +10 -9
  13. package/dist/sidebar-menu-CVyJBcHE.js +13 -0
  14. package/dist/sidebar-menu-page-Db-6HPoS.js +153 -0
  15. package/dist/signature-panel-CVq5N5M1.js +1364 -0
  16. package/dist/simple-search-input-CuC8q0fJ.js +1654 -0
  17. package/dist/skeleton-BlY3opxG.js +7 -0
  18. package/dist/{tooltip-BlFbB8yL.js → tooltip-BmvjA9XQ.js} +104 -84
  19. package/dist/types/components/atoms/atoms.d.ts +2 -0
  20. package/dist/types/components/atoms/material-icon.d.ts +17 -0
  21. package/dist/types/components/atoms/universal-icon.d.ts +3 -0
  22. package/dist/types/components/icons/icons.d.ts +1 -0
  23. package/dist/types/components/icons/material-symbols.d.ts +19 -0
  24. package/dist/types/components/molecules/breadcrumb/breadcrumb.d.ts +2 -2
  25. package/dist/types/components/molecules/image/image-uploader.d.ts +2 -2
  26. package/dist/types/components/molecules/image/logo-uploader.d.ts +2 -2
  27. package/dist/types/components/organisms/navigation/mobile/nav-wrapper/title-header.d.ts +1 -1
  28. package/package.json +1 -1
  29. package/dist/buttons-Dr-bViom.js +0 -77
  30. package/dist/form-group-BB7dLJir.js +0 -29
  31. package/dist/image-BB__4s0g.js +0 -31
  32. package/dist/inputs-CcimrM1k.js +0 -210
  33. package/dist/range-calendar-CzKIBhgb.js +0 -831
  34. package/dist/sidebar-menu-page-BtuUB_XB.js +0 -217
  35. package/dist/signature-panel-DmyPbuRi.js +0 -2186
@@ -0,0 +1,69 @@
1
+ import { Div as a, Header as l, H1 as r, P as c } from "@base-framework/atoms";
2
+ import { Component as i, Atom as t } from "@base-framework/base";
3
+ import { F as o } from "./aside-template-BDvEMLnk.js";
4
+ class n extends i {
5
+ /**
6
+ * This will declare the props for the compiler.
7
+ *
8
+ * @returns {void}
9
+ */
10
+ declareProps() {
11
+ this.class = "";
12
+ }
13
+ /**
14
+ * This will render the page.
15
+ *
16
+ * @returns {object}
17
+ */
18
+ render() {
19
+ return a({ class: `${this.class || ""}` }, this.children);
20
+ }
21
+ }
22
+ class d extends n {
23
+ /**
24
+ * This will be called every time the route
25
+ * is activated.
26
+ *
27
+ * @param {object} params
28
+ */
29
+ update(s) {
30
+ }
31
+ }
32
+ const p = t((e, s) => (e.class = "basic-page pt-[80px] sm:pt-0 flex flex-auto flex-col " + (e.class || ""), {
33
+ tag: "section",
34
+ ...e,
35
+ children: s
36
+ })), x = t(({ title: e, description: s }) => l({ class: "sm:py-8 px-6 md:px-5 flex flex-col" }, [
37
+ r({ class: "scroll-m-20 text-3xl font-bold tracking-tight" }, e),
38
+ s && c({ class: "text-base text-muted-foreground py-2 max-w-[700px]" }, s)
39
+ ]));
40
+ class u extends d {
41
+ /**
42
+ * This will declare the props for the compiler.
43
+ *
44
+ * @returns {void}
45
+ */
46
+ declareProps() {
47
+ super.declareProps(), this.title = "", this.description = "";
48
+ }
49
+ /**
50
+ * This will render the page.
51
+ *
52
+ * @returns {object}
53
+ */
54
+ render() {
55
+ return p([
56
+ x({
57
+ title: this.title,
58
+ description: this.description
59
+ }),
60
+ o(this.children)
61
+ ]);
62
+ }
63
+ }
64
+ export {
65
+ d as B,
66
+ u as F,
67
+ p as M,
68
+ n as P
69
+ };
package/dist/icons.es.js CHANGED
@@ -1,4 +1,129 @@
1
1
  const o = {
2
+ // Common actions
3
+ add: "add",
4
+ remove: "remove",
5
+ edit: "edit",
6
+ delete: "delete",
7
+ save: "save",
8
+ cancel: "cancel",
9
+ check: "check",
10
+ close: "close",
11
+ done: "done",
12
+ // Navigation
13
+ home: "home",
14
+ menu: "menu",
15
+ search: "search",
16
+ settings: "settings",
17
+ more_vert: "more_vert",
18
+ more_horiz: "more_horiz",
19
+ arrow_back: "arrow_back",
20
+ arrow_forward: "arrow_forward",
21
+ arrow_upward: "arrow_upward",
22
+ arrow_downward: "arrow_downward",
23
+ expand_more: "expand_more",
24
+ expand_less: "expand_less",
25
+ chevron_left: "chevron_left",
26
+ chevron_right: "chevron_right",
27
+ // Content
28
+ file_copy: "file_copy",
29
+ content_copy: "content_copy",
30
+ content_paste: "content_paste",
31
+ filter_list: "filter_list",
32
+ sort: "sort",
33
+ refresh: "refresh",
34
+ download: "download",
35
+ upload: "upload",
36
+ share: "share",
37
+ print: "print",
38
+ // Communication
39
+ email: "email",
40
+ phone: "phone",
41
+ chat: "chat",
42
+ notifications: "notifications",
43
+ notifications_active: "notifications_active",
44
+ // Social
45
+ favorite: "favorite",
46
+ star: "star",
47
+ thumb_up: "thumb_up",
48
+ thumb_down: "thumb_down",
49
+ person: "person",
50
+ group: "group",
51
+ // Files & Folders
52
+ folder: "folder",
53
+ folder_open: "folder_open",
54
+ insert_drive_file: "insert_drive_file",
55
+ description: "description",
56
+ image: "image",
57
+ attachment: "attachment",
58
+ // Status & Alerts
59
+ error: "error",
60
+ warning: "warning",
61
+ info: "info",
62
+ help: "help",
63
+ check_circle: "check_circle",
64
+ // UI Controls
65
+ visibility: "visibility",
66
+ visibility_off: "visibility_off",
67
+ lock: "lock",
68
+ lock_open: "lock_open",
69
+ login: "login",
70
+ logout: "logout",
71
+ // Time & Date
72
+ schedule: "schedule",
73
+ today: "today",
74
+ calendar_today: "calendar_today",
75
+ event: "event",
76
+ history: "history",
77
+ // Device & System
78
+ computer: "computer",
79
+ phone_iphone: "phone_iphone",
80
+ tablet: "tablet",
81
+ desktop_windows: "desktop_windows",
82
+ // Nested categories for better organization
83
+ actions: {
84
+ add: "add",
85
+ remove: "remove",
86
+ edit: "edit",
87
+ delete: "delete",
88
+ save: "save",
89
+ cancel: "cancel",
90
+ undo: "undo",
91
+ redo: "redo"
92
+ },
93
+ arrows: {
94
+ back: "arrow_back",
95
+ forward: "arrow_forward",
96
+ up: "arrow_upward",
97
+ down: "arrow_downward",
98
+ left: "arrow_back",
99
+ right: "arrow_forward"
100
+ },
101
+ chevrons: {
102
+ left: "chevron_left",
103
+ right: "chevron_right",
104
+ up: "expand_less",
105
+ down: "expand_more"
106
+ },
107
+ content: {
108
+ copy: "content_copy",
109
+ paste: "content_paste",
110
+ cut: "content_cut"
111
+ },
112
+ social: {
113
+ favorite: "favorite",
114
+ star: "star",
115
+ share: "share",
116
+ like: "thumb_up",
117
+ dislike: "thumb_down"
118
+ },
119
+ status: {
120
+ error: "error",
121
+ warning: "warning",
122
+ info: "info",
123
+ success: "check_circle",
124
+ help: "help_outline"
125
+ }
126
+ }, s = {
2
127
  home: `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6">
3
128
  <path stroke-linecap="round" stroke-linejoin="round" d="m2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25" />
4
129
  </svg>`,
@@ -785,5 +910,6 @@ const o = {
785
910
  }
786
911
  };
787
912
  export {
788
- o as Icons
913
+ s as Icons,
914
+ o as MaterialSymbols
789
915
  };
@@ -0,0 +1,237 @@
1
+ import { Div as h, Label as f, Checkbox as m, Span as p, OnState as x, I as k, Input as n, Textarea as g, Img as y } from "@base-framework/atoms";
2
+ import { Jot as b, Atom as s, Component as I } from "@base-framework/base";
3
+ import { Icons as C } from "./icons.es.js";
4
+ const v = "flex h-10 w-full px-3 py-2 text-sm", r = "rounded-md border border-border bg-input", l = "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background", c = "disabled:cursor-not-allowed disabled:opacity-50 [&:user-invalid]:border-destructive", o = "placeholder:text-muted-foreground", $ = `${v} ${r} ${l} ${o} ${c}`, w = ({ id: e, checked: a, bind: t, required: d }) => m({
5
+ id: e,
6
+ cache: "checkbox",
7
+ class: "absolute opacity-0 w-full h-full cursor-pointer pointer-events-none",
8
+ aria: {
9
+ checked: ["checked"]
10
+ },
11
+ required: d,
12
+ checked: a,
13
+ bind: t
14
+ }), T = () => p({ class: "absolute text-xs pointer-events-none" }, [
15
+ x(
16
+ "checked",
17
+ (e) => e ? k({
18
+ class: "w-2 h-2 pointer-events-none",
19
+ html: C.check
20
+ }) : null
21
+ )
22
+ ]), H = ({ id: e, bind: a, checked: t, required: d, clickHandler: u }) => h({
23
+ class: `relative flex items-center justify-center w-5 h-5 transition-colors duration-200 hover:border-accent-foreground
24
+ rounded-md border
25
+ ${l}
26
+ ${c}`.trim(),
27
+ onState: [
28
+ "checked",
29
+ {
30
+ "bg-primary": !0,
31
+ "text-primary-foreground": !0,
32
+ "border-primary": !0
33
+ }
34
+ ],
35
+ role: "checkbox",
36
+ aria: {
37
+ checked: ["checked"]
38
+ },
39
+ tabIndex: 0,
40
+ click: u
41
+ }, [
42
+ w({ bind: a, checked: t, id: e, required: d }),
43
+ T()
44
+ ]), D = ({ id: e, label: a, clickHandler: t }) => f({
45
+ class: "text-base cursor-pointer",
46
+ htmlFor: e,
47
+ click: t
48
+ }, a), V = b(
49
+ {
50
+ /**
51
+ * This will initialize the state of the checkbox.
52
+ *
53
+ * @returns {object}
54
+ */
55
+ state() {
56
+ return {
57
+ // @ts-ignore
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
+ * @param {object} e
74
+ * @returns {void}
75
+ */
76
+ clickHandler(e) {
77
+ e.preventDefault(), e.stopPropagation(), this.state.toggle("checked"), this.checkbox.checked = this.state.checked, typeof this.onChange == "function" && this.onChange(this.state.checked, this);
78
+ },
79
+ /**
80
+ * This will render the checkbox component.
81
+ *
82
+ * @returns {object}
83
+ */
84
+ render() {
85
+ const e = this.getId(), a = (t) => this.clickHandler(t);
86
+ return h({ class: `flex items-center gap-x-2 cursor-pointer ${this.class || ""}` }, [
87
+ H({
88
+ id: e,
89
+ // @ts-ignore
90
+ bind: this.bind,
91
+ // @ts-ignore
92
+ checked: this.state.checked,
93
+ // @ts-ignore
94
+ required: this.required,
95
+ // @ts-ignore
96
+ clickHandler: a
97
+ }),
98
+ // @ts-ignore
99
+ this.label && D({ id: e, label: this.label, clickHandler: a })
100
+ ]);
101
+ }
102
+ }
103
+ ), E = (e) => {
104
+ if (!e || e.length === 0) return "";
105
+ const t = e.replace(/\D/g, "").match(/^(\d{0,3})(\d{0,3})(\d{0,4})$/);
106
+ return t ? t[2] ? `(${t[1]}) ${t[2]}${t[3] ? "-" + t[3] : ""}` : t[1] || "" : e;
107
+ }, P = (e) => {
108
+ const a = e.target, t = E(a.value);
109
+ t && (a.value = t);
110
+ }, i = s((e) => n({
111
+ ...e,
112
+ class: `${$} ${e.class || ""}`.trim()
113
+ })), j = s((e) => i({
114
+ ...e,
115
+ type: "tel",
116
+ name: e.name || "Phone",
117
+ label: e.label || "Phone",
118
+ placeholder: "(555) 555-5555",
119
+ pattern: e.pattern || "\\(\\d{3}\\) \\d{3}-\\d{4}",
120
+ keyup: P
121
+ })), q = s((e) => i({
122
+ ...e,
123
+ type: "email",
124
+ name: e.name || "Email",
125
+ label: e.label || "Email",
126
+ placeholder: "Email address"
127
+ })), J = s((e) => g({
128
+ ...e,
129
+ as: "textarea",
130
+ class: `flex w-full h-24 px-3 py-2 text-sm ${r} ${l} ${o} ${c} ${e.class || ""}`.trim()
131
+ })), N = (e = {}) => h({ class: "flex items-center gap-x-2" }, [
132
+ n({
133
+ ...e,
134
+ type: "radio",
135
+ class: "cursor-pointer appearance-none h-4 w-4 border rounded-full checked:border-primary checked:bg-primary focus:ring focus:ring-primary".trim()
136
+ }),
137
+ e.label && f({ forHTML: e.value, class: "cursor-pointer" }, e.label)
138
+ ]), R = s((e) => n({
139
+ ...e,
140
+ type: "date",
141
+ class: `${r} ${l} ${o} ${c} px-3 py-2 text-sm ring-offset-background ${e.class || ""}`.trim()
142
+ })), U = s((e) => n({
143
+ ...e,
144
+ type: "time",
145
+ class: `${r} ${l} ${o} ${c} px-3 py-2 text-sm ring-offset-background ${e.class || ""}`.trim()
146
+ })), W = s((e) => n({
147
+ ...e,
148
+ type: "datetime-local",
149
+ class: `${r} ${l} ${o} ${c} px-3 py-2 text-sm ring-offset-background ${e.class || ""}`.trim()
150
+ })), z = s((e) => n({
151
+ ...e,
152
+ type: "month",
153
+ class: `${r} ${l} ${o} ${c} px-3 py-2 text-sm ring-offset-background ${e.class || ""}`.trim()
154
+ })), A = s((e) => n({
155
+ ...e,
156
+ type: "week",
157
+ class: `${r} ${l} ${o} ${c} px-3 py-2 text-sm ring-offset-background ${e.class || ""}`.trim()
158
+ })), B = s((e) => i({
159
+ ...e,
160
+ type: "number"
161
+ })), G = s((e) => i({
162
+ ...e,
163
+ type: "password"
164
+ }));
165
+ s((e) => i({
166
+ ...e,
167
+ type: "search"
168
+ }));
169
+ const K = s((e) => i({
170
+ ...e,
171
+ type: "url"
172
+ })), Q = s((e) => i({
173
+ ...e,
174
+ type: "hidden"
175
+ })), X = s((e) => n({
176
+ ...e,
177
+ type: "color",
178
+ class: `${r} text-foreground p-0 ${c} ${e.class || ""}`.trim()
179
+ }));
180
+ s((e) => m({
181
+ ...e,
182
+ class: `flex h-4 w-4 text-foreground ${r} ${l} ${c} ${e.class || ""}`.trim()
183
+ }));
184
+ const F = "file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground", Y = s((e) => n({
185
+ ...e,
186
+ type: "file",
187
+ class: `${$} ${F} ${e.class || ""}`.trim()
188
+ }));
189
+ class L extends I {
190
+ /**
191
+ * This will set the component context.
192
+ *
193
+ * @param {object|null} context
194
+ * @returns {object|null}
195
+ */
196
+ setContext(a) {
197
+ if (this.data)
198
+ return null;
199
+ const t = this?.parent?.data ?? this?.parent?.context?.data ?? this?.parent?.state ?? null;
200
+ return t ? { data: t } : null;
201
+ }
202
+ }
203
+ const Z = (e) => b(e, L), _ = s(({ src: e, alt: a, class: t, checkPath: d = !0 }) => !e || (t = t || "", d && e.indexOf(".") === -1 && e.indexOf("[[") === -1) ? null : y({
204
+ class: `absolute w-full h-full object-cover fadeIn ${t}`,
205
+ src: e,
206
+ alt: a,
207
+ load: (u) => u.target.style.visibility = "visible",
208
+ /**
209
+ * If there's an error loading the image, hide it.
210
+ */
211
+ error: (u) => u.target.style.visibility = "hidden"
212
+ }));
213
+ export {
214
+ V as C,
215
+ R as D,
216
+ q as E,
217
+ Y as F,
218
+ Q as H,
219
+ _ as I,
220
+ z as M,
221
+ B as N,
222
+ G as P,
223
+ N as R,
224
+ j as T,
225
+ K as U,
226
+ L as V,
227
+ A as W,
228
+ X as a,
229
+ W as b,
230
+ i as c,
231
+ J as d,
232
+ U as e,
233
+ Z as f,
234
+ l as g,
235
+ c as h,
236
+ $ as i
237
+ };