@latty-ds/react 0.10.4 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/README.md +4 -3
  2. package/dist/components/Accordion/Accordion.d.ts +4 -4
  3. package/dist/components/Alert/Alert.d.ts +8 -2
  4. package/dist/components/Breadcrumb/Breadcrumb.d.ts +2 -0
  5. package/dist/components/Button/Button.d.ts +6 -0
  6. package/dist/components/Calendar/Calendar.d.ts +14 -8
  7. package/dist/components/Checkbox/Checkbox.d.ts +6 -4
  8. package/dist/components/Chip/Chip.d.ts +4 -2
  9. package/dist/components/ColorInput/ColorInput.d.ts +6 -4
  10. package/dist/components/Combobox/Combobox.d.ts +6 -4
  11. package/dist/components/DateInput/DateInput.d.ts +6 -4
  12. package/dist/components/Datepicker/Datepicker.d.ts +8 -8
  13. package/dist/components/Dialog/Dialog.d.ts +8 -8
  14. package/dist/components/Dropdown/Dropdown.d.ts +4 -4
  15. package/dist/components/DropdownItem/DropdownItem.d.ts +4 -4
  16. package/dist/components/Image/Image.d.ts +10 -12
  17. package/dist/components/NavItem/NavItem.d.ts +8 -6
  18. package/dist/components/Pagination/Pagination.d.ts +6 -4
  19. package/dist/components/Progress/Progress.d.ts +4 -0
  20. package/dist/components/Radio/Radio.d.ts +8 -4
  21. package/dist/components/RadioGroup/RadioGroup.d.ts +4 -4
  22. package/dist/components/Select/Select.d.ts +12 -8
  23. package/dist/components/SidePanel/SidePanel.d.ts +2 -0
  24. package/dist/components/Slider/Slider.d.ts +8 -8
  25. package/dist/components/Snackbar/Snackbar.d.ts +8 -6
  26. package/dist/components/Switch/Switch.d.ts +6 -4
  27. package/dist/components/Tab/Tab.d.ts +0 -2
  28. package/dist/components/TabGroup/TabGroup.d.ts +4 -4
  29. package/dist/components/Table/Table.d.ts +4 -2
  30. package/dist/components/Textfield/Textfield.d.ts +14 -8
  31. package/dist/index.cjs +162 -103
  32. package/dist/index.js +185 -126
  33. package/package.json +4 -4
