@puzzle-ui/pieces 0.0.0-stage → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/LICENSE +21 -0
- package/dist/components/hero/accommodation-hero.cjs +13 -0
- package/dist/components/hero/accommodation-hero.cjs.map +1 -0
- package/dist/components/hero/accommodation-hero.d.cts +3 -0
- package/dist/components/hero/accommodation-hero.d.ts +3 -0
- package/dist/components/hero/accommodation-hero.js +14 -0
- package/dist/components/hero/accommodation-hero.js.map +1 -0
- package/dist/components/hero/agency-hero.cjs +13 -0
- package/dist/components/hero/agency-hero.cjs.map +1 -0
- package/dist/components/hero/agency-hero.d.cts +3 -0
- package/dist/components/hero/agency-hero.d.ts +3 -0
- package/dist/components/hero/agency-hero.js +14 -0
- package/dist/components/hero/agency-hero.js.map +1 -0
- package/dist/components/hero/app-hero.cjs +13 -0
- package/dist/components/hero/app-hero.cjs.map +1 -0
- package/dist/components/hero/app-hero.d.cts +3 -0
- package/dist/components/hero/app-hero.d.ts +3 -0
- package/dist/components/hero/app-hero.js +14 -0
- package/dist/components/hero/app-hero.js.map +1 -0
- package/dist/components/hero/campaign-hero.cjs +13 -0
- package/dist/components/hero/campaign-hero.cjs.map +1 -0
- package/dist/components/hero/campaign-hero.d.cts +3 -0
- package/dist/components/hero/campaign-hero.d.ts +3 -0
- package/dist/components/hero/campaign-hero.js +14 -0
- package/dist/components/hero/campaign-hero.js.map +1 -0
- package/dist/components/hero/centered-hero.cjs +12 -0
- package/dist/components/hero/centered-hero.cjs.map +1 -0
- package/dist/components/hero/centered-hero.d.cts +3 -0
- package/dist/components/hero/centered-hero.d.ts +3 -0
- package/dist/components/hero/centered-hero.js +13 -0
- package/dist/components/hero/centered-hero.js.map +1 -0
- package/dist/components/hero/coming-soon-hero.cjs +12 -0
- package/dist/components/hero/coming-soon-hero.cjs.map +1 -0
- package/dist/components/hero/coming-soon-hero.d.cts +3 -0
- package/dist/components/hero/coming-soon-hero.d.ts +3 -0
- package/dist/components/hero/coming-soon-hero.js +13 -0
- package/dist/components/hero/coming-soon-hero.js.map +1 -0
- package/dist/components/hero/create-hero-preset.cjs +11 -0
- package/dist/components/hero/create-hero-preset.cjs.map +1 -0
- package/dist/components/hero/create-hero-preset.js +11 -0
- package/dist/components/hero/create-hero-preset.js.map +1 -0
- package/dist/components/hero/dashboard-welcome-hero.cjs +12 -0
- package/dist/components/hero/dashboard-welcome-hero.cjs.map +1 -0
- package/dist/components/hero/dashboard-welcome-hero.d.cts +3 -0
- package/dist/components/hero/dashboard-welcome-hero.d.ts +3 -0
- package/dist/components/hero/dashboard-welcome-hero.js +13 -0
- package/dist/components/hero/dashboard-welcome-hero.js.map +1 -0
- package/dist/components/hero/editorial-hero.cjs +13 -0
- package/dist/components/hero/editorial-hero.cjs.map +1 -0
- package/dist/components/hero/editorial-hero.d.cts +3 -0
- package/dist/components/hero/editorial-hero.d.ts +3 -0
- package/dist/components/hero/editorial-hero.js +14 -0
- package/dist/components/hero/editorial-hero.js.map +1 -0
- package/dist/components/hero/full-screen-hero.cjs +13 -0
- package/dist/components/hero/full-screen-hero.cjs.map +1 -0
- package/dist/components/hero/full-screen-hero.d.cts +3 -0
- package/dist/components/hero/full-screen-hero.d.ts +3 -0
- package/dist/components/hero/full-screen-hero.js +14 -0
- package/dist/components/hero/full-screen-hero.js.map +1 -0
- package/dist/components/hero/hero-video.cjs +45 -0
- package/dist/components/hero/hero-video.cjs.map +1 -0
- package/dist/components/hero/hero-video.js +45 -0
- package/dist/components/hero/hero-video.js.map +1 -0
- package/dist/components/hero/hero.cjs +98 -0
- package/dist/components/hero/hero.cjs.map +1 -0
- package/dist/components/hero/hero.css +312 -0
- package/dist/components/hero/hero.d.cts +3 -0
- package/dist/components/hero/hero.d.ts +3 -0
- package/dist/components/hero/hero.js +98 -0
- package/dist/components/hero/hero.js.map +1 -0
- package/dist/components/hero/hero.types.d.cts +44 -0
- package/dist/components/hero/hero.types.d.ts +44 -0
- package/dist/components/hero/hero.utils.cjs +8 -0
- package/dist/components/hero/hero.utils.cjs.map +1 -0
- package/dist/components/hero/hero.utils.js +8 -0
- package/dist/components/hero/hero.utils.js.map +1 -0
- package/dist/components/hero/image-hero.cjs +16 -0
- package/dist/components/hero/image-hero.cjs.map +1 -0
- package/dist/components/hero/image-hero.d.cts +6 -0
- package/dist/components/hero/image-hero.d.ts +6 -0
- package/dist/components/hero/image-hero.js +16 -0
- package/dist/components/hero/image-hero.js.map +1 -0
- package/dist/components/hero/index.d.cts +22 -0
- package/dist/components/hero/index.d.ts +22 -0
- package/dist/components/hero/minimal-hero.cjs +12 -0
- package/dist/components/hero/minimal-hero.cjs.map +1 -0
- package/dist/components/hero/minimal-hero.d.cts +3 -0
- package/dist/components/hero/minimal-hero.d.ts +3 -0
- package/dist/components/hero/minimal-hero.js +13 -0
- package/dist/components/hero/minimal-hero.js.map +1 -0
- package/dist/components/hero/print-shop-hero.cjs +13 -0
- package/dist/components/hero/print-shop-hero.cjs.map +1 -0
- package/dist/components/hero/print-shop-hero.d.cts +3 -0
- package/dist/components/hero/print-shop-hero.d.ts +3 -0
- package/dist/components/hero/print-shop-hero.js +14 -0
- package/dist/components/hero/print-shop-hero.js.map +1 -0
- package/dist/components/hero/product-hero.cjs +13 -0
- package/dist/components/hero/product-hero.cjs.map +1 -0
- package/dist/components/hero/product-hero.d.cts +3 -0
- package/dist/components/hero/product-hero.d.ts +3 -0
- package/dist/components/hero/product-hero.js +14 -0
- package/dist/components/hero/product-hero.js.map +1 -0
- package/dist/components/hero/restaurant-hero.cjs +13 -0
- package/dist/components/hero/restaurant-hero.cjs.map +1 -0
- package/dist/components/hero/restaurant-hero.d.cts +3 -0
- package/dist/components/hero/restaurant-hero.d.ts +3 -0
- package/dist/components/hero/restaurant-hero.js +14 -0
- package/dist/components/hero/restaurant-hero.js.map +1 -0
- package/dist/components/hero/saas-hero.cjs +13 -0
- package/dist/components/hero/saas-hero.cjs.map +1 -0
- package/dist/components/hero/saas-hero.d.cts +3 -0
- package/dist/components/hero/saas-hero.d.ts +3 -0
- package/dist/components/hero/saas-hero.js +14 -0
- package/dist/components/hero/saas-hero.js.map +1 -0
- package/dist/components/hero/search-hero.cjs +12 -0
- package/dist/components/hero/search-hero.cjs.map +1 -0
- package/dist/components/hero/search-hero.d.cts +3 -0
- package/dist/components/hero/search-hero.d.ts +3 -0
- package/dist/components/hero/search-hero.js +13 -0
- package/dist/components/hero/search-hero.js.map +1 -0
- package/dist/components/hero/split-hero.cjs +12 -0
- package/dist/components/hero/split-hero.cjs.map +1 -0
- package/dist/components/hero/split-hero.d.cts +3 -0
- package/dist/components/hero/split-hero.d.ts +3 -0
- package/dist/components/hero/split-hero.js +13 -0
- package/dist/components/hero/split-hero.js.map +1 -0
- package/dist/components/hero/store-hero.cjs +13 -0
- package/dist/components/hero/store-hero.cjs.map +1 -0
- package/dist/components/hero/store-hero.d.cts +3 -0
- package/dist/components/hero/store-hero.d.ts +3 -0
- package/dist/components/hero/store-hero.js +14 -0
- package/dist/components/hero/store-hero.js.map +1 -0
- package/dist/components/hero/video-hero.cjs +16 -0
- package/dist/components/hero/video-hero.cjs.map +1 -0
- package/dist/components/hero/video-hero.d.cts +6 -0
- package/dist/components/hero/video-hero.d.ts +6 -0
- package/dist/components/hero/video-hero.js +16 -0
- package/dist/components/hero/video-hero.js.map +1 -0
- package/dist/index.cjs +41 -0
- package/dist/index.d.cts +23 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +21 -0
- package/package.json +73 -4
- package/README.md +0 -3
package/dist/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Sjoerd van Den Berg
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// src/components/hero/accommodation-hero.tsx
|
|
2
|
+
const AccommodationHero = require("./create-hero-preset.cjs").createHeroPreset({
|
|
3
|
+
layout: "full-width",
|
|
4
|
+
mediaPosition: "background",
|
|
5
|
+
alignment: "center",
|
|
6
|
+
height: "viewport",
|
|
7
|
+
theme: "dark",
|
|
8
|
+
overlay: "gradient",
|
|
9
|
+
contentWidth: "wide"
|
|
10
|
+
});
|
|
11
|
+
exports.AccommodationHero = AccommodationHero;
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=accommodation-hero.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accommodation-hero.cjs","names":["createHeroPreset"],"sources":["../../../src/components/hero/accommodation-hero.tsx"],"sourcesContent":["import { createHeroPreset } from \"./create-hero-preset\";\nimport type { HeroProps } from \"./hero.types\";\n\nconst AccommodationHero = createHeroPreset<HeroProps>({\n layout: \"full-width\",\n mediaPosition: \"background\",\n alignment: \"center\",\n height: \"viewport\",\n theme: \"dark\",\n overlay: \"gradient\",\n contentWidth: \"wide\",\n});\n\nexport { AccommodationHero };\n"],"mappings":";AAGA,MAAM,oB,kCAAoBA,CAAAA,CAAAA,iBAA4B;CACpD,QAAQ;CACR,eAAe;CACf,WAAW;CACX,QAAQ;CACR,OAAO;CACP,SAAS;CACT,cAAc;AAChB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createHeroPreset } from "./create-hero-preset.js";
|
|
2
|
+
// src/components/hero/accommodation-hero.tsx
|
|
3
|
+
const AccommodationHero = createHeroPreset({
|
|
4
|
+
layout: "full-width",
|
|
5
|
+
mediaPosition: "background",
|
|
6
|
+
alignment: "center",
|
|
7
|
+
height: "viewport",
|
|
8
|
+
theme: "dark",
|
|
9
|
+
overlay: "gradient",
|
|
10
|
+
contentWidth: "wide"
|
|
11
|
+
});
|
|
12
|
+
export { AccommodationHero };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=accommodation-hero.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accommodation-hero.js","names":[],"sources":["../../../src/components/hero/accommodation-hero.tsx"],"sourcesContent":["import { createHeroPreset } from \"./create-hero-preset\";\nimport type { HeroProps } from \"./hero.types\";\n\nconst AccommodationHero = createHeroPreset<HeroProps>({\n layout: \"full-width\",\n mediaPosition: \"background\",\n alignment: \"center\",\n height: \"viewport\",\n theme: \"dark\",\n overlay: \"gradient\",\n contentWidth: \"wide\",\n});\n\nexport { AccommodationHero };\n"],"mappings":";;AAGA,MAAM,oBAAoB,iBAA4B;CACpD,QAAQ;CACR,eAAe;CACf,WAAW;CACX,QAAQ;CACR,OAAO;CACP,SAAS;CACT,cAAc;AAChB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// src/components/hero/agency-hero.tsx
|
|
2
|
+
const AgencyHero = require("./create-hero-preset.cjs").createHeroPreset({
|
|
3
|
+
layout: "asymmetric",
|
|
4
|
+
mediaPosition: "right",
|
|
5
|
+
alignment: "start",
|
|
6
|
+
height: "large",
|
|
7
|
+
theme: "dark",
|
|
8
|
+
overlay: "none",
|
|
9
|
+
contentWidth: "normal"
|
|
10
|
+
});
|
|
11
|
+
exports.AgencyHero = AgencyHero;
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=agency-hero.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agency-hero.cjs","names":["createHeroPreset"],"sources":["../../../src/components/hero/agency-hero.tsx"],"sourcesContent":["import { createHeroPreset } from \"./create-hero-preset\";\nimport type { HeroProps } from \"./hero.types\";\n\nconst AgencyHero = createHeroPreset<HeroProps>({\n layout: \"asymmetric\",\n mediaPosition: \"right\",\n alignment: \"start\",\n height: \"large\",\n theme: \"dark\",\n overlay: \"none\",\n contentWidth: \"normal\",\n});\n\nexport { AgencyHero };\n"],"mappings":";AAGA,MAAM,a,kCAAaA,CAAAA,CAAAA,iBAA4B;CAC7C,QAAQ;CACR,eAAe;CACf,WAAW;CACX,QAAQ;CACR,OAAO;CACP,SAAS;CACT,cAAc;AAChB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createHeroPreset } from "./create-hero-preset.js";
|
|
2
|
+
// src/components/hero/agency-hero.tsx
|
|
3
|
+
const AgencyHero = createHeroPreset({
|
|
4
|
+
layout: "asymmetric",
|
|
5
|
+
mediaPosition: "right",
|
|
6
|
+
alignment: "start",
|
|
7
|
+
height: "large",
|
|
8
|
+
theme: "dark",
|
|
9
|
+
overlay: "none",
|
|
10
|
+
contentWidth: "normal"
|
|
11
|
+
});
|
|
12
|
+
export { AgencyHero };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=agency-hero.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agency-hero.js","names":[],"sources":["../../../src/components/hero/agency-hero.tsx"],"sourcesContent":["import { createHeroPreset } from \"./create-hero-preset\";\nimport type { HeroProps } from \"./hero.types\";\n\nconst AgencyHero = createHeroPreset<HeroProps>({\n layout: \"asymmetric\",\n mediaPosition: \"right\",\n alignment: \"start\",\n height: \"large\",\n theme: \"dark\",\n overlay: \"none\",\n contentWidth: \"normal\",\n});\n\nexport { AgencyHero };\n"],"mappings":";;AAGA,MAAM,aAAa,iBAA4B;CAC7C,QAAQ;CACR,eAAe;CACf,WAAW;CACX,QAAQ;CACR,OAAO;CACP,SAAS;CACT,cAAc;AAChB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// src/components/hero/app-hero.tsx
|
|
2
|
+
const AppHero = require("./create-hero-preset.cjs").createHeroPreset({
|
|
3
|
+
layout: "split",
|
|
4
|
+
mediaPosition: "right",
|
|
5
|
+
alignment: "start",
|
|
6
|
+
height: "large",
|
|
7
|
+
theme: "light",
|
|
8
|
+
overlay: "none",
|
|
9
|
+
contentWidth: "normal"
|
|
10
|
+
});
|
|
11
|
+
exports.AppHero = AppHero;
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=app-hero.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-hero.cjs","names":["createHeroPreset"],"sources":["../../../src/components/hero/app-hero.tsx"],"sourcesContent":["import { createHeroPreset } from \"./create-hero-preset\";\nimport type { HeroProps } from \"./hero.types\";\n\nconst AppHero = createHeroPreset<HeroProps>({\n layout: \"split\",\n mediaPosition: \"right\",\n alignment: \"start\",\n height: \"large\",\n theme: \"light\",\n overlay: \"none\",\n contentWidth: \"normal\",\n});\n\nexport { AppHero };\n"],"mappings":";AAGA,MAAM,U,kCAAUA,CAAAA,CAAAA,iBAA4B;CAC1C,QAAQ;CACR,eAAe;CACf,WAAW;CACX,QAAQ;CACR,OAAO;CACP,SAAS;CACT,cAAc;AAChB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createHeroPreset } from "./create-hero-preset.js";
|
|
2
|
+
// src/components/hero/app-hero.tsx
|
|
3
|
+
const AppHero = createHeroPreset({
|
|
4
|
+
layout: "split",
|
|
5
|
+
mediaPosition: "right",
|
|
6
|
+
alignment: "start",
|
|
7
|
+
height: "large",
|
|
8
|
+
theme: "light",
|
|
9
|
+
overlay: "none",
|
|
10
|
+
contentWidth: "normal"
|
|
11
|
+
});
|
|
12
|
+
export { AppHero };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=app-hero.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-hero.js","names":[],"sources":["../../../src/components/hero/app-hero.tsx"],"sourcesContent":["import { createHeroPreset } from \"./create-hero-preset\";\nimport type { HeroProps } from \"./hero.types\";\n\nconst AppHero = createHeroPreset<HeroProps>({\n layout: \"split\",\n mediaPosition: \"right\",\n alignment: \"start\",\n height: \"large\",\n theme: \"light\",\n overlay: \"none\",\n contentWidth: \"normal\",\n});\n\nexport { AppHero };\n"],"mappings":";;AAGA,MAAM,UAAU,iBAA4B;CAC1C,QAAQ;CACR,eAAe;CACf,WAAW;CACX,QAAQ;CACR,OAAO;CACP,SAAS;CACT,cAAc;AAChB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// src/components/hero/campaign-hero.tsx
|
|
2
|
+
const CampaignHero = require("./create-hero-preset.cjs").createHeroPreset({
|
|
3
|
+
layout: "full-width",
|
|
4
|
+
mediaPosition: "background",
|
|
5
|
+
alignment: "center",
|
|
6
|
+
height: "large",
|
|
7
|
+
theme: "contrast",
|
|
8
|
+
overlay: "gradient",
|
|
9
|
+
contentWidth: "wide"
|
|
10
|
+
});
|
|
11
|
+
exports.CampaignHero = CampaignHero;
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=campaign-hero.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"campaign-hero.cjs","names":["createHeroPreset"],"sources":["../../../src/components/hero/campaign-hero.tsx"],"sourcesContent":["import { createHeroPreset } from \"./create-hero-preset\";\nimport type { HeroProps } from \"./hero.types\";\n\nconst CampaignHero = createHeroPreset<HeroProps>({\n layout: \"full-width\",\n mediaPosition: \"background\",\n alignment: \"center\",\n height: \"large\",\n theme: \"contrast\",\n overlay: \"gradient\",\n contentWidth: \"wide\",\n});\n\nexport { CampaignHero };\n"],"mappings":";AAGA,MAAM,e,kCAAeA,CAAAA,CAAAA,iBAA4B;CAC/C,QAAQ;CACR,eAAe;CACf,WAAW;CACX,QAAQ;CACR,OAAO;CACP,SAAS;CACT,cAAc;AAChB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createHeroPreset } from "./create-hero-preset.js";
|
|
2
|
+
// src/components/hero/campaign-hero.tsx
|
|
3
|
+
const CampaignHero = createHeroPreset({
|
|
4
|
+
layout: "full-width",
|
|
5
|
+
mediaPosition: "background",
|
|
6
|
+
alignment: "center",
|
|
7
|
+
height: "large",
|
|
8
|
+
theme: "contrast",
|
|
9
|
+
overlay: "gradient",
|
|
10
|
+
contentWidth: "wide"
|
|
11
|
+
});
|
|
12
|
+
export { CampaignHero };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=campaign-hero.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"campaign-hero.js","names":[],"sources":["../../../src/components/hero/campaign-hero.tsx"],"sourcesContent":["import { createHeroPreset } from \"./create-hero-preset\";\nimport type { HeroProps } from \"./hero.types\";\n\nconst CampaignHero = createHeroPreset<HeroProps>({\n layout: \"full-width\",\n mediaPosition: \"background\",\n alignment: \"center\",\n height: \"large\",\n theme: \"contrast\",\n overlay: \"gradient\",\n contentWidth: \"wide\",\n});\n\nexport { CampaignHero };\n"],"mappings":";;AAGA,MAAM,eAAe,iBAA4B;CAC/C,QAAQ;CACR,eAAe;CACf,WAAW;CACX,QAAQ;CACR,OAAO;CACP,SAAS;CACT,cAAc;AAChB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// src/components/hero/centered-hero.tsx
|
|
2
|
+
const CenteredHero = require("./create-hero-preset.cjs").createHeroPreset({
|
|
3
|
+
layout: "centered",
|
|
4
|
+
alignment: "center",
|
|
5
|
+
height: "auto",
|
|
6
|
+
theme: "light",
|
|
7
|
+
overlay: "none",
|
|
8
|
+
contentWidth: "normal"
|
|
9
|
+
});
|
|
10
|
+
exports.CenteredHero = CenteredHero;
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=centered-hero.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"centered-hero.cjs","names":["createHeroPreset"],"sources":["../../../src/components/hero/centered-hero.tsx"],"sourcesContent":["import { createHeroPreset } from \"./create-hero-preset\";\nimport type { HeroProps } from \"./hero.types\";\n\nconst CenteredHero = createHeroPreset<HeroProps>({\n layout: \"centered\",\n alignment: \"center\",\n height: \"auto\",\n theme: \"light\",\n overlay: \"none\",\n contentWidth: \"normal\",\n});\n\nexport { CenteredHero };\n"],"mappings":";AAGA,MAAM,e,kCAAeA,CAAAA,CAAAA,iBAA4B;CAC/C,QAAQ;CACR,WAAW;CACX,QAAQ;CACR,OAAO;CACP,SAAS;CACT,cAAc;AAChB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createHeroPreset } from "./create-hero-preset.js";
|
|
2
|
+
// src/components/hero/centered-hero.tsx
|
|
3
|
+
const CenteredHero = createHeroPreset({
|
|
4
|
+
layout: "centered",
|
|
5
|
+
alignment: "center",
|
|
6
|
+
height: "auto",
|
|
7
|
+
theme: "light",
|
|
8
|
+
overlay: "none",
|
|
9
|
+
contentWidth: "normal"
|
|
10
|
+
});
|
|
11
|
+
export { CenteredHero };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=centered-hero.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"centered-hero.js","names":[],"sources":["../../../src/components/hero/centered-hero.tsx"],"sourcesContent":["import { createHeroPreset } from \"./create-hero-preset\";\nimport type { HeroProps } from \"./hero.types\";\n\nconst CenteredHero = createHeroPreset<HeroProps>({\n layout: \"centered\",\n alignment: \"center\",\n height: \"auto\",\n theme: \"light\",\n overlay: \"none\",\n contentWidth: \"normal\",\n});\n\nexport { CenteredHero };\n"],"mappings":";;AAGA,MAAM,eAAe,iBAA4B;CAC/C,QAAQ;CACR,WAAW;CACX,QAAQ;CACR,OAAO;CACP,SAAS;CACT,cAAc;AAChB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// src/components/hero/coming-soon-hero.tsx
|
|
2
|
+
const ComingSoonHero = require("./create-hero-preset.cjs").createHeroPreset({
|
|
3
|
+
layout: "centered",
|
|
4
|
+
alignment: "center",
|
|
5
|
+
height: "viewport",
|
|
6
|
+
theme: "dark",
|
|
7
|
+
overlay: "none",
|
|
8
|
+
contentWidth: "narrow"
|
|
9
|
+
});
|
|
10
|
+
exports.ComingSoonHero = ComingSoonHero;
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=coming-soon-hero.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coming-soon-hero.cjs","names":["createHeroPreset"],"sources":["../../../src/components/hero/coming-soon-hero.tsx"],"sourcesContent":["import { createHeroPreset } from \"./create-hero-preset\";\nimport type { HeroProps } from \"./hero.types\";\n\nconst ComingSoonHero = createHeroPreset<HeroProps>({\n layout: \"centered\",\n alignment: \"center\",\n height: \"viewport\",\n theme: \"dark\",\n overlay: \"none\",\n contentWidth: \"narrow\",\n});\n\nexport { ComingSoonHero };\n"],"mappings":";AAGA,MAAM,iB,kCAAiBA,CAAAA,CAAAA,iBAA4B;CACjD,QAAQ;CACR,WAAW;CACX,QAAQ;CACR,OAAO;CACP,SAAS;CACT,cAAc;AAChB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createHeroPreset } from "./create-hero-preset.js";
|
|
2
|
+
// src/components/hero/coming-soon-hero.tsx
|
|
3
|
+
const ComingSoonHero = createHeroPreset({
|
|
4
|
+
layout: "centered",
|
|
5
|
+
alignment: "center",
|
|
6
|
+
height: "viewport",
|
|
7
|
+
theme: "dark",
|
|
8
|
+
overlay: "none",
|
|
9
|
+
contentWidth: "narrow"
|
|
10
|
+
});
|
|
11
|
+
export { ComingSoonHero };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=coming-soon-hero.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coming-soon-hero.js","names":[],"sources":["../../../src/components/hero/coming-soon-hero.tsx"],"sourcesContent":["import { createHeroPreset } from \"./create-hero-preset\";\nimport type { HeroProps } from \"./hero.types\";\n\nconst ComingSoonHero = createHeroPreset<HeroProps>({\n layout: \"centered\",\n alignment: \"center\",\n height: \"viewport\",\n theme: \"dark\",\n overlay: \"none\",\n contentWidth: \"narrow\",\n});\n\nexport { ComingSoonHero };\n"],"mappings":";;AAGA,MAAM,iBAAiB,iBAA4B;CACjD,QAAQ;CACR,WAAW;CACX,QAAQ;CACR,OAAO;CACP,SAAS;CACT,cAAc;AAChB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const require_hero = require("./hero.cjs");
|
|
2
|
+
const require_hero_utils = require("./hero.utils.cjs");
|
|
3
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
|
+
// src/components/hero/create-hero-preset.tsx
|
|
5
|
+
const createHeroPreset = (defaults) => {
|
|
6
|
+
const HeroPreset = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_hero.Hero, { ...require_hero_utils.mergeHeroPresetProps(defaults, props) });
|
|
7
|
+
return HeroPreset;
|
|
8
|
+
};
|
|
9
|
+
exports.createHeroPreset = createHeroPreset;
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=create-hero-preset.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-hero-preset.cjs","names":["Hero","mergeHeroPresetProps"],"sources":["../../../src/components/hero/create-hero-preset.tsx"],"sourcesContent":["import { Hero } from \"./hero\";\nimport { mergeHeroPresetProps } from \"./hero.utils\";\n\nimport type { HeroProps } from \"./hero.types\";\n\nexport const createHeroPreset = <T extends HeroProps>(\n defaults: Partial<HeroProps>,\n) => {\n const HeroPreset = (props: T) => (\n <Hero {...mergeHeroPresetProps(defaults, props)} />\n );\n\n return HeroPreset;\n};\n"],"mappings":";;;;AAKA,MAAa,oBACX,aACG;CACH,MAAM,cAAc,UAClB,iBAAA,GAAA,kBAAA,IAAA,CAACA,aAAAA,MAAD,EAAM,GAAIC,mBAAAA,qBAAqB,UAAU,KAAK,EAAI,CAAA;CAGpD,OAAO;AACT"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Hero } from "./hero.js";
|
|
2
|
+
import { mergeHeroPresetProps } from "./hero.utils.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
// src/components/hero/create-hero-preset.tsx
|
|
5
|
+
const createHeroPreset = (defaults) => {
|
|
6
|
+
const HeroPreset = (props) => /* @__PURE__ */ jsx(Hero, { ...mergeHeroPresetProps(defaults, props) });
|
|
7
|
+
return HeroPreset;
|
|
8
|
+
};
|
|
9
|
+
export { createHeroPreset };
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=create-hero-preset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-hero-preset.js","names":[],"sources":["../../../src/components/hero/create-hero-preset.tsx"],"sourcesContent":["import { Hero } from \"./hero\";\nimport { mergeHeroPresetProps } from \"./hero.utils\";\n\nimport type { HeroProps } from \"./hero.types\";\n\nexport const createHeroPreset = <T extends HeroProps>(\n defaults: Partial<HeroProps>,\n) => {\n const HeroPreset = (props: T) => (\n <Hero {...mergeHeroPresetProps(defaults, props)} />\n );\n\n return HeroPreset;\n};\n"],"mappings":";;;;AAKA,MAAa,oBACX,aACG;CACH,MAAM,cAAc,UAClB,oBAAC,MAAD,EAAM,GAAI,qBAAqB,UAAU,KAAK,EAAI,CAAA;CAGpD,OAAO;AACT"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// src/components/hero/dashboard-welcome-hero.tsx
|
|
2
|
+
const DashboardWelcomeHero = require("./create-hero-preset.cjs").createHeroPreset({
|
|
3
|
+
layout: "full-width",
|
|
4
|
+
alignment: "start",
|
|
5
|
+
height: "auto",
|
|
6
|
+
theme: "light",
|
|
7
|
+
overlay: "none",
|
|
8
|
+
contentWidth: "full"
|
|
9
|
+
});
|
|
10
|
+
exports.DashboardWelcomeHero = DashboardWelcomeHero;
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=dashboard-welcome-hero.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-welcome-hero.cjs","names":["createHeroPreset"],"sources":["../../../src/components/hero/dashboard-welcome-hero.tsx"],"sourcesContent":["import { createHeroPreset } from \"./create-hero-preset\";\nimport type { HeroProps } from \"./hero.types\";\n\nconst DashboardWelcomeHero = createHeroPreset<HeroProps>({\n layout: \"full-width\",\n alignment: \"start\",\n height: \"auto\",\n theme: \"light\",\n overlay: \"none\",\n contentWidth: \"full\",\n});\n\nexport { DashboardWelcomeHero };\n"],"mappings":";AAGA,MAAM,uB,kCAAuBA,CAAAA,CAAAA,iBAA4B;CACvD,QAAQ;CACR,WAAW;CACX,QAAQ;CACR,OAAO;CACP,SAAS;CACT,cAAc;AAChB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createHeroPreset } from "./create-hero-preset.js";
|
|
2
|
+
// src/components/hero/dashboard-welcome-hero.tsx
|
|
3
|
+
const DashboardWelcomeHero = createHeroPreset({
|
|
4
|
+
layout: "full-width",
|
|
5
|
+
alignment: "start",
|
|
6
|
+
height: "auto",
|
|
7
|
+
theme: "light",
|
|
8
|
+
overlay: "none",
|
|
9
|
+
contentWidth: "full"
|
|
10
|
+
});
|
|
11
|
+
export { DashboardWelcomeHero };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=dashboard-welcome-hero.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-welcome-hero.js","names":[],"sources":["../../../src/components/hero/dashboard-welcome-hero.tsx"],"sourcesContent":["import { createHeroPreset } from \"./create-hero-preset\";\nimport type { HeroProps } from \"./hero.types\";\n\nconst DashboardWelcomeHero = createHeroPreset<HeroProps>({\n layout: \"full-width\",\n alignment: \"start\",\n height: \"auto\",\n theme: \"light\",\n overlay: \"none\",\n contentWidth: \"full\",\n});\n\nexport { DashboardWelcomeHero };\n"],"mappings":";;AAGA,MAAM,uBAAuB,iBAA4B;CACvD,QAAQ;CACR,WAAW;CACX,QAAQ;CACR,OAAO;CACP,SAAS;CACT,cAAc;AAChB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// src/components/hero/editorial-hero.tsx
|
|
2
|
+
const EditorialHero = require("./create-hero-preset.cjs").createHeroPreset({
|
|
3
|
+
layout: "asymmetric",
|
|
4
|
+
mediaPosition: "right",
|
|
5
|
+
alignment: "start",
|
|
6
|
+
height: "large",
|
|
7
|
+
theme: "light",
|
|
8
|
+
overlay: "none",
|
|
9
|
+
contentWidth: "normal"
|
|
10
|
+
});
|
|
11
|
+
exports.EditorialHero = EditorialHero;
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=editorial-hero.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editorial-hero.cjs","names":["createHeroPreset"],"sources":["../../../src/components/hero/editorial-hero.tsx"],"sourcesContent":["import { createHeroPreset } from \"./create-hero-preset\";\nimport type { HeroProps } from \"./hero.types\";\n\nconst EditorialHero = createHeroPreset<HeroProps>({\n layout: \"asymmetric\",\n mediaPosition: \"right\",\n alignment: \"start\",\n height: \"large\",\n theme: \"light\",\n overlay: \"none\",\n contentWidth: \"normal\",\n});\n\nexport { EditorialHero };\n"],"mappings":";AAGA,MAAM,gB,kCAAgBA,CAAAA,CAAAA,iBAA4B;CAChD,QAAQ;CACR,eAAe;CACf,WAAW;CACX,QAAQ;CACR,OAAO;CACP,SAAS;CACT,cAAc;AAChB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createHeroPreset } from "./create-hero-preset.js";
|
|
2
|
+
// src/components/hero/editorial-hero.tsx
|
|
3
|
+
const EditorialHero = createHeroPreset({
|
|
4
|
+
layout: "asymmetric",
|
|
5
|
+
mediaPosition: "right",
|
|
6
|
+
alignment: "start",
|
|
7
|
+
height: "large",
|
|
8
|
+
theme: "light",
|
|
9
|
+
overlay: "none",
|
|
10
|
+
contentWidth: "normal"
|
|
11
|
+
});
|
|
12
|
+
export { EditorialHero };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=editorial-hero.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editorial-hero.js","names":[],"sources":["../../../src/components/hero/editorial-hero.tsx"],"sourcesContent":["import { createHeroPreset } from \"./create-hero-preset\";\nimport type { HeroProps } from \"./hero.types\";\n\nconst EditorialHero = createHeroPreset<HeroProps>({\n layout: \"asymmetric\",\n mediaPosition: \"right\",\n alignment: \"start\",\n height: \"large\",\n theme: \"light\",\n overlay: \"none\",\n contentWidth: \"normal\",\n});\n\nexport { EditorialHero };\n"],"mappings":";;AAGA,MAAM,gBAAgB,iBAA4B;CAChD,QAAQ;CACR,eAAe;CACf,WAAW;CACX,QAAQ;CACR,OAAO;CACP,SAAS;CACT,cAAc;AAChB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// src/components/hero/full-screen-hero.tsx
|
|
2
|
+
const FullScreenHero = require("./create-hero-preset.cjs").createHeroPreset({
|
|
3
|
+
layout: "full-width",
|
|
4
|
+
mediaPosition: "background",
|
|
5
|
+
alignment: "center",
|
|
6
|
+
height: "viewport",
|
|
7
|
+
theme: "dark",
|
|
8
|
+
overlay: "gradient",
|
|
9
|
+
contentWidth: "wide"
|
|
10
|
+
});
|
|
11
|
+
exports.FullScreenHero = FullScreenHero;
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=full-screen-hero.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"full-screen-hero.cjs","names":["createHeroPreset"],"sources":["../../../src/components/hero/full-screen-hero.tsx"],"sourcesContent":["import { createHeroPreset } from \"./create-hero-preset\";\nimport type { HeroProps } from \"./hero.types\";\n\nconst FullScreenHero = createHeroPreset<HeroProps>({\n layout: \"full-width\",\n mediaPosition: \"background\",\n alignment: \"center\",\n height: \"viewport\",\n theme: \"dark\",\n overlay: \"gradient\",\n contentWidth: \"wide\",\n});\n\nexport { FullScreenHero };\n"],"mappings":";AAGA,MAAM,iB,kCAAiBA,CAAAA,CAAAA,iBAA4B;CACjD,QAAQ;CACR,eAAe;CACf,WAAW;CACX,QAAQ;CACR,OAAO;CACP,SAAS;CACT,cAAc;AAChB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createHeroPreset } from "./create-hero-preset.js";
|
|
2
|
+
// src/components/hero/full-screen-hero.tsx
|
|
3
|
+
const FullScreenHero = createHeroPreset({
|
|
4
|
+
layout: "full-width",
|
|
5
|
+
mediaPosition: "background",
|
|
6
|
+
alignment: "center",
|
|
7
|
+
height: "viewport",
|
|
8
|
+
theme: "dark",
|
|
9
|
+
overlay: "gradient",
|
|
10
|
+
contentWidth: "wide"
|
|
11
|
+
});
|
|
12
|
+
export { FullScreenHero };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=full-screen-hero.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"full-screen-hero.js","names":[],"sources":["../../../src/components/hero/full-screen-hero.tsx"],"sourcesContent":["import { createHeroPreset } from \"./create-hero-preset\";\nimport type { HeroProps } from \"./hero.types\";\n\nconst FullScreenHero = createHeroPreset<HeroProps>({\n layout: \"full-width\",\n mediaPosition: \"background\",\n alignment: \"center\",\n height: \"viewport\",\n theme: \"dark\",\n overlay: \"gradient\",\n contentWidth: \"wide\",\n});\n\nexport { FullScreenHero };\n"],"mappings":";;AAGA,MAAM,iBAAiB,iBAA4B;CACjD,QAAQ;CACR,eAAe;CACf,WAAW;CACX,QAAQ;CACR,OAAO;CACP,SAAS;CACT,cAAc;AAChB,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
let react = require("react");
|
|
3
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
|
+
// src/components/hero/hero-video.tsx
|
|
5
|
+
const HeroVideo = ({ source, className }) => {
|
|
6
|
+
const videoRef = (0, react.useRef)(null);
|
|
7
|
+
(0, react.useEffect)(() => {
|
|
8
|
+
const video = videoRef.current;
|
|
9
|
+
if (!video) return;
|
|
10
|
+
const motionPreference = window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
11
|
+
const synchronizePlayback = () => {
|
|
12
|
+
if (motionPreference.matches) {
|
|
13
|
+
video.pause();
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
video.play()?.catch(() => {});
|
|
17
|
+
};
|
|
18
|
+
synchronizePlayback();
|
|
19
|
+
motionPreference.addEventListener("change", synchronizePlayback);
|
|
20
|
+
return () => {
|
|
21
|
+
motionPreference.removeEventListener("change", synchronizePlayback);
|
|
22
|
+
video.pause();
|
|
23
|
+
};
|
|
24
|
+
}, [source.src]);
|
|
25
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("video", {
|
|
26
|
+
ref: videoRef,
|
|
27
|
+
className,
|
|
28
|
+
muted: true,
|
|
29
|
+
loop: true,
|
|
30
|
+
playsInline: true,
|
|
31
|
+
preload: "metadata",
|
|
32
|
+
poster: source.poster,
|
|
33
|
+
controls: false,
|
|
34
|
+
disablePictureInPicture: true,
|
|
35
|
+
tabIndex: -1,
|
|
36
|
+
"aria-hidden": "true",
|
|
37
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("source", {
|
|
38
|
+
src: source.src,
|
|
39
|
+
type: source.type
|
|
40
|
+
})
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
exports.HeroVideo = HeroVideo;
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=hero-video.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hero-video.cjs","names":["useRef"],"sources":["../../../src/components/hero/hero-video.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useRef } from \"react\";\n\nimport type { HeroVideoSource } from \"./hero.types\";\n\ntype HeroVideoProps = {\n source: HeroVideoSource;\n className?: string;\n};\n\nconst HeroVideo = ({ source, className }: HeroVideoProps) => {\n const videoRef = useRef<HTMLVideoElement>(null);\n\n useEffect(() => {\n const video = videoRef.current;\n\n if (!video) return;\n\n const motionPreference = window.matchMedia(\n \"(prefers-reduced-motion: reduce)\",\n );\n\n const synchronizePlayback = () => {\n if (motionPreference.matches) {\n video.pause();\n return;\n }\n\n const playback = video.play();\n\n playback?.catch(() => {\n // Autoplay can be blocked by browser policies.\n });\n };\n\n synchronizePlayback();\n\n motionPreference.addEventListener(\"change\", synchronizePlayback);\n\n return () => {\n motionPreference.removeEventListener(\"change\", synchronizePlayback);\n video.pause();\n };\n }, [source.src]);\n\n return (\n <video\n ref={videoRef}\n className={className}\n muted\n loop\n playsInline\n preload=\"metadata\"\n poster={source.poster}\n controls={false}\n disablePictureInPicture\n tabIndex={-1}\n aria-hidden=\"true\"\n >\n <source src={source.src} type={source.type} />\n </video>\n );\n};\n\nexport { HeroVideo };\n"],"mappings":";;;;AAWA,MAAM,aAAa,EAAE,QAAQ,gBAAgC;CAC3D,MAAM,YAAA,GAAWA,MAAAA,OAAAA,CAAyB,IAAI;CAE9C,CAAA,GAAA,MAAA,UAAA,OAAgB;EACd,MAAM,QAAQ,SAAS;EAEvB,IAAI,CAAC,OAAO;EAEZ,MAAM,mBAAmB,OAAO,WAC9B,kCACF;EAEA,MAAM,4BAA4B;GAChC,IAAI,iBAAiB,SAAS;IAC5B,MAAM,MAAM;IACZ;GACF;GAIA,MAFuB,KAEhB,CAAC,EAAE,YAAY,CAEtB,CAAC;EACH;EAEA,oBAAoB;EAEpB,iBAAiB,iBAAiB,UAAU,mBAAmB;EAE/D,aAAa;GACX,iBAAiB,oBAAoB,UAAU,mBAAmB;GAClE,MAAM,MAAM;EACd;CACF,GAAG,CAAC,OAAO,GAAG,CAAC;CAEf,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,SAAD;EACE,KAAK;EACM;EACX,OAAA;EACA,MAAA;EACA,aAAA;EACA,SAAQ;EACR,QAAQ,OAAO;EACf,UAAU;EACV,yBAAA;EACA,UAAU;EACV,eAAY;EAEZ,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;GAAQ,KAAK,OAAO;GAAK,MAAM,OAAO;EAAO,CAAA;CACxC,CAAA;AAEX"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useEffect, useRef } from "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
// src/components/hero/hero-video.tsx
|
|
5
|
+
const HeroVideo = ({ source, className }) => {
|
|
6
|
+
const videoRef = useRef(null);
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
const video = videoRef.current;
|
|
9
|
+
if (!video) return;
|
|
10
|
+
const motionPreference = window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
11
|
+
const synchronizePlayback = () => {
|
|
12
|
+
if (motionPreference.matches) {
|
|
13
|
+
video.pause();
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
video.play()?.catch(() => {});
|
|
17
|
+
};
|
|
18
|
+
synchronizePlayback();
|
|
19
|
+
motionPreference.addEventListener("change", synchronizePlayback);
|
|
20
|
+
return () => {
|
|
21
|
+
motionPreference.removeEventListener("change", synchronizePlayback);
|
|
22
|
+
video.pause();
|
|
23
|
+
};
|
|
24
|
+
}, [source.src]);
|
|
25
|
+
return /* @__PURE__ */ jsx("video", {
|
|
26
|
+
ref: videoRef,
|
|
27
|
+
className,
|
|
28
|
+
muted: true,
|
|
29
|
+
loop: true,
|
|
30
|
+
playsInline: true,
|
|
31
|
+
preload: "metadata",
|
|
32
|
+
poster: source.poster,
|
|
33
|
+
controls: false,
|
|
34
|
+
disablePictureInPicture: true,
|
|
35
|
+
tabIndex: -1,
|
|
36
|
+
"aria-hidden": "true",
|
|
37
|
+
children: /* @__PURE__ */ jsx("source", {
|
|
38
|
+
src: source.src,
|
|
39
|
+
type: source.type
|
|
40
|
+
})
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
export { HeroVideo };
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=hero-video.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hero-video.js","names":[],"sources":["../../../src/components/hero/hero-video.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useRef } from \"react\";\n\nimport type { HeroVideoSource } from \"./hero.types\";\n\ntype HeroVideoProps = {\n source: HeroVideoSource;\n className?: string;\n};\n\nconst HeroVideo = ({ source, className }: HeroVideoProps) => {\n const videoRef = useRef<HTMLVideoElement>(null);\n\n useEffect(() => {\n const video = videoRef.current;\n\n if (!video) return;\n\n const motionPreference = window.matchMedia(\n \"(prefers-reduced-motion: reduce)\",\n );\n\n const synchronizePlayback = () => {\n if (motionPreference.matches) {\n video.pause();\n return;\n }\n\n const playback = video.play();\n\n playback?.catch(() => {\n // Autoplay can be blocked by browser policies.\n });\n };\n\n synchronizePlayback();\n\n motionPreference.addEventListener(\"change\", synchronizePlayback);\n\n return () => {\n motionPreference.removeEventListener(\"change\", synchronizePlayback);\n video.pause();\n };\n }, [source.src]);\n\n return (\n <video\n ref={videoRef}\n className={className}\n muted\n loop\n playsInline\n preload=\"metadata\"\n poster={source.poster}\n controls={false}\n disablePictureInPicture\n tabIndex={-1}\n aria-hidden=\"true\"\n >\n <source src={source.src} type={source.type} />\n </video>\n );\n};\n\nexport { HeroVideo };\n"],"mappings":";;;;AAWA,MAAM,aAAa,EAAE,QAAQ,gBAAgC;CAC3D,MAAM,WAAW,OAAyB,IAAI;CAE9C,gBAAgB;EACd,MAAM,QAAQ,SAAS;EAEvB,IAAI,CAAC,OAAO;EAEZ,MAAM,mBAAmB,OAAO,WAC9B,kCACF;EAEA,MAAM,4BAA4B;GAChC,IAAI,iBAAiB,SAAS;IAC5B,MAAM,MAAM;IACZ;GACF;GAIA,MAFuB,KAEhB,CAAC,EAAE,YAAY,CAEtB,CAAC;EACH;EAEA,oBAAoB;EAEpB,iBAAiB,iBAAiB,UAAU,mBAAmB;EAE/D,aAAa;GACX,iBAAiB,oBAAoB,UAAU,mBAAmB;GAClE,MAAM,MAAM;EACd;CACF,GAAG,CAAC,OAAO,GAAG,CAAC;CAEf,OACE,oBAAC,SAAD;EACE,KAAK;EACM;EACX,OAAA;EACA,MAAA;EACA,aAAA;EACA,SAAQ;EACR,QAAQ,OAAO;EACf,UAAU;EACV,yBAAA;EACA,UAAU;EACV,eAAY;EAEZ,UAAA,oBAAC,UAAD;GAAQ,KAAK,OAAO;GAAK,MAAM,OAAO;EAAO,CAAA;CACxC,CAAA;AAEX"}
|