lawgic-dev-kit 0.21.4 → 0.22.2
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 +54 -54
- package/dist/components/atoms/Checkbox/Checkbox.d.ts +3 -2
- package/dist/components/atoms/Checkbox/Checkbox.js +43 -30
- package/dist/components/atoms/SelectInput/SelectInput.d.ts +1 -1
- package/dist/components/atoms/SelectInput/SelectInput.js +131 -143
- package/dist/components/atoms/SelectInput/SelectInput.types.d.ts +4 -0
- package/dist/components/atoms/StepIndicator/StepIndicator.d.ts +5 -0
- package/dist/components/atoms/StepIndicator/StepIndicator.js +58 -0
- package/dist/components/atoms/StepIndicator/index.d.ts +1 -0
- package/dist/components/atoms/TextInput/TextInput.js +33 -33
- package/dist/components/atoms/Toast/Toast.d.ts +2 -3
- package/dist/components/atoms/Toast/Toast.js +46 -53
- package/dist/components/atoms/UncontrolledSelector/UncontrolledSelector.d.ts +2 -0
- package/dist/components/atoms/UncontrolledSelector/UncontrolledSelector.js +102 -87
- package/dist/components/atoms/UncontrolledTextInput/UncontrolledTextInput.js +20 -26
- package/dist/components/atoms/UploadContainer/UploadContainer.js +4 -4
- package/dist/components/atoms/index.d.ts +1 -1
- package/dist/components/molecules/CalendarSelector/CalendarSelector.js +8 -8
- package/dist/components/molecules/EmptyState/EmptyState.d.ts +9 -0
- package/dist/components/molecules/EmptyState/EmptyState.js +16 -0
- package/dist/components/molecules/EmptyState/index.d.ts +1 -0
- package/dist/components/molecules/MultiSelectDropdown/MultiSelectDropdown.d.ts +23 -0
- package/dist/components/molecules/MultiSelectDropdown/MultiSelectDropdown.js +190 -0
- package/dist/components/molecules/MultiSelectDropdown/index.d.ts +1 -0
- package/dist/components/molecules/Stepper/Stepper.d.ts +1 -1
- package/dist/components/molecules/Stepper/Stepper.js +78 -231
- package/dist/components/molecules/Stepper/Stepper.styles.d.ts +7 -3
- package/dist/components/molecules/Stepper/Stepper.styles.js +23 -15
- package/dist/components/molecules/Tooltip/Tooltip.d.ts +20 -0
- package/dist/components/molecules/Tooltip/Tooltip.js +41 -0
- package/dist/components/molecules/index.d.ts +3 -0
- package/dist/index.js +71 -65
- package/dist/lawgic-dev-kit.css +1 -1
- package/dist/lawgic-dev-kit.umd.js +80 -73
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.js +396 -712
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.utils.js +33 -81
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/index.js +7 -2
- package/dist/node_modules/@fortawesome/pro-light-svg-icons/index.js +14 -49
- package/dist/node_modules/@fortawesome/pro-regular-svg-icons/index.js +32 -12
- package/dist/src/Root.d.ts +2 -0
- package/dist/src/app.d.ts +1 -0
- package/dist/src/components/atoms/ActionButton/ActionButton.d.ts +11 -0
- package/dist/src/components/atoms/ActionButton/index.d.ts +1 -0
- package/dist/src/components/atoms/AsyncToast/index.d.ts +11 -0
- package/dist/src/components/atoms/Avatar/Avatar.d.ts +11 -0
- package/dist/src/components/atoms/Avatar/index.d.ts +1 -0
- package/dist/src/components/atoms/BoxContainer/BoxContainer.d.ts +4 -0
- package/dist/src/components/atoms/BoxContainer/BoxContainer.types.d.ts +6 -0
- package/dist/src/components/atoms/BoxContainer/index.d.ts +1 -0
- package/dist/src/components/atoms/Button/Button.d.ts +4 -0
- package/dist/src/components/atoms/Button/Button.styles.d.ts +26 -0
- package/dist/src/components/atoms/Button/Button.types.d.ts +12 -0
- package/dist/src/components/atoms/Button/index.d.ts +1 -0
- package/dist/src/components/atoms/CenterModal/CenterModal.d.ts +4 -0
- package/dist/src/components/atoms/CenterModal/CenterModal.types.d.ts +6 -0
- package/dist/src/components/atoms/CenterModal/index.d.ts +1 -0
- package/dist/src/components/atoms/Checkbox/Checkbox.d.ts +13 -0
- package/dist/src/components/atoms/Checkbox/index.d.ts +1 -0
- package/dist/src/components/atoms/CircleProgress/CircleProgress.d.ts +22 -0
- package/dist/src/components/atoms/CircleProgress/index.d.ts +1 -0
- package/dist/src/components/atoms/ClickAwayListener/ClickAwayListener.d.ts +4 -0
- package/dist/src/components/atoms/ClickAwayListener/ClickAwayListener.types.d.ts +7 -0
- package/dist/src/components/atoms/ClickAwayListener/index.d.ts +1 -0
- package/dist/src/components/atoms/CountryInput/CountryInput.d.ts +4 -0
- package/dist/src/components/atoms/CountryInput/CountryInput.types.d.ts +37 -0
- package/dist/src/components/atoms/CountryInput/index.d.ts +1 -0
- package/dist/src/components/atoms/CountryLabel/CountryLabel.d.ts +6 -0
- package/dist/src/components/atoms/CountryLabel/index.d.ts +1 -0
- package/dist/src/components/atoms/CountrySelectInput/CountryDropdown.d.ts +4 -0
- package/dist/src/components/atoms/CountrySelectInput/CountryDropdown.types.d.ts +36 -0
- package/dist/src/components/atoms/CountrySelectInput/index.d.ts +1 -0
- package/dist/src/components/atoms/Divider/Divider.d.ts +7 -0
- package/dist/src/components/atoms/Divider/index.d.ts +1 -0
- package/dist/src/components/atoms/FilterPill/FilterPill.d.ts +8 -0
- package/dist/src/components/atoms/FilterPill/index.d.ts +1 -0
- package/dist/src/components/atoms/FloatingCard/FloatingCard.d.ts +4 -0
- package/dist/{components/atoms/Tooltip/Tooltip.types.d.ts → src/components/atoms/FloatingCard/FloatingCard.types.d.ts} +3 -3
- package/dist/src/components/atoms/FloatingCard/index.d.ts +1 -0
- package/dist/src/components/atoms/IconButton/IconButton.d.ts +4 -0
- package/dist/src/components/atoms/IconButton/IconButton.styles.d.ts +10 -0
- package/dist/src/components/atoms/IconButton/IconButton.types.d.ts +11 -0
- package/dist/src/components/atoms/IconButton/index.d.ts +1 -0
- package/dist/src/components/atoms/ImageProfileInput/ImageProfileInput.d.ts +4 -0
- package/dist/src/components/atoms/ImageProfileInput/ImageProfileInput.types.d.ts +12 -0
- package/dist/src/components/atoms/ImageProfileInput/ImageProfileInput.validators.d.ts +9 -0
- package/dist/src/components/atoms/ImageProfileInput/index.d.ts +2 -0
- package/dist/src/components/atoms/IndexedStep/IndexedStep.d.ts +9 -0
- package/dist/src/components/atoms/IndexedStep/index.d.ts +1 -0
- package/dist/src/components/atoms/InfoCard/InfoCard.d.ts +3 -0
- package/dist/src/components/atoms/InfoCard/InfoCard.types.d.ts +6 -0
- package/dist/src/components/atoms/InfoCard/index.d.ts +1 -0
- package/dist/src/components/atoms/InformationDisclaimer/InformationDisclaimer.d.ts +4 -0
- package/dist/src/components/atoms/InformationDisclaimer/InformationDisclaimer.styles.d.ts +3 -0
- package/dist/src/components/atoms/InformationDisclaimer/InformationDisclaimer.types.d.ts +10 -0
- package/dist/src/components/atoms/InformationDisclaimer/index.d.ts +1 -0
- package/dist/src/components/atoms/LoadingProgress/LoadingProgress.d.ts +13 -0
- package/dist/src/components/atoms/LoadingProgress/index.d.ts +1 -0
- package/dist/src/components/atoms/LoadingSpinner/LoadingSpinner.d.ts +8 -0
- package/dist/src/components/atoms/LoadingSpinner/index.d.ts +1 -0
- package/dist/src/components/atoms/PasswordInput/PasswordInput.d.ts +5 -0
- package/dist/src/components/atoms/PasswordInput/PasswordInput.types.d.ts +11 -0
- package/dist/src/components/atoms/PasswordInput/index.d.ts +1 -0
- package/dist/src/components/atoms/PhoneInput/PhoneInput.d.ts +5 -0
- package/dist/src/components/atoms/PhoneInput/PhoneInput.types.d.ts +12 -0
- package/dist/src/components/atoms/PhoneInput/index.d.ts +1 -0
- package/dist/src/components/atoms/Pill/Pill.d.ts +8 -0
- package/dist/src/components/atoms/Pill/index.d.ts +1 -0
- package/dist/src/components/atoms/ProgressBar/ProgressBar.d.ts +3 -0
- package/dist/src/components/atoms/ProgressBar/ProgressBar.styles.d.ts +7 -0
- package/dist/src/components/atoms/ProgressBar/ProgressBar.types.d.ts +6 -0
- package/dist/src/components/atoms/ProgressBar/index.d.ts +1 -0
- package/dist/src/components/atoms/SearchBar/index.d.ts +2 -0
- package/dist/src/components/atoms/SectionButton/SectionButton.d.ts +12 -0
- package/dist/src/components/atoms/SectionButton/desktop/SectionButton.d.ts +3 -0
- package/dist/src/components/atoms/SectionButton/desktop/SectionButton.styles.d.ts +2 -0
- package/dist/src/components/atoms/SectionButton/desktop/SectionButton.types.d.ts +37 -0
- package/dist/src/components/atoms/SectionButton/desktop/index.d.ts +2 -0
- package/dist/src/components/atoms/SectionButton/index.d.ts +1 -0
- package/dist/src/components/atoms/SectionButton/mobile/MobileSectionButton.styles.d.ts +3 -0
- package/dist/src/components/atoms/SectionButton/mobile/SectionButton.d.ts +3 -0
- package/dist/src/components/atoms/SectionButton/mobile/SectionButton.types.d.ts +37 -0
- package/dist/src/components/atoms/SectionButton/mobile/index.d.ts +2 -0
- package/dist/src/components/atoms/SelectInput/SelectInput.d.ts +1 -1
- package/dist/src/components/atoms/SelectInput/SelectInput.types.d.ts +4 -0
- package/dist/src/components/atoms/SelectInput/index.d.ts +1 -0
- package/dist/src/components/atoms/SidebarButton/SidebarButton.d.ts +13 -0
- package/dist/src/components/atoms/SidebarButton/SidebarButton.styles.d.ts +9 -0
- package/dist/src/components/atoms/SidebarButton/index.d.ts +1 -0
- package/dist/src/components/atoms/StepIndicator/StepIndicator.d.ts +5 -0
- package/dist/src/components/atoms/StepIndicator/index.d.ts +1 -0
- package/dist/src/components/atoms/Switch/Switch.d.ts +7 -0
- package/dist/src/components/atoms/Switch/index.d.ts +1 -0
- package/dist/src/components/atoms/Tab/Tab.d.ts +3 -0
- package/dist/src/components/atoms/Tab/Tab.styles.d.ts +6 -0
- package/dist/src/components/atoms/Tab/Tab.types.d.ts +11 -0
- package/dist/src/components/atoms/Tab/index.d.ts +1 -0
- package/dist/src/components/atoms/TextButton/TextButton.d.ts +4 -0
- package/dist/src/components/atoms/TextButton/TextButton.styles.d.ts +2 -0
- package/dist/src/components/atoms/TextButton/TextButton.types.d.ts +6 -0
- package/dist/src/components/atoms/TextButton/index.d.ts +1 -0
- package/dist/src/components/atoms/TextInput/TextInput.d.ts +5 -0
- package/dist/src/components/atoms/TextInput/TextInput.types.d.ts +13 -0
- package/dist/src/components/atoms/TextInput/index.d.ts +1 -0
- package/dist/src/components/atoms/TextStaticInput/TextStaticInput.d.ts +3 -0
- package/dist/src/components/atoms/TextStaticInput/TextStaticInput.types.d.ts +5 -0
- package/dist/src/components/atoms/TextStaticInput/index.d.ts +1 -0
- package/dist/src/components/atoms/ThresholdCircleProgress/ThresholdCircleProgress.d.ts +4 -0
- package/dist/src/components/atoms/ThresholdCircleProgress/ThresholdCircleProgress.types.d.ts +30 -0
- package/dist/src/components/atoms/ThresholdCircleProgress/index.d.ts +1 -0
- package/dist/src/components/atoms/ThresholdProgressBar/ThresholdProgressBar.d.ts +4 -0
- package/dist/src/components/atoms/ThresholdProgressBar/ThresholdProgressBar.types.d.ts +22 -0
- package/dist/src/components/atoms/ThresholdProgressBar/index.d.ts +1 -0
- package/dist/src/components/atoms/Toast/Toast.d.ts +20 -0
- package/dist/src/components/atoms/Toast/index.d.ts +1 -0
- package/dist/src/components/atoms/UncontrolledSelector/UncontrolledSelector.d.ts +2 -0
- package/dist/src/components/atoms/UncontrolledSelector/index.d.ts +1 -0
- package/dist/src/components/atoms/UncontrolledTextInput/UncontrolledTextInput.d.ts +4 -0
- package/dist/src/components/atoms/UncontrolledTextInput/UncontrolledTextInput.types.d.ts +14 -0
- package/dist/src/components/atoms/UncontrolledTextInput/index.d.ts +1 -0
- package/dist/src/components/atoms/UploadContainer/UploadContainer.d.ts +4 -0
- package/dist/src/components/atoms/UploadContainer/UploadContainer.types.d.ts +37 -0
- package/dist/src/components/atoms/UploadContainer/index.d.ts +1 -0
- package/dist/src/components/atoms/index.d.ts +42 -0
- package/dist/src/components/index.d.ts +3 -0
- package/dist/src/components/molecules/AlertModal/AlertModal.d.ts +3 -0
- package/dist/src/components/molecules/AlertModal/AlertModal.types.d.ts +9 -0
- package/dist/src/components/molecules/AlertModal/index.d.ts +2 -0
- package/dist/src/components/molecules/AutocompleteInput/AutocompleteInput.d.ts +3 -0
- package/dist/src/components/molecules/AutocompleteInput/AutocompleteInput.types.d.ts +28 -0
- package/dist/src/components/molecules/AutocompleteInput/index.d.ts +1 -0
- package/dist/src/components/molecules/CalendarSelector/CalendarSelector.d.ts +14 -0
- package/dist/src/components/molecules/CalendarSelector/CalendarSelector.styles.d.ts +36 -0
- package/dist/src/components/molecules/CalendarSelector/PeriodToggle.d.ts +15 -0
- package/dist/src/components/molecules/CalendarSelector/TimeDisplay.d.ts +7 -0
- package/dist/src/components/molecules/CalendarSelector/index.d.ts +1 -0
- package/dist/src/components/molecules/DateInput/DateInput.d.ts +14 -0
- package/dist/src/components/molecules/DateInput/index.d.ts +1 -0
- package/dist/src/components/molecules/DialogModal/DialogModal.d.ts +3 -0
- package/dist/src/components/molecules/DialogModal/DialogModal.types.d.ts +11 -0
- package/dist/src/components/molecules/DialogModal/index.d.ts +1 -0
- package/dist/src/components/molecules/Dropdown/Dropdown.d.ts +3 -0
- package/dist/src/components/molecules/Dropdown/Dropdown.types.d.ts +9 -0
- package/dist/src/components/molecules/Dropdown/index.d.ts +1 -0
- package/dist/src/components/molecules/EmptyState/EmptyState.d.ts +9 -0
- package/dist/src/components/molecules/EmptyState/index.d.ts +1 -0
- package/dist/src/components/molecules/FileUpload/FileUpload.d.ts +4 -0
- package/dist/src/components/molecules/FileUpload/FileUpload.types.d.ts +17 -0
- package/dist/src/components/molecules/FileUpload/index.d.ts +1 -0
- package/dist/src/components/molecules/FiltersMenu/FiltersMenu.d.ts +13 -0
- package/dist/src/components/molecules/FiltersMenu/index.d.ts +1 -0
- package/dist/src/components/molecules/FloatingMenu/FloatingMenu.d.ts +4 -0
- package/dist/src/components/molecules/FloatingMenu/FloatingMenu.types.d.ts +13 -0
- package/dist/src/components/molecules/FloatingMenu/index.d.ts +1 -0
- package/dist/src/components/molecules/IndexedStepper/IndexedStepper.d.ts +7 -0
- package/dist/src/components/molecules/IndexedStepper/index.d.ts +1 -0
- package/dist/src/components/molecules/InformationContainer/InformationContainer.d.ts +14 -0
- package/dist/src/components/molecules/InformationContainer/index.d.ts +1 -0
- package/dist/src/components/molecules/MultiSelectDropdown/MultiSelectDropdown.d.ts +23 -0
- package/dist/src/components/molecules/MultiSelectDropdown/index.d.ts +1 -0
- package/dist/src/components/molecules/PillsContainer/PillsContainer.d.ts +9 -0
- package/dist/src/components/molecules/PillsContainer/index.d.ts +1 -0
- package/dist/src/components/molecules/SearchModal/SearchModal.d.ts +4 -0
- package/dist/src/components/molecules/SearchModal/SearchModal.types.d.ts +5 -0
- package/dist/src/components/molecules/SearchModal/index.d.ts +1 -0
- package/dist/src/components/molecules/SideModal/SideModal.d.ts +4 -0
- package/dist/src/components/molecules/SideModal/SideModal.types.d.ts +11 -0
- package/dist/src/components/molecules/SideModal/index.d.ts +1 -0
- package/dist/src/components/molecules/Stepper/Stepper.d.ts +3 -0
- package/dist/src/components/molecules/Stepper/Stepper.styles.d.ts +15 -0
- package/dist/src/components/molecules/Stepper/index.d.ts +1 -0
- package/dist/src/components/molecules/Tabs/Tabs.d.ts +21 -0
- package/dist/src/components/molecules/Tabs/index.d.ts +1 -0
- package/dist/src/components/molecules/Tooltip/Tooltip.d.ts +20 -0
- package/dist/src/components/molecules/Tooltip/index.d.ts +1 -0
- package/dist/src/components/molecules/UncontrolledDateInput/UncontrolledDateInput.d.ts +16 -0
- package/dist/src/components/molecules/UncontrolledDateInput/index.d.ts +1 -0
- package/dist/src/components/molecules/index.d.ts +22 -0
- package/dist/src/components/organisms/index.d.ts +1 -0
- package/dist/src/constants/countries.d.ts +30 -0
- package/dist/src/contexts/index.d.ts +1 -0
- package/dist/src/contexts/themeContext.d.ts +3 -0
- package/dist/src/hooks/index.d.ts +2 -0
- package/dist/src/hooks/useFilterToggler.d.ts +5 -0
- package/dist/src/hooks/useTheme.d.ts +1 -0
- package/dist/src/index.d.ts +8 -0
- package/dist/src/lab/Laboratory.d.ts +2 -0
- package/dist/src/lab/LaboratoryLayout.d.ts +5 -0
- package/dist/src/lab/index.lab.d.ts +1 -0
- package/dist/src/providers/ThemeProvider.d.ts +7 -0
- package/dist/src/providers/index.d.ts +1 -0
- package/dist/src/themes/default.d.ts +2 -0
- package/dist/src/themes/index.d.ts +2 -0
- package/dist/src/themes/types.d.ts +6 -0
- package/dist/src/types/baseModalProps.d.ts +4 -0
- package/dist/src/types/cycles.d.ts +103 -0
- package/dist/src/types/display.d.ts +2 -0
- package/dist/src/types/fileInfo.d.ts +2 -0
- package/dist/src/types/filters.d.ts +22 -0
- package/dist/src/types/i18n.d.ts +1 -0
- package/dist/src/types/index.d.ts +10 -0
- package/dist/src/types/modal.d.ts +34 -0
- package/dist/src/types/modalType.d.ts +1 -0
- package/dist/src/types/navbarOption.d.ts +7 -0
- package/dist/src/types/sidebarOption.d.ts +7 -0
- package/dist/src/types/stepper.d.ts +23 -0
- package/dist/src/types/styleValues.d.ts +4 -0
- package/dist/src/types/toast.d.ts +6 -3
- package/dist/src/utils/cycles.d.ts +2 -0
- package/dist/src/utils/dates.d.ts +1 -0
- package/dist/src/utils/files.d.ts +8 -0
- package/dist/src/utils/images.d.ts +1 -0
- package/dist/src/utils/index.d.ts +7 -0
- package/dist/src/utils/modal.d.ts +13 -0
- package/dist/src/utils/renderContentOptions.d.ts +3 -0
- package/dist/src/utils/stepper.d.ts +2 -0
- package/dist/src/utils/strings.d.ts +2 -0
- package/dist/src/utils/toast.d.ts +15 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stepper.d.ts +23 -0
- package/dist/types/toast.d.ts +6 -3
- package/dist/utils/stepper.d.ts +2 -0
- package/dist/utils/toast.js +3 -3
- package/dist/vite-env.d.ts +1 -1
- package/dist/vite.config.d.ts +2 -0
- package/package.json +157 -157
- package/dist/components/atoms/Tooltip/Tooltip.d.ts +0 -4
- package/dist/components/atoms/Tooltip/Tooltip.js +0 -121
- package/dist/components/molecules/Stepper/Stepper.types.d.ts +0 -9
- /package/dist/components/{atoms → molecules}/Tooltip/index.d.ts +0 -0
package/README.md
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
# React + TypeScript + Vite
|
|
2
|
-
|
|
3
|
-
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
|
4
|
-
|
|
5
|
-
Currently, two official plugins are available:
|
|
6
|
-
|
|
7
|
-
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
|
|
8
|
-
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
|
|
9
|
-
|
|
10
|
-
## Expanding the ESLint configuration
|
|
11
|
-
|
|
12
|
-
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
|
|
13
|
-
|
|
14
|
-
```js
|
|
15
|
-
export default tseslint.config({
|
|
16
|
-
extends: [
|
|
17
|
-
// Remove ...tseslint.configs.recommended and replace with this
|
|
18
|
-
...tseslint.configs.recommendedTypeChecked,
|
|
19
|
-
// Alternatively, use this for stricter rules
|
|
20
|
-
...tseslint.configs.strictTypeChecked,
|
|
21
|
-
// Optionally, add this for stylistic rules
|
|
22
|
-
...tseslint.configs.stylisticTypeChecked,
|
|
23
|
-
],
|
|
24
|
-
languageOptions: {
|
|
25
|
-
// other options...
|
|
26
|
-
parserOptions: {
|
|
27
|
-
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
28
|
-
tsconfigRootDir: import.meta.dirname,
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
})
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
|
|
35
|
-
|
|
36
|
-
```js
|
|
37
|
-
// eslint.config.js
|
|
38
|
-
import reactX from 'eslint-plugin-react-x'
|
|
39
|
-
import reactDom from 'eslint-plugin-react-dom'
|
|
40
|
-
|
|
41
|
-
export default tseslint.config({
|
|
42
|
-
plugins: {
|
|
43
|
-
// Add the react-x and react-dom plugins
|
|
44
|
-
'react-x': reactX,
|
|
45
|
-
'react-dom': reactDom,
|
|
46
|
-
},
|
|
47
|
-
rules: {
|
|
48
|
-
// other rules...
|
|
49
|
-
// Enable its recommended typescript rules
|
|
50
|
-
...reactX.configs['recommended-typescript'].rules,
|
|
51
|
-
...reactDom.configs.recommended.rules,
|
|
52
|
-
},
|
|
53
|
-
})
|
|
54
|
-
```
|
|
1
|
+
# React + TypeScript + Vite
|
|
2
|
+
|
|
3
|
+
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
|
4
|
+
|
|
5
|
+
Currently, two official plugins are available:
|
|
6
|
+
|
|
7
|
+
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
|
|
8
|
+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
|
|
9
|
+
|
|
10
|
+
## Expanding the ESLint configuration
|
|
11
|
+
|
|
12
|
+
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
|
|
13
|
+
|
|
14
|
+
```js
|
|
15
|
+
export default tseslint.config({
|
|
16
|
+
extends: [
|
|
17
|
+
// Remove ...tseslint.configs.recommended and replace with this
|
|
18
|
+
...tseslint.configs.recommendedTypeChecked,
|
|
19
|
+
// Alternatively, use this for stricter rules
|
|
20
|
+
...tseslint.configs.strictTypeChecked,
|
|
21
|
+
// Optionally, add this for stylistic rules
|
|
22
|
+
...tseslint.configs.stylisticTypeChecked,
|
|
23
|
+
],
|
|
24
|
+
languageOptions: {
|
|
25
|
+
// other options...
|
|
26
|
+
parserOptions: {
|
|
27
|
+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
28
|
+
tsconfigRootDir: import.meta.dirname,
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
})
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
|
|
35
|
+
|
|
36
|
+
```js
|
|
37
|
+
// eslint.config.js
|
|
38
|
+
import reactX from 'eslint-plugin-react-x'
|
|
39
|
+
import reactDom from 'eslint-plugin-react-dom'
|
|
40
|
+
|
|
41
|
+
export default tseslint.config({
|
|
42
|
+
plugins: {
|
|
43
|
+
// Add the react-x and react-dom plugins
|
|
44
|
+
'react-x': reactX,
|
|
45
|
+
'react-dom': reactDom,
|
|
46
|
+
},
|
|
47
|
+
rules: {
|
|
48
|
+
// other rules...
|
|
49
|
+
// Enable its recommended typescript rules
|
|
50
|
+
...reactX.configs['recommended-typescript'].rules,
|
|
51
|
+
...reactDom.configs.recommended.rules,
|
|
52
|
+
},
|
|
53
|
+
})
|
|
54
|
+
```
|
|
@@ -3,10 +3,11 @@ type ColorVariant = "blue" | "aqua" | "red" | "gray";
|
|
|
3
3
|
type Variant = "rounded" | "square";
|
|
4
4
|
interface CheckboxProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
5
5
|
active?: boolean | string | number;
|
|
6
|
-
color?: ColorVariant;
|
|
7
6
|
variant?: Variant;
|
|
8
|
-
|
|
7
|
+
color?: ColorVariant;
|
|
9
8
|
size?: number;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
10
11
|
}
|
|
11
12
|
declare const Checkbox: React.FC<CheckboxProps>;
|
|
12
13
|
export default Checkbox;
|
|
@@ -1,42 +1,55 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { j as a } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { FontAwesomeIcon as h } from "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
|
|
3
|
+
import { faCheck as m } from "../../../node_modules/@fortawesome/pro-solid-svg-icons/index.js";
|
|
4
|
+
const $ = ({
|
|
5
|
+
active: d = !1,
|
|
6
|
+
variant: b = "rounded",
|
|
4
7
|
color: n = "blue",
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
size: e = 20,
|
|
9
|
+
disabled: o = !1,
|
|
10
|
+
onClick: t,
|
|
11
|
+
className: i = "",
|
|
12
|
+
...l
|
|
9
13
|
}) => {
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
width: `${e}px`,
|
|
20
|
-
height: `${e}px`,
|
|
21
|
-
minWidth: `${e}px`,
|
|
22
|
-
minHeight: `${e}px`
|
|
23
|
-
});
|
|
24
|
-
return /* @__PURE__ */ d.jsx(
|
|
14
|
+
const r = !!d, s = (y) => {
|
|
15
|
+
o || t && t(y);
|
|
16
|
+
}, g = {
|
|
17
|
+
blue: r ? "bg-blue-500 border-blue-500" : "bg-white border-gray-300 hover:border-blue-400",
|
|
18
|
+
aqua: r ? "bg-aqua-500 border-aqua-500" : "bg-white border-gray-300 hover:border-aqua-400",
|
|
19
|
+
red: r ? "bg-red-500 border-red-500" : "bg-white border-gray-300 hover:border-red-400",
|
|
20
|
+
gray: r ? "bg-gray-500 border-gray-500" : "bg-white border-gray-300 hover:border-gray-400"
|
|
21
|
+
}, c = r ? "bg-gray-400 border-gray-400 opacity-60" : "bg-gray-100 border-gray-300 opacity-60", u = b === "rounded" ? "rounded-full" : "rounded-md";
|
|
22
|
+
return /* @__PURE__ */ a.jsx(
|
|
25
23
|
"div",
|
|
26
24
|
{
|
|
27
|
-
className: `
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
className: `
|
|
26
|
+
relative flex items-center justify-center border-[1.5px] transition-all duration-150
|
|
27
|
+
${u}
|
|
28
|
+
${o ? "cursor-not-allowed" : "cursor-pointer"}
|
|
29
|
+
${o ? c : g[n]}
|
|
30
|
+
${i}
|
|
31
|
+
`,
|
|
32
|
+
style: {
|
|
33
|
+
width: `${e}px`,
|
|
34
|
+
height: `${e}px`,
|
|
35
|
+
minWidth: `${e}px`,
|
|
36
|
+
minHeight: `${e}px`
|
|
37
|
+
},
|
|
38
|
+
onClick: s,
|
|
39
|
+
...l,
|
|
40
|
+
children: r && /* @__PURE__ */ a.jsx(
|
|
41
|
+
h,
|
|
32
42
|
{
|
|
33
|
-
|
|
34
|
-
|
|
43
|
+
icon: m,
|
|
44
|
+
className: "text-white",
|
|
45
|
+
style: {
|
|
46
|
+
fontSize: `${e * 0.6}px`
|
|
47
|
+
}
|
|
35
48
|
}
|
|
36
49
|
)
|
|
37
50
|
}
|
|
38
51
|
);
|
|
39
52
|
};
|
|
40
53
|
export {
|
|
41
|
-
|
|
54
|
+
$ as default
|
|
42
55
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { FieldValues } from 'react-hook-form';
|
|
2
2
|
import { SelectInputProps } from './SelectInput.types';
|
|
3
|
-
declare const SelectInput: <T extends FieldValues>({ options, name, control, label, placeholder, className, input, dropdownStyle, innerClassName }: SelectInputProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare const SelectInput: <T extends FieldValues>({ options, name, control, label, placeholder, className, input, dropdownStyle, innerClassName, showChevron, size, }: SelectInputProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default SelectInput;
|
|
@@ -1,207 +1,195 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as t } from "../../../_virtual/jsx-runtime.js";
|
|
2
2
|
import { useFloating as U, useClick as Y, useDismiss as _, useInteractions as q, useTransitionStyles as G } from "../../../node_modules/@floating-ui/react/dist/floating-ui.react.js";
|
|
3
|
-
import { useState as
|
|
4
|
-
import {
|
|
3
|
+
import { useState as $, useRef as z, useEffect as J } from "react";
|
|
4
|
+
import { useController as K } from "react-hook-form";
|
|
5
5
|
import { useTheme as Q } from "../../../hooks/useTheme.js";
|
|
6
|
-
import { autoUpdate as
|
|
7
|
-
import { offset as
|
|
8
|
-
const
|
|
6
|
+
import { autoUpdate as X } from "../../../node_modules/@floating-ui/dom/dist/floating-ui.dom.js";
|
|
7
|
+
import { offset as Z, flip as ee, shift as te, size as se, arrow as re } from "../../../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js";
|
|
8
|
+
const me = ({
|
|
9
9
|
options: c,
|
|
10
|
-
name:
|
|
10
|
+
name: i,
|
|
11
11
|
control: p,
|
|
12
|
-
label:
|
|
12
|
+
label: d = "",
|
|
13
13
|
placeholder: m = "Type to search...",
|
|
14
|
-
className:
|
|
15
|
-
input:
|
|
14
|
+
className: n = "",
|
|
15
|
+
input: x = !0,
|
|
16
16
|
dropdownStyle: f = {},
|
|
17
|
-
innerClassName:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
17
|
+
innerClassName: h = "",
|
|
18
|
+
showChevron: g = !0,
|
|
19
|
+
size: b = "base"
|
|
20
|
+
}) => {
|
|
21
|
+
const {
|
|
22
|
+
field: { value: y, onChange: o },
|
|
23
|
+
fieldState: { error: s }
|
|
24
|
+
} = K({ name: i, control: p });
|
|
25
|
+
return /* @__PURE__ */ t.jsx(
|
|
26
|
+
ne,
|
|
27
|
+
{
|
|
28
|
+
options: c,
|
|
29
|
+
value: y,
|
|
30
|
+
onChange: o,
|
|
31
|
+
label: d,
|
|
32
|
+
placeholder: m,
|
|
33
|
+
error: s == null ? void 0 : s.message,
|
|
34
|
+
className: n,
|
|
35
|
+
input: x,
|
|
36
|
+
dropdownStyle: f,
|
|
37
|
+
innerClassName: h,
|
|
38
|
+
showChevron: g,
|
|
39
|
+
size: b
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
}, ne = ({
|
|
40
43
|
options: c,
|
|
41
|
-
value:
|
|
44
|
+
value: i,
|
|
42
45
|
onChange: p,
|
|
43
|
-
label:
|
|
46
|
+
label: d = "Select an option",
|
|
44
47
|
placeholder: m = "Type to search...",
|
|
45
|
-
error:
|
|
46
|
-
input:
|
|
48
|
+
error: n,
|
|
49
|
+
input: x = !0,
|
|
47
50
|
className: f = "",
|
|
48
|
-
dropdownStyle:
|
|
49
|
-
innerClassName:
|
|
51
|
+
dropdownStyle: h = {},
|
|
52
|
+
innerClassName: g = "",
|
|
53
|
+
showChevron: b = !0,
|
|
54
|
+
size: y = "base"
|
|
50
55
|
}) => {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
56
|
+
var T;
|
|
57
|
+
const { t: o } = Q(), [s, j] = $(!1), [v, C] = $(""), [l, S] = $(i || null), w = z(null), O = z(null), r = {
|
|
58
|
+
sm: {
|
|
59
|
+
container: "px-16 py-8",
|
|
60
|
+
text: "text-sm",
|
|
61
|
+
label: "text-sm",
|
|
62
|
+
error: "text-sm",
|
|
63
|
+
gap: "gap-8",
|
|
64
|
+
icon: "w-12 h-12"
|
|
65
|
+
},
|
|
66
|
+
base: {
|
|
67
|
+
container: "p-16",
|
|
68
|
+
text: "text-body-m",
|
|
69
|
+
label: "text-14",
|
|
70
|
+
error: "text-sm",
|
|
71
|
+
gap: "gap-8",
|
|
72
|
+
icon: "w-16 h-16"
|
|
73
|
+
}
|
|
74
|
+
}[y], { x: I, y: R, strategy: F, refs: N, context: k } = U({
|
|
54
75
|
open: s,
|
|
55
|
-
onOpenChange:
|
|
76
|
+
onOpenChange: j,
|
|
56
77
|
middleware: [
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
apply({ availableHeight:
|
|
62
|
-
Object.assign(
|
|
63
|
-
maxHeight: `${Math.min(
|
|
78
|
+
Z(8),
|
|
79
|
+
ee(),
|
|
80
|
+
te({ padding: 8 }),
|
|
81
|
+
se({
|
|
82
|
+
apply({ availableHeight: e, elements: a }) {
|
|
83
|
+
Object.assign(a.floating.style, {
|
|
84
|
+
maxHeight: `${Math.min(e - 10, 300)}px`
|
|
64
85
|
});
|
|
65
86
|
},
|
|
66
87
|
padding: 8
|
|
67
88
|
}),
|
|
68
|
-
|
|
89
|
+
re({ element: O })
|
|
69
90
|
],
|
|
70
91
|
placement: "bottom-start",
|
|
71
|
-
whileElementsMounted:
|
|
72
|
-
}),
|
|
73
|
-
O,
|
|
74
|
-
P
|
|
75
|
-
]), { isMounted: F, styles: I } = G(v, {
|
|
92
|
+
whileElementsMounted: X
|
|
93
|
+
}), M = Y(k), P = _(k), { getReferenceProps: E, getFloatingProps: W } = q([M, P]), { isMounted: A, styles: B } = G(k, {
|
|
76
94
|
duration: { open: 200, close: 150 },
|
|
77
95
|
initial: { opacity: 0, transform: "translateY(-4px)" }
|
|
78
|
-
}),
|
|
79
|
-
const
|
|
80
|
-
if (!
|
|
81
|
-
const
|
|
82
|
-
return
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
return (t = k.current) == null ? void 0 : t.focus();
|
|
96
|
+
}), L = (() => {
|
|
97
|
+
const e = Array.isArray(c) ? c : [];
|
|
98
|
+
if (!v.trim()) return e;
|
|
99
|
+
const a = v.toLowerCase();
|
|
100
|
+
return e.filter(
|
|
101
|
+
(u) => u.label.toLowerCase().includes(a) || u.key.toLowerCase().includes(a)
|
|
102
|
+
);
|
|
103
|
+
})(), D = (e) => {
|
|
104
|
+
S(e), j(!1), C(""), p(e);
|
|
105
|
+
}, V = () => {
|
|
106
|
+
j(!s), !s && w.current && setTimeout(() => {
|
|
107
|
+
var e;
|
|
108
|
+
return (e = w.current) == null ? void 0 : e.focus();
|
|
92
109
|
}, 100);
|
|
93
110
|
};
|
|
94
111
|
J(() => {
|
|
95
|
-
|
|
96
|
-
}, [
|
|
97
|
-
const
|
|
98
|
-
onClick:
|
|
99
|
-
})
|
|
100
|
-
return /* @__PURE__ */
|
|
101
|
-
/* @__PURE__ */
|
|
102
|
-
|
|
103
|
-
{
|
|
104
|
-
className: `text-gray-600 font-600 group ${r ? "!text-red-500" : ""} text-label`,
|
|
105
|
-
children: x
|
|
106
|
-
}
|
|
107
|
-
),
|
|
108
|
-
/* @__PURE__ */ e.jsxs(
|
|
112
|
+
S(i);
|
|
113
|
+
}, [i]);
|
|
114
|
+
const H = E({
|
|
115
|
+
onClick: V
|
|
116
|
+
});
|
|
117
|
+
return /* @__PURE__ */ t.jsxs("div", { className: `relative flex flex-col ${r.gap} ${f}`, children: [
|
|
118
|
+
d && /* @__PURE__ */ t.jsx("h6", { className: `text-gray-600 font-600 ${n ? "!text-red-500" : ""} ${r.label}`, children: d }),
|
|
119
|
+
/* @__PURE__ */ t.jsxs(
|
|
109
120
|
"div",
|
|
110
121
|
{
|
|
111
|
-
ref:
|
|
112
|
-
className: `${
|
|
113
|
-
|
|
114
|
-
${
|
|
115
|
-
|
|
122
|
+
ref: N.setReference,
|
|
123
|
+
className: `${g} flex items-center justify-between bg-light rounded-full border transition-all duration-200
|
|
124
|
+
${r.container} cursor-pointer hover:border-blue-400
|
|
125
|
+
${n ? "border-red-500 hover:border-red-600" : ""}
|
|
126
|
+
${s ? "border-blue-400" : "border-blue-100"}`,
|
|
127
|
+
...H,
|
|
116
128
|
children: [
|
|
117
|
-
|
|
118
|
-
/* @__PURE__ */
|
|
129
|
+
/* @__PURE__ */ t.jsx("div", { className: "flex items-center w-full overflow-hidden", children: /* @__PURE__ */ t.jsx("span", { className: `flex-grow font-600 truncate ${r.text} ${l ? "" : "text-gray-400"}`, children: o(l ? l.label : m) }) }),
|
|
130
|
+
b && /* @__PURE__ */ t.jsx(
|
|
119
131
|
"svg",
|
|
120
132
|
{
|
|
121
|
-
className:
|
|
133
|
+
className: `${r.icon} transition-transform ${s ? "rotate-180" : ""}`,
|
|
122
134
|
fill: "none",
|
|
123
135
|
stroke: "currentColor",
|
|
124
136
|
viewBox: "0 0 24 24",
|
|
125
|
-
children: /* @__PURE__ */
|
|
126
|
-
"path",
|
|
127
|
-
{
|
|
128
|
-
strokeLinecap: "round",
|
|
129
|
-
strokeLinejoin: "round",
|
|
130
|
-
strokeWidth: "2",
|
|
131
|
-
d: "M19 9l-7 7-7-7"
|
|
132
|
-
}
|
|
133
|
-
)
|
|
137
|
+
children: /* @__PURE__ */ t.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M19 9l-7 7-7-7" })
|
|
134
138
|
}
|
|
135
139
|
)
|
|
136
140
|
]
|
|
137
141
|
}
|
|
138
142
|
),
|
|
139
|
-
|
|
140
|
-
|
|
143
|
+
n && /* @__PURE__ */ t.jsx("p", { className: `font-500 text-red-500 leading-none ${r.error}`, children: n }),
|
|
144
|
+
A && /* @__PURE__ */ t.jsxs(
|
|
141
145
|
"div",
|
|
142
146
|
{
|
|
143
|
-
ref:
|
|
147
|
+
ref: N.setFloating,
|
|
144
148
|
style: {
|
|
145
|
-
position:
|
|
146
|
-
top:
|
|
147
|
-
left:
|
|
148
|
-
...
|
|
149
|
-
width:
|
|
149
|
+
position: F,
|
|
150
|
+
top: R ?? 0,
|
|
151
|
+
left: I ?? 0,
|
|
152
|
+
...B,
|
|
153
|
+
width: (T = N.reference.current) == null ? void 0 : T.clientWidth,
|
|
150
154
|
zIndex: 50,
|
|
151
|
-
...
|
|
155
|
+
...h
|
|
152
156
|
},
|
|
153
157
|
className: "bg-white border border-blue-400 rounded-3xl shadow-lg overflow-hidden",
|
|
154
|
-
...
|
|
158
|
+
...W(),
|
|
155
159
|
children: [
|
|
156
|
-
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
-
/* @__PURE__ */
|
|
160
|
+
x && /* @__PURE__ */ t.jsx("div", { className: "sticky top-0 bg-white p-8 border-b border-gray-100 z-20", children: /* @__PURE__ */ t.jsxs("div", { className: "relative", children: [
|
|
161
|
+
/* @__PURE__ */ t.jsx("div", { className: "absolute inset-y-0 left-0 pl-12 flex items-center pointer-events-none", children: /* @__PURE__ */ t.jsx("svg", { className: "h-16 w-16 text-gray-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ t.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" }) }) }),
|
|
162
|
+
/* @__PURE__ */ t.jsx(
|
|
159
163
|
"input",
|
|
160
164
|
{
|
|
161
|
-
ref:
|
|
165
|
+
ref: w,
|
|
162
166
|
type: "text",
|
|
163
167
|
className: "w-full py-8 pl-40 pr-12 rounded-full focus:outline-none text-body-s",
|
|
164
|
-
placeholder:
|
|
165
|
-
value:
|
|
166
|
-
onChange: (
|
|
167
|
-
onClick: (
|
|
168
|
+
placeholder: o("search_options"),
|
|
169
|
+
value: v,
|
|
170
|
+
onChange: (e) => C(e.target.value),
|
|
171
|
+
onClick: (e) => e.stopPropagation(),
|
|
168
172
|
autoFocus: !0
|
|
169
173
|
}
|
|
170
|
-
),
|
|
171
|
-
a && /* @__PURE__ */ e.jsx(
|
|
172
|
-
"button",
|
|
173
|
-
{
|
|
174
|
-
className: "absolute inset-y-0 right-0 pr-12 flex items-center",
|
|
175
|
-
onClick: (t) => {
|
|
176
|
-
t.stopPropagation(), j("");
|
|
177
|
-
},
|
|
178
|
-
children: /* @__PURE__ */ e.jsx("svg", { className: "h-16 w-16 text-gray-400 hover:text-gray-600", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" }) })
|
|
179
|
-
}
|
|
180
174
|
)
|
|
181
175
|
] }) }),
|
|
182
|
-
/* @__PURE__ */
|
|
176
|
+
/* @__PURE__ */ t.jsx("div", { className: "max-h-[250px] overflow-y-auto", children: L.length > 0 ? /* @__PURE__ */ t.jsx("ul", { className: "py-4", children: L.map((e, a) => /* @__PURE__ */ t.jsx(
|
|
183
177
|
"li",
|
|
184
178
|
{
|
|
185
|
-
className: `flex items-center px-16 py-10 transition-all duration-200 hover:bg-blue-50 cursor-pointer
|
|
179
|
+
className: `flex items-center px-16 py-10 transition-all duration-200 hover:bg-blue-50 cursor-pointer
|
|
180
|
+
${(l == null ? void 0 : l.key) === e.key ? "bg-blue-100/30 text-blue-500 font-medium" : ""}`,
|
|
186
181
|
onClick: (u) => {
|
|
187
|
-
u.stopPropagation(),
|
|
182
|
+
u.stopPropagation(), D(e);
|
|
188
183
|
},
|
|
189
|
-
children: /* @__PURE__ */
|
|
184
|
+
children: /* @__PURE__ */ t.jsx("span", { className: r.text, children: typeof e.label == "string" ? o(e.label) : e.expandedLabel || e.label })
|
|
190
185
|
},
|
|
191
|
-
`${
|
|
192
|
-
)) }) : /* @__PURE__ */
|
|
193
|
-
/* @__PURE__ */ e.jsx("svg", { className: "mx-auto h-24 w-24 text-gray-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M9.172 16.172a4 4 0 015.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) }),
|
|
194
|
-
/* @__PURE__ */ e.jsxs("p", { className: "mt-8 text-body-s", children: [
|
|
195
|
-
'No matches found for "',
|
|
196
|
-
a,
|
|
197
|
-
'"'
|
|
198
|
-
] })
|
|
199
|
-
] }) })
|
|
186
|
+
`${e.key}-${a}`
|
|
187
|
+
)) }) : /* @__PURE__ */ t.jsx("div", { className: "px-16 py-16 text-center text-gray-500", children: /* @__PURE__ */ t.jsx("p", { className: "text-body-s", children: "No matches found" }) }) })
|
|
200
188
|
]
|
|
201
189
|
}
|
|
202
190
|
)
|
|
203
191
|
] });
|
|
204
192
|
};
|
|
205
193
|
export {
|
|
206
|
-
|
|
194
|
+
me as default
|
|
207
195
|
};
|
|
@@ -14,6 +14,8 @@ export interface SelectInputProps<T extends FieldValues> {
|
|
|
14
14
|
className?: string;
|
|
15
15
|
innerClassName?: string;
|
|
16
16
|
dropdownStyle?: React.CSSProperties;
|
|
17
|
+
showChevron?: boolean;
|
|
18
|
+
size?: 'sm' | 'base';
|
|
17
19
|
}
|
|
18
20
|
export interface SelectInputFieldProps {
|
|
19
21
|
options: Option[];
|
|
@@ -26,4 +28,6 @@ export interface SelectInputFieldProps {
|
|
|
26
28
|
className?: string;
|
|
27
29
|
innerClassName?: string;
|
|
28
30
|
dropdownStyle?: React.CSSProperties;
|
|
31
|
+
showChevron?: boolean;
|
|
32
|
+
size?: 'sm' | 'base';
|
|
29
33
|
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { j as o } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { resolveStepperColors as j } from "../../molecules/Stepper/Stepper.styles.js";
|
|
3
|
+
import { faCheck as y } from "../../../node_modules/@fortawesome/free-solid-svg-icons/index.js";
|
|
4
|
+
import { FontAwesomeIcon as g } from "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
|
|
5
|
+
import { motion as i } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/render/components/motion/proxy.js";
|
|
6
|
+
import { AnimatePresence as I } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/components/AnimatePresence/index.js";
|
|
7
|
+
const w = ({
|
|
8
|
+
status: n,
|
|
9
|
+
shouldAnimate: e,
|
|
10
|
+
color: r,
|
|
11
|
+
index: s,
|
|
12
|
+
sizeClass: a
|
|
13
|
+
}) => {
|
|
14
|
+
const t = n === "done", c = n === "focus", {
|
|
15
|
+
focusIconColor: l,
|
|
16
|
+
completedIconColor: m,
|
|
17
|
+
pendingIconColor: p,
|
|
18
|
+
focusBgColor: d,
|
|
19
|
+
completedBgColor: f,
|
|
20
|
+
pendingBgColor: x
|
|
21
|
+
} = j(r), u = t ? m : c ? l : p, C = t ? f : c ? d : x;
|
|
22
|
+
return /* @__PURE__ */ o.jsx(
|
|
23
|
+
i.div,
|
|
24
|
+
{
|
|
25
|
+
animate: { backgroundColor: C },
|
|
26
|
+
transition: { duration: e ? 0.3 : 0, ease: "easeOut" },
|
|
27
|
+
className: `size-[35px] rounded-full flex items-center justify-center font-bold text-sm ${a} ${u}`,
|
|
28
|
+
children: /* @__PURE__ */ o.jsx(I, { mode: "wait", children: t ? /* @__PURE__ */ o.jsx(
|
|
29
|
+
i.div,
|
|
30
|
+
{
|
|
31
|
+
initial: e ? { opacity: 0, scale: 0.5 } : { opacity: 1 },
|
|
32
|
+
animate: { opacity: 1, scale: 1 },
|
|
33
|
+
exit: { opacity: 0, scale: 0.5 },
|
|
34
|
+
className: "flex items-center justify-center",
|
|
35
|
+
children: /* @__PURE__ */ o.jsx(
|
|
36
|
+
g,
|
|
37
|
+
{
|
|
38
|
+
icon: y
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
},
|
|
42
|
+
"check"
|
|
43
|
+
) : /* @__PURE__ */ o.jsx(
|
|
44
|
+
i.div,
|
|
45
|
+
{
|
|
46
|
+
initial: e ? { opacity: 0 } : { opacity: 1 },
|
|
47
|
+
animate: { opacity: 1 },
|
|
48
|
+
className: "leading-none flex items-center justify-center",
|
|
49
|
+
children: s + 1
|
|
50
|
+
},
|
|
51
|
+
"number"
|
|
52
|
+
) })
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
};
|
|
56
|
+
export {
|
|
57
|
+
w as default
|
|
58
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as StepIndicator } from './StepIndicator';
|