@koine/react 1.0.12 → 1.0.13

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 (196) hide show
  1. package/Forms/Toggle/useToggle.d.ts +1 -1
  2. package/Forms/Toggle/useToggle.js +1 -1
  3. package/package.json +6 -7
  4. package/node/Alert/Alert.js +0 -14
  5. package/node/Alert/index.js +0 -4
  6. package/node/Animations/Reveal.js +0 -21
  7. package/node/Animations/Underline.js +0 -8
  8. package/node/Animations/index.js +0 -6
  9. package/node/Animations/useReveal.js +0 -75
  10. package/node/Autocomplete/AutocompleteDownshift.js +0 -161
  11. package/node/Autocomplete/AutocompleteDownshiftMultiselect.js +0 -356
  12. package/node/Autocomplete/AutocompleteMui.js +0 -180
  13. package/node/Autocomplete/AutocompleteReach.js +0 -115
  14. package/node/Autocomplete/components.js +0 -37
  15. package/node/Autocomplete/helpers.js +0 -32
  16. package/node/Autocomplete/index.js +0 -7
  17. package/node/Bg/BgColor.js +0 -25
  18. package/node/Bg/BgPhoto.js +0 -20
  19. package/node/Bg/BgSvg.js +0 -16
  20. package/node/Bg/index.js +0 -6
  21. package/node/Breadcrumbs/Breadcrumbs.js +0 -31
  22. package/node/Breadcrumbs/index.js +0 -4
  23. package/node/Buttons/Button.js +0 -17
  24. package/node/Buttons/ButtonComposite.js +0 -32
  25. package/node/Buttons/ButtonFab.js +0 -9
  26. package/node/Buttons/ButtonLink.js +0 -15
  27. package/node/Buttons/IconButton.js +0 -10
  28. package/node/Buttons/index.js +0 -8
  29. package/node/Calendar/CalendarDaygridCell.js +0 -61
  30. package/node/Calendar/CalendarDaygridNav.js +0 -28
  31. package/node/Calendar/CalendarDaygridTable.js +0 -61
  32. package/node/Calendar/CalendarLegend.js +0 -20
  33. package/node/Calendar/calendar-api-google.js +0 -131
  34. package/node/Calendar/index.js +0 -9
  35. package/node/Calendar/types.js +0 -2
  36. package/node/Calendar/useCalendar.js +0 -187
  37. package/node/Calendar/utils.js +0 -215
  38. package/node/Carousel/Carousel.js +0 -381
  39. package/node/Carousel/CarouselCss.js +0 -27
  40. package/node/Carousel/index.js +0 -4
  41. package/node/Collapsable/Collapsable.js +0 -4
  42. package/node/Collapsable/CollapsableReach.js +0 -253
  43. package/node/Collapsable/index.js +0 -5
  44. package/node/Debug/Debug.js +0 -13
  45. package/node/Debug/index.js +0 -4
  46. package/node/Details/Details.js +0 -67
  47. package/node/Details/index.js +0 -4
  48. package/node/Dialog/DialogMui.js +0 -83
  49. package/node/Dialog/css/bare.js +0 -24
  50. package/node/Dialog/index.js +0 -5
  51. package/node/Dialog/m/bare.js +0 -55
  52. package/node/Dialog/m/basic.js +0 -35
  53. package/node/Dialog/m/index.js +0 -8
  54. package/node/Dialog/sc/bare.js +0 -46
  55. package/node/Dialog/sc/framer.js +0 -19
  56. package/node/Dialog/sc/framerMaterial.js +0 -19
  57. package/node/Dialog/sc/material.js +0 -24
  58. package/node/Dialog/tw/bare.js +0 -45
  59. package/node/Dialog/tw/elegant.js +0 -23
  60. package/node/Dialog/tw/framer.js +0 -19
  61. package/node/Dialog/tw/framerMaterial.js +0 -19
  62. package/node/Dialog/tw/material.js +0 -23
  63. package/node/Editor/Editor--tiptap.js +0 -31
  64. package/node/Editor/components.js +0 -15
  65. package/node/Editor/index.js +0 -4
  66. package/node/Favicon/FaviconTags.js +0 -19
  67. package/node/Favicon/index.js +0 -4
  68. package/node/Form/Form.js +0 -65
  69. package/node/Form/index.js +0 -4
  70. package/node/Form/sc/bare.js +0 -23
  71. package/node/Forms/Checkbox/Checkbox.js +0 -21
  72. package/node/Forms/Checkbox/index.js +0 -4
  73. package/node/Forms/Feedback/Feedback.js +0 -13
  74. package/node/Forms/Feedback/index.js +0 -4
  75. package/node/Forms/Field/Field.js +0 -52
  76. package/node/Forms/Field/FieldControl.js +0 -51
  77. package/node/Forms/Field/FieldHint.js +0 -7
  78. package/node/Forms/Field/index.js +0 -5
  79. package/node/Forms/Input/Input.js +0 -20
  80. package/node/Forms/Input/index.js +0 -4
  81. package/node/Forms/InputGroup/InputGroup.js +0 -19
  82. package/node/Forms/InputGroup/index.js +0 -4
  83. package/node/Forms/Label/Label.js +0 -9
  84. package/node/Forms/Label/index.js +0 -4
  85. package/node/Forms/Password/Password.js +0 -20
  86. package/node/Forms/Password/index.js +0 -4
  87. package/node/Forms/Radio/Radio.js +0 -28
  88. package/node/Forms/Radio/index.js +0 -4
  89. package/node/Forms/Switch/Switch.js +0 -23
  90. package/node/Forms/Switch/index.js +0 -4
  91. package/node/Forms/Textarea/Textarea.js +0 -15
  92. package/node/Forms/Textarea/TextareaRich.js +0 -31
  93. package/node/Forms/Textarea/index.js +0 -5
  94. package/node/Forms/Toggle/Toggle.js +0 -37
  95. package/node/Forms/Toggle/index.js +0 -4
  96. package/node/Forms/Toggle/useToggle.js +0 -149
  97. package/node/Forms/antispam.js +0 -61
  98. package/node/Forms/helpers.js +0 -52
  99. package/node/Forms/index.js +0 -19
  100. package/node/Forms/styles.js +0 -32
  101. package/node/Gauge/Gauge.js +0 -106
  102. package/node/Grid/Grid.js +0 -56
  103. package/node/Grid/index.js +0 -4
  104. package/node/Hamburger/Hamburger.js +0 -56
  105. package/node/Hamburger/index.js +0 -4
  106. package/node/Header/index.js +0 -4
  107. package/node/Header/useHeader.js +0 -34
  108. package/node/Hidden/Hidden.js +0 -13
  109. package/node/Hidden/index.js +0 -4
  110. package/node/Img/index.js +0 -4
  111. package/node/Img/sc/bare.js +0 -42
  112. package/node/Img/types.js +0 -2
  113. package/node/Link/Link.js +0 -7
  114. package/node/Link/LinkBlank.js +0 -21
  115. package/node/Link/index.js +0 -5
  116. package/node/Menu/Menu.js +0 -7
  117. package/node/Menu/index.js +0 -4
  118. package/node/MenuItem/MenuItem.js +0 -7
  119. package/node/MenuItem/index.js +0 -4
  120. package/node/Meta/Meta.js +0 -9
  121. package/node/Meta/index.js +0 -4
  122. package/node/NoJs/NoJs.js +0 -10
  123. package/node/NoJs/index.js +0 -4
  124. package/node/Pagination/PaginationNav.js +0 -65
  125. package/node/Pagination/PaginationResults.js +0 -15
  126. package/node/Pagination/index.js +0 -5
  127. package/node/Pill/Pill.js +0 -10
  128. package/node/Pill/index.js +0 -4
  129. package/node/Progress/ProgressCircular.js +0 -19
  130. package/node/Progress/ProgressLinear.js +0 -28
  131. package/node/Progress/ProgressOverlay.js +0 -28
  132. package/node/Progress/index.js +0 -6
  133. package/node/Rating/Rating.js +0 -76
  134. package/node/Rating/index.js +0 -57
  135. package/node/Select/SelectDownshift.js +0 -41
  136. package/node/Select/components.js +0 -15
  137. package/node/Select/index.js +0 -7
  138. package/node/Sidebar/Sidebar.js +0 -27
  139. package/node/Sidebar/index.js +0 -4
  140. package/node/Spacing/Spacing.js +0 -49
  141. package/node/Spacing/index.js +0 -4
  142. package/node/Sticky/Sticky.js +0 -222
  143. package/node/Sticky/StickyCss.js +0 -10
  144. package/node/Sticky/index.js +0 -4
  145. package/node/Tabs/TabsMui.js +0 -49
  146. package/node/Tabs/index.js +0 -4
  147. package/node/Tabs/sc/bare.js +0 -87
  148. package/node/Tabs/tw/bare.js +0 -20
  149. package/node/Tabs/tw/material.js +0 -21
  150. package/node/Tabs/useTabs.js +0 -48
  151. package/node/Typography/CopyPasteVisible.js +0 -7
  152. package/node/Typography/Native.js +0 -17
  153. package/node/Typography/ReadMore.js +0 -47
  154. package/node/Typography/TextLoop.js +0 -51
  155. package/node/Typography/TypeStairs.js +0 -53
  156. package/node/Typography/index.js +0 -8
  157. package/node/css/index.js +0 -36
  158. package/node/helpers/classed.js +0 -72
  159. package/node/helpers/extend-component.js +0 -16
  160. package/node/helpers/index.js +0 -5
  161. package/node/hooks/index.js +0 -18
  162. package/node/hooks/types.js +0 -2
  163. package/node/hooks/useAsyncFn.js +0 -40
  164. package/node/hooks/useDateLocale.js +0 -42
  165. package/node/hooks/useEffectOnce.js +0 -12
  166. package/node/hooks/useFirstMountState.js +0 -16
  167. package/node/hooks/useFocus.js +0 -15
  168. package/node/hooks/useId.js +0 -12
  169. package/node/hooks/useIsomorphicLayoutEffect.js +0 -11
  170. package/node/hooks/useMount.js +0 -13
  171. package/node/hooks/useMountedState.js +0 -19
  172. package/node/hooks/usePrevious.js +0 -12
  173. package/node/hooks/useScrollPosition.js +0 -84
  174. package/node/hooks/useScrollTo.js +0 -25
  175. package/node/hooks/useTraceUpdate.js +0 -25
  176. package/node/hooks/useUpdateEffect.js +0 -18
  177. package/node/hooks/useWindowSize.js +0 -17
  178. package/node/index.js +0 -8
  179. package/node/m/MotionProvider.js +0 -43
  180. package/node/m/index.js +0 -9
  181. package/node/m/lite.js +0 -4
  182. package/node/m/max.js +0 -4
  183. package/node/sc/index.js +0 -37
  184. package/node/scm/index.js +0 -36
  185. package/node/shared/index.js +0 -11
  186. package/node/styles/Body.js +0 -16
  187. package/node/styles/Global.js +0 -21
  188. package/node/styles/index.js +0 -10
  189. package/node/styles/media.js +0 -160
  190. package/node/styles/spacing.js +0 -52
  191. package/node/styles/styled.js +0 -17
  192. package/node/styles/theme--vanilla.js +0 -61
  193. package/node/styles/theme.js +0 -45
  194. package/node/tw/index.js +0 -36
  195. package/node/twm/index.js +0 -36
  196. package/node/types.js +0 -2
