bianic-ui 2.13.0 → 2.14.0-alpha.1
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 +49 -49
- package/dist/cjs/Empty.svg +12 -12
- package/dist/cjs/font/SansCode/README.txt +88 -88
- package/dist/cjs/index.js +1148 -948
- package/dist/cjs/lib.css +1 -1
- package/dist/cjs/types/components/Alert/Alert.d.ts +1 -12
- package/dist/cjs/types/components/Badge/Badge.d.ts +3 -10
- package/dist/cjs/types/components/Badge/MonospaceBadge.d.ts +1 -1
- package/dist/cjs/types/components/Banner/index.d.ts +0 -6
- package/dist/cjs/types/components/Breadcrumb/Breadcrumb.d.ts +1 -7
- package/dist/cjs/types/components/Button/ButtonApp.d.ts +2 -3
- package/dist/cjs/types/components/Button/ButtonSimulaiton.d.ts +1 -8
- package/dist/cjs/types/components/Button/NavButton/NavButton.d.ts +9 -0
- package/dist/cjs/types/components/Button/NavButton/index.d.ts +1 -0
- package/dist/cjs/types/components/Button/buttonAppConfigs.d.ts +2 -1
- package/dist/cjs/types/components/Button/index.d.ts +1 -0
- package/dist/cjs/types/components/Card/index.d.ts +1 -1
- package/dist/cjs/types/components/Divider/Divider.d.ts +1 -8
- package/dist/cjs/types/components/FileTree/FileTreeSimulation.d.ts +1 -1
- package/dist/cjs/types/components/FileTree/TreeItem.d.ts +9 -8
- package/dist/cjs/types/components/FileTree/index.d.ts +1 -1
- package/dist/cjs/types/components/FileTree/types.d.ts +13 -0
- package/dist/cjs/types/components/FileTree/useFileTree.d.ts +6 -10
- package/dist/cjs/types/components/Forms/Checkbox/Simulation.d.ts +0 -5
- package/dist/cjs/types/components/Forms/Checkbox/index.d.ts +1 -10
- package/dist/cjs/types/components/Forms/DatePicker/DatePickerLimitSimulation.d.ts +1 -1
- package/dist/cjs/types/components/Forms/DatePicker/DatePickerSimulation.d.ts +1 -1
- package/dist/cjs/types/components/Forms/DatePicker/PickerCalendar/components/DateDisplay.d.ts +1 -1
- package/dist/cjs/types/components/Forms/DatePicker/PickerCalendar/components/MonthDisplay.d.ts +1 -1
- package/dist/cjs/types/components/Forms/DatePicker/PickerCalendar/components/PickerContent.d.ts +1 -1
- package/dist/cjs/types/components/Forms/DatePicker/PickerCalendar/components/PickerHeader.d.ts +1 -1
- package/dist/cjs/types/components/Forms/DatePicker/PickerCalendar/components/RangePicker.d.ts +1 -1
- package/dist/cjs/types/components/Forms/DatePicker/PickerCalendar/components/SinglePicker.d.ts +1 -1
- package/dist/cjs/types/components/Forms/DatePicker/PickerCalendar/components/YearDisplay.d.ts +1 -1
- package/dist/cjs/types/components/Forms/DatePicker/PickerCalendar/components/index.d.ts +3 -3
- package/dist/cjs/types/components/Forms/DatePicker/PickerCalendar/hooks/useCalendarLogic.d.ts +2 -1
- package/dist/cjs/types/components/Forms/DatePicker/PickerCalendar/hooks/useYearLogic.d.ts +2 -1
- package/dist/cjs/types/components/Forms/DatePicker/RangeDatePickerSimulation.d.ts +1 -1
- package/dist/cjs/types/components/Forms/DatePicker/YearPicker.d.ts +1 -1
- package/dist/cjs/types/components/Forms/Dropdown/DropdownContainer.d.ts +4 -4
- package/dist/cjs/types/components/Forms/Dropdown/DropdownItem.d.ts +4 -12
- package/dist/cjs/types/components/Forms/Dropdown/types.d.ts +7 -0
- package/dist/cjs/types/components/Forms/DropdownItem/Custom.d.ts +0 -10
- package/dist/cjs/types/components/Forms/DropdownItem/Default.d.ts +0 -10
- package/dist/cjs/types/components/Forms/FileUploader/DropzoneFileUploader.d.ts +2 -2
- package/dist/cjs/types/components/Forms/FileUploader/SimpleFileUploader.d.ts +4 -7
- package/dist/cjs/types/components/Forms/Group/FormGroup.d.ts +1 -1
- package/dist/cjs/types/components/Forms/Group/FormGroupButton.d.ts +1 -1
- package/dist/cjs/types/components/Forms/Group/FormGroupLabel.d.ts +1 -1
- package/dist/cjs/types/components/Forms/Group/Simulation.d.ts +1 -1
- package/dist/cjs/types/components/Forms/Group/configs.d.ts +2 -1
- package/dist/cjs/types/components/Forms/Label/FormLabel.d.ts +1 -11
- package/dist/cjs/types/components/Forms/Label/FormLabelSimulation.d.ts +1 -1
- package/dist/cjs/types/components/Forms/LiveSearch/Example/CustomDropdown.d.ts +1 -1
- package/dist/cjs/types/components/Forms/LiveSearch/Example/OutsideControl.d.ts +1 -1
- package/dist/cjs/types/components/Forms/LiveSearch/Example/OverflowContainerTest.d.ts +1 -1
- package/dist/cjs/types/components/Forms/LiveSearch/hooks/useLiveSearch.d.ts +4 -2
- package/dist/cjs/types/components/Forms/LiveSearch/index.d.ts +0 -15
- package/dist/cjs/types/components/Forms/LiveSearch/types/index.d.ts +9 -8
- package/dist/cjs/types/components/Forms/LiveSearch/utils/dropdownUtils.d.ts +4 -4
- package/dist/cjs/types/components/Forms/LiveSearch/utils/searchUtils.d.ts +2 -1
- package/dist/cjs/types/components/Forms/SegmentButton/SegmentButtonItem.d.ts +1 -1
- package/dist/cjs/types/components/Forms/SelectInput/Example/CustomDropdown.d.ts +1 -1
- package/dist/cjs/types/components/Forms/SelectInput/ObjectOptionItem.d.ts +3 -2
- package/dist/cjs/types/components/Forms/SelectInput/PropsInterface.d.ts +4 -5
- package/dist/cjs/types/components/Forms/SelectInput/index.d.ts +0 -12
- package/dist/cjs/types/components/Forms/TagLabelInput/hooks/useLiveSearch.d.ts +10 -3
- package/dist/cjs/types/components/Forms/TagLabelInput/index.d.ts +2 -10
- package/dist/cjs/types/components/Forms/TagLabelInput/types.d.ts +12 -0
- package/dist/cjs/types/components/Forms/TagLabelInput/utils/dropdownUtils.d.ts +4 -4
- package/dist/cjs/types/components/Forms/TextArea/ResizeIcon.d.ts +1 -1
- package/dist/cjs/types/components/Forms/TextArea/Simulation.d.ts +0 -5
- package/dist/cjs/types/components/Forms/TextInput/Simulation.d.ts +2 -2
- package/dist/cjs/types/components/Forms/Toggle/configs.d.ts +13 -2
- package/dist/cjs/types/components/Forms/Toggle/index.d.ts +1 -11
- package/dist/cjs/types/components/Icons/AlertRoundedSquare.d.ts +1 -1
- package/dist/cjs/types/components/Icons/CubeHeader.d.ts +1 -1
- package/dist/cjs/types/components/Icons/Discrepancy.d.ts +1 -1
- package/dist/cjs/types/components/Icons/ExposedPort.d.ts +1 -1
- package/dist/cjs/types/components/Icons/FQAnalytical.d.ts +1 -1
- package/dist/cjs/types/components/Icons/FQGetaway.d.ts +1 -1
- package/dist/cjs/types/components/Icons/FQModeler.d.ts +1 -1
- package/dist/cjs/types/components/Icons/FQOperation.d.ts +1 -1
- package/dist/cjs/types/components/Icons/FQWelldone.d.ts +1 -1
- package/dist/cjs/types/components/Icons/Flowqount.d.ts +1 -1
- package/dist/cjs/types/components/Icons/Inlet.d.ts +1 -1
- package/dist/cjs/types/components/Icons/Legend.d.ts +1 -1
- package/dist/cjs/types/components/Icons/ModelBalance.d.ts +1 -1
- package/dist/cjs/types/components/Icons/Neutral.d.ts +1 -1
- package/dist/cjs/types/components/Icons/Node.d.ts +1 -1
- package/dist/cjs/types/components/Icons/Outlet.d.ts +1 -1
- package/dist/cjs/types/components/Icons/Port.d.ts +1 -1
- package/dist/cjs/types/components/Icons/Rhombus.d.ts +1 -1
- package/dist/cjs/types/components/Icons/SelectAllAdd.d.ts +1 -1
- package/dist/cjs/types/components/Icons/SelectAllRemove.d.ts +1 -1
- package/dist/cjs/types/components/Icons/Spinner.d.ts +1 -1
- package/dist/cjs/types/components/Icons/Stack.d.ts +1 -1
- package/dist/cjs/types/components/Icons/Unlinked.d.ts +1 -1
- package/dist/cjs/types/components/Icons/VirtualPort.d.ts +1 -1
- package/dist/cjs/types/components/InfoPanel/index.d.ts +2 -10
- package/dist/cjs/types/components/Menu/Example/BasicExample.d.ts +1 -1
- package/dist/cjs/types/components/Menu/Example/NestedExample.d.ts +1 -12
- package/dist/cjs/types/components/Menu/MenuContainer.d.ts +1 -6
- package/dist/cjs/types/components/Menu/MenuItem.d.ts +0 -6
- package/dist/cjs/types/components/Modal/ModalAction.d.ts +0 -5
- package/dist/cjs/types/components/Modal/ModalContent.d.ts +0 -5
- package/dist/cjs/types/components/Notification/index.d.ts +1 -1
- package/dist/cjs/types/components/PaginationBar/SelectedPage.d.ts +1 -1
- package/dist/cjs/types/components/Popover/index.d.ts +1 -7
- package/dist/cjs/types/components/Progress/Bar/Spinner/index.d.ts +1 -1
- package/dist/cjs/types/components/ResizeableDiv/Simulation.d.ts +0 -5
- package/dist/cjs/types/components/ResizeableDiv/SimulationZIndex.d.ts +0 -5
- package/dist/cjs/types/components/ResizeableDiv/index.d.ts +1 -6
- package/dist/cjs/types/components/Sidebar/SidebarItem.d.ts +1 -1
- package/dist/cjs/types/components/Sidebar/SidebarMenu.d.ts +2 -2
- package/dist/cjs/types/components/Snippet/ContextualButtonsTable.d.ts +1 -1
- package/dist/cjs/types/components/Stepper/Horizontal/Navbar.d.ts +4 -0
- package/dist/cjs/types/components/Stepper/Horizontal/Standard.d.ts +4 -0
- package/dist/cjs/types/components/Stepper/Horizontal/configs.d.ts +6 -0
- package/dist/cjs/types/components/Stepper/Horizontal/index.d.ts +3 -20
- package/dist/cjs/types/components/Stepper/Horizontal/types.d.ts +32 -0
- package/dist/cjs/types/components/Stepper/Vertical/index.d.ts +1 -1
- package/dist/cjs/types/components/Stepper/index.d.ts +1 -0
- package/dist/cjs/types/components/Tab/CardTab.d.ts +1 -1
- package/dist/cjs/types/components/Tab/CardTabDemo.d.ts +1 -1
- package/dist/cjs/types/components/Tab/TabBody.d.ts +1 -8
- package/dist/cjs/types/components/Tab/TabContent.d.ts +1 -7
- package/dist/cjs/types/components/Tab/TabContentVertical.d.ts +1 -7
- package/dist/cjs/types/components/Tab/TabHead.d.ts +1 -11
- package/dist/cjs/types/components/Tab/TabList.d.ts +1 -7
- package/dist/cjs/types/components/TabMenu/TabMenuSimulation.d.ts +1 -1
- package/dist/cjs/types/components/Table/Table.d.ts +3 -4
- package/dist/cjs/types/components/Table/TableBody.d.ts +3 -4
- package/dist/cjs/types/components/Table/TableCell/TableTestSample.d.ts +0 -5
- package/dist/cjs/types/components/Table/TableCell/index.d.ts +0 -7
- package/dist/cjs/types/components/Table/TableHead.d.ts +3 -4
- package/dist/cjs/types/components/Table/TableRow/index.d.ts +1 -1
- package/dist/cjs/types/components/Table/TableUtility/BlockLoading.d.ts +1 -1
- package/dist/cjs/types/components/Table/TableUtility/EmptyTable.d.ts +1 -1
- package/dist/cjs/types/components/Table/TableUtility/TableFooterController.d.ts +3 -4
- package/dist/cjs/types/components/Table/TableUtility/TableHeaderController.d.ts +1 -1
- package/dist/cjs/types/components/Table/TableUtility/TableSearchInput.d.ts +4 -5
- package/dist/cjs/types/components/TagLabel/TagLabelBlockSimulation.d.ts +3 -10
- package/dist/cjs/types/components/TagLabel/index.d.ts +1 -18
- package/dist/cjs/types/components/Toaster/configs.d.ts +2 -1
- package/dist/cjs/types/components/Tooltip/Simulation.d.ts +0 -11
- package/dist/cjs/types/components/Tooltip/index.d.ts +0 -11
- package/dist/cjs/types/components/Typography/Heading.d.ts +0 -6
- package/dist/cjs/types/components/Typography/P.d.ts +0 -6
- package/dist/cjs/types/components/Typography/Text/Link.d.ts +0 -5
- package/dist/cjs/types/components/Typography/Text/index.d.ts +1 -6
- package/dist/cjs/types/components/Window/index.d.ts +1 -1
- package/dist/cjs/types/components/Window/windowDemo.d.ts +1 -1
- package/dist/cjs/types/components/index.d.ts +4 -2
- package/dist/cjs/types/stories/Badge/MonospaceBadge.stories.d.ts +64 -0
- package/dist/cjs/types/stories/Button/Button.test.stories.d.ts +24 -0
- package/dist/cjs/types/stories/Button/ButtonApp.stories.d.ts +6 -0
- package/dist/cjs/types/stories/Button/NavButton.stories.d.ts +54 -0
- package/dist/cjs/types/stories/Card/Card.stories.d.ts +2 -1
- package/dist/cjs/types/stories/FileTree/FileTree.stories.d.ts +2 -2
- package/dist/cjs/types/stories/FileTree/FileTreeContextMenu.stories.d.ts +2 -3
- package/dist/cjs/types/stories/FileTree/FileTreeSimulation.stories.d.ts +2 -1
- package/dist/cjs/types/stories/Form/DatePicker/DatepickerLimitSimulation.stories.d.ts +2 -1
- package/dist/cjs/types/stories/Form/DatePicker/DatepickerSimulation.stories.d.ts +2 -1
- package/dist/cjs/types/stories/Form/DatePicker/RangeDatepickerSimulation.stories.d.ts +2 -1
- package/dist/cjs/types/stories/Form/DatePicker/YearPicker.stories.d.ts +28 -0
- package/dist/cjs/types/stories/Form/Dropdown/DropdownContainer.stories.d.ts +2 -6
- package/dist/cjs/types/stories/Form/Dropdown/DropdownContainer.test.stories.d.ts +28 -0
- package/dist/cjs/types/stories/Form/FileUploader/SimpleFileUploader.stories.d.ts +1 -0
- package/dist/cjs/types/stories/Form/Group/Group.stories.d.ts +295 -0
- package/dist/cjs/types/stories/Form/Group/GroupButton.stories.d.ts +2 -1
- package/dist/cjs/types/stories/Form/Group/GroupLabel.stories.d.ts +26 -0
- package/dist/cjs/types/stories/Form/Group/SampleTest.stories.d.ts +2 -1
- package/dist/cjs/types/stories/Form/Label/FormLabel.stories.d.ts +2 -1
- package/dist/cjs/types/stories/Form/Label/Label.stories.d.ts +2 -11
- package/dist/cjs/types/stories/Form/LiveSearch/Livesearch.test.stories.d.ts +27 -0
- package/dist/cjs/types/stories/Form/LiveSearch/LivesearchCustomDropdownExample.stories.d.ts +2 -3
- package/dist/cjs/types/stories/Form/LiveSearch/LivesearchOverflowTest.stories.d.ts +2 -1
- package/dist/cjs/types/stories/Form/LiveSearch/OutsideControlSimulation.stories.d.ts +2 -2
- package/dist/cjs/types/stories/Form/SelectInput/SelectInputCustom.stories.d.ts +2 -1
- package/dist/cjs/types/stories/Form/TextInput/TextInputSimulation.stories.d.ts +2 -1
- package/dist/cjs/types/stories/Form/TextInput/TransparentTextInputSimulation.stories.d.ts +13 -0
- package/dist/cjs/types/stories/HorizontalStepper/HorizontalStepper.stories.d.ts +126 -4
- package/dist/cjs/types/stories/HorizontalStepper/HorizontalStepper.test.stories.d.ts +67 -0
- package/dist/cjs/types/stories/Icons/AlertRoundedSquare.stories.d.ts +2 -2
- package/dist/cjs/types/stories/Icons/CubeHeader.stories.d.ts +2 -2
- package/dist/cjs/types/stories/Icons/Discrepancy.stories.d.ts +2 -2
- package/dist/cjs/types/stories/Icons/ExposedPort.stories.d.ts +2 -2
- package/dist/cjs/types/stories/Icons/FQAnalytical.stories.d.ts +2 -2
- package/dist/cjs/types/stories/Icons/FQGetaway.stories.d.ts +2 -2
- package/dist/cjs/types/stories/Icons/FQModeler.stories.d.ts +2 -2
- package/dist/cjs/types/stories/Icons/FQOperation.stories.d.ts +2 -2
- package/dist/cjs/types/stories/Icons/FQWelldone.stories.d.ts +2 -2
- package/dist/cjs/types/stories/Icons/Flowqount.stories.d.ts +2 -2
- package/dist/cjs/types/stories/Icons/Inlet.stories.d.ts +2 -2
- package/dist/cjs/types/stories/Icons/Legend.stories.d.ts +2 -2
- package/dist/cjs/types/stories/Icons/ModalBalance.stories.d.ts +2 -2
- package/dist/cjs/types/stories/Icons/Neutral.stories.d.ts +2 -1
- package/dist/cjs/types/stories/Icons/Node.stories.d.ts +2 -2
- package/dist/cjs/types/stories/Icons/Outlet.stories.d.ts +2 -2
- package/dist/cjs/types/stories/Icons/Port.stories.d.ts +2 -2
- package/dist/cjs/types/stories/Icons/Rhombus.stories.d.ts +2 -1
- package/dist/cjs/types/stories/Icons/SelectAllAdd.stories.d.ts +2 -2
- package/dist/cjs/types/stories/Icons/SelectAllRemove.stories.d.ts +2 -2
- package/dist/cjs/types/stories/Icons/Spinner.stories.d.ts +2 -2
- package/dist/cjs/types/stories/Icons/Stack.stories.d.ts +2 -2
- package/dist/cjs/types/stories/Icons/Unlinked.stories.d.ts +2 -2
- package/dist/cjs/types/stories/Icons/VirtualPort.stories.d.ts +2 -2
- package/dist/cjs/types/stories/InfoPanel/InfoPanel.stories.d.ts +14 -0
- package/dist/cjs/types/stories/Menu/MenuContainer.stories.d.ts +13 -0
- package/dist/cjs/types/stories/Notification/Notification.stories.d.ts +13 -0
- package/dist/cjs/types/stories/Sidebar/SidebarProfile.stories.d.ts +18 -0
- package/dist/cjs/types/stories/Snippet/ContextualButtonsTable/Story.stories.d.ts +2 -1
- package/dist/cjs/types/stories/Tab/CardTab.stories.d.ts +2 -2
- package/dist/cjs/types/stories/Tab/CardTabDemo.stories.d.ts +2 -1
- package/dist/cjs/types/stories/TabMenu/TabMenuSimulation.stories.d.ts +2 -1
- package/dist/cjs/types/stories/Table/EmptyTable.stories.d.ts +13 -0
- package/dist/cjs/types/stories/Table/SearchTableInput.stories.d.ts +13 -0
- package/dist/cjs/types/stories/Table/TableFooterController.stories.d.ts +13 -0
- package/dist/cjs/types/stories/Table/TableHeaderController.stories.d.ts +13 -0
- package/dist/cjs/types/stories/TagLabel/TagLabel.stories.d.ts +24 -0
- package/dist/cjs/types/stories/TagLabel/TaglabelBlock.stories.d.ts +13 -0
- package/dist/cjs/types/stories/VerticalStepper/VerticalStepper.stories.d.ts +2 -2
- package/dist/cjs/types/stories/Window/WindowSimulation.stories.d.ts +2 -1
- package/dist/cjs/types/utility/hooks/usePopupPosition.d.ts +1 -1
- package/dist/cjs/types/utility/index.d.ts +2 -1
- package/dist/cjs/types/utility/public/words.d.ts +14 -0
- package/dist/esm/Empty.svg +12 -12
- package/dist/esm/font/SansCode/README.txt +88 -88
- package/dist/esm/index.js +1149 -950
- package/dist/esm/lib.css +1 -1
- package/dist/esm/types/components/Alert/Alert.d.ts +1 -12
- package/dist/esm/types/components/Badge/Badge.d.ts +3 -10
- package/dist/esm/types/components/Badge/MonospaceBadge.d.ts +1 -1
- package/dist/esm/types/components/Banner/index.d.ts +0 -6
- package/dist/esm/types/components/Breadcrumb/Breadcrumb.d.ts +1 -7
- package/dist/esm/types/components/Button/ButtonApp.d.ts +2 -3
- package/dist/esm/types/components/Button/ButtonSimulaiton.d.ts +1 -8
- package/dist/esm/types/components/Button/NavButton/NavButton.d.ts +9 -0
- package/dist/esm/types/components/Button/NavButton/index.d.ts +1 -0
- package/dist/esm/types/components/Button/buttonAppConfigs.d.ts +2 -1
- package/dist/esm/types/components/Button/index.d.ts +1 -0
- package/dist/esm/types/components/Card/index.d.ts +1 -1
- package/dist/esm/types/components/Divider/Divider.d.ts +1 -8
- package/dist/esm/types/components/FileTree/FileTreeSimulation.d.ts +1 -1
- package/dist/esm/types/components/FileTree/TreeItem.d.ts +9 -8
- package/dist/esm/types/components/FileTree/index.d.ts +1 -1
- package/dist/esm/types/components/FileTree/types.d.ts +13 -0
- package/dist/esm/types/components/FileTree/useFileTree.d.ts +6 -10
- package/dist/esm/types/components/Forms/Checkbox/Simulation.d.ts +0 -5
- package/dist/esm/types/components/Forms/Checkbox/index.d.ts +1 -10
- package/dist/esm/types/components/Forms/DatePicker/DatePickerLimitSimulation.d.ts +1 -1
- package/dist/esm/types/components/Forms/DatePicker/DatePickerSimulation.d.ts +1 -1
- package/dist/esm/types/components/Forms/DatePicker/PickerCalendar/components/DateDisplay.d.ts +1 -1
- package/dist/esm/types/components/Forms/DatePicker/PickerCalendar/components/MonthDisplay.d.ts +1 -1
- package/dist/esm/types/components/Forms/DatePicker/PickerCalendar/components/PickerContent.d.ts +1 -1
- package/dist/esm/types/components/Forms/DatePicker/PickerCalendar/components/PickerHeader.d.ts +1 -1
- package/dist/esm/types/components/Forms/DatePicker/PickerCalendar/components/RangePicker.d.ts +1 -1
- package/dist/esm/types/components/Forms/DatePicker/PickerCalendar/components/SinglePicker.d.ts +1 -1
- package/dist/esm/types/components/Forms/DatePicker/PickerCalendar/components/YearDisplay.d.ts +1 -1
- package/dist/esm/types/components/Forms/DatePicker/PickerCalendar/components/index.d.ts +3 -3
- package/dist/esm/types/components/Forms/DatePicker/PickerCalendar/hooks/useCalendarLogic.d.ts +2 -1
- package/dist/esm/types/components/Forms/DatePicker/PickerCalendar/hooks/useYearLogic.d.ts +2 -1
- package/dist/esm/types/components/Forms/DatePicker/RangeDatePickerSimulation.d.ts +1 -1
- package/dist/esm/types/components/Forms/DatePicker/YearPicker.d.ts +1 -1
- package/dist/esm/types/components/Forms/Dropdown/DropdownContainer.d.ts +4 -4
- package/dist/esm/types/components/Forms/Dropdown/DropdownItem.d.ts +4 -12
- package/dist/esm/types/components/Forms/Dropdown/types.d.ts +7 -0
- package/dist/esm/types/components/Forms/DropdownItem/Custom.d.ts +0 -10
- package/dist/esm/types/components/Forms/DropdownItem/Default.d.ts +0 -10
- package/dist/esm/types/components/Forms/FileUploader/DropzoneFileUploader.d.ts +2 -2
- package/dist/esm/types/components/Forms/FileUploader/SimpleFileUploader.d.ts +4 -7
- package/dist/esm/types/components/Forms/Group/FormGroup.d.ts +1 -1
- package/dist/esm/types/components/Forms/Group/FormGroupButton.d.ts +1 -1
- package/dist/esm/types/components/Forms/Group/FormGroupLabel.d.ts +1 -1
- package/dist/esm/types/components/Forms/Group/Simulation.d.ts +1 -1
- package/dist/esm/types/components/Forms/Group/configs.d.ts +2 -1
- package/dist/esm/types/components/Forms/Label/FormLabel.d.ts +1 -11
- package/dist/esm/types/components/Forms/Label/FormLabelSimulation.d.ts +1 -1
- package/dist/esm/types/components/Forms/LiveSearch/Example/CustomDropdown.d.ts +1 -1
- package/dist/esm/types/components/Forms/LiveSearch/Example/OutsideControl.d.ts +1 -1
- package/dist/esm/types/components/Forms/LiveSearch/Example/OverflowContainerTest.d.ts +1 -1
- package/dist/esm/types/components/Forms/LiveSearch/hooks/useLiveSearch.d.ts +4 -2
- package/dist/esm/types/components/Forms/LiveSearch/index.d.ts +0 -15
- package/dist/esm/types/components/Forms/LiveSearch/types/index.d.ts +9 -8
- package/dist/esm/types/components/Forms/LiveSearch/utils/dropdownUtils.d.ts +4 -4
- package/dist/esm/types/components/Forms/LiveSearch/utils/searchUtils.d.ts +2 -1
- package/dist/esm/types/components/Forms/SegmentButton/SegmentButtonItem.d.ts +1 -1
- package/dist/esm/types/components/Forms/SelectInput/Example/CustomDropdown.d.ts +1 -1
- package/dist/esm/types/components/Forms/SelectInput/ObjectOptionItem.d.ts +3 -2
- package/dist/esm/types/components/Forms/SelectInput/PropsInterface.d.ts +4 -5
- package/dist/esm/types/components/Forms/SelectInput/index.d.ts +0 -12
- package/dist/esm/types/components/Forms/TagLabelInput/hooks/useLiveSearch.d.ts +10 -3
- package/dist/esm/types/components/Forms/TagLabelInput/index.d.ts +2 -10
- package/dist/esm/types/components/Forms/TagLabelInput/types.d.ts +12 -0
- package/dist/esm/types/components/Forms/TagLabelInput/utils/dropdownUtils.d.ts +4 -4
- package/dist/esm/types/components/Forms/TextArea/ResizeIcon.d.ts +1 -1
- package/dist/esm/types/components/Forms/TextArea/Simulation.d.ts +0 -5
- package/dist/esm/types/components/Forms/TextInput/Simulation.d.ts +2 -2
- package/dist/esm/types/components/Forms/Toggle/configs.d.ts +13 -2
- package/dist/esm/types/components/Forms/Toggle/index.d.ts +1 -11
- package/dist/esm/types/components/Icons/AlertRoundedSquare.d.ts +1 -1
- package/dist/esm/types/components/Icons/CubeHeader.d.ts +1 -1
- package/dist/esm/types/components/Icons/Discrepancy.d.ts +1 -1
- package/dist/esm/types/components/Icons/ExposedPort.d.ts +1 -1
- package/dist/esm/types/components/Icons/FQAnalytical.d.ts +1 -1
- package/dist/esm/types/components/Icons/FQGetaway.d.ts +1 -1
- package/dist/esm/types/components/Icons/FQModeler.d.ts +1 -1
- package/dist/esm/types/components/Icons/FQOperation.d.ts +1 -1
- package/dist/esm/types/components/Icons/FQWelldone.d.ts +1 -1
- package/dist/esm/types/components/Icons/Flowqount.d.ts +1 -1
- package/dist/esm/types/components/Icons/Inlet.d.ts +1 -1
- package/dist/esm/types/components/Icons/Legend.d.ts +1 -1
- package/dist/esm/types/components/Icons/ModelBalance.d.ts +1 -1
- package/dist/esm/types/components/Icons/Neutral.d.ts +1 -1
- package/dist/esm/types/components/Icons/Node.d.ts +1 -1
- package/dist/esm/types/components/Icons/Outlet.d.ts +1 -1
- package/dist/esm/types/components/Icons/Port.d.ts +1 -1
- package/dist/esm/types/components/Icons/Rhombus.d.ts +1 -1
- package/dist/esm/types/components/Icons/SelectAllAdd.d.ts +1 -1
- package/dist/esm/types/components/Icons/SelectAllRemove.d.ts +1 -1
- package/dist/esm/types/components/Icons/Spinner.d.ts +1 -1
- package/dist/esm/types/components/Icons/Stack.d.ts +1 -1
- package/dist/esm/types/components/Icons/Unlinked.d.ts +1 -1
- package/dist/esm/types/components/Icons/VirtualPort.d.ts +1 -1
- package/dist/esm/types/components/InfoPanel/index.d.ts +2 -10
- package/dist/esm/types/components/Menu/Example/BasicExample.d.ts +1 -1
- package/dist/esm/types/components/Menu/Example/NestedExample.d.ts +1 -12
- package/dist/esm/types/components/Menu/MenuContainer.d.ts +1 -6
- package/dist/esm/types/components/Menu/MenuItem.d.ts +0 -6
- package/dist/esm/types/components/Modal/ModalAction.d.ts +0 -5
- package/dist/esm/types/components/Modal/ModalContent.d.ts +0 -5
- package/dist/esm/types/components/Notification/index.d.ts +1 -1
- package/dist/esm/types/components/PaginationBar/SelectedPage.d.ts +1 -1
- package/dist/esm/types/components/Popover/index.d.ts +1 -7
- package/dist/esm/types/components/Progress/Bar/Spinner/index.d.ts +1 -1
- package/dist/esm/types/components/ResizeableDiv/Simulation.d.ts +0 -5
- package/dist/esm/types/components/ResizeableDiv/SimulationZIndex.d.ts +0 -5
- package/dist/esm/types/components/ResizeableDiv/index.d.ts +1 -6
- package/dist/esm/types/components/Sidebar/SidebarItem.d.ts +1 -1
- package/dist/esm/types/components/Sidebar/SidebarMenu.d.ts +2 -2
- package/dist/esm/types/components/Snippet/ContextualButtonsTable.d.ts +1 -1
- package/dist/esm/types/components/Stepper/Horizontal/Navbar.d.ts +4 -0
- package/dist/esm/types/components/Stepper/Horizontal/Standard.d.ts +4 -0
- package/dist/esm/types/components/Stepper/Horizontal/configs.d.ts +6 -0
- package/dist/esm/types/components/Stepper/Horizontal/index.d.ts +3 -20
- package/dist/esm/types/components/Stepper/Horizontal/types.d.ts +32 -0
- package/dist/esm/types/components/Stepper/Vertical/index.d.ts +1 -1
- package/dist/esm/types/components/Stepper/index.d.ts +1 -0
- package/dist/esm/types/components/Tab/CardTab.d.ts +1 -1
- package/dist/esm/types/components/Tab/CardTabDemo.d.ts +1 -1
- package/dist/esm/types/components/Tab/TabBody.d.ts +1 -8
- package/dist/esm/types/components/Tab/TabContent.d.ts +1 -7
- package/dist/esm/types/components/Tab/TabContentVertical.d.ts +1 -7
- package/dist/esm/types/components/Tab/TabHead.d.ts +1 -11
- package/dist/esm/types/components/Tab/TabList.d.ts +1 -7
- package/dist/esm/types/components/TabMenu/TabMenuSimulation.d.ts +1 -1
- package/dist/esm/types/components/Table/Table.d.ts +3 -4
- package/dist/esm/types/components/Table/TableBody.d.ts +3 -4
- package/dist/esm/types/components/Table/TableCell/TableTestSample.d.ts +0 -5
- package/dist/esm/types/components/Table/TableCell/index.d.ts +0 -7
- package/dist/esm/types/components/Table/TableHead.d.ts +3 -4
- package/dist/esm/types/components/Table/TableRow/index.d.ts +1 -1
- package/dist/esm/types/components/Table/TableUtility/BlockLoading.d.ts +1 -1
- package/dist/esm/types/components/Table/TableUtility/EmptyTable.d.ts +1 -1
- package/dist/esm/types/components/Table/TableUtility/TableFooterController.d.ts +3 -4
- package/dist/esm/types/components/Table/TableUtility/TableHeaderController.d.ts +1 -1
- package/dist/esm/types/components/Table/TableUtility/TableSearchInput.d.ts +4 -5
- package/dist/esm/types/components/TagLabel/TagLabelBlockSimulation.d.ts +3 -10
- package/dist/esm/types/components/TagLabel/index.d.ts +1 -18
- package/dist/esm/types/components/Toaster/configs.d.ts +2 -1
- package/dist/esm/types/components/Tooltip/Simulation.d.ts +0 -11
- package/dist/esm/types/components/Tooltip/index.d.ts +0 -11
- package/dist/esm/types/components/Typography/Heading.d.ts +0 -6
- package/dist/esm/types/components/Typography/P.d.ts +0 -6
- package/dist/esm/types/components/Typography/Text/Link.d.ts +0 -5
- package/dist/esm/types/components/Typography/Text/index.d.ts +1 -6
- package/dist/esm/types/components/Window/index.d.ts +1 -1
- package/dist/esm/types/components/Window/windowDemo.d.ts +1 -1
- package/dist/esm/types/components/index.d.ts +4 -2
- package/dist/esm/types/stories/Badge/MonospaceBadge.stories.d.ts +64 -0
- package/dist/esm/types/stories/Button/Button.test.stories.d.ts +24 -0
- package/dist/esm/types/stories/Button/ButtonApp.stories.d.ts +6 -0
- package/dist/esm/types/stories/Button/NavButton.stories.d.ts +54 -0
- package/dist/esm/types/stories/Card/Card.stories.d.ts +2 -1
- package/dist/esm/types/stories/FileTree/FileTree.stories.d.ts +2 -2
- package/dist/esm/types/stories/FileTree/FileTreeContextMenu.stories.d.ts +2 -3
- package/dist/esm/types/stories/FileTree/FileTreeSimulation.stories.d.ts +2 -1
- package/dist/esm/types/stories/Form/DatePicker/DatepickerLimitSimulation.stories.d.ts +2 -1
- package/dist/esm/types/stories/Form/DatePicker/DatepickerSimulation.stories.d.ts +2 -1
- package/dist/esm/types/stories/Form/DatePicker/RangeDatepickerSimulation.stories.d.ts +2 -1
- package/dist/esm/types/stories/Form/DatePicker/YearPicker.stories.d.ts +28 -0
- package/dist/esm/types/stories/Form/Dropdown/DropdownContainer.stories.d.ts +2 -6
- package/dist/esm/types/stories/Form/Dropdown/DropdownContainer.test.stories.d.ts +28 -0
- package/dist/esm/types/stories/Form/FileUploader/SimpleFileUploader.stories.d.ts +1 -0
- package/dist/esm/types/stories/Form/Group/Group.stories.d.ts +295 -0
- package/dist/esm/types/stories/Form/Group/GroupButton.stories.d.ts +2 -1
- package/dist/esm/types/stories/Form/Group/GroupLabel.stories.d.ts +26 -0
- package/dist/esm/types/stories/Form/Group/SampleTest.stories.d.ts +2 -1
- package/dist/esm/types/stories/Form/Label/FormLabel.stories.d.ts +2 -1
- package/dist/esm/types/stories/Form/Label/Label.stories.d.ts +2 -11
- package/dist/esm/types/stories/Form/LiveSearch/Livesearch.test.stories.d.ts +27 -0
- package/dist/esm/types/stories/Form/LiveSearch/LivesearchCustomDropdownExample.stories.d.ts +2 -3
- package/dist/esm/types/stories/Form/LiveSearch/LivesearchOverflowTest.stories.d.ts +2 -1
- package/dist/esm/types/stories/Form/LiveSearch/OutsideControlSimulation.stories.d.ts +2 -2
- package/dist/esm/types/stories/Form/SelectInput/SelectInputCustom.stories.d.ts +2 -1
- package/dist/esm/types/stories/Form/TextInput/TextInputSimulation.stories.d.ts +2 -1
- package/dist/esm/types/stories/Form/TextInput/TransparentTextInputSimulation.stories.d.ts +13 -0
- package/dist/esm/types/stories/HorizontalStepper/HorizontalStepper.stories.d.ts +126 -4
- package/dist/esm/types/stories/HorizontalStepper/HorizontalStepper.test.stories.d.ts +67 -0
- package/dist/esm/types/stories/Icons/AlertRoundedSquare.stories.d.ts +2 -2
- package/dist/esm/types/stories/Icons/CubeHeader.stories.d.ts +2 -2
- package/dist/esm/types/stories/Icons/Discrepancy.stories.d.ts +2 -2
- package/dist/esm/types/stories/Icons/ExposedPort.stories.d.ts +2 -2
- package/dist/esm/types/stories/Icons/FQAnalytical.stories.d.ts +2 -2
- package/dist/esm/types/stories/Icons/FQGetaway.stories.d.ts +2 -2
- package/dist/esm/types/stories/Icons/FQModeler.stories.d.ts +2 -2
- package/dist/esm/types/stories/Icons/FQOperation.stories.d.ts +2 -2
- package/dist/esm/types/stories/Icons/FQWelldone.stories.d.ts +2 -2
- package/dist/esm/types/stories/Icons/Flowqount.stories.d.ts +2 -2
- package/dist/esm/types/stories/Icons/Inlet.stories.d.ts +2 -2
- package/dist/esm/types/stories/Icons/Legend.stories.d.ts +2 -2
- package/dist/esm/types/stories/Icons/ModalBalance.stories.d.ts +2 -2
- package/dist/esm/types/stories/Icons/Neutral.stories.d.ts +2 -1
- package/dist/esm/types/stories/Icons/Node.stories.d.ts +2 -2
- package/dist/esm/types/stories/Icons/Outlet.stories.d.ts +2 -2
- package/dist/esm/types/stories/Icons/Port.stories.d.ts +2 -2
- package/dist/esm/types/stories/Icons/Rhombus.stories.d.ts +2 -1
- package/dist/esm/types/stories/Icons/SelectAllAdd.stories.d.ts +2 -2
- package/dist/esm/types/stories/Icons/SelectAllRemove.stories.d.ts +2 -2
- package/dist/esm/types/stories/Icons/Spinner.stories.d.ts +2 -2
- package/dist/esm/types/stories/Icons/Stack.stories.d.ts +2 -2
- package/dist/esm/types/stories/Icons/Unlinked.stories.d.ts +2 -2
- package/dist/esm/types/stories/Icons/VirtualPort.stories.d.ts +2 -2
- package/dist/esm/types/stories/InfoPanel/InfoPanel.stories.d.ts +14 -0
- package/dist/esm/types/stories/Menu/MenuContainer.stories.d.ts +13 -0
- package/dist/esm/types/stories/Notification/Notification.stories.d.ts +13 -0
- package/dist/esm/types/stories/Sidebar/SidebarProfile.stories.d.ts +18 -0
- package/dist/esm/types/stories/Snippet/ContextualButtonsTable/Story.stories.d.ts +2 -1
- package/dist/esm/types/stories/Tab/CardTab.stories.d.ts +2 -2
- package/dist/esm/types/stories/Tab/CardTabDemo.stories.d.ts +2 -1
- package/dist/esm/types/stories/TabMenu/TabMenuSimulation.stories.d.ts +2 -1
- package/dist/esm/types/stories/Table/EmptyTable.stories.d.ts +13 -0
- package/dist/esm/types/stories/Table/SearchTableInput.stories.d.ts +13 -0
- package/dist/esm/types/stories/Table/TableFooterController.stories.d.ts +13 -0
- package/dist/esm/types/stories/Table/TableHeaderController.stories.d.ts +13 -0
- package/dist/esm/types/stories/TagLabel/TagLabel.stories.d.ts +24 -0
- package/dist/esm/types/stories/TagLabel/TaglabelBlock.stories.d.ts +13 -0
- package/dist/esm/types/stories/VerticalStepper/VerticalStepper.stories.d.ts +2 -2
- package/dist/esm/types/stories/Window/WindowSimulation.stories.d.ts +2 -1
- package/dist/esm/types/utility/hooks/usePopupPosition.d.ts +1 -1
- package/dist/esm/types/utility/index.d.ts +2 -1
- package/dist/esm/types/utility/public/words.d.ts +14 -0
- package/dist/index.d.ts +257 -404
- package/package.json +161 -143
- package/src/font/SansCode/README.txt +88 -88
- package/src/style/color.css +650 -650
- package/src/style/scrollbar.css +78 -78
- package/tailwind.config.js +592 -592
- package/dist/cjs/types/components/Forms/DatePicker/PickerCalendar/components/pickerYearContent.d.ts +0 -1
- package/dist/cjs/types/components/Forms/DatePicker/PickerCalendarOld.d.ts +0 -9
- package/dist/esm/types/components/Forms/DatePicker/PickerCalendar/components/pickerYearContent.d.ts +0 -1
- package/dist/esm/types/components/Forms/DatePicker/PickerCalendarOld.d.ts +0 -9
package/dist/cjs/index.js
CHANGED
|
@@ -7,8 +7,8 @@ function Accordions(_a) {
|
|
|
7
7
|
var title = _a.title, content = _a.content;
|
|
8
8
|
var _b = React.useState(false), active = _b[0], setActive = _b[1];
|
|
9
9
|
return (React.createElement("div", { className: "flex-col" },
|
|
10
|
-
React.createElement("div", { className: "flex items-start justify-between border-b border-bia-grey-light-20 bg-white
|
|
11
|
-
React.createElement("div", { className: "text-
|
|
10
|
+
React.createElement("div", { className: "flex min-h-[40px] w-[505px] items-start justify-between border-b border-bia-grey-light-20 bg-white pb-[9px] pe-[15px] ps-[20px] pt-[10px] focus-visible:rounded-md focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-0 focus-visible:outline-bia-blue-light-50", tabIndex: 0, role: "button" },
|
|
11
|
+
React.createElement("div", { className: "text-[14px] font-[350] leading-[21px] text-primary-black" }, title),
|
|
12
12
|
React.createElement("button", { onClick: function () { return setActive(!active); }, type: "button" }, active ? (React.createElement("svg", { width: "18", height: "20", viewBox: "0 0 18 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
13
13
|
React.createElement("g", { clipPath: "url(#clip0_8847_19267)" },
|
|
14
14
|
React.createElement("rect", { width: "18", height: "20", fill: "white" }),
|
|
@@ -24,9 +24,9 @@ function Accordions(_a) {
|
|
|
24
24
|
React.createElement("clipPath", { id: "clip0_8847_19211" },
|
|
25
25
|
React.createElement("rect", { width: "18", height: "20", fill: "white" }))),
|
|
26
26
|
"22")))),
|
|
27
|
-
active && (React.createElement("div", { className: "
|
|
28
|
-
React.createElement("div", { className: " absolute
|
|
29
|
-
React.createElement("div", { className: "text-
|
|
27
|
+
active && (React.createElement("div", { className: "relative w-[505px] gap-[10px] bg-bia-grey-light-80 pb-[15px] pe-[15px] ps-[15px] pt-[10px]" },
|
|
28
|
+
React.createElement("div", { className: " absolute left-0 top-0 h-[100%] w-[3px] rounded-br-[999px] rounded-tr-[999px] bg-bia-blue " }),
|
|
29
|
+
React.createElement("div", { className: "text-[14px] font-[350] text-primary-black " }, content)))));
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
var DefaultContext = {
|
|
@@ -148,7 +148,7 @@ function TbCircleFilled (props) {
|
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
function InfoIcon() {
|
|
151
|
-
return (React.createElement("svg", { viewBox: "0 0 19 20", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", className: "
|
|
151
|
+
return (React.createElement("svg", { viewBox: "0 0 19 20", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", className: "flex h-[20px] w-[20px] items-center justify-center" },
|
|
152
152
|
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.10728 4.10752C5.67008 2.54472 7.7897 1.66675 9.99984 1.66675C12.21 1.66675 14.3296 2.54472 15.8924 4.10752C17.4552 5.67033 18.3332 7.78994 18.3332 10.0001C18.3332 11.0944 18.1176 12.1781 17.6988 13.1891C17.28 14.2002 16.6662 15.1188 15.8924 15.8926C15.1186 16.6665 14.1999 17.2803 13.1889 17.6991C12.1778 18.1179 11.0942 18.3334 9.99984 18.3334C8.90549 18.3334 7.82186 18.1179 6.81081 17.6991C5.79976 17.2803 4.8811 16.6665 4.10728 15.8926C3.33346 15.1188 2.71963 14.2002 2.30084 13.1891C1.88205 12.1781 1.6665 11.0944 1.6665 10.0001C1.6665 7.78994 2.54448 5.67033 4.10728 4.10752ZM9.99984 3.33341C8.23173 3.33341 6.53603 4.03579 5.28579 5.28604C4.03555 6.53628 3.33317 8.23197 3.33317 10.0001C3.33317 10.8756 3.50561 11.7425 3.84064 12.5513C4.17567 13.3601 4.66673 14.0951 5.28579 14.7141C5.90485 15.3332 6.63978 15.8242 7.44861 16.1593C8.25745 16.4943 9.12436 16.6667 9.99984 16.6667C10.8753 16.6667 11.7422 16.4943 12.5511 16.1593C13.3599 15.8242 14.0948 15.3332 14.7139 14.7141C15.3329 14.0951 15.824 13.3601 16.159 12.5513C16.4941 11.7425 16.6665 10.8756 16.6665 10.0001C16.6665 8.23197 15.9641 6.53628 14.7139 5.28604C13.4636 4.03579 11.7679 3.33341 9.99984 3.33341Z" }),
|
|
153
153
|
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.1665 7.50008C9.1665 7.03984 9.5396 6.66675 9.99984 6.66675H10.0082C10.4684 6.66675 10.8415 7.03984 10.8415 7.50008C10.8415 7.96032 10.4684 8.33341 10.0082 8.33341H9.99984C9.5396 8.33341 9.1665 7.96032 9.1665 7.50008Z" }),
|
|
154
154
|
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8.3335 10.0001C8.3335 9.53984 8.70659 9.16675 9.16683 9.16675H10.0002C10.4604 9.16675 10.8335 9.53984 10.8335 10.0001V12.5001C11.2937 12.5001 11.6668 12.8732 11.6668 13.3334C11.6668 13.7937 11.2937 14.1667 10.8335 14.1667H10.0002C9.53993 14.1667 9.16683 13.7937 9.16683 13.3334V10.8334C8.70659 10.8334 8.3335 10.4603 8.3335 10.0001Z" })));
|
|
@@ -226,41 +226,33 @@ var AlertConfig = {
|
|
|
226
226
|
|
|
227
227
|
function Display(_a) {
|
|
228
228
|
var children = _a.children;
|
|
229
|
-
return (React.createElement("h1", { className: "bianic-display text-[144px]
|
|
229
|
+
return (React.createElement("h1", { className: "bianic-display texts font-humnst777 text-[144px] font-bold leading-[120%]" }, children));
|
|
230
230
|
}
|
|
231
231
|
|
|
232
232
|
function Heading(_a) {
|
|
233
|
-
var _b = _a.variant, variant = _b === void 0 ? '1' : _b,
|
|
233
|
+
var _b = _a.variant, variant = _b === void 0 ? '1' : _b, _c = _a.className, className = _c === void 0 ? '' : _c, children = _a.children;
|
|
234
234
|
switch (variant) {
|
|
235
235
|
case '1':
|
|
236
|
-
return (React.createElement("h1", { className: "bianic-header-".concat(variant, " text-heading-1 font-bold
|
|
236
|
+
return (React.createElement("h1", { className: "bianic-header-".concat(variant, " flex font-humnst777 text-heading-1 font-bold ").concat(className) }, children));
|
|
237
237
|
case '2':
|
|
238
|
-
return (React.createElement("h2", { className: "bianic-header-".concat(variant, " text-heading-2 font-bold
|
|
238
|
+
return (React.createElement("h2", { className: "bianic-header-".concat(variant, " flex font-humnst777 text-heading-2 font-bold ").concat(className) }, children));
|
|
239
239
|
case '3':
|
|
240
|
-
return (React.createElement("h3", { className: "bianic-header-".concat(variant, " text-heading-3 font-bold
|
|
240
|
+
return (React.createElement("h3", { className: "bianic-header-".concat(variant, " flex font-humnst777 text-heading-3 font-bold ").concat(className) }, children));
|
|
241
241
|
case '4':
|
|
242
|
-
return (React.createElement("h4", { className: "bianic-header-".concat(variant, " text-heading-4 font-bold
|
|
242
|
+
return (React.createElement("h4", { className: "bianic-header-".concat(variant, " flex font-humnst777 text-heading-4 font-bold ").concat(className) }, children));
|
|
243
243
|
case '5':
|
|
244
|
-
return (React.createElement("h5", { className: "bianic-header-".concat(variant, " text-heading-5 font-bold
|
|
244
|
+
return (React.createElement("h5", { className: "bianic-header-".concat(variant, " flex font-humnst777 text-heading-5 font-bold ").concat(className) }, children));
|
|
245
245
|
case '6':
|
|
246
|
-
return (React.createElement("h6", { className: "bianic-header-".concat(variant, " text-heading-6 font-bold
|
|
246
|
+
return (React.createElement("h6", { className: "bianic-header-".concat(variant, " flex font-humnst777 text-heading-6 font-bold ").concat(className) }, children));
|
|
247
247
|
default:
|
|
248
|
-
return (React.createElement("h1", { className: "bianic-header-".concat(variant, " text-heading-1 font-bold
|
|
248
|
+
return (React.createElement("h1", { className: "bianic-header-".concat(variant, " flex font-humnst777 text-heading-1 font-bold ").concat(className) }, children));
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
|
-
Heading.defaultProps = {
|
|
252
|
-
variant: '1',
|
|
253
|
-
className: '',
|
|
254
|
-
};
|
|
255
251
|
|
|
256
252
|
function P(_a) {
|
|
257
253
|
var _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.fontSize, fontSize = _c === void 0 ? 'size-base' : _c, children = _a.children;
|
|
258
254
|
return (React.createElement("p", { className: "paragraph text-justify text-".concat(fontSize, " font-segoe ").concat(className) }, children));
|
|
259
255
|
}
|
|
260
|
-
P.defaultProps = {
|
|
261
|
-
className: '',
|
|
262
|
-
fontSize: 'size-base',
|
|
263
|
-
};
|
|
264
256
|
|
|
265
257
|
var textClasses = {
|
|
266
258
|
caption: 'text-size-caption font-normal font-segoe uppercase',
|
|
@@ -356,10 +348,6 @@ function Text(_a) {
|
|
|
356
348
|
var extendedClasses = "".concat(className, " ").concat(extended);
|
|
357
349
|
return (React.createElement("span", { className: "bianic-text ".concat(textClasses[validatedVariant], " ").concat(defaultColor, " ").concat(extendedClasses) }, childrenElement(children)));
|
|
358
350
|
}
|
|
359
|
-
Text.defaultProps = {
|
|
360
|
-
extended: '',
|
|
361
|
-
className: '',
|
|
362
|
-
};
|
|
363
351
|
|
|
364
352
|
/******************************************************************************
|
|
365
353
|
Copyright (c) Microsoft Corporation.
|
|
@@ -420,12 +408,9 @@ function Link(_a) {
|
|
|
420
408
|
var _b = _a.extended, extended = _b === void 0 ? '' : _b, children = _a.children, rest = __rest(_a, ["extended", "children"]);
|
|
421
409
|
return (React.createElement("a", __assign({ className: "bianic-text ".concat(textClasses.link, " ").concat(extended) }, rest), children));
|
|
422
410
|
}
|
|
423
|
-
Link.defaultProps = {
|
|
424
|
-
extended: '',
|
|
425
|
-
};
|
|
426
411
|
|
|
427
412
|
function Alert(_a) {
|
|
428
|
-
var _b = _a.title, title = _b === void 0 ? '' : _b, caption = _a.caption, _c = _a.variant, variant = _c === void 0 ? 'base' : _c, _d = _a.visible, visible = _d === void 0 ? true : _d, _e = _a.setVisible, setVisible = _e === void 0 ? function () { } : _e, _f = _a.visibleIcon, visibleIcon = _f === void 0 ? true : _f, _g = _a.visibleClose, visibleClose = _g === void 0 ? false : _g,
|
|
413
|
+
var _b = _a.title, title = _b === void 0 ? '' : _b, caption = _a.caption, _c = _a.variant, variant = _c === void 0 ? 'base' : _c, _d = _a.visible, visible = _d === void 0 ? true : _d, _e = _a.setVisible, setVisible = _e === void 0 ? function () { } : _e, _f = _a.visibleIcon, visibleIcon = _f === void 0 ? true : _f, _g = _a.visibleClose, visibleClose = _g === void 0 ? false : _g, _h = _a.customIcon, customIcon = _h === void 0 ? undefined : _h, _j = _a.customMiniIcon, customMiniIcon = _j === void 0 ? undefined : _j, children = _a.children;
|
|
429
414
|
var validateVariant = validUnion(variant, [
|
|
430
415
|
'base',
|
|
431
416
|
'info',
|
|
@@ -436,7 +421,7 @@ function Alert(_a) {
|
|
|
436
421
|
var IconComponent = AlertConfig[validateVariant].icon[visibleIcon ? 'true' : 'false'];
|
|
437
422
|
var IconX = AlertConfig[visibleClose ? 'true' : 'false'];
|
|
438
423
|
var iconDisplay = visibleIcon
|
|
439
|
-
? customIcon !== null && customIcon !== void 0 ? customIcon : React.createElement(IconComponent, { size: 20, color: "white" })
|
|
424
|
+
? (customIcon !== null && customIcon !== void 0 ? customIcon : React.createElement(IconComponent, { size: 20, color: "white" }))
|
|
440
425
|
: null;
|
|
441
426
|
var content = children || React.createElement(Text, { variant: "small-text" }, caption);
|
|
442
427
|
return (visible && (React.createElement("div", { className: "alert-container flex w-full flex-col" },
|
|
@@ -451,19 +436,11 @@ function Alert(_a) {
|
|
|
451
436
|
React.createElement("div", { className: "flex justify-between" },
|
|
452
437
|
React.createElement(Text, { variant: "normal-text-semibold" }, title)),
|
|
453
438
|
React.createElement("div", { className: "flex flex-row items-start gap-[5px]" },
|
|
454
|
-
customMiniIcon
|
|
439
|
+
customMiniIcon || null,
|
|
455
440
|
content)),
|
|
456
441
|
IconX && typeof IconX === 'function' && (React.createElement("div", { className: "closable-area flex " },
|
|
457
442
|
React.createElement(IconX, { className: "cursor-pointer ".concat(AlertConfig[validateVariant].hover, " ").concat(AlertConfig[validateVariant].active, " ").concat(AlertConfig[validateVariant].focus, " ").concat(AlertConfig[validateVariant].close), onClick: function () { return setVisible(false); }, tabIndex: 0 }))))))))));
|
|
458
443
|
}
|
|
459
|
-
Alert.defaultProps = {
|
|
460
|
-
title: '',
|
|
461
|
-
variant: 'base',
|
|
462
|
-
visible: true,
|
|
463
|
-
setVisible: function () { },
|
|
464
|
-
visibleIcon: true,
|
|
465
|
-
visibleClose: false,
|
|
466
|
-
};
|
|
467
444
|
|
|
468
445
|
var radiusConfig$1 = {
|
|
469
446
|
default: {
|
|
@@ -556,7 +533,7 @@ var Button = React.forwardRef(function (_a, ref) {
|
|
|
556
533
|
var validatedRadius = validUnion(radius, RADIUS_UNION);
|
|
557
534
|
var variantTextColorClasses = variantConfig$3[validatedVariant]
|
|
558
535
|
.split(/\s+/)
|
|
559
|
-
.filter(function (
|
|
536
|
+
.filter(function (cls) { return cls.startsWith('text-'); });
|
|
560
537
|
var renderIcon = function (element) {
|
|
561
538
|
if (!element)
|
|
562
539
|
return null;
|
|
@@ -588,11 +565,13 @@ var Button = React.forwardRef(function (_a, ref) {
|
|
|
588
565
|
var isVariantLink = variant.includes('link')
|
|
589
566
|
? ''
|
|
590
567
|
: "".concat(sidePaddingConfig[validatedSize]);
|
|
591
|
-
var sizeClass =
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
568
|
+
var sizeClass = "".concat(iconOnlySizeConfig$1[validatedSize], " ").concat(isVariantLink, " ").concat(isVariantLink);
|
|
569
|
+
if (label || variant === 'form-group') {
|
|
570
|
+
sizeClass = " ".concat(minWidthRules, " ").concat(sizingRules);
|
|
571
|
+
}
|
|
572
|
+
else if (hasDoubleIcon) {
|
|
573
|
+
sizeClass = "".concat(doubleIconSizeConfig[validatedSize], " ").concat(isVariantLink);
|
|
574
|
+
}
|
|
596
575
|
var classString = "\n ".concat(variantConfig$3[validatedVariant], "\n ").concat(sizeClass, "\n ").concat(radiusConfig$1[validatedRadius][validatedSize], "\n ").concat(className, "\n ");
|
|
597
576
|
return (React.createElement("button", __assign({ ref: ref, type: "button", className: "bianic-button bianic-fgc-target flex items-center justify-center font-semibold ".concat(classString), disabled: disabled }, props),
|
|
598
577
|
childrenElement(renderIcon(iconLeft || left)),
|
|
@@ -689,9 +668,9 @@ var typeConfig = {
|
|
|
689
668
|
};
|
|
690
669
|
|
|
691
670
|
function Badge(_a) {
|
|
692
|
-
var _b = _a.type, type = _b === void 0 ? 'standart' : _b, children = _a.children,
|
|
671
|
+
var _b = _a.type, type = _b === void 0 ? 'standart' : _b, children = _a.children, _c = _a.color, color = _c === void 0 ? undefined : _c, _d = _a.isInverted, isInverted = _d === void 0 ? false : _d, className = _a.className;
|
|
693
672
|
var divRef = React.useRef(null);
|
|
694
|
-
var
|
|
673
|
+
var _e = React.useState(0), fontSize = _e[0], setFontSize = _e[1];
|
|
695
674
|
var typeClasses = typeConfig[type];
|
|
696
675
|
var isStandart = type === 'standart';
|
|
697
676
|
var bgColor = isInverted && isStandart ? '#ffffff' : color || '';
|
|
@@ -716,11 +695,6 @@ function Badge(_a) {
|
|
|
716
695
|
} },
|
|
717
696
|
React.createElement("span", { ref: divRef, style: { marginTop: contentMarginTop } }, children)));
|
|
718
697
|
}
|
|
719
|
-
Badge.defaultProps = {
|
|
720
|
-
type: 'standart',
|
|
721
|
-
isInverted: false,
|
|
722
|
-
color: undefined,
|
|
723
|
-
};
|
|
724
698
|
|
|
725
699
|
var variantConfig$2 = {
|
|
726
700
|
black: {
|
|
@@ -762,7 +736,7 @@ function Banner(_a) {
|
|
|
762
736
|
React.useLayoutEffect(function () {
|
|
763
737
|
var textElement = textRef.current;
|
|
764
738
|
if (!textElement)
|
|
765
|
-
return;
|
|
739
|
+
return undefined;
|
|
766
740
|
var observer = new ResizeObserver(function () {
|
|
767
741
|
var computedStyle = window.getComputedStyle(textElement);
|
|
768
742
|
var lineHeight = parseFloat(computedStyle.lineHeight);
|
|
@@ -782,10 +756,6 @@ function Banner(_a) {
|
|
|
782
756
|
React.createElement(TbX, { className: "text-[18px] ".concat(variantConfig$2[variant].hover, " ").concat(variantConfig$2[variant].active) })))));
|
|
783
757
|
}
|
|
784
758
|
}
|
|
785
|
-
Banner.defaultProps = {
|
|
786
|
-
closeable: true,
|
|
787
|
-
variant: 'black',
|
|
788
|
-
};
|
|
789
759
|
|
|
790
760
|
var sizeConfig$e = {
|
|
791
761
|
md: 'h-[16px] text-[11px]',
|
|
@@ -809,14 +779,14 @@ var colorConfig$3 = {
|
|
|
809
779
|
white: 'bg-bia-white text-bia-black border border-bia-grey',
|
|
810
780
|
};
|
|
811
781
|
|
|
812
|
-
|
|
782
|
+
function MonospaceBadge(_a) {
|
|
813
783
|
var text = _a.text, _b = _a.size, size = _b === void 0 ? 'md' : _b, _c = _a.color, color = _c === void 0 ? 'blue' : _c;
|
|
814
784
|
var sizeClass = sizeConfig$e[size];
|
|
815
785
|
var colorClass = colorConfig$3[color];
|
|
816
786
|
var variantClass = "".concat(sizeClass, " ").concat(colorClass);
|
|
817
787
|
return (React.createElement("div", { className: "relative -top-[1px] inline-flex w-fit items-center justify-center rounded-[2px] px-[3px] ".concat(variantClass) },
|
|
818
788
|
React.createElement("div", { className: "font-sans-code leading-[0px]" }, text)));
|
|
819
|
-
}
|
|
789
|
+
}
|
|
820
790
|
|
|
821
791
|
function Biaenergi$6() {
|
|
822
792
|
return (React.createElement("div", { className: "" },
|
|
@@ -1623,13 +1593,10 @@ function Breadcrumb(_a) {
|
|
|
1623
1593
|
var disabled = _a.disabled, _b = _a.selected, selected = _b === void 0 ? false : _b, children = _a.children, onClick = _a.onClick, rest = __rest(_a, ["disabled", "selected", "children", "onClick"]);
|
|
1624
1594
|
var _c = BreadcrumbConfig[String(selected)], container = _c.container, text = _c.text;
|
|
1625
1595
|
return (React.createElement("div", { className: "flex" },
|
|
1626
|
-
React.createElement("button", __assign({ className: "".concat(text, " ").concat(disabled ? 'text-bia-coolgrey-light-50
|
|
1627
|
-
!selected && (React.createElement("div", { className: "
|
|
1596
|
+
React.createElement("button", __assign({ className: "".concat(text, " ").concat(disabled ? 'cursor-pointer text-bia-coolgrey-light-50' : '', " flex cursor-pointer items-center justify-center whitespace-normal rounded-radius-sm bg-transparent px-[5px] py-[3px] focus-visible:outline ").concat(container, " ").concat(disabled ? 'hover:bg-transparent focus-visible:outline-transparent active:bg-transparent' : ''), disabled: disabled, type: "button", onClick: onClick }, rest), children),
|
|
1597
|
+
!selected && (React.createElement("div", { className: "flex items-center justify-center px-[5px]" },
|
|
1628
1598
|
React.createElement(Chevron, null)))));
|
|
1629
1599
|
}
|
|
1630
|
-
Breadcrumb.defaultProps = {
|
|
1631
|
-
selected: false,
|
|
1632
|
-
};
|
|
1633
1600
|
|
|
1634
1601
|
var colorConfig$2 = {
|
|
1635
1602
|
green: {
|
|
@@ -1642,11 +1609,13 @@ var colorConfig$2 = {
|
|
|
1642
1609
|
},
|
|
1643
1610
|
};
|
|
1644
1611
|
|
|
1645
|
-
|
|
1646
|
-
|
|
1612
|
+
function ButtonApp(_a) {
|
|
1613
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars
|
|
1614
|
+
_a.icon;
|
|
1615
|
+
var _c = _a.isActive, isActive = _c === void 0 ? false : _c, disabled = _a.disabled, _d = _a.color, color = _d === void 0 ? 'green' : _d, _e = _a.label, label = _e === void 0 ? '' : _e, _f = _a.extended, extended = _f === void 0 ? '' : _f, rest = __rest(_a, ["icon", "isActive", "disabled", "color", "label", "extended"]);
|
|
1647
1616
|
var buttonState = isActive ? 'active' : 'default';
|
|
1648
1617
|
return (React.createElement("button", __assign({ className: "button-app flex max-h-[30px] items-center justify-center px-[10px] pb-[8.3px] pt-[8.5px] font-arial text-size-tiny ".concat(colorConfig$2[color][buttonState], " ").concat(extended), type: "button", disabled: disabled }, rest), label));
|
|
1649
|
-
}
|
|
1618
|
+
}
|
|
1650
1619
|
|
|
1651
1620
|
var textColorConfig = {
|
|
1652
1621
|
dark: 'text-primary-black disabled:text-bia-coolgrey-disabled',
|
|
@@ -1657,20 +1626,20 @@ var stateColorConfig = {
|
|
|
1657
1626
|
default: 'enabled:hover:bg-black/10 enabled:focus-visible:border-bia-blue-disabled enabled:focus-visible:outline-2 enabled:focus-visible:-outline-offset-1 enabled:focus-visible:outline-bia-blue-disabled enabled:active:bg-black/15',
|
|
1658
1627
|
};
|
|
1659
1628
|
|
|
1660
|
-
|
|
1661
|
-
var
|
|
1662
|
-
var textColor =
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
: textColorConfig[variant];
|
|
1629
|
+
function ContextualButtonInner(_a, ref) {
|
|
1630
|
+
var _b = _a.actionElement, actionElement = _b === void 0 ? undefined : _b, _c = _a.label, label = _c === void 0 ? '' : _c, _d = _a.icon, icon = _d === void 0 ? undefined : _d, _e = _a.variant, variant = _e === void 0 ? 'dark' : _e, disabled = _a.disabled, _f = _a.isSelected, isSelected = _f === void 0 ? false : _f, props = __rest(_a, ["actionElement", "label", "icon", "variant", "disabled", "isSelected"]);
|
|
1631
|
+
var textColor = textColorConfig[variant];
|
|
1632
|
+
if (isSelected) {
|
|
1633
|
+
textColor = variant === 'dark' ? 'text-primary-black' : 'text-primary-white';
|
|
1634
|
+
}
|
|
1667
1635
|
var stateColor = stateColorConfig[isSelected ? 'selected' : 'default'];
|
|
1668
|
-
return (React.createElement("button", __assign({ ref: ref, className: "bianic-contextual-button box-border flex min-h-[
|
|
1636
|
+
return (React.createElement("button", __assign({ ref: ref, type: "button", className: "bianic-contextual-button box-border flex min-h-[23px] flex-row items-center rounded-radius-sm border border-transparent p-[1px] outline-none ".concat(stateColor, " ").concat(textColor) }, props, { disabled: disabled }),
|
|
1669
1637
|
icon,
|
|
1670
1638
|
label && (React.createElement("div", { className: "label flex max-h-[46px] items-center gap-x-0.5 px-[5px] text-[12px] leading-none" },
|
|
1671
1639
|
React.createElement("span", null, label),
|
|
1672
1640
|
actionElement))));
|
|
1673
|
-
}
|
|
1641
|
+
}
|
|
1642
|
+
var ContextualButton = React.forwardRef(ContextualButtonInner);
|
|
1674
1643
|
|
|
1675
1644
|
var config$2 = {
|
|
1676
1645
|
'dark-background': 'bg-white enabled:hover:bg-bia-grey-light-90 outline-none focus-visible:outline-2 focus-visible:outline-bia-blue-light-50 enabled:active:bg-bia-grey-light-80',
|
|
@@ -1678,15 +1647,19 @@ var config$2 = {
|
|
|
1678
1647
|
'outline-light-background': 'bg-white border border-bia-grey-light-40 enabled:hover:bg-bia-grey-light-90 outline-none focus-visible:outline-2 focus-visible:outline-bia-blue-light-50 enabled:active:bg-bia-grey-light-80',
|
|
1679
1648
|
};
|
|
1680
1649
|
|
|
1681
|
-
|
|
1650
|
+
function Card(_a) {
|
|
1682
1651
|
var children = _a.children, _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.variant, variant = _c === void 0 ? 'dark-background' : _c, _d = _a.className, className = _d === void 0 ? '' : _d, _e = _a.type, type = _e === void 0 ? 'button' : _e, rest = __rest(_a, ["children", "disabled", "variant", "className", "type"]);
|
|
1683
1652
|
var baseStyles = config$2[variant];
|
|
1684
1653
|
var stateStyles = disabled
|
|
1685
1654
|
? 'opacity-50 cursor-not-allowed pointer-events-none'
|
|
1686
1655
|
: '';
|
|
1687
1656
|
var combinedClassName = "rounded-radius-md p-5 ".concat(baseStyles, " ").concat(stateStyles, " ").concat(className).trim();
|
|
1688
|
-
return (React.createElement("button", __assign({
|
|
1689
|
-
|
|
1657
|
+
return (React.createElement("button", __assign({
|
|
1658
|
+
// type already defaults to 'button' and is safely typed via ComponentPropsWithoutRef<'button'>;
|
|
1659
|
+
// the rule can't statically verify a variable's value, only literal strings
|
|
1660
|
+
// eslint-disable-next-line react/button-has-type
|
|
1661
|
+
type: type, disabled: disabled, "aria-disabled": disabled, className: combinedClassName }, rest), children));
|
|
1662
|
+
}
|
|
1690
1663
|
|
|
1691
1664
|
function Color() {
|
|
1692
1665
|
var colors = [
|
|
@@ -1785,8 +1758,8 @@ function Color() {
|
|
|
1785
1758
|
React.createElement("div", { className: "h-10 min-w-10" }),
|
|
1786
1759
|
lightLevels.map(function (level) { return (React.createElement("div", { key: level, className: "flex h-10 w-fit items-center justify-end" },
|
|
1787
1760
|
React.createElement("div", { className: "whitespace-nowrap text-center text-xs font-semibold" }, level))); })),
|
|
1788
|
-
colors.map(function (color
|
|
1789
|
-
return (React.createElement("div", { className: "flex w-fit flex-col items-center gap-y-3", key:
|
|
1761
|
+
colors.map(function (color) {
|
|
1762
|
+
return (React.createElement("div", { className: "flex w-fit flex-col items-center gap-y-3", key: color.tailwind },
|
|
1790
1763
|
React.createElement("div", { className: "h-10 w-fit" },
|
|
1791
1764
|
React.createElement("div", { className: "text-center text-xs font-semibold" }, color.tailwind)),
|
|
1792
1765
|
lightLevels.map(function (level) {
|
|
@@ -1829,6 +1802,9 @@ var Countdown = React.forwardRef(function (_a, ref) {
|
|
|
1829
1802
|
React.createElement(Heading, { key: secondsPlaceholder, variant: "2", className: "animate-number-drop" }, secondsPlaceholder),
|
|
1830
1803
|
React.createElement(Text, { variant: "small-text", className: "font-segoe text-bia-coolgrey" }, secondsPlaceholder <= 1 ? 'second' : 'seconds'))) : (React.createElement(TbCheck, { size: 46, className: "text-bia-green", "aria-label": "Countdown complete" }))));
|
|
1831
1804
|
});
|
|
1805
|
+
Countdown.defaultProps = {
|
|
1806
|
+
variant: 'countdown',
|
|
1807
|
+
};
|
|
1832
1808
|
Countdown.displayName = 'Countdown';
|
|
1833
1809
|
|
|
1834
1810
|
var DividerConfig = {
|
|
@@ -1837,51 +1813,18 @@ var DividerConfig = {
|
|
|
1837
1813
|
};
|
|
1838
1814
|
|
|
1839
1815
|
function Divider(_a) {
|
|
1840
|
-
var _b = _a.orientation, orientation = _b === void 0 ? 'horizontal' : _b,
|
|
1816
|
+
var _b = _a.orientation, orientation = _b === void 0 ? 'horizontal' : _b, _c = _a.className, className = _c === void 0 ? '' : _c;
|
|
1841
1817
|
var config = DividerConfig[orientation];
|
|
1842
1818
|
var margin = orientation === 'horizontal' ? 'my-[7px]' : 'mx-[7px]';
|
|
1843
1819
|
return (React.createElement("div", { className: "bianic-divider bg-bia-grey-light-50 ".concat(margin, " ").concat(config, " ").concat(className) }));
|
|
1844
1820
|
}
|
|
1845
|
-
Divider.defaultProps = {
|
|
1846
|
-
className: '',
|
|
1847
|
-
orientation: 'horizontal',
|
|
1848
|
-
};
|
|
1849
1821
|
|
|
1850
|
-
|
|
1851
|
-
var
|
|
1852
|
-
var popupRef = React.useRef(null); // Ref untuk div utama
|
|
1853
|
-
var _b = useDetectOutsideClick(popupRef, false), isOpenContMenu = _b[0], setIsOpenContMenu = _b[1];
|
|
1854
|
-
var _c = React.useState({ x: 0, y: 0 }), contMenuPosition = _c[0], setContMenuPosition = _c[1];
|
|
1855
|
-
var menuStyle = {
|
|
1856
|
-
position: 'fixed',
|
|
1857
|
-
top: "".concat(contMenuPosition.y, "px"),
|
|
1858
|
-
left: "".concat(contMenuPosition.x, "px"),
|
|
1859
|
-
// Pastikan z-index cukup tinggi agar muncul di atas elemen lain
|
|
1860
|
-
zIndex: 1000,
|
|
1861
|
-
};
|
|
1862
|
-
var handleRightClick = function (event) {
|
|
1863
|
-
setIsOpenContMenu(true);
|
|
1864
|
-
setContMenuPosition({ x: event.clientX, y: event.clientY });
|
|
1865
|
-
};
|
|
1866
|
-
return (React.createElement("div", { className: "file-tree" },
|
|
1867
|
-
data.map(function (_a, index) {
|
|
1868
|
-
var label = _a.label, nodes = _a.nodes, props = __rest(_a, ["label", "nodes"]);
|
|
1869
|
-
return (React.createElement(TreeItem$1, __assign({ label: label, nodes: nodes, key: index, color: color, chevronColor: chevronColor, handleRightClick: handleRightClick, onMouseDownTreeItem: onMouseDown }, props)));
|
|
1870
|
-
}),
|
|
1871
|
-
isOpenContMenu && (React.createElement("div", { style: menuStyle, ref: popupRef, className: "bianic-filetree-contextmenu" }, React.isValidElement(contextMenu)
|
|
1872
|
-
? // Kirimkan handleItemClick sebagai props onClick ke setiap MenuItem
|
|
1873
|
-
React.cloneElement(contextMenu, {
|
|
1874
|
-
isWithOverlay: false,
|
|
1875
|
-
onClickItem: function () { return setIsOpenContMenu(false); },
|
|
1876
|
-
})
|
|
1877
|
-
: contextMenu))));
|
|
1878
|
-
};
|
|
1879
|
-
var TreeItem$1 = function (_a) {
|
|
1880
|
-
var label = _a.label, nodes = _a.nodes, color = _a.color, chevronColor = _a.chevronColor, handleRightClick = _a.handleRightClick, onMouseDownTreeItem = _a.onMouseDownTreeItem, props = __rest(_a, ["label", "nodes", "color", "chevronColor", "handleRightClick", "onMouseDownTreeItem"]);
|
|
1822
|
+
function TreeItem$1(_a) {
|
|
1823
|
+
var label = _a.label, _b = _a.nodes, nodes = _b === void 0 ? undefined : _b, _c = _a.color, color = _c === void 0 ? undefined : _c, _d = _a.chevronColor, chevronColor = _d === void 0 ? undefined : _d, _e = _a.handleRightClick, handleRightClick = _e === void 0 ? undefined : _e, _f = _a.onMouseDownTreeItem, onMouseDownTreeItem = _f === void 0 ? undefined : _f, props = __rest(_a, ["label", "nodes", "color", "chevronColor", "handleRightClick", "onMouseDownTreeItem"]);
|
|
1881
1824
|
var treeRef = React.useRef(null);
|
|
1882
|
-
var
|
|
1883
|
-
var
|
|
1884
|
-
var
|
|
1825
|
+
var _g = React.useState(false), isExpand = _g[0], setIsExpand = _g[1];
|
|
1826
|
+
var _h = React.useState(false), isFocused = _h[0], setIsFocused = _h[1];
|
|
1827
|
+
var _j = useDetectOutsideClick(treeRef, false, 'mousedown'), isClickRight = _j[0], setIsClickRight = _j[1];
|
|
1885
1828
|
var focusedIconColor = chevronColor || color
|
|
1886
1829
|
? "text-bia-".concat(chevronColor || color)
|
|
1887
1830
|
: 'text-bia-coolgrey-light-50';
|
|
@@ -1890,11 +1833,11 @@ var TreeItem$1 = function (_a) {
|
|
|
1890
1833
|
var textClass = "flex items-center rounded-radius-sm px-[2px] cursor-pointer hover:bg-bia-coolgrey-light-90 focus:pointer-events-none ".concat(isFocused && focusedBgColor, " ").concat(isClickRight && clickRightClass);
|
|
1891
1834
|
return (React.createElement("div", { className: "bianic-tree-item" },
|
|
1892
1835
|
React.createElement("div", { className: "justify-left group flex items-center", ref: treeRef },
|
|
1893
|
-
nodes && nodes.length > 0 ? (React.createElement("button", { className: "cursor-pointer", onClick: function (
|
|
1836
|
+
nodes && nodes.length > 0 ? (React.createElement("button", { type: "button", className: "cursor-pointer", onClick: function () {
|
|
1894
1837
|
setIsExpand(function (prev) { return !prev; });
|
|
1895
1838
|
} },
|
|
1896
1839
|
React.createElement(TbChevronRight, { className: "".concat(isFocused ? focusedIconColor : 'text-bia-coolgrey-light-20', " ").concat(isExpand && 'rotate-90'), size: 18 }))) : (React.createElement("div", { className: "aspect-square w-[18px]" })),
|
|
1897
|
-
React.createElement("button", __assign({ onFocus: function (e) {
|
|
1840
|
+
React.createElement("button", __assign({ type: "button", onFocus: function (e) {
|
|
1898
1841
|
var _a;
|
|
1899
1842
|
setIsFocused(true);
|
|
1900
1843
|
(_a = props === null || props === void 0 ? void 0 : props.onFocus) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
@@ -1915,14 +1858,43 @@ var TreeItem$1 = function (_a) {
|
|
|
1915
1858
|
handleRightClick === null || handleRightClick === void 0 ? void 0 : handleRightClick(e);
|
|
1916
1859
|
} }, props),
|
|
1917
1860
|
React.createElement(Text, { variant: "small-text" }, label))),
|
|
1918
|
-
isExpand && nodes && nodes.length > 0 && (React.createElement("div", { className: "ml-4" }, nodes.map(function (_a
|
|
1919
|
-
var
|
|
1920
|
-
return (React.createElement(TreeItem$1, __assign({ label:
|
|
1861
|
+
isExpand && nodes && nodes.length > 0 && (React.createElement("div", { className: "ml-4" }, nodes.map(function (_a) {
|
|
1862
|
+
var childLabel = _a.label, childNodes = _a.nodes, childProps = __rest(_a, ["label", "nodes"]);
|
|
1863
|
+
return (React.createElement(TreeItem$1, __assign({ label: childLabel, nodes: childNodes, key: childLabel, color: color, handleRightClick: handleRightClick, onMouseDownTreeItem: onMouseDownTreeItem }, childProps)));
|
|
1921
1864
|
})))));
|
|
1922
|
-
}
|
|
1865
|
+
}
|
|
1866
|
+
function FileTree(_a) {
|
|
1867
|
+
var data = _a.data, _b = _a.color, color = _b === void 0 ? undefined : _b, _c = _a.chevronColor, chevronColor = _c === void 0 ? undefined : _c, _d = _a.contextMenu, contextMenu = _d === void 0 ? undefined : _d, _e = _a.onMouseDown, onMouseDown = _e === void 0 ? undefined : _e;
|
|
1868
|
+
var popupRef = React.useRef(null); // Ref untuk div utama
|
|
1869
|
+
var _f = useDetectOutsideClick(popupRef, false), isOpenContMenu = _f[0], setIsOpenContMenu = _f[1];
|
|
1870
|
+
var _g = React.useState({ x: 0, y: 0 }), contMenuPosition = _g[0], setContMenuPosition = _g[1];
|
|
1871
|
+
var menuStyle = {
|
|
1872
|
+
position: 'fixed',
|
|
1873
|
+
top: "".concat(contMenuPosition.y, "px"),
|
|
1874
|
+
left: "".concat(contMenuPosition.x, "px"),
|
|
1875
|
+
// Pastikan z-index cukup tinggi agar muncul di atas elemen lain
|
|
1876
|
+
zIndex: 1000,
|
|
1877
|
+
};
|
|
1878
|
+
var handleRightClick = function (event) {
|
|
1879
|
+
setIsOpenContMenu(true);
|
|
1880
|
+
setContMenuPosition({ x: event.clientX, y: event.clientY });
|
|
1881
|
+
};
|
|
1882
|
+
return (React.createElement("div", { className: "file-tree" },
|
|
1883
|
+
data.map(function (_a) {
|
|
1884
|
+
var label = _a.label, nodes = _a.nodes, props = __rest(_a, ["label", "nodes"]);
|
|
1885
|
+
return (React.createElement(TreeItem$1, __assign({ label: label, nodes: nodes, key: label, color: color, chevronColor: chevronColor, handleRightClick: handleRightClick, onMouseDownTreeItem: onMouseDown }, props)));
|
|
1886
|
+
}),
|
|
1887
|
+
isOpenContMenu && (React.createElement("div", { style: menuStyle, ref: popupRef, className: "bianic-filetree-contextmenu" }, React.isValidElement(contextMenu)
|
|
1888
|
+
? // Kirimkan handleItemClick sebagai props onClick ke setiap MenuItem
|
|
1889
|
+
React.cloneElement(contextMenu, {
|
|
1890
|
+
isWithOverlay: false,
|
|
1891
|
+
onClickItem: function () { return setIsOpenContMenu(false); },
|
|
1892
|
+
})
|
|
1893
|
+
: contextMenu))));
|
|
1894
|
+
}
|
|
1923
1895
|
|
|
1924
|
-
|
|
1925
|
-
var data = _a.data, expandedData = _a.expandedData, setExpandedData = _a.setExpandedData, dataMap = _a.dataMap,
|
|
1896
|
+
function TreeItem(_a) {
|
|
1897
|
+
var data = _a.data, expandedData = _a.expandedData, setExpandedData = _a.setExpandedData, dataMap = _a.dataMap, _b = _a.activeUnitId, activeUnitId = _b === void 0 ? undefined : _b, _c = _a.handleChevronClick, handleChevronClick = _c === void 0 ? undefined : _c, _d = _a.handleRightClick, handleRightClick = _d === void 0 ? undefined : _d, _e = _a.handleCLick, handleCLick = _e === void 0 ? undefined : _e;
|
|
1926
1898
|
var isExpanded = !!expandedData.get(data.id);
|
|
1927
1899
|
var toogleExpand = function () {
|
|
1928
1900
|
var isCurrentlyExpanded = !!expandedData.get(data.id);
|
|
@@ -1942,7 +1914,8 @@ var TreeItem = function (_a) {
|
|
|
1942
1914
|
var current = data;
|
|
1943
1915
|
while (current) {
|
|
1944
1916
|
newExpandedState.set(current.id, true);
|
|
1945
|
-
current =
|
|
1917
|
+
current =
|
|
1918
|
+
current.parent != null ? dataMap.get(current.parent) : undefined;
|
|
1946
1919
|
}
|
|
1947
1920
|
}
|
|
1948
1921
|
setExpandedData(newExpandedState);
|
|
@@ -1966,7 +1939,7 @@ var TreeItem = function (_a) {
|
|
|
1966
1939
|
handleRightClick === null || handleRightClick === void 0 ? void 0 : handleRightClick(data);
|
|
1967
1940
|
} }, data.label)),
|
|
1968
1941
|
isExpanded && data.children && (React.createElement("div", { className: "tree-item-children flex flex-col gap-0.5 rounded-radius-sm pl-[18px]" }, data.children.map(function (childUnit) { return (React.createElement(TreeItem, { key: childUnit.id, data: childUnit, expandedData: expandedData, setExpandedData: setExpandedData, dataMap: dataMap, activeUnitId: activeUnitId, handleRightClick: handleRightClick, handleCLick: handleCLick })); })))));
|
|
1969
|
-
}
|
|
1942
|
+
}
|
|
1970
1943
|
|
|
1971
1944
|
var defaultAlias = {
|
|
1972
1945
|
id: null,
|
|
@@ -1995,12 +1968,15 @@ var useFileTree = function (data, alias) {
|
|
|
1995
1968
|
var tree = [];
|
|
1996
1969
|
// First, create a map of all items
|
|
1997
1970
|
data.forEach(function (unit) {
|
|
1998
|
-
|
|
1971
|
+
var transformed = unitTransformator(unit, usedAlias);
|
|
1972
|
+
map.set(transformed.id, transformed);
|
|
1999
1973
|
});
|
|
2000
1974
|
// build tree structure by linkiing children to parents
|
|
2001
1975
|
map.forEach(function (unit) {
|
|
2002
|
-
var
|
|
1976
|
+
var _a;
|
|
1977
|
+
var parent = unit.parent != null ? map.get(unit.parent) : undefined;
|
|
2003
1978
|
if (parent) {
|
|
1979
|
+
(_a = parent.children) !== null && _a !== void 0 ? _a : (parent.children = []);
|
|
2004
1980
|
// Find the correct insertion point for the new child
|
|
2005
1981
|
var insertionIndex = parent.children.findIndex(function (child) {
|
|
2006
1982
|
return unit.label.toLowerCase().localeCompare(child.label.toLowerCase()) < 0;
|
|
@@ -2097,32 +2073,66 @@ var getDropdownStyle = function (anchorRef, popupRef) {
|
|
|
2097
2073
|
}
|
|
2098
2074
|
return style;
|
|
2099
2075
|
};
|
|
2076
|
+
var noop = function () { };
|
|
2077
|
+
var isSameStyle = function (a, b) {
|
|
2078
|
+
return a.position === b.position &&
|
|
2079
|
+
a.top === b.top &&
|
|
2080
|
+
a.left === b.left &&
|
|
2081
|
+
a.right === b.right &&
|
|
2082
|
+
a.bottom === b.bottom;
|
|
2083
|
+
};
|
|
2100
2084
|
var usePopupPosition = function (anchorRef, popupRef, position) {
|
|
2101
2085
|
if (!anchorRef || !popupRef) {
|
|
2102
|
-
return [{},
|
|
2086
|
+
return [{}, noop];
|
|
2103
2087
|
}
|
|
2104
2088
|
var _a = React.useState(0), repeateRender = _a[0], setRepeateRender = _a[1];
|
|
2105
2089
|
var _b = React.useState({}), positionStyle = _b[0], setPositionStyle = _b[1];
|
|
2106
|
-
var
|
|
2090
|
+
var resizeObserverRef = React.useRef(null);
|
|
2091
|
+
var observedNodesRef = React.useRef({ popup: null, anchor: null });
|
|
2092
|
+
var calcPosition = React.useCallback(function () {
|
|
2107
2093
|
var newStyle = position !== undefined
|
|
2108
2094
|
? getContextualPopupStyle(anchorRef, popupRef, position)
|
|
2109
2095
|
: getDropdownStyle(anchorRef, popupRef);
|
|
2110
|
-
|
|
2111
|
-
|
|
2096
|
+
// Keep the same object when nothing changed, so React skips the re-render
|
|
2097
|
+
setPositionStyle(function (prev) { return (isSameStyle(prev, newStyle) ? prev : newStyle); });
|
|
2098
|
+
}, [anchorRef, popupRef, position]);
|
|
2099
|
+
var calcPositionRef = React.useRef(calcPosition);
|
|
2100
|
+
calcPositionRef.current = calcPosition;
|
|
2101
|
+
// Window listeners: mount only
|
|
2112
2102
|
React.useLayoutEffect(function () {
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
var resizeObserver = new ResizeObserver(calcPosition);
|
|
2117
|
-
resizeObserver.observe(popupRef.current);
|
|
2118
|
-
window.addEventListener('scroll', calcPosition, true);
|
|
2119
|
-
window.addEventListener('resize', calcPosition);
|
|
2103
|
+
var handler = function () { return calcPositionRef.current(); };
|
|
2104
|
+
window.addEventListener('scroll', handler, true);
|
|
2105
|
+
window.addEventListener('resize', handler);
|
|
2120
2106
|
return function () {
|
|
2121
|
-
|
|
2122
|
-
window.removeEventListener('
|
|
2123
|
-
window.removeEventListener('resize', calcPosition);
|
|
2107
|
+
window.removeEventListener('scroll', handler, true);
|
|
2108
|
+
window.removeEventListener('resize', handler);
|
|
2124
2109
|
};
|
|
2125
|
-
}, [
|
|
2110
|
+
}, []);
|
|
2111
|
+
// Follow the popup and anchor nodes that are really on screen.
|
|
2112
|
+
React.useLayoutEffect(function () {
|
|
2113
|
+
var _a;
|
|
2114
|
+
var popupNode = popupRef.current;
|
|
2115
|
+
var anchorNode = anchorRef.current;
|
|
2116
|
+
var observed = observedNodesRef.current;
|
|
2117
|
+
if (observed.popup === popupNode && observed.anchor === anchorNode)
|
|
2118
|
+
return;
|
|
2119
|
+
(_a = resizeObserverRef.current) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
2120
|
+
resizeObserverRef.current = null;
|
|
2121
|
+
observedNodesRef.current = { popup: popupNode, anchor: anchorNode };
|
|
2122
|
+
if (!popupNode || !anchorNode)
|
|
2123
|
+
return;
|
|
2124
|
+
var resizeObserver = new ResizeObserver(function () { return calcPositionRef.current(); });
|
|
2125
|
+
resizeObserver.observe(popupNode);
|
|
2126
|
+
resizeObserver.observe(anchorNode);
|
|
2127
|
+
resizeObserverRef.current = resizeObserver;
|
|
2128
|
+
calcPositionRef.current();
|
|
2129
|
+
});
|
|
2130
|
+
React.useLayoutEffect(function () { return function () {
|
|
2131
|
+
var _a;
|
|
2132
|
+
(_a = resizeObserverRef.current) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
2133
|
+
resizeObserverRef.current = null;
|
|
2134
|
+
observedNodesRef.current = { popup: null, anchor: null };
|
|
2135
|
+
}; }, []);
|
|
2126
2136
|
React.useEffect(function () {
|
|
2127
2137
|
// In projects where bianic-ui is installed,
|
|
2128
2138
|
// there is a delay in rendering styles,
|
|
@@ -2135,8 +2145,8 @@ var usePopupPosition = function (anchorRef, popupRef, position) {
|
|
|
2135
2145
|
return [positionStyle, calcPosition];
|
|
2136
2146
|
};
|
|
2137
2147
|
|
|
2138
|
-
|
|
2139
|
-
var isTopFlat = _a.isTopFlat, children = _a.children, className = _a.className, zIndex = _a.zIndex, menuRef = _a.menuRef, onClose = _a.onClose, onClickItem = _a.onClickItem,
|
|
2148
|
+
function MenuElementInner(_a) {
|
|
2149
|
+
var isTopFlat = _a.isTopFlat, children = _a.children, className = _a.className, zIndex = _a.zIndex, menuRef = _a.menuRef, onClose = _a.onClose, onClickItem = _a.onClickItem, _b = _a.style, style = _b === void 0 ? undefined : _b, _c = _a.onContextMenu, onContextMenu = _c === void 0 ? undefined : _c, restProps = __rest(_a, ["isTopFlat", "children", "className", "zIndex", "menuRef", "onClose", "onClickItem", "style", "onContextMenu"]);
|
|
2140
2150
|
var radiusClass = "rounded-b-radius-sm ".concat(!isTopFlat && 'rounded-t-radius-sm');
|
|
2141
2151
|
return (React.createElement("div", __assign({ ref: menuRef, className: "w-fit bg-bia-white shadow-[0px_3px_20px_0px_rgba(0,0,0,0.20)] ".concat(radiusClass, " ").concat(className), style: style, onContextMenu: onContextMenu }, restProps), React.Children.map(children, function (child) {
|
|
2142
2152
|
return React.isValidElement(child)
|
|
@@ -2147,11 +2157,10 @@ var MenuElement = React.forwardRef(function (_a, ref) {
|
|
|
2147
2157
|
})
|
|
2148
2158
|
: child;
|
|
2149
2159
|
})));
|
|
2150
|
-
}
|
|
2151
|
-
var
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
return null;
|
|
2160
|
+
}
|
|
2161
|
+
var MenuElement = React.forwardRef(MenuElementInner);
|
|
2162
|
+
function MenuContainer(_a) {
|
|
2163
|
+
var _b = _a.isTopFlat, isTopFlat = _b === void 0 ? false : _b, children = _a.children, _c = _a.open, open = _c === void 0 ? true : _c, _d = _a.onClose, onClose = _d === void 0 ? function () { } : _d, _e = _a.className, className = _e === void 0 ? '' : _e, _f = _a.isWithOverlay, isWithOverlay = _f === void 0 ? true : _f, _g = _a.zIndex, zIndex = _g === void 0 ? 100 : _g, _h = _a.onClickItem, onClickItem = _h === void 0 ? function () { } : _h, _j = _a.anchorRef, anchorRef = _j === void 0 ? undefined : _j, _k = _a.matchAnchorWidth, matchAnchorWidth = _k === void 0 ? undefined : _k, _l = _a.onContextMenu, onContextMenu = _l === void 0 ? undefined : _l, restProps = __rest(_a, ["isTopFlat", "children", "open", "onClose", "className", "isWithOverlay", "zIndex", "onClickItem", "anchorRef", "matchAnchorWidth", "onContextMenu"]);
|
|
2155
2164
|
var MenuContainerRef = React.useRef(null);
|
|
2156
2165
|
var positionStyle = usePopupPosition(anchorRef, MenuContainerRef)[0];
|
|
2157
2166
|
var newStyle = React.useMemo(function () {
|
|
@@ -2176,27 +2185,32 @@ var MenuContainer = function (props) {
|
|
|
2176
2185
|
break;
|
|
2177
2186
|
}
|
|
2178
2187
|
return __assign(__assign({ zIndex: zIndex + 10 }, widthStyle), positionStyle);
|
|
2179
|
-
}, [positionStyle]);
|
|
2180
|
-
|
|
2188
|
+
}, [positionStyle, anchorRef, matchAnchorWidth, zIndex]);
|
|
2189
|
+
if (!open)
|
|
2190
|
+
return null;
|
|
2191
|
+
var menuElement = (React.createElement(MenuElement, __assign({ isTopFlat: isTopFlat, className: className, zIndex: zIndex, menuRef: MenuContainerRef, onClose: onClose, onClickItem: onClickItem, style: newStyle, onContextMenu: function (e) {
|
|
2181
2192
|
return onContextMenu ? onContextMenu(e) : e.preventDefault();
|
|
2182
|
-
} }, restProps)));
|
|
2193
|
+
} }, restProps), children));
|
|
2183
2194
|
return (React.createElement(React.Fragment, null,
|
|
2184
|
-
isWithOverlay && (
|
|
2195
|
+
isWithOverlay && (
|
|
2196
|
+
// Decorative dismiss-on-click backdrop; keyboard users close via Escape, not by tabbing to it
|
|
2197
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events
|
|
2198
|
+
React.createElement("div", { className: "bianic-menu-overlay fixed left-0 top-0 z-0 h-screen w-screen", onClick: function () { return onClose(); }, style: { zIndex: zIndex }, onContextMenu: function (e) {
|
|
2185
2199
|
return onContextMenu ? onContextMenu(e) : e.preventDefault();
|
|
2186
2200
|
} })),
|
|
2187
2201
|
(anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.current)
|
|
2188
2202
|
? reactDom.createPortal(menuElement, document.body)
|
|
2189
2203
|
: menuElement));
|
|
2190
|
-
}
|
|
2191
|
-
MenuContainer.defaultProps = {
|
|
2192
|
-
isTopFlat: false,
|
|
2193
|
-
};
|
|
2204
|
+
}
|
|
2194
2205
|
|
|
2195
|
-
|
|
2206
|
+
function MenuContainerNoAnchorInner(propsComp, ref) {
|
|
2196
2207
|
var _a = propsComp.isTopFlat, isTopFlat = _a === void 0 ? false : _a, children = propsComp.children, _b = propsComp.open, open = _b === void 0 ? true : _b, _c = propsComp.onClose, onClose = _c === void 0 ? function () { } : _c, _d = propsComp.className, className = _d === void 0 ? '' : _d, _e = propsComp.isWithOverlay, isWithOverlay = _e === void 0 ? true : _e, _f = propsComp.zIndex, zIndex = _f === void 0 ? 100 : _f, _g = propsComp.onClickItem, onClickItem = _g === void 0 ? function () { } : _g, restProps = __rest(propsComp, ["isTopFlat", "children", "open", "onClose", "className", "isWithOverlay", "zIndex", "onClickItem"]);
|
|
2197
2208
|
var radiusClass = "rounded-b-radius-sm ".concat(!isTopFlat && 'rounded-t-radius-sm');
|
|
2198
2209
|
return (open && (React.createElement(React.Fragment, null,
|
|
2199
|
-
isWithOverlay && (
|
|
2210
|
+
isWithOverlay && (
|
|
2211
|
+
// Decorative dismiss-on-click backdrop; keyboard users close via Escape, not by tabbing to it
|
|
2212
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events
|
|
2213
|
+
React.createElement("div", { className: "bianic-menu-overlay fixed left-0 top-0 z-0 h-screen w-screen", onClick: function () { return onClose(); }, style: { zIndex: zIndex } })),
|
|
2200
2214
|
React.createElement("div", __assign({ className: "w-fit bg-bia-white shadow-[0px_3px_20px_0px_rgba(0,0,0,0.20)] ".concat(radiusClass, " ").concat(className), ref: ref, style: {
|
|
2201
2215
|
zIndex: zIndex + 10,
|
|
2202
2216
|
} }, restProps), React.Children.map(children, function (child) {
|
|
@@ -2209,15 +2223,13 @@ var MenuContainerNoAnchor = React.forwardRef(function MenuContainerNoAnchor(prop
|
|
|
2209
2223
|
})
|
|
2210
2224
|
: child;
|
|
2211
2225
|
})))));
|
|
2212
|
-
}
|
|
2213
|
-
MenuContainerNoAnchor
|
|
2214
|
-
isTopFlat: false,
|
|
2215
|
-
};
|
|
2226
|
+
}
|
|
2227
|
+
var MenuContainerNoAnchor = React.forwardRef(MenuContainerNoAnchorInner);
|
|
2216
2228
|
|
|
2217
2229
|
function MenuItem(_a) {
|
|
2218
|
-
var _b = _a.className, className = _b === void 0 ? '' : _b, label = _a.label, _c = _a.onClick, onClick = _c === void 0 ? function () { } : _c, _d = _a.caption, caption = _d === void 0 ? undefined : _d, _e = _a.isChecked, isChecked = _e === void 0 ? undefined : _e, _f = _a.onClose, onClose = _f === void 0 ? function () { } : _f,
|
|
2219
|
-
var
|
|
2220
|
-
var
|
|
2230
|
+
var _b = _a.className, className = _b === void 0 ? '' : _b, label = _a.label, _c = _a.onClick, onClick = _c === void 0 ? function () { } : _c, _d = _a.caption, caption = _d === void 0 ? undefined : _d, _e = _a.isChecked, isChecked = _e === void 0 ? undefined : _e, _f = _a.onClose, onClose = _f === void 0 ? function () { } : _f, _g = _a.children, children = _g === void 0 ? undefined : _g, _h = _a.zIndex, zIndex = _h === void 0 ? 100 : _h, _j = _a.inheritedOnClick, inheritedOnClick = _j === void 0 ? function () { } : _j, _k = _a.disabled, disabled = _k === void 0 ? false : _k, props = __rest(_a, ["className", "label", "onClick", "caption", "isChecked", "onClose", "children", "zIndex", "inheritedOnClick", "disabled"]);
|
|
2231
|
+
var _l = React.useState(false), isHovered = _l[0], setIsHovered = _l[1];
|
|
2232
|
+
var _m = React.useState(false), isLeft = _m[0], setIsLeft = _m[1];
|
|
2221
2233
|
var isWithChecked = isChecked !== undefined;
|
|
2222
2234
|
var leftPadding = isWithChecked ? 'pl-[5px]' : 'pl-[10px]';
|
|
2223
2235
|
var rightPadding = caption || children ? 'pr-[5px]' : 'pr-[10px]';
|
|
@@ -2253,37 +2265,14 @@ function MenuItem(_a) {
|
|
|
2253
2265
|
children === undefined && caption && (React.createElement("span", { className: "ml-[30px] whitespace-nowrap text-[11px] ".concat(disabled ? 'text-bia-coolgrey-light-50' : 'text-bia-coolgrey') }, caption)))),
|
|
2254
2266
|
children && !disabled && (React.createElement(MenuContainerNoAnchor, { open: isHovered, onClose: onClose, className: "absolute top-0 bg-primary-white shadow-[0px_3px_20px_0px_rgba(0,0,0,0.20)] group-first/main:top-[6px] ".concat(translateClass), ref: MenuContRef, zIndex: currentZIndex + 10, onClickItem: function () { return inheritedOnClick(); } }, children))));
|
|
2255
2267
|
}
|
|
2256
|
-
MenuItem.defaultProps = {
|
|
2257
|
-
className: '',
|
|
2258
|
-
onClick: function () { },
|
|
2259
|
-
};
|
|
2260
2268
|
|
|
2261
|
-
function Tooltip(props) {
|
|
2262
|
-
var children = props.children, content = props.content, delay = props.delay, _a = props.direction, direction = _a === void 0 ? 'top' : _a, _b = props.maxWidth, maxWidth = _b === void 0 ? undefined : _b, _c = props.zIndex, zIndex = _c === void 0 ? 150 : _c, bgColor = props.bgColor, textColor = props.textColor, className = props.className, style = props.style;
|
|
2263
|
-
var timeout;
|
|
2264
|
-
var _d = React.useState(false), active = _d[0], setActive = _d[1];
|
|
2265
|
-
var anchorRef = React.useRef(null);
|
|
2266
|
-
var tooltipContainerRef = React.useRef(null);
|
|
2267
|
-
var showTip = function () {
|
|
2268
|
-
timeout = setTimeout(function () {
|
|
2269
|
-
setActive(true);
|
|
2270
|
-
}, delay || 400);
|
|
2271
|
-
};
|
|
2272
|
-
var hideTip = function () {
|
|
2273
|
-
clearInterval(timeout);
|
|
2274
|
-
setActive(false);
|
|
2275
|
-
};
|
|
2276
|
-
return (React.createElement("div", { className: "tooltip-wrapper relative inline-flex h-fit w-fit flex-col", onMouseEnter: showTip, onMouseLeave: hideTip, ref: anchorRef },
|
|
2277
|
-
children,
|
|
2278
|
-
active && (React.createElement(TooltipItem, { anchorRef: anchorRef, direction: direction, content: content, tooltipContainerRef: tooltipContainerRef, bgColor: bgColor, textColor: textColor, zIndex: zIndex, className: className, style: style, active: active, maxWidth: maxWidth }))));
|
|
2279
|
-
}
|
|
2280
2269
|
var TooltipItem = function (_a) {
|
|
2281
|
-
var anchorRef = _a.anchorRef, className = _a.className, content = _a.content, direction = _a.direction, style = _a.style, tooltipContainerRef = _a.tooltipContainerRef, _b = _a.bgColor, bgColor = _b === void 0 ? 'bia-black' : _b, _c = _a.textColor, textColor = _c === void 0 ? 'bia-white' : _c, zIndex = _a.zIndex
|
|
2270
|
+
var anchorRef = _a.anchorRef, className = _a.className, content = _a.content, direction = _a.direction, style = _a.style, tooltipContainerRef = _a.tooltipContainerRef, _b = _a.bgColor, bgColor = _b === void 0 ? 'bia-black' : _b, _c = _a.textColor, textColor = _c === void 0 ? 'bia-white' : _c, zIndex = _a.zIndex, maxWidth = _a.maxWidth;
|
|
2282
2271
|
var positionStyle = usePopupPosition(anchorRef, tooltipContainerRef, direction)[0];
|
|
2283
|
-
var
|
|
2284
|
-
maxWidth: maxWidth
|
|
2272
|
+
var _d = React.useState({
|
|
2273
|
+
maxWidth: "".concat(maxWidth, "px"),
|
|
2285
2274
|
whiteSpace: 'nowrap',
|
|
2286
|
-
}), tooltipContainerStyle =
|
|
2275
|
+
}), tooltipContainerStyle = _d[0], setTooltipContainerStyle = _d[1];
|
|
2287
2276
|
var tooltipContainerElement = tooltipContainerRef === null || tooltipContainerRef === void 0 ? void 0 : tooltipContainerRef.current;
|
|
2288
2277
|
var scrollWidth = tooltipContainerElement === null || tooltipContainerElement === void 0 ? void 0 : tooltipContainerElement.scrollWidth; // Mendapatkan lebar konten aktual
|
|
2289
2278
|
var offsetWidth = tooltipContainerElement === null || tooltipContainerElement === void 0 ? void 0 : tooltipContainerElement.offsetWidth;
|
|
@@ -2310,23 +2299,36 @@ var TooltipItem = function (_a) {
|
|
|
2310
2299
|
var newWhiteSpace_1 = 'nowrap';
|
|
2311
2300
|
if (scrollWidth > maxWidthNumber ||
|
|
2312
2301
|
(offsetWidth === maxWidthNumber && isMultiLine)) {
|
|
2313
|
-
newWidth_1 = maxWidthNumber
|
|
2302
|
+
newWidth_1 = "".concat(maxWidthNumber, "px");
|
|
2314
2303
|
newWhiteSpace_1 = 'normal';
|
|
2315
2304
|
}
|
|
2316
2305
|
setTooltipContainerStyle(function (prev) { return (__assign(__assign({}, prev), { width: newWidth_1, whiteSpace: newWhiteSpace_1 })); });
|
|
2317
2306
|
}
|
|
2318
|
-
}, [content, maxWidth, scrollWidth, offsetHeight]);
|
|
2307
|
+
}, [content, maxWidth, scrollWidth, offsetWidth, offsetHeight]);
|
|
2319
2308
|
return reactDom.createPortal(React.createElement("div", { className: "tooltip-container break-word absolute inline-block break-all rounded-[4px] bg-".concat(bgColor, " px-[7px] py-[4px] text-size-sm text-").concat(textColor, " ").concat(className), style: __assign(__assign(__assign({ zIndex: zIndex }, positionStyle), tooltipContainerStyle), style), ref: tooltipContainerRef }, content), document.body);
|
|
2320
2309
|
};
|
|
2321
|
-
Tooltip
|
|
2322
|
-
delay:
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2310
|
+
function Tooltip(props) {
|
|
2311
|
+
var children = props.children, content = props.content, delay = props.delay, _a = props.direction, direction = _a === void 0 ? 'top' : _a, _b = props.maxWidth, maxWidth = _b === void 0 ? undefined : _b, _c = props.zIndex, zIndex = _c === void 0 ? 150 : _c, bgColor = props.bgColor, textColor = props.textColor, className = props.className, style = props.style;
|
|
2312
|
+
var timeout;
|
|
2313
|
+
var _d = React.useState(false), active = _d[0], setActive = _d[1];
|
|
2314
|
+
var anchorRef = React.useRef(null);
|
|
2315
|
+
var tooltipContainerRef = React.useRef(null);
|
|
2316
|
+
var showTip = function () {
|
|
2317
|
+
timeout = setTimeout(function () {
|
|
2318
|
+
setActive(true);
|
|
2319
|
+
}, delay || 400);
|
|
2320
|
+
};
|
|
2321
|
+
var hideTip = function () {
|
|
2322
|
+
clearInterval(timeout);
|
|
2323
|
+
setActive(false);
|
|
2324
|
+
};
|
|
2325
|
+
return (React.createElement("div", { className: "tooltip-wrapper relative inline-flex h-fit w-fit flex-col", onMouseEnter: showTip, onMouseLeave: hideTip, ref: anchorRef },
|
|
2326
|
+
children,
|
|
2327
|
+
active && (React.createElement(TooltipItem, { anchorRef: anchorRef, direction: direction, content: content, tooltipContainerRef: tooltipContainerRef, bgColor: bgColor, textColor: textColor, zIndex: zIndex, className: className, style: style, maxWidth: maxWidth }))));
|
|
2328
|
+
}
|
|
2327
2329
|
|
|
2328
|
-
|
|
2329
|
-
var children = _a.children,
|
|
2330
|
+
function FormLabel(_a) {
|
|
2331
|
+
var children = _a.children, _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.htmlFor, htmlFor = _c === void 0 ? undefined : _c, _d = _a.readOnly, readOnly = _d === void 0 ? false : _d, _e = _a.required, required = _e === void 0 ? false : _e, _f = _a.size, size = _f === void 0 ? 'sm' : _f, _g = _a.fontWeight, fontWeight = _g === void 0 ? 'semibold' : _g;
|
|
2330
2332
|
var labelpointer = readOnly ? 'pointer-events-none' : '';
|
|
2331
2333
|
var labelSize = size === 'sm' ? 'text-size-sm' : 'text-size-md';
|
|
2332
2334
|
var labelFontWeight = fontWeight === 'semibold' ? 'font-semibold' : 'font-normal';
|
|
@@ -2337,18 +2339,10 @@ var FormLabel = function (_a) {
|
|
|
2337
2339
|
if (required)
|
|
2338
2340
|
return (React.createElement(Tooltip, { content: "Required", delay: 2000, direction: "right" }, labelContent));
|
|
2339
2341
|
return labelContent;
|
|
2340
|
-
}
|
|
2341
|
-
FormLabel.defaultProps = {
|
|
2342
|
-
className: '',
|
|
2343
|
-
htmlFor: undefined,
|
|
2344
|
-
required: false,
|
|
2345
|
-
readOnly: false,
|
|
2346
|
-
size: 'sm',
|
|
2347
|
-
fontWeight: 'semibold',
|
|
2348
|
-
};
|
|
2342
|
+
}
|
|
2349
2343
|
|
|
2350
2344
|
function PasswordIcon(_a) {
|
|
2351
|
-
var isShow = _a.isShow,
|
|
2345
|
+
var isShow = _a.isShow, showHandler = _a.showHandler, iconSize = _a.iconSize, disabled = _a.disabled;
|
|
2352
2346
|
var iconColor = disabled ? '#8b8ba6' : '#5E5EEA';
|
|
2353
2347
|
if (isShow) {
|
|
2354
2348
|
return (React.createElement(TbEye, { onClick: function () { return showHandler(false); }, style: {
|
|
@@ -2362,7 +2356,7 @@ function PasswordIcon(_a) {
|
|
|
2362
2356
|
function ValidationIcon(_a) {
|
|
2363
2357
|
var isValid = _a.isValid, iconSize = _a.iconSize;
|
|
2364
2358
|
if (isValid) {
|
|
2365
|
-
return
|
|
2359
|
+
return React.createElement(TbCheck, { className: "text-bia-green", style: { fontSize: iconSize } });
|
|
2366
2360
|
}
|
|
2367
2361
|
return React.createElement(TbX, { className: "text-bia-red", style: { fontSize: iconSize } });
|
|
2368
2362
|
}
|
|
@@ -2403,13 +2397,12 @@ var styleConfig = {
|
|
|
2403
2397
|
};
|
|
2404
2398
|
|
|
2405
2399
|
var TextInput = React.forwardRef(function (_a, ref) {
|
|
2406
|
-
var descText = _a.descText, _b = _a.disabled, disabled = _b === void 0 ? false : _b, icon = _a.icon, _c = _a.id, id = _c === void 0 ? '' : _c, _d = _a.size, size = _d === void 0 ? 'md' : _d, _e = _a.isValid, isValid = _e === void 0 ? null : _e, label = _a.label, _f = _a.placeholder, placeholder = _f === void 0 ? '' : _f, _g = _a.readOnly, readOnly = _g === void 0 ? false : _g, _h = _a.required, required = _h === void 0 ? false : _h, _j = _a.variant, variant = _j === void 0 ? 'text' : _j, _k = _a.value, value = _k === void 0 ? undefined : _k, _l = _a.onChange, onChange = _l === void 0 ? function () { } : _l, _m = _a.maxLength, maxLength = _m === void 0 ? undefined : _m, _o = _a.inputClassName, inputClassName = _o === void 0 ? '' : _o
|
|
2400
|
+
var descText = _a.descText, _b = _a.disabled, disabled = _b === void 0 ? false : _b, icon = _a.icon, _c = _a.id, id = _c === void 0 ? '' : _c, _d = _a.size, size = _d === void 0 ? 'md' : _d, _e = _a.isValid, isValid = _e === void 0 ? null : _e, label = _a.label, _f = _a.placeholder, placeholder = _f === void 0 ? '' : _f, _g = _a.readOnly, readOnly = _g === void 0 ? false : _g, _h = _a.required, required = _h === void 0 ? false : _h, _j = _a.variant, variant = _j === void 0 ? 'text' : _j, _k = _a.value, value = _k === void 0 ? undefined : _k, _l = _a.onChange, onChange = _l === void 0 ? function () { } : _l, _m = _a.maxLength, maxLength = _m === void 0 ? undefined : _m, _o = _a.inputClassName, inputClassName = _o === void 0 ? '' : _o, actionElement = _a.actionElement, _p = _a.autoComplete, autoComplete = _p === void 0 ? 'off' : _p, props = __rest(_a, ["descText", "disabled", "icon", "id", "size", "isValid", "label", "placeholder", "readOnly", "required", "variant", "value", "onChange", "maxLength", "inputClassName", "actionElement", "autoComplete"]);
|
|
2407
2401
|
var isTransparent = variant.includes('transparent');
|
|
2408
|
-
var
|
|
2409
|
-
var
|
|
2410
|
-
var
|
|
2411
|
-
? __assign(__assign({}, sizeConfig$d[size]), { iconPosition: "right-0 ", fieldSize: sizeConfig$d[size].fieldSize +
|
|
2412
|
-
" pe-[".concat(9 + sizeConfig$d[size].iconSize, "px]") }) : sizeConfig$d[size], iconSize = _t.iconSize, fieldSize = _t.fieldSize, iconPosition = _t.iconPosition;
|
|
2402
|
+
var _q = React.useState(false), isShow = _q[0], setIsShow = _q[1];
|
|
2403
|
+
var _r = styleConfig[variant], fieldStyle = _r.fieldStyle, iconStyle = _r.iconStyle;
|
|
2404
|
+
var _s = isTransparent
|
|
2405
|
+
? __assign(__assign({}, sizeConfig$d[size]), { iconPosition: "right-0 ", fieldSize: "".concat(sizeConfig$d[size].fieldSize, " pe-[").concat(9 + sizeConfig$d[size].iconSize, "px]") }) : sizeConfig$d[size], iconSize = _s.iconSize, fieldSize = _s.fieldSize, iconPosition = _s.iconPosition;
|
|
2413
2406
|
var borderStyle = isTransparent
|
|
2414
2407
|
? 'border-transparent bg-transparent' // customize border rule for transparent variant
|
|
2415
2408
|
: 'border border-bia-grey-dark-10 bg-primary-white';
|
|
@@ -2524,16 +2517,16 @@ Radio.defaultProps = {
|
|
|
2524
2517
|
};
|
|
2525
2518
|
Radio.displayName = 'Radio';
|
|
2526
2519
|
|
|
2527
|
-
|
|
2528
|
-
var
|
|
2520
|
+
function ResizeIcon(_a) {
|
|
2521
|
+
var _b = _a.className, className = _b === void 0 ? undefined : _b;
|
|
2529
2522
|
return (React.createElement("svg", { width: "9", height: "9", viewBox: "0 0 9 9", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "bianic-resize-icon ".concat(className) },
|
|
2530
2523
|
React.createElement("line", { x1: "0.646447", y1: "8.64645", x2: "8.64645", y2: "0.646447", stroke: "#DADEEB" }),
|
|
2531
|
-
React.createElement("line", { x1: "0.646447", y1: "8.64645", x2: "8.64645", y2: "0.646447", stroke: "black",
|
|
2524
|
+
React.createElement("line", { x1: "0.646447", y1: "8.64645", x2: "8.64645", y2: "0.646447", stroke: "black", strokeOpacity: "0.1" }),
|
|
2532
2525
|
React.createElement("line", { y1: "-0.5", x2: "7.54247", y2: "-0.5", transform: "matrix(0.707106 -0.707107 0.707106 0.707107 3.66602 9)", stroke: "#DADEEB" }),
|
|
2533
|
-
React.createElement("line", { y1: "-0.5", x2: "7.54247", y2: "-0.5", transform: "matrix(0.707106 -0.707107 0.707106 0.707107 3.66602 9)", stroke: "black",
|
|
2526
|
+
React.createElement("line", { y1: "-0.5", x2: "7.54247", y2: "-0.5", transform: "matrix(0.707106 -0.707107 0.707106 0.707107 3.66602 9)", stroke: "black", strokeOpacity: "0.1" }),
|
|
2534
2527
|
React.createElement("line", { y1: "-0.5", x2: "3.77124", y2: "-0.5", transform: "matrix(0.707106 -0.707108 0.707106 0.707108 6.33398 9)", stroke: "#DADEEB" }),
|
|
2535
|
-
React.createElement("line", { y1: "-0.5", x2: "3.77124", y2: "-0.5", transform: "matrix(0.707106 -0.707108 0.707106 0.707108 6.33398 9)", stroke: "black",
|
|
2536
|
-
}
|
|
2528
|
+
React.createElement("line", { y1: "-0.5", x2: "3.77124", y2: "-0.5", transform: "matrix(0.707106 -0.707108 0.707106 0.707108 6.33398 9)", stroke: "black", strokeOpacity: "0.1" })));
|
|
2529
|
+
}
|
|
2537
2530
|
|
|
2538
2531
|
var sizeConfig$b = {
|
|
2539
2532
|
md: {
|
|
@@ -2544,8 +2537,8 @@ var sizeConfig$b = {
|
|
|
2544
2537
|
},
|
|
2545
2538
|
};
|
|
2546
2539
|
|
|
2547
|
-
|
|
2548
|
-
var
|
|
2540
|
+
function TextAreaInner(_a, ref) {
|
|
2541
|
+
var _b = _a.descText, descText = _b === void 0 ? '' : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c, _d = _a.id, id = _d === void 0 ? '' : _d, _e = _a.size, size = _e === void 0 ? 'md' : _e, _f = _a.label, label = _f === void 0 ? '' : _f, _g = _a.placeholder, placeholder = _g === void 0 ? 'Write here ...' : _g, _h = _a.required, required = _h === void 0 ? false : _h, _j = _a.rows, rows = _j === void 0 ? 4 : _j, _k = _a.maxLength, maxLength = _k === void 0 ? undefined : _k, _l = _a.value, value = _l === void 0 ? '' : _l, _m = _a.readOnly, readOnly = _m === void 0 ? false : _m, _o = _a.autoComplete, autoComplete = _o === void 0 ? 'off' : _o, _p = _a.isValid, isValid = _p === void 0 ? null : _p, textAreaClassName = _a.className, props = __rest(_a, ["descText", "disabled", "id", "size", "label", "placeholder", "required", "rows", "maxLength", "value", "readOnly", "autoComplete", "isValid", "className"]);
|
|
2549
2542
|
var inputRow = rows !== null && rows !== void 0 ? rows : 4;
|
|
2550
2543
|
var inputClass = sizeConfig$b[size].inputClass;
|
|
2551
2544
|
var remainWords = maxLength ? maxLength - (value ? value.length : 0) : 0;
|
|
@@ -2576,19 +2569,8 @@ var TextArea = React.forwardRef(function (_a, ref) {
|
|
|
2576
2569
|
"/",
|
|
2577
2570
|
maxLength,
|
|
2578
2571
|
' ')))));
|
|
2579
|
-
}
|
|
2580
|
-
TextArea
|
|
2581
|
-
disabled: false,
|
|
2582
|
-
descText: '',
|
|
2583
|
-
id: '',
|
|
2584
|
-
size: 'md',
|
|
2585
|
-
label: '',
|
|
2586
|
-
placeholder: 'Write here ...',
|
|
2587
|
-
required: false,
|
|
2588
|
-
rows: 4,
|
|
2589
|
-
maxLength: undefined,
|
|
2590
|
-
value: '',
|
|
2591
|
-
};
|
|
2572
|
+
}
|
|
2573
|
+
var TextArea = React.forwardRef(TextAreaInner);
|
|
2592
2574
|
|
|
2593
2575
|
var sizeConfig$a = {
|
|
2594
2576
|
md: {
|
|
@@ -2607,8 +2589,8 @@ var sizeConfig$a = {
|
|
|
2607
2589
|
|
|
2608
2590
|
var sizeUnion$3 = ['md', 'sm', 'tn'];
|
|
2609
2591
|
function Checkbox(_a) {
|
|
2610
|
-
var _b = _a.disabled, disabled = _b === void 0 ? false : _b,
|
|
2611
|
-
var
|
|
2592
|
+
var _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.id, id = _c === void 0 ? '' : _c, _d = _a.size, size = _d === void 0 ? 'md' : _d, _e = _a.label, label = _e === void 0 ? '' : _e, _f = _a.onChange, onChange = _f === void 0 ? function () { } : _f, _g = _a.isIndeterminate, isIndeterminate = _g === void 0 ? false : _g, props = __rest(_a, ["disabled", "id", "size", "label", "onChange", "isIndeterminate"]);
|
|
2593
|
+
var _h = sizeConfig$a[validUnion(size, sizeUnion$3)], checkClass = _h.checkClass, labelClass = _h.labelClass;
|
|
2612
2594
|
var isValidIndeterminate = isIndeterminate && props.checked;
|
|
2613
2595
|
var backgroundClass = size === 'tn' && props.checked ? 'bg-bia-blue' : 'bg-bia-white';
|
|
2614
2596
|
var peerCheckedClass = size === 'tn' ? '' : 'peer-checked:border-2';
|
|
@@ -2618,14 +2600,6 @@ function Checkbox(_a) {
|
|
|
2618
2600
|
React.createElement("div", { className: "check-icon z-1 group flex h-full w-full items-center justify-center rounded-full text-bia-grey outline-2 outline-transparent peer-checked:border-primary-white peer-checked:bg-bia-blue peer-checked:hover:border-bia-blue-hover peer-checked:hover:outline-bia-blue-hover peer-checked:peer-hover:bg-bia-blue-hover peer-focus-visible:outline-bia-blue peer-disabled:bg-bia-grey-light-80 peer-disabled:peer-checked:bg-bia-blue-light-50 peer-disabled:peer-checked:outline-bia-blue-light-50 ".concat(peerCheckedClass) }, isValidIndeterminate ? (React.createElement(TbMinus, { className: "stroke-[3px] text-bia-grey-dark-10 peer-checked:group-[]:text-bia-white peer-hover:group-[]:text-bia-blue-hover peer-checked:peer-hover:group-[]:text-bia-white peer-disabled:group-[]:text-bia-grey-dark-10 peer-disabled:peer-checked:group-[]:text-bia-white", size: 14 })) : (React.createElement(TbCheck, { className: "stroke-[3px] text-bia-grey-dark-10 peer-checked:group-[]:text-bia-white peer-hover:group-[]:text-bia-blue-hover peer-checked:peer-hover:group-[]:text-bia-white peer-disabled:group-[]:text-bia-grey-dark-10 peer-disabled:peer-checked:group-[]:text-bia-white", size: 14 })))),
|
|
2619
2601
|
label && (React.createElement("label", { htmlFor: id, className: "ml-2 leading-4 text-primary-black ".concat(labelClass), style: { color: disabled ? '#8C8CA6' : '' } }, childrenElement(label)))));
|
|
2620
2602
|
}
|
|
2621
|
-
Checkbox.defaultProps = {
|
|
2622
|
-
disabled: false,
|
|
2623
|
-
id: '',
|
|
2624
|
-
size: 'md',
|
|
2625
|
-
checked: false,
|
|
2626
|
-
label: '',
|
|
2627
|
-
onChange: function () { },
|
|
2628
|
-
};
|
|
2629
2603
|
|
|
2630
2604
|
var sizeConfig$9 = {
|
|
2631
2605
|
md: {
|
|
@@ -2651,12 +2625,12 @@ var sizeConfig$8 = {
|
|
|
2651
2625
|
|
|
2652
2626
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2653
2627
|
function CustomDropdownItem(_a) {
|
|
2654
|
-
var _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.onClick, onClick = _c === void 0 ? function () { } : _c, _d = _a.size, size = _d === void 0 ? 'md' : _d,
|
|
2655
|
-
var
|
|
2656
|
-
var
|
|
2628
|
+
var _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.onClick, onClick = _c === void 0 ? function () { } : _c, _d = _a.size, size = _d === void 0 ? 'md' : _d, _e = _a.isSelected, isSelected = _e === void 0 ? false : _e, _f = _a.options, options = _f === void 0 ? [] : _f, _g = _a.children, children = _g === void 0 ? undefined : _g;
|
|
2629
|
+
var _h = React.useState(false), isHovered = _h[0], setisHovered = _h[1];
|
|
2630
|
+
var _j = React.useState(false), isHoveredSubMenu = _j[0], setIsHoveredSubMenu = _j[1];
|
|
2657
2631
|
var isOpenDropdown = isHovered || isHoveredSubMenu;
|
|
2658
2632
|
var selectedClass = isSelected ? 'font-semibold' : 'font-normal';
|
|
2659
|
-
var
|
|
2633
|
+
var _k = sizeConfig$8[size], containerClass = _k.container, item = _k.item;
|
|
2660
2634
|
var itemClass = "".concat(item, " ").concat(selectedClass, " ").concat(className);
|
|
2661
2635
|
var isExistSubDropdown = options.length !== 0;
|
|
2662
2636
|
return (React.createElement("div", { className: "relative w-full focus-visible:outline-bia-blue-light-50 ".concat(containerClass), tabIndex: 0, role: "button", onClick: function (e) { return onClick(e); }, onMouseEnter: function () { return setisHovered(true); }, onMouseLeave: function () { return setisHovered(false); }, onKeyDown: function () { } },
|
|
@@ -2667,23 +2641,15 @@ function CustomDropdownItem(_a) {
|
|
|
2667
2641
|
return option.custom || option.children ? (React.createElement(CustomDropdownItem, { size: size, options: option.options }, option.custom || option.children)) : (React.createElement(DefaultDropdownItem, { label: option.label, size: size, options: option.options }));
|
|
2668
2642
|
})))));
|
|
2669
2643
|
}
|
|
2670
|
-
CustomDropdownItem.defaultProps = {
|
|
2671
|
-
className: '',
|
|
2672
|
-
onClick: function () { },
|
|
2673
|
-
size: 'md',
|
|
2674
|
-
options: [],
|
|
2675
|
-
isSelected: false,
|
|
2676
|
-
caption: '',
|
|
2677
|
-
};
|
|
2678
2644
|
|
|
2679
2645
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2680
2646
|
function DefaultDropdownItem(_a) {
|
|
2681
|
-
var _b = _a.className, className = _b === void 0 ? '' : _b,
|
|
2682
|
-
var
|
|
2683
|
-
var
|
|
2647
|
+
var _b = _a.className, className = _b === void 0 ? '' : _b, label = _a.label, _c = _a.onClick, onClick = _c === void 0 ? function () { } : _c, _d = _a.size, size = _d === void 0 ? 'md' : _d, _e = _a.isSelected, isSelected = _e === void 0 ? false : _e, _f = _a.options, options = _f === void 0 ? [] : _f, _g = _a.caption, caption = _g === void 0 ? '' : _g;
|
|
2648
|
+
var _h = React.useState(false), isHovered = _h[0], setisHovered = _h[1];
|
|
2649
|
+
var _j = React.useState(false), isHoveredSubMenu = _j[0], setIsHoveredSubMenu = _j[1];
|
|
2684
2650
|
var isOpenDropdown = isHovered || isHoveredSubMenu;
|
|
2685
2651
|
var selectedClass = isSelected ? 'font-semibold' : 'font-normal';
|
|
2686
|
-
var
|
|
2652
|
+
var _k = sizeConfig$8[size], containerClass = _k.container, item = _k.item;
|
|
2687
2653
|
var itemClass = "".concat(item, " ").concat(selectedClass, " ").concat(className);
|
|
2688
2654
|
var isExistSubDropdown = options.length !== 0;
|
|
2689
2655
|
return (React.createElement("div", { className: "relative w-full focus-visible:outline-bia-blue-light-50 ".concat(containerClass), tabIndex: 0, role: "button", onClick: function (e) { return onClick(e); }, onMouseEnter: function () { return setisHovered(true); }, onMouseLeave: function () { return setisHovered(false); }, onKeyDown: function () { } },
|
|
@@ -2696,92 +2662,6 @@ function DefaultDropdownItem(_a) {
|
|
|
2696
2662
|
return option.custom || option.children ? (React.createElement(CustomDropdownItem, { size: size, options: option.options }, option.custom || option.children)) : (React.createElement(DefaultDropdownItem, { label: option.label, size: size, options: option.options }));
|
|
2697
2663
|
})))));
|
|
2698
2664
|
}
|
|
2699
|
-
DefaultDropdownItem.defaultProps = {
|
|
2700
|
-
className: '',
|
|
2701
|
-
onClick: function () { },
|
|
2702
|
-
size: 'md',
|
|
2703
|
-
options: [],
|
|
2704
|
-
isSelected: false,
|
|
2705
|
-
caption: '',
|
|
2706
|
-
};
|
|
2707
|
-
|
|
2708
|
-
var sizeUnion$2 = ['md', 'sm'];
|
|
2709
|
-
function SelectInput(_a) {
|
|
2710
|
-
var descText = _a.descText, _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.size, size = _c === void 0 ? 'md' : _c, id = _a.id, _d = _a.isValid, isValid = _d === void 0 ? null : _d, label = _a.label, _e = _a.options, options = _e === void 0 ? [] : _e, _f = _a.readOnly, readOnly = _f === void 0 ? false : _f, _g = _a.required, required = _g === void 0 ? false : _g, selected = _a.selected, setSelected = _a.setSelected, _h = _a.onClickDropdown, onClickDropdown = _h === void 0 ? function () { } : _h, children = _a.children, _j = _a.dropContProps, _k = _j === void 0 ? {} : _j, _l = _k.className, dropContClassName = _l === void 0 ? '' : _l, restDropContProps = __rest(_k, ["className"]), props = __rest(_a, ["descText", "disabled", "size", "id", "isValid", "label", "options", "readOnly", "required", "selected", "setSelected", "onClickDropdown", "children", "dropContProps"]);
|
|
2711
|
-
var _m = React.useState(false), isOpen = _m[0], setIsOpen = _m[1];
|
|
2712
|
-
var validatedSize = validUnion(size, sizeUnion$2);
|
|
2713
|
-
var _o = sizeConfig$9[validatedSize], searchSize = _o.searchSize, iconSize = _o.iconSize;
|
|
2714
|
-
var inputRef = React.useRef(null);
|
|
2715
|
-
var isObjectOptionItem = false;
|
|
2716
|
-
if (options.every(function (item) { return typeof item === 'object' && item !== null; }))
|
|
2717
|
-
isObjectOptionItem = true;
|
|
2718
|
-
var selectedLabel = isObjectOptionItem && typeof selected === 'object' && selected !== null
|
|
2719
|
-
? selected.label
|
|
2720
|
-
: selected;
|
|
2721
|
-
var optionsRef = React.useRef(null);
|
|
2722
|
-
var descColor = 'text-primary-cool';
|
|
2723
|
-
var isExistValidation = isValid !== null && isValid !== undefined;
|
|
2724
|
-
if (!disabled && isExistValidation && isValid)
|
|
2725
|
-
descColor = 'text-bia-green';
|
|
2726
|
-
if (!disabled && isExistValidation && !isValid)
|
|
2727
|
-
descColor = 'text-bia-red';
|
|
2728
|
-
var disabledClass = disabled ? 'cursor-not-allowed' : '';
|
|
2729
|
-
return (React.createElement("div", { className: "bianic-fgc-container bianic-text-input-container field-group flex w-full flex-col gap-y-2" },
|
|
2730
|
-
label && (React.createElement(FormLabel, { htmlFor: id, required: required, readOnly: readOnly }, label)),
|
|
2731
|
-
React.createElement("div", { className: "group relative w-full ".concat(disabledClass) },
|
|
2732
|
-
React.createElement("input", __assign({ className: "bianic-fgc-target field peer w-full cursor-pointer rounded border border-bia-grey-dark-10 bg-primary-white pe-8 focus-visible:outline-none enabled:hover:rounded-b-none enabled:hover:border-b-bia-blue enabled:focus:rounded-b-none enabled:focus:border-b-bia-blue disabled:cursor-not-allowed disabled:bg-bia-grey-light-80 disabled:text-bia-coolgrey ".concat(searchSize), onClick: function () { return setIsOpen(!isOpen); }, value: selectedLabel, readOnly: true, id: id, disabled: disabled, ref: inputRef }, props)),
|
|
2733
|
-
React.createElement("div", { className: "pointer-events-none absolute inset-y-0 flex items-center pl-3 text-bia-coolgrey peer-disabled:text-bia-coolgrey-light-50 ".concat(iconSize) }, isOpen ? React.createElement(TbChevronUp, null) : React.createElement(TbChevronDown, null)),
|
|
2734
|
-
children === undefined && isOpen && (React.createElement("div", { className: "absolute z-10 w-full rounded-b-md border border-bia-grey-dark-10 bg-primary-white shadow-lg", ref: optionsRef, onClick: onClickDropdown }, options.map(function (option) {
|
|
2735
|
-
var isSelected = JSON.stringify(option) === JSON.stringify(selected);
|
|
2736
|
-
var optionLabel = isObjectOptionItem ? option.label : option;
|
|
2737
|
-
var optionCaption = isObjectOptionItem ? option.caption : '';
|
|
2738
|
-
return option.custom ? (React.createElement(CustomDropdownItem, { caption: optionCaption, size: validatedSize, isSelected: isSelected, onClick: function () {
|
|
2739
|
-
setSelected(option);
|
|
2740
|
-
setIsOpen(false);
|
|
2741
|
-
} }, option.custom)) : (React.createElement(DefaultDropdownItem, { label: optionLabel, caption: optionCaption, size: validatedSize, isSelected: isSelected, onClick: function () {
|
|
2742
|
-
setSelected(option);
|
|
2743
|
-
setIsOpen(false);
|
|
2744
|
-
} }));
|
|
2745
|
-
}))),
|
|
2746
|
-
children && isOpen && (React.createElement(DropdownContainer, __assign({ open: isOpen, onClose: function () { return setIsOpen(false); }, size: size, isTopFlat: true, className: "bianic-livesearch-dropdown absolute z-10 mt-1 w-full overflow-hidden rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none ".concat(dropContClassName), anchorRef: inputRef, matchAnchorWidth: "min" }, restDropContProps), React.Children.map(children, function (child) {
|
|
2747
|
-
if (React.isValidElement(child)) {
|
|
2748
|
-
return React.cloneElement(child, {
|
|
2749
|
-
isSelected: selected && selected.id === child.props.value.id,
|
|
2750
|
-
onClick: function () {
|
|
2751
|
-
setSelected(child.props.value);
|
|
2752
|
-
setIsOpen(false);
|
|
2753
|
-
},
|
|
2754
|
-
});
|
|
2755
|
-
}
|
|
2756
|
-
return child;
|
|
2757
|
-
})))),
|
|
2758
|
-
descText && (React.createElement("span", { className: "bianic-livesearch-desc bianic-text-input-desc text-xs ".concat(descColor) }, descText))));
|
|
2759
|
-
}
|
|
2760
|
-
SelectInput.defaultProps = {
|
|
2761
|
-
descText: '',
|
|
2762
|
-
disabled: false,
|
|
2763
|
-
id: '',
|
|
2764
|
-
size: 'md',
|
|
2765
|
-
label: '',
|
|
2766
|
-
required: false,
|
|
2767
|
-
selected: {},
|
|
2768
|
-
setSelected: function () { },
|
|
2769
|
-
};
|
|
2770
|
-
|
|
2771
|
-
var sizeConfig$7 = {
|
|
2772
|
-
md: {
|
|
2773
|
-
iconClass: 'right-[10px]',
|
|
2774
|
-
iconSize: '18',
|
|
2775
|
-
inputClass: 'text-size-base placeholder:text-size-base px-2.5 h-10',
|
|
2776
|
-
optionClass: 'text-size-base px-2.5 py-[9.5px]',
|
|
2777
|
-
},
|
|
2778
|
-
sm: {
|
|
2779
|
-
iconClass: 'right-[7px]',
|
|
2780
|
-
iconSize: '14',
|
|
2781
|
-
inputClass: 'text-size-sm placeholder:text-size-sm px-1.5 h-[30px]',
|
|
2782
|
-
optionClass: 'text-size-sm px-[10px] pt-[6.5px] pb-[5.5px]',
|
|
2783
|
-
},
|
|
2784
|
-
};
|
|
2785
2665
|
|
|
2786
2666
|
var containerSizeConfig$1 = {
|
|
2787
2667
|
sm: 'min-w-[72px]',
|
|
@@ -2799,7 +2679,7 @@ var fontConfig = {
|
|
|
2799
2679
|
var DropdownElement = React.forwardRef(function (_a, ref) {
|
|
2800
2680
|
var isTopFlat = _a.isTopFlat, children = _a.children, className = _a.className, size = _a.size, zIndex = _a.zIndex, style = _a.style, onClose = _a.onClose, onClickItem = _a.onClickItem, restProps = __rest(_a, ["isTopFlat", "children", "className", "size", "zIndex", "style", "onClose", "onClickItem"]);
|
|
2801
2681
|
var radiusClass = "rounded-b-radius-sm ".concat(!isTopFlat && 'rounded-t-radius-sm');
|
|
2802
|
-
var sizeClass = containerSizeConfig$1[size] || containerSizeConfig$1
|
|
2682
|
+
var sizeClass = containerSizeConfig$1[size] || containerSizeConfig$1.md;
|
|
2803
2683
|
var containerClass = "".concat(sizeClass, " ").concat(radiusClass, " ").concat(className);
|
|
2804
2684
|
var handleClickDrpdownItem = function (e, val) {
|
|
2805
2685
|
onClickItem(e, val);
|
|
@@ -2816,10 +2696,14 @@ var DropdownElement = React.forwardRef(function (_a, ref) {
|
|
|
2816
2696
|
: child;
|
|
2817
2697
|
})));
|
|
2818
2698
|
});
|
|
2819
|
-
|
|
2699
|
+
function DropdownContainer(propsComp) {
|
|
2820
2700
|
var _a = propsComp.isTopFlat, isTopFlat = _a === void 0 ? false : _a, children = propsComp.children, _b = propsComp.open, open = _b === void 0 ? true : _b, _c = propsComp.onClose, onClose = _c === void 0 ? function () { } : _c, _d = propsComp.className, className = _d === void 0 ? '' : _d, _e = propsComp.isWithOverlay, isWithOverlay = _e === void 0 ? true : _e, _f = propsComp.size, size = _f === void 0 ? 'md' : _f, _g = propsComp.onClickItem, onClickItem = _g === void 0 ? function () { } : _g, _h = propsComp.zIndex, zIndex = _h === void 0 ? 100 : _h, anchorRef = propsComp.anchorRef, matchAnchorWidth = propsComp.matchAnchorWidth, restProps = __rest(propsComp, ["isTopFlat", "children", "open", "onClose", "className", "isWithOverlay", "size", "onClickItem", "zIndex", "anchorRef", "matchAnchorWidth"]);
|
|
2821
2701
|
var dropdownRef = React.useRef(null);
|
|
2822
|
-
var
|
|
2702
|
+
var _j = usePopupPosition(anchorRef, dropdownRef), positionStyle = _j[0], recalcPosition = _j[1];
|
|
2703
|
+
React.useLayoutEffect(function () {
|
|
2704
|
+
if (open)
|
|
2705
|
+
recalcPosition();
|
|
2706
|
+
}, [open, recalcPosition]);
|
|
2823
2707
|
var newStyle = React.useMemo(function () {
|
|
2824
2708
|
var _a, _b, _c;
|
|
2825
2709
|
if (!(anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.current)) {
|
|
@@ -2843,30 +2727,124 @@ var DropdownContainer = function (propsComp) {
|
|
|
2843
2727
|
break;
|
|
2844
2728
|
}
|
|
2845
2729
|
return __assign(__assign({ zIndex: zIndex + 10 }, widthStyle), positionStyle);
|
|
2846
|
-
}, [positionStyle]);
|
|
2730
|
+
}, [positionStyle, anchorRef, matchAnchorWidth, zIndex]);
|
|
2847
2731
|
var displayClass = open ? 'block' : 'hidden';
|
|
2848
|
-
var dropdownElement = (React.createElement(DropdownElement, __assign({ ref: dropdownRef, isTopFlat: isTopFlat,
|
|
2732
|
+
var dropdownElement = (React.createElement(DropdownElement, __assign({ ref: dropdownRef, isTopFlat: isTopFlat, className: "".concat(className, " ").concat(displayClass), size: size, zIndex: zIndex, onClose: onClose, onClickItem: onClickItem, style: newStyle }, restProps), children));
|
|
2849
2733
|
return (React.createElement(React.Fragment, null,
|
|
2850
|
-
isWithOverlay && (
|
|
2734
|
+
isWithOverlay && (
|
|
2735
|
+
// Decorative dismiss-on-click backdrop; keyboard users close via Escape, not by tabbing to it
|
|
2736
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events
|
|
2737
|
+
React.createElement("div", { className: "bianic-dropdown-overlay fixed left-0 top-0 h-screen w-screen ".concat(displayClass), style: { zIndex: zIndex }, onClick: function () { return onClose(); } })),
|
|
2851
2738
|
(anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.current)
|
|
2852
2739
|
? reactDom.createPortal(dropdownElement, document.body)
|
|
2853
2740
|
: dropdownElement));
|
|
2854
|
-
}
|
|
2741
|
+
}
|
|
2855
2742
|
DropdownContainer.defaultProps = {
|
|
2856
2743
|
isTopFlat: false,
|
|
2857
2744
|
};
|
|
2858
2745
|
|
|
2859
|
-
var
|
|
2746
|
+
var isObjectWithLabel = function (value) {
|
|
2747
|
+
return typeof value === 'object' && value !== null && 'label' in value;
|
|
2748
|
+
};
|
|
2749
|
+
var getItemLabel = function (value) {
|
|
2750
|
+
var _a;
|
|
2751
|
+
return isObjectWithLabel(value) ? ((_a = value.label) !== null && _a !== void 0 ? _a : '') : String(value !== null && value !== void 0 ? value : '');
|
|
2752
|
+
};
|
|
2753
|
+
|
|
2754
|
+
var sizeUnion$2 = ['md', 'sm'];
|
|
2755
|
+
function SelectInput(_a) {
|
|
2756
|
+
var _b;
|
|
2757
|
+
var _c = _a.descText, descText = _c === void 0 ? undefined : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.size, size = _e === void 0 ? 'md' : _e, _f = _a.id, id = _f === void 0 ? undefined : _f, _g = _a.isValid, isValid = _g === void 0 ? null : _g, _h = _a.label, label = _h === void 0 ? undefined : _h, _j = _a.options, options = _j === void 0 ? [] : _j, _k = _a.readOnly, readOnly = _k === void 0 ? false : _k, _l = _a.required, required = _l === void 0 ? false : _l, _m = _a.selected, selected = _m === void 0 ? undefined : _m, _o = _a.setSelected, setSelected = _o === void 0 ? function () { } : _o, _p = _a.onClickDropdown, onClickDropdown = _p === void 0 ? function () { } : _p, _q = _a.children, children = _q === void 0 ? undefined : _q, _r = _a.dropContProps, _s = _r === void 0 ? {} : _r, _t = _s.className, dropContClassName = _t === void 0 ? '' : _t, restDropContProps = __rest(_s, ["className"]), props = __rest(_a, ["descText", "disabled", "size", "id", "isValid", "label", "options", "readOnly", "required", "selected", "setSelected", "onClickDropdown", "children", "dropContProps"]);
|
|
2758
|
+
var _u = React.useState(false), isOpen = _u[0], setIsOpen = _u[1];
|
|
2759
|
+
var validatedSize = validUnion(size, sizeUnion$2);
|
|
2760
|
+
var _v = sizeConfig$9[validatedSize], searchSize = _v.searchSize, iconSize = _v.iconSize;
|
|
2761
|
+
var inputRef = React.useRef(null);
|
|
2762
|
+
var selectedLabel = selected !== undefined && isObjectWithLabel(selected)
|
|
2763
|
+
? ((_b = selected.label) !== null && _b !== void 0 ? _b : '')
|
|
2764
|
+
: selected;
|
|
2765
|
+
var optionsRef = React.useRef(null);
|
|
2766
|
+
var descColor = 'text-primary-cool';
|
|
2767
|
+
var isExistValidation = isValid !== null && isValid !== undefined;
|
|
2768
|
+
if (!disabled && isExistValidation && isValid)
|
|
2769
|
+
descColor = 'text-bia-green';
|
|
2770
|
+
if (!disabled && isExistValidation && !isValid)
|
|
2771
|
+
descColor = 'text-bia-red';
|
|
2772
|
+
var disabledClass = disabled ? 'cursor-not-allowed' : '';
|
|
2773
|
+
return (React.createElement("div", { className: "bianic-fgc-container bianic-text-input-container field-group flex w-full flex-col gap-y-2" },
|
|
2774
|
+
label && (React.createElement(FormLabel, { htmlFor: id, required: required, readOnly: readOnly }, label)),
|
|
2775
|
+
React.createElement("div", { className: "group relative w-full ".concat(disabledClass) },
|
|
2776
|
+
React.createElement("input", __assign({ className: "bianic-fgc-target field peer w-full cursor-pointer rounded border border-bia-grey-dark-10 bg-primary-white pe-8 focus-visible:outline-none enabled:hover:rounded-b-none enabled:hover:border-b-bia-blue enabled:focus:rounded-b-none enabled:focus:border-b-bia-blue disabled:cursor-not-allowed disabled:bg-bia-grey-light-80 disabled:text-bia-coolgrey ".concat(searchSize), onClick: function () { return setIsOpen(!isOpen); }, value: selectedLabel, readOnly: true, id: id, disabled: disabled, ref: inputRef }, props)),
|
|
2777
|
+
React.createElement("div", { className: "pointer-events-none absolute inset-y-0 flex items-center pl-3 text-bia-coolgrey peer-disabled:text-bia-coolgrey-light-50 ".concat(iconSize) }, isOpen ? React.createElement(TbChevronUp, null) : React.createElement(TbChevronDown, null)),
|
|
2778
|
+
children === undefined && isOpen && (
|
|
2779
|
+
// Consumer-provided click-catcher; each rendered option below is its own interactive control
|
|
2780
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events
|
|
2781
|
+
React.createElement("div", { className: "absolute z-10 w-full rounded-b-md border border-bia-grey-dark-10 bg-primary-white shadow-lg", ref: optionsRef, onClick: onClickDropdown }, options.map(function (option) {
|
|
2782
|
+
var isSelected = JSON.stringify(option) === JSON.stringify(selected);
|
|
2783
|
+
var optionCaption = isObjectWithLabel(option)
|
|
2784
|
+
? option.caption
|
|
2785
|
+
: '';
|
|
2786
|
+
return isObjectWithLabel(option) && option.custom ? (React.createElement(CustomDropdownItem, { caption: optionCaption, size: validatedSize, isSelected: isSelected, onClick: function () {
|
|
2787
|
+
setSelected === null || setSelected === void 0 ? void 0 : setSelected(option);
|
|
2788
|
+
setIsOpen(false);
|
|
2789
|
+
} }, option.custom)) : (React.createElement(DefaultDropdownItem, { label: getItemLabel(option), caption: optionCaption, size: validatedSize, isSelected: isSelected, onClick: function () {
|
|
2790
|
+
setSelected === null || setSelected === void 0 ? void 0 : setSelected(option);
|
|
2791
|
+
setIsOpen(false);
|
|
2792
|
+
} }));
|
|
2793
|
+
}))),
|
|
2794
|
+
children && isOpen && (React.createElement(DropdownContainer, __assign({ open: isOpen, onClose: function () { return setIsOpen(false); }, size: size, isTopFlat: true, className: "bianic-livesearch-dropdown absolute z-10 mt-1 w-full overflow-hidden rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none ".concat(dropContClassName), anchorRef: inputRef, matchAnchorWidth: "min" }, restDropContProps), React.Children.map(children, function (child) {
|
|
2795
|
+
if (React.isValidElement(child)) {
|
|
2796
|
+
// Consumer-supplied children are expected to carry a `value`
|
|
2797
|
+
// prop matching the DropdownItem convention, but arbitrary
|
|
2798
|
+
// JSX children have no statically-known prop shape.
|
|
2799
|
+
var childValue_1 = child.props
|
|
2800
|
+
.value;
|
|
2801
|
+
return React.cloneElement(child, {
|
|
2802
|
+
isSelected: isObjectWithLabel(selected) &&
|
|
2803
|
+
isObjectWithLabel(childValue_1) &&
|
|
2804
|
+
selected.id === childValue_1.id,
|
|
2805
|
+
onClick: function () {
|
|
2806
|
+
// Same trust boundary as before: consumer children are
|
|
2807
|
+
// expected to always carry a value, matching the exact
|
|
2808
|
+
// runtime behavior this already had.
|
|
2809
|
+
setSelected === null || setSelected === void 0 ? void 0 : setSelected(childValue_1);
|
|
2810
|
+
setIsOpen(false);
|
|
2811
|
+
},
|
|
2812
|
+
});
|
|
2813
|
+
}
|
|
2814
|
+
return child;
|
|
2815
|
+
})))),
|
|
2816
|
+
descText && (React.createElement("span", { className: "bianic-livesearch-desc bianic-text-input-desc text-xs ".concat(descColor) }, descText))));
|
|
2817
|
+
}
|
|
2818
|
+
|
|
2819
|
+
var sizeConfig$7 = {
|
|
2820
|
+
md: {
|
|
2821
|
+
iconClass: 'right-[10px]',
|
|
2822
|
+
iconSize: '18',
|
|
2823
|
+
inputClass: 'text-size-base placeholder:text-size-base px-2.5 h-10',
|
|
2824
|
+
optionClass: 'text-size-base px-2.5 py-[9.5px]',
|
|
2825
|
+
},
|
|
2826
|
+
sm: {
|
|
2827
|
+
iconClass: 'right-[7px]',
|
|
2828
|
+
iconSize: '14',
|
|
2829
|
+
inputClass: 'text-size-sm placeholder:text-size-sm px-1.5 h-[30px]',
|
|
2830
|
+
optionClass: 'text-size-sm px-[10px] pt-[6.5px] pb-[5.5px]',
|
|
2831
|
+
},
|
|
2832
|
+
};
|
|
2833
|
+
|
|
2834
|
+
function DropdownContNoAnchorInner(propsComp, ref) {
|
|
2860
2835
|
var _a = propsComp.isTopFlat, isTopFlat = _a === void 0 ? false : _a, children = propsComp.children, _b = propsComp.open, open = _b === void 0 ? true : _b, _c = propsComp.onClose, onClose = _c === void 0 ? function () { } : _c, _d = propsComp.className, className = _d === void 0 ? '' : _d, _e = propsComp.isWithOverlay, isWithOverlay = _e === void 0 ? true : _e, _f = propsComp.size, size = _f === void 0 ? 'md' : _f, _g = propsComp.onClickItem, onClickItem = _g === void 0 ? function () { } : _g, _h = propsComp.zIndex, zIndex = _h === void 0 ? 100 : _h, restProps = __rest(propsComp, ["isTopFlat", "children", "open", "onClose", "className", "isWithOverlay", "size", "onClickItem", "zIndex"]);
|
|
2861
2836
|
var radiusClass = "rounded-b-radius-sm ".concat(!isTopFlat && 'rounded-t-radius-sm');
|
|
2862
|
-
var sizeClass = containerSizeConfig$1[size] || containerSizeConfig$1
|
|
2837
|
+
var sizeClass = containerSizeConfig$1[size] || containerSizeConfig$1.md;
|
|
2863
2838
|
var containerClass = "".concat(sizeClass, " ").concat(radiusClass, " ").concat(className);
|
|
2864
2839
|
var handleClickDrpdownItem = function (e, val) {
|
|
2865
2840
|
onClickItem(e, val);
|
|
2866
2841
|
onClose();
|
|
2867
2842
|
};
|
|
2868
2843
|
return (open && (React.createElement(React.Fragment, null,
|
|
2869
|
-
isWithOverlay && (
|
|
2844
|
+
isWithOverlay && (
|
|
2845
|
+
// Decorative dismiss-on-click backdrop; keyboard users close via Escape, not by tabbing to it
|
|
2846
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events
|
|
2847
|
+
React.createElement("div", { className: "bianic-dropdown-overlay fixed left-0 top-0 h-screen w-screen", style: { zIndex: zIndex }, onClick: function () { return onClose(); } })),
|
|
2870
2848
|
React.createElement("div", __assign({ style: {
|
|
2871
2849
|
zIndex: zIndex + 10, // Ensure dropdown is above overlay
|
|
2872
2850
|
}, ref: ref, className: "bianic-dropdown-container bg-bia-white shadow-[0px_3px_20px_0px_rgba(0,0,0,0.20)] ".concat(containerClass) }, restProps), React.Children.map(children, function (child) {
|
|
@@ -2880,17 +2858,15 @@ var DropdownContNoAnchor = React.forwardRef(function DropdownContNoAnchor(propsC
|
|
|
2880
2858
|
})
|
|
2881
2859
|
: child;
|
|
2882
2860
|
})))));
|
|
2883
|
-
}
|
|
2884
|
-
DropdownContNoAnchor
|
|
2885
|
-
isTopFlat: false,
|
|
2886
|
-
};
|
|
2861
|
+
}
|
|
2862
|
+
var DropdownContNoAnchor = React.forwardRef(DropdownContNoAnchorInner);
|
|
2887
2863
|
|
|
2888
2864
|
function DropdownItem(_a) {
|
|
2889
|
-
var
|
|
2890
|
-
var
|
|
2891
|
-
var
|
|
2892
|
-
var fontClass = fontConfig[size] || fontConfig
|
|
2893
|
-
var itemSizeClass = itemSizeConfig[size] || itemSizeConfig
|
|
2865
|
+
var _b = _a.children, children = _b === void 0 ? undefined : _b, _c = _a.className, className = _c === void 0 ? '' : _c, _d = _a.onClickItem, onClickItem = _d === void 0 ? function () { } : _d, _e = _a.onClose, onClose = _e === void 0 ? function () { } : _e, _f = _a.size, size = _f === void 0 ? 'md' : _f, _g = _a.value, value = _g === void 0 ? '' : _g, content = _a.content, _h = _a.disabled, disabled = _h === void 0 ? false : _h, _j = _a.zIndex, zIndex = _j === void 0 ? 100 : _j, props = __rest(_a, ["children", "className", "onClickItem", "onClose", "size", "value", "content", "disabled", "zIndex"]);
|
|
2866
|
+
var _k = React.useState(false), isHovered = _k[0], setIsHovered = _k[1];
|
|
2867
|
+
var _l = React.useState(false), isLeft = _l[0], setIsLeft = _l[1];
|
|
2868
|
+
var fontClass = fontConfig[size] || fontConfig.md;
|
|
2869
|
+
var itemSizeClass = itemSizeConfig[size] || itemSizeConfig.md;
|
|
2894
2870
|
var itemClass = "".concat(itemSizeClass, " ").concat(fontClass, " ").concat(className);
|
|
2895
2871
|
var chevronSize = size === 'sm' ? 14 : 18;
|
|
2896
2872
|
var DropdownContRef = React.useRef(null);
|
|
@@ -2915,12 +2891,8 @@ function DropdownItem(_a) {
|
|
|
2915
2891
|
React.createElement("button", __assign({ className: "relative flex w-full !min-w-fit items-center justify-start whitespace-nowrap bg-bia-white px-[15px] py-[5px] text-left text-bia-black disabled:cursor-not-allowed disabled:text-bia-coolgrey-light-50 hover:[&:not(:disabled)]:bg-bia-blue-pastel ".concat(itemClass), style: { zIndex: currentZIndex + 15 }, onClick: function (e) { return onClickItem(e, value); }, onKeyDown: function () { }, disabled: disabled, type: "button" }, props),
|
|
2916
2892
|
content,
|
|
2917
2893
|
React.createElement("div", { className: "ml-auto flex items-center" }, children && (React.createElement(TbChevronRight, { className: "ml-[10px] text-bia-coolgrey", size: chevronSize })))),
|
|
2918
|
-
children && (React.createElement(DropdownContNoAnchor, { className: "absolute top-0 bg-primary-white shadow-[0px_3px_20px_0px_rgba(0,0,0,0.20)] group-first/main:top-[6px] ".concat(translateClass), onClose: onClose, open: isHovered, onClickItem: function (e,
|
|
2894
|
+
children && (React.createElement(DropdownContNoAnchor, { className: "absolute top-0 bg-primary-white shadow-[0px_3px_20px_0px_rgba(0,0,0,0.20)] group-first/main:top-[6px] ".concat(translateClass), onClose: onClose, open: isHovered, onClickItem: function (e, itemValue) { return onClickItem(e, itemValue); }, size: size, ref: DropdownContRef, zIndex: currentZIndex + 10 }, children))));
|
|
2919
2895
|
}
|
|
2920
|
-
DropdownItem.defaultProps = {
|
|
2921
|
-
className: '',
|
|
2922
|
-
onClickItem: function () { },
|
|
2923
|
-
};
|
|
2924
2896
|
|
|
2925
2897
|
var matchSearchTerm = function (content, term, variant) {
|
|
2926
2898
|
var lowerContent = content.toLowerCase();
|
|
@@ -2938,18 +2910,12 @@ var matchSearchTerm = function (content, term, variant) {
|
|
|
2938
2910
|
};
|
|
2939
2911
|
var filterOptions = function (options, searchTerm) {
|
|
2940
2912
|
return options === null || options === void 0 ? void 0 : options.filter(function (item) {
|
|
2941
|
-
|
|
2913
|
+
var label = typeof item === 'object' && item !== null ? item.label : String(item);
|
|
2914
|
+
return (label !== null && label !== void 0 ? label : '').toLowerCase().includes(searchTerm.toLowerCase());
|
|
2942
2915
|
});
|
|
2943
2916
|
};
|
|
2944
2917
|
|
|
2945
|
-
var
|
|
2946
|
-
return typeof value === 'object' && value !== null && 'label' in value;
|
|
2947
|
-
};
|
|
2948
|
-
var getItemLabel = function (value) {
|
|
2949
|
-
var _a;
|
|
2950
|
-
return isObjectWithLabel(value) ? (_a = value.label) !== null && _a !== void 0 ? _a : '' : String(value !== null && value !== void 0 ? value : '');
|
|
2951
|
-
};
|
|
2952
|
-
var processDropdownChildren$1 = function (nodes, currentSearchTerm, includeAllIfNoSearch, searchVariant, handleDropdownItemClick) {
|
|
2918
|
+
var processDropdownChildren$1 = function (nodes, currentSearchTerm, includeAllIfNoSearch, handleDropdownItemClick, searchVariant) {
|
|
2953
2919
|
if (searchVariant === void 0) { searchVariant = 'include'; }
|
|
2954
2920
|
return React.Children.map(nodes, function (child) {
|
|
2955
2921
|
if (!React.isValidElement(child) || child.type !== DropdownItem) {
|
|
@@ -2961,9 +2927,7 @@ var processDropdownChildren$1 = function (nodes, currentSearchTerm, includeAllIf
|
|
|
2961
2927
|
var isDisabled = itemProps.disabled;
|
|
2962
2928
|
// Filtering Logic
|
|
2963
2929
|
if (!includeAllIfNoSearch) {
|
|
2964
|
-
var itemValueStr =
|
|
2965
|
-
? itemValue.label
|
|
2966
|
-
: String(itemValue || '');
|
|
2930
|
+
var itemValueStr = itemValue !== undefined ? getItemLabel(itemValue) : '';
|
|
2967
2931
|
if (currentSearchTerm &&
|
|
2968
2932
|
!matchSearchTerm(itemValueStr, currentSearchTerm, searchVariant)) {
|
|
2969
2933
|
return null;
|
|
@@ -2971,18 +2935,24 @@ var processDropdownChildren$1 = function (nodes, currentSearchTerm, includeAllIf
|
|
|
2971
2935
|
}
|
|
2972
2936
|
// Process Nested Children
|
|
2973
2937
|
var clonedChildren = itemProps.children
|
|
2974
|
-
? processDropdownChildren$1(itemProps.children, currentSearchTerm, includeAllIfNoSearch,
|
|
2938
|
+
? processDropdownChildren$1(itemProps.children, currentSearchTerm, includeAllIfNoSearch, handleDropdownItemClick, searchVariant)
|
|
2975
2939
|
: null;
|
|
2976
2940
|
// Clone and Inject Click Handler
|
|
2941
|
+
// DropdownItem renders a <button>, but handleDropdownItemClick's event
|
|
2942
|
+
// type is HTMLDivElement to match its other callers (the event's
|
|
2943
|
+
// specific target type is never used here, only forwarded).
|
|
2977
2944
|
return React.cloneElement(child, {
|
|
2978
2945
|
onClick: function (e) {
|
|
2946
|
+
var divEvent = e;
|
|
2979
2947
|
if (!isDisabled) {
|
|
2980
2948
|
if (itemValue === undefined &&
|
|
2981
2949
|
typeof itemProps.content === 'string') {
|
|
2982
|
-
|
|
2950
|
+
handleDropdownItemClick(divEvent, itemContent);
|
|
2951
|
+
return;
|
|
2983
2952
|
}
|
|
2984
2953
|
if (typeof itemValue === 'object' || itemValue !== undefined) {
|
|
2985
|
-
|
|
2954
|
+
handleDropdownItemClick(divEvent, itemValue);
|
|
2955
|
+
return;
|
|
2986
2956
|
}
|
|
2987
2957
|
}
|
|
2988
2958
|
if (itemProps.onClickItem) {
|
|
@@ -2997,12 +2967,12 @@ var processRenderedChildren$1 = function (children, searchTerm, searchVariant, h
|
|
|
2997
2967
|
var renderedChildren = null;
|
|
2998
2968
|
var hasFilteredResults = false;
|
|
2999
2969
|
if (searchTerm) {
|
|
3000
|
-
renderedChildren = processDropdownChildren$1(children, searchTerm, false,
|
|
2970
|
+
renderedChildren = processDropdownChildren$1(children, searchTerm, false, handleDropdownItemClick, searchVariant);
|
|
3001
2971
|
hasFilteredResults =
|
|
3002
2972
|
React.Children.toArray(renderedChildren).filter(Boolean).length > 0;
|
|
3003
2973
|
}
|
|
3004
2974
|
else {
|
|
3005
|
-
renderedChildren = processDropdownChildren$1(children, '', true,
|
|
2975
|
+
renderedChildren = processDropdownChildren$1(children, '', true, handleDropdownItemClick, searchVariant);
|
|
3006
2976
|
hasFilteredResults =
|
|
3007
2977
|
React.Children.toArray(renderedChildren).filter(Boolean).length > 0;
|
|
3008
2978
|
}
|
|
@@ -3012,12 +2982,12 @@ var processRenderedChildren$1 = function (children, searchTerm, searchVariant, h
|
|
|
3012
2982
|
var useLiveSearch$1 = function (_a) {
|
|
3013
2983
|
var value = _a.value, setValue = _a.setValue, onChangeText = _a.onChangeText, dropContOnClickItem = _a.dropContOnClickItem;
|
|
3014
2984
|
var _b = React.useState(false), isOpen = _b[0], setIsOpen = _b[1];
|
|
3015
|
-
var _c = React.useState(
|
|
2985
|
+
var _c = React.useState(getItemLabel(value)), searchTerm = _c[0], setSearchTerm = _c[1];
|
|
3016
2986
|
React.useEffect(function () {
|
|
3017
2987
|
if (!isOpen && searchTerm !== getItemLabel(value)) {
|
|
3018
2988
|
setSearchTerm(getItemLabel(value));
|
|
3019
2989
|
}
|
|
3020
|
-
}, [isOpen, value]);
|
|
2990
|
+
}, [isOpen, value, searchTerm]);
|
|
3021
2991
|
React.useEffect(function () {
|
|
3022
2992
|
setSearchTerm(getItemLabel(value));
|
|
3023
2993
|
}, [value]);
|
|
@@ -3044,16 +3014,16 @@ var useLiveSearch$1 = function (_a) {
|
|
|
3044
3014
|
};
|
|
3045
3015
|
|
|
3046
3016
|
function LiveSearch(_a) {
|
|
3047
|
-
var _b = _a.autoComplete, autoComplete = _b === void 0 ? 'off' : _b, _c = _a.children, children = _c === void 0 ? undefined : _c,
|
|
3017
|
+
var _b = _a.autoComplete, autoComplete = _b === void 0 ? 'off' : _b, _c = _a.children, children = _c === void 0 ? undefined : _c, _d = _a.descText, descText = _d === void 0 ? undefined : _d, _e = _a.disabled, disabled = _e === void 0 ? false : _e, _f = _a.dropContProps, dropContProps = _f === void 0 ? undefined : _f, _g = _a.id, id = _g === void 0 ? undefined : _g, _h = _a.label, label = _h === void 0 ? undefined : _h, _j = _a.onChangeText, onChangeText = _j === void 0 ? function () { } : _j, _k = _a.onChangeButton, onChangeButton = _k === void 0 ? undefined : _k, _l = _a.onClickDropdown, onClickDropdown = _l === void 0 ? function () { } : _l, _m = _a.options, options = _m === void 0 ? undefined : _m, _o = _a.placeholder, placeholder = _o === void 0 ? undefined : _o, _p = _a.readOnly, readOnly = _p === void 0 ? false : _p, _q = _a.required, required = _q === void 0 ? false : _q, _r = _a.searchVariant, searchVariant = _r === void 0 ? 'include' : _r, setValue = _a.setValue, _s = _a.size, size = _s === void 0 ? 'md' : _s, _t = _a.isValid, isValid = _t === void 0 ? null : _t, value = _a.value;
|
|
3048
3018
|
var inputRef = React.useRef(null);
|
|
3049
|
-
var
|
|
3019
|
+
var _u = useLiveSearch$1({
|
|
3050
3020
|
value: value,
|
|
3051
3021
|
setValue: setValue,
|
|
3052
3022
|
onChangeText: onChangeText,
|
|
3053
3023
|
dropContOnClickItem: dropContProps === null || dropContProps === void 0 ? void 0 : dropContProps.onClickItem,
|
|
3054
|
-
}), isOpen =
|
|
3055
|
-
var
|
|
3056
|
-
var
|
|
3024
|
+
}), isOpen = _u.isOpen, setIsOpen = _u.setIsOpen, searchTerm = _u.searchTerm, handleInputChange = _u.handleInputChange, handleDropdownItemClick = _u.handleDropdownItemClick;
|
|
3025
|
+
var _v = sizeConfig$7[size], iconClass = _v.iconClass, iconSize = _v.iconSize, inputClass = _v.inputClass;
|
|
3026
|
+
var _w = dropContProps || {}, dropContClassName = _w.className; _w.onClickItem; _w.anchorRef; var restDropContProps = __rest(_w, ["className", "onClickItem", "anchorRef"]);
|
|
3057
3027
|
var isSearchTermExist = searchTerm && searchTerm !== '';
|
|
3058
3028
|
var descColor = 'text-primary-cool';
|
|
3059
3029
|
var isExistValidation = isValid !== null && isValid !== undefined;
|
|
@@ -3061,8 +3031,8 @@ function LiveSearch(_a) {
|
|
|
3061
3031
|
descColor = 'text-bia-green';
|
|
3062
3032
|
if (!disabled && isExistValidation && !isValid)
|
|
3063
3033
|
descColor = 'text-bia-red';
|
|
3064
|
-
var filteredOptions = filterOptions(options || [], value
|
|
3065
|
-
var
|
|
3034
|
+
var filteredOptions = filterOptions(options || [], getItemLabel(value));
|
|
3035
|
+
var _x = processRenderedChildren$1(children, searchTerm, searchVariant, handleDropdownItemClick), renderedChildren = _x.renderedChildren, hasFilteredResults = _x.hasFilteredResults;
|
|
3066
3036
|
var disabledClass = disabled ? 'cursor-not-allowed' : '';
|
|
3067
3037
|
return (React.createElement("div", { className: "bianic-livesearch bianic-fgc-container bianic-text-input-container field-group group/form flex w-full flex-col gap-y-2" },
|
|
3068
3038
|
label && (React.createElement(FormLabel, { htmlFor: id, required: required, readOnly: readOnly }, label)),
|
|
@@ -3073,19 +3043,25 @@ function LiveSearch(_a) {
|
|
|
3073
3043
|
}, type: "text", readOnly: readOnly, autoComplete: autoComplete }),
|
|
3074
3044
|
React.createElement("div", { className: "absolute inset-y-0 flex items-center pl-3 ".concat(iconClass), style: {
|
|
3075
3045
|
zIndex: (restDropContProps === null || restDropContProps === void 0 ? void 0 : restDropContProps.zIndex)
|
|
3076
|
-
?
|
|
3046
|
+
? restDropContProps.zIndex + 20
|
|
3077
3047
|
: 20,
|
|
3078
3048
|
} },
|
|
3079
3049
|
!isSearchTermExist && (React.createElement(TbZoom, { className: "text-primary-black", style: { fontSize: iconSize } })),
|
|
3080
|
-
isSearchTermExist && !onChangeButton && (React.createElement("button", { onClick: function () { return setValue({ id: null, label: '' }); }, className: "flex h-full w-full items-center disabled:cursor-not-allowed", disabled: disabled },
|
|
3050
|
+
isSearchTermExist && !onChangeButton && (React.createElement("button", { type: "button", "aria-label": "Clear search", onClick: function () { return setValue({ id: null, label: '' }); }, className: "flex h-full w-full items-center disabled:cursor-not-allowed", disabled: disabled },
|
|
3081
3051
|
React.createElement(TbX, { className: "text-primary-black", style: { fontSize: iconSize } }))),
|
|
3082
3052
|
isSearchTermExist && onChangeButton),
|
|
3083
|
-
children === undefined && isOpen && (
|
|
3084
|
-
|
|
3085
|
-
|
|
3053
|
+
children === undefined && isOpen && (
|
|
3054
|
+
// Consumer-provided click-catcher; each rendered option below is its own interactive control
|
|
3055
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events
|
|
3056
|
+
React.createElement("div", { className: "border-grey-100 absolute z-10 max-h-60 w-full overflow-y-auto rounded-b-md border bg-primary-white shadow-lg", onClick: onClickDropdown }, filteredOptions.map(function (option) {
|
|
3057
|
+
var isSelected = isObjectWithLabel(value) &&
|
|
3058
|
+
isObjectWithLabel(option) &&
|
|
3059
|
+
value.id &&
|
|
3060
|
+
option.id === value.id;
|
|
3061
|
+
return isObjectWithLabel(option) && option.custom ? (React.createElement(CustomDropdownItem, { size: size, isSelected: isSelected, className: dropContClassName, onClick: function () {
|
|
3086
3062
|
setValue(option);
|
|
3087
3063
|
setIsOpen(false);
|
|
3088
|
-
} }, option.custom)) : (React.createElement(DefaultDropdownItem, { label: option
|
|
3064
|
+
} }, option.custom)) : (React.createElement(DefaultDropdownItem, { label: getItemLabel(option), size: size, isSelected: isSelected, className: dropContClassName, onClick: function () {
|
|
3089
3065
|
setValue(option);
|
|
3090
3066
|
setIsOpen(false);
|
|
3091
3067
|
} }));
|
|
@@ -3096,19 +3072,6 @@ function LiveSearch(_a) {
|
|
|
3096
3072
|
searchTerm.length > 0 && (React.createElement(DropdownItem, { content: React.createElement("div", { className: "px-4 py-2 text-gray-500" }, "Tidak ada hasil ditemukan.") }))))),
|
|
3097
3073
|
descText && (React.createElement("span", { className: "bianic-livesearch-desc bianic-text-input-desc text-xs ".concat(descColor) }, descText))));
|
|
3098
3074
|
}
|
|
3099
|
-
LiveSearch.defaultProps = {
|
|
3100
|
-
descText: '',
|
|
3101
|
-
disabled: false,
|
|
3102
|
-
id: '',
|
|
3103
|
-
size: 'md',
|
|
3104
|
-
label: '',
|
|
3105
|
-
placeholder: '',
|
|
3106
|
-
required: false,
|
|
3107
|
-
options: [],
|
|
3108
|
-
setValue: function () { },
|
|
3109
|
-
value: {},
|
|
3110
|
-
readonly: false,
|
|
3111
|
-
};
|
|
3112
3075
|
|
|
3113
3076
|
var sizeConfig$6 = {
|
|
3114
3077
|
md: {
|
|
@@ -3123,14 +3086,20 @@ var sizeConfig$6 = {
|
|
|
3123
3086
|
},
|
|
3124
3087
|
};
|
|
3125
3088
|
|
|
3089
|
+
var isTagOption = function (value) {
|
|
3090
|
+
return typeof value === 'object' && value !== null && 'label' in value;
|
|
3091
|
+
};
|
|
3092
|
+
var getTagLabel = function (value) {
|
|
3093
|
+
return isTagOption(value) ? value.label : value;
|
|
3094
|
+
};
|
|
3095
|
+
|
|
3126
3096
|
var isMatchValue = function (existingValue, optionValue) {
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
return existingValue === null || existingValue === void 0 ? void 0 : existingValue.some(function (value) { return (value === null || value === void 0 ? void 0 : value.label) === (optionValue === null || optionValue === void 0 ? void 0 : optionValue.label); });
|
|
3097
|
+
if (isTagOption(optionValue)) {
|
|
3098
|
+
return existingValue === null || existingValue === void 0 ? void 0 : existingValue.some(function (value) { return isTagOption(value) && value.label === optionValue.label; });
|
|
3130
3099
|
}
|
|
3131
3100
|
return existingValue === null || existingValue === void 0 ? void 0 : existingValue.includes(optionValue);
|
|
3132
3101
|
};
|
|
3133
|
-
var processDropdownChildren = function (nodes, currentSearchTerm, includeAllIfNoSearch,
|
|
3102
|
+
var processDropdownChildren = function (nodes, currentSearchTerm, includeAllIfNoSearch, handleDropdownItemClick, existingValues, searchVariant) {
|
|
3134
3103
|
if (searchVariant === void 0) { searchVariant = 'include'; }
|
|
3135
3104
|
return React.Children.map(nodes, function (child) {
|
|
3136
3105
|
if (!React.isValidElement(child) || child.type !== DropdownItem) {
|
|
@@ -3138,11 +3107,15 @@ var processDropdownChildren = function (nodes, currentSearchTerm, includeAllIfNo
|
|
|
3138
3107
|
}
|
|
3139
3108
|
var itemProps = child.props;
|
|
3140
3109
|
var itemContent = typeof itemProps.content === 'string' ? itemProps.content : '';
|
|
3110
|
+
// DropdownItem's own `value` prop is typed generically (Dropdown's
|
|
3111
|
+
// OptionValue); within TagLabelInput it's always actually a TagValue.
|
|
3141
3112
|
var itemValue = itemProps.value;
|
|
3142
3113
|
var isDisabled = itemProps.disabled;
|
|
3143
3114
|
// Filtering Logic
|
|
3144
|
-
var itemValueStr =
|
|
3145
|
-
if ((existingValues === null || existingValues === void 0 ? void 0 : existingValues.length) > 0 &&
|
|
3115
|
+
var itemValueStr = itemValue !== undefined ? getTagLabel(itemValue) : '';
|
|
3116
|
+
if ((existingValues === null || existingValues === void 0 ? void 0 : existingValues.length) > 0 &&
|
|
3117
|
+
itemValue !== undefined &&
|
|
3118
|
+
isMatchValue(existingValues, itemValue)) {
|
|
3146
3119
|
return null;
|
|
3147
3120
|
}
|
|
3148
3121
|
if (!includeAllIfNoSearch) {
|
|
@@ -3153,18 +3126,24 @@ var processDropdownChildren = function (nodes, currentSearchTerm, includeAllIfNo
|
|
|
3153
3126
|
}
|
|
3154
3127
|
// Process Nested Children
|
|
3155
3128
|
var clonedChildren = itemProps.children
|
|
3156
|
-
? processDropdownChildren(itemProps.children, currentSearchTerm, includeAllIfNoSearch,
|
|
3129
|
+
? processDropdownChildren(itemProps.children, currentSearchTerm, includeAllIfNoSearch, handleDropdownItemClick, existingValues, searchVariant)
|
|
3157
3130
|
: null;
|
|
3158
3131
|
// Clone and Inject Click Handler
|
|
3132
|
+
// DropdownItem renders a <button>, but handleDropdownItemClick's event
|
|
3133
|
+
// type is HTMLDivElement to match its other callers (the event's
|
|
3134
|
+
// specific target type is never used here, only forwarded).
|
|
3159
3135
|
return React.cloneElement(child, {
|
|
3160
3136
|
onClick: function (e) {
|
|
3137
|
+
var divEvent = e;
|
|
3161
3138
|
if (!isDisabled) {
|
|
3162
3139
|
if (itemValue === undefined &&
|
|
3163
3140
|
typeof itemProps.content === 'string') {
|
|
3164
|
-
|
|
3141
|
+
handleDropdownItemClick(divEvent, itemContent);
|
|
3142
|
+
return;
|
|
3165
3143
|
}
|
|
3166
3144
|
if (typeof itemValue === 'object' || itemValue !== undefined) {
|
|
3167
|
-
|
|
3145
|
+
handleDropdownItemClick(divEvent, itemValue);
|
|
3146
|
+
return;
|
|
3168
3147
|
}
|
|
3169
3148
|
}
|
|
3170
3149
|
if (itemProps.onClickItem) {
|
|
@@ -3178,12 +3157,11 @@ var processDropdownChildren = function (nodes, currentSearchTerm, includeAllIfNo
|
|
|
3178
3157
|
var processRenderedChildren = function (children, searchTerm, searchVariant, handleDropdownItemClick, existingValues) {
|
|
3179
3158
|
var renderedChildren = null;
|
|
3180
3159
|
var hasFilteredResults = false;
|
|
3181
|
-
if ((existingValues === null || existingValues === void 0 ? void 0 : existingValues.length) > 0) ;
|
|
3182
3160
|
if (searchTerm || (existingValues === null || existingValues === void 0 ? void 0 : existingValues.length) > 0) {
|
|
3183
|
-
renderedChildren = processDropdownChildren(children, searchTerm, false,
|
|
3161
|
+
renderedChildren = processDropdownChildren(children, searchTerm, false, handleDropdownItemClick, existingValues, searchVariant);
|
|
3184
3162
|
}
|
|
3185
3163
|
else {
|
|
3186
|
-
renderedChildren = processDropdownChildren(children, '', true,
|
|
3164
|
+
renderedChildren = processDropdownChildren(children, '', true, handleDropdownItemClick, [], searchVariant);
|
|
3187
3165
|
}
|
|
3188
3166
|
hasFilteredResults =
|
|
3189
3167
|
React.Children.toArray(renderedChildren).filter(Boolean).length > 0;
|
|
@@ -3203,9 +3181,11 @@ var useLiveSearch = function (_a) {
|
|
|
3203
3181
|
var handleDropdownItemClick = React.useCallback(function (event, clickedValue) {
|
|
3204
3182
|
dropContOnClickItem === null || dropContOnClickItem === void 0 ? void 0 : dropContOnClickItem(event, clickedValue);
|
|
3205
3183
|
setSearchTerm('');
|
|
3184
|
+
// clickedValue comes from a rendered DropdownItem's `value` prop,
|
|
3185
|
+
// which isn't statically known to be exactly T (a subtype of TagValue)
|
|
3206
3186
|
setValue(__spreadArray(__spreadArray([], value, true), [clickedValue], false));
|
|
3207
3187
|
setIsOpen(false);
|
|
3208
|
-
}, [setValue, dropContOnClickItem]);
|
|
3188
|
+
}, [setValue, dropContOnClickItem, value]);
|
|
3209
3189
|
return {
|
|
3210
3190
|
isOpen: isOpen,
|
|
3211
3191
|
setIsOpen: setIsOpen,
|
|
@@ -3270,13 +3250,18 @@ var colorUnion = [
|
|
|
3270
3250
|
];
|
|
3271
3251
|
var sizeUnion$1 = ['md', 'sm', 'tn'];
|
|
3272
3252
|
var variantUnion = ['label', 'icon', 'closeable', 'monospace'];
|
|
3273
|
-
|
|
3274
|
-
var color = _a.color, _b = _a.size, size = _b === void 0 ? 'md' : _b,
|
|
3253
|
+
function TagLabel(_a) {
|
|
3254
|
+
var color = _a.color, _b = _a.size, size = _b === void 0 ? 'md' : _b, _c = _a.variant, variant = _c === void 0 ? undefined : _c, _d = _a.closeHandler, closeHandler = _d === void 0 ? undefined : _d, _e = _a.open, open = _e === void 0 ? undefined : _e, text = _a.text, _f = _a.leftIcon, leftIcon = _f === void 0 ? undefined : _f, _g = _a.rightIcon, rightIcon = _g === void 0 ? undefined : _g;
|
|
3255
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars
|
|
3256
|
+
_a.left;
|
|
3257
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars
|
|
3258
|
+
_a.right;
|
|
3259
|
+
var _k = _a.bgColor, bgColor = _k === void 0 ? 'grey-light-50' : _k, _l = _a.textColor, textColor = _l === void 0 ? 'black' : _l, _m = _a.outlineColor, outlineColor = _m === void 0 ? undefined : _m, _o = _a.isBlock, isBlock = _o === void 0 ? undefined : _o, _p = _a.maxWidth, maxWidth = _p === void 0 ? undefined : _p, _q = _a.isDark, isDark = _q === void 0 ? undefined : _q; _a.style; var props = __rest(_a, ["color", "size", "variant", "closeHandler", "open", "text", "leftIcon", "rightIcon", "left", "right", "bgColor", "textColor", "outlineColor", "isBlock", "maxWidth", "isDark", "style"]);
|
|
3275
3260
|
var validatedColor = validUnion(color, colorUnion);
|
|
3276
3261
|
var validatedSize = validUnion(size, sizeUnion$1);
|
|
3277
3262
|
var validatedVariant = validUnion(variant, variantUnion);
|
|
3278
3263
|
var containerRef = React.useRef(null);
|
|
3279
|
-
var
|
|
3264
|
+
var _r = React.useState(null), sizeCount = _r[0], setSizeCount = _r[1];
|
|
3280
3265
|
React.useEffect(function () {
|
|
3281
3266
|
if (variant === 'icon') {
|
|
3282
3267
|
// Get the size of the icon
|
|
@@ -3291,7 +3276,7 @@ var TagLabel = function (_a) {
|
|
|
3291
3276
|
else
|
|
3292
3277
|
setSizeCount(height);
|
|
3293
3278
|
}
|
|
3294
|
-
}, []);
|
|
3279
|
+
}, [variant]);
|
|
3295
3280
|
var isCloseable = validatedVariant === 'closeable';
|
|
3296
3281
|
var defaultIconSize = validatedSize === 'md' ? 'text-xl' : 'text-sm';
|
|
3297
3282
|
var borderColorRules = outlineColor || bgColor;
|
|
@@ -3304,24 +3289,25 @@ var TagLabel = function (_a) {
|
|
|
3304
3289
|
? "bg-bia-".concat(bgColor, " text-bia-").concat(textColor, " border border-bia-").concat(borderColorRules)
|
|
3305
3290
|
: colorConfig$1[validatedColor];
|
|
3306
3291
|
var blockclass = isBlock && validatedVariant !== 'icon' ? 'w-full' : "w-fit";
|
|
3307
|
-
var maxWidthStyle = !isBlock ? maxWidth
|
|
3292
|
+
var maxWidthStyle = !isBlock ? "".concat(maxWidth, "px") : '';
|
|
3308
3293
|
var alignTextClass = isBlock ? 'text-center' : 'text-left';
|
|
3309
3294
|
var fontClass = validatedVariant === 'monospace' ? 'font-sans-code' : 'font-segoe pb-[1px]';
|
|
3310
3295
|
var textClass = "".concat(alignTextClass, " ").concat(fontClass);
|
|
3311
3296
|
var containerClass = "".concat(sizeClass, " ").concat(colorClass, " ").concat(roundedClass, " ").concat(isCloseableClass, " ").concat(blockclass);
|
|
3312
|
-
var closeColor = validatedColor
|
|
3313
|
-
|
|
3297
|
+
var closeColor = closeColorConfig[validatedColor];
|
|
3298
|
+
if (validatedColor === 'custom') {
|
|
3299
|
+
closeColor = isDark
|
|
3314
3300
|
? "bg-bia-white-transparent-50 text-bia-".concat(bgColor)
|
|
3315
|
-
: "bg-bia-grey-dark-30 text-bia-".concat(bgColor)
|
|
3316
|
-
|
|
3301
|
+
: "bg-bia-grey-dark-30 text-bia-".concat(bgColor);
|
|
3302
|
+
}
|
|
3317
3303
|
var closeClass = "".concat(closeColor, " ").concat(closeSizeConfig[validatedSize]);
|
|
3318
3304
|
var isOpen = isCloseable ? open : true;
|
|
3319
3305
|
return (isOpen && (React.createElement("div", __assign({ className: "tag-label flex items-center gap-x-[5px] text-size-base ".concat(containerClass), style: {
|
|
3320
3306
|
maxWidth: maxWidthStyle,
|
|
3321
3307
|
} }, props),
|
|
3322
3308
|
leftIcon && (React.createElement("div", { style: {
|
|
3323
|
-
width: sizeCount
|
|
3324
|
-
height: sizeCount
|
|
3309
|
+
width: "".concat(sizeCount, "px"),
|
|
3310
|
+
height: "".concat(sizeCount, "px"),
|
|
3325
3311
|
}, className: "flex items-center justify-center", ref: containerRef }, leftIcon ||
|
|
3326
3312
|
(validatedVariant === 'icon' && (React.createElement(TbCheck, { className: defaultIconSize }))))),
|
|
3327
3313
|
validatedVariant !== 'icon' && text && (React.createElement("span", { className: "w-full truncate ".concat(textClass) }, text)),
|
|
@@ -3331,29 +3317,14 @@ var TagLabel = function (_a) {
|
|
|
3331
3317
|
" ")),
|
|
3332
3318
|
isCloseable && (React.createElement("button", { type: "button", onClick: closeHandler, className: "flex aspect-square items-center justify-center rounded-full pt-[1px] ".concat(closeClass) },
|
|
3333
3319
|
React.createElement(TbX, null))))));
|
|
3334
|
-
}
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
open: true,
|
|
3339
|
-
closeHandler: function () { },
|
|
3340
|
-
leftIcon: null,
|
|
3341
|
-
rightIcon: null,
|
|
3342
|
-
left: null,
|
|
3343
|
-
right: null,
|
|
3344
|
-
bgColor: 'grey-light-50',
|
|
3345
|
-
textColor: 'black',
|
|
3346
|
-
isBlock: false,
|
|
3347
|
-
maxWidth: 300,
|
|
3348
|
-
isDark: false,
|
|
3349
|
-
};
|
|
3350
|
-
|
|
3351
|
-
var TagLabelInputInner = function (_a, ref) {
|
|
3352
|
-
var children = _a.children, className = _a.className, description = _a.description, _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.dropContProps, dropContProps = _c === void 0 ? {} : _c, customId = _a.id, _d = _a.isValid, isValid = _d === void 0 ? null : _d, _e = _a.label, label = _e === void 0 ? '' : _e, onBlur = _a.onBlur, onChange = _a.onChange, onChangeText = _a.onChangeText, onFocus = _a.onFocus, placeholder = _a.placeholder, _f = _a.readOnly, readOnly = _f === void 0 ? false : _f, _g = _a.required, required = _g === void 0 ? false : _g, _h = _a.size, size = _h === void 0 ? 'md' : _h, _j = _a.value, value = _j === void 0 ? [] : _j, _k = _a.zIndex, zIndex = _k === void 0 ? 10 : _k, restInputProps = __rest(_a, ["children", "className", "description", "disabled", "dropContProps", "id", "isValid", "label", "onBlur", "onChange", "onChangeText", "onFocus", "placeholder", "readOnly", "required", "size", "value", "zIndex"]);
|
|
3320
|
+
}
|
|
3321
|
+
|
|
3322
|
+
function TagLabelInputInner(_a, ref) {
|
|
3323
|
+
var _b = _a.children, children = _b === void 0 ? undefined : _b, className = _a.className, _c = _a.description, description = _c === void 0 ? '' : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.dropContProps, dropContProps = _e === void 0 ? {} : _e, _f = _a.id, customId = _f === void 0 ? undefined : _f, _g = _a.isValid, isValid = _g === void 0 ? null : _g, _h = _a.label, label = _h === void 0 ? '' : _h, onBlur = _a.onBlur, onChange = _a.onChange, _j = _a.onChangeText, onChangeText = _j === void 0 ? function () { } : _j, onFocus = _a.onFocus, placeholder = _a.placeholder, _k = _a.readOnly, readOnly = _k === void 0 ? false : _k, _l = _a.required, required = _l === void 0 ? false : _l, _m = _a.size, size = _m === void 0 ? 'md' : _m, value = _a.value, _o = _a.zIndex, zIndex = _o === void 0 ? 10 : _o, restInputProps = __rest(_a, ["children", "className", "description", "disabled", "dropContProps", "id", "isValid", "label", "onBlur", "onChange", "onChangeText", "onFocus", "placeholder", "readOnly", "required", "size", "value", "zIndex"]);
|
|
3353
3324
|
var generatedId = React.useId();
|
|
3354
3325
|
var inputId = customId || generatedId;
|
|
3355
|
-
var
|
|
3356
|
-
var
|
|
3326
|
+
var _p = React.useState(false), isFocused = _p[0], setIsFocused = _p[1];
|
|
3327
|
+
var _q = React.useState(false), isHovered = _q[0], setIsHovered = _q[1];
|
|
3357
3328
|
var internalInputRef = React.useRef(null);
|
|
3358
3329
|
var containerRef = React.useRef(null);
|
|
3359
3330
|
React.useImperativeHandle(ref, function () { return internalInputRef.current; });
|
|
@@ -3377,12 +3348,12 @@ var TagLabelInputInner = function (_a, ref) {
|
|
|
3377
3348
|
var updatedValues = value.filter(function (_, idx) { return idx !== indexToRemove; });
|
|
3378
3349
|
onChange(updatedValues);
|
|
3379
3350
|
};
|
|
3380
|
-
var
|
|
3351
|
+
var _r = useLiveSearch({
|
|
3381
3352
|
value: value,
|
|
3382
3353
|
setValue: onChange,
|
|
3383
3354
|
onChangeText: onChangeText,
|
|
3384
3355
|
dropContOnClickItem: dropContProps === null || dropContProps === void 0 ? void 0 : dropContProps.onClickItem,
|
|
3385
|
-
}), isOpen =
|
|
3356
|
+
}), isOpen = _r.isOpen, setIsOpen = _r.setIsOpen, searchTerm = _r.searchTerm, handleInputChange = _r.handleInputChange, handleDropdownItemClick = _r.handleDropdownItemClick;
|
|
3386
3357
|
var handleKeyDown = function (e) {
|
|
3387
3358
|
var _a;
|
|
3388
3359
|
if (e.key === 'Backspace' && searchTerm === '' && value.length > 0) {
|
|
@@ -3411,14 +3382,13 @@ var TagLabelInputInner = function (_a, ref) {
|
|
|
3411
3382
|
return 'border-b-bia-red';
|
|
3412
3383
|
return 'border-b-bia-blue';
|
|
3413
3384
|
};
|
|
3414
|
-
var descColor =
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
var
|
|
3420
|
-
var
|
|
3421
|
-
var _r = processRenderedChildren(children, searchTerm, 'include', handleDropdownItemClick, value), renderedChildren = _r.renderedChildren, hasFilteredResults = _r.hasFilteredResults;
|
|
3385
|
+
var descColor = 'text-primary-cool';
|
|
3386
|
+
if (!disabled && isExistValidation) {
|
|
3387
|
+
descColor = isValid ? 'text-bia-green' : 'text-bia-red';
|
|
3388
|
+
}
|
|
3389
|
+
var _s = sizeConfig$6[size], inputClass = _s.inputClass, paddingClass = _s.paddingClass, resizePosition = _s.resizePosition;
|
|
3390
|
+
var _t = dropContProps || {}, dropContClassName = _t.className, restDropContProps = __rest(_t, ["className"]);
|
|
3391
|
+
var _u = processRenderedChildren(children, searchTerm, 'include', handleDropdownItemClick, value), renderedChildren = _u.renderedChildren, hasFilteredResults = _u.hasFilteredResults;
|
|
3422
3392
|
var showPlaceholder = !disabled && !readOnly && value.length === 0;
|
|
3423
3393
|
console.log('showPlaceholder', showPlaceholder);
|
|
3424
3394
|
return (React.createElement("div", { className: cn$1('relative w-full', className) },
|
|
@@ -3437,7 +3407,7 @@ var TagLabelInputInner = function (_a, ref) {
|
|
|
3437
3407
|
!readOnly &&
|
|
3438
3408
|
'focus-within:rounded-b-none hover:rounded-b-none', isFocused && !disabled && !readOnly && 'rounded-b-none', getBottomBorderColor(), paddingClass) },
|
|
3439
3409
|
value.map(function (tag, index) { return (React.createElement(TagLabel, __assign({ key: typeof tag === 'object' ? tag.id || tag.label : "".concat(tag, "-").concat(index), variant: "closeable", size: size, text: getTagLabel(tag), open: true, closeHandler: function () { return handleRemoveTag(index); } }, getTagStyles(tag)))); }),
|
|
3440
|
-
React.createElement("input", __assign({}, restInputProps, { "aria-autocomplete": "list", "aria-expanded": isOpen, "aria-haspopup": "listbox", disabled: disabled, id: inputId, onChange: function (e) {
|
|
3410
|
+
React.createElement("input", __assign({}, restInputProps, { "aria-autocomplete": "list", "aria-expanded": isOpen, "aria-haspopup": "listbox", "aria-controls": "".concat(inputId, "-listbox"), disabled: disabled, id: inputId, onChange: function (e) {
|
|
3441
3411
|
if (disabled || readOnly)
|
|
3442
3412
|
return;
|
|
3443
3413
|
onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText(e);
|
|
@@ -3445,44 +3415,47 @@ var TagLabelInputInner = function (_a, ref) {
|
|
|
3445
3415
|
}, onKeyDown: handleKeyDown, placeholder: showPlaceholder ? placeholder || 'Select options...' : '', readOnly: readOnly, ref: internalInputRef, role: "combobox", type: "text", value: disabled || readOnly ? '' : searchTerm, className: cn$1(inputClass, 'min-w-[80px] flex-1 border-none bg-transparent p-0 outline-none focus:ring-0', disabled && 'cursor-not-allowed', readOnly && 'pointer-events-none') })),
|
|
3446
3416
|
React.createElement(ResizeIcon, { className: cn$1('absolute', resizePosition) })),
|
|
3447
3417
|
description && (React.createElement("p", { className: cn$1('mt-1.5 text-xs transition-colors', descColor) }, description)),
|
|
3448
|
-
children && (React.createElement(DropdownContainer, __assign({ anchorRef: containerRef, className: cn$1('bianic-livesearch-dropdown w-full overflow-hidden bg-white shadow-lg', dropContClassName), isTopFlat: true, matchAnchorWidth: "min", onClose: function () { return setIsOpen(false); }, open: isOpen && !disabled && !readOnly, size: size, zIndex: zIndex }, restDropContProps), hasFilteredResults
|
|
3418
|
+
children && (React.createElement(DropdownContainer, __assign({ id: "".concat(inputId, "-listbox"), role: "listbox", anchorRef: containerRef, className: cn$1('bianic-livesearch-dropdown w-full overflow-hidden bg-white shadow-lg', dropContClassName), isTopFlat: true, matchAnchorWidth: "min", onClose: function () { return setIsOpen(false); }, open: isOpen && !disabled && !readOnly, size: size, zIndex: zIndex }, restDropContProps), hasFilteredResults
|
|
3449
3419
|
? renderedChildren
|
|
3450
3420
|
: searchTerm.length > 0 && (React.createElement(DropdownItem, { content: React.createElement("div", { className: "px-4 py-2 text-gray-500" }, "Tidak ada hasil ditemukan.") }))))));
|
|
3451
|
-
}
|
|
3421
|
+
}
|
|
3452
3422
|
var TagLabelInput = React.forwardRef(TagLabelInputInner);
|
|
3453
3423
|
|
|
3454
3424
|
var sizeConfig$4 = {
|
|
3455
3425
|
md: {
|
|
3456
|
-
containerSize: 'w-[
|
|
3457
|
-
|
|
3458
|
-
|
|
3426
|
+
containerSize: 'w-[46px] h-[26px]',
|
|
3427
|
+
trackBorder: 'border-2',
|
|
3428
|
+
knobSize: 'size-[18px]',
|
|
3429
|
+
knobInset: 'mx-[4px]',
|
|
3430
|
+
labelClass: 'text-size-base',
|
|
3459
3431
|
},
|
|
3460
3432
|
sm: {
|
|
3461
|
-
containerSize: 'w-[
|
|
3462
|
-
|
|
3463
|
-
|
|
3433
|
+
containerSize: 'w-[32px] h-[20px]',
|
|
3434
|
+
trackBorder: 'border-2',
|
|
3435
|
+
knobSize: 'size-[12px]',
|
|
3436
|
+
knobInset: 'mx-[4px]',
|
|
3437
|
+
labelClass: 'text-size-sm',
|
|
3438
|
+
},
|
|
3439
|
+
tn: {
|
|
3440
|
+
containerSize: 'w-[22.4px] h-[14px]',
|
|
3441
|
+
trackBorder: 'border-[1.5px]',
|
|
3442
|
+
knobSize: 'size-[8.4px]',
|
|
3443
|
+
knobInset: 'mx-[2.8px]',
|
|
3444
|
+
labelClass: 'text-size-sm',
|
|
3464
3445
|
},
|
|
3465
3446
|
};
|
|
3466
3447
|
|
|
3467
3448
|
function Toggle(_a) {
|
|
3468
3449
|
var _b = _a.label, label = _b === void 0 ? '' : _b, _c = _a.size, size = _c === void 0 ? 'md' : _c, _d = _a.onClick, onClick = _d === void 0 ? function () { } : _d, _e = _a.checked, checked = _e === void 0 ? false : _e, _f = _a.id, id = _f === void 0 ? '' : _f, _g = _a.disabled, disabled = _g === void 0 ? false : _g;
|
|
3469
|
-
var _h = sizeConfig$4[size], containerSize = _h.containerSize,
|
|
3450
|
+
var _h = sizeConfig$4[size], containerSize = _h.containerSize, trackBorder = _h.trackBorder, knobSize = _h.knobSize, knobInset = _h.knobInset, labelClass = _h.labelClass;
|
|
3470
3451
|
var checkedClass = checked ? 'justify-end' : 'justify-start';
|
|
3471
3452
|
var containerClass = "".concat(checkedClass, " ").concat(containerSize);
|
|
3472
3453
|
return (React.createElement("div", { className: "flex items-center" },
|
|
3473
|
-
React.createElement("div", { className: "relative flex flex-shrink-0 cursor-pointer items-center rounded-full
|
|
3474
|
-
React.createElement("input", { id: id, checked: checked, disabled: disabled, className: "
|
|
3475
|
-
React.createElement("div", { className: "check-icon group peer z-10
|
|
3476
|
-
React.createElement("label", { htmlFor: id, className: "
|
|
3454
|
+
React.createElement("div", { className: "relative flex flex-shrink-0 cursor-pointer items-center rounded-full ".concat(containerClass), onClick: onClick },
|
|
3455
|
+
React.createElement("input", { id: id, checked: checked, disabled: disabled, className: "checkbox peer absolute h-full w-full cursor-pointer appearance-none rounded-full border-bia-grey bg-primary-white opacity-100 checked:border-bia-blue checked:bg-bia-blue hover:border-bia-blue-hover checked:hover:bg-bia-blue-hover focus:outline-none focus-visible:ring-1 focus-visible:ring-bia-blue focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:border-none disabled:bg-bia-grey-light-80 disabled:checked:bg-bia-blue-light-50 peer-hover:border-bia-blue-hover ".concat(trackBorder), type: "checkbox" }),
|
|
3456
|
+
React.createElement("div", { className: "check-icon group peer z-10 flex-shrink-0 rounded-full bg-bia-grey text-bia-grey peer-checked:bg-primary-white peer-checked:hover:bg-primary-white peer-hover:bg-bia-blue-hover peer-checked:peer-hover:bg-primary-white peer-disabled:cursor-not-allowed peer-disabled:bg-bia-grey-dark-10 peer-disabled:peer-checked:bg-bia-blue-light-90 ".concat(knobSize, " ").concat(knobInset) })),
|
|
3457
|
+
React.createElement("label", { htmlFor: id, className: "ml-2 font-normal leading-4 text-bia-black ".concat(labelClass), style: { color: disabled ? '#8C8CA6' : '' } }, label)));
|
|
3477
3458
|
}
|
|
3478
|
-
Toggle.defaultProps = {
|
|
3479
|
-
label: '',
|
|
3480
|
-
size: 'md',
|
|
3481
|
-
onClick: function () { },
|
|
3482
|
-
checked: false,
|
|
3483
|
-
id: '',
|
|
3484
|
-
disabled: false,
|
|
3485
|
-
};
|
|
3486
3459
|
|
|
3487
3460
|
var isSelectedConfig = {
|
|
3488
3461
|
selected: 'bg-white text-primary-black cursor-default',
|
|
@@ -3530,8 +3503,8 @@ function SegmentButtonGroup(_a) {
|
|
|
3530
3503
|
}
|
|
3531
3504
|
|
|
3532
3505
|
var sizeUnion = ['md', 'sm'];
|
|
3533
|
-
|
|
3534
|
-
var
|
|
3506
|
+
function FormGroup(_a) {
|
|
3507
|
+
var _b = _a.children, children = _b === void 0 ? undefined : _b, _c = _a.size, size = _c === void 0 ? undefined : _c;
|
|
3535
3508
|
var validSize = validUnion(size, sizeUnion);
|
|
3536
3509
|
return (React.createElement("div", { className: "bianic-form-group flex items-end" }, React.Children.map(children, function (child) {
|
|
3537
3510
|
var _a;
|
|
@@ -3548,27 +3521,27 @@ var FormGroup = function (_a) {
|
|
|
3548
3521
|
}
|
|
3549
3522
|
return React.cloneElement(child, { size: validSize });
|
|
3550
3523
|
})));
|
|
3551
|
-
}
|
|
3524
|
+
}
|
|
3552
3525
|
|
|
3553
|
-
|
|
3526
|
+
function FormGroupButton(_a) {
|
|
3554
3527
|
var props = __rest(_a, []);
|
|
3555
3528
|
return (React.createElement("div", { className: "bianic-fgc-container h-full" },
|
|
3556
3529
|
React.createElement(Button, __assign({ className: "whitespace-nowrap ".concat(props.className), minWidth: 0 }, props))));
|
|
3557
|
-
}
|
|
3530
|
+
}
|
|
3558
3531
|
|
|
3559
3532
|
var labelSizeConfig = {
|
|
3560
3533
|
md: 'px-[11px] py-[9px] h-[40px] gap-[5px] text-size-base ',
|
|
3561
3534
|
sm: 'px-[8px] py-[6px] h-[30px] gap-[5px] text-size-sm ',
|
|
3562
3535
|
};
|
|
3563
3536
|
|
|
3564
|
-
|
|
3565
|
-
var
|
|
3537
|
+
function FormGroupLabel(_a) {
|
|
3538
|
+
var _b = _a.iconLeft, iconLeft = _b === void 0 ? undefined : _b, _c = _a.iconRight, iconRight = _c === void 0 ? undefined : _c, _d = _a.size, size = _d === void 0 ? 'md' : _d, _e = _a.text, text = _e === void 0 ? undefined : _e, htmlFor = _a.htmlFor, props = __rest(_a, ["iconLeft", "iconRight", "size", "text", "htmlFor"]);
|
|
3566
3539
|
var sizeClass = labelSizeConfig[size];
|
|
3567
|
-
return (React.createElement("label", __assign({ className: "bianic-fgc-label flex items-center justify-center whitespace-nowrap border border-bia-grey-dark-10 bg-bia-grey-light-80 p-[11px] font-semibold text-bia-black ".concat(sizeClass) }, props),
|
|
3540
|
+
return (React.createElement("label", __assign({ htmlFor: htmlFor, className: "bianic-fgc-label flex items-center justify-center whitespace-nowrap border border-bia-grey-dark-10 bg-bia-grey-light-80 p-[11px] font-semibold text-bia-black ".concat(sizeClass) }, props),
|
|
3568
3541
|
childrenElement(iconLeft),
|
|
3569
3542
|
childrenElement(text),
|
|
3570
3543
|
childrenElement(iconRight)));
|
|
3571
|
-
}
|
|
3544
|
+
}
|
|
3572
3545
|
|
|
3573
3546
|
var DAYS_MAP = [
|
|
3574
3547
|
'Monday',
|
|
@@ -3620,7 +3593,7 @@ var checkIsValidDate = function (dateString) {
|
|
|
3620
3593
|
date.getUTCDate() === day);
|
|
3621
3594
|
};
|
|
3622
3595
|
var dateToInputString = function (dateObj) {
|
|
3623
|
-
if (!(dateObj instanceof Date) || isNaN(dateObj.getTime()))
|
|
3596
|
+
if (!(dateObj instanceof Date) || Number.isNaN(dateObj.getTime()))
|
|
3624
3597
|
return '';
|
|
3625
3598
|
var year = dateObj.getFullYear();
|
|
3626
3599
|
var month = String(dateObj.getMonth() + 1).padStart(2, '0');
|
|
@@ -3641,13 +3614,11 @@ var areMonthsAdjacent = function (leftMonth, leftYear, rightMonth, rightYear) {
|
|
|
3641
3614
|
// December + 1 month = January of next year
|
|
3642
3615
|
return rightMonth === 0 && rightYear === leftYear + 1;
|
|
3643
3616
|
}
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
return rightMonth === leftMonth + 1 && rightYear === leftYear;
|
|
3647
|
-
}
|
|
3617
|
+
// Any other month + 1 month
|
|
3618
|
+
return rightMonth === leftMonth + 1 && rightYear === leftYear;
|
|
3648
3619
|
};
|
|
3649
3620
|
|
|
3650
|
-
|
|
3621
|
+
function DateDisplay(_a) {
|
|
3651
3622
|
var displayDays = _a.displayDays, viewMonthValue = _a.viewMonthValue, selectedDate = _a.selectedDate, onDateSelect = _a.onDateSelect, minDateValue = _a.minDateValue, maxDateValue = _a.maxDateValue;
|
|
3652
3623
|
var isRangeMode = Array.isArray(selectedDate) && selectedDate.length === 2;
|
|
3653
3624
|
var startRangeDate = isRangeMode && (selectedDate === null || selectedDate === void 0 ? void 0 : selectedDate[0]) ? new Date(selectedDate[0]) : null;
|
|
@@ -3661,11 +3632,12 @@ var DateDisplay = function (_a) {
|
|
|
3661
3632
|
var isOutOfMonth = date.getMonth() !== viewMonthValue;
|
|
3662
3633
|
var isStartRange = isRangeMode && checkDateEquals(date, startRangeDate);
|
|
3663
3634
|
var isEndRange = isRangeMode && checkDateEquals(date, endRangeDate);
|
|
3664
|
-
var isSelected =
|
|
3665
|
-
|
|
3635
|
+
var isSelected = false;
|
|
3636
|
+
if (selectedDate) {
|
|
3637
|
+
isSelected = isRangeMode
|
|
3666
3638
|
? isStartRange || isEndRange
|
|
3667
|
-
: checkDateEquals(date, new Date(selectedDate))
|
|
3668
|
-
|
|
3639
|
+
: checkDateEquals(date, new Date(selectedDate));
|
|
3640
|
+
}
|
|
3669
3641
|
var isBetween = isRangeMode && startRangeDate && endRangeDate
|
|
3670
3642
|
? (function () {
|
|
3671
3643
|
var start = startRangeDate;
|
|
@@ -3679,43 +3651,60 @@ var DateDisplay = function (_a) {
|
|
|
3679
3651
|
})()
|
|
3680
3652
|
: false;
|
|
3681
3653
|
var isToday = checkDateEquals(date, new Date(TODAY_VALUE));
|
|
3682
|
-
var customClassname =
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3654
|
+
var customClassname = 'w-[31px] rounded-full';
|
|
3655
|
+
if (isRangeMode && (isBetween || isStartRange || isEndRange)) {
|
|
3656
|
+
if (isBetween) {
|
|
3657
|
+
customClassname = 'w-full';
|
|
3658
|
+
}
|
|
3659
|
+
else if (isStartRange) {
|
|
3660
|
+
customClassname = 'w-full rounded-l-full';
|
|
3661
|
+
}
|
|
3662
|
+
else {
|
|
3663
|
+
customClassname = 'rounded-r-full';
|
|
3664
|
+
}
|
|
3665
|
+
}
|
|
3666
|
+
var dayStateClass = 'hover:bg-bia-blue-pastel';
|
|
3667
|
+
if (isSelected) {
|
|
3668
|
+
dayStateClass = 'border border-bia-blue-dark-10 bg-bia-blue-dark-10';
|
|
3669
|
+
}
|
|
3670
|
+
else if (isBetween) {
|
|
3671
|
+
dayStateClass = isOutOfMonth
|
|
3672
|
+
? 'border border-bia-blue-light-50 bg-bia-blue-light-50'
|
|
3673
|
+
: 'border border-bia-blue-light-10 bg-bia-blue-light-10';
|
|
3674
|
+
}
|
|
3675
|
+
else if (isToday && !isOutOfRange) {
|
|
3676
|
+
dayStateClass = 'border border-bia-blue-light-50 bg-bia-blue-pastel';
|
|
3677
|
+
}
|
|
3678
|
+
var textStyle = 'text-bia-black';
|
|
3679
|
+
if (isSelected || isBetween) {
|
|
3680
|
+
textStyle = 'text-bia-white';
|
|
3681
|
+
}
|
|
3682
|
+
else if (isOutOfRange) {
|
|
3683
|
+
textStyle = 'text-bia-coolgrey-light-50';
|
|
3684
|
+
}
|
|
3685
|
+
else if (isOutOfMonth) {
|
|
3686
|
+
textStyle = 'text-bia-coolgrey';
|
|
3687
|
+
}
|
|
3688
|
+
return (React.createElement("button", { type: "button", key: date.toString(), className: "bianic-datepicker-calendar-day flex h-[31px] items-center justify-center ".concat(customClassname, " ").concat(dayStateClass), disabled: isOutOfRange, onClick: function () { return onDateSelect(date); } },
|
|
3689
|
+
React.createElement(Text, { variant: "small-text", extended: textStyle }, date.getDate())));
|
|
3705
3690
|
}))));
|
|
3706
|
-
}
|
|
3691
|
+
}
|
|
3707
3692
|
|
|
3708
|
-
|
|
3709
|
-
var viewYearValue = _a.viewYearValue, selectedDate = _a.selectedDate;
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3693
|
+
function MonthDisplay(_a) {
|
|
3694
|
+
var viewYearValue = _a.viewYearValue, selectedDate = _a.selectedDate;
|
|
3695
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars
|
|
3696
|
+
_a.viewMonthValue; var minDateValue = _a.minDateValue, maxDateValue = _a.maxDateValue, onMonthSelect = _a.onMonthSelect;
|
|
3697
|
+
var selectedDates = [];
|
|
3698
|
+
if (Array.isArray(selectedDate)) {
|
|
3699
|
+
selectedDates = selectedDate;
|
|
3700
|
+
}
|
|
3701
|
+
else if (selectedDate) {
|
|
3702
|
+
selectedDates = [selectedDate];
|
|
3703
|
+
}
|
|
3715
3704
|
var isMonthAlreadySelected = function (monthIndex) {
|
|
3716
3705
|
return selectedDates.some(function (date) {
|
|
3717
|
-
var dateYear = parseInt(date.slice(0, 4));
|
|
3718
|
-
var dateMonth = parseInt(date.slice(5, 7)) - 1;
|
|
3706
|
+
var dateYear = parseInt(date.slice(0, 4), 10);
|
|
3707
|
+
var dateMonth = parseInt(date.slice(5, 7), 10) - 1;
|
|
3719
3708
|
return dateYear === viewYearValue && dateMonth === monthIndex;
|
|
3720
3709
|
});
|
|
3721
3710
|
};
|
|
@@ -3738,80 +3727,93 @@ var MonthDisplay = function (_a) {
|
|
|
3738
3727
|
viewYearValue ===
|
|
3739
3728
|
parseInt((Array.isArray(selectedDate)
|
|
3740
3729
|
? selectedDate[0]
|
|
3741
|
-
: selectedDate).slice(0, 4)) &&
|
|
3730
|
+
: selectedDate).slice(0, 4), 10) &&
|
|
3742
3731
|
index ===
|
|
3743
3732
|
parseInt((Array.isArray(selectedDate)
|
|
3744
3733
|
? selectedDate[0]
|
|
3745
|
-
: selectedDate).slice(5, 7)) -
|
|
3734
|
+
: selectedDate).slice(5, 7), 10) -
|
|
3746
3735
|
1;
|
|
3747
|
-
|
|
3736
|
+
var textStyle = 'text-bia-black';
|
|
3737
|
+
if (isSelected || isAlreadySelected) {
|
|
3738
|
+
textStyle = 'text-bia-white';
|
|
3739
|
+
}
|
|
3740
|
+
else if (isOutOfRange) {
|
|
3741
|
+
textStyle = 'text-bia-coolgrey-light-50';
|
|
3742
|
+
}
|
|
3743
|
+
return (React.createElement("button", { type: "button", key: month, onClick: function (e) {
|
|
3748
3744
|
e.stopPropagation();
|
|
3749
3745
|
onMonthSelect(index);
|
|
3750
3746
|
}, disabled: isOutOfRange, className: "bianic-datepicker-calendar-month mx-[15px] flex h-[31px] items-center justify-center rounded-full ".concat(isSelected || isAlreadySelected
|
|
3751
3747
|
? 'border border-bia-blue-dark-10 bg-bia-blue-dark-10'
|
|
3752
3748
|
: 'enabled:hover:bg-bia-blue-pastel') },
|
|
3753
|
-
React.createElement(Text, { variant: "small-text", extended:
|
|
3754
|
-
? 'text-bia-white'
|
|
3755
|
-
: isOutOfRange
|
|
3756
|
-
? 'text-bia-coolgrey-light-50'
|
|
3757
|
-
: 'text-bia-black' }, month.slice(0, 3))));
|
|
3749
|
+
React.createElement(Text, { variant: "small-text", extended: textStyle }, month.slice(0, 3))));
|
|
3758
3750
|
})));
|
|
3759
|
-
}
|
|
3751
|
+
}
|
|
3760
3752
|
|
|
3761
|
-
|
|
3753
|
+
function YearDisplay(_a) {
|
|
3762
3754
|
var yearDisplayRange = _a.yearDisplayRange, viewYearValue = _a.viewYearValue, minDateValue = _a.minDateValue, maxDateValue = _a.maxDateValue, onYearSelect = _a.onYearSelect;
|
|
3763
3755
|
return (React.createElement("div", { className: "bianic-datepicker-calendar-year-grid grid grid-cols-4 gap-y-1.5" }, yearDisplayRange.map(function (year, index) {
|
|
3764
3756
|
var isOutOfRange = !!((minDateValue && year < minDateValue.getFullYear()) ||
|
|
3765
3757
|
(maxDateValue && year > maxDateValue.getFullYear()));
|
|
3766
3758
|
var isSelected = year === viewYearValue;
|
|
3767
3759
|
var isEdgeYear = index === 0 || index === 11;
|
|
3768
|
-
|
|
3760
|
+
var textStyle = 'text-bia-black';
|
|
3761
|
+
if (isSelected) {
|
|
3762
|
+
textStyle = 'text-bia-white';
|
|
3763
|
+
}
|
|
3764
|
+
else if (isOutOfRange) {
|
|
3765
|
+
textStyle = 'text-bia-coolgrey-light-50';
|
|
3766
|
+
}
|
|
3767
|
+
else if (isEdgeYear) {
|
|
3768
|
+
textStyle = 'text-bia-coolgrey';
|
|
3769
|
+
}
|
|
3770
|
+
return (React.createElement("button", { type: "button", key: year, onClick: function (e) {
|
|
3769
3771
|
e.stopPropagation();
|
|
3770
3772
|
onYearSelect(year);
|
|
3771
3773
|
}, disabled: isOutOfRange, className: "bianic-datepicker-calendar-month mx-[6px] flex h-[31px] items-center justify-center rounded-full ".concat(isSelected
|
|
3772
3774
|
? 'border border-bia-blue-dark-10 bg-bia-blue-dark-10'
|
|
3773
3775
|
: 'enabled:hover:bg-bia-blue-pastel', " ").concat(isEdgeYear ? 'text-bia-coolgrey' : '') },
|
|
3774
|
-
React.createElement(Text, { variant: "small-text", extended:
|
|
3775
|
-
? 'text-bia-white'
|
|
3776
|
-
: isOutOfRange
|
|
3777
|
-
? 'text-bia-coolgrey-light-50'
|
|
3778
|
-
: isEdgeYear
|
|
3779
|
-
? 'text-bia-coolgrey'
|
|
3780
|
-
: 'text-bia-black' }, year)));
|
|
3776
|
+
React.createElement(Text, { variant: "small-text", extended: textStyle }, year)));
|
|
3781
3777
|
})));
|
|
3782
|
-
}
|
|
3778
|
+
}
|
|
3783
3779
|
|
|
3784
|
-
|
|
3785
|
-
var pickerMode = _a.pickerMode, viewMonthValue = _a.viewMonthValue, viewYearValue = _a.viewYearValue, yearDisplayRange = _a.yearDisplayRange,
|
|
3780
|
+
function PickerHeader(_a) {
|
|
3781
|
+
var pickerMode = _a.pickerMode, viewMonthValue = _a.viewMonthValue, viewYearValue = _a.viewYearValue, yearDisplayRange = _a.yearDisplayRange, _b = _a.isPrevDisabled, isPrevDisabled = _b === void 0 ? undefined : _b, _c = _a.isNextDisabled, isNextDisabled = _c === void 0 ? undefined : _c, _d = _a.handlePrevMonth, handlePrevMonth = _d === void 0 ? undefined : _d, _e = _a.handlePrevYear, handlePrevYear = _e === void 0 ? undefined : _e, _f = _a.handlePrevDecade, handlePrevDecade = _f === void 0 ? undefined : _f, _g = _a.handleNextMonth, handleNextMonth = _g === void 0 ? undefined : _g, _h = _a.handleNextYear, handleNextYear = _h === void 0 ? undefined : _h, _j = _a.handleNextDecade, handleNextDecade = _j === void 0 ? undefined : _j, handlePickerMode = _a.handlePickerMode;
|
|
3782
|
+
var handlePrev = handlePrevDecade;
|
|
3783
|
+
if (pickerMode === 'date') {
|
|
3784
|
+
handlePrev = handlePrevMonth;
|
|
3785
|
+
}
|
|
3786
|
+
else if (pickerMode === 'month') {
|
|
3787
|
+
handlePrev = handlePrevYear;
|
|
3788
|
+
}
|
|
3789
|
+
var handleNext = handleNextDecade;
|
|
3790
|
+
if (pickerMode === 'date') {
|
|
3791
|
+
handleNext = handleNextMonth;
|
|
3792
|
+
}
|
|
3793
|
+
else if (pickerMode === 'month') {
|
|
3794
|
+
handleNext = handleNextYear;
|
|
3795
|
+
}
|
|
3786
3796
|
return (React.createElement("div", { className: "bianic-datepicker-calendar-controller flex w-full items-center justify-between" },
|
|
3787
|
-
React.createElement("button", { className: "bianic-datepicker-calendar-prev-button text-bia-coolgrey disabled:text-bia-coolgrey-light-50", disabled: isPrevDisabled(), onClick:
|
|
3788
|
-
? handlePrevMonth
|
|
3789
|
-
: pickerMode === 'month'
|
|
3790
|
-
? handlePrevYear
|
|
3791
|
-
: handlePrevDecade },
|
|
3797
|
+
React.createElement("button", { type: "button", className: "bianic-datepicker-calendar-prev-button text-bia-coolgrey disabled:text-bia-coolgrey-light-50", disabled: isPrevDisabled ? isPrevDisabled() : false, onClick: handlePrev },
|
|
3792
3798
|
React.createElement(TbChevronLeft, { size: 18 })),
|
|
3793
3799
|
React.createElement("div", { className: "bianic-datepicker-calendar-current-month flex items-center justify-center gap-1" },
|
|
3794
|
-
React.createElement("button", { className: pickerMode === 'date' ? '' : 'hidden', onClick: function (e) {
|
|
3800
|
+
React.createElement("button", { type: "button", className: pickerMode === 'date' ? '' : 'hidden', onClick: function (e) {
|
|
3795
3801
|
e.stopPropagation();
|
|
3796
3802
|
handlePickerMode('month');
|
|
3797
3803
|
} },
|
|
3798
3804
|
React.createElement(Text, { variant: "normal-text-semibold" },
|
|
3799
3805
|
MONTH_MAP[viewMonthValue],
|
|
3800
3806
|
' ')),
|
|
3801
|
-
React.createElement("button", { className: pickerMode === 'date' || pickerMode === 'month' ? '' : 'hidden', onClick: function (e) {
|
|
3807
|
+
React.createElement("button", { type: "button", className: pickerMode === 'date' || pickerMode === 'month' ? '' : 'hidden', onClick: function (e) {
|
|
3802
3808
|
e.stopPropagation();
|
|
3803
3809
|
handlePickerMode('year');
|
|
3804
3810
|
} },
|
|
3805
3811
|
React.createElement(Text, { variant: "normal-text" }, viewYearValue)),
|
|
3806
|
-
React.createElement("button", { className: pickerMode === 'year' ? '' : 'hidden' },
|
|
3812
|
+
React.createElement("button", { type: "button", className: pickerMode === 'year' ? '' : 'hidden' },
|
|
3807
3813
|
React.createElement(Text, { variant: "normal-text" }, "".concat(yearDisplayRange[1], " - ").concat(yearDisplayRange[10])))),
|
|
3808
|
-
React.createElement("button", { className: "bianic-datepicker-calendar-next-button text-bia-coolgrey disabled:text-bia-coolgrey-light-50", disabled: isNextDisabled(), onClick:
|
|
3809
|
-
? handleNextMonth
|
|
3810
|
-
: pickerMode === 'month'
|
|
3811
|
-
? handleNextYear
|
|
3812
|
-
: handleNextDecade },
|
|
3814
|
+
React.createElement("button", { type: "button", className: "bianic-datepicker-calendar-next-button text-bia-coolgrey disabled:text-bia-coolgrey-light-50", disabled: isNextDisabled ? isNextDisabled() : false, onClick: handleNext },
|
|
3813
3815
|
React.createElement(TbChevronRight, { size: 18 }))));
|
|
3814
|
-
}
|
|
3816
|
+
}
|
|
3815
3817
|
|
|
3816
3818
|
var useCalendarLogic = function (selectedDate, minDate, maxDate) {
|
|
3817
3819
|
var _a = React.useState('date'), pickerMode = _a[0], setPickerMode = _a[1];
|
|
@@ -3852,10 +3854,6 @@ var useCalendarLogic = function (selectedDate, minDate, maxDate) {
|
|
|
3852
3854
|
var handleNextDecade = function () {
|
|
3853
3855
|
setViewDecadeValue(function (prev) { return prev + 10; });
|
|
3854
3856
|
};
|
|
3855
|
-
React.useEffect(function () {
|
|
3856
|
-
var calculatedDisplayDays = getDisplayDays(viewMonthValue, viewYearValue);
|
|
3857
|
-
setDisplayDays(calculatedDisplayDays);
|
|
3858
|
-
}, [viewMonthValue, viewYearValue, selectedDate]);
|
|
3859
3857
|
var getDisplayDays = function (month, year) {
|
|
3860
3858
|
var monthStartDay = new Date("".concat(year, "-").concat(month + 1, "-01")).getDay() === 0
|
|
3861
3859
|
? 6
|
|
@@ -3872,6 +3870,10 @@ var useCalendarLogic = function (selectedDate, minDate, maxDate) {
|
|
|
3872
3870
|
}
|
|
3873
3871
|
return tempDisplayDays;
|
|
3874
3872
|
};
|
|
3873
|
+
React.useEffect(function () {
|
|
3874
|
+
var calculatedDisplayDays = getDisplayDays(viewMonthValue, viewYearValue);
|
|
3875
|
+
setDisplayDays(calculatedDisplayDays);
|
|
3876
|
+
}, [viewMonthValue, viewYearValue, selectedDate]);
|
|
3875
3877
|
var handleSetSelectedDate = function (date, onDateChange) {
|
|
3876
3878
|
if (date.getMonth() !== viewMonthValue) {
|
|
3877
3879
|
// if the date is not in the current view month, update the view month and year
|
|
@@ -3892,7 +3894,7 @@ var useCalendarLogic = function (selectedDate, minDate, maxDate) {
|
|
|
3892
3894
|
var startOfDecade = Math.floor(year / 10) * 10;
|
|
3893
3895
|
var endOfDecade = startOfDecade + 9;
|
|
3894
3896
|
var decadeRange = [];
|
|
3895
|
-
for (var i = startOfDecade - 1; i < endOfDecade + 2; i
|
|
3897
|
+
for (var i = startOfDecade - 1; i < endOfDecade + 2; i += 1) {
|
|
3896
3898
|
decadeRange.push(i);
|
|
3897
3899
|
}
|
|
3898
3900
|
return decadeRange;
|
|
@@ -3905,13 +3907,11 @@ var useCalendarLogic = function (selectedDate, minDate, maxDate) {
|
|
|
3905
3907
|
return (viewYearValue <= minDateValue.getFullYear() &&
|
|
3906
3908
|
viewMonthValue <= minDateValue.getMonth());
|
|
3907
3909
|
}
|
|
3908
|
-
|
|
3910
|
+
if (pickerMode === 'month') {
|
|
3909
3911
|
return viewYearValue <= minDateValue.getFullYear();
|
|
3910
3912
|
}
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
yearDisplayRange[0] <= minDateValue.getFullYear());
|
|
3914
|
-
}
|
|
3913
|
+
return (yearDisplayRange.includes(minDateValue.getFullYear()) &&
|
|
3914
|
+
yearDisplayRange[0] <= minDateValue.getFullYear());
|
|
3915
3915
|
};
|
|
3916
3916
|
var isNextDisabled = function () {
|
|
3917
3917
|
if (!maxDateValue)
|
|
@@ -3920,13 +3920,11 @@ var useCalendarLogic = function (selectedDate, minDate, maxDate) {
|
|
|
3920
3920
|
return (viewYearValue >= maxDateValue.getFullYear() &&
|
|
3921
3921
|
viewMonthValue >= maxDateValue.getMonth());
|
|
3922
3922
|
}
|
|
3923
|
-
|
|
3923
|
+
if (pickerMode === 'month') {
|
|
3924
3924
|
return viewYearValue >= maxDateValue.getFullYear();
|
|
3925
3925
|
}
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
yearDisplayRange[11] >= maxDateValue.getFullYear());
|
|
3929
|
-
}
|
|
3926
|
+
return (yearDisplayRange.includes(maxDateValue.getFullYear()) &&
|
|
3927
|
+
yearDisplayRange[11] >= maxDateValue.getFullYear());
|
|
3930
3928
|
};
|
|
3931
3929
|
return {
|
|
3932
3930
|
pickerMode: pickerMode,
|
|
@@ -3957,13 +3955,13 @@ var useCalendarLogic = function (selectedDate, minDate, maxDate) {
|
|
|
3957
3955
|
};
|
|
3958
3956
|
};
|
|
3959
3957
|
|
|
3960
|
-
|
|
3961
|
-
var selectedDate = _a.selectedDate, onDateSelect = _a.onDateSelect,
|
|
3962
|
-
var
|
|
3958
|
+
function PickerContent(_a) {
|
|
3959
|
+
var selectedDate = _a.selectedDate, onDateSelect = _a.onDateSelect, _b = _a.initialViewMonth, initialViewMonth = _b === void 0 ? undefined : _b, _c = _a.initialViewYear, initialViewYear = _c === void 0 ? undefined : _c, minDate = _a.minDate, maxDate = _a.maxDate, _d = _a.onPrevMonth, onPrevMonth = _d === void 0 ? undefined : _d, _e = _a.onNextMonth, onNextMonth = _e === void 0 ? undefined : _e, _f = _a.onMonthSelect, onMonthSelect = _f === void 0 ? undefined : _f, _g = _a.onYearSelect, onYearSelect = _g === void 0 ? undefined : _g;
|
|
3960
|
+
var _h = useCalendarLogic(
|
|
3963
3961
|
// use first selectedDate if array
|
|
3964
3962
|
Array.isArray(selectedDate)
|
|
3965
3963
|
? selectedDate[0]
|
|
3966
|
-
: selectedDate, minDate, maxDate), pickerMode =
|
|
3964
|
+
: selectedDate, minDate, maxDate), pickerMode = _h.pickerMode, viewMonthValue = _h.viewMonthValue, viewYearValue = _h.viewYearValue, yearDisplayRange = _h.yearDisplayRange, isPrevDisabled = _h.isPrevDisabled, isNextDisabled = _h.isNextDisabled, internalHandlePrevMonth = _h.handlePrevMonth, handlePrevYear = _h.handlePrevYear, handlePrevDecade = _h.handlePrevDecade, internalHandleNextMonth = _h.handleNextMonth, handleNextYear = _h.handleNextYear, handleNextDecade = _h.handleNextDecade, handlePickerMode = _h.handlePickerMode, getDisplayDays = _h.getDisplayDays, setViewMonthValue = _h.setViewMonthValue, setViewYearValue = _h.setViewYearValue, maxDateValue = _h.maxDateValue, minDateValue = _h.minDateValue;
|
|
3967
3965
|
React.useEffect(function () {
|
|
3968
3966
|
if (typeof initialViewMonth === 'number') {
|
|
3969
3967
|
setViewMonthValue(initialViewMonth);
|
|
@@ -3971,7 +3969,7 @@ var PickerContent = function (_a) {
|
|
|
3971
3969
|
if (typeof initialViewYear === 'number') {
|
|
3972
3970
|
setViewYearValue(initialViewYear);
|
|
3973
3971
|
}
|
|
3974
|
-
}, [initialViewMonth, initialViewYear]);
|
|
3972
|
+
}, [initialViewMonth, initialViewYear, setViewMonthValue, setViewYearValue]);
|
|
3975
3973
|
// Use custom handlers for range mode, fall back to internal for single mode
|
|
3976
3974
|
var handlePrevMonth = onPrevMonth || internalHandlePrevMonth;
|
|
3977
3975
|
var handleNextMonth = onNextMonth || internalHandleNextMonth;
|
|
@@ -3993,18 +3991,18 @@ var PickerContent = function (_a) {
|
|
|
3993
3991
|
setViewYearValue(y);
|
|
3994
3992
|
handlePickerMode('month');
|
|
3995
3993
|
}, viewYearValue: viewYearValue, yearDisplayRange: yearDisplayRange }))));
|
|
3996
|
-
}
|
|
3994
|
+
}
|
|
3997
3995
|
|
|
3998
|
-
|
|
3996
|
+
function SinglePicker(_a) {
|
|
3999
3997
|
var selectedDate = _a.selectedDate, onDateChange = _a.onDateChange, minDate = _a.minDate, maxDate = _a.maxDate;
|
|
4000
3998
|
var handleDateSelect = function (date) {
|
|
4001
3999
|
onDateChange(dateToInputString(date));
|
|
4002
4000
|
};
|
|
4003
4001
|
return (React.createElement("div", { className: "single-picker picker-body" },
|
|
4004
4002
|
React.createElement(PickerContent, { selectedDate: selectedDate !== null && selectedDate !== void 0 ? selectedDate : null, onDateSelect: handleDateSelect, minDate: minDate, maxDate: maxDate })));
|
|
4005
|
-
}
|
|
4003
|
+
}
|
|
4006
4004
|
|
|
4007
|
-
|
|
4005
|
+
function RangePicker(_a) {
|
|
4008
4006
|
var
|
|
4009
4007
|
// pickerMode,
|
|
4010
4008
|
selectedDate = _a.selectedDate, onDateChange = _a.onDateChange, onClose = _a.onClose, minDate = _a.minDate, maxDate = _a.maxDate, isPickerOpen = _a.isPickerOpen;
|
|
@@ -4013,16 +4011,12 @@ var RangePicker = function (_a) {
|
|
|
4013
4011
|
var rightInitDate = selectedDate && selectedDate[1] ? new Date(selectedDate[1]) : new Date();
|
|
4014
4012
|
var leftInitMonth = leftInitDate.getMonth();
|
|
4015
4013
|
var leftInitYear = leftInitDate.getFullYear();
|
|
4016
|
-
var rightInitMonth =
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
? rightInitDate.getFullYear()
|
|
4023
|
-
: leftInitMonth === 11
|
|
4024
|
-
? leftInitYear + 1
|
|
4025
|
-
: leftInitYear;
|
|
4014
|
+
var rightInitMonth = leftInitMonth === 11 ? 0 : leftInitMonth + 1;
|
|
4015
|
+
var rightInitYear = leftInitMonth === 11 ? leftInitYear + 1 : leftInitYear;
|
|
4016
|
+
if (rightInitDate) {
|
|
4017
|
+
rightInitMonth = rightInitDate.getMonth();
|
|
4018
|
+
rightInitYear = rightInitDate.getFullYear();
|
|
4019
|
+
}
|
|
4026
4020
|
// State to track left and right panel month/year
|
|
4027
4021
|
var _b = React.useState(leftInitMonth), leftMonth = _b[0], setLeftMonth = _b[1];
|
|
4028
4022
|
var _c = React.useState(leftInitYear), leftYear = _c[0], setLeftYear = _c[1];
|
|
@@ -4041,7 +4035,7 @@ var RangePicker = function (_a) {
|
|
|
4041
4035
|
React.useEffect(function () {
|
|
4042
4036
|
if (!isPickerOpen)
|
|
4043
4037
|
setTempSelectedDate(selectedDate || []);
|
|
4044
|
-
}, [isPickerOpen]);
|
|
4038
|
+
}, [isPickerOpen, selectedDate]);
|
|
4045
4039
|
var isAdjacent = React.useMemo(function () { return areMonthsAdjacent(leftMonth, leftYear, rightMonth, rightYear); }, [leftMonth, leftYear, rightMonth, rightYear]);
|
|
4046
4040
|
// Helper function to ensure left picker is always smaller than right picker
|
|
4047
4041
|
var ensureOrderedPickers = function (newLeftMonth, newLeftYear, newRightMonth, newRightYear) {
|
|
@@ -4095,14 +4089,12 @@ var RangePicker = function (_a) {
|
|
|
4095
4089
|
newRightMonth = rightMonth + 1;
|
|
4096
4090
|
}
|
|
4097
4091
|
}
|
|
4092
|
+
else if (leftMonth === 11) {
|
|
4093
|
+
newLeftMonth = 0;
|
|
4094
|
+
newLeftYear = leftYear + 1;
|
|
4095
|
+
}
|
|
4098
4096
|
else {
|
|
4099
|
-
|
|
4100
|
-
newLeftMonth = 0;
|
|
4101
|
-
newLeftYear = leftYear + 1;
|
|
4102
|
-
}
|
|
4103
|
-
else {
|
|
4104
|
-
newLeftMonth = leftMonth + 1;
|
|
4105
|
-
}
|
|
4097
|
+
newLeftMonth = leftMonth + 1;
|
|
4106
4098
|
}
|
|
4107
4099
|
ensureOrderedPickers(newLeftMonth, newLeftYear, newRightMonth, newRightYear);
|
|
4108
4100
|
};
|
|
@@ -4128,14 +4120,12 @@ var RangePicker = function (_a) {
|
|
|
4128
4120
|
newRightMonth = rightMonth - 1;
|
|
4129
4121
|
}
|
|
4130
4122
|
}
|
|
4123
|
+
else if (rightMonth === 0) {
|
|
4124
|
+
newRightMonth = 11;
|
|
4125
|
+
newRightYear = rightYear - 1;
|
|
4126
|
+
}
|
|
4131
4127
|
else {
|
|
4132
|
-
|
|
4133
|
-
newRightMonth = 11;
|
|
4134
|
-
newRightYear = rightYear - 1;
|
|
4135
|
-
}
|
|
4136
|
-
else {
|
|
4137
|
-
newRightMonth = rightMonth - 1;
|
|
4138
|
-
}
|
|
4128
|
+
newRightMonth = rightMonth - 1;
|
|
4139
4129
|
}
|
|
4140
4130
|
ensureOrderedPickers(newLeftMonth, newLeftYear, newRightMonth, newRightYear);
|
|
4141
4131
|
};
|
|
@@ -4170,21 +4160,23 @@ var RangePicker = function (_a) {
|
|
|
4170
4160
|
};
|
|
4171
4161
|
var handleMonthSelect = function (dateIndex, initYear) {
|
|
4172
4162
|
return function (val) {
|
|
4173
|
-
var selectedDates =
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4163
|
+
var selectedDates = [];
|
|
4164
|
+
if (Array.isArray(selectedDate)) {
|
|
4165
|
+
selectedDates = selectedDate;
|
|
4166
|
+
}
|
|
4167
|
+
else if (selectedDate) {
|
|
4168
|
+
selectedDates = [selectedDate];
|
|
4169
|
+
}
|
|
4178
4170
|
var isMonthAlreadySelected = selectedDates.some(function (date) {
|
|
4179
|
-
var dateYear = parseInt(date.slice(0, 4));
|
|
4180
|
-
var dateMonth = parseInt(date.slice(5, 7)) - 1;
|
|
4171
|
+
var dateYear = parseInt(date.slice(0, 4), 10);
|
|
4172
|
+
var dateMonth = parseInt(date.slice(5, 7), 10) - 1;
|
|
4181
4173
|
return dateYear === initYear && dateMonth === val;
|
|
4182
4174
|
});
|
|
4183
4175
|
if (isMonthAlreadySelected) {
|
|
4184
4176
|
if (!selectedDates[dateIndex]) {
|
|
4185
4177
|
return;
|
|
4186
4178
|
}
|
|
4187
|
-
var selectedMonth = parseInt(selectedDates[dateIndex].slice(5, 7)) - 1;
|
|
4179
|
+
var selectedMonth = parseInt(selectedDates[dateIndex].slice(5, 7), 10) - 1;
|
|
4188
4180
|
if (val === selectedMonth) {
|
|
4189
4181
|
if (dateIndex === 0) {
|
|
4190
4182
|
ensureOrderedPickers(selectedMonth, initYear, rightMonth, rightYear);
|
|
@@ -4193,17 +4185,12 @@ var RangePicker = function (_a) {
|
|
|
4193
4185
|
ensureOrderedPickers(leftMonth, leftYear, selectedMonth, initYear);
|
|
4194
4186
|
}
|
|
4195
4187
|
}
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4188
|
+
}
|
|
4189
|
+
else if (dateIndex === 0) {
|
|
4190
|
+
ensureOrderedPickers(val, initYear, rightMonth, rightYear);
|
|
4199
4191
|
}
|
|
4200
4192
|
else {
|
|
4201
|
-
|
|
4202
|
-
ensureOrderedPickers(val, initYear, rightMonth, rightYear);
|
|
4203
|
-
}
|
|
4204
|
-
else {
|
|
4205
|
-
ensureOrderedPickers(leftMonth, leftYear, val, initYear);
|
|
4206
|
-
}
|
|
4193
|
+
ensureOrderedPickers(leftMonth, leftYear, val, initYear);
|
|
4207
4194
|
}
|
|
4208
4195
|
};
|
|
4209
4196
|
};
|
|
@@ -4219,8 +4206,19 @@ var RangePicker = function (_a) {
|
|
|
4219
4206
|
onDateChange(tempSelectedDate.length ? tempSelectedDate : null);
|
|
4220
4207
|
onClose();
|
|
4221
4208
|
} })))));
|
|
4222
|
-
}
|
|
4209
|
+
}
|
|
4223
4210
|
|
|
4211
|
+
function PickerBody(_a) {
|
|
4212
|
+
var selectedDate = _a.selectedDate, minDate = _a.minDate, maxDate = _a.maxDate, onDateChange = _a.onDateChange, isPickerOpen = _a.isPickerOpen, _b = _a.pickerVariant, pickerVariant = _b === void 0 ? 'range' : _b, onClose = _a.onClose, isOpen = _a.isOpen;
|
|
4213
|
+
var onCloseRef = React.useRef(onClose);
|
|
4214
|
+
onCloseRef.current = onClose;
|
|
4215
|
+
React.useEffect(function () {
|
|
4216
|
+
if (!isPickerOpen) {
|
|
4217
|
+
onCloseRef.current();
|
|
4218
|
+
}
|
|
4219
|
+
}, [isPickerOpen]);
|
|
4220
|
+
return (React.createElement("div", { className: "picker-body flex gap-x-5" }, pickerVariant === 'single' ? (React.createElement(SinglePicker, { selectedDate: selectedDate, onDateChange: onDateChange, minDate: minDate, maxDate: maxDate })) : (React.createElement(RangePicker, { selectedDate: selectedDate, onDateChange: onDateChange, minDate: minDate, maxDate: maxDate, onClose: onClose, isPickerOpen: isOpen }))));
|
|
4221
|
+
}
|
|
4224
4222
|
var PickerCalendar = function (_a) {
|
|
4225
4223
|
var _b = _a.zIndex, zIndex = _b === void 0 ? 100 : _b, anchorRef = _a.anchorRef, maxDate = _a.maxDate, minDate = _a.minDate, onDateChange = _a.onDateChange; _a.ref; var _c = _a.selectedDate, selectedDate = _c === void 0 ? null : _c, _d = _a.isOpen, isOpen = _d === void 0 ? false : _d, _e = _a.onClose, onClose = _e === void 0 ? function () { } : _e, _f = _a.pickerVariant, pickerVariant = _f === void 0 ? 'range' : _f, props = __rest(_a, ["zIndex", "anchorRef", "maxDate", "minDate", "onDateChange", "ref", "selectedDate", "isOpen", "onClose", "pickerVariant"]);
|
|
4226
4224
|
// Hooks & States
|
|
@@ -4230,19 +4228,10 @@ var PickerCalendar = function (_a) {
|
|
|
4230
4228
|
var positionStyle = usePopupPosition(anchorRef, pickerCalendarRef)[0];
|
|
4231
4229
|
React.useEffect(function () {
|
|
4232
4230
|
setIsPickerOpen(isOpen);
|
|
4233
|
-
}, [isOpen]);
|
|
4231
|
+
}, [isOpen, setIsPickerOpen]);
|
|
4234
4232
|
return reactDom.createPortal(React.createElement("div", __assign({ className: "bianic-datepicker-calendar absolute rounded-b-radius-sm bg-bia-white px-1.5 pb-[17px] pt-[15px] text-bia-black shadow-md ".concat(className), ref: pickerCalendarRef, style: __assign(__assign({ zIndex: zIndex, display: isPickerOpen ? 'flex' : 'none' }, positionStyle), style) }, restProps),
|
|
4235
4233
|
React.createElement(PickerBody, { selectedDate: selectedDate, minDate: minDate, maxDate: maxDate, onDateChange: onDateChange, isPickerOpen: isPickerOpen, pickerVariant: pickerVariant, onClose: onClose, isOpen: isOpen })), document.body);
|
|
4236
4234
|
};
|
|
4237
|
-
var PickerBody = function (_a) {
|
|
4238
|
-
var selectedDate = _a.selectedDate, minDate = _a.minDate, maxDate = _a.maxDate, onDateChange = _a.onDateChange, isPickerOpen = _a.isPickerOpen, _b = _a.pickerVariant, pickerVariant = _b === void 0 ? 'range' : _b, onClose = _a.onClose, isOpen = _a.isOpen;
|
|
4239
|
-
React.useEffect(function () {
|
|
4240
|
-
if (!isPickerOpen) {
|
|
4241
|
-
onClose();
|
|
4242
|
-
}
|
|
4243
|
-
}, [isPickerOpen]);
|
|
4244
|
-
return (React.createElement("div", { className: "picker-body flex gap-x-5" }, pickerVariant === 'single' ? (React.createElement(SinglePicker, { selectedDate: selectedDate, onDateChange: onDateChange, minDate: minDate, maxDate: maxDate })) : (React.createElement(RangePicker, { selectedDate: selectedDate, onDateChange: onDateChange, minDate: minDate, maxDate: maxDate, onClose: onClose, isPickerOpen: isOpen }))));
|
|
4245
|
-
};
|
|
4246
4235
|
|
|
4247
4236
|
var monthMap = [
|
|
4248
4237
|
'January',
|
|
@@ -4258,32 +4247,52 @@ var monthMap = [
|
|
|
4258
4247
|
'November',
|
|
4259
4248
|
'December',
|
|
4260
4249
|
];
|
|
4250
|
+
function isDate(val) {
|
|
4251
|
+
return val instanceof Date && !Number.isNaN(val);
|
|
4252
|
+
}
|
|
4253
|
+
var displayDateFormatter = function (date) {
|
|
4254
|
+
if (!isDate(date))
|
|
4255
|
+
return '';
|
|
4256
|
+
return "".concat(date.getDate(), " ").concat(monthMap[date.getMonth()].slice(0, 3), " '").concat(date.getFullYear().toString().slice(2, 4));
|
|
4257
|
+
};
|
|
4261
4258
|
var DateInputDisplay = React.forwardRef(function (_a, ref) {
|
|
4262
|
-
var value = _a.value,
|
|
4263
|
-
|
|
4264
|
-
|
|
4259
|
+
var value = _a.value, _b = _a.setValue, setValue = _b === void 0 ? function () { } : _b, _c = _a.placeholder, placeholder = _c === void 0 ? 'YYYY-MM-DD' : _c, _d = _a.label, label = _d === void 0 ? '' : _d, required = _a.required, readOnly = _a.readOnly, id = _a.id, _e = _a.size, size = _e === void 0 ? 'sm' : _e, className = _a.className, _f = _a.disabled, disabled = _f === void 0 ? false : _f, _g = _a.buttonAction, buttonAction = _g === void 0 ? function () { } : _g, _h = _a.nullDisplay, nullDisplay = _h === void 0 ? '' : _h;
|
|
4260
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars
|
|
4261
|
+
_a.isActive;
|
|
4262
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars
|
|
4263
|
+
_a.setIsActive;
|
|
4264
|
+
var hasValue = Boolean(value || (value && value.length > 0));
|
|
4265
|
+
var inputValue = '';
|
|
4266
|
+
if (hasValue) {
|
|
4267
|
+
inputValue = Array.isArray(value)
|
|
4265
4268
|
? "".concat(value[0], " ").concat(value[1] ? "- ".concat(value[1]) : '')
|
|
4266
|
-
: value
|
|
4267
|
-
|
|
4268
|
-
var viewValue =
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4269
|
+
: value;
|
|
4270
|
+
}
|
|
4271
|
+
var viewValue = nullDisplay || placeholder;
|
|
4272
|
+
if (hasValue) {
|
|
4273
|
+
if (Array.isArray(value)) {
|
|
4274
|
+
var rangeEnd = value[1]
|
|
4275
|
+
? "- ".concat(displayDateFormatter(new Date(value[1])))
|
|
4276
|
+
: '';
|
|
4277
|
+
viewValue = "".concat(displayDateFormatter(new Date(value[0])), " ").concat(rangeEnd);
|
|
4278
|
+
}
|
|
4279
|
+
else {
|
|
4280
|
+
viewValue = displayDateFormatter(new Date(value));
|
|
4281
|
+
}
|
|
4282
|
+
}
|
|
4283
|
+
var _j = React.useState(false), isEditing = _j[0], setIsEditing = _j[1];
|
|
4284
|
+
var _k = React.useState(inputValue), dateString = _k[0], setDateString = _k[1];
|
|
4285
|
+
var fieldStyle = styleConfig.text.fieldStyle;
|
|
4286
|
+
var _l = sizeConfig$d[size], iconSize = _l.iconSize, fieldSize = _l.fieldSize, iconPosition = _l.iconPosition;
|
|
4277
4287
|
var borderStyle = 'border border-bia-grey-dark-10 bg-primary-white';
|
|
4278
4288
|
var extendedInputClassName = "w-full ".concat(fieldStyle, " ").concat(fieldSize, " ").concat(borderStyle, " ").concat(className);
|
|
4279
|
-
props.readOnly ? 'read-only:pointer-events-none' : '';
|
|
4280
4289
|
var handleTextChange = function (event) {
|
|
4281
4290
|
var rawValue = event.target.value;
|
|
4282
4291
|
setDateString(rawValue); // Update the displayed text input immediately
|
|
4283
4292
|
// --- Validation and Conversion Logic ---
|
|
4284
4293
|
if (rawValue) {
|
|
4285
4294
|
var newDate = new Date(rawValue);
|
|
4286
|
-
if (!isNaN(newDate.getTime())) {
|
|
4295
|
+
if (!Number.isNaN(newDate.getTime())) {
|
|
4287
4296
|
// If valid, update the Date object state
|
|
4288
4297
|
if (setValue)
|
|
4289
4298
|
setValue(rawValue);
|
|
@@ -4298,13 +4307,18 @@ var DateInputDisplay = React.forwardRef(function (_a, ref) {
|
|
|
4298
4307
|
setIsEditing(false);
|
|
4299
4308
|
setDateString(inputValue);
|
|
4300
4309
|
};
|
|
4301
|
-
var input = isEditing || disabled ? (React.createElement(TextInput, { type: "text", value: dateString !== null && dateString !== void 0 ? dateString : '', onChange: handleTextChange, onBlur: handleBlur, placeholder: placeholder, size: size, inputClassName: extendedInputClassName, autoFocus: true, disabled: disabled, actionElement: React.createElement("button", { className: "bianic-datepicker-toggle-button text-bia-coolgrey disabled:cursor-not-allowed", disabled: disabled, onClick: function () {
|
|
4302
|
-
buttonAction
|
|
4310
|
+
var input = isEditing || disabled ? (React.createElement(TextInput, { type: "text", value: dateString !== null && dateString !== void 0 ? dateString : '', onChange: handleTextChange, onBlur: handleBlur, placeholder: placeholder, size: size, inputClassName: extendedInputClassName, autoFocus: true, disabled: disabled, actionElement: React.createElement("button", { type: "button", className: "bianic-datepicker-toggle-button text-bia-coolgrey disabled:cursor-not-allowed", disabled: disabled, onClick: function () {
|
|
4311
|
+
buttonAction === null || buttonAction === void 0 ? void 0 : buttonAction();
|
|
4303
4312
|
} },
|
|
4304
4313
|
React.createElement(TbCalendar, { size: iconSize })) })) : (React.createElement(React.Fragment, null,
|
|
4305
|
-
React.createElement("div", { role: "button", onClick: function () { return setIsEditing(true); },
|
|
4314
|
+
React.createElement("div", { role: "button", tabIndex: 0, onClick: function () { return setIsEditing(true); }, onKeyDown: function (e) {
|
|
4315
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
4316
|
+
e.preventDefault();
|
|
4317
|
+
setIsEditing(true);
|
|
4318
|
+
}
|
|
4319
|
+
}, className: "bianic-text-input bianic-fgc-target w-full rounded hover:rounded-b-none hover:border-b-bia-blue focus:rounded-b-none focus-visible:outline-none disabled:border-bia-grey-dark-10 disabled:bg-bia-grey-light-80 disabled:text-bia-grey-active ".concat(extendedInputClassName, " ").concat(inputValue || nullDisplay ? 'text-bia-black' : 'text-bia-coolgrey') }, viewValue),
|
|
4306
4320
|
React.createElement("div", { className: "absolute inset-y-0 flex items-center pl-3 text-bia-coolgrey ".concat(iconPosition) },
|
|
4307
|
-
React.createElement("button", { className: "bianic-datepicker-toggle-button", disabled: disabled, onClick: function () { return buttonAction && buttonAction(); } },
|
|
4321
|
+
React.createElement("button", { type: "button", className: "bianic-datepicker-toggle-button", disabled: disabled, onClick: function () { return buttonAction && buttonAction(); } },
|
|
4308
4322
|
React.createElement(TbCalendar, { size: iconSize })))));
|
|
4309
4323
|
React.useEffect(function () {
|
|
4310
4324
|
// Only update dateString if we are NOT currently editing.
|
|
@@ -4315,20 +4329,21 @@ var DateInputDisplay = React.forwardRef(function (_a, ref) {
|
|
|
4315
4329
|
label && (React.createElement(FormLabel, { htmlFor: id, required: required, readOnly: readOnly }, label)),
|
|
4316
4330
|
React.createElement("div", { className: "relative w-full", ref: ref }, input)));
|
|
4317
4331
|
});
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4332
|
+
DateInputDisplay.defaultProps = {
|
|
4333
|
+
setValue: undefined,
|
|
4334
|
+
placeholder: 'YYYY-MM-DD',
|
|
4335
|
+
label: undefined,
|
|
4336
|
+
isActive: false,
|
|
4337
|
+
setIsActive: undefined,
|
|
4338
|
+
buttonAction: undefined,
|
|
4339
|
+
nullDisplay: undefined,
|
|
4322
4340
|
};
|
|
4323
|
-
function isDate(val) {
|
|
4324
|
-
return val instanceof Date && !isNaN(val);
|
|
4325
|
-
}
|
|
4326
4341
|
|
|
4327
4342
|
function DatePicker(_a) {
|
|
4328
|
-
var _b = _a.zIndexCalendar, zIndexCalendar = _b === void 0 ? 100 : _b,
|
|
4343
|
+
var _b = _a.zIndexCalendar, zIndexCalendar = _b === void 0 ? 100 : _b, _c = _a.value, value = _c === void 0 ? '' : _c, _d = _a.onChange, onChange = _d === void 0 ? function () { } : _d, _e = _a.variant, variant = _e === void 0 ? 'single' : _e, _f = _a.size, size = _f === void 0 ? 'sm' : _f, _g = _a.disabled, disabled = _g === void 0 ? false : _g, _h = _a.placeholder, placeholder = _h === void 0 ? '"YYYY-MM-DD"' : _h, _j = _a.label, label = _j === void 0 ? '' : _j, _k = _a.minDate, minDate = _k === void 0 ? '' : _k, _l = _a.maxDate, maxDate = _l === void 0 ? '' : _l, _m = _a.required, required = _m === void 0 ? false : _m, _o = _a.nullDisplay, nullDisplay = _o === void 0 ? '' : _o, _p = _a.inputClassName, inputClassName = _p === void 0 ? '' : _p, _q = _a.containerClassName, containerClassName = _q === void 0 ? '' : _q;
|
|
4329
4344
|
// State and Ref
|
|
4330
4345
|
var inputRef = React.useRef(null);
|
|
4331
|
-
var
|
|
4346
|
+
var _r = React.useState(false), isPickerOpen = _r[0], setIsPickerOpen = _r[1];
|
|
4332
4347
|
return (React.createElement("div", { className: "bianic-datepicker-container relative ".concat(containerClassName) },
|
|
4333
4348
|
React.createElement("div", { className: "bianic-datepicker-field-container" },
|
|
4334
4349
|
React.createElement(DateInputDisplay, { className: inputClassName || '', value: value, setValue: onChange, placeholder: placeholder, nullDisplay: nullDisplay, size: size, label: label, required: required, buttonAction: function () { return setIsPickerOpen(!isPickerOpen); }, ref: inputRef, disabled: disabled })),
|
|
@@ -4342,16 +4357,6 @@ var YearPickerDisplay = React.forwardRef(function (_a, ref) {
|
|
|
4342
4357
|
var _e = React.useState(false), isEditing = _e[0], setIsEditing = _e[1];
|
|
4343
4358
|
var _f = React.useState(value ? value.toString() : ''), inputValue = _f[0], setInputValue = _f[1];
|
|
4344
4359
|
var _g = React.useState(null), internalError = _g[0], setInternalError = _g[1];
|
|
4345
|
-
// Sync input string when value changes externally
|
|
4346
|
-
React.useEffect(function () {
|
|
4347
|
-
setInputValue(value ? value.toString() : '');
|
|
4348
|
-
if (value) {
|
|
4349
|
-
validateValue(value);
|
|
4350
|
-
}
|
|
4351
|
-
else {
|
|
4352
|
-
setError(null);
|
|
4353
|
-
}
|
|
4354
|
-
}, [value, minYear, maxYear]);
|
|
4355
4360
|
var setError = function (msg) {
|
|
4356
4361
|
setInternalError(msg);
|
|
4357
4362
|
onErrorChange === null || onErrorChange === void 0 ? void 0 : onErrorChange(msg);
|
|
@@ -4365,6 +4370,20 @@ var YearPickerDisplay = React.forwardRef(function (_a, ref) {
|
|
|
4365
4370
|
}
|
|
4366
4371
|
return null;
|
|
4367
4372
|
};
|
|
4373
|
+
// Sync input string when value changes externally.
|
|
4374
|
+
// setError/validateValue are intentionally excluded: they're plain
|
|
4375
|
+
// functions redefined every render (not memoized) from minYear/maxYear,
|
|
4376
|
+
// which are already tracked here - adding them would make this effect,
|
|
4377
|
+
// and the onErrorChange callback it can trigger, re-fire on every
|
|
4378
|
+
// unrelated re-render instead of only when value/minYear/maxYear change.
|
|
4379
|
+
React.useEffect(function () {
|
|
4380
|
+
setInputValue(value ? value.toString() : '');
|
|
4381
|
+
if (value) ;
|
|
4382
|
+
else {
|
|
4383
|
+
setError(null);
|
|
4384
|
+
}
|
|
4385
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4386
|
+
}, [value, minYear, maxYear]);
|
|
4368
4387
|
var handleChange = function (e) {
|
|
4369
4388
|
var rawValue = e.target.value;
|
|
4370
4389
|
var cleanValue = rawValue.replace(/\D/g, '').slice(0, 4);
|
|
@@ -4420,21 +4439,21 @@ var YearPickerDisplay = React.forwardRef(function (_a, ref) {
|
|
|
4420
4439
|
}
|
|
4421
4440
|
};
|
|
4422
4441
|
var _h = sizeConfig$d[size], iconSize = _h.iconSize, fieldSize = _h.fieldSize, iconPosition = _h.iconPosition;
|
|
4423
|
-
var fieldStyle = styleConfig
|
|
4442
|
+
var fieldStyle = styleConfig.text.fieldStyle;
|
|
4424
4443
|
var displayError = customErrorMessage || internalError;
|
|
4425
4444
|
var borderStyle = displayError
|
|
4426
4445
|
? 'border border-bia-red bg-primary-white'
|
|
4427
4446
|
: 'border border-bia-grey-dark-10 bg-primary-white';
|
|
4428
4447
|
var extendedInputClassName = "w-full ".concat(fieldStyle, " ").concat(fieldSize, " ").concat(borderStyle, " ").concat(className);
|
|
4429
|
-
props.readOnly ? 'read-only:pointer-events-none' : '';
|
|
4430
4448
|
var input = isEditing || disabled ? (React.createElement(TextInput, __assign({ type: "text", id: id, value: inputValue, placeholder: placeholder, size: size, inputClassName: extendedInputClassName, onChange: handleChange, onBlur: handleBlur, autoFocus: true, required: required, disabled: disabled, actionElement: React.createElement("button", { type: "button", className: "bianic-datepicker-toggle-button text-bia-coolgrey disabled:cursor-not-allowed", disabled: disabled, onClick: function () {
|
|
4431
|
-
buttonAction
|
|
4449
|
+
buttonAction === null || buttonAction === void 0 ? void 0 : buttonAction();
|
|
4432
4450
|
} },
|
|
4433
4451
|
React.createElement(TbCalendar, { size: iconSize })) }, props))) : (React.createElement(React.Fragment, null,
|
|
4434
4452
|
React.createElement("div", { role: "button", tabIndex: disabled ? -1 : 0, onClick: function () { return !disabled && setIsEditing(true); }, onKeyDown: function (e) {
|
|
4435
4453
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
4436
4454
|
e.preventDefault();
|
|
4437
|
-
!disabled
|
|
4455
|
+
if (!disabled)
|
|
4456
|
+
setIsEditing(true);
|
|
4438
4457
|
}
|
|
4439
4458
|
}, className: "bianic-text-input bianic-fgc-target flex w-full items-center rounded hover:rounded-b-none hover:border-b-bia-blue focus:rounded-b-none focus-visible:outline-none disabled:border-bia-grey-dark-10 disabled:bg-bia-grey-light-80 disabled:text-bia-grey-active ".concat(extendedInputClassName, " ").concat(value || nullDisplay ? 'text-bia-black' : 'text-bia-coolgrey', " ").concat(disabled ? 'cursor-not-allowed opacity-60' : 'cursor-text') }, value || nullDisplay || placeholder),
|
|
4440
4459
|
React.createElement("div", { className: "absolute inset-y-0 right-0 flex items-center pl-3 text-bia-coolgrey ".concat(iconPosition) },
|
|
@@ -4445,6 +4464,12 @@ var YearPickerDisplay = React.forwardRef(function (_a, ref) {
|
|
|
4445
4464
|
React.createElement("div", { className: "relative w-full", ref: inputRef }, input),
|
|
4446
4465
|
displayError && (React.createElement("span", { className: "text-xs text-bia-red" }, displayError))));
|
|
4447
4466
|
});
|
|
4467
|
+
YearPickerDisplay.defaultProps = {
|
|
4468
|
+
maxYear: undefined,
|
|
4469
|
+
minYear: undefined,
|
|
4470
|
+
errorMessage: undefined,
|
|
4471
|
+
onErrorChange: undefined,
|
|
4472
|
+
};
|
|
4448
4473
|
YearPickerDisplay.displayName = 'YearPickerDisplay';
|
|
4449
4474
|
|
|
4450
4475
|
var useYearLogic = function (selectYear, minYear, maxYear) {
|
|
@@ -4468,7 +4493,7 @@ var useYearLogic = function (selectYear, minYear, maxYear) {
|
|
|
4468
4493
|
var startOfDecade = Math.floor(year / 10) * 10;
|
|
4469
4494
|
var endOfDecade = startOfDecade + 9;
|
|
4470
4495
|
var decadeRange = [];
|
|
4471
|
-
for (var i = startOfDecade - 1; i < endOfDecade + 2; i
|
|
4496
|
+
for (var i = startOfDecade - 1; i < endOfDecade + 2; i += 1) {
|
|
4472
4497
|
decadeRange.push(i);
|
|
4473
4498
|
}
|
|
4474
4499
|
return decadeRange;
|
|
@@ -4515,25 +4540,25 @@ var PickerYear = function (_a) {
|
|
|
4515
4540
|
var substituteMinDate = minYear ? new Date(minYear, 0, 1) : null;
|
|
4516
4541
|
React.useEffect(function () {
|
|
4517
4542
|
setIsPickerOpen(isOpen);
|
|
4518
|
-
}, [isOpen]);
|
|
4543
|
+
}, [isOpen, setIsPickerOpen]);
|
|
4519
4544
|
return reactDom.createPortal(React.createElement("div", __assign({ className: "bianic-datepicker-calendar absolute rounded-b-radius-sm bg-bia-white px-1.5 pb-[17px] pt-[15px] text-bia-black shadow-md ".concat(className), ref: pickerCalendarRef, style: __assign(__assign({ zIndex: zIndex, display: isPickerOpen ? 'flex' : 'none' }, positionStyle), style) }, restProps),
|
|
4520
4545
|
React.createElement("div", { className: "picker-body flex w-[250px] flex-col gap-[15px]" },
|
|
4521
|
-
React.createElement(PickerHeader, { pickerMode:
|
|
4546
|
+
React.createElement(PickerHeader, { pickerMode: "year", handlePickerMode: function () { }, viewYearValue: viewYearValue, yearDisplayRange: yearDisplayRange, isPrevDisabled: isPrevDisabled, isNextDisabled: isNextDisabled, handlePrevYear: handlePrevYear, handlePrevDecade: handlePrevDecade, handleNextYear: handleNextYear, handleNextDecade: handleNextDecade, viewMonthValue: 0 }),
|
|
4522
4547
|
React.createElement(YearDisplay, { maxDateValue: substituteMaxDate, minDateValue: substituteMinDate, onYearSelect: function (y) {
|
|
4523
4548
|
setSelectedYear(y);
|
|
4524
4549
|
onClose();
|
|
4525
4550
|
}, viewYearValue: selectedYear, yearDisplayRange: yearDisplayRange }))), document.body);
|
|
4526
4551
|
};
|
|
4527
4552
|
|
|
4528
|
-
|
|
4529
|
-
var value = _a.value, onChange = _a.onChange, _b = _a.zIndexCalendar, zIndexCalendar = _b === void 0 ? 100 : _b,
|
|
4553
|
+
function YearPicker(_a) {
|
|
4554
|
+
var value = _a.value, onChange = _a.onChange, _b = _a.zIndexCalendar, zIndexCalendar = _b === void 0 ? 100 : _b, _c = _a.minYear, minYear = _c === void 0 ? undefined : _c, _d = _a.maxYear, maxYear = _d === void 0 ? undefined : _d, _e = _a.size, size = _e === void 0 ? 'md' : _e, disabled = _a.disabled, _f = _a.placeholder, placeholder = _f === void 0 ? '"YYYY-MM-DD"' : _f, label = _a.label, required = _a.required, nullDisplay = _a.nullDisplay, inputClassName = _a.inputClassName, containerClassName = _a.containerClassName;
|
|
4530
4555
|
var inputRef = React.useRef(null);
|
|
4531
|
-
var
|
|
4556
|
+
var _g = React.useState(false), isPickerOpen = _g[0], setIsPickerOpen = _g[1];
|
|
4532
4557
|
return (React.createElement("div", { className: "bianic-yearpicker-container relative ".concat(containerClassName) },
|
|
4533
4558
|
React.createElement("div", { className: "bianic-yearpicker-field-container" },
|
|
4534
4559
|
React.createElement(YearPickerDisplay, { className: inputClassName || '', value: value, setValue: onChange, placeholder: placeholder, nullDisplay: nullDisplay, size: size, label: label, required: required, buttonAction: function () { return setIsPickerOpen(!isPickerOpen); }, ref: inputRef, disabled: disabled, minYear: minYear, maxYear: maxYear })),
|
|
4535
4560
|
React.createElement(PickerYear, { maxYear: maxYear, minYear: minYear, zIndex: zIndexCalendar, anchorRef: inputRef, selectedYear: value, setSelectedYear: onChange, isOpen: isPickerOpen, onClose: function () { return setIsPickerOpen(false); } })));
|
|
4536
|
-
}
|
|
4561
|
+
}
|
|
4537
4562
|
|
|
4538
4563
|
/**
|
|
4539
4564
|
* Comprehensive MIME type & file extension validator
|
|
@@ -4639,8 +4664,8 @@ var useFileHandler = function (_a) {
|
|
|
4639
4664
|
};
|
|
4640
4665
|
};
|
|
4641
4666
|
|
|
4642
|
-
|
|
4643
|
-
var _b = _a.size, size = _b === void 0 ? 'md' : _b, accept = _a.accept, _c = _a.multiple, multiple = _c === void 0 ? false : _c, maxSize = _a.maxSize, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.label, label = _e === void 0 ? 'Choose File' : _e, _f = _a.variant, variant = _f === void 0 ? 'form-group' : _f, errorMessage = _a.errorMessage, _g = _a.value, value = _g === void 0 ? [] : _g, onChange = _a.onChange, onError = _a.onError, className = _a.className;
|
|
4667
|
+
function SimpleFileUploader(_a) {
|
|
4668
|
+
var _b = _a.size, size = _b === void 0 ? 'md' : _b, accept = _a.accept, _c = _a.multiple, multiple = _c === void 0 ? false : _c, maxSize = _a.maxSize, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.label, label = _e === void 0 ? 'Choose File' : _e, _f = _a.variant, variant = _f === void 0 ? 'form-group' : _f, errorMessage = _a.errorMessage, _g = _a.value, value = _g === void 0 ? [] : _g, onChange = _a.onChange, onError = _a.onError, className = _a.className, iconLeft = _a.iconLeft, buttonProps = __rest(_a, ["size", "accept", "multiple", "maxSize", "disabled", "label", "variant", "errorMessage", "value", "onChange", "onError", "className", "iconLeft"]);
|
|
4644
4669
|
var _h = useFileHandler({
|
|
4645
4670
|
accept: accept,
|
|
4646
4671
|
multiple: multiple,
|
|
@@ -4659,16 +4684,18 @@ var SimpleFileUploader = function (_a) {
|
|
|
4659
4684
|
}[size];
|
|
4660
4685
|
return (React.createElement("div", { className: cn$1('inline-flex flex-col items-start gap-1.5', className) },
|
|
4661
4686
|
React.createElement("input", { ref: inputRef, type: "file", accept: accept, multiple: multiple, disabled: disabled, onChange: handleInputChange, className: "hidden", "aria-label": "File input" }),
|
|
4662
|
-
React.createElement(Button
|
|
4687
|
+
React.createElement(Button
|
|
4688
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
4689
|
+
, __assign({}, buttonProps, { label: label, onClick: triggerClick, disabled: disabled, size: size, variant: variant, iconLeft: iconLeft !== null && iconLeft !== void 0 ? iconLeft : (React.createElement(TbFolderOpen, { size: iconSizes, className: "shrink-0 text-bia-black" })) })),
|
|
4663
4690
|
activeError && (React.createElement("div", { className: "flex items-center gap-1 text-xs font-medium text-bia-red" },
|
|
4664
4691
|
React.createElement(TbAlertCircle, { size: 14, className: "shrink-0" }),
|
|
4665
4692
|
React.createElement("span", null, activeError)))));
|
|
4666
|
-
}
|
|
4693
|
+
}
|
|
4667
4694
|
|
|
4668
|
-
|
|
4669
|
-
var _b = _a.variant, variant = _b === void 0 ? 'general' : _b, accept = _a.accept, _c = _a.multiple, multiple = _c === void 0 ? false : _c, maxSize = _a.maxSize, _d = _a.disabled, disabled = _d === void 0 ? false : _d,
|
|
4695
|
+
function DropzoneFileUploader(_a) {
|
|
4696
|
+
var _b = _a.variant, variant = _b === void 0 ? 'general' : _b, accept = _a.accept, _c = _a.multiple, multiple = _c === void 0 ? false : _c, maxSize = _a.maxSize, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.label, label = _e === void 0 ? undefined : _e, _f = _a.helperText, helperText = _f === void 0 ? undefined : _f, errorMessage = _a.errorMessage, _g = _a.value, value = _g === void 0 ? [] : _g, onChange = _a.onChange, onRemove = _a.onRemove, onError = _a.onError, _h = _a.onDownload, onDownload = _h === void 0 ? undefined : _h, className = _a.className;
|
|
4670
4697
|
var effectiveAccept = accept || (variant === 'image' ? 'image/*' : undefined);
|
|
4671
|
-
var
|
|
4698
|
+
var _j = useFileHandler({
|
|
4672
4699
|
accept: effectiveAccept,
|
|
4673
4700
|
multiple: multiple,
|
|
4674
4701
|
maxSize: maxSize,
|
|
@@ -4676,7 +4703,7 @@ var DropzoneFileUploader = function (_a) {
|
|
|
4676
4703
|
value: value,
|
|
4677
4704
|
onChange: onChange,
|
|
4678
4705
|
onError: onError,
|
|
4679
|
-
}), inputRef =
|
|
4706
|
+
}), inputRef = _j.inputRef, isDragging = _j.isDragging, internalError = _j.internalError, handleDragOver = _j.handleDragOver, handleDragLeave = _j.handleDragLeave, handleDrop = _j.handleDrop, handleInputChange = _j.handleInputChange, triggerClick = _j.triggerClick;
|
|
4680
4707
|
var isImageVariant = variant === 'image';
|
|
4681
4708
|
var defaultTitle = isImageVariant
|
|
4682
4709
|
? 'Drag & Drop your Image here'
|
|
@@ -4725,21 +4752,21 @@ var DropzoneFileUploader = function (_a) {
|
|
|
4725
4752
|
onRemove(item.id);
|
|
4726
4753
|
}, className: "rounded-full p-1.5 text-gray-400 hover:bg-gray-100 hover:text-red-500", "aria-label": "Remove ".concat(item.file.name) },
|
|
4727
4754
|
React.createElement(TbTrash, { size: 18 })))))); })))));
|
|
4728
|
-
}
|
|
4755
|
+
}
|
|
4729
4756
|
|
|
4730
|
-
|
|
4757
|
+
function AlertRoundedSquare(_a) {
|
|
4731
4758
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4732
4759
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4733
4760
|
React.createElement("path", { d: "M12 2C15.5929 2 18.2392 2.42477 19.9072 4.09277C21.5752 5.76078 22 8.40715 22 12C22 15.5929 21.5752 18.2392 19.9072 19.9072C18.2392 21.5752 15.5929 22 12 22C8.40715 22 5.76078 21.5752 4.09277 19.9072C2.42477 18.2392 2 15.5929 2 12C2 8.40715 2.42477 5.76078 4.09277 4.09277C5.76078 2.42477 8.40715 2 12 2ZM12 4C8.39285 4 6.53883 4.47484 5.50684 5.50684C4.47484 6.53883 4 8.39285 4 12C4 15.6071 4.47484 17.4612 5.50684 18.4932C6.53883 19.5252 8.39285 20 12 20C15.6071 20 17.4612 19.5252 18.4932 18.4932C19.5252 17.4612 20 15.6071 20 12C20 8.39285 19.5252 6.53883 18.4932 5.50684C17.4612 4.47484 15.6071 4 12 4ZM12.0098 15C12.5621 15 13.0098 15.4477 13.0098 16C13.0098 16.5523 12.5621 17 12.0098 17H12C11.4477 17 11 16.5523 11 16C11 15.4477 11.4477 15 12 15H12.0098ZM12 7C12.5523 7 13 7.44772 13 8V12C13 12.5523 12.5523 13 12 13C11.4477 13 11 12.5523 11 12V8C11 7.44772 11.4477 7 12 7Z", fill: "inherit" })));
|
|
4734
|
-
}
|
|
4761
|
+
}
|
|
4735
4762
|
|
|
4736
|
-
|
|
4763
|
+
function CubeHeader(_a) {
|
|
4737
4764
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4738
4765
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4739
4766
|
React.createElement("path", { d: "M17.895 3.553C17.8119 3.38684 17.6841 3.24711 17.526 3.14944C17.368 3.05177 17.1858 3.00003 17 3H7.00001C6.62102 3 6.27501 3.214 6.10501 3.553L2.10501 11.553C2.03549 11.6919 1.9993 11.8451 1.9993 12.0005C1.9993 12.1559 2.03549 12.3091 2.10501 12.448L6.10501 20.448C6.27501 20.786 6.62102 21 7.00001 21H17C17.379 21 17.725 20.786 17.895 20.447L21.895 12.447C21.9645 12.3081 22.0007 12.1549 22.0007 11.9995C22.0007 11.8441 21.9645 11.6909 21.895 11.552L17.895 3.553ZM19.382 11H11.618L8.61802 5H16.382L19.382 11ZM4.11801 12L7.00001 6.236L9.88202 12L7.00001 17.764L4.11801 12ZM16.382 19H8.61802L11.618 13H19.382L16.382 19Z", fill: "inherit" })));
|
|
4740
|
-
}
|
|
4767
|
+
}
|
|
4741
4768
|
|
|
4742
|
-
|
|
4769
|
+
function Discrepancy(_a) {
|
|
4743
4770
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4744
4771
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4745
4772
|
React.createElement("path", { d: "M13.2 3.6H3.40002V20.4H15.6V18H9.60001V16.8H13.2V10.8H15.6V7.2H10.7998V6H13.2V3.6Z", fill: "inherit" }),
|
|
@@ -4749,178 +4776,178 @@ var Discrepancy = function (_a) {
|
|
|
4749
4776
|
React.createElement("path", { d: "M22.8 12V16.8H20.4V12H22.8Z" }),
|
|
4750
4777
|
React.createElement("path", { d: "M20.4 18H16.8V20.4H20.4V18Z" }),
|
|
4751
4778
|
React.createElement("path", { d: "M14.4 12H19.2V16.8H14.4V12Z" })));
|
|
4752
|
-
}
|
|
4779
|
+
}
|
|
4753
4780
|
|
|
4754
|
-
|
|
4781
|
+
function ExposedPort(_a) {
|
|
4755
4782
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4756
4783
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4757
4784
|
React.createElement("path", { d: "M11.9999 3.33211C12.7365 3.33211 13.443 3.62479 13.9638 4.14559L19.8544 10.0362C20.3752 10.557 20.6679 11.2636 20.6679 12.0001C20.6679 12.7366 20.3752 13.4431 19.8544 13.9639L13.9638 19.8546C13.443 20.3754 12.7365 20.668 11.9999 20.668C11.2634 20.668 10.5569 20.3754 10.0361 19.8546L4.14545 13.9639C3.62465 13.4431 3.33197 12.7366 3.33197 12.0001C3.33199 11.2636 3.62467 10.557 4.14545 10.0362L10.0361 4.14559C10.5569 3.62481 11.2634 3.33213 11.9999 3.33211ZM11.9999 7.0909C11.7832 7.09101 11.5751 7.17694 11.4218 7.33016C11.2684 7.4836 11.1826 7.69226 11.1826 7.90926V11.1817H7.90912C7.69237 11.1818 7.48433 11.2678 7.33099 11.421C7.17755 11.5744 7.09174 11.7831 7.09174 12.0001C7.09176 12.217 7.17765 12.4248 7.33099 12.5782C7.48436 12.7316 7.69224 12.8184 7.90912 12.8184H11.1826V16.0909C11.1826 16.3078 11.2685 16.5156 11.4218 16.669C11.5752 16.8224 11.7831 16.9092 11.9999 16.9093C12.2169 16.9093 12.4256 16.8225 12.579 16.669C12.7323 16.5156 12.8183 16.3078 12.8183 16.0909V12.8184H16.0917C16.3086 12.8183 16.5165 12.7315 16.6699 12.5782C16.8232 12.4248 16.9091 12.217 16.9091 12.0001C16.9091 11.7831 16.8233 11.5744 16.6699 11.421C16.5166 11.2678 16.3085 11.1818 16.0917 11.1817H12.8183V7.90926C12.8183 7.69226 12.7325 7.4836 12.579 7.33016C12.4256 7.17679 12.2169 7.0909 11.9999 7.0909Z", fill: "inherit" })));
|
|
4758
|
-
}
|
|
4785
|
+
}
|
|
4759
4786
|
|
|
4760
|
-
|
|
4787
|
+
function Flowqount(_a) {
|
|
4761
4788
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4762
4789
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4763
|
-
React.createElement("g", {
|
|
4764
|
-
React.createElement("path", {
|
|
4790
|
+
React.createElement("g", { clipPath: "url(#clip0_514_7964)" },
|
|
4791
|
+
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8.07166 8.36706V20.6265C8.07166 20.9514 8.11036 21.227 8.57479 21.3959C9.64206 21.7852 10.7949 21.9999 11.9971 21.9975H12.0405H17.684H19.2802H21.9742V19.985C22.0152 18.5084 20.8459 17.6581 19.8608 17.6581C19.2251 17.6581 19.0328 17.6616 18.3842 17.6616C17.7063 17.6616 17.0894 17.3848 16.6426 16.9368H16.6391C16.1922 16.49 15.9143 15.8719 15.9143 15.1928V12.656C15.9143 12.4555 15.8333 12.2737 15.702 12.1424L15.7008 12.1435C15.5683 12.0122 15.3877 11.9301 15.1883 11.9301C14.9889 11.9301 14.8071 12.011 14.6758 12.1424L14.6769 12.1435C14.5456 12.2761 14.4635 12.4567 14.4635 12.656V15.1928C14.4635 15.8719 14.1855 16.49 13.7387 16.9368H13.7352C13.2872 17.3848 12.6714 17.6616 11.9935 17.6616C11.3239 17.6616 10.7081 17.4224 10.2578 17.0072C9.8039 16.5873 9.5236 16.0033 9.5236 15.3148V8.36706C9.5236 8.16886 9.4415 7.98707 9.30898 7.85571C9.17762 7.72319 8.99583 7.64109 8.79763 7.64109C8.59708 7.64109 8.41529 7.72201 8.28628 7.8522L8.28276 7.85571C8.15258 7.98472 8.07166 8.16651 8.07166 8.36706ZM11.2676 8.36706V15.3148C11.2676 15.4884 11.3321 15.6291 11.4365 15.7265C11.5678 15.8473 11.766 15.9176 11.9935 15.9176C12.1929 15.9176 12.3747 15.8367 12.5072 15.7054L12.5049 15.7042C12.6374 15.5717 12.7183 15.391 12.7183 15.1928V12.656C12.7183 11.9758 12.9963 11.3577 13.4431 10.9109H13.4467C13.8947 10.4629 14.5104 10.1861 15.1883 10.1861C15.8685 10.1861 16.4866 10.4641 16.9334 10.9109V10.9144C17.3815 11.3613 17.6582 11.9782 17.6582 12.656V15.1928C17.6582 15.391 17.7403 15.5717 17.8729 15.7042L17.8705 15.7054C18.003 15.8367 18.1848 15.9176 18.3842 15.9176C19.3729 15.9176 20.2103 15.9165 21.199 15.9165C21.6751 15.9165 22 15.6139 22 15.1577L21.9953 12.0427V11.9993C21.9953 6.47883 17.5187 2.0022 11.9971 2.0022C6.47663 2.0022 2 6.47883 2 11.9993C2 15.0052 3.32645 17.7003 5.42579 19.5334C5.56066 19.6519 5.70726 19.795 5.80578 19.8524C6.18343 20.0717 6.32768 19.7234 6.32768 19.5616V8.36706C6.32768 7.69152 6.60564 7.07462 7.05248 6.62543L7.05483 6.62426L7.056 6.62191C7.50519 6.17507 8.12209 5.89711 8.79763 5.89711C9.47786 5.89711 10.0959 6.17507 10.5428 6.62191C10.9896 7.06876 11.2676 7.68683 11.2676 8.36706Z", fill: "inherit" })),
|
|
4765
4792
|
React.createElement("defs", null,
|
|
4766
4793
|
React.createElement("clipPath", { id: "clip0_514_7964" },
|
|
4767
4794
|
React.createElement("rect", { width: "20", height: "20", fill: "white", transform: "translate(2 2)" })))));
|
|
4768
|
-
}
|
|
4795
|
+
}
|
|
4769
4796
|
|
|
4770
|
-
|
|
4797
|
+
function FQAnalytical(_a) {
|
|
4771
4798
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4772
4799
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4773
|
-
React.createElement("g", {
|
|
4774
|
-
React.createElement("path", {
|
|
4800
|
+
React.createElement("g", { clipPath: "url(#clip0_514_7960)" },
|
|
4801
|
+
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.0016 2C17.5242 2 22 6.47577 22 12.0016V19.754C22 20.9921 20.9921 22 19.754 22H12.0016C6.47577 22 2 17.5242 2 12.0016C2 6.47577 6.47577 2 12.0016 2ZM4.50851 15.0092C5.03678 15.5375 5.8924 15.5375 6.41744 15.0092C6.94571 14.481 6.94571 13.6253 6.41744 13.1003C5.8924 12.572 5.03678 12.572 4.50851 13.1003C3.98347 13.6253 3.98347 14.481 4.50851 15.0092ZM15.0805 6.50494C15.6088 5.97667 15.6088 5.12105 15.0805 4.59601C14.5523 4.06774 13.6999 4.06774 13.1716 4.59601C12.6433 5.12105 12.6433 5.97667 13.1716 6.50494C13.6999 7.02998 14.5523 7.02998 15.0805 6.50494ZM16.3478 18.2016C16.876 18.7299 17.7316 18.7299 18.2567 18.2016C18.785 17.6766 18.785 16.8209 18.2567 16.2927C17.7316 15.7644 16.876 15.7644 16.3478 16.2927C15.8195 16.8209 15.8195 17.6766 16.3478 18.2016ZM7.49344 12.2415C7.49344 14.8926 9.6422 17.0413 12.2933 17.0413C14.9444 17.0413 17.0932 14.8926 17.0932 12.2415C17.0932 11.0164 16.6232 9.78804 15.6866 8.84816C14.75 7.91152 13.5216 7.44482 12.2933 7.44482C11.065 7.44482 9.83666 7.91152 8.90002 8.84816C7.96338 9.78804 7.49344 11.0164 7.49344 12.2415ZM12.2933 15.2458C9.62599 15.2458 8.28423 12.0049 10.1705 10.1186C10.7571 9.532 11.5252 9.24032 12.2933 9.24032C13.0614 9.24032 13.8295 9.532 14.4161 10.1186C15.0028 10.7052 15.2977 11.4733 15.2977 12.2415C15.2977 13.9008 13.9527 15.2458 12.2933 15.2458Z", fill: "inherit" })),
|
|
4775
4802
|
React.createElement("defs", null,
|
|
4776
4803
|
React.createElement("clipPath", { id: "clip0_514_7960" },
|
|
4777
4804
|
React.createElement("rect", { width: "20", height: "20", fill: "white", transform: "translate(2 2)" })))));
|
|
4778
|
-
}
|
|
4805
|
+
}
|
|
4779
4806
|
|
|
4780
|
-
|
|
4807
|
+
function FQGetaway(_a) {
|
|
4781
4808
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4782
4809
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4783
|
-
React.createElement("g", {
|
|
4784
|
-
React.createElement("path", {
|
|
4810
|
+
React.createElement("g", { clipPath: "url(#clip0_514_7963)" },
|
|
4811
|
+
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12 2C15.6467 2 18.8387 3.95392 20.5837 6.86943H8.48541C7.41014 6.86943 6.43011 7.30876 5.7235 8.01843C5.01382 8.72504 4.5745 9.70507 4.5745 10.7803C4.5745 11.8556 5.01382 12.8326 5.7235 13.5422C6.43011 14.2488 7.40707 14.6882 8.48541 14.6882H15.0353C15.53 14.6882 15.9324 14.2888 15.9324 13.7911C15.9324 13.2965 15.53 12.894 15.0353 12.894H8.48541C7.90476 12.894 7.37634 12.6544 6.99232 12.2734C6.60829 11.8894 6.37174 11.361 6.37174 10.7803C6.37174 10.1997 6.60829 9.67128 6.99232 9.28725C7.37634 8.90323 7.90476 8.66667 8.48541 8.66667H21.4286C21.7972 9.70814 22 10.8295 22 12V19.7542C22 20.9892 20.9892 22 19.7542 22H12C6.47619 22 2 17.5238 2 12C2 6.47619 6.47619 2 12 2ZM12.427 17.6713C11.9324 17.6713 11.53 17.2688 11.53 16.7711C11.53 16.2765 11.9324 15.874 12.427 15.874H15.6098C16.1905 15.874 16.7189 15.6375 17.1029 15.2535C17.4869 14.8694 17.7266 14.341 17.7266 13.7604C17.7266 13.1797 17.4869 12.6513 17.1029 12.2673C16.7189 11.8833 16.1905 11.6467 15.6098 11.6467H9.06298C8.56528 11.6467 8.16283 11.2442 8.16283 10.7496C8.16283 10.2519 8.56528 9.84946 9.06298 9.84946H15.6098C16.6882 9.84946 17.6651 10.2888 18.3717 10.9985C19.0814 11.7081 19.5207 12.6851 19.5207 13.7604C19.5207 14.8356 19.0814 15.8157 18.3717 16.5223C17.6651 17.232 16.6882 17.6713 15.6098 17.6713H12.427Z", fill: "inherit" })),
|
|
4785
4812
|
React.createElement("defs", null,
|
|
4786
4813
|
React.createElement("clipPath", { id: "clip0_514_7963" },
|
|
4787
4814
|
React.createElement("rect", { width: "20", height: "20", fill: "white", transform: "translate(2 2)" })))));
|
|
4788
|
-
}
|
|
4815
|
+
}
|
|
4789
4816
|
|
|
4790
|
-
|
|
4817
|
+
function FQModeler(_a) {
|
|
4791
4818
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4792
4819
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4793
|
-
React.createElement("g", {
|
|
4794
|
-
React.createElement("path", {
|
|
4820
|
+
React.createElement("g", { clipPath: "url(#clip0_514_7961)" },
|
|
4821
|
+
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.9987 2C17.5222 2 22 6.47776 22 11.9987V19.7523C22 20.9895 20.9895 22 19.7523 22H11.9987C6.47776 22 2 17.5222 2 11.9987C2 6.47776 6.47776 2 11.9987 2ZM13.6996 8.14086L16.2296 10.6683C16.6378 11.079 16.8419 11.6157 16.8419 12.155C16.8419 12.6917 16.6378 13.2309 16.2296 13.6392L13.6996 16.1691C13.2914 16.5773 12.7522 16.7839 12.2129 16.7839C11.6762 16.7839 11.137 16.5773 10.7287 16.1691L8.19882 13.6392C7.7906 13.2309 7.58649 12.6917 7.58649 12.155C7.58649 11.6157 7.7906 11.079 8.19882 10.6683L10.7287 8.14086C11.137 7.73012 11.6762 7.52602 12.2129 7.52602C12.7522 7.52602 13.2914 7.73012 13.6996 8.14086ZM19.1652 10.895C19.8657 10.895 20.4352 11.4645 20.4352 12.1651C20.4352 12.8656 19.8657 13.4351 19.1652 13.4351C18.4621 13.4351 17.8952 12.8656 17.8952 12.1651C17.8952 11.4645 18.4621 10.895 19.1652 10.895ZM12.2255 17.8347C12.926 17.8347 13.4955 18.4042 13.4955 19.1047C13.4955 19.8077 12.926 20.3747 12.2255 20.3747C11.5225 20.3747 10.9555 19.8077 10.9555 19.1047C10.9555 18.4042 11.5225 17.8347 12.2255 17.8347ZM12.2028 3.93272C12.9059 3.93272 13.4728 4.5022 13.4728 5.20272C13.4728 5.90576 12.9059 6.47272 12.2028 6.47272C11.5023 6.47272 10.9328 5.90576 10.9328 5.20272C10.9328 4.5022 11.5023 3.93272 12.2028 3.93272ZM5.2632 10.8749C5.96371 10.8749 6.5332 11.4419 6.5332 12.1449C6.5332 12.8454 5.96371 13.4149 5.2632 13.4149C4.56268 13.4149 3.9932 12.8454 3.9932 12.1449C3.9932 11.4419 4.56268 10.8749 5.2632 10.8749ZM14.9596 11.9383L12.4296 9.40834C12.3717 9.35038 12.2936 9.32015 12.2129 9.32015C12.1348 9.32015 12.0567 9.35038 11.9987 9.40834L9.46882 11.9383C9.41086 11.9962 9.38062 12.0743 9.38062 12.155C9.38062 12.2331 9.41086 12.3112 9.46882 12.3717L11.9987 14.8991C12.0567 14.957 12.1348 14.9873 12.2129 14.9873C12.2936 14.9873 12.3717 14.957 12.4296 14.8991L14.9596 12.3717C15.0175 12.3112 15.0478 12.2331 15.0478 12.155C15.0478 12.0743 15.0175 11.9962 14.9596 11.9383Z", fill: "inherit" })),
|
|
4795
4822
|
React.createElement("defs", null,
|
|
4796
4823
|
React.createElement("clipPath", { id: "clip0_514_7961" },
|
|
4797
4824
|
React.createElement("rect", { width: "20", height: "20", fill: "white", transform: "translate(2 2)" })))));
|
|
4798
|
-
}
|
|
4825
|
+
}
|
|
4799
4826
|
|
|
4800
|
-
|
|
4827
|
+
function FQOperation(_a) {
|
|
4801
4828
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4802
4829
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4803
|
-
React.createElement("g", {
|
|
4804
|
-
React.createElement("path", {
|
|
4830
|
+
React.createElement("g", { clipPath: "url(#clip0_514_7959)" },
|
|
4831
|
+
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.9983 2C17.5207 2 22 6.47599 22 11.9983V19.7521C22 20.9899 20.9899 22 19.7521 22H11.9983C6.47599 22 2 17.5207 2 11.9983C2 6.47599 6.47599 2 11.9983 2ZM14.606 8.07691C14.1868 7.81284 14.0614 7.26159 14.3255 6.84238C14.5895 6.42317 15.1408 6.29774 15.56 6.56181C15.8439 6.74336 16.1145 6.94471 16.372 7.16917C16.6295 7.39363 16.8671 7.63789 17.0817 7.89206C17.3986 8.27166 17.3491 8.83611 16.9695 9.153C16.5899 9.46988 16.0254 9.42037 15.7052 9.04077C15.5435 8.84932 15.3718 8.67107 15.1936 8.51593C15.0087 8.35418 14.814 8.20895 14.606 8.07691ZM16.7648 11.4075C16.6988 10.9157 17.0388 10.4634 17.5306 10.3974C18.0191 10.3281 18.4714 10.6714 18.5407 11.1632C18.5605 11.3151 18.577 11.4669 18.5869 11.6187H18.5902C18.6001 11.7838 18.6067 11.9389 18.6067 12.0809C18.6067 13.8864 17.8739 15.5171 16.6922 16.6988C15.5138 17.8805 13.8798 18.61 12.0776 18.61C10.2753 18.61 8.64136 17.8805 7.45965 16.6988C6.27793 15.5171 5.54844 13.8864 5.54844 12.0809C5.54844 10.2786 6.27793 8.64796 7.45965 7.46625C8.64136 6.28454 10.2753 5.55174 12.0776 5.55174C12.5727 5.55174 12.9754 5.95445 12.9754 6.44958C12.9754 6.94801 12.5727 7.34742 12.0776 7.34742C10.7704 7.34742 9.58541 7.87886 8.73048 8.73378C7.87226 9.59201 7.34412 10.7737 7.34412 12.0809C7.34412 13.3913 7.87226 14.573 8.73048 15.4313C9.58541 16.2862 10.7704 16.8176 12.0776 16.8176C13.3847 16.8176 14.5664 16.2862 15.4247 15.4313C16.2796 14.573 16.811 13.3913 16.811 12.0809C16.811 11.9554 16.8077 11.8432 16.8011 11.7442V11.7409C16.7912 11.6254 16.7813 11.5131 16.7648 11.4075Z", fill: "inherit" })),
|
|
4805
4832
|
React.createElement("defs", null,
|
|
4806
4833
|
React.createElement("clipPath", { id: "clip0_514_7959" },
|
|
4807
4834
|
React.createElement("rect", { width: "20", height: "20", fill: "white", transform: "translate(2 2)" })))));
|
|
4808
|
-
}
|
|
4835
|
+
}
|
|
4809
4836
|
|
|
4810
|
-
|
|
4837
|
+
function FQWelldone(_a) {
|
|
4811
4838
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4812
4839
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4813
|
-
React.createElement("g", {
|
|
4814
|
-
React.createElement("path", {
|
|
4840
|
+
React.createElement("g", { clipPath: "url(#clip0_514_7962)" },
|
|
4841
|
+
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12 22H19.7534C20.9896 22 22 20.9896 22 19.7534V12C22 8.08095 19.7471 4.68905 16.465 3.05115L15.8061 8.94697C15.7559 9.40195 15.3699 9.73768 14.9244 9.74396L14.4286 13.8607C14.3847 14.2592 14.0835 14.5635 13.7101 14.6357L13.2488 17.375C13.2394 17.4158 13.2331 17.4565 13.2206 17.4973L13.2174 17.5036L13.2143 17.5162L13.2112 17.5287L13.208 17.535C13.1672 17.6511 13.1045 17.7546 13.0229 17.8425L13.0198 17.8456L13.0104 17.8582L13.0041 17.8644L12.9947 17.8739L12.9853 17.8833L12.979 17.8864L12.9664 17.899V17.9021C12.8786 17.9805 12.7719 18.0464 12.6558 18.0872H12.6495L12.637 18.0935L12.6244 18.0966L12.6181 18.0998C12.5397 18.1217 12.4581 18.1343 12.3734 18.1374H12.3514C12.2667 18.1343 12.182 18.1217 12.1035 18.0998L12.0973 18.0966L12.0847 18.0935L12.0722 18.0872H12.0659C11.9498 18.0464 11.8463 17.9805 11.7584 17.9021L11.7553 17.899L11.7427 17.8864L11.7364 17.8833L11.727 17.8739L11.7176 17.8644L11.7145 17.8582L11.7019 17.8456L11.6988 17.8425C11.6203 17.7546 11.5576 17.6511 11.5168 17.535L11.5136 17.5287L11.5074 17.5162L11.5042 17.5036V17.4973C11.4917 17.4565 11.4823 17.4158 11.476 17.375L11.0116 14.6357C10.6382 14.5635 10.3401 14.2592 10.2931 13.8607L9.7973 9.74396C9.35174 9.73768 8.96894 9.40195 8.91873 8.94697L8.22215 2.73737C4.57295 4.2278 2 7.81425 2 12C2 17.5224 6.47757 22 12 22ZM14.1117 7.94917L14.7361 2.37967C13.867 2.13179 12.9476 2 12 2C11.3034 2 10.6225 2.07217 9.96674 2.20709L9.96988 2.24161L10.61 7.94917C11.0775 7.95858 11.4572 8.32256 11.4885 8.78067L11.9812 12.8817C12.0188 13.1672 12.684 13.1672 12.7405 12.8817L13.2331 8.78067C13.2676 8.32256 13.6473 7.95858 14.1117 7.94917Z", fill: "inherit" })),
|
|
4815
4842
|
React.createElement("defs", null,
|
|
4816
4843
|
React.createElement("clipPath", { id: "clip0_514_7962" },
|
|
4817
4844
|
React.createElement("rect", { width: "20", height: "20", fill: "white", transform: "translate(2 2)" })))));
|
|
4818
|
-
}
|
|
4845
|
+
}
|
|
4819
4846
|
|
|
4820
|
-
|
|
4847
|
+
function Inlet(_a) {
|
|
4821
4848
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4822
4849
|
var numericSize = Number(size);
|
|
4823
4850
|
return (React.createElement("svg", { className: className, width: numericSize * 2, height: numericSize, viewBox: "0 0 48 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4824
4851
|
React.createElement("path", { d: "M36 20C38.1217 20 40.1566 19.1571 41.6569 17.6569C43.1571 16.1566 44 14.1217 44 12C44 9.87827 43.1571 7.84344 41.6569 6.34315C40.1566 4.84285 38.1217 4 36 4C33.8783 4 31.8434 4.84285 30.3431 6.34315C28.8429 7.84344 28 9.87827 28 12C28 14.1217 28.8429 16.1566 30.3431 17.6569C31.8434 19.1571 33.8783 20 36 20ZM36 22C30.477 22 26 17.523 26 12C26 6.477 30.477 2 36 2C41.523 2 46 6.477 46 12C46 17.523 41.523 22 36 22Z", fill: "inherit" }),
|
|
4825
4852
|
React.createElement("path", { d: "M15.586 10.657L11.636 6.707C11.4538 6.5184 11.353 6.26579 11.3553 6.0036C11.3576 5.7414 11.4628 5.49059 11.6482 5.30518C11.8336 5.11977 12.0844 5.0146 12.3466 5.01232C12.6088 5.01005 12.8614 5.11084 13.05 5.293L18.707 10.95C18.8002 11.0427 18.8741 11.1528 18.9246 11.2741C18.9751 11.3955 19.001 11.5256 19.001 11.657C19.001 11.7884 18.9751 11.9185 18.9246 12.0399C18.8741 12.1612 18.8002 12.2713 18.707 12.364L13.05 18.021C12.9578 18.1165 12.8474 18.1927 12.7254 18.2451C12.6034 18.2975 12.4722 18.3251 12.3394 18.3263C12.2066 18.3274 12.0749 18.3021 11.952 18.2518C11.8292 18.2015 11.7175 18.1273 11.6236 18.0334C11.5297 17.9395 11.4555 17.8279 11.4052 17.705C11.3549 17.5821 11.3296 17.4504 11.3308 17.3176C11.3319 17.1848 11.3595 17.0536 11.4119 16.9316C11.4643 16.8096 11.5405 16.6992 11.636 16.607L15.586 12.657H6C5.73478 12.657 5.48043 12.5516 5.29289 12.3641C5.10536 12.1766 5 11.9222 5 11.657C5 11.3918 5.10536 11.1374 5.29289 10.9499C5.48043 10.7624 5.73478 10.657 6 10.657H15.586Z", fill: "inherit" })));
|
|
4826
|
-
}
|
|
4853
|
+
}
|
|
4827
4854
|
|
|
4828
|
-
|
|
4855
|
+
function Legend(_a) {
|
|
4829
4856
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4830
4857
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4831
4858
|
React.createElement("path", { d: "M6 4C5.46957 4 4.96086 4.21071 4.58579 4.58579C4.21071 4.96086 4 5.46957 4 6V18C4 18.5304 4.21071 19.0391 4.58579 19.4142C4.96086 19.7893 5.46957 20 6 20H18C18.5304 20 19.0391 19.7893 19.4142 19.4142C19.7893 19.0391 20 18.5304 20 18V6C20 5.46957 19.7893 4.96086 19.4142 4.58579C19.0391 4.21071 18.5304 4 18 4H6ZM6 2H18C19.0609 2 20.0783 2.42143 20.8284 3.17157C21.5786 3.92172 22 4.93913 22 6V18C22 19.0609 21.5786 20.0783 20.8284 20.8284C20.0783 21.5786 19.0609 22 18 22H6C4.93913 22 3.92172 21.5786 3.17157 20.8284C2.42143 20.0783 2 19.0609 2 18V6C2 4.93913 2.42143 3.92172 3.17157 3.17157C3.92172 2.42143 4.93913 2 6 2V2Z", fill: "inherit" }),
|
|
4832
4859
|
React.createElement("path", { d: "M10.9437 17.6805V8.95785H7.82846V7.1818H16.1716V8.95785H13.0635V17.6805H10.9437Z", fill: "inherit" })));
|
|
4833
|
-
}
|
|
4860
|
+
}
|
|
4834
4861
|
|
|
4835
|
-
|
|
4862
|
+
function ModalBalance(_a) {
|
|
4836
4863
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4837
4864
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4838
|
-
React.createElement("path", {
|
|
4839
|
-
React.createElement("path", {
|
|
4840
|
-
React.createElement("path", {
|
|
4841
|
-
React.createElement("path", {
|
|
4842
|
-
React.createElement("path", {
|
|
4843
|
-
React.createElement("path", {
|
|
4844
|
-
React.createElement("path", {
|
|
4845
|
-
}
|
|
4865
|
+
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10.7912 5.66667C10.7912 5.11438 11.2389 4.66667 11.7912 4.66667L16.6667 4.66667C17.219 4.66667 17.6667 5.11438 17.6667 5.66667C17.6667 6.21895 17.219 6.66667 16.6667 6.66667L11.7912 6.66667C11.2389 6.66667 10.7912 6.21895 10.7912 5.66667Z" }),
|
|
4866
|
+
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.95955 9.62623C10.3501 9.2357 10.9832 9.2357 11.3738 9.62623L15.8738 14.1262C16.2643 14.5168 16.2643 15.1499 15.8738 15.5404C15.4832 15.931 14.8501 15.931 14.4595 15.5404L9.95955 11.0404C9.56903 10.6499 9.56903 10.0168 9.95955 9.62623Z" }),
|
|
4867
|
+
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M5.66666 10.3333C6.21894 10.3333 6.66666 10.781 6.66666 11.3333V17.2873C6.66666 17.8396 6.21894 18.2873 5.66666 18.2873C5.11437 18.2873 4.66666 17.8396 4.66666 17.2873V11.3333C4.66666 10.781 5.11437 10.3333 5.66666 10.3333Z" }),
|
|
4868
|
+
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.1111 3.33333C5.20879 3.33333 3.66666 4.87546 3.66666 6.77777C3.66666 8.68009 5.20879 10.2222 7.1111 10.2222C9.01341 10.2222 10.5555 8.68009 10.5555 6.77777C10.5555 4.87546 9.01341 3.33333 7.1111 3.33333ZM1.66666 6.77777C1.66666 3.77089 4.10422 1.33333 7.1111 1.33333C10.118 1.33333 12.5555 3.77089 12.5555 6.77777C12.5555 9.78465 10.118 12.2222 7.1111 12.2222C4.10422 12.2222 1.66666 9.78465 1.66666 6.77777Z" }),
|
|
4869
|
+
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M5.66666 18.6667C5.11437 18.6667 4.66666 19.1144 4.66666 19.6667C4.66666 20.219 5.11437 20.6667 5.66666 20.6667C6.21894 20.6667 6.66666 20.219 6.66666 19.6667C6.66666 19.1144 6.21894 18.6667 5.66666 18.6667ZM2.66666 19.6667C2.66666 18.0098 4.0098 16.6667 5.66666 16.6667C7.32351 16.6667 8.66666 18.0098 8.66666 19.6667C8.66666 21.3235 7.32351 22.6667 5.66666 22.6667C4.0098 22.6667 2.66666 21.3235 2.66666 19.6667Z" }),
|
|
4870
|
+
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M16.6667 15.3333C16.1144 15.3333 15.6667 15.781 15.6667 16.3333C15.6667 16.8856 16.1144 17.3333 16.6667 17.3333C17.2189 17.3333 17.6667 16.8856 17.6667 16.3333C17.6667 15.781 17.2189 15.3333 16.6667 15.3333ZM13.6667 16.3333C13.6667 14.6765 15.0098 13.3333 16.6667 13.3333C18.3235 13.3333 19.6667 14.6765 19.6667 16.3333C19.6667 17.9902 18.3235 19.3333 16.6667 19.3333C15.0098 19.3333 13.6667 17.9902 13.6667 16.3333Z" }),
|
|
4871
|
+
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M19.3333 4.33333C18.7811 4.33333 18.3333 4.78105 18.3333 5.33333C18.3333 5.88562 18.7811 6.33333 19.3333 6.33333C19.8856 6.33333 20.3333 5.88562 20.3333 5.33333C20.3333 4.78105 19.8856 4.33333 19.3333 4.33333ZM16.3333 5.33333C16.3333 3.67648 17.6765 2.33333 19.3333 2.33333C20.9902 2.33333 22.3333 3.67648 22.3333 5.33333C22.3333 6.99019 20.9902 8.33333 19.3333 8.33333C17.6765 8.33333 16.3333 6.99019 16.3333 5.33333Z" })));
|
|
4872
|
+
}
|
|
4846
4873
|
|
|
4847
|
-
|
|
4874
|
+
function Neutral(_a) {
|
|
4848
4875
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4849
4876
|
var numericSize = Number(size);
|
|
4850
4877
|
return (React.createElement("svg", { className: className, width: numericSize * 2, height: numericSize, viewBox: "0 0 48 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4851
|
-
React.createElement("path", {
|
|
4878
|
+
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M28 12C28 11.4477 28.4477 11 29 11H43C43.5523 11 44 11.4477 44 12C44 12.5523 43.5523 13 43 13H29C28.4477 13 28 12.5523 28 12Z", fill: "inherit" }),
|
|
4852
4879
|
React.createElement("path", { d: "M12 20C14.1217 20 16.1566 19.1571 17.6569 17.6569C19.1571 16.1566 20 14.1217 20 12C20 9.87827 19.1571 7.84344 17.6569 6.34315C16.1566 4.84285 14.1217 4 12 4C9.87827 4 7.84344 4.84285 6.34315 6.34315C4.84285 7.84344 4 9.87827 4 12C4 14.1217 4.84285 16.1566 6.34315 17.6569C7.84344 19.1571 9.87827 20 12 20ZM12 22C6.477 22 2 17.523 2 12C2 6.477 6.477 2 12 2C17.523 2 22 6.477 22 12C22 17.523 17.523 22 12 22Z", fill: "inherit" })));
|
|
4853
|
-
}
|
|
4880
|
+
}
|
|
4854
4881
|
|
|
4855
|
-
|
|
4882
|
+
function Node(_a) {
|
|
4856
4883
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4857
4884
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, stroke: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4858
|
-
React.createElement("path", {
|
|
4859
|
-
React.createElement("rect", { x: "4.82964", y: "5.22156", width: "3.28794", height: "3.28794", rx: "1.64397",
|
|
4860
|
-
React.createElement("rect", { x: "15.8711", y: "15.485", width: "3.28794", height: "3.28794", rx: "1.64397",
|
|
4861
|
-
}
|
|
4885
|
+
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M15.8487 7.78595L6.93709 7.78595V6.03193L15.8487 6.03193C16.3439 6.03193 16.9911 6.23168 17.5149 6.76349C18.0559 7.3128 18.3919 8.13899 18.3919 9.25864C18.3919 10.6249 17.9588 11.5597 17.2603 12.1263C16.5971 12.6642 15.8434 12.7464 15.4322 12.7464H8.40792C8.16699 12.7828 7.79335 12.9098 7.48812 13.1699C7.19483 13.42 6.93709 13.8119 6.93709 14.4802C6.93709 15.4203 7.25406 15.7883 7.48638 15.9569C7.77053 16.1631 8.13102 16.2139 8.35104 16.2139L17 16.2139V17.968L8.35104 17.968C7.94624 17.968 7.16126 17.8882 6.45613 17.3765C5.69918 16.8271 5.18307 15.8897 5.18307 14.4802C5.18307 13.2687 5.68899 12.3988 6.35026 11.8351C6.98104 11.2974 7.72576 11.058 8.25173 10.998L8.30122 10.9924H15.4322C15.6457 10.9924 15.9333 10.9441 16.1553 10.764C16.342 10.6126 16.6378 10.242 16.6378 9.25864C16.6378 8.49852 16.4184 8.14987 16.2652 7.99427C16.0947 7.82117 15.9088 7.78595 15.8487 7.78595Z", fill: "inherit" }),
|
|
4886
|
+
React.createElement("rect", { x: "4.82964", y: "5.22156", width: "3.28794", height: "3.28794", rx: "1.64397", strokeWidth: "0.954563" }),
|
|
4887
|
+
React.createElement("rect", { x: "15.8711", y: "15.485", width: "3.28794", height: "3.28794", rx: "1.64397", strokeWidth: "0.954563" })));
|
|
4888
|
+
}
|
|
4862
4889
|
|
|
4863
|
-
|
|
4890
|
+
function Outlet(_a) {
|
|
4864
4891
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4865
4892
|
var numericSize = Number(size);
|
|
4866
4893
|
return (React.createElement("svg", { className: className, width: numericSize * 2, height: numericSize, viewBox: "0 0 48 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4867
4894
|
React.createElement("path", { d: "M12 20C14.1217 20 16.1566 19.1571 17.6569 17.6569C19.1571 16.1566 20 14.1217 20 12C20 9.87827 19.1571 7.84344 17.6569 6.34315C16.1566 4.84285 14.1217 4 12 4C9.87827 4 7.84344 4.84285 6.34315 6.34315C4.84285 7.84344 4 9.87827 4 12C4 14.1217 4.84285 16.1566 6.34315 17.6569C7.84344 19.1571 9.87827 20 12 20ZM12 22C6.477 22 2 17.523 2 12C2 6.477 6.477 2 12 2C17.523 2 22 6.477 22 12C22 17.523 17.523 22 12 22Z", fill: "inherit" }),
|
|
4868
4895
|
React.createElement("path", { d: "M39.586 10.657L35.636 6.707C35.4538 6.5184 35.353 6.26579 35.3553 6.0036C35.3576 5.7414 35.4628 5.49059 35.6482 5.30518C35.8336 5.11977 36.0844 5.0146 36.3466 5.01232C36.6088 5.01005 36.8614 5.11084 37.05 5.293L42.707 10.95C42.8002 11.0427 42.8741 11.1528 42.9246 11.2741C42.9751 11.3955 43.001 11.5256 43.001 11.657C43.001 11.7884 42.9751 11.9185 42.9246 12.0399C42.8741 12.1612 42.8002 12.2713 42.707 12.364L37.05 18.021C36.9578 18.1165 36.8474 18.1927 36.7254 18.2451C36.6034 18.2975 36.4722 18.3251 36.3394 18.3263C36.2066 18.3274 36.0749 18.3021 35.952 18.2518C35.8292 18.2015 35.7175 18.1273 35.6236 18.0334C35.5297 17.9395 35.4555 17.8279 35.4052 17.705C35.3549 17.5821 35.3296 17.4504 35.3308 17.3176C35.3319 17.1848 35.3595 17.0536 35.4119 16.9316C35.4643 16.8096 35.5405 16.6992 35.636 16.607L39.586 12.657H30C29.7348 12.657 29.4804 12.5516 29.2929 12.3641C29.1054 12.1766 29 11.9222 29 11.657C29 11.3918 29.1054 11.1374 29.2929 10.9499C29.4804 10.7624 29.7348 10.657 30 10.657H39.586Z", fill: "inherit" })));
|
|
4869
|
-
}
|
|
4896
|
+
}
|
|
4870
4897
|
|
|
4871
|
-
|
|
4898
|
+
function Port(_a) {
|
|
4872
4899
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4873
4900
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4874
4901
|
React.createElement("path", { d: "M11.9998 3.81818C16.5185 3.81818 20.1814 7.48121 20.1815 11.9998C20.1815 16.5185 16.5185 20.1815 11.9998 20.1815C7.4812 20.1814 3.81818 16.5185 3.81818 11.9998C3.81827 7.48127 7.48126 3.81828 11.9998 3.81818ZM12.0008 7.09064C11.7838 7.09064 11.5751 7.17744 11.4217 7.33088C11.2684 7.48427 11.1825 7.69214 11.1824 7.909V11.1815H7.909C7.69216 11.1816 7.48421 11.2684 7.33087 11.4217C7.17755 11.5751 7.09166 11.783 7.09161 11.9998C7.09161 12.2168 7.17743 12.4255 7.33087 12.5789C7.48419 12.7321 7.69224 12.8181 7.909 12.8182H11.1824V16.0906C11.1824 16.3076 11.2683 16.5163 11.4217 16.6697C11.5751 16.8231 11.7838 16.909 12.0008 16.909C12.2176 16.9089 12.4256 16.823 12.5789 16.6697C12.7324 16.5163 12.8182 16.3076 12.8182 16.0906V12.8182H16.0916C16.3084 12.8181 16.5164 12.7321 16.6697 12.5789C16.8232 12.4255 16.909 12.2168 16.909 11.9998C16.9089 11.7829 16.8231 11.5751 16.6697 11.4217C16.5164 11.2683 16.3085 11.1816 16.0916 11.1815H12.8182V7.909C12.8182 7.69213 12.7322 7.48428 12.5789 7.33088C12.4256 7.17755 12.2176 7.09076 12.0008 7.09064Z", fill: "inherit" })));
|
|
4875
|
-
}
|
|
4902
|
+
}
|
|
4876
4903
|
|
|
4877
|
-
|
|
4904
|
+
function Rhombus(_a) {
|
|
4878
4905
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4879
4906
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4880
4907
|
React.createElement("path", { d: "M11.5884 7.24696C11.8417 7.09495 12.1583 7.09495 12.4116 7.24696L18.8567 11.114C19.3745 11.4247 19.3745 12.1753 18.8567 12.486L12.4116 16.353C12.1583 16.505 11.8417 16.505 11.5884 16.353L5.14332 12.486C4.62545 12.1753 4.62545 11.4247 5.14332 11.114L11.5884 7.24696Z", fill: "inherit" })));
|
|
4881
|
-
}
|
|
4908
|
+
}
|
|
4882
4909
|
|
|
4883
|
-
|
|
4910
|
+
function SelectAllAdd(_a) {
|
|
4884
4911
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4885
4912
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4886
4913
|
React.createElement("path", { d: "M7 17V7H17V17H7ZM9 15H15V9H9V15ZM7 21V19H9V21H7ZM7 5V3H9V5H7ZM11 21V19H13V21H11ZM11 5V3H13V5H11ZM15 5V3H17V5H15ZM3 5V3H5V5H3ZM5 21H3V19H5V21ZM21 5H19V3H21V5ZM3 17V15H5V17H3ZM3 13V11H5V13H3ZM3 9V7H5V9H3ZM19 13V11H21V13H19ZM19 9V7H21V9H19Z", fill: "inherit" }),
|
|
4887
|
-
React.createElement("path", {
|
|
4888
|
-
React.createElement("path", {
|
|
4889
|
-
}
|
|
4914
|
+
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M19 24V16H21V24H19Z", fill: "inherit" }),
|
|
4915
|
+
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M16 19L24 19L24 21L16 21L16 19Z", fill: "inherit" })));
|
|
4916
|
+
}
|
|
4890
4917
|
|
|
4891
|
-
|
|
4918
|
+
function SelectAllRemove(_a) {
|
|
4892
4919
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4893
4920
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4894
4921
|
React.createElement("path", { d: "M7 17V7H17V17H7ZM9 15H15V9H9V15ZM7 21V19H9V21H7ZM7 5V3H9V5H7ZM11 21V19H13V21H11ZM11 5V3H13V5H11ZM15 5V3H17V5H15ZM3 5V3H5V5H3ZM5 21H3V19H5V21ZM21 5H19V3H21V5ZM3 17V15H5V17H3ZM3 13V11H5V13H3ZM3 9V7H5V9H3ZM19 16V15H21V16H19ZM19 13V11H21V13H19ZM19 9V7H21V9H19Z", fill: "inherit" }),
|
|
4895
|
-
React.createElement("path", {
|
|
4896
|
-
}
|
|
4922
|
+
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M16 19L24 19L24 21L16 21L16 19Z", fill: "inherit" })));
|
|
4923
|
+
}
|
|
4897
4924
|
|
|
4898
|
-
|
|
4925
|
+
function Spinner$1(_a) {
|
|
4899
4926
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4900
4927
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4901
4928
|
React.createElement("path", { d: "M12 22C9.99381 22 8.034 21.3966 6.37525 20.2681C4.7165 19.1397 3.43551 17.5384 2.69875 15.6724C1.96199 13.8064 1.80352 11.7619 2.24394 9.80469C2.68437 7.84744 3.70331 6.06791 5.16836 4.69735C6.63341 3.32679 8.47683 2.42858 10.4591 2.11944C12.4413 1.8103 14.4707 2.10452 16.2835 2.96387C18.0963 3.82323 19.6088 5.20798 20.6243 6.93817C21.6398 8.66836 22.1114 10.664 21.9778 12.6657L19.9823 12.5326C20.0891 10.9312 19.7118 9.33469 18.8994 7.95054C18.087 6.56638 16.8771 5.45858 15.4268 4.7711C13.9765 4.08362 12.353 3.84824 10.7673 4.09555C9.18147 4.34286 7.70673 5.06143 6.53469 6.15788C5.36265 7.25433 4.54749 8.67795 4.19516 10.2438C3.84282 11.8096 3.96959 13.4451 4.559 14.9379C5.14841 16.4308 6.1732 17.7118 7.5002 18.6145C8.8272 19.5173 10.395 20 12 20L12 22Z", fill: "inherit" })));
|
|
4902
|
-
}
|
|
4929
|
+
}
|
|
4903
4930
|
|
|
4904
|
-
|
|
4931
|
+
function Stack(_a) {
|
|
4905
4932
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4906
4933
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 20 20", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4907
4934
|
React.createElement("path", { d: "M11.5884 7.24696C11.8417 7.09495 12.1583 7.09495 12.4116 7.24696L18.8567 11.114C19.3745 11.4247 19.3745 12.1753 18.8567 12.486L12.4116 16.353C12.1583 16.505 11.8417 16.505 11.5884 16.353L5.14332 12.486C4.62545 12.1753 4.62545 11.4247 5.14332 11.114L11.5884 7.24696Z", fill: "inherit" })));
|
|
4908
|
-
}
|
|
4935
|
+
}
|
|
4909
4936
|
|
|
4910
|
-
|
|
4937
|
+
function Unlinked(_a) {
|
|
4911
4938
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4912
4939
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4913
4940
|
React.createElement("path", { d: "M21.293 16.293C21.6835 15.9025 22.3165 15.9024 22.707 16.293C23.0975 16.6835 23.0975 17.3165 22.707 17.707L20.9141 19.5L22.707 21.293C23.0975 21.6835 23.0975 22.3165 22.707 22.707C22.3165 23.0975 21.6835 23.0975 21.293 22.707L19.5 20.9141L17.707 22.707C17.3165 23.0975 16.6835 23.0975 16.293 22.707C15.9024 22.3165 15.9024 21.6835 16.293 21.293L18.0859 19.5L16.293 17.707C15.9024 17.3165 15.9024 16.6835 16.293 16.293C16.6835 15.9025 17.3165 15.9024 17.707 16.293L19.5 18.0859L21.293 16.293Z", fill: "#2F2F2F" }),
|
|
4914
4941
|
React.createElement("path", { d: "M5.33789 10.251C5.75171 9.88533 6.38331 9.92416 6.74902 10.3379C7.11467 10.7517 7.07583 11.3833 6.66211 11.749L6.16016 12.1924C5.79549 12.5578 5.50566 12.9912 5.30664 13.4678C5.10428 13.9525 5.00006 14.4728 5 14.998C5 15.5234 5.10422 16.0445 5.30664 16.5293C5.50905 17.0139 5.80525 17.454 6.17871 17.8232C6.94016 18.5762 7.9682 18.9979 9.03906 18.998C10.0861 18.998 11.0926 18.5947 11.8486 17.873L12.1973 17.4033C12.5268 16.9601 13.1535 16.8678 13.5967 17.1973C14.0399 17.5268 14.1322 18.1535 13.8027 18.5967L13.4053 19.1309C13.3751 19.1714 13.3416 19.2096 13.3057 19.2451C12.1697 20.3683 10.6365 20.998 9.03906 20.998C7.44166 20.9979 5.90831 20.3683 4.77246 19.2451C4.21094 18.6898 3.76524 18.0285 3.46094 17.2998C3.15659 16.5709 3 15.788 3 14.998C3.00006 14.2083 3.15665 13.4261 3.46094 12.6973C3.76524 11.9685 4.21094 11.3072 4.77246 10.752C4.78565 10.7389 4.79958 10.7262 4.81348 10.7139L5.33789 10.251Z", fill: "#2F2F2F" }),
|
|
4915
4942
|
React.createElement("path", { d: "M14.293 8.29297C14.6835 7.90244 15.3165 7.90244 15.707 8.29297C16.0976 8.68349 16.0976 9.31651 15.707 9.70703L9.70703 15.707C9.31651 16.0976 8.68349 16.0976 8.29297 15.707C7.90244 15.3165 7.90244 14.6835 8.29297 14.293L14.293 8.29297Z", fill: "#2F2F2F" }),
|
|
4916
4943
|
React.createElement("path", { d: "M14.999 3C16.5903 3.00014 18.116 3.6325 19.2412 4.75781C20.3663 5.88307 20.999 7.40877 20.999 9C20.9989 10.5913 20.3665 12.118 19.2412 13.2432C19.2247 13.2597 19.2071 13.2757 19.1895 13.291L18.6562 13.7549C18.2394 14.1171 17.6074 14.073 17.2451 13.6562C16.8829 13.2394 16.927 12.6074 17.3438 12.2451L17.8506 11.8057C18.5863 11.0578 18.999 10.0499 18.999 9C18.999 7.93919 18.5772 6.92206 17.8271 6.17188C17.0771 5.42168 16.0599 5.00014 14.999 5C13.9496 4.99993 12.9422 5.41159 12.1943 6.14648L11.7568 6.65332C11.3959 7.07118 10.7646 7.11762 10.3467 6.75684C9.92881 6.39588 9.88237 5.76463 10.2432 5.34668L10.7061 4.81055C10.722 4.79214 10.7387 4.77404 10.7559 4.75684C11.8812 3.63164 13.4076 2.99989 14.999 3Z", fill: "#2F2F2F" })));
|
|
4917
|
-
}
|
|
4944
|
+
}
|
|
4918
4945
|
|
|
4919
|
-
|
|
4946
|
+
function VirtualPort(_a) {
|
|
4920
4947
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4921
4948
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4922
4949
|
React.createElement("path", { d: "M16.909 3.81818C17.777 3.81818 18.6097 4.16341 19.2234 4.77717C19.8369 5.39083 20.1814 6.2229 20.1815 7.09064V16.909C20.1815 17.777 19.8372 18.6097 19.2234 19.2235C18.6097 19.8372 17.777 20.1815 16.909 20.1815H7.09064C6.2229 20.1814 5.39082 19.837 4.77716 19.2235C4.16341 18.6097 3.81818 17.777 3.81818 16.909V7.09064C3.81825 6.22276 4.16347 5.39086 4.77716 4.77717C5.39085 4.16347 6.22275 3.81825 7.09064 3.81818H16.909ZM12.0008 7.09064C11.7838 7.09064 11.5751 7.17744 11.4217 7.33088C11.2684 7.48427 11.1825 7.69214 11.1824 7.909V11.1815H7.909C7.69216 11.1816 7.48421 11.2684 7.33087 11.4217C7.17755 11.5751 7.09166 11.783 7.09161 11.9998C7.09161 12.2168 7.17743 12.4255 7.33087 12.5789C7.48419 12.7321 7.69224 12.8181 7.909 12.8182H11.1824V16.0906C11.1824 16.3076 11.2683 16.5163 11.4217 16.6697C11.5751 16.8231 11.7838 16.909 12.0008 16.909C12.2176 16.9089 12.4256 16.823 12.5789 16.6697C12.7324 16.5163 12.8182 16.3076 12.8182 16.0906V12.8182H16.0916C16.3084 12.8181 16.5164 12.7321 16.6697 12.5789C16.8232 12.4255 16.909 12.2168 16.909 11.9998C16.9089 11.7829 16.8231 11.5751 16.6697 11.4217C16.5164 11.2683 16.3085 11.1816 16.0916 11.1815H12.8182V7.909C12.8182 7.69213 12.7322 7.48428 12.5789 7.33088C12.4256 7.17755 12.2176 7.09076 12.0008 7.09064Z", fill: "inherit" })));
|
|
4923
|
-
}
|
|
4950
|
+
}
|
|
4924
4951
|
|
|
4925
4952
|
var colorConfig = {
|
|
4926
4953
|
yellow: 'bg-bia-yellow-light-80',
|
|
@@ -4934,22 +4961,16 @@ var sizeConfig$2 = {
|
|
|
4934
4961
|
'form-md': 'min-h-[40px] h-fit whitespace-nowrap px-2.5 py-[9.5px]',
|
|
4935
4962
|
};
|
|
4936
4963
|
|
|
4937
|
-
|
|
4938
|
-
var
|
|
4964
|
+
function InfoPanel(_a) {
|
|
4965
|
+
var _b = _a.variant, variant = _b === void 0 ? 'container' : _b, _c = _a.color, color = _c === void 0 ? 'yellow' : _c, _d = _a.className, className = _d === void 0 ? '' : _d, _e = _a.children, children = _e === void 0 ? null : _e;
|
|
4939
4966
|
var sizeClass = sizeConfig$2[variant || 'container'];
|
|
4940
4967
|
var colorClass = colorConfig[color || 'yellow'];
|
|
4941
4968
|
var allClasses = "".concat(sizeClass, " ").concat(colorClass, " ").concat(className);
|
|
4942
4969
|
return (React.createElement("div", { className: "flex items-center justify-center rounded-radius-md ".concat(allClasses) }, children));
|
|
4943
|
-
}
|
|
4944
|
-
InfoPanel.defaultProps = {
|
|
4945
|
-
variant: 'container',
|
|
4946
|
-
color: 'yellow',
|
|
4947
|
-
className: '',
|
|
4948
|
-
children: null,
|
|
4949
|
-
};
|
|
4970
|
+
}
|
|
4950
4971
|
|
|
4951
4972
|
function Modal(_a) {
|
|
4952
|
-
var _b = _a.size, size = _b === void 0 ? 'sm' : _b,
|
|
4973
|
+
var _b = _a.size, size = _b === void 0 ? 'sm' : _b, _c = _a.title, title = _c === void 0 ? undefined : _c, open = _a.open, _d = _a.zIndex, zIndex = _d === void 0 ? 100 : _d, onClose = _a.onClose, onClick = _a.onClick, rest = __rest(_a, ["size", "title", "open", "zIndex", "onClose", "onClick"]);
|
|
4953
4974
|
var modalSize;
|
|
4954
4975
|
if (size === 'sm') {
|
|
4955
4976
|
modalSize = 'w-[300px]';
|
|
@@ -4974,7 +4995,9 @@ function Modal(_a) {
|
|
|
4974
4995
|
if (open) {
|
|
4975
4996
|
return (
|
|
4976
4997
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events
|
|
4977
|
-
reactDom.createPortal(React.createElement("div", { className: "bianic-modal-wrapper fixed inset-0 flex items-center justify-center bg-bia-black-transparent-75", style: {
|
|
4998
|
+
reactDom.createPortal(React.createElement("div", { className: "bianic-modal-wrapper fixed inset-0 flex items-center justify-center bg-bia-black-transparent-75", style: {
|
|
4999
|
+
zIndex: !zIndex && Number.isNaN(zIndex) ? 'auto' : zIndex,
|
|
5000
|
+
}, id: "wrapper", onPointerDown: handleClose },
|
|
4978
5001
|
React.createElement("div", { className: "bianic-modal flex flex-col gap-[20px] rounded-[5px] bg-white p-[20px] ".concat(modalSize), onClick: onClick },
|
|
4979
5002
|
React.createElement("div", { className: "bianic-modal-header flex justify-between" },
|
|
4980
5003
|
React.createElement("div", { className: " text-wrap text-left font-humnst777 text-[18px] font-bold leading-[21.85px] text-primary-black" }, title),
|
|
@@ -4984,13 +5007,13 @@ function Modal(_a) {
|
|
|
4984
5007
|
return null;
|
|
4985
5008
|
}
|
|
4986
5009
|
|
|
4987
|
-
|
|
4988
|
-
var
|
|
5010
|
+
function Notification(_a) {
|
|
5011
|
+
var _b = _a.children, children = _b === void 0 ? undefined : _b, _c = _a.color, color = _c === void 0 ? 'red' : _c, _d = _a.isVisible, isVisible = _d === void 0 ? true : _d;
|
|
4989
5012
|
var bgColor = color === 'red' ? 'bg-bia-red' : 'bg-bia-white';
|
|
4990
5013
|
return (React.createElement("div", { className: "relative" },
|
|
4991
5014
|
React.createElement("div", { className: "absolute -right-[3px] -top-[3px] h-1.5 w-1.5 rounded-radius-full ".concat(bgColor), style: { display: isVisible ? 'block' : 'none' } }),
|
|
4992
5015
|
children));
|
|
4993
|
-
}
|
|
5016
|
+
}
|
|
4994
5017
|
|
|
4995
5018
|
var sizeConfig$1 = {
|
|
4996
5019
|
md: 'min-w-[40px] h-[40px] text-[14px] font-semibold',
|
|
@@ -5002,18 +5025,18 @@ var positionConfig = {
|
|
|
5002
5025
|
end: 'justify-end',
|
|
5003
5026
|
};
|
|
5004
5027
|
|
|
5005
|
-
|
|
5006
|
-
var
|
|
5028
|
+
function SelectedPage(_a) {
|
|
5029
|
+
var _b = _a.label, label = _b === void 0 ? undefined : _b, _c = _a.size, size = _c === void 0 ? 'sm' : _c;
|
|
5007
5030
|
var basicButtonStyle = 'bianic-custom-button bianic-fgc-target flex items-center justify-center font-semibold cursor-default';
|
|
5008
5031
|
var basicColorStyle = 'text-primary-cool bg-bia-grey-dark-10 focus-visible:outline-none focus-visible:outline-offset-0 focus-visible:outline-[3px] focus-visible:rounded-md focus-visible:outline-bia-blue-light-50';
|
|
5009
5032
|
var textStyleOptions = {
|
|
5010
5033
|
sm: 'text-size-sm',
|
|
5011
5034
|
md: 'text-size-base',
|
|
5012
5035
|
};
|
|
5013
|
-
var sizeStyleOptions = "".concat(iconOnlySizeConfig$1[size], " ").concat(radiusConfig$1
|
|
5036
|
+
var sizeStyleOptions = "".concat(iconOnlySizeConfig$1[size], " ").concat(radiusConfig$1.default[size]);
|
|
5014
5037
|
var style = "".concat(basicButtonStyle, " ").concat(basicColorStyle, " ").concat(sizeStyleOptions, " ").concat(textStyleOptions[size]);
|
|
5015
5038
|
return React.createElement("div", { className: style }, label);
|
|
5016
|
-
}
|
|
5039
|
+
}
|
|
5017
5040
|
|
|
5018
5041
|
function PaginationBar(_a) {
|
|
5019
5042
|
var size = _a.size, position = _a.position, currentPage = _a.currentPage, totalPages = _a.totalPages, onPageChange = _a.onPageChange;
|
|
@@ -5160,14 +5183,6 @@ var classConfig = {
|
|
|
5160
5183
|
},
|
|
5161
5184
|
};
|
|
5162
5185
|
|
|
5163
|
-
function Popover(_a) {
|
|
5164
|
-
var className = _a.className, children = _a.children, content = _a.content, _b = _a.direction, direction = _b === void 0 ? 'bottom' : _b; _a.maxWidth; var _c = _a.title, title = _c === void 0 ? '' : _c, style = _a.style, zIndex = _a.zIndex, _d = _a.color, color = _d === void 0 ? 'black' : _d;
|
|
5165
|
-
var wrapperRef = React.useRef(null);
|
|
5166
|
-
var _e = useDetectOutsideClick(wrapperRef, false), isOpen = _e[0], setIsOpen = _e[1];
|
|
5167
|
-
return (React.createElement("div", { className: "Bianic-popover-Wrapper relative block h-fit w-fit", role: "button", ref: wrapperRef, onClick: function () { return setIsOpen(true); } },
|
|
5168
|
-
children,
|
|
5169
|
-
isOpen && (React.createElement(PopoverItem, { title: title, content: content, anchorRef: wrapperRef, direction: direction, className: className, style: style, zIndex: zIndex, color: color }))));
|
|
5170
|
-
}
|
|
5171
5186
|
var PopoverItem = function (_a) {
|
|
5172
5187
|
var title = _a.title, content = _a.content, anchorRef = _a.anchorRef, direction = _a.direction, className = _a.className, style = _a.style, zIndex = _a.zIndex, _b = _a.color, color = _b === void 0 ? 'black' : _b;
|
|
5173
5188
|
var popoverRef = React.useRef(null);
|
|
@@ -5187,10 +5202,19 @@ var PopoverItem = function (_a) {
|
|
|
5187
5202
|
React.createElement("div", { className: "triangle absolute ".concat(triangleContainer, " pointer-events-none") },
|
|
5188
5203
|
React.createElement("div", { className: "h-[7px] w-[7px] rotate-45 transform ".concat(triangleThemeClasses) }))), document.body);
|
|
5189
5204
|
};
|
|
5190
|
-
Popover
|
|
5191
|
-
direction: '
|
|
5192
|
-
|
|
5193
|
-
|
|
5205
|
+
function Popover(_a) {
|
|
5206
|
+
var className = _a.className, children = _a.children, content = _a.content, _b = _a.direction, direction = _b === void 0 ? 'bottom' : _b, _c = _a.title, title = _c === void 0 ? '' : _c, style = _a.style, zIndex = _a.zIndex, _d = _a.color, color = _d === void 0 ? 'black' : _d;
|
|
5207
|
+
var wrapperRef = React.useRef(null);
|
|
5208
|
+
var _e = useDetectOutsideClick(wrapperRef, false), isOpen = _e[0], setIsOpen = _e[1];
|
|
5209
|
+
return (React.createElement("div", { className: "Bianic-popover-Wrapper relative block h-fit w-fit", role: "button", tabIndex: 0, ref: wrapperRef, onClick: function () { return setIsOpen(true); }, onKeyDown: function (e) {
|
|
5210
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
5211
|
+
e.preventDefault();
|
|
5212
|
+
setIsOpen(true);
|
|
5213
|
+
}
|
|
5214
|
+
} },
|
|
5215
|
+
children,
|
|
5216
|
+
isOpen && (React.createElement(PopoverItem, { title: title, content: content, anchorRef: wrapperRef, direction: direction, className: className, style: style, zIndex: zIndex, color: color }))));
|
|
5217
|
+
}
|
|
5194
5218
|
|
|
5195
5219
|
var config$1 = {
|
|
5196
5220
|
success: {
|
|
@@ -5221,18 +5245,18 @@ function ProgressCircle(_a) {
|
|
|
5221
5245
|
backgroundImage: "conic-gradient(#5e5eea 0deg, #5e5eea ".concat(progressDegree, "deg, #ededfd ").concat(progressDegree, "deg)"),
|
|
5222
5246
|
}
|
|
5223
5247
|
: {};
|
|
5224
|
-
return (React.createElement("div", { className: "w-32
|
|
5248
|
+
return (React.createElement("div", { className: "sha flex aspect-square w-32 items-center justify-center rounded-full bg-primary-white", style: {
|
|
5225
5249
|
boxShadow: '0px 3px 20px rgba(0, 0, 0, 0.10)',
|
|
5226
5250
|
} },
|
|
5227
|
-
React.createElement("div", { className: "w-[72px]
|
|
5228
|
-
isPersentage && (React.createElement("div", { className: "
|
|
5251
|
+
React.createElement("div", { className: "relative flex aspect-square w-[72px] items-center justify-center rounded-full border-4 text-[38px] ".concat(container), style: inlineStyle },
|
|
5252
|
+
isPersentage && (React.createElement("div", { className: "absolute left-[4px] top-[4px] flex aspect-square w-[64px] items-center justify-center rounded-full bg-white text-lg font-semibold text-bia-blue" }, "".concat(persentageVal, "%"))),
|
|
5229
5253
|
content)));
|
|
5230
5254
|
}
|
|
5231
5255
|
|
|
5232
|
-
|
|
5233
|
-
var
|
|
5256
|
+
function SpinnerIcon(_a) {
|
|
5257
|
+
var _b = _a.className, className = _b === void 0 ? undefined : _b, props = __rest(_a, ["className"]);
|
|
5234
5258
|
return React.createElement(TbLoader2, __assign({ className: "animate-spinner ".concat(className) }, props));
|
|
5235
|
-
}
|
|
5259
|
+
}
|
|
5236
5260
|
|
|
5237
5261
|
var config = {
|
|
5238
5262
|
success: {
|
|
@@ -5250,13 +5274,13 @@ var config = {
|
|
|
5250
5274
|
};
|
|
5251
5275
|
|
|
5252
5276
|
function ProgressBar(_a) {
|
|
5253
|
-
var _b = _a.title, title = _b === void 0 ? '' : _b,
|
|
5277
|
+
var _b = _a.title, title = _b === void 0 ? '' : _b, percentage = _a.percentage, _c = _a.caption, caption = _c === void 0 ? undefined : _c, _d = _a.variant, variant = _d === void 0 ? 'loading' : _d, _e = _a.icon, icon = _e === void 0 ? true : _e, _f = _a.barColor, barColor = _f === void 0 ? undefined : _f;
|
|
5254
5278
|
var percentageVal = percentage;
|
|
5255
5279
|
if (percentageVal === 0)
|
|
5256
5280
|
percentageVal = 0.5;
|
|
5257
5281
|
if (percentage > 100)
|
|
5258
5282
|
percentageVal = 100;
|
|
5259
|
-
var
|
|
5283
|
+
var _g = config[variant], progress = _g.progress, statusIcon = _g.statusIcon;
|
|
5260
5284
|
var barColorRules = barColor
|
|
5261
5285
|
? "outline-bia-".concat(barColor, " bg-bia-").concat(barColor)
|
|
5262
5286
|
: progress; // Use the provided barColor or fallback to the default progress color
|
|
@@ -5290,8 +5314,9 @@ var resizerContainerClass = {
|
|
|
5290
5314
|
};
|
|
5291
5315
|
|
|
5292
5316
|
function ResizeableDiv(_a) {
|
|
5293
|
-
var _b = _a.position, position = _b === void 0 ? 'bottom' : _b, children = _a.children, className = _a.className,
|
|
5294
|
-
var
|
|
5317
|
+
var _b = _a.position, position = _b === void 0 ? 'bottom' : _b, children = _a.children, className = _a.className, _c = _a.initialWidth, initialWidth = _c === void 0 ? undefined : _c, _d = _a.minWidth, minWidth = _d === void 0 ? undefined : _d, _e = _a.maxWidth, maxWidth = _e === void 0 ? undefined : _e, _f = _a.initialHeight, initialHeight = _f === void 0 ? undefined : _f, _g = _a.minHeight, minHeight = _g === void 0 ? undefined : _g, _h = _a.maxHeight, maxHeight = _h === void 0 ? undefined : _h, ref = _a.ref, _j = _a.zIndex, zIndex = _j === void 0 ? undefined : _j;
|
|
5318
|
+
var internalRef = React.useRef(null);
|
|
5319
|
+
var container = ref || internalRef;
|
|
5295
5320
|
var resizer = React.useRef(null);
|
|
5296
5321
|
var handleResize = function (e) {
|
|
5297
5322
|
var mouseY = e.clientY;
|
|
@@ -5330,22 +5355,22 @@ function ResizeableDiv(_a) {
|
|
|
5330
5355
|
};
|
|
5331
5356
|
var isVerticalResizer = position === 'left' || position === 'right';
|
|
5332
5357
|
var thumbClass = isVerticalResizer && 'rotate-90';
|
|
5333
|
-
var containerWidth = typeof initialWidth === 'number' && !isNaN(initialWidth)
|
|
5358
|
+
var containerWidth = typeof initialWidth === 'number' && !Number.isNaN(initialWidth)
|
|
5334
5359
|
? "".concat(initialWidth, "px")
|
|
5335
5360
|
: initialWidth;
|
|
5336
|
-
var minimumWidth = typeof minWidth === 'number' && !isNaN(minWidth)
|
|
5361
|
+
var minimumWidth = typeof minWidth === 'number' && !Number.isNaN(minWidth)
|
|
5337
5362
|
? "".concat(minWidth, "px")
|
|
5338
5363
|
: minWidth;
|
|
5339
|
-
var maximumWidth = typeof maxWidth === 'number' && !isNaN(maxWidth)
|
|
5364
|
+
var maximumWidth = typeof maxWidth === 'number' && !Number.isNaN(maxWidth)
|
|
5340
5365
|
? "".concat(maxWidth, "px")
|
|
5341
5366
|
: maxWidth;
|
|
5342
|
-
var containerHeight = typeof initialHeight === 'number' && !isNaN(initialHeight)
|
|
5367
|
+
var containerHeight = typeof initialHeight === 'number' && !Number.isNaN(initialHeight)
|
|
5343
5368
|
? "".concat(initialHeight, "px")
|
|
5344
5369
|
: initialHeight;
|
|
5345
|
-
var minimumHeight = typeof minHeight === 'number' && !isNaN(minHeight)
|
|
5370
|
+
var minimumHeight = typeof minHeight === 'number' && !Number.isNaN(minHeight)
|
|
5346
5371
|
? "".concat(minHeight, "px")
|
|
5347
5372
|
: minHeight;
|
|
5348
|
-
var maximumHeight = typeof maxHeight === 'number' && !isNaN(maxHeight)
|
|
5373
|
+
var maximumHeight = typeof maxHeight === 'number' && !Number.isNaN(maxHeight)
|
|
5349
5374
|
? "".concat(maxHeight, "px")
|
|
5350
5375
|
: maxHeight;
|
|
5351
5376
|
var thumbZIndex = zIndex ? Number(zIndex) + 10 : 50;
|
|
@@ -5361,14 +5386,11 @@ function ResizeableDiv(_a) {
|
|
|
5361
5386
|
React.createElement("div", { className: "group peer absolute flex items-center justify-center ".concat(resizerContainerClass[position]), ref: resizer, onMouseDown: function () {
|
|
5362
5387
|
window.addEventListener('mousemove', handleResize);
|
|
5363
5388
|
window.addEventListener('mouseup', stopResize);
|
|
5364
|
-
}
|
|
5389
|
+
} },
|
|
5365
5390
|
React.createElement("div", { className: "flex h-[9px] w-[25px] items-center justify-center rounded-radius-full border border-bia-grey-light-10 bg-primary-white opacity-20 group-hover:opacity-100 group-active:bg-bia-coolgrey-light-90 group-active:opacity-100 ".concat(thumbClass), style: { zIndex: thumbZIndex } },
|
|
5366
5391
|
React.createElement(TbDots, { className: "text-bia-grey-light-30" }))),
|
|
5367
5392
|
React.createElement("div", { className: "h-full w-full peer-active:select-none ".concat(className) }, children)));
|
|
5368
5393
|
}
|
|
5369
|
-
ResizeableDiv.defaultProps = {
|
|
5370
|
-
position: 'left',
|
|
5371
|
-
};
|
|
5372
5394
|
|
|
5373
5395
|
var containerSizeConfig = {
|
|
5374
5396
|
minimized: 'w-[60px] min-w-[60px]',
|
|
@@ -5392,11 +5414,11 @@ var buttonConfig = {
|
|
|
5392
5414
|
2: 'pl-[68px]',
|
|
5393
5415
|
};
|
|
5394
5416
|
|
|
5395
|
-
|
|
5396
|
-
var _b = _a.color, color = _b === void 0 ? 'margueriteblue-dark-30' : _b,
|
|
5417
|
+
function SidebarContainerInner(_a, ref) {
|
|
5418
|
+
var _b = _a.color, color = _b === void 0 ? 'margueriteblue-dark-30' : _b, _c = _a.children, children = _c === void 0 ? undefined : _c, _d = _a.isMinimized, isMinimized = _d === void 0 ? false : _d, _e = _a.activeId, activeId = _e === void 0 ? undefined : _e, _f = _a.setActiveId, setActiveId = _f === void 0 ? function () { } : _f, _g = _a.className, className = _g === void 0 ? '' : _g, restProps = __rest(_a, ["color", "children", "isMinimized", "activeId", "setActiveId", "className"]);
|
|
5397
5419
|
var minimizedState = isMinimized ? 'minimized' : 'maximized';
|
|
5398
5420
|
var containerClass = cn$1("bg-bia-".concat(color), containerSizeConfig[minimizedState]);
|
|
5399
|
-
return (React.createElement("div", __assign({ ref: ref, className: cn$1('sidebar-container flex h-full flex-col justify-start py-[30px]
|
|
5421
|
+
return (React.createElement("div", __assign({ ref: ref, className: cn$1('sidebar-container flex h-full flex-col justify-start overflow-hidden py-[30px] transition-[width,min-width] delay-200 duration-500 ease-[cubic-bezier(0.68,-0.1,0.32,1.2)]', containerClass, className) }, restProps), React.Children.map(children, function (child) {
|
|
5400
5422
|
return React.isValidElement(child)
|
|
5401
5423
|
? React.cloneElement(child, {
|
|
5402
5424
|
isMinimized: isMinimized,
|
|
@@ -5406,12 +5428,13 @@ var SidebarContainer = React.forwardRef(function (_a, ref) {
|
|
|
5406
5428
|
})
|
|
5407
5429
|
: child;
|
|
5408
5430
|
})));
|
|
5409
|
-
}
|
|
5431
|
+
}
|
|
5432
|
+
var SidebarContainer = React.forwardRef(SidebarContainerInner);
|
|
5410
5433
|
SidebarContainer.displayName = 'SidebarContainer';
|
|
5411
5434
|
|
|
5412
|
-
|
|
5413
|
-
var _b = _a.color, color = _b === void 0 ? 'margueriteblue-dark-30' : _b,
|
|
5414
|
-
var
|
|
5435
|
+
function SidebarMenu(_a) {
|
|
5436
|
+
var _b = _a.color, color = _b === void 0 ? 'margueriteblue-dark-30' : _b, _c = _a.children, children = _c === void 0 ? undefined : _c, _d = _a.isMinimized, isMinimized = _d === void 0 ? false : _d, _e = _a.activeId, activeId = _e === void 0 ? undefined : _e, _f = _a.setActiveId, setActiveId = _f === void 0 ? function () { } : _f;
|
|
5437
|
+
var _g = React.useState(false), isAllExpanded = _g[0], setIsAllExpanded = _g[1];
|
|
5415
5438
|
var minimizedMenuClass = isMinimized
|
|
5416
5439
|
? 'opacity-100 h-1 w-full delay-[600ms] duration-300 ease-[cubic-bezier(0.68,-0.1,0.32,2)]'
|
|
5417
5440
|
: 'opacity-0 h-1 w-full duration-500 ease-[cubic-bezier(0.32,-1,0.68,1)]';
|
|
@@ -5437,12 +5460,12 @@ var SidebarMenu = function (_a) {
|
|
|
5437
5460
|
})
|
|
5438
5461
|
: child;
|
|
5439
5462
|
})));
|
|
5440
|
-
}
|
|
5463
|
+
}
|
|
5441
5464
|
|
|
5442
|
-
|
|
5443
|
-
var id = _a.id, title = _a.title,
|
|
5465
|
+
function SidebarItemInner(_a, ref) {
|
|
5466
|
+
var id = _a.id, title = _a.title, _b = _a.icon, icon = _b === void 0 ? undefined : _b, _c = _a.onClick, onClick = _c === void 0 ? function () { } : _c, _d = _a.children, children = _d === void 0 ? undefined : _d, _e = _a.isMinimized, isMinimized = _e === void 0 ? false : _e, _f = _a.isExpand, isExpand = _f === void 0 ? false : _f, _g = _a.notificationCount, notificationCount = _g === void 0 ? undefined : _g, _h = _a.level, level = _h === void 0 ? 0 : _h, _j = _a.activeId, activeId = _j === void 0 ? null : _j, _k = _a.setActiveId, setActiveId = _k === void 0 ? function () { } : _k, _l = _a.className, className = _l === void 0 ? '' : _l, _m = _a.color, color = _m === void 0 ? 'blue' : _m, restProps = __rest(_a, ["id", "title", "icon", "onClick", "children", "isMinimized", "isExpand", "notificationCount", "level", "activeId", "setActiveId", "className", "color"]);
|
|
5444
5467
|
var childDropdownRef = React.useRef(null);
|
|
5445
|
-
var
|
|
5468
|
+
var _o = React.useState(isExpand), isChildExpanded = _o[0], setIsChildExpanded = _o[1];
|
|
5446
5469
|
var childrenArray = React.Children.toArray(children);
|
|
5447
5470
|
var hasChildren = childrenArray.length > 0;
|
|
5448
5471
|
var nextLevel = Math.min(level + 1, 2);
|
|
@@ -5522,15 +5545,15 @@ var SidebarItem = React.forwardRef(function (_a, ref) {
|
|
|
5522
5545
|
};
|
|
5523
5546
|
return (React.createElement("div", { className: "relative" },
|
|
5524
5547
|
React.createElement("div", { className: "absolute left-[33px] top-[3px] flex h-5 w-5 items-center justify-center" },
|
|
5525
|
-
React.createElement("div", { className: cn$1('rounded-radius-full bg-white', isMinimized &&
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
|
|
5548
|
+
React.createElement("div", { className: cn$1('rounded-radius-full bg-white', isMinimized &&
|
|
5549
|
+
notificationCount === undefined &&
|
|
5550
|
+
sumNotificationCounts(children) > 0
|
|
5551
|
+
? 'h-[6px] w-[6px] delay-[600ms] duration-300 ease-[cubic-bezier(0.68,-0.1,0.32,2)]'
|
|
5529
5552
|
: 'h-0 w-0 duration-500 ease-[cubic-bezier(0.32,-1,0.68,1)]') })),
|
|
5530
5553
|
React.createElement("div", { className: cn$1('sidebar-item relative flex h-fit items-center', itemClass) },
|
|
5531
5554
|
level === 2 && (React.createElement("div", { className: "relative left-[39px] h-full w-[1px] bg-bia-white" })),
|
|
5532
5555
|
React.createElement("div", { className: "group relative grow" },
|
|
5533
|
-
React.createElement("button", __assign({ ref: ref }, restProps, { onClick: function () {
|
|
5556
|
+
React.createElement("button", __assign({ type: "button", ref: ref }, restProps, { onClick: function () {
|
|
5534
5557
|
if (hasChildren) {
|
|
5535
5558
|
setIsChildExpanded(function (prev) { return !prev; });
|
|
5536
5559
|
}
|
|
@@ -5548,8 +5571,7 @@ var SidebarItem = React.forwardRef(function (_a, ref) {
|
|
|
5548
5571
|
? 'opacity-0 delay-200 duration-300 ease-in-out'
|
|
5549
5572
|
: 'opacity-100 delay-[550ms] duration-500 ease-in-out') },
|
|
5550
5573
|
(notificationCount !== undefined ||
|
|
5551
|
-
(!isChildExpanded &&
|
|
5552
|
-
sumNotificationCounts(children) > 0)) && (React.createElement(TagLabel, { text: notificationLabel, color: "white", size: "tn" })),
|
|
5574
|
+
(!isChildExpanded && sumNotificationCounts(children) > 0)) && (React.createElement(TagLabel, { text: notificationLabel, color: "white", size: "tn" })),
|
|
5553
5575
|
React.createElement("div", { className: cn$1(chevronClass) },
|
|
5554
5576
|
React.createElement(TbChevronRight, { className: cn$1('text-bia-white transition-transform duration-300 ease-in-out', isChildExpanded ? 'rotate-90' : ''), size: 18 })))),
|
|
5555
5577
|
React.createElement("div", { className: cn$1('pointer-events-none absolute inset-0 rounded-radius-lg bg-black transition-opacity duration-200', overlayClass) })),
|
|
@@ -5557,16 +5579,17 @@ var SidebarItem = React.forwardRef(function (_a, ref) {
|
|
|
5557
5579
|
!isMinimized && hasChildren && isChildExpanded && renderChildren(),
|
|
5558
5580
|
React.createElement("div", { className: "dropdown-anchor absolute left-[60px] top-0", ref: childDropdownRef }),
|
|
5559
5581
|
isMinimized && hasChildren && (React.createElement(DropdownContainer, { open: isChildExpanded, onClose: function () { return setIsChildExpanded(false); }, anchorRef: childDropdownRef }, renderDropdownItems()))));
|
|
5560
|
-
}
|
|
5582
|
+
}
|
|
5583
|
+
var SidebarItem = React.forwardRef(SidebarItemInner);
|
|
5561
5584
|
SidebarItem.displayName = 'SidebarItem';
|
|
5562
5585
|
|
|
5563
|
-
|
|
5564
|
-
var id = _a.id, username = _a.username, role = _a.role,
|
|
5586
|
+
function SidebarProfileInner(_a, ref) {
|
|
5587
|
+
var id = _a.id, username = _a.username, role = _a.role, _b = _a.avatarImg, avatarImg = _b === void 0 ? undefined : _b, _c = _a.active, active = _c === void 0 ? false : _c, _d = _a.onClick, onClick = _d === void 0 ? function () { } : _d, _e = _a.children, children = _e === void 0 ? undefined : _e, _f = _a.isMinimized, isMinimized = _f === void 0 ? false : _f, _g = _a.isExpand, isExpand = _g === void 0 ? false : _g, _h = _a.notificationCount, notificationCount = _h === void 0 ? undefined : _h, _j = _a.activeId, activeId = _j === void 0 ? null : _j, _k = _a.setActiveId, setActiveId = _k === void 0 ? function () { } : _k, _l = _a.className, className = _l === void 0 ? '' : _l, _m = _a.color, color = _m === void 0 ? 'blue' : _m, restProps = __rest(_a, ["id", "username", "role", "avatarImg", "active", "onClick", "children", "isMinimized", "isExpand", "notificationCount", "activeId", "setActiveId", "className", "color"]);
|
|
5565
5588
|
var childDropdownRef = React.useRef(null);
|
|
5566
|
-
var
|
|
5589
|
+
var _o = React.useState(isExpand), isChildExpanded = _o[0], setIsChildExpanded = _o[1];
|
|
5567
5590
|
var childrenArray = React.Children.toArray(children);
|
|
5568
5591
|
var hasChildren = childrenArray.length > 0;
|
|
5569
|
-
var isActive = activeId === id;
|
|
5592
|
+
var isActive = active || activeId === id;
|
|
5570
5593
|
var containerState = isMinimized ? 'minimized' : 'maximized';
|
|
5571
5594
|
var isSidebarProfileElement = function (node) {
|
|
5572
5595
|
return React.isValidElement(node) && typeof node.props === 'object';
|
|
@@ -5638,38 +5661,35 @@ var SidebarProfile = React.forwardRef(function (_a, ref) {
|
|
|
5638
5661
|
})));
|
|
5639
5662
|
});
|
|
5640
5663
|
};
|
|
5641
|
-
return (React.createElement("div", { className: "relative" },
|
|
5664
|
+
return (React.createElement("div", { className: "relative w-full" },
|
|
5642
5665
|
React.createElement("div", { className: "absolute left-[33px] top-[3px] flex h-5 w-5 items-center justify-center" },
|
|
5643
|
-
React.createElement("div", { className: cn$1('rounded-radius-full bg-white', isMinimized &&
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
-
|
|
5666
|
+
React.createElement("div", { className: cn$1('rounded-radius-full bg-white', isMinimized &&
|
|
5667
|
+
notificationCount === undefined &&
|
|
5668
|
+
sumNotificationCounts(children) > 0
|
|
5669
|
+
? 'h-[6px] w-[6px] delay-[600ms] duration-300 ease-[cubic-bezier(0.68,-0.1,0.32,2)]'
|
|
5647
5670
|
: 'h-0 w-0 duration-500 ease-[cubic-bezier(0.32,-1,0.68,1)]') })),
|
|
5648
5671
|
React.createElement("div", { className: cn$1('sidebar-item group/profile relative flex h-fit items-center', profileClass) },
|
|
5649
|
-
React.createElement("div", { className: "group relative grow" },
|
|
5650
|
-
React.createElement("button", __assign({ ref: ref }, restProps, { onClick: function () {
|
|
5672
|
+
React.createElement("div", { className: "group relative min-w-0 grow" },
|
|
5673
|
+
React.createElement("button", __assign({ type: "button", ref: ref }, restProps, { onClick: function () {
|
|
5674
|
+
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
5675
|
+
setActiveId(id);
|
|
5651
5676
|
if (hasChildren) {
|
|
5652
5677
|
setIsChildExpanded(function (prev) { return !prev; });
|
|
5653
5678
|
}
|
|
5654
|
-
else {
|
|
5655
|
-
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
5656
|
-
setActiveId(id);
|
|
5657
|
-
}
|
|
5658
5679
|
}, className: cn$1('cubic-bezier(0.68, -0.1, 0.32, 1.2) flex w-full items-center gap-x-2.5 delay-500 duration-300', buttonClass, className) }),
|
|
5659
5680
|
avatarImage,
|
|
5660
|
-
React.createElement("div", { className: "flex flex-col" },
|
|
5661
|
-
React.createElement(Text, { variant: "normal-text", className: cn$1('truncate text-bia-white delay-[400ms]', isMinimized
|
|
5681
|
+
React.createElement("div", { className: "flex min-w-0 flex-col" },
|
|
5682
|
+
React.createElement(Text, { variant: "normal-text", className: cn$1('truncate text-left text-bia-white delay-[400ms]', isMinimized
|
|
5662
5683
|
? 'opacity-0 duration-300 ease-in-out'
|
|
5663
5684
|
: 'opacity-100 delay-1000 duration-700 ease-in-out') }, username),
|
|
5664
5685
|
React.createElement(Text, { variant: "small-text", className: cn$1('truncate text-left text-bia-white delay-[400ms]', isMinimized
|
|
5665
5686
|
? 'opacity-0 duration-300 ease-in-out'
|
|
5666
5687
|
: 'opacity-50 delay-1000 duration-700 ease-in-out') }, role)),
|
|
5667
|
-
React.createElement("div", { className: cn$1('ml-auto flex items-center gap-x-[5px]', isMinimized
|
|
5688
|
+
React.createElement("div", { className: cn$1('ml-auto flex shrink-0 items-center gap-x-[5px]', isMinimized
|
|
5668
5689
|
? 'opacity-0 delay-200 duration-300 ease-in-out'
|
|
5669
5690
|
: 'opacity-100 delay-[550ms] duration-500 ease-in-out') },
|
|
5670
5691
|
(notificationCount !== undefined ||
|
|
5671
|
-
(!isChildExpanded &&
|
|
5672
|
-
sumNotificationCounts(children) > 0)) && (React.createElement(TagLabel, { text: notificationLabel, color: "white", size: "tn" })),
|
|
5692
|
+
(!isChildExpanded && sumNotificationCounts(children) > 0)) && (React.createElement(TagLabel, { text: notificationLabel, color: "white", size: "tn" })),
|
|
5673
5693
|
React.createElement("div", { className: cn$1(chevronClass) },
|
|
5674
5694
|
React.createElement(TbChevronRight, { className: cn$1('text-bia-white transition-transform duration-300 ease-in-out', isChildExpanded ? 'rotate-90' : '', isActive || isPathActive
|
|
5675
5695
|
? 'opacity-100'
|
|
@@ -5679,7 +5699,8 @@ var SidebarProfile = React.forwardRef(function (_a, ref) {
|
|
|
5679
5699
|
!isMinimized && hasChildren && isChildExpanded && renderChildren(),
|
|
5680
5700
|
React.createElement("div", { className: "dropdown-anchor absolute left-[60px] top-0", ref: childDropdownRef }),
|
|
5681
5701
|
isMinimized && hasChildren && (React.createElement(DropdownContainer, { open: isChildExpanded, onClose: function () { return setIsChildExpanded(false); }, anchorRef: childDropdownRef }, renderDropdownItems()))));
|
|
5682
|
-
}
|
|
5702
|
+
}
|
|
5703
|
+
var SidebarProfile = React.forwardRef(SidebarProfileInner);
|
|
5683
5704
|
SidebarProfile.displayName = 'SidebarProfile';
|
|
5684
5705
|
|
|
5685
5706
|
function Slider(_a) {
|
|
@@ -5689,14 +5710,14 @@ function Slider(_a) {
|
|
|
5689
5710
|
var newValue = Number(event.target.value);
|
|
5690
5711
|
setsliderValue(newValue);
|
|
5691
5712
|
};
|
|
5692
|
-
return (React.createElement("input", { type: "range", min: 0, max: 100, step: 1, value: sliderValue, onChange: handleChange, disabled: disabled, className: "
|
|
5713
|
+
return (React.createElement("input", { type: "range", min: 0, max: 100, step: 1, value: sliderValue, onChange: handleChange, disabled: disabled, className: "slider-thumb h-[2px] w-full cursor-pointer appearance-none rounded-2xl disabled:hover:cursor-not-allowed" }));
|
|
5693
5714
|
}
|
|
5694
5715
|
|
|
5695
5716
|
function Spinner() {
|
|
5696
|
-
return (React.createElement("div", { className: "flex
|
|
5697
|
-
React.createElement("svg", { className: "
|
|
5698
|
-
React.createElement("circle", { className: "
|
|
5699
|
-
React.createElement("circle", { className: "
|
|
5717
|
+
return (React.createElement("div", { className: "flex items-center justify-center" },
|
|
5718
|
+
React.createElement("svg", { className: "h-16 w-16 animate-spin", viewBox: "0 0 50 50" },
|
|
5719
|
+
React.createElement("circle", { className: "text-bia-blue-light-80 opacity-25", cx: "25", cy: "25", r: "20", stroke: "currentColor", strokeWidth: "3", fill: "none" }),
|
|
5720
|
+
React.createElement("circle", { className: "text-bia-blue opacity-75", cx: "25", cy: "25", r: "20", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round", fill: "none", strokeDasharray: "150, 200", strokeDashoffset: "0", style: { animation: 'dash 1.5s ease-in-out infinite' } }))));
|
|
5700
5721
|
}
|
|
5701
5722
|
|
|
5702
5723
|
var configTab = {
|
|
@@ -5719,7 +5740,7 @@ var configTab = {
|
|
|
5719
5740
|
};
|
|
5720
5741
|
|
|
5721
5742
|
function Tab(_a) {
|
|
5722
|
-
var
|
|
5743
|
+
var _b = _a.children, children = _b === void 0 ? undefined : _b, active = _a.active, _c = _a.icon, icon = _c === void 0 ? undefined : _c, disabled = _a.disabled, _d = _a.mode, mode = _d === void 0 ? 'horizontal' : _d, _e = _a.fit, fit = _e === void 0 ? 'fit-content' : _e, _f = _a.size, size = _f === void 0 ? 'md' : _f, _g = _a.className, className = _g === void 0 ? undefined : _g, rest = __rest(_a, ["children", "active", "icon", "disabled", "mode", "fit", "size", "className"]);
|
|
5723
5744
|
var disabledKeyTab = disabled || active ? ' pointer-events-none' : '';
|
|
5724
5745
|
var cursor;
|
|
5725
5746
|
if (disabled) {
|
|
@@ -5740,9 +5761,9 @@ function Tab(_a) {
|
|
|
5740
5761
|
var activeKeyTab = active
|
|
5741
5762
|
? 'group-disabled:text-bia-coolgrey-disabled text-primary-black'
|
|
5742
5763
|
: 'text-bia-coolgrey group-hover:text-bia-coolgrey-hover group-active:text-bia-coolgrey-active group-disabled:text-bia-coolgrey-disabled';
|
|
5743
|
-
var buttonClassName = "".concat(horizontalButtonStyle, " ").concat(disabledKeyTab, " ").concat(fit, " ").concat(className
|
|
5764
|
+
var buttonClassName = "".concat(horizontalButtonStyle, " ").concat(disabledKeyTab, " ").concat(fit, " ").concat(className || '');
|
|
5744
5765
|
return (React.createElement("div", { className: "".concat(mode === 'horizontal' ? 'h-full' : 'w-full', " ").concat(cursor) },
|
|
5745
|
-
React.createElement("button", __assign({ type: "button", className: "flex
|
|
5766
|
+
React.createElement("button", __assign({ type: "button", className: "group relative flex items-stretch justify-between outline-none ".concat(buttonClassName), disabled: disabled }, rest),
|
|
5746
5767
|
React.createElement("div", { className: "flex items-center justify-center ".concat(buttonContentStyle) },
|
|
5747
5768
|
React.createElement("div", { className: "flex items-center justify-center " },
|
|
5748
5769
|
React.createElement("div", { className: "flex items-center space-x-1 text-nowrap ".concat(activeKeyTab, " ").concat(configTab[size].text) },
|
|
@@ -5828,15 +5849,15 @@ var TabMenu = React.forwardRef(function (props, ref) {
|
|
|
5828
5849
|
});
|
|
5829
5850
|
TabMenu.displayName = 'TabMenu';
|
|
5830
5851
|
|
|
5831
|
-
|
|
5852
|
+
function Table(_a) {
|
|
5832
5853
|
var children = _a.children, rest = __rest(_a, ["children"]);
|
|
5833
5854
|
return React.createElement("table", __assign({}, rest), children);
|
|
5834
|
-
}
|
|
5855
|
+
}
|
|
5835
5856
|
|
|
5836
|
-
|
|
5857
|
+
function TableBody(_a) {
|
|
5837
5858
|
var children = _a.children, rest = __rest(_a, ["children"]);
|
|
5838
5859
|
return React.createElement("tbody", __assign({}, rest), children);
|
|
5839
|
-
}
|
|
5860
|
+
}
|
|
5840
5861
|
|
|
5841
5862
|
var sizeConfig = {
|
|
5842
5863
|
md: 'px-2.5 py-[9px]',
|
|
@@ -5866,36 +5887,27 @@ function TableCell(_a) {
|
|
|
5866
5887
|
}
|
|
5867
5888
|
return (React.createElement("td", __assign({ className: "bianic-table-cell table-col ".concat(columnClass, " break-words") }, props), children));
|
|
5868
5889
|
}
|
|
5869
|
-
TableCell.defaultProps = {
|
|
5870
|
-
lined: false,
|
|
5871
|
-
size: 'md',
|
|
5872
|
-
variant: 'body',
|
|
5873
|
-
};
|
|
5874
5890
|
|
|
5875
|
-
|
|
5891
|
+
function TableHead(_a) {
|
|
5876
5892
|
var children = _a.children, rest = __rest(_a, ["children"]);
|
|
5877
5893
|
return React.createElement("thead", __assign({}, rest), children);
|
|
5878
|
-
}
|
|
5894
|
+
}
|
|
5879
5895
|
|
|
5880
|
-
|
|
5896
|
+
function TableRow(_a) {
|
|
5881
5897
|
_a.variant; var children = _a.children, rest = __rest(_a, ["variant", "children"]);
|
|
5882
5898
|
return React.createElement("tr", __assign({}, rest), children);
|
|
5883
|
-
}
|
|
5899
|
+
}
|
|
5884
5900
|
|
|
5885
|
-
|
|
5901
|
+
function BlockLoading(_a) {
|
|
5886
5902
|
var _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.backgroundColor, backgroundColor = _c === void 0 ? 'bg-bia-grey-light-80' : _c;
|
|
5887
5903
|
return (React.createElement("div", { className: "block-loading flex h-full w-full items-center justify-center ".concat(backgroundColor, " ").concat(className) },
|
|
5888
5904
|
React.createElement(Spinner, null)));
|
|
5889
|
-
}
|
|
5905
|
+
}
|
|
5890
5906
|
|
|
5891
5907
|
var EmptyIcon = "Empty.svg";
|
|
5892
5908
|
|
|
5893
|
-
|
|
5894
|
-
var
|
|
5895
|
-
[
|
|
5896
|
-
React.createElement(ContextualButton, { key: "refresh", icon: React.createElement(TbRefresh, { size: 18 }), disabled: true }),
|
|
5897
|
-
React.createElement(ContextualButton, { key: "zoom", icon: React.createElement(TbZoom, { size: 18 }), disabled: true }),
|
|
5898
|
-
];
|
|
5909
|
+
function EmptyTable(_a) {
|
|
5910
|
+
var _b = _a.content, content = _b === void 0 ? undefined : _b, subContent = _a.subContent;
|
|
5899
5911
|
return (React.createElement("div", { className: "h-[368px] w-full rounded-b-radius-lg bg-bia-grey-light-80 pb-[63px]" },
|
|
5900
5912
|
React.createElement("div", { className: "mb-[63px] grid h-[30px] w-full grid-cols-7 items-center gap-20 border-b border-bia-grey px-[60px]" },
|
|
5901
5913
|
React.createElement("div", { className: "col-span-1 h-2 rounded-radius-sm bg-bia-grey-light-50" }),
|
|
@@ -5905,18 +5917,18 @@ var EmptyTable = function (_a) {
|
|
|
5905
5917
|
React.createElement("div", { className: "flex flex-col items-center justify-center rounded-md p-5" },
|
|
5906
5918
|
React.createElement("img", { src: EmptyIcon, alt: "Empty State", style: { height: 72, width: 72 } }),
|
|
5907
5919
|
React.createElement("div", { className: "mt-5 text-center" },
|
|
5908
|
-
content && (React.createElement(Text, { variant:
|
|
5920
|
+
content && (React.createElement(Text, { variant: "small-text-semibold", extended: "block text-bia-black" }, content)),
|
|
5909
5921
|
subContent && (React.createElement(Text, { variant: "small-text", extended: "mt-2 block text-bia-coolgrey'}" }, subContent))))));
|
|
5910
|
-
}
|
|
5922
|
+
}
|
|
5911
5923
|
|
|
5912
5924
|
var tableSizeOption = [10, 20, 50, 100, 999];
|
|
5913
|
-
|
|
5914
|
-
var currentPage = _a.currentPage, totalPages = _a.totalPages, pageSize = _a.pageSize, setCurrentPage = _a.setCurrentPage, setPageSize = _a.setPageSize,
|
|
5925
|
+
function TableFooterController(_a) {
|
|
5926
|
+
var currentPage = _a.currentPage, totalPages = _a.totalPages, pageSize = _a.pageSize, setCurrentPage = _a.setCurrentPage, setPageSize = _a.setPageSize, _b = _a.isLoading, isLoading = _b === void 0 ? false : _b, _c = _a.size, size = _c === void 0 ? 'sm' : _c;
|
|
5915
5927
|
// Table Button
|
|
5916
5928
|
var tableSizeRef = React.useRef(null);
|
|
5917
|
-
var
|
|
5918
|
-
var handlePageSizeChange = function (
|
|
5919
|
-
setPageSize(
|
|
5929
|
+
var _d = React.useState(false), isShownTableSizeDropdown = _d[0], setIsShownTableSizeDropdown = _d[1];
|
|
5930
|
+
var handlePageSizeChange = function (newPageSize) {
|
|
5931
|
+
setPageSize(newPageSize);
|
|
5920
5932
|
setCurrentPage(1);
|
|
5921
5933
|
};
|
|
5922
5934
|
var pageSizeDisplay = pageSize === 999 ? 'All' : pageSize;
|
|
@@ -5926,13 +5938,13 @@ var TableFooterController = function (_a) {
|
|
|
5926
5938
|
})));
|
|
5927
5939
|
var paddingSize = size === 'md' ? 'py-2.5 pt-[9px]' : 'py-[3.5px] pt-[4.5px]';
|
|
5928
5940
|
return (React.createElement("div", { className: "table-controller-footer flex w-full justify-between gap-[5px] rounded-b-radius-lg border-t border-bia-grey bg-bia-grey-light-80 px-2.5 ".concat(paddingSize) },
|
|
5929
|
-
React.createElement("div", { className: "action-container flex gap-[5px]" }, totalPages > 0 && (React.createElement(PaginationBar, { size: "sm", currentPage: currentPage, totalPages: totalPages, onPageChange: setCurrentPage, position:
|
|
5941
|
+
React.createElement("div", { className: "action-container flex gap-[5px]" }, totalPages > 0 && (React.createElement(PaginationBar, { size: "sm", currentPage: currentPage, totalPages: totalPages, onPageChange: setCurrentPage, position: "center" }))),
|
|
5930
5942
|
React.createElement(Button, { ref: tableSizeRef, label: pageSizeDisplay, minWidth: 0, size: "sm", iconRight: React.createElement(TbChevronDown, { size: 14 }), onClick: function () { return setIsShownTableSizeDropdown(function (oldState) { return !oldState; }); }, disabled: isLoading, className: "w-fit" }),
|
|
5931
5943
|
tableSizeDropdown));
|
|
5932
|
-
}
|
|
5944
|
+
}
|
|
5933
5945
|
|
|
5934
|
-
|
|
5935
|
-
var _b = _a.size, size = _b === void 0 ? 'sm' : _b,
|
|
5946
|
+
function TableHeaderController(_a) {
|
|
5947
|
+
var _b = _a.size, size = _b === void 0 ? 'sm' : _b, _c = _a.buttonActions, buttonActions = _c === void 0 ? undefined : _c, _d = _a.totalData, totalData = _d === void 0 ? undefined : _d, _e = _a.firstIndex, firstIndex = _e === void 0 ? undefined : _e, _f = _a.lastIndex, lastIndex = _f === void 0 ? undefined : _f;
|
|
5936
5948
|
var isShowHelperText = totalData || firstIndex || lastIndex;
|
|
5937
5949
|
var paddingSize = size === 'md' ? 'py-[13px] pt-[14px] ' : 'py-[7px] pt-2';
|
|
5938
5950
|
var textSize = size === 'md' ? 'normal-text' : 'small-text';
|
|
@@ -5946,15 +5958,15 @@ var TableHeaderController = function (_a) {
|
|
|
5946
5958
|
lastIndex,
|
|
5947
5959
|
' ',
|
|
5948
5960
|
totalData ? "of ".concat(totalData) : '')))));
|
|
5949
|
-
}
|
|
5961
|
+
}
|
|
5950
5962
|
|
|
5951
|
-
|
|
5963
|
+
function TableSearchInput(_a) {
|
|
5952
5964
|
var isShow = _a.isShow, value = _a.value, onChange = _a.onChange, _b = _a.placeholder, placeholder = _b === void 0 ? 'Search Data' : _b;
|
|
5953
5965
|
if (!isShow)
|
|
5954
5966
|
return null;
|
|
5955
5967
|
return (React.createElement("div", { className: "flex max-h-[22px] w-full items-center gap-x-1 pb-1 ps-[5px] font-segoe " },
|
|
5956
5968
|
React.createElement(TextInput, { size: "sm", variant: "text-transparent", className: "w-full bg-transparent text-size-sm focus:border-bia-grey focus:outline-none focus:ring-0", placeholder: placeholder, value: value, onChange: onChange, autoFocus: true })));
|
|
5957
|
-
}
|
|
5969
|
+
}
|
|
5958
5970
|
|
|
5959
5971
|
var colorConfigs = {
|
|
5960
5972
|
default: 'bg-bia-black',
|
|
@@ -5965,7 +5977,9 @@ var colorConfigs = {
|
|
|
5965
5977
|
};
|
|
5966
5978
|
|
|
5967
5979
|
function Toaster(_a) {
|
|
5968
|
-
var children = _a.children,
|
|
5980
|
+
var children = _a.children, _b = _a.title, title = _b === void 0 ? undefined : _b, _c = _a.icon, icon = _c === void 0 ? undefined : _c, _d = _a.onClose, onClose = _d === void 0 ? undefined : _d, _e = _a.variant, variant = _e === void 0 ? 'default' : _e;
|
|
5981
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars
|
|
5982
|
+
_a.position;
|
|
5969
5983
|
// Default styles for the toaster based on variant
|
|
5970
5984
|
var colorStyles = "".concat(colorConfigs[variant], " text-bia-white");
|
|
5971
5985
|
// Logic for content alignment based on `isHeaderShow`
|
|
@@ -5980,7 +5994,7 @@ function Toaster(_a) {
|
|
|
5980
5994
|
React.createElement("span", { className: "mr-[10px] flex min-w-[3px] rounded-r-[10px] bg-bia-white/50" }),
|
|
5981
5995
|
content,
|
|
5982
5996
|
React.createElement("div", { className: "flex items-start pr-[11px] pt-[1px]" },
|
|
5983
|
-
React.createElement("button", { onClick: onClose, className: "rounded-[3px] hover:bg-bia-white/20 focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-bia-white/50 active:bg-black/10" },
|
|
5997
|
+
React.createElement("button", { type: "button", onClick: onClose, className: "rounded-[3px] hover:bg-bia-white/20 focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-bia-white/50 active:bg-black/10" },
|
|
5984
5998
|
React.createElement(TbX, { size: 14 })))));
|
|
5985
5999
|
}
|
|
5986
6000
|
|
|
@@ -9272,8 +9286,8 @@ function cn() {
|
|
|
9272
9286
|
}
|
|
9273
9287
|
return twMerge(clsx(inputs));
|
|
9274
9288
|
}
|
|
9275
|
-
|
|
9276
|
-
var steps = _a.steps, activeStep = _a.activeStep, _b = _a.size, size = _b === void 0 ? 'md' : _b,
|
|
9289
|
+
function StandardHorizontalStepper(_a) {
|
|
9290
|
+
var steps = _a.steps, activeStep = _a.activeStep, _b = _a.size, size = _b === void 0 ? 'md' : _b, _c = _a.className, className = _c === void 0 ? '' : _c, _d = _a.onStepClick, onStepClick = _d === void 0 ? undefined : _d, _e = _a.processedIcon, processedIcon = _e === void 0 ? undefined : _e, _f = _a.currentIcon, currentIcon = _f === void 0 ? undefined : _f, _g = _a.color, color = _g === void 0 ? 'blue' : _g, _h = _a.showLabels, showLabels = _h === void 0 ? true : _h;
|
|
9277
9291
|
var isSmall = size === 'sm';
|
|
9278
9292
|
var connectorColor = "bg-bia-".concat(color);
|
|
9279
9293
|
var stepTextColor = "text-bia-".concat(color);
|
|
@@ -9298,19 +9312,139 @@ var HorizontalStepper = function (_a) {
|
|
|
9298
9312
|
var isInteractive = Boolean(onStepClick);
|
|
9299
9313
|
return (React.createElement("div", { key: (_a = step.id) !== null && _a !== void 0 ? _a : index, className: "group relative flex flex-1 flex-col items-center" },
|
|
9300
9314
|
React.createElement("div", { className: "relative my-2 flex w-full items-center" },
|
|
9301
|
-
React.createElement("div", { className: cn('h-0.5 flex-1 transition-colors duration-200', isFirst
|
|
9315
|
+
React.createElement("div", { className: cn('h-0.5 flex-1 transition-colors duration-200', isFirst && (showLabels ? 'opacity-0' : 'hidden'), index <= activeStep
|
|
9302
9316
|
? connectorColor
|
|
9303
9317
|
: 'bg-bia-coolgrey-light-50') }),
|
|
9304
9318
|
React.createElement("button", { type: "button", disabled: !isInteractive, onClick: function () { return onStepClick === null || onStepClick === void 0 ? void 0 : onStepClick(index); }, "aria-current": status === 'current' ? 'step' : undefined, className: cn('relative flex shrink-0 items-center justify-center rounded-full border-2 transition-all duration-200', 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-bia-blue focus-visible:ring-offset-2', isSmall ? 'h-6 w-6 text-xs' : 'h-8 w-8 text-sm', isInteractive ? 'cursor-pointer' : 'cursor-default', status === 'processed' && processedStepStyle, status === 'current' && "font-semibold ".concat(currentStepStyle), status === 'upcoming' &&
|
|
9305
|
-
'border-bia-coolgrey-light-50 bg-bia-white text-bia-black') },
|
|
9306
|
-
|
|
9319
|
+
'border-bia-coolgrey-light-50 bg-bia-white text-bia-black') }, (function () {
|
|
9320
|
+
if (step.icon)
|
|
9321
|
+
return step.icon;
|
|
9322
|
+
if (status === 'processed' && processedIcon)
|
|
9323
|
+
return processedIcon;
|
|
9324
|
+
if (status === 'current')
|
|
9325
|
+
return (currentIcon || (React.createElement(TbCircleFilled, { size: isSmall ? 14 : 18, className: stepTextColor })));
|
|
9326
|
+
return (React.createElement(Text, { variant: isSmall ? 'small-text-semibold' : 'normal-text-semibold', className: status === 'processed'
|
|
9327
|
+
? stepTextColor
|
|
9328
|
+
: 'text-bia-black' }, index + 1));
|
|
9329
|
+
})()),
|
|
9330
|
+
React.createElement("div", { className: cn('h-0.5 flex-1 transition-colors duration-200', isLast && (showLabels ? 'opacity-0' : 'hidden'), index < activeStep
|
|
9307
9331
|
? connectorColor
|
|
9308
9332
|
: 'bg-bia-coolgrey-light-50') })),
|
|
9309
9333
|
showLabels && (step.label || step.description) && (React.createElement("div", { className: "mt-2 flex max-w-[140px] flex-col gap-y-[3px] text-center" },
|
|
9310
9334
|
step.label && (React.createElement(Text, { variant: isSmall ? 'small-text-semibold' : 'normal-text-semibold', className: "text-bia-black" }, step.label)),
|
|
9311
9335
|
step.description && (React.createElement(Text, { variant: isSmall ? 'small-text' : 'normal-text', className: "text-bia-coolgrey-light-50" }, step.description))))));
|
|
9312
9336
|
})));
|
|
9313
|
-
}
|
|
9337
|
+
}
|
|
9338
|
+
|
|
9339
|
+
var navbarItemConfig = {
|
|
9340
|
+
current: 'cursor-default',
|
|
9341
|
+
clickable: 'cursor-pointer hover:bg-bia-white/15 active:bg-bia-white-transparent-80 focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-0 focus-visible:outline-bia-blue-light-50',
|
|
9342
|
+
static: 'cursor-default',
|
|
9343
|
+
disabled: 'cursor-not-allowed',
|
|
9344
|
+
};
|
|
9345
|
+
var navbarCircleConfig = {
|
|
9346
|
+
filledBase: 'bg-bia-white border-bia-white',
|
|
9347
|
+
currentDefault: 'bg-bia-white border-bia-white text-bia-black',
|
|
9348
|
+
other: 'border-bia-white text-bia-white',
|
|
9349
|
+
disabled: 'border-bia-white-transparent-40 text-bia-white-transparent-40',
|
|
9350
|
+
};
|
|
9351
|
+
var BIA_COLOR_NAME = /^(?:(?:white|black)(?:-transparent-(?:[1-9]0|75))?|(?:red|yellow|green|teal|blue|grey|coolgrey|pink|sky|orange|crayola|verdantgreen|margueriteblue|brown)(?:-(?:hover|active|disabled|pastel|(?:light|dark)-[1-9]0))?|purple(?:-(?:hover|active|disabled|pastel))?)$/;
|
|
9352
|
+
var navbarLabelConfig = {
|
|
9353
|
+
enabled: 'whitespace-nowrap leading-4 text-bia-white',
|
|
9354
|
+
disabled: 'whitespace-nowrap leading-4 text-bia-white-transparent-40',
|
|
9355
|
+
};
|
|
9356
|
+
var navbarChevronConfig = {
|
|
9357
|
+
enabled: 'shrink-0 text-bia-white',
|
|
9358
|
+
disabled: 'shrink-0 text-bia-white-transparent-40',
|
|
9359
|
+
};
|
|
9360
|
+
|
|
9361
|
+
var circleTextColor = function (circleClass) { var _a, _b; return (_b = (_a = circleClass.match(/text-bia-\S+/)) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : ''; };
|
|
9362
|
+
function resolveItemState(isCurrent, isDisabled, isClickable) {
|
|
9363
|
+
if (isCurrent)
|
|
9364
|
+
return 'current';
|
|
9365
|
+
if (isDisabled)
|
|
9366
|
+
return 'disabled';
|
|
9367
|
+
if (isClickable)
|
|
9368
|
+
return 'clickable';
|
|
9369
|
+
return 'static';
|
|
9370
|
+
}
|
|
9371
|
+
function resolveCircleClass(isCurrent, isDisabled, isProcessed, color) {
|
|
9372
|
+
if (isDisabled)
|
|
9373
|
+
return navbarCircleConfig.disabled;
|
|
9374
|
+
if (isCurrent || isProcessed) {
|
|
9375
|
+
if (typeof color !== 'string' || !BIA_COLOR_NAME.test(color)) {
|
|
9376
|
+
return navbarCircleConfig.currentDefault;
|
|
9377
|
+
}
|
|
9378
|
+
return "".concat(navbarCircleConfig.filledBase, " text-bia-").concat(color);
|
|
9379
|
+
}
|
|
9380
|
+
return navbarCircleConfig.other;
|
|
9381
|
+
}
|
|
9382
|
+
function resolveCircleContent(step, index, isProcessed, isCurrent, processedIcon, currentIcon, circleClass) {
|
|
9383
|
+
if (step.icon)
|
|
9384
|
+
return step.icon;
|
|
9385
|
+
if (isProcessed && processedIcon)
|
|
9386
|
+
return processedIcon;
|
|
9387
|
+
if (isCurrent && currentIcon)
|
|
9388
|
+
return currentIcon;
|
|
9389
|
+
return (React.createElement(Text, { variant: "tiny-text", className: "leading-none ".concat(circleTextColor(circleClass)) }, index + 1));
|
|
9390
|
+
}
|
|
9391
|
+
function NavbarHorizontalStepper(_a) {
|
|
9392
|
+
var steps = _a.steps, activeStep = _a.activeStep, _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.onStepClick, onStepClick = _c === void 0 ? undefined : _c, _d = _a.color, color = _d === void 0 ? undefined : _d, _e = _a.processedIcon, processedIcon = _e === void 0 ? undefined : _e, _f = _a.currentIcon, currentIcon = _f === void 0 ? undefined : _f;
|
|
9393
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9394
|
+
_a.size;
|
|
9395
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9396
|
+
_a.showLabels;
|
|
9397
|
+
return (React.createElement("nav", { "aria-label": "Progress", className: cn$1('flex', className) },
|
|
9398
|
+
React.createElement("ol", { className: "flex items-center" }, steps.map(function (step, index) {
|
|
9399
|
+
var _a;
|
|
9400
|
+
var isCurrent = index === activeStep;
|
|
9401
|
+
var isProcessed = index < activeStep;
|
|
9402
|
+
var isDisabled = !isCurrent && Boolean(step.disabled);
|
|
9403
|
+
var isClickable = !isCurrent && !isDisabled && Boolean(onStepClick);
|
|
9404
|
+
var itemState = resolveItemState(isCurrent, isDisabled, isClickable);
|
|
9405
|
+
var itemClass = cn$1('flex h-6 items-center gap-[5px] px-[5px] py-[3px]', !isCurrent && 'rounded-radius-sm', navbarItemConfig[itemState]);
|
|
9406
|
+
var circleClass = resolveCircleClass(isCurrent, isDisabled, isProcessed, color);
|
|
9407
|
+
var labelClass = isDisabled
|
|
9408
|
+
? navbarLabelConfig.disabled
|
|
9409
|
+
: navbarLabelConfig.enabled;
|
|
9410
|
+
var isChevronDisabled = !isCurrent && Boolean(step.disabled);
|
|
9411
|
+
var circleContent = resolveCircleContent(step, index, isProcessed, isCurrent, processedIcon, currentIcon, circleClass);
|
|
9412
|
+
var circle = (React.createElement("span", { className: cn$1('flex size-5 min-w-5 shrink-0 items-center justify-center rounded-full border px-[5px] py-px text-size-tiny', circleClass) }, circleContent));
|
|
9413
|
+
var label = step.label ? (React.createElement(Text, { variant: "tiny-text", className: labelClass }, step.label)) : null;
|
|
9414
|
+
var content = (React.createElement(React.Fragment, null,
|
|
9415
|
+
circle,
|
|
9416
|
+
label));
|
|
9417
|
+
var stepElement;
|
|
9418
|
+
if (isCurrent) {
|
|
9419
|
+
stepElement = (React.createElement("span", { "aria-current": "step", className: itemClass }, content));
|
|
9420
|
+
}
|
|
9421
|
+
else if (isClickable) {
|
|
9422
|
+
stepElement = (React.createElement("button", { type: "button", onClick: function () { return onStepClick === null || onStepClick === void 0 ? void 0 : onStepClick(index); }, className: itemClass }, content));
|
|
9423
|
+
}
|
|
9424
|
+
else if (isDisabled && onStepClick) {
|
|
9425
|
+
stepElement = (React.createElement("button", { type: "button", disabled: true, className: itemClass }, content));
|
|
9426
|
+
}
|
|
9427
|
+
else {
|
|
9428
|
+
stepElement = React.createElement("span", { className: itemClass }, content);
|
|
9429
|
+
}
|
|
9430
|
+
return (React.createElement("li", { key: (_a = step.id) !== null && _a !== void 0 ? _a : index, className: "flex items-center" },
|
|
9431
|
+
index > 0 && (React.createElement(TbChevronRight, { size: 14, "aria-hidden": "true", className: isChevronDisabled
|
|
9432
|
+
? navbarChevronConfig.disabled
|
|
9433
|
+
: navbarChevronConfig.enabled })),
|
|
9434
|
+
stepElement));
|
|
9435
|
+
}))));
|
|
9436
|
+
}
|
|
9437
|
+
|
|
9438
|
+
var VARIANT_UNION = ['default', 'navbar'];
|
|
9439
|
+
function HorizontalStepper(props) {
|
|
9440
|
+
var variant = props.variant, rest = __rest(props, ["variant"]);
|
|
9441
|
+
switch (validUnion(variant, VARIANT_UNION)) {
|
|
9442
|
+
case 'navbar':
|
|
9443
|
+
return (React.createElement(NavbarHorizontalStepper, __assign({}, rest)));
|
|
9444
|
+
default:
|
|
9445
|
+
return (React.createElement(StandardHorizontalStepper, __assign({}, rest)));
|
|
9446
|
+
}
|
|
9447
|
+
}
|
|
9314
9448
|
|
|
9315
9449
|
var variantConfig = {
|
|
9316
9450
|
upcoming: 'bg-white border-2 border-coolgrey-light-50',
|
|
@@ -9334,8 +9468,8 @@ var icon = {
|
|
|
9334
9468
|
upcoming: '',
|
|
9335
9469
|
};
|
|
9336
9470
|
|
|
9337
|
-
|
|
9338
|
-
var
|
|
9471
|
+
function StepperItem(_a) {
|
|
9472
|
+
var _b = _a.onClick, onClick = _b === void 0 ? function () { } : _b, _c = _a.variant, variant = _c === void 0 ? 'upcoming' : _c, _d = _a.withBorder, withBorder = _d === void 0 ? false : _d, _e = _a.children, children = _e === void 0 ? undefined : _e, _f = _a.className, className = _f === void 0 ? '' : _f;
|
|
9339
9473
|
var stepperCardClass = withBorder
|
|
9340
9474
|
? "border border-bia-grey-dark-10 p-[15px] rounded-radius-lg ".concat(className)
|
|
9341
9475
|
: className;
|
|
@@ -9345,10 +9479,10 @@ var StepperItem = function (_a) {
|
|
|
9345
9479
|
React.createElement("div", { className: "flex h-6 w-6 items-center justify-center rounded-radius-full ".concat(variant ? variantConfig[variant] : '', " box-border") }, icon[variant]),
|
|
9346
9480
|
React.createElement("div", { className: "grow ".concat(variant ? lineVariantConfig[variant] : '') })),
|
|
9347
9481
|
React.createElement("div", { className: "stepper-card mb-5 w-full text-justify ".concat(stepperCardClass) }, children)));
|
|
9348
|
-
}
|
|
9482
|
+
}
|
|
9349
9483
|
|
|
9350
9484
|
function Window(_a) {
|
|
9351
|
-
var _b = _a.size, size = _b === void 0 ? 'sm' : _b,
|
|
9485
|
+
var _b = _a.size, size = _b === void 0 ? 'sm' : _b, _c = _a.title, title = _c === void 0 ? undefined : _c, onClose = _a.onClose, rest = __rest(_a, ["size", "title", "onClose"]);
|
|
9352
9486
|
var windowSize;
|
|
9353
9487
|
// sizing logic
|
|
9354
9488
|
switch (size) {
|
|
@@ -9409,6 +9543,71 @@ function getRelativeTime(date) {
|
|
|
9409
9543
|
return "".concat(Math.floor(diffMs / month), " months ago");
|
|
9410
9544
|
return "".concat(Math.floor(diffMs / year), " years ago");
|
|
9411
9545
|
}
|
|
9546
|
+
/**
|
|
9547
|
+
* formatDateTime
|
|
9548
|
+
* Accepts a date value and formats it into one of several human-readable
|
|
9549
|
+
* or machine-sortable string formats.
|
|
9550
|
+
* Formats:
|
|
9551
|
+
* - 'short': "'24 Feb 4"
|
|
9552
|
+
* - 'long' (default): "4 February 2024"
|
|
9553
|
+
* - 'long-with-time': "4 February 2024, 16:30"
|
|
9554
|
+
* - 'table': "2024-02-04"
|
|
9555
|
+
* - 'table-with-time': "2024-02-04, 16:30"
|
|
9556
|
+
* - 'time24': "16:30"
|
|
9557
|
+
*/
|
|
9558
|
+
var formatDateTime = function (dateString, type) {
|
|
9559
|
+
if (type === void 0) { type = null; }
|
|
9560
|
+
var date = new Date(dateString);
|
|
9561
|
+
var year;
|
|
9562
|
+
var month = '';
|
|
9563
|
+
var day = '';
|
|
9564
|
+
var timeResult = date.toLocaleTimeString('en-GB', {
|
|
9565
|
+
hour: '2-digit',
|
|
9566
|
+
minute: '2-digit',
|
|
9567
|
+
hour12: false,
|
|
9568
|
+
});
|
|
9569
|
+
switch (type) {
|
|
9570
|
+
case 'short':
|
|
9571
|
+
// example: '24 Feb 4
|
|
9572
|
+
year = date.getFullYear().toString().substring(2, 4);
|
|
9573
|
+
month = date.toLocaleString('en-US', { month: 'short' });
|
|
9574
|
+
day = String(date.getDate());
|
|
9575
|
+
return "'".concat(year, " ").concat(month, " ").concat(day);
|
|
9576
|
+
case 'long':
|
|
9577
|
+
// example: 4 February 2024
|
|
9578
|
+
year = date.getFullYear().toString();
|
|
9579
|
+
month = date.toLocaleString('en-US', { month: 'long' });
|
|
9580
|
+
day = String(date.getDate());
|
|
9581
|
+
return "".concat(day, " ").concat(month, " ").concat(year);
|
|
9582
|
+
case 'long-with-time':
|
|
9583
|
+
// example: 4 February 2024, 16:30
|
|
9584
|
+
year = date.getFullYear().toString();
|
|
9585
|
+
month = date.toLocaleString('en-US', { month: 'long' });
|
|
9586
|
+
day = String(date.getDate());
|
|
9587
|
+
return "".concat(day, " ").concat(month, " ").concat(year, ", ").concat(timeResult);
|
|
9588
|
+
case 'table':
|
|
9589
|
+
// example: 2024-02-04
|
|
9590
|
+
year = date.getFullYear();
|
|
9591
|
+
month = String(date.getMonth() + 1).padStart(2, '0');
|
|
9592
|
+
day = String(date.getDate()).padStart(2, '0');
|
|
9593
|
+
return "".concat(year, "-").concat(month, "-").concat(day);
|
|
9594
|
+
case 'table-with-time':
|
|
9595
|
+
// example: 2024-02-04, 16:30
|
|
9596
|
+
year = date.getFullYear();
|
|
9597
|
+
month = String(date.getMonth() + 1).padStart(2, '0');
|
|
9598
|
+
day = String(date.getDate()).padStart(2, '0');
|
|
9599
|
+
return "".concat(year, "-").concat(month, "-").concat(day, ", ").concat(timeResult);
|
|
9600
|
+
case 'time24':
|
|
9601
|
+
// example: 16:30
|
|
9602
|
+
return "".concat(timeResult);
|
|
9603
|
+
default:
|
|
9604
|
+
// default to long format (4 February 2024)
|
|
9605
|
+
year = date.getFullYear().toString();
|
|
9606
|
+
month = date.toLocaleString('en-US', { month: 'long' });
|
|
9607
|
+
day = String(date.getDate());
|
|
9608
|
+
return "".concat(day, " ").concat(month, " ").concat(year);
|
|
9609
|
+
}
|
|
9610
|
+
};
|
|
9412
9611
|
|
|
9413
9612
|
/**
|
|
9414
9613
|
* A custom hook to handle data processing for tables, managing internal states
|
|
@@ -9631,6 +9830,7 @@ exports.TreeItem = TreeItem;
|
|
|
9631
9830
|
exports.VerticalStepper = StepperItem;
|
|
9632
9831
|
exports.Window = Window;
|
|
9633
9832
|
exports.YearPicker = YearPicker;
|
|
9833
|
+
exports.formatDateTime = formatDateTime;
|
|
9634
9834
|
exports.getRelativeTime = getRelativeTime;
|
|
9635
9835
|
exports.useFileTree = useFileTree;
|
|
9636
9836
|
exports.useTableDataHandler = useTableDataHandler;
|