@dmsi/wedgekit-react 0.0.864 → 0.0.865
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-3N34VVYD.js +154 -0
- package/dist/{chunk-57HL5K5I.js → chunk-4DPSNQCM.js} +1 -1
- package/dist/{chunk-BH4UKMXV.js → chunk-5NRKL5CJ.js} +3 -3
- package/dist/{chunk-A57PKP6Z.js → chunk-E7XBOMT4.js} +6 -6
- package/dist/{chunk-CJPGHBV5.js → chunk-EGECC3PQ.js} +1 -1
- package/dist/{chunk-ZL6NXIGS.js → chunk-HT57FLRW.js} +1 -1
- package/dist/{chunk-BXEE6VGQ.js → chunk-KLH67DTH.js} +6 -23
- package/dist/{chunk-C5DKGJ4E.js → chunk-KOKA2IJC.js} +4 -4
- package/dist/{chunk-IPQIZG7U.js → chunk-N36EJLRW.js} +1 -1
- package/dist/{chunk-RFF2EFBX.js → chunk-OM7QLLI2.js} +2 -2
- package/dist/{chunk-FXJ7C6RF.js → chunk-PE3EZP56.js} +1 -1
- package/dist/chunk-WVGXD7HT.js +19 -0
- package/dist/{chunk-7OLDYFKY.js → chunk-X3NDEFVA.js} +1 -1
- package/dist/chunk-YV5FS7NV.js +89 -0
- package/dist/chunk-Z2HPSFEQ.js +14 -0
- package/dist/{chunk-RTZO2OU7.js → chunk-Z7XANQ47.js} +1 -1
- package/dist/components/CalendarRange.cjs +65 -46
- package/dist/components/CalendarRange.css +13 -0
- package/dist/components/CalendarRange.js +17 -14
- package/dist/components/CompactImagesPreview.js +3 -2
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +23 -4
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.css +13 -0
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +17 -14
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +32 -13
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.css +13 -0
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +17 -14
- package/dist/components/DataGrid/PinnedColumns.cjs +48 -29
- package/dist/components/DataGrid/PinnedColumns.css +13 -0
- package/dist/components/DataGrid/PinnedColumns.js +17 -14
- package/dist/components/DataGrid/TableBody/LoadingCell.cjs +24 -5
- package/dist/components/DataGrid/TableBody/LoadingCell.css +13 -0
- package/dist/components/DataGrid/TableBody/LoadingCell.js +17 -14
- package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +30 -11
- package/dist/components/DataGrid/TableBody/TableBodyRow.css +13 -0
- package/dist/components/DataGrid/TableBody/TableBodyRow.js +17 -14
- package/dist/components/DataGrid/TableBody/index.cjs +45 -26
- package/dist/components/DataGrid/TableBody/index.css +13 -0
- package/dist/components/DataGrid/TableBody/index.js +17 -14
- package/dist/components/DataGrid/index.cjs +135 -116
- package/dist/components/DataGrid/index.css +13 -0
- package/dist/components/DataGrid/index.js +17 -14
- package/dist/components/DataGrid/utils.cjs +24 -5
- package/dist/components/DataGrid/utils.css +13 -0
- package/dist/components/DataGrid/utils.js +17 -14
- package/dist/components/DataGridCell.js +6 -5
- package/dist/components/DateInput.cjs +85 -66
- package/dist/components/DateInput.css +13 -0
- package/dist/components/DateInput.js +17 -14
- package/dist/components/DateRangeInput.cjs +84 -65
- package/dist/components/DateRangeInput.css +13 -0
- package/dist/components/DateRangeInput.js +17 -14
- package/dist/components/EmblaCarousel/ArrowButtons.cjs +147 -0
- package/dist/components/EmblaCarousel/ArrowButtons.js +9 -0
- package/dist/components/EmblaCarousel/SelectedSnapDisplay.cjs +38 -0
- package/dist/components/EmblaCarousel/SelectedSnapDisplay.js +7 -0
- package/dist/components/EmblaCarousel/index.cjs +266 -2
- package/dist/components/EmblaCarousel/index.js +4 -1
- package/dist/components/Menu.js +4 -3
- package/dist/components/MenuOption.js +3 -2
- package/dist/components/MobileDataGrid/ColumnList.css +13 -0
- package/dist/components/MobileDataGrid/ColumnList.js +1 -1
- package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +31 -12
- package/dist/components/MobileDataGrid/ColumnSelector/index.css +13 -0
- package/dist/components/MobileDataGrid/ColumnSelector/index.js +17 -14
- package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +1 -1
- package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +39 -20
- package/dist/components/MobileDataGrid/MobileDataGridHeader.css +13 -0
- package/dist/components/MobileDataGrid/MobileDataGridHeader.js +17 -14
- package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +1 -1
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +5 -4
- package/dist/components/MobileDataGrid/index.cjs +151 -132
- package/dist/components/MobileDataGrid/index.css +13 -0
- package/dist/components/MobileDataGrid/index.js +17 -14
- package/dist/components/Modal.js +3 -2
- package/dist/components/NestedMenu.js +3 -2
- package/dist/components/PDFViewer/DownloadIcon.js +4 -3
- package/dist/components/PDFViewer/index.js +5 -4
- package/dist/components/Password.js +3 -2
- package/dist/components/ProductImagePreview/index.js +4 -3
- package/dist/components/ProjectBar.js +2 -1
- package/dist/components/Stepper.js +3 -2
- package/dist/components/Tooltip.js +3 -2
- package/dist/components/index.cjs +222 -2
- package/dist/components/index.css +13 -0
- package/dist/components/index.js +17 -14
- package/dist/components/useMenuSystem.js +3 -2
- package/dist/hooks/index.js +5 -3
- package/dist/index.css +13 -0
- package/package.json +3 -3
- package/dist/chunk-SZ47M32R.js +0 -13
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NextButton,
|
|
3
|
+
PrevButton
|
|
4
|
+
} from "./chunk-YV5FS7NV.js";
|
|
5
|
+
import {
|
|
6
|
+
SelectedSnapDisplay
|
|
7
|
+
} from "./chunk-Z2HPSFEQ.js";
|
|
8
|
+
import {
|
|
9
|
+
useMatchesMobile
|
|
10
|
+
} from "./chunk-WVGXD7HT.js";
|
|
11
|
+
|
|
12
|
+
// src/components/EmblaCarousel/index.tsx
|
|
13
|
+
import { useCallback as useCallback3, useEffect as useEffect3, useRef } from "react";
|
|
14
|
+
import useEmblaCarousel from "embla-carousel-react";
|
|
15
|
+
|
|
16
|
+
// src/components/EmblaCarousel/useSelectedSnapDisplay.ts
|
|
17
|
+
import { useCallback, useEffect, useState } from "react";
|
|
18
|
+
var useSelectedSnapDisplay = (emblaApi) => {
|
|
19
|
+
const [selectedSnap, setSelectedSnap] = useState(0);
|
|
20
|
+
const [snapCount, setSnapCount] = useState(0);
|
|
21
|
+
const updateScrollSnapState = useCallback((emblaApi2) => {
|
|
22
|
+
setSnapCount(emblaApi2.slideNodes().length);
|
|
23
|
+
setSelectedSnap(emblaApi2.selectedSnap());
|
|
24
|
+
}, []);
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
if (!emblaApi) return;
|
|
27
|
+
updateScrollSnapState(emblaApi);
|
|
28
|
+
emblaApi.on("select", updateScrollSnapState);
|
|
29
|
+
emblaApi.on("reinit", updateScrollSnapState);
|
|
30
|
+
}, [emblaApi, updateScrollSnapState]);
|
|
31
|
+
return {
|
|
32
|
+
selectedSnap,
|
|
33
|
+
snapCount
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
// src/components/EmblaCarousel/usePrevNextButtons.ts
|
|
38
|
+
import { useCallback as useCallback2, useEffect as useEffect2, useState as useState2 } from "react";
|
|
39
|
+
var usePrevNextButtons = (emblaApi) => {
|
|
40
|
+
const [prevBtnDisabled, setPrevBtnDisabled] = useState2(true);
|
|
41
|
+
const [nextBtnDisabled, setNextBtnDisabled] = useState2(true);
|
|
42
|
+
const onPrevButtonClick = useCallback2(() => {
|
|
43
|
+
if (!emblaApi) return;
|
|
44
|
+
emblaApi.goToPrev();
|
|
45
|
+
}, [emblaApi]);
|
|
46
|
+
const onNextButtonClick = useCallback2(() => {
|
|
47
|
+
if (!emblaApi) return;
|
|
48
|
+
emblaApi.goToNext();
|
|
49
|
+
}, [emblaApi]);
|
|
50
|
+
const onSelect = useCallback2((emblaApi2) => {
|
|
51
|
+
setPrevBtnDisabled(!emblaApi2.canGoToPrev());
|
|
52
|
+
setNextBtnDisabled(!emblaApi2.canGoToNext());
|
|
53
|
+
}, []);
|
|
54
|
+
useEffect2(() => {
|
|
55
|
+
if (!emblaApi) return;
|
|
56
|
+
onSelect(emblaApi);
|
|
57
|
+
emblaApi.on("reinit", onSelect).on("select", onSelect);
|
|
58
|
+
}, [emblaApi, onSelect]);
|
|
59
|
+
return {
|
|
60
|
+
prevBtnDisabled,
|
|
61
|
+
nextBtnDisabled,
|
|
62
|
+
onPrevButtonClick,
|
|
63
|
+
onNextButtonClick
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
// src/components/EmblaCarousel/index.tsx
|
|
68
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
69
|
+
var TWEEN_FACTOR_BASE = 0.2;
|
|
70
|
+
var EmblaCarousel = ({ options, children }) => {
|
|
71
|
+
const [emblaRef, emblaApi] = useEmblaCarousel(options);
|
|
72
|
+
const tweenFactor = useRef(0);
|
|
73
|
+
const tweenNodes = useRef([]);
|
|
74
|
+
const isMobile = useMatchesMobile();
|
|
75
|
+
const {
|
|
76
|
+
prevBtnDisabled,
|
|
77
|
+
nextBtnDisabled,
|
|
78
|
+
onPrevButtonClick,
|
|
79
|
+
onNextButtonClick
|
|
80
|
+
} = usePrevNextButtons(emblaApi);
|
|
81
|
+
const { selectedSnap, snapCount } = useSelectedSnapDisplay(emblaApi);
|
|
82
|
+
const setTweenNodes = useCallback3((emblaApi2) => {
|
|
83
|
+
tweenNodes.current = emblaApi2.slideNodes().map((slideNode) => {
|
|
84
|
+
return slideNode.querySelector(".embla__parallax__layer");
|
|
85
|
+
});
|
|
86
|
+
}, []);
|
|
87
|
+
const setTweenFactor = useCallback3((emblaApi2) => {
|
|
88
|
+
tweenFactor.current = TWEEN_FACTOR_BASE * emblaApi2.snapList().length;
|
|
89
|
+
}, []);
|
|
90
|
+
const tweenParallax = useCallback3(
|
|
91
|
+
(emblaApi2, event) => {
|
|
92
|
+
const engine = emblaApi2.internalEngine();
|
|
93
|
+
const scrollProgress = emblaApi2.scrollProgress();
|
|
94
|
+
const slidesInView = emblaApi2.slidesInView();
|
|
95
|
+
const isScrollEvent = (event == null ? void 0 : event.type) === "scroll";
|
|
96
|
+
emblaApi2.snapList().forEach((scrollSnap, snapIndex) => {
|
|
97
|
+
let diffToTarget = scrollSnap - scrollProgress;
|
|
98
|
+
const slidesInSnap = engine.scrollSnapList.slidesBySnap[snapIndex];
|
|
99
|
+
slidesInSnap.forEach((slideIndex) => {
|
|
100
|
+
if (isScrollEvent && !slidesInView.includes(slideIndex)) return;
|
|
101
|
+
if (engine.options.loop) {
|
|
102
|
+
engine.slideLooper.loopPoints.forEach((loopItem) => {
|
|
103
|
+
const target = loopItem.target();
|
|
104
|
+
if (slideIndex === loopItem.index && target !== 0) {
|
|
105
|
+
const sign = Math.sign(target);
|
|
106
|
+
if (sign === -1) {
|
|
107
|
+
diffToTarget = scrollSnap - (1 + scrollProgress);
|
|
108
|
+
}
|
|
109
|
+
if (sign === 1) {
|
|
110
|
+
diffToTarget = scrollSnap + (1 - scrollProgress);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
const translate = diffToTarget * (-1 * tweenFactor.current) * 100;
|
|
116
|
+
const tweenNode = tweenNodes.current[slideIndex];
|
|
117
|
+
if (tweenNode) {
|
|
118
|
+
tweenNode.style.transform = `translateX(${translate}%)`;
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
},
|
|
123
|
+
[]
|
|
124
|
+
);
|
|
125
|
+
useEffect3(() => {
|
|
126
|
+
if (!emblaApi || !isMobile) return;
|
|
127
|
+
setTweenNodes(emblaApi);
|
|
128
|
+
setTweenFactor(emblaApi);
|
|
129
|
+
tweenParallax(emblaApi);
|
|
130
|
+
emblaApi.on("reinit", setTweenNodes).on("reinit", setTweenFactor).on("reinit", tweenParallax).on("scroll", tweenParallax).on("slidefocus", tweenParallax);
|
|
131
|
+
}, [emblaApi, tweenParallax, isMobile, setTweenNodes, setTweenFactor]);
|
|
132
|
+
return /* @__PURE__ */ jsxs("section", { className: "w-full m-auto grid gap-4", children: [
|
|
133
|
+
/* @__PURE__ */ jsx("div", { className: "embla__viewport overflow-hidden", ref: emblaRef, children: /* @__PURE__ */ jsx("div", { className: "embla__container flex touch-pan-y touch-pinch-zoom gap-mobile-layout-gap desktop:gap-desktop-layout-gap compact:gap-compact-layout-gap pb-3", children }) }),
|
|
134
|
+
/* @__PURE__ */ jsxs("div", { className: "justify-between hidden desktop:flex", children: [
|
|
135
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
136
|
+
/* @__PURE__ */ jsx(PrevButton, { onClick: onPrevButtonClick, disabled: prevBtnDisabled }),
|
|
137
|
+
/* @__PURE__ */ jsx(NextButton, { onClick: onNextButtonClick, disabled: nextBtnDisabled })
|
|
138
|
+
] }),
|
|
139
|
+
/* @__PURE__ */ jsx(
|
|
140
|
+
SelectedSnapDisplay,
|
|
141
|
+
{
|
|
142
|
+
selectedSnap,
|
|
143
|
+
snapCount
|
|
144
|
+
}
|
|
145
|
+
)
|
|
146
|
+
] })
|
|
147
|
+
] });
|
|
148
|
+
};
|
|
149
|
+
var EmblaCarousel_default = EmblaCarousel;
|
|
150
|
+
|
|
151
|
+
export {
|
|
152
|
+
EmblaCarousel,
|
|
153
|
+
EmblaCarousel_default
|
|
154
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Menu
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OM7QLLI2.js";
|
|
4
4
|
import {
|
|
5
5
|
useSubMenuSystem
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PE3EZP56.js";
|
|
7
7
|
import {
|
|
8
8
|
MenuOption
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-X3NDEFVA.js";
|
|
10
10
|
import {
|
|
11
11
|
Search
|
|
12
12
|
} from "./chunk-FHXCCVOG.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
RowDetailModalProvider
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4DPSNQCM.js";
|
|
4
4
|
import {
|
|
5
5
|
GridContextProvider
|
|
6
6
|
} from "./chunk-M7INAUAJ.js";
|
|
@@ -19,19 +19,19 @@ import {
|
|
|
19
19
|
} from "./chunk-FZ2TEKOE.js";
|
|
20
20
|
import {
|
|
21
21
|
Tooltip
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-HT57FLRW.js";
|
|
23
23
|
import {
|
|
24
24
|
DataCellHeader,
|
|
25
25
|
DataGridCell,
|
|
26
26
|
DragAlongCell,
|
|
27
27
|
DraggableCellHeader
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-5NRKL5CJ.js";
|
|
29
29
|
import {
|
|
30
30
|
Menu
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-OM7QLLI2.js";
|
|
32
32
|
import {
|
|
33
33
|
MenuOption
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-X3NDEFVA.js";
|
|
35
35
|
import {
|
|
36
36
|
Search
|
|
37
37
|
} from "./chunk-FHXCCVOG.js";
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
import {
|
|
49
49
|
useInfiniteScroll,
|
|
50
50
|
useTableLayout
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-KLH67DTH.js";
|
|
52
52
|
import {
|
|
53
53
|
findDocumentRoot
|
|
54
54
|
} from "./chunk-VXWSAIB5.js";
|
|
@@ -61,24 +61,9 @@ function useInfiniteScroll({
|
|
|
61
61
|
}, [containerRef, onLoadMore, isLoading, offset, enabled]);
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
// src/hooks/useMatchesMedia.ts
|
|
65
|
-
import { useLayoutEffect, useState } from "react";
|
|
66
|
-
var useMatchesMedia = (query) => {
|
|
67
|
-
const [matches, setMatches] = useState();
|
|
68
|
-
useLayoutEffect(() => {
|
|
69
|
-
const mediaQueryList = window.matchMedia(query);
|
|
70
|
-
const listener = () => setMatches(mediaQueryList.matches);
|
|
71
|
-
listener();
|
|
72
|
-
mediaQueryList.addEventListener("change", listener);
|
|
73
|
-
return () => mediaQueryList.removeEventListener("change", listener);
|
|
74
|
-
}, [query]);
|
|
75
|
-
return matches;
|
|
76
|
-
};
|
|
77
|
-
var useMatchesMobile = () => useMatchesMedia("(width < 48rem)");
|
|
78
|
-
|
|
79
64
|
// src/hooks/useTableLayout.ts
|
|
80
65
|
import {
|
|
81
|
-
useState
|
|
66
|
+
useState,
|
|
82
67
|
useEffect as useEffect3,
|
|
83
68
|
useCallback,
|
|
84
69
|
useRef
|
|
@@ -86,8 +71,8 @@ import {
|
|
|
86
71
|
var LocalStoragePrefix = `${LocalStoragePrefixVersion}-tableLayout`;
|
|
87
72
|
var getLocalStorageKeyWithPrefix = (key) => `${LocalStoragePrefix}__${key}`;
|
|
88
73
|
function useTableLayout(initialColumns, key, autosync = true) {
|
|
89
|
-
const [columns, setColumns] =
|
|
90
|
-
const [isReady, setIsReady] =
|
|
74
|
+
const [columns, setColumns] = useState(initialColumns);
|
|
75
|
+
const [isReady, setIsReady] = useState(false);
|
|
91
76
|
const isReadyRef = useRef(false);
|
|
92
77
|
const keyRef = useRef(key);
|
|
93
78
|
useEffect3(() => {
|
|
@@ -152,10 +137,10 @@ function useTableLayout(initialColumns, key, autosync = true) {
|
|
|
152
137
|
}
|
|
153
138
|
|
|
154
139
|
// src/hooks/useEditCell.tsx
|
|
155
|
-
import { useRef as useRef2, useState as
|
|
140
|
+
import { useRef as useRef2, useState as useState2 } from "react";
|
|
156
141
|
function useEditCell(initialValue) {
|
|
157
|
-
const [value, setValue] =
|
|
158
|
-
const [isEdit, setIsEdit] =
|
|
142
|
+
const [value, setValue] = useState2(initialValue);
|
|
143
|
+
const [isEdit, setIsEdit] = useState2(false);
|
|
159
144
|
const inputRef = useRef2(null);
|
|
160
145
|
function changeToEditMode() {
|
|
161
146
|
setIsEdit(true);
|
|
@@ -180,8 +165,6 @@ function useEditCell(initialValue) {
|
|
|
180
165
|
export {
|
|
181
166
|
useKeydown,
|
|
182
167
|
useInfiniteScroll,
|
|
183
|
-
useMatchesMedia,
|
|
184
|
-
useMatchesMobile,
|
|
185
168
|
useTableLayout,
|
|
186
169
|
useEditCell
|
|
187
170
|
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CarouselPagination
|
|
3
|
+
} from "./chunk-MBZ55T2D.js";
|
|
1
4
|
import {
|
|
2
5
|
MobileImageCarousel
|
|
3
6
|
} from "./chunk-2IKT6IHB.js";
|
|
@@ -10,15 +13,12 @@ import {
|
|
|
10
13
|
import {
|
|
11
14
|
ZoomWindow
|
|
12
15
|
} from "./chunk-BQNPOGD5.js";
|
|
13
|
-
import {
|
|
14
|
-
CarouselPagination
|
|
15
|
-
} from "./chunk-MBZ55T2D.js";
|
|
16
16
|
import {
|
|
17
17
|
Grid
|
|
18
18
|
} from "./chunk-BWPNXY7T.js";
|
|
19
19
|
import {
|
|
20
20
|
useMatchesMobile
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-WVGXD7HT.js";
|
|
22
22
|
import {
|
|
23
23
|
Stack
|
|
24
24
|
} from "./chunk-MTGNBARV.js";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// src/hooks/useMatchesMedia.ts
|
|
2
|
+
import { useLayoutEffect, useState } from "react";
|
|
3
|
+
var useMatchesMedia = (query) => {
|
|
4
|
+
const [matches, setMatches] = useState();
|
|
5
|
+
useLayoutEffect(() => {
|
|
6
|
+
const mediaQueryList = window.matchMedia(query);
|
|
7
|
+
const listener = () => setMatches(mediaQueryList.matches);
|
|
8
|
+
listener();
|
|
9
|
+
mediaQueryList.addEventListener("change", listener);
|
|
10
|
+
return () => mediaQueryList.removeEventListener("change", listener);
|
|
11
|
+
}, [query]);
|
|
12
|
+
return matches;
|
|
13
|
+
};
|
|
14
|
+
var useMatchesMobile = () => useMatchesMedia("(width < 48rem)");
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
useMatchesMedia,
|
|
18
|
+
useMatchesMobile
|
|
19
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__objRest,
|
|
3
|
+
__spreadProps,
|
|
4
|
+
__spreadValues
|
|
5
|
+
} from "./chunk-ORMEWXMH.js";
|
|
6
|
+
|
|
7
|
+
// src/components/EmblaCarousel/ArrowButtons.tsx
|
|
8
|
+
import clsx from "clsx";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
var arrowButtonStyles = clsx(
|
|
11
|
+
"appearance-none bg-transparent border cursor-pointer p-2 flex items-center justify-center size-9 rounded-full transition-colors duration-300 ease-in-out"
|
|
12
|
+
);
|
|
13
|
+
var PrevButton = (props) => {
|
|
14
|
+
const _a = props, { children, disabled } = _a, restProps = __objRest(_a, ["children", "disabled"]);
|
|
15
|
+
return /* @__PURE__ */ jsxs(
|
|
16
|
+
"button",
|
|
17
|
+
__spreadProps(__spreadValues({
|
|
18
|
+
className: clsx(
|
|
19
|
+
arrowButtonStyles,
|
|
20
|
+
!disabled && "border-border-primary-normal hover:border-border-action-hover active:border-border-action-active",
|
|
21
|
+
disabled && "border-border-action-disabled"
|
|
22
|
+
),
|
|
23
|
+
type: "button"
|
|
24
|
+
}, restProps), {
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ jsx(
|
|
27
|
+
"svg",
|
|
28
|
+
{
|
|
29
|
+
className: clsx(
|
|
30
|
+
"size-3 transition-colors duration-300 ease-in-out",
|
|
31
|
+
!disabled && "text-text-primary-normal",
|
|
32
|
+
disabled && "text-icon-primary-disabled"
|
|
33
|
+
),
|
|
34
|
+
viewBox: "0 0 532 532",
|
|
35
|
+
children: /* @__PURE__ */ jsx(
|
|
36
|
+
"path",
|
|
37
|
+
{
|
|
38
|
+
fill: "currentColor",
|
|
39
|
+
d: "M355.66 11.354c13.793-13.805 36.208-13.805 50.001 0 13.785 13.804 13.785 36.238 0 50.034L201.22 266l204.442 204.61c13.785 13.805 13.785 36.239 0 50.044-13.793 13.796-36.208 13.796-50.002 0a5994246.277 5994246.277 0 0 0-229.332-229.454 35.065 35.065 0 0 1-10.326-25.126c0-9.2 3.393-18.26 10.326-25.2C172.192 194.973 332.731 34.31 355.66 11.354Z"
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
children
|
|
45
|
+
]
|
|
46
|
+
})
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
var NextButton = (props) => {
|
|
50
|
+
const _a = props, { children, disabled } = _a, restProps = __objRest(_a, ["children", "disabled"]);
|
|
51
|
+
return /* @__PURE__ */ jsxs(
|
|
52
|
+
"button",
|
|
53
|
+
__spreadProps(__spreadValues({
|
|
54
|
+
className: clsx(
|
|
55
|
+
arrowButtonStyles,
|
|
56
|
+
!disabled && "border-border-primary-normal hover:border-border-action-hover active:border-border-action-active",
|
|
57
|
+
disabled && "border-border-action-disabled"
|
|
58
|
+
),
|
|
59
|
+
type: "button"
|
|
60
|
+
}, restProps), {
|
|
61
|
+
children: [
|
|
62
|
+
/* @__PURE__ */ jsx(
|
|
63
|
+
"svg",
|
|
64
|
+
{
|
|
65
|
+
className: clsx(
|
|
66
|
+
"size-3 transition-colors duration-300 ease-in-out",
|
|
67
|
+
!disabled && "text-text-primary-normal",
|
|
68
|
+
disabled && "text-icon-primary-disabled"
|
|
69
|
+
),
|
|
70
|
+
viewBox: "0 0 532 532",
|
|
71
|
+
children: /* @__PURE__ */ jsx(
|
|
72
|
+
"path",
|
|
73
|
+
{
|
|
74
|
+
fill: "currentColor",
|
|
75
|
+
d: "M176.34 520.646c-13.793 13.805-36.208 13.805-50.001 0-13.785-13.804-13.785-36.238 0-50.034L330.78 266 126.34 61.391c-13.785-13.805-13.785-36.239 0-50.044 13.793-13.796 36.208-13.796 50.002 0 22.928 22.947 206.395 206.507 229.332 229.454a35.065 35.065 0 0 1 10.326 25.126c0 9.2-3.393 18.26-10.326 25.2-45.865 45.901-206.404 206.564-229.332 229.52Z"
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
}
|
|
79
|
+
),
|
|
80
|
+
children
|
|
81
|
+
]
|
|
82
|
+
})
|
|
83
|
+
);
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export {
|
|
87
|
+
PrevButton,
|
|
88
|
+
NextButton
|
|
89
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// src/components/EmblaCarousel/SelectedSnapDisplay.tsx
|
|
2
|
+
import { jsxs } from "react/jsx-runtime";
|
|
3
|
+
var SelectedSnapDisplay = (props) => {
|
|
4
|
+
const { selectedSnap, snapCount } = props;
|
|
5
|
+
return /* @__PURE__ */ jsxs("div", { className: "embla__selected-snap-display", children: [
|
|
6
|
+
selectedSnap + 1,
|
|
7
|
+
" / ",
|
|
8
|
+
snapCount
|
|
9
|
+
] });
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export {
|
|
13
|
+
SelectedSnapDisplay
|
|
14
|
+
};
|