@caspeco/casper-ui-library 11.4.0 → 12.1.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 +5 -5
- package/dist/components/accordion/accordion-item.js +11 -11
- package/dist/components/accordion/accordion-panel.js +4 -4
- package/dist/components/accordion/accordion.js +4 -4
- package/dist/components/alert/alert.d.ts.map +1 -1
- package/dist/components/alert/alert.js +14 -14
- package/dist/components/alert/helper.d.ts +3 -3
- package/dist/components/alert/helper.d.ts.map +1 -1
- package/dist/components/alert/helper.js +1 -1
- package/dist/components/badge/badge.js +19 -19
- package/dist/components/badge/helper.d.ts +3 -3
- package/dist/components/badge/helper.d.ts.map +1 -1
- package/dist/components/badge/helper.js +1 -1
- package/dist/components/box/box.composition.d.ts.map +1 -1
- package/dist/components/box/box.js +3 -3
- package/dist/components/breadcrumbs/breadcrumb-item.js +4 -4
- package/dist/components/breadcrumbs/breadcrumb-link.js +3 -3
- package/dist/components/breadcrumbs/breadcrumbs.js +25 -25
- package/dist/components/button/button.d.ts +1 -1
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/button.js +6 -6
- package/dist/components/checkbox/checkbox-icon.js +3 -3
- package/dist/components/checkbox/checkbox.js +8 -8
- package/dist/components/checkbox-group/checkbox-group.js +3 -3
- package/dist/components/collapsible/collapsible.d.ts +1 -1
- package/dist/components/collapsible/collapsible.d.ts.map +1 -1
- package/dist/components/collapsible/collapsible.js +31 -30
- package/dist/components/collapsible/collapsible.translations.d.ts +6 -0
- package/dist/components/collapsible/collapsible.translations.d.ts.map +1 -0
- package/dist/components/collapsible/collapsible.translations.js +54 -0
- package/dist/components/collapsible/types.d.ts +0 -6
- package/dist/components/collapsible/types.d.ts.map +1 -1
- package/dist/components/combobox/combobox-button.d.ts +1 -1
- package/dist/components/combobox/combobox-button.d.ts.map +1 -1
- package/dist/components/combobox/combobox-button.js +67 -65
- package/dist/components/combobox/combobox-item.js +9 -9
- package/dist/components/combobox/combobox-menu.d.ts.map +1 -1
- package/dist/components/combobox/combobox-menu.js +96 -95
- package/dist/components/combobox/combobox-recipe.js +1 -1
- package/dist/components/combobox/combobox.d.ts +1 -1
- package/dist/components/combobox/combobox.d.ts.map +1 -1
- package/dist/components/combobox/combobox.js +91 -91
- package/dist/components/combobox/combobox.translations.d.ts +10 -0
- package/dist/components/combobox/combobox.translations.d.ts.map +1 -0
- package/dist/components/combobox/combobox.translations.js +102 -0
- package/dist/components/combobox/index.d.ts +1 -1
- package/dist/components/combobox/index.d.ts.map +1 -1
- package/dist/components/combobox/types.d.ts +0 -15
- package/dist/components/combobox/types.d.ts.map +1 -1
- package/dist/components/date-picker/base-date-picker.d.ts +1 -1
- package/dist/components/date-picker/base-date-picker.d.ts.map +1 -1
- package/dist/components/date-picker/base-date-picker.js +164 -163
- package/dist/components/date-picker/date-multi-picker.d.ts +1 -1
- package/dist/components/date-picker/date-multi-picker.d.ts.map +1 -1
- package/dist/components/date-picker/date-multi-picker.js +20 -21
- package/dist/components/date-picker/date-picker-date-cell.d.ts.map +1 -1
- package/dist/components/date-picker/date-picker-date-cell.js +27 -27
- package/dist/components/date-picker/date-picker-header.d.ts.map +1 -1
- package/dist/components/date-picker/date-picker-header.js +83 -115
- package/dist/components/date-picker/date-picker-week-cell.js +5 -5
- package/dist/components/date-picker/date-picker.composition.d.ts.map +1 -1
- package/dist/components/date-picker/date-picker.d.ts +1 -1
- package/dist/components/date-picker/date-picker.d.ts.map +1 -1
- package/dist/components/date-picker/date-picker.js +20 -21
- package/dist/components/date-picker/date-picker.translations.d.ts +6 -0
- package/dist/components/date-picker/date-picker.translations.d.ts.map +1 -0
- package/dist/components/date-picker/date-picker.translations.js +54 -0
- package/dist/components/date-picker/date-range-picker.d.ts +1 -1
- package/dist/components/date-picker/date-range-picker.d.ts.map +1 -1
- package/dist/components/date-picker/date-range-picker.js +15 -16
- package/dist/components/date-picker/date-week-picker.d.ts +1 -1
- package/dist/components/date-picker/date-week-picker.d.ts.map +1 -1
- package/dist/components/date-picker/date-week-picker.js +13 -14
- package/dist/components/date-picker/types.d.ts +4 -10
- package/dist/components/date-picker/types.d.ts.map +1 -1
- package/dist/components/divider/divider.d.ts.map +1 -1
- package/dist/components/divider/divider.js +4 -4
- package/dist/components/drawer/drawer.js +6 -6
- package/dist/components/drawer/inline-drawer.js +5 -5
- package/dist/components/fieldset/fieldset-error-text.js +3 -3
- package/dist/components/fieldset/fieldset-helper-text.js +3 -3
- package/dist/components/fieldset/fieldset-legend.js +3 -3
- package/dist/components/fieldset/fieldset.js +3 -3
- package/dist/components/flex/flex.js +3 -3
- package/dist/components/form-control/form-control.js +3 -3
- package/dist/components/form-control/form-error-message.js +3 -3
- package/dist/components/form-control/form-helper-text.js +3 -3
- package/dist/components/form-control/form-label.d.ts.map +1 -1
- package/dist/components/form-control/form-label.js +6 -6
- package/dist/components/grid/grid-item.js +3 -3
- package/dist/components/grid/grid.js +3 -3
- package/dist/components/heading/heading.d.ts.map +1 -1
- package/dist/components/heading/heading.js +5 -5
- package/dist/components/highlight/highlight.js +4 -4
- package/dist/components/icon/create-icon.d.ts +2 -2
- package/dist/components/icon/create-icon.d.ts.map +1 -1
- package/dist/components/icon/create-icon.js +8 -8
- package/dist/components/icon/icon.composition.d.ts.map +1 -1
- package/dist/components/icon-button/icon-button.d.ts.map +1 -1
- package/dist/components/icon-button/icon-button.js +5 -5
- package/dist/components/image/image.js +3 -3
- package/dist/components/image-upload/image-upload-dropzone.d.ts +1 -3
- package/dist/components/image-upload/image-upload-dropzone.d.ts.map +1 -1
- package/dist/components/image-upload/image-upload-dropzone.js +76 -75
- package/dist/components/image-upload/image-upload-icons.js +11 -11
- package/dist/components/image-upload/image-upload-modal.d.ts +2 -3
- package/dist/components/image-upload/image-upload-modal.d.ts.map +1 -1
- package/dist/components/image-upload/image-upload-modal.js +70 -70
- package/dist/components/image-upload/image-upload.d.ts +1 -1
- package/dist/components/image-upload/image-upload.d.ts.map +1 -1
- package/dist/components/image-upload/image-upload.js +44 -45
- package/dist/components/image-upload/image-upload.translations.d.ts +12 -0
- package/dist/components/image-upload/image-upload.translations.d.ts.map +1 -0
- package/dist/components/image-upload/image-upload.translations.js +126 -0
- package/dist/components/image-upload/types.d.ts +0 -3
- package/dist/components/image-upload/types.d.ts.map +1 -1
- package/dist/components/input/helper.js +1 -1
- package/dist/components/input/input-recipe.js +1 -1
- package/dist/components/input/input.d.ts +1 -1
- package/dist/components/input/input.js +6 -6
- package/dist/components/link/link.js +3 -3
- package/dist/components/list/list-item.js +3 -3
- package/dist/components/list/list.d.ts.map +1 -1
- package/dist/components/list/list.js +4 -4
- package/dist/components/menu/menu-box-button.js +4 -4
- package/dist/components/menu/menu-button.js +4 -4
- package/dist/components/menu/menu-divider.js +1 -1
- package/dist/components/menu/menu-group.d.ts.map +1 -1
- package/dist/components/menu/menu-group.js +12 -12
- package/dist/components/menu/menu-icon-button.js +4 -4
- package/dist/components/menu/menu-item.d.ts.map +1 -1
- package/dist/components/menu/menu-item.js +8 -8
- package/dist/components/menu/menu-list.js +3 -3
- package/dist/components/menu/menu-recipe.d.ts.map +1 -1
- package/dist/components/menu/menu-recipe.js +1 -1
- package/dist/components/menu/menu.js +4 -4
- package/dist/components/message/message.js +9 -9
- package/dist/components/modal/modal-body.js +3 -3
- package/dist/components/modal/modal-close-button.js +6 -6
- package/dist/components/modal/modal-footer.js +3 -3
- package/dist/components/modal/modal-header.js +3 -3
- package/dist/components/modal/modal.composition.d.ts.map +1 -1
- package/dist/components/modal/modal.js +8 -8
- package/dist/components/navigation-list/navigation-list-item.js +13 -13
- package/dist/components/navigation-list/navigation-list.js +4 -4
- package/dist/components/paginator/paginator-recipe.d.ts.map +1 -1
- package/dist/components/paginator/paginator-recipe.js +3 -3
- package/dist/components/paginator/paginator.composition.d.ts.map +1 -1
- package/dist/components/paginator/paginator.d.ts +1 -4
- package/dist/components/paginator/paginator.d.ts.map +1 -1
- package/dist/components/paginator/paginator.js +31 -30
- package/dist/components/paginator/paginator.translations.d.ts +7 -0
- package/dist/components/paginator/paginator.translations.d.ts.map +1 -0
- package/dist/components/paginator/paginator.translations.js +66 -0
- package/dist/components/phone-input/country-data.d.ts +2 -2
- package/dist/components/phone-input/country-data.d.ts.map +1 -1
- package/dist/components/phone-input/country-list.js +6 -6
- package/dist/components/phone-input/country-selector.d.ts +1 -4
- package/dist/components/phone-input/country-selector.d.ts.map +1 -1
- package/dist/components/phone-input/country-selector.js +86 -84
- package/dist/components/phone-input/phone-input-helpers.d.ts +4 -5
- package/dist/components/phone-input/phone-input-helpers.d.ts.map +1 -1
- package/dist/components/phone-input/phone-input-helpers.js +33 -34
- package/dist/components/phone-input/phone-input.d.ts +1 -1
- package/dist/components/phone-input/phone-input.d.ts.map +1 -1
- package/dist/components/phone-input/phone-input.js +38 -38
- package/dist/components/phone-input/phone-input.translations.d.ts +10 -0
- package/dist/components/phone-input/phone-input.translations.d.ts.map +1 -0
- package/dist/components/phone-input/phone-input.translations.js +102 -0
- package/dist/components/phone-input/types.d.ts +0 -3
- package/dist/components/phone-input/types.d.ts.map +1 -1
- package/dist/components/phone-input/use-phone-input.d.ts +0 -3
- package/dist/components/phone-input/use-phone-input.d.ts.map +1 -1
- package/dist/components/phone-input/use-phone-input.js +82 -81
- package/dist/components/quantity-button/quantity-button.composition.d.ts.map +1 -1
- package/dist/components/quantity-button/quantity-button.d.ts.map +1 -1
- package/dist/components/quantity-button/quantity-button.js +13 -13
- package/dist/components/radio/hover-styles.js +1 -1
- package/dist/components/radio/radio-group-recipe.js +1 -1
- package/dist/components/radio/radio-group.js +4 -4
- package/dist/components/radio/radio.d.ts +1 -1
- package/dist/components/radio/radio.d.ts.map +1 -1
- package/dist/components/radio/radio.js +15 -15
- package/dist/components/radio-card/hover-styles.js +1 -1
- package/dist/components/radio-card/radio-card-group.d.ts.map +1 -1
- package/dist/components/radio-card/radio-card-group.js +4 -4
- package/dist/components/radio-card/radio-card.d.ts +1 -1
- package/dist/components/radio-card/radio-card.js +10 -10
- package/dist/components/rich-text-editor/index.d.ts +1 -1
- package/dist/components/rich-text-editor/index.d.ts.map +1 -1
- package/dist/components/rich-text-editor/rich-text-editor-context.d.ts +0 -2
- package/dist/components/rich-text-editor/rich-text-editor-context.d.ts.map +1 -1
- package/dist/components/rich-text-editor/rich-text-editor-control.d.ts.map +1 -1
- package/dist/components/rich-text-editor/rich-text-editor-control.js +130 -129
- package/dist/components/rich-text-editor/rich-text-editor-recipe.d.ts.map +1 -1
- package/dist/components/rich-text-editor/rich-text-editor-recipe.js +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.d.ts +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.d.ts.map +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.js +23 -26
- package/dist/components/rich-text-editor/{translations.d.ts → rich-text-editor.translations.d.ts} +3 -5
- package/dist/components/rich-text-editor/rich-text-editor.translations.d.ts.map +1 -0
- package/dist/components/rich-text-editor/rich-text-editor.translations.js +234 -0
- package/dist/components/rich-text-editor/rich-text-renderer.js +4 -4
- package/dist/components/rich-text-editor/types.d.ts +0 -2
- package/dist/components/rich-text-editor/types.d.ts.map +1 -1
- package/dist/components/segmented-control/segmented-control.d.ts.map +1 -1
- package/dist/components/segmented-control/segmented-control.js +6 -6
- package/dist/components/select/select-recipe.js +1 -1
- package/dist/components/select/select.js +6 -6
- package/dist/components/skeleton/skeleton-text.d.ts.map +1 -1
- package/dist/components/skeleton/skeleton-text.js +4 -4
- package/dist/components/skeleton/skeleton.d.ts.map +1 -1
- package/dist/components/skeleton/skeleton.js +4 -4
- package/dist/components/spinner/spinner.d.ts.map +1 -1
- package/dist/components/spinner/spinner.js +6 -6
- package/dist/components/stack/stack.d.ts +1 -1
- package/dist/components/stack/stack.js +3 -3
- package/dist/components/stepper/step-context.d.ts +4 -4
- package/dist/components/stepper/step-context.d.ts.map +1 -1
- package/dist/components/stepper/step.d.ts.map +1 -1
- package/dist/components/stepper/step.js +28 -28
- package/dist/components/stepper/stepper.js +9 -9
- package/dist/components/stepper/types.d.ts +4 -4
- package/dist/components/stepper/types.d.ts.map +1 -1
- package/dist/components/switch/hover-styles.js +1 -1
- package/dist/components/switch/switch.js +6 -6
- package/dist/components/table/table-cell.d.ts +1 -3
- package/dist/components/table/table-cell.d.ts.map +1 -1
- package/dist/components/table/table-cell.js +44 -47
- package/dist/components/table/table-column-resize-handle.d.ts.map +1 -1
- package/dist/components/table/table-column-resize-handle.js +23 -22
- package/dist/components/table/table-content.d.ts.map +1 -1
- package/dist/components/table/table-content.js +82 -80
- package/dist/components/table/table-context-provider.d.ts +1 -4
- package/dist/components/table/table-context-provider.d.ts.map +1 -1
- package/dist/components/table/table-context-provider.js +137 -140
- package/dist/components/table/table-drag-accessibility.d.ts +3 -3
- package/dist/components/table/table-drag-accessibility.d.ts.map +1 -1
- package/dist/components/table/table-drag-accessibility.js +10 -14
- package/dist/components/table/table-filter.d.ts.map +1 -1
- package/dist/components/table/table-filter.js +60 -60
- package/dist/components/table/table-header-dropdown.d.ts +0 -2
- package/dist/components/table/table-header-dropdown.d.ts.map +1 -1
- package/dist/components/table/table-header-dropdown.js +29 -28
- package/dist/components/table/table-header-row.d.ts.map +1 -1
- package/dist/components/table/table-header-row.js +56 -59
- package/dist/components/table/table-recipe.js +1 -1
- package/dist/components/table/table-row-drag-handle.d.ts +1 -3
- package/dist/components/table/table-row-drag-handle.d.ts.map +1 -1
- package/dist/components/table/table-row-drag-handle.js +11 -10
- package/dist/components/table/table-row-expand-toggle-button.d.ts +1 -3
- package/dist/components/table/table-row-expand-toggle-button.d.ts.map +1 -1
- package/dist/components/table/table-row-expand-toggle-button.js +10 -9
- package/dist/components/table/table-row.d.ts.map +1 -1
- package/dist/components/table/table-row.js +5 -6
- package/dist/components/table/table-sorted-reorder-prompt.d.ts +1 -3
- package/dist/components/table/table-sorted-reorder-prompt.d.ts.map +1 -1
- package/dist/components/table/table-sorted-reorder-prompt.js +29 -28
- package/dist/components/table/table-toolbar-actions.d.ts.map +1 -1
- package/dist/components/table/table-toolbar-actions.js +4 -4
- package/dist/components/table/table-toolbar-add-button.d.ts.map +1 -1
- package/dist/components/table/table-toolbar-add-button.js +4 -4
- package/dist/components/table/table-toolbar-settings.d.ts.map +1 -1
- package/dist/components/table/table-toolbar-settings.js +110 -108
- package/dist/components/table/table-toolbar.d.ts.map +1 -1
- package/dist/components/table/table-toolbar.js +14 -14
- package/dist/components/table/table.composition.d.ts.map +1 -1
- package/dist/components/table/table.d.ts +1 -1
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/table/table.js +31 -32
- package/dist/components/table/table.translations.d.ts +45 -0
- package/dist/components/table/table.translations.d.ts.map +1 -0
- package/dist/components/table/table.translations.js +522 -0
- package/dist/components/table/types.d.ts +0 -5
- package/dist/components/table/types.d.ts.map +1 -1
- package/dist/components/tabs/tab-list.js +3 -3
- package/dist/components/tabs/tab-panel.js +3 -3
- package/dist/components/tabs/tab-panels.js +3 -3
- package/dist/components/tabs/tab-with-image.js +11 -11
- package/dist/components/tabs/tab.js +4 -4
- package/dist/components/tabs/tabs-recipe.js +1 -1
- package/dist/components/tabs/tabs.js +3 -3
- package/dist/components/tabs/types.d.ts +2 -2
- package/dist/components/tabs/types.d.ts.map +1 -1
- package/dist/components/tag/tag-recipe.js +5 -5
- package/dist/components/tag/tag.js +28 -28
- package/dist/components/text/text.d.ts.map +1 -1
- package/dist/components/text/text.js +5 -5
- package/dist/components/textarea/textarea-recipe.js +1 -1
- package/dist/components/textarea/textarea.js +3 -3
- package/dist/components/toaster/toast-store.d.ts +2 -2
- package/dist/components/toaster/toast-store.d.ts.map +1 -1
- package/dist/components/toaster/toaster.js +10 -10
- package/dist/components/toggle-button/toggle-button.js +3 -3
- package/dist/components/toggle-button/use-button-children.js +11 -11
- package/dist/components/tooltip/tooltip.d.ts +1 -1
- package/dist/components/tooltip/tooltip.js +10 -10
- package/dist/index.js +404 -402
- package/dist/node_modules/libphonenumber-js/metadata.mobile.json.js +13 -19
- package/dist/test-utils/render-with-theme.d.ts +5 -1
- package/dist/test-utils/render-with-theme.d.ts.map +1 -1
- package/dist/theme/index.d.ts +4 -0
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/locale-provider.d.ts +9 -0
- package/dist/theme/locale-provider.d.ts.map +1 -0
- package/dist/theme/locale-provider.js +14 -0
- package/dist/theme/locale-provider.spec.d.ts +2 -0
- package/dist/theme/locale-provider.spec.d.ts.map +1 -0
- package/dist/theme/theme-casper-ui.d.ts.map +1 -1
- package/dist/theme/theme-casper-ui.js +1 -1
- package/dist/theme/theme-locale.d.ts +7 -0
- package/dist/theme/theme-locale.d.ts.map +1 -0
- package/dist/theme/theme-locale.js +8 -0
- package/dist/theme/theme-provider.d.ts +4 -1
- package/dist/theme/theme-provider.d.ts.map +1 -1
- package/dist/theme/theme-provider.js +30 -25
- package/dist/theme/theme-style-props.d.ts +25 -25
- package/dist/theme/theme-style-props.d.ts.map +1 -1
- package/dist/theme/theme-types.d.ts +46 -10
- package/dist/theme/theme-types.d.ts.map +1 -1
- package/dist/theme/theme-types.js +2 -2
- package/dist/theme/theme-types.spec.d.ts +2 -0
- package/dist/theme/theme-types.spec.d.ts.map +1 -0
- package/dist/theme/theme.d.ts.map +1 -1
- package/dist/theme/theme.js +1 -1
- package/dist/theme/translations.d.ts +14 -0
- package/dist/theme/translations.d.ts.map +1 -0
- package/dist/theme/translations.js +10 -0
- package/dist/theme/translations.spec.d.ts +2 -0
- package/dist/theme/translations.spec.d.ts.map +1 -0
- package/package.json +6 -6
- package/dist/components/collapsible/translations.d.ts +0 -32
- package/dist/components/collapsible/translations.d.ts.map +0 -1
- package/dist/components/collapsible/translations.js +0 -30
- package/dist/components/combobox/translations.d.ts +0 -9
- package/dist/components/combobox/translations.d.ts.map +0 -1
- package/dist/components/combobox/translations.js +0 -57
- package/dist/components/image-upload/translations.d.ts +0 -73
- package/dist/components/image-upload/translations.d.ts.map +0 -1
- package/dist/components/image-upload/translations.js +0 -66
- package/dist/components/paginator/translations.d.ts +0 -9
- package/dist/components/paginator/translations.d.ts.map +0 -1
- package/dist/components/paginator/translations.js +0 -36
- package/dist/components/phone-input/translations.d.ts +0 -60
- package/dist/components/phone-input/translations.d.ts.map +0 -1
- package/dist/components/phone-input/translations.js +0 -54
- package/dist/components/rich-text-editor/translations.d.ts.map +0 -1
- package/dist/components/rich-text-editor/translations.js +0 -120
- package/dist/components/table/translations.d.ts +0 -308
- package/dist/components/table/translations.d.ts.map +0 -1
- package/dist/components/table/translations.js +0 -267
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { require_compiler_runtime as e } from "../../node_modules/react/compiler-runtime.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ThemeColor as t, ThemeIconSize as n } from "../../theme/theme-types.js";
|
|
3
3
|
import { CheckIcon as r } from "./check-icon.js";
|
|
4
4
|
import { hoverStyles as i } from "./hover-styles.js";
|
|
5
5
|
import { useRadioGroupVariant as a } from "./radio-group-context.js";
|
|
6
6
|
import o from "react";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
8
|
+
import { Flex as u, RadioGroup as d } from "@chakra-ui/react";
|
|
9
9
|
//#region lib/components/radio/radio.tsx
|
|
10
10
|
var f = e(), p = o.forwardRef((e, n) => {
|
|
11
|
-
let r = (0, f.c)(26), o,
|
|
12
|
-
r[0] === e ? (o = r[1],
|
|
11
|
+
let r = (0, f.c)(26), o, s, p, h, g, _, v, y;
|
|
12
|
+
r[0] === e ? (o = r[1], s = r[2], p = r[3], h = r[4], g = r[5], _ = r[6], v = r[7], y = r[8]) : ({value: y, children: o, defaultChecked: s, isInvalid: g, isDisabled: h, id: p, name: _, ...v} = e, r[0] = e, r[1] = o, r[2] = s, r[3] = p, r[4] = h, r[5] = g, r[6] = _, r[7] = v, r[8] = y);
|
|
13
13
|
let b = a(), x;
|
|
14
|
-
r[9] !== p || r[10] !== _ || r[11] !== n ? (x = /* @__PURE__ */
|
|
14
|
+
r[9] !== p || r[10] !== _ || r[11] !== n ? (x = /* @__PURE__ */ c(d.ItemHiddenInput, {
|
|
15
15
|
ref: n,
|
|
16
16
|
id: p,
|
|
17
17
|
name: _
|
|
18
18
|
}), r[9] = p, r[10] = _, r[11] = n, r[12] = x) : x = r[12];
|
|
19
19
|
let S;
|
|
20
|
-
r[13] === b ? S = r[14] : (S = b === "addon" ? /* @__PURE__ */
|
|
20
|
+
r[13] === b ? S = r[14] : (S = b === "addon" ? /* @__PURE__ */ c(d.ItemControl, {
|
|
21
21
|
className: "radio__item-indicator",
|
|
22
|
-
children: /* @__PURE__ */
|
|
23
|
-
}) : /* @__PURE__ */
|
|
22
|
+
children: /* @__PURE__ */ c(d.ItemContext, { children: m })
|
|
23
|
+
}) : /* @__PURE__ */ c(d.ItemIndicator, {
|
|
24
24
|
className: "radio__item-indicator",
|
|
25
25
|
_invalid: {
|
|
26
26
|
borderColor: t.Error,
|
|
@@ -42,16 +42,16 @@ var f = e(), p = o.forwardRef((e, n) => {
|
|
|
42
42
|
}
|
|
43
43
|
}), r[13] = b, r[14] = S);
|
|
44
44
|
let C;
|
|
45
|
-
r[15] === o ? C = r[16] : (C = o && /* @__PURE__ */
|
|
45
|
+
r[15] === o ? C = r[16] : (C = o && /* @__PURE__ */ c(d.ItemText, {
|
|
46
46
|
width: "100%",
|
|
47
47
|
children: o
|
|
48
48
|
}), r[15] = o, r[16] = C);
|
|
49
49
|
let w;
|
|
50
|
-
return r[17] !==
|
|
50
|
+
return r[17] !== s || r[18] !== h || r[19] !== g || r[20] !== v || r[21] !== x || r[22] !== S || r[23] !== C || r[24] !== y ? (w = /* @__PURE__ */ c(u, {
|
|
51
51
|
css: i,
|
|
52
|
-
children: /* @__PURE__ */ d
|
|
52
|
+
children: /* @__PURE__ */ l(d.Item, {
|
|
53
53
|
value: y,
|
|
54
|
-
defaultChecked:
|
|
54
|
+
defaultChecked: s,
|
|
55
55
|
invalid: g,
|
|
56
56
|
disabled: h,
|
|
57
57
|
w: "100%",
|
|
@@ -62,10 +62,10 @@ var f = e(), p = o.forwardRef((e, n) => {
|
|
|
62
62
|
C
|
|
63
63
|
]
|
|
64
64
|
}, y)
|
|
65
|
-
}), r[17] =
|
|
65
|
+
}), r[17] = s, r[18] = h, r[19] = g, r[20] = v, r[21] = x, r[22] = S, r[23] = C, r[24] = y, r[25] = w) : w = r[25], w;
|
|
66
66
|
});
|
|
67
67
|
function m(e) {
|
|
68
|
-
return /* @__PURE__ */
|
|
68
|
+
return /* @__PURE__ */ c(s, { children: e.checked && /* @__PURE__ */ c(r, {
|
|
69
69
|
color: t.OnAccent,
|
|
70
70
|
size: n.Medium
|
|
71
71
|
}) });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ThemeColor as e } from "../../theme/theme-types.js";
|
|
2
2
|
import "@chakra-ui/react";
|
|
3
3
|
//#region lib/components/radio-card/hover-styles.ts
|
|
4
4
|
var t = "& label[data-state=\"checked\"]:not(:active):not([data-disabled]):hover", n = "& label[data-state=\"unchecked\"]:not(:active):not([data-disabled]):not([data-invalid]):hover", r = "& label[data-invalid][data-state=\"unchecked\"]:hover", i = { "@media(hover: hover)": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-card-group.d.ts","sourceRoot":"","sources":["../../../lib/components/radio-card/radio-card-group.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"radio-card-group.d.ts","sourceRoot":"","sources":["../../../lib/components/radio-card/radio-card-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,SAAS,CAAC;AAC3D,OAAO,EAAE,SAAS,IAAI,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEhE,KAAK,yBAAyB,GAAG,IAAI,CACpC,eAAe,CAAC,SAAS,EACzB,UAAU,GAAG,MAAM,GAAG,cAAc,GAAG,OAAO,GAAG,eAAe,CAChE,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,yBAAyB,GAC1D,eAAe,GAAG;IAEjB,UAAU,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEH;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAC9B,QAAQ,EACR,IAAI,EACJ,UAAU,EACV,YAAY,EACZ,KAAK,EACL,aAAa,EACb,OAAgB,EAChB,aAAwB,EACxB,GAAuB,EACvB,GAAG,KAAK,EACR,EAAE,mBAAmB,+BAgBrB"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { require_compiler_runtime as e } from "../../node_modules/react/compiler-runtime.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { ThemeSpace as t } from "../../theme/theme-types.js";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
import { RadioCard as r } from "@chakra-ui/react";
|
|
5
5
|
//#region lib/components/radio-card/radio-card-group.tsx
|
|
6
6
|
var i = e();
|
|
7
7
|
function a(e) {
|
|
8
8
|
let a = (0, i.c)(22), o, s, c, l, u, d, f, p, m, h;
|
|
9
9
|
a[0] === e ? (o = a[1], s = a[2], c = a[3], l = a[4], u = a[5], d = a[6], f = a[7], p = a[8], m = a[9], h = a[10]) : ({children: o, name: l, isDisabled: c, defaultValue: s, value: h, onValueChange: u, display: f, flexDirection: p, gap: m, ...d} = e, a[0] = e, a[1] = o, a[2] = s, a[3] = c, a[4] = l, a[5] = u, a[6] = d, a[7] = f, a[8] = p, a[9] = m, a[10] = h);
|
|
10
10
|
let g = f === void 0 ? "flex" : f, _ = p === void 0 ? "column" : p, v = m === void 0 ? t.Medium : m, y;
|
|
11
|
-
return a[11] !== o || a[12] !== s || a[13] !== g || a[14] !== _ || a[15] !== v || a[16] !== c || a[17] !== l || a[18] !== u || a[19] !== d || a[20] !== h ? (y = /* @__PURE__ */ r
|
|
11
|
+
return a[11] !== o || a[12] !== s || a[13] !== g || a[14] !== _ || a[15] !== v || a[16] !== c || a[17] !== l || a[18] !== u || a[19] !== d || a[20] !== h ? (y = /* @__PURE__ */ n(r.Root, {
|
|
12
12
|
name: l,
|
|
13
13
|
disabled: c,
|
|
14
14
|
defaultValue: s,
|
|
@@ -13,7 +13,7 @@ export type RadioCardProps = CustomProperties & Pick<ChakraRadioCard.ItemProps,
|
|
|
13
13
|
*
|
|
14
14
|
* @see Docs https://caspeco.github.io/casper-ui-library/components/radio#custom-radios
|
|
15
15
|
*/
|
|
16
|
-
export declare const RadioCard: React.ForwardRefExoticComponent<CustomProperties & Pick<ChakraRadioCard.ItemProps, "
|
|
16
|
+
export declare const RadioCard: React.ForwardRefExoticComponent<CustomProperties & Pick<ChakraRadioCard.ItemProps, "value" | "id"> & Pick<ChakraRadioCard.ItemControlProps, "onChange"> & CustomChakraBoxProps & LayoutProps & MarginProps & PaddingProps & {
|
|
17
17
|
isDisabled?: boolean;
|
|
18
18
|
isInvalid?: boolean;
|
|
19
19
|
name?: string;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { require_compiler_runtime as e } from "../../node_modules/react/compiler-runtime.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ThemeBorder as t, ThemeColor as n, ThemeFont as r, ThemeFontSize as i, ThemeRadius as a, ThemeSpace as o } from "../../theme/theme-types.js";
|
|
3
3
|
import { hoverStylesCard as s } from "./hover-styles.js";
|
|
4
4
|
import c from "react";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
6
|
+
import { Box as d, RadioCard as f } from "@chakra-ui/react";
|
|
7
7
|
//#region lib/components/radio-card/radio-card.tsx
|
|
8
8
|
var p = e(), m = c.forwardRef((e, c) => {
|
|
9
9
|
let m = (0, p.c)(32), h, g, _, v, y, b, x, S, C, w;
|
|
10
10
|
m[0] === e ? (h = m[1], g = m[2], _ = m[3], v = m[4], y = m[5], b = m[6], x = m[7], S = m[8], C = m[9], w = m[10]) : ({children: h, id: g, name: y, value: w, isDisabled: _, isInvalid: v, onChange: b, alignItems: S, alignContent: C, ...x} = e, m[0] = e, m[1] = h, m[2] = g, m[3] = _, m[4] = v, m[5] = y, m[6] = b, m[7] = x, m[8] = S, m[9] = C, m[10] = w);
|
|
11
11
|
let T = S === void 0 ? "center" : S, E = C === void 0 ? "center" : C, D;
|
|
12
|
-
m[11] !== g || m[12] !== y || m[13] !== b || m[14] !== c ? (D = /* @__PURE__ */
|
|
12
|
+
m[11] !== g || m[12] !== y || m[13] !== b || m[14] !== c ? (D = /* @__PURE__ */ l(f.ItemHiddenInput, {
|
|
13
13
|
ref: c,
|
|
14
14
|
id: g,
|
|
15
15
|
name: y,
|
|
@@ -45,11 +45,11 @@ var p = e(), m = c.forwardRef((e, c) => {
|
|
|
45
45
|
boxShadow: `0 0 0 4px ${n.ErrorContainer}`
|
|
46
46
|
}, m[19] = j, m[20] = M) : (j = m[19], M = m[20]);
|
|
47
47
|
let N;
|
|
48
|
-
m[21] !== E || m[22] !== T || m[23] !== h ? (N = /* @__PURE__ */
|
|
48
|
+
m[21] !== E || m[22] !== T || m[23] !== h ? (N = /* @__PURE__ */ l(f.ItemControl, {
|
|
49
49
|
className: "radio-card__item-control",
|
|
50
50
|
whiteSpace: "nowrap",
|
|
51
|
-
fontFamily:
|
|
52
|
-
fontSize:
|
|
51
|
+
fontFamily: r.Body,
|
|
52
|
+
fontSize: i.Medium,
|
|
53
53
|
bg: n.Surface,
|
|
54
54
|
borderRadius: a.Small,
|
|
55
55
|
px: o.Medium,
|
|
@@ -64,16 +64,16 @@ var p = e(), m = c.forwardRef((e, c) => {
|
|
|
64
64
|
_disabled: k,
|
|
65
65
|
_active: j,
|
|
66
66
|
_invalid: M,
|
|
67
|
-
children: /* @__PURE__ */
|
|
67
|
+
children: /* @__PURE__ */ l(f.ItemContent, {
|
|
68
68
|
alignContent: E,
|
|
69
69
|
alignItems: T,
|
|
70
70
|
children: h
|
|
71
71
|
})
|
|
72
72
|
}), m[21] = E, m[22] = T, m[23] = h, m[24] = N) : N = m[24];
|
|
73
73
|
let P;
|
|
74
|
-
return m[25] !== _ || m[26] !== v || m[27] !== x || m[28] !== D || m[29] !== N || m[30] !== w ? (P = /* @__PURE__ */ d
|
|
74
|
+
return m[25] !== _ || m[26] !== v || m[27] !== x || m[28] !== D || m[29] !== N || m[30] !== w ? (P = /* @__PURE__ */ l(d, {
|
|
75
75
|
css: s,
|
|
76
|
-
children: /* @__PURE__ */ f
|
|
76
|
+
children: /* @__PURE__ */ u(f.Item, {
|
|
77
77
|
value: w,
|
|
78
78
|
disabled: _,
|
|
79
79
|
invalid: v,
|
|
@@ -21,6 +21,6 @@ export declare const RichTextEditor: {
|
|
|
21
21
|
export { parseHtmlToContent, richTextExtensions } from './extensions.js';
|
|
22
22
|
export { useRichTextEditorContext } from './rich-text-editor-context.js';
|
|
23
23
|
export { RichTextRenderer } from './rich-text-renderer.js';
|
|
24
|
-
export type { JSONContent,
|
|
24
|
+
export type { JSONContent, RichTextEditorRootProps, RichTextEditorToolbarProps, RichTextRendererProps, UseRichTextEditorOptions, } from './types.js';
|
|
25
25
|
export { useRichTextEditor } from './use-rich-text-editor.js';
|
|
26
26
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/rich-text-editor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,qBAAqB,EACrB,0BAA0B,EAC1B,kBAAkB,EAClB,qBAAqB,EACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACN,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,WAAW,EACX,WAAW,EACX,SAAS,EACT,MAAM,4BAA4B,CAAC;AAEpC,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;CAiB1B,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,YAAY,EACX,WAAW,EACX,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/rich-text-editor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,qBAAqB,EACrB,0BAA0B,EAC1B,kBAAkB,EAClB,qBAAqB,EACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACN,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,WAAW,EACX,WAAW,EACX,SAAS,EACT,MAAM,4BAA4B,CAAC;AAEpC,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;CAiB1B,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,YAAY,EACX,WAAW,EACX,uBAAuB,EACvB,0BAA0B,EAC1B,qBAAqB,EACrB,wBAAwB,GACxB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { Editor } from '@tiptap/core';
|
|
2
|
-
import { RichTextEditorLocale } from './types.js';
|
|
3
2
|
interface RichTextEditorContextValue {
|
|
4
3
|
editor: Editor | null;
|
|
5
|
-
locale: RichTextEditorLocale;
|
|
6
4
|
}
|
|
7
5
|
export declare const RichTextEditorContext: import('react').Context<RichTextEditorContextValue | null>;
|
|
8
6
|
export declare function useRichTextEditorContext(): RichTextEditorContextValue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rich-text-editor-context.d.ts","sourceRoot":"","sources":["../../../lib/components/rich-text-editor/rich-text-editor-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"rich-text-editor-context.d.ts","sourceRoot":"","sources":["../../../lib/components/rich-text-editor/rich-text-editor-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAG3C,UAAU,0BAA0B;IACnC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,qBAAqB,4DAAyD,CAAC;AAI5F,wBAAgB,wBAAwB,IAAI,0BAA0B,CAMrE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rich-text-editor-control.d.ts","sourceRoot":"","sources":["../../../lib/components/rich-text-editor/rich-text-editor-control.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rich-text-editor-control.d.ts","sourceRoot":"","sources":["../../../lib/components/rich-text-editor/rich-text-editor-control.tsx"],"names":[],"mappings":"AAyBA,wBAAgB,IAAI,gCAGnB;AAQD,wBAAgB,MAAM,gCAGrB;AAQD,wBAAgB,SAAS,gCAGxB;AAQD,wBAAgB,UAAU,gCAGzB;AAQD,wBAAgB,WAAW,gCAG1B;AAUD,wBAAgB,QAAQ,gCAGvB;AAQD,wBAAgB,QAAQ,gCAGvB;AAQD,wBAAgB,QAAQ,gCAGvB;AAQD,wBAAgB,QAAQ,gCAGvB;AAwBD,wBAAgB,WAAW,uCAyG1B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { require_compiler_runtime as e } from "../../node_modules/react/compiler-runtime.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ThemeFontSize as t, ThemeIconSize as n, ThemeSpace as r } from "../../theme/theme-types.js";
|
|
3
3
|
import { LinkIcon as i } from "../icon/icons/link-icon.js";
|
|
4
4
|
import { ListOLIcon as a } from "../icon/icons/list-ol-icon.js";
|
|
5
5
|
import { ListULIcon as o } from "../icon/icons/list-ul-icon.js";
|
|
@@ -7,84 +7,85 @@ import { Menu as s } from "../menu/menu.js";
|
|
|
7
7
|
import { Button as c } from "../button/button.js";
|
|
8
8
|
import { MenuButton as ee } from "../menu/menu-button.js";
|
|
9
9
|
import { MenuList as te } from "../menu/menu-list.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
10
|
+
import { useComponentTranslations as l } from "../../theme/translations.js";
|
|
11
|
+
import { FormControl as u } from "../form-control/form-control.js";
|
|
12
|
+
import { FormLabel as d } from "../form-control/form-label.js";
|
|
13
|
+
import { Input as f } from "../input/input.js";
|
|
14
|
+
import { useEditorState as p } from "../../packages/casper-ui-library/node_modules/@tiptap/react/dist/index.js";
|
|
15
|
+
import { useRichTextEditorContext as m } from "./rich-text-editor-context.js";
|
|
15
16
|
import { Tooltip as ne } from "../tooltip/tooltip.js";
|
|
16
|
-
import { find as
|
|
17
|
-
import { BooleanControl as
|
|
18
|
-
import {
|
|
19
|
-
import { useState as
|
|
17
|
+
import { find as h } from "../../node_modules/linkifyjs/dist/linkify.js";
|
|
18
|
+
import { BooleanControl as g } from "./boolean-control.js";
|
|
19
|
+
import { richTextEditorTranslations as _ } from "./rich-text-editor.translations.js";
|
|
20
|
+
import { useState as v } from "react";
|
|
21
|
+
import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
20
22
|
import { Box as re } from "@chakra-ui/react";
|
|
21
|
-
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
22
23
|
//#region lib/components/rich-text-editor/rich-text-editor-control.tsx
|
|
23
|
-
var
|
|
24
|
-
icon: /* @__PURE__ */
|
|
24
|
+
var x = e(), S = {
|
|
25
|
+
icon: /* @__PURE__ */ y("strong", { children: "B" }),
|
|
25
26
|
command: (e) => e.chain().focus().toggleBold().run(),
|
|
26
27
|
isActive: (e) => e.isActive("bold")
|
|
27
28
|
};
|
|
28
|
-
function
|
|
29
|
-
let e = (0,
|
|
30
|
-
return e[0] ===
|
|
31
|
-
...
|
|
32
|
-
label:
|
|
33
|
-
}), e[0] =
|
|
29
|
+
function C() {
|
|
30
|
+
let e = (0, x.c)(2), t = l(_), n;
|
|
31
|
+
return e[0] === t.bold ? n = e[1] : (n = /* @__PURE__ */ y(g, {
|
|
32
|
+
...S,
|
|
33
|
+
label: t.bold
|
|
34
|
+
}), e[0] = t.bold, e[1] = n), n;
|
|
34
35
|
}
|
|
35
|
-
var
|
|
36
|
-
icon: /* @__PURE__ */
|
|
36
|
+
var w = {
|
|
37
|
+
icon: /* @__PURE__ */ y("em", { children: "I" }),
|
|
37
38
|
command: (e) => e.chain().focus().toggleItalic().run(),
|
|
38
39
|
isActive: (e) => e.isActive("italic")
|
|
39
40
|
};
|
|
40
|
-
function
|
|
41
|
-
let e = (0,
|
|
42
|
-
return e[0] ===
|
|
43
|
-
...
|
|
44
|
-
label:
|
|
45
|
-
}), e[0] =
|
|
41
|
+
function T() {
|
|
42
|
+
let e = (0, x.c)(2), t = l(_), n;
|
|
43
|
+
return e[0] === t.italic ? n = e[1] : (n = /* @__PURE__ */ y(g, {
|
|
44
|
+
...w,
|
|
45
|
+
label: t.italic
|
|
46
|
+
}), e[0] = t.italic, e[1] = n), n;
|
|
46
47
|
}
|
|
47
|
-
var
|
|
48
|
-
icon: /* @__PURE__ */
|
|
48
|
+
var E = {
|
|
49
|
+
icon: /* @__PURE__ */ y("span", {
|
|
49
50
|
style: { textDecoration: "underline" },
|
|
50
51
|
children: "U"
|
|
51
52
|
}),
|
|
52
53
|
command: (e) => e.chain().focus().toggleUnderline().run(),
|
|
53
54
|
isActive: (e) => e.isActive("underline")
|
|
54
55
|
};
|
|
55
|
-
function
|
|
56
|
-
let e = (0,
|
|
57
|
-
return e[0] ===
|
|
58
|
-
...
|
|
59
|
-
label:
|
|
60
|
-
}), e[0] =
|
|
56
|
+
function D() {
|
|
57
|
+
let e = (0, x.c)(2), t = l(_), n;
|
|
58
|
+
return e[0] === t.underline ? n = e[1] : (n = /* @__PURE__ */ y(g, {
|
|
59
|
+
...E,
|
|
60
|
+
label: t.underline
|
|
61
|
+
}), e[0] = t.underline, e[1] = n), n;
|
|
61
62
|
}
|
|
62
|
-
var
|
|
63
|
-
icon: /* @__PURE__ */
|
|
63
|
+
var O = {
|
|
64
|
+
icon: /* @__PURE__ */ y(o, { size: n.Small }),
|
|
64
65
|
command: (e) => e.chain().focus().toggleBulletList().run(),
|
|
65
66
|
isActive: (e) => e.isActive("bulletList")
|
|
66
67
|
};
|
|
67
|
-
function
|
|
68
|
-
let e = (0,
|
|
69
|
-
return e[0] ===
|
|
70
|
-
...
|
|
71
|
-
label:
|
|
72
|
-
}), e[0] =
|
|
68
|
+
function k() {
|
|
69
|
+
let e = (0, x.c)(2), t = l(_), n;
|
|
70
|
+
return e[0] === t.bulletList ? n = e[1] : (n = /* @__PURE__ */ y(g, {
|
|
71
|
+
...O,
|
|
72
|
+
label: t.bulletList
|
|
73
|
+
}), e[0] = t.bulletList, e[1] = n), n;
|
|
73
74
|
}
|
|
74
|
-
var
|
|
75
|
-
icon: /* @__PURE__ */
|
|
75
|
+
var A = {
|
|
76
|
+
icon: /* @__PURE__ */ y(a, { size: n.Small }),
|
|
76
77
|
command: (e) => e.chain().focus().toggleOrderedList().run(),
|
|
77
78
|
isActive: (e) => e.isActive("orderedList")
|
|
78
79
|
};
|
|
79
|
-
function
|
|
80
|
-
let e = (0,
|
|
81
|
-
return e[0] ===
|
|
82
|
-
...
|
|
83
|
-
label:
|
|
84
|
-
}), e[0] =
|
|
80
|
+
function j() {
|
|
81
|
+
let e = (0, x.c)(2), t = l(_), n;
|
|
82
|
+
return e[0] === t.orderedList ? n = e[1] : (n = /* @__PURE__ */ y(g, {
|
|
83
|
+
...A,
|
|
84
|
+
label: t.orderedList
|
|
85
|
+
}), e[0] = t.orderedList, e[1] = n), n;
|
|
85
86
|
}
|
|
86
|
-
var
|
|
87
|
-
icon: /* @__PURE__ */
|
|
87
|
+
var M = {
|
|
88
|
+
icon: /* @__PURE__ */ y("span", {
|
|
88
89
|
style: {
|
|
89
90
|
fontSize: "0.8em",
|
|
90
91
|
fontWeight: 600
|
|
@@ -94,15 +95,15 @@ var j = {
|
|
|
94
95
|
command: (e) => e.chain().focus().toggleHeading({ level: 1 }).run(),
|
|
95
96
|
isActive: (e) => e.isActive("heading", { level: 1 })
|
|
96
97
|
};
|
|
97
|
-
function
|
|
98
|
-
let e = (0,
|
|
99
|
-
return e[0] ===
|
|
100
|
-
...
|
|
101
|
-
label:
|
|
102
|
-
}), e[0] =
|
|
98
|
+
function N() {
|
|
99
|
+
let e = (0, x.c)(2), t = l(_), n;
|
|
100
|
+
return e[0] === t.heading1 ? n = e[1] : (n = /* @__PURE__ */ y(g, {
|
|
101
|
+
...M,
|
|
102
|
+
label: t.heading1
|
|
103
|
+
}), e[0] = t.heading1, e[1] = n), n;
|
|
103
104
|
}
|
|
104
|
-
var
|
|
105
|
-
icon: /* @__PURE__ */
|
|
105
|
+
var P = {
|
|
106
|
+
icon: /* @__PURE__ */ y("span", {
|
|
106
107
|
style: {
|
|
107
108
|
fontSize: "0.8em",
|
|
108
109
|
fontWeight: 600
|
|
@@ -112,15 +113,15 @@ var N = {
|
|
|
112
113
|
command: (e) => e.chain().focus().toggleHeading({ level: 2 }).run(),
|
|
113
114
|
isActive: (e) => e.isActive("heading", { level: 2 })
|
|
114
115
|
};
|
|
115
|
-
function
|
|
116
|
-
let e = (0,
|
|
117
|
-
return e[0] ===
|
|
118
|
-
...
|
|
119
|
-
label:
|
|
120
|
-
}), e[0] =
|
|
116
|
+
function F() {
|
|
117
|
+
let e = (0, x.c)(2), t = l(_), n;
|
|
118
|
+
return e[0] === t.heading2 ? n = e[1] : (n = /* @__PURE__ */ y(g, {
|
|
119
|
+
...P,
|
|
120
|
+
label: t.heading2
|
|
121
|
+
}), e[0] = t.heading2, e[1] = n), n;
|
|
121
122
|
}
|
|
122
|
-
var
|
|
123
|
-
icon: /* @__PURE__ */
|
|
123
|
+
var I = {
|
|
124
|
+
icon: /* @__PURE__ */ y("span", {
|
|
124
125
|
style: {
|
|
125
126
|
fontSize: "0.8em",
|
|
126
127
|
fontWeight: 600
|
|
@@ -130,15 +131,15 @@ var F = {
|
|
|
130
131
|
command: (e) => e.chain().focus().toggleHeading({ level: 3 }).run(),
|
|
131
132
|
isActive: (e) => e.isActive("heading", { level: 3 })
|
|
132
133
|
};
|
|
133
|
-
function
|
|
134
|
-
let e = (0,
|
|
135
|
-
return e[0] ===
|
|
136
|
-
...
|
|
137
|
-
label:
|
|
138
|
-
}), e[0] =
|
|
134
|
+
function L() {
|
|
135
|
+
let e = (0, x.c)(2), t = l(_), n;
|
|
136
|
+
return e[0] === t.heading3 ? n = e[1] : (n = /* @__PURE__ */ y(g, {
|
|
137
|
+
...I,
|
|
138
|
+
label: t.heading3
|
|
139
|
+
}), e[0] = t.heading3, e[1] = n), n;
|
|
139
140
|
}
|
|
140
|
-
var
|
|
141
|
-
icon: /* @__PURE__ */
|
|
141
|
+
var R = {
|
|
142
|
+
icon: /* @__PURE__ */ y("span", {
|
|
142
143
|
style: {
|
|
143
144
|
fontSize: "0.8em",
|
|
144
145
|
fontWeight: 600
|
|
@@ -148,41 +149,41 @@ var L = {
|
|
|
148
149
|
command: (e) => e.chain().focus().toggleHeading({ level: 4 }).run(),
|
|
149
150
|
isActive: (e) => e.isActive("heading", { level: 4 })
|
|
150
151
|
};
|
|
151
|
-
function
|
|
152
|
-
let e = (0,
|
|
153
|
-
return e[0] ===
|
|
154
|
-
...
|
|
155
|
-
label:
|
|
156
|
-
}), e[0] =
|
|
152
|
+
function z() {
|
|
153
|
+
let e = (0, x.c)(2), t = l(_), n;
|
|
154
|
+
return e[0] === t.heading4 ? n = e[1] : (n = /* @__PURE__ */ y(g, {
|
|
155
|
+
...R,
|
|
156
|
+
label: t.heading4
|
|
157
|
+
}), e[0] = t.heading4, e[1] = n), n;
|
|
157
158
|
}
|
|
158
|
-
function
|
|
159
|
+
function B(e) {
|
|
159
160
|
return e.startsWith("tel:") ? e.slice(4) : e.startsWith("mailto:") ? e.slice(7) : e;
|
|
160
161
|
}
|
|
161
|
-
var
|
|
162
|
+
var V = /^\+?[\d\s\-().]{7,}$/;
|
|
162
163
|
function ie(e) {
|
|
163
164
|
let t = e.trim();
|
|
164
165
|
if (!t) return "";
|
|
165
166
|
if (t.startsWith("tel:")) return t;
|
|
166
|
-
if (
|
|
167
|
-
let [n] =
|
|
167
|
+
if (V.test(t)) return `tel:${t}`;
|
|
168
|
+
let [n] = h(t);
|
|
168
169
|
return n && n.isLink && n.start === 0 && n.end === t.length ? n.href : "";
|
|
169
170
|
}
|
|
170
|
-
function
|
|
171
|
-
let e = (0,
|
|
171
|
+
function H() {
|
|
172
|
+
let e = (0, x.c)(53), { editor: a } = m(), o = l(_), h;
|
|
172
173
|
e[0] === a ? h = e[1] : (h = {
|
|
173
174
|
editor: a,
|
|
174
175
|
selector: ce
|
|
175
176
|
}, e[0] = a, e[1] = h);
|
|
176
|
-
let
|
|
177
|
+
let g = p(h), S;
|
|
177
178
|
e[2] === a ? S = e[3] : (S = {
|
|
178
179
|
editor: a,
|
|
179
180
|
selector: se
|
|
180
181
|
}, e[2] = a, e[3] = S);
|
|
181
|
-
let C =
|
|
182
|
-
e[4] ===
|
|
183
|
-
let [T, E] =
|
|
184
|
-
|
|
185
|
-
let [k, A] =
|
|
182
|
+
let C = p(S), w;
|
|
183
|
+
e[4] === g ? w = e[5] : (w = () => B(g ?? ""), e[4] = g, e[5] = w);
|
|
184
|
+
let [T, E] = v(w), [D, O] = v(g);
|
|
185
|
+
g !== D && (O(g), E(B(g ?? "")));
|
|
186
|
+
let [k, A] = v(C ?? ""), [j, M] = v(C);
|
|
186
187
|
C !== j && (M(C), A(C ?? ""));
|
|
187
188
|
let N;
|
|
188
189
|
e[6] !== k || e[7] !== a || e[8] !== T ? (N = () => {
|
|
@@ -204,75 +205,75 @@ function V() {
|
|
|
204
205
|
let I = F;
|
|
205
206
|
if (!a) return null;
|
|
206
207
|
let L;
|
|
207
|
-
e[12] === Symbol.for("react.memo_cache_sentinel") ? (L = /* @__PURE__ */
|
|
208
|
+
e[12] === Symbol.for("react.memo_cache_sentinel") ? (L = /* @__PURE__ */ y(i, { size: n.Small }), e[12] = L) : L = e[12];
|
|
208
209
|
let R;
|
|
209
|
-
e[13] ===
|
|
210
|
+
e[13] === o.link ? R = e[14] : (R = /* @__PURE__ */ y(ee, {
|
|
210
211
|
size: "sm",
|
|
211
212
|
variant: "ghost",
|
|
212
|
-
"aria-label":
|
|
213
|
+
"aria-label": o.link,
|
|
213
214
|
px: 0,
|
|
214
215
|
children: L
|
|
215
|
-
}), e[13] =
|
|
216
|
-
let
|
|
217
|
-
e[15] !==
|
|
218
|
-
label:
|
|
216
|
+
}), e[13] = o.link, e[14] = R);
|
|
217
|
+
let z;
|
|
218
|
+
e[15] !== o.link || e[16] !== R ? (z = /* @__PURE__ */ y(ne, {
|
|
219
|
+
label: o.link,
|
|
219
220
|
placement: "top",
|
|
220
221
|
children: R
|
|
221
|
-
}), e[15] =
|
|
222
|
+
}), e[15] = o.link, e[16] = R, e[17] = z) : z = e[17];
|
|
222
223
|
let V;
|
|
223
|
-
e[18] ===
|
|
224
|
+
e[18] === o.linkDisplayLabel ? V = e[19] : (V = /* @__PURE__ */ y(d, {
|
|
224
225
|
fontSize: t.Small,
|
|
225
|
-
children:
|
|
226
|
-
}), e[18] =
|
|
226
|
+
children: o.linkDisplayLabel
|
|
227
|
+
}), e[18] = o.linkDisplayLabel, e[19] = V);
|
|
227
228
|
let H;
|
|
228
229
|
e[20] === Symbol.for("react.memo_cache_sentinel") ? (H = (e) => A(e.target.value), e[20] = H) : H = e[20];
|
|
229
230
|
let U;
|
|
230
|
-
e[21] !== k || e[22] !==
|
|
231
|
+
e[21] !== k || e[22] !== o.linkDisplayPlaceholder ? (U = /* @__PURE__ */ y(f, {
|
|
231
232
|
value: k,
|
|
232
233
|
onChange: H,
|
|
233
234
|
onKeyDown: oe,
|
|
234
|
-
placeholder:
|
|
235
|
+
placeholder: o.linkDisplayPlaceholder,
|
|
235
236
|
autoFocus: !0,
|
|
236
237
|
size: "sm"
|
|
237
|
-
}), e[21] = k, e[22] =
|
|
238
|
+
}), e[21] = k, e[22] = o.linkDisplayPlaceholder, e[23] = U) : U = e[23];
|
|
238
239
|
let W;
|
|
239
|
-
e[24] !== U || e[25] !== V ? (W = /* @__PURE__ */
|
|
240
|
+
e[24] !== U || e[25] !== V ? (W = /* @__PURE__ */ b(u, {
|
|
240
241
|
mb: r.Small,
|
|
241
242
|
children: [V, U]
|
|
242
243
|
}), e[24] = U, e[25] = V, e[26] = W) : W = e[26];
|
|
243
244
|
let G;
|
|
244
|
-
e[27] ===
|
|
245
|
+
e[27] === o.linkLabel ? G = e[28] : (G = /* @__PURE__ */ y(d, {
|
|
245
246
|
fontSize: t.Small,
|
|
246
|
-
children:
|
|
247
|
-
}), e[27] =
|
|
247
|
+
children: o.linkLabel
|
|
248
|
+
}), e[27] = o.linkLabel, e[28] = G);
|
|
248
249
|
let K;
|
|
249
250
|
e[29] === Symbol.for("react.memo_cache_sentinel") ? (K = (e) => E(e.target.value), e[29] = K) : K = e[29];
|
|
250
251
|
let q;
|
|
251
|
-
e[30] !== T || e[31] !==
|
|
252
|
+
e[30] !== T || e[31] !== o.linkPlaceholder ? (q = /* @__PURE__ */ y(f, {
|
|
252
253
|
value: T,
|
|
253
254
|
onChange: K,
|
|
254
255
|
onKeyDown: ae,
|
|
255
|
-
placeholder:
|
|
256
|
+
placeholder: o.linkPlaceholder,
|
|
256
257
|
size: "sm"
|
|
257
|
-
}), e[30] = T, e[31] =
|
|
258
|
+
}), e[30] = T, e[31] = o.linkPlaceholder, e[32] = q) : q = e[32];
|
|
258
259
|
let J;
|
|
259
|
-
e[33] !== G || e[34] !== q ? (J = /* @__PURE__ */
|
|
260
|
+
e[33] !== G || e[34] !== q ? (J = /* @__PURE__ */ b(u, { children: [G, q] }), e[33] = G, e[34] = q, e[35] = J) : J = e[35];
|
|
260
261
|
let Y;
|
|
261
|
-
e[36] !==
|
|
262
|
+
e[36] !== g || e[37] !== I || e[38] !== o.removeLink ? (Y = g && /* @__PURE__ */ y(c, {
|
|
262
263
|
variant: "ghost",
|
|
263
264
|
size: "sm",
|
|
264
265
|
onClick: I,
|
|
265
|
-
children:
|
|
266
|
-
}), e[36] =
|
|
266
|
+
children: o.removeLink
|
|
267
|
+
}), e[36] = g, e[37] = I, e[38] = o.removeLink, e[39] = Y) : Y = e[39];
|
|
267
268
|
let X;
|
|
268
|
-
e[40] !== P || e[41] !==
|
|
269
|
+
e[40] !== P || e[41] !== o.save ? (X = /* @__PURE__ */ y(c, {
|
|
269
270
|
variant: "primary",
|
|
270
271
|
size: "sm",
|
|
271
272
|
onClick: P,
|
|
272
|
-
children:
|
|
273
|
-
}), e[40] = P, e[41] =
|
|
273
|
+
children: o.save
|
|
274
|
+
}), e[40] = P, e[41] = o.save, e[42] = X) : X = e[42];
|
|
274
275
|
let Z;
|
|
275
|
-
e[43] !== Y || e[44] !== X ? (Z = /* @__PURE__ */
|
|
276
|
+
e[43] !== Y || e[44] !== X ? (Z = /* @__PURE__ */ b(re, {
|
|
276
277
|
display: "flex",
|
|
277
278
|
justifyContent: "flex-end",
|
|
278
279
|
gap: r.XSmall,
|
|
@@ -280,7 +281,7 @@ function V() {
|
|
|
280
281
|
children: [Y, X]
|
|
281
282
|
}), e[43] = Y, e[44] = X, e[45] = Z) : Z = e[45];
|
|
282
283
|
let Q;
|
|
283
|
-
e[46] !== W || e[47] !== J || e[48] !== Z ? (Q = /* @__PURE__ */
|
|
284
|
+
e[46] !== W || e[47] !== J || e[48] !== Z ? (Q = /* @__PURE__ */ b(te, {
|
|
284
285
|
px: r.Medium,
|
|
285
286
|
children: [
|
|
286
287
|
W,
|
|
@@ -289,11 +290,11 @@ function V() {
|
|
|
289
290
|
]
|
|
290
291
|
}), e[46] = W, e[47] = J, e[48] = Z, e[49] = Q) : Q = e[49];
|
|
291
292
|
let $;
|
|
292
|
-
return e[50] !== Q || e[51] !==
|
|
293
|
+
return e[50] !== Q || e[51] !== z ? ($ = /* @__PURE__ */ b(s, {
|
|
293
294
|
closeOnSelect: !1,
|
|
294
295
|
placement: "bottom-start",
|
|
295
|
-
children: [
|
|
296
|
-
}), e[50] = Q, e[51] =
|
|
296
|
+
children: [z, Q]
|
|
297
|
+
}), e[50] = Q, e[51] = z, e[52] = $) : $ = e[52], $;
|
|
297
298
|
}
|
|
298
299
|
function ae(e) {
|
|
299
300
|
return e.stopPropagation();
|
|
@@ -312,4 +313,4 @@ function ce(e) {
|
|
|
312
313
|
return t ? t.getAttributes("link").href ?? "" : "";
|
|
313
314
|
}
|
|
314
315
|
//#endregion
|
|
315
|
-
export {
|
|
316
|
+
export { C as Bold, k as BulletList, N as Heading1, F as Heading2, L as Heading3, z as Heading4, T as Italic, H as LinkControl, j as OrderedList, D as Underline };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rich-text-editor-recipe.d.ts","sourceRoot":"","sources":["../../../lib/components/rich-text-editor/rich-text-editor-recipe.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rich-text-editor-recipe.d.ts","sourceRoot":"","sources":["../../../lib/components/rich-text-editor/rich-text-editor-recipe.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,uBAAuB,8CAuBlC,CAAC;AAEH,eAAO,MAAM,UAAU,8CAKrB,CAAC;AAEH,eAAO,MAAM,qBAAqB,8CAwBhC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ThemeBorder as e, ThemeColor as t, ThemeFontSize as n, ThemeRadius as r, ThemeSpace as i } from "../../theme/theme-types.js";
|
|
2
2
|
import { defineStyle as a } from "@chakra-ui/react";
|
|
3
3
|
//#region lib/components/rich-text-editor/rich-text-editor-recipe.ts
|
|
4
4
|
var o = a({
|