@economic/taco 1.15.1 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +82 -82
- package/dist/components/Banner/Banner.d.ts +4 -0
- package/dist/components/Card/Card.d.ts +1 -1
- package/dist/components/Menu/Menu.d.ts +6 -1
- package/dist/components/Menu/Menu.stories.d.ts +2 -0
- package/dist/components/Menu/components/Content.d.ts +3 -1
- package/dist/components/Provider/Localization.d.ts +157 -0
- package/dist/components/Provider/Provider.d.ts +1 -148
- package/dist/components/SearchInput/SearchInput.d.ts +5 -1
- package/dist/components/Select2/Select2.d.ts +6 -4
- package/dist/components/Select2/Select2.stories.d.ts +1 -0
- package/dist/components/Table/hooks/plugins/useRowActions.d.ts +1 -1
- package/dist/esm/index.css +245 -245
- package/dist/esm/packages/taco/src/components/AlertDialog/AlertDialog.js.map +1 -1
- package/dist/esm/packages/taco/src/components/AlertDialog/Context.js.map +1 -1
- package/dist/esm/packages/taco/src/components/AlertDialog/components/Content.js.map +1 -1
- package/dist/esm/packages/taco/src/components/AlertDialog/components/Footer.js.map +1 -1
- package/dist/esm/packages/taco/src/components/AlertDialog/components/Trigger.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Backdrop/Backdrop.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Banner/Banner.js +5 -0
- package/dist/esm/packages/taco/src/components/Banner/Banner.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Button/Button.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Button/util.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Calendar/Calendar.js +1 -1
- package/dist/esm/packages/taco/src/components/Calendar/Calendar.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Card/Card.js +0 -54
- package/dist/esm/packages/taco/src/components/Card/Card.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Checkbox/Checkbox.js +17 -5
- package/dist/esm/packages/taco/src/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Combobox/Combobox.js +6 -2
- package/dist/esm/packages/taco/src/components/Combobox/Combobox.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js +1 -1
- package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Datepicker/useDatepicker.js +1 -1
- package/dist/esm/packages/taco/src/components/Datepicker/useDatepicker.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Dialog/Dialog.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Dialog/components/Content.js +5 -1
- package/dist/esm/packages/taco/src/components/Dialog/components/Content.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Dialog/components/Drawer.js +1 -1
- package/dist/esm/packages/taco/src/components/Dialog/components/Drawer.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Dialog/components/Trigger.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Dialog/util.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Hanger/Hanger.js +1 -1
- package/dist/esm/packages/taco/src/components/Hanger/Hanger.js.map +1 -1
- package/dist/esm/packages/taco/src/components/HoverCard/HoverCard.js.map +1 -1
- package/dist/esm/packages/taco/src/components/HoverCard/Primitives.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/AccountPreview.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Accounting.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/AccountingYear.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/AccountingYearCancel.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ArrowBottom.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ArrowDown.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ArrowEnd.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ArrowLeft.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ArrowRight.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ArrowStart.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ArrowTop.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ArrowUp.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Attach.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/AttachAuto.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/AttachCancel.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Autotext.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/AutotextInsert.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Basic.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/BasicTabs.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/BellSolid.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Book.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Booking.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Budget.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Calendar.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/CashAccount.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/CashReports.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Chat.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ChatSolid.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ChevronDown.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ChevronDownDouble.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ChevronDownSolid.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ChevronLeft.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ChevronLeftDouble.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ChevronLeftSolid.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ChevronRight.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ChevronRightDouble.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ChevronRightSolid.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ChevronUp.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ChevronUpDouble.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ChevronUpSolid.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/CircleClose.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/CircleMinus.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/CirclePlus.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/CircleTick.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Clamp.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ClampOpen.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Close.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ConnectionEnable.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ConnectionRevoke.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Contacts.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Copy.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Courses.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Credit.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Delete.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/DeletePermanently.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Depecriate.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Developer.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/DistributionTemplate.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Document.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/DocumentApprove.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/DocumentCreateEntry.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/DocumentCut.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/DocumentError.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/DocumentIsolatePage.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/DocumentMerge.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/DocumentMove.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/DocumentPreview.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/DocumentReceived.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/DocumentRejectedRequest.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/DocumentSplit.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/DocumentTime.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Download.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Drag.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ECopedia.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ESignature.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Edit.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/EllipsisHorizontal.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/EllipsisVertical.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/EntriesOnAccount.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/EntriesOpen.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/EntriesWarning.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/EntryTypeCustomerInvoice.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/EntryTypeCustomerPayment.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/EntryTypeJournalEntry.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/EntryTypeManualCustomerInvoice.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/EntryTypeSupplierInvoice.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/EntryTypeSupplierPayment.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Envelope.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/EnvelopeApproved.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ExpandView.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Expenses.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Export.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ExportToExcel.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ExportToPdf.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Filter.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/FilterSolid.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/GraphSolid.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Hash.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Home.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Images.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Import.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Inbox.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/InboxEinvoicing.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/InboxScanning.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/InboxSmart.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Info.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Inventory.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/InventoryMatrix.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/JournalPro.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Layout.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/LayoutBoth.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/LayoutFirst.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/LayoutLast.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/LayoutNone.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/LedgerCard.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/LedgerCardCustomerReminder.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/LedgerCardManualCustomerInvoice.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/LedgerCardObsoleteStock.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/LedgerCardOpeningEntry.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/LedgerCardReservedEntry.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/LedgerCardShrinkagePilferage.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/LedgerCardStockAdjustment.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/LedgerCardTransferredOpeningEntry.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Lightbulb.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Line.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/List.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ListBulleted.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ListSearch.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/LockOpen.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Log.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/LogOut.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Market.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/MatchAmount.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/MatchEntries.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Menu.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Mileage.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ModalResize.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ModalShrink.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/More.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/MoreSolid.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Move.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/NavigationList.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Note.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/NoteFollowUp.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/NoteRead.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Numbers.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/PartnerApi.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Period.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/PersonChange.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/PersonMinus.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/PersonPlus.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/PersonTick.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Play.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/PlusMinus.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Print.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ProcessPayment.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ProductLedgerCard.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Profile.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ProjectCards.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Projects.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Quicklinks.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/RatingBankruptcy.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/RatingPaymentProblems.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Reconciled.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Refresh.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Report.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ReportSolid.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Restore.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/RotateLeft.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/RotateRight.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Sales.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Search.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/SearchBold.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Secure.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/SecureTick.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Settings.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/SettingsSolid.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Shortcuts.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ShowAll.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ShowLess.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ShowMore.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ShowTemplate.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Sliders.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Smartpay.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/SortBy.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Spinner.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Star.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/StarSolid.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Subscriptions.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/SystemEntries.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Tag.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/TemplateOverride.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Templates.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ThumbBoth.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ThumbDown.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ThumbDownSolid.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ThumbUp.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/ThumbUpSolid.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Tick.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Time.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Transfer.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/TransferCancel.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/TransferLocked.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Undo.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Undock.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Unreconciled.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Warning.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Webshop.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Website.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Workflow.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Zoom.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/index.js.map +1 -1
- package/dist/esm/packages/taco/src/components/IconButton/IconButton.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Input/Input.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Input/util.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Listbox/ScrollableList.js +24 -19
- package/dist/esm/packages/taco/src/components/Listbox/ScrollableList.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Listbox/useListbox.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Listbox/useMultiListbox.js +1 -1
- package/dist/esm/packages/taco/src/components/Listbox/useMultiListbox.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Listbox/useTypeahead.js +1 -1
- package/dist/esm/packages/taco/src/components/Listbox/util.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Menu/Menu.js +12 -2
- package/dist/esm/packages/taco/src/components/Menu/Menu.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Menu/components/Checkbox.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Menu/components/Content.js +4 -3
- package/dist/esm/packages/taco/src/components/Menu/components/Content.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Menu/components/Header.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Menu/components/Item.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Menu/components/RadioGroup.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Menu/components/Trigger.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Navigation/Navigation.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Pagination/PageNumbers.js +1 -1
- package/dist/esm/packages/taco/src/components/Pagination/PageNumbers.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Pagination/Pagination.js +1 -1
- package/dist/esm/packages/taco/src/components/Pagination/Pagination.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Popover/Popover.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Popover/Primitives.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Popover/util.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Provider/Localization.js +112 -0
- package/dist/esm/packages/taco/src/components/Provider/Localization.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Provider/Provider.js +6 -106
- package/dist/esm/packages/taco/src/components/Provider/Provider.js.map +1 -1
- package/dist/esm/packages/taco/src/components/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/esm/packages/taco/src/components/ScrollArea/ScrollArea.js.map +1 -1
- package/dist/esm/packages/taco/src/components/SearchInput/SearchInput.js +2 -53
- package/dist/esm/packages/taco/src/components/SearchInput/SearchInput.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select/Select.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select/useSelect.js +1 -1
- package/dist/esm/packages/taco/src/components/Select/useSelect.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/Select2.js +7 -5
- package/dist/esm/packages/taco/src/components/Select2/Select2.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Collection.js +0 -6
- package/dist/esm/packages/taco/src/components/Select2/components/Collection.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Context.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Create.js +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Create.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Edit.js +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Edit.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Group.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Option.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Search.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Title.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js +49 -23
- package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/hooks/useChildren.js +3 -2
- package/dist/esm/packages/taco/src/components/Select2/hooks/useChildren.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/utilities.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Switch/Switch.js +18 -6
- package/dist/esm/packages/taco/src/components/Switch/Switch.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/components/BaseTable.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/components/Table.js +5 -1
- package/dist/esm/packages/taco/src/components/Table/components/Table.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js +1 -1
- package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowActions.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/hooks/useTable.js +1 -1
- package/dist/esm/packages/taco/src/components/Table/hooks/useTable.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/hooks/useTableKeyboardNavigation.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/util/rowIndexPath.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/util/sortTypes.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/util.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Tag/Tag.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Toast/Toast.js +1 -1
- package/dist/esm/packages/taco/src/components/Toast/Toast.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Toast/Toaster.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Toast/util.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Tour/Tour.js +1 -1
- package/dist/esm/packages/taco/src/components/Tour/Tour.js.map +1 -1
- package/dist/esm/packages/taco/src/hooks/useBoundingClientRectListener.js.map +1 -1
- package/dist/esm/packages/taco/src/hooks/useId.js.map +1 -1
- package/dist/esm/packages/taco/src/hooks/useIsFormControl.js.map +1 -1
- package/dist/esm/packages/taco/src/hooks/useMergedRef.js.map +1 -1
- package/dist/esm/packages/taco/src/hooks/usePrevious.js.map +1 -1
- package/dist/esm/packages/taco/src/index.js +5 -4
- package/dist/esm/packages/taco/src/index.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/BubbleSelect.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Button.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Collection/components/Root.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Listbox2/components/Context.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Listbox2/components/Group.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Listbox2/components/Option.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Listbox2/components/Root.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Listbox2/components/Title.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/aria.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/colors.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/date.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/debounce.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/device.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/dom.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/hooks/useDraggable.js +8 -0
- package/dist/esm/packages/taco/src/utils/hooks/useDraggable.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/hooks/useDropTarget.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/hooks/useListKeyboardNavigation.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/hooks/useListScrollTo.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/hooks/useOnClickOutside.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/hooks/useTimer.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/input.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/mergeRefs.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/taillwind.js.map +1 -1
- package/dist/index.css +245 -245
- package/dist/index.d.ts +1 -0
- package/dist/taco.cjs.development.js +766 -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/types.d.ts +1 -0
- package/package.json +3 -3
- package/plugins/tailwindcss-aria-attributes.js +73 -73
- package/tailwind.config.js +284 -284
- package/types.json +59 -39
@@ -11,18 +11,18 @@ var cn = _interopDefault(require('classnames'));
|
|
11
11
|
var AccordionPrimitive = require('@radix-ui/react-accordion');
|
12
12
|
var TooltipPrimitive = require('@radix-ui/react-tooltip');
|
13
13
|
var ReactDayPicker = _interopDefault(require('react-day-picker'));
|
14
|
-
var uuid = require('uuid');
|
15
|
-
var framerMotion = require('framer-motion');
|
16
14
|
var CheckboxPrimitive = require('@radix-ui/react-checkbox');
|
15
|
+
var uuid = require('uuid');
|
17
16
|
var PopoverPrimitive = require('@radix-ui/react-popover');
|
18
17
|
var debounce$1 = _interopDefault(require('lodash/debounce'));
|
19
18
|
var dateFns = require('date-fns');
|
20
19
|
var DialogPrimitive = require('@radix-ui/react-dialog');
|
21
20
|
var interactions = require('@react-aria/interactions');
|
21
|
+
var framerMotion = require('framer-motion');
|
22
22
|
var HoverCardPrimitive = require('@radix-ui/react-hover-card');
|
23
23
|
var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
|
24
|
-
var RadioGroupPrimitive = require('@radix-ui/react-radio-group');
|
25
24
|
var reactUseControllableState = require('@radix-ui/react-use-controllable-state');
|
25
|
+
var RadioGroupPrimitive = require('@radix-ui/react-radio-group');
|
26
26
|
var ScrollAreaPrimitive = require('@radix-ui/react-scroll-area');
|
27
27
|
var reactTable = require('react-table');
|
28
28
|
var reactIntersectionObserver = require('react-intersection-observer');
|
@@ -3489,18 +3489,130 @@ const IconButton = /*#__PURE__*/React.forwardRef(function Button(props, ref) {
|
|
3489
3489
|
}, button);
|
3490
3490
|
});
|
3491
3491
|
|
3492
|
+
const defaultLocalisationTexts = {
|
3493
|
+
calendar: {
|
3494
|
+
months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
|
3495
|
+
weekdaysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
3496
|
+
actions: {
|
3497
|
+
previousMonth: 'Previous month',
|
3498
|
+
nextMonth: 'Next month',
|
3499
|
+
previousYear: 'Previous year',
|
3500
|
+
nextYear: 'Next year',
|
3501
|
+
today: 'Today'
|
3502
|
+
}
|
3503
|
+
},
|
3504
|
+
combobox: {
|
3505
|
+
tooltip: 'Search in list'
|
3506
|
+
},
|
3507
|
+
datepicker: {
|
3508
|
+
calendar: 'Calendar',
|
3509
|
+
clear: 'Clear',
|
3510
|
+
expand: 'Show calendar',
|
3511
|
+
shortcuts: 'Shortcuts'
|
3512
|
+
},
|
3513
|
+
hanger: {
|
3514
|
+
close: 'Close'
|
3515
|
+
},
|
3516
|
+
banner: {
|
3517
|
+
close: 'Close'
|
3518
|
+
},
|
3519
|
+
listbox: {
|
3520
|
+
loading: 'Loading results...',
|
3521
|
+
empty: 'No results found',
|
3522
|
+
allOption: 'All'
|
3523
|
+
},
|
3524
|
+
dialog: {
|
3525
|
+
close: 'Close',
|
3526
|
+
drag: 'Drag'
|
3527
|
+
},
|
3528
|
+
pagination: {
|
3529
|
+
label: 'Pagination',
|
3530
|
+
pageSize: 'Items per page',
|
3531
|
+
showingXofYofTotal: 'Showing [X] - [Y] of [total]',
|
3532
|
+
actions: {
|
3533
|
+
firstPage: 'Goto first page',
|
3534
|
+
firstPageWithShortcut: 'Goto first page (Home)',
|
3535
|
+
previousPage: 'Goto previous page',
|
3536
|
+
previousPageWithShortcut: 'Goto previous page (Page Up)',
|
3537
|
+
nextPage: 'Goto next page',
|
3538
|
+
nextPageWithShortcut: 'Goto next page (Page Down)',
|
3539
|
+
lastPage: 'Goto last page',
|
3540
|
+
lastPageWithShortcut: 'Goto last page (End)',
|
3541
|
+
pageX: 'Goto page [X]'
|
3542
|
+
}
|
3543
|
+
},
|
3544
|
+
table: {
|
3545
|
+
actions: 'Other actions',
|
3546
|
+
edit: 'Edit (e)',
|
3547
|
+
copy: 'Copy (c)',
|
3548
|
+
del: 'Delete (del)',
|
3549
|
+
newSubRow: 'New row (shift + n)',
|
3550
|
+
loading: 'Loading...'
|
3551
|
+
},
|
3552
|
+
select: {
|
3553
|
+
allOptionsSelected: 'All'
|
3554
|
+
},
|
3555
|
+
select2: {
|
3556
|
+
allSelect: 'Select all',
|
3557
|
+
allDeselect: 'Deselect all',
|
3558
|
+
cancel: 'Cancel',
|
3559
|
+
chooseColor: 'Pick a color',
|
3560
|
+
create: 'Create',
|
3561
|
+
delete: 'Delete',
|
3562
|
+
save: 'Save',
|
3563
|
+
search: 'Search...',
|
3564
|
+
searchOrCreate: 'Search or create...'
|
3565
|
+
},
|
3566
|
+
toasts: {
|
3567
|
+
dismiss: 'Dismiss'
|
3568
|
+
},
|
3569
|
+
tour: {
|
3570
|
+
back: 'Back',
|
3571
|
+
close: 'Close',
|
3572
|
+
skip: 'Close and complete',
|
3573
|
+
last: 'Done',
|
3574
|
+
next: 'Next',
|
3575
|
+
open: 'Open'
|
3576
|
+
},
|
3577
|
+
searchInput: {
|
3578
|
+
inputLabel: 'Search...',
|
3579
|
+
buttonLabel: 'Search'
|
3580
|
+
}
|
3581
|
+
};
|
3582
|
+
const defaultLocalizationContext = {
|
3583
|
+
locale: 'en-GB',
|
3584
|
+
texts: defaultLocalisationTexts,
|
3585
|
+
formatting: {
|
3586
|
+
date: 'dd.mm.yy'
|
3587
|
+
}
|
3588
|
+
};
|
3589
|
+
const LocalizationContext = /*#__PURE__*/React.createContext(defaultLocalizationContext);
|
3590
|
+
const LocalizationProvider = ({
|
3591
|
+
localization,
|
3592
|
+
children
|
3593
|
+
}) => {
|
3594
|
+
return /*#__PURE__*/React.createElement(LocalizationContext.Provider, {
|
3595
|
+
value: localization || defaultLocalizationContext
|
3596
|
+
}, children);
|
3597
|
+
};
|
3598
|
+
const useLocalization = () => React.useContext(LocalizationContext);
|
3599
|
+
|
3492
3600
|
const Banner = /*#__PURE__*/React.forwardRef(function Banner(props, ref) {
|
3493
3601
|
const {
|
3494
3602
|
children,
|
3495
3603
|
state,
|
3496
3604
|
onClose
|
3497
3605
|
} = props;
|
3606
|
+
const {
|
3607
|
+
texts
|
3608
|
+
} = useLocalization();
|
3498
3609
|
const className = cn('bg-white relative flex items-center gap-2 py-2 px-4 leading-6 shadow-md z-10', props.className);
|
3499
3610
|
return /*#__PURE__*/React.createElement("div", {
|
3500
3611
|
className: className,
|
3501
3612
|
"data-taco": "banner",
|
3502
3613
|
ref: ref
|
3503
3614
|
}, getBannerIcon(state), children, onClose ? /*#__PURE__*/React.createElement(IconButton, {
|
3615
|
+
"aria-label": texts.banner.close,
|
3504
3616
|
className: "ml-auto -mr-2 self-start",
|
3505
3617
|
icon: "close",
|
3506
3618
|
appearance: "discrete",
|
@@ -3554,542 +3666,101 @@ const Button$1 = /*#__PURE__*/React.forwardRef(function Button(props, ref) {
|
|
3554
3666
|
}, button);
|
3555
3667
|
});
|
3556
3668
|
|
3557
|
-
|
3558
|
-
|
3559
|
-
|
3560
|
-
|
3561
|
-
|
3562
|
-
|
3563
|
-
|
3564
|
-
|
3565
|
-
|
3566
|
-
|
3567
|
-
|
3568
|
-
|
3569
|
-
|
3570
|
-
|
3571
|
-
|
3572
|
-
|
3573
|
-
};
|
3574
|
-
}, [tracker.started]);
|
3575
|
-
return {
|
3576
|
-
running: !!tracker.started,
|
3577
|
-
start: () => {
|
3578
|
-
setTracker({
|
3579
|
-
remaining: duration,
|
3580
|
-
started: Date.now()
|
3581
|
-
});
|
3582
|
-
},
|
3583
|
-
pause: () => {
|
3584
|
-
if (tracker.started) {
|
3585
|
-
setTracker({
|
3586
|
-
remaining: tracker.remaining - (Date.now() - tracker.started),
|
3587
|
-
started: null
|
3588
|
-
});
|
3589
|
-
}
|
3590
|
-
},
|
3591
|
-
resume: () => {
|
3592
|
-
if (tracker.remaining && !tracker.started) {
|
3593
|
-
setTracker({
|
3594
|
-
remaining: tracker.remaining,
|
3595
|
-
started: Date.now()
|
3596
|
-
});
|
3669
|
+
const thisYear = /*#__PURE__*/new Date().getFullYear();
|
3670
|
+
const years = [];
|
3671
|
+
for (let i = thisYear - 10; i <= thisYear + 10; i += 1) {
|
3672
|
+
years.push(i);
|
3673
|
+
}
|
3674
|
+
const Navbar = /*#__PURE__*/React.memo(({
|
3675
|
+
onMonthChange,
|
3676
|
+
onNextClick,
|
3677
|
+
onPreviousClick,
|
3678
|
+
value = new Date()
|
3679
|
+
}) => {
|
3680
|
+
const {
|
3681
|
+
texts: {
|
3682
|
+
calendar: {
|
3683
|
+
actions,
|
3684
|
+
months
|
3597
3685
|
}
|
3598
3686
|
}
|
3687
|
+
} = useLocalization();
|
3688
|
+
const handleChange = function handleChange(event) {
|
3689
|
+
const {
|
3690
|
+
year,
|
3691
|
+
month
|
3692
|
+
} = event.target.form;
|
3693
|
+
onMonthChange(new Date(year.value, month.value));
|
3599
3694
|
};
|
3600
|
-
|
3601
|
-
|
3602
|
-
|
3695
|
+
return /*#__PURE__*/React.createElement("div", {
|
3696
|
+
className: "mb-2 flex items-center justify-between"
|
3697
|
+
}, /*#__PURE__*/React.createElement("form", {
|
3698
|
+
className: "inline-flex space-x-1"
|
3699
|
+
}, /*#__PURE__*/React.createElement("select", {
|
3700
|
+
className: "h-8 px-2",
|
3701
|
+
name: "month",
|
3702
|
+
onChange: handleChange,
|
3703
|
+
value: value.getMonth()
|
3704
|
+
}, months.map((month, i) => /*#__PURE__*/React.createElement("option", {
|
3705
|
+
key: month,
|
3706
|
+
value: i
|
3707
|
+
}, month))), /*#__PURE__*/React.createElement("select", {
|
3708
|
+
className: "h-8 px-2",
|
3709
|
+
name: "year",
|
3710
|
+
onChange: handleChange,
|
3711
|
+
value: value.getFullYear()
|
3712
|
+
}, years.map(year => /*#__PURE__*/React.createElement("option", {
|
3713
|
+
key: year,
|
3714
|
+
value: year
|
3715
|
+
}, String(year))))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(IconButton, {
|
3716
|
+
appearance: "discrete",
|
3717
|
+
icon: "chevron-left",
|
3718
|
+
"aria-label": actions.previousMonth,
|
3719
|
+
onClick: () => onPreviousClick(),
|
3720
|
+
rounded: true
|
3721
|
+
}), /*#__PURE__*/React.createElement(IconButton, {
|
3722
|
+
appearance: "discrete",
|
3723
|
+
icon: "chevron-right",
|
3724
|
+
"aria-label": actions.nextMonth,
|
3725
|
+
onClick: () => onNextClick(),
|
3726
|
+
rounded: true
|
3727
|
+
})));
|
3728
|
+
});
|
3729
|
+
const Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
|
3603
3730
|
const {
|
3604
|
-
|
3605
|
-
|
3731
|
+
onChange: handleChange,
|
3732
|
+
value,
|
3733
|
+
disabledDays,
|
3606
3734
|
...otherProps
|
3607
3735
|
} = props;
|
3608
|
-
const
|
3609
|
-
|
3610
|
-
|
3611
|
-
|
3612
|
-
|
3736
|
+
const {
|
3737
|
+
locale,
|
3738
|
+
texts
|
3739
|
+
} = useLocalization();
|
3740
|
+
const [visibleMonth, setVisibleMonth] = React.useState(value !== null && value !== void 0 ? value : new Date());
|
3741
|
+
React.useEffect(() => {
|
3742
|
+
if (visibleMonth !== value) {
|
3743
|
+
setVisibleMonth(value !== null && value !== void 0 ? value : new Date());
|
3613
3744
|
}
|
3614
|
-
|
3615
|
-
|
3616
|
-
|
3617
|
-
|
3618
|
-
}
|
3619
|
-
|
3620
|
-
|
3621
|
-
|
3622
|
-
|
3623
|
-
|
3624
|
-
|
3625
|
-
|
3626
|
-
|
3627
|
-
|
3628
|
-
}
|
3629
|
-
|
3630
|
-
|
3631
|
-
|
3632
|
-
}, /*#__PURE__*/
|
3633
|
-
cx: "50",
|
3634
|
-
cy: "50",
|
3635
|
-
r: "45"
|
3636
|
-
})), label && /*#__PURE__*/React__default.createElement("span", {
|
3637
|
-
className: "mt-4"
|
3638
|
-
}, label));
|
3639
|
-
});
|
3640
|
-
|
3641
|
-
const getBadgeIcon = type => {
|
3642
|
-
const css = 'rounded-full flex-shrink-0 mr-2 mt-1 self-start';
|
3643
|
-
switch (type) {
|
3644
|
-
case 'success':
|
3645
|
-
return /*#__PURE__*/React__default.createElement(Icon, {
|
3646
|
-
name: "tick",
|
3647
|
-
className: cn(css, 'yt-green-solid ')
|
3648
|
-
});
|
3649
|
-
case 'warning':
|
3650
|
-
return /*#__PURE__*/React__default.createElement(Icon, {
|
3651
|
-
name: "warning",
|
3652
|
-
className: cn(css, 'yt-yellow-solid')
|
3653
|
-
});
|
3654
|
-
case 'error':
|
3655
|
-
return /*#__PURE__*/React__default.createElement(Icon, {
|
3656
|
-
name: "warning",
|
3657
|
-
className: cn(css, 'yt-red-solid')
|
3658
|
-
});
|
3659
|
-
case 'information':
|
3660
|
-
return /*#__PURE__*/React__default.createElement(Icon, {
|
3661
|
-
name: "info",
|
3662
|
-
className: cn(css, 'yt-blue-solid')
|
3663
|
-
});
|
3664
|
-
case 'loading':
|
3665
|
-
return /*#__PURE__*/React__default.createElement(Spinner$1, {
|
3666
|
-
delay: 0,
|
3667
|
-
className: cn(css, 'h-6 w-6')
|
3668
|
-
});
|
3669
|
-
default:
|
3670
|
-
return null;
|
3671
|
-
}
|
3672
|
-
};
|
3673
|
-
|
3674
|
-
const Toast = ({
|
3675
|
-
content,
|
3676
|
-
lastUpdated,
|
3677
|
-
onClose: handleClose,
|
3678
|
-
options,
|
3679
|
-
...props
|
3680
|
-
}) => {
|
3681
|
-
const {
|
3682
|
-
texts
|
3683
|
-
} = useLocalization();
|
3684
|
-
const {
|
3685
|
-
autoClose,
|
3686
|
-
type = 'default'
|
3687
|
-
} = options;
|
3688
|
-
const className = cn('bg-white relative flex items-center py-1 px-2 mt-3 w-full rounded yt-shadow', {
|
3689
|
-
'border border-grey': type === 'default' || type === 'loading' || !type,
|
3690
|
-
'border border-grey-darker': type === 'success',
|
3691
|
-
'border border-blue': type === 'information',
|
3692
|
-
'border border-yellow-dark': type === 'warning',
|
3693
|
-
'border border-red': type === 'error'
|
3694
|
-
});
|
3695
|
-
const timer = useTimer(autoClose, handleClose);
|
3696
|
-
const controls = framerMotion.useAnimation();
|
3697
|
-
if (!content) {
|
3698
|
-
console.warn(`Toast requires 'content' property, which can't be empty string, null or undefined. Current content value is set to ${content === '' ? 'empty string' : content}.`);
|
3699
|
-
}
|
3700
|
-
React__default.useEffect(() => {
|
3701
|
-
if (autoClose) {
|
3702
|
-
timer.start();
|
3703
|
-
}
|
3704
|
-
}, [autoClose]);
|
3705
|
-
const triggerUpdateAnimation = function () {
|
3706
|
-
try {
|
3707
|
-
return Promise.resolve(controls.start({
|
3708
|
-
scale: 1.05
|
3709
|
-
})).then(function () {
|
3710
|
-
return Promise.resolve(controls.start({
|
3711
|
-
scale: 1
|
3712
|
-
})).then(function () {});
|
3713
|
-
});
|
3714
|
-
} catch (e) {
|
3715
|
-
return Promise.reject(e);
|
3716
|
-
}
|
3717
|
-
};
|
3718
|
-
React__default.useEffect(() => {
|
3719
|
-
if (lastUpdated) {
|
3720
|
-
triggerUpdateAnimation();
|
3721
|
-
if (timer.running) {
|
3722
|
-
timer.start();
|
3723
|
-
}
|
3724
|
-
}
|
3725
|
-
}, [lastUpdated]);
|
3726
|
-
return /*#__PURE__*/React__default.createElement(framerMotion.motion.div, Object.assign({}, props, {
|
3727
|
-
animate: controls,
|
3728
|
-
className: className,
|
3729
|
-
"data-taco": "toast",
|
3730
|
-
onMouseEnter: timer.pause,
|
3731
|
-
onMouseLeave: timer.resume
|
3732
|
-
}), getBadgeIcon(type), /*#__PURE__*/React__default.createElement("div", {
|
3733
|
-
className: "flex-grow"
|
3734
|
-
}, content), /*#__PURE__*/React__default.createElement(IconButton, {
|
3735
|
-
appearance: "discrete",
|
3736
|
-
className: "text-grey-darkest -mr-2 cursor-pointer self-start !px-0",
|
3737
|
-
icon: "close",
|
3738
|
-
"aria-label": texts.toasts.dismiss,
|
3739
|
-
onClick: handleClose
|
3740
|
-
}));
|
3741
|
-
};
|
3742
|
-
|
3743
|
-
const DEFAULT_AUTO_CLOSE_TIMEOUT = 7500;
|
3744
|
-
const ToastContext = /*#__PURE__*/React.createContext({});
|
3745
|
-
const insertToastWithoutDuplicates = (currentToasts, id, content, options, close) => {
|
3746
|
-
const nextToasts = [...currentToasts];
|
3747
|
-
const existingToastIndex = currentToasts.findIndex(toast => JSON.stringify(toast.content) === JSON.stringify(content));
|
3748
|
-
if (existingToastIndex > -1) {
|
3749
|
-
nextToasts[existingToastIndex].lastDuplicateId = id;
|
3750
|
-
nextToasts[existingToastIndex].lastUpdated = Date.now();
|
3751
|
-
} else {
|
3752
|
-
nextToasts.push({
|
3753
|
-
id,
|
3754
|
-
content: typeof content === 'function' ? content(close) : content,
|
3755
|
-
options
|
3756
|
-
});
|
3757
|
-
}
|
3758
|
-
return nextToasts;
|
3759
|
-
};
|
3760
|
-
const ToastProvider = ({
|
3761
|
-
children,
|
3762
|
-
...props
|
3763
|
-
}) => {
|
3764
|
-
const [toasts, setToasts] = React.useState([]);
|
3765
|
-
const handleClose = id => {
|
3766
|
-
setToasts(currentToasts => currentToasts.filter(toast => toast.id !== id));
|
3767
|
-
};
|
3768
|
-
// memoize (useCallback) this function,
|
3769
|
-
// it is the value of the context provider and we don't want it to trigger state tree re-renders on provider children
|
3770
|
-
const toaster = React.useCallback((content, options) => {
|
3771
|
-
const id = uuid.v4();
|
3772
|
-
const close = () => handleClose(id);
|
3773
|
-
setToasts(currentToasts => insertToastWithoutDuplicates(currentToasts, id, content, options, close));
|
3774
|
-
const update = (content, options) => {
|
3775
|
-
setToasts(currentToasts => {
|
3776
|
-
const nextToasts = currentToasts.filter(toast => {
|
3777
|
-
if (toast.lastDuplicateId) {
|
3778
|
-
return toast.lastDuplicateId !== id;
|
3779
|
-
}
|
3780
|
-
return toast.id !== id;
|
3781
|
-
});
|
3782
|
-
return insertToastWithoutDuplicates(nextToasts, uuid.v4(), content, options, close);
|
3783
|
-
});
|
3784
|
-
};
|
3785
|
-
const success = (content, options) => {
|
3786
|
-
update(content, {
|
3787
|
-
autoClose: DEFAULT_AUTO_CLOSE_TIMEOUT,
|
3788
|
-
...options,
|
3789
|
-
type: 'success'
|
3790
|
-
});
|
3791
|
-
};
|
3792
|
-
const error = (content, options) => {
|
3793
|
-
update(content, {
|
3794
|
-
...options,
|
3795
|
-
type: 'error'
|
3796
|
-
});
|
3797
|
-
};
|
3798
|
-
const warning = (content, options) => {
|
3799
|
-
update(content, {
|
3800
|
-
...options,
|
3801
|
-
type: 'warning'
|
3802
|
-
});
|
3803
|
-
};
|
3804
|
-
const information = (content, options) => {
|
3805
|
-
update(content, {
|
3806
|
-
...options,
|
3807
|
-
type: 'information'
|
3808
|
-
});
|
3809
|
-
};
|
3810
|
-
const loading = (content, options) => {
|
3811
|
-
update(content, {
|
3812
|
-
...options,
|
3813
|
-
type: 'loading'
|
3814
|
-
});
|
3815
|
-
};
|
3816
|
-
return {
|
3817
|
-
success,
|
3818
|
-
error,
|
3819
|
-
warning,
|
3820
|
-
information,
|
3821
|
-
loading,
|
3822
|
-
close
|
3823
|
-
};
|
3824
|
-
}, []);
|
3825
|
-
// no need to rebind these every render, do them once in an effect
|
3826
|
-
React.useEffect(() => {
|
3827
|
-
toaster.success = (content, options) => toaster(content, {
|
3828
|
-
autoClose: DEFAULT_AUTO_CLOSE_TIMEOUT,
|
3829
|
-
...options,
|
3830
|
-
type: 'success'
|
3831
|
-
});
|
3832
|
-
toaster.error = (content, options) => toaster(content, {
|
3833
|
-
...options,
|
3834
|
-
type: 'error'
|
3835
|
-
});
|
3836
|
-
toaster.warning = (content, options) => toaster(content, {
|
3837
|
-
...options,
|
3838
|
-
type: 'warning'
|
3839
|
-
});
|
3840
|
-
toaster.information = (content, options) => toaster(content, {
|
3841
|
-
...options,
|
3842
|
-
type: 'information'
|
3843
|
-
});
|
3844
|
-
toaster.loading = (content, options) => toaster(content, {
|
3845
|
-
...options,
|
3846
|
-
type: 'loading'
|
3847
|
-
});
|
3848
|
-
}, []);
|
3849
|
-
return /*#__PURE__*/React.createElement(ToastContext.Provider, Object.assign({}, props, {
|
3850
|
-
value: toaster
|
3851
|
-
}), children, /*#__PURE__*/React.createElement("div", {
|
3852
|
-
id: "yt-toast__container",
|
3853
|
-
className: "pointer-events-all absolute bottom-0 right-0 !left-auto z-[1000] mb-4 mr-4 flex max-w-md flex-col items-end justify-end",
|
3854
|
-
role: "log"
|
3855
|
-
}, /*#__PURE__*/React.createElement(framerMotion.AnimatePresence, {
|
3856
|
-
initial: false
|
3857
|
-
}, toasts.map(toast => /*#__PURE__*/React.createElement(framerMotion.motion.div, {
|
3858
|
-
key: toast.id,
|
3859
|
-
transition: {
|
3860
|
-
type: 'spring',
|
3861
|
-
damping: 20,
|
3862
|
-
stiffness: 300
|
3863
|
-
},
|
3864
|
-
initial: {
|
3865
|
-
opacity: 0,
|
3866
|
-
y: 10,
|
3867
|
-
scale: 0.5
|
3868
|
-
},
|
3869
|
-
animate: {
|
3870
|
-
opacity: 1,
|
3871
|
-
y: 0,
|
3872
|
-
scale: 1
|
3873
|
-
},
|
3874
|
-
exit: {
|
3875
|
-
opacity: 0,
|
3876
|
-
scale: 0.5,
|
3877
|
-
transition: {
|
3878
|
-
duration: 0.2
|
3879
|
-
}
|
3880
|
-
}
|
3881
|
-
}, /*#__PURE__*/React.createElement(Toast, Object.assign({}, toast, {
|
3882
|
-
onClose: () => handleClose(toast.id)
|
3883
|
-
})))))));
|
3884
|
-
};
|
3885
|
-
const useToast = () => React.useContext(ToastContext);
|
3886
|
-
|
3887
|
-
const defaultLocalisationTexts = {
|
3888
|
-
calendar: {
|
3889
|
-
months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
|
3890
|
-
weekdaysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
3891
|
-
actions: {
|
3892
|
-
previousMonth: 'Previous month',
|
3893
|
-
nextMonth: 'Next month',
|
3894
|
-
previousYear: 'Previous year',
|
3895
|
-
nextYear: 'Next year',
|
3896
|
-
today: 'Today'
|
3897
|
-
}
|
3898
|
-
},
|
3899
|
-
combobox: {
|
3900
|
-
tooltip: 'Search in list'
|
3901
|
-
},
|
3902
|
-
datepicker: {
|
3903
|
-
calendar: 'Calendar',
|
3904
|
-
clear: 'Clear',
|
3905
|
-
expand: 'Show calendar',
|
3906
|
-
shortcuts: 'Shortcuts'
|
3907
|
-
},
|
3908
|
-
hanger: {
|
3909
|
-
close: 'Close'
|
3910
|
-
},
|
3911
|
-
listbox: {
|
3912
|
-
loading: 'Loading results...',
|
3913
|
-
empty: 'No results found',
|
3914
|
-
allOption: 'All'
|
3915
|
-
},
|
3916
|
-
dialog: {
|
3917
|
-
close: 'Close',
|
3918
|
-
drag: 'Drag'
|
3919
|
-
},
|
3920
|
-
pagination: {
|
3921
|
-
label: 'Pagination',
|
3922
|
-
pageSize: 'Items per page',
|
3923
|
-
showingXofYofTotal: 'Showing [X] - [Y] of [total]',
|
3924
|
-
actions: {
|
3925
|
-
firstPage: 'Goto first page',
|
3926
|
-
firstPageWithShortcut: 'Goto first page (Home)',
|
3927
|
-
previousPage: 'Goto previous page',
|
3928
|
-
previousPageWithShortcut: 'Goto previous page (Page Up)',
|
3929
|
-
nextPage: 'Goto next page',
|
3930
|
-
nextPageWithShortcut: 'Goto next page (Page Down)',
|
3931
|
-
lastPage: 'Goto last page',
|
3932
|
-
lastPageWithShortcut: 'Goto last page (End)',
|
3933
|
-
pageX: 'Goto page [X]'
|
3934
|
-
}
|
3935
|
-
},
|
3936
|
-
table: {
|
3937
|
-
actions: 'Other actions',
|
3938
|
-
edit: 'Edit (e)',
|
3939
|
-
copy: 'Copy (c)',
|
3940
|
-
del: 'Delete (del)',
|
3941
|
-
newSubRow: 'New row (shift + n)',
|
3942
|
-
loading: 'Loading...'
|
3943
|
-
},
|
3944
|
-
select: {
|
3945
|
-
allOptionsSelected: 'All'
|
3946
|
-
},
|
3947
|
-
select2: {
|
3948
|
-
allSelect: 'Select all',
|
3949
|
-
allDeselect: 'Deselect all',
|
3950
|
-
cancel: 'Cancel',
|
3951
|
-
chooseColor: 'Pick a color',
|
3952
|
-
create: 'Create',
|
3953
|
-
delete: 'Delete',
|
3954
|
-
save: 'Save',
|
3955
|
-
search: 'Search...',
|
3956
|
-
searchOrCreate: 'Search or create...'
|
3957
|
-
},
|
3958
|
-
toasts: {
|
3959
|
-
dismiss: 'Dismiss'
|
3960
|
-
},
|
3961
|
-
tour: {
|
3962
|
-
back: 'Back',
|
3963
|
-
close: 'Close',
|
3964
|
-
skip: 'Close and complete',
|
3965
|
-
last: 'Done',
|
3966
|
-
next: 'Next',
|
3967
|
-
open: 'Open'
|
3968
|
-
},
|
3969
|
-
searchInput: {
|
3970
|
-
inputLabel: 'Search...'
|
3971
|
-
}
|
3972
|
-
};
|
3973
|
-
const defaultLocalizationContext = {
|
3974
|
-
locale: 'en-GB',
|
3975
|
-
texts: defaultLocalisationTexts,
|
3976
|
-
formatting: {
|
3977
|
-
date: 'dd.mm.yy'
|
3978
|
-
}
|
3979
|
-
};
|
3980
|
-
const Context = /*#__PURE__*/React.createContext({
|
3981
|
-
localization: defaultLocalizationContext
|
3982
|
-
});
|
3983
|
-
const Provider = props => {
|
3984
|
-
const {
|
3985
|
-
children,
|
3986
|
-
localization = defaultLocalizationContext
|
3987
|
-
} = props;
|
3988
|
-
const value = React.useMemo(() => ({
|
3989
|
-
localization
|
3990
|
-
}), [localization]);
|
3991
|
-
return /*#__PURE__*/React.createElement(Context.Provider, {
|
3992
|
-
value: value
|
3993
|
-
}, /*#__PURE__*/React.createElement(TooltipPrimitive.Provider, null, /*#__PURE__*/React.createElement(ToastProvider, null, children)));
|
3994
|
-
};
|
3995
|
-
const useTaco = () => React.useContext(Context);
|
3996
|
-
const useLocalization = () => useTaco().localization;
|
3997
|
-
|
3998
|
-
const thisYear = /*#__PURE__*/new Date().getFullYear();
|
3999
|
-
const years = [];
|
4000
|
-
for (let i = thisYear - 10; i <= thisYear + 10; i += 1) {
|
4001
|
-
years.push(i);
|
4002
|
-
}
|
4003
|
-
const Navbar = /*#__PURE__*/React.memo(({
|
4004
|
-
onMonthChange,
|
4005
|
-
onNextClick,
|
4006
|
-
onPreviousClick,
|
4007
|
-
value = new Date()
|
4008
|
-
}) => {
|
4009
|
-
const {
|
4010
|
-
texts: {
|
4011
|
-
calendar: {
|
4012
|
-
actions,
|
4013
|
-
months
|
4014
|
-
}
|
4015
|
-
}
|
4016
|
-
} = useLocalization();
|
4017
|
-
const handleChange = function handleChange(event) {
|
4018
|
-
const {
|
4019
|
-
year,
|
4020
|
-
month
|
4021
|
-
} = event.target.form;
|
4022
|
-
onMonthChange(new Date(year.value, month.value));
|
4023
|
-
};
|
4024
|
-
return /*#__PURE__*/React.createElement("div", {
|
4025
|
-
className: "mb-2 flex items-center justify-between"
|
4026
|
-
}, /*#__PURE__*/React.createElement("form", {
|
4027
|
-
className: "inline-flex space-x-1"
|
4028
|
-
}, /*#__PURE__*/React.createElement("select", {
|
4029
|
-
className: "h-8 px-2",
|
4030
|
-
name: "month",
|
4031
|
-
onChange: handleChange,
|
4032
|
-
value: value.getMonth()
|
4033
|
-
}, months.map((month, i) => /*#__PURE__*/React.createElement("option", {
|
4034
|
-
key: month,
|
4035
|
-
value: i
|
4036
|
-
}, month))), /*#__PURE__*/React.createElement("select", {
|
4037
|
-
className: "h-8 px-2",
|
4038
|
-
name: "year",
|
4039
|
-
onChange: handleChange,
|
4040
|
-
value: value.getFullYear()
|
4041
|
-
}, years.map(year => /*#__PURE__*/React.createElement("option", {
|
4042
|
-
key: year,
|
4043
|
-
value: year
|
4044
|
-
}, String(year))))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(IconButton, {
|
4045
|
-
appearance: "discrete",
|
4046
|
-
icon: "chevron-left",
|
4047
|
-
"aria-label": actions.previousMonth,
|
4048
|
-
onClick: () => onPreviousClick(),
|
4049
|
-
rounded: true
|
4050
|
-
}), /*#__PURE__*/React.createElement(IconButton, {
|
4051
|
-
appearance: "discrete",
|
4052
|
-
icon: "chevron-right",
|
4053
|
-
"aria-label": actions.nextMonth,
|
4054
|
-
onClick: () => onNextClick(),
|
4055
|
-
rounded: true
|
4056
|
-
})));
|
4057
|
-
});
|
4058
|
-
const Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
|
4059
|
-
const {
|
4060
|
-
onChange: handleChange,
|
4061
|
-
value,
|
4062
|
-
disabledDays,
|
4063
|
-
...otherProps
|
4064
|
-
} = props;
|
4065
|
-
const {
|
4066
|
-
locale,
|
4067
|
-
texts
|
4068
|
-
} = useLocalization();
|
4069
|
-
const [visibleMonth, setVisibleMonth] = React.useState(value !== null && value !== void 0 ? value : new Date());
|
4070
|
-
React.useEffect(() => {
|
4071
|
-
if (visibleMonth !== value) {
|
4072
|
-
setVisibleMonth(value !== null && value !== void 0 ? value : new Date());
|
4073
|
-
}
|
4074
|
-
}, [value]);
|
4075
|
-
const handleDayClick = (date, modifiers, event) => {
|
4076
|
-
if (modifiers.outside || modifiers.disabled) {
|
4077
|
-
return;
|
4078
|
-
}
|
4079
|
-
handleChange(date, event);
|
4080
|
-
};
|
4081
|
-
const handleCalendarClickToday = () => {
|
4082
|
-
const today = new Date();
|
4083
|
-
// set to midday to avoid UTC offset causing dates to be mismatched server side
|
4084
|
-
today.setHours(12);
|
4085
|
-
today.setMinutes(0);
|
4086
|
-
today.setSeconds(0);
|
4087
|
-
handleChange(today);
|
4088
|
-
};
|
4089
|
-
const className = cn('flex bg-white text-xs p-4', otherProps.className);
|
4090
|
-
return /*#__PURE__*/React.createElement("div", {
|
4091
|
-
"data-taco": "calendar"
|
4092
|
-
}, /*#__PURE__*/React.createElement(ReactDayPicker, Object.assign({}, otherProps, {
|
3745
|
+
}, [value]);
|
3746
|
+
const handleDayClick = (date, modifiers, event) => {
|
3747
|
+
if (modifiers.outside || modifiers.disabled) {
|
3748
|
+
return;
|
3749
|
+
}
|
3750
|
+
handleChange(date, event);
|
3751
|
+
};
|
3752
|
+
const handleCalendarClickToday = () => {
|
3753
|
+
const today = new Date();
|
3754
|
+
// set to midday to avoid UTC offset causing dates to be mismatched server side
|
3755
|
+
today.setHours(12);
|
3756
|
+
today.setMinutes(0);
|
3757
|
+
today.setSeconds(0);
|
3758
|
+
handleChange(today);
|
3759
|
+
};
|
3760
|
+
const className = cn('flex bg-white text-xs p-4', otherProps.className);
|
3761
|
+
return /*#__PURE__*/React.createElement("div", {
|
3762
|
+
"data-taco": "calendar"
|
3763
|
+
}, /*#__PURE__*/React.createElement(ReactDayPicker, Object.assign({}, otherProps, {
|
4093
3764
|
className: className,
|
4094
3765
|
month: visibleMonth,
|
4095
3766
|
selectedDays: value,
|
@@ -4112,6 +3783,48 @@ const Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
|
|
4112
3783
|
})));
|
4113
3784
|
});
|
4114
3785
|
|
3786
|
+
const Content$2 = /*#__PURE__*/React.forwardRef(function CardContent(externalProps, ref) {
|
3787
|
+
const {
|
3788
|
+
noPadding,
|
3789
|
+
...props
|
3790
|
+
} = externalProps;
|
3791
|
+
const className = cn('flex-grow overflow-auto', {
|
3792
|
+
'mx-4 mb-4': !noPadding
|
3793
|
+
}, props.className);
|
3794
|
+
return /*#__PURE__*/React.createElement("div", Object.assign({}, props, {
|
3795
|
+
className: className,
|
3796
|
+
ref: ref
|
3797
|
+
}));
|
3798
|
+
});
|
3799
|
+
const Card = /*#__PURE__*/React.forwardRef(function Card(props, ref) {
|
3800
|
+
const {
|
3801
|
+
title,
|
3802
|
+
menu,
|
3803
|
+
children
|
3804
|
+
} = props;
|
3805
|
+
const className = cn('bg-white flex flex-col rounded-xl shadow-[0px_0px_1px_rgba(0,0,0,0.1),0px_6px_18px_rgba(47,51,68,0.2)]', props.className);
|
3806
|
+
return /*#__PURE__*/React.createElement("div", {
|
3807
|
+
className: className,
|
3808
|
+
"data-taco": "card",
|
3809
|
+
ref: ref
|
3810
|
+
}, /*#__PURE__*/React.createElement("div", {
|
3811
|
+
className: "mx-4 mt-4 mb-2 flex"
|
3812
|
+
}, title && /*#__PURE__*/React.createElement("h4", {
|
3813
|
+
className: "mb-0 flex-grow text-left"
|
3814
|
+
}, title), menu ? /*#__PURE__*/React.createElement(IconButton, {
|
3815
|
+
icon: "ellipsis-horizontal",
|
3816
|
+
appearance: "discrete",
|
3817
|
+
menu: menu,
|
3818
|
+
className: "-mt-[4px]"
|
3819
|
+
}) : null), children);
|
3820
|
+
});
|
3821
|
+
Card.Content = Content$2;
|
3822
|
+
|
3823
|
+
// React 18 has this built-in, when we upgrade this hook should be removed and the uuid dependency should be removed
|
3824
|
+
const useId = nativeId => {
|
3825
|
+
return React__default.useMemo(() => nativeId !== null && nativeId !== void 0 ? nativeId : uuid.v4(), []);
|
3826
|
+
};
|
3827
|
+
|
4115
3828
|
const Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
|
4116
3829
|
const {
|
4117
3830
|
checked,
|
@@ -4122,6 +3835,7 @@ const Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
|
|
4122
3835
|
onChange,
|
4123
3836
|
...otherProps
|
4124
3837
|
} = props;
|
3838
|
+
const id = useId(props.id);
|
4125
3839
|
const className = cn('bg-white h-5 w-5 border rounded text-sm flex-shrink-0 self-start mt-[0.1rem] focus:yt-focus',
|
4126
3840
|
//hover:shadow-[0_0_0_1px_rgba(235,235,235,1)]
|
4127
3841
|
props.className, {
|
@@ -4134,7 +3848,14 @@ const Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
|
|
4134
3848
|
if (onChange) {
|
4135
3849
|
handleChange = checked => onChange(checked === 'indeterminate' ? false : checked);
|
4136
3850
|
}
|
4137
|
-
|
3851
|
+
let labelledByProps = null;
|
3852
|
+
if (label) {
|
3853
|
+
labelledByProps = {
|
3854
|
+
['aria-labelledby']: `${id}-label`,
|
3855
|
+
id
|
3856
|
+
};
|
3857
|
+
}
|
3858
|
+
const element = /*#__PURE__*/React.createElement(CheckboxPrimitive.Root, Object.assign({}, otherProps, labelledByProps, {
|
4138
3859
|
"data-taco": "checkbox",
|
4139
3860
|
checked: indeterminate ? 'indeterminate' : checked,
|
4140
3861
|
className: className,
|
@@ -4147,12 +3868,15 @@ const Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
|
|
4147
3868
|
className: "!h-full !w-full"
|
4148
3869
|
})));
|
4149
3870
|
if (label) {
|
4150
|
-
const
|
3871
|
+
const labelContainerClassName = cn('flex items-center cursor-pointer gap-2', {
|
4151
3872
|
'cursor-not-allowed text-grey-dark': props.disabled
|
4152
3873
|
}, props.className);
|
4153
|
-
return /*#__PURE__*/React.createElement("
|
4154
|
-
className:
|
4155
|
-
}, element, label
|
3874
|
+
return /*#__PURE__*/React.createElement("span", {
|
3875
|
+
className: labelContainerClassName
|
3876
|
+
}, element, /*#__PURE__*/React.createElement("label", {
|
3877
|
+
htmlFor: id,
|
3878
|
+
id: `${id}-label`
|
3879
|
+
}, label));
|
4156
3880
|
}
|
4157
3881
|
return element;
|
4158
3882
|
});
|
@@ -4325,6 +4049,45 @@ const useListScrollTo = (internalRef, itemRefs) => {
|
|
4325
4049
|
};
|
4326
4050
|
};
|
4327
4051
|
|
4052
|
+
const Spinner$1 = /*#__PURE__*/React__default.forwardRef(function Spinner(props, ref) {
|
4053
|
+
const {
|
4054
|
+
delay = 500,
|
4055
|
+
label,
|
4056
|
+
...otherProps
|
4057
|
+
} = props;
|
4058
|
+
const [visible, setVisibility] = React__default.useState(!delay);
|
4059
|
+
React__default.useEffect(() => {
|
4060
|
+
let timeout;
|
4061
|
+
if (delay) {
|
4062
|
+
timeout = window.setTimeout(() => setVisibility(true), delay);
|
4063
|
+
}
|
4064
|
+
return () => {
|
4065
|
+
if (timeout) {
|
4066
|
+
clearTimeout(timeout);
|
4067
|
+
}
|
4068
|
+
};
|
4069
|
+
}, [delay]);
|
4070
|
+
if (!visible) {
|
4071
|
+
return null;
|
4072
|
+
}
|
4073
|
+
const className = cn('inline-flex flex-col relative items-center', otherProps.className);
|
4074
|
+
return /*#__PURE__*/React__default.createElement("div", Object.assign({}, otherProps, {
|
4075
|
+
className: className,
|
4076
|
+
"data-taco": "spinner",
|
4077
|
+
ref: ref
|
4078
|
+
}), /*#__PURE__*/React__default.createElement("svg", {
|
4079
|
+
className: "h-10 w-10 animate-[spinnerRotation_2s_linear_infinite]",
|
4080
|
+
viewBox: "0 0 100 100",
|
4081
|
+
xmlns: "http://www.w3.org/2000/svg"
|
4082
|
+
}, /*#__PURE__*/React__default.createElement("circle", {
|
4083
|
+
cx: "50",
|
4084
|
+
cy: "50",
|
4085
|
+
r: "45"
|
4086
|
+
})), label && /*#__PURE__*/React__default.createElement("span", {
|
4087
|
+
className: "mt-4"
|
4088
|
+
}, label));
|
4089
|
+
});
|
4090
|
+
|
4328
4091
|
const getId = (id, value) => `${id}_${value}`;
|
4329
4092
|
const getNextEnabledItem = (event, data, index) => {
|
4330
4093
|
const nextIndex = getNextIndexFromKey(event.key, data.length, index);
|
@@ -4415,22 +4178,6 @@ const ScrollableList = /*#__PURE__*/React.forwardRef(function ScrollableList(pro
|
|
4415
4178
|
return selectedIndexes.findIndex(i => i === index) !== -1;
|
4416
4179
|
}
|
4417
4180
|
};
|
4418
|
-
const list = {
|
4419
|
-
...otherProps,
|
4420
|
-
className: cn('inline-flex flex-col list-none !p-0 m-0 overflow-y-auto h-auto', getInputClasses(props), {
|
4421
|
-
'yt-list--multiselect': multiselect,
|
4422
|
-
'pointer-events-none': disabled,
|
4423
|
-
'cursor-not-allowed': disabled || readOnly
|
4424
|
-
}, otherProps.className),
|
4425
|
-
disabled,
|
4426
|
-
id,
|
4427
|
-
onFocus: !disabled && !readOnly ? handleFocus : undefined,
|
4428
|
-
onKeyDown: !disabled && !readOnly ? handleKeyDown : undefined,
|
4429
|
-
readOnly,
|
4430
|
-
ref: listRef,
|
4431
|
-
role: 'listbox',
|
4432
|
-
tabIndex: otherProps.tabIndex || 0
|
4433
|
-
};
|
4434
4181
|
const options = data.map((option, index) => {
|
4435
4182
|
const depth = option.path ? option.path.split('.').length - 1 : 0;
|
4436
4183
|
return {
|
@@ -4452,6 +4199,22 @@ const ScrollableList = /*#__PURE__*/React.forwardRef(function ScrollableList(pro
|
|
4452
4199
|
} : undefined
|
4453
4200
|
};
|
4454
4201
|
});
|
4202
|
+
const list = {
|
4203
|
+
...otherProps,
|
4204
|
+
className: cn('inline-flex flex-col list-none !p-0 m-0 overflow-y-auto h-auto', getInputClasses(props), {
|
4205
|
+
'yt-list--multiselect': multiselect,
|
4206
|
+
'pointer-events-none': disabled,
|
4207
|
+
'cursor-not-allowed': disabled || readOnly
|
4208
|
+
}, otherProps.className),
|
4209
|
+
disabled,
|
4210
|
+
id,
|
4211
|
+
onFocus: !disabled && !readOnly ? handleFocus : undefined,
|
4212
|
+
onKeyDown: !disabled && !readOnly ? handleKeyDown : undefined,
|
4213
|
+
readOnly,
|
4214
|
+
ref: listRef,
|
4215
|
+
role: options.length <= 0 || loading ? 'presentation' : 'listbox',
|
4216
|
+
tabIndex: otherProps.tabIndex || 0
|
4217
|
+
};
|
4455
4218
|
return /*#__PURE__*/React.createElement("ul", Object.assign({}, list, {
|
4456
4219
|
"data-taco": "scrollable-list"
|
4457
4220
|
}), loading ? /*#__PURE__*/React.createElement("li", {
|
@@ -4464,7 +4227,12 @@ const ScrollableList = /*#__PURE__*/React.forwardRef(function ScrollableList(pro
|
|
4464
4227
|
...optionProps
|
4465
4228
|
}) => /*#__PURE__*/React.createElement("li", Object.assign({}, optionProps), icon, /*#__PURE__*/React.createElement("span", {
|
4466
4229
|
className: "flex-grow truncate text-left"
|
4467
|
-
}, children), multiselect && /*#__PURE__*/React.createElement(Checkbox
|
4230
|
+
}, children), multiselect && /*#__PURE__*/React.createElement(Checkbox
|
4231
|
+
// In multiselect variant, this checkbox only acts as visual representation of item being selected,
|
4232
|
+
// so need to be taken out of screen reader scope.
|
4233
|
+
, {
|
4234
|
+
"aria-hidden": true,
|
4235
|
+
tabIndex: -1,
|
4468
4236
|
checked: optionProps['aria-selected'],
|
4469
4237
|
onChange: () => null,
|
4470
4238
|
className: "pointer-events-none ml-2 self-center p-px"
|
@@ -4960,7 +4728,11 @@ const Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
|
|
4960
4728
|
ref: ref
|
4961
4729
|
}), /*#__PURE__*/React.createElement(Input, Object.assign({}, input, {
|
4962
4730
|
autoComplete: "off",
|
4963
|
-
button: props.inline ? /*#__PURE__*/React.createElement(IconButton
|
4731
|
+
button: props.inline ? /*#__PURE__*/React.createElement(IconButton
|
4732
|
+
// In case of inline combobox, this icon button acts only as visual chevron representation,
|
4733
|
+
// so should be taken out of screen reader scope.
|
4734
|
+
, {
|
4735
|
+
"aria-hidden": true,
|
4964
4736
|
appearance: "discrete",
|
4965
4737
|
className: "!border-l-0 focus:!border-none focus:!shadow-none active:!border-none",
|
4966
4738
|
icon: popover.open ? 'chevron-up' : 'chevron-down',
|
@@ -5190,7 +4962,7 @@ const RenderPropWrapper = /*#__PURE__*/React.forwardRef(function RenderPropWrapp
|
|
5190
4962
|
ref
|
5191
4963
|
});
|
5192
4964
|
});
|
5193
|
-
const Content$
|
4965
|
+
const Content$3 = /*#__PURE__*/React.forwardRef(function PopoverContent(props, ref) {
|
5194
4966
|
const {
|
5195
4967
|
placement: side,
|
5196
4968
|
...popoverContentProps
|
@@ -5242,7 +5014,7 @@ const Popover = /*#__PURE__*/React.forwardRef(function Popover(props, ref) {
|
|
5242
5014
|
}, trigger && /*#__PURE__*/React.createElement(Trigger$2, null, trigger), children));
|
5243
5015
|
});
|
5244
5016
|
Popover.Trigger = Trigger$2;
|
5245
|
-
Popover.Content = Content$
|
5017
|
+
Popover.Content = Content$3;
|
5246
5018
|
Popover.Close = Close$1;
|
5247
5019
|
Popover.Portal = PopoverPrimitive.Portal;
|
5248
5020
|
|
@@ -5345,9 +5117,13 @@ const useDraggable = ref => {
|
|
5345
5117
|
x: 0,
|
5346
5118
|
y: 0
|
5347
5119
|
});
|
5120
|
+
const [dragging, setDragging] = React__default.useState(false);
|
5348
5121
|
const {
|
5349
5122
|
moveProps
|
5350
5123
|
} = interactions.useMove({
|
5124
|
+
onMoveStart() {
|
5125
|
+
setDragging(true);
|
5126
|
+
},
|
5351
5127
|
onMove(event) {
|
5352
5128
|
var _ref$current;
|
5353
5129
|
const rect = (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.getBoundingClientRect();
|
@@ -5366,10 +5142,14 @@ const useDraggable = ref => {
|
|
5366
5142
|
y
|
5367
5143
|
};
|
5368
5144
|
});
|
5145
|
+
},
|
5146
|
+
onMoveEnd() {
|
5147
|
+
setDragging(false);
|
5369
5148
|
}
|
5370
5149
|
});
|
5371
5150
|
return {
|
5372
5151
|
position,
|
5152
|
+
dragging,
|
5373
5153
|
handleProps: moveProps
|
5374
5154
|
};
|
5375
5155
|
};
|
@@ -5411,11 +5191,12 @@ const RenderPropWrapper$1 = /*#__PURE__*/React.forwardRef(function RenderPropWra
|
|
5411
5191
|
...renderProps
|
5412
5192
|
});
|
5413
5193
|
});
|
5414
|
-
const Content$
|
5194
|
+
const Content$4 = /*#__PURE__*/React.forwardRef(function DialogContent(props, ref) {
|
5415
5195
|
const dialog = useCurrentDialog();
|
5416
5196
|
const internalRef = useMergedRef(ref);
|
5417
5197
|
const {
|
5418
5198
|
position,
|
5199
|
+
dragging,
|
5419
5200
|
handleProps: dragHandleProps
|
5420
5201
|
} = useDraggable(internalRef);
|
5421
5202
|
const {
|
@@ -5462,6 +5243,9 @@ const Content$3 = /*#__PURE__*/React.forwardRef(function DialogContent(props, re
|
|
5462
5243
|
className: containerClassName,
|
5463
5244
|
"data-taco": "dialog"
|
5464
5245
|
}, output, dialog.draggable && /*#__PURE__*/React.createElement("div", Object.assign({}, dragHandleProps, {
|
5246
|
+
role: "button",
|
5247
|
+
draggable: true,
|
5248
|
+
"aria-grabbed": dragging,
|
5465
5249
|
"aria-label": texts.dialog.drag,
|
5466
5250
|
className: "yt-dialog__drag absolute-center-x bg-grey-light top-1.5 h-3 w-24 cursor-move rounded text-center"
|
5467
5251
|
})), dialog.showCloseButton ? /*#__PURE__*/React.createElement(DialogPrimitive.Close, {
|
@@ -5579,7 +5363,7 @@ const Dialog = /*#__PURE__*/React.forwardRef(function Dialog(props, ref) {
|
|
5579
5363
|
}, trigger && /*#__PURE__*/React.createElement(Trigger$3, null, trigger), children));
|
5580
5364
|
});
|
5581
5365
|
Dialog.Trigger = Trigger$3;
|
5582
|
-
Dialog.Content = Content$
|
5366
|
+
Dialog.Content = Content$4;
|
5583
5367
|
Dialog.Title = Title$1;
|
5584
5368
|
Dialog.Footer = Footer$1;
|
5585
5369
|
Dialog.Extra = Extra;
|
@@ -5673,7 +5457,7 @@ const Title$2 = /*#__PURE__*/React.forwardRef(function DialogTitle(props, ref) {
|
|
5673
5457
|
ref: ref
|
5674
5458
|
}));
|
5675
5459
|
});
|
5676
|
-
const Content$
|
5460
|
+
const Content$5 = /*#__PURE__*/React.forwardRef(function HangerContent(props, ref) {
|
5677
5461
|
const {
|
5678
5462
|
placement: side
|
5679
5463
|
} = props;
|
@@ -5732,7 +5516,7 @@ const Hanger = /*#__PURE__*/React.forwardRef(function Hanger(props, ref) {
|
|
5732
5516
|
}, anchor && /*#__PURE__*/React.createElement(Anchor, null, anchor), children));
|
5733
5517
|
});
|
5734
5518
|
Hanger.Anchor = Anchor;
|
5735
|
-
Hanger.Content = Content$
|
5519
|
+
Hanger.Content = Content$5;
|
5736
5520
|
Hanger.Title = Title$2;
|
5737
5521
|
|
5738
5522
|
const UnstyledArrow$1 = /*#__PURE__*/React.forwardRef(function HoverCardArrow(props, ref) {
|
@@ -5763,7 +5547,7 @@ const Trigger$4 = /*#__PURE__*/React.forwardRef(function HoverCardTrigger(props,
|
|
5763
5547
|
ref: ref
|
5764
5548
|
}));
|
5765
5549
|
});
|
5766
|
-
const Content$
|
5550
|
+
const Content$6 = /*#__PURE__*/React.forwardRef(function HoverCardContent(props, ref) {
|
5767
5551
|
const {
|
5768
5552
|
placement: side
|
5769
5553
|
} = props;
|
@@ -5784,7 +5568,7 @@ const HoverCard = props => {
|
|
5784
5568
|
}));
|
5785
5569
|
};
|
5786
5570
|
HoverCard.Trigger = Trigger$4;
|
5787
|
-
HoverCard.Content = Content$
|
5571
|
+
HoverCard.Content = Content$6;
|
5788
5572
|
|
5789
5573
|
const SearchInput = /*#__PURE__*/React.forwardRef(function SearchInput({
|
5790
5574
|
onSearch,
|
@@ -5810,6 +5594,7 @@ const SearchInput = /*#__PURE__*/React.forwardRef(function SearchInput({
|
|
5810
5594
|
"aria-label": texts.searchInput.inputLabel
|
5811
5595
|
}, props, {
|
5812
5596
|
button: /*#__PURE__*/React.createElement(IconButton, {
|
5597
|
+
"aria-label": texts.searchInput.buttonLabel,
|
5813
5598
|
icon: "search",
|
5814
5599
|
className: "!border-transparent !bg-transparent focus:!border-transparent peer-focus:!border-transparent peer-focus:peer-active:!border-transparent",
|
5815
5600
|
disabled: props.disabled,
|
@@ -5821,6 +5606,51 @@ const SearchInput = /*#__PURE__*/React.forwardRef(function SearchInput({
|
|
5821
5606
|
}));
|
5822
5607
|
});
|
5823
5608
|
|
5609
|
+
function useTimer(duration = 0, callback) {
|
5610
|
+
const timer = React.useRef();
|
5611
|
+
const [tracker, setTracker] = React.useState({
|
5612
|
+
remaining: duration,
|
5613
|
+
started: null
|
5614
|
+
});
|
5615
|
+
React.useEffect(() => {
|
5616
|
+
if (duration) {
|
5617
|
+
if (tracker.started) {
|
5618
|
+
timer.current = window.setTimeout(callback, tracker.remaining);
|
5619
|
+
} else {
|
5620
|
+
clearTimeout(timer.current);
|
5621
|
+
}
|
5622
|
+
}
|
5623
|
+
return () => {
|
5624
|
+
clearTimeout(timer.current);
|
5625
|
+
};
|
5626
|
+
}, [tracker.started]);
|
5627
|
+
return {
|
5628
|
+
running: !!tracker.started,
|
5629
|
+
start: () => {
|
5630
|
+
setTracker({
|
5631
|
+
remaining: duration,
|
5632
|
+
started: Date.now()
|
5633
|
+
});
|
5634
|
+
},
|
5635
|
+
pause: () => {
|
5636
|
+
if (tracker.started) {
|
5637
|
+
setTracker({
|
5638
|
+
remaining: tracker.remaining - (Date.now() - tracker.started),
|
5639
|
+
started: null
|
5640
|
+
});
|
5641
|
+
}
|
5642
|
+
},
|
5643
|
+
resume: () => {
|
5644
|
+
if (tracker.remaining && !tracker.started) {
|
5645
|
+
setTracker({
|
5646
|
+
remaining: tracker.remaining,
|
5647
|
+
started: Date.now()
|
5648
|
+
});
|
5649
|
+
}
|
5650
|
+
}
|
5651
|
+
};
|
5652
|
+
}
|
5653
|
+
|
5824
5654
|
const useTypeahead = ({
|
5825
5655
|
data,
|
5826
5656
|
currentIndex
|
@@ -6183,21 +6013,22 @@ const useCurrentMenu = () => {
|
|
6183
6013
|
return React.useContext(MenuContext);
|
6184
6014
|
};
|
6185
6015
|
|
6186
|
-
const Content$
|
6016
|
+
const Content$7 = /*#__PURE__*/React.forwardRef(function MenuContent(props, ref) {
|
6187
6017
|
const internalRef = useMergedRef(ref);
|
6188
6018
|
const menu = useCurrentMenu();
|
6189
6019
|
const {
|
6020
|
+
align = 'start',
|
6190
6021
|
children,
|
6191
6022
|
placement: side,
|
6192
6023
|
...otherProps
|
6193
6024
|
} = props;
|
6194
|
-
const className = cn('border rounded block outline-none p-1 wcag-white
|
6025
|
+
const className = cn('border border-transparent rounded block outline-none p-1 yt-shadow wcag-white', props.className);
|
6195
6026
|
return /*#__PURE__*/React.createElement(DropdownMenuPrimitive.Portal, null, /*#__PURE__*/React.createElement(DropdownMenuPrimitive.Content, Object.assign({}, otherProps, {
|
6196
|
-
align:
|
6027
|
+
align: align,
|
6197
6028
|
className: className,
|
6198
6029
|
"data-taco": "menu",
|
6199
6030
|
side: side,
|
6200
|
-
sideOffset:
|
6031
|
+
sideOffset: 3,
|
6201
6032
|
style: {
|
6202
6033
|
minWidth: menu === null || menu === void 0 ? void 0 : menu.minWidth
|
6203
6034
|
},
|
@@ -6516,12 +6347,21 @@ const Header = /*#__PURE__*/React.forwardRef(function MenuHeader(props, ref) {
|
|
6516
6347
|
const Menu$1 = /*#__PURE__*/React.forwardRef(function Menu(externalProps, ref) {
|
6517
6348
|
const {
|
6518
6349
|
children,
|
6350
|
+
defaultOpen: defaultProp,
|
6351
|
+
onChange,
|
6352
|
+
open: prop,
|
6519
6353
|
trigger,
|
6520
6354
|
...props
|
6521
6355
|
} = externalProps;
|
6522
|
-
const [open, setOpen] = React.useState(false);
|
6523
6356
|
const [indented, setIndented] = React.useState(false);
|
6524
6357
|
const [minWidth, setMinWidth] = React.useState(undefined);
|
6358
|
+
const [open, setOpen] = reactUseControllableState.useControllableState({
|
6359
|
+
// uncontrolled
|
6360
|
+
defaultProp,
|
6361
|
+
// controlled
|
6362
|
+
onChange,
|
6363
|
+
prop
|
6364
|
+
});
|
6525
6365
|
const context = React.useMemo(() => ({
|
6526
6366
|
indented,
|
6527
6367
|
registerIndentation: () => setIndented(true),
|
@@ -6534,13 +6374,13 @@ const Menu$1 = /*#__PURE__*/React.forwardRef(function Menu(externalProps, ref) {
|
|
6534
6374
|
}, /*#__PURE__*/React.createElement(DropdownMenuPrimitive.Root, Object.assign({}, props, {
|
6535
6375
|
modal: false,
|
6536
6376
|
open: open,
|
6537
|
-
onOpenChange:
|
6377
|
+
onOpenChange: onChange
|
6538
6378
|
}), trigger && /*#__PURE__*/React.createElement(Trigger$5, {
|
6539
6379
|
ref: ref
|
6540
6380
|
}, trigger), children));
|
6541
6381
|
});
|
6542
6382
|
Menu$1.Trigger = Trigger$5;
|
6543
|
-
Menu$1.Content = Content$
|
6383
|
+
Menu$1.Content = Content$7;
|
6544
6384
|
Menu$1.Item = Item$1;
|
6545
6385
|
Menu$1.Link = Link;
|
6546
6386
|
Menu$1.Checkbox = Checkbox$1;
|
@@ -7200,34 +7040,285 @@ const Pagination = /*#__PURE__*/React.forwardRef(function Pagination(props, ref)
|
|
7200
7040
|
})));
|
7201
7041
|
});
|
7202
7042
|
|
7203
|
-
const Progress = ({
|
7204
|
-
duration = undefined,
|
7043
|
+
const Progress = ({
|
7044
|
+
duration = undefined,
|
7045
|
+
...props
|
7046
|
+
}) => {
|
7047
|
+
let style;
|
7048
|
+
if (duration) {
|
7049
|
+
style = {
|
7050
|
+
animationDuration: `${duration}ms`
|
7051
|
+
};
|
7052
|
+
}
|
7053
|
+
const className = cn('bg-grey-light rounded block h-1 overflow-hidden w-full', props.className);
|
7054
|
+
const progressClassName = cn('yt-progress__bar block h-1', {
|
7055
|
+
"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,
|
7056
|
+
[`w-0 bg-grey-dark animate-[progress_linear]`]: duration
|
7057
|
+
});
|
7058
|
+
return /*#__PURE__*/React__default.createElement("span", Object.assign({}, props, {
|
7059
|
+
"data-taco": "progress",
|
7060
|
+
className: className
|
7061
|
+
}), /*#__PURE__*/React__default.createElement("span", {
|
7062
|
+
className: progressClassName,
|
7063
|
+
"data-taco": "progress-bar",
|
7064
|
+
style: style
|
7065
|
+
}));
|
7066
|
+
};
|
7067
|
+
|
7068
|
+
const getBadgeIcon = type => {
|
7069
|
+
const css = 'rounded-full flex-shrink-0 mr-2 mt-1 self-start';
|
7070
|
+
switch (type) {
|
7071
|
+
case 'success':
|
7072
|
+
return /*#__PURE__*/React__default.createElement(Icon, {
|
7073
|
+
name: "tick",
|
7074
|
+
className: cn(css, 'yt-green-solid ')
|
7075
|
+
});
|
7076
|
+
case 'warning':
|
7077
|
+
return /*#__PURE__*/React__default.createElement(Icon, {
|
7078
|
+
name: "warning",
|
7079
|
+
className: cn(css, 'yt-yellow-solid')
|
7080
|
+
});
|
7081
|
+
case 'error':
|
7082
|
+
return /*#__PURE__*/React__default.createElement(Icon, {
|
7083
|
+
name: "warning",
|
7084
|
+
className: cn(css, 'yt-red-solid')
|
7085
|
+
});
|
7086
|
+
case 'information':
|
7087
|
+
return /*#__PURE__*/React__default.createElement(Icon, {
|
7088
|
+
name: "info",
|
7089
|
+
className: cn(css, 'yt-blue-solid')
|
7090
|
+
});
|
7091
|
+
case 'loading':
|
7092
|
+
return /*#__PURE__*/React__default.createElement(Spinner$1, {
|
7093
|
+
delay: 0,
|
7094
|
+
className: cn(css, 'h-6 w-6')
|
7095
|
+
});
|
7096
|
+
default:
|
7097
|
+
return null;
|
7098
|
+
}
|
7099
|
+
};
|
7100
|
+
|
7101
|
+
const Toast = ({
|
7102
|
+
content,
|
7103
|
+
lastUpdated,
|
7104
|
+
onClose: handleClose,
|
7105
|
+
options,
|
7106
|
+
...props
|
7107
|
+
}) => {
|
7108
|
+
const {
|
7109
|
+
texts
|
7110
|
+
} = useLocalization();
|
7111
|
+
const {
|
7112
|
+
autoClose,
|
7113
|
+
type = 'default'
|
7114
|
+
} = options;
|
7115
|
+
const className = cn('bg-white relative flex items-center py-1 px-2 mt-3 w-full rounded yt-shadow', {
|
7116
|
+
'border border-grey': type === 'default' || type === 'loading' || !type,
|
7117
|
+
'border border-grey-darker': type === 'success',
|
7118
|
+
'border border-blue': type === 'information',
|
7119
|
+
'border border-yellow-dark': type === 'warning',
|
7120
|
+
'border border-red': type === 'error'
|
7121
|
+
});
|
7122
|
+
const timer = useTimer(autoClose, handleClose);
|
7123
|
+
const controls = framerMotion.useAnimation();
|
7124
|
+
if (!content) {
|
7125
|
+
console.warn(`Toast requires 'content' property, which can't be empty string, null or undefined. Current content value is set to ${content === '' ? 'empty string' : content}.`);
|
7126
|
+
}
|
7127
|
+
React__default.useEffect(() => {
|
7128
|
+
if (autoClose) {
|
7129
|
+
timer.start();
|
7130
|
+
}
|
7131
|
+
}, [autoClose]);
|
7132
|
+
const triggerUpdateAnimation = function () {
|
7133
|
+
try {
|
7134
|
+
return Promise.resolve(controls.start({
|
7135
|
+
scale: 1.05
|
7136
|
+
})).then(function () {
|
7137
|
+
return Promise.resolve(controls.start({
|
7138
|
+
scale: 1
|
7139
|
+
})).then(function () {});
|
7140
|
+
});
|
7141
|
+
} catch (e) {
|
7142
|
+
return Promise.reject(e);
|
7143
|
+
}
|
7144
|
+
};
|
7145
|
+
React__default.useEffect(() => {
|
7146
|
+
if (lastUpdated) {
|
7147
|
+
triggerUpdateAnimation();
|
7148
|
+
if (timer.running) {
|
7149
|
+
timer.start();
|
7150
|
+
}
|
7151
|
+
}
|
7152
|
+
}, [lastUpdated]);
|
7153
|
+
return /*#__PURE__*/React__default.createElement(framerMotion.motion.div, Object.assign({}, props, {
|
7154
|
+
animate: controls,
|
7155
|
+
className: className,
|
7156
|
+
"data-taco": "toast",
|
7157
|
+
onMouseEnter: timer.pause,
|
7158
|
+
onMouseLeave: timer.resume
|
7159
|
+
}), getBadgeIcon(type), /*#__PURE__*/React__default.createElement("div", {
|
7160
|
+
className: "flex-grow"
|
7161
|
+
}, content), /*#__PURE__*/React__default.createElement(IconButton, {
|
7162
|
+
appearance: "discrete",
|
7163
|
+
className: "text-grey-darkest -mr-2 cursor-pointer self-start !px-0",
|
7164
|
+
icon: "close",
|
7165
|
+
"aria-label": texts.toasts.dismiss,
|
7166
|
+
onClick: handleClose
|
7167
|
+
}));
|
7168
|
+
};
|
7169
|
+
|
7170
|
+
const DEFAULT_AUTO_CLOSE_TIMEOUT = 7500;
|
7171
|
+
const ToastContext = /*#__PURE__*/React.createContext({});
|
7172
|
+
const insertToastWithoutDuplicates = (currentToasts, id, content, options, close) => {
|
7173
|
+
const nextToasts = [...currentToasts];
|
7174
|
+
const existingToastIndex = currentToasts.findIndex(toast => JSON.stringify(toast.content) === JSON.stringify(content));
|
7175
|
+
if (existingToastIndex > -1) {
|
7176
|
+
nextToasts[existingToastIndex].lastDuplicateId = id;
|
7177
|
+
nextToasts[existingToastIndex].lastUpdated = Date.now();
|
7178
|
+
} else {
|
7179
|
+
nextToasts.push({
|
7180
|
+
id,
|
7181
|
+
content: typeof content === 'function' ? content(close) : content,
|
7182
|
+
options
|
7183
|
+
});
|
7184
|
+
}
|
7185
|
+
return nextToasts;
|
7186
|
+
};
|
7187
|
+
const ToastProvider = ({
|
7188
|
+
children,
|
7205
7189
|
...props
|
7206
7190
|
}) => {
|
7207
|
-
|
7208
|
-
|
7209
|
-
|
7210
|
-
|
7191
|
+
const [toasts, setToasts] = React.useState([]);
|
7192
|
+
const handleClose = id => {
|
7193
|
+
setToasts(currentToasts => currentToasts.filter(toast => toast.id !== id));
|
7194
|
+
};
|
7195
|
+
// memoize (useCallback) this function,
|
7196
|
+
// it is the value of the context provider and we don't want it to trigger state tree re-renders on provider children
|
7197
|
+
const toaster = React.useCallback((content, options) => {
|
7198
|
+
const id = uuid.v4();
|
7199
|
+
const close = () => handleClose(id);
|
7200
|
+
setToasts(currentToasts => insertToastWithoutDuplicates(currentToasts, id, content, options, close));
|
7201
|
+
const update = (content, options) => {
|
7202
|
+
setToasts(currentToasts => {
|
7203
|
+
const nextToasts = currentToasts.filter(toast => {
|
7204
|
+
if (toast.lastDuplicateId) {
|
7205
|
+
return toast.lastDuplicateId !== id;
|
7206
|
+
}
|
7207
|
+
return toast.id !== id;
|
7208
|
+
});
|
7209
|
+
return insertToastWithoutDuplicates(nextToasts, uuid.v4(), content, options, close);
|
7210
|
+
});
|
7211
7211
|
};
|
7212
|
-
|
7213
|
-
|
7214
|
-
|
7215
|
-
|
7216
|
-
|
7217
|
-
|
7218
|
-
|
7219
|
-
|
7220
|
-
|
7221
|
-
|
7222
|
-
|
7223
|
-
|
7224
|
-
|
7225
|
-
|
7212
|
+
const success = (content, options) => {
|
7213
|
+
update(content, {
|
7214
|
+
autoClose: DEFAULT_AUTO_CLOSE_TIMEOUT,
|
7215
|
+
...options,
|
7216
|
+
type: 'success'
|
7217
|
+
});
|
7218
|
+
};
|
7219
|
+
const error = (content, options) => {
|
7220
|
+
update(content, {
|
7221
|
+
...options,
|
7222
|
+
type: 'error'
|
7223
|
+
});
|
7224
|
+
};
|
7225
|
+
const warning = (content, options) => {
|
7226
|
+
update(content, {
|
7227
|
+
...options,
|
7228
|
+
type: 'warning'
|
7229
|
+
});
|
7230
|
+
};
|
7231
|
+
const information = (content, options) => {
|
7232
|
+
update(content, {
|
7233
|
+
...options,
|
7234
|
+
type: 'information'
|
7235
|
+
});
|
7236
|
+
};
|
7237
|
+
const loading = (content, options) => {
|
7238
|
+
update(content, {
|
7239
|
+
...options,
|
7240
|
+
type: 'loading'
|
7241
|
+
});
|
7242
|
+
};
|
7243
|
+
return {
|
7244
|
+
success,
|
7245
|
+
error,
|
7246
|
+
warning,
|
7247
|
+
information,
|
7248
|
+
loading,
|
7249
|
+
close
|
7250
|
+
};
|
7251
|
+
}, []);
|
7252
|
+
// no need to rebind these every render, do them once in an effect
|
7253
|
+
React.useEffect(() => {
|
7254
|
+
toaster.success = (content, options) => toaster(content, {
|
7255
|
+
autoClose: DEFAULT_AUTO_CLOSE_TIMEOUT,
|
7256
|
+
...options,
|
7257
|
+
type: 'success'
|
7258
|
+
});
|
7259
|
+
toaster.error = (content, options) => toaster(content, {
|
7260
|
+
...options,
|
7261
|
+
type: 'error'
|
7262
|
+
});
|
7263
|
+
toaster.warning = (content, options) => toaster(content, {
|
7264
|
+
...options,
|
7265
|
+
type: 'warning'
|
7266
|
+
});
|
7267
|
+
toaster.information = (content, options) => toaster(content, {
|
7268
|
+
...options,
|
7269
|
+
type: 'information'
|
7270
|
+
});
|
7271
|
+
toaster.loading = (content, options) => toaster(content, {
|
7272
|
+
...options,
|
7273
|
+
type: 'loading'
|
7274
|
+
});
|
7275
|
+
}, []);
|
7276
|
+
return /*#__PURE__*/React.createElement(ToastContext.Provider, Object.assign({}, props, {
|
7277
|
+
value: toaster
|
7278
|
+
}), children, /*#__PURE__*/React.createElement("div", {
|
7279
|
+
id: "yt-toast__container",
|
7280
|
+
className: "pointer-events-all absolute bottom-0 right-0 !left-auto z-[1000] mb-4 mr-4 flex max-w-md flex-col items-end justify-end",
|
7281
|
+
role: "log"
|
7282
|
+
}, /*#__PURE__*/React.createElement(framerMotion.AnimatePresence, {
|
7283
|
+
initial: false
|
7284
|
+
}, toasts.map(toast => /*#__PURE__*/React.createElement(framerMotion.motion.div, {
|
7285
|
+
key: toast.id,
|
7286
|
+
transition: {
|
7287
|
+
type: 'spring',
|
7288
|
+
damping: 20,
|
7289
|
+
stiffness: 300
|
7290
|
+
},
|
7291
|
+
initial: {
|
7292
|
+
opacity: 0,
|
7293
|
+
y: 10,
|
7294
|
+
scale: 0.5
|
7295
|
+
},
|
7296
|
+
animate: {
|
7297
|
+
opacity: 1,
|
7298
|
+
y: 0,
|
7299
|
+
scale: 1
|
7300
|
+
},
|
7301
|
+
exit: {
|
7302
|
+
opacity: 0,
|
7303
|
+
scale: 0.5,
|
7304
|
+
transition: {
|
7305
|
+
duration: 0.2
|
7306
|
+
}
|
7307
|
+
}
|
7308
|
+
}, /*#__PURE__*/React.createElement(Toast, Object.assign({}, toast, {
|
7309
|
+
onClose: () => handleClose(toast.id)
|
7310
|
+
})))))));
|
7226
7311
|
};
|
7312
|
+
const useToast = () => React.useContext(ToastContext);
|
7227
7313
|
|
7228
|
-
|
7229
|
-
const
|
7230
|
-
|
7314
|
+
const Provider = props => {
|
7315
|
+
const {
|
7316
|
+
children,
|
7317
|
+
localization
|
7318
|
+
} = props;
|
7319
|
+
return /*#__PURE__*/React.createElement(LocalizationProvider, {
|
7320
|
+
localization: localization
|
7321
|
+
}, /*#__PURE__*/React.createElement(TooltipPrimitive.Provider, null, /*#__PURE__*/React.createElement(ToastProvider, null, children)));
|
7231
7322
|
};
|
7232
7323
|
|
7233
7324
|
const isAriaSelectionKey = event => {
|
@@ -7970,7 +8061,7 @@ const Button$2 = /*#__PURE__*/React__default.forwardRef(function Select2TriggerB
|
|
7970
8061
|
type: "button"
|
7971
8062
|
}), children, /*#__PURE__*/React__default.createElement(Icon, {
|
7972
8063
|
name: open ? 'chevron-up' : 'chevron-down',
|
7973
|
-
className: "-mr-1 ml-auto"
|
8064
|
+
className: "pointer-events-none -mr-1 ml-auto"
|
7974
8065
|
}));
|
7975
8066
|
});
|
7976
8067
|
const Single = /*#__PURE__*/React__default.forwardRef(function Select2TriggerSingle(props, ref) {
|
@@ -8021,22 +8112,12 @@ const Multiple = /*#__PURE__*/React__default.forwardRef(function Select2TriggerM
|
|
8021
8112
|
setValue,
|
8022
8113
|
tags
|
8023
8114
|
} = useSelect2Context();
|
8024
|
-
const contentRef = React__default.useRef(null);
|
8025
|
-
const createClickHandler = tagValue => event => {
|
8026
|
-
event === null || event === void 0 ? void 0 : event.stopPropagation();
|
8027
|
-
event === null || event === void 0 ? void 0 : event.preventDefault();
|
8028
|
-
if (!disabled && !readOnly) {
|
8029
|
-
setValue(tagValue);
|
8030
|
-
}
|
8031
|
-
};
|
8032
8115
|
const valuesAsChildren = values.map(value => children.find(c => c.props.value === value));
|
8116
|
+
let content;
|
8117
|
+
let className = buttonProps.className;
|
8033
8118
|
if (open) {
|
8034
|
-
|
8035
|
-
|
8036
|
-
}, /*#__PURE__*/React__default.createElement(Button$2, Object.assign({}, buttonProps, {
|
8037
|
-
className: cn('absolute z-20', buttonProps.className),
|
8038
|
-
ref: ref
|
8039
|
-
}), /*#__PURE__*/React__default.createElement(ScrollArea, {
|
8119
|
+
className = cn('absolute z-20', buttonProps.className);
|
8120
|
+
content = /*#__PURE__*/React__default.createElement(ScrollArea, {
|
8040
8121
|
className: "my-1 flex max-h-[5.5rem] flex-col"
|
8041
8122
|
}, /*#__PURE__*/React__default.createElement("span", {
|
8042
8123
|
className: "flex flex-wrap gap-1"
|
@@ -8046,18 +8127,54 @@ const Multiple = /*#__PURE__*/React__default.forwardRef(function Select2TriggerM
|
|
8046
8127
|
color: tags ? child.props.color : undefined,
|
8047
8128
|
disabled: disabled,
|
8048
8129
|
icon: child.props.icon,
|
8049
|
-
onDelete:
|
8130
|
+
onDelete: event => {
|
8131
|
+
event === null || event === void 0 ? void 0 : event.stopPropagation();
|
8132
|
+
event === null || event === void 0 ? void 0 : event.preventDefault();
|
8133
|
+
if (!disabled && !readOnly) {
|
8134
|
+
setValue(child.props.value);
|
8135
|
+
}
|
8136
|
+
},
|
8050
8137
|
readOnly: readOnly
|
8051
|
-
}, child.props.children))))
|
8138
|
+
}, child.props.children))));
|
8139
|
+
} else {
|
8140
|
+
content = /*#__PURE__*/React__default.createElement(MultipleValue, {
|
8141
|
+
key: String(open),
|
8142
|
+
valuesAsChildren: valuesAsChildren
|
8143
|
+
});
|
8052
8144
|
}
|
8053
|
-
|
8054
|
-
|
8145
|
+
return /*#__PURE__*/React__default.createElement("span", {
|
8146
|
+
className: cn({
|
8147
|
+
'relative h-8': open
|
8148
|
+
})
|
8149
|
+
}, /*#__PURE__*/React__default.createElement(Button$2, Object.assign({}, buttonProps, {
|
8150
|
+
className: className,
|
8055
8151
|
ref: ref
|
8056
|
-
}),
|
8152
|
+
}), content));
|
8153
|
+
});
|
8154
|
+
const MultipleValue = ({
|
8155
|
+
valuesAsChildren
|
8156
|
+
}) => {
|
8157
|
+
const {
|
8158
|
+
disabled,
|
8159
|
+
open,
|
8160
|
+
readOnly,
|
8161
|
+
setValue,
|
8162
|
+
tags
|
8163
|
+
} = useSelect2Context();
|
8164
|
+
const [contentRef, setContentRef] = React__default.useState(null);
|
8165
|
+
const boundaryIndex = contentRef ? getIndexOfFirstChildOverflowingParent(contentRef, 30) : undefined;
|
8166
|
+
const createClickHandler = tagValue => event => {
|
8167
|
+
event === null || event === void 0 ? void 0 : event.stopPropagation();
|
8168
|
+
event === null || event === void 0 ? void 0 : event.preventDefault();
|
8169
|
+
if (!disabled && !readOnly) {
|
8170
|
+
setValue(tagValue);
|
8171
|
+
}
|
8172
|
+
};
|
8173
|
+
return /*#__PURE__*/React__default.createElement("span", {
|
8057
8174
|
className: "relative flex items-center gap-1 overflow-hidden"
|
8058
8175
|
}, /*#__PURE__*/React__default.createElement("span", {
|
8059
8176
|
className: "flex gap-1 truncate",
|
8060
|
-
ref:
|
8177
|
+
ref: el => setContentRef(el)
|
8061
8178
|
}, valuesAsChildren.map((child, index) => {
|
8062
8179
|
const tag = /*#__PURE__*/React__default.createElement(Tag$1, {
|
8063
8180
|
key: child.props.value,
|
@@ -8082,8 +8199,8 @@ const Multiple = /*#__PURE__*/React__default.forwardRef(function Select2TriggerM
|
|
8082
8199
|
title: valuesAsChildren.slice(boundaryIndex + 1).map(child => child ? String(child.props.children) : '').join(', ')
|
8083
8200
|
}, /*#__PURE__*/React__default.createElement(Badge, {
|
8084
8201
|
className: "flex-shrink-0"
|
8085
|
-
}, "+", valuesAsChildren.length - (boundaryIndex + 1))) : null)
|
8086
|
-
}
|
8202
|
+
}, "+", valuesAsChildren.length - (boundaryIndex + 1))) : null);
|
8203
|
+
};
|
8087
8204
|
const matchesValue = value => child => {
|
8088
8205
|
if (Array.isArray(value)) {
|
8089
8206
|
return value.includes(child.props.value);
|
@@ -8233,14 +8350,15 @@ const useChildren = ({
|
|
8233
8350
|
const [searchQuery, setSearchQuery] = React__default.useState('');
|
8234
8351
|
// support empty value - probably a more elegant way to achieve this
|
8235
8352
|
const allChildren = React__default.useMemo(() => {
|
8353
|
+
const initial = initialChildren || [];
|
8236
8354
|
if (emptyValue !== undefined) {
|
8237
8355
|
return [/*#__PURE__*/React__default.createElement(Option$1, {
|
8238
8356
|
key: "__empty",
|
8239
8357
|
children: "",
|
8240
8358
|
value: emptyValue
|
8241
|
-
}), ...
|
8359
|
+
}), ...initial];
|
8242
8360
|
}
|
8243
|
-
return
|
8361
|
+
return initial;
|
8244
8362
|
}, [initialChildren, emptyValue]);
|
8245
8363
|
// set an initial value if none is set, we have to trigger state updates for controlled components
|
8246
8364
|
React__default.useEffect(() => {
|
@@ -8346,12 +8464,6 @@ const Collection = props => {
|
|
8346
8464
|
const {
|
8347
8465
|
children
|
8348
8466
|
} = props;
|
8349
|
-
if (!children.length) {
|
8350
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
8351
|
-
className: "text-grey-darkest -mt-0.5 flex h-8 items-center px-2",
|
8352
|
-
role: "presentation"
|
8353
|
-
}, "No results found...");
|
8354
|
-
}
|
8355
8467
|
return /*#__PURE__*/React__default.createElement(ScrollArea, {
|
8356
8468
|
className: "flex max-h-[10.25rem] w-full flex-col gap-y-0.5 px-1.5"
|
8357
8469
|
}, children);
|
@@ -8461,8 +8573,7 @@ const Select2 = /*#__PURE__*/React__default.forwardRef(function Select2(props, r
|
|
8461
8573
|
value: value
|
8462
8574
|
}), /*#__PURE__*/React__default.createElement(PopoverPrimitive.Trigger, {
|
8463
8575
|
asChild: true,
|
8464
|
-
"data-taco": "Select2"
|
8465
|
-
type: undefined
|
8576
|
+
"data-taco": "Select2"
|
8466
8577
|
}, /*#__PURE__*/React__default.createElement(Trigger$6, Object.assign({}, otherProps, {
|
8467
8578
|
"aria-haspopup": "listbox",
|
8468
8579
|
children: allChildren,
|
@@ -8490,10 +8601,13 @@ const Select2 = /*#__PURE__*/React__default.forwardRef(function Select2(props, r
|
|
8490
8601
|
style: {
|
8491
8602
|
minWidth: dimensions !== null && dimensions !== void 0 && dimensions.width ? `${dimensions.width}px` : undefined
|
8492
8603
|
}
|
8493
|
-
}, !disableSearch ? /*#__PURE__*/React__default.createElement(Search$1, {
|
8604
|
+
}, !disableSearch && (allChildren.length > 0 || onCreate) ? /*#__PURE__*/React__default.createElement(Search$1, {
|
8494
8605
|
placeholder: onCreate ? texts.select2.searchOrCreate : texts.select2.search,
|
8495
8606
|
ref: searchRef
|
8496
|
-
}) : null, /*#__PURE__*/React__default.createElement(
|
8607
|
+
}) : null, allChildren.length <= 0 ? /*#__PURE__*/React__default.createElement("div", {
|
8608
|
+
className: "text-grey-darkest -mt-0.5 flex h-8 items-center px-2",
|
8609
|
+
role: "presentation"
|
8610
|
+
}, "No results found...") : /*#__PURE__*/React__default.createElement(Root$1, {
|
8497
8611
|
className: "flex flex-col gap-0.5",
|
8498
8612
|
customSelector: ":scope > button",
|
8499
8613
|
disabled: disabled,
|
@@ -9711,7 +9825,11 @@ const Table = /*#__PURE__*/React__default.forwardRef(function Table(props, ref)
|
|
9711
9825
|
instance: instance,
|
9712
9826
|
headerGroups: tableProps.headerGroups
|
9713
9827
|
}));
|
9714
|
-
}) :
|
9828
|
+
}) : /*#__PURE__*/React__default.createElement("div", {
|
9829
|
+
role: "row"
|
9830
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
9831
|
+
role: "gridcell"
|
9832
|
+
}, emptyStateRenderer()))), paginationElement);
|
9715
9833
|
});
|
9716
9834
|
Table.Column = () => null;
|
9717
9835
|
Table.Group = () => null;
|
@@ -10117,25 +10235,36 @@ const Switch = /*#__PURE__*/React.forwardRef(function Switch(props, ref) {
|
|
10117
10235
|
onChange,
|
10118
10236
|
...otherProps
|
10119
10237
|
} = props;
|
10238
|
+
const id = useId(props.id);
|
10120
10239
|
const className = cn('group h-5 w-9 flex flex-shrink-0 rounded-full inline-flex', {
|
10121
10240
|
'mr-2': !!label,
|
10122
10241
|
'bg-grey-darker hover:bg-grey-dark aria-checked:bg-blue aria-checked:hover:bg-blue-light focus:yt-focus': !props.disabled,
|
10123
10242
|
'bg-grey-light cursor-not-allowed aria-checked:bg-blue-light': props.disabled
|
10124
10243
|
}, props.className);
|
10125
|
-
|
10244
|
+
let labelledByProps = null;
|
10245
|
+
if (label) {
|
10246
|
+
labelledByProps = {
|
10247
|
+
['aria-labelledby']: `${id}-label`,
|
10248
|
+
id
|
10249
|
+
};
|
10250
|
+
}
|
10251
|
+
const element = /*#__PURE__*/React.createElement(PrimitiveSwitch.Root, Object.assign({}, otherProps, labelledByProps, {
|
10126
10252
|
className: className,
|
10127
10253
|
onCheckedChange: onChange,
|
10128
10254
|
ref: ref
|
10129
10255
|
}), /*#__PURE__*/React.createElement(PrimitiveSwitch.Thumb, {
|
10130
|
-
className: "'will-change-transform
|
10256
|
+
className: "'will-change-transform mt-0.5 h-4 w-4 translate-x-[0.15rem] rounded-full bg-white transition-transform group-disabled:opacity-50 group-aria-checked:translate-x-[1.1rem]"
|
10131
10257
|
}));
|
10132
10258
|
if (label) {
|
10133
|
-
const
|
10259
|
+
const labelContainerClassName = cn('flex self-start cursor-pointer', {
|
10134
10260
|
'cursor-not-allowed text-grey-dark': props.disabled
|
10135
10261
|
});
|
10136
|
-
return /*#__PURE__*/React.createElement("
|
10137
|
-
className:
|
10138
|
-
}, element, label
|
10262
|
+
return /*#__PURE__*/React.createElement("span", {
|
10263
|
+
className: labelContainerClassName
|
10264
|
+
}, element, /*#__PURE__*/React.createElement("label", {
|
10265
|
+
htmlFor: id,
|
10266
|
+
id: `${id}-label`
|
10267
|
+
}, label));
|
10139
10268
|
}
|
10140
10269
|
return element;
|
10141
10270
|
});
|
@@ -10285,43 +10414,6 @@ const useOnClickOutside = (ref, callback) => {
|
|
10285
10414
|
}, [ref, callback]);
|
10286
10415
|
};
|
10287
10416
|
|
10288
|
-
const Content$7 = /*#__PURE__*/React.forwardRef(function CardContent(externalProps, ref) {
|
10289
|
-
const {
|
10290
|
-
noPadding,
|
10291
|
-
...props
|
10292
|
-
} = externalProps;
|
10293
|
-
const className = cn('flex-grow overflow-auto', {
|
10294
|
-
'mx-4 mb-4': !noPadding
|
10295
|
-
}, props.className);
|
10296
|
-
return /*#__PURE__*/React.createElement("div", Object.assign({}, props, {
|
10297
|
-
className: className,
|
10298
|
-
ref: ref
|
10299
|
-
}));
|
10300
|
-
});
|
10301
|
-
const Card = /*#__PURE__*/React.forwardRef(function Card(props, ref) {
|
10302
|
-
const {
|
10303
|
-
title,
|
10304
|
-
menu,
|
10305
|
-
children
|
10306
|
-
} = props;
|
10307
|
-
const className = cn('bg-white flex flex-col rounded-xl shadow-[0px_0px_1px_rgba(0,0,0,0.1),0px_6px_18px_rgba(47,51,68,0.2)]', props.className);
|
10308
|
-
return /*#__PURE__*/React.createElement("div", {
|
10309
|
-
className: className,
|
10310
|
-
"data-taco": "card",
|
10311
|
-
ref: ref
|
10312
|
-
}, /*#__PURE__*/React.createElement("div", {
|
10313
|
-
className: "mx-4 mt-4 mb-2 flex"
|
10314
|
-
}, title && /*#__PURE__*/React.createElement("h4", {
|
10315
|
-
className: "mb-0 flex-grow text-left"
|
10316
|
-
}, title), menu ? /*#__PURE__*/React.createElement(IconButton, {
|
10317
|
-
icon: "ellipsis-horizontal",
|
10318
|
-
appearance: "discrete",
|
10319
|
-
menu: menu,
|
10320
|
-
className: "-mt-[4px]"
|
10321
|
-
}) : null), children);
|
10322
|
-
});
|
10323
|
-
Card.Content = Content$7;
|
10324
|
-
|
10325
10417
|
exports.Accordion = Accordion;
|
10326
10418
|
exports.AlertDialog = AlertDialog;
|
10327
10419
|
exports.Backdrop = Backdrop;
|
@@ -10344,6 +10436,8 @@ exports.Icon = Icon;
|
|
10344
10436
|
exports.IconButton = IconButton;
|
10345
10437
|
exports.Input = Input;
|
10346
10438
|
exports.Listbox = Listbox;
|
10439
|
+
exports.LocalizationContext = LocalizationContext;
|
10440
|
+
exports.LocalizationProvider = LocalizationProvider;
|
10347
10441
|
exports.Menu = Menu$1;
|
10348
10442
|
exports.MultiListbox = MultiListbox;
|
10349
10443
|
exports.Navigation = Navigation;
|
@@ -10395,6 +10489,5 @@ exports.useOnClickOutside = useOnClickOutside;
|
|
10395
10489
|
exports.usePagination = usePagination;
|
10396
10490
|
exports.useRadioGroup = useRadioGroup;
|
10397
10491
|
exports.useTableRowCreation = useTableRowCreation;
|
10398
|
-
exports.useTaco = useTaco;
|
10399
10492
|
exports.useToast = useToast;
|
10400
10493
|
//# sourceMappingURL=taco.cjs.development.js.map
|