@@ -1,381 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.KoineCarousel = void 0;
4
- exports.KoineCarousel = null;
5
- // import React, { useEffect, useState, useRef } from 'react';
6
- // import Slide from './slide';
7
- // import { getSliderListStyles } from './slider-list';
8
- // import { CarouselProps, KeyCodeFunction } from './types';
9
- // import renderControls from './controls';
10
- // import defaultProps from './default-carousel-props';
11
- // import { getIndexes, addEvent, removeEvent } from './utils';
12
- // import AnnounceSlide from './announce-slide';
13
- // export const Carousel = (props: CarouselProps): React.ReactElement => {
14
- // const count = React.Children.count(props.children);
15
- // const [currentSlide, setCurrentSlide] = useState<number>(
16
- // props.autoplayReverse ? count - props.slidesToShow : props.slideIndex
17
- // );
18
- // const [animation, setAnimation] = useState<boolean>(false);
19
- // const [pause, setPause] = useState<boolean>(false);
20
- // const [dragging, setDragging] = useState<boolean>(false);
21
- // const [move, setMove] = useState<number>(0);
22
- // const [keyboardMove, setKeyboardMove] = useState<KeyCodeFunction>(null);
23
- // const carouselWidth = useRef<number | null>(null);
24
- // const focus = useRef<boolean>(false);
25
- // const prevMove = useRef<number>(0);
26
- // const carouselEl = useRef<HTMLDivElement>(null);
27
- // const timer = useRef<ReturnType<typeof setTimeout> | null>(null);
28
- // const isMounted = useRef<boolean>(true);
29
- // useEffect(
30
- // () => () => {
31
- // isMounted.current = false;
32
- // },
33
- // []
34
- // );
35
- // const slidesToScroll =
36
- // props.animation === 'fade' ? props.slidesToShow : props.slidesToScroll;
37
- // const dragThreshold = (carouselWidth.current || 0) / props.slidesToShow / 2;
38
- // const carouselRef = props.innerRef || carouselEl;
39
- // const moveSlide = (to?: number) => {
40
- // const [slide, endSlide] = getIndexes(
41
- // currentSlide,
42
- // currentSlide - slidesToScroll,
43
- // count
44
- // );
45
- // to && props.beforeSlide(slide, endSlide);
46
- // !props.disableAnimation && setAnimation(true);
47
- // setCurrentSlide(to ?? currentSlide);
48
- // setTimeout(
49
- // () => {
50
- // if (!isMounted.current) return;
51
- // to && props.afterSlide(currentSlide);
52
- // !props.disableAnimation && setAnimation(false);
53
- // },
54
- // !props.disableAnimation ? props.speed || 500 : 40
55
- // ); // if animation is disabled decrease the speed to 40
56
- // };
57
- // const nextSlide = () => {
58
- // if (props.wrapAround || currentSlide <= count) {
59
- // moveSlide(currentSlide + slidesToScroll);
60
- // } else {
61
- // moveSlide();
62
- // }
63
- // };
64
- // const prevSlide = () => {
65
- // // boundary
66
- // if (props.wrapAround || currentSlide > 0) {
67
- // moveSlide(currentSlide - slidesToScroll);
68
- // } else {
69
- // moveSlide();
70
- // }
71
- // };
72
- // useEffect(() => {
73
- // if (props.autoplay && !animation && props.wrapAround) {
74
- // if (currentSlide > count) {
75
- // setCurrentSlide(currentSlide - count);
76
- // if (timer?.current) {
77
- // clearTimeout(timer.current);
78
- // }
79
- // } else if (currentSlide < 0) {
80
- // setCurrentSlide(count - -currentSlide);
81
- // if (timer?.current) {
82
- // clearTimeout(timer.current);
83
- // }
84
- // }
85
- // }
86
- // }, [animation, currentSlide]);
87
- // useEffect(() => {
88
- // if (props.autoplay && !pause) {
89
- // timer.current = setTimeout(() => {
90
- // if (props.autoplayReverse) {
91
- // if (!props.wrapAround && currentSlide > 0) {
92
- // prevSlide();
93
- // } else if (props.wrapAround) {
94
- // prevSlide();
95
- // }
96
- // } else if (
97
- // !props.wrapAround &&
98
- // currentSlide < count - props.slidesToShow
99
- // ) {
100
- // nextSlide();
101
- // } else if (props.wrapAround) {
102
- // nextSlide();
103
- // }
104
- // }, props.autoplayInterval);
105
- // }
106
- // // Clear the timeout if user hover on carousel
107
- // if (props.autoplay && pause && timer?.current) {
108
- // clearTimeout(timer.current);
109
- // }
110
- // return () => {
111
- // if (timer.current) {
112
- // clearTimeout(timer.current);
113
- // }
114
- // };
115
- // }, [currentSlide, pause]);
116
- // useEffect(() => {
117
- // // makes the loop infinity
118
- // if (props.wrapAround && !props.autoplay) {
119
- // // if animation is disabled decrease the speed to 0
120
- // const speed = !props.disableAnimation ? props.speed || 500 : 0;
121
- // if (currentSlide <= -props.slidesToShow) {
122
- // // prev
123
- // setTimeout(() => {
124
- // if (!isMounted.current) return;
125
- // setCurrentSlide(count - -currentSlide);
126
- // }, speed + 10);
127
- // } else if (currentSlide >= count) {
128
- // // next
129
- // setTimeout(() => {
130
- // if (!isMounted.current) return;
131
- // setCurrentSlide(currentSlide - count);
132
- // }, speed + 10);
133
- // }
134
- // }
135
- // }, [currentSlide]);
136
- // useEffect(() => {
137
- // if (props.enableKeyboardControls && keyboardMove && focus.current) {
138
- // switch (keyboardMove) {
139
- // case 'nextSlide':
140
- // nextSlide(); // set boundaries for !wrapAround
141
- // break;
142
- // case 'previousSlide':
143
- // prevSlide(); // set boundaries for !wrapAround
144
- // break;
145
- // case 'firstSlide':
146
- // setCurrentSlide(0);
147
- // break;
148
- // case 'lastSlide':
149
- // setCurrentSlide(count - props.slidesToShow);
150
- // break;
151
- // case 'pause':
152
- // if (pause && props.autoplay) {
153
- // setPause(false);
154
- // break;
155
- // } else if (props.autoplay) {
156
- // setPause(true);
157
- // break;
158
- // }
159
- // break;
160
- // }
161
- // setKeyboardMove(null);
162
- // }
163
- // }, [keyboardMove]);
164
- // const onKeyPress = (e: Event) => {
165
- // if (
166
- // props.enableKeyboardControls &&
167
- // focus.current &&
168
- // (e as KeyboardEvent).keyCode
169
- // ) {
170
- // const keyConfig = props.keyCodeConfig;
171
- // for (const func in keyConfig) {
172
- // if (
173
- // keyConfig[func as keyof typeof keyConfig]?.includes(
174
- // (e as KeyboardEvent).keyCode
175
- // )
176
- // ) {
177
- // setKeyboardMove(func as KeyCodeFunction);
178
- // }
179
- // }
180
- // }
181
- // };
182
- // useEffect(() => {
183
- // if (carouselEl && carouselEl.current) {
184
- // carouselWidth.current = carouselEl.current.offsetWidth;
185
- // } else if (props.innerRef) {
186
- // carouselWidth.current = props.innerRef.current.offsetWidth;
187
- // }
188
- // if (props.enableKeyboardControls) {
189
- // addEvent(document, 'keydown', onKeyPress);
190
- // }
191
- // return () => {
192
- // removeEvent(document, 'keydown', onKeyPress);
193
- // };
194
- // }, []);
195
- // const handleDragEnd = () => {
196
- // if (!props.dragging || !dragging) return;
197
- // setDragging(false);
198
- // if (Math.abs(move) <= dragThreshold) {
199
- // moveSlide();
200
- // setMove(0);
201
- // prevMove.current = 0;
202
- // return;
203
- // }
204
- // if (move > 0) {
205
- // nextSlide();
206
- // } else {
207
- // prevSlide();
208
- // }
209
- // setMove(0);
210
- // prevMove.current = 0;
211
- // };
212
- // const onTouchStart = () => {
213
- // if (!props.swiping) {
214
- // return;
215
- // }
216
- // setDragging(true);
217
- // };
218
- // const handlePointerMove = (m: number) => {
219
- // if (!props.dragging || !dragging) return;
220
- // const moveValue = m * 0.75; // Friction
221
- // const moveState = move + (moveValue - prevMove.current);
222
- // // Exit drag early if passed threshold
223
- // if (Math.abs(move) > dragThreshold) {
224
- // handleDragEnd();
225
- // return;
226
- // }
227
- // if (
228
- // !props.wrapAround &&
229
- // props.disableEdgeSwiping &&
230
- // ((currentSlide <= 0 && moveState <= 0) ||
231
- // (moveState > 0 && currentSlide >= count - props.slidesToShow))
232
- // ) {
233
- // prevMove.current = moveValue;
234
- // return;
235
- // }
236
- // if (prevMove.current !== 0) {
237
- // setMove(moveState);
238
- // }
239
- // prevMove.current = moveValue;
240
- // };
241
- // const onTouchMove = (e: React.TouchEvent<HTMLDivElement>) => {
242
- // if (!props.dragging || !dragging) return;
243
- // props.onDragStart(e);
244
- // const moveValue = (carouselWidth?.current || 0) - e.touches[0].pageX;
245
- // handlePointerMove(moveValue);
246
- // };
247
- // const onMouseDown = (e: React.MouseEvent<HTMLDivElement>) => {
248
- // e?.preventDefault();
249
- // carouselRef?.current?.focus();
250
- // if (!props.dragging) return;
251
- // setDragging(true);
252
- // };
253
- // const onMouseMove = (e: React.MouseEvent<HTMLDivElement>) => {
254
- // if (!props.dragging || !dragging) return;
255
- // props.onDragStart(e);
256
- // const offsetX =
257
- // e.clientX - (carouselRef.current?.getBoundingClientRect().left || 0);
258
- // const moveValue = (carouselWidth?.current || 0) - offsetX;
259
- // handlePointerMove(moveValue);
260
- // };
261
- // const onMouseUp = (e?: React.MouseEvent<HTMLDivElement>) => {
262
- // e?.preventDefault();
263
- // handleDragEnd();
264
- // };
265
- // const onMouseEnter = () => {
266
- // if (props.pauseOnHover) {
267
- // setPause(true);
268
- // }
269
- // };
270
- // const onMouseLeave = () => {
271
- // if (props.pauseOnHover) {
272
- // setPause(false);
273
- // }
274
- // };
275
- // const renderSlides = (typeOfSlide?: 'prev-cloned' | 'next-cloned') => {
276
- // const slides = React.Children.map(props.children, (child, index) => {
277
- // const isCurrentSlide = props.wrapAround
278
- // ? currentSlide === index ||
279
- // currentSlide === index + count ||
280
- // currentSlide === index - count
281
- // : currentSlide === index;
282
- // return (
283
- // <Slide
284
- // key={`${typeOfSlide}-${index}`}
285
- // count={count}
286
- // currentSlide={currentSlide}
287
- // index={index}
288
- // isCurrentSlide={isCurrentSlide}
289
- // typeOfSlide={typeOfSlide}
290
- // wrapAround={props.wrapAround}
291
- // cellSpacing={props.cellSpacing}
292
- // animation={props.animation}
293
- // slidesToShow={props.slidesToShow}
294
- // speed={props.speed}
295
- // zoomScale={props.zoomScale}
296
- // cellAlign={props.cellAlign}
297
- // >
298
- // {child}
299
- // </Slide>
300
- // );
301
- // });
302
- // return slides;
303
- // };
304
- // const [slide] = getIndexes(
305
- // currentSlide,
306
- // currentSlide - slidesToScroll,
307
- // count
308
- // );
309
- // return (
310
- // <div
311
- // className={'slider-container'}
312
- // style={{
313
- // position: 'relative',
314
- // padding: props.withoutControls ? 0 : '0 60px 50px'
315
- // }}
316
- // onMouseEnter={onMouseEnter}
317
- // onMouseLeave={onMouseLeave}
318
- // >
319
- // <AnnounceSlide
320
- // ariaLive={props.autoplay && !pause ? 'off' : 'polite'}
321
- // message={props.renderAnnounceSlideMessage({
322
- // currentSlide: slide,
323
- // count
324
- // })}
325
- // />
326
- // <div
327
- // className={['slider-frame', props.className || ''].join(' ').trim()}
328
- // style={{
329
- // overflow: 'hidden',
330
- // width: '100%',
331
- // position: 'relative',
332
- // outline: 'none',
333
- // ...props.style
334
- // }}
335
- // aria-label="carousel-slider"
336
- // role="region"
337
- // tabIndex={0}
338
- // onFocus={() => (focus.current = true)}
339
- // onBlur={() => (focus.current = false)}
340
- // ref={props.innerRef || carouselEl}
341
- // onMouseUp={onMouseUp}
342
- // onMouseDown={onMouseDown}
343
- // onMouseMove={onMouseMove}
344
- // onMouseLeave={onMouseUp}
345
- // onTouchStart={onTouchStart}
346
- // onTouchEnd={handleDragEnd}
347
- // onTouchMove={onTouchMove}
348
- // >
349
- // <div
350
- // className="slider-list"
351
- // style={getSliderListStyles(
352
- // props.children,
353
- // currentSlide,
354
- // animation,
355
- // props.slidesToShow,
356
- // props.cellAlign,
357
- // props.wrapAround,
358
- // props.speed,
359
- // move,
360
- // props.animation
361
- // )}
362
- // >
363
- // {props.wrapAround ? renderSlides('prev-cloned') : null}
364
- // {renderSlides()}
365
- // {props.wrapAround ? renderSlides('next-cloned') : null}
366
- // </div>
367
- // </div>
368
- // {renderControls(
369
- // props,
370
- // count,
371
- // currentSlide,
372
- // moveSlide,
373
- // nextSlide,
374
- // prevSlide,
375
- // slidesToScroll
376
- // )}
377
- // </div>
378
- // );
379
- // };
380
- // Carousel.defaultProps = defaultProps;
381
- // export default Carousel;
@@ -1,27 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.KoineCarouselCss = exports.CarouselCssCol = exports.CarouselCssRow = void 0;
4
- var tslib_1 = require("tslib");
5
- var jsx_runtime_1 = require("react/jsx-runtime");
6
- var react_1 = require("react");
7
- var styled_components_1 = tslib_1.__importDefault(require("styled-components"));
8
- var Grid_1 = require("../Grid");
9
- var useId_1 = require("../hooks/useId");
10
- exports.CarouselCssRow = (0, styled_components_1.default)(Grid_1.Row)(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n ", "\n\n scroll-behavior: smooth;\n scroll-snap-type: x;\n -ms-overflow-style: none;\n scrollbar-width: none;\n\n &::-webkit-scrollbar {\n display: none;\n }\n"], ["\n ", "\n\n scroll-behavior: smooth;\n scroll-snap-type: x;\n -ms-overflow-style: none;\n scrollbar-width: none;\n\n &::-webkit-scrollbar {\n display: none;\n }\n"])), function (_a) {
11
- var cs = _a.$gutter, gutter = _a.theme.gutter;
12
- return "\n margin-left: -".concat(cs === Grid_1.GRID_GUTTER_DEFAULT ? gutter[Grid_1.GRID_GUTTER_DEFAULT] : (gutter[Grid_1.GRID_GUTTER_DEFAULT] - gutter[cs]) * 2, "px;\n margin-right: -").concat(cs === Grid_1.GRID_GUTTER_DEFAULT ? gutter[Grid_1.GRID_GUTTER_DEFAULT] : (gutter[Grid_1.GRID_GUTTER_DEFAULT] - gutter[cs]) * 2, "px;\n padding-left: ").concat(cs === Grid_1.GRID_GUTTER_DEFAULT ? gutter[Grid_1.GRID_GUTTER_DEFAULT] : gutter[Grid_1.GRID_GUTTER_DEFAULT] - gutter[cs], "px;\n padding-right: ").concat(cs === Grid_1.GRID_GUTTER_DEFAULT ? gutter[Grid_1.GRID_GUTTER_DEFAULT] : gutter[Grid_1.GRID_GUTTER_DEFAULT] - gutter[cs], "px;\n ");
13
- });
14
- exports.CarouselCssCol = (0, styled_components_1.default)(Grid_1.Col)(templateObject_2 || (templateObject_2 = tslib_1.__makeTemplateObject(["\n ", "\n position: relative;\n scroll-snap-align: ", ";\n"], ["\n ", "\n position: relative;\n scroll-snap-align: ", ";\n"])), function (p) { return p.$width && "flex-basis: ".concat(p.$width, "px; min-width: ").concat(p.$width, "px;"); }, function (p) { return p.$snap; });
15
- /**
16
- * For programmatic usage an example here @see https://stackoverflow.com/a/65902068/9122820
17
- */
18
- var KoineCarouselCss = function (_a) {
19
- var items = _a.items, $gutterRow = _a.$gutterRow, $gutterCol = _a.$gutterCol, _b = _a.$gutter, $gutter = _b === void 0 ? "quarter" : _b, $proportion = _a.$proportion, _c = _a.$snap, $snap = _c === void 0 ? "center" : _c, width = _a.width, children = _a.children, colProps = tslib_1.__rest(_a, ["items", "$gutterRow", "$gutterCol", "$gutter", "$proportion", "$snap", "width", "children"]);
20
- var slides = children ? react_1.Children.toArray(children) : items;
21
- var id = (0, useId_1.useId)();
22
- if (!slides)
23
- return null;
24
- return ((0, jsx_runtime_1.jsx)(exports.CarouselCssRow, tslib_1.__assign({ "$noWrap": true, "$gutter": $gutterRow || $gutter }, { children: slides.map(function (_slide, idx) { return ((0, jsx_runtime_1.jsx)(exports.CarouselCssCol, tslib_1.__assign({}, colProps, { "$gutter": $gutterCol || $gutter, "$width": width }, { children: slides[idx] }), "CarouselCssCol-".concat(id, "-").concat(idx))); }) })));
25
- };
26
- exports.KoineCarouselCss = KoineCarouselCss;
27
- var templateObject_1, templateObject_2;
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./CarouselCss"), exports);
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Collapsable = void 0;
4
- exports.Collapsable = null;
@@ -1,253 +0,0 @@
1
- "use strict";
2
- /**
3
- * @file
4
- *
5
- * Maybe do a simplified version following this example:
6
- * https://codesandbox.io/s/framer-motion-accordion-qx958?file=/src/Example.tsx
7
- */
8
- // import { forwardRef, useCallback, useEffect, /* useId, */ useRef, useState } from "react";
9
- // import styled from "styled-components";
10
- // import { MotionProps, m } from "framer-motion";
11
- // import {
12
- // Disclosure,
13
- // DisclosureButton,
14
- // DisclosurePanel,
15
- // } from "@reach/disclosure";
16
- // import { BsBoxArrowInDown as IconCollapse } from "react-icons/bs";
17
- // import { btnStyleReset } from "../Buttons";
18
- // import { useWindowSize } from "../hooks/useWindowSize";
19
- // import { InputInvisible } from "../Forms/styles";
20
- // import { useId } from "../hooks/useId";
21
- // export type CollapsableStyledProps = {
22
- // $expanded?: boolean;
23
- // };
24
- // /**
25
- // * `overflow-anchor: none;` keeps the same scrolling position
26
- // * @see https://github.com/mui/material-ui/blob/master/packages/mui-material/src/Accordion/Accordion.js#L54
27
- // */
28
- // export const CollapsableRoot = styled(Disclosure)`
29
- // overflow-anchor: none;
30
- // `;
31
- // export const CollapsableHeadRoot = styled(m.label).attrs(
32
- // (props: Pick<CollapsableHeadProps, "id">) => ({
33
- // htmlFor: `${props.id}-input`,
34
- // })
35
- // )<Pick<CollapsableStyledProps, "$expanded">>`
36
- // ${btnStyleReset}
37
- // width: 100%;
38
- // padding: 0;
39
- // text-align: left;
40
- // display: flex;
41
- // justify-content: space-between;
42
- // align-items: center;
43
- // cursor: pointer;
44
- // `;
45
- // export const CollapsableHeadSpace = styled.div`
46
- // flex: 1;
47
- // padding-left: 20px;
48
- // `;
49
- // export const CollapsableHeadAction = styled.div`
50
- // padding-left: 20px;
51
- // `;
52
- // export const CollaspableHeadLine = styled(m.div)`
53
- // width: 0%;
54
- // height: 1px;
55
- // background: #bbb;
56
- // `;
57
- // export const collapsableHeadLineMotion = {
58
- // hover: {
59
- // width: "100%",
60
- // transition: {
61
- // duration: 0.4,
62
- // },
63
- // },
64
- // };
65
- // export const CollapsableHeadText = styled.div``;
66
- // export const CollapsableHeadIcon = styled(m.div)``;
67
- // export type CollapsableHeadProps = React.PropsWithChildren<
68
- // Pick<CollapsableStyledProps, "$expanded"> &
69
- // CollapsableComponents & {
70
- // id: CollapsableProps["id"];
71
- // onClick: (...args: any) => any;
72
- // }
73
- // >;
74
- // export const CollapsableHead = ({
75
- // $expanded,
76
- // id,
77
- // onClick,
78
- // HeadRoot = CollapsableHeadRoot,
79
- // HeadAction = CollapsableHeadAction,
80
- // HeadIcon = CollapsableHeadIcon,
81
- // children,
82
- // }: CollapsableHeadProps) => {
83
- // return (
84
- // <DisclosureButton
85
- // onClick={onClick}
86
- // // tabIndex={0}
87
- // // role="tab"
88
- // initial="rest"
89
- // whileHover="hover"
90
- // $expanded={$expanded}
91
- // as={HeadRoot}
92
- // id={id}
93
- // >
94
- // <CollapsableHeadText>{children}</CollapsableHeadText>
95
- // <CollapsableHeadSpace>
96
- // <CollaspableHeadLine
97
- // variants={collapsableHeadLineMotion}
98
- // animate={$expanded ? "hover" : ""}
99
- // />
100
- // </CollapsableHeadSpace>
101
- // {HeadAction && (
102
- // <HeadAction>
103
- // {HeadIcon && (
104
- // <HeadIcon animate={{ rotate: $expanded ? 180 : 0 }}>
105
- // <IconCollapse />
106
- // </HeadIcon>
107
- // )}
108
- // </HeadAction>
109
- // )}
110
- // </DisclosureButton>
111
- // );
112
- // };
113
- // export const CollapsableInput = styled(InputInvisible).attrs({
114
- // type: "checkbox",
115
- // })``;
116
- // export const CollasableBodyWrap = styled(
117
- // DisclosurePanel
118
- // )<CollapsableStyledProps>`
119
- // /* this is because @reach adds the "hidden" attribute */
120
- // &[hidden] {
121
- // display: block;
122
- // }
123
- // `;
124
- // export const CollapsableBodyRoot = styled(m.div)`
125
- // .no-js & {
126
- // transition: margin-top 0.2s ease;
127
- // }
128
- // .no-js ${CollapsableInput}:checked + ${CollasableBodyWrap} & {
129
- // margin-top: 0 !important;
130
- // opacity: 1 !important;
131
- // }
132
- // `;
133
- // export type CollapsableBodyProps = MotionProps &
134
- // Pick<CollapsableStyledProps, "$expanded"> & {
135
- // children?: React.ReactNode;
136
- // style?: React.CSSProperties;
137
- // };
138
- // export const CollapsableBody = forwardRef<HTMLDivElement, CollapsableBodyProps>(
139
- // function CollapsableBody(props, ref) {
140
- // return <CollapsableBodyRoot ref={ref} {...props} />;
141
- // }
142
- // );
143
- // export type CollapsableComponents = {
144
- // HeadRoot?: typeof CollapsableHeadRoot;
145
- // HeadAction?: null | typeof CollapsableHeadAction | React.FC<any>;
146
- // HeadIcon?: null | typeof CollapsableHeadIcon | React.FC<any>;
147
- // };
148
- // export type CollapsableProps = React.ComponentPropsWithoutRef<"div"> & {
149
- // id?: string;
150
- // expanded?: boolean;
151
- // /** Used to trigger a recalculation effect */
152
- // recalc?: any;
153
- // onChange?: () => any;
154
- // head: null | React.ReactNode;
155
- // body: React.ReactNode;
156
- // /** Amount of milliseconds after which the component collapses */
157
- // // autoCollapse?: number;
158
- // components?: CollapsableComponents;
159
- // /** @default "Expand" */
160
- // ariaExpand?: string;
161
- // /** @default "Collapse" */
162
- // ariaCollapse?: string;
163
- // };
164
- // export const Collapsable = ({
165
- // expanded: propExpanded,
166
- // recalc,
167
- // onChange,
168
- // id,
169
- // head,
170
- // body,
171
- // // autoCollapse,
172
- // components = {},
173
- // ariaExpand = "Expand",
174
- // ariaCollapse = "Collapse",
175
- // ...props
176
- // }: CollapsableProps) => {
177
- // const isControlled = typeof propExpanded !== "undefined";
178
- // const [stateExpanded, setStateExpanded] = useState(propExpanded);
179
- // const [height, setHeight] = useState(0);
180
- // const hash = id ? `#${id}` : "";
181
- // const winSize = useWindowSize();
182
- // const expanded = isControlled ? propExpanded : stateExpanded;
183
- // const [overflow, setOverflow] = useState(expanded ? "unset" : "hidden");
184
- // const content = useRef<HTMLDivElement>(null);
185
- // const defaultId = useId();
186
- // id = id || defaultId;
187
- // const handleClick = useCallback(() => {
188
- // if (hash) {
189
- // window.history.replaceState(
190
- // null,
191
- // "",
192
- // expanded ? window.location.pathname + window.location.search : hash
193
- // );
194
- // }
195
- // if (onChange) {
196
- // onChange();
197
- // }
198
- // if (!isControlled) {
199
- // setStateExpanded((prevExpanded) => !prevExpanded);
200
- // }
201
- // }, [expanded, hash, onChange, isControlled]);
202
- // const handleAnimationStart = useCallback(() => {
203
- // setOverflow("hidden");
204
- // }, []);
205
- // const handleAnimationComplete = useCallback(() => {
206
- // setOverflow(expanded ? "unset" : "hidden");
207
- // }, [expanded]);
208
- // useEffect(() => {
209
- // if (content.current) {
210
- // setHeight(Math.ceil(content.current.offsetHeight));
211
- // }
212
- // }, [winSize, recalc]);
213
- // // deeplink on mount
214
- // useEffect(() => {
215
- // if (!isControlled && hash && window.location.hash === hash) {
216
- // setStateExpanded(true);
217
- // }
218
- // }, [hash, isControlled]);
219
- // return (
220
- // <CollapsableRoot id={id} {...props} open={expanded || false}>
221
- // {head !== null && (
222
- // <CollapsableHead
223
- // id={id}
224
- // $expanded={expanded}
225
- // onClick={handleClick}
226
- // {...components}
227
- // >
228
- // {head}
229
- // </CollapsableHead>
230
- // )}
231
- // <CollapsableInput id={`${id}-input`} />
232
- // <CollasableBodyWrap $expanded={expanded} style={{ overflow }}>
233
- // <CollapsableBody
234
- // ref={content}
235
- // $expanded={expanded}
236
- // // aria-expanded={expanded}
237
- // // aria-label={expanded ? ariaCollapse : ariaExpand}
238
- // style={{
239
- // pointerEvents: expanded ? "all" : "none",
240
- // }}
241
- // onAnimationStart={handleAnimationStart}
242
- // onAnimationComplete={handleAnimationComplete}
243
- // animate={{
244
- // marginTop: expanded ? 0 : height ? `-${height}px` : "-100vh",
245
- // opacity: expanded ? 1 : 0.4,
246
- // }}
247
- // >
248
- // {body}
249
- // </CollapsableBody>
250
- // </CollasableBodyWrap>
251
- // </CollapsableRoot>
252
- // );
253
- // };
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./Collapsable"), exports);
5
- // export * from "./CollapsableReach";