@mittwald/flow-react-components 0.2.0-alpha.533 → 0.2.0-alpha.534
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 +6 -0
- package/dist/js/_virtual/_.locale.json@8b26c19d587a90f821a2307c8122f6d1.mjs +2 -0
- package/dist/js/_virtual/_.locale.json@8b26c19d587a90f821a2307c8122f6d1.mjs.map +1 -1
- package/dist/js/components/src/components/Action/lib/ariaLive.mjs +17 -5
- package/dist/js/components/src/components/Action/lib/ariaLive.mjs.map +1 -1
- package/dist/js/components/src/components/ContextMenu/ContextMenu.mjs +3 -1
- package/dist/js/components/src/components/ContextMenu/ContextMenu.mjs.map +1 -1
- package/dist/js/components/src/components/ContextMenu/components/ContextMenuSection/ContextMenuSection.mjs +3 -0
- package/dist/js/components/src/components/ContextMenu/components/ContextMenuSection/ContextMenuSection.mjs.map +1 -1
- package/dist/js/components/src/components/CopyButton/CopyButton.mjs +1 -0
- package/dist/js/components/src/components/CopyButton/CopyButton.mjs.map +1 -1
- package/dist/js/components/src/components/List/hooks/useAriaAnnounceSearchState.mjs +1 -0
- package/dist/js/components/src/components/List/hooks/useAriaAnnounceSearchState.mjs.map +1 -1
- package/dist/js/components/src/components/Modal/Modal.mjs +2 -0
- package/dist/js/components/src/components/Modal/Modal.mjs.map +1 -1
- package/dist/js/components/src/components/Overlay/components/OverlayContent.mjs +8 -2
- package/dist/js/components/src/components/Overlay/components/OverlayContent.mjs.map +1 -1
- package/dist/js/components/src/components/PasswordCreationField/PasswordCreationField.mjs +2 -0
- package/dist/js/components/src/components/PasswordCreationField/PasswordCreationField.mjs.map +1 -1
- package/dist/js/components/src/components/PasswordCreationField/components/PasswordGenerateButton/PasswordGenerateButton.mjs +1 -0
- package/dist/js/components/src/components/PasswordCreationField/components/PasswordGenerateButton/PasswordGenerateButton.mjs.map +1 -1
- package/dist/js/components/src/components/PasswordCreationField/components/TogglePasswordVisibilityButton/TogglePasswordVisibilityButton.mjs +2 -1
- package/dist/js/components/src/components/PasswordCreationField/components/TogglePasswordVisibilityButton/TogglePasswordVisibilityButton.mjs.map +1 -1
- package/dist/js/components/src/integrations/react-hook-form/components/Form/Form.mjs +2 -0
- package/dist/js/components/src/integrations/react-hook-form/components/Form/Form.mjs.map +1 -1
- package/dist/js/components/src/views/LoadingSpinnerView.mjs +15 -0
- package/dist/js/components/src/views/LoadingSpinnerView.mjs.map +1 -0
- package/dist/js/default.mjs +1 -0
- package/dist/js/default.mjs.map +1 -1
- package/dist/js/flr-universal.mjs +2 -0
- package/dist/js/flr-universal.mjs.map +1 -1
- package/dist/types/components/Action/index.d.ts +1 -0
- package/dist/types/components/Action/index.d.ts.map +1 -1
- package/dist/types/components/Action/lib/ariaLive.d.ts +1 -0
- package/dist/types/components/Action/lib/ariaLive.d.ts.map +1 -1
- package/dist/types/components/Modal/stories/Default.stories.d.ts +1 -0
- package/dist/types/components/Modal/stories/Default.stories.d.ts.map +1 -1
- package/dist/types/components/Overlay/components/OverlayContent.d.ts.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [0.2.0-alpha.534](https://github.com/mittwald/flow/compare/0.2.0-alpha.533...0.2.0-alpha.534) (2025-10-28)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* support Suspense in Overlays ([fb593d9](https://github.com/mittwald/flow/commit/fb593d97dca8fc4c3c3773d8eacee562959af6ba))
|
|
11
|
+
|
|
6
12
|
# [0.2.0-alpha.533](https://github.com/mittwald/flow/compare/0.2.0-alpha.532...0.2.0-alpha.533) (2025-10-27)
|
|
7
13
|
|
|
8
14
|
**Note:** Version bump only for package @mittwald/flow-react-components
|
|
@@ -3,9 +3,11 @@
|
|
|
3
3
|
const locales = {"de-DE": { "action.isFailed": `Fehlgeschlagen`,
|
|
4
4
|
"action.isPending": `Ausstehend...`,
|
|
5
5
|
"action.isSucceeded": `Erfolgreich`,
|
|
6
|
+
"suspense.isPending": `Lädt...`,
|
|
6
7
|
},"en-US": { "action.isFailed": `Failed`,
|
|
7
8
|
"action.isPending": `Pending...`,
|
|
8
9
|
"action.isSucceeded": `Succeeded`,
|
|
10
|
+
"suspense.isPending": `Loading...`,
|
|
9
11
|
}};
|
|
10
12
|
|
|
11
13
|
export { locales as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_.locale.json@8b26c19d587a90f821a2307c8122f6d1.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"_.locale.json@8b26c19d587a90f821a2307c8122f6d1.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -6,11 +6,11 @@ import { useEffect } from 'react';
|
|
|
6
6
|
import { announce } from '@react-aria/live-announcer';
|
|
7
7
|
|
|
8
8
|
const useAriaAnnounceActionState = (actionState, options = {}) => {
|
|
9
|
-
const
|
|
9
|
+
const formatter = useLocalizedStringFormatter(locales);
|
|
10
10
|
const {
|
|
11
|
-
isPendingText =
|
|
12
|
-
isSucceededText =
|
|
13
|
-
isFailedText =
|
|
11
|
+
isPendingText = formatter.format("action.isPending"),
|
|
12
|
+
isSucceededText = formatter.format("action.isSucceeded"),
|
|
13
|
+
isFailedText = formatter.format("action.isFailed")
|
|
14
14
|
} = options;
|
|
15
15
|
useEffect(() => {
|
|
16
16
|
if (actionState === "isPending") {
|
|
@@ -22,6 +22,18 @@ const useAriaAnnounceActionState = (actionState, options = {}) => {
|
|
|
22
22
|
}
|
|
23
23
|
}, [actionState]);
|
|
24
24
|
};
|
|
25
|
+
const useAriaAnnounceSuspense = () => {
|
|
26
|
+
const formatter = useLocalizedStringFormatter(locales);
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
const timeout = setTimeout(() => {
|
|
29
|
+
const isPendingText = formatter.format("suspense.isPending");
|
|
30
|
+
announce(isPendingText, "polite");
|
|
31
|
+
}, 750);
|
|
32
|
+
return () => {
|
|
33
|
+
clearTimeout(timeout);
|
|
34
|
+
};
|
|
35
|
+
}, []);
|
|
36
|
+
};
|
|
25
37
|
|
|
26
|
-
export { useAriaAnnounceActionState };
|
|
38
|
+
export { useAriaAnnounceActionState, useAriaAnnounceSuspense };
|
|
27
39
|
//# sourceMappingURL=ariaLive.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ariaLive.mjs","sources":["../../../../../../../src/components/Action/lib/ariaLive.ts"],"sourcesContent":["import { useLocalizedStringFormatter } from \"react-aria\";\nimport locales from \"../locales/*.locale.json\";\nimport { useEffect } from \"react\";\nimport type { ActionStateValue } from \"@/components/Action/models/ActionState\";\nimport { announce } from \"@react-aria/live-announcer\";\n\ninterface Options {\n isPendingText?: string;\n isSucceededText?: string;\n isFailedText?: string;\n}\n\nexport const useAriaAnnounceActionState = (\n actionState: ActionStateValue,\n options: Options = {},\n): void => {\n const
|
|
1
|
+
{"version":3,"file":"ariaLive.mjs","sources":["../../../../../../../src/components/Action/lib/ariaLive.ts"],"sourcesContent":["import { useLocalizedStringFormatter } from \"react-aria\";\nimport locales from \"../locales/*.locale.json\";\nimport { useEffect } from \"react\";\nimport type { ActionStateValue } from \"@/components/Action/models/ActionState\";\nimport { announce } from \"@react-aria/live-announcer\";\n\ninterface Options {\n isPendingText?: string;\n isSucceededText?: string;\n isFailedText?: string;\n}\n\nexport const useAriaAnnounceActionState = (\n actionState: ActionStateValue,\n options: Options = {},\n): void => {\n const formatter = useLocalizedStringFormatter(locales);\n\n const {\n isPendingText = formatter.format(\"action.isPending\"),\n isSucceededText = formatter.format(\"action.isSucceeded\"),\n isFailedText = formatter.format(\"action.isFailed\"),\n } = options;\n\n useEffect(() => {\n if (actionState === \"isPending\") {\n announce(isPendingText, \"polite\");\n } else if (actionState === \"isSucceeded\") {\n announce(isSucceededText, \"polite\");\n } else if (actionState === \"isFailed\") {\n announce(isFailedText, \"polite\");\n }\n }, [actionState]);\n};\n\nexport const useAriaAnnounceSuspense = () => {\n const formatter = useLocalizedStringFormatter(locales);\n\n useEffect(() => {\n const timeout = setTimeout(() => {\n const isPendingText = formatter.format(\"suspense.isPending\");\n announce(isPendingText, \"polite\");\n }, 750);\n\n return () => {\n clearTimeout(timeout);\n };\n }, []);\n};\n"],"names":[],"mappings":";;;;;AAYO,MAAM,0BAAA,GAA6B,CACxC,WAAA,EACA,OAAA,GAAmB,EAAC,KACX;AACT,EAAA,MAAM,SAAA,GAAY,4BAA4B,OAAO,CAAA;AAErD,EAAA,MAAM;AAAA,IACJ,aAAA,GAAgB,SAAA,CAAU,MAAA,CAAO,kBAAkB,CAAA;AAAA,IACnD,eAAA,GAAkB,SAAA,CAAU,MAAA,CAAO,oBAAoB,CAAA;AAAA,IACvD,YAAA,GAAe,SAAA,CAAU,MAAA,CAAO,iBAAiB;AAAA,GACnD,GAAI,OAAA;AAEJ,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,gBAAgB,WAAA,EAAa;AAC/B,MAAA,QAAA,CAAS,eAAe,QAAQ,CAAA;AAAA,IAClC,CAAA,MAAA,IAAW,gBAAgB,aAAA,EAAe;AACxC,MAAA,QAAA,CAAS,iBAAiB,QAAQ,CAAA;AAAA,IACpC,CAAA,MAAA,IAAW,gBAAgB,UAAA,EAAY;AACrC,MAAA,QAAA,CAAS,cAAc,QAAQ,CAAA;AAAA,IACjC;AAAA,EACF,CAAA,EAAG,CAAC,WAAW,CAAC,CAAA;AAClB;AAEO,MAAM,0BAA0B,MAAM;AAC3C,EAAA,MAAM,SAAA,GAAY,4BAA4B,OAAO,CAAA;AAErD,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,MAAM,OAAA,GAAU,WAAW,MAAM;AAC/B,MAAA,MAAM,aAAA,GAAgB,SAAA,CAAU,MAAA,CAAO,oBAAoB,CAAA;AAC3D,MAAA,QAAA,CAAS,eAAe,QAAQ,CAAA;AAAA,IAClC,GAAG,GAAG,CAAA;AAEN,IAAA,OAAO,MAAM;AACX,MAAA,YAAA,CAAa,OAAO,CAAA;AAAA,IACtB,CAAA;AAAA,EACF,CAAA,EAAG,EAAE,CAAA;AACP;;;;"}
|
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
/* */
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
import { Action } from '../Action/Action.mjs';
|
|
5
|
+
import 'react-aria';
|
|
6
|
+
import 'react';
|
|
7
|
+
import '@react-aria/live-announcer';
|
|
5
8
|
import { getAriaSelectionMode, getMenuItemSelectionVariant, getCloseOverlayType } from './lib.mjs';
|
|
6
9
|
import { Popover } from '../Popover/Popover.mjs';
|
|
7
10
|
import { flowComponent } from '../../lib/componentFactory/flowComponent.mjs';
|
|
8
11
|
import 'mobx';
|
|
9
|
-
import 'react';
|
|
10
12
|
import { useOverlayController } from '../../lib/controller/overlay/useOverlayController.mjs';
|
|
11
13
|
import { OverlayContextProvider } from '../../lib/controller/overlay/OverlayContextProvider.mjs';
|
|
12
14
|
import '../../lib/propsContext/propsContext.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextMenu.mjs","sources":["../../../../../../src/components/ContextMenu/ContextMenu.tsx"],"sourcesContent":["import { Action } from \"@/components/Action\";\nimport type { ContextMenuSelectionMode } from \"@/components/ContextMenu/lib\";\nimport {\n getAriaSelectionMode,\n getCloseOverlayType,\n getMenuItemSelectionVariant,\n} from \"@/components/ContextMenu/lib\";\nimport type { MenuItemProps } from \"@/components/MenuItem\";\nimport { Popover, type PopoverProps } from \"@/components/Popover/Popover\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { useOverlayController } from \"@/lib/controller\";\nimport { OverlayContextProvider } from \"@/lib/controller/overlay/OverlayContextProvider\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport ContextMenuContentView from \"@/views/ContextMenuContentView\";\nimport type * as Aria from \"react-aria-components\";\nimport styles from \"./ContextMenu.module.scss\";\n\nexport interface ContextMenuProps\n extends Omit<PopoverProps, \"withTip\">,\n Pick<\n Aria.MenuProps<MenuItemProps>,\n | \"onAction\"\n | \"selectedKeys\"\n | \"defaultSelectedKeys\"\n | \"onSelectionChange\"\n | \"disabledKeys\"\n | \"renderEmptyState\"\n >,\n FlowComponentProps {\n /** The type of selection that is allowed in the context menu. */\n selectionMode?: ContextMenuSelectionMode;\n /** Sets the context menu to a fixed width. */\n width?: string | number;\n}\n\n/** @flr-generate all */\nexport const ContextMenu = flowComponent(\"ContextMenu\", (props) => {\n const {\n children,\n onAction,\n selectionMode,\n selectedKeys,\n defaultSelectedKeys,\n disabledKeys,\n onSelectionChange,\n renderEmptyState,\n ref,\n controller: overlayControllerFromProps,\n ...rest\n } = props;\n\n const overlayControllerFromContext = useOverlayController(\"ContextMenu\", {\n reuseControllerFromContext: true,\n });\n\n const overlayController =\n overlayControllerFromProps ?? overlayControllerFromContext;\n\n const selectionVariant = getMenuItemSelectionVariant(selectionMode);\n\n const propsContext: PropsContext = {\n MenuItem: {\n selectionVariant,\n Avatar: {\n size: \"l\",\n },\n },\n\n Section: {\n MenuItem: {\n Avatar: {\n size: \"l\",\n },\n },\n renderContextMenuSection: true,\n },\n\n ContextMenuSection: {\n MenuItem: {\n Avatar: {\n size: \"l\",\n },\n },\n },\n };\n\n return (\n <Popover {...rest} controller={overlayController} isDialogContent={false}>\n <OverlayContextProvider type=\"ContextMenu\" controller={overlayController}>\n <ContextMenuContentView\n className={styles.contextMenu}\n onAction={onAction}\n selectionMode={getAriaSelectionMode(selectionMode)}\n selectedKeys={selectedKeys}\n defaultSelectedKeys={defaultSelectedKeys}\n disabledKeys={disabledKeys}\n onSelectionChange={onSelectionChange}\n renderEmptyState={renderEmptyState}\n ref={ref}\n >\n <PropsContextProvider props={propsContext}>\n <Action closeOverlay={getCloseOverlayType(selectionMode)}>\n {children}\n </Action>\n </PropsContextProvider>\n </ContextMenuContentView>\n </OverlayContextProvider>\n </Popover>\n );\n});\n\nexport default ContextMenu;\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContextMenu.mjs","sources":["../../../../../../src/components/ContextMenu/ContextMenu.tsx"],"sourcesContent":["import { Action } from \"@/components/Action\";\nimport type { ContextMenuSelectionMode } from \"@/components/ContextMenu/lib\";\nimport {\n getAriaSelectionMode,\n getCloseOverlayType,\n getMenuItemSelectionVariant,\n} from \"@/components/ContextMenu/lib\";\nimport type { MenuItemProps } from \"@/components/MenuItem\";\nimport { Popover, type PopoverProps } from \"@/components/Popover/Popover\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { useOverlayController } from \"@/lib/controller\";\nimport { OverlayContextProvider } from \"@/lib/controller/overlay/OverlayContextProvider\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport ContextMenuContentView from \"@/views/ContextMenuContentView\";\nimport type * as Aria from \"react-aria-components\";\nimport styles from \"./ContextMenu.module.scss\";\n\nexport interface ContextMenuProps\n extends Omit<PopoverProps, \"withTip\">,\n Pick<\n Aria.MenuProps<MenuItemProps>,\n | \"onAction\"\n | \"selectedKeys\"\n | \"defaultSelectedKeys\"\n | \"onSelectionChange\"\n | \"disabledKeys\"\n | \"renderEmptyState\"\n >,\n FlowComponentProps {\n /** The type of selection that is allowed in the context menu. */\n selectionMode?: ContextMenuSelectionMode;\n /** Sets the context menu to a fixed width. */\n width?: string | number;\n}\n\n/** @flr-generate all */\nexport const ContextMenu = flowComponent(\"ContextMenu\", (props) => {\n const {\n children,\n onAction,\n selectionMode,\n selectedKeys,\n defaultSelectedKeys,\n disabledKeys,\n onSelectionChange,\n renderEmptyState,\n ref,\n controller: overlayControllerFromProps,\n ...rest\n } = props;\n\n const overlayControllerFromContext = useOverlayController(\"ContextMenu\", {\n reuseControllerFromContext: true,\n });\n\n const overlayController =\n overlayControllerFromProps ?? overlayControllerFromContext;\n\n const selectionVariant = getMenuItemSelectionVariant(selectionMode);\n\n const propsContext: PropsContext = {\n MenuItem: {\n selectionVariant,\n Avatar: {\n size: \"l\",\n },\n },\n\n Section: {\n MenuItem: {\n Avatar: {\n size: \"l\",\n },\n },\n renderContextMenuSection: true,\n },\n\n ContextMenuSection: {\n MenuItem: {\n Avatar: {\n size: \"l\",\n },\n },\n },\n };\n\n return (\n <Popover {...rest} controller={overlayController} isDialogContent={false}>\n <OverlayContextProvider type=\"ContextMenu\" controller={overlayController}>\n <ContextMenuContentView\n className={styles.contextMenu}\n onAction={onAction}\n selectionMode={getAriaSelectionMode(selectionMode)}\n selectedKeys={selectedKeys}\n defaultSelectedKeys={defaultSelectedKeys}\n disabledKeys={disabledKeys}\n onSelectionChange={onSelectionChange}\n renderEmptyState={renderEmptyState}\n ref={ref}\n >\n <PropsContextProvider props={propsContext}>\n <Action closeOverlay={getCloseOverlayType(selectionMode)}>\n {children}\n </Action>\n </PropsContextProvider>\n </ContextMenuContentView>\n </OverlayContextProvider>\n </Popover>\n );\n});\n\nexport default ContextMenu;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAsCO,MAAM,WAAA,GAAc,aAAA,CAAc,aAAA,EAAe,CAAC,KAAA,KAAU;AACjE,EAAA,MAAM;AAAA,IACJ,QAAA;AAAA,IACA,QAAA;AAAA,IACA,aAAA;AAAA,IACA,YAAA;AAAA,IACA,mBAAA;AAAA,IACA,YAAA;AAAA,IACA,iBAAA;AAAA,IACA,gBAAA;AAAA,IACA,GAAA;AAAA,IACA,UAAA,EAAY,0BAAA;AAAA,IACZ,GAAG;AAAA,GACL,GAAI,KAAA;AAEJ,EAAA,MAAM,4BAAA,GAA+B,qBAAqB,aAAA,EAAe;AAAA,IACvE,0BA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CAAC;;;;"}
|
|
@@ -8,6 +8,9 @@ import { flowComponent } from '../../../../lib/componentFactory/flowComponent.mj
|
|
|
8
8
|
import styles from '../../ContextMenu.module.scss.mjs';
|
|
9
9
|
import { getAriaSelectionMode, getMenuItemSelectionVariant, getCloseOverlayType } from '../../lib.mjs';
|
|
10
10
|
import { Action } from '../../../Action/Action.mjs';
|
|
11
|
+
import 'react-aria';
|
|
12
|
+
import 'react';
|
|
13
|
+
import '@react-aria/live-announcer';
|
|
11
14
|
|
|
12
15
|
const ContextMenuSection = flowComponent(
|
|
13
16
|
"ContextMenuSection",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextMenuSection.mjs","sources":["../../../../../../../../src/components/ContextMenu/components/ContextMenuSection/ContextMenuSection.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport type { PropsWithChildren } from \"react\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport styles from \"../../ContextMenu.module.scss\";\nimport type { ContextMenuSelectionMode } from \"@/components/ContextMenu/lib\";\nimport {\n getAriaSelectionMode,\n getCloseOverlayType,\n getMenuItemSelectionVariant,\n} from \"@/components/ContextMenu/lib\";\nimport { Action } from \"@/components/Action\";\nimport type { MenuItemProps } from \"@/components/MenuItem\";\n\nexport type ContextMenuSectionProps = PropsWithChildren &\n FlowComponentProps &\n Pick<\n Aria.MenuSectionProps<MenuItemProps>,\n \"defaultSelectedKeys\" | \"selectedKeys\"\n > & {\n selectionMode?: ContextMenuSelectionMode;\n };\n\n/** @flr-generate all */\nexport const ContextMenuSection = flowComponent(\n \"ContextMenuSection\",\n (props) => {\n const { children, selectionMode, ref, ...rest } = props;\n\n const selectionVariant = getMenuItemSelectionVariant(selectionMode);\n\n const propsContext: PropsContext = {\n Heading: {\n level: 5,\n wrapWith: <Aria.Header />,\n },\n MenuItem: {\n selectionVariant,\n },\n };\n\n return (\n <Aria.MenuSection\n ref={ref}\n {...rest}\n selectionMode={getAriaSelectionMode(selectionMode)}\n className={styles.section}\n >\n <PropsContextProvider props={propsContext}>\n <Action skip>\n <Action closeOverlay={getCloseOverlayType(selectionMode)}>\n {children}\n </Action>\n </Action>\n </PropsContextProvider>\n </Aria.MenuSection>\n );\n },\n);\n\nexport default ContextMenuSection;\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContextMenuSection.mjs","sources":["../../../../../../../../src/components/ContextMenu/components/ContextMenuSection/ContextMenuSection.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport type { PropsWithChildren } from \"react\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport styles from \"../../ContextMenu.module.scss\";\nimport type { ContextMenuSelectionMode } from \"@/components/ContextMenu/lib\";\nimport {\n getAriaSelectionMode,\n getCloseOverlayType,\n getMenuItemSelectionVariant,\n} from \"@/components/ContextMenu/lib\";\nimport { Action } from \"@/components/Action\";\nimport type { MenuItemProps } from \"@/components/MenuItem\";\n\nexport type ContextMenuSectionProps = PropsWithChildren &\n FlowComponentProps &\n Pick<\n Aria.MenuSectionProps<MenuItemProps>,\n \"defaultSelectedKeys\" | \"selectedKeys\"\n > & {\n selectionMode?: ContextMenuSelectionMode;\n };\n\n/** @flr-generate all */\nexport const ContextMenuSection = flowComponent(\n \"ContextMenuSection\",\n (props) => {\n const { children, selectionMode, ref, ...rest } = props;\n\n const selectionVariant = getMenuItemSelectionVariant(selectionMode);\n\n const propsContext: PropsContext = {\n Heading: {\n level: 5,\n wrapWith: <Aria.Header />,\n },\n MenuItem: {\n selectionVariant,\n },\n };\n\n return (\n <Aria.MenuSection\n ref={ref}\n {...rest}\n selectionMode={getAriaSelectionMode(selectionMode)}\n className={styles.section}\n >\n <PropsContextProvider props={propsContext}>\n <Action skip>\n <Action closeOverlay={getCloseOverlayType(selectionMode)}>\n {children}\n </Action>\n </Action>\n </PropsContextProvider>\n </Aria.MenuSection>\n );\n },\n);\n\nexport default ContextMenuSection;\n"],"names":[],"mappings":";;;;;;;;;;;;AA0BO,MAAM,kBAAA,GAAqB,aAAA;AAAA,EAChC,oBAAA;AAAA,EACA,CAAC,KAAA,KAAU;AACT,IAAA,MAAM,EAAE,QAAA,EAAU,aAAA,EAAe,GAAA,EAAK,GAAG,MAAK,GAAI,KAAA;AAElD,IAAA,MAAM,gBAAA,GAAmB,4BAA4B,aAAa,CAAA;AAElE,IAAA,MAAM,YAAA,GAA6B;AAAA,MACjC,OAAA,EAAS;AAAA,QACP,KAAA,EAAO,CAAA;AAAA,QACP,QAAA,kBAAU,GAAA,CAAC,IAAA,CAAK,MAAA,EAAL,EAAY;AAAA,OACzB;AAAA,MACA,QAAA,EAAU;AAAA,QACR;AAAA;AACF,KACF;AAEA,IAAA,uBACE,GAAA;AAAA,MAAC,IAAA,CAAK,WAAA;AAAA,MAAL;AAAA,QACC,GAAA;AAAA,QACC,GAAG,IAAA;AAAA,QACJ,aAAA,EAAe,qBAAqB,aAAa,CAAA;AAAA,QACjD,WAAW,MAAA,CAAO,OAAA;AAAA,QAElB,8BAAC,oBAAA,EAAA,EAAqB,KAAA,EAAO,YAAA,EAC3B,QAAA,kBAAA,GAAA,CAAC,UAAO,IAAA,EAAI,IAAA,EACV,QAAA,kBAAA,GAAA,CAAC,MAAA,EAAA,EAAO,cAAc,mBAAA,CAAoB,aAAa,CAAA,EACpD,QAAA,EACH,GACF,CAAA,EACF;AAAA;AAAA,KACF;AAAA,EAEJ;AACF;;;;"}
|
|
@@ -15,6 +15,7 @@ import { Tooltip } from '../Tooltip/Tooltip.mjs';
|
|
|
15
15
|
import { onlyText } from 'react-children-utilities';
|
|
16
16
|
import { flowComponent } from '../../lib/componentFactory/flowComponent.mjs';
|
|
17
17
|
import { Action } from '../Action/Action.mjs';
|
|
18
|
+
import '@react-aria/live-announcer';
|
|
18
19
|
|
|
19
20
|
const CopyButton = flowComponent("CopyButton", (props) => {
|
|
20
21
|
const {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopyButton.mjs","sources":["../../../../../../src/components/CopyButton/CopyButton.tsx"],"sourcesContent":["import copy from \"copy-to-clipboard\";\nimport type { ButtonProps } from \"@/components/Button\";\nimport { Button } from \"@/components/Button\";\nimport { IconCopy } from \"@/components/Icon/components/icons\";\nimport locales from \"./locales/*.locale.json\";\nimport { useLocalizedStringFormatter } from \"react-aria\";\nimport { Tooltip, TooltipTrigger } from \"@/components/Tooltip\";\nimport { onlyText } from \"react-children-utilities\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { Action } from \"@/components/Action\";\n\nexport interface CopyButtonProps\n extends Omit<ButtonProps, \"onPress\" | \"aria-label\" | \"render\">,\n FlowComponentProps<HTMLButtonElement> {\n /** The text to copy. */\n text?: string;\n}\n\n/** @flr-generate all */\nexport const CopyButton = flowComponent(\"CopyButton\", (props) => {\n const {\n text = \"\",\n ref,\n variant = \"plain\",\n color = \"secondary\",\n ...buttonProps\n } = props;\n\n const stringFormatter = useLocalizedStringFormatter(locales);\n\n const tooltip = stringFormatter.format(\"copyButton.copy\");\n\n const copyValue = () => {\n copy(onlyText(text));\n };\n\n return (\n <TooltipTrigger>\n <Action action={copyValue} showFeedback>\n <Button\n aria-label={tooltip}\n {...buttonProps}\n ref={ref}\n variant={variant}\n color={color}\n >\n <IconCopy />\n </Button>\n </Action>\n <Tooltip>{tooltip}</Tooltip>\n </TooltipTrigger>\n );\n});\n\nexport default CopyButton;\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CopyButton.mjs","sources":["../../../../../../src/components/CopyButton/CopyButton.tsx"],"sourcesContent":["import copy from \"copy-to-clipboard\";\nimport type { ButtonProps } from \"@/components/Button\";\nimport { Button } from \"@/components/Button\";\nimport { IconCopy } from \"@/components/Icon/components/icons\";\nimport locales from \"./locales/*.locale.json\";\nimport { useLocalizedStringFormatter } from \"react-aria\";\nimport { Tooltip, TooltipTrigger } from \"@/components/Tooltip\";\nimport { onlyText } from \"react-children-utilities\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { Action } from \"@/components/Action\";\n\nexport interface CopyButtonProps\n extends Omit<ButtonProps, \"onPress\" | \"aria-label\" | \"render\">,\n FlowComponentProps<HTMLButtonElement> {\n /** The text to copy. */\n text?: string;\n}\n\n/** @flr-generate all */\nexport const CopyButton = flowComponent(\"CopyButton\", (props) => {\n const {\n text = \"\",\n ref,\n variant = \"plain\",\n color = \"secondary\",\n ...buttonProps\n } = props;\n\n const stringFormatter = useLocalizedStringFormatter(locales);\n\n const tooltip = stringFormatter.format(\"copyButton.copy\");\n\n const copyValue = () => {\n copy(onlyText(text));\n };\n\n return (\n <TooltipTrigger>\n <Action action={copyValue} showFeedback>\n <Button\n aria-label={tooltip}\n {...buttonProps}\n ref={ref}\n variant={variant}\n color={color}\n >\n <IconCopy />\n </Button>\n </Action>\n <Tooltip>{tooltip}</Tooltip>\n </TooltipTrigger>\n );\n});\n\nexport default CopyButton;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAoBO,MAAM,UAAA,GAAa,aAAA,CAAc,YAAA,EAAc,CAAC,KAAA,KAAU;AAC/D,EAAA,MAAM;AAAA,IACJ,IAAA,GAAO,EAAA;AAAA,IACP,GAAA;AAAA,IACA,OAAA,GAAU,OAAA;AAAA,IACV,KAAA,GAAQ,WAAA;AAAA,IACR,GAAG;AAAA,GACL,GAAI,KAAA;AAEJ,EAAA,MAAM,eAAA,GAAkB,4BAA4B,OAAO,CAAA;AAE3D,EAAA,MAAM,OAAA,GAAU,eAAA,CAAgB,MAAA,CAAO,iBAAiB,CAAA;AAExD,EAAA,MAAM,YAAY,MAAM;AACtB,IAAA,IAAA,CAAK,QAAA,CAAS,IAAI,CAAC,CAAA;AAAA,EACrB,CAAA;AAEA,EAAA,4BACG,cAAA,EAAA,EACC,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,MAAA,EAAA,EAAO,MAAA,EAAQ,SAAA,EAAW,YAAA,EAAY,IAAA,EACrC,QAAA,kBAAA,GAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACC,YAAA,EAAY,OAAA;AAAA,QACX,GAAG,WAAA;AAAA,QACJ,GAAA;AAAA,QACA,OAAA;AAAA,QACA,KAAA;AAAA,QAEA,8BAAC,QAAA,EAAA,EAAS;AAAA;AAAA,KACZ,EACF,CAAA;AAAA,oBACA,GAAA,CAAC,WAAS,QAAA,EAAA,OAAA,EAAQ;AAAA,GAAA,EACpB,CAAA;AAEJ,CAAC;;;;"}
|
|
@@ -88,6 +88,7 @@ import '../../NumberField/NumberField.mjs';
|
|
|
88
88
|
import '../../Option/Option.mjs';
|
|
89
89
|
import '../../../views/OverlayContentView.mjs';
|
|
90
90
|
import '../../../views/ClearPropsContextView.mjs';
|
|
91
|
+
import '../../../views/LoadingSpinnerView.mjs';
|
|
91
92
|
import '../../PasswordCreationField/PasswordCreationField.mjs';
|
|
92
93
|
import '../../Popover/components/PopoverTrigger/PopoverTrigger.mjs';
|
|
93
94
|
import '../../Popover/Popover.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAriaAnnounceSearchState.mjs","sources":["../../../../../../../src/components/List/hooks/useAriaAnnounceSearchState.ts"],"sourcesContent":["import { useLocalizedStringFormatter } from \"react-aria\";\nimport locales from \"../locales/*.locale.json\";\nimport { announce } from \"@react-aria/live-announcer\";\nimport { useList } from \"@/index/default\";\nimport { useDebounceCallback } from \"usehooks-ts\";\nimport { useEffect } from \"react\";\n\nconst announceDebounceMs = 600;\n\nexport const useAriaAnnounceSearchState = (): void => {\n const formatter = useLocalizedStringFormatter(locales);\n const list = useList();\n const debouncedAnnounce = useDebounceCallback(announce, announceDebounceMs);\n\n const searchTerm = list.search?.value;\n const resultCount = list.batches.getTotalItemsCount();\n const isLoading = list.loader.loaderState.useIsLoading();\n\n useEffect(() => {\n if (isLoading || !searchTerm) {\n debouncedAnnounce.cancel();\n return;\n }\n\n const text = formatter.format(\n resultCount > 0\n ? \"list.search.announce.result\"\n : \"list.search.announce.noResult\",\n {\n resultCount,\n searchTerm,\n },\n );\n\n debouncedAnnounce(text, \"polite\");\n }, [searchTerm, resultCount, isLoading]);\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useAriaAnnounceSearchState.mjs","sources":["../../../../../../../src/components/List/hooks/useAriaAnnounceSearchState.ts"],"sourcesContent":["import { useLocalizedStringFormatter } from \"react-aria\";\nimport locales from \"../locales/*.locale.json\";\nimport { announce } from \"@react-aria/live-announcer\";\nimport { useList } from \"@/index/default\";\nimport { useDebounceCallback } from \"usehooks-ts\";\nimport { useEffect } from \"react\";\n\nconst announceDebounceMs = 600;\n\nexport const useAriaAnnounceSearchState = (): void => {\n const formatter = useLocalizedStringFormatter(locales);\n const list = useList();\n const debouncedAnnounce = useDebounceCallback(announce, announceDebounceMs);\n\n const searchTerm = list.search?.value;\n const resultCount = list.batches.getTotalItemsCount();\n const isLoading = list.loader.loaderState.useIsLoading();\n\n useEffect(() => {\n if (isLoading || !searchTerm) {\n debouncedAnnounce.cancel();\n return;\n }\n\n const text = formatter.format(\n resultCount > 0\n ? \"list.search.announce.result\"\n : \"list.search.announce.noResult\",\n {\n resultCount,\n searchTerm,\n },\n );\n\n debouncedAnnounce(text, \"polite\");\n }, [searchTerm, resultCount, isLoading]);\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,MAAM,kBAAA,GAAqB,GAAA;AAEpB,MAAM,6BAA6B,MAAY;AACpD,EAAA,MAAM,SAAA,GAAY,4BAA4B,OAAO,CAAA;AACrD,EAAA,MAAM,OAAO,OAAA,EAAQ;AACrB,EAAA,MAAM,iBAAA,GAAoB,mBAAA,CAAoB,QAAA,EAAU,kBAAkB,CAAA;AAE1E,EAAA,MAAM,UAAA,GAAa,KAAK,MAAA,EAAQ,KAAA;AAChC,EAAA,MAAM,WAAA,GAAc,IAAA,CAAK,OAAA,CAAQ,kBAAA,EAAmB;AACpD,EAAA,MAAM,SAAA,GAAY,IAAA,CAAK,MAAA,CAAO,WAAA,CAAY,YAAA,EAAa;AAEvD,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,SAAA,IAAa,CAAC,UAAA,EAAY;AAC5B,MAAA,iBAAA,CAAkB,MAAA,EAAO;AACzB,MAAA;AAAA,IACF;AAEA,IAAA,MAAM,OAAO,SAAA,CAAU,MAAA;AAAA,MACrB,WAAA,GAAc,IACV,6BAAA,GACA,+BAAA;AAAA,MACJ;AAAA,QACE,WAAA;AAAA,QACA;AAAA;AACF,KACF;AAEA,IAAA,iBAAA,CAAkB,MAAM,QAAQ,CAAA;AAAA,EAClC,CAAA,EAAG,CAAC,UAAA,EAAY,WAAA,EAAa,SAAS,CAAC,CAAA;AACzC;;;;"}
|
|
@@ -9,7 +9,9 @@ import { PropsContextProvider } from '../../lib/propsContext/components/PropsCon
|
|
|
9
9
|
import { flowComponent } from '../../lib/componentFactory/flowComponent.mjs';
|
|
10
10
|
import { Overlay } from '../Overlay/Overlay.mjs';
|
|
11
11
|
import { Action } from '../Action/Action.mjs';
|
|
12
|
+
import 'react-aria';
|
|
12
13
|
import 'react';
|
|
14
|
+
import '@react-aria/live-announcer';
|
|
13
15
|
import '@tabler/icons-react';
|
|
14
16
|
import '../Icon/Icon.mjs';
|
|
15
17
|
import '../../views/IconView.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.mjs","sources":["../../../../../../src/components/Modal/Modal.tsx"],"sourcesContent":["import type { PropsWithChildren, 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\";\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 {children}\n </PropsContextProvider>\n </Overlay>\n );\n },\n {\n type: \"provider\",\n },\n);\n\nexport default Modal;\n"],"names":["children","props"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Modal.mjs","sources":["../../../../../../src/components/Modal/Modal.tsx"],"sourcesContent":["import type { PropsWithChildren, 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\";\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 {children}\n </PropsContextProvider>\n </Overlay>\n );\n },\n {\n type: \"provider\",\n },\n);\n\nexport default Modal;\n"],"names":["children","props"],"mappings":";;;;;;;;;;;;;;;;;;AAyCO,MAAM,KAAA,GAAQ,aAAA;AAAA,EACnB,OAAA;AAAA,EACA,CAAC,KAAA,KAAU;AACT,IAAA,MAAM;AAAA,MACJ,I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,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,QAAA,kBAAA,GAAA,CAAC,oBAAA,EAAA,EAAqB,KAAA,EAAO,YAAA,EAC1B,QAAA,EACH;AAAA;AAAA,KACF;AAAA,EAEJ,CAAA;AAAA,EACA;AAAA,IACE,IAAA,EAAM;AAAA;AAEV;;;;"}
|
|
@@ -2,11 +2,17 @@
|
|
|
2
2
|
/* */
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
import * as Aria from 'react-aria-components';
|
|
5
|
-
import 'react';
|
|
5
|
+
import { Suspense } from 'react';
|
|
6
|
+
import LoadingSpinnerView from '../../../views/LoadingSpinnerView.mjs';
|
|
7
|
+
import { useAriaAnnounceSuspense } from '../../Action/lib/ariaLive.mjs';
|
|
6
8
|
|
|
9
|
+
const OverlaySuspenseFallback = () => {
|
|
10
|
+
useAriaAnnounceSuspense();
|
|
11
|
+
return /* @__PURE__ */ jsx(LoadingSpinnerView, { color: "dark" });
|
|
12
|
+
};
|
|
7
13
|
const OverlayContent = (props) => {
|
|
8
14
|
const { children, ...restProps } = props;
|
|
9
|
-
return /* @__PURE__ */ jsx(Aria.ModalOverlay, { ...restProps, children: /* @__PURE__ */ jsx(Aria.Modal, { children: /* @__PURE__ */ jsx(Aria.Dialog, { children }) }) });
|
|
15
|
+
return /* @__PURE__ */ jsx(Aria.ModalOverlay, { ...restProps, children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(OverlaySuspenseFallback, {}), children: /* @__PURE__ */ jsx(Aria.Modal, { children: /* @__PURE__ */ jsx(Aria.Dialog, { children }) }) }) });
|
|
10
16
|
};
|
|
11
17
|
|
|
12
18
|
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
|
|
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 LoadingSpinnerView from \"@/views/LoadingSpinnerView\";\nimport { useAriaAnnounceSuspense } from \"@/components/Action/lib/ariaLive\";\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\nconst OverlaySuspenseFallback: FC = () => {\n useAriaAnnounceSuspense();\n return <LoadingSpinnerView color=\"dark\" />;\n};\n\n/** @flr-generate all */\nexport const OverlayContent: FC<OverlayContentProps> = (props) => {\n const { children, ...restProps } = props;\n\n return (\n <Aria.ModalOverlay {...restProps}>\n <Suspense fallback={<OverlaySuspenseFallback />}>\n <Aria.Modal>\n <Aria.Dialog>{children}</Aria.Dialog>\n </Aria.Modal>\n </Suspense>\n </Aria.ModalOverlay>\n );\n};\n\nexport default OverlayContent;\n"],"names":[],"mappings":";;;;;;AAgBA,MAAM,0BAA8B,MAAM;AACxC,EAAA,uBAAA,EAAwB;AACxB,EAAA,uBAAO,GAAA,CAAC,kBAAA,EAAA,EAAmB,KAAA,EAAM,MAAA,EAAO,CAAA;AAC1C,CAAA;AAGO,MAAM,cAAA,GAA0C,CAAC,KAAA,KAAU;AAChE,EAAA,MAAM,EAAE,QAAA,EAAU,GAAG,SAAA,EAAU,GAAI,KAAA;AAEnC,EAAA,uBACE,GAAA,CAAC,KAAK,YAAA,EAAL,EAAmB,GAAG,SAAA,EACrB,QAAA,kBAAA,GAAA,CAAC,QAAA,EAAA,EAAS,QAAA,kBAAU,GAAA,CAAC,uBAAA,EAAA,EAAwB,GAC3C,QAAA,kBAAA,GAAA,CAAC,IAAA,CAAK,KAAA,EAAL,EACC,QAAA,kBAAA,GAAA,CAAC,IAAA,CAAK,QAAL,EAAa,QAAA,EAAS,CAAA,EACzB,CAAA,EACF,CAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -12,6 +12,8 @@ import { FieldErrorContext } from 'react-aria-components';
|
|
|
12
12
|
import clsx from 'clsx';
|
|
13
13
|
import { TunnelProvider, TunnelExit } from '@mittwald/react-tunnel';
|
|
14
14
|
import '../Action/Action.mjs';
|
|
15
|
+
import 'react-aria';
|
|
16
|
+
import '@react-aria/live-announcer';
|
|
15
17
|
import { getStateFromLatestPolicyValidationResult } from './lib/getStateFromLatestPolicyValidationResult.mjs';
|
|
16
18
|
import locales from '../../../../_virtual/_.locale.json@95341064edeb0e38b66d786dbd62955c.mjs';
|
|
17
19
|
import { generateValidationTranslation } from './lib/generateValidationTranslation.mjs';
|
package/dist/js/components/src/components/PasswordCreationField/PasswordCreationField.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordCreationField.mjs","sources":["../../../../../../src/components/PasswordCreationField/PasswordCreationField.tsx"],"sourcesContent":["import {\n type PropsWithChildren,\n useState,\n type ClipboardEvent,\n useDeferredValue,\n useMemo,\n} from \"react\";\nimport {\n dynamic,\n type PropsContext,\n PropsContextProvider,\n} from \"@/lib/propsContext\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport styles from \"./PasswordCreationField.module.scss\";\nimport * as Aria from \"react-aria-components\";\nimport clsx from \"clsx\";\nimport { TunnelExit, TunnelProvider } from \"@mittwald/react-tunnel\";\nimport { type ActionFn } from \"@/components/Action\";\nimport getStateFromLatestPolicyValidationResult from \"@/components/PasswordCreationField/lib/getStateFromLatestPolicyValidationResult\";\nimport locales from \"./locales/*.locale.json\";\nimport generateValidationTranslation from \"@/components/PasswordCreationField/lib/generateValidationTranslation\";\nimport FieldDescription from \"@/components/FieldDescription\";\nimport ComplexityIndicator from \"@/components/PasswordCreationField/components/ComplexityIndicator/ComplexityIndicator\";\nimport { generatePassword } from \"@/components/PasswordCreationField/worker/generatePassword\";\nimport TogglePasswordVisibilityButton from \"@/components/PasswordCreationField/components/TogglePasswordVisibilityButton/TogglePasswordVisibilityButton\";\nimport { FieldErrorContext } from \"react-aria-components\";\nimport { Wrap } from \"@/components/Wrap\";\nimport { ReactAriaControlledValueFix } from \"@/lib/react/ReactAriaControlledValueFix\";\nimport { ValidationResultButton } from \"@/components/PasswordCreationField/components/ValidationResultButton/ValidationResultButton\";\nimport { PasswordGenerateButton } from \"@/components/PasswordCreationField/components/PasswordGenerateButton/PasswordGenerateButton\";\nimport { useLocalizedContextStringFormatter } from \"@/components/TranslationProvider/useLocalizedContextStringFormatter\";\nimport type {\n PolicyValidationResult,\n PolicyGenericDeclaration,\n RuleValidationResult,\n} from \"@/integrations/@mittwald/password-tools-js\";\nimport {\n defaultPasswordCreationPolicy,\n Policy,\n} from \"@/integrations/@mittwald/password-tools-js\";\nimport { usePolicyValidationResult } from \"@/components/PasswordCreationField/lib/usePolicyValidationResult\";\nimport { useManagedValue } from \"@/lib/hooks/useManagedValue\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\n\nexport interface PasswordCreationFieldProps\n extends PropsWithChildren<\n Omit<Aria.TextFieldProps, \"children\" | \"value\" | \"defaultValue\"> &\n Partial<Pick<Aria.FieldErrorRenderProps, \"validationErrors\">>\n >,\n FlowComponentProps<HTMLInputElement> {\n value?: string;\n onValidationResult?: (result: { password: string; isValid: boolean }) => void;\n defaultValue?: string;\n placeholder?: string;\n validationPolicy?: PolicyGenericDeclaration;\n}\n\nexport interface ResolvedPolicyValidationResult\n extends Omit<PolicyValidationResult, \"isValid\"> {\n isValid: boolean | \"indeterminate\";\n ruleResults: RuleValidationResult[];\n}\n\n/** @flr-generate all */\nexport const PasswordCreationField = flowComponent(\n \"PasswordCreationField\",\n (props) => {\n const {\n children,\n className,\n ref,\n isDisabled,\n onValidationResult,\n isInvalid: invalidFromProps,\n validationPolicy:\n validationPolicyFromProps = defaultPasswordCreationPolicy,\n isRequired,\n ...rest\n } = props;\n\n const {\n FieldErrorView,\n FieldErrorResetContext,\n fieldProps,\n fieldPropsContext,\n } = useFieldComponent(props);\n\n const [isLoading, setIsLoading] = useState(false);\n const translate = useLocalizedContextStringFormatter(locales);\n\n const validationPolicy = useMemo(\n () => Policy.fromDeclaration(validationPolicyFromProps),\n [validationPolicyFromProps],\n );\n\n const { value, handleOnChange } = useManagedValue(props);\n const deferredValue = useDeferredValue(value);\n\n const [isPasswordRevealed, setIsPasswordRevealed] = useState(false);\n const initialPolicyValidationState: ResolvedPolicyValidationResult = {\n isValid: true,\n complexity: {\n min: validationPolicy.minComplexity,\n actual: 4,\n warning: null,\n },\n ruleResults: [],\n };\n\n const [policyValidationResult, setPolicyValidationResult] = useState(\n initialPolicyValidationState,\n );\n usePolicyValidationResult(\n validationPolicy,\n deferredValue,\n () => {\n if (isEmptyValue) {\n return;\n }\n\n setIsLoading(() => true);\n },\n ({ password, isValid, results }) => {\n if (isEmptyValue) {\n setPolicyValidationResult(() => ({\n ...results,\n isValid: true,\n }));\n return;\n }\n\n setIsLoading(() => false);\n setPolicyValidationResult(() => results);\n onValidationResult?.({ password, isValid });\n },\n );\n\n const isEmptyValue = !value;\n const stateFromValidationResult = getStateFromLatestPolicyValidationResult(\n isEmptyValue,\n policyValidationResult,\n );\n let latestValidationErrorText = undefined;\n if (stateFromValidationResult) {\n const [translationKey, translationValues] = generateValidationTranslation(\n stateFromValidationResult,\n );\n latestValidationErrorText = translate.format(\n translationKey,\n translationValues,\n );\n }\n\n const isValidFromValidationResult =\n !isEmptyValue && stateFromValidationResult?.isValid;\n const isInvalidFromValidationResult =\n !isEmptyValue && !stateFromValidationResult?.isValid;\n const isInvalid = invalidFromProps || isInvalidFromValidationResult;\n\n const setOptimisticPolicyValidationResult = (\n state: Partial<ResolvedPolicyValidationResult> = {},\n ) => {\n setIsLoading(() => false);\n setPolicyValidationResult(() => ({\n ...initialPolicyValidationState,\n ...state,\n isValid: true,\n }));\n };\n\n const onPasswordGenerateHandler: ActionFn = async () => {\n const generatedPassword = await generatePassword(validationPolicy);\n setOptimisticPolicyValidationResult();\n setIsPasswordRevealed(true);\n handleOnChange(generatedPassword);\n };\n\n const onPasswordPasteHandler = (event: ClipboardEvent) => {\n const pastedValue = event.clipboardData.getData(\"text\");\n if (pastedValue !== value) {\n setOptimisticPolicyValidationResult({\n isValid: \"indeterminate\",\n });\n }\n };\n\n const togglePasswordVisibilityHandler = () => {\n setIsPasswordRevealed((old) => !old);\n };\n\n const propsContext: PropsContext = {\n ...fieldPropsContext,\n Button: {\n tunnelId: \"button\",\n size: \"m\",\n variant: \"plain\",\n color: \"secondary\",\n isDisabled: isDisabled,\n className: styles.button,\n },\n CopyButton: {\n tunnelId: \"button\",\n size: \"m\",\n variant: \"plain\",\n color: \"secondary\",\n isDisabled: isDisabled,\n className: styles.button,\n text: value,\n },\n Label: {\n ...fieldPropsContext.Label,\n tunnelId: \"label\",\n children: dynamic((localProps) => {\n return (\n <>\n {localProps.children}\n <PasswordGenerateButton\n isDisabled={isDisabled}\n onGeneratePasswordAction={onPasswordGenerateHandler}\n />\n <ValidationResultButton\n isEmptyValue={isEmptyValue}\n isDisabled={isDisabled}\n policyValidationResult={policyValidationResult}\n />\n </>\n );\n }),\n },\n };\n\n return (\n <Aria.TextField\n {...rest}\n value={value}\n type={isPasswordRevealed ? \"text\" : \"password\"}\n onChange={handleOnChange}\n onPaste={onPasswordPasteHandler}\n className={clsx(className, fieldProps.className)}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n isRequired={isRequired}\n >\n <TunnelProvider>\n <FieldErrorResetContext>\n <PropsContextProvider\n props={propsContext}\n dependencies={[\n isDisabled,\n isRequired,\n value,\n policyValidationResult,\n ]}\n >\n <TunnelExit id=\"label\" />\n <Aria.Group\n isDisabled={isDisabled}\n className={clsx(styles.inputGroup)}\n >\n <ReactAriaControlledValueFix\n inputContext={Aria.InputContext}\n props={{ ...props, value }}\n >\n <Aria.Input ref={ref} className={styles.input} />\n </ReactAriaControlledValueFix>\n <Aria.Group className={styles.buttonContainer}>\n <TogglePasswordVisibilityButton\n className={styles.button}\n isVisible={isPasswordRevealed}\n isDisabled={isDisabled}\n onPress={togglePasswordVisibilityHandler}\n />\n <TunnelExit id=\"button\" />\n </Aria.Group>\n <ComplexityIndicator\n isEmptyValue={isEmptyValue}\n isLoading={isLoading}\n policyValidationResult={policyValidationResult}\n validationResultState={stateFromValidationResult}\n />\n </Aria.Group>\n {children}\n {isValidFromValidationResult && (\n <FieldDescription>{latestValidationErrorText}</FieldDescription>\n )}\n </PropsContextProvider>\n </FieldErrorResetContext>\n <Wrap\n if={\n isInvalidFromValidationResult &&\n policyValidationResult.isValid !== \"indeterminate\" &&\n latestValidationErrorText\n }\n >\n <FieldErrorContext.Provider\n value={{\n isInvalid: true,\n validationErrors: [latestValidationErrorText ?? \"\"],\n validationDetails: {\n customError: true,\n valid: false,\n typeMismatch: false,\n stepMismatch: false,\n valueMissing: false,\n tooShort: false,\n tooLong: false,\n rangeUnderflow: false,\n patternMismatch: false,\n badInput: false,\n rangeOverflow: false,\n },\n }}\n >\n <FieldErrorView />\n </FieldErrorContext.Provider>\n </Wrap>\n </TunnelProvider>\n </Aria.TextField>\n );\n },\n);\n\nexport default PasswordCreationField;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmEO,MAAM,qBAAA,GAAwB,aAAA;AAAA,EACnC,uBAAA;AAAA,EACA,CAAC,KAAA,KAAU;AACT,IAAA,MAAM;AAAA,MACJ,QAAA;AAAA,MACA,SAAA;AAAA,MACA,GAAA;AAAA,MACA,UAAA;AAAA,MACA,kBAAA;AAAA,MACA,SAAA,EAAW,gBAAA;AAAA,MACX,kBACE,yBAAA,GAA4B,6BAAA;AAAA,MAC9B,UAAA;AAAA,MACA,GAAG;AAAA,KACL,GAAI,KAAA;AAEJ,IAAA,MAAM;AAAA,MACJ,cAAA;AAAA,MACA,sBAAA;AAAA,MACA,UAAA;AAAA,MACA;AAAA,KACF,GAAI,kBAAkB,KAAK,CAAA;AAE3B,IAAA,MAAM,CAAC,SAAA,EAAW,YAAY,CAAA,GAAI,SAAS,KAAK,CAAA;AAChD,IAAA,MAAM,SAAA,GAAY,mCAAmC,OAAO,CAAA;AAE5D,IAAA,MAAM,gBAAA,GAAmB,OAAA;AAAA,MACvB,MAAM,MAAA,CAAO,eAAA,CAAgB,yBAAyB,CAAA;AAAA,MACtD,CAAC,yBAAyB;AAAA,KAC5B;AAEA,IAAA,MAAM,EAAE,KAAA,EAAO,cAAA,EAAe,GAAI,gBAAgB,KAAK,CAAA;AACvD,IAAA,MAAM,aAAA,GAAgB,iBAAiB,KAAK,CAAA;AAE5C,IAAA,MAAM,CAAC,kBAAA,EAAoB,qBAAqB,CAAA,GAAI,SAAS,KAAK,CAAA;AAClE,IAAA,MAAM,4BAAA,GAA+D;AAAA,MACnE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AAA;AAAA,gBACA,2BAAA,oBACC,GAAA,CAAC,gBAAA,EAAA,EAAkB,QAAA,EAAA,yBAAA,EAA0B;AAAA;AAAA;AAAA,WAEjD,EACF,CAAA;AAAA,0BACA,GAAA;AAAA,YAAC,IAAA;AAAA,YAAA;AAAA,cACC,EAAA,EACE,6BAAA,IACA,sBAAA,CAAuB,OAAA,KAAY,eAAA,IACnC,yBAAA;AAAA,cAGF,QAAA,kBAAA,GAAA;AAAA,gBAAC,iBAAA,CAAkB,QAAA;AAAA,gBAAlB;AAAA,kBACC,KAAA,EAAO;AAAA,oBACL,SAAA,EAAW,IAAA;AAAA,oBACX,gBAAA,EAAkB,CAAC,yBAAA,IAA6B,EAAE,CAAA;AAAA,oBAClD,iBAAA,EAAmB;AAAA,sBACjB,WAAA,EAAa,IAAA;AAAA,sBACb,KAAA,EAAO,KAAA;AAAA,sBACP,YAAA,EAAc,KAAA;AAAA,sBACd,YAAA,EAAc,KAAA;AAAA,sBACd,YAAA,EAAc,KAAA;AAAA,sBACd,QAAA,EAAU,KAAA;AAAA,sBACV,OAAA,EAAS,KAAA;AAAA,sBACT,cAAA,EAAgB,KAAA;AAAA,sBAChB,eAAA,EAAiB,KAAA;AAAA,sBACjB,QAAA,EAAU,KAAA;AAAA,sBACV,aAAA,EAAe;AAAA;AACjB,mBACF;AAAA,kBAEA,8BAAC,cAAA,EAAA,EAAe;AAAA;AAAA;AAClB;AAAA;AACF,SAAA,EACF;AAAA;AAAA,KACF;AAAA,EAEJ;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"PasswordCreationField.mjs","sources":["../../../../../../src/components/PasswordCreationField/PasswordCreationField.tsx"],"sourcesContent":["import {\n type PropsWithChildren,\n useState,\n type ClipboardEvent,\n useDeferredValue,\n useMemo,\n} from \"react\";\nimport {\n dynamic,\n type PropsContext,\n PropsContextProvider,\n} from \"@/lib/propsContext\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport styles from \"./PasswordCreationField.module.scss\";\nimport * as Aria from \"react-aria-components\";\nimport clsx from \"clsx\";\nimport { TunnelExit, TunnelProvider } from \"@mittwald/react-tunnel\";\nimport { type ActionFn } from \"@/components/Action\";\nimport getStateFromLatestPolicyValidationResult from \"@/components/PasswordCreationField/lib/getStateFromLatestPolicyValidationResult\";\nimport locales from \"./locales/*.locale.json\";\nimport generateValidationTranslation from \"@/components/PasswordCreationField/lib/generateValidationTranslation\";\nimport FieldDescription from \"@/components/FieldDescription\";\nimport ComplexityIndicator from \"@/components/PasswordCreationField/components/ComplexityIndicator/ComplexityIndicator\";\nimport { generatePassword } from \"@/components/PasswordCreationField/worker/generatePassword\";\nimport TogglePasswordVisibilityButton from \"@/components/PasswordCreationField/components/TogglePasswordVisibilityButton/TogglePasswordVisibilityButton\";\nimport { FieldErrorContext } from \"react-aria-components\";\nimport { Wrap } from \"@/components/Wrap\";\nimport { ReactAriaControlledValueFix } from \"@/lib/react/ReactAriaControlledValueFix\";\nimport { ValidationResultButton } from \"@/components/PasswordCreationField/components/ValidationResultButton/ValidationResultButton\";\nimport { PasswordGenerateButton } from \"@/components/PasswordCreationField/components/PasswordGenerateButton/PasswordGenerateButton\";\nimport { useLocalizedContextStringFormatter } from \"@/components/TranslationProvider/useLocalizedContextStringFormatter\";\nimport type {\n PolicyValidationResult,\n PolicyGenericDeclaration,\n RuleValidationResult,\n} from \"@/integrations/@mittwald/password-tools-js\";\nimport {\n defaultPasswordCreationPolicy,\n Policy,\n} from \"@/integrations/@mittwald/password-tools-js\";\nimport { usePolicyValidationResult } from \"@/components/PasswordCreationField/lib/usePolicyValidationResult\";\nimport { useManagedValue } from \"@/lib/hooks/useManagedValue\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\n\nexport interface PasswordCreationFieldProps\n extends PropsWithChildren<\n Omit<Aria.TextFieldProps, \"children\" | \"value\" | \"defaultValue\"> &\n Partial<Pick<Aria.FieldErrorRenderProps, \"validationErrors\">>\n >,\n FlowComponentProps<HTMLInputElement> {\n value?: string;\n onValidationResult?: (result: { password: string; isValid: boolean }) => void;\n defaultValue?: string;\n placeholder?: string;\n validationPolicy?: PolicyGenericDeclaration;\n}\n\nexport interface ResolvedPolicyValidationResult\n extends Omit<PolicyValidationResult, \"isValid\"> {\n isValid: boolean | \"indeterminate\";\n ruleResults: RuleValidationResult[];\n}\n\n/** @flr-generate all */\nexport const PasswordCreationField = flowComponent(\n \"PasswordCreationField\",\n (props) => {\n const {\n children,\n className,\n ref,\n isDisabled,\n onValidationResult,\n isInvalid: invalidFromProps,\n validationPolicy:\n validationPolicyFromProps = defaultPasswordCreationPolicy,\n isRequired,\n ...rest\n } = props;\n\n const {\n FieldErrorView,\n FieldErrorResetContext,\n fieldProps,\n fieldPropsContext,\n } = useFieldComponent(props);\n\n const [isLoading, setIsLoading] = useState(false);\n const translate = useLocalizedContextStringFormatter(locales);\n\n const validationPolicy = useMemo(\n () => Policy.fromDeclaration(validationPolicyFromProps),\n [validationPolicyFromProps],\n );\n\n const { value, handleOnChange } = useManagedValue(props);\n const deferredValue = useDeferredValue(value);\n\n const [isPasswordRevealed, setIsPasswordRevealed] = useState(false);\n const initialPolicyValidationState: ResolvedPolicyValidationResult = {\n isValid: true,\n complexity: {\n min: validationPolicy.minComplexity,\n actual: 4,\n warning: null,\n },\n ruleResults: [],\n };\n\n const [policyValidationResult, setPolicyValidationResult] = useState(\n initialPolicyValidationState,\n );\n usePolicyValidationResult(\n validationPolicy,\n deferredValue,\n () => {\n if (isEmptyValue) {\n return;\n }\n\n setIsLoading(() => true);\n },\n ({ password, isValid, results }) => {\n if (isEmptyValue) {\n setPolicyValidationResult(() => ({\n ...results,\n isValid: true,\n }));\n return;\n }\n\n setIsLoading(() => false);\n setPolicyValidationResult(() => results);\n onValidationResult?.({ password, isValid });\n },\n );\n\n const isEmptyValue = !value;\n const stateFromValidationResult = getStateFromLatestPolicyValidationResult(\n isEmptyValue,\n policyValidationResult,\n );\n let latestValidationErrorText = undefined;\n if (stateFromValidationResult) {\n const [translationKey, translationValues] = generateValidationTranslation(\n stateFromValidationResult,\n );\n latestValidationErrorText = translate.format(\n translationKey,\n translationValues,\n );\n }\n\n const isValidFromValidationResult =\n !isEmptyValue && stateFromValidationResult?.isValid;\n const isInvalidFromValidationResult =\n !isEmptyValue && !stateFromValidationResult?.isValid;\n const isInvalid = invalidFromProps || isInvalidFromValidationResult;\n\n const setOptimisticPolicyValidationResult = (\n state: Partial<ResolvedPolicyValidationResult> = {},\n ) => {\n setIsLoading(() => false);\n setPolicyValidationResult(() => ({\n ...initialPolicyValidationState,\n ...state,\n isValid: true,\n }));\n };\n\n const onPasswordGenerateHandler: ActionFn = async () => {\n const generatedPassword = await generatePassword(validationPolicy);\n setOptimisticPolicyValidationResult();\n setIsPasswordRevealed(true);\n handleOnChange(generatedPassword);\n };\n\n const onPasswordPasteHandler = (event: ClipboardEvent) => {\n const pastedValue = event.clipboardData.getData(\"text\");\n if (pastedValue !== value) {\n setOptimisticPolicyValidationResult({\n isValid: \"indeterminate\",\n });\n }\n };\n\n const togglePasswordVisibilityHandler = () => {\n setIsPasswordRevealed((old) => !old);\n };\n\n const propsContext: PropsContext = {\n ...fieldPropsContext,\n Button: {\n tunnelId: \"button\",\n size: \"m\",\n variant: \"plain\",\n color: \"secondary\",\n isDisabled: isDisabled,\n className: styles.button,\n },\n CopyButton: {\n tunnelId: \"button\",\n size: \"m\",\n variant: \"plain\",\n color: \"secondary\",\n isDisabled: isDisabled,\n className: styles.button,\n text: value,\n },\n Label: {\n ...fieldPropsContext.Label,\n tunnelId: \"label\",\n children: dynamic((localProps) => {\n return (\n <>\n {localProps.children}\n <PasswordGenerateButton\n isDisabled={isDisabled}\n onGeneratePasswordAction={onPasswordGenerateHandler}\n />\n <ValidationResultButton\n isEmptyValue={isEmptyValue}\n isDisabled={isDisabled}\n policyValidationResult={policyValidationResult}\n />\n </>\n );\n }),\n },\n };\n\n return (\n <Aria.TextField\n {...rest}\n value={value}\n type={isPasswordRevealed ? \"text\" : \"password\"}\n onChange={handleOnChange}\n onPaste={onPasswordPasteHandler}\n className={clsx(className, fieldProps.className)}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n isRequired={isRequired}\n >\n <TunnelProvider>\n <FieldErrorResetContext>\n <PropsContextProvider\n props={propsContext}\n dependencies={[\n isDisabled,\n isRequired,\n value,\n policyValidationResult,\n ]}\n >\n <TunnelExit id=\"label\" />\n <Aria.Group\n isDisabled={isDisabled}\n className={clsx(styles.inputGroup)}\n >\n <ReactAriaControlledValueFix\n inputContext={Aria.InputContext}\n props={{ ...props, value }}\n >\n <Aria.Input ref={ref} className={styles.input} />\n </ReactAriaControlledValueFix>\n <Aria.Group className={styles.buttonContainer}>\n <TogglePasswordVisibilityButton\n className={styles.button}\n isVisible={isPasswordRevealed}\n isDisabled={isDisabled}\n onPress={togglePasswordVisibilityHandler}\n />\n <TunnelExit id=\"button\" />\n </Aria.Group>\n <ComplexityIndicator\n isEmptyValue={isEmptyValue}\n isLoading={isLoading}\n policyValidationResult={policyValidationResult}\n validationResultState={stateFromValidationResult}\n />\n </Aria.Group>\n {children}\n {isValidFromValidationResult && (\n <FieldDescription>{latestValidationErrorText}</FieldDescription>\n )}\n </PropsContextProvider>\n </FieldErrorResetContext>\n <Wrap\n if={\n isInvalidFromValidationResult &&\n policyValidationResult.isValid !== \"indeterminate\" &&\n latestValidationErrorText\n }\n >\n <FieldErrorContext.Provider\n value={{\n isInvalid: true,\n validationErrors: [latestValidationErrorText ?? \"\"],\n validationDetails: {\n customError: true,\n valid: false,\n typeMismatch: false,\n stepMismatch: false,\n valueMissing: false,\n tooShort: false,\n tooLong: false,\n rangeUnderflow: false,\n patternMismatch: false,\n badInput: false,\n rangeOverflow: false,\n },\n }}\n >\n <FieldErrorView />\n </FieldErrorContext.Provider>\n </Wrap>\n </TunnelProvider>\n </Aria.TextField>\n );\n },\n);\n\nexport default PasswordCreationField;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;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,GAAA;AAAA,gBAAC,iBAAA,CAAkB,QAAA;AAAA,gBAAlB;AAAA,kBACC,KAAA,EAAO;AAAA,oBACL,SAAA,EAAW,IAAA;AAAA,oBACX,gBAAA,EAAkB,CAAC,yBAAA,IAA6B,EAAE,CAAA;AAAA,oBAClD,iBAAA,EAAmB;AAAA,sBACjB,WAAA,EAAa,IAAA;AAAA,sBACb,KAAA,EAAO,KAAA;AAAA,sBACP,YAAA,EAAc,KAAA;AAAA,sBACd,YAAA,EAAc,KAAA;AAAA,sBACd,YAAA,EAAc,KAAA;AAAA,sBACd,QAAA,EAAU,KAAA;AAAA,sBACV,OAAA,EAAS,KAAA;AAAA,sBACT,cAAA,EAAgB,KAAA;AAAA,sBAChB,eAAA,EAAiB,KAAA;AAAA,sBACjB,QAAA,EAAU,KAAA;AAAA,sBACV,aAAA,EAAe;AAAA;AACjB,mBACF;AAAA,kBAEA,8BAAC,cAAA,EAAA,EAAe;AAAA;AAAA;AAClB;AAAA;AACF,SAAA,EACF;AAAA;AAAA,KACF;AAAA,EAEJ;AACF;;;;"}
|
|
@@ -6,6 +6,7 @@ import { useLocalizedStringFormatter } from 'react-aria';
|
|
|
6
6
|
import locales from '../../../../../../_virtual/_.locale.json@95341064edeb0e38b66d786dbd62955c.mjs';
|
|
7
7
|
import { Button } from '../../../Button/Button.mjs';
|
|
8
8
|
import { Action } from '../../../Action/Action.mjs';
|
|
9
|
+
import '@react-aria/live-announcer';
|
|
9
10
|
|
|
10
11
|
const PasswordGenerateButton = (props) => {
|
|
11
12
|
const { isDisabled, onGeneratePasswordAction } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordGenerateButton.mjs","sources":["../../../../../../../../src/components/PasswordCreationField/components/PasswordGenerateButton/PasswordGenerateButton.tsx"],"sourcesContent":["import { type FC } from \"react\";\nimport { useLocalizedStringFormatter } from \"react-aria\";\nimport locales from \"./../../locales/*.locale.json\";\nimport { Button } from \"@/components/Button\";\nimport { Action, type ActionFn } from \"@/components/Action\";\n\ninterface Props {\n isDisabled?: boolean;\n onGeneratePasswordAction?: ActionFn;\n}\n\nexport const PasswordGenerateButton: FC<Props> = (props) => {\n const { isDisabled, onGeneratePasswordAction } = props;\n const translate = useLocalizedStringFormatter(locales);\n\n return (\n <Action action={onGeneratePasswordAction} showFeedback={false}>\n <Button\n data-component=\"generatePassword\"\n isDisabled={isDisabled}\n variant=\"plain\"\n color=\"dark\"\n >\n {translate.format(\"button.generate\")}\n </Button>\n </Action>\n );\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PasswordGenerateButton.mjs","sources":["../../../../../../../../src/components/PasswordCreationField/components/PasswordGenerateButton/PasswordGenerateButton.tsx"],"sourcesContent":["import { type FC } from \"react\";\nimport { useLocalizedStringFormatter } from \"react-aria\";\nimport locales from \"./../../locales/*.locale.json\";\nimport { Button } from \"@/components/Button\";\nimport { Action, type ActionFn } from \"@/components/Action\";\n\ninterface Props {\n isDisabled?: boolean;\n onGeneratePasswordAction?: ActionFn;\n}\n\nexport const PasswordGenerateButton: FC<Props> = (props) => {\n const { isDisabled, onGeneratePasswordAction } = props;\n const translate = useLocalizedStringFormatter(locales);\n\n return (\n <Action action={onGeneratePasswordAction} showFeedback={false}>\n <Button\n data-component=\"generatePassword\"\n isDisabled={isDisabled}\n variant=\"plain\"\n color=\"dark\"\n >\n {translate.format(\"button.generate\")}\n </Button>\n </Action>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AAWO,MAAM,sBAAA,GAAoC,CAAC,KAAA,KAAU;AAC1D,EAAA,MAAM,EAAE,UAAA,EAAY,wBAAA,EAAyB,GAAI,KAAA;AACjD,EAAA,MAAM,SAAA,GAAY,4BAA4B,OAAO,CAAA;AAErD,EAAA,uBACE,GAAA,CAAC,MAAA,EAAA,EAAO,MAAA,EAAQ,wBAAA,EAA0B,cAAc,KAAA,EACtD,QAAA,kBAAA,GAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,gBAAA,EAAe,kBAAA;AAAA,MACf,UAAA;AAAA,MACA,OAAA,EAAQ,OAAA;AAAA,MACR,KAAA,EAAM,MAAA;AAAA,MAEL,QAAA,EAAA,SAAA,CAAU,OAAO,iBAAiB;AAAA;AAAA,GACrC,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -11,8 +11,9 @@ import '../../../../views/IconView.mjs';
|
|
|
11
11
|
import { IconHide } from '../../../Icon/components/icons/IconHide.mjs';
|
|
12
12
|
import { IconShow } from '../../../Icon/components/icons/IconShow.mjs';
|
|
13
13
|
import { Action } from '../../../Action/Action.mjs';
|
|
14
|
-
import locales from '../../../../../../_virtual/_.locale.json@95341064edeb0e38b66d786dbd62955c.mjs';
|
|
15
14
|
import { useLocalizedStringFormatter } from 'react-aria';
|
|
15
|
+
import '@react-aria/live-announcer';
|
|
16
|
+
import locales from '../../../../../../_virtual/_.locale.json@95341064edeb0e38b66d786dbd62955c.mjs';
|
|
16
17
|
|
|
17
18
|
const TogglePasswordVisibilityButton = ({
|
|
18
19
|
isVisible,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TogglePasswordVisibilityButton.mjs","sources":["../../../../../../../../src/components/PasswordCreationField/components/TogglePasswordVisibilityButton/TogglePasswordVisibilityButton.tsx"],"sourcesContent":["import React, { type FC } from \"react\";\nimport { Tooltip, TooltipTrigger } from \"@/components/Tooltip\";\nimport Button from \"@/components/Button\";\nimport { IconHide, IconShow } from \"@/components/Icon/components/icons\";\nimport { Action, type ActionFn } from \"@/components/Action\";\nimport locales from \"./../../locales/*.locale.json\";\nimport { useLocalizedStringFormatter } from \"react-aria\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\n\ninterface Props extends PropsWithClassName {\n isDisabled?: boolean;\n isVisible: boolean;\n onPress: ActionFn;\n}\n\n/** @internal */\nexport const TogglePasswordVisibilityButton: FC<Props> = ({\n isVisible,\n isDisabled = false,\n onPress,\n className,\n}) => {\n const translate = useLocalizedStringFormatter(locales);\n\n const icon = isVisible ? <IconHide /> : <IconShow />;\n const tooltipText = translate.format(\n \"button.generate.tooltip.\" + (isVisible ? \"hide\" : \"show\"),\n );\n\n return (\n <Action action={onPress}>\n <TooltipTrigger>\n <Button\n className={className}\n size=\"m\"\n variant=\"plain\"\n color=\"secondary\"\n isDisabled={isDisabled}\n data-component=\"toggleRevealPassword\"\n aria-label={tooltipText}\n >\n {icon}\n <Tooltip>{tooltipText}</Tooltip>\n </Button>\n </TooltipTrigger>\n </Action>\n );\n};\n\nexport default TogglePasswordVisibilityButton;\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TogglePasswordVisibilityButton.mjs","sources":["../../../../../../../../src/components/PasswordCreationField/components/TogglePasswordVisibilityButton/TogglePasswordVisibilityButton.tsx"],"sourcesContent":["import React, { type FC } from \"react\";\nimport { Tooltip, TooltipTrigger } from \"@/components/Tooltip\";\nimport Button from \"@/components/Button\";\nimport { IconHide, IconShow } from \"@/components/Icon/components/icons\";\nimport { Action, type ActionFn } from \"@/components/Action\";\nimport locales from \"./../../locales/*.locale.json\";\nimport { useLocalizedStringFormatter } from \"react-aria\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\n\ninterface Props extends PropsWithClassName {\n isDisabled?: boolean;\n isVisible: boolean;\n onPress: ActionFn;\n}\n\n/** @internal */\nexport const TogglePasswordVisibilityButton: FC<Props> = ({\n isVisible,\n isDisabled = false,\n onPress,\n className,\n}) => {\n const translate = useLocalizedStringFormatter(locales);\n\n const icon = isVisible ? <IconHide /> : <IconShow />;\n const tooltipText = translate.format(\n \"button.generate.tooltip.\" + (isVisible ? \"hide\" : \"show\"),\n );\n\n return (\n <Action action={onPress}>\n <TooltipTrigger>\n <Button\n className={className}\n size=\"m\"\n variant=\"plain\"\n color=\"secondary\"\n isDisabled={isDisabled}\n data-component=\"toggleRevealPassword\"\n aria-label={tooltipText}\n >\n {icon}\n <Tooltip>{tooltipText}</Tooltip>\n </Button>\n </TooltipTrigger>\n </Action>\n );\n};\n\nexport default TogglePasswordVisibilityButton;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAgBO,MAAM,iCAA4C,CAAC;AAAA,EACxD,SAAA;AAAA,EACA,UAAA,GAAa,KAAA;AAAA,EACb,OAAA;AAAA,EACA;AACF,CAAA,KAAM;AACJ,EAAA,MAAM,SAAA,GAAY,4BAA4B,OAAO,CAAA;AAErD,EAAA,MAAM,OAAO,SAAA,mBAAY,GAAA,CAAC,QAAA,EAAA,EAAS,CAAA,uBAAM,QAAA,EAAA,EAAS,CAAA;AAClD,EAAA,MAAM,cAAc,SAAA,CAAU,MAAA;AAAA,IAC5B,0BAAA,IAA8B,YAAY,MAAA,GAAS,MAAA;AAAA,GACrD;AAEA,EAAA,uBACE,GAAA,CAAC,MAAA,EAAA,EAAO,MAAA,EAAQ,OAAA,EACd,8BAAC,cAAA,EAAA,EACC,QAAA,kBAAA,IAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,SAAA;AAAA,MACA,IAAA,EAAK,GAAA;AAAA,MACL,OAAA,EAAQ,OAAA;AAAA,MACR,KAAA,EAAM,WAAA;AAAA,MACN,UAAA;AAAA,MACA,gBAAA,EAAe,sBAAA;AAAA,MACf,YAAA,EAAY,WAAA;AAAA,MAEX,QAAA,EAAA;AAAA,QAAA,IAAA;AAAA,wBACD,GAAA,CAAC,WAAS,QAAA,EAAA,WAAA,EAAY;AAAA;AAAA;AAAA,KAE1B,CAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -7,6 +7,8 @@ import { FormProvider } from 'react-hook-form';
|
|
|
7
7
|
import '../../../../lib/propsContext/propsContext.mjs';
|
|
8
8
|
import { PropsContextProvider } from '../../../../lib/propsContext/components/PropsContextProvider.mjs';
|
|
9
9
|
import { Action } from '../../../../components/Action/Action.mjs';
|
|
10
|
+
import 'react-aria';
|
|
11
|
+
import '@react-aria/live-announcer';
|
|
10
12
|
import { useRegisterActionStateContext } from './lib/useRegisterActionStateContext.mjs';
|
|
11
13
|
|
|
12
14
|
const DefaultFormComponent = (p) => /* @__PURE__ */ jsx("form", { ...p });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/Form/Form.tsx"],"sourcesContent":["import { FormContextProvider } from \"@/integrations/react-hook-form/components/context/formContext\";\nimport {\n type ComponentProps,\n type ComponentType,\n type FormEvent,\n type FormEventHandler,\n type PropsWithChildren,\n useId,\n useMemo,\n} from \"react\";\nimport type {\n FieldValues,\n SubmitHandler,\n UseFormReturn,\n} from \"react-hook-form\";\nimport { FormProvider as RhfFormContextProvider } from \"react-hook-form\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport { Action } from \"@/components/Action\";\nimport { useRegisterActionStateContext } from \"@/integrations/react-hook-form/components/Form/lib/useRegisterActionStateContext\";\n\nexport type FormOnSubmitHandler<F extends FieldValues> = SubmitHandler<F>;\n\ntype FormComponentType = ComponentType<\n PropsWithChildren<{\n id: string;\n onSubmit?: FormEventHandler | FormOnSubmitHandler<never>;\n }>\n>;\n\nexport interface FormProps<F extends FieldValues>\n extends Omit<ComponentProps<\"form\">, \"onSubmit\">,\n PropsWithChildren {\n form: UseFormReturn<F>;\n onSubmit: FormOnSubmitHandler<F>;\n formComponent?: FormComponentType;\n isReadOnly?: boolean;\n}\n\nconst DefaultFormComponent: FormComponentType = (p) => <form {...p} />;\n\nexport function Form<F extends FieldValues>(props: FormProps<F>) {\n const {\n form,\n children,\n onSubmit,\n formComponent: FormView = DefaultFormComponent,\n isReadOnly,\n ...formProps\n } = props;\n\n const formId = useId();\n const FormViewComponent = useMemo(() => FormView, [formId]);\n const { action, registerSubmitResult } = useRegisterActionStateContext(form);\n\n const handleOnSubmit = (e?: FormEvent<HTMLFormElement> | F) => {\n const { isSubmitting, isValidating } = form.control._formState;\n const formEvent =\n e && \"nativeEvent\" in e ? (e as FormEvent<HTMLFormElement>) : undefined;\n\n formEvent?.stopPropagation();\n\n if (isSubmitting || isValidating) {\n formEvent?.preventDefault();\n return;\n }\n\n form.handleSubmit((values) => {\n const result = onSubmit(values, formEvent);\n registerSubmitResult(result);\n return result;\n })(formEvent);\n };\n\n const readonlyPropsContext = {\n isReadOnly: true,\n } as const;\n\n const propsContext: PropsContext = {\n SearchField: readonlyPropsContext,\n TextField: readonlyPropsContext,\n TextArea: readonlyPropsContext,\n MarkdownEditor: readonlyPropsContext,\n Checkbox: readonlyPropsContext,\n CheckboxGroup: readonlyPropsContext,\n CheckboxButton: readonlyPropsContext,\n FileField: readonlyPropsContext,\n FileDropZone: readonlyPropsContext,\n NumberField: readonlyPropsContext,\n RadioGroup: readonlyPropsContext,\n Switch: readonlyPropsContext,\n Slider: readonlyPropsContext,\n PasswordCreationField: readonlyPropsContext,\n DatePicker: readonlyPropsContext,\n DateRangePicker: readonlyPropsContext,\n TimeField: readonlyPropsContext,\n SegmentedControl: readonlyPropsContext,\n Select: readonlyPropsContext,\n ComboBox: readonlyPropsContext,\n Button: readonlyPropsContext,\n };\n\n return (\n <PropsContextProvider props={isReadOnly ? propsContext : {}}>\n <RhfFormContextProvider {...form}>\n <FormContextProvider value={{ form, id: formId }}>\n <Action actionModel={action}>\n <FormViewComponent\n {...formProps}\n id={formId}\n onSubmit={handleOnSubmit}\n >\n {children}\n </FormViewComponent>\n </Action>\n </FormContextProvider>\n </RhfFormContextProvider>\n </PropsContextProvider>\n );\n}\n\nexport default Form;\n"],"names":["RhfFormContextProvider"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Form.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/Form/Form.tsx"],"sourcesContent":["import { FormContextProvider } from \"@/integrations/react-hook-form/components/context/formContext\";\nimport {\n type ComponentProps,\n type ComponentType,\n type FormEvent,\n type FormEventHandler,\n type PropsWithChildren,\n useId,\n useMemo,\n} from \"react\";\nimport type {\n FieldValues,\n SubmitHandler,\n UseFormReturn,\n} from \"react-hook-form\";\nimport { FormProvider as RhfFormContextProvider } from \"react-hook-form\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport { Action } from \"@/components/Action\";\nimport { useRegisterActionStateContext } from \"@/integrations/react-hook-form/components/Form/lib/useRegisterActionStateContext\";\n\nexport type FormOnSubmitHandler<F extends FieldValues> = SubmitHandler<F>;\n\ntype FormComponentType = ComponentType<\n PropsWithChildren<{\n id: string;\n onSubmit?: FormEventHandler | FormOnSubmitHandler<never>;\n }>\n>;\n\nexport interface FormProps<F extends FieldValues>\n extends Omit<ComponentProps<\"form\">, \"onSubmit\">,\n PropsWithChildren {\n form: UseFormReturn<F>;\n onSubmit: FormOnSubmitHandler<F>;\n formComponent?: FormComponentType;\n isReadOnly?: boolean;\n}\n\nconst DefaultFormComponent: FormComponentType = (p) => <form {...p} />;\n\nexport function Form<F extends FieldValues>(props: FormProps<F>) {\n const {\n form,\n children,\n onSubmit,\n formComponent: FormView = DefaultFormComponent,\n isReadOnly,\n ...formProps\n } = props;\n\n const formId = useId();\n const FormViewComponent = useMemo(() => FormView, [formId]);\n const { action, registerSubmitResult } = useRegisterActionStateContext(form);\n\n const handleOnSubmit = (e?: FormEvent<HTMLFormElement> | F) => {\n const { isSubmitting, isValidating } = form.control._formState;\n const formEvent =\n e && \"nativeEvent\" in e ? (e as FormEvent<HTMLFormElement>) : undefined;\n\n formEvent?.stopPropagation();\n\n if (isSubmitting || isValidating) {\n formEvent?.preventDefault();\n return;\n }\n\n form.handleSubmit((values) => {\n const result = onSubmit(values, formEvent);\n registerSubmitResult(result);\n return result;\n })(formEvent);\n };\n\n const readonlyPropsContext = {\n isReadOnly: true,\n } as const;\n\n const propsContext: PropsContext = {\n SearchField: readonlyPropsContext,\n TextField: readonlyPropsContext,\n TextArea: readonlyPropsContext,\n MarkdownEditor: readonlyPropsContext,\n Checkbox: readonlyPropsContext,\n CheckboxGroup: readonlyPropsContext,\n CheckboxButton: readonlyPropsContext,\n FileField: readonlyPropsContext,\n FileDropZone: readonlyPropsContext,\n NumberField: readonlyPropsContext,\n RadioGroup: readonlyPropsContext,\n Switch: readonlyPropsContext,\n Slider: readonlyPropsContext,\n PasswordCreationField: readonlyPropsContext,\n DatePicker: readonlyPropsContext,\n DateRangePicker: readonlyPropsContext,\n TimeField: readonlyPropsContext,\n SegmentedControl: readonlyPropsContext,\n Select: readonlyPropsContext,\n ComboBox: readonlyPropsContext,\n Button: readonlyPropsContext,\n };\n\n return (\n <PropsContextProvider props={isReadOnly ? propsContext : {}}>\n <RhfFormContextProvider {...form}>\n <FormContextProvider value={{ form, id: formId }}>\n <Action actionModel={action}>\n <FormViewComponent\n {...formProps}\n id={formId}\n onSubmit={handleOnSubmit}\n >\n {children}\n </FormViewComponent>\n </Action>\n </FormContextProvider>\n </RhfFormContextProvider>\n </PropsContextProvider>\n );\n}\n\nexport default Form;\n"],"names":["RhfFormContextProvider"],"mappings":";;;;;;;;;;;AAsCA,MAAM,uBAA0C,CAAC,CAAA,qBAAM,GAAA,CAAC,MAAA,EAAA,EAAM,GAAG,CAAA,EAAG,CAAA;AAE7D,SAAS,KAA4B,KAAA,EAAqB;AAC/D,EAAA,MAAM;AAAA,IACJ,IAAA;AAAA,IACA,QAAA;AAAA,IACA,QAAA;AAAA,IACA,eAAe,QAAA,GAAW,oBAAA;AAAA,IAC1B,UAAA;AAAA,IACA,GAAG;AAAA,GACL,GAAI,KAAA;AAEJ,EAAA,MAAM,SAAS,KAAA,EAAM;AACrB,EAAA,MAAM,oBAAoB,OAAA,CAAQ,MAAM,QAAA,EAAU,CAAC,MAAM,CAAC,CAAA;AAC1D,EAAA,MAAM,EAAE,MAAA,EAAQ,oBAAA,EAAqB,GAAI,8BAA8B,IAAI,CAAA;AAE3E,EAAA,MAAM,cAAA,GAAiB,CAAC,CAAA,KAAuC;AAC7D,IAAA,MAAM,EAAE,YAAA,EAAc,YAAA,EAAa,GAAI,KAAK,OAAA,CAAQ,UAAA;AACpD,IAAA,MAAM,SAAA,GACJ,CAAA,IAAK,aAAA,IAAiB,CAAA,GA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EACxD,QAAA,kBAAA,GAAA,CAACA,YAAA,EAAA,EAAwB,GAAG,IAAA,EAC1B,8BAAC,mBAAA,EAAA,EAAoB,KAAA,EAAO,EAAE,IAAA,EAAM,EAAA,EAAI,QAAO,EAC7C,QAAA,kBAAA,GAAA,CAAC,MAAA,EAAA,EAAO,WAAA,EAAa,MAAA,EACnB,QAAA,kBAAA,GAAA;AAAA,IAAC,iBAAA;AAAA,IAAA;AAAA,MACE,GAAG,SAAA;AAAA,MACJ,EAAA,EAAI,MAAA;AAAA,MACJ,QAAA,EAAU,cAAA;AAAA,MAET;AAAA;AAAA,GACH,EACF,CAAA,EACF,CAAA,EACF,CAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
import { memo, useContext } from 'react';
|
|
5
|
+
import { LoadingSpinner } from '../components/LoadingSpinner/LoadingSpinner.mjs';
|
|
6
|
+
import { viewComponentContext } from '../lib/viewComponentContext/viewComponentContext.mjs';
|
|
7
|
+
|
|
8
|
+
const LoadingSpinnerView = memo((props) => {
|
|
9
|
+
const View = useContext(viewComponentContext)["LoadingSpinner"] ?? LoadingSpinner;
|
|
10
|
+
return /* @__PURE__ */ jsx(View, { ...props });
|
|
11
|
+
});
|
|
12
|
+
LoadingSpinnerView.displayName = "LoadingSpinnerView";
|
|
13
|
+
|
|
14
|
+
export { LoadingSpinnerView as default };
|
|
15
|
+
//# sourceMappingURL=LoadingSpinnerView.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingSpinnerView.mjs","sources":["../../../../../src/views/LoadingSpinnerView.tsx"],"sourcesContent":["/* prettier-ignore */\n/* This file is auto-generated with the remote-components-generator */\nimport React, { memo, type FC, useContext } from \"react\";\nimport {\n LoadingSpinner,\n type LoadingSpinnerProps,\n} from \"@/components/LoadingSpinner/LoadingSpinner\";\nimport { viewComponentContext } from \"@/lib/viewComponentContext/viewComponentContext\";\n\nconst LoadingSpinnerView: FC<LoadingSpinnerProps> = memo((props) => {\n const View =\n useContext(viewComponentContext)[\"LoadingSpinner\"] ?? LoadingSpinner;\n return <View {...props} />;\n});\nLoadingSpinnerView.displayName = \"LoadingSpinnerView\";\n\nexport default LoadingSpinnerView;\n"],"names":[],"mappings":";;;;;AASA,MAAM,kBAAA,GAA8C,IAAA,CAAK,CAAC,KAAA,KAAU;AAClE,EAAA,MAAM,IAAA,GACJ,UAAA,CAAW,oBAAoB,CAAA,CAAE,gBAAgB,CAAA,IAAK,cAAA;AACxD,EAAA,uBAAO,GAAA,CAAC,IAAA,EAAA,EAAM,GAAG,KAAA,EAAO,CAAA;AAC1B,CAAC;AACD,kBAAA,CAAmB,WAAA,GAAc,oBAAA;;;;"}
|
package/dist/js/default.mjs
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
export { AccentBox } from './components/src/components/AccentBox/AccentBox.mjs';
|
|
4
4
|
export { Accordion } from './components/src/components/Accordion/Accordion.mjs';
|
|
5
5
|
export { Action } from './components/src/components/Action/Action.mjs';
|
|
6
|
+
export { useAriaAnnounceSuspense } from './components/src/components/Action/lib/ariaLive.mjs';
|
|
6
7
|
export { ActionGroup } from './components/src/components/ActionGroup/ActionGroup.mjs';
|
|
7
8
|
export { Activity } from './components/src/components/Activity/Activity.mjs';
|
|
8
9
|
export { Alert } from './components/src/components/Alert/Alert.mjs';
|
package/dist/js/default.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"default.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -127,6 +127,7 @@ import '@mittwald/react-tunnel';
|
|
|
127
127
|
import './components/src/components/SuspenseTrigger/SuspenseTrigger.mjs';
|
|
128
128
|
import 'react-aria';
|
|
129
129
|
export { Action } from './components/src/components/Action/Action.mjs';
|
|
130
|
+
import '@react-aria/live-announcer';
|
|
130
131
|
import './components/src/components/ActionGroup/ActionGroup.mjs';
|
|
131
132
|
import './components/src/components/Alert/Alert.mjs';
|
|
132
133
|
import './components/src/components/AlertBadge/AlertBadge.mjs';
|
|
@@ -201,6 +202,7 @@ export { useOverlayController } from './components/src/lib/controller/overlay/us
|
|
|
201
202
|
import './components/src/lib/controller/overlay/context.mjs';
|
|
202
203
|
import './components/src/views/OverlayContentView.mjs';
|
|
203
204
|
import './components/src/views/ClearPropsContextView.mjs';
|
|
205
|
+
import './components/src/views/LoadingSpinnerView.mjs';
|
|
204
206
|
import './components/src/components/OverlayTrigger/components/MenuTrigger/MenuTrigger.mjs';
|
|
205
207
|
import './components/src/components/PasswordCreationField/PasswordCreationField.mjs';
|
|
206
208
|
export { PopoverTrigger } from './components/src/components/Popover/components/PopoverTrigger/PopoverTrigger.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flr-universal.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"flr-universal.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Action/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Action/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -5,5 +5,6 @@ interface Options {
|
|
|
5
5
|
isFailedText?: string;
|
|
6
6
|
}
|
|
7
7
|
export declare const useAriaAnnounceActionState: (actionState: ActionStateValue, options?: Options) => void;
|
|
8
|
+
export declare const useAriaAnnounceSuspense: () => void;
|
|
8
9
|
export {};
|
|
9
10
|
//# sourceMappingURL=ariaLive.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ariaLive.d.ts","sourceRoot":"","sources":["../../../../../src/components/Action/lib/ariaLive.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAG/E,UAAU,OAAO;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,0BAA0B,GACrC,aAAa,gBAAgB,EAC7B,UAAS,OAAY,KACpB,IAkBF,CAAC"}
|
|
1
|
+
{"version":3,"file":"ariaLive.d.ts","sourceRoot":"","sources":["../../../../../src/components/Action/lib/ariaLive.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAG/E,UAAU,OAAO;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,0BAA0B,GACrC,aAAa,gBAAgB,EAC7B,UAAS,OAAY,KACpB,IAkBF,CAAC;AAEF,eAAO,MAAM,uBAAuB,YAanC,CAAC"}
|
|
@@ -15,4 +15,5 @@ export declare const OffCanvasWithForm: Story;
|
|
|
15
15
|
export declare const WithFormInside: Story;
|
|
16
16
|
export declare const LargeOffCanvas: Story;
|
|
17
17
|
export declare const WithSubHeadings: Story;
|
|
18
|
+
export declare const WithSuspense: Story;
|
|
18
19
|
//# sourceMappingURL=Default.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Default.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Modal/stories/Default.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAOvD,OAAO,KAAuB,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"Default.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Modal/stories/Default.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAOvD,OAAO,KAAuB,MAAM,oBAAoB,CAAC;AAkBzD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CA8C5B,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,KAAK,CAAC,CAAC;AAEpC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,cAAc,EAAE,KAmC5B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAoBzB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAEpB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAEvB,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,KAEtC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAG7B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAoCtB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAoC/B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAqC5B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAqC5B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAiE7B,CAAC;AAMF,eAAO,MAAM,YAAY,EAAE,KAe1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverlayContent.d.ts","sourceRoot":"","sources":["../../../../../src/components/Overlay/components/OverlayContent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAExD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"OverlayContent.d.ts","sourceRoot":"","sources":["../../../../../src/components/Overlay/components/OverlayContent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAExD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAI5D,MAAM,WAAW,mBACf,SAAQ,iBAAiB,EACvB,kBAAkB;IACpB,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IAC1B,YAAY,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAOD,wBAAwB;AACxB,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAYlD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/flow-react-components",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.534",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A React implementation of Flow, mittwald’s design system",
|
|
6
6
|
"homepage": "https://mittwald.github.io/flow",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@internationalized/string-compiler": "^3.2.6",
|
|
60
60
|
"@mittwald/password-tools-js": "3.0.0-alpha.18",
|
|
61
|
-
"@mittwald/react-tunnel": "0.2.0-alpha.
|
|
61
|
+
"@mittwald/react-tunnel": "0.2.0-alpha.534",
|
|
62
62
|
"@mittwald/react-use-promise": "^4.2.2",
|
|
63
63
|
"@react-aria/form": "^3.1.2",
|
|
64
64
|
"@react-aria/live-announcer": "^3.4.4",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"@faker-js/faker": "^10.1.0",
|
|
102
102
|
"@internationalized/date": "^3.10.0",
|
|
103
103
|
"@mittwald/flow-core": "",
|
|
104
|
-
"@mittwald/flow-design-tokens": "0.2.0-alpha.
|
|
104
|
+
"@mittwald/flow-design-tokens": "0.2.0-alpha.534",
|
|
105
105
|
"@mittwald/react-use-promise": "^4.2.2",
|
|
106
106
|
"@mittwald/remote-dom-react": "1.2.2-mittwald.10",
|
|
107
107
|
"@mittwald/typescript-config": "",
|
|
@@ -174,5 +174,5 @@
|
|
|
174
174
|
"optional": true
|
|
175
175
|
}
|
|
176
176
|
},
|
|
177
|
-
"gitHead": "
|
|
177
|
+
"gitHead": "62d7e2a8af7670524b26ff5be6bba5651a9bc834"
|
|
178
178
|
}
|