@mittwald/flow-react-components 0.2.0-alpha.713 → 0.2.0-alpha.714

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 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.714](https://github.com/mittwald/flow/compare/0.2.0-alpha.713...0.2.0-alpha.714) (2026-03-11)
7
+
8
+ ### Features
9
+
10
+ * **FormSettingsProvider:** export types and support context ([6071d65](https://github.com/mittwald/flow/commit/6071d65bbab7c90668be48b2262c98f90d6fb97d))
11
+
6
12
  # [0.2.0-alpha.713](https://github.com/mittwald/flow/compare/0.2.0-alpha.712...0.2.0-alpha.713) (2026-03-11)
7
13
 
8
14
  ### Features
@@ -56038,6 +56038,220 @@
56038
56038
  }
56039
56039
  }
56040
56040
  },
56041
+ {
56042
+ "tags": {},
56043
+ "filePath": "/home/runner/work/flow/flow/packages/components/src/components/Overlay/Overlay.tsx",
56044
+ "description": "",
56045
+ "displayName": "Overlay",
56046
+ "methods": [],
56047
+ "props": {
56048
+ "ref": {
56049
+ "defaultValue": null,
56050
+ "description": "",
56051
+ "name": "ref",
56052
+ "parent": {
56053
+ "fileName": "components/src/components/Overlay/Overlay.tsx",
56054
+ "name": "OverlayProps"
56055
+ },
56056
+ "declarations": [
56057
+ {
56058
+ "fileName": "components/src/components/Overlay/Overlay.tsx",
56059
+ "name": "OverlayProps"
56060
+ }
56061
+ ],
56062
+ "required": false,
56063
+ "type": {
56064
+ "name": "Ref<HTMLDivElement>"
56065
+ }
56066
+ },
56067
+ "controller": {
56068
+ "defaultValue": null,
56069
+ "description": "The controller to control the overlay state.",
56070
+ "name": "controller",
56071
+ "parent": {
56072
+ "fileName": "components/src/components/Overlay/Overlay.tsx",
56073
+ "name": "OverlayProps"
56074
+ },
56075
+ "declarations": [
56076
+ {
56077
+ "fileName": "components/src/components/Overlay/Overlay.tsx",
56078
+ "name": "OverlayProps"
56079
+ }
56080
+ ],
56081
+ "required": false,
56082
+ "type": {
56083
+ "name": "OverlayController"
56084
+ }
56085
+ },
56086
+ "isDismissable": {
56087
+ "defaultValue": null,
56088
+ "description": "Whether the overlay can be closed by clicking outside of it.",
56089
+ "name": "isDismissable",
56090
+ "parent": {
56091
+ "fileName": "components/src/components/Overlay/Overlay.tsx",
56092
+ "name": "OverlayProps"
56093
+ },
56094
+ "declarations": [
56095
+ {
56096
+ "fileName": "components/src/components/Overlay/Overlay.tsx",
56097
+ "name": "OverlayProps"
56098
+ }
56099
+ ],
56100
+ "required": false,
56101
+ "type": {
56102
+ "name": "boolean"
56103
+ }
56104
+ },
56105
+ "overlayType": {
56106
+ "defaultValue": null,
56107
+ "description": "Whether the overlay is a modal or a light box.",
56108
+ "name": "overlayType",
56109
+ "parent": {
56110
+ "fileName": "components/src/components/Overlay/Overlay.tsx",
56111
+ "name": "OverlayProps"
56112
+ },
56113
+ "declarations": [
56114
+ {
56115
+ "fileName": "components/src/components/Overlay/Overlay.tsx",
56116
+ "name": "OverlayProps"
56117
+ }
56118
+ ],
56119
+ "required": false,
56120
+ "type": {
56121
+ "name": "\"LightBox\" | \"Modal\""
56122
+ }
56123
+ },
56124
+ "isOpen": {
56125
+ "defaultValue": null,
56126
+ "description": "",
56127
+ "name": "isOpen",
56128
+ "parent": {
56129
+ "fileName": "components/src/components/Overlay/Overlay.tsx",
56130
+ "name": "OverlayProps"
56131
+ },
56132
+ "declarations": [
56133
+ {
56134
+ "fileName": "components/src/components/Overlay/Overlay.tsx",
56135
+ "name": "OverlayProps"
56136
+ }
56137
+ ],
56138
+ "required": false,
56139
+ "type": {
56140
+ "name": "boolean"
56141
+ }
56142
+ },
56143
+ "isDefaultOpen": {
56144
+ "defaultValue": null,
56145
+ "description": "",
56146
+ "name": "isDefaultOpen",
56147
+ "parent": {
56148
+ "fileName": "components/src/components/Overlay/Overlay.tsx",
56149
+ "name": "OverlayProps"
56150
+ },
56151
+ "declarations": [
56152
+ {
56153
+ "fileName": "components/src/components/Overlay/Overlay.tsx",
56154
+ "name": "OverlayProps"
56155
+ }
56156
+ ],
56157
+ "required": false,
56158
+ "type": {
56159
+ "name": "boolean"
56160
+ }
56161
+ },
56162
+ "onOpen": {
56163
+ "defaultValue": null,
56164
+ "description": "",
56165
+ "name": "onOpen",
56166
+ "parent": {
56167
+ "fileName": "components/src/components/Overlay/Overlay.tsx",
56168
+ "name": "OverlayProps"
56169
+ },
56170
+ "declarations": [
56171
+ {
56172
+ "fileName": "components/src/components/Overlay/Overlay.tsx",
56173
+ "name": "OverlayProps"
56174
+ }
56175
+ ],
56176
+ "required": false,
56177
+ "type": {
56178
+ "name": "OverlayOpenHandler"
56179
+ }
56180
+ },
56181
+ "onClose": {
56182
+ "defaultValue": null,
56183
+ "description": "",
56184
+ "name": "onClose",
56185
+ "parent": {
56186
+ "fileName": "components/src/components/Overlay/Overlay.tsx",
56187
+ "name": "OverlayProps"
56188
+ },
56189
+ "declarations": [
56190
+ {
56191
+ "fileName": "components/src/components/Overlay/Overlay.tsx",
56192
+ "name": "OverlayProps"
56193
+ }
56194
+ ],
56195
+ "required": false,
56196
+ "type": {
56197
+ "name": "OverlayCloseHandler"
56198
+ }
56199
+ },
56200
+ "onOpenChange": {
56201
+ "defaultValue": null,
56202
+ "description": "",
56203
+ "name": "onOpenChange",
56204
+ "parent": {
56205
+ "fileName": "components/src/components/Overlay/Overlay.tsx",
56206
+ "name": "OverlayProps"
56207
+ },
56208
+ "declarations": [
56209
+ {
56210
+ "fileName": "components/src/components/Overlay/Overlay.tsx",
56211
+ "name": "OverlayProps"
56212
+ }
56213
+ ],
56214
+ "required": false,
56215
+ "type": {
56216
+ "name": "OverlayOpenStateHandler"
56217
+ }
56218
+ },
56219
+ "children": {
56220
+ "defaultValue": null,
56221
+ "description": "",
56222
+ "name": "children",
56223
+ "declarations": [
56224
+ {
56225
+ "fileName": "flow/node_modules/.pnpm/@types+react@19.2.10/node_modules/@types/react/index.d.ts",
56226
+ "name": "TypeLiteral"
56227
+ }
56228
+ ],
56229
+ "required": false,
56230
+ "type": {
56231
+ "name": "ReactNode"
56232
+ }
56233
+ },
56234
+ "className": {
56235
+ "defaultValue": null,
56236
+ "description": "The elements class name.",
56237
+ "name": "className",
56238
+ "parent": {
56239
+ "fileName": "components/src/lib/types/props.ts",
56240
+ "name": "PropsWithClassName"
56241
+ },
56242
+ "declarations": [
56243
+ {
56244
+ "fileName": "components/src/lib/types/props.ts",
56245
+ "name": "PropsWithClassName"
56246
+ }
56247
+ ],
56248
+ "required": false,
56249
+ "type": {
56250
+ "name": "string"
56251
+ }
56252
+ }
56253
+ }
56254
+ },
56041
56255
  {
56042
56256
  "tags": {},
56043
56257
  "filePath": "/home/runner/work/flow/flow/packages/components/src/components/Options/Options.tsx",
@@ -58138,220 +58352,6 @@
58138
58352
  }
58139
58353
  }
58140
58354
  },
