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/esm/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import React, { useState, useEffect, forwardRef, isValidElement, cloneElement, useRef, useLayoutEffect, Children, useMemo,
|
|
1
|
+
import React, { useState, useEffect, forwardRef, isValidElement, cloneElement, useRef, useLayoutEffect, useCallback, Children, useMemo, useId, useImperativeHandle } from 'react';
|
|
2
2
|
import { createPortal } from 'react-dom';
|
|
3
3
|
|
|
4
4
|
function Accordions(_a) {
|
|
5
5
|
var title = _a.title, content = _a.content;
|
|
6
6
|
var _b = useState(false), active = _b[0], setActive = _b[1];
|
|
7
7
|
return (React.createElement("div", { className: "flex-col" },
|
|
8
|
-
React.createElement("div", { className: "flex items-start justify-between border-b border-bia-grey-light-20 bg-white
|
|
9
|
-
React.createElement("div", { className: "text-
|
|
8
|
+
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" },
|
|
9
|
+
React.createElement("div", { className: "text-[14px] font-[350] leading-[21px] text-primary-black" }, title),
|
|
10
10
|
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" },
|
|
11
11
|
React.createElement("g", { clipPath: "url(#clip0_8847_19267)" },
|
|
12
12
|
React.createElement("rect", { width: "18", height: "20", fill: "white" }),
|
|
@@ -22,9 +22,9 @@ function Accordions(_a) {
|
|
|
22
22
|
React.createElement("clipPath", { id: "clip0_8847_19211" },
|
|
23
23
|
React.createElement("rect", { width: "18", height: "20", fill: "white" }))),
|
|
24
24
|
"22")))),
|
|
25
|
-
active && (React.createElement("div", { className: "
|
|
26
|
-
React.createElement("div", { className: " absolute
|
|
27
|
-
React.createElement("div", { className: "text-
|
|
25
|
+
active && (React.createElement("div", { className: "relative w-[505px] gap-[10px] bg-bia-grey-light-80 pb-[15px] pe-[15px] ps-[15px] pt-[10px]" },
|
|
26
|
+
React.createElement("div", { className: " absolute left-0 top-0 h-[100%] w-[3px] rounded-br-[999px] rounded-tr-[999px] bg-bia-blue " }),
|
|
27
|
+
React.createElement("div", { className: "text-[14px] font-[350] text-primary-black " }, content)))));
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
var DefaultContext = {
|
|
@@ -146,7 +146,7 @@ function TbCircleFilled (props) {
|
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
function InfoIcon() {
|
|
149
|
-
return (React.createElement("svg", { viewBox: "0 0 19 20", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", className: "
|
|
149
|
+
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" },
|
|
150
150
|
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" }),
|
|
151
151
|
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" }),
|
|
152
152
|
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" })));
|
|
@@ -224,41 +224,33 @@ var AlertConfig = {
|
|
|
224
224
|
|
|
225
225
|
function Display(_a) {
|
|
226
226
|
var children = _a.children;
|
|
227
|
-
return (React.createElement("h1", { className: "bianic-display text-[144px]
|
|
227
|
+
return (React.createElement("h1", { className: "bianic-display texts font-humnst777 text-[144px] font-bold leading-[120%]" }, children));
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
function Heading(_a) {
|
|
231
|
-
var _b = _a.variant, variant = _b === void 0 ? '1' : _b,
|
|
231
|
+
var _b = _a.variant, variant = _b === void 0 ? '1' : _b, _c = _a.className, className = _c === void 0 ? '' : _c, children = _a.children;
|
|
232
232
|
switch (variant) {
|
|
233
233
|
case '1':
|
|
234
|
-
return (React.createElement("h1", { className: "bianic-header-".concat(variant, " text-heading-1 font-bold
|
|
234
|
+
return (React.createElement("h1", { className: "bianic-header-".concat(variant, " flex font-humnst777 text-heading-1 font-bold ").concat(className) }, children));
|
|
235
235
|
case '2':
|
|
236
|
-
return (React.createElement("h2", { className: "bianic-header-".concat(variant, " text-heading-2 font-bold
|
|
236
|
+
return (React.createElement("h2", { className: "bianic-header-".concat(variant, " flex font-humnst777 text-heading-2 font-bold ").concat(className) }, children));
|
|
237
237
|
case '3':
|
|
238
|
-
return (React.createElement("h3", { className: "bianic-header-".concat(variant, " text-heading-3 font-bold
|
|
238
|
+
return (React.createElement("h3", { className: "bianic-header-".concat(variant, " flex font-humnst777 text-heading-3 font-bold ").concat(className) }, children));
|
|
239
239
|
case '4':
|
|
240
|
-
return (React.createElement("h4", { className: "bianic-header-".concat(variant, " text-heading-4 font-bold
|
|
240
|
+
return (React.createElement("h4", { className: "bianic-header-".concat(variant, " flex font-humnst777 text-heading-4 font-bold ").concat(className) }, children));
|
|
241
241
|
case '5':
|
|
242
|
-
return (React.createElement("h5", { className: "bianic-header-".concat(variant, " text-heading-5 font-bold
|
|
242
|
+
return (React.createElement("h5", { className: "bianic-header-".concat(variant, " flex font-humnst777 text-heading-5 font-bold ").concat(className) }, children));
|
|
243
243
|
case '6':
|
|
244
|
-
return (React.createElement("h6", { className: "bianic-header-".concat(variant, " text-heading-6 font-bold
|
|
244
|
+
return (React.createElement("h6", { className: "bianic-header-".concat(variant, " flex font-humnst777 text-heading-6 font-bold ").concat(className) }, children));
|
|
245
245
|
default:
|
|
246
|
-
return (React.createElement("h1", { className: "bianic-header-".concat(variant, " text-heading-1 font-bold
|
|
246
|
+
return (React.createElement("h1", { className: "bianic-header-".concat(variant, " flex font-humnst777 text-heading-1 font-bold ").concat(className) }, children));
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
|
-
Heading.defaultProps = {
|
|
250
|
-
variant: '1',
|
|
251
|
-
className: '',
|
|
252
|
-
};
|
|
253
249
|
|
|
254
250
|
function P(_a) {
|
|
255
251
|
var _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.fontSize, fontSize = _c === void 0 ? 'size-base' : _c, children = _a.children;
|
|
256
252
|
return (React.createElement("p", { className: "paragraph text-justify text-".concat(fontSize, " font-segoe ").concat(className) }, children));
|
|
257
253
|
}
|
|
258
|
-
P.defaultProps = {
|
|
259
|
-
className: '',
|
|
260
|
-
fontSize: 'size-base',
|
|
261
|
-
};
|
|
262
254
|
|
|
263
255
|
var textClasses = {
|
|
264
256
|
caption: 'text-size-caption font-normal font-segoe uppercase',
|
|
@@ -354,10 +346,6 @@ function Text(_a) {
|
|
|
354
346
|
var extendedClasses = "".concat(className, " ").concat(extended);
|
|
355
347
|
return (React.createElement("span", { className: "bianic-text ".concat(textClasses[validatedVariant], " ").concat(defaultColor, " ").concat(extendedClasses) }, childrenElement(children)));
|
|
356
348
|
}
|
|
357
|
-
Text.defaultProps = {
|
|
358
|
-
extended: '',
|
|
359
|
-
className: '',
|
|
360
|
-
};
|
|
361
349
|
|
|
362
350
|
/******************************************************************************
|
|
363
351
|
Copyright (c) Microsoft Corporation.
|
|
@@ -418,12 +406,9 @@ function Link(_a) {
|
|
|
418
406
|
var _b = _a.extended, extended = _b === void 0 ? '' : _b, children = _a.children, rest = __rest(_a, ["extended", "children"]);
|
|
419
407
|
return (React.createElement("a", __assign({ className: "bianic-text ".concat(textClasses.link, " ").concat(extended) }, rest), children));
|
|
420
408
|
}
|
|
421
|
-
Link.defaultProps = {
|
|
422
|
-
extended: '',
|
|
423
|
-
};
|
|
424
409
|
|
|
425
410
|
function Alert(_a) {
|
|
426
|
-
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,
|
|
411
|
+
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;
|
|
427
412
|
var validateVariant = validUnion(variant, [
|
|
428
413
|
'base',
|
|
429
414
|
'info',
|
|
@@ -434,7 +419,7 @@ function Alert(_a) {
|
|
|
434
419
|
var IconComponent = AlertConfig[validateVariant].icon[visibleIcon ? 'true' : 'false'];
|
|
435
420
|
var IconX = AlertConfig[visibleClose ? 'true' : 'false'];
|
|
436
421
|
var iconDisplay = visibleIcon
|
|
437
|
-
? customIcon !== null && customIcon !== void 0 ? customIcon : React.createElement(IconComponent, { size: 20, color: "white" })
|
|
422
|
+
? (customIcon !== null && customIcon !== void 0 ? customIcon : React.createElement(IconComponent, { size: 20, color: "white" }))
|
|
438
423
|
: null;
|
|
439
424
|
var content = children || React.createElement(Text, { variant: "small-text" }, caption);
|
|
440
425
|
return (visible && (React.createElement("div", { className: "alert-container flex w-full flex-col" },
|
|
@@ -449,19 +434,11 @@ function Alert(_a) {
|
|
|
449
434
|
React.createElement("div", { className: "flex justify-between" },
|
|
450
435
|
React.createElement(Text, { variant: "normal-text-semibold" }, title)),
|
|
451
436
|
React.createElement("div", { className: "flex flex-row items-start gap-[5px]" },
|
|
452
|
-
customMiniIcon
|
|
437
|
+
customMiniIcon || null,
|
|
453
438
|
content)),
|
|
454
439
|
IconX && typeof IconX === 'function' && (React.createElement("div", { className: "closable-area flex " },
|
|
455
440
|
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 }))))))))));
|
|
456
441
|
}
|
|
457
|
-
Alert.defaultProps = {
|
|
458
|
-
title: '',
|
|
459
|
-
variant: 'base',
|
|
460
|
-
visible: true,
|
|
461
|
-
setVisible: function () { },
|
|
462
|
-
visibleIcon: true,
|
|
463
|
-
visibleClose: false,
|
|
464
|
-
};
|
|
465
442
|
|
|
466
443
|
var radiusConfig$1 = {
|
|
467
444
|
default: {
|
|
@@ -554,7 +531,7 @@ var Button = forwardRef(function (_a, ref) {
|
|
|
554
531
|
var validatedRadius = validUnion(radius, RADIUS_UNION);
|
|
555
532
|
var variantTextColorClasses = variantConfig$3[validatedVariant]
|
|
556
533
|
.split(/\s+/)
|
|
557
|
-
.filter(function (
|
|
534
|
+
.filter(function (cls) { return cls.startsWith('text-'); });
|
|
558
535
|
var renderIcon = function (element) {
|
|
559
536
|
if (!element)
|
|
560
537
|
return null;
|
|
@@ -586,11 +563,13 @@ var Button = forwardRef(function (_a, ref) {
|
|
|
586
563
|
var isVariantLink = variant.includes('link')
|
|
587
564
|
? ''
|
|
588
565
|
: "".concat(sidePaddingConfig[validatedSize]);
|
|
589
|
-
var sizeClass =
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
566
|
+
var sizeClass = "".concat(iconOnlySizeConfig$1[validatedSize], " ").concat(isVariantLink, " ").concat(isVariantLink);
|
|
567
|
+
if (label || variant === 'form-group') {
|
|
568
|
+
sizeClass = " ".concat(minWidthRules, " ").concat(sizingRules);
|
|
569
|
+
}
|
|
570
|
+
else if (hasDoubleIcon) {
|
|
571
|
+
sizeClass = "".concat(doubleIconSizeConfig[validatedSize], " ").concat(isVariantLink);
|
|
572
|
+
}
|
|
594
573
|
var classString = "\n ".concat(variantConfig$3[validatedVariant], "\n ").concat(sizeClass, "\n ").concat(radiusConfig$1[validatedRadius][validatedSize], "\n ").concat(className, "\n ");
|
|
595
574
|
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),
|
|
596
575
|
childrenElement(renderIcon(iconLeft || left)),
|
|
@@ -687,9 +666,9 @@ var typeConfig = {
|
|
|
687
666
|
};
|
|
688
667
|
|
|
689
668
|
function Badge(_a) {
|
|
690
|
-
var _b = _a.type, type = _b === void 0 ? 'standart' : _b, children = _a.children,
|
|
669
|
+
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;
|
|
691
670
|
var divRef = useRef(null);
|
|
692
|
-
var
|
|
671
|
+
var _e = useState(0), fontSize = _e[0], setFontSize = _e[1];
|
|
693
672
|
var typeClasses = typeConfig[type];
|
|
694
673
|
var isStandart = type === 'standart';
|
|
695
674
|
var bgColor = isInverted && isStandart ? '#ffffff' : color || '';
|
|
@@ -714,11 +693,6 @@ function Badge(_a) {
|
|
|
714
693
|
} },
|
|
715
694
|
React.createElement("span", { ref: divRef, style: { marginTop: contentMarginTop } }, children)));
|
|
716
695
|
}
|
|
717
|
-
Badge.defaultProps = {
|
|
718
|
-
type: 'standart',
|
|
719
|
-
isInverted: false,
|
|
720
|
-
color: undefined,
|
|
721
|
-
};
|
|
722
696
|
|
|
723
697
|
var variantConfig$2 = {
|
|
724
698
|
black: {
|
|
@@ -760,7 +734,7 @@ function Banner(_a) {
|
|
|
760
734
|
useLayoutEffect(function () {
|
|
761
735
|
var textElement = textRef.current;
|
|
762
736
|
if (!textElement)
|
|
763
|
-
return;
|
|
737
|
+
return undefined;
|
|
764
738
|
var observer = new ResizeObserver(function () {
|
|
765
739
|
var computedStyle = window.getComputedStyle(textElement);
|
|
766
740
|
var lineHeight = parseFloat(computedStyle.lineHeight);
|
|
@@ -780,10 +754,6 @@ function Banner(_a) {
|
|
|
780
754
|
React.createElement(TbX, { className: "text-[18px] ".concat(variantConfig$2[variant].hover, " ").concat(variantConfig$2[variant].active) })))));
|
|
781
755
|
}
|
|
782
756
|
}
|
|
783
|
-
Banner.defaultProps = {
|
|
784
|
-
closeable: true,
|
|
785
|
-
variant: 'black',
|
|
786
|
-
};
|
|
787
757
|
|
|
788
758
|
var sizeConfig$e = {
|
|
789
759
|
md: 'h-[16px] text-[11px]',
|
|
@@ -807,14 +777,14 @@ var colorConfig$3 = {
|
|
|
807
777
|
white: 'bg-bia-white text-bia-black border border-bia-grey',
|
|
808
778
|
};
|
|
809
779
|
|
|
810
|
-
|
|
780
|
+
function MonospaceBadge(_a) {
|
|
811
781
|
var text = _a.text, _b = _a.size, size = _b === void 0 ? 'md' : _b, _c = _a.color, color = _c === void 0 ? 'blue' : _c;
|
|
812
782
|
var sizeClass = sizeConfig$e[size];
|
|
813
783
|
var colorClass = colorConfig$3[color];
|
|
814
784
|
var variantClass = "".concat(sizeClass, " ").concat(colorClass);
|
|
815
785
|
return (React.createElement("div", { className: "relative -top-[1px] inline-flex w-fit items-center justify-center rounded-[2px] px-[3px] ".concat(variantClass) },
|
|
816
786
|
React.createElement("div", { className: "font-sans-code leading-[0px]" }, text)));
|
|
817
|
-
}
|
|
787
|
+
}
|
|
818
788
|
|
|
819
789
|
function Biaenergi$6() {
|
|
820
790
|
return (React.createElement("div", { className: "" },
|
|
@@ -1621,13 +1591,10 @@ function Breadcrumb(_a) {
|
|
|
1621
1591
|
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"]);
|
|
1622
1592
|
var _c = BreadcrumbConfig[String(selected)], container = _c.container, text = _c.text;
|
|
1623
1593
|
return (React.createElement("div", { className: "flex" },
|
|
1624
|
-
React.createElement("button", __assign({ className: "".concat(text, " ").concat(disabled ? 'text-bia-coolgrey-light-50
|
|
1625
|
-
!selected && (React.createElement("div", { className: "
|
|
1594
|
+
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),
|
|
1595
|
+
!selected && (React.createElement("div", { className: "flex items-center justify-center px-[5px]" },
|
|
1626
1596
|
React.createElement(Chevron, null)))));
|
|
1627
1597
|
}
|
|
1628
|
-
Breadcrumb.defaultProps = {
|
|
1629
|
-
selected: false,
|
|
1630
|
-
};
|
|
1631
1598
|
|
|
1632
1599
|
var colorConfig$2 = {
|
|
1633
1600
|
green: {
|
|
@@ -1640,11 +1607,13 @@ var colorConfig$2 = {
|
|
|
1640
1607
|
},
|
|
1641
1608
|
};
|
|
1642
1609
|
|
|
1643
|
-
|
|
1644
|
-
|
|
1610
|
+
function ButtonApp(_a) {
|
|
1611
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars
|
|
1612
|
+
_a.icon;
|
|
1613
|
+
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"]);
|
|
1645
1614
|
var buttonState = isActive ? 'active' : 'default';
|
|
1646
1615
|
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));
|
|
1647
|
-
}
|
|
1616
|
+
}
|
|
1648
1617
|
|
|
1649
1618
|
var textColorConfig = {
|
|
1650
1619
|
dark: 'text-primary-black disabled:text-bia-coolgrey-disabled',
|
|
@@ -1655,20 +1624,20 @@ var stateColorConfig = {
|
|
|
1655
1624
|
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',
|
|
1656
1625
|
};
|
|
1657
1626
|
|
|
1658
|
-
|
|
1659
|
-
var
|
|
1660
|
-
var textColor =
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
: textColorConfig[variant];
|
|
1627
|
+
function ContextualButtonInner(_a, ref) {
|
|
1628
|
+
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"]);
|
|
1629
|
+
var textColor = textColorConfig[variant];
|
|
1630
|
+
if (isSelected) {
|
|
1631
|
+
textColor = variant === 'dark' ? 'text-primary-black' : 'text-primary-white';
|
|
1632
|
+
}
|
|
1665
1633
|
var stateColor = stateColorConfig[isSelected ? 'selected' : 'default'];
|
|
1666
|
-
return (React.createElement("button", __assign({ ref: ref, className: "bianic-contextual-button box-border flex min-h-[
|
|
1634
|
+
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 }),
|
|
1667
1635
|
icon,
|
|
1668
1636
|
label && (React.createElement("div", { className: "label flex max-h-[46px] items-center gap-x-0.5 px-[5px] text-[12px] leading-none" },
|
|
1669
1637
|
React.createElement("span", null, label),
|
|
1670
1638
|
actionElement))));
|
|
1671
|
-
}
|
|
1639
|
+
}
|
|
1640
|
+
var ContextualButton = forwardRef(ContextualButtonInner);
|
|
1672
1641
|
|
|
1673
1642
|
var config$2 = {
|
|
1674
1643
|
'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',
|
|
@@ -1676,15 +1645,19 @@ var config$2 = {
|
|
|
1676
1645
|
'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',
|
|
1677
1646
|
};
|
|
1678
1647
|
|
|
1679
|
-
|
|
1648
|
+
function Card(_a) {
|
|
1680
1649
|
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"]);
|
|
1681
1650
|
var baseStyles = config$2[variant];
|
|
1682
1651
|
var stateStyles = disabled
|
|
1683
1652
|
? 'opacity-50 cursor-not-allowed pointer-events-none'
|
|
1684
1653
|
: '';
|
|
1685
1654
|
var combinedClassName = "rounded-radius-md p-5 ".concat(baseStyles, " ").concat(stateStyles, " ").concat(className).trim();
|
|
1686
|
-
return (React.createElement("button", __assign({
|
|
1687
|
-
|
|
1655
|
+
return (React.createElement("button", __assign({
|
|
1656
|
+
// type already defaults to 'button' and is safely typed via ComponentPropsWithoutRef<'button'>;
|
|
1657
|
+
// the rule can't statically verify a variable's value, only literal strings
|
|
1658
|
+
// eslint-disable-next-line react/button-has-type
|
|
1659
|
+
type: type, disabled: disabled, "aria-disabled": disabled, className: combinedClassName }, rest), children));
|
|
1660
|
+
}
|
|
1688
1661
|
|
|
1689
1662
|
function Color() {
|
|
1690
1663
|
var colors = [
|
|
@@ -1783,8 +1756,8 @@ function Color() {
|
|
|
1783
1756
|
React.createElement("div", { className: "h-10 min-w-10" }),
|
|
1784
1757
|
lightLevels.map(function (level) { return (React.createElement("div", { key: level, className: "flex h-10 w-fit items-center justify-end" },
|
|
1785
1758
|
React.createElement("div", { className: "whitespace-nowrap text-center text-xs font-semibold" }, level))); })),
|
|
1786
|
-
colors.map(function (color
|
|
1787
|
-
return (React.createElement("div", { className: "flex w-fit flex-col items-center gap-y-3", key:
|
|
1759
|
+
colors.map(function (color) {
|
|
1760
|
+
return (React.createElement("div", { className: "flex w-fit flex-col items-center gap-y-3", key: color.tailwind },
|
|
1788
1761
|
React.createElement("div", { className: "h-10 w-fit" },
|
|
1789
1762
|
React.createElement("div", { className: "text-center text-xs font-semibold" }, color.tailwind)),
|
|
1790
1763
|
lightLevels.map(function (level) {
|
|
@@ -1827,6 +1800,9 @@ var Countdown = React.forwardRef(function (_a, ref) {
|
|
|
1827
1800
|
React.createElement(Heading, { key: secondsPlaceholder, variant: "2", className: "animate-number-drop" }, secondsPlaceholder),
|
|
1828
1801
|
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" }))));
|
|
1829
1802
|
});
|
|
1803
|
+
Countdown.defaultProps = {
|
|
1804
|
+
variant: 'countdown',
|
|
1805
|
+
};
|
|
1830
1806
|
Countdown.displayName = 'Countdown';
|
|
1831
1807
|
|
|
1832
1808
|
var DividerConfig = {
|
|
@@ -1835,51 +1811,18 @@ var DividerConfig = {
|
|
|
1835
1811
|
};
|
|
1836
1812
|
|
|
1837
1813
|
function Divider(_a) {
|
|
1838
|
-
var _b = _a.orientation, orientation = _b === void 0 ? 'horizontal' : _b,
|
|
1814
|
+
var _b = _a.orientation, orientation = _b === void 0 ? 'horizontal' : _b, _c = _a.className, className = _c === void 0 ? '' : _c;
|
|
1839
1815
|
var config = DividerConfig[orientation];
|
|
1840
1816
|
var margin = orientation === 'horizontal' ? 'my-[7px]' : 'mx-[7px]';
|
|
1841
1817
|
return (React.createElement("div", { className: "bianic-divider bg-bia-grey-light-50 ".concat(margin, " ").concat(config, " ").concat(className) }));
|
|
1842
1818
|
}
|
|
1843
|
-
Divider.defaultProps = {
|
|
1844
|
-
className: '',
|
|
1845
|
-
orientation: 'horizontal',
|
|
1846
|
-
};
|
|
1847
1819
|
|
|
1848
|
-
|
|
1849
|
-
var
|
|
1850
|
-
var popupRef = useRef(null); // Ref untuk div utama
|
|
1851
|
-
var _b = useDetectOutsideClick(popupRef, false), isOpenContMenu = _b[0], setIsOpenContMenu = _b[1];
|
|
1852
|
-
var _c = useState({ x: 0, y: 0 }), contMenuPosition = _c[0], setContMenuPosition = _c[1];
|
|
1853
|
-
var menuStyle = {
|
|
1854
|
-
position: 'fixed',
|
|
1855
|
-
top: "".concat(contMenuPosition.y, "px"),
|
|
1856
|
-
left: "".concat(contMenuPosition.x, "px"),
|
|
1857
|
-
// Pastikan z-index cukup tinggi agar muncul di atas elemen lain
|
|
1858
|
-
zIndex: 1000,
|
|
1859
|
-
};
|
|
1860
|
-
var handleRightClick = function (event) {
|
|
1861
|
-
setIsOpenContMenu(true);
|
|
1862
|
-
setContMenuPosition({ x: event.clientX, y: event.clientY });
|
|
1863
|
-
};
|
|
1864
|
-
return (React.createElement("div", { className: "file-tree" },
|
|
1865
|
-
data.map(function (_a, index) {
|
|
1866
|
-
var label = _a.label, nodes = _a.nodes, props = __rest(_a, ["label", "nodes"]);
|
|
1867
|
-
return (React.createElement(TreeItem$1, __assign({ label: label, nodes: nodes, key: index, color: color, chevronColor: chevronColor, handleRightClick: handleRightClick, onMouseDownTreeItem: onMouseDown }, props)));
|
|
1868
|
-
}),
|
|
1869
|
-
isOpenContMenu && (React.createElement("div", { style: menuStyle, ref: popupRef, className: "bianic-filetree-contextmenu" }, React.isValidElement(contextMenu)
|
|
1870
|
-
? // Kirimkan handleItemClick sebagai props onClick ke setiap MenuItem
|
|
1871
|
-
cloneElement(contextMenu, {
|
|
1872
|
-
isWithOverlay: false,
|
|
1873
|
-
onClickItem: function () { return setIsOpenContMenu(false); },
|
|
1874
|
-
})
|
|
1875
|
-
: contextMenu))));
|
|
1876
|
-
};
|
|
1877
|
-
var TreeItem$1 = function (_a) {
|
|
1878
|
-
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"]);
|
|
1820
|
+
function TreeItem$1(_a) {
|
|
1821
|
+
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"]);
|
|
1879
1822
|
var treeRef = useRef(null);
|
|
1880
|
-
var
|
|
1881
|
-
var
|
|
1882
|
-
var
|
|
1823
|
+
var _g = useState(false), isExpand = _g[0], setIsExpand = _g[1];
|
|
1824
|
+
var _h = useState(false), isFocused = _h[0], setIsFocused = _h[1];
|
|
1825
|
+
var _j = useDetectOutsideClick(treeRef, false, 'mousedown'), isClickRight = _j[0], setIsClickRight = _j[1];
|
|
1883
1826
|
var focusedIconColor = chevronColor || color
|
|
1884
1827
|
? "text-bia-".concat(chevronColor || color)
|
|
1885
1828
|
: 'text-bia-coolgrey-light-50';
|
|
@@ -1888,11 +1831,11 @@ var TreeItem$1 = function (_a) {
|
|
|
1888
1831
|
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);
|
|
1889
1832
|
return (React.createElement("div", { className: "bianic-tree-item" },
|
|
1890
1833
|
React.createElement("div", { className: "justify-left group flex items-center", ref: treeRef },
|
|
1891
|
-
nodes && nodes.length > 0 ? (React.createElement("button", { className: "cursor-pointer", onClick: function (
|
|
1834
|
+
nodes && nodes.length > 0 ? (React.createElement("button", { type: "button", className: "cursor-pointer", onClick: function () {
|
|
1892
1835
|
setIsExpand(function (prev) { return !prev; });
|
|
1893
1836
|
} },
|
|
1894
1837
|
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]" })),
|
|
1895
|
-
React.createElement("button", __assign({ onFocus: function (e) {
|
|
1838
|
+
React.createElement("button", __assign({ type: "button", onFocus: function (e) {
|
|
1896
1839
|
var _a;
|
|
1897
1840
|
setIsFocused(true);
|
|
1898
1841
|
(_a = props === null || props === void 0 ? void 0 : props.onFocus) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
@@ -1913,14 +1856,43 @@ var TreeItem$1 = function (_a) {
|
|
|
1913
1856
|
handleRightClick === null || handleRightClick === void 0 ? void 0 : handleRightClick(e);
|
|
1914
1857
|
} }, props),
|
|
1915
1858
|
React.createElement(Text, { variant: "small-text" }, label))),
|
|
1916
|
-
isExpand && nodes && nodes.length > 0 && (React.createElement("div", { className: "ml-4" }, nodes.map(function (_a
|
|
1917
|
-
var
|
|
1918
|
-
return (React.createElement(TreeItem$1, __assign({ label:
|
|
1859
|
+
isExpand && nodes && nodes.length > 0 && (React.createElement("div", { className: "ml-4" }, nodes.map(function (_a) {
|
|
1860
|
+
var childLabel = _a.label, childNodes = _a.nodes, childProps = __rest(_a, ["label", "nodes"]);
|
|
1861
|
+
return (React.createElement(TreeItem$1, __assign({ label: childLabel, nodes: childNodes, key: childLabel, color: color, handleRightClick: handleRightClick, onMouseDownTreeItem: onMouseDownTreeItem }, childProps)));
|
|
1919
1862
|
})))));
|
|
1920
|
-
}
|
|
1863
|
+
}
|
|
1864
|
+
function FileTree(_a) {
|
|
1865
|
+
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;
|
|
1866
|
+
var popupRef = useRef(null); // Ref untuk div utama
|
|
1867
|
+
var _f = useDetectOutsideClick(popupRef, false), isOpenContMenu = _f[0], setIsOpenContMenu = _f[1];
|
|
1868
|
+
var _g = useState({ x: 0, y: 0 }), contMenuPosition = _g[0], setContMenuPosition = _g[1];
|
|
1869
|
+
var menuStyle = {
|
|
1870
|
+
position: 'fixed',
|
|
1871
|
+
top: "".concat(contMenuPosition.y, "px"),
|
|
1872
|
+
left: "".concat(contMenuPosition.x, "px"),
|
|
1873
|
+
// Pastikan z-index cukup tinggi agar muncul di atas elemen lain
|
|
1874
|
+
zIndex: 1000,
|
|
1875
|
+
};
|
|
1876
|
+
var handleRightClick = function (event) {
|
|
1877
|
+
setIsOpenContMenu(true);
|
|
1878
|
+
setContMenuPosition({ x: event.clientX, y: event.clientY });
|
|
1879
|
+
};
|
|
1880
|
+
return (React.createElement("div", { className: "file-tree" },
|
|
1881
|
+
data.map(function (_a) {
|
|
1882
|
+
var label = _a.label, nodes = _a.nodes, props = __rest(_a, ["label", "nodes"]);
|
|
1883
|
+
return (React.createElement(TreeItem$1, __assign({ label: label, nodes: nodes, key: label, color: color, chevronColor: chevronColor, handleRightClick: handleRightClick, onMouseDownTreeItem: onMouseDown }, props)));
|
|
1884
|
+
}),
|
|
1885
|
+
isOpenContMenu && (React.createElement("div", { style: menuStyle, ref: popupRef, className: "bianic-filetree-contextmenu" }, React.isValidElement(contextMenu)
|
|
1886
|
+
? // Kirimkan handleItemClick sebagai props onClick ke setiap MenuItem
|
|
1887
|
+
cloneElement(contextMenu, {
|
|
1888
|
+
isWithOverlay: false,
|
|
1889
|
+
onClickItem: function () { return setIsOpenContMenu(false); },
|
|
1890
|
+
})
|
|
1891
|
+
: contextMenu))));
|
|
1892
|
+
}
|
|
1921
1893
|
|
|
1922
|
-
|
|
1923
|
-
var data = _a.data, expandedData = _a.expandedData, setExpandedData = _a.setExpandedData, dataMap = _a.dataMap,
|
|
1894
|
+
function TreeItem(_a) {
|
|
1895
|
+
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;
|
|
1924
1896
|
var isExpanded = !!expandedData.get(data.id);
|
|
1925
1897
|
var toogleExpand = function () {
|
|
1926
1898
|
var isCurrentlyExpanded = !!expandedData.get(data.id);
|
|
@@ -1940,7 +1912,8 @@ var TreeItem = function (_a) {
|
|
|
1940
1912
|
var current = data;
|
|
1941
1913
|
while (current) {
|
|
1942
1914
|
newExpandedState.set(current.id, true);
|
|
1943
|
-
current =
|
|
1915
|
+
current =
|
|
1916
|
+
current.parent != null ? dataMap.get(current.parent) : undefined;
|
|
1944
1917
|
}
|
|
1945
1918
|
}
|
|
1946
1919
|
setExpandedData(newExpandedState);
|
|
@@ -1964,7 +1937,7 @@ var TreeItem = function (_a) {
|
|
|
1964
1937
|
handleRightClick === null || handleRightClick === void 0 ? void 0 : handleRightClick(data);
|
|
1965
1938
|
} }, data.label)),
|
|
1966
1939
|
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 })); })))));
|
|
1967
|
-
}
|
|
1940
|
+
}
|
|
1968
1941
|
|
|
1969
1942
|
var defaultAlias = {
|
|
1970
1943
|
id: null,
|
|
@@ -1993,12 +1966,15 @@ var useFileTree = function (data, alias) {
|
|
|
1993
1966
|
var tree = [];
|
|
1994
1967
|
// First, create a map of all items
|
|
1995
1968
|
data.forEach(function (unit) {
|
|
1996
|
-
|
|
1969
|
+
var transformed = unitTransformator(unit, usedAlias);
|
|
1970
|
+
map.set(transformed.id, transformed);
|
|
1997
1971
|
});
|
|
1998
1972
|
// build tree structure by linkiing children to parents
|
|
1999
1973
|
map.forEach(function (unit) {
|
|
2000
|
-
var
|
|
1974
|
+
var _a;
|
|
1975
|
+
var parent = unit.parent != null ? map.get(unit.parent) : undefined;
|
|
2001
1976
|
if (parent) {
|
|
1977
|
+
(_a = parent.children) !== null && _a !== void 0 ? _a : (parent.children = []);
|
|
2002
1978
|
// Find the correct insertion point for the new child
|
|
2003
1979
|
var insertionIndex = parent.children.findIndex(function (child) {
|
|
2004
1980
|
return unit.label.toLowerCase().localeCompare(child.label.toLowerCase()) < 0;
|
|
@@ -2095,32 +2071,66 @@ var getDropdownStyle = function (anchorRef, popupRef) {
|
|
|
2095
2071
|
}
|
|
2096
2072
|
return style;
|
|
2097
2073
|
};
|
|
2074
|
+
var noop = function () { };
|
|
2075
|
+
var isSameStyle = function (a, b) {
|
|
2076
|
+
return a.position === b.position &&
|
|
2077
|
+
a.top === b.top &&
|
|
2078
|
+
a.left === b.left &&
|
|
2079
|
+
a.right === b.right &&
|
|
2080
|
+
a.bottom === b.bottom;
|
|
2081
|
+
};
|
|
2098
2082
|
var usePopupPosition = function (anchorRef, popupRef, position) {
|
|
2099
2083
|
if (!anchorRef || !popupRef) {
|
|
2100
|
-
return [{},
|
|
2084
|
+
return [{}, noop];
|
|
2101
2085
|
}
|
|
2102
2086
|
var _a = useState(0), repeateRender = _a[0], setRepeateRender = _a[1];
|
|
2103
2087
|
var _b = useState({}), positionStyle = _b[0], setPositionStyle = _b[1];
|
|
2104
|
-
var
|
|
2088
|
+
var resizeObserverRef = useRef(null);
|
|
2089
|
+
var observedNodesRef = useRef({ popup: null, anchor: null });
|
|
2090
|
+
var calcPosition = useCallback(function () {
|
|
2105
2091
|
var newStyle = position !== undefined
|
|
2106
2092
|
? getContextualPopupStyle(anchorRef, popupRef, position)
|
|
2107
2093
|
: getDropdownStyle(anchorRef, popupRef);
|
|
2108
|
-
|
|
2109
|
-
|
|
2094
|
+
// Keep the same object when nothing changed, so React skips the re-render
|
|
2095
|
+
setPositionStyle(function (prev) { return (isSameStyle(prev, newStyle) ? prev : newStyle); });
|
|
2096
|
+
}, [anchorRef, popupRef, position]);
|
|
2097
|
+
var calcPositionRef = useRef(calcPosition);
|
|
2098
|
+
calcPositionRef.current = calcPosition;
|
|
2099
|
+
// Window listeners: mount only
|
|
2110
2100
|
useLayoutEffect(function () {
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
var resizeObserver = new ResizeObserver(calcPosition);
|
|
2115
|
-
resizeObserver.observe(popupRef.current);
|
|
2116
|
-
window.addEventListener('scroll', calcPosition, true);
|
|
2117
|
-
window.addEventListener('resize', calcPosition);
|
|
2101
|
+
var handler = function () { return calcPositionRef.current(); };
|
|
2102
|
+
window.addEventListener('scroll', handler, true);
|
|
2103
|
+
window.addEventListener('resize', handler);
|
|
2118
2104
|
return function () {
|
|
2119
|
-
|
|
2120
|
-
window.removeEventListener('
|
|
2121
|
-
window.removeEventListener('resize', calcPosition);
|
|
2105
|
+
window.removeEventListener('scroll', handler, true);
|
|
2106
|
+
window.removeEventListener('resize', handler);
|
|
2122
2107
|
};
|
|
2123
|
-
}, [
|
|
2108
|
+
}, []);
|
|
2109
|
+
// Follow the popup and anchor nodes that are really on screen.
|
|
2110
|
+
useLayoutEffect(function () {
|
|
2111
|
+
var _a;
|
|
2112
|
+
var popupNode = popupRef.current;
|
|
2113
|
+
var anchorNode = anchorRef.current;
|
|
2114
|
+
var observed = observedNodesRef.current;
|
|
2115
|
+
if (observed.popup === popupNode && observed.anchor === anchorNode)
|
|
2116
|
+
return;
|
|
2117
|
+
(_a = resizeObserverRef.current) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
2118
|
+
resizeObserverRef.current = null;
|
|
2119
|
+
observedNodesRef.current = { popup: popupNode, anchor: anchorNode };
|
|
2120
|
+
if (!popupNode || !anchorNode)
|
|
2121
|
+
return;
|
|
2122
|
+
var resizeObserver = new ResizeObserver(function () { return calcPositionRef.current(); });
|
|
2123
|
+
resizeObserver.observe(popupNode);
|
|
2124
|
+
resizeObserver.observe(anchorNode);
|
|
2125
|
+
resizeObserverRef.current = resizeObserver;
|
|
2126
|
+
calcPositionRef.current();
|
|
2127
|
+
});
|
|
2128
|
+
useLayoutEffect(function () { return function () {
|
|
2129
|
+
var _a;
|
|
2130
|
+
(_a = resizeObserverRef.current) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
2131
|
+
resizeObserverRef.current = null;
|
|
2132
|
+
observedNodesRef.current = { popup: null, anchor: null };
|
|
2133
|
+
}; }, []);
|
|
2124
2134
|
useEffect(function () {
|
|
2125
2135
|
// In projects where bianic-ui is installed,
|
|
2126
2136
|
// there is a delay in rendering styles,
|
|
@@ -2133,8 +2143,8 @@ var usePopupPosition = function (anchorRef, popupRef, position) {
|
|
|
2133
2143
|
return [positionStyle, calcPosition];
|
|
2134
2144
|
};
|
|
2135
2145
|
|
|
2136
|
-
|
|
2137
|
-
var isTopFlat = _a.isTopFlat, children = _a.children, className = _a.className, zIndex = _a.zIndex, menuRef = _a.menuRef, onClose = _a.onClose, onClickItem = _a.onClickItem,
|
|
2146
|
+
function MenuElementInner(_a) {
|
|
2147
|
+
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"]);
|
|
2138
2148
|
var radiusClass = "rounded-b-radius-sm ".concat(!isTopFlat && 'rounded-t-radius-sm');
|
|
2139
2149
|
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), Children.map(children, function (child) {
|
|
2140
2150
|
return React.isValidElement(child)
|
|
@@ -2145,11 +2155,10 @@ var MenuElement = forwardRef(function (_a, ref) {
|
|
|
2145
2155
|
})
|
|
2146
2156
|
: child;
|
|
2147
2157
|
})));
|
|
2148
|
-
}
|
|
2149
|
-
var
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
return null;
|
|
2158
|
+
}
|
|
2159
|
+
var MenuElement = forwardRef(MenuElementInner);
|
|
2160
|
+
function MenuContainer(_a) {
|
|
2161
|
+
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"]);
|
|
2153
2162
|
var MenuContainerRef = useRef(null);
|
|
2154
2163
|
var positionStyle = usePopupPosition(anchorRef, MenuContainerRef)[0];
|
|
2155
2164
|
var newStyle = useMemo(function () {
|
|
@@ -2174,27 +2183,32 @@ var MenuContainer = function (props) {
|
|
|
2174
2183
|
break;
|
|
2175
2184
|
}
|
|
2176
2185
|
return __assign(__assign({ zIndex: zIndex + 10 }, widthStyle), positionStyle);
|
|
2177
|
-
}, [positionStyle]);
|
|
2178
|
-
|
|
2186
|
+
}, [positionStyle, anchorRef, matchAnchorWidth, zIndex]);
|
|
2187
|
+
if (!open)
|
|
2188
|
+
return null;
|
|
2189
|
+
var menuElement = (React.createElement(MenuElement, __assign({ isTopFlat: isTopFlat, className: className, zIndex: zIndex, menuRef: MenuContainerRef, onClose: onClose, onClickItem: onClickItem, style: newStyle, onContextMenu: function (e) {
|
|
2179
2190
|
return onContextMenu ? onContextMenu(e) : e.preventDefault();
|
|
2180
|
-
} }, restProps)));
|
|
2191
|
+
} }, restProps), children));
|
|
2181
2192
|
return (React.createElement(React.Fragment, null,
|
|
2182
|
-
isWithOverlay && (
|
|
2193
|
+
isWithOverlay && (
|
|
2194
|
+
// Decorative dismiss-on-click backdrop; keyboard users close via Escape, not by tabbing to it
|
|
2195
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events
|
|
2196
|
+
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) {
|
|
2183
2197
|
return onContextMenu ? onContextMenu(e) : e.preventDefault();
|
|
2184
2198
|
} })),
|
|
2185
2199
|
(anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.current)
|
|
2186
2200
|
? createPortal(menuElement, document.body)
|
|
2187
2201
|
: menuElement));
|
|
2188
|
-
}
|
|
2189
|
-
MenuContainer.defaultProps = {
|
|
2190
|
-
isTopFlat: false,
|
|
2191
|
-
};
|
|
2202
|
+
}
|
|
2192
2203
|
|
|
2193
|
-
|
|
2204
|
+
function MenuContainerNoAnchorInner(propsComp, ref) {
|
|
2194
2205
|
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"]);
|
|
2195
2206
|
var radiusClass = "rounded-b-radius-sm ".concat(!isTopFlat && 'rounded-t-radius-sm');
|
|
2196
2207
|
return (open && (React.createElement(React.Fragment, null,
|
|
2197
|
-
isWithOverlay && (
|
|
2208
|
+
isWithOverlay && (
|
|
2209
|
+
// Decorative dismiss-on-click backdrop; keyboard users close via Escape, not by tabbing to it
|
|
2210
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events
|
|
2211
|
+
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 } })),
|
|
2198
2212
|
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: {
|
|
2199
2213
|
zIndex: zIndex + 10,
|
|
2200
2214
|
} }, restProps), Children.map(children, function (child) {
|
|
@@ -2207,15 +2221,13 @@ var MenuContainerNoAnchor = forwardRef(function MenuContainerNoAnchor(propsComp,
|
|
|
2207
2221
|
})
|
|
2208
2222
|
: child;
|
|
2209
2223
|
})))));
|
|
2210
|
-
}
|
|
2211
|
-
MenuContainerNoAnchor
|
|
2212
|
-
isTopFlat: false,
|
|
2213
|
-
};
|
|
2224
|
+
}
|
|
2225
|
+
var MenuContainerNoAnchor = forwardRef(MenuContainerNoAnchorInner);
|
|
2214
2226
|
|
|
2215
2227
|
function MenuItem(_a) {
|
|
2216
|
-
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,
|
|
2217
|
-
var
|
|
2218
|
-
var
|
|
2228
|
+
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"]);
|
|
2229
|
+
var _l = useState(false), isHovered = _l[0], setIsHovered = _l[1];
|
|
2230
|
+
var _m = useState(false), isLeft = _m[0], setIsLeft = _m[1];
|
|
2219
2231
|
var isWithChecked = isChecked !== undefined;
|
|
2220
2232
|
var leftPadding = isWithChecked ? 'pl-[5px]' : 'pl-[10px]';
|
|
2221
2233
|
var rightPadding = caption || children ? 'pr-[5px]' : 'pr-[10px]';
|
|
@@ -2251,37 +2263,14 @@ function MenuItem(_a) {
|
|
|
2251
2263
|
children === undefined && caption && (React.createElement("span", { className: "ml-[30px] whitespace-nowrap text-[11px] ".concat(disabled ? 'text-bia-coolgrey-light-50' : 'text-bia-coolgrey') }, caption)))),
|
|
2252
2264
|
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))));
|
|
2253
2265
|
}
|
|
2254
|
-
MenuItem.defaultProps = {
|
|
2255
|
-
className: '',
|
|
2256
|
-
onClick: function () { },
|
|
2257
|
-
};
|
|
2258
2266
|
|
|
2259
|
-
function Tooltip(props) {
|
|
2260
|
-
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;
|
|
2261
|
-
var timeout;
|
|
2262
|
-
var _d = useState(false), active = _d[0], setActive = _d[1];
|
|
2263
|
-
var anchorRef = useRef(null);
|
|
2264
|
-
var tooltipContainerRef = useRef(null);
|
|
2265
|
-
var showTip = function () {
|
|
2266
|
-
timeout = setTimeout(function () {
|
|
2267
|
-
setActive(true);
|
|
2268
|
-
}, delay || 400);
|
|
2269
|
-
};
|
|
2270
|
-
var hideTip = function () {
|
|
2271
|
-
clearInterval(timeout);
|
|
2272
|
-
setActive(false);
|
|
2273
|
-
};
|
|
2274
|
-
return (React.createElement("div", { className: "tooltip-wrapper relative inline-flex h-fit w-fit flex-col", onMouseEnter: showTip, onMouseLeave: hideTip, ref: anchorRef },
|
|
2275
|
-
children,
|
|
2276
|
-
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 }))));
|
|
2277
|
-
}
|
|
2278
2267
|
var TooltipItem = function (_a) {
|
|
2279
|
-
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
|
|
2268
|
+
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;
|
|
2280
2269
|
var positionStyle = usePopupPosition(anchorRef, tooltipContainerRef, direction)[0];
|
|
2281
|
-
var
|
|
2282
|
-
maxWidth: maxWidth
|
|
2270
|
+
var _d = useState({
|
|
2271
|
+
maxWidth: "".concat(maxWidth, "px"),
|
|
2283
2272
|
whiteSpace: 'nowrap',
|
|
2284
|
-
}), tooltipContainerStyle =
|
|
2273
|
+
}), tooltipContainerStyle = _d[0], setTooltipContainerStyle = _d[1];
|
|
2285
2274
|
var tooltipContainerElement = tooltipContainerRef === null || tooltipContainerRef === void 0 ? void 0 : tooltipContainerRef.current;
|
|
2286
2275
|
var scrollWidth = tooltipContainerElement === null || tooltipContainerElement === void 0 ? void 0 : tooltipContainerElement.scrollWidth; // Mendapatkan lebar konten aktual
|
|
2287
2276
|
var offsetWidth = tooltipContainerElement === null || tooltipContainerElement === void 0 ? void 0 : tooltipContainerElement.offsetWidth;
|
|
@@ -2308,23 +2297,36 @@ var TooltipItem = function (_a) {
|
|
|
2308
2297
|
var newWhiteSpace_1 = 'nowrap';
|
|
2309
2298
|
if (scrollWidth > maxWidthNumber ||
|
|
2310
2299
|
(offsetWidth === maxWidthNumber && isMultiLine)) {
|
|
2311
|
-
newWidth_1 = maxWidthNumber
|
|
2300
|
+
newWidth_1 = "".concat(maxWidthNumber, "px");
|
|
2312
2301
|
newWhiteSpace_1 = 'normal';
|
|
2313
2302
|
}
|
|
2314
2303
|
setTooltipContainerStyle(function (prev) { return (__assign(__assign({}, prev), { width: newWidth_1, whiteSpace: newWhiteSpace_1 })); });
|
|
2315
2304
|
}
|
|
2316
|
-
}, [content, maxWidth, scrollWidth, offsetHeight]);
|
|
2305
|
+
}, [content, maxWidth, scrollWidth, offsetWidth, offsetHeight]);
|
|
2317
2306
|
return 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);
|
|
2318
2307
|
};
|
|
2319
|
-
Tooltip
|
|
2320
|
-
delay:
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2308
|
+
function Tooltip(props) {
|
|
2309
|
+
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;
|
|
2310
|
+
var timeout;
|
|
2311
|
+
var _d = useState(false), active = _d[0], setActive = _d[1];
|
|
2312
|
+
var anchorRef = useRef(null);
|
|
2313
|
+
var tooltipContainerRef = useRef(null);
|
|
2314
|
+
var showTip = function () {
|
|
2315
|
+
timeout = setTimeout(function () {
|
|
2316
|
+
setActive(true);
|
|
2317
|
+
}, delay || 400);
|
|
2318
|
+
};
|
|
2319
|
+
var hideTip = function () {
|
|
2320
|
+
clearInterval(timeout);
|
|
2321
|
+
setActive(false);
|
|
2322
|
+
};
|
|
2323
|
+
return (React.createElement("div", { className: "tooltip-wrapper relative inline-flex h-fit w-fit flex-col", onMouseEnter: showTip, onMouseLeave: hideTip, ref: anchorRef },
|
|
2324
|
+
children,
|
|
2325
|
+
active && (React.createElement(TooltipItem, { anchorRef: anchorRef, direction: direction, content: content, tooltipContainerRef: tooltipContainerRef, bgColor: bgColor, textColor: textColor, zIndex: zIndex, className: className, style: style, maxWidth: maxWidth }))));
|
|
2326
|
+
}
|
|
2325
2327
|
|
|
2326
|
-
|
|
2327
|
-
var children = _a.children,
|
|
2328
|
+
function FormLabel(_a) {
|
|
2329
|
+
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;
|
|
2328
2330
|
var labelpointer = readOnly ? 'pointer-events-none' : '';
|
|
2329
2331
|
var labelSize = size === 'sm' ? 'text-size-sm' : 'text-size-md';
|
|
2330
2332
|
var labelFontWeight = fontWeight === 'semibold' ? 'font-semibold' : 'font-normal';
|
|
@@ -2335,18 +2337,10 @@ var FormLabel = function (_a) {
|
|
|
2335
2337
|
if (required)
|
|
2336
2338
|
return (React.createElement(Tooltip, { content: "Required", delay: 2000, direction: "right" }, labelContent));
|
|
2337
2339
|
return labelContent;
|
|
2338
|
-
}
|
|
2339
|
-
FormLabel.defaultProps = {
|
|
2340
|
-
className: '',
|
|
2341
|
-
htmlFor: undefined,
|
|
2342
|
-
required: false,
|
|
2343
|
-
readOnly: false,
|
|
2344
|
-
size: 'sm',
|
|
2345
|
-
fontWeight: 'semibold',
|
|
2346
|
-
};
|
|
2340
|
+
}
|
|
2347
2341
|
|
|
2348
2342
|
function PasswordIcon(_a) {
|
|
2349
|
-
var isShow = _a.isShow,
|
|
2343
|
+
var isShow = _a.isShow, showHandler = _a.showHandler, iconSize = _a.iconSize, disabled = _a.disabled;
|
|
2350
2344
|
var iconColor = disabled ? '#8b8ba6' : '#5E5EEA';
|
|
2351
2345
|
if (isShow) {
|
|
2352
2346
|
return (React.createElement(TbEye, { onClick: function () { return showHandler(false); }, style: {
|
|
@@ -2360,7 +2354,7 @@ function PasswordIcon(_a) {
|
|
|
2360
2354
|
function ValidationIcon(_a) {
|
|
2361
2355
|
var isValid = _a.isValid, iconSize = _a.iconSize;
|
|
2362
2356
|
if (isValid) {
|
|
2363
|
-
return
|
|
2357
|
+
return React.createElement(TbCheck, { className: "text-bia-green", style: { fontSize: iconSize } });
|
|
2364
2358
|
}
|
|
2365
2359
|
return React.createElement(TbX, { className: "text-bia-red", style: { fontSize: iconSize } });
|
|
2366
2360
|
}
|
|
@@ -2401,13 +2395,12 @@ var styleConfig = {
|
|
|
2401
2395
|
};
|
|
2402
2396
|
|
|
2403
2397
|
var TextInput = forwardRef(function (_a, ref) {
|
|
2404
|
-
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
|
|
2398
|
+
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"]);
|
|
2405
2399
|
var isTransparent = variant.includes('transparent');
|
|
2406
|
-
var
|
|
2407
|
-
var
|
|
2408
|
-
var
|
|
2409
|
-
? __assign(__assign({}, sizeConfig$d[size]), { iconPosition: "right-0 ", fieldSize: sizeConfig$d[size].fieldSize +
|
|
2410
|
-
" pe-[".concat(9 + sizeConfig$d[size].iconSize, "px]") }) : sizeConfig$d[size], iconSize = _t.iconSize, fieldSize = _t.fieldSize, iconPosition = _t.iconPosition;
|
|
2400
|
+
var _q = useState(false), isShow = _q[0], setIsShow = _q[1];
|
|
2401
|
+
var _r = styleConfig[variant], fieldStyle = _r.fieldStyle, iconStyle = _r.iconStyle;
|
|
2402
|
+
var _s = isTransparent
|
|
2403
|
+
? __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;
|
|
2411
2404
|
var borderStyle = isTransparent
|
|
2412
2405
|
? 'border-transparent bg-transparent' // customize border rule for transparent variant
|
|
2413
2406
|
: 'border border-bia-grey-dark-10 bg-primary-white';
|
|
@@ -2522,16 +2515,16 @@ Radio.defaultProps = {
|
|
|
2522
2515
|
};
|
|
2523
2516
|
Radio.displayName = 'Radio';
|
|
2524
2517
|
|
|
2525
|
-
|
|
2526
|
-
var
|
|
2518
|
+
function ResizeIcon(_a) {
|
|
2519
|
+
var _b = _a.className, className = _b === void 0 ? undefined : _b;
|
|
2527
2520
|
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) },
|
|
2528
2521
|
React.createElement("line", { x1: "0.646447", y1: "8.64645", x2: "8.64645", y2: "0.646447", stroke: "#DADEEB" }),
|
|
2529
|
-
React.createElement("line", { x1: "0.646447", y1: "8.64645", x2: "8.64645", y2: "0.646447", stroke: "black",
|
|
2522
|
+
React.createElement("line", { x1: "0.646447", y1: "8.64645", x2: "8.64645", y2: "0.646447", stroke: "black", strokeOpacity: "0.1" }),
|
|
2530
2523
|
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" }),
|
|
2531
|
-
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",
|
|
2524
|
+
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" }),
|
|
2532
2525
|
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" }),
|
|
2533
|
-
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",
|
|
2534
|
-
}
|
|
2526
|
+
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" })));
|
|
2527
|
+
}
|
|
2535
2528
|
|
|
2536
2529
|
var sizeConfig$b = {
|
|
2537
2530
|
md: {
|
|
@@ -2542,8 +2535,8 @@ var sizeConfig$b = {
|
|
|
2542
2535
|
},
|
|
2543
2536
|
};
|
|
2544
2537
|
|
|
2545
|
-
|
|
2546
|
-
var
|
|
2538
|
+
function TextAreaInner(_a, ref) {
|
|
2539
|
+
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"]);
|
|
2547
2540
|
var inputRow = rows !== null && rows !== void 0 ? rows : 4;
|
|
2548
2541
|
var inputClass = sizeConfig$b[size].inputClass;
|
|
2549
2542
|
var remainWords = maxLength ? maxLength - (value ? value.length : 0) : 0;
|
|
@@ -2574,19 +2567,8 @@ var TextArea = forwardRef(function (_a, ref) {
|
|
|
2574
2567
|
"/",
|
|
2575
2568
|
maxLength,
|
|
2576
2569
|
' ')))));
|
|
2577
|
-
}
|
|
2578
|
-
TextArea
|
|
2579
|
-
disabled: false,
|
|
2580
|
-
descText: '',
|
|
2581
|
-
id: '',
|
|
2582
|
-
size: 'md',
|
|
2583
|
-
label: '',
|
|
2584
|
-
placeholder: 'Write here ...',
|
|
2585
|
-
required: false,
|
|
2586
|
-
rows: 4,
|
|
2587
|
-
maxLength: undefined,
|
|
2588
|
-
value: '',
|
|
2589
|
-
};
|
|
2570
|
+
}
|
|
2571
|
+
var TextArea = forwardRef(TextAreaInner);
|
|
2590
2572
|
|
|
2591
2573
|
var sizeConfig$a = {
|
|
2592
2574
|
md: {
|
|
@@ -2605,8 +2587,8 @@ var sizeConfig$a = {
|
|
|
2605
2587
|
|
|
2606
2588
|
var sizeUnion$3 = ['md', 'sm', 'tn'];
|
|
2607
2589
|
function Checkbox(_a) {
|
|
2608
|
-
var _b = _a.disabled, disabled = _b === void 0 ? false : _b,
|
|
2609
|
-
var
|
|
2590
|
+
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"]);
|
|
2591
|
+
var _h = sizeConfig$a[validUnion(size, sizeUnion$3)], checkClass = _h.checkClass, labelClass = _h.labelClass;
|
|
2610
2592
|
var isValidIndeterminate = isIndeterminate && props.checked;
|
|
2611
2593
|
var backgroundClass = size === 'tn' && props.checked ? 'bg-bia-blue' : 'bg-bia-white';
|
|
2612
2594
|
var peerCheckedClass = size === 'tn' ? '' : 'peer-checked:border-2';
|
|
@@ -2616,14 +2598,6 @@ function Checkbox(_a) {
|
|
|
2616
2598
|
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 })))),
|
|
2617
2599
|
label && (React.createElement("label", { htmlFor: id, className: "ml-2 leading-4 text-primary-black ".concat(labelClass), style: { color: disabled ? '#8C8CA6' : '' } }, childrenElement(label)))));
|
|
2618
2600
|
}
|
|
2619
|
-
Checkbox.defaultProps = {
|
|
2620
|
-
disabled: false,
|
|
2621
|
-
id: '',
|
|
2622
|
-
size: 'md',
|
|
2623
|
-
checked: false,
|
|
2624
|
-
label: '',
|
|
2625
|
-
onChange: function () { },
|
|
2626
|
-
};
|
|
2627
2601
|
|
|
2628
2602
|
var sizeConfig$9 = {
|
|
2629
2603
|
md: {
|
|
@@ -2649,12 +2623,12 @@ var sizeConfig$8 = {
|
|
|
2649
2623
|
|
|
2650
2624
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2651
2625
|
function CustomDropdownItem(_a) {
|
|
2652
|
-
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,
|
|
2653
|
-
var
|
|
2654
|
-
var
|
|
2626
|
+
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;
|
|
2627
|
+
var _h = useState(false), isHovered = _h[0], setisHovered = _h[1];
|
|
2628
|
+
var _j = useState(false), isHoveredSubMenu = _j[0], setIsHoveredSubMenu = _j[1];
|
|
2655
2629
|
var isOpenDropdown = isHovered || isHoveredSubMenu;
|
|
2656
2630
|
var selectedClass = isSelected ? 'font-semibold' : 'font-normal';
|
|
2657
|
-
var
|
|
2631
|
+
var _k = sizeConfig$8[size], containerClass = _k.container, item = _k.item;
|
|
2658
2632
|
var itemClass = "".concat(item, " ").concat(selectedClass, " ").concat(className);
|
|
2659
2633
|
var isExistSubDropdown = options.length !== 0;
|
|
2660
2634
|
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 () { } },
|
|
@@ -2665,23 +2639,15 @@ function CustomDropdownItem(_a) {
|
|
|
2665
2639
|
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 }));
|
|
2666
2640
|
})))));
|
|
2667
2641
|
}
|
|
2668
|
-
CustomDropdownItem.defaultProps = {
|
|
2669
|
-
className: '',
|
|
2670
|
-
onClick: function () { },
|
|
2671
|
-
size: 'md',
|
|
2672
|
-
options: [],
|
|
2673
|
-
isSelected: false,
|
|
2674
|
-
caption: '',
|
|
2675
|
-
};
|
|
2676
2642
|
|
|
2677
2643
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2678
2644
|
function DefaultDropdownItem(_a) {
|
|
2679
|
-
var _b = _a.className, className = _b === void 0 ? '' : _b,
|
|
2680
|
-
var
|
|
2681
|
-
var
|
|
2645
|
+
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;
|
|
2646
|
+
var _h = useState(false), isHovered = _h[0], setisHovered = _h[1];
|
|
2647
|
+
var _j = useState(false), isHoveredSubMenu = _j[0], setIsHoveredSubMenu = _j[1];
|
|
2682
2648
|
var isOpenDropdown = isHovered || isHoveredSubMenu;
|
|
2683
2649
|
var selectedClass = isSelected ? 'font-semibold' : 'font-normal';
|
|
2684
|
-
var
|
|
2650
|
+
var _k = sizeConfig$8[size], containerClass = _k.container, item = _k.item;
|
|
2685
2651
|
var itemClass = "".concat(item, " ").concat(selectedClass, " ").concat(className);
|
|
2686
2652
|
var isExistSubDropdown = options.length !== 0;
|
|
2687
2653
|
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 () { } },
|
|
@@ -2694,92 +2660,6 @@ function DefaultDropdownItem(_a) {
|
|
|
2694
2660
|
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 }));
|
|
2695
2661
|
})))));
|
|
2696
2662
|
}
|
|
2697
|
-
DefaultDropdownItem.defaultProps = {
|
|
2698
|
-
className: '',
|
|
2699
|
-
onClick: function () { },
|
|
2700
|
-
size: 'md',
|
|
2701
|
-
options: [],
|
|
2702
|
-
isSelected: false,
|
|
2703
|
-
caption: '',
|
|
2704
|
-
};
|
|
2705
|
-
|
|
2706
|
-
var sizeUnion$2 = ['md', 'sm'];
|
|
2707
|
-
function SelectInput(_a) {
|
|
2708
|
-
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"]);
|
|
2709
|
-
var _m = useState(false), isOpen = _m[0], setIsOpen = _m[1];
|
|
2710
|
-
var validatedSize = validUnion(size, sizeUnion$2);
|
|
2711
|
-
var _o = sizeConfig$9[validatedSize], searchSize = _o.searchSize, iconSize = _o.iconSize;
|
|
2712
|
-
var inputRef = useRef(null);
|
|
2713
|
-
var isObjectOptionItem = false;
|
|
2714
|
-
if (options.every(function (item) { return typeof item === 'object' && item !== null; }))
|
|
2715
|
-
isObjectOptionItem = true;
|
|
2716
|
-
var selectedLabel = isObjectOptionItem && typeof selected === 'object' && selected !== null
|
|
2717
|
-
? selected.label
|
|
2718
|
-
: selected;
|
|
2719
|
-
var optionsRef = useRef(null);
|
|
2720
|
-
var descColor = 'text-primary-cool';
|
|
2721
|
-
var isExistValidation = isValid !== null && isValid !== undefined;
|
|
2722
|
-
if (!disabled && isExistValidation && isValid)
|
|
2723
|
-
descColor = 'text-bia-green';
|
|
2724
|
-
if (!disabled && isExistValidation && !isValid)
|
|
2725
|
-
descColor = 'text-bia-red';
|
|
2726
|
-
var disabledClass = disabled ? 'cursor-not-allowed' : '';
|
|
2727
|
-
return (React.createElement("div", { className: "bianic-fgc-container bianic-text-input-container field-group flex w-full flex-col gap-y-2" },
|
|
2728
|
-
label && (React.createElement(FormLabel, { htmlFor: id, required: required, readOnly: readOnly }, label)),
|
|
2729
|
-
React.createElement("div", { className: "group relative w-full ".concat(disabledClass) },
|
|
2730
|
-
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)),
|
|
2731
|
-
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)),
|
|
2732
|
-
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) {
|
|
2733
|
-
var isSelected = JSON.stringify(option) === JSON.stringify(selected);
|
|
2734
|
-
var optionLabel = isObjectOptionItem ? option.label : option;
|
|
2735
|
-
var optionCaption = isObjectOptionItem ? option.caption : '';
|
|
2736
|
-
return option.custom ? (React.createElement(CustomDropdownItem, { caption: optionCaption, size: validatedSize, isSelected: isSelected, onClick: function () {
|
|
2737
|
-
setSelected(option);
|
|
2738
|
-
setIsOpen(false);
|
|
2739
|
-
} }, option.custom)) : (React.createElement(DefaultDropdownItem, { label: optionLabel, caption: optionCaption, size: validatedSize, isSelected: isSelected, onClick: function () {
|
|
2740
|
-
setSelected(option);
|
|
2741
|
-
setIsOpen(false);
|
|
2742
|
-
} }));
|
|
2743
|
-
}))),
|
|
2744
|
-
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) {
|
|
2745
|
-
if (React.isValidElement(child)) {
|
|
2746
|
-
return React.cloneElement(child, {
|
|
2747
|
-
isSelected: selected && selected.id === child.props.value.id,
|
|
2748
|
-
onClick: function () {
|
|
2749
|
-
setSelected(child.props.value);
|
|
2750
|
-
setIsOpen(false);
|
|
2751
|
-
},
|
|
2752
|
-
});
|
|
2753
|
-
}
|
|
2754
|
-
return child;
|
|
2755
|
-
})))),
|
|
2756
|
-
descText && (React.createElement("span", { className: "bianic-livesearch-desc bianic-text-input-desc text-xs ".concat(descColor) }, descText))));
|
|
2757
|
-
}
|
|
2758
|
-
SelectInput.defaultProps = {
|
|
2759
|
-
descText: '',
|
|
2760
|
-
disabled: false,
|
|
2761
|
-
id: '',
|
|
2762
|
-
size: 'md',
|
|
2763
|
-
label: '',
|
|
2764
|
-
required: false,
|
|
2765
|
-
selected: {},
|
|
2766
|
-
setSelected: function () { },
|
|
2767
|
-
};
|
|
2768
|
-
|
|
2769
|
-
var sizeConfig$7 = {
|
|
2770
|
-
md: {
|
|
2771
|
-
iconClass: 'right-[10px]',
|
|
2772
|
-
iconSize: '18',
|
|
2773
|
-
inputClass: 'text-size-base placeholder:text-size-base px-2.5 h-10',
|
|
2774
|
-
optionClass: 'text-size-base px-2.5 py-[9.5px]',
|
|
2775
|
-
},
|
|
2776
|
-
sm: {
|
|
2777
|
-
iconClass: 'right-[7px]',
|
|
2778
|
-
iconSize: '14',
|
|
2779
|
-
inputClass: 'text-size-sm placeholder:text-size-sm px-1.5 h-[30px]',
|
|
2780
|
-
optionClass: 'text-size-sm px-[10px] pt-[6.5px] pb-[5.5px]',
|
|
2781
|
-
},
|
|
2782
|
-
};
|
|
2783
2663
|
|
|
2784
2664
|
var containerSizeConfig$1 = {
|
|
2785
2665
|
sm: 'min-w-[72px]',
|
|
@@ -2797,7 +2677,7 @@ var fontConfig = {
|
|
|
2797
2677
|
var DropdownElement = forwardRef(function (_a, ref) {
|
|
2798
2678
|
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"]);
|
|
2799
2679
|
var radiusClass = "rounded-b-radius-sm ".concat(!isTopFlat && 'rounded-t-radius-sm');
|
|
2800
|
-
var sizeClass = containerSizeConfig$1[size] || containerSizeConfig$1
|
|
2680
|
+
var sizeClass = containerSizeConfig$1[size] || containerSizeConfig$1.md;
|
|
2801
2681
|
var containerClass = "".concat(sizeClass, " ").concat(radiusClass, " ").concat(className);
|
|
2802
2682
|
var handleClickDrpdownItem = function (e, val) {
|
|
2803
2683
|
onClickItem(e, val);
|
|
@@ -2814,10 +2694,14 @@ var DropdownElement = forwardRef(function (_a, ref) {
|
|
|
2814
2694
|
: child;
|
|
2815
2695
|
})));
|
|
2816
2696
|
});
|
|
2817
|
-
|
|
2697
|
+
function DropdownContainer(propsComp) {
|
|
2818
2698
|
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"]);
|
|
2819
2699
|
var dropdownRef = useRef(null);
|
|
2820
|
-
var
|
|
2700
|
+
var _j = usePopupPosition(anchorRef, dropdownRef), positionStyle = _j[0], recalcPosition = _j[1];
|
|
2701
|
+
useLayoutEffect(function () {
|
|
2702
|
+
if (open)
|
|
2703
|
+
recalcPosition();
|
|
2704
|
+
}, [open, recalcPosition]);
|
|
2821
2705
|
var newStyle = useMemo(function () {
|
|
2822
2706
|
var _a, _b, _c;
|
|
2823
2707
|
if (!(anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.current)) {
|
|
@@ -2841,30 +2725,124 @@ var DropdownContainer = function (propsComp) {
|
|
|
2841
2725
|
break;
|
|
2842
2726
|
}
|
|
2843
2727
|
return __assign(__assign({ zIndex: zIndex + 10 }, widthStyle), positionStyle);
|
|
2844
|
-
}, [positionStyle]);
|
|
2728
|
+
}, [positionStyle, anchorRef, matchAnchorWidth, zIndex]);
|
|
2845
2729
|
var displayClass = open ? 'block' : 'hidden';
|
|
2846
|
-
var dropdownElement = (React.createElement(DropdownElement, __assign({ ref: dropdownRef, isTopFlat: isTopFlat,
|
|
2730
|
+
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));
|
|
2847
2731
|
return (React.createElement(React.Fragment, null,
|
|
2848
|
-
isWithOverlay && (
|
|
2732
|
+
isWithOverlay && (
|
|
2733
|
+
// Decorative dismiss-on-click backdrop; keyboard users close via Escape, not by tabbing to it
|
|
2734
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events
|
|
2735
|
+
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(); } })),
|
|
2849
2736
|
(anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.current)
|
|
2850
2737
|
? createPortal(dropdownElement, document.body)
|
|
2851
2738
|
: dropdownElement));
|
|
2852
|
-
}
|
|
2739
|
+
}
|
|
2853
2740
|
DropdownContainer.defaultProps = {
|
|
2854
2741
|
isTopFlat: false,
|
|
2855
2742
|
};
|
|
2856
2743
|
|
|
2857
|
-
var
|
|
2744
|
+
var isObjectWithLabel = function (value) {
|
|
2745
|
+
return typeof value === 'object' && value !== null && 'label' in value;
|
|
2746
|
+
};
|
|
2747
|
+
var getItemLabel = function (value) {
|
|
2748
|
+
var _a;
|
|
2749
|
+
return isObjectWithLabel(value) ? ((_a = value.label) !== null && _a !== void 0 ? _a : '') : String(value !== null && value !== void 0 ? value : '');
|
|
2750
|
+
};
|
|
2751
|
+
|
|
2752
|
+
var sizeUnion$2 = ['md', 'sm'];
|
|
2753
|
+
function SelectInput(_a) {
|
|
2754
|
+
var _b;
|
|
2755
|
+
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"]);
|
|
2756
|
+
var _u = useState(false), isOpen = _u[0], setIsOpen = _u[1];
|
|
2757
|
+
var validatedSize = validUnion(size, sizeUnion$2);
|
|
2758
|
+
var _v = sizeConfig$9[validatedSize], searchSize = _v.searchSize, iconSize = _v.iconSize;
|
|
2759
|
+
var inputRef = useRef(null);
|
|
2760
|
+
var selectedLabel = selected !== undefined && isObjectWithLabel(selected)
|
|
2761
|
+
? ((_b = selected.label) !== null && _b !== void 0 ? _b : '')
|
|
2762
|
+
: selected;
|
|
2763
|
+
var optionsRef = useRef(null);
|
|
2764
|
+
var descColor = 'text-primary-cool';
|
|
2765
|
+
var isExistValidation = isValid !== null && isValid !== undefined;
|
|
2766
|
+
if (!disabled && isExistValidation && isValid)
|
|
2767
|
+
descColor = 'text-bia-green';
|
|
2768
|
+
if (!disabled && isExistValidation && !isValid)
|
|
2769
|
+
descColor = 'text-bia-red';
|
|
2770
|
+
var disabledClass = disabled ? 'cursor-not-allowed' : '';
|
|
2771
|
+
return (React.createElement("div", { className: "bianic-fgc-container bianic-text-input-container field-group flex w-full flex-col gap-y-2" },
|
|
2772
|
+
label && (React.createElement(FormLabel, { htmlFor: id, required: required, readOnly: readOnly }, label)),
|
|
2773
|
+
React.createElement("div", { className: "group relative w-full ".concat(disabledClass) },
|
|
2774
|
+
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)),
|
|
2775
|
+
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)),
|
|
2776
|
+
children === undefined && isOpen && (
|
|
2777
|
+
// Consumer-provided click-catcher; each rendered option below is its own interactive control
|
|
2778
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events
|
|
2779
|
+
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) {
|
|
2780
|
+
var isSelected = JSON.stringify(option) === JSON.stringify(selected);
|
|
2781
|
+
var optionCaption = isObjectWithLabel(option)
|
|
2782
|
+
? option.caption
|
|
2783
|
+
: '';
|
|
2784
|
+
return isObjectWithLabel(option) && option.custom ? (React.createElement(CustomDropdownItem, { caption: optionCaption, size: validatedSize, isSelected: isSelected, onClick: function () {
|
|
2785
|
+
setSelected === null || setSelected === void 0 ? void 0 : setSelected(option);
|
|
2786
|
+
setIsOpen(false);
|
|
2787
|
+
} }, option.custom)) : (React.createElement(DefaultDropdownItem, { label: getItemLabel(option), caption: optionCaption, size: validatedSize, isSelected: isSelected, onClick: function () {
|
|
2788
|
+
setSelected === null || setSelected === void 0 ? void 0 : setSelected(option);
|
|
2789
|
+
setIsOpen(false);
|
|
2790
|
+
} }));
|
|
2791
|
+
}))),
|
|
2792
|
+
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) {
|
|
2793
|
+
if (React.isValidElement(child)) {
|
|
2794
|
+
// Consumer-supplied children are expected to carry a `value`
|
|
2795
|
+
// prop matching the DropdownItem convention, but arbitrary
|
|
2796
|
+
// JSX children have no statically-known prop shape.
|
|
2797
|
+
var childValue_1 = child.props
|
|
2798
|
+
.value;
|
|
2799
|
+
return React.cloneElement(child, {
|
|
2800
|
+
isSelected: isObjectWithLabel(selected) &&
|
|
2801
|
+
isObjectWithLabel(childValue_1) &&
|
|
2802
|
+
selected.id === childValue_1.id,
|
|
2803
|
+
onClick: function () {
|
|
2804
|
+
// Same trust boundary as before: consumer children are
|
|
2805
|
+
// expected to always carry a value, matching the exact
|
|
2806
|
+
// runtime behavior this already had.
|
|
2807
|
+
setSelected === null || setSelected === void 0 ? void 0 : setSelected(childValue_1);
|
|
2808
|
+
setIsOpen(false);
|
|
2809
|
+
},
|
|
2810
|
+
});
|
|
2811
|
+
}
|
|
2812
|
+
return child;
|
|
2813
|
+
})))),
|
|
2814
|
+
descText && (React.createElement("span", { className: "bianic-livesearch-desc bianic-text-input-desc text-xs ".concat(descColor) }, descText))));
|
|
2815
|
+
}
|
|
2816
|
+
|
|
2817
|
+
var sizeConfig$7 = {
|
|
2818
|
+
md: {
|
|
2819
|
+
iconClass: 'right-[10px]',
|
|
2820
|
+
iconSize: '18',
|
|
2821
|
+
inputClass: 'text-size-base placeholder:text-size-base px-2.5 h-10',
|
|
2822
|
+
optionClass: 'text-size-base px-2.5 py-[9.5px]',
|
|
2823
|
+
},
|
|
2824
|
+
sm: {
|
|
2825
|
+
iconClass: 'right-[7px]',
|
|
2826
|
+
iconSize: '14',
|
|
2827
|
+
inputClass: 'text-size-sm placeholder:text-size-sm px-1.5 h-[30px]',
|
|
2828
|
+
optionClass: 'text-size-sm px-[10px] pt-[6.5px] pb-[5.5px]',
|
|
2829
|
+
},
|
|
2830
|
+
};
|
|
2831
|
+
|
|
2832
|
+
function DropdownContNoAnchorInner(propsComp, ref) {
|
|
2858
2833
|
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"]);
|
|
2859
2834
|
var radiusClass = "rounded-b-radius-sm ".concat(!isTopFlat && 'rounded-t-radius-sm');
|
|
2860
|
-
var sizeClass = containerSizeConfig$1[size] || containerSizeConfig$1
|
|
2835
|
+
var sizeClass = containerSizeConfig$1[size] || containerSizeConfig$1.md;
|
|
2861
2836
|
var containerClass = "".concat(sizeClass, " ").concat(radiusClass, " ").concat(className);
|
|
2862
2837
|
var handleClickDrpdownItem = function (e, val) {
|
|
2863
2838
|
onClickItem(e, val);
|
|
2864
2839
|
onClose();
|
|
2865
2840
|
};
|
|
2866
2841
|
return (open && (React.createElement(React.Fragment, null,
|
|
2867
|
-
isWithOverlay && (
|
|
2842
|
+
isWithOverlay && (
|
|
2843
|
+
// Decorative dismiss-on-click backdrop; keyboard users close via Escape, not by tabbing to it
|
|
2844
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events
|
|
2845
|
+
React.createElement("div", { className: "bianic-dropdown-overlay fixed left-0 top-0 h-screen w-screen", style: { zIndex: zIndex }, onClick: function () { return onClose(); } })),
|
|
2868
2846
|
React.createElement("div", __assign({ style: {
|
|
2869
2847
|
zIndex: zIndex + 10, // Ensure dropdown is above overlay
|
|
2870
2848
|
}, ref: ref, className: "bianic-dropdown-container bg-bia-white shadow-[0px_3px_20px_0px_rgba(0,0,0,0.20)] ".concat(containerClass) }, restProps), Children.map(children, function (child) {
|
|
@@ -2878,17 +2856,15 @@ var DropdownContNoAnchor = forwardRef(function DropdownContNoAnchor(propsComp, r
|
|
|
2878
2856
|
})
|
|
2879
2857
|
: child;
|
|
2880
2858
|
})))));
|
|
2881
|
-
}
|
|
2882
|
-
DropdownContNoAnchor
|
|
2883
|
-
isTopFlat: false,
|
|
2884
|
-
};
|
|
2859
|
+
}
|
|
2860
|
+
var DropdownContNoAnchor = forwardRef(DropdownContNoAnchorInner);
|
|
2885
2861
|
|
|
2886
2862
|
function DropdownItem(_a) {
|
|
2887
|
-
var
|
|
2888
|
-
var
|
|
2889
|
-
var
|
|
2890
|
-
var fontClass = fontConfig[size] || fontConfig
|
|
2891
|
-
var itemSizeClass = itemSizeConfig[size] || itemSizeConfig
|
|
2863
|
+
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"]);
|
|
2864
|
+
var _k = useState(false), isHovered = _k[0], setIsHovered = _k[1];
|
|
2865
|
+
var _l = useState(false), isLeft = _l[0], setIsLeft = _l[1];
|
|
2866
|
+
var fontClass = fontConfig[size] || fontConfig.md;
|
|
2867
|
+
var itemSizeClass = itemSizeConfig[size] || itemSizeConfig.md;
|
|
2892
2868
|
var itemClass = "".concat(itemSizeClass, " ").concat(fontClass, " ").concat(className);
|
|
2893
2869
|
var chevronSize = size === 'sm' ? 14 : 18;
|
|
2894
2870
|
var DropdownContRef = useRef(null);
|
|
@@ -2913,12 +2889,8 @@ function DropdownItem(_a) {
|
|
|
2913
2889
|
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),
|
|
2914
2890
|
content,
|
|
2915
2891
|
React.createElement("div", { className: "ml-auto flex items-center" }, children && (React.createElement(TbChevronRight, { className: "ml-[10px] text-bia-coolgrey", size: chevronSize })))),
|
|
2916
|
-
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,
|
|
2892
|
+
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))));
|
|
2917
2893
|
}
|
|
2918
|
-
DropdownItem.defaultProps = {
|
|
2919
|
-
className: '',
|
|
2920
|
-
onClickItem: function () { },
|
|
2921
|
-
};
|
|
2922
2894
|
|
|
2923
2895
|
var matchSearchTerm = function (content, term, variant) {
|
|
2924
2896
|
var lowerContent = content.toLowerCase();
|
|
@@ -2936,18 +2908,12 @@ var matchSearchTerm = function (content, term, variant) {
|
|
|
2936
2908
|
};
|
|
2937
2909
|
var filterOptions = function (options, searchTerm) {
|
|
2938
2910
|
return options === null || options === void 0 ? void 0 : options.filter(function (item) {
|
|
2939
|
-
|
|
2911
|
+
var label = typeof item === 'object' && item !== null ? item.label : String(item);
|
|
2912
|
+
return (label !== null && label !== void 0 ? label : '').toLowerCase().includes(searchTerm.toLowerCase());
|
|
2940
2913
|
});
|
|
2941
2914
|
};
|
|
2942
2915
|
|
|
2943
|
-
var
|
|
2944
|
-
return typeof value === 'object' && value !== null && 'label' in value;
|
|
2945
|
-
};
|
|
2946
|
-
var getItemLabel = function (value) {
|
|
2947
|
-
var _a;
|
|
2948
|
-
return isObjectWithLabel(value) ? (_a = value.label) !== null && _a !== void 0 ? _a : '' : String(value !== null && value !== void 0 ? value : '');
|
|
2949
|
-
};
|
|
2950
|
-
var processDropdownChildren$1 = function (nodes, currentSearchTerm, includeAllIfNoSearch, searchVariant, handleDropdownItemClick) {
|
|
2916
|
+
var processDropdownChildren$1 = function (nodes, currentSearchTerm, includeAllIfNoSearch, handleDropdownItemClick, searchVariant) {
|
|
2951
2917
|
if (searchVariant === void 0) { searchVariant = 'include'; }
|
|
2952
2918
|
return Children.map(nodes, function (child) {
|
|
2953
2919
|
if (!isValidElement(child) || child.type !== DropdownItem) {
|
|
@@ -2959,9 +2925,7 @@ var processDropdownChildren$1 = function (nodes, currentSearchTerm, includeAllIf
|
|
|
2959
2925
|
var isDisabled = itemProps.disabled;
|
|
2960
2926
|
// Filtering Logic
|
|
2961
2927
|
if (!includeAllIfNoSearch) {
|
|
2962
|
-
var itemValueStr =
|
|
2963
|
-
? itemValue.label
|
|
2964
|
-
: String(itemValue || '');
|
|
2928
|
+
var itemValueStr = itemValue !== undefined ? getItemLabel(itemValue) : '';
|
|
2965
2929
|
if (currentSearchTerm &&
|
|
2966
2930
|
!matchSearchTerm(itemValueStr, currentSearchTerm, searchVariant)) {
|
|
2967
2931
|
return null;
|
|
@@ -2969,18 +2933,24 @@ var processDropdownChildren$1 = function (nodes, currentSearchTerm, includeAllIf
|
|
|
2969
2933
|
}
|
|
2970
2934
|
// Process Nested Children
|
|
2971
2935
|
var clonedChildren = itemProps.children
|
|
2972
|
-
? processDropdownChildren$1(itemProps.children, currentSearchTerm, includeAllIfNoSearch,
|
|
2936
|
+
? processDropdownChildren$1(itemProps.children, currentSearchTerm, includeAllIfNoSearch, handleDropdownItemClick, searchVariant)
|
|
2973
2937
|
: null;
|
|
2974
2938
|
// Clone and Inject Click Handler
|
|
2939
|
+
// DropdownItem renders a <button>, but handleDropdownItemClick's event
|
|
2940
|
+
// type is HTMLDivElement to match its other callers (the event's
|
|
2941
|
+
// specific target type is never used here, only forwarded).
|
|
2975
2942
|
return cloneElement(child, {
|
|
2976
2943
|
onClick: function (e) {
|
|
2944
|
+
var divEvent = e;
|
|
2977
2945
|
if (!isDisabled) {
|
|
2978
2946
|
if (itemValue === undefined &&
|
|
2979
2947
|
typeof itemProps.content === 'string') {
|
|
2980
|
-
|
|
2948
|
+
handleDropdownItemClick(divEvent, itemContent);
|
|
2949
|
+
return;
|
|
2981
2950
|
}
|
|
2982
2951
|
if (typeof itemValue === 'object' || itemValue !== undefined) {
|
|
2983
|
-
|
|
2952
|
+
handleDropdownItemClick(divEvent, itemValue);
|
|
2953
|
+
return;
|
|
2984
2954
|
}
|
|
2985
2955
|
}
|
|
2986
2956
|
if (itemProps.onClickItem) {
|
|
@@ -2995,12 +2965,12 @@ var processRenderedChildren$1 = function (children, searchTerm, searchVariant, h
|
|
|
2995
2965
|
var renderedChildren = null;
|
|
2996
2966
|
var hasFilteredResults = false;
|
|
2997
2967
|
if (searchTerm) {
|
|
2998
|
-
renderedChildren = processDropdownChildren$1(children, searchTerm, false,
|
|
2968
|
+
renderedChildren = processDropdownChildren$1(children, searchTerm, false, handleDropdownItemClick, searchVariant);
|
|
2999
2969
|
hasFilteredResults =
|
|
3000
2970
|
Children.toArray(renderedChildren).filter(Boolean).length > 0;
|
|
3001
2971
|
}
|
|
3002
2972
|
else {
|
|
3003
|
-
renderedChildren = processDropdownChildren$1(children, '', true,
|
|
2973
|
+
renderedChildren = processDropdownChildren$1(children, '', true, handleDropdownItemClick, searchVariant);
|
|
3004
2974
|
hasFilteredResults =
|
|
3005
2975
|
Children.toArray(renderedChildren).filter(Boolean).length > 0;
|
|
3006
2976
|
}
|
|
@@ -3010,12 +2980,12 @@ var processRenderedChildren$1 = function (children, searchTerm, searchVariant, h
|
|
|
3010
2980
|
var useLiveSearch$1 = function (_a) {
|
|
3011
2981
|
var value = _a.value, setValue = _a.setValue, onChangeText = _a.onChangeText, dropContOnClickItem = _a.dropContOnClickItem;
|
|
3012
2982
|
var _b = useState(false), isOpen = _b[0], setIsOpen = _b[1];
|
|
3013
|
-
var _c = useState(
|
|
2983
|
+
var _c = useState(getItemLabel(value)), searchTerm = _c[0], setSearchTerm = _c[1];
|
|
3014
2984
|
useEffect(function () {
|
|
3015
2985
|
if (!isOpen && searchTerm !== getItemLabel(value)) {
|
|
3016
2986
|
setSearchTerm(getItemLabel(value));
|
|
3017
2987
|
}
|
|
3018
|
-
}, [isOpen, value]);
|
|
2988
|
+
}, [isOpen, value, searchTerm]);
|
|
3019
2989
|
useEffect(function () {
|
|
3020
2990
|
setSearchTerm(getItemLabel(value));
|
|
3021
2991
|
}, [value]);
|
|
@@ -3042,16 +3012,16 @@ var useLiveSearch$1 = function (_a) {
|
|
|
3042
3012
|
};
|
|
3043
3013
|
|
|
3044
3014
|
function LiveSearch(_a) {
|
|
3045
|
-
var _b = _a.autoComplete, autoComplete = _b === void 0 ? 'off' : _b, _c = _a.children, children = _c === void 0 ? undefined : _c,
|
|
3015
|
+
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;
|
|
3046
3016
|
var inputRef = useRef(null);
|
|
3047
|
-
var
|
|
3017
|
+
var _u = useLiveSearch$1({
|
|
3048
3018
|
value: value,
|
|
3049
3019
|
setValue: setValue,
|
|
3050
3020
|
onChangeText: onChangeText,
|
|
3051
3021
|
dropContOnClickItem: dropContProps === null || dropContProps === void 0 ? void 0 : dropContProps.onClickItem,
|
|
3052
|
-
}), isOpen =
|
|
3053
|
-
var
|
|
3054
|
-
var
|
|
3022
|
+
}), isOpen = _u.isOpen, setIsOpen = _u.setIsOpen, searchTerm = _u.searchTerm, handleInputChange = _u.handleInputChange, handleDropdownItemClick = _u.handleDropdownItemClick;
|
|
3023
|
+
var _v = sizeConfig$7[size], iconClass = _v.iconClass, iconSize = _v.iconSize, inputClass = _v.inputClass;
|
|
3024
|
+
var _w = dropContProps || {}, dropContClassName = _w.className; _w.onClickItem; _w.anchorRef; var restDropContProps = __rest(_w, ["className", "onClickItem", "anchorRef"]);
|
|
3055
3025
|
var isSearchTermExist = searchTerm && searchTerm !== '';
|
|
3056
3026
|
var descColor = 'text-primary-cool';
|
|
3057
3027
|
var isExistValidation = isValid !== null && isValid !== undefined;
|
|
@@ -3059,8 +3029,8 @@ function LiveSearch(_a) {
|
|
|
3059
3029
|
descColor = 'text-bia-green';
|
|
3060
3030
|
if (!disabled && isExistValidation && !isValid)
|
|
3061
3031
|
descColor = 'text-bia-red';
|
|
3062
|
-
var filteredOptions = filterOptions(options || [], value
|
|
3063
|
-
var
|
|
3032
|
+
var filteredOptions = filterOptions(options || [], getItemLabel(value));
|
|
3033
|
+
var _x = processRenderedChildren$1(children, searchTerm, searchVariant, handleDropdownItemClick), renderedChildren = _x.renderedChildren, hasFilteredResults = _x.hasFilteredResults;
|
|
3064
3034
|
var disabledClass = disabled ? 'cursor-not-allowed' : '';
|
|
3065
3035
|
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" },
|
|
3066
3036
|
label && (React.createElement(FormLabel, { htmlFor: id, required: required, readOnly: readOnly }, label)),
|
|
@@ -3071,19 +3041,25 @@ function LiveSearch(_a) {
|
|
|
3071
3041
|
}, type: "text", readOnly: readOnly, autoComplete: autoComplete }),
|
|
3072
3042
|
React.createElement("div", { className: "absolute inset-y-0 flex items-center pl-3 ".concat(iconClass), style: {
|
|
3073
3043
|
zIndex: (restDropContProps === null || restDropContProps === void 0 ? void 0 : restDropContProps.zIndex)
|
|
3074
|
-
?
|
|
3044
|
+
? restDropContProps.zIndex + 20
|
|
3075
3045
|
: 20,
|
|
3076
3046
|
} },
|
|
3077
3047
|
!isSearchTermExist && (React.createElement(TbZoom, { className: "text-primary-black", style: { fontSize: iconSize } })),
|
|
3078
|
-
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 },
|
|
3048
|
+
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 },
|
|
3079
3049
|
React.createElement(TbX, { className: "text-primary-black", style: { fontSize: iconSize } }))),
|
|
3080
3050
|
isSearchTermExist && onChangeButton),
|
|
3081
|
-
children === undefined && isOpen && (
|
|
3082
|
-
|
|
3083
|
-
|
|
3051
|
+
children === undefined && isOpen && (
|
|
3052
|
+
// Consumer-provided click-catcher; each rendered option below is its own interactive control
|
|
3053
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events
|
|
3054
|
+
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) {
|
|
3055
|
+
var isSelected = isObjectWithLabel(value) &&
|
|
3056
|
+
isObjectWithLabel(option) &&
|
|
3057
|
+
value.id &&
|
|
3058
|
+
option.id === value.id;
|
|
3059
|
+
return isObjectWithLabel(option) && option.custom ? (React.createElement(CustomDropdownItem, { size: size, isSelected: isSelected, className: dropContClassName, onClick: function () {
|
|
3084
3060
|
setValue(option);
|
|
3085
3061
|
setIsOpen(false);
|
|
3086
|
-
} }, option.custom)) : (React.createElement(DefaultDropdownItem, { label: option
|
|
3062
|
+
} }, option.custom)) : (React.createElement(DefaultDropdownItem, { label: getItemLabel(option), size: size, isSelected: isSelected, className: dropContClassName, onClick: function () {
|
|
3087
3063
|
setValue(option);
|
|
3088
3064
|
setIsOpen(false);
|
|
3089
3065
|
} }));
|
|
@@ -3094,19 +3070,6 @@ function LiveSearch(_a) {
|
|
|
3094
3070
|
searchTerm.length > 0 && (React.createElement(DropdownItem, { content: React.createElement("div", { className: "px-4 py-2 text-gray-500" }, "Tidak ada hasil ditemukan.") }))))),
|
|
3095
3071
|
descText && (React.createElement("span", { className: "bianic-livesearch-desc bianic-text-input-desc text-xs ".concat(descColor) }, descText))));
|
|
3096
3072
|
}
|
|
3097
|
-
LiveSearch.defaultProps = {
|
|
3098
|
-
descText: '',
|
|
3099
|
-
disabled: false,
|
|
3100
|
-
id: '',
|
|
3101
|
-
size: 'md',
|
|
3102
|
-
label: '',
|
|
3103
|
-
placeholder: '',
|
|
3104
|
-
required: false,
|
|
3105
|
-
options: [],
|
|
3106
|
-
setValue: function () { },
|
|
3107
|
-
value: {},
|
|
3108
|
-
readonly: false,
|
|
3109
|
-
};
|
|
3110
3073
|
|
|
3111
3074
|
var sizeConfig$6 = {
|
|
3112
3075
|
md: {
|
|
@@ -3121,14 +3084,20 @@ var sizeConfig$6 = {
|
|
|
3121
3084
|
},
|
|
3122
3085
|
};
|
|
3123
3086
|
|
|
3087
|
+
var isTagOption = function (value) {
|
|
3088
|
+
return typeof value === 'object' && value !== null && 'label' in value;
|
|
3089
|
+
};
|
|
3090
|
+
var getTagLabel = function (value) {
|
|
3091
|
+
return isTagOption(value) ? value.label : value;
|
|
3092
|
+
};
|
|
3093
|
+
|
|
3124
3094
|
var isMatchValue = function (existingValue, optionValue) {
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
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); });
|
|
3095
|
+
if (isTagOption(optionValue)) {
|
|
3096
|
+
return existingValue === null || existingValue === void 0 ? void 0 : existingValue.some(function (value) { return isTagOption(value) && value.label === optionValue.label; });
|
|
3128
3097
|
}
|
|
3129
3098
|
return existingValue === null || existingValue === void 0 ? void 0 : existingValue.includes(optionValue);
|
|
3130
3099
|
};
|
|
3131
|
-
var processDropdownChildren = function (nodes, currentSearchTerm, includeAllIfNoSearch,
|
|
3100
|
+
var processDropdownChildren = function (nodes, currentSearchTerm, includeAllIfNoSearch, handleDropdownItemClick, existingValues, searchVariant) {
|
|
3132
3101
|
if (searchVariant === void 0) { searchVariant = 'include'; }
|
|
3133
3102
|
return Children.map(nodes, function (child) {
|
|
3134
3103
|
if (!isValidElement(child) || child.type !== DropdownItem) {
|
|
@@ -3136,11 +3105,15 @@ var processDropdownChildren = function (nodes, currentSearchTerm, includeAllIfNo
|
|
|
3136
3105
|
}
|
|
3137
3106
|
var itemProps = child.props;
|
|
3138
3107
|
var itemContent = typeof itemProps.content === 'string' ? itemProps.content : '';
|
|
3108
|
+
// DropdownItem's own `value` prop is typed generically (Dropdown's
|
|
3109
|
+
// OptionValue); within TagLabelInput it's always actually a TagValue.
|
|
3139
3110
|
var itemValue = itemProps.value;
|
|
3140
3111
|
var isDisabled = itemProps.disabled;
|
|
3141
3112
|
// Filtering Logic
|
|
3142
|
-
var itemValueStr =
|
|
3143
|
-
if ((existingValues === null || existingValues === void 0 ? void 0 : existingValues.length) > 0 &&
|
|
3113
|
+
var itemValueStr = itemValue !== undefined ? getTagLabel(itemValue) : '';
|
|
3114
|
+
if ((existingValues === null || existingValues === void 0 ? void 0 : existingValues.length) > 0 &&
|
|
3115
|
+
itemValue !== undefined &&
|
|
3116
|
+
isMatchValue(existingValues, itemValue)) {
|
|
3144
3117
|
return null;
|
|
3145
3118
|
}
|
|
3146
3119
|
if (!includeAllIfNoSearch) {
|
|
@@ -3151,18 +3124,24 @@ var processDropdownChildren = function (nodes, currentSearchTerm, includeAllIfNo
|
|
|
3151
3124
|
}
|
|
3152
3125
|
// Process Nested Children
|
|
3153
3126
|
var clonedChildren = itemProps.children
|
|
3154
|
-
? processDropdownChildren(itemProps.children, currentSearchTerm, includeAllIfNoSearch,
|
|
3127
|
+
? processDropdownChildren(itemProps.children, currentSearchTerm, includeAllIfNoSearch, handleDropdownItemClick, existingValues, searchVariant)
|
|
3155
3128
|
: null;
|
|
3156
3129
|
// Clone and Inject Click Handler
|
|
3130
|
+
// DropdownItem renders a <button>, but handleDropdownItemClick's event
|
|
3131
|
+
// type is HTMLDivElement to match its other callers (the event's
|
|
3132
|
+
// specific target type is never used here, only forwarded).
|
|
3157
3133
|
return cloneElement(child, {
|
|
3158
3134
|
onClick: function (e) {
|
|
3135
|
+
var divEvent = e;
|
|
3159
3136
|
if (!isDisabled) {
|
|
3160
3137
|
if (itemValue === undefined &&
|
|
3161
3138
|
typeof itemProps.content === 'string') {
|
|
3162
|
-
|
|
3139
|
+
handleDropdownItemClick(divEvent, itemContent);
|
|
3140
|
+
return;
|
|
3163
3141
|
}
|
|
3164
3142
|
if (typeof itemValue === 'object' || itemValue !== undefined) {
|
|
3165
|
-
|
|
3143
|
+
handleDropdownItemClick(divEvent, itemValue);
|
|
3144
|
+
return;
|
|
3166
3145
|
}
|
|
3167
3146
|
}
|
|
3168
3147
|
if (itemProps.onClickItem) {
|
|
@@ -3176,12 +3155,11 @@ var processDropdownChildren = function (nodes, currentSearchTerm, includeAllIfNo
|
|
|
3176
3155
|
var processRenderedChildren = function (children, searchTerm, searchVariant, handleDropdownItemClick, existingValues) {
|
|
3177
3156
|
var renderedChildren = null;
|
|
3178
3157
|
var hasFilteredResults = false;
|
|
3179
|
-
if ((existingValues === null || existingValues === void 0 ? void 0 : existingValues.length) > 0) ;
|
|
3180
3158
|
if (searchTerm || (existingValues === null || existingValues === void 0 ? void 0 : existingValues.length) > 0) {
|
|
3181
|
-
renderedChildren = processDropdownChildren(children, searchTerm, false,
|
|
3159
|
+
renderedChildren = processDropdownChildren(children, searchTerm, false, handleDropdownItemClick, existingValues, searchVariant);
|
|
3182
3160
|
}
|
|
3183
3161
|
else {
|
|
3184
|
-
renderedChildren = processDropdownChildren(children, '', true,
|
|
3162
|
+
renderedChildren = processDropdownChildren(children, '', true, handleDropdownItemClick, [], searchVariant);
|
|
3185
3163
|
}
|
|
3186
3164
|
hasFilteredResults =
|
|
3187
3165
|
Children.toArray(renderedChildren).filter(Boolean).length > 0;
|
|
@@ -3201,9 +3179,11 @@ var useLiveSearch = function (_a) {
|
|
|
3201
3179
|
var handleDropdownItemClick = useCallback(function (event, clickedValue) {
|
|
3202
3180
|
dropContOnClickItem === null || dropContOnClickItem === void 0 ? void 0 : dropContOnClickItem(event, clickedValue);
|
|
3203
3181
|
setSearchTerm('');
|
|
3182
|
+
// clickedValue comes from a rendered DropdownItem's `value` prop,
|
|
3183
|
+
// which isn't statically known to be exactly T (a subtype of TagValue)
|
|
3204
3184
|
setValue(__spreadArray(__spreadArray([], value, true), [clickedValue], false));
|
|
3205
3185
|
setIsOpen(false);
|
|
3206
|
-
}, [setValue, dropContOnClickItem]);
|
|
3186
|
+
}, [setValue, dropContOnClickItem, value]);
|
|
3207
3187
|
return {
|
|
3208
3188
|
isOpen: isOpen,
|
|
3209
3189
|
setIsOpen: setIsOpen,
|
|
@@ -3268,13 +3248,18 @@ var colorUnion = [
|
|
|
3268
3248
|
];
|
|
3269
3249
|
var sizeUnion$1 = ['md', 'sm', 'tn'];
|
|
3270
3250
|
var variantUnion = ['label', 'icon', 'closeable', 'monospace'];
|
|
3271
|
-
|
|
3272
|
-
var color = _a.color, _b = _a.size, size = _b === void 0 ? 'md' : _b,
|
|
3251
|
+
function TagLabel(_a) {
|
|
3252
|
+
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;
|
|
3253
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars
|
|
3254
|
+
_a.left;
|
|
3255
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars
|
|
3256
|
+
_a.right;
|
|
3257
|
+
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"]);
|
|
3273
3258
|
var validatedColor = validUnion(color, colorUnion);
|
|
3274
3259
|
var validatedSize = validUnion(size, sizeUnion$1);
|
|
3275
3260
|
var validatedVariant = validUnion(variant, variantUnion);
|
|
3276
3261
|
var containerRef = useRef(null);
|
|
3277
|
-
var
|
|
3262
|
+
var _r = useState(null), sizeCount = _r[0], setSizeCount = _r[1];
|
|
3278
3263
|
useEffect(function () {
|
|
3279
3264
|
if (variant === 'icon') {
|
|
3280
3265
|
// Get the size of the icon
|
|
@@ -3289,7 +3274,7 @@ var TagLabel = function (_a) {
|
|
|
3289
3274
|
else
|
|
3290
3275
|
setSizeCount(height);
|
|
3291
3276
|
}
|
|
3292
|
-
}, []);
|
|
3277
|
+
}, [variant]);
|
|
3293
3278
|
var isCloseable = validatedVariant === 'closeable';
|
|
3294
3279
|
var defaultIconSize = validatedSize === 'md' ? 'text-xl' : 'text-sm';
|
|
3295
3280
|
var borderColorRules = outlineColor || bgColor;
|
|
@@ -3302,24 +3287,25 @@ var TagLabel = function (_a) {
|
|
|
3302
3287
|
? "bg-bia-".concat(bgColor, " text-bia-").concat(textColor, " border border-bia-").concat(borderColorRules)
|
|
3303
3288
|
: colorConfig$1[validatedColor];
|
|
3304
3289
|
var blockclass = isBlock && validatedVariant !== 'icon' ? 'w-full' : "w-fit";
|
|
3305
|
-
var maxWidthStyle = !isBlock ? maxWidth
|
|
3290
|
+
var maxWidthStyle = !isBlock ? "".concat(maxWidth, "px") : '';
|
|
3306
3291
|
var alignTextClass = isBlock ? 'text-center' : 'text-left';
|
|
3307
3292
|
var fontClass = validatedVariant === 'monospace' ? 'font-sans-code' : 'font-segoe pb-[1px]';
|
|
3308
3293
|
var textClass = "".concat(alignTextClass, " ").concat(fontClass);
|
|
3309
3294
|
var containerClass = "".concat(sizeClass, " ").concat(colorClass, " ").concat(roundedClass, " ").concat(isCloseableClass, " ").concat(blockclass);
|
|
3310
|
-
var closeColor = validatedColor
|
|
3311
|
-
|
|
3295
|
+
var closeColor = closeColorConfig[validatedColor];
|
|
3296
|
+
if (validatedColor === 'custom') {
|
|
3297
|
+
closeColor = isDark
|
|
3312
3298
|
? "bg-bia-white-transparent-50 text-bia-".concat(bgColor)
|
|
3313
|
-
: "bg-bia-grey-dark-30 text-bia-".concat(bgColor)
|
|
3314
|
-
|
|
3299
|
+
: "bg-bia-grey-dark-30 text-bia-".concat(bgColor);
|
|
3300
|
+
}
|
|
3315
3301
|
var closeClass = "".concat(closeColor, " ").concat(closeSizeConfig[validatedSize]);
|
|
3316
3302
|
var isOpen = isCloseable ? open : true;
|
|
3317
3303
|
return (isOpen && (React.createElement("div", __assign({ className: "tag-label flex items-center gap-x-[5px] text-size-base ".concat(containerClass), style: {
|
|
3318
3304
|
maxWidth: maxWidthStyle,
|
|
3319
3305
|
} }, props),
|
|
3320
3306
|
leftIcon && (React.createElement("div", { style: {
|
|
3321
|
-
width: sizeCount
|
|
3322
|
-
height: sizeCount
|
|
3307
|
+
width: "".concat(sizeCount, "px"),
|
|
3308
|
+
height: "".concat(sizeCount, "px"),
|
|
3323
3309
|
}, className: "flex items-center justify-center", ref: containerRef }, leftIcon ||
|
|
3324
3310
|
(validatedVariant === 'icon' && (React.createElement(TbCheck, { className: defaultIconSize }))))),
|
|
3325
3311
|
validatedVariant !== 'icon' && text && (React.createElement("span", { className: "w-full truncate ".concat(textClass) }, text)),
|
|
@@ -3329,29 +3315,14 @@ var TagLabel = function (_a) {
|
|
|
3329
3315
|
" ")),
|
|
3330
3316
|
isCloseable && (React.createElement("button", { type: "button", onClick: closeHandler, className: "flex aspect-square items-center justify-center rounded-full pt-[1px] ".concat(closeClass) },
|
|
3331
3317
|
React.createElement(TbX, null))))));
|
|
3332
|
-
}
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
open: true,
|
|
3337
|
-
closeHandler: function () { },
|
|
3338
|
-
leftIcon: null,
|
|
3339
|
-
rightIcon: null,
|
|
3340
|
-
left: null,
|
|
3341
|
-
right: null,
|
|
3342
|
-
bgColor: 'grey-light-50',
|
|
3343
|
-
textColor: 'black',
|
|
3344
|
-
isBlock: false,
|
|
3345
|
-
maxWidth: 300,
|
|
3346
|
-
isDark: false,
|
|
3347
|
-
};
|
|
3348
|
-
|
|
3349
|
-
var TagLabelInputInner = function (_a, ref) {
|
|
3350
|
-
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"]);
|
|
3318
|
+
}
|
|
3319
|
+
|
|
3320
|
+
function TagLabelInputInner(_a, ref) {
|
|
3321
|
+
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"]);
|
|
3351
3322
|
var generatedId = useId();
|
|
3352
3323
|
var inputId = customId || generatedId;
|
|
3353
|
-
var
|
|
3354
|
-
var
|
|
3324
|
+
var _p = useState(false), isFocused = _p[0], setIsFocused = _p[1];
|
|
3325
|
+
var _q = useState(false), isHovered = _q[0], setIsHovered = _q[1];
|
|
3355
3326
|
var internalInputRef = useRef(null);
|
|
3356
3327
|
var containerRef = useRef(null);
|
|
3357
3328
|
useImperativeHandle(ref, function () { return internalInputRef.current; });
|
|
@@ -3375,12 +3346,12 @@ var TagLabelInputInner = function (_a, ref) {
|
|
|
3375
3346
|
var updatedValues = value.filter(function (_, idx) { return idx !== indexToRemove; });
|
|
3376
3347
|
onChange(updatedValues);
|
|
3377
3348
|
};
|
|
3378
|
-
var
|
|
3349
|
+
var _r = useLiveSearch({
|
|
3379
3350
|
value: value,
|
|
3380
3351
|
setValue: onChange,
|
|
3381
3352
|
onChangeText: onChangeText,
|
|
3382
3353
|
dropContOnClickItem: dropContProps === null || dropContProps === void 0 ? void 0 : dropContProps.onClickItem,
|
|
3383
|
-
}), isOpen =
|
|
3354
|
+
}), isOpen = _r.isOpen, setIsOpen = _r.setIsOpen, searchTerm = _r.searchTerm, handleInputChange = _r.handleInputChange, handleDropdownItemClick = _r.handleDropdownItemClick;
|
|
3384
3355
|
var handleKeyDown = function (e) {
|
|
3385
3356
|
var _a;
|
|
3386
3357
|
if (e.key === 'Backspace' && searchTerm === '' && value.length > 0) {
|
|
@@ -3409,14 +3380,13 @@ var TagLabelInputInner = function (_a, ref) {
|
|
|
3409
3380
|
return 'border-b-bia-red';
|
|
3410
3381
|
return 'border-b-bia-blue';
|
|
3411
3382
|
};
|
|
3412
|
-
var descColor =
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
var
|
|
3418
|
-
var
|
|
3419
|
-
var _r = processRenderedChildren(children, searchTerm, 'include', handleDropdownItemClick, value), renderedChildren = _r.renderedChildren, hasFilteredResults = _r.hasFilteredResults;
|
|
3383
|
+
var descColor = 'text-primary-cool';
|
|
3384
|
+
if (!disabled && isExistValidation) {
|
|
3385
|
+
descColor = isValid ? 'text-bia-green' : 'text-bia-red';
|
|
3386
|
+
}
|
|
3387
|
+
var _s = sizeConfig$6[size], inputClass = _s.inputClass, paddingClass = _s.paddingClass, resizePosition = _s.resizePosition;
|
|
3388
|
+
var _t = dropContProps || {}, dropContClassName = _t.className, restDropContProps = __rest(_t, ["className"]);
|
|
3389
|
+
var _u = processRenderedChildren(children, searchTerm, 'include', handleDropdownItemClick, value), renderedChildren = _u.renderedChildren, hasFilteredResults = _u.hasFilteredResults;
|
|
3420
3390
|
var showPlaceholder = !disabled && !readOnly && value.length === 0;
|
|
3421
3391
|
console.log('showPlaceholder', showPlaceholder);
|
|
3422
3392
|
return (React.createElement("div", { className: cn$1('relative w-full', className) },
|
|
@@ -3435,7 +3405,7 @@ var TagLabelInputInner = function (_a, ref) {
|
|
|
3435
3405
|
!readOnly &&
|
|
3436
3406
|
'focus-within:rounded-b-none hover:rounded-b-none', isFocused && !disabled && !readOnly && 'rounded-b-none', getBottomBorderColor(), paddingClass) },
|
|
3437
3407
|
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)))); }),
|
|
3438
|
-
React.createElement("input", __assign({}, restInputProps, { "aria-autocomplete": "list", "aria-expanded": isOpen, "aria-haspopup": "listbox", disabled: disabled, id: inputId, onChange: function (e) {
|
|
3408
|
+
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) {
|
|
3439
3409
|
if (disabled || readOnly)
|
|
3440
3410
|
return;
|
|
3441
3411
|
onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText(e);
|
|
@@ -3443,44 +3413,47 @@ var TagLabelInputInner = function (_a, ref) {
|
|
|
3443
3413
|
}, 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') })),
|
|
3444
3414
|
React.createElement(ResizeIcon, { className: cn$1('absolute', resizePosition) })),
|
|
3445
3415
|
description && (React.createElement("p", { className: cn$1('mt-1.5 text-xs transition-colors', descColor) }, description)),
|
|
3446
|
-
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
|
|
3416
|
+
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
|
|
3447
3417
|
? renderedChildren
|
|
3448
3418
|
: searchTerm.length > 0 && (React.createElement(DropdownItem, { content: React.createElement("div", { className: "px-4 py-2 text-gray-500" }, "Tidak ada hasil ditemukan.") }))))));
|
|
3449
|
-
}
|
|
3419
|
+
}
|
|
3450
3420
|
var TagLabelInput = forwardRef(TagLabelInputInner);
|
|
3451
3421
|
|
|
3452
3422
|
var sizeConfig$4 = {
|
|
3453
3423
|
md: {
|
|
3454
|
-
containerSize: 'w-[
|
|
3455
|
-
|
|
3456
|
-
|
|
3424
|
+
containerSize: 'w-[46px] h-[26px]',
|
|
3425
|
+
trackBorder: 'border-2',
|
|
3426
|
+
knobSize: 'size-[18px]',
|
|
3427
|
+
knobInset: 'mx-[4px]',
|
|
3428
|
+
labelClass: 'text-size-base',
|
|
3457
3429
|
},
|
|
3458
3430
|
sm: {
|
|
3459
|
-
containerSize: 'w-[
|
|
3460
|
-
|
|
3461
|
-
|
|
3431
|
+
containerSize: 'w-[32px] h-[20px]',
|
|
3432
|
+
trackBorder: 'border-2',
|
|
3433
|
+
knobSize: 'size-[12px]',
|
|
3434
|
+
knobInset: 'mx-[4px]',
|
|
3435
|
+
labelClass: 'text-size-sm',
|
|
3436
|
+
},
|
|
3437
|
+
tn: {
|
|
3438
|
+
containerSize: 'w-[22.4px] h-[14px]',
|
|
3439
|
+
trackBorder: 'border-[1.5px]',
|
|
3440
|
+
knobSize: 'size-[8.4px]',
|
|
3441
|
+
knobInset: 'mx-[2.8px]',
|
|
3442
|
+
labelClass: 'text-size-sm',
|
|
3462
3443
|
},
|
|
3463
3444
|
};
|
|
3464
3445
|
|
|
3465
3446
|
function Toggle(_a) {
|
|
3466
3447
|
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;
|
|
3467
|
-
var _h = sizeConfig$4[size], containerSize = _h.containerSize,
|
|
3448
|
+
var _h = sizeConfig$4[size], containerSize = _h.containerSize, trackBorder = _h.trackBorder, knobSize = _h.knobSize, knobInset = _h.knobInset, labelClass = _h.labelClass;
|
|
3468
3449
|
var checkedClass = checked ? 'justify-end' : 'justify-start';
|
|
3469
3450
|
var containerClass = "".concat(checkedClass, " ").concat(containerSize);
|
|
3470
3451
|
return (React.createElement("div", { className: "flex items-center" },
|
|
3471
|
-
React.createElement("div", { className: "relative flex flex-shrink-0 cursor-pointer items-center rounded-full
|
|
3472
|
-
React.createElement("input", { id: id, checked: checked, disabled: disabled, className: "
|
|
3473
|
-
React.createElement("div", { className: "check-icon group peer z-10
|
|
3474
|
-
React.createElement("label", { htmlFor: id, className: "
|
|
3452
|
+
React.createElement("div", { className: "relative flex flex-shrink-0 cursor-pointer items-center rounded-full ".concat(containerClass), onClick: onClick },
|
|
3453
|
+
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" }),
|
|
3454
|
+
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) })),
|
|
3455
|
+
React.createElement("label", { htmlFor: id, className: "ml-2 font-normal leading-4 text-bia-black ".concat(labelClass), style: { color: disabled ? '#8C8CA6' : '' } }, label)));
|
|
3475
3456
|
}
|
|
3476
|
-
Toggle.defaultProps = {
|
|
3477
|
-
label: '',
|
|
3478
|
-
size: 'md',
|
|
3479
|
-
onClick: function () { },
|
|
3480
|
-
checked: false,
|
|
3481
|
-
id: '',
|
|
3482
|
-
disabled: false,
|
|
3483
|
-
};
|
|
3484
3457
|
|
|
3485
3458
|
var isSelectedConfig = {
|
|
3486
3459
|
selected: 'bg-white text-primary-black cursor-default',
|
|
@@ -3528,8 +3501,8 @@ function SegmentButtonGroup(_a) {
|
|
|
3528
3501
|
}
|
|
3529
3502
|
|
|
3530
3503
|
var sizeUnion = ['md', 'sm'];
|
|
3531
|
-
|
|
3532
|
-
var
|
|
3504
|
+
function FormGroup(_a) {
|
|
3505
|
+
var _b = _a.children, children = _b === void 0 ? undefined : _b, _c = _a.size, size = _c === void 0 ? undefined : _c;
|
|
3533
3506
|
var validSize = validUnion(size, sizeUnion);
|
|
3534
3507
|
return (React.createElement("div", { className: "bianic-form-group flex items-end" }, Children.map(children, function (child) {
|
|
3535
3508
|
var _a;
|
|
@@ -3546,27 +3519,27 @@ var FormGroup = function (_a) {
|
|
|
3546
3519
|
}
|
|
3547
3520
|
return cloneElement(child, { size: validSize });
|
|
3548
3521
|
})));
|
|
3549
|
-
}
|
|
3522
|
+
}
|
|
3550
3523
|
|
|
3551
|
-
|
|
3524
|
+
function FormGroupButton(_a) {
|
|
3552
3525
|
var props = __rest(_a, []);
|
|
3553
3526
|
return (React.createElement("div", { className: "bianic-fgc-container h-full" },
|
|
3554
3527
|
React.createElement(Button, __assign({ className: "whitespace-nowrap ".concat(props.className), minWidth: 0 }, props))));
|
|
3555
|
-
}
|
|
3528
|
+
}
|
|
3556
3529
|
|
|
3557
3530
|
var labelSizeConfig = {
|
|
3558
3531
|
md: 'px-[11px] py-[9px] h-[40px] gap-[5px] text-size-base ',
|
|
3559
3532
|
sm: 'px-[8px] py-[6px] h-[30px] gap-[5px] text-size-sm ',
|
|
3560
3533
|
};
|
|
3561
3534
|
|
|
3562
|
-
|
|
3563
|
-
var
|
|
3535
|
+
function FormGroupLabel(_a) {
|
|
3536
|
+
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"]);
|
|
3564
3537
|
var sizeClass = labelSizeConfig[size];
|
|
3565
|
-
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),
|
|
3538
|
+
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),
|
|
3566
3539
|
childrenElement(iconLeft),
|
|
3567
3540
|
childrenElement(text),
|
|
3568
3541
|
childrenElement(iconRight)));
|
|
3569
|
-
}
|
|
3542
|
+
}
|
|
3570
3543
|
|
|
3571
3544
|
var DAYS_MAP = [
|
|
3572
3545
|
'Monday',
|
|
@@ -3618,7 +3591,7 @@ var checkIsValidDate = function (dateString) {
|
|
|
3618
3591
|
date.getUTCDate() === day);
|
|
3619
3592
|
};
|
|
3620
3593
|
var dateToInputString = function (dateObj) {
|
|
3621
|
-
if (!(dateObj instanceof Date) || isNaN(dateObj.getTime()))
|
|
3594
|
+
if (!(dateObj instanceof Date) || Number.isNaN(dateObj.getTime()))
|
|
3622
3595
|
return '';
|
|
3623
3596
|
var year = dateObj.getFullYear();
|
|
3624
3597
|
var month = String(dateObj.getMonth() + 1).padStart(2, '0');
|
|
@@ -3639,13 +3612,11 @@ var areMonthsAdjacent = function (leftMonth, leftYear, rightMonth, rightYear) {
|
|
|
3639
3612
|
// December + 1 month = January of next year
|
|
3640
3613
|
return rightMonth === 0 && rightYear === leftYear + 1;
|
|
3641
3614
|
}
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
return rightMonth === leftMonth + 1 && rightYear === leftYear;
|
|
3645
|
-
}
|
|
3615
|
+
// Any other month + 1 month
|
|
3616
|
+
return rightMonth === leftMonth + 1 && rightYear === leftYear;
|
|
3646
3617
|
};
|
|
3647
3618
|
|
|
3648
|
-
|
|
3619
|
+
function DateDisplay(_a) {
|
|
3649
3620
|
var displayDays = _a.displayDays, viewMonthValue = _a.viewMonthValue, selectedDate = _a.selectedDate, onDateSelect = _a.onDateSelect, minDateValue = _a.minDateValue, maxDateValue = _a.maxDateValue;
|
|
3650
3621
|
var isRangeMode = Array.isArray(selectedDate) && selectedDate.length === 2;
|
|
3651
3622
|
var startRangeDate = isRangeMode && (selectedDate === null || selectedDate === void 0 ? void 0 : selectedDate[0]) ? new Date(selectedDate[0]) : null;
|
|
@@ -3659,11 +3630,12 @@ var DateDisplay = function (_a) {
|
|
|
3659
3630
|
var isOutOfMonth = date.getMonth() !== viewMonthValue;
|
|
3660
3631
|
var isStartRange = isRangeMode && checkDateEquals(date, startRangeDate);
|
|
3661
3632
|
var isEndRange = isRangeMode && checkDateEquals(date, endRangeDate);
|
|
3662
|
-
var isSelected =
|
|
3663
|
-
|
|
3633
|
+
var isSelected = false;
|
|
3634
|
+
if (selectedDate) {
|
|
3635
|
+
isSelected = isRangeMode
|
|
3664
3636
|
? isStartRange || isEndRange
|
|
3665
|
-
: checkDateEquals(date, new Date(selectedDate))
|
|
3666
|
-
|
|
3637
|
+
: checkDateEquals(date, new Date(selectedDate));
|
|
3638
|
+
}
|
|
3667
3639
|
var isBetween = isRangeMode && startRangeDate && endRangeDate
|
|
3668
3640
|
? (function () {
|
|
3669
3641
|
var start = startRangeDate;
|
|
@@ -3677,43 +3649,60 @@ var DateDisplay = function (_a) {
|
|
|
3677
3649
|
})()
|
|
3678
3650
|
: false;
|
|
3679
3651
|
var isToday = checkDateEquals(date, new Date(TODAY_VALUE));
|
|
3680
|
-
var customClassname =
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3652
|
+
var customClassname = 'w-[31px] rounded-full';
|
|
3653
|
+
if (isRangeMode && (isBetween || isStartRange || isEndRange)) {
|
|
3654
|
+
if (isBetween) {
|
|
3655
|
+
customClassname = 'w-full';
|
|
3656
|
+
}
|
|
3657
|
+
else if (isStartRange) {
|
|
3658
|
+
customClassname = 'w-full rounded-l-full';
|
|
3659
|
+
}
|
|
3660
|
+
else {
|
|
3661
|
+
customClassname = 'rounded-r-full';
|
|
3662
|
+
}
|
|
3663
|
+
}
|
|
3664
|
+
var dayStateClass = 'hover:bg-bia-blue-pastel';
|
|
3665
|
+
if (isSelected) {
|
|
3666
|
+
dayStateClass = 'border border-bia-blue-dark-10 bg-bia-blue-dark-10';
|
|
3667
|
+
}
|
|
3668
|
+
else if (isBetween) {
|
|
3669
|
+
dayStateClass = isOutOfMonth
|
|
3670
|
+
? 'border border-bia-blue-light-50 bg-bia-blue-light-50'
|
|
3671
|
+
: 'border border-bia-blue-light-10 bg-bia-blue-light-10';
|
|
3672
|
+
}
|
|
3673
|
+
else if (isToday && !isOutOfRange) {
|
|
3674
|
+
dayStateClass = 'border border-bia-blue-light-50 bg-bia-blue-pastel';
|
|
3675
|
+
}
|
|
3676
|
+
var textStyle = 'text-bia-black';
|
|
3677
|
+
if (isSelected || isBetween) {
|
|
3678
|
+
textStyle = 'text-bia-white';
|
|
3679
|
+
}
|
|
3680
|
+
else if (isOutOfRange) {
|
|
3681
|
+
textStyle = 'text-bia-coolgrey-light-50';
|
|
3682
|
+
}
|
|
3683
|
+
else if (isOutOfMonth) {
|
|
3684
|
+
textStyle = 'text-bia-coolgrey';
|
|
3685
|
+
}
|
|
3686
|
+
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); } },
|
|
3687
|
+
React.createElement(Text, { variant: "small-text", extended: textStyle }, date.getDate())));
|
|
3703
3688
|
}))));
|
|
3704
|
-
}
|
|
3689
|
+
}
|
|
3705
3690
|
|
|
3706
|
-
|
|
3707
|
-
var viewYearValue = _a.viewYearValue, selectedDate = _a.selectedDate;
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3691
|
+
function MonthDisplay(_a) {
|
|
3692
|
+
var viewYearValue = _a.viewYearValue, selectedDate = _a.selectedDate;
|
|
3693
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars
|
|
3694
|
+
_a.viewMonthValue; var minDateValue = _a.minDateValue, maxDateValue = _a.maxDateValue, onMonthSelect = _a.onMonthSelect;
|
|
3695
|
+
var selectedDates = [];
|
|
3696
|
+
if (Array.isArray(selectedDate)) {
|
|
3697
|
+
selectedDates = selectedDate;
|
|
3698
|
+
}
|
|
3699
|
+
else if (selectedDate) {
|
|
3700
|
+
selectedDates = [selectedDate];
|
|
3701
|
+
}
|
|
3713
3702
|
var isMonthAlreadySelected = function (monthIndex) {
|
|
3714
3703
|
return selectedDates.some(function (date) {
|
|
3715
|
-
var dateYear = parseInt(date.slice(0, 4));
|
|
3716
|
-
var dateMonth = parseInt(date.slice(5, 7)) - 1;
|
|
3704
|
+
var dateYear = parseInt(date.slice(0, 4), 10);
|
|
3705
|
+
var dateMonth = parseInt(date.slice(5, 7), 10) - 1;
|
|
3717
3706
|
return dateYear === viewYearValue && dateMonth === monthIndex;
|
|
3718
3707
|
});
|
|
3719
3708
|
};
|
|
@@ -3736,80 +3725,93 @@ var MonthDisplay = function (_a) {
|
|
|
3736
3725
|
viewYearValue ===
|
|
3737
3726
|
parseInt((Array.isArray(selectedDate)
|
|
3738
3727
|
? selectedDate[0]
|
|
3739
|
-
: selectedDate).slice(0, 4)) &&
|
|
3728
|
+
: selectedDate).slice(0, 4), 10) &&
|
|
3740
3729
|
index ===
|
|
3741
3730
|
parseInt((Array.isArray(selectedDate)
|
|
3742
3731
|
? selectedDate[0]
|
|
3743
|
-
: selectedDate).slice(5, 7)) -
|
|
3732
|
+
: selectedDate).slice(5, 7), 10) -
|
|
3744
3733
|
1;
|
|
3745
|
-
|
|
3734
|
+
var textStyle = 'text-bia-black';
|
|
3735
|
+
if (isSelected || isAlreadySelected) {
|
|
3736
|
+
textStyle = 'text-bia-white';
|
|
3737
|
+
}
|
|
3738
|
+
else if (isOutOfRange) {
|
|
3739
|
+
textStyle = 'text-bia-coolgrey-light-50';
|
|
3740
|
+
}
|
|
3741
|
+
return (React.createElement("button", { type: "button", key: month, onClick: function (e) {
|
|
3746
3742
|
e.stopPropagation();
|
|
3747
3743
|
onMonthSelect(index);
|
|
3748
3744
|
}, disabled: isOutOfRange, className: "bianic-datepicker-calendar-month mx-[15px] flex h-[31px] items-center justify-center rounded-full ".concat(isSelected || isAlreadySelected
|
|
3749
3745
|
? 'border border-bia-blue-dark-10 bg-bia-blue-dark-10'
|
|
3750
3746
|
: 'enabled:hover:bg-bia-blue-pastel') },
|
|
3751
|
-
React.createElement(Text, { variant: "small-text", extended:
|
|
3752
|
-
? 'text-bia-white'
|
|
3753
|
-
: isOutOfRange
|
|
3754
|
-
? 'text-bia-coolgrey-light-50'
|
|
3755
|
-
: 'text-bia-black' }, month.slice(0, 3))));
|
|
3747
|
+
React.createElement(Text, { variant: "small-text", extended: textStyle }, month.slice(0, 3))));
|
|
3756
3748
|
})));
|
|
3757
|
-
}
|
|
3749
|
+
}
|
|
3758
3750
|
|
|
3759
|
-
|
|
3751
|
+
function YearDisplay(_a) {
|
|
3760
3752
|
var yearDisplayRange = _a.yearDisplayRange, viewYearValue = _a.viewYearValue, minDateValue = _a.minDateValue, maxDateValue = _a.maxDateValue, onYearSelect = _a.onYearSelect;
|
|
3761
3753
|
return (React.createElement("div", { className: "bianic-datepicker-calendar-year-grid grid grid-cols-4 gap-y-1.5" }, yearDisplayRange.map(function (year, index) {
|
|
3762
3754
|
var isOutOfRange = !!((minDateValue && year < minDateValue.getFullYear()) ||
|
|
3763
3755
|
(maxDateValue && year > maxDateValue.getFullYear()));
|
|
3764
3756
|
var isSelected = year === viewYearValue;
|
|
3765
3757
|
var isEdgeYear = index === 0 || index === 11;
|
|
3766
|
-
|
|
3758
|
+
var textStyle = 'text-bia-black';
|
|
3759
|
+
if (isSelected) {
|
|
3760
|
+
textStyle = 'text-bia-white';
|
|
3761
|
+
}
|
|
3762
|
+
else if (isOutOfRange) {
|
|
3763
|
+
textStyle = 'text-bia-coolgrey-light-50';
|
|
3764
|
+
}
|
|
3765
|
+
else if (isEdgeYear) {
|
|
3766
|
+
textStyle = 'text-bia-coolgrey';
|
|
3767
|
+
}
|
|
3768
|
+
return (React.createElement("button", { type: "button", key: year, onClick: function (e) {
|
|
3767
3769
|
e.stopPropagation();
|
|
3768
3770
|
onYearSelect(year);
|
|
3769
3771
|
}, disabled: isOutOfRange, className: "bianic-datepicker-calendar-month mx-[6px] flex h-[31px] items-center justify-center rounded-full ".concat(isSelected
|
|
3770
3772
|
? 'border border-bia-blue-dark-10 bg-bia-blue-dark-10'
|
|
3771
3773
|
: 'enabled:hover:bg-bia-blue-pastel', " ").concat(isEdgeYear ? 'text-bia-coolgrey' : '') },
|
|
3772
|
-
React.createElement(Text, { variant: "small-text", extended:
|
|
3773
|
-
? 'text-bia-white'
|
|
3774
|
-
: isOutOfRange
|
|
3775
|
-
? 'text-bia-coolgrey-light-50'
|
|
3776
|
-
: isEdgeYear
|
|
3777
|
-
? 'text-bia-coolgrey'
|
|
3778
|
-
: 'text-bia-black' }, year)));
|
|
3774
|
+
React.createElement(Text, { variant: "small-text", extended: textStyle }, year)));
|
|
3779
3775
|
})));
|
|
3780
|
-
}
|
|
3776
|
+
}
|
|
3781
3777
|
|
|
3782
|
-
|
|
3783
|
-
var pickerMode = _a.pickerMode, viewMonthValue = _a.viewMonthValue, viewYearValue = _a.viewYearValue, yearDisplayRange = _a.yearDisplayRange,
|
|
3778
|
+
function PickerHeader(_a) {
|
|
3779
|
+
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;
|
|
3780
|
+
var handlePrev = handlePrevDecade;
|
|
3781
|
+
if (pickerMode === 'date') {
|
|
3782
|
+
handlePrev = handlePrevMonth;
|
|
3783
|
+
}
|
|
3784
|
+
else if (pickerMode === 'month') {
|
|
3785
|
+
handlePrev = handlePrevYear;
|
|
3786
|
+
}
|
|
3787
|
+
var handleNext = handleNextDecade;
|
|
3788
|
+
if (pickerMode === 'date') {
|
|
3789
|
+
handleNext = handleNextMonth;
|
|
3790
|
+
}
|
|
3791
|
+
else if (pickerMode === 'month') {
|
|
3792
|
+
handleNext = handleNextYear;
|
|
3793
|
+
}
|
|
3784
3794
|
return (React.createElement("div", { className: "bianic-datepicker-calendar-controller flex w-full items-center justify-between" },
|
|
3785
|
-
React.createElement("button", { className: "bianic-datepicker-calendar-prev-button text-bia-coolgrey disabled:text-bia-coolgrey-light-50", disabled: isPrevDisabled(), onClick:
|
|
3786
|
-
? handlePrevMonth
|
|
3787
|
-
: pickerMode === 'month'
|
|
3788
|
-
? handlePrevYear
|
|
3789
|
-
: handlePrevDecade },
|
|
3795
|
+
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 },
|
|
3790
3796
|
React.createElement(TbChevronLeft, { size: 18 })),
|
|
3791
3797
|
React.createElement("div", { className: "bianic-datepicker-calendar-current-month flex items-center justify-center gap-1" },
|
|
3792
|
-
React.createElement("button", { className: pickerMode === 'date' ? '' : 'hidden', onClick: function (e) {
|
|
3798
|
+
React.createElement("button", { type: "button", className: pickerMode === 'date' ? '' : 'hidden', onClick: function (e) {
|
|
3793
3799
|
e.stopPropagation();
|
|
3794
3800
|
handlePickerMode('month');
|
|
3795
3801
|
} },
|
|
3796
3802
|
React.createElement(Text, { variant: "normal-text-semibold" },
|
|
3797
3803
|
MONTH_MAP[viewMonthValue],
|
|
3798
3804
|
' ')),
|
|
3799
|
-
React.createElement("button", { className: pickerMode === 'date' || pickerMode === 'month' ? '' : 'hidden', onClick: function (e) {
|
|
3805
|
+
React.createElement("button", { type: "button", className: pickerMode === 'date' || pickerMode === 'month' ? '' : 'hidden', onClick: function (e) {
|
|
3800
3806
|
e.stopPropagation();
|
|
3801
3807
|
handlePickerMode('year');
|
|
3802
3808
|
} },
|
|
3803
3809
|
React.createElement(Text, { variant: "normal-text" }, viewYearValue)),
|
|
3804
|
-
React.createElement("button", { className: pickerMode === 'year' ? '' : 'hidden' },
|
|
3810
|
+
React.createElement("button", { type: "button", className: pickerMode === 'year' ? '' : 'hidden' },
|
|
3805
3811
|
React.createElement(Text, { variant: "normal-text" }, "".concat(yearDisplayRange[1], " - ").concat(yearDisplayRange[10])))),
|
|
3806
|
-
React.createElement("button", { className: "bianic-datepicker-calendar-next-button text-bia-coolgrey disabled:text-bia-coolgrey-light-50", disabled: isNextDisabled(), onClick:
|
|
3807
|
-
? handleNextMonth
|
|
3808
|
-
: pickerMode === 'month'
|
|
3809
|
-
? handleNextYear
|
|
3810
|
-
: handleNextDecade },
|
|
3812
|
+
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 },
|
|
3811
3813
|
React.createElement(TbChevronRight, { size: 18 }))));
|
|
3812
|
-
}
|
|
3814
|
+
}
|
|
3813
3815
|
|
|
3814
3816
|
var useCalendarLogic = function (selectedDate, minDate, maxDate) {
|
|
3815
3817
|
var _a = useState('date'), pickerMode = _a[0], setPickerMode = _a[1];
|
|
@@ -3850,10 +3852,6 @@ var useCalendarLogic = function (selectedDate, minDate, maxDate) {
|
|
|
3850
3852
|
var handleNextDecade = function () {
|
|
3851
3853
|
setViewDecadeValue(function (prev) { return prev + 10; });
|
|
3852
3854
|
};
|
|
3853
|
-
useEffect(function () {
|
|
3854
|
-
var calculatedDisplayDays = getDisplayDays(viewMonthValue, viewYearValue);
|
|
3855
|
-
setDisplayDays(calculatedDisplayDays);
|
|
3856
|
-
}, [viewMonthValue, viewYearValue, selectedDate]);
|
|
3857
3855
|
var getDisplayDays = function (month, year) {
|
|
3858
3856
|
var monthStartDay = new Date("".concat(year, "-").concat(month + 1, "-01")).getDay() === 0
|
|
3859
3857
|
? 6
|
|
@@ -3870,6 +3868,10 @@ var useCalendarLogic = function (selectedDate, minDate, maxDate) {
|
|
|
3870
3868
|
}
|
|
3871
3869
|
return tempDisplayDays;
|
|
3872
3870
|
};
|
|
3871
|
+
useEffect(function () {
|
|
3872
|
+
var calculatedDisplayDays = getDisplayDays(viewMonthValue, viewYearValue);
|
|
3873
|
+
setDisplayDays(calculatedDisplayDays);
|
|
3874
|
+
}, [viewMonthValue, viewYearValue, selectedDate]);
|
|
3873
3875
|
var handleSetSelectedDate = function (date, onDateChange) {
|
|
3874
3876
|
if (date.getMonth() !== viewMonthValue) {
|
|
3875
3877
|
// if the date is not in the current view month, update the view month and year
|
|
@@ -3890,7 +3892,7 @@ var useCalendarLogic = function (selectedDate, minDate, maxDate) {
|
|
|
3890
3892
|
var startOfDecade = Math.floor(year / 10) * 10;
|
|
3891
3893
|
var endOfDecade = startOfDecade + 9;
|
|
3892
3894
|
var decadeRange = [];
|
|
3893
|
-
for (var i = startOfDecade - 1; i < endOfDecade + 2; i
|
|
3895
|
+
for (var i = startOfDecade - 1; i < endOfDecade + 2; i += 1) {
|
|
3894
3896
|
decadeRange.push(i);
|
|
3895
3897
|
}
|
|
3896
3898
|
return decadeRange;
|
|
@@ -3903,13 +3905,11 @@ var useCalendarLogic = function (selectedDate, minDate, maxDate) {
|
|
|
3903
3905
|
return (viewYearValue <= minDateValue.getFullYear() &&
|
|
3904
3906
|
viewMonthValue <= minDateValue.getMonth());
|
|
3905
3907
|
}
|
|
3906
|
-
|
|
3908
|
+
if (pickerMode === 'month') {
|
|
3907
3909
|
return viewYearValue <= minDateValue.getFullYear();
|
|
3908
3910
|
}
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
yearDisplayRange[0] <= minDateValue.getFullYear());
|
|
3912
|
-
}
|
|
3911
|
+
return (yearDisplayRange.includes(minDateValue.getFullYear()) &&
|
|
3912
|
+
yearDisplayRange[0] <= minDateValue.getFullYear());
|
|
3913
3913
|
};
|
|
3914
3914
|
var isNextDisabled = function () {
|
|
3915
3915
|
if (!maxDateValue)
|
|
@@ -3918,13 +3918,11 @@ var useCalendarLogic = function (selectedDate, minDate, maxDate) {
|
|
|
3918
3918
|
return (viewYearValue >= maxDateValue.getFullYear() &&
|
|
3919
3919
|
viewMonthValue >= maxDateValue.getMonth());
|
|
3920
3920
|
}
|
|
3921
|
-
|
|
3921
|
+
if (pickerMode === 'month') {
|
|
3922
3922
|
return viewYearValue >= maxDateValue.getFullYear();
|
|
3923
3923
|
}
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
yearDisplayRange[11] >= maxDateValue.getFullYear());
|
|
3927
|
-
}
|
|
3924
|
+
return (yearDisplayRange.includes(maxDateValue.getFullYear()) &&
|
|
3925
|
+
yearDisplayRange[11] >= maxDateValue.getFullYear());
|
|
3928
3926
|
};
|
|
3929
3927
|
return {
|
|
3930
3928
|
pickerMode: pickerMode,
|
|
@@ -3955,13 +3953,13 @@ var useCalendarLogic = function (selectedDate, minDate, maxDate) {
|
|
|
3955
3953
|
};
|
|
3956
3954
|
};
|
|
3957
3955
|
|
|
3958
|
-
|
|
3959
|
-
var selectedDate = _a.selectedDate, onDateSelect = _a.onDateSelect,
|
|
3960
|
-
var
|
|
3956
|
+
function PickerContent(_a) {
|
|
3957
|
+
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;
|
|
3958
|
+
var _h = useCalendarLogic(
|
|
3961
3959
|
// use first selectedDate if array
|
|
3962
3960
|
Array.isArray(selectedDate)
|
|
3963
3961
|
? selectedDate[0]
|
|
3964
|
-
: selectedDate, minDate, maxDate), pickerMode =
|
|
3962
|
+
: 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;
|
|
3965
3963
|
useEffect(function () {
|
|
3966
3964
|
if (typeof initialViewMonth === 'number') {
|
|
3967
3965
|
setViewMonthValue(initialViewMonth);
|
|
@@ -3969,7 +3967,7 @@ var PickerContent = function (_a) {
|
|
|
3969
3967
|
if (typeof initialViewYear === 'number') {
|
|
3970
3968
|
setViewYearValue(initialViewYear);
|
|
3971
3969
|
}
|
|
3972
|
-
}, [initialViewMonth, initialViewYear]);
|
|
3970
|
+
}, [initialViewMonth, initialViewYear, setViewMonthValue, setViewYearValue]);
|
|
3973
3971
|
// Use custom handlers for range mode, fall back to internal for single mode
|
|
3974
3972
|
var handlePrevMonth = onPrevMonth || internalHandlePrevMonth;
|
|
3975
3973
|
var handleNextMonth = onNextMonth || internalHandleNextMonth;
|
|
@@ -3991,18 +3989,18 @@ var PickerContent = function (_a) {
|
|
|
3991
3989
|
setViewYearValue(y);
|
|
3992
3990
|
handlePickerMode('month');
|
|
3993
3991
|
}, viewYearValue: viewYearValue, yearDisplayRange: yearDisplayRange }))));
|
|
3994
|
-
}
|
|
3992
|
+
}
|
|
3995
3993
|
|
|
3996
|
-
|
|
3994
|
+
function SinglePicker(_a) {
|
|
3997
3995
|
var selectedDate = _a.selectedDate, onDateChange = _a.onDateChange, minDate = _a.minDate, maxDate = _a.maxDate;
|
|
3998
3996
|
var handleDateSelect = function (date) {
|
|
3999
3997
|
onDateChange(dateToInputString(date));
|
|
4000
3998
|
};
|
|
4001
3999
|
return (React.createElement("div", { className: "single-picker picker-body" },
|
|
4002
4000
|
React.createElement(PickerContent, { selectedDate: selectedDate !== null && selectedDate !== void 0 ? selectedDate : null, onDateSelect: handleDateSelect, minDate: minDate, maxDate: maxDate })));
|
|
4003
|
-
}
|
|
4001
|
+
}
|
|
4004
4002
|
|
|
4005
|
-
|
|
4003
|
+
function RangePicker(_a) {
|
|
4006
4004
|
var
|
|
4007
4005
|
// pickerMode,
|
|
4008
4006
|
selectedDate = _a.selectedDate, onDateChange = _a.onDateChange, onClose = _a.onClose, minDate = _a.minDate, maxDate = _a.maxDate, isPickerOpen = _a.isPickerOpen;
|
|
@@ -4011,16 +4009,12 @@ var RangePicker = function (_a) {
|
|
|
4011
4009
|
var rightInitDate = selectedDate && selectedDate[1] ? new Date(selectedDate[1]) : new Date();
|
|
4012
4010
|
var leftInitMonth = leftInitDate.getMonth();
|
|
4013
4011
|
var leftInitYear = leftInitDate.getFullYear();
|
|
4014
|
-
var rightInitMonth =
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
? rightInitDate.getFullYear()
|
|
4021
|
-
: leftInitMonth === 11
|
|
4022
|
-
? leftInitYear + 1
|
|
4023
|
-
: leftInitYear;
|
|
4012
|
+
var rightInitMonth = leftInitMonth === 11 ? 0 : leftInitMonth + 1;
|
|
4013
|
+
var rightInitYear = leftInitMonth === 11 ? leftInitYear + 1 : leftInitYear;
|
|
4014
|
+
if (rightInitDate) {
|
|
4015
|
+
rightInitMonth = rightInitDate.getMonth();
|
|
4016
|
+
rightInitYear = rightInitDate.getFullYear();
|
|
4017
|
+
}
|
|
4024
4018
|
// State to track left and right panel month/year
|
|
4025
4019
|
var _b = useState(leftInitMonth), leftMonth = _b[0], setLeftMonth = _b[1];
|
|
4026
4020
|
var _c = useState(leftInitYear), leftYear = _c[0], setLeftYear = _c[1];
|
|
@@ -4039,7 +4033,7 @@ var RangePicker = function (_a) {
|
|
|
4039
4033
|
useEffect(function () {
|
|
4040
4034
|
if (!isPickerOpen)
|
|
4041
4035
|
setTempSelectedDate(selectedDate || []);
|
|
4042
|
-
}, [isPickerOpen]);
|
|
4036
|
+
}, [isPickerOpen, selectedDate]);
|
|
4043
4037
|
var isAdjacent = useMemo(function () { return areMonthsAdjacent(leftMonth, leftYear, rightMonth, rightYear); }, [leftMonth, leftYear, rightMonth, rightYear]);
|
|
4044
4038
|
// Helper function to ensure left picker is always smaller than right picker
|
|
4045
4039
|
var ensureOrderedPickers = function (newLeftMonth, newLeftYear, newRightMonth, newRightYear) {
|
|
@@ -4093,14 +4087,12 @@ var RangePicker = function (_a) {
|
|
|
4093
4087
|
newRightMonth = rightMonth + 1;
|
|
4094
4088
|
}
|
|
4095
4089
|
}
|
|
4090
|
+
else if (leftMonth === 11) {
|
|
4091
|
+
newLeftMonth = 0;
|
|
4092
|
+
newLeftYear = leftYear + 1;
|
|
4093
|
+
}
|
|
4096
4094
|
else {
|
|
4097
|
-
|
|
4098
|
-
newLeftMonth = 0;
|
|
4099
|
-
newLeftYear = leftYear + 1;
|
|
4100
|
-
}
|
|
4101
|
-
else {
|
|
4102
|
-
newLeftMonth = leftMonth + 1;
|
|
4103
|
-
}
|
|
4095
|
+
newLeftMonth = leftMonth + 1;
|
|
4104
4096
|
}
|
|
4105
4097
|
ensureOrderedPickers(newLeftMonth, newLeftYear, newRightMonth, newRightYear);
|
|
4106
4098
|
};
|
|
@@ -4126,14 +4118,12 @@ var RangePicker = function (_a) {
|
|
|
4126
4118
|
newRightMonth = rightMonth - 1;
|
|
4127
4119
|
}
|
|
4128
4120
|
}
|
|
4121
|
+
else if (rightMonth === 0) {
|
|
4122
|
+
newRightMonth = 11;
|
|
4123
|
+
newRightYear = rightYear - 1;
|
|
4124
|
+
}
|
|
4129
4125
|
else {
|
|
4130
|
-
|
|
4131
|
-
newRightMonth = 11;
|
|
4132
|
-
newRightYear = rightYear - 1;
|
|
4133
|
-
}
|
|
4134
|
-
else {
|
|
4135
|
-
newRightMonth = rightMonth - 1;
|
|
4136
|
-
}
|
|
4126
|
+
newRightMonth = rightMonth - 1;
|
|
4137
4127
|
}
|
|
4138
4128
|
ensureOrderedPickers(newLeftMonth, newLeftYear, newRightMonth, newRightYear);
|
|
4139
4129
|
};
|
|
@@ -4168,21 +4158,23 @@ var RangePicker = function (_a) {
|
|
|
4168
4158
|
};
|
|
4169
4159
|
var handleMonthSelect = function (dateIndex, initYear) {
|
|
4170
4160
|
return function (val) {
|
|
4171
|
-
var selectedDates =
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4161
|
+
var selectedDates = [];
|
|
4162
|
+
if (Array.isArray(selectedDate)) {
|
|
4163
|
+
selectedDates = selectedDate;
|
|
4164
|
+
}
|
|
4165
|
+
else if (selectedDate) {
|
|
4166
|
+
selectedDates = [selectedDate];
|
|
4167
|
+
}
|
|
4176
4168
|
var isMonthAlreadySelected = selectedDates.some(function (date) {
|
|
4177
|
-
var dateYear = parseInt(date.slice(0, 4));
|
|
4178
|
-
var dateMonth = parseInt(date.slice(5, 7)) - 1;
|
|
4169
|
+
var dateYear = parseInt(date.slice(0, 4), 10);
|
|
4170
|
+
var dateMonth = parseInt(date.slice(5, 7), 10) - 1;
|
|
4179
4171
|
return dateYear === initYear && dateMonth === val;
|
|
4180
4172
|
});
|
|
4181
4173
|
if (isMonthAlreadySelected) {
|
|
4182
4174
|
if (!selectedDates[dateIndex]) {
|
|
4183
4175
|
return;
|
|
4184
4176
|
}
|
|
4185
|
-
var selectedMonth = parseInt(selectedDates[dateIndex].slice(5, 7)) - 1;
|
|
4177
|
+
var selectedMonth = parseInt(selectedDates[dateIndex].slice(5, 7), 10) - 1;
|
|
4186
4178
|
if (val === selectedMonth) {
|
|
4187
4179
|
if (dateIndex === 0) {
|
|
4188
4180
|
ensureOrderedPickers(selectedMonth, initYear, rightMonth, rightYear);
|
|
@@ -4191,17 +4183,12 @@ var RangePicker = function (_a) {
|
|
|
4191
4183
|
ensureOrderedPickers(leftMonth, leftYear, selectedMonth, initYear);
|
|
4192
4184
|
}
|
|
4193
4185
|
}
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4186
|
+
}
|
|
4187
|
+
else if (dateIndex === 0) {
|
|
4188
|
+
ensureOrderedPickers(val, initYear, rightMonth, rightYear);
|
|
4197
4189
|
}
|
|
4198
4190
|
else {
|
|
4199
|
-
|
|
4200
|
-
ensureOrderedPickers(val, initYear, rightMonth, rightYear);
|
|
4201
|
-
}
|
|
4202
|
-
else {
|
|
4203
|
-
ensureOrderedPickers(leftMonth, leftYear, val, initYear);
|
|
4204
|
-
}
|
|
4191
|
+
ensureOrderedPickers(leftMonth, leftYear, val, initYear);
|
|
4205
4192
|
}
|
|
4206
4193
|
};
|
|
4207
4194
|
};
|
|
@@ -4217,8 +4204,19 @@ var RangePicker = function (_a) {
|
|
|
4217
4204
|
onDateChange(tempSelectedDate.length ? tempSelectedDate : null);
|
|
4218
4205
|
onClose();
|
|
4219
4206
|
} })))));
|
|
4220
|
-
}
|
|
4207
|
+
}
|
|
4221
4208
|
|
|
4209
|
+
function PickerBody(_a) {
|
|
4210
|
+
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;
|
|
4211
|
+
var onCloseRef = useRef(onClose);
|
|
4212
|
+
onCloseRef.current = onClose;
|
|
4213
|
+
useEffect(function () {
|
|
4214
|
+
if (!isPickerOpen) {
|
|
4215
|
+
onCloseRef.current();
|
|
4216
|
+
}
|
|
4217
|
+
}, [isPickerOpen]);
|
|
4218
|
+
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 }))));
|
|
4219
|
+
}
|
|
4222
4220
|
var PickerCalendar = function (_a) {
|
|
4223
4221
|
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"]);
|
|
4224
4222
|
// Hooks & States
|
|
@@ -4228,19 +4226,10 @@ var PickerCalendar = function (_a) {
|
|
|
4228
4226
|
var positionStyle = usePopupPosition(anchorRef, pickerCalendarRef)[0];
|
|
4229
4227
|
useEffect(function () {
|
|
4230
4228
|
setIsPickerOpen(isOpen);
|
|
4231
|
-
}, [isOpen]);
|
|
4229
|
+
}, [isOpen, setIsPickerOpen]);
|
|
4232
4230
|
return 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),
|
|
4233
4231
|
React.createElement(PickerBody, { selectedDate: selectedDate, minDate: minDate, maxDate: maxDate, onDateChange: onDateChange, isPickerOpen: isPickerOpen, pickerVariant: pickerVariant, onClose: onClose, isOpen: isOpen })), document.body);
|
|
4234
4232
|
};
|
|
4235
|
-
var PickerBody = function (_a) {
|
|
4236
|
-
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;
|
|
4237
|
-
useEffect(function () {
|
|
4238
|
-
if (!isPickerOpen) {
|
|
4239
|
-
onClose();
|
|
4240
|
-
}
|
|
4241
|
-
}, [isPickerOpen]);
|
|
4242
|
-
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 }))));
|
|
4243
|
-
};
|
|
4244
4233
|
|
|
4245
4234
|
var monthMap = [
|
|
4246
4235
|
'January',
|
|
@@ -4256,32 +4245,52 @@ var monthMap = [
|
|
|
4256
4245
|
'November',
|
|
4257
4246
|
'December',
|
|
4258
4247
|
];
|
|
4248
|
+
function isDate(val) {
|
|
4249
|
+
return val instanceof Date && !Number.isNaN(val);
|
|
4250
|
+
}
|
|
4251
|
+
var displayDateFormatter = function (date) {
|
|
4252
|
+
if (!isDate(date))
|
|
4253
|
+
return '';
|
|
4254
|
+
return "".concat(date.getDate(), " ").concat(monthMap[date.getMonth()].slice(0, 3), " '").concat(date.getFullYear().toString().slice(2, 4));
|
|
4255
|
+
};
|
|
4259
4256
|
var DateInputDisplay = forwardRef(function (_a, ref) {
|
|
4260
|
-
var value = _a.value,
|
|
4261
|
-
|
|
4262
|
-
|
|
4257
|
+
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;
|
|
4258
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars
|
|
4259
|
+
_a.isActive;
|
|
4260
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars
|
|
4261
|
+
_a.setIsActive;
|
|
4262
|
+
var hasValue = Boolean(value || (value && value.length > 0));
|
|
4263
|
+
var inputValue = '';
|
|
4264
|
+
if (hasValue) {
|
|
4265
|
+
inputValue = Array.isArray(value)
|
|
4263
4266
|
? "".concat(value[0], " ").concat(value[1] ? "- ".concat(value[1]) : '')
|
|
4264
|
-
: value
|
|
4265
|
-
|
|
4266
|
-
var viewValue =
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4267
|
+
: value;
|
|
4268
|
+
}
|
|
4269
|
+
var viewValue = nullDisplay || placeholder;
|
|
4270
|
+
if (hasValue) {
|
|
4271
|
+
if (Array.isArray(value)) {
|
|
4272
|
+
var rangeEnd = value[1]
|
|
4273
|
+
? "- ".concat(displayDateFormatter(new Date(value[1])))
|
|
4274
|
+
: '';
|
|
4275
|
+
viewValue = "".concat(displayDateFormatter(new Date(value[0])), " ").concat(rangeEnd);
|
|
4276
|
+
}
|
|
4277
|
+
else {
|
|
4278
|
+
viewValue = displayDateFormatter(new Date(value));
|
|
4279
|
+
}
|
|
4280
|
+
}
|
|
4281
|
+
var _j = useState(false), isEditing = _j[0], setIsEditing = _j[1];
|
|
4282
|
+
var _k = useState(inputValue), dateString = _k[0], setDateString = _k[1];
|
|
4283
|
+
var fieldStyle = styleConfig.text.fieldStyle;
|
|
4284
|
+
var _l = sizeConfig$d[size], iconSize = _l.iconSize, fieldSize = _l.fieldSize, iconPosition = _l.iconPosition;
|
|
4275
4285
|
var borderStyle = 'border border-bia-grey-dark-10 bg-primary-white';
|
|
4276
4286
|
var extendedInputClassName = "w-full ".concat(fieldStyle, " ").concat(fieldSize, " ").concat(borderStyle, " ").concat(className);
|
|
4277
|
-
props.readOnly ? 'read-only:pointer-events-none' : '';
|
|
4278
4287
|
var handleTextChange = function (event) {
|
|
4279
4288
|
var rawValue = event.target.value;
|
|
4280
4289
|
setDateString(rawValue); // Update the displayed text input immediately
|
|
4281
4290
|
// --- Validation and Conversion Logic ---
|
|
4282
4291
|
if (rawValue) {
|
|
4283
4292
|
var newDate = new Date(rawValue);
|
|
4284
|
-
if (!isNaN(newDate.getTime())) {
|
|
4293
|
+
if (!Number.isNaN(newDate.getTime())) {
|
|
4285
4294
|
// If valid, update the Date object state
|
|
4286
4295
|
if (setValue)
|
|
4287
4296
|
setValue(rawValue);
|
|
@@ -4296,13 +4305,18 @@ var DateInputDisplay = forwardRef(function (_a, ref) {
|
|
|
4296
4305
|
setIsEditing(false);
|
|
4297
4306
|
setDateString(inputValue);
|
|
4298
4307
|
};
|
|
4299
|
-
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 () {
|
|
4300
|
-
buttonAction
|
|
4308
|
+
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 () {
|
|
4309
|
+
buttonAction === null || buttonAction === void 0 ? void 0 : buttonAction();
|
|
4301
4310
|
} },
|
|
4302
4311
|
React.createElement(TbCalendar, { size: iconSize })) })) : (React.createElement(React.Fragment, null,
|
|
4303
|
-
React.createElement("div", { role: "button", onClick: function () { return setIsEditing(true); },
|
|
4312
|
+
React.createElement("div", { role: "button", tabIndex: 0, onClick: function () { return setIsEditing(true); }, onKeyDown: function (e) {
|
|
4313
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
4314
|
+
e.preventDefault();
|
|
4315
|
+
setIsEditing(true);
|
|
4316
|
+
}
|
|
4317
|
+
}, 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),
|
|
4304
4318
|
React.createElement("div", { className: "absolute inset-y-0 flex items-center pl-3 text-bia-coolgrey ".concat(iconPosition) },
|
|
4305
|
-
React.createElement("button", { className: "bianic-datepicker-toggle-button", disabled: disabled, onClick: function () { return buttonAction && buttonAction(); } },
|
|
4319
|
+
React.createElement("button", { type: "button", className: "bianic-datepicker-toggle-button", disabled: disabled, onClick: function () { return buttonAction && buttonAction(); } },
|
|
4306
4320
|
React.createElement(TbCalendar, { size: iconSize })))));
|
|
4307
4321
|
useEffect(function () {
|
|
4308
4322
|
// Only update dateString if we are NOT currently editing.
|
|
@@ -4313,20 +4327,21 @@ var DateInputDisplay = forwardRef(function (_a, ref) {
|
|
|
4313
4327
|
label && (React.createElement(FormLabel, { htmlFor: id, required: required, readOnly: readOnly }, label)),
|
|
4314
4328
|
React.createElement("div", { className: "relative w-full", ref: ref }, input)));
|
|
4315
4329
|
});
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4330
|
+
DateInputDisplay.defaultProps = {
|
|
4331
|
+
setValue: undefined,
|
|
4332
|
+
placeholder: 'YYYY-MM-DD',
|
|
4333
|
+
label: undefined,
|
|
4334
|
+
isActive: false,
|
|
4335
|
+
setIsActive: undefined,
|
|
4336
|
+
buttonAction: undefined,
|
|
4337
|
+
nullDisplay: undefined,
|
|
4320
4338
|
};
|
|
4321
|
-
function isDate(val) {
|
|
4322
|
-
return val instanceof Date && !isNaN(val);
|
|
4323
|
-
}
|
|
4324
4339
|
|
|
4325
4340
|
function DatePicker(_a) {
|
|
4326
|
-
var _b = _a.zIndexCalendar, zIndexCalendar = _b === void 0 ? 100 : _b,
|
|
4341
|
+
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;
|
|
4327
4342
|
// State and Ref
|
|
4328
4343
|
var inputRef = useRef(null);
|
|
4329
|
-
var
|
|
4344
|
+
var _r = useState(false), isPickerOpen = _r[0], setIsPickerOpen = _r[1];
|
|
4330
4345
|
return (React.createElement("div", { className: "bianic-datepicker-container relative ".concat(containerClassName) },
|
|
4331
4346
|
React.createElement("div", { className: "bianic-datepicker-field-container" },
|
|
4332
4347
|
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 })),
|
|
@@ -4340,16 +4355,6 @@ var YearPickerDisplay = forwardRef(function (_a, ref) {
|
|
|
4340
4355
|
var _e = useState(false), isEditing = _e[0], setIsEditing = _e[1];
|
|
4341
4356
|
var _f = useState(value ? value.toString() : ''), inputValue = _f[0], setInputValue = _f[1];
|
|
4342
4357
|
var _g = useState(null), internalError = _g[0], setInternalError = _g[1];
|
|
4343
|
-
// Sync input string when value changes externally
|
|
4344
|
-
useEffect(function () {
|
|
4345
|
-
setInputValue(value ? value.toString() : '');
|
|
4346
|
-
if (value) {
|
|
4347
|
-
validateValue(value);
|
|
4348
|
-
}
|
|
4349
|
-
else {
|
|
4350
|
-
setError(null);
|
|
4351
|
-
}
|
|
4352
|
-
}, [value, minYear, maxYear]);
|
|
4353
4358
|
var setError = function (msg) {
|
|
4354
4359
|
setInternalError(msg);
|
|
4355
4360
|
onErrorChange === null || onErrorChange === void 0 ? void 0 : onErrorChange(msg);
|
|
@@ -4363,6 +4368,20 @@ var YearPickerDisplay = forwardRef(function (_a, ref) {
|
|
|
4363
4368
|
}
|
|
4364
4369
|
return null;
|
|
4365
4370
|
};
|
|
4371
|
+
// Sync input string when value changes externally.
|
|
4372
|
+
// setError/validateValue are intentionally excluded: they're plain
|
|
4373
|
+
// functions redefined every render (not memoized) from minYear/maxYear,
|
|
4374
|
+
// which are already tracked here - adding them would make this effect,
|
|
4375
|
+
// and the onErrorChange callback it can trigger, re-fire on every
|
|
4376
|
+
// unrelated re-render instead of only when value/minYear/maxYear change.
|
|
4377
|
+
useEffect(function () {
|
|
4378
|
+
setInputValue(value ? value.toString() : '');
|
|
4379
|
+
if (value) ;
|
|
4380
|
+
else {
|
|
4381
|
+
setError(null);
|
|
4382
|
+
}
|
|
4383
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4384
|
+
}, [value, minYear, maxYear]);
|
|
4366
4385
|
var handleChange = function (e) {
|
|
4367
4386
|
var rawValue = e.target.value;
|
|
4368
4387
|
var cleanValue = rawValue.replace(/\D/g, '').slice(0, 4);
|
|
@@ -4418,21 +4437,21 @@ var YearPickerDisplay = forwardRef(function (_a, ref) {
|
|
|
4418
4437
|
}
|
|
4419
4438
|
};
|
|
4420
4439
|
var _h = sizeConfig$d[size], iconSize = _h.iconSize, fieldSize = _h.fieldSize, iconPosition = _h.iconPosition;
|
|
4421
|
-
var fieldStyle = styleConfig
|
|
4440
|
+
var fieldStyle = styleConfig.text.fieldStyle;
|
|
4422
4441
|
var displayError = customErrorMessage || internalError;
|
|
4423
4442
|
var borderStyle = displayError
|
|
4424
4443
|
? 'border border-bia-red bg-primary-white'
|
|
4425
4444
|
: 'border border-bia-grey-dark-10 bg-primary-white';
|
|
4426
4445
|
var extendedInputClassName = "w-full ".concat(fieldStyle, " ").concat(fieldSize, " ").concat(borderStyle, " ").concat(className);
|
|
4427
|
-
props.readOnly ? 'read-only:pointer-events-none' : '';
|
|
4428
4446
|
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 () {
|
|
4429
|
-
buttonAction
|
|
4447
|
+
buttonAction === null || buttonAction === void 0 ? void 0 : buttonAction();
|
|
4430
4448
|
} },
|
|
4431
4449
|
React.createElement(TbCalendar, { size: iconSize })) }, props))) : (React.createElement(React.Fragment, null,
|
|
4432
4450
|
React.createElement("div", { role: "button", tabIndex: disabled ? -1 : 0, onClick: function () { return !disabled && setIsEditing(true); }, onKeyDown: function (e) {
|
|
4433
4451
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
4434
4452
|
e.preventDefault();
|
|
4435
|
-
!disabled
|
|
4453
|
+
if (!disabled)
|
|
4454
|
+
setIsEditing(true);
|
|
4436
4455
|
}
|
|
4437
4456
|
}, 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),
|
|
4438
4457
|
React.createElement("div", { className: "absolute inset-y-0 right-0 flex items-center pl-3 text-bia-coolgrey ".concat(iconPosition) },
|
|
@@ -4443,6 +4462,12 @@ var YearPickerDisplay = forwardRef(function (_a, ref) {
|
|
|
4443
4462
|
React.createElement("div", { className: "relative w-full", ref: inputRef }, input),
|
|
4444
4463
|
displayError && (React.createElement("span", { className: "text-xs text-bia-red" }, displayError))));
|
|
4445
4464
|
});
|
|
4465
|
+
YearPickerDisplay.defaultProps = {
|
|
4466
|
+
maxYear: undefined,
|
|
4467
|
+
minYear: undefined,
|
|
4468
|
+
errorMessage: undefined,
|
|
4469
|
+
onErrorChange: undefined,
|
|
4470
|
+
};
|
|
4446
4471
|
YearPickerDisplay.displayName = 'YearPickerDisplay';
|
|
4447
4472
|
|
|
4448
4473
|
var useYearLogic = function (selectYear, minYear, maxYear) {
|
|
@@ -4466,7 +4491,7 @@ var useYearLogic = function (selectYear, minYear, maxYear) {
|
|
|
4466
4491
|
var startOfDecade = Math.floor(year / 10) * 10;
|
|
4467
4492
|
var endOfDecade = startOfDecade + 9;
|
|
4468
4493
|
var decadeRange = [];
|
|
4469
|
-
for (var i = startOfDecade - 1; i < endOfDecade + 2; i
|
|
4494
|
+
for (var i = startOfDecade - 1; i < endOfDecade + 2; i += 1) {
|
|
4470
4495
|
decadeRange.push(i);
|
|
4471
4496
|
}
|
|
4472
4497
|
return decadeRange;
|
|
@@ -4513,25 +4538,25 @@ var PickerYear = function (_a) {
|
|
|
4513
4538
|
var substituteMinDate = minYear ? new Date(minYear, 0, 1) : null;
|
|
4514
4539
|
useEffect(function () {
|
|
4515
4540
|
setIsPickerOpen(isOpen);
|
|
4516
|
-
}, [isOpen]);
|
|
4541
|
+
}, [isOpen, setIsPickerOpen]);
|
|
4517
4542
|
return 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),
|
|
4518
4543
|
React.createElement("div", { className: "picker-body flex w-[250px] flex-col gap-[15px]" },
|
|
4519
|
-
React.createElement(PickerHeader, { pickerMode:
|
|
4544
|
+
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 }),
|
|
4520
4545
|
React.createElement(YearDisplay, { maxDateValue: substituteMaxDate, minDateValue: substituteMinDate, onYearSelect: function (y) {
|
|
4521
4546
|
setSelectedYear(y);
|
|
4522
4547
|
onClose();
|
|
4523
4548
|
}, viewYearValue: selectedYear, yearDisplayRange: yearDisplayRange }))), document.body);
|
|
4524
4549
|
};
|
|
4525
4550
|
|
|
4526
|
-
|
|
4527
|
-
var value = _a.value, onChange = _a.onChange, _b = _a.zIndexCalendar, zIndexCalendar = _b === void 0 ? 100 : _b,
|
|
4551
|
+
function YearPicker(_a) {
|
|
4552
|
+
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;
|
|
4528
4553
|
var inputRef = useRef(null);
|
|
4529
|
-
var
|
|
4554
|
+
var _g = useState(false), isPickerOpen = _g[0], setIsPickerOpen = _g[1];
|
|
4530
4555
|
return (React.createElement("div", { className: "bianic-yearpicker-container relative ".concat(containerClassName) },
|
|
4531
4556
|
React.createElement("div", { className: "bianic-yearpicker-field-container" },
|
|
4532
4557
|
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 })),
|
|
4533
4558
|
React.createElement(PickerYear, { maxYear: maxYear, minYear: minYear, zIndex: zIndexCalendar, anchorRef: inputRef, selectedYear: value, setSelectedYear: onChange, isOpen: isPickerOpen, onClose: function () { return setIsPickerOpen(false); } })));
|
|
4534
|
-
}
|
|
4559
|
+
}
|
|
4535
4560
|
|
|
4536
4561
|
/**
|
|
4537
4562
|
* Comprehensive MIME type & file extension validator
|
|
@@ -4637,8 +4662,8 @@ var useFileHandler = function (_a) {
|
|
|
4637
4662
|
};
|
|
4638
4663
|
};
|
|
4639
4664
|
|
|
4640
|
-
|
|
4641
|
-
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;
|
|
4665
|
+
function SimpleFileUploader(_a) {
|
|
4666
|
+
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"]);
|
|
4642
4667
|
var _h = useFileHandler({
|
|
4643
4668
|
accept: accept,
|
|
4644
4669
|
multiple: multiple,
|
|
@@ -4657,16 +4682,18 @@ var SimpleFileUploader = function (_a) {
|
|
|
4657
4682
|
}[size];
|
|
4658
4683
|
return (React.createElement("div", { className: cn$1('inline-flex flex-col items-start gap-1.5', className) },
|
|
4659
4684
|
React.createElement("input", { ref: inputRef, type: "file", accept: accept, multiple: multiple, disabled: disabled, onChange: handleInputChange, className: "hidden", "aria-label": "File input" }),
|
|
4660
|
-
React.createElement(Button
|
|
4685
|
+
React.createElement(Button
|
|
4686
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
4687
|
+
, __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" })) })),
|
|
4661
4688
|
activeError && (React.createElement("div", { className: "flex items-center gap-1 text-xs font-medium text-bia-red" },
|
|
4662
4689
|
React.createElement(TbAlertCircle, { size: 14, className: "shrink-0" }),
|
|
4663
4690
|
React.createElement("span", null, activeError)))));
|
|
4664
|
-
}
|
|
4691
|
+
}
|
|
4665
4692
|
|
|
4666
|
-
|
|
4667
|
-
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,
|
|
4693
|
+
function DropzoneFileUploader(_a) {
|
|
4694
|
+
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;
|
|
4668
4695
|
var effectiveAccept = accept || (variant === 'image' ? 'image/*' : undefined);
|
|
4669
|
-
var
|
|
4696
|
+
var _j = useFileHandler({
|
|
4670
4697
|
accept: effectiveAccept,
|
|
4671
4698
|
multiple: multiple,
|
|
4672
4699
|
maxSize: maxSize,
|
|
@@ -4674,7 +4701,7 @@ var DropzoneFileUploader = function (_a) {
|
|
|
4674
4701
|
value: value,
|
|
4675
4702
|
onChange: onChange,
|
|
4676
4703
|
onError: onError,
|
|
4677
|
-
}), inputRef =
|
|
4704
|
+
}), inputRef = _j.inputRef, isDragging = _j.isDragging, internalError = _j.internalError, handleDragOver = _j.handleDragOver, handleDragLeave = _j.handleDragLeave, handleDrop = _j.handleDrop, handleInputChange = _j.handleInputChange, triggerClick = _j.triggerClick;
|
|
4678
4705
|
var isImageVariant = variant === 'image';
|
|
4679
4706
|
var defaultTitle = isImageVariant
|
|
4680
4707
|
? 'Drag & Drop your Image here'
|
|
@@ -4723,21 +4750,21 @@ var DropzoneFileUploader = function (_a) {
|
|
|
4723
4750
|
onRemove(item.id);
|
|
4724
4751
|
}, className: "rounded-full p-1.5 text-gray-400 hover:bg-gray-100 hover:text-red-500", "aria-label": "Remove ".concat(item.file.name) },
|
|
4725
4752
|
React.createElement(TbTrash, { size: 18 })))))); })))));
|
|
4726
|
-
}
|
|
4753
|
+
}
|
|
4727
4754
|
|
|
4728
|
-
|
|
4755
|
+
function AlertRoundedSquare(_a) {
|
|
4729
4756
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4730
4757
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4731
4758
|
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" })));
|
|
4732
|
-
}
|
|
4759
|
+
}
|
|
4733
4760
|
|
|
4734
|
-
|
|
4761
|
+
function CubeHeader(_a) {
|
|
4735
4762
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4736
4763
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4737
4764
|
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" })));
|
|
4738
|
-
}
|
|
4765
|
+
}
|
|
4739
4766
|
|
|
4740
|
-
|
|
4767
|
+
function Discrepancy(_a) {
|
|
4741
4768
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4742
4769
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4743
4770
|
React.createElement("path", { d: "M13.2 3.6H3.40002V20.4H15.6V18H9.60001V16.8H13.2V10.8H15.6V7.2H10.7998V6H13.2V3.6Z", fill: "inherit" }),
|
|
@@ -4747,178 +4774,178 @@ var Discrepancy = function (_a) {
|
|
|
4747
4774
|
React.createElement("path", { d: "M22.8 12V16.8H20.4V12H22.8Z" }),
|
|
4748
4775
|
React.createElement("path", { d: "M20.4 18H16.8V20.4H20.4V18Z" }),
|
|
4749
4776
|
React.createElement("path", { d: "M14.4 12H19.2V16.8H14.4V12Z" })));
|
|
4750
|
-
}
|
|
4777
|
+
}
|
|
4751
4778
|
|
|
4752
|
-
|
|
4779
|
+
function ExposedPort(_a) {
|
|
4753
4780
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4754
4781
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4755
4782
|
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" })));
|
|
4756
|
-
}
|
|
4783
|
+
}
|
|
4757
4784
|
|
|
4758
|
-
|
|
4785
|
+
function Flowqount(_a) {
|
|
4759
4786
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4760
4787
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4761
|
-
React.createElement("g", {
|
|
4762
|
-
React.createElement("path", {
|
|
4788
|
+
React.createElement("g", { clipPath: "url(#clip0_514_7964)" },
|
|
4789
|
+
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" })),
|
|
4763
4790
|
React.createElement("defs", null,
|
|
4764
4791
|
React.createElement("clipPath", { id: "clip0_514_7964" },
|
|
4765
4792
|
React.createElement("rect", { width: "20", height: "20", fill: "white", transform: "translate(2 2)" })))));
|
|
4766
|
-
}
|
|
4793
|
+
}
|
|
4767
4794
|
|
|
4768
|
-
|
|
4795
|
+
function FQAnalytical(_a) {
|
|
4769
4796
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4770
4797
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4771
|
-
React.createElement("g", {
|
|
4772
|
-
React.createElement("path", {
|
|
4798
|
+
React.createElement("g", { clipPath: "url(#clip0_514_7960)" },
|
|
4799
|
+
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" })),
|
|
4773
4800
|
React.createElement("defs", null,
|
|
4774
4801
|
React.createElement("clipPath", { id: "clip0_514_7960" },
|
|
4775
4802
|
React.createElement("rect", { width: "20", height: "20", fill: "white", transform: "translate(2 2)" })))));
|
|
4776
|
-
}
|
|
4803
|
+
}
|
|
4777
4804
|
|
|
4778
|
-
|
|
4805
|
+
function FQGetaway(_a) {
|
|
4779
4806
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4780
4807
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4781
|
-
React.createElement("g", {
|
|
4782
|
-
React.createElement("path", {
|
|
4808
|
+
React.createElement("g", { clipPath: "url(#clip0_514_7963)" },
|
|
4809
|
+
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" })),
|
|
4783
4810
|
React.createElement("defs", null,
|
|
4784
4811
|
React.createElement("clipPath", { id: "clip0_514_7963" },
|
|
4785
4812
|
React.createElement("rect", { width: "20", height: "20", fill: "white", transform: "translate(2 2)" })))));
|
|
4786
|
-
}
|
|
4813
|
+
}
|
|
4787
4814
|
|
|
4788
|
-
|
|
4815
|
+
function FQModeler(_a) {
|
|
4789
4816
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4790
4817
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4791
|
-
React.createElement("g", {
|
|
4792
|
-
React.createElement("path", {
|
|
4818
|
+
React.createElement("g", { clipPath: "url(#clip0_514_7961)" },
|
|
4819
|
+
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" })),
|
|
4793
4820
|
React.createElement("defs", null,
|
|
4794
4821
|
React.createElement("clipPath", { id: "clip0_514_7961" },
|
|
4795
4822
|
React.createElement("rect", { width: "20", height: "20", fill: "white", transform: "translate(2 2)" })))));
|
|
4796
|
-
}
|
|
4823
|
+
}
|
|
4797
4824
|
|
|
4798
|
-
|
|
4825
|
+
function FQOperation(_a) {
|
|
4799
4826
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4800
4827
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4801
|
-
React.createElement("g", {
|
|
4802
|
-
React.createElement("path", {
|
|
4828
|
+
React.createElement("g", { clipPath: "url(#clip0_514_7959)" },
|
|
4829
|
+
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" })),
|
|
4803
4830
|
React.createElement("defs", null,
|
|
4804
4831
|
React.createElement("clipPath", { id: "clip0_514_7959" },
|
|
4805
4832
|
React.createElement("rect", { width: "20", height: "20", fill: "white", transform: "translate(2 2)" })))));
|
|
4806
|
-
}
|
|
4833
|
+
}
|
|
4807
4834
|
|
|
4808
|
-
|
|
4835
|
+
function FQWelldone(_a) {
|
|
4809
4836
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4810
4837
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4811
|
-
React.createElement("g", {
|
|
4812
|
-
React.createElement("path", {
|
|
4838
|
+
React.createElement("g", { clipPath: "url(#clip0_514_7962)" },
|
|
4839
|
+
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" })),
|
|
4813
4840
|
React.createElement("defs", null,
|
|
4814
4841
|
React.createElement("clipPath", { id: "clip0_514_7962" },
|
|
4815
4842
|
React.createElement("rect", { width: "20", height: "20", fill: "white", transform: "translate(2 2)" })))));
|
|
4816
|
-
}
|
|
4843
|
+
}
|
|
4817
4844
|
|
|
4818
|
-
|
|
4845
|
+
function Inlet(_a) {
|
|
4819
4846
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4820
4847
|
var numericSize = Number(size);
|
|
4821
4848
|
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" },
|
|
4822
4849
|
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" }),
|
|
4823
4850
|
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" })));
|
|
4824
|
-
}
|
|
4851
|
+
}
|
|
4825
4852
|
|
|
4826
|
-
|
|
4853
|
+
function Legend(_a) {
|
|
4827
4854
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4828
4855
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4829
4856
|
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" }),
|
|
4830
4857
|
React.createElement("path", { d: "M10.9437 17.6805V8.95785H7.82846V7.1818H16.1716V8.95785H13.0635V17.6805H10.9437Z", fill: "inherit" })));
|
|
4831
|
-
}
|
|
4858
|
+
}
|
|
4832
4859
|
|
|
4833
|
-
|
|
4860
|
+
function ModalBalance(_a) {
|
|
4834
4861
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4835
4862
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4836
|
-
React.createElement("path", {
|
|
4837
|
-
React.createElement("path", {
|
|
4838
|
-
React.createElement("path", {
|
|
4839
|
-
React.createElement("path", {
|
|
4840
|
-
React.createElement("path", {
|
|
4841
|
-
React.createElement("path", {
|
|
4842
|
-
React.createElement("path", {
|
|
4843
|
-
}
|
|
4863
|
+
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" }),
|
|
4864
|
+
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" }),
|
|
4865
|
+
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" }),
|
|
4866
|
+
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" }),
|
|
4867
|
+
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" }),
|
|
4868
|
+
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" }),
|
|
4869
|
+
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" })));
|
|
4870
|
+
}
|
|
4844
4871
|
|
|
4845
|
-
|
|
4872
|
+
function Neutral(_a) {
|
|
4846
4873
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4847
4874
|
var numericSize = Number(size);
|
|
4848
4875
|
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" },
|
|
4849
|
-
React.createElement("path", {
|
|
4876
|
+
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" }),
|
|
4850
4877
|
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" })));
|
|
4851
|
-
}
|
|
4878
|
+
}
|
|
4852
4879
|
|
|
4853
|
-
|
|
4880
|
+
function Node(_a) {
|
|
4854
4881
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4855
4882
|
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" },
|
|
4856
|
-
React.createElement("path", {
|
|
4857
|
-
React.createElement("rect", { x: "4.82964", y: "5.22156", width: "3.28794", height: "3.28794", rx: "1.64397",
|
|
4858
|
-
React.createElement("rect", { x: "15.8711", y: "15.485", width: "3.28794", height: "3.28794", rx: "1.64397",
|
|
4859
|
-
}
|
|
4883
|
+
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" }),
|
|
4884
|
+
React.createElement("rect", { x: "4.82964", y: "5.22156", width: "3.28794", height: "3.28794", rx: "1.64397", strokeWidth: "0.954563" }),
|
|
4885
|
+
React.createElement("rect", { x: "15.8711", y: "15.485", width: "3.28794", height: "3.28794", rx: "1.64397", strokeWidth: "0.954563" })));
|
|
4886
|
+
}
|
|
4860
4887
|
|
|
4861
|
-
|
|
4888
|
+
function Outlet(_a) {
|
|
4862
4889
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4863
4890
|
var numericSize = Number(size);
|
|
4864
4891
|
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" },
|
|
4865
4892
|
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" }),
|
|
4866
4893
|
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" })));
|
|
4867
|
-
}
|
|
4894
|
+
}
|
|
4868
4895
|
|
|
4869
|
-
|
|
4896
|
+
function Port(_a) {
|
|
4870
4897
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4871
4898
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4872
4899
|
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" })));
|
|
4873
|
-
}
|
|
4900
|
+
}
|
|
4874
4901
|
|
|
4875
|
-
|
|
4902
|
+
function Rhombus(_a) {
|
|
4876
4903
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4877
4904
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4878
4905
|
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" })));
|
|
4879
|
-
}
|
|
4906
|
+
}
|
|
4880
4907
|
|
|
4881
|
-
|
|
4908
|
+
function SelectAllAdd(_a) {
|
|
4882
4909
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4883
4910
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4884
4911
|
React.createElement("path", { d: "M7 17V7H17V17H7ZM9 15H15V9H9V15ZM7 21V19H9V21H7ZM7 5V3H9V5H7ZM11 21V19H13V21H11ZM11 5V3H13V5H11ZM15 5V3H17V5H15ZM3 5V3H5V5H3ZM5 21H3V19H5V21ZM21 5H19V3H21V5ZM3 17V15H5V17H3ZM3 13V11H5V13H3ZM3 9V7H5V9H3ZM19 13V11H21V13H19ZM19 9V7H21V9H19Z", fill: "inherit" }),
|
|
4885
|
-
React.createElement("path", {
|
|
4886
|
-
React.createElement("path", {
|
|
4887
|
-
}
|
|
4912
|
+
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M19 24V16H21V24H19Z", fill: "inherit" }),
|
|
4913
|
+
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M16 19L24 19L24 21L16 21L16 19Z", fill: "inherit" })));
|
|
4914
|
+
}
|
|
4888
4915
|
|
|
4889
|
-
|
|
4916
|
+
function SelectAllRemove(_a) {
|
|
4890
4917
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4891
4918
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4892
4919
|
React.createElement("path", { d: "M7 17V7H17V17H7ZM9 15H15V9H9V15ZM7 21V19H9V21H7ZM7 5V3H9V5H7ZM11 21V19H13V21H11ZM11 5V3H13V5H11ZM15 5V3H17V5H15ZM3 5V3H5V5H3ZM5 21H3V19H5V21ZM21 5H19V3H21V5ZM3 17V15H5V17H3ZM3 13V11H5V13H3ZM3 9V7H5V9H3ZM19 16V15H21V16H19ZM19 13V11H21V13H19ZM19 9V7H21V9H19Z", fill: "inherit" }),
|
|
4893
|
-
React.createElement("path", {
|
|
4894
|
-
}
|
|
4920
|
+
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M16 19L24 19L24 21L16 21L16 19Z", fill: "inherit" })));
|
|
4921
|
+
}
|
|
4895
4922
|
|
|
4896
|
-
|
|
4923
|
+
function Spinner$1(_a) {
|
|
4897
4924
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4898
4925
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4899
4926
|
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" })));
|
|
4900
|
-
}
|
|
4927
|
+
}
|
|
4901
4928
|
|
|
4902
|
-
|
|
4929
|
+
function Stack(_a) {
|
|
4903
4930
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4904
4931
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 20 20", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4905
4932
|
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" })));
|
|
4906
|
-
}
|
|
4933
|
+
}
|
|
4907
4934
|
|
|
4908
|
-
|
|
4935
|
+
function Unlinked(_a) {
|
|
4909
4936
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4910
4937
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4911
4938
|
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" }),
|
|
4912
4939
|
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" }),
|
|
4913
4940
|
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" }),
|
|
4914
4941
|
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" })));
|
|
4915
|
-
}
|
|
4942
|
+
}
|
|
4916
4943
|
|
|
4917
|
-
|
|
4944
|
+
function VirtualPort(_a) {
|
|
4918
4945
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4919
4946
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4920
4947
|
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" })));
|
|
4921
|
-
}
|
|
4948
|
+
}
|
|
4922
4949
|
|
|
4923
4950
|
var colorConfig = {
|
|
4924
4951
|
yellow: 'bg-bia-yellow-light-80',
|
|
@@ -4932,22 +4959,16 @@ var sizeConfig$2 = {
|
|
|
4932
4959
|
'form-md': 'min-h-[40px] h-fit whitespace-nowrap px-2.5 py-[9.5px]',
|
|
4933
4960
|
};
|
|
4934
4961
|
|
|
4935
|
-
|
|
4936
|
-
var
|
|
4962
|
+
function InfoPanel(_a) {
|
|
4963
|
+
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;
|
|
4937
4964
|
var sizeClass = sizeConfig$2[variant || 'container'];
|
|
4938
4965
|
var colorClass = colorConfig[color || 'yellow'];
|
|
4939
4966
|
var allClasses = "".concat(sizeClass, " ").concat(colorClass, " ").concat(className);
|
|
4940
4967
|
return (React.createElement("div", { className: "flex items-center justify-center rounded-radius-md ".concat(allClasses) }, children));
|
|
4941
|
-
}
|
|
4942
|
-
InfoPanel.defaultProps = {
|
|
4943
|
-
variant: 'container',
|
|
4944
|
-
color: 'yellow',
|
|
4945
|
-
className: '',
|
|
4946
|
-
children: null,
|
|
4947
|
-
};
|
|
4968
|
+
}
|
|
4948
4969
|
|
|
4949
4970
|
function Modal(_a) {
|
|
4950
|
-
var _b = _a.size, size = _b === void 0 ? 'sm' : _b,
|
|
4971
|
+
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"]);
|
|
4951
4972
|
var modalSize;
|
|
4952
4973
|
if (size === 'sm') {
|
|
4953
4974
|
modalSize = 'w-[300px]';
|
|
@@ -4972,7 +4993,9 @@ function Modal(_a) {
|
|
|
4972
4993
|
if (open) {
|
|
4973
4994
|
return (
|
|
4974
4995
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events
|
|
4975
|
-
createPortal(React.createElement("div", { className: "bianic-modal-wrapper fixed inset-0 flex items-center justify-center bg-bia-black-transparent-75", style: {
|
|
4996
|
+
createPortal(React.createElement("div", { className: "bianic-modal-wrapper fixed inset-0 flex items-center justify-center bg-bia-black-transparent-75", style: {
|
|
4997
|
+
zIndex: !zIndex && Number.isNaN(zIndex) ? 'auto' : zIndex,
|
|
4998
|
+
}, id: "wrapper", onPointerDown: handleClose },
|
|
4976
4999
|
React.createElement("div", { className: "bianic-modal flex flex-col gap-[20px] rounded-[5px] bg-white p-[20px] ".concat(modalSize), onClick: onClick },
|
|
4977
5000
|
React.createElement("div", { className: "bianic-modal-header flex justify-between" },
|
|
4978
5001
|
React.createElement("div", { className: " text-wrap text-left font-humnst777 text-[18px] font-bold leading-[21.85px] text-primary-black" }, title),
|
|
@@ -4982,13 +5005,13 @@ function Modal(_a) {
|
|
|
4982
5005
|
return null;
|
|
4983
5006
|
}
|
|
4984
5007
|
|
|
4985
|
-
|
|
4986
|
-
var
|
|
5008
|
+
function Notification(_a) {
|
|
5009
|
+
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;
|
|
4987
5010
|
var bgColor = color === 'red' ? 'bg-bia-red' : 'bg-bia-white';
|
|
4988
5011
|
return (React.createElement("div", { className: "relative" },
|
|
4989
5012
|
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' } }),
|
|
4990
5013
|
children));
|
|
4991
|
-
}
|
|
5014
|
+
}
|
|
4992
5015
|
|
|
4993
5016
|
var sizeConfig$1 = {
|
|
4994
5017
|
md: 'min-w-[40px] h-[40px] text-[14px] font-semibold',
|
|
@@ -5000,18 +5023,18 @@ var positionConfig = {
|
|
|
5000
5023
|
end: 'justify-end',
|
|
5001
5024
|
};
|
|
5002
5025
|
|
|
5003
|
-
|
|
5004
|
-
var
|
|
5026
|
+
function SelectedPage(_a) {
|
|
5027
|
+
var _b = _a.label, label = _b === void 0 ? undefined : _b, _c = _a.size, size = _c === void 0 ? 'sm' : _c;
|
|
5005
5028
|
var basicButtonStyle = 'bianic-custom-button bianic-fgc-target flex items-center justify-center font-semibold cursor-default';
|
|
5006
5029
|
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';
|
|
5007
5030
|
var textStyleOptions = {
|
|
5008
5031
|
sm: 'text-size-sm',
|
|
5009
5032
|
md: 'text-size-base',
|
|
5010
5033
|
};
|
|
5011
|
-
var sizeStyleOptions = "".concat(iconOnlySizeConfig$1[size], " ").concat(radiusConfig$1
|
|
5034
|
+
var sizeStyleOptions = "".concat(iconOnlySizeConfig$1[size], " ").concat(radiusConfig$1.default[size]);
|
|
5012
5035
|
var style = "".concat(basicButtonStyle, " ").concat(basicColorStyle, " ").concat(sizeStyleOptions, " ").concat(textStyleOptions[size]);
|
|
5013
5036
|
return React.createElement("div", { className: style }, label);
|
|
5014
|
-
}
|
|
5037
|
+
}
|
|
5015
5038
|
|
|
5016
5039
|
function PaginationBar(_a) {
|
|
5017
5040
|
var size = _a.size, position = _a.position, currentPage = _a.currentPage, totalPages = _a.totalPages, onPageChange = _a.onPageChange;
|
|
@@ -5158,14 +5181,6 @@ var classConfig = {
|
|
|
5158
5181
|
},
|
|
5159
5182
|
};
|
|
5160
5183
|
|
|
5161
|
-
function Popover(_a) {
|
|
5162
|
-
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;
|
|
5163
|
-
var wrapperRef = useRef(null);
|
|
5164
|
-
var _e = useDetectOutsideClick(wrapperRef, false), isOpen = _e[0], setIsOpen = _e[1];
|
|
5165
|
-
return (React.createElement("div", { className: "Bianic-popover-Wrapper relative block h-fit w-fit", role: "button", ref: wrapperRef, onClick: function () { return setIsOpen(true); } },
|
|
5166
|
-
children,
|
|
5167
|
-
isOpen && (React.createElement(PopoverItem, { title: title, content: content, anchorRef: wrapperRef, direction: direction, className: className, style: style, zIndex: zIndex, color: color }))));
|
|
5168
|
-
}
|
|
5169
5184
|
var PopoverItem = function (_a) {
|
|
5170
5185
|
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;
|
|
5171
5186
|
var popoverRef = useRef(null);
|
|
@@ -5185,10 +5200,19 @@ var PopoverItem = function (_a) {
|
|
|
5185
5200
|
React.createElement("div", { className: "triangle absolute ".concat(triangleContainer, " pointer-events-none") },
|
|
5186
5201
|
React.createElement("div", { className: "h-[7px] w-[7px] rotate-45 transform ".concat(triangleThemeClasses) }))), document.body);
|
|
5187
5202
|
};
|
|
5188
|
-
Popover
|
|
5189
|
-
direction: '
|
|
5190
|
-
|
|
5191
|
-
|
|
5203
|
+
function Popover(_a) {
|
|
5204
|
+
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;
|
|
5205
|
+
var wrapperRef = useRef(null);
|
|
5206
|
+
var _e = useDetectOutsideClick(wrapperRef, false), isOpen = _e[0], setIsOpen = _e[1];
|
|
5207
|
+
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) {
|
|
5208
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
5209
|
+
e.preventDefault();
|
|
5210
|
+
setIsOpen(true);
|
|
5211
|
+
}
|
|
5212
|
+
} },
|
|
5213
|
+
children,
|
|
5214
|
+
isOpen && (React.createElement(PopoverItem, { title: title, content: content, anchorRef: wrapperRef, direction: direction, className: className, style: style, zIndex: zIndex, color: color }))));
|
|
5215
|
+
}
|
|
5192
5216
|
|
|
5193
5217
|
var config$1 = {
|
|
5194
5218
|
success: {
|
|
@@ -5219,18 +5243,18 @@ function ProgressCircle(_a) {
|
|
|
5219
5243
|
backgroundImage: "conic-gradient(#5e5eea 0deg, #5e5eea ".concat(progressDegree, "deg, #ededfd ").concat(progressDegree, "deg)"),
|
|
5220
5244
|
}
|
|
5221
5245
|
: {};
|
|
5222
|
-
return (React.createElement("div", { className: "w-32
|
|
5246
|
+
return (React.createElement("div", { className: "sha flex aspect-square w-32 items-center justify-center rounded-full bg-primary-white", style: {
|
|
5223
5247
|
boxShadow: '0px 3px 20px rgba(0, 0, 0, 0.10)',
|
|
5224
5248
|
} },
|
|
5225
|
-
React.createElement("div", { className: "w-[72px]
|
|
5226
|
-
isPersentage && (React.createElement("div", { className: "
|
|
5249
|
+
React.createElement("div", { className: "relative flex aspect-square w-[72px] items-center justify-center rounded-full border-4 text-[38px] ".concat(container), style: inlineStyle },
|
|
5250
|
+
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, "%"))),
|
|
5227
5251
|
content)));
|
|
5228
5252
|
}
|
|
5229
5253
|
|
|
5230
|
-
|
|
5231
|
-
var
|
|
5254
|
+
function SpinnerIcon(_a) {
|
|
5255
|
+
var _b = _a.className, className = _b === void 0 ? undefined : _b, props = __rest(_a, ["className"]);
|
|
5232
5256
|
return React.createElement(TbLoader2, __assign({ className: "animate-spinner ".concat(className) }, props));
|
|
5233
|
-
}
|
|
5257
|
+
}
|
|
5234
5258
|
|
|
5235
5259
|
var config = {
|
|
5236
5260
|
success: {
|
|
@@ -5248,13 +5272,13 @@ var config = {
|
|
|
5248
5272
|
};
|
|
5249
5273
|
|
|
5250
5274
|
function ProgressBar(_a) {
|
|
5251
|
-
var _b = _a.title, title = _b === void 0 ? '' : _b,
|
|
5275
|
+
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;
|
|
5252
5276
|
var percentageVal = percentage;
|
|
5253
5277
|
if (percentageVal === 0)
|
|
5254
5278
|
percentageVal = 0.5;
|
|
5255
5279
|
if (percentage > 100)
|
|
5256
5280
|
percentageVal = 100;
|
|
5257
|
-
var
|
|
5281
|
+
var _g = config[variant], progress = _g.progress, statusIcon = _g.statusIcon;
|
|
5258
5282
|
var barColorRules = barColor
|
|
5259
5283
|
? "outline-bia-".concat(barColor, " bg-bia-").concat(barColor)
|
|
5260
5284
|
: progress; // Use the provided barColor or fallback to the default progress color
|
|
@@ -5288,8 +5312,9 @@ var resizerContainerClass = {
|
|
|
5288
5312
|
};
|
|
5289
5313
|
|
|
5290
5314
|
function ResizeableDiv(_a) {
|
|
5291
|
-
var _b = _a.position, position = _b === void 0 ? 'bottom' : _b, children = _a.children, className = _a.className,
|
|
5292
|
-
var
|
|
5315
|
+
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;
|
|
5316
|
+
var internalRef = useRef(null);
|
|
5317
|
+
var container = ref || internalRef;
|
|
5293
5318
|
var resizer = useRef(null);
|
|
5294
5319
|
var handleResize = function (e) {
|
|
5295
5320
|
var mouseY = e.clientY;
|
|
@@ -5328,22 +5353,22 @@ function ResizeableDiv(_a) {
|
|
|
5328
5353
|
};
|
|
5329
5354
|
var isVerticalResizer = position === 'left' || position === 'right';
|
|
5330
5355
|
var thumbClass = isVerticalResizer && 'rotate-90';
|
|
5331
|
-
var containerWidth = typeof initialWidth === 'number' && !isNaN(initialWidth)
|
|
5356
|
+
var containerWidth = typeof initialWidth === 'number' && !Number.isNaN(initialWidth)
|
|
5332
5357
|
? "".concat(initialWidth, "px")
|
|
5333
5358
|
: initialWidth;
|
|
5334
|
-
var minimumWidth = typeof minWidth === 'number' && !isNaN(minWidth)
|
|
5359
|
+
var minimumWidth = typeof minWidth === 'number' && !Number.isNaN(minWidth)
|
|
5335
5360
|
? "".concat(minWidth, "px")
|
|
5336
5361
|
: minWidth;
|
|
5337
|
-
var maximumWidth = typeof maxWidth === 'number' && !isNaN(maxWidth)
|
|
5362
|
+
var maximumWidth = typeof maxWidth === 'number' && !Number.isNaN(maxWidth)
|
|
5338
5363
|
? "".concat(maxWidth, "px")
|
|
5339
5364
|
: maxWidth;
|
|
5340
|
-
var containerHeight = typeof initialHeight === 'number' && !isNaN(initialHeight)
|
|
5365
|
+
var containerHeight = typeof initialHeight === 'number' && !Number.isNaN(initialHeight)
|
|
5341
5366
|
? "".concat(initialHeight, "px")
|
|
5342
5367
|
: initialHeight;
|
|
5343
|
-
var minimumHeight = typeof minHeight === 'number' && !isNaN(minHeight)
|
|
5368
|
+
var minimumHeight = typeof minHeight === 'number' && !Number.isNaN(minHeight)
|
|
5344
5369
|
? "".concat(minHeight, "px")
|
|
5345
5370
|
: minHeight;
|
|
5346
|
-
var maximumHeight = typeof maxHeight === 'number' && !isNaN(maxHeight)
|
|
5371
|
+
var maximumHeight = typeof maxHeight === 'number' && !Number.isNaN(maxHeight)
|
|
5347
5372
|
? "".concat(maxHeight, "px")
|
|
5348
5373
|
: maxHeight;
|
|
5349
5374
|
var thumbZIndex = zIndex ? Number(zIndex) + 10 : 50;
|
|
@@ -5359,14 +5384,11 @@ function ResizeableDiv(_a) {
|
|
|
5359
5384
|
React.createElement("div", { className: "group peer absolute flex items-center justify-center ".concat(resizerContainerClass[position]), ref: resizer, onMouseDown: function () {
|
|
5360
5385
|
window.addEventListener('mousemove', handleResize);
|
|
5361
5386
|
window.addEventListener('mouseup', stopResize);
|
|
5362
|
-
}
|
|
5387
|
+
} },
|
|
5363
5388
|
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 } },
|
|
5364
5389
|
React.createElement(TbDots, { className: "text-bia-grey-light-30" }))),
|
|
5365
5390
|
React.createElement("div", { className: "h-full w-full peer-active:select-none ".concat(className) }, children)));
|
|
5366
5391
|
}
|
|
5367
|
-
ResizeableDiv.defaultProps = {
|
|
5368
|
-
position: 'left',
|
|
5369
|
-
};
|
|
5370
5392
|
|
|
5371
5393
|
var containerSizeConfig = {
|
|
5372
5394
|
minimized: 'w-[60px] min-w-[60px]',
|
|
@@ -5390,11 +5412,11 @@ var buttonConfig = {
|
|
|
5390
5412
|
2: 'pl-[68px]',
|
|
5391
5413
|
};
|
|
5392
5414
|
|
|
5393
|
-
|
|
5394
|
-
var _b = _a.color, color = _b === void 0 ? 'margueriteblue-dark-30' : _b,
|
|
5415
|
+
function SidebarContainerInner(_a, ref) {
|
|
5416
|
+
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"]);
|
|
5395
5417
|
var minimizedState = isMinimized ? 'minimized' : 'maximized';
|
|
5396
5418
|
var containerClass = cn$1("bg-bia-".concat(color), containerSizeConfig[minimizedState]);
|
|
5397
|
-
return (React.createElement("div", __assign({ ref: ref, className: cn$1('sidebar-container flex h-full flex-col justify-start py-[30px]
|
|
5419
|
+
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), Children.map(children, function (child) {
|
|
5398
5420
|
return isValidElement(child)
|
|
5399
5421
|
? cloneElement(child, {
|
|
5400
5422
|
isMinimized: isMinimized,
|
|
@@ -5404,12 +5426,13 @@ var SidebarContainer = forwardRef(function (_a, ref) {
|
|
|
5404
5426
|
})
|
|
5405
5427
|
: child;
|
|
5406
5428
|
})));
|
|
5407
|
-
}
|
|
5429
|
+
}
|
|
5430
|
+
var SidebarContainer = forwardRef(SidebarContainerInner);
|
|
5408
5431
|
SidebarContainer.displayName = 'SidebarContainer';
|
|
5409
5432
|
|
|
5410
|
-
|
|
5411
|
-
var _b = _a.color, color = _b === void 0 ? 'margueriteblue-dark-30' : _b,
|
|
5412
|
-
var
|
|
5433
|
+
function SidebarMenu(_a) {
|
|
5434
|
+
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;
|
|
5435
|
+
var _g = useState(false), isAllExpanded = _g[0], setIsAllExpanded = _g[1];
|
|
5413
5436
|
var minimizedMenuClass = isMinimized
|
|
5414
5437
|
? 'opacity-100 h-1 w-full delay-[600ms] duration-300 ease-[cubic-bezier(0.68,-0.1,0.32,2)]'
|
|
5415
5438
|
: 'opacity-0 h-1 w-full duration-500 ease-[cubic-bezier(0.32,-1,0.68,1)]';
|
|
@@ -5435,12 +5458,12 @@ var SidebarMenu = function (_a) {
|
|
|
5435
5458
|
})
|
|
5436
5459
|
: child;
|
|
5437
5460
|
})));
|
|
5438
|
-
}
|
|
5461
|
+
}
|
|
5439
5462
|
|
|
5440
|
-
|
|
5441
|
-
var id = _a.id, title = _a.title,
|
|
5463
|
+
function SidebarItemInner(_a, ref) {
|
|
5464
|
+
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"]);
|
|
5442
5465
|
var childDropdownRef = useRef(null);
|
|
5443
|
-
var
|
|
5466
|
+
var _o = useState(isExpand), isChildExpanded = _o[0], setIsChildExpanded = _o[1];
|
|
5444
5467
|
var childrenArray = Children.toArray(children);
|
|
5445
5468
|
var hasChildren = childrenArray.length > 0;
|
|
5446
5469
|
var nextLevel = Math.min(level + 1, 2);
|
|
@@ -5520,15 +5543,15 @@ var SidebarItem = forwardRef(function (_a, ref) {
|
|
|
5520
5543
|
};
|
|
5521
5544
|
return (React.createElement("div", { className: "relative" },
|
|
5522
5545
|
React.createElement("div", { className: "absolute left-[33px] top-[3px] flex h-5 w-5 items-center justify-center" },
|
|
5523
|
-
React.createElement("div", { className: cn$1('rounded-radius-full bg-white', isMinimized &&
|
|
5524
|
-
|
|
5525
|
-
|
|
5526
|
-
|
|
5546
|
+
React.createElement("div", { className: cn$1('rounded-radius-full bg-white', isMinimized &&
|
|
5547
|
+
notificationCount === undefined &&
|
|
5548
|
+
sumNotificationCounts(children) > 0
|
|
5549
|
+
? 'h-[6px] w-[6px] delay-[600ms] duration-300 ease-[cubic-bezier(0.68,-0.1,0.32,2)]'
|
|
5527
5550
|
: 'h-0 w-0 duration-500 ease-[cubic-bezier(0.32,-1,0.68,1)]') })),
|
|
5528
5551
|
React.createElement("div", { className: cn$1('sidebar-item relative flex h-fit items-center', itemClass) },
|
|
5529
5552
|
level === 2 && (React.createElement("div", { className: "relative left-[39px] h-full w-[1px] bg-bia-white" })),
|
|
5530
5553
|
React.createElement("div", { className: "group relative grow" },
|
|
5531
|
-
React.createElement("button", __assign({ ref: ref }, restProps, { onClick: function () {
|
|
5554
|
+
React.createElement("button", __assign({ type: "button", ref: ref }, restProps, { onClick: function () {
|
|
5532
5555
|
if (hasChildren) {
|
|
5533
5556
|
setIsChildExpanded(function (prev) { return !prev; });
|
|
5534
5557
|
}
|
|
@@ -5546,8 +5569,7 @@ var SidebarItem = forwardRef(function (_a, ref) {
|
|
|
5546
5569
|
? 'opacity-0 delay-200 duration-300 ease-in-out'
|
|
5547
5570
|
: 'opacity-100 delay-[550ms] duration-500 ease-in-out') },
|
|
5548
5571
|
(notificationCount !== undefined ||
|
|
5549
|
-
(!isChildExpanded &&
|
|
5550
|
-
sumNotificationCounts(children) > 0)) && (React.createElement(TagLabel, { text: notificationLabel, color: "white", size: "tn" })),
|
|
5572
|
+
(!isChildExpanded && sumNotificationCounts(children) > 0)) && (React.createElement(TagLabel, { text: notificationLabel, color: "white", size: "tn" })),
|
|
5551
5573
|
React.createElement("div", { className: cn$1(chevronClass) },
|
|
5552
5574
|
React.createElement(TbChevronRight, { className: cn$1('text-bia-white transition-transform duration-300 ease-in-out', isChildExpanded ? 'rotate-90' : ''), size: 18 })))),
|
|
5553
5575
|
React.createElement("div", { className: cn$1('pointer-events-none absolute inset-0 rounded-radius-lg bg-black transition-opacity duration-200', overlayClass) })),
|
|
@@ -5555,16 +5577,17 @@ var SidebarItem = forwardRef(function (_a, ref) {
|
|
|
5555
5577
|
!isMinimized && hasChildren && isChildExpanded && renderChildren(),
|
|
5556
5578
|
React.createElement("div", { className: "dropdown-anchor absolute left-[60px] top-0", ref: childDropdownRef }),
|
|
5557
5579
|
isMinimized && hasChildren && (React.createElement(DropdownContainer, { open: isChildExpanded, onClose: function () { return setIsChildExpanded(false); }, anchorRef: childDropdownRef }, renderDropdownItems()))));
|
|
5558
|
-
}
|
|
5580
|
+
}
|
|
5581
|
+
var SidebarItem = forwardRef(SidebarItemInner);
|
|
5559
5582
|
SidebarItem.displayName = 'SidebarItem';
|
|
5560
5583
|
|
|
5561
|
-
|
|
5562
|
-
var id = _a.id, username = _a.username, role = _a.role,
|
|
5584
|
+
function SidebarProfileInner(_a, ref) {
|
|
5585
|
+
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"]);
|
|
5563
5586
|
var childDropdownRef = useRef(null);
|
|
5564
|
-
var
|
|
5587
|
+
var _o = useState(isExpand), isChildExpanded = _o[0], setIsChildExpanded = _o[1];
|
|
5565
5588
|
var childrenArray = Children.toArray(children);
|
|
5566
5589
|
var hasChildren = childrenArray.length > 0;
|
|
5567
|
-
var isActive = activeId === id;
|
|
5590
|
+
var isActive = active || activeId === id;
|
|
5568
5591
|
var containerState = isMinimized ? 'minimized' : 'maximized';
|
|
5569
5592
|
var isSidebarProfileElement = function (node) {
|
|
5570
5593
|
return isValidElement(node) && typeof node.props === 'object';
|
|
@@ -5636,38 +5659,35 @@ var SidebarProfile = forwardRef(function (_a, ref) {
|
|
|
5636
5659
|
})));
|
|
5637
5660
|
});
|
|
5638
5661
|
};
|
|
5639
|
-
return (React.createElement("div", { className: "relative" },
|
|
5662
|
+
return (React.createElement("div", { className: "relative w-full" },
|
|
5640
5663
|
React.createElement("div", { className: "absolute left-[33px] top-[3px] flex h-5 w-5 items-center justify-center" },
|
|
5641
|
-
React.createElement("div", { className: cn$1('rounded-radius-full bg-white', isMinimized &&
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
|
|
5664
|
+
React.createElement("div", { className: cn$1('rounded-radius-full bg-white', isMinimized &&
|
|
5665
|
+
notificationCount === undefined &&
|
|
5666
|
+
sumNotificationCounts(children) > 0
|
|
5667
|
+
? 'h-[6px] w-[6px] delay-[600ms] duration-300 ease-[cubic-bezier(0.68,-0.1,0.32,2)]'
|
|
5645
5668
|
: 'h-0 w-0 duration-500 ease-[cubic-bezier(0.32,-1,0.68,1)]') })),
|
|
5646
5669
|
React.createElement("div", { className: cn$1('sidebar-item group/profile relative flex h-fit items-center', profileClass) },
|
|
5647
|
-
React.createElement("div", { className: "group relative grow" },
|
|
5648
|
-
React.createElement("button", __assign({ ref: ref }, restProps, { onClick: function () {
|
|
5670
|
+
React.createElement("div", { className: "group relative min-w-0 grow" },
|
|
5671
|
+
React.createElement("button", __assign({ type: "button", ref: ref }, restProps, { onClick: function () {
|
|
5672
|
+
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
5673
|
+
setActiveId(id);
|
|
5649
5674
|
if (hasChildren) {
|
|
5650
5675
|
setIsChildExpanded(function (prev) { return !prev; });
|
|
5651
5676
|
}
|
|
5652
|
-
else {
|
|
5653
|
-
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
5654
|
-
setActiveId(id);
|
|
5655
|
-
}
|
|
5656
5677
|
}, 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) }),
|
|
5657
5678
|
avatarImage,
|
|
5658
|
-
React.createElement("div", { className: "flex flex-col" },
|
|
5659
|
-
React.createElement(Text, { variant: "normal-text", className: cn$1('truncate text-bia-white delay-[400ms]', isMinimized
|
|
5679
|
+
React.createElement("div", { className: "flex min-w-0 flex-col" },
|
|
5680
|
+
React.createElement(Text, { variant: "normal-text", className: cn$1('truncate text-left text-bia-white delay-[400ms]', isMinimized
|
|
5660
5681
|
? 'opacity-0 duration-300 ease-in-out'
|
|
5661
5682
|
: 'opacity-100 delay-1000 duration-700 ease-in-out') }, username),
|
|
5662
5683
|
React.createElement(Text, { variant: "small-text", className: cn$1('truncate text-left text-bia-white delay-[400ms]', isMinimized
|
|
5663
5684
|
? 'opacity-0 duration-300 ease-in-out'
|
|
5664
5685
|
: 'opacity-50 delay-1000 duration-700 ease-in-out') }, role)),
|
|
5665
|
-
React.createElement("div", { className: cn$1('ml-auto flex items-center gap-x-[5px]', isMinimized
|
|
5686
|
+
React.createElement("div", { className: cn$1('ml-auto flex shrink-0 items-center gap-x-[5px]', isMinimized
|
|
5666
5687
|
? 'opacity-0 delay-200 duration-300 ease-in-out'
|
|
5667
5688
|
: 'opacity-100 delay-[550ms] duration-500 ease-in-out') },
|
|
5668
5689
|
(notificationCount !== undefined ||
|
|
5669
|
-
(!isChildExpanded &&
|
|
5670
|
-
sumNotificationCounts(children) > 0)) && (React.createElement(TagLabel, { text: notificationLabel, color: "white", size: "tn" })),
|
|
5690
|
+
(!isChildExpanded && sumNotificationCounts(children) > 0)) && (React.createElement(TagLabel, { text: notificationLabel, color: "white", size: "tn" })),
|
|
5671
5691
|
React.createElement("div", { className: cn$1(chevronClass) },
|
|
5672
5692
|
React.createElement(TbChevronRight, { className: cn$1('text-bia-white transition-transform duration-300 ease-in-out', isChildExpanded ? 'rotate-90' : '', isActive || isPathActive
|
|
5673
5693
|
? 'opacity-100'
|
|
@@ -5677,7 +5697,8 @@ var SidebarProfile = forwardRef(function (_a, ref) {
|
|
|
5677
5697
|
!isMinimized && hasChildren && isChildExpanded && renderChildren(),
|
|
5678
5698
|
React.createElement("div", { className: "dropdown-anchor absolute left-[60px] top-0", ref: childDropdownRef }),
|
|
5679
5699
|
isMinimized && hasChildren && (React.createElement(DropdownContainer, { open: isChildExpanded, onClose: function () { return setIsChildExpanded(false); }, anchorRef: childDropdownRef }, renderDropdownItems()))));
|
|
5680
|
-
}
|
|
5700
|
+
}
|
|
5701
|
+
var SidebarProfile = forwardRef(SidebarProfileInner);
|
|
5681
5702
|
SidebarProfile.displayName = 'SidebarProfile';
|
|
5682
5703
|
|
|
5683
5704
|
function Slider(_a) {
|
|
@@ -5687,14 +5708,14 @@ function Slider(_a) {
|
|
|
5687
5708
|
var newValue = Number(event.target.value);
|
|
5688
5709
|
setsliderValue(newValue);
|
|
5689
5710
|
};
|
|
5690
|
-
return (React.createElement("input", { type: "range", min: 0, max: 100, step: 1, value: sliderValue, onChange: handleChange, disabled: disabled, className: "
|
|
5711
|
+
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" }));
|
|
5691
5712
|
}
|
|
5692
5713
|
|
|
5693
5714
|
function Spinner() {
|
|
5694
|
-
return (React.createElement("div", { className: "flex
|
|
5695
|
-
React.createElement("svg", { className: "
|
|
5696
|
-
React.createElement("circle", { className: "
|
|
5697
|
-
React.createElement("circle", { className: "
|
|
5715
|
+
return (React.createElement("div", { className: "flex items-center justify-center" },
|
|
5716
|
+
React.createElement("svg", { className: "h-16 w-16 animate-spin", viewBox: "0 0 50 50" },
|
|
5717
|
+
React.createElement("circle", { className: "text-bia-blue-light-80 opacity-25", cx: "25", cy: "25", r: "20", stroke: "currentColor", strokeWidth: "3", fill: "none" }),
|
|
5718
|
+
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' } }))));
|
|
5698
5719
|
}
|
|
5699
5720
|
|
|
5700
5721
|
var configTab = {
|
|
@@ -5717,7 +5738,7 @@ var configTab = {
|
|
|
5717
5738
|
};
|
|
5718
5739
|
|
|
5719
5740
|
function Tab(_a) {
|
|
5720
|
-
var
|
|
5741
|
+
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"]);
|
|
5721
5742
|
var disabledKeyTab = disabled || active ? ' pointer-events-none' : '';
|
|
5722
5743
|
var cursor;
|
|
5723
5744
|
if (disabled) {
|
|
@@ -5738,9 +5759,9 @@ function Tab(_a) {
|
|
|
5738
5759
|
var activeKeyTab = active
|
|
5739
5760
|
? 'group-disabled:text-bia-coolgrey-disabled text-primary-black'
|
|
5740
5761
|
: 'text-bia-coolgrey group-hover:text-bia-coolgrey-hover group-active:text-bia-coolgrey-active group-disabled:text-bia-coolgrey-disabled';
|
|
5741
|
-
var buttonClassName = "".concat(horizontalButtonStyle, " ").concat(disabledKeyTab, " ").concat(fit, " ").concat(className
|
|
5762
|
+
var buttonClassName = "".concat(horizontalButtonStyle, " ").concat(disabledKeyTab, " ").concat(fit, " ").concat(className || '');
|
|
5742
5763
|
return (React.createElement("div", { className: "".concat(mode === 'horizontal' ? 'h-full' : 'w-full', " ").concat(cursor) },
|
|
5743
|
-
React.createElement("button", __assign({ type: "button", className: "flex
|
|
5764
|
+
React.createElement("button", __assign({ type: "button", className: "group relative flex items-stretch justify-between outline-none ".concat(buttonClassName), disabled: disabled }, rest),
|
|
5744
5765
|
React.createElement("div", { className: "flex items-center justify-center ".concat(buttonContentStyle) },
|
|
5745
5766
|
React.createElement("div", { className: "flex items-center justify-center " },
|
|
5746
5767
|
React.createElement("div", { className: "flex items-center space-x-1 text-nowrap ".concat(activeKeyTab, " ").concat(configTab[size].text) },
|
|
@@ -5826,15 +5847,15 @@ var TabMenu = forwardRef(function (props, ref) {
|
|
|
5826
5847
|
});
|
|
5827
5848
|
TabMenu.displayName = 'TabMenu';
|
|
5828
5849
|
|
|
5829
|
-
|
|
5850
|
+
function Table(_a) {
|
|
5830
5851
|
var children = _a.children, rest = __rest(_a, ["children"]);
|
|
5831
5852
|
return React.createElement("table", __assign({}, rest), children);
|
|
5832
|
-
}
|
|
5853
|
+
}
|
|
5833
5854
|
|
|
5834
|
-
|
|
5855
|
+
function TableBody(_a) {
|
|
5835
5856
|
var children = _a.children, rest = __rest(_a, ["children"]);
|
|
5836
5857
|
return React.createElement("tbody", __assign({}, rest), children);
|
|
5837
|
-
}
|
|
5858
|
+
}
|
|
5838
5859
|
|
|
5839
5860
|
var sizeConfig = {
|
|
5840
5861
|
md: 'px-2.5 py-[9px]',
|
|
@@ -5864,36 +5885,27 @@ function TableCell(_a) {
|
|
|
5864
5885
|
}
|
|
5865
5886
|
return (React.createElement("td", __assign({ className: "bianic-table-cell table-col ".concat(columnClass, " break-words") }, props), children));
|
|
5866
5887
|
}
|
|
5867
|
-
TableCell.defaultProps = {
|
|
5868
|
-
lined: false,
|
|
5869
|
-
size: 'md',
|
|
5870
|
-
variant: 'body',
|
|
5871
|
-
};
|
|
5872
5888
|
|
|
5873
|
-
|
|
5889
|
+
function TableHead(_a) {
|
|
5874
5890
|
var children = _a.children, rest = __rest(_a, ["children"]);
|
|
5875
5891
|
return React.createElement("thead", __assign({}, rest), children);
|
|
5876
|
-
}
|
|
5892
|
+
}
|
|
5877
5893
|
|
|
5878
|
-
|
|
5894
|
+
function TableRow(_a) {
|
|
5879
5895
|
_a.variant; var children = _a.children, rest = __rest(_a, ["variant", "children"]);
|
|
5880
5896
|
return React.createElement("tr", __assign({}, rest), children);
|
|
5881
|
-
}
|
|
5897
|
+
}
|
|
5882
5898
|
|
|
5883
|
-
|
|
5899
|
+
function BlockLoading(_a) {
|
|
5884
5900
|
var _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.backgroundColor, backgroundColor = _c === void 0 ? 'bg-bia-grey-light-80' : _c;
|
|
5885
5901
|
return (React.createElement("div", { className: "block-loading flex h-full w-full items-center justify-center ".concat(backgroundColor, " ").concat(className) },
|
|
5886
5902
|
React.createElement(Spinner, null)));
|
|
5887
|
-
}
|
|
5903
|
+
}
|
|
5888
5904
|
|
|
5889
5905
|
var EmptyIcon = "Empty.svg";
|
|
5890
5906
|
|
|
5891
|
-
|
|
5892
|
-
var
|
|
5893
|
-
[
|
|
5894
|
-
React.createElement(ContextualButton, { key: "refresh", icon: React.createElement(TbRefresh, { size: 18 }), disabled: true }),
|
|
5895
|
-
React.createElement(ContextualButton, { key: "zoom", icon: React.createElement(TbZoom, { size: 18 }), disabled: true }),
|
|
5896
|
-
];
|
|
5907
|
+
function EmptyTable(_a) {
|
|
5908
|
+
var _b = _a.content, content = _b === void 0 ? undefined : _b, subContent = _a.subContent;
|
|
5897
5909
|
return (React.createElement("div", { className: "h-[368px] w-full rounded-b-radius-lg bg-bia-grey-light-80 pb-[63px]" },
|
|
5898
5910
|
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]" },
|
|
5899
5911
|
React.createElement("div", { className: "col-span-1 h-2 rounded-radius-sm bg-bia-grey-light-50" }),
|
|
@@ -5903,18 +5915,18 @@ var EmptyTable = function (_a) {
|
|
|
5903
5915
|
React.createElement("div", { className: "flex flex-col items-center justify-center rounded-md p-5" },
|
|
5904
5916
|
React.createElement("img", { src: EmptyIcon, alt: "Empty State", style: { height: 72, width: 72 } }),
|
|
5905
5917
|
React.createElement("div", { className: "mt-5 text-center" },
|
|
5906
|
-
content && (React.createElement(Text, { variant:
|
|
5918
|
+
content && (React.createElement(Text, { variant: "small-text-semibold", extended: "block text-bia-black" }, content)),
|
|
5907
5919
|
subContent && (React.createElement(Text, { variant: "small-text", extended: "mt-2 block text-bia-coolgrey'}" }, subContent))))));
|
|
5908
|
-
}
|
|
5920
|
+
}
|
|
5909
5921
|
|
|
5910
5922
|
var tableSizeOption = [10, 20, 50, 100, 999];
|
|
5911
|
-
|
|
5912
|
-
var currentPage = _a.currentPage, totalPages = _a.totalPages, pageSize = _a.pageSize, setCurrentPage = _a.setCurrentPage, setPageSize = _a.setPageSize,
|
|
5923
|
+
function TableFooterController(_a) {
|
|
5924
|
+
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;
|
|
5913
5925
|
// Table Button
|
|
5914
5926
|
var tableSizeRef = useRef(null);
|
|
5915
|
-
var
|
|
5916
|
-
var handlePageSizeChange = function (
|
|
5917
|
-
setPageSize(
|
|
5927
|
+
var _d = useState(false), isShownTableSizeDropdown = _d[0], setIsShownTableSizeDropdown = _d[1];
|
|
5928
|
+
var handlePageSizeChange = function (newPageSize) {
|
|
5929
|
+
setPageSize(newPageSize);
|
|
5918
5930
|
setCurrentPage(1);
|
|
5919
5931
|
};
|
|
5920
5932
|
var pageSizeDisplay = pageSize === 999 ? 'All' : pageSize;
|
|
@@ -5924,13 +5936,13 @@ var TableFooterController = function (_a) {
|
|
|
5924
5936
|
})));
|
|
5925
5937
|
var paddingSize = size === 'md' ? 'py-2.5 pt-[9px]' : 'py-[3.5px] pt-[4.5px]';
|
|
5926
5938
|
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) },
|
|
5927
|
-
React.createElement("div", { className: "action-container flex gap-[5px]" }, totalPages > 0 && (React.createElement(PaginationBar, { size: "sm", currentPage: currentPage, totalPages: totalPages, onPageChange: setCurrentPage, position:
|
|
5939
|
+
React.createElement("div", { className: "action-container flex gap-[5px]" }, totalPages > 0 && (React.createElement(PaginationBar, { size: "sm", currentPage: currentPage, totalPages: totalPages, onPageChange: setCurrentPage, position: "center" }))),
|
|
5928
5940
|
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" }),
|
|
5929
5941
|
tableSizeDropdown));
|
|
5930
|
-
}
|
|
5942
|
+
}
|
|
5931
5943
|
|
|
5932
|
-
|
|
5933
|
-
var _b = _a.size, size = _b === void 0 ? 'sm' : _b,
|
|
5944
|
+
function TableHeaderController(_a) {
|
|
5945
|
+
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;
|
|
5934
5946
|
var isShowHelperText = totalData || firstIndex || lastIndex;
|
|
5935
5947
|
var paddingSize = size === 'md' ? 'py-[13px] pt-[14px] ' : 'py-[7px] pt-2';
|
|
5936
5948
|
var textSize = size === 'md' ? 'normal-text' : 'small-text';
|
|
@@ -5944,15 +5956,15 @@ var TableHeaderController = function (_a) {
|
|
|
5944
5956
|
lastIndex,
|
|
5945
5957
|
' ',
|
|
5946
5958
|
totalData ? "of ".concat(totalData) : '')))));
|
|
5947
|
-
}
|
|
5959
|
+
}
|
|
5948
5960
|
|
|
5949
|
-
|
|
5961
|
+
function TableSearchInput(_a) {
|
|
5950
5962
|
var isShow = _a.isShow, value = _a.value, onChange = _a.onChange, _b = _a.placeholder, placeholder = _b === void 0 ? 'Search Data' : _b;
|
|
5951
5963
|
if (!isShow)
|
|
5952
5964
|
return null;
|
|
5953
5965
|
return (React.createElement("div", { className: "flex max-h-[22px] w-full items-center gap-x-1 pb-1 ps-[5px] font-segoe " },
|
|
5954
5966
|
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 })));
|
|
5955
|
-
}
|
|
5967
|
+
}
|
|
5956
5968
|
|
|
5957
5969
|
var colorConfigs = {
|
|
5958
5970
|
default: 'bg-bia-black',
|
|
@@ -5963,7 +5975,9 @@ var colorConfigs = {
|
|
|
5963
5975
|
};
|
|
5964
5976
|
|
|
5965
5977
|
function Toaster(_a) {
|
|
5966
|
-
var children = _a.children,
|
|
5978
|
+
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;
|
|
5979
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars
|
|
5980
|
+
_a.position;
|
|
5967
5981
|
// Default styles for the toaster based on variant
|
|
5968
5982
|
var colorStyles = "".concat(colorConfigs[variant], " text-bia-white");
|
|
5969
5983
|
// Logic for content alignment based on `isHeaderShow`
|
|
@@ -5978,7 +5992,7 @@ function Toaster(_a) {
|
|
|
5978
5992
|
React.createElement("span", { className: "mr-[10px] flex min-w-[3px] rounded-r-[10px] bg-bia-white/50" }),
|
|
5979
5993
|
content,
|
|
5980
5994
|
React.createElement("div", { className: "flex items-start pr-[11px] pt-[1px]" },
|
|
5981
|
-
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" },
|
|
5995
|
+
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" },
|
|
5982
5996
|
React.createElement(TbX, { size: 14 })))));
|
|
5983
5997
|
}
|
|
5984
5998
|
|
|
@@ -9270,8 +9284,8 @@ function cn() {
|
|
|
9270
9284
|
}
|
|
9271
9285
|
return twMerge(clsx(inputs));
|
|
9272
9286
|
}
|
|
9273
|
-
|
|
9274
|
-
var steps = _a.steps, activeStep = _a.activeStep, _b = _a.size, size = _b === void 0 ? 'md' : _b,
|
|
9287
|
+
function StandardHorizontalStepper(_a) {
|
|
9288
|
+
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;
|
|
9275
9289
|
var isSmall = size === 'sm';
|
|
9276
9290
|
var connectorColor = "bg-bia-".concat(color);
|
|
9277
9291
|
var stepTextColor = "text-bia-".concat(color);
|
|
@@ -9296,19 +9310,139 @@ var HorizontalStepper = function (_a) {
|
|
|
9296
9310
|
var isInteractive = Boolean(onStepClick);
|
|
9297
9311
|
return (React.createElement("div", { key: (_a = step.id) !== null && _a !== void 0 ? _a : index, className: "group relative flex flex-1 flex-col items-center" },
|
|
9298
9312
|
React.createElement("div", { className: "relative my-2 flex w-full items-center" },
|
|
9299
|
-
React.createElement("div", { className: cn('h-0.5 flex-1 transition-colors duration-200', isFirst
|
|
9313
|
+
React.createElement("div", { className: cn('h-0.5 flex-1 transition-colors duration-200', isFirst && (showLabels ? 'opacity-0' : 'hidden'), index <= activeStep
|
|
9300
9314
|
? connectorColor
|
|
9301
9315
|
: 'bg-bia-coolgrey-light-50') }),
|
|
9302
9316
|
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' &&
|
|
9303
|
-
'border-bia-coolgrey-light-50 bg-bia-white text-bia-black') },
|
|
9304
|
-
|
|
9317
|
+
'border-bia-coolgrey-light-50 bg-bia-white text-bia-black') }, (function () {
|
|
9318
|
+
if (step.icon)
|
|
9319
|
+
return step.icon;
|
|
9320
|
+
if (status === 'processed' && processedIcon)
|
|
9321
|
+
return processedIcon;
|
|
9322
|
+
if (status === 'current')
|
|
9323
|
+
return (currentIcon || (React.createElement(TbCircleFilled, { size: isSmall ? 14 : 18, className: stepTextColor })));
|
|
9324
|
+
return (React.createElement(Text, { variant: isSmall ? 'small-text-semibold' : 'normal-text-semibold', className: status === 'processed'
|
|
9325
|
+
? stepTextColor
|
|
9326
|
+
: 'text-bia-black' }, index + 1));
|
|
9327
|
+
})()),
|
|
9328
|
+
React.createElement("div", { className: cn('h-0.5 flex-1 transition-colors duration-200', isLast && (showLabels ? 'opacity-0' : 'hidden'), index < activeStep
|
|
9305
9329
|
? connectorColor
|
|
9306
9330
|
: 'bg-bia-coolgrey-light-50') })),
|
|
9307
9331
|
showLabels && (step.label || step.description) && (React.createElement("div", { className: "mt-2 flex max-w-[140px] flex-col gap-y-[3px] text-center" },
|
|
9308
9332
|
step.label && (React.createElement(Text, { variant: isSmall ? 'small-text-semibold' : 'normal-text-semibold', className: "text-bia-black" }, step.label)),
|
|
9309
9333
|
step.description && (React.createElement(Text, { variant: isSmall ? 'small-text' : 'normal-text', className: "text-bia-coolgrey-light-50" }, step.description))))));
|
|
9310
9334
|
})));
|
|
9311
|
-
}
|
|
9335
|
+
}
|
|
9336
|
+
|
|
9337
|
+
var navbarItemConfig = {
|
|
9338
|
+
current: 'cursor-default',
|
|
9339
|
+
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',
|
|
9340
|
+
static: 'cursor-default',
|
|
9341
|
+
disabled: 'cursor-not-allowed',
|
|
9342
|
+
};
|
|
9343
|
+
var navbarCircleConfig = {
|
|
9344
|
+
filledBase: 'bg-bia-white border-bia-white',
|
|
9345
|
+
currentDefault: 'bg-bia-white border-bia-white text-bia-black',
|
|
9346
|
+
other: 'border-bia-white text-bia-white',
|
|
9347
|
+
disabled: 'border-bia-white-transparent-40 text-bia-white-transparent-40',
|
|
9348
|
+
};
|
|
9349
|
+
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))?)$/;
|
|
9350
|
+
var navbarLabelConfig = {
|
|
9351
|
+
enabled: 'whitespace-nowrap leading-4 text-bia-white',
|
|
9352
|
+
disabled: 'whitespace-nowrap leading-4 text-bia-white-transparent-40',
|
|
9353
|
+
};
|
|
9354
|
+
var navbarChevronConfig = {
|
|
9355
|
+
enabled: 'shrink-0 text-bia-white',
|
|
9356
|
+
disabled: 'shrink-0 text-bia-white-transparent-40',
|
|
9357
|
+
};
|
|
9358
|
+
|
|
9359
|
+
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 : ''; };
|
|
9360
|
+
function resolveItemState(isCurrent, isDisabled, isClickable) {
|
|
9361
|
+
if (isCurrent)
|
|
9362
|
+
return 'current';
|
|
9363
|
+
if (isDisabled)
|
|
9364
|
+
return 'disabled';
|
|
9365
|
+
if (isClickable)
|
|
9366
|
+
return 'clickable';
|
|
9367
|
+
return 'static';
|
|
9368
|
+
}
|
|
9369
|
+
function resolveCircleClass(isCurrent, isDisabled, isProcessed, color) {
|
|
9370
|
+
if (isDisabled)
|
|
9371
|
+
return navbarCircleConfig.disabled;
|
|
9372
|
+
if (isCurrent || isProcessed) {
|
|
9373
|
+
if (typeof color !== 'string' || !BIA_COLOR_NAME.test(color)) {
|
|
9374
|
+
return navbarCircleConfig.currentDefault;
|
|
9375
|
+
}
|
|
9376
|
+
return "".concat(navbarCircleConfig.filledBase, " text-bia-").concat(color);
|
|
9377
|
+
}
|
|
9378
|
+
return navbarCircleConfig.other;
|
|
9379
|
+
}
|
|
9380
|
+
function resolveCircleContent(step, index, isProcessed, isCurrent, processedIcon, currentIcon, circleClass) {
|
|
9381
|
+
if (step.icon)
|
|
9382
|
+
return step.icon;
|
|
9383
|
+
if (isProcessed && processedIcon)
|
|
9384
|
+
return processedIcon;
|
|
9385
|
+
if (isCurrent && currentIcon)
|
|
9386
|
+
return currentIcon;
|
|
9387
|
+
return (React.createElement(Text, { variant: "tiny-text", className: "leading-none ".concat(circleTextColor(circleClass)) }, index + 1));
|
|
9388
|
+
}
|
|
9389
|
+
function NavbarHorizontalStepper(_a) {
|
|
9390
|
+
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;
|
|
9391
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9392
|
+
_a.size;
|
|
9393
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9394
|
+
_a.showLabels;
|
|
9395
|
+
return (React.createElement("nav", { "aria-label": "Progress", className: cn$1('flex', className) },
|
|
9396
|
+
React.createElement("ol", { className: "flex items-center" }, steps.map(function (step, index) {
|
|
9397
|
+
var _a;
|
|
9398
|
+
var isCurrent = index === activeStep;
|
|
9399
|
+
var isProcessed = index < activeStep;
|
|
9400
|
+
var isDisabled = !isCurrent && Boolean(step.disabled);
|
|
9401
|
+
var isClickable = !isCurrent && !isDisabled && Boolean(onStepClick);
|
|
9402
|
+
var itemState = resolveItemState(isCurrent, isDisabled, isClickable);
|
|
9403
|
+
var itemClass = cn$1('flex h-6 items-center gap-[5px] px-[5px] py-[3px]', !isCurrent && 'rounded-radius-sm', navbarItemConfig[itemState]);
|
|
9404
|
+
var circleClass = resolveCircleClass(isCurrent, isDisabled, isProcessed, color);
|
|
9405
|
+
var labelClass = isDisabled
|
|
9406
|
+
? navbarLabelConfig.disabled
|
|
9407
|
+
: navbarLabelConfig.enabled;
|
|
9408
|
+
var isChevronDisabled = !isCurrent && Boolean(step.disabled);
|
|
9409
|
+
var circleContent = resolveCircleContent(step, index, isProcessed, isCurrent, processedIcon, currentIcon, circleClass);
|
|
9410
|
+
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));
|
|
9411
|
+
var label = step.label ? (React.createElement(Text, { variant: "tiny-text", className: labelClass }, step.label)) : null;
|
|
9412
|
+
var content = (React.createElement(React.Fragment, null,
|
|
9413
|
+
circle,
|
|
9414
|
+
label));
|
|
9415
|
+
var stepElement;
|
|
9416
|
+
if (isCurrent) {
|
|
9417
|
+
stepElement = (React.createElement("span", { "aria-current": "step", className: itemClass }, content));
|
|
9418
|
+
}
|
|
9419
|
+
else if (isClickable) {
|
|
9420
|
+
stepElement = (React.createElement("button", { type: "button", onClick: function () { return onStepClick === null || onStepClick === void 0 ? void 0 : onStepClick(index); }, className: itemClass }, content));
|
|
9421
|
+
}
|
|
9422
|
+
else if (isDisabled && onStepClick) {
|
|
9423
|
+
stepElement = (React.createElement("button", { type: "button", disabled: true, className: itemClass }, content));
|
|
9424
|
+
}
|
|
9425
|
+
else {
|
|
9426
|
+
stepElement = React.createElement("span", { className: itemClass }, content);
|
|
9427
|
+
}
|
|
9428
|
+
return (React.createElement("li", { key: (_a = step.id) !== null && _a !== void 0 ? _a : index, className: "flex items-center" },
|
|
9429
|
+
index > 0 && (React.createElement(TbChevronRight, { size: 14, "aria-hidden": "true", className: isChevronDisabled
|
|
9430
|
+
? navbarChevronConfig.disabled
|
|
9431
|
+
: navbarChevronConfig.enabled })),
|
|
9432
|
+
stepElement));
|
|
9433
|
+
}))));
|
|
9434
|
+
}
|
|
9435
|
+
|
|
9436
|
+
var VARIANT_UNION = ['default', 'navbar'];
|
|
9437
|
+
function HorizontalStepper(props) {
|
|
9438
|
+
var variant = props.variant, rest = __rest(props, ["variant"]);
|
|
9439
|
+
switch (validUnion(variant, VARIANT_UNION)) {
|
|
9440
|
+
case 'navbar':
|
|
9441
|
+
return (React.createElement(NavbarHorizontalStepper, __assign({}, rest)));
|
|
9442
|
+
default:
|
|
9443
|
+
return (React.createElement(StandardHorizontalStepper, __assign({}, rest)));
|
|
9444
|
+
}
|
|
9445
|
+
}
|
|
9312
9446
|
|
|
9313
9447
|
var variantConfig = {
|
|
9314
9448
|
upcoming: 'bg-white border-2 border-coolgrey-light-50',
|
|
@@ -9332,8 +9466,8 @@ var icon = {
|
|
|
9332
9466
|
upcoming: '',
|
|
9333
9467
|
};
|
|
9334
9468
|
|
|
9335
|
-
|
|
9336
|
-
var
|
|
9469
|
+
function StepperItem(_a) {
|
|
9470
|
+
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;
|
|
9337
9471
|
var stepperCardClass = withBorder
|
|
9338
9472
|
? "border border-bia-grey-dark-10 p-[15px] rounded-radius-lg ".concat(className)
|
|
9339
9473
|
: className;
|
|
@@ -9343,10 +9477,10 @@ var StepperItem = function (_a) {
|
|
|
9343
9477
|
React.createElement("div", { className: "flex h-6 w-6 items-center justify-center rounded-radius-full ".concat(variant ? variantConfig[variant] : '', " box-border") }, icon[variant]),
|
|
9344
9478
|
React.createElement("div", { className: "grow ".concat(variant ? lineVariantConfig[variant] : '') })),
|
|
9345
9479
|
React.createElement("div", { className: "stepper-card mb-5 w-full text-justify ".concat(stepperCardClass) }, children)));
|
|
9346
|
-
}
|
|
9480
|
+
}
|
|
9347
9481
|
|
|
9348
9482
|
function Window(_a) {
|
|
9349
|
-
var _b = _a.size, size = _b === void 0 ? 'sm' : _b,
|
|
9483
|
+
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"]);
|
|
9350
9484
|
var windowSize;
|
|
9351
9485
|
// sizing logic
|
|
9352
9486
|
switch (size) {
|
|
@@ -9407,6 +9541,71 @@ function getRelativeTime(date) {
|
|
|
9407
9541
|
return "".concat(Math.floor(diffMs / month), " months ago");
|
|
9408
9542
|
return "".concat(Math.floor(diffMs / year), " years ago");
|
|
9409
9543
|
}
|
|
9544
|
+
/**
|
|
9545
|
+
* formatDateTime
|
|
9546
|
+
* Accepts a date value and formats it into one of several human-readable
|
|
9547
|
+
* or machine-sortable string formats.
|
|
9548
|
+
* Formats:
|
|
9549
|
+
* - 'short': "'24 Feb 4"
|
|
9550
|
+
* - 'long' (default): "4 February 2024"
|
|
9551
|
+
* - 'long-with-time': "4 February 2024, 16:30"
|
|
9552
|
+
* - 'table': "2024-02-04"
|
|
9553
|
+
* - 'table-with-time': "2024-02-04, 16:30"
|
|
9554
|
+
* - 'time24': "16:30"
|
|
9555
|
+
*/
|
|
9556
|
+
var formatDateTime = function (dateString, type) {
|
|
9557
|
+
if (type === void 0) { type = null; }
|
|
9558
|
+
var date = new Date(dateString);
|
|
9559
|
+
var year;
|
|
9560
|
+
var month = '';
|
|
9561
|
+
var day = '';
|
|
9562
|
+
var timeResult = date.toLocaleTimeString('en-GB', {
|
|
9563
|
+
hour: '2-digit',
|
|
9564
|
+
minute: '2-digit',
|
|
9565
|
+
hour12: false,
|
|
9566
|
+
});
|
|
9567
|
+
switch (type) {
|
|
9568
|
+
case 'short':
|
|
9569
|
+
// example: '24 Feb 4
|
|
9570
|
+
year = date.getFullYear().toString().substring(2, 4);
|
|
9571
|
+
month = date.toLocaleString('en-US', { month: 'short' });
|
|
9572
|
+
day = String(date.getDate());
|
|
9573
|
+
return "'".concat(year, " ").concat(month, " ").concat(day);
|
|
9574
|
+
case 'long':
|
|
9575
|
+
// example: 4 February 2024
|
|
9576
|
+
year = date.getFullYear().toString();
|
|
9577
|
+
month = date.toLocaleString('en-US', { month: 'long' });
|
|
9578
|
+
day = String(date.getDate());
|
|
9579
|
+
return "".concat(day, " ").concat(month, " ").concat(year);
|
|
9580
|
+
case 'long-with-time':
|
|
9581
|
+
// example: 4 February 2024, 16:30
|
|
9582
|
+
year = date.getFullYear().toString();
|
|
9583
|
+
month = date.toLocaleString('en-US', { month: 'long' });
|
|
9584
|
+
day = String(date.getDate());
|
|
9585
|
+
return "".concat(day, " ").concat(month, " ").concat(year, ", ").concat(timeResult);
|
|
9586
|
+
case 'table':
|
|
9587
|
+
// example: 2024-02-04
|
|
9588
|
+
year = date.getFullYear();
|
|
9589
|
+
month = String(date.getMonth() + 1).padStart(2, '0');
|
|
9590
|
+
day = String(date.getDate()).padStart(2, '0');
|
|
9591
|
+
return "".concat(year, "-").concat(month, "-").concat(day);
|
|
9592
|
+
case 'table-with-time':
|
|
9593
|
+
// example: 2024-02-04, 16:30
|
|
9594
|
+
year = date.getFullYear();
|
|
9595
|
+
month = String(date.getMonth() + 1).padStart(2, '0');
|
|
9596
|
+
day = String(date.getDate()).padStart(2, '0');
|
|
9597
|
+
return "".concat(year, "-").concat(month, "-").concat(day, ", ").concat(timeResult);
|
|
9598
|
+
case 'time24':
|
|
9599
|
+
// example: 16:30
|
|
9600
|
+
return "".concat(timeResult);
|
|
9601
|
+
default:
|
|
9602
|
+
// default to long format (4 February 2024)
|
|
9603
|
+
year = date.getFullYear().toString();
|
|
9604
|
+
month = date.toLocaleString('en-US', { month: 'long' });
|
|
9605
|
+
day = String(date.getDate());
|
|
9606
|
+
return "".concat(day, " ").concat(month, " ").concat(year);
|
|
9607
|
+
}
|
|
9608
|
+
};
|
|
9410
9609
|
|
|
9411
9610
|
/**
|
|
9412
9611
|
* A custom hook to handle data processing for tables, managing internal states
|
|
@@ -9527,4 +9726,4 @@ var useTableDataHandler = function (initialData, options) {
|
|
|
9527
9726
|
};
|
|
9528
9727
|
};
|
|
9529
9728
|
|
|
9530
|
-
export { Accordions, Alert, Avatar, AlertRoundedSquare as BCAlertRoundedSquare, CubeHeader as BCCubeHeader, Discrepancy as BCDiscrepancy, ExposedPort as BCExposedPort, FQAnalytical as BCFQAnalytical, FQGetaway as BCFQGetaway, FQModeler as BCFQModeler, FQOperation as BCFQOperation, FQWelldone as BCFQWelldone, Flowqount as BCFlowqount, Inlet as BCInlet, Legend as BCLegend, ModalBalance as BCModalBalance, Neutral as BCNeutral, Node as BCNode, Outlet as BCOutlet, Port as BCPort, Rhombus as BCRhombus, SelectAllAdd as BCSelectAllAdd, SelectAllRemove as BCSelectAllRemove, Spinner$1 as BCSpinner, Stack as BCStack, Unlinked as BCUnlinked, VirtualPort as BCVirtualPort, Badge, Banner, BlockLoading, Brand, Breadcrumb, Button, ButtonApp, Card, Checkbox, Color, ContextualButton, Countdown, DatePicker, Display, Divider, DropdownContainer, DropdownItem, DropzoneFileUploader, EmptyTable, FileTree, FormGroup, FormGroupButton, FormGroupLabel, FormLabel, Heading, HorizontalStepper, InfoPanel, Link, LiveSearch, MenuContainer, MenuItem, Modal, MonospaceBadge, Notification, P, PaginationBar, PickerCalendar, Pills, Popover, ProgressBar, ProgressCircle, Radio, ResizeableDiv, SegmentButtonGroup, SegmentButtonItem, SelectInput, SidebarContainer, SidebarItem, SidebarMenu, SidebarProfile, SimpleFileUploader, Slider, Spinner, Tab, TabMenu, Table, TableBody, TableCell, TableFooterController, TableHead, TableHeaderController, TableRow, TableSearchInput, TagLabel, TagLabelInput, Text, TextArea, TextInput, Toaster, Toggle, Tooltip, TreeItem, StepperItem as VerticalStepper, Window, YearPicker, getRelativeTime, useFileTree, useTableDataHandler };
|
|
9729
|
+
export { Accordions, Alert, Avatar, AlertRoundedSquare as BCAlertRoundedSquare, CubeHeader as BCCubeHeader, Discrepancy as BCDiscrepancy, ExposedPort as BCExposedPort, FQAnalytical as BCFQAnalytical, FQGetaway as BCFQGetaway, FQModeler as BCFQModeler, FQOperation as BCFQOperation, FQWelldone as BCFQWelldone, Flowqount as BCFlowqount, Inlet as BCInlet, Legend as BCLegend, ModalBalance as BCModalBalance, Neutral as BCNeutral, Node as BCNode, Outlet as BCOutlet, Port as BCPort, Rhombus as BCRhombus, SelectAllAdd as BCSelectAllAdd, SelectAllRemove as BCSelectAllRemove, Spinner$1 as BCSpinner, Stack as BCStack, Unlinked as BCUnlinked, VirtualPort as BCVirtualPort, Badge, Banner, BlockLoading, Brand, Breadcrumb, Button, ButtonApp, Card, Checkbox, Color, ContextualButton, Countdown, DatePicker, Display, Divider, DropdownContainer, DropdownItem, DropzoneFileUploader, EmptyTable, FileTree, FormGroup, FormGroupButton, FormGroupLabel, FormLabel, Heading, HorizontalStepper, InfoPanel, Link, LiveSearch, MenuContainer, MenuItem, Modal, MonospaceBadge, Notification, P, PaginationBar, PickerCalendar, Pills, Popover, ProgressBar, ProgressCircle, Radio, ResizeableDiv, SegmentButtonGroup, SegmentButtonItem, SelectInput, SidebarContainer, SidebarItem, SidebarMenu, SidebarProfile, SimpleFileUploader, Slider, Spinner, Tab, TabMenu, Table, TableBody, TableCell, TableFooterController, TableHead, TableHeaderController, TableRow, TableSearchInput, TagLabel, TagLabelInput, Text, TextArea, TextInput, Toaster, Toggle, Tooltip, TreeItem, StepperItem as VerticalStepper, Window, YearPicker, formatDateTime, getRelativeTime, useFileTree, useTableDataHandler };
|