@micromerce/formbuilder-react 1.0.651 → 1.0.656
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/Checkbox/Checkbox.module.scss +10 -0
- package/dist/components/FormBuilder/FormBuilder.module.scss +94 -0
- package/dist/components/FormFooter/FormFooter.module.scss +65 -0
- package/dist/components/FormGroup/FormGroup.module.scss +69 -0
- package/dist/components/FormList/FormList.module.scss +173 -0
- package/dist/components/Group/Group.module.scss +28 -0
- package/dist/components/Input/Input.module.scss +3 -0
- package/dist/components/InputFreeSolo/InputFreeSolo.module.scss +29 -0
- package/dist/components/MrnInput/MrnInput.module.scss +31 -0
- package/dist/components/MultiSelect/MultiSelect.module.scss +13 -0
- package/dist/components/PasswordInput/PasswordInput.module.scss +26 -0
- package/dist/components/Select/Select.module.scss +15 -0
- package/dist/components/Textarea/Textarea.module.scss +14 -0
- package/dist/components/addressGroup/AddressGroup.module.scss +72 -0
- package/dist/src/assets/icons/error/Error.d.ts +2 -0
- package/dist/src/assets/icons/error/Error.js +6 -0
- package/dist/src/assets/icons/error/Error.js.map +1 -0
- package/dist/src/components/Checkbox/Checkbox.d.ts +10 -0
- package/dist/src/components/Checkbox/Checkbox.js +37 -0
- package/dist/src/components/Checkbox/Checkbox.js.map +1 -0
- package/dist/src/components/Checkbox/index.d.ts +1 -0
- package/dist/src/components/Checkbox/index.js +2 -0
- package/dist/src/components/Checkbox/index.js.map +1 -0
- package/dist/src/components/ControlWrapper/ControlWrapper.d.ts +11 -0
- package/dist/src/components/ControlWrapper/ControlWrapper.js +37 -0
- package/dist/src/components/ControlWrapper/ControlWrapper.js.map +1 -0
- package/dist/src/components/ControlWrapper/index.d.ts +1 -0
- package/dist/src/components/ControlWrapper/index.js +2 -0
- package/dist/src/components/ControlWrapper/index.js.map +1 -0
- package/dist/src/components/DateRangeGroup/DateRangeGroup.d.ts +10 -0
- package/dist/src/components/DateRangeGroup/DateRangeGroup.js +69 -0
- package/dist/src/components/DateRangeGroup/DateRangeGroup.js.map +1 -0
- package/dist/src/components/DateRangeGroup/DateRangeGroup.styles.d.ts +3 -0
- package/dist/src/components/DateRangeGroup/DateRangeGroup.styles.js +59 -0
- package/dist/src/components/DateRangeGroup/DateRangeGroup.styles.js.map +1 -0
- package/dist/src/components/DateRangeGroup/components/CalendarModal.d.ts +14 -0
- package/dist/src/components/DateRangeGroup/components/CalendarModal.js +90 -0
- package/dist/src/components/DateRangeGroup/components/CalendarModal.js.map +1 -0
- package/dist/src/components/DateRangeGroup/index.d.ts +1 -0
- package/dist/src/components/DateRangeGroup/index.js +2 -0
- package/dist/src/components/DateRangeGroup/index.js.map +1 -0
- package/dist/src/components/ErrorBoundary/ErrorBoundary.d.ts +14 -0
- package/dist/src/components/ErrorBoundary/ErrorBoundary.js +22 -0
- package/dist/src/components/ErrorBoundary/ErrorBoundary.js.map +1 -0
- package/dist/src/components/FileUploader/FileUploader.d.ts +9 -0
- package/dist/src/components/FileUploader/FileUploader.js +30 -0
- package/dist/src/components/FileUploader/FileUploader.js.map +1 -0
- package/dist/src/components/FileUploader/index.d.ts +1 -0
- package/dist/src/components/FileUploader/index.js +2 -0
- package/dist/src/components/FileUploader/index.js.map +1 -0
- package/dist/src/components/FormBuilder/FormBuilder.d.ts +25 -0
- package/dist/src/components/FormBuilder/FormBuilder.js +74 -0
- package/dist/src/components/FormBuilder/FormBuilder.js.map +1 -0
- package/dist/src/components/FormBuilder/index.d.ts +1 -0
- package/dist/src/components/FormBuilder/index.js +2 -0
- package/dist/src/components/FormBuilder/index.js.map +1 -0
- package/dist/src/components/FormBuilder/utils/extractFormControlValues/extractFormControlValues.d.ts +6 -0
- package/dist/src/components/FormBuilder/utils/extractFormControlValues/extractFormControlValues.js +50 -0
- package/dist/src/components/FormBuilder/utils/extractFormControlValues/extractFormControlValues.js.map +1 -0
- package/dist/src/components/FormBuilder/utils/extractFormControlValues/index.d.ts +1 -0
- package/dist/src/components/FormBuilder/utils/extractFormControlValues/index.js +2 -0
- package/dist/src/components/FormBuilder/utils/extractFormControlValues/index.js.map +1 -0
- package/dist/src/components/FormBuilder/utils/jsonToUrlEncoded/index.d.ts +1 -0
- package/dist/src/components/FormBuilder/utils/jsonToUrlEncoded/index.js +2 -0
- package/dist/src/components/FormBuilder/utils/jsonToUrlEncoded/index.js.map +1 -0
- package/dist/src/components/FormBuilder/utils/jsonToUrlEncoded/jsonToUrlEncoded.d.ts +5 -0
- package/dist/src/components/FormBuilder/utils/jsonToUrlEncoded/jsonToUrlEncoded.js +15 -0
- package/dist/src/components/FormBuilder/utils/jsonToUrlEncoded/jsonToUrlEncoded.js.map +1 -0
- package/dist/src/components/FormFooter/FormFooter.d.ts +15 -0
- package/dist/src/components/FormFooter/FormFooter.js +46 -0
- package/dist/src/components/FormFooter/FormFooter.js.map +1 -0
- package/dist/src/components/FormFooter/components/Switch.d.ts +1 -0
- package/dist/src/components/FormFooter/components/Switch.js +15 -0
- package/dist/src/components/FormFooter/components/Switch.js.map +1 -0
- package/dist/src/components/FormFooter/index.d.ts +1 -0
- package/dist/src/components/FormFooter/index.js +2 -0
- package/dist/src/components/FormFooter/index.js.map +1 -0
- package/dist/src/components/FormGroup/FormGroup.d.ts +15 -0
- package/dist/src/components/FormGroup/FormGroup.js +18 -0
- package/dist/src/components/FormGroup/FormGroup.js.map +1 -0
- package/dist/src/components/FormGroup/index.d.ts +1 -0
- package/dist/src/components/FormGroup/index.js +2 -0
- package/dist/src/components/FormGroup/index.js.map +1 -0
- package/dist/src/components/FormList/FormList.d.ts +11 -0
- package/dist/src/components/FormList/FormList.js +66 -0
- package/dist/src/components/FormList/FormList.js.map +1 -0
- package/dist/src/components/FormList/index.d.ts +1 -0
- package/dist/src/components/FormList/index.js +2 -0
- package/dist/src/components/FormList/index.js.map +1 -0
- package/dist/src/components/GeneralFormGroup/GeneralFormGroup.d.ts +5 -0
- package/dist/src/components/GeneralFormGroup/GeneralFormGroup.js +4 -0
- package/dist/src/components/GeneralFormGroup/GeneralFormGroup.js.map +1 -0
- package/dist/src/components/GeneralFormGroup/index.d.ts +1 -0
- package/dist/src/components/GeneralFormGroup/index.js +2 -0
- package/dist/src/components/GeneralFormGroup/index.js.map +1 -0
- package/dist/src/components/Group/Group.d.ts +12 -0
- package/dist/src/components/Group/Group.js +32 -0
- package/dist/src/components/Group/Group.js.map +1 -0
- package/dist/src/components/Group/index.d.ts +1 -0
- package/dist/src/components/Group/index.js +2 -0
- package/dist/src/components/Group/index.js.map +1 -0
- package/dist/src/components/Input/Input.d.ts +14 -0
- package/dist/src/components/Input/Input.js +57 -0
- package/dist/src/components/Input/Input.js.map +1 -0
- package/dist/src/components/Input/index.d.ts +1 -0
- package/dist/src/components/Input/index.js +2 -0
- package/dist/src/components/Input/index.js.map +1 -0
- package/dist/src/components/Input/input.styles.d.ts +9 -0
- package/dist/src/components/Input/input.styles.js +24 -0
- package/dist/src/components/Input/input.styles.js.map +1 -0
- package/dist/src/components/InputFreeSolo/InputFreeSolo.d.ts +10 -0
- package/dist/src/components/InputFreeSolo/InputFreeSolo.js +67 -0
- package/dist/src/components/InputFreeSolo/InputFreeSolo.js.map +1 -0
- package/dist/src/components/InputFreeSolo/index.d.ts +1 -0
- package/dist/src/components/InputFreeSolo/index.js +2 -0
- package/dist/src/components/InputFreeSolo/index.js.map +1 -0
- package/dist/src/components/MrnInput/MrnInput.d.ts +11 -0
- package/dist/src/components/MrnInput/MrnInput.js +64 -0
- package/dist/src/components/MrnInput/MrnInput.js.map +1 -0
- package/dist/src/components/MrnInput/hooks/useMrn.d.ts +21 -0
- package/dist/src/components/MrnInput/hooks/useMrn.js +92 -0
- package/dist/src/components/MrnInput/hooks/useMrn.js.map +1 -0
- package/dist/src/components/MrnInput/index.d.ts +1 -0
- package/dist/src/components/MrnInput/index.js +2 -0
- package/dist/src/components/MrnInput/index.js.map +1 -0
- package/dist/src/components/MrnInput/services/fetchMrn.d.ts +3 -0
- package/dist/src/components/MrnInput/services/fetchMrn.js +30 -0
- package/dist/src/components/MrnInput/services/fetchMrn.js.map +1 -0
- package/dist/src/components/MrnInput/ui-helper/Link/Link.d.ts +3 -0
- package/dist/src/components/MrnInput/ui-helper/Link/Link.js +15 -0
- package/dist/src/components/MrnInput/ui-helper/Link/Link.js.map +1 -0
- package/dist/src/components/MrnInput/utils/mrnUtils/mrnUtils.d.ts +8 -0
- package/dist/src/components/MrnInput/utils/mrnUtils/mrnUtils.js +35 -0
- package/dist/src/components/MrnInput/utils/mrnUtils/mrnUtils.js.map +1 -0
- package/dist/src/components/MrnInput/utils/resolveMrnLinks/resolveMrnLink.d.ts +2 -0
- package/dist/src/components/MrnInput/utils/resolveMrnLinks/resolveMrnLink.js +11 -0
- package/dist/src/components/MrnInput/utils/resolveMrnLinks/resolveMrnLink.js.map +1 -0
- package/dist/src/components/MrnInput/utils/resolveNestedQueryLink/resolveNestedQueryLink.d.ts +2 -0
- package/dist/src/components/MrnInput/utils/resolveNestedQueryLink/resolveNestedQueryLink.js +19 -0
- package/dist/src/components/MrnInput/utils/resolveNestedQueryLink/resolveNestedQueryLink.js.map +1 -0
- package/dist/src/components/MrnInput/utils/urlSearchParam/urlSearchParam.d.ts +1 -0
- package/dist/src/components/MrnInput/utils/urlSearchParam/urlSearchParam.js +8 -0
- package/dist/src/components/MrnInput/utils/urlSearchParam/urlSearchParam.js.map +1 -0
- package/dist/src/components/MultiSelect/MultiSelect.d.ts +17 -0
- package/dist/src/components/MultiSelect/MultiSelect.js +61 -0
- package/dist/src/components/MultiSelect/MultiSelect.js.map +1 -0
- package/dist/src/components/MultiSelect/index.d.ts +1 -0
- package/dist/src/components/MultiSelect/index.js +2 -0
- package/dist/src/components/MultiSelect/index.js.map +1 -0
- package/dist/src/components/MultiSelect/utils/extractSelectedOptionValues/extractSelectedOptionValues.d.ts +24 -0
- package/dist/src/components/MultiSelect/utils/extractSelectedOptionValues/extractSelectedOptionValues.js +21 -0
- package/dist/src/components/MultiSelect/utils/extractSelectedOptionValues/extractSelectedOptionValues.js.map +1 -0
- package/dist/src/components/MultiSelect/utils/extractSelectedOptionValues/index.d.ts +1 -0
- package/dist/src/components/MultiSelect/utils/extractSelectedOptionValues/index.js +2 -0
- package/dist/src/components/MultiSelect/utils/extractSelectedOptionValues/index.js.map +1 -0
- package/dist/src/components/PasswordInput/PasswordInput.d.ts +12 -0
- package/dist/src/components/PasswordInput/PasswordInput.js +21 -0
- package/dist/src/components/PasswordInput/PasswordInput.js.map +1 -0
- package/dist/src/components/PasswordInput/index.d.ts +1 -0
- package/dist/src/components/PasswordInput/index.js +2 -0
- package/dist/src/components/PasswordInput/index.js.map +1 -0
- package/dist/src/components/QueryControl/QueryControl.d.ts +13 -0
- package/dist/src/components/QueryControl/QueryControl.js +95 -0
- package/dist/src/components/QueryControl/QueryControl.js.map +1 -0
- package/dist/src/components/QueryControl/data/defaultControls.d.ts +9 -0
- package/dist/src/components/QueryControl/data/defaultControls.js +95 -0
- package/dist/src/components/QueryControl/data/defaultControls.js.map +1 -0
- package/dist/src/components/QueryControl/index.d.ts +1 -0
- package/dist/src/components/QueryControl/index.js +2 -0
- package/dist/src/components/QueryControl/index.js.map +1 -0
- package/dist/src/components/QueryControl/ui-helper/Wrapper/QueryControlWrapper.d.ts +8 -0
- package/dist/src/components/QueryControl/ui-helper/Wrapper/QueryControlWrapper.js +8 -0
- package/dist/src/components/QueryControl/ui-helper/Wrapper/QueryControlWrapper.js.map +1 -0
- package/dist/src/components/QueryControl/ui-helper/Wrapper/QueryControlWrapper.styles.d.ts +6 -0
- package/dist/src/components/QueryControl/ui-helper/Wrapper/QueryControlWrapper.styles.js +14 -0
- package/dist/src/components/QueryControl/ui-helper/Wrapper/QueryControlWrapper.styles.js.map +1 -0
- package/dist/src/components/QueryControl/ui-helper/Wrapper/index.d.ts +1 -0
- package/dist/src/components/QueryControl/ui-helper/Wrapper/index.js +2 -0
- package/dist/src/components/QueryControl/ui-helper/Wrapper/index.js.map +1 -0
- package/dist/src/components/QueryControl/utils/allControlsHidden/allControlsHidden.d.ts +3 -0
- package/dist/src/components/QueryControl/utils/allControlsHidden/allControlsHidden.js +39 -0
- package/dist/src/components/QueryControl/utils/allControlsHidden/allControlsHidden.js.map +1 -0
- package/dist/src/components/QueryControl/utils/allControlsHidden/index.d.ts +1 -0
- package/dist/src/components/QueryControl/utils/allControlsHidden/index.js +2 -0
- package/dist/src/components/QueryControl/utils/allControlsHidden/index.js.map +1 -0
- package/dist/src/components/QueryControl/utils/getMatchingControls.d.ts +9 -0
- package/dist/src/components/QueryControl/utils/getMatchingControls.js +19 -0
- package/dist/src/components/QueryControl/utils/getMatchingControls.js.map +1 -0
- package/dist/src/components/QueryControl/utils/hasExpertControl/hasExpertControl.d.ts +3 -0
- package/dist/src/components/QueryControl/utils/hasExpertControl/hasExpertControl.js +38 -0
- package/dist/src/components/QueryControl/utils/hasExpertControl/hasExpertControl.js.map +1 -0
- package/dist/src/components/QueryControl/utils/hasExpertControl/index.d.ts +1 -0
- package/dist/src/components/QueryControl/utils/hasExpertControl/index.js +2 -0
- package/dist/src/components/QueryControl/utils/hasExpertControl/index.js.map +1 -0
- package/dist/src/components/QueryControl/utils/hideGroup/hideGroup.d.ts +3 -0
- package/dist/src/components/QueryControl/utils/hideGroup/hideGroup.js +9 -0
- package/dist/src/components/QueryControl/utils/hideGroup/hideGroup.js.map +1 -0
- package/dist/src/components/QueryControl/utils/hideGroup/index.d.ts +1 -0
- package/dist/src/components/QueryControl/utils/hideGroup/index.js +2 -0
- package/dist/src/components/QueryControl/utils/hideGroup/index.js.map +1 -0
- package/dist/src/components/Select/Select.d.ts +12 -0
- package/dist/src/components/Select/Select.js +67 -0
- package/dist/src/components/Select/Select.js.map +1 -0
- package/dist/src/components/Select/index.d.ts +1 -0
- package/dist/src/components/Select/index.js +2 -0
- package/dist/src/components/Select/index.js.map +1 -0
- package/dist/src/components/Select/utils/getSelectedOption.d.ts +3 -0
- package/dist/src/components/Select/utils/getSelectedOption.js +8 -0
- package/dist/src/components/Select/utils/getSelectedOption.js.map +1 -0
- package/dist/src/components/Textarea/Textarea.d.ts +10 -0
- package/dist/src/components/Textarea/Textarea.js +55 -0
- package/dist/src/components/Textarea/Textarea.js.map +1 -0
- package/dist/src/components/Textarea/Textarea.types.d.ts +12 -0
- package/dist/src/components/Textarea/Textarea.types.js +2 -0
- package/dist/src/components/Textarea/Textarea.types.js.map +1 -0
- package/dist/src/components/Textarea/aiWrapper/aiAction.d.ts +12 -0
- package/dist/src/components/Textarea/aiWrapper/aiAction.js +21 -0
- package/dist/src/components/Textarea/aiWrapper/aiAction.js.map +1 -0
- package/dist/src/components/Textarea/aiWrapper/aiLayout.d.ts +10 -0
- package/dist/src/components/Textarea/aiWrapper/aiLayout.js +21 -0
- package/dist/src/components/Textarea/aiWrapper/aiLayout.js.map +1 -0
- package/dist/src/components/Textarea/aiWrapper/index.d.ts +11 -0
- package/dist/src/components/Textarea/aiWrapper/index.js +29 -0
- package/dist/src/components/Textarea/aiWrapper/index.js.map +1 -0
- package/dist/src/components/Textarea/aiWrapper/useAi.d.ts +21 -0
- package/dist/src/components/Textarea/aiWrapper/useAi.js +74 -0
- package/dist/src/components/Textarea/aiWrapper/useAi.js.map +1 -0
- package/dist/src/components/Textarea/editors/Default.d.ts +13 -0
- package/dist/src/components/Textarea/editors/Default.js +26 -0
- package/dist/src/components/Textarea/editors/Default.js.map +1 -0
- package/dist/src/components/Textarea/editors/Html.d.ts +10 -0
- package/dist/src/components/Textarea/editors/Html.js +9 -0
- package/dist/src/components/Textarea/editors/Html.js.map +1 -0
- package/dist/src/components/Textarea/editors/Json.d.ts +10 -0
- package/dist/src/components/Textarea/editors/Json.js +9 -0
- package/dist/src/components/Textarea/editors/Json.js.map +1 -0
- package/dist/src/components/Textarea/editors/Markdown.d.ts +10 -0
- package/dist/src/components/Textarea/editors/Markdown.js +20 -0
- package/dist/src/components/Textarea/editors/Markdown.js.map +1 -0
- package/dist/src/components/Textarea/editors/Richtext.d.ts +12 -0
- package/dist/src/components/Textarea/editors/Richtext.js +13 -0
- package/dist/src/components/Textarea/editors/Richtext.js.map +1 -0
- package/dist/src/components/Textarea/index.d.ts +1 -0
- package/dist/src/components/Textarea/index.js +2 -0
- package/dist/src/components/Textarea/index.js.map +1 -0
- package/dist/src/components/addressGroup/AddressGroup.d.ts +12 -0
- package/dist/src/components/addressGroup/AddressGroup.js +39 -0
- package/dist/src/components/addressGroup/AddressGroup.js.map +1 -0
- package/dist/src/components/addressGroup/index.d.ts +1 -0
- package/dist/src/components/addressGroup/index.js +2 -0
- package/dist/src/components/addressGroup/index.js.map +1 -0
- package/dist/src/components/addressGroup/utils/Countries.d.ts +3 -0
- package/dist/src/components/addressGroup/utils/Countries.js +1249 -0
- package/dist/src/components/addressGroup/utils/Countries.js.map +1 -0
- package/dist/src/components/plate/PlateEditor.d.ts +10 -0
- package/dist/src/components/plate/PlateEditor.js +38 -0
- package/dist/src/components/plate/PlateEditor.js.map +1 -0
- package/dist/src/components/plate/PlateEditorContent.d.ts +24 -0
- package/dist/src/components/plate/PlateEditorContent.js +45 -0
- package/dist/src/components/plate/PlateEditorContent.js.map +1 -0
- package/dist/src/components/plate/components/align-dropdown-menu.d.ts +2 -0
- package/dist/src/components/plate/components/align-dropdown-menu.js +33 -0
- package/dist/src/components/plate/components/align-dropdown-menu.js.map +1 -0
- package/dist/src/components/plate/components/blockquote-element.d.ts +21 -0
- package/dist/src/components/plate/components/blockquote-element.js +8 -0
- package/dist/src/components/plate/components/blockquote-element.js.map +1 -0
- package/dist/src/components/plate/components/button.d.ts +14 -0
- package/dist/src/components/plate/components/button.js +38 -0
- package/dist/src/components/plate/components/button.js.map +1 -0
- package/dist/src/components/plate/components/caption.d.ts +43 -0
- package/dist/src/components/plate/components/caption.js +25 -0
- package/dist/src/components/plate/components/caption.js.map +1 -0
- package/dist/src/components/plate/components/checkbox.d.ts +3 -0
- package/dist/src/components/plate/components/checkbox.js +7 -0
- package/dist/src/components/plate/components/checkbox.js.map +1 -0
- package/dist/src/components/plate/components/code-block-combobox.d.ts +48 -0
- package/dist/src/components/plate/components/code-block-combobox.js +131 -0
- package/dist/src/components/plate/components/code-block-combobox.js.map +1 -0
- package/dist/src/components/plate/components/code-block-element.d.ts +22 -0
- package/dist/src/components/plate/components/code-block-element.js +13 -0
- package/dist/src/components/plate/components/code-block-element.js.map +1 -0
- package/dist/src/components/plate/components/code-leaf.d.ts +19 -0
- package/dist/src/components/plate/components/code-leaf.js +8 -0
- package/dist/src/components/plate/components/code-leaf.js.map +1 -0
- package/dist/src/components/plate/components/code-line-element.d.ts +21 -0
- package/dist/src/components/plate/components/code-line-element.js +6 -0
- package/dist/src/components/plate/components/code-line-element.js.map +1 -0
- package/dist/src/components/plate/components/code-syntax-leaf.d.ts +19 -0
- package/dist/src/components/plate/components/code-syntax-leaf.js +11 -0
- package/dist/src/components/plate/components/code-syntax-leaf.js.map +1 -0
- package/dist/src/components/plate/components/color-constants.d.ts +10 -0
- package/dist/src/components/plate/components/color-constants.js +430 -0
- package/dist/src/components/plate/components/color-constants.js.map +1 -0
- package/dist/src/components/plate/components/color-dropdown-menu-items.d.ts +18 -0
- package/dist/src/components/plate/components/color-dropdown-menu-items.js +21 -0
- package/dist/src/components/plate/components/color-dropdown-menu-items.js.map +1 -0
- package/dist/src/components/plate/components/color-dropdown-menu.d.ts +12 -0
- package/dist/src/components/plate/components/color-dropdown-menu.js +18 -0
- package/dist/src/components/plate/components/color-dropdown-menu.js.map +1 -0
- package/dist/src/components/plate/components/color-input.d.ts +2 -0
- package/dist/src/components/plate/components/color-input.js +15 -0
- package/dist/src/components/plate/components/color-input.js.map +1 -0
- package/dist/src/components/plate/components/color-picker.d.ts +18 -0
- package/dist/src/components/plate/components/color-picker.js +19 -0
- package/dist/src/components/plate/components/color-picker.js.map +1 -0
- package/dist/src/components/plate/components/colors-custom.d.ts +10 -0
- package/dist/src/components/plate/components/colors-custom.js +21 -0
- package/dist/src/components/plate/components/colors-custom.js.map +1 -0
- package/dist/src/components/plate/components/command.d.ts +76 -0
- package/dist/src/components/plate/components/command.js +18 -0
- package/dist/src/components/plate/components/command.js.map +1 -0
- package/dist/src/components/plate/components/comment-leaf.d.ts +3 -0
- package/dist/src/components/plate/components/comment-leaf.js +23 -0
- package/dist/src/components/plate/components/comment-leaf.js.map +1 -0
- package/dist/src/components/plate/components/dialog.d.ts +12 -0
- package/dist/src/components/plate/components/dialog.js +16 -0
- package/dist/src/components/plate/components/dialog.js.map +1 -0
- package/dist/src/components/plate/components/dropdown-menu.d.ts +29 -0
- package/dist/src/components/plate/components/dropdown-menu.js +51 -0
- package/dist/src/components/plate/components/dropdown-menu.js.map +1 -0
- package/dist/src/components/plate/components/excalidraw-element.d.ts +21 -0
- package/dist/src/components/plate/components/excalidraw-element.js +12 -0
- package/dist/src/components/plate/components/excalidraw-element.js.map +1 -0
- package/dist/src/components/plate/components/fixed-toolbar-buttons.d.ts +1 -0
- package/dist/src/components/plate/components/fixed-toolbar-buttons.js +25 -0
- package/dist/src/components/plate/components/fixed-toolbar-buttons.js.map +1 -0
- package/dist/src/components/plate/components/fixed-toolbar.d.ts +1 -0
- package/dist/src/components/plate/components/fixed-toolbar.js +4 -0
- package/dist/src/components/plate/components/fixed-toolbar.js.map +1 -0
- package/dist/src/components/plate/components/heading-element.d.ts +24 -0
- package/dist/src/components/plate/components/heading-element.js +30 -0
- package/dist/src/components/plate/components/heading-element.js.map +1 -0
- package/dist/src/components/plate/components/highlight-leaf.d.ts +19 -0
- package/dist/src/components/plate/components/highlight-leaf.js +5 -0
- package/dist/src/components/plate/components/highlight-leaf.js.map +1 -0
- package/dist/src/components/plate/components/hr-element.d.ts +21 -0
- package/dist/src/components/plate/components/hr-element.js +11 -0
- package/dist/src/components/plate/components/hr-element.js.map +1 -0
- package/dist/src/components/plate/components/image-element.d.ts +21 -0
- package/dist/src/components/plate/components/image-element.js +19 -0
- package/dist/src/components/plate/components/image-element.js.map +1 -0
- package/dist/src/components/plate/components/indent-list-toolbar-button.d.ts +18 -0
- package/dist/src/components/plate/components/indent-list-toolbar-button.js +12 -0
- package/dist/src/components/plate/components/indent-list-toolbar-button.js.map +1 -0
- package/dist/src/components/plate/components/indent-todo-marker-component.d.ts +3 -0
- package/dist/src/components/plate/components/indent-todo-marker-component.js +14 -0
- package/dist/src/components/plate/components/indent-todo-marker-component.js.map +1 -0
- package/dist/src/components/plate/components/indent-todo-toolbar-button.d.ts +15 -0
- package/dist/src/components/plate/components/indent-todo-toolbar-button.js +11 -0
- package/dist/src/components/plate/components/indent-todo-toolbar-button.js.map +1 -0
- package/dist/src/components/plate/components/indent-toolbar-button.d.ts +15 -0
- package/dist/src/components/plate/components/indent-toolbar-button.js +10 -0
- package/dist/src/components/plate/components/indent-toolbar-button.js.map +1 -0
- package/dist/src/components/plate/components/inline-combobox.d.ts +29 -0
- package/dist/src/components/plate/components/inline-combobox.js +156 -0
- package/dist/src/components/plate/components/inline-combobox.js.map +1 -0
- package/dist/src/components/plate/components/input.d.ts +8 -0
- package/dist/src/components/plate/components/input.js +20 -0
- package/dist/src/components/plate/components/input.js.map +1 -0
- package/dist/src/components/plate/components/insert-dropdown-menu.d.ts +12 -0
- package/dist/src/components/plate/components/insert-dropdown-menu.js +179 -0
- package/dist/src/components/plate/components/insert-dropdown-menu.js.map +1 -0
- package/dist/src/components/plate/components/kbd-leaf.d.ts +19 -0
- package/dist/src/components/plate/components/kbd-leaf.js +5 -0
- package/dist/src/components/plate/components/kbd-leaf.js.map +1 -0
- package/dist/src/components/plate/components/line-height-dropdown-menu.d.ts +2 -0
- package/dist/src/components/plate/components/line-height-dropdown-menu.js +12 -0
- package/dist/src/components/plate/components/line-height-dropdown-menu.js.map +1 -0
- package/dist/src/components/plate/components/link-element.d.ts +21 -0
- package/dist/src/components/plate/components/link-element.js +10 -0
- package/dist/src/components/plate/components/link-element.js.map +1 -0
- package/dist/src/components/plate/components/link-floating-toolbar.d.ts +5 -0
- package/dist/src/components/plate/components/link-floating-toolbar.js +54 -0
- package/dist/src/components/plate/components/link-floating-toolbar.js.map +1 -0
- package/dist/src/components/plate/components/link-toolbar-button.d.ts +15 -0
- package/dist/src/components/plate/components/link-toolbar-button.js +11 -0
- package/dist/src/components/plate/components/link-toolbar-button.js.map +1 -0
- package/dist/src/components/plate/components/mark-toolbar-button.d.ts +18 -0
- package/dist/src/components/plate/components/mark-toolbar-button.js +11 -0
- package/dist/src/components/plate/components/mark-toolbar-button.js.map +1 -0
- package/dist/src/components/plate/components/media-embed-element.d.ts +21 -0
- package/dist/src/components/plate/components/media-embed-element.js +23 -0
- package/dist/src/components/plate/components/media-embed-element.js.map +1 -0
- package/dist/src/components/plate/components/media-popover.d.ts +7 -0
- package/dist/src/components/plate/components/media-popover.js +30 -0
- package/dist/src/components/plate/components/media-popover.js.map +1 -0
- package/dist/src/components/plate/components/mention-element.d.ts +26 -0
- package/dist/src/components/plate/components/mention-element.js +12 -0
- package/dist/src/components/plate/components/mention-element.js.map +1 -0
- package/dist/src/components/plate/components/mention-input-element.d.ts +25 -0
- package/dist/src/components/plate/components/mention-input-element.js +89 -0
- package/dist/src/components/plate/components/mention-input-element.js.map +1 -0
- package/dist/src/components/plate/components/outdent-toolbar-button.d.ts +15 -0
- package/dist/src/components/plate/components/outdent-toolbar-button.js +10 -0
- package/dist/src/components/plate/components/outdent-toolbar-button.js.map +1 -0
- package/dist/src/components/plate/components/paragraph-element.d.ts +20 -0
- package/dist/src/components/plate/components/paragraph-element.js +4 -0
- package/dist/src/components/plate/components/paragraph-element.js.map +1 -0
- package/dist/src/components/plate/components/placeholder.d.ts +6 -0
- package/dist/src/components/plate/components/placeholder.js +37 -0
- package/dist/src/components/plate/components/placeholder.js.map +1 -0
- package/dist/src/components/plate/components/popover.d.ts +7 -0
- package/dist/src/components/plate/components/popover.js +11 -0
- package/dist/src/components/plate/components/popover.js.map +1 -0
- package/dist/src/components/plate/components/resizable.d.ts +40 -0
- package/dist/src/components/plate/components/resizable.js +38 -0
- package/dist/src/components/plate/components/resizable.js.map +1 -0
- package/dist/src/components/plate/components/separator.d.ts +4 -0
- package/dist/src/components/plate/components/separator.js +20 -0
- package/dist/src/components/plate/components/separator.js.map +1 -0
- package/dist/src/components/plate/components/slash-input-element.d.ts +22 -0
- package/dist/src/components/plate/components/slash-input-element.js +64 -0
- package/dist/src/components/plate/components/slash-input-element.js.map +1 -0
- package/dist/src/components/plate/components/table-cell-element.d.ts +47 -0
- package/dist/src/components/plate/components/table-cell-element.js +35 -0
- package/dist/src/components/plate/components/table-cell-element.js.map +1 -0
- package/dist/src/components/plate/components/table-element.d.ts +24 -0
- package/dist/src/components/plate/components/table-element.js +46 -0
- package/dist/src/components/plate/components/table-element.js.map +1 -0
- package/dist/src/components/plate/components/table-row-element.d.ts +23 -0
- package/dist/src/components/plate/components/table-row-element.js +7 -0
- package/dist/src/components/plate/components/table-row-element.js.map +1 -0
- package/dist/src/components/plate/components/todo-list-element.d.ts +21 -0
- package/dist/src/components/plate/components/todo-list-element.js +12 -0
- package/dist/src/components/plate/components/todo-list-element.js.map +1 -0
- package/dist/src/components/plate/components/toolbar.d.ts +29 -0
- package/dist/src/components/plate/components/toolbar.js +51 -0
- package/dist/src/components/plate/components/toolbar.js.map +1 -0
- package/dist/src/components/plate/components/tooltip.d.ts +12 -0
- package/dist/src/components/plate/components/tooltip.js +26 -0
- package/dist/src/components/plate/components/tooltip.js.map +1 -0
- package/dist/src/components/plate/components/turn-into-dropdown-menu.d.ts +2 -0
- package/dist/src/components/plate/components/turn-into-dropdown-menu.js +93 -0
- package/dist/src/components/plate/components/turn-into-dropdown-menu.js.map +1 -0
- package/dist/src/components/plate/icons.d.ts +85 -0
- package/dist/src/components/plate/icons.js +101 -0
- package/dist/src/components/plate/icons.js.map +1 -0
- package/dist/src/components/plate/lib/autoformat-rules.d.ts +10 -0
- package/dist/src/components/plate/lib/autoformat-rules.js +271 -0
- package/dist/src/components/plate/lib/autoformat-rules.js.map +1 -0
- package/dist/src/components/plate/usePlateEditor.d.ts +4 -0
- package/dist/src/components/plate/usePlateEditor.js +384 -0
- package/dist/src/components/plate/usePlateEditor.js.map +1 -0
- package/dist/src/components/states/error/index.d.ts +5 -0
- package/dist/src/components/states/error/index.js +15 -0
- package/dist/src/components/states/error/index.js.map +1 -0
- package/dist/src/context/FormData.d.ts +33 -0
- package/dist/src/context/FormData.js +109 -0
- package/dist/src/context/FormData.js.map +1 -0
- package/dist/src/hooks/useDependent/enhanced/useInputDependent/useInputDependent.d.ts +12 -0
- package/dist/src/hooks/useDependent/enhanced/useInputDependent/useInputDependent.js +36 -0
- package/dist/src/hooks/useDependent/enhanced/useInputDependent/useInputDependent.js.map +1 -0
- package/dist/src/hooks/useDependent/enhanced/useOptionsGenerator/useOptionsGenerator.d.ts +15 -0
- package/dist/src/hooks/useDependent/enhanced/useOptionsGenerator/useOptionsGenerator.js +16 -0
- package/dist/src/hooks/useDependent/enhanced/useOptionsGenerator/useOptionsGenerator.js.map +1 -0
- package/dist/src/hooks/useDependent/useDependent.d.ts +11 -0
- package/dist/src/hooks/useDependent/useDependent.js +86 -0
- package/dist/src/hooks/useDependent/useDependent.js.map +1 -0
- package/dist/src/hooks/useValueGenerator/useValueGenerator.d.ts +18 -0
- package/dist/src/hooks/useValueGenerator/useValueGenerator.js +99 -0
- package/dist/src/hooks/useValueGenerator/useValueGenerator.js.map +1 -0
- package/dist/src/index.d.ts +18 -0
- package/dist/src/index.js +19 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/styles/Hidden.styles.d.ts +7 -0
- package/dist/src/styles/Hidden.styles.js +16 -0
- package/dist/src/styles/Hidden.styles.js.map +1 -0
- package/dist/src/styles/Skeleton.d.ts +7 -0
- package/dist/src/styles/Skeleton.js +40 -0
- package/dist/src/styles/Skeleton.js.map +1 -0
- package/dist/src/styles/Textfield.styles.d.ts +5 -0
- package/dist/src/styles/Textfield.styles.js +34 -0
- package/dist/src/styles/Textfield.styles.js.map +1 -0
- package/dist/src/testutils.d.ts +14 -0
- package/dist/src/testutils.js +22 -0
- package/dist/src/testutils.js.map +1 -0
- package/dist/src/types/controlProps.d.ts +70 -0
- package/dist/src/types/controlProps.js +2 -0
- package/dist/src/types/controlProps.js.map +1 -0
- package/dist/src/types/index.d.ts +166 -0
- package/dist/src/types/index.js +2 -0
- package/dist/src/types/index.js.map +1 -0
- package/dist/src/ui/menu/hooks/useMenu.d.ts +13 -0
- package/dist/src/ui/menu/hooks/useMenu.js +41 -0
- package/dist/src/ui/menu/hooks/useMenu.js.map +1 -0
- package/dist/src/ui/menu/index.d.ts +13 -0
- package/dist/src/ui/menu/index.js +13 -0
- package/dist/src/ui/menu/index.js.map +1 -0
- package/dist/src/ui/menu/test/createControl.d.ts +15 -0
- package/dist/src/ui/menu/test/createControl.js +30 -0
- package/dist/src/ui/menu/test/createControl.js.map +1 -0
- package/dist/src/ui/menu/utils/detemineSubmenuTabs/index.d.ts +14 -0
- package/dist/src/ui/menu/utils/detemineSubmenuTabs/index.js +82 -0
- package/dist/src/ui/menu/utils/detemineSubmenuTabs/index.js.map +1 -0
- package/dist/src/ui-helper/HeaderCollapseButton/index.d.ts +7 -0
- package/dist/src/ui-helper/HeaderCollapseButton/index.js +9 -0
- package/dist/src/ui-helper/HeaderCollapseButton/index.js.map +1 -0
- package/dist/src/ui-helper/notifications/Error.d.ts +6 -0
- package/dist/src/ui-helper/notifications/Error.js +77 -0
- package/dist/src/ui-helper/notifications/Error.js.map +1 -0
- package/dist/src/ui-helper/notifications/images/background.d.ts +2 -0
- package/dist/src/ui-helper/notifications/images/background.js +7 -0
- package/dist/src/ui-helper/notifications/images/background.js.map +1 -0
- package/dist/src/ui-helper/notifications/images/spinner.d.ts +2 -0
- package/dist/src/ui-helper/notifications/images/spinner.js +6 -0
- package/dist/src/ui-helper/notifications/images/spinner.js.map +1 -0
- package/dist/src/ui-helper/notifications/images/under-improvement.d.ts +2 -0
- package/dist/src/ui-helper/notifications/images/under-improvement.js +6 -0
- package/dist/src/ui-helper/notifications/images/under-improvement.js.map +1 -0
- package/dist/src/utils/findFormControlError/index.d.ts +4 -0
- package/dist/src/utils/findFormControlError/index.js +24 -0
- package/dist/src/utils/findFormControlError/index.js.map +1 -0
- package/dist/src/utils/hasGroupRequiredFieldsWithValues/index.d.ts +6 -0
- package/dist/src/utils/hasGroupRequiredFieldsWithValues/index.js +22 -0
- package/dist/src/utils/hasGroupRequiredFieldsWithValues/index.js.map +1 -0
- package/dist/styles/formControl.module.scss +59 -0
- package/dist/tailwind.config.d.ts +1 -0
- package/dist/tailwind.config.js +17 -0
- package/dist/tailwind.config.js.map +1 -0
- package/dist/webpack.common.d.ts +63 -0
- package/dist/webpack.common.js +76 -0
- package/dist/webpack.common.js.map +1 -0
- package/dist/webpack.dev.d.ts +65 -0
- package/dist/webpack.dev.js +11 -0
- package/dist/webpack.dev.js.map +1 -0
- package/dist/webpack.prod.d.ts +65 -0
- package/dist/webpack.prod.js +10 -0
- package/dist/webpack.prod.js.map +1 -0
- package/package.json +39 -2
- package/dist/formbuilder.js +0 -521
- package/dist/formbuilder.js.LICENSE.txt +0 -60
- package/dist/formbuilder.js.map +0 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare const MentionInputElement: React.ForwardRefExoticComponent<Omit<{
|
|
3
|
+
elementToAttributes?: (element: import("@udecode/plate-common").TElement) => any;
|
|
4
|
+
} & Omit<{
|
|
5
|
+
as?: React.ElementType;
|
|
6
|
+
asChild?: boolean;
|
|
7
|
+
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<any>, "ref"> & {
|
|
8
|
+
ref?: React.Ref<any>;
|
|
9
|
+
} & import("@udecode/plate-common").BasePluginContext<import("@udecode/plate-common/react").AnyPlatePlugin> & {
|
|
10
|
+
useOption: {
|
|
11
|
+
<K extends string | number | symbol, F extends any, Args extends Parameters<F & ((...args: any[]) => any)>>(optionKey: K, ...args: Args): F extends (...args: any[]) => any ? ReturnType<F> : F;
|
|
12
|
+
<K extends string | number | symbol, F extends any>(optionKey: K): F extends (...args: any[]) => any ? never : F;
|
|
13
|
+
};
|
|
14
|
+
editor: import("@udecode/plate-common/react").PlateEditor;
|
|
15
|
+
plugin: import("@udecode/plate-common/react").EditorPlatePlugin<import("@udecode/plate-common/react").AnyPlatePlugin>;
|
|
16
|
+
} & {
|
|
17
|
+
className?: string;
|
|
18
|
+
nodeProps?: import("@udecode/plate-common").AnyObject;
|
|
19
|
+
} & import("@udecode/slate-react").TRenderElementProps<import("@udecode/plate-common").TElement> & {
|
|
20
|
+
path: import("slate").Path;
|
|
21
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<never>>;
|
|
22
|
+
export declare const MENTIONABLES: {
|
|
23
|
+
key: string;
|
|
24
|
+
text: string;
|
|
25
|
+
}[];
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { cn, withRef } from "@udecode/cn";
|
|
4
|
+
import { PlateElement } from "@udecode/plate-common/react";
|
|
5
|
+
import { getMentionOnSelectItem } from "@udecode/plate-mention";
|
|
6
|
+
import { InlineCombobox, InlineComboboxContent, InlineComboboxEmpty, InlineComboboxInput, InlineComboboxItem, } from "./inline-combobox";
|
|
7
|
+
const onSelectItem = getMentionOnSelectItem();
|
|
8
|
+
export const MentionInputElement = withRef(({ className, ...props }, ref) => {
|
|
9
|
+
const { children, editor, element } = props;
|
|
10
|
+
const [search, setSearch] = useState("");
|
|
11
|
+
return (_jsxs(PlateElement, { as: "span", "data-slate-value": element.value, ref: ref, ...props, children: [_jsxs(InlineCombobox, { element: element, setValue: setSearch, showTrigger: false, trigger: "@", value: search, children: [_jsx("span", { className: cn("inline-block rounded-md bg-muted px-1.5 py-0.5 align-baseline text-sm ring-ring focus-within:ring-2", className), children: _jsx(InlineComboboxInput, {}) }), _jsxs(InlineComboboxContent, { className: "my-1.5", children: [_jsx(InlineComboboxEmpty, { children: "No results found" }), MENTIONABLES.map((item) => (_jsx(InlineComboboxItem, { onClick: () => onSelectItem(editor, item, search), value: item.text, children: item.text }, item.key)))] })] }), children] }));
|
|
12
|
+
});
|
|
13
|
+
export const MENTIONABLES = [
|
|
14
|
+
{ key: "0", text: "Aayla Secura" },
|
|
15
|
+
{ key: "1", text: "Adi Gallia" },
|
|
16
|
+
{
|
|
17
|
+
key: "2",
|
|
18
|
+
text: "Admiral Dodd Rancit",
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
key: "3",
|
|
22
|
+
text: "Admiral Firmus Piett",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
key: "4",
|
|
26
|
+
text: "Admiral Gial Ackbar",
|
|
27
|
+
},
|
|
28
|
+
{ key: "5", text: "Admiral Ozzel" },
|
|
29
|
+
{ key: "6", text: "Admiral Raddus" },
|
|
30
|
+
{
|
|
31
|
+
key: "7",
|
|
32
|
+
text: "Admiral Terrinald Screed",
|
|
33
|
+
},
|
|
34
|
+
{ key: "8", text: "Admiral Trench" },
|
|
35
|
+
{
|
|
36
|
+
key: "9",
|
|
37
|
+
text: "Admiral U.O. Statura",
|
|
38
|
+
},
|
|
39
|
+
{ key: "10", text: "Agen Kolar" },
|
|
40
|
+
{ key: "11", text: "Agent Kallus" },
|
|
41
|
+
{
|
|
42
|
+
key: "12",
|
|
43
|
+
text: "Aiolin and Morit Astarte",
|
|
44
|
+
},
|
|
45
|
+
{ key: "13", text: "Aks Moe" },
|
|
46
|
+
{ key: "14", text: "Almec" },
|
|
47
|
+
{ key: "15", text: "Alton Kastle" },
|
|
48
|
+
{ key: "16", text: "Amee" },
|
|
49
|
+
{ key: "17", text: "AP-5" },
|
|
50
|
+
{ key: "18", text: "Armitage Hux" },
|
|
51
|
+
{ key: "19", text: "Artoo" },
|
|
52
|
+
{ key: "20", text: "Arvel Crynyd" },
|
|
53
|
+
{ key: "21", text: "Asajj Ventress" },
|
|
54
|
+
{ key: "22", text: "Aurra Sing" },
|
|
55
|
+
{ key: "23", text: "AZI-3" },
|
|
56
|
+
{ key: "24", text: "Bala-Tik" },
|
|
57
|
+
{ key: "25", text: "Barada" },
|
|
58
|
+
{ key: "26", text: "Bargwill Tomder" },
|
|
59
|
+
{ key: "27", text: "Baron Papanoida" },
|
|
60
|
+
{ key: "28", text: "Barriss Offee" },
|
|
61
|
+
{ key: "29", text: "Baze Malbus" },
|
|
62
|
+
{ key: "30", text: "Bazine Netal" },
|
|
63
|
+
{ key: "31", text: "BB-8" },
|
|
64
|
+
{ key: "32", text: "BB-9E" },
|
|
65
|
+
{ key: "33", text: "Ben Quadinaros" },
|
|
66
|
+
{ key: "34", text: "Berch Teller" },
|
|
67
|
+
{ key: "35", text: "Beru Lars" },
|
|
68
|
+
{ key: "36", text: "Bib Fortuna" },
|
|
69
|
+
{
|
|
70
|
+
key: "37",
|
|
71
|
+
text: "Biggs Darklighter",
|
|
72
|
+
},
|
|
73
|
+
{ key: "38", text: "Black Krrsantan" },
|
|
74
|
+
{ key: "39", text: "Bo-Katan Kryze" },
|
|
75
|
+
{ key: "40", text: "Boba Fett" },
|
|
76
|
+
{ key: "41", text: "Bobbajo" },
|
|
77
|
+
{ key: "42", text: "Bodhi Rook" },
|
|
78
|
+
{ key: "43", text: "Borvo the Hutt" },
|
|
79
|
+
{ key: "44", text: "Boss Nass" },
|
|
80
|
+
{ key: "45", text: "Bossk" },
|
|
81
|
+
{
|
|
82
|
+
key: "46",
|
|
83
|
+
text: "Breha Antilles-Organa",
|
|
84
|
+
},
|
|
85
|
+
{ key: "47", text: "Bren Derlin" },
|
|
86
|
+
{ key: "48", text: "Brendol Hux" },
|
|
87
|
+
{ key: "49", text: "BT-1" },
|
|
88
|
+
];
|
|
89
|
+
//# sourceMappingURL=mention-input-element.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mention-input-element.js","sourceRoot":"","sources":["../../../../../src/components/plate/components/mention-input-element.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,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AAE,mBAAmB;KAC1B;IACD,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,iBAAiB,EAAE;IACtC,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,gBAAgB,EAAE;IACrC,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE;IAChC,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE;IAC9B,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE;IACjC,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,gBAAgB,EAAE;IACrC,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE;IAChC,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE;IAC5B;QACE,GAAG,EAAE,IAAI;QACT,IAAI,EAAE,uBAAuB;KAC9B;IACD,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE;IAClC,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE;IAClC,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE;CAC5B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare const OutdentToolbarButton: React.ForwardRefExoticComponent<Omit<{
|
|
3
|
+
tooltip?: React.ReactNode;
|
|
4
|
+
tooltipContentProps?: Omit<React.ComponentPropsWithoutRef<React.ForwardRefExoticComponent<import("@radix-ui/react-tooltip").TooltipContentProps & React.RefAttributes<HTMLDivElement>>>, "children">;
|
|
5
|
+
tooltipProps?: Omit<React.ComponentPropsWithoutRef<React.FC<import("@radix-ui/react-tooltip").TooltipProps>>, "children">;
|
|
6
|
+
} & Omit<{
|
|
7
|
+
isDropdown?: boolean;
|
|
8
|
+
pressed?: boolean;
|
|
9
|
+
} & Omit<Omit<Omit<import("@radix-ui/react-toolbar").ToolbarToggleItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & import("class-variance-authority").VariantProps<(props?: {
|
|
10
|
+
size?: "default" | "sm" | "lg";
|
|
11
|
+
variant?: "outline" | "default";
|
|
12
|
+
} & import("class-variance-authority/types").ClassProp) => string> & React.RefAttributes<HTMLButtonElement>, "ref">, "value" | "asChild"> & import("class-variance-authority").VariantProps<(props?: {
|
|
13
|
+
size?: "default" | "sm" | "lg";
|
|
14
|
+
variant?: "outline" | "default";
|
|
15
|
+
} & import("class-variance-authority/types").ClassProp) => string> & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { withRef } from "@udecode/cn";
|
|
3
|
+
import { useOutdentButton } from "@udecode/plate-indent/react";
|
|
4
|
+
import { Icons } from "../icons";
|
|
5
|
+
import { ToolbarButton } from "./toolbar";
|
|
6
|
+
export const OutdentToolbarButton = withRef((rest, ref) => {
|
|
7
|
+
const { props } = useOutdentButton();
|
|
8
|
+
return (_jsx(ToolbarButton, { ref: ref, tooltip: "Outdent", ...props, ...rest, children: _jsx(Icons.outdent, {}) }));
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=outdent-toolbar-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outdent-toolbar-button.js","sourceRoot":"","sources":["../../../../../src/components/plate/components/outdent-toolbar-button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAG/D,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,CAAC,MAAM,oBAAoB,GAAG,OAAO,CACzC,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;IACZ,MAAM,EAAE,KAAK,EAAE,GAAG,gBAAgB,EAAE,CAAC;IAErC,OAAO,CACL,KAAC,aAAa,IAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAC,SAAS,KAAK,KAAK,KAAM,IAAI,YAC5D,KAAC,KAAK,CAAC,OAAO,KAAG,GACH,CACjB,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const ParagraphElement: import("react").ForwardRefExoticComponent<Omit<{
|
|
2
|
+
elementToAttributes?: (element: import("@udecode/plate-common").TElement) => any;
|
|
3
|
+
} & Omit<{
|
|
4
|
+
as?: React.ElementType;
|
|
5
|
+
asChild?: boolean;
|
|
6
|
+
} & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<any>, "ref"> & {
|
|
7
|
+
ref?: import("react").Ref<any>;
|
|
8
|
+
} & import("@udecode/plate-common").BasePluginContext<import("@udecode/plate-common/react").AnyPlatePlugin> & {
|
|
9
|
+
useOption: {
|
|
10
|
+
<K extends string | number | symbol, F extends any, Args extends Parameters<F & ((...args: any[]) => any)>>(optionKey: K, ...args: Args): F extends (...args: any[]) => any ? ReturnType<F> : F;
|
|
11
|
+
<K extends string | number | symbol, F extends any>(optionKey: K): F extends (...args: any[]) => any ? never : F;
|
|
12
|
+
};
|
|
13
|
+
editor: import("@udecode/plate-common/react").PlateEditor;
|
|
14
|
+
plugin: import("@udecode/plate-common/react").EditorPlatePlugin<import("@udecode/plate-common/react").AnyPlatePlugin>;
|
|
15
|
+
} & {
|
|
16
|
+
className?: string;
|
|
17
|
+
nodeProps?: import("@udecode/plate-common").AnyObject;
|
|
18
|
+
} & import("@udecode/slate-react").TRenderElementProps<import("@udecode/plate-common").TElement> & {
|
|
19
|
+
path: import("slate").Path;
|
|
20
|
+
} & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<any>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paragraph-element.js","sourceRoot":"","sources":["../../../../../src/components/plate/components/paragraph-element.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { PlaceholderProps } from "@udecode/plate-common/react";
|
|
3
|
+
export declare const Placeholder: (props: PlaceholderProps) => any;
|
|
4
|
+
export declare const withPlaceholder: (Component: any, props: Omit<PlaceholderProps, "editor" | "className" | "path" | "useOption" | "plugin" | "nodeProps" | keyof import("@udecode/slate-react").TRenderElementProps<import("@udecode/plate-common").TElement> | keyof import("@udecode/plate-common").BasePluginContext<import("@udecode/plate-common").PluginConfig>>) => (childrenProps: import("@udecode/plate-common/react").PlateRenderElementProps) => React.JSX.Element;
|
|
5
|
+
export declare const withPlaceholdersPrimitive: (components: any, options: import("@udecode/plate-common/react").CreateHOCOptions<PlaceholderProps> | import("@udecode/plate-common/react").CreateHOCOptions<PlaceholderProps>[]) => any;
|
|
6
|
+
export declare const withPlaceholders: (components: any) => any;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { cn } from "@udecode/cn";
|
|
3
|
+
import { createNodeHOC, createNodesHOC, ParagraphPlugin, usePlaceholderState, } from "@udecode/plate-common/react";
|
|
4
|
+
import { HEADING_KEYS } from "@udecode/plate-heading";
|
|
5
|
+
export const Placeholder = (props) => {
|
|
6
|
+
const { children, nodeProps, placeholder } = props;
|
|
7
|
+
const { enabled } = usePlaceholderState(props);
|
|
8
|
+
return React.Children.map(children, (child) => {
|
|
9
|
+
return React.cloneElement(child, {
|
|
10
|
+
className: child.props.className,
|
|
11
|
+
nodeProps: {
|
|
12
|
+
...nodeProps,
|
|
13
|
+
className: cn(enabled &&
|
|
14
|
+
"before:absolute before:cursor-text before:opacity-30 before:content-[attr(placeholder)]"),
|
|
15
|
+
placeholder,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
export const withPlaceholder = createNodeHOC(Placeholder);
|
|
21
|
+
export const withPlaceholdersPrimitive = createNodesHOC(Placeholder);
|
|
22
|
+
export const withPlaceholders = (components) => withPlaceholdersPrimitive(components, [
|
|
23
|
+
{
|
|
24
|
+
hideOnBlur: true,
|
|
25
|
+
key: ParagraphPlugin.key,
|
|
26
|
+
placeholder: "Type a paragraph",
|
|
27
|
+
query: {
|
|
28
|
+
maxLevel: 1,
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
hideOnBlur: false,
|
|
33
|
+
key: HEADING_KEYS.h1,
|
|
34
|
+
placeholder: "Untitled",
|
|
35
|
+
},
|
|
36
|
+
]);
|
|
37
|
+
//# sourceMappingURL=placeholder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"placeholder.js","sourceRoot":"","sources":["../../../../../src/components/plate/components/placeholder.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EACL,aAAa,EACb,cAAc,EACd,eAAe,EACf,mBAAmB,GACpB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAItD,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAuB,EAAE,EAAE;IACrD,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAEnD,MAAM,EAAE,OAAO,EAAE,GAAG,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAE/C,OAAO,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;QAC5C,OAAO,KAAK,CAAC,YAAY,CAAC,KAAK,EAAE;YAC/B,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,SAAS;YAChC,SAAS,EAAE;gBACT,GAAG,SAAS;gBACZ,SAAS,EAAE,EAAE,CACX,OAAO;oBACL,yFAAyF,CAC5F;gBACD,WAAW;aACZ;SACF,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC;AAE1D,MAAM,CAAC,MAAM,yBAAyB,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;AAErE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,UAAe,EAAE,EAAE,CAClD,yBAAyB,CAAC,UAAU,EAAE;IACpC;QACE,UAAU,EAAE,IAAI;QAChB,GAAG,EAAE,eAAe,CAAC,GAAG;QACxB,WAAW,EAAE,kBAAkB;QAC/B,KAAK,EAAE;YACL,QAAQ,EAAE,CAAC;SACZ;KACF;IACD;QACE,UAAU,EAAE,KAAK;QACjB,GAAG,EAAE,YAAY,CAAC,EAAE;QACpB,WAAW,EAAE,UAAU;KACxB;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
4
|
+
export declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
export declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export declare const popoverVariants: (props?: import("class-variance-authority/types").ClassProp) => string;
|
|
7
|
+
export declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
4
|
+
import { cn, withRef } from "@udecode/cn";
|
|
5
|
+
import { cva } from "class-variance-authority";
|
|
6
|
+
export const Popover = PopoverPrimitive.Root;
|
|
7
|
+
export const PopoverTrigger = PopoverPrimitive.Trigger;
|
|
8
|
+
export const PopoverAnchor = PopoverPrimitive.Anchor;
|
|
9
|
+
export const popoverVariants = cva("w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 print:hidden bg-white");
|
|
10
|
+
export const PopoverContent = withRef(({ className, style, align = "center", sideOffset = 4, ...props }, ref) => (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, { ref: ref, align: align, sideOffset: sideOffset, className: cn(popoverVariants(), className), style: { zIndex: 1000, ...style }, ...props }) })));
|
|
11
|
+
//# sourceMappingURL=popover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.js","sourceRoot":"","sources":["../../../../../src/components/plate/components/popover.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAG/C,MAAM,CAAC,MAAM,OAAO,GAAG,gBAAgB,CAAC,IAAI,CAAC;AAC7C,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAAC,OAAO,CAAC;AACvD,MAAM,CAAC,MAAM,aAAa,GAAG,gBAAgB,CAAC,MAAM,CAAC;AAErD,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAChC,6bAA6b,CAC9b,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CACnC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,GAAG,QAAQ,EAAE,UAAU,GAAG,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACzE,KAAC,gBAAgB,CAAC,MAAM,cACtB,KAAC,gBAAgB,CAAC,OAAO,IACvB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,EAAE,CAAC,eAAe,EAAE,EAAE,SAAS,CAAC,EAC3C,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,KAC7B,KAAK,GACT,GACsB,CAC3B,CACF,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare const mediaResizeHandleVariants: (props?: {
|
|
3
|
+
direction?: "left" | "right";
|
|
4
|
+
} & import("class-variance-authority/types").ClassProp) => string;
|
|
5
|
+
export declare const ResizeHandle: React.ForwardRefExoticComponent<Omit<{
|
|
6
|
+
as?: React.ElementType;
|
|
7
|
+
asChild?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
options?: import("@udecode/plate-resizable").ResizeHandleOptions | undefined;
|
|
10
|
+
setProps?: ((hookProps: {
|
|
11
|
+
onMouseDown: React.MouseEventHandler<Element>;
|
|
12
|
+
onMouseOut: () => void;
|
|
13
|
+
onMouseOver: () => void;
|
|
14
|
+
onTouchEnd: () => void;
|
|
15
|
+
onTouchMove: () => void;
|
|
16
|
+
onTouchStart: React.TouchEventHandler<Element>;
|
|
17
|
+
}) => Omit<React.HTMLAttributes<HTMLDivElement>, "onResize">) | undefined;
|
|
18
|
+
state?: {
|
|
19
|
+
direction: import("@udecode/plate-resizable").ResizeDirection;
|
|
20
|
+
initialPosition: number;
|
|
21
|
+
initialSize: number;
|
|
22
|
+
isHorizontal: boolean;
|
|
23
|
+
isResizing: boolean;
|
|
24
|
+
readOnly: boolean;
|
|
25
|
+
setInitialPosition: React.Dispatch<React.SetStateAction<number>>;
|
|
26
|
+
setInitialSize: React.Dispatch<React.SetStateAction<number>>;
|
|
27
|
+
setIsResizing: React.Dispatch<React.SetStateAction<boolean>>;
|
|
28
|
+
onHover: (() => void) | undefined;
|
|
29
|
+
onHoverEnd: (() => void) | undefined;
|
|
30
|
+
onMouseDown: React.MouseEventHandler<Element> | undefined;
|
|
31
|
+
onResize: (event: import("@udecode/plate-resizable").ResizeEvent) => void;
|
|
32
|
+
onTouchStart: React.TouchEventHandler<Element> | undefined;
|
|
33
|
+
} | undefined;
|
|
34
|
+
style?: React.CSSProperties;
|
|
35
|
+
} & Omit<React.HTMLAttributes<HTMLDivElement>, "onResize"> & React.RefAttributes<any>, "ref"> & React.RefAttributes<any>>;
|
|
36
|
+
export declare const Resizable: React.ForwardRefExoticComponent<Omit<{
|
|
37
|
+
options: import("@udecode/plate-resizable").ResizableOptions;
|
|
38
|
+
} & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>, "ref"> & import("class-variance-authority").VariantProps<(props?: {
|
|
39
|
+
align?: "left" | "right" | "center";
|
|
40
|
+
} & import("class-variance-authority/types").ClassProp) => string> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn, withRef, withVariants } from "@udecode/cn";
|
|
4
|
+
import { Resizable as ResizablePrimitive, ResizeHandle as ResizeHandlePrimitive, } from "@udecode/plate-resizable";
|
|
5
|
+
import { cva } from "class-variance-authority";
|
|
6
|
+
export const mediaResizeHandleVariants = cva(cn("top-0 flex w-6 select-none flex-col justify-center", "after:flex after:h-16 after:w-[3px] after:rounded-[6px] after:bg-ring after:opacity-0 after:content-['_'] group-hover:after:opacity-100"), {
|
|
7
|
+
variants: {
|
|
8
|
+
direction: {
|
|
9
|
+
left: "-left-3 -ml-3 pl-3",
|
|
10
|
+
right: "-right-3 -mr-3 items-end pr-3",
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
const resizeHandleVariants = cva(cn("absolute z-40"), {
|
|
15
|
+
variants: {
|
|
16
|
+
direction: {
|
|
17
|
+
bottom: "w-full cursor-row-resize",
|
|
18
|
+
left: "h-full cursor-col-resize",
|
|
19
|
+
right: "h-full cursor-col-resize",
|
|
20
|
+
top: "w-full cursor-row-resize",
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
const ResizeHandleVariants = withVariants(ResizeHandlePrimitive, resizeHandleVariants, ["direction"]);
|
|
25
|
+
export const ResizeHandle = withRef((props, ref) => (_jsx(ResizeHandleVariants, { direction: props.options?.direction, ref: ref, ...props })));
|
|
26
|
+
const resizableVariants = cva("", {
|
|
27
|
+
variants: {
|
|
28
|
+
align: {
|
|
29
|
+
center: "mx-auto",
|
|
30
|
+
left: "mr-auto",
|
|
31
|
+
right: "ml-auto",
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
export const Resizable = withVariants(ResizablePrimitive, resizableVariants, [
|
|
36
|
+
"align",
|
|
37
|
+
]);
|
|
38
|
+
//# sourceMappingURL=resizable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resizable.js","sourceRoot":"","sources":["../../../../../src/components/plate/components/resizable.tsx"],"names":[],"mappings":"AAA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AAE,iBAAiB,EAAE;IAC3E,OAAO;CACR,CAAC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
2
|
+
export declare const Separator: import("react").ForwardRefExoticComponent<Omit<Omit<SeparatorPrimitive.SeparatorProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("class-variance-authority").VariantProps<(props?: {
|
|
3
|
+
orientation?: "horizontal" | "vertical";
|
|
4
|
+
} & import("class-variance-authority/types").ClassProp) => string> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
3
|
+
import { withProps, withVariants } from "@udecode/cn";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
const separatorVariants = cva("shrink-0 bg-border", {
|
|
6
|
+
defaultVariants: {
|
|
7
|
+
orientation: "horizontal",
|
|
8
|
+
},
|
|
9
|
+
variants: {
|
|
10
|
+
orientation: {
|
|
11
|
+
horizontal: "h-px w-full",
|
|
12
|
+
vertical: "h-full w-px",
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
export const Separator = withVariants(withProps(SeparatorPrimitive.Root, {
|
|
17
|
+
decorative: true,
|
|
18
|
+
orientation: "horizontal",
|
|
19
|
+
}), separatorVariants);
|
|
20
|
+
//# sourceMappingURL=separator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"separator.js","sourceRoot":"","sources":["../../../../../src/components/plate/components/separator.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAE/C,MAAM,iBAAiB,GAAG,GAAG,CAAC,oBAAoB,EAAE;IAClD,eAAe,EAAE;QACf,WAAW,EAAE,YAAY;KAC1B;IACD,QAAQ,EAAE;QACR,WAAW,EAAE;YACX,UAAU,EAAE,aAAa;YACzB,QAAQ,EAAE,aAAa;SACxB;KACF;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,CACnC,SAAS,CAAC,kBAAkB,CAAC,IAAI,EAAE;IACjC,UAAU,EAAE,IAAI;IAChB,WAAW,EAAE,YAAY;CAC1B,CAAC,EACF,iBAAiB,CAClB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { PlateEditor } from "@udecode/plate-common/react";
|
|
3
|
+
export declare const SlashInputElement: React.ForwardRefExoticComponent<Omit<{
|
|
4
|
+
elementToAttributes?: (element: import("@udecode/plate-common").TElement) => any;
|
|
5
|
+
} & Omit<{
|
|
6
|
+
as?: React.ElementType;
|
|
7
|
+
asChild?: boolean;
|
|
8
|
+
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<any>, "ref"> & {
|
|
9
|
+
ref?: React.Ref<any>;
|
|
10
|
+
} & import("@udecode/plate-common").BasePluginContext<import("@udecode/plate-common/react").AnyPlatePlugin> & {
|
|
11
|
+
useOption: {
|
|
12
|
+
<K extends string | number | symbol, F extends any, Args extends Parameters<F & ((...args: any[]) => any)>>(optionKey: K, ...args: Args): F extends (...args: any[]) => any ? ReturnType<F> : F;
|
|
13
|
+
<K extends string | number | symbol, F extends any>(optionKey: K): F extends (...args: any[]) => any ? never : F;
|
|
14
|
+
};
|
|
15
|
+
editor: PlateEditor;
|
|
16
|
+
plugin: import("@udecode/plate-common/react").EditorPlatePlugin<import("@udecode/plate-common/react").AnyPlatePlugin>;
|
|
17
|
+
} & {
|
|
18
|
+
className?: string;
|
|
19
|
+
nodeProps?: import("@udecode/plate-common").AnyObject;
|
|
20
|
+
} & import("@udecode/slate-react").TRenderElementProps<import("@udecode/plate-common").TElement> & {
|
|
21
|
+
path: import("slate").Path;
|
|
22
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<never>>;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { withRef } from "@udecode/cn";
|
|
3
|
+
import { PlateElement } from "@udecode/plate-common/react";
|
|
4
|
+
import { DatePlugin } from "@udecode/plate-date/react";
|
|
5
|
+
import { HEADING_KEYS } from "@udecode/plate-heading";
|
|
6
|
+
import { ListStyleType, toggleIndentList } from "@udecode/plate-indent-list";
|
|
7
|
+
import { Icons } from "../icons";
|
|
8
|
+
import { InlineCombobox, InlineComboboxContent, InlineComboboxEmpty, InlineComboboxInput, InlineComboboxItem, } from "./inline-combobox";
|
|
9
|
+
const rules = [
|
|
10
|
+
{
|
|
11
|
+
icon: Icons.h1,
|
|
12
|
+
onSelect: (editor) => {
|
|
13
|
+
editor.tf.toggle.block({ type: HEADING_KEYS.h1 });
|
|
14
|
+
},
|
|
15
|
+
value: "Heading 1",
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
icon: Icons.h2,
|
|
19
|
+
onSelect: (editor) => {
|
|
20
|
+
editor.tf.toggle.block({ type: HEADING_KEYS.h2 });
|
|
21
|
+
},
|
|
22
|
+
value: "Heading 2",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
icon: Icons.h3,
|
|
26
|
+
onSelect: (editor) => {
|
|
27
|
+
editor.tf.toggle.block({ type: HEADING_KEYS.h3 });
|
|
28
|
+
},
|
|
29
|
+
value: "Heading 3",
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
icon: Icons.ul,
|
|
33
|
+
keywords: ["ul", "unordered list"],
|
|
34
|
+
onSelect: (editor) => {
|
|
35
|
+
toggleIndentList(editor, {
|
|
36
|
+
listStyleType: ListStyleType.Disc,
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
value: "Bulleted list",
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
icon: Icons.ol,
|
|
43
|
+
keywords: ["ol", "ordered list"],
|
|
44
|
+
onSelect: (editor) => {
|
|
45
|
+
toggleIndentList(editor, {
|
|
46
|
+
listStyleType: ListStyleType.Decimal,
|
|
47
|
+
});
|
|
48
|
+
},
|
|
49
|
+
value: "Numbered list",
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
icon: Icons.add,
|
|
53
|
+
keywords: ["inline", "date"],
|
|
54
|
+
onSelect: (editor) => {
|
|
55
|
+
editor.getTransforms(DatePlugin).insert.date();
|
|
56
|
+
},
|
|
57
|
+
value: "Date",
|
|
58
|
+
},
|
|
59
|
+
];
|
|
60
|
+
export const SlashInputElement = withRef(({ className, ...props }, ref) => {
|
|
61
|
+
const { children, editor, element } = props;
|
|
62
|
+
return (_jsxs(PlateElement, { as: "span", "data-slate-value": element.value, ref: ref, ...props, children: [_jsxs(InlineCombobox, { element: element, trigger: "/", children: [_jsx(InlineComboboxInput, {}), _jsxs(InlineComboboxContent, { children: [_jsx(InlineComboboxEmpty, { children: "No matching commands found" }), rules.map(({ icon: Icon, keywords, onSelect, value }) => (_jsxs(InlineComboboxItem, { keywords: keywords, onClick: () => onSelect(editor), value: value, children: [_jsx(Icon, { "aria-hidden": true, className: "mr-2 size-4" }), value] }, value)))] })] }), children] }));
|
|
63
|
+
});
|
|
64
|
+
//# sourceMappingURL=slash-input-element.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slash-input-element.js","sourceRoot":"","sources":["../../../../../src/components/plate/components/slash-input-element.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,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,CAAC,EAC/B,KAAK,EAAE,KAAK,aAEZ,KAAC,IAAI,yBAAa,SAAS,EAAC,aAAa,GAAG,EAC3C,KAAK,KAND,KAAK,CAOS,CACtB,CAAC,IACoB,IACT,EAEhB,QAAQ,IACI,CAChB,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare const TableCellElement: React.ForwardRefExoticComponent<Omit<{
|
|
3
|
+
elementToAttributes?: (element: import("@udecode/plate-common").TElement) => any;
|
|
4
|
+
} & Omit<{
|
|
5
|
+
as?: React.ElementType;
|
|
6
|
+
asChild?: boolean;
|
|
7
|
+
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<any>, "ref"> & {
|
|
8
|
+
ref?: React.Ref<any>;
|
|
9
|
+
} & import("@udecode/plate-common").BasePluginContext<import("@udecode/plate-common/react").AnyPlatePlugin> & {
|
|
10
|
+
useOption: {
|
|
11
|
+
<K extends string | number | symbol, F extends any, Args extends Parameters<F & ((...args: any[]) => any)>>(optionKey: K, ...args: Args): F extends (...args: any[]) => any ? ReturnType<F> : F;
|
|
12
|
+
<K extends string | number | symbol, F extends any>(optionKey: K): F extends (...args: any[]) => any ? never : F;
|
|
13
|
+
};
|
|
14
|
+
editor: import("@udecode/plate-common/react").PlateEditor;
|
|
15
|
+
plugin: import("@udecode/plate-common/react").EditorPlatePlugin<import("@udecode/plate-common/react").AnyPlatePlugin>;
|
|
16
|
+
} & {
|
|
17
|
+
className?: string;
|
|
18
|
+
nodeProps?: import("@udecode/plate-common").AnyObject;
|
|
19
|
+
} & import("@udecode/slate-react").TRenderElementProps<import("@udecode/plate-common").TElement> & {
|
|
20
|
+
path: import("slate").Path;
|
|
21
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
22
|
+
hideBorder?: boolean;
|
|
23
|
+
isHeader?: boolean;
|
|
24
|
+
} & React.RefAttributes<never>>;
|
|
25
|
+
export declare const TableCellHeaderElement: React.ForwardRefExoticComponent<Omit<Omit<{
|
|
26
|
+
elementToAttributes?: (element: import("@udecode/plate-common").TElement) => any;
|
|
27
|
+
} & Omit<{
|
|
28
|
+
as?: React.ElementType;
|
|
29
|
+
asChild?: boolean;
|
|
30
|
+
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<any>, "ref"> & {
|
|
31
|
+
ref?: React.Ref<any>;
|
|
32
|
+
} & import("@udecode/plate-common").BasePluginContext<import("@udecode/plate-common/react").AnyPlatePlugin> & {
|
|
33
|
+
useOption: {
|
|
34
|
+
<K extends string | number | symbol, F extends any, Args extends Parameters<F & ((...args: any[]) => any)>>(optionKey: K, ...args: Args): F extends (...args: any[]) => any ? ReturnType<F> : F;
|
|
35
|
+
<K extends string | number | symbol, F extends any>(optionKey: K): F extends (...args: any[]) => any ? never : F;
|
|
36
|
+
};
|
|
37
|
+
editor: import("@udecode/plate-common/react").PlateEditor;
|
|
38
|
+
plugin: import("@udecode/plate-common/react").EditorPlatePlugin<import("@udecode/plate-common/react").AnyPlatePlugin>;
|
|
39
|
+
} & {
|
|
40
|
+
className?: string;
|
|
41
|
+
nodeProps?: import("@udecode/plate-common").AnyObject;
|
|
42
|
+
} & import("@udecode/slate-react").TRenderElementProps<import("@udecode/plate-common").TElement> & {
|
|
43
|
+
path: import("slate").Path;
|
|
44
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
45
|
+
hideBorder?: boolean;
|
|
46
|
+
isHeader?: boolean;
|
|
47
|
+
} & React.RefAttributes<never>, "ref"> & React.RefAttributes<never>>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn, withProps, withRef } from "@udecode/cn";
|
|
3
|
+
import { PlateElement } from "@udecode/plate-common/react";
|
|
4
|
+
import { useTableCellElement, useTableCellElementResizable,
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
useTableCellElementResizableState,
|
|
7
|
+
// @ts-ignore
|
|
8
|
+
useTableCellElementState, } from "@udecode/plate-table/react";
|
|
9
|
+
import { ResizeHandle } from "./resizable";
|
|
10
|
+
export const TableCellElement = withRef(({ children, className, hideBorder, isHeader, style, ...props }, ref) => {
|
|
11
|
+
const { element } = props;
|
|
12
|
+
const { borders, colIndex, colSpan, hovered, hoveredLeft, isSelectingCell, readOnly, rowIndex, rowSize, selected, } = useTableCellElementState();
|
|
13
|
+
const { props: cellProps } = useTableCellElement({ element: props.element });
|
|
14
|
+
const resizableState = useTableCellElementResizableState({
|
|
15
|
+
colIndex,
|
|
16
|
+
colSpan,
|
|
17
|
+
rowIndex,
|
|
18
|
+
});
|
|
19
|
+
const { bottomProps, hiddenLeft, leftProps, rightProps } = useTableCellElementResizable(resizableState);
|
|
20
|
+
const Cell = isHeader ? "th" : "td";
|
|
21
|
+
return (_jsx(PlateElement, { asChild: true, className: cn("relative h-full overflow-visible border-none bg-background p-0", hideBorder && "before:border-none", element.background ? "bg-[--cellBackground]" : "bg-background", !hideBorder &&
|
|
22
|
+
cn(isHeader && "text-left [&_>_*]:m-0", "before:size-full", selected && "before:z-10 before:bg-muted", "before:absolute before:box-border before:select-none before:content-['']", borders &&
|
|
23
|
+
cn(borders.bottom?.size &&
|
|
24
|
+
"before:border-b before:border-b-border", borders.right?.size && "before:border-r before:border-r-border", borders.left?.size && "before:border-l before:border-l-border", borders.top?.size && "before:border-t before:border-t-border")), className), ref: ref, ...cellProps, ...props, style: {
|
|
25
|
+
"--cellBackground": element.background,
|
|
26
|
+
...style,
|
|
27
|
+
}, children: _jsxs(Cell, { children: [_jsx("div", { className: "box-border relative z-20 h-full px-3 py-2", style: {
|
|
28
|
+
minHeight: rowSize,
|
|
29
|
+
}, children: children }), !isSelectingCell && (_jsx("div", { className: "absolute top-0 select-none group size-full", contentEditable: false, suppressContentEditableWarning: true, children: !readOnly && (_jsxs(_Fragment, { children: [_jsx(ResizeHandle, { ...rightProps, className: "-top-3 right-[-5px] w-[10px]" }), _jsx(ResizeHandle, { ...bottomProps, className: "bottom-[-5px] h-[10px]" }), !hiddenLeft && (_jsx(ResizeHandle, { ...leftProps, className: "-top-3 left-[-5px] w-[10px]" })), hovered && (_jsx("div", { className: cn("absolute -top-3 z-30 h-[calc(100%_+_12px)] w-1 bg-ring", "right-[-1.5px]") })), hoveredLeft && (_jsx("div", { className: cn("absolute -top-3 z-30 h-[calc(100%_+_12px)] w-1 bg-ring", "left-[-1.5px]") }))] })) }))] }) }));
|
|
30
|
+
});
|
|
31
|
+
TableCellElement.displayName = "TableCellElement";
|
|
32
|
+
export const TableCellHeaderElement = withProps(TableCellElement, {
|
|
33
|
+
isHeader: true,
|
|
34
|
+
});
|
|
35
|
+
//# sourceMappingURL=table-cell-element.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-cell-element.js","sourceRoot":"","sources":["../../../../../src/components/plate/components/table-cell-element.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EACL,mBAAmB,EACnB,4BAA4B;AAC5B,aAAa;AACb,iCAAiC;AACjC,aAAa;AACb,wBAAwB,GACzB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,CAAC,MAAM,gBAAgB,GAAG,OAAO,CAMrC,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACxE,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAE1B,MAAM,EACJ,OAAO,EACP,QAAQ,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AAC,2CAA2C,EACrD,KAAK,EAAE;wBACL,SAAS,EAAE,OAAO;qBACnB,YAEA,QAAQ,GACL,EAEL,CAAC,eAAe,IAAI,CACnB,cACE,SAAS,EAAC,4CAA4C,EACtD,eAAe,EAAE,KAAK,EACtB,8BAA8B,EAAE,IAAI,YAEnC,CAAC,QAAQ,IAAI,CACZ,8BACE,KAAC,YAAY,OACP,UAAU,EACd,SAAS,EAAC,8BAA8B,GACxC,EACF,KAAC,YAAY,OACP,WAAW,EACf,SAAS,EAAC,wBAAwB,GAClC,EACD,CAAC,UAAU,IAAI,CACd,KAAC,YAAY,OACP,SAAS,EACb,SAAS,EAAC,6BAA6B,GACvC,CACH,EAEA,OAAO,IAAI,CACV,cACE,SAAS,EAAE,EAAE,CACX,wDAAwD,EACxD,gBAAgB,CACjB,GACD,CACH,EACA,WAAW,IAAI,CACd,cACE,SAAS,EAAE,EAAE,CACX,wDAAwD,EACxD,eAAe,CAChB,GACD,CACH,IACA,CACJ,GACG,CACP,IACI,GACM,CAChB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC;AAElD,MAAM,CAAC,MAAM,sBAAsB,GAAG,SAAS,CAAC,gBAAgB,EAAE;IAChE,QAAQ,EAAE,IAAI;CACf,CAAC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
3
|
+
export declare const TableBordersDropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export declare const TableFloatingToolbar: React.ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-popover").PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export declare const TableElement: React.ForwardRefExoticComponent<Omit<Omit<{
|
|
6
|
+
elementToAttributes?: (element: import("@udecode/plate-common").TElement) => any;
|
|
7
|
+
} & Omit<{
|
|
8
|
+
as?: React.ElementType;
|
|
9
|
+
asChild?: boolean;
|
|
10
|
+
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<any>, "ref"> & {
|
|
11
|
+
ref?: React.Ref<any>;
|
|
12
|
+
} & import("@udecode/plate-common").BasePluginContext<import("@udecode/plate-common/react").AnyPlatePlugin> & {
|
|
13
|
+
useOption: {
|
|
14
|
+
<K extends string | number | symbol, F extends any, Args extends Parameters<F & ((...args: any[]) => any)>>(optionKey: K, ...args: Args): F extends (...args: any[]) => any ? ReturnType<F> : F;
|
|
15
|
+
<K extends string | number | symbol, F extends any>(optionKey: K): F extends (...args: any[]) => any ? never : F;
|
|
16
|
+
};
|
|
17
|
+
editor: import("@udecode/plate-common/react").PlateEditor;
|
|
18
|
+
plugin: import("@udecode/plate-common/react").EditorPlatePlugin<import("@udecode/plate-common/react").AnyPlatePlugin>;
|
|
19
|
+
} & {
|
|
20
|
+
className?: string;
|
|
21
|
+
nodeProps?: import("@udecode/plate-common").AnyObject;
|
|
22
|
+
} & import("@udecode/slate-react").TRenderElementProps<import("@udecode/plate-common").TElement> & {
|
|
23
|
+
path: import("slate").Path;
|
|
24
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<never>, "ref"> & React.RefAttributes<unknown>>;
|