58141
- {
58142
- "tags": {},
58143
- "filePath": "/home/runner/work/flow/flow/packages/components/src/components/Overlay/Overlay.tsx",
58144
- "description": "",
58145
- "displayName": "Overlay",
58146
- "methods": [],
58147
- "props": {
58148
- "ref": {
58149
- "defaultValue": null,
58150
- "description": "",
58151
- "name": "ref",
58152
- "parent": {
58153
- "fileName": "components/src/components/Overlay/Overlay.tsx",
58154
- "name": "OverlayProps"
58155
- },
58156
- "declarations": [
58157
- {
58158
- "fileName": "components/src/components/Overlay/Overlay.tsx",
58159
- "name": "OverlayProps"
58160
- }
58161
- ],
58162
- "required": false,
58163
- "type": {
58164
- "name": "Ref<HTMLDivElement>"
58165
- }
58166
- },
58167
- "controller": {
58168
- "defaultValue": null,
58169
- "description": "The controller to control the overlay state.",
58170
- "name": "controller",
58171
- "parent": {
58172
- "fileName": "components/src/components/Overlay/Overlay.tsx",
58173
- "name": "OverlayProps"
58174
- },
58175
- "declarations": [
58176
- {
58177
- "fileName": "components/src/components/Overlay/Overlay.tsx",
58178
- "name": "OverlayProps"
58179
- }
58180
- ],
58181
- "required": false,
58182
- "type": {
58183
- "name": "OverlayController"
58184
- }
58185
- },
58186
- "isDismissable": {
58187
- "defaultValue": null,
58188
- "description": "Whether the overlay can be closed by clicking outside of it.",
58189
- "name": "isDismissable",
58190
- "parent": {
58191
- "fileName": "components/src/components/Overlay/Overlay.tsx",
58192
- "name": "OverlayProps"
58193
- },
58194
- "declarations": [
58195
- {
58196
- "fileName": "components/src/components/Overlay/Overlay.tsx",
58197
- "name": "OverlayProps"
58198
- }
58199
- ],
58200
- "required": false,
58201
- "type": {
58202
- "name": "boolean"
58203
- }
58204
- },
58205
- "overlayType": {
58206
- "defaultValue": null,
58207
- "description": "Whether the overlay is a modal or a light box.",
58208
- "name": "overlayType",
58209
- "parent": {
58210
- "fileName": "components/src/components/Overlay/Overlay.tsx",
58211
- "name": "OverlayProps"
58212
- },
58213
- "declarations": [
58214
- {
58215
- "fileName": "components/src/components/Overlay/Overlay.tsx",
58216
- "name": "OverlayProps"
58217
- }
58218
- ],
58219
- "required": false,
58220
- "type": {
58221
- "name": "\"LightBox\" | \"Modal\""
58222
- }
58223
- },
58224
- "isOpen": {
58225
- "defaultValue": null,
58226
- "description": "",
58227
- "name": "isOpen",
58228
- "parent": {
58229
- "fileName": "components/src/components/Overlay/Overlay.tsx",
58230
- "name": "OverlayProps"
58231
- },
58232
- "declarations": [
58233
- {
58234
- "fileName": "components/src/components/Overlay/Overlay.tsx",
58235
- "name": "OverlayProps"
58236
- }
58237
- ],
58238
- "required": false,
58239
- "type": {
58240
- "name": "boolean"
58241
- }
58242
- },
58243
- "isDefaultOpen": {
58244
- "defaultValue": null,
58245
- "description": "",
58246
- "name": "isDefaultOpen",
58247
- "parent": {
58248
- "fileName": "components/src/components/Overlay/Overlay.tsx",
58249
- "name": "OverlayProps"
58250
- },
58251
- "declarations": [
58252
- {
58253
- "fileName": "components/src/components/Overlay/Overlay.tsx",
58254
- "name": "OverlayProps"
58255
- }
58256
- ],
58257
- "required": false,
58258
- "type": {
58259
- "name": "boolean"
58260
- }
58261
- },
58262
- "onOpen": {
58263
- "defaultValue": null,
58264
- "description": "",
58265
- "name": "onOpen",
58266
- "parent": {
58267
- "fileName": "components/src/components/Overlay/Overlay.tsx",
58268
- "name": "OverlayProps"
58269
- },
58270
- "declarations": [
58271
- {
58272
- "fileName": "components/src/components/Overlay/Overlay.tsx",
58273
- "name": "OverlayProps"
58274
- }
58275
- ],
58276
- "required": false,
58277
- "type": {
58278
- "name": "OverlayOpenHandler"
58279
- }
58280
- },
58281
- "onClose": {
58282
- "defaultValue": null,
58283
- "description": "",
58284
- "name": "onClose",
58285
- "parent": {
58286
- "fileName": "components/src/components/Overlay/Overlay.tsx",
58287
- "name": "OverlayProps"
58288
- },
58289
- "declarations": [
58290
- {
58291
- "fileName": "components/src/components/Overlay/Overlay.tsx",
58292
- "name": "OverlayProps"
58293
- }
58294
- ],
58295
- "required": false,
58296
- "type": {
58297
- "name": "OverlayCloseHandler"
58298
- }
58299
- },
58300
- "onOpenChange": {
58301
- "defaultValue": null,
58302
- "description": "",
58303
- "name": "onOpenChange",
58304
- "parent": {
58305
- "fileName": "components/src/components/Overlay/Overlay.tsx",
58306
- "name": "OverlayProps"
58307
- },
58308
- "declarations": [
58309
- {
58310
- "fileName": "components/src/components/Overlay/Overlay.tsx",
58311
- "name": "OverlayProps"
58312
- }
58313
- ],
58314
- "required": false,
58315
- "type": {
58316
- "name": "OverlayOpenStateHandler"
58317
- }
58318
- },
58319
- "children": {
58320
- "defaultValue": null,
58321
- "description": "",
58322
- "name": "children",
58323
- "declarations": [
58324
- {
58325
- "fileName": "flow/node_modules/.pnpm/@types+react@19.2.10/node_modules/@types/react/index.d.ts",
58326
- "name": "TypeLiteral"
58327
- }
58328
- ],
58329
- "required": false,
58330
- "type": {
58331
- "name": "ReactNode"
58332
- }
58333
- },
58334
- "className": {
58335
- "defaultValue": null,
58336
- "description": "The elements class name.",
58337
- "name": "className",
58338
- "parent": {
58339
- "fileName": "components/src/lib/types/props.ts",
58340
- "name": "PropsWithClassName"
58341
- },
58342
- "declarations": [
58343
- {
58344
- "fileName": "components/src/lib/types/props.ts",
58345
- "name": "PropsWithClassName"
58346
- }
58347
- ],
58348
- "required": false,
58349
- "type": {
58350
- "name": "string"
58351
- }
58352
- }
58353
- }
58354
- },
58355
58355
  {
58356
58356
  "tags": {
58357
58357
  "flr-generate": "all"
@@ -301359,144 +301359,6 @@
301359
301359
  }
301360
301360
  }
301361
301361
  },
