@lofid/react 0.0.0-stage → 1.1.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/README.md +89 -2
- package/dist/index.d.ts +456 -0
- package/dist/index.js +559 -0
- package/dist/index.js.map +1 -0
- package/package.json +39 -4
package/dist/index.js
ADDED
|
@@ -0,0 +1,559 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/create-component.ts
|
|
4
|
+
import {
|
|
5
|
+
createElement,
|
|
6
|
+
forwardRef,
|
|
7
|
+
useCallback,
|
|
8
|
+
useEffect,
|
|
9
|
+
useLayoutEffect,
|
|
10
|
+
useRef,
|
|
11
|
+
version
|
|
12
|
+
} from "react";
|
|
13
|
+
var useClientLayoutEffect = typeof window === "undefined" ? useEffect : useLayoutEffect;
|
|
14
|
+
var NO_DEFAULT = /* @__PURE__ */ Symbol("no-default");
|
|
15
|
+
var CLASS_PROP = Number.parseInt(version, 10) >= 19 ? "className" : "class";
|
|
16
|
+
function createComponent(tag, props, events) {
|
|
17
|
+
const specs = props;
|
|
18
|
+
const eventEntries = Object.entries(events);
|
|
19
|
+
const Component = forwardRef((props2, forwardedRef) => {
|
|
20
|
+
const node = useRef(null);
|
|
21
|
+
const handlers = useRef({});
|
|
22
|
+
const defaults = useRef(/* @__PURE__ */ new Map());
|
|
23
|
+
const applied = useRef(/* @__PURE__ */ new Set());
|
|
24
|
+
const domProps = {};
|
|
25
|
+
const attributes = {};
|
|
26
|
+
const elementProps = {};
|
|
27
|
+
const handlerProps = {};
|
|
28
|
+
for (const key in props2) {
|
|
29
|
+
const value = props2[key];
|
|
30
|
+
if (key in events) handlerProps[key] = value;
|
|
31
|
+
else if (key in specs) {
|
|
32
|
+
elementProps[key] = value;
|
|
33
|
+
const spec = specs[key];
|
|
34
|
+
if (spec === null || value == null) continue;
|
|
35
|
+
if (spec[0] === "?") {
|
|
36
|
+
if (value === true) attributes[spec.slice(1)] = true;
|
|
37
|
+
} else if (typeof value === "string" || typeof value === "number") attributes[spec] = value;
|
|
38
|
+
} else domProps[key === "className" ? CLASS_PROP : key] = value;
|
|
39
|
+
}
|
|
40
|
+
handlers.current = handlerProps;
|
|
41
|
+
useClientLayoutEffect(() => {
|
|
42
|
+
const el = node.current;
|
|
43
|
+
if (!el) return;
|
|
44
|
+
const upgraded = customElements.get(tag) !== void 0;
|
|
45
|
+
for (const key in elementProps) {
|
|
46
|
+
if (!defaults.current.has(key)) defaults.current.set(key, upgraded ? el[key] : NO_DEFAULT);
|
|
47
|
+
const value = elementProps[key];
|
|
48
|
+
if (el[key] !== value) el[key] = value;
|
|
49
|
+
applied.current.add(key);
|
|
50
|
+
}
|
|
51
|
+
for (const key of applied.current) {
|
|
52
|
+
if (key in elementProps) continue;
|
|
53
|
+
const fallback = defaults.current.get(key);
|
|
54
|
+
el[key] = fallback === NO_DEFAULT ? void 0 : fallback;
|
|
55
|
+
applied.current.delete(key);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
useClientLayoutEffect(() => {
|
|
59
|
+
if (customElements.get(tag)) return;
|
|
60
|
+
let live = true;
|
|
61
|
+
customElements.whenDefined(tag).then(() => {
|
|
62
|
+
const el = node.current;
|
|
63
|
+
if (!live || !el) return;
|
|
64
|
+
for (const key of applied.current) {
|
|
65
|
+
if (!Object.prototype.hasOwnProperty.call(el, key)) continue;
|
|
66
|
+
const value = el[key];
|
|
67
|
+
delete el[key];
|
|
68
|
+
el[key] = value;
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
return () => {
|
|
72
|
+
live = false;
|
|
73
|
+
};
|
|
74
|
+
}, []);
|
|
75
|
+
useClientLayoutEffect(() => {
|
|
76
|
+
const el = node.current;
|
|
77
|
+
if (!el || eventEntries.length === 0) return;
|
|
78
|
+
const off = eventEntries.map(([prop, type]) => {
|
|
79
|
+
const listener = (event) => {
|
|
80
|
+
if (event.target !== el) return;
|
|
81
|
+
handlers.current[prop]?.(event);
|
|
82
|
+
};
|
|
83
|
+
el.addEventListener(type, listener);
|
|
84
|
+
return () => el.removeEventListener(type, listener);
|
|
85
|
+
});
|
|
86
|
+
return () => off.forEach((fn) => fn());
|
|
87
|
+
}, []);
|
|
88
|
+
const ref = useCallback(
|
|
89
|
+
(el) => {
|
|
90
|
+
node.current = el;
|
|
91
|
+
if (typeof forwardedRef === "function") forwardedRef(el);
|
|
92
|
+
else if (forwardedRef) forwardedRef.current = el;
|
|
93
|
+
},
|
|
94
|
+
[forwardedRef]
|
|
95
|
+
);
|
|
96
|
+
return createElement(tag, { ...domProps, ...attributes, ref });
|
|
97
|
+
});
|
|
98
|
+
Component.displayName = tag.split("-").map((p) => p[0].toUpperCase() + p.slice(1)).join("");
|
|
99
|
+
return Component;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// src/generated.ts
|
|
103
|
+
var LofAccordion = /* @__PURE__ */ createComponent(
|
|
104
|
+
"lof-accordion",
|
|
105
|
+
{ appearance: "appearance", contentType: "content-type", disabled: "?disabled", open: "?open", size: "size", title: "title", type: "type" },
|
|
106
|
+
{ onOpenChange: "open-change" }
|
|
107
|
+
);
|
|
108
|
+
var LofAlert = /* @__PURE__ */ createComponent(
|
|
109
|
+
"lof-alert",
|
|
110
|
+
{ appearance: "appearance", dismissed: "?dismissed", dismissible: "?dismissible", message1: "message1", message2: "message2", tone: "tone", type: "type", urlHref: "url-href", urlText: "url-text" },
|
|
111
|
+
{ onDismiss: "dismiss" }
|
|
112
|
+
);
|
|
113
|
+
var LofAutocomplete = /* @__PURE__ */ createComponent(
|
|
114
|
+
"lof-autocomplete",
|
|
115
|
+
{ clearable: "?clearable", debounceMs: "debounce-ms", disabled: "?disabled", displayField: "display-field", error: "?error", errorMessage: "error-message", fieldAriaLabel: "field-aria-label", fieldAriaLabelledby: "field-aria-labelledby", filter: "filter", floatingLabel: "?floating-label", fullWidth: "?full-width", helperText: "helper-text", items: null, label: "label", labelStyle: "label-style", loading: "?loading", loadingText: "loading-text", maxSuggestions: "max-suggestions", minSearchLength: "min-search-length", multiple: "?multiple", name: "name", noResultsText: "no-results-text", placeholder: "placeholder", prefixIcon: "prefix-icon", readonly: "?readonly", required: "?required", searchFn: null, selectAllLabel: "select-all-label", selectedValues: null, size: "size", supportingField: "supporting-field", value: "value", valueField: "value-field", variant: "variant" },
|
|
116
|
+
{ onChanged: "changed", onLofChange: "lof-change", onLofClear: "lof-clear", onLofSearchError: "lof-search-error" }
|
|
117
|
+
);
|
|
118
|
+
var LofAvatar = /* @__PURE__ */ createComponent(
|
|
119
|
+
"lof-avatar",
|
|
120
|
+
{ alt: "alt", badge: "badge", badgeIcon: "badge-icon", badgeLabel: "badge-label", bg: "bg", color: "color", icon: "icon", ring: "?ring", size: "size", src: "src", text: "text", type: "type", variant: "variant" },
|
|
121
|
+
{}
|
|
122
|
+
);
|
|
123
|
+
var LofAvatarGroup = /* @__PURE__ */ createComponent(
|
|
124
|
+
"lof-avatar-group",
|
|
125
|
+
{ label: "label", max: "max", overflowLabel: "overflow-label", size: "size", total: "total" },
|
|
126
|
+
{}
|
|
127
|
+
);
|
|
128
|
+
var LofBadge = /* @__PURE__ */ createComponent(
|
|
129
|
+
"lof-badge",
|
|
130
|
+
{ ariaLabel: "arialabel", color: "color", live: "?live", number: "number", size: "size", suffix: "suffix", textColor: "text-color", variant: "variant" },
|
|
131
|
+
{}
|
|
132
|
+
);
|
|
133
|
+
var LofBreadcrumbs = /* @__PURE__ */ createComponent(
|
|
134
|
+
"lof-breadcrumbs",
|
|
135
|
+
{ ariaLabel: "aria-label", items: null },
|
|
136
|
+
{}
|
|
137
|
+
);
|
|
138
|
+
var LofButton = /* @__PURE__ */ createComponent(
|
|
139
|
+
"lof-button",
|
|
140
|
+
{ ariaLabel: "aria-label", badge: "badge", badgeDot: "?badge-dot", border: "border", disabled: "?disabled", iconOnly: "?icon-only", loading: "?loading", size: "size", tone: "tone", variant: "variant" },
|
|
141
|
+
{}
|
|
142
|
+
);
|
|
143
|
+
var LofCalendar = /* @__PURE__ */ createComponent(
|
|
144
|
+
"lof-calendar",
|
|
145
|
+
{ disabled: "?disabled", isDateDisabled: null, locale: "locale", max: "max", min: "min", value: "value", weekStart: "week-start" },
|
|
146
|
+
{ onLofChange: "lof-change" }
|
|
147
|
+
);
|
|
148
|
+
var LofCard = /* @__PURE__ */ createComponent(
|
|
149
|
+
"lof-card",
|
|
150
|
+
{ description: "description", flush: "?flush", heading: "heading", type: "type" },
|
|
151
|
+
{}
|
|
152
|
+
);
|
|
153
|
+
var LofCardMedia = /* @__PURE__ */ createComponent(
|
|
154
|
+
"lof-card-media",
|
|
155
|
+
{ imageAlt: "image-alt", imageSrc: "image-src", subtitle: "subtitle", title: "title" },
|
|
156
|
+
{}
|
|
157
|
+
);
|
|
158
|
+
var LofCarousel = /* @__PURE__ */ createComponent(
|
|
159
|
+
"lof-carousel",
|
|
160
|
+
{ autoplay: "?autoplay", disabled: "?disabled", gap: "gap", interval: "interval", label: "label", loop: "?loop", orientation: "orientation", panels: "panels", pauseOnHover: "?pause-on-hover", showButtons: "?show-buttons", showDots: null, type: "type", value: "value" },
|
|
161
|
+
{ onLofChange: "lof-change" }
|
|
162
|
+
);
|
|
163
|
+
var LofCheckbox = /* @__PURE__ */ createComponent(
|
|
164
|
+
"lof-checkbox",
|
|
165
|
+
{ alignment: "alignment", checked: null, density: "density", disabled: "?disabled", fieldAriaLabel: "field-aria-label", icon: "icon", label: "label", size: "size", state: "state", status: "status", supportingtext: "supporting-text", supportingText: null, value: "value" },
|
|
166
|
+
{ onLofChange: "lof-change" }
|
|
167
|
+
);
|
|
168
|
+
var LofChip = /* @__PURE__ */ createComponent(
|
|
169
|
+
"lof-chip",
|
|
170
|
+
{ avatar: "avatar", border: "border", draggableChip: "?draggable-chip", fieldAriaLabel: "field-aria-label", label: "label", leadingIcon: "leading-icon", presentational: "?presentational", removable: "?removable", removed: "?removed", size: "size", tone: "tone", trailingIcon: "trailing-icon", variant: "variant" },
|
|
171
|
+
{ onChipMove: "chip-move", onRemoved: "removed" }
|
|
172
|
+
);
|
|
173
|
+
var LofContainer = /* @__PURE__ */ createComponent(
|
|
174
|
+
"lof-container",
|
|
175
|
+
{ background: "background", padding: "padding", shadow: "?shadow", surface: "surface" },
|
|
176
|
+
{}
|
|
177
|
+
);
|
|
178
|
+
var LofDatePicker = /* @__PURE__ */ createComponent(
|
|
179
|
+
"lof-date-picker",
|
|
180
|
+
{ clearable: "?clearable", closeOnSelect: "?close-on-select", disabled: "?disabled", displayFormat: "display-format", error: "?error", errorMessage: "error-message", formatDate: null, fullWidth: "?full-width", helperText: "helper-text", isDateDisabled: null, label: "label", locale: "locale", max: "max", maxDate: "max-date", min: "min", minDate: "min-date", name: "name", open: "?open", placeholder: "placeholder", readonly: "?readonly", required: "?required", showShortcuts: null, size: "size", value: "value", variant: "variant", weekStart: "week-start" },
|
|
181
|
+
{ onLofBlur: "lof-blur", onLofChange: "lof-change", onLofOpenChange: "lof-open-change" }
|
|
182
|
+
);
|
|
183
|
+
var LofDivider = /* @__PURE__ */ createComponent(
|
|
184
|
+
"lof-divider",
|
|
185
|
+
{ orientation: "orientation" },
|
|
186
|
+
{}
|
|
187
|
+
);
|
|
188
|
+
var LofDrawer = /* @__PURE__ */ createComponent(
|
|
189
|
+
"lof-drawer",
|
|
190
|
+
{ closeOnBackdrop: "?close-on-backdrop", closeOnEscape: "?close-on-escape", description: "description", dismissible: "?dismissible", draggable: "?draggable", maxHeight: "max-height", modal: "?modal", open: "?open", showHandle: "?show-handle", side: "side", snapThreshold: "snap-threshold", title: "title", width: "width" },
|
|
191
|
+
{ onLofOpenChange: "lof-open-change" }
|
|
192
|
+
);
|
|
193
|
+
var LofDrawerFooter = /* @__PURE__ */ createComponent(
|
|
194
|
+
"lof-drawer-footer",
|
|
195
|
+
{},
|
|
196
|
+
{}
|
|
197
|
+
);
|
|
198
|
+
var LofEmptyState = /* @__PURE__ */ createComponent(
|
|
199
|
+
"lof-empty-state",
|
|
200
|
+
{ align: "align", description: "description", heading: "heading", headingLevel: "heading-level", icon: "icon", size: "size" },
|
|
201
|
+
{}
|
|
202
|
+
);
|
|
203
|
+
var LofImageInput = /* @__PURE__ */ createComponent(
|
|
204
|
+
"lof-image-input",
|
|
205
|
+
{ accept: "accept", disabled: "?disabled", fieldAriaLabel: "field-aria-label", maxSize: "max-size", name: "name", noRemove: "?no-remove", shape: "shape", size: "size", src: "src" },
|
|
206
|
+
{ onLofChange: "lof-change", onLofError: "lof-error", onLofRemove: "lof-remove" }
|
|
207
|
+
);
|
|
208
|
+
var LofKbd = /* @__PURE__ */ createComponent(
|
|
209
|
+
"lof-kbd",
|
|
210
|
+
{ inset: "?inset", keyName: "key-name", pill: "?pill", platform: "platform", size: "size", variant: "variant" },
|
|
211
|
+
{}
|
|
212
|
+
);
|
|
213
|
+
var LofKbdGroup = /* @__PURE__ */ createComponent(
|
|
214
|
+
"lof-kbd-group",
|
|
215
|
+
{ items: null, platform: "platform", size: "size", variant: "variant" },
|
|
216
|
+
{}
|
|
217
|
+
);
|
|
218
|
+
var LofLayout = /* @__PURE__ */ createComponent(
|
|
219
|
+
"lof-layout",
|
|
220
|
+
{ columns: "columns", gap: "gap", responsive: "?responsive" },
|
|
221
|
+
{}
|
|
222
|
+
);
|
|
223
|
+
var LofLink = /* @__PURE__ */ createComponent(
|
|
224
|
+
"lof-link",
|
|
225
|
+
{ arrow: "?arrow", disabled: "?disabled", href: "href", inherit: "?inherit", rel: "rel", size: "size", target: "target", tone: "tone", underline: "underline" },
|
|
226
|
+
{}
|
|
227
|
+
);
|
|
228
|
+
var LofMenu = /* @__PURE__ */ createComponent(
|
|
229
|
+
"lof-menu",
|
|
230
|
+
{ items: null, size: "size", type: "type", width: "width" },
|
|
231
|
+
{ onLofCheck: "lof-check", onLofSelect: "lof-select", onLofSubmenuSelect: "lof-submenu-select" }
|
|
232
|
+
);
|
|
233
|
+
var LofMenuItem = /* @__PURE__ */ createComponent(
|
|
234
|
+
"lof-menu-item",
|
|
235
|
+
{ disabled: "?disabled", icon: "icon", label: "label", value: "value" },
|
|
236
|
+
{}
|
|
237
|
+
);
|
|
238
|
+
var LofMenubar = /* @__PURE__ */ createComponent(
|
|
239
|
+
"lof-menubar",
|
|
240
|
+
{ bindShortcuts: "?bind-shortcuts", type: "type" },
|
|
241
|
+
{ onLofMenubarChange: "lof-menubar-change", onLofMenubarSelect: "lof-menubar-select" }
|
|
242
|
+
);
|
|
243
|
+
var LofMenubarMenu = /* @__PURE__ */ createComponent(
|
|
244
|
+
"lof-menubar-menu",
|
|
245
|
+
{ disabled: "?disabled", label: "label" },
|
|
246
|
+
{}
|
|
247
|
+
);
|
|
248
|
+
var LofModal = /* @__PURE__ */ createComponent(
|
|
249
|
+
"lof-modal",
|
|
250
|
+
{ autoFocus: "?auto-focus", breakpoint: "breakpoint", closeOnBackdropClick: "?close-on-backdrop-click", closeOnEscape: "?close-on-escape", description: "description", disabled: "?disabled", dismissible: "?dismissible", loading: "?loading", modal: "?modal", open: "?open", restoreFocus: "?restore-focus", scrollable: "?scrollable", showCloseButton: "?show-close-button", side: "side", size: "size", subtitle: "subtitle", title: "title", variant: "variant", zIndex: "z-index" },
|
|
251
|
+
{ onLofOpenChange: "lof-open-change" }
|
|
252
|
+
);
|
|
253
|
+
var LofNav = /* @__PURE__ */ createComponent(
|
|
254
|
+
"lof-nav",
|
|
255
|
+
{ collapsed: "?collapsed", fieldAriaLabel: "field-aria-label", indicator: "indicator", items: null, value: "value" },
|
|
256
|
+
{ onLofSelect: "lof-select", onLofToggle: "lof-toggle" }
|
|
257
|
+
);
|
|
258
|
+
var LofOtp = /* @__PURE__ */ createComponent(
|
|
259
|
+
"lof-otp",
|
|
260
|
+
{ ariaLabel: "aria-label", autocomplete: "autocomplete", disabled: "?disabled", groupSize: "group-size", inputmode: "inputmode", inputMode: "input-mode", invalid: "?invalid", length: "length", mask: "?mask", name: "name", pattern: "pattern", placeholder: "placeholder", readonly: "?readonly", required: "?required", showSeparator: "?show-separator", size: "size", type: "type", value: "value" },
|
|
261
|
+
{ onLofChange: "lof-change", onLofComplete: "lof-complete" }
|
|
262
|
+
);
|
|
263
|
+
var LofPageHeader = /* @__PURE__ */ createComponent(
|
|
264
|
+
"lof-page-header",
|
|
265
|
+
{ description: "description", divider: "?divider", heading: "heading", headingLevel: "heading-level", layout: "layout" },
|
|
266
|
+
{}
|
|
267
|
+
);
|
|
268
|
+
var LofPagination = /* @__PURE__ */ createComponent(
|
|
269
|
+
"lof-pagination",
|
|
270
|
+
{ ariaLabel: "arialabel", defaultPage: "default-page", disabled: "?disabled", hrefTemplate: "href-template", page: "page", perPage: "per-page", rowsPerPageLabel: "rows-per-page-label", rowsPerPageOptions: null, showLabel: "?show-label", showRowsPerPage: "?show-rows-per-page", totalItems: "total-items", totalPages: "total-pages", type: "type" },
|
|
271
|
+
{ onLofChange: "lof-change", onLofPerPageChange: "lof-per-page-change" }
|
|
272
|
+
);
|
|
273
|
+
var LofPopover = /* @__PURE__ */ createComponent(
|
|
274
|
+
"lof-popover",
|
|
275
|
+
{ align: "align", alignOffset: "align-offset", arrow: "?arrow", closeOnEscape: "?close-on-escape", closeOnOutsideClick: "?close-on-outside-click", defaultOpen: "?default-open", disabled: "?disabled", hasPopup: "has-popup", open: "?open", side: "side", sideOffset: "side-offset", trapFocus: "?trap-focus" },
|
|
276
|
+
{ onLofOpenChange: "lof-open-change" }
|
|
277
|
+
);
|
|
278
|
+
var LofPopoverContent = /* @__PURE__ */ createComponent(
|
|
279
|
+
"lof-popover-content",
|
|
280
|
+
{ ariaLabel: "aria-label", size: "size" },
|
|
281
|
+
{}
|
|
282
|
+
);
|
|
283
|
+
var LofProgress = /* @__PURE__ */ createComponent(
|
|
284
|
+
"lof-progress",
|
|
285
|
+
{ label: "label", mode: "mode", value: "value" },
|
|
286
|
+
{}
|
|
287
|
+
);
|
|
288
|
+
var LofRadio = /* @__PURE__ */ createComponent(
|
|
289
|
+
"lof-radio",
|
|
290
|
+
{ alignment: "alignment", density: "density", disabled: "?disabled", error: "?error", errorMessage: "error-message", fieldAriaLabel: "field-aria-label", name: "name", options: null, orientation: "orientation", selectedValue: "selected-value", size: "size", value: "value" },
|
|
291
|
+
{ onLofChange: "lof-change" }
|
|
292
|
+
);
|
|
293
|
+
var LofRangePicker = /* @__PURE__ */ createComponent(
|
|
294
|
+
"lof-range-picker",
|
|
295
|
+
{ clearable: "?clearable", disabled: "?disabled", from: "from", fullWidth: "?full-width", height: "height", locale: "locale", maxDate: "max-date", maxHeight: "max-height", maxWidth: "max-width", minDate: "min-date", minHeight: "min-height", minWidth: "min-width", mode: "mode", open: "?open", placeholder: "placeholder", size: "size", to: "to", triggerVariant: "trigger-variant", weekStart: "week-start", width: "width" },
|
|
296
|
+
{ onLofBlur: "lof-blur", onLofChange: "lof-change", onLofOpenChange: "lof-open-change" }
|
|
297
|
+
);
|
|
298
|
+
var LofRating = /* @__PURE__ */ createComponent(
|
|
299
|
+
"lof-rating",
|
|
300
|
+
{ disabled: "?disabled", fieldAriaLabel: "field-aria-label", max: "max", name: "name", readonly: "?readonly", showValue: "?show-value", size: "size", step: "step", value: "value" },
|
|
301
|
+
{ onLofChange: "lof-change" }
|
|
302
|
+
);
|
|
303
|
+
var LofResizableGroup = /* @__PURE__ */ createComponent(
|
|
304
|
+
"lof-resizable-group",
|
|
305
|
+
{ direction: "direction" },
|
|
306
|
+
{ onLofResize: "lof-resize", onLofResizeEnd: "lof-resize-end" }
|
|
307
|
+
);
|
|
308
|
+
var LofResizableHandle = /* @__PURE__ */ createComponent(
|
|
309
|
+
"lof-resizable-handle",
|
|
310
|
+
{ orientation: "orientation" },
|
|
311
|
+
{}
|
|
312
|
+
);
|
|
313
|
+
var LofResizablePanel = /* @__PURE__ */ createComponent(
|
|
314
|
+
"lof-resizable-panel",
|
|
315
|
+
{ defaultSize: "default-size", maxSize: "max-size", minSize: "min-size", panelLabel: "panel-label" },
|
|
316
|
+
{}
|
|
317
|
+
);
|
|
318
|
+
var LofSegmentedButton = /* @__PURE__ */ createComponent(
|
|
319
|
+
"lof-segmented-button",
|
|
320
|
+
{ active: "active", align: "align", disabled: "?disabled", fieldAriaLabel: "field-aria-label", options: null, size: "size" },
|
|
321
|
+
{ onChanged: "changed", onLofChange: "lof-change" }
|
|
322
|
+
);
|
|
323
|
+
var LofSelect = /* @__PURE__ */ createComponent(
|
|
324
|
+
"lof-select",
|
|
325
|
+
{ border: "border", fieldAriaLabel: "field-aria-label", fieldAriaLabelledby: "field-aria-labelledby", label: "label", labelStyle: "label-style", leftIcon: "left-icon", maxVisibleChips: "max-visible-chips", multiple: "?multiple", noSearch: "?no-search", options: null, placeholder: "placeholder", rightIcon: "right-icon", searchPlaceholder: "search-placeholder", selectAllLabel: "select-all-label", selected: "selected", selectedValues: null, size: "size", state: "state", supportingIcon: "supporting-icon", supportingText: "supporting-text" },
|
|
326
|
+
{ onChanged: "changed", onLofChange: "lof-change" }
|
|
327
|
+
);
|
|
328
|
+
var LofSignaturePad = /* @__PURE__ */ createComponent(
|
|
329
|
+
"lof-signature-pad",
|
|
330
|
+
{ disabled: "?disabled", disabledText: "disabled-text", error: "?error", errorMessage: "error-message", fieldAriaLabel: "field-aria-label", helperText: "helper-text", label: "label", mode: "mode", name: "name", placeholder: "placeholder", readonly: "?readonly", required: "?required", strokes: null, typedName: "typed-name", value: null },
|
|
331
|
+
{ onLofBegin: "lof-begin", onLofChange: "lof-change", onLofEnd: "lof-end" }
|
|
332
|
+
);
|
|
333
|
+
var LofSkeleton = /* @__PURE__ */ createComponent(
|
|
334
|
+
"lof-skeleton",
|
|
335
|
+
{ animation: "animation", height: "height", lines: "lines", loaded: "?loaded", shape: "shape", width: "width" },
|
|
336
|
+
{}
|
|
337
|
+
);
|
|
338
|
+
var LofSlider = /* @__PURE__ */ createComponent(
|
|
339
|
+
"lof-slider",
|
|
340
|
+
{ disabled: "?disabled", fieldAriaLabel: "field-aria-label", max: "max", min: "min", showBubble: "?show-bubble", showTickLabels: "?show-tick-labels", showTicks: "?show-ticks", size: "size", step: "step", track: "track", type: "type", value: "value", valueEnd: "value-end" },
|
|
341
|
+
{ onLofChange: "lof-change" }
|
|
342
|
+
);
|
|
343
|
+
var LofSnackbar = /* @__PURE__ */ createComponent(
|
|
344
|
+
"lof-snackbar",
|
|
345
|
+
{ action: "action", duration: "duration", iconClose: "?icon-close", lines: "lines", longerAction: "?longeraction", message: "message", show: "?show", tone: "tone", type: "type", variant: "variant" },
|
|
346
|
+
{ onActionClick: "actionClick", onClose: "close" }
|
|
347
|
+
);
|
|
348
|
+
var LofSplitButton = /* @__PURE__ */ createComponent(
|
|
349
|
+
"lof-split-button",
|
|
350
|
+
{ ariaLabel: "aria-label", disabled: "?disabled", icon: "icon", iconOnly: "?icon-only", items: null, label: "label", loading: "?loading", menuLabel: "menu-label", open: "?open", size: "size", tone: "tone", variant: "variant" },
|
|
351
|
+
{ onLofOpenChange: "lof-open-change", onLofSelect: "lof-select" }
|
|
352
|
+
);
|
|
353
|
+
var LofStat = /* @__PURE__ */ createComponent(
|
|
354
|
+
"lof-stat",
|
|
355
|
+
{ appearance: "appearance", change: "change", changeLabel: "change-label", label: "label", size: "size", trend: "trend", value: "value" },
|
|
356
|
+
{}
|
|
357
|
+
);
|
|
358
|
+
var LofStepper = /* @__PURE__ */ createComponent(
|
|
359
|
+
"lof-stepper",
|
|
360
|
+
{ connector: "connector", labelPlacement: "label-placement", orientation: "orientation", size: "size", steps: null, textAlign: "textalign", type: "type" },
|
|
361
|
+
{ onLofStepChange: "lof-step-change" }
|
|
362
|
+
);
|
|
363
|
+
var LofSwitch = /* @__PURE__ */ createComponent(
|
|
364
|
+
"lof-switch",
|
|
365
|
+
{ checked: "?checked", disabled: "?disabled", fieldAriaLabel: "field-aria-label", label: "label", labelPlacement: "label-placement", size: "size", type: "type", value: "value" },
|
|
366
|
+
{ onLofChange: "lof-change" }
|
|
367
|
+
);
|
|
368
|
+
var LofTab = /* @__PURE__ */ createComponent(
|
|
369
|
+
"lof-tab",
|
|
370
|
+
{ activeIndex: "active-index", iconPlacement: "icon-placement", orientation: "orientation", size: "size", tabs: null },
|
|
371
|
+
{ onLofChange: "lof-change", onLofTabChange: "lof-tab-change" }
|
|
372
|
+
);
|
|
373
|
+
var LofTabItem = /* @__PURE__ */ createComponent(
|
|
374
|
+
"lof-tab-item",
|
|
375
|
+
{ badge: "badge", badgeDot: "?badge-dot", disabled: "?disabled", icon: "icon", label: "label", value: "value" },
|
|
376
|
+
{}
|
|
377
|
+
);
|
|
378
|
+
var LofTable = /* @__PURE__ */ createComponent(
|
|
379
|
+
"lof-table",
|
|
380
|
+
{ appearance: "appearance", columns: null, density: "density", emptyText: "empty-text", fieldAriaLabel: "field-aria-label", grid: "?grid", heading: "heading", loading: "?loading", page: "page", pageSize: "page-size", pageSizeLabel: "page-size-label", pageSizeOptions: null, pageSizeSuffix: "page-size-suffix", rangeTemplate: "range-template", rowKey: "row-key", rows: null, selectable: "?selectable", selected: null, serverSide: "?server-side", sortDirection: "sort-direction", sortKey: "sort-key", stickyHeader: "?sticky-header", totalItems: "total-items" },
|
|
381
|
+
{ onLofPageChange: "lof-page-change", onLofSelectionChange: "lof-selection-change", onLofSort: "lof-sort" }
|
|
382
|
+
);
|
|
383
|
+
var LofTextfield = /* @__PURE__ */ createComponent(
|
|
384
|
+
"lof-textfield",
|
|
385
|
+
{ clickableRightIcon: "?clickable-right-icon", disabled: "?disabled", error: "?error", errorMessage: "error-message", fieldAriaLabel: "field-aria-label", fieldAriaLabelledby: "field-aria-labelledby", floatingLabel: "?floatinglabel", fullWidth: "?full-width", helperIcon: "helper-icon", helperText: "helper-text", label: "label", labelStyle: "label-style", leftIcon: "left-icon", maxLength: "maxlength", multiline: "?multiline", name: "name", placeholder: "placeholder", prefixIcon: "prefix-icon", prefixIconAriaLabel: "prefix-icon-aria-label", prefixStyle: "prefix-style", prefixText: "prefix-text", readonly: "?readonly", required: "?required", rightIcon: "right-icon", rightIconAriaLabel: "right-icon-aria-label", rows: "rows", size: "size", state: "state", suffixDivider: "?suffix-divider", suffixText: "suffix-text", supportingText: "supportingtext", type: "type", value: "value", variant: "variant" },
|
|
386
|
+
{ onLofChange: "lof-change", onLofRightIconClick: "lof-right-icon-click" }
|
|
387
|
+
);
|
|
388
|
+
var LofTimePicker = /* @__PURE__ */ createComponent(
|
|
389
|
+
"lof-time-picker",
|
|
390
|
+
{ clearable: "?clearable", disabled: "?disabled", error: "?error", errorMessage: "error-message", format: "format", fullWidth: "?full-width", helperText: "helper-text", invalid: "?invalid", label: "label", maxTime: "max-time", minTime: "min-time", minuteStep: "minute-step", name: "name", open: "?open", placeholder: "placeholder", readonly: "?readonly", required: "?required", seconds: "?seconds", size: "size", value: "value", variant: "variant" },
|
|
391
|
+
{ onLofBlur: "lof-blur", onLofChange: "lof-change", onLofFocus: "lof-focus", onLofOpenChange: "lof-open-change" }
|
|
392
|
+
);
|
|
393
|
+
var LofToast = /* @__PURE__ */ createComponent(
|
|
394
|
+
"lof-toast",
|
|
395
|
+
{ actionLabel: "action-label", dismissible: "?dismissible", duration: "duration", maxVisible: "max-visible", message: "message", position: "position", show: "?show", size: "size", tone: "tone", type: "type" },
|
|
396
|
+
{ onAction: "action", onDismissed: "dismissed" }
|
|
397
|
+
);
|
|
398
|
+
var LofTooltip = /* @__PURE__ */ createComponent(
|
|
399
|
+
"lof-tooltip",
|
|
400
|
+
{ position: "position", showTail: "?show-tail", text: "text", tone: "tone", type: "type" },
|
|
401
|
+
{}
|
|
402
|
+
);
|
|
403
|
+
var LofTree = /* @__PURE__ */ createComponent(
|
|
404
|
+
"lof-tree",
|
|
405
|
+
{ expandedValues: null, fieldAriaLabel: "field-aria-label", items: null, selected: "selected", selectedValues: null, selection: "selection", showGuides: "?show-guides" },
|
|
406
|
+
{ onLofChange: "lof-change", onLofExpandedChange: "lof-expanded-change", onLofLoadChildren: "lof-load-children" }
|
|
407
|
+
);
|
|
408
|
+
var LofUpload = /* @__PURE__ */ createComponent(
|
|
409
|
+
"lof-upload",
|
|
410
|
+
{ accept: "accept", browseLabel: "browse-label", concurrency: "concurrency", delayThreshold: "delay-threshold", disabled: "?disabled", dropzoneTitle: "dropzone-title", files: null, hint: "hint", maxFiles: "max-files", maxSize: "max-size", multiple: "?multiple", uploader: null },
|
|
411
|
+
{ onLofCancel: "lof-cancel", onLofChange: "lof-change", onLofComplete: "lof-complete", onLofFileComplete: "lof-file-complete", onLofFileError: "lof-file-error", onLofFileReplaced: "lof-file-replaced", onLofFilesAdded: "lof-files-added", onLofInvalid: "lof-invalid", onLofProgress: "lof-progress", onLofRemove: "lof-remove", onLofRetry: "lof-retry", onLofState: "lof-state", onLofUpload: "lof-upload", onLofUploadComplete: "lof-upload-complete" }
|
|
412
|
+
);
|
|
413
|
+
var LofUploadActions = /* @__PURE__ */ createComponent(
|
|
414
|
+
"lof-upload-actions",
|
|
415
|
+
{ cancelLabel: "cancel-label", for: "for", noCancel: "?no-cancel" },
|
|
416
|
+
{ onLofCancel: "lof-cancel" }
|
|
417
|
+
);
|
|
418
|
+
var WRAPPED_TAGS = [
|
|
419
|
+
"lof-accordion",
|
|
420
|
+
"lof-alert",
|
|
421
|
+
"lof-autocomplete",
|
|
422
|
+
"lof-avatar",
|
|
423
|
+
"lof-avatar-group",
|
|
424
|
+
"lof-badge",
|
|
425
|
+
"lof-breadcrumbs",
|
|
426
|
+
"lof-button",
|
|
427
|
+
"lof-calendar",
|
|
428
|
+
"lof-card",
|
|
429
|
+
"lof-card-media",
|
|
430
|
+
"lof-carousel",
|
|
431
|
+
"lof-checkbox",
|
|
432
|
+
"lof-chip",
|
|
433
|
+
"lof-container",
|
|
434
|
+
"lof-date-picker",
|
|
435
|
+
"lof-divider",
|
|
436
|
+
"lof-drawer",
|
|
437
|
+
"lof-drawer-footer",
|
|
438
|
+
"lof-empty-state",
|
|
439
|
+
"lof-image-input",
|
|
440
|
+
"lof-kbd",
|
|
441
|
+
"lof-kbd-group",
|
|
442
|
+
"lof-layout",
|
|
443
|
+
"lof-link",
|
|
444
|
+
"lof-menu",
|
|
445
|
+
"lof-menu-item",
|
|
446
|
+
"lof-menubar",
|
|
447
|
+
"lof-menubar-menu",
|
|
448
|
+
"lof-modal",
|
|
449
|
+
"lof-nav",
|
|
450
|
+
"lof-otp",
|
|
451
|
+
"lof-page-header",
|
|
452
|
+
"lof-pagination",
|
|
453
|
+
"lof-popover",
|
|
454
|
+
"lof-popover-content",
|
|
455
|
+
"lof-progress",
|
|
456
|
+
"lof-radio",
|
|
457
|
+
"lof-range-picker",
|
|
458
|
+
"lof-rating",
|
|
459
|
+
"lof-resizable-group",
|
|
460
|
+
"lof-resizable-handle",
|
|
461
|
+
"lof-resizable-panel",
|
|
462
|
+
"lof-segmented-button",
|
|
463
|
+
"lof-select",
|
|
464
|
+
"lof-signature-pad",
|
|
465
|
+
"lof-skeleton",
|
|
466
|
+
"lof-slider",
|
|
467
|
+
"lof-snackbar",
|
|
468
|
+
"lof-split-button",
|
|
469
|
+
"lof-stat",
|
|
470
|
+
"lof-stepper",
|
|
471
|
+
"lof-switch",
|
|
472
|
+
"lof-tab",
|
|
473
|
+
"lof-tab-item",
|
|
474
|
+
"lof-table",
|
|
475
|
+
"lof-textfield",
|
|
476
|
+
"lof-time-picker",
|
|
477
|
+
"lof-toast",
|
|
478
|
+
"lof-tooltip",
|
|
479
|
+
"lof-tree",
|
|
480
|
+
"lof-upload",
|
|
481
|
+
"lof-upload-actions"
|
|
482
|
+
];
|
|
483
|
+
|
|
484
|
+
// src/index.ts
|
|
485
|
+
var defined;
|
|
486
|
+
function defineElements() {
|
|
487
|
+
if (typeof window === "undefined") return Promise.resolve();
|
|
488
|
+
defined ??= import("@lofid/web").then(() => void 0);
|
|
489
|
+
return defined;
|
|
490
|
+
}
|
|
491
|
+
export {
|
|
492
|
+
LofAccordion,
|
|
493
|
+
LofAlert,
|
|
494
|
+
LofAutocomplete,
|
|
495
|
+
LofAvatar,
|
|
496
|
+
LofAvatarGroup,
|
|
497
|
+
LofBadge,
|
|
498
|
+
LofBreadcrumbs,
|
|
499
|
+
LofButton,
|
|
500
|
+
LofCalendar,
|
|
501
|
+
LofCard,
|
|
502
|
+
LofCardMedia,
|
|
503
|
+
LofCarousel,
|
|
504
|
+
LofCheckbox,
|
|
505
|
+
LofChip,
|
|
506
|
+
LofContainer,
|
|
507
|
+
LofDatePicker,
|
|
508
|
+
LofDivider,
|
|
509
|
+
LofDrawer,
|
|
510
|
+
LofDrawerFooter,
|
|
511
|
+
LofEmptyState,
|
|
512
|
+
LofImageInput,
|
|
513
|
+
LofKbd,
|
|
514
|
+
LofKbdGroup,
|
|
515
|
+
LofLayout,
|
|
516
|
+
LofLink,
|
|
517
|
+
LofMenu,
|
|
518
|
+
LofMenuItem,
|
|
519
|
+
LofMenubar,
|
|
520
|
+
LofMenubarMenu,
|
|
521
|
+
LofModal,
|
|
522
|
+
LofNav,
|
|
523
|
+
LofOtp,
|
|
524
|
+
LofPageHeader,
|
|
525
|
+
LofPagination,
|
|
526
|
+
LofPopover,
|
|
527
|
+
LofPopoverContent,
|
|
528
|
+
LofProgress,
|
|
529
|
+
LofRadio,
|
|
530
|
+
LofRangePicker,
|
|
531
|
+
LofRating,
|
|
532
|
+
LofResizableGroup,
|
|
533
|
+
LofResizableHandle,
|
|
534
|
+
LofResizablePanel,
|
|
535
|
+
LofSegmentedButton,
|
|
536
|
+
LofSelect,
|
|
537
|
+
LofSignaturePad,
|
|
538
|
+
LofSkeleton,
|
|
539
|
+
LofSlider,
|
|
540
|
+
LofSnackbar,
|
|
541
|
+
LofSplitButton,
|
|
542
|
+
LofStat,
|
|
543
|
+
LofStepper,
|
|
544
|
+
LofSwitch,
|
|
545
|
+
LofTab,
|
|
546
|
+
LofTabItem,
|
|
547
|
+
LofTable,
|
|
548
|
+
LofTextfield,
|
|
549
|
+
LofTimePicker,
|
|
550
|
+
LofToast,
|
|
551
|
+
LofTooltip,
|
|
552
|
+
LofTree,
|
|
553
|
+
LofUpload,
|
|
554
|
+
LofUploadActions,
|
|
555
|
+
WRAPPED_TAGS,
|
|
556
|
+
createComponent,
|
|
557
|
+
defineElements
|
|
558
|
+
};
|
|
559
|
+
//# sourceMappingURL=index.js.map
|