package/dist/index.cjs CHANGED
@@ -78,7 +78,7 @@ var Accordion = (0, import_react.forwardRef)(function Accordion2({ onToggle, chi
78
78
  (0, import_react.useEffect)(() => {
79
79
  const el = innerRef.current;
80
80
  if (!el || !onToggle) return;
81
- const h = (ev) => onToggle(ev.detail);
81
+ const h = (ev) => onToggle(ev);
82
82
  el.addEventListener("toggle", h);
83
83
  return () => el.removeEventListener("toggle", h);
84
84
  }, [onToggle]);
@@ -89,16 +89,21 @@ Accordion.displayName = "Accordion";
89
89
  // src/components/Alert/Alert.tsx
90
90
  var import_react2 = require("react");
91
91
  var import_jsx_runtime2 = require("react/jsx-runtime");
92
- var Alert = (0, import_react2.forwardRef)(function Alert2({ onClose, children, ...props }, forwardedRef) {
92
+ var Alert = (0, import_react2.forwardRef)(function Alert2({ onClose, labels, children, ...props }, forwardedRef) {
93
93
  const innerRef = (0, import_react2.useRef)(null);
94
94
  (0, import_react2.useImperativeHandle)(forwardedRef, () => innerRef.current);
95
95
  (0, import_react2.useEffect)(() => {
96
96
  const el = innerRef.current;
97
97
  if (!el || !onClose) return;
98
- const h = () => onClose();
98
+ const h = (ev) => onClose(ev);
99
99
  el.addEventListener("close", h);
100
100
  return () => el.removeEventListener("close", h);
101
101
  }, [onClose]);
102
+ (0, import_react2.useLayoutEffect)(() => {
103
+ const el = innerRef.current;
104
+ if (!el) return;
105
+ if (labels !== void 0) el.labels = labels;
106
+ }, [labels]);
102
107
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("lt-alert", { ref: innerRef, ...props, children });
103
108
  });
104
109
  Alert.displayName = "Alert";
@@ -126,9 +131,14 @@ Badge.displayName = "Badge";
126
131
  // src/components/Breadcrumb/Breadcrumb.tsx
127
132
  var import_react5 = require("react");
128
133
  var import_jsx_runtime5 = require("react/jsx-runtime");
129
- var Breadcrumb = (0, import_react5.forwardRef)(function Breadcrumb2({ children, ...props }, forwardedRef) {
134
+ var Breadcrumb = (0, import_react5.forwardRef)(function Breadcrumb2({ labels, children, ...props }, forwardedRef) {
130
135
  const innerRef = (0, import_react5.useRef)(null);
131
136
  (0, import_react5.useImperativeHandle)(forwardedRef, () => innerRef.current);
137
+ (0, import_react5.useLayoutEffect)(() => {
138
+ const el = innerRef.current;
139
+ if (!el) return;
140
+ if (labels !== void 0) el.labels = labels;
141
+ }, [labels]);
132
142
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("lt-breadcrumb", { ref: innerRef, ...props, children });
133
143
  });
134
144
  Breadcrumb.displayName = "Breadcrumb";
@@ -156,23 +166,30 @@ Button.displayName = "Button";
156
166
  // src/components/Calendar/Calendar.tsx
157
167
  var import_react8 = require("react");
158
168
  var import_jsx_runtime8 = require("react/jsx-runtime");
159
- var Calendar = (0, import_react8.forwardRef)(function Calendar2({ onChange, onMonthChange, children, ...props }, forwardedRef) {
169
+ var Calendar = (0, import_react8.forwardRef)(function Calendar2({ onChange, onMonthChange, weekStart, disabledDates, labels, children, ...props }, forwardedRef) {
160
170
  const innerRef = (0, import_react8.useRef)(null);
161
171
  (0, import_react8.useImperativeHandle)(forwardedRef, () => innerRef.current);
162
172
  (0, import_react8.useEffect)(() => {
163
173
  const el = innerRef.current;
164
174
  if (!el || !onChange) return;
165
- const h = (ev) => onChange(ev.detail);
175
+ const h = (ev) => onChange(ev);
166
176
  el.addEventListener("change", h);
167
177
  return () => el.removeEventListener("change", h);
168
178
  }, [onChange]);
169
179
  (0, import_react8.useEffect)(() => {
170
180
  const el = innerRef.current;
171
181
  if (!el || !onMonthChange) return;
172
- const h = (ev) => onMonthChange(ev.detail);
173
- el.addEventListener("month-change", h);
174
- return () => el.removeEventListener("month-change", h);
182
+ const h = (ev) => onMonthChange(ev);
183
+ el.addEventListener("monthchange", h);
184
+ return () => el.removeEventListener("monthchange", h);
175
185
  }, [onMonthChange]);
186
+ (0, import_react8.useLayoutEffect)(() => {
187
+ const el = innerRef.current;
188
+ if (!el) return;
189
+ if (weekStart !== void 0) el.weekStart = weekStart;
190
+ if (disabledDates !== void 0) el.disabledDates = disabledDates;
191
+ if (labels !== void 0) el.labels = labels;
192
+ }, [weekStart, disabledDates, labels]);
176
193
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("lt-calendar", { ref: innerRef, ...props, children });
177
194
  });
178
195
  Calendar.displayName = "Calendar";
@@ -180,16 +197,21 @@ Calendar.displayName = "Calendar";
180
197
  // src/components/Checkbox/Checkbox.tsx
181
198
  var import_react9 = require("react");
182
199
  var import_jsx_runtime9 = require("react/jsx-runtime");
183
- var Checkbox = (0, import_react9.forwardRef)(function Checkbox2({ onChange, children, ...props }, forwardedRef) {
200
+ var Checkbox = (0, import_react9.forwardRef)(function Checkbox2({ onChange, labels, children, ...props }, forwardedRef) {
184
201
  const innerRef = (0, import_react9.useRef)(null);
185
202
  (0, import_react9.useImperativeHandle)(forwardedRef, () => innerRef.current);
186
203
  (0, import_react9.useEffect)(() => {
187
204
  const el = innerRef.current;
188
205
  if (!el || !onChange) return;
189
- const h = (ev) => onChange(ev.detail);
206
+ const h = (ev) => onChange(ev);
190
207
  el.addEventListener("change", h);
191
208
  return () => el.removeEventListener("change", h);
192
209
  }, [onChange]);
210
+ (0, import_react9.useLayoutEffect)(() => {
211
+ const el = innerRef.current;
212
+ if (!el) return;
213
+ if (labels !== void 0) el.labels = labels;
214
+ }, [labels]);
193
215
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("lt-checkbox", { ref: innerRef, ...props, children });
194
216
  });
195
217
  Checkbox.displayName = "Checkbox";
@@ -197,16 +219,21 @@ Checkbox.displayName = "Checkbox";
197
219
  // src/components/Chip/Chip.tsx
198
220
  var import_react10 = require("react");
199
221
  var import_jsx_runtime10 = require("react/jsx-runtime");
200
- var Chip = (0, import_react10.forwardRef)(function Chip2({ onDelete, children, ...props }, forwardedRef) {
222
+ var Chip = (0, import_react10.forwardRef)(function Chip2({ onDelete, labels, children, ...props }, forwardedRef) {
201
223
  const innerRef = (0, import_react10.useRef)(null);
202
224
  (0, import_react10.useImperativeHandle)(forwardedRef, () => innerRef.current);
203
225
  (0, import_react10.useEffect)(() => {
204
226
  const el = innerRef.current;
205
227
  if (!el || !onDelete) return;
206
- const h = () => onDelete();
228
+ const h = (ev) => onDelete(ev);
207
229
  el.addEventListener("delete", h);
208
230
  return () => el.removeEventListener("delete", h);
209
231
  }, [onDelete]);
232
+ (0, import_react10.useLayoutEffect)(() => {
233
+ const el = innerRef.current;
234
+ if (!el) return;
235
+ if (labels !== void 0) el.labels = labels;
236
+ }, [labels]);
210
237
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("lt-chip", { ref: innerRef, ...props, children });
211
238
  });
212
239
  Chip.displayName = "Chip";
@@ -214,16 +241,21 @@ Chip.displayName = "Chip";
214
241
  // src/components/ColorInput/ColorInput.tsx
215
242
  var import_react11 = require("react");
216
243
  var import_jsx_runtime11 = require("react/jsx-runtime");
217
- var ColorInput = (0, import_react11.forwardRef)(function ColorInput2({ onChange, children, ...props }, forwardedRef) {
244
+ var ColorInput = (0, import_react11.forwardRef)(function ColorInput2({ onChange, labels, children, ...props }, forwardedRef) {
218
245
  const innerRef = (0, import_react11.useRef)(null);
219
246
  (0, import_react11.useImperativeHandle)(forwardedRef, () => innerRef.current);
220
247
  (0, import_react11.useEffect)(() => {
221
248
  const el = innerRef.current;
222
249
  if (!el || !onChange) return;
223
- const h = (ev) => onChange(ev.detail);
250
+ const h = (ev) => onChange(ev);
224
251
  el.addEventListener("change", h);
225
252
  return () => el.removeEventListener("change", h);
226
253
  }, [onChange]);
254
+ (0, import_react11.useLayoutEffect)(() => {
255
+ const el = innerRef.current;
256
+ if (!el) return;
257
+ if (labels !== void 0) el.labels = labels;
258
+ }, [labels]);
227
259
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("lt-color-input", { ref: innerRef, ...props, children });
228
260
  });
229
261
  ColorInput.displayName = "ColorInput";
@@ -231,16 +263,22 @@ ColorInput.displayName = "ColorInput";
231
263
  // src/components/Combobox/Combobox.tsx
232
264
  var import_react12 = require("react");
233
265
  var import_jsx_runtime12 = require("react/jsx-runtime");
234
- var Combobox = (0, import_react12.forwardRef)(function Combobox2({ onChange, children, ...props }, forwardedRef) {
266
+ var Combobox = (0, import_react12.forwardRef)(function Combobox2({ onChange, options, labels, children, ...props }, forwardedRef) {
235
267
  const innerRef = (0, import_react12.useRef)(null);
236
268
  (0, import_react12.useImperativeHandle)(forwardedRef, () => innerRef.current);
237
269
  (0, import_react12.useEffect)(() => {
238
270
  const el = innerRef.current;
239
271
  if (!el || !onChange) return;
240
- const h = (ev) => onChange(ev.detail);
272
+ const h = (ev) => onChange(ev);
241
273
  el.addEventListener("change", h);
242
274
  return () => el.removeEventListener("change", h);
243
275
  }, [onChange]);
276
+ (0, import_react12.useLayoutEffect)(() => {
277
+ const el = innerRef.current;
278
+ if (!el) return;
279
+ if (options !== void 0) el.options = options;
280
+ if (labels !== void 0) el.labels = labels;
281
+ }, [options, labels]);
244
282
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("lt-combobox", { ref: innerRef, ...props, children });
245
283
  });
246
284
  Combobox.displayName = "Combobox";
@@ -248,16 +286,23 @@ Combobox.displayName = "Combobox";
248
286
  // src/components/DateInput/DateInput.tsx
249
287
  var import_react13 = require("react");
250
288
  var import_jsx_runtime13 = require("react/jsx-runtime");
251
- var DateInput = (0, import_react13.forwardRef)(function DateInput2({ onChange, children, ...props }, forwardedRef) {
289
+ var DateInput = (0, import_react13.forwardRef)(function DateInput2({ onChange, weekStart, disabledDates, labels, children, ...props }, forwardedRef) {
252
290
  const innerRef = (0, import_react13.useRef)(null);
253
291
  (0, import_react13.useImperativeHandle)(forwardedRef, () => innerRef.current);
254
292
  (0, import_react13.useEffect)(() => {
255
293
  const el = innerRef.current;
256
294
  if (!el || !onChange) return;
257
- const h = (ev) => onChange(ev.detail);
295
+ const h = (ev) => onChange(ev);
258
296
  el.addEventListener("change", h);
259
297
  return () => el.removeEventListener("change", h);
260
298
  }, [onChange]);
299
+ (0, import_react13.useLayoutEffect)(() => {
300
+ const el = innerRef.current;
301
+ if (!el) return;
302
+ if (weekStart !== void 0) el.weekStart = weekStart;
303
+ if (disabledDates !== void 0) el.disabledDates = disabledDates;
304
+ if (labels !== void 0) el.labels = labels;
305
+ }, [weekStart, disabledDates, labels]);
261
306
  return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("lt-date-input", { ref: innerRef, ...props, children });
262
307
  });
263
308
  DateInput.displayName = "DateInput";
@@ -271,14 +316,14 @@ var Datepicker = (0, import_react14.forwardRef)(function Datepicker2({ onChange,
271
316
  (0, import_react14.useEffect)(() => {
272
317
  const el = innerRef.current;
273
318
  if (!el || !onChange) return;
274
- const h = (ev) => onChange(ev.detail);
319
+ const h = (ev) => onChange(ev);
275
320
  el.addEventListener("change", h);
276
321
  return () => el.removeEventListener("change", h);
277
322
  }, [onChange]);
278
323
  (0, import_react14.useEffect)(() => {
279
324
  const el = innerRef.current;
280
325
  if (!el || !onInput) return;
281
- const h = (ev) => onInput(ev.detail);
326
+ const h = (ev) => onInput(ev);
282
327
  el.addEventListener("input", h);
283
328
  return () => el.removeEventListener("input", h);
284
329
  }, [onInput]);
@@ -289,37 +334,28 @@ Datepicker.displayName = "Datepicker";
289
334
  // src/components/Dialog/Dialog.tsx
290
335
  var import_react15 = require("react");
291
336
  var import_jsx_runtime15 = require("react/jsx-runtime");
292
- var Dialog = (0, import_react15.forwardRef)(function Dialog2({ onDialogOpen, onClose, onDialogClose, onOpen, children, ...props }, forwardedRef) {
337
+ var Dialog = (0, import_react15.forwardRef)(function Dialog2({ onOpen, onClose, labels, children, ...props }, forwardedRef) {
293
338
  const innerRef = (0, import_react15.useRef)(null);
294
339
  (0, import_react15.useImperativeHandle)(forwardedRef, () => innerRef.current);
295
340
  (0, import_react15.useEffect)(() => {
296
341
  const el = innerRef.current;
297
- if (!el || !onDialogOpen) return;
298
- const h = () => onDialogOpen();
299
- el.addEventListener("dialog-open", h);
300
- return () => el.removeEventListener("dialog-open", h);
301
- }, [onDialogOpen]);
342
+ if (!el || !onOpen) return;
343
+ const h = (ev) => onOpen(ev);
344
+ el.addEventListener("open", h);
345
+ return () => el.removeEventListener("open", h);
346
+ }, [onOpen]);
302
347
  (0, import_react15.useEffect)(() => {
303
348
  const el = innerRef.current;
304
349
  if (!el || !onClose) return;
305
- const h = () => onClose();
350
+ const h = (ev) => onClose(ev);
306
351
  el.addEventListener("close", h);
307
352
  return () => el.removeEventListener("close", h);
308
353
  }, [onClose]);
309
- (0, import_react15.useEffect)(() => {
310
- const el = innerRef.current;
311
- if (!el || !onDialogClose) return;
312
- const h = () => onDialogClose();
313
- el.addEventListener("dialog-close", h);
314
- return () => el.removeEventListener("dialog-close", h);
315
- }, [onDialogClose]);
316
- (0, import_react15.useEffect)(() => {
354
+ (0, import_react15.useLayoutEffect)(() => {
317
355
  const el = innerRef.current;
318
- if (!el || !onOpen) return;
319
- const h = () => onOpen();
320
- el.addEventListener("open", h);
321
- return () => el.removeEventListener("open", h);
322
- }, [onOpen]);
356
+ if (!el) return;
357
+ if (labels !== void 0) el.labels = labels;
358
+ }, [labels]);
323
359
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("lt-dialog", { ref: innerRef, ...props, children });
324
360
  });
325
361
  Dialog.displayName = "Dialog";
@@ -343,14 +379,14 @@ var Dropdown = (0, import_react17.forwardRef)(function Dropdown2({ onOpen, onClo
343
379
  (0, import_react17.useEffect)(() => {
344
380
  const el = innerRef.current;
345
381
  if (!el || !onOpen) return;
346
- const h = () => onOpen();
382
+ const h = (ev) => onOpen(ev);
347
383
  el.addEventListener("open", h);
348
384
  return () => el.removeEventListener("open", h);
349
385
  }, [onOpen]);
350
386
  (0, import_react17.useEffect)(() => {
351
387
  const el = innerRef.current;
352
388
  if (!el || !onClose) return;
353
- const h = () => onClose();
389
+ const h = (ev) => onClose(ev);
354
390
  el.addEventListener("close", h);
355
391
  return () => el.removeEventListener("close", h);
356
392
  }, [onClose]);
@@ -367,7 +403,7 @@ var DropdownItem = (0, import_react18.forwardRef)(function DropdownItem2({ onSel
367
403
  (0, import_react18.useEffect)(() => {
368
404
  const el = innerRef.current;
369
405
  if (!el || !onSelect) return;
370
- const h = () => onSelect();
406
+ const h = (ev) => onSelect(ev);
371
407
  el.addEventListener("select", h);
372
408
  return () => el.removeEventListener("select", h);
373
409
  }, [onSelect]);
@@ -403,29 +439,22 @@ IconButton.displayName = "IconButton";
403
439
  // src/components/Image/Image.tsx
404
440
  var import_react21 = require("react");
405
441
  var import_jsx_runtime21 = require("react/jsx-runtime");
406
- var Image = (0, import_react21.forwardRef)(function Image2({ onName, onLoad, onError, children, ...props }, forwardedRef) {
442
+ var Image = (0, import_react21.forwardRef)(function Image2({ onLoad, onError, children, ...props }, forwardedRef) {
407
443
  const innerRef = (0, import_react21.useRef)(null);
408
444
  (0, import_react21.useImperativeHandle)(forwardedRef, () => innerRef.current);
409
- (0, import_react21.useEffect)(() => {
410
- const el = innerRef.current;
411
- if (!el || !onName) return;
412
- const h = () => onName();
413
- el.addEventListener("name", h);
414
- return () => el.removeEventListener("name", h);
415
- }, [onName]);
416
445
  (0, import_react21.useEffect)(() => {
417
446
  const el = innerRef.current;
418
447
  if (!el || !onLoad) return;
419
- const h = (ev) => onLoad(ev.detail);
420
- el.addEventListener("lt-load", h);
421
- return () => el.removeEventListener("lt-load", h);
448
+ const h = (ev) => onLoad(ev);
449
+ el.addEventListener("load", h);
450
+ return () => el.removeEventListener("load", h);
422
451
  }, [onLoad]);
423
452
  (0, import_react21.useEffect)(() => {
424
453
  const el = innerRef.current;
425
454
  if (!el || !onError) return;
426
- const h = (ev) => onError(ev.detail);
427
- el.addEventListener("lt-error", h);
428
- return () => el.removeEventListener("lt-error", h);
455
+ const h = (ev) => onError(ev);
456
+ el.addEventListener("error", h);
457
+ return () => el.removeEventListener("error", h);
429
458
  }, [onError]);
430
459
  return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("lt-image", { ref: innerRef, ...props, children });
431
460
  });
@@ -474,23 +503,16 @@ Nav.displayName = "Nav";
474
503
  // src/components/NavItem/NavItem.tsx
475
504
  var import_react26 = require("react");
476
505
  var import_jsx_runtime26 = require("react/jsx-runtime");
477
- var NavItem = (0, import_react26.forwardRef)(function NavItem2({ onNavItemClick, onNavCollapse, iconStart, children, ...props }, forwardedRef) {
506
+ var NavItem = (0, import_react26.forwardRef)(function NavItem2({ onToggle, iconStart, children, ...props }, forwardedRef) {
478
507
  const innerRef = (0, import_react26.useRef)(null);
479
508
  (0, import_react26.useImperativeHandle)(forwardedRef, () => innerRef.current);
480
509
  (0, import_react26.useEffect)(() => {
481
510
  const el = innerRef.current;
482
- if (!el || !onNavItemClick) return;
483
- const h = (ev) => onNavItemClick(ev);
484
- el.addEventListener("nav-item-click", h);
485
- return () => el.removeEventListener("nav-item-click", h);
486
- }, [onNavItemClick]);
487
- (0, import_react26.useEffect)(() => {
488
- const el = innerRef.current;
489
- if (!el || !onNavCollapse) return;
490
- const h = (ev) => onNavCollapse(ev);
491
- el.addEventListener("nav-collapse", h);
492
- return () => el.removeEventListener("nav-collapse", h);
493
- }, [onNavCollapse]);
511
+ if (!el || !onToggle) return;
512
+ const h = (ev) => onToggle(ev);
513
+ el.addEventListener("toggle", h);
514
+ return () => el.removeEventListener("toggle", h);
515
+ }, [onToggle]);
494
516
  (0, import_react26.useEffect)(() => {
495
517
  const el = innerRef.current;
496
518
  if (!el) return;
@@ -504,16 +526,21 @@ NavItem.displayName = "NavItem";
504
526
  // src/components/Pagination/Pagination.tsx
505
527
  var import_react27 = require("react");
506
528
  var import_jsx_runtime27 = require("react/jsx-runtime");
507
- var Pagination = (0, import_react27.forwardRef)(function Pagination2({ onChange, children, ...props }, forwardedRef) {
529
+ var Pagination = (0, import_react27.forwardRef)(function Pagination2({ onChange, labels, children, ...props }, forwardedRef) {
508
530
  const innerRef = (0, import_react27.useRef)(null);
509
531
  (0, import_react27.useImperativeHandle)(forwardedRef, () => innerRef.current);
510
532
  (0, import_react27.useEffect)(() => {
511
533
  const el = innerRef.current;
512
534
  if (!el || !onChange) return;
513
- const h = (ev) => onChange(ev.detail);
535
+ const h = (ev) => onChange(ev);
514
536
  el.addEventListener("change", h);
515
537
  return () => el.removeEventListener("change", h);
516
538
  }, [onChange]);
539
+ (0, import_react27.useLayoutEffect)(() => {
540
+ const el = innerRef.current;
541
+ if (!el) return;
542
+ if (labels !== void 0) el.labels = labels;
543
+ }, [labels]);
517
544
  return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("lt-pagination", { ref: innerRef, ...props, children });
518
545
  });
519
546
  Pagination.displayName = "Pagination";
@@ -531,16 +558,21 @@ Progress.displayName = "Progress";
531
558
  // src/components/Radio/Radio.tsx
532
559
  var import_react29 = require("react");
533
560
  var import_jsx_runtime29 = require("react/jsx-runtime");
534
- var Radio = (0, import_react29.forwardRef)(function Radio2({ onChange, children, ...props }, forwardedRef) {
561
+ var Radio = (0, import_react29.forwardRef)(function Radio2({ onChange, labels, children, ...props }, forwardedRef) {
535
562
  const innerRef = (0, import_react29.useRef)(null);
536
563
  (0, import_react29.useImperativeHandle)(forwardedRef, () => innerRef.current);
537
564
  (0, import_react29.useEffect)(() => {
538
565
  const el = innerRef.current;
539
566
  if (!el || !onChange) return;
540
- const h = (ev) => onChange(ev.detail);
567
+ const h = (ev) => onChange(ev);
541
568
  el.addEventListener("change", h);
542
569
  return () => el.removeEventListener("change", h);
543
570
  }, [onChange]);
571
+ (0, import_react29.useLayoutEffect)(() => {
572
+ const el = innerRef.current;
573
+ if (!el) return;
574
+ if (labels !== void 0) el.labels = labels;
575
+ }, [labels]);
544
576
  return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("lt-radio", { ref: innerRef, ...props, children });
545
577
  });
546
578
  Radio.displayName = "Radio";
@@ -554,7 +586,7 @@ var RadioGroup = (0, import_react30.forwardRef)(function RadioGroup2({ onChange,
554
586
  (0, import_react30.useEffect)(() => {
555
587
  const el = innerRef.current;
556
588
  if (!el || !onChange) return;
557
- const h = (ev) => onChange(ev.detail);
589
+ const h = (ev) => onChange(ev);
558
590
  el.addEventListener("change", h);
559
591
  return () => el.removeEventListener("change", h);
560
592
  }, [onChange]);
@@ -565,16 +597,23 @@ RadioGroup.displayName = "RadioGroup";
565
597
  // src/components/Select/Select.tsx
566
598
  var import_react31 = require("react");
567
599
  var import_jsx_runtime31 = require("react/jsx-runtime");
568
- var Select = (0, import_react31.forwardRef)(function Select2({ onChange, children, ...props }, forwardedRef) {
600
+ var Select = (0, import_react31.forwardRef)(function Select2({ onChange, value, options, labels, children, ...props }, forwardedRef) {
569
601
  const innerRef = (0, import_react31.useRef)(null);
570
602
  (0, import_react31.useImperativeHandle)(forwardedRef, () => innerRef.current);
571
603
  (0, import_react31.useEffect)(() => {
572
604
  const el = innerRef.current;
573
605
  if (!el || !onChange) return;
574
- const h = (ev) => onChange(ev.detail);
606
+ const h = (ev) => onChange(ev);
575
607
  el.addEventListener("change", h);
576
608
  return () => el.removeEventListener("change", h);
577
609
  }, [onChange]);
610
+ (0, import_react31.useLayoutEffect)(() => {
611
+ const el = innerRef.current;
612
+ if (!el) return;
613
+ if (value !== void 0) el.value = value;
614
+ if (options !== void 0) el.options = options;
615
+ if (labels !== void 0) el.labels = labels;
616
+ }, [value, options, labels]);
578
617
  return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("lt-select", { ref: innerRef, ...props, children });
579
618
  });
580
619
  Select.displayName = "Select";
@@ -582,7 +621,7 @@ Select.displayName = "Select";
582
621
  // src/components/SidePanel/SidePanel.tsx
583
622
  var import_react32 = require("react");
584
623
  var import_jsx_runtime32 = require("react/jsx-runtime");
585
- var SidePanel = (0, import_react32.forwardRef)(function SidePanel2({ onClose, noCloseButton, children, ...props }, forwardedRef) {
624
+ var SidePanel = (0, import_react32.forwardRef)(function SidePanel2({ onClose, noCloseButton, labels, children, ...props }, forwardedRef) {
586
625
  const innerRef = (0, import_react32.useRef)(null);
587
626
  (0, import_react32.useImperativeHandle)(forwardedRef, () => innerRef.current);
588
627
  (0, import_react32.useEffect)(() => {
@@ -598,6 +637,11 @@ var SidePanel = (0, import_react32.forwardRef)(function SidePanel2({ onClose, no
598
637
  if (noCloseButton) el.setAttribute("no-close-button", "");
599
638
  else el.removeAttribute("no-close-button");
600
639
  }, [noCloseButton]);
640
+ (0, import_react32.useLayoutEffect)(() => {
641
+ const el = innerRef.current;
642
+ if (!el) return;
643
+ if (labels !== void 0) el.labels = labels;
644
+ }, [labels]);
601
645
  return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("lt-sidepanel", { ref: innerRef, ...props, children });
602
646
  });
603
647
  SidePanel.displayName = "SidePanel";
@@ -621,14 +665,14 @@ var Slider = (0, import_react34.forwardRef)(function Slider2({ onInput, onChange
621
665
  (0, import_react34.useEffect)(() => {
622
666
  const el = innerRef.current;
623
667
  if (!el || !onInput) return;
624
- const h = (ev) => onInput(ev.detail);
668
+ const h = (ev) => onInput(ev);
625
669
  el.addEventListener("input", h);
626
670
  return () => el.removeEventListener("input", h);
627
671
  }, [onInput]);
628
672
  (0, import_react34.useEffect)(() => {
629
673
  const el = innerRef.current;
630
674
  if (!el || !onChange) return;
631
- const h = (ev) => onChange(ev.detail);
675
+ const h = (ev) => onChange(ev);
632
676
  el.addEventListener("change", h);
633
677
  return () => el.removeEventListener("change", h);
634
678
  }, [onChange]);
@@ -639,30 +683,35 @@ Slider.displayName = "Slider";
639
683
  // src/components/Snackbar/Snackbar.tsx
640
684
  var import_react35 = require("react");
641
685
  var import_jsx_runtime35 = require("react/jsx-runtime");
642
- var Snackbar = (0, import_react35.forwardRef)(function Snackbar2({ onShow, onHide, onAction, children, ...props }, forwardedRef) {
686
+ var Snackbar = (0, import_react35.forwardRef)(function Snackbar2({ onShow, onHide, onAction, labels, children, ...props }, forwardedRef) {
643
687
  const innerRef = (0, import_react35.useRef)(null);
644
688
  (0, import_react35.useImperativeHandle)(forwardedRef, () => innerRef.current);
645
689
  (0, import_react35.useEffect)(() => {
646
690
  const el = innerRef.current;
647
691
  if (!el || !onShow) return;
648
- const h = () => onShow();
692
+ const h = (ev) => onShow(ev);
649
693
  el.addEventListener("show", h);
650
694
  return () => el.removeEventListener("show", h);
651
695
  }, [onShow]);
652
696
  (0, import_react35.useEffect)(() => {
653
697
  const el = innerRef.current;
654
698
  if (!el || !onHide) return;
655
- const h = () => onHide();
699
+ const h = (ev) => onHide(ev);
656
700
  el.addEventListener("hide", h);
657
701
  return () => el.removeEventListener("hide", h);
658
702
  }, [onHide]);
659
703
  (0, import_react35.useEffect)(() => {
660
704
  const el = innerRef.current;
661
705
  if (!el || !onAction) return;
662
- const h = () => onAction();
706
+ const h = (ev) => onAction(ev);
663
707
  el.addEventListener("action", h);
664
708
  return () => el.removeEventListener("action", h);
665
709
  }, [onAction]);
710
+ (0, import_react35.useLayoutEffect)(() => {
711
+ const el = innerRef.current;
712
+ if (!el) return;
713
+ if (labels !== void 0) el.labels = labels;
714
+ }, [labels]);
666
715
  return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("lt-snackbar", { ref: innerRef, ...props, children });
667
716
  });
668
717
  Snackbar.displayName = "Snackbar";
@@ -690,16 +739,21 @@ Surface.displayName = "Surface";
690
739
  // src/components/Switch/Switch.tsx
691
740
  var import_react38 = require("react");
692
741
  var import_jsx_runtime38 = require("react/jsx-runtime");
693
- var Switch = (0, import_react38.forwardRef)(function Switch2({ onChange, children, ...props }, forwardedRef) {
742
+ var Switch = (0, import_react38.forwardRef)(function Switch2({ onChange, labels, children, ...props }, forwardedRef) {
694
743
  const innerRef = (0, import_react38.useRef)(null);
695
744
  (0, import_react38.useImperativeHandle)(forwardedRef, () => innerRef.current);
696
745
  (0, import_react38.useEffect)(() => {
697
746
  const el = innerRef.current;
698
747
  if (!el || !onChange) return;
699
- const h = (ev) => onChange(ev.detail);
748
+ const h = (ev) => onChange(ev);
700
749
  el.addEventListener("change", h);
701
750
  return () => el.removeEventListener("change", h);
702
751
  }, [onChange]);
752
+ (0, import_react38.useLayoutEffect)(() => {
753
+ const el = innerRef.current;
754
+ if (!el) return;
755
+ if (labels !== void 0) el.labels = labels;
756
+ }, [labels]);
703
757
  return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("lt-switch", { ref: innerRef, ...props, children });
704
758
  });
705
759
  Switch.displayName = "Switch";
@@ -707,16 +761,9 @@ Switch.displayName = "Switch";
707
761
  // src/components/Tab/Tab.tsx
708
762
  var import_react39 = require("react");
709
763
  var import_jsx_runtime39 = require("react/jsx-runtime");
710
- var Tab = (0, import_react39.forwardRef)(function Tab2({ onTabClick, children, ...props }, forwardedRef) {
764
+ var Tab = (0, import_react39.forwardRef)(function Tab2({ children, ...props }, forwardedRef) {
711
765
  const innerRef = (0, import_react39.useRef)(null);
712
766
  (0, import_react39.useImperativeHandle)(forwardedRef, () => innerRef.current);
713
- (0, import_react39.useEffect)(() => {
714
- const el = innerRef.current;
715
- if (!el || !onTabClick) return;
716
- const h = (ev) => onTabClick(ev);
717
- el.addEventListener("tab-click", h);
718
- return () => el.removeEventListener("tab-click", h);
719
- }, [onTabClick]);
720
767
  return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("lt-tab", { ref: innerRef, ...props, children });
721
768
  });
722
769
  Tab.displayName = "Tab";
@@ -730,7 +777,7 @@ var TabGroup = (0, import_react40.forwardRef)(function TabGroup2({ onChange, chi
730
777
  (0, import_react40.useEffect)(() => {
731
778
  const el = innerRef.current;
732
779
  if (!el || !onChange) return;
733
- const h = (ev) => onChange(ev.detail);
780
+ const h = (ev) => onChange(ev);
734
781
  el.addEventListener("change", h);
735
782
  return () => el.removeEventListener("change", h);
736
783
  }, [onChange]);
@@ -741,16 +788,23 @@ TabGroup.displayName = "TabGroup";
741
788
  // src/components/Table/Table.tsx
742
789
  var import_react41 = require("react");
743
790
  var import_jsx_runtime41 = require("react/jsx-runtime");
744
- var Table = (0, import_react41.forwardRef)(function Table2({ onSortChange, children, ...props }, forwardedRef) {
791
+ var Table = (0, import_react41.forwardRef)(function Table2({ onSortChange, columns, data, sort, children, ...props }, forwardedRef) {
745
792
  const innerRef = (0, import_react41.useRef)(null);
746
793
  (0, import_react41.useImperativeHandle)(forwardedRef, () => innerRef.current);
747
794
  (0, import_react41.useEffect)(() => {
748
795
  const el = innerRef.current;
749
796
  if (!el || !onSortChange) return;
750
- const h = () => onSortChange();
751
- el.addEventListener("sort-change", h);
752
- return () => el.removeEventListener("sort-change", h);
797
+ const h = (ev) => onSortChange(ev);
798
+ el.addEventListener("sortchange", h);
799
+ return () => el.removeEventListener("sortchange", h);
753
800
  }, [onSortChange]);
801
+ (0, import_react41.useLayoutEffect)(() => {
802
+ const el = innerRef.current;
803
+ if (!el) return;
804
+ if (columns !== void 0) el.columns = columns;
805
+ if (data !== void 0) el.data = data;
806
+ if (sort !== void 0) el.sort = sort;
807
+ }, [columns, data, sort]);
754
808
  return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("lt-table", { ref: innerRef, ...props, children });
755
809
  });
756
810
  Table.displayName = "Table";
@@ -778,23 +832,28 @@ Text.displayName = "Text";
778
832
  // src/components/Textfield/Textfield.tsx
779
833
  var import_react44 = require("react");
780
834
  var import_jsx_runtime44 = require("react/jsx-runtime");
781
- var Textfield = (0, import_react44.forwardRef)(function Textfield2({ onInput, onChange, children, ...props }, forwardedRef) {
835
+ var Textfield = (0, import_react44.forwardRef)(function Textfield2({ onInput, onChange, labels, children, ...props }, forwardedRef) {
782
836
  const innerRef = (0, import_react44.useRef)(null);
783
837
  (0, import_react44.useImperativeHandle)(forwardedRef, () => innerRef.current);
784
838
  (0, import_react44.useEffect)(() => {
785
839
  const el = innerRef.current;
786
840
  if (!el || !onInput) return;
787
- const h = (ev) => onInput(ev.detail);
841
+ const h = (ev) => onInput(ev);
788
842
  el.addEventListener("input", h);
789
843
  return () => el.removeEventListener("input", h);
790
844
  }, [onInput]);
791
845
  (0, import_react44.useEffect)(() => {
792
846
  const el = innerRef.current;
793
847
  if (!el || !onChange) return;
794
- const h = (ev) => onChange(ev.detail);
848
+ const h = (ev) => onChange(ev);
795
849
  el.addEventListener("change", h);
796
850
  return () => el.removeEventListener("change", h);
797
851
  }, [onChange]);
852
+ (0, import_react44.useLayoutEffect)(() => {
853
+ const el = innerRef.current;
854
+ if (!el) return;
855
+ if (labels !== void 0) el.labels = labels;
856
+ }, [labels]);
798
857
  return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("lt-textfield", { ref: innerRef, ...props, children });
799
858
  });
800
859
  Textfield.displayName = "Textfield";