@lax-wp/design-system 0.13.33 → 0.13.34
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/button/Button.cjs.js +5 -5
- package/dist/components/button/Button.cjs.js.map +1 -1
- package/dist/components/button/Button.es.js +18 -18
- package/dist/components/button/Button.es.js.map +1 -1
- package/dist/components/button/IconButton.cjs.js +1 -1
- package/dist/components/button/IconButton.cjs.js.map +1 -1
- package/dist/components/button/IconButton.es.js +8 -8
- package/dist/components/button/IconButton.es.js.map +1 -1
- package/dist/components/buttons/option-button/OptionButton.cjs.js +1 -1
- package/dist/components/buttons/option-button/OptionButton.cjs.js.map +1 -1
- package/dist/components/buttons/option-button/OptionButton.es.js +1 -1
- package/dist/components/buttons/option-button/OptionButton.es.js.map +1 -1
- package/dist/components/data-display/comparison/components/Header.cjs.js +1 -1
- package/dist/components/data-display/comparison/components/Header.cjs.js.map +1 -1
- package/dist/components/data-display/comparison/components/Header.es.js +13 -13
- package/dist/components/data-display/comparison/components/Header.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/body/cell/DataCell.cjs.js +1 -1
- package/dist/components/data-display/infinite-table/body/cell/DataCell.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/body/cell/DataCell.es.js +1 -1
- package/dist/components/data-display/infinite-table/body/cell/DataCell.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/body/rows/index.cjs.js +1 -1
- package/dist/components/data-display/infinite-table/body/rows/index.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/body/rows/index.es.js +104 -101
- package/dist/components/data-display/infinite-table/body/rows/index.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/constants.cjs.js +1 -1
- package/dist/components/data-display/infinite-table/constants.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/constants.d.ts +6 -0
- package/dist/components/data-display/infinite-table/constants.es.js +17 -16
- package/dist/components/data-display/infinite-table/constants.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/index.cjs.js +1 -1
- package/dist/components/data-display/infinite-table/index.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/index.es.js +188 -187
- package/dist/components/data-display/infinite-table/index.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/useRowHeight.cjs.js +2 -0
- package/dist/components/data-display/infinite-table/useRowHeight.cjs.js.map +1 -0
- package/dist/components/data-display/infinite-table/useRowHeight.d.ts +15 -0
- package/dist/components/data-display/infinite-table/useRowHeight.es.js +24 -0
- package/dist/components/data-display/infinite-table/useRowHeight.es.js.map +1 -0
- package/dist/components/data-display/tag/Tag.cjs.js +1 -1
- package/dist/components/data-display/tag/Tag.cjs.js.map +1 -1
- package/dist/components/data-display/tag/Tag.es.js +11 -9
- package/dist/components/data-display/tag/Tag.es.js.map +1 -1
- package/dist/components/floating-bar/FloatingBar.cjs.js +1 -1
- package/dist/components/floating-bar/FloatingBar.cjs.js.map +1 -1
- package/dist/components/floating-bar/FloatingBar.es.js +9 -9
- package/dist/components/floating-bar/FloatingBar.es.js.map +1 -1
- package/dist/components/forms/base-input-field/BaseInputField.cjs.js +2 -2
- package/dist/components/forms/base-input-field/BaseInputField.cjs.js.map +1 -1
- package/dist/components/forms/base-input-field/BaseInputField.es.js +40 -42
- package/dist/components/forms/base-input-field/BaseInputField.es.js.map +1 -1
- package/dist/components/forms/creatable-select/CreatableSelect.cjs.js +1 -1
- package/dist/components/forms/creatable-select/CreatableSelect.cjs.js.map +1 -1
- package/dist/components/forms/creatable-select/CreatableSelect.es.js +14 -15
- package/dist/components/forms/creatable-select/CreatableSelect.es.js.map +1 -1
- package/dist/components/forms/currency-input/CurrencyInputField.cjs.js +1 -1
- package/dist/components/forms/currency-input/CurrencyInputField.cjs.js.map +1 -1
- package/dist/components/forms/currency-input/CurrencyInputField.es.js +57 -65
- package/dist/components/forms/currency-input/CurrencyInputField.es.js.map +1 -1
- package/dist/components/forms/date-time-field/DateTimeField.cjs.js +1 -1
- package/dist/components/forms/date-time-field/DateTimeField.cjs.js.map +1 -1
- package/dist/components/forms/date-time-field/DateTimeField.es.js +33 -33
- package/dist/components/forms/date-time-field/DateTimeField.es.js.map +1 -1
- package/dist/components/forms/debounce-input/DebounceInputField.cjs.js +1 -1
- package/dist/components/forms/debounce-input/DebounceInputField.cjs.js.map +1 -1
- package/dist/components/forms/debounce-input/DebounceInputField.es.js +2 -2
- package/dist/components/forms/debounce-input/DebounceInputField.es.js.map +1 -1
- package/dist/components/forms/dynamic-data-input/DynamicDataInput.cjs.js +1 -1
- package/dist/components/forms/dynamic-data-input/DynamicDataInput.cjs.js.map +1 -1
- package/dist/components/forms/dynamic-data-input/DynamicDataInput.es.js +7 -7
- package/dist/components/forms/dynamic-data-input/DynamicDataInput.es.js.map +1 -1
- package/dist/components/forms/dynamic-data-input/DynamicDataInputField.cjs.js +1 -1
- package/dist/components/forms/dynamic-data-input/DynamicDataInputField.cjs.js.map +1 -1
- package/dist/components/forms/dynamic-data-input/DynamicDataInputField.es.js +17 -19
- package/dist/components/forms/dynamic-data-input/DynamicDataInputField.es.js.map +1 -1
- package/dist/components/forms/field-options/Item.cjs.js +1 -1
- package/dist/components/forms/field-options/Item.cjs.js.map +1 -1
- package/dist/components/forms/field-options/Item.es.js +5 -5
- package/dist/components/forms/field-options/Item.es.js.map +1 -1
- package/dist/components/forms/formula-input/FormulaInput.cjs.js +1 -1
- package/dist/components/forms/formula-input/FormulaInput.cjs.js.map +1 -1
- package/dist/components/forms/formula-input/FormulaInput.es.js +10 -10
- package/dist/components/forms/formula-input/FormulaInput.es.js.map +1 -1
- package/dist/components/forms/icon-picker/IconPicker.cjs.js +1 -1
- package/dist/components/forms/icon-picker/IconPicker.cjs.js.map +1 -1
- package/dist/components/forms/icon-picker/IconPicker.es.js +42 -57
- package/dist/components/forms/icon-picker/IconPicker.es.js.map +1 -1
- package/dist/components/forms/input-field/InputField.cjs.js.map +1 -1
- package/dist/components/forms/input-field/InputField.es.js.map +1 -1
- package/dist/components/forms/master-data-input/MasterDataInputField.cjs.js +1 -1
- package/dist/components/forms/master-data-input/MasterDataInputField.cjs.js.map +1 -1
- package/dist/components/forms/master-data-input/MasterDataInputField.es.js +54 -60
- package/dist/components/forms/master-data-input/MasterDataInputField.es.js.map +1 -1
- package/dist/components/forms/md-input/RichMarkdownInput.cjs.js +3 -3
- package/dist/components/forms/md-input/RichMarkdownInput.cjs.js.map +1 -1
- package/dist/components/forms/md-input/RichMarkdownInput.es.js +63 -63
- package/dist/components/forms/md-input/RichMarkdownInput.es.js.map +1 -1
- package/dist/components/forms/number-input-field/NumberInputField.cjs.js +1 -1
- package/dist/components/forms/number-input-field/NumberInputField.cjs.js.map +1 -1
- package/dist/components/forms/number-input-field/NumberInputField.es.js +5 -5
- package/dist/components/forms/number-input-field/NumberInputField.es.js.map +1 -1
- package/dist/components/forms/percentage-input/PercentageInputField.cjs.js +2 -2
- package/dist/components/forms/percentage-input/PercentageInputField.cjs.js.map +1 -1
- package/dist/components/forms/percentage-input/PercentageInputField.es.js +20 -20
- package/dist/components/forms/percentage-input/PercentageInputField.es.js.map +1 -1
- package/dist/components/forms/search-bar/SearchBar.cjs.js +1 -1
- package/dist/components/forms/search-bar/SearchBar.cjs.js.map +1 -1
- package/dist/components/forms/search-bar/SearchBar.es.js +16 -16
- package/dist/components/forms/search-bar/SearchBar.es.js.map +1 -1
- package/dist/components/forms/select-field/SelectField.cjs.js +2 -2
- package/dist/components/forms/select-field/SelectField.cjs.js.map +1 -1
- package/dist/components/forms/select-field/SelectField.d.ts +4 -0
- package/dist/components/forms/select-field/SelectField.es.js +202 -203
- package/dist/components/forms/select-field/SelectField.es.js.map +1 -1
- package/dist/components/forms/text-area-field/TextAreaField.cjs.js +1 -1
- package/dist/components/forms/text-area-field/TextAreaField.cjs.js.map +1 -1
- package/dist/components/forms/text-area-field/TextAreaField.es.js +14 -14
- package/dist/components/forms/text-area-field/TextAreaField.es.js.map +1 -1
- package/dist/components/forms/toggle/Toggle.cjs.js +1 -1
- package/dist/components/forms/toggle/Toggle.cjs.js.map +1 -1
- package/dist/components/forms/toggle/Toggle.es.js +65 -59
- package/dist/components/forms/toggle/Toggle.es.js.map +1 -1
- package/dist/components/navigation/accordion/Accordion.cjs.js +1 -1
- package/dist/components/navigation/accordion/Accordion.cjs.js.map +1 -1
- package/dist/components/navigation/accordion/Accordion.es.js +5 -5
- package/dist/components/navigation/accordion/Accordion.es.js.map +1 -1
- package/dist/components/navigation/stepper/Stepper.cjs.js +1 -1
- package/dist/components/navigation/stepper/Stepper.cjs.js.map +1 -1
- package/dist/components/navigation/stepper/Stepper.es.js +1 -1
- package/dist/components/navigation/stepper/Stepper.es.js.map +1 -1
- package/dist/components/navigation/tabs/TabOptions.cjs.js +1 -1
- package/dist/components/navigation/tabs/TabOptions.cjs.js.map +1 -1
- package/dist/components/navigation/tabs/TabOptions.es.js +15 -15
- package/dist/components/navigation/tabs/TabOptions.es.js.map +1 -1
- package/dist/components/navigation/tabs/TabSwitch.cjs.js +1 -1
- package/dist/components/navigation/tabs/TabSwitch.cjs.js.map +1 -1
- package/dist/components/navigation/tabs/TabSwitch.es.js +7 -7
- package/dist/components/navigation/tabs/TabSwitch.es.js.map +1 -1
- package/dist/components/navigation/tabs/Tabs.cjs.js +1 -1
- package/dist/components/navigation/tabs/Tabs.cjs.js.map +1 -1
- package/dist/components/navigation/tabs/Tabs.es.js +1 -1
- package/dist/components/navigation/tabs/Tabs.es.js.map +1 -1
- package/dist/components/tooltip/Tooltip.cjs.js +1 -1
- package/dist/components/tooltip/Tooltip.cjs.js.map +1 -1
- package/dist/components/tooltip/Tooltip.es.js +19 -19
- package/dist/components/tooltip/Tooltip.es.js.map +1 -1
- package/dist/components/user-avatar/UserAvatar.cjs.js +1 -1
- package/dist/components/user-avatar/UserAvatar.cjs.js.map +1 -1
- package/dist/components/user-avatar/UserAvatar.d.ts +1 -1
- package/dist/components/user-avatar/UserAvatar.es.js +40 -38
- package/dist/components/user-avatar/UserAvatar.es.js.map +1 -1
- package/dist/components/user-avatar/constants.cjs.js +1 -1
- package/dist/components/user-avatar/constants.cjs.js.map +1 -1
- package/dist/components/user-avatar/constants.d.ts +1 -0
- package/dist/components/user-avatar/constants.es.js +10 -9
- package/dist/components/user-avatar/constants.es.js.map +1 -1
- package/dist/design-system.css +1 -1
- package/package.json +2 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),y=require("../../../_virtual/index.cjs.js"),F=require("react"),m=require("@mui/icons-material"),
|
|
2
|
-
`);let
|
|
3
|
-
`)),setTimeout(()=>{r.focus()},0)},ie=t=>{if(ne?.(t),t.metaKey||t.ctrlKey)switch(t.key.toLowerCase()){case"b":t.preventDefault(),x("**","**","bold text");break;case"i":t.preventDefault(),x("*","*","italic text");break;case"u":t.preventDefault(),x("<u>","</u>","underlined text");break;case"k":t.preventDefault(),x("[","](url)","link text");break;case"e":t.preventDefault(),x("```","```","code");break}},ce=()=>{w(""),(u?.current||k.current)?.focus()},xe=(()=>{const t=(n.match(/\n/g)||[]).length+1;return Math.min(Q,Math.max(J,t))})(),O=e.jsxs("div",{className:y("flex flex-col",X),children:[e.jsxs("div",{className:`flex flex-row items-center ${C?"justify-between":"justify-end"} w-full`,children:[C&&e.jsx("label",{id:a,htmlFor:a,className:`mb-1 text-xs font-medium text-gray-600 inline-flex items-center gap-1 ${I?"":"capitalize"} ${Z||"!uppercse"}`,children:e.jsx("div",{className:"flex flex-wrap items-center justify-between w-full",children:e.jsx("div",{className:"inline-flex flex-wrap items-center gap-1",children:e.jsx(me.InputLabel,{label:C||"",required:R||!1,isRequiredConditional:ee||!1})})})}),se&&e.jsx(H,{placement:"bottom-end",title:e.jsxs("div",{className:"flex flex-col items-start justify-center py-2 px-3 min-w-[220px] gap-2 bg-neutral-900 rounded-lg",children:[e.jsxs("div",{className:"flex flex-col items-start justify-start gap-1 w-full",children:[e.jsxs("div",{className:"flex flex-row items-start gap-1 ml-1",children:[e.jsx("span",{className:"text-white text-[18px] leading-[18px]",children:"•"}),e.jsx("div",{className:"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm",children:e.jsx("span",{className:"text-neutral-300 text-xs font-medium leading-[18px] font-inter",children:"**bold**"})}),e.jsxs("span",{className:"text-white text-xs font-medium leading-[18px] font-inter",children:["→ ",e.jsx("strong",{children:"bold"})," text"]})]}),e.jsxs("div",{className:"flex flex-row items-start gap-1 ml-1",children:[e.jsx("span",{className:"text-white text-[18px] leading-[18px]",children:"•"}),e.jsx("div",{className:"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm",children:e.jsx("span",{className:"text-neutral-300 text-xs font-medium leading-[18px] font-inter",children:"*italic*"})}),e.jsxs("span",{className:"text-white text-xs font-medium leading-[18px] font-inter",children:["→ ",e.jsx("em",{children:"italic"})," text"]})]}),e.jsxs("div",{className:"flex flex-row items-start gap-1 ml-1",children:[e.jsx("span",{className:"text-white text-[18px] leading-[18px]",children:"•"}),e.jsx("div",{className:"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm",children:e.jsx("span",{className:"text-neutral-300 text-xs font-medium leading-[18px] font-inter",children:"`code`"})}),e.jsxs("span",{className:"text-white text-xs font-medium leading-[18px] font-inter",children:["→ ",e.jsx("code",{children:"inline code"})]})]}),e.jsxs("div",{className:"flex flex-row items-start gap-1 ml-1",children:[e.jsx("span",{className:"text-white text-[18px] leading-[18px]",children:"•"}),e.jsx("div",{className:"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm",children:e.jsx("span",{className:"text-neutral-300 text-xs font-medium leading-[18px] font-inter",children:"<u>text</u>"})}),e.jsxs("span",{className:"text-white text-xs font-medium leading-[18px] font-inter",children:["→ ",e.jsx("u",{children:"underline"})]})]}),e.jsxs("div",{className:"flex flex-row items-start gap-1 ml-1",children:[e.jsx("span",{className:"text-white text-[18px] leading-[18px]",children:"•"}),e.jsx("div",{className:"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm",children:e.jsx("span",{className:"text-neutral-300 text-xs font-medium leading-[18px] font-inter",children:"~~strike~~"})}),e.jsxs("span",{className:"text-white text-xs font-medium leading-[18px] font-inter",children:["→ ",e.jsx("del",{children:"strike"})]})]}),e.jsxs("div",{className:"flex flex-row items-start gap-1 ml-1",children:[e.jsx("span",{className:"text-white text-[18px] leading-[18px]",children:"•"}),e.jsx("div",{className:"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm",children:e.jsx("span",{className:"text-neutral-300 text-xs font-medium leading-[18px] font-inter",children:"- item"})}),e.jsx("span",{className:"text-white text-xs font-medium leading-[18px] font-inter",children:"→ bullet list"})]}),e.jsxs("div",{className:"flex flex-row items-start gap-1 ml-1",children:[e.jsx("span",{className:"text-white text-[18px] leading-[18px]",children:"•"}),e.jsx("div",{className:"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm",children:e.jsx("span",{className:"text-neutral-300 text-xs font-medium leading-[18px] font-inter",children:"1. item"})}),e.jsx("span",{className:"text-white text-xs font-medium leading-[18px] font-inter",children:"→ numbered list"})]}),N&&e.jsxs("div",{className:"flex flex-row items-start gap-1 ml-1",children:[e.jsx("span",{className:"text-white text-[18px] leading-[18px]",children:"•"}),e.jsx("div",{className:"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm",children:e.jsx("span",{className:"text-neutral-300 text-xs font-medium leading-[18px] font-inter",children:"## heading"})}),e.jsx("span",{className:"text-white text-xs font-medium leading-[18px] font-inter",children:"→ heading 2"})]}),e.jsxs("div",{className:"flex flex-row items-start gap-1 ml-1",children:[e.jsx("span",{className:"text-white text-[18px] leading-[18px]",children:"•"}),e.jsx("div",{className:"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm",children:e.jsx("span",{className:"text-neutral-300 text-xs font-medium leading-[18px] font-inter",children:"[link](url)"})}),e.jsx("span",{className:"text-white text-xs font-medium leading-[18px] font-inter",children:"→ hyperlink"})]})]}),N&&e.jsx(e.Fragment,{children:e.jsxs("div",{className:"flex flex-col items-start justify-start gap-1 w-full",children:[e.jsxs("div",{className:"flex flex-row items-start gap-1 ml-1",children:[e.jsx("span",{className:"text-white text-[18px] leading-[18px]",children:"•"}),e.jsx("div",{className:"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm",children:e.jsx("span",{className:"text-neutral-300 text-xs font-medium leading-[18px] font-inter",children:"> quote"})}),e.jsx("span",{className:"text-white text-xs font-medium leading-[18px] font-inter",children:"→ blockquote"})]}),e.jsxs("div",{className:"flex flex-col items-start justify-start gap-0.5 w-full mt-0.5",children:[e.jsxs("div",{className:"flex flex-row items-center gap-1 ml-1",children:[e.jsx("span",{className:"text-white text-[18px] leading-[18px]",children:"•"}),e.jsx("span",{className:"text-white text-xs font-medium leading-[18px] font-inter",children:"Table:"})]}),e.jsxs("div",{className:"flex flex-col px-1 py-0.5 bg-neutral-700 ml-2 rounded-sm gap-0",children:[e.jsx("span",{className:"text-neutral-300 text-xs font-medium leading-[18px] font-inter whitespace-nowrap",children:"| Header 1 | Header 2 | Header 3 |"}),e.jsx("span",{className:"text-neutral-300 text-xs font-medium leading-[18px] font-inter whitespace-nowrap",children:"| :--- | :---: | ---: |"}),e.jsx("span",{className:"text-neutral-300 text-xs font-medium leading-[18px] font-inter whitespace-nowrap",children:"| Left | Center | Right |"})]})]})]})})]}),children:e.jsx(V.Typography,{className:"mb-2 text-xs font-medium text-primary-700 inline-flex items-center gap-1 cursor-pointer",children:"Formatting help ?"})})]}),e.jsxs("div",{className:y("flex flex-col border shadow-[0px_1px_2px_rgba(0,0,0,0.05)] rounded-lg bg-white dark:bg-black-700 w-full",S?"border-red-300 focus-within:border-red-500 focus-within:shadow-[0_0_0_1.5px_var(--color-red-200)]":"border-[#EAECF0] dark:border-black-600 focus-within:border-primary-600 dark:focus-within:border-primary-400 focus-within:shadow-[0_0_0_1.5px_var(--color-primary-100)] dark:focus-within:shadow-[0_0_0_1.5px_var(--color-primary-950)]"),children:[e.jsxs("div",{className:y("flex flex-row justify-between items-center px-3 py-2 gap-2 h-11 rounded-t-lg bg-[#F9FAFB] dark:bg-black-600 border-b border-[#EAECF0] dark:border-black-600"),children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(h,{id:`${a}-bold`,type:"button",onClick:()=>x("**","**","bold text"),disabled:i||c==="preview",className:"!p-0.5 !min-w-0 !h-auto !rounded-md hover:!bg-neutral-200 dark:hover:!bg-black-500 hover:!scale-110 !transition-all !duration-200",appearance:"ghost",status:"no-background",title:"Bold (Ctrl+B)",children:e.jsx(m.FormatBold,{sx:{fontSize:20,color:"#667085"},className:"dark:text-neutral-400"})}),e.jsx(h,{id:`${a}-italic`,type:"button",onClick:()=>x("*","*","italic text"),disabled:i||c==="preview",className:"!p-0.5 !min-w-0 !h-auto !rounded-md hover:!bg-neutral-200 dark:hover:!bg-black-500 hover:!scale-110 !transition-all !duration-200",appearance:"ghost",status:"no-background",title:"Italic (Ctrl+I)",children:e.jsx(m.FormatItalic,{sx:{fontSize:20,color:"#667085"},className:"dark:text-neutral-400"})}),e.jsx(h,{id:`${a}-underline`,type:"button",onClick:()=>x("<u>","</u>","underlined text"),disabled:i||c==="preview",className:"!p-0.5 !min-w-0 !h-auto !rounded-md hover:!bg-neutral-200 dark:hover:!bg-black-500 hover:!scale-110 !transition-all !duration-200",appearance:"ghost",status:"no-background",title:"Underline (Ctrl+U)",children:e.jsx(m.FormatUnderlined,{sx:{fontSize:20,color:"#667085"},className:"dark:text-neutral-400"})}),e.jsx("div",{className:"w-px h-5 bg-[#EAECF0] dark:bg-black-500 rounded-full"}),e.jsx(h,{id:`${a}-numbered-list`,type:"button",onClick:()=>B("1. "),disabled:i||c==="preview",className:"!p-0.5 !min-w-0 !h-auto !rounded-md hover:!bg-neutral-200 dark:hover:!bg-black-500 hover:!scale-110 !transition-all !duration-200",appearance:"ghost",status:"no-background",title:"Numbered List",children:e.jsx(m.FormatListNumbered,{sx:{fontSize:20,color:"#667085"},className:"dark:text-neutral-400"})}),e.jsx(h,{id:`${a}-bullet-list`,type:"button",onClick:()=>B("- "),disabled:i||c==="preview",className:"!p-0.5 !min-w-0 !h-auto !rounded-md hover:!bg-neutral-200 dark:hover:!bg-black-500 hover:!scale-110 !transition-all !duration-200",appearance:"ghost",status:"no-background",title:"Bullet List",children:e.jsx(m.FormatListBulleted,{sx:{fontSize:20,color:"#667085"},className:"dark:text-neutral-400"})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[f&&e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"text-sm font-medium text-[#475467] dark:text-neutral-400",children:[le,"/",f]}),e.jsx("div",{className:"w-px h-6 bg-[#EAECF0] dark:bg-black-500 rounded-full"})]}),te?e.jsx(h,{id:`${a}-expand`,type:"button",onClick:()=>P(!0),disabled:i,className:"!p-0.5 !min-w-0 !h-auto ml-1 !rounded-md hover:!bg-neutral-200 dark:hover:!bg-black-500 hover:!scale-110 !transition-all !duration-200",appearance:"ghost",status:"no-background",title:"Expand Preview",children:e.jsx(m.OpenInFull,{sx:{fontSize:16,color:"#667085"},className:"dark:text-neutral-400"})}):e.jsx(oe.Tabs,{variant:"switch",tabs:ue,activeTab:c,onTabClick:t=>ae(t),height:"h-5",iconsOnly:!0,tabIcons:{edit:e.jsx(m.Edit,{sx:{fontSize:16,color:"#667085"},className:"dark:text-neutral-400"}),preview:e.jsx(m.VisibilityOutlined,{sx:{fontSize:16,color:"#667085"},className:"dark:text-neutral-400"})},className:"rounded-lg"})]})]}),e.jsx("div",{className:"px-3 py-2 relative",children:c==="edit"?e.jsxs(e.Fragment,{children:[e.jsx("textarea",{ref:t=>{typeof u=="function"?u(t):u&&(u.current=t),k.current=t,z&&(z.current=t)},id:a,value:n,defaultValue:D,onChange:t=>{const r=t.target.value;(!f||r.length<=f)&&w(r)},onKeyDown:ie,placeholder:G,rows:xe,disabled:i,required:R,maxLength:f,className:y("w-full bg-transparent !focus:ring-0 !focus:border-none","font-inter font-medium text-sm leading-5","text-[#101828] dark:text-neutral-100","placeholder:text-neutral-400 dark:placeholder:text-neutral-500","focus:outline-none resize-none","scrollbar-none","[&::-webkit-scrollbar]:hidden","[-ms-overflow-style:none]","[scrollbar-width:none]",{"text-neutral-400 dark:text-neutral-500 cursor-not-allowed":i},{"pr-20":_||b},Y)}),(_||b)&&c==="edit"&&e.jsxs("div",{className:"absolute right-1 top-2 flex items-center gap-1",children:[_&&n&&e.jsx("button",{id:`btn-input-field-clear-${g}`,className:"absolute inset-y-0 flex items-center cursor-pointer top-2 right-1 focus:outline-none",onClick:ce,type:"button",children:e.jsx(pe,{className:"text-neutral-300 dark:text-black-500 hover:text-neutral-400 dark:hover:text-black-400 transition-colors",size:16})}),b&&e.jsx("div",{className:"flex items-center",children:b})]})]}):e.jsx("div",{className:"w-full min-h-[92px] max-h-[400px] overflow-y-auto",children:e.jsx(K.MarkdownPreview,{content:n,linkTarget:T,className:M,noIndent:$,showMinimalPreview:L,acceptAdvanceContent:N})})})]}),e.jsx(de.Modal,{open:re,onCancel:()=>P(!1),title:"Markdown Preview",width:900,footer:null,children:e.jsx("div",{className:"max-h-[calc(100vh-200px)] overflow-y-auto p-4",children:e.jsx(K.MarkdownPreview,{content:n,linkTarget:T,className:M,noIndent:$,showMinimalPreview:L,acceptAdvanceContent:N})})}),e.jsx(U.AnimatePresence,{children:S&&e.jsx(U.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:e.jsx(V.Typography,{className:"mt-1 text-error-500",appearance:"custom",size:"extra-small",variant:"medium",children:S})})})]});return E?e.jsx(H,{title:E,children:O}):O});W.displayName="RichMarkdownInput";exports.RichMarkdownInput=W;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),y=require("../../../_virtual/index.cjs.js"),F=require("react"),m=require("@mui/icons-material"),oe=require("../../data-display/modal/Modal.cjs.js"),f=require("../../button/Button.cjs.js"),xe=require("../../navigation/tabs/Tabs.cjs.js"),K=require("./MarkdownPreview.cjs.js"),H=require("../../tooltip/Tooltip.cjs.js"),U=require("framer-motion"),V=require("../../data-display/typography/Typography.cjs.js"),me=require("../shared/InputLabel.cjs.js"),ue=["edit","preview"],he=({className:g,size:n=16})=>e.jsxs("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:g,children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),W=F.forwardRef(({id:g,value:n="",defaultValue:D,onChange:w,placeholder:G="Enter markdown content...",minRows:J=4,maxRows:Q=20,isDisabled:i=!1,className:X,textareaClassName:Y,previewClassName:M,label:C,labelClassName:Z,isRequiredConditional:ee,required:R=!1,showPreviewOnModal:te=!1,maxLength:p,linkTarget:T="_blank",errorMessage:S,tooltip:E,originalCase:I,suffixIcon:b,isClearable:_,inputref:z,showFormattingHelp:se=!0,onKeyDown:ne,noIndent:$=!1,showMinimalPreview:L=!1,acceptAdvanceContent:N=!0},u)=>{const[c,ae]=F.useState("edit"),[re,P]=F.useState(!1),k=F.useRef(null),a=g||`rich-md-input-${Math.random().toString(36).slice(2,11)}`,le=n.length,d=(t,r="",j="")=>{const o=u?.current||k.current;if(!o)return;const l=o.selectionStart,x=o.selectionEnd,h=n.substring(l,x),v=h||j,q=n.substring(0,l)+t+v+r+n.substring(x);w(q),setTimeout(()=>{const s=l+t.length+(h?h.length:0);o.focus(),o.setSelectionRange(s,s+(h?0:j.length))},0)},B=t=>{const r=u?.current||k.current;if(!r)return;const j=r.selectionStart,o=r.selectionEnd,l=n.split(`
|
|
2
|
+
`);let x=0,h=0,v=0;for(let s=0;s<l.length;s++){if(x<=j&&j<=x+l[s].length+1&&(h=s),x<=o&&o<=x+l[s].length+1){v=s;break}x+=l[s].length+1}const q=l.map((s,A)=>A>=h&&A<=v?s.trim()===""?s:t==="- "&&s.trim().startsWith("- ")?s.replace(/^\s*-\s+/,""):t.match(/^\d+\.\s/)&&s.trim().match(/^\d+\.\s/)?s.replace(/^\s*\d+\.\s+/,""):t+s.trim():s);w(q.join(`
|
|
3
|
+
`)),setTimeout(()=>{r.focus()},0)},ie=t=>{if(ne?.(t),t.metaKey||t.ctrlKey)switch(t.key.toLowerCase()){case"b":t.preventDefault(),d("**","**","bold text");break;case"i":t.preventDefault(),d("*","*","italic text");break;case"u":t.preventDefault(),d("<u>","</u>","underlined text");break;case"k":t.preventDefault(),d("[","](url)","link text");break;case"e":t.preventDefault(),d("```","```","code");break}},ce=()=>{w(""),(u?.current||k.current)?.focus()},de=(()=>{const t=(n.match(/\n/g)||[]).length+1;return Math.min(Q,Math.max(J,t))})(),O=e.jsxs("div",{className:y("flex flex-col",X),children:[e.jsxs("div",{className:`flex flex-row items-center ${C?"justify-between":"justify-end"} w-full`,children:[C&&e.jsx("label",{id:a,htmlFor:a,className:`mb-1 text-xs font-medium text-gray-600 inline-flex items-center gap-1 ${I?"":"capitalize"} ${Z||"!uppercse"}`,children:e.jsx("div",{className:"flex flex-wrap items-center justify-between w-full",children:e.jsx("div",{className:"inline-flex flex-wrap items-center gap-1",children:e.jsx(me.InputLabel,{label:C||"",required:R||!1,isRequiredConditional:ee||!1})})})}),se&&e.jsx(H,{placement:"bottom-end",title:e.jsxs("div",{className:"flex flex-col items-start justify-center py-2 px-3 min-w-[220px] gap-2 bg-neutral-900 rounded-lg",children:[e.jsxs("div",{className:"flex flex-col items-start justify-start gap-1 w-full",children:[e.jsxs("div",{className:"flex flex-row items-start gap-1 ml-1",children:[e.jsx("span",{className:"text-white text-[18px] leading-4",children:"•"}),e.jsx("div",{className:"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm",children:e.jsx("span",{className:"text-neutral-300 text-xs font-medium leading-4 font-inter",children:"**bold**"})}),e.jsxs("span",{className:"text-white text-xs font-medium leading-4 font-inter",children:["→ ",e.jsx("strong",{children:"bold"})," text"]})]}),e.jsxs("div",{className:"flex flex-row items-start gap-1 ml-1",children:[e.jsx("span",{className:"text-white text-[18px] leading-4",children:"•"}),e.jsx("div",{className:"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm",children:e.jsx("span",{className:"text-neutral-300 text-xs font-medium leading-4 font-inter",children:"*italic*"})}),e.jsxs("span",{className:"text-white text-xs font-medium leading-4 font-inter",children:["→ ",e.jsx("em",{children:"italic"})," text"]})]}),e.jsxs("div",{className:"flex flex-row items-start gap-1 ml-1",children:[e.jsx("span",{className:"text-white text-[18px] leading-4",children:"•"}),e.jsx("div",{className:"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm",children:e.jsx("span",{className:"text-neutral-300 text-xs font-medium leading-4 font-inter",children:"`code`"})}),e.jsxs("span",{className:"text-white text-xs font-medium leading-4 font-inter",children:["→ ",e.jsx("code",{children:"inline code"})]})]}),e.jsxs("div",{className:"flex flex-row items-start gap-1 ml-1",children:[e.jsx("span",{className:"text-white text-[18px] leading-4",children:"•"}),e.jsx("div",{className:"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm",children:e.jsx("span",{className:"text-neutral-300 text-xs font-medium leading-4 font-inter",children:"<u>text</u>"})}),e.jsxs("span",{className:"text-white text-xs font-medium leading-4 font-inter",children:["→ ",e.jsx("u",{children:"underline"})]})]}),e.jsxs("div",{className:"flex flex-row items-start gap-1 ml-1",children:[e.jsx("span",{className:"text-white text-[18px] leading-4",children:"•"}),e.jsx("div",{className:"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm",children:e.jsx("span",{className:"text-neutral-300 text-xs font-medium leading-4 font-inter",children:"~~strike~~"})}),e.jsxs("span",{className:"text-white text-xs font-medium leading-4 font-inter",children:["→ ",e.jsx("del",{children:"strike"})]})]}),e.jsxs("div",{className:"flex flex-row items-start gap-1 ml-1",children:[e.jsx("span",{className:"text-white text-[18px] leading-4",children:"•"}),e.jsx("div",{className:"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm",children:e.jsx("span",{className:"text-neutral-300 text-xs font-medium leading-4 font-inter",children:"- item"})}),e.jsx("span",{className:"text-white text-xs font-medium leading-4 font-inter",children:"→ bullet list"})]}),e.jsxs("div",{className:"flex flex-row items-start gap-1 ml-1",children:[e.jsx("span",{className:"text-white text-[18px] leading-4",children:"•"}),e.jsx("div",{className:"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm",children:e.jsx("span",{className:"text-neutral-300 text-xs font-medium leading-4 font-inter",children:"1. item"})}),e.jsx("span",{className:"text-white text-xs font-medium leading-4 font-inter",children:"→ numbered list"})]}),N&&e.jsxs("div",{className:"flex flex-row items-start gap-1 ml-1",children:[e.jsx("span",{className:"text-white text-[18px] leading-4",children:"•"}),e.jsx("div",{className:"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm",children:e.jsx("span",{className:"text-neutral-300 text-xs font-medium leading-4 font-inter",children:"## heading"})}),e.jsx("span",{className:"text-white text-xs font-medium leading-4 font-inter",children:"→ heading 2"})]}),e.jsxs("div",{className:"flex flex-row items-start gap-1 ml-1",children:[e.jsx("span",{className:"text-white text-[18px] leading-4",children:"•"}),e.jsx("div",{className:"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm",children:e.jsx("span",{className:"text-neutral-300 text-xs font-medium leading-4 font-inter",children:"[link](url)"})}),e.jsx("span",{className:"text-white text-xs font-medium leading-4 font-inter",children:"→ hyperlink"})]})]}),N&&e.jsx(e.Fragment,{children:e.jsxs("div",{className:"flex flex-col items-start justify-start gap-1 w-full",children:[e.jsxs("div",{className:"flex flex-row items-start gap-1 ml-1",children:[e.jsx("span",{className:"text-white text-[18px] leading-4",children:"•"}),e.jsx("div",{className:"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm",children:e.jsx("span",{className:"text-neutral-300 text-xs font-medium leading-4 font-inter",children:"> quote"})}),e.jsx("span",{className:"text-white text-xs font-medium leading-4 font-inter",children:"→ blockquote"})]}),e.jsxs("div",{className:"flex flex-col items-start justify-start gap-0.5 w-full mt-0.5",children:[e.jsxs("div",{className:"flex flex-row items-center gap-1 ml-1",children:[e.jsx("span",{className:"text-white text-[18px] leading-4",children:"•"}),e.jsx("span",{className:"text-white text-xs font-medium leading-4 font-inter",children:"Table:"})]}),e.jsxs("div",{className:"flex flex-col px-1 py-0.5 bg-neutral-700 ml-2 rounded-sm gap-0",children:[e.jsx("span",{className:"text-neutral-300 text-xs font-medium leading-4 font-inter whitespace-nowrap",children:"| Header 1 | Header 2 | Header 3 |"}),e.jsx("span",{className:"text-neutral-300 text-xs font-medium leading-4 font-inter whitespace-nowrap",children:"| :--- | :---: | ---: |"}),e.jsx("span",{className:"text-neutral-300 text-xs font-medium leading-4 font-inter whitespace-nowrap",children:"| Left | Center | Right |"})]})]})]})})]}),children:e.jsx(V.Typography,{className:"mb-2 text-xs font-medium text-primary-700 inline-flex items-center gap-1 cursor-pointer",children:"Formatting help ?"})})]}),e.jsxs("div",{className:y("flex flex-col border shadow-[0px_1px_2px_rgba(0,0,0,0.05)] rounded-lg bg-white dark:bg-black-700 w-full",S?"border-red-300 focus-within:border-red-500 focus-within:shadow-[0_0_0_1.5px_var(--color-red-200)]":"border-[#EAECF0] dark:border-black-600 focus-within:border-primary-600 dark:focus-within:border-primary-400 focus-within:shadow-[0_0_0_1.5px_var(--color-primary-100)] dark:focus-within:shadow-[0_0_0_1.5px_var(--color-primary-950)]"),children:[e.jsxs("div",{className:y("flex flex-row justify-between items-center px-3 py-2 gap-2 h-11 rounded-t-lg bg-[#F9FAFB] dark:bg-black-600 border-b border-[#EAECF0] dark:border-black-600"),children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(f,{id:`${a}-bold`,type:"button",onClick:()=>d("**","**","bold text"),disabled:i||c==="preview",className:"!p-0.5 !min-w-0 !h-auto !rounded-md hover:!bg-neutral-200 dark:hover:!bg-black-500 hover:!scale-110 !transition-all !duration-200",appearance:"ghost",status:"no-background",title:"Bold (Ctrl+B)",children:e.jsx(m.FormatBold,{sx:{fontSize:20,color:"#667085"},className:"dark:text-neutral-400"})}),e.jsx(f,{id:`${a}-italic`,type:"button",onClick:()=>d("*","*","italic text"),disabled:i||c==="preview",className:"!p-0.5 !min-w-0 !h-auto !rounded-md hover:!bg-neutral-200 dark:hover:!bg-black-500 hover:!scale-110 !transition-all !duration-200",appearance:"ghost",status:"no-background",title:"Italic (Ctrl+I)",children:e.jsx(m.FormatItalic,{sx:{fontSize:20,color:"#667085"},className:"dark:text-neutral-400"})}),e.jsx(f,{id:`${a}-underline`,type:"button",onClick:()=>d("<u>","</u>","underlined text"),disabled:i||c==="preview",className:"!p-0.5 !min-w-0 !h-auto !rounded-md hover:!bg-neutral-200 dark:hover:!bg-black-500 hover:!scale-110 !transition-all !duration-200",appearance:"ghost",status:"no-background",title:"Underline (Ctrl+U)",children:e.jsx(m.FormatUnderlined,{sx:{fontSize:20,color:"#667085"},className:"dark:text-neutral-400"})}),e.jsx("div",{className:"w-px h-5 bg-[#EAECF0] dark:bg-black-500 rounded-full"}),e.jsx(f,{id:`${a}-numbered-list`,type:"button",onClick:()=>B("1. "),disabled:i||c==="preview",className:"!p-0.5 !min-w-0 !h-auto !rounded-md hover:!bg-neutral-200 dark:hover:!bg-black-500 hover:!scale-110 !transition-all !duration-200",appearance:"ghost",status:"no-background",title:"Numbered List",children:e.jsx(m.FormatListNumbered,{sx:{fontSize:20,color:"#667085"},className:"dark:text-neutral-400"})}),e.jsx(f,{id:`${a}-bullet-list`,type:"button",onClick:()=>B("- "),disabled:i||c==="preview",className:"!p-0.5 !min-w-0 !h-auto !rounded-md hover:!bg-neutral-200 dark:hover:!bg-black-500 hover:!scale-110 !transition-all !duration-200",appearance:"ghost",status:"no-background",title:"Bullet List",children:e.jsx(m.FormatListBulleted,{sx:{fontSize:20,color:"#667085"},className:"dark:text-neutral-400"})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[p&&e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"text-sm font-medium text-[#475467] dark:text-neutral-400",children:[le,"/",p]}),e.jsx("div",{className:"w-px h-6 bg-[#EAECF0] dark:bg-black-500 rounded-full"})]}),te?e.jsx(f,{id:`${a}-expand`,type:"button",onClick:()=>P(!0),disabled:i,className:"!p-0.5 !min-w-0 !h-auto ml-1 !rounded-md hover:!bg-neutral-200 dark:hover:!bg-black-500 hover:!scale-110 !transition-all !duration-200",appearance:"ghost",status:"no-background",title:"Expand Preview",children:e.jsx(m.OpenInFull,{sx:{fontSize:16,color:"#667085"},className:"dark:text-neutral-400"})}):e.jsx(xe.Tabs,{variant:"switch",tabs:ue,activeTab:c,onTabClick:t=>ae(t),height:"h-5",iconsOnly:!0,tabIcons:{edit:e.jsx(m.Edit,{sx:{fontSize:16,color:"#667085"},className:"dark:text-neutral-400"}),preview:e.jsx(m.VisibilityOutlined,{sx:{fontSize:16,color:"#667085"},className:"dark:text-neutral-400"})},className:"rounded-lg"})]})]}),e.jsx("div",{className:"px-3 py-2 relative",children:c==="edit"?e.jsxs(e.Fragment,{children:[e.jsx("textarea",{ref:t=>{typeof u=="function"?u(t):u&&(u.current=t),k.current=t,z&&(z.current=t)},id:a,value:n,defaultValue:D,onChange:t=>{const r=t.target.value;(!p||r.length<=p)&&w(r)},onKeyDown:ie,placeholder:G,rows:de,disabled:i,required:R,maxLength:p,className:y("w-full bg-transparent !focus:ring-0 !focus:border-none","font-inter font-medium text-sm leading-5","text-[#101828] dark:text-neutral-100","placeholder:text-neutral-400 dark:placeholder:text-neutral-500","focus:outline-none resize-none","scrollbar-none","[&::-webkit-scrollbar]:hidden","[-ms-overflow-style:none]","[scrollbar-width:none]",{"text-neutral-400 dark:text-neutral-500 cursor-not-allowed":i},{"pr-20":_||b},Y)}),(_||b)&&c==="edit"&&e.jsxs("div",{className:"absolute right-1 top-2 flex items-center gap-1",children:[_&&n&&e.jsx("button",{id:`btn-input-field-clear-${g}`,className:"absolute inset-y-0 flex items-center cursor-pointer top-2 right-1 focus:outline-none",onClick:ce,type:"button",children:e.jsx(he,{className:"text-neutral-300 dark:text-black-500 hover:text-neutral-400 dark:hover:text-black-400 transition-colors",size:16})}),b&&e.jsx("div",{className:"flex items-center",children:b})]})]}):e.jsx("div",{className:"w-full min-h-[92px] max-h-[400px] overflow-y-auto",children:e.jsx(K.MarkdownPreview,{content:n,linkTarget:T,className:M,noIndent:$,showMinimalPreview:L,acceptAdvanceContent:N})})})]}),e.jsx(oe.Modal,{open:re,onCancel:()=>P(!1),title:"Markdown Preview",width:900,footer:null,children:e.jsx("div",{className:"max-h-[calc(100vh-200px)] overflow-y-auto p-4",children:e.jsx(K.MarkdownPreview,{content:n,linkTarget:T,className:M,noIndent:$,showMinimalPreview:L,acceptAdvanceContent:N})})}),e.jsx(U.AnimatePresence,{children:S&&e.jsx(U.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:e.jsx(V.Typography,{className:"mt-1 text-error-500",appearance:"custom",size:"extra-small",variant:"medium",children:S})})})]});return E?e.jsx(H,{title:E,children:O}):O});W.displayName="RichMarkdownInput";exports.RichMarkdownInput=W;
|
|
4
4
|
//# sourceMappingURL=RichMarkdownInput.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RichMarkdownInput.cjs.js","sources":["../../../../src/components/forms/md-input/RichMarkdownInput.tsx"],"sourcesContent":["import cn from \"classnames\";\nimport { forwardRef, useRef, useState } from \"react\";\nimport {\n\tFormatBold,\n\tFormatItalic,\n\tFormatUnderlined,\n\tFormatListBulleted,\n\tFormatListNumbered,\n\tOpenInFull,\n\tEdit,\n\tVisibilityOutlined,\n} from \"@mui/icons-material\";\nimport { Modal } from \"../../data-display/modal/Modal\";\nimport Button from \"../../button/Button\";\nimport { Tabs } from \"../../navigation/tabs/Tabs\";\nimport { MarkdownPreview } from \"./MarkdownPreview\";\nimport Tooltip from \"../../tooltip/Tooltip\";\nimport { AnimatePresence, motion } from \"framer-motion\";\nimport { Typography } from \"../../data-display/typography/Typography\";\nimport { InputLabel } from \"../shared/InputLabel\";\n\n/**\n * Props for the RichMarkdownInput component\n */\nexport interface RichMarkdownInputProps {\n\t/** Unique identifier for the markdown input */\n\tid?: string;\n\t/** Current markdown value */\n\tvalue?: string;\n\t/** Default value for the input */\n\tdefaultValue?: string;\n\t/** Placeholder text for the textarea */\n\tplaceholder?: string;\n\t/** Minimum number of visible text lines */\n\tminRows?: number;\n\t/** Maximum number of visible text lines */\n\tmaxRows?: number;\n\t/** Whether the input is disabled */\n\tisDisabled?: boolean;\n\t/** Additional CSS classes for the wrapper container */\n\tclassName?: string;\n\t/** Additional CSS classes for the textarea */\n\ttextareaClassName?: string;\n\t/** Additional CSS classes for the preview container */\n\tpreviewClassName?: string;\n\t/** Label text to display above the input */\n\tlabel?: string;\n\t/** Additional CSS classes for the label */\n\tlabelClassName?: string;\n\t/** Whether the field is required and the required indicator shows as conditional */\n\tisRequiredConditional?: boolean;\n\t/** Whether the field is required */\n\trequired?: boolean;\n\t/** Whether to show the preview button */\n\tshowPreviewOnModal?: boolean;\n\t/** Maximum character count */\n\tmaxLength?: number;\n\t/** Link target behavior: '_blank' for new tab, '_self' for current tab */\n\tlinkTarget?: '_blank' | '_self';\n\t/** Error message to display */\n\terrorMessage?: string;\n\t/** Tooltip text */\n\ttooltip?: string;\n\t/** Whether to preserve original case (no auto-lowercase) */\n\toriginalCase?: boolean;\n\t/** Icon to display at the end of the input */\n\tsuffixIcon?: React.ReactNode;\n\t/** Whether the input is clearable */\n\tisClearable?: boolean;\n\t/** Ref for the input element */\n\tinputref?: React.RefObject<HTMLTextAreaElement>;\n\t/** Whether to show the formatting help tooltip */\n\tshowFormattingHelp?: boolean;\n\t/** Keyboard event handler */\n\tonKeyDown?: (e: React.KeyboardEvent<HTMLTextAreaElement>) => void;\n\t/** Whether to remove indentation from lists and align all content to the left in preview */\n\tnoIndent?: boolean;\n\t/** Whether to display all content with uniform font size/weight (paragraph-like) while keeping formatting */\n\tshowMinimalPreview?: boolean;\n\t/** Whether to accept and render advanced content (code blocks, blockquotes, tables, images) in preview */\n\tacceptAdvanceContent?: boolean;\n\t/** Callback function called when the markdown value changes */\n\tonChange: (value: string) => void;\n}\n\n/**\n * The type of view for the rich markdown input\n */\ntype RichMarkdownInputViewType = \"edit\" | \"preview\";\n\n/**\n * The tabs for the rich markdown input\n */\nconst RichMarkdownInputTabs: RichMarkdownInputViewType[] = [\"edit\", \"preview\"];\n\n/**\n * Close icon for clearable input\n */\nconst CloseIcon = ({ className, size = 16 }: { className?: string; size?: number }) => (\n\t<svg\n\t\twidth={size}\n\t\theight={size}\n\t\tviewBox=\"0 0 24 24\"\n\t\tfill=\"none\"\n\t\tstroke=\"currentColor\"\n\t\tstrokeWidth=\"2\"\n\t\tstrokeLinecap=\"round\"\n\t\tstrokeLinejoin=\"round\"\n\t\tclassName={className}\n\t>\n\t\t<line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n\t\t<line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n\t</svg>\n);\n\n/**\n * A rich markdown input component with comprehensive formatting toolbar.\n * \n * **Text Formatting:**\n * - Bold (Ctrl+B) - Always visible\n * - Italic (Ctrl+I) - Always visible\n * - Underline (Ctrl+U) - Always visible\n * \n * **Lists:**\n * - Bullet lists - Always visible\n * - Numbered lists - Always visible\n * \n * **Features:**\n * - Edit/Preview toggle with icons\n * - Character counter (optional)\n * - Preview modal with scrolling\n * - Keyboard shortcuts\n * - Syntax highlighting for code blocks\n * - Responsive toolbar\n * - Dark mode support\n * - Configurable link target behavior\n * - Error message display\n * - Tooltip support\n * - Clear button (optional)\n * - Suffix icon support\n * - Custom keyboard handlers\n * - Minimal preview mode (uniform typography)\n * - Toggle advanced content in preview\n *\n * @example\n * ```tsx\n * <RichMarkdownInput\n * value={markdown}\n * onChange={setMarkdown}\n * placeholder=\"Enter description...\"\n * label=\"Description\"\n * maxLength={300}\n * linkTarget=\"_blank\"\n * isClearable\n * errorMessage=\"Invalid input\"\n * tooltip=\"Use markdown formatting\"\n * showMinimalPreview={false}\n * acceptAdvanceContent={true}\n * />\n * ```\n */\nexport const RichMarkdownInput = forwardRef<\n\tHTMLTextAreaElement,\n\tRichMarkdownInputProps\n>(\n\t(\n\t\t{\n\t\t\tid,\n\t\t\tvalue = \"\",\n\t\t\tdefaultValue,\n\t\t\tonChange,\n\t\t\tplaceholder = \"Enter markdown content...\",\n\t\t\tminRows = 4,\n\t\t\tmaxRows = 20,\n\t\t\tisDisabled = false,\n\t\t\tclassName,\n\t\t\ttextareaClassName,\n\t\t\tpreviewClassName,\n\t\t\tlabel,\n\t\t\tlabelClassName,\n\t\t\tisRequiredConditional,\n\t\t\trequired = false,\n\t\t\tshowPreviewOnModal = false,\n\t\t\tmaxLength,\n\t\t\tlinkTarget = '_blank',\n\t\t\terrorMessage,\n\t\t\ttooltip,\n\t\t\toriginalCase,\n\t\t\tsuffixIcon,\n\t\t\tisClearable,\n\t\t\tinputref,\n\t\t\tshowFormattingHelp = true,\n\t\t\tonKeyDown,\n\t\t\tnoIndent = false,\n\t\t\tshowMinimalPreview = false,\n\t\t\tacceptAdvanceContent = true,\n\t\t},\n\t\tref\n\t) => {\n\t\tconst [mode, setMode] = useState<RichMarkdownInputViewType>(\"edit\");\n\t\tconst [isPreviewOpen, setIsPreviewOpen] = useState(false);\n\t\tconst textareaRef = useRef<HTMLTextAreaElement>(null);\n\t\tconst inputId = id || `rich-md-input-${Math.random().toString(36).slice(2, 11)}`;\n\n\t\tconst charCount = value.length;\n\n\t\t/**\n\t\t * Insert markdown syntax at cursor position\n\t\t */\n\t\tconst insertMarkdown = (before: string, after: string = \"\", placeholder: string = \"\") => {\n\t\t\tconst textarea = (ref as React.RefObject<HTMLTextAreaElement>)?.current || textareaRef.current;\n\t\t\tif (!textarea) return;\n\n\t\t\tconst start = textarea.selectionStart;\n\t\t\tconst end = textarea.selectionEnd;\n\t\t\tconst selectedText = value.substring(start, end);\n\t\t\tconst textToInsert = selectedText || placeholder;\n\n\t\t\tconst newValue = value.substring(0, start) + before + textToInsert + after + value.substring(end);\n\t\t\tonChange(newValue);\n\n\t\t\t// Set cursor position after insertion\n\t\t\tsetTimeout(() => {\n\t\t\t\tconst newCursorPos = start + before.length + (selectedText ? selectedText.length : 0);\n\t\t\t\ttextarea.focus();\n\t\t\t\ttextarea.setSelectionRange(newCursorPos, newCursorPos + (selectedText ? 0 : placeholder.length));\n\t\t\t}, 0);\n\t\t};\n\n\t\t/**\n\t\t * Insert list item at cursor position\n\t\t */\n\t\tconst insertList = (prefix: string) => {\n\t\t\tconst textarea = (ref as React.RefObject<HTMLTextAreaElement>)?.current || textareaRef.current;\n\t\t\tif (!textarea) return;\n\n\t\t\tconst start = textarea.selectionStart;\n\t\t\tconst end = textarea.selectionEnd;\n\t\t\tconst lines = value.split('\\n');\n\n\t\t\t// Find which line(s) are selected\n\t\t\tlet currentPos = 0;\n\t\t\tlet startLine = 0;\n\t\t\tlet endLine = 0;\n\n\t\t\tfor (let i = 0; i < lines.length; i++) {\n\t\t\t\tif (currentPos <= start && start <= currentPos + lines[i].length + 1) {\n\t\t\t\t\tstartLine = i;\n\t\t\t\t}\n\t\t\t\tif (currentPos <= end && end <= currentPos + lines[i].length + 1) {\n\t\t\t\t\tendLine = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcurrentPos += lines[i].length + 1;\n\t\t\t}\n\n\t\t\t// Add list markers to selected lines\n\t\t\tconst newLines = lines.map((line, index) => {\n\t\t\t\tif (index >= startLine && index <= endLine) {\n\t\t\t\t\tif (line.trim() === '') return line;\n\t\t\t\t\t// Check if line already has a list marker\n\t\t\t\t\tif (prefix === '- ' && line.trim().startsWith('- ')) {\n\t\t\t\t\t\treturn line.replace(/^\\s*-\\s+/, '');\n\t\t\t\t\t}\n\t\t\t\t\tif (prefix.match(/^\\d+\\.\\s/) && line.trim().match(/^\\d+\\.\\s/)) {\n\t\t\t\t\t\treturn line.replace(/^\\s*\\d+\\.\\s+/, '');\n\t\t\t\t\t}\n\t\t\t\t\treturn prefix + line.trim();\n\t\t\t\t}\n\t\t\t\treturn line;\n\t\t\t});\n\n\t\t\tonChange(newLines.join('\\n'));\n\n\t\t\tsetTimeout(() => {\n\t\t\t\ttextarea.focus();\n\t\t\t}, 0);\n\t\t};\n\n\t\t/**\n\t\t * Handle keyboard shortcuts\n\t\t */\n\t\tconst handleKeyDownInternal = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {\n\t\t\t// Call external handler first\n\t\t\tonKeyDown?.(e);\n\n\t\t\tif (e.metaKey || e.ctrlKey) {\n\t\t\t\tswitch (e.key.toLowerCase()) {\n\t\t\t\t\tcase 'b':\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tinsertMarkdown('**', '**', 'bold text');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'i':\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tinsertMarkdown('*', '*', 'italic text');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'u':\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tinsertMarkdown('<u>', '</u>', 'underlined text');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'k':\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tinsertMarkdown('[', '](url)', 'link text');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'e':\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tinsertMarkdown('```', '```', 'code');\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Handle clear button click\n\t\t */\n\t\tconst handleClear = () => {\n\t\t\tonChange('');\n\t\t\tconst textarea = (ref as React.RefObject<HTMLTextAreaElement>)?.current || textareaRef.current;\n\t\t\ttextarea?.focus();\n\t\t};\n\n\t\t/**\n\t\t * Calculate dynamic rows based on content\n\t\t */\n\t\tconst calculateRows = () => {\n\t\t\tconst lineCount = (value.match(/\\n/g) || []).length + 1;\n\t\t\treturn Math.min(maxRows, Math.max(minRows, lineCount));\n\t\t};\n\n\t\tconst rows = calculateRows();\n\n\t\tconst content = (\n\t\t\t<div className={cn(\"flex flex-col\", className)}>\n\t\t\t\t<div className={`flex flex-row items-center ${label ? \"justify-between\" : \"justify-end\"} w-full`}>\n\t\t\t\t\t{/* Label */}\n\t\t\t\t\t{label && (\n\t\t\t\t\t\t<label\n\t\t\t\t\t\t\tid={inputId}\n\t\t\t\t\t\t\thtmlFor={inputId}\n\t\t\t\t\t\t\tclassName={`mb-1 text-xs font-medium text-gray-600 inline-flex items-center gap-1 ${!originalCase ? \"capitalize\" : \"\"\n\t\t\t\t\t\t\t\t} ${labelClassName || \"!uppercse\"}`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div className=\"flex flex-wrap items-center justify-between w-full\">\n\t\t\t\t\t\t\t\t<div className=\"inline-flex flex-wrap items-center gap-1\">\n\t\t\t\t\t\t\t\t\t<InputLabel label={label || \"\"} required={required || false} isRequiredConditional={isRequiredConditional || false} />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</label>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{/* Markdown Formatting Info */}\n\t\t\t\t\t{showFormattingHelp && (\n\t\t\t\t\t\t<Tooltip\n\t\t\t\t\t\t\tplacement=\"bottom-end\"\n\t\t\t\t\t\t\ttitle={\n\t\t\t\t\t\t\t\t<div className=\"flex flex-col items-start justify-center py-2 px-3 min-w-[220px] gap-2 bg-neutral-900 rounded-lg\">\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col items-start justify-start gap-1 w-full\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row items-start gap-1 ml-1\">\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-[18px] leading-[18px]\">•</span>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-neutral-300 text-xs font-medium leading-[18px] font-inter\">**bold**</span>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-xs font-medium leading-[18px] font-inter\">\n\t\t\t\t\t\t\t\t\t\t\t\t→ <strong>bold</strong> text\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row items-start gap-1 ml-1\">\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-[18px] leading-[18px]\">•</span>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-neutral-300 text-xs font-medium leading-[18px] font-inter\">*italic*</span>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-xs font-medium leading-[18px] font-inter\">\n\t\t\t\t\t\t\t\t\t\t\t\t→ <em>italic</em> text\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row items-start gap-1 ml-1\">\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-[18px] leading-[18px]\">•</span>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-neutral-300 text-xs font-medium leading-[18px] font-inter\">`code`</span>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-xs font-medium leading-[18px] font-inter\">\n\t\t\t\t\t\t\t\t\t\t\t\t→ <code>inline code</code>\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row items-start gap-1 ml-1\">\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-[18px] leading-[18px]\">•</span>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-neutral-300 text-xs font-medium leading-[18px] font-inter\"><u>text</u></span>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-xs font-medium leading-[18px] font-inter\">\n\t\t\t\t\t\t\t\t\t\t\t\t→ <u>underline</u>\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row items-start gap-1 ml-1\">\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-[18px] leading-[18px]\">•</span>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-neutral-300 text-xs font-medium leading-[18px] font-inter\">~~strike~~</span>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-xs font-medium leading-[18px] font-inter\">\n\t\t\t\t\t\t\t\t\t\t\t\t→ <del>strike</del>\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row items-start gap-1 ml-1\">\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-[18px] leading-[18px]\">•</span>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-neutral-300 text-xs font-medium leading-[18px] font-inter\">- item</span>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-xs font-medium leading-[18px] font-inter\">\n\t\t\t\t\t\t\t\t\t\t\t\t→ bullet list\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row items-start gap-1 ml-1\">\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-[18px] leading-[18px]\">•</span>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-neutral-300 text-xs font-medium leading-[18px] font-inter\">1. item</span>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-xs font-medium leading-[18px] font-inter\">\n\t\t\t\t\t\t\t\t\t\t\t\t→ numbered list\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t{acceptAdvanceContent && (\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row items-start gap-1 ml-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-[18px] leading-[18px]\">•</span>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-neutral-300 text-xs font-medium leading-[18px] font-inter\">## heading</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-xs font-medium leading-[18px] font-inter\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t→ heading 2\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row items-start gap-1 ml-1\">\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-[18px] leading-[18px]\">•</span>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-neutral-300 text-xs font-medium leading-[18px] font-inter\">[link](url)</span>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-xs font-medium leading-[18px] font-inter\">\n\t\t\t\t\t\t\t\t\t\t\t\t→ hyperlink\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t{acceptAdvanceContent && (\n\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col items-start justify-start gap-1 w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row items-start gap-1 ml-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-[18px] leading-[18px]\">•</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-neutral-300 text-xs font-medium leading-[18px] font-inter\">> quote</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-xs font-medium leading-[18px] font-inter\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t→ blockquote\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col items-start justify-start gap-0.5 w-full mt-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row items-center gap-1 ml-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-[18px] leading-[18px]\">•</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-xs font-medium leading-[18px] font-inter\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tTable:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col px-1 py-0.5 bg-neutral-700 ml-2 rounded-sm gap-0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-neutral-300 text-xs font-medium leading-[18px] font-inter whitespace-nowrap\">| Header 1 | Header 2 | Header 3 |</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-neutral-300 text-xs font-medium leading-[18px] font-inter whitespace-nowrap\">| :--- | :---: | ---: |</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-neutral-300 text-xs font-medium leading-[18px] font-inter whitespace-nowrap\">| Left | Center | Right |</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Typography className=\"mb-2 text-xs font-medium text-primary-700 inline-flex items-center gap-1 cursor-pointer\">\n\t\t\t\t\t\t\t\tFormatting help ?\n\t\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\n\t\t\t\t{/* Main Container */}\n\t\t\t\t<div className={cn(\n\t\t\t\t\t\"flex flex-col border shadow-[0px_1px_2px_rgba(0,0,0,0.05)] rounded-lg bg-white dark:bg-black-700 w-full\",\n\t\t\t\t\terrorMessage\n\t\t\t\t\t\t? \"border-red-300 focus-within:border-red-500 focus-within:shadow-[0_0_0_1.5px_var(--color-red-200)]\"\n\t\t\t\t\t\t: \"border-[#EAECF0] dark:border-black-600 focus-within:border-primary-600 dark:focus-within:border-primary-400 focus-within:shadow-[0_0_0_1.5px_var(--color-primary-100)] dark:focus-within:shadow-[0_0_0_1.5px_var(--color-primary-950)]\"\n\t\t\t\t)}>\n\t\t\t\t\t{/* Toolbar */}\n\t\t\t\t\t<div className={cn(\n\t\t\t\t\t\t\"flex flex-row justify-between items-center px-3 py-2 gap-2 h-11 rounded-t-lg bg-[#F9FAFB] dark:bg-black-600 border-b border-[#EAECF0] dark:border-black-600\"\n\t\t\t\t\t)}>\n\t\t\t\t\t\t{/* Left: Formatting Buttons */}\n\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tid={`${inputId}-bold`}\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tonClick={() => insertMarkdown('**', '**', 'bold text')}\n\t\t\t\t\t\t\t\tdisabled={isDisabled || mode === \"preview\"}\n\t\t\t\t\t\t\t\tclassName=\"!p-0.5 !min-w-0 !h-auto !rounded-md hover:!bg-neutral-200 dark:hover:!bg-black-500 hover:!scale-110 !transition-all !duration-200\"\n\t\t\t\t\t\t\t\tappearance=\"ghost\"\n\t\t\t\t\t\t\t\tstatus=\"no-background\"\n\t\t\t\t\t\t\t\ttitle=\"Bold (Ctrl+B)\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<FormatBold sx={{ fontSize: 20, color: '#667085' }} className=\"dark:text-neutral-400\" />\n\t\t\t\t\t\t\t</Button>\n\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tid={`${inputId}-italic`}\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tonClick={() => insertMarkdown('*', '*', 'italic text')}\n\t\t\t\t\t\t\t\tdisabled={isDisabled || mode === \"preview\"}\n\t\t\t\t\t\t\t\tclassName=\"!p-0.5 !min-w-0 !h-auto !rounded-md hover:!bg-neutral-200 dark:hover:!bg-black-500 hover:!scale-110 !transition-all !duration-200\"\n\t\t\t\t\t\t\t\tappearance=\"ghost\"\n\t\t\t\t\t\t\t\tstatus=\"no-background\"\n\t\t\t\t\t\t\t\ttitle=\"Italic (Ctrl+I)\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<FormatItalic sx={{ fontSize: 20, color: '#667085' }} className=\"dark:text-neutral-400\" />\n\t\t\t\t\t\t\t</Button>\n\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tid={`${inputId}-underline`}\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tonClick={() => insertMarkdown('<u>', '</u>', 'underlined text')}\n\t\t\t\t\t\t\t\tdisabled={isDisabled || mode === \"preview\"}\n\t\t\t\t\t\t\t\tclassName=\"!p-0.5 !min-w-0 !h-auto !rounded-md hover:!bg-neutral-200 dark:hover:!bg-black-500 hover:!scale-110 !transition-all !duration-200\"\n\t\t\t\t\t\t\t\tappearance=\"ghost\"\n\t\t\t\t\t\t\t\tstatus=\"no-background\"\n\t\t\t\t\t\t\t\ttitle=\"Underline (Ctrl+U)\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<FormatUnderlined sx={{ fontSize: 20, color: '#667085' }} className=\"dark:text-neutral-400\" />\n\t\t\t\t\t\t\t</Button>\n\n\t\t\t\t\t\t\t<div className=\"w-px h-5 bg-[#EAECF0] dark:bg-black-500 rounded-full\" />\n\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tid={`${inputId}-numbered-list`}\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tonClick={() => insertList('1. ')}\n\t\t\t\t\t\t\t\tdisabled={isDisabled || mode === \"preview\"}\n\t\t\t\t\t\t\t\tclassName=\"!p-0.5 !min-w-0 !h-auto !rounded-md hover:!bg-neutral-200 dark:hover:!bg-black-500 hover:!scale-110 !transition-all !duration-200\"\n\t\t\t\t\t\t\t\tappearance=\"ghost\"\n\t\t\t\t\t\t\t\tstatus=\"no-background\"\n\t\t\t\t\t\t\t\ttitle=\"Numbered List\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<FormatListNumbered sx={{ fontSize: 20, color: '#667085' }} className=\"dark:text-neutral-400\" />\n\t\t\t\t\t\t\t</Button>\n\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tid={`${inputId}-bullet-list`}\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tonClick={() => insertList('- ')}\n\t\t\t\t\t\t\t\tdisabled={isDisabled || mode === \"preview\"}\n\t\t\t\t\t\t\t\tclassName=\"!p-0.5 !min-w-0 !h-auto !rounded-md hover:!bg-neutral-200 dark:hover:!bg-black-500 hover:!scale-110 !transition-all !duration-200\"\n\t\t\t\t\t\t\t\tappearance=\"ghost\"\n\t\t\t\t\t\t\t\tstatus=\"no-background\"\n\t\t\t\t\t\t\t\ttitle=\"Bullet List\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<FormatListBulleted sx={{ fontSize: 20, color: '#667085' }} className=\"dark:text-neutral-400\" />\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t{/* Center: Character Count */}\n\t\t\t\t\t\t\t{maxLength && (\n\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-3\">\n\t\t\t\t\t\t\t\t\t<span className=\"text-sm font-medium text-[#475467] dark:text-neutral-400\">\n\t\t\t\t\t\t\t\t\t\t{charCount}/{maxLength}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t<div className=\"w-px h-6 bg-[#EAECF0] dark:bg-black-500 rounded-full\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t{/* Right: Edit/Preview Toggle */}\n\t\t\t\t\t\t\t{showPreviewOnModal ? (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tid={`${inputId}-expand`}\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\tonClick={() => setIsPreviewOpen(true)}\n\t\t\t\t\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t\t\t\t\t\tclassName=\"!p-0.5 !min-w-0 !h-auto ml-1 !rounded-md hover:!bg-neutral-200 dark:hover:!bg-black-500 hover:!scale-110 !transition-all !duration-200\"\n\t\t\t\t\t\t\t\t\tappearance=\"ghost\"\n\t\t\t\t\t\t\t\t\tstatus=\"no-background\"\n\t\t\t\t\t\t\t\t\ttitle=\"Expand Preview\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<OpenInFull sx={{ fontSize: 16, color: '#667085' }} className=\"dark:text-neutral-400\" />\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<Tabs<RichMarkdownInputViewType>\n\t\t\t\t\t\t\t\t\tvariant=\"switch\"\n\t\t\t\t\t\t\t\t\ttabs={RichMarkdownInputTabs}\n\t\t\t\t\t\t\t\t\tactiveTab={mode}\n\t\t\t\t\t\t\t\t\tonTabClick={(tab) => setMode(tab)}\n\t\t\t\t\t\t\t\t\theight=\"h-5\"\n\t\t\t\t\t\t\t\t\ticonsOnly\n\t\t\t\t\t\t\t\t\ttabIcons={{\n\t\t\t\t\t\t\t\t\t\tedit: (<Edit sx={{ fontSize: 16, color: '#667085' }} className=\"dark:text-neutral-400\" />),\n\t\t\t\t\t\t\t\t\t\tpreview: (\n\t\t\t\t\t\t\t\t\t\t\t<VisibilityOutlined sx={{ fontSize: 16, color: '#667085' }} className=\"dark:text-neutral-400\" />\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tclassName=\"rounded-lg\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{/* Content Area */}\n\t\t\t\t\t<div className=\"px-3 py-2 relative\">\n\t\t\t\t\t\t{mode === \"edit\" ? (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<textarea\n\t\t\t\t\t\t\t\t\tref={(node) => {\n\t\t\t\t\t\t\t\t\t\t// Handle all refs: forwarded ref, internal ref, and inputref\n\t\t\t\t\t\t\t\t\t\tif (typeof ref === 'function') {\n\t\t\t\t\t\t\t\t\t\t\tref(node);\n\t\t\t\t\t\t\t\t\t\t} else if (ref) {\n\t\t\t\t\t\t\t\t\t\t\t(ref as React.MutableRefObject<HTMLTextAreaElement | null>).current = node;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t(textareaRef as React.MutableRefObject<HTMLTextAreaElement | null>).current = node;\n\t\t\t\t\t\t\t\t\t\tif (inputref) {\n\t\t\t\t\t\t\t\t\t\t\t(inputref as React.MutableRefObject<HTMLTextAreaElement | null>).current = node;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tid={inputId}\n\t\t\t\t\t\t\t\t\tvalue={value}\n\t\t\t\t\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t\tconst newValue = originalCase ? e.target.value : e.target.value;\n\t\t\t\t\t\t\t\t\t\tif (!maxLength || newValue.length <= maxLength) {\n\t\t\t\t\t\t\t\t\t\t\tonChange(newValue);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tonKeyDown={handleKeyDownInternal}\n\t\t\t\t\t\t\t\t\tplaceholder={placeholder}\n\t\t\t\t\t\t\t\t\trows={rows}\n\t\t\t\t\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\t\t\t\tmaxLength={maxLength}\n\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t// Base styles\n\t\t\t\t\t\t\t\t\t\t\"w-full bg-transparent !focus:ring-0 !focus:border-none\",\n\t\t\t\t\t\t\t\t\t\t\"font-inter font-medium text-sm leading-5\",\n\t\t\t\t\t\t\t\t\t\t\"text-[#101828] dark:text-neutral-100\",\n\t\t\t\t\t\t\t\t\t\t\"placeholder:text-neutral-400 dark:placeholder:text-neutral-500\",\n\t\t\t\t\t\t\t\t\t\t\"focus:outline-none resize-none\",\n\t\t\t\t\t\t\t\t\t\t// Hide scrollbar\n\t\t\t\t\t\t\t\t\t\t\"scrollbar-none\",\n\t\t\t\t\t\t\t\t\t\t\"[&::-webkit-scrollbar]:hidden\",\n\t\t\t\t\t\t\t\t\t\t\"[-ms-overflow-style:none]\",\n\t\t\t\t\t\t\t\t\t\t\"[scrollbar-width:none]\",\n\t\t\t\t\t\t\t\t\t\t// Disabled state\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\"text-neutral-400 dark:text-neutral-500 cursor-not-allowed\": isDisabled,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t// Add padding if suffix icons exist\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\"pr-20\": isClearable || suffixIcon,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\ttextareaClassName\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t{/* Suffix Icons */}\n\t\t\t\t\t\t\t\t{(isClearable || suffixIcon) && mode === \"edit\" && (\n\t\t\t\t\t\t\t\t\t<div className=\"absolute right-1 top-2 flex items-center gap-1\">\n\t\t\t\t\t\t\t\t\t\t{isClearable && value && (\n\t\t\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\t\t\tid={`btn-input-field-clear-${id}`}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"absolute inset-y-0 flex items-center cursor-pointer top-2 right-1 focus:outline-none\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={handleClear}\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<CloseIcon\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-neutral-300 dark:text-black-500 hover:text-neutral-400 dark:hover:text-black-400 transition-colors\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tsize={16}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t{suffixIcon && <div className=\"flex items-center\">{suffixIcon}</div>}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<div className=\"w-full min-h-[92px] max-h-[400px] overflow-y-auto\">\n\t\t\t\t\t\t\t\t<MarkdownPreview\n\t\t\t\t\t\t\t\t\tcontent={value}\n\t\t\t\t\t\t\t\t\tlinkTarget={linkTarget}\n\t\t\t\t\t\t\t\t\tclassName={previewClassName}\n\t\t\t\t\t\t\t\t\tnoIndent={noIndent}\n\t\t\t\t\t\t\t\t\tshowMinimalPreview={showMinimalPreview}\n\t\t\t\t\t\t\t\t\tacceptAdvanceContent={acceptAdvanceContent}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t{/* Expanded Preview Modal */}\n\t\t\t\t<Modal\n\t\t\t\t\topen={isPreviewOpen}\n\t\t\t\t\tonCancel={() => setIsPreviewOpen(false)}\n\t\t\t\t\ttitle=\"Markdown Preview\"\n\t\t\t\t\twidth={900}\n\t\t\t\t\tfooter={null}\n\t\t\t\t>\n\t\t\t\t\t<div className=\"max-h-[calc(100vh-200px)] overflow-y-auto p-4\">\n\t\t\t\t\t\t<MarkdownPreview\n\t\t\t\t\t\t\tcontent={value}\n\t\t\t\t\t\t\tlinkTarget={linkTarget}\n\t\t\t\t\t\t\tclassName={previewClassName}\n\t\t\t\t\t\t\tnoIndent={noIndent}\n\t\t\t\t\t\t\tshowMinimalPreview={showMinimalPreview}\n\t\t\t\t\t\t\tacceptAdvanceContent={acceptAdvanceContent}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</Modal>\n\n\t\t\t\t<AnimatePresence>\n\t\t\t\t\t{errorMessage && (\n\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\tinitial={{ opacity: 0, y: -10 }}\n\t\t\t\t\t\t\tanimate={{ opacity: 1, y: 0 }}\n\t\t\t\t\t\t\texit={{ opacity: 0, y: -10 }}\n\t\t\t\t\t\t\ttransition={{ duration: 0.2 }}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Typography\n\t\t\t\t\t\t\t\tclassName=\"mt-1 text-error-500\"\n\t\t\t\t\t\t\t\tappearance=\"custom\"\n\t\t\t\t\t\t\t\tsize=\"extra-small\"\n\t\t\t\t\t\t\t\tvariant=\"medium\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{errorMessage}\n\t\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t)}\n\t\t\t\t</AnimatePresence>\n\t\t\t</div>\n\t\t);\n\n\t\treturn tooltip ? (\n\t\t\t<Tooltip title={tooltip}>\n\t\t\t\t{content}\n\t\t\t</Tooltip>\n\t\t) : (\n\t\t\tcontent\n\t\t);\n\t}\n);\n\nRichMarkdownInput.displayName = \"RichMarkdownInput\";\n"],"names":["RichMarkdownInputTabs","CloseIcon","className","size","jsxs","jsx","RichMarkdownInput","forwardRef","id","value","defaultValue","onChange","placeholder","minRows","maxRows","isDisabled","textareaClassName","previewClassName","label","labelClassName","isRequiredConditional","required","showPreviewOnModal","maxLength","linkTarget","errorMessage","tooltip","originalCase","suffixIcon","isClearable","inputref","showFormattingHelp","onKeyDown","noIndent","showMinimalPreview","acceptAdvanceContent","ref","mode","setMode","useState","isPreviewOpen","setIsPreviewOpen","textareaRef","useRef","inputId","charCount","insertMarkdown","before","after","textarea","start","end","selectedText","textToInsert","newValue","newCursorPos","insertList","prefix","lines","currentPos","startLine","endLine","i","newLines","line","index","handleKeyDownInternal","e","handleClear","rows","lineCount","content","cn","InputLabel","Tooltip","Fragment","Typography","Button","FormatBold","FormatItalic","FormatUnderlined","FormatListNumbered","FormatListBulleted","OpenInFull","Tabs","tab","Edit","VisibilityOutlined","node","MarkdownPreview","Modal","AnimatePresence","motion"],"mappings":"mjBA6FMA,GAAqD,CAAC,OAAQ,SAAS,EAKvEC,GAAY,CAAC,CAAE,UAAAC,EAAW,KAAAC,EAAO,MACtCC,EAAAA,KAAC,MAAA,CACA,MAAOD,EACP,OAAQA,EACR,QAAQ,YACR,KAAK,OACL,OAAO,eACP,YAAY,IACZ,cAAc,QACd,eAAe,QACf,UAAAD,EAEA,SAAA,CAAAG,EAAAA,IAAC,OAAA,CAAK,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAA,CAAK,EACpCA,EAAAA,IAAC,QAAK,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,IA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EAGD2B,GAAcvB,EAAAA,IAAC,MAAA,CAAI,UAAU,oBAAqB,SAAAuB,CAAA,CAAW,CAAA,CAAA,CAC/D,CAAA,CAAA,CAEF,EAEAvB,EAAAA,IAAC,MAAA,CAAI,UAAU,oDACd,SAAAA,EAAAA,IAACoF,EAAAA,gBAAA,CACA,QAAShF,EACT,WAAAe,EACA,UAAWP,EACX,SAAAgB,EACA,mBAAAC,EACA,qBAAAC,CAAA,CAAA,EAEF,CAAA,CAEF,CAAA,EACD,EAGA9B,EAAAA,IAACqF,GAAAA,MAAA,CACA,KAAMlD,GACN,SAAU,IAAMC,EAAiB,EAAK,EACtC,MAAM,mBACN,MAAO,IACP,OAAQ,KAER,SAAApC,EAAAA,IAAC,MAAA,CAAI,UAAU,gDACd,SAAAA,EAAAA,IAACoF,EAAAA,gBAAA,CACA,QAAShF,EACT,WAAAe,EACA,UAAWP,EACX,SAAAgB,EACA,mBAAAC,EACA,qBAAAC,CAAA,CAAA,CACD,CACD,CAAA,CAAA,EAGD9B,EAAAA,IAACsF,EAAAA,iBACC,SAAAlE,GACApB,EAAAA,IAACuF,EAAAA,OAAO,IAAP,CACA,QAAS,CAAE,QAAS,EAAG,EAAG,GAAA,EAC1B,QAAS,CAAE,QAAS,EAAG,EAAG,CAAA,EAC1B,KAAM,CAAE,QAAS,EAAG,EAAG,GAAA,EACvB,WAAY,CAAE,SAAU,EAAA,EAExB,SAAAvF,EAAAA,IAACuE,EAAAA,WAAA,CACA,UAAU,sBACV,WAAW,SACX,KAAK,cACL,QAAQ,SAEP,SAAAnD,CAAA,CAAA,CACF,CAAA,CACD,CAEF,CAAA,EACD,EAGD,OAAOC,EACNrB,MAACqE,EAAA,CAAQ,MAAOhD,EACd,WACF,EAEA6C,CAEF,CACD,EAEAjE,EAAkB,YAAc"}
|
|
1
|
+
{"version":3,"file":"RichMarkdownInput.cjs.js","sources":["../../../../src/components/forms/md-input/RichMarkdownInput.tsx"],"sourcesContent":["import cn from \"classnames\";\nimport { forwardRef, useRef, useState } from \"react\";\nimport {\n\tFormatBold,\n\tFormatItalic,\n\tFormatUnderlined,\n\tFormatListBulleted,\n\tFormatListNumbered,\n\tOpenInFull,\n\tEdit,\n\tVisibilityOutlined,\n} from \"@mui/icons-material\";\nimport { Modal } from \"../../data-display/modal/Modal\";\nimport Button from \"../../button/Button\";\nimport { Tabs } from \"../../navigation/tabs/Tabs\";\nimport { MarkdownPreview } from \"./MarkdownPreview\";\nimport Tooltip from \"../../tooltip/Tooltip\";\nimport { AnimatePresence, motion } from \"framer-motion\";\nimport { Typography } from \"../../data-display/typography/Typography\";\nimport { InputLabel } from \"../shared/InputLabel\";\n\n/**\n * Props for the RichMarkdownInput component\n */\nexport interface RichMarkdownInputProps {\n\t/** Unique identifier for the markdown input */\n\tid?: string;\n\t/** Current markdown value */\n\tvalue?: string;\n\t/** Default value for the input */\n\tdefaultValue?: string;\n\t/** Placeholder text for the textarea */\n\tplaceholder?: string;\n\t/** Minimum number of visible text lines */\n\tminRows?: number;\n\t/** Maximum number of visible text lines */\n\tmaxRows?: number;\n\t/** Whether the input is disabled */\n\tisDisabled?: boolean;\n\t/** Additional CSS classes for the wrapper container */\n\tclassName?: string;\n\t/** Additional CSS classes for the textarea */\n\ttextareaClassName?: string;\n\t/** Additional CSS classes for the preview container */\n\tpreviewClassName?: string;\n\t/** Label text to display above the input */\n\tlabel?: string;\n\t/** Additional CSS classes for the label */\n\tlabelClassName?: string;\n\t/** Whether the field is required and the required indicator shows as conditional */\n\tisRequiredConditional?: boolean;\n\t/** Whether the field is required */\n\trequired?: boolean;\n\t/** Whether to show the preview button */\n\tshowPreviewOnModal?: boolean;\n\t/** Maximum character count */\n\tmaxLength?: number;\n\t/** Link target behavior: '_blank' for new tab, '_self' for current tab */\n\tlinkTarget?: '_blank' | '_self';\n\t/** Error message to display */\n\terrorMessage?: string;\n\t/** Tooltip text */\n\ttooltip?: string;\n\t/** Whether to preserve original case (no auto-lowercase) */\n\toriginalCase?: boolean;\n\t/** Icon to display at the end of the input */\n\tsuffixIcon?: React.ReactNode;\n\t/** Whether the input is clearable */\n\tisClearable?: boolean;\n\t/** Ref for the input element */\n\tinputref?: React.RefObject<HTMLTextAreaElement>;\n\t/** Whether to show the formatting help tooltip */\n\tshowFormattingHelp?: boolean;\n\t/** Keyboard event handler */\n\tonKeyDown?: (e: React.KeyboardEvent<HTMLTextAreaElement>) => void;\n\t/** Whether to remove indentation from lists and align all content to the left in preview */\n\tnoIndent?: boolean;\n\t/** Whether to display all content with uniform font size/weight (paragraph-like) while keeping formatting */\n\tshowMinimalPreview?: boolean;\n\t/** Whether to accept and render advanced content (code blocks, blockquotes, tables, images) in preview */\n\tacceptAdvanceContent?: boolean;\n\t/** Callback function called when the markdown value changes */\n\tonChange: (value: string) => void;\n}\n\n/**\n * The type of view for the rich markdown input\n */\ntype RichMarkdownInputViewType = \"edit\" | \"preview\";\n\n/**\n * The tabs for the rich markdown input\n */\nconst RichMarkdownInputTabs: RichMarkdownInputViewType[] = [\"edit\", \"preview\"];\n\n/**\n * Close icon for clearable input\n */\nconst CloseIcon = ({ className, size = 16 }: { className?: string; size?: number }) => (\n\t<svg\n\t\twidth={size}\n\t\theight={size}\n\t\tviewBox=\"0 0 24 24\"\n\t\tfill=\"none\"\n\t\tstroke=\"currentColor\"\n\t\tstrokeWidth=\"2\"\n\t\tstrokeLinecap=\"round\"\n\t\tstrokeLinejoin=\"round\"\n\t\tclassName={className}\n\t>\n\t\t<line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n\t\t<line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n\t</svg>\n);\n\n/**\n * A rich markdown input component with comprehensive formatting toolbar.\n * \n * **Text Formatting:**\n * - Bold (Ctrl+B) - Always visible\n * - Italic (Ctrl+I) - Always visible\n * - Underline (Ctrl+U) - Always visible\n * \n * **Lists:**\n * - Bullet lists - Always visible\n * - Numbered lists - Always visible\n * \n * **Features:**\n * - Edit/Preview toggle with icons\n * - Character counter (optional)\n * - Preview modal with scrolling\n * - Keyboard shortcuts\n * - Syntax highlighting for code blocks\n * - Responsive toolbar\n * - Dark mode support\n * - Configurable link target behavior\n * - Error message display\n * - Tooltip support\n * - Clear button (optional)\n * - Suffix icon support\n * - Custom keyboard handlers\n * - Minimal preview mode (uniform typography)\n * - Toggle advanced content in preview\n *\n * @example\n * ```tsx\n * <RichMarkdownInput\n * value={markdown}\n * onChange={setMarkdown}\n * placeholder=\"Enter description...\"\n * label=\"Description\"\n * maxLength={300}\n * linkTarget=\"_blank\"\n * isClearable\n * errorMessage=\"Invalid input\"\n * tooltip=\"Use markdown formatting\"\n * showMinimalPreview={false}\n * acceptAdvanceContent={true}\n * />\n * ```\n */\nexport const RichMarkdownInput = forwardRef<\n\tHTMLTextAreaElement,\n\tRichMarkdownInputProps\n>(\n\t(\n\t\t{\n\t\t\tid,\n\t\t\tvalue = \"\",\n\t\t\tdefaultValue,\n\t\t\tonChange,\n\t\t\tplaceholder = \"Enter markdown content...\",\n\t\t\tminRows = 4,\n\t\t\tmaxRows = 20,\n\t\t\tisDisabled = false,\n\t\t\tclassName,\n\t\t\ttextareaClassName,\n\t\t\tpreviewClassName,\n\t\t\tlabel,\n\t\t\tlabelClassName,\n\t\t\tisRequiredConditional,\n\t\t\trequired = false,\n\t\t\tshowPreviewOnModal = false,\n\t\t\tmaxLength,\n\t\t\tlinkTarget = '_blank',\n\t\t\terrorMessage,\n\t\t\ttooltip,\n\t\t\toriginalCase,\n\t\t\tsuffixIcon,\n\t\t\tisClearable,\n\t\t\tinputref,\n\t\t\tshowFormattingHelp = true,\n\t\t\tonKeyDown,\n\t\t\tnoIndent = false,\n\t\t\tshowMinimalPreview = false,\n\t\t\tacceptAdvanceContent = true,\n\t\t},\n\t\tref\n\t) => {\n\t\tconst [mode, setMode] = useState<RichMarkdownInputViewType>(\"edit\");\n\t\tconst [isPreviewOpen, setIsPreviewOpen] = useState(false);\n\t\tconst textareaRef = useRef<HTMLTextAreaElement>(null);\n\t\tconst inputId = id || `rich-md-input-${Math.random().toString(36).slice(2, 11)}`;\n\n\t\tconst charCount = value.length;\n\n\t\t/**\n\t\t * Insert markdown syntax at cursor position\n\t\t */\n\t\tconst insertMarkdown = (before: string, after: string = \"\", placeholder: string = \"\") => {\n\t\t\tconst textarea = (ref as React.RefObject<HTMLTextAreaElement>)?.current || textareaRef.current;\n\t\t\tif (!textarea) return;\n\n\t\t\tconst start = textarea.selectionStart;\n\t\t\tconst end = textarea.selectionEnd;\n\t\t\tconst selectedText = value.substring(start, end);\n\t\t\tconst textToInsert = selectedText || placeholder;\n\n\t\t\tconst newValue = value.substring(0, start) + before + textToInsert + after + value.substring(end);\n\t\t\tonChange(newValue);\n\n\t\t\t// Set cursor position after insertion\n\t\t\tsetTimeout(() => {\n\t\t\t\tconst newCursorPos = start + before.length + (selectedText ? selectedText.length : 0);\n\t\t\t\ttextarea.focus();\n\t\t\t\ttextarea.setSelectionRange(newCursorPos, newCursorPos + (selectedText ? 0 : placeholder.length));\n\t\t\t}, 0);\n\t\t};\n\n\t\t/**\n\t\t * Insert list item at cursor position\n\t\t */\n\t\tconst insertList = (prefix: string) => {\n\t\t\tconst textarea = (ref as React.RefObject<HTMLTextAreaElement>)?.current || textareaRef.current;\n\t\t\tif (!textarea) return;\n\n\t\t\tconst start = textarea.selectionStart;\n\t\t\tconst end = textarea.selectionEnd;\n\t\t\tconst lines = value.split('\\n');\n\n\t\t\t// Find which line(s) are selected\n\t\t\tlet currentPos = 0;\n\t\t\tlet startLine = 0;\n\t\t\tlet endLine = 0;\n\n\t\t\tfor (let i = 0; i < lines.length; i++) {\n\t\t\t\tif (currentPos <= start && start <= currentPos + lines[i].length + 1) {\n\t\t\t\t\tstartLine = i;\n\t\t\t\t}\n\t\t\t\tif (currentPos <= end && end <= currentPos + lines[i].length + 1) {\n\t\t\t\t\tendLine = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcurrentPos += lines[i].length + 1;\n\t\t\t}\n\n\t\t\t// Add list markers to selected lines\n\t\t\tconst newLines = lines.map((line, index) => {\n\t\t\t\tif (index >= startLine && index <= endLine) {\n\t\t\t\t\tif (line.trim() === '') return line;\n\t\t\t\t\t// Check if line already has a list marker\n\t\t\t\t\tif (prefix === '- ' && line.trim().startsWith('- ')) {\n\t\t\t\t\t\treturn line.replace(/^\\s*-\\s+/, '');\n\t\t\t\t\t}\n\t\t\t\t\tif (prefix.match(/^\\d+\\.\\s/) && line.trim().match(/^\\d+\\.\\s/)) {\n\t\t\t\t\t\treturn line.replace(/^\\s*\\d+\\.\\s+/, '');\n\t\t\t\t\t}\n\t\t\t\t\treturn prefix + line.trim();\n\t\t\t\t}\n\t\t\t\treturn line;\n\t\t\t});\n\n\t\t\tonChange(newLines.join('\\n'));\n\n\t\t\tsetTimeout(() => {\n\t\t\t\ttextarea.focus();\n\t\t\t}, 0);\n\t\t};\n\n\t\t/**\n\t\t * Handle keyboard shortcuts\n\t\t */\n\t\tconst handleKeyDownInternal = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {\n\t\t\t// Call external handler first\n\t\t\tonKeyDown?.(e);\n\n\t\t\tif (e.metaKey || e.ctrlKey) {\n\t\t\t\tswitch (e.key.toLowerCase()) {\n\t\t\t\t\tcase 'b':\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tinsertMarkdown('**', '**', 'bold text');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'i':\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tinsertMarkdown('*', '*', 'italic text');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'u':\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tinsertMarkdown('<u>', '</u>', 'underlined text');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'k':\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tinsertMarkdown('[', '](url)', 'link text');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'e':\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tinsertMarkdown('```', '```', 'code');\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Handle clear button click\n\t\t */\n\t\tconst handleClear = () => {\n\t\t\tonChange('');\n\t\t\tconst textarea = (ref as React.RefObject<HTMLTextAreaElement>)?.current || textareaRef.current;\n\t\t\ttextarea?.focus();\n\t\t};\n\n\t\t/**\n\t\t * Calculate dynamic rows based on content\n\t\t */\n\t\tconst calculateRows = () => {\n\t\t\tconst lineCount = (value.match(/\\n/g) || []).length + 1;\n\t\t\treturn Math.min(maxRows, Math.max(minRows, lineCount));\n\t\t};\n\n\t\tconst rows = calculateRows();\n\n\t\tconst content = (\n\t\t\t<div className={cn(\"flex flex-col\", className)}>\n\t\t\t\t<div className={`flex flex-row items-center ${label ? \"justify-between\" : \"justify-end\"} w-full`}>\n\t\t\t\t\t{/* Label */}\n\t\t\t\t\t{label && (\n\t\t\t\t\t\t<label\n\t\t\t\t\t\t\tid={inputId}\n\t\t\t\t\t\t\thtmlFor={inputId}\n\t\t\t\t\t\t\tclassName={`mb-1 text-xs font-medium text-gray-600 inline-flex items-center gap-1 ${!originalCase ? \"capitalize\" : \"\"\n\t\t\t\t\t\t\t\t} ${labelClassName || \"!uppercse\"}`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div className=\"flex flex-wrap items-center justify-between w-full\">\n\t\t\t\t\t\t\t\t<div className=\"inline-flex flex-wrap items-center gap-1\">\n\t\t\t\t\t\t\t\t\t<InputLabel label={label || \"\"} required={required || false} isRequiredConditional={isRequiredConditional || false} />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</label>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{/* Markdown Formatting Info */}\n\t\t\t\t\t{showFormattingHelp && (\n\t\t\t\t\t\t<Tooltip\n\t\t\t\t\t\t\tplacement=\"bottom-end\"\n\t\t\t\t\t\t\ttitle={\n\t\t\t\t\t\t\t\t<div className=\"flex flex-col items-start justify-center py-2 px-3 min-w-[220px] gap-2 bg-neutral-900 rounded-lg\">\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col items-start justify-start gap-1 w-full\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row items-start gap-1 ml-1\">\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-[18px] leading-4\">•</span>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-neutral-300 text-xs font-medium leading-4 font-inter\">**bold**</span>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-xs font-medium leading-4 font-inter\">\n\t\t\t\t\t\t\t\t\t\t\t\t→ <strong>bold</strong> text\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row items-start gap-1 ml-1\">\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-[18px] leading-4\">•</span>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-neutral-300 text-xs font-medium leading-4 font-inter\">*italic*</span>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-xs font-medium leading-4 font-inter\">\n\t\t\t\t\t\t\t\t\t\t\t\t→ <em>italic</em> text\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row items-start gap-1 ml-1\">\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-[18px] leading-4\">•</span>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-neutral-300 text-xs font-medium leading-4 font-inter\">`code`</span>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-xs font-medium leading-4 font-inter\">\n\t\t\t\t\t\t\t\t\t\t\t\t→ <code>inline code</code>\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row items-start gap-1 ml-1\">\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-[18px] leading-4\">•</span>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-neutral-300 text-xs font-medium leading-4 font-inter\"><u>text</u></span>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-xs font-medium leading-4 font-inter\">\n\t\t\t\t\t\t\t\t\t\t\t\t→ <u>underline</u>\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row items-start gap-1 ml-1\">\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-[18px] leading-4\">•</span>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-neutral-300 text-xs font-medium leading-4 font-inter\">~~strike~~</span>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-xs font-medium leading-4 font-inter\">\n\t\t\t\t\t\t\t\t\t\t\t\t→ <del>strike</del>\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row items-start gap-1 ml-1\">\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-[18px] leading-4\">•</span>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-neutral-300 text-xs font-medium leading-4 font-inter\">- item</span>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-xs font-medium leading-4 font-inter\">\n\t\t\t\t\t\t\t\t\t\t\t\t→ bullet list\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row items-start gap-1 ml-1\">\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-[18px] leading-4\">•</span>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-neutral-300 text-xs font-medium leading-4 font-inter\">1. item</span>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-xs font-medium leading-4 font-inter\">\n\t\t\t\t\t\t\t\t\t\t\t\t→ numbered list\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t{acceptAdvanceContent && (\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row items-start gap-1 ml-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-[18px] leading-4\">•</span>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-neutral-300 text-xs font-medium leading-4 font-inter\">## heading</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-xs font-medium leading-4 font-inter\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t→ heading 2\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row items-start gap-1 ml-1\">\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-[18px] leading-4\">•</span>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-neutral-300 text-xs font-medium leading-4 font-inter\">[link](url)</span>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-xs font-medium leading-4 font-inter\">\n\t\t\t\t\t\t\t\t\t\t\t\t→ hyperlink\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t{acceptAdvanceContent && (\n\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col items-start justify-start gap-1 w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row items-start gap-1 ml-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-[18px] leading-4\">•</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row justify-center items-center px-[3px] bg-neutral-700 rounded-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-neutral-300 text-xs font-medium leading-4 font-inter\">> quote</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-xs font-medium leading-4 font-inter\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t→ blockquote\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col items-start justify-start gap-0.5 w-full mt-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row items-center gap-1 ml-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-[18px] leading-4\">•</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-white text-xs font-medium leading-4 font-inter\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tTable:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col px-1 py-0.5 bg-neutral-700 ml-2 rounded-sm gap-0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-neutral-300 text-xs font-medium leading-4 font-inter whitespace-nowrap\">| Header 1 | Header 2 | Header 3 |</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-neutral-300 text-xs font-medium leading-4 font-inter whitespace-nowrap\">| :--- | :---: | ---: |</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-neutral-300 text-xs font-medium leading-4 font-inter whitespace-nowrap\">| Left | Center | Right |</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Typography className=\"mb-2 text-xs font-medium text-primary-700 inline-flex items-center gap-1 cursor-pointer\">\n\t\t\t\t\t\t\t\tFormatting help ?\n\t\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\n\t\t\t\t{/* Main Container */}\n\t\t\t\t<div className={cn(\n\t\t\t\t\t\"flex flex-col border shadow-[0px_1px_2px_rgba(0,0,0,0.05)] rounded-lg bg-white dark:bg-black-700 w-full\",\n\t\t\t\t\terrorMessage\n\t\t\t\t\t\t? \"border-red-300 focus-within:border-red-500 focus-within:shadow-[0_0_0_1.5px_var(--color-red-200)]\"\n\t\t\t\t\t\t: \"border-[#EAECF0] dark:border-black-600 focus-within:border-primary-600 dark:focus-within:border-primary-400 focus-within:shadow-[0_0_0_1.5px_var(--color-primary-100)] dark:focus-within:shadow-[0_0_0_1.5px_var(--color-primary-950)]\"\n\t\t\t\t)}>\n\t\t\t\t\t{/* Toolbar */}\n\t\t\t\t\t<div className={cn(\n\t\t\t\t\t\t\"flex flex-row justify-between items-center px-3 py-2 gap-2 h-11 rounded-t-lg bg-[#F9FAFB] dark:bg-black-600 border-b border-[#EAECF0] dark:border-black-600\"\n\t\t\t\t\t)}>\n\t\t\t\t\t\t{/* Left: Formatting Buttons */}\n\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tid={`${inputId}-bold`}\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tonClick={() => insertMarkdown('**', '**', 'bold text')}\n\t\t\t\t\t\t\t\tdisabled={isDisabled || mode === \"preview\"}\n\t\t\t\t\t\t\t\tclassName=\"!p-0.5 !min-w-0 !h-auto !rounded-md hover:!bg-neutral-200 dark:hover:!bg-black-500 hover:!scale-110 !transition-all !duration-200\"\n\t\t\t\t\t\t\t\tappearance=\"ghost\"\n\t\t\t\t\t\t\t\tstatus=\"no-background\"\n\t\t\t\t\t\t\t\ttitle=\"Bold (Ctrl+B)\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<FormatBold sx={{ fontSize: 20, color: '#667085' }} className=\"dark:text-neutral-400\" />\n\t\t\t\t\t\t\t</Button>\n\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tid={`${inputId}-italic`}\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tonClick={() => insertMarkdown('*', '*', 'italic text')}\n\t\t\t\t\t\t\t\tdisabled={isDisabled || mode === \"preview\"}\n\t\t\t\t\t\t\t\tclassName=\"!p-0.5 !min-w-0 !h-auto !rounded-md hover:!bg-neutral-200 dark:hover:!bg-black-500 hover:!scale-110 !transition-all !duration-200\"\n\t\t\t\t\t\t\t\tappearance=\"ghost\"\n\t\t\t\t\t\t\t\tstatus=\"no-background\"\n\t\t\t\t\t\t\t\ttitle=\"Italic (Ctrl+I)\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<FormatItalic sx={{ fontSize: 20, color: '#667085' }} className=\"dark:text-neutral-400\" />\n\t\t\t\t\t\t\t</Button>\n\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tid={`${inputId}-underline`}\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tonClick={() => insertMarkdown('<u>', '</u>', 'underlined text')}\n\t\t\t\t\t\t\t\tdisabled={isDisabled || mode === \"preview\"}\n\t\t\t\t\t\t\t\tclassName=\"!p-0.5 !min-w-0 !h-auto !rounded-md hover:!bg-neutral-200 dark:hover:!bg-black-500 hover:!scale-110 !transition-all !duration-200\"\n\t\t\t\t\t\t\t\tappearance=\"ghost\"\n\t\t\t\t\t\t\t\tstatus=\"no-background\"\n\t\t\t\t\t\t\t\ttitle=\"Underline (Ctrl+U)\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<FormatUnderlined sx={{ fontSize: 20, color: '#667085' }} className=\"dark:text-neutral-400\" />\n\t\t\t\t\t\t\t</Button>\n\n\t\t\t\t\t\t\t<div className=\"w-px h-5 bg-[#EAECF0] dark:bg-black-500 rounded-full\" />\n\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tid={`${inputId}-numbered-list`}\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tonClick={() => insertList('1. ')}\n\t\t\t\t\t\t\t\tdisabled={isDisabled || mode === \"preview\"}\n\t\t\t\t\t\t\t\tclassName=\"!p-0.5 !min-w-0 !h-auto !rounded-md hover:!bg-neutral-200 dark:hover:!bg-black-500 hover:!scale-110 !transition-all !duration-200\"\n\t\t\t\t\t\t\t\tappearance=\"ghost\"\n\t\t\t\t\t\t\t\tstatus=\"no-background\"\n\t\t\t\t\t\t\t\ttitle=\"Numbered List\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<FormatListNumbered sx={{ fontSize: 20, color: '#667085' }} className=\"dark:text-neutral-400\" />\n\t\t\t\t\t\t\t</Button>\n\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tid={`${inputId}-bullet-list`}\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tonClick={() => insertList('- ')}\n\t\t\t\t\t\t\t\tdisabled={isDisabled || mode === \"preview\"}\n\t\t\t\t\t\t\t\tclassName=\"!p-0.5 !min-w-0 !h-auto !rounded-md hover:!bg-neutral-200 dark:hover:!bg-black-500 hover:!scale-110 !transition-all !duration-200\"\n\t\t\t\t\t\t\t\tappearance=\"ghost\"\n\t\t\t\t\t\t\t\tstatus=\"no-background\"\n\t\t\t\t\t\t\t\ttitle=\"Bullet List\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<FormatListBulleted sx={{ fontSize: 20, color: '#667085' }} className=\"dark:text-neutral-400\" />\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t{/* Center: Character Count */}\n\t\t\t\t\t\t\t{maxLength && (\n\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-3\">\n\t\t\t\t\t\t\t\t\t<span className=\"text-sm font-medium text-[#475467] dark:text-neutral-400\">\n\t\t\t\t\t\t\t\t\t\t{charCount}/{maxLength}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t<div className=\"w-px h-6 bg-[#EAECF0] dark:bg-black-500 rounded-full\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t{/* Right: Edit/Preview Toggle */}\n\t\t\t\t\t\t\t{showPreviewOnModal ? (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tid={`${inputId}-expand`}\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\tonClick={() => setIsPreviewOpen(true)}\n\t\t\t\t\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t\t\t\t\t\tclassName=\"!p-0.5 !min-w-0 !h-auto ml-1 !rounded-md hover:!bg-neutral-200 dark:hover:!bg-black-500 hover:!scale-110 !transition-all !duration-200\"\n\t\t\t\t\t\t\t\t\tappearance=\"ghost\"\n\t\t\t\t\t\t\t\t\tstatus=\"no-background\"\n\t\t\t\t\t\t\t\t\ttitle=\"Expand Preview\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<OpenInFull sx={{ fontSize: 16, color: '#667085' }} className=\"dark:text-neutral-400\" />\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<Tabs<RichMarkdownInputViewType>\n\t\t\t\t\t\t\t\t\tvariant=\"switch\"\n\t\t\t\t\t\t\t\t\ttabs={RichMarkdownInputTabs}\n\t\t\t\t\t\t\t\t\tactiveTab={mode}\n\t\t\t\t\t\t\t\t\tonTabClick={(tab) => setMode(tab)}\n\t\t\t\t\t\t\t\t\theight=\"h-5\"\n\t\t\t\t\t\t\t\t\ticonsOnly\n\t\t\t\t\t\t\t\t\ttabIcons={{\n\t\t\t\t\t\t\t\t\t\tedit: (<Edit sx={{ fontSize: 16, color: '#667085' }} className=\"dark:text-neutral-400\" />),\n\t\t\t\t\t\t\t\t\t\tpreview: (\n\t\t\t\t\t\t\t\t\t\t\t<VisibilityOutlined sx={{ fontSize: 16, color: '#667085' }} className=\"dark:text-neutral-400\" />\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tclassName=\"rounded-lg\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{/* Content Area */}\n\t\t\t\t\t<div className=\"px-3 py-2 relative\">\n\t\t\t\t\t\t{mode === \"edit\" ? (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<textarea\n\t\t\t\t\t\t\t\t\tref={(node) => {\n\t\t\t\t\t\t\t\t\t\t// Handle all refs: forwarded ref, internal ref, and inputref\n\t\t\t\t\t\t\t\t\t\tif (typeof ref === 'function') {\n\t\t\t\t\t\t\t\t\t\t\tref(node);\n\t\t\t\t\t\t\t\t\t\t} else if (ref) {\n\t\t\t\t\t\t\t\t\t\t\t(ref as React.MutableRefObject<HTMLTextAreaElement | null>).current = node;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t(textareaRef as React.MutableRefObject<HTMLTextAreaElement | null>).current = node;\n\t\t\t\t\t\t\t\t\t\tif (inputref) {\n\t\t\t\t\t\t\t\t\t\t\t(inputref as React.MutableRefObject<HTMLTextAreaElement | null>).current = node;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tid={inputId}\n\t\t\t\t\t\t\t\t\tvalue={value}\n\t\t\t\t\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t\tconst newValue = originalCase ? e.target.value : e.target.value;\n\t\t\t\t\t\t\t\t\t\tif (!maxLength || newValue.length <= maxLength) {\n\t\t\t\t\t\t\t\t\t\t\tonChange(newValue);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tonKeyDown={handleKeyDownInternal}\n\t\t\t\t\t\t\t\t\tplaceholder={placeholder}\n\t\t\t\t\t\t\t\t\trows={rows}\n\t\t\t\t\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\t\t\t\tmaxLength={maxLength}\n\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t// Base styles\n\t\t\t\t\t\t\t\t\t\t\"w-full bg-transparent !focus:ring-0 !focus:border-none\",\n\t\t\t\t\t\t\t\t\t\t\"font-inter font-medium text-sm leading-5\",\n\t\t\t\t\t\t\t\t\t\t\"text-[#101828] dark:text-neutral-100\",\n\t\t\t\t\t\t\t\t\t\t\"placeholder:text-neutral-400 dark:placeholder:text-neutral-500\",\n\t\t\t\t\t\t\t\t\t\t\"focus:outline-none resize-none\",\n\t\t\t\t\t\t\t\t\t\t// Hide scrollbar\n\t\t\t\t\t\t\t\t\t\t\"scrollbar-none\",\n\t\t\t\t\t\t\t\t\t\t\"[&::-webkit-scrollbar]:hidden\",\n\t\t\t\t\t\t\t\t\t\t\"[-ms-overflow-style:none]\",\n\t\t\t\t\t\t\t\t\t\t\"[scrollbar-width:none]\",\n\t\t\t\t\t\t\t\t\t\t// Disabled state\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\"text-neutral-400 dark:text-neutral-500 cursor-not-allowed\": isDisabled,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t// Add padding if suffix icons exist\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\"pr-20\": isClearable || suffixIcon,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\ttextareaClassName\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t{/* Suffix Icons */}\n\t\t\t\t\t\t\t\t{(isClearable || suffixIcon) && mode === \"edit\" && (\n\t\t\t\t\t\t\t\t\t<div className=\"absolute right-1 top-2 flex items-center gap-1\">\n\t\t\t\t\t\t\t\t\t\t{isClearable && value && (\n\t\t\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\t\t\tid={`btn-input-field-clear-${id}`}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"absolute inset-y-0 flex items-center cursor-pointer top-2 right-1 focus:outline-none\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={handleClear}\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<CloseIcon\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-neutral-300 dark:text-black-500 hover:text-neutral-400 dark:hover:text-black-400 transition-colors\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tsize={16}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t{suffixIcon && <div className=\"flex items-center\">{suffixIcon}</div>}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<div className=\"w-full min-h-[92px] max-h-[400px] overflow-y-auto\">\n\t\t\t\t\t\t\t\t<MarkdownPreview\n\t\t\t\t\t\t\t\t\tcontent={value}\n\t\t\t\t\t\t\t\t\tlinkTarget={linkTarget}\n\t\t\t\t\t\t\t\t\tclassName={previewClassName}\n\t\t\t\t\t\t\t\t\tnoIndent={noIndent}\n\t\t\t\t\t\t\t\t\tshowMinimalPreview={showMinimalPreview}\n\t\t\t\t\t\t\t\t\tacceptAdvanceContent={acceptAdvanceContent}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t{/* Expanded Preview Modal */}\n\t\t\t\t<Modal\n\t\t\t\t\topen={isPreviewOpen}\n\t\t\t\t\tonCancel={() => setIsPreviewOpen(false)}\n\t\t\t\t\ttitle=\"Markdown Preview\"\n\t\t\t\t\twidth={900}\n\t\t\t\t\tfooter={null}\n\t\t\t\t>\n\t\t\t\t\t<div className=\"max-h-[calc(100vh-200px)] overflow-y-auto p-4\">\n\t\t\t\t\t\t<MarkdownPreview\n\t\t\t\t\t\t\tcontent={value}\n\t\t\t\t\t\t\tlinkTarget={linkTarget}\n\t\t\t\t\t\t\tclassName={previewClassName}\n\t\t\t\t\t\t\tnoIndent={noIndent}\n\t\t\t\t\t\t\tshowMinimalPreview={showMinimalPreview}\n\t\t\t\t\t\t\tacceptAdvanceContent={acceptAdvanceContent}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</Modal>\n\n\t\t\t\t<AnimatePresence>\n\t\t\t\t\t{errorMessage && (\n\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\tinitial={{ opacity: 0, y: -10 }}\n\t\t\t\t\t\t\tanimate={{ opacity: 1, y: 0 }}\n\t\t\t\t\t\t\texit={{ opacity: 0, y: -10 }}\n\t\t\t\t\t\t\ttransition={{ duration: 0.2 }}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Typography\n\t\t\t\t\t\t\t\tclassName=\"mt-1 text-error-500\"\n\t\t\t\t\t\t\t\tappearance=\"custom\"\n\t\t\t\t\t\t\t\tsize=\"extra-small\"\n\t\t\t\t\t\t\t\tvariant=\"medium\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{errorMessage}\n\t\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t)}\n\t\t\t\t</AnimatePresence>\n\t\t\t</div>\n\t\t);\n\n\t\treturn tooltip ? (\n\t\t\t<Tooltip title={tooltip}>\n\t\t\t\t{content}\n\t\t\t</Tooltip>\n\t\t) : (\n\t\t\tcontent\n\t\t);\n\t}\n);\n\nRichMarkdownInput.displayName = \"RichMarkdownInput\";\n"],"names":["RichMarkdownInputTabs","CloseIcon","className","size","jsxs","jsx","RichMarkdownInput","forwardRef","id","value","defaultValue","onChange","placeholder","minRows","maxRows","isDisabled","textareaClassName","previewClassName","label","labelClassName","isRequiredConditional","required","showPreviewOnModal","maxLength","linkTarget","errorMessage","tooltip","originalCase","suffixIcon","isClearable","inputref","showFormattingHelp","onKeyDown","noIndent","showMinimalPreview","acceptAdvanceContent","ref","mode","setMode","useState","isPreviewOpen","setIsPreviewOpen","textareaRef","useRef","inputId","charCount","insertMarkdown","before","after","textarea","start","end","selectedText","textToInsert","newValue","newCursorPos","insertList","prefix","lines","currentPos","startLine","endLine","i","newLines","line","index","handleKeyDownInternal","e","handleClear","rows","lineCount","content","cn","InputLabel","Tooltip","Fragment","Typography","Button","FormatBold","FormatItalic","FormatUnderlined","FormatListNumbered","FormatListBulleted","OpenInFull","Tabs","tab","Edit","VisibilityOutlined","node","MarkdownPreview","Modal","AnimatePresence","motion"],"mappings":"mjBA6FMA,GAAqD,CAAC,OAAQ,SAAS,EAKvEC,GAAY,CAAC,CAAE,UAAAC,EAAW,KAAAC,EAAO,MACtCC,EAAAA,KAAC,MAAA,CACA,MAAOD,EACP,OAAQA,EACR,QAAQ,YACR,KAAK,OACL,OAAO,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