@caspeco/casper-ui-library 11.3.0 → 12.0.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/components/accordion/accordion-item.js +10 -10
- package/dist/components/accordion/accordion-panel.js +4 -4
- package/dist/components/accordion/accordion.js +4 -4
- package/dist/components/alert/alert.js +10 -10
- package/dist/components/badge/badge.js +18 -18
- package/dist/components/box/box.js +3 -3
- package/dist/components/breadcrumbs/breadcrumb-item.d.ts.map +1 -1
- package/dist/components/breadcrumbs/breadcrumb-item.js +5 -4
- package/dist/components/breadcrumbs/breadcrumb-link.js +3 -3
- package/dist/components/breadcrumbs/breadcrumbs.d.ts.map +1 -1
- package/dist/components/breadcrumbs/breadcrumbs.js +23 -23
- package/dist/components/button/button.d.ts +1 -1
- package/dist/components/button/button.js +5 -5
- package/dist/components/checkbox/checkbox-icon.js +3 -3
- package/dist/components/checkbox/checkbox.js +7 -7
- 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 +30 -29
- 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 +66 -64
- package/dist/components/combobox/combobox-item.js +8 -8
- package/dist/components/combobox/combobox-menu.d.ts.map +1 -1
- package/dist/components/combobox/combobox-menu.js +95 -94
- 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 +163 -162
- 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.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 +84 -116
- package/dist/components/date-picker/date-picker-week-cell.js +4 -4
- 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.js +3 -3
- package/dist/components/drawer/drawer.js +6 -6
- package/dist/components/drawer/inline-drawer.js +4 -4
- 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.js +5 -5
- package/dist/components/grid/grid-item.js +3 -3
- package/dist/components/grid/grid.js +3 -3
- package/dist/components/heading/heading.js +3 -3
- package/dist/components/highlight/highlight.js +3 -3
- package/dist/components/icon/create-icon.js +7 -7
- package/dist/components/icon-button/icon-button.js +4 -4
- 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 +75 -74
- 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 +69 -69
- 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 +43 -44
- 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/input.d.ts +1 -1
- package/dist/components/input/input.js +5 -5
- package/dist/components/link/link.js +3 -3
- package/dist/components/list/list-item.js +3 -3
- package/dist/components/list/list.js +3 -3
- package/dist/components/menu/menu-box-button.js +4 -4
- package/dist/components/menu/menu-button.js +4 -4
- package/dist/components/menu/menu-group.js +11 -11
- package/dist/components/menu/menu-icon-button.js +4 -4
- package/dist/components/menu/menu-item.js +7 -7
- package/dist/components/menu/menu-list.js +3 -3
- package/dist/components/menu/menu.js +4 -4
- package/dist/components/message/message.js +8 -8
- package/dist/components/modal/modal-body.js +3 -3
- package/dist/components/modal/modal-close-button.js +5 -5
- package/dist/components/modal/modal-footer.js +3 -3
- package/dist/components/modal/modal-header.js +3 -3
- package/dist/components/modal/modal.js +8 -8
- package/dist/components/navigation-list/navigation-list-item.js +10 -10
- package/dist/components/navigation-list/navigation-list.js +4 -4
- 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.js +12 -12
- package/dist/components/radio/radio-group.js +4 -4
- package/dist/components/radio/radio.d.ts +1 -1
- package/dist/components/radio/radio.js +14 -14
- package/dist/components/radio-card/radio-card-group.js +3 -3
- package/dist/components/radio-card/radio-card.d.ts +1 -1
- package/dist/components/radio-card/radio-card.js +7 -7
- 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 +129 -128
- 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 +22 -25
- 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.js +5 -5
- package/dist/components/select/select.js +5 -5
- package/dist/components/skeleton/skeleton-text.js +3 -3
- package/dist/components/skeleton/skeleton.js +3 -3
- package/dist/components/spinner/spinner.js +5 -5
- package/dist/components/stack/stack.d.ts +1 -1
- package/dist/components/stack/stack.js +3 -3
- package/dist/components/stepper/step.js +25 -25
- package/dist/components/stepper/stepper.js +8 -8
- 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 +43 -46
- package/dist/components/table/table-column-resize-handle.d.ts.map +1 -1
- package/dist/components/table/table-column-resize-handle.js +22 -21
- package/dist/components/table/table-content.d.ts.map +1 -1
- package/dist/components/table/table-content.js +81 -79
- 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 +59 -59
- 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 +28 -27
- package/dist/components/table/table-header-row.d.ts.map +1 -1
- package/dist/components/table/table-header-row.js +53 -56
- 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 +10 -9
- 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 +9 -8
- 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 +26 -25
- 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.js +11 -11
- 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 +10 -10
- package/dist/components/tabs/tab.js +4 -4
- package/dist/components/tabs/tabs.js +3 -3
- package/dist/components/tag/tag.js +28 -28
- package/dist/components/text/text.js +3 -3
- package/dist/components/textarea/textarea.js +3 -3
- package/dist/components/toaster/toaster.js +9 -9
- package/dist/components/toggle-button/toggle-button.js +3 -3
- package/dist/components/toggle-button/use-button-children.js +10 -10
- package/dist/components/tooltip/tooltip.d.ts +1 -1
- package/dist/components/tooltip/tooltip.js +8 -8
- 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-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/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 +5 -5
- 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 +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,uCA8G1B"}
|
|
@@ -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 };
|
|
@@ -2,7 +2,7 @@ import { ThemeStyleProps } from '../../theme/index.js';
|
|
|
2
2
|
import { EditorContentProps } from '@tiptap/react';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
4
|
import { RichTextEditorRootProps, RichTextEditorToolbarProps } from './types.js';
|
|
5
|
-
export declare function RichTextEditorRoot({ editor, children,
|
|
5
|
+
export declare function RichTextEditorRoot({ editor, children, disabled, ...rest }: RichTextEditorRootProps & ThemeStyleProps): import('react').JSX.Element;
|
|
6
6
|
export declare function RichTextEditorToolbar({ children, ...rest }: RichTextEditorToolbarProps): import('react').JSX.Element;
|
|
7
7
|
export declare function RichTextEditorContent({ ...rest }: Omit<EditorContentProps, "editor">): import('react').JSX.Element | null;
|
|
8
8
|
export declare function RichTextEditorControlGroup({ children, ...rest }: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rich-text-editor.d.ts","sourceRoot":"","sources":["../../../lib/components/rich-text-editor/rich-text-editor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA0C,KAAK,eAAe,EAAE,MAAM,SAAS,CAAC;AAEvF,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAEnF,wBAAgB,kBAAkB,CAAC,EAClC,MAAM,EACN,QAAQ,EACR,
|
|
1
|
+
{"version":3,"file":"rich-text-editor.d.ts","sourceRoot":"","sources":["../../../lib/components/rich-text-editor/rich-text-editor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA0C,KAAK,eAAe,EAAE,MAAM,SAAS,CAAC;AAEvF,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAEnF,wBAAgB,kBAAkB,CAAC,EAClC,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,GAAG,IAAI,EACP,EAAE,uBAAuB,GAAG,eAAe,+BAc3C;AAED,wBAAgB,qBAAqB,CAAC,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,0BAA0B,+BAoBtF;AAED,wBAAgB,qBAAqB,CAAC,EAAE,GAAG,IAAI,EAAE,EAAE,IAAI,CAAC,kBAAkB,EAAE,QAAQ,CAAC,sCAIpF;AAED,wBAAgB,0BAA0B,CAAC,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,+BAMxF"}
|
|
@@ -4,38 +4,35 @@ import { EditorContent as r } from "../../packages/casper-ui-library/node_module
|
|
|
4
4
|
import { RichTextEditorContext as i, useRichTextEditorContext as a } from "./rich-text-editor-context.js";
|
|
5
5
|
import { proseMirrorContainerCss as o, proseMirrorContentCss as s, toolbarCss as c } from "./rich-text-editor-recipe.js";
|
|
6
6
|
import "react";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
8
|
+
import { Box as u, HStack as d } from "@chakra-ui/react";
|
|
9
9
|
//#region lib/components/rich-text-editor/rich-text-editor.tsx
|
|
10
10
|
var f = e();
|
|
11
11
|
function p(e) {
|
|
12
|
-
let t = (0, f.c)(
|
|
13
|
-
t[0] === e ? (n = t[1], r = t[2], a = t[3], c = t[4]
|
|
14
|
-
let
|
|
15
|
-
t[
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
t[10] !== n || t[11] !== c || t[12] !== _ ? (y = /* @__PURE__ */ d(l, {
|
|
23
|
-
"data-disabled": _,
|
|
24
|
-
css: v,
|
|
12
|
+
let t = (0, f.c)(15), n, r, a, c;
|
|
13
|
+
t[0] === e ? (n = t[1], r = t[2], a = t[3], c = t[4]) : ({editor: a, children: n, disabled: r, ...c} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = a, t[4] = c);
|
|
14
|
+
let d = a ?? null, p;
|
|
15
|
+
t[5] === d ? p = t[6] : (p = { editor: d }, t[5] = d, t[6] = p);
|
|
16
|
+
let m = p, h = r || void 0, g;
|
|
17
|
+
t[7] === Symbol.for("react.memo_cache_sentinel") ? (g = [o, s], t[7] = g) : g = t[7];
|
|
18
|
+
let _;
|
|
19
|
+
t[8] !== n || t[9] !== c || t[10] !== h ? (_ = /* @__PURE__ */ l(u, {
|
|
20
|
+
"data-disabled": h,
|
|
21
|
+
css: g,
|
|
25
22
|
...c,
|
|
26
23
|
children: n
|
|
27
|
-
}), t[
|
|
28
|
-
let
|
|
29
|
-
return t[
|
|
30
|
-
value:
|
|
31
|
-
children:
|
|
32
|
-
}), t[
|
|
24
|
+
}), t[8] = n, t[9] = c, t[10] = h, t[11] = _) : _ = t[11];
|
|
25
|
+
let v;
|
|
26
|
+
return t[12] !== m || t[13] !== _ ? (v = /* @__PURE__ */ l(i.Provider, {
|
|
27
|
+
value: m,
|
|
28
|
+
children: _
|
|
29
|
+
}), t[12] = m, t[13] = _, t[14] = v) : v = t[14], v;
|
|
33
30
|
}
|
|
34
31
|
function m(e) {
|
|
35
32
|
let n = (0, f.c)(7), r, i;
|
|
36
33
|
n[0] === e ? (r = n[1], i = n[2]) : ({children: r, ...i} = e, n[0] = e, n[1] = r, n[2] = i);
|
|
37
34
|
let a;
|
|
38
|
-
n[3] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */
|
|
35
|
+
n[3] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ l(u, {
|
|
39
36
|
role: "separator",
|
|
40
37
|
h: "1.25rem",
|
|
41
38
|
w: "1px",
|
|
@@ -44,7 +41,7 @@ function m(e) {
|
|
|
44
41
|
flexShrink: 0
|
|
45
42
|
}), n[3] = a) : a = n[3];
|
|
46
43
|
let o;
|
|
47
|
-
return n[4] !== r || n[5] !== i ? (o = /* @__PURE__ */ d
|
|
44
|
+
return n[4] !== r || n[5] !== i ? (o = /* @__PURE__ */ l(d, {
|
|
48
45
|
flexWrap: "wrap",
|
|
49
46
|
separator: a,
|
|
50
47
|
css: c,
|
|
@@ -58,7 +55,7 @@ function h(e) {
|
|
|
58
55
|
let { editor: i } = a();
|
|
59
56
|
if (!i) return null;
|
|
60
57
|
let o;
|
|
61
|
-
return t[2] !== i || t[3] !== n ? (o = /* @__PURE__ */
|
|
58
|
+
return t[2] !== i || t[3] !== n ? (o = /* @__PURE__ */ l(r, {
|
|
62
59
|
editor: i,
|
|
63
60
|
...n
|
|
64
61
|
}), t[2] = i, t[3] = n, t[4] = o) : o = t[4], o;
|
|
@@ -67,7 +64,7 @@ function g(e) {
|
|
|
67
64
|
let t = (0, f.c)(6), r, i;
|
|
68
65
|
t[0] === e ? (r = t[1], i = t[2]) : ({children: r, ...i} = e, t[0] = e, t[1] = r, t[2] = i);
|
|
69
66
|
let a;
|
|
70
|
-
return t[3] !== r || t[4] !== i ? (a = /* @__PURE__ */ d
|
|
67
|
+
return t[3] !== r || t[4] !== i ? (a = /* @__PURE__ */ l(d, {
|
|
71
68
|
gap: n.XSmall,
|
|
72
69
|
...i,
|
|
73
70
|
children: r
|
package/dist/components/rich-text-editor/{translations.d.ts → rich-text-editor.translations.d.ts}
RENAMED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
declare const en: {
|
|
1
|
+
export type RichTextEditorTranslation = {
|
|
3
2
|
bold: string;
|
|
4
3
|
italic: string;
|
|
5
4
|
underline: string;
|
|
@@ -18,6 +17,5 @@ declare const en: {
|
|
|
18
17
|
removeLink: string;
|
|
19
18
|
save: string;
|
|
20
19
|
};
|
|
21
|
-
export declare const
|
|
22
|
-
|
|
23
|
-
//# sourceMappingURL=translations.d.ts.map
|
|
20
|
+
export declare const richTextEditorTranslations: import('../../theme/translations.js').ComponentTranslations<RichTextEditorTranslation>;
|
|
21
|
+
//# sourceMappingURL=rich-text-editor.translations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rich-text-editor.translations.d.ts","sourceRoot":"","sources":["../../../lib/components/rich-text-editor/rich-text-editor.translations.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,yBAAyB,GAAG;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,EAAE,MAAM,CAAC;IACzB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,eAAO,MAAM,0BAA0B,iFAqOrC,CAAC"}
|