301362
- {
301363
- "tags": {},
301364
- "filePath": "/home/runner/work/flow/flow/packages/components/src/components/Popover/components/PopoverTrigger/PopoverTrigger.tsx",
301365
- "description": "",
301366
- "displayName": "PopoverTrigger",
301367
- "methods": [],
301368
- "props": {
301369
- "isDefaultOpen": {
301370
- "defaultValue": null,
301371
- "description": "Whether the overlay should be open initially.",
301372
- "name": "isDefaultOpen",
301373
- "parent": {
301374
- "fileName": "components/src/components/OverlayTrigger/OverlayTrigger.tsx",
301375
- "name": "OverlayTriggerProps"
301376
- },
301377
- "declarations": [
301378
- {
301379
- "fileName": "components/src/components/OverlayTrigger/OverlayTrigger.tsx",
301380
- "name": "OverlayTriggerProps"
301381
- }
301382
- ],
301383
- "required": false,
301384
- "type": {
301385
- "name": "boolean"
301386
- }
301387
- },
301388
- "controller": {
301389
- "defaultValue": null,
301390
- "description": "A controller to control the state of the overlay.",
301391
- "name": "controller",
301392
- "parent": {
301393
- "fileName": "components/src/components/OverlayTrigger/OverlayTrigger.tsx",
301394
- "name": "OverlayTriggerProps"
301395
- },
301396
- "declarations": [
301397
- {
301398
- "fileName": "components/src/components/OverlayTrigger/OverlayTrigger.tsx",
301399
- "name": "OverlayTriggerProps"
301400
- }
301401
- ],
301402
- "required": false,
301403
- "type": {
301404
- "name": "OverlayController"
301405
- }
301406
- },
301407
- "wrapWith": {
301408
- "defaultValue": null,
301409
- "description": "",
301410
- "name": "wrapWith",
301411
- "parent": {
301412
- "fileName": "components/src/lib/componentFactory/flowComponent.tsx",
301413
- "name": "FlowComponentProps"
301414
- },
301415
- "declarations": [
301416
- {
301417
- "fileName": "components/src/lib/componentFactory/flowComponent.tsx",
301418
- "name": "FlowComponentProps"
301419
- }
301420
- ],
301421
- "required": false,
301422
- "type": {
301423
- "name": "ReactElement<unknown, string | JSXElementConstructor<any>>"
301424
- }
301425
- },
301426
- "tunnelId": {
301427
- "defaultValue": null,
301428
- "description": "@internal",
301429
- "name": "tunnelId",
301430
- "parent": {
301431
- "fileName": "components/src/lib/types/props.ts",
301432
- "name": "PropsWithTunnel"
301433
- },
301434
- "declarations": [
301435
- {
301436
- "fileName": "components/src/lib/types/props.ts",
301437
- "name": "PropsWithTunnel"
301438
- }
301439
- ],
301440
- "required": false,
301441
- "type": {
301442
- "name": "string | null"
301443
- }
301444
- },
301445
- "ref": {
301446
- "defaultValue": null,
301447
- "description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}",
301448
- "name": "ref",
301449
- "parent": {
301450
- "fileName": "flow/node_modules/.pnpm/@types+react@19.2.10/node_modules/@types/react/index.d.ts",
301451
- "name": "RefAttributes"
301452
- },
301453
- "declarations": [
301454
- {
301455
- "fileName": "flow/node_modules/.pnpm/@types+react@19.2.10/node_modules/@types/react/index.d.ts",
301456
- "name": "RefAttributes"
301457
- }
301458
- ],
301459
- "required": false,
301460
- "type": {
301461
- "name": "Ref<HTMLSpanElement>"
301462
- }
301463
- },
301464
- "key": {
301465
- "defaultValue": null,
301466
- "description": "",
301467
- "name": "key",
301468
- "parent": {
301469
- "fileName": "flow/node_modules/.pnpm/@types+react@19.2.10/node_modules/@types/react/index.d.ts",
301470
- "name": "Attributes"
301471
- },
301472
- "declarations": [
301473
- {
301474
- "fileName": "flow/node_modules/.pnpm/@types+react@19.2.10/node_modules/@types/react/index.d.ts",
301475
- "name": "Attributes"
301476
- }
301477
- ],
301478
- "required": false,
301479
- "type": {
301480
- "name": "Key | null"
301481
- }
301482
- },
301483
- "children": {
301484
- "defaultValue": null,
301485
- "description": "",
301486
- "name": "children",
301487
- "declarations": [
301488
- {
301489
- "fileName": "flow/node_modules/.pnpm/@types+react@19.2.10/node_modules/@types/react/index.d.ts",
301490
- "name": "TypeLiteral"
301491
- }
301492
- ],
301493
- "required": false,
301494
- "type": {
301495
- "name": "ReactNode"
301496
- }
301497
- }
301498
- }
301499
- },
301500
301362
  {
301501
301363
  "tags": {},
301502
301364
  "filePath": "src/components/Popover/components/PopoverTip/PopoverTip.tsx",
@@ -301525,6 +301387,144 @@
301525
301387
  }
301526
301388
  }
301527
301389
  },
301390
+ {
301391
+ "tags": {},
301392
+ "filePath": "/home/runner/work/flow/flow/packages/components/src/components/Popover/components/PopoverTrigger/PopoverTrigger.tsx",
301393
+ "description": "",
301394
+ "displayName": "PopoverTrigger",
301395
+ "methods": [],
301396
+ "props": {
301397
+ "isDefaultOpen": {
301398
+ "defaultValue": null,
301399
+ "description": "Whether the overlay should be open initially.",
301400
+ "name": "isDefaultOpen",
301401
+ "parent": {
301402
+ "fileName": "components/src/components/OverlayTrigger/OverlayTrigger.tsx",
301403
+ "name": "OverlayTriggerProps"
301404
+ },
301405
+ "declarations": [
301406
+ {
301407
+ "fileName": "components/src/components/OverlayTrigger/OverlayTrigger.tsx",
301408
+ "name": "OverlayTriggerProps"
301409
+ }
301410
+ ],
301411
+ "required": false,
301412
+ "type": {
301413
+ "name": "boolean"
301414
+ }
301415
+ },
301416
+ "controller": {
301417
+ "defaultValue": null,
301418
+ "description": "A controller to control the state of the overlay.",
301419
+ "name": "controller",
301420
+ "parent": {
301421
+ "fileName": "components/src/components/OverlayTrigger/OverlayTrigger.tsx",
301422
+ "name": "OverlayTriggerProps"
301423
+ },
301424
+ "declarations": [
301425
+ {
301426
+ "fileName": "components/src/components/OverlayTrigger/OverlayTrigger.tsx",
301427
+ "name": "OverlayTriggerProps"
301428
+ }
301429
+ ],
301430
+ "required": false,
301431
+ "type": {
301432
+ "name": "OverlayController"
301433
+ }
301434
+ },
301435
+ "wrapWith": {
301436
+ "defaultValue": null,
301437
+ "description": "",
301438
+ "name": "wrapWith",
301439
+ "parent": {
301440
+ "fileName": "components/src/lib/componentFactory/flowComponent.tsx",
301441
+ "name": "FlowComponentProps"
301442
+ },
301443
+ "declarations": [
301444
+ {
301445
+ "fileName": "components/src/lib/componentFactory/flowComponent.tsx",
301446
+ "name": "FlowComponentProps"
301447
+ }
301448
+ ],
301449
+ "required": false,
301450
+ "type": {
301451
+ "name": "ReactElement<unknown, string | JSXElementConstructor<any>>"
301452
+ }
301453
+ },
301454
+ "tunnelId": {
301455
+ "defaultValue": null,
301456
+ "description": "@internal",
301457
+ "name": "tunnelId",
301458
+ "parent": {
301459
+ "fileName": "components/src/lib/types/props.ts",
301460
+ "name": "PropsWithTunnel"
301461
+ },
301462
+ "declarations": [
301463
+ {
301464
+ "fileName": "components/src/lib/types/props.ts",
301465
+ "name": "PropsWithTunnel"
301466
+ }
301467
+ ],
301468
+ "required": false,
301469
+ "type": {
301470
+ "name": "string | null"
301471
+ }
301472
+ },
301473
+ "ref": {
301474
+ "defaultValue": null,
301475
+ "description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}",
301476
+ "name": "ref",
301477
+ "parent": {
301478
+ "fileName": "flow/node_modules/.pnpm/@types+react@19.2.10/node_modules/@types/react/index.d.ts",
301479
+ "name": "RefAttributes"
301480
+ },
301481
+ "declarations": [
301482
+ {
301483
+ "fileName": "flow/node_modules/.pnpm/@types+react@19.2.10/node_modules/@types/react/index.d.ts",
301484
+ "name": "RefAttributes"
301485
+ }
301486
+ ],
301487
+ "required": false,
301488
+ "type": {
301489
+ "name": "Ref<HTMLSpanElement>"
301490
+ }
301491
+ },
301492
+ "key": {
301493
+ "defaultValue": null,
301494
+ "description": "",
301495
+ "name": "key",
301496
+ "parent": {
301497
+ "fileName": "flow/node_modules/.pnpm/@types+react@19.2.10/node_modules/@types/react/index.d.ts",
301498
+ "name": "Attributes"
301499
+ },
301500
+ "declarations": [
301501
+ {
301502
+ "fileName": "flow/node_modules/.pnpm/@types+react@19.2.10/node_modules/@types/react/index.d.ts",
301503
+ "name": "Attributes"
301504
+ }
301505
+ ],
301506
+ "required": false,
301507
+ "type": {
301508
+ "name": "Key | null"
301509
+ }
301510
+ },
301511
+ "children": {
301512
+ "defaultValue": null,
301513
+ "description": "",
301514
+ "name": "children",
301515
+ "declarations": [
301516
+ {
301517
+ "fileName": "flow/node_modules/.pnpm/@types+react@19.2.10/node_modules/@types/react/index.d.ts",
301518
+ "name": "TypeLiteral"
301519
+ }
301520
+ ],
301521
+ "required": false,
301522
+ "type": {
301523
+ "name": "ReactNode"
301524
+ }
301525
+ }
301526
+ }
301527
+ },
301528
301528
  {
301529
301529
  "tags": {
301530
301530
  "flr-generate": "all"
@@ -307727,6 +307727,14 @@
307727
307727
  "methods": [],
307728
307728
  "props": {}
307729
307729
  },
307730
+ {
307731
+ "tags": {},
307732
+ "filePath": "/home/runner/work/flow/flow/packages/components/src/components/Modal/components/ConfirmUnsavedChangesModal/ConfirmUnsavedChangesModal.tsx",
307733
+ "description": "",
307734
+ "displayName": "ConfirmUnsavedChangesModal",
307735
+ "methods": [],
307736
+ "props": {}
307737
+ },
307730
307738
  {
307731
307739
  "tags": {},
307732
307740
  "filePath": "/home/runner/work/flow/flow/packages/components/src/components/Modal/components/ModalTrigger/ModalTrigger.tsx",
@@ -307865,14 +307873,6 @@
307865
307873
  }
307866
307874
  }
307867
307875
  },
