@cube-dev/ui-kit 0.203.0 → 0.204.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/dist/CHANGELOG.md +6 -0
- package/dist/_internal/hooks/use-debounced-value.js +1 -1
- package/dist/_internal/hooks/use-deprecation-warning.js +1 -1
- package/dist/_internal/hooks/use-event.js +1 -1
- package/dist/_internal/hooks/use-is-first-render.js +1 -1
- package/dist/_internal/hooks/use-sync-ref.js +1 -1
- package/dist/_internal/hooks/use-timer/timer.js +1 -1
- package/dist/_internal/hooks/use-timer/use-timer.js +1 -1
- package/dist/_internal/hooks/use-warn.js +1 -1
- package/dist/components/Block.js +1 -1
- package/dist/components/CollectionItem.js +1 -1
- package/dist/components/GlobalStyles.js +1 -1
- package/dist/components/GridProvider.js +1 -1
- package/dist/components/HiddenInput.js +1 -1
- package/dist/components/Root.js +1 -1
- package/dist/components/actions/Action/Action.js +1 -1
- package/dist/components/actions/Banner/Banner.js +1 -1
- package/dist/components/actions/Button/Button.js +1 -1
- package/dist/components/actions/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/components/actions/ButtonSplit/ButtonSplit.js +1 -1
- package/dist/components/actions/ButtonSplit/context.js +1 -1
- package/dist/components/actions/CommandMenu/CommandMenu.js +1 -1
- package/dist/components/actions/CommandMenu/styled.js +1 -1
- package/dist/components/actions/ItemAction/ItemAction.js +1 -1
- package/dist/components/actions/ItemActionContext.js +1 -1
- package/dist/components/actions/ItemActionsWrapper.js +1 -1
- package/dist/components/actions/ItemButton/ItemButton.js +1 -1
- package/dist/components/actions/Link/Link.js +1 -1
- package/dist/components/actions/Menu/Menu.js +1 -1
- package/dist/components/actions/Menu/MenuCollectionItem.js +1 -1
- package/dist/components/actions/Menu/MenuItem.js +1 -1
- package/dist/components/actions/Menu/MenuSection.js +1 -1
- package/dist/components/actions/Menu/MenuTrigger.js +1 -1
- package/dist/components/actions/Menu/SubMenuTrigger.js +1 -1
- package/dist/components/actions/Menu/SubmenuTriggerContext.js +1 -1
- package/dist/components/actions/Menu/context.js +1 -1
- package/dist/components/actions/Menu/styled.js +1 -1
- package/dist/components/actions/actions-run.js +1 -1
- package/dist/components/actions/index.js +1 -1
- package/dist/components/actions/use-action.js +1 -1
- package/dist/components/actions/use-anchored-menu.js +1 -1
- package/dist/components/actions/use-context-menu.js +1 -1
- package/dist/components/content/ActiveZone/ActiveZone.js +1 -1
- package/dist/components/content/Alert/Alert.js +1 -1
- package/dist/components/content/Alert/use-alert.js +1 -1
- package/dist/components/content/Avatar/Avatar.js +1 -1
- package/dist/components/content/Badge/Badge.js +1 -1
- package/dist/components/content/Card/Card.js +1 -1
- package/dist/components/content/Content.js +1 -1
- package/dist/components/content/CopyPasteBlock/CopyPasteBlock.js +1 -1
- package/dist/components/content/CopySnippet/CopySnippet.js +1 -1
- package/dist/components/content/Disclosure/Disclosure.js +1 -1
- package/dist/components/content/Divider/Divider.js +1 -1
- package/dist/components/content/Footer.js +1 -1
- package/dist/components/content/Header.js +1 -1
- package/dist/components/content/HotKeys/HotKeys.js +1 -1
- package/dist/components/content/InfoBadge/InfoBadge.js +1 -1
- package/dist/components/content/InlineInput/InlineInput.js +1 -1
- package/dist/components/content/Item/Item.js +1 -1
- package/dist/components/content/Item/ItemWithNativeLinks.js +1 -1
- package/dist/components/content/ItemBadge/ItemBadge.js +1 -1
- package/dist/components/content/ItemCard/ItemCard.js +1 -1
- package/dist/components/content/Layout/GridLayout.js +1 -1
- package/dist/components/content/Layout/Layout.js +1 -1
- package/dist/components/content/Layout/LayoutBlock.js +1 -1
- package/dist/components/content/Layout/LayoutCenter.js +1 -1
- package/dist/components/content/Layout/LayoutContainer.js +1 -1
- package/dist/components/content/Layout/LayoutContent.js +1 -1
- package/dist/components/content/Layout/LayoutContext.js +1 -1
- package/dist/components/content/Layout/LayoutFlex.js +1 -1
- package/dist/components/content/Layout/LayoutFooter.js +1 -1
- package/dist/components/content/Layout/LayoutGrid.js +1 -1
- package/dist/components/content/Layout/LayoutHeader.js +1 -1
- package/dist/components/content/Layout/LayoutPane.js +1 -1
- package/dist/components/content/Layout/LayoutPanel.js +2 -2
- package/dist/components/content/Layout/LayoutPanelHeader.js +1 -1
- package/dist/components/content/Layout/LayoutPanelTransition.js +1 -1
- package/dist/components/content/Layout/LayoutToolbar.js +1 -1
- package/dist/components/content/Layout/hooks/useTinyScrollbar.js +1 -1
- package/dist/components/content/Layout/index.js +1 -1
- package/dist/components/content/Layout/utils.js +1 -1
- package/dist/components/content/Paragraph.js +1 -1
- package/dist/components/content/Placeholder/Placeholder.js +1 -1
- package/dist/components/content/PrismCode/PrismCode.js +1 -1
- package/dist/components/content/PrismCode/prismSetup.js +1 -1
- package/dist/components/content/PrismDiffCode/PrismDiffCode.js +1 -1
- package/dist/components/content/Result/Result.js +1 -1
- package/dist/components/content/Skeleton/Skeleton.js +1 -1
- package/dist/components/content/Tag/Tag.js +1 -1
- package/dist/components/content/Text.js +1 -1
- package/dist/components/content/TextItem/TextItem.js +1 -1
- package/dist/components/content/Title.js +1 -1
- package/dist/components/content/Tree/Tree.js +1 -1
- package/dist/components/content/Tree/TreeNode.js +1 -1
- package/dist/components/content/Tree/checked-keys.js +1 -1
- package/dist/components/content/Tree/rowId.js +1 -1
- package/dist/components/content/Tree/styled.js +1 -1
- package/dist/components/content/Tree/tree-index.js +1 -1
- package/dist/components/content/Tree/use-checkbox-tree.js +1 -1
- package/dist/components/content/Tree/use-load-data.js +1 -1
- package/dist/components/content/highlightText.js +1 -1
- package/dist/components/content/use-auto-tooltip.js +1 -1
- package/dist/components/data/DataTable/DataTable.js +1 -1
- package/dist/components/data/ItemTable/ItemTable.js +1 -1
- package/dist/components/data/ItemTable/ItemTableBulkBar.js +1 -1
- package/dist/components/data/ItemTable/ItemTableDragPreview.js +1 -1
- package/dist/components/data/ItemTable/ItemTableFooter.js +1 -1
- package/dist/components/data/ItemTable/ItemTableToolbar.js +1 -1
- package/dist/components/data/ItemTable/item-table-sections.js +1 -1
- package/dist/components/data/ItemTable/use-item-table-column-widths.js +1 -1
- package/dist/components/data/ItemTable/use-item-table-drag-drop.js +1 -1
- package/dist/components/data/ItemTable/use-item-table-pagination.js +1 -1
- package/dist/components/data/ItemTable/use-item-table-selection.js +1 -1
- package/dist/components/data/ItemTable/use-item-table-sort.js +1 -1
- package/dist/components/data/ItemTable/use-item-table-tree-model.js +1 -1
- package/dist/components/data/TableBase/ColumnResizer.js +1 -1
- package/dist/components/data/TableBase/RowCollection.js +1 -1
- package/dist/components/data/TableBase/TableHeaderCell.js +1 -1
- package/dist/components/data/TableBase/TableRow.js +1 -1
- package/dist/components/data/TableBase/TableRowLink.js +1 -1
- package/dist/components/data/TableBase/TableView.js +1 -1
- package/dist/components/data/TableBase/TreeGridTable.js +1 -1
- package/dist/components/data/TableBase/column-header.js +1 -1
- package/dist/components/data/TableBase/column-menu.js +1 -1
- package/dist/components/data/TableBase/column-styles.js +1 -1
- package/dist/components/data/TableBase/column-tint.js +1 -1
- package/dist/components/data/TableBase/row-menu.js +1 -1
- package/dist/components/data/TableBase/styled.js +1 -1
- package/dist/components/data/TableBase/table-body-sections.js +1 -1
- package/dist/components/data/TableBase/table-tree.js +1 -1
- package/dist/components/data/TableBase/types.js +1 -1
- package/dist/components/data/TableBase/use-cell-selection.js +0 -0
- package/dist/components/data/TableBase/use-column-menu.js +1 -1
- package/dist/components/data/TableBase/use-column-order.js +1 -1
- package/dist/components/data/TableBase/use-column-window.js +1 -1
- package/dist/components/data/TableBase/use-container-width.js +1 -1
- package/dist/components/data/TableBase/use-row-move-animation.js +1 -1
- package/dist/components/data/TableBase/use-scrollability.js +1 -1
- package/dist/components/data/TableBase/use-table-columns.js +1 -1
- package/dist/components/data/TableBase/use-table-search.js +1 -1
- package/dist/components/data/TableBase/use-table-selection.js +1 -1
- package/dist/components/data/TableBase/use-table-sort.js +1 -1
- package/dist/components/data/TableBase/use-table-sorts.js +1 -1
- package/dist/components/data/TableBase/use-table-storage.js +1 -1
- package/dist/components/data/TableBase/use-table-tooltip-refresh.js +1 -1
- package/dist/components/data/TableBase/use-table-tree-state.js +1 -1
- package/dist/components/fields/Checkbox/Checkbox.js +1 -1
- package/dist/components/fields/Checkbox/CheckboxGroup.js +1 -1
- package/dist/components/fields/Checkbox/context.js +1 -1
- package/dist/components/fields/ColorInput/ColorInput.js +1 -1
- package/dist/components/fields/ColorPicker/ColorPicker.js +1 -1
- package/dist/components/fields/ColorSwatch/ColorSwatch.js +1 -1
- package/dist/components/fields/ColorSwatchGroup/ColorSwatchGroup.js +1 -1
- package/dist/components/fields/ComboBox/ComboBox.js +1 -1
- package/dist/components/fields/ComboBox/comboBoxOptions.js +1 -1
- package/dist/components/fields/CommandTextArea/CommandTextArea.js +1 -1
- package/dist/components/fields/CommandTextArea/caretPosition.js +1 -1
- package/dist/components/fields/CommandTextArea/useCaretAnchor.js +1 -1
- package/dist/components/fields/DatePicker/DateInput.js +1 -1
- package/dist/components/fields/DatePicker/DateInputBase.js +1 -1
- package/dist/components/fields/DatePicker/DatePicker.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerButton.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerElement.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerInput.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerSegment.js +1 -1
- package/dist/components/fields/DatePicker/DateRangePicker.js +1 -1
- package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js +1 -1
- package/dist/components/fields/DatePicker/MonthPicker.js +1 -1
- package/dist/components/fields/DatePicker/PeriodPicker.js +1 -1
- package/dist/components/fields/DatePicker/QuarterPicker.js +1 -1
- package/dist/components/fields/DatePicker/TimeInput.js +1 -1
- package/dist/components/fields/DatePicker/WeekPicker.js +1 -1
- package/dist/components/fields/DatePicker/YearPicker.js +1 -1
- package/dist/components/fields/DatePicker/parseDate.js +1 -1
- package/dist/components/fields/DatePicker/period.js +1 -1
- package/dist/components/fields/DatePicker/props.js +1 -1
- package/dist/components/fields/DatePicker/utils.js +1 -1
- package/dist/components/fields/FileInput/FileInput.js +1 -1
- package/dist/components/fields/FilterListBox/FilterListBox.js +1 -1
- package/dist/components/fields/FilterListBox/styled.js +1 -1
- package/dist/components/fields/FilterPicker/FilterPicker.js +1 -1
- package/dist/components/fields/FilterPicker/FilterTree.js +1 -1
- package/dist/components/fields/Input/Input.js +1 -1
- package/dist/components/fields/ListBox/DraggableListBox.js +1 -1
- package/dist/components/fields/ListBox/ListBox.js +1 -1
- package/dist/components/fields/ListBox/optionId.js +1 -1
- package/dist/components/fields/ListBoxPopover/ListBoxPopover.js +1 -1
- package/dist/components/fields/ListBoxPopover/listNavigation.js +1 -1
- package/dist/components/fields/ListBoxPopover/useCompositeFocus.js +1 -1
- package/dist/components/fields/NumberInput/NumberInput.js +1 -1
- package/dist/components/fields/NumberInput/StepButton.js +1 -1
- package/dist/components/fields/PasswordInput/PasswordInput.js +1 -1
- package/dist/components/fields/Picker/Picker.js +1 -1
- package/dist/components/fields/RadioGroup/Radio.js +1 -1
- package/dist/components/fields/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/fields/RadioGroup/context.js +1 -1
- package/dist/components/fields/SearchComboBox/SearchComboBox.js +1 -1
- package/dist/components/fields/SearchInput/SearchInput.js +1 -1
- package/dist/components/fields/Select/Select.js +1 -1
- package/dist/components/fields/Slider/Gradation.js +1 -1
- package/dist/components/fields/Slider/HueSlider.js +1 -1
- package/dist/components/fields/Slider/RangeSlider.js +1 -1
- package/dist/components/fields/Slider/Slider.js +1 -1
- package/dist/components/fields/Slider/SliderBase.js +1 -1
- package/dist/components/fields/Slider/SliderThumb.js +1 -1
- package/dist/components/fields/Slider/SliderTrack.js +1 -1
- package/dist/components/fields/Slider/elements.js +1 -1
- package/dist/components/fields/Slider/index.js +1 -1
- package/dist/components/fields/Switch/Switch.js +1 -1
- package/dist/components/fields/TagInput/TagInput.js +1 -1
- package/dist/components/fields/TagInput/TagList.js +1 -1
- package/dist/components/fields/TagInput/useActiveOption.js +1 -1
- package/dist/components/fields/TagInput/useTagError.js +1 -1
- package/dist/components/fields/TextArea/TextArea.js +1 -1
- package/dist/components/fields/TextInput/TextInput.js +1 -1
- package/dist/components/fields/TextInput/TextInputBase.js +1 -1
- package/dist/components/fields/TextInput/displayed-validation.js +1 -1
- package/dist/components/fields/TextInput/useAutoSizeTextArea.js +1 -1
- package/dist/components/fields/TextInputMapper/TextInputMapper.js +1 -1
- package/dist/components/fields/TriggerActions.js +1 -1
- package/dist/components/fields/color/ColorPanel.js +1 -1
- package/dist/components/fields/color/channels.js +1 -1
- package/dist/components/fields/color/color.js +1 -1
- package/dist/components/fields/color/context.js +1 -1
- package/dist/components/fields/option-origin-press.js +1 -1
- package/dist/components/form/FieldWrapper/FieldWrapper.js +1 -1
- package/dist/components/form/FieldWrapper/field-description.js +1 -1
- package/dist/components/form/Form/Field.js +1 -1
- package/dist/components/form/Form/Form.js +1 -1
- package/dist/components/form/Form/ModernFormRoot.js +1 -1
- package/dist/components/form/Form/ResetButton/ResetButton.js +1 -1
- package/dist/components/form/Form/SubmitButton/SubmitButton.js +1 -1
- package/dist/components/form/Form/SubmitError.js +1 -1
- package/dist/components/form/Form/backend.js +1 -1
- package/dist/components/form/Form/index.js +1 -1
- package/dist/components/form/Form/modern/actions.js +1 -1
- package/dist/components/form/Form/modern/context.js +1 -1
- package/dist/components/form/Form/modern/controller.js +1 -1
- package/dist/components/form/Form/modern/field-binding.js +1 -1
- package/dist/components/form/Form/modern/field.js +1 -1
- package/dist/components/form/Form/modern/react.js +1 -1
- package/dist/components/form/Form/modern/store.js +18 -2
- package/dist/components/form/Form/modern/store.js.map +1 -1
- package/dist/components/form/Form/modern/types.d.ts +5 -0
- package/dist/components/form/Form/modern/validation.js +1 -1
- package/dist/components/form/Form/modern/values.js +1 -1
- package/dist/components/form/Form/reset-unbound-controls.js +1 -1
- package/dist/components/form/Form/use-field/use-field-binding.js +1 -1
- package/dist/components/form/Form/use-field/use-field-props.js +1 -1
- package/dist/components/form/Form/use-field/use-field.js +1 -1
- package/dist/components/form/Form/use-form.js +1 -1
- package/dist/components/form/Form/validation.js +1 -1
- package/dist/components/form/Label.js +1 -1
- package/dist/components/form/field-chrome.js +1 -1
- package/dist/components/form/field-layout.js +1 -1
- package/dist/components/form/legacy-tooltip.js +1 -1
- package/dist/components/form/validation/ValidationIndicator.js +1 -1
- package/dist/components/form/validation/resolve-validation-props.js +1 -1
- package/dist/components/form/validation/use-validation-props.js +1 -1
- package/dist/components/form/wrapper.js +1 -1
- package/dist/components/helpers/DisplayTransition/DisplayTransition.js +1 -1
- package/dist/components/helpers/IconSwitch/IconSwitch.js +1 -1
- package/dist/components/layout/Flex.js +1 -1
- package/dist/components/layout/Flow.js +1 -1
- package/dist/components/layout/Grid.js +1 -1
- package/dist/components/layout/Panel.js +1 -1
- package/dist/components/layout/Prefix.js +1 -1
- package/dist/components/layout/ResizablePanel.js +1 -1
- package/dist/components/layout/Space.js +1 -1
- package/dist/components/layout/Suffix.js +1 -1
- package/dist/components/navigation/Pagination/Pagination.js +1 -1
- package/dist/components/navigation/Pagination/use-pagination.js +1 -1
- package/dist/components/navigation/Tabs/BoardDragActiveProvider.js +1 -1
- package/dist/components/navigation/Tabs/DraggableTabList.js +1 -1
- package/dist/components/navigation/Tabs/TabButton.js +1 -1
- package/dist/components/navigation/Tabs/TabDropIndicator.js +1 -1
- package/dist/components/navigation/Tabs/TabPanel.js +1 -1
- package/dist/components/navigation/Tabs/TabPicker.js +1 -1
- package/dist/components/navigation/Tabs/Tabs.js +1 -1
- package/dist/components/navigation/Tabs/TabsAction.js +1 -1
- package/dist/components/navigation/Tabs/TabsContext.js +1 -1
- package/dist/components/navigation/Tabs/popover-placement.js +1 -1
- package/dist/components/navigation/Tabs/styled.js +1 -1
- package/dist/components/navigation/Tabs/types.js +1 -1
- package/dist/components/navigation/Tabs/use-tab-editing.js +1 -1
- package/dist/components/navigation/Tabs/use-tab-indicator.js +1 -1
- package/dist/components/organisms/StatsCard/StatsCard.js +1 -1
- package/dist/components/other/Calendar/Calendar.js +1 -1
- package/dist/components/other/Calendar/CalendarCell.js +1 -1
- package/dist/components/other/Calendar/CalendarGrid.js +1 -1
- package/dist/components/other/Calendar/CalendarHeader.js +1 -1
- package/dist/components/other/Calendar/CalendarPanel.js +1 -1
- package/dist/components/other/Calendar/PeriodCalendar.js +1 -1
- package/dist/components/other/Calendar/PeriodGrid.js +1 -1
- package/dist/components/other/Calendar/RangeCalendar.js +1 -1
- package/dist/components/other/Calendar/styled.js +1 -1
- package/dist/components/other/CubeLogo/CubeLogo.js +1 -1
- package/dist/components/other/NoDataIcon/NoDataIcon.js +1 -1
- package/dist/components/overlays/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/overlays/AlertDialog/AlertDialogApiProvider.js +1 -1
- package/dist/components/overlays/AlertDialog/AlertDialogZone.js +2 -2
- package/dist/components/overlays/AlertDialog/types.d.ts +1 -1
- package/dist/components/overlays/Dialog/Dialog.js +9 -4
- package/dist/components/overlays/Dialog/Dialog.js.map +1 -1
- package/dist/components/overlays/Dialog/DialogContainer.d.ts +7 -0
- package/dist/components/overlays/Dialog/DialogContainer.js +61 -32
- package/dist/components/overlays/Dialog/DialogContainer.js.map +1 -1
- package/dist/components/overlays/Dialog/DialogForm.d.ts +7 -0
- package/dist/components/overlays/Dialog/DialogForm.js +10 -3
- package/dist/components/overlays/Dialog/DialogForm.js.map +1 -1
- package/dist/components/overlays/Dialog/DialogTrigger.d.ts +8 -0
- package/dist/components/overlays/Dialog/DialogTrigger.js +24 -11
- package/dist/components/overlays/Dialog/DialogTrigger.js.map +1 -1
- package/dist/components/overlays/Dialog/ModernDialogForm.js +213 -185
- package/dist/components/overlays/Dialog/ModernDialogForm.js.map +1 -1
- package/dist/components/overlays/Dialog/context.js +1 -1
- package/dist/components/overlays/Dialog/context.js.map +1 -1
- package/dist/components/overlays/Dialog/default-button-text.js +1 -1
- package/dist/components/overlays/Dialog/use-content-overflow.js +1 -1
- package/dist/components/overlays/Dialog/use-dialog-container.js +1 -1
- package/dist/components/overlays/Dialog/use-dialog-open-sync.js +1 -1
- package/dist/components/overlays/Dialog/use-dismiss-confirmation.js +211 -0
- package/dist/components/overlays/Dialog/use-dismiss-confirmation.js.map +1 -0
- package/dist/components/overlays/Dialog/use-retained-dialog-focus.js +1 -1
- package/dist/components/overlays/Modal/Modal.js +1 -1
- package/dist/components/overlays/Modal/OpenTransitionContext.js +1 -1
- package/dist/components/overlays/Modal/Overlay.js +1 -1
- package/dist/components/overlays/Modal/Popover.js +1 -1
- package/dist/components/overlays/Modal/Tray.js +1 -1
- package/dist/components/overlays/Modal/Underlay.js +1 -1
- package/dist/components/overlays/Modal/modal-containment.js +1 -1
- package/dist/components/overlays/Notifications/Notification.js +1 -1
- package/dist/components/overlays/Notifications/NotificationAction.js +1 -1
- package/dist/components/overlays/Notifications/NotificationCard.js +1 -1
- package/dist/components/overlays/Notifications/NotificationContext.js +1 -1
- package/dist/components/overlays/Notifications/NotificationItem.js +1 -1
- package/dist/components/overlays/Notifications/OverlayContainer.js +1 -1
- package/dist/components/overlays/Notifications/OverlayProvider.js +1 -1
- package/dist/components/overlays/Notifications/PersistentNotificationsList.js +1 -1
- package/dist/components/overlays/Notifications/dismissed-storage.js +1 -1
- package/dist/components/overlays/Notifications/format-relative-time.js +1 -1
- package/dist/components/overlays/Notifications/index.js +1 -1
- package/dist/components/overlays/Notifications/use-notification-state.js +1 -1
- package/dist/components/overlays/Notifications/use-notifications.js +1 -1
- package/dist/components/overlays/Notifications/use-overlay-timers.js +1 -1
- package/dist/components/overlays/Notifications/use-persistent-notifications.js +1 -1
- package/dist/components/overlays/Notifications/use-persistent-state.js +1 -1
- package/dist/components/overlays/Notifications/use-toast-state.js +1 -1
- package/dist/components/overlays/Toast/ToastItem.js +1 -1
- package/dist/components/overlays/Toast/index.js +1 -1
- package/dist/components/overlays/Toast/useProgressToast.js +1 -1
- package/dist/components/overlays/Toast/useToast.js +1 -1
- package/dist/components/overlays/Tooltip/Tooltip.js +1 -1
- package/dist/components/overlays/Tooltip/TooltipProvider.js +1 -1
- package/dist/components/overlays/Tooltip/TooltipTrigger.js +1 -1
- package/dist/components/overlays/Tooltip/context.js +1 -1
- package/dist/components/overlays/Tooltip/split-trigger-props.js +1 -1
- package/dist/components/portal/Portal.js +1 -1
- package/dist/components/portal/PortalProvider.js +1 -1
- package/dist/components/portal/usePortal.js +1 -1
- package/dist/components/shared/DraggableCollection.js +1 -1
- package/dist/components/shared/InvalidIcon.js +1 -1
- package/dist/components/shared/ValidIcon.js +1 -1
- package/dist/components/status/LoadingAnimation/LoadingAnimation.js +1 -1
- package/dist/components/status/Spin/Cube.js +1 -1
- package/dist/components/status/Spin/InternalSpinner.js +1 -1
- package/dist/components/status/Spin/Spin.js +1 -1
- package/dist/components/status/Spin/SpinsContainer.js +1 -1
- package/dist/data/item-themes.js +1 -1
- package/dist/data/themes.js +1 -1
- package/dist/eslint-plugin/defaults.generated.js +1 -1
- package/dist/eslint-plugin/index.js +1 -1
- package/dist/eslint-plugin/rules/no-redundant-default-prop.js +1 -1
- package/dist/i18n/I18nProvider.js +1 -1
- package/dist/i18n/createFormatter.js +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/instance.js +1 -1
- package/dist/i18n/locales/de-DE/uikit.js +10 -2
- package/dist/i18n/locales/en-US/uikit.js +10 -2
- package/dist/i18n/locales/en-US/uikit.json.d.ts +11 -4
- package/dist/i18n/locales/es-ES/uikit.js +10 -2
- package/dist/i18n/locales/es-MX/uikit.js +10 -2
- package/dist/i18n/locales/fr-FR/uikit.js +10 -2
- package/dist/i18n/locales/it-IT/uikit.js +10 -2
- package/dist/i18n/locales/ja-JP/uikit.js +10 -2
- package/dist/i18n/locales/nb-NO/uikit.js +10 -2
- package/dist/i18n/locales/pt-BR/uikit.js +10 -2
- package/dist/i18n/locales/pt-PT/uikit.js +10 -2
- package/dist/i18n/locales/sv-SE/uikit.js +10 -2
- package/dist/i18n/locales/vi-VN/uikit.js +10 -2
- package/dist/i18n/locales.js +1 -1
- package/dist/i18n/namespace.js +1 -1
- package/dist/i18n/useFormatter.js +1 -1
- package/dist/i18n/useI18n.js +1 -1
- package/dist/icons/AdjustmentsHorizontalIcon.js +1 -1
- package/dist/icons/AdjustmentsIcon.js +1 -1
- package/dist/icons/AiIcon.js +1 -1
- package/dist/icons/AreaChartIcon.js +1 -1
- package/dist/icons/ArrowNarrowDownIcon.js +1 -1
- package/dist/icons/ArrowNarrowUpIcon.js +1 -1
- package/dist/icons/BackwardIcon.js +1 -1
- package/dist/icons/BarChartIcon.js +1 -1
- package/dist/icons/BellFilledIcon.js +1 -1
- package/dist/icons/BellIcon.js +1 -1
- package/dist/icons/BooleanIcon.js +1 -1
- package/dist/icons/CalendarEditIcon.js +1 -1
- package/dist/icons/CalendarIcon.js +1 -1
- package/dist/icons/CaretDownIcon.js +1 -1
- package/dist/icons/CaretUpIcon.js +1 -1
- package/dist/icons/ChartAreaStackedIcon.js +1 -1
- package/dist/icons/ChartAreaStackedPercentageIcon.js +1 -1
- package/dist/icons/ChartBarGroupedHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarGroupedIcon.js +1 -1
- package/dist/icons/ChartBarHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarLineIcon.js +1 -1
- package/dist/icons/ChartBarStackedHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarStackedIcon.js +1 -1
- package/dist/icons/ChartBarStackedPercentageHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarStackedPercentageIcon.js +1 -1
- package/dist/icons/ChartBoxPlot2Icon.js +1 -1
- package/dist/icons/ChartBoxPlotIcon.js +1 -1
- package/dist/icons/ChartBubbleIcon.js +1 -1
- package/dist/icons/ChartDonut2Icon.js +1 -1
- package/dist/icons/ChartFunnelIcon.js +1 -1
- package/dist/icons/ChartHeatmapIcon.js +1 -1
- package/dist/icons/ChartKPIIcon.js +1 -1
- package/dist/icons/ChartPie2Icon.js +1 -1
- package/dist/icons/ChartScatterIcon.js +1 -1
- package/dist/icons/CheckCircleFilledIcon.js +1 -1
- package/dist/icons/CheckCircleIcon.js +1 -1
- package/dist/icons/CheckIcon.js +1 -1
- package/dist/icons/CircleFilledIcon.js +1 -1
- package/dist/icons/ClearIcon.js +1 -1
- package/dist/icons/CloseCircleFilledIcon.js +1 -1
- package/dist/icons/CloseCircleIcon.js +1 -1
- package/dist/icons/CloseIcon.js +1 -1
- package/dist/icons/CodeIcon.js +1 -1
- package/dist/icons/ColumnTotalIcon.js +1 -1
- package/dist/icons/CopyIcon.js +1 -1
- package/dist/icons/CountIcon.js +1 -1
- package/dist/icons/CubeIcon.js +1 -1
- package/dist/icons/CubePauseIcon.js +1 -1
- package/dist/icons/CubePlayIcon.js +1 -1
- package/dist/icons/CurrencyDollarIcon.js +1 -1
- package/dist/icons/DangerIcon.js +1 -1
- package/dist/icons/DashboardIcon.js +1 -1
- package/dist/icons/DatabaseIcon.js +1 -1
- package/dist/icons/DecimalDecreaseIcon.js +1 -1
- package/dist/icons/DecimalIncreaseIcon.js +1 -1
- package/dist/icons/DirectionIcon.js +1 -1
- package/dist/icons/DonutIcon.js +1 -1
- package/dist/icons/DownIcon.js +1 -1
- package/dist/icons/EditIcon.js +1 -1
- package/dist/icons/ExclamationCircleFilledIcon.js +1 -1
- package/dist/icons/ExclamationCircleIcon.js +1 -1
- package/dist/icons/ExclamationIcon.js +1 -1
- package/dist/icons/EyeIcon.js +1 -1
- package/dist/icons/EyeInvisibleIcon.js +1 -1
- package/dist/icons/FilterIcon.js +1 -1
- package/dist/icons/FolderFilledIcon.js +1 -1
- package/dist/icons/FolderIcon.js +1 -1
- package/dist/icons/FolderOpenFilledIcon.js +1 -1
- package/dist/icons/FolderOpenIcon.js +1 -1
- package/dist/icons/ForwardIcon.js +1 -1
- package/dist/icons/GripVerticalIcon.js +1 -1
- package/dist/icons/HierarchyIcon.js +1 -1
- package/dist/icons/HierarchyOpenIcon.js +1 -1
- package/dist/icons/Icon.js +1 -1
- package/dist/icons/InfoCircleIcon.js +1 -1
- package/dist/icons/InfoIcon.js +1 -1
- package/dist/icons/KeyIcon.js +1 -1
- package/dist/icons/LeftIcon.js +1 -1
- package/dist/icons/LineChartIcon.js +1 -1
- package/dist/icons/LoadingIcon.js +1 -1
- package/dist/icons/LockFilledIcon.js +1 -1
- package/dist/icons/LockIcon.js +1 -1
- package/dist/icons/MoreIcon.js +1 -1
- package/dist/icons/NotAllowedIcon.js +1 -1
- package/dist/icons/Number123Icon.js +1 -1
- package/dist/icons/NumberIcon.js +1 -1
- package/dist/icons/PauseCircleFilledIcon.js +1 -1
- package/dist/icons/PauseCircleIcon.js +1 -1
- package/dist/icons/PauseIcon.js +1 -1
- package/dist/icons/PercentageIcon.js +1 -1
- package/dist/icons/PieChartIcon.js +1 -1
- package/dist/icons/PipetteIcon.js +1 -1
- package/dist/icons/PlayCircleIcon.js +1 -1
- package/dist/icons/PlayIcon.js +1 -1
- package/dist/icons/PlusIcon.js +1 -1
- package/dist/icons/ProgressBarIcon.js +1 -1
- package/dist/icons/ReloadIcon.js +1 -1
- package/dist/icons/ReportIcon.js +1 -1
- package/dist/icons/ReturnIcon.js +1 -1
- package/dist/icons/RightIcon.js +1 -1
- package/dist/icons/RowTotalsIcon.js +1 -1
- package/dist/icons/SchemeIcon.js +1 -1
- package/dist/icons/SearchIcon.js +1 -1
- package/dist/icons/SemanticQueryIcon.js +1 -1
- package/dist/icons/SettingsIcon.js +1 -1
- package/dist/icons/ShieldFilledIcon.js +1 -1
- package/dist/icons/ShieldIcon.js +1 -1
- package/dist/icons/SlashIcon.js +1 -1
- package/dist/icons/SparklesIcon.js +1 -1
- package/dist/icons/SqlIcon.js +1 -1
- package/dist/icons/StatsIcon.js +1 -1
- package/dist/icons/StopIcon.js +1 -1
- package/dist/icons/StringIcon.js +1 -1
- package/dist/icons/SubtotalsIcon.js +1 -1
- package/dist/icons/SwitchIcon.js +1 -1
- package/dist/icons/TableIcon.js +1 -1
- package/dist/icons/ThumbsDownIcon.js +1 -1
- package/dist/icons/ThumbsUpIcon.js +1 -1
- package/dist/icons/ThunderboltCrossedIcon.js +1 -1
- package/dist/icons/ThunderboltFilledIcon.js +1 -1
- package/dist/icons/ThunderboltIcon.js +1 -1
- package/dist/icons/TimeIcon.js +1 -1
- package/dist/icons/TrashIcon.js +1 -1
- package/dist/icons/UnlockIcon.js +1 -1
- package/dist/icons/UpIcon.js +1 -1
- package/dist/icons/UserGroupIcon.js +1 -1
- package/dist/icons/UserIcon.js +1 -1
- package/dist/icons/UserLockIcon.js +1 -1
- package/dist/icons/ViewIcon.js +1 -1
- package/dist/icons/WarningFilledIcon.js +1 -1
- package/dist/icons/WarningIcon.js +1 -1
- package/dist/icons/wrap-icon.js +1 -1
- package/dist/index.js +2 -2
- package/dist/probe/canonicalize.js +1 -1
- package/dist/probe/css.js +1 -1
- package/dist/probe/index.js +1 -1
- package/dist/provider.js +1 -1
- package/dist/providers/TrackingProvider.js +1 -1
- package/dist/providers/navigation-url.js +1 -1
- package/dist/providers/navigationAdapter.default.js +1 -1
- package/dist/providers/use-navigation.js +1 -1
- package/dist/tokens/all-tokens.js +1 -1
- package/dist/tokens/base.js +1 -1
- package/dist/tokens/color-seed.js +1 -1
- package/dist/tokens/color-theme.js +1 -1
- package/dist/tokens/colors.js +1 -1
- package/dist/tokens/layout.js +1 -1
- package/dist/tokens/lazy-styles.js +1 -1
- package/dist/tokens/legacy-color.js +1 -1
- package/dist/tokens/palette-config.js +1 -1
- package/dist/tokens/palette.js +1 -1
- package/dist/tokens/resolve.js +1 -1
- package/dist/tokens/shadows.js +1 -1
- package/dist/tokens/sizes.js +1 -1
- package/dist/tokens/spacing.js +1 -1
- package/dist/tokens/typography.js +1 -1
- package/dist/utils/ResizeSensor.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/dotize.js +1 -1
- package/dist/utils/is-dev-env.js +1 -1
- package/dist/utils/modules.js +1 -1
- package/dist/utils/promise.js +1 -1
- package/dist/utils/raf.js +1 -1
- package/dist/utils/random.js +1 -1
- package/dist/utils/range.js +1 -1
- package/dist/utils/react/RenderCache.js +1 -1
- package/dist/utils/react/Slots.js +1 -1
- package/dist/utils/react/chain.js +1 -1
- package/dist/utils/react/disabledProps.js +1 -1
- package/dist/utils/react/forwardRefWithGenerics.js +1 -1
- package/dist/utils/react/index.js +1 -1
- package/dist/utils/react/interactions.js +1 -1
- package/dist/utils/react/isTextOnly.js +1 -1
- package/dist/utils/react/mapProps.js +1 -1
- package/dist/utils/react/mergeProps.js +1 -1
- package/dist/utils/react/nullableValue.js +1 -1
- package/dist/utils/react/overlayKeyPropagation.js +1 -1
- package/dist/utils/react/programmaticFocus.js +1 -1
- package/dist/utils/react/resolveIcon.js +1 -1
- package/dist/utils/react/sharedStore.js +1 -1
- package/dist/utils/react/useBufferedValue.js +1 -1
- package/dist/utils/react/useCombinedRefs.js +1 -1
- package/dist/utils/react/useControlledFocusVisible.js +1 -1
- package/dist/utils/react/useEventBus.js +1 -1
- package/dist/utils/react/useId.js +1 -1
- package/dist/utils/react/useIsDarwin.js +1 -1
- package/dist/utils/react/useKeySymbols.js +1 -1
- package/dist/utils/react/useLayoutEffect.js +1 -1
- package/dist/utils/react/useLocalStorage.js +1 -1
- package/dist/utils/react/useMergeStyles.js +1 -1
- package/dist/utils/react/useOverlayEscapeGuard.js +1 -1
- package/dist/utils/react/usePopoverSync.js +1 -1
- package/dist/utils/react/useQaProps.js +1 -1
- package/dist/utils/react/useScheme.js +1 -1
- package/dist/utils/react/useViewportSize.js +1 -1
- package/dist/utils/react/wrapNodeIfPlain.js +1 -1
- package/dist/utils/selection.js +1 -1
- package/dist/utils/styles.js +1 -1
- package/dist/utils/tree.js +1 -1
- package/dist/utils/warnings.js +1 -1
- package/dist/version.js +2 -2
- package/docs/components/overlays/Dialog.md +2 -2
- package/docs/components/overlays/DialogContainer.md +1 -0
- package/docs/components/overlays/DialogForm.md +3 -1
- package/docs/components/overlays/DialogTrigger.md +31 -1
- package/package.json +1 -1
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
|
+
import { useI18n } from "../../../i18n/useI18n.js";
|
|
3
|
+
import { AlertDialog as _AlertDialog } from "../AlertDialog/AlertDialog.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
5
|
+
import { useEffect, useRef, useState } from "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { focusSafely } from "@react-aria/interactions";
|
|
8
|
+
//#region src/components/overlays/Dialog/use-dismiss-confirmation.tsx
|
|
9
|
+
/**
|
|
10
|
+
* The owner side of `confirmDismiss`, for `DialogTrigger` and
|
|
11
|
+
* `DialogContainer`. A passive dismissal (Escape, an outside click, the close
|
|
12
|
+
* button) goes through `requestDismiss`, which asks "Discard changes?" first
|
|
13
|
+
* while `confirmDismiss` is `true`, or, when it is unset, while a `DialogForm`
|
|
14
|
+
* inside reports unsaved edits (or its own `confirmDismiss`) through
|
|
15
|
+
* `registerUnsavedChanges`. Explicit actions (submit, Cancel, a `close` the
|
|
16
|
+
* consumer calls) bypass it.
|
|
17
|
+
*
|
|
18
|
+
* The owner renders the question while `confirmationProps` is set:
|
|
19
|
+
* `<DialogContainer {...confirmationProps}><DiscardChangesDialog /></DialogContainer>`.
|
|
20
|
+
*/
|
|
21
|
+
function useDismissConfirmation(confirmDismiss, isDialogOpen) {
|
|
22
|
+
const $ = c(19);
|
|
23
|
+
const [pending, setPending] = useState(null);
|
|
24
|
+
const [hasAsked, setHasAsked] = useState(false);
|
|
25
|
+
const hasUnsavedChanges = useRef(null);
|
|
26
|
+
const answer = useRef(null);
|
|
27
|
+
const lastFocused = useRef(null);
|
|
28
|
+
const canAsk = isDialogOpen && confirmDismiss !== false;
|
|
29
|
+
if (pending && !isDialogOpen) setPending(null);
|
|
30
|
+
let t0;
|
|
31
|
+
let t1;
|
|
32
|
+
if ($[0] !== canAsk) {
|
|
33
|
+
t0 = () => {
|
|
34
|
+
if (!canAsk) return;
|
|
35
|
+
if (document.activeElement !== document.body) lastFocused.current = document.activeElement;
|
|
36
|
+
const onFocusIn = (event) => {
|
|
37
|
+
lastFocused.current = event.target;
|
|
38
|
+
};
|
|
39
|
+
document.addEventListener("focusin", onFocusIn, true);
|
|
40
|
+
return () => {
|
|
41
|
+
document.removeEventListener("focusin", onFocusIn, true);
|
|
42
|
+
lastFocused.current = null;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
t1 = [canAsk];
|
|
46
|
+
$[0] = canAsk;
|
|
47
|
+
$[1] = t0;
|
|
48
|
+
$[2] = t1;
|
|
49
|
+
} else {
|
|
50
|
+
t0 = $[1];
|
|
51
|
+
t1 = $[2];
|
|
52
|
+
}
|
|
53
|
+
useEffect(t0, t1);
|
|
54
|
+
let t2;
|
|
55
|
+
if ($[3] !== confirmDismiss || $[4] !== pending) {
|
|
56
|
+
t2 = function requestDismiss(dismiss) {
|
|
57
|
+
if (pending) return;
|
|
58
|
+
if (!(confirmDismiss ?? hasUnsavedChanges.current?.() ?? false)) {
|
|
59
|
+
dismiss();
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
const focused = document.activeElement;
|
|
63
|
+
setPending({
|
|
64
|
+
dismiss,
|
|
65
|
+
focusTarget: focused && focused !== document.body ? focused : lastFocused.current
|
|
66
|
+
});
|
|
67
|
+
setHasAsked(true);
|
|
68
|
+
};
|
|
69
|
+
$[3] = confirmDismiss;
|
|
70
|
+
$[4] = pending;
|
|
71
|
+
$[5] = t2;
|
|
72
|
+
} else t2 = $[5];
|
|
73
|
+
const requestDismiss = t2;
|
|
74
|
+
let t3;
|
|
75
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
76
|
+
t3 = function registerUnsavedChanges(check) {
|
|
77
|
+
hasUnsavedChanges.current = check;
|
|
78
|
+
return () => {
|
|
79
|
+
if (hasUnsavedChanges.current === check) hasUnsavedChanges.current = null;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
$[6] = t3;
|
|
83
|
+
} else t3 = $[6];
|
|
84
|
+
const registerUnsavedChanges = t3;
|
|
85
|
+
let t4;
|
|
86
|
+
if ($[7] !== pending) {
|
|
87
|
+
t4 = function settle(action) {
|
|
88
|
+
if (!pending) return;
|
|
89
|
+
answer.current = {
|
|
90
|
+
...pending,
|
|
91
|
+
isDiscarded: action === "confirm"
|
|
92
|
+
};
|
|
93
|
+
setPending(null);
|
|
94
|
+
};
|
|
95
|
+
$[7] = pending;
|
|
96
|
+
$[8] = t4;
|
|
97
|
+
} else t4 = $[8];
|
|
98
|
+
const settle = t4;
|
|
99
|
+
let t5;
|
|
100
|
+
let t6;
|
|
101
|
+
if ($[9] !== pending) {
|
|
102
|
+
t5 = () => {
|
|
103
|
+
const settled = answer.current;
|
|
104
|
+
if (pending || !settled) return;
|
|
105
|
+
answer.current = null;
|
|
106
|
+
const { focusTarget } = settled;
|
|
107
|
+
if (focusTarget instanceof HTMLElement && focusTarget.isConnected) focusSafely(focusTarget);
|
|
108
|
+
if (settled.isDiscarded) settled.dismiss();
|
|
109
|
+
};
|
|
110
|
+
t6 = [pending];
|
|
111
|
+
$[9] = pending;
|
|
112
|
+
$[10] = t5;
|
|
113
|
+
$[11] = t6;
|
|
114
|
+
} else {
|
|
115
|
+
t5 = $[10];
|
|
116
|
+
t6 = $[11];
|
|
117
|
+
}
|
|
118
|
+
useEffect(t5, t6);
|
|
119
|
+
let t7;
|
|
120
|
+
if ($[12] !== hasAsked || $[13] !== pending || $[14] !== settle) {
|
|
121
|
+
t7 = hasAsked ? {
|
|
122
|
+
isOpen: !!pending,
|
|
123
|
+
onDismiss: settle
|
|
124
|
+
} : null;
|
|
125
|
+
$[12] = hasAsked;
|
|
126
|
+
$[13] = pending;
|
|
127
|
+
$[14] = settle;
|
|
128
|
+
$[15] = t7;
|
|
129
|
+
} else t7 = $[15];
|
|
130
|
+
let t8;
|
|
131
|
+
if ($[16] !== requestDismiss || $[17] !== t7) {
|
|
132
|
+
t8 = {
|
|
133
|
+
requestDismiss,
|
|
134
|
+
registerUnsavedChanges,
|
|
135
|
+
confirmationProps: t7
|
|
136
|
+
};
|
|
137
|
+
$[16] = requestDismiss;
|
|
138
|
+
$[17] = t7;
|
|
139
|
+
$[18] = t8;
|
|
140
|
+
} else t8 = $[18];
|
|
141
|
+
return t8;
|
|
142
|
+
}
|
|
143
|
+
/** The question `useDismissConfirmation` asks. Escape keeps editing. */
|
|
144
|
+
function DiscardChangesDialog() {
|
|
145
|
+
const $ = c(19);
|
|
146
|
+
const { t } = useI18n();
|
|
147
|
+
let t0;
|
|
148
|
+
if ($[0] !== t) {
|
|
149
|
+
t0 = t("dialog.discardChanges.title", "Discard changes?");
|
|
150
|
+
$[0] = t;
|
|
151
|
+
$[1] = t0;
|
|
152
|
+
} else t0 = $[1];
|
|
153
|
+
let t1;
|
|
154
|
+
if ($[2] !== t) {
|
|
155
|
+
t1 = t("dialog.discardChanges.content", "All unsaved changes will be lost.");
|
|
156
|
+
$[2] = t;
|
|
157
|
+
$[3] = t1;
|
|
158
|
+
} else t1 = $[3];
|
|
159
|
+
let t2;
|
|
160
|
+
if ($[4] !== t) {
|
|
161
|
+
t2 = t("dialog.discardChanges.discard", "Discard");
|
|
162
|
+
$[4] = t;
|
|
163
|
+
$[5] = t2;
|
|
164
|
+
} else t2 = $[5];
|
|
165
|
+
let t3;
|
|
166
|
+
if ($[6] !== t2) {
|
|
167
|
+
t3 = { children: t2 };
|
|
168
|
+
$[6] = t2;
|
|
169
|
+
$[7] = t3;
|
|
170
|
+
} else t3 = $[7];
|
|
171
|
+
let t4;
|
|
172
|
+
if ($[8] !== t) {
|
|
173
|
+
t4 = t("dialog.discardChanges.keepEditing", "Keep editing");
|
|
174
|
+
$[8] = t;
|
|
175
|
+
$[9] = t4;
|
|
176
|
+
} else t4 = $[9];
|
|
177
|
+
let t5;
|
|
178
|
+
if ($[10] !== t4) {
|
|
179
|
+
t5 = { children: t4 };
|
|
180
|
+
$[10] = t4;
|
|
181
|
+
$[11] = t5;
|
|
182
|
+
} else t5 = $[11];
|
|
183
|
+
let t6;
|
|
184
|
+
if ($[12] !== t3 || $[13] !== t5) {
|
|
185
|
+
t6 = {
|
|
186
|
+
confirm: t3,
|
|
187
|
+
cancel: t5
|
|
188
|
+
};
|
|
189
|
+
$[12] = t3;
|
|
190
|
+
$[13] = t5;
|
|
191
|
+
$[14] = t6;
|
|
192
|
+
} else t6 = $[14];
|
|
193
|
+
let t7;
|
|
194
|
+
if ($[15] !== t0 || $[16] !== t1 || $[17] !== t6) {
|
|
195
|
+
t7 = /* @__PURE__ */ jsx(_AlertDialog, {
|
|
196
|
+
danger: true,
|
|
197
|
+
title: t0,
|
|
198
|
+
content: t1,
|
|
199
|
+
actions: t6
|
|
200
|
+
});
|
|
201
|
+
$[15] = t0;
|
|
202
|
+
$[16] = t1;
|
|
203
|
+
$[17] = t6;
|
|
204
|
+
$[18] = t7;
|
|
205
|
+
} else t7 = $[18];
|
|
206
|
+
return t7;
|
|
207
|
+
}
|
|
208
|
+
//#endregion
|
|
209
|
+
export { DiscardChangesDialog, useDismissConfirmation };
|
|
210
|
+
|
|
211
|
+
//# sourceMappingURL=use-dismiss-confirmation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-dismiss-confirmation.js","names":["focusSafely","useEffect","useRef","useState","useI18n","AlertDialog","PendingDismissal","dismiss","focusTarget","Element","Answer","isDiscarded","useDismissConfirmation","confirmDismiss","isDialogOpen","$","_c","pending","setPending","hasAsked","setHasAsked","hasUnsavedChanges","answer","lastFocused","canAsk","t0","t1","document","activeElement","body","current","onFocusIn","event","target","addEventListener","removeEventListener","t2","requestDismiss","focused","t3","Symbol","for","registerUnsavedChanges","check","t4","settle","action","t5","t6","settled","HTMLElement","isConnected","t7","isOpen","onDismiss","t8","confirmationProps","DiscardChangesDialog","t","children","confirm","cancel","_c","AlertDialog"],"sources":["../../../../src/components/overlays/Dialog/use-dismiss-confirmation.tsx"],"sourcesContent":["import { focusSafely } from '@react-aria/interactions';\nimport { useEffect, useRef, useState } from 'react';\n\nimport { useI18n } from '../../../i18n';\nimport { AlertDialog } from '../AlertDialog/AlertDialog';\n\ninterface PendingDismissal {\n /** What the dismissal runs once the user discards the edits. */\n dismiss: () => void;\n /** Where focus was when the dialog asked, to give it back. */\n focusTarget: Element | null;\n}\n\ninterface Answer extends PendingDismissal {\n isDiscarded: boolean;\n}\n\n/**\n * The owner side of `confirmDismiss`, for `DialogTrigger` and\n * `DialogContainer`. A passive dismissal (Escape, an outside click, the close\n * button) goes through `requestDismiss`, which asks \"Discard changes?\" first\n * while `confirmDismiss` is `true`, or, when it is unset, while a `DialogForm`\n * inside reports unsaved edits (or its own `confirmDismiss`) through\n * `registerUnsavedChanges`. Explicit actions (submit, Cancel, a `close` the\n * consumer calls) bypass it.\n *\n * The owner renders the question while `confirmationProps` is set:\n * `<DialogContainer {...confirmationProps}><DiscardChangesDialog /></DialogContainer>`.\n */\nexport function useDismissConfirmation(\n confirmDismiss: boolean | undefined,\n isDialogOpen: boolean,\n) {\n const [pending, setPending] = useState<PendingDismissal | null>(null);\n // Mounted on the first question and kept, so it can play its exit.\n const [hasAsked, setHasAsked] = useState(false);\n const hasUnsavedChanges = useRef<(() => boolean) | null>(null);\n const answer = useRef<Answer | null>(null);\n const lastFocused = useRef<Element | null>(null);\n const canAsk = isDialogOpen && confirmDismiss !== false;\n\n // A dialog closed some other way takes its question with it.\n if (pending && !isDialogOpen) setPending(null);\n\n // A click outside drops focus to `<body>` on its way to closing the dialog,\n // so the question gives focus back to where it was last. A `confirmDismiss`\n // bound to state turns on while the user types, so start from that field.\n useEffect(() => {\n if (!canAsk) return;\n\n if (document.activeElement !== document.body) {\n lastFocused.current = document.activeElement;\n }\n\n const onFocusIn = (event: FocusEvent) => {\n lastFocused.current = event.target as Element;\n };\n\n document.addEventListener('focusin', onFocusIn, true);\n\n return () => {\n document.removeEventListener('focusin', onFocusIn, true);\n lastFocused.current = null;\n };\n }, [canAsk]);\n\n function requestDismiss(dismiss: () => void) {\n if (pending) return;\n\n if (!(confirmDismiss ?? hasUnsavedChanges.current?.() ?? false)) {\n dismiss();\n\n return;\n }\n\n const focused = document.activeElement;\n\n setPending({\n dismiss,\n focusTarget:\n focused && focused !== document.body ? focused : lastFocused.current,\n });\n setHasAsked(true);\n }\n\n function registerUnsavedChanges(check: () => boolean) {\n hasUnsavedChanges.current = check;\n\n return () => {\n if (hasUnsavedChanges.current === check) hasUnsavedChanges.current = null;\n };\n }\n\n function settle(action?: string) {\n if (!pending) return;\n\n answer.current = { ...pending, isDiscarded: action === 'confirm' };\n setPending(null);\n }\n\n // Once the question has closed: while open it holds focus, and pulls back\n // any focus moved out of it. Focus goes back into the dialog at once, not\n // when the question has faded out. A discarded dialog then closes from\n // there, so its trigger takes focus back as after any close.\n useEffect(() => {\n const settled = answer.current;\n\n if (pending || !settled) return;\n\n answer.current = null;\n\n const { focusTarget } = settled;\n\n if (focusTarget instanceof HTMLElement && focusTarget.isConnected) {\n focusSafely(focusTarget);\n }\n\n if (settled.isDiscarded) settled.dismiss();\n }, [pending]);\n\n return {\n requestDismiss,\n registerUnsavedChanges,\n confirmationProps: hasAsked\n ? { isOpen: !!pending, onDismiss: settle }\n : null,\n };\n}\n\n/** The question `useDismissConfirmation` asks. Escape keeps editing. */\nexport function DiscardChangesDialog() {\n const { t } = useI18n();\n\n return (\n <AlertDialog\n danger\n title={t('dialog.discardChanges.title', 'Discard changes?')}\n content={t(\n 'dialog.discardChanges.content',\n 'All unsaved changes will be lost.',\n )}\n actions={{\n confirm: { children: t('dialog.discardChanges.discard', 'Discard') },\n cancel: {\n children: t('dialog.discardChanges.keepEditing', 'Keep editing'),\n },\n }}\n />\n );\n}\n"],"mappings":"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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { focusProgrammatically } from "../../../utils/react/programmaticFocus.js";
|
|
3
3
|
import { useOpenTransitionContext } from "../Modal/OpenTransitionContext.js";
|
|
4
4
|
import { trapsFocus, useDialogContext } from "./context.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
3
3
|
import { mergeRefs as mergeRefs$1 } from "../../../utils/react/useCombinedRefs.js";
|
|
4
4
|
import { ModalContainmentProvider, useModalContainment } from "./modal-containment.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { createContext, useContext } from "react";
|
|
3
3
|
//#region src/components/overlays/Modal/OpenTransitionContext.tsx
|
|
4
4
|
const OpenTransitionContext = createContext(null);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { markFocusRestoreWindow } from "../../../utils/react/programmaticFocus.js";
|
|
3
3
|
import { DisplayTransition } from "../../helpers/DisplayTransition/DisplayTransition.js";
|
|
4
4
|
import { Provider, useProviderProps } from "../../../provider.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
3
3
|
import { mergeRefs as mergeRefs$1 } from "../../../utils/react/useCombinedRefs.js";
|
|
4
4
|
import { useModalLayerRef } from "./modal-containment.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
3
3
|
import { mergeRefs as mergeRefs$1 } from "../../../utils/react/useCombinedRefs.js";
|
|
4
4
|
import { ModalContainmentProvider, useModalContainment } from "./modal-containment.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { createContext, useContext, useLayoutEffect, useRef, useState } from "react";
|
|
4
4
|
import { ariaHideOutside } from "react-aria/private/overlays/ariaHideOutside";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { useNotificationContext } from "./NotificationContext.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import { useEffect, useRef } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
3
3
|
import { ItemAction } from "../../actions/ItemAction/ItemAction.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { Block } from "../../Block.js";
|
|
3
3
|
import { ItemActionProvider } from "../../actions/ItemActionContext.js";
|
|
4
4
|
import { useI18n } from "../../../i18n/useI18n.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { createContext, useContext } from "react";
|
|
3
3
|
//#region src/components/overlays/Notifications/NotificationContext.ts
|
|
4
4
|
const ToastContext = createContext(null);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
3
3
|
import { NotificationCard } from "./NotificationCard.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { useLayoutEffect as useLayoutEffect$1 } from "../../../utils/react/useLayoutEffect.js";
|
|
3
3
|
import { useViewportSize } from "../../../utils/react/useViewportSize.js";
|
|
4
4
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { NotificationContext, PersistentNotificationsContext, ToastContext } from "./NotificationContext.js";
|
|
3
3
|
import { OverlayContainer } from "./OverlayContainer.js";
|
|
4
4
|
import { useNotificationState } from "./use-notification-state.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { Text as _Text } from "../../content/Text.js";
|
|
3
3
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
4
4
|
import { useI18n } from "../../../i18n/useI18n.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
//#region src/components/overlays/Notifications/dismissed-storage.ts
|
|
3
3
|
const STORAGE_KEY = "cube-ui-dismissed-notifications";
|
|
4
4
|
const TTL_MS = 864e5;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import "./NotificationContext.js";
|
|
3
3
|
import { NotificationAction } from "./NotificationAction.js";
|
|
4
4
|
import { NotificationCard } from "./NotificationCard.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
3
3
|
import { useRef, useState } from "react";
|
|
4
4
|
//#region src/components/overlays/Notifications/use-notification-state.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
3
3
|
import { useWarn } from "../../../_internal/hooks/use-warn.js";
|
|
4
4
|
import { useNotificationContext } from "./NotificationContext.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
3
3
|
import { useEffect, useRef } from "react";
|
|
4
4
|
//#region src/components/overlays/Notifications/use-overlay-timers.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { usePersistentNotificationsContext } from "./NotificationContext.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
//#region src/components/overlays/Notifications/use-persistent-notifications.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
3
3
|
import { cleanupAndGetValidIds, saveDismissedId } from "./dismissed-storage.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
3
3
|
import { useRef, useState } from "react";
|
|
4
4
|
//#region src/components/overlays/Notifications/use-toast-state.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { Item as _Item } from "../../content/Item/Item.js";
|
|
3
3
|
import { getThemeIcon } from "./useToast.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { useToastContext } from "../Notifications/NotificationContext.js";
|
|
3
3
|
import { useProgressToast } from "./useProgressToast.js";
|
|
4
4
|
import { getThemeIcon, useToast } from "./useToast.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
3
3
|
import { ItemAction } from "../../actions/ItemAction/ItemAction.js";
|
|
4
4
|
import { useI18n } from "../../../i18n/useI18n.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { CheckIcon } from "../../../icons/CheckIcon.js";
|
|
3
3
|
import { InfoCircleIcon } from "../../../icons/InfoCircleIcon.js";
|
|
4
4
|
import { useToastContext } from "../Notifications/NotificationContext.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../../utils/styles.js";
|
|
3
3
|
import { useLayoutEffect as useLayoutEffect$1 } from "../../../utils/react/useLayoutEffect.js";
|
|
4
4
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { Tooltip as _Tooltip } from "./Tooltip.js";
|
|
3
3
|
import { TooltipTrigger } from "./TooltipTrigger.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { useLayoutEffect as useLayoutEffect$1 } from "../../../utils/react/useLayoutEffect.js";
|
|
3
3
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
4
4
|
import { isDevEnv } from "../../../utils/is-dev-env.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { usePortal } from "./usePortal.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import { TastyBatchProvider } from "@tenphi/tasty";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { createContext, useContext } from "react";
|
|
4
4
|
//#region src/components/portal/PortalProvider.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { usePortalContext } from "./PortalProvider.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import { useEffect, useEffectEvent, useState } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { useEvent } from "../../_internal/hooks/use-event.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import { useEffect, useEffectEvent, useRef } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { WarningIcon } from "../../icons/WarningIcon.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/shared/InvalidIcon.tsx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { CheckIcon } from "../../icons/CheckIcon.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/shared/ValidIcon.tsx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { useLayoutEffect as useLayoutEffect$1 } from "../../../utils/react/useLayoutEffect.js";
|
|
3
3
|
import { Block } from "../../Block.js";
|
|
4
4
|
import { useI18n } from "../../../i18n/useI18n.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { Block } from "../../Block.js";
|
|
3
3
|
import { InternalSpinner } from "./InternalSpinner.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
package/dist/data/item-themes.js
CHANGED
package/dist/data/themes.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { DEFAULTS } from "./defaults.generated.js";
|
|
3
3
|
import { createRule, noRedundantDefaultProp } from "./rules/no-redundant-default-prop.js";
|
|
4
4
|
//#region src/eslint-plugin/index.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { UIKIT_I18N_NAMESPACE } from "./namespace.js";
|
|
3
3
|
import { getI18n } from "./instance.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
package/dist/i18n/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { LOCALE_LABELS, SUPPORTED_LOCALES, isSupportedLocale } from "./locales.js";
|
|
3
3
|
import { UIKIT_I18N_NAMESPACE } from "./namespace.js";
|
|
4
4
|
import { createUIKitI18n, getI18n } from "./instance.js";
|