slice-machine-ui 1.26.1-beta.7 → 1.26.1-beta.9
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/components/Forms/RenameVariationModal/RenameVariationModal.module.css +5 -0
- package/components/Forms/RenameVariationModal/RenameVariationModal.tsx +1 -1
- package/components/Navigation/index.module.css +3 -0
- package/components/Navigation/index.tsx +1 -1
- package/lib/builders/SliceBuilder/FieldZones/index.tsx +93 -28
- package/lib/builders/common/Zone/components/EmptyState/index.tsx +1 -1
- package/out/404.html +1 -1
- package/out/_next/static/chunks/318-77a29f41c3a027e3.js +1 -0
- package/out/_next/static/chunks/{727-7536690b0938f88f.js → 727-d0d6a29f0793bde2.js} +1 -1
- package/out/_next/static/chunks/869-868567cc5e32452f.js +1 -0
- package/out/_next/static/chunks/pages/{_app-30f2287baca70a97.js → _app-59bc66a6d9d39383.js} +1 -1
- package/out/_next/static/chunks/pages/{changelog-4cee9fbfd4fdfc70.js → changelog-055db8139a22a592.js} +1 -1
- package/out/_next/static/chunks/pages/changes-f43ad4ab5e00f9b9.js +1 -0
- package/out/_next/static/chunks/pages/custom-types/{[customTypeId]-d1a4a07e6b600fa6.js → [customTypeId]-ad5936d95fafff44.js} +1 -1
- package/out/_next/static/chunks/pages/{labs-566a982a3e954547.js → labs-73a12d2fe0233fb9.js} +1 -1
- package/out/_next/static/chunks/pages/page-types/{[pageTypeId]-a724ff12ef322020.js → [pageTypeId]-5ccb44e013a3b002.js} +1 -1
- package/out/_next/static/chunks/pages/{settings-6c2777758905c784.js → settings-417f1d5c1e558c88.js} +1 -1
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-a8933b0ef10806cd.js +1 -0
- package/out/_next/static/chunks/pages/{slices-a633527fee62b6cd.js → slices-3c9b08adf578b020.js} +1 -1
- package/out/_next/static/css/{838fd8bb5a7c32b0.css → 0e0d6c4ec6bf7373.css} +1 -1
- package/out/_next/static/css/{b22c0750c14cc089.css → 27f2b9b9c9f65885.css} +1 -1
- package/out/_next/static/css/{72465cc1225f28a2.css → 57a7e5eb58b45860.css} +1 -1
- package/out/_next/static/css/{82840c077aa9a9d5.css → fa4e416634515cbb.css} +1 -1
- package/out/_next/static/{SeCJEnBCgA3-t7xVTefII → p-7eJUu7gNSRAriJWjZOw}/_buildManifest.js +1 -1
- 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 +5 -3
- 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 +1 -1
- 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.tsx +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.tsx +4 -4
- package/src/domain/__tests__/slice.test.ts +41 -0
- package/src/domain/slice.ts +25 -0
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceAsNewSliceDialog.tsx +1 -1
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceAsNewVariationDialog.tsx +1 -1
- 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/ConvertLegacySliceMergeWithIdenticalDialog.tsx +2 -5
- package/src/features/slices/sliceBuilder/useGroupsInSlicesExperiment.ts +8 -0
- package/test/__setup__.ts +3 -0
- package/components/Forms/RenameVariationModal/RenameVariationModal.css.ts +0 -7
- package/components/Navigation/index.css.ts +0 -5
- package/out/_next/static/chunks/318-d6f1200138628ec3.js +0 -1
- package/out/_next/static/chunks/904-cac58924044acc83.js +0 -1
- package/out/_next/static/chunks/pages/changes-b1d7cb1c845848ee.js +0 -1
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-24acc6726cb20b65.js +0 -1
- package/src/components/ContentTabs/ContentTabs.css.ts +0 -49
- 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/{SeCJEnBCgA3-t7xVTefII → p-7eJUu7gNSRAriJWjZOw}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
self.__BUILD_MANIFEST=function(s,c,a,e,t,i,b,n,f,u,
|
|
1
|
+
self.__BUILD_MANIFEST=function(s,c,a,e,t,i,b,n,f,d,u,h,l,k,j,p,g,o,r){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[a,j,p,"static/chunks/pages/index-cf93d16e9c63b6db.js"],"/_error":["static/chunks/pages/_error-69b4f498bafdd188.js"],"/changelog":[s,e,"static/chunks/870-0c7a8a9622de78b7.js","static/chunks/pages/changelog-055db8139a22a592.js"],"/changes":[s,t,"static/chunks/8eec4907-b712959d9f984b68.js",i,"static/chunks/918-5bb55fb464e34768.js",c,n,"static/css/0e0d6c4ec6bf7373.css","static/chunks/pages/changes-f43ad4ab5e00f9b9.js"],"/custom-types":[a,j,p,"static/chunks/pages/custom-types-3c8e721ec6802127.js"],"/custom-types/[customTypeId]":[s,f,d,u,h,e,b,i,l,g,c,a,k,o,r,"static/chunks/pages/custom-types/[customTypeId]-ad5936d95fafff44.js"],"/labs":["static/chunks/pages/labs-73a12d2fe0233fb9.js"],"/page-types/[pageTypeId]":[s,f,d,u,h,e,b,i,l,g,c,a,k,o,r,"static/chunks/pages/page-types/[pageTypeId]-5ccb44e013a3b002.js"],"/settings":["static/css/ca32882a5d2d8d88.css","static/chunks/pages/settings-417f1d5c1e558c88.js"],"/slices":[s,t,b,c,n,"static/css/f8eb526e10bc2441.css","static/chunks/pages/slices-3c9b08adf578b020.js"],"/slices/[lib]/[sliceName]/[variation]":[s,t,f,d,u,h,e,b,i,l,c,k,n,"static/css/27f2b9b9c9f65885.css","static/chunks/pages/slices/[lib]/[sliceName]/[variation]-a8933b0ef10806cd.js"],"/slices/[lib]/[sliceName]/[variation]/simulator":[t,"static/chunks/72585f70-28b4d7d5384b3703.js","static/chunks/18539003-a5a5d48f20a7b261.js","static/chunks/46-d22d7a121254e31d.js","static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-01d67e97cb901e46.js"],sortedPages:["/","/_app","/_error","/changelog","/changes","/custom-types","/custom-types/[customTypeId]","/labs","/page-types/[pageTypeId]","/settings","/slices","/slices/[lib]/[sliceName]/[variation]","/slices/[lib]/[sliceName]/[variation]/simulator"]}}("static/chunks/59b4e022-7a3b5554b806349f.js","static/chunks/25-792af14760d9df34.js","static/chunks/799-7b910b896ff60ebe.js","static/chunks/183-ebd633fed7c74545.js","static/chunks/c8eae200-966ce352f7b5d2b9.js","static/chunks/543-f8766685f7f451e2.js","static/chunks/50-cfc2514205b86001.js","static/chunks/286-e0950c3083c672e8.js","static/chunks/f36c6662-03bb5e9d9aa0b0aa.js","static/chunks/4c744e84-e3161d754618373f.js","static/chunks/065a3ddb-9a38ca0d60f0bf2f.js","static/chunks/1cc2734a-2c5b6c0367fcde86.js","static/chunks/696-b992b9e1ce75777e.js","static/chunks/318-77a29f41c3a027e3.js","static/chunks/727-d0d6a29f0793bde2.js","static/css/be1f49e49a5aa7eb.css","static/chunks/210-aee6116139329803.js","static/chunks/869-868567cc5e32452f.js","static/css/57a7e5eb58b45860.css"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
|
package/out/changelog.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/fa4e416634515cbb.css" as="style"/><link rel="stylesheet" href="/_next/static/css/fa4e416634515cbb.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-59bc66a6d9d39383.js" defer=""></script><script src="/_next/static/chunks/59b4e022-7a3b5554b806349f.js" defer=""></script><script src="/_next/static/chunks/183-ebd633fed7c74545.js" defer=""></script><script src="/_next/static/chunks/870-0c7a8a9622de78b7.js" defer=""></script><script src="/_next/static/chunks/pages/changelog-055db8139a22a592.js" defer=""></script><script src="/_next/static/p-7eJUu7gNSRAriJWjZOw/_buildManifest.js" defer=""></script><script src="/_next/static/p-7eJUu7gNSRAriJWjZOw/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/changelog","query":{},"buildId":"p-7eJUu7gNSRAriJWjZOw","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/out/changes.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/fa4e416634515cbb.css" as="style"/><link rel="stylesheet" href="/_next/static/css/fa4e416634515cbb.css" data-n-g=""/><link rel="preload" href="/_next/static/css/0e0d6c4ec6bf7373.css" as="style"/><link rel="stylesheet" href="/_next/static/css/0e0d6c4ec6bf7373.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-59bc66a6d9d39383.js" defer=""></script><script src="/_next/static/chunks/59b4e022-7a3b5554b806349f.js" defer=""></script><script src="/_next/static/chunks/c8eae200-966ce352f7b5d2b9.js" defer=""></script><script src="/_next/static/chunks/8eec4907-b712959d9f984b68.js" defer=""></script><script src="/_next/static/chunks/543-f8766685f7f451e2.js" defer=""></script><script src="/_next/static/chunks/918-5bb55fb464e34768.js" defer=""></script><script src="/_next/static/chunks/25-792af14760d9df34.js" defer=""></script><script src="/_next/static/chunks/286-e0950c3083c672e8.js" defer=""></script><script src="/_next/static/chunks/pages/changes-f43ad4ab5e00f9b9.js" defer=""></script><script src="/_next/static/p-7eJUu7gNSRAriJWjZOw/_buildManifest.js" defer=""></script><script src="/_next/static/p-7eJUu7gNSRAriJWjZOw/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/changes","query":{},"buildId":"p-7eJUu7gNSRAriJWjZOw","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/fa4e416634515cbb.css" as="style"/><link rel="stylesheet" href="/_next/static/css/fa4e416634515cbb.css" data-n-g=""/><link rel="preload" href="/_next/static/css/57a7e5eb58b45860.css" as="style"/><link rel="stylesheet" href="/_next/static/css/57a7e5eb58b45860.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-59bc66a6d9d39383.js" defer=""></script><script src="/_next/static/chunks/59b4e022-7a3b5554b806349f.js" defer=""></script><script src="/_next/static/chunks/f36c6662-03bb5e9d9aa0b0aa.js" defer=""></script><script src="/_next/static/chunks/4c744e84-e3161d754618373f.js" defer=""></script><script src="/_next/static/chunks/065a3ddb-9a38ca0d60f0bf2f.js" defer=""></script><script src="/_next/static/chunks/1cc2734a-2c5b6c0367fcde86.js" defer=""></script><script src="/_next/static/chunks/183-ebd633fed7c74545.js" defer=""></script><script src="/_next/static/chunks/50-cfc2514205b86001.js" defer=""></script><script src="/_next/static/chunks/543-f8766685f7f451e2.js" defer=""></script><script src="/_next/static/chunks/696-b992b9e1ce75777e.js" defer=""></script><script src="/_next/static/chunks/210-aee6116139329803.js" defer=""></script><script src="/_next/static/chunks/25-792af14760d9df34.js" defer=""></script><script src="/_next/static/chunks/799-7b910b896ff60ebe.js" defer=""></script><script src="/_next/static/chunks/318-77a29f41c3a027e3.js" defer=""></script><script src="/_next/static/chunks/869-868567cc5e32452f.js" defer=""></script><script src="/_next/static/chunks/pages/custom-types/%5BcustomTypeId%5D-ad5936d95fafff44.js" defer=""></script><script src="/_next/static/p-7eJUu7gNSRAriJWjZOw/_buildManifest.js" defer=""></script><script src="/_next/static/p-7eJUu7gNSRAriJWjZOw/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/custom-types/[customTypeId]","query":{},"buildId":"p-7eJUu7gNSRAriJWjZOw","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/out/custom-types.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/fa4e416634515cbb.css" as="style"/><link rel="stylesheet" href="/_next/static/css/fa4e416634515cbb.css" data-n-g=""/><link rel="preload" href="/_next/static/css/be1f49e49a5aa7eb.css" as="style"/><link rel="stylesheet" href="/_next/static/css/be1f49e49a5aa7eb.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-59bc66a6d9d39383.js" defer=""></script><script src="/_next/static/chunks/799-7b910b896ff60ebe.js" defer=""></script><script src="/_next/static/chunks/727-d0d6a29f0793bde2.js" defer=""></script><script src="/_next/static/chunks/pages/custom-types-3c8e721ec6802127.js" defer=""></script><script src="/_next/static/p-7eJUu7gNSRAriJWjZOw/_buildManifest.js" defer=""></script><script src="/_next/static/p-7eJUu7gNSRAriJWjZOw/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/custom-types","query":{},"buildId":"p-7eJUu7gNSRAriJWjZOw","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/out/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/fa4e416634515cbb.css" as="style"/><link rel="stylesheet" href="/_next/static/css/fa4e416634515cbb.css" data-n-g=""/><link rel="preload" href="/_next/static/css/be1f49e49a5aa7eb.css" as="style"/><link rel="stylesheet" href="/_next/static/css/be1f49e49a5aa7eb.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-59bc66a6d9d39383.js" defer=""></script><script src="/_next/static/chunks/799-7b910b896ff60ebe.js" defer=""></script><script src="/_next/static/chunks/727-d0d6a29f0793bde2.js" defer=""></script><script src="/_next/static/chunks/pages/index-cf93d16e9c63b6db.js" defer=""></script><script src="/_next/static/p-7eJUu7gNSRAriJWjZOw/_buildManifest.js" defer=""></script><script src="/_next/static/p-7eJUu7gNSRAriJWjZOw/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/","query":{},"buildId":"p-7eJUu7gNSRAriJWjZOw","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/out/labs.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/fa4e416634515cbb.css" as="style"/><link rel="stylesheet" href="/_next/static/css/fa4e416634515cbb.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-59bc66a6d9d39383.js" defer=""></script><script src="/_next/static/chunks/pages/labs-73a12d2fe0233fb9.js" defer=""></script><script src="/_next/static/p-7eJUu7gNSRAriJWjZOw/_buildManifest.js" defer=""></script><script src="/_next/static/p-7eJUu7gNSRAriJWjZOw/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/labs","query":{},"buildId":"p-7eJUu7gNSRAriJWjZOw","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/fa4e416634515cbb.css" as="style"/><link rel="stylesheet" href="/_next/static/css/fa4e416634515cbb.css" data-n-g=""/><link rel="preload" href="/_next/static/css/57a7e5eb58b45860.css" as="style"/><link rel="stylesheet" href="/_next/static/css/57a7e5eb58b45860.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-59bc66a6d9d39383.js" defer=""></script><script src="/_next/static/chunks/59b4e022-7a3b5554b806349f.js" defer=""></script><script src="/_next/static/chunks/f36c6662-03bb5e9d9aa0b0aa.js" defer=""></script><script src="/_next/static/chunks/4c744e84-e3161d754618373f.js" defer=""></script><script src="/_next/static/chunks/065a3ddb-9a38ca0d60f0bf2f.js" defer=""></script><script src="/_next/static/chunks/1cc2734a-2c5b6c0367fcde86.js" defer=""></script><script src="/_next/static/chunks/183-ebd633fed7c74545.js" defer=""></script><script src="/_next/static/chunks/50-cfc2514205b86001.js" defer=""></script><script src="/_next/static/chunks/543-f8766685f7f451e2.js" defer=""></script><script src="/_next/static/chunks/696-b992b9e1ce75777e.js" defer=""></script><script src="/_next/static/chunks/210-aee6116139329803.js" defer=""></script><script src="/_next/static/chunks/25-792af14760d9df34.js" defer=""></script><script src="/_next/static/chunks/799-7b910b896ff60ebe.js" defer=""></script><script src="/_next/static/chunks/318-77a29f41c3a027e3.js" defer=""></script><script src="/_next/static/chunks/869-868567cc5e32452f.js" defer=""></script><script src="/_next/static/chunks/pages/page-types/%5BpageTypeId%5D-5ccb44e013a3b002.js" defer=""></script><script src="/_next/static/p-7eJUu7gNSRAriJWjZOw/_buildManifest.js" defer=""></script><script src="/_next/static/p-7eJUu7gNSRAriJWjZOw/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/page-types/[pageTypeId]","query":{},"buildId":"p-7eJUu7gNSRAriJWjZOw","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/out/settings.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/fa4e416634515cbb.css" as="style"/><link rel="stylesheet" href="/_next/static/css/fa4e416634515cbb.css" data-n-g=""/><link rel="preload" href="/_next/static/css/ca32882a5d2d8d88.css" as="style"/><link rel="stylesheet" href="/_next/static/css/ca32882a5d2d8d88.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-59bc66a6d9d39383.js" defer=""></script><script src="/_next/static/chunks/pages/settings-417f1d5c1e558c88.js" defer=""></script><script src="/_next/static/p-7eJUu7gNSRAriJWjZOw/_buildManifest.js" defer=""></script><script src="/_next/static/p-7eJUu7gNSRAriJWjZOw/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/settings","query":{},"buildId":"p-7eJUu7gNSRAriJWjZOw","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/fa4e416634515cbb.css" as="style"/><link rel="stylesheet" href="/_next/static/css/fa4e416634515cbb.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-59bc66a6d9d39383.js" defer=""></script><script src="/_next/static/chunks/c8eae200-966ce352f7b5d2b9.js" defer=""></script><script src="/_next/static/chunks/72585f70-28b4d7d5384b3703.js" defer=""></script><script src="/_next/static/chunks/18539003-a5a5d48f20a7b261.js" defer=""></script><script src="/_next/static/chunks/46-d22d7a121254e31d.js" defer=""></script><script src="/_next/static/chunks/pages/slices/%5Blib%5D/%5BsliceName%5D/%5Bvariation%5D/simulator-01d67e97cb901e46.js" defer=""></script><script src="/_next/static/p-7eJUu7gNSRAriJWjZOw/_buildManifest.js" defer=""></script><script src="/_next/static/p-7eJUu7gNSRAriJWjZOw/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/slices/[lib]/[sliceName]/[variation]/simulator","query":{},"buildId":"p-7eJUu7gNSRAriJWjZOw","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/fa4e416634515cbb.css" as="style"/><link rel="stylesheet" href="/_next/static/css/fa4e416634515cbb.css" data-n-g=""/><link rel="preload" href="/_next/static/css/27f2b9b9c9f65885.css" as="style"/><link rel="stylesheet" href="/_next/static/css/27f2b9b9c9f65885.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-59bc66a6d9d39383.js" defer=""></script><script src="/_next/static/chunks/59b4e022-7a3b5554b806349f.js" defer=""></script><script src="/_next/static/chunks/c8eae200-966ce352f7b5d2b9.js" defer=""></script><script src="/_next/static/chunks/f36c6662-03bb5e9d9aa0b0aa.js" defer=""></script><script src="/_next/static/chunks/4c744e84-e3161d754618373f.js" defer=""></script><script src="/_next/static/chunks/065a3ddb-9a38ca0d60f0bf2f.js" defer=""></script><script src="/_next/static/chunks/1cc2734a-2c5b6c0367fcde86.js" defer=""></script><script src="/_next/static/chunks/183-ebd633fed7c74545.js" defer=""></script><script src="/_next/static/chunks/50-cfc2514205b86001.js" defer=""></script><script src="/_next/static/chunks/543-f8766685f7f451e2.js" defer=""></script><script src="/_next/static/chunks/696-b992b9e1ce75777e.js" defer=""></script><script src="/_next/static/chunks/25-792af14760d9df34.js" defer=""></script><script src="/_next/static/chunks/318-77a29f41c3a027e3.js" defer=""></script><script src="/_next/static/chunks/286-e0950c3083c672e8.js" defer=""></script><script src="/_next/static/chunks/pages/slices/%5Blib%5D/%5BsliceName%5D/%5Bvariation%5D-a8933b0ef10806cd.js" defer=""></script><script src="/_next/static/p-7eJUu7gNSRAriJWjZOw/_buildManifest.js" defer=""></script><script src="/_next/static/p-7eJUu7gNSRAriJWjZOw/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/slices/[lib]/[sliceName]/[variation]","query":{},"buildId":"p-7eJUu7gNSRAriJWjZOw","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/out/slices.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/fa4e416634515cbb.css" as="style"/><link rel="stylesheet" href="/_next/static/css/fa4e416634515cbb.css" data-n-g=""/><link rel="preload" href="/_next/static/css/f8eb526e10bc2441.css" as="style"/><link rel="stylesheet" href="/_next/static/css/f8eb526e10bc2441.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-59bc66a6d9d39383.js" defer=""></script><script src="/_next/static/chunks/59b4e022-7a3b5554b806349f.js" defer=""></script><script src="/_next/static/chunks/c8eae200-966ce352f7b5d2b9.js" defer=""></script><script src="/_next/static/chunks/50-cfc2514205b86001.js" defer=""></script><script src="/_next/static/chunks/25-792af14760d9df34.js" defer=""></script><script src="/_next/static/chunks/286-e0950c3083c672e8.js" defer=""></script><script src="/_next/static/chunks/pages/slices-3c9b08adf578b020.js" defer=""></script><script src="/_next/static/p-7eJUu7gNSRAriJWjZOw/_buildManifest.js" defer=""></script><script src="/_next/static/p-7eJUu7gNSRAriJWjZOw/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/slices","query":{},"buildId":"p-7eJUu7gNSRAriJWjZOw","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "slice-machine-ui",
|
|
3
|
-
"version": "1.26.1-beta.
|
|
3
|
+
"version": "1.26.1-beta.9",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "A visual builder for your Slice Models with all the tools you need to generate data models and mock CMS content locally.",
|
|
6
6
|
"repository": {
|
|
@@ -35,15 +35,17 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@radix-ui/react-visually-hidden": "1.0.3",
|
|
38
|
-
"@slicemachine/manager": "0.18.4-beta.
|
|
39
|
-
"start-slicemachine": "0.12.19-beta.
|
|
38
|
+
"@slicemachine/manager": "0.18.4-beta.9",
|
|
39
|
+
"start-slicemachine": "0.12.19-beta.9"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@emotion/react": "11.11.1",
|
|
43
43
|
"@extractus/oembed-extractor": "3.1.8",
|
|
44
|
+
"@prismicio/client": "7.4.1",
|
|
44
45
|
"@prismicio/editor-fields": "0.4.25",
|
|
45
46
|
"@prismicio/editor-support": "0.4.25",
|
|
46
47
|
"@prismicio/editor-ui": "0.4.25",
|
|
48
|
+
"@prismicio/mock": "0.3.3",
|
|
47
49
|
"@prismicio/mocks": "2.0.0-alpha.2",
|
|
48
50
|
"@prismicio/simulator": "0.1.4",
|
|
49
51
|
"@prismicio/types-internal": "2.2.0",
|
|
@@ -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
|
+
|
|
@@ -2,7 +2,7 @@ import * as Tabs from "@radix-ui/react-tabs";
|
|
|
2
2
|
import type { CSSProperties, FC, ReactNode } from "react";
|
|
3
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,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
|
+
|
|
@@ -17,7 +17,7 @@ import { useDelayedAction } from "@src/hooks/useDelayedAction";
|
|
|
17
17
|
import { CloseIcon } from "@src/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"];
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
all: unset;
|
|
3
|
+
cursor: pointer;
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
|
|
7
|
+
&:focus-visible {
|
|
8
|
+
outline: none;
|
|
9
|
+
text-decoration-line: underline;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.color-primary {
|
|
14
|
+
color: var(--purple9);
|
|
15
|
+
|
|
16
|
+
&:hover {
|
|
17
|
+
color: var(--purple8);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&:active {
|
|
21
|
+
color: var(--purple9);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.color-secondary {
|
|
26
|
+
color: var(--indigo11);
|
|
27
|
+
|
|
28
|
+
&:hover {
|
|
29
|
+
color: var(--indigo10);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&:active {
|
|
33
|
+
color: var(--indigo11);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.endIcon {
|
|
38
|
+
padding-left: 4px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.icon-normal {
|
|
42
|
+
font-size: 1.2rem;
|
|
43
|
+
width: 18px;
|
|
44
|
+
height: 18px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.icon-smallBold {
|
|
48
|
+
font-size: 1rem;
|
|
49
|
+
width: 16px;
|
|
50
|
+
height: 16px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.icon-inherit {
|
|
54
|
+
font-family: inherit;
|
|
55
|
+
font-size: inherit;
|
|
56
|
+
width: inherit;
|
|
57
|
+
height: inherit;
|
|
58
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const styles: {
|
|
2
|
+
readonly "color-primary": string;
|
|
3
|
+
readonly "color-secondary": string;
|
|
4
|
+
readonly "endIcon": string;
|
|
5
|
+
readonly "icon-inherit": string;
|
|
6
|
+
readonly "icon-normal": string;
|
|
7
|
+
readonly "icon-smallBold": string;
|
|
8
|
+
readonly "root": string;
|
|
9
|
+
};
|
|
10
|
+
export = styles;
|
|
11
|
+
|
|
@@ -2,7 +2,7 @@ import { Text } from "@prismicio/editor-ui";
|
|
|
2
2
|
import { clsx } from "clsx";
|
|
3
3
|
import { type FC, type ReactNode, cloneElement, isValidElement } from "react";
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import styles from "./TextLink.module.css";
|
|
6
6
|
|
|
7
7
|
type IconProps = Readonly<{
|
|
8
8
|
className?: string;
|
|
@@ -10,7 +10,7 @@ type IconProps = Readonly<{
|
|
|
10
10
|
|
|
11
11
|
interface TextLinkProps {
|
|
12
12
|
children: string;
|
|
13
|
-
color?:
|
|
13
|
+
color?: "primary" | "secondary";
|
|
14
14
|
endIcon?: ReactNode;
|
|
15
15
|
href: string;
|
|
16
16
|
textVariant?: "normal" | "smallBold" | "inherit";
|
|
@@ -32,7 +32,7 @@ export const TextLink: FC<TextLinkProps> = (props) => {
|
|
|
32
32
|
target="_blank"
|
|
33
33
|
rel="noreferrer"
|
|
34
34
|
{...otherProps}
|
|
35
|
-
className={clsx(styles.root, styles
|
|
35
|
+
className={clsx(styles.root, styles[`color-${color}`])}
|
|
36
36
|
>
|
|
37
37
|
<Text component="span" color="inherit" variant={textVariant}>
|
|
38
38
|
{children}
|
|
@@ -42,7 +42,7 @@ export const TextLink: FC<TextLinkProps> = (props) => {
|
|
|
42
42
|
className: clsx(
|
|
43
43
|
endIcon.props.className,
|
|
44
44
|
styles.endIcon,
|
|
45
|
-
styles
|
|
45
|
+
styles[`icon-${textVariant}`],
|
|
46
46
|
),
|
|
47
47
|
})
|
|
48
48
|
: null}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { it, describe, expect } from "vitest";
|
|
2
|
+
import { SharedSlice } from "@prismicio/types-internal/lib/customtypes";
|
|
3
|
+
|
|
4
|
+
import { Slices } from "@lib/models/common/Slice";
|
|
5
|
+
import { ComponentUI } from "@lib/models/common/ComponentUI";
|
|
6
|
+
|
|
7
|
+
import { deleteRepeatableZone } from "../slice";
|
|
8
|
+
|
|
9
|
+
describe("deleteRepeatableZone", () => {
|
|
10
|
+
it("removes the `items` property from a specific variation within a slice", (ctx) => {
|
|
11
|
+
const variation = ctx.createMock.model.sharedSliceVariation({
|
|
12
|
+
itemsFields: { foo: ctx.createMock.model.boolean() },
|
|
13
|
+
});
|
|
14
|
+
const model = ctx.createMock.model.sharedSlice({ variations: [variation] });
|
|
15
|
+
const slice = buildMockSliceComponentUI(model);
|
|
16
|
+
|
|
17
|
+
const res = deleteRepeatableZone({ slice, variationId: variation.id });
|
|
18
|
+
expect(res.model.variations[0].items).toBeUndefined();
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it("does nothing if the variation does not exist", (ctx) => {
|
|
22
|
+
const model = ctx.createMock.model.sharedSlice();
|
|
23
|
+
const slice = buildMockSliceComponentUI(model);
|
|
24
|
+
|
|
25
|
+
const res = deleteRepeatableZone({ slice, variationId: "non-existent" });
|
|
26
|
+
expect(res).toStrictEqual(slice);
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
function buildMockSliceComponentUI(model: SharedSlice): ComponentUI {
|
|
31
|
+
return {
|
|
32
|
+
model: Slices.toSM(model),
|
|
33
|
+
extension: "extension",
|
|
34
|
+
fileName: "fileName",
|
|
35
|
+
from: "from",
|
|
36
|
+
href: "href",
|
|
37
|
+
mocks: [],
|
|
38
|
+
pathToSlice: "pathToSlice",
|
|
39
|
+
screenshots: {},
|
|
40
|
+
};
|
|
41
|
+
}
|
package/src/domain/slice.ts
CHANGED
|
@@ -48,6 +48,11 @@ type ReorderFieldArgs = {
|
|
|
48
48
|
destinationIndex: number;
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
+
type DeleteRepeatableZoneArgs = {
|
|
52
|
+
slice: ComponentUI;
|
|
53
|
+
variationId: string;
|
|
54
|
+
};
|
|
55
|
+
|
|
51
56
|
const DEFAULT_VARIATION_ID = "default";
|
|
52
57
|
|
|
53
58
|
export function countMissingScreenshots(slice: ComponentUI): number {
|
|
@@ -281,3 +286,23 @@ export function rename(slice: ComponentUI, newSliceName: string): ComponentUI {
|
|
|
281
286
|
},
|
|
282
287
|
};
|
|
283
288
|
}
|
|
289
|
+
|
|
290
|
+
export function deleteRepeatableZone(args: DeleteRepeatableZoneArgs) {
|
|
291
|
+
const { slice, variationId } = args;
|
|
292
|
+
|
|
293
|
+
return {
|
|
294
|
+
...slice,
|
|
295
|
+
model: {
|
|
296
|
+
...slice.model,
|
|
297
|
+
variations: slice.model.variations.map((v) => {
|
|
298
|
+
if (v.id === variationId) {
|
|
299
|
+
const newVariation = { ...v };
|
|
300
|
+
delete newVariation.items;
|
|
301
|
+
|
|
302
|
+
return newVariation;
|
|
303
|
+
}
|
|
304
|
+
return v;
|
|
305
|
+
}),
|
|
306
|
+
},
|
|
307
|
+
};
|
|
308
|
+
}
|