@baseplate-dev/plugin-auth 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth0/generators/react/auth0-pages/auth0-pages.generator.d.ts +88 -3
- package/dist/auth0/generators/react/auth0-pages/auth0-pages.generator.d.ts.map +1 -1
- package/dist/auth0/generators/react/auth0-pages/generated/index.d.ts +176 -6
- package/dist/auth0/generators/react/auth0-pages/generated/index.d.ts.map +1 -1
- package/dist/auth0/generators/react/auth0-pages/generated/template-renderers.d.ts +88 -3
- package/dist/auth0/generators/react/auth0-pages/generated/template-renderers.d.ts.map +1 -1
- package/dist/auth0/generators/react/auth0-pages/generated/typed-templates.d.ts +176 -6
- package/dist/auth0/generators/react/auth0-pages/generated/typed-templates.d.ts.map +1 -1
- package/dist/auth0/generators/react/react-auth0/generated/index.d.ts +176 -6
- package/dist/auth0/generators/react/react-auth0/generated/index.d.ts.map +1 -1
- package/dist/auth0/generators/react/react-auth0/generated/template-renderers.d.ts +88 -3
- package/dist/auth0/generators/react/react-auth0/generated/template-renderers.d.ts.map +1 -1
- package/dist/auth0/generators/react/react-auth0/generated/typed-templates.d.ts +88 -3
- package/dist/auth0/generators/react/react-auth0/generated/typed-templates.d.ts.map +1 -1
- package/dist/auth0/generators/react/react-auth0/react-auth0.generator.d.ts +88 -3
- package/dist/auth0/generators/react/react-auth0/react-auth0.generator.d.ts.map +1 -1
- package/dist/local-auth/admin/common.d.ts +4 -0
- package/dist/local-auth/admin/common.d.ts.map +1 -0
- package/dist/local-auth/admin/common.js +30 -0
- package/dist/local-auth/admin/common.js.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.d.ts +453 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.d.ts.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.js +121 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.js.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/index.d.ts +457 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/index.d.ts.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/index.js +9 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/index.js.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-paths.d.ts +13 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-paths.d.ts.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-paths.js +25 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-paths.js.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.d.ts +235 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.d.ts.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.js +48 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.js.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.d.ts +224 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.d.ts.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.js +29 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.js.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/index.d.ts +2 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/index.d.ts.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/index.js +2 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/index.js.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.d.ts +21 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.d.ts.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.gql +7 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.js +59 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.js.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.tsx +145 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.d.ts +452 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.d.ts.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.js +107 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.js.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/index.d.ts +457 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/index.d.ts.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/index.js +9 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/index.js.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-paths.d.ts +13 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-paths.d.ts.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-paths.js +25 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-paths.js.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.d.ts +235 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.d.ts.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.js +48 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.js.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.d.ts +442 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.d.ts.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.js +31 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.js.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/index.d.ts +2 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/index.d.ts.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/index.js +2 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/index.js.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.d.ts +21 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.d.ts.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.gql +7 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.js +73 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.js.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.tsx +155 -0
- package/dist/local-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.d.ts +221 -0
- package/dist/local-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.d.ts.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.js +58 -0
- package/dist/local-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.js.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-roles-column/index.d.ts +2 -0
- package/dist/local-auth/admin/generators/admin-crud-roles-column/index.d.ts.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-roles-column/index.js +2 -0
- package/dist/local-auth/admin/generators/admin-crud-roles-column/index.js.map +1 -0
- package/dist/local-auth/admin/node.d.ts +8 -0
- package/dist/local-auth/admin/node.d.ts.map +1 -0
- package/dist/local-auth/admin/node.js +60 -0
- package/dist/local-auth/admin/node.js.map +1 -0
- package/dist/local-auth/admin/schema/manage-role-action.d.ts +19 -0
- package/dist/local-auth/admin/schema/manage-role-action.d.ts.map +1 -0
- package/dist/local-auth/admin/schema/manage-role-action.js +6 -0
- package/dist/local-auth/admin/schema/manage-role-action.js.map +1 -0
- package/dist/local-auth/admin/schema/reset-password-action.d.ts +19 -0
- package/dist/local-auth/admin/schema/reset-password-action.d.ts.map +1 -0
- package/dist/local-auth/admin/schema/reset-password-action.js +6 -0
- package/dist/local-auth/admin/schema/reset-password-action.js.map +1 -0
- package/dist/local-auth/admin/schema/roles-column.d.ts +19 -0
- package/dist/local-auth/admin/schema/roles-column.d.ts.map +1 -0
- package/dist/local-auth/admin/schema/roles-column.js +6 -0
- package/dist/local-auth/admin/schema/roles-column.js.map +1 -0
- package/dist/local-auth/admin/web.d.ts +6 -0
- package/dist/local-auth/admin/web.d.ts.map +1 -0
- package/dist/local-auth/admin/web.js +43 -0
- package/dist/local-auth/admin/web.js.map +1 -0
- package/dist/local-auth/core/components/local-auth-definition-editor.d.ts.map +1 -1
- package/dist/local-auth/core/components/local-auth-definition-editor.js +5 -2
- package/dist/local-auth/core/components/local-auth-definition-editor.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.d.ts +5 -1
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.js +20 -5
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/index.d.ts +4 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/index.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.d.ts +8 -2
- package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.js +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.js +40 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.ts +47 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.d.ts +31 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.js +97 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.ts +133 -0
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts +2 -1
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.js +9 -3
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.js.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/index.d.ts +26 -0
- package/dist/local-auth/core/generators/auth-module/generated/index.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/template-paths.d.ts +2 -0
- package/dist/local-auth/core/generators/auth-module/generated/template-paths.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/template-paths.js +2 -0
- package/dist/local-auth/core/generators/auth-module/generated/template-paths.js.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/template-renderers.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/template-renderers.js +1 -0
- package/dist/local-auth/core/generators/auth-module/generated/template-renderers.js.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.d.ts +52 -0
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.js +28 -0
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.js.map +1 -1
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-roles.mutations.d.ts +2 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-roles.mutations.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-roles.mutations.js +23 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-roles.mutations.js.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-roles.mutations.ts +26 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/services/user-roles.service.d.ts +15 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/services/user-roles.service.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/services/user-roles.service.js +35 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/services/user-roles.service.js.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/services/user-roles.service.ts +47 -0
- package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.d.ts +88 -3
- package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/generated/index.d.ts +264 -9
- package/dist/local-auth/core/generators/auth-routes/generated/index.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.d.ts +88 -3
- package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.d.ts +352 -12
- package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.d.ts.map +1 -1
- package/dist/local-auth/core/generators/react-session/generated/index.d.ts +176 -6
- package/dist/local-auth/core/generators/react-session/generated/index.d.ts.map +1 -1
- package/dist/local-auth/core/generators/react-session/generated/template-renderers.d.ts +88 -3
- package/dist/local-auth/core/generators/react-session/generated/template-renderers.d.ts.map +1 -1
- package/dist/local-auth/core/generators/react-session/generated/typed-templates.d.ts +176 -6
- package/dist/local-auth/core/generators/react-session/generated/typed-templates.d.ts.map +1 -1
- package/dist/local-auth/core/generators/react-session/react-session.generator.d.ts +88 -3
- package/dist/local-auth/core/generators/react-session/react-session.generator.d.ts.map +1 -1
- package/dist/local-auth/core/node.d.ts.map +1 -1
- package/dist/local-auth/core/node.js +5 -1
- package/dist/local-auth/core/node.js.map +1 -1
- package/dist/local-auth/core/schema/plugin-definition.d.ts +3 -0
- package/dist/local-auth/core/schema/plugin-definition.d.ts.map +1 -1
- package/dist/local-auth/core/schema/plugin-definition.js +4 -0
- package/dist/local-auth/core/schema/plugin-definition.js.map +1 -1
- package/dist/local-auth/plugin.json +1 -1
- package/dist/web/assets/{__federation_expose_auth0CoreCommon-lV5QSzvf.js → __federation_expose_auth0CoreCommon-Dd4OxG3J.js} +3 -3
- package/dist/web/assets/{__federation_expose_auth0CoreCommon-lV5QSzvf.js.map → __federation_expose_auth0CoreCommon-Dd4OxG3J.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_auth0CoreWeb-5F0rTNis.js → __federation_expose_auth0CoreWeb-C_de43BE.js} +5 -5
- package/dist/web/assets/{__federation_expose_auth0CoreWeb-5F0rTNis.js.map → __federation_expose_auth0CoreWeb-C_de43BE.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_authCoreCommon-C5cVmNCH.js → __federation_expose_authCoreCommon-BAF30G9e.js} +3 -3
- package/dist/web/assets/{__federation_expose_authCoreCommon-C5cVmNCH.js.map → __federation_expose_authCoreCommon-BAF30G9e.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_authCoreWeb-CJxY8hZC.js → __federation_expose_authCoreWeb-B26BFarY.js} +6 -6
- package/dist/web/assets/{__federation_expose_authCoreWeb-CJxY8hZC.js.map → __federation_expose_authCoreWeb-B26BFarY.js.map} +1 -1
- package/dist/web/assets/__federation_expose_local-authAdminCommon-DLbuTALX.js +64 -0
- package/dist/web/assets/__federation_expose_local-authAdminCommon-DLbuTALX.js.map +1 -0
- package/dist/web/assets/__federation_expose_local-authAdminWeb-bT8Js4V6.js +58 -0
- package/dist/web/assets/__federation_expose_local-authAdminWeb-bT8Js4V6.js.map +1 -0
- package/dist/web/assets/{__federation_expose_local-authCoreCommon-Dr_ngV2l.js → __federation_expose_local-authCoreCommon-D9tovFrj.js} +3 -3
- package/dist/web/assets/{__federation_expose_local-authCoreCommon-Dr_ngV2l.js.map → __federation_expose_local-authCoreCommon-D9tovFrj.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_local-authCoreWeb-B5iBudnh.js → __federation_expose_local-authCoreWeb-DKVkRzEo.js} +24 -7
- package/dist/web/assets/__federation_expose_local-authCoreWeb-DKVkRzEo.js.map +1 -0
- package/dist/web/assets/{__federation_expose_placeholder-authCoreCommon-l8knzO7I.js → __federation_expose_placeholder-authCoreCommon-D1fszuKq.js} +3 -3
- package/dist/web/assets/{__federation_expose_placeholder-authCoreCommon-l8knzO7I.js.map → __federation_expose_placeholder-authCoreCommon-D1fszuKq.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_placeholder-authCoreWeb-DbI_bZsk.js → __federation_expose_placeholder-authCoreWeb-tw3UiMLM.js} +5 -5
- package/dist/web/assets/{__federation_expose_placeholder-authCoreWeb-DbI_bZsk.js.map → __federation_expose_placeholder-authCoreWeb-tw3UiMLM.js.map} +1 -1
- package/dist/web/assets/{__federation_fn_import-DReOsou_.js → __federation_fn_import-B_QMlAIe.js} +2 -2
- package/dist/web/assets/{__federation_fn_import-DReOsou_.js.map → __federation_fn_import-B_QMlAIe.js.map} +1 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/{web-BlPKO2K7.js → web-DdrB9jrq.js} +74 -6
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-DdrB9jrq.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/{project-builder-lib-CGEZr0YI.js → project-builder-lib-BvG5Zcxb.js} +567 -184
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-BvG5Zcxb.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/{ui-components-RO_rk4f0.js → ui-components-CjIA8Av2.js} +873 -624
- package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-CjIA8Av2.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/{utils-BbU_EX7_.js → utils-LpAGNm5N.js} +2 -2
- package/dist/web/assets/__federation_shared_@baseplate-dev/{utils-BbU_EX7_.js.map → utils-LpAGNm5N.js.map} +1 -1
- package/dist/web/assets/__federation_shared_@tanstack/{react-router-CNTPQj7N.js → react-router-CEcQRiV1.js} +2 -2
- package/dist/web/assets/__federation_shared_@tanstack/{react-router-CNTPQj7N.js.map → react-router-CEcQRiV1.js.map} +1 -1
- package/dist/web/assets/{get-auth-plugin-definition-CQ6mWMZk.js → get-auth-plugin-definition-BrApugiB.js} +2 -2
- package/dist/web/assets/{get-auth-plugin-definition-CQ6mWMZk.js.map → get-auth-plugin-definition-BrApugiB.js.map} +1 -1
- package/dist/web/assets/{index-BkOJzK_m.js → index-DAcyTb_o.js} +5 -3
- package/dist/web/assets/{index-BkOJzK_m.js.map → index-DAcyTb_o.js.map} +1 -1
- package/dist/web/assets/{index.esm-UnRzlLlr.js → index.esm-BFQQfZNu.js} +2 -2
- package/dist/web/assets/{index.esm-UnRzlLlr.js.map → index.esm-BFQQfZNu.js.map} +1 -1
- package/dist/web/assets/{model-merger-BLEOsCIp.js → model-merger-boZDknXa.js} +11 -4
- package/dist/web/assets/model-merger-boZDknXa.js.map +1 -0
- package/dist/web/assets/{plugin-definition-PCHsX2lR.js → plugin-definition-B7A-hS1o.js} +2 -2
- package/dist/web/assets/{plugin-definition-PCHsX2lR.js.map → plugin-definition-B7A-hS1o.js.map} +1 -1
- package/dist/web/assets/{plugin-definition-ChUKIqUg.js → plugin-definition-BeK0C-OP.js} +11 -2
- package/dist/web/assets/plugin-definition-BeK0C-OP.js.map +1 -0
- package/dist/web/assets/{plugin-definition-DH4QyCfv.js → plugin-definition-CyqVivit.js} +2 -2
- package/dist/web/assets/{plugin-definition-DH4QyCfv.js.map → plugin-definition-CyqVivit.js.map} +1 -1
- package/dist/web/assets/{plugin-definition-C935Xf1h.js → plugin-definition-DfsGhMRb.js} +2 -2
- package/dist/web/assets/{plugin-definition-C935Xf1h.js.map → plugin-definition-DfsGhMRb.js.map} +1 -1
- package/dist/web/assets/{react-ecPihYHK.js → react-CKjL52W8.js} +2 -2
- package/dist/web/assets/{react-ecPihYHK.js.map → react-CKjL52W8.js.map} +1 -1
- package/dist/web/assets/remoteEntry.js +14 -8
- package/dist/web/assets/remoteEntry.js.map +1 -1
- package/dist/web/assets/{styles-I6mpdfRm.js → styles-CyTaudys.js} +3 -3
- package/dist/web/assets/{styles-I6mpdfRm.js.map → styles-CyTaudys.js.map} +1 -1
- package/package.json +12 -12
- package/dist/web/assets/__federation_expose_local-authCoreWeb-B5iBudnh.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-BlPKO2K7.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-CGEZr0YI.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-RO_rk4f0.js.map +0 -1
- package/dist/web/assets/model-merger-BLEOsCIp.js.map +0 -1
- package/dist/web/assets/plugin-definition-ChUKIqUg.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { importShared } from '../__federation_fn_import-
|
|
1
|
+
import { importShared } from '../__federation_fn_import-B_QMlAIe.js';
|
|
2
2
|
import { j as jsxRuntimeExports } from '../jsx-runtime-XI9uIe3W.js';
|
|
3
|
-
import { b as useController, u as useFormState, g as get } from '../index.esm-
|
|
4
|
-
import { M as MdUnfoldMore, a as MdCheck, b as MdMoreHoriz, c as MdChevronRight, d as MdChevronLeft, e as MdExpandMore, f as MdClose, g as MdSearch, h as MdCalendarMonth, i as MdSchedule, j as MdCircle, k as MdFormatListBulleted, l as MdOutlineErrorOutline, m as MdOutlineSave } from '../index-
|
|
5
|
-
import { c as create } from '../react-
|
|
3
|
+
import { b as useController, u as useFormState, g as get } from '../index.esm-BFQQfZNu.js';
|
|
4
|
+
import { M as MdUnfoldMore, a as MdCheck, b as MdMoreHoriz, c as MdChevronRight, d as MdChevronLeft, e as MdExpandMore, f as MdClose, g as MdSearch, h as MdCalendarMonth, i as MdSchedule, j as MdCircle, k as MdFormatListBulleted, l as MdOutlineErrorOutline, m as MdOutlineSave, n as MdMenu } from '../index-DAcyTb_o.js';
|
|
5
|
+
import { c as create } from '../react-CKjL52W8.js';
|
|
6
6
|
|
|
7
7
|
function r$1(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r$1(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r$1(e))&&(n&&(n+=" "),n+=t);return n}
|
|
8
8
|
|
|
@@ -3106,9 +3106,9 @@ const DEFAULT_COMPONENT_STRINGS = {
|
|
|
3106
3106
|
comboboxLoading: 'Loading...',
|
|
3107
3107
|
};
|
|
3108
3108
|
|
|
3109
|
-
const React$
|
|
3110
|
-
const ComponentStringsContext = React$
|
|
3111
|
-
const useComponentStrings = () => React$
|
|
3109
|
+
const React$1e = await importShared('react');
|
|
3110
|
+
const ComponentStringsContext = React$1e.createContext(DEFAULT_COMPONENT_STRINGS);
|
|
3111
|
+
const useComponentStrings = () => React$1e.useContext(ComponentStringsContext);
|
|
3112
3112
|
/**
|
|
3113
3113
|
* @public
|
|
3114
3114
|
*/
|
|
@@ -3175,7 +3175,7 @@ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForD
|
|
|
3175
3175
|
}
|
|
3176
3176
|
|
|
3177
3177
|
// packages/react/compose-refs/src/compose-refs.tsx
|
|
3178
|
-
const React$
|
|
3178
|
+
const React$1d = await importShared('react');
|
|
3179
3179
|
|
|
3180
3180
|
function setRef(ref, value) {
|
|
3181
3181
|
if (typeof ref === "function") {
|
|
@@ -3209,21 +3209,21 @@ function composeRefs(...refs) {
|
|
|
3209
3209
|
};
|
|
3210
3210
|
}
|
|
3211
3211
|
function useComposedRefs(...refs) {
|
|
3212
|
-
return React$
|
|
3212
|
+
return React$1d.useCallback(composeRefs(...refs), refs);
|
|
3213
3213
|
}
|
|
3214
3214
|
|
|
3215
3215
|
// packages/react/context/src/create-context.tsx
|
|
3216
|
-
const React$
|
|
3216
|
+
const React$1c = await importShared('react');
|
|
3217
3217
|
function createContext2(rootComponentName, defaultContext) {
|
|
3218
|
-
const Context = React$
|
|
3218
|
+
const Context = React$1c.createContext(defaultContext);
|
|
3219
3219
|
const Provider = (props) => {
|
|
3220
3220
|
const { children, ...context } = props;
|
|
3221
|
-
const value = React$
|
|
3221
|
+
const value = React$1c.useMemo(() => context, Object.values(context));
|
|
3222
3222
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Context.Provider, { value, children });
|
|
3223
3223
|
};
|
|
3224
3224
|
Provider.displayName = rootComponentName + "Provider";
|
|
3225
3225
|
function useContext2(consumerName) {
|
|
3226
|
-
const context = React$
|
|
3226
|
+
const context = React$1c.useContext(Context);
|
|
3227
3227
|
if (context) return context;
|
|
3228
3228
|
if (defaultContext !== void 0) return defaultContext;
|
|
3229
3229
|
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
@@ -3233,19 +3233,19 @@ function createContext2(rootComponentName, defaultContext) {
|
|
|
3233
3233
|
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
3234
3234
|
let defaultContexts = [];
|
|
3235
3235
|
function createContext3(rootComponentName, defaultContext) {
|
|
3236
|
-
const BaseContext = React$
|
|
3236
|
+
const BaseContext = React$1c.createContext(defaultContext);
|
|
3237
3237
|
const index = defaultContexts.length;
|
|
3238
3238
|
defaultContexts = [...defaultContexts, defaultContext];
|
|
3239
3239
|
const Provider = (props) => {
|
|
3240
3240
|
const { scope, children, ...context } = props;
|
|
3241
3241
|
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
3242
|
-
const value = React$
|
|
3242
|
+
const value = React$1c.useMemo(() => context, Object.values(context));
|
|
3243
3243
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Context.Provider, { value, children });
|
|
3244
3244
|
};
|
|
3245
3245
|
Provider.displayName = rootComponentName + "Provider";
|
|
3246
3246
|
function useContext2(consumerName, scope) {
|
|
3247
3247
|
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
3248
|
-
const context = React$
|
|
3248
|
+
const context = React$1c.useContext(Context);
|
|
3249
3249
|
if (context) return context;
|
|
3250
3250
|
if (defaultContext !== void 0) return defaultContext;
|
|
3251
3251
|
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
@@ -3254,11 +3254,11 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
3254
3254
|
}
|
|
3255
3255
|
const createScope = () => {
|
|
3256
3256
|
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
3257
|
-
return React$
|
|
3257
|
+
return React$1c.createContext(defaultContext);
|
|
3258
3258
|
});
|
|
3259
3259
|
return function useScope(scope) {
|
|
3260
3260
|
const contexts = scope?.[scopeName] || scopeContexts;
|
|
3261
|
-
return React$
|
|
3261
|
+
return React$1c.useMemo(
|
|
3262
3262
|
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
3263
3263
|
[scope, contexts]
|
|
3264
3264
|
);
|
|
@@ -3281,7 +3281,7 @@ function composeContextScopes(...scopes) {
|
|
|
3281
3281
|
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
3282
3282
|
return { ...nextScopes2, ...currentScope };
|
|
3283
3283
|
}, {});
|
|
3284
|
-
return React$
|
|
3284
|
+
return React$1c.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
3285
3285
|
};
|
|
3286
3286
|
};
|
|
3287
3287
|
createScope.scopeName = baseScope.scopeName;
|
|
@@ -3289,17 +3289,17 @@ function composeContextScopes(...scopes) {
|
|
|
3289
3289
|
}
|
|
3290
3290
|
|
|
3291
3291
|
// packages/react/use-layout-effect/src/use-layout-effect.tsx
|
|
3292
|
-
const React$
|
|
3292
|
+
const React$1b = await importShared('react');
|
|
3293
3293
|
|
|
3294
|
-
var useLayoutEffect2 = globalThis?.document ? React$
|
|
3294
|
+
var useLayoutEffect2 = globalThis?.document ? React$1b.useLayoutEffect : () => {
|
|
3295
3295
|
};
|
|
3296
3296
|
|
|
3297
3297
|
// packages/react/id/src/id.tsx
|
|
3298
|
-
const React$
|
|
3299
|
-
var useReactId = React$
|
|
3298
|
+
const React$1a = await importShared('react');
|
|
3299
|
+
var useReactId = React$1a[" useId ".trim().toString()] || (() => void 0);
|
|
3300
3300
|
var count$1 = 0;
|
|
3301
3301
|
function useId$4(deterministicId) {
|
|
3302
|
-
const [id, setId] = React$
|
|
3302
|
+
const [id, setId] = React$1a.useState(useReactId());
|
|
3303
3303
|
useLayoutEffect2(() => {
|
|
3304
3304
|
setId((reactId) => reactId ?? String(count$1++));
|
|
3305
3305
|
}, [deterministicId]);
|
|
@@ -3307,8 +3307,8 @@ function useId$4(deterministicId) {
|
|
|
3307
3307
|
}
|
|
3308
3308
|
|
|
3309
3309
|
// src/use-controllable-state.tsx
|
|
3310
|
-
const React$
|
|
3311
|
-
var useInsertionEffect = React$
|
|
3310
|
+
const React$19 = await importShared('react');
|
|
3311
|
+
var useInsertionEffect = React$19[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
|
|
3312
3312
|
function useControllableState({
|
|
3313
3313
|
prop,
|
|
3314
3314
|
defaultProp,
|
|
@@ -3323,8 +3323,8 @@ function useControllableState({
|
|
|
3323
3323
|
const isControlled = prop !== void 0;
|
|
3324
3324
|
const value = isControlled ? prop : uncontrolledProp;
|
|
3325
3325
|
{
|
|
3326
|
-
const isControlledRef = React$
|
|
3327
|
-
React$
|
|
3326
|
+
const isControlledRef = React$19.useRef(prop !== void 0);
|
|
3327
|
+
React$19.useEffect(() => {
|
|
3328
3328
|
const wasControlled = isControlledRef.current;
|
|
3329
3329
|
if (wasControlled !== isControlled) {
|
|
3330
3330
|
const from = wasControlled ? "controlled" : "uncontrolled";
|
|
@@ -3336,7 +3336,7 @@ function useControllableState({
|
|
|
3336
3336
|
isControlledRef.current = isControlled;
|
|
3337
3337
|
}, [isControlled, caller]);
|
|
3338
3338
|
}
|
|
3339
|
-
const setValue = React$
|
|
3339
|
+
const setValue = React$19.useCallback(
|
|
3340
3340
|
(nextValue) => {
|
|
3341
3341
|
if (isControlled) {
|
|
3342
3342
|
const value2 = isFunction$1(nextValue) ? nextValue(prop) : nextValue;
|
|
@@ -3355,13 +3355,13 @@ function useUncontrolledState({
|
|
|
3355
3355
|
defaultProp,
|
|
3356
3356
|
onChange
|
|
3357
3357
|
}) {
|
|
3358
|
-
const [value, setValue] = React$
|
|
3359
|
-
const prevValueRef = React$
|
|
3360
|
-
const onChangeRef = React$
|
|
3358
|
+
const [value, setValue] = React$19.useState(defaultProp);
|
|
3359
|
+
const prevValueRef = React$19.useRef(value);
|
|
3360
|
+
const onChangeRef = React$19.useRef(onChange);
|
|
3361
3361
|
useInsertionEffect(() => {
|
|
3362
3362
|
onChangeRef.current = onChange;
|
|
3363
3363
|
}, [onChange]);
|
|
3364
|
-
React$
|
|
3364
|
+
React$19.useEffect(() => {
|
|
3365
3365
|
if (prevValueRef.current !== value) {
|
|
3366
3366
|
onChangeRef.current?.(value);
|
|
3367
3367
|
prevValueRef.current = value;
|
|
@@ -3377,25 +3377,25 @@ function isFunction$1(value) {
|
|
|
3377
3377
|
await importShared('react');
|
|
3378
3378
|
|
|
3379
3379
|
// src/slot.tsx
|
|
3380
|
-
const React$
|
|
3380
|
+
const React$18 = await importShared('react');
|
|
3381
3381
|
// @__NO_SIDE_EFFECTS__
|
|
3382
3382
|
function createSlot(ownerName) {
|
|
3383
3383
|
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
3384
|
-
const Slot2 = React$
|
|
3384
|
+
const Slot2 = React$18.forwardRef((props, forwardedRef) => {
|
|
3385
3385
|
const { children, ...slotProps } = props;
|
|
3386
|
-
const childrenArray = React$
|
|
3386
|
+
const childrenArray = React$18.Children.toArray(children);
|
|
3387
3387
|
const slottable = childrenArray.find(isSlottable);
|
|
3388
3388
|
if (slottable) {
|
|
3389
3389
|
const newElement = slottable.props.children;
|
|
3390
3390
|
const newChildren = childrenArray.map((child) => {
|
|
3391
3391
|
if (child === slottable) {
|
|
3392
|
-
if (React$
|
|
3393
|
-
return React$
|
|
3392
|
+
if (React$18.Children.count(newElement) > 1) return React$18.Children.only(null);
|
|
3393
|
+
return React$18.isValidElement(newElement) ? newElement.props.children : null;
|
|
3394
3394
|
} else {
|
|
3395
3395
|
return child;
|
|
3396
3396
|
}
|
|
3397
3397
|
});
|
|
3398
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React$
|
|
3398
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React$18.isValidElement(newElement) ? React$18.cloneElement(newElement, void 0, newChildren) : null });
|
|
3399
3399
|
}
|
|
3400
3400
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
3401
3401
|
});
|
|
@@ -3405,17 +3405,17 @@ function createSlot(ownerName) {
|
|
|
3405
3405
|
var Slot$4 = /* @__PURE__ */ createSlot("Slot");
|
|
3406
3406
|
// @__NO_SIDE_EFFECTS__
|
|
3407
3407
|
function createSlotClone(ownerName) {
|
|
3408
|
-
const SlotClone = React$
|
|
3408
|
+
const SlotClone = React$18.forwardRef((props, forwardedRef) => {
|
|
3409
3409
|
const { children, ...slotProps } = props;
|
|
3410
|
-
if (React$
|
|
3410
|
+
if (React$18.isValidElement(children)) {
|
|
3411
3411
|
const childrenRef = getElementRef$1(children);
|
|
3412
3412
|
const props2 = mergeProps(slotProps, children.props);
|
|
3413
|
-
if (children.type !== React$
|
|
3413
|
+
if (children.type !== React$18.Fragment) {
|
|
3414
3414
|
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
3415
3415
|
}
|
|
3416
|
-
return React$
|
|
3416
|
+
return React$18.cloneElement(children, props2);
|
|
3417
3417
|
}
|
|
3418
|
-
return React$
|
|
3418
|
+
return React$18.Children.count(children) > 1 ? React$18.Children.only(null) : null;
|
|
3419
3419
|
});
|
|
3420
3420
|
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
3421
3421
|
return SlotClone;
|
|
@@ -3431,7 +3431,7 @@ function createSlottable(ownerName) {
|
|
|
3431
3431
|
return Slottable2;
|
|
3432
3432
|
}
|
|
3433
3433
|
function isSlottable(child) {
|
|
3434
|
-
return React$
|
|
3434
|
+
return React$18.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
3435
3435
|
}
|
|
3436
3436
|
function mergeProps(slotProps, childProps) {
|
|
3437
3437
|
const overrideProps = { ...childProps };
|
|
@@ -3472,7 +3472,7 @@ function getElementRef$1(element) {
|
|
|
3472
3472
|
}
|
|
3473
3473
|
|
|
3474
3474
|
// src/primitive.tsx
|
|
3475
|
-
const React$
|
|
3475
|
+
const React$17 = await importShared('react');
|
|
3476
3476
|
|
|
3477
3477
|
const ReactDOM$5 = await importShared('react-dom');
|
|
3478
3478
|
var NODES = [
|
|
@@ -3496,7 +3496,7 @@ var NODES = [
|
|
|
3496
3496
|
];
|
|
3497
3497
|
var Primitive = NODES.reduce((primitive, node) => {
|
|
3498
3498
|
const Slot = createSlot(`Primitive.${node}`);
|
|
3499
|
-
const Node = React$
|
|
3499
|
+
const Node = React$17.forwardRef((props, forwardedRef) => {
|
|
3500
3500
|
const { asChild, ...primitiveProps } = props;
|
|
3501
3501
|
const Comp = asChild ? Slot : node;
|
|
3502
3502
|
if (typeof window !== "undefined") {
|
|
@@ -3512,21 +3512,21 @@ function dispatchDiscreteCustomEvent(target, event) {
|
|
|
3512
3512
|
}
|
|
3513
3513
|
|
|
3514
3514
|
// packages/react/use-callback-ref/src/use-callback-ref.tsx
|
|
3515
|
-
const React$
|
|
3515
|
+
const React$16 = await importShared('react');
|
|
3516
3516
|
|
|
3517
3517
|
function useCallbackRef$1(callback) {
|
|
3518
|
-
const callbackRef = React$
|
|
3519
|
-
React$
|
|
3518
|
+
const callbackRef = React$16.useRef(callback);
|
|
3519
|
+
React$16.useEffect(() => {
|
|
3520
3520
|
callbackRef.current = callback;
|
|
3521
3521
|
});
|
|
3522
|
-
return React$
|
|
3522
|
+
return React$16.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
3523
3523
|
}
|
|
3524
3524
|
|
|
3525
3525
|
// packages/react/use-escape-keydown/src/use-escape-keydown.tsx
|
|
3526
|
-
const React$
|
|
3526
|
+
const React$15 = await importShared('react');
|
|
3527
3527
|
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
3528
3528
|
const onEscapeKeyDown = useCallbackRef$1(onEscapeKeyDownProp);
|
|
3529
|
-
React$
|
|
3529
|
+
React$15.useEffect(() => {
|
|
3530
3530
|
const handleKeyDown = (event) => {
|
|
3531
3531
|
if (event.key === "Escape") {
|
|
3532
3532
|
onEscapeKeyDown(event);
|
|
@@ -3538,18 +3538,18 @@ function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.docum
|
|
|
3538
3538
|
}
|
|
3539
3539
|
|
|
3540
3540
|
// src/dismissable-layer.tsx
|
|
3541
|
-
const React$
|
|
3541
|
+
const React$14 = await importShared('react');
|
|
3542
3542
|
var DISMISSABLE_LAYER_NAME = "DismissableLayer";
|
|
3543
3543
|
var CONTEXT_UPDATE = "dismissableLayer.update";
|
|
3544
3544
|
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
|
3545
3545
|
var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
|
|
3546
3546
|
var originalBodyPointerEvents;
|
|
3547
|
-
var DismissableLayerContext = React$
|
|
3547
|
+
var DismissableLayerContext = React$14.createContext({
|
|
3548
3548
|
layers: /* @__PURE__ */ new Set(),
|
|
3549
3549
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
3550
3550
|
branches: /* @__PURE__ */ new Set()
|
|
3551
3551
|
});
|
|
3552
|
-
var DismissableLayer = React$
|
|
3552
|
+
var DismissableLayer = React$14.forwardRef(
|
|
3553
3553
|
(props, forwardedRef) => {
|
|
3554
3554
|
const {
|
|
3555
3555
|
disableOutsidePointerEvents = false,
|
|
@@ -3560,10 +3560,10 @@ var DismissableLayer = React$12.forwardRef(
|
|
|
3560
3560
|
onDismiss,
|
|
3561
3561
|
...layerProps
|
|
3562
3562
|
} = props;
|
|
3563
|
-
const context = React$
|
|
3564
|
-
const [node, setNode] = React$
|
|
3563
|
+
const context = React$14.useContext(DismissableLayerContext);
|
|
3564
|
+
const [node, setNode] = React$14.useState(null);
|
|
3565
3565
|
const ownerDocument = node?.ownerDocument ?? globalThis?.document;
|
|
3566
|
-
const [, force] = React$
|
|
3566
|
+
const [, force] = React$14.useState({});
|
|
3567
3567
|
const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
|
|
3568
3568
|
const layers = Array.from(context.layers);
|
|
3569
3569
|
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
|
@@ -3596,7 +3596,7 @@ var DismissableLayer = React$12.forwardRef(
|
|
|
3596
3596
|
onDismiss();
|
|
3597
3597
|
}
|
|
3598
3598
|
}, ownerDocument);
|
|
3599
|
-
React$
|
|
3599
|
+
React$14.useEffect(() => {
|
|
3600
3600
|
if (!node) return;
|
|
3601
3601
|
if (disableOutsidePointerEvents) {
|
|
3602
3602
|
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
|
@@ -3613,7 +3613,7 @@ var DismissableLayer = React$12.forwardRef(
|
|
|
3613
3613
|
}
|
|
3614
3614
|
};
|
|
3615
3615
|
}, [node, ownerDocument, disableOutsidePointerEvents, context]);
|
|
3616
|
-
React$
|
|
3616
|
+
React$14.useEffect(() => {
|
|
3617
3617
|
return () => {
|
|
3618
3618
|
if (!node) return;
|
|
3619
3619
|
context.layers.delete(node);
|
|
@@ -3621,7 +3621,7 @@ var DismissableLayer = React$12.forwardRef(
|
|
|
3621
3621
|
dispatchUpdate();
|
|
3622
3622
|
};
|
|
3623
3623
|
}, [node, context]);
|
|
3624
|
-
React$
|
|
3624
|
+
React$14.useEffect(() => {
|
|
3625
3625
|
const handleUpdate = () => force({});
|
|
3626
3626
|
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
3627
3627
|
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
@@ -3647,11 +3647,11 @@ var DismissableLayer = React$12.forwardRef(
|
|
|
3647
3647
|
);
|
|
3648
3648
|
DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
|
|
3649
3649
|
var BRANCH_NAME = "DismissableLayerBranch";
|
|
3650
|
-
var DismissableLayerBranch = React$
|
|
3651
|
-
const context = React$
|
|
3652
|
-
const ref = React$
|
|
3650
|
+
var DismissableLayerBranch = React$14.forwardRef((props, forwardedRef) => {
|
|
3651
|
+
const context = React$14.useContext(DismissableLayerContext);
|
|
3652
|
+
const ref = React$14.useRef(null);
|
|
3653
3653
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
3654
|
-
React$
|
|
3654
|
+
React$14.useEffect(() => {
|
|
3655
3655
|
const node = ref.current;
|
|
3656
3656
|
if (node) {
|
|
3657
3657
|
context.branches.add(node);
|
|
@@ -3665,10 +3665,10 @@ var DismissableLayerBranch = React$12.forwardRef((props, forwardedRef) => {
|
|
|
3665
3665
|
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
3666
3666
|
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
3667
3667
|
const handlePointerDownOutside = useCallbackRef$1(onPointerDownOutside);
|
|
3668
|
-
const isPointerInsideReactTreeRef = React$
|
|
3669
|
-
const handleClickRef = React$
|
|
3668
|
+
const isPointerInsideReactTreeRef = React$14.useRef(false);
|
|
3669
|
+
const handleClickRef = React$14.useRef(() => {
|
|
3670
3670
|
});
|
|
3671
|
-
React$
|
|
3671
|
+
React$14.useEffect(() => {
|
|
3672
3672
|
const handlePointerDown = (event) => {
|
|
3673
3673
|
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
3674
3674
|
let handleAndDispatchPointerDownOutsideEvent2 = function() {
|
|
@@ -3708,8 +3708,8 @@ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?
|
|
|
3708
3708
|
}
|
|
3709
3709
|
function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
|
|
3710
3710
|
const handleFocusOutside = useCallbackRef$1(onFocusOutside);
|
|
3711
|
-
const isFocusInsideReactTreeRef = React$
|
|
3712
|
-
React$
|
|
3711
|
+
const isFocusInsideReactTreeRef = React$14.useRef(false);
|
|
3712
|
+
React$14.useEffect(() => {
|
|
3713
3713
|
const handleFocus = (event) => {
|
|
3714
3714
|
if (event.target && !isFocusInsideReactTreeRef.current) {
|
|
3715
3715
|
const eventDetail = { originalEvent: event };
|
|
@@ -3742,12 +3742,12 @@ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
|
3742
3742
|
}
|
|
3743
3743
|
|
|
3744
3744
|
// src/focus-scope.tsx
|
|
3745
|
-
const React$
|
|
3745
|
+
const React$13 = await importShared('react');
|
|
3746
3746
|
var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
|
3747
3747
|
var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
|
|
3748
3748
|
var EVENT_OPTIONS$1 = { bubbles: false, cancelable: true };
|
|
3749
3749
|
var FOCUS_SCOPE_NAME = "FocusScope";
|
|
3750
|
-
var FocusScope = React$
|
|
3750
|
+
var FocusScope = React$13.forwardRef((props, forwardedRef) => {
|
|
3751
3751
|
const {
|
|
3752
3752
|
loop = false,
|
|
3753
3753
|
trapped = false,
|
|
@@ -3755,12 +3755,12 @@ var FocusScope = React$11.forwardRef((props, forwardedRef) => {
|
|
|
3755
3755
|
onUnmountAutoFocus: onUnmountAutoFocusProp,
|
|
3756
3756
|
...scopeProps
|
|
3757
3757
|
} = props;
|
|
3758
|
-
const [container, setContainer] = React$
|
|
3758
|
+
const [container, setContainer] = React$13.useState(null);
|
|
3759
3759
|
const onMountAutoFocus = useCallbackRef$1(onMountAutoFocusProp);
|
|
3760
3760
|
const onUnmountAutoFocus = useCallbackRef$1(onUnmountAutoFocusProp);
|
|
3761
|
-
const lastFocusedElementRef = React$
|
|
3761
|
+
const lastFocusedElementRef = React$13.useRef(null);
|
|
3762
3762
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));
|
|
3763
|
-
const focusScope = React$
|
|
3763
|
+
const focusScope = React$13.useRef({
|
|
3764
3764
|
paused: false,
|
|
3765
3765
|
pause() {
|
|
3766
3766
|
this.paused = true;
|
|
@@ -3769,7 +3769,7 @@ var FocusScope = React$11.forwardRef((props, forwardedRef) => {
|
|
|
3769
3769
|
this.paused = false;
|
|
3770
3770
|
}
|
|
3771
3771
|
}).current;
|
|
3772
|
-
React$
|
|
3772
|
+
React$13.useEffect(() => {
|
|
3773
3773
|
if (trapped) {
|
|
3774
3774
|
let handleFocusIn2 = function(event) {
|
|
3775
3775
|
if (focusScope.paused || !container) return;
|
|
@@ -3804,7 +3804,7 @@ var FocusScope = React$11.forwardRef((props, forwardedRef) => {
|
|
|
3804
3804
|
};
|
|
3805
3805
|
}
|
|
3806
3806
|
}, [trapped, container, focusScope.paused]);
|
|
3807
|
-
React$
|
|
3807
|
+
React$13.useEffect(() => {
|
|
3808
3808
|
if (container) {
|
|
3809
3809
|
focusScopesStack.add(focusScope);
|
|
3810
3810
|
const previouslyFocusedElement = document.activeElement;
|
|
@@ -3835,7 +3835,7 @@ var FocusScope = React$11.forwardRef((props, forwardedRef) => {
|
|
|
3835
3835
|
};
|
|
3836
3836
|
}
|
|
3837
3837
|
}, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
|
|
3838
|
-
const handleKeyDown = React$
|
|
3838
|
+
const handleKeyDown = React$13.useCallback(
|
|
3839
3839
|
(event) => {
|
|
3840
3840
|
if (!loop && !trapped) return;
|
|
3841
3841
|
if (focusScope.paused) return;
|
|
@@ -3944,13 +3944,13 @@ function removeLinks(items) {
|
|
|
3944
3944
|
}
|
|
3945
3945
|
|
|
3946
3946
|
// src/portal.tsx
|
|
3947
|
-
const React$
|
|
3947
|
+
const React$12 = await importShared('react');
|
|
3948
3948
|
|
|
3949
3949
|
const ReactDOM$4 = await importShared('react-dom');
|
|
3950
3950
|
var PORTAL_NAME$6 = "Portal";
|
|
3951
|
-
var Portal$5 = React$
|
|
3951
|
+
var Portal$5 = React$12.forwardRef((props, forwardedRef) => {
|
|
3952
3952
|
const { container: containerProp, ...portalProps } = props;
|
|
3953
|
-
const [mounted, setMounted] = React$
|
|
3953
|
+
const [mounted, setMounted] = React$12.useState(false);
|
|
3954
3954
|
useLayoutEffect2(() => setMounted(true), []);
|
|
3955
3955
|
const container = containerProp || mounted && globalThis?.document?.body;
|
|
3956
3956
|
return container ? ReactDOM$4.createPortal(/* @__PURE__ */ jsxRuntimeExports.jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
@@ -3961,10 +3961,10 @@ Portal$5.displayName = PORTAL_NAME$6;
|
|
|
3961
3961
|
const React2$1 = await importShared('react');
|
|
3962
3962
|
|
|
3963
3963
|
// src/use-state-machine.tsx
|
|
3964
|
-
const React
|
|
3964
|
+
const React$11 = await importShared('react');
|
|
3965
3965
|
|
|
3966
3966
|
function useStateMachine$1(initialState, machine) {
|
|
3967
|
-
return React
|
|
3967
|
+
return React$11.useReducer((state, event) => {
|
|
3968
3968
|
const nextState = machine[state][event];
|
|
3969
3969
|
return nextState ?? state;
|
|
3970
3970
|
}, initialState);
|
|
@@ -4089,11 +4089,11 @@ function getElementRef(element) {
|
|
|
4089
4089
|
}
|
|
4090
4090
|
|
|
4091
4091
|
// packages/react/focus-guards/src/focus-guards.tsx
|
|
4092
|
-
const React$
|
|
4092
|
+
const React$10 = await importShared('react');
|
|
4093
4093
|
|
|
4094
4094
|
var count = 0;
|
|
4095
4095
|
function useFocusGuards() {
|
|
4096
|
-
React$
|
|
4096
|
+
React$10.useEffect(() => {
|
|
4097
4097
|
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
4098
4098
|
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
|
|
4099
4099
|
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
|
|
@@ -4245,8 +4245,8 @@ function useCallbackRef(initialValue, callback) {
|
|
|
4245
4245
|
return ref.facade;
|
|
4246
4246
|
}
|
|
4247
4247
|
|
|
4248
|
-
const React
|
|
4249
|
-
var useIsomorphicLayoutEffect = typeof window !== 'undefined' ? React
|
|
4248
|
+
const React$$ = await importShared('react');
|
|
4249
|
+
var useIsomorphicLayoutEffect = typeof window !== 'undefined' ? React$$.useLayoutEffect : React$$.useEffect;
|
|
4250
4250
|
var currentValues = new WeakMap();
|
|
4251
4251
|
/**
|
|
4252
4252
|
* Merges two or more refs together providing a single interface to set their value
|
|
@@ -4363,7 +4363,7 @@ function createSidecarMedium(options) {
|
|
|
4363
4363
|
return medium;
|
|
4364
4364
|
}
|
|
4365
4365
|
|
|
4366
|
-
const React$
|
|
4366
|
+
const React$_ = await importShared('react');
|
|
4367
4367
|
|
|
4368
4368
|
var SideCar$1 = function (_a) {
|
|
4369
4369
|
var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
|
|
@@ -4374,7 +4374,7 @@ var SideCar$1 = function (_a) {
|
|
|
4374
4374
|
if (!Target) {
|
|
4375
4375
|
throw new Error('Sidecar medium not found');
|
|
4376
4376
|
}
|
|
4377
|
-
return React$
|
|
4377
|
+
return React$_.createElement(Target, __assign({}, rest));
|
|
4378
4378
|
};
|
|
4379
4379
|
SideCar$1.isSideCarExport = true;
|
|
4380
4380
|
function exportSidecar(medium, exported) {
|
|
@@ -4384,16 +4384,16 @@ function exportSidecar(medium, exported) {
|
|
|
4384
4384
|
|
|
4385
4385
|
var effectCar = createSidecarMedium();
|
|
4386
4386
|
|
|
4387
|
-
const React$
|
|
4387
|
+
const React$Z = await importShared('react');
|
|
4388
4388
|
var nothing = function () {
|
|
4389
4389
|
return;
|
|
4390
4390
|
};
|
|
4391
4391
|
/**
|
|
4392
4392
|
* Removes scrollbar from the page and contain the scroll within the Lock
|
|
4393
4393
|
*/
|
|
4394
|
-
var RemoveScroll = React$
|
|
4395
|
-
var ref = React$
|
|
4396
|
-
var _a = React$
|
|
4394
|
+
var RemoveScroll = React$Z.forwardRef(function (props, parentRef) {
|
|
4395
|
+
var ref = React$Z.useRef(null);
|
|
4396
|
+
var _a = React$Z.useState({
|
|
4397
4397
|
onScrollCapture: nothing,
|
|
4398
4398
|
onWheelCapture: nothing,
|
|
4399
4399
|
onTouchMoveCapture: nothing,
|
|
@@ -4402,9 +4402,9 @@ var RemoveScroll = React$X.forwardRef(function (props, parentRef) {
|
|
|
4402
4402
|
var SideCar = sideCar;
|
|
4403
4403
|
var containerRef = useMergeRefs([ref, parentRef]);
|
|
4404
4404
|
var containerProps = __assign(__assign({}, rest), callbacks);
|
|
4405
|
-
return (React$
|
|
4406
|
-
enabled && (React$
|
|
4407
|
-
forwardProps ? (React$
|
|
4405
|
+
return (React$Z.createElement(React$Z.Fragment, null,
|
|
4406
|
+
enabled && (React$Z.createElement(SideCar, { sideCar: effectCar, removeScrollBar: removeScrollBar, shards: shards, noIsolation: noIsolation, inert: inert, setCallbacks: setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode: gapMode })),
|
|
4407
|
+
forwardProps ? (React$Z.cloneElement(React$Z.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef }))) : (React$Z.createElement(Container, __assign({}, containerProps, { className: className, ref: containerRef }), children))));
|
|
4408
4408
|
});
|
|
4409
4409
|
RemoveScroll.defaultProps = {
|
|
4410
4410
|
enabled: true,
|
|
@@ -4471,7 +4471,7 @@ var stylesheetSingleton = function () {
|
|
|
4471
4471
|
};
|
|
4472
4472
|
};
|
|
4473
4473
|
|
|
4474
|
-
const React$
|
|
4474
|
+
const React$Y = await importShared('react');
|
|
4475
4475
|
/**
|
|
4476
4476
|
* creates a hook to control style singleton
|
|
4477
4477
|
* @see {@link styleSingleton} for a safer component version
|
|
@@ -4484,7 +4484,7 @@ const React$W = await importShared('react');
|
|
|
4484
4484
|
var styleHookSingleton = function () {
|
|
4485
4485
|
var sheet = stylesheetSingleton();
|
|
4486
4486
|
return function (styles, isDynamic) {
|
|
4487
|
-
React$
|
|
4487
|
+
React$Y.useEffect(function () {
|
|
4488
4488
|
sheet.add(styles);
|
|
4489
4489
|
return function () {
|
|
4490
4490
|
sheet.remove();
|
|
@@ -4539,7 +4539,7 @@ var getGapWidth = function (gapMode) {
|
|
|
4539
4539
|
};
|
|
4540
4540
|
};
|
|
4541
4541
|
|
|
4542
|
-
const React$
|
|
4542
|
+
const React$X = await importShared('react');
|
|
4543
4543
|
var Style = styleSingleton();
|
|
4544
4544
|
var lockAttribute = 'data-scroll-locked';
|
|
4545
4545
|
// important tip - once we measure scrollBar width and remove them
|
|
@@ -4562,7 +4562,7 @@ var getCurrentUseCounter = function () {
|
|
|
4562
4562
|
return isFinite(counter) ? counter : 0;
|
|
4563
4563
|
};
|
|
4564
4564
|
var useLockAttribute = function () {
|
|
4565
|
-
React$
|
|
4565
|
+
React$X.useEffect(function () {
|
|
4566
4566
|
document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
|
|
4567
4567
|
return function () {
|
|
4568
4568
|
var newCounter = getCurrentUseCounter() - 1;
|
|
@@ -4586,8 +4586,8 @@ var RemoveScrollBar = function (_a) {
|
|
|
4586
4586
|
however it will be used only by the "first" invocation
|
|
4587
4587
|
due to singleton nature of <Style
|
|
4588
4588
|
*/
|
|
4589
|
-
var gap = React$
|
|
4590
|
-
return React$
|
|
4589
|
+
var gap = React$X.useMemo(function () { return getGapWidth(gapMode); }, [gapMode]);
|
|
4590
|
+
return React$X.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '') });
|
|
4591
4591
|
};
|
|
4592
4592
|
|
|
4593
4593
|
var passiveSupported = false;
|
|
@@ -4718,7 +4718,7 @@ var handleScroll = function (axis, endTarget, event, sourceDelta, noOverscroll)
|
|
|
4718
4718
|
return shouldCancelScroll;
|
|
4719
4719
|
};
|
|
4720
4720
|
|
|
4721
|
-
const React$
|
|
4721
|
+
const React$W = await importShared('react');
|
|
4722
4722
|
var getTouchXY = function (event) {
|
|
4723
4723
|
return 'changedTouches' in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];
|
|
4724
4724
|
};
|
|
@@ -4731,16 +4731,16 @@ var generateStyle = function (id) { return "\n .block-interactivity-".concat(id
|
|
|
4731
4731
|
var idCounter = 0;
|
|
4732
4732
|
var lockStack = [];
|
|
4733
4733
|
function RemoveScrollSideCar(props) {
|
|
4734
|
-
var shouldPreventQueue = React$
|
|
4735
|
-
var touchStartRef = React$
|
|
4736
|
-
var activeAxis = React$
|
|
4737
|
-
var id = React$
|
|
4738
|
-
var Style = React$
|
|
4739
|
-
var lastProps = React$
|
|
4740
|
-
React$
|
|
4734
|
+
var shouldPreventQueue = React$W.useRef([]);
|
|
4735
|
+
var touchStartRef = React$W.useRef([0, 0]);
|
|
4736
|
+
var activeAxis = React$W.useRef();
|
|
4737
|
+
var id = React$W.useState(idCounter++)[0];
|
|
4738
|
+
var Style = React$W.useState(styleSingleton)[0];
|
|
4739
|
+
var lastProps = React$W.useRef(props);
|
|
4740
|
+
React$W.useEffect(function () {
|
|
4741
4741
|
lastProps.current = props;
|
|
4742
4742
|
}, [props]);
|
|
4743
|
-
React$
|
|
4743
|
+
React$W.useEffect(function () {
|
|
4744
4744
|
if (props.inert) {
|
|
4745
4745
|
document.body.classList.add("block-interactivity-".concat(id));
|
|
4746
4746
|
var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
|
|
@@ -4752,7 +4752,7 @@ function RemoveScrollSideCar(props) {
|
|
|
4752
4752
|
}
|
|
4753
4753
|
return;
|
|
4754
4754
|
}, [props.inert, props.lockRef.current, props.shards]);
|
|
4755
|
-
var shouldCancelEvent = React$
|
|
4755
|
+
var shouldCancelEvent = React$W.useCallback(function (event, parent) {
|
|
4756
4756
|
if (('touches' in event && event.touches.length === 2) || (event.type === 'wheel' && event.ctrlKey)) {
|
|
4757
4757
|
return !lastProps.current.allowPinchZoom;
|
|
4758
4758
|
}
|
|
@@ -4791,7 +4791,7 @@ function RemoveScrollSideCar(props) {
|
|
|
4791
4791
|
var cancelingAxis = activeAxis.current || currentAxis;
|
|
4792
4792
|
return handleScroll(cancelingAxis, parent, event, cancelingAxis === 'h' ? deltaX : deltaY);
|
|
4793
4793
|
}, []);
|
|
4794
|
-
var shouldPrevent = React$
|
|
4794
|
+
var shouldPrevent = React$W.useCallback(function (_event) {
|
|
4795
4795
|
var event = _event;
|
|
4796
4796
|
if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) {
|
|
4797
4797
|
// not the last active
|
|
@@ -4820,24 +4820,24 @@ function RemoveScrollSideCar(props) {
|
|
|
4820
4820
|
}
|
|
4821
4821
|
}
|
|
4822
4822
|
}, []);
|
|
4823
|
-
var shouldCancel = React$
|
|
4823
|
+
var shouldCancel = React$W.useCallback(function (name, delta, target, should) {
|
|
4824
4824
|
var event = { name: name, delta: delta, target: target, should: should, shadowParent: getOutermostShadowParent(target) };
|
|
4825
4825
|
shouldPreventQueue.current.push(event);
|
|
4826
4826
|
setTimeout(function () {
|
|
4827
4827
|
shouldPreventQueue.current = shouldPreventQueue.current.filter(function (e) { return e !== event; });
|
|
4828
4828
|
}, 1);
|
|
4829
4829
|
}, []);
|
|
4830
|
-
var scrollTouchStart = React$
|
|
4830
|
+
var scrollTouchStart = React$W.useCallback(function (event) {
|
|
4831
4831
|
touchStartRef.current = getTouchXY(event);
|
|
4832
4832
|
activeAxis.current = undefined;
|
|
4833
4833
|
}, []);
|
|
4834
|
-
var scrollWheel = React$
|
|
4834
|
+
var scrollWheel = React$W.useCallback(function (event) {
|
|
4835
4835
|
shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
4836
4836
|
}, []);
|
|
4837
|
-
var scrollTouchMove = React$
|
|
4837
|
+
var scrollTouchMove = React$W.useCallback(function (event) {
|
|
4838
4838
|
shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
4839
4839
|
}, []);
|
|
4840
|
-
React$
|
|
4840
|
+
React$W.useEffect(function () {
|
|
4841
4841
|
lockStack.push(Style);
|
|
4842
4842
|
props.setCallbacks({
|
|
4843
4843
|
onScrollCapture: scrollWheel,
|
|
@@ -4855,9 +4855,9 @@ function RemoveScrollSideCar(props) {
|
|
|
4855
4855
|
};
|
|
4856
4856
|
}, []);
|
|
4857
4857
|
var removeScrollBar = props.removeScrollBar, inert = props.inert;
|
|
4858
|
-
return (React$
|
|
4859
|
-
inert ? React$
|
|
4860
|
-
removeScrollBar ? React$
|
|
4858
|
+
return (React$W.createElement(React$W.Fragment, null,
|
|
4859
|
+
inert ? React$W.createElement(Style, { styles: generateStyle(id) }) : null,
|
|
4860
|
+
removeScrollBar ? React$W.createElement(RemoveScrollBar, { gapMode: props.gapMode }) : null));
|
|
4861
4861
|
}
|
|
4862
4862
|
function getOutermostShadowParent(node) {
|
|
4863
4863
|
var shadowParent = null;
|
|
@@ -4873,8 +4873,8 @@ function getOutermostShadowParent(node) {
|
|
|
4873
4873
|
|
|
4874
4874
|
const SideCar = exportSidecar(effectCar, RemoveScrollSideCar);
|
|
4875
4875
|
|
|
4876
|
-
const React$
|
|
4877
|
-
var ReactRemoveScroll = React$
|
|
4876
|
+
const React$V = await importShared('react');
|
|
4877
|
+
var ReactRemoveScroll = React$V.forwardRef(function (props, ref) { return (React$V.createElement(RemoveScroll, __assign({}, props, { ref: ref, sideCar: SideCar }))); });
|
|
4878
4878
|
ReactRemoveScroll.classNames = RemoveScroll.classNames;
|
|
4879
4879
|
|
|
4880
4880
|
var getDefaultParent = function (originalTarget) {
|
|
@@ -5013,7 +5013,7 @@ var hideOthers = function (originalTarget, parentNode, markerName) {
|
|
|
5013
5013
|
};
|
|
5014
5014
|
|
|
5015
5015
|
// src/dialog.tsx
|
|
5016
|
-
const React$
|
|
5016
|
+
const React$U = await importShared('react');
|
|
5017
5017
|
var DIALOG_NAME = "Dialog";
|
|
5018
5018
|
var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
|
|
5019
5019
|
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|
|
@@ -5026,8 +5026,8 @@ var Dialog$1 = (props) => {
|
|
|
5026
5026
|
onOpenChange,
|
|
5027
5027
|
modal = true
|
|
5028
5028
|
} = props;
|
|
5029
|
-
const triggerRef = React$
|
|
5030
|
-
const contentRef = React$
|
|
5029
|
+
const triggerRef = React$U.useRef(null);
|
|
5030
|
+
const contentRef = React$U.useRef(null);
|
|
5031
5031
|
const [open, setOpen] = useControllableState({
|
|
5032
5032
|
prop: openProp,
|
|
5033
5033
|
defaultProp: defaultOpen ?? false,
|
|
@@ -5045,7 +5045,7 @@ var Dialog$1 = (props) => {
|
|
|
5045
5045
|
descriptionId: useId$4(),
|
|
5046
5046
|
open,
|
|
5047
5047
|
onOpenChange: setOpen,
|
|
5048
|
-
onOpenToggle: React$
|
|
5048
|
+
onOpenToggle: React$U.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
5049
5049
|
modal,
|
|
5050
5050
|
children
|
|
5051
5051
|
}
|
|
@@ -5053,7 +5053,7 @@ var Dialog$1 = (props) => {
|
|
|
5053
5053
|
};
|
|
5054
5054
|
Dialog$1.displayName = DIALOG_NAME;
|
|
5055
5055
|
var TRIGGER_NAME$7 = "DialogTrigger";
|
|
5056
|
-
var DialogTrigger$1 = React$
|
|
5056
|
+
var DialogTrigger$1 = React$U.forwardRef(
|
|
5057
5057
|
(props, forwardedRef) => {
|
|
5058
5058
|
const { __scopeDialog, ...triggerProps } = props;
|
|
5059
5059
|
const context = useDialogContext(TRIGGER_NAME$7, __scopeDialog);
|
|
@@ -5081,11 +5081,11 @@ var [PortalProvider$3, usePortalContext$3] = createDialogContext(PORTAL_NAME$5,
|
|
|
5081
5081
|
var DialogPortal$1 = (props) => {
|
|
5082
5082
|
const { __scopeDialog, forceMount, children, container } = props;
|
|
5083
5083
|
const context = useDialogContext(PORTAL_NAME$5, __scopeDialog);
|
|
5084
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(PortalProvider$3, { scope: __scopeDialog, forceMount, children: React$
|
|
5084
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(PortalProvider$3, { scope: __scopeDialog, forceMount, children: React$U.Children.map(children, (child) => /* @__PURE__ */ jsxRuntimeExports.jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Portal$5, { asChild: true, container, children: child }) })) });
|
|
5085
5085
|
};
|
|
5086
5086
|
DialogPortal$1.displayName = PORTAL_NAME$5;
|
|
5087
5087
|
var OVERLAY_NAME = "DialogOverlay";
|
|
5088
|
-
var DialogOverlay$1 = React$
|
|
5088
|
+
var DialogOverlay$1 = React$U.forwardRef(
|
|
5089
5089
|
(props, forwardedRef) => {
|
|
5090
5090
|
const portalContext = usePortalContext$3(OVERLAY_NAME, props.__scopeDialog);
|
|
5091
5091
|
const { forceMount = portalContext.forceMount, ...overlayProps } = props;
|
|
@@ -5095,7 +5095,7 @@ var DialogOverlay$1 = React$S.forwardRef(
|
|
|
5095
5095
|
);
|
|
5096
5096
|
DialogOverlay$1.displayName = OVERLAY_NAME;
|
|
5097
5097
|
var Slot$3 = createSlot("DialogOverlay.RemoveScroll");
|
|
5098
|
-
var DialogOverlayImpl = React$
|
|
5098
|
+
var DialogOverlayImpl = React$U.forwardRef(
|
|
5099
5099
|
(props, forwardedRef) => {
|
|
5100
5100
|
const { __scopeDialog, ...overlayProps } = props;
|
|
5101
5101
|
const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
|
|
@@ -5115,7 +5115,7 @@ var DialogOverlayImpl = React$S.forwardRef(
|
|
|
5115
5115
|
}
|
|
5116
5116
|
);
|
|
5117
5117
|
var CONTENT_NAME$8 = "DialogContent";
|
|
5118
|
-
var DialogContent$1 = React$
|
|
5118
|
+
var DialogContent$1 = React$U.forwardRef(
|
|
5119
5119
|
(props, forwardedRef) => {
|
|
5120
5120
|
const portalContext = usePortalContext$3(CONTENT_NAME$8, props.__scopeDialog);
|
|
5121
5121
|
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
@@ -5124,12 +5124,12 @@ var DialogContent$1 = React$S.forwardRef(
|
|
|
5124
5124
|
}
|
|
5125
5125
|
);
|
|
5126
5126
|
DialogContent$1.displayName = CONTENT_NAME$8;
|
|
5127
|
-
var DialogContentModal = React$
|
|
5127
|
+
var DialogContentModal = React$U.forwardRef(
|
|
5128
5128
|
(props, forwardedRef) => {
|
|
5129
5129
|
const context = useDialogContext(CONTENT_NAME$8, props.__scopeDialog);
|
|
5130
|
-
const contentRef = React$
|
|
5130
|
+
const contentRef = React$U.useRef(null);
|
|
5131
5131
|
const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
|
|
5132
|
-
React$
|
|
5132
|
+
React$U.useEffect(() => {
|
|
5133
5133
|
const content = contentRef.current;
|
|
5134
5134
|
if (content) return hideOthers(content);
|
|
5135
5135
|
}, []);
|
|
@@ -5158,11 +5158,11 @@ var DialogContentModal = React$S.forwardRef(
|
|
|
5158
5158
|
);
|
|
5159
5159
|
}
|
|
5160
5160
|
);
|
|
5161
|
-
var DialogContentNonModal = React$
|
|
5161
|
+
var DialogContentNonModal = React$U.forwardRef(
|
|
5162
5162
|
(props, forwardedRef) => {
|
|
5163
5163
|
const context = useDialogContext(CONTENT_NAME$8, props.__scopeDialog);
|
|
5164
|
-
const hasInteractedOutsideRef = React$
|
|
5165
|
-
const hasPointerDownOutsideRef = React$
|
|
5164
|
+
const hasInteractedOutsideRef = React$U.useRef(false);
|
|
5165
|
+
const hasPointerDownOutsideRef = React$U.useRef(false);
|
|
5166
5166
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
5167
5167
|
DialogContentImpl,
|
|
5168
5168
|
{
|
|
@@ -5198,11 +5198,11 @@ var DialogContentNonModal = React$S.forwardRef(
|
|
|
5198
5198
|
);
|
|
5199
5199
|
}
|
|
5200
5200
|
);
|
|
5201
|
-
var DialogContentImpl = React$
|
|
5201
|
+
var DialogContentImpl = React$U.forwardRef(
|
|
5202
5202
|
(props, forwardedRef) => {
|
|
5203
5203
|
const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;
|
|
5204
5204
|
const context = useDialogContext(CONTENT_NAME$8, __scopeDialog);
|
|
5205
|
-
const contentRef = React$
|
|
5205
|
+
const contentRef = React$U.useRef(null);
|
|
5206
5206
|
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
5207
5207
|
useFocusGuards();
|
|
5208
5208
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
@@ -5237,7 +5237,7 @@ var DialogContentImpl = React$S.forwardRef(
|
|
|
5237
5237
|
}
|
|
5238
5238
|
);
|
|
5239
5239
|
var TITLE_NAME = "DialogTitle";
|
|
5240
|
-
var DialogTitle$1 = React$
|
|
5240
|
+
var DialogTitle$1 = React$U.forwardRef(
|
|
5241
5241
|
(props, forwardedRef) => {
|
|
5242
5242
|
const { __scopeDialog, ...titleProps } = props;
|
|
5243
5243
|
const context = useDialogContext(TITLE_NAME, __scopeDialog);
|
|
@@ -5246,7 +5246,7 @@ var DialogTitle$1 = React$S.forwardRef(
|
|
|
5246
5246
|
);
|
|
5247
5247
|
DialogTitle$1.displayName = TITLE_NAME;
|
|
5248
5248
|
var DESCRIPTION_NAME = "DialogDescription";
|
|
5249
|
-
var DialogDescription$1 = React$
|
|
5249
|
+
var DialogDescription$1 = React$U.forwardRef(
|
|
5250
5250
|
(props, forwardedRef) => {
|
|
5251
5251
|
const { __scopeDialog, ...descriptionProps } = props;
|
|
5252
5252
|
const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
|
|
@@ -5255,7 +5255,7 @@ var DialogDescription$1 = React$S.forwardRef(
|
|
|
5255
5255
|
);
|
|
5256
5256
|
DialogDescription$1.displayName = DESCRIPTION_NAME;
|
|
5257
5257
|
var CLOSE_NAME$1 = "DialogClose";
|
|
5258
|
-
var DialogClose$1 = React$
|
|
5258
|
+
var DialogClose$1 = React$U.forwardRef(
|
|
5259
5259
|
(props, forwardedRef) => {
|
|
5260
5260
|
const { __scopeDialog, ...closeProps } = props;
|
|
5261
5261
|
const context = useDialogContext(CLOSE_NAME$1, __scopeDialog);
|
|
@@ -5287,7 +5287,7 @@ var TitleWarning = ({ titleId }) => {
|
|
|
5287
5287
|
If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
5288
5288
|
|
|
5289
5289
|
For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
|
|
5290
|
-
React$
|
|
5290
|
+
React$U.useEffect(() => {
|
|
5291
5291
|
if (titleId) {
|
|
5292
5292
|
const hasTitle = document.getElementById(titleId);
|
|
5293
5293
|
if (!hasTitle) console.error(MESSAGE);
|
|
@@ -5299,7 +5299,7 @@ var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
|
|
|
5299
5299
|
var DescriptionWarning = ({ contentRef, descriptionId }) => {
|
|
5300
5300
|
const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
|
|
5301
5301
|
const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
|
|
5302
|
-
React$
|
|
5302
|
+
React$U.useEffect(() => {
|
|
5303
5303
|
const describedById = contentRef.current?.getAttribute("aria-describedby");
|
|
5304
5304
|
if (descriptionId && describedById) {
|
|
5305
5305
|
const hasDescription = document.getElementById(descriptionId);
|
|
@@ -5321,7 +5321,7 @@ const t$1 = await importShared('react');
|
|
|
5321
5321
|
var N='[cmdk-group=""]',Y$1='[cmdk-group-items=""]',be='[cmdk-group-heading=""]',le='[cmdk-item=""]',ce=`${le}:not([aria-disabled="true"])`,Z$1="cmdk-item-select",T$1="data-value",Re=(r,o,n)=>W$1(r,o,n),ue=t$1.createContext(void 0),K$1=()=>t$1.useContext(ue),de=t$1.createContext(void 0),ee=()=>t$1.useContext(de),fe=t$1.createContext(void 0),me=t$1.forwardRef((r,o)=>{let n=L$1(()=>{var e,a;return {search:"",value:(a=(e=r.value)!=null?e:r.defaultValue)!=null?a:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),u=L$1(()=>new Set),c=L$1(()=>new Map),d=L$1(()=>new Map),f=L$1(()=>new Set),p=pe(r),{label:b,children:m,value:R,onValueChange:x,filter:C,shouldFilter:S,loop:A,disablePointerSelection:ge=false,vimBindings:j=true,...O}=r,$=useId$4(),q=useId$4(),_=useId$4(),I=t$1.useRef(null),v=ke$1();k(()=>{if(R!==void 0){let e=R.trim();n.current.value=e,E.emit();}},[R]),k(()=>{v(6,ne);},[]);let E=t$1.useMemo(()=>({subscribe:e=>(f.current.add(e),()=>f.current.delete(e)),snapshot:()=>n.current,setState:(e,a,s)=>{var i,l,g,y;if(!Object.is(n.current[e],a)){if(n.current[e]=a,e==="search")J(),z(),v(1,W);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let h=document.getElementById(_);h?h.focus():(i=document.getElementById($))==null||i.focus();}if(v(7,()=>{var h;n.current.selectedItemId=(h=M())==null?void 0:h.id,E.emit();}),s||v(5,ne),((l=p.current)==null?void 0:l.value)!==void 0){let h=a!=null?a:"";(y=(g=p.current).onValueChange)==null||y.call(g,h);return}}E.emit();}},emit:()=>{f.current.forEach(e=>e());}}),[]),U=t$1.useMemo(()=>({value:(e,a,s)=>{var i;a!==((i=d.current.get(e))==null?void 0:i.value)&&(d.current.set(e,{value:a,keywords:s}),n.current.filtered.items.set(e,te(a,s)),v(2,()=>{z(),E.emit();}));},item:(e,a)=>(u.current.add(e),a&&(c.current.has(a)?c.current.get(a).add(e):c.current.set(a,new Set([e]))),v(3,()=>{J(),z(),n.current.value||W(),E.emit();}),()=>{d.current.delete(e),u.current.delete(e),n.current.filtered.items.delete(e);let s=M();v(4,()=>{J(),(s==null?void 0:s.getAttribute("id"))===e&&W(),E.emit();});}),group:e=>(c.current.has(e)||c.current.set(e,new Set),()=>{d.current.delete(e),c.current.delete(e);}),filter:()=>p.current.shouldFilter,label:b||r["aria-label"],getDisablePointerSelection:()=>p.current.disablePointerSelection,listId:$,inputId:_,labelId:q,listInnerRef:I}),[]);function te(e,a){var i,l;let s=(l=(i=p.current)==null?void 0:i.filter)!=null?l:Re;return e?s(e,n.current.search,a):0}function z(){if(!n.current.search||p.current.shouldFilter===false)return;let e=n.current.filtered.items,a=[];n.current.filtered.groups.forEach(i=>{let l=c.current.get(i),g=0;l.forEach(y=>{let h=e.get(y);g=Math.max(h,g);}),a.push([i,g]);});let s=I.current;V().sort((i,l)=>{var h,F;let g=i.getAttribute("id"),y=l.getAttribute("id");return ((h=e.get(y))!=null?h:0)-((F=e.get(g))!=null?F:0)}).forEach(i=>{let l=i.closest(Y$1);l?l.appendChild(i.parentElement===l?i:i.closest(`${Y$1} > *`)):s.appendChild(i.parentElement===s?i:i.closest(`${Y$1} > *`));}),a.sort((i,l)=>l[1]-i[1]).forEach(i=>{var g;let l=(g=I.current)==null?void 0:g.querySelector(`${N}[${T$1}="${encodeURIComponent(i[0])}"]`);l==null||l.parentElement.appendChild(l);});}function W(){let e=V().find(s=>s.getAttribute("aria-disabled")!=="true"),a=e==null?void 0:e.getAttribute(T$1);E.setState("value",a||void 0);}function J(){var a,s,i,l;if(!n.current.search||p.current.shouldFilter===false){n.current.filtered.count=u.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let g of u.current){let y=(s=(a=d.current.get(g))==null?void 0:a.value)!=null?s:"",h=(l=(i=d.current.get(g))==null?void 0:i.keywords)!=null?l:[],F=te(y,h);n.current.filtered.items.set(g,F),F>0&&e++;}for(let[g,y]of c.current)for(let h of y)if(n.current.filtered.items.get(h)>0){n.current.filtered.groups.add(g);break}n.current.filtered.count=e;}function ne(){var a,s,i;let e=M();e&&(((a=e.parentElement)==null?void 0:a.firstChild)===e&&((i=(s=e.closest(N))==null?void 0:s.querySelector(be))==null||i.scrollIntoView({block:"nearest"})),e.scrollIntoView({block:"nearest"}));}function M(){var e;return (e=I.current)==null?void 0:e.querySelector(`${le}[aria-selected="true"]`)}function V(){var e;return Array.from(((e=I.current)==null?void 0:e.querySelectorAll(ce))||[])}function X(e){let s=V()[e];s&&E.setState("value",s.getAttribute(T$1));}function Q(e){var g;let a=M(),s=V(),i=s.findIndex(y=>y===a),l=s[i+e];(g=p.current)!=null&&g.loop&&(l=i+e<0?s[s.length-1]:i+e===s.length?s[0]:s[i+e]),l&&E.setState("value",l.getAttribute(T$1));}function re(e){let a=M(),s=a==null?void 0:a.closest(N),i;for(;s&&!i;)s=e>0?we(s,N):De(s,N),i=s==null?void 0:s.querySelector(ce);i?E.setState("value",i.getAttribute(T$1)):Q(e);}let oe=()=>X(V().length-1),ie=e=>{e.preventDefault(),e.metaKey?oe():e.altKey?re(1):Q(1);},se=e=>{e.preventDefault(),e.metaKey?X(0):e.altKey?re(-1):Q(-1);};return t$1.createElement(Primitive.div,{ref:o,tabIndex:-1,...O,"cmdk-root":"",onKeyDown:e=>{var s;(s=O.onKeyDown)==null||s.call(O,e);let a=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||a))switch(e.key){case "n":case "j":{j&&e.ctrlKey&&ie(e);break}case "ArrowDown":{ie(e);break}case "p":case "k":{j&&e.ctrlKey&&se(e);break}case "ArrowUp":{se(e);break}case "Home":{e.preventDefault(),X(0);break}case "End":{e.preventDefault(),oe();break}case "Enter":{e.preventDefault();let i=M();if(i){let l=new Event(Z$1);i.dispatchEvent(l);}}}}},t$1.createElement("label",{"cmdk-label":"",htmlFor:U.inputId,id:U.labelId,style:Te},b),B(r,e=>t$1.createElement(de.Provider,{value:E},t$1.createElement(ue.Provider,{value:U},e))))}),he=t$1.forwardRef((r,o)=>{var _,I;let n=useId$4(),u=t$1.useRef(null),c=t$1.useContext(fe),d=K$1(),f=pe(r),p=(I=(_=f.current)==null?void 0:_.forceMount)!=null?I:c==null?void 0:c.forceMount;k(()=>{if(!p)return d.item(n,c==null?void 0:c.id)},[p]);let b=ve(n,u,[r.value,r.children,u],r.keywords),m=ee(),R=P(v=>v.value&&v.value===b.current),x=P(v=>p||d.filter()===false?true:v.search?v.filtered.items.get(n)>0:true);t$1.useEffect(()=>{let v=u.current;if(!(!v||r.disabled))return v.addEventListener(Z$1,C),()=>v.removeEventListener(Z$1,C)},[x,r.onSelect,r.disabled]);function C(){var v,E;S(),(E=(v=f.current).onSelect)==null||E.call(v,b.current);}function S(){m.setState("value",b.current,true);}if(!x)return null;let{disabled:A,value:ge,onSelect:j,forceMount:O,keywords:$,...q}=r;return t$1.createElement(Primitive.div,{ref:composeRefs(u,o),...q,id:n,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!R,"data-disabled":!!A,"data-selected":!!R,onPointerMove:A||d.getDisablePointerSelection()?void 0:S,onClick:A?void 0:C},r.children)}),Ee=t$1.forwardRef((r,o)=>{let{heading:n,children:u,forceMount:c,...d}=r,f=useId$4(),p=t$1.useRef(null),b=t$1.useRef(null),m=useId$4(),R=K$1(),x=P(S=>c||R.filter()===false?true:S.search?S.filtered.groups.has(f):true);k(()=>R.group(f),[]),ve(f,p,[r.value,r.heading,b]);let C=t$1.useMemo(()=>({id:f,forceMount:c}),[c]);return t$1.createElement(Primitive.div,{ref:composeRefs(p,o),...d,"cmdk-group":"",role:"presentation",hidden:x?void 0:true},n&&t$1.createElement("div",{ref:b,"cmdk-group-heading":"","aria-hidden":true,id:m},n),B(r,S=>t$1.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?m:void 0},t$1.createElement(fe.Provider,{value:C},S))))}),ye=t$1.forwardRef((r,o)=>{let{alwaysRender:n,...u}=r,c=t$1.useRef(null),d=P(f=>!f.search);return !n&&!d?null:t$1.createElement(Primitive.div,{ref:composeRefs(c,o),...u,"cmdk-separator":"",role:"separator"})}),Se=t$1.forwardRef((r,o)=>{let{onValueChange:n,...u}=r,c=r.value!=null,d=ee(),f=P(m=>m.search),p=P(m=>m.selectedItemId),b=K$1();return t$1.useEffect(()=>{r.value!=null&&d.setState("search",r.value);},[r.value]),t$1.createElement(Primitive.input,{ref:o,...u,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:false,"aria-autocomplete":"list",role:"combobox","aria-expanded":true,"aria-controls":b.listId,"aria-labelledby":b.labelId,"aria-activedescendant":p,id:b.inputId,type:"text",value:c?r.value:f,onChange:m=>{c||d.setState("search",m.target.value),n==null||n(m.target.value);}})}),Ce=t$1.forwardRef((r,o)=>{let{children:n,label:u="Suggestions",...c}=r,d=t$1.useRef(null),f=t$1.useRef(null),p=P(m=>m.selectedItemId),b=K$1();return t$1.useEffect(()=>{if(f.current&&d.current){let m=f.current,R=d.current,x,C=new ResizeObserver(()=>{x=requestAnimationFrame(()=>{let S=m.offsetHeight;R.style.setProperty("--cmdk-list-height",S.toFixed(1)+"px");});});return C.observe(m),()=>{cancelAnimationFrame(x),C.unobserve(m);}}},[]),t$1.createElement(Primitive.div,{ref:composeRefs(d,o),...c,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":p,"aria-label":u,id:b.listId},B(r,m=>t$1.createElement("div",{ref:composeRefs(f,b.listInnerRef),"cmdk-list-sizer":""},m)))}),xe=t$1.forwardRef((r,o)=>{let{open:n,onOpenChange:u,overlayClassName:c,contentClassName:d,container:f,...p}=r;return t$1.createElement(Root$8,{open:n,onOpenChange:u},t$1.createElement(Portal$4,{container:f},t$1.createElement(Overlay,{"cmdk-overlay":"",className:c}),t$1.createElement(Content$3,{"aria-label":r.label,"cmdk-dialog":"",className:d},t$1.createElement(me,{ref:o,...p}))))}),Ie$1=t$1.forwardRef((r,o)=>P(u=>u.filtered.count===0)?t$1.createElement(Primitive.div,{ref:o,...r,"cmdk-empty":"",role:"presentation"}):null),Pe=t$1.forwardRef((r,o)=>{let{progress:n,children:u,label:c="Loading...",...d}=r;return t$1.createElement(Primitive.div,{ref:o,...d,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":c},B(r,f=>t$1.createElement("div",{"aria-hidden":true},f)))}),_e=Object.assign(me,{List:Ce,Item:he,Input:Se,Group:Ee,Separator:ye,Dialog:xe,Empty:Ie$1,Loading:Pe});function we(r,o){let n=r.nextElementSibling;for(;n;){if(n.matches(o))return n;n=n.nextElementSibling;}}function De(r,o){let n=r.previousElementSibling;for(;n;){if(n.matches(o))return n;n=n.previousElementSibling;}}function pe(r){let o=t$1.useRef(r);return k(()=>{o.current=r;}),o}var k=typeof window=="undefined"?t$1.useEffect:t$1.useLayoutEffect;function L$1(r){let o=t$1.useRef();return o.current===void 0&&(o.current=r()),o}function P(r){let o=ee(),n=()=>r(o.snapshot());return t$1.useSyncExternalStore(o.subscribe,n,n)}function ve(r,o,n,u=[]){let c=t$1.useRef(),d=K$1();return k(()=>{var b;let f=(()=>{var m;for(let R of n){if(typeof R=="string")return R.trim();if(typeof R=="object"&&"current"in R)return R.current?(m=R.current.textContent)==null?void 0:m.trim():c.current}})(),p=u.map(m=>m.trim());d.value(r,f,p),(b=o.current)==null||b.setAttribute(T$1,f),c.current=f;}),c}var ke$1=()=>{let[r,o]=t$1.useState(),n=L$1(()=>new Map);return k(()=>{n.current.forEach(u=>u()),n.current=new Map;},[r]),(u,c)=>{n.current.set(u,c),o({});}};function Me(r){let o=r.type;return typeof o=="function"?o(r.props):"render"in o?o.render(r.props):r}function B({asChild:r,children:o},n){return r&&t$1.isValidElement(o)?t$1.cloneElement(Me(o),{ref:o.ref},n(o.props.children)):n(o)}var Te={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};
|
|
5322
5322
|
|
|
5323
5323
|
// src/visually-hidden.tsx
|
|
5324
|
-
const React$
|
|
5324
|
+
const React$T = await importShared('react');
|
|
5325
5325
|
var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
5326
5326
|
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
5327
5327
|
position: "absolute",
|
|
@@ -5336,7 +5336,7 @@ var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
|
5336
5336
|
wordWrap: "normal"
|
|
5337
5337
|
});
|
|
5338
5338
|
var NAME$3 = "VisuallyHidden";
|
|
5339
|
-
var VisuallyHidden = React$
|
|
5339
|
+
var VisuallyHidden = React$T.forwardRef(
|
|
5340
5340
|
(props, forwardedRef) => {
|
|
5341
5341
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
5342
5342
|
Primitive.span,
|
|
@@ -5352,7 +5352,7 @@ VisuallyHidden.displayName = NAME$3;
|
|
|
5352
5352
|
var Root$7 = VisuallyHidden;
|
|
5353
5353
|
|
|
5354
5354
|
// src/collection-legacy.tsx
|
|
5355
|
-
const React$
|
|
5355
|
+
const React$S = await importShared('react');
|
|
5356
5356
|
function createCollection(name) {
|
|
5357
5357
|
const PROVIDER_NAME = name + "CollectionProvider";
|
|
5358
5358
|
const [createCollectionContext, createCollectionScope] = createContextScope(PROVIDER_NAME);
|
|
@@ -5362,14 +5362,14 @@ function createCollection(name) {
|
|
|
5362
5362
|
);
|
|
5363
5363
|
const CollectionProvider = (props) => {
|
|
5364
5364
|
const { scope, children } = props;
|
|
5365
|
-
const ref = React$
|
|
5366
|
-
const itemMap = React$
|
|
5365
|
+
const ref = React$S.useRef(null);
|
|
5366
|
+
const itemMap = React$S.useRef(/* @__PURE__ */ new Map()).current;
|
|
5367
5367
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
5368
5368
|
};
|
|
5369
5369
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
5370
5370
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
5371
5371
|
const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);
|
|
5372
|
-
const CollectionSlot = React$
|
|
5372
|
+
const CollectionSlot = React$S.forwardRef(
|
|
5373
5373
|
(props, forwardedRef) => {
|
|
5374
5374
|
const { scope, children } = props;
|
|
5375
5375
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
@@ -5381,13 +5381,13 @@ function createCollection(name) {
|
|
|
5381
5381
|
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
5382
5382
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
5383
5383
|
const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);
|
|
5384
|
-
const CollectionItemSlot = React$
|
|
5384
|
+
const CollectionItemSlot = React$S.forwardRef(
|
|
5385
5385
|
(props, forwardedRef) => {
|
|
5386
5386
|
const { scope, children, ...itemData } = props;
|
|
5387
|
-
const ref = React$
|
|
5387
|
+
const ref = React$S.useRef(null);
|
|
5388
5388
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
5389
5389
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
5390
|
-
React$
|
|
5390
|
+
React$S.useEffect(() => {
|
|
5391
5391
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
5392
5392
|
return () => void context.itemMap.delete(ref);
|
|
5393
5393
|
});
|
|
@@ -5397,7 +5397,7 @@ function createCollection(name) {
|
|
|
5397
5397
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
5398
5398
|
function useCollection(scope) {
|
|
5399
5399
|
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
5400
|
-
const getItems = React$
|
|
5400
|
+
const getItems = React$S.useCallback(() => {
|
|
5401
5401
|
const collectionNode = context.collectionRef.current;
|
|
5402
5402
|
if (!collectionNode) return [];
|
|
5403
5403
|
const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
|
|
@@ -5420,19 +5420,19 @@ function createCollection(name) {
|
|
|
5420
5420
|
await importShared('react');
|
|
5421
5421
|
|
|
5422
5422
|
// packages/react/direction/src/direction.tsx
|
|
5423
|
-
const React$
|
|
5424
|
-
var DirectionContext = React$
|
|
5423
|
+
const React$R = await importShared('react');
|
|
5424
|
+
var DirectionContext = React$R.createContext(void 0);
|
|
5425
5425
|
function useDirection(localDir) {
|
|
5426
|
-
const globalDir = React$
|
|
5426
|
+
const globalDir = React$R.useContext(DirectionContext);
|
|
5427
5427
|
return localDir || globalDir || "ltr";
|
|
5428
5428
|
}
|
|
5429
5429
|
|
|
5430
5430
|
// packages/react/use-previous/src/use-previous.tsx
|
|
5431
|
-
const React$
|
|
5431
|
+
const React$Q = await importShared('react');
|
|
5432
5432
|
|
|
5433
5433
|
function usePrevious(value) {
|
|
5434
|
-
const ref = React$
|
|
5435
|
-
return React$
|
|
5434
|
+
const ref = React$Q.useRef({ value, previous: value });
|
|
5435
|
+
return React$Q.useMemo(() => {
|
|
5436
5436
|
if (ref.current.value !== value) {
|
|
5437
5437
|
ref.current.previous = ref.current.value;
|
|
5438
5438
|
ref.current.value = value;
|
|
@@ -5442,9 +5442,9 @@ function usePrevious(value) {
|
|
|
5442
5442
|
}
|
|
5443
5443
|
|
|
5444
5444
|
// packages/react/use-size/src/use-size.tsx
|
|
5445
|
-
const React$
|
|
5445
|
+
const React$P = await importShared('react');
|
|
5446
5446
|
function useSize(element) {
|
|
5447
|
-
const [size, setSize] = React$
|
|
5447
|
+
const [size, setSize] = React$P.useState(void 0);
|
|
5448
5448
|
useLayoutEffect2(() => {
|
|
5449
5449
|
if (element) {
|
|
5450
5450
|
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
|
@@ -5479,7 +5479,7 @@ function useSize(element) {
|
|
|
5479
5479
|
}
|
|
5480
5480
|
|
|
5481
5481
|
// src/checkbox.tsx
|
|
5482
|
-
const React$
|
|
5482
|
+
const React$O = await importShared('react');
|
|
5483
5483
|
var CHECKBOX_NAME = "Checkbox";
|
|
5484
5484
|
var [createCheckboxContext, createCheckboxScope] = createContextScope(CHECKBOX_NAME);
|
|
5485
5485
|
var [CheckboxProviderImpl, useCheckboxContext] = createCheckboxContext(CHECKBOX_NAME);
|
|
@@ -5504,9 +5504,9 @@ function CheckboxProvider(props) {
|
|
|
5504
5504
|
onChange: onCheckedChange,
|
|
5505
5505
|
caller: CHECKBOX_NAME
|
|
5506
5506
|
});
|
|
5507
|
-
const [control, setControl] = React$
|
|
5508
|
-
const [bubbleInput, setBubbleInput] = React$
|
|
5509
|
-
const hasConsumerStoppedPropagationRef = React$
|
|
5507
|
+
const [control, setControl] = React$O.useState(null);
|
|
5508
|
+
const [bubbleInput, setBubbleInput] = React$O.useState(null);
|
|
5509
|
+
const hasConsumerStoppedPropagationRef = React$O.useRef(false);
|
|
5510
5510
|
const isFormControl = control ? !!form || !!control.closest("form") : (
|
|
5511
5511
|
// We set this to true by default so that events bubble to forms without JS (SSR)
|
|
5512
5512
|
true
|
|
@@ -5537,7 +5537,7 @@ function CheckboxProvider(props) {
|
|
|
5537
5537
|
);
|
|
5538
5538
|
}
|
|
5539
5539
|
var TRIGGER_NAME$6 = "CheckboxTrigger";
|
|
5540
|
-
var CheckboxTrigger = React$
|
|
5540
|
+
var CheckboxTrigger = React$O.forwardRef(
|
|
5541
5541
|
({ __scopeCheckbox, onKeyDown, onClick, ...checkboxProps }, forwardedRef) => {
|
|
5542
5542
|
const {
|
|
5543
5543
|
control,
|
|
@@ -5552,8 +5552,8 @@ var CheckboxTrigger = React$M.forwardRef(
|
|
|
5552
5552
|
bubbleInput
|
|
5553
5553
|
} = useCheckboxContext(TRIGGER_NAME$6, __scopeCheckbox);
|
|
5554
5554
|
const composedRefs = useComposedRefs(forwardedRef, setControl);
|
|
5555
|
-
const initialCheckedStateRef = React$
|
|
5556
|
-
React$
|
|
5555
|
+
const initialCheckedStateRef = React$O.useRef(checked);
|
|
5556
|
+
React$O.useEffect(() => {
|
|
5557
5557
|
const form = control?.form;
|
|
5558
5558
|
if (form) {
|
|
5559
5559
|
const reset = () => setChecked(initialCheckedStateRef.current);
|
|
@@ -5589,7 +5589,7 @@ var CheckboxTrigger = React$M.forwardRef(
|
|
|
5589
5589
|
}
|
|
5590
5590
|
);
|
|
5591
5591
|
CheckboxTrigger.displayName = TRIGGER_NAME$6;
|
|
5592
|
-
var Checkbox$1 = React$
|
|
5592
|
+
var Checkbox$1 = React$O.forwardRef(
|
|
5593
5593
|
(props, forwardedRef) => {
|
|
5594
5594
|
const {
|
|
5595
5595
|
__scopeCheckbox,
|
|
@@ -5637,7 +5637,7 @@ var Checkbox$1 = React$M.forwardRef(
|
|
|
5637
5637
|
);
|
|
5638
5638
|
Checkbox$1.displayName = CHECKBOX_NAME;
|
|
5639
5639
|
var INDICATOR_NAME$2 = "CheckboxIndicator";
|
|
5640
|
-
var CheckboxIndicator = React$
|
|
5640
|
+
var CheckboxIndicator = React$O.forwardRef(
|
|
5641
5641
|
(props, forwardedRef) => {
|
|
5642
5642
|
const { __scopeCheckbox, forceMount, ...indicatorProps } = props;
|
|
5643
5643
|
const context = useCheckboxContext(INDICATOR_NAME$2, __scopeCheckbox);
|
|
@@ -5661,7 +5661,7 @@ var CheckboxIndicator = React$M.forwardRef(
|
|
|
5661
5661
|
);
|
|
5662
5662
|
CheckboxIndicator.displayName = INDICATOR_NAME$2;
|
|
5663
5663
|
var BUBBLE_INPUT_NAME$2 = "CheckboxBubbleInput";
|
|
5664
|
-
var CheckboxBubbleInput = React$
|
|
5664
|
+
var CheckboxBubbleInput = React$O.forwardRef(
|
|
5665
5665
|
({ __scopeCheckbox, ...props }, forwardedRef) => {
|
|
5666
5666
|
const {
|
|
5667
5667
|
control,
|
|
@@ -5679,7 +5679,7 @@ var CheckboxBubbleInput = React$M.forwardRef(
|
|
|
5679
5679
|
const composedRefs = useComposedRefs(forwardedRef, setBubbleInput);
|
|
5680
5680
|
const prevChecked = usePrevious(checked);
|
|
5681
5681
|
const controlSize = useSize(control);
|
|
5682
|
-
React$
|
|
5682
|
+
React$O.useEffect(() => {
|
|
5683
5683
|
const input = bubbleInput;
|
|
5684
5684
|
if (!input) return;
|
|
5685
5685
|
const inputProto = window.HTMLInputElement.prototype;
|
|
@@ -5696,7 +5696,7 @@ var CheckboxBubbleInput = React$M.forwardRef(
|
|
|
5696
5696
|
input.dispatchEvent(event);
|
|
5697
5697
|
}
|
|
5698
5698
|
}, [bubbleInput, prevChecked, checked, hasConsumerStoppedPropagationRef]);
|
|
5699
|
-
const defaultCheckedRef = React$
|
|
5699
|
+
const defaultCheckedRef = React$O.useRef(isIndeterminate$1(checked) ? false : checked);
|
|
5700
5700
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
5701
5701
|
Primitive.input,
|
|
5702
5702
|
{
|
|
@@ -7562,7 +7562,7 @@ const computePosition = (reference, floating, options) => {
|
|
|
7562
7562
|
});
|
|
7563
7563
|
};
|
|
7564
7564
|
|
|
7565
|
-
const React$
|
|
7565
|
+
const React$N = await importShared('react');
|
|
7566
7566
|
|
|
7567
7567
|
const {useLayoutEffect: useLayoutEffect$1,useEffect: useEffect$6} = await importShared('react');
|
|
7568
7568
|
|
|
@@ -7635,7 +7635,7 @@ function roundByDPR(element, value) {
|
|
|
7635
7635
|
}
|
|
7636
7636
|
|
|
7637
7637
|
function useLatestRef(value) {
|
|
7638
|
-
const ref = React$
|
|
7638
|
+
const ref = React$N.useRef(value);
|
|
7639
7639
|
index(() => {
|
|
7640
7640
|
ref.current = value;
|
|
7641
7641
|
});
|
|
@@ -7663,7 +7663,7 @@ function useFloating(options) {
|
|
|
7663
7663
|
whileElementsMounted,
|
|
7664
7664
|
open
|
|
7665
7665
|
} = options;
|
|
7666
|
-
const [data, setData] = React$
|
|
7666
|
+
const [data, setData] = React$N.useState({
|
|
7667
7667
|
x: 0,
|
|
7668
7668
|
y: 0,
|
|
7669
7669
|
strategy,
|
|
@@ -7671,19 +7671,19 @@ function useFloating(options) {
|
|
|
7671
7671
|
middlewareData: {},
|
|
7672
7672
|
isPositioned: false
|
|
7673
7673
|
});
|
|
7674
|
-
const [latestMiddleware, setLatestMiddleware] = React$
|
|
7674
|
+
const [latestMiddleware, setLatestMiddleware] = React$N.useState(middleware);
|
|
7675
7675
|
if (!deepEqual(latestMiddleware, middleware)) {
|
|
7676
7676
|
setLatestMiddleware(middleware);
|
|
7677
7677
|
}
|
|
7678
|
-
const [_reference, _setReference] = React$
|
|
7679
|
-
const [_floating, _setFloating] = React$
|
|
7680
|
-
const setReference = React$
|
|
7678
|
+
const [_reference, _setReference] = React$N.useState(null);
|
|
7679
|
+
const [_floating, _setFloating] = React$N.useState(null);
|
|
7680
|
+
const setReference = React$N.useCallback(node => {
|
|
7681
7681
|
if (node !== referenceRef.current) {
|
|
7682
7682
|
referenceRef.current = node;
|
|
7683
7683
|
_setReference(node);
|
|
7684
7684
|
}
|
|
7685
7685
|
}, []);
|
|
7686
|
-
const setFloating = React$
|
|
7686
|
+
const setFloating = React$N.useCallback(node => {
|
|
7687
7687
|
if (node !== floatingRef.current) {
|
|
7688
7688
|
floatingRef.current = node;
|
|
7689
7689
|
_setFloating(node);
|
|
@@ -7691,14 +7691,14 @@ function useFloating(options) {
|
|
|
7691
7691
|
}, []);
|
|
7692
7692
|
const referenceEl = externalReference || _reference;
|
|
7693
7693
|
const floatingEl = externalFloating || _floating;
|
|
7694
|
-
const referenceRef = React$
|
|
7695
|
-
const floatingRef = React$
|
|
7696
|
-
const dataRef = React$
|
|
7694
|
+
const referenceRef = React$N.useRef(null);
|
|
7695
|
+
const floatingRef = React$N.useRef(null);
|
|
7696
|
+
const dataRef = React$N.useRef(data);
|
|
7697
7697
|
const hasWhileElementsMounted = whileElementsMounted != null;
|
|
7698
7698
|
const whileElementsMountedRef = useLatestRef(whileElementsMounted);
|
|
7699
7699
|
const platformRef = useLatestRef(platform);
|
|
7700
7700
|
const openRef = useLatestRef(open);
|
|
7701
|
-
const update = React$
|
|
7701
|
+
const update = React$N.useCallback(() => {
|
|
7702
7702
|
if (!referenceRef.current || !floatingRef.current) {
|
|
7703
7703
|
return;
|
|
7704
7704
|
}
|
|
@@ -7736,7 +7736,7 @@ function useFloating(options) {
|
|
|
7736
7736
|
}));
|
|
7737
7737
|
}
|
|
7738
7738
|
}, [open]);
|
|
7739
|
-
const isMountedRef = React$
|
|
7739
|
+
const isMountedRef = React$N.useRef(false);
|
|
7740
7740
|
index(() => {
|
|
7741
7741
|
isMountedRef.current = true;
|
|
7742
7742
|
return () => {
|
|
@@ -7753,17 +7753,17 @@ function useFloating(options) {
|
|
|
7753
7753
|
update();
|
|
7754
7754
|
}
|
|
7755
7755
|
}, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);
|
|
7756
|
-
const refs = React$
|
|
7756
|
+
const refs = React$N.useMemo(() => ({
|
|
7757
7757
|
reference: referenceRef,
|
|
7758
7758
|
floating: floatingRef,
|
|
7759
7759
|
setReference,
|
|
7760
7760
|
setFloating
|
|
7761
7761
|
}), [setReference, setFloating]);
|
|
7762
|
-
const elements = React$
|
|
7762
|
+
const elements = React$N.useMemo(() => ({
|
|
7763
7763
|
reference: referenceEl,
|
|
7764
7764
|
floating: floatingEl
|
|
7765
7765
|
}), [referenceEl, floatingEl]);
|
|
7766
|
-
const floatingStyles = React$
|
|
7766
|
+
const floatingStyles = React$N.useMemo(() => {
|
|
7767
7767
|
const initialStyles = {
|
|
7768
7768
|
position: strategy,
|
|
7769
7769
|
left: 0,
|
|
@@ -7789,7 +7789,7 @@ function useFloating(options) {
|
|
|
7789
7789
|
top: y
|
|
7790
7790
|
};
|
|
7791
7791
|
}, [strategy, transform, elements.floating, data.x, data.y]);
|
|
7792
|
-
return React$
|
|
7792
|
+
return React$N.useMemo(() => ({
|
|
7793
7793
|
...data,
|
|
7794
7794
|
update,
|
|
7795
7795
|
refs,
|
|
@@ -7910,9 +7910,9 @@ const arrow = (options, deps) => ({
|
|
|
7910
7910
|
});
|
|
7911
7911
|
|
|
7912
7912
|
// src/arrow.tsx
|
|
7913
|
-
const React$
|
|
7913
|
+
const React$M = await importShared('react');
|
|
7914
7914
|
var NAME$2 = "Arrow";
|
|
7915
|
-
var Arrow$1 = React$
|
|
7915
|
+
var Arrow$1 = React$M.forwardRef((props, forwardedRef) => {
|
|
7916
7916
|
const { children, width = 10, height = 5, ...arrowProps } = props;
|
|
7917
7917
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
7918
7918
|
Primitive.svg,
|
|
@@ -7931,24 +7931,24 @@ Arrow$1.displayName = NAME$2;
|
|
|
7931
7931
|
var Root$6 = Arrow$1;
|
|
7932
7932
|
|
|
7933
7933
|
// src/popper.tsx
|
|
7934
|
-
const React$
|
|
7934
|
+
const React$L = await importShared('react');
|
|
7935
7935
|
var POPPER_NAME = "Popper";
|
|
7936
7936
|
var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
|
|
7937
7937
|
var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
7938
7938
|
var Popper = (props) => {
|
|
7939
7939
|
const { __scopePopper, children } = props;
|
|
7940
|
-
const [anchor, setAnchor] = React$
|
|
7940
|
+
const [anchor, setAnchor] = React$L.useState(null);
|
|
7941
7941
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
|
|
7942
7942
|
};
|
|
7943
7943
|
Popper.displayName = POPPER_NAME;
|
|
7944
7944
|
var ANCHOR_NAME$2 = "PopperAnchor";
|
|
7945
|
-
var PopperAnchor = React$
|
|
7945
|
+
var PopperAnchor = React$L.forwardRef(
|
|
7946
7946
|
(props, forwardedRef) => {
|
|
7947
7947
|
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
|
7948
7948
|
const context = usePopperContext(ANCHOR_NAME$2, __scopePopper);
|
|
7949
|
-
const ref = React$
|
|
7949
|
+
const ref = React$L.useRef(null);
|
|
7950
7950
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
7951
|
-
React$
|
|
7951
|
+
React$L.useEffect(() => {
|
|
7952
7952
|
context.onAnchorChange(virtualRef?.current || ref.current);
|
|
7953
7953
|
});
|
|
7954
7954
|
return virtualRef ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(Primitive.div, { ...anchorProps, ref: composedRefs });
|
|
@@ -7957,7 +7957,7 @@ var PopperAnchor = React$J.forwardRef(
|
|
|
7957
7957
|
PopperAnchor.displayName = ANCHOR_NAME$2;
|
|
7958
7958
|
var CONTENT_NAME$7 = "PopperContent";
|
|
7959
7959
|
var [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME$7);
|
|
7960
|
-
var PopperContent = React$
|
|
7960
|
+
var PopperContent = React$L.forwardRef(
|
|
7961
7961
|
(props, forwardedRef) => {
|
|
7962
7962
|
const {
|
|
7963
7963
|
__scopePopper,
|
|
@@ -7976,9 +7976,9 @@ var PopperContent = React$J.forwardRef(
|
|
|
7976
7976
|
...contentProps
|
|
7977
7977
|
} = props;
|
|
7978
7978
|
const context = usePopperContext(CONTENT_NAME$7, __scopePopper);
|
|
7979
|
-
const [content, setContent] = React$
|
|
7979
|
+
const [content, setContent] = React$L.useState(null);
|
|
7980
7980
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
7981
|
-
const [arrow$1, setArrow] = React$
|
|
7981
|
+
const [arrow$1, setArrow] = React$L.useState(null);
|
|
7982
7982
|
const arrowSize = useSize(arrow$1);
|
|
7983
7983
|
const arrowWidth = arrowSize?.width ?? 0;
|
|
7984
7984
|
const arrowHeight = arrowSize?.height ?? 0;
|
|
@@ -8040,7 +8040,7 @@ var PopperContent = React$J.forwardRef(
|
|
|
8040
8040
|
const arrowX = middlewareData.arrow?.x;
|
|
8041
8041
|
const arrowY = middlewareData.arrow?.y;
|
|
8042
8042
|
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
8043
|
-
const [contentZIndex, setContentZIndex] = React$
|
|
8043
|
+
const [contentZIndex, setContentZIndex] = React$L.useState();
|
|
8044
8044
|
useLayoutEffect2(() => {
|
|
8045
8045
|
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
8046
8046
|
}, [content]);
|
|
@@ -8106,7 +8106,7 @@ var OPPOSITE_SIDE = {
|
|
|
8106
8106
|
bottom: "top",
|
|
8107
8107
|
left: "right"
|
|
8108
8108
|
};
|
|
8109
|
-
var PopperArrow = React$
|
|
8109
|
+
var PopperArrow = React$L.forwardRef(function PopperArrow2(props, forwardedRef) {
|
|
8110
8110
|
const { __scopePopper, ...arrowProps } = props;
|
|
8111
8111
|
const contentContext = useContentContext(ARROW_NAME$5, __scopePopper);
|
|
8112
8112
|
const baseSide = OPPOSITE_SIDE[contentContext.placedSide];
|
|
@@ -8198,7 +8198,7 @@ var Content$2 = PopperContent;
|
|
|
8198
8198
|
var Arrow = PopperArrow;
|
|
8199
8199
|
|
|
8200
8200
|
// src/roving-focus-group.tsx
|
|
8201
|
-
const React$
|
|
8201
|
+
const React$K = await importShared('react');
|
|
8202
8202
|
var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
|
|
8203
8203
|
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
8204
8204
|
var GROUP_NAME$3 = "RovingFocusGroup";
|
|
@@ -8208,13 +8208,13 @@ var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContext
|
|
|
8208
8208
|
[createCollectionScope$3]
|
|
8209
8209
|
);
|
|
8210
8210
|
var [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME$3);
|
|
8211
|
-
var RovingFocusGroup = React$
|
|
8211
|
+
var RovingFocusGroup = React$K.forwardRef(
|
|
8212
8212
|
(props, forwardedRef) => {
|
|
8213
8213
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Collection$3.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Collection$3.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsxRuntimeExports.jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });
|
|
8214
8214
|
}
|
|
8215
8215
|
);
|
|
8216
8216
|
RovingFocusGroup.displayName = GROUP_NAME$3;
|
|
8217
|
-
var RovingFocusGroupImpl = React$
|
|
8217
|
+
var RovingFocusGroupImpl = React$K.forwardRef((props, forwardedRef) => {
|
|
8218
8218
|
const {
|
|
8219
8219
|
__scopeRovingFocusGroup,
|
|
8220
8220
|
orientation,
|
|
@@ -8227,7 +8227,7 @@ var RovingFocusGroupImpl = React$I.forwardRef((props, forwardedRef) => {
|
|
|
8227
8227
|
preventScrollOnEntryFocus = false,
|
|
8228
8228
|
...groupProps
|
|
8229
8229
|
} = props;
|
|
8230
|
-
const ref = React$
|
|
8230
|
+
const ref = React$K.useRef(null);
|
|
8231
8231
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
8232
8232
|
const direction = useDirection(dir);
|
|
8233
8233
|
const [currentTabStopId, setCurrentTabStopId] = useControllableState({
|
|
@@ -8236,12 +8236,12 @@ var RovingFocusGroupImpl = React$I.forwardRef((props, forwardedRef) => {
|
|
|
8236
8236
|
onChange: onCurrentTabStopIdChange,
|
|
8237
8237
|
caller: GROUP_NAME$3
|
|
8238
8238
|
});
|
|
8239
|
-
const [isTabbingBackOut, setIsTabbingBackOut] = React$
|
|
8239
|
+
const [isTabbingBackOut, setIsTabbingBackOut] = React$K.useState(false);
|
|
8240
8240
|
const handleEntryFocus = useCallbackRef$1(onEntryFocus);
|
|
8241
8241
|
const getItems = useCollection$3(__scopeRovingFocusGroup);
|
|
8242
|
-
const isClickFocusRef = React$
|
|
8243
|
-
const [focusableItemsCount, setFocusableItemsCount] = React$
|
|
8244
|
-
React$
|
|
8242
|
+
const isClickFocusRef = React$K.useRef(false);
|
|
8243
|
+
const [focusableItemsCount, setFocusableItemsCount] = React$K.useState(0);
|
|
8244
|
+
React$K.useEffect(() => {
|
|
8245
8245
|
const node = ref.current;
|
|
8246
8246
|
if (node) {
|
|
8247
8247
|
node.addEventListener(ENTRY_FOCUS, handleEntryFocus);
|
|
@@ -8256,16 +8256,16 @@ var RovingFocusGroupImpl = React$I.forwardRef((props, forwardedRef) => {
|
|
|
8256
8256
|
dir: direction,
|
|
8257
8257
|
loop,
|
|
8258
8258
|
currentTabStopId,
|
|
8259
|
-
onItemFocus: React$
|
|
8259
|
+
onItemFocus: React$K.useCallback(
|
|
8260
8260
|
(tabStopId) => setCurrentTabStopId(tabStopId),
|
|
8261
8261
|
[setCurrentTabStopId]
|
|
8262
8262
|
),
|
|
8263
|
-
onItemShiftTab: React$
|
|
8264
|
-
onFocusableItemAdd: React$
|
|
8263
|
+
onItemShiftTab: React$K.useCallback(() => setIsTabbingBackOut(true), []),
|
|
8264
|
+
onFocusableItemAdd: React$K.useCallback(
|
|
8265
8265
|
() => setFocusableItemsCount((prevCount) => prevCount + 1),
|
|
8266
8266
|
[]
|
|
8267
8267
|
),
|
|
8268
|
-
onFocusableItemRemove: React$
|
|
8268
|
+
onFocusableItemRemove: React$K.useCallback(
|
|
8269
8269
|
() => setFocusableItemsCount((prevCount) => prevCount - 1),
|
|
8270
8270
|
[]
|
|
8271
8271
|
),
|
|
@@ -8305,7 +8305,7 @@ var RovingFocusGroupImpl = React$I.forwardRef((props, forwardedRef) => {
|
|
|
8305
8305
|
);
|
|
8306
8306
|
});
|
|
8307
8307
|
var ITEM_NAME$4 = "RovingFocusGroupItem";
|
|
8308
|
-
var RovingFocusGroupItem = React$
|
|
8308
|
+
var RovingFocusGroupItem = React$K.forwardRef(
|
|
8309
8309
|
(props, forwardedRef) => {
|
|
8310
8310
|
const {
|
|
8311
8311
|
__scopeRovingFocusGroup,
|
|
@@ -8321,7 +8321,7 @@ var RovingFocusGroupItem = React$I.forwardRef(
|
|
|
8321
8321
|
const isCurrentTabStop = context.currentTabStopId === id;
|
|
8322
8322
|
const getItems = useCollection$3(__scopeRovingFocusGroup);
|
|
8323
8323
|
const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;
|
|
8324
|
-
React$
|
|
8324
|
+
React$K.useEffect(() => {
|
|
8325
8325
|
if (focusable) {
|
|
8326
8326
|
onFocusableItemAdd();
|
|
8327
8327
|
return () => onFocusableItemRemove();
|
|
@@ -8410,7 +8410,7 @@ var Root$5 = RovingFocusGroup;
|
|
|
8410
8410
|
var Item$2 = RovingFocusGroupItem;
|
|
8411
8411
|
|
|
8412
8412
|
// src/menu.tsx
|
|
8413
|
-
const React$
|
|
8413
|
+
const React$J = await importShared('react');
|
|
8414
8414
|
var SELECTION_KEYS$1 = ["Enter", " "];
|
|
8415
8415
|
var FIRST_KEYS = ["ArrowDown", "PageUp", "Home"];
|
|
8416
8416
|
var LAST_KEYS = ["ArrowUp", "PageDown", "End"];
|
|
@@ -8437,11 +8437,11 @@ var [MenuRootProvider, useMenuRootContext] = createMenuContext(MENU_NAME);
|
|
|
8437
8437
|
var Menu = (props) => {
|
|
8438
8438
|
const { __scopeMenu, open = false, children, dir, onOpenChange, modal = true } = props;
|
|
8439
8439
|
const popperScope = usePopperScope$3(__scopeMenu);
|
|
8440
|
-
const [content, setContent] = React$
|
|
8441
|
-
const isUsingKeyboardRef = React$
|
|
8440
|
+
const [content, setContent] = React$J.useState(null);
|
|
8441
|
+
const isUsingKeyboardRef = React$J.useRef(false);
|
|
8442
8442
|
const handleOpenChange = useCallbackRef$1(onOpenChange);
|
|
8443
8443
|
const direction = useDirection(dir);
|
|
8444
|
-
React$
|
|
8444
|
+
React$J.useEffect(() => {
|
|
8445
8445
|
const handleKeyDown = () => {
|
|
8446
8446
|
isUsingKeyboardRef.current = true;
|
|
8447
8447
|
document.addEventListener("pointerdown", handlePointer, { capture: true, once: true });
|
|
@@ -8467,7 +8467,7 @@ var Menu = (props) => {
|
|
|
8467
8467
|
MenuRootProvider,
|
|
8468
8468
|
{
|
|
8469
8469
|
scope: __scopeMenu,
|
|
8470
|
-
onClose: React$
|
|
8470
|
+
onClose: React$J.useCallback(() => handleOpenChange(false), [handleOpenChange]),
|
|
8471
8471
|
isUsingKeyboardRef,
|
|
8472
8472
|
dir: direction,
|
|
8473
8473
|
modal,
|
|
@@ -8479,7 +8479,7 @@ var Menu = (props) => {
|
|
|
8479
8479
|
};
|
|
8480
8480
|
Menu.displayName = MENU_NAME;
|
|
8481
8481
|
var ANCHOR_NAME$1 = "MenuAnchor";
|
|
8482
|
-
var MenuAnchor = React$
|
|
8482
|
+
var MenuAnchor = React$J.forwardRef(
|
|
8483
8483
|
(props, forwardedRef) => {
|
|
8484
8484
|
const { __scopeMenu, ...anchorProps } = props;
|
|
8485
8485
|
const popperScope = usePopperScope$3(__scopeMenu);
|
|
@@ -8499,7 +8499,7 @@ var MenuPortal = (props) => {
|
|
|
8499
8499
|
MenuPortal.displayName = PORTAL_NAME$4;
|
|
8500
8500
|
var CONTENT_NAME$6 = "MenuContent";
|
|
8501
8501
|
var [MenuContentProvider, useMenuContentContext] = createMenuContext(CONTENT_NAME$6);
|
|
8502
|
-
var MenuContent = React$
|
|
8502
|
+
var MenuContent = React$J.forwardRef(
|
|
8503
8503
|
(props, forwardedRef) => {
|
|
8504
8504
|
const portalContext = usePortalContext$2(CONTENT_NAME$6, props.__scopeMenu);
|
|
8505
8505
|
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
@@ -8508,12 +8508,12 @@ var MenuContent = React$H.forwardRef(
|
|
|
8508
8508
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Collection$2.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Collection$2.Slot, { scope: props.__scopeMenu, children: rootContext.modal ? /* @__PURE__ */ jsxRuntimeExports.jsx(MenuRootContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsxRuntimeExports.jsx(MenuRootContentNonModal, { ...contentProps, ref: forwardedRef }) }) }) });
|
|
8509
8509
|
}
|
|
8510
8510
|
);
|
|
8511
|
-
var MenuRootContentModal = React$
|
|
8511
|
+
var MenuRootContentModal = React$J.forwardRef(
|
|
8512
8512
|
(props, forwardedRef) => {
|
|
8513
8513
|
const context = useMenuContext(CONTENT_NAME$6, props.__scopeMenu);
|
|
8514
|
-
const ref = React$
|
|
8514
|
+
const ref = React$J.useRef(null);
|
|
8515
8515
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
8516
|
-
React$
|
|
8516
|
+
React$J.useEffect(() => {
|
|
8517
8517
|
const content = ref.current;
|
|
8518
8518
|
if (content) return hideOthers(content);
|
|
8519
8519
|
}, []);
|
|
@@ -8535,7 +8535,7 @@ var MenuRootContentModal = React$H.forwardRef(
|
|
|
8535
8535
|
);
|
|
8536
8536
|
}
|
|
8537
8537
|
);
|
|
8538
|
-
var MenuRootContentNonModal = React$
|
|
8538
|
+
var MenuRootContentNonModal = React$J.forwardRef((props, forwardedRef) => {
|
|
8539
8539
|
const context = useMenuContext(CONTENT_NAME$6, props.__scopeMenu);
|
|
8540
8540
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8541
8541
|
MenuContentImpl,
|
|
@@ -8550,7 +8550,7 @@ var MenuRootContentNonModal = React$H.forwardRef((props, forwardedRef) => {
|
|
|
8550
8550
|
);
|
|
8551
8551
|
});
|
|
8552
8552
|
var Slot$2 = createSlot("MenuContent.ScrollLock");
|
|
8553
|
-
var MenuContentImpl = React$
|
|
8553
|
+
var MenuContentImpl = React$J.forwardRef(
|
|
8554
8554
|
(props, forwardedRef) => {
|
|
8555
8555
|
const {
|
|
8556
8556
|
__scopeMenu,
|
|
@@ -8573,16 +8573,16 @@ var MenuContentImpl = React$H.forwardRef(
|
|
|
8573
8573
|
const popperScope = usePopperScope$3(__scopeMenu);
|
|
8574
8574
|
const rovingFocusGroupScope = useRovingFocusGroupScope$1(__scopeMenu);
|
|
8575
8575
|
const getItems = useCollection$2(__scopeMenu);
|
|
8576
|
-
const [currentItemId, setCurrentItemId] = React$
|
|
8577
|
-
const contentRef = React$
|
|
8576
|
+
const [currentItemId, setCurrentItemId] = React$J.useState(null);
|
|
8577
|
+
const contentRef = React$J.useRef(null);
|
|
8578
8578
|
const composedRefs = useComposedRefs(forwardedRef, contentRef, context.onContentChange);
|
|
8579
|
-
const timerRef = React$
|
|
8580
|
-
const searchRef = React$
|
|
8581
|
-
const pointerGraceTimerRef = React$
|
|
8582
|
-
const pointerGraceIntentRef = React$
|
|
8583
|
-
const pointerDirRef = React$
|
|
8584
|
-
const lastPointerXRef = React$
|
|
8585
|
-
const ScrollLockWrapper = disableOutsideScroll ? ReactRemoveScroll : React$
|
|
8579
|
+
const timerRef = React$J.useRef(0);
|
|
8580
|
+
const searchRef = React$J.useRef("");
|
|
8581
|
+
const pointerGraceTimerRef = React$J.useRef(0);
|
|
8582
|
+
const pointerGraceIntentRef = React$J.useRef(null);
|
|
8583
|
+
const pointerDirRef = React$J.useRef("right");
|
|
8584
|
+
const lastPointerXRef = React$J.useRef(0);
|
|
8585
|
+
const ScrollLockWrapper = disableOutsideScroll ? ReactRemoveScroll : React$J.Fragment;
|
|
8586
8586
|
const scrollLockWrapperProps = disableOutsideScroll ? { as: Slot$2, allowPinchZoom: true } : void 0;
|
|
8587
8587
|
const handleTypeaheadSearch = (key) => {
|
|
8588
8588
|
const search = searchRef.current + key;
|
|
@@ -8601,11 +8601,11 @@ var MenuContentImpl = React$H.forwardRef(
|
|
|
8601
8601
|
setTimeout(() => newItem.focus());
|
|
8602
8602
|
}
|
|
8603
8603
|
};
|
|
8604
|
-
React$
|
|
8604
|
+
React$J.useEffect(() => {
|
|
8605
8605
|
return () => window.clearTimeout(timerRef.current);
|
|
8606
8606
|
}, []);
|
|
8607
8607
|
useFocusGuards();
|
|
8608
|
-
const isPointerMovingToSubmenu = React$
|
|
8608
|
+
const isPointerMovingToSubmenu = React$J.useCallback((event) => {
|
|
8609
8609
|
const isMovingTowards = pointerDirRef.current === pointerGraceIntentRef.current?.side;
|
|
8610
8610
|
return isMovingTowards && isPointerInGraceArea(event, pointerGraceIntentRef.current?.area);
|
|
8611
8611
|
}, []);
|
|
@@ -8614,13 +8614,13 @@ var MenuContentImpl = React$H.forwardRef(
|
|
|
8614
8614
|
{
|
|
8615
8615
|
scope: __scopeMenu,
|
|
8616
8616
|
searchRef,
|
|
8617
|
-
onItemEnter: React$
|
|
8617
|
+
onItemEnter: React$J.useCallback(
|
|
8618
8618
|
(event) => {
|
|
8619
8619
|
if (isPointerMovingToSubmenu(event)) event.preventDefault();
|
|
8620
8620
|
},
|
|
8621
8621
|
[isPointerMovingToSubmenu]
|
|
8622
8622
|
),
|
|
8623
|
-
onItemLeave: React$
|
|
8623
|
+
onItemLeave: React$J.useCallback(
|
|
8624
8624
|
(event) => {
|
|
8625
8625
|
if (isPointerMovingToSubmenu(event)) return;
|
|
8626
8626
|
contentRef.current?.focus();
|
|
@@ -8628,14 +8628,14 @@ var MenuContentImpl = React$H.forwardRef(
|
|
|
8628
8628
|
},
|
|
8629
8629
|
[isPointerMovingToSubmenu]
|
|
8630
8630
|
),
|
|
8631
|
-
onTriggerLeave: React$
|
|
8631
|
+
onTriggerLeave: React$J.useCallback(
|
|
8632
8632
|
(event) => {
|
|
8633
8633
|
if (isPointerMovingToSubmenu(event)) event.preventDefault();
|
|
8634
8634
|
},
|
|
8635
8635
|
[isPointerMovingToSubmenu]
|
|
8636
8636
|
),
|
|
8637
8637
|
pointerGraceTimerRef,
|
|
8638
|
-
onPointerGraceIntentChange: React$
|
|
8638
|
+
onPointerGraceIntentChange: React$J.useCallback((intent) => {
|
|
8639
8639
|
pointerGraceIntentRef.current = intent;
|
|
8640
8640
|
}, []),
|
|
8641
8641
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollLockWrapper, { ...scrollLockWrapperProps, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -8734,7 +8734,7 @@ var MenuContentImpl = React$H.forwardRef(
|
|
|
8734
8734
|
);
|
|
8735
8735
|
MenuContent.displayName = CONTENT_NAME$6;
|
|
8736
8736
|
var GROUP_NAME$2 = "MenuGroup";
|
|
8737
|
-
var MenuGroup = React$
|
|
8737
|
+
var MenuGroup = React$J.forwardRef(
|
|
8738
8738
|
(props, forwardedRef) => {
|
|
8739
8739
|
const { __scopeMenu, ...groupProps } = props;
|
|
8740
8740
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Primitive.div, { role: "group", ...groupProps, ref: forwardedRef });
|
|
@@ -8742,7 +8742,7 @@ var MenuGroup = React$H.forwardRef(
|
|
|
8742
8742
|
);
|
|
8743
8743
|
MenuGroup.displayName = GROUP_NAME$2;
|
|
8744
8744
|
var LABEL_NAME$2 = "MenuLabel";
|
|
8745
|
-
var MenuLabel = React$
|
|
8745
|
+
var MenuLabel = React$J.forwardRef(
|
|
8746
8746
|
(props, forwardedRef) => {
|
|
8747
8747
|
const { __scopeMenu, ...labelProps } = props;
|
|
8748
8748
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Primitive.div, { ...labelProps, ref: forwardedRef });
|
|
@@ -8751,14 +8751,14 @@ var MenuLabel = React$H.forwardRef(
|
|
|
8751
8751
|
MenuLabel.displayName = LABEL_NAME$2;
|
|
8752
8752
|
var ITEM_NAME$3 = "MenuItem";
|
|
8753
8753
|
var ITEM_SELECT = "menu.itemSelect";
|
|
8754
|
-
var MenuItem = React$
|
|
8754
|
+
var MenuItem = React$J.forwardRef(
|
|
8755
8755
|
(props, forwardedRef) => {
|
|
8756
8756
|
const { disabled = false, onSelect, ...itemProps } = props;
|
|
8757
|
-
const ref = React$
|
|
8757
|
+
const ref = React$J.useRef(null);
|
|
8758
8758
|
const rootContext = useMenuRootContext(ITEM_NAME$3, props.__scopeMenu);
|
|
8759
8759
|
const contentContext = useMenuContentContext(ITEM_NAME$3, props.__scopeMenu);
|
|
8760
8760
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
8761
|
-
const isPointerDownRef = React$
|
|
8761
|
+
const isPointerDownRef = React$J.useRef(false);
|
|
8762
8762
|
const handleSelect = () => {
|
|
8763
8763
|
const menuItem = ref.current;
|
|
8764
8764
|
if (!disabled && menuItem) {
|
|
@@ -8799,16 +8799,16 @@ var MenuItem = React$H.forwardRef(
|
|
|
8799
8799
|
}
|
|
8800
8800
|
);
|
|
8801
8801
|
MenuItem.displayName = ITEM_NAME$3;
|
|
8802
|
-
var MenuItemImpl = React$
|
|
8802
|
+
var MenuItemImpl = React$J.forwardRef(
|
|
8803
8803
|
(props, forwardedRef) => {
|
|
8804
8804
|
const { __scopeMenu, disabled = false, textValue, ...itemProps } = props;
|
|
8805
8805
|
const contentContext = useMenuContentContext(ITEM_NAME$3, __scopeMenu);
|
|
8806
8806
|
const rovingFocusGroupScope = useRovingFocusGroupScope$1(__scopeMenu);
|
|
8807
|
-
const ref = React$
|
|
8807
|
+
const ref = React$J.useRef(null);
|
|
8808
8808
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
8809
|
-
const [isFocused, setIsFocused] = React$
|
|
8810
|
-
const [textContent, setTextContent] = React$
|
|
8811
|
-
React$
|
|
8809
|
+
const [isFocused, setIsFocused] = React$J.useState(false);
|
|
8810
|
+
const [textContent, setTextContent] = React$J.useState("");
|
|
8811
|
+
React$J.useEffect(() => {
|
|
8812
8812
|
const menuItem = ref.current;
|
|
8813
8813
|
if (menuItem) {
|
|
8814
8814
|
setTextContent((menuItem.textContent ?? "").trim());
|
|
@@ -8856,7 +8856,7 @@ var MenuItemImpl = React$H.forwardRef(
|
|
|
8856
8856
|
}
|
|
8857
8857
|
);
|
|
8858
8858
|
var CHECKBOX_ITEM_NAME$1 = "MenuCheckboxItem";
|
|
8859
|
-
var MenuCheckboxItem = React$
|
|
8859
|
+
var MenuCheckboxItem = React$J.forwardRef(
|
|
8860
8860
|
(props, forwardedRef) => {
|
|
8861
8861
|
const { checked = false, onCheckedChange, ...checkboxItemProps } = props;
|
|
8862
8862
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -8883,7 +8883,7 @@ var [RadioGroupProvider, useRadioGroupContext] = createMenuContext(
|
|
|
8883
8883
|
{ value: void 0, onValueChange: () => {
|
|
8884
8884
|
} }
|
|
8885
8885
|
);
|
|
8886
|
-
var MenuRadioGroup = React$
|
|
8886
|
+
var MenuRadioGroup = React$J.forwardRef(
|
|
8887
8887
|
(props, forwardedRef) => {
|
|
8888
8888
|
const { value, onValueChange, ...groupProps } = props;
|
|
8889
8889
|
const handleValueChange = useCallbackRef$1(onValueChange);
|
|
@@ -8892,7 +8892,7 @@ var MenuRadioGroup = React$H.forwardRef(
|
|
|
8892
8892
|
);
|
|
8893
8893
|
MenuRadioGroup.displayName = RADIO_GROUP_NAME$1;
|
|
8894
8894
|
var RADIO_ITEM_NAME$1 = "MenuRadioItem";
|
|
8895
|
-
var MenuRadioItem = React$
|
|
8895
|
+
var MenuRadioItem = React$J.forwardRef(
|
|
8896
8896
|
(props, forwardedRef) => {
|
|
8897
8897
|
const { value, ...radioItemProps } = props;
|
|
8898
8898
|
const context = useRadioGroupContext(RADIO_ITEM_NAME$1, props.__scopeMenu);
|
|
@@ -8920,7 +8920,7 @@ var [ItemIndicatorProvider, useItemIndicatorContext] = createMenuContext(
|
|
|
8920
8920
|
ITEM_INDICATOR_NAME$1,
|
|
8921
8921
|
{ checked: false }
|
|
8922
8922
|
);
|
|
8923
|
-
var MenuItemIndicator = React$
|
|
8923
|
+
var MenuItemIndicator = React$J.forwardRef(
|
|
8924
8924
|
(props, forwardedRef) => {
|
|
8925
8925
|
const { __scopeMenu, forceMount, ...itemIndicatorProps } = props;
|
|
8926
8926
|
const indicatorContext = useItemIndicatorContext(ITEM_INDICATOR_NAME$1, __scopeMenu);
|
|
@@ -8942,7 +8942,7 @@ var MenuItemIndicator = React$H.forwardRef(
|
|
|
8942
8942
|
);
|
|
8943
8943
|
MenuItemIndicator.displayName = ITEM_INDICATOR_NAME$1;
|
|
8944
8944
|
var SEPARATOR_NAME$2 = "MenuSeparator";
|
|
8945
|
-
var MenuSeparator = React$
|
|
8945
|
+
var MenuSeparator = React$J.forwardRef(
|
|
8946
8946
|
(props, forwardedRef) => {
|
|
8947
8947
|
const { __scopeMenu, ...separatorProps } = props;
|
|
8948
8948
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -8958,7 +8958,7 @@ var MenuSeparator = React$H.forwardRef(
|
|
|
8958
8958
|
);
|
|
8959
8959
|
MenuSeparator.displayName = SEPARATOR_NAME$2;
|
|
8960
8960
|
var ARROW_NAME$4 = "MenuArrow";
|
|
8961
|
-
var MenuArrow = React$
|
|
8961
|
+
var MenuArrow = React$J.forwardRef(
|
|
8962
8962
|
(props, forwardedRef) => {
|
|
8963
8963
|
const { __scopeMenu, ...arrowProps } = props;
|
|
8964
8964
|
const popperScope = usePopperScope$3(__scopeMenu);
|
|
@@ -8972,10 +8972,10 @@ var MenuSub = (props) => {
|
|
|
8972
8972
|
const { __scopeMenu, children, open = false, onOpenChange } = props;
|
|
8973
8973
|
const parentMenuContext = useMenuContext(SUB_NAME$1, __scopeMenu);
|
|
8974
8974
|
const popperScope = usePopperScope$3(__scopeMenu);
|
|
8975
|
-
const [trigger, setTrigger] = React$
|
|
8976
|
-
const [content, setContent] = React$
|
|
8975
|
+
const [trigger, setTrigger] = React$J.useState(null);
|
|
8976
|
+
const [content, setContent] = React$J.useState(null);
|
|
8977
8977
|
const handleOpenChange = useCallbackRef$1(onOpenChange);
|
|
8978
|
-
React$
|
|
8978
|
+
React$J.useEffect(() => {
|
|
8979
8979
|
if (parentMenuContext.open === false) handleOpenChange(false);
|
|
8980
8980
|
return () => handleOpenChange(false);
|
|
8981
8981
|
}, [parentMenuContext.open, handleOpenChange]);
|
|
@@ -9003,21 +9003,21 @@ var MenuSub = (props) => {
|
|
|
9003
9003
|
};
|
|
9004
9004
|
MenuSub.displayName = SUB_NAME$1;
|
|
9005
9005
|
var SUB_TRIGGER_NAME$1 = "MenuSubTrigger";
|
|
9006
|
-
var MenuSubTrigger = React$
|
|
9006
|
+
var MenuSubTrigger = React$J.forwardRef(
|
|
9007
9007
|
(props, forwardedRef) => {
|
|
9008
9008
|
const context = useMenuContext(SUB_TRIGGER_NAME$1, props.__scopeMenu);
|
|
9009
9009
|
const rootContext = useMenuRootContext(SUB_TRIGGER_NAME$1, props.__scopeMenu);
|
|
9010
9010
|
const subContext = useMenuSubContext(SUB_TRIGGER_NAME$1, props.__scopeMenu);
|
|
9011
9011
|
const contentContext = useMenuContentContext(SUB_TRIGGER_NAME$1, props.__scopeMenu);
|
|
9012
|
-
const openTimerRef = React$
|
|
9012
|
+
const openTimerRef = React$J.useRef(null);
|
|
9013
9013
|
const { pointerGraceTimerRef, onPointerGraceIntentChange } = contentContext;
|
|
9014
9014
|
const scope = { __scopeMenu: props.__scopeMenu };
|
|
9015
|
-
const clearOpenTimer = React$
|
|
9015
|
+
const clearOpenTimer = React$J.useCallback(() => {
|
|
9016
9016
|
if (openTimerRef.current) window.clearTimeout(openTimerRef.current);
|
|
9017
9017
|
openTimerRef.current = null;
|
|
9018
9018
|
}, []);
|
|
9019
|
-
React$
|
|
9020
|
-
React$
|
|
9019
|
+
React$J.useEffect(() => clearOpenTimer, [clearOpenTimer]);
|
|
9020
|
+
React$J.useEffect(() => {
|
|
9021
9021
|
const pointerGraceTimer = pointerGraceTimerRef.current;
|
|
9022
9022
|
return () => {
|
|
9023
9023
|
window.clearTimeout(pointerGraceTimer);
|
|
@@ -9104,14 +9104,14 @@ var MenuSubTrigger = React$H.forwardRef(
|
|
|
9104
9104
|
);
|
|
9105
9105
|
MenuSubTrigger.displayName = SUB_TRIGGER_NAME$1;
|
|
9106
9106
|
var SUB_CONTENT_NAME$1 = "MenuSubContent";
|
|
9107
|
-
var MenuSubContent = React$
|
|
9107
|
+
var MenuSubContent = React$J.forwardRef(
|
|
9108
9108
|
(props, forwardedRef) => {
|
|
9109
9109
|
const portalContext = usePortalContext$2(CONTENT_NAME$6, props.__scopeMenu);
|
|
9110
9110
|
const { forceMount = portalContext.forceMount, ...subContentProps } = props;
|
|
9111
9111
|
const context = useMenuContext(CONTENT_NAME$6, props.__scopeMenu);
|
|
9112
9112
|
const rootContext = useMenuRootContext(CONTENT_NAME$6, props.__scopeMenu);
|
|
9113
9113
|
const subContext = useMenuSubContext(SUB_CONTENT_NAME$1, props.__scopeMenu);
|
|
9114
|
-
const ref = React$
|
|
9114
|
+
const ref = React$J.useRef(null);
|
|
9115
9115
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
9116
9116
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Collection$2.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Collection$2.Slot, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9117
9117
|
MenuContentImpl,
|
|
@@ -9224,7 +9224,7 @@ var SubTrigger = MenuSubTrigger;
|
|
|
9224
9224
|
var SubContent = MenuSubContent;
|
|
9225
9225
|
|
|
9226
9226
|
// src/dropdown-menu.tsx
|
|
9227
|
-
const React$
|
|
9227
|
+
const React$I = await importShared('react');
|
|
9228
9228
|
var DROPDOWN_MENU_NAME = "DropdownMenu";
|
|
9229
9229
|
var [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(
|
|
9230
9230
|
DROPDOWN_MENU_NAME,
|
|
@@ -9243,7 +9243,7 @@ var DropdownMenu$1 = (props) => {
|
|
|
9243
9243
|
modal = true
|
|
9244
9244
|
} = props;
|
|
9245
9245
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
9246
|
-
const triggerRef = React$
|
|
9246
|
+
const triggerRef = React$I.useRef(null);
|
|
9247
9247
|
const [open, setOpen] = useControllableState({
|
|
9248
9248
|
prop: openProp,
|
|
9249
9249
|
defaultProp: defaultOpen ?? false,
|
|
@@ -9259,7 +9259,7 @@ var DropdownMenu$1 = (props) => {
|
|
|
9259
9259
|
contentId: useId$4(),
|
|
9260
9260
|
open,
|
|
9261
9261
|
onOpenChange: setOpen,
|
|
9262
|
-
onOpenToggle: React$
|
|
9262
|
+
onOpenToggle: React$I.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
9263
9263
|
modal,
|
|
9264
9264
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Root3$1, { ...menuScope, open, onOpenChange: setOpen, dir, modal, children })
|
|
9265
9265
|
}
|
|
@@ -9267,7 +9267,7 @@ var DropdownMenu$1 = (props) => {
|
|
|
9267
9267
|
};
|
|
9268
9268
|
DropdownMenu$1.displayName = DROPDOWN_MENU_NAME;
|
|
9269
9269
|
var TRIGGER_NAME$5 = "DropdownMenuTrigger";
|
|
9270
|
-
var DropdownMenuTrigger$1 = React$
|
|
9270
|
+
var DropdownMenuTrigger$1 = React$I.forwardRef(
|
|
9271
9271
|
(props, forwardedRef) => {
|
|
9272
9272
|
const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props;
|
|
9273
9273
|
const context = useDropdownMenuContext(TRIGGER_NAME$5, __scopeDropdownMenu);
|
|
@@ -9310,12 +9310,12 @@ var DropdownMenuPortal$1 = (props) => {
|
|
|
9310
9310
|
};
|
|
9311
9311
|
DropdownMenuPortal$1.displayName = PORTAL_NAME$3;
|
|
9312
9312
|
var CONTENT_NAME$5 = "DropdownMenuContent";
|
|
9313
|
-
var DropdownMenuContent$1 = React$
|
|
9313
|
+
var DropdownMenuContent$1 = React$I.forwardRef(
|
|
9314
9314
|
(props, forwardedRef) => {
|
|
9315
9315
|
const { __scopeDropdownMenu, ...contentProps } = props;
|
|
9316
9316
|
const context = useDropdownMenuContext(CONTENT_NAME$5, __scopeDropdownMenu);
|
|
9317
9317
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
9318
|
-
const hasInteractedOutsideRef = React$
|
|
9318
|
+
const hasInteractedOutsideRef = React$I.useRef(false);
|
|
9319
9319
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9320
9320
|
Content2$4,
|
|
9321
9321
|
{
|
|
@@ -9352,7 +9352,7 @@ var DropdownMenuContent$1 = React$G.forwardRef(
|
|
|
9352
9352
|
);
|
|
9353
9353
|
DropdownMenuContent$1.displayName = CONTENT_NAME$5;
|
|
9354
9354
|
var GROUP_NAME$1 = "DropdownMenuGroup";
|
|
9355
|
-
var DropdownMenuGroup$1 = React$
|
|
9355
|
+
var DropdownMenuGroup$1 = React$I.forwardRef(
|
|
9356
9356
|
(props, forwardedRef) => {
|
|
9357
9357
|
const { __scopeDropdownMenu, ...groupProps } = props;
|
|
9358
9358
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
@@ -9361,7 +9361,7 @@ var DropdownMenuGroup$1 = React$G.forwardRef(
|
|
|
9361
9361
|
);
|
|
9362
9362
|
DropdownMenuGroup$1.displayName = GROUP_NAME$1;
|
|
9363
9363
|
var LABEL_NAME$1 = "DropdownMenuLabel";
|
|
9364
|
-
var DropdownMenuLabel$1 = React$
|
|
9364
|
+
var DropdownMenuLabel$1 = React$I.forwardRef(
|
|
9365
9365
|
(props, forwardedRef) => {
|
|
9366
9366
|
const { __scopeDropdownMenu, ...labelProps } = props;
|
|
9367
9367
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
@@ -9370,7 +9370,7 @@ var DropdownMenuLabel$1 = React$G.forwardRef(
|
|
|
9370
9370
|
);
|
|
9371
9371
|
DropdownMenuLabel$1.displayName = LABEL_NAME$1;
|
|
9372
9372
|
var ITEM_NAME$2 = "DropdownMenuItem";
|
|
9373
|
-
var DropdownMenuItem$1 = React$
|
|
9373
|
+
var DropdownMenuItem$1 = React$I.forwardRef(
|
|
9374
9374
|
(props, forwardedRef) => {
|
|
9375
9375
|
const { __scopeDropdownMenu, ...itemProps } = props;
|
|
9376
9376
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
@@ -9379,42 +9379,42 @@ var DropdownMenuItem$1 = React$G.forwardRef(
|
|
|
9379
9379
|
);
|
|
9380
9380
|
DropdownMenuItem$1.displayName = ITEM_NAME$2;
|
|
9381
9381
|
var CHECKBOX_ITEM_NAME = "DropdownMenuCheckboxItem";
|
|
9382
|
-
var DropdownMenuCheckboxItem$1 = React$
|
|
9382
|
+
var DropdownMenuCheckboxItem$1 = React$I.forwardRef((props, forwardedRef) => {
|
|
9383
9383
|
const { __scopeDropdownMenu, ...checkboxItemProps } = props;
|
|
9384
9384
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
9385
9385
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(CheckboxItem, { ...menuScope, ...checkboxItemProps, ref: forwardedRef });
|
|
9386
9386
|
});
|
|
9387
9387
|
DropdownMenuCheckboxItem$1.displayName = CHECKBOX_ITEM_NAME;
|
|
9388
9388
|
var RADIO_GROUP_NAME = "DropdownMenuRadioGroup";
|
|
9389
|
-
var DropdownMenuRadioGroup$1 = React$
|
|
9389
|
+
var DropdownMenuRadioGroup$1 = React$I.forwardRef((props, forwardedRef) => {
|
|
9390
9390
|
const { __scopeDropdownMenu, ...radioGroupProps } = props;
|
|
9391
9391
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
9392
9392
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(RadioGroup, { ...menuScope, ...radioGroupProps, ref: forwardedRef });
|
|
9393
9393
|
});
|
|
9394
9394
|
DropdownMenuRadioGroup$1.displayName = RADIO_GROUP_NAME;
|
|
9395
9395
|
var RADIO_ITEM_NAME = "DropdownMenuRadioItem";
|
|
9396
|
-
var DropdownMenuRadioItem$1 = React$
|
|
9396
|
+
var DropdownMenuRadioItem$1 = React$I.forwardRef((props, forwardedRef) => {
|
|
9397
9397
|
const { __scopeDropdownMenu, ...radioItemProps } = props;
|
|
9398
9398
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
9399
9399
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(RadioItem, { ...menuScope, ...radioItemProps, ref: forwardedRef });
|
|
9400
9400
|
});
|
|
9401
9401
|
DropdownMenuRadioItem$1.displayName = RADIO_ITEM_NAME;
|
|
9402
9402
|
var INDICATOR_NAME$1 = "DropdownMenuItemIndicator";
|
|
9403
|
-
var DropdownMenuItemIndicator = React$
|
|
9403
|
+
var DropdownMenuItemIndicator = React$I.forwardRef((props, forwardedRef) => {
|
|
9404
9404
|
const { __scopeDropdownMenu, ...itemIndicatorProps } = props;
|
|
9405
9405
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
9406
9406
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ItemIndicator$1, { ...menuScope, ...itemIndicatorProps, ref: forwardedRef });
|
|
9407
9407
|
});
|
|
9408
9408
|
DropdownMenuItemIndicator.displayName = INDICATOR_NAME$1;
|
|
9409
9409
|
var SEPARATOR_NAME$1 = "DropdownMenuSeparator";
|
|
9410
|
-
var DropdownMenuSeparator$1 = React$
|
|
9410
|
+
var DropdownMenuSeparator$1 = React$I.forwardRef((props, forwardedRef) => {
|
|
9411
9411
|
const { __scopeDropdownMenu, ...separatorProps } = props;
|
|
9412
9412
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
9413
9413
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Separator$3, { ...menuScope, ...separatorProps, ref: forwardedRef });
|
|
9414
9414
|
});
|
|
9415
9415
|
DropdownMenuSeparator$1.displayName = SEPARATOR_NAME$1;
|
|
9416
9416
|
var ARROW_NAME$3 = "DropdownMenuArrow";
|
|
9417
|
-
var DropdownMenuArrow = React$
|
|
9417
|
+
var DropdownMenuArrow = React$I.forwardRef(
|
|
9418
9418
|
(props, forwardedRef) => {
|
|
9419
9419
|
const { __scopeDropdownMenu, ...arrowProps } = props;
|
|
9420
9420
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
@@ -9434,14 +9434,14 @@ var DropdownMenuSub$1 = (props) => {
|
|
|
9434
9434
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Sub, { ...menuScope, open, onOpenChange: setOpen, children });
|
|
9435
9435
|
};
|
|
9436
9436
|
var SUB_TRIGGER_NAME = "DropdownMenuSubTrigger";
|
|
9437
|
-
var DropdownMenuSubTrigger$1 = React$
|
|
9437
|
+
var DropdownMenuSubTrigger$1 = React$I.forwardRef((props, forwardedRef) => {
|
|
9438
9438
|
const { __scopeDropdownMenu, ...subTriggerProps } = props;
|
|
9439
9439
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
9440
9440
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(SubTrigger, { ...menuScope, ...subTriggerProps, ref: forwardedRef });
|
|
9441
9441
|
});
|
|
9442
9442
|
DropdownMenuSubTrigger$1.displayName = SUB_TRIGGER_NAME;
|
|
9443
9443
|
var SUB_CONTENT_NAME = "DropdownMenuSubContent";
|
|
9444
|
-
var DropdownMenuSubContent$1 = React$
|
|
9444
|
+
var DropdownMenuSubContent$1 = React$I.forwardRef((props, forwardedRef) => {
|
|
9445
9445
|
const { __scopeDropdownMenu, ...subContentProps } = props;
|
|
9446
9446
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
9447
9447
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -9482,9 +9482,9 @@ var SubTrigger2 = DropdownMenuSubTrigger$1;
|
|
|
9482
9482
|
var SubContent2 = DropdownMenuSubContent$1;
|
|
9483
9483
|
|
|
9484
9484
|
// src/label.tsx
|
|
9485
|
-
const React$
|
|
9485
|
+
const React$H = await importShared('react');
|
|
9486
9486
|
var NAME$1 = "Label";
|
|
9487
|
-
var Label$2 = React$
|
|
9487
|
+
var Label$2 = React$H.forwardRef((props, forwardedRef) => {
|
|
9488
9488
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9489
9489
|
Primitive.label,
|
|
9490
9490
|
{
|
|
@@ -9503,7 +9503,7 @@ Label$2.displayName = NAME$1;
|
|
|
9503
9503
|
var Root$4 = Label$2;
|
|
9504
9504
|
|
|
9505
9505
|
// src/navigation-menu.tsx
|
|
9506
|
-
const React$
|
|
9506
|
+
const React$G = await importShared('react');
|
|
9507
9507
|
|
|
9508
9508
|
const ReactDOM$2 = await importShared('react-dom');
|
|
9509
9509
|
var NAVIGATION_MENU_NAME = "NavigationMenu";
|
|
@@ -9515,7 +9515,7 @@ var [createNavigationMenuContext, createNavigationMenuScope] = createContextScop
|
|
|
9515
9515
|
);
|
|
9516
9516
|
var [NavigationMenuProviderImpl, useNavigationMenuContext] = createNavigationMenuContext(NAVIGATION_MENU_NAME);
|
|
9517
9517
|
var [ViewportContentProvider, useViewportContentContext] = createNavigationMenuContext(NAVIGATION_MENU_NAME);
|
|
9518
|
-
var NavigationMenu$1 = React$
|
|
9518
|
+
var NavigationMenu$1 = React$G.forwardRef(
|
|
9519
9519
|
(props, forwardedRef) => {
|
|
9520
9520
|
const {
|
|
9521
9521
|
__scopeNavigationMenu,
|
|
@@ -9528,13 +9528,13 @@ var NavigationMenu$1 = React$E.forwardRef(
|
|
|
9528
9528
|
dir,
|
|
9529
9529
|
...NavigationMenuProps
|
|
9530
9530
|
} = props;
|
|
9531
|
-
const [navigationMenu, setNavigationMenu] = React$
|
|
9531
|
+
const [navigationMenu, setNavigationMenu] = React$G.useState(null);
|
|
9532
9532
|
const composedRef = useComposedRefs(forwardedRef, (node) => setNavigationMenu(node));
|
|
9533
9533
|
const direction = useDirection(dir);
|
|
9534
|
-
const openTimerRef = React$
|
|
9535
|
-
const closeTimerRef = React$
|
|
9536
|
-
const skipDelayTimerRef = React$
|
|
9537
|
-
const [isOpenDelayed, setIsOpenDelayed] = React$
|
|
9534
|
+
const openTimerRef = React$G.useRef(0);
|
|
9535
|
+
const closeTimerRef = React$G.useRef(0);
|
|
9536
|
+
const skipDelayTimerRef = React$G.useRef(0);
|
|
9537
|
+
const [isOpenDelayed, setIsOpenDelayed] = React$G.useState(true);
|
|
9538
9538
|
const [value, setValue] = useControllableState({
|
|
9539
9539
|
prop: valueProp,
|
|
9540
9540
|
onChange: (value2) => {
|
|
@@ -9555,18 +9555,18 @@ var NavigationMenu$1 = React$E.forwardRef(
|
|
|
9555
9555
|
defaultProp: defaultValue ?? "",
|
|
9556
9556
|
caller: NAVIGATION_MENU_NAME
|
|
9557
9557
|
});
|
|
9558
|
-
const startCloseTimer = React$
|
|
9558
|
+
const startCloseTimer = React$G.useCallback(() => {
|
|
9559
9559
|
window.clearTimeout(closeTimerRef.current);
|
|
9560
9560
|
closeTimerRef.current = window.setTimeout(() => setValue(""), 150);
|
|
9561
9561
|
}, [setValue]);
|
|
9562
|
-
const handleOpen = React$
|
|
9562
|
+
const handleOpen = React$G.useCallback(
|
|
9563
9563
|
(itemValue) => {
|
|
9564
9564
|
window.clearTimeout(closeTimerRef.current);
|
|
9565
9565
|
setValue(itemValue);
|
|
9566
9566
|
},
|
|
9567
9567
|
[setValue]
|
|
9568
9568
|
);
|
|
9569
|
-
const handleDelayedOpen = React$
|
|
9569
|
+
const handleDelayedOpen = React$G.useCallback(
|
|
9570
9570
|
(itemValue) => {
|
|
9571
9571
|
const isOpenItem = value === itemValue;
|
|
9572
9572
|
if (isOpenItem) {
|
|
@@ -9580,7 +9580,7 @@ var NavigationMenu$1 = React$E.forwardRef(
|
|
|
9580
9580
|
},
|
|
9581
9581
|
[value, setValue, delayDuration]
|
|
9582
9582
|
);
|
|
9583
|
-
React$
|
|
9583
|
+
React$G.useEffect(() => {
|
|
9584
9584
|
return () => {
|
|
9585
9585
|
window.clearTimeout(openTimerRef.current);
|
|
9586
9586
|
window.clearTimeout(closeTimerRef.current);
|
|
@@ -9627,7 +9627,7 @@ var NavigationMenu$1 = React$E.forwardRef(
|
|
|
9627
9627
|
);
|
|
9628
9628
|
NavigationMenu$1.displayName = NAVIGATION_MENU_NAME;
|
|
9629
9629
|
var SUB_NAME = "NavigationMenuSub";
|
|
9630
|
-
var NavigationMenuSub = React$
|
|
9630
|
+
var NavigationMenuSub = React$G.forwardRef(
|
|
9631
9631
|
(props, forwardedRef) => {
|
|
9632
9632
|
const {
|
|
9633
9633
|
__scopeNavigationMenu,
|
|
@@ -9678,9 +9678,9 @@ var NavigationMenuProvider = (props) => {
|
|
|
9678
9678
|
onContentEnter,
|
|
9679
9679
|
onContentLeave
|
|
9680
9680
|
} = props;
|
|
9681
|
-
const [viewport, setViewport] = React$
|
|
9682
|
-
const [viewportContent, setViewportContent] = React$
|
|
9683
|
-
const [indicatorTrack, setIndicatorTrack] = React$
|
|
9681
|
+
const [viewport, setViewport] = React$G.useState(null);
|
|
9682
|
+
const [viewportContent, setViewportContent] = React$G.useState(/* @__PURE__ */ new Map());
|
|
9683
|
+
const [indicatorTrack, setIndicatorTrack] = React$G.useState(null);
|
|
9684
9684
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9685
9685
|
NavigationMenuProviderImpl,
|
|
9686
9686
|
{
|
|
@@ -9702,13 +9702,13 @@ var NavigationMenuProvider = (props) => {
|
|
|
9702
9702
|
onContentLeave: useCallbackRef$1(onContentLeave),
|
|
9703
9703
|
onItemSelect: useCallbackRef$1(onItemSelect),
|
|
9704
9704
|
onItemDismiss: useCallbackRef$1(onItemDismiss),
|
|
9705
|
-
onViewportContentChange: React$
|
|
9705
|
+
onViewportContentChange: React$G.useCallback((contentValue, contentData) => {
|
|
9706
9706
|
setViewportContent((prevContent) => {
|
|
9707
9707
|
prevContent.set(contentValue, contentData);
|
|
9708
9708
|
return new Map(prevContent);
|
|
9709
9709
|
});
|
|
9710
9710
|
}, []),
|
|
9711
|
-
onViewportContentRemove: React$
|
|
9711
|
+
onViewportContentRemove: React$G.useCallback((contentValue) => {
|
|
9712
9712
|
setViewportContent((prevContent) => {
|
|
9713
9713
|
if (!prevContent.has(contentValue)) return prevContent;
|
|
9714
9714
|
prevContent.delete(contentValue);
|
|
@@ -9720,7 +9720,7 @@ var NavigationMenuProvider = (props) => {
|
|
|
9720
9720
|
);
|
|
9721
9721
|
};
|
|
9722
9722
|
var LIST_NAME = "NavigationMenuList";
|
|
9723
|
-
var NavigationMenuList$1 = React$
|
|
9723
|
+
var NavigationMenuList$1 = React$G.forwardRef(
|
|
9724
9724
|
(props, forwardedRef) => {
|
|
9725
9725
|
const { __scopeNavigationMenu, ...listProps } = props;
|
|
9726
9726
|
const context = useNavigationMenuContext(LIST_NAME, __scopeNavigationMenu);
|
|
@@ -9731,25 +9731,25 @@ var NavigationMenuList$1 = React$E.forwardRef(
|
|
|
9731
9731
|
NavigationMenuList$1.displayName = LIST_NAME;
|
|
9732
9732
|
var ITEM_NAME$1 = "NavigationMenuItem";
|
|
9733
9733
|
var [NavigationMenuItemContextProvider, useNavigationMenuItemContext] = createNavigationMenuContext(ITEM_NAME$1);
|
|
9734
|
-
var NavigationMenuItem$1 = React$
|
|
9734
|
+
var NavigationMenuItem$1 = React$G.forwardRef(
|
|
9735
9735
|
(props, forwardedRef) => {
|
|
9736
9736
|
const { __scopeNavigationMenu, value: valueProp, ...itemProps } = props;
|
|
9737
9737
|
const autoValue = useId$4();
|
|
9738
9738
|
const value = valueProp || autoValue || "LEGACY_REACT_AUTO_VALUE";
|
|
9739
|
-
const contentRef = React$
|
|
9740
|
-
const triggerRef = React$
|
|
9741
|
-
const focusProxyRef = React$
|
|
9742
|
-
const restoreContentTabOrderRef = React$
|
|
9739
|
+
const contentRef = React$G.useRef(null);
|
|
9740
|
+
const triggerRef = React$G.useRef(null);
|
|
9741
|
+
const focusProxyRef = React$G.useRef(null);
|
|
9742
|
+
const restoreContentTabOrderRef = React$G.useRef(() => {
|
|
9743
9743
|
});
|
|
9744
|
-
const wasEscapeCloseRef = React$
|
|
9745
|
-
const handleContentEntry = React$
|
|
9744
|
+
const wasEscapeCloseRef = React$G.useRef(false);
|
|
9745
|
+
const handleContentEntry = React$G.useCallback((side = "start") => {
|
|
9746
9746
|
if (contentRef.current) {
|
|
9747
9747
|
restoreContentTabOrderRef.current();
|
|
9748
9748
|
const candidates = getTabbableCandidates(contentRef.current);
|
|
9749
9749
|
if (candidates.length) focusFirst(side === "start" ? candidates : candidates.reverse());
|
|
9750
9750
|
}
|
|
9751
9751
|
}, []);
|
|
9752
|
-
const handleContentExit = React$
|
|
9752
|
+
const handleContentExit = React$G.useCallback(() => {
|
|
9753
9753
|
if (contentRef.current) {
|
|
9754
9754
|
const candidates = getTabbableCandidates(contentRef.current);
|
|
9755
9755
|
if (candidates.length) restoreContentTabOrderRef.current = removeFromTabOrder(candidates);
|
|
@@ -9775,16 +9775,16 @@ var NavigationMenuItem$1 = React$E.forwardRef(
|
|
|
9775
9775
|
);
|
|
9776
9776
|
NavigationMenuItem$1.displayName = ITEM_NAME$1;
|
|
9777
9777
|
var TRIGGER_NAME$4 = "NavigationMenuTrigger";
|
|
9778
|
-
var NavigationMenuTrigger$1 = React$
|
|
9778
|
+
var NavigationMenuTrigger$1 = React$G.forwardRef((props, forwardedRef) => {
|
|
9779
9779
|
const { __scopeNavigationMenu, disabled, ...triggerProps } = props;
|
|
9780
9780
|
const context = useNavigationMenuContext(TRIGGER_NAME$4, props.__scopeNavigationMenu);
|
|
9781
9781
|
const itemContext = useNavigationMenuItemContext(TRIGGER_NAME$4, props.__scopeNavigationMenu);
|
|
9782
|
-
const ref = React$
|
|
9782
|
+
const ref = React$G.useRef(null);
|
|
9783
9783
|
const composedRefs = useComposedRefs(ref, itemContext.triggerRef, forwardedRef);
|
|
9784
9784
|
const triggerId = makeTriggerId$1(context.baseId, itemContext.value);
|
|
9785
9785
|
const contentId = makeContentId$1(context.baseId, itemContext.value);
|
|
9786
|
-
const hasPointerMoveOpenedRef = React$
|
|
9787
|
-
const wasClickCloseRef = React$
|
|
9786
|
+
const hasPointerMoveOpenedRef = React$G.useRef(false);
|
|
9787
|
+
const wasClickCloseRef = React$G.useRef(false);
|
|
9788
9788
|
const open = itemContext.value === context.value;
|
|
9789
9789
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
9790
9790
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Collection$1.ItemSlot, { scope: __scopeNavigationMenu, value: itemContext.value, children: /* @__PURE__ */ jsxRuntimeExports.jsx(FocusGroupItem, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -9858,7 +9858,7 @@ var NavigationMenuTrigger$1 = React$E.forwardRef((props, forwardedRef) => {
|
|
|
9858
9858
|
NavigationMenuTrigger$1.displayName = TRIGGER_NAME$4;
|
|
9859
9859
|
var LINK_NAME = "NavigationMenuLink";
|
|
9860
9860
|
var LINK_SELECT = "navigationMenu.linkSelect";
|
|
9861
|
-
var NavigationMenuLink$1 = React$
|
|
9861
|
+
var NavigationMenuLink$1 = React$G.forwardRef(
|
|
9862
9862
|
(props, forwardedRef) => {
|
|
9863
9863
|
const { __scopeNavigationMenu, active, onSelect, ...linkProps } = props;
|
|
9864
9864
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(FocusGroupItem, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -9894,7 +9894,7 @@ var NavigationMenuLink$1 = React$E.forwardRef(
|
|
|
9894
9894
|
);
|
|
9895
9895
|
NavigationMenuLink$1.displayName = LINK_NAME;
|
|
9896
9896
|
var INDICATOR_NAME = "NavigationMenuIndicator";
|
|
9897
|
-
var NavigationMenuIndicator$1 = React$
|
|
9897
|
+
var NavigationMenuIndicator$1 = React$G.forwardRef((props, forwardedRef) => {
|
|
9898
9898
|
const { forceMount, ...indicatorProps } = props;
|
|
9899
9899
|
const context = useNavigationMenuContext(INDICATOR_NAME, props.__scopeNavigationMenu);
|
|
9900
9900
|
const isVisible = Boolean(context.value);
|
|
@@ -9904,17 +9904,17 @@ var NavigationMenuIndicator$1 = React$E.forwardRef((props, forwardedRef) => {
|
|
|
9904
9904
|
) : null;
|
|
9905
9905
|
});
|
|
9906
9906
|
NavigationMenuIndicator$1.displayName = INDICATOR_NAME;
|
|
9907
|
-
var NavigationMenuIndicatorImpl = React$
|
|
9907
|
+
var NavigationMenuIndicatorImpl = React$G.forwardRef((props, forwardedRef) => {
|
|
9908
9908
|
const { __scopeNavigationMenu, ...indicatorProps } = props;
|
|
9909
9909
|
const context = useNavigationMenuContext(INDICATOR_NAME, __scopeNavigationMenu);
|
|
9910
9910
|
const getItems = useCollection$1(__scopeNavigationMenu);
|
|
9911
|
-
const [activeTrigger, setActiveTrigger] = React$
|
|
9911
|
+
const [activeTrigger, setActiveTrigger] = React$G.useState(
|
|
9912
9912
|
null
|
|
9913
9913
|
);
|
|
9914
|
-
const [position, setPosition] = React$
|
|
9914
|
+
const [position, setPosition] = React$G.useState(null);
|
|
9915
9915
|
const isHorizontal = context.orientation === "horizontal";
|
|
9916
9916
|
const isVisible = Boolean(context.value);
|
|
9917
|
-
React$
|
|
9917
|
+
React$G.useEffect(() => {
|
|
9918
9918
|
const items = getItems();
|
|
9919
9919
|
const triggerNode = items.find((item) => item.value === context.value)?.ref.current;
|
|
9920
9920
|
if (triggerNode) setActiveTrigger(triggerNode);
|
|
@@ -9954,7 +9954,7 @@ var NavigationMenuIndicatorImpl = React$E.forwardRef((props, forwardedRef) => {
|
|
|
9954
9954
|
) : null;
|
|
9955
9955
|
});
|
|
9956
9956
|
var CONTENT_NAME$4 = "NavigationMenuContent";
|
|
9957
|
-
var NavigationMenuContent$1 = React$
|
|
9957
|
+
var NavigationMenuContent$1 = React$G.forwardRef((props, forwardedRef) => {
|
|
9958
9958
|
const { forceMount, ...contentProps } = props;
|
|
9959
9959
|
const context = useNavigationMenuContext(CONTENT_NAME$4, props.__scopeNavigationMenu);
|
|
9960
9960
|
const itemContext = useNavigationMenuItemContext(CONTENT_NAME$4, props.__scopeNavigationMenu);
|
|
@@ -9989,7 +9989,7 @@ var NavigationMenuContent$1 = React$E.forwardRef((props, forwardedRef) => {
|
|
|
9989
9989
|
) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ViewportContentMounter, { forceMount, ...commonProps, ref: composedRefs });
|
|
9990
9990
|
});
|
|
9991
9991
|
NavigationMenuContent$1.displayName = CONTENT_NAME$4;
|
|
9992
|
-
var ViewportContentMounter = React$
|
|
9992
|
+
var ViewportContentMounter = React$G.forwardRef((props, forwardedRef) => {
|
|
9993
9993
|
const context = useNavigationMenuContext(CONTENT_NAME$4, props.__scopeNavigationMenu);
|
|
9994
9994
|
const { onViewportContentChange, onViewportContentRemove } = context;
|
|
9995
9995
|
useLayoutEffect2(() => {
|
|
@@ -10004,7 +10004,7 @@ var ViewportContentMounter = React$E.forwardRef((props, forwardedRef) => {
|
|
|
10004
10004
|
return null;
|
|
10005
10005
|
});
|
|
10006
10006
|
var ROOT_CONTENT_DISMISS = "navigationMenu.rootContentDismiss";
|
|
10007
|
-
var NavigationMenuContentImpl = React$
|
|
10007
|
+
var NavigationMenuContentImpl = React$G.forwardRef((props, forwardedRef) => {
|
|
10008
10008
|
const {
|
|
10009
10009
|
__scopeNavigationMenu,
|
|
10010
10010
|
value,
|
|
@@ -10016,14 +10016,14 @@ var NavigationMenuContentImpl = React$E.forwardRef((props, forwardedRef) => {
|
|
|
10016
10016
|
...contentProps
|
|
10017
10017
|
} = props;
|
|
10018
10018
|
const context = useNavigationMenuContext(CONTENT_NAME$4, __scopeNavigationMenu);
|
|
10019
|
-
const ref = React$
|
|
10019
|
+
const ref = React$G.useRef(null);
|
|
10020
10020
|
const composedRefs = useComposedRefs(ref, forwardedRef);
|
|
10021
10021
|
const triggerId = makeTriggerId$1(context.baseId, value);
|
|
10022
10022
|
const contentId = makeContentId$1(context.baseId, value);
|
|
10023
10023
|
const getItems = useCollection$1(__scopeNavigationMenu);
|
|
10024
|
-
const prevMotionAttributeRef = React$
|
|
10024
|
+
const prevMotionAttributeRef = React$G.useRef(null);
|
|
10025
10025
|
const { onItemDismiss } = context;
|
|
10026
|
-
React$
|
|
10026
|
+
React$G.useEffect(() => {
|
|
10027
10027
|
const content = ref.current;
|
|
10028
10028
|
if (context.isRootMenu && content) {
|
|
10029
10029
|
const handleClose = () => {
|
|
@@ -10035,7 +10035,7 @@ var NavigationMenuContentImpl = React$E.forwardRef((props, forwardedRef) => {
|
|
|
10035
10035
|
return () => content.removeEventListener(ROOT_CONTENT_DISMISS, handleClose);
|
|
10036
10036
|
}
|
|
10037
10037
|
}, [context.isRootMenu, props.value, triggerRef, onItemDismiss, onRootContentClose]);
|
|
10038
|
-
const motionAttribute = React$
|
|
10038
|
+
const motionAttribute = React$G.useMemo(() => {
|
|
10039
10039
|
const items = getItems();
|
|
10040
10040
|
const values = items.map((item) => item.value);
|
|
10041
10041
|
if (context.dir === "rtl") values.reverse();
|
|
@@ -10105,14 +10105,14 @@ var NavigationMenuContentImpl = React$E.forwardRef((props, forwardedRef) => {
|
|
|
10105
10105
|
) });
|
|
10106
10106
|
});
|
|
10107
10107
|
var VIEWPORT_NAME$2 = "NavigationMenuViewport";
|
|
10108
|
-
var NavigationMenuViewport$1 = React$
|
|
10108
|
+
var NavigationMenuViewport$1 = React$G.forwardRef((props, forwardedRef) => {
|
|
10109
10109
|
const { forceMount, ...viewportProps } = props;
|
|
10110
10110
|
const context = useNavigationMenuContext(VIEWPORT_NAME$2, props.__scopeNavigationMenu);
|
|
10111
10111
|
const open = Boolean(context.value);
|
|
10112
10112
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Presence, { present: forceMount || open, children: /* @__PURE__ */ jsxRuntimeExports.jsx(NavigationMenuViewportImpl, { ...viewportProps, ref: forwardedRef }) });
|
|
10113
10113
|
});
|
|
10114
10114
|
NavigationMenuViewport$1.displayName = VIEWPORT_NAME$2;
|
|
10115
|
-
var NavigationMenuViewportImpl = React$
|
|
10115
|
+
var NavigationMenuViewportImpl = React$G.forwardRef((props, forwardedRef) => {
|
|
10116
10116
|
const { __scopeNavigationMenu, children, ...viewportImplProps } = props;
|
|
10117
10117
|
const context = useNavigationMenuContext(VIEWPORT_NAME$2, __scopeNavigationMenu);
|
|
10118
10118
|
const composedRefs = useComposedRefs(forwardedRef, context.onViewportChange);
|
|
@@ -10120,8 +10120,8 @@ var NavigationMenuViewportImpl = React$E.forwardRef((props, forwardedRef) => {
|
|
|
10120
10120
|
CONTENT_NAME$4,
|
|
10121
10121
|
props.__scopeNavigationMenu
|
|
10122
10122
|
);
|
|
10123
|
-
const [size, setSize] = React$
|
|
10124
|
-
const [content, setContent] = React$
|
|
10123
|
+
const [size, setSize] = React$G.useState(null);
|
|
10124
|
+
const [content, setContent] = React$G.useState(null);
|
|
10125
10125
|
const viewportWidth = size ? size?.width + "px" : void 0;
|
|
10126
10126
|
const viewportHeight = size ? size?.height + "px" : void 0;
|
|
10127
10127
|
const open = Boolean(context.value);
|
|
@@ -10162,7 +10162,7 @@ var NavigationMenuViewportImpl = React$E.forwardRef((props, forwardedRef) => {
|
|
|
10162
10162
|
);
|
|
10163
10163
|
});
|
|
10164
10164
|
var FOCUS_GROUP_NAME = "FocusGroup";
|
|
10165
|
-
var FocusGroup = React$
|
|
10165
|
+
var FocusGroup = React$G.forwardRef(
|
|
10166
10166
|
(props, forwardedRef) => {
|
|
10167
10167
|
const { __scopeNavigationMenu, ...groupProps } = props;
|
|
10168
10168
|
const context = useNavigationMenuContext(FOCUS_GROUP_NAME, __scopeNavigationMenu);
|
|
@@ -10171,7 +10171,7 @@ var FocusGroup = React$E.forwardRef(
|
|
|
10171
10171
|
);
|
|
10172
10172
|
var ARROW_KEYS = ["ArrowRight", "ArrowLeft", "ArrowUp", "ArrowDown"];
|
|
10173
10173
|
var FOCUS_GROUP_ITEM_NAME = "FocusGroupItem";
|
|
10174
|
-
var FocusGroupItem = React$
|
|
10174
|
+
var FocusGroupItem = React$G.forwardRef(
|
|
10175
10175
|
(props, forwardedRef) => {
|
|
10176
10176
|
const { __scopeNavigationMenu, ...groupProps } = props;
|
|
10177
10177
|
const getItems = useFocusGroupCollection(__scopeNavigationMenu);
|
|
@@ -10276,7 +10276,7 @@ function clamp(value, [min, max]) {
|
|
|
10276
10276
|
}
|
|
10277
10277
|
|
|
10278
10278
|
// src/popover.tsx
|
|
10279
|
-
const React$
|
|
10279
|
+
const React$F = await importShared('react');
|
|
10280
10280
|
var POPOVER_NAME = "Popover";
|
|
10281
10281
|
var [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [
|
|
10282
10282
|
createPopperScope
|
|
@@ -10293,8 +10293,8 @@ var Popover$1 = (props) => {
|
|
|
10293
10293
|
modal = false
|
|
10294
10294
|
} = props;
|
|
10295
10295
|
const popperScope = usePopperScope$2(__scopePopover);
|
|
10296
|
-
const triggerRef = React$
|
|
10297
|
-
const [hasCustomAnchor, setHasCustomAnchor] = React$
|
|
10296
|
+
const triggerRef = React$F.useRef(null);
|
|
10297
|
+
const [hasCustomAnchor, setHasCustomAnchor] = React$F.useState(false);
|
|
10298
10298
|
const [open, setOpen] = useControllableState({
|
|
10299
10299
|
prop: openProp,
|
|
10300
10300
|
defaultProp: defaultOpen ?? false,
|
|
@@ -10309,10 +10309,10 @@ var Popover$1 = (props) => {
|
|
|
10309
10309
|
triggerRef,
|
|
10310
10310
|
open,
|
|
10311
10311
|
onOpenChange: setOpen,
|
|
10312
|
-
onOpenToggle: React$
|
|
10312
|
+
onOpenToggle: React$F.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
10313
10313
|
hasCustomAnchor,
|
|
10314
|
-
onCustomAnchorAdd: React$
|
|
10315
|
-
onCustomAnchorRemove: React$
|
|
10314
|
+
onCustomAnchorAdd: React$F.useCallback(() => setHasCustomAnchor(true), []),
|
|
10315
|
+
onCustomAnchorRemove: React$F.useCallback(() => setHasCustomAnchor(false), []),
|
|
10316
10316
|
modal,
|
|
10317
10317
|
children
|
|
10318
10318
|
}
|
|
@@ -10320,13 +10320,13 @@ var Popover$1 = (props) => {
|
|
|
10320
10320
|
};
|
|
10321
10321
|
Popover$1.displayName = POPOVER_NAME;
|
|
10322
10322
|
var ANCHOR_NAME = "PopoverAnchor";
|
|
10323
|
-
var PopoverAnchor$1 = React$
|
|
10323
|
+
var PopoverAnchor$1 = React$F.forwardRef(
|
|
10324
10324
|
(props, forwardedRef) => {
|
|
10325
10325
|
const { __scopePopover, ...anchorProps } = props;
|
|
10326
10326
|
const context = usePopoverContext(ANCHOR_NAME, __scopePopover);
|
|
10327
10327
|
const popperScope = usePopperScope$2(__scopePopover);
|
|
10328
10328
|
const { onCustomAnchorAdd, onCustomAnchorRemove } = context;
|
|
10329
|
-
React$
|
|
10329
|
+
React$F.useEffect(() => {
|
|
10330
10330
|
onCustomAnchorAdd();
|
|
10331
10331
|
return () => onCustomAnchorRemove();
|
|
10332
10332
|
}, [onCustomAnchorAdd, onCustomAnchorRemove]);
|
|
@@ -10335,7 +10335,7 @@ var PopoverAnchor$1 = React$D.forwardRef(
|
|
|
10335
10335
|
);
|
|
10336
10336
|
PopoverAnchor$1.displayName = ANCHOR_NAME;
|
|
10337
10337
|
var TRIGGER_NAME$3 = "PopoverTrigger";
|
|
10338
|
-
var PopoverTrigger$1 = React$
|
|
10338
|
+
var PopoverTrigger$1 = React$F.forwardRef(
|
|
10339
10339
|
(props, forwardedRef) => {
|
|
10340
10340
|
const { __scopePopover, ...triggerProps } = props;
|
|
10341
10341
|
const context = usePopoverContext(TRIGGER_NAME$3, __scopePopover);
|
|
@@ -10369,7 +10369,7 @@ var PopoverPortal = (props) => {
|
|
|
10369
10369
|
};
|
|
10370
10370
|
PopoverPortal.displayName = PORTAL_NAME$2;
|
|
10371
10371
|
var CONTENT_NAME$3 = "PopoverContent";
|
|
10372
|
-
var PopoverContent$1 = React$
|
|
10372
|
+
var PopoverContent$1 = React$F.forwardRef(
|
|
10373
10373
|
(props, forwardedRef) => {
|
|
10374
10374
|
const portalContext = usePortalContext$1(CONTENT_NAME$3, props.__scopePopover);
|
|
10375
10375
|
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
@@ -10379,13 +10379,13 @@ var PopoverContent$1 = React$D.forwardRef(
|
|
|
10379
10379
|
);
|
|
10380
10380
|
PopoverContent$1.displayName = CONTENT_NAME$3;
|
|
10381
10381
|
var Slot$1 = createSlot("PopoverContent.RemoveScroll");
|
|
10382
|
-
var PopoverContentModal = React$
|
|
10382
|
+
var PopoverContentModal = React$F.forwardRef(
|
|
10383
10383
|
(props, forwardedRef) => {
|
|
10384
10384
|
const context = usePopoverContext(CONTENT_NAME$3, props.__scopePopover);
|
|
10385
|
-
const contentRef = React$
|
|
10385
|
+
const contentRef = React$F.useRef(null);
|
|
10386
10386
|
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
10387
|
-
const isRightClickOutsideRef = React$
|
|
10388
|
-
React$
|
|
10387
|
+
const isRightClickOutsideRef = React$F.useRef(false);
|
|
10388
|
+
React$F.useEffect(() => {
|
|
10389
10389
|
const content = contentRef.current;
|
|
10390
10390
|
if (content) return hideOthers(content);
|
|
10391
10391
|
}, []);
|
|
@@ -10419,11 +10419,11 @@ var PopoverContentModal = React$D.forwardRef(
|
|
|
10419
10419
|
) });
|
|
10420
10420
|
}
|
|
10421
10421
|
);
|
|
10422
|
-
var PopoverContentNonModal = React$
|
|
10422
|
+
var PopoverContentNonModal = React$F.forwardRef(
|
|
10423
10423
|
(props, forwardedRef) => {
|
|
10424
10424
|
const context = usePopoverContext(CONTENT_NAME$3, props.__scopePopover);
|
|
10425
|
-
const hasInteractedOutsideRef = React$
|
|
10426
|
-
const hasPointerDownOutsideRef = React$
|
|
10425
|
+
const hasInteractedOutsideRef = React$F.useRef(false);
|
|
10426
|
+
const hasPointerDownOutsideRef = React$F.useRef(false);
|
|
10427
10427
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10428
10428
|
PopoverContentImpl,
|
|
10429
10429
|
{
|
|
@@ -10459,7 +10459,7 @@ var PopoverContentNonModal = React$D.forwardRef(
|
|
|
10459
10459
|
);
|
|
10460
10460
|
}
|
|
10461
10461
|
);
|
|
10462
|
-
var PopoverContentImpl = React$
|
|
10462
|
+
var PopoverContentImpl = React$F.forwardRef(
|
|
10463
10463
|
(props, forwardedRef) => {
|
|
10464
10464
|
const {
|
|
10465
10465
|
__scopePopover,
|
|
@@ -10523,7 +10523,7 @@ var PopoverContentImpl = React$D.forwardRef(
|
|
|
10523
10523
|
}
|
|
10524
10524
|
);
|
|
10525
10525
|
var CLOSE_NAME = "PopoverClose";
|
|
10526
|
-
var PopoverClose = React$
|
|
10526
|
+
var PopoverClose = React$F.forwardRef(
|
|
10527
10527
|
(props, forwardedRef) => {
|
|
10528
10528
|
const { __scopePopover, ...closeProps } = props;
|
|
10529
10529
|
const context = usePopoverContext(CLOSE_NAME, __scopePopover);
|
|
@@ -10540,7 +10540,7 @@ var PopoverClose = React$D.forwardRef(
|
|
|
10540
10540
|
);
|
|
10541
10541
|
PopoverClose.displayName = CLOSE_NAME;
|
|
10542
10542
|
var ARROW_NAME$2 = "PopoverArrow";
|
|
10543
|
-
var PopoverArrow = React$
|
|
10543
|
+
var PopoverArrow = React$F.forwardRef(
|
|
10544
10544
|
(props, forwardedRef) => {
|
|
10545
10545
|
const { __scopePopover, ...arrowProps } = props;
|
|
10546
10546
|
const popperScope = usePopperScope$2(__scopePopover);
|
|
@@ -10561,10 +10561,10 @@ var Content2$2 = PopoverContent$1;
|
|
|
10561
10561
|
const React2 = await importShared('react');
|
|
10562
10562
|
|
|
10563
10563
|
// src/use-state-machine.ts
|
|
10564
|
-
const React$
|
|
10564
|
+
const React$E = await importShared('react');
|
|
10565
10565
|
|
|
10566
10566
|
function useStateMachine(initialState, machine) {
|
|
10567
|
-
return React$
|
|
10567
|
+
return React$E.useReducer((state, event) => {
|
|
10568
10568
|
const nextState = machine[state][event];
|
|
10569
10569
|
return nextState ?? state;
|
|
10570
10570
|
}, initialState);
|
|
@@ -11269,7 +11269,7 @@ var Viewport$1 = ScrollAreaViewport;
|
|
|
11269
11269
|
var Corner = ScrollAreaCorner;
|
|
11270
11270
|
|
|
11271
11271
|
// src/select.tsx
|
|
11272
|
-
const React$
|
|
11272
|
+
const React$D = await importShared('react');
|
|
11273
11273
|
|
|
11274
11274
|
const ReactDOM$1 = await importShared('react-dom');
|
|
11275
11275
|
var OPEN_KEYS = [" ", "Enter", "ArrowUp", "ArrowDown"];
|
|
@@ -11301,9 +11301,9 @@ var Select$2 = (props) => {
|
|
|
11301
11301
|
form
|
|
11302
11302
|
} = props;
|
|
11303
11303
|
const popperScope = usePopperScope$1(__scopeSelect);
|
|
11304
|
-
const [trigger, setTrigger] = React$
|
|
11305
|
-
const [valueNode, setValueNode] = React$
|
|
11306
|
-
const [valueNodeHasChildren, setValueNodeHasChildren] = React$
|
|
11304
|
+
const [trigger, setTrigger] = React$D.useState(null);
|
|
11305
|
+
const [valueNode, setValueNode] = React$D.useState(null);
|
|
11306
|
+
const [valueNodeHasChildren, setValueNodeHasChildren] = React$D.useState(false);
|
|
11307
11307
|
const direction = useDirection(dir);
|
|
11308
11308
|
const [open, setOpen] = useControllableState({
|
|
11309
11309
|
prop: openProp,
|
|
@@ -11317,9 +11317,9 @@ var Select$2 = (props) => {
|
|
|
11317
11317
|
onChange: onValueChange,
|
|
11318
11318
|
caller: SELECT_NAME
|
|
11319
11319
|
});
|
|
11320
|
-
const triggerPointerDownPosRef = React$
|
|
11320
|
+
const triggerPointerDownPosRef = React$D.useRef(null);
|
|
11321
11321
|
const isFormControl = trigger ? form || !!trigger.closest("form") : true;
|
|
11322
|
-
const [nativeOptionsSet, setNativeOptionsSet] = React$
|
|
11322
|
+
const [nativeOptionsSet, setNativeOptionsSet] = React$D.useState(/* @__PURE__ */ new Set());
|
|
11323
11323
|
const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(";");
|
|
11324
11324
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Root2$5, { ...popperScope, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
11325
11325
|
SelectProvider,
|
|
@@ -11345,10 +11345,10 @@ var Select$2 = (props) => {
|
|
|
11345
11345
|
SelectNativeOptionsProvider,
|
|
11346
11346
|
{
|
|
11347
11347
|
scope: props.__scopeSelect,
|
|
11348
|
-
onNativeOptionAdd: React$
|
|
11348
|
+
onNativeOptionAdd: React$D.useCallback((option) => {
|
|
11349
11349
|
setNativeOptionsSet((prev) => new Set(prev).add(option));
|
|
11350
11350
|
}, []),
|
|
11351
|
-
onNativeOptionRemove: React$
|
|
11351
|
+
onNativeOptionRemove: React$D.useCallback((option) => {
|
|
11352
11352
|
setNativeOptionsSet((prev) => {
|
|
11353
11353
|
const optionsSet = new Set(prev);
|
|
11354
11354
|
optionsSet.delete(option);
|
|
@@ -11383,7 +11383,7 @@ var Select$2 = (props) => {
|
|
|
11383
11383
|
};
|
|
11384
11384
|
Select$2.displayName = SELECT_NAME;
|
|
11385
11385
|
var TRIGGER_NAME$2 = "SelectTrigger";
|
|
11386
|
-
var SelectTrigger$1 = React$
|
|
11386
|
+
var SelectTrigger$1 = React$D.forwardRef(
|
|
11387
11387
|
(props, forwardedRef) => {
|
|
11388
11388
|
const { __scopeSelect, disabled = false, ...triggerProps } = props;
|
|
11389
11389
|
const popperScope = usePopperScope$1(__scopeSelect);
|
|
@@ -11391,7 +11391,7 @@ var SelectTrigger$1 = React$B.forwardRef(
|
|
|
11391
11391
|
const isDisabled = context.disabled || disabled;
|
|
11392
11392
|
const composedRefs = useComposedRefs(forwardedRef, context.onTriggerChange);
|
|
11393
11393
|
const getItems = useCollection(__scopeSelect);
|
|
11394
|
-
const pointerTypeRef = React$
|
|
11394
|
+
const pointerTypeRef = React$D.useRef("touch");
|
|
11395
11395
|
const [searchRef, handleTypeaheadSearch, resetTypeahead] = useTypeaheadSearch((search) => {
|
|
11396
11396
|
const enabledItems = getItems().filter((item) => !item.disabled);
|
|
11397
11397
|
const currentItem = enabledItems.find((item) => item.value === context.value);
|
|
@@ -11461,7 +11461,7 @@ var SelectTrigger$1 = React$B.forwardRef(
|
|
|
11461
11461
|
);
|
|
11462
11462
|
SelectTrigger$1.displayName = TRIGGER_NAME$2;
|
|
11463
11463
|
var VALUE_NAME = "SelectValue";
|
|
11464
|
-
var SelectValue$1 = React$
|
|
11464
|
+
var SelectValue$1 = React$D.forwardRef(
|
|
11465
11465
|
(props, forwardedRef) => {
|
|
11466
11466
|
const { __scopeSelect, className, style, children, placeholder = "", ...valueProps } = props;
|
|
11467
11467
|
const context = useSelectContext(VALUE_NAME, __scopeSelect);
|
|
@@ -11484,7 +11484,7 @@ var SelectValue$1 = React$B.forwardRef(
|
|
|
11484
11484
|
);
|
|
11485
11485
|
SelectValue$1.displayName = VALUE_NAME;
|
|
11486
11486
|
var ICON_NAME = "SelectIcon";
|
|
11487
|
-
var SelectIcon = React$
|
|
11487
|
+
var SelectIcon = React$D.forwardRef(
|
|
11488
11488
|
(props, forwardedRef) => {
|
|
11489
11489
|
const { __scopeSelect, children, ...iconProps } = props;
|
|
11490
11490
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "\u25BC" });
|
|
@@ -11497,10 +11497,10 @@ var SelectPortal = (props) => {
|
|
|
11497
11497
|
};
|
|
11498
11498
|
SelectPortal.displayName = PORTAL_NAME$1;
|
|
11499
11499
|
var CONTENT_NAME$2 = "SelectContent";
|
|
11500
|
-
var SelectContent$1 = React$
|
|
11500
|
+
var SelectContent$1 = React$D.forwardRef(
|
|
11501
11501
|
(props, forwardedRef) => {
|
|
11502
11502
|
const context = useSelectContext(CONTENT_NAME$2, props.__scopeSelect);
|
|
11503
|
-
const [fragment, setFragment] = React$
|
|
11503
|
+
const [fragment, setFragment] = React$D.useState();
|
|
11504
11504
|
useLayoutEffect2(() => {
|
|
11505
11505
|
setFragment(new DocumentFragment());
|
|
11506
11506
|
}, []);
|
|
@@ -11519,7 +11519,7 @@ var CONTENT_MARGIN = 10;
|
|
|
11519
11519
|
var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME$2);
|
|
11520
11520
|
var CONTENT_IMPL_NAME = "SelectContentImpl";
|
|
11521
11521
|
var Slot = createSlot("SelectContent.RemoveScroll");
|
|
11522
|
-
var SelectContentImpl = React$
|
|
11522
|
+
var SelectContentImpl = React$D.forwardRef(
|
|
11523
11523
|
(props, forwardedRef) => {
|
|
11524
11524
|
const {
|
|
11525
11525
|
__scopeSelect,
|
|
@@ -11543,21 +11543,21 @@ var SelectContentImpl = React$B.forwardRef(
|
|
|
11543
11543
|
...contentProps
|
|
11544
11544
|
} = props;
|
|
11545
11545
|
const context = useSelectContext(CONTENT_NAME$2, __scopeSelect);
|
|
11546
|
-
const [content, setContent] = React$
|
|
11547
|
-
const [viewport, setViewport] = React$
|
|
11546
|
+
const [content, setContent] = React$D.useState(null);
|
|
11547
|
+
const [viewport, setViewport] = React$D.useState(null);
|
|
11548
11548
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
11549
|
-
const [selectedItem, setSelectedItem] = React$
|
|
11550
|
-
const [selectedItemText, setSelectedItemText] = React$
|
|
11549
|
+
const [selectedItem, setSelectedItem] = React$D.useState(null);
|
|
11550
|
+
const [selectedItemText, setSelectedItemText] = React$D.useState(
|
|
11551
11551
|
null
|
|
11552
11552
|
);
|
|
11553
11553
|
const getItems = useCollection(__scopeSelect);
|
|
11554
|
-
const [isPositioned, setIsPositioned] = React$
|
|
11555
|
-
const firstValidItemFoundRef = React$
|
|
11556
|
-
React$
|
|
11554
|
+
const [isPositioned, setIsPositioned] = React$D.useState(false);
|
|
11555
|
+
const firstValidItemFoundRef = React$D.useRef(false);
|
|
11556
|
+
React$D.useEffect(() => {
|
|
11557
11557
|
if (content) return hideOthers(content);
|
|
11558
11558
|
}, [content]);
|
|
11559
11559
|
useFocusGuards();
|
|
11560
|
-
const focusFirst = React$
|
|
11560
|
+
const focusFirst = React$D.useCallback(
|
|
11561
11561
|
(candidates) => {
|
|
11562
11562
|
const [firstItem, ...restItems] = getItems().map((item) => item.ref.current);
|
|
11563
11563
|
const [lastItem] = restItems.slice(-1);
|
|
@@ -11573,17 +11573,17 @@ var SelectContentImpl = React$B.forwardRef(
|
|
|
11573
11573
|
},
|
|
11574
11574
|
[getItems, viewport]
|
|
11575
11575
|
);
|
|
11576
|
-
const focusSelectedItem = React$
|
|
11576
|
+
const focusSelectedItem = React$D.useCallback(
|
|
11577
11577
|
() => focusFirst([selectedItem, content]),
|
|
11578
11578
|
[focusFirst, selectedItem, content]
|
|
11579
11579
|
);
|
|
11580
|
-
React$
|
|
11580
|
+
React$D.useEffect(() => {
|
|
11581
11581
|
if (isPositioned) {
|
|
11582
11582
|
focusSelectedItem();
|
|
11583
11583
|
}
|
|
11584
11584
|
}, [isPositioned, focusSelectedItem]);
|
|
11585
11585
|
const { onOpenChange, triggerPointerDownPosRef } = context;
|
|
11586
|
-
React$
|
|
11586
|
+
React$D.useEffect(() => {
|
|
11587
11587
|
if (content) {
|
|
11588
11588
|
let pointerMoveDelta = { x: 0, y: 0 };
|
|
11589
11589
|
const handlePointerMove = (event) => {
|
|
@@ -11613,7 +11613,7 @@ var SelectContentImpl = React$B.forwardRef(
|
|
|
11613
11613
|
};
|
|
11614
11614
|
}
|
|
11615
11615
|
}, [content, onOpenChange, triggerPointerDownPosRef]);
|
|
11616
|
-
React$
|
|
11616
|
+
React$D.useEffect(() => {
|
|
11617
11617
|
const close = () => onOpenChange(false);
|
|
11618
11618
|
window.addEventListener("blur", close);
|
|
11619
11619
|
window.addEventListener("resize", close);
|
|
@@ -11630,7 +11630,7 @@ var SelectContentImpl = React$B.forwardRef(
|
|
|
11630
11630
|
setTimeout(() => nextItem.ref.current.focus());
|
|
11631
11631
|
}
|
|
11632
11632
|
});
|
|
11633
|
-
const itemRefCallback = React$
|
|
11633
|
+
const itemRefCallback = React$D.useCallback(
|
|
11634
11634
|
(node, value, disabled) => {
|
|
11635
11635
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
11636
11636
|
const isSelectedItem = context.value !== void 0 && context.value === value;
|
|
@@ -11641,8 +11641,8 @@ var SelectContentImpl = React$B.forwardRef(
|
|
|
11641
11641
|
},
|
|
11642
11642
|
[context.value]
|
|
11643
11643
|
);
|
|
11644
|
-
const handleItemLeave = React$
|
|
11645
|
-
const itemTextRefCallback = React$
|
|
11644
|
+
const handleItemLeave = React$D.useCallback(() => content?.focus(), [content]);
|
|
11645
|
+
const itemTextRefCallback = React$D.useCallback(
|
|
11646
11646
|
(node, value, disabled) => {
|
|
11647
11647
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
11648
11648
|
const isSelectedItem = context.value !== void 0 && context.value === value;
|
|
@@ -11753,18 +11753,18 @@ var SelectContentImpl = React$B.forwardRef(
|
|
|
11753
11753
|
);
|
|
11754
11754
|
SelectContentImpl.displayName = CONTENT_IMPL_NAME;
|
|
11755
11755
|
var ITEM_ALIGNED_POSITION_NAME = "SelectItemAlignedPosition";
|
|
11756
|
-
var SelectItemAlignedPosition = React$
|
|
11756
|
+
var SelectItemAlignedPosition = React$D.forwardRef((props, forwardedRef) => {
|
|
11757
11757
|
const { __scopeSelect, onPlaced, ...popperProps } = props;
|
|
11758
11758
|
const context = useSelectContext(CONTENT_NAME$2, __scopeSelect);
|
|
11759
11759
|
const contentContext = useSelectContentContext(CONTENT_NAME$2, __scopeSelect);
|
|
11760
|
-
const [contentWrapper, setContentWrapper] = React$
|
|
11761
|
-
const [content, setContent] = React$
|
|
11760
|
+
const [contentWrapper, setContentWrapper] = React$D.useState(null);
|
|
11761
|
+
const [content, setContent] = React$D.useState(null);
|
|
11762
11762
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
11763
11763
|
const getItems = useCollection(__scopeSelect);
|
|
11764
|
-
const shouldExpandOnScrollRef = React$
|
|
11765
|
-
const shouldRepositionRef = React$
|
|
11764
|
+
const shouldExpandOnScrollRef = React$D.useRef(false);
|
|
11765
|
+
const shouldRepositionRef = React$D.useRef(true);
|
|
11766
11766
|
const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;
|
|
11767
|
-
const position = React$
|
|
11767
|
+
const position = React$D.useCallback(() => {
|
|
11768
11768
|
if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) {
|
|
11769
11769
|
const triggerRect = context.trigger.getBoundingClientRect();
|
|
11770
11770
|
const contentRect = content.getBoundingClientRect();
|
|
@@ -11864,11 +11864,11 @@ var SelectItemAlignedPosition = React$B.forwardRef((props, forwardedRef) => {
|
|
|
11864
11864
|
onPlaced
|
|
11865
11865
|
]);
|
|
11866
11866
|
useLayoutEffect2(() => position(), [position]);
|
|
11867
|
-
const [contentZIndex, setContentZIndex] = React$
|
|
11867
|
+
const [contentZIndex, setContentZIndex] = React$D.useState();
|
|
11868
11868
|
useLayoutEffect2(() => {
|
|
11869
11869
|
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
11870
11870
|
}, [content]);
|
|
11871
|
-
const handleScrollButtonChange = React$
|
|
11871
|
+
const handleScrollButtonChange = React$D.useCallback(
|
|
11872
11872
|
(node) => {
|
|
11873
11873
|
if (node && shouldRepositionRef.current === true) {
|
|
11874
11874
|
position();
|
|
@@ -11917,7 +11917,7 @@ var SelectItemAlignedPosition = React$B.forwardRef((props, forwardedRef) => {
|
|
|
11917
11917
|
});
|
|
11918
11918
|
SelectItemAlignedPosition.displayName = ITEM_ALIGNED_POSITION_NAME;
|
|
11919
11919
|
var POPPER_POSITION_NAME = "SelectPopperPosition";
|
|
11920
|
-
var SelectPopperPosition = React$
|
|
11920
|
+
var SelectPopperPosition = React$D.forwardRef((props, forwardedRef) => {
|
|
11921
11921
|
const {
|
|
11922
11922
|
__scopeSelect,
|
|
11923
11923
|
align = "start",
|
|
@@ -11952,13 +11952,13 @@ var SelectPopperPosition = React$B.forwardRef((props, forwardedRef) => {
|
|
|
11952
11952
|
SelectPopperPosition.displayName = POPPER_POSITION_NAME;
|
|
11953
11953
|
var [SelectViewportProvider, useSelectViewportContext] = createSelectContext(CONTENT_NAME$2, {});
|
|
11954
11954
|
var VIEWPORT_NAME = "SelectViewport";
|
|
11955
|
-
var SelectViewport = React$
|
|
11955
|
+
var SelectViewport = React$D.forwardRef(
|
|
11956
11956
|
(props, forwardedRef) => {
|
|
11957
11957
|
const { __scopeSelect, nonce, ...viewportProps } = props;
|
|
11958
11958
|
const contentContext = useSelectContentContext(VIEWPORT_NAME, __scopeSelect);
|
|
11959
11959
|
const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);
|
|
11960
11960
|
const composedRefs = useComposedRefs(forwardedRef, contentContext.onViewportChange);
|
|
11961
|
-
const prevScrollTopRef = React$
|
|
11961
|
+
const prevScrollTopRef = React$D.useRef(0);
|
|
11962
11962
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
11963
11963
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11964
11964
|
"style",
|
|
@@ -12021,7 +12021,7 @@ var SelectViewport = React$B.forwardRef(
|
|
|
12021
12021
|
SelectViewport.displayName = VIEWPORT_NAME;
|
|
12022
12022
|
var GROUP_NAME = "SelectGroup";
|
|
12023
12023
|
var [SelectGroupContextProvider, useSelectGroupContext] = createSelectContext(GROUP_NAME);
|
|
12024
|
-
var SelectGroup$1 = React$
|
|
12024
|
+
var SelectGroup$1 = React$D.forwardRef(
|
|
12025
12025
|
(props, forwardedRef) => {
|
|
12026
12026
|
const { __scopeSelect, ...groupProps } = props;
|
|
12027
12027
|
const groupId = useId$4();
|
|
@@ -12030,7 +12030,7 @@ var SelectGroup$1 = React$B.forwardRef(
|
|
|
12030
12030
|
);
|
|
12031
12031
|
SelectGroup$1.displayName = GROUP_NAME;
|
|
12032
12032
|
var LABEL_NAME = "SelectLabel";
|
|
12033
|
-
var SelectLabel$1 = React$
|
|
12033
|
+
var SelectLabel$1 = React$D.forwardRef(
|
|
12034
12034
|
(props, forwardedRef) => {
|
|
12035
12035
|
const { __scopeSelect, ...labelProps } = props;
|
|
12036
12036
|
const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
|
|
@@ -12040,7 +12040,7 @@ var SelectLabel$1 = React$B.forwardRef(
|
|
|
12040
12040
|
SelectLabel$1.displayName = LABEL_NAME;
|
|
12041
12041
|
var ITEM_NAME = "SelectItem";
|
|
12042
12042
|
var [SelectItemContextProvider, useSelectItemContext] = createSelectContext(ITEM_NAME);
|
|
12043
|
-
var SelectItem$1 = React$
|
|
12043
|
+
var SelectItem$1 = React$D.forwardRef(
|
|
12044
12044
|
(props, forwardedRef) => {
|
|
12045
12045
|
const {
|
|
12046
12046
|
__scopeSelect,
|
|
@@ -12052,14 +12052,14 @@ var SelectItem$1 = React$B.forwardRef(
|
|
|
12052
12052
|
const context = useSelectContext(ITEM_NAME, __scopeSelect);
|
|
12053
12053
|
const contentContext = useSelectContentContext(ITEM_NAME, __scopeSelect);
|
|
12054
12054
|
const isSelected = context.value === value;
|
|
12055
|
-
const [textValue, setTextValue] = React$
|
|
12056
|
-
const [isFocused, setIsFocused] = React$
|
|
12055
|
+
const [textValue, setTextValue] = React$D.useState(textValueProp ?? "");
|
|
12056
|
+
const [isFocused, setIsFocused] = React$D.useState(false);
|
|
12057
12057
|
const composedRefs = useComposedRefs(
|
|
12058
12058
|
forwardedRef,
|
|
12059
12059
|
(node) => contentContext.itemRefCallback?.(node, value, disabled)
|
|
12060
12060
|
);
|
|
12061
12061
|
const textId = useId$4();
|
|
12062
|
-
const pointerTypeRef = React$
|
|
12062
|
+
const pointerTypeRef = React$D.useRef("touch");
|
|
12063
12063
|
const handleSelect = () => {
|
|
12064
12064
|
if (!disabled) {
|
|
12065
12065
|
context.onValueChange(value);
|
|
@@ -12079,7 +12079,7 @@ var SelectItem$1 = React$B.forwardRef(
|
|
|
12079
12079
|
disabled,
|
|
12080
12080
|
textId,
|
|
12081
12081
|
isSelected,
|
|
12082
|
-
onItemTextChange: React$
|
|
12082
|
+
onItemTextChange: React$D.useCallback((node) => {
|
|
12083
12083
|
setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? "").trim());
|
|
12084
12084
|
}, []),
|
|
12085
12085
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -12142,14 +12142,14 @@ var SelectItem$1 = React$B.forwardRef(
|
|
|
12142
12142
|
);
|
|
12143
12143
|
SelectItem$1.displayName = ITEM_NAME;
|
|
12144
12144
|
var ITEM_TEXT_NAME = "SelectItemText";
|
|
12145
|
-
var SelectItemText = React$
|
|
12145
|
+
var SelectItemText = React$D.forwardRef(
|
|
12146
12146
|
(props, forwardedRef) => {
|
|
12147
12147
|
const { __scopeSelect, className, style, ...itemTextProps } = props;
|
|
12148
12148
|
const context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
12149
12149
|
const contentContext = useSelectContentContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
12150
12150
|
const itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
12151
12151
|
const nativeOptionsContext = useSelectNativeOptionsContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
12152
|
-
const [itemTextNode, setItemTextNode] = React$
|
|
12152
|
+
const [itemTextNode, setItemTextNode] = React$D.useState(null);
|
|
12153
12153
|
const composedRefs = useComposedRefs(
|
|
12154
12154
|
forwardedRef,
|
|
12155
12155
|
(node) => setItemTextNode(node),
|
|
@@ -12157,7 +12157,7 @@ var SelectItemText = React$B.forwardRef(
|
|
|
12157
12157
|
(node) => contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled)
|
|
12158
12158
|
);
|
|
12159
12159
|
const textContent = itemTextNode?.textContent;
|
|
12160
|
-
const nativeOption = React$
|
|
12160
|
+
const nativeOption = React$D.useMemo(
|
|
12161
12161
|
() => /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value),
|
|
12162
12162
|
[itemContext.disabled, itemContext.value, textContent]
|
|
12163
12163
|
);
|
|
@@ -12174,7 +12174,7 @@ var SelectItemText = React$B.forwardRef(
|
|
|
12174
12174
|
);
|
|
12175
12175
|
SelectItemText.displayName = ITEM_TEXT_NAME;
|
|
12176
12176
|
var ITEM_INDICATOR_NAME = "SelectItemIndicator";
|
|
12177
|
-
var SelectItemIndicator = React$
|
|
12177
|
+
var SelectItemIndicator = React$D.forwardRef(
|
|
12178
12178
|
(props, forwardedRef) => {
|
|
12179
12179
|
const { __scopeSelect, ...itemIndicatorProps } = props;
|
|
12180
12180
|
const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);
|
|
@@ -12183,10 +12183,10 @@ var SelectItemIndicator = React$B.forwardRef(
|
|
|
12183
12183
|
);
|
|
12184
12184
|
SelectItemIndicator.displayName = ITEM_INDICATOR_NAME;
|
|
12185
12185
|
var SCROLL_UP_BUTTON_NAME = "SelectScrollUpButton";
|
|
12186
|
-
var SelectScrollUpButton = React$
|
|
12186
|
+
var SelectScrollUpButton = React$D.forwardRef((props, forwardedRef) => {
|
|
12187
12187
|
const contentContext = useSelectContentContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
12188
12188
|
const viewportContext = useSelectViewportContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
12189
|
-
const [canScrollUp, setCanScrollUp] = React$
|
|
12189
|
+
const [canScrollUp, setCanScrollUp] = React$D.useState(false);
|
|
12190
12190
|
const composedRefs = useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange);
|
|
12191
12191
|
useLayoutEffect2(() => {
|
|
12192
12192
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -12216,10 +12216,10 @@ var SelectScrollUpButton = React$B.forwardRef((props, forwardedRef) => {
|
|
|
12216
12216
|
});
|
|
12217
12217
|
SelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME;
|
|
12218
12218
|
var SCROLL_DOWN_BUTTON_NAME = "SelectScrollDownButton";
|
|
12219
|
-
var SelectScrollDownButton = React$
|
|
12219
|
+
var SelectScrollDownButton = React$D.forwardRef((props, forwardedRef) => {
|
|
12220
12220
|
const contentContext = useSelectContentContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
12221
12221
|
const viewportContext = useSelectViewportContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
12222
|
-
const [canScrollDown, setCanScrollDown] = React$
|
|
12222
|
+
const [canScrollDown, setCanScrollDown] = React$D.useState(false);
|
|
12223
12223
|
const composedRefs = useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange);
|
|
12224
12224
|
useLayoutEffect2(() => {
|
|
12225
12225
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -12249,18 +12249,18 @@ var SelectScrollDownButton = React$B.forwardRef((props, forwardedRef) => {
|
|
|
12249
12249
|
) : null;
|
|
12250
12250
|
});
|
|
12251
12251
|
SelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME;
|
|
12252
|
-
var SelectScrollButtonImpl = React$
|
|
12252
|
+
var SelectScrollButtonImpl = React$D.forwardRef((props, forwardedRef) => {
|
|
12253
12253
|
const { __scopeSelect, onAutoScroll, ...scrollIndicatorProps } = props;
|
|
12254
12254
|
const contentContext = useSelectContentContext("SelectScrollButton", __scopeSelect);
|
|
12255
|
-
const autoScrollTimerRef = React$
|
|
12255
|
+
const autoScrollTimerRef = React$D.useRef(null);
|
|
12256
12256
|
const getItems = useCollection(__scopeSelect);
|
|
12257
|
-
const clearAutoScrollTimer = React$
|
|
12257
|
+
const clearAutoScrollTimer = React$D.useCallback(() => {
|
|
12258
12258
|
if (autoScrollTimerRef.current !== null) {
|
|
12259
12259
|
window.clearInterval(autoScrollTimerRef.current);
|
|
12260
12260
|
autoScrollTimerRef.current = null;
|
|
12261
12261
|
}
|
|
12262
12262
|
}, []);
|
|
12263
|
-
React$
|
|
12263
|
+
React$D.useEffect(() => {
|
|
12264
12264
|
return () => clearAutoScrollTimer();
|
|
12265
12265
|
}, [clearAutoScrollTimer]);
|
|
12266
12266
|
useLayoutEffect2(() => {
|
|
@@ -12292,7 +12292,7 @@ var SelectScrollButtonImpl = React$B.forwardRef((props, forwardedRef) => {
|
|
|
12292
12292
|
);
|
|
12293
12293
|
});
|
|
12294
12294
|
var SEPARATOR_NAME = "SelectSeparator";
|
|
12295
|
-
var SelectSeparator$1 = React$
|
|
12295
|
+
var SelectSeparator$1 = React$D.forwardRef(
|
|
12296
12296
|
(props, forwardedRef) => {
|
|
12297
12297
|
const { __scopeSelect, ...separatorProps } = props;
|
|
12298
12298
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
|
|
@@ -12300,7 +12300,7 @@ var SelectSeparator$1 = React$B.forwardRef(
|
|
|
12300
12300
|
);
|
|
12301
12301
|
SelectSeparator$1.displayName = SEPARATOR_NAME;
|
|
12302
12302
|
var ARROW_NAME$1 = "SelectArrow";
|
|
12303
|
-
var SelectArrow = React$
|
|
12303
|
+
var SelectArrow = React$D.forwardRef(
|
|
12304
12304
|
(props, forwardedRef) => {
|
|
12305
12305
|
const { __scopeSelect, ...arrowProps } = props;
|
|
12306
12306
|
const popperScope = usePopperScope$1(__scopeSelect);
|
|
@@ -12311,12 +12311,12 @@ var SelectArrow = React$B.forwardRef(
|
|
|
12311
12311
|
);
|
|
12312
12312
|
SelectArrow.displayName = ARROW_NAME$1;
|
|
12313
12313
|
var BUBBLE_INPUT_NAME$1 = "SelectBubbleInput";
|
|
12314
|
-
var SelectBubbleInput = React$
|
|
12314
|
+
var SelectBubbleInput = React$D.forwardRef(
|
|
12315
12315
|
({ __scopeSelect, value, ...props }, forwardedRef) => {
|
|
12316
|
-
const ref = React$
|
|
12316
|
+
const ref = React$D.useRef(null);
|
|
12317
12317
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
12318
12318
|
const prevValue = usePrevious(value);
|
|
12319
|
-
React$
|
|
12319
|
+
React$D.useEffect(() => {
|
|
12320
12320
|
const select = ref.current;
|
|
12321
12321
|
if (!select) return;
|
|
12322
12322
|
const selectProto = window.HTMLSelectElement.prototype;
|
|
@@ -12348,9 +12348,9 @@ function shouldShowPlaceholder(value) {
|
|
|
12348
12348
|
}
|
|
12349
12349
|
function useTypeaheadSearch(onSearchChange) {
|
|
12350
12350
|
const handleSearchChange = useCallbackRef$1(onSearchChange);
|
|
12351
|
-
const searchRef = React$
|
|
12352
|
-
const timerRef = React$
|
|
12353
|
-
const handleTypeaheadSearch = React$
|
|
12351
|
+
const searchRef = React$D.useRef("");
|
|
12352
|
+
const timerRef = React$D.useRef(0);
|
|
12353
|
+
const handleTypeaheadSearch = React$D.useCallback(
|
|
12354
12354
|
(key) => {
|
|
12355
12355
|
const search = searchRef.current + key;
|
|
12356
12356
|
handleSearchChange(search);
|
|
@@ -12362,11 +12362,11 @@ function useTypeaheadSearch(onSearchChange) {
|
|
|
12362
12362
|
},
|
|
12363
12363
|
[handleSearchChange]
|
|
12364
12364
|
);
|
|
12365
|
-
const resetTypeahead = React$
|
|
12365
|
+
const resetTypeahead = React$D.useCallback(() => {
|
|
12366
12366
|
searchRef.current = "";
|
|
12367
12367
|
window.clearTimeout(timerRef.current);
|
|
12368
12368
|
}, []);
|
|
12369
|
-
React$
|
|
12369
|
+
React$D.useEffect(() => {
|
|
12370
12370
|
return () => window.clearTimeout(timerRef.current);
|
|
12371
12371
|
}, []);
|
|
12372
12372
|
return [searchRef, handleTypeaheadSearch, resetTypeahead];
|
|
@@ -12401,11 +12401,11 @@ var ItemIndicator = SelectItemIndicator;
|
|
|
12401
12401
|
var Separator$2 = SelectSeparator$1;
|
|
12402
12402
|
|
|
12403
12403
|
// src/separator.tsx
|
|
12404
|
-
const React$
|
|
12404
|
+
const React$C = await importShared('react');
|
|
12405
12405
|
var NAME = "Separator";
|
|
12406
12406
|
var DEFAULT_ORIENTATION = "horizontal";
|
|
12407
12407
|
var ORIENTATIONS = ["horizontal", "vertical"];
|
|
12408
|
-
var Separator$1 = React$
|
|
12408
|
+
var Separator$1 = React$C.forwardRef((props, forwardedRef) => {
|
|
12409
12409
|
const { decorative, orientation: orientationProp = DEFAULT_ORIENTATION, ...domProps } = props;
|
|
12410
12410
|
const orientation = isValidOrientation(orientationProp) ? orientationProp : DEFAULT_ORIENTATION;
|
|
12411
12411
|
const ariaOrientation = orientation === "vertical" ? orientation : void 0;
|
|
@@ -12427,11 +12427,11 @@ function isValidOrientation(orientation) {
|
|
|
12427
12427
|
var Root$2 = Separator$1;
|
|
12428
12428
|
|
|
12429
12429
|
// src/switch.tsx
|
|
12430
|
-
const React$
|
|
12430
|
+
const React$B = await importShared('react');
|
|
12431
12431
|
var SWITCH_NAME = "Switch";
|
|
12432
12432
|
var [createSwitchContext, createSwitchScope] = createContextScope(SWITCH_NAME);
|
|
12433
12433
|
var [SwitchProvider, useSwitchContext] = createSwitchContext(SWITCH_NAME);
|
|
12434
|
-
var Switch$1 = React$
|
|
12434
|
+
var Switch$1 = React$B.forwardRef(
|
|
12435
12435
|
(props, forwardedRef) => {
|
|
12436
12436
|
const {
|
|
12437
12437
|
__scopeSwitch,
|
|
@@ -12445,9 +12445,9 @@ var Switch$1 = React$z.forwardRef(
|
|
|
12445
12445
|
form,
|
|
12446
12446
|
...switchProps
|
|
12447
12447
|
} = props;
|
|
12448
|
-
const [button, setButton] = React$
|
|
12448
|
+
const [button, setButton] = React$B.useState(null);
|
|
12449
12449
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node));
|
|
12450
|
-
const hasConsumerStoppedPropagationRef = React$
|
|
12450
|
+
const hasConsumerStoppedPropagationRef = React$B.useRef(false);
|
|
12451
12451
|
const isFormControl = button ? form || !!button.closest("form") : true;
|
|
12452
12452
|
const [checked, setChecked] = useControllableState({
|
|
12453
12453
|
prop: checkedProp,
|
|
@@ -12497,7 +12497,7 @@ var Switch$1 = React$z.forwardRef(
|
|
|
12497
12497
|
);
|
|
12498
12498
|
Switch$1.displayName = SWITCH_NAME;
|
|
12499
12499
|
var THUMB_NAME = "SwitchThumb";
|
|
12500
|
-
var SwitchThumb = React$
|
|
12500
|
+
var SwitchThumb = React$B.forwardRef(
|
|
12501
12501
|
(props, forwardedRef) => {
|
|
12502
12502
|
const { __scopeSwitch, ...thumbProps } = props;
|
|
12503
12503
|
const context = useSwitchContext(THUMB_NAME, __scopeSwitch);
|
|
@@ -12514,7 +12514,7 @@ var SwitchThumb = React$z.forwardRef(
|
|
|
12514
12514
|
);
|
|
12515
12515
|
SwitchThumb.displayName = THUMB_NAME;
|
|
12516
12516
|
var BUBBLE_INPUT_NAME = "SwitchBubbleInput";
|
|
12517
|
-
var SwitchBubbleInput = React$
|
|
12517
|
+
var SwitchBubbleInput = React$B.forwardRef(
|
|
12518
12518
|
({
|
|
12519
12519
|
__scopeSwitch,
|
|
12520
12520
|
control,
|
|
@@ -12522,11 +12522,11 @@ var SwitchBubbleInput = React$z.forwardRef(
|
|
|
12522
12522
|
bubbles = true,
|
|
12523
12523
|
...props
|
|
12524
12524
|
}, forwardedRef) => {
|
|
12525
|
-
const ref = React$
|
|
12525
|
+
const ref = React$B.useRef(null);
|
|
12526
12526
|
const composedRefs = useComposedRefs(ref, forwardedRef);
|
|
12527
12527
|
const prevChecked = usePrevious(checked);
|
|
12528
12528
|
const controlSize = useSize(control);
|
|
12529
|
-
React$
|
|
12529
|
+
React$B.useEffect(() => {
|
|
12530
12530
|
const input = ref.current;
|
|
12531
12531
|
if (!input) return;
|
|
12532
12532
|
const inputProto = window.HTMLInputElement.prototype;
|
|
@@ -12570,14 +12570,14 @@ var Root$1 = Switch$1;
|
|
|
12570
12570
|
var Thumb = SwitchThumb;
|
|
12571
12571
|
|
|
12572
12572
|
// src/tabs.tsx
|
|
12573
|
-
const React$
|
|
12573
|
+
const React$A = await importShared('react');
|
|
12574
12574
|
var TABS_NAME = "Tabs";
|
|
12575
12575
|
var [createTabsContext, createTabsScope] = createContextScope(TABS_NAME, [
|
|
12576
12576
|
createRovingFocusGroupScope
|
|
12577
12577
|
]);
|
|
12578
12578
|
var useRovingFocusGroupScope = createRovingFocusGroupScope();
|
|
12579
12579
|
var [TabsProvider, useTabsContext] = createTabsContext(TABS_NAME);
|
|
12580
|
-
var Tabs$1 = React$
|
|
12580
|
+
var Tabs$1 = React$A.forwardRef(
|
|
12581
12581
|
(props, forwardedRef) => {
|
|
12582
12582
|
const {
|
|
12583
12583
|
__scopeTabs,
|
|
@@ -12621,7 +12621,7 @@ var Tabs$1 = React$y.forwardRef(
|
|
|
12621
12621
|
);
|
|
12622
12622
|
Tabs$1.displayName = TABS_NAME;
|
|
12623
12623
|
var TAB_LIST_NAME = "TabsList";
|
|
12624
|
-
var TabsList$1 = React$
|
|
12624
|
+
var TabsList$1 = React$A.forwardRef(
|
|
12625
12625
|
(props, forwardedRef) => {
|
|
12626
12626
|
const { __scopeTabs, loop = true, ...listProps } = props;
|
|
12627
12627
|
const context = useTabsContext(TAB_LIST_NAME, __scopeTabs);
|
|
@@ -12649,7 +12649,7 @@ var TabsList$1 = React$y.forwardRef(
|
|
|
12649
12649
|
);
|
|
12650
12650
|
TabsList$1.displayName = TAB_LIST_NAME;
|
|
12651
12651
|
var TRIGGER_NAME$1 = "TabsTrigger";
|
|
12652
|
-
var TabsTrigger$1 = React$
|
|
12652
|
+
var TabsTrigger$1 = React$A.forwardRef(
|
|
12653
12653
|
(props, forwardedRef) => {
|
|
12654
12654
|
const { __scopeTabs, value, disabled = false, ...triggerProps } = props;
|
|
12655
12655
|
const context = useTabsContext(TRIGGER_NAME$1, __scopeTabs);
|
|
@@ -12701,15 +12701,15 @@ var TabsTrigger$1 = React$y.forwardRef(
|
|
|
12701
12701
|
);
|
|
12702
12702
|
TabsTrigger$1.displayName = TRIGGER_NAME$1;
|
|
12703
12703
|
var CONTENT_NAME$1 = "TabsContent";
|
|
12704
|
-
var TabsContent$1 = React$
|
|
12704
|
+
var TabsContent$1 = React$A.forwardRef(
|
|
12705
12705
|
(props, forwardedRef) => {
|
|
12706
12706
|
const { __scopeTabs, value, forceMount, children, ...contentProps } = props;
|
|
12707
12707
|
const context = useTabsContext(CONTENT_NAME$1, __scopeTabs);
|
|
12708
12708
|
const triggerId = makeTriggerId(context.baseId, value);
|
|
12709
12709
|
const contentId = makeContentId(context.baseId, value);
|
|
12710
12710
|
const isSelected = value === context.value;
|
|
12711
|
-
const isMountAnimationPreventedRef = React$
|
|
12712
|
-
React$
|
|
12711
|
+
const isMountAnimationPreventedRef = React$A.useRef(isSelected);
|
|
12712
|
+
React$A.useEffect(() => {
|
|
12713
12713
|
const rAF = requestAnimationFrame(() => isMountAnimationPreventedRef.current = false);
|
|
12714
12714
|
return () => cancelAnimationFrame(rAF);
|
|
12715
12715
|
}, []);
|
|
@@ -12747,7 +12747,7 @@ var Trigger$1 = TabsTrigger$1;
|
|
|
12747
12747
|
var Content = TabsContent$1;
|
|
12748
12748
|
|
|
12749
12749
|
// src/tooltip.tsx
|
|
12750
|
-
const React$
|
|
12750
|
+
const React$z = await importShared('react');
|
|
12751
12751
|
var [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [
|
|
12752
12752
|
createPopperScope
|
|
12753
12753
|
]);
|
|
@@ -12764,10 +12764,10 @@ var TooltipProvider$1 = (props) => {
|
|
|
12764
12764
|
disableHoverableContent = false,
|
|
12765
12765
|
children
|
|
12766
12766
|
} = props;
|
|
12767
|
-
const isOpenDelayedRef = React$
|
|
12768
|
-
const isPointerInTransitRef = React$
|
|
12769
|
-
const skipDelayTimerRef = React$
|
|
12770
|
-
React$
|
|
12767
|
+
const isOpenDelayedRef = React$z.useRef(true);
|
|
12768
|
+
const isPointerInTransitRef = React$z.useRef(false);
|
|
12769
|
+
const skipDelayTimerRef = React$z.useRef(0);
|
|
12770
|
+
React$z.useEffect(() => {
|
|
12771
12771
|
const skipDelayTimer = skipDelayTimerRef.current;
|
|
12772
12772
|
return () => window.clearTimeout(skipDelayTimer);
|
|
12773
12773
|
}, []);
|
|
@@ -12777,11 +12777,11 @@ var TooltipProvider$1 = (props) => {
|
|
|
12777
12777
|
scope: __scopeTooltip,
|
|
12778
12778
|
isOpenDelayedRef,
|
|
12779
12779
|
delayDuration,
|
|
12780
|
-
onOpen: React$
|
|
12780
|
+
onOpen: React$z.useCallback(() => {
|
|
12781
12781
|
window.clearTimeout(skipDelayTimerRef.current);
|
|
12782
12782
|
isOpenDelayedRef.current = false;
|
|
12783
12783
|
}, []),
|
|
12784
|
-
onClose: React$
|
|
12784
|
+
onClose: React$z.useCallback(() => {
|
|
12785
12785
|
window.clearTimeout(skipDelayTimerRef.current);
|
|
12786
12786
|
skipDelayTimerRef.current = window.setTimeout(
|
|
12787
12787
|
() => isOpenDelayedRef.current = true,
|
|
@@ -12789,7 +12789,7 @@ var TooltipProvider$1 = (props) => {
|
|
|
12789
12789
|
);
|
|
12790
12790
|
}, [skipDelayDuration]),
|
|
12791
12791
|
isPointerInTransitRef,
|
|
12792
|
-
onPointerInTransitChange: React$
|
|
12792
|
+
onPointerInTransitChange: React$z.useCallback((inTransit) => {
|
|
12793
12793
|
isPointerInTransitRef.current = inTransit;
|
|
12794
12794
|
}, []),
|
|
12795
12795
|
disableHoverableContent,
|
|
@@ -12812,12 +12812,12 @@ var Tooltip$1 = (props) => {
|
|
|
12812
12812
|
} = props;
|
|
12813
12813
|
const providerContext = useTooltipProviderContext(TOOLTIP_NAME, props.__scopeTooltip);
|
|
12814
12814
|
const popperScope = usePopperScope(__scopeTooltip);
|
|
12815
|
-
const [trigger, setTrigger] = React$
|
|
12815
|
+
const [trigger, setTrigger] = React$z.useState(null);
|
|
12816
12816
|
const contentId = useId$4();
|
|
12817
|
-
const openTimerRef = React$
|
|
12817
|
+
const openTimerRef = React$z.useRef(0);
|
|
12818
12818
|
const disableHoverableContent = disableHoverableContentProp ?? providerContext.disableHoverableContent;
|
|
12819
12819
|
const delayDuration = delayDurationProp ?? providerContext.delayDuration;
|
|
12820
|
-
const wasOpenDelayedRef = React$
|
|
12820
|
+
const wasOpenDelayedRef = React$z.useRef(false);
|
|
12821
12821
|
const [open, setOpen] = useControllableState({
|
|
12822
12822
|
prop: openProp,
|
|
12823
12823
|
defaultProp: defaultOpen ?? false,
|
|
@@ -12832,21 +12832,21 @@ var Tooltip$1 = (props) => {
|
|
|
12832
12832
|
},
|
|
12833
12833
|
caller: TOOLTIP_NAME
|
|
12834
12834
|
});
|
|
12835
|
-
const stateAttribute = React$
|
|
12835
|
+
const stateAttribute = React$z.useMemo(() => {
|
|
12836
12836
|
return open ? wasOpenDelayedRef.current ? "delayed-open" : "instant-open" : "closed";
|
|
12837
12837
|
}, [open]);
|
|
12838
|
-
const handleOpen = React$
|
|
12838
|
+
const handleOpen = React$z.useCallback(() => {
|
|
12839
12839
|
window.clearTimeout(openTimerRef.current);
|
|
12840
12840
|
openTimerRef.current = 0;
|
|
12841
12841
|
wasOpenDelayedRef.current = false;
|
|
12842
12842
|
setOpen(true);
|
|
12843
12843
|
}, [setOpen]);
|
|
12844
|
-
const handleClose = React$
|
|
12844
|
+
const handleClose = React$z.useCallback(() => {
|
|
12845
12845
|
window.clearTimeout(openTimerRef.current);
|
|
12846
12846
|
openTimerRef.current = 0;
|
|
12847
12847
|
setOpen(false);
|
|
12848
12848
|
}, [setOpen]);
|
|
12849
|
-
const handleDelayedOpen = React$
|
|
12849
|
+
const handleDelayedOpen = React$z.useCallback(() => {
|
|
12850
12850
|
window.clearTimeout(openTimerRef.current);
|
|
12851
12851
|
openTimerRef.current = window.setTimeout(() => {
|
|
12852
12852
|
wasOpenDelayedRef.current = true;
|
|
@@ -12854,7 +12854,7 @@ var Tooltip$1 = (props) => {
|
|
|
12854
12854
|
openTimerRef.current = 0;
|
|
12855
12855
|
}, delayDuration);
|
|
12856
12856
|
}, [delayDuration, setOpen]);
|
|
12857
|
-
React$
|
|
12857
|
+
React$z.useEffect(() => {
|
|
12858
12858
|
return () => {
|
|
12859
12859
|
if (openTimerRef.current) {
|
|
12860
12860
|
window.clearTimeout(openTimerRef.current);
|
|
@@ -12871,11 +12871,11 @@ var Tooltip$1 = (props) => {
|
|
|
12871
12871
|
stateAttribute,
|
|
12872
12872
|
trigger,
|
|
12873
12873
|
onTriggerChange: setTrigger,
|
|
12874
|
-
onTriggerEnter: React$
|
|
12874
|
+
onTriggerEnter: React$z.useCallback(() => {
|
|
12875
12875
|
if (providerContext.isOpenDelayedRef.current) handleDelayedOpen();
|
|
12876
12876
|
else handleOpen();
|
|
12877
12877
|
}, [providerContext.isOpenDelayedRef, handleDelayedOpen, handleOpen]),
|
|
12878
|
-
onTriggerLeave: React$
|
|
12878
|
+
onTriggerLeave: React$z.useCallback(() => {
|
|
12879
12879
|
if (disableHoverableContent) {
|
|
12880
12880
|
handleClose();
|
|
12881
12881
|
} else {
|
|
@@ -12892,18 +12892,18 @@ var Tooltip$1 = (props) => {
|
|
|
12892
12892
|
};
|
|
12893
12893
|
Tooltip$1.displayName = TOOLTIP_NAME;
|
|
12894
12894
|
var TRIGGER_NAME = "TooltipTrigger";
|
|
12895
|
-
var TooltipTrigger$1 = React$
|
|
12895
|
+
var TooltipTrigger$1 = React$z.forwardRef(
|
|
12896
12896
|
(props, forwardedRef) => {
|
|
12897
12897
|
const { __scopeTooltip, ...triggerProps } = props;
|
|
12898
12898
|
const context = useTooltipContext(TRIGGER_NAME, __scopeTooltip);
|
|
12899
12899
|
const providerContext = useTooltipProviderContext(TRIGGER_NAME, __scopeTooltip);
|
|
12900
12900
|
const popperScope = usePopperScope(__scopeTooltip);
|
|
12901
|
-
const ref = React$
|
|
12901
|
+
const ref = React$z.useRef(null);
|
|
12902
12902
|
const composedRefs = useComposedRefs(forwardedRef, ref, context.onTriggerChange);
|
|
12903
|
-
const isPointerDownRef = React$
|
|
12904
|
-
const hasPointerMoveOpenedRef = React$
|
|
12905
|
-
const handlePointerUp = React$
|
|
12906
|
-
React$
|
|
12903
|
+
const isPointerDownRef = React$z.useRef(false);
|
|
12904
|
+
const hasPointerMoveOpenedRef = React$z.useRef(false);
|
|
12905
|
+
const handlePointerUp = React$z.useCallback(() => isPointerDownRef.current = false, []);
|
|
12906
|
+
React$z.useEffect(() => {
|
|
12907
12907
|
return () => document.removeEventListener("pointerup", handlePointerUp);
|
|
12908
12908
|
}, [handlePointerUp]);
|
|
12909
12909
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -12952,7 +12952,7 @@ var TooltipPortal = (props) => {
|
|
|
12952
12952
|
};
|
|
12953
12953
|
TooltipPortal.displayName = PORTAL_NAME;
|
|
12954
12954
|
var CONTENT_NAME = "TooltipContent";
|
|
12955
|
-
var TooltipContent$1 = React$
|
|
12955
|
+
var TooltipContent$1 = React$z.forwardRef(
|
|
12956
12956
|
(props, forwardedRef) => {
|
|
12957
12957
|
const portalContext = usePortalContext(CONTENT_NAME, props.__scopeTooltip);
|
|
12958
12958
|
const { forceMount = portalContext.forceMount, side = "top", ...contentProps } = props;
|
|
@@ -12960,20 +12960,20 @@ var TooltipContent$1 = React$x.forwardRef(
|
|
|
12960
12960
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Presence, { present: forceMount || context.open, children: context.disableHoverableContent ? /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContentImpl, { side, ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContentHoverable, { side, ...contentProps, ref: forwardedRef }) });
|
|
12961
12961
|
}
|
|
12962
12962
|
);
|
|
12963
|
-
var TooltipContentHoverable = React$
|
|
12963
|
+
var TooltipContentHoverable = React$z.forwardRef((props, forwardedRef) => {
|
|
12964
12964
|
const context = useTooltipContext(CONTENT_NAME, props.__scopeTooltip);
|
|
12965
12965
|
const providerContext = useTooltipProviderContext(CONTENT_NAME, props.__scopeTooltip);
|
|
12966
|
-
const ref = React$
|
|
12966
|
+
const ref = React$z.useRef(null);
|
|
12967
12967
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
12968
|
-
const [pointerGraceArea, setPointerGraceArea] = React$
|
|
12968
|
+
const [pointerGraceArea, setPointerGraceArea] = React$z.useState(null);
|
|
12969
12969
|
const { trigger, onClose } = context;
|
|
12970
12970
|
const content = ref.current;
|
|
12971
12971
|
const { onPointerInTransitChange } = providerContext;
|
|
12972
|
-
const handleRemoveGraceArea = React$
|
|
12972
|
+
const handleRemoveGraceArea = React$z.useCallback(() => {
|
|
12973
12973
|
setPointerGraceArea(null);
|
|
12974
12974
|
onPointerInTransitChange(false);
|
|
12975
12975
|
}, [onPointerInTransitChange]);
|
|
12976
|
-
const handleCreateGraceArea = React$
|
|
12976
|
+
const handleCreateGraceArea = React$z.useCallback(
|
|
12977
12977
|
(event, hoverTarget) => {
|
|
12978
12978
|
const currentTarget = event.currentTarget;
|
|
12979
12979
|
const exitPoint = { x: event.clientX, y: event.clientY };
|
|
@@ -12986,10 +12986,10 @@ var TooltipContentHoverable = React$x.forwardRef((props, forwardedRef) => {
|
|
|
12986
12986
|
},
|
|
12987
12987
|
[onPointerInTransitChange]
|
|
12988
12988
|
);
|
|
12989
|
-
React$
|
|
12989
|
+
React$z.useEffect(() => {
|
|
12990
12990
|
return () => handleRemoveGraceArea();
|
|
12991
12991
|
}, [handleRemoveGraceArea]);
|
|
12992
|
-
React$
|
|
12992
|
+
React$z.useEffect(() => {
|
|
12993
12993
|
if (trigger && content) {
|
|
12994
12994
|
const handleTriggerLeave = (event) => handleCreateGraceArea(event, content);
|
|
12995
12995
|
const handleContentLeave = (event) => handleCreateGraceArea(event, trigger);
|
|
@@ -13001,7 +13001,7 @@ var TooltipContentHoverable = React$x.forwardRef((props, forwardedRef) => {
|
|
|
13001
13001
|
};
|
|
13002
13002
|
}
|
|
13003
13003
|
}, [trigger, content, handleCreateGraceArea, handleRemoveGraceArea]);
|
|
13004
|
-
React$
|
|
13004
|
+
React$z.useEffect(() => {
|
|
13005
13005
|
if (pointerGraceArea) {
|
|
13006
13006
|
const handleTrackPointerGrace = (event) => {
|
|
13007
13007
|
const target = event.target;
|
|
@@ -13023,7 +13023,7 @@ var TooltipContentHoverable = React$x.forwardRef((props, forwardedRef) => {
|
|
|
13023
13023
|
});
|
|
13024
13024
|
var [VisuallyHiddenContentContextProvider, useVisuallyHiddenContentContext] = createTooltipContext(TOOLTIP_NAME, { isInside: false });
|
|
13025
13025
|
var Slottable = createSlottable("TooltipContent");
|
|
13026
|
-
var TooltipContentImpl = React$
|
|
13026
|
+
var TooltipContentImpl = React$z.forwardRef(
|
|
13027
13027
|
(props, forwardedRef) => {
|
|
13028
13028
|
const {
|
|
13029
13029
|
__scopeTooltip,
|
|
@@ -13036,11 +13036,11 @@ var TooltipContentImpl = React$x.forwardRef(
|
|
|
13036
13036
|
const context = useTooltipContext(CONTENT_NAME, __scopeTooltip);
|
|
13037
13037
|
const popperScope = usePopperScope(__scopeTooltip);
|
|
13038
13038
|
const { onClose } = context;
|
|
13039
|
-
React$
|
|
13039
|
+
React$z.useEffect(() => {
|
|
13040
13040
|
document.addEventListener(TOOLTIP_OPEN, onClose);
|
|
13041
13041
|
return () => document.removeEventListener(TOOLTIP_OPEN, onClose);
|
|
13042
13042
|
}, [onClose]);
|
|
13043
|
-
React$
|
|
13043
|
+
React$z.useEffect(() => {
|
|
13044
13044
|
if (context.trigger) {
|
|
13045
13045
|
const handleScroll = (event) => {
|
|
13046
13046
|
const target = event.target;
|
|
@@ -13089,7 +13089,7 @@ var TooltipContentImpl = React$x.forwardRef(
|
|
|
13089
13089
|
);
|
|
13090
13090
|
TooltipContent$1.displayName = CONTENT_NAME;
|
|
13091
13091
|
var ARROW_NAME = "TooltipArrow";
|
|
13092
|
-
var TooltipArrow = React$
|
|
13092
|
+
var TooltipArrow = React$z.forwardRef(
|
|
13093
13093
|
(props, forwardedRef) => {
|
|
13094
13094
|
const { __scopeTooltip, ...arrowProps } = props;
|
|
13095
13095
|
const popperScope = usePopperScope(__scopeTooltip);
|
|
@@ -13348,25 +13348,25 @@ function ScrollBar({ className, orientation = 'vertical', ...props }) {
|
|
|
13348
13348
|
'h-2.5 flex-col border-t border-t-transparent', className), ...props, children: jsxRuntimeExports.jsx(ScrollAreaThumb, { "data-slot": "scroll-area-thumb", className: "relative flex-1 rounded-full bg-border" }) }));
|
|
13349
13349
|
}
|
|
13350
13350
|
|
|
13351
|
-
const React$
|
|
13352
|
-
const ComboboxContext = React$
|
|
13351
|
+
const React$y = await importShared('react');
|
|
13352
|
+
const ComboboxContext = React$y.createContext(null);
|
|
13353
13353
|
const DEFAULT_OPTION = { value: null, label: '' };
|
|
13354
13354
|
/**
|
|
13355
13355
|
* A control that allows users to select an option from a list of options and type to search.
|
|
13356
13356
|
*/
|
|
13357
13357
|
function Combobox({ children, value: controlledValue, onChange, searchQuery: defaultSearchQuery, onSearchQueryChange, label, disabled = false, }) {
|
|
13358
|
-
const [isOpen, setIsOpen] = React$
|
|
13358
|
+
const [isOpen, setIsOpen] = React$y.useState(false);
|
|
13359
13359
|
const [value, setValue] = useControlledState(controlledValue === null ? DEFAULT_OPTION : controlledValue, onChange, DEFAULT_OPTION);
|
|
13360
13360
|
const [searchQuery, setSearchQuery] = useControlledState(defaultSearchQuery, onSearchQueryChange, '');
|
|
13361
13361
|
// the value of the combobox that is currently active
|
|
13362
|
-
const [activeValue, setActiveValue] = React$
|
|
13362
|
+
const [activeValue, setActiveValue] = React$y.useState(value.value ?? '');
|
|
13363
13363
|
// Caches the filter query so we can maintain
|
|
13364
13364
|
// the query when animating the combobox open/close
|
|
13365
|
-
const [filterQuery, setFilterQuery] = React$
|
|
13366
|
-
const inputRef = React$
|
|
13367
|
-
const inputId = React$
|
|
13368
|
-
const listRef = React$
|
|
13369
|
-
const contextValue = React$
|
|
13365
|
+
const [filterQuery, setFilterQuery] = React$y.useState(searchQuery);
|
|
13366
|
+
const inputRef = React$y.useRef(null);
|
|
13367
|
+
const inputId = React$y.useId();
|
|
13368
|
+
const listRef = React$y.useRef(null);
|
|
13369
|
+
const contextValue = React$y.useMemo(() => ({
|
|
13370
13370
|
selectedLabel: value.label ?? '',
|
|
13371
13371
|
selectedValue: value.value,
|
|
13372
13372
|
onSelect: (val, lab) => {
|
|
@@ -13418,7 +13418,7 @@ function Combobox({ children, value: controlledValue, onChange, searchQuery: def
|
|
|
13418
13418
|
}, label: label, children: children }) }) }));
|
|
13419
13419
|
}
|
|
13420
13420
|
function useComboboxContext() {
|
|
13421
|
-
const value = React$
|
|
13421
|
+
const value = React$y.useContext(ComboboxContext);
|
|
13422
13422
|
if (!value) {
|
|
13423
13423
|
throw new Error(`useComboboxContext must be used inside a ComboboxContext provider`);
|
|
13424
13424
|
}
|
|
@@ -13426,9 +13426,9 @@ function useComboboxContext() {
|
|
|
13426
13426
|
}
|
|
13427
13427
|
function ComboboxInput({ className, placeholder, ref, ...rest }) {
|
|
13428
13428
|
const { setIsOpen, isOpen, inputId, searchQuery, setSearchQuery, selectedLabel, disabled, } = useComboboxContext();
|
|
13429
|
-
const selectedLabelId = React$
|
|
13430
|
-
const inputRef = React$
|
|
13431
|
-
const handleKeydown = React$
|
|
13429
|
+
const selectedLabelId = React$y.useId();
|
|
13430
|
+
const inputRef = React$y.useRef(null);
|
|
13431
|
+
const handleKeydown = React$y.useCallback((e) => {
|
|
13432
13432
|
const specialKeys = ['ArrowDown', 'ArrowUp', 'Home', 'End', 'Enter'];
|
|
13433
13433
|
if (e.key === 'Escape') {
|
|
13434
13434
|
setIsOpen(false);
|
|
@@ -13498,7 +13498,7 @@ function ComboboxLoading({ className, ...props }) {
|
|
|
13498
13498
|
const ComboboxGroup = _e.Group;
|
|
13499
13499
|
function ComboboxItem({ value, className, label, children, ref, ...rest }) {
|
|
13500
13500
|
const { selectedValue, onSelect, shouldShowItem } = useComboboxContext();
|
|
13501
|
-
const itemRef = React$
|
|
13501
|
+
const itemRef = React$y.useRef(null);
|
|
13502
13502
|
const extractedLabel = label ?? (typeof children === 'string' ? children.trim() : undefined);
|
|
13503
13503
|
if (!shouldShowItem(extractedLabel ?? value)) {
|
|
13504
13504
|
return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {});
|
|
@@ -13508,7 +13508,7 @@ function ComboboxItem({ value, className, label, children, ref, ...rest }) {
|
|
|
13508
13508
|
}, className: cn$1(selectItemVariants(), className), ...rest, ref: mergeRefs(ref, itemRef), children: [children, jsxRuntimeExports.jsx(MdCheck, { className: cn$1(selectCheckVariants(), value === selectedValue ? 'opacity-100' : 'opacity-0') })] }));
|
|
13509
13509
|
}
|
|
13510
13510
|
function ComboboxAction({ value, className, children, onClick, ref, ...rest }) {
|
|
13511
|
-
const itemRef = React$
|
|
13511
|
+
const itemRef = React$y.useRef(null);
|
|
13512
13512
|
return (jsxRuntimeExports.jsx(_e.Item, { value: value, onSelect: onClick, className: cn$1(selectItemVariants(), className), ...rest, ref: mergeRefs(ref, itemRef), children: children }));
|
|
13513
13513
|
}
|
|
13514
13514
|
|
|
@@ -13521,10 +13521,10 @@ function Label({ className, ...props }) {
|
|
|
13521
13521
|
return (jsxRuntimeExports.jsx(Root$4, { "data-slot": "label", className: cn$1('flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50', className), ...props }));
|
|
13522
13522
|
}
|
|
13523
13523
|
|
|
13524
|
-
const React$
|
|
13525
|
-
const FormItemContext = React$
|
|
13524
|
+
const React$x = await importShared('react');
|
|
13525
|
+
const FormItemContext = React$x.createContext(null);
|
|
13526
13526
|
const useFormField = () => {
|
|
13527
|
-
const itemContext = React$
|
|
13527
|
+
const itemContext = React$x.useContext(FormItemContext);
|
|
13528
13528
|
if (!itemContext) {
|
|
13529
13529
|
throw new Error('useFormField should be used within <FormItem>');
|
|
13530
13530
|
}
|
|
@@ -13538,7 +13538,7 @@ const useFormField = () => {
|
|
|
13538
13538
|
};
|
|
13539
13539
|
};
|
|
13540
13540
|
function FormItem({ className, error, ...props }) {
|
|
13541
|
-
const id = React$
|
|
13541
|
+
const id = React$x.useId();
|
|
13542
13542
|
return (jsxRuntimeExports.jsx(FormItemContext.Provider, { value: { id, error }, children: jsxRuntimeExports.jsx("div", { "data-slot": "form-item", className: cn$1('grid gap-2', className), ...props }) }));
|
|
13543
13543
|
}
|
|
13544
13544
|
function FormLabel({ className, ...props }) {
|
|
@@ -19154,7 +19154,7 @@ function getClassNamesForModifiers(modifiers, classNames, modifiersClassNames =
|
|
|
19154
19154
|
return modifierClassNames;
|
|
19155
19155
|
}
|
|
19156
19156
|
|
|
19157
|
-
const React$
|
|
19157
|
+
const React$w = await importShared('react');
|
|
19158
19158
|
|
|
19159
19159
|
/**
|
|
19160
19160
|
* Render the button elements in the calendar.
|
|
@@ -19163,10 +19163,10 @@ const React$u = await importShared('react');
|
|
|
19163
19163
|
* @deprecated Use `PreviousMonthButton` or `@link NextMonthButton` instead.
|
|
19164
19164
|
*/
|
|
19165
19165
|
function Button(props) {
|
|
19166
|
-
return React$
|
|
19166
|
+
return React$w.createElement("button", { ...props });
|
|
19167
19167
|
}
|
|
19168
19168
|
|
|
19169
|
-
const React$
|
|
19169
|
+
const React$v = await importShared('react');
|
|
19170
19170
|
|
|
19171
19171
|
/**
|
|
19172
19172
|
* Render the label in the month caption.
|
|
@@ -19175,10 +19175,10 @@ const React$t = await importShared('react');
|
|
|
19175
19175
|
* @see https://daypicker.dev/guides/custom-components
|
|
19176
19176
|
*/
|
|
19177
19177
|
function CaptionLabel(props) {
|
|
19178
|
-
return React$
|
|
19178
|
+
return React$v.createElement("span", { ...props });
|
|
19179
19179
|
}
|
|
19180
19180
|
|
|
19181
|
-
const React$
|
|
19181
|
+
const React$u = await importShared('react');
|
|
19182
19182
|
|
|
19183
19183
|
/**
|
|
19184
19184
|
* Render the chevron icon used in the navigation buttons and dropdowns.
|
|
@@ -19188,14 +19188,14 @@ const React$s = await importShared('react');
|
|
|
19188
19188
|
*/
|
|
19189
19189
|
function Chevron(props) {
|
|
19190
19190
|
const { size = 24, orientation = "left", className } = props;
|
|
19191
|
-
return (React$
|
|
19192
|
-
orientation === "up" && (React$
|
|
19193
|
-
orientation === "down" && (React$
|
|
19194
|
-
orientation === "left" && (React$
|
|
19195
|
-
orientation === "right" && (React$
|
|
19191
|
+
return (React$u.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24" },
|
|
19192
|
+
orientation === "up" && (React$u.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" })),
|
|
19193
|
+
orientation === "down" && (React$u.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" })),
|
|
19194
|
+
orientation === "left" && (React$u.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" })),
|
|
19195
|
+
orientation === "right" && (React$u.createElement("polygon", { points: "8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20" }))));
|
|
19196
19196
|
}
|
|
19197
19197
|
|
|
19198
|
-
const React$
|
|
19198
|
+
const React$t = await importShared('react');
|
|
19199
19199
|
|
|
19200
19200
|
/**
|
|
19201
19201
|
* Render a grid cell for a specific day in the calendar.
|
|
@@ -19209,10 +19209,10 @@ const React$r = await importShared('react');
|
|
|
19209
19209
|
*/
|
|
19210
19210
|
function Day(props) {
|
|
19211
19211
|
const { day, modifiers, ...tdProps } = props;
|
|
19212
|
-
return React$
|
|
19212
|
+
return React$t.createElement("td", { ...tdProps });
|
|
19213
19213
|
}
|
|
19214
19214
|
|
|
19215
|
-
const React$
|
|
19215
|
+
const React$s = await importShared('react');
|
|
19216
19216
|
|
|
19217
19217
|
/**
|
|
19218
19218
|
* Render a button for a specific day in the calendar.
|
|
@@ -19222,15 +19222,15 @@ const React$q = await importShared('react');
|
|
|
19222
19222
|
*/
|
|
19223
19223
|
function DayButton(props) {
|
|
19224
19224
|
const { day, modifiers, ...buttonProps } = props;
|
|
19225
|
-
const ref = React$
|
|
19226
|
-
React$
|
|
19225
|
+
const ref = React$s.useRef(null);
|
|
19226
|
+
React$s.useEffect(() => {
|
|
19227
19227
|
if (modifiers.focused)
|
|
19228
19228
|
ref.current?.focus();
|
|
19229
19229
|
}, [modifiers.focused]);
|
|
19230
|
-
return React$
|
|
19230
|
+
return React$s.createElement("button", { ref: ref, ...buttonProps });
|
|
19231
19231
|
}
|
|
19232
19232
|
|
|
19233
|
-
const React$
|
|
19233
|
+
const React$r = await importShared('react');
|
|
19234
19234
|
/**
|
|
19235
19235
|
* Render a dropdown component for navigation in the calendar.
|
|
19236
19236
|
*
|
|
@@ -19241,14 +19241,14 @@ function Dropdown(props) {
|
|
|
19241
19241
|
const { options, className, components, classNames, ...selectProps } = props;
|
|
19242
19242
|
const cssClassSelect = [classNames[UI.Dropdown], className].join(" ");
|
|
19243
19243
|
const selectedOption = options?.find(({ value }) => value === selectProps.value);
|
|
19244
|
-
return (React$
|
|
19245
|
-
React$
|
|
19246
|
-
React$
|
|
19244
|
+
return (React$r.createElement("span", { "data-disabled": selectProps.disabled, className: classNames[UI.DropdownRoot] },
|
|
19245
|
+
React$r.createElement(components.Select, { className: cssClassSelect, ...selectProps }, options?.map(({ value, label, disabled }) => (React$r.createElement(components.Option, { key: value, value: value, disabled: disabled }, label)))),
|
|
19246
|
+
React$r.createElement("span", { className: classNames[UI.CaptionLabel], "aria-hidden": true },
|
|
19247
19247
|
selectedOption?.label,
|
|
19248
|
-
React$
|
|
19248
|
+
React$r.createElement(components.Chevron, { orientation: "down", size: 18, className: classNames[UI.Chevron] }))));
|
|
19249
19249
|
}
|
|
19250
19250
|
|
|
19251
|
-
const React$
|
|
19251
|
+
const React$q = await importShared('react');
|
|
19252
19252
|
|
|
19253
19253
|
/**
|
|
19254
19254
|
* Render the navigation dropdowns for the calendar.
|
|
@@ -19257,10 +19257,10 @@ const React$o = await importShared('react');
|
|
|
19257
19257
|
* @see https://daypicker.dev/guides/custom-components
|
|
19258
19258
|
*/
|
|
19259
19259
|
function DropdownNav(props) {
|
|
19260
|
-
return React$
|
|
19260
|
+
return React$q.createElement("div", { ...props });
|
|
19261
19261
|
}
|
|
19262
19262
|
|
|
19263
|
-
const React$
|
|
19263
|
+
const React$p = await importShared('react');
|
|
19264
19264
|
|
|
19265
19265
|
/**
|
|
19266
19266
|
* Render the footer of the calendar.
|
|
@@ -19269,10 +19269,10 @@ const React$n = await importShared('react');
|
|
|
19269
19269
|
* @see https://daypicker.dev/guides/custom-components
|
|
19270
19270
|
*/
|
|
19271
19271
|
function Footer(props) {
|
|
19272
|
-
return React$
|
|
19272
|
+
return React$p.createElement("div", { ...props });
|
|
19273
19273
|
}
|
|
19274
19274
|
|
|
19275
|
-
const React$
|
|
19275
|
+
const React$o = await importShared('react');
|
|
19276
19276
|
|
|
19277
19277
|
/**
|
|
19278
19278
|
* Render the grid with the weekday header row and the weeks for a specific
|
|
@@ -19283,10 +19283,10 @@ const React$m = await importShared('react');
|
|
|
19283
19283
|
*/
|
|
19284
19284
|
function Month(props) {
|
|
19285
19285
|
const { calendarMonth, displayIndex, ...divProps } = props;
|
|
19286
|
-
return React$
|
|
19286
|
+
return React$o.createElement("div", { ...divProps }, props.children);
|
|
19287
19287
|
}
|
|
19288
19288
|
|
|
19289
|
-
const React$
|
|
19289
|
+
const React$n = await importShared('react');
|
|
19290
19290
|
|
|
19291
19291
|
/**
|
|
19292
19292
|
* Render the caption for a month in the calendar.
|
|
@@ -19296,10 +19296,10 @@ const React$l = await importShared('react');
|
|
|
19296
19296
|
*/
|
|
19297
19297
|
function MonthCaption(props) {
|
|
19298
19298
|
const { calendarMonth, displayIndex, ...divProps } = props;
|
|
19299
|
-
return React$
|
|
19299
|
+
return React$n.createElement("div", { ...divProps });
|
|
19300
19300
|
}
|
|
19301
19301
|
|
|
19302
|
-
const React$
|
|
19302
|
+
const React$m = await importShared('react');
|
|
19303
19303
|
|
|
19304
19304
|
/**
|
|
19305
19305
|
* Render the grid of days for a specific month.
|
|
@@ -19308,10 +19308,10 @@ const React$k = await importShared('react');
|
|
|
19308
19308
|
* @see https://daypicker.dev/guides/custom-components
|
|
19309
19309
|
*/
|
|
19310
19310
|
function MonthGrid(props) {
|
|
19311
|
-
return React$
|
|
19311
|
+
return React$m.createElement("table", { ...props });
|
|
19312
19312
|
}
|
|
19313
19313
|
|
|
19314
|
-
const React$
|
|
19314
|
+
const React$l = await importShared('react');
|
|
19315
19315
|
|
|
19316
19316
|
/**
|
|
19317
19317
|
* Render a container wrapping the month grids.
|
|
@@ -19320,7 +19320,7 @@ const React$j = await importShared('react');
|
|
|
19320
19320
|
* @see https://daypicker.dev/guides/custom-components
|
|
19321
19321
|
*/
|
|
19322
19322
|
function Months(props) {
|
|
19323
|
-
return React$
|
|
19323
|
+
return React$l.createElement("div", { ...props });
|
|
19324
19324
|
}
|
|
19325
19325
|
|
|
19326
19326
|
const {createContext,useContext} = await importShared('react');
|
|
@@ -19347,7 +19347,7 @@ function useDayPicker() {
|
|
|
19347
19347
|
return context;
|
|
19348
19348
|
}
|
|
19349
19349
|
|
|
19350
|
-
const React$
|
|
19350
|
+
const React$k = await importShared('react');
|
|
19351
19351
|
/**
|
|
19352
19352
|
* Render a dropdown to navigate between months in the calendar.
|
|
19353
19353
|
*
|
|
@@ -19356,11 +19356,11 @@ const React$i = await importShared('react');
|
|
|
19356
19356
|
*/
|
|
19357
19357
|
function MonthsDropdown(props) {
|
|
19358
19358
|
const { components } = useDayPicker();
|
|
19359
|
-
return React$
|
|
19359
|
+
return React$k.createElement(components.Dropdown, { ...props });
|
|
19360
19360
|
}
|
|
19361
19361
|
|
|
19362
|
-
const React$
|
|
19363
|
-
const {useCallback: useCallback$2} = React$
|
|
19362
|
+
const React$j = await importShared('react');
|
|
19363
|
+
const {useCallback: useCallback$2} = React$j;
|
|
19364
19364
|
/**
|
|
19365
19365
|
* Render the navigation toolbar with buttons to navigate between months.
|
|
19366
19366
|
*
|
|
@@ -19380,14 +19380,14 @@ function Nav(props) {
|
|
|
19380
19380
|
onPreviousClick?.(e);
|
|
19381
19381
|
}
|
|
19382
19382
|
}, [previousMonth, onPreviousClick]);
|
|
19383
|
-
return (React$
|
|
19384
|
-
React$
|
|
19385
|
-
React$
|
|
19386
|
-
React$
|
|
19387
|
-
React$
|
|
19383
|
+
return (React$j.createElement("nav", { ...navProps },
|
|
19384
|
+
React$j.createElement(components.PreviousMonthButton, { type: "button", className: classNames[UI.PreviousMonthButton], tabIndex: previousMonth ? undefined : -1, "aria-disabled": previousMonth ? undefined : true, "aria-label": labelPrevious(previousMonth), onClick: handlePreviousClick },
|
|
19385
|
+
React$j.createElement(components.Chevron, { disabled: previousMonth ? undefined : true, className: classNames[UI.Chevron], orientation: "left" })),
|
|
19386
|
+
React$j.createElement(components.NextMonthButton, { type: "button", className: classNames[UI.NextMonthButton], tabIndex: nextMonth ? undefined : -1, "aria-disabled": nextMonth ? undefined : true, "aria-label": labelNext(nextMonth), onClick: handleNextClick },
|
|
19387
|
+
React$j.createElement(components.Chevron, { disabled: nextMonth ? undefined : true, orientation: "right", className: classNames[UI.Chevron] }))));
|
|
19388
19388
|
}
|
|
19389
19389
|
|
|
19390
|
-
const React$
|
|
19390
|
+
const React$i = await importShared('react');
|
|
19391
19391
|
/**
|
|
19392
19392
|
* Render the button to navigate to the next month in the calendar.
|
|
19393
19393
|
*
|
|
@@ -19396,10 +19396,10 @@ const React$g = await importShared('react');
|
|
|
19396
19396
|
*/
|
|
19397
19397
|
function NextMonthButton(props) {
|
|
19398
19398
|
const { components } = useDayPicker();
|
|
19399
|
-
return React$
|
|
19399
|
+
return React$i.createElement(components.Button, { ...props });
|
|
19400
19400
|
}
|
|
19401
19401
|
|
|
19402
|
-
const React$
|
|
19402
|
+
const React$h = await importShared('react');
|
|
19403
19403
|
|
|
19404
19404
|
/**
|
|
19405
19405
|
* Render an `option` element.
|
|
@@ -19408,10 +19408,10 @@ const React$f = await importShared('react');
|
|
|
19408
19408
|
* @see https://daypicker.dev/guides/custom-components
|
|
19409
19409
|
*/
|
|
19410
19410
|
function Option(props) {
|
|
19411
|
-
return React$
|
|
19411
|
+
return React$h.createElement("option", { ...props });
|
|
19412
19412
|
}
|
|
19413
19413
|
|
|
19414
|
-
const React$
|
|
19414
|
+
const React$g = await importShared('react');
|
|
19415
19415
|
/**
|
|
19416
19416
|
* Render the button to navigate to the previous month in the calendar.
|
|
19417
19417
|
*
|
|
@@ -19420,10 +19420,10 @@ const React$e = await importShared('react');
|
|
|
19420
19420
|
*/
|
|
19421
19421
|
function PreviousMonthButton(props) {
|
|
19422
19422
|
const { components } = useDayPicker();
|
|
19423
|
-
return React$
|
|
19423
|
+
return React$g.createElement(components.Button, { ...props });
|
|
19424
19424
|
}
|
|
19425
19425
|
|
|
19426
|
-
const React$
|
|
19426
|
+
const React$f = await importShared('react');
|
|
19427
19427
|
|
|
19428
19428
|
/**
|
|
19429
19429
|
* Render the root element of the calendar.
|
|
@@ -19433,10 +19433,10 @@ const React$d = await importShared('react');
|
|
|
19433
19433
|
*/
|
|
19434
19434
|
function Root(props) {
|
|
19435
19435
|
const { rootRef, ...rest } = props;
|
|
19436
|
-
return React$
|
|
19436
|
+
return React$f.createElement("div", { ...rest, ref: rootRef });
|
|
19437
19437
|
}
|
|
19438
19438
|
|
|
19439
|
-
const React$
|
|
19439
|
+
const React$e = await importShared('react');
|
|
19440
19440
|
|
|
19441
19441
|
/**
|
|
19442
19442
|
* Render a `select` element.
|
|
@@ -19445,10 +19445,10 @@ const React$c = await importShared('react');
|
|
|
19445
19445
|
* @see https://daypicker.dev/guides/custom-components
|
|
19446
19446
|
*/
|
|
19447
19447
|
function Select$1(props) {
|
|
19448
|
-
return React$
|
|
19448
|
+
return React$e.createElement("select", { ...props });
|
|
19449
19449
|
}
|
|
19450
19450
|
|
|
19451
|
-
const React$
|
|
19451
|
+
const React$d = await importShared('react');
|
|
19452
19452
|
|
|
19453
19453
|
/**
|
|
19454
19454
|
* Render a table row representing a week in the calendar.
|
|
@@ -19458,10 +19458,10 @@ const React$b = await importShared('react');
|
|
|
19458
19458
|
*/
|
|
19459
19459
|
function Week(props) {
|
|
19460
19460
|
const { week, ...trProps } = props;
|
|
19461
|
-
return React$
|
|
19461
|
+
return React$d.createElement("tr", { ...trProps });
|
|
19462
19462
|
}
|
|
19463
19463
|
|
|
19464
|
-
const React$
|
|
19464
|
+
const React$c = await importShared('react');
|
|
19465
19465
|
|
|
19466
19466
|
/**
|
|
19467
19467
|
* Render a table header cell with the name of a weekday (e.g., "Mo", "Tu").
|
|
@@ -19470,10 +19470,10 @@ const React$a = await importShared('react');
|
|
|
19470
19470
|
* @see https://daypicker.dev/guides/custom-components
|
|
19471
19471
|
*/
|
|
19472
19472
|
function Weekday(props) {
|
|
19473
|
-
return React$
|
|
19473
|
+
return React$c.createElement("th", { ...props });
|
|
19474
19474
|
}
|
|
19475
19475
|
|
|
19476
|
-
const React$
|
|
19476
|
+
const React$b = await importShared('react');
|
|
19477
19477
|
|
|
19478
19478
|
/**
|
|
19479
19479
|
* Render the table row containing the weekday names.
|
|
@@ -19482,11 +19482,11 @@ const React$9 = await importShared('react');
|
|
|
19482
19482
|
* @see https://daypicker.dev/guides/custom-components
|
|
19483
19483
|
*/
|
|
19484
19484
|
function Weekdays(props) {
|
|
19485
|
-
return (React$
|
|
19486
|
-
React$
|
|
19485
|
+
return (React$b.createElement("thead", { "aria-hidden": true },
|
|
19486
|
+
React$b.createElement("tr", { ...props })));
|
|
19487
19487
|
}
|
|
19488
19488
|
|
|
19489
|
-
const React$
|
|
19489
|
+
const React$a = await importShared('react');
|
|
19490
19490
|
|
|
19491
19491
|
/**
|
|
19492
19492
|
* Render a table cell displaying the number of the week.
|
|
@@ -19496,10 +19496,10 @@ const React$8 = await importShared('react');
|
|
|
19496
19496
|
*/
|
|
19497
19497
|
function WeekNumber(props) {
|
|
19498
19498
|
const { week, ...thProps } = props;
|
|
19499
|
-
return React$
|
|
19499
|
+
return React$a.createElement("th", { ...thProps });
|
|
19500
19500
|
}
|
|
19501
19501
|
|
|
19502
|
-
const React$
|
|
19502
|
+
const React$9 = await importShared('react');
|
|
19503
19503
|
|
|
19504
19504
|
/**
|
|
19505
19505
|
* Render the header cell for the week numbers column.
|
|
@@ -19508,10 +19508,10 @@ const React$7 = await importShared('react');
|
|
|
19508
19508
|
* @see https://daypicker.dev/guides/custom-components
|
|
19509
19509
|
*/
|
|
19510
19510
|
function WeekNumberHeader(props) {
|
|
19511
|
-
return React$
|
|
19511
|
+
return React$9.createElement("th", { ...props });
|
|
19512
19512
|
}
|
|
19513
19513
|
|
|
19514
|
-
const React$
|
|
19514
|
+
const React$8 = await importShared('react');
|
|
19515
19515
|
|
|
19516
19516
|
/**
|
|
19517
19517
|
* Render the container for the weeks in the month grid.
|
|
@@ -19520,10 +19520,10 @@ const React$6 = await importShared('react');
|
|
|
19520
19520
|
* @see https://daypicker.dev/guides/custom-components
|
|
19521
19521
|
*/
|
|
19522
19522
|
function Weeks(props) {
|
|
19523
|
-
return React$
|
|
19523
|
+
return React$8.createElement("tbody", { ...props });
|
|
19524
19524
|
}
|
|
19525
19525
|
|
|
19526
|
-
const React$
|
|
19526
|
+
const React$7 = await importShared('react');
|
|
19527
19527
|
/**
|
|
19528
19528
|
* Render a dropdown to navigate between years in the calendar.
|
|
19529
19529
|
*
|
|
@@ -19532,7 +19532,7 @@ const React$5 = await importShared('react');
|
|
|
19532
19532
|
*/
|
|
19533
19533
|
function YearsDropdown(props) {
|
|
19534
19534
|
const { components } = useDayPicker();
|
|
19535
|
-
return React$
|
|
19535
|
+
return React$7.createElement(components.Dropdown, { ...props });
|
|
19536
19536
|
}
|
|
19537
19537
|
|
|
19538
19538
|
const components = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
@@ -21246,8 +21246,8 @@ function useSelection(props, dateLib) {
|
|
|
21246
21246
|
}
|
|
21247
21247
|
}
|
|
21248
21248
|
|
|
21249
|
-
const React$
|
|
21250
|
-
const {useCallback: useCallback$1,useMemo: useMemo$2,useRef: useRef$2} = React$
|
|
21249
|
+
const React$6 = await importShared('react');
|
|
21250
|
+
const {useCallback: useCallback$1,useMemo: useMemo$2,useRef: useRef$2} = React$6;
|
|
21251
21251
|
/**
|
|
21252
21252
|
* Renders the DayPicker calendar component.
|
|
21253
21253
|
*
|
|
@@ -21430,24 +21430,24 @@ function DayPicker(initialProps) {
|
|
|
21430
21430
|
labels,
|
|
21431
21431
|
formatters
|
|
21432
21432
|
};
|
|
21433
|
-
return (React$
|
|
21434
|
-
React$
|
|
21435
|
-
React$
|
|
21436
|
-
!props.hideNavigation && !navLayout && (React$
|
|
21433
|
+
return (React$6.createElement(dayPickerContext.Provider, { value: contextValue },
|
|
21434
|
+
React$6.createElement(components.Root, { rootRef: props.animate ? rootElRef : undefined, className: className, style: style, dir: props.dir, id: props.id, lang: props.lang, nonce: props.nonce, title: props.title, role: props.role, "aria-label": props["aria-label"], ...dataAttributes },
|
|
21435
|
+
React$6.createElement(components.Months, { className: classNames[UI.Months], style: styles?.[UI.Months] },
|
|
21436
|
+
!props.hideNavigation && !navLayout && (React$6.createElement(components.Nav, { "data-animated-nav": props.animate ? "true" : undefined, className: classNames[UI.Nav], style: styles?.[UI.Nav], "aria-label": labelNav(), onPreviousClick: handlePreviousClick, onNextClick: handleNextClick, previousMonth: previousMonth, nextMonth: nextMonth })),
|
|
21437
21437
|
months.map((calendarMonth, displayIndex) => {
|
|
21438
21438
|
const dropdownMonths = getMonthOptions(calendarMonth.date, navStart, navEnd, formatters, dateLib);
|
|
21439
21439
|
const dropdownYears = getYearOptions(navStart, navEnd, formatters, dateLib);
|
|
21440
|
-
return (React$
|
|
21440
|
+
return (React$6.createElement(components.Month, { "data-animated-month": props.animate ? "true" : undefined, className: classNames[UI.Month], style: styles?.[UI.Month], key: displayIndex, displayIndex: displayIndex, calendarMonth: calendarMonth },
|
|
21441
21441
|
navLayout === "around" &&
|
|
21442
21442
|
!props.hideNavigation &&
|
|
21443
|
-
displayIndex === 0 && (React$
|
|
21444
|
-
React$
|
|
21445
|
-
React$
|
|
21443
|
+
displayIndex === 0 && (React$6.createElement(components.PreviousMonthButton, { type: "button", className: classNames[UI.PreviousMonthButton], tabIndex: previousMonth ? undefined : -1, "aria-disabled": previousMonth ? undefined : true, "aria-label": labelPrevious(previousMonth), onClick: handlePreviousClick, "data-animated-button": props.animate ? "true" : undefined },
|
|
21444
|
+
React$6.createElement(components.Chevron, { disabled: previousMonth ? undefined : true, className: classNames[UI.Chevron], orientation: props.dir === "rtl" ? "right" : "left" }))),
|
|
21445
|
+
React$6.createElement(components.MonthCaption, { "data-animated-caption": props.animate ? "true" : undefined, className: classNames[UI.MonthCaption], style: styles?.[UI.MonthCaption], calendarMonth: calendarMonth, displayIndex: displayIndex }, captionLayout?.startsWith("dropdown") ? (React$6.createElement(components.DropdownNav, { className: classNames[UI.Dropdowns], style: styles?.[UI.Dropdowns] },
|
|
21446
21446
|
captionLayout === "dropdown" ||
|
|
21447
|
-
captionLayout === "dropdown-months" ? (React$
|
|
21447
|
+
captionLayout === "dropdown-months" ? (React$6.createElement(components.MonthsDropdown, { className: classNames[UI.MonthsDropdown], "aria-label": labelMonthDropdown(), classNames: classNames, components: components, disabled: Boolean(props.disableNavigation), onChange: handleMonthChange(calendarMonth.date), options: dropdownMonths, style: styles?.[UI.Dropdown], value: dateLib.getMonth(calendarMonth.date) })) : (React$6.createElement("span", null, formatMonthDropdown(calendarMonth.date, dateLib))),
|
|
21448
21448
|
captionLayout === "dropdown" ||
|
|
21449
|
-
captionLayout === "dropdown-years" ? (React$
|
|
21450
|
-
React$
|
|
21449
|
+
captionLayout === "dropdown-years" ? (React$6.createElement(components.YearsDropdown, { className: classNames[UI.YearsDropdown], "aria-label": labelYearDropdown(dateLib.options), classNames: classNames, components: components, disabled: Boolean(props.disableNavigation), onChange: handleYearChange(calendarMonth.date), options: dropdownYears, style: styles?.[UI.Dropdown], value: dateLib.getYear(calendarMonth.date) })) : (React$6.createElement("span", null, formatYearDropdown(calendarMonth.date, dateLib))),
|
|
21450
|
+
React$6.createElement("span", { role: "status", "aria-live": "polite", style: {
|
|
21451
21451
|
border: 0,
|
|
21452
21452
|
clip: "rect(0 0 0 0)",
|
|
21453
21453
|
height: "1px",
|
|
@@ -21458,22 +21458,22 @@ function DayPicker(initialProps) {
|
|
|
21458
21458
|
width: "1px",
|
|
21459
21459
|
whiteSpace: "nowrap",
|
|
21460
21460
|
wordWrap: "normal"
|
|
21461
|
-
} }, formatCaption(calendarMonth.date, dateLib.options, dateLib)))) : (React$
|
|
21461
|
+
} }, formatCaption(calendarMonth.date, dateLib.options, dateLib)))) : (React$6.createElement(components.CaptionLabel, { className: classNames[UI.CaptionLabel], role: "status", "aria-live": "polite" }, formatCaption(calendarMonth.date, dateLib.options, dateLib)))),
|
|
21462
21462
|
navLayout === "around" &&
|
|
21463
21463
|
!props.hideNavigation &&
|
|
21464
|
-
displayIndex === numberOfMonths - 1 && (React$
|
|
21465
|
-
React$
|
|
21464
|
+
displayIndex === numberOfMonths - 1 && (React$6.createElement(components.NextMonthButton, { type: "button", className: classNames[UI.NextMonthButton], tabIndex: nextMonth ? undefined : -1, "aria-disabled": nextMonth ? undefined : true, "aria-label": labelNext(nextMonth), onClick: handleNextClick, "data-animated-button": props.animate ? "true" : undefined },
|
|
21465
|
+
React$6.createElement(components.Chevron, { disabled: nextMonth ? undefined : true, className: classNames[UI.Chevron], orientation: props.dir === "rtl" ? "left" : "right" }))),
|
|
21466
21466
|
displayIndex === numberOfMonths - 1 &&
|
|
21467
21467
|
navLayout === "after" &&
|
|
21468
|
-
!props.hideNavigation && (React$
|
|
21469
|
-
React$
|
|
21468
|
+
!props.hideNavigation && (React$6.createElement(components.Nav, { "data-animated-nav": props.animate ? "true" : undefined, className: classNames[UI.Nav], style: styles?.[UI.Nav], "aria-label": labelNav(), onPreviousClick: handlePreviousClick, onNextClick: handleNextClick, previousMonth: previousMonth, nextMonth: nextMonth })),
|
|
21469
|
+
React$6.createElement(components.MonthGrid, { role: "grid", "aria-multiselectable": mode === "multiple" || mode === "range", "aria-label": labelGrid(calendarMonth.date, dateLib.options, dateLib) ||
|
|
21470
21470
|
undefined, className: classNames[UI.MonthGrid], style: styles?.[UI.MonthGrid] },
|
|
21471
|
-
!props.hideWeekdays && (React$
|
|
21472
|
-
showWeekNumber && (React$
|
|
21473
|
-
weekdays.map((weekday, i) => (React$
|
|
21474
|
-
React$
|
|
21475
|
-
return (React$
|
|
21476
|
-
showWeekNumber && (React$
|
|
21471
|
+
!props.hideWeekdays && (React$6.createElement(components.Weekdays, { "data-animated-weekdays": props.animate ? "true" : undefined, className: classNames[UI.Weekdays], style: styles?.[UI.Weekdays] },
|
|
21472
|
+
showWeekNumber && (React$6.createElement(components.WeekNumberHeader, { "aria-label": labelWeekNumberHeader(dateLib.options), className: classNames[UI.WeekNumberHeader], style: styles?.[UI.WeekNumberHeader], scope: "col" }, formatWeekNumberHeader())),
|
|
21473
|
+
weekdays.map((weekday, i) => (React$6.createElement(components.Weekday, { "aria-label": labelWeekday(weekday, dateLib.options, dateLib), className: classNames[UI.Weekday], key: i, style: styles?.[UI.Weekday], scope: "col" }, formatWeekdayName(weekday, dateLib.options, dateLib)))))),
|
|
21474
|
+
React$6.createElement(components.Weeks, { "data-animated-weeks": props.animate ? "true" : undefined, className: classNames[UI.Weeks], style: styles?.[UI.Weeks] }, calendarMonth.weeks.map((week, weekIndex) => {
|
|
21475
|
+
return (React$6.createElement(components.Week, { className: classNames[UI.Week], key: week.weekNumber, style: styles?.[UI.Week], week: week },
|
|
21476
|
+
showWeekNumber && (React$6.createElement(components.WeekNumber, { week: week, style: styles?.[UI.WeekNumber], "aria-label": labelWeekNumber(week.weekNumber, {
|
|
21477
21477
|
locale
|
|
21478
21478
|
}), className: classNames[UI.WeekNumber], scope: "row", role: "rowheader" }, formatWeekNumber(week.weekNumber, dateLib))),
|
|
21479
21479
|
week.days.map((day) => {
|
|
@@ -21497,17 +21497,17 @@ function DayPicker(initialProps) {
|
|
|
21497
21497
|
const ariaLabel = !isInteractive && !modifiers.hidden
|
|
21498
21498
|
? labelGridcell(date, modifiers, dateLib.options, dateLib)
|
|
21499
21499
|
: undefined;
|
|
21500
|
-
return (React$
|
|
21500
|
+
return (React$6.createElement(components.Day, { key: `${dateLib.format(date, "yyyy-MM-dd")}_${dateLib.format(day.displayMonth, "yyyy-MM")}`, day: day, modifiers: modifiers, className: className.join(" "), style: style, role: "gridcell", "aria-selected": modifiers.selected || undefined, "aria-label": ariaLabel, "data-day": dateLib.format(date, "yyyy-MM-dd"), "data-month": day.outside
|
|
21501
21501
|
? dateLib.format(date, "yyyy-MM")
|
|
21502
|
-
: undefined, "data-selected": modifiers.selected || undefined, "data-disabled": modifiers.disabled || undefined, "data-hidden": modifiers.hidden || undefined, "data-outside": day.outside || undefined, "data-focused": modifiers.focused || undefined, "data-today": modifiers.today || undefined }, !modifiers.hidden && isInteractive ? (React$
|
|
21502
|
+
: undefined, "data-selected": modifiers.selected || undefined, "data-disabled": modifiers.disabled || undefined, "data-hidden": modifiers.hidden || undefined, "data-outside": day.outside || undefined, "data-focused": modifiers.focused || undefined, "data-today": modifiers.today || undefined }, !modifiers.hidden && isInteractive ? (React$6.createElement(components.DayButton, { className: classNames[UI.DayButton], style: styles?.[UI.DayButton], type: "button", day: day, modifiers: modifiers, disabled: modifiers.disabled || undefined, tabIndex: isFocusTarget(day) ? 0 : -1, "aria-label": labelDayButton(date, modifiers, dateLib.options, dateLib), onClick: handleDayClick(day, modifiers), onBlur: handleDayBlur(day, modifiers), onFocus: handleDayFocus(day, modifiers), onKeyDown: handleDayKeyDown(day, modifiers), onMouseEnter: handleDayMouseEnter(day, modifiers), onMouseLeave: handleDayMouseLeave(day, modifiers) }, formatDay(date, dateLib.options, dateLib))) : (!modifiers.hidden &&
|
|
21503
21503
|
formatDay(day.date, dateLib.options, dateLib))));
|
|
21504
21504
|
})));
|
|
21505
21505
|
})))));
|
|
21506
21506
|
})),
|
|
21507
|
-
props.footer && (React$
|
|
21507
|
+
props.footer && (React$6.createElement(components.Footer, { className: classNames[UI.Footer], style: styles?.[UI.Footer], role: "status", "aria-live": "polite" }, props.footer)))));
|
|
21508
21508
|
}
|
|
21509
21509
|
|
|
21510
|
-
const React$
|
|
21510
|
+
const React$5 = await importShared('react');
|
|
21511
21511
|
/* eslint-disable react/prop-types -- needed for subcomponents */
|
|
21512
21512
|
/**
|
|
21513
21513
|
* A control that allows the user to select a date.
|
|
@@ -21566,8 +21566,8 @@ function Calendar({ className, classNames, showOutsideDays = true, captionLayout
|
|
|
21566
21566
|
}
|
|
21567
21567
|
function CalendarDayButton({ className, day, modifiers, ...props }) {
|
|
21568
21568
|
const defaultClassNames = getDefaultClassNames();
|
|
21569
|
-
const ref = React$
|
|
21570
|
-
React$
|
|
21569
|
+
const ref = React$5.useRef(null);
|
|
21570
|
+
React$5.useEffect(() => {
|
|
21571
21571
|
if (modifiers.focused)
|
|
21572
21572
|
ref.current?.focus();
|
|
21573
21573
|
}, [modifiers.focused]);
|
|
@@ -22106,13 +22106,13 @@ function EmptyDisplay({ className, icon: Icon = MdFormatListBulleted, header, su
|
|
|
22106
22106
|
return (jsxRuntimeExports.jsx("div", { className: cn$1('flex h-full items-center justify-center', className), children: jsxRuntimeExports.jsxs("div", { className: "flex max-w-xl flex-col items-center space-y-4 text-center", children: [jsxRuntimeExports.jsx("div", { children: jsxRuntimeExports.jsx(Icon, { className: "size-20 text-muted-foreground" }) }), jsxRuntimeExports.jsx("h1", { children: header ?? strings.emptyDisplayDefaultHeader }), jsxRuntimeExports.jsx("p", { className: "text-muted-foreground", children: subtitle ?? strings.emptyDisplayDefaultContent }), actions] }) }));
|
|
22107
22107
|
}
|
|
22108
22108
|
|
|
22109
|
-
const React$
|
|
22109
|
+
const React$4 = await importShared('react');
|
|
22110
22110
|
/**
|
|
22111
22111
|
* Displays a generic error state with a header and error message.
|
|
22112
22112
|
*/
|
|
22113
22113
|
function ErrorDisplay({ className, header, error, actions, }) {
|
|
22114
22114
|
const strings = useComponentStrings();
|
|
22115
|
-
return (jsxRuntimeExports.jsx("div", { className: cn$1('flex h-full w-full items-center justify-center', className), role: "alert", children: jsxRuntimeExports.jsxs("div", { className: "flex max-w-xl flex-col items-center space-y-4 text-center", children: [jsxRuntimeExports.jsx("div", { children: jsxRuntimeExports.jsx(MdOutlineErrorOutline, { className: "size-20 text-muted-foreground" }) }), jsxRuntimeExports.jsx("h1", { children: header ?? strings.errorDisplayDefaultHeader }), jsxRuntimeExports.jsx("p", { children: typeof error === 'string' || React$
|
|
22115
|
+
return (jsxRuntimeExports.jsx("div", { className: cn$1('flex h-full w-full items-center justify-center', className), role: "alert", children: jsxRuntimeExports.jsxs("div", { className: "flex max-w-xl flex-col items-center space-y-4 text-center", children: [jsxRuntimeExports.jsx("div", { children: jsxRuntimeExports.jsx(MdOutlineErrorOutline, { className: "size-20 text-muted-foreground" }) }), jsxRuntimeExports.jsx("h1", { children: header ?? strings.errorDisplayDefaultHeader }), jsxRuntimeExports.jsx("p", { children: typeof error === 'string' || React$4.isValidElement(error)
|
|
22116
22116
|
? error
|
|
22117
22117
|
: strings.errorDisplayDefaultContent }), actions] }) }));
|
|
22118
22118
|
}
|
|
@@ -22203,9 +22203,9 @@ function useEventCallback(fn) {
|
|
|
22203
22203
|
}, [ref]);
|
|
22204
22204
|
}
|
|
22205
22205
|
|
|
22206
|
-
const React$
|
|
22207
|
-
const {useId,useMemo,useState} = React$
|
|
22208
|
-
const MultiComboboxContext = React$
|
|
22206
|
+
const React$3 = await importShared('react');
|
|
22207
|
+
const {useId,useMemo,useState} = React$3;
|
|
22208
|
+
const MultiComboboxContext = React$3.createContext(null);
|
|
22209
22209
|
function MultiCombobox({ children, value, onChange, disabled, }) {
|
|
22210
22210
|
const [selectedValues, setSelectedValues] = useControlledState(value, onChange, []);
|
|
22211
22211
|
const [searchQuery, setSearchQuery] = useState('');
|
|
@@ -22246,7 +22246,7 @@ function MultiCombobox({ children, value, onChange, disabled, }) {
|
|
|
22246
22246
|
return (jsxRuntimeExports.jsx(MultiComboboxContext.Provider, { value: contextValue, children: jsxRuntimeExports.jsx(Popover, { open: isOpen, onOpenChange: setIsOpen, children: children }) }));
|
|
22247
22247
|
}
|
|
22248
22248
|
function useMultiComboboxContext() {
|
|
22249
|
-
const value = React$
|
|
22249
|
+
const value = React$3.useContext(MultiComboboxContext);
|
|
22250
22250
|
if (!value) {
|
|
22251
22251
|
throw new Error(`useMultiComboboxContext must be used inside a MultiComboboxContext provider`);
|
|
22252
22252
|
}
|
|
@@ -22301,7 +22301,7 @@ const MultiComboboxGroup = CommandGroup;
|
|
|
22301
22301
|
function MultiComboboxItem({ value, className, label, children, ...rest }) {
|
|
22302
22302
|
const { selectedValues, onSelect } = useMultiComboboxContext();
|
|
22303
22303
|
const isSelected = selectedValues.some((v) => v.value === value);
|
|
22304
|
-
const itemRef = React$
|
|
22304
|
+
const itemRef = React$3.useRef(null);
|
|
22305
22305
|
return (jsxRuntimeExports.jsxs(CommandItem, { onSelect: () => {
|
|
22306
22306
|
const itemLabel = label ?? itemRef.current?.textContent ?? undefined;
|
|
22307
22307
|
onSelect(value, itemLabel, !isSelected);
|
|
@@ -22599,6 +22599,268 @@ function SheetDescription({ className, ...props }) {
|
|
|
22599
22599
|
return (jsxRuntimeExports.jsx(Description, { "data-slot": "sheet-description", className: cn$1('text-sm text-muted-foreground', className), ...props }));
|
|
22600
22600
|
}
|
|
22601
22601
|
|
|
22602
|
+
/**
|
|
22603
|
+
* A skeleton component that can be used to show a loading state.
|
|
22604
|
+
*
|
|
22605
|
+
* https://ui.shadcn.com/docs/components/skeleton
|
|
22606
|
+
*/
|
|
22607
|
+
function Skeleton({ className, ...props }) {
|
|
22608
|
+
return (jsxRuntimeExports.jsx("div", { "data-slot": "skeleton", className: cn$1('animate-pulse rounded-md bg-accent', className), ...props }));
|
|
22609
|
+
}
|
|
22610
|
+
|
|
22611
|
+
function TooltipProvider({ delayDuration = 0, ...props }) {
|
|
22612
|
+
return (jsxRuntimeExports.jsx(Provider, { "data-slot": "tooltip-provider", delayDuration: delayDuration, ...props }));
|
|
22613
|
+
}
|
|
22614
|
+
function Tooltip({ ...props }) {
|
|
22615
|
+
return (jsxRuntimeExports.jsx(TooltipProvider, { children: jsxRuntimeExports.jsx(Root3, { "data-slot": "tooltip", ...props }) }));
|
|
22616
|
+
}
|
|
22617
|
+
function TooltipTrigger({ ...props }) {
|
|
22618
|
+
return jsxRuntimeExports.jsx(Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
22619
|
+
}
|
|
22620
|
+
function TooltipContent({ className, sideOffset = 0, children, ...props }) {
|
|
22621
|
+
return (jsxRuntimeExports.jsx(Portal, { children: jsxRuntimeExports.jsxs(Content2, { "data-slot": "tooltip-content", sideOffset: sideOffset, className: cn$1('z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-primary px-3 py-1.5 text-xs text-balance text-primary-foreground fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95', className), ...props, children: [children, jsxRuntimeExports.jsx(Arrow2, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-primary fill-primary" })] }) }));
|
|
22622
|
+
}
|
|
22623
|
+
|
|
22624
|
+
const React$2 = await importShared('react');
|
|
22625
|
+
|
|
22626
|
+
const MOBILE_BREAKPOINT = 768;
|
|
22627
|
+
/**
|
|
22628
|
+
* Determines if the screen is mobile.
|
|
22629
|
+
*
|
|
22630
|
+
* @returns true if the screen is mobile, false otherwise
|
|
22631
|
+
*/
|
|
22632
|
+
function useIsMobile() {
|
|
22633
|
+
const [isMobile, setIsMobile] = React$2.useState(undefined);
|
|
22634
|
+
React$2.useEffect(() => {
|
|
22635
|
+
const mql = globalThis.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
22636
|
+
const onChange = () => {
|
|
22637
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
22638
|
+
};
|
|
22639
|
+
mql.addEventListener('change', onChange);
|
|
22640
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
22641
|
+
return () => {
|
|
22642
|
+
mql.removeEventListener('change', onChange);
|
|
22643
|
+
};
|
|
22644
|
+
}, []);
|
|
22645
|
+
return !!isMobile;
|
|
22646
|
+
}
|
|
22647
|
+
|
|
22648
|
+
const React$1 = await importShared('react');
|
|
22649
|
+
/**
|
|
22650
|
+
* Sidebar component from ShadCN
|
|
22651
|
+
*
|
|
22652
|
+
* https://ui.shadcn.com/docs/components/sidebar
|
|
22653
|
+
*
|
|
22654
|
+
* - Added functionality to dismiss when button is clicked (https://github.com/shadcn-ui/ui/issues/5561)
|
|
22655
|
+
*/
|
|
22656
|
+
const SIDEBAR_COOKIE_NAME = 'sidebar_state';
|
|
22657
|
+
const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
22658
|
+
const SIDEBAR_WIDTH = '16rem';
|
|
22659
|
+
const SIDEBAR_WIDTH_MOBILE = '18rem';
|
|
22660
|
+
const SIDEBAR_WIDTH_ICON = '3rem';
|
|
22661
|
+
const SIDEBAR_KEYBOARD_SHORTCUT = 'b';
|
|
22662
|
+
const SidebarContext = React$1.createContext(null);
|
|
22663
|
+
function useSidebar() {
|
|
22664
|
+
const context = React$1.useContext(SidebarContext);
|
|
22665
|
+
if (!context) {
|
|
22666
|
+
throw new Error('useSidebar must be used within a SidebarProvider.');
|
|
22667
|
+
}
|
|
22668
|
+
return context;
|
|
22669
|
+
}
|
|
22670
|
+
function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }) {
|
|
22671
|
+
const isMobile = useIsMobile();
|
|
22672
|
+
const [openMobile, setOpenMobile] = React$1.useState(false);
|
|
22673
|
+
// This is the internal state of the sidebar.
|
|
22674
|
+
// We use openProp and setOpenProp for control from outside the component.
|
|
22675
|
+
const [_open, _setOpen] = React$1.useState(defaultOpen);
|
|
22676
|
+
const open = openProp ?? _open;
|
|
22677
|
+
const setOpen = React$1.useCallback((value) => {
|
|
22678
|
+
const openState = typeof value === 'function' ? value(open) : value;
|
|
22679
|
+
if (setOpenProp) {
|
|
22680
|
+
setOpenProp(openState);
|
|
22681
|
+
}
|
|
22682
|
+
else {
|
|
22683
|
+
_setOpen(openState);
|
|
22684
|
+
}
|
|
22685
|
+
// This sets the cookie to keep the sidebar state.
|
|
22686
|
+
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
22687
|
+
}, [setOpenProp, open]);
|
|
22688
|
+
// Helper to toggle the sidebar.
|
|
22689
|
+
const toggleSidebar = React$1.useCallback(() => {
|
|
22690
|
+
if (isMobile) {
|
|
22691
|
+
setOpenMobile((open) => !open);
|
|
22692
|
+
}
|
|
22693
|
+
else {
|
|
22694
|
+
setOpen((open) => !open);
|
|
22695
|
+
}
|
|
22696
|
+
}, [isMobile, setOpen, setOpenMobile]);
|
|
22697
|
+
// Adds a keyboard shortcut to toggle the sidebar.
|
|
22698
|
+
React$1.useEffect(() => {
|
|
22699
|
+
const handleKeyDown = (event) => {
|
|
22700
|
+
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT &&
|
|
22701
|
+
(event.metaKey || event.ctrlKey)) {
|
|
22702
|
+
event.preventDefault();
|
|
22703
|
+
toggleSidebar();
|
|
22704
|
+
}
|
|
22705
|
+
};
|
|
22706
|
+
globalThis.addEventListener('keydown', handleKeyDown);
|
|
22707
|
+
return () => {
|
|
22708
|
+
globalThis.removeEventListener('keydown', handleKeyDown);
|
|
22709
|
+
};
|
|
22710
|
+
}, [toggleSidebar]);
|
|
22711
|
+
// We add a state so that we can do data-state="expanded" or "collapsed".
|
|
22712
|
+
// This makes it easier to style the sidebar with Tailwind classes.
|
|
22713
|
+
const state = open ? 'expanded' : 'collapsed';
|
|
22714
|
+
const contextValue = React$1.useMemo(() => ({
|
|
22715
|
+
state,
|
|
22716
|
+
open,
|
|
22717
|
+
setOpen,
|
|
22718
|
+
isMobile,
|
|
22719
|
+
openMobile,
|
|
22720
|
+
setOpenMobile,
|
|
22721
|
+
toggleSidebar,
|
|
22722
|
+
}), [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]);
|
|
22723
|
+
return (jsxRuntimeExports.jsx(SidebarContext.Provider, { value: contextValue, children: jsxRuntimeExports.jsx(TooltipProvider, { delayDuration: 0, children: jsxRuntimeExports.jsx("div", { "data-slot": "sidebar-wrapper", style: {
|
|
22724
|
+
'--sidebar-width': SIDEBAR_WIDTH,
|
|
22725
|
+
'--sidebar-width-icon': SIDEBAR_WIDTH_ICON,
|
|
22726
|
+
...style,
|
|
22727
|
+
}, className: cn$1('group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-card', className), ...props, children: children }) }) }));
|
|
22728
|
+
}
|
|
22729
|
+
function Sidebar({ side = 'left', variant = 'sidebar', collapsible = 'offcanvas', className, children, ...props }) {
|
|
22730
|
+
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
22731
|
+
if (collapsible === 'none') {
|
|
22732
|
+
return (jsxRuntimeExports.jsx("div", { "data-slot": "sidebar", className: cn$1('flex h-full w-(--sidebar-width) flex-col bg-card text-card-foreground', className), ...props, children: children }));
|
|
22733
|
+
}
|
|
22734
|
+
if (isMobile) {
|
|
22735
|
+
return (jsxRuntimeExports.jsx(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: jsxRuntimeExports.jsxs(SheetContent, { "data-sidebar": "sidebar", "data-slot": "sidebar", "data-mobile": "true", className: "w-(--sidebar-width) bg-card p-0 text-card-foreground [&>button]:hidden", style: {
|
|
22736
|
+
'--sidebar-width': SIDEBAR_WIDTH_MOBILE,
|
|
22737
|
+
}, side: side, children: [jsxRuntimeExports.jsxs(SheetHeader, { className: "sr-only", children: [jsxRuntimeExports.jsx(SheetTitle, { children: "Sidebar" }), jsxRuntimeExports.jsx(SheetDescription, { children: "Displays the mobile sidebar." })] }), jsxRuntimeExports.jsx("div", { className: "flex h-full w-full flex-col", children: children })] }) }));
|
|
22738
|
+
}
|
|
22739
|
+
return (jsxRuntimeExports.jsxs("div", { className: "group peer hidden text-card-foreground md:block", "data-state": state, "data-collapsible": state === 'collapsed' ? collapsible : '', "data-variant": variant, "data-side": side, "data-slot": "sidebar", children: [jsxRuntimeExports.jsx("div", { "data-slot": "sidebar-gap", className: cn$1('relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear', 'group-data-[collapsible=offcanvas]:w-0', 'group-data-[side=right]:rotate-180', variant === 'floating' || variant === 'inset'
|
|
22740
|
+
? 'group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]'
|
|
22741
|
+
: 'group-data-[collapsible=icon]:w-(--sidebar-width-icon)') }), jsxRuntimeExports.jsx("div", { "data-slot": "sidebar-container", className: cn$1('fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex', side === 'left'
|
|
22742
|
+
? 'left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]'
|
|
22743
|
+
: 'right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]',
|
|
22744
|
+
// Adjust the padding for floating and inset variants.
|
|
22745
|
+
variant === 'floating' || variant === 'inset'
|
|
22746
|
+
? 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]'
|
|
22747
|
+
: 'group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l', className), ...props, children: jsxRuntimeExports.jsx("div", { "data-sidebar": "sidebar", "data-slot": "sidebar-inner", className: "flex h-full w-full flex-col bg-card group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-border group-data-[variant=floating]:shadow-sm", children: children }) })] }));
|
|
22748
|
+
}
|
|
22749
|
+
function SidebarTrigger({ className, onClick, ...props }) {
|
|
22750
|
+
const { toggleSidebar } = useSidebar();
|
|
22751
|
+
return (jsxRuntimeExports.jsxs(Button$1, { "data-sidebar": "trigger", "data-slot": "sidebar-trigger", variant: "ghost", size: "icon", className: cn$1('size-7', className), onClick: (event) => {
|
|
22752
|
+
onClick?.(event);
|
|
22753
|
+
toggleSidebar();
|
|
22754
|
+
}, ...props, children: [jsxRuntimeExports.jsx(MdMenu, {}), jsxRuntimeExports.jsx("span", { className: "sr-only", children: "Toggle Sidebar" })] }));
|
|
22755
|
+
}
|
|
22756
|
+
function SidebarRail({ className, ...props }) {
|
|
22757
|
+
const { toggleSidebar } = useSidebar();
|
|
22758
|
+
return (jsxRuntimeExports.jsx("button", { "data-sidebar": "rail", "data-slot": "sidebar-rail", "aria-label": "Toggle Sidebar", tabIndex: -1, onClick: toggleSidebar, title: "Toggle Sidebar", className: cn$1('hover:after:bg-card-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex', 'in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize', '[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize', 'group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-card', '[[data-side=left][data-collapsible=offcanvas]_&]:-right-2', '[[data-side=right][data-collapsible=offcanvas]_&]:-left-2', className), ...props }));
|
|
22759
|
+
}
|
|
22760
|
+
function SidebarInset({ className, ...props }) {
|
|
22761
|
+
return (jsxRuntimeExports.jsx("main", { "data-slot": "sidebar-inset", className: cn$1('relative flex w-full flex-1 flex-col bg-background', 'md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2', className), ...props }));
|
|
22762
|
+
}
|
|
22763
|
+
function SidebarInput({ className, ...props }) {
|
|
22764
|
+
return (jsxRuntimeExports.jsx(Input, { "data-slot": "sidebar-input", "data-sidebar": "input", className: cn$1('h-8 w-full bg-background shadow-none', className), ...props }));
|
|
22765
|
+
}
|
|
22766
|
+
function SidebarHeader({ className, ...props }) {
|
|
22767
|
+
return (jsxRuntimeExports.jsx("div", { "data-slot": "sidebar-header", "data-sidebar": "header", className: cn$1('flex flex-col gap-2 p-2', className), ...props }));
|
|
22768
|
+
}
|
|
22769
|
+
function SidebarFooter({ className, ...props }) {
|
|
22770
|
+
return (jsxRuntimeExports.jsx("div", { "data-slot": "sidebar-footer", "data-sidebar": "footer", className: cn$1('flex flex-col gap-2 p-2', className), ...props }));
|
|
22771
|
+
}
|
|
22772
|
+
function SidebarSeparator({ className, ...props }) {
|
|
22773
|
+
return (jsxRuntimeExports.jsx(Separator, { "data-slot": "sidebar-separator", "data-sidebar": "separator", className: cn$1('bg-card-border mx-2 w-auto', className), ...props }));
|
|
22774
|
+
}
|
|
22775
|
+
function SidebarContent({ className, ...props }) {
|
|
22776
|
+
return (jsxRuntimeExports.jsx("div", { "data-slot": "sidebar-content", "data-sidebar": "content", className: cn$1('flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden', className), ...props }));
|
|
22777
|
+
}
|
|
22778
|
+
function SidebarGroup({ className, ...props }) {
|
|
22779
|
+
return (jsxRuntimeExports.jsx("div", { "data-slot": "sidebar-group", "data-sidebar": "group", className: cn$1('relative flex w-full min-w-0 flex-col p-2', className), ...props }));
|
|
22780
|
+
}
|
|
22781
|
+
function SidebarGroupLabel({ className, asChild = false, ...props }) {
|
|
22782
|
+
const Comp = asChild ? Slot$4 : 'div';
|
|
22783
|
+
return (jsxRuntimeExports.jsx(Comp, { "data-slot": "sidebar-group-label", "data-sidebar": "group-label", className: cn$1('flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-card-foreground/70 ring-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0', 'group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0', className), ...props }));
|
|
22784
|
+
}
|
|
22785
|
+
function SidebarGroupAction({ className, asChild = false, ...props }) {
|
|
22786
|
+
const Comp = asChild ? Slot$4 : 'button';
|
|
22787
|
+
return (jsxRuntimeExports.jsx(Comp, { "data-slot": "sidebar-group-action", "data-sidebar": "group-action", className: cn$1('hover:bg-card-accent absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-card-foreground ring-ring outline-hidden transition-transform hover:text-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',
|
|
22788
|
+
// Increases the hit area of the button on mobile.
|
|
22789
|
+
'after:absolute after:-inset-2 md:after:hidden', 'group-data-[collapsible=icon]:hidden', className), ...props }));
|
|
22790
|
+
}
|
|
22791
|
+
function SidebarGroupContent({ className, ...props }) {
|
|
22792
|
+
return (jsxRuntimeExports.jsx("div", { "data-slot": "sidebar-group-content", "data-sidebar": "group-content", className: cn$1('w-full text-sm', className), ...props }));
|
|
22793
|
+
}
|
|
22794
|
+
function SidebarMenu({ className, ...props }) {
|
|
22795
|
+
return (jsxRuntimeExports.jsx("ul", { "data-slot": "sidebar-menu", "data-sidebar": "menu", className: cn$1('flex w-full min-w-0 flex-col gap-1', className), ...props }));
|
|
22796
|
+
}
|
|
22797
|
+
function SidebarMenuItem({ className, ...props }) {
|
|
22798
|
+
return (jsxRuntimeExports.jsx("li", { "data-slot": "sidebar-menu-item", "data-sidebar": "menu-item", className: cn$1('group/menu-item relative', className), ...props }));
|
|
22799
|
+
}
|
|
22800
|
+
const sidebarMenuButtonVariants = cva('peer/menu-button hover:bg-card-accent active:bg-card-accent data-[active=true]:bg-card-accent data-[state=open]:hover:bg-card-accent flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:text-accent-foreground focus-visible:ring-2 active:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:font-medium data-[active=true]:text-accent-foreground data-[state=open]:hover:text-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0', {
|
|
22801
|
+
variants: {
|
|
22802
|
+
variant: {
|
|
22803
|
+
default: 'hover:bg-card-accent hover:text-accent-foreground',
|
|
22804
|
+
outline: 'hover:bg-card-accent bg-background shadow-[0_0_0_1px_hsl(var(--border))] hover:text-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--accent))]',
|
|
22805
|
+
},
|
|
22806
|
+
size: {
|
|
22807
|
+
default: 'h-8 text-sm',
|
|
22808
|
+
sm: 'h-7 text-xs',
|
|
22809
|
+
lg: 'h-12 text-sm group-data-[collapsible=icon]:p-0!',
|
|
22810
|
+
},
|
|
22811
|
+
},
|
|
22812
|
+
defaultVariants: {
|
|
22813
|
+
variant: 'default',
|
|
22814
|
+
size: 'default',
|
|
22815
|
+
},
|
|
22816
|
+
});
|
|
22817
|
+
function SidebarMenuButton({ asChild = false, isActive = false, variant = 'default', size = 'default', tooltip, className, onClick, ...props }) {
|
|
22818
|
+
const Comp = asChild ? Slot$4 : 'button';
|
|
22819
|
+
const { isMobile, state, toggleSidebar } = useSidebar();
|
|
22820
|
+
const button = (jsxRuntimeExports.jsx(Comp, { "data-slot": "sidebar-menu-button", "data-sidebar": "menu-button", "data-size": size, "data-active": isActive, className: cn$1(sidebarMenuButtonVariants({ variant, size }), className), onClick: (event) => {
|
|
22821
|
+
onClick?.(event);
|
|
22822
|
+
if (isMobile && !event.defaultPrevented) {
|
|
22823
|
+
toggleSidebar();
|
|
22824
|
+
}
|
|
22825
|
+
}, ...props }));
|
|
22826
|
+
if (!tooltip) {
|
|
22827
|
+
return button;
|
|
22828
|
+
}
|
|
22829
|
+
if (typeof tooltip === 'string') {
|
|
22830
|
+
tooltip = {
|
|
22831
|
+
children: tooltip,
|
|
22832
|
+
};
|
|
22833
|
+
}
|
|
22834
|
+
return (jsxRuntimeExports.jsxs(Tooltip, { children: [jsxRuntimeExports.jsx(TooltipTrigger, { asChild: true, children: button }), jsxRuntimeExports.jsx(TooltipContent, { side: "right", align: "center", hidden: state !== 'collapsed' || isMobile, ...tooltip })] }));
|
|
22835
|
+
}
|
|
22836
|
+
function SidebarMenuAction({ className, asChild = false, showOnHover = false, ...props }) {
|
|
22837
|
+
const Comp = asChild ? Slot$4 : 'button';
|
|
22838
|
+
return (jsxRuntimeExports.jsx(Comp, { "data-slot": "sidebar-menu-action", "data-sidebar": "menu-action", className: cn$1('hover:bg-card-accent absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-card-foreground ring-ring outline-hidden transition-transform peer-hover/menu-button:text-accent-foreground hover:text-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',
|
|
22839
|
+
// Increases the hit area of the button on mobile.
|
|
22840
|
+
'after:absolute after:-inset-2 md:after:hidden', 'peer-data-[size=sm]/menu-button:top-1', 'peer-data-[size=default]/menu-button:top-1.5', 'peer-data-[size=lg]/menu-button:top-2.5', 'group-data-[collapsible=icon]:hidden', showOnHover &&
|
|
22841
|
+
'group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-[active=true]/menu-button:text-accent-foreground data-[state=open]:opacity-100 md:opacity-0', className), ...props }));
|
|
22842
|
+
}
|
|
22843
|
+
function SidebarMenuBadge({ className, ...props }) {
|
|
22844
|
+
return (jsxRuntimeExports.jsx("div", { "data-slot": "sidebar-menu-badge", "data-sidebar": "menu-badge", className: cn$1('pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-card-foreground tabular-nums select-none', 'peer-hover/menu-button:text-accent-foreground peer-data-[active=true]/menu-button:text-accent-foreground', 'peer-data-[size=sm]/menu-button:top-1', 'peer-data-[size=default]/menu-button:top-1.5', 'peer-data-[size=lg]/menu-button:top-2.5', 'group-data-[collapsible=icon]:hidden', className), ...props }));
|
|
22845
|
+
}
|
|
22846
|
+
function SidebarMenuSkeleton({ className, showIcon = false, ...props }) {
|
|
22847
|
+
// Random width between 50 to 90%.
|
|
22848
|
+
const width = React$1.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []);
|
|
22849
|
+
return (jsxRuntimeExports.jsxs("div", { "data-slot": "sidebar-menu-skeleton", "data-sidebar": "menu-skeleton", className: cn$1('flex h-8 items-center gap-2 rounded-md px-2', className), ...props, children: [showIcon && (jsxRuntimeExports.jsx(Skeleton, { className: "size-4 rounded-md", "data-sidebar": "menu-skeleton-icon" })), jsxRuntimeExports.jsx(Skeleton, { className: "h-4 max-w-(--skeleton-width) flex-1", "data-sidebar": "menu-skeleton-text", style: {
|
|
22850
|
+
'--skeleton-width': width,
|
|
22851
|
+
} })] }));
|
|
22852
|
+
}
|
|
22853
|
+
function SidebarMenuSub({ className, ...props }) {
|
|
22854
|
+
return (jsxRuntimeExports.jsx("ul", { "data-slot": "sidebar-menu-sub", "data-sidebar": "menu-sub", className: cn$1('mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-border px-2.5 py-0.5', 'group-data-[collapsible=icon]:hidden', className), ...props }));
|
|
22855
|
+
}
|
|
22856
|
+
function SidebarMenuSubItem({ className, ...props }) {
|
|
22857
|
+
return (jsxRuntimeExports.jsx("li", { "data-slot": "sidebar-menu-sub-item", "data-sidebar": "menu-sub-item", className: cn$1('group/menu-sub-item relative', className), ...props }));
|
|
22858
|
+
}
|
|
22859
|
+
function SidebarMenuSubButton({ asChild = false, size = 'md', isActive = false, className, ...props }) {
|
|
22860
|
+
const Comp = asChild ? Slot$4 : 'a';
|
|
22861
|
+
return (jsxRuntimeExports.jsx(Comp, { "data-slot": "sidebar-menu-sub-button", "data-sidebar": "menu-sub-button", "data-size": size, "data-active": isActive, className: cn$1('hover:bg-card-accent active:bg-card-accent flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-card-foreground ring-ring outline-hidden hover:text-accent-foreground focus-visible:ring-2 active:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-accent-foreground', 'data-[active=true]:bg-card-accent data-[active=true]:text-accent-foreground', size === 'sm' && 'text-xs', size === 'md' && 'text-sm', 'group-data-[collapsible=icon]:hidden', className), ...props }));
|
|
22862
|
+
}
|
|
22863
|
+
|
|
22602
22864
|
/**
|
|
22603
22865
|
* A responsive table component.
|
|
22604
22866
|
*
|
|
@@ -23814,18 +24076,5 @@ const Toaster = ({ ...props }) => (jsxRuntimeExports.jsx(Toaster$1, { className:
|
|
|
23814
24076
|
},
|
|
23815
24077
|
}, ...props }));
|
|
23816
24078
|
|
|
23817
|
-
|
|
23818
|
-
|
|
23819
|
-
}
|
|
23820
|
-
function Tooltip({ ...props }) {
|
|
23821
|
-
return (jsxRuntimeExports.jsx(TooltipProvider, { children: jsxRuntimeExports.jsx(Root3, { "data-slot": "tooltip", ...props }) }));
|
|
23822
|
-
}
|
|
23823
|
-
function TooltipTrigger({ ...props }) {
|
|
23824
|
-
return jsxRuntimeExports.jsx(Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
23825
|
-
}
|
|
23826
|
-
function TooltipContent({ className, sideOffset = 0, children, ...props }) {
|
|
23827
|
-
return (jsxRuntimeExports.jsx(Portal, { children: jsxRuntimeExports.jsxs(Content2, { "data-slot": "tooltip-content", sideOffset: sideOffset, className: cn$1('z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-primary px-3 py-1.5 text-xs text-balance text-primary-foreground fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95', className), ...props, children: [children, jsxRuntimeExports.jsx(Arrow2, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-primary fill-primary" })] }) }));
|
|
23828
|
-
}
|
|
23829
|
-
|
|
23830
|
-
export { Alert, AlertDescription, AlertTitle, AsyncComboboxField, AsyncComboboxFieldController, Badge, BadgeWithIcon, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button$1 as Button, ButtonGroup, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CheckboxField, CheckboxFieldController, CircularProgress, ColorPicker, ColorPickerField, ColorPickerFieldController, Combobox, ComboboxAction, ComboboxContent, ComboboxEmpty, ComboboxField, ComboboxFieldController, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLoading, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfirmDialog, DatePickerField, DatePickerFieldController, DateTimePickerField, DateTimePickerFieldController, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyDisplay, ErrorDisplay, ErrorableLoader, FormActionBar, FormControl, FormDescription, FormItem, FormLabel, FormMessage, Input, InputField, InputFieldController, Label, Loader$1 as Loader, MultiCombobox, MultiComboboxContent, MultiComboboxEmpty, MultiComboboxField, MultiComboboxFieldController, MultiComboboxGroup, MultiComboboxInput, MultiComboboxItem, MultiSwitchField, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuItemWithLink, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NavigationTabs, NavigationTabsItem, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, RecordView, RecordViewActions, RecordViewItem, RecordViewItemList, ScrollArea, ScrollBar, SectionList, SectionListSection, SectionListSectionContent, SectionListSectionDescription, SectionListSectionHeader, SectionListSectionTitle, Select, SelectContent, SelectField, SelectFieldController, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, SidebarLayout, SidebarLayoutContent, SidebarLayoutSidebar, Switch, SwitchField, SwitchFieldController, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, TextareaField, TextareaFieldController, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cn$1 as cn, genericForwardRef, inputVariants, mergeRefs, navigationMenuTriggerStyle, selectCheckVariants, selectContentVariants, selectItemVariants, selectTriggerVariants, toast, useComboboxContext, useConfirmDialog, useControlledState, useControllerMerged, useDebounce, useEventCallback, useFormField, useMultiComboboxContext };
|
|
23831
|
-
//# sourceMappingURL=ui-components-RO_rk4f0.js.map
|
|
24079
|
+
export { Alert, AlertDescription, AlertTitle, AsyncComboboxField, AsyncComboboxFieldController, Badge, BadgeWithIcon, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button$1 as Button, ButtonGroup, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CheckboxField, CheckboxFieldController, CircularProgress, ColorPicker, ColorPickerField, ColorPickerFieldController, Combobox, ComboboxAction, ComboboxContent, ComboboxEmpty, ComboboxField, ComboboxFieldController, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLoading, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfirmDialog, DatePickerField, DatePickerFieldController, DateTimePickerField, DateTimePickerFieldController, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyDisplay, ErrorDisplay, ErrorableLoader, FormActionBar, FormControl, FormDescription, FormItem, FormLabel, FormMessage, Input, InputField, InputFieldController, Label, Loader$1 as Loader, MultiCombobox, MultiComboboxContent, MultiComboboxEmpty, MultiComboboxField, MultiComboboxFieldController, MultiComboboxGroup, MultiComboboxInput, MultiComboboxItem, MultiSwitchField, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuItemWithLink, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NavigationTabs, NavigationTabsItem, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, RecordView, RecordViewActions, RecordViewItem, RecordViewItemList, ScrollArea, ScrollBar, SectionList, SectionListSection, SectionListSectionContent, SectionListSectionDescription, SectionListSectionHeader, SectionListSectionTitle, Select, SelectContent, SelectField, SelectFieldController, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarLayout, SidebarLayoutContent, SidebarLayoutSidebar, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Switch, SwitchField, SwitchFieldController, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, TextareaField, TextareaFieldController, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cn$1 as cn, genericForwardRef, inputVariants, mergeRefs, navigationMenuTriggerStyle, selectCheckVariants, selectContentVariants, selectItemVariants, selectTriggerVariants, toast, useComboboxContext, useConfirmDialog, useControlledState, useControllerMerged, useDebounce, useEventCallback, useFormField, useMultiComboboxContext, useSidebar };
|
|
24080
|
+
//# sourceMappingURL=ui-components-CjIA8Av2.js.map
|