@koine/react 2.0.0-beta.10 → 2.0.0-beta.12

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 (216) hide show
  1. package/package.json +11 -11
  2. package/Alert/Alert.js +0 -33
  3. package/Alert/Alert.stories.js +0 -39
  4. package/Alert/index.js +0 -6
  5. package/Animations/Reveal.js +0 -53
  6. package/Animations/Underline.js +0 -26
  7. package/Animations/index.js +0 -8
  8. package/Animations/useReveal.js +0 -83
  9. package/Autocomplete/AutocompleteDownshift.js +0 -167
  10. package/Autocomplete/AutocompleteDownshiftMultiselect.js +0 -362
  11. package/Autocomplete/AutocompleteMui.js +0 -183
  12. package/Autocomplete/AutocompleteReach.js +0 -121
  13. package/Autocomplete/components.js +0 -132
  14. package/Autocomplete/helpers.js +0 -34
  15. package/Autocomplete/index.js +0 -15
  16. package/Bg/BgColor.js +0 -64
  17. package/Bg/BgPhoto.js +0 -82
  18. package/Bg/BgSvg.js +0 -31
  19. package/Bg/index.js +0 -8
  20. package/Breadcrumbs/Breadcrumbs.js +0 -103
  21. package/Breadcrumbs/index.js +0 -6
  22. package/Buttons/Button.js +0 -106
  23. package/Buttons/ButtonComposite.js +0 -116
  24. package/Buttons/ButtonFab.js +0 -27
  25. package/Buttons/ButtonLink.js +0 -29
  26. package/Buttons/IconButton.js +0 -41
  27. package/Buttons/index.js +0 -10
  28. package/Calendar/CalendarDaygridCell.js +0 -105
  29. package/Calendar/CalendarDaygridNav.js +0 -63
  30. package/Calendar/CalendarDaygridTable.js +0 -126
  31. package/Calendar/CalendarLegend.js +0 -39
  32. package/Calendar/calendar-api-google.js +0 -110
  33. package/Calendar/index.js +0 -11
  34. package/Calendar/types.js +0 -4
  35. package/Calendar/useCalendar.js +0 -235
  36. package/Calendar/utils.js +0 -252
  37. package/Carousel/Carousel.js +0 -387
  38. package/Carousel/CarouselCss.js +0 -64
  39. package/Carousel/index.js +0 -6
  40. package/Collapsable/Collapsable.js +0 -11
  41. package/Collapsable/CollapsableReach.js +0 -251
  42. package/Collapsable/index.js +0 -7
  43. package/Debug/Debug.js +0 -34
  44. package/Debug/index.js +0 -6
  45. package/Details/Details.js +0 -117
  46. package/Details/Details.stories.js +0 -39
  47. package/Details/index.js +0 -6
  48. package/Dialog/DialogMui.js +0 -143
  49. package/Dialog/DialogMui.stories.js +0 -38
  50. package/Dialog/css/bare.js +0 -55
  51. package/Dialog/css/index.stories.js +0 -93
  52. package/Dialog/index.js +0 -11
  53. package/Dialog/m/bare.js +0 -125
  54. package/Dialog/m/basic.js +0 -50
  55. package/Dialog/m/index.js +0 -14
  56. package/Dialog/sc/bare.js +0 -83
  57. package/Dialog/sc/framer.js +0 -26
  58. package/Dialog/sc/framerMaterial.js +0 -26
  59. package/Dialog/sc/index.stories.js +0 -75
  60. package/Dialog/sc/material.js +0 -78
  61. package/Dialog/tw/bare.js +0 -55
  62. package/Dialog/tw/elegant.js +0 -54
  63. package/Dialog/tw/framer.js +0 -26
  64. package/Dialog/tw/framerMaterial.js +0 -26
  65. package/Dialog/tw/index.stories.js +0 -113
  66. package/Dialog/tw/material.js +0 -54
  67. package/Editor/Editor--tiptap.js +0 -72
  68. package/Editor/components.js +0 -59
  69. package/Editor/index.js +0 -6
  70. package/FaviconTags.js +0 -73
  71. package/Form/Form.js +0 -130
  72. package/Form/index.js +0 -6
  73. package/Form/sc/bare.js +0 -55
  74. package/Forms/Checkbox/Checkbox.js +0 -62
  75. package/Forms/Checkbox/index.js +0 -6
  76. package/Forms/Feedback/Feedback.js +0 -25
  77. package/Forms/Feedback/index.js +0 -6
  78. package/Forms/Field/Field.js +0 -75
  79. package/Forms/Field/FieldControl.js +0 -69
  80. package/Forms/Field/FieldHint.js +0 -17
  81. package/Forms/Field/index.js +0 -7
  82. package/Forms/Input/Input.js +0 -67
  83. package/Forms/Input/index.js +0 -6
  84. package/Forms/InputGroup/InputGroup.js +0 -85
  85. package/Forms/InputGroup/index.js +0 -6
  86. package/Forms/Label/Label.js +0 -46
  87. package/Forms/Label/index.js +0 -6
  88. package/Forms/Password/Password.js +0 -72
  89. package/Forms/Password/index.js +0 -6
  90. package/Forms/Radio/Radio.js +0 -68
  91. package/Forms/Radio/index.js +0 -6
  92. package/Forms/Switch/Switch.js +0 -80
  93. package/Forms/Switch/index.js +0 -6
  94. package/Forms/Textarea/Textarea.js +0 -45
  95. package/Forms/Textarea/TextareaRich.js +0 -58
  96. package/Forms/Textarea/index.js +0 -7
  97. package/Forms/Toggle/Toggle-tailwind.js +0 -99
  98. package/Forms/Toggle/Toggle.js +0 -175
  99. package/Forms/Toggle/index.js +0 -6
  100. package/Forms/Toggle/useToggle-tailwind.js +0 -202
  101. package/Forms/Toggle/useToggle.js +0 -145
  102. package/Forms/antispam.js +0 -59
  103. package/Forms/helpers.js +0 -72
  104. package/Forms/index.js +0 -19
  105. package/Forms/styles.js +0 -94
  106. package/Gauge/Gauge.js +0 -111
  107. package/Grid/Grid.js +0 -106
  108. package/Grid/index.js +0 -6
  109. package/Hamburger/Hamburger.js +0 -90
  110. package/Hamburger/index.js +0 -6
  111. package/Header/index.js +0 -6
  112. package/Header/useHeader.js +0 -54
  113. package/Hidden/Hidden.js +0 -21
  114. package/Hidden/index.js +0 -6
  115. package/Img/index.js +0 -6
  116. package/Img/sc/bare.js +0 -43
  117. package/Img/types.js +0 -6
  118. package/Link/Link.js +0 -13
  119. package/Link/LinkBlank.js +0 -52
  120. package/Link/index.js +0 -7
  121. package/Menu/Menu.js +0 -22
  122. package/Menu/MenuMui.js +0 -165
  123. package/Menu/index.js +0 -6
  124. package/MenuItem/MenuItem.js +0 -31
  125. package/MenuItem/MenuItemMui.js +0 -32
  126. package/MenuItem/index.js +0 -6
  127. package/MenuItem/useMenuItem.js +0 -96
  128. package/Meta/Meta.js +0 -26
  129. package/Meta/index.js +0 -12
  130. package/NoJs/NoJs.js +0 -28
  131. package/NoJs/index.js +0 -12
  132. package/Pagination/PaginationNav.js +0 -126
  133. package/Pagination/PaginationResults.js +0 -45
  134. package/Pagination/index.js +0 -7
  135. package/Pill/Pill.js +0 -62
  136. package/Pill/index.js +0 -6
  137. package/Progress/ProgressCircular.js +0 -62
  138. package/Progress/ProgressLinear.js +0 -53
  139. package/Progress/ProgressOverlay.js +0 -75
  140. package/Progress/index.js +0 -8
  141. package/Rating/Rating.js +0 -188
  142. package/Rating/index.js +0 -85
  143. package/Select/SelectDownshift.js +0 -47
  144. package/Select/components.js +0 -44
  145. package/Select/index.js +0 -13
  146. package/Sidebar/Sidebar.js +0 -74
  147. package/Sidebar/index.js +0 -6
  148. package/Spacing/Spacing.js +0 -55
  149. package/Spacing/index.js +0 -6
  150. package/Sticky/Sticky.js +0 -228
  151. package/Sticky/StickyCss.js +0 -20
  152. package/Sticky/index.js +0 -19
  153. package/Tabs/TabsMui.js +0 -91
  154. package/Tabs/TabsMui.stories.js +0 -38
  155. package/Tabs/index.js +0 -6
  156. package/Tabs/sc/bare.js +0 -86
  157. package/Tabs/sc/index.stories.js +0 -1
  158. package/Tabs/tw/bare.js +0 -45
  159. package/Tabs/tw/index.stories.js +0 -46
  160. package/Tabs/tw/material.js +0 -44
  161. package/Tabs/useTabs.js +0 -66
  162. package/Typography/CopyPasteVisible.js +0 -17
  163. package/Typography/Native.js +0 -90
  164. package/Typography/ReadMore.js +0 -125
  165. package/Typography/TextLoop.js +0 -108
  166. package/Typography/TypeStairs.js +0 -71
  167. package/Typography/index.js +0 -10
  168. package/css/index.js +0 -33
  169. package/helpers/classed.js +0 -66
  170. package/helpers/classed.stories.js +0 -140
  171. package/helpers/createUseMediaQueryWidth.js +0 -193
  172. package/helpers/extend-component.js +0 -32
  173. package/helpers/index.js +0 -9
  174. package/helpers/mergeRefs.js +0 -30
  175. package/hooks/index.js +0 -92
  176. package/hooks/types.js +0 -6
  177. package/hooks/useAsyncFn.js +0 -56
  178. package/hooks/useDateLocale.js +0 -51
  179. package/hooks/useFirstMountState.js +0 -28
  180. package/hooks/useFixedOffset.js +0 -67
  181. package/hooks/useFocus.js +0 -30
  182. package/hooks/useInterval.js +0 -44
  183. package/hooks/useIsomorphicLayoutEffect.js +0 -23
  184. package/hooks/useKeyUp.js +0 -40
  185. package/hooks/useMeasure.js +0 -189
  186. package/hooks/useMountedState.js +0 -31
  187. package/hooks/useNavigateAway.js +0 -69
  188. package/hooks/usePrevious.js +0 -33
  189. package/hooks/usePreviousRef.js +0 -27
  190. package/hooks/useScrollPosition.js +0 -83
  191. package/hooks/useScrollThreshold.js +0 -52
  192. package/hooks/useScrollTo.js +0 -39
  193. package/hooks/useSmoothScroll.js +0 -49
  194. package/hooks/useSpinDelay.js +0 -59
  195. package/hooks/useTraceUpdate.js +0 -39
  196. package/hooks/useUpdateEffect.js +0 -30
  197. package/hooks/useWindowSize.js +0 -43
  198. package/index.js +0 -10
  199. package/m/MotionProvider.js +0 -27
  200. package/m/index.js +0 -10
  201. package/m/lite.js +0 -12
  202. package/m/max.js +0 -12
  203. package/sc/index.js +0 -49
  204. package/scm/index.js +0 -40
  205. package/shared/index.js +0 -13
  206. package/styles/Body.js +0 -28
  207. package/styles/Global.js +0 -55
  208. package/styles/index.js +0 -142
  209. package/styles/media.js +0 -139
  210. package/styles/spacing.js +0 -70
  211. package/styles/styled.js +0 -58
  212. package/styles/theme--vanilla.js +0 -82
  213. package/styles/theme.js +0 -49
  214. package/tw/index.js +0 -33
  215. package/twm/index.js +0 -33
  216. package/types.js +0 -4
