@mittwald/flow-react-components 1.6.0-next.56 → 1.6.0-next.58
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/AGENTS.md +4 -0
- package/dist/assets/component-index.json +1 -1
- package/dist/assets/doc-properties.json +1 -1
- package/dist/js/packages/components/src/components/AccentBox/AccentBox.mjs +2 -1
- package/dist/js/packages/components/src/components/AccentBox/AccentBox.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Accordion/Accordion.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Action/lib/ariaLive.mjs.map +1 -1
- package/dist/js/packages/components/src/components/AlertText/AlertText.mjs +2 -1
- package/dist/js/packages/components/src/components/AlertText/AlertText.mjs.map +1 -1
- package/dist/js/packages/components/src/components/BrowserOnly/BrowserOnly.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Chat/Chat.mjs +2 -1
- package/dist/js/packages/components/src/components/Chat/Chat.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Combine/Combine.mjs +2 -1
- package/dist/js/packages/components/src/components/Combine/Combine.mjs.map +1 -1
- package/dist/js/packages/components/src/components/ComponentUsageProvider/ComponentUsageProvider.mjs.map +1 -1
- package/dist/js/packages/components/src/components/FileCard/FileCard.mjs +2 -1
- package/dist/js/packages/components/src/components/FileCard/FileCard.mjs.map +1 -1
- package/dist/js/packages/components/src/components/FileDropZone/FileDropZone.mjs +4 -4
- package/dist/js/packages/components/src/components/FileDropZone/FileDropZone.mjs.map +1 -1
- package/dist/js/packages/components/src/components/LightBox/components/LightBoxGallery/LightBoxGallery.mjs +6 -3
- package/dist/js/packages/components/src/components/LightBox/components/LightBoxGallery/LightBoxGallery.mjs.map +1 -1
- package/dist/js/packages/components/src/components/LightBox/components/LightBoxGalleryItem/LightBoxGalleryItem.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Items/components/Item/hooks/useGridItemProps.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/hooks/useAriaAnnounceSearchState.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/model/List.mjs +3 -2
- package/dist/js/packages/components/src/components/List/model/List.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/model/loading/IncrementalLoader.mjs +9 -6
- package/dist/js/packages/components/src/components/List/model/loading/IncrementalLoader.mjs.map +1 -1
- package/dist/js/packages/components/src/components/LoadingSpinner/LoadingSpinner.mjs +18 -12
- package/dist/js/packages/components/src/components/LoadingSpinner/LoadingSpinner.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Message/Message.mjs +2 -1
- package/dist/js/packages/components/src/components/Message/Message.mjs.map +1 -1
- package/dist/js/packages/components/src/components/MessageThread/MessageThread.mjs +2 -1
- package/dist/js/packages/components/src/components/MessageThread/MessageThread.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Navigation/components/NavigationGroup/NavigationGroup.mjs +3 -1
- package/dist/js/packages/components/src/components/Navigation/components/NavigationGroup/NavigationGroup.mjs.map +1 -1
- package/dist/js/packages/components/src/components/PasswordCreationField/lib/ariaAnnounce.mjs.map +1 -1
- package/dist/js/packages/components/src/components/PasswordCreationField/lib/usePolicyValidationResult.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Section/components/SectionHeader/SectionHeader.mjs.map +1 -1
- package/dist/js/packages/components/src/components/SettingsProvider/SettingsProvider.mjs.map +1 -1
- package/dist/js/packages/components/src/components/SuspenseTrigger/SuspenseTrigger.mjs.map +1 -1
- package/dist/js/packages/components/src/components/TextArea/TextArea.mjs.map +1 -1
- package/dist/js/packages/components/src/components/TranslationProvider/TranslationProvider.mjs.map +1 -1
- package/dist/js/packages/components/src/components/TunnelEntry/TunnelEntry.mjs.map +1 -1
- package/dist/js/packages/components/src/components/UiComponentTunnel/UiComponentTunnelEntry.mjs.map +1 -1
- package/dist/js/packages/components/src/components/UiComponentTunnel/UiComponentTunnelExit.mjs.map +1 -1
- package/dist/js/packages/components/src/components/UiComponentTunnel/UiComponentTunnelProvider.mjs.map +1 -1
- package/dist/js/packages/components/src/components/propTypes/index.mjs +1 -1
- package/dist/js/packages/components/src/components/propTypes/index.mjs.map +1 -1
- package/dist/js/packages/components/src/integrations/react-hook-form/components/Form/Form.mjs.map +1 -1
- package/dist/js/packages/components/src/integrations/react-hook-form/components/FormContextProvider/useFormSubmitAction.mjs.map +1 -1
- package/dist/js/packages/components/src/lib/controller/overlay/OverlayController.mjs +7 -5
- package/dist/js/packages/components/src/lib/controller/overlay/OverlayController.mjs.map +1 -1
- package/dist/js/packages/components/src/lib/hooks/dom/useMakeFocusable.mjs.map +1 -1
- package/dist/js/packages/components/src/lib/hooks/useFieldError.mjs.map +1 -1
- package/dist/js/packages/components/src/lib/hooks/useOnChange.mjs.map +1 -1
- package/dist/js/packages/components/src/lib/mobx/useSelector.mjs.map +1 -1
- package/dist/js/packages/components/src/lib/propsContext/components/ClearPropsContext.mjs.map +1 -1
- package/dist/js/packages/components/src/lib/propsContext/components/ComponentPropsContextProvider.mjs.map +1 -1
- package/dist/js/packages/components/src/lib/remote/useControlledHostValueProps.mjs +1 -1
- package/dist/js/packages/components/src/lib/remote/useControlledHostValueProps.mjs.map +1 -1
- package/dist/types/components/AccentBox/AccentBox.d.ts +2 -2
- package/dist/types/components/Accordion/Accordion.d.ts +4 -3
- package/dist/types/components/AlertText/AlertText.d.ts +2 -2
- package/dist/types/components/Chat/Chat.d.ts +4 -3
- package/dist/types/components/FileDropZone/FileDropZone.d.ts +2 -2
- package/dist/types/components/LightBox/components/LightBoxGallery/LightBoxGallery.d.ts +3 -2
- package/dist/types/components/LightBox/components/LightBoxGalleryItem/LightBoxGalleryItem.d.ts +3 -2
- package/dist/types/components/List/components/ListItemView/ListItemView.d.ts +1 -9
- package/dist/types/components/List/typedList.d.ts +27 -35
- package/dist/types/components/LoadingSpinner/LoadingSpinner.d.ts +1 -2
- package/dist/types/components/Message/Message.d.ts +2 -2
- package/dist/types/components/MessageThread/MessageThread.d.ts +2 -2
- package/dist/types/components/Section/components/SectionHeader/SectionHeader.d.ts +6 -3
- package/dist/types/components/propTypes/index.d.ts +4 -4
- package/dist/types/lib/tokens/getCategoricalColorByIndex.d.ts +1 -1
- package/package.json +10 -10
- package/dist/types/lib/mobx/useAutorunEffect.d.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFormSubmitAction.mjs","names":[],"sources":["../../../../../../../../../src/integrations/react-hook-form/components/FormContextProvider/useFormSubmitAction.ts"],"sourcesContent":["import { AbortActionError, type ActionProps } from \"@/components/Action\";\nimport { ActionModel } from \"@/components/Action/models/ActionModel\";\nimport { useEffect, useRef } from \"react\";\nimport type { FieldValues, FormState } from \"react-hook-form\";\n\nexport const useFormSubmitAction = (\n formState: FormState<FieldValues>,\n actionProps?: ActionProps,\n) => {\n const { isSubmitting, isSubmitSuccessful } = formState;\n\n const submitPromise = useRef<PromiseWithResolvers<void>>(undefined);\n\n const formSubmitAction = ActionModel.useNew({\n ...actionProps,\n onAction: () => {\n submitPromise.current = Promise.withResolvers<void>();\n actionProps?.onAction?.();\n return submitPromise.current.promise;\n },\n });\n\n useEffect(() => {\n if (isSubmitting) {\n if (!formSubmitAction.state.isBusy) {\n /**\n * Manually start execution. This happens if the form submission was\n * triggered by other means than the submit button, e.g. by pressing\n * Enter in a text field.\n */\n formSubmitAction.execute();\n }\n return;\n }\n\n if (isSubmitSuccessful) {\n submitPromise.current?.resolve();\n return;\n }\n\n submitPromise.current?.reject(\n new AbortActionError(\"Form submission failed\"),\n );\n }, [isSubmitting, isSubmitSuccessful, submitPromise]);\n\n return formSubmitAction;\n};\n"],"mappings":";;;;;;AAKA,IAAa,uBACX,WACA,gBACG;CACH,MAAM,EAAE,cAAc,uBAAuB;CAE7C,MAAM,gBAAgB,OAAmC,KAAA,CAAS;CAElE,MAAM,mBAAmB,YAAY,OAAO;EAC1C,GAAG;EACH,gBAAgB;GACd,cAAc,UAAU,QAAQ,cAAoB;GACpD,aAAa,WAAW;GACxB,OAAO,cAAc,QAAQ;EAC/B;CACF,CAAC;CAED,gBAAgB;EACd,IAAI,cAAc;GAChB,IAAI,CAAC,iBAAiB,MAAM;;;;;;GAM1B,iBAAiB,QAAQ;GAE3B;EACF;EAEA,IAAI,oBAAoB;GACtB,cAAc,SAAS,QAAQ;GAC/B;EACF;EAEA,cAAc,SAAS,OACrB,IAAI,iBAAiB,wBAAwB,CAC/C;
|
|
1
|
+
{"version":3,"file":"useFormSubmitAction.mjs","names":[],"sources":["../../../../../../../../../src/integrations/react-hook-form/components/FormContextProvider/useFormSubmitAction.ts"],"sourcesContent":["import { AbortActionError, type ActionProps } from \"@/components/Action\";\nimport { ActionModel } from \"@/components/Action/models/ActionModel\";\nimport { useEffect, useRef } from \"react\";\nimport type { FieldValues, FormState } from \"react-hook-form\";\n\nexport const useFormSubmitAction = (\n formState: FormState<FieldValues>,\n actionProps?: ActionProps,\n) => {\n const { isSubmitting, isSubmitSuccessful } = formState;\n\n const submitPromise = useRef<PromiseWithResolvers<void>>(undefined);\n\n const formSubmitAction = ActionModel.useNew({\n ...actionProps,\n onAction: () => {\n submitPromise.current = Promise.withResolvers<void>();\n actionProps?.onAction?.();\n return submitPromise.current.promise;\n },\n });\n\n useEffect(() => {\n if (isSubmitting) {\n if (!formSubmitAction.state.isBusy) {\n /**\n * Manually start execution. This happens if the form submission was\n * triggered by other means than the submit button, e.g. by pressing\n * Enter in a text field.\n */\n formSubmitAction.execute();\n }\n return;\n }\n\n if (isSubmitSuccessful) {\n submitPromise.current?.resolve();\n return;\n }\n\n submitPromise.current?.reject(\n new AbortActionError(\"Form submission failed\"),\n );\n // eslint-disable-next-line react-hooks/exhaustive-deps -- the action model is new each render; react to form state changes only\n }, [isSubmitting, isSubmitSuccessful, submitPromise]);\n\n return formSubmitAction;\n};\n"],"mappings":";;;;;;AAKA,IAAa,uBACX,WACA,gBACG;CACH,MAAM,EAAE,cAAc,uBAAuB;CAE7C,MAAM,gBAAgB,OAAmC,KAAA,CAAS;CAElE,MAAM,mBAAmB,YAAY,OAAO;EAC1C,GAAG;EACH,gBAAgB;GACd,cAAc,UAAU,QAAQ,cAAoB;GACpD,aAAa,WAAW;GACxB,OAAO,cAAc,QAAQ;EAC/B;CACF,CAAC;CAED,gBAAgB;EACd,IAAI,cAAc;GAChB,IAAI,CAAC,iBAAiB,MAAM;;;;;;GAM1B,iBAAiB,QAAQ;GAE3B;EACF;EAEA,IAAI,oBAAoB;GACtB,cAAc,SAAS,QAAQ;GAC/B;EACF;EAEA,cAAc,SAAS,OACrB,IAAI,iBAAiB,wBAAwB,CAC/C;CAEF,GAAG;EAAC;EAAc;EAAoB;CAAa,CAAC;CAEpD,OAAO;AACT"}
|
|
@@ -25,15 +25,16 @@ var OverlayController = class OverlayController extends OverlayState {
|
|
|
25
25
|
*/
|
|
26
26
|
useConfirmOnCloseSource(confirmOnClose) {
|
|
27
27
|
const source = useStatic(() => ({}));
|
|
28
|
+
const controller = this;
|
|
28
29
|
useEffect(() => {
|
|
29
30
|
if (confirmOnClose === void 0) {
|
|
30
|
-
|
|
31
|
+
controller.removeConfirmOnCloseSource(source);
|
|
31
32
|
return;
|
|
32
33
|
}
|
|
33
|
-
|
|
34
|
-
return () =>
|
|
34
|
+
controller.setConfirmOnCloseSource(source, confirmOnClose);
|
|
35
|
+
return () => controller.removeConfirmOnCloseSource(source);
|
|
35
36
|
}, [
|
|
36
|
-
|
|
37
|
+
controller,
|
|
37
38
|
source,
|
|
38
39
|
confirmOnClose
|
|
39
40
|
]);
|
|
@@ -66,7 +67,8 @@ var OverlayController = class OverlayController extends OverlayState {
|
|
|
66
67
|
return controller;
|
|
67
68
|
}
|
|
68
69
|
useOnHandler(handler, addHandlerFn) {
|
|
69
|
-
|
|
70
|
+
const controller = this;
|
|
71
|
+
useEffect(() => handler ? addHandlerFn(handler) : void 0, [handler, controller]);
|
|
70
72
|
}
|
|
71
73
|
useIsOpen() {
|
|
72
74
|
return useSelector(() => this.isOpen);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverlayController.mjs","names":[],"sources":["../../../../../../../../src/lib/controller/overlay/OverlayController.ts"],"sourcesContent":["import {\n OverlayState,\n type AnyOverlayOpenStateHandler,\n type DisposerFn,\n type OverlayCloseHandler,\n type OverlayCloseOptions,\n type OverlayOpenHandler,\n type OverlayOpenStateHandler,\n} from \"@mittwald/flow-components-base\";\nimport useSelector from \"@/lib/mobx/useSelector\";\nimport { useStatic } from \"@/lib/hooks/useStatic\";\nimport { useEffect, useRef, type DependencyList } from \"react\";\nimport { useCloseOverlayConfirmationController } from \"@/lib/controller/overlay/useCloseOverlayConfirmationController\";\nimport type { FlowComponentName } from \"@/components/propTypes\";\n\nexport type {\n OverlayCloseHandler,\n OverlayOpenHandler,\n OverlayOpenStateHandler,\n} from \"@mittwald/flow-components-base\";\n\nexport interface CloseOverlayOptions extends OverlayCloseOptions {\n /**\n * The overlay to close. Omitted, the nearest enclosing overlay is closed –\n * the same thing `closeOverlay={true}` means.\n */\n overlay?: FlowComponentName | OverlayController;\n}\n\nexport interface OnOverlayClosedOptions {\n dependencies?: DependencyList;\n}\n\nexport type CloseModalOptions = Omit<CloseOverlayOptions, \"overlay\">;\n\n/**\n * Every way an action can point at an overlay: by the Flow component name it\n * registers under, by controller, by options, or with `true` – the nearest\n * enclosing overlay, whatever its name.\n */\nexport type OverlayReference =\n FlowComponentName | OverlayController | CloseOverlayOptions | true;\n\ntype CloseOptions = CloseOverlayOptions | CloseModalOptions;\n\nexport interface OverlayControllerOptions {\n isDefaultOpen?: boolean;\n onOpen?: OverlayOpenHandler;\n onClose?: OverlayCloseHandler;\n onOpenChange?: OverlayOpenStateHandler;\n /**\n * Whether closing the overlay must be confirmed. `undefined` means \"no\n * opinion\": the value is not contributed at all, so other sources (e.g. a\n * `Modal`'s `confirmOnClose` prop or a dirty `Form`) still decide.\n */\n confirmOnClose?: boolean;\n}\n\n/**\n * The state is `OverlayState` from `@mittwald/flow-components-base`, shared\n * with every remote binding; this adds the hooks.\n */\nexport class OverlayController extends OverlayState<CloseOptions> {\n public useUpdateOptions(options: OverlayControllerOptions = {}): void {\n const { onOpen, onClose, onOpenChange, confirmOnClose } = options;\n\n this.useOnHandler(onOpen, (h) => this.addOnOpen(h));\n this.useOnHandler(onClose, (h) => this.addOnClose(h));\n this.useOnHandler(onOpenChange, (h) => this.addOnOpenChange(h));\n\n this.useConfirmOnCloseSource(confirmOnClose);\n }\n\n /**\n * Registers the calling component as a close confirmation source for as long\n * as it is mounted. `undefined` contributes nothing at all.\n */\n private useConfirmOnCloseSource(confirmOnClose: boolean | undefined): void {\n const source = useStatic((): object => ({}));\n\n useEffect(() => {\n if (confirmOnClose === undefined) {\n
|
|
1
|
+
{"version":3,"file":"OverlayController.mjs","names":[],"sources":["../../../../../../../../src/lib/controller/overlay/OverlayController.ts"],"sourcesContent":["import {\n OverlayState,\n type AnyOverlayOpenStateHandler,\n type DisposerFn,\n type OverlayCloseHandler,\n type OverlayCloseOptions,\n type OverlayOpenHandler,\n type OverlayOpenStateHandler,\n} from \"@mittwald/flow-components-base\";\nimport useSelector from \"@/lib/mobx/useSelector\";\nimport { useStatic } from \"@/lib/hooks/useStatic\";\nimport { useEffect, useRef, type DependencyList } from \"react\";\nimport { useCloseOverlayConfirmationController } from \"@/lib/controller/overlay/useCloseOverlayConfirmationController\";\nimport type { FlowComponentName } from \"@/components/propTypes\";\n\nexport type {\n OverlayCloseHandler,\n OverlayOpenHandler,\n OverlayOpenStateHandler,\n} from \"@mittwald/flow-components-base\";\n\nexport interface CloseOverlayOptions extends OverlayCloseOptions {\n /**\n * The overlay to close. Omitted, the nearest enclosing overlay is closed –\n * the same thing `closeOverlay={true}` means.\n */\n overlay?: FlowComponentName | OverlayController;\n}\n\nexport interface OnOverlayClosedOptions {\n dependencies?: DependencyList;\n}\n\nexport type CloseModalOptions = Omit<CloseOverlayOptions, \"overlay\">;\n\n/**\n * Every way an action can point at an overlay: by the Flow component name it\n * registers under, by controller, by options, or with `true` – the nearest\n * enclosing overlay, whatever its name.\n */\nexport type OverlayReference =\n FlowComponentName | OverlayController | CloseOverlayOptions | true;\n\ntype CloseOptions = CloseOverlayOptions | CloseModalOptions;\n\nexport interface OverlayControllerOptions {\n isDefaultOpen?: boolean;\n onOpen?: OverlayOpenHandler;\n onClose?: OverlayCloseHandler;\n onOpenChange?: OverlayOpenStateHandler;\n /**\n * Whether closing the overlay must be confirmed. `undefined` means \"no\n * opinion\": the value is not contributed at all, so other sources (e.g. a\n * `Modal`'s `confirmOnClose` prop or a dirty `Form`) still decide.\n */\n confirmOnClose?: boolean;\n}\n\n/**\n * The state is `OverlayState` from `@mittwald/flow-components-base`, shared\n * with every remote binding; this adds the hooks.\n */\nexport class OverlayController extends OverlayState<CloseOptions> {\n public useUpdateOptions(options: OverlayControllerOptions = {}): void {\n const { onOpen, onClose, onOpenChange, confirmOnClose } = options;\n\n this.useOnHandler(onOpen, (h) => this.addOnOpen(h));\n this.useOnHandler(onClose, (h) => this.addOnClose(h));\n this.useOnHandler(onOpenChange, (h) => this.addOnOpenChange(h));\n\n this.useConfirmOnCloseSource(confirmOnClose);\n }\n\n /**\n * Registers the calling component as a close confirmation source for as long\n * as it is mounted. `undefined` contributes nothing at all.\n */\n private useConfirmOnCloseSource(confirmOnClose: boolean | undefined): void {\n const source = useStatic((): object => ({}));\n // eslint-disable-next-line @typescript-eslint/no-this-alias -- a dependency must be a plain variable\n const controller = this;\n\n useEffect(() => {\n if (confirmOnClose === undefined) {\n controller.removeConfirmOnCloseSource(source);\n return;\n }\n controller.setConfirmOnCloseSource(source, confirmOnClose);\n return () => controller.removeConfirmOnCloseSource(source);\n }, [controller, source, confirmOnClose]);\n }\n\n /**\n * Can be used to execute a callback when the Overlay has unmounted – means\n * after any closing animation.\n *\n * NOTICE: This hook only works inside the corresponding Overlay!\n */\n public useOnClosed(\n callback: () => unknown,\n options: OnOverlayClosedOptions = {},\n ) {\n const { dependencies = [] } = options;\n const isOpen = this.useIsOpen();\n const wasOpen = useRef(this.isOpen);\n\n this.useUpdateOptions({\n onOpen: () => {\n wasOpen.current = true;\n },\n });\n\n useEffect(() => {\n return () => {\n if (!isOpen && wasOpen.current) {\n wasOpen.current = false;\n callback();\n }\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps -- the caller passes the callback's dependencies\n }, [isOpen, ...dependencies]);\n }\n\n public static useNew(\n options: OverlayControllerOptions = {},\n ): OverlayController {\n const controller = useStatic(() => new OverlayController(options));\n controller.useUpdateOptions(options);\n return controller;\n }\n\n private useOnHandler<T extends AnyOverlayOpenStateHandler>(\n handler: T | undefined,\n addHandlerFn: (handler: T) => DisposerFn,\n ) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias -- a dependency must be a plain variable\n const controller = this;\n\n useEffect(\n () => (handler ? addHandlerFn(handler) : undefined),\n // eslint-disable-next-line react-hooks/exhaustive-deps -- addHandlerFn is an inline arrow, new each render\n [handler, controller],\n );\n }\n\n public useIsOpen() {\n return useSelector(() => this.isOpen);\n }\n\n public useIsContentSuspended() {\n return useSelector(() => this.isContentSuspended);\n }\n\n public useShowConfirmationModal() {\n return useSelector(() => this.showConfirmationModal);\n }\n\n public useConfirmOnCloseEnabled() {\n return useSelector(() => this.confirmOnCloseEnabled);\n }\n\n public useConfirmationController() {\n return useCloseOverlayConfirmationController(this);\n }\n}\n"],"mappings":";;;;;;;;;;;;;AA8DA,IAAa,oBAAb,MAAa,0BAA0B,aAA2B;CAChE,iBAAwB,UAAoC,CAAC,GAAS;EACpE,MAAM,EAAE,QAAQ,SAAS,cAAc,mBAAmB;EAE1D,KAAK,aAAa,SAAS,MAAM,KAAK,UAAU,CAAC,CAAC;EAClD,KAAK,aAAa,UAAU,MAAM,KAAK,WAAW,CAAC,CAAC;EACpD,KAAK,aAAa,eAAe,MAAM,KAAK,gBAAgB,CAAC,CAAC;EAE9D,KAAK,wBAAwB,cAAc;CAC7C;;;;;CAMA,wBAAgC,gBAA2C;EACzE,MAAM,SAAS,iBAAyB,CAAC,EAAE;EAE3C,MAAM,aAAa;EAEnB,gBAAgB;GACd,IAAI,mBAAmB,KAAA,GAAW;IAChC,WAAW,2BAA2B,MAAM;IAC5C;GACF;GACA,WAAW,wBAAwB,QAAQ,cAAc;GACzD,aAAa,WAAW,2BAA2B,MAAM;EAC3D,GAAG;GAAC;GAAY;GAAQ;EAAc,CAAC;CACzC;;;;;;;CAQA,YACE,UACA,UAAkC,CAAC,GACnC;EACA,MAAM,EAAE,eAAe,CAAC,MAAM;EAC9B,MAAM,SAAS,KAAK,UAAU;EAC9B,MAAM,UAAU,OAAO,KAAK,MAAM;EAElC,KAAK,iBAAiB,EACpB,cAAc;GACZ,QAAQ,UAAU;EACpB,EACF,CAAC;EAED,gBAAgB;GACd,aAAa;IACX,IAAI,CAAC,UAAU,QAAQ,SAAS;KAC9B,QAAQ,UAAU;KAClB,SAAS;IACX;GACF;EAEF,GAAG,CAAC,QAAQ,GAAG,YAAY,CAAC;CAC9B;CAEA,OAAc,OACZ,UAAoC,CAAC,GAClB;EACnB,MAAM,aAAa,gBAAgB,IAAI,kBAAkB,OAAO,CAAC;EACjE,WAAW,iBAAiB,OAAO;EACnC,OAAO;CACT;CAEA,aACE,SACA,cACA;EAEA,MAAM,aAAa;EAEnB,gBACS,UAAU,aAAa,OAAO,IAAI,KAAA,GAEzC,CAAC,SAAS,UAAU,CACtB;CACF;CAEA,YAAmB;EACjB,OAAO,kBAAkB,KAAK,MAAM;CACtC;CAEA,wBAA+B;EAC7B,OAAO,kBAAkB,KAAK,kBAAkB;CAClD;CAEA,2BAAkC;EAChC,OAAO,kBAAkB,KAAK,qBAAqB;CACrD;CAEA,2BAAkC;EAChC,OAAO,kBAAkB,KAAK,qBAAqB;CACrD;CAEA,4BAAmC;EACjC,OAAO,sCAAsC,IAAI;CACnD;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMakeFocusable.mjs","names":[],"sources":["../../../../../../../../src/lib/hooks/dom/useMakeFocusable.ts"],"sourcesContent":["import { type RefObject, useEffect } from \"react\";\n\n/**\n * A hook that makes an element focusable and calls a callback when it receives\n * focus.\n */\nexport const useMakeFocusable = (\n ref: RefObject<unknown>,\n onFocus?: CallableFunction,\n) => {\n useEffect(() => {\n const element = ref.current;\n const shouldProcessElement = element && element instanceof HTMLElement;\n\n if (!shouldProcessElement) {\n return;\n }\n\n const onFocusHandler = () => onFocus?.();\n element.addEventListener(\"focus\", onFocusHandler);\n\n const hasTabIndex = element.hasAttribute(\"tabIndex\");\n if (!hasTabIndex) {\n // when we have no tabIndex, we set it to -1 to make it focusable\n element.setAttribute(\"tabIndex\", \"-1\");\n }\n\n return () => {\n element.removeEventListener(\"focus\", onFocusHandler);\n if (!hasTabIndex) {\n element.removeAttribute(\"tabIndex\");\n }\n };\n }, [ref.current, onFocus]);\n};\n"],"mappings":";;;;;;;;AAMA,IAAa,oBACX,KACA,YACG;CACH,gBAAgB;EACd,MAAM,UAAU,IAAI;EAGpB,IAAI,EAFyB,WAAW,mBAAmB,cAGzD;EAGF,MAAM,uBAAuB,UAAU;EACvC,QAAQ,iBAAiB,SAAS,cAAc;EAEhD,MAAM,cAAc,QAAQ,aAAa,UAAU;EACnD,IAAI,CAAC,aAEH,QAAQ,aAAa,YAAY,IAAI;EAGvC,aAAa;GACX,QAAQ,oBAAoB,SAAS,cAAc;GACnD,IAAI,CAAC,aACH,QAAQ,gBAAgB,UAAU;EAEtC;
|
|
1
|
+
{"version":3,"file":"useMakeFocusable.mjs","names":[],"sources":["../../../../../../../../src/lib/hooks/dom/useMakeFocusable.ts"],"sourcesContent":["import { type RefObject, useEffect } from \"react\";\n\n/**\n * A hook that makes an element focusable and calls a callback when it receives\n * focus.\n */\nexport const useMakeFocusable = (\n ref: RefObject<unknown>,\n onFocus?: CallableFunction,\n) => {\n useEffect(() => {\n const element = ref.current;\n const shouldProcessElement = element && element instanceof HTMLElement;\n\n if (!shouldProcessElement) {\n return;\n }\n\n const onFocusHandler = () => onFocus?.();\n element.addEventListener(\"focus\", onFocusHandler);\n\n const hasTabIndex = element.hasAttribute(\"tabIndex\");\n if (!hasTabIndex) {\n // when we have no tabIndex, we set it to -1 to make it focusable\n element.setAttribute(\"tabIndex\", \"-1\");\n }\n\n return () => {\n element.removeEventListener(\"focus\", onFocusHandler);\n if (!hasTabIndex) {\n element.removeAttribute(\"tabIndex\");\n }\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps -- re-attach when the ref points to a new element\n }, [ref.current, onFocus]);\n};\n"],"mappings":";;;;;;;;AAMA,IAAa,oBACX,KACA,YACG;CACH,gBAAgB;EACd,MAAM,UAAU,IAAI;EAGpB,IAAI,EAFyB,WAAW,mBAAmB,cAGzD;EAGF,MAAM,uBAAuB,UAAU;EACvC,QAAQ,iBAAiB,SAAS,cAAc;EAEhD,MAAM,cAAc,QAAQ,aAAa,UAAU;EACnD,IAAI,CAAC,aAEH,QAAQ,aAAa,YAAY,IAAI;EAGvC,aAAa;GACX,QAAQ,oBAAoB,SAAS,cAAc;GACnD,IAAI,CAAC,aACH,QAAQ,gBAAgB,UAAU;EAEtC;CAEF,GAAG,CAAC,IAAI,SAAS,OAAO,CAAC;AAC3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFieldError.mjs","names":["formFieldStyles"],"sources":["../../../../../../../src/lib/hooks/useFieldError.tsx"],"sourcesContent":["import React, {\n type FC,\n type PropsWithChildren,\n useMemo,\n useState,\n} from \"react\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport formFieldStyles from \"@/components/FormField/FormField.module.scss\";\nimport ClearPropsContext from \"@/lib/propsContext/components/ClearPropsContext\";\nimport { useProps } from \"@/lib/hooks/useProps\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\nimport type { FlowComponentName } from \"@/components/propTypes\";\nimport { FieldErrorRenderedContext } from \"@/lib/hooks/fieldErrorRenderedContext\";\n\nexport interface UseFieldErrorOptions {\n fieldErrorId: string;\n tunnelId?: string;\n component: FlowComponentName;\n}\n\nexport const useFieldError = (options: UseFieldErrorOptions) => {\n const fieldErrorProps = useProps(\"FieldError\", {});\n const currentTunnelId = fieldErrorProps.tunnel?.id;\n const tunnelId =\n options.tunnelId ?? currentTunnelId ?? `${options.fieldErrorId}.fieldError`;\n\n const fieldErrorCapturePropsContext: PropsContext = {\n FieldError: {\n id: options.fieldErrorId,\n tunnel: { id: tunnelId, component: options.component },\n className: formFieldStyles.fieldError,\n },\n };\n\n const [renderedFieldErrorId, setRenderedFieldErrorId] = useState<string>();\n\n const FieldErrorCaptureContext: FC<PropsWithChildren> = useMemo(\n () => (props) => {\n return (\n <PropsContextProvider\n props={fieldErrorCapturePropsContext}\n dependencies={[tunnelId]}\n >\n {props.children}\n </PropsContextProvider>\n );\n },\n [tunnelId],\n );\n\n // Keep the component identity stable: a new one per render makes React\n // remount the error on every render of the field (each keystroke).\n const FieldErrorView: FC = useMemo(\n () => () => {\n if (currentTunnelId) {\n return null;\n }\n\n return (\n <FieldErrorRenderedContext value={setRenderedFieldErrorId}>\n <UiComponentTunnelExit id={tunnelId} component={options.component}>\n {(children) => {\n const childrenArray = React.Children.toArray(children);\n return <ClearPropsContext>{childrenArray[0]}</ClearPropsContext>;\n }}\n </UiComponentTunnelExit>\n </FieldErrorRenderedContext>\n );\n },\n [currentTunnelId, tunnelId, options.component],\n );\n\n return {\n FieldErrorCaptureContext,\n FieldErrorView,\n /**\n * The id of the error while one is rendered for this field. A nested field\n * (a `Checkbox` inside a `CheckboxButton`) renders its error at the outer\n * one, so only the outer field ever gets an id here.\n */\n renderedFieldErrorId,\n } as const;\n};\n"],"mappings":";;;;;;;;;;;AAoBA,IAAa,iBAAiB,YAAkC;CAE9D,MAAM,kBADkB,SAAS,cAAc,CAAC,CACxB,CAAA,CAAgB,QAAQ;CAChD,MAAM,WACJ,QAAQ,YAAY,mBAAmB,GAAG,QAAQ,aAAa;CAEjE,MAAM,gCAA8C,EAClD,YAAY;EACV,IAAI,QAAQ;EACZ,QAAQ;GAAE,IAAI;GAAU,WAAW,QAAQ;EAAU;EACrD,WAAWA,yBAAgB;CAC7B,EACF;CAEA,MAAM,CAAC,sBAAsB,2BAA2B,SAAiB;
|
|
1
|
+
{"version":3,"file":"useFieldError.mjs","names":["formFieldStyles"],"sources":["../../../../../../../src/lib/hooks/useFieldError.tsx"],"sourcesContent":["import React, {\n type FC,\n type PropsWithChildren,\n useMemo,\n useState,\n} from \"react\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport formFieldStyles from \"@/components/FormField/FormField.module.scss\";\nimport ClearPropsContext from \"@/lib/propsContext/components/ClearPropsContext\";\nimport { useProps } from \"@/lib/hooks/useProps\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\nimport type { FlowComponentName } from \"@/components/propTypes\";\nimport { FieldErrorRenderedContext } from \"@/lib/hooks/fieldErrorRenderedContext\";\n\nexport interface UseFieldErrorOptions {\n fieldErrorId: string;\n tunnelId?: string;\n component: FlowComponentName;\n}\n\nexport const useFieldError = (options: UseFieldErrorOptions) => {\n const fieldErrorProps = useProps(\"FieldError\", {});\n const currentTunnelId = fieldErrorProps.tunnel?.id;\n const tunnelId =\n options.tunnelId ?? currentTunnelId ?? `${options.fieldErrorId}.fieldError`;\n\n const fieldErrorCapturePropsContext: PropsContext = {\n FieldError: {\n id: options.fieldErrorId,\n tunnel: { id: tunnelId, component: options.component },\n className: formFieldStyles.fieldError,\n },\n };\n\n const [renderedFieldErrorId, setRenderedFieldErrorId] = useState<string>();\n\n const FieldErrorCaptureContext: FC<PropsWithChildren> = useMemo(\n () => (props) => {\n return (\n <PropsContextProvider\n props={fieldErrorCapturePropsContext}\n dependencies={[tunnelId]}\n >\n {props.children}\n </PropsContextProvider>\n );\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps -- the props context is new each render and only changes with tunnelId\n [tunnelId],\n );\n\n // Keep the component identity stable: a new one per render makes React\n // remount the error on every render of the field (each keystroke).\n const FieldErrorView: FC = useMemo(\n () => () => {\n if (currentTunnelId) {\n return null;\n }\n\n return (\n <FieldErrorRenderedContext value={setRenderedFieldErrorId}>\n <UiComponentTunnelExit id={tunnelId} component={options.component}>\n {(children) => {\n const childrenArray = React.Children.toArray(children);\n return <ClearPropsContext>{childrenArray[0]}</ClearPropsContext>;\n }}\n </UiComponentTunnelExit>\n </FieldErrorRenderedContext>\n );\n },\n [currentTunnelId, tunnelId, options.component],\n );\n\n return {\n FieldErrorCaptureContext,\n FieldErrorView,\n /**\n * The id of the error while one is rendered for this field. A nested field\n * (a `Checkbox` inside a `CheckboxButton`) renders its error at the outer\n * one, so only the outer field ever gets an id here.\n */\n renderedFieldErrorId,\n } as const;\n};\n"],"mappings":";;;;;;;;;;;AAoBA,IAAa,iBAAiB,YAAkC;CAE9D,MAAM,kBADkB,SAAS,cAAc,CAAC,CACxB,CAAA,CAAgB,QAAQ;CAChD,MAAM,WACJ,QAAQ,YAAY,mBAAmB,GAAG,QAAQ,aAAa;CAEjE,MAAM,gCAA8C,EAClD,YAAY;EACV,IAAI,QAAQ;EACZ,QAAQ;GAAE,IAAI;GAAU,WAAW,QAAQ;EAAU;EACrD,WAAWA,yBAAgB;CAC7B,EACF;CAEA,MAAM,CAAC,sBAAsB,2BAA2B,SAAiB;CAuCzE,OAAO;EACL,0BAtCsD,eAC/C,UAAU;GACf,OACE,oBAAC,sBAAD;IACE,OAAO;IACP,cAAc,CAAC,QAAQ;IAEtB,UAAA,MAAM;GACa,CAAA;EAE1B,GAEA,CAAC,QAAQ,CA0BT;EACA,gBAtByB,oBACb;GACV,IAAI,iBACF,OAAO;GAGT,OACE,oBAAC,2BAAD;IAA2B,OAAO;IAChC,UAAA,oBAAC,uBAAD;KAAuB,IAAI;KAAU,WAAW,QAAQ;KACpD,WAAA,aAAa;MACb,MAAM,gBAAgB,MAAM,SAAS,QAAQ,QAAQ;MACrD,OAAO,oBAAC,mBAAD,EAAA,UAAoB,cAAc,GAAsB,CAAA;KACjE;IACqB,CAAA;GACE,CAAA;EAE/B,GACA;GAAC;GAAiB;GAAU,QAAQ;EAAS,CAK7C;;;;;;EAMA;CACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOnChange.mjs","names":[],"sources":["../../../../../../../src/lib/hooks/useOnChange.ts"],"sourcesContent":["import type { DependencyList } from \"react\";\nimport { useEffect, useRef } from \"react\";\n\nexport const useOnChange = (\n value: unknown,\n callback: () => void,\n dependencies: DependencyList = [],\n) => {\n const oldValue = useRef(value);\n\n useEffect(() => {\n if (oldValue.current !== value) {\n callback();\n }\n oldValue.current = value;\n }, [value, callback, ...dependencies]);\n};\n"],"mappings":";;;;AAGA,IAAa,eACX,OACA,UACA,eAA+B,CAAC,MAC7B;CACH,MAAM,WAAW,OAAO,KAAK;CAE7B,gBAAgB;EACd,IAAI,SAAS,YAAY,OACvB,SAAS;EAEX,SAAS,UAAU;
|
|
1
|
+
{"version":3,"file":"useOnChange.mjs","names":[],"sources":["../../../../../../../src/lib/hooks/useOnChange.ts"],"sourcesContent":["import type { DependencyList } from \"react\";\nimport { useEffect, useRef } from \"react\";\n\nexport const useOnChange = (\n value: unknown,\n callback: () => void,\n dependencies: DependencyList = [],\n) => {\n const oldValue = useRef(value);\n\n useEffect(() => {\n if (oldValue.current !== value) {\n callback();\n }\n oldValue.current = value;\n // eslint-disable-next-line react-hooks/exhaustive-deps -- the caller passes the callback's dependencies\n }, [value, callback, ...dependencies]);\n};\n"],"mappings":";;;;AAGA,IAAa,eACX,OACA,UACA,eAA+B,CAAC,MAC7B;CACH,MAAM,WAAW,OAAO,KAAK;CAE7B,gBAAgB;EACd,IAAI,SAAS,YAAY,OACvB,SAAS;EAEX,SAAS,UAAU;CAErB,GAAG;EAAC;EAAO;EAAU,GAAG;CAAY,CAAC;AACvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSelector.mjs","names":[],"sources":["../../../../../../../src/lib/mobx/useSelector.ts"],"sourcesContent":["import { autorun } from \"mobx\";\nimport { useEffect, useState } from \"react\";\n\nexport type MobXSelector<T> = () => T;\n\n/** Use this hook to select reactive state from the store */\nexport const useSelector = <T>(\n select: MobXSelector<T>,\n deps: unknown[] = [],\n): T => {\n const [selected, setSelected] = useState<T>(select());\n\n useEffect(() => {\n return autorun(() => {\n setSelected(select());\n });\n }, deps);\n\n return selected;\n};\n\nexport default useSelector;\n"],"mappings":";;;;;;AAMA,IAAa,eACX,QACA,OAAkB,CAAC,MACb;CACN,MAAM,CAAC,UAAU,eAAe,SAAY,OAAO,CAAC;CAEpD,gBAAgB;EACd,OAAO,cAAc;GACnB,YAAY,OAAO,CAAC;EACtB,CAAC;
|
|
1
|
+
{"version":3,"file":"useSelector.mjs","names":[],"sources":["../../../../../../../src/lib/mobx/useSelector.ts"],"sourcesContent":["import { autorun } from \"mobx\";\nimport { useEffect, useState } from \"react\";\n\nexport type MobXSelector<T> = () => T;\n\n/** Use this hook to select reactive state from the store */\nexport const useSelector = <T>(\n select: MobXSelector<T>,\n deps: unknown[] = [],\n): T => {\n const [selected, setSelected] = useState<T>(select());\n\n useEffect(() => {\n return autorun(() => {\n setSelected(select());\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps -- the caller passes the selector's dependencies\n }, deps);\n\n return selected;\n};\n\nexport default useSelector;\n"],"mappings":";;;;;;AAMA,IAAa,eACX,QACA,OAAkB,CAAC,MACb;CACN,MAAM,CAAC,UAAU,eAAe,SAAY,OAAO,CAAC;CAEpD,gBAAgB;EACd,OAAO,cAAc;GACnB,YAAY,OAAO,CAAC;EACtB,CAAC;CAEH,GAAG,IAAI;CAEP,OAAO;AACT"}
|
package/dist/js/packages/components/src/lib/propsContext/components/ClearPropsContext.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClearPropsContext.mjs","names":[],"sources":["../../../../../../../../src/lib/propsContext/components/ClearPropsContext.tsx"],"sourcesContent":["import { PropsContextProvider } from \"@/lib/propsContext/propsContext\";\nimport { type FC, type PropsWithChildren } from \"react\";\n\nexport type ClearPropsContextProps = PropsWithChildren;\n\nconst emptyPropsContext = {};\n\n/** @flr-generate all */\nexport const ClearPropsContext: FC<PropsWithChildren> = (props) => {\n const { children } = props;\n return (\n <PropsContextProvider value={emptyPropsContext}>\n {children}\n </PropsContextProvider>\n );\n};\n\nexport default ClearPropsContext;\n"],"mappings":";;;;;;AAKA,IAAM,oBAAoB,CAAC;;
|
|
1
|
+
{"version":3,"file":"ClearPropsContext.mjs","names":[],"sources":["../../../../../../../../src/lib/propsContext/components/ClearPropsContext.tsx"],"sourcesContent":["import { PropsContextProvider } from \"@/lib/propsContext/propsContext\";\nimport { type FC, type PropsWithChildren } from \"react\";\n\nexport type ClearPropsContextProps = PropsWithChildren;\n\nconst emptyPropsContext = {};\n\n/* Plain FC: factory infrastructure. */\n/** @flr-generate all */\nexport const ClearPropsContext: FC<PropsWithChildren> = (props) => {\n const { children } = props;\n return (\n <PropsContextProvider value={emptyPropsContext}>\n {children}\n </PropsContextProvider>\n );\n};\n\nexport default ClearPropsContext;\n"],"mappings":";;;;;;AAKA,IAAM,oBAAoB,CAAC;;AAI3B,IAAa,qBAA4C,UAAU;CACjE,MAAM,EAAE,aAAa;CACrB,OACE,oBAAC,sBAAD;EAAsB,OAAO;EAC1B;CACmB,CAAA;AAE1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentPropsContextProvider.mjs","names":[],"sources":["../../../../../../../../src/lib/propsContext/components/ComponentPropsContextProvider.tsx"],"sourcesContent":["import type { PropsContext } from \"@/lib/propsContext/types\";\nimport { PropsContextProvider } from \"@/lib/propsContext/components/PropsContextProvider\";\nimport { memo, type FC, type PropsWithChildren } from \"react\";\n\nexport interface ComponentPropsContextProviderProps extends PropsWithChildren {\n componentProps?: PropsContext;\n}\n\n/**\n * @flr-generate all\n * @flr-ignore-props componentProps\n */\nexport const ComponentPropsContextProvider: FC<ComponentPropsContextProviderProps> =\n memo((props) => {\n const { children, componentProps = {} } = props;\n return (\n <PropsContextProvider props={componentProps}>\n {children}\n </PropsContextProvider>\n );\n });\n\nComponentPropsContextProvider.displayName = \"ComponentPropsContextProvider\";\n"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"ComponentPropsContextProvider.mjs","names":[],"sources":["../../../../../../../../src/lib/propsContext/components/ComponentPropsContextProvider.tsx"],"sourcesContent":["import type { PropsContext } from \"@/lib/propsContext/types\";\nimport { PropsContextProvider } from \"@/lib/propsContext/components/PropsContextProvider\";\nimport { memo, type FC, type PropsWithChildren } from \"react\";\n\nexport interface ComponentPropsContextProviderProps extends PropsWithChildren {\n componentProps?: PropsContext;\n}\n\n/* Plain FC: factory infrastructure. */\n/**\n * @flr-generate all\n * @flr-ignore-props componentProps\n */\nexport const ComponentPropsContextProvider: FC<ComponentPropsContextProviderProps> =\n memo((props) => {\n const { children, componentProps = {} } = props;\n return (\n <PropsContextProvider props={componentProps}>\n {children}\n </PropsContextProvider>\n );\n });\n\nComponentPropsContextProvider.displayName = \"ComponentPropsContextProvider\";\n"],"mappings":";;;;;;;;;;AAaA,IAAa,gCACX,MAAM,UAAU;CACd,MAAM,EAAE,UAAU,iBAAiB,CAAC,MAAM;CAC1C,OACE,oBAAC,sBAAD;EAAsB,OAAO;EAC1B;CACmB,CAAA;AAE1B,CAAC;AAEH,8BAA8B,cAAc"}
|
|
@@ -22,7 +22,7 @@ var useControlledHostValueProps = (props, emptyValue) => {
|
|
|
22
22
|
const [value, setValue] = useState(regularValue !== void 0 ? regularValue : defaultValue !== void 0 ? defaultValue : emptyValue);
|
|
23
23
|
useLayoutEffect(() => {
|
|
24
24
|
if (regularValue !== void 0) setValue(regularValue);
|
|
25
|
-
}, [
|
|
25
|
+
}, [regularValue]);
|
|
26
26
|
const onChange = (v) => {
|
|
27
27
|
setValue(v);
|
|
28
28
|
onChangeFromProps?.(v);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useControlledHostValueProps.mjs","names":[],"sources":["../../../../../../../src/lib/remote/useControlledHostValueProps.ts"],"sourcesContent":["import { useLayoutEffect, useState } from \"react\";\nimport { controlledRemoteValueMarker } from \"./useControlledRemoteValueProps\";\nimport type { FieldProps } from \"@/lib/remote/types\";\n\n/**\n * Returns props with controlled value handling for remote components. It works\n * by omitting values resulting from a remotely executed event handler. These\n * values are marked by the `controlledRemoteValueMarker`.\n *\n * This hook is only necessary for text inputs. If not used the controlled input\n * value may be corrupted by interleaved host inputs and remote events.\n *\n * @param emptyValue What the field reports while nothing has been entered —\n * `\"\"` for a text input, `NaN` for a number, `null` for a date range. It is\n * the sentinel that keeps the field controlled from the first render; see\n * that convention in the package's AGENTS.md.\n */\nexport const useControlledHostValueProps = <T, P>(\n props: FieldProps<T, P>,\n emptyValue: T,\n) => {\n const {\n value: valueFromProps,\n onChange: onChangeFromProps,\n defaultValue,\n } = props;\n\n const regularValue =\n valueFromProps === controlledRemoteValueMarker ? undefined : valueFromProps;\n\n /*\n * Only `undefined` falls back, because only `undefined` reads as\n * uncontrolled: a caller-supplied `null` controls a `DateRangePicker` with no\n * range selected, so `??` would swallow it. The marker cannot appear on the\n * first render, so `regularValue` is the caller's own value here.\n */\n const [value, setValue] = useState(\n regularValue !== undefined\n ? regularValue\n : defaultValue !== undefined\n ? defaultValue\n : emptyValue,\n );\n\n useLayoutEffect(() => {\n if (regularValue !== undefined) {\n setValue(regularValue);\n }\n }, [
|
|
1
|
+
{"version":3,"file":"useControlledHostValueProps.mjs","names":[],"sources":["../../../../../../../src/lib/remote/useControlledHostValueProps.ts"],"sourcesContent":["import { useLayoutEffect, useState } from \"react\";\nimport { controlledRemoteValueMarker } from \"./useControlledRemoteValueProps\";\nimport type { FieldProps } from \"@/lib/remote/types\";\n\n/**\n * Returns props with controlled value handling for remote components. It works\n * by omitting values resulting from a remotely executed event handler. These\n * values are marked by the `controlledRemoteValueMarker`.\n *\n * This hook is only necessary for text inputs. If not used the controlled input\n * value may be corrupted by interleaved host inputs and remote events.\n *\n * @param emptyValue What the field reports while nothing has been entered —\n * `\"\"` for a text input, `NaN` for a number, `null` for a date range. It is\n * the sentinel that keeps the field controlled from the first render; see\n * that convention in the package's AGENTS.md.\n */\nexport const useControlledHostValueProps = <T, P>(\n props: FieldProps<T, P>,\n emptyValue: T,\n) => {\n const {\n value: valueFromProps,\n onChange: onChangeFromProps,\n defaultValue,\n } = props;\n\n const regularValue =\n valueFromProps === controlledRemoteValueMarker ? undefined : valueFromProps;\n\n /*\n * Only `undefined` falls back, because only `undefined` reads as\n * uncontrolled: a caller-supplied `null` controls a `DateRangePicker` with no\n * range selected, so `??` would swallow it. The marker cannot appear on the\n * first render, so `regularValue` is the caller's own value here.\n */\n const [value, setValue] = useState(\n regularValue !== undefined\n ? regularValue\n : defaultValue !== undefined\n ? defaultValue\n : emptyValue,\n );\n\n useLayoutEffect(() => {\n if (regularValue !== undefined) {\n setValue(regularValue);\n }\n }, [regularValue]);\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const onChange = (v: any) => {\n setValue(v);\n onChangeFromProps?.(v);\n };\n\n return {\n ...props,\n value,\n onChange,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAiBA,IAAa,+BACX,OACA,eACG;CACH,MAAM,EACJ,OAAO,gBACP,UAAU,mBACV,iBACE;CAEJ,MAAM,eACJ,mBAAA,oCAAiD,KAAA,IAAY;CAQ/D,MAAM,CAAC,OAAO,YAAY,SACxB,iBAAiB,KAAA,IACb,eACA,iBAAiB,KAAA,IACf,eACA,UACR;CAEA,sBAAsB;EACpB,IAAI,iBAAiB,KAAA,GACnB,SAAS,YAAY;CAEzB,GAAG,CAAC,YAAY,CAAC;CAGjB,MAAM,YAAY,MAAW;EAC3B,SAAS,CAAC;EACV,oBAAoB,CAAC;CACvB;CAEA,OAAO;EACL,GAAG;EACH;EACA;CACF;AACF"}
|
|
@@ -4,7 +4,7 @@ import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
|
4
4
|
declare const accentBoxBackgroundColors: readonly ["neutral", "blue", "violet", "teal", "lilac", "green", "navy", "gradient"];
|
|
5
5
|
type AccentBoxBackgroundColor = (typeof accentBoxBackgroundColors)[number];
|
|
6
6
|
type AccentBoxWithCustomBackgroundColor = AccentBoxBackgroundColor | (string & {});
|
|
7
|
-
export interface AccentBoxProps extends PropsWithChildren, PropsWithElementType<"div" | "section" | "article">, PropsWithClassName, FlowComponentProps {
|
|
7
|
+
export interface AccentBoxProps extends PropsWithChildren, PropsWithElementType<"div" | "section" | "article">, PropsWithClassName, FlowComponentProps<HTMLElement> {
|
|
8
8
|
/** The background color of the accent box. @default "neutral" */
|
|
9
9
|
backgroundColor?: AccentBoxWithCustomBackgroundColor;
|
|
10
10
|
/** The content color of the accent box. @default "default" */
|
|
@@ -18,5 +18,5 @@ export interface AccentBoxProps extends PropsWithChildren, PropsWithElementType<
|
|
|
18
18
|
* @flr-generate all
|
|
19
19
|
* @flowStatus beta
|
|
20
20
|
*/
|
|
21
|
-
export declare const AccentBox: import('react').FunctionComponent<AccentBoxProps & import('react').RefAttributes<
|
|
21
|
+
export declare const AccentBox: import('react').FunctionComponent<AccentBoxProps & import('react').RefAttributes<HTMLElement>>;
|
|
22
22
|
export default AccentBox;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { ComponentProps,
|
|
2
|
-
|
|
1
|
+
import { ComponentProps, PropsWithChildren } from 'react';
|
|
2
|
+
import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
3
|
+
export interface AccordionProps extends PropsWithChildren<ComponentProps<"div">>, FlowComponentProps<HTMLDivElement> {
|
|
3
4
|
/**
|
|
4
5
|
* The key of the accordion inside an `AccordionGroup`, used by its
|
|
5
6
|
* `expandedKeys`. Also set as the DOM id.
|
|
@@ -18,5 +19,5 @@ export interface AccordionProps extends PropsWithChildren<ComponentProps<"div">>
|
|
|
18
19
|
* @flr-generate all
|
|
19
20
|
* @flowStatus beta
|
|
20
21
|
*/
|
|
21
|
-
export declare const Accordion:
|
|
22
|
+
export declare const Accordion: import('react').FunctionComponent<AccordionProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
22
23
|
export default Accordion;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { PropsWithClassName, PropsWithStatus } from '../../lib/types/props';
|
|
3
3
|
import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
4
|
-
export interface AlertTextProps extends PropsWithClassName, PropsWithChildren, FlowComponentProps
|
|
4
|
+
export interface AlertTextProps extends PropsWithClassName, PropsWithChildren, FlowComponentProps<HTMLSpanElement>, PropsWithStatus {
|
|
5
5
|
}
|
|
6
6
|
/** @flr-generate all */
|
|
7
|
-
export declare const AlertText: import('react').FunctionComponent<AlertTextProps & import('react').RefAttributes<
|
|
7
|
+
export declare const AlertText: import('react').FunctionComponent<AlertTextProps & import('react').RefAttributes<HTMLSpanElement>>;
|
|
8
8
|
export default AlertText;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { CSSProperties,
|
|
1
|
+
import { CSSProperties, PropsWithChildren } from 'react';
|
|
2
2
|
import { PropsWithClassName } from '../../lib/types/props';
|
|
3
|
-
|
|
3
|
+
import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
4
|
+
export interface ChatProps extends PropsWithChildren, PropsWithClassName, FlowComponentProps {
|
|
4
5
|
/** The height of the chat. */
|
|
5
6
|
height?: CSSProperties["height"];
|
|
6
7
|
}
|
|
7
8
|
/** @flr-generate all */
|
|
8
|
-
export declare const Chat:
|
|
9
|
+
export declare const Chat: import('react').FunctionComponent<ChatProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
9
10
|
export default Chat;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { PropsWithClassName } from '../../lib/types/props';
|
|
3
3
|
import { FileInputOnChangeHandler } from '../FileField/components/FileInput';
|
|
4
4
|
import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
@@ -11,5 +11,5 @@ export interface FileDropZoneProps extends PropsWithClassName, FlowComponentProp
|
|
|
11
11
|
isReadOnly?: boolean;
|
|
12
12
|
}
|
|
13
13
|
/** @flr-generate all */
|
|
14
|
-
export declare const FileDropZone:
|
|
14
|
+
export declare const FileDropZone: import('react').FunctionComponent<FileDropZoneProps & import('react').RefAttributes<Aria.FocusableElement>>;
|
|
15
15
|
export default FileDropZone;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { FlowComponentProps } from '../../../../lib/componentFactory/flowComponent';
|
|
1
2
|
import { default as React, ReactNode } from 'react';
|
|
2
3
|
import { PropsWithClassName } from '../../../../lib/types/props';
|
|
3
|
-
export interface LightBoxGalleryProps extends PropsWithClassName {
|
|
4
|
+
export interface LightBoxGalleryProps extends PropsWithClassName, FlowComponentProps {
|
|
4
5
|
children: ReactNode[];
|
|
5
6
|
defaultIndex?: number;
|
|
6
7
|
}
|
|
7
8
|
/** @flr-generate all */
|
|
8
|
-
export declare const LightBoxGallery: React.FunctionComponent<LightBoxGalleryProps & React.RefAttributes<
|
|
9
|
+
export declare const LightBoxGallery: React.FunctionComponent<LightBoxGalleryProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
10
|
export default LightBoxGallery;
|
package/dist/types/components/LightBox/components/LightBoxGalleryItem/LightBoxGalleryItem.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { FlowComponentProps } from '../../../../lib/componentFactory/flowComponent';
|
|
1
2
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
export type LightBoxGalleryItemProps = PropsWithChildren
|
|
3
|
+
export type LightBoxGalleryItemProps = PropsWithChildren & Omit<FlowComponentProps, "ref">;
|
|
3
4
|
/** @flr-generate all */
|
|
4
5
|
export declare const LightBoxGalleryItem: import('react').FunctionComponent<{
|
|
5
6
|
children?: import('react').ReactNode | undefined;
|
|
6
|
-
} & import('react').RefAttributes<
|
|
7
|
+
} & Omit<FlowComponentProps<HTMLDivElement>, "ref"> & import('react').RefAttributes<unknown>>;
|
|
7
8
|
export default LightBoxGalleryItem;
|
|
@@ -3,13 +3,5 @@ import { ColumnLayoutProps } from '../../../ColumnLayout';
|
|
|
3
3
|
export type ListItemViewProps = PropsWithChildren & Pick<ColumnLayoutProps, "s" | "m" | "l">;
|
|
4
4
|
export declare const ListItemView: import('react').FunctionComponent<{
|
|
5
5
|
children?: import('react').ReactNode | undefined;
|
|
6
|
-
} & Pick<ColumnLayoutProps<"div" | "ul">, "s" | "m" | "l"> &
|
|
7
|
-
title?: import('react').ReactNode;
|
|
8
|
-
subTitle?: import('react').ReactNode;
|
|
9
|
-
avatar?: import('react').ReactNode;
|
|
10
|
-
button?: import('react').ReactNode;
|
|
11
|
-
bottom?: import('react').ReactNode;
|
|
12
|
-
checkbox?: import('react').ReactNode;
|
|
13
|
-
viewMode?: import('../../model/types').ListViewMode;
|
|
14
|
-
} & import('react').RefAttributes<undefined>>;
|
|
6
|
+
} & Pick<ColumnLayoutProps<"div" | "ul">, "s" | "m" | "l"> & import('react').RefAttributes<undefined>>;
|
|
15
7
|
export default ListItemView;
|
|
@@ -18,31 +18,25 @@ export declare const typedList: <T, TMeta = unknown>() => {
|
|
|
18
18
|
}>;
|
|
19
19
|
ItemView: import('react').FunctionComponent<{
|
|
20
20
|
children?: import('react').ReactNode | undefined;
|
|
21
|
-
} & Pick<import('../ColumnLayout').ColumnLayoutProps<"div" | "ul">, "s" | "m" | "l"> &
|
|
22
|
-
title?: import('react').ReactNode;
|
|
23
|
-
subTitle?: import('react').ReactNode;
|
|
24
|
-
avatar?: import('react').ReactNode;
|
|
25
|
-
button?: import('react').ReactNode;
|
|
26
|
-
bottom?: import('react').ReactNode;
|
|
27
|
-
checkbox?: import('react').ReactNode;
|
|
28
|
-
viewMode?: import('./model/types').ListViewMode;
|
|
29
|
-
} & import('react').RefAttributes<undefined>>;
|
|
21
|
+
} & Pick<import('../ColumnLayout').ColumnLayoutProps<"div" | "ul">, "s" | "m" | "l"> & import('react').RefAttributes<undefined>>;
|
|
30
22
|
TableHeader: (ignoredProps: import('./model/table/types').TableHeaderShape) => null;
|
|
31
23
|
TableColumn: (ignoredProps: import('../Table').TableColumnProps) => null;
|
|
32
24
|
TableBody: (ignoredProps: import('./model/table/types').TableBodyShape<T>) => null;
|
|
33
25
|
TableRow: (ignoredProps: {
|
|
34
|
-
|
|
26
|
+
children?: import('react').ReactNode;
|
|
27
|
+
isDisabled?: boolean | undefined;
|
|
35
28
|
className?: string | undefined;
|
|
36
|
-
id?: import('react-aria-components').Key | undefined;
|
|
37
|
-
lang?: string | undefined | undefined;
|
|
38
29
|
style?: import('react-aria-components').StyleOrFunction<import('react-aria-components').RowRenderProps> | undefined;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
30
|
+
dir?: string | undefined | undefined;
|
|
31
|
+
lang?: string | undefined | undefined;
|
|
32
|
+
hidden?: boolean | undefined | undefined;
|
|
33
|
+
inert?: boolean | undefined | undefined;
|
|
34
|
+
translate?: "yes" | "no" | undefined | undefined;
|
|
35
|
+
suppressHydrationWarning?: boolean | undefined | undefined;
|
|
44
36
|
onClick?: ((e: import('react').MouseEvent<import('react-aria-components').FocusableElement>) => void) | undefined;
|
|
45
37
|
onClickCapture?: import('react').MouseEventHandler<HTMLTableRowElement> | undefined;
|
|
38
|
+
onAuxClick?: import('react').MouseEventHandler<HTMLTableRowElement> | undefined;
|
|
39
|
+
onAuxClickCapture?: import('react').MouseEventHandler<HTMLTableRowElement> | undefined;
|
|
46
40
|
onContextMenu?: import('react').MouseEventHandler<HTMLTableRowElement> | undefined;
|
|
47
41
|
onContextMenuCapture?: import('react').MouseEventHandler<HTMLTableRowElement> | undefined;
|
|
48
42
|
onDoubleClick?: import('react').MouseEventHandler<HTMLTableRowElement> | undefined;
|
|
@@ -103,12 +97,10 @@ export declare const typedList: <T, TMeta = unknown>() => {
|
|
|
103
97
|
onTransitionRunCapture?: import('react').TransitionEventHandler<HTMLTableRowElement> | undefined;
|
|
104
98
|
onTransitionStart?: import('react').TransitionEventHandler<HTMLTableRowElement> | undefined;
|
|
105
99
|
onTransitionStartCapture?: import('react').TransitionEventHandler<HTMLTableRowElement> | undefined;
|
|
106
|
-
|
|
107
|
-
dir?: string | undefined | undefined;
|
|
108
|
-
hidden?: boolean | undefined | undefined;
|
|
109
|
-
inert?: boolean | undefined | undefined;
|
|
110
|
-
translate?: "yes" | "no" | undefined | undefined;
|
|
100
|
+
id?: import('react-aria-components').Key | undefined;
|
|
111
101
|
rel?: string | undefined;
|
|
102
|
+
href?: import('@react-types/shared').Href | undefined;
|
|
103
|
+
target?: import('react').HTMLAttributeAnchorTarget | undefined;
|
|
112
104
|
onPress?: ((e: import('react-aria-components').PressEvent) => void) | undefined;
|
|
113
105
|
onPressStart?: ((e: import('react-aria-components').PressEvent) => void) | undefined;
|
|
114
106
|
onPressEnd?: ((e: import('react-aria-components').PressEvent) => void) | undefined;
|
|
@@ -134,19 +126,25 @@ export declare const typedList: <T, TMeta = unknown>() => {
|
|
|
134
126
|
children: import('.').RenderItemFn<T>;
|
|
135
127
|
}) => null;
|
|
136
128
|
Table: (ignoredProps: {
|
|
137
|
-
|
|
129
|
+
defaultSelectedKeys?: ("all" | Iterable<import('react-aria-components').Key>) | undefined;
|
|
130
|
+
selectedKeys?: ("all" | Iterable<import('react-aria-components').Key>) | undefined;
|
|
131
|
+
children?: import('react').ReactNode;
|
|
138
132
|
className?: string | undefined;
|
|
139
|
-
lang?: string | undefined | undefined;
|
|
140
133
|
slot?: string | null | undefined;
|
|
141
|
-
'aria-describedby'?: string | undefined;
|
|
142
|
-
'aria-details'?: string | undefined;
|
|
143
134
|
'aria-label'?: string | undefined;
|
|
144
135
|
'aria-labelledby'?: string | undefined;
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
136
|
+
'aria-describedby'?: string | undefined;
|
|
137
|
+
'aria-details'?: string | undefined;
|
|
138
|
+
dir?: string | undefined | undefined;
|
|
139
|
+
lang?: string | undefined | undefined;
|
|
140
|
+
hidden?: boolean | undefined | undefined;
|
|
141
|
+
inert?: boolean | undefined | undefined;
|
|
142
|
+
translate?: "yes" | "no" | undefined | undefined;
|
|
143
|
+
suppressHydrationWarning?: boolean | undefined | undefined;
|
|
148
144
|
onClick?: import('react').MouseEventHandler<HTMLTableElement> | undefined;
|
|
149
145
|
onClickCapture?: import('react').MouseEventHandler<HTMLTableElement> | undefined;
|
|
146
|
+
onAuxClick?: import('react').MouseEventHandler<HTMLTableElement> | undefined;
|
|
147
|
+
onAuxClickCapture?: import('react').MouseEventHandler<HTMLTableElement> | undefined;
|
|
150
148
|
onContextMenu?: import('react').MouseEventHandler<HTMLTableElement> | undefined;
|
|
151
149
|
onContextMenuCapture?: import('react').MouseEventHandler<HTMLTableElement> | undefined;
|
|
152
150
|
onDoubleClick?: import('react').MouseEventHandler<HTMLTableElement> | undefined;
|
|
@@ -207,12 +205,6 @@ export declare const typedList: <T, TMeta = unknown>() => {
|
|
|
207
205
|
onTransitionRunCapture?: import('react').TransitionEventHandler<HTMLTableElement> | undefined;
|
|
208
206
|
onTransitionStart?: import('react').TransitionEventHandler<HTMLTableElement> | undefined;
|
|
209
207
|
onTransitionStartCapture?: import('react').TransitionEventHandler<HTMLTableElement> | undefined;
|
|
210
|
-
defaultSelectedKeys?: ("all" | Iterable<import('react-aria-components').Key>) | undefined;
|
|
211
|
-
selectedKeys?: ("all" | Iterable<import('react-aria-components').Key>) | undefined;
|
|
212
|
-
dir?: string | undefined | undefined;
|
|
213
|
-
hidden?: boolean | undefined | undefined;
|
|
214
|
-
inert?: boolean | undefined | undefined;
|
|
215
|
-
translate?: "yes" | "no" | undefined | undefined;
|
|
216
208
|
disabledKeys?: Iterable<import('react-aria-components').Key> | undefined;
|
|
217
209
|
selectionMode?: import('react-aria-components').SelectionMode | undefined;
|
|
218
210
|
disallowEmptySelection?: boolean | undefined;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
1
|
import { IconProps } from '../Icon';
|
|
3
2
|
import { AlphaColor } from '../../lib/types/props';
|
|
4
3
|
export interface LoadingSpinnerProps extends IconProps {
|
|
@@ -6,5 +5,5 @@ export interface LoadingSpinnerProps extends IconProps {
|
|
|
6
5
|
color?: "default" | AlphaColor;
|
|
7
6
|
}
|
|
8
7
|
/** @flr-generate all */
|
|
9
|
-
export declare const LoadingSpinner:
|
|
8
|
+
export declare const LoadingSpinner: import('react').FunctionComponent<LoadingSpinnerProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
10
9
|
export default LoadingSpinner;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { PropsWithClassName, PropsWithElementType } from '../../lib/types/props';
|
|
3
3
|
import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
4
|
-
export interface MessageProps extends PropsWithChildren, PropsWithClassName, FlowComponentProps
|
|
4
|
+
export interface MessageProps extends PropsWithChildren, PropsWithClassName, FlowComponentProps<HTMLElement>, PropsWithElementType<"article" | "li"> {
|
|
5
5
|
/** Determines the color and orientation of the message. @default "responder" */
|
|
6
6
|
type?: "responder" | "sender";
|
|
7
7
|
/** A custom background color of the message as a CSS color value. */
|
|
8
8
|
color?: string;
|
|
9
9
|
}
|
|
10
10
|
/** @flr-generate all */
|
|
11
|
-
export declare const Message: import('react').FunctionComponent<MessageProps & import('react').RefAttributes<
|
|
11
|
+
export declare const Message: import('react').FunctionComponent<MessageProps & import('react').RefAttributes<HTMLElement>>;
|
|
12
12
|
export default Message;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { PropsWithClassName } from '../../lib/types/props';
|
|
3
3
|
import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
4
|
-
export type MessageThreadProps = PropsWithChildren & PropsWithClassName & FlowComponentProps
|
|
4
|
+
export type MessageThreadProps = PropsWithChildren & PropsWithClassName & FlowComponentProps<HTMLUListElement>;
|
|
5
5
|
/** @flr-generate all */
|
|
6
6
|
export declare const MessageThread: import('react').FunctionComponent<{
|
|
7
7
|
children?: import('react').ReactNode | undefined;
|
|
8
|
-
} & PropsWithClassName & FlowComponentProps<
|
|
8
|
+
} & PropsWithClassName & FlowComponentProps<HTMLUListElement> & import('react').RefAttributes<HTMLUListElement>>;
|
|
9
9
|
export default MessageThread;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { PropsWithClassName } from '../../../../lib/types/props';
|
|
3
|
-
|
|
4
|
-
export
|
|
3
|
+
import { FlowComponentProps } from '../../../../lib/componentFactory/flowComponent';
|
|
4
|
+
export type SectionHeaderProps = PropsWithChildren & PropsWithClassName & FlowComponentProps<HTMLElement>;
|
|
5
|
+
export declare const SectionHeader: import('react').FunctionComponent<{
|
|
6
|
+
children?: import('react').ReactNode | undefined;
|
|
7
|
+
} & PropsWithClassName & FlowComponentProps<HTMLElement> & import('react').RefAttributes<HTMLElement>>;
|
|
5
8
|
export default SectionHeader;
|
|
@@ -12,6 +12,7 @@ import { AlertProps } from '../Alert';
|
|
|
12
12
|
import { HeadingProps } from '../Heading';
|
|
13
13
|
import { TabNavigationProps } from '../TabNavigation';
|
|
14
14
|
import { InitialsProps } from '../Initials';
|
|
15
|
+
import { LoadingSpinnerProps } from '../LoadingSpinner';
|
|
15
16
|
import { ImageProps } from '../Image';
|
|
16
17
|
import { CopyButtonProps } from '../CopyButton';
|
|
17
18
|
import { HeaderProps } from '../Header';
|
|
@@ -39,14 +40,13 @@ import { ContextualHelpProps, ContextualHelpTriggerProps } from '../ContextualHe
|
|
|
39
40
|
import { CoachMarkProps } from '../CoachMark';
|
|
40
41
|
import { PopoverProps, PopoverTriggerProps } from '../Popover';
|
|
41
42
|
import { ContextMenuSectionProps } from '../ContextMenu/components/ContextMenuSection';
|
|
42
|
-
import {
|
|
43
|
+
import { ListItemViewProps, ListProps } from '../List';
|
|
43
44
|
import { PasswordCreationFieldProps } from '../PasswordCreationField';
|
|
44
45
|
import { SearchFieldProps } from '../SearchField';
|
|
45
46
|
import { BadgeProps } from '../Badge';
|
|
46
47
|
import { DatePickerProps } from '../DatePicker';
|
|
47
48
|
import { DateRangePickerProps } from '../DateRangePicker';
|
|
48
49
|
import { TimeFieldProps } from '../TimeField';
|
|
49
|
-
import { AlertIconProps } from '../AlertIcon';
|
|
50
50
|
import { ListSummaryProps } from '../List/components/ListSummary/ListSummary';
|
|
51
51
|
import { SegmentedControlProps } from '../SegmentedControl';
|
|
52
52
|
import { SegmentProps } from '../SegmentedControl/components/Segment';
|
|
@@ -90,7 +90,6 @@ export interface FlowComponentPropsTypes {
|
|
|
90
90
|
AccordionGroup: AccordionGroupProps;
|
|
91
91
|
Alert: AlertProps;
|
|
92
92
|
AlertBadge: AlertBadgeProps;
|
|
93
|
-
AlertIcon: AlertIconProps;
|
|
94
93
|
AlertText: AlertTextProps;
|
|
95
94
|
Align: AlignProps;
|
|
96
95
|
Combine: CombineProps;
|
|
@@ -138,8 +137,9 @@ export interface FlowComponentPropsTypes {
|
|
|
138
137
|
LightBoxGalleryItem: LightBoxGalleryItemProps;
|
|
139
138
|
Link: LinkProps;
|
|
140
139
|
List: ListProps<never>;
|
|
141
|
-
ListItemView:
|
|
140
|
+
ListItemView: ListItemViewProps;
|
|
142
141
|
ListSummary: ListSummaryProps;
|
|
142
|
+
LoadingSpinner: LoadingSpinnerProps;
|
|
143
143
|
MarkdownEditor: MarkdownEditorProps;
|
|
144
144
|
MenuItem: MenuItemProps;
|
|
145
145
|
MenuTrigger: MenuTriggerProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getCategoricalColorByIndex: (index: number) => "
|
|
1
|
+
export declare const getCategoricalColorByIndex: (index: number) => "green" | "violet" | "azure" | "lime" | "magenta" | "yellow" | "sea-green" | "palatinate-blue" | "tangerine" | "tropical-indigo" | "malachite" | "alloy-orange";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/flow-react-components",
|
|
3
|
-
"version": "1.6.0-next.
|
|
3
|
+
"version": "1.6.0-next.58",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A React implementation of Flow, mittwald’s design system",
|
|
6
6
|
"homepage": "https://flow.mittwald.de",
|
|
@@ -84,9 +84,9 @@
|
|
|
84
84
|
"@internationalized/string-compiler": "^3.4.1",
|
|
85
85
|
"@lezer/common": "^1.5.2",
|
|
86
86
|
"@lezer/highlight": "^1.2.3",
|
|
87
|
-
"@mittwald/flow-icons": "^1.6.0-next.
|
|
87
|
+
"@mittwald/flow-icons": "^1.6.0-next.58",
|
|
88
88
|
"@mittwald/password-tools-js": "^3.0.0",
|
|
89
|
-
"@mittwald/react-tunnel": "^1.6.0-next.
|
|
89
|
+
"@mittwald/react-tunnel": "^1.6.0-next.58",
|
|
90
90
|
"@mittwald/react-use-promise": "^4.2.2",
|
|
91
91
|
"@react-aria/form": "^3.2.1",
|
|
92
92
|
"@react-aria/i18n": "^3.13.1",
|
|
@@ -139,13 +139,13 @@
|
|
|
139
139
|
"@internationalized/date": "^3.12.3",
|
|
140
140
|
"@lezer/generator": "^1.8.0",
|
|
141
141
|
"@lezer/lr": "^1.4.10",
|
|
142
|
-
"@mittwald/flow-components-base": "1.6.0-next.
|
|
143
|
-
"@mittwald/flow-core": "1.6.0-next.
|
|
144
|
-
"@mittwald/flow-design-tokens": "1.6.0-next.
|
|
145
|
-
"@mittwald/flow-icons-base": "1.6.0-next.
|
|
142
|
+
"@mittwald/flow-components-base": "1.6.0-next.58",
|
|
143
|
+
"@mittwald/flow-core": "1.6.0-next.58",
|
|
144
|
+
"@mittwald/flow-design-tokens": "1.6.0-next.58",
|
|
145
|
+
"@mittwald/flow-icons-base": "1.6.0-next.58",
|
|
146
146
|
"@mittwald/react-use-promise": "^4.2.2",
|
|
147
147
|
"@mittwald/remote-dom-react": "1.2.2-mittwald.10",
|
|
148
|
-
"@mittwald/typescript-config": "1.6.0-next.
|
|
148
|
+
"@mittwald/typescript-config": "1.6.0-next.58",
|
|
149
149
|
"@nx/storybook": "^22.7.6",
|
|
150
150
|
"@storybook/addon-a11y": "^10.5.10",
|
|
151
151
|
"@storybook/addon-actions": "^9.0.8",
|
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
},
|
|
200
200
|
"peerDependencies": {
|
|
201
201
|
"@internationalized/date": "^3.12.2",
|
|
202
|
-
"@mittwald/flow-icons-pro": "1.6.0-next.
|
|
202
|
+
"@mittwald/flow-icons-pro": "1.6.0-next.58",
|
|
203
203
|
"@mittwald/react-use-promise": "^4.2.2",
|
|
204
204
|
"next": "^16.2.3",
|
|
205
205
|
"react": "^19.2.0",
|
|
@@ -223,5 +223,5 @@
|
|
|
223
223
|
"browserslist": [
|
|
224
224
|
"baseline widely available"
|
|
225
225
|
],
|
|
226
|
-
"gitHead": "
|
|
226
|
+
"gitHead": "95bca01dd5526a24d15b838d9d077b11ecaa8d7e"
|
|
227
227
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const useAutorunEffect: (effect: () => void) => void;
|