@tedi-design-system/react 19.1.0-rc.8 → 19.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/bundle-stats.html +1 -1
- package/community.cjs.js +1 -1
- package/community.es.js +215 -223
- package/component.manifest.json +63 -20
- package/external/@floating-ui/core/dist/floating-ui.core.es.js +1 -1
- package/external/@floating-ui/dom/dist/floating-ui.dom.es.js +2 -2
- package/external/@floating-ui/react-dom/dist/floating-ui.react-dom.es.js +5 -5
- package/external/@mui/x-date-pickers/DatePicker/shared.es.js +1 -1
- package/external/@mui/x-date-pickers/DateTimePicker/shared.es.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/cjs/react-is.development.cjs.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/cjs/react-is.development.es.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/cjs/react-is.production.min.cjs.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/cjs/react-is.production.min.es.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/index.cjs.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/index.es.js +1 -1
- package/external/prop-types/external/react-is/cjs/react-is.development.cjs.js +1 -1
- package/external/prop-types/external/react-is/cjs/react-is.development.es.js +1 -1
- package/external/prop-types/external/react-is/cjs/react-is.production.min.cjs.js +1 -1
- package/external/prop-types/external/react-is/cjs/react-is.production.min.es.js +1 -1
- package/external/prop-types/external/react-is/index.cjs.js +1 -1
- package/external/prop-types/external/react-is/index.es.js +1 -1
- package/index.css +1 -1
- package/package.json +2 -2
- package/src/community/components/accordion/accordion.cjs.js +1 -1
- package/src/community/components/accordion/accordion.es.js +14 -9
- package/src/community/components/card/card-notification/card-notification.cjs.js +1 -1
- package/src/community/components/card/card-notification/card-notification.es.js +10 -8
- package/src/community/components/dock-panel/dock-panel.cjs.js +2 -0
- package/src/community/components/dock-panel/dock-panel.d.ts +110 -0
- package/src/community/components/dock-panel/dock-panel.es.js +138 -0
- package/src/community/components/dock-panel/dock-panel.module.scss.cjs.js +1 -0
- package/src/community/components/dock-panel/dock-panel.module.scss.es.js +18 -0
- package/src/community/components/dropdown/dropdown.cjs.js +1 -1
- package/src/community/components/dropdown/dropdown.es.js +34 -32
- package/src/community/components/form/category-search/category-search.cjs.js +1 -0
- package/src/community/components/form/category-search/category-search.d.ts +9 -0
- package/src/community/components/form/category-search/category-search.es.js +297 -0
- package/src/community/components/form/category-search/category-search.module.scss.cjs.js +1 -0
- package/src/community/components/form/category-search/category-search.module.scss.es.js +21 -0
- package/src/community/components/form/category-search/category-search.types.d.ts +162 -0
- package/src/community/components/form/category-search/define-category-search-category.cjs.js +1 -0
- package/src/community/components/form/category-search/define-category-search-category.d.ts +7 -0
- package/src/community/components/form/category-search/define-category-search-category.es.js +25 -0
- package/src/community/components/form/category-search/index.d.ts +3 -0
- package/src/community/components/form/category-search/use-category-search.cjs.js +1 -0
- package/src/community/components/form/category-search/use-category-search.d.ts +17 -0
- package/src/community/components/form/category-search/use-category-search.es.js +64 -0
- package/src/community/components/form/file-upload/file-upload.cjs.js +1 -1
- package/src/community/components/form/file-upload/file-upload.es.js +43 -41
- package/src/community/components/form/pickers/calendar/calendar.cjs.js +1 -1
- package/src/community/components/form/pickers/calendar/calendar.es.js +41 -39
- package/src/community/components/form/pickers/timepicker/timepicker.cjs.js +1 -1
- package/src/community/components/form/pickers/timepicker/timepicker.es.js +33 -31
- package/src/community/components/form/toggle/toggle.cjs.js +1 -1
- package/src/community/components/form/toggle/toggle.es.js +30 -28
- package/src/community/components/map-components/base-map-selection/base-map-selection.cjs.js +1 -1
- package/src/community/components/map-components/base-map-selection/base-map-selection.es.js +19 -19
- package/src/community/components/map-components/carousel/carousel.cjs.js +1 -1
- package/src/community/components/map-components/carousel/carousel.es.js +19 -17
- package/src/community/components/map-components/map-button/map-button.cjs.js +1 -1
- package/src/community/components/map-components/map-button/map-button.d.ts +10 -1
- package/src/community/components/map-components/map-button/map-button.es.js +31 -29
- package/src/community/components/map-components/map-dropdown/map-dropdown.cjs.js +1 -1
- package/src/community/components/map-components/map-dropdown/map-dropdown.es.js +51 -49
- package/src/community/components/status/status.cjs.js +1 -1
- package/src/community/components/status/status.es.js +14 -12
- package/src/community/components/stepper/stepper.cjs.js +1 -1
- package/src/community/components/stepper/stepper.es.js +33 -31
- package/src/community/components/table/table.cjs.js +1 -1
- package/src/community/components/table/table.es.js +9 -9
- package/src/community/components/table-of-contents/table-of-contents.cjs.js +1 -1
- package/src/community/components/table-of-contents/table-of-contents.es.js +21 -19
- package/src/community/components/tabs/tabs/tabs.cjs.js +1 -1
- package/src/community/components/tabs/tabs/tabs.es.js +29 -27
- package/src/community/components/vertical-stepper/vertical-stepper.cjs.js +1 -1
- package/src/community/components/vertical-stepper/vertical-stepper.es.js +8 -6
- package/src/community/deprecated-exports.cjs.js +1 -0
- package/src/community/deprecated-exports.d.ts +19 -0
- package/src/community/deprecated-exports.es.js +112 -0
- package/src/community/index.d.ts +3 -0
- package/src/tedi/components/content/card/card.d.ts +4 -0
- package/src/tedi/components/content/carousel/carousel.cjs.js +1 -1
- package/src/tedi/components/content/carousel/carousel.d.ts +5 -0
- package/src/tedi/components/content/carousel/carousel.es.js +20 -20
- package/src/tedi/components/content/carousel/use-carousel.cjs.js +1 -1
- package/src/tedi/components/content/carousel/use-carousel.d.ts +1 -1
- package/src/tedi/components/content/carousel/use-carousel.es.js +127 -127
- package/src/tedi/components/content/table-card/index.d.ts +1 -0
- package/src/tedi/components/content/table-card/table-card.cjs.js +1 -0
- package/src/tedi/components/content/table-card/table-card.d.ts +131 -0
- package/src/tedi/components/content/table-card/table-card.es.js +206 -0
- package/src/tedi/components/content/table-card/table-card.module.scss.cjs.js +1 -0
- package/src/tedi/components/content/table-card/table-card.module.scss.es.js +18 -0
- package/src/tedi/components/content/text-group/text-group-list/text-group-list.cjs.js +1 -1
- package/src/tedi/components/content/text-group/text-group-list/text-group-list.d.ts +42 -0
- package/src/tedi/components/content/text-group/text-group-list/text-group-list.es.js +41 -23
- package/src/tedi/components/content/text-group/text-group.cjs.js +1 -1
- package/src/tedi/components/content/text-group/text-group.d.ts +10 -0
- package/src/tedi/components/content/text-group/text-group.es.js +14 -13
- package/src/tedi/components/content/text-group/text-group.module.scss.cjs.js +1 -1
- package/src/tedi/components/content/text-group/text-group.module.scss.es.js +5 -1
- package/src/tedi/components/form/date-field/date-field-helpers.cjs.js +1 -1
- package/src/tedi/components/form/date-field/date-field-helpers.d.ts +12 -19
- package/src/tedi/components/form/date-field/date-field-helpers.es.js +27 -21
- package/src/tedi/components/form/date-field/date-field.cjs.js +1 -1
- package/src/tedi/components/form/date-field/date-field.d.ts +1 -1
- package/src/tedi/components/form/date-field/date-field.es.js +169 -164
- package/src/tedi/components/form/date-time-field/date-time-field.cjs.js +1 -1
- package/src/tedi/components/form/date-time-field/date-time-field.es.js +181 -176
- package/src/tedi/components/form/search/index.d.ts +1 -0
- package/src/tedi/components/form/search/search.cjs.js +1 -1
- package/src/tedi/components/form/search/search.d.ts +92 -1
- package/src/tedi/components/form/search/search.es.js +265 -69
- package/src/tedi/components/form/search/search.module.scss.cjs.js +1 -1
- package/src/tedi/components/form/search/search.module.scss.es.js +9 -1
- package/src/tedi/components/form/slider/slider.cjs.js +1 -1
- package/src/tedi/components/form/slider/slider.es.js +38 -38
- package/src/tedi/components/form/slider/slider.module.scss.cjs.js +1 -1
- package/src/tedi/components/form/slider/slider.module.scss.es.js +0 -1
- package/src/tedi/components/form/textfield/textfield.cjs.js +1 -1
- package/src/tedi/components/form/textfield/textfield.es.js +21 -21
- package/src/tedi/components/layout/mobile-nav/components/mobile-nav-toggle/mobile-nav-toggle.cjs.js +1 -1
- package/src/tedi/components/layout/mobile-nav/components/mobile-nav-toggle/mobile-nav-toggle.d.ts +1 -1
- package/src/tedi/components/layout/mobile-nav/components/mobile-nav-toggle/mobile-nav-toggle.es.js +28 -27
- package/src/tedi/components/layout/mobile-nav/mobile-nav.cjs.js +1 -1
- package/src/tedi/components/layout/mobile-nav/mobile-nav.d.ts +1 -1
- package/src/tedi/components/layout/mobile-nav/mobile-nav.es.js +124 -92
- package/src/tedi/components/layout/sidenav/sidenav.module.scss.cjs.js +1 -1
- package/src/tedi/components/layout/sidenav/sidenav.module.scss.es.js +1 -0
- package/src/tedi/components/navigation/tabs/tabs-helpers.cjs.js +1 -1
- package/src/tedi/components/navigation/tabs/tabs-helpers.d.ts +5 -0
- package/src/tedi/components/navigation/tabs/tabs-helpers.es.js +7 -4
- package/src/tedi/components/navigation/tabs/tabs-trigger/tabs-trigger.cjs.js +1 -1
- package/src/tedi/components/navigation/tabs/tabs-trigger/tabs-trigger.es.js +17 -17
- package/src/tedi/components/overlays/dropdown/dropdown.cjs.js +1 -1
- package/src/tedi/components/overlays/dropdown/dropdown.es.js +8 -6
- package/src/tedi/helpers/warn-deprecated/warn-deprecated.cjs.js +1 -0
- package/src/tedi/helpers/warn-deprecated/warn-deprecated.d.ts +12 -0
- package/src/tedi/helpers/warn-deprecated/warn-deprecated.es.js +11 -0
- package/src/tedi/index.d.ts +2 -1
- package/src/tedi/providers/label-provider/labels-map.cjs.js +1 -1
- package/src/tedi/providers/label-provider/labels-map.d.ts +30 -2
- package/src/tedi/providers/label-provider/labels-map.es.js +29 -1
- package/tedi.cjs.js +1 -1
- package/tedi.es.js +326 -324
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import { jsxs as _, jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import R from "../../../../../external/classnames/index.es.js";
|
|
3
|
+
import y from "react";
|
|
4
4
|
import { FeedbackText as O } from "../../../../tedi/components/form/feedback-text/feedback-text.es.js";
|
|
5
5
|
import { FormLabel as S } from "../../../../tedi/components/form/form-label/form-label.es.js";
|
|
6
6
|
import { Tag as W } from "../../../../tedi/components/tags/tag/tag.es.js";
|
|
7
|
-
import {
|
|
7
|
+
import { warnDeprecated as Y } from "../../../../tedi/helpers/warn-deprecated/warn-deprecated.es.js";
|
|
8
|
+
import { Button as q } from "../../button/button.es.js";
|
|
8
9
|
import c from "./file-upload.module.scss.es.js";
|
|
9
|
-
import { useLabels as
|
|
10
|
-
import { Card as
|
|
11
|
-
import { CardContent as
|
|
12
|
-
import { Row as
|
|
13
|
-
import { Col as
|
|
14
|
-
const
|
|
10
|
+
import { useLabels as G } from "../../../../tedi/providers/label-provider/use-labels.es.js";
|
|
11
|
+
import { Card as J } from "../../card/card.es.js";
|
|
12
|
+
import { CardContent as K } from "../../card/card-content/card-content.es.js";
|
|
13
|
+
import { Row as P } from "../../../../tedi/components/layout/grid/row.es.js";
|
|
14
|
+
import { Col as $ } from "../../../../tedi/components/layout/grid/col.es.js";
|
|
15
|
+
const Q = ({ accept: a, maxSize: i }, s) => {
|
|
15
16
|
if (!a && !i) return;
|
|
16
17
|
const o = [
|
|
17
18
|
a && `${s("file-upload.accept")} ${a.replaceAll(",", ", ")}`,
|
|
18
19
|
i && `${s("file-upload.max-size")} ${i}MB`
|
|
19
20
|
].filter(Boolean).join(". ");
|
|
20
21
|
return o.length ? { text: o } : void 0;
|
|
21
|
-
},
|
|
22
|
+
}, V = (a, i) => {
|
|
22
23
|
const s = a.reduce(
|
|
23
24
|
(o, { type: r, file: u }) => (o[r].push(u.name), o),
|
|
24
25
|
{ extension: [], size: [] }
|
|
@@ -27,45 +28,46 @@ const P = ({ accept: a, maxSize: i }, s) => {
|
|
|
27
28
|
const u = r.map((x) => `'${x}'`).join(", ");
|
|
28
29
|
return i(`file-upload.${o}-rejected`, u);
|
|
29
30
|
}).join(". ");
|
|
30
|
-
},
|
|
31
|
-
|
|
31
|
+
}, ue = (a) => {
|
|
32
|
+
Y("Community FileUpload", "Use `FileUpload` from `@tedi-design-system/react/tedi` instead.");
|
|
33
|
+
const { getLabel: i } = G(), {
|
|
32
34
|
id: s,
|
|
33
35
|
name: o,
|
|
34
36
|
accept: r,
|
|
35
37
|
multiple: u,
|
|
36
38
|
onChange: n,
|
|
37
39
|
className: x,
|
|
38
|
-
defaultFiles:
|
|
40
|
+
defaultFiles: M,
|
|
39
41
|
onDelete: j,
|
|
40
|
-
files:
|
|
41
|
-
readOnly:
|
|
42
|
-
disabled:
|
|
43
|
-
maxSize:
|
|
44
|
-
helper: d =
|
|
45
|
-
...
|
|
46
|
-
} = a, L = d ? (d == null ? void 0 : d.id) ?? `${s}-helper` : void 0, [
|
|
47
|
-
var
|
|
42
|
+
files: m,
|
|
43
|
+
readOnly: F,
|
|
44
|
+
disabled: f = !1,
|
|
45
|
+
maxSize: b,
|
|
46
|
+
helper: d = Q({ accept: r, maxSize: b }, i),
|
|
47
|
+
...k
|
|
48
|
+
} = a, L = d ? (d == null ? void 0 : d.id) ?? `${s}-helper` : void 0, [B, N] = y.useState(!1), [w, C] = y.useState(M || []), [E, T] = y.useState(), H = R(c["file-upload"], { [c["file-upload-disabled"]]: f }), z = (e) => {
|
|
49
|
+
var g;
|
|
48
50
|
if (!r)
|
|
49
51
|
return !0;
|
|
50
|
-
const t = (r == null ? void 0 : r.replace(/,/g, "").split(".")) || [], p = (
|
|
52
|
+
const t = (r == null ? void 0 : r.replace(/,/g, "").split(".")) || [], p = (g = e.name.split(".").pop()) == null ? void 0 : g.toLowerCase();
|
|
51
53
|
return !!p && t.includes(p);
|
|
52
|
-
},
|
|
54
|
+
}, v = y.useMemo(() => m && n ? m : w, [m, w, n]), A = (e) => {
|
|
53
55
|
if (e.target.files) {
|
|
54
|
-
const t = [], p = [...Array.from(e.target.files)].filter((
|
|
55
|
-
typeof
|
|
56
|
+
const t = [], p = [...Array.from(e.target.files)].filter((h) => z(h) ? !0 : (t.push({ type: "extension", file: h }), !1)).filter((h) => !b || h.size <= b * 1048576 ? !0 : (t.push({ type: "size", file: h }), !1)), g = [...v, ...p];
|
|
57
|
+
typeof m > "u" && C(g), n == null || n(g), e.target.value = "", t.length ? T({ type: "error", text: V(t, i) }) : T(void 0);
|
|
56
58
|
}
|
|
57
|
-
},
|
|
58
|
-
const t = [...
|
|
59
|
-
j && j(e), typeof
|
|
60
|
-
},
|
|
59
|
+
}, D = (e) => {
|
|
60
|
+
const t = [...v].filter((p) => p !== e);
|
|
61
|
+
j && j(e), typeof m > "u" && C(t), n == null || n(t);
|
|
62
|
+
}, I = (e, t) => /* @__PURE__ */ l("li", { children: /* @__PURE__ */ l(
|
|
61
63
|
W,
|
|
62
64
|
{
|
|
63
65
|
color: "secondary",
|
|
64
|
-
onClose: !e.isLoading && !
|
|
66
|
+
onClose: !e.isLoading && !f && !F ? () => D(e) : void 0,
|
|
65
67
|
isLoading: e.isLoading,
|
|
66
68
|
children: e.name
|
|
67
69
|
}
|
|
68
|
-
) }, t),
|
|
70
|
+
) }, t), U = () => /* @__PURE__ */ l("ul", { className: c["file-upload__items"], children: v.map((e, t) => I(e, t)) });
|
|
69
71
|
return /* @__PURE__ */ _("div", { children: [
|
|
70
72
|
/* @__PURE__ */ l(
|
|
71
73
|
"div",
|
|
@@ -73,12 +75,12 @@ const P = ({ accept: a, maxSize: i }, s) => {
|
|
|
73
75
|
onMouseEnter: () => N(!0),
|
|
74
76
|
onMouseLeave: () => N(!1),
|
|
75
77
|
className: c["file-upload__label-wrapper"],
|
|
76
|
-
children: /* @__PURE__ */ l(S, { id: s, ...
|
|
78
|
+
children: /* @__PURE__ */ l(S, { id: s, ...k, renderWithoutLabel: F, className: c["file-upload__label"] })
|
|
77
79
|
}
|
|
78
80
|
),
|
|
79
|
-
|
|
80
|
-
/* @__PURE__ */ l(
|
|
81
|
-
/* @__PURE__ */ l(
|
|
81
|
+
F ? U() : /* @__PURE__ */ l(J, { padding: 0.5, background: f ? "bg-disabled" : void 0, className: c["file-upload__card"], children: /* @__PURE__ */ l(K, { children: /* @__PURE__ */ _(P, { gutterY: 2, children: [
|
|
82
|
+
/* @__PURE__ */ l($, { children: U() }),
|
|
83
|
+
/* @__PURE__ */ l($, { xs: 12, md: "auto", align: "center", children: /* @__PURE__ */ _("div", { className: H, children: [
|
|
82
84
|
/* @__PURE__ */ l(
|
|
83
85
|
"input",
|
|
84
86
|
{
|
|
@@ -88,17 +90,17 @@ const P = ({ accept: a, maxSize: i }, s) => {
|
|
|
88
90
|
accept: r,
|
|
89
91
|
onChange: A,
|
|
90
92
|
multiple: u,
|
|
91
|
-
disabled:
|
|
93
|
+
disabled: f
|
|
92
94
|
}
|
|
93
95
|
),
|
|
94
96
|
/* @__PURE__ */ l(
|
|
95
|
-
|
|
97
|
+
q,
|
|
96
98
|
{
|
|
97
99
|
visualType: "link",
|
|
98
100
|
iconLeft: "file_upload",
|
|
99
101
|
"aria-describedby": L,
|
|
100
|
-
isActive:
|
|
101
|
-
disabled:
|
|
102
|
+
isActive: B,
|
|
103
|
+
disabled: f,
|
|
102
104
|
onClick: () => {
|
|
103
105
|
var e;
|
|
104
106
|
return (e = document.getElementById(s)) == null ? void 0 : e.click();
|
|
@@ -108,9 +110,9 @@ const P = ({ accept: a, maxSize: i }, s) => {
|
|
|
108
110
|
)
|
|
109
111
|
] }) })
|
|
110
112
|
] }) }) }),
|
|
111
|
-
(
|
|
113
|
+
(E || d) && /* @__PURE__ */ l(O, { ...E || d, id: L })
|
|
112
114
|
] });
|
|
113
115
|
};
|
|
114
116
|
export {
|
|
115
|
-
|
|
117
|
+
ue as FileUpload
|
|
116
118
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),D=require("../../../../../../external/classnames/index.cjs.js"),d=require("react"),H=require("../../../../../tedi/helpers/warn-deprecated/warn-deprecated.cjs.js"),S=require("./calendar.module.scss.cjs.js"),T=require("../../../../../../external/@mui/x-date-pickers/CalendarPicker/CalendarPicker.cjs.js"),B=require("../../../../../../external/@mui/x-date-pickers/PickersDay/PickersDay.cjs.js"),E=o=>{H.warnDeprecated("Community Calendar","Use `Calendar` from `@tedi-design-system/react/tedi` instead.");const{value:e,defaultValue:l,onChange:a,disabled:c,disableFuture:y,disableHighlightToday:f,disablePast:m,loading:g,minDate:b,maxDate:h,readOnly:C,view:q="day",views:M=["day"],showDaysOutsideCurrentMonth:P=!1,shouldHighlightDate:r,shouldDisableDate:p,shouldDisableMonth:x,shouldDisableYear:j,shouldShowStatusOnDate:i}=o,[s,k]=d.useState(l||null),v=d.useMemo(()=>a&&typeof e<"u"?e:s,[s,a,e]),w=n=>{!(n!=null&&n.isValid())&&n!==null||(typeof e>"u"&&k(n),!(n!=null&&n.isSame(s))&&(a==null||a(n)))},_=(n,F,O)=>{const R=r==null?void 0:r(n),t=i==null?void 0:i(n),V=D.default({"Mui-highlighted":R},{[S.default[`calendar__day--status-${t}`]]:t});return u.jsx(B.PickersDay,{className:V,...O})};return u.jsx(T.CalendarPicker,{"data-name":"calendar",date:v,onChange:w,disabled:c,disableFuture:y,disableHighlightToday:f,disablePast:m,loading:g,minDate:b,maxDate:h,readOnly:C,renderDay:_,shouldDisableDate:p,shouldDisableMonth:x,shouldDisableYear:j,showDaysOutsideCurrentMonth:P,view:q,views:M})};exports.Calendar=E;
|
|
@@ -1,60 +1,62 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
2
|
import N from "../../../../../../external/classnames/index.es.js";
|
|
3
|
-
import
|
|
4
|
-
import O from "
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
|
|
3
|
+
import t from "react";
|
|
4
|
+
import { warnDeprecated as O } from "../../../../../tedi/helpers/warn-deprecated/warn-deprecated.es.js";
|
|
5
|
+
import j from "./calendar.module.scss.es.js";
|
|
6
|
+
import { CalendarPicker as B } from "../../../../../../external/@mui/x-date-pickers/CalendarPicker/CalendarPicker.es.js";
|
|
7
|
+
import { PickersDay as E } from "../../../../../../external/@mui/x-date-pickers/PickersDay/PickersDay.es.js";
|
|
8
|
+
const G = (m) => {
|
|
9
|
+
O("Community Calendar", "Use `Calendar` from `@tedi-design-system/react/tedi` instead.");
|
|
8
10
|
const {
|
|
9
|
-
value:
|
|
10
|
-
defaultValue:
|
|
11
|
-
onChange:
|
|
12
|
-
disabled:
|
|
11
|
+
value: n,
|
|
12
|
+
defaultValue: u,
|
|
13
|
+
onChange: r,
|
|
14
|
+
disabled: l,
|
|
13
15
|
disableFuture: f,
|
|
14
16
|
disableHighlightToday: y,
|
|
15
|
-
disablePast:
|
|
16
|
-
loading:
|
|
17
|
+
disablePast: p,
|
|
18
|
+
loading: h,
|
|
17
19
|
minDate: g,
|
|
18
|
-
maxDate:
|
|
19
|
-
readOnly:
|
|
20
|
-
view:
|
|
21
|
-
views:
|
|
22
|
-
showDaysOutsideCurrentMonth:
|
|
20
|
+
maxDate: C,
|
|
21
|
+
readOnly: b,
|
|
22
|
+
view: c = "day",
|
|
23
|
+
views: M = ["day"],
|
|
24
|
+
showDaysOutsideCurrentMonth: _ = !1,
|
|
23
25
|
shouldHighlightDate: i,
|
|
24
26
|
shouldDisableDate: v,
|
|
25
|
-
shouldDisableMonth:
|
|
26
|
-
shouldDisableYear:
|
|
27
|
+
shouldDisableMonth: w,
|
|
28
|
+
shouldDisableYear: x,
|
|
27
29
|
shouldShowStatusOnDate: o
|
|
28
|
-
} =
|
|
29
|
-
return /* @__PURE__ */
|
|
30
|
-
|
|
30
|
+
} = m, [e, H] = t.useState(u || null), P = t.useMemo(() => r && typeof n < "u" ? n : e, [e, r, n]);
|
|
31
|
+
return /* @__PURE__ */ d(
|
|
32
|
+
B,
|
|
31
33
|
{
|
|
32
34
|
"data-name": "calendar",
|
|
33
|
-
date:
|
|
35
|
+
date: P,
|
|
34
36
|
onChange: (a) => {
|
|
35
|
-
!(a != null && a.isValid()) && a !== null || (typeof
|
|
37
|
+
!(a != null && a.isValid()) && a !== null || (typeof n > "u" && H(a), !(a != null && a.isSame(e)) && (r == null || r(a)));
|
|
36
38
|
},
|
|
37
|
-
disabled:
|
|
39
|
+
disabled: l,
|
|
38
40
|
disableFuture: f,
|
|
39
41
|
disableHighlightToday: y,
|
|
40
|
-
disablePast:
|
|
41
|
-
loading:
|
|
42
|
+
disablePast: p,
|
|
43
|
+
loading: h,
|
|
42
44
|
minDate: g,
|
|
43
|
-
maxDate:
|
|
44
|
-
readOnly:
|
|
45
|
-
renderDay: (a,
|
|
46
|
-
const
|
|
47
|
-
{ "Mui-highlighted":
|
|
48
|
-
{ [
|
|
45
|
+
maxDate: C,
|
|
46
|
+
readOnly: b,
|
|
47
|
+
renderDay: (a, T, R) => {
|
|
48
|
+
const V = i == null ? void 0 : i(a), s = o == null ? void 0 : o(a), k = N(
|
|
49
|
+
{ "Mui-highlighted": V },
|
|
50
|
+
{ [j[`calendar__day--status-${s}`]]: s }
|
|
49
51
|
);
|
|
50
|
-
return /* @__PURE__ */
|
|
52
|
+
return /* @__PURE__ */ d(E, { className: k, ...R });
|
|
51
53
|
},
|
|
52
54
|
shouldDisableDate: v,
|
|
53
|
-
shouldDisableMonth:
|
|
54
|
-
shouldDisableYear:
|
|
55
|
-
showDaysOutsideCurrentMonth:
|
|
56
|
-
view:
|
|
57
|
-
views:
|
|
55
|
+
shouldDisableMonth: w,
|
|
56
|
+
shouldDisableYear: x,
|
|
57
|
+
showDaysOutsideCurrentMonth: _,
|
|
58
|
+
view: c,
|
|
59
|
+
views: M
|
|
58
60
|
}
|
|
59
61
|
);
|
|
60
62
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),o=require("react"),I=require("../../../../../tedi/helpers/warn-deprecated/warn-deprecated.cjs.js"),O=require("../mui-input-transition/mui-input-transition.cjs.js"),h=require("../../../../../../external/@mui/x-date-pickers/TimePicker/TimePicker.cjs.js"),w=c=>{I.warnDeprecated("Community TimePicker","Use `TimeField` from `@tedi-design-system/react/tedi` instead.");const{defaultValue:m,onChange:n,value:t,disabled:p,readOnly:u,inputFormat:a="HH:mm",toolbarTitle:f,maxTime:T,minTime:y,minutesStep:P=1,onError:k,shouldDisableTime:x,views:b=["hours","minutes"],ampm:g=!1,onClose:r,...q}=c,[l,v]=o.useState(m||null),[C,i]=o.useState(!1),S=o.useMemo(()=>n&&typeof t<"u"?t:l,[l,n,t]),s=e=>{!(e!=null&&e.isValid())&&e!==null||(typeof t>"u"&&v(e),n==null||n(e))},j=()=>{i(!1),r==null||r()};return d.jsx(h.TimePicker,{"data-name":"timepicker",value:S,onChange:s,open:C,onOpen:()=>i(!0),onClose:j,renderInput:e=>d.jsx(O.default,{muiTextfieldProps:e,inputFormat:a,onChangeHandler:s,textfieldProps:{...q,onClear:()=>s(null),onIconClick:u?void 0:()=>i(H=>!H)},type:"time"}),disabled:p,readOnly:u,inputFormat:a,toolbarTitle:f,maxTime:T,minTime:y,minutesStep:P,onError:k,shouldDisableTime:x,views:b,ampm:g})};exports.TimePicker=w;
|
|
@@ -1,67 +1,69 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import s from "react";
|
|
3
|
+
import { warnDeprecated as O } from "../../../../../tedi/helpers/warn-deprecated/warn-deprecated.es.js";
|
|
3
4
|
import S from "../mui-input-transition/mui-input-transition.es.js";
|
|
4
5
|
import { TimePicker as V } from "../../../../../../external/@mui/x-date-pickers/TimePicker/TimePicker.es.js";
|
|
5
|
-
const
|
|
6
|
+
const E = (d) => {
|
|
7
|
+
O("Community TimePicker", "Use `TimeField` from `@tedi-design-system/react/tedi` instead.");
|
|
6
8
|
const {
|
|
7
9
|
defaultValue: p,
|
|
8
10
|
onChange: n,
|
|
9
|
-
value:
|
|
11
|
+
value: t,
|
|
10
12
|
disabled: f,
|
|
11
|
-
readOnly:
|
|
12
|
-
inputFormat:
|
|
13
|
+
readOnly: a,
|
|
14
|
+
inputFormat: l = "HH:mm",
|
|
13
15
|
toolbarTitle: c,
|
|
14
16
|
maxTime: T,
|
|
15
17
|
minTime: k,
|
|
16
|
-
minutesStep:
|
|
18
|
+
minutesStep: y = 1,
|
|
17
19
|
onError: C,
|
|
18
|
-
shouldDisableTime:
|
|
19
|
-
views:
|
|
20
|
-
ampm:
|
|
20
|
+
shouldDisableTime: P,
|
|
21
|
+
views: x = ["hours", "minutes"],
|
|
22
|
+
ampm: H = !1,
|
|
21
23
|
onClose: r,
|
|
22
|
-
...
|
|
23
|
-
} = d, [
|
|
24
|
-
!(e != null && e.isValid()) && e !== null || (typeof
|
|
24
|
+
...v
|
|
25
|
+
} = d, [m, I] = s.useState(p || null), [b, i] = s.useState(!1), g = s.useMemo(() => n && typeof t < "u" ? t : m, [m, n, t]), o = (e) => {
|
|
26
|
+
!(e != null && e.isValid()) && e !== null || (typeof t > "u" && I(e), n == null || n(e));
|
|
25
27
|
};
|
|
26
|
-
return /* @__PURE__ */
|
|
28
|
+
return /* @__PURE__ */ u(
|
|
27
29
|
V,
|
|
28
30
|
{
|
|
29
31
|
"data-name": "timepicker",
|
|
30
|
-
value:
|
|
31
|
-
onChange:
|
|
32
|
+
value: g,
|
|
33
|
+
onChange: o,
|
|
32
34
|
open: b,
|
|
33
|
-
onOpen: () =>
|
|
35
|
+
onOpen: () => i(!0),
|
|
34
36
|
onClose: () => {
|
|
35
|
-
|
|
37
|
+
i(!1), r == null || r();
|
|
36
38
|
},
|
|
37
|
-
renderInput: (e) => /* @__PURE__ */
|
|
39
|
+
renderInput: (e) => /* @__PURE__ */ u(
|
|
38
40
|
S,
|
|
39
41
|
{
|
|
40
42
|
muiTextfieldProps: e,
|
|
41
|
-
inputFormat:
|
|
42
|
-
onChangeHandler:
|
|
43
|
+
inputFormat: l,
|
|
44
|
+
onChangeHandler: o,
|
|
43
45
|
textfieldProps: {
|
|
44
|
-
...
|
|
45
|
-
onClear: () =>
|
|
46
|
-
onIconClick:
|
|
46
|
+
...v,
|
|
47
|
+
onClear: () => o(null),
|
|
48
|
+
onIconClick: a ? void 0 : () => i((h) => !h)
|
|
47
49
|
},
|
|
48
50
|
type: "time"
|
|
49
51
|
}
|
|
50
52
|
),
|
|
51
53
|
disabled: f,
|
|
52
|
-
readOnly:
|
|
53
|
-
inputFormat:
|
|
54
|
+
readOnly: a,
|
|
55
|
+
inputFormat: l,
|
|
54
56
|
toolbarTitle: c,
|
|
55
57
|
maxTime: T,
|
|
56
58
|
minTime: k,
|
|
57
|
-
minutesStep:
|
|
59
|
+
minutesStep: y,
|
|
58
60
|
onError: C,
|
|
59
|
-
shouldDisableTime:
|
|
60
|
-
views:
|
|
61
|
-
ampm:
|
|
61
|
+
shouldDisableTime: P,
|
|
62
|
+
views: x,
|
|
63
|
+
ampm: H
|
|
62
64
|
}
|
|
63
65
|
);
|
|
64
66
|
};
|
|
65
67
|
export {
|
|
66
|
-
|
|
68
|
+
E as TimePicker
|
|
67
69
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),x=require("../../../../../external/classnames/index.cjs.js"),i=require("react")
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),x=require("../../../../../external/classnames/index.cjs.js"),i=require("react"),$=require("../../../../tedi/components/base/icon/icon.cjs.js"),z=require("../../../../tedi/components/loaders/spinner/spinner.cjs.js"),B=require("../../../../tedi/helpers/warn-deprecated/warn-deprecated.cjs.js"),k=require("../../button/button.cjs.js"),e=require("./toggle.module.scss.cjs.js"),y=i.forwardRef((c,C)=>{B.warnDeprecated("Community Toggle","Use `Toggle` from `@tedi-design-system/react/tedi` instead.");const{ariaLabel:j,className:N,checked:n,defaultChecked:q,onChange:a,size:r=c.icon?"large":"medium",color:T="default",type:g,icon:w,disabled:u=!1,isLoading:d=!1,extraContent:f,label:m,...l}=c,[p,S]=i.useState(q||!1),o=i.useMemo(()=>a&&typeof n<"u"?n:p,[a,p,n]),v=x.default(e.default.toggle,e.default[`toggle--${r}`],e.default[`toggle--${T}`],{[e.default["toggle--active"]]:o,[e.default["toggle--disabled"]]:u,[e.default[`toggle--${g}`]]:g},N),_=()=>{if(d)return;const s=!o;typeof n>"u"&&S(s),a==null||a(s)},h={noStyle:!0,type:"button","aria-label":j,"aria-pressed":o,disabled:u,"aria-disabled":d,...l,onClick:_};return t.jsxs("div",{className:e.default["toggle-wrapper"],children:[t.jsx(k.Button,{...h,onClick:s=>{var b;(b=l==null?void 0:l.onClick)==null||b.call(l,s),_()},ref:C,"data-name":"toggle",className:v,children:t.jsx("span",{className:e.default.toggle__dot,children:d?t.jsx(z.Spinner,{size:r==="large"?16:10,className:x.default(e.default.toggle__icon,e.default.toggle__spinner)}):w?t.jsx($.Icon,{className:e.default.toggle__icon,name:o?"lock_open_right":"lock",size:16}):null})}),m&&t.jsx(k.Button,{...h,className:e.default.toggle__label,"aria-hidden":!0,tabIndex:-1,children:m}),f&&t.jsx("div",{className:e.default["toggle__extra-content"],children:f})]})});y.displayName="Toggle";exports.Toggle=y;
|
|
@@ -1,27 +1,29 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as S, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import k from "../../../../../external/classnames/index.es.js";
|
|
3
3
|
import b, { forwardRef as $ } from "react";
|
|
4
4
|
import { Icon as j } from "../../../../tedi/components/base/icon/icon.es.js";
|
|
5
5
|
import { Spinner as B } from "../../../../tedi/components/loaders/spinner/spinner.es.js";
|
|
6
|
-
import {
|
|
6
|
+
import { warnDeprecated as L } from "../../../../tedi/helpers/warn-deprecated/warn-deprecated.es.js";
|
|
7
|
+
import { Button as C } from "../../button/button.es.js";
|
|
7
8
|
import e from "./toggle.module.scss.es.js";
|
|
8
|
-
const
|
|
9
|
+
const M = $((r, N) => {
|
|
10
|
+
L("Community Toggle", "Use `Toggle` from `@tedi-design-system/react/tedi` instead.");
|
|
9
11
|
const {
|
|
10
12
|
ariaLabel: y,
|
|
11
13
|
className: x,
|
|
12
|
-
checked:
|
|
13
|
-
defaultChecked:
|
|
14
|
-
onChange:
|
|
14
|
+
checked: l,
|
|
15
|
+
defaultChecked: T,
|
|
16
|
+
onChange: a,
|
|
15
17
|
size: c = r.icon ? "large" : "medium",
|
|
16
18
|
color: w = "default",
|
|
17
19
|
type: g,
|
|
18
|
-
icon:
|
|
20
|
+
icon: v,
|
|
19
21
|
disabled: d = !1,
|
|
20
|
-
isLoading:
|
|
22
|
+
isLoading: s = !1,
|
|
21
23
|
extraContent: m,
|
|
22
24
|
label: f,
|
|
23
|
-
...
|
|
24
|
-
} = r, [p,
|
|
25
|
+
...t
|
|
26
|
+
} = r, [p, z] = b.useState(T || !1), n = b.useMemo(() => a && typeof l < "u" ? l : p, [a, p, l]), I = k(
|
|
25
27
|
e.toggle,
|
|
26
28
|
e[`toggle--${c}`],
|
|
27
29
|
e[`toggle--${w}`],
|
|
@@ -32,46 +34,46 @@ const L = $((r, C) => {
|
|
|
32
34
|
},
|
|
33
35
|
x
|
|
34
36
|
), u = () => {
|
|
35
|
-
if (
|
|
37
|
+
if (s)
|
|
36
38
|
return;
|
|
37
|
-
const
|
|
38
|
-
typeof
|
|
39
|
+
const i = !n;
|
|
40
|
+
typeof l > "u" && z(i), a == null || a(i);
|
|
39
41
|
}, _ = {
|
|
40
42
|
noStyle: !0,
|
|
41
43
|
type: "button",
|
|
42
44
|
"aria-label": y,
|
|
43
45
|
"aria-pressed": n,
|
|
44
46
|
disabled: d,
|
|
45
|
-
"aria-disabled":
|
|
46
|
-
...
|
|
47
|
+
"aria-disabled": s,
|
|
48
|
+
...t,
|
|
47
49
|
onClick: u
|
|
48
50
|
};
|
|
49
|
-
return /* @__PURE__ */
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
|
|
51
|
+
return /* @__PURE__ */ S("div", { className: e["toggle-wrapper"], children: [
|
|
52
|
+
/* @__PURE__ */ o(
|
|
53
|
+
C,
|
|
52
54
|
{
|
|
53
55
|
..._,
|
|
54
|
-
onClick: (
|
|
56
|
+
onClick: (i) => {
|
|
55
57
|
var h;
|
|
56
|
-
(h =
|
|
58
|
+
(h = t == null ? void 0 : t.onClick) == null || h.call(t, i), u();
|
|
57
59
|
},
|
|
58
|
-
ref:
|
|
60
|
+
ref: N,
|
|
59
61
|
"data-name": "toggle",
|
|
60
|
-
className:
|
|
61
|
-
children: /* @__PURE__ */
|
|
62
|
+
className: I,
|
|
63
|
+
children: /* @__PURE__ */ o("span", { className: e.toggle__dot, children: s ? /* @__PURE__ */ o(
|
|
62
64
|
B,
|
|
63
65
|
{
|
|
64
66
|
size: c === "large" ? 16 : 10,
|
|
65
67
|
className: k(e.toggle__icon, e.toggle__spinner)
|
|
66
68
|
}
|
|
67
|
-
) :
|
|
69
|
+
) : v ? /* @__PURE__ */ o(j, { className: e.toggle__icon, name: n ? "lock_open_right" : "lock", size: 16 }) : null })
|
|
68
70
|
}
|
|
69
71
|
),
|
|
70
|
-
f && /* @__PURE__ */
|
|
71
|
-
m && /* @__PURE__ */
|
|
72
|
+
f && /* @__PURE__ */ o(C, { ..._, className: e.toggle__label, "aria-hidden": !0, tabIndex: -1, children: f }),
|
|
73
|
+
m && /* @__PURE__ */ o("div", { className: e["toggle__extra-content"], children: m })
|
|
72
74
|
] });
|
|
73
75
|
});
|
|
74
|
-
|
|
76
|
+
M.displayName = "Toggle";
|
|
75
77
|
export {
|
|
76
|
-
|
|
78
|
+
M as Toggle
|
|
77
79
|
};
|
package/src/community/components/map-components/base-map-selection/base-map-selection.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),C=require("../../../../../external/classnames/index.cjs.js"),h=require("react"),I=require("../../../../tedi/components/buttons/button/button.cjs.js"),P=require("../../../../tedi/components/form/field/field.cjs.js"),R=require("../../../../tedi/components/form/input-group/input-group.cjs.js"),k=require("../../../../tedi/components/form/slider/slider.cjs.js"),G=require("../map-button/map-button.cjs.js"),x=require("./base-map-option.cjs.js"),t=require("./base-map-selection.module.scss.cjs.js"),$=require("../../../../tedi/providers/label-provider/use-labels.cjs.js"),f=require("../../../../tedi/helpers/hooks/use-breakpoint.cjs.js"),r=require("../../../../tedi/components/overlays/popover/popover.cjs.js"),z=require("../../../../tedi/components/form/input-group/components/input/input.cjs.js"),D=require("../../../../tedi/components/form/input-group/components/suffix/suffix.cjs.js"),o=s=>{const n=Number(s);return Number.isNaN(n)?0:Math.min(100,Math.max(0,n))};function l(s){const{title:n,content:y,children:j,multiple:g=!1,showTransparency:q=!1,transparency:c,defaultTransparency:M,onTransparencyChange:i,id:a}=s,{getLabel:B}=$.useLabels(),S=f.isBreakpointBelow(f.default(),"md"),[v,_]=h.useState(!1),u=B("baseMapSelection.transparency"),d=c!==void 0,[N,L]=h.useState(()=>o(M??0)),p=o(d?c:N),m=w=>{const b=o(w);d||L(b),i==null||i(b)},O=C.default(t.default["tedi-base-map-selection__wrapper"],t.default["tedi-base-map-selection--button"],g&&t.default["tedi-base-map-selection--multiple"]),T=S?e.jsx(G.MapButton,{id:a,icon:"map",showDropdownIndicator:!0,hideLabel:!0,iconSize:24,tooltipContent:null,selected:v,children:n}):e.jsxs(I.Button,{noStyle:!0,id:a,className:O,children:[e.jsx("div",{className:t.default["tedi-base-map-selection__content"],"aria-hidden":!0,children:y}),e.jsx("div",{className:t.default["tedi-base-map-selection__title"],children:n})]});return e.jsxs(r.Popover,{placement:"top-start",onToggle:_,children:[e.jsx(r.Popover.Trigger,{children:T}),e.jsxs(r.Popover.Content,{width:"medium",children:[e.jsx("div",{className:t.default["tedi-base-map-selection__options"],children:j}),q&&e.jsx("div",{className:t.default["tedi-base-map-selection__transparency"],children:e.jsx(k.Slider,{"aria-label":u,min:0,max:100,value:p,onChange:m,minLabel:"0%",maxLabel:"100%",addonRight:e.jsx("div",{className:t.default["tedi-base-map-selection__transparency-field"],children:e.jsxs(R.InputGroupBase,{id:`${a}-transparency`,label:u,hideLabel:!0,children:[e.jsx(z.Input,{children:e.jsx(P.Field,{type:"number",id:`${a}-transparency`,value:String(p),onChange:m})}),e.jsx(D.Suffix,{children:"%"})]})})})})]})]})}l.Option=x.BaseMapOption;l.displayName="BaseMapSelection";exports.BaseMapOption=x.BaseMapOption;exports.BaseMapSelection=l;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import O from "../../../../../external/classnames/index.es.js";
|
|
3
3
|
import { useState as h } from "react";
|
|
4
4
|
import { Button as j } from "../../../../tedi/components/buttons/button/button.es.js";
|
|
5
5
|
import { Field as k } from "../../../../tedi/components/form/field/field.es.js";
|
|
6
6
|
import { InputGroupBase as $ } from "../../../../tedi/components/form/input-group/input-group.es.js";
|
|
7
|
-
import { Slider as
|
|
8
|
-
import { MapButton as
|
|
9
|
-
import { BaseMapOption as
|
|
7
|
+
import { Slider as z } from "../../../../tedi/components/form/slider/slider.es.js";
|
|
8
|
+
import { MapButton as D } from "../map-button/map-button.es.js";
|
|
9
|
+
import { BaseMapOption as E } from "./base-map-option.es.js";
|
|
10
10
|
import t from "./base-map-selection.module.scss.es.js";
|
|
11
|
-
import { useLabels as
|
|
12
|
-
import
|
|
11
|
+
import { useLabels as F } from "../../../../tedi/providers/label-provider/use-labels.es.js";
|
|
12
|
+
import G, { isBreakpointBelow as P } from "../../../../tedi/helpers/hooks/use-breakpoint.es.js";
|
|
13
13
|
import { Popover as s } from "../../../../tedi/components/overlays/popover/popover.es.js";
|
|
14
|
-
import { Input as
|
|
15
|
-
import { Suffix as
|
|
14
|
+
import { Input as R } from "../../../../tedi/components/form/input-group/components/input/input.es.js";
|
|
15
|
+
import { Suffix as U } from "../../../../tedi/components/form/input-group/components/suffix/suffix.es.js";
|
|
16
16
|
const l = (i) => {
|
|
17
17
|
const n = Number(i);
|
|
18
18
|
return Number.isNaN(n) ? 0 : Math.min(100, Math.max(0, n));
|
|
@@ -28,25 +28,25 @@ function b(i) {
|
|
|
28
28
|
defaultTransparency: B,
|
|
29
29
|
onTransparencyChange: o,
|
|
30
30
|
id: a
|
|
31
|
-
} = i, { getLabel: v } =
|
|
31
|
+
} = i, { getLabel: v } = F(), x = P(G(), "md"), [M, S] = h(!1), p = v("baseMapSelection.transparency"), m = c !== void 0, [L, T] = h(
|
|
32
32
|
() => l(B ?? 0)
|
|
33
|
-
), d = l(m ? c : L), u = (
|
|
34
|
-
const f = l(
|
|
33
|
+
), d = l(m ? c : L), u = (I) => {
|
|
34
|
+
const f = l(I);
|
|
35
35
|
m || T(f), o == null || o(f);
|
|
36
|
-
},
|
|
36
|
+
}, w = O(
|
|
37
37
|
t["tedi-base-map-selection__wrapper"],
|
|
38
38
|
t["tedi-base-map-selection--button"],
|
|
39
39
|
N && t["tedi-base-map-selection--multiple"]
|
|
40
|
-
),
|
|
40
|
+
), C = x ? /* @__PURE__ */ e(D, { id: a, icon: "map", showDropdownIndicator: !0, hideLabel: !0, iconSize: 24, tooltipContent: null, selected: M, children: n }) : /* @__PURE__ */ r(j, { noStyle: !0, id: a, className: w, children: [
|
|
41
41
|
/* @__PURE__ */ e("div", { className: t["tedi-base-map-selection__content"], "aria-hidden": !0, children: y }),
|
|
42
42
|
/* @__PURE__ */ e("div", { className: t["tedi-base-map-selection__title"], children: n })
|
|
43
43
|
] });
|
|
44
44
|
return /* @__PURE__ */ r(s, { placement: "top-start", onToggle: S, children: [
|
|
45
|
-
/* @__PURE__ */ e(s.Trigger, { children:
|
|
45
|
+
/* @__PURE__ */ e(s.Trigger, { children: C }),
|
|
46
46
|
/* @__PURE__ */ r(s.Content, { width: "medium", children: [
|
|
47
47
|
/* @__PURE__ */ e("div", { className: t["tedi-base-map-selection__options"], children: g }),
|
|
48
48
|
_ && /* @__PURE__ */ e("div", { className: t["tedi-base-map-selection__transparency"], children: /* @__PURE__ */ e(
|
|
49
|
-
|
|
49
|
+
z,
|
|
50
50
|
{
|
|
51
51
|
"aria-label": p,
|
|
52
52
|
min: 0,
|
|
@@ -56,7 +56,7 @@ function b(i) {
|
|
|
56
56
|
minLabel: "0%",
|
|
57
57
|
maxLabel: "100%",
|
|
58
58
|
addonRight: /* @__PURE__ */ e("div", { className: t["tedi-base-map-selection__transparency-field"], children: /* @__PURE__ */ r($, { id: `${a}-transparency`, label: p, hideLabel: !0, children: [
|
|
59
|
-
/* @__PURE__ */ e(
|
|
59
|
+
/* @__PURE__ */ e(R, { children: /* @__PURE__ */ e(
|
|
60
60
|
k,
|
|
61
61
|
{
|
|
62
62
|
type: "number",
|
|
@@ -65,16 +65,16 @@ function b(i) {
|
|
|
65
65
|
onChange: u
|
|
66
66
|
}
|
|
67
67
|
) }),
|
|
68
|
-
/* @__PURE__ */ e(
|
|
68
|
+
/* @__PURE__ */ e(U, { children: "%" })
|
|
69
69
|
] }) })
|
|
70
70
|
}
|
|
71
71
|
) })
|
|
72
72
|
] })
|
|
73
73
|
] });
|
|
74
74
|
}
|
|
75
|
-
b.Option =
|
|
75
|
+
b.Option = E;
|
|
76
76
|
b.displayName = "BaseMapSelection";
|
|
77
77
|
export {
|
|
78
|
-
|
|
78
|
+
E as BaseMapOption,
|
|
79
79
|
b as BaseMapSelection
|
|
80
80
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),i=require("../../../../../external/classnames/index.cjs.js"),c=require("react"),d=require("../../../../tedi/components/buttons/floating-button/floating-button.cjs.js"),e=require("./carousel.module.scss.cjs.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),i=require("../../../../../external/classnames/index.cjs.js"),c=require("react"),d=require("../../../../tedi/components/buttons/floating-button/floating-button.cjs.js"),y=require("../../../../tedi/helpers/warn-deprecated/warn-deprecated.cjs.js"),e=require("./carousel.module.scss.cjs.js"),p=u=>{y.warnDeprecated("Community Carousel","Use `Carousel` from `@tedi-design-system/react/tedi` instead.");const{itemCountShown:l,children:m,className:f}=u,[s,r]=c.useState(0),n=c.Children.toArray(m),o=n.length,_=()=>{s+l<o&&r(a=>a+1)},x=()=>{s>0&&r(a=>a-1)},v=`translateX(-${100/l*s}%)`;return t.jsxs("div",{className:`${e.default["tedi-carousel__wrapper"]} ${f??""}`,children:[t.jsx(d.FloatingButton,{className:i.default(e.default["tedi-carousel__navigation-button"],e.default["tedi-carousel__prev"]),onClick:x,visualType:"secondary",disabled:s===0,icon:"west",children:"Prev"}),t.jsx("div",{className:e.default["tedi-carousel__viewport"],children:t.jsx("div",{className:e.default["tedi-carousel__carousel-track"],style:{transform:v},children:n.map((a,h)=>t.jsx("div",{className:e.default["tedi-carousel__item"],style:{flex:`0 0 ${100/l}%`},children:a},h))})}),t.jsx(d.FloatingButton,{className:i.default(e.default["tedi-carousel__navigation-button"],e.default["tedi-carousel__next"]),onClick:_,visualType:"secondary",disabled:s+l>=o,icon:"east",children:"Next"})]})};exports.Carousel=p;
|