@mittwald/flow-react-components 1.2.0-next.48 → 1.2.0-next.49

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.
Files changed (26) hide show
  1. package/AGENTS.md +18 -0
  2. package/dist/assets/component-index.json +1 -1
  3. package/dist/assets/doc-properties.json +1 -1
  4. package/dist/js/default.mjs +2 -1
  5. package/dist/js/internal.mjs +2 -1
  6. package/dist/js/packages/components/src/components/Label/Label.mjs +21 -23
  7. package/dist/js/packages/components/src/components/Label/Label.mjs.map +1 -1
  8. package/dist/js/packages/components/src/components/List/components/ListItemView/ListItemView.mjs +9 -12
  9. package/dist/js/packages/components/src/components/List/components/ListItemView/ListItemView.mjs.map +1 -1
  10. package/dist/js/packages/components/src/components/MarkdownEditor/MarkdownEditor.mjs +2 -12
  11. package/dist/js/packages/components/src/components/MarkdownEditor/MarkdownEditor.mjs.map +1 -1
  12. package/dist/js/packages/components/src/components/OverlayTrigger/OverlayTrigger.mjs +9 -5
  13. package/dist/js/packages/components/src/components/OverlayTrigger/OverlayTrigger.mjs.map +1 -1
  14. package/dist/js/packages/components/src/components/OverlayTrigger/components/DialogTrigger/DialogTrigger.mjs +17 -4
  15. package/dist/js/packages/components/src/components/OverlayTrigger/components/DialogTrigger/DialogTrigger.mjs.map +1 -1
  16. package/dist/js/packages/components/src/components/Section/components/SectionHeader/SectionHeader.mjs +38 -70
  17. package/dist/js/packages/components/src/components/Section/components/SectionHeader/SectionHeader.mjs.map +1 -1
  18. package/dist/js/packages/components/src/components/propTypes/index.mjs +1 -0
  19. package/dist/js/packages/components/src/components/propTypes/index.mjs.map +1 -1
  20. package/dist/js/packages/components/src/lib/propsContext/overlayTriggerTunnel.mjs +34 -0
  21. package/dist/js/packages/components/src/lib/propsContext/overlayTriggerTunnel.mjs.map +1 -0
  22. package/dist/types/components/OverlayTrigger/components/DialogTrigger/DialogTrigger.d.ts +6 -2
  23. package/dist/types/components/propTypes/index.d.ts +2 -1
  24. package/dist/types/lib/propsContext/index.d.ts +1 -0
  25. package/dist/types/lib/propsContext/overlayTriggerTunnel.d.ts +24 -0
  26. package/package.json +9 -9