307868
- {
307869
- "tags": {},
307870
- "filePath": "/home/runner/work/flow/flow/packages/components/src/components/Modal/components/ConfirmUnsavedChangesModal/ConfirmUnsavedChangesModal.tsx",
307871
- "description": "",
307872
- "displayName": "ConfirmUnsavedChangesModal",
307873
- "methods": [],
307874
- "props": {}
307875
- },
307876
307876
  {
307877
307877
  "tags": {
307878
307878
  "flr-generate": "all"
@@ -311297,19 +311297,174 @@
311297
311297
  "name": "Key | null"
311298
311298
  }
311299
311299
  },
311300
- "children": {
311300
+ "children": {
311301
+ "defaultValue": null,
311302
+ "description": "",
311303
+ "name": "children",
311304
+ "declarations": [
311305
+ {
311306
+ "fileName": "flow/node_modules/.pnpm/@types+react@19.2.10/node_modules/@types/react/index.d.ts",
311307
+ "name": "TypeLiteral"
311308
+ }
311309
+ ],
311310
+ "required": false,
311311
+ "type": {
311312
+ "name": "ReactNode"
311313
+ }
311314
+ }
311315
+ }
311316
+ },
311317
+ {
311318
+ "tags": {
311319
+ "flr-generate": "all"
311320
+ },
311321
+ "filePath": "/home/runner/work/flow/flow/packages/components/src/components/ContextMenu/components/ContextMenuSection/ContextMenuSection.tsx",
311322
+ "description": "",
311323
+ "displayName": "ContextMenuSection",
311324
+ "methods": [],
311325
+ "props": {
311326
+ "children": {
311327
+ "defaultValue": null,
311328
+ "description": "",
311329
+ "name": "children",
311330
+ "declarations": [
311331
+ {
311332
+ "fileName": "flow/node_modules/.pnpm/@types+react@19.2.10/node_modules/@types/react/index.d.ts",
311333
+ "name": "TypeLiteral"
311334
+ }
311335
+ ],
311336
+ "required": false,
311337
+ "type": {
311338
+ "name": "ReactNode"
311339
+ }
311340
+ },
311341
+ "wrapWith": {
311342
+ "defaultValue": null,
311343
+ "description": "",
311344
+ "name": "wrapWith",
311345
+ "parent": {
311346
+ "fileName": "components/src/lib/componentFactory/flowComponent.tsx",
311347
+ "name": "FlowComponentProps"
311348
+ },
311349
+ "declarations": [
311350
+ {
311351
+ "fileName": "components/src/lib/componentFactory/flowComponent.tsx",
311352
+ "name": "FlowComponentProps"
311353
+ }
311354
+ ],
311355
+ "required": false,
311356
+ "type": {
311357
+ "name": "ReactElement<unknown, string | JSXElementConstructor<any>>"
311358
+ }
311359
+ },
311360
+ "tunnelId": {
311361
+ "defaultValue": null,
311362
+ "description": "@internal",
311363
+ "name": "tunnelId",
311364
+ "parent": {
311365
+ "fileName": "components/src/lib/types/props.ts",
311366
+ "name": "PropsWithTunnel"
311367
+ },
311368
+ "declarations": [
311369
+ {
311370
+ "fileName": "components/src/lib/types/props.ts",
311371
+ "name": "PropsWithTunnel"
311372
+ }
311373
+ ],
311374
+ "required": false,
311375
+ "type": {
311376
+ "name": "string | null"
311377
+ }
311378
+ },
311379
+ "ref": {
311380
+ "defaultValue": null,
311381
+ "description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}",
311382
+ "name": "ref",
311383
+ "parent": {
311384
+ "fileName": "flow/node_modules/.pnpm/@types+react@19.2.10/node_modules/@types/react/index.d.ts",
311385
+ "name": "RefAttributes"
311386
+ },
311387
+ "declarations": [
311388
+ {
311389
+ "fileName": "flow/node_modules/.pnpm/@types+react@19.2.10/node_modules/@types/react/index.d.ts",
311390
+ "name": "RefAttributes"
311391
+ }
311392
+ ],
311393
+ "required": false,
311394
+ "type": {
311395
+ "name": "Ref<HTMLSpanElement>"
311396
+ }
311397
+ },
311398
+ "key": {
311399
+ "defaultValue": null,
311400
+ "description": "",
311401
+ "name": "key",
311402
+ "parent": {
311403
+ "fileName": "flow/node_modules/.pnpm/@types+react@19.2.10/node_modules/@types/react/index.d.ts",
311404
+ "name": "Attributes"
311405
+ },
311406
+ "declarations": [
311407
+ {
311408
+ "fileName": "flow/node_modules/.pnpm/@types+react@19.2.10/node_modules/@types/react/index.d.ts",
311409
+ "name": "Attributes"
311410
+ }
311411
+ ],
311412
+ "required": false,
311413
+ "type": {
311414
+ "name": "Key | null"
311415
+ }
311416
+ },
311417
+ "selectedKeys": {
311418
+ "defaultValue": null,
311419
+ "description": "The currently selected keys in the collection (controlled).",
311420
+ "name": "selectedKeys",
311421
+ "parent": {
311422
+ "fileName": "flow/node_modules/.pnpm/@react-types+shared@3.32.1_react@19.2.4/node_modules/@react-types/shared/src/selection.d.ts",
311423
+ "name": "MultipleSelection"
311424
+ },
311425
+ "declarations": [
311426
+ {
311427
+ "fileName": "flow/node_modules/.pnpm/@react-types+shared@3.32.1_react@19.2.4/node_modules/@react-types/shared/src/selection.d.ts",
311428
+ "name": "MultipleSelection"
311429
+ }
311430
+ ],
311431
+ "required": false,
311432
+ "type": {
311433
+ "name": "\"all\" | Iterable<Key>"
311434
+ }
311435
+ },
311436
+ "defaultSelectedKeys": {
311437
+ "defaultValue": null,
311438
+ "description": "The initial selected keys in the collection (uncontrolled).",
311439
+ "name": "defaultSelectedKeys",
311440
+ "parent": {
311441
+ "fileName": "flow/node_modules/.pnpm/@react-types+shared@3.32.1_react@19.2.4/node_modules/@react-types/shared/src/selection.d.ts",
311442
+ "name": "MultipleSelection"
311443
+ },
311444
+ "declarations": [
311445
+ {
311446
+ "fileName": "flow/node_modules/.pnpm/@react-types+shared@3.32.1_react@19.2.4/node_modules/@react-types/shared/src/selection.d.ts",
311447
+ "name": "MultipleSelection"
311448
+ }
311449
+ ],
311450
+ "required": false,
311451
+ "type": {
311452
+ "name": "\"all\" | Iterable<Key>"
311453
+ }
311454
+ },
311455
+ "selectionMode": {
311301
311456
  "defaultValue": null,
311302
311457
  "description": "",
311303
- "name": "children",
311458
+ "name": "selectionMode",
311304
311459
  "declarations": [
311305
311460
  {
311306
- "fileName": "flow/node_modules/.pnpm/@types+react@19.2.10/node_modules/@types/react/index.d.ts",
311461
+ "fileName": "components/src/components/ContextMenu/components/ContextMenuSection/ContextMenuSection.tsx",
311307
311462
  "name": "TypeLiteral"
311308
311463
  }
311309
311464
  ],
311310
311465
  "required": false,
311311
311466
  "type": {
311312
- "name": "ReactNode"
311467
+ "name": "ContextMenuSelectionMode"
311313
311468
  }
311314
311469
  }
311315
311470
  }
@@ -313115,161 +313270,6 @@
313115
313270
  }
313116
313271
  }
313117
313272
  },
