@reportportal/ui-kit 0.0.1-alpha.7 → 0.0.1-alpha.70
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/LICENSE +201 -201
- package/README.md +255 -3
- package/dist/arrowUp-4a5caee7.js +6 -0
- package/dist/baseIconButton-251479f7.js +25 -0
- package/dist/baseIconButton.js +7 -0
- package/dist/bubblesLoader-a7e709d4.js +17 -0
- package/dist/bubblesLoader.js +1 -1
- package/dist/button-33bc880f.js +64 -0
- package/dist/button.js +1 -1
- package/dist/calendarArrow-3e1339ea.js +6 -0
- package/dist/checkbox-aa91985d.js +73 -0
- package/dist/checkbox.js +1 -1
- package/dist/close-4b33d7c1.js +5 -0
- package/dist/common/hooks/useOnClickOutside.d.ts +1 -0
- package/dist/common/types.d.ts +3 -0
- package/dist/components/baseIconButton/baseIconButton.d.ts +9 -0
- package/dist/components/baseIconButton/index.d.ts +5 -0
- package/dist/components/bubblesLoader/bubblesLoader.d.ts +1 -0
- package/dist/components/bubblesLoader/index.d.ts +1 -0
- package/dist/components/button/button.d.ts +4 -4
- package/dist/components/button/index.d.ts +3 -2
- package/dist/components/checkbox/checkbox.d.ts +3 -0
- package/dist/components/checkbox/index.d.ts +1 -0
- package/dist/components/datePicker/datePicker.d.ts +25 -0
- package/dist/components/datePicker/header/datePickerHeader.d.ts +16 -0
- package/dist/components/datePicker/header/index.d.ts +4 -0
- package/dist/components/datePicker/index.d.ts +5 -0
- package/dist/components/datePicker/utils.d.ts +4 -0
- package/dist/components/dropdown/constants.d.ts +5 -0
- package/dist/components/dropdown/dropdown.d.ts +13 -5
- package/dist/components/dropdown/dropdownOption/dropdownOption.d.ts +1 -0
- package/dist/components/dropdown/dropdownOption/index.d.ts +1 -0
- package/dist/components/dropdown/index.d.ts +1 -0
- package/dist/components/dropdown/types.d.ts +3 -0
- package/dist/components/dropdown/utils.d.ts +2 -1
- package/dist/components/fieldLabel/fieldLabel.d.ts +7 -0
- package/dist/components/fieldLabel/index.d.ts +1 -0
- package/dist/components/fieldNumber/constants.d.ts +1 -0
- package/dist/components/fieldNumber/fieldNumber.d.ts +3 -2
- package/dist/components/fieldNumber/index.d.ts +1 -0
- package/dist/components/fieldText/fieldText.d.ts +13 -5
- package/dist/components/fieldText/index.d.ts +1 -0
- package/dist/components/fieldText/types.d.ts +5 -0
- package/dist/components/fieldTextFlex/fieldTextFlex.d.ts +16 -0
- package/dist/components/fieldTextFlex/index.d.ts +4 -0
- package/dist/components/icons/index.d.ts +48 -0
- package/dist/components/index.d.ts +11 -1
- package/dist/components/maxValueDisplay/index.d.ts +4 -0
- package/dist/components/maxValueDisplay/maxValueDisplay.d.ts +8 -0
- package/dist/components/maxValueDisplay/utils/index.d.ts +1 -0
- package/dist/components/maxValueDisplay/utils/isPositiveInteger.d.ts +1 -0
- package/dist/components/modal/modal.d.ts +7 -2
- package/dist/components/modal/modalContent/modalContent.d.ts +2 -0
- package/dist/components/modal/modalFooter/modalFooter.d.ts +1 -0
- package/dist/components/modal/modalHeader/modalHeader.d.ts +2 -1
- package/dist/components/pagination/index.d.ts +5 -0
- package/dist/components/pagination/itemsCounter/index.d.ts +1 -0
- package/dist/components/pagination/itemsCounter/itemCounter.d.ts +10 -0
- package/dist/components/pagination/pageControls/activePage/activePage.d.ts +13 -0
- package/dist/components/pagination/pageControls/activePage/index.d.ts +1 -0
- package/dist/components/pagination/pageControls/activePage/pageSelector/index.d.ts +1 -0
- package/dist/components/pagination/pageControls/activePage/pageSelector/pageSelector.d.ts +11 -0
- package/dist/components/pagination/pageControls/index.d.ts +1 -0
- package/dist/components/pagination/pageControls/pageControls.d.ts +17 -0
- package/dist/components/pagination/pageControls/pageNavigator/bar/bar.d.ts +12 -0
- package/dist/components/pagination/pageControls/pageNavigator/bar/index.d.ts +1 -0
- package/dist/components/pagination/pageControls/pageNavigator/index.d.ts +1 -0
- package/dist/components/pagination/pageControls/pageNavigator/pageNavigator.d.ts +12 -0
- package/dist/components/pagination/pageSizeControl/index.d.ts +1 -0
- package/dist/components/pagination/pageSizeControl/pageSizeControl.d.ts +11 -0
- package/dist/components/pagination/pageSizeControl/sizeSelector/index.d.ts +1 -0
- package/dist/components/pagination/pageSizeControl/sizeSelector/sizeSelector.d.ts +9 -0
- package/dist/components/pagination/pagination.d.ts +23 -0
- package/dist/components/pagination/types.d.ts +2 -0
- package/dist/components/popover/index.d.ts +1 -0
- package/dist/components/popover/popover.d.ts +20 -0
- package/dist/components/radio/index.d.ts +5 -0
- package/dist/components/radio/radio.d.ts +17 -0
- package/dist/components/radio/radioGroup.d.ts +9 -0
- package/dist/components/spinLoader/index.d.ts +4 -0
- package/dist/components/spinLoader/spinLoader.d.ts +8 -0
- package/dist/components/systemAlert/index.d.ts +1 -0
- package/dist/components/systemAlert/systemAlert.d.ts +4 -0
- package/dist/components/systemAlert/types.d.ts +16 -0
- package/dist/components/systemMessage/index.d.ts +1 -0
- package/dist/components/systemMessage/systemMessage.d.ts +1 -0
- package/dist/components/table/constants.d.ts +2 -0
- package/dist/components/table/index.d.ts +4 -0
- package/dist/components/table/table.d.ts +4 -0
- package/dist/components/table/types.d.ts +52 -0
- package/dist/components/table/utils.d.ts +6 -0
- package/dist/components/themeProvider/index.d.ts +1 -0
- package/dist/components/themeProvider/themeProvider.d.ts +3 -1
- package/dist/components/toggle/index.d.ts +1 -0
- package/dist/components/toggle/toggle.d.ts +1 -0
- package/dist/components/tooltip/index.d.ts +1 -0
- package/dist/components/tooltip/tooltip.d.ts +23 -0
- package/dist/datePicker-382ef010.js +201 -0
- package/dist/datePicker.js +28 -0
- package/dist/dropdown-0260bb66.js +5 -0
- package/dist/dropdown-13d7d50e.js +278 -0
- package/dist/dropdown.js +6 -4
- package/dist/fieldLabel.js +18 -0
- package/dist/fieldNumber-2542b311.js +128 -0
- package/dist/fieldNumber.js +4 -3
- package/dist/fieldText-e605a521.js +158 -0
- package/dist/fieldText.js +6 -2
- package/dist/fieldTextFlex-9e616f66.js +78 -0
- package/dist/fieldTextFlex.js +10 -0
- package/dist/fonts/OpenSans/OpenSans-Bold.ttf +0 -0
- package/dist/fonts/OpenSans/OpenSans-Medium.ttf +0 -0
- package/dist/icons.js +60 -0
- package/dist/index.js +103 -23
- package/dist/maxValueDisplay-9be01a75.js +13 -0
- package/dist/maxValueDisplay.js +6 -0
- package/dist/modal.js +115 -97
- package/dist/openEye-7b9cf080.js +7 -0
- package/dist/pagination-ecbc9940.js +345 -0
- package/dist/pagination.js +20 -0
- package/dist/plus-0929dda4.js +6 -0
- package/dist/popover.js +99 -0
- package/dist/prevPage-87faf576.js +6 -0
- package/dist/radio-62546efa.js +76 -0
- package/dist/{icon.js → radio.js} +4 -4
- package/dist/spinLoader-c4a53718.js +11 -0
- package/dist/spinLoader.js +7 -0
- package/dist/style.css +1 -1
- package/dist/success-dc1914aa.js +7 -0
- package/dist/systemAlert.js +63 -0
- package/dist/{systemMessage-62c3133d.js → systemMessage-924fdaa6.js} +14 -14
- package/dist/systemMessage.js +1 -1
- package/dist/table-20aa2cdf.js +142 -0
- package/dist/table.js +11 -0
- package/dist/themeProvider-46c2be7b.js +23 -0
- package/dist/themeProvider.js +4 -3
- package/dist/toggle-304107fa.js +59 -0
- package/dist/toggle.js +1 -1
- package/dist/tooltip.js +101 -0
- package/package.json +53 -17
- package/dist/bubblesLoader-9bec3797.js +0 -17
- package/dist/button-d4944dbc.js +0 -64
- package/dist/checkbox-fdc44740.js +0 -68
- package/dist/clear-4963efcd.js +0 -5
- package/dist/components/icon/icon.d.ts +0 -11
- package/dist/components/icon/icons.d.ts +0 -21
- package/dist/components/icon/index.d.ts +0 -3
- package/dist/dropdown-45e7bc7d.js +0 -204
- package/dist/fieldNumber-27e69676.js +0 -132
- package/dist/fieldText-c7085849.js +0 -99
- package/dist/icon-71262f5c.js +0 -26
- package/dist/themeProvider-5800417e.js +0 -19
- package/dist/toggle-5b3d8333.js +0 -67
package/README.md
CHANGED
|
@@ -1,11 +1,263 @@
|
|
|
1
1
|
# ReportPortal UI kit
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This library is designed to reflect [ReportPortal Design System](https://www.figma.com/file/gjYQPbeyf4YsH3wZiVKoaj/RP-DS-6) components as React components.
|
|
4
|
+
|
|
5
|
+
**alpha versions available**
|
|
4
6
|
|
|
5
7
|
## Installation
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
Install the package into your project using your favourite package manager:
|
|
10
|
+
|
|
11
|
+
Using `npm`
|
|
12
|
+
```console
|
|
13
|
+
npm install @reportportal/ui-kit
|
|
14
|
+
```
|
|
8
15
|
|
|
9
|
-
|
|
16
|
+
or using `yarn`
|
|
17
|
+
```console
|
|
18
|
+
yarn add @reportportal/ui-kit
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
or using `pnpm`
|
|
22
|
+
```console
|
|
23
|
+
pnpm add @reportportal/ui-kit
|
|
24
|
+
```
|
|
10
25
|
|
|
11
26
|
## Usage
|
|
27
|
+
|
|
28
|
+
1. Import the library styles at the top-level of your application:
|
|
29
|
+
|
|
30
|
+
```jsx
|
|
31
|
+
import '@reportportal/ui-kit/dist/style.css';
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
2. To use the components in your project, import them from the package:
|
|
35
|
+
|
|
36
|
+
```jsx
|
|
37
|
+
import { Button } from '@reportportal/ui-kit';
|
|
38
|
+
|
|
39
|
+
const MyComponent = () => (
|
|
40
|
+
<Button>Button</Button>
|
|
41
|
+
);
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**Note:** In the future we plan to calibrate the build process to prebuild styles individually for each component and enable tree-shaking.
|
|
45
|
+
|
|
46
|
+
### Theming
|
|
47
|
+
|
|
48
|
+
All components are provided with the `light` theme by default.
|
|
49
|
+
To use the `dark` theme, you need to wrap your application with the `ThemeProvider` component and pass the `dark` theme as a prop:
|
|
50
|
+
|
|
51
|
+
```jsx
|
|
52
|
+
import { ThemeProvider, Button } from '@reportportal/ui-kit';
|
|
53
|
+
|
|
54
|
+
const MyComponent = () => (
|
|
55
|
+
<ThemeProvider theme="dark">
|
|
56
|
+
<Button>Dark theme button</Button>
|
|
57
|
+
</ThemeProvider>
|
|
58
|
+
);
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
`ThemeProvider` can be nested to provide different themes for different parts of the application if needed.
|
|
62
|
+
|
|
63
|
+
```jsx
|
|
64
|
+
import { ThemeProvider, Button } from '@reportportal/ui-kit';
|
|
65
|
+
|
|
66
|
+
const MyComponent = () => (
|
|
67
|
+
<ThemeProvider theme="light">
|
|
68
|
+
<Button>Light theme button</Button>
|
|
69
|
+
<ThemeProvider theme="dark">
|
|
70
|
+
<Button>Dark theme button override</Button>
|
|
71
|
+
</ThemeProvider>
|
|
72
|
+
</ThemeProvider>
|
|
73
|
+
);
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Custom themes
|
|
77
|
+
|
|
78
|
+
The `ThemeProvider` component provides the ability to pass custom themes to the application.
|
|
79
|
+
|
|
80
|
+
To use a custom theme, you need to pass an object with the custom theme name as a key and the custom theme class name as a value to the `customThemes` prop of the `ThemeProvider` component:
|
|
81
|
+
|
|
82
|
+
```jsx
|
|
83
|
+
import { ThemeProvider, Button } from '@reportportal/ui-kit';
|
|
84
|
+
|
|
85
|
+
const MyComponent = () => (
|
|
86
|
+
<ThemeProvider customThemes={{ 'my-theme': 'my-custom-theme' }} theme="my-theme">
|
|
87
|
+
<Button>Custom theme button</Button>
|
|
88
|
+
<ThemeProvider theme="dark">
|
|
89
|
+
<Button>Dark theme button override</Button>
|
|
90
|
+
</ThemeProvider>
|
|
91
|
+
</ThemeProvider>
|
|
92
|
+
);
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Then just override the ui-kit CSS custom properties in your custom theme class:
|
|
96
|
+
|
|
97
|
+
```scss
|
|
98
|
+
.my-custom-theme {
|
|
99
|
+
--rp-ui-base-font-family: OpenSans, Segoe UI, Tahoma, sans-serif;
|
|
100
|
+
--rp-ui-color-primary: green;
|
|
101
|
+
--rp-ui-color-primary-hover: #69e569;
|
|
102
|
+
--rp-ui-color-primary-focused: var(--rp-ui-color-primary-hover);
|
|
103
|
+
--rp-ui-color-primary-pressed: var(--rp-ui-color-primary-hover);
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
CSS custom properties and their default values can be found in the [themes](./src/assets/styles/themes).
|
|
108
|
+
|
|
109
|
+
The number of custom themes is not limited and actual theme can be easily switched by changing the `theme` prop.
|
|
110
|
+
|
|
111
|
+
## Components
|
|
112
|
+
|
|
113
|
+
To see a published showcase of the latest components released with its API and use cases, follow the [link](https://reportportal.io/ui-kit/).
|
|
114
|
+
|
|
115
|
+
### Icons
|
|
116
|
+
|
|
117
|
+
The library provides a set of SVG icons and the `BaseIconButton` component to apply basic styles for hover, disabled and other states to them.
|
|
118
|
+
|
|
119
|
+
The list of available icons can be found in the [icons](./src/components/icons/svg) folder.
|
|
120
|
+
|
|
121
|
+
The icons exported as React components:
|
|
122
|
+
|
|
123
|
+
```jsx
|
|
124
|
+
import { PlusIcon } from '@reportportal/ui-kit';
|
|
125
|
+
|
|
126
|
+
const MyComponent = () => (
|
|
127
|
+
<PlusIcon />
|
|
128
|
+
);
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
To use the `BaseIconButton` component, you need to pass the icon component as a child:
|
|
132
|
+
|
|
133
|
+
```jsx
|
|
134
|
+
import { BaseIconButton, PlusIcon } from '@reportportal/ui-kit';
|
|
135
|
+
|
|
136
|
+
const MyComponent = () => {
|
|
137
|
+
const handleIconClick = () => {
|
|
138
|
+
console.log('Icon clicked');
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
return (
|
|
142
|
+
<BaseIconButton
|
|
143
|
+
className={cx('my-icon')}
|
|
144
|
+
disabled={false}
|
|
145
|
+
onClick={handleIconClick}
|
|
146
|
+
>
|
|
147
|
+
<PlusIcon />
|
|
148
|
+
</BaseIconButton>
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
`BaseIconButton` supports all the props of the `button` HTML element.
|
|
154
|
+
|
|
155
|
+
**Note:** To support styling via `BaseIconButton`, it is recommended to use *path-based*, *single-color* SVG icons.
|
|
156
|
+
|
|
157
|
+
## Development
|
|
158
|
+
|
|
159
|
+
The library is developed using [React](https://reactjs.org/) and [TypeScript](https://www.typescriptlang.org/).
|
|
160
|
+
|
|
161
|
+
The [Storybook](https://storybook.js.org/) used as a main development environment and a showcase for components.
|
|
162
|
+
|
|
163
|
+
To run it locally use
|
|
164
|
+
```console
|
|
165
|
+
npm run start
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
To create a ready-to-deploy version of the Storybook, run
|
|
169
|
+
```console
|
|
170
|
+
npm run build:storybook
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Build process
|
|
174
|
+
|
|
175
|
+
We use [vite](https://vitejs.dev/) as a build tool.
|
|
176
|
+
|
|
177
|
+
To build the library run
|
|
178
|
+
```console
|
|
179
|
+
npm run build
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Storybook showcase deploy
|
|
183
|
+
|
|
184
|
+
While the library is in alpha, the showcase hosted on [GitHub Pages](https://reportportal.io/ui-kit/) should be updated based on changes from the `develop` branch.
|
|
185
|
+
|
|
186
|
+
#### Deployment steps
|
|
187
|
+
|
|
188
|
+
1. Navigate to the "Actions" page within the [repository](https://github.com/reportportal/ui-kit/actions).
|
|
189
|
+
2. Choose the "Deploy dev storybook showcase" action from list of available workflows.
|
|
190
|
+
3. Click "Run workflow" button on the right and select the `develop` branch.
|
|
191
|
+
4. Wait for the deployment process to complete. The progress can be tracked on the "Actions" page.
|
|
192
|
+
5. Once the deployment is finished, verify that the changes have been deployed correctly, visiting [GitHub Pages](https://reportportal.io/ui-kit/).
|
|
193
|
+
|
|
194
|
+
That's it! If you encounter any issues during the deployment process, please consult the documentation or reach out to the project maintainers for assistance.
|
|
195
|
+
|
|
196
|
+
### Release
|
|
197
|
+
|
|
198
|
+
While the library is in alpha, the [NPM package](https://www.npmjs.com/package/@reportportal/ui-kit) should be built and published from the `develop` branch with `alpha` tag.
|
|
199
|
+
|
|
200
|
+
#### Release steps
|
|
201
|
+
|
|
202
|
+
1. Navigate to the "Actions" page within the [repository](https://github.com/reportportal/ui-kit/actions).
|
|
203
|
+
2. Choose the "Publish dev package version" action from list of available workflows.
|
|
204
|
+
3. Click "Run workflow" button on the right and select the `develop` branch.
|
|
205
|
+
4. Wait for the publishing process to complete. The progress can be tracked on the "Actions" page.
|
|
206
|
+
5. Once the publishing is finished, verify that the changes have been published correctly, visiting [NPM registry](https://www.npmjs.com/package/@reportportal/ui-kit?activeTab=versions).
|
|
207
|
+
|
|
208
|
+
That's it! If you encounter any issues during the release process, please consult the documentation or reach out to the project maintainers for assistance.
|
|
209
|
+
|
|
210
|
+
### Code style
|
|
211
|
+
|
|
212
|
+
We follow the [Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript) and use [ESLint](https://eslint.org/) to enforce it.
|
|
213
|
+
|
|
214
|
+
### CSS
|
|
215
|
+
|
|
216
|
+
We use [SCSS](https://sass-lang.com/) as a CSS preprocessor.
|
|
217
|
+
|
|
218
|
+
#### Theming
|
|
219
|
+
|
|
220
|
+
The project uses [CSS Custom Properties](https://developer.mozilla.org/en-US/docs/Web/CSS/--*) to provide colors/fonts/etc. values for different themes via theme-specific CSS classes.
|
|
221
|
+
All components get the appropriate theme values at runtime based on the cascading nature of CSS.
|
|
222
|
+
|
|
223
|
+
This approach was chosen because it is easy to implement and maintain, and CSS Custom Properties are part of [WEB standards](https://www.w3.org/TR/css-variables-1/) and supported by [all major browsers](https://developer.mozilla.org/en-US/docs/Web/CSS/--*#browser_compatibility).
|
|
224
|
+
|
|
225
|
+
The CSS custom properties that come from DS are prefixed with `rp-ui-base` to avoid conflicts with other CSS properties and can be found in the [base.scss](./src/assets/styles/themes/base.scss).
|
|
226
|
+
|
|
227
|
+
### External libs
|
|
228
|
+
|
|
229
|
+
- [classnames](https://www.npmjs.com/package/classnames) - used for conditionally joining class names together.
|
|
230
|
+
- [downshift](https://www.npmjs.com/package/downshift) - used to build simple, flexible, WAI-ARIA compliant React autocomplete/dropdown/select/combobox components.
|
|
231
|
+
- [framer-motion](https://www.npmjs.com/package/framer-motion) - used for animations.
|
|
232
|
+
- [rc-scrollbars](https://www.npmjs.com/package/rc-scrollbars) - used for custom scrollbars.
|
|
233
|
+
- [@floating-ui/react-dom](https://www.npmjs.com/package/@floating-ui/react-dom) - used for positioning menus, dropdown elements, autocompletes, etc.
|
|
234
|
+
|
|
235
|
+
### Testing
|
|
236
|
+
|
|
237
|
+
Each new component/hook/utility **must be** covered by unit/component tests.
|
|
238
|
+
All existing uncovered stuff will be tested gradually in the scope of tech-debt elimination activities.
|
|
239
|
+
|
|
240
|
+
#### Testing Tools
|
|
241
|
+
|
|
242
|
+
The project uses the following testing tools:
|
|
243
|
+
- **Vitest**: Fast testing framework, compatible with Vite
|
|
244
|
+
- **React Testing Library**: For testing React components with a focus on user interactions
|
|
245
|
+
- **@testing-library/user-event**: For simulating user events in tests
|
|
246
|
+
- **JSDOM**: For simulating a DOM environment in Node.js
|
|
247
|
+
- **@vitest/coverage-v8**: For code coverage reporting
|
|
248
|
+
|
|
249
|
+
#### Test Scripts
|
|
250
|
+
|
|
251
|
+
Available npm scripts for testing:
|
|
252
|
+
- `npm run test` - Run tests in watch mode
|
|
253
|
+
- `npm run test:coverage` - Run tests with coverage report
|
|
254
|
+
- `npm run test:ci` - Run tests once (for CI environments)
|
|
255
|
+
- `npm run test:ui` - Run tests with UI interface
|
|
256
|
+
|
|
257
|
+
#### Test Coverage
|
|
258
|
+
|
|
259
|
+
The project maintains a minimum of 80% test coverage threshold for:
|
|
260
|
+
- Statements
|
|
261
|
+
- Branches
|
|
262
|
+
- Functions
|
|
263
|
+
- Lines
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
const t = (l) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.85355 12.8536C7.65829 13.0488 7.34171 13.0488 7.14645 12.8536L4.14645 9.85355C3.95118 9.65829 3.95118 9.34171 4.14645 9.14645C4.34171 8.95118 4.65829 8.95118 4.85355 9.14645L7 11.2929L7 3.5C7 3.22386 7.22386 3 7.5 3C7.77614 3 8 3.22386 8 3.5L8 11.2929L10.1464 9.14645C10.3417 8.95119 10.6583 8.95118 10.8536 9.14645C11.0488 9.34171 11.0488 9.65829 10.8536 9.85355L7.85355 12.8536Z", fill: "#A2AAB5" })), o = (l) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.14645 3.14645C7.34171 2.95118 7.65829 2.95118 7.85355 3.14645L10.8536 6.14645C11.0488 6.34171 11.0488 6.65829 10.8536 6.85355C10.6583 7.04882 10.3417 7.04882 10.1464 6.85355L8 4.70711V12.5C8 12.7761 7.77614 13 7.5 13C7.22386 13 7 12.7761 7 12.5L7 4.70711L4.85355 6.85355C4.65829 7.04882 4.34171 7.04882 4.14645 6.85355C3.95118 6.65829 3.95118 6.34171 4.14645 6.14645L7.14645 3.14645Z", fill: "#A2AAB5" }));
|
|
3
|
+
export {
|
|
4
|
+
t as S,
|
|
5
|
+
o as a
|
|
6
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { c as e } from "./bind-06a7ff84.js";
|
|
3
|
+
const b = "_disabled_1q88n_12", i = {
|
|
4
|
+
"base-icon-button": "_base-icon-button_1q88n_1",
|
|
5
|
+
disabled: b
|
|
6
|
+
}, l = e.bind(i), _ = ({
|
|
7
|
+
children: t,
|
|
8
|
+
className: o,
|
|
9
|
+
disabled: s = !1,
|
|
10
|
+
onClick: n,
|
|
11
|
+
...a
|
|
12
|
+
}) => /* @__PURE__ */ c(
|
|
13
|
+
"button",
|
|
14
|
+
{
|
|
15
|
+
className: l("base-icon-button", o, { disabled: s }),
|
|
16
|
+
type: "button",
|
|
17
|
+
disabled: s,
|
|
18
|
+
onClick: n,
|
|
19
|
+
...a,
|
|
20
|
+
children: t
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
export {
|
|
24
|
+
_ as B
|
|
25
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { c as a } from "./bind-06a7ff84.js";
|
|
3
|
+
const n = "_bubble_kn4ln_1", c = "_bubbles_kn4ln_1", r = {
|
|
4
|
+
"bubbles-loader": "_bubbles-loader_kn4ln_1",
|
|
5
|
+
"color-topaz": "_color-topaz_kn4ln_4",
|
|
6
|
+
bubble: n,
|
|
7
|
+
bubbles: c
|
|
8
|
+
}, s = a.bind(r), _ = 7, i = ({
|
|
9
|
+
color: b = "topaz",
|
|
10
|
+
className: o
|
|
11
|
+
}) => /* @__PURE__ */ l("div", { className: s("bubbles-loader", o, { [`color-${b}`]: b }), children: Array(_).fill(void 0).map((t, e) => (
|
|
12
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
13
|
+
/* @__PURE__ */ l("div", { className: s("bubble") }, e)
|
|
14
|
+
)) });
|
|
15
|
+
export {
|
|
16
|
+
i as B
|
|
17
|
+
};
|
package/dist/bubblesLoader.js
CHANGED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { jsxs as p, jsx as b } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as l } from "react";
|
|
3
|
+
import { c as u } from "./bind-06a7ff84.js";
|
|
4
|
+
const x = "_button_108em_1", f = "_primary_108em_18", g = "_disabled_108em_23", y = "_ghost_108em_38", N = "_danger_108em_59", B = "_text_108em_79", $ = "_icon_108em_133", j = {
|
|
5
|
+
button: x,
|
|
6
|
+
primary: f,
|
|
7
|
+
disabled: g,
|
|
8
|
+
ghost: y,
|
|
9
|
+
danger: N,
|
|
10
|
+
text: B,
|
|
11
|
+
"width-min-width": "_width-min-width_108em_115",
|
|
12
|
+
"width-content": "_width-content_108em_119",
|
|
13
|
+
"width-wide-content": "_width-wide-content_108em_123",
|
|
14
|
+
"width-parent": "_width-parent_108em_128",
|
|
15
|
+
icon: $,
|
|
16
|
+
"icon-start": "_icon-start_108em_139",
|
|
17
|
+
"icon-end": "_icon-end_108em_143"
|
|
18
|
+
}, _ = u.bind(j), v = l(
|
|
19
|
+
({
|
|
20
|
+
variant: i = "primary",
|
|
21
|
+
icon: t,
|
|
22
|
+
iconPlace: n = "start",
|
|
23
|
+
adjustWidthOn: e = "min-width",
|
|
24
|
+
type: s = "button",
|
|
25
|
+
children: c,
|
|
26
|
+
disabled: o = !1,
|
|
27
|
+
onClick: m,
|
|
28
|
+
title: r,
|
|
29
|
+
className: d,
|
|
30
|
+
...a
|
|
31
|
+
}, h) => {
|
|
32
|
+
const w = _("button", i, d, {
|
|
33
|
+
disabled: o,
|
|
34
|
+
[`width-${e}`]: e
|
|
35
|
+
});
|
|
36
|
+
return /* @__PURE__ */ p(
|
|
37
|
+
"button",
|
|
38
|
+
{
|
|
39
|
+
ref: h,
|
|
40
|
+
type: s,
|
|
41
|
+
disabled: o,
|
|
42
|
+
className: w,
|
|
43
|
+
onClick: m,
|
|
44
|
+
title: r,
|
|
45
|
+
...a,
|
|
46
|
+
children: [
|
|
47
|
+
t && /* @__PURE__ */ b(
|
|
48
|
+
"i",
|
|
49
|
+
{
|
|
50
|
+
className: _("icon", {
|
|
51
|
+
[`icon-${n}`]: n
|
|
52
|
+
}),
|
|
53
|
+
children: t
|
|
54
|
+
}
|
|
55
|
+
),
|
|
56
|
+
c
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
export {
|
|
63
|
+
v as B
|
|
64
|
+
};
|
package/dist/button.js
CHANGED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
const l = (t) => /* @__PURE__ */ e.createElement("svg", { width: 14, height: 15, viewBox: "0 0 14 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("rect", { x: 0.5, y: 1.5, width: 13, height: 13, rx: 1.5, stroke: "#A2AAB5" }), /* @__PURE__ */ e.createElement("rect", { x: 9, width: 1, height: 3.00067, rx: 0.5, fill: "#A2AAB5" }), /* @__PURE__ */ e.createElement("rect", { x: 4, width: 1, height: 3.00067, rx: 0.5, fill: "#A2AAB5" }), /* @__PURE__ */ e.createElement("rect", { x: 14, y: 4, width: 1, height: 14, transform: "rotate(90 14 4)", fill: "#A2AAB5" }), /* @__PURE__ */ e.createElement("rect", { x: 3, y: 10, width: 2, height: 2, fill: "#A2AAB5" }), /* @__PURE__ */ e.createElement("rect", { x: 6, y: 10, width: 2, height: 2, fill: "#A2AAB5" }), /* @__PURE__ */ e.createElement("rect", { x: 6, y: 7, width: 2, height: 2, fill: "#A2AAB5" }), /* @__PURE__ */ e.createElement("rect", { x: 3, y: 7, width: 2, height: 2, fill: "#A2AAB5" }), /* @__PURE__ */ e.createElement("rect", { x: 9, y: 7, width: 2, height: 2, fill: "#A2AAB5" })), i = (t) => /* @__PURE__ */ e.createElement("svg", { width: 8, height: 13, viewBox: "0 0 8 13", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.54134 12.2173C6.69755 12.3735 6.95081 12.3735 7.10702 12.2173L7.24844 12.0759C7.40465 11.9197 7.40465 11.6664 7.24844 11.5102L1.90539 6.16715L7.24844 0.824097C7.40465 0.667887 7.40465 0.41462 7.24844 0.258411L7.10702 0.116989C6.95081 -0.0392199 6.69755 -0.0392199 6.54134 0.116989L0.998591 5.65973L0.999562 5.6607L0.767094 5.89317C0.610884 6.04938 0.610884 6.30265 0.767093 6.45886L1.48425 7.17602L1.49215 7.16813L6.54134 12.2173Z", fill: "#C1C7D0" }));
|
|
3
|
+
export {
|
|
4
|
+
l as S,
|
|
5
|
+
i as a
|
|
6
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { jsxs as x, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { c as f } from "./bind-06a7ff84.js";
|
|
3
|
+
import { useRef as y, useId as C } from "react";
|
|
4
|
+
import { K as p } from "./keyCodes-f63c0e11.js";
|
|
5
|
+
const E = "_checkbox_1tbt5_1", D = "_disabled_1tbt5_11", K = "_input_1tbt5_16", N = "_control_1tbt5_23", I = "_children_1tbt5_149", R = {
|
|
6
|
+
checkbox: E,
|
|
7
|
+
disabled: D,
|
|
8
|
+
input: K,
|
|
9
|
+
control: N,
|
|
10
|
+
"partially-checked": "_partially-checked_1tbt5_76",
|
|
11
|
+
children: I
|
|
12
|
+
}, e = f.bind(R), A = ({
|
|
13
|
+
children: s,
|
|
14
|
+
disabled: c = !1,
|
|
15
|
+
onChange: d,
|
|
16
|
+
className: h,
|
|
17
|
+
value: r,
|
|
18
|
+
partiallyChecked: k,
|
|
19
|
+
title: l,
|
|
20
|
+
...u
|
|
21
|
+
}) => {
|
|
22
|
+
const t = y(null), a = C(), m = (o) => {
|
|
23
|
+
var _, b;
|
|
24
|
+
const { keyCode: i } = o;
|
|
25
|
+
if (i === p.SPACE_KEY_CODE) {
|
|
26
|
+
o.preventDefault(), (_ = t.current) == null || _.click();
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
i === p.ENTER_KEY_CODE && (o.preventDefault(), (b = t.current) == null || b.click());
|
|
30
|
+
};
|
|
31
|
+
return /* @__PURE__ */ x(
|
|
32
|
+
"label",
|
|
33
|
+
{
|
|
34
|
+
id: a,
|
|
35
|
+
className: e("checkbox", h, {
|
|
36
|
+
disabled: c
|
|
37
|
+
}),
|
|
38
|
+
title: l,
|
|
39
|
+
children: [
|
|
40
|
+
/* @__PURE__ */ n(
|
|
41
|
+
"input",
|
|
42
|
+
{
|
|
43
|
+
ref: t,
|
|
44
|
+
tabIndex: 0,
|
|
45
|
+
type: "checkbox",
|
|
46
|
+
onKeyDown: m,
|
|
47
|
+
className: e("input", { "partially-checked": k }),
|
|
48
|
+
disabled: c,
|
|
49
|
+
onChange: d,
|
|
50
|
+
checked: r,
|
|
51
|
+
title: l,
|
|
52
|
+
...u
|
|
53
|
+
}
|
|
54
|
+
),
|
|
55
|
+
/* @__PURE__ */ n(
|
|
56
|
+
"span",
|
|
57
|
+
{
|
|
58
|
+
"aria-labelledby": a,
|
|
59
|
+
role: "checkbox",
|
|
60
|
+
"aria-checked": r,
|
|
61
|
+
className: e("control", {
|
|
62
|
+
disabled: c
|
|
63
|
+
})
|
|
64
|
+
}
|
|
65
|
+
),
|
|
66
|
+
s && /* @__PURE__ */ n("span", { className: e("children", { disabled: c }), children: s })
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
};
|
|
71
|
+
export {
|
|
72
|
+
A as C
|
|
73
|
+
};
|
package/dist/checkbox.js
CHANGED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
const t = (l) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0.732179 15.2698C0.330639 14.8683 0.33064 14.2172 0.73218 13.8157L6.54858 7.99928L0.73218 2.18288C0.33064 1.78134 0.330639 1.13031 0.732179 0.728774C1.13372 0.327235 1.78474 0.327235 2.18628 0.728774L8.00269 6.54518L13.8191 0.728767C14.2206 0.327229 14.8717 0.327228 15.2732 0.728767C15.6747 1.13031 15.6747 1.78133 15.2732 2.18287L9.45679 7.99928L15.2732 13.8157C15.6747 14.2172 15.6747 14.8683 15.2732 15.2698C14.8717 15.6713 14.2206 15.6713 13.8191 15.2698L8.00269 9.45338L2.18628 15.2698C1.78474 15.6713 1.13372 15.6713 0.732179 15.2698Z", fill: "#A2AAB5" }));
|
|
3
|
+
export {
|
|
4
|
+
t as S
|
|
5
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FC, MouseEventHandler, ReactNode, HTMLAttributes } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface BaseIconButtonProps extends HTMLAttributes<HTMLButtonElement> {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
8
|
+
}
|
|
9
|
+
export declare const BaseIconButton: FC<BaseIconButtonProps>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode, ComponentPropsWithRef, MouseEventHandler } from 'react';
|
|
2
|
+
|
|
2
3
|
type IconPlace = 'start' | 'end';
|
|
3
4
|
type ButtonVariant = 'primary' | 'ghost' | 'danger' | 'text';
|
|
4
|
-
type ButtonWidth = 'content' | 'wide-content' | 'parent';
|
|
5
|
+
type ButtonWidth = 'content' | 'wide-content' | 'parent' | 'min-width';
|
|
5
6
|
export interface ButtonProps extends ComponentPropsWithRef<'button'> {
|
|
6
7
|
children?: ReactNode;
|
|
7
8
|
icon?: ReactNode;
|
|
8
9
|
iconPlace?: IconPlace;
|
|
9
|
-
dataAutomationId?: string;
|
|
10
10
|
adjustWidthOn?: ButtonWidth;
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
type?: 'submit' | 'reset' | 'button';
|
|
@@ -15,5 +15,5 @@ export interface ButtonProps extends ComponentPropsWithRef<'button'> {
|
|
|
15
15
|
className?: string;
|
|
16
16
|
variant?: ButtonVariant;
|
|
17
17
|
}
|
|
18
|
-
export declare const Button:
|
|
18
|
+
export declare const Button: import('react').ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
19
19
|
export {};
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { FC, ReactNode, ChangeEventHandler, HTMLAttributes } from 'react';
|
|
2
|
+
|
|
2
3
|
interface CheckboxProps extends HTMLAttributes<HTMLInputElement> {
|
|
3
4
|
value: boolean;
|
|
4
5
|
children?: ReactNode;
|
|
5
6
|
disabled?: boolean;
|
|
6
7
|
className?: string;
|
|
7
8
|
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
9
|
+
partiallyChecked?: boolean;
|
|
10
|
+
title?: string;
|
|
8
11
|
}
|
|
9
12
|
export declare const Checkbox: FC<CheckboxProps>;
|
|
10
13
|
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { FC, ReactNode, ReactElement } from 'react';
|
|
2
|
+
|
|
3
|
+
interface DatePickerProps {
|
|
4
|
+
onChange?: (date: Date | any) => void;
|
|
5
|
+
onBlur?: () => void;
|
|
6
|
+
onFocus?: () => void;
|
|
7
|
+
headerNodes?: ReactNode;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
shouldCloseOnSelect?: boolean;
|
|
10
|
+
fixedHeight?: boolean;
|
|
11
|
+
startDate?: Date | undefined;
|
|
12
|
+
endDate?: Date | undefined;
|
|
13
|
+
customClassName?: string;
|
|
14
|
+
popperClassName?: string;
|
|
15
|
+
calendarClassName?: string;
|
|
16
|
+
customTimeInput?: ReactElement;
|
|
17
|
+
language?: string;
|
|
18
|
+
yearsOptions?: number[];
|
|
19
|
+
placeholder?: string;
|
|
20
|
+
dateFormat?: string;
|
|
21
|
+
selects?: 'start' | 'end' | 'none';
|
|
22
|
+
value?: Date | null;
|
|
23
|
+
}
|
|
24
|
+
export declare const DatePicker: FC<DatePickerProps>;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface DatePickerHeaderProps {
|
|
4
|
+
changeYear: (year: number) => void;
|
|
5
|
+
changeMonth: (month: number) => void;
|
|
6
|
+
decreaseMonth: () => void;
|
|
7
|
+
increaseMonth: () => void;
|
|
8
|
+
headerNodes: ReactNode;
|
|
9
|
+
date: Date;
|
|
10
|
+
prevMonthButtonDisabled: boolean;
|
|
11
|
+
nextMonthButtonDisabled: boolean;
|
|
12
|
+
customClassName: string;
|
|
13
|
+
yearsOptions: number[];
|
|
14
|
+
locale: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const DatePickerHeader: FC<DatePickerHeaderProps>;
|