@@ -0,0 +1,34 @@
1
+ "use client"
2
+ /* */
3
+ //#region src/lib/propsContext/overlayTriggerTunnel.ts
4
+ /**
5
+ * Props context entries that send every overlay trigger into `tunnel`.
6
+ *
7
+ * A props context that tunnels `Button` has to tunnel the overlay triggers as a
8
+ * whole, not their buttons: `OverlayTrigger` pins its trigger button in place
9
+ * (`tunnel: null`), because react-aria wires the press handling, the trigger
10
+ * ref and `aria-haspopup`/`aria-expanded`/`aria-controls` through a
11
+ * `PressResponder` that only reaches its own subtree. Tunnelling the button
12
+ * alone lifts it out of that subtree and silently drops all of it.
13
+ *
14
+ * `DialogTrigger` is in the list because it is the host-side identity of the
15
+ * triggers that are not `@flr-generate` — `ModalTrigger`, `PopoverTrigger` and
16
+ * `LightBoxTrigger` all render through its view, so a remote tree only ever
17
+ * reaches the host as a `DialogTrigger`. `OverlayTrigger` pins it with `tunnel:
18
+ * null` in turn, so the local tree tunnels the trigger the author wrote and
19
+ * never the `DialogTrigger` inside it.
20
+ *
21
+ * Spread the entries before the context's own, so a single trigger can still be
22
+ * sent somewhere else (see `Label`).
23
+ */
24
+ var overlayTriggersTunneledTo = (tunnel) => ({
25
+ ContextMenuTrigger: { tunnel },
26
+ ContextualHelpTrigger: { tunnel },
27
+ DialogTrigger: { tunnel },
28
+ ModalTrigger: { tunnel },
29
+ PopoverTrigger: { tunnel }
30
+ });
31
+ //#endregion
32
+ export { overlayTriggersTunneledTo as default, overlayTriggersTunneledTo };
33
+
34
+ //# sourceMappingURL=overlayTriggerTunnel.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"overlayTriggerTunnel.mjs","names":[],"sources":["../../../../../../../src/lib/propsContext/overlayTriggerTunnel.ts"],"sourcesContent":["import type { PropsContext } from \"@/lib/propsContext/types\";\nimport type { PropsWithTunnel } from \"@/lib/types/props\";\n\n/**\n * Props context entries that send every overlay trigger into `tunnel`.\n *\n * A props context that tunnels `Button` has to tunnel the overlay triggers as a\n * whole, not their buttons: `OverlayTrigger` pins its trigger button in place\n * (`tunnel: null`), because react-aria wires the press handling, the trigger\n * ref and `aria-haspopup`/`aria-expanded`/`aria-controls` through a\n * `PressResponder` that only reaches its own subtree. Tunnelling the button\n * alone lifts it out of that subtree and silently drops all of it.\n *\n * `DialogTrigger` is in the list because it is the host-side identity of the\n * triggers that are not `@flr-generate` — `ModalTrigger`, `PopoverTrigger` and\n * `LightBoxTrigger` all render through its view, so a remote tree only ever\n * reaches the host as a `DialogTrigger`. `OverlayTrigger` pins it with `tunnel:\n * null` in turn, so the local tree tunnels the trigger the author wrote and\n * never the `DialogTrigger` inside it.\n *\n * Spread the entries before the context's own, so a single trigger can still be\n * sent somewhere else (see `Label`).\n */\nexport const overlayTriggersTunneledTo = (\n tunnel: PropsWithTunnel[\"tunnel\"],\n): PropsContext => ({\n ContextMenuTrigger: { tunnel },\n ContextualHelpTrigger: { tunnel },\n DialogTrigger: { tunnel },\n ModalTrigger: { tunnel },\n PopoverTrigger: { tunnel },\n});\n\nexport default overlayTriggersTunneledTo;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAuBA,IAAa,6BACX,YACkB;CAClB,oBAAoB,EAAE,OAAO;CAC7B,uBAAuB,EAAE,OAAO;CAChC,eAAe,EAAE,OAAO;CACxB,cAAc,EAAE,OAAO;CACvB,gBAAgB,EAAE,OAAO;AAC3B"}
@@ -1,6 +1,10 @@
1
1
  import { ComponentProps, FC } from 'react';
2
+ import { FlowComponentProps } from '../../../../lib/componentFactory/flowComponent';
2
3
  import * as Aria from "react-aria-components";
3
- export type DialogTriggerProps = ComponentProps<typeof Aria.DialogTrigger>;
4
- /** @flr-generate all */
4
+ export type DialogTriggerProps = ComponentProps<typeof Aria.DialogTrigger> & FlowComponentProps;
5
+ /**
6
+ * @flr-generate all
7
+ * @flr-provider
8
+ */
5
9
  export declare const DialogTrigger: FC<DialogTriggerProps>;
6
10
  export default DialogTrigger;
@@ -61,7 +61,7 @@ import { MessageThreadProps } from '../MessageThread';
61
61
  import { FileCardListProps } from '../FileCardList';
62
62
  import { AccentBoxProps } from '../AccentBox';
63
63
  import { ColumnLayoutProps } from '../ColumnLayout';
64
- import { MenuTriggerProps } from '../OverlayTrigger';
64
+ import { DialogTriggerProps, MenuTriggerProps } from '../OverlayTrigger';
65
65
  import { ProgressBarProps } from '../ProgressBar';
66
66
  import { FileDropZoneProps } from '../FileDropZone';
67
67
  import { NavigationProps } from '../Navigation';
