Skip to content

Commit 2d8a030

Browse files
committed
Merge branch 'master' into stack-bg-color
2 parents fba55db + 7e6f439 commit 2d8a030

329 files changed

Lines changed: 9249 additions & 1291 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.storybook/main.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { StorybookConfig } from '@storybook/vue3-vite';
2+
import { resolve } from 'path';
23

34
const config: StorybookConfig = {
45
stories: [
@@ -16,6 +17,15 @@ const config: StorybookConfig = {
1617
docgen: 'vue-component-meta'
1718
}
1819
},
20+
async viteFinal(config) {
21+
if (config.resolve) {
22+
config.resolve.alias = {
23+
...config.resolve.alias,
24+
'@api': resolve(process.cwd(), 'resources/js/api.js'),
25+
};
26+
}
27+
return config;
28+
},
1929
};
2030

2131
export default config;

.storybook/manager-head.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
<link rel="icon" type="image/x-icon" href="favicon.ico">
2+
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
3+
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
4+
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png">
5+
16
<link rel="preconnect" href="https://fonts.googleapis.com">
27
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
38
<link href="https://fonts.googleapis.com/css2?family=Lexend:wght@400;500;600;700&family=Source+Code+Pro:wght@400;500&display=swap" rel="stylesheet">

.storybook/preview-head.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
<link rel="icon" type="image/x-icon" href="favicon.ico">
2+
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
3+
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
4+
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png">
5+
16
<link rel="preconnect" href="https://use.typekit.net" crossorigin>
27
<link rel="preconnect" href="https://p.typekit.net" crossorigin>
38
<link rel="stylesheet" href="https://use.typekit.net/wyy0pka.css"/>

.storybook/preview.ts

Lines changed: 54 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
1-
import type { Preview } from '@storybook/vue3-vite';
2-
import { setup } from '@storybook/vue3';
3-
import { create as createTheme } from 'storybook/theming';
4-
import { router } from '@inertiajs/vue3';
5-
import { action } from 'storybook/actions';
1+
import type {Preview} from '@storybook/vue3-vite';
2+
import {setup} from '@storybook/vue3';
3+
import {create as createTheme} from 'storybook/theming';
4+
import {router} from '@inertiajs/vue3';
5+
import {action} from 'storybook/actions';
66
import './storybook.css';
77
import './theme.css';
8-
import { translate } from '@/translations/translator';
8+
import {translate} from '@/translations/translator';
99
import registerUiComponents from '@/bootstrap/ui';
1010
import DateFormatter from '@/components/DateFormatter';
1111
import cleanCodeSnippet from './clean-code-snippet';
12+
import PortalVue from 'portal-vue';
13+
import FullscreenHeader from '@/components/publish/FullscreenHeader.vue';
14+
import Portal from '@/components/portals/Portal.vue';
15+
import PortalTargets from '@/components/portals/PortalTargets.vue';
16+
import { portals, stacks } from '@api';
1217

