@mittwald/flow-react-components 1.3.0-next.1 → 1.3.0-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/component-index.json +1 -1
- package/dist/assets/doc-properties.json +1 -1
- package/dist/js/default.mjs +2 -1
- package/dist/js/flr-universal.mjs +2 -1
- package/dist/js/packages/components/src/components/Action/models/ActionModel.mjs +25 -8
- package/dist/js/packages/components/src/components/Action/models/ActionModel.mjs.map +1 -1
- package/dist/js/packages/components/src/components/ContextMenu/ContextMenu.mjs +2 -2
- package/dist/js/packages/components/src/components/ContextMenu/ContextMenu.mjs.map +1 -1
- package/dist/js/packages/components/src/components/ContextMenu/components/ContextMenuSection/ContextMenuSection.mjs +2 -2
- package/dist/js/packages/components/src/components/ContextMenu/components/ContextMenuSection/ContextMenuSection.mjs.map +1 -1
- package/dist/js/packages/components/src/components/ContextMenu/lib.mjs +7 -3
- package/dist/js/packages/components/src/components/ContextMenu/lib.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconAIHosting.mjs +19 -0
- package/dist/js/packages/components/src/components/Icon/components/icons/IconAIHosting.mjs.map +1 -0
- package/dist/js/packages/components/src/components/Modal/Modal.mjs +6 -4
- package/dist/js/packages/components/src/components/Modal/Modal.mjs.map +1 -1
- package/dist/js/packages/components/src/components/OverlayTrigger/OverlayTrigger.mjs +1 -0
- package/dist/js/packages/components/src/components/OverlayTrigger/OverlayTrigger.mjs.map +1 -1
- package/dist/js/packages/components/src/lib/controller/overlay/OverlayContextProvider.mjs +6 -3
- package/dist/js/packages/components/src/lib/controller/overlay/OverlayContextProvider.mjs.map +1 -1
- package/dist/js/packages/components/src/lib/controller/overlay/OverlayController.mjs.map +1 -1
- package/dist/js/packages/components/src/lib/controller/overlay/context.mjs +1 -1
- package/dist/js/packages/components/src/lib/controller/overlay/context.mjs.map +1 -1
- package/dist/js/packages/components/src/lib/controller/overlay/useOverlayController.mjs +1 -1
- package/dist/js/packages/components/src/lib/controller/overlay/useOverlayController.mjs.map +1 -1
- package/dist/types/components/Action/models/ActionModel.d.ts +12 -4
- package/dist/types/components/Action/types.d.ts +9 -2
- package/dist/types/components/ContextMenu/lib.d.ts +5 -1
- package/dist/types/components/Icon/components/icons/IconAIHosting.d.ts +4 -0
- package/dist/types/components/Icon/components/icons/index.d.ts +1 -0
- package/dist/types/lib/controller/overlay/OverlayContextProvider.d.ts +9 -0
- package/dist/types/lib/controller/overlay/OverlayController.d.ts +11 -1
- package/dist/types/lib/controller/overlay/context.d.ts +19 -2
- package/package.json +9 -9
|
@@ -16,8 +16,15 @@ export interface ActionProps extends PropsWithChildren, FlowComponentProps {
|
|
|
16
16
|
* components share one action state.
|
|
17
17
|
*/
|
|
18
18
|
actionModel?: ActionModel;
|
|
19
|
-
/**
|
|
20
|
-
|
|
19
|
+
/**
|
|
20
|
+
* The overlay to close when the action is triggered. `true` closes the
|
|
21
|
+
* nearest enclosing overlay, whichever component it is — a name still wins,
|
|
22
|
+
* so `closeOverlay="Modal"` inside a `Popover` closes the outer modal.
|
|
23
|
+
*
|
|
24
|
+
* There is no `openOverlay={true}` counterpart: the nearest overlay is the
|
|
25
|
+
* one this action renders inside, so it is open by definition.
|
|
26
|
+
*/
|
|
27
|
+
closeOverlay?: boolean | FlowComponentName | OverlayController | CloseOverlayOptions;
|
|
21
28
|
/** The overlay to open when the action is triggered. */
|
|
22
29
|
openOverlay?: FlowComponentName | OverlayController;
|
|
23
30
|
/** The overlay to open or close when the action is triggered. */
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export type ContextMenuSelectionMode = "single" | "multiple" | "navigation" | "switch";
|
|
2
2
|
export declare const getAriaSelectionMode: (selectionMode?: ContextMenuSelectionMode) => "single" | "multiple" | "none" | undefined;
|
|
3
3
|
export declare const getMenuItemSelectionVariant: (selectionMode?: ContextMenuSelectionMode) => "switch" | "navigation" | "control" | undefined;
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Whether selecting an item closes the menu. A mode that collects several
|
|
6
|
+
* selections keeps it open.
|
|
7
|
+
*/
|
|
8
|
+
export declare const closesOnSelect: (selectionMode?: ContextMenuSelectionMode) => selectionMode is "single" | "navigation" | undefined;
|
|
@@ -54,6 +54,7 @@ export { IconUnorderedList } from './IconUnorderedList';
|
|
|
54
54
|
export { IconUpload } from './IconUpload';
|
|
55
55
|
export { IconView } from './IconView';
|
|
56
56
|
export { IconAI } from './IconAI';
|
|
57
|
+
export { IconAIHosting } from './IconAIHosting';
|
|
57
58
|
export { IconAnalytics } from './IconAnalytics';
|
|
58
59
|
export { IconApp } from './IconApp';
|
|
59
60
|
export { IconAutoresponder } from './IconAutoresponder';
|
|
@@ -4,6 +4,15 @@ import { OverlayController } from '..';
|
|
|
4
4
|
interface Props extends PropsWithChildren {
|
|
5
5
|
type: FlowComponentName;
|
|
6
6
|
controller: OverlayController;
|
|
7
|
+
/**
|
|
8
|
+
* Whether the children are the overlay's content. Content also registers the
|
|
9
|
+
* controller as the _nearest_ overlay, which is what `closeOverlay` without a
|
|
10
|
+
* name resolves to. Set `false` where the subtree is not inside the overlay –
|
|
11
|
+
* `OverlayTrigger` wraps the trigger too.
|
|
12
|
+
*
|
|
13
|
+
* @default true
|
|
14
|
+
*/
|
|
15
|
+
isOverlayContent?: boolean;
|
|
7
16
|
}
|
|
8
17
|
export declare const OverlayContextProvider: FC<Props>;
|
|
9
18
|
export default OverlayContextProvider;
|
|
@@ -5,13 +5,23 @@ export type OverlayCloseHandler = () => unknown;
|
|
|
5
5
|
export type OverlayOpenStateHandler = (isOpen: boolean) => unknown;
|
|
6
6
|
type DisposerFn = () => void;
|
|
7
7
|
export interface CloseOverlayOptions {
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* The overlay to close. Omitted, the nearest enclosing overlay is closed –
|
|
10
|
+
* the same thing `closeOverlay={true}` means.
|
|
11
|
+
*/
|
|
12
|
+
overlay?: FlowComponentName | OverlayController;
|
|
9
13
|
bypassConfirmation?: boolean;
|
|
10
14
|
}
|
|
11
15
|
export interface OnOverlayClosedOptions {
|
|
12
16
|
dependencies?: DependencyList;
|
|
13
17
|
}
|
|
14
18
|
export type CloseModalOptions = Omit<CloseOverlayOptions, "overlay">;
|
|
19
|
+
/**
|
|
20
|
+
* Every way an action can point at an overlay: by the Flow component name it
|
|
21
|
+
* registers under, by controller, by options, or with `true` – the nearest
|
|
22
|
+
* enclosing overlay, whatever its name.
|
|
23
|
+
*/
|
|
24
|
+
export type OverlayReference = FlowComponentName | OverlayController | CloseOverlayOptions | true;
|
|
15
25
|
type CloseOptions = CloseOverlayOptions | CloseModalOptions;
|
|
16
26
|
export interface OverlayControllerOptions {
|
|
17
27
|
isDefaultOpen?: boolean;
|
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
import { OverlayController } from './OverlayController';
|
|
2
2
|
import { FlowComponentName } from '../../../components/propTypes';
|
|
3
|
-
export
|
|
4
|
-
|
|
3
|
+
export interface OverlayContext {
|
|
4
|
+
/**
|
|
5
|
+
* The enclosing overlays' controllers, keyed by the Flow component name the
|
|
6
|
+
* providing overlay registers itself under. Innermost wins per name – a
|
|
7
|
+
* `Modal` inside a `Modal` overwrites the `Modal` entry – but the map does
|
|
8
|
+
* not record which of two differently named overlays is the inner one.
|
|
9
|
+
*/
|
|
10
|
+
byType: Partial<Record<FlowComponentName, OverlayController | undefined>>;
|
|
11
|
+
/**
|
|
12
|
+
* The controller of the innermost overlay this subtree is the _content_ of,
|
|
13
|
+
* whatever its component name. `undefined` outside any overlay content.
|
|
14
|
+
*
|
|
15
|
+
* Only providers that wrap overlay content set it. `OverlayTrigger` wraps the
|
|
16
|
+
* trigger as well, so it contributes to `byType` only – an `Action` in the
|
|
17
|
+
* trigger button is not inside the overlay it opens.
|
|
18
|
+
*/
|
|
19
|
+
nearest?: OverlayController;
|
|
20
|
+
}
|
|
21
|
+
export declare const overlayContext: import('react').Context<OverlayContext>;
|
|
5
22
|
export declare const useOverlayContext: () => OverlayContext;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/flow-react-components",
|
|
3
|
-
"version": "1.3.0-next.
|
|
3
|
+
"version": "1.3.0-next.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A React implementation of Flow, mittwald’s design system",
|
|
6
6
|
"homepage": "https://flow.mittwald.de",
|
|
@@ -83,9 +83,9 @@
|
|
|
83
83
|
"@internationalized/string-compiler": "^3.4.1",
|
|
84
84
|
"@lezer/common": "^1.5.2",
|
|
85
85
|
"@lezer/highlight": "^1.2.3",
|
|
86
|
-
"@mittwald/flow-icons": "^1.3.0-next.
|
|
86
|
+
"@mittwald/flow-icons": "^1.3.0-next.3",
|
|
87
87
|
"@mittwald/password-tools-js": "^3.0.0",
|
|
88
|
-
"@mittwald/react-tunnel": "^1.3.0-next.
|
|
88
|
+
"@mittwald/react-tunnel": "^1.3.0-next.3",
|
|
89
89
|
"@mittwald/react-use-promise": "^4.2.2",
|
|
90
90
|
"@react-aria/form": "^3.2.1",
|
|
91
91
|
"@react-aria/i18n": "^3.13.1",
|
|
@@ -138,12 +138,12 @@
|
|
|
138
138
|
"@internationalized/date": "^3.12.3",
|
|
139
139
|
"@lezer/generator": "^1.8.0",
|
|
140
140
|
"@lezer/lr": "^1.4.10",
|
|
141
|
-
"@mittwald/flow-core": "1.3.0-next.
|
|
142
|
-
"@mittwald/flow-design-tokens": "1.3.0-next.
|
|
143
|
-
"@mittwald/flow-icons-base": "1.3.0-next.
|
|
141
|
+
"@mittwald/flow-core": "1.3.0-next.3",
|
|
142
|
+
"@mittwald/flow-design-tokens": "1.3.0-next.3",
|
|
143
|
+
"@mittwald/flow-icons-base": "1.3.0-next.3",
|
|
144
144
|
"@mittwald/react-use-promise": "^4.2.2",
|
|
145
145
|
"@mittwald/remote-dom-react": "1.2.2-mittwald.10",
|
|
146
|
-
"@mittwald/typescript-config": "1.3.0-next.
|
|
146
|
+
"@mittwald/typescript-config": "1.3.0-next.3",
|
|
147
147
|
"@nx/storybook": "^22.7.6",
|
|
148
148
|
"@storybook/addon-a11y": "^10.5.10",
|
|
149
149
|
"@storybook/addon-actions": "^9.0.8",
|
|
@@ -195,7 +195,7 @@
|
|
|
195
195
|
},
|
|
196
196
|
"peerDependencies": {
|
|
197
197
|
"@internationalized/date": "^3.12.2",
|
|
198
|
-
"@mittwald/flow-icons-pro": "1.3.0-next.
|
|
198
|
+
"@mittwald/flow-icons-pro": "1.3.0-next.3",
|
|
199
199
|
"@mittwald/react-use-promise": "^4.2.2",
|
|
200
200
|
"next": "^16.2.3",
|
|
201
201
|
"react": "^19.2.0",
|
|
@@ -219,5 +219,5 @@
|
|
|
219
219
|
"browserslist": [
|
|
220
220
|
"baseline widely available"
|
|
221
221
|
],
|
|
222
|
-
"gitHead": "
|
|
222
|
+
"gitHead": "6afc49e243f752620463555a0f7e34d58ac80def"
|
|
223
223
|
}
|