@wildo-ai/saas-frontend-lib 1.1.3 → 1.1.4

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 (127) hide show
  1. package/dist/esm/companion-exports.d.ts +1 -1
  2. package/dist/esm/companion-exports.d.ts.map +1 -1
  3. package/dist/esm/companion-exports.js +1 -1
  4. package/dist/esm/companion-exports.js.map +1 -1
  5. package/dist/esm/components/ai-elements/decision/approval.d.ts +13 -1
  6. package/dist/esm/components/ai-elements/decision/approval.d.ts.map +1 -1
  7. package/dist/esm/components/ai-elements/decision/approval.js.map +1 -1
  8. package/dist/esm/components/flows-actors/approval.d.ts.map +1 -1
  9. package/dist/esm/components/flows-actors/approval.js +12 -7
  10. package/dist/esm/components/flows-actors/approval.js.map +1 -1
  11. package/dist/esm/components/flows-actors/approval.labels.d.ts.map +1 -1
  12. package/dist/esm/components/flows-actors/approval.labels.js +3 -0
  13. package/dist/esm/components/flows-actors/approval.labels.js.map +1 -1
  14. package/dist/esm/components/flows-actors/execution-plan.js +1 -1
  15. package/dist/esm/components/flows-actors/execution-plan.js.map +1 -1
  16. package/dist/esm/components/flows-actors/task-memory.js +1 -1
  17. package/dist/esm/components/flows-actors/task-memory.js.map +1 -1
  18. package/dist/esm/components/form/automated/generated-relationship-field.hooks.d.ts +1 -1
  19. package/dist/esm/components/form/controls/number/slider.d.ts +1 -1
  20. package/dist/esm/components/form/fields/form-field-file-provider-constraints.frontend.utils.d.ts +1 -1
  21. package/dist/esm/components/form/fields/form-field-file-provider-constraints.frontend.utils.d.ts.map +1 -1
  22. package/dist/esm/components/form/fields/form-field-file-provider-constraints.frontend.utils.js.map +1 -1
  23. package/dist/esm/components/form/fields/form-field-file.d.ts.map +1 -1
  24. package/dist/esm/components/form/fields/form-field-file.js +66 -17
  25. package/dist/esm/components/form/fields/form-field-file.js.map +1 -1
  26. package/dist/esm/components/form/fields/form-field-file.labels.js +2 -2
  27. package/dist/esm/components/form/fields/form-field-file.labels.js.map +1 -1
  28. package/dist/esm/components/form/form-field-types.d.ts +20 -0
  29. package/dist/esm/components/form/form-field-types.d.ts.map +1 -1
  30. package/dist/esm/components/form/form-field-types.js.map +1 -1
  31. package/dist/esm/components/navigation/NavigationItemBadge.d.ts +7 -1
  32. package/dist/esm/components/navigation/NavigationItemBadge.d.ts.map +1 -1
  33. package/dist/esm/components/navigation/NavigationItemBadge.js +29 -1
  34. package/dist/esm/components/navigation/NavigationItemBadge.js.map +1 -1
  35. package/dist/esm/components/navigation/menu-bar.d.ts +1 -1
  36. package/dist/esm/components/overlays/containers/OverlayContainer.d.ts.map +1 -1
  37. package/dist/esm/components/overlays/containers/OverlayContainer.js +36 -9
  38. package/dist/esm/components/overlays/containers/OverlayContainer.js.map +1 -1
  39. package/dist/esm/components/overlays/floating/context-menu.d.ts +1 -1
  40. package/dist/esm/components/overlays/floating/dropdown-menu.d.ts +1 -1
  41. package/dist/esm/components/resources/ResourceLayout_FilterChips.js +1 -1
  42. package/dist/esm/components/resources/ResourceLayout_FilterChips.js.map +1 -1
  43. package/dist/esm/components/resources/ResourceListItemRenderer.js +1 -1
  44. package/dist/esm/components/resources/ResourceListItemRenderer.js.map +1 -1
  45. package/dist/esm/components/resources/skeleton/ResourceHeaderTitle.d.ts +12 -0
  46. package/dist/esm/components/resources/skeleton/ResourceHeaderTitle.d.ts.map +1 -1
  47. package/dist/esm/components/resources/skeleton/ResourceHeaderTitle.js +13 -1
  48. package/dist/esm/components/resources/skeleton/ResourceHeaderTitle.js.map +1 -1
  49. package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.d.ts +106 -49
  50. package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.d.ts.map +1 -1
  51. package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.js +311 -109
  52. package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.js.map +1 -1
  53. package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.labels.d.ts.map +1 -1
  54. package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.labels.js +32 -2
  55. package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.labels.js.map +1 -1
  56. package/dist/esm/components/settings/SettingsHub.d.ts.map +1 -1
  57. package/dist/esm/components/settings/SettingsHub.js +30 -6
  58. package/dist/esm/components/settings/SettingsHub.js.map +1 -1
  59. package/dist/esm/components/views/onboarding-view/OnboardingView.d.ts.map +1 -1
  60. package/dist/esm/components/views/onboarding-view/OnboardingView.js +9 -2
  61. package/dist/esm/components/views/onboarding-view/OnboardingView.js.map +1 -1
  62. package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.d.ts +16 -0
  63. package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.d.ts.map +1 -1
  64. package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.js +17 -0
  65. package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.js.map +1 -1
  66. package/dist/esm/core/automated-layout/default-layout-generator.frontend.utils.d.ts.map +1 -1
  67. package/dist/esm/core/automated-layout/default-layout-generator.frontend.utils.js +3 -2
  68. package/dist/esm/core/automated-layout/default-layout-generator.frontend.utils.js.map +1 -1
  69. package/dist/esm/core/billing/billing-launcher.js +1 -1
  70. package/dist/esm/core/billing/billing-launcher.js.map +1 -1
  71. package/dist/esm/core/components-registry/provider-component-registry.frontend.service.d.ts +64 -4
  72. package/dist/esm/core/components-registry/provider-component-registry.frontend.service.d.ts.map +1 -1
  73. package/dist/esm/core/components-registry/provider-component-registry.frontend.service.js +76 -4
  74. package/dist/esm/core/components-registry/provider-component-registry.frontend.service.js.map +1 -1
  75. package/dist/esm/core/components-registry/useProviderComponent.frontend.hooks.d.ts +8 -0
  76. package/dist/esm/core/components-registry/useProviderComponent.frontend.hooks.d.ts.map +1 -1
  77. package/dist/esm/core/components-registry/useProviderComponent.frontend.hooks.js +1 -0
  78. package/dist/esm/core/components-registry/useProviderComponent.frontend.hooks.js.map +1 -1
  79. package/dist/esm/core/config/chart-view.frontend.schemas.d.ts +8 -8
  80. package/dist/esm/core/config/composite-view.schemas.d.ts +4 -4
  81. package/dist/esm/core/config/engine-settings-destinations.d.ts +0 -69
  82. package/dist/esm/core/config/engine-settings-destinations.d.ts.map +1 -1
  83. package/dist/esm/core/config/engine-settings-destinations.js +35 -74
  84. package/dist/esm/core/config/engine-settings-destinations.js.map +1 -1
  85. package/dist/esm/core/config/settings-hub.frontend.schemas.d.ts +10 -1
  86. package/dist/esm/core/config/settings-hub.frontend.schemas.d.ts.map +1 -1
  87. package/dist/esm/core/config/settings-hub.frontend.schemas.js +9 -0
  88. package/dist/esm/core/config/settings-hub.frontend.schemas.js.map +1 -1
  89. package/dist/esm/core/config/useSettingsHubConfig.d.ts.map +1 -1
  90. package/dist/esm/core/config/useSettingsHubConfig.js +8 -1
  91. package/dist/esm/core/config/useSettingsHubConfig.js.map +1 -1
  92. package/dist/esm/core/events/events.frontend.schemas.d.ts +4 -4
  93. package/dist/esm/core/external-providers/ProviderFilePickerHost.d.ts +12 -1
  94. package/dist/esm/core/external-providers/ProviderFilePickerHost.d.ts.map +1 -1
  95. package/dist/esm/core/external-providers/ProviderFilePickerHost.js +15 -2
  96. package/dist/esm/core/external-providers/ProviderFilePickerHost.js.map +1 -1
  97. package/dist/esm/core/external-providers/provider-file-selection.frontend.utils.d.ts +1 -2
  98. package/dist/esm/core/external-providers/provider-file-selection.frontend.utils.d.ts.map +1 -1
  99. package/dist/esm/core/external-providers/provider-file-selection.frontend.utils.js.map +1 -1
  100. package/dist/esm/core/flows-actors/FlowsActorsContext.d.ts +6 -1
  101. package/dist/esm/core/flows-actors/FlowsActorsContext.d.ts.map +1 -1
  102. package/dist/esm/core/flows-actors/FlowsActorsContext.js +10 -2
  103. package/dist/esm/core/flows-actors/FlowsActorsContext.js.map +1 -1
  104. package/dist/esm/core/i18n/I18nContext.d.ts +23 -0
  105. package/dist/esm/core/i18n/I18nContext.d.ts.map +1 -1
  106. package/dist/esm/core/i18n/I18nContext.js +6 -1
  107. package/dist/esm/core/i18n/I18nContext.js.map +1 -1
  108. package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.d.ts +75 -2
  109. package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.d.ts.map +1 -1
  110. package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.js +52 -0
  111. package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.js.map +1 -1
  112. package/dist/esm/core/requests/wildo-http-client-resources.frontend.service.d.ts +3 -2
  113. package/dist/esm/core/requests/wildo-http-client-resources.frontend.service.d.ts.map +1 -1
  114. package/dist/esm/core/requests/wildo-http-client-resources.frontend.service.js +57 -4
  115. package/dist/esm/core/requests/wildo-http-client-resources.frontend.service.js.map +1 -1
  116. package/dist/esm/core/resources/ResourceReadCacheBridge.d.ts.map +1 -1
  117. package/dist/esm/core/resources/ResourceReadCacheBridge.js +130 -37
  118. package/dist/esm/core/resources/ResourceReadCacheBridge.js.map +1 -1
  119. package/dist/esm/core/resources/resources.frontend.schemas.d.ts +2 -2
  120. package/dist/esm/core/runtime/start-application.frontend.service.d.ts.map +1 -1
  121. package/dist/esm/core/runtime/start-application.frontend.service.js +17 -9
  122. package/dist/esm/core/runtime/start-application.frontend.service.js.map +1 -1
  123. package/dist/esm/core/security/UserOrgsContext.d.ts.map +1 -1
  124. package/dist/esm/core/security/UserOrgsContext.js +61 -5
  125. package/dist/esm/core/security/UserOrgsContext.js.map +1 -1
  126. package/dist/tsconfig.build.tsbuildinfo +1 -1
  127. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"form-field-file.labels.js","sourceRoot":"","sources":["../../../../../src/components/form/fields/form-field-file.labels.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,SAAS,EAET,uBAAuB,GACxB,MAAM,qCAAqC,CAAC;AAE7C,2EAA2E;AAC3E,6EAA6E;AAC7E,+EAA+E;AAE/E,MAAM,CAAC,MAAM,oBAAoB,GAA0B;IACzD,EAAE,GAAG,EAAE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ACD;QACE,GAAG,EAAE,uBAAuB;QAC5B,IAAI,EAAE,SAAS,CAAC,OAAO;QACvB,OAAO,EAAE,wHAAwH;KAClI;IACD;QACE,GAAG,EAAE,wBAAwB;QAC7B,IAAI,EAAE,SAAS,CAAC,OAAO;QACvB,OAAO,EAAE,mKAAmK;KAC7K;CACF,CAAC;AACF,uBAAuB,CAAC,qBAAqB,CAAC,yBAAyB,EAAE,oBAAoB,CAAC,CAAC","sourcesContent":["import {\n FrontendComponentType,\n LabelKind,\n type LabellingUnitaryDef,\n registerComponentLabels,\n} from '@wildo-ai/presets-components-models';\n\n// Companion-only label metadata for this component: keys + params + (where\n// authored) per-key purpose / kind / variable meaning. Statically scanned by\n// the dev companion; NOT imported at runtime, so it never ships in the bundle.\n\nexport const FormFieldFile_Labels: LabellingUnitaryDef[] = [\n { ref: 'choose_file', kind: LabelKind.BUTTON, purpose: 'Primary button that opens the file picker to select a file to upload' },\n { ref: 'replace', kind: LabelKind.BUTTON, purpose: 'Button shown when a file already exists, to swap it for a new one' },\n { ref: 'drag_and_drop', kind: LabelKind.LABEL, purpose: 'Drop-zone hint inviting the user to drag a file onto the field' },\n { ref: 'remove', kind: LabelKind.BUTTON, purpose: 'Button/action that clears the currently attached file' },\n {\n ref: 'uploading',\n kind: LabelKind.MESSAGE,\n purpose: 'In-progress status showing how far the current upload has advanced',\n params: [{ key: 'progress', meaning: 'upload completion percentage' }],\n },\n {\n ref: 'max_size',\n kind: LabelKind.MESSAGE,\n purpose: 'Inline hint stating the largest file size the field will accept',\n params: [{ key: 'size', meaning: 'human-readable maximum file size' }],\n },\n { ref: 'min_size', kind: LabelKind.MESSAGE, purpose: 'Inline hint stating that a minimum file size is required' },\n {\n ref: 'file_type_not_allowed',\n kind: LabelKind.MESSAGE,\n purpose: 'Validation error shown when the chosen file has an unaccepted MIME/type',\n params: [{ key: 'accepted', meaning: 'comma-separated list of accepted file types' }],\n },\n {\n ref: 'file_too_large',\n kind: LabelKind.MESSAGE,\n purpose: 'Validation error shown when the chosen file exceeds the maximum size',\n params: [{ key: 'max', meaning: 'human-readable maximum allowed file size' }],\n },\n {\n ref: 'file_too_small',\n kind: LabelKind.MESSAGE,\n purpose: 'Validation error shown when the chosen file is below the minimum size',\n params: [{ key: 'min', meaning: 'human-readable minimum allowed file size' }],\n },\n {\n ref: 'upload_failed_with_status',\n kind: LabelKind.MESSAGE,\n purpose: 'Upload error that surfaces the HTTP status code returned by the server',\n params: [{ key: 'status', meaning: 'HTTP status code returned by the upload request' }],\n },\n { ref: 'upload_failed', kind: LabelKind.MESSAGE, purpose: 'Generic upload error shown when a file could not be uploaded' },\n { ref: 'invalid_server_response', kind: LabelKind.MESSAGE, purpose: 'Error shown when the upload endpoint returns a malformed or unexpected response' },\n { ref: 'add_more', kind: LabelKind.BUTTON, purpose: 'Compact-mode button to append another file in a multi-file field' },\n { ref: 'cancel', kind: LabelKind.ARIA, purpose: 'Accessible label/tooltip for the control that aborts an in-progress upload' },\n {\n ref: 'too_many_files',\n kind: LabelKind.MESSAGE,\n purpose: 'Validation error shown when more files are selected than the field permits',\n params: [{ key: 'max', meaning: 'maximum number of files allowed' }],\n },\n {\n ref: 'some_uploads_failed',\n kind: LabelKind.MESSAGE,\n purpose: 'Summary error shown when only part of a multi-file batch uploaded successfully',\n params: [\n { key: 'failed', meaning: 'number of files that failed to upload' },\n { key: 'total', meaning: 'total number of files in the batch' },\n ],\n },\n { ref: 'uploading_indeterminate', kind: LabelKind.MESSAGE, purpose: 'In-progress status shown while uploading when no percentage is available' },\n {\n ref: 'constraint_accepted_types',\n kind: LabelKind.MESSAGE,\n purpose: 'Hint listing which file types the field accepts',\n params: [{ key: 'types', meaning: 'comma-separated list of accepted file types' }],\n },\n {\n ref: 'constraint_max_size',\n kind: LabelKind.MESSAGE,\n purpose: 'Hint stating the maximum allowed file size constraint',\n params: [{ key: 'max', meaning: 'human-readable maximum file size' }],\n },\n {\n ref: 'constraint_min_size',\n kind: LabelKind.MESSAGE,\n purpose: 'Hint stating the minimum required file size constraint',\n params: [{ key: 'min', meaning: 'human-readable minimum file size' }],\n },\n {\n ref: 'constraint_size_range',\n kind: LabelKind.MESSAGE,\n purpose: 'Hint stating the allowed file-size range when both a minimum and maximum apply',\n params: [\n { key: 'min', meaning: 'human-readable minimum file size' },\n { key: 'max', meaning: 'human-readable maximum file size' },\n ],\n },\n {\n ref: 'constraint_image_dimensions',\n kind: LabelKind.MESSAGE,\n purpose: 'Hint stating the exact pixel dimensions an uploaded image must have',\n params: [\n { key: 'width', meaning: 'required image width in pixels' },\n { key: 'height', meaning: 'required image height in pixels' },\n ],\n },\n {\n ref: 'constraint_image_max_dimensions',\n kind: LabelKind.MESSAGE,\n purpose: 'Hint stating the maximum pixel dimensions an uploaded image may have',\n params: [\n { key: 'width', meaning: 'maximum image width in pixels' },\n { key: 'height', meaning: 'maximum image height in pixels' },\n ],\n },\n {\n ref: 'constraint_image_aspect_ratio',\n kind: LabelKind.MESSAGE,\n purpose: 'Hint stating the aspect ratio an uploaded image must conform to',\n params: [\n { key: 'width', meaning: 'aspect-ratio width component' },\n { key: 'height', meaning: 'aspect-ratio height component' },\n ],\n },\n {\n ref: 'constraint_video_max_duration',\n kind: LabelKind.MESSAGE,\n purpose: 'Hint stating the maximum playback duration allowed for an uploaded video',\n params: [{ key: 'duration', meaning: 'human-readable maximum video duration' }],\n },\n {\n ref: 'constraint_audio_max_duration',\n kind: LabelKind.MESSAGE,\n purpose: 'Hint stating the maximum playback duration allowed for an uploaded audio file',\n params: [{ key: 'duration', meaning: 'human-readable maximum audio duration' }],\n },\n {\n ref: 'constraint_document_max_pages',\n kind: LabelKind.MESSAGE,\n purpose: 'Hint stating the maximum page count allowed for an uploaded document',\n params: [{ key: 'pages', meaning: 'maximum number of document pages allowed' }],\n },\n {\n ref: 'constraint_max_files',\n kind: LabelKind.MESSAGE,\n purpose: 'Hint stating the maximum number of files that may be attached',\n params: [{ key: 'max', meaning: 'maximum number of files allowed' }],\n },\n {\n ref: 'provider_selection_not_supported',\n kind: LabelKind.MESSAGE,\n purpose:\n 'Error shown when a connected service returned a file the application cannot fetch on the user\\u2019s behalf, so the file was not attached. Written for the person picking the file, who did nothing wrong \\u2014 it must not read as their mistake, and must not name an internal delivery mode.',\n },\n {\n ref: 'provider_fetch_failed',\n kind: LabelKind.MESSAGE,\n purpose: 'Error shown when a file chosen from a connected service could not be downloaded by the browser, so it was not attached',\n },\n {\n ref: 'provider_picker_failed',\n kind: LabelKind.MESSAGE,\n purpose: 'Error shown when a connected service\\u2019s file picker could not run at all \\u2014 it failed to load, a permission was refused, or the service returned an error',\n },\n];\nregisterComponentLabels(FrontendComponentType.LOW_LEVEL_FORM_FIELD_FILE, FormFieldFile_Labels);\n"]}
