Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion react-checkout/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@formisch/react": "^1.2.0",
"@hono/node-server": "^2.1.7",
"@valibot/i18n": "^1.3.0",
"@whatsaaaa/design-system": "^0.6.1",
"@whatsaaaa/design-system": "^0.8.0",
"@whatsaaaa/form-builder-affects": "0.2.2-rc.0",
"@whatsaaaa/form-builder-react": "1.0.0-rc.0",
"@whatsaaaa/form-builder-schema": "1.0.0-rc.0",
Expand Down
10 changes: 5 additions & 5 deletions react-checkout/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion react-checkout/pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ minimumReleaseAgeExclude:
- '@whatsaaaa/form-builder-schema@1.0.0-rc.0'
- '@whatsaaaa/form-builder-react@1.0.0-rc.0'
- '@whatsaaaa/form-builder-affects@0.2.2-rc.0'
- '@whatsaaaa/design-system@0.6.1'
- '@whatsaaaa/design-system@0.8.0'
52 changes: 27 additions & 25 deletions react-checkout/src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,19 @@

@import '@whatsaaaa/design-system/index.css';

:root {
/*
* The space between the window's edge and what is in it: the tab bar's own, so the edges of the
* form line up with the brand on the left and with the links on the right.
*/
--page-gutter: var(--ws-space-20);
}

@media (width < 64rem) {
:root {
--page-gutter: var(--ws-space-16);
}
}

/* The window: as tall as the screen, as wide as the form. Its content scrolls inside it. */
/*
* The window: as tall as the screen, as wide as the form. Its content scrolls inside it. The form
* stands off the window's edge by the tab bar's own padding, so its edges line up with the brand
* on the left and with the links on the right.
*/

body {
padding: var(--ws-space-20);
}

.page {
max-width: calc(
var(--ws-size-content) + 2 * var(--page-gutter) + 2 *
var(--ws-size-content) + 2 * var(--ws-space-20) + 2 *
var(--ws-border-width-thin)
);
height: calc(100dvh - 2 * var(--ws-space-20));
Expand All @@ -41,7 +31,7 @@ body {
}

.page__content {
padding: var(--ws-space-40) var(--page-gutter) var(--ws-space-48);
padding: var(--ws-space-40) var(--ws-space-20) var(--ws-space-48);
}

/* On a narrow screen the window grows with the form, and the page scrolls. */
Expand All @@ -51,6 +41,10 @@ body {
}

.page {
max-width: calc(
var(--ws-size-content) + 2 * var(--ws-space-16) + 2 *
var(--ws-border-width-thin)
);
height: auto;
min-height: calc(100dvh - 2 * var(--ws-space-12));
}
Expand All @@ -59,8 +53,9 @@ body {
overflow: visible;
}

/* The gutter of a phone, where the tab bar starts its brand. */
.page__content {
padding-block: var(--ws-space-24) var(--ws-space-40);
padding: var(--ws-space-24) var(--ws-space-16) var(--ws-space-40);
}
}

Expand Down Expand Up @@ -217,11 +212,11 @@ body {

.field__error::before {
flex: none;
width: var(--ws-space-16);
width: var(--ws-size-icon);
height: 1lh;
content: '';
background: var(--ws-color-danger);
mask: var(--ws-icon-danger) center / var(--ws-space-16) no-repeat;
mask: var(--ws-icon-danger) center / var(--ws-size-icon) no-repeat;
}

.input {
Expand Down Expand Up @@ -323,8 +318,8 @@ body {
}

.choice__input::before {
width: 1rem;
height: 1rem;
width: var(--ws-size-icon);
height: var(--ws-size-icon);
content: '';
background: var(--ws-color-on-interactive);
mask: var(--ws-icon-check) center / contain no-repeat;
Expand Down Expand Up @@ -448,10 +443,17 @@ body {
column-gap: var(--ws-space-40);
}

@media (width < 64rem) {
/* Fields share a row from 40rem up, and the page's columns from 64rem up. */
@media (width < 40rem) {
.row__cell {
grid-column: 1 / -1;
}
}

@media (width < 64rem) {
.row--sections > .row__cell {
grid-column: 1 / -1;
}

/*
* Stacked, the columns are sections like the others, and are set off from each other the same
Expand Down Expand Up @@ -555,11 +557,11 @@ body {
.notice__title::before,
.notice__message::before {
flex: none;
width: var(--ws-space-16);
width: var(--ws-size-icon);
height: 1lh;
content: '';
background: var(--ws-color-tip);
mask: var(--ws-icon-check) center / var(--ws-space-16) no-repeat;
mask: var(--ws-icon-check) center / var(--ws-size-icon) no-repeat;
}

.notice--error {
Expand Down
13 changes: 10 additions & 3 deletions react-checkout/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import { keysInitScript } from '@whatsaaaa/design-system/shortcuts'
import { themeInitScript } from '@whatsaaaa/design-system/theme'
import { themeColorMeta } from '@whatsaaaa/design-system/theme/meta'
import react from '@vitejs/plugin-react'
import type { Plugin } from 'vite'
import { defineConfig } from 'vitest/config'

/**
* The design system's head scripts, inline in the <head> before the stylesheet: a remembered
* theme and a remembered "keys off" apply before the first paint. They come from the installed
* package, so they stay in step with it.
* The design system's head tags, in the <head> before the stylesheet: the two theme-color tags,
* so the page as it is sent colors the browser's bars, and the head scripts, inline, so a
* remembered theme and a remembered "keys off" apply before the first paint. They come from the
* installed package, so they stay in step with it.
*/
function designSystemHead(): Plugin {
return {
Expand All @@ -16,6 +18,11 @@ function designSystemHead(): Plugin {
// before Vite adds the stylesheet and the app's script at the end of the <head>
order: 'pre',
handler: () => [
...themeColorMeta.map((attrs) => ({
tag: 'meta',
attrs: { ...attrs },
injectTo: 'head' as const,
})),
{ tag: 'script', children: themeInitScript, injectTo: 'head' },
{ tag: 'script', children: keysInitScript, injectTo: 'head' },
],
Expand Down
2 changes: 1 addition & 1 deletion vue-event-registration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"dependencies": {
"@formisch/vue": "^1.2.0",
"@whatsaaaa/design-system": "^0.6.1",
"@whatsaaaa/design-system": "^0.8.0",
"@whatsaaaa/form-builder-affects": "0.2.2-rc.0",
"@whatsaaaa/form-builder-schema": "1.0.0-rc.0",
"@whatsaaaa/form-builder-vue": "1.0.0-rc.0",
Expand Down
10 changes: 5 additions & 5 deletions vue-event-registration/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vue-event-registration/pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ minimumReleaseAgeExclude:
- '@whatsaaaa/form-builder-schema@1.0.0-rc.0'
- '@whatsaaaa/form-builder-vue@1.0.0-rc.0'
- '@whatsaaaa/form-builder-affects@0.2.2-rc.0'
- '@whatsaaaa/design-system@0.6.1'
- '@whatsaaaa/design-system@0.8.0'
Loading
Loading