313118
- {
313119
- "tags": {
313120
- "flr-generate": "all"
313121
- },
313122
- "filePath": "/home/runner/work/flow/flow/packages/components/src/components/ContextMenu/components/ContextMenuSection/ContextMenuSection.tsx",
313123
- "description": "",
313124
- "displayName": "ContextMenuSection",
313125
- "methods": [],
313126
- "props": {
313127
- "children": {
313128
- "defaultValue": null,
313129
- "description": "",
313130
- "name": "children",
313131
- "declarations": [
313132
- {
313133
- "fileName": "flow/node_modules/.pnpm/@types+react@19.2.10/node_modules/@types/react/index.d.ts",
313134
- "name": "TypeLiteral"
313135
- }
313136
- ],
313137
- "required": false,
313138
- "type": {
313139
- "name": "ReactNode"
313140
- }
313141
- },
313142
- "wrapWith": {
313143
- "defaultValue": null,
313144
- "description": "",
313145
- "name": "wrapWith",
313146
- "parent": {
313147
- "fileName": "components/src/lib/componentFactory/flowComponent.tsx",
313148
- "name": "FlowComponentProps"
313149
- },
313150
- "declarations": [
313151
- {
313152
- "fileName": "components/src/lib/componentFactory/flowComponent.tsx",
313153
- "name": "FlowComponentProps"
313154
- }
313155
- ],
313156
- "required": false,
313157
- "type": {
313158
- "name": "ReactElement<unknown, string | JSXElementConstructor<any>>"
313159
- }
313160
- },
313161
- "tunnelId": {
313162
- "defaultValue": null,
313163
- "description": "@internal",
313164
- "name": "tunnelId",
313165
- "parent": {
313166
- "fileName": "components/src/lib/types/props.ts",
313167
- "name": "PropsWithTunnel"
313168
- },
313169
- "declarations": [
313170
- {
313171
- "fileName": "components/src/lib/types/props.ts",
313172
- "name": "PropsWithTunnel"
313173
- }
313174
- ],
313175
- "required": false,
313176
- "type": {
313177
- "name": "string | null"
313178
- }
313179
- },
313180
- "ref": {
313181
- "defaultValue": null,
313182
- "description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}",
313183
- "name": "ref",
313184
- "parent": {
313185
- "fileName": "flow/node_modules/.pnpm/@types+react@19.2.10/node_modules/@types/react/index.d.ts",
313186
- "name": "RefAttributes"
313187
- },
313188
- "declarations": [
313189
- {
313190
- "fileName": "flow/node_modules/.pnpm/@types+react@19.2.10/node_modules/@types/react/index.d.ts",
313191
- "name": "RefAttributes"
313192
- }
313193
- ],
313194
- "required": false,
313195
- "type": {
313196
- "name": "Ref<HTMLSpanElement>"
313197
- }
313198
- },
313199
- "key": {
313200
- "defaultValue": null,
313201
- "description": "",
313202
- "name": "key",
313203
- "parent": {
313204
- "fileName": "flow/node_modules/.pnpm/@types+react@19.2.10/node_modules/@types/react/index.d.ts",
313205
- "name": "Attributes"
313206
- },
313207
- "declarations": [
313208
- {
313209
- "fileName": "flow/node_modules/.pnpm/@types+react@19.2.10/node_modules/@types/react/index.d.ts",
313210
- "name": "Attributes"
313211
- }
313212
- ],
313213
- "required": false,
313214
- "type": {
313215
- "name": "Key | null"
313216
- }
313217
- },
313218
- "selectedKeys": {
313219
- "defaultValue": null,
313220
- "description": "The currently selected keys in the collection (controlled).",
313221
- "name": "selectedKeys",
313222
- "parent": {
313223
- "fileName": "flow/node_modules/.pnpm/@react-types+shared@3.32.1_react@19.2.4/node_modules/@react-types/shared/src/selection.d.ts",
313224
- "name": "MultipleSelection"
313225
- },
313226
- "declarations": [
313227
- {
313228
- "fileName": "flow/node_modules/.pnpm/@react-types+shared@3.32.1_react@19.2.4/node_modules/@react-types/shared/src/selection.d.ts",
313229
- "name": "MultipleSelection"
313230
- }
313231
- ],
313232
- "required": false,
313233
- "type": {
313234
- "name": "\"all\" | Iterable<Key>"
313235
- }
313236
- },
313237
- "defaultSelectedKeys": {
313238
- "defaultValue": null,
313239
- "description": "The initial selected keys in the collection (uncontrolled).",
313240
- "name": "defaultSelectedKeys",
313241
- "parent": {
313242
- "fileName": "flow/node_modules/.pnpm/@react-types+shared@3.32.1_react@19.2.4/node_modules/@react-types/shared/src/selection.d.ts",
313243
- "name": "MultipleSelection"
313244
- },
313245
- "declarations": [
313246
- {
313247
- "fileName": "flow/node_modules/.pnpm/@react-types+shared@3.32.1_react@19.2.4/node_modules/@react-types/shared/src/selection.d.ts",
313248
- "name": "MultipleSelection"
313249
- }
313250
- ],
313251
- "required": false,
313252
- "type": {
313253
- "name": "\"all\" | Iterable<Key>"
313254
- }
313255
- },
313256
- "selectionMode": {
313257
- "defaultValue": null,
313258
- "description": "",
313259
- "name": "selectionMode",
313260
- "declarations": [
313261
- {
313262
- "fileName": "components/src/components/ContextMenu/components/ContextMenuSection/ContextMenuSection.tsx",
313263
- "name": "TypeLiteral"
313264
- }
313265
- ],
313266
- "required": false,
313267
- "type": {
313268
- "name": "ContextMenuSelectionMode"
313269
- }
313270
- }
313271
- }
313272
- },
313273
313273
  {
313274
313274
  "tags": {
313275
313275
  "flr-generate": "all"
@@ -345483,6 +345483,34 @@
345483
345483
  }
345484
345484
  }
345485
345485
  },
345486
+ {
345487
+ "tags": {},
345488
+ "filePath": "/home/runner/work/flow/flow/packages/components/src/components/List/components/Items/components/Item/components/ListItemSkeletonView/ListItemSkeletonView.tsx",
345489
+ "description": "",
345490
+ "displayName": "ListItemSkeletonView",
345491
+ "methods": [],
345492
+ "props": {
345493
+ "viewMode": {
345494
+ "defaultValue": null,
345495
+ "description": "",
345496
+ "name": "viewMode",
345497
+ "parent": {
345498
+ "fileName": "components/src/components/List/components/Items/components/Item/components/ListItemSkeletonView/ListItemSkeletonView.tsx",
345499
+ "name": "ListItemSkeletonViewProps"
345500
+ },
345501
+ "declarations": [
345502
+ {
345503
+ "fileName": "components/src/components/List/components/Items/components/Item/components/ListItemSkeletonView/ListItemSkeletonView.tsx",
345504
+ "name": "ListItemSkeletonViewProps"
345505
+ }
345506
+ ],
345507
+ "required": true,
345508
+ "type": {
345509
+ "name": "ListViewMode"
345510
+ }
345511
+ }
345512
+ }
345513
+ },
345486
345514
  {
345487
345515
  "tags": {},
345488
345516
  "filePath": "/home/runner/work/flow/flow/packages/components/src/components/List/components/Items/components/Item/components/OptionsButton/index.tsx",
@@ -345568,33 +345596,5 @@
345568
345596
  }
345569
345597
  }
345570
345598
  }
345571
- },
345572
- {
345573
- "tags": {},
345574
- "filePath": "/home/runner/work/flow/flow/packages/components/src/components/List/components/Items/components/Item/components/ListItemSkeletonView/ListItemSkeletonView.tsx",
345575
- "description": "",
345576
- "displayName": "ListItemSkeletonView",
345577
- "methods": [],
345578
- "props": {
345579
- "viewMode": {
345580
- "defaultValue": null,
345581
- "description": "",
345582
- "name": "viewMode",
345583
- "parent": {
345584
- "fileName": "components/src/components/List/components/Items/components/Item/components/ListItemSkeletonView/ListItemSkeletonView.tsx",
345585
- "name": "ListItemSkeletonViewProps"
345586
- },
345587
- "declarations": [
345588
- {
345589
- "fileName": "components/src/components/List/components/Items/components/Item/components/ListItemSkeletonView/ListItemSkeletonView.tsx",
345590
- "name": "ListItemSkeletonViewProps"
345591
- }
345592
- ],
345593
- "required": true,
345594
- "type": {
345595
- "name": "ListViewMode"
345596
- }
345597
- }
345598
- }
345599
345599
  }
345600
345600
  ]
@@ -44,7 +44,7 @@ function Form(props) {
44
44
  }
45
45
  });
46
46
  const { submitInterceptor } = useFormSettings();
