@troychaplin/parlour-ui 0.1.0
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/LICENSE +21 -0
- package/README.md +328 -0
- package/dist/_shared/client-CLAcY4nN.cjs +1 -0
- package/dist/_shared/client-CsCPbj42.mjs +93 -0
- package/dist/_shared/rolldown-runtime-BocRIvOZ.cjs +1 -0
- package/dist/_shared/shared-B07rlYN8.cjs +1 -0
- package/dist/_shared/shared-DZTw1JIu.mjs +400 -0
- package/dist/components/Article/Article.d.ts +7 -0
- package/dist/components/Article/Article.d.ts.map +1 -0
- package/dist/components/Article/index.cjs +1 -0
- package/dist/components/Article/index.d.ts +9 -0
- package/dist/components/Article/index.d.ts.map +1 -0
- package/dist/components/Article/index.mjs +6 -0
- package/dist/components/Aside/Aside.d.ts +9 -0
- package/dist/components/Aside/Aside.d.ts.map +1 -0
- package/dist/components/Aside/index.cjs +1 -0
- package/dist/components/Aside/index.d.ts +12 -0
- package/dist/components/Aside/index.d.ts.map +1 -0
- package/dist/components/Aside/index.mjs +22 -0
- package/dist/components/Aside/styles.css +3 -0
- package/dist/components/Aside/styles.scss +3 -0
- package/dist/components/Body/Body.d.ts +7 -0
- package/dist/components/Body/Body.d.ts.map +1 -0
- package/dist/components/Body/index.cjs +1 -0
- package/dist/components/Body/index.d.ts +9 -0
- package/dist/components/Body/index.d.ts.map +1 -0
- package/dist/components/Body/index.mjs +9 -0
- package/dist/components/Button/Button.d.ts +24 -0
- package/dist/components/Button/Button.d.ts.map +1 -0
- package/dist/components/Button/index.cjs +1 -0
- package/dist/components/Button/index.d.ts +35 -0
- package/dist/components/Button/index.d.ts.map +1 -0
- package/dist/components/Button/index.mjs +2 -0
- package/dist/components/Button/styles.css +120 -0
- package/dist/components/Button/styles.scss +120 -0
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +10 -0
- package/dist/components/ButtonGroup/ButtonGroup.d.ts.map +1 -0
- package/dist/components/ButtonGroup/index.cjs +1 -0
- package/dist/components/ButtonGroup/index.d.ts +17 -0
- package/dist/components/ButtonGroup/index.d.ts.map +1 -0
- package/dist/components/ButtonGroup/index.mjs +2 -0
- package/dist/components/ButtonGroup/styles.css +22 -0
- package/dist/components/ButtonGroup/styles.scss +22 -0
- package/dist/components/Card/Card.d.ts +16 -0
- package/dist/components/Card/Card.d.ts.map +1 -0
- package/dist/components/Card/index.cjs +1 -0
- package/dist/components/Card/index.d.ts +48 -0
- package/dist/components/Card/index.d.ts.map +1 -0
- package/dist/components/Card/index.mjs +21 -0
- package/dist/components/Card/styles.css +133 -0
- package/dist/components/Card/styles.scss +133 -0
- package/dist/components/CodeBlock/CodeBlock.d.ts +12 -0
- package/dist/components/CodeBlock/CodeBlock.d.ts.map +1 -0
- package/dist/components/CodeBlock/index.cjs +1 -0
- package/dist/components/CodeBlock/index.d.ts +29 -0
- package/dist/components/CodeBlock/index.d.ts.map +1 -0
- package/dist/components/CodeBlock/index.mjs +20 -0
- package/dist/components/CodeBlock/styles.css +53 -0
- package/dist/components/CodeBlock/styles.scss +53 -0
- package/dist/components/Column/Column.d.ts +23 -0
- package/dist/components/Column/Column.d.ts.map +1 -0
- package/dist/components/Column/ColumnContent.d.ts +10 -0
- package/dist/components/Column/ColumnContent.d.ts.map +1 -0
- package/dist/components/Column/index.cjs +1 -0
- package/dist/components/Column/index.d.ts +33 -0
- package/dist/components/Column/index.d.ts.map +1 -0
- package/dist/components/Column/index.mjs +21 -0
- package/dist/components/Column/styles.css +74 -0
- package/dist/components/Column/styles.scss +74 -0
- package/dist/components/Container/Container.d.ts +16 -0
- package/dist/components/Container/Container.d.ts.map +1 -0
- package/dist/components/Container/index.cjs +1 -0
- package/dist/components/Container/index.d.ts +51 -0
- package/dist/components/Container/index.d.ts.map +1 -0
- package/dist/components/Container/index.mjs +2 -0
- package/dist/components/Container/styles.css +126 -0
- package/dist/components/Container/styles.scss +126 -0
- package/dist/components/Figure/Figure.d.ts +12 -0
- package/dist/components/Figure/Figure.d.ts.map +1 -0
- package/dist/components/Figure/index.cjs +1 -0
- package/dist/components/Figure/index.d.ts +14 -0
- package/dist/components/Figure/index.d.ts.map +1 -0
- package/dist/components/Figure/index.mjs +23 -0
- package/dist/components/Figure/styles.css +78 -0
- package/dist/components/Figure/styles.scss +78 -0
- package/dist/components/FlexGroup/FlexGroup.d.ts +21 -0
- package/dist/components/FlexGroup/FlexGroup.d.ts.map +1 -0
- package/dist/components/FlexGroup/index.cjs +1 -0
- package/dist/components/FlexGroup/index.d.ts +69 -0
- package/dist/components/FlexGroup/index.d.ts.map +1 -0
- package/dist/components/FlexGroup/index.mjs +2 -0
- package/dist/components/FlexGroup/styles.css +197 -0
- package/dist/components/FlexGroup/styles.scss +197 -0
- package/dist/components/GridGroup/GridGroup.d.ts +16 -0
- package/dist/components/GridGroup/GridGroup.d.ts.map +1 -0
- package/dist/components/GridGroup/index.cjs +1 -0
- package/dist/components/GridGroup/index.d.ts +46 -0
- package/dist/components/GridGroup/index.d.ts.map +1 -0
- package/dist/components/GridGroup/index.mjs +22 -0
- package/dist/components/GridGroup/styles.css +144 -0
- package/dist/components/GridGroup/styles.scss +144 -0
- package/dist/components/Hero/Hero.d.ts +7 -0
- package/dist/components/Hero/Hero.d.ts.map +1 -0
- package/dist/components/Hero/index.cjs +1 -0
- package/dist/components/Hero/index.d.ts +9 -0
- package/dist/components/Hero/index.d.ts.map +1 -0
- package/dist/components/Hero/index.mjs +23 -0
- package/dist/components/Hero/styles.css +27 -0
- package/dist/components/Hero/styles.scss +27 -0
- package/dist/components/HeroHeader/HeroHeader.d.ts +11 -0
- package/dist/components/HeroHeader/HeroHeader.d.ts.map +1 -0
- package/dist/components/HeroHeader/index.cjs +1 -0
- package/dist/components/HeroHeader/index.d.ts +14 -0
- package/dist/components/HeroHeader/index.d.ts.map +1 -0
- package/dist/components/HeroHeader/index.mjs +30 -0
- package/dist/components/HeroHeader/styles.css +39 -0
- package/dist/components/HeroHeader/styles.scss +39 -0
- package/dist/components/InfoBar/InfoBar.d.ts +8 -0
- package/dist/components/InfoBar/InfoBar.d.ts.map +1 -0
- package/dist/components/InfoBar/index.cjs +1 -0
- package/dist/components/InfoBar/index.d.ts +10 -0
- package/dist/components/InfoBar/index.d.ts.map +1 -0
- package/dist/components/InfoBar/index.mjs +44 -0
- package/dist/components/InfoBar/styles.css +11 -0
- package/dist/components/InfoBar/styles.scss +11 -0
- package/dist/components/LinkProvider/LinkContext.d.ts +4 -0
- package/dist/components/LinkProvider/LinkContext.d.ts.map +1 -0
- package/dist/components/LinkProvider/index.cjs +1 -0
- package/dist/components/LinkProvider/index.d.ts +16 -0
- package/dist/components/LinkProvider/index.d.ts.map +1 -0
- package/dist/components/LinkProvider/index.mjs +11 -0
- package/dist/components/LinkProvider/useLinkContext.d.ts +2 -0
- package/dist/components/LinkProvider/useLinkContext.d.ts.map +1 -0
- package/dist/components/Main/Main.d.ts +8 -0
- package/dist/components/Main/Main.d.ts.map +1 -0
- package/dist/components/Main/index.cjs +1 -0
- package/dist/components/Main/index.d.ts +10 -0
- package/dist/components/Main/index.d.ts.map +1 -0
- package/dist/components/Main/index.mjs +20 -0
- package/dist/components/Main/styles.css +19 -0
- package/dist/components/Main/styles.scss +19 -0
- package/dist/components/SectionHeader/SectionHeader.d.ts +9 -0
- package/dist/components/SectionHeader/SectionHeader.d.ts.map +1 -0
- package/dist/components/SectionHeader/index.cjs +1 -0
- package/dist/components/SectionHeader/index.d.ts +12 -0
- package/dist/components/SectionHeader/index.d.ts.map +1 -0
- package/dist/components/SectionHeader/index.mjs +19 -0
- package/dist/components/SectionHeader/styles.css +29 -0
- package/dist/components/SectionHeader/styles.scss +29 -0
- package/dist/components/SiteHeader/SiteHeader.d.ts +9 -0
- package/dist/components/SiteHeader/SiteHeader.d.ts.map +1 -0
- package/dist/components/SiteHeader/index.cjs +1 -0
- package/dist/components/SiteHeader/index.d.ts +11 -0
- package/dist/components/SiteHeader/index.d.ts.map +1 -0
- package/dist/components/SiteHeader/index.mjs +73 -0
- package/dist/components/SiteHeader/styles.css +47 -0
- package/dist/components/SiteHeader/styles.scss +47 -0
- package/dist/components/_shared/Button-CAFrgdq8.mjs +28 -0
- package/dist/components/_shared/Button-CQIUEu-m.cjs +1 -0
- package/dist/components/_shared/ButtonGroup-B0V_8y-2.mjs +9 -0
- package/dist/components/_shared/ButtonGroup-ChqwMTps.cjs +1 -0
- package/dist/components/_shared/Container-Bl4f1ZwJ.cjs +1 -0
- package/dist/components/_shared/Container-OGjfScEb.mjs +26 -0
- package/dist/components/_shared/FlexGroup-CgPbyEha.cjs +1 -0
- package/dist/components/_shared/FlexGroup-CnOrx2MF.mjs +24 -0
- package/dist/components/_shared/parlour-tokens-BT0frVnY.cjs +1 -0
- package/dist/components/_shared/parlour-tokens-CHt4gBUd.mjs +245 -0
- package/dist/components/_shared/propClasses-CLbmpfVJ.cjs +1 -0
- package/dist/components/_shared/propClasses-R9s_eOfA.mjs +40 -0
- package/dist/components/_shared/rolldown-runtime-BocRIvOZ.cjs +1 -0
- package/dist/components/_shared/useLinkContext-CJko6HGf.mjs +6 -0
- package/dist/components/_shared/useLinkContext-DwwV1iqK.cjs +1 -0
- package/dist/components/tokens/index.cjs +1 -0
- package/dist/components/tokens/index.d.ts +5 -0
- package/dist/components/tokens/index.d.ts.map +1 -0
- package/dist/components/tokens/index.mjs +2 -0
- package/dist/data/ArticleData.d.ts +2 -0
- package/dist/data/ArticleData.d.ts.map +1 -0
- package/dist/data/CodeData.d.ts +3 -0
- package/dist/data/CodeData.d.ts.map +1 -0
- package/dist/data/ImageData.d.ts +5 -0
- package/dist/data/ImageData.d.ts.map +1 -0
- package/dist/data/NewsData.d.ts +11 -0
- package/dist/data/NewsData.d.ts.map +1 -0
- package/dist/data/SampleContent.d.ts +9 -0
- package/dist/data/SampleContent.d.ts.map +1 -0
- package/dist/data-images/attend-1-thumb.jpg +0 -0
- package/dist/data-images/attend-2-thumb.jpg +0 -0
- package/dist/data-images/attend-3-thumb.jpg +0 -0
- package/dist/data-images/attend-4-thumb.jpg +0 -0
- package/dist/data-images/event-1-thumb.jpg +0 -0
- package/dist/data-images/event-2-thumb.jpg +0 -0
- package/dist/data-images/event-3-thumb.jpg +0 -0
- package/dist/data-images/event-4-thumb.jpg +0 -0
- package/dist/data-images/story-1-thumb.jpg +0 -0
- package/dist/data-images/story-2-thumb.jpg +0 -0
- package/dist/data-images/story-3-thumb.jpg +0 -0
- package/dist/data-images/story-4-thumb.jpg +0 -0
- package/dist/docs/stylebook/components/BorderRadiusSamples.d.ts +7 -0
- package/dist/docs/stylebook/components/BorderRadiusSamples.d.ts.map +1 -0
- package/dist/docs/stylebook/components/ColorSwatches.d.ts +9 -0
- package/dist/docs/stylebook/components/ColorSwatches.d.ts.map +1 -0
- package/dist/docs/stylebook/components/ShadowSamples.d.ts +7 -0
- package/dist/docs/stylebook/components/ShadowSamples.d.ts.map +1 -0
- package/dist/docs/stylebook/components/SpacingScale.d.ts +8 -0
- package/dist/docs/stylebook/components/SpacingScale.d.ts.map +1 -0
- package/dist/docs/stylebook/components/TypographyScale.d.ts +23 -0
- package/dist/docs/stylebook/components/TypographyScale.d.ts.map +1 -0
- package/dist/fonts/inter-tight/inter-tight-variable-italic.woff2 +0 -0
- package/dist/fonts/inter-tight/inter-tight-variable-normal.woff2 +0 -0
- package/dist/fonts/jetbrains-mono/jetbrains-mono-variable-italic.woff2 +0 -0
- package/dist/fonts/jetbrains-mono/jetbrains-mono-variable-normal.woff2 +0 -0
- package/dist/fonts/source-serif-4/source-serif-4-variable-italic.woff2 +0 -0
- package/dist/fonts/source-serif-4/source-serif-4-variable-normal.woff2 +0 -0
- package/dist/fonts.css +43 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +3 -0
- package/dist/sample-imgs/event-img.jpg +0 -0
- package/dist/sample-imgs/news-img.jpg +0 -0
- package/dist/sample-imgs/page-img.jpg +0 -0
- package/dist/sample-imgs/people-img.jpg +0 -0
- package/dist/style.css +43 -0
- package/dist/styles/_parlour-variables.scss +83 -0
- package/dist/styles/c2b/parlour-tokens.d.ts +19 -0
- package/dist/styles/parlour-base-styles.css +72 -0
- package/dist/styles/parlour-base-styles.scss +72 -0
- package/dist/styles/parlour-layout.css +50 -0
- package/dist/styles/parlour-layout.scss +50 -0
- package/dist/styles/parlour-tokens.css +129 -0
- package/dist/styles/parlour-tokens.d.ts +19 -0
- package/dist/styles/parlour-tokens.js +148 -0
- package/dist/styles/parlour-tokens.scss +129 -0
- package/dist/styles/parlour-typography.css +29 -0
- package/dist/styles/parlour-typography.scss +29 -0
- package/dist/utils/propClasses.d.ts +101 -0
- package/dist/utils/propClasses.d.ts.map +1 -0
- package/dist/wordpress/block-theme.css +157 -0
- package/dist/wordpress/hybrid-theme.css +324 -0
- package/dist/wordpress/integrate.php +139 -0
- package/dist/wordpress/theme-parlour.json +581 -0
- package/package.json +154 -0
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
/* Auto-generated by component2block — do not edit manually */
|
|
3
|
+
:root {
|
|
4
|
+
/* Colors */
|
|
5
|
+
--parlour--color-black: #191919;
|
|
6
|
+
--parlour--color-white: #ffffff;
|
|
7
|
+
--parlour--color-accent-primary: #a34f3e;
|
|
8
|
+
--parlour--color-accent-secondary: #ca2135;
|
|
9
|
+
--parlour--color-neutral-50: #f9f7f3;
|
|
10
|
+
--parlour--color-neutral-100: #f2f0ea;
|
|
11
|
+
--parlour--color-neutral-200: #efeae2;
|
|
12
|
+
--parlour--color-neutral-300: #e0d6c8;
|
|
13
|
+
--parlour--color-neutral-400: #d8d5cf;
|
|
14
|
+
--parlour--color-neutral-500: #8d7661;
|
|
15
|
+
--parlour--color-neutral-600: #766051;
|
|
16
|
+
--parlour--color-neutral-700: #5e4c42;
|
|
17
|
+
--parlour--color-neutral-800: #51413a;
|
|
18
|
+
--parlour--color-neutral-900: #473a35;
|
|
19
|
+
--parlour--color-neutral-950: #271f1c;
|
|
20
|
+
--parlour--color-info: #2571eb;
|
|
21
|
+
--parlour--color-success: #16a34a;
|
|
22
|
+
--parlour--color-warning: #fff154;
|
|
23
|
+
--parlour--color-error: #dc2626;
|
|
24
|
+
--parlour--color-linkedin: #0A66C2;
|
|
25
|
+
--parlour--color-facebook: #1877F2;
|
|
26
|
+
--parlour--color-bluesky: #1185FE;
|
|
27
|
+
--parlour--color-twitter: #000000;
|
|
28
|
+
--parlour--color-instagram: #E4405F;
|
|
29
|
+
--parlour--color-youtube: #FF0000;
|
|
30
|
+
--parlour--color-tiktok: #010101;
|
|
31
|
+
/* Gradients */
|
|
32
|
+
--parlour--gradient-white-to-neutral-50: linear-gradient(135deg,rgb(250,250,250) 0%,rgb(249, 247, 243) 90%);
|
|
33
|
+
/* Spacing */
|
|
34
|
+
--parlour--spacing-3-x-small: 0.175rem;
|
|
35
|
+
--parlour--spacing-2-x-small: 0.25rem;
|
|
36
|
+
--parlour--spacing-x-small: 0.5rem;
|
|
37
|
+
--parlour--spacing-small: clamp(0.625rem, 0.625rem + ((1vw - 0.2rem) * 0.240), 0.75rem);
|
|
38
|
+
--parlour--spacing-normal: clamp(0.8125rem, 0.8125rem + ((1vw - 0.2rem) * 0.361), 1rem);
|
|
39
|
+
--parlour--spacing-medium: clamp(0.9375rem, 0.9375rem + ((1vw - 0.2rem) * 0.601), 1.25rem);
|
|
40
|
+
--parlour--spacing-large: clamp(1.0625rem, 1.0625rem + ((1vw - 0.2rem) * 0.841), 1.5rem);
|
|
41
|
+
--parlour--spacing-x-large: clamp(1.1875rem, 1.1875rem + ((1vw - 0.2rem) * 1.563), 2rem);
|
|
42
|
+
--parlour--spacing-2-x-large: clamp(1.3125rem, 1.3125rem + ((1vw - 0.2rem) * 2.284), 2.5rem);
|
|
43
|
+
--parlour--spacing-3-x-large: clamp(1.4375rem, 1.4375rem + ((1vw - 0.2rem) * 3.005), 3rem);
|
|
44
|
+
--parlour--spacing-4-x-large: clamp(1.625rem, 1.625rem + ((1vw - 0.2rem) * 4.567), 4rem);
|
|
45
|
+
--parlour--spacing-5-x-large: clamp(1.75rem, 1.75rem + ((1vw - 0.2rem) * 6.250), 5rem);
|
|
46
|
+
/* Font Families */
|
|
47
|
+
--parlour--font-family-inter-tight: 'Inter Tight', system-ui, 'Segoe UI', roboto, sans-serif;
|
|
48
|
+
--parlour--font-family-source-serif-4: 'Source Serif 4', ui-serif, georgia, serif;
|
|
49
|
+
--parlour--font-family-jetbrains-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
|
|
50
|
+
/* Font Sizes */
|
|
51
|
+
--parlour--font-size-2-x-small: clamp(0.6875rem, 0.6875rem + ((1vw - 0.2rem) * 0.12), 0.75rem);
|
|
52
|
+
--parlour--font-size-x-small: clamp(0.8125rem, 0.8125rem + ((1vw - 0.2rem) * 0.12), 0.875rem);
|
|
53
|
+
--parlour--font-size-small: clamp(0.875rem, 0.875rem + ((1vw - 0.2rem) * 0.24), 1rem);
|
|
54
|
+
--parlour--font-size-medium: clamp(1rem, 1rem + ((1vw - 0.2rem) * 0.481), 1.25rem);
|
|
55
|
+
--parlour--font-size-large: clamp(1rem, 1rem + ((1vw - 0.2rem) * 0.962), 1.5rem);
|
|
56
|
+
--parlour--font-size-x-large: clamp(1.4375rem, 1.4375rem + ((1vw - 0.2rem) * 1.082), 2rem);
|
|
57
|
+
--parlour--font-size-2-x-large: clamp(1.75rem, 1.75rem + ((1vw - 0.2rem) * 1.803), 2.6875rem);
|
|
58
|
+
--parlour--font-size-3-x-large: clamp(2.0625rem, 2.0625rem + ((1vw - 0.2rem) * 2.885), 3.5625rem);
|
|
59
|
+
--parlour--font-size-4-x-large: clamp(2.5rem, 2.5rem + ((1vw - 0.2rem) * 4.327), 4.75rem);
|
|
60
|
+
--parlour--font-size-5-x-large: clamp(2.375rem, 2.375rem + ((1vw - 0.2rem) * 6.418), 5.7125rem);
|
|
61
|
+
--parlour--font-size-hero: clamp(3.5625rem, 3.5625rem + ((1vw - 0.2rem) * 9.375), 8.4375rem);
|
|
62
|
+
--parlour--font-size-heading-small: clamp(1rem, 1rem + ((1vw - 0.2rem) * 0.962), 1.5rem);
|
|
63
|
+
--parlour--font-size-heading-medium: clamp(1.25rem, 1.25rem + ((1vw - 0.2rem) * 0.962), 1.75rem);
|
|
64
|
+
--parlour--font-size-heading-large: clamp(1.5rem, 1.5rem + ((1vw - 0.2rem) * 1.442), 2.25rem);
|
|
65
|
+
--parlour--font-size-heading-x-large: clamp(1.75rem, 1.75rem + ((1vw - 0.2rem) * 1.442), 2.5rem);
|
|
66
|
+
--parlour--font-size-heading-primary: clamp(1.75rem, 1.75rem + ((1vw - 0.2rem) * 2.404), 3rem);
|
|
67
|
+
/* Shadows */
|
|
68
|
+
--parlour--shadow-natural: 6px 6px 9px rgba(0, 0, 0, 0.2);
|
|
69
|
+
--parlour--shadow-deep: 12px 12px 50px rgba(0, 0, 0, 0.4);
|
|
70
|
+
--parlour--shadow-sharp: 6px 6px 0px rgba(0, 0, 0, 0.2);
|
|
71
|
+
--parlour--shadow-outlined: 6px 6px 0px -3px rgb(255, 255, 255), 6px 6px rgb(0, 0, 0);
|
|
72
|
+
--parlour--shadow-crisp: 6px 6px 0px rgb(0, 0, 0);
|
|
73
|
+
/* Font Weights */
|
|
74
|
+
--parlour--font-weight-thin: 100;
|
|
75
|
+
--parlour--font-weight-extra-light: 200;
|
|
76
|
+
--parlour--font-weight-light: 300;
|
|
77
|
+
--parlour--font-weight-normal: 400;
|
|
78
|
+
--parlour--font-weight-medium: 500;
|
|
79
|
+
--parlour--font-weight-semibold: 600;
|
|
80
|
+
--parlour--font-weight-bold: 700;
|
|
81
|
+
--parlour--font-weight-extra-bold: 800;
|
|
82
|
+
--parlour--font-weight-black: 900;
|
|
83
|
+
/* Line Heights */
|
|
84
|
+
--parlour--line-height-tight: 1.3;
|
|
85
|
+
--parlour--line-height-normal: 1.6;
|
|
86
|
+
--parlour--line-height-loose: 1.8;
|
|
87
|
+
/* Border Radius */
|
|
88
|
+
--parlour--radius-sm: 2px;
|
|
89
|
+
--parlour--radius-md: 4px;
|
|
90
|
+
--parlour--radius-lg: 8px;
|
|
91
|
+
--parlour--radius-xl: 12px;
|
|
92
|
+
--parlour--radius-full: 9999px;
|
|
93
|
+
/* Transitions */
|
|
94
|
+
--parlour--transition-fast: 150ms ease;
|
|
95
|
+
--parlour--transition-base: 250ms ease;
|
|
96
|
+
/* Z-Index */
|
|
97
|
+
--parlour--z-100: 100;
|
|
98
|
+
--parlour--z-200: 200;
|
|
99
|
+
--parlour--z-500: 500;
|
|
100
|
+
/* Layout */
|
|
101
|
+
--parlour--layout-content-size: 768px;
|
|
102
|
+
--parlour--layout-wide-size: 1152px;
|
|
103
|
+
--parlour--layout-small-size: 600px;
|
|
104
|
+
--parlour--layout-full-size: 100vw;
|
|
105
|
+
/* Viewport */
|
|
106
|
+
--parlour--viewport-mobile: 600px;
|
|
107
|
+
--parlour--viewport-tablet: 768px;
|
|
108
|
+
/* Root Spacing */
|
|
109
|
+
--parlour--root-padding-x: var(--parlour--spacing-x-large);
|
|
110
|
+
--parlour--root-padding-y: 0;
|
|
111
|
+
--parlour--root-padding-top: var(--parlour--root-padding-y);
|
|
112
|
+
--parlour--root-padding-right: var(--parlour--root-padding-x);
|
|
113
|
+
--parlour--root-padding-bottom: var(--parlour--root-padding-y);
|
|
114
|
+
--parlour--root-padding-left: var(--parlour--root-padding-x);
|
|
115
|
+
--parlour--root-block-gap: 0;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.sr-only {
|
|
119
|
+
position: absolute;
|
|
120
|
+
width: 1px;
|
|
121
|
+
height: 1px;
|
|
122
|
+
padding: 0;
|
|
123
|
+
margin: -1px;
|
|
124
|
+
overflow: hidden;
|
|
125
|
+
clip: rect(0, 0, 0, 0);
|
|
126
|
+
white-space: nowrap;
|
|
127
|
+
border-width: 0;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* Auto-generated by component2block — do not edit manually */
|
|
131
|
+
.is-layout-constrained > * + h1 {
|
|
132
|
+
margin-block-start: var(--parlour--spacing-large);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.is-layout-constrained > * + h2 {
|
|
136
|
+
margin-block-start: var(--parlour--spacing-medium);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.is-layout-constrained > * + h3 {
|
|
140
|
+
margin-block-start: var(--parlour--spacing-medium);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.is-layout-constrained > * + h4 {
|
|
144
|
+
margin-block-start: var(--parlour--spacing-medium);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.is-layout-constrained > * + h5 {
|
|
148
|
+
margin-block-start: var(--parlour--spacing-medium);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.is-layout-constrained > * + h6 {
|
|
152
|
+
margin-block-start: var(--parlour--spacing-medium);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.is-layout-constrained > :is(h1, h2, h3, h4, h5, h6) + * {
|
|
156
|
+
margin-block-start: var(--parlour--spacing-small);
|
|
157
|
+
}
|
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
/* Auto-generated by component2block — do not edit manually */
|
|
3
|
+
:root {
|
|
4
|
+
/* Colors */
|
|
5
|
+
--parlour--color-black: #191919;
|
|
6
|
+
--parlour--color-white: #ffffff;
|
|
7
|
+
--parlour--color-accent-primary: #a34f3e;
|
|
8
|
+
--parlour--color-accent-secondary: #ca2135;
|
|
9
|
+
--parlour--color-neutral-50: #f9f7f3;
|
|
10
|
+
--parlour--color-neutral-100: #f2f0ea;
|
|
11
|
+
--parlour--color-neutral-200: #efeae2;
|
|
12
|
+
--parlour--color-neutral-300: #e0d6c8;
|
|
13
|
+
--parlour--color-neutral-400: #d8d5cf;
|
|
14
|
+
--parlour--color-neutral-500: #8d7661;
|
|
15
|
+
--parlour--color-neutral-600: #766051;
|
|
16
|
+
--parlour--color-neutral-700: #5e4c42;
|
|
17
|
+
--parlour--color-neutral-800: #51413a;
|
|
18
|
+
--parlour--color-neutral-900: #473a35;
|
|
19
|
+
--parlour--color-neutral-950: #271f1c;
|
|
20
|
+
--parlour--color-info: #2571eb;
|
|
21
|
+
--parlour--color-success: #16a34a;
|
|
22
|
+
--parlour--color-warning: #fff154;
|
|
23
|
+
--parlour--color-error: #dc2626;
|
|
24
|
+
--parlour--color-linkedin: #0A66C2;
|
|
25
|
+
--parlour--color-facebook: #1877F2;
|
|
26
|
+
--parlour--color-bluesky: #1185FE;
|
|
27
|
+
--parlour--color-twitter: #000000;
|
|
28
|
+
--parlour--color-instagram: #E4405F;
|
|
29
|
+
--parlour--color-youtube: #FF0000;
|
|
30
|
+
--parlour--color-tiktok: #010101;
|
|
31
|
+
/* Gradients */
|
|
32
|
+
--parlour--gradient-white-to-neutral-50: linear-gradient(135deg,rgb(250,250,250) 0%,rgb(249, 247, 243) 90%);
|
|
33
|
+
/* Spacing */
|
|
34
|
+
--parlour--spacing-3-x-small: 0.175rem;
|
|
35
|
+
--parlour--spacing-2-x-small: 0.25rem;
|
|
36
|
+
--parlour--spacing-x-small: 0.5rem;
|
|
37
|
+
--parlour--spacing-small: clamp(0.625rem, 0.625rem + ((1vw - 0.2rem) * 0.240), 0.75rem);
|
|
38
|
+
--parlour--spacing-normal: clamp(0.8125rem, 0.8125rem + ((1vw - 0.2rem) * 0.361), 1rem);
|
|
39
|
+
--parlour--spacing-medium: clamp(0.9375rem, 0.9375rem + ((1vw - 0.2rem) * 0.601), 1.25rem);
|
|
40
|
+
--parlour--spacing-large: clamp(1.0625rem, 1.0625rem + ((1vw - 0.2rem) * 0.841), 1.5rem);
|
|
41
|
+
--parlour--spacing-x-large: clamp(1.1875rem, 1.1875rem + ((1vw - 0.2rem) * 1.563), 2rem);
|
|
42
|
+
--parlour--spacing-2-x-large: clamp(1.3125rem, 1.3125rem + ((1vw - 0.2rem) * 2.284), 2.5rem);
|
|
43
|
+
--parlour--spacing-3-x-large: clamp(1.4375rem, 1.4375rem + ((1vw - 0.2rem) * 3.005), 3rem);
|
|
44
|
+
--parlour--spacing-4-x-large: clamp(1.625rem, 1.625rem + ((1vw - 0.2rem) * 4.567), 4rem);
|
|
45
|
+
--parlour--spacing-5-x-large: clamp(1.75rem, 1.75rem + ((1vw - 0.2rem) * 6.250), 5rem);
|
|
46
|
+
/* Font Families */
|
|
47
|
+
--parlour--font-family-inter-tight: 'Inter Tight', system-ui, 'Segoe UI', roboto, sans-serif;
|
|
48
|
+
--parlour--font-family-source-serif-4: 'Source Serif 4', ui-serif, georgia, serif;
|
|
49
|
+
--parlour--font-family-jetbrains-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
|
|
50
|
+
/* Font Sizes */
|
|
51
|
+
--parlour--font-size-2-x-small: clamp(0.6875rem, 0.6875rem + ((1vw - 0.2rem) * 0.12), 0.75rem);
|
|
52
|
+
--parlour--font-size-x-small: clamp(0.8125rem, 0.8125rem + ((1vw - 0.2rem) * 0.12), 0.875rem);
|
|
53
|
+
--parlour--font-size-small: clamp(0.875rem, 0.875rem + ((1vw - 0.2rem) * 0.24), 1rem);
|
|
54
|
+
--parlour--font-size-medium: clamp(1rem, 1rem + ((1vw - 0.2rem) * 0.481), 1.25rem);
|
|
55
|
+
--parlour--font-size-large: clamp(1rem, 1rem + ((1vw - 0.2rem) * 0.962), 1.5rem);
|
|
56
|
+
--parlour--font-size-x-large: clamp(1.4375rem, 1.4375rem + ((1vw - 0.2rem) * 1.082), 2rem);
|
|
57
|
+
--parlour--font-size-2-x-large: clamp(1.75rem, 1.75rem + ((1vw - 0.2rem) * 1.803), 2.6875rem);
|
|
58
|
+
--parlour--font-size-3-x-large: clamp(2.0625rem, 2.0625rem + ((1vw - 0.2rem) * 2.885), 3.5625rem);
|
|
59
|
+
--parlour--font-size-4-x-large: clamp(2.5rem, 2.5rem + ((1vw - 0.2rem) * 4.327), 4.75rem);
|
|
60
|
+
--parlour--font-size-5-x-large: clamp(2.375rem, 2.375rem + ((1vw - 0.2rem) * 6.418), 5.7125rem);
|
|
61
|
+
--parlour--font-size-hero: clamp(3.5625rem, 3.5625rem + ((1vw - 0.2rem) * 9.375), 8.4375rem);
|
|
62
|
+
--parlour--font-size-heading-small: clamp(1rem, 1rem + ((1vw - 0.2rem) * 0.962), 1.5rem);
|
|
63
|
+
--parlour--font-size-heading-medium: clamp(1.25rem, 1.25rem + ((1vw - 0.2rem) * 0.962), 1.75rem);
|
|
64
|
+
--parlour--font-size-heading-large: clamp(1.5rem, 1.5rem + ((1vw - 0.2rem) * 1.442), 2.25rem);
|
|
65
|
+
--parlour--font-size-heading-x-large: clamp(1.75rem, 1.75rem + ((1vw - 0.2rem) * 1.442), 2.5rem);
|
|
66
|
+
--parlour--font-size-heading-primary: clamp(1.75rem, 1.75rem + ((1vw - 0.2rem) * 2.404), 3rem);
|
|
67
|
+
/* Shadows */
|
|
68
|
+
--parlour--shadow-natural: 6px 6px 9px rgba(0, 0, 0, 0.2);
|
|
69
|
+
--parlour--shadow-deep: 12px 12px 50px rgba(0, 0, 0, 0.4);
|
|
70
|
+
--parlour--shadow-sharp: 6px 6px 0px rgba(0, 0, 0, 0.2);
|
|
71
|
+
--parlour--shadow-outlined: 6px 6px 0px -3px rgb(255, 255, 255), 6px 6px rgb(0, 0, 0);
|
|
72
|
+
--parlour--shadow-crisp: 6px 6px 0px rgb(0, 0, 0);
|
|
73
|
+
/* Font Weights */
|
|
74
|
+
--parlour--font-weight-thin: 100;
|
|
75
|
+
--parlour--font-weight-extra-light: 200;
|
|
76
|
+
--parlour--font-weight-light: 300;
|
|
77
|
+
--parlour--font-weight-normal: 400;
|
|
78
|
+
--parlour--font-weight-medium: 500;
|
|
79
|
+
--parlour--font-weight-semibold: 600;
|
|
80
|
+
--parlour--font-weight-bold: 700;
|
|
81
|
+
--parlour--font-weight-extra-bold: 800;
|
|
82
|
+
--parlour--font-weight-black: 900;
|
|
83
|
+
/* Line Heights */
|
|
84
|
+
--parlour--line-height-tight: 1.3;
|
|
85
|
+
--parlour--line-height-normal: 1.6;
|
|
86
|
+
--parlour--line-height-loose: 1.8;
|
|
87
|
+
/* Border Radius */
|
|
88
|
+
--parlour--radius-sm: 2px;
|
|
89
|
+
--parlour--radius-md: 4px;
|
|
90
|
+
--parlour--radius-lg: 8px;
|
|
91
|
+
--parlour--radius-xl: 12px;
|
|
92
|
+
--parlour--radius-full: 9999px;
|
|
93
|
+
/* Transitions */
|
|
94
|
+
--parlour--transition-fast: 150ms ease;
|
|
95
|
+
--parlour--transition-base: 250ms ease;
|
|
96
|
+
/* Z-Index */
|
|
97
|
+
--parlour--z-100: 100;
|
|
98
|
+
--parlour--z-200: 200;
|
|
99
|
+
--parlour--z-500: 500;
|
|
100
|
+
/* Layout */
|
|
101
|
+
--parlour--layout-content-size: 768px;
|
|
102
|
+
--parlour--layout-wide-size: 1152px;
|
|
103
|
+
--parlour--layout-small-size: 600px;
|
|
104
|
+
--parlour--layout-full-size: 100vw;
|
|
105
|
+
/* Viewport */
|
|
106
|
+
--parlour--viewport-mobile: 600px;
|
|
107
|
+
--parlour--viewport-tablet: 768px;
|
|
108
|
+
/* Root Spacing */
|
|
109
|
+
--parlour--root-padding-x: var(--parlour--spacing-x-large);
|
|
110
|
+
--parlour--root-padding-y: 0;
|
|
111
|
+
--parlour--root-padding-top: var(--parlour--root-padding-y);
|
|
112
|
+
--parlour--root-padding-right: var(--parlour--root-padding-x);
|
|
113
|
+
--parlour--root-padding-bottom: var(--parlour--root-padding-y);
|
|
114
|
+
--parlour--root-padding-left: var(--parlour--root-padding-x);
|
|
115
|
+
--parlour--root-block-gap: 0;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
html {
|
|
119
|
+
font-size: 100%;
|
|
120
|
+
-webkit-text-size-adjust: 100%;
|
|
121
|
+
-webkit-font-smoothing: antialiased;
|
|
122
|
+
-moz-osx-font-smoothing: grayscale;
|
|
123
|
+
scroll-behavior: smooth;
|
|
124
|
+
}
|
|
125
|
+
@media (prefers-reduced-motion: reduce) {
|
|
126
|
+
html {
|
|
127
|
+
scroll-behavior: auto;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
:focus-visible {
|
|
132
|
+
outline: 2px solid var(--parlour--color-accent-primary);
|
|
133
|
+
outline-offset: 2px;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
::selection {
|
|
137
|
+
background-color: var(--parlour--color-accent-primary);
|
|
138
|
+
color: var(--parlour--color-white);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.alignsmall {
|
|
142
|
+
max-width: var(--parlour--layout-small-size) !important;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.aligncontent {
|
|
146
|
+
max-width: var(--parlour--layout-content-size);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.alignwide {
|
|
150
|
+
max-width: var(--parlour--layout-wide-size);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.alignfull {
|
|
154
|
+
max-width: var(--parlour--layout-full-size);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.parlour-main > div > .parlour-layout + .parlour-layout,
|
|
158
|
+
.parlour-main > div > .parlour-layout + :not(.parlour-layout),
|
|
159
|
+
.parlour-main > div > :not(.parlour-layout) + .parlour-layout {
|
|
160
|
+
margin-top: var(--parlour--spacing-4-x-large);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.sr-only {
|
|
164
|
+
position: absolute;
|
|
165
|
+
width: 1px;
|
|
166
|
+
height: 1px;
|
|
167
|
+
padding: 0;
|
|
168
|
+
margin: -1px;
|
|
169
|
+
overflow: hidden;
|
|
170
|
+
clip: rect(0, 0, 0, 0);
|
|
171
|
+
white-space: nowrap;
|
|
172
|
+
border-width: 0;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/* Auto-generated by component2block — do not edit manually */
|
|
176
|
+
body {
|
|
177
|
+
font-family: var(--parlour--font-family-source-serif-4);
|
|
178
|
+
font-size: var(--parlour--font-size-medium);
|
|
179
|
+
font-weight: 300;
|
|
180
|
+
line-height: var(--parlour--line-height-normal);
|
|
181
|
+
color: var(--parlour--color-black);
|
|
182
|
+
background-color: var(--parlour--color-neutral-50);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
:where(h1, h2, h3, h4, h5, h6) {
|
|
186
|
+
font-family: var(--parlour--font-family-inter-tight);
|
|
187
|
+
line-height: 1.1;
|
|
188
|
+
color: var(--parlour--color-neutral-800);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
:where(h1) {
|
|
192
|
+
font-size: var(--parlour--font-size-3-x-large);
|
|
193
|
+
font-style: normal;
|
|
194
|
+
font-weight: 600;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
:where(h2) {
|
|
198
|
+
font-size: var(--parlour--font-size-2-x-large);
|
|
199
|
+
font-style: normal;
|
|
200
|
+
font-weight: 600;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
:where(h3) {
|
|
204
|
+
font-size: var(--parlour--font-size-x-large);
|
|
205
|
+
font-style: normal;
|
|
206
|
+
font-weight: 600;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
:where(h4) {
|
|
210
|
+
font-size: var(--parlour--font-size-large);
|
|
211
|
+
font-style: normal;
|
|
212
|
+
font-weight: 600;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
:where(h5) {
|
|
216
|
+
font-size: var(--parlour--font-size-medium);
|
|
217
|
+
font-style: normal;
|
|
218
|
+
font-weight: 600;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
:where(h6) {
|
|
222
|
+
font-size: var(--parlour--font-size-medium);
|
|
223
|
+
font-style: italic;
|
|
224
|
+
font-weight: 600;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
:where(figcaption) {
|
|
228
|
+
font-size: var(--parlour--font-size-small);
|
|
229
|
+
font-style: italic;
|
|
230
|
+
font-weight: var(--parlour--font-weight-light);
|
|
231
|
+
color: var(--parlour--color-warning);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
:where(button) {
|
|
235
|
+
color: var(--parlour--color-white);
|
|
236
|
+
background-color: var(--parlour--color-black);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
:where(a) {
|
|
240
|
+
color: var(--parlour--color-accent-primary);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
:where(a:hover) {
|
|
244
|
+
color: var(--parlour--color-error);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/* Auto-generated by component2block — do not edit manually */
|
|
248
|
+
:where(.is-layout-constrained) > * {
|
|
249
|
+
margin-block-start: 0;
|
|
250
|
+
margin-block-end: 0;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
:where(.is-layout-constrained) > * + * {
|
|
254
|
+
margin-block-start: var(--parlour--root-block-gap);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
:where(.is-layout-flex) {
|
|
258
|
+
gap: var(--parlour--root-block-gap);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
:where(.is-layout-grid) {
|
|
262
|
+
gap: var(--parlour--root-block-gap);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
:where(.entry-content) > * + * {
|
|
266
|
+
margin-block-start: var(--parlour--spacing-normal);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
|
|
270
|
+
max-width: var(--parlour--layout-content-size);
|
|
271
|
+
margin-left: auto !important;
|
|
272
|
+
margin-right: auto !important;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.is-layout-constrained > .alignwide {
|
|
276
|
+
max-width: var(--parlour--layout-wide-size);
|
|
277
|
+
margin-left: auto !important;
|
|
278
|
+
margin-right: auto !important;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.has-global-padding {
|
|
282
|
+
padding-right: var(--parlour--root-padding-right);
|
|
283
|
+
padding-left: var(--parlour--root-padding-left);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.has-global-padding > .alignfull {
|
|
287
|
+
max-width: none;
|
|
288
|
+
margin-right: calc(var(--parlour--root-padding-right) * -1);
|
|
289
|
+
margin-left: calc(var(--parlour--root-padding-left) * -1);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.has-global-padding > .alignfull > .has-global-padding {
|
|
293
|
+
padding-right: var(--parlour--root-padding-right);
|
|
294
|
+
padding-left: var(--parlour--root-padding-left);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/* Auto-generated by component2block — do not edit manually */
|
|
298
|
+
.is-layout-constrained > * + h1 {
|
|
299
|
+
margin-block-start: var(--parlour--spacing-large);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.is-layout-constrained > * + h2 {
|
|
303
|
+
margin-block-start: var(--parlour--spacing-medium);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.is-layout-constrained > * + h3 {
|
|
307
|
+
margin-block-start: var(--parlour--spacing-medium);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.is-layout-constrained > * + h4 {
|
|
311
|
+
margin-block-start: var(--parlour--spacing-medium);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.is-layout-constrained > * + h5 {
|
|
315
|
+
margin-block-start: var(--parlour--spacing-medium);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.is-layout-constrained > * + h6 {
|
|
319
|
+
margin-block-start: var(--parlour--spacing-medium);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.is-layout-constrained > :is(h1, h2, h3, h4, h5, h6) + * {
|
|
323
|
+
margin-block-start: var(--parlour--spacing-small);
|
|
324
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
/**
|
|
3
|
+
* Component Library WordPress Integration
|
|
4
|
+
*
|
|
5
|
+
* Loads the library's theme-parlour.json as a default base layer and enqueues
|
|
6
|
+
* design token CSS variables. Automatically loads tokens.wp.css
|
|
7
|
+
* (themeable) if present, otherwise falls back to parlour-tokens.css (locked).
|
|
8
|
+
*
|
|
9
|
+
* Setup:
|
|
10
|
+
* 1. Add this function to your theme
|
|
11
|
+
* 2. Copy theme-parlour.json to the root of your theme, and your token CSS file into your theme
|
|
12
|
+
* 2. Add parlour-tokens.css to your theme and include it in your build, or enqueue it
|
|
13
|
+
* require_once get_template_directory() . '/assets/c2b/integrate.php';
|
|
14
|
+
*
|
|
15
|
+
* @package component2block
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
if ( ! defined( 'ABSPATH' ) ) {
|
|
19
|
+
exit;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Inject the library's theme-parlour.json as a WordPress default base layer.
|
|
24
|
+
*
|
|
25
|
+
* This registers design tokens (colors, spacing, fonts, etc.) as
|
|
26
|
+
* WordPress presets. The active theme's theme-parlour.json overrides any
|
|
27
|
+
* values defined here.
|
|
28
|
+
*/
|
|
29
|
+
add_filter( 'wp_theme_json_data_default', function ( $theme_json ) {
|
|
30
|
+
$library_json_path = __DIR__ . '/theme-parlour.json';
|
|
31
|
+
|
|
32
|
+
if ( ! file_exists( $library_json_path ) ) {
|
|
33
|
+
return $theme_json;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
$library_data = json_decode(
|
|
37
|
+
file_get_contents( $library_json_path ),
|
|
38
|
+
true
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
if ( ! is_array( $library_data ) ) {
|
|
42
|
+
return $theme_json;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return $theme_json->update_with( $library_data );
|
|
46
|
+
} );
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Enqueue design token CSS variables.
|
|
50
|
+
*
|
|
51
|
+
* Prefers tokens.wp.css (themeable — maps to --wp--preset--* variables)
|
|
52
|
+
* over parlour-tokens.css (locked — hardcoded values). Both are looked for in
|
|
53
|
+
* the same directory as this file.
|
|
54
|
+
*
|
|
55
|
+
* Loads on both the frontend and inside the block editor iframe.
|
|
56
|
+
*/
|
|
57
|
+
$c2b_enqueue_tokens = function () {
|
|
58
|
+
if ( file_exists( __DIR__ . '/tokens.wp.css' ) ) {
|
|
59
|
+
$file = 'tokens.wp.css';
|
|
60
|
+
} elseif ( file_exists( __DIR__ . '/parlour-tokens.css' ) ) {
|
|
61
|
+
$file = 'parlour-tokens.css';
|
|
62
|
+
} else {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
$base_url = content_url(
|
|
67
|
+
str_replace(
|
|
68
|
+
wp_normalize_path( WP_CONTENT_DIR ),
|
|
69
|
+
'',
|
|
70
|
+
wp_normalize_path( __DIR__ )
|
|
71
|
+
)
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
wp_enqueue_style(
|
|
75
|
+
'c2b-tokens',
|
|
76
|
+
$base_url . '/' . $file,
|
|
77
|
+
array(),
|
|
78
|
+
filemtime( __DIR__ . '/' . $file )
|
|
79
|
+
);
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
add_action( 'wp_enqueue_scripts', $c2b_enqueue_tokens );
|
|
83
|
+
add_action( 'enqueue_block_editor_assets', $c2b_enqueue_tokens );
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Locked mode enforcement.
|
|
87
|
+
*
|
|
88
|
+
* When the library was built with themeable: false (detected by the
|
|
89
|
+
* absence of tokens.wp.css), enforce design system restrictions at the
|
|
90
|
+
* theme layer so the theme's theme-parlour.json cannot override them:
|
|
91
|
+
*
|
|
92
|
+
* - Layout sizes (contentSize, wideSize) are locked
|
|
93
|
+
* - Viewport breakpoints (mobile, tablet) are locked
|
|
94
|
+
* - Custom color/gradient creation is disabled in the Site Editor
|
|
95
|
+
*
|
|
96
|
+
* When themeable: true (tokens.wp.css exists), none of these
|
|
97
|
+
* restrictions apply — the theme has full control.
|
|
98
|
+
*/
|
|
99
|
+
if ( ! file_exists( __DIR__ . '/tokens.wp.css' ) ) {
|
|
100
|
+
add_filter( 'wp_theme_json_data_theme', function ( $theme_json ) {
|
|
101
|
+
$library_json_path = __DIR__ . '/theme-parlour.json';
|
|
102
|
+
|
|
103
|
+
if ( ! file_exists( $library_json_path ) ) {
|
|
104
|
+
return $theme_json;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
$library_data = json_decode(
|
|
108
|
+
file_get_contents( $library_json_path ),
|
|
109
|
+
true
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
if ( ! is_array( $library_data ) ) {
|
|
113
|
+
return $theme_json;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
$enforced = array(
|
|
117
|
+
'version' => $library_data['version'] ?? 3,
|
|
118
|
+
'settings' => array(
|
|
119
|
+
'color' => array(
|
|
120
|
+
'custom' => false,
|
|
121
|
+
'customDuotone' => false,
|
|
122
|
+
'customGradient' => false,
|
|
123
|
+
),
|
|
124
|
+
),
|
|
125
|
+
);
|
|
126
|
+
|
|
127
|
+
// Lock layout sizes if defined
|
|
128
|
+
if ( isset( $library_data['settings']['layout'] ) ) {
|
|
129
|
+
$enforced['settings']['layout'] = $library_data['settings']['layout'];
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Lock viewport breakpoints if defined
|
|
133
|
+
if ( isset( $library_data['settings']['viewport'] ) ) {
|
|
134
|
+
$enforced['settings']['viewport'] = $library_data['settings']['viewport'];
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
return $theme_json->update_with( $enforced );
|
|
138
|
+
} );
|
|
139
|
+
}
|