1
+ {"version":3,"file":"form-field-file.labels.js","sourceRoot":"","sources":["../../../../../src/components/form/fields/form-field-file.labels.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,SAAS,EAET,uBAAuB,GACxB,MAAM,qCAAqC,CAAC;AAE7C,2EAA2E;AAC3E,6EAA6E;AAC7E,+EAA+E;AAE/E,MAAM,CAAC,MAAM,oBAAoB,GAA0B;IACzD,EAAE,GAAG,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,sEAAsE,EAAE;IAC/H,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,mEAAmE,EAAE;IACxH,EAAE,GAAG,EAAE,eAAe,EAAE,IAAI,EAAE,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,gEAAgE,EAAE;IAC1H,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,uDAAuD,EAAE;IAC3G;QACE,GAAG,EAAE,WAAW;QAChB,IAAI,EAAE,SAAS,CAAC,OAAO;QACvB,OAAO,EAAE,oEAAoE;QAC7E,MAAM,EAAE,CAAC,EAAE,GAAG,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,EAAE,GAAG,EAAE,UAAU,EAAE,OAAO,EAAE,uCAAuC,EAAE,CAAC;KAChF;IACD;QACE,GAAG,EAAE,+BAA+B;QACpC,IAAI,EAAE,SAAS,CAAC,OAAO;QACvB,OAAO,EAAE,+EAA+E;QACxF,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,OAAO,EAAE,uCAAuC,EAAE,CAAC;KAChF;IACD;QACE,GAAG,EAAE,+BAA+B;QACpC,IAAI,EAAE,SAAS,CAAC,OAAO;QACvB,OAAO,EAAE,sEAAsE;QAC/E,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,0CAA0C,EAAE,CAAC;KAChF;IACD;QACE,GAAG,EAAE,sBAAsB;QAC3B,IAAI,EAAE,SAAS,CAAC,OAAO;QACvB,OAAO,EAAE,+DAA+D;QACxE,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,iCAAiC,EAAE,CAAC;KACrE;IACD;QACE,GAAG,EAAE,sBAAsB;QAC3B,IAAI,EAAE,SAAS,CAAC,OAAO;QACvB,OAAO,EACL,+XAA+X;KAClY;IACD;QACE,GAAG,EAAE,uBAAuB;QAC5B,IAAI,EAAE,SAAS,CAAC,OAAO;QACvB,OAAO,EAAE,wHAAwH;KAClI;IACD;QACE,GAAG,EAAE,wBAAwB;QAC7B,IAAI,EAAE,SAAS,CAAC,OAAO;QACvB,OAAO,EAAE,mKAAmK;KAC7K;CACF,CAAC;AACF,uBAAuB,CAAC,qBAAqB,CAAC,yBAAyB,EAAE,oBAAoB,CAAC,CAAC","sourcesContent":["import {\n FrontendComponentType,\n LabelKind,\n type LabellingUnitaryDef,\n registerComponentLabels,\n} from '@wildo-ai/presets-components-models';\n\n// Companion-only label metadata for this component: keys + params + (where\n// authored) per-key purpose / kind / variable meaning. Statically scanned by\n// the dev companion; NOT imported at runtime, so it never ships in the bundle.\n\nexport const FormFieldFile_Labels: LabellingUnitaryDef[] = [\n { ref: 'choose_file', kind: LabelKind.BUTTON, purpose: 'Primary button that opens the file picker to select a file to upload' },\n { ref: 'replace', kind: LabelKind.BUTTON, purpose: 'Button shown when a file already exists, to swap it for a new one' },\n { ref: 'drag_and_drop', kind: LabelKind.LABEL, purpose: 'Drop-zone hint inviting the user to drag a file onto the field' },\n { ref: 'remove', kind: LabelKind.BUTTON, purpose: 'Button/action that clears the currently attached file' },\n {\n ref: 'uploading',\n kind: LabelKind.MESSAGE,\n purpose: 'In-progress status showing how far the current upload has advanced',\n params: [{ key: 'progress', meaning: 'upload completion percentage' }],\n },\n {\n ref: 'max_size',\n kind: LabelKind.MESSAGE,\n purpose: 'Inline hint stating the largest file size the field will accept',\n params: [{ key: 'size', meaning: 'human-readable maximum file size' }],\n },\n { ref: 'min_size', kind: LabelKind.MESSAGE, purpose: 'Inline hint stating that a minimum file size is required' },\n {\n ref: 'file_type_not_allowed',\n kind: LabelKind.MESSAGE,\n purpose: 'Validation error shown when the chosen file has an unaccepted MIME/type',\n params: [{ key: 'accepted', meaning: 'comma-separated list of accepted file types' }],\n },\n {\n ref: 'file_too_large',\n kind: LabelKind.MESSAGE,\n purpose: 'Validation error shown when the chosen file exceeds the maximum size',\n params: [{ key: 'max', meaning: 'human-readable maximum allowed file size' }],\n },\n {\n ref: 'file_too_small',\n kind: LabelKind.MESSAGE,\n purpose: 'Validation error shown when the chosen file is below the minimum size',\n params: [{ key: 'min', meaning: 'human-readable minimum allowed file size' }],\n },\n {\n ref: 'upload_failed_with_status',\n kind: LabelKind.MESSAGE,\n purpose: 'Upload error that surfaces the HTTP status code returned by the server',\n params: [{ key: 'status', meaning: 'HTTP status code returned by the upload request' }],\n },\n { ref: 'upload_failed', kind: LabelKind.MESSAGE, purpose: 'Generic upload error shown when a file could not be uploaded' },\n { ref: 'invalid_server_response', kind: LabelKind.MESSAGE, purpose: 'Error shown when the upload endpoint returns a malformed or unexpected response' },\n { ref: 'add_more', kind: LabelKind.BUTTON, purpose: 'Compact-mode button to append another file in a multi-file field' },\n { ref: 'cancel', kind: LabelKind.ARIA, purpose: 'Accessible label/tooltip for the control that aborts an in-progress upload' },\n {\n ref: 'too_many_files',\n kind: LabelKind.MESSAGE,\n purpose: 'Validation error shown when more files are selected than the field permits',\n params: [{ key: 'max', meaning: 'maximum number of files allowed' }],\n },\n {\n ref: 'some_uploads_failed',\n kind: LabelKind.MESSAGE,\n purpose: 'Summary error shown when only part of a multi-file batch uploaded successfully',\n params: [\n { key: 'failed', meaning: 'number of files that failed to upload' },\n { key: 'total', meaning: 'total number of files in the batch' },\n ],\n },\n { ref: 'uploading_indeterminate', kind: LabelKind.MESSAGE, purpose: 'In-progress status shown while uploading when no percentage is available' },\n {\n ref: 'constraint_accepted_types',\n kind: LabelKind.MESSAGE,\n purpose: 'Hint listing which file types the field accepts',\n params: [{ key: 'types', meaning: 'comma-separated list of accepted file types' }],\n },\n {\n ref: 'constraint_max_size',\n kind: LabelKind.MESSAGE,\n purpose: 'Hint stating the maximum allowed file size constraint',\n params: [{ key: 'max', meaning: 'human-readable maximum file size' }],\n },\n {\n ref: 'constraint_min_size',\n kind: LabelKind.MESSAGE,\n purpose: 'Hint stating the minimum required file size constraint',\n params: [{ key: 'min', meaning: 'human-readable minimum file size' }],\n },\n {\n ref: 'constraint_size_range',\n kind: LabelKind.MESSAGE,\n purpose: 'Hint stating the allowed file-size range when both a minimum and maximum apply',\n params: [\n { key: 'min', meaning: 'human-readable minimum file size' },\n { key: 'max', meaning: 'human-readable maximum file size' },\n ],\n },\n {\n ref: 'constraint_image_dimensions',\n kind: LabelKind.MESSAGE,\n purpose: 'Hint stating the exact pixel dimensions an uploaded image must have',\n params: [\n { key: 'width', meaning: 'required image width in pixels' },\n { key: 'height', meaning: 'required image height in pixels' },\n ],\n },\n {\n ref: 'constraint_image_max_dimensions',\n kind: LabelKind.MESSAGE,\n purpose: 'Hint stating the maximum pixel dimensions an uploaded image may have',\n params: [\n { key: 'width', meaning: 'maximum image width in pixels' },\n { key: 'height', meaning: 'maximum image height in pixels' },\n ],\n },\n {\n ref: 'constraint_image_aspect_ratio',\n kind: LabelKind.MESSAGE,\n purpose: 'Hint stating the aspect ratio an uploaded image must conform to',\n params: [\n { key: 'width', meaning: 'aspect-ratio width component' },\n { key: 'height', meaning: 'aspect-ratio height component' },\n ],\n },\n {\n ref: 'constraint_video_max_duration',\n kind: LabelKind.MESSAGE,\n purpose: 'Hint stating the maximum playback duration allowed for an uploaded video',\n params: [{ key: 'duration', meaning: 'human-readable maximum video duration' }],\n },\n {\n ref: 'constraint_audio_max_duration',\n kind: LabelKind.MESSAGE,\n purpose: 'Hint stating the maximum playback duration allowed for an uploaded audio file',\n params: [{ key: 'duration', meaning: 'human-readable maximum audio duration' }],\n },\n {\n ref: 'constraint_document_max_pages',\n kind: LabelKind.MESSAGE,\n purpose: 'Hint stating the maximum page count allowed for an uploaded document',\n params: [{ key: 'pages', meaning: 'maximum number of document pages allowed' }],\n },\n {\n ref: 'constraint_max_files',\n kind: LabelKind.MESSAGE,\n purpose: 'Hint stating the maximum number of files that may be attached',\n params: [{ key: 'max', meaning: 'maximum number of files allowed' }],\n },\n {\n ref: 'provider_link_failed',\n kind: LabelKind.MESSAGE,\n purpose:\n 'Error shown when a file chosen from a connected service could not be linked to this field \\u2014 the service did not confirm the file, the connection to that service is gone, or the file does not meet the field\\u2019s constraints \\u2014 so it was not attached. Written for the person picking the file; it must not read as their mistake, and must not name an internal delivery mode.',\n },\n {\n ref: 'provider_fetch_failed',\n kind: LabelKind.MESSAGE,\n purpose: 'Error shown when a file chosen from a connected service could not be downloaded by the browser, so it was not attached',\n },\n {\n ref: 'provider_picker_failed',\n kind: LabelKind.MESSAGE,\n purpose: 'Error shown when a connected service\\u2019s file picker could not run at all \\u2014 it failed to load, a permission was refused, or the service returned an error',\n },\n];\nregisterComponentLabels(FrontendComponentType.LOW_LEVEL_FORM_FIELD_FILE, FormFieldFile_Labels);\n"]}
@@ -1,6 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import type { ControlSize } from '@wildo-ai/presets-components-models';
3
3
  import { ValidationMode, type FileMetadata } from '@wildo-ai/zod-decorators';
4
+ import type { FileRemoteReferenceLinkRequest } from '@wildo-ai/saas-models';
4
5
  export { ValidationMode };
5
6
  export interface FieldOption<T extends string | number = string, TData = unknown> {
6
7
  value: T;
@@ -36,6 +37,25 @@ export interface FileHttpOperations {
36
37
  fileId: string;
37
38
  metadata?: FileMetadata;
38
39
  }>;
40
+ /**
41
+ * Link a file that STAYS at a connected service into the field (#394 P5) — a
42
+ * picker's `REMOTE_REFERENCE`. Same URL as `upload`, a JSON body instead of a
43
+ * `file` part; the backend verifies the reference at the vendor as the caller
44
+ * and creates the row in the vendor's storage. Same result shape as `upload`,
45
+ * because to the field a linked file and an uploaded one are one thing: a
46
+ * fileId it now holds.
47
+ *
48
+ * Required, not optional: a host that injects only metadata operations would
49
+ * otherwise leave a REMOTE_REFERENCE picker offered and un-linkable, which is
50
+ * the silent half-capability this control refuses to represent.
51
+ *
52
+ * @param url - The field's upload endpoint URL
53
+ * @param body - `{ remoteReference: { providerRef, externalId, ... } }`
54
+ */
55
+ linkRemoteReference: (url: string, body: FileRemoteReferenceLinkRequest) => Promise<{
56
+ fileId: string;
57
+ metadata?: FileMetadata;
58
+ }>;
39
59
  /**
40
60
  * Authenticated GET request (for metadata, download URLs, etc.).
41
61
  * @param url - Full request URL
@@ -1 +1 @@
1
- {"version":3,"file":"form-field-types.d.ts","sourceRoot":"","sources":["../../../../src/components/form/form-field-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7E,OAAO,EAAE,cAAc,EAAE,CAAC;AAE1B,MAAM,WAAW,WAAW,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,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,CAAC;IAClC,2DAA2D;IAC3D,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,uEAAuE;IACvE,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC"}
1
+ {"version":3,"file":"form-field-types.d.ts","sourceRoot":"","sources":["../../../../src/components/form/form-field-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AAE5E,OAAO,EAAE,cAAc,EAAE,CAAC;AAE1B,MAAM,WAAW,WAAW,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,KAAK,GAAG,OAAO;IAC9E,KAAK,EAAE,CAAC,CAAC;IACT,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qFAAqF;IACrF,IAAI,CAAC,EAAE,KAAK,CAAC;CACd;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;;;;;OAQG;IACH,MAAM,EAAE,CACN,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,QAAQ,EAClB,OAAO,CAAC,EAAE;QACR,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;QACvC,MAAM,CAAC,EAAE,WAAW,CAAC;KACtB,KACE,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,YAAY,CAAA;KAAE,CAAC,CAAC;IAE1D;;;;;;;;;;;;;;OAcG;IACH,mBAAmB,EAAE,CACnB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,8BAA8B,KACjC,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;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AAC,OAAO,CAAC,KAAK,IAAI,CAAC;IAC7C,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAChC,cAAc,CAAC,EAAE,cAAc,CAAC;IAEhC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB,CAAC,OAAO,SAAS,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,UAAU;IAChF,kEAAkE;IAClE,MAAM,EAAE,OAAO,CAAC;IAChB,2BAA2B;IAC3B,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3C,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kEAAkE;IAClE,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,8EAA8E;IAC9E,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,2DAA2D;IAC3D,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,uEAAuE;IACvE,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC"}
@@ -1 +1 @@
1
- {"version":3,"file":"form-field-types.js","sourceRoot":"","sources":["../../../../src/components/form/form-field-types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAqB,MAAM,0BAA0B,CAAC;AAE7E,OAAO,EAAE,cAAc,EAAE,CAAC;AAkE1B;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAN,IAAY,cAKX;AALD,WAAY,cAAc;IACxB,iFAAiF;IACjF,6CAA2B,CAAA;IAC3B,mGAAmG;IACnG,6CAA2B,CAAA;AAC7B,CAAC,EALW,cAAc,KAAd,cAAc,QAKzB;AAED,MAAM,CAAN,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC5B,mCAAa,CAAA;IACb,uCAAiB,CAAA;IACjB,qCAAe,CAAA;IACf,qCAAe,CAAA;AACjB,CAAC,EALW,kBAAkB,KAAlB,kBAAkB,QAK7B","sourcesContent":["import { z } from 'zod';\nimport type { ControlSize } from '@wildo-ai/presets-components-models';\nimport { ValidationMode, type FileMetadata } from '@wildo-ai/zod-decorators';\n\nexport { ValidationMode };\n\nexport interface FieldOption<T extends string | number = string, TData = unknown> {\n value: T;\n label: string;\n disabled?: boolean;\n /** Arbitrary payload for rich rendering (resource objects, icons, metadata, etc.) */\n data?: TData;\n}\n\n/**\n * HTTP operations for file management.\n *\n * Injected from the engine layer (saas-frontend-lib) to maintain separation\n * of concerns — presets-components should not depend on the HTTP client directly.\n *\n * The engine layer implements this using WildoBackendHttpClient, which\n * provides authentication (JWT Bearer token), retry logic, error handling,\n * and network queue management automatically.\n */\nexport interface FileHttpOperations {\n /**\n * Upload a file with progress tracking.\n * Auth headers are added automatically by the underlying HTTP client.\n *\n * @param url - Upload endpoint URL\n * @param formData - FormData with 'file' field and optional 'fileId' for overrides\n * @param options - Progress callback and abort signal\n * @returns Upload result with fileId and optional metadata\n */\n upload: (\n url: string,\n formData: FormData,\n options?: {\n onProgress?: (percent: number) => void;\n signal?: AbortSignal;\n }\n ) => Promise<{ fileId: string; metadata?: FileMetadata }>;\n\n /**\n * Authenticated GET request (for metadata, download URLs, etc.).\n * @param url - Full request URL\n * @returns Parsed JSON response\n */\n get: <T = any>(url: string) => Promise<T>;\n\n /**\n * Authenticated GET request that returns the raw file BYTES as a Blob.\n *\n * The transport for inline previews: an `<img>` / PDF.js cannot attach the bearer,\n * so components fetch the bytes here (auth added by the client; the backend serve\n * route authorizes via the linked resource's READ) and wrap the Blob in an object\n * URL. Optional for backwards-compat with hosts that only inject metadata ops.\n *\n * @param url - Full serve URL (already includes the fileId).\n * @param options.signal - Abort signal to cancel on unmount.\n */\n getBlob?: (url: string, options?: { signal?: AbortSignal }) => Promise<Blob>;\n\n /**\n * Authenticated DELETE request (for file deletion).\n * @param url - Full request URL\n */\n delete: (url: string) => Promise<void>;\n}\n\n/**\n * WHICH schema a form is validating against.\n *\n * This is not bookkeeping — it decides the answer to \"may this field be cleared?\", and the two\n * kinds answer it differently and cannot be told apart by shape:\n *\n * - On a **request DTO**, PATCH semantics have already made every field optional, so a required\n * field is structurally identical to an optional one. Clearability is therefore exactly \"does it\n * accept `null`\", which `toPatchOptionalField` granted only to the clearable fields.\n * - On a **main schema**, an ordinary `.optional()` field does NOT accept `null`, so that same\n * question answers \"no\" for every field that is in fact clearable.\n *\n * Asking the wrong one is silent and field-shape dependent: an inline-edit surface builds its form\n * from the MAIN schema, and asking the request-DTO question there left refined optional fields\n * (colour, email, url) unclearable while plain optional strings still worked by accident.\n */\nexport enum FormSchemaKind {\n /** An operation's UPDATE/CREATE request DTO — the default for resource forms. */\n REQUEST_DTO = 'request-dto',\n /** A resource's main schema, used by surfaces that build a form around a single declared field. */\n MAIN_SCHEMA = 'main-schema',\n}\n\nexport enum AutosaveFieldState {\n IDLE = 'idle',\n SAVING = 'saving',\n SAVED = 'saved',\n ERROR = 'error',\n}\n\n/**\n * Base props for bare control components (presets).\n * Does NOT include chrome props (label, description, error) or autosave props —\n * those are handled externally by FormFieldChrome.\n *\n * All preset form-field components should extend this interface\n * (or an Omit of it for type-specific value/onChange overrides).\n */\nexport interface ControlBaseProps<TSchema extends z.ZodTypeAny = z.ZodTypeAny> {\n schema: TSchema;\n /**\n * Whether \"clear this field\" is a meaningful instruction here, RESOLVED by the form.\n *\n * A control must not re-derive this from `schema`: the answer depends on which KIND of schema\n * the surrounding form validates (see {@link FormSchemaKind}), and the two are indistinguishable\n * by shape. A control that asks the wrong question substitutes a value the user never entered —\n * a stepper coercing an emptied box to `min`, a money input to zero, a toggle refusing to\n * deselect.\n *\n * Absent (standalone control usage outside a form) means \"not clearable\", the conservative\n * direction: the control keeps its existing substitution behaviour.\n */\n clearable?: boolean;\n name: string;\n disabled?: boolean;\n readOnly?: boolean;\n /**\n * When true, the field receives focus on mount.\n * Can be set via schema decorator or passed directly.\n * Only applicable to focusable controls (input, textarea, select).\n */\n autoFocus?: boolean;\n /** Resolved control density from explicit form props or surface policy. */\n controlSize?: ControlSize;\n className?: string;\n value?: z.infer<TSchema>;\n onChange?: (value: z.infer<TSchema>) => void;\n onBlur?: () => void;\n defaultValue?: z.infer<TSchema>;\n validationMode?: ValidationMode;\n\n /**\n * Whether this field is effectively required.\n * Computed by FormField based on schema optionality AND visibility.\n * Hidden fields (due to discriminator mismatch) return false even if required in schema.\n */\n required?: boolean;\n}\n\n/**\n * Base props for all display field components.\n * These are read-only display components that show values without editing capability.\n */\nexport interface DisplayFieldBaseProps<TSchema extends z.ZodTypeAny = z.ZodTypeAny> {\n /** The Zod schema used for display policy and type information */\n schema: TSchema;\n /** The value to display */\n value: z.infer<TSchema> | null | undefined;\n /** Field label to display above the value */\n label?: string;\n /** Field description to display below the value */\n description?: string;\n /** Additional CSS class names */\n className?: string;\n /** Force display of label even if showLabel in schema is false */\n forceDisplayLabel?: boolean;\n /** Force display of description even if showDescription in schema is false */\n forceDisplayDescription?: boolean;\n /** Force hide label even if showLabel in schema is true */\n forceHideLabel?: boolean;\n /** Force hide description even if showDescription in schema is true */\n forceHideDescription?: boolean;\n}\n"]}
1
+ {"version":3,"file":"form-field-types.js","sourceRoot":"","sources":["../../../../src/components/form/form-field-types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAqB,MAAM,0BAA0B,CAAC;AAG7E,OAAO,EAAE,cAAc,EAAE,CAAC;AAsF1B;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAN,IAAY,cAKX;AALD,WAAY,cAAc;IACxB,iFAAiF;IACjF,6CAA2B,CAAA;IAC3B,mGAAmG;IACnG,6CAA2B,CAAA;AAC7B,CAAC,EALW,cAAc,KAAd,cAAc,QAKzB;AAED,MAAM,CAAN,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC5B,mCAAa,CAAA;IACb,uCAAiB,CAAA;IACjB,qCAAe,CAAA;IACf,qCAAe,CAAA;AACjB,CAAC,EALW,kBAAkB,KAAlB,kBAAkB,QAK7B","sourcesContent":["import { z } from 'zod';\nimport type { ControlSize } from '@wildo-ai/presets-components-models';\nimport { ValidationMode, type FileMetadata } from '@wildo-ai/zod-decorators';\nimport type { FileRemoteReferenceLinkRequest } from '@wildo-ai/saas-models';\n\nexport { ValidationMode };\n\nexport interface FieldOption<T extends string | number = string, TData = unknown> {\n value: T;\n label: string;\n disabled?: boolean;\n /** Arbitrary payload for rich rendering (resource objects, icons, metadata, etc.) */\n data?: TData;\n}\n\n/**\n * HTTP operations for file management.\n *\n * Injected from the engine layer (saas-frontend-lib) to maintain separation\n * of concerns — presets-components should not depend on the HTTP client directly.\n *\n * The engine layer implements this using WildoBackendHttpClient, which\n * provides authentication (JWT Bearer token), retry logic, error handling,\n * and network queue management automatically.\n */\nexport interface FileHttpOperations {\n /**\n * Upload a file with progress tracking.\n * Auth headers are added automatically by the underlying HTTP client.\n *\n * @param url - Upload endpoint URL\n * @param formData - FormData with 'file' field and optional 'fileId' for overrides\n * @param options - Progress callback and abort signal\n * @returns Upload result with fileId and optional metadata\n */\n upload: (\n url: string,\n formData: FormData,\n options?: {\n onProgress?: (percent: number) => void;\n signal?: AbortSignal;\n }\n ) => Promise<{ fileId: string; metadata?: FileMetadata }>;\n\n /**\n * Link a file that STAYS at a connected service into the field (#394 P5) — a\n * picker's `REMOTE_REFERENCE`. Same URL as `upload`, a JSON body instead of a\n * `file` part; the backend verifies the reference at the vendor as the caller\n * and creates the row in the vendor's storage. Same result shape as `upload`,\n * because to the field a linked file and an uploaded one are one thing: a\n * fileId it now holds.\n *\n * Required, not optional: a host that injects only metadata operations would\n * otherwise leave a REMOTE_REFERENCE picker offered and un-linkable, which is\n * the silent half-capability this control refuses to represent.\n *\n * @param url - The field's upload endpoint URL\n * @param body - `{ remoteReference: { providerRef, externalId, ... } }`\n */\n linkRemoteReference: (\n url: string,\n body: FileRemoteReferenceLinkRequest,\n ) => Promise<{ fileId: string; metadata?: FileMetadata }>;\n\n /**\n * Authenticated GET request (for metadata, download URLs, etc.).\n * @param url - Full request URL\n * @returns Parsed JSON response\n */\n get: <T = any>(url: string) => Promise<T>;\n\n /**\n * Authenticated GET request that returns the raw file BYTES as a Blob.\n *\n * The transport for inline previews: an `<img>` / PDF.js cannot attach the bearer,\n * so components fetch the bytes here (auth added by the client; the backend serve\n * route authorizes via the linked resource's READ) and wrap the Blob in an object\n * URL. Optional for backwards-compat with hosts that only inject metadata ops.\n *\n * @param url - Full serve URL (already includes the fileId).\n * @param options.signal - Abort signal to cancel on unmount.\n */\n getBlob?: (url: string, options?: { signal?: AbortSignal }) => Promise<Blob>;\n\n /**\n * Authenticated DELETE request (for file deletion).\n * @param url - Full request URL\n */\n delete: (url: string) => Promise<void>;\n}\n\n/**\n * WHICH schema a form is validating against.\n *\n * This is not bookkeeping — it decides the answer to \"may this field be cleared?\", and the two\n * kinds answer it differently and cannot be told apart by shape:\n *\n * - On a **request DTO**, PATCH semantics have already made every field optional, so a required\n * field is structurally identical to an optional one. Clearability is therefore exactly \"does it\n * accept `null`\", which `toPatchOptionalField` granted only to the clearable fields.\n * - On a **main schema**, an ordinary `.optional()` field does NOT accept `null`, so that same\n * question answers \"no\" for every field that is in fact clearable.\n *\n * Asking the wrong one is silent and field-shape dependent: an inline-edit surface builds its form\n * from the MAIN schema, and asking the request-DTO question there left refined optional fields\n * (colour, email, url) unclearable while plain optional strings still worked by accident.\n */\nexport enum FormSchemaKind {\n /** An operation's UPDATE/CREATE request DTO — the default for resource forms. */\n REQUEST_DTO = 'request-dto',\n /** A resource's main schema, used by surfaces that build a form around a single declared field. */\n MAIN_SCHEMA = 'main-schema',\n}\n\nexport enum AutosaveFieldState {\n IDLE = 'idle',\n SAVING = 'saving',\n SAVED = 'saved',\n ERROR = 'error',\n}\n\n/**\n * Base props for bare control components (presets).\n * Does NOT include chrome props (label, description, error) or autosave props —\n * those are handled externally by FormFieldChrome.\n *\n * All preset form-field components should extend this interface\n * (or an Omit of it for type-specific value/onChange overrides).\n */\nexport interface ControlBaseProps<TSchema extends z.ZodTypeAny = z.ZodTypeAny> {\n schema: TSchema;\n /**\n * Whether \"clear this field\" is a meaningful instruction here, RESOLVED by the form.\n *\n * A control must not re-derive this from `schema`: the answer depends on which KIND of schema\n * the surrounding form validates (see {@link FormSchemaKind}), and the two are indistinguishable\n * by shape. A control that asks the wrong question substitutes a value the user never entered —\n * a stepper coercing an emptied box to `min`, a money input to zero, a toggle refusing to\n * deselect.\n *\n * Absent (standalone control usage outside a form) means \"not clearable\", the conservative\n * direction: the control keeps its existing substitution behaviour.\n */\n clearable?: boolean;\n name: string;\n disabled?: boolean;\n readOnly?: boolean;\n /**\n * When true, the field receives focus on mount.\n * Can be set via schema decorator or passed directly.\n * Only applicable to focusable controls (input, textarea, select).\n */\n autoFocus?: boolean;\n /** Resolved control density from explicit form props or surface policy. */\n controlSize?: ControlSize;\n className?: string;\n value?: z.infer<TSchema>;\n onChange?: (value: z.infer<TSchema>) => void;\n onBlur?: () => void;\n defaultValue?: z.infer<TSchema>;\n validationMode?: ValidationMode;\n\n /**\n * Whether this field is effectively required.\n * Computed by FormField based on schema optionality AND visibility.\n * Hidden fields (due to discriminator mismatch) return false even if required in schema.\n */\n required?: boolean;\n}\n\n/**\n * Base props for all display field components.\n * These are read-only display components that show values without editing capability.\n */\nexport interface DisplayFieldBaseProps<TSchema extends z.ZodTypeAny = z.ZodTypeAny> {\n /** The Zod schema used for display policy and type information */\n schema: TSchema;\n /** The value to display */\n value: z.infer<TSchema> | null | undefined;\n /** Field label to display above the value */\n label?: string;\n /** Field description to display below the value */\n description?: string;\n /** Additional CSS class names */\n className?: string;\n /** Force display of label even if showLabel in schema is false */\n forceDisplayLabel?: boolean;\n /** Force display of description even if showDescription in schema is false */\n forceDisplayDescription?: boolean;\n /** Force hide label even if showLabel in schema is true */\n forceHideLabel?: boolean;\n /** Force hide description even if showDescription in schema is true */\n forceHideDescription?: boolean;\n}\n"]}
@@ -19,7 +19,13 @@ import * as React from 'react';
19
19
  export interface NavigationItemBadgeProps {
20
20
  /** A badge KEY (`<scope>:<identifier>`) naming one registered definition. */
21
21
  notificationBadgeRef?: string;
22
- /** Nav item label — used as the indicator's accessible name. */
22
+ /**
23
+ * Nav item label — the indicator's accessible name.
24
+ *
25
+ * Omitted (or empty), the name falls back to the badge KEY, verbatim. A badge definition carries
26
+ * no label of its own, so this really is the only name available; the key is the honest statement
27
+ * that none was supplied, never words invented from one.
28
+ */
23
29
  label?: string;
24
30
  className?: string;
25
31
  }
@@ -1 +1 @@
1
- {"version":3,"file":"NavigationItemBadge.d.ts","sourceRoot":"","sources":["../../../../src/components/navigation/NavigationItemBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,wBAAwB;IACvC,6EAA6E;IAC7E,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,mBAAmB,CAAC,EAClC,oBAAoB,EACpB,KAAK,EACL,SAAS,GACV,EAAE,wBAAwB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CA0BrD;yBA9Be,mBAAmB"}
1
+ {"version":3,"file":"NavigationItemBadge.d.ts","sourceRoot":"","sources":["../../../../src/components/navigation/NavigationItemBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAS9B;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,wBAAwB;IACvC,6EAA6E;IAC7E,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,mBAAmB,CAAC,EAClC,oBAAoB,EACpB,KAAK,EACL,SAAS,GACV,EAAE,wBAAwB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAsDrD;yBA1De,mBAAmB"}
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { notificationBadgeIdentityKey } from '@wildo-ai/saas-models';
3
+ import { unresolvedLabel } from '../../core/i18n/I18nContext.js';
3
4
  import { useResourceRegistry } from '../../core/resources/useResourceRegistry.js';
4
5
  import { useNotificationBadges } from '../../core/requests/websockets/useNotificationBadges.js';
5
6
  import { NotificationIndicator } from '../../components/data-display/notification-indicator.js';
@@ -13,7 +14,34 @@ export function NavigationItemBadge({ notificationBadgeRef, label, className, })
13
14
  return null;
14
15
  }
15
16
  const { count, pulse } = getBadgeState(definition);
16
- return (_jsx(NotificationIndicator, { mode: definition.display.mode, tone: definition.display.tone, count: count, pulse: pulse, label: label ?? definition.identifier, className: className }));
17
+ /*
18
+ * With no nav label, the accessible name is the badge's KEY, rendered as-is.
19
+ *
20
+ * Two things were wrong with the `label ?? definition.identifier` this replaces, and neither is
21
+ * the humanization `check:invented-display-text` looks for — that gate matches string
22
+ * TRANSFORMATIONS, and this performs none, so it could never have fired here (verified against an
23
+ * empty baseline, 2026-09-09). It is the sibling defect
24
+ * `display-text-comes-from-i18n.md` governs: an identity handed to a person as a name.
25
+ *
26
+ * 1. The bare `identifier` is NOT an identity — this file's own header says so, and says it about
27
+ * the LOOKUP one field over: "it used to be matched on the `identifier` alone, which resolved a
28
+ * definition only by luck when two scopes declared one identifier". Two definitions sharing an
29
+ * identifier across scopes therefore announced themselves identically to a screen reader, which
30
+ * is the same ambiguity `notificationBadgeIdentityKey` exists to remove. The lookup was fixed
31
+ * and the name was not.
32
+ * 2. `??` does not catch `''`. A caller passing an empty label got an indicator with an EMPTY
33
+ * accessible name — worse than a key, because there is then nothing at all to notice or grep.
34
+ *
35
+ * A badge definition carries no label of its own (`NotificationBadgeDefinition` has no such
36
+ * field), so there is no i18n key to author here and no gap to make visible: the caller's label is
37
+ * the only name that exists. Rendering the key is the honest statement that none was supplied, and
38
+ * it goes through `unresolvedLabel` rather than being inlined so the convention keeps one home.
39
+ */
40
+ const trimmedLabel = label?.trim();
41
+ const accessibleName = trimmedLabel
42
+ ? label
43
+ : unresolvedLabel(notificationBadgeIdentityKey(definition));
44
+ return (_jsx(NotificationIndicator, { mode: definition.display.mode, tone: definition.display.tone, count: count, pulse: pulse, label: accessibleName, className: className }));
17
45
  }
18
46
  NavigationItemBadge.displayName = 'NavigationItemBadge';
19
47
  //# sourceMappingURL=NavigationItemBadge.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NavigationItemBadge.js","sourceRoot":"","sources":["../../../../src/components/navigation/NavigationItemBadge.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAA;AAEpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wDAAwD,CAAA;AAC5F,OAAO,EAAE,qBAAqB,EAAE,MAAM,oEAAoE,CAAA;AAC1G,OAAO,EAAE,qBAAqB,EAAE,MAAM,oEAAoE,CAAA;AA2B1G,MAAM,UAAU,mBAAmB,CAAC,EAClC,oBAAoB,EACpB,KAAK,EACL,SAAS,GACgB;IACzB,MAAM,EAAE,QAAQ,EAAE,GAAG,mBAAmB,EAAE,CAAA;IAC1C,MAAM,EAAE,aAAa,EAAE,GAAG,qBAAqB,EAAE,CAAA;IAEjD,MAAM,UAAU,GAAG,oBAAoB;QACrC,CAAC,CAAC,QAAQ,CAAC,4BAA4B,CAAC,IAAI,CACxC,CAAC,SAAS,EAAE,EAAE,CAAC,4BAA4B,CAAC,SAAS,CAAC,KAAK,oBAAoB,CAChF;QACH,CAAC,CAAC,SAAS,CAAA;IAEb,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO,IAAI,CAAA;IACb,CAAC;IAED,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,aAAa,CAAC,UAAU,CAAC,CAAA;IAElD,OAAO,CACL,KAAC,qBAAqB,IACpB,IAAI,EAAE,UAAU,CAAC,OAAO,CAAC,IAAI,EAC7B,IAAI,EAAE,UAAU,CAAC,OAAO,CAAC,IAAI,EAC7B,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,IAAI,UAAU,CAAC,UAAU,EACrC,SAAS,EAAE,SAAS,GACpB,CACH,CAAA;AACH,CAAC;AAED,mBAAmB,CAAC,WAAW,GAAG,qBAAqB,CAAA","sourcesContent":["import * as React from 'react'\n\nimport { notificationBadgeIdentityKey } from '@wildo-ai/saas-models'\n\nimport { useResourceRegistry } from '~wildo-frontend-lib/core/resources/useResourceRegistry'\nimport { useNotificationBadges } from '~wildo-frontend-lib/core/requests/websockets/useNotificationBadges'\nimport { NotificationIndicator } from '~wildo-frontend-lib/components/data-display/notification-indicator'\n\n/**\n * Resolves a nav item's typed `notificationBadgeRef` to a live indicator (R7).\n *\n * Looks the ref up in the registry's `notificationBadgeDefinitions` (the resolved\n * definition supplies mode / tone / pulse-trigger), reads the live count + pulse\n * from `useNotificationBadges`, and renders the `NotificationIndicator`. Renders\n * nothing when the ref is absent, unresolved, or the count is not worth showing\n * (the indicator itself suppresses `NONE` / zero).\n *\n * The ref is a badge KEY, `<scope>:<identifier>`, matched with the same\n * `notificationBadgeIdentityKey` the badge store indexes by. It used to be matched on the\n * `identifier` alone, which resolved a definition only by luck when two scopes declared one\n * identifier — the second was unreachable and drew the first's count.\n *\n * Note: each instance subscribes to the badge event stream; a sidebar has few\n * badges so this is fine. Hoist to a shared context if a surface renders many.\n */\nexport interface NavigationItemBadgeProps {\n /** A badge KEY (`<scope>:<identifier>`) naming one registered definition. */\n notificationBadgeRef?: string\n /** Nav item label — used as the indicator's accessible name. */\n label?: string\n className?: string\n}\n\nexport function NavigationItemBadge({\n notificationBadgeRef,\n label,\n className,\n}: NavigationItemBadgeProps): React.JSX.Element | null {\n const { registry } = useResourceRegistry()\n const { getBadgeState } = useNotificationBadges()\n\n const definition = notificationBadgeRef\n ? registry.notificationBadgeDefinitions.find(\n (candidate) => notificationBadgeIdentityKey(candidate) === notificationBadgeRef,\n )\n : undefined\n\n if (!definition) {\n return null\n }\n\n const { count, pulse } = getBadgeState(definition)\n\n return (\n <NotificationIndicator\n mode={definition.display.mode}\n tone={definition.display.tone}\n count={count}\n pulse={pulse}\n label={label ?? definition.identifier}\n className={className}\n />\n )\n}\n\nNavigationItemBadge.displayName = 'NavigationItemBadge'\n"]}
1
+ {"version":3,"file":"NavigationItemBadge.js","sourceRoot":"","sources":["../../../../src/components/navigation/NavigationItemBadge.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAA;AAEpE,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAA;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,wDAAwD,CAAA;AAC5F,OAAO,EAAE,qBAAqB,EAAE,MAAM,oEAAoE,CAAA;AAC1G,OAAO,EAAE,qBAAqB,EAAE,MAAM,oEAAoE,CAAA;AAiC1G,MAAM,UAAU,mBAAmB,CAAC,EAClC,oBAAoB,EACpB,KAAK,EACL,SAAS,GACgB;IACzB,MAAM,EAAE,QAAQ,EAAE,GAAG,mBAAmB,EAAE,CAAA;IAC1C,MAAM,EAAE,aAAa,EAAE,GAAG,qBAAqB,EAAE,CAAA;IAEjD,MAAM,UAAU,GAAG,oBAAoB;QACrC,CAAC,CAAC,QAAQ,CAAC,4BAA4B,CAAC,IAAI,CACxC,CAAC,SAAS,EAAE,EAAE,CAAC,4BAA4B,CAAC,SAAS,CAAC,KAAK,oBAAoB,CAChF;QACH,CAAC,CAAC,SAAS,CAAA;IAEb,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO,IAAI,CAAA;IACb,CAAC;IAED,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,aAAa,CAAC,UAAU,CAAC,CAAA;IAElD;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,MAAM,YAAY,GAAG,KAAK,EAAE,IAAI,EAAE,CAAA;IAClC,MAAM,cAAc,GAAG,YAAY;QACjC,CAAC,CAAC,KAAe;QACjB,CAAC,CAAC,eAAe,CAAC,4BAA4B,CAAC,UAAU,CAAC,CAAC,CAAA;IAE7D,OAAO,CACL,KAAC,qBAAqB,IACpB,IAAI,EAAE,UAAU,CAAC,OAAO,CAAC,IAAI,EAC7B,IAAI,EAAE,UAAU,CAAC,OAAO,CAAC,IAAI,EAC7B,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,cAAc,EACrB,SAAS,EAAE,SAAS,GACpB,CACH,CAAA;AACH,CAAC;AAED,mBAAmB,CAAC,WAAW,GAAG,qBAAqB,CAAA","sourcesContent":["import * as React from 'react'\n\nimport { notificationBadgeIdentityKey } from '@wildo-ai/saas-models'\n\nimport { unresolvedLabel } from '~wildo-frontend-lib/core/i18n/I18nContext'\nimport { useResourceRegistry } from '~wildo-frontend-lib/core/resources/useResourceRegistry'\nimport { useNotificationBadges } from '~wildo-frontend-lib/core/requests/websockets/useNotificationBadges'\nimport { NotificationIndicator } from '~wildo-frontend-lib/components/data-display/notification-indicator'\n\n/**\n * Resolves a nav item's typed `notificationBadgeRef` to a live indicator (R7).\n *\n * Looks the ref up in the registry's `notificationBadgeDefinitions` (the resolved\n * definition supplies mode / tone / pulse-trigger), reads the live count + pulse\n * from `useNotificationBadges`, and renders the `NotificationIndicator`. Renders\n * nothing when the ref is absent, unresolved, or the count is not worth showing\n * (the indicator itself suppresses `NONE` / zero).\n *\n * The ref is a badge KEY, `<scope>:<identifier>`, matched with the same\n * `notificationBadgeIdentityKey` the badge store indexes by. It used to be matched on the\n * `identifier` alone, which resolved a definition only by luck when two scopes declared one\n * identifier — the second was unreachable and drew the first's count.\n *\n * Note: each instance subscribes to the badge event stream; a sidebar has few\n * badges so this is fine. Hoist to a shared context if a surface renders many.\n */\nexport interface NavigationItemBadgeProps {\n /** A badge KEY (`<scope>:<identifier>`) naming one registered definition. */\n notificationBadgeRef?: string\n /**\n * Nav item label — the indicator's accessible name.\n *\n * Omitted (or empty), the name falls back to the badge KEY, verbatim. A badge definition carries\n * no label of its own, so this really is the only name available; the key is the honest statement\n * that none was supplied, never words invented from one.\n */\n label?: string\n className?: string\n}\n\nexport function NavigationItemBadge({\n notificationBadgeRef,\n label,\n className,\n}: NavigationItemBadgeProps): React.JSX.Element | null {\n const { registry } = useResourceRegistry()\n const { getBadgeState } = useNotificationBadges()\n\n const definition = notificationBadgeRef\n ? registry.notificationBadgeDefinitions.find(\n (candidate) => notificationBadgeIdentityKey(candidate) === notificationBadgeRef,\n )\n : undefined\n\n if (!definition) {\n return null\n }\n\n const { count, pulse } = getBadgeState(definition)\n\n /*\n * With no nav label, the accessible name is the badge's KEY, rendered as-is.\n *\n * Two things were wrong with the `label ?? definition.identifier` this replaces, and neither is\n * the humanization `check:invented-display-text` looks for — that gate matches string\n * TRANSFORMATIONS, and this performs none, so it could never have fired here (verified against an\n * empty baseline, 2026-09-09). It is the sibling defect\n * `display-text-comes-from-i18n.md` governs: an identity handed to a person as a name.\n *\n * 1. The bare `identifier` is NOT an identity — this file's own header says so, and says it about\n * the LOOKUP one field over: \"it used to be matched on the `identifier` alone, which resolved a\n * definition only by luck when two scopes declared one identifier\". Two definitions sharing an\n * identifier across scopes therefore announced themselves identically to a screen reader, which\n * is the same ambiguity `notificationBadgeIdentityKey` exists to remove. The lookup was fixed\n * and the name was not.\n * 2. `??` does not catch `''`. A caller passing an empty label got an indicator with an EMPTY\n * accessible name — worse than a key, because there is then nothing at all to notice or grep.\n *\n * A badge definition carries no label of its own (`NotificationBadgeDefinition` has no such\n * field), so there is no i18n key to author here and no gap to make visible: the caller's label is\n * the only name that exists. Rendering the key is the honest statement that none was supplied, and\n * it goes through `unresolvedLabel` rather than being inlined so the convention keeps one home.\n */\n const trimmedLabel = label?.trim()\n const accessibleName = trimmedLabel\n ? label as string\n : unresolvedLabel(notificationBadgeIdentityKey(definition))\n\n return (\n <NotificationIndicator\n mode={definition.display.mode}\n tone={definition.display.tone}\n count={count}\n pulse={pulse}\n label={accessibleName}\n className={className}\n />\n )\n}\n\nNavigationItemBadge.displayName = 'NavigationItemBadge'\n"]}
@@ -90,7 +90,7 @@ export declare function MenubarSeparator({ preset, ...props }: MenubarSeparatorP
90
90
  export declare function MenubarShortcut({ preset, ...props }: MenubarShortcutProps & ComponentPresetProps): React.JSX.Element;
91
91
  export declare function MenubarSub({ preset, ...props }: MenubarSubProps & ComponentPresetProps): React.JSX.Element;
92
92
  export declare function MenubarSubTrigger({ preset, ...props }: MenubarSubTriggerProps & ComponentPresetProps): React.JSX.Element;
93
- export declare const MenubarSubContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & Pick<FloatingMenuContentBaseProps, "loop" | "sideOffset" | "alignOffset" | "avoidCollisions" | "collisionPadding" | "arrowPadding"> & {
93
+ export declare const MenubarSubContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & Pick<FloatingMenuContentBaseProps, "sideOffset" | "alignOffset" | "avoidCollisions" | "collisionPadding" | "arrowPadding" | "loop"> & {
94
94
  asChild?: boolean;
95
95
  forceMount?: boolean;
96
96
  onEscapeKeyDown?: (event: KeyboardEvent) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"OverlayContainer.d.ts","sourceRoot":"","sources":["../../../../../src/components/overlays/containers/OverlayContainer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAiD,MAAM,OAAO,CAAC;AAEtE,OAAO,KAAK,EAAE,wBAAwB,EA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,CAAC,eAAe,CAAC,CAAC;CAC3C;AAMD,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA0Q5D,CAAC;AAibF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"OverlayContainer.d.ts","sourceRoot":"","sources":["../../../../../src/components/overlays/containers/OverlayContainer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAiD,MAAM,OAAO,CAAC;AAEtE,OAAO,KAAK,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAqB5G,MAAM,WAAW,qBAAqB;IACpC,oDAAoD;IACpD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,uCAAuC;IACvC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,6CAA6C;IAC7C,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,kCAAkC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2CAA2C;IAC3C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,2CAA2C;IAC3C,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,oCAAoC;IACpC,MAAM,EAAE,sBAAsB,CAAC;IAC/B,+DAA+D;IAC/D,qBAAqB,CAAC,EAAE,wBAAwB,CAAC;IACjD,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB,wCAAwC;IACxC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yCAAyC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oDAAoD;IACpD,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IAGtB,oCAAoC;IACpC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,qCAAqC;IACrC,YAAY,CAAC,EAAE,KAAK,CAAC;QACnB,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;KACvB,CAAC,CAAC;IAGH,iCAAiC;IACjC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;CAC3C;AAMD,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA0Q5D,CAAC;AA2dF,eAAe,gBAAgB,CAAC"}
@@ -11,7 +11,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
11
  * - Mobile-optimized: drawer, action_sheet
12
12
  * - Non-blocking: popover, toast
13
13
  */
14
- import { useCallback, useMemo, useRef, useState } from 'react';
14
+ import React, { useCallback, useMemo, useRef, useState } from 'react';
15
15
  import { OverlayContainerMode } from '@wildo-ai/zod-decorators';
16
16
  import { FrontendComponentType, PlacementSide, SurfaceVariant, resolvePlacementSideToRadix, UIBehavior } from '@wildo-ai/presets-components-models';
17
17
  import { useI18n } from '../../../core/i18n/useI18n.js';
@@ -128,7 +128,17 @@ export const OverlayContainer = ({ open, onOpenChange, trigger, anchor, title, t
128
128
  };
129
129
  const DialogMode = ({ open, onOpenChange, trigger, title, titleVisuallyHidden, description, footer, config, surfacePolicyOverride, className, children, onEscapeKeyDown, }) => {
130
130
  const sizeClass = getSizeClass(config.size);
131
- return (_jsxs(Dialog, { open: open, onOpenChange: onOpenChange, children: [trigger && _jsx(DialogTrigger, { asChild: true, children: trigger }), _jsxs(DialogContent, { surfacePolicyOverride: surfacePolicyOverride, className: cn(sizeClass, className), "aria-describedby": description ? 'dialog-description' : undefined, onEscapeKeyDown: onEscapeKeyDown, children: [titleVisuallyHidden && !description ? (
131
+ /*
132
+ * The dialog names ITSELF rather than relying on the primitive to associate its title.
133
+ *
134
+ * The sr-only branch below used to assert that "the standalone sr-only title still satisfies
135
+ * Radix's a11y requirement". Measured against the live settings hub 2026-09-09 (#533): it does
136
+ * not. The title rendered, and the dialog element carried no `aria-labelledby`, so axe reported
137
+ * `aria-dialog-name` — a modal announced to a screen reader as nothing. Wiring the id at both ends
138
+ * is one `useId` and cannot come apart.
139
+ */
140
+ const titleId = React.useId();
141
+ return (_jsxs(Dialog, { open: open, onOpenChange: onOpenChange, children: [trigger && _jsx(DialogTrigger, { asChild: true, children: trigger }), _jsxs(DialogContent, { surfacePolicyOverride: surfacePolicyOverride, className: cn(sizeClass, className), "aria-labelledby": title ? titleId : undefined, "aria-describedby": description ? 'dialog-description' : undefined, onEscapeKeyDown: onEscapeKeyDown, children: [titleVisuallyHidden && !description ? (
132
142
  // Title is present for accessibility but visually hidden, and there is
133
143
  // no description — render ONLY the sr-only title. Wrapping it in
134
144
  // `DialogHeader` would reserve the header's visible padding/spacing at
@@ -136,10 +146,12 @@ const DialogMode = ({ open, onOpenChange, trigger, title, titleVisuallyHidden, d
136
146
  // band above an edge-to-edge surface like the Settings Hub, which owns
137
147
  // its own header). The standalone sr-only title still satisfies Radix's
138
148
  // a11y requirement.
139
- title && _jsx(DialogTitle, { className: "sr-only", children: title })) : ((title || description) && (_jsxs(DialogHeader, { children: [title && _jsx(DialogTitle, { className: titleVisuallyHidden ? 'sr-only' : undefined, children: title }), description && _jsx(DialogDescription, { id: "dialog-description", children: description })] }))), children, footer && _jsx(DialogFooter, { children: footer })] })] }));
149
+ title && _jsx(DialogTitle, { id: titleId, className: "sr-only", children: title })) : ((title || description) && (_jsxs(DialogHeader, { children: [title && (_jsx(DialogTitle, { id: titleId, className: titleVisuallyHidden ? 'sr-only' : undefined, children: title })), description && _jsx(DialogDescription, { id: "dialog-description", children: description })] }))), children, footer && _jsx(DialogFooter, { children: footer })] })] }));
140
150
  };
141
151
  const AlertMode = ({ open, onOpenChange, trigger, title, description, cancelText, confirmText, onConfirm, onCancel, config, surfacePolicyOverride, className, children, onEscapeKeyDown, }) => (_jsxs(AlertDialog, { open: open, onOpenChange: onOpenChange, children: [trigger && _jsx(AlertDialogTrigger, { asChild: true, children: trigger }), _jsxs(AlertDialogContent, { surfacePolicyOverride: surfacePolicyOverride, className: className, onEscapeKeyDown: onEscapeKeyDown, children: [_jsxs(AlertDialogHeader, { children: [title && _jsx(AlertDialogTitle, { children: title }), description && _jsx(AlertDialogDescription, { children: description })] }), children, _jsxs(AlertDialogFooter, { children: [_jsx(AlertDialogCancel, { onClick: onCancel, children: cancelText }), _jsx(AlertDialogAction, { onClick: onConfirm, children: confirmText })] })] })] }));
142
152
  const SheetMode = ({ open, onOpenChange, trigger, title, titleVisuallyHidden, description, footer, config, surfacePolicyOverride, className, children, onEscapeKeyDown, }) => {
153
+ // Same explicit association as the dialog and drawer branches — see `DialogMode`.
154
+ const titleId = React.useId();
143
155
  const sideProp = config.side ?? PlacementSide.END;
144
156
  const sheetSide = typeof sideProp === 'string' && !Object.values(PlacementSide).includes(sideProp)
145
157
  ? sideProp
@@ -156,13 +168,28 @@ const SheetMode = ({ open, onOpenChange, trigger, title, titleVisuallyHidden, de
156
168
  * first two both true by default and closes on outside pointer-down even when `modal` is false,
157
169
  * so a panel meant to sit beside a live surface needs the preventers as well as the flag.
158
170
  */
159
- _jsxs(Sheet, { open: open, onOpenChange: onOpenChange, modal: config.modal ?? true, children: [trigger && _jsx(SheetTrigger, { asChild: true, children: trigger }), _jsxs(SheetContent, { surfacePolicyOverride: surfacePolicyOverride, side: sheetSide, className: className, onEscapeKeyDown: onEscapeKeyDown, showBackdrop: config.showBackdrop ?? true, onPointerDownOutside: config.closeOnOutsideClick === false ? (event) => event.preventDefault() : undefined, onInteractOutside: config.closeOnOutsideClick === false ? (event) => event.preventDefault() : undefined, children: [(title || description) && (_jsxs(SheetHeader, { children: [title && _jsx(SheetTitle, { className: titleVisuallyHidden ? 'sr-only' : undefined, children: title }), description && _jsx(SheetDescription, { children: description })] })), children, footer && _jsx(SheetFooter, { children: footer })] })] }));
171
+ _jsxs(Sheet, { open: open, onOpenChange: onOpenChange, modal: config.modal ?? true, children: [trigger && _jsx(SheetTrigger, { asChild: true, children: trigger }), _jsxs(SheetContent, { surfacePolicyOverride: surfacePolicyOverride, side: sheetSide, className: className, "aria-labelledby": title ? titleId : undefined, onEscapeKeyDown: onEscapeKeyDown, showBackdrop: config.showBackdrop ?? true, onPointerDownOutside: config.closeOnOutsideClick === false ? (event) => event.preventDefault() : undefined, onInteractOutside: config.closeOnOutsideClick === false ? (event) => event.preventDefault() : undefined, children: [(title || description) && (_jsxs(SheetHeader, { children: [title && (_jsx(SheetTitle, { id: titleId, className: titleVisuallyHidden ? 'sr-only' : undefined, children: title })), description && _jsx(SheetDescription, { children: description })] })), children, footer && _jsx(SheetFooter, { children: footer })] })] }));
172
+ };
173
+ /**
174
+ * The drawer branch wires its OWN `aria-labelledby`, and that is not belt-and-braces.
175
+ *
176
+ * Measured on a live settings hub 2026-09-09 (#533): the drawer rendered its `DrawerTitle`
177
+ * ("Settings", `data-slot="drawer-title"`) and the dialog element carried **no `aria-labelledby` at
178
+ * all**, so axe reported `aria-dialog-name` — a modal dialog announced to a screen reader with no
179
+ * name. The description id was present and pointed at an element that did not exist, which is the
180
+ * tell that the primitive's automatic title/description association is not reaching this content.
181
+ *
182
+ * Rather than depend on that association, the id is generated here and passed to BOTH ends. It costs
183
+ * one `useId` and it cannot silently come apart: if the title renders, the dialog names itself.
184
+ */
185
+ const DrawerMode = ({ open, onOpenChange, trigger, title, titleVisuallyHidden, description, footer, config, surfacePolicyOverride, className, children, }) => {
186
+ const titleId = React.useId();
187
+ return (_jsxs(Drawer, { open: open, onOpenChange: onOpenChange, direction: "bottom", snapPoints: config.snapPoints,
188
+ // vaul has no per-key Escape hook — `dismissible: false` is its (coarser)
189
+ // equivalent of `closeOnEscape: false` (it also disables drag/outside-click
190
+ // dismissal, which is the expected posture for a non-escapable drawer).
191
+ dismissible: config.closeOnEscape === false ? false : config.dismissible, children: [trigger && _jsx(DrawerTrigger, { asChild: true, children: trigger }), _jsxs(DrawerContent, { surfacePolicyOverride: surfacePolicyOverride, className: className, "aria-labelledby": title ? titleId : undefined, children: [(title || description) && (_jsxs(DrawerHeader, { children: [title && (_jsx(DrawerTitle, { id: titleId, className: titleVisuallyHidden ? 'sr-only' : undefined, children: title })), description && _jsx(DrawerDescription, { children: description })] })), _jsx("div", { className: "px-container pb-card", children: children }), footer && _jsx(DrawerFooter, { children: footer })] })] }));
160
192
  };
161
- const DrawerMode = ({ open, onOpenChange, trigger, title, titleVisuallyHidden, description, footer, config, surfacePolicyOverride, className, children, }) => (_jsxs(Drawer, { open: open, onOpenChange: onOpenChange, direction: "bottom", snapPoints: config.snapPoints,
162
- // vaul has no per-key Escape hook — `dismissible: false` is its (coarser)
163
- // equivalent of `closeOnEscape: false` (it also disables drag/outside-click
164
- // dismissal, which is the expected posture for a non-escapable drawer).
165
- dismissible: config.closeOnEscape === false ? false : config.dismissible, children: [trigger && _jsx(DrawerTrigger, { asChild: true, children: trigger }), _jsxs(DrawerContent, { surfacePolicyOverride: surfacePolicyOverride, className: className, children: [(title || description) && (_jsxs(DrawerHeader, { children: [title && _jsx(DrawerTitle, { className: titleVisuallyHidden ? 'sr-only' : undefined, children: title }), description && _jsx(DrawerDescription, { children: description })] })), _jsx("div", { className: "px-container pb-card", children: children }), footer && _jsx(DrawerFooter, { children: footer })] })] }));
166
193
  const CommandMode = ({ open, onOpenChange, placeholder, emptyLabel, groupLabel, items, surfacePolicyOverride, className, children, }) => (_jsxs(CommandDialog, { open: open, onOpenChange: onOpenChange, surfacePolicyOverride: surfacePolicyOverride, children: [_jsx(CommandInput, { placeholder: placeholder }), _jsxs(CommandList, { className: className, children: [_jsx(CommandEmpty, { children: emptyLabel }), items.length > 0 && (_jsx(CommandGroup, { heading: groupLabel || undefined, children: items.map((item) => (_jsxs(CommandItem, { onSelect: item.onSelect, children: [_jsx("span", { children: item.label }), item.shortcut && (_jsx("kbd", { className: "ms-auto text-xs text-muted-foreground bg-muted px-card-sm py-item-xs rounded", children: item.shortcut }))] }, item.id))) })), children] })] }));
167
194
  const PopoverMode = ({ open, onOpenChange, trigger, anchor, surfacePolicyOverride, className, children, onEscapeKeyDown, }) => (_jsxs(Popover, { open: open, onOpenChange: onOpenChange, children: [anchor && (_jsx(PopoverAnchor, { asChild: true, children: _jsx("span", { ref: anchor }) })), trigger && _jsx(PopoverTrigger, { asChild: true, children: trigger }), _jsx(PopoverContent, { surfacePolicyOverride: surfacePolicyOverride, className: className, onEscapeKeyDown: onEscapeKeyDown, children: children })] }));
168
195
  const LightboxMode = ({ open, onOpenChange, trigger, title, closeLabel, surfacePolicyOverride, className, children, onEscapeKeyDown, }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"OverlayContainer.js","sourceRoot":"","sources":["../../../../../src/components/overlays/containers/OverlayContainer.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;AAEH,OAAc,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,cAAc,EAAE,2BAA2B,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACpJ,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gEAAgE,CAAC;AACvG,OAAO,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAC1D,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAEpD,8BAA8B;AAC9B,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,YAAY,EAAE,aAAa,EAAE,WAA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AC;QACb,KAAK,IAAI;YACP,OAAO,UAAU,CAAC;QACpB,KAAK,IAAI;YACP,OAAO,UAAU,CAAC;QACpB,KAAK,IAAI;YACP,OAAO,UAAU,CAAC;QACpB,KAAK,IAAI;YACP,OAAO,UAAU,CAAC;QACpB,KAAK,MAAM;YACT,OAAO,2BAA2B,CAAC;QACrC;YACE,OAAO,UAAU,CAAC;IACtB,CAAC;AACH,CAAC;AAED,SAAS,6BAA6B,CACpC,UAAgC,EAChC,UAIW;IAEX,QAAQ,UAAU,EAAE,CAAC;QACnB,KAAK,oBAAoB,CAAC,MAAM;YAC9B,OAAO,qBAAqB,CAAC;gBAC3B,UAAU;gBACV,aAAa,EAAE,qBAAqB,CAAC,gBAAgB;gBACrD,GAAG,EAAE,cAAc;aACpB,CAAC,CAAC;QACL,KAAK,oBAAoB,CAAC,KAAK;YAC7B,OAAO,qBAAqB,CAAC;gBAC3B,UAAU;gBACV,aAAa,EAAE,qBAAqB,CAAC,eAAe;gBACpD,GAAG,EAAE,cAAc;aACpB,CAAC,CAAC;QACL,KAAK,oBAAoB,CAAC,MAAM;YAC9B,OAAO,qBAAqB,CAAC;gBAC3B,UAAU;gBACV,aAAa,EAAE,qBAAqB,CAAC,gBAAgB;gBACrD,GAAG,EAAE,cAAc;aACpB,CAAC,CAAC;QACL;YACE,OAAO,EAAE,CAAC;IACd,CAAC;AACH,CAAC;AAED,gFAAgF;AAChF,UAAU;AACV,gFAAgF;AAEhF,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC;AAElD,eAAe,gBAAgB,CAAC","sourcesContent":["/**\n * OverlayContainer Component\n *\n * A universal container for rendering overlay content in various modes.\n * Part of the UI Abstraction Patterns implementation.\n *\n * Supports 9 modes:\n * - Centered (modal): dialog, alert, command, lightbox\n * - Side panels: sheet\n * - Mobile-optimized: drawer, action_sheet\n * - Non-blocking: popover, toast\n */\n\nimport React, { useCallback, useMemo, useRef, useState } from 'react';\nimport { OverlayContainerMode } from '@wildo-ai/zod-decorators';\nimport type { DeepPartialSurfacePolicy, OverlayContainerConfig } from '@wildo-ai/presets-components-models';\nimport { FrontendComponentType, PlacementSide, SurfaceVariant, resolvePlacementSideToRadix, UIBehavior } from '@wildo-ai/presets-components-models';\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n';\nimport { resolveComponentLabel } from '~wildo-frontend-lib/core/i18n/component-label-resolution.utils';\nimport { useUI } from '~wildo-frontend-lib/core/ui/useUI';\nimport { cn } from '~wildo-frontend-lib/core/ui/cn';\n\n// Existing overlay components\nimport { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, DialogTrigger, DialogClose } from '~wildo-frontend-lib/components/overlays/containers/dialog';\nimport { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from '~wildo-frontend-lib/components/overlays/containers/alert-dialog';\nimport { Sheet, SheetContent, SheetHeader, SheetTitle, SheetDescription, SheetFooter, SheetTrigger, SheetClose } from '~wildo-frontend-lib/components/overlays/containers/sheet';\nimport { Drawer, DrawerContent, DrawerHeader, DrawerTitle, DrawerDescription, DrawerFooter, DrawerTrigger, DrawerClose } from '~wildo-frontend-lib/components/overlays/containers/drawer';\nimport { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem } from '~wildo-frontend-lib/components/navigation/command';\nimport { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from '~wildo-frontend-lib/components/overlays/floating/popover';\nimport { Button, ButtonVariants_Variant } from '~wildo-frontend-lib/components/actions/button';\nimport { createOpenSessionOverlayModeResolver } from './overlay-container-mode-resolution.utils';\n\n// =============================================================================\n// TYPES\n// =============================================================================\n\nexport interface OverlayContainerProps {\n /** Whether the overlay is open (controlled mode) */\n open?: boolean;\n /** Callback when open state changes */\n onOpenChange?: (open: boolean) => void;\n /** Trigger element that opens the overlay */\n trigger?: React.ReactNode;\n /** Title for the overlay */\n title?: string;\n /** Render title for accessibility without visible overlay chrome */\n titleVisuallyHidden?: boolean;\n /** Description for the overlay */\n description?: string;\n /** Content to render inside the overlay */\n children: React.ReactNode;\n /** Footer content (for dialogs, sheets) */\n footer?: React.ReactNode;\n /** Configuration for the overlay */\n config: OverlayContainerConfig;\n /** Surface policy override for overlay primitive resolution */\n surfacePolicyOverride?: DeepPartialSurfacePolicy;\n /** Additional CSS classes for the content */\n className?: string;\n\n // Alert-specific props\n /** Cancel button text for alert mode */\n cancelText?: string;\n /** Confirm button text for alert mode */\n confirmText?: string;\n /** Callback when confirm is clicked (alert mode) */\n onConfirm?: () => void;\n /** Callback when cancel is clicked (alert mode) */\n onCancel?: () => void;\n\n // Command-specific props\n /** Placeholder for command input */\n commandPlaceholder?: string;\n /** Command items for command mode */\n commandItems?: Array<{\n id: string;\n label: string;\n shortcut?: string;\n onSelect?: () => void;\n }>;\n\n // Popover-specific props\n /** Anchor element for popover */\n anchor?: React.RefObject<HTMLSpanElement>;\n}\n\n// =============================================================================\n// MAIN COMPONENT\n// =============================================================================\n\nexport const OverlayContainer: React.FC<OverlayContainerProps> = ({\n open,\n onOpenChange,\n trigger,\n anchor,\n title,\n titleVisuallyHidden,\n description,\n children,\n footer,\n config,\n surfacePolicyOverride,\n className,\n cancelText,\n confirmText,\n onConfirm,\n onCancel,\n commandPlaceholder,\n commandItems = [],\n}) => {\n const { mode, ...restConfig } = config;\n const [uncontrolledOpen, setUncontrolledOpen] = useState(false);\n const resolvedOpen = open ?? uncontrolledOpen;\n const handleOpenChange = useCallback((nextOpen: boolean) => {\n if (open === undefined) {\n setUncontrolledOpen(nextOpen);\n }\n onOpenChange?.(nextOpen);\n }, [onOpenChange, open]);\n const { isMobile, getSurfacePolicy } = useUI();\n const openSessionModeResolverRef = useRef<ReturnType<typeof createOpenSessionOverlayModeResolver> | null>(null);\n if (openSessionModeResolverRef.current === null) {\n openSessionModeResolverRef.current = createOpenSessionOverlayModeResolver();\n }\n const overlaySurfacePolicy = getSurfacePolicy?.(SurfaceVariant.OVERLAY, surfacePolicyOverride);\n const activeMode = openSessionModeResolverRef.current.resolve({\n open: resolvedOpen,\n requestedMode: mode,\n isMobileViewport: isMobile,\n mobileShape: overlaySurfacePolicy?.geometry?.mobileShape,\n });\n const { tComponent, isReady } = useI18n({\n component: [\n FrontendComponentType.LOW_LEVEL_OVERLAY_CONTAINER,\n FrontendComponentType.LOW_LEVEL_DIALOG,\n FrontendComponentType.LOW_LEVEL_SHEET,\n FrontendComponentType.LOW_LEVEL_DRAWER,\n ],\n });\n const resolveOverlayLabel = (\n key: string,\n params?: Record<string, string | number>,\n ): string => resolveComponentLabel({\n tComponent,\n componentType: FrontendComponentType.LOW_LEVEL_OVERLAY_CONTAINER,\n key,\n params,\n });\n const resolvedCancelText = cancelText ?? resolveOverlayLabel('cancel');\n const resolvedConfirmText = confirmText ?? resolveOverlayLabel('confirm');\n const resolvedCommandPlaceholder = commandPlaceholder ?? resolveOverlayLabel('commandPlaceholder');\n const resolvedCommandEmpty = resolveOverlayLabel('commandEmpty');\n const resolvedCommandGroup = resolveOverlayLabel('commandGroup');\n const resolvedCloseLabel = resolveOverlayLabel('close');\n const defaultTitle = resolveActiveModeDefaultTitle(activeMode, tComponent);\n const resolvedTitle = title || defaultTitle;\n const shouldHideTitle = titleVisuallyHidden || !title;\n\n // ── Escape handling (audit B4) ──\n //\n // Escape-to-close is OWNED BY THE PRIMITIVES (Radix Dialog/AlertDialog/\n // Popover, the Radix-dialog-based Sheet/Command, and vaul's Drawer all close\n // on Escape via their own layer handling). This container previously ALSO\n // installed a raw `document`-level keydown listener that closed the overlay\n // on ANY Escape — including one meant for an inner overlay. With a resource\n // form open in a dialog and an FK combobox popover open inside it, Escape\n // closed BOTH: Radix's DismissableLayer correctly dismissed only the topmost\n // layer (the popover), but the document listener fired regardless and tore\n // down the whole dialog, losing the form contents.\n //\n // Radix coordinates nested layers through a single shared DismissableLayer\n // stack (only the highest layer dismisses on Escape), so removing the\n // duplicate listener restores correct innermost-first scoping for every\n // nested overlay primitive (combobox popovers, select dropdowns, date-picker\n // popovers) with no extra wiring.\n //\n // `closeOnEscape: false` is now honored where it must be — at the primitive —\n // via `onEscapeKeyDown={preventDefault}` threaded by each mode below. (The\n // old listener merely skipped ITSELF when `closeOnEscape === false` while the\n // primitive still closed on Escape, so the config was silently broken.)\n const suppressEscape = useMemo(\n () => (config.closeOnEscape === false ? (event: KeyboardEvent) => event.preventDefault() : undefined),\n [config.closeOnEscape],\n );\n\n if (!isReady) return null;\n\n // Render based on mode\n switch (activeMode) {\n case OverlayContainerMode.DIALOG:\n return (\n <DialogMode\n open={open}\n onOpenChange={handleOpenChange}\n trigger={trigger}\n title={resolvedTitle}\n titleVisuallyHidden={shouldHideTitle}\n description={description}\n footer={footer}\n config={restConfig}\n surfacePolicyOverride={surfacePolicyOverride}\n className={className}\n onEscapeKeyDown={suppressEscape}\n >\n {children}\n </DialogMode>\n );\n\n case OverlayContainerMode.ALERT:\n return (\n <AlertMode\n open={open}\n onOpenChange={handleOpenChange}\n trigger={trigger}\n title={resolvedTitle}\n titleVisuallyHidden={shouldHideTitle}\n description={description}\n cancelText={resolvedCancelText}\n confirmText={resolvedConfirmText}\n onConfirm={onConfirm}\n onCancel={onCancel}\n config={restConfig}\n surfacePolicyOverride={surfacePolicyOverride}\n className={className}\n onEscapeKeyDown={suppressEscape}\n >\n {children}\n </AlertMode>\n );\n\n case OverlayContainerMode.SHEET:\n return (\n <SheetMode\n open={open}\n onOpenChange={handleOpenChange}\n trigger={trigger}\n title={resolvedTitle}\n titleVisuallyHidden={shouldHideTitle}\n description={description}\n footer={footer}\n config={restConfig}\n surfacePolicyOverride={surfacePolicyOverride}\n className={className}\n onEscapeKeyDown={suppressEscape}\n >\n {children}\n </SheetMode>\n );\n\n case OverlayContainerMode.DRAWER:\n return (\n <DrawerMode\n open={open}\n onOpenChange={handleOpenChange}\n trigger={trigger}\n title={resolvedTitle}\n titleVisuallyHidden={shouldHideTitle}\n description={description}\n footer={footer}\n config={restConfig}\n surfacePolicyOverride={surfacePolicyOverride}\n className={className}\n >\n {children}\n </DrawerMode>\n );\n\n case OverlayContainerMode.COMMAND:\n return (\n <CommandMode\n open={open}\n onOpenChange={handleOpenChange}\n placeholder={resolvedCommandPlaceholder}\n emptyLabel={resolvedCommandEmpty}\n groupLabel={resolvedCommandGroup}\n items={commandItems}\n config={restConfig}\n surfacePolicyOverride={surfacePolicyOverride}\n className={className}\n >\n {children}\n </CommandMode>\n );\n\n case OverlayContainerMode.POPOVER:\n return (\n <PopoverMode\n open={open}\n onOpenChange={handleOpenChange}\n trigger={trigger}\n anchor={anchor}\n config={restConfig}\n surfacePolicyOverride={surfacePolicyOverride}\n className={className}\n onEscapeKeyDown={suppressEscape}\n >\n {children}\n </PopoverMode>\n );\n\n case OverlayContainerMode.LIGHTBOX:\n return (\n <LightboxMode\n open={open}\n onOpenChange={handleOpenChange}\n trigger={trigger}\n title={resolvedTitle}\n closeLabel={resolvedCloseLabel}\n config={restConfig}\n surfacePolicyOverride={surfacePolicyOverride}\n className={className}\n onEscapeKeyDown={suppressEscape}\n >\n {children}\n </LightboxMode>\n );\n\n case OverlayContainerMode.ACTION_SHEET:\n return (\n <ActionSheetMode\n open={open}\n onOpenChange={handleOpenChange}\n trigger={trigger}\n title={resolvedTitle}\n cancelText={resolvedCancelText}\n config={restConfig}\n surfacePolicyOverride={surfacePolicyOverride}\n className={className}\n >\n {children}\n </ActionSheetMode>\n );\n\n case OverlayContainerMode.TOAST:\n // Toast is handled separately via toast notification system\n return null;\n\n default:\n // Fallback to dialog\n return (\n <DialogMode\n open={open}\n onOpenChange={handleOpenChange}\n trigger={trigger}\n title={resolvedTitle}\n description={description}\n footer={footer}\n config={restConfig}\n surfacePolicyOverride={surfacePolicyOverride}\n className={className}\n onEscapeKeyDown={suppressEscape}\n >\n {children}\n </DialogMode>\n );\n }\n};\n\n// =============================================================================\n// MODE IMPLEMENTATIONS\n// =============================================================================\n\ninterface ModeProps {\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n trigger?: React.ReactNode;\n anchor?: React.RefObject<HTMLSpanElement>;\n title?: string;\n titleVisuallyHidden?: boolean;\n description?: string;\n footer?: React.ReactNode;\n config: Omit<OverlayContainerConfig, 'mode'>;\n surfacePolicyOverride?: DeepPartialSurfacePolicy;\n className?: string;\n children: React.ReactNode;\n /**\n * When `closeOnEscape: false`, a `preventDefault` handler passed to the\n * primitive's `onEscapeKeyDown` so the PRIMITIVE keeps the overlay open.\n * `undefined` (the default) leaves the primitive's native Escape handling —\n * which correctly dismisses only the innermost open Radix layer.\n */\n onEscapeKeyDown?: (event: KeyboardEvent) => void;\n}\n\ninterface LightboxModeProps extends ModeProps {\n closeLabel: string;\n}\n\ninterface ActionSheetModeProps extends ModeProps {\n cancelText: string;\n}\n\nconst DialogMode: React.FC<ModeProps> = ({\n open,\n onOpenChange,\n trigger,\n title,\n titleVisuallyHidden,\n description,\n footer,\n config,\n surfacePolicyOverride,\n className,\n children,\n onEscapeKeyDown,\n}) => {\n const sizeClass = getSizeClass(config.size);\n\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n {trigger && <DialogTrigger asChild>{trigger}</DialogTrigger>}\n <DialogContent\n surfacePolicyOverride={surfacePolicyOverride}\n className={cn(sizeClass, className)}\n aria-describedby={description ? 'dialog-description' : undefined}\n onEscapeKeyDown={onEscapeKeyDown}\n >\n {titleVisuallyHidden && !description ? (\n // Title is present for accessibility but visually hidden, and there is\n // no description — render ONLY the sr-only title. Wrapping it in\n // `DialogHeader` would reserve the header's visible padding/spacing at\n // the top of the dialog even though nothing is shown there (the dead\n // band above an edge-to-edge surface like the Settings Hub, which owns\n // its own header). The standalone sr-only title still satisfies Radix's\n // a11y requirement.\n title && <DialogTitle className=\"sr-only\">{title}</DialogTitle>\n ) : (\n (title || description) && (\n <DialogHeader>\n {title && <DialogTitle className={titleVisuallyHidden ? 'sr-only' : undefined}>{title}</DialogTitle>}\n {description && <DialogDescription id=\"dialog-description\">{description}</DialogDescription>}\n </DialogHeader>\n )\n )}\n {children}\n {footer && <DialogFooter>{footer}</DialogFooter>}\n </DialogContent>\n </Dialog>\n );\n};\n\ninterface AlertModeProps extends Omit<ModeProps, 'footer'> {\n cancelText: string;\n confirmText: string;\n onConfirm?: () => void;\n onCancel?: () => void;\n}\n\nconst AlertMode: React.FC<AlertModeProps> = ({\n open,\n onOpenChange,\n trigger,\n title,\n description,\n cancelText,\n confirmText,\n onConfirm,\n onCancel,\n config,\n surfacePolicyOverride,\n className,\n children,\n onEscapeKeyDown,\n}) => (\n <AlertDialog open={open} onOpenChange={onOpenChange}>\n {trigger && <AlertDialogTrigger asChild>{trigger}</AlertDialogTrigger>}\n <AlertDialogContent surfacePolicyOverride={surfacePolicyOverride} className={className} onEscapeKeyDown={onEscapeKeyDown}>\n <AlertDialogHeader>\n {title && <AlertDialogTitle>{title}</AlertDialogTitle>}\n {description && <AlertDialogDescription>{description}</AlertDialogDescription>}\n </AlertDialogHeader>\n {children}\n <AlertDialogFooter>\n <AlertDialogCancel onClick={onCancel}>{cancelText}</AlertDialogCancel>\n <AlertDialogAction onClick={onConfirm}>{confirmText}</AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n);\n\nconst SheetMode: React.FC<ModeProps> = ({\n open,\n onOpenChange,\n trigger,\n title,\n titleVisuallyHidden,\n description,\n footer,\n config,\n surfacePolicyOverride,\n className,\n children,\n onEscapeKeyDown,\n}) => {\n const sideProp = config.side ?? PlacementSide.END;\n const sheetSide = typeof sideProp === 'string' && !Object.values(PlacementSide).includes(sideProp as PlacementSide)\n ? sideProp as 'top' | 'right' | 'bottom' | 'left'\n : resolvePlacementSideToRadix(sideProp as PlacementSide, document.documentElement.dir === 'rtl' ? 'rtl' : 'ltr');\n\n return (\n /*\n * `modal`, `closeOnOutsideClick` and `showBackdrop` were DECLARED on `OverlayContainerConfig` —\n * with documented defaults — and read by nothing. An author setting `modal: false` got a modal\n * sheet and no indication why.\n *\n * They are three independent questions and all three are needed to describe a companion panel:\n * `modal` decides whether the page behind can be INTERACTED with, `closeOnOutsideClick` whether\n * touching it DISMISSES the sheet, and `showBackdrop` whether it is DIMMED. Radix leaves the\n * first two both true by default and closes on outside pointer-down even when `modal` is false,\n * so a panel meant to sit beside a live surface needs the preventers as well as the flag.\n */\n <Sheet open={open} onOpenChange={onOpenChange} modal={config.modal ?? true}>\n {trigger && <SheetTrigger asChild>{trigger}</SheetTrigger>}\n <SheetContent\n surfacePolicyOverride={surfacePolicyOverride}\n side={sheetSide}\n className={className}\n onEscapeKeyDown={onEscapeKeyDown}\n showBackdrop={config.showBackdrop ?? true}\n onPointerDownOutside={config.closeOnOutsideClick === false ? (event) => event.preventDefault() : undefined}\n onInteractOutside={config.closeOnOutsideClick === false ? (event) => event.preventDefault() : undefined}\n >\n {(title || description) && (\n <SheetHeader>\n {title && <SheetTitle className={titleVisuallyHidden ? 'sr-only' : undefined}>{title}</SheetTitle>}\n {description && <SheetDescription>{description}</SheetDescription>}\n </SheetHeader>\n )}\n {children}\n {footer && <SheetFooter>{footer}</SheetFooter>}\n </SheetContent>\n </Sheet>\n );\n};\n\nconst DrawerMode: React.FC<ModeProps> = ({\n open,\n onOpenChange,\n trigger,\n title,\n titleVisuallyHidden,\n description,\n footer,\n config,\n surfacePolicyOverride,\n className,\n children,\n}) => (\n <Drawer\n open={open}\n onOpenChange={onOpenChange}\n direction=\"bottom\"\n snapPoints={config.snapPoints}\n // vaul has no per-key Escape hook — `dismissible: false` is its (coarser)\n // equivalent of `closeOnEscape: false` (it also disables drag/outside-click\n // dismissal, which is the expected posture for a non-escapable drawer).\n dismissible={config.closeOnEscape === false ? false : config.dismissible}\n >\n {trigger && <DrawerTrigger asChild>{trigger}</DrawerTrigger>}\n <DrawerContent surfacePolicyOverride={surfacePolicyOverride} className={className}>\n {(title || description) && (\n <DrawerHeader>\n {title && <DrawerTitle className={titleVisuallyHidden ? 'sr-only' : undefined}>{title}</DrawerTitle>}\n {description && <DrawerDescription>{description}</DrawerDescription>}\n </DrawerHeader>\n )}\n <div className=\"px-container pb-card\">{children}</div>\n {footer && <DrawerFooter>{footer}</DrawerFooter>}\n </DrawerContent>\n </Drawer>\n);\n\ninterface CommandModeProps {\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n placeholder: string;\n emptyLabel: string;\n groupLabel: string;\n items: Array<{\n id: string;\n label: string;\n shortcut?: string;\n onSelect?: () => void;\n }>;\n config: Omit<OverlayContainerConfig, 'mode'>;\n surfacePolicyOverride?: DeepPartialSurfacePolicy;\n className?: string;\n children: React.ReactNode;\n}\n\nconst CommandMode: React.FC<CommandModeProps> = ({\n open,\n onOpenChange,\n placeholder,\n emptyLabel,\n groupLabel,\n items,\n surfacePolicyOverride,\n className,\n children,\n}) => (\n <CommandDialog open={open} onOpenChange={onOpenChange} surfacePolicyOverride={surfacePolicyOverride}>\n <CommandInput placeholder={placeholder} />\n <CommandList className={className}>\n <CommandEmpty>{emptyLabel}</CommandEmpty>\n {items.length > 0 && (\n <CommandGroup heading={groupLabel || undefined}>\n {items.map((item) => (\n <CommandItem key={item.id} onSelect={item.onSelect}>\n <span>{item.label}</span>\n {item.shortcut && (\n <kbd className=\"ms-auto text-xs text-muted-foreground bg-muted px-card-sm py-item-xs rounded\">\n {item.shortcut}\n </kbd>\n )}\n </CommandItem>\n ))}\n </CommandGroup>\n )}\n {children}\n </CommandList>\n </CommandDialog>\n);\n\nconst PopoverMode: React.FC<ModeProps> = ({\n open,\n onOpenChange,\n trigger,\n anchor,\n surfacePolicyOverride,\n className,\n children,\n onEscapeKeyDown,\n}) => (\n <Popover open={open} onOpenChange={onOpenChange}>\n {anchor && (\n <PopoverAnchor asChild>\n <span ref={anchor} />\n </PopoverAnchor>\n )}\n {trigger && <PopoverTrigger asChild>{trigger}</PopoverTrigger>}\n <PopoverContent surfacePolicyOverride={surfacePolicyOverride} className={className} onEscapeKeyDown={onEscapeKeyDown}>\n {children}\n </PopoverContent>\n </Popover>\n);\n\nconst LightboxMode: React.FC<LightboxModeProps> = ({\n open,\n onOpenChange,\n trigger,\n title,\n closeLabel,\n surfacePolicyOverride,\n className,\n children,\n onEscapeKeyDown,\n}) => {\n const { getRecipe } = useUI();\n const overlayBackdropRecipe = getRecipe(UIBehavior.OVERLAY_BACKDROP);\n\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n {trigger && <DialogTrigger asChild>{trigger}</DialogTrigger>}\n <DialogContent\n surfacePolicyOverride={surfacePolicyOverride}\n showCloseButton={false}\n onEscapeKeyDown={onEscapeKeyDown}\n className={cn(\n 'max-w-[90vw] max-h-[90vh] p-0 overflow-hidden',\n overlayBackdropRecipe.base,\n className\n )}\n >\n {/* Close button */}\n <DialogClose className=\"absolute top-4 end-4 z-(--z-transient) text-white hover:text-white/80\">\n <span className=\"sr-only\">{closeLabel}</span>\n <svg className=\"w-6 h-6\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n </DialogClose>\n\n {/* Content (typically image/media) */}\n <div className=\"flex items-center justify-center min-h-[50vh]\">\n {children}\n </div>\n\n {/* Optional title */}\n {title && (\n <div className=\"absolute bottom-0 left-0 right-0 p-card bg-gradient-to-t from-black/80 to-transparent\">\n <p className=\"text-white text-center\">{title}</p>\n </div>\n )}\n </DialogContent>\n </Dialog>\n );\n};\n\nconst ActionSheetMode: React.FC<ActionSheetModeProps> = ({\n open,\n onOpenChange,\n trigger,\n title,\n cancelText,\n surfacePolicyOverride,\n className,\n children,\n}) => (\n <Drawer open={open} onOpenChange={onOpenChange}>\n {trigger && <DrawerTrigger asChild>{trigger}</DrawerTrigger>}\n <DrawerContent surfacePolicyOverride={surfacePolicyOverride} className={className}>\n {title && (\n <DrawerHeader className=\"text-center\">\n <DrawerTitle className=\"text-sm font-normal text-muted-foreground\">\n {title}\n </DrawerTitle>\n </DrawerHeader>\n )}\n <div className=\"px-card-sm pb-card\">\n {children}\n </div>\n <DrawerFooter className=\"pt-element border-t\">\n <DrawerClose asChild>\n <Button variant={ButtonVariants_Variant.OUTLINE} className=\"w-full\">{cancelText}</Button>\n </DrawerClose>\n </DrawerFooter>\n </DrawerContent>\n </Drawer>\n);\n\n// =============================================================================\n// HELPERS\n// =============================================================================\n\nfunction getSizeClass(size?: 'sm' | 'md' | 'lg' | 'xl' | 'full'): string {\n switch (size) {\n case 'sm':\n return 'max-w-sm';\n case 'md':\n return 'max-w-md';\n case 'lg':\n return 'max-w-lg';\n case 'xl':\n return 'max-w-xl';\n case 'full':\n return 'max-w-[95vw] max-h-[95vh]';\n default:\n return 'max-w-lg';\n }\n}\n\nfunction resolveActiveModeDefaultTitle(\n activeMode: OverlayContainerMode,\n tComponent: (\n componentType: FrontendComponentType,\n key: string,\n kvPairs?: Record<string, string | number>,\n ) => string,\n): string {\n switch (activeMode) {\n case OverlayContainerMode.DIALOG:\n return resolveComponentLabel({\n tComponent,\n componentType: FrontendComponentType.LOW_LEVEL_DIALOG,\n key: 'defaultTitle',\n });\n case OverlayContainerMode.SHEET:\n return resolveComponentLabel({\n tComponent,\n componentType: FrontendComponentType.LOW_LEVEL_SHEET,\n key: 'defaultTitle',\n });\n case OverlayContainerMode.DRAWER:\n return resolveComponentLabel({\n tComponent,\n componentType: FrontendComponentType.LOW_LEVEL_DRAWER,\n key: 'defaultTitle',\n });\n default:\n return '';\n }\n}\n\n// =============================================================================\n// EXPORTS\n// =============================================================================\n\nOverlayContainer.displayName = 'OverlayContainer';\n\nexport default OverlayContainer;\n"]}
1
+ {"version":3,"file":"OverlayContainer.js","sourceRoot":"","sources":["../../../../../src/components/overlays/containers/OverlayContainer.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,EAAE,oBAAoB,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;YACE,OAAO,UAAU,CAAC;IACtB,CAAC;AACH,CAAC;AAED,SAAS,6BAA6B,CACpC,UAAgC,EAChC,UAIW;IAEX,QAAQ,UAAU,EAAE,CAAC;QACnB,KAAK,oBAAoB,CAAC,MAAM;YAC9B,OAAO,qBAAqB,CAAC;gBAC3B,UAAU;gBACV,aAAa,EAAE,qBAAqB,CAAC,gBAAgB;gBACrD,GAAG,EAAE,cAAc;aACpB,CAAC,CAAC;QACL,KAAK,oBAAoB,CAAC,KAAK;YAC7B,OAAO,qBAAqB,CAAC;gBAC3B,UAAU;gBACV,aAAa,EAAE,qBAAqB,CAAC,eAAe;gBACpD,GAAG,EAAE,cAAc;aACpB,CAAC,CAAC;QACL,KAAK,oBAAoB,CAAC,MAAM;YAC9B,OAAO,qBAAqB,CAAC;gBAC3B,UAAU;gBACV,aAAa,EAAE,qBAAqB,CAAC,gBAAgB;gBACrD,GAAG,EAAE,cAAc;aACpB,CAAC,CAAC;QACL;YACE,OAAO,EAAE,CAAC;IACd,CAAC;AACH,CAAC;AAED,gFAAgF;AAChF,UAAU;AACV,gFAAgF;AAEhF,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC;AAElD,eAAe,gBAAgB,CAAC","sourcesContent":["/**\n * OverlayContainer Component\n *\n * A universal container for rendering overlay content in various modes.\n * Part of the UI Abstraction Patterns implementation.\n *\n * Supports 9 modes:\n * - Centered (modal): dialog, alert, command, lightbox\n * - Side panels: sheet\n * - Mobile-optimized: drawer, action_sheet\n * - Non-blocking: popover, toast\n */\n\nimport React, { useCallback, useMemo, useRef, useState } from 'react';\nimport { OverlayContainerMode } from '@wildo-ai/zod-decorators';\nimport type { DeepPartialSurfacePolicy, OverlayContainerConfig } from '@wildo-ai/presets-components-models';\nimport { FrontendComponentType, PlacementSide, SurfaceVariant, resolvePlacementSideToRadix, UIBehavior } from '@wildo-ai/presets-components-models';\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n';\nimport { resolveComponentLabel } from '~wildo-frontend-lib/core/i18n/component-label-resolution.utils';\nimport { useUI } from '~wildo-frontend-lib/core/ui/useUI';\nimport { cn } from '~wildo-frontend-lib/core/ui/cn';\n\n// Existing overlay components\nimport { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, DialogTrigger, DialogClose } from '~wildo-frontend-lib/components/overlays/containers/dialog';\nimport { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from '~wildo-frontend-lib/components/overlays/containers/alert-dialog';\nimport { Sheet, SheetContent, SheetHeader, SheetTitle, SheetDescription, SheetFooter, SheetTrigger, SheetClose } from '~wildo-frontend-lib/components/overlays/containers/sheet';\nimport { Drawer, DrawerContent, DrawerHeader, DrawerTitle, DrawerDescription, DrawerFooter, DrawerTrigger, DrawerClose } from '~wildo-frontend-lib/components/overlays/containers/drawer';\nimport { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem } from '~wildo-frontend-lib/components/navigation/command';\nimport { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from '~wildo-frontend-lib/components/overlays/floating/popover';\nimport { Button, ButtonVariants_Variant } from '~wildo-frontend-lib/components/actions/button';\nimport { createOpenSessionOverlayModeResolver } from './overlay-container-mode-resolution.utils';\n\n// =============================================================================\n// TYPES\n// =============================================================================\n\nexport interface OverlayContainerProps {\n /** Whether the overlay is open (controlled mode) */\n open?: boolean;\n /** Callback when open state changes */\n onOpenChange?: (open: boolean) => void;\n /** Trigger element that opens the overlay */\n trigger?: React.ReactNode;\n /** Title for the overlay */\n title?: string;\n /** Render title for accessibility without visible overlay chrome */\n titleVisuallyHidden?: boolean;\n /** Description for the overlay */\n description?: string;\n /** Content to render inside the overlay */\n children: React.ReactNode;\n /** Footer content (for dialogs, sheets) */\n footer?: React.ReactNode;\n /** Configuration for the overlay */\n config: OverlayContainerConfig;\n /** Surface policy override for overlay primitive resolution */\n surfacePolicyOverride?: DeepPartialSurfacePolicy;\n /** Additional CSS classes for the content */\n className?: string;\n\n // Alert-specific props\n /** Cancel button text for alert mode */\n cancelText?: string;\n /** Confirm button text for alert mode */\n confirmText?: string;\n /** Callback when confirm is clicked (alert mode) */\n onConfirm?: () => void;\n /** Callback when cancel is clicked (alert mode) */\n onCancel?: () => void;\n\n // Command-specific props\n /** Placeholder for command input */\n commandPlaceholder?: string;\n /** Command items for command mode */\n commandItems?: Array<{\n id: string;\n label: string;\n shortcut?: string;\n onSelect?: () => void;\n }>;\n\n // Popover-specific props\n /** Anchor element for popover */\n anchor?: React.RefObject<HTMLSpanElement>;\n}\n\n// =============================================================================\n// MAIN COMPONENT\n// =============================================================================\n\nexport const OverlayContainer: React.FC<OverlayContainerProps> = ({\n open,\n onOpenChange,\n trigger,\n anchor,\n title,\n titleVisuallyHidden,\n description,\n children,\n footer,\n config,\n surfacePolicyOverride,\n className,\n cancelText,\n confirmText,\n onConfirm,\n onCancel,\n commandPlaceholder,\n commandItems = [],\n}) => {\n const { mode, ...restConfig } = config;\n const [uncontrolledOpen, setUncontrolledOpen] = useState(false);\n const resolvedOpen = open ?? uncontrolledOpen;\n const handleOpenChange = useCallback((nextOpen: boolean) => {\n if (open === undefined) {\n setUncontrolledOpen(nextOpen);\n }\n onOpenChange?.(nextOpen);\n }, [onOpenChange, open]);\n const { isMobile, getSurfacePolicy } = useUI();\n const openSessionModeResolverRef = useRef<ReturnType<typeof createOpenSessionOverlayModeResolver> | null>(null);\n if (openSessionModeResolverRef.current === null) {\n openSessionModeResolverRef.current = createOpenSessionOverlayModeResolver();\n }\n const overlaySurfacePolicy = getSurfacePolicy?.(SurfaceVariant.OVERLAY, surfacePolicyOverride);\n const activeMode = openSessionModeResolverRef.current.resolve({\n open: resolvedOpen,\n requestedMode: mode,\n isMobileViewport: isMobile,\n mobileShape: overlaySurfacePolicy?.geometry?.mobileShape,\n });\n const { tComponent, isReady } = useI18n({\n component: [\n FrontendComponentType.LOW_LEVEL_OVERLAY_CONTAINER,\n FrontendComponentType.LOW_LEVEL_DIALOG,\n FrontendComponentType.LOW_LEVEL_SHEET,\n FrontendComponentType.LOW_LEVEL_DRAWER,\n ],\n });\n const resolveOverlayLabel = (\n key: string,\n params?: Record<string, string | number>,\n ): string => resolveComponentLabel({\n tComponent,\n componentType: FrontendComponentType.LOW_LEVEL_OVERLAY_CONTAINER,\n key,\n params,\n });\n const resolvedCancelText = cancelText ?? resolveOverlayLabel('cancel');\n const resolvedConfirmText = confirmText ?? resolveOverlayLabel('confirm');\n const resolvedCommandPlaceholder = commandPlaceholder ?? resolveOverlayLabel('commandPlaceholder');\n const resolvedCommandEmpty = resolveOverlayLabel('commandEmpty');\n const resolvedCommandGroup = resolveOverlayLabel('commandGroup');\n const resolvedCloseLabel = resolveOverlayLabel('close');\n const defaultTitle = resolveActiveModeDefaultTitle(activeMode, tComponent);\n const resolvedTitle = title || defaultTitle;\n const shouldHideTitle = titleVisuallyHidden || !title;\n\n // ── Escape handling (audit B4) ──\n //\n // Escape-to-close is OWNED BY THE PRIMITIVES (Radix Dialog/AlertDialog/\n // Popover, the Radix-dialog-based Sheet/Command, and vaul's Drawer all close\n // on Escape via their own layer handling). This container previously ALSO\n // installed a raw `document`-level keydown listener that closed the overlay\n // on ANY Escape — including one meant for an inner overlay. With a resource\n // form open in a dialog and an FK combobox popover open inside it, Escape\n // closed BOTH: Radix's DismissableLayer correctly dismissed only the topmost\n // layer (the popover), but the document listener fired regardless and tore\n // down the whole dialog, losing the form contents.\n //\n // Radix coordinates nested layers through a single shared DismissableLayer\n // stack (only the highest layer dismisses on Escape), so removing the\n // duplicate listener restores correct innermost-first scoping for every\n // nested overlay primitive (combobox popovers, select dropdowns, date-picker\n // popovers) with no extra wiring.\n //\n // `closeOnEscape: false` is now honored where it must be — at the primitive —\n // via `onEscapeKeyDown={preventDefault}` threaded by each mode below. (The\n // old listener merely skipped ITSELF when `closeOnEscape === false` while the\n // primitive still closed on Escape, so the config was silently broken.)\n const suppressEscape = useMemo(\n () => (config.closeOnEscape === false ? (event: KeyboardEvent) => event.preventDefault() : undefined),\n [config.closeOnEscape],\n );\n\n if (!isReady) return null;\n\n // Render based on mode\n switch (activeMode) {\n case OverlayContainerMode.DIALOG:\n return (\n <DialogMode\n open={open}\n onOpenChange={handleOpenChange}\n trigger={trigger}\n title={resolvedTitle}\n titleVisuallyHidden={shouldHideTitle}\n description={description}\n footer={footer}\n config={restConfig}\n surfacePolicyOverride={surfacePolicyOverride}\n className={className}\n onEscapeKeyDown={suppressEscape}\n >\n {children}\n </DialogMode>\n );\n\n case OverlayContainerMode.ALERT:\n return (\n <AlertMode\n open={open}\n onOpenChange={handleOpenChange}\n trigger={trigger}\n title={resolvedTitle}\n titleVisuallyHidden={shouldHideTitle}\n description={description}\n cancelText={resolvedCancelText}\n confirmText={resolvedConfirmText}\n onConfirm={onConfirm}\n onCancel={onCancel}\n config={restConfig}\n surfacePolicyOverride={surfacePolicyOverride}\n className={className}\n onEscapeKeyDown={suppressEscape}\n >\n {children}\n </AlertMode>\n );\n\n case OverlayContainerMode.SHEET:\n return (\n <SheetMode\n open={open}\n onOpenChange={handleOpenChange}\n trigger={trigger}\n title={resolvedTitle}\n titleVisuallyHidden={shouldHideTitle}\n description={description}\n footer={footer}\n config={restConfig}\n surfacePolicyOverride={surfacePolicyOverride}\n className={className}\n onEscapeKeyDown={suppressEscape}\n >\n {children}\n </SheetMode>\n );\n\n case OverlayContainerMode.DRAWER:\n return (\n <DrawerMode\n open={open}\n onOpenChange={handleOpenChange}\n trigger={trigger}\n title={resolvedTitle}\n titleVisuallyHidden={shouldHideTitle}\n description={description}\n footer={footer}\n config={restConfig}\n surfacePolicyOverride={surfacePolicyOverride}\n className={className}\n >\n {children}\n </DrawerMode>\n );\n\n case OverlayContainerMode.COMMAND:\n return (\n <CommandMode\n open={open}\n onOpenChange={handleOpenChange}\n placeholder={resolvedCommandPlaceholder}\n emptyLabel={resolvedCommandEmpty}\n groupLabel={resolvedCommandGroup}\n items={commandItems}\n config={restConfig}\n surfacePolicyOverride={surfacePolicyOverride}\n className={className}\n >\n {children}\n </CommandMode>\n );\n\n case OverlayContainerMode.POPOVER:\n return (\n <PopoverMode\n open={open}\n onOpenChange={handleOpenChange}\n trigger={trigger}\n anchor={anchor}\n config={restConfig}\n surfacePolicyOverride={surfacePolicyOverride}\n className={className}\n onEscapeKeyDown={suppressEscape}\n >\n {children}\n </PopoverMode>\n );\n\n case OverlayContainerMode.LIGHTBOX:\n return (\n <LightboxMode\n open={open}\n onOpenChange={handleOpenChange}\n trigger={trigger}\n title={resolvedTitle}\n closeLabel={resolvedCloseLabel}\n config={restConfig}\n surfacePolicyOverride={surfacePolicyOverride}\n className={className}\n onEscapeKeyDown={suppressEscape}\n >\n {children}\n </LightboxMode>\n );\n\n case OverlayContainerMode.ACTION_SHEET:\n return (\n <ActionSheetMode\n open={open}\n onOpenChange={handleOpenChange}\n trigger={trigger}\n title={resolvedTitle}\n cancelText={resolvedCancelText}\n config={restConfig}\n surfacePolicyOverride={surfacePolicyOverride}\n className={className}\n >\n {children}\n </ActionSheetMode>\n );\n\n case OverlayContainerMode.TOAST:\n // Toast is handled separately via toast notification system\n return null;\n\n default:\n // Fallback to dialog\n return (\n <DialogMode\n open={open}\n onOpenChange={handleOpenChange}\n trigger={trigger}\n title={resolvedTitle}\n description={description}\n footer={footer}\n config={restConfig}\n surfacePolicyOverride={surfacePolicyOverride}\n className={className}\n onEscapeKeyDown={suppressEscape}\n >\n {children}\n </DialogMode>\n );\n }\n};\n\n// =============================================================================\n// MODE IMPLEMENTATIONS\n// =============================================================================\n\ninterface ModeProps {\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n trigger?: React.ReactNode;\n anchor?: React.RefObject<HTMLSpanElement>;\n title?: string;\n titleVisuallyHidden?: boolean;\n description?: string;\n footer?: React.ReactNode;\n config: Omit<OverlayContainerConfig, 'mode'>;\n surfacePolicyOverride?: DeepPartialSurfacePolicy;\n className?: string;\n children: React.ReactNode;\n /**\n * When `closeOnEscape: false`, a `preventDefault` handler passed to the\n * primitive's `onEscapeKeyDown` so the PRIMITIVE keeps the overlay open.\n * `undefined` (the default) leaves the primitive's native Escape handling —\n * which correctly dismisses only the innermost open Radix layer.\n */\n onEscapeKeyDown?: (event: KeyboardEvent) => void;\n}\n\ninterface LightboxModeProps extends ModeProps {\n closeLabel: string;\n}\n\ninterface ActionSheetModeProps extends ModeProps {\n cancelText: string;\n}\n\nconst DialogMode: React.FC<ModeProps> = ({\n open,\n onOpenChange,\n trigger,\n title,\n titleVisuallyHidden,\n description,\n footer,\n config,\n surfacePolicyOverride,\n className,\n children,\n onEscapeKeyDown,\n}) => {\n const sizeClass = getSizeClass(config.size);\n /*\n * The dialog names ITSELF rather than relying on the primitive to associate its title.\n *\n * The sr-only branch below used to assert that \"the standalone sr-only title still satisfies\n * Radix's a11y requirement\". Measured against the live settings hub 2026-09-09 (#533): it does\n * not. The title rendered, and the dialog element carried no `aria-labelledby`, so axe reported\n * `aria-dialog-name` — a modal announced to a screen reader as nothing. Wiring the id at both ends\n * is one `useId` and cannot come apart.\n */\n const titleId = React.useId();\n\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n {trigger && <DialogTrigger asChild>{trigger}</DialogTrigger>}\n <DialogContent\n surfacePolicyOverride={surfacePolicyOverride}\n className={cn(sizeClass, className)}\n aria-labelledby={title ? titleId : undefined}\n aria-describedby={description ? 'dialog-description' : undefined}\n onEscapeKeyDown={onEscapeKeyDown}\n >\n {titleVisuallyHidden && !description ? (\n // Title is present for accessibility but visually hidden, and there is\n // no description — render ONLY the sr-only title. Wrapping it in\n // `DialogHeader` would reserve the header's visible padding/spacing at\n // the top of the dialog even though nothing is shown there (the dead\n // band above an edge-to-edge surface like the Settings Hub, which owns\n // its own header). The standalone sr-only title still satisfies Radix's\n // a11y requirement.\n title && <DialogTitle id={titleId} className=\"sr-only\">{title}</DialogTitle>\n ) : (\n (title || description) && (\n <DialogHeader>\n {title && (\n <DialogTitle id={titleId} className={titleVisuallyHidden ? 'sr-only' : undefined}>{title}</DialogTitle>\n )}\n {description && <DialogDescription id=\"dialog-description\">{description}</DialogDescription>}\n </DialogHeader>\n )\n )}\n {children}\n {footer && <DialogFooter>{footer}</DialogFooter>}\n </DialogContent>\n </Dialog>\n );\n};\n\ninterface AlertModeProps extends Omit<ModeProps, 'footer'> {\n cancelText: string;\n confirmText: string;\n onConfirm?: () => void;\n onCancel?: () => void;\n}\n\nconst AlertMode: React.FC<AlertModeProps> = ({\n open,\n onOpenChange,\n trigger,\n title,\n description,\n cancelText,\n confirmText,\n onConfirm,\n onCancel,\n config,\n surfacePolicyOverride,\n className,\n children,\n onEscapeKeyDown,\n}) => (\n <AlertDialog open={open} onOpenChange={onOpenChange}>\n {trigger && <AlertDialogTrigger asChild>{trigger}</AlertDialogTrigger>}\n <AlertDialogContent surfacePolicyOverride={surfacePolicyOverride} className={className} onEscapeKeyDown={onEscapeKeyDown}>\n <AlertDialogHeader>\n {title && <AlertDialogTitle>{title}</AlertDialogTitle>}\n {description && <AlertDialogDescription>{description}</AlertDialogDescription>}\n </AlertDialogHeader>\n {children}\n <AlertDialogFooter>\n <AlertDialogCancel onClick={onCancel}>{cancelText}</AlertDialogCancel>\n <AlertDialogAction onClick={onConfirm}>{confirmText}</AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n);\n\nconst SheetMode: React.FC<ModeProps> = ({\n open,\n onOpenChange,\n trigger,\n title,\n titleVisuallyHidden,\n description,\n footer,\n config,\n surfacePolicyOverride,\n className,\n children,\n onEscapeKeyDown,\n}) => {\n // Same explicit association as the dialog and drawer branches — see `DialogMode`.\n const titleId = React.useId();\n const sideProp = config.side ?? PlacementSide.END;\n const sheetSide = typeof sideProp === 'string' && !Object.values(PlacementSide).includes(sideProp as PlacementSide)\n ? sideProp as 'top' | 'right' | 'bottom' | 'left'\n : resolvePlacementSideToRadix(sideProp as PlacementSide, document.documentElement.dir === 'rtl' ? 'rtl' : 'ltr');\n\n return (\n /*\n * `modal`, `closeOnOutsideClick` and `showBackdrop` were DECLARED on `OverlayContainerConfig` —\n * with documented defaults — and read by nothing. An author setting `modal: false` got a modal\n * sheet and no indication why.\n *\n * They are three independent questions and all three are needed to describe a companion panel:\n * `modal` decides whether the page behind can be INTERACTED with, `closeOnOutsideClick` whether\n * touching it DISMISSES the sheet, and `showBackdrop` whether it is DIMMED. Radix leaves the\n * first two both true by default and closes on outside pointer-down even when `modal` is false,\n * so a panel meant to sit beside a live surface needs the preventers as well as the flag.\n */\n <Sheet open={open} onOpenChange={onOpenChange} modal={config.modal ?? true}>\n {trigger && <SheetTrigger asChild>{trigger}</SheetTrigger>}\n <SheetContent\n surfacePolicyOverride={surfacePolicyOverride}\n side={sheetSide}\n className={className}\n aria-labelledby={title ? titleId : undefined}\n onEscapeKeyDown={onEscapeKeyDown}\n showBackdrop={config.showBackdrop ?? true}\n onPointerDownOutside={config.closeOnOutsideClick === false ? (event) => event.preventDefault() : undefined}\n onInteractOutside={config.closeOnOutsideClick === false ? (event) => event.preventDefault() : undefined}\n >\n {(title || description) && (\n <SheetHeader>\n {title && (\n <SheetTitle id={titleId} className={titleVisuallyHidden ? 'sr-only' : undefined}>{title}</SheetTitle>\n )}\n {description && <SheetDescription>{description}</SheetDescription>}\n </SheetHeader>\n )}\n {children}\n {footer && <SheetFooter>{footer}</SheetFooter>}\n </SheetContent>\n </Sheet>\n );\n};\n\n/**\n * The drawer branch wires its OWN `aria-labelledby`, and that is not belt-and-braces.\n *\n * Measured on a live settings hub 2026-09-09 (#533): the drawer rendered its `DrawerTitle`\n * (\"Settings\", `data-slot=\"drawer-title\"`) and the dialog element carried **no `aria-labelledby` at\n * all**, so axe reported `aria-dialog-name` — a modal dialog announced to a screen reader with no\n * name. The description id was present and pointed at an element that did not exist, which is the\n * tell that the primitive's automatic title/description association is not reaching this content.\n *\n * Rather than depend on that association, the id is generated here and passed to BOTH ends. It costs\n * one `useId` and it cannot silently come apart: if the title renders, the dialog names itself.\n */\nconst DrawerMode: React.FC<ModeProps> = ({\n open,\n onOpenChange,\n trigger,\n title,\n titleVisuallyHidden,\n description,\n footer,\n config,\n surfacePolicyOverride,\n className,\n children,\n}) => {\n const titleId = React.useId();\n\n return (\n <Drawer\n open={open}\n onOpenChange={onOpenChange}\n direction=\"bottom\"\n snapPoints={config.snapPoints}\n // vaul has no per-key Escape hook — `dismissible: false` is its (coarser)\n // equivalent of `closeOnEscape: false` (it also disables drag/outside-click\n // dismissal, which is the expected posture for a non-escapable drawer).\n dismissible={config.closeOnEscape === false ? false : config.dismissible}\n >\n {trigger && <DrawerTrigger asChild>{trigger}</DrawerTrigger>}\n <DrawerContent\n surfacePolicyOverride={surfacePolicyOverride}\n className={className}\n aria-labelledby={title ? titleId : undefined}\n >\n {(title || description) && (\n <DrawerHeader>\n {title && (\n <DrawerTitle id={titleId} className={titleVisuallyHidden ? 'sr-only' : undefined}>\n {title}\n </DrawerTitle>\n )}\n {description && <DrawerDescription>{description}</DrawerDescription>}\n </DrawerHeader>\n )}\n <div className=\"px-container pb-card\">{children}</div>\n {footer && <DrawerFooter>{footer}</DrawerFooter>}\n </DrawerContent>\n </Drawer>\n );\n};\n\ninterface CommandModeProps {\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n placeholder: string;\n emptyLabel: string;\n groupLabel: string;\n items: Array<{\n id: string;\n label: string;\n shortcut?: string;\n onSelect?: () => void;\n }>;\n config: Omit<OverlayContainerConfig, 'mode'>;\n surfacePolicyOverride?: DeepPartialSurfacePolicy;\n className?: string;\n children: React.ReactNode;\n}\n\nconst CommandMode: React.FC<CommandModeProps> = ({\n open,\n onOpenChange,\n placeholder,\n emptyLabel,\n groupLabel,\n items,\n surfacePolicyOverride,\n className,\n children,\n}) => (\n <CommandDialog open={open} onOpenChange={onOpenChange} surfacePolicyOverride={surfacePolicyOverride}>\n <CommandInput placeholder={placeholder} />\n <CommandList className={className}>\n <CommandEmpty>{emptyLabel}</CommandEmpty>\n {items.length > 0 && (\n <CommandGroup heading={groupLabel || undefined}>\n {items.map((item) => (\n <CommandItem key={item.id} onSelect={item.onSelect}>\n <span>{item.label}</span>\n {item.shortcut && (\n <kbd className=\"ms-auto text-xs text-muted-foreground bg-muted px-card-sm py-item-xs rounded\">\n {item.shortcut}\n </kbd>\n )}\n </CommandItem>\n ))}\n </CommandGroup>\n )}\n {children}\n </CommandList>\n </CommandDialog>\n);\n\nconst PopoverMode: React.FC<ModeProps> = ({\n open,\n onOpenChange,\n trigger,\n anchor,\n surfacePolicyOverride,\n className,\n children,\n onEscapeKeyDown,\n}) => (\n <Popover open={open} onOpenChange={onOpenChange}>\n {anchor && (\n <PopoverAnchor asChild>\n <span ref={anchor} />\n </PopoverAnchor>\n )}\n {trigger && <PopoverTrigger asChild>{trigger}</PopoverTrigger>}\n <PopoverContent surfacePolicyOverride={surfacePolicyOverride} className={className} onEscapeKeyDown={onEscapeKeyDown}>\n {children}\n </PopoverContent>\n </Popover>\n);\n\nconst LightboxMode: React.FC<LightboxModeProps> = ({\n open,\n onOpenChange,\n trigger,\n title,\n closeLabel,\n surfacePolicyOverride,\n className,\n children,\n onEscapeKeyDown,\n}) => {\n const { getRecipe } = useUI();\n const overlayBackdropRecipe = getRecipe(UIBehavior.OVERLAY_BACKDROP);\n\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n {trigger && <DialogTrigger asChild>{trigger}</DialogTrigger>}\n <DialogContent\n surfacePolicyOverride={surfacePolicyOverride}\n showCloseButton={false}\n onEscapeKeyDown={onEscapeKeyDown}\n className={cn(\n 'max-w-[90vw] max-h-[90vh] p-0 overflow-hidden',\n overlayBackdropRecipe.base,\n className\n )}\n >\n {/* Close button */}\n <DialogClose className=\"absolute top-4 end-4 z-(--z-transient) text-white hover:text-white/80\">\n <span className=\"sr-only\">{closeLabel}</span>\n <svg className=\"w-6 h-6\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n </DialogClose>\n\n {/* Content (typically image/media) */}\n <div className=\"flex items-center justify-center min-h-[50vh]\">\n {children}\n </div>\n\n {/* Optional title */}\n {title && (\n <div className=\"absolute bottom-0 left-0 right-0 p-card bg-gradient-to-t from-black/80 to-transparent\">\n <p className=\"text-white text-center\">{title}</p>\n </div>\n )}\n </DialogContent>\n </Dialog>\n );\n};\n\nconst ActionSheetMode: React.FC<ActionSheetModeProps> = ({\n open,\n onOpenChange,\n trigger,\n title,\n cancelText,\n surfacePolicyOverride,\n className,\n children,\n}) => (\n <Drawer open={open} onOpenChange={onOpenChange}>\n {trigger && <DrawerTrigger asChild>{trigger}</DrawerTrigger>}\n <DrawerContent surfacePolicyOverride={surfacePolicyOverride} className={className}>\n {title && (\n <DrawerHeader className=\"text-center\">\n <DrawerTitle className=\"text-sm font-normal text-muted-foreground\">\n {title}\n </DrawerTitle>\n </DrawerHeader>\n )}\n <div className=\"px-card-sm pb-card\">\n {children}\n </div>\n <DrawerFooter className=\"pt-element border-t\">\n <DrawerClose asChild>\n <Button variant={ButtonVariants_Variant.OUTLINE} className=\"w-full\">{cancelText}</Button>\n </DrawerClose>\n </DrawerFooter>\n </DrawerContent>\n </Drawer>\n);\n\n// =============================================================================\n// HELPERS\n// =============================================================================\n\nfunction getSizeClass(size?: 'sm' | 'md' | 'lg' | 'xl' | 'full'): string {\n switch (size) {\n case 'sm':\n return 'max-w-sm';\n case 'md':\n return 'max-w-md';\n case 'lg':\n return 'max-w-lg';\n case 'xl':\n return 'max-w-xl';\n case 'full':\n return 'max-w-[95vw] max-h-[95vh]';\n default:\n return 'max-w-lg';\n }\n}\n\nfunction resolveActiveModeDefaultTitle(\n activeMode: OverlayContainerMode,\n tComponent: (\n componentType: FrontendComponentType,\n key: string,\n kvPairs?: Record<string, string | number>,\n ) => string,\n): string {\n switch (activeMode) {\n case OverlayContainerMode.DIALOG:\n return resolveComponentLabel({\n tComponent,\n componentType: FrontendComponentType.LOW_LEVEL_DIALOG,\n key: 'defaultTitle',\n });\n case OverlayContainerMode.SHEET:\n return resolveComponentLabel({\n tComponent,\n componentType: FrontendComponentType.LOW_LEVEL_SHEET,\n key: 'defaultTitle',\n });\n case OverlayContainerMode.DRAWER:\n return resolveComponentLabel({\n tComponent,\n componentType: FrontendComponentType.LOW_LEVEL_DRAWER,\n key: 'defaultTitle',\n });\n default:\n return '';\n }\n}\n\n// =============================================================================\n// EXPORTS\n// =============================================================================\n\nOverlayContainer.displayName = 'OverlayContainer';\n\nexport default OverlayContainer;\n"]}
@@ -79,7 +79,7 @@ export declare function ContextMenuSeparator({ preset, ...props }: ContextMenuSe
79
79
  export declare function ContextMenuShortcut({ preset, ...props }: ContextMenuShortcutProps & ComponentPresetProps): React.JSX.Element;
80
80
  export declare function ContextMenuSub({ preset, ...props }: ContextMenuSubProps & ComponentPresetProps): React.JSX.Element;
81
81
  export declare function ContextMenuSubTrigger({ preset, ...props }: ContextMenuSubTriggerProps & ComponentPresetProps): React.JSX.Element;
82
- export declare const ContextMenuSubContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & Pick<FloatingMenuContentBaseProps, "loop" | "sideOffset" | "alignOffset" | "avoidCollisions" | "collisionPadding" | "arrowPadding"> & {
82
+ export declare const ContextMenuSubContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & Pick<FloatingMenuContentBaseProps, "sideOffset" | "alignOffset" | "avoidCollisions" | "collisionPadding" | "arrowPadding" | "loop"> & {
83
83
  asChild?: boolean;
84
84
  forceMount?: boolean;
85
85
  onEscapeKeyDown?: (event: KeyboardEvent) => void;