@mittwald/flow-react-components 0.2.0-alpha.534 → 0.2.0-alpha.536
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/CHANGELOG.md +12 -0
- package/dist/assets/doc-properties.json +266 -6
- package/dist/css/all.css +1 -1
- package/dist/js/components/src/components/MarkdownEditor/MarkdownEditor.mjs +2 -2
- package/dist/js/components/src/components/MarkdownEditor/MarkdownEditor.mjs.map +1 -1
- package/dist/js/components/src/components/Modal/Modal.mjs +4 -2
- package/dist/js/components/src/components/Modal/Modal.mjs.map +1 -1
- package/dist/js/components/src/components/Modal/components/OffCanvasSuspenseFallback/OffCanvasSuspenseFallback.mjs +120 -0
- package/dist/js/components/src/components/Modal/components/OffCanvasSuspenseFallback/OffCanvasSuspenseFallback.mjs.map +1 -0
- package/dist/js/components/src/components/Overlay/Overlay.mjs +2 -1
- package/dist/js/components/src/components/Overlay/Overlay.mjs.map +1 -1
- package/dist/js/components/src/components/Overlay/components/OverlayContent.mjs +14 -9
- package/dist/js/components/src/components/Overlay/components/OverlayContent.mjs.map +1 -1
- package/dist/js/components/src/components/Overlay/components/OverlaySuspenseFallback.mjs +119 -0
- package/dist/js/components/src/components/Overlay/components/OverlaySuspenseFallback.mjs.map +1 -0
- package/dist/js/components/src/components/TextArea/TextArea.mjs +45 -4
- package/dist/js/components/src/components/TextArea/TextArea.mjs.map +1 -1
- package/dist/js/components/src/components/TextArea/TextArea.module.scss.mjs +8 -2
- package/dist/js/components/src/components/TextArea/TextArea.module.scss.mjs.map +1 -1
- package/dist/js/components/src/views/FlexView.mjs +15 -0
- package/dist/js/components/src/views/FlexView.mjs.map +1 -0
- package/dist/js/flr-universal.mjs +3 -3
- package/dist/types/components/MarkdownEditor/stories/Default.stories.d.ts +4 -0
- package/dist/types/components/MarkdownEditor/stories/Default.stories.d.ts.map +1 -1
- package/dist/types/components/Modal/Modal.d.ts.map +1 -1
- package/dist/types/components/Modal/components/OffCanvasSuspenseFallback/OffCanvasSuspenseFallback.d.ts +3 -0
- package/dist/types/components/Modal/components/OffCanvasSuspenseFallback/OffCanvasSuspenseFallback.d.ts.map +1 -0
- package/dist/types/components/Modal/components/OffCanvasSuspenseFallback/index.d.ts +2 -0
- package/dist/types/components/Modal/components/OffCanvasSuspenseFallback/index.d.ts.map +1 -0
- package/dist/types/components/Modal/stories/Default.stories.d.ts.map +1 -1
- package/dist/types/components/Overlay/Overlay.d.ts +1 -0
- package/dist/types/components/Overlay/Overlay.d.ts.map +1 -1
- package/dist/types/components/Overlay/components/OverlayContent.d.ts.map +1 -1
- package/dist/types/components/Overlay/components/OverlaySuspenseFallback.d.ts +4 -0
- package/dist/types/components/Overlay/components/OverlaySuspenseFallback.d.ts.map +1 -0
- package/dist/types/components/Overlay/components/index.d.ts +1 -0
- package/dist/types/components/Overlay/components/index.d.ts.map +1 -1
- package/dist/types/components/TextArea/TextArea.d.ts +9 -0
- package/dist/types/components/TextArea/TextArea.d.ts.map +1 -1
- package/dist/types/components/TextArea/stories/Default.stories.d.ts +4 -0
- package/dist/types/components/TextArea/stories/Default.stories.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -19,7 +19,7 @@ const MarkdownEditor = flowComponent("MarkdownEditor", (props) => {
|
|
|
19
19
|
isReadOnly,
|
|
20
20
|
children,
|
|
21
21
|
className,
|
|
22
|
-
rows,
|
|
22
|
+
rows = 5,
|
|
23
23
|
autoResizeMaxRows,
|
|
24
24
|
headingOffset,
|
|
25
25
|
ref,
|
|
@@ -66,7 +66,7 @@ const MarkdownEditor = flowComponent("MarkdownEditor", (props) => {
|
|
|
66
66
|
headingOffset,
|
|
67
67
|
className: styles.markdown,
|
|
68
68
|
style: {
|
|
69
|
-
|
|
69
|
+
height: textAreaRef.current?.offsetHeight
|
|
70
70
|
},
|
|
71
71
|
children: value
|
|
72
72
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownEditor.mjs","sources":["../../../../../../src/components/MarkdownEditor/MarkdownEditor.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport styles from \"./MarkdownEditor.module.scss\";\nimport { Markdown, type MarkdownProps } from \"@/components/Markdown\";\nimport { TextArea, type TextAreaProps } from \"@/components/TextArea\";\nimport { Toolbar } from \"@/components/MarkdownEditor/components/Toolbar\";\nimport clsx from \"clsx\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { handleKeyDown } from \"@/components/MarkdownEditor/lib/handleKeyDown\";\nimport { useObjectRef } from \"@react-aria/utils\";\nimport { useManagedValue } from \"@/lib/hooks/useManagedValue\";\nimport { insertAtCursor } from \"@/components/MarkdownEditor/lib/insertAtCursor\";\n\nexport type MarkdownEditorMode = \"editor\" | \"preview\";\n\nexport type MarkdownEditorProps = TextAreaProps &\n Pick<MarkdownProps, \"headingOffset\">;\n\n/** @flr-generate all */\nexport const MarkdownEditor = flowComponent(\"MarkdownEditor\", (props) => {\n const {\n isDisabled,\n isReadOnly,\n children,\n className,\n rows,\n autoResizeMaxRows,\n headingOffset,\n ref,\n ...rest\n } = props;\n\n const [mode, setMode] = useState<MarkdownEditorMode>(\"editor\");\n const { value, handleOnChange } = useManagedValue(props);\n const textAreaRef = useObjectRef<HTMLTextAreaElement>(ref);\n\n const rootClassName = clsx(\n styles.markdownEditor,\n className,\n styles[`mode-${mode}`],\n );\n\n return (\n <TextArea\n {...rest}\n isReadOnly={isReadOnly || mode === \"preview\"}\n isDisabled={isDisabled}\n className={rootClassName}\n ref={textAreaRef}\n value={value}\n rows={rows}\n autoResizeMaxRows={autoResizeMaxRows}\n onChange={(v) => {\n handleOnChange(v);\n }}\n onKeyDown={(e) => handleKeyDown(e, textAreaRef, handleOnChange)}\n >\n <Toolbar\n currentMode={mode}\n isDisabled={isDisabled}\n onModeChange={(newMode) => setMode(newMode)}\n onToolPressed={(type) => {\n insertAtCursor(value, handleOnChange, textAreaRef, type);\n }}\n />\n\n <Markdown\n headingOffset={headingOffset}\n className={styles.markdown}\n style={{\n
|
|
1
|
+
{"version":3,"file":"MarkdownEditor.mjs","sources":["../../../../../../src/components/MarkdownEditor/MarkdownEditor.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport styles from \"./MarkdownEditor.module.scss\";\nimport { Markdown, type MarkdownProps } from \"@/components/Markdown\";\nimport { TextArea, type TextAreaProps } from \"@/components/TextArea\";\nimport { Toolbar } from \"@/components/MarkdownEditor/components/Toolbar\";\nimport clsx from \"clsx\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { handleKeyDown } from \"@/components/MarkdownEditor/lib/handleKeyDown\";\nimport { useObjectRef } from \"@react-aria/utils\";\nimport { useManagedValue } from \"@/lib/hooks/useManagedValue\";\nimport { insertAtCursor } from \"@/components/MarkdownEditor/lib/insertAtCursor\";\n\nexport type MarkdownEditorMode = \"editor\" | \"preview\";\n\nexport type MarkdownEditorProps = TextAreaProps &\n Pick<MarkdownProps, \"headingOffset\">;\n\n/** @flr-generate all */\nexport const MarkdownEditor = flowComponent(\"MarkdownEditor\", (props) => {\n const {\n isDisabled,\n isReadOnly,\n children,\n className,\n rows = 5,\n autoResizeMaxRows,\n headingOffset,\n ref,\n ...rest\n } = props;\n\n const [mode, setMode] = useState<MarkdownEditorMode>(\"editor\");\n const { value, handleOnChange } = useManagedValue(props);\n const textAreaRef = useObjectRef<HTMLTextAreaElement>(ref);\n\n const rootClassName = clsx(\n styles.markdownEditor,\n className,\n styles[`mode-${mode}`],\n );\n\n return (\n <TextArea\n {...rest}\n isReadOnly={isReadOnly || mode === \"preview\"}\n isDisabled={isDisabled}\n className={rootClassName}\n ref={textAreaRef}\n value={value}\n rows={rows}\n autoResizeMaxRows={autoResizeMaxRows}\n onChange={(v) => {\n handleOnChange(v);\n }}\n onKeyDown={(e) => handleKeyDown(e, textAreaRef, handleOnChange)}\n >\n <Toolbar\n currentMode={mode}\n isDisabled={isDisabled}\n onModeChange={(newMode) => setMode(newMode)}\n onToolPressed={(type) => {\n insertAtCursor(value, handleOnChange, textAreaRef, type);\n }}\n />\n\n <Markdown\n headingOffset={headingOffset}\n className={styles.markdown}\n style={{\n height: textAreaRef.current?.offsetHeight,\n }}\n >\n {value}\n </Markdown>\n\n {children}\n </TextArea>\n );\n});\n\nexport default MarkdownEditor;\n"],"names":[],"mappings":";;;;;;;;;;;;;AAkBO,MAAM,cAAA,GAAiB,aAAA,CAAc,gBAAA,EAAkB,CAAC,KAAA,KAAU;AACvE,EAAA,MAAM;AAAA,IACJ,UAAA;AAAA,IACA,UAAA;AAAA,IACA,QAAA;AAAA,IACA,SAAA;AAAA,IACA,IAAA,GAAO,CAAA;AAAA,IACP,iBAAA;AAAA,IACA,aAAA;AAAA,IACA,GAAA;AAAA,IACA,GAAG;AAAA,GACL,GAAI,KAAA;AAEJ,EAAA,MAAM,CAAC,IAAA,EAAM,OAAO,CAAA,GAAI,SAA6B,QAAQ,CAAA;AAC7D,EAAA,MAAM,EAAE,KAAA,EAAO,cAAA,EAAe,GAAI,gBAAgB,KAAK,CAAA;AACvD,EAAA,MAAM,WAAA,GAAc,aAAkC,GAAG,CAAA;AAEzD,EAAA,MAAM,aAAA,GAAgB,IAAA;AAAA,IACpB,MAAA,CAAO,cAAA;AAAA,IACP,SAAA;AAAA,IACA,MAAA,CAAO,CAAA,KAAA,EAAQ,IAAI,CAAA,CAAE;AAAA,GACvB;AAEA,EAAA,uBACE,IAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACE,GAAG,IAAA;AAAA,MACJ,UAAA,EAAY,cAAc,IAAA,KAAS,SAAA;AAAA,MACnC,UAAA;AAAA,MACA,SAAA,EAAW,aAAA;AAAA,MACX,GAAA,EAAK,WAAA;AAAA,MACL,KAAA;AAAA,MACA,IAAA;AAAA,MACA,iBAAA;AAAA,MACA,QAAA,EAAU,CAAC,CAAA,KAAM;AACf,QAAA,cAAA,CAAe,CAAC,CAAA;AAAA,MAClB,CAAA;AAAA,MACA,WAAW,CAAC,CAAA,KAAM,aAAA,CAAc,CAAA,EAAG,aAAa,cAAc,CAAA;AAAA,MAE9D,QAAA,EAAA;AAAA,wBAAA,GAAA;AAAA,UAAC,OAAA;AAAA,UAAA;AAAA,YACC,WAAA,EAAa,IAAA;AAAA,YACb,UAAA;AAAA,YACA,YAAA,EAAc,CAAC,OAAA,KAAY,OAAA,CAAQ,OAAO,CAAA;AAAA,YAC1C,aAAA,EAAe,CAAC,IAAA,KAAS;AACvB,cAAA,cAAA,CAAe,KAAA,EAAO,cAAA,EAAgB,WAAA,EAAa,IAAI,CAAA;AAAA,YACzD;AAAA;AAAA,SACF;AAAA,wBAEA,GAAA;AAAA,UAAC,QAAA;AAAA,UAAA;AAAA,YACC,aAAA;AAAA,YACA,WAAW,MAAA,CAAO,QAAA;AAAA,YAClB,KAAA,EAAO;AAAA,cACL,MAAA,EAAQ,YAAY,OAAA,EAAS;AAAA,aAC/B;AAAA,YAEC,QAAA,EAAA;AAAA;AAAA,SACH;AAAA,QAEC;AAAA;AAAA;AAAA,GACH;AAEJ,CAAC;;;;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
3
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
|
+
import { Suspense } from 'react';
|
|
4
5
|
import styles from './Modal.module.scss.mjs';
|
|
5
6
|
import clsx from 'clsx';
|
|
6
7
|
import { dynamic } from '../../lib/propsContext/dynamicProps/dynamic.mjs';
|
|
@@ -10,13 +11,14 @@ import { flowComponent } from '../../lib/componentFactory/flowComponent.mjs';
|
|
|
10
11
|
import { Overlay } from '../Overlay/Overlay.mjs';
|
|
11
12
|
import { Action } from '../Action/Action.mjs';
|
|
12
13
|
import 'react-aria';
|
|
13
|
-
import 'react';
|
|
14
14
|
import '@react-aria/live-announcer';
|
|
15
15
|
import '@tabler/icons-react';
|
|
16
16
|
import '../Icon/Icon.mjs';
|
|
17
17
|
import '../../views/IconView.mjs';
|
|
18
18
|
import { IconClose } from '../Icon/components/icons/IconClose.mjs';
|
|
19
19
|
import ButtonView from '../../views/ButtonView.mjs';
|
|
20
|
+
import { OffCanvasSuspenseFallback } from './components/OffCanvasSuspenseFallback/OffCanvasSuspenseFallback.mjs';
|
|
21
|
+
import { Wrap } from '../Wrap/Wrap.mjs';
|
|
20
22
|
|
|
21
23
|
const Modal = flowComponent(
|
|
22
24
|
"Modal",
|
|
@@ -84,7 +86,7 @@ const Modal = flowComponent(
|
|
|
84
86
|
controller,
|
|
85
87
|
ref,
|
|
86
88
|
...rest,
|
|
87
|
-
children: /* @__PURE__ */ jsx(PropsContextProvider, { props: propsContext, children })
|
|
89
|
+
children: /* @__PURE__ */ jsx(PropsContextProvider, { props: propsContext, children: /* @__PURE__ */ jsx(Wrap, { if: offCanvas, children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(OffCanvasSuspenseFallback, {}), children }) }) })
|
|
88
90
|
}
|
|
89
91
|
);
|
|
90
92
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.mjs","sources":["../../../../../../src/components/Modal/Modal.tsx"],"sourcesContent":["import type
|
|
1
|
+
{"version":3,"file":"Modal.mjs","sources":["../../../../../../src/components/Modal/Modal.tsx"],"sourcesContent":["import { Suspense, type PropsWithChildren, type ReactNode } from \"react\";\nimport styles from \"./Modal.module.scss\";\nimport clsx from \"clsx\";\nimport {\n dynamic,\n type PropsContext,\n PropsContextProvider,\n} from \"@/lib/propsContext\";\nimport type { OverlayController } from \"@/lib/controller/overlay\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { Overlay } from \"@/components/Overlay/Overlay\";\nimport { Action } from \"@/components/Action\";\nimport { IconClose } from \"@/components/Icon/components/icons\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport ButtonView from \"@/views/ButtonView\";\nimport { OffCanvasSuspenseFallback } from \"@/components/Modal/components/OffCanvasSuspenseFallback\";\nimport Wrap from \"@/components/Wrap\";\n\nexport interface ModalProps\n extends PropsWithChildren,\n FlowComponentProps,\n PropsWithClassName {\n /** The size of the modal. @default \"s\" */\n size?: \"s\" | \"m\" | \"l\";\n /** Whether the modal should be displayed as an off canvas. */\n offCanvas?: boolean;\n /**\n * Whether the off canvas should be displayed on the right or left side of the\n * screen. @default \"right\"\n */\n offCanvasOrientation?: \"left\" | \"right\";\n /** An overlay controller to control the modal state. */\n controller?: OverlayController;\n /**\n * Accepts \"actionConfirm\" to use the modal as a confirmation modal for an\n * action.\n */\n slot?: string;\n /** Whether the modal can be closed by clicking outside of it. */\n isDismissable?: boolean;\n}\n\nexport const Modal = flowComponent(\n \"Modal\",\n (props) => {\n const {\n size = \"s\",\n offCanvas,\n controller,\n children,\n ref,\n className,\n offCanvasOrientation = \"right\",\n ...rest\n } = props;\n\n const rootClassName = clsx(\n offCanvas ? styles.offCanvas : styles.modal,\n styles[`size-${size}`],\n offCanvasOrientation === \"left\" && styles[\"left\"],\n className,\n );\n\n const header = (children: ReactNode) => (\n <>\n {children}\n <Action closeOverlay=\"Modal\">\n <ButtonView\n variant=\"plain\"\n color=\"secondary\"\n onPress={controller?.close}\n >\n <IconClose />\n </ButtonView>\n </Action>\n </>\n );\n\n const nestedHeadingLevel = 3;\n\n const nestedHeadingProps: PropsContext = {\n Heading: { level: nestedHeadingLevel },\n Section: { Heading: { level: nestedHeadingLevel } },\n };\n\n const propsContext: PropsContext = {\n Content: {\n ...nestedHeadingProps,\n className: styles.content,\n },\n ColumnLayout: {\n ...nestedHeadingProps,\n l: [2, 1],\n m: [1],\n className: styles.columnLayout,\n AccentBox: { className: styles.accentBox, color: \"neutral\" },\n },\n Heading: {\n className: styles.header,\n level: 2,\n slot: \"title\",\n children: dynamic((props) => header(props.children)),\n },\n ActionGroup: {\n className: styles.actionGroup,\n spacing: \"m\",\n },\n };\n\n return (\n <Overlay\n className={rootClassName}\n controller={controller}\n ref={ref}\n {...rest}\n >\n <PropsContextProvider props={propsContext}>\n <Wrap if={offCanvas}>\n <Suspense fallback={<OffCanvasSuspenseFallback />}>\n {children}\n </Suspense>\n </Wrap>\n </PropsContextProvider>\n </Overlay>\n );\n },\n {\n type: \"provider\",\n },\n);\n\nexport default Modal;\n"],"names":["children","props"],"mappings":";;;;;;;;;;;;;;;;;;;;AA2CO,MAAM,KAAA,GAAQ,aAAA;AAAA,EACnB,OAAA;AAAA,EACA,CAAC,KAAA,KAAU;AACT,IAAA,MAAM;AAAA,MACJ,IAAA,GAAO,GAAA;AAAA,MACP,SAAA;AAAA,MACA,UAAA;AAAA,MACA,QAAA;AAAA,MACA,GAAA;AAAA,MACA,SAAA;AAAA,MACA,oBAAA,GAAuB,OAAA;AAAA,MACvB,GAAG;AAAA,KACL,GAAI,KAAA;AAEJ,IAAA,MAAM,aAAA,GAAgB,IAAA;AAAA,MACpB,SAAA,GAAY,MAAA,CAAO,SAAA,GAAY,MAAA,CAAO,KAAA;AAAA,MACtC,MAAA,CAAO,CAAA,KAAA,EAAQ,IAAI,CAAA,CAAE,CAAA;AAAA,MACrB,oBAAA,KAAyB,MAAA,IAAU,MAAA,CAAO,MAAM,CAAA;AAAA,MAChD;AAAA,KACF;AAEA,IAAA,MAAM,MAAA,GAAS,CAACA,SAAAA,qBACd,IAAA,CAAA,QAAA,EAAA,EACG,QAAA,EAAA;AAAA,MAAAA,SAAAA;AAAA,sBACD,GAAA,CAAC,MAAA,EAAA,EAAO,YAAA,EAAa,OAAA,EACnB,QAAA,kBAAA,GAAA;AAAA,QAAC,UAAA;AAAA,QAAA;AAAA,UACC,OAAA,EAAQ,OAAA;AAAA,UACR,KAAA,EAAM,WAAA;AAAA,UACN,SAAS,UAAA,EAAY,KAAA;AAAA,UAErB,8BAAC,SAAA,EAAA,EAAU;AAAA;AAAA,OACb,EACF;AAAA,KAAA,EACF,CAAA;AAGF,IAAA,MAAM,kBAAA,GAAqB,CAAA;AAE3B,IAAA,MAAM,kBAAA,GAAmC;AAAA,MACvC,OAAA,EAAS,EAAE,KAAA,EAAO,kBAAA,EAAmB;AAAA,MACrC,SAAS,EAAE,OAAA,EAAS,EAAE,KAAA,EAAO,oBAAmB;AAAE,KACpD;AAEA,IAAA,MAAM,YAAA,GAA6B;AAAA,MACjC,OAAA,EAAS;AAAA,QACP,GAAG,kBAAA;AAAA,QACH,WAAW,MAAA,CAAO;AAAA,OACpB;AAAA,MACA,YAAA,EAAc;AAAA,QACZ,GAAG,kBAAA;AAAA,QACH,CAAA,EAAG,CAAC,CAAA,EAAG,CAAC,CAAA;AAAA,QACR,CAAA,EAAG,CAAC,CAAC,CAAA;AAAA,QACL,WAAW,MAAA,CAAO,YAAA;AAAA,QAClB,WAAW,EAAE,SAAA,EAAW,MAAA,CAAO,SAAA,EAAW,OAAO,SAAA;AAAU,OAC7D;AAAA,MACA,OAAA,EAAS;AAAA,QACP,WAAW,MAAA,CAAO,MAAA;AAAA,QAClB,KAAA,EAAO,CAAA;AAAA,QACP,IAAA,EAAM,OAAA;AAAA,QACN,UAAU,OAAA,CAAQ,CAACC,WAAU,MAAA,CAAOA,MAAAA,CAAM,QAAQ,CAAC;AAAA,OACrD;AAAA,MACA,WAAA,EAAa;AAAA,QACX,WAAW,MAAA,CAAO,WAAA;AAAA,QAClB,OAAA,EAAS;AAAA;AACX,KACF;AAEA,IAAA,uBACE,GAAA;AAAA,MAAC,OAAA;AAAA,MAAA;AAAA,QACC,SAAA,EAAW,aAAA;AAAA,QACX,UAAA;AAAA,QACA,GAAA;AAAA,QACC,GAAG,IAAA;AAAA,QAEJ,8BAAC,oBAAA,EAAA,EAAqB,KAAA,EAAO,YAAA,EAC3B,QAAA,kBAAA,GAAA,CAAC,QAAK,EAAA,EAAI,SAAA,EACR,QAAA,kBAAA,GAAA,CAAC,QAAA,EAAA,EAAS,0BAAU,GAAA,CAAC,yBAAA,EAAA,EAA0B,CAAA,EAC5C,QAAA,EACH,GACF,CAAA,EACF;AAAA;AAAA,KACF;AAAA,EAEJ,CAAA;AAAA,EACA;AAAA,IACE,IAAA,EAAM;AAAA;AAEV;;;;"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
import '../../../AccentBox/AccentBox.mjs';
|
|
5
|
+
import 'react';
|
|
6
|
+
import 'clsx';
|
|
7
|
+
import '../../../../lib/propsContext/propsContext.mjs';
|
|
8
|
+
import '../../../../lib/propsContext/components/PropsContextProvider.mjs';
|
|
9
|
+
import '../../../Button/Button.mjs';
|
|
10
|
+
import '@tabler/icons-react';
|
|
11
|
+
import '../../../Icon/Icon.mjs';
|
|
12
|
+
import '../../../../views/IconView.mjs';
|
|
13
|
+
import '@mittwald/react-tunnel';
|
|
14
|
+
import '../../../SuspenseTrigger/SuspenseTrigger.mjs';
|
|
15
|
+
import 'react-aria';
|
|
16
|
+
import '../../../Action/Action.mjs';
|
|
17
|
+
import { useAriaAnnounceSuspense } from '../../../Action/lib/ariaLive.mjs';
|
|
18
|
+
import '../../../ActionGroup/ActionGroup.mjs';
|
|
19
|
+
import '../../../Alert/Alert.mjs';
|
|
20
|
+
import '../../../AlertBadge/AlertBadge.mjs';
|
|
21
|
+
import '../../../Align/Align.mjs';
|
|
22
|
+
import '../../../Autocomplete/Autocomplete.mjs';
|
|
23
|
+
import '../../../Avatar/Avatar.mjs';
|
|
24
|
+
import '../../../Badge/Badge.mjs';
|
|
25
|
+
import 'react-aria-components';
|
|
26
|
+
import 'mobx';
|
|
27
|
+
import '../../../../lib/controller/overlay/context.mjs';
|
|
28
|
+
import 'remeda';
|
|
29
|
+
import '@react-aria/utils';
|
|
30
|
+
import 'dot-prop';
|
|
31
|
+
import 'recharts';
|
|
32
|
+
import '../../../Heading/Heading.mjs';
|
|
33
|
+
import '../../../Text/Text.mjs';
|
|
34
|
+
import '../../../Checkbox/Checkbox.mjs';
|
|
35
|
+
import '../../../CheckboxButton/CheckboxButton.mjs';
|
|
36
|
+
import '../../../CheckboxGroup/CheckboxGroup.mjs';
|
|
37
|
+
import '../../../../lib/propsContext/inherit/PropsContextLevelProvider.mjs';
|
|
38
|
+
import 'react-syntax-highlighter';
|
|
39
|
+
import '../../../CopyButton/CopyButton.mjs';
|
|
40
|
+
import '../../../ColumnLayout/ColumnLayout.mjs';
|
|
41
|
+
import '../../../ComboBox/ComboBox.mjs';
|
|
42
|
+
import '../../../../lib/propsContext/components/ComponentPropsContextProvider.mjs';
|
|
43
|
+
import '../../../Content/Content.mjs';
|
|
44
|
+
import '../../../ContextMenu/ContextMenu.mjs';
|
|
45
|
+
import '../../../MenuItem/MenuItem.mjs';
|
|
46
|
+
import '../../../ContextMenu/components/ContextMenuTrigger/ContextMenuTrigger.mjs';
|
|
47
|
+
import '../../../ContextMenu/components/ContextMenuSection/ContextMenuSection.mjs';
|
|
48
|
+
import '../../../ContextualHelp/ContextualHelp.mjs';
|
|
49
|
+
import '../../../ContextualHelp/components/ContextualHelpTrigger/ContextualHelpTrigger.mjs';
|
|
50
|
+
import '../../../CounterBadge/CounterBadge.mjs';
|
|
51
|
+
import '../../../CountryOptions/CountryOptions.mjs';
|
|
52
|
+
import '../../../DatePicker/DatePicker.mjs';
|
|
53
|
+
import '../../../DateRangePicker/DateRangePicker.mjs';
|
|
54
|
+
import '../../../FieldDescription/FieldDescription.mjs';
|
|
55
|
+
import '../../../FieldError/FieldError.mjs';
|
|
56
|
+
import '../../../FileCard/FileCard.mjs';
|
|
57
|
+
import '../../../FileCardList/FileCardList.mjs';
|
|
58
|
+
import '../../../FileDropZone/FileDropZone.mjs';
|
|
59
|
+
import '../../../FileField/FileField.mjs';
|
|
60
|
+
import '../../../Header/Header.mjs';
|
|
61
|
+
import '../../../Image/Image.mjs';
|
|
62
|
+
import '../../../Initials/Initials.mjs';
|
|
63
|
+
import '../../../Label/Label.mjs';
|
|
64
|
+
import '../../../LayoutCard/LayoutCard.mjs';
|
|
65
|
+
import '../../../OverlayTrigger/components/MenuTrigger/MenuTrigger.mjs';
|
|
66
|
+
import '../../../../views/DialogTriggerView.mjs';
|
|
67
|
+
import '../../../LightBox/LightBox.mjs';
|
|
68
|
+
import '../../../Link/Link.mjs';
|
|
69
|
+
import 'invariant';
|
|
70
|
+
import '../../../../views/ListItemViewContentView.mjs';
|
|
71
|
+
import '../../../../views/ButtonView.mjs';
|
|
72
|
+
import '../../../../views/ContextMenuTriggerView.mjs';
|
|
73
|
+
import '../../../List/components/ListSummary/ListSummary.mjs';
|
|
74
|
+
import '../../../List/listContext.mjs';
|
|
75
|
+
import '../../../List/List.mjs';
|
|
76
|
+
import 'react-markdown';
|
|
77
|
+
import 'remark-gfm';
|
|
78
|
+
import '../../../MarkdownEditor/MarkdownEditor.mjs';
|
|
79
|
+
import '../../../Message/Message.mjs';
|
|
80
|
+
import '../../../MessageThread/MessageThread.mjs';
|
|
81
|
+
import '../../Modal.mjs';
|
|
82
|
+
import '../../../Navigation/Navigation.mjs';
|
|
83
|
+
import '../../../Navigation/components/NavigationGroup/NavigationGroup.mjs';
|
|
84
|
+
import '../../../NotificationProvider/NotificationProvider.mjs';
|
|
85
|
+
import 'luxon';
|
|
86
|
+
import '../../../NumberField/NumberField.mjs';
|
|
87
|
+
import '../../../Option/Option.mjs';
|
|
88
|
+
import '../../../../views/OverlayContentView.mjs';
|
|
89
|
+
import '../../../../views/ClearPropsContextView.mjs';
|
|
90
|
+
import LoadingSpinnerView from '../../../../views/LoadingSpinnerView.mjs';
|
|
91
|
+
import '../../../PasswordCreationField/PasswordCreationField.mjs';
|
|
92
|
+
import '../../../Popover/components/PopoverTrigger/PopoverTrigger.mjs';
|
|
93
|
+
import '../../../Popover/Popover.mjs';
|
|
94
|
+
import '../../../ProgressBar/ProgressBar.mjs';
|
|
95
|
+
import '../../../RadioGroup/RadioGroup.mjs';
|
|
96
|
+
import '../../../RadioGroup/components/Radio/Radio.mjs';
|
|
97
|
+
import '../../../RadioGroup/components/RadioButton/RadioButton.mjs';
|
|
98
|
+
import '../../../SearchField/SearchField.mjs';
|
|
99
|
+
import '../../../Section/Section.mjs';
|
|
100
|
+
import '../../../SegmentedControl/SegmentedControl.mjs';
|
|
101
|
+
import '../../../SegmentedControl/components/Segment/Segment.mjs';
|
|
102
|
+
import '../../../Select/Select.mjs';
|
|
103
|
+
import '../../../SettingsProvider/SettingsProvider.mjs';
|
|
104
|
+
import '../../../Slider/Slider.mjs';
|
|
105
|
+
import '../../../Switch/Switch.mjs';
|
|
106
|
+
import '../../../Tabs/Tabs.mjs';
|
|
107
|
+
import '../../../Tabs/components/Tab/context.mjs';
|
|
108
|
+
import '../../../TextArea/TextArea.mjs';
|
|
109
|
+
import '../../../TextField/TextField.mjs';
|
|
110
|
+
import '../../../TimeField/TimeField.mjs';
|
|
111
|
+
import '../../../TranslationProvider/TranslationProvider.mjs';
|
|
112
|
+
import FlexView from '../../../../views/FlexView.mjs';
|
|
113
|
+
|
|
114
|
+
const OffCanvasSuspenseFallback = () => {
|
|
115
|
+
useAriaAnnounceSuspense();
|
|
116
|
+
return /* @__PURE__ */ jsx(FlexView, { grow: true, align: "center", justify: "center", children: /* @__PURE__ */ jsx(LoadingSpinnerView, {}) });
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
export { OffCanvasSuspenseFallback };
|
|
120
|
+
//# sourceMappingURL=OffCanvasSuspenseFallback.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OffCanvasSuspenseFallback.mjs","sources":["../../../../../../../../src/components/Modal/components/OffCanvasSuspenseFallback/OffCanvasSuspenseFallback.tsx"],"sourcesContent":["import { useAriaAnnounceSuspense } from \"@/index/default\";\nimport FlexView from \"@/views/FlexView\";\nimport LoadingSpinnerView from \"@/views/LoadingSpinnerView\";\nimport type { FC } from \"react\";\n\nexport const OffCanvasSuspenseFallback: FC = () => {\n useAriaAnnounceSuspense();\n return (\n <FlexView grow align=\"center\" justify=\"center\">\n <LoadingSpinnerView />\n </FlexView>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKO,MAAM,4BAAgC,MAAM;AACjD,EAAA,uBAAA,EAAwB;AACxB,EAAA,uBACE,GAAA,CAAC,QAAA,EAAA,EAAS,IAAA,EAAI,IAAA,EAAC,KAAA,EAAM,UAAS,OAAA,EAAQ,QAAA,EACpC,QAAA,kBAAA,GAAA,CAAC,kBAAA,EAAA,EAAmB,CAAA,EACtB,CAAA;AAEJ;;;;"}
|
|
@@ -17,13 +17,14 @@ const Overlay = (props) => {
|
|
|
17
17
|
isDismissable = true,
|
|
18
18
|
className,
|
|
19
19
|
overlayType = "Modal",
|
|
20
|
+
isOpen: isOpenFromProps,
|
|
20
21
|
ref
|
|
21
22
|
} = props;
|
|
22
23
|
const controllerFromContext = useOverlayController(overlayType, {
|
|
23
24
|
reuseControllerFromContext: true
|
|
24
25
|
});
|
|
25
26
|
const controller = controllerFromProps ?? controllerFromContext;
|
|
26
|
-
const isOpen = controller.useIsOpen();
|
|
27
|
+
const isOpen = isOpenFromProps ?? controller.useIsOpen();
|
|
27
28
|
const rootClassName = clsx(styles.overlay, className);
|
|
28
29
|
return /* @__PURE__ */ jsx(ClearPropsContextView, { keep: overlayType, children: /* @__PURE__ */ jsx(
|
|
29
30
|
OverlayContentView,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Overlay.mjs","sources":["../../../../../../src/components/Overlay/Overlay.tsx"],"sourcesContent":["import type { FC, PropsWithChildren, Ref } from \"react\";\nimport styles from \"./Overlay.module.scss\";\nimport clsx from \"clsx\";\nimport type { OverlayController } from \"@/lib/controller\";\nimport { useOverlayController } from \"@/lib/controller\";\nimport OverlayContextProvider from \"@/lib/controller/overlay/OverlayContextProvider\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport OverlayContentView from \"@/views/OverlayContentView\";\nimport ClearPropsContextView from \"@/views/ClearPropsContextView\";\n\nexport interface OverlayProps extends PropsWithChildren, PropsWithClassName {\n ref?: Ref<HTMLDivElement>;\n /** The controller to control the overlay state. */\n controller?: OverlayController;\n /** Whether the overlay can be closed by clicking outside of it. */\n isDismissable?: boolean;\n /** Whether the overlay is a modal or a light box. */\n overlayType?: \"Modal\" | \"LightBox\";\n}\n\nexport const Overlay: FC<OverlayProps> = (props) => {\n const {\n controller: controllerFromProps,\n children,\n isDismissable = true,\n className,\n overlayType = \"Modal\",\n ref,\n } = props;\n\n const controllerFromContext = useOverlayController(overlayType, {\n reuseControllerFromContext: true,\n });\n\n const controller = controllerFromProps ?? controllerFromContext;\n\n const isOpen = controller.useIsOpen();\n\n const rootClassName = clsx(styles.overlay, className);\n\n return (\n <ClearPropsContextView keep={overlayType}>\n <OverlayContentView\n onOpenChange={(isOpen) => controller.setOpen(isOpen)}\n isOpen={isOpen}\n ref={ref}\n isDismissable={isDismissable}\n className={rootClassName}\n >\n <OverlayContextProvider type=\"Modal\" controller={controller}>\n {isOpen && children}\n </OverlayContextProvider>\n </OverlayContentView>\n </ClearPropsContextView>\n );\n};\n\nexport default Overlay;\n"],"names":["isOpen"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Overlay.mjs","sources":["../../../../../../src/components/Overlay/Overlay.tsx"],"sourcesContent":["import type { FC, PropsWithChildren, Ref } from \"react\";\nimport styles from \"./Overlay.module.scss\";\nimport clsx from \"clsx\";\nimport type { OverlayController } from \"@/lib/controller\";\nimport { useOverlayController } from \"@/lib/controller\";\nimport OverlayContextProvider from \"@/lib/controller/overlay/OverlayContextProvider\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport OverlayContentView from \"@/views/OverlayContentView\";\nimport ClearPropsContextView from \"@/views/ClearPropsContextView\";\n\nexport interface OverlayProps extends PropsWithChildren, PropsWithClassName {\n ref?: Ref<HTMLDivElement>;\n /** The controller to control the overlay state. */\n controller?: OverlayController;\n /** Whether the overlay can be closed by clicking outside of it. */\n isDismissable?: boolean;\n /** Whether the overlay is a modal or a light box. */\n overlayType?: \"Modal\" | \"LightBox\";\n isOpen?: boolean;\n}\n\nexport const Overlay: FC<OverlayProps> = (props) => {\n const {\n controller: controllerFromProps,\n children,\n isDismissable = true,\n className,\n overlayType = \"Modal\",\n isOpen: isOpenFromProps,\n ref,\n } = props;\n\n const controllerFromContext = useOverlayController(overlayType, {\n reuseControllerFromContext: true,\n });\n\n const controller = controllerFromProps ?? controllerFromContext;\n\n const isOpen = isOpenFromProps ?? controller.useIsOpen();\n\n const rootClassName = clsx(styles.overlay, className);\n\n return (\n <ClearPropsContextView keep={overlayType}>\n <OverlayContentView\n onOpenChange={(isOpen) => controller.setOpen(isOpen)}\n isOpen={isOpen}\n ref={ref}\n isDismissable={isDismissable}\n className={rootClassName}\n >\n <OverlayContextProvider type=\"Modal\" controller={controller}>\n {isOpen && children}\n </OverlayContextProvider>\n </OverlayContentView>\n </ClearPropsContextView>\n );\n};\n\nexport default Overlay;\n"],"names":["isOpen"],"mappings":";;;;;;;;;;AAqBO,MAAM,OAAA,GAA4B,CAAC,KAAA,KAAU;AAClD,EAAA,MAAM;AAAA,IACJ,UAAA,EAAY,mBAAA;AAAA,IACZ,QAAA;AAAA,IACA,aAAA,GAAgB,IAAA;AAAA,IAChB,SAAA;AAAA,IACA,WAAA,GAAc,OAAA;AAAA,IACd,MAAA,EAAQ,eAAA;AAAA,IACR;AAAA,GACF,GAAI,KAAA;AAEJ,EAAA,MAAM,qBAAA,GAAwB,qBAAqB,WAAA,EAAa;AAAA,IAC9D,0BAAA,EAA4B;AAAA,GAC7B,CAAA;AAED,EAAA,MAAM,aAAa,mBAAA,IAAuB,qBAAA;AAE1C,EAAA,MAAM,MAAA,GAAS,eAAA,IAAmB,UAAA,CAAW,SAAA,EAAU;AAEvD,EAAA,MAAM,aAAA,GAAgB,IAAA,CAAK,MAAA,CAAO,OAAA,EAAS,SAAS,CAAA;AAEpD,EAAA,uBACE,GAAA,CAAC,qBAAA,EAAA,EAAsB,IAAA,EAAM,WAAA,EAC3B,QAAA,kBAAA,GAAA;AAAA,IAAC,kBAAA;AAAA,IAAA;AAAA,MACC,YAAA,EAAc,CAACA,OAAAA,KAAW,UAAA,CAAW,QAAQA,OAAM,CAAA;AAAA,MACnD,MAAA;AAAA,MACA,GAAA;AAAA,MACA,aAAA;AAAA,MACA,SAAA,EAAW,aAAA;AAAA,MAEX,8BAAC,sBAAA,EAAA,EAAuB,IAAA,EAAK,OAAA,EAAQ,UAAA,EAClC,oBAAU,QAAA,EACb;AAAA;AAAA,GACF,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -2,17 +2,22 @@
|
|
|
2
2
|
/* */
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
import * as Aria from 'react-aria-components';
|
|
5
|
-
import { Suspense } from 'react';
|
|
6
|
-
import
|
|
7
|
-
import
|
|
5
|
+
import { useState, Suspense, useLayoutEffect } from 'react';
|
|
6
|
+
import { OverlaySuspenseFallback } from './OverlaySuspenseFallback.mjs';
|
|
7
|
+
import styles from '../Overlay.module.scss.mjs';
|
|
8
8
|
|
|
9
|
-
const OverlaySuspenseFallback = () => {
|
|
10
|
-
useAriaAnnounceSuspense();
|
|
11
|
-
return /* @__PURE__ */ jsx(LoadingSpinnerView, { color: "dark" });
|
|
12
|
-
};
|
|
13
9
|
const OverlayContent = (props) => {
|
|
14
|
-
const { children, ...restProps } = props;
|
|
15
|
-
|
|
10
|
+
const { children, className, ...restProps } = props;
|
|
11
|
+
const [isSuspended, setIsSuspended] = useState(false);
|
|
12
|
+
const Fallback = () => {
|
|
13
|
+
useLayoutEffect(() => {
|
|
14
|
+
setIsSuspended(true);
|
|
15
|
+
return () => setIsSuspended(false);
|
|
16
|
+
}, [setIsSuspended]);
|
|
17
|
+
return /* @__PURE__ */ jsx(OverlaySuspenseFallback, { ...restProps });
|
|
18
|
+
};
|
|
19
|
+
const rootClassName = isSuspended ? styles.overlay : className;
|
|
20
|
+
return /* @__PURE__ */ jsx(Aria.ModalOverlay, { ...restProps, className: rootClassName, children: /* @__PURE__ */ jsx(Aria.Modal, { children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Fallback, {}), children: /* @__PURE__ */ jsx(Aria.Dialog, { children }) }) }) });
|
|
16
21
|
};
|
|
17
22
|
|
|
18
23
|
export { OverlayContent, OverlayContent as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverlayContent.mjs","sources":["../../../../../../../src/components/Overlay/components/OverlayContent.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport type { FC, PropsWithChildren, Ref } from \"react\";\nimport { Suspense } from \"react\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport
|
|
1
|
+
{"version":3,"file":"OverlayContent.mjs","sources":["../../../../../../../src/components/Overlay/components/OverlayContent.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport type { FC, PropsWithChildren, Ref } from \"react\";\nimport { Suspense, useLayoutEffect, useState } from \"react\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport { OverlaySuspenseFallback } from \"@/components/Overlay/components/OverlaySuspenseFallback\";\nimport styles from \"../Overlay.module.scss\";\n\nexport interface OverlayContentProps\n extends PropsWithChildren,\n PropsWithClassName {\n ref?: Ref<HTMLDivElement>;\n onOpenChange: (isOpen: boolean) => void;\n isDismissable?: boolean;\n isOpen?: boolean;\n}\n\n/** @flr-generate all */\nexport const OverlayContent: FC<OverlayContentProps> = (props) => {\n const { children, className, ...restProps } = props;\n\n const [isSuspended, setIsSuspended] = useState(false);\n\n const Fallback = () => {\n // Track suspense state to adjust styling\n useLayoutEffect(() => {\n setIsSuspended(true);\n return () => setIsSuspended(false);\n }, [setIsSuspended]);\n return <OverlaySuspenseFallback {...restProps} />;\n };\n\n const rootClassName = isSuspended ? styles.overlay : className;\n\n return (\n <Aria.ModalOverlay {...restProps} className={rootClassName}>\n <Aria.Modal>\n <Suspense fallback={<Fallback />}>\n <Aria.Dialog>{children}</Aria.Dialog>\n </Suspense>\n </Aria.Modal>\n </Aria.ModalOverlay>\n );\n};\n\nexport default OverlayContent;\n"],"names":[],"mappings":";;;;;;AAiBO,MAAM,cAAA,GAA0C,CAAC,KAAA,KAAU;AAChE,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,GAAG,WAAU,GAAI,KAAA;AAE9C,EAAA,MAAM,CAAC,WAAA,EAAa,cAAc,CAAA,GAAI,SAAS,KAAK,CAAA;AAEpD,EAAA,MAAM,WAAW,MAAM;AAErB,IAAA,eAAA,CAAgB,MAAM;AACpB,MAAA,cAAA,CAAe,IAAI,CAAA;AACnB,MAAA,OAAO,MAAM,eAAe,KAAK,CAAA;AAAA,IACnC,CAAA,EAAG,CAAC,cAAc,CAAC,CAAA;AACnB,IAAA,uBAAO,GAAA,CAAC,uBAAA,EAAA,EAAyB,GAAG,SAAA,EAAW,CAAA;AAAA,EACjD,CAAA;AAEA,EAAA,MAAM,aAAA,GAAgB,WAAA,GAAc,MAAA,CAAO,OAAA,GAAU,SAAA;AAErD,EAAA,uBACE,GAAA,CAAC,IAAA,CAAK,YAAA,EAAL,EAAmB,GAAG,WAAW,SAAA,EAAW,aAAA,EAC3C,QAAA,kBAAA,GAAA,CAAC,IAAA,CAAK,KAAA,EAAL,EACC,8BAAC,QAAA,EAAA,EAAS,QAAA,kBAAU,GAAA,CAAC,QAAA,EAAA,EAAS,CAAA,EAC5B,QAAA,kBAAA,GAAA,CAAC,IAAA,CAAK,MAAA,EAAL,EAAa,QAAA,EAAS,CAAA,EACzB,CAAA,EACF,CAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
import LoadingSpinnerView from '../../../views/LoadingSpinnerView.mjs';
|
|
5
|
+
import { useAriaAnnounceSuspense } from '../../Action/lib/ariaLive.mjs';
|
|
6
|
+
import '../../AccentBox/AccentBox.mjs';
|
|
7
|
+
import 'react';
|
|
8
|
+
import 'clsx';
|
|
9
|
+
import '../../../lib/propsContext/propsContext.mjs';
|
|
10
|
+
import '../../../lib/propsContext/components/PropsContextProvider.mjs';
|
|
11
|
+
import '../../Button/Button.mjs';
|
|
12
|
+
import '@tabler/icons-react';
|
|
13
|
+
import '../../Icon/Icon.mjs';
|
|
14
|
+
import '../../../views/IconView.mjs';
|
|
15
|
+
import '@mittwald/react-tunnel';
|
|
16
|
+
import '../../SuspenseTrigger/SuspenseTrigger.mjs';
|
|
17
|
+
import 'react-aria';
|
|
18
|
+
import '../../Action/Action.mjs';
|
|
19
|
+
import '../../ActionGroup/ActionGroup.mjs';
|
|
20
|
+
import '../../Alert/Alert.mjs';
|
|
21
|
+
import '../../AlertBadge/AlertBadge.mjs';
|
|
22
|
+
import '../../Align/Align.mjs';
|
|
23
|
+
import '../../Autocomplete/Autocomplete.mjs';
|
|
24
|
+
import '../../Avatar/Avatar.mjs';
|
|
25
|
+
import '../../Badge/Badge.mjs';
|
|
26
|
+
import 'react-aria-components';
|
|
27
|
+
import 'mobx';
|
|
28
|
+
import '../../../lib/controller/overlay/context.mjs';
|
|
29
|
+
import 'remeda';
|
|
30
|
+
import '@react-aria/utils';
|
|
31
|
+
import 'dot-prop';
|
|
32
|
+
import 'recharts';
|
|
33
|
+
import '../../Heading/Heading.mjs';
|
|
34
|
+
import '../../Text/Text.mjs';
|
|
35
|
+
import '../../Checkbox/Checkbox.mjs';
|
|
36
|
+
import '../../CheckboxButton/CheckboxButton.mjs';
|
|
37
|
+
import '../../CheckboxGroup/CheckboxGroup.mjs';
|
|
38
|
+
import '../../../lib/propsContext/inherit/PropsContextLevelProvider.mjs';
|
|
39
|
+
import 'react-syntax-highlighter';
|
|
40
|
+
import '../../CopyButton/CopyButton.mjs';
|
|
41
|
+
import '../../ColumnLayout/ColumnLayout.mjs';
|
|
42
|
+
import '../../ComboBox/ComboBox.mjs';
|
|
43
|
+
import '../../../lib/propsContext/components/ComponentPropsContextProvider.mjs';
|
|
44
|
+
import '../../Content/Content.mjs';
|
|
45
|
+
import '../../ContextMenu/ContextMenu.mjs';
|
|
46
|
+
import '../../MenuItem/MenuItem.mjs';
|
|
47
|
+
import '../../ContextMenu/components/ContextMenuTrigger/ContextMenuTrigger.mjs';
|
|
48
|
+
import '../../ContextMenu/components/ContextMenuSection/ContextMenuSection.mjs';
|
|
49
|
+
import '../../ContextualHelp/ContextualHelp.mjs';
|
|
50
|
+
import '../../ContextualHelp/components/ContextualHelpTrigger/ContextualHelpTrigger.mjs';
|
|
51
|
+
import '../../CounterBadge/CounterBadge.mjs';
|
|
52
|
+
import '../../CountryOptions/CountryOptions.mjs';
|
|
53
|
+
import '../../DatePicker/DatePicker.mjs';
|
|
54
|
+
import '../../DateRangePicker/DateRangePicker.mjs';
|
|
55
|
+
import '../../FieldDescription/FieldDescription.mjs';
|
|
56
|
+
import '../../FieldError/FieldError.mjs';
|
|
57
|
+
import '../../FileCard/FileCard.mjs';
|
|
58
|
+
import '../../FileCardList/FileCardList.mjs';
|
|
59
|
+
import '../../FileDropZone/FileDropZone.mjs';
|
|
60
|
+
import '../../FileField/FileField.mjs';
|
|
61
|
+
import '../../Header/Header.mjs';
|
|
62
|
+
import '../../Image/Image.mjs';
|
|
63
|
+
import '../../Initials/Initials.mjs';
|
|
64
|
+
import '../../Label/Label.mjs';
|
|
65
|
+
import '../../LayoutCard/LayoutCard.mjs';
|
|
66
|
+
import '../../OverlayTrigger/components/MenuTrigger/MenuTrigger.mjs';
|
|
67
|
+
import '../../../views/DialogTriggerView.mjs';
|
|
68
|
+
import '../../LightBox/LightBox.mjs';
|
|
69
|
+
import '../../Link/Link.mjs';
|
|
70
|
+
import 'invariant';
|
|
71
|
+
import '../../../views/ListItemViewContentView.mjs';
|
|
72
|
+
import '../../../views/ButtonView.mjs';
|
|
73
|
+
import '../../../views/ContextMenuTriggerView.mjs';
|
|
74
|
+
import '../../List/components/ListSummary/ListSummary.mjs';
|
|
75
|
+
import '../../List/listContext.mjs';
|
|
76
|
+
import '../../List/List.mjs';
|
|
77
|
+
import 'react-markdown';
|
|
78
|
+
import 'remark-gfm';
|
|
79
|
+
import '../../MarkdownEditor/MarkdownEditor.mjs';
|
|
80
|
+
import '../../Message/Message.mjs';
|
|
81
|
+
import '../../MessageThread/MessageThread.mjs';
|
|
82
|
+
import '../../Modal/Modal.mjs';
|
|
83
|
+
import '../../Navigation/Navigation.mjs';
|
|
84
|
+
import '../../Navigation/components/NavigationGroup/NavigationGroup.mjs';
|
|
85
|
+
import '../../NotificationProvider/NotificationProvider.mjs';
|
|
86
|
+
import 'luxon';
|
|
87
|
+
import '../../NumberField/NumberField.mjs';
|
|
88
|
+
import '../../Option/Option.mjs';
|
|
89
|
+
import '../../../views/OverlayContentView.mjs';
|
|
90
|
+
import '../../../views/ClearPropsContextView.mjs';
|
|
91
|
+
import '../../PasswordCreationField/PasswordCreationField.mjs';
|
|
92
|
+
import '../../Popover/components/PopoverTrigger/PopoverTrigger.mjs';
|
|
93
|
+
import '../../Popover/Popover.mjs';
|
|
94
|
+
import '../../ProgressBar/ProgressBar.mjs';
|
|
95
|
+
import '../../RadioGroup/RadioGroup.mjs';
|
|
96
|
+
import '../../RadioGroup/components/Radio/Radio.mjs';
|
|
97
|
+
import '../../RadioGroup/components/RadioButton/RadioButton.mjs';
|
|
98
|
+
import '../../SearchField/SearchField.mjs';
|
|
99
|
+
import '../../Section/Section.mjs';
|
|
100
|
+
import '../../SegmentedControl/SegmentedControl.mjs';
|
|
101
|
+
import '../../SegmentedControl/components/Segment/Segment.mjs';
|
|
102
|
+
import '../../Select/Select.mjs';
|
|
103
|
+
import '../../SettingsProvider/SettingsProvider.mjs';
|
|
104
|
+
import '../../Slider/Slider.mjs';
|
|
105
|
+
import '../../Switch/Switch.mjs';
|
|
106
|
+
import '../../Tabs/Tabs.mjs';
|
|
107
|
+
import '../../Tabs/components/Tab/context.mjs';
|
|
108
|
+
import '../../TextArea/TextArea.mjs';
|
|
109
|
+
import '../../TextField/TextField.mjs';
|
|
110
|
+
import '../../TimeField/TimeField.mjs';
|
|
111
|
+
import '../../TranslationProvider/TranslationProvider.mjs';
|
|
112
|
+
|
|
113
|
+
const OverlaySuspenseFallback = () => {
|
|
114
|
+
useAriaAnnounceSuspense();
|
|
115
|
+
return /* @__PURE__ */ jsx(LoadingSpinnerView, { color: "dark" });
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
export { OverlaySuspenseFallback };
|
|
119
|
+
//# sourceMappingURL=OverlaySuspenseFallback.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OverlaySuspenseFallback.mjs","sources":["../../../../../../../src/components/Overlay/components/OverlaySuspenseFallback.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport LoadingSpinnerView from \"@/views/LoadingSpinnerView\";\nimport { useAriaAnnounceSuspense } from \"@/components/Action/lib/ariaLive\";\nimport { type OverlayContentProps } from \"@/index/default\";\n\nexport const OverlaySuspenseFallback: FC<OverlayContentProps> = () => {\n useAriaAnnounceSuspense();\n return <LoadingSpinnerView color=\"dark\" />;\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKO,MAAM,0BAAmD,MAAM;AACpE,EAAA,uBAAA,EAAwB;AACxB,EAAA,uBAAO,GAAA,CAAC,kBAAA,EAAA,EAAmB,KAAA,EAAM,MAAA,EAAO,CAAA;AAC1C;;;;"}
|
|
@@ -11,6 +11,7 @@ import { useFieldComponent } from '../../lib/hooks/useFieldComponent.mjs';
|
|
|
11
11
|
import '../../lib/propsContext/propsContext.mjs';
|
|
12
12
|
import { PropsContextProvider } from '../../lib/propsContext/components/PropsContextProvider.mjs';
|
|
13
13
|
import clsx from 'clsx';
|
|
14
|
+
import { useState, useEffect } from 'react';
|
|
14
15
|
|
|
15
16
|
const TextArea = flowComponent("TextArea", (props) => {
|
|
16
17
|
const {
|
|
@@ -19,17 +20,57 @@ const TextArea = flowComponent("TextArea", (props) => {
|
|
|
19
20
|
rows = 5,
|
|
20
21
|
autoResizeMaxRows = rows,
|
|
21
22
|
ref,
|
|
23
|
+
allowResize,
|
|
24
|
+
allowVerticalResize,
|
|
25
|
+
allowHorizontalResize,
|
|
22
26
|
...rest
|
|
23
27
|
} = props;
|
|
28
|
+
const rootClassName = clsx(
|
|
29
|
+
styles.textArea,
|
|
30
|
+
allowResize && styles.resize,
|
|
31
|
+
allowVerticalResize && styles.verticalResize,
|
|
32
|
+
allowHorizontalResize && styles.horizontalResize
|
|
33
|
+
);
|
|
24
34
|
const localRef = useObjectRef(ref);
|
|
25
35
|
const getHeight = (rows2) => {
|
|
26
36
|
return `calc(var(--line-height--m) * ${rows2} + (var(--form-control--padding-y) * 2))`;
|
|
27
37
|
};
|
|
38
|
+
const [resized, setResized] = useState(false);
|
|
39
|
+
const autoResizable = rows !== autoResizeMaxRows;
|
|
40
|
+
const verticallyResizable = (allowResize || allowVerticalResize) && (!autoResizable || autoResizable && resized);
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
const textarea = localRef.current;
|
|
43
|
+
if (!textarea) return;
|
|
44
|
+
const startHeight = textarea.offsetHeight;
|
|
45
|
+
let tracking = false;
|
|
46
|
+
const handleMouseDown = () => {
|
|
47
|
+
tracking = true;
|
|
48
|
+
};
|
|
49
|
+
const handleMouseMove = () => {
|
|
50
|
+
if (!tracking || resized) return;
|
|
51
|
+
const currentHeight = textarea.offsetHeight;
|
|
52
|
+
if (currentHeight !== startHeight) {
|
|
53
|
+
setResized(true);
|
|
54
|
+
tracking = false;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
const handleMouseUp = () => {
|
|
58
|
+
tracking = false;
|
|
59
|
+
};
|
|
60
|
+
window.addEventListener("mousedown", handleMouseDown);
|
|
61
|
+
window.addEventListener("mousemove", handleMouseMove);
|
|
62
|
+
window.addEventListener("mouseup", handleMouseUp);
|
|
63
|
+
return () => {
|
|
64
|
+
window.removeEventListener("mousedown", handleMouseDown);
|
|
65
|
+
window.removeEventListener("mousemove", handleMouseMove);
|
|
66
|
+
window.removeEventListener("mouseup", handleMouseUp);
|
|
67
|
+
};
|
|
68
|
+
}, [resized]);
|
|
28
69
|
const updateHeight = () => {
|
|
29
|
-
if (localRef.current &&
|
|
70
|
+
if (localRef.current && autoResizable && !verticallyResizable) {
|
|
30
71
|
localRef.current.style.height = "0px";
|
|
31
72
|
const scrollHeight = localRef.current.scrollHeight;
|
|
32
|
-
localRef.current.style.height = scrollHeight + "px";
|
|
73
|
+
localRef.current.style.height = scrollHeight + 2 + "px";
|
|
33
74
|
}
|
|
34
75
|
};
|
|
35
76
|
const input = /* @__PURE__ */ jsx(
|
|
@@ -42,12 +83,12 @@ const TextArea = flowComponent("TextArea", (props) => {
|
|
|
42
83
|
{
|
|
43
84
|
rows,
|
|
44
85
|
placeholder,
|
|
45
|
-
className:
|
|
86
|
+
className: rootClassName,
|
|
46
87
|
ref: localRef,
|
|
47
88
|
onChange: updateHeight,
|
|
48
89
|
style: {
|
|
49
90
|
minHeight: getHeight(rows),
|
|
50
|
-
maxHeight: getHeight(autoResizeMaxRows)
|
|
91
|
+
maxHeight: verticallyResizable ? void 0 : getHeight(autoResizeMaxRows)
|
|
51
92
|
}
|
|
52
93
|
}
|
|
53
94
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.mjs","sources":["../../../../../../src/components/TextArea/TextArea.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport type { TextFieldBaseProps } from \"@/components/TextFieldBase\";\nimport { TextFieldBase } from \"@/components/TextFieldBase\";\nimport styles from \"./TextArea.module.scss\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { useObjectRef } from \"@react-aria/utils\";\nimport { ReactAriaControlledValueFix } from \"@/lib/react/ReactAriaControlledValueFix\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport clsx from \"clsx\";\n\nexport interface TextAreaProps\n extends Omit<TextFieldBaseProps, \"FieldErrorView\" | \"input\" | \"ref\">,\n Pick<Aria.TextAreaProps, \"placeholder\" | \"rows\">,\n FlowComponentProps<HTMLTextAreaElement> {\n /**\n * Whether the text area should grow if its content gets longer than its\n * initial height.\n */\n autoResizeMaxRows?: number;\n}\n\n/** @flr-generate all */\nexport const TextArea = flowComponent(\"TextArea\", (props) => {\n const {\n children,\n placeholder,\n rows = 5,\n autoResizeMaxRows = rows,\n ref,\n ...rest\n } = props;\n\n const localRef = useObjectRef(ref);\n\n const getHeight = (rows: number) => {\n return `calc(var(--line-height--m) * ${rows} + (var(--form-control--padding-y) * 2))`;\n };\n\n const updateHeight = () => {\n if (localRef.current &&
|
|
1
|
+
{"version":3,"file":"TextArea.mjs","sources":["../../../../../../src/components/TextArea/TextArea.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport type { TextFieldBaseProps } from \"@/components/TextFieldBase\";\nimport { TextFieldBase } from \"@/components/TextFieldBase\";\nimport styles from \"./TextArea.module.scss\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { useObjectRef } from \"@react-aria/utils\";\nimport { ReactAriaControlledValueFix } from \"@/lib/react/ReactAriaControlledValueFix\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport clsx from \"clsx\";\nimport { useEffect, useState } from \"react\";\n\nexport interface TextAreaProps\n extends Omit<TextFieldBaseProps, \"FieldErrorView\" | \"input\" | \"ref\">,\n Pick<Aria.TextAreaProps, \"placeholder\" | \"rows\">,\n FlowComponentProps<HTMLTextAreaElement> {\n /**\n * Whether the text area should grow if its content gets longer than its\n * initial height.\n */\n autoResizeMaxRows?: number;\n /** Allows the user to manually resize the textArea horizontally. */\n allowHorizontalResize?: boolean;\n /** Allows the user to manually resize the textArea vertically. */\n allowVerticalResize?: boolean;\n /**\n * Allows the user to manually resize the textArea horizontally and\n * vertically.\n */\n allowResize?: boolean;\n}\n\n/** @flr-generate all */\nexport const TextArea = flowComponent(\"TextArea\", (props) => {\n const {\n children,\n placeholder,\n rows = 5,\n autoResizeMaxRows = rows,\n ref,\n allowResize,\n allowVerticalResize,\n allowHorizontalResize,\n ...rest\n } = props;\n\n const rootClassName = clsx(\n styles.textArea,\n allowResize && styles.resize,\n allowVerticalResize && styles.verticalResize,\n allowHorizontalResize && styles.horizontalResize,\n );\n\n const localRef = useObjectRef(ref);\n\n const getHeight = (rows: number) => {\n return `calc(var(--line-height--m) * ${rows} + (var(--form-control--padding-y) * 2))`;\n };\n\n const [resized, setResized] = useState(false);\n\n const autoResizable = rows !== autoResizeMaxRows;\n\n const verticallyResizable =\n (allowResize || allowVerticalResize) &&\n (!autoResizable || (autoResizable && resized));\n\n useEffect(() => {\n const textarea = localRef.current;\n if (!textarea) return;\n\n const startHeight = textarea.offsetHeight;\n let tracking = false;\n\n const handleMouseDown = () => {\n tracking = true;\n };\n\n const handleMouseMove = () => {\n if (!tracking || resized) return;\n\n const currentHeight = textarea.offsetHeight;\n\n if (currentHeight !== startHeight) {\n setResized(true);\n tracking = false;\n }\n };\n\n const handleMouseUp = () => {\n tracking = false;\n };\n\n window.addEventListener(\"mousedown\", handleMouseDown);\n window.addEventListener(\"mousemove\", handleMouseMove);\n window.addEventListener(\"mouseup\", handleMouseUp);\n\n return () => {\n window.removeEventListener(\"mousedown\", handleMouseDown);\n window.removeEventListener(\"mousemove\", handleMouseMove);\n window.removeEventListener(\"mouseup\", handleMouseUp);\n };\n }, [resized]);\n\n const updateHeight = () => {\n if (localRef.current && autoResizable && !verticallyResizable) {\n // https://stackoverflow.com/a/60795884\n localRef.current.style.height = \"0px\";\n const scrollHeight = localRef.current.scrollHeight;\n // + 2 to add border height\n localRef.current.style.height = scrollHeight + 2 + \"px\";\n }\n };\n\n const input = (\n <ReactAriaControlledValueFix\n inputContext={Aria.TextAreaContext}\n props={props}\n >\n <Aria.TextArea\n rows={rows}\n placeholder={placeholder}\n className={rootClassName}\n ref={localRef}\n onChange={updateHeight}\n style={{\n minHeight: getHeight(rows),\n maxHeight: verticallyResizable\n ? undefined\n : getHeight(autoResizeMaxRows),\n }}\n />\n </ReactAriaControlledValueFix>\n );\n\n const { FieldErrorView, fieldPropsContext, fieldProps } =\n useFieldComponent(props);\n\n return (\n <TextFieldBase\n {...rest}\n {...fieldProps}\n className={clsx(rest.className, fieldProps.className)}\n FieldErrorView={FieldErrorView}\n input={input}\n >\n <PropsContextProvider props={fieldPropsContext}>\n {children}\n </PropsContextProvider>\n </TextFieldBase>\n );\n});\n\nexport default TextArea;\n"],"names":["rows"],"mappings":"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"}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
3
|
const textArea = "flow--text-area";
|
|
4
|
+
const horizontalResize = "flow--text-area--horizontal-resize";
|
|
5
|
+
const verticalResize = "flow--text-area--vertical-resize";
|
|
6
|
+
const resize = "flow--text-area--resize";
|
|
4
7
|
const styles = {
|
|
5
|
-
textArea: textArea
|
|
8
|
+
textArea: textArea,
|
|
9
|
+
horizontalResize: horizontalResize,
|
|
10
|
+
verticalResize: verticalResize,
|
|
11
|
+
resize: resize
|
|
6
12
|
};
|
|
7
13
|
|
|
8
|
-
export { styles as default, textArea };
|
|
14
|
+
export { styles as default, horizontalResize, resize, textArea, verticalResize };
|
|
9
15
|
//# sourceMappingURL=TextArea.module.scss.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.module.scss.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextArea.module.scss.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
import { memo, useContext } from 'react';
|
|
5
|
+
import { Flex } from '../components/Flex/Flex.mjs';
|
|
6
|
+
import { viewComponentContext } from '../lib/viewComponentContext/viewComponentContext.mjs';
|
|
7
|
+
|
|
8
|
+
const FlexView = memo((props) => {
|
|
9
|
+
const View = useContext(viewComponentContext)["Flex"] ?? Flex;
|
|
10
|
+
return /* @__PURE__ */ jsx(View, { ...props });
|
|
11
|
+
});
|
|
12
|
+
FlexView.displayName = "FlexView";
|
|
13
|
+
|
|
14
|
+
export { FlexView as default };
|
|
15
|
+
//# sourceMappingURL=FlexView.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FlexView.mjs","sources":["../../../../../src/views/FlexView.tsx"],"sourcesContent":["/* prettier-ignore */\n/* This file is auto-generated with the remote-components-generator */\nimport React, { memo, type FC, useContext } from \"react\";\nimport { Flex, type FlexProps } from \"@/components/Flex/Flex\";\nimport { viewComponentContext } from \"@/lib/viewComponentContext/viewComponentContext\";\n\nconst FlexView: FC<FlexProps> = memo((props) => {\n const View = useContext(viewComponentContext)[\"Flex\"] ?? Flex;\n return <View {...props} />;\n});\nFlexView.displayName = \"FlexView\";\n\nexport default FlexView;\n"],"names":[],"mappings":";;;;;AAMA,MAAM,QAAA,GAA0B,IAAA,CAAK,CAAC,KAAA,KAAU;AAC9C,EAAA,MAAM,IAAA,GAAO,UAAA,CAAW,oBAAoB,CAAA,CAAE,MAAM,CAAA,IAAK,IAAA;AACzD,EAAA,uBAAO,GAAA,CAAC,IAAA,EAAA,EAAM,GAAG,KAAA,EAAO,CAAA;AAC1B,CAAC;AACD,QAAA,CAAS,WAAA,GAAc,UAAA;;;;"}
|