@geajs/ui 0.1.3 → 0.1.5
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/_virtual_gea-hmr.mjs +11 -0
- package/dist/accordion.d.mts +34 -0
- package/dist/accordion.mjs +137 -0
- package/dist/accordion.mjs.map +1 -0
- package/dist/alert.d.mts +15 -0
- package/dist/alert.mjs +93 -0
- package/dist/alert.mjs.map +1 -0
- package/dist/avatar.d.mts +26 -0
- package/dist/avatar.mjs +95 -0
- package/dist/avatar.mjs.map +1 -0
- package/dist/badge.d.mts +9 -0
- package/dist/badge.mjs +47 -0
- package/dist/badge.mjs.map +1 -0
- package/dist/button.d.mts +21 -0
- package/dist/button.mjs +86 -0
- package/dist/button.mjs.map +1 -0
- package/dist/card.d.mts +24 -0
- package/dist/card.mjs +152 -0
- package/dist/card.mjs.map +1 -0
- package/dist/checkbox.d.mts +37 -0
- package/dist/checkbox.mjs +78 -0
- package/dist/checkbox.mjs.map +1 -0
- package/dist/clipboard.d.mts +33 -0
- package/dist/clipboard.mjs +96 -0
- package/dist/clipboard.mjs.map +1 -0
- package/dist/cn.mjs +10 -0
- package/dist/cn.mjs.map +1 -0
- package/dist/collapsible.d.mts +29 -0
- package/dist/collapsible.mjs +75 -0
- package/dist/collapsible.mjs.map +1 -0
- package/dist/combobox.d.mts +67 -0
- package/dist/combobox.mjs +314 -0
- package/dist/combobox.mjs.map +1 -0
- package/dist/dialog.d.mts +57 -0
- package/dist/dialog.mjs +137 -0
- package/dist/dialog.mjs.map +1 -0
- package/dist/dnd-manager.d.mts +67 -0
- package/dist/dnd-manager.mjs +373 -0
- package/dist/dnd-manager.mjs.map +1 -0
- package/dist/drag-drop-context.d.mts +11 -0
- package/dist/drag-drop-context.mjs +41 -0
- package/dist/drag-drop-context.mjs.map +1 -0
- package/dist/draggable.d.mts +11 -0
- package/dist/draggable.mjs +62 -0
- package/dist/draggable.mjs.map +1 -0
- package/dist/droppable.d.mts +14 -0
- package/dist/droppable.mjs +61 -0
- package/dist/droppable.mjs.map +1 -0
- package/dist/file-upload.d.mts +38 -0
- package/dist/file-upload.mjs +157 -0
- package/dist/file-upload.mjs.map +1 -0
- package/dist/hover-card.d.mts +33 -0
- package/dist/hover-card.mjs +87 -0
- package/dist/hover-card.mjs.map +1 -0
- package/dist/index.d.mts +41 -1068
- package/dist/index.mjs +41 -4332
- package/dist/input.d.mts +9 -0
- package/dist/input.mjs +62 -0
- package/dist/input.mjs.map +1 -0
- package/dist/label.d.mts +9 -0
- package/dist/label.mjs +37 -0
- package/dist/label.mjs.map +1 -0
- package/dist/menu.d.mts +36 -0
- package/dist/menu.mjs +86 -0
- package/dist/menu.mjs.map +1 -0
- package/dist/number-input.d.mts +46 -0
- package/dist/number-input.mjs +87 -0
- package/dist/number-input.mjs.map +1 -0
- package/dist/pagination.d.mts +37 -0
- package/dist/pagination.mjs +95 -0
- package/dist/pagination.mjs.map +1 -0
- package/dist/pin-input.d.mts +45 -0
- package/dist/pin-input.mjs +135 -0
- package/dist/pin-input.mjs.map +1 -0
- package/dist/popover.d.mts +39 -0
- package/dist/popover.mjs +107 -0
- package/dist/popover.mjs.map +1 -0
- package/dist/progress.d.mts +34 -0
- package/dist/progress.mjs +84 -0
- package/dist/progress.mjs.map +1 -0
- package/dist/radio-group.d.mts +37 -0
- package/dist/radio-group.mjs +154 -0
- package/dist/radio-group.mjs.map +1 -0
- package/dist/rating-group.d.mts +38 -0
- package/dist/rating-group.mjs +159 -0
- package/dist/rating-group.mjs.map +1 -0
- package/dist/select.d.mts +54 -0
- package/dist/select.mjs +235 -0
- package/dist/select.mjs.map +1 -0
- package/dist/separator.d.mts +9 -0
- package/dist/separator.mjs +44 -0
- package/dist/separator.mjs.map +1 -0
- package/dist/skeleton.d.mts +9 -0
- package/dist/skeleton.mjs +41 -0
- package/dist/skeleton.mjs.map +1 -0
- package/dist/slider.d.mts +44 -0
- package/dist/slider.mjs +114 -0
- package/dist/slider.mjs.map +1 -0
- package/dist/switch.d.mts +37 -0
- package/dist/switch.mjs +78 -0
- package/dist/switch.mjs.map +1 -0
- package/dist/tabs.d.mts +36 -0
- package/dist/tabs.mjs +175 -0
- package/dist/tabs.mjs.map +1 -0
- package/dist/tags-input.d.mts +48 -0
- package/dist/tags-input.mjs +213 -0
- package/dist/tags-input.mjs.map +1 -0
- package/dist/textarea.d.mts +9 -0
- package/dist/textarea.mjs +62 -0
- package/dist/textarea.mjs.map +1 -0
- package/dist/toast.d.mts +33 -0
- package/dist/toast.mjs +211 -0
- package/dist/toast.mjs.map +1 -0
- package/dist/toggle-group.d.mts +32 -0
- package/dist/toggle-group.mjs +112 -0
- package/dist/toggle-group.mjs.map +1 -0
- package/dist/tooltip.d.mts +39 -0
- package/dist/tooltip.mjs +83 -0
- package/dist/tooltip.mjs.map +1 -0
- package/dist/tree-view.d.mts +35 -0
- package/dist/tree-view.mjs +92 -0
- package/dist/tree-view.mjs.map +1 -0
- package/dist/zag-component.d.mts +39 -0
- package/dist/zag-component.mjs +127 -0
- package/dist/zag-component.mjs.map +1 -0
- package/package.json +8 -2
- package/dist/index.mjs.map +0 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region \0virtual:gea-hmr
|
|
2
|
+
var hot = void 0;
|
|
3
|
+
var componentInstances = hot && hot.data && hot.data.componentInstances || /* @__PURE__ */ new Map();
|
|
4
|
+
if (hot) hot.data.componentInstances = componentInstances;
|
|
5
|
+
var hmrGlobal = globalThis.__geaHMRGlobal || (globalThis.__geaHMRGlobal = {
|
|
6
|
+
componentModules: /* @__PURE__ */ new Map(),
|
|
7
|
+
componentProxies: /* @__PURE__ */ new Map()
|
|
8
|
+
});
|
|
9
|
+
hmrGlobal.componentModules;
|
|
10
|
+
hmrGlobal.componentProxies;
|
|
11
|
+
//#endregion
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { n as ZagComponent } from "./zag-component.mjs";
|
|
2
|
+
import * as accordion from "@zag-js/accordion";
|
|
3
|
+
import * as _zag_js_types0 from "@zag-js/types";
|
|
4
|
+
|
|
5
|
+
//#region src/components/accordion.d.ts
|
|
6
|
+
declare class Accordion extends ZagComponent {
|
|
7
|
+
value: string[];
|
|
8
|
+
createMachine(_props: any): any;
|
|
9
|
+
getMachineProps(props: any): {
|
|
10
|
+
id: string;
|
|
11
|
+
value: any;
|
|
12
|
+
defaultValue: any;
|
|
13
|
+
multiple: any;
|
|
14
|
+
collapsible: any;
|
|
15
|
+
disabled: any;
|
|
16
|
+
orientation: any;
|
|
17
|
+
onValueChange: (details: accordion.ValueChangeDetails) => void;
|
|
18
|
+
};
|
|
19
|
+
connectApi(service: any): accordion.Api<_zag_js_types0.PropTypes<{
|
|
20
|
+
[x: string]: any;
|
|
21
|
+
}>>;
|
|
22
|
+
getSpreadMap(): {
|
|
23
|
+
'[data-part="root"]': string;
|
|
24
|
+
'[data-part="item"]': (api: any, el: any) => any;
|
|
25
|
+
'[data-part="item-trigger"]': (api: any, el: any) => any;
|
|
26
|
+
'[data-part="item-content"]': (api: any, el: any) => any;
|
|
27
|
+
'[data-part="item-indicator"]': (api: any, el: any) => any;
|
|
28
|
+
};
|
|
29
|
+
syncState(api: any): void;
|
|
30
|
+
template(props: any): string;
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { Accordion as default };
|
|
34
|
+
//# sourceMappingURL=accordion.d.mts.map
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { t as ZagComponent } from "./zag-component.mjs";
|
|
2
|
+
import "./_virtual_gea-hmr.mjs";
|
|
3
|
+
import { Component } from "@geajs/core";
|
|
4
|
+
import { normalizeProps } from "@zag-js/vanilla";
|
|
5
|
+
import * as accordion from "@zag-js/accordion";
|
|
6
|
+
//#region src/components/accordion.tsx
|
|
7
|
+
const __v = (v) => v != null && typeof v === "object" ? v.valueOf() : v;
|
|
8
|
+
var Accordion = class extends ZagComponent {
|
|
9
|
+
createMachine(_props) {
|
|
10
|
+
return accordion.machine;
|
|
11
|
+
}
|
|
12
|
+
getMachineProps(props) {
|
|
13
|
+
return {
|
|
14
|
+
id: this.id,
|
|
15
|
+
value: props.value,
|
|
16
|
+
defaultValue: props.defaultValue,
|
|
17
|
+
multiple: props.multiple ?? false,
|
|
18
|
+
collapsible: props.collapsible ?? false,
|
|
19
|
+
disabled: props.disabled,
|
|
20
|
+
orientation: props.orientation ?? "vertical",
|
|
21
|
+
onValueChange: (details) => {
|
|
22
|
+
this.value = details.value;
|
|
23
|
+
props.onValueChange?.(details);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
connectApi(service) {
|
|
28
|
+
return accordion.connect(service, normalizeProps);
|
|
29
|
+
}
|
|
30
|
+
getSpreadMap() {
|
|
31
|
+
return {
|
|
32
|
+
"[data-part=\"root\"]": "getRootProps",
|
|
33
|
+
"[data-part=\"item\"]": (api, el) => api.getItemProps({ value: el.dataset.value }),
|
|
34
|
+
"[data-part=\"item-trigger\"]": (api, el) => api.getItemTriggerProps({ value: el.dataset.value }),
|
|
35
|
+
"[data-part=\"item-content\"]": (api, el) => api.getItemContentProps({ value: el.dataset.value }),
|
|
36
|
+
"[data-part=\"item-indicator\"]": (api, el) => api.getItemIndicatorProps({ value: el.dataset.value })
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
syncState(api) {
|
|
40
|
+
this.value = api.value;
|
|
41
|
+
}
|
|
42
|
+
template(props) {
|
|
43
|
+
const __id = this.id;
|
|
44
|
+
Component._register(ZagComponent);
|
|
45
|
+
const items = props.items || [];
|
|
46
|
+
return `<div id="${__id}" data-part="root"${(props.class || "") == null || (props.class || "") === false ? "" : ` class="${((props.class || "") != null ? String(props.class || "") : "").trim()}"`}>${items.map((item) => `<div data-gea-item-id="${item?.value ?? item}" data-part="item"${item.value == null || item.value === false ? "" : ` data-value="${item.value}"`} class="accordion-item border-b"><h3><button data-part="item-trigger"${item.value == null || item.value === false ? "" : ` data-value="${item.value}"`} class="accordion-trigger flex w-full items-center justify-between py-4 text-sm font-medium transition-all">${item.label}<span data-part="item-indicator"${item.value == null || item.value === false ? "" : ` data-value="${item.value}"`} class="accordion-indicator h-4 w-4 shrink-0 transition-transform duration-200">▶</span></button></h3><div data-part="item-content"${item.value == null || item.value === false ? "" : ` data-value="${item.value}"`} class="accordion-content overflow-hidden text-sm"><div class="pb-4 pt-0">${item.content}</div></div></div>`).join("") + "<!---->"}</div>`;
|
|
47
|
+
}
|
|
48
|
+
render__unresolved_0Item(item) {
|
|
49
|
+
return `<div data-gea-item-id="${item?.value ?? item}" data-part="item"${__v(item.value) == null || __v(item.value) === false ? "" : ` data-value="${item.value}"`} class="accordion-item border-b"><h3><button data-part="item-trigger"${__v(item.value) == null || __v(item.value) === false ? "" : ` data-value="${item.value}"`} class="accordion-trigger flex w-full items-center justify-between py-4 text-sm font-medium transition-all">${item.label}<span data-part="item-indicator"${__v(item.value) == null || __v(item.value) === false ? "" : ` data-value="${item.value}"`} class="accordion-indicator h-4 w-4 shrink-0 transition-transform duration-200">▶</span></button></h3><div data-part="item-content"${__v(item.value) == null || __v(item.value) === false ? "" : ` data-value="${item.value}"`} class="accordion-content overflow-hidden text-sm"><div class="pb-4 pt-0">${item.content}</div></div></div>`;
|
|
50
|
+
}
|
|
51
|
+
create__unresolved_0Item(item) {
|
|
52
|
+
var __c = this.____unresolved_0_container;
|
|
53
|
+
if (!__c.__geaTpl) try {
|
|
54
|
+
var __tw = document.createElement("template");
|
|
55
|
+
__tw.innerHTML = this.render__unresolved_0Item({
|
|
56
|
+
value: 0,
|
|
57
|
+
label: "",
|
|
58
|
+
content: ""
|
|
59
|
+
});
|
|
60
|
+
__c.__geaTpl = __tw.content.firstElementChild;
|
|
61
|
+
} catch (__err) {
|
|
62
|
+
console.error(__err);
|
|
63
|
+
}
|
|
64
|
+
if (__c.__geaTpl) var el = __c.__geaTpl.cloneNode(true);
|
|
65
|
+
else {
|
|
66
|
+
var __fw = document.createElement("template");
|
|
67
|
+
__fw.innerHTML = this.render__unresolved_0Item(item);
|
|
68
|
+
var el = __fw.content.firstElementChild;
|
|
69
|
+
}
|
|
70
|
+
el.__ref_0_0 = el.firstElementChild.firstElementChild;
|
|
71
|
+
el.__ref_0_0_0 = el.firstElementChild.firstElementChild.firstElementChild;
|
|
72
|
+
el.__ref_1 = el.firstElementChild.nextElementSibling;
|
|
73
|
+
el.__ref_1_0 = el.firstElementChild.nextElementSibling.firstElementChild;
|
|
74
|
+
var __av = item.value;
|
|
75
|
+
if (__av == null || __av === false) el.removeAttribute("data-value");
|
|
76
|
+
else el.setAttribute("data-value", String(__av));
|
|
77
|
+
var __av = item.value;
|
|
78
|
+
if (__av == null || __av === false) el.__ref_0_0.removeAttribute("data-value");
|
|
79
|
+
else el.__ref_0_0.setAttribute("data-value", String(__av));
|
|
80
|
+
var __av = item.value;
|
|
81
|
+
if (__av == null || __av === false) el.__ref_0_0_0.removeAttribute("data-value");
|
|
82
|
+
else el.__ref_0_0_0.setAttribute("data-value", String(__av));
|
|
83
|
+
var __av = item.value;
|
|
84
|
+
if (__av == null || __av === false) el.__ref_1.removeAttribute("data-value");
|
|
85
|
+
else el.__ref_1.setAttribute("data-value", String(__av));
|
|
86
|
+
el.__ref_1_0.textContent = `${item.content}`;
|
|
87
|
+
el.setAttribute("data-gea-item-id", item?.value ?? item);
|
|
88
|
+
el.__geaItem = item;
|
|
89
|
+
return el;
|
|
90
|
+
}
|
|
91
|
+
patch__unresolved_0Item(row, item, __prevItem) {
|
|
92
|
+
if (!row) return;
|
|
93
|
+
if (!row.__ref_0_0) row.__ref_0_0 = row.firstElementChild.firstElementChild;
|
|
94
|
+
if (!row.__ref_0_0_0) row.__ref_0_0_0 = row.firstElementChild.firstElementChild.firstElementChild;
|
|
95
|
+
if (!row.__ref_1) row.__ref_1 = row.firstElementChild.nextElementSibling;
|
|
96
|
+
if (!row.__ref_1_0) row.__ref_1_0 = row.firstElementChild.nextElementSibling.firstElementChild;
|
|
97
|
+
var __av = item.value;
|
|
98
|
+
if (__av == null || __av === false) row.removeAttribute("data-value");
|
|
99
|
+
else row.setAttribute("data-value", String(__av));
|
|
100
|
+
var __av = item.value;
|
|
101
|
+
if (__av == null || __av === false) row.__ref_0_0.removeAttribute("data-value");
|
|
102
|
+
else row.__ref_0_0.setAttribute("data-value", String(__av));
|
|
103
|
+
var __av = item.value;
|
|
104
|
+
if (__av == null || __av === false) row.__ref_0_0_0.removeAttribute("data-value");
|
|
105
|
+
else row.__ref_0_0_0.setAttribute("data-value", String(__av));
|
|
106
|
+
var __av = item.value;
|
|
107
|
+
if (__av == null || __av === false) row.__ref_1.removeAttribute("data-value");
|
|
108
|
+
else row.__ref_1.setAttribute("data-value", String(__av));
|
|
109
|
+
row.__ref_1_0.textContent = `${item.content}`;
|
|
110
|
+
row.setAttribute("data-gea-item-id", item?.value ?? item);
|
|
111
|
+
row.__geaItem = item;
|
|
112
|
+
}
|
|
113
|
+
__onPropChange(key, value) {
|
|
114
|
+
if (key === "class") {
|
|
115
|
+
const __el = this.element_;
|
|
116
|
+
this.props;
|
|
117
|
+
const __boundValue = value || "";
|
|
118
|
+
if (__el) {
|
|
119
|
+
const __newClass = (__boundValue != null ? String(__boundValue) : "").trim();
|
|
120
|
+
if (__el.className !== __newClass) __el.className = __newClass;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
if (key === "items") this.__geaSyncMap(0);
|
|
124
|
+
}
|
|
125
|
+
__observe_local_props(__v, __c) {
|
|
126
|
+
this.__geaSyncMap(0);
|
|
127
|
+
}
|
|
128
|
+
createdHooks() {
|
|
129
|
+
this.__geaRegisterMap(0, "____unresolved_0_container", () => this.$(":scope"), () => {
|
|
130
|
+
return this.props.items || [];
|
|
131
|
+
}, (__item) => this.create__unresolved_0Item(__item), "value");
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
//#endregion
|
|
135
|
+
export { Accordion as default };
|
|
136
|
+
|
|
137
|
+
//# sourceMappingURL=accordion.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion.mjs","names":["__v","v","valueOf","Component","accordion","normalizeProps","ZagComponent","handleComponentUpdate","registerHotModule","registerComponentInstance","unregisterComponentInstance","Accordion","value","createMachine","_props","machine","getMachineProps","props","id","defaultValue","multiple","collapsible","disabled","orientation","onValueChange","details","ValueChangeDetails","connectApi","service","connect","getSpreadMap","[data-part=\"item\"]","api","el","getItemProps","HTMLElement","dataset","[data-part=\"item-trigger\"]","getItemTriggerProps","[data-part=\"item-content\"]","getItemContentProps","[data-part=\"item-indicator\"]","getItemIndicatorProps","syncState","template","__id","_register","items","class","String","trim","map","item","label","content","join","render__unresolved_0Item","create__unresolved_0Item","__c","____unresolved_0_container","__geaTpl","__tw","document","createElement","innerHTML","firstElementChild","__err","console","error","cloneNode","__fw","__ref_0_0","__ref_0_0_0","__ref_1","nextElementSibling","__ref_1_0","__av","removeAttribute","setAttribute","textContent","__geaItem","patch__unresolved_0Item","row","__prevItem","__onPropChange","key","__el","element_","__boundValue","__newClass","className","__geaSyncMap","__observe_local_props","createdHooks","__geaRegisterMap","$","__item","import","meta","hot","__moduleExports","default","url","accept","newModule","__updatedModule","invalidate","__origCreated","prototype","created","__geaProps","constructor","name","call","__origDispose","dispose"],"sources":["../src/components/accordion.tsx"],"sourcesContent":["import * as accordion from '@zag-js/accordion'\nimport { normalizeProps } from '@zag-js/vanilla'\nimport ZagComponent from '../primitives/zag-component'\n\nexport default class Accordion extends ZagComponent {\n declare value: string[]\n\n createMachine(_props: any): any {\n return accordion.machine\n }\n\n getMachineProps(props: any) {\n return {\n id: this.id,\n value: props.value,\n defaultValue: props.defaultValue,\n multiple: props.multiple ?? false,\n collapsible: props.collapsible ?? false,\n disabled: props.disabled,\n orientation: props.orientation ?? 'vertical',\n onValueChange: (details: accordion.ValueChangeDetails) => {\n this.value = details.value\n props.onValueChange?.(details)\n },\n }\n }\n\n connectApi(service: any) {\n return accordion.connect(service, normalizeProps)\n }\n\n getSpreadMap() {\n return {\n '[data-part=\"root\"]': 'getRootProps',\n '[data-part=\"item\"]': (api, el) => api.getItemProps({ value: (el as HTMLElement).dataset.value }),\n '[data-part=\"item-trigger\"]': (api, el) => api.getItemTriggerProps({ value: (el as HTMLElement).dataset.value }),\n '[data-part=\"item-content\"]': (api, el) => api.getItemContentProps({ value: (el as HTMLElement).dataset.value }),\n '[data-part=\"item-indicator\"]': (api, el) =>\n api.getItemIndicatorProps({ value: (el as HTMLElement).dataset.value }),\n }\n }\n\n syncState(api: any) {\n this.value = api.value\n }\n\n template(props: any) {\n const items = props.items || []\n return (\n <div data-part=\"root\" class={props.class || ''}>\n {items.map((item: any) => (\n <div key={item.value} data-part=\"item\" data-value={item.value} class=\"accordion-item border-b\">\n <h3>\n <button\n data-part=\"item-trigger\"\n data-value={item.value}\n class=\"accordion-trigger flex w-full items-center justify-between py-4 text-sm font-medium transition-all\"\n >\n {item.label}\n <span\n data-part=\"item-indicator\"\n data-value={item.value}\n class=\"accordion-indicator h-4 w-4 shrink-0 transition-transform duration-200\"\n >\n ▶\n </span>\n </button>\n </h3>\n <div data-part=\"item-content\" data-value={item.value} class=\"accordion-content overflow-hidden text-sm\">\n <div class=\"pb-4 pt-0\">{item.content}</div>\n </div>\n </div>\n ))}\n </div>\n )\n }\n}\n"],"mappings":";;;;;;AAEI,MAAMA,OAAOC,MACXA,KAAK,QAAQ,OAAOA,MAAM,WACtBA,EAAEC,SAAS,GACXD;AADV,IAAqBU,YAArB,cAAuCL,aAAa;CAGlDO,cAAcC,QAAkB;AAC9B,SAAOV,UAAUW;;CAGnBC,gBAAgBC,OAAY;AAC1B,SAAO;GACLC,IAAI,KAAKA;GACTN,OAAOK,MAAML;GACbO,cAAcF,MAAME;GACpBC,UAAUH,MAAMG,YAAY;GAC5BC,aAAaJ,MAAMI,eAAe;GAClCC,UAAUL,MAAMK;GAChBC,aAAaN,MAAMM,eAAe;GAClCC,gBAAgBC,YAA0C;AACxD,SAAKb,QAAQa,QAAQb;AACrBK,UAAMO,gBAAgBC,QA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AAKC,EAAE,SAAS,QAAA;AAAA,UAAA,KAAA9E,MA8CQ8B,SAAK,EAAA;MAAAiD,WAAA,KAAAvC,yBAAAuC,OAAA,EAAA,QAAA"}
|
package/dist/alert.d.mts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Component } from "@geajs/core";
|
|
2
|
+
|
|
3
|
+
//#region src/components/alert.d.ts
|
|
4
|
+
declare class Alert extends Component {
|
|
5
|
+
template(props: any): string;
|
|
6
|
+
}
|
|
7
|
+
declare class AlertTitle extends Component {
|
|
8
|
+
template(props: any): string;
|
|
9
|
+
}
|
|
10
|
+
declare class AlertDescription extends Component {
|
|
11
|
+
template(props: any): string;
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { Alert, AlertDescription, AlertTitle };
|
|
15
|
+
//# sourceMappingURL=alert.d.mts.map
|
package/dist/alert.mjs
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { t as cn } from "./cn.mjs";
|
|
2
|
+
import "./_virtual_gea-hmr.mjs";
|
|
3
|
+
import { Component } from "@geajs/core";
|
|
4
|
+
//#region src/components/alert.tsx
|
|
5
|
+
const variants = {
|
|
6
|
+
default: "bg-background text-foreground",
|
|
7
|
+
destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"
|
|
8
|
+
};
|
|
9
|
+
var Alert = class extends Component {
|
|
10
|
+
template(props) {
|
|
11
|
+
const __id = this.id;
|
|
12
|
+
const variant = variants[props.variant || "default"] || variants.default;
|
|
13
|
+
return `<div id="${__id}"${cn("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7", variant, props.class) == null || cn("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7", variant, props.class) === false ? "" : ` class="${(cn("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7", variant, props.class) != null ? String(cn("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7", variant, props.class)) : "").trim()}"`} role="alert">${props.children}</div>`;
|
|
14
|
+
}
|
|
15
|
+
__onPropChange(key, value) {
|
|
16
|
+
if (key === "variant") {
|
|
17
|
+
const __el = this.element_;
|
|
18
|
+
const __boundValue = cn("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7", variants[this.props.variant || "default"] || variants.default, this.props.class);
|
|
19
|
+
if (__el) {
|
|
20
|
+
const __newClass = (__boundValue != null ? String(__boundValue) : "").trim();
|
|
21
|
+
if (__el.className !== __newClass) __el.className = __newClass;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
if (key === "class") {
|
|
25
|
+
const __el = this.element_;
|
|
26
|
+
const __boundValue = cn("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7", variants[this.props.variant || "default"] || variants.default, value);
|
|
27
|
+
if (__el) {
|
|
28
|
+
const __newClass = (__boundValue != null ? String(__boundValue) : "").trim();
|
|
29
|
+
if (__el.className !== __newClass) __el.className = __newClass;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
if (key === "children") {
|
|
33
|
+
const __el = this.element_;
|
|
34
|
+
if (__el && __el.innerHTML !== value) {
|
|
35
|
+
__el.innerHTML = value;
|
|
36
|
+
this.instantiateChildComponents_();
|
|
37
|
+
if (this.parentComponent) this.parentComponent.mountCompiledChildComponents_();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
var AlertTitle = class extends Component {
|
|
43
|
+
template(props) {
|
|
44
|
+
return `<h5 id="${this.id}"${cn("mb-1 font-medium leading-none tracking-tight", props.class) == null || cn("mb-1 font-medium leading-none tracking-tight", props.class) === false ? "" : ` class="${(cn("mb-1 font-medium leading-none tracking-tight", props.class) != null ? String(cn("mb-1 font-medium leading-none tracking-tight", props.class)) : "").trim()}"`}>${props.children}</h5>`;
|
|
45
|
+
}
|
|
46
|
+
__onPropChange(key, value) {
|
|
47
|
+
if (key === "class") {
|
|
48
|
+
const __el = this.element_;
|
|
49
|
+
this.props;
|
|
50
|
+
const __boundValue = cn("mb-1 font-medium leading-none tracking-tight", value);
|
|
51
|
+
if (__el) {
|
|
52
|
+
const __newClass = (__boundValue != null ? String(__boundValue) : "").trim();
|
|
53
|
+
if (__el.className !== __newClass) __el.className = __newClass;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
if (key === "children") {
|
|
57
|
+
const __el = this.element_;
|
|
58
|
+
if (__el && __el.innerHTML !== value) {
|
|
59
|
+
__el.innerHTML = value;
|
|
60
|
+
this.instantiateChildComponents_();
|
|
61
|
+
if (this.parentComponent) this.parentComponent.mountCompiledChildComponents_();
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
var AlertDescription = class extends Component {
|
|
67
|
+
template(props) {
|
|
68
|
+
return `<div id="${this.id}"${cn("text-sm [&_p]:leading-relaxed", props.class) == null || cn("text-sm [&_p]:leading-relaxed", props.class) === false ? "" : ` class="${(cn("text-sm [&_p]:leading-relaxed", props.class) != null ? String(cn("text-sm [&_p]:leading-relaxed", props.class)) : "").trim()}"`}>${props.children}</div>`;
|
|
69
|
+
}
|
|
70
|
+
__onPropChange(key, value) {
|
|
71
|
+
if (key === "class") {
|
|
72
|
+
const __el = this.element_;
|
|
73
|
+
this.props;
|
|
74
|
+
const __boundValue = cn("text-sm [&_p]:leading-relaxed", value);
|
|
75
|
+
if (__el) {
|
|
76
|
+
const __newClass = (__boundValue != null ? String(__boundValue) : "").trim();
|
|
77
|
+
if (__el.className !== __newClass) __el.className = __newClass;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
if (key === "children") {
|
|
81
|
+
const __el = this.element_;
|
|
82
|
+
if (__el && __el.innerHTML !== value) {
|
|
83
|
+
__el.innerHTML = value;
|
|
84
|
+
this.instantiateChildComponents_();
|
|
85
|
+
if (this.parentComponent) this.parentComponent.mountCompiledChildComponents_();
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
//#endregion
|
|
91
|
+
export { Alert, AlertDescription, AlertTitle };
|
|
92
|
+
|
|
93
|
+
//# sourceMappingURL=alert.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.mjs","names":["Component","cn","handleComponentUpdate","registerHotModule","registerComponentInstance","unregisterComponentInstance","variants","Record","default","destructive","Alert","template","props","__id","id","variant","class","String","trim","children","__onPropChange","key","value","__el","element_","__boundValue","__newClass","className","innerHTML","instantiateChildComponents_","parentComponent","mountCompiledChildComponents_","AlertTitle","AlertDescription","import","meta","hot","__moduleExports","url","accept","newModule","__updatedModule","invalidate","__origCreated","prototype","created","__geaProps","constructor","name","call","__origDispose","dispose"],"sources":["../src/components/alert.tsx"],"sourcesContent":["import { Component } from '@geajs/core'\nimport { cn } from '../utils/cn'\n\nconst variants: Record<string, string> = {\n default: 'bg-background text-foreground',\n destructive: 'border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive',\n}\n\nexport class Alert extends Component {\n template(props: any) {\n const variant = variants[props.variant || 'default'] || variants.default\n\n return (\n <div\n class={cn(\n 'relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7',\n variant,\n props.class,\n )}\n role=\"alert\"\n >\n {props.children}\n </div>\n )\n }\n}\n\nexport class AlertTitle extends Component {\n template(props: any) {\n return <h5 class={cn('mb-1 font-medium leading-none tracking-tight', props.class)}>{props.children}</h5>\n }\n}\n\nexport class AlertDescription extends Component {\n template(props: any) {\n return <div class={cn('text-sm [&_p]:leading-relaxed', props.class)}>{props.children}</div>\n }\n}\n"],"mappings":";;;;AAGA,MAAMM,WAAmC;CACvCE,SAAS;CACTC,aAAa;CACd;AAED,IAAaC,QAAb,cAA2BV,UAAU;CACnCW,SAASC,OAAY;EAAA,MAAAC,OAAA,KAAAC;EACnB,MAAMC,UAAUT,SAASM,MAAMG,WAAW,cAAcT,SAASE;AAEjE,SAAA,YAAAK,KAAA,GAEWZ,GACL,2KACAc,SACAH,MAAMI,MACP,IAAA,QAJMf,GACL,2KACAc,SACAH,MAAMI,MACP,KAAA,QAAA,KAAA,YAJMf,GACL,2KACAc,SACAH,MAAMI,MACP,IAAA,OAAAC,OAJMhB,GACL,2KACAc,SACAH,MAAMI,MACP,CAAA,GAAA,IAAAE,MAAA,CAAA,GAAA,gBAGAN,MAAMO,SAAQ;;CApBvBC,eAAsBC,KAAKC,OAAK;AAAA,MAAAD,QAAA,WAAA;GAAA,MAAAE,OAAA,KAAAC;GAS4C,MAAAC,eAI7DxB,GACL,2KALUK,SADC,KAAAM,MACcG,WAAW,cAAcT,SAASE,SAMpD,KAAAI,MACDI,MAAK;AAAA,OAAAO,MAAA;IAAA,MAAAG,cAAAD,gBAAA,OAAAR,OAAAQ,aAAA,GAAA,IAAAP,MAAA;AAAA,QAAAK,KAAAI,cAAAD,WAAAH,MAAAI,YAAAD;;;AAAA,MAAAL,QAAA,SAAA;GAAA,MAAAE,OAAA,KAAAC;GAPuD,MAAAC,eAI7DxB,GACL,2KALUK,SADC,KAAAM,MACcG,WAAW,cAAcT,SAASE,SAMpD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AmBb,GAAG,iCAAiCW,MAAMI,MAAM,IAAA,QAAhDf,GAAG,iCAAiCW,MAAMI,MAAM,KAAA,QAAA,KAAA,YAAhDf,GAAG,iCAAiCW,MAAMI,MAAM,IAAA,OAAAC,OAAhDhB,GAAG,iCAAiCW,MAAMI,MAAM,CAAA,GAAA,IAAAE,MAAA,CAAA,GAAA,GAAGN,MAAMO,SAAQ;;CAlCxFC,eAAsBC,KAAKC,OAAK;AAAA,MAAAD,QAAA,SAAA;GAAA,MAAAE,OAAA,KAAAC;AAiCX,QAAAZ;GAAA,MAAAa,eACExB,GAAG,iCAA+BqB,MAAA;AAAA,OAAAC,MAAA;IAAA,MAAAG,cAAAD,gBAAA,OAAAR,OAAAQ,aAAA,GAAA,IAAAP,MAAA;AAAA,QAAAK,KAAAI,cAAAD,WAAAH,MAAAI,YAAAD;;;AAAA,MAAAL,QAAA,YAAA;GAAA,MAAAE,OAAA,KAAAC;AAAA,OAAAD,QAAAA,KAAAK,cAAAN,OAAA;AAAAC,SAAAK,YAAAN;AAAA,SAAAO,6BAAA;AAAA,QAAA,KAAAC,gBAAA,MAAAA,gBAAAC,+BAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { n as ZagComponent } from "./zag-component.mjs";
|
|
2
|
+
import * as avatar from "@zag-js/avatar";
|
|
3
|
+
import * as _zag_js_types0 from "@zag-js/types";
|
|
4
|
+
|
|
5
|
+
//#region src/components/avatar.d.ts
|
|
6
|
+
declare class Avatar extends ZagComponent {
|
|
7
|
+
loaded: boolean;
|
|
8
|
+
createMachine(_props: any): any;
|
|
9
|
+
getMachineProps(props: any): {
|
|
10
|
+
id: string;
|
|
11
|
+
onStatusChange: any;
|
|
12
|
+
};
|
|
13
|
+
connectApi(service: any): avatar.Api<_zag_js_types0.PropTypes<{
|
|
14
|
+
[x: string]: any;
|
|
15
|
+
}>>;
|
|
16
|
+
getSpreadMap(): {
|
|
17
|
+
'[data-part="root"]': string;
|
|
18
|
+
'[data-part="image"]': string;
|
|
19
|
+
'[data-part="fallback"]': string;
|
|
20
|
+
};
|
|
21
|
+
syncState(api: any): void;
|
|
22
|
+
template(props: any): string;
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { Avatar as default };
|
|
26
|
+
//# sourceMappingURL=avatar.d.mts.map
|
package/dist/avatar.mjs
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { t as ZagComponent } from "./zag-component.mjs";
|
|
2
|
+
import "./_virtual_gea-hmr.mjs";
|
|
3
|
+
import { Component } from "@geajs/core";
|
|
4
|
+
import { normalizeProps } from "@zag-js/vanilla";
|
|
5
|
+
import * as avatar from "@zag-js/avatar";
|
|
6
|
+
//#region src/components/avatar.tsx
|
|
7
|
+
var Avatar = class extends ZagComponent {
|
|
8
|
+
constructor(...args) {
|
|
9
|
+
super(...args);
|
|
10
|
+
this.loaded = false;
|
|
11
|
+
this.props;
|
|
12
|
+
this.__geaCond_0 = !!this.props.src;
|
|
13
|
+
this.__geaRegisterCond(0, "c0", () => {
|
|
14
|
+
this.props;
|
|
15
|
+
return this.props.src;
|
|
16
|
+
}, () => {
|
|
17
|
+
const props = this.props;
|
|
18
|
+
return `<img data-part="image"${this.props.src == null || props.src === false ? "" : ` src="${this.props.src}"`}${(this.props.name || "") == null || (props.name || "") === false ? "" : ` alt="${this.props.name || ""}"`} class="avatar-image absolute inset-0 h-full w-full object-cover" />`;
|
|
19
|
+
}, () => {
|
|
20
|
+
this.props;
|
|
21
|
+
return "";
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
createMachine(_props) {
|
|
25
|
+
return avatar.machine;
|
|
26
|
+
}
|
|
27
|
+
getMachineProps(props) {
|
|
28
|
+
return {
|
|
29
|
+
id: this.id,
|
|
30
|
+
onStatusChange: props.onStatusChange
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
connectApi(service) {
|
|
34
|
+
return avatar.connect(service, normalizeProps);
|
|
35
|
+
}
|
|
36
|
+
getSpreadMap() {
|
|
37
|
+
return {
|
|
38
|
+
"[data-part=\"root\"]": "getRootProps",
|
|
39
|
+
"[data-part=\"image\"]": "getImageProps",
|
|
40
|
+
"[data-part=\"fallback\"]": "getFallbackProps"
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
syncState(api) {
|
|
44
|
+
this.loaded = api.loaded;
|
|
45
|
+
}
|
|
46
|
+
template(props) {
|
|
47
|
+
const __id = this.id;
|
|
48
|
+
Component._register(ZagComponent);
|
|
49
|
+
const initials = props.fallback || (props.name ? props.name.split(" ").map((n) => n[0]).join("").toUpperCase() : "?");
|
|
50
|
+
return `<div id="${__id}" data-part="root" class="${`avatar-root relative inline-flex h-10 w-10 shrink-0 overflow-hidden rounded-full ${props.class || ""}`.trim()}"><!--${__id + "-c0"}-->${(props.src ? `<img data-part="image"${props.src == null || props.src === false ? "" : ` src="${props.src}"`}${(props.name || "") == null || (props.name || "") === false ? "" : ` alt="${props.name || ""}"`} class="avatar-image absolute inset-0 h-full w-full object-cover" />` : "") || ""}<!--${__id + "-c0-end"}--><div id="${__id + "-b1"}" data-part="fallback" class="${`avatar-fallback flex h-full w-full items-center justify-center rounded-full bg-muted text-muted-foreground text-sm font-medium ${props.src ? "absolute inset-0" : ""}`.trim()}">${initials}</div></div>`;
|
|
51
|
+
}
|
|
52
|
+
__onPropChange(key, value) {
|
|
53
|
+
const __id = this.id;
|
|
54
|
+
if (key === "class") {
|
|
55
|
+
const __el = this.element_;
|
|
56
|
+
this.props;
|
|
57
|
+
const __boundValue = `avatar-root relative inline-flex h-10 w-10 shrink-0 overflow-hidden rounded-full ${value || ""}`;
|
|
58
|
+
if (__el) {
|
|
59
|
+
const __newClass = (__boundValue != null ? String(__boundValue) : "").trim();
|
|
60
|
+
if (__el.className !== __newClass) __el.className = __newClass;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
if (key === "src") {
|
|
64
|
+
const __el = this.__e0 || (this.__e0 = document.getElementById(__id + "-b1"));
|
|
65
|
+
this.props;
|
|
66
|
+
const __boundValue = `avatar-fallback flex h-full w-full items-center justify-center rounded-full bg-muted text-muted-foreground text-sm font-medium ${value ? "absolute inset-0" : ""}`;
|
|
67
|
+
if (__el) {
|
|
68
|
+
const __newClass = (__boundValue != null ? String(__boundValue) : "").trim();
|
|
69
|
+
if (__el.className !== __newClass) __el.className = __newClass;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
if (key === "fallback") {
|
|
73
|
+
const __el = this.__e1 || (this.__e1 = document.getElementById(__id + "-b1"));
|
|
74
|
+
this.props;
|
|
75
|
+
const __boundValue = this.props.fallback || (this.props.name ? this.props.name.split(" ").map((n) => n[0]).join("").toUpperCase() : "?");
|
|
76
|
+
if (__el && __el.textContent !== __boundValue) __el.textContent = __boundValue;
|
|
77
|
+
}
|
|
78
|
+
if (key === "name") {
|
|
79
|
+
const __el = this.__e2 || (this.__e2 = document.getElementById(__id + "-b1"));
|
|
80
|
+
this.props;
|
|
81
|
+
const __boundValue = this.props.fallback || (this.props.name ? this.props.name.split(" ").map((n) => n[0]).join("").toUpperCase() : "?");
|
|
82
|
+
if (__el && __el.textContent !== __boundValue) __el.textContent = __boundValue;
|
|
83
|
+
}
|
|
84
|
+
if (key === "src" || key === "name") this.__geaPatchCond(0);
|
|
85
|
+
}
|
|
86
|
+
__resetEls() {
|
|
87
|
+
this.__e0 = null;
|
|
88
|
+
this.__e1 = null;
|
|
89
|
+
this.__e2 = null;
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
//#endregion
|
|
93
|
+
export { Avatar as default };
|
|
94
|
+
|
|
95
|
+
//# sourceMappingURL=avatar.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatar.mjs","names":["avatar","normalizeProps","ZagComponent","handleComponentUpdate","registerHotModule","registerComponentInstance","unregisterComponentInstance","Avatar","constructor","args","props","__geaCond_0","src","__geaRegisterCond","name","loaded","createMachine","_props","machine","getMachineProps","id","onStatusChange","connectApi","service","connect","getSpreadMap","syncState","api","template","__id","Component","_register","initials","fallback","split","map","n","join","toUpperCase","class","trim","__onPropChange","key","value","__el","element_","__boundValue","__newClass","String","className","__e0","document","getElementById","__e1","textContent","__e2","__geaPatchCond","__resetEls","import","meta","hot","__moduleExports","default","url","accept","newModule","__updatedModule","invalidate","__origCreated","prototype","created","__geaProps","call","__origDispose","dispose"],"sources":["../src/components/avatar.tsx"],"sourcesContent":["import * as avatar from '@zag-js/avatar'\nimport { normalizeProps } from '@zag-js/vanilla'\nimport ZagComponent from '../primitives/zag-component'\n\nexport default class Avatar extends ZagComponent {\n loaded = false\n\n createMachine(_props: any): any {\n return avatar.machine\n }\n\n getMachineProps(props: any) {\n return {\n id: this.id,\n onStatusChange: props.onStatusChange,\n }\n }\n\n connectApi(service: any) {\n return avatar.connect(service, normalizeProps)\n }\n\n getSpreadMap() {\n return {\n '[data-part=\"root\"]': 'getRootProps',\n '[data-part=\"image\"]': 'getImageProps',\n '[data-part=\"fallback\"]': 'getFallbackProps',\n }\n }\n\n syncState(api: any) {\n this.loaded = api.loaded\n }\n\n template(props: any) {\n const initials =\n props.fallback ||\n (props.name\n ? props.name\n .split(' ')\n .map((n: string) => n[0])\n .join('')\n .toUpperCase()\n : '?')\n return (\n <div\n data-part=\"root\"\n class={`avatar-root relative inline-flex h-10 w-10 shrink-0 overflow-hidden rounded-full ${props.class || ''}`}\n >\n {props.src ? (\n <img\n data-part=\"image\"\n src={props.src}\n alt={props.name || ''}\n class=\"avatar-image absolute inset-0 h-full w-full object-cover\"\n />\n ) : (\n ''\n )}\n <div\n data-part=\"fallback\"\n class={`avatar-fallback flex h-full w-full items-center justify-center rounded-full bg-muted text-muted-foreground text-sm font-medium ${props.src ? 'absolute inset-0' : ''}`}\n >\n {initials}\n </div>\n </div>\n )\n }\n}\n"],"mappings":";;;;;;AAIA,IAAqBO,SAArB,cAAoCL,aAAa;CAHjDM,YAAsB,GAAGC,MAAI;AAAA,QAAA,GAAAA,KAAA;gB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R,MAAAoC,eARK,KAAApC,MACNuB,aAAQ,KAAAvB,MACPI,OAAI,KAAAJ,MACDI,KACHoB,MAAM,IAAG,CACTC,KAAKC,MAAcA,EAAE,GAAC,CACtBC,KAAK,GAAE,CACPC,aAAW,GACd;AAoBS,OAAAM,QAAAA,KAAAU,gBAAAR,aAAAF,MAAAU,cAAAR;;AAAA,MAAAJ,QAAA,SAAAA,QAAA,OAAA,MAAAc,eAAA,EAAA;;CA9DiBC,aAAA;AAAA,OAAAP,OAAA;AAAA,OAAAG,OAAA;AAAA,OAAAE,OAAA"}
|
package/dist/badge.d.mts
ADDED
package/dist/badge.mjs
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { t as cn } from "./cn.mjs";
|
|
2
|
+
import "./_virtual_gea-hmr.mjs";
|
|
3
|
+
import { Component } from "@geajs/core";
|
|
4
|
+
//#region src/components/badge.tsx
|
|
5
|
+
const variants = {
|
|
6
|
+
default: "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
|
|
7
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
8
|
+
destructive: "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
|
|
9
|
+
outline: "text-foreground"
|
|
10
|
+
};
|
|
11
|
+
var Badge = class extends Component {
|
|
12
|
+
template(props) {
|
|
13
|
+
const __id = this.id;
|
|
14
|
+
const variant = variants[props.variant || "default"] || variants.default;
|
|
15
|
+
return `<span id="${__id}"${cn("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", variant, props.class) == null || cn("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", variant, props.class) === false ? "" : ` class="${(cn("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", variant, props.class) != null ? String(cn("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", variant, props.class)) : "").trim()}"`}>${props.children}</span>`;
|
|
16
|
+
}
|
|
17
|
+
__onPropChange(key, value) {
|
|
18
|
+
if (key === "variant") {
|
|
19
|
+
const __el = this.element_;
|
|
20
|
+
const __boundValue = cn("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", variants[this.props.variant || "default"] || variants.default, this.props.class);
|
|
21
|
+
if (__el) {
|
|
22
|
+
const __newClass = (__boundValue != null ? String(__boundValue) : "").trim();
|
|
23
|
+
if (__el.className !== __newClass) __el.className = __newClass;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (key === "class") {
|
|
27
|
+
const __el = this.element_;
|
|
28
|
+
const __boundValue = cn("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", variants[this.props.variant || "default"] || variants.default, value);
|
|
29
|
+
if (__el) {
|
|
30
|
+
const __newClass = (__boundValue != null ? String(__boundValue) : "").trim();
|
|
31
|
+
if (__el.className !== __newClass) __el.className = __newClass;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
if (key === "children") {
|
|
35
|
+
const __el = this.element_;
|
|
36
|
+
if (__el && __el.innerHTML !== value) {
|
|
37
|
+
__el.innerHTML = value;
|
|
38
|
+
this.instantiateChildComponents_();
|
|
39
|
+
if (this.parentComponent) this.parentComponent.mountCompiledChildComponents_();
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
//#endregion
|
|
45
|
+
export { Badge as default };
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=badge.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.mjs","names":["Component","cn","handleComponentUpdate","registerHotModule","registerComponentInstance","unregisterComponentInstance","variants","Record","default","secondary","destructive","outline","Badge","template","props","__id","id","variant","class","String","trim","children","__onPropChange","key","value","__el","element_","__boundValue","__newClass","className","innerHTML","instantiateChildComponents_","parentComponent","mountCompiledChildComponents_","import","meta","hot","__moduleExports","url","accept","newModule","__updatedModule","invalidate","__origCreated","prototype","created","__geaProps","constructor","name","call","__origDispose","dispose"],"sources":["../src/components/badge.tsx"],"sourcesContent":["import { Component } from '@geajs/core'\nimport { cn } from '../utils/cn'\n\nconst variants: Record<string, string> = {\n default: 'border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80',\n secondary: 'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80',\n destructive: 'border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80',\n outline: 'text-foreground',\n}\n\nexport default class Badge extends Component {\n template(props: any) {\n const variant = variants[props.variant || 'default'] || variants.default\n\n return (\n <span\n class={cn(\n 'inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',\n variant,\n props.class,\n )}\n >\n {props.children}\n </span>\n )\n }\n}\n"],"mappings":";;;;AAGA,MAAMM,WAAmC;CACvCE,SAAS;CACTC,WAAW;CACXC,aAAa;CACbC,SAAS;CACV;AAED,IAAqBC,QAArB,cAAmCZ,UAAU;CAC3Ca,SAASC,OAAY;EAAA,MAAAC,OAAA,KAAAC;EACnB,MAAMC,UAAUX,SAASQ,MAAMG,WAAW,cAAcX,SAASE;AAEjE,SAAA,aAAAO,KAAA,GAEWd,GACL,wKACAgB,SACAH,MAAMI,MACP,IAAA,QAJMjB,GACL,wKACAgB,SACAH,MAAMI,MACP,KAAA,QAAA,KAAA,YAJMjB,GACL,wKACAgB,SACAH,MAAMI,MACP,IAAA,OAAAC,OAJMlB,GACL,wKACAgB,SACAH,MAAMI,MACP,CAAA,GAAA,IAAAE,MAAA,CAAA,GAAA,GAEAN,MAAMO,SAAQ;;CArBvBC,eAAsBC,KAAKC,OAAK;AAAA,MAAAD,QAAA,WAAA;GAAA,MAAAE,OAAA,KAAAC;GAW4C,MAAAC,eAI7D1B,GACL,wKALUK,SADC,KAAAQ,MACcG,WAAW,cAAcX,SAASE,SAMpD,KAAAM,MACDI,MAAK;AAAA,OAAAO,MAAA;IAAA,MAAAG,cAAAD,gBAAA,OAAAR,OAAAQ,aAAA,GAAA,IAAAP,MAAA;AAAA,QAAAK,KAAAI,cAAAD,WAAAH,MAAAI,YAAAD;;;AAAA,MAAAL,QAAA,SAAA;GAAA,MAAAE,OAAA,KAAAC;GAPuD,MAAAC,eAI7D1B,GACL,wKALUK,SADC,KAAAQ,MACcG,WAAW,cAAcX,SAASE,SAMpDgB,MAAA;AAAA,OAAAC,MAAA;IAAA,MAAAG,cAAAD,gBAAA,OAAAR,OAAAQ,aAAA,GAAA,IAAAP,MAAA;AAAA,QAAAK,KAAAI,cAAAD,WAAAH,MAAAI,YAAAD;;;AAAA,MAAAL,QAAA,YAAA;GAAA,MAAAE,OAAA,KAAAC;AAAA,OAAAD,QAAAA,KAAAK,cAAAN,OAAA;AAAAC,SAAAK,YAAAN;AAAA,SAAAO,6BAAA;AAAA,QAAA,KAAAC,gBAAA,MAAAA,gBAAAC,+BAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Component } from "@geajs/core";
|
|
2
|
+
|
|
3
|
+
//#region src/components/button.d.ts
|
|
4
|
+
type ButtonVariant = 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link';
|
|
5
|
+
type ButtonSize = 'default' | 'sm' | 'lg' | 'icon';
|
|
6
|
+
interface ButtonProps {
|
|
7
|
+
variant?: ButtonVariant | (string & {});
|
|
8
|
+
size?: ButtonSize | (string & {});
|
|
9
|
+
type?: 'button' | 'submit' | 'reset';
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
class?: string;
|
|
12
|
+
click?: MouseEventHandler<HTMLButtonElement>;
|
|
13
|
+
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
14
|
+
children?: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
declare class Button extends Component<ButtonProps> {
|
|
17
|
+
template(props: ButtonProps): string;
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { ButtonProps, ButtonSize, ButtonVariant, Button as default };
|
|
21
|
+
//# sourceMappingURL=button.d.mts.map
|