47
- const onSubmit = submitInterceptor ? (values) => submitInterceptor(onSubmitProp, values) : onSubmitProp;
47
+ const onSubmit = submitInterceptor ? (values) => submitInterceptor(onSubmitProp, values, { form }) : onSubmitProp;
48
48
  const handleSubmitResult = (result) => {
49
49
  if (typeof result === "function") {
50
50
  afterSubmitCallback.current = result;
@@ -1 +1 @@
1
- {"version":3,"file":"Form.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/Form/Form.tsx"],"sourcesContent":["import ConfirmUnsavedChangesModal from \"@/components/Modal/components/ConfirmUnsavedChangesModal\";\nimport { useHotkeySubmit } from \"@/integrations/react-hook-form/components/Form/useHotkeySubmit\";\nimport { FormContextProvider } from \"@/integrations/react-hook-form/components/FormContextProvider/FormContextProvider\";\nimport { flags } from \"@/integrations/react-hook-form/flags\";\nimport { useModalController } from \"@/lib/controller\";\nimport {\n type BaseSyntheticEvent,\n type ComponentProps,\n type FC,\n type FormEventHandler,\n type PropsWithChildren,\n type Ref,\n useId,\n useMemo,\n useRef,\n} from \"react\";\nimport type {\n FieldValues,\n Path,\n SubmitHandler,\n UseFormReturn,\n} from \"react-hook-form\";\nimport { FormProvider as RhfFormContextProvider } from \"react-hook-form\";\nimport { useFormRootErrorController } from \"../FormRootError/useFormRootErrorController\";\nimport { FormRootError } from \"../../lib/FormRootError\";\nimport { useFormSettings } from \"../FormSettingsProvider/FormSettingsProvider\";\n\nexport type FormOnSubmitHandler<F extends FieldValues> = SubmitHandler<F>;\n\nexport type AfterFormSubmitCallback = (...unknownArgs: unknown[]) => unknown;\n\nexport interface FormAutoResetOptions {\n onAfterModalClose?: boolean;\n}\n\ntype FormComponentType = FC<\n PropsWithChildren<{\n id: string;\n onSubmit?: FormEventHandler | FormOnSubmitHandler<never>;\n ref?: Ref<HTMLFormElement>;\n }>\n>;\n\nexport interface FormProps<F extends FieldValues>\n extends Omit<ComponentProps<\"form\">, \"onSubmit\">, PropsWithChildren {\n form: UseFormReturn<F>;\n onSubmit: FormOnSubmitHandler<F>;\n formComponent?: FC<Omit<FormComponentType, \"ref\">>;\n isReadOnly?: boolean;\n autoReset?: FormAutoResetOptions | 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: onSubmitProp,\n formComponent = DefaultFormComponent,\n isReadOnly,\n ref,\n id: idProp,\n autoReset = true,\n ...formProps\n } = props;\n\n const newFormId = useId();\n const formId = idProp ?? newFormId;\n const FormComponent = useMemo(() => formComponent, [formId]);\n const afterSubmitCallback = useRef<AfterFormSubmitCallback>(undefined);\n const { isSubmitting, isValidating, isDirty } = form.formState;\n const rootErrorController = useFormRootErrorController();\n\n const autoResetOptions =\n typeof autoReset === \"boolean\"\n ? { onAfterModalClose: autoReset }\n : autoReset;\n\n const modalController = useModalController();\n modalController.useUpdateOptions({\n confirmOnClose:\n flags.requireCloseModalConfirmationOnUnsavedChanges && isDirty,\n onClose: () => {\n if (autoResetOptions?.onAfterModalClose) {\n form.reset();\n }\n },\n });\n\n const { submitInterceptor } = useFormSettings();\n const onSubmit = submitInterceptor\n ? (values: F) => submitInterceptor<F>(onSubmitProp, values)\n : onSubmitProp;\n\n const handleSubmitResult = (result: unknown) => {\n if (typeof result === \"function\") {\n afterSubmitCallback.current = result as AfterFormSubmitCallback;\n }\n const rootError = form.getFieldState(\"root\" as Path<F>)?.error;\n if (rootError && !rootErrorController.errorComponentMounted) {\n throw new FormRootError(rootError);\n }\n };\n\n const handleSubmit = (e?: BaseSyntheticEvent | F) => {\n const formEvent =\n e && \"nativeEvent\" in e ? (e as BaseSyntheticEvent) : undefined;\n\n formEvent?.stopPropagation();\n\n if (isSubmitting || isValidating) {\n return;\n }\n\n modalController.confirmClose();\n\n return form.handleSubmit((values, event) => {\n const submitResult = onSubmit(values, event);\n if (submitResult instanceof Promise) {\n return submitResult.then(handleSubmitResult);\n }\n handleSubmitResult(submitResult);\n })(formEvent);\n };\n\n const onAfterSuccessFeedback = () => {\n afterSubmitCallback.current?.();\n };\n\n const refWithHotkeySubmit = useHotkeySubmit({\n ref,\n handleSubmit,\n });\n\n return (\n <RhfFormContextProvider {...form}>\n <FormContextProvider\n form={form as UseFormReturn}\n isReadOnly={isReadOnly}\n id={formId}\n onAfterSuccessFeedback={onAfterSuccessFeedback}\n rootErrorController={rootErrorController}\n >\n <FormComponent\n {...formProps}\n ref={refWithHotkeySubmit}\n id={formId}\n onSubmit={handleSubmit}\n >\n {children}\n </FormComponent>\n </FormContextProvider>\n <ConfirmUnsavedChangesModal />\n </RhfFormContextProvider>\n );\n}\n\nexport default Form;\n"],"names":["RhfFormContextProvider"],"mappings":";;;;;;;;;;;;;;AAoDA,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,EAAU,YAAA;AAAA,IACV,aAAA,GAAgB,oBAAA;AAAA,IAChB,UAAA;AAAA,IACA,GAAA;AAAA,IACA,EAAA,EAAI,MAAA;AAAA,IACJ,SAAA,GAAY,IAAA;AAAA,IACZ,GAAG;AAAA,GACL,GAAI,KAAA;AAEJ,EAAA,MAAM,YAAY,KAAA,EAAM;AACxB,EAAA,MAAM,SAAS,MAAA,IAAU,SAAA;AACzB,EAAA,MAAM,gBAAgB,OAAA,CAAQ,MAAM,aAAA,EAAe,CAAC,MAAM,CAAC,CAAA;AAC3D,EAAA,MAAM,mBAAA,GAAsB,OAAgC,MAAS,CAAA;AACrE,EAAA,MAAM,EAAE,YAAA,EAAc,YAAA,EAAc,OAAA,KAAY,IAAA,CAAK,SAAA;AACrD,EAAA,MAAM,sBAAsB,0BAAA,EAA2B;AAEvD,EAAA,MAAM,mBACJ,OAAO,SAAA,KAAc,YACjB,EAAE,iBAAA,EAAmB,WAAU,GAC/B,SAAA;AAEN,EAAA,MAAM,kBAAkB,kBAAA,EAAmB;AAC3C,EAAA,eAAA,CAAgB,gBAAA,CAAiB;AAAA,IAC/B,cAAA,EACE,MAAM,6CAAA,IAAiD,OAAA;AAAA,IACzD,SAAS,MAAM;AACb,MAAA,IAAI,kBAAkB,iBAAA,EAAmB;AACvC,QAAA,IAAA,CAAK,KAAA,EAAM;AAAA,MACb;AAAA,IACF;AAAA,GACD,CAAA;AAED,EAAA,MAAM,EAAE,iBAAA,EAAkB,GAAI,eAAA,EAAgB;AAC9C,EAAA,MAAM,WAAW,iBAAA,GACb,CAAC,WAAc,iBAAA,CAAqB,YAAA,EAAc,MAAM,CAAA,GACxD,YAAA;AAEJ,EAAA,MAAM,kBAAA,GAAqB,CAAC,MAAA,KAAoB;AAC9C,IAAA,IAAI,OAAO,WAAW,UAAA,EAAY;AAChC,MAAA,mBAAA,CAAoB,OAAA,GAAU,MAAA;AAAA,IAChC;AACA,IAAA,MAAM,SAAA,GAAY,IAAA,CAAK,aAAA,CAAc,MAAiB,CAAA,EAAG,KAAA;AACzD,IAAA,IAAI,SAAA,IAAa,CAAC,mBAAA,CAAoB,qBAAA,EAAuB;AAC3D,MAAA,MAAM,IAAI,cAAc,SAAS,CAAA;AAAA,IACnC;AAAA,EACF,CAAA;AAEA,EAAA,MAAM,YAAA,GAAe,CAAC,CAAA,KAA+B;AACnD,IAAA,MAAM,SAAA,GACJ,CAAA,IAAK,aAAA,IAAiB,CAAA,GAAK,CAAA,GAA2B,MAAA;AAExD,IAAA,SAAA,EAAW,eAAA,EAAgB;AAE3B,IAAA,IAAI,gBAAgB,YAAA,EAAc;AAChC,MAAA;AAAA,IACF;AAEA,IAAA,eAAA,CAAgB,YAAA,EAAa;AAE7B,IAAA,OAAO,IAAA,CAAK,YAAA,CAAa,CAAC,MAAA,EAAQ,KAAA,KAAU;AAC1C,MAAA,MAAM,YAAA,GAAe,QAAA,CAAS,MAAA,EAAQ,KAAK,CAAA;AAC3C,MAAA,IAAI,wBAAwB,OAAA,EAAS;AACnC,QAAA,OAAO,YAAA,CAAa,KAAK,kBAAkB,CAAA;AAAA,MAC7C;AACA,MAAA,kBAAA,CAAmB,YAAY,CAAA;AAAA,IACjC,CAAC,EAAE,SAAS,CAAA;AAAA,EACd,CAAA;AAEA,EAAA,MAAM,yBAAyB,MAAM;AACnC,IAAA,mBAAA,CAAoB,OAAA,IAAU;AAAA,EAChC,CAAA;AAEA,EAAA,MAAM,sBAAsB,eAAA,CAAgB;AAAA,IAC1C,GAAA;AAAA,IACA;AAAA,GACD,CAAA;AAED,EAAA,uBACE,IAAA,CAACA,YAAA,EAAA,EAAwB,GAAG,IAAA,EAC1B,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,mBAAA;AAAA,MAAA;AAAA,QACC,IAAA;AAAA,QACA,UAAA;AAAA,QACA,EAAA,EAAI,MAAA;AAAA,QACJ,sBAAA;AAAA,QACA,mBAAA;AAAA,QAEA,QAAA,kBAAA,GAAA;AAAA,UAAC,aAAA;AAAA,UAAA;AAAA,YACE,GAAG,SAAA;AAAA,YACJ,GAAA,EAAK,mBAAA;AAAA,YACL,EAAA,EAAI,MAAA;AAAA,YACJ,QAAA,EAAU,YAAA;AAAA,YAET;AAAA;AAAA;AACH;AAAA,KACF;AAAA,wBACC,0BAAA,EAAA,EAA2B;AAAA,GAAA,EAC9B,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"Form.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/Form/Form.tsx"],"sourcesContent":["import ConfirmUnsavedChangesModal from \"@/components/Modal/components/ConfirmUnsavedChangesModal\";\nimport { useHotkeySubmit } from \"@/integrations/react-hook-form/components/Form/useHotkeySubmit\";\nimport { FormContextProvider } from \"@/integrations/react-hook-form/components/FormContextProvider/FormContextProvider\";\nimport { flags } from \"@/integrations/react-hook-form/flags\";\nimport { useModalController } from \"@/lib/controller\";\nimport {\n type BaseSyntheticEvent,\n type ComponentProps,\n type FC,\n type PropsWithChildren,\n type Ref,\n type SubmitEventHandler,\n useId,\n useMemo,\n useRef,\n} from \"react\";\nimport type {\n FieldValues,\n Path,\n SubmitHandler,\n UseFormReturn,\n} from \"react-hook-form\";\nimport { FormProvider as RhfFormContextProvider } from \"react-hook-form\";\nimport { useFormRootErrorController } from \"../FormRootError/useFormRootErrorController\";\nimport { FormRootError } from \"../../lib/FormRootError\";\nimport { useFormSettings } from \"../FormSettingsProvider/FormSettingsProvider\";\n\nexport type FormOnSubmitHandler<F extends FieldValues> = SubmitHandler<F>;\n\nexport type AfterFormSubmitCallback = (...unknownArgs: unknown[]) => unknown;\n\nexport interface FormAutoResetOptions {\n onAfterModalClose?: boolean;\n}\n\ntype FormComponentType = FC<\n PropsWithChildren<{\n id: string;\n onSubmit?: SubmitEventHandler | FormOnSubmitHandler<never>;\n ref?: Ref<HTMLFormElement>;\n }>\n>;\n\nexport interface FormProps<F extends FieldValues>\n extends Omit<ComponentProps<\"form\">, \"onSubmit\">, PropsWithChildren {\n form: UseFormReturn<F>;\n onSubmit: FormOnSubmitHandler<F>;\n formComponent?: FC<Omit<FormComponentType, \"ref\">>;\n isReadOnly?: boolean;\n autoReset?: FormAutoResetOptions | 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: onSubmitProp,\n formComponent = DefaultFormComponent,\n isReadOnly,\n ref,\n id: idProp,\n autoReset = true,\n ...formProps\n } = props;\n\n const newFormId = useId();\n const formId = idProp ?? newFormId;\n const FormComponent = useMemo(() => formComponent, [formId]);\n const afterSubmitCallback = useRef<AfterFormSubmitCallback>(undefined);\n const { isSubmitting, isValidating, isDirty } = form.formState;\n const rootErrorController = useFormRootErrorController();\n\n const autoResetOptions =\n typeof autoReset === \"boolean\"\n ? { onAfterModalClose: autoReset }\n : autoReset;\n\n const modalController = useModalController();\n modalController.useUpdateOptions({\n confirmOnClose:\n flags.requireCloseModalConfirmationOnUnsavedChanges && isDirty,\n onClose: () => {\n if (autoResetOptions?.onAfterModalClose) {\n form.reset();\n }\n },\n });\n\n const { submitInterceptor } = useFormSettings();\n const onSubmit = submitInterceptor\n ? (values: F) => submitInterceptor<F>(onSubmitProp, values, { form })\n : onSubmitProp;\n\n const handleSubmitResult = (result: unknown) => {\n if (typeof result === \"function\") {\n afterSubmitCallback.current = result as AfterFormSubmitCallback;\n }\n const rootError = form.getFieldState(\"root\" as Path<F>)?.error;\n if (rootError && !rootErrorController.errorComponentMounted) {\n throw new FormRootError(rootError);\n }\n };\n\n const handleSubmit = (e?: BaseSyntheticEvent | F) => {\n const formEvent =\n e && \"nativeEvent\" in e ? (e as BaseSyntheticEvent) : undefined;\n\n formEvent?.stopPropagation();\n\n if (isSubmitting || isValidating) {\n return;\n }\n\n modalController.confirmClose();\n\n return form.handleSubmit((values, event) => {\n const submitResult = onSubmit(values, event);\n if (submitResult instanceof Promise) {\n return submitResult.then(handleSubmitResult);\n }\n handleSubmitResult(submitResult);\n })(formEvent);\n };\n\n const onAfterSuccessFeedback = () => {\n afterSubmitCallback.current?.();\n };\n\n const refWithHotkeySubmit = useHotkeySubmit({\n ref,\n handleSubmit,\n });\n\n return (\n <RhfFormContextProvider {...form}>\n <FormContextProvider\n form={form as UseFormReturn}\n isReadOnly={isReadOnly}\n id={formId}\n onAfterSuccessFeedback={onAfterSuccessFeedback}\n rootErrorController={rootErrorController}\n >\n <FormComponent\n {...formProps}\n ref={refWithHotkeySubmit}\n id={formId}\n onSubmit={handleSubmit}\n >\n {children}\n </FormComponent>\n </FormContextProvider>\n <ConfirmUnsavedChangesModal />\n </RhfFormContextProvider>\n );\n}\n\nexport default Form;\n"],"names":["RhfFormContextProvider"],"mappings":"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"}
@@ -1 +1 @@
1
- {"version":3,"file":"FormSettingsProvider.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/FormSettingsProvider/FormSettingsProvider.tsx"],"sourcesContent":["import { createContext, useContext, type PropsWithChildren } from \"react\";\nimport type { FieldValues } from \"react-hook-form\";\nimport type { FormOnSubmitHandler } from \"../Form/Form\";\n\ntype SubmitInterceptor = <F extends FieldValues = FieldValues>(\n submit: FormOnSubmitHandler<F>,\n values: F,\n) => ReturnType<FormOnSubmitHandler<F>>;\n\ninterface Context {\n submitInterceptor?: SubmitInterceptor;\n}\n\nconst context = createContext<Context>({});\n\nexport type FormSettingsProviderProps = Context & PropsWithChildren;\n\nexport function FormSettingsProvider(props: FormSettingsProviderProps) {\n return (\n <context.Provider value={props as Context}>\n {props.children}\n </context.Provider>\n );\n}\n\nexport const useFormSettings = () => useContext(context);\n"],"names":[],"mappings":";;;AAaA,MAAM,OAAA,GAAU,aAAA,CAAuB,EAAE,CAAA;AAIlC,SAAS,qBAAqB,KAAA,EAAkC;AACrE,EAAA,2BACG,OAAA,CAAQ,QAAA,EAAR,EAAiB,KAAA,EAAO,KAAA,EACtB,gBAAM,QAAA,EACT,CAAA;AAEJ;AAEO,MAAM,eAAA,GAAkB,MAAM,UAAA,CAAW,OAAO;;;;"}
1
+ {"version":3,"file":"FormSettingsProvider.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/FormSettingsProvider/FormSettingsProvider.tsx"],"sourcesContent":["import { createContext, useContext, type PropsWithChildren } from \"react\";\nimport type { FieldValues, UseFormReturn } from \"react-hook-form\";\nimport type { FormOnSubmitHandler } from \"../Form/Form\";\n\nexport interface SubmitInterceptorContext<F extends FieldValues = FieldValues> {\n form: UseFormReturn<F>;\n}\n\nexport type SubmitInterceptor = <F extends FieldValues = FieldValues>(\n submit: FormOnSubmitHandler<F>,\n values: F,\n context: SubmitInterceptorContext<F>,\n) => ReturnType<FormOnSubmitHandler<F>>;\n\ninterface Context {\n submitInterceptor?: SubmitInterceptor;\n}\n\nconst context = createContext<Context>({});\n\nexport type FormSettingsProviderProps = Context & PropsWithChildren;\n\nexport function FormSettingsProvider(props: FormSettingsProviderProps) {\n return (\n <context.Provider value={props as Context}>\n {props.children}\n </context.Provider>\n );\n}\n\nexport const useFormSettings = () => useContext(context);\n"],"names":[],"mappings":";;;AAkBA,MAAM,OAAA,GAAU,aAAA,CAAuB,EAAE,CAAA;AAIlC,SAAS,qBAAqB,KAAA,EAAkC;AACrE,EAAA,2BACG,OAAA,CAAQ,QAAA,EAAR,EAAiB,KAAA,EAAO,KAAA,EACtB,gBAAM,QAAA,EACT,CAAA;AAEJ;AAEO,MAAM,eAAA,GAAkB,MAAM,UAAA,CAAW,OAAO;;;;"}
@@ -1,4 +1,4 @@
1
- import { ComponentProps, FC, FormEventHandler, PropsWithChildren, Ref } from 'react';
1
+ import { ComponentProps, FC, PropsWithChildren, Ref, SubmitEventHandler } from 'react';
2
2
  import { FieldValues, SubmitHandler, UseFormReturn } from 'react-hook-form';