@@ -1,387 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "KoineCarousel", {
6
- enumerable: true,
7
- get: function() {
8
- return KoineCarousel;
9
- }
10
- });
11
- const KoineCarousel = null; // import React, { useEffect, useState, useRef } from 'react';
12
- // import Slide from './slide';
13
- // import { getSliderListStyles } from './slider-list';
14
- // import { CarouselProps, KeyCodeFunction } from './types';
15
- // import renderControls from './controls';
16
- // import defaultProps from './default-carousel-props';
17
- // import { getIndexes, addEvent, removeEvent } from './utils';
18
- // import AnnounceSlide from './announce-slide';
19
- // export const Carousel = (props: CarouselProps): React.ReactElement => {
20
- // const count = React.Children.count(props.children);
21
- // const [currentSlide, setCurrentSlide] = useState<number>(
22
- // props.autoplayReverse ? count - props.slidesToShow : props.slideIndex
23
- // );
24
- // const [animation, setAnimation] = useState<boolean>(false);
25
- // const [pause, setPause] = useState<boolean>(false);
26
- // const [dragging, setDragging] = useState<boolean>(false);
27
- // const [move, setMove] = useState<number>(0);
28
- // const [keyboardMove, setKeyboardMove] = useState<KeyCodeFunction>(null);
29
- // const carouselWidth = useRef<number | null>(null);
30
- // const focus = useRef<boolean>(false);
31
- // const prevMove = useRef<number>(0);
32
- // const carouselEl = useRef<HTMLDivElement>(null);
33
- // const timer = useRef<ReturnType<typeof setTimeout> | null>(null);
34
- // const isMounted = useRef<boolean>(true);
35
- // useEffect(
36
- // () => () => {
37
- // isMounted.current = false;
38
- // },
39
- // []
40
- // );
41
- // const slidesToScroll =
42
- // props.animation === 'fade' ? props.slidesToShow : props.slidesToScroll;
43
- // const dragThreshold = (carouselWidth.current || 0) / props.slidesToShow / 2;
44
- // const carouselRef = props.innerRef || carouselEl;
45
- // const moveSlide = (to?: number) => {
46
- // const [slide, endSlide] = getIndexes(
47
- // currentSlide,
48
- // currentSlide - slidesToScroll,
49
- // count
50
- // );
51
- // to && props.beforeSlide(slide, endSlide);
52
- // !props.disableAnimation && setAnimation(true);
53
- // setCurrentSlide(to ?? currentSlide);
54
- // setTimeout(
55
- // () => {
56
- // if (!isMounted.current) return;
57
- // to && props.afterSlide(currentSlide);
58
- // !props.disableAnimation && setAnimation(false);
59
- // },
60
- // !props.disableAnimation ? props.speed || 500 : 40
61
- // ); // if animation is disabled decrease the speed to 40
62
- // };
63
- // const nextSlide = () => {
64
- // if (props.wrapAround || currentSlide <= count) {
65
- // moveSlide(currentSlide + slidesToScroll);
66
- // } else {
67
- // moveSlide();
68
- // }
69
- // };
70
- // const prevSlide = () => {
71
- // // boundary
72
- // if (props.wrapAround || currentSlide > 0) {
73
- // moveSlide(currentSlide - slidesToScroll);
74
- // } else {
75
- // moveSlide();
76
- // }
77
- // };
78
- // useEffect(() => {
79
- // if (props.autoplay && !animation && props.wrapAround) {
80
- // if (currentSlide > count) {
81
- // setCurrentSlide(currentSlide - count);
82
- // if (timer?.current) {
83
- // clearTimeout(timer.current);
84
- // }
85
- // } else if (currentSlide < 0) {
86
- // setCurrentSlide(count - -currentSlide);
87
- // if (timer?.current) {
88
- // clearTimeout(timer.current);
89
- // }
90
- // }
91
- // }
92
- // }, [animation, currentSlide]);
93
- // useEffect(() => {
94
- // if (props.autoplay && !pause) {
95
- // timer.current = setTimeout(() => {
96
- // if (props.autoplayReverse) {
97
- // if (!props.wrapAround && currentSlide > 0) {
98
- // prevSlide();
99
- // } else if (props.wrapAround) {
100
- // prevSlide();
101
- // }
102
- // } else if (
103
- // !props.wrapAround &&
104
- // currentSlide < count - props.slidesToShow
105
- // ) {
106
- // nextSlide();
107
- // } else if (props.wrapAround) {
108
- // nextSlide();
109
- // }
110
- // }, props.autoplayInterval);
111
- // }
112
- // // Clear the timeout if user hover on carousel
113
- // if (props.autoplay && pause && timer?.current) {
114
- // clearTimeout(timer.current);
115
- // }
116
- // return () => {
117
- // if (timer.current) {
118
- // clearTimeout(timer.current);
119
- // }
120
- // };
121
- // }, [currentSlide, pause]);
122
- // useEffect(() => {
123
- // // makes the loop infinity
124
- // if (props.wrapAround && !props.autoplay) {
125
- // // if animation is disabled decrease the speed to 0
126
- // const speed = !props.disableAnimation ? props.speed || 500 : 0;
127
- // if (currentSlide <= -props.slidesToShow) {
128
- // // prev
129
- // setTimeout(() => {
130
- // if (!isMounted.current) return;
131
- // setCurrentSlide(count - -currentSlide);
132
- // }, speed + 10);
133
- // } else if (currentSlide >= count) {
134
- // // next
135
- // setTimeout(() => {
136
- // if (!isMounted.current) return;
137
- // setCurrentSlide(currentSlide - count);
138
- // }, speed + 10);
139
- // }
140
- // }
141
- // }, [currentSlide]);
142
- // useEffect(() => {
143
- // if (props.enableKeyboardControls && keyboardMove && focus.current) {
144
- // switch (keyboardMove) {
145
- // case 'nextSlide':
146
- // nextSlide(); // set boundaries for !wrapAround
147
- // break;
148
- // case 'previousSlide':
149
- // prevSlide(); // set boundaries for !wrapAround
150
- // break;
151
- // case 'firstSlide':
152
- // setCurrentSlide(0);
153
- // break;
154
- // case 'lastSlide':
155
- // setCurrentSlide(count - props.slidesToShow);
156
- // break;
157
- // case 'pause':
158
- // if (pause && props.autoplay) {
159
- // setPause(false);
160
- // break;
161
- // } else if (props.autoplay) {
162
- // setPause(true);
163
- // break;
164
- // }
165
- // break;
166
- // }
167
- // setKeyboardMove(null);
168
- // }
169
- // }, [keyboardMove]);
170
- // const onKeyPress = (e: Event) => {
171
- // if (
172
- // props.enableKeyboardControls &&
173
- // focus.current &&
174
- // (e as KeyboardEvent).keyCode
175
- // ) {
176
- // const keyConfig = props.keyCodeConfig;
177
- // for (const func in keyConfig) {
178
- // if (
179
- // keyConfig[func as keyof typeof keyConfig]?.includes(
180
- // (e as KeyboardEvent).keyCode
181
- // )
182
- // ) {
183
- // setKeyboardMove(func as KeyCodeFunction);
184
- // }
185
- // }
186
- // }
187
- // };
188
- // useEffect(() => {
189
- // if (carouselEl && carouselEl.current) {
190
- // carouselWidth.current = carouselEl.current.offsetWidth;
191
- // } else if (props.innerRef) {
192
- // carouselWidth.current = props.innerRef.current.offsetWidth;
193
- // }
194
- // if (props.enableKeyboardControls) {
195
- // addEvent(document, 'keydown', onKeyPress);
196
- // }
197
- // return () => {
198
- // removeEvent(document, 'keydown', onKeyPress);
199
- // };
200
- // }, []);
201
- // const handleDragEnd = () => {
202
- // if (!props.dragging || !dragging) return;
203
- // setDragging(false);
204
- // if (Math.abs(move) <= dragThreshold) {
205
- // moveSlide();
206
- // setMove(0);
207
- // prevMove.current = 0;
208
- // return;
209
- // }
210
- // if (move > 0) {
211
- // nextSlide();
212
- // } else {
213
- // prevSlide();
214
- // }
215
- // setMove(0);
216
- // prevMove.current = 0;
217
- // };
218
- // const onTouchStart = () => {
219
- // if (!props.swiping) {
220
- // return;
221
- // }
222
- // setDragging(true);
223
- // };
224
- // const handlePointerMove = (m: number) => {
225
- // if (!props.dragging || !dragging) return;
226
- // const moveValue = m * 0.75; // Friction
227
- // const moveState = move + (moveValue - prevMove.current);
228
- // // Exit drag early if passed threshold
229
- // if (Math.abs(move) > dragThreshold) {
230
- // handleDragEnd();
231
- // return;
232
- // }
233
- // if (
234
- // !props.wrapAround &&
235
- // props.disableEdgeSwiping &&
236
- // ((currentSlide <= 0 && moveState <= 0) ||
237
- // (moveState > 0 && currentSlide >= count - props.slidesToShow))
238
- // ) {
239
- // prevMove.current = moveValue;
240
- // return;
241
- // }
242
- // if (prevMove.current !== 0) {
243
- // setMove(moveState);
244
- // }
245
- // prevMove.current = moveValue;
246
- // };
247
- // const onTouchMove = (e: React.TouchEvent<HTMLDivElement>) => {
248
- // if (!props.dragging || !dragging) return;
249
- // props.onDragStart(e);
250
- // const moveValue = (carouselWidth?.current || 0) - e.touches[0].pageX;
251
- // handlePointerMove(moveValue);
252
- // };
253
- // const onMouseDown = (e: React.MouseEvent<HTMLDivElement>) => {
254
- // e?.preventDefault();
255
- // carouselRef?.current?.focus();
256
- // if (!props.dragging) return;
257
- // setDragging(true);
258
- // };
259
- // const onMouseMove = (e: React.MouseEvent<HTMLDivElement>) => {
260
- // if (!props.dragging || !dragging) return;
261
- // props.onDragStart(e);
262
- // const offsetX =
263
- // e.clientX - (carouselRef.current?.getBoundingClientRect().left || 0);
264
- // const moveValue = (carouselWidth?.current || 0) - offsetX;
265
- // handlePointerMove(moveValue);
266
- // };
267
- // const onMouseUp = (e?: React.MouseEvent<HTMLDivElement>) => {
268
- // e?.preventDefault();
269
- // handleDragEnd();
270
- // };
271
- // const onMouseEnter = () => {
272
- // if (props.pauseOnHover) {
273
- // setPause(true);
274
- // }
275
- // };
276
- // const onMouseLeave = () => {
277
- // if (props.pauseOnHover) {
278
- // setPause(false);
279
- // }
280
- // };
281
- // const renderSlides = (typeOfSlide?: 'prev-cloned' | 'next-cloned') => {
282
- // const slides = React.Children.map(props.children, (child, index) => {
283
- // const isCurrentSlide = props.wrapAround
284
- // ? currentSlide === index ||
285
- // currentSlide === index + count ||
286
- // currentSlide === index - count
287
- // : currentSlide === index;
288
- // return (
289
- // <Slide
290
- // key={`${typeOfSlide}-${index}`}
291
- // count={count}
292
- // currentSlide={currentSlide}
293
- // index={index}
294
- // isCurrentSlide={isCurrentSlide}
295
- // typeOfSlide={typeOfSlide}
296
- // wrapAround={props.wrapAround}
297
- // cellSpacing={props.cellSpacing}
298
- // animation={props.animation}
299
- // slidesToShow={props.slidesToShow}
300
- // speed={props.speed}
301
- // zoomScale={props.zoomScale}
302
- // cellAlign={props.cellAlign}
303
- // >
304
- // {child}
305
- // </Slide>
306
- // );
307
- // });
308
- // return slides;
309
- // };
310
- // const [slide] = getIndexes(
311
- // currentSlide,
312
- // currentSlide - slidesToScroll,
313
- // count
314
- // );
315
- // return (
316
- // <div
317
- // className={'slider-container'}
318
- // style={{
319
- // position: 'relative',
320
- // padding: props.withoutControls ? 0 : '0 60px 50px'
321
- // }}
322
- // onMouseEnter={onMouseEnter}
323
- // onMouseLeave={onMouseLeave}
324
- // >
325
- // <AnnounceSlide
326
- // ariaLive={props.autoplay && !pause ? 'off' : 'polite'}
327
- // message={props.renderAnnounceSlideMessage({
328
- // currentSlide: slide,
329
- // count
330
- // })}
331
- // />
332
- // <div
333
- // className={['slider-frame', props.className || ''].join(' ').trim()}
334
- // style={{
335
- // overflow: 'hidden',
336
- // width: '100%',
337
- // position: 'relative',
338
- // outline: 'none',
339
- // ...props.style
340
- // }}
341
- // aria-label="carousel-slider"
342
- // role="region"
343
- // tabIndex={0}
344
- // onFocus={() => (focus.current = true)}
345
- // onBlur={() => (focus.current = false)}
346
- // ref={props.innerRef || carouselEl}
347
- // onMouseUp={onMouseUp}
348
- // onMouseDown={onMouseDown}
349
- // onMouseMove={onMouseMove}
350
- // onMouseLeave={onMouseUp}
351
- // onTouchStart={onTouchStart}
352
- // onTouchEnd={handleDragEnd}
353
- // onTouchMove={onTouchMove}
354
- // >
355
- // <div
356
- // className="slider-list"
357
- // style={getSliderListStyles(
358
- // props.children,
359
- // currentSlide,
360
- // animation,
361
- // props.slidesToShow,
362
- // props.cellAlign,
363
- // props.wrapAround,
364
- // props.speed,
365
- // move,
366
- // props.animation
367
- // )}
368
- // >
369
- // {props.wrapAround ? renderSlides('prev-cloned') : null}
370
- // {renderSlides()}
371
- // {props.wrapAround ? renderSlides('next-cloned') : null}
372
- // </div>
373
- // </div>
374
- // {renderControls(
375
- // props,
376
- // count,
377
- // currentSlide,
378
- // moveSlide,
379
- // nextSlide,
380
- // prevSlide,
381
- // slidesToScroll
382
- // )}
383
- // </div>
384
- // );
385
- // };
386
- // Carousel.defaultProps = defaultProps;
387
- // export default Carousel;
@@ -1,64 +0,0 @@
1
- /// <reference types="csstype" />
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- function _export(target, all) {
7
- for(var name in all)Object.defineProperty(target, name, {
8
- enumerable: true,
9
- get: all[name]
10
- });
11
- }
12
- _export(exports, {
13
- CarouselCssRow: function() {
14
- return CarouselCssRow;
15
- },
16
- CarouselCssCol: function() {
17
- return CarouselCssCol;
18
- },
19
- KoineCarouselCss: function() {
20
- return KoineCarouselCss;
21
- }
22
- });
23
- const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
24
- const _jsxruntime = require("react/jsx-runtime");
25
- const _react = require("react");
26
- const _styledcomponents = /*#__PURE__*/ _interop_require_default._(require("styled-components"));
27
- const _Grid = require("../Grid");
28
- const CarouselCssRow = (0, _styledcomponents.default)(_Grid.Row)`
29
- ${({ $gutter: cs, theme: { gutter } })=>`
30
- margin-left: -${cs === _Grid.GRID_GUTTER_DEFAULT ? gutter[_Grid.GRID_GUTTER_DEFAULT] : (gutter[_Grid.GRID_GUTTER_DEFAULT] - gutter[cs]) * 2}px;
31
- margin-right: -${cs === _Grid.GRID_GUTTER_DEFAULT ? gutter[_Grid.GRID_GUTTER_DEFAULT] : (gutter[_Grid.GRID_GUTTER_DEFAULT] - gutter[cs]) * 2}px;
32
- padding-left: ${cs === _Grid.GRID_GUTTER_DEFAULT ? gutter[_Grid.GRID_GUTTER_DEFAULT] : gutter[_Grid.GRID_GUTTER_DEFAULT] - gutter[cs]}px;
33
- padding-right: ${cs === _Grid.GRID_GUTTER_DEFAULT ? gutter[_Grid.GRID_GUTTER_DEFAULT] : gutter[_Grid.GRID_GUTTER_DEFAULT] - gutter[cs]}px;
34
- `}
35
-
36
- scroll-behavior: smooth;
37
- scroll-snap-type: x;
38
- -ms-overflow-style: none;
39
- scrollbar-width: none;
40
-
41
- &::-webkit-scrollbar {
42
- display: none;
43
- }
44
- `;
45
- const CarouselCssCol = (0, _styledcomponents.default)(_Grid.Col)`
46
- ${(p)=>p.$width && `flex-basis: ${p.$width}px; min-width: ${p.$width}px;`}
47
- position: relative;
48
- scroll-snap-align: ${(p)=>p.$snap};
49
- `;
50
- const KoineCarouselCss = ({ items, $gutterRow, $gutterCol, $gutter = "quarter", $proportion, $snap = "center", width, children, ...colProps })=>{
51
- const slides = children ? _react.Children.toArray(children) : items;
52
- const id = (0, _react.useId)();
53
- if (!slides) return null;
54
- return /*#__PURE__*/ (0, _jsxruntime.jsx)(CarouselCssRow, {
55
- $noWrap: true,
56
- $gutter: $gutterRow || $gutter,
57
- children: slides.map((_slide, idx)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(CarouselCssCol, {
58
- ...colProps,
59
- $gutter: $gutterCol || $gutter,
60
- $width: width,
61
- children: slides[idx]
62
- }, `CarouselCssCol-${id}-${idx}`))
63
- });
64
- };
package/Carousel/index.js DELETED
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- const _export_star = require("@swc/helpers/_/_export_star");
6
- _export_star._(require("./CarouselCss"), exports);
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "Collapsable", {
6
- enumerable: true,
7
- get: function() {
8
- return Collapsable;
9
- }
10
- });
11
- const Collapsable = null;