slice-machine-ui 1.26.1-beta.2 → 1.26.1-beta.20
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/.eslintrc.js +6 -1
- package/.storybook/preview.tsx +2 -1
- package/out/404.html +1 -1
- package/out/_next/static/aa7R_XjeTBeGJoT6HrJb4/_buildManifest.js +1 -0
- package/out/_next/static/chunks/127-6451528762141246.js +1 -0
- package/out/_next/static/chunks/{183-ebd633fed7c74545.js → 183-6ad1d7303abecd2b.js} +1 -1
- package/out/_next/static/chunks/18539003-8854ec97730b0755.js +22 -0
- package/out/_next/static/chunks/569-2ae3e9666f3bf991.js +1 -0
- package/out/_next/static/chunks/614-873c38acd991869b.js +1 -0
- package/out/_next/static/chunks/756-61dc56b98d01e964.js +10 -0
- package/out/_next/static/chunks/90-2d4bdae13d031364.js +1 -0
- package/out/_next/static/chunks/91-717d764a224ac07f.js +1 -0
- package/out/_next/static/chunks/96-d28e81d2b1c10a08.js +1 -0
- package/out/_next/static/chunks/pages/_app-d2bb4f9b121e3de8.js +530 -0
- package/out/_next/static/chunks/pages/changelog-042822d12df57669.js +1 -0
- package/out/_next/static/chunks/pages/changes-194f6cf187fa6ee7.js +1 -0
- package/out/_next/static/chunks/pages/custom-types/[customTypeId]-ff73a06702296c34.js +1 -0
- package/out/_next/static/chunks/pages/{custom-types-3c8e721ec6802127.js → custom-types-900b40b54b74e6d6.js} +1 -1
- package/out/_next/static/chunks/pages/{index-cf93d16e9c63b6db.js → index-ccd2975faba412f6.js} +1 -1
- package/out/_next/static/chunks/pages/labs-7a4fe64cb86b59e8.js +1 -0
- package/out/_next/static/chunks/pages/page-types/[pageTypeId]-30d471f6127ebed7.js +1 -0
- package/out/_next/static/chunks/pages/settings-419384d4d43070c2.js +1 -0
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-9bdb355306fca592.js +1 -0
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-afbfff837c3dc4dd.js +1 -0
- package/out/_next/static/chunks/pages/slices-98f88ac46b6ad58b.js +1 -0
- package/out/_next/static/css/22f264c93bd9d85f.css +1 -0
- package/out/_next/static/css/321d78460d2d69bc.css +1 -0
- package/out/_next/static/css/a686f7612f1943ed.css +1 -0
- package/out/_next/static/css/c47241940651ef2f.css +1 -0
- package/out/_next/static/css/dc201720b301472d.css +1 -0
- package/out/_next/static/css/e5745b5b0494af29.css +1 -0
- package/out/changelog.html +1 -1
- package/out/changes.html +1 -1
- package/out/custom-types/[customTypeId].html +1 -1
- package/out/custom-types.html +1 -1
- package/out/index.html +1 -1
- package/out/labs.html +1 -1
- package/out/page-types/[pageTypeId].html +1 -1
- package/out/settings.html +1 -1
- package/out/slices/[lib]/[sliceName]/[variation]/simulator.html +1 -1
- package/out/slices/[lib]/[sliceName]/[variation].html +1 -1
- package/out/slices.html +1 -1
- package/package.json +10 -8
- package/sentry.client.config.ts +2 -1
- package/src/ErrorBoundary.tsx +1 -1
- package/src/apiClient.ts +13 -9
- package/src/components/BaseHoverCard/BaseHoverCard.stories.tsx +1 -1
- package/src/components/BaseHoverCard/BaseHoverCard.test.tsx +1 -1
- package/src/components/BaseHoverCard/BaseHoverCard.tsx +1 -1
- package/src/components/BlankSlate/BlankSlate.module.css +74 -0
- package/src/components/BlankSlate/BlankSlate.module.css.d.ts +13 -0
- package/src/components/BlankSlate/BlankSlate.stories.tsx +1 -1
- package/src/components/BlankSlate/BlankSlate.tsx +1 -1
- package/src/components/BlankSlate/index.ts +1 -1
- package/src/components/Breadcrumb/Breadcrumb.module.css +11 -0
- package/src/components/Breadcrumb/Breadcrumb.module.css.d.ts +6 -0
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +34 -0
- package/src/components/Breadcrumb/Breadcrumb.tsx +43 -25
- package/src/components/Breadcrumb/index.ts +1 -1
- package/src/components/Card/Card.stories.tsx +3 -3
- package/src/components/Card/Card.tsx +3 -2
- package/src/components/CodeBlock/CodeBlock.module.css +46 -0
- package/src/components/CodeBlock/CodeBlock.module.css.d.ts +10 -0
- package/src/components/CodeBlock/CodeBlock.tsx +7 -7
- package/src/components/ContentTabs/ContentTabs.module.css +60 -0
- package/src/components/ContentTabs/ContentTabs.module.css.d.ts +12 -0
- package/src/components/ContentTabs/ContentTabs.tsx +2 -2
- package/src/components/Count/Count.tsx +1 -1
- package/src/components/Divider/Divider.module.css +23 -0
- package/src/components/Divider/Divider.module.css.d.ts +7 -0
- package/src/components/Divider/Divider.stories.tsx +3 -4
- package/src/components/Divider/Divider.tsx +5 -8
- package/src/components/HoverCard/HoverCard.module.css +79 -0
- package/src/components/HoverCard/HoverCard.module.css.d.ts +13 -0
- package/src/components/HoverCard/HoverCard.stories.tsx +3 -2
- package/src/components/HoverCard/HoverCard.test.tsx +2 -2
- package/src/components/HoverCard/HoverCard.tsx +3 -3
- package/src/components/HoverCard/index.ts +3 -3
- package/src/components/PageLayout/PageLayout.module.css +1 -1
- package/src/components/SideNav/SideNav.module.css +1 -1
- package/src/components/SideNav/SideNav.stories.tsx +6 -6
- package/src/components/SideNav/SideNav.tsx +8 -8
- package/src/components/SideNav/SideNavEnvironmentSelector.tsx +10 -12
- package/src/components/Table/Table.stories.tsx +2 -2
- package/src/components/Table/Table.test.tsx +2 -2
- package/src/components/Table/Table.tsx +2 -2
- package/src/components/Table/index.ts +1 -1
- package/src/components/TextLink/TextLink.module.css +58 -0
- package/src/components/TextLink/TextLink.module.css.d.ts +11 -0
- package/src/components/TextLink/TextLink.stories.tsx +1 -1
- package/src/components/TextLink/TextLink.tsx +5 -5
- package/src/domain/__tests__/customType.test.ts +1 -186
- package/src/domain/__tests__/group.test.ts +161 -0
- package/src/domain/__tests__/slice.test.ts +41 -0
- package/src/domain/customType.ts +1 -193
- package/src/domain/group.ts +89 -0
- package/src/domain/slice.ts +53 -12
- package/src/features/autoSave/AutoSaveStatusIndicator.tsx +2 -2
- package/src/features/changelog/useSliceMachineLatestNonBreakingVersion.ts +1 -1
- package/src/features/changelog/useSliceMachineReleaseNotes.ts +1 -1
- package/src/features/changelog/useSliceMachineVersions.ts +2 -2
- package/src/features/changes/BlankSlates/NoChangesBlankSlate.tsx +11 -14
- package/src/features/changes/PushChangesButton.tsx +5 -5
- package/src/features/changes/StatusBadge.tsx +2 -2
- package/src/features/customTypes/EditDropdown.tsx +6 -9
- package/src/features/customTypes/PageTypeOnboarding.tsx +5 -5
- package/src/features/customTypes/__tests__/CustomTypeBuilderPage.test.tsx +16 -18
- package/src/features/customTypes/__tests__/CustomTypesTablePage.test.tsx +11 -10
- package/src/features/customTypes/actions/convertCustomToPageType.ts +4 -4
- package/src/features/customTypes/actions/createCustomType.ts +5 -5
- package/src/features/customTypes/actions/deleteCustomType.ts +3 -3
- package/src/features/customTypes/actions/renameCustomType.ts +3 -3
- package/src/features/customTypes/customTypesBuilder/CustomTypeProvider.tsx +8 -8
- package/src/features/customTypes/customTypesBuilder/CustomTypesBuilderPage.tsx +25 -15
- package/src/features/customTypes/customTypesBuilder/PageSnippetDialog/PageSnippetDialog.tsx +7 -7
- package/src/features/customTypes/customTypesBuilder/SliceZoneBlankSlate.tsx +3 -3
- package/src/features/customTypes/customTypesBuilder/useCustomType.ts +1 -1
- package/src/features/customTypes/customTypesConfig.ts +2 -2
- package/src/features/customTypes/customTypesTable/CustomTypesTable.tsx +16 -16
- package/src/features/customTypes/customTypesTable/CustomTypesTablePage.tsx +19 -20
- package/src/features/customTypes/customTypesTable/useCustomTypes.ts +8 -8
- package/src/features/documentation/MarkdownRenderer/index.tsx +5 -6
- package/src/features/documentation/useDocumentation.ts +1 -1
- package/src/features/environments/actions/getActiveEnvironment.ts +1 -1
- package/src/features/environments/actions/getEnvironments.ts +1 -1
- package/src/features/environments/actions/setEnvironment.ts +3 -3
- package/src/features/inAppGuide/InAppGuideContext.tsx +2 -2
- package/src/features/inAppGuide/InAppGuideDialog.tsx +4 -4
- package/src/features/inAppGuide/inAppGuideContent.tsx +4 -4
- package/src/features/labs/labsList/LabsList.tsx +2 -2
- package/src/features/labs/labsList/LabsListItem.tsx +1 -1
- package/src/features/labs/labsList/LabsPage.tsx +8 -5
- package/src/features/labs/labsList/useLab.tsx +1 -1
- package/src/features/settings/SettingsPage.tsx +7 -4
- package/src/features/settings/git/ConnectGitRepository.tsx +9 -9
- package/src/features/settings/git/GitOwnerSelect.tsx +1 -1
- package/src/features/settings/git/GitProvider.ts +4 -4
- package/src/features/settings/git/GitProviderConnectButtons.tsx +1 -1
- package/src/features/settings/git/GitRepositoriesList.tsx +5 -5
- package/src/features/settings/git/GitRepositoriesSearch.tsx +5 -5
- package/src/features/settings/git/GitRepositoryConnectDialog.tsx +5 -8
- package/src/features/settings/git/useGitIntegrationExperiment.ts +1 -1
- package/src/features/settings/git/useGitOwners.ts +1 -1
- package/src/features/settings/git/useGitRepos.ts +1 -1
- package/src/features/settings/git/useLinkedGitRepos.ts +2 -2
- package/src/features/settings/git/useWriteAPIToken.ts +2 -2
- package/src/features/slices/actions/addSlicesToSliceZone.ts +2 -2
- package/src/features/slices/actions/createSlice.ts +5 -5
- package/src/features/slices/actions/deleteSlice.ts +1 -1
- package/src/features/slices/actions/renameSlice.ts +4 -4
- package/src/features/slices/actions/uploadSliceScreenshot.ts +2 -2
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceAsNewSliceDialog.tsx +10 -10
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceAsNewVariationDialog.tsx +7 -7
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceButton.module.css +14 -0
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceButton.module.css.d.ts +6 -0
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceButton.tsx +12 -12
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceMergeWithIdenticalDialog.tsx +5 -8
- package/src/features/slices/convertLegacySlice/types.ts +2 -2
- package/src/features/slices/sliceBuilder/FloatingBackButton.tsx +6 -6
- package/src/features/slices/sliceBuilder/SliceBuilderProvider.tsx +9 -9
- package/src/features/slices/sliceBuilder/actions/deleteVariation.ts +4 -4
- package/src/features/slices/sliceBuilder/actions/renameVariation.ts +3 -3
- package/src/features/slices/sliceBuilder/useGroupsInSlicesExperiment.ts +8 -0
- package/src/features/slices/sliceCards/NonSharedSliceCard.tsx +4 -4
- package/src/features/slices/sliceCards/SharedSliceCard.tsx +7 -7
- package/src/features/slicesTemplates/actions/createSlicesTemplates.ts +2 -2
- package/src/features/slicesTemplates/useSlicesTemplates.ts +2 -1
- package/src/features/sync/AutoSyncProvider.tsx +17 -17
- package/src/features/sync/actions/pushChanges.ts +4 -3
- package/src/features/sync/actions/trackPushChangesSuccess.ts +3 -3
- package/src/features/sync/components/AutoSyncStatusIndicator.module.css +1 -1
- package/src/features/sync/components/AutoSyncStatusIndicator.tsx +4 -4
- package/src/features/sync/fetchUnSyncChanges.ts +5 -5
- package/src/features/sync/getUnSyncChanges.ts +9 -9
- package/src/features/sync/useUnSyncChanges.ts +5 -5
- package/src/hooks/useActionQueue.tsx +5 -5
- package/src/hooks/useAdapterName.ts +1 -1
- package/src/hooks/useAuthStatus.ts +2 -2
- package/src/hooks/useCurrentSlice.tsx +4 -4
- package/src/hooks/useEditorContent.ts +5 -4
- package/src/hooks/useExperimentVariant.ts +2 -2
- package/src/hooks/useIsEmptyProject.ts +1 -1
- package/src/hooks/useRepositoryInformation.ts +2 -2
- package/src/hooks/useRouteChange.tsx +1 -1
- package/src/hooks/useSMTracker.ts +6 -6
- package/src/hooks/useScreenshotChangesModal.ts +4 -3
- package/src/hooks/useServerState.ts +4 -4
- package/src/hooks/useSliceMachineConfig.ts +2 -2
- package/src/hooks/useSliceMachineRunningVersion.ts +1 -1
- package/src/hooks/useThrottle.ts +1 -1
- package/src/hooks/useUpdateAvailable.ts +1 -1
- package/src/hooks/useWindowDimensions.ts +1 -1
- package/src/hooks/useWindowSize.ts +2 -1
- package/{components → src/legacy/components}/App/index.tsx +8 -8
- package/{components → src/legacy/components}/AppLayout/index.tsx +6 -7
- package/{components → src/legacy/components}/AuthInstructions/index.jsx +1 -1
- package/{components → src/legacy/components}/Button/index.tsx +1 -2
- package/{components → src/legacy/components}/Card/Default.jsx +2 -1
- package/{components → src/legacy/components}/Card/Preview.jsx +1 -1
- package/{components → src/legacy/components}/Card/WithTabs/index.jsx +4 -3
- package/{components → src/legacy/components}/Card/index.tsx +1 -0
- package/{components → src/legacy/components}/Changelog/index.tsx +8 -8
- package/{components → src/legacy/components}/Changelog/navigation/VersionBadge.tsx +2 -1
- package/{components → src/legacy/components}/Changelog/navigation/VersionTag.tsx +1 -0
- package/{components → src/legacy/components}/Changelog/navigation/index.tsx +6 -6
- package/{components → src/legacy/components}/Changelog/versionDetails/UpdateCommandBox.tsx +6 -6
- package/{components → src/legacy/components}/Changelog/versionDetails/VersionKindLabel.tsx +3 -4
- package/{components → src/legacy/components}/Changelog/versionDetails/index.tsx +5 -5
- package/{components → src/legacy/components}/ChangesEmptyState/AuthErrorPage.tsx +5 -5
- package/{components → src/legacy/components}/ChangesItems/ChangesItems.tsx +14 -14
- package/{components → src/legacy/components}/ChangesItems/DevCollaborationExperiment.tsx +3 -3
- package/{components → src/legacy/components}/CodeBlock/index.tsx +3 -3
- package/{components → src/legacy/components}/ConfigErrors/index.jsx +4 -3
- package/{components → src/legacy/components}/CustomTypeTable/changesPage.tsx +9 -8
- package/{components → src/legacy/components}/DeleteCTModal/index.tsx +9 -9
- package/{components → src/legacy/components}/DeleteDocumentsDrawer/AssociatedDocumentsCard.tsx +4 -4
- package/{components → src/legacy/components}/DeleteDocumentsDrawer/HardDeleteDocumentsDrawer.tsx +9 -9
- package/{components → src/legacy/components}/DeleteDocumentsDrawer/SoftDeleteDocumentsDrawer.tsx +9 -8
- package/{components → src/legacy/components}/DeleteSliceModal/index.tsx +6 -6
- package/{components → src/legacy/components}/DeleteVariationModal/index.tsx +6 -6
- package/{components → src/legacy/components}/DropDownSelector/index.tsx +2 -4
- package/{components → src/legacy/components}/EmptyState/index.tsx +3 -3
- package/{components → src/legacy/components}/FormFields/Array.jsx +2 -4
- package/{components → src/legacy/components}/FormFields/Checkbox.jsx +1 -1
- package/{components → src/legacy/components}/FormFields/CheckboxControl.jsx +1 -1
- package/{components → src/legacy/components}/FormFields/Input.tsx +3 -2
- package/{components → src/legacy/components}/FormFields/SelectDefaultValue.jsx +1 -1
- package/{components → src/legacy/components}/Forms/CreateCustomTypeModal/CreateCustomTypeModal.tsx +18 -18
- package/{components → src/legacy/components}/Forms/CreateSliceModal/CreateSliceModal.tsx +10 -10
- package/{components → src/legacy/components}/Forms/RenameCustomTypeModal/RenameCustomTypeModal.tsx +12 -12
- package/{components → src/legacy/components}/Forms/RenameSliceModal/RenameSliceModal.tsx +8 -8
- package/src/legacy/components/Forms/RenameVariationModal/RenameVariationModal.module.css +5 -0
- package/src/legacy/components/Forms/RenameVariationModal/RenameVariationModal.module.css.d.ts +5 -0
- package/{components → src/legacy/components}/Forms/RenameVariationModal/RenameVariationModal.tsx +7 -7
- package/{components → src/legacy/components}/Forms/components/InputBox.tsx +2 -2
- package/{components → src/legacy/components}/Forms/components/SelectRepeatable.tsx +4 -3
- package/{components → src/legacy/components}/Forms/formsValidator.ts +6 -4
- package/{components → src/legacy/components}/FullPage/index.tsx +1 -1
- package/{components → src/legacy/components}/ListItem/Header.tsx +3 -2
- package/{components → src/legacy/components}/ListItem/index.tsx +8 -10
- package/{components → src/legacy/components}/LoadingPage/index.tsx +1 -0
- package/{components → src/legacy/components}/LoginModal/index.tsx +22 -22
- package/{components → src/legacy/components}/ModalFormCard/index.tsx +7 -6
- package/{components → src/legacy/components}/Navigation/ChangesItem.tsx +18 -16
- package/{components → src/legacy/components}/Navigation/Environment.tsx +13 -13
- package/{components → src/legacy/components}/Navigation/RunningVersion.tsx +2 -2
- package/{components → src/legacy/components}/Navigation/UpdateBox.tsx +3 -3
- package/src/legacy/components/Navigation/VideoItem.module.css.d.ts +5 -0
- package/{components → src/legacy/components}/Navigation/VideoItem.tsx +14 -13
- package/src/legacy/components/Navigation/index.module.css +3 -0
- package/src/legacy/components/Navigation/index.module.css.d.ts +5 -0
- package/{components → src/legacy/components}/Navigation/index.test.tsx +12 -12
- package/{components → src/legacy/components}/Navigation/index.tsx +20 -21
- package/{components → src/legacy/components}/ReviewModal/ReviewForm.tsx +12 -12
- package/{components → src/legacy/components}/ReviewModal/ReviewModal.tsx +6 -6
- package/{components → src/legacy/components}/ScreenshotChangesModal/VariationDropZone.tsx +7 -7
- package/{components → src/legacy/components}/ScreenshotChangesModal/index.tsx +12 -15
- package/{components → src/legacy/components}/ScreenshotChangesModal/useCustomScreenshot.tsx +1 -1
- package/{components → src/legacy/components}/ScreenshotPreviewModal/index.tsx +8 -7
- package/{components → src/legacy/components}/Simulator/components/FailedConnect/index.tsx +3 -3
- package/{components → src/legacy/components}/Simulator/components/Header/VariationsPopover/MenuList.tsx +2 -1
- package/{components → src/legacy/components}/Simulator/components/Header/VariationsPopover/index.tsx +4 -5
- package/{components → src/legacy/components}/Simulator/components/Header/index.tsx +7 -7
- package/{components → src/legacy/components}/Simulator/components/IframeRenderer/index.tsx +3 -4
- package/{components → src/legacy/components}/Simulator/components/Toolbar/ScreensizeInput/index.tsx +2 -1
- package/{components → src/legacy/components}/Simulator/components/Toolbar/index.tsx +4 -5
- package/{components → src/legacy/components}/Simulator/index.tsx +25 -30
- package/{components → src/legacy/components}/SliceMachineDrawer/index.tsx +3 -2
- package/{components → src/legacy/components}/ToasterContainer/index.tsx +3 -5
- package/{components → src/legacy/components}/Tooltip/TextWithTooltip.tsx +2 -2
- package/{components → src/legacy/components}/Tooltip/index.jsx +2 -2
- package/{components → src/legacy/components}/Warnings/index.jsx +1 -1
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/DeleteSliceZoneModal.tsx +4 -4
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/List.tsx +8 -8
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/SlicesTemplatesModal.tsx +11 -11
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/UpdateSliceZoneModal.tsx +3 -3
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/UpdateSliceZoneModalList.tsx +4 -3
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/index.tsx +26 -23
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/sliceTemplatesComingSoon.ts +1 -1
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/TabModal/InputBox.tsx +1 -1
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/TabModal/create.tsx +2 -1
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/TabModal/delete.tsx +2 -2
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/TabModal/update.tsx +3 -2
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/TabZone/index.tsx +32 -32
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/index.tsx +5 -5
- package/src/legacy/lib/builders/SliceBuilder/FieldZones/index.tsx +273 -0
- package/{lib → src/legacy/lib}/builders/SliceBuilder/Sidebar/AddVariationModal.tsx +7 -7
- package/{lib → src/legacy/lib}/builders/SliceBuilder/Sidebar/index.tsx +12 -12
- package/{lib → src/legacy/lib}/builders/SliceBuilder/SimulatorButton/index.tsx +12 -11
- package/{lib → src/legacy/lib}/builders/SliceBuilder/index.tsx +13 -9
- package/{lib → src/legacy/lib}/builders/common/EditModal/Field.jsx +3 -5
- package/{lib → src/legacy/lib}/builders/common/EditModal/Form.jsx +1 -1
- package/{lib → src/legacy/lib}/builders/common/EditModal/index.jsx +14 -16
- package/{lib → src/legacy/lib}/builders/common/SelectFieldTypeModal/index.jsx +3 -4
- package/{lib → src/legacy/lib}/builders/common/Zone/Card/components/ErrorTooltip.tsx +2 -2
- package/{lib → src/legacy/lib}/builders/common/Zone/Card/components/Hints/CodeBlock.tsx +4 -5
- package/{lib → src/legacy/lib}/builders/common/Zone/Card/components/Hints/index.tsx +2 -1
- package/{lib → src/legacy/lib}/builders/common/Zone/Card/components/NewField.tsx +16 -13
- package/{lib → src/legacy/lib}/builders/common/Zone/Card/index.jsx +15 -9
- package/{lib → src/legacy/lib}/builders/common/Zone/components/EmptyState/index.tsx +2 -2
- package/{lib → src/legacy/lib}/builders/common/Zone/index.jsx +7 -10
- package/{lib → src/legacy/lib}/builders/utils/index.ts +1 -1
- package/{lib → src/legacy/lib}/forms/fields.ts +1 -2
- package/{lib → src/legacy/lib}/forms/index.ts +1 -0
- package/{lib → src/legacy/lib}/models/common/CustomType/index.ts +5 -4
- package/{lib → src/legacy/lib}/models/common/CustomType/sliceZone.ts +2 -1
- package/{lib → src/legacy/lib}/models/common/DeprecatedMockConfigMessage.tsx +3 -2
- package/{lib → src/legacy/lib}/models/common/Environment.ts +2 -2
- package/{lib → src/legacy/lib}/models/common/Group.ts +3 -2
- package/{lib → src/legacy/lib}/models/common/Library.ts +2 -1
- package/{lib → src/legacy/lib}/models/common/LibraryUI.ts +1 -1
- package/{lib → src/legacy/lib}/models/common/ModelData.ts +3 -3
- package/{lib → src/legacy/lib}/models/common/ModelStatus/compareCustomTypeModels.ts +2 -1
- package/{lib → src/legacy/lib}/models/common/ModelStatus/compareSliceModels.ts +2 -1
- package/{lib → src/legacy/lib}/models/common/ModelStatus/index.ts +10 -9
- package/{lib → src/legacy/lib}/models/common/Slice.ts +19 -5
- package/{lib → src/legacy/lib}/models/common/normalizers/customType.ts +2 -2
- package/{lib → src/legacy/lib}/models/common/normalizers/slices.ts +3 -2
- package/{lib → src/legacy/lib}/models/common/widgets/Boolean/index.ts +5 -7
- package/{lib → src/legacy/lib}/models/common/widgets/Color/index.ts +2 -3
- package/{lib → src/legacy/lib}/models/common/widgets/ContentRelationship/Form.tsx +9 -10
- package/{lib → src/legacy/lib}/models/common/widgets/ContentRelationship/index.ts +7 -7
- package/{lib → src/legacy/lib}/models/common/widgets/GeoPoint/index.ts +2 -3
- package/{lib → src/legacy/lib}/models/common/widgets/Group/Form.jsx +6 -6
- package/{lib → src/legacy/lib}/models/common/widgets/Group/ListItem/index.jsx +63 -76
- package/{lib → src/legacy/lib}/models/common/widgets/Group/index.ts +6 -4
- package/{lib → src/legacy/lib}/models/common/widgets/Image/Form.tsx +9 -11
- package/{lib → src/legacy/lib}/models/common/widgets/Image/components.tsx +6 -5
- package/{lib → src/legacy/lib}/models/common/widgets/Image/index.ts +3 -5
- package/{lib → src/legacy/lib}/models/common/widgets/Link/Form.jsx +5 -7
- package/{lib → src/legacy/lib}/models/common/widgets/LinkToMedia/Form.jsx +4 -6
- package/{lib → src/legacy/lib}/models/common/widgets/LinkToMedia/index.ts +4 -4
- package/{lib → src/legacy/lib}/models/common/widgets/Select/FormFields.jsx +7 -7
- package/{lib → src/legacy/lib}/models/common/widgets/Select/index.ts +3 -6
- package/{lib → src/legacy/lib}/models/common/widgets/StructuredText/Form.tsx +12 -11
- package/{lib → src/legacy/lib}/models/common/widgets/StructuredText/index.ts +3 -6
- package/{lib → src/legacy/lib}/models/common/widgets/StructuredText/options.tsx +2 -2
- package/{lib → src/legacy/lib}/models/common/widgets/Timestamp/index.ts +4 -5
- package/{lib → src/legacy/lib}/models/common/widgets/UID/index.ts +4 -5
- package/{lib → src/legacy/lib}/models/common/widgets/Widget.ts +3 -1
- package/src/legacy/lib/models/common/widgets/groupBuilderArray.ts +18 -0
- package/src/legacy/lib/models/common/widgets/sliceBuilderArray.ts +19 -0
- package/src/legacy/lib/models/common/widgets/withGroup.ts +2 -0
- package/{lib → src/legacy/lib}/models/server/ServerState.ts +4 -3
- package/{lib → src/legacy/lib}/utils/index.ts +4 -5
- package/{lib → src/legacy/lib}/utils/shared/customTypes.ts +1 -1
- package/src/modules/availableCustomTypes/index.ts +15 -13
- package/src/modules/availableCustomTypes/types.ts +2 -2
- package/src/modules/environment/index.ts +10 -8
- package/src/modules/environment/types.ts +1 -1
- package/src/modules/loading/index.ts +3 -2
- package/src/modules/modal/index.ts +4 -2
- package/src/modules/slices/index.ts +13 -9
- package/src/modules/slices/selector.ts +1 -1
- package/src/modules/slices/types.ts +2 -2
- package/src/modules/useSliceMachineActions.ts +25 -20
- package/src/modules/userContext/index.ts +5 -3
- package/{pages → src/pages}/_app.tsx +23 -25
- package/{pages → src/pages}/changelog.tsx +1 -1
- package/{pages → src/pages}/changes.tsx +25 -19
- package/src/pages/custom-types/[customTypeId].tsx +1 -0
- package/{pages → src/pages}/custom-types.tsx +1 -1
- package/{pages → src/pages}/index.tsx +3 -3
- package/src/pages/labs.tsx +1 -0
- package/src/pages/page-types/[pageTypeId].tsx +1 -0
- package/src/pages/settings.tsx +1 -0
- package/{pages → src/pages}/slices/[lib]/[sliceName]/[variation]/index.tsx +3 -3
- package/{pages → src/pages}/slices/[lib]/[sliceName]/[variation]/simulator.tsx +2 -2
- package/{pages → src/pages}/slices.tsx +24 -21
- package/src/redux/reducer.ts +8 -7
- package/src/redux/store.ts +8 -6
- package/src/redux/type.ts +7 -6
- package/src/theme.ts +1 -2
- package/src/utils/getContentTypeForTracking.ts +21 -0
- package/test/__setup__.ts +12 -7
- package/test/__testutils__/createTestPlugin.ts +3 -2
- package/test/__testutils__/createTestProject.ts +5 -4
- package/test/__testutils__/index.tsx +6 -5
- package/test/__testutils__/mockAWSACLAPI.ts +1 -1
- package/test/__testutils__/mockCustomTypesAPI.ts +1 -1
- package/test/__testutils__/mockPrismicAuthAPI.ts +1 -1
- package/test/__testutils__/mockPrismicUserAPI.ts +2 -3
- package/test/__testutils__/readMSWFormData.ts +1 -1
- package/test/components/IframeRenderer.test.ts +3 -2
- package/test/lib/builders/EditModal.test.tsx +5 -3
- package/test/lib/builders/buildersUtils.test.ts +3 -3
- package/test/lib/consts.test.ts +6 -2
- package/test/lib/models/common/CustomType.test.ts +6 -2
- package/test/lib/models/common/ModelStatus.test.ts +6 -4
- package/test/lib/models/common/Slice.test.ts +3 -2
- package/test/lib/models/common/widgets/index.test.ts +8 -4
- package/test/lib/utils/index.test.ts +3 -2
- package/test/lib/utils/preferWroomBase.test.ts +3 -2
- package/test/lib/utils/shared/customTypes.test.ts +2 -1
- package/test/pages/slices.test.tsx +10 -10
- package/test/src/modules/__fixtures__/serverState.ts +3 -3
- package/test/src/modules/__fixtures__/sliceUtilsFactory.ts +3 -3
- package/test/src/modules/availableCustomTypes/index.test.ts +3 -3
- package/test/src/modules/environment.test.ts +3 -5
- package/test/src/modules/loading.test.ts +3 -3
- package/test/src/modules/modal.test.ts +5 -5
- package/test/src/modules/slices.test.ts +3 -2
- package/test/src/modules/userContext.test.ts +3 -3
- package/test/src/normalizers/customType.test.ts +16 -3
- package/test/src/utils/fieldNameCreator.test.ts +1 -1
- package/tsconfig.json +1 -6
- package/vite.config.ts +5 -10
- package/components/Forms/RenameVariationModal/RenameVariationModal.css.ts +0 -7
- package/components/Navigation/index.css.ts +0 -5
- package/lib/builders/SliceBuilder/FieldZones/index.tsx +0 -216
- package/lib/models/common/widgets/sliceBuilderArray.ts +0 -31
- package/lib/models/common/widgets/withGroup.ts +0 -20
- package/out/_next/static/M7hTqxKEI7x7a09i22lAK/_buildManifest.js +0 -1
- package/out/_next/static/chunks/18539003-a5a5d48f20a7b261.js +0 -97
- package/out/_next/static/chunks/25-792af14760d9df34.js +0 -1
- package/out/_next/static/chunks/286-e0950c3083c672e8.js +0 -1
- package/out/_next/static/chunks/318-d6f1200138628ec3.js +0 -1
- package/out/_next/static/chunks/46-d22d7a121254e31d.js +0 -8
- package/out/_next/static/chunks/727-2c302be2def92786.js +0 -1
- package/out/_next/static/chunks/799-7b910b896ff60ebe.js +0 -1
- package/out/_next/static/chunks/904-c9221a5cb09524e8.js +0 -1
- package/out/_next/static/chunks/pages/_app-7c41eb6cdd942b9e.js +0 -436
- package/out/_next/static/chunks/pages/changelog-5c9ac93faf0df06b.js +0 -1
- package/out/_next/static/chunks/pages/changes-3e4989e09fd412a8.js +0 -1
- package/out/_next/static/chunks/pages/custom-types/[customTypeId]-d1a4a07e6b600fa6.js +0 -1
- package/out/_next/static/chunks/pages/labs-6f5925cd6cdcee9e.js +0 -1
- package/out/_next/static/chunks/pages/page-types/[pageTypeId]-a724ff12ef322020.js +0 -1
- package/out/_next/static/chunks/pages/settings-f0620e5b727cda03.js +0 -1
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-01d67e97cb901e46.js +0 -1
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-8d7043e6638d65cd.js +0 -1
- package/out/_next/static/chunks/pages/slices-77cff50b1df13579.js +0 -1
- package/out/_next/static/css/238631d146c5ed97.css +0 -1
- package/out/_next/static/css/72465cc1225f28a2.css +0 -1
- package/out/_next/static/css/838fd8bb5a7c32b0.css +0 -1
- package/out/_next/static/css/b22c0750c14cc089.css +0 -1
- package/out/_next/static/css/be1f49e49a5aa7eb.css +0 -1
- package/out/_next/static/css/f8eb526e10bc2441.css +0 -1
- package/pages/custom-types/[customTypeId].tsx +0 -1
- package/pages/labs.tsx +0 -1
- package/pages/page-types/[pageTypeId].tsx +0 -1
- package/pages/settings.tsx +0 -1
- package/src/components/BlankSlate/BlankSlate.css.ts +0 -96
- package/src/components/Breadcrumb/Breadcrumb.css.ts +0 -5
- package/src/components/Breadcrumb/Breadcrumb.stories.ts +0 -32
- package/src/components/CodeBlock/CodeBlock.css.ts +0 -37
- package/src/components/ContentTabs/ContentTabs.css.ts +0 -49
- package/src/components/Divider/Divider.css.ts +0 -31
- package/src/components/HoverCard/HoverCard.css.ts +0 -105
- package/src/components/TextLink/TextLink.css.ts +0 -65
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceButton.css.ts +0 -15
- package/out/_next/static/{M7hTqxKEI7x7a09i22lAK → aa7R_XjeTBeGJoT6HrJb4}/_ssgManifest.js +0 -0
- package/{components → src/legacy/components}/Card/CardBox.tsx +0 -0
- package/{components → src/legacy/components}/Card/WithTabs/components.jsx +1 -1
- package/{components → src/legacy/components}/Changelog/versionDetails/ReleaseNotesDetails.tsx +1 -1
- package/{components → src/legacy/components}/ChangesEmptyState/OfflinePage.tsx +1 -1
- package/{components → src/legacy/components}/ChangesEmptyState/index.ts +1 -1
- package/{components → src/legacy/components}/ChangesItems/ErrorBanner.tsx +1 -1
- package/{components → src/legacy/components}/ChangesItems/index.ts +0 -0
- package/{components → src/legacy/components}/ChangesSectionHeader/ChangesSectionHeader.tsx +0 -0
- package/{components → src/legacy/components}/ChangesSectionHeader/index.ts +0 -0
- package/{components → src/legacy/components}/DeleteDocumentsDrawer/index.tsx +1 -1
- package/{components → src/legacy/components}/DropDownSelector/MenuList.tsx +0 -0
- package/{components → src/legacy/components}/Flex/index.tsx +0 -0
- package/{components → src/legacy/components}/FormFields/index.ts +0 -0
- package/{components → src/legacy/components}/Forms/CreateCustomTypeModal/index.tsx +0 -0
- package/{components → src/legacy/components}/Forms/CreateSliceModal/index.tsx +0 -0
- package/{components → src/legacy/components}/Forms/RenameCustomTypeModal/index.ts +0 -0
- package/{components → src/legacy/components}/Forms/RenameSliceModal/index.ts +0 -0
- package/{components → src/legacy/components}/Forms/RenameVariationModal/index.ts +0 -0
- package/{components → src/legacy/components}/Forms/components/FlexCard.tsx +0 -0
- package/{components → src/legacy/components}/Forms/formsTypes.ts +0 -0
- package/{components → src/legacy/components}/Grid/index.tsx +0 -0
- package/{components → src/legacy/components}/InputDeleteIcon/index.jsx +1 -1
- package/{components → src/legacy/components}/ItemHeader/index.tsx +1 -1
- package/{components → src/legacy/components}/Li/index.tsx +0 -0
- package/{components → src/legacy/components}/ListItem/utils.js +0 -0
- package/{components → src/legacy/components}/MissingLibraries/index.tsx +0 -0
- package/{components → src/legacy/components}/Navigation/VideoItem.module.css +0 -0
- package/{components → src/legacy/components}/ReactTooltipPortal/index.tsx +0 -0
- package/{components → src/legacy/components}/ReviewModal/ReviewFormSelect.tsx +1 -1
- package/{components → src/legacy/components}/ReviewModal/index.ts +0 -0
- package/{components → src/legacy/components}/ScreenshotPreview/index.tsx +1 -1
- package/{components → src/legacy/components}/Simulator/components/FullPage/index.tsx +0 -0
- package/{components → src/legacy/components}/Simulator/components/Header/links.ts +0 -0
- package/{components → src/legacy/components}/SliceMachineIconButton/index.tsx +1 -1
- package/{components → src/legacy/components}/SliceMachineModal/index.tsx +1 -1
- package/{components → src/legacy/components}/WindowPortal/index.js +0 -0
- package/{components → src/legacy/components}/YoutubeEmbed/index.tsx +0 -0
- package/{lib → src/legacy/lib}/builders/common/SelectFieldTypeModal/FieldTypeCard.jsx +0 -0
- package/{lib → src/legacy/lib}/builders/common/Zone/Card/components/EditItem.jsx +0 -0
- package/{lib → src/legacy/lib}/consts.ts +0 -0
- package/{lib → src/legacy/lib}/env/sentry.ts +0 -0
- package/{lib → src/legacy/lib}/forms/defaults.ts +1 -1
- package/{lib → src/legacy/lib}/forms/types.ts +0 -0
- package/{lib → src/legacy/lib}/hljs/svelte.ts +0 -0
- package/{lib → src/legacy/lib}/models/common/Auth.ts +0 -0
- package/{lib → src/legacy/lib}/models/common/ComponentUI.ts +1 -1
- package/{lib → src/legacy/lib}/models/common/CustomType/tab.ts +4 -4
- package/{lib → src/legacy/lib}/models/common/ErrorWithStatus.ts +0 -0
- package/{lib → src/legacy/lib}/models/common/Fields.ts +1 -1
- package/{lib → src/legacy/lib}/models/common/Manifest.ts +0 -0
- package/{lib → src/legacy/lib}/models/common/PrismicData.ts +0 -0
- package/{lib → src/legacy/lib}/models/common/PrismicFile.ts +0 -0
- package/{lib → src/legacy/lib}/models/common/Screenshots.ts +0 -0
- package/{lib → src/legacy/lib}/models/common/Simulator.ts +0 -0
- package/{lib → src/legacy/lib}/models/common/Slices.ts +2 -2
- package/{lib → src/legacy/lib}/models/common/UserProfile.ts +0 -0
- package/{lib → src/legacy/lib}/models/common/Warning.ts +0 -0
- package/{lib → src/legacy/lib}/models/common/widgets/Date/index.ts +2 -2
- package/{lib → src/legacy/lib}/models/common/widgets/Embed/index.ts +2 -2
- package/{lib → src/legacy/lib}/models/common/widgets/Link/index.ts +3 -3
- package/{lib → src/legacy/lib}/models/common/widgets/Number/index.ts +2 -2
- package/{lib → src/legacy/lib}/models/common/widgets/Text/index.ts +5 -5
- package/{lib → src/legacy/lib}/models/common/widgets/ctBuilderArray.ts +0 -0
- package/{lib → src/legacy/lib}/models/common/widgets/index.ts +1 -1
- /package/{lib → src/legacy/lib}/prismic/endpoints.ts +0 -0
- /package/{lib → src/legacy/lib}/utils/poll.ts +0 -0
- /package/{lib → src/legacy/lib}/utils/preferWroomBase.ts +0 -0
- /package/{lib → src/legacy/lib}/utils/repo.ts +0 -0
- /package/{lib → src/legacy/lib}/utils/str.ts +0 -0
- /package/{pages → src/pages}/api/embed.js +0 -0
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import type { UrlObject } from "node:url";
|
|
2
|
+
|
|
1
3
|
import { findFocusableAncestor } from "@prismicio/editor-support/DOM";
|
|
2
4
|
import { Text } from "@prismicio/editor-ui";
|
|
3
5
|
import { clsx } from "clsx";
|
|
4
|
-
import type { UrlObject } from "node:url";
|
|
5
6
|
import {
|
|
7
|
+
createElement,
|
|
6
8
|
type CSSProperties,
|
|
7
9
|
type FC,
|
|
8
10
|
type HTMLAttributes,
|
|
@@ -10,7 +12,6 @@ import {
|
|
|
10
12
|
type MouseEvent,
|
|
11
13
|
type PropsWithChildren,
|
|
12
14
|
type ReactNode,
|
|
13
|
-
createElement,
|
|
14
15
|
} from "react";
|
|
15
16
|
|
|
16
17
|
import * as styles from "./Card.css";
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
.block {
|
|
2
|
+
all: unset;
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
font-family: var(--font-family-body);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.blockWithDisplayRevert {
|
|
8
|
+
composes: block;
|
|
9
|
+
display: revert;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.root {
|
|
13
|
+
composes: blockWithDisplayRevert;
|
|
14
|
+
border-width: 1px;
|
|
15
|
+
border-radius: 6px;
|
|
16
|
+
border-style: solid;
|
|
17
|
+
border-color: var(--grey6);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.header {
|
|
21
|
+
composes: block;
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
justify-content: space-between;
|
|
25
|
+
border-top-right-radius: 4px;
|
|
26
|
+
border-top-left-radius: 4px;
|
|
27
|
+
border-bottom-style: solid;
|
|
28
|
+
border-bottom-width: 1px;
|
|
29
|
+
background-color: var(--grey2);
|
|
30
|
+
border-bottom-color: var(--grey6);
|
|
31
|
+
padding-block: 4px;
|
|
32
|
+
padding-right: 4px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.fileInfo {
|
|
36
|
+
composes: block;
|
|
37
|
+
display: flex;
|
|
38
|
+
justify-content: space-between;
|
|
39
|
+
align-items: center;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.fileName {
|
|
43
|
+
composes: blockWithDisplayRevert;
|
|
44
|
+
font-size: calc(14rem / 16);
|
|
45
|
+
line-height: calc(32rem / 16);
|
|
46
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { IconButton, Text } from "@prismicio/editor-ui";
|
|
2
2
|
import { type ReactNode, useEffect, useState } from "react";
|
|
3
3
|
import { PrismLight as SyntaxHighlighter } from "react-syntax-highlighter";
|
|
4
|
-
import tsx from "react-syntax-highlighter/dist/cjs/languages/prism/tsx";
|
|
5
4
|
import markup from "react-syntax-highlighter/dist/cjs/languages/prism/markup";
|
|
5
|
+
import tsx from "react-syntax-highlighter/dist/cjs/languages/prism/tsx";
|
|
6
6
|
import { prism } from "react-syntax-highlighter/dist/cjs/styles/prism";
|
|
7
7
|
|
|
8
|
-
import { CodeIcon } from "
|
|
9
|
-
import { JavaScript } from "
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
8
|
+
import { CodeIcon } from "@/icons/CodeIcon";
|
|
9
|
+
import { JavaScript } from "@/icons/JavaScript";
|
|
10
|
+
import { Svelte } from "@/icons/Svelte";
|
|
11
|
+
import { TypeScript } from "@/icons/TypeScript";
|
|
12
|
+
import { Vue } from "@/icons/Vue";
|
|
13
13
|
|
|
14
|
-
import
|
|
14
|
+
import styles from "./CodeBlock.module.css";
|
|
15
15
|
|
|
16
16
|
SyntaxHighlighter.registerLanguage("tsx", tsx);
|
|
17
17
|
SyntaxHighlighter.registerLanguage("markup", markup);
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
.flex {
|
|
2
|
+
all: unset;
|
|
3
|
+
display: flex;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.column {
|
|
7
|
+
composes: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.root {
|
|
12
|
+
composes: column;
|
|
13
|
+
background-color: var(--grey1);
|
|
14
|
+
min-height: 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.list {
|
|
18
|
+
composes: flex;
|
|
19
|
+
border-bottom: 1px solid var(--grey5);
|
|
20
|
+
padding-inline: 16px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.trigger {
|
|
24
|
+
composes: column;
|
|
25
|
+
color: var(--grey11);
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
padding-block: 8px;
|
|
28
|
+
|
|
29
|
+
&:not(:last-child) {
|
|
30
|
+
margin-right: 16px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&[data-state="active"] {
|
|
34
|
+
/* stylelint-disable declaration-property-value-allowed-list -- very specific box shadow for this component */
|
|
35
|
+
box-shadow:
|
|
36
|
+
inset 0 -1px 0 0 currentColor,
|
|
37
|
+
0 1px 0 0 currentColor;
|
|
38
|
+
/* stylelint-end declaration-property-value-allowed-list */
|
|
39
|
+
color: var(--purple9);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.triggerText {
|
|
44
|
+
line-height: 32px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.content {
|
|
48
|
+
composes: column;
|
|
49
|
+
min-height: 0;
|
|
50
|
+
outline: none;
|
|
51
|
+
flex: 1;
|
|
52
|
+
|
|
53
|
+
&[data-state="inactive"] {
|
|
54
|
+
display: none;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.scrollArea {
|
|
59
|
+
padding: 16px;
|
|
60
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const styles: {
|
|
2
|
+
readonly "column": string;
|
|
3
|
+
readonly "content": string;
|
|
4
|
+
readonly "flex": string;
|
|
5
|
+
readonly "list": string;
|
|
6
|
+
readonly "root": string;
|
|
7
|
+
readonly "scrollArea": string;
|
|
8
|
+
readonly "trigger": string;
|
|
9
|
+
readonly "triggerText": string;
|
|
10
|
+
};
|
|
11
|
+
export = styles;
|
|
12
|
+
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { ScrollArea, Text } from "@prismicio/editor-ui";
|
|
1
2
|
import * as Tabs from "@radix-ui/react-tabs";
|
|
2
3
|
import type { CSSProperties, FC, ReactNode } from "react";
|
|
3
|
-
import { ScrollArea, Text } from "@prismicio/editor-ui";
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import styles from "./ContentTabs.module.css";
|
|
6
6
|
|
|
7
7
|
type ContentTabsProps = {
|
|
8
8
|
style?: CSSProperties;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
.base {
|
|
2
|
+
width: 100%;
|
|
3
|
+
border-style: none;
|
|
4
|
+
margin: 0px;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.variant-dashed {
|
|
8
|
+
composes: base;
|
|
9
|
+
border-color: currentColor;
|
|
10
|
+
border-top-style: dashed;
|
|
11
|
+
border-width: 1px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.variant-edgeFaded {
|
|
15
|
+
composes: base;
|
|
16
|
+
height: 1px;
|
|
17
|
+
background-image: linear-gradient(
|
|
18
|
+
to right,
|
|
19
|
+
color-mix(in srgb, currentColor, transparent 100%),
|
|
20
|
+
currentColor,
|
|
21
|
+
color-mix(in srgb, currentColor, transparent 100%)
|
|
22
|
+
);
|
|
23
|
+
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
import { theme } from "@prismicio/editor-ui";
|
|
1
2
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import { colors } from "@prismicio/editor-ui";
|
|
3
3
|
|
|
4
4
|
import { Divider } from "./Divider";
|
|
5
|
-
import { variants } from "./Divider.css";
|
|
6
5
|
|
|
7
6
|
type Story = StoryObj<typeof meta>;
|
|
8
7
|
|
|
@@ -11,11 +10,11 @@ const meta = {
|
|
|
11
10
|
argTypes: {
|
|
12
11
|
variant: {
|
|
13
12
|
control: { type: "select" },
|
|
14
|
-
options:
|
|
13
|
+
options: ["dashed", "edgeFaded"],
|
|
15
14
|
},
|
|
16
15
|
color: {
|
|
17
16
|
control: { type: "select" },
|
|
18
|
-
options: Object.keys(
|
|
17
|
+
options: Object.keys(theme.color),
|
|
19
18
|
},
|
|
20
19
|
},
|
|
21
20
|
} satisfies Meta<typeof Divider>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { theme } from "@prismicio/editor-ui";
|
|
2
2
|
import { clsx } from "clsx";
|
|
3
3
|
import type { FC } from "react";
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import styles from "./Divider.module.css";
|
|
6
6
|
|
|
7
7
|
type DividerProps = {
|
|
8
|
-
color?: keyof typeof
|
|
8
|
+
color?: keyof typeof theme.color;
|
|
9
9
|
variant?: "dashed" | "edgeFaded";
|
|
10
10
|
className?: string;
|
|
11
11
|
};
|
|
@@ -15,11 +15,8 @@ export const Divider: FC<DividerProps> = (props) => {
|
|
|
15
15
|
|
|
16
16
|
return (
|
|
17
17
|
<hr
|
|
18
|
-
className={clsx(
|
|
19
|
-
|
|
20
|
-
sprinkles({ color: colors[color] }),
|
|
21
|
-
className,
|
|
22
|
-
)}
|
|
18
|
+
className={clsx(styles[`variant-${variant}`], className)}
|
|
19
|
+
style={{ color: theme.color[color] }}
|
|
23
20
|
/>
|
|
24
21
|
);
|
|
25
22
|
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
.block {
|
|
2
|
+
all: unset;
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
font-family: var(--font-family-body);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.blockWithDisplayRevert {
|
|
8
|
+
composes: block;
|
|
9
|
+
display: revert;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.root {
|
|
13
|
+
composes: blockWithDisplayRevert;
|
|
14
|
+
width: 288px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.title {
|
|
18
|
+
composes: block;
|
|
19
|
+
align-items: center;
|
|
20
|
+
border-bottom-style: solid;
|
|
21
|
+
border-color: var(--grey6);
|
|
22
|
+
border-width: 1px;
|
|
23
|
+
color: var(--grey12);
|
|
24
|
+
display: flex;
|
|
25
|
+
justify-content: space-between;
|
|
26
|
+
margin-bottom: 16px;
|
|
27
|
+
padding-bottom: 4px;
|
|
28
|
+
padding-left: 16px;
|
|
29
|
+
padding-right: 6px;
|
|
30
|
+
padding-top: 4px;
|
|
31
|
+
font-size: 12px;
|
|
32
|
+
font-weight: 500;
|
|
33
|
+
line-height: 16px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.titleCloseIcon {
|
|
37
|
+
composes: block;
|
|
38
|
+
color: var(--grey11);
|
|
39
|
+
display: flex;
|
|
40
|
+
padding: 4px;
|
|
41
|
+
|
|
42
|
+
&:hover {
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.mediaContainer {
|
|
48
|
+
composes: block;
|
|
49
|
+
display: flex;
|
|
50
|
+
margin-bottom: 8px;
|
|
51
|
+
padding-inline: 16px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.media {
|
|
55
|
+
composes: blockWithDisplayRevert;
|
|
56
|
+
border-color: var(--grey6);
|
|
57
|
+
border-radius: 6px;
|
|
58
|
+
border-style: solid;
|
|
59
|
+
border-width: 1px;
|
|
60
|
+
overflow: hidden;
|
|
61
|
+
width: 100%;
|
|
62
|
+
height: 146px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.description {
|
|
66
|
+
composes: blockWithDisplayRevert;
|
|
67
|
+
color: var(--grey11);
|
|
68
|
+
margin-bottom: 16px;
|
|
69
|
+
padding-inline: 16px;
|
|
70
|
+
font-size: 12px;
|
|
71
|
+
font-weight: 400;
|
|
72
|
+
line-height: 20px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.closeButtonContainer {
|
|
76
|
+
composes: blockWithDisplayRevert;
|
|
77
|
+
padding-bottom: 16px;
|
|
78
|
+
padding-inline: 16px;
|
|
79
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const styles: {
|
|
2
|
+
readonly "block": string;
|
|
3
|
+
readonly "blockWithDisplayRevert": string;
|
|
4
|
+
readonly "closeButtonContainer": string;
|
|
5
|
+
readonly "description": string;
|
|
6
|
+
readonly "media": string;
|
|
7
|
+
readonly "mediaContainer": string;
|
|
8
|
+
readonly "root": string;
|
|
9
|
+
readonly "title": string;
|
|
10
|
+
readonly "titleCloseIcon": string;
|
|
11
|
+
};
|
|
12
|
+
export = styles;
|
|
13
|
+
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import { Button } from "@prismicio/editor-ui";
|
|
1
2
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
3
|
+
|
|
2
4
|
import {
|
|
3
5
|
HoverCard,
|
|
4
|
-
HoverCardDescription,
|
|
5
6
|
HoverCardCloseButton,
|
|
7
|
+
HoverCardDescription,
|
|
6
8
|
HoverCardMedia,
|
|
7
9
|
HoverCardTitle,
|
|
8
10
|
} from "./HoverCard";
|
|
9
|
-
import { Button } from "@prismicio/editor-ui";
|
|
10
11
|
|
|
11
12
|
const meta = {
|
|
12
13
|
component: HoverCard,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// @vitest-environment jsdom
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { describe,
|
|
3
|
+
import { describe, expect, test, vi } from "vitest";
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { render, screen, waitFor } from "../../../test/__testutils__";
|
|
6
6
|
import { HoverCard, HoverCardCloseButton } from ".";
|
|
7
7
|
|
|
8
8
|
vi.mock("next/router", () => import("next-router-mock"));
|
|
@@ -13,11 +13,11 @@ import {
|
|
|
13
13
|
type VideoHTMLAttributes,
|
|
14
14
|
} from "react";
|
|
15
15
|
|
|
16
|
-
import { useDelayedAction } from "
|
|
17
|
-
import { CloseIcon } from "
|
|
16
|
+
import { useDelayedAction } from "@/hooks/useDelayedAction";
|
|
17
|
+
import { CloseIcon } from "@/icons/CloseIcon";
|
|
18
18
|
|
|
19
19
|
import { BaseHoverCard, type BaseHoverCardProps } from "../BaseHoverCard";
|
|
20
|
-
import
|
|
20
|
+
import styles from "./HoverCard.module.css";
|
|
21
21
|
|
|
22
22
|
type HoverCardProps = PropsWithChildren<{
|
|
23
23
|
align?: BaseHoverCardProps["align"];
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { LightningIcon } from "@/icons/Lightning";
|
|
4
|
+
import { RadarIcon } from "@/icons/RadarIcon";
|
|
5
5
|
|
|
6
6
|
import { PageLayout, PageLayoutPane } from "../PageLayout";
|
|
7
7
|
import {
|
|
8
|
+
RightElement,
|
|
8
9
|
SideNav,
|
|
10
|
+
SideNavLink,
|
|
9
11
|
SideNavList,
|
|
10
12
|
SideNavListItem,
|
|
11
|
-
SideNavLink,
|
|
12
|
-
SideNavSeparator,
|
|
13
13
|
SideNavListTitle,
|
|
14
|
-
UpdateInfo,
|
|
15
14
|
SideNavRepository,
|
|
16
|
-
|
|
15
|
+
SideNavSeparator,
|
|
16
|
+
UpdateInfo,
|
|
17
17
|
} from "./SideNav";
|
|
18
18
|
import { SideNavEnvironmentSelector } from "./SideNavEnvironmentSelector";
|
|
19
19
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { useMediaQuery } from "@prismicio/editor-support/React";
|
|
2
|
-
import { Tooltip, breakpoints } from "@prismicio/editor-ui";
|
|
3
|
-
import { clsx } from "clsx";
|
|
4
1
|
import type { UrlObject } from "node:url";
|
|
2
|
+
|
|
3
|
+
import { Tooltip, useMediaQuery } from "@prismicio/editor-ui";
|
|
4
|
+
import { clsx } from "clsx";
|
|
5
5
|
import {
|
|
6
|
-
forwardRef,
|
|
7
6
|
type FC,
|
|
7
|
+
forwardRef,
|
|
8
8
|
type HTMLAttributes,
|
|
9
9
|
type LiHTMLAttributes,
|
|
10
10
|
type MouseEvent,
|
|
@@ -13,8 +13,8 @@ import {
|
|
|
13
13
|
type SVGProps,
|
|
14
14
|
} from "react";
|
|
15
15
|
|
|
16
|
-
import { LogoIcon } from "
|
|
17
|
-
import OpenIcon from "
|
|
16
|
+
import { LogoIcon } from "@/icons/LogoIcon";
|
|
17
|
+
import OpenIcon from "@/icons/OpenIcon";
|
|
18
18
|
|
|
19
19
|
import { Divider } from "../Divider";
|
|
20
20
|
import styles from "./SideNav.module.css";
|
|
@@ -118,9 +118,9 @@ export const SideNavLink: FC<SideNavLinkProps> = ({
|
|
|
118
118
|
component: Comp = "a",
|
|
119
119
|
...otherProps
|
|
120
120
|
}) => {
|
|
121
|
-
const
|
|
121
|
+
const visible = useMediaQuery({ max: "medium" });
|
|
122
122
|
return (
|
|
123
|
-
<Tooltip content={title} side="right" visible={
|
|
123
|
+
<Tooltip content={title} side="right" visible={visible}>
|
|
124
124
|
<Comp {...otherProps} className={styles.link} data-active={active}>
|
|
125
125
|
<Icon className={styles.linkIcon} />
|
|
126
126
|
<div className={styles.linkContent}>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useMediaQuery } from "@prismicio/editor-support/React";
|
|
2
1
|
import {
|
|
3
2
|
Box,
|
|
3
|
+
Button,
|
|
4
4
|
DropdownMenu,
|
|
5
5
|
DropdownMenuContent,
|
|
6
6
|
DropdownMenuItem,
|
|
@@ -8,19 +8,18 @@ import {
|
|
|
8
8
|
DropdownMenuTrigger,
|
|
9
9
|
Icon,
|
|
10
10
|
IconButton,
|
|
11
|
-
InvisibleButton,
|
|
12
11
|
ProgressCircle,
|
|
13
12
|
Text,
|
|
14
13
|
Tooltip,
|
|
15
|
-
|
|
14
|
+
useMediaQuery,
|
|
16
15
|
} from "@prismicio/editor-ui";
|
|
17
16
|
import * as VisuallyHidden from "@radix-ui/react-visually-hidden";
|
|
18
17
|
import type { Environment } from "@slicemachine/manager/client";
|
|
19
18
|
import { clsx } from "clsx";
|
|
20
19
|
import type { FC, ReactNode } from "react";
|
|
21
20
|
|
|
22
|
-
import { LoginIcon } from "
|
|
23
|
-
import { LogoIcon } from "
|
|
21
|
+
import { LoginIcon } from "@/icons/LoginIcon";
|
|
22
|
+
import { LogoIcon } from "@/icons/LogoIcon";
|
|
24
23
|
|
|
25
24
|
import styles from "./SideNavEnvironmentSelector.module.css";
|
|
26
25
|
|
|
@@ -47,14 +46,14 @@ export const SideNavEnvironmentSelector: FC<SideNavEnvironmentSelectorProps> = (
|
|
|
47
46
|
onSelect,
|
|
48
47
|
} = props;
|
|
49
48
|
|
|
50
|
-
const
|
|
49
|
+
const collapsed = useMediaQuery({ max: "medium" });
|
|
51
50
|
|
|
52
51
|
const isProductionEnvironmentActive = activeEnvironment?.kind === "prod";
|
|
53
52
|
|
|
54
53
|
return (
|
|
55
54
|
<Box alignItems="center" gap={16}>
|
|
56
55
|
<Box position="relative">
|
|
57
|
-
{
|
|
56
|
+
{collapsed && environments.length > 1 ? (
|
|
58
57
|
<EnvironmentDropdownMenu
|
|
59
58
|
activeEnvironment={activeEnvironment}
|
|
60
59
|
disabled={disabled || loading}
|
|
@@ -74,7 +73,7 @@ export const SideNavEnvironmentSelector: FC<SideNavEnvironmentSelectorProps> = (
|
|
|
74
73
|
/>
|
|
75
74
|
)}
|
|
76
75
|
</Box>
|
|
77
|
-
{!
|
|
76
|
+
{!collapsed && (
|
|
78
77
|
<>
|
|
79
78
|
<Box
|
|
80
79
|
flexGrow={1}
|
|
@@ -89,10 +88,9 @@ export const SideNavEnvironmentSelector: FC<SideNavEnvironmentSelectorProps> = (
|
|
|
89
88
|
) : undefined}
|
|
90
89
|
|
|
91
90
|
{variant === "unauthenticated" ? (
|
|
92
|
-
<
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
/>
|
|
91
|
+
<Button invisible onClick={onLogInClick}>
|
|
92
|
+
Login required
|
|
93
|
+
</Button>
|
|
96
94
|
) : undefined}
|
|
97
95
|
|
|
98
96
|
{variant === "offline" ? (
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
} from "@prismicio/editor-ui";
|
|
9
9
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
10
10
|
|
|
11
|
-
import { Table, TableBody, TableHead, TableCell, TableRow } from "./Table";
|
|
12
|
-
import { UniqueIcon } from "../../icons/UniqueIcon";
|
|
13
11
|
import { ReusableIcon } from "../../icons/ReusableIcon";
|
|
12
|
+
import { UniqueIcon } from "../../icons/UniqueIcon";
|
|
13
|
+
import { Table, TableBody, TableCell, TableHead, TableRow } from "./Table";
|
|
14
14
|
|
|
15
15
|
type Story = StoryObj<typeof meta>;
|
|
16
16
|
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
import { describe, test, vi } from "vitest";
|
|
4
4
|
|
|
5
|
+
import { render, screen } from "@/../test/__testutils__";
|
|
5
6
|
import {
|
|
6
7
|
Table,
|
|
7
8
|
TableBody,
|
|
8
9
|
TableCell,
|
|
9
10
|
TableHead,
|
|
10
11
|
TableRow,
|
|
11
|
-
} from "
|
|
12
|
-
import { render, screen } from "test/__testutils__";
|
|
12
|
+
} from "@/components/Table";
|
|
13
13
|
|
|
14
14
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
15
15
|
vi.mock("next/router", () => require("next-router-mock"));
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { findFocusableAncestor } from "@prismicio/editor-support/DOM";
|
|
2
|
+
import { clsx } from "clsx";
|
|
2
3
|
import {
|
|
4
|
+
createContext,
|
|
3
5
|
type FC,
|
|
4
6
|
type MouseEventHandler,
|
|
5
7
|
type PropsWithChildren,
|
|
6
|
-
createContext,
|
|
7
8
|
useContext,
|
|
8
9
|
} from "react";
|
|
9
|
-
import { clsx } from "clsx";
|
|
10
10
|
|
|
11
11
|
import * as styles from "./Table.css";
|
|
12
12
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Table,
|
|
1
|
+
export { Table, TableBody, TableCell, TableHead, TableRow } from "./Table";
|