3
3
  export type FormOnSubmitHandler<F extends FieldValues> = SubmitHandler<F>;
4
4
  export type AfterFormSubmitCallback = (...unknownArgs: unknown[]) => unknown;
@@ -7,7 +7,7 @@ export interface FormAutoResetOptions {
7
7
  }
8
8
  type FormComponentType = FC<PropsWithChildren<{
9
9
  id: string;
10
- onSubmit?: FormEventHandler | FormOnSubmitHandler<never>;
10
+ onSubmit?: SubmitEventHandler | FormOnSubmitHandler<never>;
11
11
  ref?: Ref<HTMLFormElement>;
12
12
  }>>;
13
13
  export interface FormProps<F extends FieldValues> extends Omit<ComponentProps<"form">, "onSubmit">, PropsWithChildren {
@@ -1 +1 @@
1
- {"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/Form/Form.tsx"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,EAAE,EACP,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,GAAG,EAIT,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EACV,WAAW,EAEX,aAAa,EACb,aAAa,EACd,MAAM,iBAAiB,CAAC;AAMzB,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,WAAW,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC;AAE1E,MAAM,MAAM,uBAAuB,GAAG,CAAC,GAAG,WAAW,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC;AAE7E,MAAM,WAAW,oBAAoB;IACnC,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,KAAK,iBAAiB,GAAG,EAAE,CACzB,iBAAiB,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,gBAAgB,GAAG,mBAAmB,CAAC,KAAK,CAAC,CAAC;IACzD,GAAG,CAAC,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC;CAC5B,CAAC,CACH,CAAC;AAEF,MAAM,WAAW,SAAS,CAAC,CAAC,SAAS,WAAW,CAC9C,SAAQ,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,EAAE,iBAAiB;IACnE,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IACvB,QAAQ,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC;IACjC,aAAa,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC,CAAC;IACnD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC;CAC5C;AAID,wBAAgB,IAAI,CAAC,CAAC,SAAS,WAAW,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,2CAsG9D;AAED,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/Form/Form.tsx"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,EAAE,EACP,KAAK,iBAAiB,EACtB,KAAK,GAAG,EACR,KAAK,kBAAkB,EAIxB,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EACV,WAAW,EAEX,aAAa,EACb,aAAa,EACd,MAAM,iBAAiB,CAAC;AAMzB,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,WAAW,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC;AAE1E,MAAM,MAAM,uBAAuB,GAAG,CAAC,GAAG,WAAW,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC;AAE7E,MAAM,WAAW,oBAAoB;IACnC,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,KAAK,iBAAiB,GAAG,EAAE,CACzB,iBAAiB,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,kBAAkB,GAAG,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAC3D,GAAG,CAAC,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC;CAC5B,CAAC,CACH,CAAC;AAEF,MAAM,WAAW,SAAS,CAAC,CAAC,SAAS,WAAW,CAC9C,SAAQ,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,EAAE,iBAAiB;IACnE,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IACvB,QAAQ,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC;IACjC,aAAa,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC,CAAC;IACnD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC;CAC5C;AAID,wBAAgB,IAAI,CAAC,CAAC,SAAS,WAAW,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,2CAsG9D;AAED,eAAe,IAAI,CAAC"}
@@ -1,7 +1,10 @@
1
1
  import { PropsWithChildren } from 'react';
2
- import { FieldValues } from 'react-hook-form';
2
+ import { FieldValues, UseFormReturn } from 'react-hook-form';
3
3
  import { FormOnSubmitHandler } from '../Form/Form';
4
- type SubmitInterceptor = <F extends FieldValues = FieldValues>(submit: FormOnSubmitHandler<F>, values: F) => ReturnType<FormOnSubmitHandler<F>>;
4
+ export interface SubmitInterceptorContext<F extends FieldValues = FieldValues> {
5
+ form: UseFormReturn<F>;
6
+ }
7
+ export type SubmitInterceptor = <F extends FieldValues = FieldValues>(submit: FormOnSubmitHandler<F>, values: F, context: SubmitInterceptorContext<F>) => ReturnType<FormOnSubmitHandler<F>>;
5
8
  interface Context {
6
9
  submitInterceptor?: SubmitInterceptor;
7
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"FormSettingsProvider.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/FormSettingsProvider/FormSettingsProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAExD,KAAK,iBAAiB,GAAG,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EAC3D,MAAM,EAAE,mBAAmB,CAAC,CAAC,CAAC,EAC9B,MAAM,EAAE,CAAC,KACN,UAAU,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;AAExC,UAAU,OAAO;IACf,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;CACvC;AAID,MAAM,MAAM,yBAAyB,GAAG,OAAO,GAAG,iBAAiB,CAAC;AAEpE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,2CAMpE;AAED,eAAO,MAAM,eAAe,eAA4B,CAAC"}
1
+ {"version":3,"file":"FormSettingsProvider.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/FormSettingsProvider/FormSettingsProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAExD,MAAM,WAAW,wBAAwB,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW;IAC3E,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;CACxB;AAED,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EAClE,MAAM,EAAE,mBAAmB,CAAC,CAAC,CAAC,EAC9B,MAAM,EAAE,CAAC,EACT,OAAO,EAAE,wBAAwB,CAAC,CAAC,CAAC,KACjC,UAAU,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;AAExC,UAAU,OAAO;IACf,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;CACvC;AAID,MAAM,MAAM,yBAAyB,GAAG,OAAO,GAAG,iBAAiB,CAAC;AAEpE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,2CAMpE;AAED,eAAO,MAAM,eAAe,eAA4B,CAAC"}
@@ -1,7 +1,7 @@
1
1
  export * from './components/Field';
2
2
  export * from './components/Form';
3
3
  export * from './components/SubmitButton';
4
- export { FormSettingsProvider, type FormSettingsProviderProps, } from './components/FormSettingsProvider';
4
+ export { FormSettingsProvider, type FormSettingsProviderProps, type SubmitInterceptor, type SubmitInterceptorContext, } from './components/FormSettingsProvider';
5
5
  export * from './components/ResetButton';
6
6
  export * from './components/FormRootError';
7
7
  export { useFormContext, useOptionalFormContext, } from './components/FormContextProvider';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/integrations/react-hook-form/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EACL,oBAAoB,EACpB,KAAK,yBAAyB,GAC/B,MAAM,mCAAmC,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EACL,cAAc,EACd,sBAAsB,GACvB,MAAM,kCAAkC,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/integrations/react-hook-form/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EACL,oBAAoB,EACpB,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,GAC9B,MAAM,mCAAmC,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EACL,cAAc,EACd,sBAAsB,GACvB,MAAM,kCAAkC,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/flow-react-components",
3
- "version": "0.2.0-alpha.713",
3
+ "version": "0.2.0-alpha.714",
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.713",
61
+ "@mittwald/react-tunnel": "0.2.0-alpha.714",
62
62
  "@mittwald/react-use-promise": "^4.2.2",
63
63
  "@react-aria/form": "^3.1.3",
64
64
  "@react-aria/live-announcer": "^3.4.4",
@@ -104,7 +104,7 @@
104
104
  "@faker-js/faker": "^10.2.0",
105
105
  "@internationalized/date": "^3.10.1",
106
106
  "@mittwald/flow-core": "",
107
- "@mittwald/flow-design-tokens": "0.2.0-alpha.713",
107
+ "@mittwald/flow-design-tokens": "0.2.0-alpha.714",
108
108
  "@mittwald/react-use-promise": "^4.2.2",
109
109
  "@mittwald/remote-dom-react": "1.2.2-mittwald.10",
110
110
  "@mittwald/typescript-config": "",
@@ -172,5 +172,5 @@
172
172
  "optional": true
173
173
  }
174
174
  },
175
- "gitHead": "937b70d0ef1911f5653f854e366cd1ac3cec07cf"
175
+ "gitHead": "66cfc1ba929ae522446ee98cbce4a9a642f9399d"
176
176
  }