@@ -113,6 +113,7 @@ export interface FlowComponentPropsTypes {
113
113
  CountryOptions: CountryOptionsProps;
114
114
  DatePicker: DatePickerProps<Aria.DateValue>;
115
115
  DateRangePicker: DateRangePickerProps<Aria.DateValue>;
116
+ DialogTrigger: DialogTriggerProps;
116
117
  FieldDescription: FieldDescriptionProps;
117
118
  FieldError: FieldErrorProps;
118
119
  FileCard: FileCardProps;
@@ -2,3 +2,4 @@ export { dynamic } from './dynamicProps/dynamic';
2
2
  export { propsContext } from './propsContext';
3
3
  export { PropsContextProvider } from './components/PropsContextProvider';
4
4
  export type { PropsContext } from './types';
5
+ export { overlayTriggersTunneledTo } from './overlayTriggerTunnel';
@@ -0,0 +1,24 @@
1
+ import { PropsContext } from './types';
2
+ import { PropsWithTunnel } from '../types/props';
3
+ /**
4
+ * Props context entries that send every overlay trigger into `tunnel`.
5
+ *
6
+ * A props context that tunnels `Button` has to tunnel the overlay triggers as a
7
+ * whole, not their buttons: `OverlayTrigger` pins its trigger button in place
8
+ * (`tunnel: null`), because react-aria wires the press handling, the trigger
9
+ * ref and `aria-haspopup`/`aria-expanded`/`aria-controls` through a
10
+ * `PressResponder` that only reaches its own subtree. Tunnelling the button
11
+ * alone lifts it out of that subtree and silently drops all of it.
12
+ *
13
+ * `DialogTrigger` is in the list because it is the host-side identity of the
14
+ * triggers that are not `@flr-generate` — `ModalTrigger`, `PopoverTrigger` and
15
+ * `LightBoxTrigger` all render through its view, so a remote tree only ever
16
+ * reaches the host as a `DialogTrigger`. `OverlayTrigger` pins it with `tunnel:
17
+ * null` in turn, so the local tree tunnels the trigger the author wrote and
18
+ * never the `DialogTrigger` inside it.
19
+ *
20
+ * Spread the entries before the context's own, so a single trigger can still be
21
+ * sent somewhere else (see `Label`).
22
+ */
23
+ export declare const overlayTriggersTunneledTo: (tunnel: PropsWithTunnel["tunnel"]) => PropsContext;
24
+ export default overlayTriggersTunneledTo;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/flow-react-components",
3
- "version": "1.2.0-next.48",
3
+ "version": "1.2.0-next.49",
4
4
  "type": "module",
5
5
  "description": "A React implementation of Flow, mittwald’s design system",
6
6
  "homepage": "https://flow.mittwald.de",
@@ -79,9 +79,9 @@
79
79
  "@internationalized/string-compiler": "^3.4.1",
80
80
  "@lezer/common": "^1.5.2",
81
81
  "@lezer/highlight": "^1.2.3",
82
- "@mittwald/flow-icons": "1.2.0-next.48",
82
+ "@mittwald/flow-icons": "1.2.0-next.49",
83
83
  "@mittwald/password-tools-js": "^3.0.0",
84
- "@mittwald/react-tunnel": "1.2.0-next.48",
84
+ "@mittwald/react-tunnel": "1.2.0-next.49",
85
85
  "@mittwald/react-use-promise": "^4.2.2",
86
86
  "@react-aria/form": "^3.2.1",
87
87
  "@react-aria/i18n": "^3.13.1",
@@ -134,12 +134,12 @@
134
134
  "@internationalized/date": "^3.12.3",
135
135
  "@lezer/generator": "^1.8.0",
136
136
  "@lezer/lr": "^1.4.10",
137
- "@mittwald/flow-core": "1.2.0-next.48",
138
- "@mittwald/flow-design-tokens": "1.2.0-next.48",
139
- "@mittwald/flow-icons-base": "1.2.0-next.48",
137
+ "@mittwald/flow-core": "1.2.0-next.49",
138
+ "@mittwald/flow-design-tokens": "1.2.0-next.49",
139
+ "@mittwald/flow-icons-base": "1.2.0-next.49",
140
140
  "@mittwald/react-use-promise": "^4.2.2",
141
141
  "@mittwald/remote-dom-react": "1.2.2-mittwald.10",
142
- "@mittwald/typescript-config": "1.2.0-next.48",
142
+ "@mittwald/typescript-config": "1.2.0-next.49",
143
143
  "@nx/storybook": "^22.7.6",
144
144
  "@storybook/addon-a11y": "^10.5.10",
145
145
  "@storybook/addon-actions": "^9.0.8",
@@ -191,7 +191,7 @@
191
191
  },
192
192
  "peerDependencies": {
193
193
  "@internationalized/date": "^3.12.2",
194
- "@mittwald/flow-icons-pro": "1.2.0-next.48",
194
+ "@mittwald/flow-icons-pro": "1.2.0-next.49",
195
195
  "@mittwald/react-use-promise": "^4.2.2",
196
196
  "next": "^16.2.3",
197
197
  "react": "^19.2.0",
@@ -215,5 +215,5 @@
215
215
  "browserslist": [
216
216
  "baseline widely available"
217
217
  ],
218
- "gitHead": "99bd487e303f62e77a13db5f88df32592077e536"
218
+ "gitHead": "1a48b08178b38e311205f4656fe553e6746d45f0"
219
219
  }