@economic/taco 1.1.5-alpha.0 → 1.1.5-alpha.108
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/dist/components/Icon/components/LogOut.d.ts +3 -0
- package/dist/components/Icon/components/Menu.d.ts +3 -0
- package/dist/components/Icon/components/Numbers.d.ts +3 -0
- package/dist/components/Icon/components/Profile.d.ts +3 -0
- package/dist/components/Icon/components/index.d.ts +1 -1
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/Menu/Menu.d.ts +2 -2
- package/dist/components/Menu/components/Item.d.ts +1 -1
- package/dist/components/Menu/components/Link.d.ts +1 -1
- package/dist/components/Tour/Tour.d.ts +2 -0
- package/dist/esm/components/Accordion/Accordion.js.map +1 -1
- package/dist/esm/components/Backdrop/Backdrop.js.map +1 -1
- package/dist/esm/components/Badge/Badge.js.map +1 -1
- package/dist/esm/components/Banner/Banner.js.map +1 -1
- package/dist/esm/components/Banner/util.js.map +1 -1
- package/dist/esm/components/Button/Button.js.map +1 -1
- package/dist/esm/components/Button/util.js.map +1 -1
- package/dist/esm/components/Calendar/Calendar.js.map +1 -1
- package/dist/esm/components/Card/Card.js +3 -0
- package/dist/esm/components/Card/Card.js.map +1 -1
- package/dist/esm/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/esm/components/Combobox/Combobox.js +1 -0
- package/dist/esm/components/Combobox/Combobox.js.map +1 -1
- package/dist/esm/components/Combobox/useCombobox.js.map +1 -1
- package/dist/esm/components/Datepicker/Datepicker.js.map +1 -1
- package/dist/esm/components/Datepicker/useDatepicker.js.map +1 -1
- package/dist/esm/components/Dialog/Context.js.map +1 -1
- package/dist/esm/components/Dialog/Dialog.js.map +1 -1
- package/dist/esm/components/Dialog/components/Content.js.map +1 -1
- package/dist/esm/components/Dialog/components/Drawer.js.map +1 -1
- package/dist/esm/components/Dialog/components/Extra.js.map +1 -1
- package/dist/esm/components/Dialog/components/Trigger.js +1 -1
- package/dist/esm/components/Dialog/components/Trigger.js.map +1 -1
- package/dist/esm/components/Field/Field.js.map +1 -1
- package/dist/esm/components/Form/Form.js.map +1 -1
- package/dist/esm/components/Group/Group.js.map +1 -1
- package/dist/esm/components/Hanger/Hanger.js +1 -1
- package/dist/esm/components/Hanger/Hanger.js.map +1 -1
- package/dist/esm/components/HoverCard/HoverCard.js.map +1 -1
- package/dist/esm/components/Icon/Icon.js +7 -8
- package/dist/esm/components/Icon/Icon.js.map +1 -1
- package/dist/esm/components/Icon/components/AccountPreview.js.map +1 -1
- package/dist/esm/components/Icon/components/Accounting.js.map +1 -1
- package/dist/esm/components/Icon/components/AccountingYear.js.map +1 -1
- package/dist/esm/components/Icon/components/AccountingYearCancel.js.map +1 -1
- package/dist/esm/components/Icon/components/ArrowBottom.js.map +1 -1
- package/dist/esm/components/Icon/components/ArrowDown.js.map +1 -1
- package/dist/esm/components/Icon/components/ArrowEnd.js.map +1 -1
- package/dist/esm/components/Icon/components/ArrowLeft.js.map +1 -1
- package/dist/esm/components/Icon/components/ArrowRight.js.map +1 -1
- package/dist/esm/components/Icon/components/ArrowStart.js.map +1 -1
- package/dist/esm/components/Icon/components/ArrowTop.js.map +1 -1
- package/dist/esm/components/Icon/components/ArrowUp.js.map +1 -1
- package/dist/esm/components/Icon/components/Attach.js.map +1 -1
- package/dist/esm/components/Icon/components/AttachAuto.js.map +1 -1
- package/dist/esm/components/Icon/components/AttachCancel.js.map +1 -1
- package/dist/esm/components/Icon/components/Autotext.js.map +1 -1
- package/dist/esm/components/Icon/components/AutotextInsert.js.map +1 -1
- package/dist/esm/components/Icon/components/Basic.js.map +1 -1
- package/dist/esm/components/Icon/components/BasicTabs.js.map +1 -1
- package/dist/esm/components/Icon/components/BellSolid.js.map +1 -1
- package/dist/esm/components/Icon/components/Book.js.map +1 -1
- package/dist/esm/components/Icon/components/Booking.js.map +1 -1
- package/dist/esm/components/Icon/components/Budget.js.map +1 -1
- package/dist/esm/components/Icon/components/Calendar.js.map +1 -1
- package/dist/esm/components/Icon/components/CashAccount.js.map +1 -1
- package/dist/esm/components/Icon/components/CashReports.js.map +1 -1
- package/dist/esm/components/Icon/components/Chat.js.map +1 -1
- package/dist/esm/components/Icon/components/ChatSolid.js.map +1 -1
- package/dist/esm/components/Icon/components/ChevronDown.js.map +1 -1
- package/dist/esm/components/Icon/components/ChevronDownDouble.js.map +1 -1
- package/dist/esm/components/Icon/components/ChevronDownSolid.js.map +1 -1
- package/dist/esm/components/Icon/components/ChevronLeft.js.map +1 -1
- package/dist/esm/components/Icon/components/ChevronLeftDouble.js.map +1 -1
- package/dist/esm/components/Icon/components/ChevronRight.js.map +1 -1
- package/dist/esm/components/Icon/components/ChevronRightDouble.js.map +1 -1
- package/dist/esm/components/Icon/components/ChevronUp.js.map +1 -1
- package/dist/esm/components/Icon/components/ChevronUpDouble.js.map +1 -1
- package/dist/esm/components/Icon/components/ChevronUpSolid.js.map +1 -1
- package/dist/esm/components/Icon/components/CircleClose.js.map +1 -1
- package/dist/esm/components/Icon/components/CircleMinus.js.map +1 -1
- package/dist/esm/components/Icon/components/CirclePlus.js.map +1 -1
- package/dist/esm/components/Icon/components/CircleTick.js.map +1 -1
- package/dist/esm/components/Icon/components/Clamp.js.map +1 -1
- package/dist/esm/components/Icon/components/ClampOpen.js.map +1 -1
- package/dist/esm/components/Icon/components/Close.js.map +1 -1
- package/dist/esm/components/Icon/components/ConnectionEnable.js.map +1 -1
- package/dist/esm/components/Icon/components/ConnectionRevoke.js.map +1 -1
- package/dist/esm/components/Icon/components/Contacts.js.map +1 -1
- package/dist/esm/components/Icon/components/Copy.js.map +1 -1
- package/dist/esm/components/Icon/components/Courses.js.map +1 -1
- package/dist/esm/components/Icon/components/Credit.js.map +1 -1
- package/dist/esm/components/Icon/components/Delete.js.map +1 -1
- package/dist/esm/components/Icon/components/DeletePermanently.js.map +1 -1
- package/dist/esm/components/Icon/components/Depecriate.js.map +1 -1
- package/dist/esm/components/Icon/components/Developer.js.map +1 -1
- package/dist/esm/components/Icon/components/DistributionTemplate.js.map +1 -1
- package/dist/esm/components/Icon/components/Document.js.map +1 -1
- package/dist/esm/components/Icon/components/DocumentApprove.js.map +1 -1
- package/dist/esm/components/Icon/components/DocumentCreateEntry.js.map +1 -1
- package/dist/esm/components/Icon/components/DocumentCut.js.map +1 -1
- package/dist/esm/components/Icon/components/DocumentError.js.map +1 -1
- package/dist/esm/components/Icon/components/DocumentIsolatePage.js.map +1 -1
- package/dist/esm/components/Icon/components/DocumentMerge.js.map +1 -1
- package/dist/esm/components/Icon/components/DocumentMove.js.map +1 -1
- package/dist/esm/components/Icon/components/DocumentPreview.js.map +1 -1
- package/dist/esm/components/Icon/components/DocumentReceived.js.map +1 -1
- package/dist/esm/components/Icon/components/DocumentRejectedRequest.js.map +1 -1
- package/dist/esm/components/Icon/components/DocumentSplit.js.map +1 -1
- package/dist/esm/components/Icon/components/DocumentTime.js.map +1 -1
- package/dist/esm/components/Icon/components/Download.js.map +1 -1
- package/dist/esm/components/Icon/components/Drag.js.map +1 -1
- package/dist/esm/components/Icon/components/ECopedia.js.map +1 -1
- package/dist/esm/components/Icon/components/ESignature.js.map +1 -1
- package/dist/esm/components/Icon/components/Edit.js.map +1 -1
- package/dist/esm/components/Icon/components/EllipsisHorizontal.js.map +1 -1
- package/dist/esm/components/Icon/components/EllipsisVertical.js.map +1 -1
- package/dist/esm/components/Icon/components/EntriesOnAccount.js.map +1 -1
- package/dist/esm/components/Icon/components/EntriesOpen.js.map +1 -1
- package/dist/esm/components/Icon/components/EntriesWarning.js.map +1 -1
- package/dist/esm/components/Icon/components/EntryTypeCustomerInvoice.js.map +1 -1
- package/dist/esm/components/Icon/components/EntryTypeCustomerPayment.js.map +1 -1
- package/dist/esm/components/Icon/components/EntryTypeJournalEntry.js.map +1 -1
- package/dist/esm/components/Icon/components/EntryTypeManualCustomerInvoice.js.map +1 -1
- package/dist/esm/components/Icon/components/EntryTypeSupplierInvoice.js.map +1 -1
- package/dist/esm/components/Icon/components/EntryTypeSupplierPayment.js.map +1 -1
- package/dist/esm/components/Icon/components/Envelope.js.map +1 -1
- package/dist/esm/components/Icon/components/EnvelopeApproved.js.map +1 -1
- package/dist/esm/components/Icon/components/ExpandView.js.map +1 -1
- package/dist/esm/components/Icon/components/Expenses.js.map +1 -1
- package/dist/esm/components/Icon/components/Export.js.map +1 -1
- package/dist/esm/components/Icon/components/ExportToExcel.js.map +1 -1
- package/dist/esm/components/Icon/components/ExportToPdf.js.map +1 -1
- package/dist/esm/components/Icon/components/Filter.js.map +1 -1
- package/dist/esm/components/Icon/components/FilterSolid.js.map +1 -1
- package/dist/esm/components/Icon/components/GraphSolid.js.map +1 -1
- package/dist/esm/components/Icon/components/Hash.js.map +1 -1
- package/dist/esm/components/Icon/components/Home.js.map +1 -1
- package/dist/esm/components/Icon/components/Images.js.map +1 -1
- package/dist/esm/components/Icon/components/Import.js.map +1 -1
- package/dist/esm/components/Icon/components/Inbox.js.map +1 -1
- package/dist/esm/components/Icon/components/InboxEinvoicing.js.map +1 -1
- package/dist/esm/components/Icon/components/InboxScanning.js.map +1 -1
- package/dist/esm/components/Icon/components/InboxSmart.js.map +1 -1
- package/dist/esm/components/Icon/components/Info.js.map +1 -1
- package/dist/esm/components/Icon/components/Inventory.js.map +1 -1
- package/dist/esm/components/Icon/components/InventoryMatrix.js.map +1 -1
- package/dist/esm/components/Icon/components/JournalPro.js.map +1 -1
- package/dist/esm/components/Icon/components/Layout.js.map +1 -1
- package/dist/esm/components/Icon/components/LayoutBoth.js.map +1 -1
- package/dist/esm/components/Icon/components/LayoutFirst.js.map +1 -1
- package/dist/esm/components/Icon/components/LayoutLast.js.map +1 -1
- package/dist/esm/components/Icon/components/LayoutNone.js.map +1 -1
- package/dist/esm/components/Icon/components/LedgerCard.js.map +1 -1
- package/dist/esm/components/Icon/components/LedgerCardCustomerReminder.js.map +1 -1
- package/dist/esm/components/Icon/components/LedgerCardManualCustomerInvoice.js.map +1 -1
- package/dist/esm/components/Icon/components/LedgerCardObsoleteStock.js.map +1 -1
- package/dist/esm/components/Icon/components/LedgerCardOpeningEntry.js.map +1 -1
- package/dist/esm/components/Icon/components/LedgerCardReservedEntry.js.map +1 -1
- package/dist/esm/components/Icon/components/LedgerCardShrinkagePilferage.js.map +1 -1
- package/dist/esm/components/Icon/components/LedgerCardStockAdjustment.js.map +1 -1
- package/dist/esm/components/Icon/components/LedgerCardTransferredOpeningEntry.js.map +1 -1
- package/dist/esm/components/Icon/components/Lightbulb.js.map +1 -1
- package/dist/esm/components/Icon/components/Line.js.map +1 -1
- package/dist/esm/components/Icon/components/List.js.map +1 -1
- package/dist/esm/components/Icon/components/ListBulleted.js.map +1 -1
- package/dist/esm/components/Icon/components/ListSearch.js.map +1 -1
- package/dist/esm/components/Icon/components/LockOpen.js.map +1 -1
- package/dist/esm/components/Icon/components/Log.js.map +1 -1
- package/dist/esm/components/Icon/components/LogOut.js +20 -0
- package/dist/esm/components/Icon/components/LogOut.js.map +1 -0
- package/dist/esm/components/Icon/components/Market.js.map +1 -1
- package/dist/esm/components/Icon/components/MatchAmount.js.map +1 -1
- package/dist/esm/components/Icon/components/MatchEntries.js.map +1 -1
- package/dist/esm/components/Icon/components/Menu.js +18 -0
- package/dist/esm/components/Icon/components/Menu.js.map +1 -0
- package/dist/esm/components/Icon/components/Mileage.js.map +1 -1
- package/dist/esm/components/Icon/components/ModalResize.js.map +1 -1
- package/dist/esm/components/Icon/components/ModalShrink.js.map +1 -1
- package/dist/esm/components/Icon/components/More.js.map +1 -1
- package/dist/esm/components/Icon/components/MoreSolid.js.map +1 -1
- package/dist/esm/components/Icon/components/Move.js.map +1 -1
- package/dist/esm/components/Icon/components/NavigationList.js.map +1 -1
- package/dist/esm/components/Icon/components/Note.js.map +1 -1
- package/dist/esm/components/Icon/components/NoteFollowUp.js.map +1 -1
- package/dist/esm/components/Icon/components/NoteRead.js.map +1 -1
- package/dist/esm/components/Icon/components/Numbers.js +18 -0
- package/dist/esm/components/Icon/components/Numbers.js.map +1 -0
- package/dist/esm/components/Icon/components/PartnerApi.js.map +1 -1
- package/dist/esm/components/Icon/components/Period.js.map +1 -1
- package/dist/esm/components/Icon/components/PersonChange.js.map +1 -1
- package/dist/esm/components/Icon/components/PersonMinus.js.map +1 -1
- package/dist/esm/components/Icon/components/PersonPlus.js.map +1 -1
- package/dist/esm/components/Icon/components/PersonTick.js.map +1 -1
- package/dist/esm/components/Icon/components/Play.js.map +1 -1
- package/dist/esm/components/Icon/components/PlusMinus.js.map +1 -1
- package/dist/esm/components/Icon/components/Print.js.map +1 -1
- package/dist/esm/components/Icon/components/ProcessPayment.js.map +1 -1
- package/dist/esm/components/Icon/components/ProductLedgerCard.js.map +1 -1
- package/dist/esm/components/Icon/components/Profile.js +20 -0
- package/dist/esm/components/Icon/components/Profile.js.map +1 -0
- package/dist/esm/components/Icon/components/ProjectCards.js.map +1 -1
- package/dist/esm/components/Icon/components/Projects.js.map +1 -1
- package/dist/esm/components/Icon/components/Quicklinks.js.map +1 -1
- package/dist/esm/components/Icon/components/RatingBankruptcy.js.map +1 -1
- package/dist/esm/components/Icon/components/RatingPaymentProblems.js.map +1 -1
- package/dist/esm/components/Icon/components/Reconciled.js.map +1 -1
- package/dist/esm/components/Icon/components/Refresh.js.map +1 -1
- package/dist/esm/components/Icon/components/Report.js.map +1 -1
- package/dist/esm/components/Icon/components/ReportSolid.js.map +1 -1
- package/dist/esm/components/Icon/components/Restore.js.map +1 -1
- package/dist/esm/components/Icon/components/RotateLeft.js.map +1 -1
- package/dist/esm/components/Icon/components/RotateRight.js.map +1 -1
- package/dist/esm/components/Icon/components/Sales.js.map +1 -1
- package/dist/esm/components/Icon/components/Search.js.map +1 -1
- package/dist/esm/components/Icon/components/SearchBold.js.map +1 -1
- package/dist/esm/components/Icon/components/Secure.js.map +1 -1
- package/dist/esm/components/Icon/components/SecureTick.js.map +1 -1
- package/dist/esm/components/Icon/components/Settings.js.map +1 -1
- package/dist/esm/components/Icon/components/SettingsSolid.js.map +1 -1
- package/dist/esm/components/Icon/components/Shortcuts.js.map +1 -1
- package/dist/esm/components/Icon/components/ShowAll.js.map +1 -1
- package/dist/esm/components/Icon/components/ShowLess.js.map +1 -1
- package/dist/esm/components/Icon/components/ShowMore.js.map +1 -1
- package/dist/esm/components/Icon/components/ShowTemplate.js.map +1 -1
- package/dist/esm/components/Icon/components/Sliders.js.map +1 -1
- package/dist/esm/components/Icon/components/Smartpay.js.map +1 -1
- package/dist/esm/components/Icon/components/SortBy.js.map +1 -1
- package/dist/esm/components/Icon/components/Spinner.js.map +1 -1
- package/dist/esm/components/Icon/components/Star.js.map +1 -1
- package/dist/esm/components/Icon/components/StarSolid.js.map +1 -1
- package/dist/esm/components/Icon/components/Subscriptions.js.map +1 -1
- package/dist/esm/components/Icon/components/SystemEntries.js.map +1 -1
- package/dist/esm/components/Icon/components/Tag.js.map +1 -1
- package/dist/esm/components/Icon/components/TemplateOverride.js.map +1 -1
- package/dist/esm/components/Icon/components/Templates.js.map +1 -1
- package/dist/esm/components/Icon/components/ThumbBoth.js.map +1 -1
- package/dist/esm/components/Icon/components/ThumbDown.js.map +1 -1
- package/dist/esm/components/Icon/components/ThumbDownSolid.js.map +1 -1
- package/dist/esm/components/Icon/components/ThumbUp.js.map +1 -1
- package/dist/esm/components/Icon/components/ThumbUpSolid.js.map +1 -1
- package/dist/esm/components/Icon/components/Tick.js.map +1 -1
- package/dist/esm/components/Icon/components/Time.js.map +1 -1
- package/dist/esm/components/Icon/components/Transfer.js.map +1 -1
- package/dist/esm/components/Icon/components/TransferCancel.js.map +1 -1
- package/dist/esm/components/Icon/components/TransferLocked.js.map +1 -1
- package/dist/esm/components/Icon/components/Undock.js.map +1 -1
- package/dist/esm/components/Icon/components/Unreconciled.js.map +1 -1
- package/dist/esm/components/Icon/components/Warning.js.map +1 -1
- package/dist/esm/components/Icon/components/Webshop.js.map +1 -1
- package/dist/esm/components/Icon/components/Website.js.map +1 -1
- package/dist/esm/components/Icon/components/Workflow.js.map +1 -1
- package/dist/esm/components/Icon/components/Zoom.js.map +1 -1
- package/dist/esm/components/Icon/components/index.js +8 -0
- package/dist/esm/components/Icon/components/index.js.map +1 -1
- package/dist/esm/components/IconButton/IconButton.js +9 -11
- package/dist/esm/components/IconButton/IconButton.js.map +1 -1
- package/dist/esm/components/Input/Input.js +25 -25
- package/dist/esm/components/Input/Input.js.map +1 -1
- package/dist/esm/components/Listbox/Listbox.js +24 -25
- package/dist/esm/components/Listbox/Listbox.js.map +1 -1
- package/dist/esm/components/Listbox/ScrollableList.js.map +1 -1
- package/dist/esm/components/Listbox/useListbox.js.map +1 -1
- package/dist/esm/components/Listbox/useMultiListbox.js.map +1 -1
- package/dist/esm/components/Listbox/useTypeahead.js.map +1 -1
- package/dist/esm/components/Menu/Context.js.map +1 -1
- package/dist/esm/components/Menu/Menu.js +16 -34
- package/dist/esm/components/Menu/Menu.js.map +1 -1
- package/dist/esm/components/Menu/components/Checkbox.js +1 -1
- package/dist/esm/components/Menu/components/Checkbox.js.map +1 -1
- package/dist/esm/components/Menu/components/Content.js.map +1 -1
- package/dist/esm/components/Menu/components/Header.js.map +1 -1
- package/dist/esm/components/Menu/components/Item.js.map +1 -1
- package/dist/esm/components/Menu/components/Link.js.map +1 -1
- package/dist/esm/components/Menu/components/RadioGroup.js +1 -1
- package/dist/esm/components/Menu/components/RadioGroup.js.map +1 -1
- package/dist/esm/components/Menu/components/Separator.js.map +1 -1
- package/dist/esm/components/Menu/components/Trigger.js.map +1 -1
- package/dist/esm/components/Navigation/Navigation.js +35 -44
- package/dist/esm/components/Navigation/Navigation.js.map +1 -1
- package/dist/esm/components/Pagination/PageNumbers.js.map +1 -1
- package/dist/esm/components/Pagination/Pagination.js +39 -56
- package/dist/esm/components/Pagination/Pagination.js.map +1 -1
- package/dist/esm/components/Pagination/usePagination.js.map +1 -1
- package/dist/esm/components/Pagination/usePaginationShortcuts.js.map +1 -1
- package/dist/esm/components/Popover/Popover.js +30 -35
- package/dist/esm/components/Popover/Popover.js.map +1 -1
- package/dist/esm/components/Popover/Primitives.js.map +1 -1
- package/dist/esm/components/Progress/Progress.js +11 -15
- package/dist/esm/components/Progress/Progress.js.map +1 -1
- package/dist/esm/components/Provider/Provider.js +13 -18
- package/dist/esm/components/Provider/Provider.js.map +1 -1
- package/dist/esm/components/RadioGroup/RadioGroup.js +45 -57
- package/dist/esm/components/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/esm/components/SearchInput/SearchInput.js +13 -11
- package/dist/esm/components/SearchInput/SearchInput.js.map +1 -1
- package/dist/esm/components/Select/Select.js +30 -31
- package/dist/esm/components/Select/Select.js.map +1 -1
- package/dist/esm/components/Select/useSelect.js.map +1 -1
- package/dist/esm/components/Spinner/Spinner.js +12 -19
- package/dist/esm/components/Spinner/Spinner.js.map +1 -1
- package/dist/esm/components/Switch/Switch.js +9 -10
- package/dist/esm/components/Switch/Switch.js.map +1 -1
- package/dist/esm/components/Table/components/BaseTable.js.map +1 -1
- package/dist/esm/components/Table/components/PaginatedTable.js.map +1 -1
- package/dist/esm/components/Table/components/Table.js.map +1 -1
- package/dist/esm/components/Table/components/WindowedTable.js.map +1 -1
- package/dist/esm/components/Table/hooks/plugins/useRowActions.js.map +1 -1
- package/dist/esm/components/Table/hooks/plugins/useRowDraggable.js.map +1 -1
- package/dist/esm/components/Table/hooks/plugins/useRowEditing.js.map +1 -1
- package/dist/esm/components/Table/hooks/plugins/useRowSelect.js.map +1 -1
- package/dist/esm/components/Table/hooks/useRowCreation.js.map +1 -1
- package/dist/esm/components/Table/hooks/useTable.js.map +1 -1
- package/dist/esm/components/Table/util/renderColumn.js.map +1 -1
- package/dist/esm/components/Table/util/renderRow.js.map +1 -1
- package/dist/esm/components/Tabs/Tabs.js +25 -27
- package/dist/esm/components/Tabs/Tabs.js.map +1 -1
- package/dist/esm/components/Textarea/Textarea.js +11 -9
- package/dist/esm/components/Textarea/Textarea.js.map +1 -1
- package/dist/esm/components/Toast/Toast.js +1 -1
- package/dist/esm/components/Toast/Toast.js.map +1 -1
- package/dist/esm/components/Toast/Toaster.js +88 -118
- package/dist/esm/components/Toast/Toaster.js.map +1 -1
- package/dist/esm/components/Toast/util.js.map +1 -1
- package/dist/esm/components/Tooltip/Tooltip.js +7 -8
- package/dist/esm/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/esm/components/Tour/Tour.js +46 -50
- package/dist/esm/components/Tour/Tour.js.map +1 -1
- package/dist/esm/components/Treeview/Treeview.js +26 -36
- package/dist/esm/components/Treeview/Treeview.js.map +1 -1
- package/dist/esm/components/VisuallyHidden/VisuallyHidden.js +1 -1
- package/dist/esm/components/VisuallyHidden/VisuallyHidden.js.map +1 -1
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/primitives/Button.js.map +1 -1
- package/dist/esm/utils/hooks/useDraggable.js.map +1 -1
- package/dist/esm/utils/hooks/useDropTarget.js +10 -7
- package/dist/esm/utils/hooks/useDropTarget.js.map +1 -1
- package/dist/esm/utils/hooks/useProxiedRef.js +3 -3
- package/dist/esm/utils/hooks/useProxiedRef.js.map +1 -1
- package/dist/esm/utils/mergeRefs.js +3 -3
- package/dist/esm/utils/mergeRefs.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/taco.cjs.development.js +635 -673
- package/dist/taco.cjs.development.js.map +1 -1
- package/dist/taco.cjs.production.min.js +1 -1
- package/dist/taco.cjs.production.min.js.map +1 -1
- package/dist/utils/mergeRefs.d.ts +1 -1
- package/dist/utils/tailwind.d.ts +1 -1
- package/package.json +4 -5
- package/tailwind.config.js +264 -260
- package/types.json +12 -2
@@ -1850,6 +1850,22 @@ function IconLockOpen(props, svgRef) {
|
|
1850
1850
|
|
1851
1851
|
var LockOpen = /*#__PURE__*/React.forwardRef(IconLockOpen);
|
1852
1852
|
|
1853
|
+
function IconLogOut(props, svgRef) {
|
1854
|
+
return React.createElement("svg", Object.assign({
|
1855
|
+
fill: "none",
|
1856
|
+
xmlns: "http://www.w3.org/2000/svg",
|
1857
|
+
viewBox: "0 0 24 24",
|
1858
|
+
ref: svgRef
|
1859
|
+
}, props), React.createElement("path", {
|
1860
|
+
fillRule: "evenodd",
|
1861
|
+
clipRule: "evenodd",
|
1862
|
+
d: "M13.25 4.5H6.5v15h6.75a1.25 1.25 0 110 2.5h-7A2.25 2.25 0 014 19.75V4.25A2.25 2.25 0 016.25 2h7a1.25 1.25 0 110 2.5zm6.384 2.616l-.102-.091a1.25 1.25 0 00-1.666 1.859l1.867 1.866H11.75l-.128.007a1.25 1.25 0 00.128 2.493h7.982l-1.866 1.866-.091.102a1.25 1.25 0 001.859 1.666l4-4 .08-.089.05-.063.068-.106.058-.112.049-.127.03-.108.016-.088.012-.112L24 12l-.004-.096-.016-.13-.03-.127-.03-.087-.046-.107-.046-.086-.065-.1a1.267 1.267 0 00-.13-.15l-4-4zm4.084 4.094l-.084-.094c.03.03.058.061.084.094z",
|
1863
|
+
fill: "currentColor"
|
1864
|
+
}));
|
1865
|
+
}
|
1866
|
+
|
1867
|
+
var LogOut = /*#__PURE__*/React.forwardRef(IconLogOut);
|
1868
|
+
|
1853
1869
|
function IconLog(props, svgRef) {
|
1854
1870
|
return React.createElement("svg", Object.assign({
|
1855
1871
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -1906,6 +1922,20 @@ function IconMatchEntries(props, svgRef) {
|
|
1906
1922
|
|
1907
1923
|
var MatchEntries = /*#__PURE__*/React.forwardRef(IconMatchEntries);
|
1908
1924
|
|
1925
|
+
function IconMenu(props, svgRef) {
|
1926
|
+
return React.createElement("svg", Object.assign({
|
1927
|
+
fill: "none",
|
1928
|
+
xmlns: "http://www.w3.org/2000/svg",
|
1929
|
+
viewBox: "0 0 24 24",
|
1930
|
+
ref: svgRef
|
1931
|
+
}, props), React.createElement("path", {
|
1932
|
+
d: "M4 19h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zm0-6h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zM3 6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1z",
|
1933
|
+
fill: "currentColor"
|
1934
|
+
}));
|
1935
|
+
}
|
1936
|
+
|
1937
|
+
var Menu = /*#__PURE__*/React.forwardRef(IconMenu);
|
1938
|
+
|
1909
1939
|
function IconMileage(props, svgRef) {
|
1910
1940
|
return React.createElement("svg", Object.assign({
|
1911
1941
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -2046,6 +2076,20 @@ function IconNote(props, svgRef) {
|
|
2046
2076
|
|
2047
2077
|
var Note = /*#__PURE__*/React.forwardRef(IconNote);
|
2048
2078
|
|
2079
|
+
function IconNumbers(props, svgRef) {
|
2080
|
+
return React.createElement("svg", Object.assign({
|
2081
|
+
fill: "none",
|
2082
|
+
xmlns: "http://www.w3.org/2000/svg",
|
2083
|
+
viewBox: "0 0 24 24",
|
2084
|
+
ref: svgRef
|
2085
|
+
}, props), React.createElement("path", {
|
2086
|
+
d: "M3.203 16.625c0 .602.328.96.875.96.555 0 .875-.35.875-.96V7.898c0-.671-.437-1.132-1.078-1.132-.375 0-.742.14-1.273.515L1.125 8.344c-.367.25-.54.508-.54.789 0 .367.282.656.65.656.195 0 .382-.07.663-.266l1.258-.898h.047v8zm4.149.031c0 .516.414.844 1.046.844h5.22c.53 0 .843-.281.843-.734 0-.461-.328-.743-.844-.743H9.648v-.101l2.665-2.953c1.367-1.492 1.812-2.313 1.812-3.36 0-1.742-1.43-2.984-3.422-2.984-2.086 0-3.492 1.375-3.492 2.742 0 .485.312.813.766.813.367 0 .617-.211.804-.657.266-.906.93-1.43 1.82-1.43 1.063 0 1.774.665 1.774 1.657 0 .688-.344 1.313-1.21 2.266l-3.071 3.406c-.563.601-.742.89-.742 1.234zm8.562-1.375c0 1.242 1.555 2.446 3.617 2.446 2.274 0 3.867-1.297 3.867-3.141 0-1.352-.992-2.484-2.296-2.617v-.11c1.078-.171 1.953-1.257 1.953-2.421 0-1.649-1.461-2.813-3.524-2.813-1.984 0-3.414 1.156-3.414 2.39 0 .454.305.766.742.766.344 0 .578-.164.782-.578.367-.742 1.007-1.156 1.851-1.156 1.086 0 1.828.648 1.828 1.61 0 .952-.758 1.64-1.804 1.64h-.813c-.43 0-.726.305-.726.71 0 .423.304.735.726.735h.86c1.25 0 2.085.719 2.085 1.79 0 1.077-.82 1.765-2.093 1.765-.961 0-1.711-.422-2.14-1.188-.25-.414-.47-.57-.782-.57-.422 0-.719.313-.719.742z",
|
2087
|
+
fill: "currentColor"
|
2088
|
+
}));
|
2089
|
+
}
|
2090
|
+
|
2091
|
+
var Numbers = /*#__PURE__*/React.forwardRef(IconNumbers);
|
2092
|
+
|
2049
2093
|
function IconPartnerApi(props, svgRef) {
|
2050
2094
|
return React.createElement("svg", Object.assign({
|
2051
2095
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -2200,6 +2244,22 @@ function IconProductLedgerCard(props, svgRef) {
|
|
2200
2244
|
|
2201
2245
|
var ProductLedgerCard = /*#__PURE__*/React.forwardRef(IconProductLedgerCard);
|
2202
2246
|
|
2247
|
+
function IconProfile(props, svgRef) {
|
2248
|
+
return React.createElement("svg", Object.assign({
|
2249
|
+
fill: "none",
|
2250
|
+
xmlns: "http://www.w3.org/2000/svg",
|
2251
|
+
viewBox: "0 0 24 24",
|
2252
|
+
ref: svgRef
|
2253
|
+
}, props), React.createElement("path", {
|
2254
|
+
fillRule: "evenodd",
|
2255
|
+
clipRule: "evenodd",
|
2256
|
+
d: "M22 12c0-5.523-4.477-10-10-10S2 6.477 2 12a9.97 9.97 0 003.047 7.187A9.967 9.967 0 0012 22a9.967 9.967 0 006.953-2.813A9.97 9.97 0 0022 12zM5.704 16.936A7.986 7.986 0 0012 20a7.986 7.986 0 006.296-3.064A7 7 0 0012 13a7 7 0 00-6.296 3.936zM12 12a3.5 3.5 0 100-7 3.5 3.5 0 000 7z",
|
2257
|
+
fill: "currentColor"
|
2258
|
+
}));
|
2259
|
+
}
|
2260
|
+
|
2261
|
+
var Profile = /*#__PURE__*/React.forwardRef(IconProfile);
|
2262
|
+
|
2203
2263
|
function IconProjectCards(props, svgRef) {
|
2204
2264
|
return React.createElement("svg", Object.assign({
|
2205
2265
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -3060,10 +3120,12 @@ const icons = {
|
|
3060
3120
|
'list-search': ListSearch,
|
3061
3121
|
list: List,
|
3062
3122
|
'lock-open': LockOpen,
|
3123
|
+
'log-out': LogOut,
|
3063
3124
|
log: Log,
|
3064
3125
|
market: Market,
|
3065
3126
|
'match-amount': MatchAmount,
|
3066
3127
|
'match-entries': MatchEntries,
|
3128
|
+
menu: Menu,
|
3067
3129
|
mileage: Mileage,
|
3068
3130
|
'modal-resize': ModalResize,
|
3069
3131
|
'modal-shrink': ModalShrink,
|
@@ -3074,6 +3136,7 @@ const icons = {
|
|
3074
3136
|
'note-follow-up': NoteFollowUp,
|
3075
3137
|
'note-read': NoteRead,
|
3076
3138
|
note: Note,
|
3139
|
+
numbers: Numbers,
|
3077
3140
|
'partner-api': PartnerApi,
|
3078
3141
|
period: Period,
|
3079
3142
|
'person-change': PersonChange,
|
@@ -3085,6 +3148,7 @@ const icons = {
|
|
3085
3148
|
print: Print,
|
3086
3149
|
'process-payment': ProcessPayment,
|
3087
3150
|
'product-ledger-card': ProductLedgerCard,
|
3151
|
+
profile: Profile,
|
3088
3152
|
'project-cards': ProjectCards,
|
3089
3153
|
projects: Projects,
|
3090
3154
|
quicklinks: Quicklinks,
|
@@ -3254,7 +3318,7 @@ var Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(props, ref) {
|
|
3254
3318
|
}));
|
3255
3319
|
});
|
3256
3320
|
|
3257
|
-
|
3321
|
+
const VisuallyHidden = /*#__PURE__*/React.forwardRef(function VisuallyHidden(props, ref) {
|
3258
3322
|
return React.createElement("span", Object.assign({}, props, {
|
3259
3323
|
className: "sr-only",
|
3260
3324
|
ref: ref
|
@@ -3372,13 +3436,13 @@ const Button = /*#__PURE__*/React.forwardRef(function Button(props, ref) {
|
|
3372
3436
|
}), React.Children.count(props.children) > 1 ? React.Children.map(props.children, child => typeof child === 'string' ? React.createElement("span", null, child) : child) : props.children);
|
3373
3437
|
});
|
3374
3438
|
|
3375
|
-
|
3376
|
-
|
3377
|
-
|
3378
|
-
|
3379
|
-
|
3380
|
-
|
3381
|
-
|
3439
|
+
const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(props, ref) {
|
3440
|
+
const {
|
3441
|
+
title,
|
3442
|
+
children,
|
3443
|
+
placement,
|
3444
|
+
...otherProps
|
3445
|
+
} = props;
|
3382
3446
|
return React.createElement(TooltipPrimitive.Root, {
|
3383
3447
|
delayDuration: 50
|
3384
3448
|
}, React.createElement(TooltipPrimitive.Trigger, {
|
@@ -3470,14 +3534,13 @@ const createButton = (props, className, ref) => {
|
|
3470
3534
|
return button;
|
3471
3535
|
};
|
3472
3536
|
|
3473
|
-
|
3474
|
-
|
3475
|
-
|
3476
|
-
|
3477
|
-
|
3478
|
-
|
3479
|
-
|
3480
|
-
var className = cn('w-8', getButtonClasses(), getAppearanceClasses(otherProps.appearance, true), {
|
3537
|
+
const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(props, ref) {
|
3538
|
+
const {
|
3539
|
+
icon,
|
3540
|
+
rounded = false,
|
3541
|
+
...otherProps
|
3542
|
+
} = props;
|
3543
|
+
const className = cn('w-8', getButtonClasses(), getAppearanceClasses(otherProps.appearance, true), {
|
3481
3544
|
'rounded-full': rounded,
|
3482
3545
|
rounded: !rounded,
|
3483
3546
|
'cursor-not-allowed opacity-50': props.disabled,
|
@@ -3488,13 +3551,13 @@ var IconButton = /*#__PURE__*/React.forwardRef(function IconButton(props, ref) {
|
|
3488
3551
|
return null;
|
3489
3552
|
}
|
3490
3553
|
|
3491
|
-
return createButton(
|
3554
|
+
return createButton({ ...otherProps,
|
3492
3555
|
children: React.createElement(Icon, {
|
3493
3556
|
name: icon,
|
3494
3557
|
className: "m-0 p-0"
|
3495
3558
|
}),
|
3496
3559
|
'data-taco': 'icon-button'
|
3497
|
-
}
|
3560
|
+
}, className, ref);
|
3498
3561
|
});
|
3499
3562
|
|
3500
3563
|
var Banner = /*#__PURE__*/React.forwardRef(function Banner(props, ref) {
|
@@ -3514,10 +3577,10 @@ var Banner = /*#__PURE__*/React.forwardRef(function Banner(props, ref) {
|
|
3514
3577
|
}) : null);
|
3515
3578
|
});
|
3516
3579
|
|
3517
|
-
var _excluded$
|
3580
|
+
var _excluded$3 = ["fluid"];
|
3518
3581
|
var Button$1 = /*#__PURE__*/React.forwardRef(function Button(props, ref) {
|
3519
3582
|
var fluid = props.fluid,
|
3520
|
-
otherProps = _objectWithoutPropertiesLoose(props, _excluded$
|
3583
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded$3);
|
3521
3584
|
|
3522
3585
|
var className = cn(getButtonClasses(), getAppearanceClasses(otherProps.appearance), 'rounded px-3', {
|
3523
3586
|
'cursor-not-allowed opacity-50': props.disabled,
|
@@ -3588,27 +3651,21 @@ function useTimer(duration = 0, callback) {
|
|
3588
3651
|
};
|
3589
3652
|
}
|
3590
3653
|
|
3591
|
-
|
3592
|
-
|
3593
|
-
|
3594
|
-
|
3595
|
-
|
3596
|
-
|
3597
|
-
|
3598
|
-
|
3599
|
-
|
3600
|
-
setVisibility = _React$useState[1];
|
3601
|
-
|
3602
|
-
React__default.useEffect(function () {
|
3603
|
-
var timeout;
|
3654
|
+
const Spinner$1 = /*#__PURE__*/React__default.forwardRef(function Spinner(props, ref) {
|
3655
|
+
const {
|
3656
|
+
delay = 500,
|
3657
|
+
label,
|
3658
|
+
...otherProps
|
3659
|
+
} = props;
|
3660
|
+
const [visible, setVisibility] = React__default.useState(!delay);
|
3661
|
+
React__default.useEffect(() => {
|
3662
|
+
let timeout;
|
3604
3663
|
|
3605
3664
|
if (delay) {
|
3606
|
-
timeout = window.setTimeout(
|
3607
|
-
return setVisibility(true);
|
3608
|
-
}, delay);
|
3665
|
+
timeout = window.setTimeout(() => setVisibility(true), delay);
|
3609
3666
|
}
|
3610
3667
|
|
3611
|
-
return
|
3668
|
+
return () => {
|
3612
3669
|
if (timeout) {
|
3613
3670
|
clearTimeout(timeout);
|
3614
3671
|
}
|
@@ -3619,7 +3676,7 @@ var Spinner$1 = /*#__PURE__*/React__default.forwardRef(function Spinner(props, r
|
|
3619
3676
|
return null;
|
3620
3677
|
}
|
3621
3678
|
|
3622
|
-
|
3679
|
+
const className = cn('inline-flex flex-col relative items-center', otherProps.className);
|
3623
3680
|
return React__default.createElement("div", Object.assign({}, otherProps, {
|
3624
3681
|
className: className,
|
3625
3682
|
"data-taco": "spinner",
|
@@ -3738,69 +3795,56 @@ const Toast = ({
|
|
3738
3795
|
className: "flex-grow"
|
3739
3796
|
}, content), React__default.createElement(IconButton, {
|
3740
3797
|
appearance: "discrete",
|
3741
|
-
className: "text-grey-darkest
|
3798
|
+
className: "text-grey-darkest -mr-2 cursor-pointer !px-0",
|
3742
3799
|
icon: "close",
|
3743
3800
|
"aria-label": texts.toasts.dismiss,
|
3744
3801
|
onClick: handleClose
|
3745
3802
|
}));
|
3746
3803
|
};
|
3747
3804
|
|
3748
|
-
|
3749
|
-
|
3750
|
-
var ToastContext = /*#__PURE__*/React.createContext({});
|
3805
|
+
const DEFAULT_AUTO_CLOSE_TIMEOUT = 7500;
|
3806
|
+
const ToastContext = /*#__PURE__*/React.createContext({});
|
3751
3807
|
|
3752
|
-
|
3753
|
-
|
3754
|
-
|
3755
|
-
return JSON.stringify(toast.content) === JSON.stringify(content);
|
3756
|
-
});
|
3808
|
+
const insertToastWithoutDuplicates = (currentToasts, id, content, options, close) => {
|
3809
|
+
const nextToasts = [...currentToasts];
|
3810
|
+
const existingToastIndex = currentToasts.findIndex(toast => JSON.stringify(toast.content) === JSON.stringify(content));
|
3757
3811
|
|
3758
3812
|
if (existingToastIndex > -1) {
|
3759
3813
|
nextToasts[existingToastIndex].lastDuplicateId = id;
|
3760
3814
|
nextToasts[existingToastIndex].lastUpdated = Date.now();
|
3761
3815
|
} else {
|
3762
3816
|
nextToasts.push({
|
3763
|
-
id
|
3817
|
+
id,
|
3764
3818
|
content: typeof content === 'function' ? content(close) : content,
|
3765
|
-
options
|
3819
|
+
options
|
3766
3820
|
});
|
3767
3821
|
}
|
3768
3822
|
|
3769
3823
|
return nextToasts;
|
3770
3824
|
};
|
3771
3825
|
|
3772
|
-
|
3773
|
-
|
3774
|
-
|
3775
|
-
|
3776
|
-
|
3777
|
-
toasts = _React$useState[0],
|
3778
|
-
setToasts = _React$useState[1];
|
3826
|
+
const ToastProvider = ({
|
3827
|
+
children,
|
3828
|
+
...props
|
3829
|
+
}) => {
|
3830
|
+
const [toasts, setToasts] = React.useState([]);
|
3779
3831
|
|
3780
|
-
|
3781
|
-
setToasts(
|
3782
|
-
return currentToasts.filter(function (toast) {
|
3783
|
-
return toast.id !== id;
|
3784
|
-
});
|
3785
|
-
});
|
3832
|
+
const handleClose = id => {
|
3833
|
+
setToasts(currentToasts => currentToasts.filter(toast => toast.id !== id));
|
3786
3834
|
}; // memoize (useCallback) this function,
|
3787
3835
|
// it is the value of the context provider and we don't want it to trigger state tree re-renders on provider children
|
3788
3836
|
|
3789
3837
|
|
3790
|
-
|
3791
|
-
|
3838
|
+
const toaster = React.useCallback((content, options) => {
|
3839
|
+
const id = uuid.v4();
|
3792
3840
|
|
3793
|
-
|
3794
|
-
return handleClose(id);
|
3795
|
-
};
|
3841
|
+
const close = () => handleClose(id);
|
3796
3842
|
|
3797
|
-
setToasts(
|
3798
|
-
return insertToastWithoutDuplicates(currentToasts, id, content, options, close);
|
3799
|
-
});
|
3843
|
+
setToasts(currentToasts => insertToastWithoutDuplicates(currentToasts, id, content, options, close));
|
3800
3844
|
|
3801
|
-
|
3802
|
-
setToasts(
|
3803
|
-
|
3845
|
+
const update = (content, options) => {
|
3846
|
+
setToasts(currentToasts => {
|
3847
|
+
const nextToasts = currentToasts.filter(toast => {
|
3804
3848
|
if (toast.lastDuplicateId) {
|
3805
3849
|
return toast.lastDuplicateId !== id;
|
3806
3850
|
}
|
@@ -3811,80 +3855,70 @@ var ToastProvider = function ToastProvider(_ref) {
|
|
3811
3855
|
});
|
3812
3856
|
};
|
3813
3857
|
|
3814
|
-
|
3815
|
-
update(content,
|
3816
|
-
autoClose: DEFAULT_AUTO_CLOSE_TIMEOUT
|
3817
|
-
|
3858
|
+
const success = (content, options) => {
|
3859
|
+
update(content, {
|
3860
|
+
autoClose: DEFAULT_AUTO_CLOSE_TIMEOUT,
|
3861
|
+
...options,
|
3818
3862
|
type: 'success'
|
3819
|
-
})
|
3863
|
+
});
|
3820
3864
|
};
|
3821
3865
|
|
3822
|
-
|
3823
|
-
update(content,
|
3866
|
+
const error = (content, options) => {
|
3867
|
+
update(content, { ...options,
|
3824
3868
|
type: 'error'
|
3825
|
-
})
|
3869
|
+
});
|
3826
3870
|
};
|
3827
3871
|
|
3828
|
-
|
3829
|
-
update(content,
|
3872
|
+
const warning = (content, options) => {
|
3873
|
+
update(content, { ...options,
|
3830
3874
|
type: 'warning'
|
3831
|
-
})
|
3875
|
+
});
|
3832
3876
|
};
|
3833
3877
|
|
3834
|
-
|
3835
|
-
update(content,
|
3878
|
+
const information = (content, options) => {
|
3879
|
+
update(content, { ...options,
|
3836
3880
|
type: 'information'
|
3837
|
-
})
|
3881
|
+
});
|
3838
3882
|
};
|
3839
3883
|
|
3840
|
-
|
3841
|
-
update(content,
|
3884
|
+
const loading = (content, options) => {
|
3885
|
+
update(content, { ...options,
|
3842
3886
|
type: 'loading'
|
3843
|
-
})
|
3887
|
+
});
|
3844
3888
|
};
|
3845
3889
|
|
3846
3890
|
return {
|
3847
|
-
success
|
3848
|
-
error
|
3849
|
-
warning
|
3850
|
-
information
|
3851
|
-
loading
|
3852
|
-
close
|
3891
|
+
success,
|
3892
|
+
error,
|
3893
|
+
warning,
|
3894
|
+
information,
|
3895
|
+
loading,
|
3896
|
+
close
|
3853
3897
|
};
|
3854
3898
|
}, []); // no need to rebind these every render, do them once in an effect
|
3855
3899
|
|
3856
|
-
React.useEffect(
|
3857
|
-
toaster.success =
|
3858
|
-
|
3859
|
-
|
3860
|
-
|
3861
|
-
|
3862
|
-
}));
|
3863
|
-
};
|
3900
|
+
React.useEffect(() => {
|
3901
|
+
toaster.success = (content, options) => toaster(content, {
|
3902
|
+
autoClose: DEFAULT_AUTO_CLOSE_TIMEOUT,
|
3903
|
+
...options,
|
3904
|
+
type: 'success'
|
3905
|
+
});
|
3864
3906
|
|
3865
|
-
toaster.error =
|
3866
|
-
|
3867
|
-
|
3868
|
-
}));
|
3869
|
-
};
|
3907
|
+
toaster.error = (content, options) => toaster(content, { ...options,
|
3908
|
+
type: 'error'
|
3909
|
+
});
|
3870
3910
|
|
3871
|
-
toaster.warning =
|
3872
|
-
|
3873
|
-
|
3874
|
-
}));
|
3875
|
-
};
|
3911
|
+
toaster.warning = (content, options) => toaster(content, { ...options,
|
3912
|
+
type: 'warning'
|
3913
|
+
});
|
3876
3914
|
|
3877
|
-
toaster.information =
|
3878
|
-
|
3879
|
-
|
3880
|
-
}));
|
3881
|
-
};
|
3915
|
+
toaster.information = (content, options) => toaster(content, { ...options,
|
3916
|
+
type: 'information'
|
3917
|
+
});
|
3882
3918
|
|
3883
|
-
toaster.loading =
|
3884
|
-
|
3885
|
-
|
3886
|
-
}));
|
3887
|
-
};
|
3919
|
+
toaster.loading = (content, options) => toaster(content, { ...options,
|
3920
|
+
type: 'loading'
|
3921
|
+
});
|
3888
3922
|
}, []);
|
3889
3923
|
return React.createElement(ToastContext.Provider, Object.assign({}, props, {
|
3890
3924
|
value: toaster
|
@@ -3894,43 +3928,37 @@ var ToastProvider = function ToastProvider(_ref) {
|
|
3894
3928
|
role: "log"
|
3895
3929
|
}, React.createElement(framerMotion.AnimatePresence, {
|
3896
3930
|
initial: false
|
3897
|
-
}, toasts.map(
|
3898
|
-
|
3899
|
-
|
3931
|
+
}, toasts.map(toast => React.createElement(framerMotion.motion.div, {
|
3932
|
+
key: toast.id,
|
3933
|
+
transition: {
|
3934
|
+
type: 'spring',
|
3935
|
+
damping: 20,
|
3936
|
+
stiffness: 300
|
3937
|
+
},
|
3938
|
+
initial: {
|
3939
|
+
opacity: 0,
|
3940
|
+
y: 10,
|
3941
|
+
scale: 0.5
|
3942
|
+
},
|
3943
|
+
animate: {
|
3944
|
+
opacity: 1,
|
3945
|
+
y: 0,
|
3946
|
+
scale: 1
|
3947
|
+
},
|
3948
|
+
exit: {
|
3949
|
+
opacity: 0,
|
3950
|
+
scale: 0.5,
|
3900
3951
|
transition: {
|
3901
|
-
|
3902
|
-
damping: 20,
|
3903
|
-
stiffness: 300
|
3904
|
-
},
|
3905
|
-
initial: {
|
3906
|
-
opacity: 0,
|
3907
|
-
y: 10,
|
3908
|
-
scale: 0.5
|
3909
|
-
},
|
3910
|
-
animate: {
|
3911
|
-
opacity: 1,
|
3912
|
-
y: 0,
|
3913
|
-
scale: 1
|
3914
|
-
},
|
3915
|
-
exit: {
|
3916
|
-
opacity: 0,
|
3917
|
-
scale: 0.5,
|
3918
|
-
transition: {
|
3919
|
-
duration: 0.2
|
3920
|
-
}
|
3921
|
-
}
|
3922
|
-
}, React.createElement(Toast, Object.assign({}, toast, {
|
3923
|
-
onClose: function onClose() {
|
3924
|
-
return handleClose(toast.id);
|
3952
|
+
duration: 0.2
|
3925
3953
|
}
|
3926
|
-
}
|
3927
|
-
}
|
3928
|
-
|
3929
|
-
|
3930
|
-
return React.useContext(ToastContext);
|
3954
|
+
}
|
3955
|
+
}, React.createElement(Toast, Object.assign({}, toast, {
|
3956
|
+
onClose: () => handleClose(toast.id)
|
3957
|
+
})))))));
|
3931
3958
|
};
|
3959
|
+
const useToast = () => React.useContext(ToastContext);
|
3932
3960
|
|
3933
|
-
|
3961
|
+
const defaultLocalisationTexts = {
|
3934
3962
|
calendar: {
|
3935
3963
|
months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
|
3936
3964
|
weekdaysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
@@ -4005,37 +4033,32 @@ var defaultLocalisationTexts = {
|
|
4005
4033
|
inputLabel: 'Search...'
|
4006
4034
|
}
|
4007
4035
|
};
|
4008
|
-
|
4036
|
+
const defaultLocalizationContext = {
|
4009
4037
|
locale: 'en-GB',
|
4010
4038
|
texts: defaultLocalisationTexts,
|
4011
4039
|
formatting: {
|
4012
4040
|
date: 'dd.mm.yy'
|
4013
4041
|
}
|
4014
4042
|
};
|
4015
|
-
|
4043
|
+
const Context = /*#__PURE__*/React.createContext({
|
4016
4044
|
localization: defaultLocalizationContext
|
4017
4045
|
});
|
4018
|
-
|
4019
|
-
|
4020
|
-
|
4021
|
-
|
4022
|
-
|
4023
|
-
|
4024
|
-
|
4025
|
-
|
4026
|
-
}, [localization]);
|
4046
|
+
const Provider = props => {
|
4047
|
+
const {
|
4048
|
+
children,
|
4049
|
+
localization = defaultLocalizationContext
|
4050
|
+
} = props;
|
4051
|
+
const value = React.useMemo(() => ({
|
4052
|
+
localization
|
4053
|
+
}), [localization]);
|
4027
4054
|
return React.createElement(Context.Provider, {
|
4028
4055
|
value: value
|
4029
4056
|
}, React.createElement(ToastProvider, null, children));
|
4030
4057
|
};
|
4031
|
-
|
4032
|
-
|
4033
|
-
};
|
4034
|
-
var useLocalization = function useLocalization() {
|
4035
|
-
return useTaco().localization;
|
4036
|
-
};
|
4058
|
+
const useTaco = () => React.useContext(Context);
|
4059
|
+
const useLocalization = () => useTaco().localization;
|
4037
4060
|
|
4038
|
-
var _excluded$
|
4061
|
+
var _excluded$4 = ["onChange", "value"];
|
4039
4062
|
|
4040
4063
|
var renderDay = function renderDay(day, modifiers) {
|
4041
4064
|
return modifiers.disabled ? React.createElement("span", {
|
@@ -4114,7 +4137,7 @@ var Navbar = /*#__PURE__*/React.memo(function (_ref) {
|
|
4114
4137
|
var Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
|
4115
4138
|
var handleChange = props.onChange,
|
4116
4139
|
value = props.value,
|
4117
|
-
otherProps = _objectWithoutPropertiesLoose(props, _excluded$
|
4140
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded$4);
|
4118
4141
|
|
4119
4142
|
var _useLocalization2 = useLocalization(),
|
4120
4143
|
locale = _useLocalization2.locale,
|
@@ -4178,7 +4201,7 @@ var Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
|
|
4178
4201
|
})));
|
4179
4202
|
});
|
4180
4203
|
|
4181
|
-
var _excluded$
|
4204
|
+
var _excluded$5 = ["checked", "highlighted", "indeterminate", "invalid", "label", "onChange"];
|
4182
4205
|
var Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
|
4183
4206
|
var checked = props.checked,
|
4184
4207
|
highlighted = props.highlighted,
|
@@ -4186,7 +4209,7 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
|
|
4186
4209
|
invalid = props.invalid,
|
4187
4210
|
label = props.label,
|
4188
4211
|
onChange = props.onChange,
|
4189
|
-
otherProps = _objectWithoutPropertiesLoose(props, _excluded$
|
4212
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded$5);
|
4190
4213
|
|
4191
4214
|
var className = cn('bg-white h-5 w-5 border rounded text-sm flex-shrink-0 self-start mt-[0.1rem] focus:yt-focus', //hover:shadow-[0_0_0_1px_rgba(235,235,235,1)]
|
4192
4215
|
props.className, {
|
@@ -4228,9 +4251,9 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
|
|
4228
4251
|
return element;
|
4229
4252
|
});
|
4230
4253
|
|
4231
|
-
|
4232
|
-
|
4233
|
-
React.useEffect(()
|
4254
|
+
var useProxiedRef = function useProxiedRef(ref) {
|
4255
|
+
var internalRef = React.useRef(null);
|
4256
|
+
React.useEffect(function () {
|
4234
4257
|
if (ref) {
|
4235
4258
|
if (typeof ref === 'function') {
|
4236
4259
|
ref(internalRef.current);
|
@@ -4260,21 +4283,22 @@ const getButtonStateClasses = invalid => {
|
|
4260
4283
|
return '!border-grey-dark focus:!border-blue-light peer-focus:!border-blue-light peer-focus:peer-active:!border-blue-dark';
|
4261
4284
|
};
|
4262
4285
|
|
4263
|
-
|
4264
|
-
|
4265
|
-
|
4266
|
-
|
4267
|
-
|
4268
|
-
|
4269
|
-
|
4270
|
-
|
4271
|
-
|
4272
|
-
|
4273
|
-
|
4274
|
-
|
4286
|
+
const Input = /*#__PURE__*/React.forwardRef(function Input(props, ref) {
|
4287
|
+
const {
|
4288
|
+
button,
|
4289
|
+
icon,
|
4290
|
+
highlighted,
|
4291
|
+
invalid,
|
4292
|
+
onKeyDown,
|
4293
|
+
autoFocus,
|
4294
|
+
...otherProps
|
4295
|
+
} = props;
|
4296
|
+
const inputRef = useProxiedRef(ref);
|
4297
|
+
const hasContainer = button || icon;
|
4298
|
+
const className = cn(getInputClasses(props), 'min-h-[theme(spacing.8)] pointer-events-all', {
|
4275
4299
|
'pr-8': !!hasContainer
|
4276
4300
|
}, !hasContainer && otherProps.className);
|
4277
|
-
React.useEffect(
|
4301
|
+
React.useEffect(() => {
|
4278
4302
|
if (autoFocus && inputRef.current) {
|
4279
4303
|
inputRef.current.focus();
|
4280
4304
|
}
|
@@ -4282,10 +4306,10 @@ var Input = /*#__PURE__*/React.forwardRef(function Input(props, ref) {
|
|
4282
4306
|
// if it has scroll height then the browser reverts to native scrolling behaviour only
|
4283
4307
|
// so we manually override it to ensure _our_ desired behaviour remains intact
|
4284
4308
|
|
4285
|
-
|
4309
|
+
const handleKeyDown = event => {
|
4286
4310
|
if (!event.shiftKey && (event.key === 'Home' || event.key === 'End')) {
|
4287
4311
|
event.preventDefault();
|
4288
|
-
|
4312
|
+
const position = event.key === 'End' ? event.currentTarget.value.length : 0;
|
4289
4313
|
event.currentTarget.setSelectionRange(position, position);
|
4290
4314
|
}
|
4291
4315
|
|
@@ -4294,7 +4318,7 @@ var Input = /*#__PURE__*/React.forwardRef(function Input(props, ref) {
|
|
4294
4318
|
}
|
4295
4319
|
};
|
4296
4320
|
|
4297
|
-
|
4321
|
+
const input = React.createElement("input", Object.assign({}, otherProps, {
|
4298
4322
|
className: className,
|
4299
4323
|
"data-taco": "input",
|
4300
4324
|
onKeyDown: handleKeyDown,
|
@@ -4302,19 +4326,19 @@ var Input = /*#__PURE__*/React.forwardRef(function Input(props, ref) {
|
|
4302
4326
|
}));
|
4303
4327
|
|
4304
4328
|
if (hasContainer) {
|
4305
|
-
|
4329
|
+
let extra;
|
4306
4330
|
|
4307
4331
|
if (button) {
|
4308
|
-
|
4309
|
-
|
4310
|
-
|
4311
|
-
|
4332
|
+
const disabled = button.props.disabled || otherProps.disabled;
|
4333
|
+
const buttonClassName = cn('items-center flex justify-center border absolute rounded-l-none rounded-r right-0 h-full focus:rounded focus:outline-none', {
|
4334
|
+
[getButtonStateClasses(invalid)]: !props.disabled
|
4335
|
+
}, button.props.className);
|
4312
4336
|
extra = React.cloneElement(button, {
|
4313
4337
|
className: buttonClassName,
|
4314
|
-
disabled
|
4338
|
+
disabled
|
4315
4339
|
});
|
4316
4340
|
} else if (icon) {
|
4317
|
-
|
4341
|
+
const iconClassName = cn('items-center flex justify-center absolute pointer-events-none mr-1 p-px right-0 w-5 top-1/2 -translate-y-1/2', {
|
4318
4342
|
'text-grey-dark': props.disabled,
|
4319
4343
|
'text-grey-darkest': !props.disabled
|
4320
4344
|
});
|
@@ -4326,7 +4350,7 @@ var Input = /*#__PURE__*/React.forwardRef(function Input(props, ref) {
|
|
4326
4350
|
});
|
4327
4351
|
}
|
4328
4352
|
|
4329
|
-
|
4353
|
+
const containerClassName = cn('bg-white inline-flex relative rounded w-full', otherProps.className);
|
4330
4354
|
return React.createElement("div", {
|
4331
4355
|
className: containerClassName,
|
4332
4356
|
"data-taco": "input-container"
|
@@ -5097,12 +5121,12 @@ var useBoundingClientRectListener = function useBoundingClientRectListener(ref)
|
|
5097
5121
|
return dimensions;
|
5098
5122
|
};
|
5099
5123
|
|
5100
|
-
var _excluded$
|
5124
|
+
var _excluded$6 = ["className", "dialog", "style"];
|
5101
5125
|
var Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
|
5102
5126
|
var externalClassName = props.className,
|
5103
5127
|
dialog = props.dialog,
|
5104
5128
|
style = props.style,
|
5105
|
-
otherProps = _objectWithoutPropertiesLoose(props, _excluded$
|
5129
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded$6);
|
5106
5130
|
|
5107
5131
|
var _useCombobox = useCombobox(otherProps, ref),
|
5108
5132
|
combobox = _useCombobox.combobox,
|
@@ -5144,6 +5168,7 @@ var Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
|
|
5144
5168
|
},
|
5145
5169
|
tabIndex: -1
|
5146
5170
|
}) : dialog ? React.createElement(IconButton, {
|
5171
|
+
"aria-label": texts.combobox.tooltip,
|
5147
5172
|
icon: "list-search",
|
5148
5173
|
disabled: props.readOnly || props.disabled,
|
5149
5174
|
dialog: dialog,
|
@@ -5383,8 +5408,8 @@ const UnstyledContent = /*#__PURE__*/React.forwardRef(function PopoverContent(pr
|
|
5383
5408
|
});
|
5384
5409
|
|
5385
5410
|
function mergeRefs(refs) {
|
5386
|
-
return value
|
5387
|
-
refs.forEach(ref
|
5411
|
+
return function (value) {
|
5412
|
+
refs.forEach(function (ref) {
|
5388
5413
|
if (typeof ref === 'function') {
|
5389
5414
|
ref(value);
|
5390
5415
|
} else if (ref != null) {
|
@@ -5394,19 +5419,18 @@ function mergeRefs(refs) {
|
|
5394
5419
|
};
|
5395
5420
|
}
|
5396
5421
|
|
5397
|
-
|
5398
|
-
var PopoverContext = /*#__PURE__*/React.createContext({
|
5422
|
+
const PopoverContext = /*#__PURE__*/React.createContext({
|
5399
5423
|
props: {},
|
5400
5424
|
ref: null
|
5401
5425
|
});
|
5402
|
-
|
5426
|
+
const Trigger$1 = /*#__PURE__*/React.forwardRef(function PopoverTrigger(props, ref) {
|
5403
5427
|
var _props$children;
|
5404
5428
|
|
5405
|
-
|
5406
|
-
|
5429
|
+
const context = React.useContext(PopoverContext);
|
5430
|
+
let children = props.children;
|
5407
5431
|
|
5408
5432
|
if (React.isValidElement(props.children) && typeof ((_props$children = props.children) === null || _props$children === void 0 ? void 0 : _props$children.type) === 'function') {
|
5409
|
-
console.warn(
|
5433
|
+
console.warn(`Popover.Trigger requires its child to forwardRef so that it can attach to the dom element. Did you mean to wrap '${props.children.type.name}' in React.forwardRef()? Taco has wrapped '${props.children.type.name}' in a 'span' to maintain functionality, but this may cause unintended behaviour`);
|
5410
5434
|
children = React.createElement("span", null, props.children);
|
5411
5435
|
}
|
5412
5436
|
|
@@ -5416,22 +5440,22 @@ var Trigger$1 = /*#__PURE__*/React.forwardRef(function PopoverTrigger(props, ref
|
|
5416
5440
|
asChild: true
|
5417
5441
|
}));
|
5418
5442
|
});
|
5419
|
-
|
5420
|
-
|
5421
|
-
|
5422
|
-
|
5423
|
-
|
5443
|
+
const RenderPropWrapper = /*#__PURE__*/React.forwardRef(function RenderPropWrapper({
|
5444
|
+
children,
|
5445
|
+
onClick
|
5446
|
+
}, ref) {
|
5447
|
+
const close = () => {
|
5424
5448
|
onClick(new CustomEvent('hide'));
|
5425
5449
|
};
|
5426
5450
|
|
5427
5451
|
return children({
|
5428
|
-
close
|
5429
|
-
ref
|
5452
|
+
close,
|
5453
|
+
ref
|
5430
5454
|
});
|
5431
5455
|
});
|
5432
|
-
|
5433
|
-
|
5434
|
-
|
5456
|
+
const Content$1 = /*#__PURE__*/React.forwardRef(function PopoverContent(props, ref) {
|
5457
|
+
const className = cn('bg-white focus:border-blue-light', props.className);
|
5458
|
+
let output;
|
5435
5459
|
|
5436
5460
|
if (typeof props.children === 'function') {
|
5437
5461
|
output = React.createElement(PopoverPrimitive.Close, {
|
@@ -5449,23 +5473,20 @@ var Content$1 = /*#__PURE__*/React.forwardRef(function PopoverContent(props, ref
|
|
5449
5473
|
className: "text-white"
|
5450
5474
|
}));
|
5451
5475
|
});
|
5452
|
-
|
5453
|
-
|
5454
|
-
|
5455
|
-
|
5456
|
-
|
5457
|
-
|
5458
|
-
|
5459
|
-
|
5460
|
-
|
5461
|
-
|
5462
|
-
|
5463
|
-
|
5464
|
-
|
5465
|
-
|
5466
|
-
ref: ref
|
5467
|
-
};
|
5468
|
-
}, [otherProps]);
|
5476
|
+
const Close$1 = /*#__PURE__*/React.forwardRef((props, ref) => React.createElement(PopoverPrimitive.Close, Object.assign({}, props, {
|
5477
|
+
ref: ref,
|
5478
|
+
asChild: true
|
5479
|
+
})));
|
5480
|
+
const Popover = /*#__PURE__*/React.forwardRef(function Popover(props, ref) {
|
5481
|
+
const {
|
5482
|
+
children,
|
5483
|
+
trigger,
|
5484
|
+
...otherProps
|
5485
|
+
} = props;
|
5486
|
+
const context = React.useMemo(() => ({
|
5487
|
+
props: otherProps,
|
5488
|
+
ref
|
5489
|
+
}), [otherProps]);
|
5469
5490
|
return React.createElement(PopoverContext.Provider, {
|
5470
5491
|
value: context
|
5471
5492
|
}, React.createElement(PopoverPrimitive.Root, null, trigger && React.createElement(Trigger$1, null, trigger), children));
|
@@ -5474,14 +5495,14 @@ Popover.Trigger = Trigger$1;
|
|
5474
5495
|
Popover.Content = Content$1;
|
5475
5496
|
Popover.Close = Close$1;
|
5476
5497
|
|
5477
|
-
var _excluded$
|
5498
|
+
var _excluded$7 = ["className", "onReset", "style", "shortcuts", "shortcutsText"];
|
5478
5499
|
var Datepicker = /*#__PURE__*/React.forwardRef(function Datepicker(props, ref) {
|
5479
5500
|
var externalClassName = props.className,
|
5480
5501
|
handleReset = props.onReset,
|
5481
5502
|
style = props.style,
|
5482
5503
|
shortcuts = props.shortcuts,
|
5483
5504
|
shortcutsText = props.shortcutsText,
|
5484
|
-
otherProps = _objectWithoutPropertiesLoose(props, _excluded$
|
5505
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded$7);
|
5485
5506
|
|
5486
5507
|
var _useDatepicker = useDatepicker(otherProps, ref),
|
5487
5508
|
calendar = _useDatepicker.calendar,
|
@@ -5776,7 +5797,7 @@ const Extra = /*#__PURE__*/React.forwardRef(function DialogExtra(props, ref) {
|
|
5776
5797
|
});
|
5777
5798
|
Extra.displayName = 'DialogExtra';
|
5778
5799
|
|
5779
|
-
var _excluded$
|
5800
|
+
var _excluded$8 = ["children", "closeOnEscape", "defaultOpen", "draggable", "onChange", "onClose", "open", "showCloseButton", "size", "trigger"];
|
5780
5801
|
|
5781
5802
|
var useSeparatedChildren = function useSeparatedChildren(initialChildren) {
|
5782
5803
|
return React.useMemo(function () {
|
@@ -5813,7 +5834,7 @@ var Dialog = /*#__PURE__*/React.forwardRef(function Dialog(props, ref) {
|
|
5813
5834
|
_props$size = props.size,
|
5814
5835
|
size = _props$size === void 0 ? 'sm' : _props$size,
|
5815
5836
|
trigger = props.trigger,
|
5816
|
-
otherProps = _objectWithoutPropertiesLoose(props, _excluded$
|
5837
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded$8);
|
5817
5838
|
|
5818
5839
|
var _useSeparatedChildren = useSeparatedChildren(initialChildren),
|
5819
5840
|
children = _useSeparatedChildren[0],
|
@@ -5863,14 +5884,14 @@ Dialog.Extra = Extra;
|
|
5863
5884
|
Dialog.Drawer = Drawer;
|
5864
5885
|
Dialog.Close = Close$2;
|
5865
5886
|
|
5866
|
-
var _excluded$
|
5887
|
+
var _excluded$9 = ["disabled", "children", "invalid", "message"];
|
5867
5888
|
var Field = /*#__PURE__*/React.forwardRef(function Field(props, ref) {
|
5868
5889
|
var disabled = props.disabled,
|
5869
5890
|
children = props.children,
|
5870
5891
|
_props$invalid = props.invalid,
|
5871
5892
|
invalid = _props$invalid === void 0 ? false : _props$invalid,
|
5872
5893
|
message = props.message,
|
5873
|
-
otherProps = _objectWithoutPropertiesLoose(props, _excluded$
|
5894
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded$9);
|
5874
5895
|
|
5875
5896
|
var className = cn('flex flex-col font-bold text-xs leading-loose pb-4 min-h-[theme(spacing.18)]', {
|
5876
5897
|
'text-grey-dark': disabled
|
@@ -5890,11 +5911,11 @@ var Field = /*#__PURE__*/React.forwardRef(function Field(props, ref) {
|
|
5890
5911
|
}, message));
|
5891
5912
|
});
|
5892
5913
|
|
5893
|
-
var _excluded$
|
5914
|
+
var _excluded$a = ["horizontal"];
|
5894
5915
|
var Form = /*#__PURE__*/React.forwardRef(function Form(props, ref) {
|
5895
5916
|
var _props$horizontal = props.horizontal,
|
5896
5917
|
horizontal = _props$horizontal === void 0 ? false : _props$horizontal,
|
5897
|
-
otherProps = _objectWithoutPropertiesLoose(props, _excluded$
|
5918
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded$a);
|
5898
5919
|
|
5899
5920
|
var className = cn('yt-form', {
|
5900
5921
|
'yt-form--horizontal flex flex-wrap': horizontal
|
@@ -5906,11 +5927,11 @@ var Form = /*#__PURE__*/React.forwardRef(function Form(props, ref) {
|
|
5906
5927
|
}));
|
5907
5928
|
});
|
5908
5929
|
|
5909
|
-
var _excluded$
|
5930
|
+
var _excluded$b = ["as"];
|
5910
5931
|
var Group = /*#__PURE__*/React.forwardRef(function Group(props, ref) {
|
5911
5932
|
var _props$as = props.as,
|
5912
5933
|
Tag = _props$as === void 0 ? 'span' : _props$as,
|
5913
|
-
otherProps = _objectWithoutPropertiesLoose(props, _excluded$
|
5934
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded$b);
|
5914
5935
|
|
5915
5936
|
var className = cn('flex ', props.className);
|
5916
5937
|
return React.createElement(Tag, Object.assign({}, otherProps, {
|
@@ -5920,7 +5941,7 @@ var Group = /*#__PURE__*/React.forwardRef(function Group(props, ref) {
|
|
5920
5941
|
}));
|
5921
5942
|
});
|
5922
5943
|
|
5923
|
-
var _excluded$
|
5944
|
+
var _excluded$c = ["anchor", "children", "defaultOpen"];
|
5924
5945
|
var HangerContext = /*#__PURE__*/React.createContext({
|
5925
5946
|
props: {},
|
5926
5947
|
ref: null
|
@@ -5984,7 +6005,7 @@ var Hanger = /*#__PURE__*/React.forwardRef(function Hanger(props, ref) {
|
|
5984
6005
|
children = props.children,
|
5985
6006
|
_props$defaultOpen = props.defaultOpen,
|
5986
6007
|
defaultOpen = _props$defaultOpen === void 0 ? true : _props$defaultOpen,
|
5987
|
-
otherProps = _objectWithoutPropertiesLoose(props, _excluded$
|
6008
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded$c);
|
5988
6009
|
|
5989
6010
|
var context = React.useMemo(function () {
|
5990
6011
|
return {
|
@@ -6013,7 +6034,7 @@ Hanger.Anchor = Anchor;
|
|
6013
6034
|
Hanger.Content = Content$3;
|
6014
6035
|
Hanger.Title = Title$1;
|
6015
6036
|
|
6016
|
-
var _excluded$
|
6037
|
+
var _excluded$d = ["placement"];
|
6017
6038
|
var Trigger$3 = /*#__PURE__*/React.forwardRef(function HoverCardTrigger(props, ref) {
|
6018
6039
|
return React.createElement(HoverCardPrimitive.Trigger, Object.assign({}, props, {
|
6019
6040
|
asChild: true,
|
@@ -6022,7 +6043,7 @@ var Trigger$3 = /*#__PURE__*/React.forwardRef(function HoverCardTrigger(props, r
|
|
6022
6043
|
});
|
6023
6044
|
var Content$4 = /*#__PURE__*/React.forwardRef(function HoverCardContent(externalProps, ref) {
|
6024
6045
|
var placement = externalProps.placement,
|
6025
|
-
props = _objectWithoutPropertiesLoose(externalProps, _excluded$
|
6046
|
+
props = _objectWithoutPropertiesLoose(externalProps, _excluded$d);
|
6026
6047
|
|
6027
6048
|
var className = cn('bg-white rounded p-3 yt-shadow', props.className);
|
6028
6049
|
return React.createElement(HoverCardPrimitive.Content, Object.assign({}, props, {
|
@@ -6039,24 +6060,24 @@ var HoverCard = function HoverCard(props) {
|
|
6039
6060
|
HoverCard.Trigger = Trigger$3;
|
6040
6061
|
HoverCard.Content = Content$4;
|
6041
6062
|
|
6042
|
-
|
6043
|
-
|
6044
|
-
|
6045
|
-
|
6046
|
-
|
6047
|
-
|
6048
|
-
|
6063
|
+
const SearchInput = /*#__PURE__*/React.forwardRef(function SearchInput({
|
6064
|
+
onSearch,
|
6065
|
+
...props
|
6066
|
+
}, ref) {
|
6067
|
+
const {
|
6068
|
+
texts
|
6069
|
+
} = useLocalization();
|
6049
6070
|
|
6050
|
-
|
6071
|
+
const handleClick = () => {
|
6051
6072
|
if (!props.disabled) {
|
6052
6073
|
onSearch === null || onSearch === void 0 ? void 0 : onSearch(props.value);
|
6053
6074
|
}
|
6054
6075
|
};
|
6055
6076
|
|
6056
|
-
|
6077
|
+
const handleKeyDown = event => {
|
6057
6078
|
var _props$onKeyDown;
|
6058
6079
|
|
6059
|
-
|
6080
|
+
const isEnterKeyPressed = event.keyCode === keycode('enter');
|
6060
6081
|
|
6061
6082
|
if (isEnterKeyPressed) {
|
6062
6083
|
handleClick();
|
@@ -6425,49 +6446,49 @@ const useMultiListbox = ({
|
|
6425
6446
|
};
|
6426
6447
|
};
|
6427
6448
|
|
6428
|
-
|
6429
|
-
|
6430
|
-
|
6431
|
-
|
6432
|
-
|
6433
|
-
|
6434
|
-
|
6435
|
-
|
6436
|
-
|
6437
|
-
|
6438
|
-
var className = cn('bg-white inline-flex relative w-full', externalClassName);
|
6449
|
+
const Listbox = /*#__PURE__*/React.forwardRef(function Listbox(props, ref) {
|
6450
|
+
const {
|
6451
|
+
className: externalClassName,
|
6452
|
+
...otherProps
|
6453
|
+
} = props;
|
6454
|
+
const {
|
6455
|
+
list,
|
6456
|
+
input
|
6457
|
+
} = useListbox(otherProps, ref);
|
6458
|
+
const className = cn('bg-white inline-flex relative w-full', externalClassName);
|
6439
6459
|
return React.createElement("span", {
|
6440
6460
|
"data-taco": "listbox",
|
6441
6461
|
className: className
|
6442
6462
|
}, React.createElement(ScrollableList, Object.assign({}, list, {
|
6443
|
-
style:
|
6463
|
+
style: { ...list.style,
|
6444
6464
|
maxHeight: 'calc(12rem + 2px)'
|
6445
6465
|
/* (6 * option height) + listbox border */
|
6446
6466
|
|
6447
|
-
}
|
6467
|
+
}
|
6448
6468
|
})), React.createElement("input", Object.assign({}, input, {
|
6449
6469
|
className: "hidden",
|
6450
6470
|
type: "text"
|
6451
6471
|
})));
|
6452
6472
|
});
|
6453
|
-
|
6454
|
-
|
6455
|
-
|
6456
|
-
|
6457
|
-
|
6458
|
-
|
6459
|
-
|
6460
|
-
|
6461
|
-
|
6473
|
+
const MultiListbox = /*#__PURE__*/React.forwardRef(function Listbox(props, ref) {
|
6474
|
+
const {
|
6475
|
+
className: externalClassName,
|
6476
|
+
...otherProps
|
6477
|
+
} = props;
|
6478
|
+
const {
|
6479
|
+
list,
|
6480
|
+
input
|
6481
|
+
} = useMultiListbox(otherProps, ref);
|
6482
|
+
const className = cn('bg-white inline-flex relative w-full', externalClassName);
|
6462
6483
|
return React.createElement("span", {
|
6463
6484
|
"data-taco": "listbox",
|
6464
6485
|
className: className
|
6465
6486
|
}, React.createElement(ScrollableList, Object.assign({}, list, {
|
6466
|
-
style:
|
6487
|
+
style: { ...list.style,
|
6467
6488
|
maxHeight: 'calc(12rem + 2px + 2px)'
|
6468
6489
|
/* (6 * option height) + listbox border + ALL_OPTIONS bottom border */
|
6469
6490
|
|
6470
|
-
}
|
6491
|
+
}
|
6471
6492
|
})), React.createElement("input", Object.assign({}, input, {
|
6472
6493
|
className: "hidden",
|
6473
6494
|
type: "text"
|
@@ -6646,38 +6667,30 @@ const Checkbox$1 = props => {
|
|
6646
6667
|
className: "absolute left-0 ml-1.5"
|
6647
6668
|
}, React.createElement(Icon, {
|
6648
6669
|
name: "tick",
|
6649
|
-
className: "!h-4 !w-4
|
6670
|
+
className: "-ml-px !h-4 !w-4"
|
6650
6671
|
})), children);
|
6651
6672
|
};
|
6652
6673
|
|
6653
|
-
|
6654
|
-
|
6655
|
-
|
6656
|
-
return String(value !== null && value !== void 0 ? value : '');
|
6657
|
-
};
|
6658
|
-
var findByValue$1 = function findByValue(values, valueAsString) {
|
6659
|
-
return values.find(function (value) {
|
6660
|
-
return getRadioGroupItemValueAsString(value) === valueAsString;
|
6661
|
-
});
|
6662
|
-
};
|
6663
|
-
var RadioGroupContext = /*#__PURE__*/React.createContext({
|
6674
|
+
const getRadioGroupItemValueAsString = value => String(value !== null && value !== void 0 ? value : '');
|
6675
|
+
const findByValue$1 = (values, valueAsString) => values.find(value => getRadioGroupItemValueAsString(value) === valueAsString);
|
6676
|
+
const RadioGroupContext = /*#__PURE__*/React.createContext({
|
6664
6677
|
disabled: false,
|
6665
6678
|
invalid: false
|
6666
6679
|
});
|
6667
|
-
|
6668
|
-
|
6669
|
-
|
6670
|
-
|
6671
|
-
|
6672
|
-
|
6673
|
-
|
6674
|
-
|
6675
|
-
|
6680
|
+
const RadioGroupItem = /*#__PURE__*/React.forwardRef(function RadioGroupItem(props, ref) {
|
6681
|
+
const context = React.useContext(RadioGroupContext);
|
6682
|
+
const {
|
6683
|
+
children,
|
6684
|
+
value,
|
6685
|
+
...otherProps
|
6686
|
+
} = props;
|
6687
|
+
const isDisabled = context.disabled || props.disabled;
|
6688
|
+
const className = cn('flex flex-shrink-0 self-start items-center justify-center h-4 w-4 mt-[0.2rem] rounded-full bg-white border-2', {
|
6676
6689
|
'border-grey-dark hover:border-4 focus:yt-focus aria-checked:bg-blue aria-checked:border-blue hover:aria-checked:border-blue-light': !isDisabled && !context.invalid,
|
6677
6690
|
'border-grey cursor-not-allowed aria-checked:bg-blue-light aria-checked:border-blue-light ': isDisabled,
|
6678
6691
|
'border-red hover:border-4 text-red focus:border-red focus:yt-focus-red aria-checked:bg-red aria-checked:border-red': context.invalid && !isDisabled
|
6679
6692
|
});
|
6680
|
-
|
6693
|
+
const labelClassName = cn('flex items-center gap-2', {
|
6681
6694
|
'cursor-pointer': !isDisabled,
|
6682
6695
|
'cursor-not-allowed text-grey-dark': isDisabled
|
6683
6696
|
}, props.className);
|
@@ -6692,38 +6705,34 @@ var RadioGroupItem = /*#__PURE__*/React.forwardRef(function RadioGroupItem(props
|
|
6692
6705
|
className: "h-2 w-2 rounded-full bg-white"
|
6693
6706
|
})), children);
|
6694
6707
|
});
|
6695
|
-
|
6696
|
-
|
6697
|
-
|
6698
|
-
|
6699
|
-
|
6700
|
-
|
6701
|
-
|
6702
|
-
|
6703
|
-
|
6704
|
-
|
6705
|
-
|
6706
|
-
|
6707
|
-
|
6708
|
-
React.Children.forEach(children,
|
6708
|
+
const useRadioGroup = props => {
|
6709
|
+
const {
|
6710
|
+
children,
|
6711
|
+
defaultValue,
|
6712
|
+
disabled,
|
6713
|
+
invalid,
|
6714
|
+
onChange,
|
6715
|
+
orientation = 'vertical',
|
6716
|
+
value,
|
6717
|
+
...otherProps
|
6718
|
+
} = props;
|
6719
|
+
const values = React.useMemo(() => {
|
6720
|
+
const radioGroupItemValues = [];
|
6721
|
+
React.Children.forEach(children, child => {
|
6709
6722
|
if (React.isValidElement(child)) {
|
6710
6723
|
radioGroupItemValues.push(child.props.value);
|
6711
6724
|
}
|
6712
6725
|
});
|
6713
6726
|
return radioGroupItemValues;
|
6714
6727
|
}, [children]);
|
6715
|
-
|
6716
|
-
|
6717
|
-
|
6718
|
-
|
6719
|
-
|
6720
|
-
}, [disabled, invalid]);
|
6721
|
-
var valueProps;
|
6728
|
+
const context = React.useMemo(() => ({
|
6729
|
+
disabled: disabled !== null && disabled !== void 0 ? disabled : false,
|
6730
|
+
invalid: invalid !== null && invalid !== void 0 ? invalid : false
|
6731
|
+
}), [disabled, invalid]);
|
6732
|
+
let valueProps;
|
6722
6733
|
|
6723
6734
|
if (onChange !== undefined) {
|
6724
|
-
|
6725
|
-
return onChange(findByValue$1(values, value));
|
6726
|
-
};
|
6735
|
+
const handleChange = value => onChange(findByValue$1(values, value));
|
6727
6736
|
|
6728
6737
|
valueProps = {
|
6729
6738
|
onValueChange: handleChange,
|
@@ -6736,19 +6745,20 @@ var useRadioGroup = function useRadioGroup(props) {
|
|
6736
6745
|
}
|
6737
6746
|
|
6738
6747
|
return {
|
6739
|
-
context
|
6740
|
-
props:
|
6741
|
-
|
6742
|
-
|
6743
|
-
|
6748
|
+
context,
|
6749
|
+
props: { ...otherProps,
|
6750
|
+
...valueProps,
|
6751
|
+
children,
|
6752
|
+
orientation
|
6753
|
+
}
|
6744
6754
|
};
|
6745
6755
|
};
|
6746
|
-
|
6747
|
-
|
6748
|
-
|
6749
|
-
|
6750
|
-
|
6751
|
-
|
6756
|
+
const RadioGroup = /*#__PURE__*/React.forwardRef(function RadioGroup(props, ref) {
|
6757
|
+
const {
|
6758
|
+
context,
|
6759
|
+
props: otherProps
|
6760
|
+
} = useRadioGroup(props);
|
6761
|
+
const className = cn('flex items-start gap-y-2', {
|
6752
6762
|
'flex-wrap gap-x-4 ': otherProps.orientation === 'horizontal',
|
6753
6763
|
'flex-col': otherProps.orientation === 'vertical'
|
6754
6764
|
}, otherProps.className);
|
@@ -6782,7 +6792,7 @@ const RadioItem = props => {
|
|
6782
6792
|
}), React.createElement(DropdownMenuPrimitive.ItemIndicator, {
|
6783
6793
|
className: "absolute left-0 ml-1.5"
|
6784
6794
|
}, React.createElement("span", {
|
6785
|
-
className: "flex h-1.5 w-1.5
|
6795
|
+
className: "ml-1 flex h-1.5 w-1.5 rounded-full bg-current "
|
6786
6796
|
})), children);
|
6787
6797
|
};
|
6788
6798
|
const MenuRadioGroupContext = /*#__PURE__*/React.createContext({
|
@@ -6819,39 +6829,22 @@ const Header = props => {
|
|
6819
6829
|
}));
|
6820
6830
|
};
|
6821
6831
|
|
6822
|
-
|
6823
|
-
|
6824
|
-
|
6825
|
-
|
6826
|
-
|
6827
|
-
|
6828
|
-
|
6829
|
-
|
6830
|
-
|
6831
|
-
|
6832
|
-
|
6833
|
-
|
6834
|
-
|
6835
|
-
|
6836
|
-
|
6837
|
-
|
6838
|
-
_setMinWidth = _React$useState3[1];
|
6839
|
-
|
6840
|
-
var context = React.useMemo(function () {
|
6841
|
-
return {
|
6842
|
-
indented: indented,
|
6843
|
-
registerIndentation: function registerIndentation() {
|
6844
|
-
return setIndented(true);
|
6845
|
-
},
|
6846
|
-
minWidth: minWidth,
|
6847
|
-
setMinWidth: function setMinWidth(width) {
|
6848
|
-
return _setMinWidth(width);
|
6849
|
-
},
|
6850
|
-
close: function close() {
|
6851
|
-
return setOpen(false);
|
6852
|
-
}
|
6853
|
-
};
|
6854
|
-
}, [indented, minWidth]);
|
6832
|
+
const Menu$1 = externalProps => {
|
6833
|
+
const {
|
6834
|
+
children,
|
6835
|
+
trigger,
|
6836
|
+
...props
|
6837
|
+
} = externalProps;
|
6838
|
+
const [open, setOpen] = React.useState(false);
|
6839
|
+
const [indented, setIndented] = React.useState(false);
|
6840
|
+
const [minWidth, setMinWidth] = React.useState(undefined);
|
6841
|
+
const context = React.useMemo(() => ({
|
6842
|
+
indented,
|
6843
|
+
registerIndentation: () => setIndented(true),
|
6844
|
+
minWidth,
|
6845
|
+
setMinWidth: width => setMinWidth(width),
|
6846
|
+
close: () => setOpen(false)
|
6847
|
+
}), [indented, minWidth]);
|
6855
6848
|
return React.createElement(MenuContext.Provider, {
|
6856
6849
|
value: context
|
6857
6850
|
}, React.createElement(DropdownMenuPrimitive.Root, Object.assign({}, props, {
|
@@ -6860,53 +6853,48 @@ var Menu = function Menu(externalProps) {
|
|
6860
6853
|
onOpenChange: setOpen
|
6861
6854
|
}), trigger && React.createElement(Trigger$4, null, trigger), children));
|
6862
6855
|
};
|
6863
|
-
Menu.Trigger = Trigger$4;
|
6864
|
-
Menu.Content = Content$5;
|
6865
|
-
Menu.Item = Item$1;
|
6866
|
-
Menu.Link = Link;
|
6867
|
-
Menu.Checkbox = Checkbox$1;
|
6868
|
-
Menu.Separator = Separator;
|
6869
|
-
Menu.Header = Header;
|
6870
|
-
Menu.RadioGroup = RadioGroup$1;
|
6871
|
-
|
6872
|
-
|
6873
|
-
var TreeviewItem = /*#__PURE__*/React__default.forwardRef(function TreeviewItem(props, ref) {
|
6856
|
+
Menu$1.Trigger = Trigger$4;
|
6857
|
+
Menu$1.Content = Content$5;
|
6858
|
+
Menu$1.Item = Item$1;
|
6859
|
+
Menu$1.Link = Link;
|
6860
|
+
Menu$1.Checkbox = Checkbox$1;
|
6861
|
+
Menu$1.Separator = Separator;
|
6862
|
+
Menu$1.Header = Header;
|
6863
|
+
Menu$1.RadioGroup = RadioGroup$1;
|
6864
|
+
|
6865
|
+
const TreeviewItem = /*#__PURE__*/React__default.forwardRef(function TreeviewItem(props, ref) {
|
6874
6866
|
return React__default.createElement("a", Object.assign({}, props, {
|
6875
6867
|
ref: ref
|
6876
6868
|
}));
|
6877
6869
|
});
|
6878
|
-
|
6879
|
-
|
6880
|
-
|
6881
|
-
|
6882
|
-
|
6883
|
-
|
6884
|
-
|
6885
|
-
|
6886
|
-
|
6887
|
-
|
6888
|
-
|
6889
|
-
|
6890
|
-
setExpanded = _React$useState[1];
|
6891
|
-
|
6892
|
-
React__default.useEffect(function () {
|
6870
|
+
const TreeviewGroup = /*#__PURE__*/React__default.forwardRef(function TreeviewGroup(props, ref) {
|
6871
|
+
const {
|
6872
|
+
children,
|
6873
|
+
className: externalClassName,
|
6874
|
+
expanded: initialExpanded = false,
|
6875
|
+
title,
|
6876
|
+
fixed,
|
6877
|
+
onClick,
|
6878
|
+
...otherProps
|
6879
|
+
} = props;
|
6880
|
+
const [expanded, setExpanded] = React__default.useState(fixed || initialExpanded);
|
6881
|
+
React__default.useEffect(() => {
|
6893
6882
|
if (!fixed) {
|
6894
6883
|
setExpanded(fixed || initialExpanded);
|
6895
6884
|
}
|
6896
6885
|
}, [fixed, initialExpanded]);
|
6897
|
-
|
6886
|
+
const listClassName = cn('flex-col mb-0', {
|
6898
6887
|
flex: expanded,
|
6899
6888
|
hidden: !expanded
|
6900
6889
|
});
|
6901
|
-
|
6902
|
-
var itemProps = _extends({}, otherProps, {
|
6890
|
+
const itemProps = { ...otherProps,
|
6903
6891
|
'aria-expanded': expanded,
|
6904
6892
|
role: 'treeitem',
|
6905
6893
|
tabIndex: -1
|
6906
|
-
}
|
6894
|
+
};
|
6907
6895
|
|
6908
|
-
|
6909
|
-
|
6896
|
+
const handleClick = event => {
|
6897
|
+
const nextState = !expanded;
|
6910
6898
|
|
6911
6899
|
if (!fixed) {
|
6912
6900
|
setExpanded(nextState);
|
@@ -6917,7 +6905,7 @@ var TreeviewGroup = /*#__PURE__*/React__default.forwardRef(function TreeviewGrou
|
|
6917
6905
|
}
|
6918
6906
|
};
|
6919
6907
|
|
6920
|
-
|
6908
|
+
const className = typeof externalClassName === 'function' ? externalClassName(expanded) : externalClassName;
|
6921
6909
|
return React__default.createElement("div", Object.assign({}, itemProps, {
|
6922
6910
|
className: className,
|
6923
6911
|
ref: ref
|
@@ -6926,18 +6914,14 @@ var TreeviewGroup = /*#__PURE__*/React__default.forwardRef(function TreeviewGrou
|
|
6926
6914
|
}, typeof title === 'function' ? title(expanded) : title), React__default.createElement("ul", {
|
6927
6915
|
role: "group",
|
6928
6916
|
className: listClassName
|
6929
|
-
}, React__default.Children.toArray(children).filter(
|
6930
|
-
|
6931
|
-
|
6932
|
-
|
6933
|
-
|
6934
|
-
|
6935
|
-
}, React__default.cloneElement(item, {
|
6936
|
-
role: 'treeitem'
|
6937
|
-
}));
|
6938
|
-
})));
|
6917
|
+
}, React__default.Children.toArray(children).filter(item => !!item).map((item, i) => React__default.createElement("li", {
|
6918
|
+
key: i,
|
6919
|
+
role: "none"
|
6920
|
+
}, React__default.cloneElement(item, {
|
6921
|
+
role: 'treeitem'
|
6922
|
+
})))));
|
6939
6923
|
});
|
6940
|
-
|
6924
|
+
const Treeview = /*#__PURE__*/React__default.forwardRef(function Treeview(props, ref) {
|
6941
6925
|
return React__default.createElement("div", Object.assign({}, props, {
|
6942
6926
|
ref: ref,
|
6943
6927
|
role: "tree"
|
@@ -6946,23 +6930,26 @@ var Treeview = /*#__PURE__*/React__default.forwardRef(function Treeview(props, r
|
|
6946
6930
|
Treeview.Group = TreeviewGroup;
|
6947
6931
|
Treeview.Item = TreeviewItem;
|
6948
6932
|
|
6949
|
-
|
6950
|
-
|
6951
|
-
|
6933
|
+
var useDropTarget = function useDropTarget(onDrop) {
|
6934
|
+
var _React$useState = React__default.useState(false),
|
6935
|
+
isDraggedOver = _React$useState[0],
|
6936
|
+
setDraggedOver = _React$useState[1];
|
6937
|
+
|
6938
|
+
var handleDragEnter = React__default.useCallback(function (event) {
|
6952
6939
|
event.preventDefault();
|
6953
6940
|
setDraggedOver(true);
|
6954
6941
|
}, []);
|
6955
|
-
|
6942
|
+
var handleDragLeave = React__default.useCallback(function (event) {
|
6956
6943
|
event.preventDefault();
|
6957
6944
|
|
6958
6945
|
if (event.target === event.currentTarget) {
|
6959
6946
|
setDraggedOver(false);
|
6960
6947
|
}
|
6961
6948
|
}, []);
|
6962
|
-
|
6949
|
+
var handleDragOver = React__default.useCallback(function (event) {
|
6963
6950
|
event.preventDefault();
|
6964
6951
|
}, []);
|
6965
|
-
|
6952
|
+
var handleDrop = React__default.useCallback(function (event) {
|
6966
6953
|
event.preventDefault();
|
6967
6954
|
event.persist();
|
6968
6955
|
setDraggedOver(false);
|
@@ -6971,7 +6958,7 @@ const useDropTarget = onDrop => {
|
|
6971
6958
|
onDrop(event);
|
6972
6959
|
}
|
6973
6960
|
}, [onDrop]);
|
6974
|
-
|
6961
|
+
var props = onDrop ? {
|
6975
6962
|
onDragEnter: handleDragEnter,
|
6976
6963
|
onDragLeave: handleDragLeave,
|
6977
6964
|
onDragOver: handleDragOver,
|
@@ -6980,25 +6967,20 @@ const useDropTarget = onDrop => {
|
|
6980
6967
|
return [isDraggedOver, props];
|
6981
6968
|
};
|
6982
6969
|
|
6983
|
-
|
6984
|
-
|
6985
|
-
|
6986
|
-
|
6987
|
-
|
6988
|
-
|
6989
|
-
|
6990
|
-
|
6991
|
-
|
6992
|
-
|
6993
|
-
|
6994
|
-
|
6995
|
-
|
6996
|
-
|
6997
|
-
isDraggedOver = _useDropTarget[0],
|
6998
|
-
dropTargetProps = _useDropTarget[1];
|
6999
|
-
|
7000
|
-
var isTreeitem = role === 'treeitem';
|
7001
|
-
var className = cn('yt-navigation__item cursor-pointer', {
|
6970
|
+
const Item$2 = /*#__PURE__*/React__default.forwardRef(function Item(props, ref) {
|
6971
|
+
const {
|
6972
|
+
active,
|
6973
|
+
children,
|
6974
|
+
onDrop,
|
6975
|
+
postfix,
|
6976
|
+
prefix,
|
6977
|
+
role,
|
6978
|
+
...otherProps
|
6979
|
+
} = props;
|
6980
|
+
const proxyRef = useProxiedRef(ref);
|
6981
|
+
const [isDraggedOver, dropTargetProps] = useDropTarget(onDrop);
|
6982
|
+
const isTreeitem = role === 'treeitem';
|
6983
|
+
const className = cn('yt-navigation__item cursor-pointer', {
|
7002
6984
|
'w-full mb-px py-1 px-3 flex items-center hover:bg-grey-dark': isTreeitem,
|
7003
6985
|
'bg-white w-full h-10 px-3 flex-shrink-0 flex items-center justify-between cursor-pointer': !isTreeitem,
|
7004
6986
|
'yt-navigation__item--active': active && !isDraggedOver,
|
@@ -7006,7 +6988,7 @@ var Item$2 = /*#__PURE__*/React__default.forwardRef(function Item(props, ref) {
|
|
7006
6988
|
'yt-navigation__item--dropping bg-blue': isDraggedOver
|
7007
6989
|
}, props.className);
|
7008
6990
|
|
7009
|
-
|
6991
|
+
const handleClick = event => {
|
7010
6992
|
if (event.target instanceof HTMLAnchorElement || event.target instanceof HTMLButtonElement) {
|
7011
6993
|
return;
|
7012
6994
|
}
|
@@ -7029,19 +7011,19 @@ var Item$2 = /*#__PURE__*/React__default.forwardRef(function Item(props, ref) {
|
|
7029
7011
|
className: "yt-navigation__item__postfix ml-1"
|
7030
7012
|
}, postfix));
|
7031
7013
|
});
|
7032
|
-
|
7014
|
+
const Panel = /*#__PURE__*/React__default.forwardRef(function Panel(props, ref) {
|
7033
7015
|
return React__default.createElement("div", Object.assign({}, props, {
|
7034
7016
|
className: cn('w-full bg-white p-3', props.className),
|
7035
7017
|
ref: ref
|
7036
7018
|
}));
|
7037
7019
|
});
|
7038
|
-
|
7039
|
-
|
7020
|
+
const MenuGroup = /*#__PURE__*/React__default.forwardRef(function MenuGroup(props, ref) {
|
7021
|
+
const className = cn('flex-shrink-0 space-y-1 outline-none', {
|
7040
7022
|
'bg-white pb-2': props.fixed
|
7041
7023
|
}, props.className);
|
7042
7024
|
|
7043
|
-
|
7044
|
-
|
7025
|
+
const title = expanded => {
|
7026
|
+
const className = cn('bg-white h-10 pl-3 pr-1 flex items-center justify-between w-full', {
|
7045
7027
|
'mb-1': expanded,
|
7046
7028
|
'cursor-pointer hover:text-blue': !props.fixed
|
7047
7029
|
});
|
@@ -7058,16 +7040,14 @@ var MenuGroup = /*#__PURE__*/React__default.forwardRef(function MenuGroup(props,
|
|
7058
7040
|
ref: ref
|
7059
7041
|
}));
|
7060
7042
|
});
|
7061
|
-
|
7062
|
-
|
7063
|
-
|
7064
|
-
React__default.Children.toArray(props.children).filter(
|
7065
|
-
return !!child;
|
7066
|
-
}).map(function (child) {
|
7043
|
+
const Menu$2 = /*#__PURE__*/React__default.forwardRef(function Menu(props, ref) {
|
7044
|
+
const scrollableAreas = React__default.useMemo(() => {
|
7045
|
+
const scrollableAreas = [];
|
7046
|
+
React__default.Children.toArray(props.children).filter(child => !!child).map(child => {
|
7067
7047
|
if (child.props.fixed) {
|
7068
7048
|
scrollableAreas.push(child);
|
7069
7049
|
} else {
|
7070
|
-
|
7050
|
+
const x = scrollableAreas[scrollableAreas.length - 1];
|
7071
7051
|
|
7072
7052
|
if (Array.isArray(x)) {
|
7073
7053
|
x.push(child);
|
@@ -7081,26 +7061,25 @@ var Menu$1 = /*#__PURE__*/React__default.forwardRef(function Menu(props, ref) {
|
|
7081
7061
|
return React__default.createElement(Treeview, Object.assign({}, props, {
|
7082
7062
|
className: cn('divide-grey-light flex flex-grow flex-col divide-y-2 overflow-y-auto', props.className),
|
7083
7063
|
ref: ref
|
7084
|
-
}), scrollableAreas.map(
|
7085
|
-
|
7086
|
-
|
7087
|
-
|
7088
|
-
}, area) : area;
|
7089
|
-
}));
|
7064
|
+
}), scrollableAreas.map((area, i) => Array.isArray(area) ? React__default.createElement("div", {
|
7065
|
+
className: "divide-grey-light flex h-0 flex-auto flex-shrink-0 flex-grow flex-col divide-y-2 overflow-y-auto",
|
7066
|
+
key: i
|
7067
|
+
}, area) : area));
|
7090
7068
|
});
|
7091
|
-
Menu$
|
7092
|
-
|
7093
|
-
|
7094
|
-
|
7095
|
-
|
7096
|
-
|
7069
|
+
Menu$2.Group = MenuGroup;
|
7070
|
+
const Navigation = /*#__PURE__*/React__default.forwardRef(function Navigation(props, ref) {
|
7071
|
+
const {
|
7072
|
+
children,
|
7073
|
+
...otherProps
|
7074
|
+
} = props;
|
7075
|
+
const className = cn('h-full flex flex-col bg-grey-light divide-y-2 divide-grey-light', props.className);
|
7097
7076
|
return React__default.createElement("div", Object.assign({}, otherProps, {
|
7098
7077
|
className: className,
|
7099
7078
|
"data-taco": "navigation",
|
7100
7079
|
ref: ref
|
7101
7080
|
}), children);
|
7102
7081
|
});
|
7103
|
-
Navigation.Menu = Menu$
|
7082
|
+
Navigation.Menu = Menu$2;
|
7104
7083
|
Navigation.Item = Item$2;
|
7105
7084
|
Navigation.Panel = Panel;
|
7106
7085
|
|
@@ -7349,54 +7328,52 @@ const useSelect = ({
|
|
7349
7328
|
};
|
7350
7329
|
};
|
7351
7330
|
|
7352
|
-
|
7353
|
-
|
7354
|
-
|
7355
|
-
|
7356
|
-
|
7357
|
-
|
7358
|
-
|
7359
|
-
|
7360
|
-
|
7361
|
-
|
7362
|
-
|
7363
|
-
|
7364
|
-
|
7365
|
-
|
7366
|
-
|
7367
|
-
|
7368
|
-
|
7369
|
-
|
7370
|
-
|
7371
|
-
var className = cn('inline-flex relative w-full', {
|
7331
|
+
const BaseSelect = /*#__PURE__*/React.forwardRef(function BaseSelect(props, ref) {
|
7332
|
+
const {
|
7333
|
+
autoFocus,
|
7334
|
+
className: externalClassName,
|
7335
|
+
highlighted,
|
7336
|
+
style,
|
7337
|
+
...otherProps
|
7338
|
+
} = props;
|
7339
|
+
const {
|
7340
|
+
button,
|
7341
|
+
listbox,
|
7342
|
+
popover,
|
7343
|
+
input,
|
7344
|
+
text,
|
7345
|
+
more = 0
|
7346
|
+
} = useSelect(otherProps, ref);
|
7347
|
+
const internalRef = React.useRef(null);
|
7348
|
+
const selectDimensions = useBoundingClientRectListener(internalRef);
|
7349
|
+
const className = cn('inline-flex relative w-full', {
|
7372
7350
|
'yt-select--readonly': props.readOnly
|
7373
7351
|
}, externalClassName);
|
7374
|
-
|
7352
|
+
const inputClassname = cn(getInputClasses(props), 'h-8 text-left pr-0', {
|
7375
7353
|
'border-blue': popover.open
|
7376
7354
|
});
|
7377
|
-
React.useEffect(
|
7355
|
+
React.useEffect(() => {
|
7378
7356
|
if (autoFocus && internalRef.current) {
|
7379
7357
|
internalRef.current.focus();
|
7380
7358
|
}
|
7381
7359
|
}, []);
|
7382
7360
|
|
7383
|
-
|
7361
|
+
const renderMultiSelection = () => {
|
7384
7362
|
return React.createElement(React.Fragment, null, React.createElement("span", {
|
7385
7363
|
className: "flex-grow truncate text-left"
|
7386
7364
|
}, text), more > 0 && React.createElement(Badge, {
|
7387
7365
|
className: "ml-2"
|
7388
|
-
},
|
7366
|
+
}, `+${more}`));
|
7389
7367
|
};
|
7390
7368
|
|
7391
|
-
|
7369
|
+
const commonListboxProps = { ...listbox,
|
7392
7370
|
className: 'w-auto',
|
7393
7371
|
invalid: undefined,
|
7394
7372
|
style: {
|
7395
7373
|
minWidth: selectDimensions === null || selectDimensions === void 0 ? void 0 : selectDimensions.width
|
7396
7374
|
},
|
7397
7375
|
tabIndex: popover.open ? 0 : -1
|
7398
|
-
}
|
7399
|
-
|
7376
|
+
};
|
7400
7377
|
return React.createElement("span", {
|
7401
7378
|
className: className,
|
7402
7379
|
"data-taco": "select",
|
@@ -7419,9 +7396,11 @@ var BaseSelect = /*#__PURE__*/React.forwardRef(function BaseSelect(props, ref) {
|
|
7419
7396
|
type: "text"
|
7420
7397
|
}))));
|
7421
7398
|
});
|
7422
|
-
|
7423
|
-
|
7424
|
-
|
7399
|
+
const Select = /*#__PURE__*/React.forwardRef(function Select(props, ref) {
|
7400
|
+
const {
|
7401
|
+
editable,
|
7402
|
+
...otherProps
|
7403
|
+
} = props;
|
7425
7404
|
|
7426
7405
|
if (editable) {
|
7427
7406
|
return React.createElement(Combobox, Object.assign({}, otherProps, {
|
@@ -7492,47 +7471,41 @@ const usePagination = (initialPageIndex = 0, initialPageSize = 10) => {
|
|
7492
7471
|
};
|
7493
7472
|
};
|
7494
7473
|
|
7495
|
-
|
7496
|
-
|
7497
|
-
|
7498
|
-
var minItemIndex = pageIndex * pageSize + 1;
|
7499
|
-
var maxItemIndex = (pageIndex + 1) * pageSize;
|
7474
|
+
const getShowingLabel = (length, pageIndex, pageSize, texts) => {
|
7475
|
+
const minItemIndex = pageIndex * pageSize + 1;
|
7476
|
+
const maxItemIndex = (pageIndex + 1) * pageSize;
|
7500
7477
|
return texts.pagination.showingXofYofTotal.replace('[X]', length === 0 ? '0' : String(minItemIndex)).replace('[Y]', String(maxItemIndex > length ? length : maxItemIndex)).replace('[total]', String(length));
|
7501
7478
|
};
|
7502
7479
|
|
7503
|
-
|
7504
|
-
|
7505
|
-
|
7506
|
-
|
7507
|
-
|
7508
|
-
|
7509
|
-
|
7510
|
-
|
7511
|
-
|
7512
|
-
|
7513
|
-
|
7514
|
-
|
7515
|
-
|
7516
|
-
|
7517
|
-
|
7518
|
-
|
7519
|
-
|
7520
|
-
|
7521
|
-
|
7522
|
-
texts = _useLocalization.texts;
|
7523
|
-
|
7524
|
-
var maxPageIndex = Math.ceil(length / pageSize) - 1;
|
7525
|
-
var showShortcutTexts = dangerouslyHijackGlobalKeyboardNavigation;
|
7480
|
+
const Pagination = /*#__PURE__*/React.forwardRef(function Pagination(props, ref) {
|
7481
|
+
const {
|
7482
|
+
length,
|
7483
|
+
pageIndex,
|
7484
|
+
pageSize,
|
7485
|
+
pageSizes = [10, 25, 50, 100, 500],
|
7486
|
+
setPageIndex,
|
7487
|
+
setPageSize,
|
7488
|
+
showPageControls = true,
|
7489
|
+
showPageNumbers = true,
|
7490
|
+
showPageSize = true,
|
7491
|
+
dangerouslyHijackGlobalKeyboardNavigation = false,
|
7492
|
+
...otherProps
|
7493
|
+
} = props;
|
7494
|
+
const {
|
7495
|
+
texts
|
7496
|
+
} = useLocalization();
|
7497
|
+
const maxPageIndex = Math.ceil(length / pageSize) - 1;
|
7498
|
+
const showShortcutTexts = dangerouslyHijackGlobalKeyboardNavigation;
|
7526
7499
|
usePaginationShortcuts({
|
7527
|
-
setPageIndex
|
7528
|
-
maxPageIndex
|
7529
|
-
pageIndex
|
7530
|
-
dangerouslyHijackGlobalKeyboardNavigation
|
7500
|
+
setPageIndex,
|
7501
|
+
maxPageIndex,
|
7502
|
+
pageIndex,
|
7503
|
+
dangerouslyHijackGlobalKeyboardNavigation
|
7531
7504
|
});
|
7532
|
-
|
7533
|
-
|
7534
|
-
|
7535
|
-
|
7505
|
+
const pageCount = Math.ceil(length / pageSize);
|
7506
|
+
const canPreviousPage = pageIndex > 0;
|
7507
|
+
const canNextPage = pageIndex < pageCount - 1;
|
7508
|
+
const className = cn('inline-flex relative justify-between items-center', props.className);
|
7536
7509
|
return React.createElement("div", Object.assign({}, otherProps, {
|
7537
7510
|
className: className,
|
7538
7511
|
"data-taco": "pagination",
|
@@ -7542,13 +7515,11 @@ var Pagination = /*#__PURE__*/React.forwardRef(function Pagination(props, ref) {
|
|
7542
7515
|
}, getShowingLabel(length, pageIndex, pageSize, texts), React.createElement(Select, {
|
7543
7516
|
"aria-label": texts.pagination.pageSize,
|
7544
7517
|
className: "ml-4 !w-20",
|
7545
|
-
data: pageSizes.map(
|
7546
|
-
|
7547
|
-
|
7548
|
-
|
7549
|
-
|
7550
|
-
}),
|
7551
|
-
onChange: function onChange(event) {
|
7518
|
+
data: pageSizes.map(pageSize => ({
|
7519
|
+
text: String(pageSize),
|
7520
|
+
value: pageSize
|
7521
|
+
})),
|
7522
|
+
onChange: event => {
|
7552
7523
|
setPageIndex(0);
|
7553
7524
|
setPageSize(Number(event.target.value));
|
7554
7525
|
},
|
@@ -7560,18 +7531,14 @@ var Pagination = /*#__PURE__*/React.forwardRef(function Pagination(props, ref) {
|
|
7560
7531
|
appearance: "default",
|
7561
7532
|
disabled: !canPreviousPage,
|
7562
7533
|
icon: "arrow-start",
|
7563
|
-
onClick:
|
7564
|
-
return setPageIndex(0);
|
7565
|
-
},
|
7534
|
+
onClick: () => setPageIndex(0),
|
7566
7535
|
"aria-label": showShortcutTexts ? texts.pagination.actions.firstPageWithShortcut : texts.pagination.actions.firstPage,
|
7567
7536
|
tooltip: showShortcutTexts ? texts.pagination.actions.firstPageWithShortcut : texts.pagination.actions.firstPage
|
7568
7537
|
}), React.createElement(IconButton, {
|
7569
7538
|
appearance: "default",
|
7570
7539
|
disabled: !canPreviousPage,
|
7571
7540
|
icon: "arrow-left",
|
7572
|
-
onClick:
|
7573
|
-
return setPageIndex(pageIndex - 1);
|
7574
|
-
},
|
7541
|
+
onClick: () => setPageIndex(pageIndex - 1),
|
7575
7542
|
"aria-label": showShortcutTexts ? texts.pagination.actions.previousPageWithShortcut : texts.pagination.actions.previousPage,
|
7576
7543
|
tooltip: showShortcutTexts ? texts.pagination.actions.previousPageWithShortcut : texts.pagination.actions.previousPage
|
7577
7544
|
}), showPageNumbers && pageCount > 0 && React.createElement(PageNumbers, {
|
@@ -7582,43 +7549,36 @@ var Pagination = /*#__PURE__*/React.forwardRef(function Pagination(props, ref) {
|
|
7582
7549
|
appearance: "default",
|
7583
7550
|
disabled: !canNextPage,
|
7584
7551
|
icon: "arrow-right",
|
7585
|
-
onClick:
|
7586
|
-
return setPageIndex(pageIndex + 1);
|
7587
|
-
},
|
7552
|
+
onClick: () => setPageIndex(pageIndex + 1),
|
7588
7553
|
"aria-label": showShortcutTexts ? texts.pagination.actions.nextPageWithShortcut : texts.pagination.actions.nextPage,
|
7589
7554
|
tooltip: showShortcutTexts ? texts.pagination.actions.nextPageWithShortcut : texts.pagination.actions.nextPage
|
7590
7555
|
}), React.createElement(IconButton, {
|
7591
7556
|
appearance: "default",
|
7592
7557
|
disabled: !canNextPage,
|
7593
7558
|
icon: "arrow-end",
|
7594
|
-
onClick:
|
7595
|
-
return setPageIndex(pageCount - 1);
|
7596
|
-
},
|
7559
|
+
onClick: () => setPageIndex(pageCount - 1),
|
7597
7560
|
"aria-label": showShortcutTexts ? texts.pagination.actions.lastPageWithShortcut : texts.pagination.actions.lastPage,
|
7598
7561
|
tooltip: showShortcutTexts ? texts.pagination.actions.lastPageWithShortcut : texts.pagination.actions.lastPage
|
7599
7562
|
})));
|
7600
7563
|
});
|
7601
7564
|
|
7602
|
-
|
7603
|
-
|
7604
|
-
|
7605
|
-
|
7606
|
-
|
7607
|
-
duration = _ref$duration === void 0 ? undefined : _ref$duration,
|
7608
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$s);
|
7609
|
-
|
7610
|
-
var style;
|
7565
|
+
const Progress = ({
|
7566
|
+
duration = undefined,
|
7567
|
+
...props
|
7568
|
+
}) => {
|
7569
|
+
let style;
|
7611
7570
|
|
7612
7571
|
if (duration) {
|
7613
7572
|
style = {
|
7614
|
-
animationDuration: duration
|
7573
|
+
animationDuration: `${duration}ms`
|
7615
7574
|
};
|
7616
7575
|
}
|
7617
7576
|
|
7618
|
-
|
7619
|
-
|
7620
|
-
"w-full before:h-1 before:bg-grey-dark before:block before:animate-[progress-indeterminate_2s_cubic-bezier(0.4,0,0.2,1)_infinite] before:content-[' ']": !duration
|
7621
|
-
|
7577
|
+
const className = cn('bg-grey-light rounded block h-1 overflow-hidden w-full', props.className);
|
7578
|
+
const progressClassName = cn('yt-progress__bar block h-1', {
|
7579
|
+
"w-full before:h-1 before:bg-grey-dark before:block before:animate-[progress-indeterminate_2s_cubic-bezier(0.4,0,0.2,1)_infinite] before:content-[' ']": !duration,
|
7580
|
+
[`w-0 bg-grey-dark animate-[progress_linear]`]: duration
|
7581
|
+
});
|
7622
7582
|
return React__default.createElement("span", Object.assign({}, props, {
|
7623
7583
|
"data-taco": "progress",
|
7624
7584
|
className: className
|
@@ -8087,7 +8047,7 @@ const useRowActions = (inlineEditingUniqueId, handlers, actions, rowExpansionRen
|
|
8087
8047
|
appearance: "discrete",
|
8088
8048
|
icon: typeof action.icon === 'function' ? action.icon(sanitizedRow) : action.icon,
|
8089
8049
|
tooltip: typeof action.tooltip === 'function' ? action.tooltip(sanitizedRow) : action.tooltip
|
8090
|
-
}))), secondaryActions.length ? React__default.createElement(Menu, null, React__default.createElement(Menu.Trigger, null, React__default.createElement(IconButton, {
|
8050
|
+
}))), secondaryActions.length ? React__default.createElement(Menu$1, null, React__default.createElement(Menu$1.Trigger, null, React__default.createElement(IconButton, {
|
8091
8051
|
appearance: "discrete",
|
8092
8052
|
icon: "ellipsis-vertical",
|
8093
8053
|
"aria-label": texts.table.actions,
|
@@ -8097,7 +8057,7 @@ const useRowActions = (inlineEditingUniqueId, handlers, actions, rowExpansionRen
|
|
8097
8057
|
event.stopPropagation();
|
8098
8058
|
row.setActive();
|
8099
8059
|
}
|
8100
|
-
})), React__default.createElement(Menu.Content, null, secondaryActions.map((action, index) => React__default.createElement(Menu.Item, Object.assign({
|
8060
|
+
})), React__default.createElement(Menu$1.Content, null, secondaryActions.map((action, index) => React__default.createElement(Menu$1.Item, Object.assign({
|
8101
8061
|
key: index,
|
8102
8062
|
icon: typeof action.icon === 'function' ? action.icon(sanitizedRow) : action.icon
|
8103
8063
|
}, getActionProps(action, sanitizedRow)), typeof action.text === 'function' ? action.text(sanitizedRow) : action.text)))) : null);
|
@@ -9233,19 +9193,16 @@ const useTableRowCreation = (data, tableRef) => {
|
|
9233
9193
|
};
|
9234
9194
|
};
|
9235
9195
|
|
9236
|
-
|
9237
|
-
|
9238
|
-
|
9239
|
-
|
9240
|
-
|
9241
|
-
|
9242
|
-
|
9243
|
-
|
9244
|
-
|
9245
|
-
|
9246
|
-
otherProps = _objectWithoutPropertiesLoose(props, _excluded$t);
|
9247
|
-
|
9248
|
-
var className = cn('yt-tabs', "yt-tabs--" + orientation, {
|
9196
|
+
const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(props, ref) {
|
9197
|
+
const {
|
9198
|
+
id,
|
9199
|
+
defaultId,
|
9200
|
+
children,
|
9201
|
+
onChange,
|
9202
|
+
orientation = 'horizontal',
|
9203
|
+
...otherProps
|
9204
|
+
} = props;
|
9205
|
+
const className = cn('yt-tabs', `yt-tabs--${orientation}`, {
|
9249
9206
|
'flex w-full': orientation === 'vertical'
|
9250
9207
|
}, props.className);
|
9251
9208
|
return React.createElement(TabsPrimitive.Root, Object.assign({}, otherProps, {
|
@@ -9259,19 +9216,20 @@ var Tabs = /*#__PURE__*/React.forwardRef(function Tabs(props, ref) {
|
|
9259
9216
|
value: id
|
9260
9217
|
}), children);
|
9261
9218
|
});
|
9262
|
-
|
9263
|
-
|
9219
|
+
const TabList = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {
|
9220
|
+
const className = cn('yt-tab__list border-b border-grey-light flex flex-row m-0 mb-4', props.className);
|
9264
9221
|
return React.createElement(TabsPrimitive.List, Object.assign({}, props, {
|
9265
9222
|
className: className,
|
9266
9223
|
ref: ref
|
9267
9224
|
}));
|
9268
9225
|
});
|
9269
|
-
|
9270
|
-
|
9271
|
-
|
9272
|
-
|
9273
|
-
|
9274
|
-
|
9226
|
+
const TabTrigger = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {
|
9227
|
+
const {
|
9228
|
+
id,
|
9229
|
+
disabled,
|
9230
|
+
...otherProps
|
9231
|
+
} = props;
|
9232
|
+
const className = cn('yt-tab bg-transparent border-b-2 border-transparent text-grey-darkest m-0 py-2 px-4', disabled ? 'cursor-not-allowed !text-grey-darker' : 'cursor-pointer rounded-t hover:border-grey-dark aria-selected:border-blue aria-selected:text-black aria-selected:hover:border-blue-light hover:text-black active:yt-focus active:border-blue focus:yt-focus focus:border-blue', props.className);
|
9275
9233
|
return React.createElement(TabsPrimitive.Trigger, Object.assign({}, otherProps, {
|
9276
9234
|
className: className,
|
9277
9235
|
disabled: disabled,
|
@@ -9282,11 +9240,12 @@ var TabTrigger = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {
|
|
9282
9240
|
value: id
|
9283
9241
|
}));
|
9284
9242
|
});
|
9285
|
-
|
9286
|
-
|
9287
|
-
|
9288
|
-
|
9289
|
-
|
9243
|
+
const TabContent = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {
|
9244
|
+
const {
|
9245
|
+
id,
|
9246
|
+
...otherProps
|
9247
|
+
} = props;
|
9248
|
+
const className = cn('yt-tab__panel outline-none', props.className);
|
9290
9249
|
return React.createElement(TabsPrimitive.Content, Object.assign({}, otherProps, {
|
9291
9250
|
className: className,
|
9292
9251
|
ref: ref,
|
@@ -9297,19 +9256,22 @@ Tabs.List = TabList;
|
|
9297
9256
|
Tabs.Trigger = TabTrigger;
|
9298
9257
|
Tabs.Content = TabContent;
|
9299
9258
|
|
9300
|
-
|
9301
|
-
|
9302
|
-
|
9303
|
-
|
9304
|
-
|
9305
|
-
|
9259
|
+
const Textarea = /*#__PURE__*/React.forwardRef(function Textarea(props, ref) {
|
9260
|
+
const {
|
9261
|
+
defaultValue: _,
|
9262
|
+
highlighted,
|
9263
|
+
invalid,
|
9264
|
+
onKeyDown,
|
9265
|
+
...otherProps
|
9266
|
+
} = props;
|
9267
|
+
const classNames = cn(getInputClasses(props), 'py-1 min-h-[75px] disabled:resize-none', props.className); // home and end keys only navigate to the start/end of textarea value if the textarea container does not scroll
|
9306
9268
|
// if it has scroll height then the browser reverts to native scrolling behaviour only
|
9307
9269
|
// so we manually override it to ensure _our_ desired behaviour remains intact
|
9308
9270
|
|
9309
|
-
|
9271
|
+
const handleKeyDown = event => {
|
9310
9272
|
if (event.key === 'Home' || event.key === 'End') {
|
9311
9273
|
event.preventDefault();
|
9312
|
-
|
9274
|
+
const position = event.key === 'End' ? event.currentTarget.value.length : 0;
|
9313
9275
|
event.currentTarget.setSelectionRange(position, position);
|
9314
9276
|
event.currentTarget.scrollTop = event.key === 'End' ? event.currentTarget.scrollHeight : 0;
|
9315
9277
|
}
|
@@ -9327,18 +9289,18 @@ var Textarea = /*#__PURE__*/React.forwardRef(function Textarea(props, ref) {
|
|
9327
9289
|
}));
|
9328
9290
|
});
|
9329
9291
|
|
9330
|
-
|
9331
|
-
|
9332
|
-
|
9333
|
-
|
9334
|
-
|
9335
|
-
|
9336
|
-
|
9292
|
+
const Switch = /*#__PURE__*/React.forwardRef(function Switch(props, ref) {
|
9293
|
+
const {
|
9294
|
+
label,
|
9295
|
+
onChange,
|
9296
|
+
...otherProps
|
9297
|
+
} = props;
|
9298
|
+
const className = cn('group h-5 w-9 flex rounded-full inline-flex', {
|
9337
9299
|
'mr-2': !!label,
|
9338
9300
|
'bg-grey-darker hover:bg-grey-dark aria-checked:bg-blue aria-checked:hover:bg-blue-light focus:yt-focus': !props.disabled,
|
9339
9301
|
'bg-grey-light cursor-not-allowed aria-checked:bg-blue-light': props.disabled
|
9340
9302
|
}, props.className);
|
9341
|
-
|
9303
|
+
const element = React.createElement(PrimitiveSwitch.Root, Object.assign({}, otherProps, {
|
9342
9304
|
className: className,
|
9343
9305
|
onCheckedChange: onChange,
|
9344
9306
|
ref: ref
|
@@ -9347,7 +9309,7 @@ var Switch = /*#__PURE__*/React.forwardRef(function Switch(props, ref) {
|
|
9347
9309
|
}));
|
9348
9310
|
|
9349
9311
|
if (label) {
|
9350
|
-
|
9312
|
+
const labelClassName = cn('flex items-center cursor-pointer', {
|
9351
9313
|
'cursor-not-allowed text-grey-dark': props.disabled
|
9352
9314
|
});
|
9353
9315
|
return React.createElement("label", {
|
@@ -9358,23 +9320,22 @@ var Switch = /*#__PURE__*/React.forwardRef(function Switch(props, ref) {
|
|
9358
9320
|
return element;
|
9359
9321
|
});
|
9360
9322
|
|
9361
|
-
|
9362
|
-
|
9363
|
-
|
9364
|
-
|
9365
|
-
|
9366
|
-
|
9367
|
-
|
9368
|
-
|
9369
|
-
|
9370
|
-
|
9371
|
-
|
9372
|
-
|
9373
|
-
|
9374
|
-
|
9375
|
-
|
9376
|
-
|
9377
|
-
var onWindowKeyDown = function onWindowKeyDown(event) {
|
9323
|
+
const Tooltip$1 = ({
|
9324
|
+
continuous,
|
9325
|
+
index,
|
9326
|
+
isLastStep,
|
9327
|
+
step,
|
9328
|
+
backProps,
|
9329
|
+
primaryProps,
|
9330
|
+
skipProps,
|
9331
|
+
tooltipProps,
|
9332
|
+
size,
|
9333
|
+
locale,
|
9334
|
+
disableTourSkipOnEsc
|
9335
|
+
}) => {
|
9336
|
+
const skipButtonRef = React.useRef(null);
|
9337
|
+
React.useEffect(() => {
|
9338
|
+
const onWindowKeyDown = event => {
|
9378
9339
|
if (!disableTourSkipOnEsc) {
|
9379
9340
|
if (event.keyCode === keycode('esc') && skipButtonRef.current !== null) {
|
9380
9341
|
event.preventDefault();
|
@@ -9385,7 +9346,7 @@ var Tooltip$1 = function Tooltip(_ref) {
|
|
9385
9346
|
};
|
9386
9347
|
|
9387
9348
|
window.addEventListener('keydown', onWindowKeyDown);
|
9388
|
-
return
|
9349
|
+
return () => {
|
9389
9350
|
window.removeEventListener('keydown', onWindowKeyDown);
|
9390
9351
|
};
|
9391
9352
|
}, []);
|
@@ -9404,30 +9365,31 @@ var Tooltip$1 = function Tooltip(_ref) {
|
|
9404
9365
|
appearance: "discrete"
|
9405
9366
|
}), locale.back), React.createElement(Button$1, Object.assign({}, primaryProps, {
|
9406
9367
|
appearance: "primary"
|
9407
|
-
}), continuous ? isLastStep ? locale.last
|
9368
|
+
}), continuous ? isLastStep ? `${locale.last} (${index + 1}/${size})` : `${locale.next} (${index + 1}/${size})` : locale.close)));
|
9408
9369
|
}; // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
9409
9370
|
|
9410
9371
|
|
9411
|
-
|
9412
|
-
|
9413
|
-
|
9414
|
-
|
9415
|
-
|
9416
|
-
|
9417
|
-
|
9418
|
-
|
9419
|
-
|
9420
|
-
|
9421
|
-
|
9422
|
-
|
9423
|
-
|
9424
|
-
|
9425
|
-
|
9426
|
-
|
9427
|
-
|
9428
|
-
|
9429
|
-
|
9430
|
-
|
9372
|
+
const TourStep = _props => null;
|
9373
|
+
const Tour = props => {
|
9374
|
+
const {
|
9375
|
+
texts: {
|
9376
|
+
tour
|
9377
|
+
}
|
9378
|
+
} = useLocalization();
|
9379
|
+
const {
|
9380
|
+
autoStart: run,
|
9381
|
+
onComplete,
|
9382
|
+
onClose,
|
9383
|
+
onReady,
|
9384
|
+
spotlightClicks,
|
9385
|
+
disableCloseOnEsc: disableTourSkipOnEsc,
|
9386
|
+
disableScrollParentFix = false,
|
9387
|
+
scrollOffset,
|
9388
|
+
...rest
|
9389
|
+
} = props;
|
9390
|
+
const steps = React.useMemo(() => {
|
9391
|
+
return React.Children.map(props.children, child => {
|
9392
|
+
const step = {
|
9431
9393
|
disableBeacon: !child.props.showBeacon,
|
9432
9394
|
target: child.props.selector,
|
9433
9395
|
placement: child.props.position,
|
@@ -9437,12 +9399,10 @@ var Tour = function Tour(props) {
|
|
9437
9399
|
return step;
|
9438
9400
|
});
|
9439
9401
|
}, [props.children]);
|
9440
|
-
|
9402
|
+
const getStep = React.useCallback(selector => {
|
9441
9403
|
var _props$children$find;
|
9442
9404
|
|
9443
|
-
return (_props$children$find = props.children.find(
|
9444
|
-
return child.props.selector === selector;
|
9445
|
-
})) === null || _props$children$find === void 0 ? void 0 : _props$children$find.props;
|
9405
|
+
return (_props$children$find = props.children.find(child => child.props.selector === selector)) === null || _props$children$find === void 0 ? void 0 : _props$children$find.props;
|
9446
9406
|
}, [props.children]);
|
9447
9407
|
|
9448
9408
|
function callback(state) {
|
@@ -9472,17 +9432,16 @@ var Tour = function Tour(props) {
|
|
9472
9432
|
floaterProps: {
|
9473
9433
|
disableAnimation: true
|
9474
9434
|
},
|
9475
|
-
tooltipComponent:
|
9476
|
-
|
9477
|
-
|
9478
|
-
|
9479
|
-
}));
|
9480
|
-
},
|
9435
|
+
tooltipComponent: tooltipProps => React.createElement(Tooltip$1, Object.assign({}, tooltipProps, {
|
9436
|
+
locale: tour,
|
9437
|
+
disableTourSkipOnEsc: disableTourSkipOnEsc
|
9438
|
+
})),
|
9481
9439
|
locale: tour,
|
9482
9440
|
spotlightPadding: 8,
|
9483
9441
|
spotlightClicks: spotlightClicks,
|
9484
9442
|
disableScrollParentFix: disableScrollParentFix,
|
9485
9443
|
callback: callback,
|
9444
|
+
scrollOffset: scrollOffset,
|
9486
9445
|
styles: {
|
9487
9446
|
/** style beacon */
|
9488
9447
|
options: {
|
@@ -9518,10 +9477,10 @@ var useOnClickOutside = function useOnClickOutside(ref, callback) {
|
|
9518
9477
|
}, [ref, callback]);
|
9519
9478
|
};
|
9520
9479
|
|
9521
|
-
var _excluded$
|
9480
|
+
var _excluded$e = ["noPadding"];
|
9522
9481
|
var Content$6 = /*#__PURE__*/React.forwardRef(function CardContent(externalProps, ref) {
|
9523
9482
|
var noPadding = externalProps.noPadding,
|
9524
|
-
props = _objectWithoutPropertiesLoose(externalProps, _excluded$
|
9483
|
+
props = _objectWithoutPropertiesLoose(externalProps, _excluded$e);
|
9525
9484
|
|
9526
9485
|
var className = cn('flex-grow overflow-auto', {
|
9527
9486
|
'mx-4 mb-4': !noPadding
|
@@ -9573,7 +9532,7 @@ exports.Icon = Icon;
|
|
9573
9532
|
exports.IconButton = IconButton;
|
9574
9533
|
exports.Input = Input;
|
9575
9534
|
exports.Listbox = Listbox;
|
9576
|
-
exports.Menu = Menu;
|
9535
|
+
exports.Menu = Menu$1;
|
9577
9536
|
exports.MultiListbox = MultiListbox;
|
9578
9537
|
exports.Navigation = Navigation;
|
9579
9538
|
exports.PaginatedTable = PaginatedTable;
|
@@ -9607,16 +9566,19 @@ exports.getParentRowIndexPath = getParentRowIndexPath;
|
|
9607
9566
|
exports.getRadioGroupItemValueAsString = getRadioGroupItemValueAsString;
|
9608
9567
|
exports.icons = icons;
|
9609
9568
|
exports.insertChildTableRow = insertChildTableRow;
|
9569
|
+
exports.mergeRefs = mergeRefs;
|
9610
9570
|
exports.parseFromCustomString = parseFromCustomString;
|
9611
9571
|
exports.parseFromISOString = parseFromISOString;
|
9612
9572
|
exports.removeChildTableRow = removeChildTableRow;
|
9613
9573
|
exports.setByRowIndexPath = setByRowIndexPath;
|
9614
9574
|
exports.useBoundingClientRectListener = useBoundingClientRectListener;
|
9575
|
+
exports.useDropTarget = useDropTarget;
|
9615
9576
|
exports.useListKeyboardNavigation = useListKeyboardNavigation;
|
9616
9577
|
exports.useListScrollTo = useListScrollTo;
|
9617
9578
|
exports.useLocalization = useLocalization;
|
9618
9579
|
exports.useOnClickOutside = useOnClickOutside;
|
9619
9580
|
exports.usePagination = usePagination;
|
9581
|
+
exports.useProxiedRef = useProxiedRef;
|
9620
9582
|
exports.useRadioGroup = useRadioGroup;
|
9621
9583
|
exports.useTableRowCreation = useTableRowCreation;
|
9622
9584
|
exports.useTaco = useTaco;
|