@kubit-ui-web/react-components 2.0.0-beta.1 → 2.0.0-beta.10
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/README.md +320 -46
- package/dist/cjs/components/accordion/accordionStandAlone.js +1 -1
- package/dist/cjs/components/avatar/fragments/drawContent.js +1 -1
- package/dist/cjs/components/badge/badgeStandAlone.js +1 -1
- package/dist/cjs/components/breadcrumbs/components/crumbStandAlone/crumbStandAlone.js +1 -1
- package/dist/cjs/components/button/buttonStandAlone.js +1 -1
- package/dist/cjs/components/calendar/list/list.js +1 -1
- package/dist/cjs/components/calendar/selector/monthSelector/monthSelector.js +1 -1
- package/dist/cjs/components/calendar/selector/selector.js +1 -1
- package/dist/cjs/components/carousel/hooks/useCarousel.js +1 -1
- package/dist/cjs/components/carousel/hooks/useCarouselKeyNavigation.js +1 -1
- package/dist/cjs/components/carousel/hooks/useCarouselSwipe.js +1 -1
- package/dist/cjs/components/carousel/hooks/utils/calc.utils.js +1 -1
- package/dist/cjs/components/carousel/hooks/utils/dom.utils.js +1 -1
- package/dist/cjs/components/checkbox/checkboxStandAlone.js +1 -1
- package/dist/cjs/components/checkboxBase/checkboxBaseStandAlone.js +1 -1
- package/dist/cjs/components/chip/chipStandAlone.js +1 -1
- package/dist/cjs/components/dataTable/dataTableStandAlone.js +1 -1
- package/dist/cjs/components/dropdownSelected/dropdownSelectedStandAlone.js +1 -1
- package/dist/cjs/components/image/image.css +1 -38
- package/dist/cjs/components/input/input.js +1 -1
- package/dist/cjs/components/input/inputStandAlone.js +1 -1
- package/dist/cjs/components/inputBase/inputBase.js +1 -1
- package/dist/cjs/components/inputDecoration/inputDecorationStandAlone.js +1 -1
- package/dist/cjs/components/inputSignature/inputSignatureStandAlone.js +1 -1
- package/dist/cjs/components/label/labelStandAlone.js +1 -1
- package/dist/cjs/components/link/linkStandAlone.js +1 -1
- package/dist/cjs/components/listOptions/listOptionsStandAlone.js +1 -1
- package/dist/cjs/components/message/messageStandAlone.js +1 -1
- package/dist/cjs/components/modal/fragments/modalHeader.js +1 -1
- package/dist/cjs/components/modal/modalStandAlone.js +1 -1
- package/dist/cjs/components/option/optionStandAlone.js +1 -1
- package/dist/cjs/components/pageControl/components/arrowControlStandAlone.js +1 -1
- package/dist/cjs/components/pageControl/components/controls.js +1 -1
- package/dist/cjs/components/pageControl/pageControlStandAlone.js +1 -1
- package/dist/cjs/components/pagination/fragments/paginationButtonControl.js +1 -1
- package/dist/cjs/components/popover/hooks/positioning/middlewareUtils.js +1 -1
- package/dist/cjs/components/popover/hooks/usePopoverLifecycle.js +1 -1
- package/dist/cjs/components/popover/hooks/usePopoverPositioning.js +1 -1
- package/dist/cjs/components/popover/popover.js +1 -1
- package/dist/cjs/components/popover/styles/index.css +1 -10
- package/dist/cjs/components/popover/styles/keyframes.css +1 -421
- package/dist/cjs/components/popover/styles/popover-arrow.css +1 -42
- package/dist/cjs/components/popover/styles/popover.css +1 -189
- package/dist/cjs/components/radioButton/radioButtonStandAlone.js +1 -1
- package/dist/cjs/components/selectorBoxFile/components/selectorBoxFileAnimation.js +1 -1
- package/dist/cjs/components/selectorBoxFile/components/selectorBoxFileContainerBox.js +1 -1
- package/dist/cjs/components/selectorBoxFile/components/selectorBoxFileErrorMessage.js +1 -1
- package/dist/cjs/components/selectorBoxFile/components/selectorBoxFileHeader.js +1 -1
- package/dist/cjs/components/selectorBoxFile/components/selectorBoxFileTooltip.js +1 -1
- package/dist/cjs/components/selectorBoxFile/selectorBoxFileStandAlone.js +1 -1
- package/dist/cjs/components/skeleton/skeleton.css +1 -20
- package/dist/cjs/components/slider/components/sliderHelperTextStandAlone.js +1 -1
- package/dist/cjs/components/slider/components/sliderScaleStandAlone.js +1 -1
- package/dist/cjs/components/slider/components/sliderThumbStandAlone.js +1 -1
- package/dist/cjs/components/slider/sliderStandAlone.js +1 -1
- package/dist/cjs/components/stepperNumber/stepperNumberStandAlone.js +1 -1
- package/dist/cjs/components/table/__stories__/css/table.css +1 -7
- package/dist/cjs/components/tabs/tabsStandAlone.js +1 -1
- package/dist/cjs/components/tag/tagStandAlone.js +1 -1
- package/dist/cjs/components/text/text.css +1 -14
- package/dist/cjs/components/text/textStandAlone.js +1 -1
- package/dist/cjs/components/textArea/components/errorStandAlone.js +1 -1
- package/dist/cjs/components/textArea/textAreaStandAlone.js +1 -1
- package/dist/cjs/components/toggle/toggleStandAlone.js +1 -1
- package/dist/cjs/components/tooltip/hooks/useTooltip.js +1 -1
- package/dist/cjs/components/tooltip/tooltip.css +1 -69
- package/dist/cjs/components/tooltip/tooltipStandAlone.js +1 -1
- package/dist/cjs/components/virtualKeyboard/virtualKeyboardStandAlone.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/lib/components/customComponent/customComponent.js +1 -1
- package/dist/cjs/lib/components/elementOrIcon/elementOrIcon.js +1 -0
- package/dist/cjs/lib/components/errorMessage/errorMessageStandAlone.js +1 -1
- package/dist/cjs/lib/components/itemRove/itemRove.js +1 -0
- package/dist/cjs/lib/components/overlay/overlay.js +1 -0
- package/dist/cjs/lib/components/overlay/overlayStandAlone.js +1 -0
- package/dist/cjs/lib/hooks/useContentVisibility/useContentVisibility.js +1 -1
- package/dist/cjs/lib/hooks/useScrollEffect/useScrollEffect.js +1 -1
- package/dist/cjs/lib/provider/cssProvider/provider.js +1 -1
- package/dist/cjs/lib/provider/cssProvider/stats/stats.js +1 -1641
- package/dist/cjs/lib/provider/stylesProvider/stylesProvider.js +1 -1
- package/dist/cjs/lib/utils/process/processIcon/processIcon.js +1 -1
- package/dist/cjs/lib/utils/process/processText/processText.js +1 -1
- package/dist/esm/components/accordion/accordionStandAlone.js +4 -4
- package/dist/esm/components/avatar/fragments/drawContent.js +1 -4
- package/dist/esm/components/badge/badgeStandAlone.js +7 -9
- package/dist/esm/components/breadcrumbs/components/crumbStandAlone/crumbStandAlone.js +3 -6
- package/dist/esm/components/button/buttonStandAlone.js +3 -5
- package/dist/esm/components/calendar/list/list.js +1 -1
- package/dist/esm/components/calendar/selector/monthSelector/monthSelector.js +1 -1
- package/dist/esm/components/calendar/selector/selector.js +7 -9
- package/dist/esm/components/carousel/hooks/useCarousel.js +1 -1
- package/dist/esm/components/carousel/hooks/useCarouselKeyNavigation.js +1 -1
- package/dist/esm/components/carousel/hooks/useCarouselSwipe.js +1 -1
- package/dist/esm/components/carousel/hooks/utils/calc.utils.js +1 -1
- package/dist/esm/components/carousel/hooks/utils/dom.utils.js +1 -1
- package/dist/esm/components/checkbox/checkboxStandAlone.js +5 -7
- package/dist/esm/components/checkboxBase/checkboxBaseStandAlone.js +4 -4
- package/dist/esm/components/chip/chipStandAlone.js +8 -9
- package/dist/esm/components/dataTable/dataTableStandAlone.js +10 -14
- package/dist/esm/components/dropdownSelected/dropdownSelectedStandAlone.js +5 -6
- package/dist/esm/components/image/image.css +1 -38
- package/dist/esm/components/input/input.js +2 -2
- package/dist/esm/components/input/inputStandAlone.js +3 -5
- package/dist/esm/components/inputBase/inputBase.js +2 -2
- package/dist/esm/components/inputDecoration/inputDecorationStandAlone.js +2 -2
- package/dist/esm/components/inputSignature/inputSignatureStandAlone.js +3 -4
- package/dist/esm/components/label/labelStandAlone.js +2 -3
- package/dist/esm/components/link/linkStandAlone.js +3 -3
- package/dist/esm/components/listOptions/listOptionsStandAlone.js +2 -4
- package/dist/esm/components/message/messageStandAlone.js +5 -10
- package/dist/esm/components/modal/fragments/modalHeader.js +3 -9
- package/dist/esm/components/modal/modalStandAlone.js +4 -5
- package/dist/esm/components/option/optionStandAlone.js +9 -12
- package/dist/esm/components/pageControl/components/arrowControlStandAlone.js +2 -2
- package/dist/esm/components/pageControl/components/controls.js +2 -4
- package/dist/esm/components/pageControl/pageControlStandAlone.js +6 -8
- package/dist/esm/components/pagination/fragments/paginationButtonControl.js +2 -2
- package/dist/esm/components/popover/hooks/positioning/middlewareUtils.js +1 -1
- package/dist/esm/components/popover/hooks/usePopoverLifecycle.js +1 -1
- package/dist/esm/components/popover/hooks/usePopoverPositioning.js +1 -1
- package/dist/esm/components/popover/popover.js +1 -1
- package/dist/esm/components/popover/styles/index.css +1 -10
- package/dist/esm/components/popover/styles/keyframes.css +1 -421
- package/dist/esm/components/popover/styles/popover-arrow.css +1 -42
- package/dist/esm/components/popover/styles/popover.css +1 -189
- package/dist/esm/components/radioButton/radioButtonStandAlone.js +4 -8
- package/dist/esm/components/selectorBoxFile/components/selectorBoxFileAnimation.js +3 -7
- package/dist/esm/components/selectorBoxFile/components/selectorBoxFileContainerBox.js +9 -13
- package/dist/esm/components/selectorBoxFile/components/selectorBoxFileErrorMessage.js +3 -3
- package/dist/esm/components/selectorBoxFile/components/selectorBoxFileHeader.js +5 -9
- package/dist/esm/components/selectorBoxFile/components/selectorBoxFileTooltip.js +1 -1
- package/dist/esm/components/selectorBoxFile/selectorBoxFileStandAlone.js +7 -8
- package/dist/esm/components/skeleton/skeleton.css +1 -20
- package/dist/esm/components/slider/components/sliderHelperTextStandAlone.js +1 -3
- package/dist/esm/components/slider/components/sliderScaleStandAlone.js +2 -2
- package/dist/esm/components/slider/components/sliderThumbStandAlone.js +1 -1
- package/dist/esm/components/slider/sliderStandAlone.js +17 -19
- package/dist/esm/components/stepperNumber/stepperNumberStandAlone.js +8 -8
- package/dist/esm/components/table/__stories__/css/table.css +1 -7
- package/dist/esm/components/tabs/tabsStandAlone.js +5 -6
- package/dist/esm/components/tag/tagStandAlone.js +4 -4
- package/dist/esm/components/text/text.css +1 -14
- package/dist/esm/components/text/textStandAlone.js +1 -1
- package/dist/esm/components/textArea/components/errorStandAlone.js +3 -3
- package/dist/esm/components/textArea/textAreaStandAlone.js +11 -12
- package/dist/esm/components/toggle/toggleStandAlone.js +4 -4
- package/dist/esm/components/tooltip/hooks/useTooltip.js +1 -1
- package/dist/esm/components/tooltip/tooltip.css +1 -69
- package/dist/esm/components/tooltip/tooltipStandAlone.js +8 -10
- package/dist/esm/components/virtualKeyboard/virtualKeyboardStandAlone.js +4 -4
- package/dist/esm/index.js +1 -1
- package/dist/esm/lib/components/customComponent/customComponent.js +2 -2
- package/dist/esm/lib/components/elementOrIcon/elementOrIcon.js +1 -0
- package/dist/esm/lib/components/errorMessage/errorMessageStandAlone.js +3 -3
- package/dist/esm/lib/components/itemRove/itemRove.js +2 -0
- package/dist/esm/lib/components/overlay/overlay.js +2 -0
- package/dist/esm/lib/components/overlay/overlayStandAlone.js +2 -0
- package/dist/esm/lib/hooks/useContentVisibility/useContentVisibility.js +1 -1
- package/dist/esm/lib/hooks/useScrollEffect/useScrollEffect.js +1 -1
- package/dist/esm/lib/provider/cssProvider/provider.js +1 -1
- package/dist/esm/lib/provider/cssProvider/stats/stats.js +1 -1641
- package/dist/esm/lib/provider/stylesProvider/stylesProvider.js +2 -2
- package/dist/esm/lib/utils/process/processIcon/processIcon.js +1 -1
- package/dist/esm/lib/utils/process/processText/processText.js +1 -1
- package/dist/styles/kubit/css/kubit.css +1 -1
- package/dist/types/index.d.ts +310 -31
- package/package.json +39 -14
- package/dist/cjs/components/elementOrIcon/elementOrIcon.js +0 -1
- package/dist/cjs/components/elementOrIcon/index.js +0 -2
- package/dist/cjs/components/itemRove/index.js +0 -2
- package/dist/cjs/components/itemRove/itemRove.js +0 -1
- package/dist/cjs/components/overlay/index.js +0 -1
- package/dist/cjs/components/overlay/overlay.js +0 -1
- package/dist/cjs/components/overlay/overlayStandAlone.js +0 -1
- package/dist/cjs/components/renderIf/renderIf.js +0 -1
- package/dist/cjs/lib/designSystem/kubit/css/kubit.css +0 -1683
- package/dist/cjs/lib/designSystem/kubit/css/kubit.min.css +0 -1
- package/dist/cjs/lib/hooks/useContentVisibilityDetection/useContentVisibilityDetection.js +0 -1
- package/dist/cjs/lib/hooks/useId/useId.js +0 -1
- package/dist/cjs/lib/utils/changeCssProperty/changeCssProperty.js +0 -1
- package/dist/cjs/lib/utils/is/isReactNode.js +0 -1
- package/dist/cjs/lib/utils/is/isString.js +0 -1
- package/dist/cjs/node_modules/react/cjs/react-jsx-runtime.production.min.js +0 -1
- package/dist/cjs/node_modules/react/jsx-runtime.js +0 -1
- package/dist/esm/components/elementOrIcon/elementOrIcon.js +0 -1
- package/dist/esm/components/elementOrIcon/index.js +0 -1
- package/dist/esm/components/itemRove/index.js +0 -1
- package/dist/esm/components/itemRove/itemRove.js +0 -2
- package/dist/esm/components/overlay/index.js +0 -1
- package/dist/esm/components/overlay/overlay.js +0 -2
- package/dist/esm/components/overlay/overlayStandAlone.js +0 -2
- package/dist/esm/components/renderIf/renderIf.js +0 -1
- package/dist/esm/lib/designSystem/kubit/css/kubit.css +0 -1683
- package/dist/esm/lib/designSystem/kubit/css/kubit.min.css +0 -1
- package/dist/esm/lib/hooks/useContentVisibilityDetection/useContentVisibilityDetection.js +0 -1
- package/dist/esm/lib/hooks/useId/useId.js +0 -1
- package/dist/esm/lib/utils/changeCssProperty/changeCssProperty.js +0 -1
- package/dist/esm/lib/utils/is/isReactNode.js +0 -1
- package/dist/esm/lib/utils/is/isString.js +0 -1
- package/dist/esm/node_modules/react/cjs/react-jsx-runtime.production.min.js +0 -1
- package/dist/esm/node_modules/react/jsx-runtime.js +0 -1
- /package/dist/cjs/lib/hooks/{useContentVisibilityDetection → useContentVisibility}/utils/contentVisibility.js +0 -0
- /package/dist/esm/lib/hooks/{useContentVisibilityDetection → useContentVisibility}/utils/contentVisibility.js +0 -0
package/README.md
CHANGED
|
@@ -7,16 +7,20 @@
|
|
|
7
7
|
</a>
|
|
8
8
|
</p>
|
|
9
9
|
|
|
10
|
-
<div align=
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
<div align="center">
|
|
11
|
+
|
|
12
|
+
[](https://www.npmjs.com/package/@kubit-ui-web/react-components)
|
|
13
|
+
[](https://www.npmjs.com/package/@kubit-ui-web/react-components)
|
|
14
|
+
[](https://bundlephobia.com/package/@kubit-ui-web/react-components)
|
|
15
|
+
|
|
16
|
+
[](./LICENSE.md)
|
|
17
|
+
[](https://github.com/kubit-ui/kubit-react-components/stargazers)
|
|
18
|
+
[](https://github.com/kubit-ui/kubit-react-components/issues)
|
|
19
|
+
|
|
20
|
+
[](https://www.typescriptlang.org/)
|
|
21
|
+
[](https://reactjs.org/)
|
|
22
|
+
[](https://storybook.js.org/)
|
|
23
|
+
|
|
20
24
|
</div>
|
|
21
25
|
|
|
22
26
|
<br />
|
|
@@ -27,9 +31,23 @@
|
|
|
27
31
|
|
|
28
32
|
# Getting Started
|
|
29
33
|
|
|
34
|
+
> **Kubit React Components** is a customizable, accessible library of React web components, designed to enhance your application's user experience with production-ready components.
|
|
35
|
+
|
|
36
|
+
## 📋 Table of Contents
|
|
37
|
+
|
|
38
|
+
- [Installation](#installation)
|
|
39
|
+
- [Quick Start](#quick-start)
|
|
40
|
+
- [Usage](#usage)
|
|
41
|
+
- [Documentation](#documentation)
|
|
42
|
+
- [Storybook](#storybook)
|
|
43
|
+
- [Features](#features)
|
|
44
|
+
- [Browser Support](#browser-support)
|
|
45
|
+
- [Contributing](#contributing)
|
|
46
|
+
- [License](#license)
|
|
47
|
+
|
|
30
48
|
## Installation
|
|
31
49
|
|
|
32
|
-
|
|
50
|
+
Install the package using your preferred package manager:
|
|
33
51
|
|
|
34
52
|
### npm
|
|
35
53
|
|
|
@@ -43,16 +61,33 @@ npm install @kubit-ui-web/react-components
|
|
|
43
61
|
yarn add @kubit-ui-web/react-components
|
|
44
62
|
```
|
|
45
63
|
|
|
46
|
-
|
|
64
|
+
### pnpm
|
|
47
65
|
|
|
48
|
-
|
|
66
|
+
```bash
|
|
67
|
+
pnpm add @kubit-ui-web/react-components
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**Package Info:**
|
|
71
|
+
|
|
72
|
+
- 📦 Size: ~235 KB (gzipped)
|
|
73
|
+
- 🎯 Tree-shakeable: Yes
|
|
74
|
+
- 📘 TypeScript: Full support
|
|
75
|
+
- ⚛️ React: 17+ and 18+
|
|
76
|
+
|
|
77
|
+
## Quick Start
|
|
78
|
+
|
|
79
|
+
Import and use components in your application:
|
|
80
|
+
|
|
81
|
+
## Quick Start
|
|
49
82
|
|
|
50
|
-
|
|
83
|
+
Import and use components in your application:
|
|
51
84
|
|
|
52
85
|
```tsx
|
|
53
|
-
import { Button, KubitProvider } from '@kubit-ui-web/react-components';
|
|
54
86
|
import React from 'react';
|
|
55
87
|
|
|
88
|
+
import { Button, KubitProvider } from '@kubit-ui-web/react-components';
|
|
89
|
+
import '@kubit-ui-web/react-components/styles/default/default.min.css';
|
|
90
|
+
|
|
56
91
|
const App = () => {
|
|
57
92
|
return (
|
|
58
93
|
<KubitProvider>
|
|
@@ -66,74 +101,313 @@ const App = () => {
|
|
|
66
101
|
export default App;
|
|
67
102
|
```
|
|
68
103
|
|
|
69
|
-
|
|
104
|
+
> **Note:** The `KubitProvider` is required to use the components. It provides the theme and other context.
|
|
105
|
+
|
|
106
|
+
## Usage
|
|
107
|
+
|
|
108
|
+
### Basic Components
|
|
109
|
+
|
|
110
|
+
```tsx
|
|
111
|
+
import {
|
|
112
|
+
Button,
|
|
113
|
+
Input,
|
|
114
|
+
KubitProvider,
|
|
115
|
+
Modal,
|
|
116
|
+
Tooltip,
|
|
117
|
+
} from '@kubit-ui-web/react-components';
|
|
118
|
+
|
|
119
|
+
function MyApp() {
|
|
120
|
+
return (
|
|
121
|
+
<KubitProvider>
|
|
122
|
+
<Input label="Email" placeholder="Enter your email" type="email" />
|
|
123
|
+
|
|
124
|
+
<Button variant="PRIMARY" onClick={handleClick}>
|
|
125
|
+
Submit
|
|
126
|
+
</Button>
|
|
127
|
+
|
|
128
|
+
<Tooltip content="Helpful information">
|
|
129
|
+
<span>Hover me</span>
|
|
130
|
+
</Tooltip>
|
|
131
|
+
</KubitProvider>
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Custom Theme
|
|
137
|
+
|
|
138
|
+
Customize the theme to match your brand:
|
|
139
|
+
|
|
140
|
+
```tsx
|
|
141
|
+
import { KubitProvider } from '@kubit-ui-web/react-components';
|
|
142
|
+
|
|
143
|
+
const customTheme = {
|
|
144
|
+
colors: {
|
|
145
|
+
primary: '#your-color',
|
|
146
|
+
secondary: '#your-secondary',
|
|
147
|
+
},
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
function App() {
|
|
151
|
+
return (
|
|
152
|
+
<KubitProvider theme={customTheme}>{/* Your components */}</KubitProvider>
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
For more information about theme customization, visit [Kubit UI Documentation](https://kubit-ui.com).
|
|
158
|
+
|
|
159
|
+
## Features
|
|
160
|
+
|
|
161
|
+
✨ **50+ Production-Ready Components**
|
|
70
162
|
|
|
71
|
-
|
|
163
|
+
- Buttons, Inputs, Modals, Tooltips, and more
|
|
164
|
+
- Fully customizable and themeable
|
|
72
165
|
|
|
73
|
-
|
|
166
|
+
♿ **Accessible by Default**
|
|
167
|
+
|
|
168
|
+
- WCAG 2.1 AA compliant
|
|
169
|
+
- Keyboard navigation support
|
|
170
|
+
- Screen reader friendly
|
|
171
|
+
|
|
172
|
+
🎨 **Design System Integration**
|
|
173
|
+
|
|
174
|
+
- Built with design tokens
|
|
175
|
+
- CSS variables for easy customization
|
|
176
|
+
- Bernova CSS generation
|
|
177
|
+
|
|
178
|
+
📦 **Developer Experience**
|
|
179
|
+
|
|
180
|
+
- Full TypeScript support
|
|
181
|
+
- Tree-shakeable exports
|
|
182
|
+
- Comprehensive documentation
|
|
183
|
+
- Rich Storybook examples
|
|
184
|
+
|
|
185
|
+
🚀 **Performance Optimized**
|
|
186
|
+
|
|
187
|
+
- Small bundle size (~235 KB gzipped)
|
|
188
|
+
- Code splitting ready
|
|
189
|
+
- Minimal runtime overhead
|
|
190
|
+
|
|
191
|
+
## Browser Support
|
|
192
|
+
|
|
193
|
+
| Browser | Version |
|
|
194
|
+
| ------- | --------------- |
|
|
195
|
+
| Chrome | Last 2 versions |
|
|
196
|
+
| Firefox | Last 2 versions |
|
|
197
|
+
| Safari | Last 2 versions |
|
|
198
|
+
| Edge | Last 2 versions |
|
|
74
199
|
|
|
75
200
|
## Documentation
|
|
76
201
|
|
|
77
|
-
You can find
|
|
202
|
+
You can find comprehensive documentation for all components at:
|
|
203
|
+
|
|
204
|
+
🌐 **[Kubit UI Website](https://kubit-ui.com)**
|
|
205
|
+
|
|
206
|
+
- Component API documentation
|
|
207
|
+
- Interactive examples
|
|
208
|
+
- Design guidelines
|
|
209
|
+
- Migration guides
|
|
78
210
|
|
|
79
211
|
## Storybook
|
|
80
212
|
|
|
81
|
-
|
|
213
|
+
Explore all components interactively in Storybook.
|
|
82
214
|
|
|
83
|
-
|
|
84
|
-
npm run storybook
|
|
215
|
+
### View Online
|
|
85
216
|
|
|
86
|
-
|
|
87
|
-
```
|
|
217
|
+
🎭 **[View Storybook](https://kubit-ui.com/storybook)** - Browse all components online
|
|
88
218
|
|
|
89
|
-
|
|
219
|
+
### Run Locally
|
|
220
|
+
|
|
221
|
+
To run Storybook locally:
|
|
222
|
+
|
|
223
|
+
1. Clone the repository:
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
git clone https://github.com/kubit-ui/kubit-react-components.git
|
|
227
|
+
cd kubit-react-components
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
2. Install dependencies:
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
npm install
|
|
234
|
+
# or
|
|
235
|
+
yarn install
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
3. Start Storybook:
|
|
239
|
+
```bash
|
|
240
|
+
npm run storybook
|
|
241
|
+
# or
|
|
242
|
+
yarn storybook
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
This will start the Storybook server at `http://localhost:6006` where you can see all components in action.
|
|
90
246
|
|
|
91
247
|
## Tests
|
|
92
248
|
|
|
93
|
-
|
|
249
|
+
Run the test suite to ensure everything works correctly:
|
|
94
250
|
|
|
95
251
|
```bash
|
|
252
|
+
# Run all tests
|
|
96
253
|
npm run test
|
|
97
|
-
|
|
254
|
+
# or
|
|
98
255
|
yarn test
|
|
256
|
+
|
|
257
|
+
# Watch mode (for development)
|
|
258
|
+
npm run test:watch
|
|
259
|
+
# or
|
|
260
|
+
yarn test:watch
|
|
261
|
+
|
|
262
|
+
# Coverage report
|
|
263
|
+
npm run test:coverage
|
|
264
|
+
# or
|
|
265
|
+
yarn test:coverage
|
|
99
266
|
```
|
|
100
267
|
|
|
101
|
-
|
|
268
|
+
**Test Stack:**
|
|
269
|
+
|
|
270
|
+
- ✅ Vitest - Fast unit testing
|
|
271
|
+
- 🧪 Testing Library - Component testing
|
|
272
|
+
- ♿ vitest-axe - Accessibility testing
|
|
102
273
|
|
|
103
274
|
## Contributing
|
|
104
275
|
|
|
105
|
-
We
|
|
276
|
+
We welcome contributions from the community! Here's how you can help:
|
|
277
|
+
|
|
278
|
+
### Ways to Contribute
|
|
106
279
|
|
|
107
|
-
|
|
280
|
+
- 🐛 Report bugs
|
|
281
|
+
- 💡 Suggest new features
|
|
282
|
+
- 📝 Improve documentation
|
|
283
|
+
- 🔧 Submit pull requests
|
|
284
|
+
- ⭐ Star the repository
|
|
108
285
|
|
|
109
|
-
|
|
286
|
+
### Contribution Steps
|
|
110
287
|
|
|
111
|
-
|
|
112
|
-
|
|
288
|
+
1. **Fork the Repository**: Click the "Fork" button in the upper right corner of the [repository's page](https://github.com/kubit-ui/kubit-react-components) on GitHub.
|
|
289
|
+
|
|
290
|
+
2. **Clone the Repository**: Clone your fork to your local machine.
|
|
291
|
+
|
|
292
|
+
```bash
|
|
293
|
+
git clone https://github.com/YOUR_USERNAME/kubit-react-components.git
|
|
294
|
+
cd kubit-react-components
|
|
113
295
|
```
|
|
114
296
|
|
|
115
|
-
3. **Create a Branch**:
|
|
297
|
+
3. **Create a Branch**: Create a new branch for your changes.
|
|
116
298
|
|
|
117
|
-
```
|
|
118
|
-
git checkout -b
|
|
299
|
+
```bash
|
|
300
|
+
git checkout -b feature/your-feature-name
|
|
119
301
|
```
|
|
120
302
|
|
|
121
|
-
4. **
|
|
303
|
+
4. **Install Dependencies**:
|
|
304
|
+
|
|
305
|
+
```bash
|
|
306
|
+
yarn install
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
5. **Make Changes**: Make your changes and test them thoroughly.
|
|
310
|
+
|
|
311
|
+
```bash
|
|
312
|
+
yarn test
|
|
313
|
+
yarn lint
|
|
314
|
+
yarn typecheck
|
|
315
|
+
```
|
|
122
316
|
|
|
123
|
-
|
|
317
|
+
6. **Commit Changes**: Use conventional commits for your messages.
|
|
124
318
|
|
|
125
|
-
```
|
|
126
|
-
git commit -m "
|
|
319
|
+
```bash
|
|
320
|
+
git commit -m "feat: add new component feature"
|
|
127
321
|
```
|
|
128
322
|
|
|
129
|
-
|
|
323
|
+
**Commit Types:**
|
|
324
|
+
- `feat:` - New feature
|
|
325
|
+
- `fix:` - Bug fix
|
|
326
|
+
- `docs:` - Documentation changes
|
|
327
|
+
- `style:` - Code style changes (formatting)
|
|
328
|
+
- `refactor:` - Code refactoring
|
|
329
|
+
- `test:` - Adding or updating tests
|
|
330
|
+
- `chore:` - Maintenance tasks
|
|
130
331
|
|
|
131
|
-
|
|
132
|
-
|
|
332
|
+
7. **Push Changes**: Push your changes to your fork.
|
|
333
|
+
|
|
334
|
+
```bash
|
|
335
|
+
git push origin feature/your-feature-name
|
|
133
336
|
```
|
|
134
337
|
|
|
135
|
-
|
|
338
|
+
8. **Open a Pull Request**: Go to the original repository and click "New pull request". Fill out the PR template with details about your changes.
|
|
339
|
+
|
|
340
|
+
### Development Commands
|
|
136
341
|
|
|
137
|
-
|
|
342
|
+
```bash
|
|
343
|
+
# Start development server
|
|
344
|
+
yarn dev
|
|
138
345
|
|
|
139
|
-
|
|
346
|
+
# Run Storybook
|
|
347
|
+
yarn storybook
|
|
348
|
+
|
|
349
|
+
# Build library
|
|
350
|
+
yarn dist
|
|
351
|
+
|
|
352
|
+
# Run tests
|
|
353
|
+
yarn test
|
|
354
|
+
|
|
355
|
+
# Lint code
|
|
356
|
+
yarn lint
|
|
357
|
+
|
|
358
|
+
# Type check
|
|
359
|
+
yarn typecheck
|
|
360
|
+
|
|
361
|
+
# Check package size
|
|
362
|
+
yarn pack:size
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
For more detailed information, please refer to the [CONTRIBUTING.md](./CONTRIBUTING.md) file.
|
|
366
|
+
|
|
367
|
+
## Community & Support
|
|
368
|
+
|
|
369
|
+
- 💬 [GitHub Discussions](https://github.com/kubit-ui/kubit-react-components/discussions) - Ask questions and share ideas
|
|
370
|
+
- 🐛 [Issue Tracker](https://github.com/kubit-ui/kubit-react-components/issues) - Report bugs and request features
|
|
371
|
+
- 📧 [Email](mailto:kubit@opendigitalservices.com) - Contact the team
|
|
372
|
+
- 🐦 [Twitter](https://twitter.com/kubit_ui) - Follow for updates
|
|
373
|
+
|
|
374
|
+
## Related Projects
|
|
375
|
+
|
|
376
|
+
- [Kubit Design System](https://kubit-ui.com) - Complete design system documentation
|
|
377
|
+
- [Kubit Figma Kit](https://figma.com/@kubit) - Design files and components
|
|
378
|
+
|
|
379
|
+
## Changelog
|
|
380
|
+
|
|
381
|
+
See [CHANGELOG.md](./CHANGELOG.md) for a list of changes and migration guides.
|
|
382
|
+
|
|
383
|
+
## Migration Guides
|
|
384
|
+
|
|
385
|
+
- [v1.x to v2.0.0](./MIGRATION_GUIDE.md) - Complete migration guide for major version
|
|
386
|
+
|
|
387
|
+
## License
|
|
388
|
+
|
|
389
|
+
This project is licensed under the **Apache License 2.0** - see the [LICENSE.md](./LICENSE.md) file for details.
|
|
390
|
+
|
|
391
|
+
```
|
|
392
|
+
Copyright 2025 Kubit
|
|
393
|
+
|
|
394
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
395
|
+
you may not use this file except in compliance with the License.
|
|
396
|
+
You may obtain a copy of the License at
|
|
397
|
+
|
|
398
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
---
|
|
402
|
+
|
|
403
|
+
<div align="center">
|
|
404
|
+
|
|
405
|
+
**Made with ❤️ by the Kubit Team**
|
|
406
|
+
|
|
407
|
+
[](https://github.com/kubit-ui/kubit-react-components)
|
|
408
|
+
[](https://www.npmjs.com/package/@kubit-ui-web/react-components)
|
|
409
|
+
[](https://kubit-ui.com)
|
|
410
|
+
|
|
411
|
+
If you find this project useful, please consider giving it a ⭐️!
|
|
412
|
+
|
|
413
|
+
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../_virtual/jsx-runtime.js"),e=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../_virtual/jsx-runtime.js"),e=require("react"),n=require("../../lib/components/customComponent/customComponent.js"),o=require("../../lib/utils/pickCustomAttributes/pickCustomAttributes.js"),s=require("./types/state.js"),r=e.forwardRef(({children:r,component:i="div",cssClasses:a,dataTestId:c="accordion",expanded:d,header:u,headerComponent:m="h3",onHeaderClick:p},l)=>{const x=`${`accordion-${e.useId().replace(/:/g,"")}`}-content`,j={"data-state":d?s.STATE.EXPANDED:s.STATE.COLLAPSED},C=o.pickCustomAttributes(j);return t.jsxRuntimeExports.jsx(n.CustomComponent,{ref:l,className:a?.accordion,component:i,"data-testid":c,...C,children:t.jsxRuntimeExports.jsxs("div",{children:[t.jsxRuntimeExports.jsx(n.CustomComponent,{className:a?.header,component:m,...C,children:t.jsxRuntimeExports.jsx("button",{"aria-controls":x,"aria-expanded":d,className:a?.headerbutton,"data-testid":`${c}-header`,type:"button",onClick:p,...C,children:u})}),t.jsxRuntimeExports.jsx("div",{className:a?.content,"data-kbt-accordion-content":!0,"data-testid":`${c}-content`,id:x,...C,children:t.jsxRuntimeExports.jsx("div",{className:a?.innercontent,"data-kbt-accordion-content-inner":!0,...C,children:r})})]})})});exports.AccordionStandAlone=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../../../_virtual/jsx-runtime.js"),e=require("../../dot/dot.js"),t=require("../../text/text.js"),r=require("../../../lib/components/elementOrIcon/elementOrIcon.js"),o=require("../../../lib/utils/process/processIcon/processIcon.js"),i=require("../../../lib/utils/process/processText/processText.js");exports.DrawContent=({contentType:n,cssClasses:c,customAttributes:x,dot:u,icon:l,initials:p,maxLengthInitials:a})=>s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[!!u?.number&&s.jsxRuntimeExports.jsx("span",{className:c?.dot,children:s.jsxRuntimeExports.jsx(e.Dot,{...u})}),"with-icon"===n&&s.jsxRuntimeExports.jsx(r.ElementOrIcon,{className:c?.icon,customAttributes:x,...o.processIcon(l)}),"with-initials"===n&&s.jsxRuntimeExports.jsx(t.Text,{additionalClasses:{},"aria-hidden":!0,component:"span",customAttributes:x,...i.processText(p,a)})]});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../_virtual/jsx-runtime.js"),s=require("react"),t=require("../dot/dot.js"),r=require("../
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../_virtual/jsx-runtime.js"),s=require("react"),t=require("../dot/dot.js"),r=require("../text/text.js"),i=require("../../lib/components/elementOrIcon/elementOrIcon.js"),o=require("../../lib/utils/pickCustomAttributes/pickCustomAttributes.js"),n=require("../../lib/utils/process/processIcon/processIcon.js"),a=require("../../lib/utils/process/processText/processText.js"),c=s.forwardRef(({active:c,ariaLiveText:l,cssSizeClasses:u,cssVariantClasses:x,dot:d,hasDot:p,icon:m,label:j,labelIcon:b,onBadgeBlur:R,onClick:E,role:C,...I},g)=>{const h=s.useRef(null),A=s.useRef(null),k={"data-active":!!c},q=o.pickCustomAttributes({...I,customAttributes:k}),v=o.pickCustomAttributes(k),f=q["data-testid"]||"badge";s.useImperativeHandle(g,()=>A.current,[]);const N=s.useCallback(e=>{R?.(e)},[R]),$=s.useCallback(e=>{E?.(e)},[E]);return e.jsxRuntimeExports.jsx("div",{ref:A,className:`${x?.badge} ${u?.badge}`,"data-testid":`${f}-container`,...v,children:e.jsxRuntimeExports.jsxs("button",{ref:h,className:x?.button,"data-testid":f,role:C,type:"button",onBlur:N,onClick:$,...q,children:[e.jsxRuntimeExports.jsxs("span",{className:x?.dotcontainer,children:[!!d&&!!p&&e.jsxRuntimeExports.jsx("span",{"aria-hidden":!0,className:x?.dot,children:e.jsxRuntimeExports.jsx(t.Dot,{...d})}),e.jsxRuntimeExports.jsx(i.ElementOrIcon,{className:`${x?.icon} ${u?.icon}`,...n.processIcon(m),customAttributes:k})]}),!!j&&e.jsxRuntimeExports.jsxs("span",{"aria-hidden":!0,className:x?.labelcontainer,children:[e.jsxRuntimeExports.jsx(r.Text,{additionalClasses:{text:`${u?.label} ${x?.label}`},component:"span",...a.processText(j),customAttributes:k}),e.jsxRuntimeExports.jsx(i.ElementOrIcon,{className:x?.labelicon,rotate:c?"180deg":"0deg",transitionDuration:"0.2s",...n.processIcon(b),customAttributes:k})]}),e.jsxRuntimeExports.jsx("screen-reader-only",{"aria-live":"polite",children:l})]})})});exports.BadgeStandAlone=c;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../../_virtual/jsx-runtime.js"),t=require("../../../
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../../_virtual/jsx-runtime.js"),t=require("../../../link/link.js"),s=require("../../../text/text.js"),i=require("../../../../lib/components/elementOrIcon/elementOrIcon.js"),r=require("../../../../lib/hooks/useManageState/useManageState.js"),a=require("../../../../lib/types/states/states.js"),n=require("../../../../lib/utils/pickCustomAttributes/pickCustomAttributes.js");exports.CrumbStandAlone=({crumb:l,cssClasses:o,dividerIcon:u,lastCrumb:c,lastOneCrumbComponent:d="span",link:m,...x})=>{const{setRef:j}=r.useManageState({active:c,states:Object.values(a.STATES)}),b=n.pickCustomAttributes(x);return e.jsxRuntimeExports.jsxs("li",{ref:j,"aria-current":c?"page":void 0,className:o?.crumb,"data-testid":x["data-testid"],children:[!!c&&e.jsxRuntimeExports.jsx(s.Text,{additionalClasses:{text:o?.lastonecrumb},component:d,"data-testid":"last-breadcrumb",id:l.id,children:l.name}),!c&&e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[!!m&&e.jsxRuntimeExports.jsx("div",{className:o?.linkcontainer,children:e.jsxRuntimeExports.jsx(t.Link,{...b,action:"navigation",additionalTextClasses:{text:o?.link},"aria-label":l.ariaLabel,"data-testid":"breadcrumb-link",disabled:c,id:l.id,url:l.url,...m,onClick:e=>l.onClick?.(l.url,e),children:l.name})}),e.jsxRuntimeExports.jsx("div",{className:o?.icondividercontainer,children:e.jsxRuntimeExports.jsx(i.ElementOrIcon,{className:o?.icondivider,...u})})]})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../../_virtual/jsx-runtime.js"),e=require("react"),t=require("../../lib/components/elementOrIcon/elementOrIcon.js"),i=require("../../lib/types/positions/positions.js"),o=require("../../lib/utils/classNames/classNames.js"),r=require("../../lib/utils/pickCustomAttributes/pickCustomAttributes.js"),n=require("../../lib/utils/process/processIcon/processIcon.js"),l=e.forwardRef(({alignText:l,children:a,cssSizeClasses:c,cssVariantClasses:u,disabled:d,form:m,fullWidth:p,icon:x,iconPosition:b,id:j,loader:I,loading:f,minWidth:N,onClick:h,role:y,tabIndex:C,title:g,type:q,...E},A)=>{const O=e.useMemo(()=>c?.dynamic_values({$alignText:l||"left"}).object,[l]),R={"data-content":e.Children.toArray(a)[0],"data-full-width":p,"data-loading":f,"data-position":b||i.POSITIONS.LEFT},S=r.pickCustomAttributes({...E,customAttributes:R});return s.jsxRuntimeExports.jsxs("button",{ref:A,className:o.classNames(c?.button,u?.button),"data-testid":"button",disabled:d,form:m,id:j,role:y,style:O,tabIndex:C,title:g,type:q,onClick:h,...S,...R,children:[!!I&&!!f&&s.jsxRuntimeExports.jsx("span",{className:o.classNames(c?.loader,u?.loader),children:I}),!f&&s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsx(t.ElementOrIcon,{...n.processIcon(x),className:o.classNames(c?.icon,u?.icon)}),a]})]})});exports.ButtonStandAlone=l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../_virtual/jsx-runtime.js"),t=require("react"),s=require("../../../lib/components/customComponent/customComponent.js"),a=require("../../../lib/hooks/useRoveFocus/useRoveFocus.js"),r=require("../../../lib/provider/utilsProvider/utilsProvider.js"),n=require("../../../lib/types/states/states.js"),i=require("../../../lib/utils/pickCustomAttributes/pickCustomAttributes.js"),o=require("../constants/constants.js"),l=require("../utils/getAllDaysInMonth.js"),u=require("../utils/getFirstDayOfMonth.js"),d=require("../utils/getState.js"),y=require("../utils/groupDaysByWeeks.js"),c=require("../utils/handleKeysmoves.js"),D="ddMMyyyy";exports.List=({cssClasses:m,currentDate:g,disabledDates:h=[],hasRange:p,maxDate:E,minDate:S,onDayClick:v,selectedDate:f,setSelectedDate:b,sundayFirst:M,...x})=>{const{dateHelpers:j,formatDate:A,transformDate:k}=r.useUtilsProvider(),K=g.getMonth()+1,q=g.getFullYear(),R=A(new Date,D),w=l.getAllDaysInMonth(K,q),C=u.getFirstDayOfMonth(q,K-1)-(M?0:1),F=[...new Array(C>=0?C:6),...w],T=F.filter(e=>void 0===e),[W,$]=t.useState(0),[P,Y]=t.useState(0),_=x["data-testid"]||"calendar",L={currentDate:g,dayList:F,daysAndEmptyDaysUntilMaxDate:c.getDaysAndEmptyDaysUntilMaxDate(T,E,g),firstEmptyAndDisabledDays:c.getFirstEmptyAndDisabledDays(T,S,g),maxDate:E,minDate:S},U=t.useMemo(()=>({calendarBlankDaysSize:T.length,currentFocusSelected:(f[0]?f[0].getDate():(new Date).getDate())+T.length-1,keyDownMove:c.handleKeyDownMove(L),keyLeftMove:c.handleKeyLeftMove(L),keyPageDownMove:c.handleKeyPageDownMove(L),keyPageUpMove:c.handleKeyPageUpMove(L),keyRightMove:c.handleKeyRightMove(L),keyTabMove:c.handleKeyTabMove,keyUpMove:c.handleKeyUpMove(L),size:F.length}),[T.length,F.length,g,S,E]),[I,B,N]=a.useRoveFocus(U),O=e=>(e&&(I<T.length&&B(T.length),I>F.length&&B(F.length-1)),I===e),z=e=>{if(P){if(P<f[0])return e>P&&e<f[0];if(P>f[0])return e<P&&e>f[0]}else{if(e>f[0])return e<f[1];if(e<f[0])return e>f[1]}return!1},G=e=>{if(!p)return!1;const t=f?.findIndex(t=>t&&e&&A(t,D)===A(e,D));return 0===t&&P?P<e:0===t?e>f[1]:1===t&&e>f[0]},H=e=>{if(!p)return!1;const t=f?.findIndex(t=>t&&e&&A(t,D)===A(e,D));return 0===t&&P?P>e:0===t?e<f[1]:1===t&&e<f[0]};return e.jsxRuntimeExports.jsx("tbody",{ref:N,className:m?.tbody,"data-testid":"tbody-days-list",children:y.groupDaysByWeeks(F).map((t,a)=>e.jsxRuntimeExports.jsx("tr",{className:m?.tablerow,children:t.map((t,r)=>{const l=t||0;let u=!t||j.isBefore(t,S)||j.isAfter(t,k(A(E,D),D));u||(u=h.some(e=>t&&j.isDatesEqual(t,e,!1)));const y=d.getStateDay({dayFormatted:l,formatDate:A,hasRange:p,isGhostSelected:z,isSelectedToLeft:G,isSelectedToRight:H,selectedDate:f,today:R}),c={"data-state":u?n.STATES.DISABLED:y};return t?e.jsxRuntimeExports.jsx("td",{"aria-selected":y===n.STATES.SELECTED||void 0,className:m?.listelementrove,style:{width:`calc(100% / ${o.WEEK_DAYS})`},...i.pickCustomAttributes(c),children:e.jsxRuntimeExports.jsx(s.CustomComponent,{"aria-label":A(t,{day:"numeric",month:"long",weekday:"long",year:"numeric"}),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../_virtual/jsx-runtime.js"),t=require("react"),s=require("../../../lib/components/customComponent/customComponent.js"),a=require("../../../lib/hooks/useRoveFocus/useRoveFocus.js"),r=require("../../../lib/provider/utilsProvider/utilsProvider.js"),n=require("../../../lib/types/states/states.js"),i=require("../../../lib/utils/pickCustomAttributes/pickCustomAttributes.js"),o=require("../constants/constants.js"),l=require("../utils/getAllDaysInMonth.js"),u=require("../utils/getFirstDayOfMonth.js"),d=require("../utils/getState.js"),y=require("../utils/groupDaysByWeeks.js"),c=require("../utils/handleKeysmoves.js"),D="ddMMyyyy";exports.List=({cssClasses:m,currentDate:g,disabledDates:h=[],hasRange:p,maxDate:E,minDate:S,onDayClick:v,selectedDate:f,setSelectedDate:b,sundayFirst:M,...x})=>{const{dateHelpers:j,formatDate:A,transformDate:k}=r.useUtilsProvider(),K=g.getMonth()+1,q=g.getFullYear(),R=A(new Date,D),w=l.getAllDaysInMonth(K,q),C=u.getFirstDayOfMonth(q,K-1)-(M?0:1),F=[...new Array(C>=0?C:6),...w],T=F.filter(e=>void 0===e),[W,$]=t.useState(0),[P,Y]=t.useState(0),_=x["data-testid"]||"calendar",L={currentDate:g,dayList:F,daysAndEmptyDaysUntilMaxDate:c.getDaysAndEmptyDaysUntilMaxDate(T,E,g),firstEmptyAndDisabledDays:c.getFirstEmptyAndDisabledDays(T,S,g),maxDate:E,minDate:S},U=t.useMemo(()=>({calendarBlankDaysSize:T.length,currentFocusSelected:(f[0]?f[0].getDate():(new Date).getDate())+T.length-1,keyDownMove:c.handleKeyDownMove(L),keyLeftMove:c.handleKeyLeftMove(L),keyPageDownMove:c.handleKeyPageDownMove(L),keyPageUpMove:c.handleKeyPageUpMove(L),keyRightMove:c.handleKeyRightMove(L),keyTabMove:c.handleKeyTabMove,keyUpMove:c.handleKeyUpMove(L),size:F.length}),[T.length,F.length,g,S,E]),[I,B,N]=a.useRoveFocus(U),O=e=>(e&&(I<T.length&&B(T.length),I>F.length&&B(F.length-1)),I===e),z=e=>{if(P){if(P<f[0])return e>P&&e<f[0];if(P>f[0])return e<P&&e>f[0]}else{if(e>f[0])return e<f[1];if(e<f[0])return e>f[1]}return!1},G=e=>{if(!p)return!1;const t=f?.findIndex(t=>t&&e&&A(t,D)===A(e,D));return 0===t&&P?P<e:0===t?e>f[1]:1===t&&e>f[0]},H=e=>{if(!p)return!1;const t=f?.findIndex(t=>t&&e&&A(t,D)===A(e,D));return 0===t&&P?P>e:0===t?e<f[1]:1===t&&e<f[0]};return e.jsxRuntimeExports.jsx("tbody",{ref:N,className:m?.tbody,"data-testid":"tbody-days-list",children:y.groupDaysByWeeks(F).map((t,a)=>e.jsxRuntimeExports.jsx("tr",{className:m?.tablerow,children:t.map((t,r)=>{const l=t||0;let u=!t||j.isBefore(t,S)||j.isAfter(t,k(A(E,D),D));u||(u=h.some(e=>t&&j.isDatesEqual(t,e,!1)));const y=d.getStateDay({dayFormatted:l,formatDate:A,hasRange:p,isGhostSelected:z,isSelectedToLeft:G,isSelectedToRight:H,selectedDate:f,today:R}),c={"data-state":u?n.STATES.DISABLED:y};return t?e.jsxRuntimeExports.jsx("td",{"aria-selected":y===n.STATES.SELECTED||void 0,className:m?.listelementrove,style:{width:`calc(100% / ${o.WEEK_DAYS})`},...i.pickCustomAttributes(c),children:e.jsxRuntimeExports.jsx(s.CustomComponent,{"aria-disabled":u,"aria-label":A(t,{day:"numeric",month:"long",weekday:"long",year:"numeric"}),className:m?.dayslist,component:"button","data-testid":`${_}-${r+o.WEEK_DAYS*a}`,focus:O(r+o.WEEK_DAYS*a),index:r+o.WEEK_DAYS*a,type:"button",onMouseOver:()=>{1===W&&Y(l)},onSelectItem:()=>{u||(e=>{const[t,s]=f;p?t&&s||!t&&!s?(b([e,0]),$(1),e instanceof Date&&v?.(e.getDate().toString())):(b([t,e]),$(0),e instanceof Date&&v?.(e.getDate().toString())):(b([e]),e instanceof Date&&v?.(e.getDate().toString()))})(l)},...i.pickCustomAttributes(c),children:t.getDate()})},`day${r+o.WEEK_DAYS*a}${l}`):e.jsxRuntimeExports.jsx("td",{"aria-hidden":!0,"aria-label":"empty day",className:m?.listelementempty,style:{width:`calc(100% / ${o.WEEK_DAYS})`}},`day${r+o.WEEK_DAYS*a}${l}`)})},`table-row-${a.toString()}`))})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../../_virtual/jsx-runtime.js"),t=require("react"),s=require("../../../text/text.js"),o=require("../../../../lib/components/customComponent/customComponent.js"),r=require("../../../../lib/hooks/useRoveFocus/useRoveFocus.js"),n=require("../../../../lib/provider/utilsProvider/utilsProvider.js"),i=require("../../../../lib/types/states/states.js"),l=require("../../../../lib/utils/pickCustomAttributes/pickCustomAttributes.js"),a=require("../../utils/setMonth.js"),u=require("./utils/monthSelector.utils.js");exports.MonthSelector=({configAccesibility:c,cssClasses:m,currentDate:h,maxDate:p,minDate:d,onMonthClick:M,setCurrentDate:S,today:g,...b})=>{const{dateHelpers:x,transformDate:v}=n.useUtilsProvider(),A=b["data-testid"]||"calendar",
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../../_virtual/jsx-runtime.js"),t=require("react"),s=require("../../../text/text.js"),o=require("../../../../lib/components/customComponent/customComponent.js"),r=require("../../../../lib/hooks/useRoveFocus/useRoveFocus.js"),n=require("../../../../lib/provider/utilsProvider/utilsProvider.js"),i=require("../../../../lib/types/states/states.js"),l=require("../../../../lib/utils/pickCustomAttributes/pickCustomAttributes.js"),a=require("../../utils/setMonth.js"),u=require("./utils/monthSelector.utils.js");exports.MonthSelector=({configAccesibility:c,cssClasses:m,currentDate:h,maxDate:p,minDate:d,onMonthClick:M,setCurrentDate:S,today:g,...b})=>{const{dateHelpers:x,transformDate:v}=n.useUtilsProvider(),A=b["data-testid"]||"calendar",E={currentDate:h,maxDate:p,minDate:d},T=t.useMemo(()=>({currentFocusSelected:h?h.getMonth():(new Date).getMonth(),keyDownMove:u.keyDownMove(E),keyLeftMove:u.keyLeftMove(E),keyRightMove:u.keyRightMove(E),keyTabMove:u.keyTabMove,keyUpMove:u.keyUpMove(E),size:x.getAllMonthName("long").length}),[x.getAllMonthName("long").length,h]),[j,,D]=r.useRoveFocus(T),y=e=>{const t=h?.getFullYear();return d?.getFullYear()===t&&d?.getMonth()>e||p?.getFullYear()===t&&p?.getMonth()<e};return e.jsxRuntimeExports.jsx("ul",{ref:D,"aria-label":c?.monthSelectorAriaLabel,className:m?.monthslist,"data-testid":"tbody-months-list",children:x.getAllMonthName("long",b.locale).map((t,r)=>{const n=((e,t,s)=>{let o;return o=e.getMonth()===t?i.STATES.SELECTED:t===g.getMonth()?i.STATES.CURRENT:s?i.STATES.DISABLED:i.STATES.DEFAULT,o})(h,r,y(r)),u={"data-state":y(r)?i.STATES.DISABLED:n};return e.jsxRuntimeExports.jsx("li",{"aria-selected":n===i.STATES.SELECTED||void 0,className:m?.monthlistitem,...l.pickCustomAttributes(u),children:e.jsxRuntimeExports.jsx(o.CustomComponent,{"aria-disabled":y(r),"aria-label":t.charAt(0).toUpperCase()+t.slice(1),className:m?.monthelement,component:"button",focus:j===r,index:r,type:"button",...l.pickCustomAttributes(u),onSelectItem:()=>{const e=new Date(h);S(v(a.setMonth(e,r))),M?.(t)},children:e.jsxRuntimeExports.jsx(s.Text,{component:"span","data-testid":A,children:t.charAt(0).toUpperCase()+t.slice(1)})})},t)})})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../_virtual/jsx-runtime.js"),t=require("../../button/button.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../_virtual/jsx-runtime.js"),t=require("../../button/button.js"),o=require("../../text/text.js"),r=require("../../../lib/components/elementOrIcon/elementOrIcon.js"),n=require("../../../lib/provider/utilsProvider/utilsProvider.js");exports.Selector=({configAccesibility:s,configCalendar:a,cssClasses:i,currentDate:l,customBackText:c,maxDate:u,minDate:d,onDaySelectorClick:x,onLeftIconClick:m,onMonthSelectorClick:h,onRightIconClick:b,onYearSelectorClick:S,setCurrentDate:j,setShowDaySelector:p,setShowMonthSelector:y,setShowYearSelector:g,showDaySelector:v,showMonthSelector:C,showYearSelector:w,useDaySelector:k=!1})=>{const{dateHelpers:R,formatDate:D}=n.useUtilsProvider(),{leftArrowIcon:E,rightArrowIcon:A,sizeSelectorButton:f,variantSelectorButton:I}=a,M=e=>{j(e)},Y=k,q=(C||w)&&!Y,N=e=>!q&&e.getMonth()===l.getMonth()&&e.getFullYear()===l.getFullYear(),O=(r,n,s,a)=>{const c=()=>{switch(r){case"day":return l.getDate();case"month":return(e=D(l,{month:"long"})).charAt(0).toUpperCase()+e.slice(1);case"year":return l.getFullYear();default:return null}var e};return e.jsxRuntimeExports.jsx(t.Button,{additionalSizeClasses:f?void 0:i?.button_size,additionalVariantClasses:I?void 0:i?.button_variant,"aria-label":s,disabled:n,role:a,size:f,variant:I,onClick:e=>{p("day"===r),y("month"===r),g("year"===r),"day"===r?x?.(c()?.toString(),e):"month"===r?h?.(c()?.toString(),e):S?.(c()?.toString(),e)},children:e.jsxRuntimeExports.jsx(o.Text,{component:"span",children:c()})})},z={"data-state":N(d)};return e.jsxRuntimeExports.jsxs("div",{className:i?.selectorcontainer,style:{justifyContent:Y?"center":"space-between"},children:[e.jsxRuntimeExports.jsxs("button",{"aria-label":q?"":E["aria-label"],className:i?.selectoriconandbacktextcontainer,"data-testid":"previous-button",type:"button",onClick:e=>{(()=>{const e=new Date(l);q?g(!1):M(R.getSubMonths(e,1)),y(!1),p(!0)})(),E.onClick?.(e),m?.(e)},children:[e.jsxRuntimeExports.jsx(r.ElementOrIcon,{className:i?.leftarrow,customAttributes:z,disabled:N(d),...E,"aria-label":void 0}),q&&e.jsxRuntimeExports.jsx(o.Text,{additionalClasses:{text:i?.backtext},component:"span",children:c})]}),e.jsxRuntimeExports.jsxs("div",{className:i?.selectoroptionscontainer,children:[Y&&O("day",v,s?.daySelectorAriaLabel,s?.daySelectorRole),O("month",C,s?.monthSelectorAriaLabel,s?.monthSelectorRole),O("year",w,s?.yearSelectorAriaLabel,s?.yearSelectorRole)]}),e.jsxRuntimeExports.jsx("span",{style:{visibility:q?"hidden":"visible"},children:e.jsxRuntimeExports.jsx(r.ElementOrIcon,{className:i?.rightarrow,customAttributes:z,"data-testid":"next-button",disabled:N(u),onClick:e=>{(()=>{const e=new Date(l);M(R.getAddMonths(e,1))})(),A.onClick?.(e),b?.(e)},...A})})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),n=require("../../../lib/utils/resizeObserver/resizeObserver.js"),t=require("./useCarouselKeyNavigation.js"),r=require("./useCarouselSwipe.js"),a=require("./utils/calc.utils.js"),i=require("./utils/constants.js"),u=require("./utils/dom.utils.js");exports.useCarousel=({
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),n=require("../../../lib/utils/resizeObserver/resizeObserver.js"),t=require("./useCarouselKeyNavigation.js"),r=require("./useCarouselSwipe.js"),a=require("./utils/calc.utils.js"),i=require("./utils/constants.js"),u=require("./utils/dom.utils.js");exports.useCarousel=({allowModifySliceWidth:s=!1,autoFitContainer:l=!1,centerExtremesWhenExtraPadding:c=!1,centerMode:o=!1,circular:d=!0,contentContainerRef:g,defaultPage:P=0,disabled:f=!1,elements:m,extraPadding:C=0,numElementsPerPage:w,numElementsToSlide:h,onePageAlign:E="center",onNumElementsPerPageChange:I,onNumPagesChange:x,onPageChange:R,rootContainerRef:b,viewerContainerRef:v})=>{const N=e.useRef(!0),S=e.useRef(P),p=e.useRef(P),y=e.useRef(w),L=e.useRef(0),V=e.useCallback(e=>{const n=g.current;if(!n||!y.current||e.propertyName!==i.default.PROPERTY_TO_HANDLE_TRANSITION_END||L.current<1)return;n.setAttribute("data-shifting","false");const{newPage:t}=u.default.udpateCarouselPositionOnEdge({contentContainer:n,currentPage:p.current,elementsLength:m.length,extraPadding:C,numElementsPerPage:y.current,numPages:L.current});p.current=t,S.current!==p.current&&(S.current=p.current,R?.(p.current));const{firstIndexInView:r,lastIndexInView:s}=a.default.calcFirstAndLastIndexInCarouselView({currentPage:p.current,elementsLength:m.length,isCircular:d,numElementsPerPage:y.current,numElementsToSlide:h});u.default.updateContentElementsAriaVisibility({contentContainer:n,firstIndexInView:r,lastIndexInView:s}),o&&u.default.applyCenterMode({contentContainer:n,firstIndexInView:r,lastIndexInView:s,numElementsPerPage:y.current}),N.current=!0},[m,C,h,d,o,R]),T=e.useCallback(({animated:e=!0,newPage:n})=>{const t=v.current,r=g.current;if(!t||!r||!N.current||!y.current||!m.length||L.current<1||(d?n<-1:n<0)||(d?n>L.current:n>L.current-1))return;e&&r.setAttribute("data-shifting","true"),u.default.deleteCenterMode({contentContainer:r}),p.current=n;const{firstIndexInView:l,lastIndexInView:o}=a.default.calcFirstAndLastIndexInCarouselView({currentPage:p.current,elementsLength:m.length,isCircular:d,numElementsPerPage:y.current,numElementsToSlide:h});s||u.default.updateViewerWidth({contentContainer:r,extraPadding:C,firstIndexInView:l,lastIndexInView:o,viewerContainer:t});const P=r.style.left,f=a.default.calcContentContainerLeftPosition({centerExtremesWhenExtraPadding:c,circular:d,contentContainer:r,currentPage:p.current,extraPadding:C,firstIndexInView:l,numPages:L.current});r.style.left=f,e&&P!==f?N.current=!1:V({propertyName:i.default.PROPERTY_TO_HANDLE_TRANSITION_END})},[m,h,d,s,C,c,V]),O=e.useCallback(()=>{const e=v.current,n=g.current;e&&n&&y.current&&(s&&(e.style.width="100%",u.default.updateSlicesWidth({centerMode:o,contentContainer:n,extraPadding:C,numElementsPerPage:y.current,viewerContainer:e})),u.default.manageCircularClones({circular:d,contentContainer:n,elementsLength:m.length,numElementsPerPage:y.current}),T({animated:!1,newPage:p.current}))},[s,o,d,m,C,T]),A=e.useCallback(()=>{const e=b.current,n=v.current,t=g.current;if(!e||!n||!t)return;e.style.width="100%";const r=w||a.default.calcNumElementsPerPage({contentContainer:t,elementsLength:m.length,extraPadding:C,rootContainer:e,viewerContainer:n})||1;l&&(e.style.width="fit-content"),r!==y.current&&(y.current=r,I?.(r));const i=a.default.calcNumPages({elementsLength:m.length,numElementsPerPage:r,numElementsToSlide:h});L.current!==i&&(L.current=i,x?.(i),p.current=Math.min(Math.max(0,P),i-1)),i<=1&&u.default.alignOnePageCarousel({allowModifySliceWidth:s,contentContainer:t,onePageAlign:E,rootContainer:e})},[s,m,C,w,h,E,l,I,x,R]),M=e.useCallback(()=>{A(),O()},[A,O]);return e.useEffect(()=>{const e=g.current;if(!e)return;M(),window.addEventListener("resize",M);const t=new n.ResizeObserver(M);return t.observe(e),()=>{window.removeEventListener("resize",M),t.disconnect()}},[M]),e.useEffect(()=>{const e=g.current;return e?.addEventListener("transitionend",V),()=>{e?.removeEventListener("transitionend",V)}},[V]),r.useCarouselSwipe({allowShiftRef:N,centerExtremesWhenExtraPadding:c,changePage:T,circular:d,contentContainerRef:g,currentPageRef:p,disabled:f,elements:m,extraPadding:C,numElementsPerPageRef:y,numPagesRef:L,viewerContainerRef:v}),t.useCarouselKeyNavigation({allowShiftRef:N,changePage:T,circular:d,currentPageRef:p,disabled:f,numPagesRef:L,rootContainerRef:b}),{allowShiftRef:N,changePage:T,currentPageRef:p,numElementsPerPageRef:y,numPagesRef:L}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),r=require("../../../lib/utils/keyboard/keyboard.js");exports.useCarouselKeyNavigation=({
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),r=require("../../../lib/utils/keyboard/keyboard.js");exports.useCarouselKeyNavigation=({allowShiftRef:t,changePage:n,circular:u,currentPageRef:o,disabled:s=!1,numPagesRef:c,rootContainerRef:a})=>{e.useEffect(()=>{if(s)return;const e=e=>{!t.current||c.current<=1||(r.isArrowLeftPressed(e.key)?t.current&&(u||0!==o.current)&&n({newPage:o.current-1}):r.isArrowRightPressed(e.key)&&t.current&&(u||o.current!==c.current-1)&&n({newPage:o.current+1}))},i=a.current;return i?.addEventListener("keydown",e),()=>{i?.removeEventListener("keydown",e)}},[u,n,s])};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("../../../lib/hooks/useScrollBlock/useScrollBlock.js"),r=require("./utils/calc.utils.js"),n=require("./utils/constants.js");exports.useCarouselSwipe=({
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("../../../lib/hooks/useScrollBlock/useScrollBlock.js"),r=require("./utils/calc.utils.js"),n=require("./utils/constants.js");exports.useCarouselSwipe=({allowShiftRef:c,centerExtremesWhenExtraPadding:u,changePage:s,circular:l,contentContainerRef:o,currentPageRef:a,disabled:i=!1,elements:f,extraPadding:d,numElementsPerPageRef:v,numPagesRef:E,viewerContainerRef:m})=>{const h=e.useRef(!1),L=e.useRef(!1),R=e.useRef(!1),_=e.useRef(),p=e.useRef(0),D=e.useRef(0),S=e.useRef(0),g=e.useRef(0),b=e.useCallback(()=>{c.current&&(l||a.current!==E.current-1)&&s({newPage:a.current+1})},[l,s]),C=e.useCallback(()=>{c.current&&(l||0!==a.current)&&s({newPage:a.current-1})},[l,s]),{allowScroll:y,blockScroll:P}=t.useScrollBlock(),X=e.useCallback(e=>{const t=o.current;!t||E.current<=1||(_.current=parseFloat(t.style.left||"0"),"touchstart"===e.type?(p.current=e.touches[0].clientX,S.current=e.touches[0].clientX,g.current=e.touches[0].clientY):(p.current=e.clientX,S.current=e.clientX,g.current=e.clientY),h.current=!0)},[]),k=e.useCallback(e=>{const t=o.current;if(!t||!h.current||!v?.current||E.current<=1)return;let c,s;"touchmove"===e.type?(D.current=p.current-e.touches[0].clientX,p.current=e.touches[0].clientX,c=e.touches[0].clientX-S.current,s=e.touches[0].clientY-g.current):(D.current=p.current-e.clientX,p.current=e.clientX,c=e.clientX-S.current,s=e.clientY-g.current);const i=parseFloat(t.style.left||"0")-D.current;if(L.current||R.current||(Math.abs(c)>n.default.THRESHOLD_TO_DECIDE_IF_ALLOW_DRAGGING?(L.current=!0,P()):Math.abs(s)>n.default.THRESHOLD_TO_DECIDE_IF_ALLOW_DRAGGING&&(R.current=!0)),L.current)if(l&&f.length>v.current)t.style.left=`${i}px`;else{const e=r.default.calcXDistanceBetween2Elements(t.firstChild,t.children[t.children.length-v.current]);if(u)i-d<0&&-i<e-d&&(t.style.left=`${i}px`);else{let r=l?d:0;!l&&d&&a.current===E.current-1&&(r=2*d),i-r<0&&-i<e-r&&(t.style.left=`${i}px`)}}},[P,u,l,f,d]),O=e.useCallback(()=>{const e=o.current;if(R.current=!1,L.current&&y(),L.current=!1,!e||!h.current||void 0===_.current||E.current<=1)return;h.current=!1;const t=parseFloat(e.style.left||"0");t-_.current<-0?b():t-_.current>n.default.THRESHOLD_TO_DECIDE_IF_SWIPE_ON_DRAG_ENDS?C():e.style.left=`${_.current}px`},[y,b,C]);e.useEffect(()=>{if(i)return;const e=m.current,t={passive:!0};return e?.addEventListener("touchstart",X,t),e?.addEventListener("touchend",O,t),e?.addEventListener("touchmove",k,t),e?.addEventListener("mousedown",X,t),e?.addEventListener("mouseup",O,t),e?.addEventListener("mousemove",k,t),e?.addEventListener("mouseleave",O,t),()=>{e?.removeEventListener("touchstart",X,t),e?.removeEventListener("touchend",O,t),e?.removeEventListener("touchmove",k,t),e?.removeEventListener("mousedown",X,t),e?.removeEventListener("mouseup",O,t),e?.removeEventListener("mousemove",k,t),e?.removeEventListener("mouseleave",O,t)}},[X,O,k,i])};
|