@sbb-esta/lyne-react 2.1.0 → 2.3.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/accordion.js +1 -1
- package/action-group.js +1 -1
- package/alert/alert-group.js +1 -1
- package/alert/alert.js +1 -1
- package/autocomplete-grid/autocomplete-grid-button.js +1 -1
- package/autocomplete-grid/autocomplete-grid-cell.js +1 -1
- package/autocomplete-grid/autocomplete-grid-optgroup.js +1 -1
- package/autocomplete-grid/autocomplete-grid-option.js +1 -1
- package/autocomplete-grid/autocomplete-grid-row.js +1 -1
- package/autocomplete-grid/autocomplete-grid.js +1 -1
- package/autocomplete.js +1 -1
- package/breadcrumb/breadcrumb-group.js +1 -1
- package/breadcrumb/breadcrumb.js +1 -1
- package/button/accent-button-link.js +1 -1
- package/button/accent-button-static.js +1 -1
- package/button/accent-button.js +1 -1
- package/button/button-link.js +1 -1
- package/button/button-static.js +1 -1
- package/button/button.js +1 -1
- package/button/mini-button-group.js +1 -1
- package/button/mini-button.js +1 -1
- package/button/secondary-button-link.js +1 -1
- package/button/secondary-button-static.js +1 -1
- package/button/secondary-button.js +1 -1
- package/button/transparent-button-link.js +1 -1
- package/button/transparent-button-static.js +1 -1
- package/button/transparent-button.js +1 -1
- package/calendar.js +1 -1
- package/card/card-badge.js +1 -1
- package/card/card-button.js +1 -1
- package/card/card-link.js +1 -1
- package/card/card.js +1 -1
- package/checkbox/checkbox-group.js +1 -1
- package/checkbox/checkbox-panel.js +1 -1
- package/checkbox/checkbox.js +1 -1
- package/chip-label.js +1 -1
- package/clock.js +1 -1
- package/container/container.js +1 -1
- package/container/sticky-bar.js +1 -1
- package/core.js +1 -1
- package/create-component-DKl3-Au3.js +72 -0
- package/datepicker/datepicker-next-day.js +1 -1
- package/datepicker/datepicker-previous-day.js +1 -1
- package/datepicker/datepicker-toggle.js +1 -1
- package/datepicker/datepicker.js +1 -1
- package/dialog/dialog-actions.js +1 -1
- package/dialog/dialog-content.js +1 -1
- package/dialog/dialog-title.js +1 -1
- package/dialog/dialog.js +1 -1
- package/divider.js +1 -1
- package/expansion-panel/expansion-panel-content.js +1 -1
- package/expansion-panel/expansion-panel-header.js +1 -1
- package/expansion-panel/expansion-panel.js +1 -1
- package/file-selector/file-selector-dropzone.js +1 -1
- package/file-selector/file-selector.js +1 -1
- package/flip-card/flip-card-details.js +1 -1
- package/flip-card/flip-card-summary.js +1 -1
- package/flip-card/flip-card.js +1 -1
- package/footer.js +1 -1
- package/form-error.js +1 -1
- package/form-field/form-field-clear.js +1 -1
- package/form-field/form-field.js +1 -1
- package/header/header-button.js +1 -1
- package/header/header-link.js +1 -1
- package/header/header.js +1 -1
- package/icon.js +1 -1
- package/image.js +1 -1
- package/journey-header.js +1 -1
- package/lead-container.js +1 -1
- package/link/block-link-button.js +1 -1
- package/link/block-link-static.js +1 -1
- package/link/block-link.js +1 -1
- package/link/link-button.js +1 -1
- package/link/link-static.js +1 -1
- package/link/link.js +1 -1
- package/link-list/link-list-anchor.js +1 -1
- package/link-list/link-list.js +1 -1
- package/loading-indicator-circle.js +1 -1
- package/loading-indicator.js +1 -1
- package/logo.js +1 -1
- package/map-container.js +1 -1
- package/menu/menu-button.js +1 -1
- package/menu/menu-link.js +1 -1
- package/menu/menu.js +1 -1
- package/message.js +1 -1
- package/navigation/navigation-button.js +1 -1
- package/navigation/navigation-link.js +1 -1
- package/navigation/navigation-list.js +1 -1
- package/navigation/navigation-marker.js +1 -1
- package/navigation/navigation-section.js +1 -1
- package/navigation/navigation.js +1 -1
- package/notification.js +1 -1
- package/option/optgroup.js +1 -1
- package/option/option.js +1 -1
- package/overlay.js +1 -1
- package/package.json +2 -2
- package/paginator/compact-paginator.js +1 -1
- package/paginator/paginator.js +1 -1
- package/popover/popover-trigger.js +1 -1
- package/popover/popover.js +1 -1
- package/radio-button/radio-button-group.js +1 -1
- package/radio-button/radio-button-panel.js +1 -1
- package/radio-button/radio-button.js +1 -1
- package/screen-reader-only.js +1 -1
- package/select.js +1 -1
- package/selection-expansion-panel.js +1 -1
- package/signet.js +1 -1
- package/skiplink-list.js +1 -1
- package/slider.js +1 -1
- package/status.js +1 -1
- package/stepper/step-label.js +1 -1
- package/stepper/step.js +1 -1
- package/stepper/stepper.js +1 -1
- package/table/table-wrapper.js +1 -1
- package/tabs/tab-group.js +1 -1
- package/tabs/tab-label.js +1 -1
- package/tabs/tab.js +1 -1
- package/tag/tag-group.js +1 -1
- package/tag/tag.js +1 -1
- package/teaser-hero.js +1 -1
- package/teaser-product/teaser-product-static.js +1 -1
- package/teaser-product/teaser-product.js +1 -1
- package/teaser.js +1 -1
- package/time-input.js +1 -1
- package/timetable-occupancy-icon.js +1 -1
- package/timetable-occupancy.js +1 -1
- package/title.js +1 -1
- package/toast.js +1 -1
- package/toggle/toggle-option.js +1 -1
- package/toggle/toggle.js +1 -1
- package/toggle-check.js +1 -1
- package/train/train-blocked-passage.js +1 -1
- package/train/train-formation.js +1 -1
- package/train/train-wagon.js +1 -1
- package/train/train.js +1 -1
- package/visual-checkbox.js +1 -1
- package/create-component-as6VKs1g.js +0 -72
package/accordion.js
CHANGED
package/action-group.js
CHANGED
package/alert/alert-group.js
CHANGED
package/alert/alert.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as t } from "../create-component-
|
|
1
|
+
import { c as t } from "../create-component-DKl3-Au3.js";
|
|
2
2
|
import { SbbAutocompleteGridButtonElement as o } from "@sbb-esta/lyne-elements/autocomplete-grid/autocomplete-grid-button.js";
|
|
3
3
|
import e from "react";
|
|
4
4
|
const p = t({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as e } from "../create-component-
|
|
1
|
+
import { c as e } from "../create-component-DKl3-Au3.js";
|
|
2
2
|
import { SbbAutocompleteGridCellElement as t } from "@sbb-esta/lyne-elements/autocomplete-grid/autocomplete-grid-cell.js";
|
|
3
3
|
import o from "react";
|
|
4
4
|
const c = e({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as o } from "../create-component-
|
|
1
|
+
import { c as o } from "../create-component-DKl3-Au3.js";
|
|
2
2
|
import { SbbAutocompleteGridOptgroupElement as t } from "@sbb-esta/lyne-elements/autocomplete-grid/autocomplete-grid-optgroup.js";
|
|
3
3
|
import e from "react";
|
|
4
4
|
const a = o({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as e } from "../create-component-
|
|
1
|
+
import { c as e } from "../create-component-DKl3-Au3.js";
|
|
2
2
|
import { SbbAutocompleteGridOptionElement as t } from "@sbb-esta/lyne-elements/autocomplete-grid/autocomplete-grid-option.js";
|
|
3
3
|
import o from "react";
|
|
4
4
|
const c = e({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as o } from "../create-component-
|
|
1
|
+
import { c as o } from "../create-component-DKl3-Au3.js";
|
|
2
2
|
import { SbbAutocompleteGridRowElement as e } from "@sbb-esta/lyne-elements/autocomplete-grid/autocomplete-grid-row.js";
|
|
3
3
|
import t from "react";
|
|
4
4
|
const a = o({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as e } from "../create-component-
|
|
1
|
+
import { c as e } from "../create-component-DKl3-Au3.js";
|
|
2
2
|
import { SbbAutocompleteGridElement as o } from "@sbb-esta/lyne-elements/autocomplete-grid/autocomplete-grid.js";
|
|
3
3
|
import l from "react";
|
|
4
4
|
const m = e({
|
package/autocomplete.js
CHANGED
package/breadcrumb/breadcrumb.js
CHANGED
package/button/accent-button.js
CHANGED
package/button/button-link.js
CHANGED
package/button/button-static.js
CHANGED
package/button/button.js
CHANGED
package/button/mini-button.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as t } from "../create-component-
|
|
1
|
+
import { c as t } from "../create-component-DKl3-Au3.js";
|
|
2
2
|
import { SbbSecondaryButtonStaticElement as o } from "@sbb-esta/lyne-elements/button/secondary-button-static.js";
|
|
3
3
|
import e from "react";
|
|
4
4
|
const c = t({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as t } from "../create-component-
|
|
1
|
+
import { c as t } from "../create-component-DKl3-Au3.js";
|
|
2
2
|
import { SbbTransparentButtonLinkElement as n } from "@sbb-esta/lyne-elements/button/transparent-button-link.js";
|
|
3
3
|
import r from "react";
|
|
4
4
|
const m = t({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as t } from "../create-component-
|
|
1
|
+
import { c as t } from "../create-component-DKl3-Au3.js";
|
|
2
2
|
import { SbbTransparentButtonStaticElement as a } from "@sbb-esta/lyne-elements/button/transparent-button-static.js";
|
|
3
3
|
import r from "react";
|
|
4
4
|
const m = t({
|
package/calendar.js
CHANGED
package/card/card-badge.js
CHANGED
package/card/card-button.js
CHANGED
package/card/card-link.js
CHANGED
package/card/card.js
CHANGED
package/checkbox/checkbox.js
CHANGED
package/chip-label.js
CHANGED
package/clock.js
CHANGED
package/container/container.js
CHANGED
package/container/sticky-bar.js
CHANGED
package/core.js
CHANGED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { isServer as k } from "lit";
|
|
2
|
+
/**
|
|
3
|
+
* Copied from https://github.com/lit/lit/blob/main/packages/react/src/create-component.ts
|
|
4
|
+
* TODO: Can be removed once https://github.com/lit/lit/issues/4023 or https://github.com/lit/lit/pull/4476 is solved.
|
|
5
|
+
*
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright 2018 Google LLC
|
|
8
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
+
*/
|
|
10
|
+
const w = k, L = /* @__PURE__ */ new Set([
|
|
11
|
+
"children",
|
|
12
|
+
"localName",
|
|
13
|
+
"ref",
|
|
14
|
+
"style",
|
|
15
|
+
"className",
|
|
16
|
+
"id"
|
|
17
|
+
]), P = /* @__PURE__ */ new WeakMap(), M = (t, o, n) => {
|
|
18
|
+
let i = P.get(t);
|
|
19
|
+
i === void 0 && P.set(t, i = /* @__PURE__ */ new Map());
|
|
20
|
+
let s = i.get(o);
|
|
21
|
+
n !== void 0 ? s === void 0 ? (i.set(o, s = { handleEvent: n }), t.addEventListener(o, s)) : s.handleEvent = n : s !== void 0 && (i.delete(o), t.removeEventListener(o, s));
|
|
22
|
+
}, g = (t, o, n, i, s) => {
|
|
23
|
+
const p = s == null ? void 0 : s[o];
|
|
24
|
+
if (p !== void 0) {
|
|
25
|
+
n !== i && M(t, p, n);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
t[o] = n, n == null && o in HTMLElement.prototype && t.removeAttribute(o);
|
|
29
|
+
}, O = ({ react: t, tagName: o, elementClass: n, events: i, displayName: s }) => {
|
|
30
|
+
const p = new Set(Object.keys(i ?? {})), y = t.forwardRef((E, f) => {
|
|
31
|
+
var v;
|
|
32
|
+
const d = t.useRef(/* @__PURE__ */ new Map()), u = t.useRef(null), l = {}, a = {}, m = n.elementProperties;
|
|
33
|
+
for (const [e, r] of Object.entries(E)) {
|
|
34
|
+
if (L.has(e)) {
|
|
35
|
+
l[e === "className" ? "class" : e] = r;
|
|
36
|
+
continue;
|
|
37
|
+
} else if (p.has(e) || e in n.prototype) {
|
|
38
|
+
const c = m == null ? void 0 : m.get(e), b = (v = c == null ? void 0 : c.converter) == null ? void 0 : v.toAttribute;
|
|
39
|
+
if (!c || c.attribute === !1 || typeof r == "object" && !b) {
|
|
40
|
+
a[e] = r;
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
const h = c.attribute === !0 ? e : c.attribute || e;
|
|
44
|
+
c.type !== Boolean ? l[h] = b ? b(r) : r : r ? (l[h] = "", a[e] = r) : a[e] = !1;
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
l[e] = r;
|
|
48
|
+
}
|
|
49
|
+
return w || (t.useLayoutEffect(() => {
|
|
50
|
+
if (u.current === null)
|
|
51
|
+
return;
|
|
52
|
+
const e = /* @__PURE__ */ new Map();
|
|
53
|
+
for (const r in a)
|
|
54
|
+
g(u.current, r, E[r], d.current.get(r), i), d.current.delete(r), e.set(r, E[r]);
|
|
55
|
+
for (const [r, c] of d.current)
|
|
56
|
+
g(u.current, r, void 0, c, i);
|
|
57
|
+
d.current = e;
|
|
58
|
+
}), t.useLayoutEffect(() => {
|
|
59
|
+
var e;
|
|
60
|
+
(e = u.current) == null || e.removeAttribute("defer-hydration");
|
|
61
|
+
}, [])), w ? (t.createElement.name === "litPatchedCreateElement" || globalThis.litSsrReactEnabled) && Object.keys(a).length && (l._$litProps$ = a) : l.suppressHydrationWarning = !0, t.createElement(o, {
|
|
62
|
+
...l,
|
|
63
|
+
ref: t.useCallback((e) => {
|
|
64
|
+
u.current = e, typeof f == "function" ? f(e) : f !== null && (f.current = e);
|
|
65
|
+
}, [f])
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
return y.displayName = s ?? n.name, y;
|
|
69
|
+
};
|
|
70
|
+
export {
|
|
71
|
+
O as c
|
|
72
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as e } from "../create-component-
|
|
1
|
+
import { c as e } from "../create-component-DKl3-Au3.js";
|
|
2
2
|
import { SbbDatepickerPreviousDayElement as r } from "@sbb-esta/lyne-elements/datepicker/datepicker-previous-day.js";
|
|
3
3
|
import t from "react";
|
|
4
4
|
const i = e({
|
package/datepicker/datepicker.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as e } from "../create-component-
|
|
1
|
+
import { c as e } from "../create-component-DKl3-Au3.js";
|
|
2
2
|
import { SbbDatepickerElement as t } from "@sbb-esta/lyne-elements/datepicker/datepicker.js";
|
|
3
3
|
import "@sbb-esta/lyne-elements/core/interfaces.js";
|
|
4
4
|
import a from "react";
|
package/dialog/dialog-actions.js
CHANGED
package/dialog/dialog-content.js
CHANGED
package/dialog/dialog-title.js
CHANGED
package/dialog/dialog.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as o } from "../create-component-
|
|
1
|
+
import { c as o } from "../create-component-DKl3-Au3.js";
|
|
2
2
|
import { SbbDialogElement as e } from "@sbb-esta/lyne-elements/dialog/dialog.js";
|
|
3
3
|
import "@sbb-esta/lyne-elements/core/interfaces.js";
|
|
4
4
|
import l from "react";
|
package/divider.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as n } from "../create-component-
|
|
1
|
+
import { c as n } from "../create-component-DKl3-Au3.js";
|
|
2
2
|
import { SbbExpansionPanelContentElement as e } from "@sbb-esta/lyne-elements/expansion-panel/expansion-panel-content.js";
|
|
3
3
|
import t from "react";
|
|
4
4
|
const p = n({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as e } from "../create-component-
|
|
1
|
+
import { c as e } from "../create-component-DKl3-Au3.js";
|
|
2
2
|
import { SbbExpansionPanelHeaderElement as n } from "@sbb-esta/lyne-elements/expansion-panel/expansion-panel-header.js";
|
|
3
3
|
import a from "react";
|
|
4
4
|
const p = e({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as e } from "../create-component-
|
|
1
|
+
import { c as e } from "../create-component-DKl3-Au3.js";
|
|
2
2
|
import { SbbFileSelectorDropzoneElement as o } from "@sbb-esta/lyne-elements/file-selector/file-selector-dropzone.js";
|
|
3
3
|
import n from "react";
|
|
4
4
|
const a = e({
|
package/flip-card/flip-card.js
CHANGED
package/footer.js
CHANGED
package/form-error.js
CHANGED
package/form-field/form-field.js
CHANGED
package/header/header-button.js
CHANGED
package/header/header-link.js
CHANGED
package/header/header.js
CHANGED
package/icon.js
CHANGED
package/image.js
CHANGED
package/journey-header.js
CHANGED
package/lead-container.js
CHANGED
package/link/block-link.js
CHANGED
package/link/link-button.js
CHANGED
package/link/link-static.js
CHANGED