1318
// Intercept Inertia navigation and log to Actions tab.
1419
router.on('before', (event) => {
@@ -18,8 +23,43 @@ router.on('before', (event) => {
1823

1924
setup(async (app) => {
2025
window.__ = translate;
26+
27+
window.Statamic = {
28+
$config: {
29+
get(key) {
30+
const config = {
31+
linkToDocs: true,
32+
paginationSize: 50,
33+
paginationSizeOptions: [10, 25, 50, 100, 500],
34+
};
35+
36+
return config[key] ?? null;
37+
}
38+
},
39+
$commandPalette: {
40+
add(command) {
41+
//
42+
}
43+
},
44+
$progress: {
45+
loading(name, loading) {
46+
//
47+
}
48+
}
49+
};
50+
2151
app.config.globalProperties.__ = translate;
2252
app.config.globalProperties.$date = new DateFormatter;
53+
app.config.globalProperties.cp_url = (url) => url;
54+
app.config.globalProperties.$portals = portals;
55+
app.config.globalProperties.$stacks = stacks;
56+
57+
app.use(PortalVue, { portalName: 'v-portal' });
58+
59+
app.component('portal', Portal);
60+
app.component('PortalTargets', PortalTargets);
61+
app.component('publish-field-fullscreen-header', FullscreenHeader);
62+
2363
await registerUiComponents(app);
2464
});
2565

@@ -50,11 +90,11 @@ const preview: Preview = {
5090
options: {
5191
storySort: {
5292
order: [
53-
// 'Getting Started',
54-
// 'Installation',
55-
'*',
56-
'Components'
93+
'Overview',
94+
'Components',
95+
'*'
5796
],
97+
method: 'alphabetical',
5898
},
5999
},
60100
},
@@ -87,7 +127,10 @@ const preview: Preview = {
87127
}
88128
}
89129

90-
return story();
130+
return {
131+
components: { PortalTargets },
132+
template: '<div><story /><PortalTargets /></div>',
133+
};
91134
},
92135
],
93136
};
12 KB
Loading
633 Bytes
Loading
1.13 KB
Loading

.storybook/public/favicon.ico

15 KB
Binary file not shown.

.storybook/storybook.css

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,34 @@
11
@import 'tailwindcss';
22
@import '../resources/css/ui.css';
3+
@import '../resources/css/core/utilities.css';
4+
@import '../resources/css/elements/tables.css';
5+
@import '../resources/css/components/stacks.css';
36
@custom-variant dark (&:where(.dark, .dark *));
47

5-
.sbdocs h1,
6-
.sbdocs h2,
7-
.sbdocs h3,
8-
.sbdocs h4,
9-
.sbdocs h5,
10-
.sbdocs h6 {
8+
.sbdocs h1:not(.sbdocs-preview *, .sbdocs-preview h1),
9+
.sbdocs h2:not(.sbdocs-preview *, .sbdocs-preview h2),
10+
.sbdocs h3:not(.sbdocs-preview *, .sbdocs-preview h3),
11+
.sbdocs h4:not(.sbdocs-preview *, .sbdocs-preview h4),
12+
.sbdocs h5:not(.sbdocs-preview *, .sbdocs-preview h5),
13+
.sbdocs h6:not(.sbdocs-preview *, .sbdocs-preview h6) {
1114
font-family: p22-mackinac-pro, serif;
1215
}
1316

14-
.sbdocs h1 {
17+
.sbdocs h1:not(.sbdocs-preview *, .sbdocs-preview h1) {
1518
font-size: 2.5rem;
1619
}
1720

18-
.sbdocs h2 {
21+
.sbdocs h2:not(.sbdocs-preview *, .sbdocs-preview h2) {
1922
font-size: 1.75rem;
2023
font-weight: 600;
2124
}
2225

23-
.sbdocs h3 {
26+
.sbdocs h3:not(.sbdocs-preview *, .sbdocs-preview h3) {
2427
font-size: 1.25rem;
2528
}
2629

27-
.sbdocs p,
28-
.sbdocs li {
30+
.sbdocs p:not(.sbdocs-preview *, .sbdocs-preview p),
31+
.sbdocs li:not(.sbdocs-preview *, .sbdocs-preview li) {
2932
font-size: 1rem;
3033
line-height: 1.6;
3134
font-weight: 350;
@@ -44,3 +47,11 @@
4447
.dark .sbdocs-preview {
4548
background: var(--theme-color-content-bg);
4649
}
50+
51+
.docs-story div[scale="1"] {
52+
transform: none !important;
53+
}
54+
55+
.stacks-on-stacks {
56+
z-index: 100;
57+
}

.storybook/theme.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,4 @@ manually copy them here.
4040
--theme-color-ui-accent-text: oklch(0.673 0.182 276.935);
4141
}
4242
}
43+

0 commit comments

Comments
 (0)