@atomic-ui/theme 0.0.0-stage → 0.2.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/README.md +82 -2
- package/dist/fonts/OFL.txt +93 -0
- package/dist/fonts/urbanist-400.ttf +0 -0
- package/dist/fonts/urbanist-500.ttf +0 -0
- package/dist/fonts/urbanist-600.ttf +0 -0
- package/dist/fonts/urbanist-700.ttf +0 -0
- package/dist/index.html +148 -0
- package/dist/theme.css +644 -0
- package/package.json +37 -3
- package/scripts/copy-to-product.mjs +50 -0
package/README.md
CHANGED
|
@@ -1,3 +1,83 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Impkt product theme
|
|
2
2
|
|
|
3
|
-
This
|
|
3
|
+
This is the shared look for Impkt's AI tools: Accessibility, Subject Access, Tender, Deposit, Short-let, Brief and Teardown. It is one stylesheet, `theme.css`, with the Urbanist font beside it in `fonts/`. Each product copies both into its own `public` folder, so there is nothing to build in the product and nothing loads from another site. `specimen/index.html` is a specimen page that shows every part of the theme in one place, and the build puts a copy of it beside the stylesheet as `dist/index.html`.
|
|
4
|
+
|
|
5
|
+
This package replaces the hand-written `impkt-product-theme` repository. Version 0.2.0 is a drop-in replacement for its version 1.0.0: it defines the same `--ik-*` names and styles the same class names.
|
|
6
|
+
|
|
7
|
+
The design follows Strata, Impkt's most carefully designed product, and the Impkt brand as used on weareimpakt.com: warm paper, plum, gold, lilac boards and Urbanist type.
|
|
8
|
+
|
|
9
|
+
## How it is built
|
|
10
|
+
|
|
11
|
+
The stylesheet is generated, so do not edit `dist/theme.css`. `pnpm build` runs `scripts/build.ts`, which does four things.
|
|
12
|
+
|
|
13
|
+
1. It takes the Impkt brand inputs in `src/brand.ts`. They are the same values as the `BRAND` block in impkt-web's `content.py`, which gives the Impkt site its look in Strata.
|
|
14
|
+
2. It derives the house tokens from them with `deriveTokens` from `@atomic-ui/design-tokens`, and writes them as `--impkt-*` custom properties with that package's own emitter, `toStylesheet`.
|
|
15
|
+
3. It defines each `--ik-*` name in `src/theme.ts`. Where a house token has the same role and the same value, the name is defined as that token, for example `--ik-brand: var(--impkt-color-brand-default)`. The site and the products then follow one source. Where there is no house token for the role, or the derived value differs from the value the products were tuned to, the name keeps its 1.0.0 value, and `src/theme.ts` says why beside it. The dark theme keeps its 1.0.0 values, because the brand inputs describe a light brand only.
|
|
16
|
+
4. It measures every contrast pair in `src/contrast.ts` in both themes, and stops if any falls below WCAG 2.2 AA. Then it writes `dist/theme.css`, copies the fonts and their licence into `dist/fonts`, and copies the specimen page.
|
|
17
|
+
|
|
18
|
+
The component styles in `src/components.css` are the 1.0.0 rules, unchanged. The tests check that every `--ik-*` name and every class name from 1.0.0 is still there, that the component styles and dark values are unchanged, and that every name defined by a token comes to its 1.0.0 value.
|
|
19
|
+
|
|
20
|
+
## How to use it
|
|
21
|
+
|
|
22
|
+
1. Build the design system with `pnpm build` at the root of the repository.
|
|
23
|
+
2. Copy the theme into the product with `pnpm theme:copy ../impkt-tender`, naming the product's folder. This copies `theme.css` and the `fonts` folder into the product's `public` folder, and writes the theme's version and the design system's commit on the first line of the copy, so it can be updated later. A second argument names a different folder from `public`. A product that installs `@atomic-ui/theme` from the registry can run the same script as `npx impkt-theme-copy . public`.
|
|
24
|
+
3. Serve `/theme.css` and `/fonts/urbanist-400.ttf`, `-500`, `-600` and `-700` from the product's server, from the same origin as the page.
|
|
25
|
+
4. Link the stylesheet in the page head, before the product's own inline styles:
|
|
26
|
+
|
|
27
|
+
```html
|
|
28
|
+
<link rel="stylesheet" href="/theme.css">
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
5. Give the header the Impkt mark and the product name:
|
|
32
|
+
|
|
33
|
+
```html
|
|
34
|
+
<header class="ik-header">
|
|
35
|
+
<a class="ik-brand" href="/"><span class="ik-mark" aria-hidden="true"></span><span><b>Impkt</b> <span class="ik-product">Tender</span></span></a>
|
|
36
|
+
<!-- the product's own navigation and session controls -->
|
|
37
|
+
</header>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
6. Keep only the product's own CSS inline. Point the product's colour names at the theme's tokens, for example `--accent: var(--ik-brand)`, so existing rules pick up the theme in both light and dark.
|
|
41
|
+
|
|
42
|
+
Every product token starts with `--ik-` and every new class with `.ik-`, so nothing collides with a product's own names. The house tokens they are built from start with `--impkt-`, and a product can read those too. The theme also styles the class names the products already share: `card`, `panel`, `pill` with `ok`, `warn`, `bad` and `info`, `alert` with the same tones, `tabs` with `on`, `muted`, `small` and `row`, and the `primary`, `ghost`, `danger` and `small` buttons. Element rules sit inside `:where()`, so they have no specificity and a product's own rule always wins.
|
|
43
|
+
|
|
44
|
+
## Principles
|
|
45
|
+
|
|
46
|
+
These are taken from the design tokens (`@atomic-ui/design-tokens`) and the component library (`@atomic-ui/ui`) in this repository, and from Strata's CMS, which uses both.
|
|
47
|
+
|
|
48
|
+
**A few inputs, many derived values.** A brand sets about twenty values and `@atomic-ui/design-tokens` derives the rest. The theme is built the same way: it starts from the Impkt brand inputs, and every state is a tone of one of a small set of roles. Hover and pressed are darker tones of the action colour, because a lighter hover on a light surface reads as disabled.
|
|
49
|
+
|
|
50
|
+
**Colours are roles, not hex values.** Surfaces are page, card, inset, subtle and board. Text is ink and muted ink. Lines are a hairline for decoration and a border for controls. Plum is the one action colour. Gold is a fill and a glow and is never used for text, because it cannot carry text on a light surface. Danger, warning, success and information each have three values: one for lines and icons at 3:1, one for text at 4.5:1, and a tint to sit behind them. Strata keeps these apart because the yellow that is fine as an icon is not fine as text.
|
|
51
|
+
|
|
52
|
+
**Contrast is measured, not hoped for.** Every text pair passes WCAG 2.2 AA at 4.5:1 in both themes, and every control border passes 3:1. Muted text is checked on the card, the page and the inset surface. Text on a tinted alert stays in ink, which reads on every tint, and the coloured edge carries the tone.
|
|
53
|
+
|
|
54
|
+
**The page carries no text directly.** Text sits on a card. The page is warm paper; cards are white with a hairline and a soft shadow tinted with the ink colour, so they sit on the paper rather than look pasted on.
|
|
55
|
+
|
|
56
|
+
**Focus is locked.** The focus ring is two bands, white inside dark, so it shows on any surface, including plum. A product does not choose its own focus colour. The ring uses `:focus-visible`, so a mouse click does not draw it, and a transparent outline sits behind it for Windows High Contrast Mode. Inside a box that clips, such as a scrolling tab row, the ring is drawn inside the element.
|
|
57
|
+
|
|
58
|
+
**One type family and a short ramp.** Urbanist, as on weareimpakt.com, with Avenir Next, Helvetica Neue and the system face behind it. The ramp runs 14, 15, 16, 18, 20, 24 and 30 pixels. Nothing is smaller than 14px. Fields are 16px, which also stops a phone zooming into them. Headings are semibold with slightly tight tracking, and status words are in sentence case.
|
|
59
|
+
|
|
60
|
+
**A 4px rhythm.** Every gap is a whole number of 4px steps. Page margins are 16px on a phone, 24px on a tablet and 32px on a desktop.
|
|
61
|
+
|
|
62
|
+
**Rounded together.** Radii step from one base: 8px for small things, 12px for fields and alerts, 16px and 20px for cards, and full pills for buttons, tabs and status pills, as on weareimpakt.com.
|
|
63
|
+
|
|
64
|
+
**Density follows the pointer.** Controls are 40px tall with a mouse and 44px on a touch screen. No target is smaller than 24px, which is WCAG 2.2's minimum, and that floor does not move with the spacing.
|
|
65
|
+
|
|
66
|
+
**Calm motion.** Transitions are short (140ms to 360ms) on one standard curve with no overshoot. When the device asks for reduced motion, every animation and transition is cut to 0.01ms, which still fires the end event that scripts may wait for.
|
|
67
|
+
|
|
68
|
+
**Light and dark are the same design.** Dark mode follows the device and can be forced with `data-theme="dark"` or `data-theme="light"` on the root element. The roles do not change, only their values.
|
|
69
|
+
|
|
70
|
+
## Components
|
|
71
|
+
|
|
72
|
+
- **Header.** `.ik-header` holds `.ik-brand`, the orb mark and the words "Impkt" and the product name, on one row at every width. Add `.ik-sticky` to keep it at the top while scrolling.
|
|
73
|
+
- **Buttons.** Solid plum for the one main action (`primary`), an outline on the card for the rest, words only for a quiet action (`ghost`), and red words for a destructive one (`danger`). Disabled and busy change the cursor and the opacity, never the size or position.
|
|
74
|
+
- **Fields.** A card-coloured box with a 3:1 border, 44px tall. Focus draws the ring and a soft plum halo. An error thickens the border and turns it red, and the message below says it in words. `.ik-field` stacks a label, a field and an `.ik-hint`.
|
|
75
|
+
- **Tabs.** A white pill bar with the chosen tab in lilac. It stays one row at every width and scrolls sideways when the labels do not fit.
|
|
76
|
+
- **Cards.** `.card`, `.panel` or `.ik-card`. `.ik-board` is a lilac board that groups cards.
|
|
77
|
+
- **Tables.** Hairline rows, muted 14px headings and tabular figures in `.num` cells. A table with `.ik-stack` becomes one labelled card per row on a phone, using each cell's `data-label`.
|
|
78
|
+
- **Pills.** Sentence-case status words with `ok`, `warn`, `bad`, `info` or `brand`.
|
|
79
|
+
- **Alerts.** A tint with a 4px edge on the leading side, in the same tones as the pills.
|
|
80
|
+
|
|
81
|
+
## Fonts
|
|
82
|
+
|
|
83
|
+
Urbanist is by the Urbanist Project Authors and is licensed under the SIL Open Font License 1.1. The licence is in `fonts/OFL.txt`, and it is copied beside the fonts wherever they go. Urbanist has Latin letters only, so Greek and Russian text falls back to the next face in the stack.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2021 The Urbanist Project Authors (https://github.com/coreyhu/Urbanist)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
http://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/index.html
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en-GB">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<title>Impkt product theme</title>
|
|
7
|
+
<link rel="stylesheet" href="theme.css">
|
|
8
|
+
<style>
|
|
9
|
+
main { max-width: 960px; margin: 0 auto; padding: var(--ik-space-6) var(--ik-gutter) var(--ik-space-12); }
|
|
10
|
+
section { margin-bottom: var(--ik-space-8); }
|
|
11
|
+
.lede { color: var(--ik-ink-muted); max-width: 60ch; margin: 0 0 var(--ik-space-6); }
|
|
12
|
+
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--ik-space-3); }
|
|
13
|
+
.swatch { border: 1px solid var(--ik-line); border-radius: var(--ik-radius-md); overflow: hidden; background: var(--ik-surface-card); font-size: var(--ik-text-xs); }
|
|
14
|
+
.swatch i { display: block; height: 52px; }
|
|
15
|
+
.swatch span { display: block; padding: var(--ik-space-2) var(--ik-space-3); }
|
|
16
|
+
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--ik-space-4); }
|
|
17
|
+
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
|
|
18
|
+
.ramp p { margin: 0 0 var(--ik-space-2); }
|
|
19
|
+
</style>
|
|
20
|
+
</head>
|
|
21
|
+
<body>
|
|
22
|
+
<a class="ik-skip" href="#main">Skip to the content</a>
|
|
23
|
+
<header class="ik-header">
|
|
24
|
+
<a class="ik-brand" href="./"><span class="ik-mark" aria-hidden="true"></span><span><b>Impkt</b> <span class="ik-product">Specimen</span></span></a>
|
|
25
|
+
<div class="row">
|
|
26
|
+
<label for="theme" class="ik-sr-only">Theme</label>
|
|
27
|
+
<select id="theme" style="min-height:36px;padding:4px 10px">
|
|
28
|
+
<option value="">Device theme</option>
|
|
29
|
+
<option value="light">Light</option>
|
|
30
|
+
<option value="dark">Dark</option>
|
|
31
|
+
</select>
|
|
32
|
+
</div>
|
|
33
|
+
</header>
|
|
34
|
+
|
|
35
|
+
<main id="main">
|
|
36
|
+
<h1>Impkt product theme</h1>
|
|
37
|
+
<p class="lede">Every part of the shared look on one page. Change the theme at the top to see the dark version, and narrow the window to see the phone layout.</p>
|
|
38
|
+
|
|
39
|
+
<section aria-labelledby="h-colour">
|
|
40
|
+
<h2 id="h-colour">Colour roles</h2>
|
|
41
|
+
<div class="swatches">
|
|
42
|
+
<div class="swatch"><i style="background:var(--ik-surface-page)"></i><span>Page</span></div>
|
|
43
|
+
<div class="swatch"><i style="background:var(--ik-surface-card)"></i><span>Card</span></div>
|
|
44
|
+
<div class="swatch"><i style="background:var(--ik-surface-inset)"></i><span>Inset</span></div>
|
|
45
|
+
<div class="swatch"><i style="background:var(--ik-surface-board)"></i><span>Board</span></div>
|
|
46
|
+
<div class="swatch"><i style="background:var(--ik-ink)"></i><span>Ink</span></div>
|
|
47
|
+
<div class="swatch"><i style="background:var(--ik-ink-muted)"></i><span>Muted ink</span></div>
|
|
48
|
+
<div class="swatch"><i style="background:var(--ik-brand)"></i><span>Plum, the action colour</span></div>
|
|
49
|
+
<div class="swatch"><i style="background:var(--ik-gold)"></i><span>Gold, a fill only</span></div>
|
|
50
|
+
<div class="swatch"><i style="background:var(--ik-danger)"></i><span>Danger</span></div>
|
|
51
|
+
<div class="swatch"><i style="background:var(--ik-warning)"></i><span>Warning</span></div>
|
|
52
|
+
<div class="swatch"><i style="background:var(--ik-success)"></i><span>Success</span></div>
|
|
53
|
+
<div class="swatch"><i style="background:var(--ik-info)"></i><span>Information</span></div>
|
|
54
|
+
</div>
|
|
55
|
+
</section>
|
|
56
|
+
|
|
57
|
+
<section aria-labelledby="h-type" class="ramp">
|
|
58
|
+
<h2 id="h-type">Type</h2>
|
|
59
|
+
<div class="card">
|
|
60
|
+
<p style="font-size:var(--ik-text-3xl);font-weight:600;letter-spacing:-.02em;line-height:1.2">Thirty pixels for a page title</p>
|
|
61
|
+
<p style="font-size:var(--ik-text-2xl);font-weight:600">Twenty-four for a main heading</p>
|
|
62
|
+
<p style="font-size:var(--ik-text-xl);font-weight:600">Twenty for a section</p>
|
|
63
|
+
<p style="font-size:var(--ik-text-lg)">Eighteen for a lead paragraph</p>
|
|
64
|
+
<p>Sixteen for body text and for every field.</p>
|
|
65
|
+
<p style="font-size:var(--ik-text-sm)">Fifteen for buttons, labels and dense rows.</p>
|
|
66
|
+
<p class="small muted">Fourteen, the smallest size, for pills, captions and table headings.</p>
|
|
67
|
+
</div>
|
|
68
|
+
</section>
|
|
69
|
+
|
|
70
|
+
<section aria-labelledby="h-actions">
|
|
71
|
+
<h2 id="h-actions">Buttons</h2>
|
|
72
|
+
<div class="card row">
|
|
73
|
+
<button class="primary" type="button">Save the brief</button>
|
|
74
|
+
<button type="button">Add a file</button>
|
|
75
|
+
<button class="ghost" type="button">Cancel</button>
|
|
76
|
+
<button class="danger" type="button">Delete</button>
|
|
77
|
+
<button class="small" type="button">Small</button>
|
|
78
|
+
<button class="primary" type="button" disabled>Disabled</button>
|
|
79
|
+
</div>
|
|
80
|
+
</section>
|
|
81
|
+
|
|
82
|
+
<section aria-labelledby="h-fields">
|
|
83
|
+
<h2 id="h-fields">Fields</h2>
|
|
84
|
+
<form class="card" onsubmit="event.preventDefault()">
|
|
85
|
+
<div class="grid2">
|
|
86
|
+
<div class="ik-field"><label for="f1">Client name</label><input id="f1" placeholder="Harbour Dental"></div>
|
|
87
|
+
<div class="ik-field"><label for="f2">Scheme</label><select id="f2"><option>TDS</option><option>DPS</option><option>mydeposits</option></select></div>
|
|
88
|
+
<div class="ik-field"><label for="f3">Email</label><input id="f3" type="email" aria-invalid="true" aria-describedby="f3e" value="not an address"><span id="f3e" class="ik-hint" style="color:var(--ik-danger-text)">Enter an email address, such as name@example.com.</span></div>
|
|
89
|
+
<div class="ik-field"><label for="f4">Upload</label><input id="f4" type="file"></div>
|
|
90
|
+
</div>
|
|
91
|
+
<div class="ik-field"><label for="f5">Notes</label><textarea id="f5">Anything the reviewer should know.</textarea><span class="ik-hint">This stays inside your organisation.</span></div>
|
|
92
|
+
<label class="row" style="font-weight:400"><input type="checkbox" checked> Everyone on the call agreed to the recording.</label>
|
|
93
|
+
</form>
|
|
94
|
+
</section>
|
|
95
|
+
|
|
96
|
+
<section aria-labelledby="h-tabs">
|
|
97
|
+
<h2 id="h-tabs">Tabs</h2>
|
|
98
|
+
<div class="tabs" role="tablist" aria-label="Sections">
|
|
99
|
+
<button class="on" role="tab" aria-selected="true">Overview</button>
|
|
100
|
+
<button role="tab" aria-selected="false">Transcript</button>
|
|
101
|
+
<button role="tab" aria-selected="false">Brief</button>
|
|
102
|
+
<button role="tab" aria-selected="false">Estimate</button>
|
|
103
|
+
<button role="tab" aria-selected="false">Follow-up email</button>
|
|
104
|
+
<button role="tab" aria-selected="false">Exports</button>
|
|
105
|
+
</div>
|
|
106
|
+
</section>
|
|
107
|
+
|
|
108
|
+
<section aria-labelledby="h-status">
|
|
109
|
+
<h2 id="h-status">Pills and alerts</h2>
|
|
110
|
+
<div class="card">
|
|
111
|
+
<p class="row"><span class="pill">Draft</span><span class="pill ok">Brief ready</span><span class="pill warn">Needs attention</span><span class="pill bad">Failed</span><span class="pill info">Reading</span><span class="pill brand">New</span></p>
|
|
112
|
+
<div class="alert ok"><b>Saved.</b> The letter is stored and will not change.</div>
|
|
113
|
+
<div class="alert warn"><b>Check this.</b> The insurance policy does not show public liability cover.</div>
|
|
114
|
+
<div class="alert bad"><b>That did not work.</b> The file is larger than 50 MB.</div>
|
|
115
|
+
<div class="alert info">The model reads the tender in the background.</div>
|
|
116
|
+
</div>
|
|
117
|
+
</section>
|
|
118
|
+
|
|
119
|
+
<section aria-labelledby="h-table">
|
|
120
|
+
<h2 id="h-table">Table</h2>
|
|
121
|
+
<div class="card">
|
|
122
|
+
<table class="ik-stack">
|
|
123
|
+
<thead><tr><th scope="col">Piece</th><th scope="col">Size</th><th scope="col" class="num">Days</th><th scope="col" class="num">Cost</th></tr></thead>
|
|
124
|
+
<tbody>
|
|
125
|
+
<tr><td data-label="Piece">Online booking with reminders</td><td data-label="Size">Medium</td><td data-label="Days" class="num">8</td><td data-label="Cost" class="num">£4,800</td></tr>
|
|
126
|
+
<tr><td data-label="Piece">Patient records import</td><td data-label="Size">Small</td><td data-label="Days" class="num">3</td><td data-label="Cost" class="num">£1,800</td></tr>
|
|
127
|
+
<tr><td data-label="Piece">Card payments for deposits</td><td data-label="Size">Large</td><td data-label="Days" class="num">13</td><td data-label="Cost" class="num">£7,800</td></tr>
|
|
128
|
+
</tbody>
|
|
129
|
+
</table>
|
|
130
|
+
</div>
|
|
131
|
+
</section>
|
|
132
|
+
|
|
133
|
+
<section aria-labelledby="h-board">
|
|
134
|
+
<h2 id="h-board">Board</h2>
|
|
135
|
+
<div class="ik-board">
|
|
136
|
+
<div class="card" style="margin:0">A lilac board holds a group of cards, as the presentation boards do on weareimpakt.com.</div>
|
|
137
|
+
</div>
|
|
138
|
+
</section>
|
|
139
|
+
</main>
|
|
140
|
+
<script>
|
|
141
|
+
const sel = document.getElementById('theme');
|
|
142
|
+
sel.addEventListener('change', () => {
|
|
143
|
+
if (sel.value) document.documentElement.dataset.theme = sel.value;
|
|
144
|
+
else delete document.documentElement.dataset.theme;
|
|
145
|
+
});
|
|
146
|
+
</script>
|
|
147
|
+
</body>
|
|
148
|
+
</html>
|
package/dist/theme.css
ADDED
|
@@ -0,0 +1,644 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Impkt product theme, @atomic-ui/theme version 0.2.0.
|
|
3
|
+
* https://github.com/matthill8286/impkt-design-system/tree/main/packages/theme
|
|
4
|
+
*
|
|
5
|
+
* Generated from the Impkt brand inputs by @atomic-ui/design-tokens. Do not edit this file:
|
|
6
|
+
* change packages/theme in the design system and build it again.
|
|
7
|
+
*
|
|
8
|
+
* Copy this file and the fonts folder into a product's public folder, serve them from the same
|
|
9
|
+
* origin, and link the file before the product's own inline styles. The rules here use low
|
|
10
|
+
* specificity on purpose, so a product's own rules win without !important.
|
|
11
|
+
*
|
|
12
|
+
* Every product name starts with --ik- or .ik- so it never collides with a product's own names.
|
|
13
|
+
* The house tokens they are built from start with --impkt-. The shared class names that products
|
|
14
|
+
* already use (card, panel, pill, alert, tabs, muted, small, row) are styled here too, so a
|
|
15
|
+
* product gets the look by keeping its markup.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/* ---------------------------------------------------------------- fonts */
|
|
19
|
+
|
|
20
|
+
@font-face { font-family: "Urbanist"; font-style: normal; font-weight: 400; font-display: swap; src: local("Urbanist Regular"), local("Urbanist-Regular"), url("fonts/urbanist-400.ttf") format("truetype"); }
|
|
21
|
+
@font-face { font-family: "Urbanist"; font-style: normal; font-weight: 500; font-display: swap; src: local("Urbanist Medium"), local("Urbanist-Medium"), url("fonts/urbanist-500.ttf") format("truetype"); }
|
|
22
|
+
@font-face { font-family: "Urbanist"; font-style: normal; font-weight: 600; font-display: swap; src: local("Urbanist SemiBold"), local("Urbanist-SemiBold"), url("fonts/urbanist-600.ttf") format("truetype"); }
|
|
23
|
+
@font-face { font-family: "Urbanist"; font-style: normal; font-weight: 700; font-display: swap; src: local("Urbanist Bold"), local("Urbanist-Bold"), url("fonts/urbanist-700.ttf") format("truetype"); }
|
|
24
|
+
|
|
25
|
+
/* ---------------------------------------------------------- house tokens */
|
|
26
|
+
|
|
27
|
+
/* The Impkt brand, derived by @atomic-ui/design-tokens and written by its own emitter. */
|
|
28
|
+
|
|
29
|
+
:root {
|
|
30
|
+
--impkt-focus-ring-inner: #ffffff;
|
|
31
|
+
--impkt-focus-ring-outer: #1a1a1a;
|
|
32
|
+
--impkt-focus-ring-width: 2px;
|
|
33
|
+
--impkt-focus-ring-offset: 2px;
|
|
34
|
+
--impkt-focus-ring-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #1a1a1a;
|
|
35
|
+
--impkt-target-min: 24px;
|
|
36
|
+
--impkt-target-spacing: 8px;
|
|
37
|
+
--impkt-color-surface-page: #F7F4F2;
|
|
38
|
+
--impkt-color-surface-card: #FFFFFF;
|
|
39
|
+
--impkt-color-surface-header: #F7F4F2;
|
|
40
|
+
--impkt-color-surface-footer: #F0EBE5;
|
|
41
|
+
--impkt-color-surface-subtle: #edeaef;
|
|
42
|
+
--impkt-color-surface-inset: #f4f4f4;
|
|
43
|
+
--impkt-color-brand-default: #6B5279;
|
|
44
|
+
--impkt-color-brand-hover: #5e486a;
|
|
45
|
+
--impkt-color-brand-active: #513e5c;
|
|
46
|
+
--impkt-color-brand-subtle: #edeaef;
|
|
47
|
+
--impkt-color-brand-on: #ffffff;
|
|
48
|
+
--impkt-color-accent-default: #E2CC40;
|
|
49
|
+
--impkt-color-accent-hover: #c7b438;
|
|
50
|
+
--impkt-color-accent-on: #1a1a1a;
|
|
51
|
+
--impkt-color-text-default: #241a2e;
|
|
52
|
+
--impkt-color-text-muted: #77717d;
|
|
53
|
+
--impkt-color-text-placeholder: #747078;
|
|
54
|
+
--impkt-color-text-on-brand: #ffffff;
|
|
55
|
+
--impkt-color-text-on-header: #746a2b;
|
|
56
|
+
--impkt-color-text-on-footer: #746a2b;
|
|
57
|
+
--impkt-color-text-heading: #7e732d;
|
|
58
|
+
--impkt-color-chart-1: #9c8e33;
|
|
59
|
+
--impkt-color-chart-2: #3f7fae;
|
|
60
|
+
--impkt-color-chart-3: #3e7d58;
|
|
61
|
+
--impkt-color-chart-4: #ab941e;
|
|
62
|
+
--impkt-color-chart-5: #b4505a;
|
|
63
|
+
--impkt-color-text-link: #6b5279;
|
|
64
|
+
--impkt-color-text-link-hover: #564261;
|
|
65
|
+
--impkt-color-border-default: #949297;
|
|
66
|
+
--impkt-color-border-strong: #87818c;
|
|
67
|
+
--impkt-color-status-danger-default: #b4505a;
|
|
68
|
+
--impkt-color-status-danger-text: #b4505a;
|
|
69
|
+
--impkt-color-status-danger-subtle: #f6eaeb;
|
|
70
|
+
--impkt-color-status-danger-on: #ffffff;
|
|
71
|
+
--impkt-color-status-warning-default: #ab941e;
|
|
72
|
+
--impkt-color-status-warning-text: #85741d;
|
|
73
|
+
--impkt-color-status-warning-subtle: #f6f3e4;
|
|
74
|
+
--impkt-color-status-warning-on: #1a1a1a;
|
|
75
|
+
--impkt-color-status-success-default: #3e7d58;
|
|
76
|
+
--impkt-color-status-success-text: #3e7d58;
|
|
77
|
+
--impkt-color-status-success-subtle: #e8efeb;
|
|
78
|
+
--impkt-color-status-success-on: #ffffff;
|
|
79
|
+
--impkt-color-status-info-default: #3f7fae;
|
|
80
|
+
--impkt-color-status-info-text: #3d7aa7;
|
|
81
|
+
--impkt-color-status-info-subtle: #e8f0f5;
|
|
82
|
+
--impkt-color-status-info-on: #ffffff;
|
|
83
|
+
--impkt-font-family-body: Urbanist, "Avenir Next", "Helvetica Neue", Arial, sans-serif;
|
|
84
|
+
--impkt-font-family-heading: Urbanist, "Avenir Next", "Helvetica Neue", Arial, sans-serif;
|
|
85
|
+
--impkt-font-family-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
|
|
86
|
+
--impkt-font-family-eyebrow: Urbanist, "Avenir Next", "Helvetica Neue", Arial, sans-serif;
|
|
87
|
+
--impkt-font-size-root: 17px;
|
|
88
|
+
--impkt-font-size-2xs: 0.75rem;
|
|
89
|
+
--impkt-font-leading-2xs: 1.333;
|
|
90
|
+
--impkt-font-size-xs: 0.75rem;
|
|
91
|
+
--impkt-font-leading-xs: 1.333;
|
|
92
|
+
--impkt-font-size-sm: 0.875rem;
|
|
93
|
+
--impkt-font-leading-sm: 1.429;
|
|
94
|
+
--impkt-font-size-md: 1rem;
|
|
95
|
+
--impkt-font-leading-md: 1.5;
|
|
96
|
+
--impkt-font-size-lg: 1.125rem;
|
|
97
|
+
--impkt-font-leading-lg: 1.556;
|
|
98
|
+
--impkt-font-size-xl: 1.25rem;
|
|
99
|
+
--impkt-font-leading-xl: 1.4;
|
|
100
|
+
--impkt-font-size-2xl: 1.5rem;
|
|
101
|
+
--impkt-font-leading-2xl: 1.333;
|
|
102
|
+
--impkt-font-size-3xl: 1.875rem;
|
|
103
|
+
--impkt-font-leading-3xl: 1.2;
|
|
104
|
+
--impkt-font-size-4xl: 2.25rem;
|
|
105
|
+
--impkt-font-leading-4xl: 1.111;
|
|
106
|
+
--impkt-font-size-5xl: 3rem;
|
|
107
|
+
--impkt-font-leading-5xl: 1.083;
|
|
108
|
+
--impkt-font-size-6xl: 3.75rem;
|
|
109
|
+
--impkt-font-leading-6xl: 1.067;
|
|
110
|
+
--impkt-font-tracking-tight: -0.02em;
|
|
111
|
+
--impkt-font-tracking-normal: 0em;
|
|
112
|
+
--impkt-font-tracking-wide: 0.06em;
|
|
113
|
+
--impkt-font-weight-regular: 400;
|
|
114
|
+
--impkt-font-weight-medium: 500;
|
|
115
|
+
--impkt-font-weight-semibold: 600;
|
|
116
|
+
--impkt-font-weight-bold: 700;
|
|
117
|
+
--impkt-font-line-height-tight: 1.25;
|
|
118
|
+
--impkt-font-line-height-normal: 1.5;
|
|
119
|
+
--impkt-font-line-height-relaxed: 1.75;
|
|
120
|
+
--impkt-space-0: 0px;
|
|
121
|
+
--impkt-space-0-5: 2px;
|
|
122
|
+
--impkt-space-1: 4px;
|
|
123
|
+
--impkt-space-1-5: 6px;
|
|
124
|
+
--impkt-space-2: 8px;
|
|
125
|
+
--impkt-space-2-5: 10px;
|
|
126
|
+
--impkt-space-3: 12px;
|
|
127
|
+
--impkt-space-3-5: 14px;
|
|
128
|
+
--impkt-space-4: 16px;
|
|
129
|
+
--impkt-space-5: 20px;
|
|
130
|
+
--impkt-space-6: 24px;
|
|
131
|
+
--impkt-space-7: 28px;
|
|
132
|
+
--impkt-space-8: 32px;
|
|
133
|
+
--impkt-space-9: 36px;
|
|
134
|
+
--impkt-space-10: 40px;
|
|
135
|
+
--impkt-space-11: 44px;
|
|
136
|
+
--impkt-space-12: 48px;
|
|
137
|
+
--impkt-space-14: 56px;
|
|
138
|
+
--impkt-space-16: 64px;
|
|
139
|
+
--impkt-space-20: 80px;
|
|
140
|
+
--impkt-space-24: 96px;
|
|
141
|
+
--impkt-space-28: 112px;
|
|
142
|
+
--impkt-space-32: 128px;
|
|
143
|
+
--impkt-space-36: 144px;
|
|
144
|
+
--impkt-space-40: 160px;
|
|
145
|
+
--impkt-space-48: 192px;
|
|
146
|
+
--impkt-space-56: 224px;
|
|
147
|
+
--impkt-space-64: 256px;
|
|
148
|
+
--impkt-space-72: 288px;
|
|
149
|
+
--impkt-space-80: 320px;
|
|
150
|
+
--impkt-space-96: 384px;
|
|
151
|
+
--impkt-radius-none: 0;
|
|
152
|
+
--impkt-radius-xs: 8px;
|
|
153
|
+
--impkt-radius-sm: 16px;
|
|
154
|
+
--impkt-radius-md: 24px;
|
|
155
|
+
--impkt-radius-lg: 32px;
|
|
156
|
+
--impkt-radius-xl: 48px;
|
|
157
|
+
--impkt-radius-2xl: 64px;
|
|
158
|
+
--impkt-radius-3xl: 96px;
|
|
159
|
+
--impkt-radius-full: 9999px;
|
|
160
|
+
--impkt-shadow-xs: 0 1px 2px 0 color-mix(in srgb, #241A2E 5%, transparent);
|
|
161
|
+
--impkt-shadow-sm: 0 1px 3px 0 color-mix(in srgb, #241A2E 10%, transparent), 0 1px 2px -1px color-mix(in srgb, #241A2E 10%, transparent);
|
|
162
|
+
--impkt-shadow-md: 0 4px 6px -1px color-mix(in srgb, #241A2E 10%, transparent), 0 2px 4px -2px color-mix(in srgb, #241A2E 10%, transparent);
|
|
163
|
+
--impkt-shadow-lg: 0 10px 15px -3px color-mix(in srgb, #241A2E 10%, transparent), 0 4px 6px -4px color-mix(in srgb, #241A2E 10%, transparent);
|
|
164
|
+
--impkt-shadow-xl: 0 20px 25px -5px color-mix(in srgb, #241A2E 10%, transparent), 0 8px 10px -6px color-mix(in srgb, #241A2E 10%, transparent);
|
|
165
|
+
--impkt-border-width-thin: 1px;
|
|
166
|
+
--impkt-border-width-thick: 2px;
|
|
167
|
+
--impkt-layout-page-width: 1200px;
|
|
168
|
+
--impkt-layout-margin-phone: 16px;
|
|
169
|
+
--impkt-layout-margin-tablet: 32px;
|
|
170
|
+
--impkt-layout-margin-desktop: 64px;
|
|
171
|
+
--impkt-layout-gutter-sm: 8px;
|
|
172
|
+
--impkt-layout-gutter-md: 16px;
|
|
173
|
+
--impkt-layout-gutter-lg: 32px;
|
|
174
|
+
--impkt-motion-duration-instant: 0ms;
|
|
175
|
+
--impkt-motion-duration-fast: 140ms;
|
|
176
|
+
--impkt-motion-duration-base: 220ms;
|
|
177
|
+
--impkt-motion-duration-slow: 360ms;
|
|
178
|
+
--impkt-motion-duration-scene: 700ms;
|
|
179
|
+
--impkt-motion-easing-standard: cubic-bezier(0.2, 0, 0, 1);
|
|
180
|
+
--impkt-motion-easing-enter: cubic-bezier(0, 0, 0.2, 1);
|
|
181
|
+
--impkt-motion-easing-exit: cubic-bezier(0.4, 0, 1, 1);
|
|
182
|
+
--impkt-motion-easing-emphasis: cubic-bezier(0.65, 0, 0.35, 1);
|
|
183
|
+
--impkt-motion-spring-snappy-stiffness: 400;
|
|
184
|
+
--impkt-motion-spring-snappy-damping-ratio: 1;
|
|
185
|
+
--impkt-motion-spring-snappy-mass: 1;
|
|
186
|
+
--impkt-motion-spring-snappy-easing: linear(0, 0.023, 0.0792, 0.1539, 0.237, 0.322, 0.4044, 0.4817, 0.5525, 0.6161, 0.6726, 0.7221, 0.7651, 0.8023, 0.8341, 0.8612, 0.8842, 0.9036, 0.9199, 0.9336, 0.9451, 0.9546, 0.9626, 0.9692, 0.9747, 0.9792, 0.9829, 0.986, 0.9885, 0.9906, 0.9923, 0.9938, 0.9949, 0.9958, 0.9966, 0.9972, 0.9978, 0.9982, 0.9985, 0.9988, 1);
|
|
187
|
+
--impkt-motion-spring-snappy-duration: 463ms;
|
|
188
|
+
--impkt-motion-spring-gentle-stiffness: 170;
|
|
189
|
+
--impkt-motion-spring-gentle-damping-ratio: 1;
|
|
190
|
+
--impkt-motion-spring-gentle-mass: 1;
|
|
191
|
+
--impkt-motion-spring-gentle-easing: linear(0, 0.0229, 0.079, 0.1535, 0.2365, 0.3212, 0.4035, 0.4808, 0.5515, 0.6152, 0.6717, 0.7212, 0.7643, 0.8015, 0.8334, 0.8605, 0.8836, 0.9031, 0.9195, 0.9332, 0.9447, 0.9543, 0.9623, 0.969, 0.9745, 0.979, 0.9828, 0.9859, 0.9884, 0.9905, 0.9923, 0.9937, 0.9948, 0.9958, 0.9966, 0.9972, 0.9977, 0.9982, 0.9985, 0.9988, 1);
|
|
192
|
+
--impkt-motion-spring-gentle-duration: 709ms;
|
|
193
|
+
--impkt-motion-spring-bouncy-stiffness: 260;
|
|
194
|
+
--impkt-motion-spring-bouncy-damping-ratio: 0.82;
|
|
195
|
+
--impkt-motion-spring-bouncy-mass: 1;
|
|
196
|
+
--impkt-motion-spring-bouncy-easing: linear(0, 0.0209, 0.0741, 0.1479, 0.2332, 0.3232, 0.413, 0.499, 0.579, 0.6517, 0.7164, 0.7729, 0.8214, 0.8624, 0.8966, 0.9247, 0.9473, 0.9652, 0.9791, 0.9897, 0.9975, 1.0031, 1.0069, 1.0093, 1.0106, 1.0111, 1.011, 1.0105, 1.0097, 1.0088, 1.0078, 1.0068, 1.0058, 1.0049, 1.0041, 1.0034, 1.0027, 1.0021, 1.0017, 1.0013, 1);
|
|
197
|
+
--impkt-motion-spring-bouncy-duration: 538ms;
|
|
198
|
+
--impkt-motion-stagger-tight: 30ms;
|
|
199
|
+
--impkt-motion-stagger-base: 60ms;
|
|
200
|
+
--impkt-motion-stagger-loose: 100ms;
|
|
201
|
+
--impkt-motion-distance-near: 16px;
|
|
202
|
+
--impkt-motion-distance-far: 48px;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.impkt-page {
|
|
206
|
+
box-sizing: border-box;
|
|
207
|
+
inline-size: 100%;
|
|
208
|
+
max-inline-size: calc(var(--impkt-layout-page-width, 1200px) + 2 * var(--impkt-layout-margin-desktop, 64px));
|
|
209
|
+
margin-inline: auto;
|
|
210
|
+
padding-inline: var(--impkt-layout-margin-phone, 16px);
|
|
211
|
+
}
|
|
212
|
+
@media (min-width: 40rem) {
|
|
213
|
+
.impkt-page { padding-inline: var(--impkt-layout-margin-tablet, 32px); }
|
|
214
|
+
}
|
|
215
|
+
@media (min-width: 64rem) {
|
|
216
|
+
.impkt-page { padding-inline: var(--impkt-layout-margin-desktop, 64px); }
|
|
217
|
+
}
|
|
218
|
+
@media (max-width: 40rem) {
|
|
219
|
+
[data-impkt-hide-on="phone"] { display: none !important; }
|
|
220
|
+
}
|
|
221
|
+
@media (min-width: 40.0625rem) {
|
|
222
|
+
[data-impkt-hide-on="wide"] { display: none !important; }
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/* --------------------------------------------------------------- tokens */
|
|
226
|
+
|
|
227
|
+
:root {
|
|
228
|
+
/* Surfaces. The page carries no text directly; text sits on a card. */
|
|
229
|
+
--ik-surface-page: var(--impkt-color-surface-page);
|
|
230
|
+
--ik-surface-card: var(--impkt-color-surface-card);
|
|
231
|
+
--ik-surface-inset: #F0EBE5;
|
|
232
|
+
--ik-surface-subtle: #F5F1F7;
|
|
233
|
+
--ik-surface-board: #EFEAF2;
|
|
234
|
+
--ik-surface-header: color-mix(in srgb, var(--impkt-color-surface-header) 88%, transparent);
|
|
235
|
+
--ik-surface-inverse: var(--impkt-color-text-default);
|
|
236
|
+
|
|
237
|
+
/* Ink. Muted text is measured at 4.5:1 on the card, the page and the inset surface. */
|
|
238
|
+
--ik-ink: var(--impkt-color-text-default);
|
|
239
|
+
--ik-ink-muted: #645C57;
|
|
240
|
+
--ik-ink-inverse: var(--impkt-color-surface-page);
|
|
241
|
+
|
|
242
|
+
/* Lines. A hairline is decoration. A border marks a control and is measured at 3:1. */
|
|
243
|
+
--ik-line: #E8E0D5;
|
|
244
|
+
--ik-border: #8A8079;
|
|
245
|
+
--ik-border-strong: #645C57;
|
|
246
|
+
|
|
247
|
+
/* Brand. Plum is the action colour. Gold is a fill and a glow, never text. */
|
|
248
|
+
--ik-brand: var(--impkt-color-brand-default);
|
|
249
|
+
--ik-brand-hover: #5C4569;
|
|
250
|
+
--ik-brand-active: #4E3A5E;
|
|
251
|
+
--ik-brand-subtle: #EFEAF2;
|
|
252
|
+
--ik-brand-halo: color-mix(in srgb, var(--impkt-color-brand-default) 18%, transparent);
|
|
253
|
+
--ik-on-brand: var(--impkt-color-brand-on);
|
|
254
|
+
--ik-gold: #F2D96A;
|
|
255
|
+
--ik-gold-deep: var(--impkt-color-accent-default);
|
|
256
|
+
--ik-on-gold: #241A2E;
|
|
257
|
+
--ik-link: var(--impkt-color-text-link);
|
|
258
|
+
--ik-link-hover: #4E3A5E;
|
|
259
|
+
|
|
260
|
+
/* Status. Each has a colour for lines and icons (3:1), one for text (4.5:1) and a tint. */
|
|
261
|
+
--ik-danger: var(--impkt-color-status-danger-default);
|
|
262
|
+
--ik-danger-text: #A2404B;
|
|
263
|
+
--ik-danger-subtle: #FBEDEE;
|
|
264
|
+
--ik-warning: #9A8318;
|
|
265
|
+
--ik-warning-text: #7A6410;
|
|
266
|
+
--ik-warning-subtle: #FBF4D8;
|
|
267
|
+
--ik-success: var(--impkt-color-status-success-default);
|
|
268
|
+
--ik-success-text: #356E4D;
|
|
269
|
+
--ik-success-subtle: #EAF3EC;
|
|
270
|
+
--ik-info: var(--impkt-color-status-info-default);
|
|
271
|
+
--ik-info-text: #336C96;
|
|
272
|
+
--ik-info-subtle: #EAF2F8;
|
|
273
|
+
|
|
274
|
+
/* Focus. Locked: a light band inside a dark one, so it shows on every surface. */
|
|
275
|
+
--ik-focus-ring: 0 0 0 2px #FFFFFF, 0 0 0 4px #241A2E;
|
|
276
|
+
--ik-focus-ring-inset: inset 0 0 0 2px #241A2E, inset 0 0 0 4px #FFFFFF;
|
|
277
|
+
|
|
278
|
+
/* Type. Urbanist, with a ramp whose smallest step is 14px. */
|
|
279
|
+
--ik-font: var(--impkt-font-family-body);
|
|
280
|
+
--ik-font-mono: var(--impkt-font-family-mono);
|
|
281
|
+
--ik-text-xs: var(--impkt-font-size-sm); /* 14px: pills, captions, table headings */
|
|
282
|
+
--ik-text-sm: 0.9375rem; /* 15px: buttons, labels, dense rows */
|
|
283
|
+
--ik-text-md: var(--impkt-font-size-md); /* 16px: body and fields */
|
|
284
|
+
--ik-text-lg: var(--impkt-font-size-lg); /* 18px */
|
|
285
|
+
--ik-text-xl: var(--impkt-font-size-xl); /* 20px */
|
|
286
|
+
--ik-text-2xl: var(--impkt-font-size-2xl); /* 24px */
|
|
287
|
+
--ik-text-3xl: var(--impkt-font-size-3xl); /* 30px */
|
|
288
|
+
--ik-leading-tight: var(--impkt-font-line-height-tight);
|
|
289
|
+
--ik-leading-normal: var(--impkt-font-line-height-normal);
|
|
290
|
+
--ik-tracking-tight: var(--impkt-font-tracking-tight);
|
|
291
|
+
|
|
292
|
+
/* Space. A 4px unit. Every gap is a whole step. */
|
|
293
|
+
--ik-space-1: var(--impkt-space-1);
|
|
294
|
+
--ik-space-2: var(--impkt-space-2);
|
|
295
|
+
--ik-space-3: var(--impkt-space-3);
|
|
296
|
+
--ik-space-4: var(--impkt-space-4);
|
|
297
|
+
--ik-space-5: var(--impkt-space-5);
|
|
298
|
+
--ik-space-6: var(--impkt-space-6);
|
|
299
|
+
--ik-space-8: var(--impkt-space-8);
|
|
300
|
+
--ik-space-10: var(--impkt-space-10);
|
|
301
|
+
--ik-space-12: var(--impkt-space-12);
|
|
302
|
+
--ik-gutter: var(--impkt-layout-margin-phone);
|
|
303
|
+
|
|
304
|
+
/* Shape. Rounded together from one base of 12px. */
|
|
305
|
+
--ik-radius-sm: 8px;
|
|
306
|
+
--ik-radius-md: 12px;
|
|
307
|
+
--ik-radius-lg: 16px;
|
|
308
|
+
--ik-radius-xl: 20px;
|
|
309
|
+
--ik-radius-full: 999px;
|
|
310
|
+
|
|
311
|
+
/* Elevation, tinted with the ink so it sits on warm paper. */
|
|
312
|
+
--ik-shadow-xs: 0 1px 2px rgb(36 26 46 / 0.05);
|
|
313
|
+
--ik-shadow-sm: 0 1px 2px rgb(36 26 46 / 0.04), 0 8px 24px -16px rgb(78 58 94 / 0.22);
|
|
314
|
+
--ik-shadow-md: 0 2px 4px rgb(36 26 46 / 0.05), 0 16px 32px -16px rgb(78 58 94 / 0.28);
|
|
315
|
+
|
|
316
|
+
/* Motion. Calm: short, no overshoot. */
|
|
317
|
+
--ik-duration-fast: var(--impkt-motion-duration-fast);
|
|
318
|
+
--ik-duration-base: var(--impkt-motion-duration-base);
|
|
319
|
+
--ik-duration-slow: var(--impkt-motion-duration-slow);
|
|
320
|
+
--ik-ease-standard: var(--impkt-motion-easing-standard);
|
|
321
|
+
--ik-ease-enter: var(--impkt-motion-easing-enter);
|
|
322
|
+
--ik-ease-exit: var(--impkt-motion-easing-exit);
|
|
323
|
+
|
|
324
|
+
/* Density. Controls are 40px with a mouse and 44px on a touch screen. */
|
|
325
|
+
--ik-control-height: 40px;
|
|
326
|
+
--ik-target-min: var(--impkt-target-min);
|
|
327
|
+
|
|
328
|
+
color-scheme: light;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
/* Dark. The same roles, lifted for a dark surface. */
|
|
332
|
+
|
|
333
|
+
@media (prefers-color-scheme: dark) {
|
|
334
|
+
:root:not([data-theme="light"]) {
|
|
335
|
+
--ik-surface-page: #15111A;
|
|
336
|
+
--ik-surface-card: #211A28;
|
|
337
|
+
--ik-surface-inset: #1C1622;
|
|
338
|
+
--ik-surface-subtle: #261E2E;
|
|
339
|
+
--ik-surface-board: #2A2232;
|
|
340
|
+
--ik-surface-header: rgb(21 17 26 / 0.88);
|
|
341
|
+
--ik-surface-inverse: #F4EFF6;
|
|
342
|
+
--ik-ink: #F4EFF6;
|
|
343
|
+
--ik-ink-muted: #B3AAB8;
|
|
344
|
+
--ik-ink-inverse: #15111A;
|
|
345
|
+
--ik-line: #3A3043;
|
|
346
|
+
--ik-border: #7D7086;
|
|
347
|
+
--ik-border-strong: #B3AAB8;
|
|
348
|
+
--ik-brand: #B9A0CB;
|
|
349
|
+
--ik-brand-hover: #CDB8DC;
|
|
350
|
+
--ik-brand-active: #D6C3E2;
|
|
351
|
+
--ik-brand-subtle: #2E2438;
|
|
352
|
+
--ik-brand-halo: rgb(185 160 203 / 0.22);
|
|
353
|
+
--ik-on-brand: #1A1420;
|
|
354
|
+
--ik-link: #CDB8DC;
|
|
355
|
+
--ik-link-hover: #E4D7EC;
|
|
356
|
+
--ik-danger: #F0979E;
|
|
357
|
+
--ik-danger-text: #F0979E;
|
|
358
|
+
--ik-danger-subtle: #3A1D24;
|
|
359
|
+
--ik-warning: #E6C95A;
|
|
360
|
+
--ik-warning-text: #E6C95A;
|
|
361
|
+
--ik-warning-subtle: #38301A;
|
|
362
|
+
--ik-success: #8FD0A0;
|
|
363
|
+
--ik-success-text: #8FD0A0;
|
|
364
|
+
--ik-success-subtle: #1B3123;
|
|
365
|
+
--ik-info: #8DC0E6;
|
|
366
|
+
--ik-info-text: #8DC0E6;
|
|
367
|
+
--ik-info-subtle: #1A2B3A;
|
|
368
|
+
--ik-shadow-xs: 0 1px 2px rgb(0 0 0 / 0.3);
|
|
369
|
+
--ik-shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 28px -18px rgb(0 0 0 / 0.7);
|
|
370
|
+
--ik-shadow-md: 0 2px 4px rgb(0 0 0 / 0.35), 0 18px 36px -18px rgb(0 0 0 / 0.75);
|
|
371
|
+
color-scheme: dark;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
:root[data-theme="dark"] {
|
|
376
|
+
--ik-surface-page: #15111A;
|
|
377
|
+
--ik-surface-card: #211A28;
|
|
378
|
+
--ik-surface-inset: #1C1622;
|
|
379
|
+
--ik-surface-subtle: #261E2E;
|
|
380
|
+
--ik-surface-board: #2A2232;
|
|
381
|
+
--ik-surface-header: rgb(21 17 26 / 0.88);
|
|
382
|
+
--ik-surface-inverse: #F4EFF6;
|
|
383
|
+
--ik-ink: #F4EFF6;
|
|
384
|
+
--ik-ink-muted: #B3AAB8;
|
|
385
|
+
--ik-ink-inverse: #15111A;
|
|
386
|
+
--ik-line: #3A3043;
|
|
387
|
+
--ik-border: #7D7086;
|
|
388
|
+
--ik-border-strong: #B3AAB8;
|
|
389
|
+
--ik-brand: #B9A0CB;
|
|
390
|
+
--ik-brand-hover: #CDB8DC;
|
|
391
|
+
--ik-brand-active: #D6C3E2;
|
|
392
|
+
--ik-brand-subtle: #2E2438;
|
|
393
|
+
--ik-brand-halo: rgb(185 160 203 / 0.22);
|
|
394
|
+
--ik-on-brand: #1A1420;
|
|
395
|
+
--ik-link: #CDB8DC;
|
|
396
|
+
--ik-link-hover: #E4D7EC;
|
|
397
|
+
--ik-danger: #F0979E;
|
|
398
|
+
--ik-danger-text: #F0979E;
|
|
399
|
+
--ik-danger-subtle: #3A1D24;
|
|
400
|
+
--ik-warning: #E6C95A;
|
|
401
|
+
--ik-warning-text: #E6C95A;
|
|
402
|
+
--ik-warning-subtle: #38301A;
|
|
403
|
+
--ik-success: #8FD0A0;
|
|
404
|
+
--ik-success-text: #8FD0A0;
|
|
405
|
+
--ik-success-subtle: #1B3123;
|
|
406
|
+
--ik-info: #8DC0E6;
|
|
407
|
+
--ik-info-text: #8DC0E6;
|
|
408
|
+
--ik-info-subtle: #1A2B3A;
|
|
409
|
+
--ik-shadow-xs: 0 1px 2px rgb(0 0 0 / 0.3);
|
|
410
|
+
--ik-shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 28px -18px rgb(0 0 0 / 0.7);
|
|
411
|
+
--ik-shadow-md: 0 2px 4px rgb(0 0 0 / 0.35), 0 18px 36px -18px rgb(0 0 0 / 0.75);
|
|
412
|
+
color-scheme: dark;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
@media (pointer: coarse) { :root { --ik-control-height: 44px; } }
|
|
416
|
+
|
|
417
|
+
@media (min-width: 641px) { :root { --ik-gutter: 24px; } }
|
|
418
|
+
|
|
419
|
+
@media (min-width: 1100px) { :root { --ik-gutter: 32px; } }
|
|
420
|
+
|
|
421
|
+
/* ----------------------------------------------------------------- base */
|
|
422
|
+
*, *::before, *::after { box-sizing: border-box; }
|
|
423
|
+
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
|
|
424
|
+
body {
|
|
425
|
+
margin: 0;
|
|
426
|
+
background: var(--ik-surface-page);
|
|
427
|
+
color: var(--ik-ink);
|
|
428
|
+
font-family: var(--ik-font);
|
|
429
|
+
font-size: var(--ik-text-md);
|
|
430
|
+
line-height: var(--ik-leading-normal);
|
|
431
|
+
-webkit-font-smoothing: antialiased;
|
|
432
|
+
-moz-osx-font-smoothing: grayscale;
|
|
433
|
+
}
|
|
434
|
+
[hidden] { display: none !important; }
|
|
435
|
+
::selection { background: rgb(242 217 106 / 0.55); color: var(--ik-ink); }
|
|
436
|
+
:where(h1, h2, h3, h4) { font-weight: 600; line-height: var(--ik-leading-tight); letter-spacing: var(--ik-tracking-tight); color: var(--ik-ink); text-wrap: balance; }
|
|
437
|
+
:where(h1) { font-size: var(--ik-text-2xl); }
|
|
438
|
+
:where(h2) { font-size: var(--ik-text-xl); }
|
|
439
|
+
:where(h3) { font-size: var(--ik-text-lg); }
|
|
440
|
+
:where(h4) { font-size: var(--ik-text-md); }
|
|
441
|
+
:where(a) { color: var(--ik-link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
|
|
442
|
+
:where(a:hover) { color: var(--ik-link-hover); }
|
|
443
|
+
:where(code, kbd, samp, pre) { font-family: var(--ik-font-mono); font-size: 0.9em; }
|
|
444
|
+
:where(pre) { background: var(--ik-surface-inset); border-radius: var(--ik-radius-sm); padding: var(--ik-space-3); overflow-wrap: anywhere; white-space: pre-wrap; }
|
|
445
|
+
:where(hr) { border: 0; border-top: 1px solid var(--ik-line); margin: var(--ik-space-4) 0; }
|
|
446
|
+
:where(img, svg, video) { max-width: 100%; }
|
|
447
|
+
|
|
448
|
+
/* The focus ring. :focus-visible, so a click does not draw it and the keyboard does. The
|
|
449
|
+
transparent outline is what Windows High Contrast Mode keeps when it drops the shadow. */
|
|
450
|
+
:focus-visible { outline: 2px solid transparent; outline-offset: 2px; box-shadow: var(--ik-focus-ring); }
|
|
451
|
+
/* Inside a box that clips, such as a scrolling list, the ring is drawn inside the element. */
|
|
452
|
+
.ik-focus-inset:focus-visible, .ik-focus-inset :focus-visible { box-shadow: var(--ik-focus-ring-inset); }
|
|
453
|
+
|
|
454
|
+
.ik-sr-only {
|
|
455
|
+
position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
|
|
456
|
+
clip-path: inset(50%); white-space: nowrap; border: 0;
|
|
457
|
+
}
|
|
458
|
+
.ik-skip { position: absolute; left: -9999px; top: var(--ik-space-2); z-index: 100; padding: var(--ik-space-2) var(--ik-space-4); border-radius: var(--ik-radius-full); background: var(--ik-brand); color: var(--ik-on-brand); font-weight: 600; text-decoration: none; }
|
|
459
|
+
.ik-skip:focus { left: var(--ik-space-3); }
|
|
460
|
+
|
|
461
|
+
.muted { color: var(--ik-ink-muted); }
|
|
462
|
+
.small { font-size: var(--ik-text-xs); }
|
|
463
|
+
.row { display: flex; flex-wrap: wrap; gap: var(--ik-space-2); align-items: center; }
|
|
464
|
+
.ik-wrap { max-width: var(--ik-page-width, 1200px); margin: 0 auto; padding-inline: var(--ik-gutter); }
|
|
465
|
+
|
|
466
|
+
/* --------------------------------------------------------------- header */
|
|
467
|
+
/* One row at every width: the mark and the product name on the left, the product's own
|
|
468
|
+
navigation and session controls on the right. */
|
|
469
|
+
.ik-header {
|
|
470
|
+
position: relative; z-index: 20;
|
|
471
|
+
display: flex; align-items: center; justify-content: space-between; gap: var(--ik-space-3);
|
|
472
|
+
min-height: 60px; padding: var(--ik-space-2) var(--ik-gutter);
|
|
473
|
+
background: var(--ik-surface-header);
|
|
474
|
+
-webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
|
|
475
|
+
border-bottom: 1px solid var(--ik-line);
|
|
476
|
+
}
|
|
477
|
+
.ik-brand { display: inline-flex; align-items: center; gap: 10px; border-radius: var(--ik-radius-sm); min-width: 0; color: var(--ik-ink); text-decoration: none; font-size: var(--ik-text-lg); line-height: 1.2; letter-spacing: -0.015em; white-space: nowrap; }
|
|
478
|
+
.ik-brand:hover { color: var(--ik-ink); }
|
|
479
|
+
.ik-brand b, .ik-brand strong { font-weight: 700; }
|
|
480
|
+
.ik-brand .ik-product { font-weight: 500; }
|
|
481
|
+
/* The orb: a plum ring round a glowing gold core, as on weareimpakt.com. */
|
|
482
|
+
.ik-mark { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--ik-brand); }
|
|
483
|
+
.ik-mark::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--ik-gold-deep); box-shadow: 0 0 10px 2px rgb(242 217 106 / 0.8); }
|
|
484
|
+
/* A product whose own controls do not stick to the top can keep the header in view. */
|
|
485
|
+
.ik-header.ik-sticky { position: sticky; top: 0; }
|
|
486
|
+
@media (max-width: 640px) {
|
|
487
|
+
.ik-header { min-height: 56px; gap: var(--ik-space-2); }
|
|
488
|
+
.ik-brand { font-size: var(--ik-text-md); gap: 8px; }
|
|
489
|
+
.ik-mark { width: 22px; height: 22px; }
|
|
490
|
+
.ik-mark::after { width: 10px; height: 10px; }
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
/* -------------------------------------------------------------- buttons */
|
|
494
|
+
/* Solid plum for the one main action, an outline on the card for the rest, and words only for
|
|
495
|
+
a quiet action. Pressed is a darker tone. Busy or disabled changes the cursor and the opacity,
|
|
496
|
+
never the position, so the control does not move while it is used. */
|
|
497
|
+
:where(button, .ik-btn) {
|
|
498
|
+
display: inline-flex; align-items: center; justify-content: center; gap: var(--ik-space-2);
|
|
499
|
+
min-height: var(--ik-control-height); min-width: var(--ik-target-min);
|
|
500
|
+
padding: var(--ik-space-2) var(--ik-space-4);
|
|
501
|
+
font: inherit; font-size: var(--ik-text-sm); font-weight: 600; line-height: 1.2; letter-spacing: 0;
|
|
502
|
+
color: var(--ik-ink); background: var(--ik-surface-card);
|
|
503
|
+
border: 1px solid var(--ik-border); border-radius: var(--ik-radius-full);
|
|
504
|
+
box-shadow: var(--ik-shadow-xs);
|
|
505
|
+
cursor: pointer; text-decoration: none; text-align: center;
|
|
506
|
+
transition: background-color var(--ik-duration-fast) var(--ik-ease-standard), border-color var(--ik-duration-fast) var(--ik-ease-standard), color var(--ik-duration-fast) var(--ik-ease-standard);
|
|
507
|
+
}
|
|
508
|
+
:where(button, .ik-btn):hover:not(:disabled) { background: var(--ik-surface-subtle); border-color: var(--ik-border-strong); }
|
|
509
|
+
:where(button, .ik-btn):focus-visible { box-shadow: var(--ik-focus-ring); }
|
|
510
|
+
:where(button, .ik-btn):disabled, :where(button, .ik-btn)[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
|
|
511
|
+
:where(button, .ik-btn)[aria-busy="true"] { cursor: progress; }
|
|
512
|
+
:where(button.primary, .ik-btn.primary) { background: var(--ik-brand); border-color: var(--ik-brand); color: var(--ik-on-brand); box-shadow: var(--ik-shadow-xs), inset 0 1px 0 rgb(255 255 255 / 0.12); }
|
|
513
|
+
:where(button.primary, .ik-btn.primary):hover:not(:disabled) { background: var(--ik-brand-hover); border-color: var(--ik-brand-hover); color: var(--ik-on-brand); }
|
|
514
|
+
:where(button.primary, .ik-btn.primary):active:not(:disabled) { background: var(--ik-brand-active); border-color: var(--ik-brand-active); }
|
|
515
|
+
:where(button.ghost, .ik-btn.ghost) { background: transparent; border-color: transparent; box-shadow: none; color: var(--ik-link); }
|
|
516
|
+
:where(button.ghost, .ik-btn.ghost):hover:not(:disabled) { background: var(--ik-brand-subtle); border-color: transparent; }
|
|
517
|
+
:where(button.danger, .ik-btn.danger) { color: var(--ik-danger-text); }
|
|
518
|
+
:where(button.small, .ik-btn.small) { min-height: 32px; padding: var(--ik-space-1) var(--ik-space-3); font-size: var(--ik-text-xs); }
|
|
519
|
+
@media (pointer: coarse) { :where(button.small, .ik-btn.small) { min-height: 40px; } }
|
|
520
|
+
@media (forced-colors: active) { :where(button, .ik-btn) { border-color: ButtonBorder; } }
|
|
521
|
+
|
|
522
|
+
/* --------------------------------------------------------------- fields */
|
|
523
|
+
:where(label) { font-size: var(--ik-text-sm); font-weight: 600; color: var(--ik-ink); }
|
|
524
|
+
:where(input:not([type="checkbox"], [type="radio"], [type="file"], [type="range"], [type="color"]), select, textarea) {
|
|
525
|
+
min-height: 44px; max-width: 100%;
|
|
526
|
+
padding: 10px 12px;
|
|
527
|
+
font: inherit; font-size: var(--ik-text-md); line-height: var(--ik-leading-normal);
|
|
528
|
+
color: var(--ik-ink); background: var(--ik-surface-card);
|
|
529
|
+
border: 1px solid var(--ik-border); border-radius: var(--ik-radius-md);
|
|
530
|
+
box-shadow: var(--ik-shadow-xs);
|
|
531
|
+
transition: border-color var(--ik-duration-fast) var(--ik-ease-standard), box-shadow var(--ik-duration-fast) var(--ik-ease-standard);
|
|
532
|
+
}
|
|
533
|
+
:where(input:not([type="checkbox"], [type="radio"], [type="file"], [type="range"], [type="color"]), select, textarea):hover:not(:disabled) { border-color: var(--ik-border-strong); }
|
|
534
|
+
/* A plum halo as well as the ring, so the field being typed in is plain at a glance. */
|
|
535
|
+
input:not([type="checkbox"], [type="radio"], [type="file"], [type="range"], [type="color"]):focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--ik-brand); box-shadow: var(--ik-focus-ring), 0 0 0 7px var(--ik-brand-halo); }
|
|
536
|
+
:where(input, select, textarea)::placeholder { color: var(--ik-ink-muted); opacity: 1; }
|
|
537
|
+
:where(input, select, textarea):disabled { background: var(--ik-surface-inset); cursor: not-allowed; }
|
|
538
|
+
/* An error thickens the border as well as turning it red, and the message says it in words. */
|
|
539
|
+
:where(input, select, textarea)[aria-invalid="true"] { border-color: var(--ik-danger); border-width: 2px; }
|
|
540
|
+
:where(textarea) { min-height: 120px; resize: vertical; }
|
|
541
|
+
:where(input[type="checkbox"], input[type="radio"]) { width: 18px; height: 18px; accent-color: var(--ik-brand); }
|
|
542
|
+
:where(input[type="file"]) { max-width: 100%; font: inherit; font-size: var(--ik-text-sm); color: var(--ik-ink-muted); }
|
|
543
|
+
:where(input[type="file"])::file-selector-button {
|
|
544
|
+
margin-right: var(--ik-space-3); min-height: 36px; padding: var(--ik-space-1) var(--ik-space-4);
|
|
545
|
+
font: inherit; font-weight: 600; color: var(--ik-ink); background: var(--ik-surface-card);
|
|
546
|
+
border: 1px solid var(--ik-border); border-radius: var(--ik-radius-full); cursor: pointer;
|
|
547
|
+
}
|
|
548
|
+
.ik-field { display: grid; gap: 6px; margin-bottom: var(--ik-space-4); }
|
|
549
|
+
.ik-hint { font-size: var(--ik-text-xs); color: var(--ik-ink-muted); font-weight: 400; }
|
|
550
|
+
/* A phone zooms into any field under 16px, so fields stay at 16px there. */
|
|
551
|
+
@media (max-width: 640px) { :where(input, select, textarea) { font-size: 16px; } }
|
|
552
|
+
|
|
553
|
+
/* ----------------------------------------------------------------- tabs */
|
|
554
|
+
/* A white pill bar with the chosen tab in lilac, as in Strata's segmented rows and the
|
|
555
|
+
weareimpakt.com navigation. It is one row at every width and scrolls sideways when it must. */
|
|
556
|
+
.tabs, .ik-tabs {
|
|
557
|
+
display: flex; flex-wrap: nowrap; gap: 2px; width: max-content; max-width: 100%;
|
|
558
|
+
margin: var(--ik-space-3) 0 var(--ik-space-4); padding: 4px;
|
|
559
|
+
overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
|
|
560
|
+
background: var(--ik-surface-card); border: 1px solid var(--ik-line); border-radius: var(--ik-radius-full);
|
|
561
|
+
box-shadow: var(--ik-shadow-xs);
|
|
562
|
+
}
|
|
563
|
+
.tabs::-webkit-scrollbar, .ik-tabs::-webkit-scrollbar { display: none; }
|
|
564
|
+
.tabs > button, .ik-tabs > button, .tabs > a, .ik-tabs > a {
|
|
565
|
+
flex: none; min-height: 36px; padding: 6px 14px; white-space: nowrap;
|
|
566
|
+
color: var(--ik-ink-muted); background: transparent; border: 0; border-radius: var(--ik-radius-full); box-shadow: none;
|
|
567
|
+
font-size: var(--ik-text-sm); font-weight: 600; text-decoration: none;
|
|
568
|
+
}
|
|
569
|
+
.tabs > button:hover:not(:disabled), .ik-tabs > button:hover:not(:disabled), .tabs > a:hover, .ik-tabs > a:hover { background: var(--ik-surface-subtle); color: var(--ik-ink); }
|
|
570
|
+
.tabs > .on, .ik-tabs > .on, .tabs > [aria-selected="true"], .ik-tabs > [aria-selected="true"], .tabs > [aria-current="page"], .ik-tabs > [aria-current="page"] {
|
|
571
|
+
background: var(--ik-brand-subtle); color: var(--ik-ink);
|
|
572
|
+
}
|
|
573
|
+
.tabs > .on:hover:not(:disabled), .ik-tabs > .on:hover:not(:disabled), .tabs > [aria-selected="true"]:hover, .ik-tabs > [aria-selected="true"]:hover { background: var(--ik-brand-subtle); }
|
|
574
|
+
/* The ring is drawn inside, because the bar clips anything outside its scroll box. */
|
|
575
|
+
.tabs > :focus-visible, .ik-tabs > :focus-visible { box-shadow: var(--ik-focus-ring-inset); }
|
|
576
|
+
@media (pointer: coarse) { .tabs > button, .ik-tabs > button, .tabs > a, .ik-tabs > a { min-height: 40px; } }
|
|
577
|
+
|
|
578
|
+
/* ---------------------------------------------------------------- cards */
|
|
579
|
+
.card, .panel, .ik-card {
|
|
580
|
+
background: var(--ik-surface-card); color: var(--ik-ink);
|
|
581
|
+
border: 1px solid var(--ik-line); border-radius: var(--ik-radius-xl);
|
|
582
|
+
padding: var(--ik-space-5) var(--ik-space-6); margin-bottom: var(--ik-space-4);
|
|
583
|
+
box-shadow: var(--ik-shadow-sm);
|
|
584
|
+
}
|
|
585
|
+
.ik-board { background: var(--ik-surface-board); border-radius: var(--ik-radius-xl); padding: var(--ik-space-6); }
|
|
586
|
+
@media (max-width: 640px) {
|
|
587
|
+
.card, .panel, .ik-card { padding: var(--ik-space-4); border-radius: var(--ik-radius-lg); }
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
/* ---------------------------------------------------------------- pills */
|
|
591
|
+
/* Sentence case, never shouted. The word carries the meaning, and the colour repeats it. */
|
|
592
|
+
.pill, .ik-pill {
|
|
593
|
+
display: inline-flex; align-items: center; gap: 6px; vertical-align: baseline;
|
|
594
|
+
padding: 2px 10px; border-radius: var(--ik-radius-full);
|
|
595
|
+
font-size: var(--ik-text-xs); font-weight: 600; line-height: 1.45; white-space: nowrap;
|
|
596
|
+
color: var(--ik-ink); background: var(--ik-surface-inset); border: 1px solid transparent;
|
|
597
|
+
}
|
|
598
|
+
.pill.ok, .ik-pill.ok { color: var(--ik-success-text); background: var(--ik-success-subtle); }
|
|
599
|
+
.pill.warn, .ik-pill.warn { color: var(--ik-warning-text); background: var(--ik-warning-subtle); }
|
|
600
|
+
.pill.bad, .ik-pill.bad { color: var(--ik-danger-text); background: var(--ik-danger-subtle); }
|
|
601
|
+
.pill.info, .ik-pill.info { color: var(--ik-info-text); background: var(--ik-info-subtle); }
|
|
602
|
+
.pill.brand, .ik-pill.brand { color: var(--ik-ink); background: var(--ik-brand-subtle); }
|
|
603
|
+
@media (forced-colors: active) { .pill, .ik-pill { border-color: CanvasText; } }
|
|
604
|
+
|
|
605
|
+
/* --------------------------------------------------------------- alerts */
|
|
606
|
+
/* A tint with a strong edge on the leading side. The text stays in ink, which reads on every
|
|
607
|
+
tint, and the edge carries the tone. */
|
|
608
|
+
.alert, .ik-alert {
|
|
609
|
+
padding: var(--ik-space-3) var(--ik-space-4); margin: var(--ik-space-2) 0;
|
|
610
|
+
border-radius: var(--ik-radius-md); border-inline-start: 4px solid var(--ik-border);
|
|
611
|
+
background: var(--ik-surface-inset); color: var(--ik-ink);
|
|
612
|
+
box-shadow: inset 0 0 0 1px rgb(36 26 46 / 0.04);
|
|
613
|
+
}
|
|
614
|
+
.alert.ok, .ik-alert.ok { background: var(--ik-success-subtle); border-color: var(--ik-success); }
|
|
615
|
+
.alert.warn, .ik-alert.warn { background: var(--ik-warning-subtle); border-color: var(--ik-warning); }
|
|
616
|
+
.alert.bad, .ik-alert.bad { background: var(--ik-danger-subtle); border-color: var(--ik-danger); }
|
|
617
|
+
.alert.info, .ik-alert.info { background: var(--ik-info-subtle); border-color: var(--ik-info); }
|
|
618
|
+
@media (forced-colors: active) { .alert, .ik-alert { border: 1px solid CanvasText; border-inline-start-width: 4px; } }
|
|
619
|
+
|
|
620
|
+
/* --------------------------------------------------------------- tables */
|
|
621
|
+
:where(table) { width: 100%; border-collapse: collapse; font-size: var(--ik-text-sm); }
|
|
622
|
+
:where(th, td) { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--ik-line); }
|
|
623
|
+
:where(th) { font-size: var(--ik-text-xs); font-weight: 600; color: var(--ik-ink-muted); }
|
|
624
|
+
:where(thead th) { border-bottom-color: var(--ik-border); }
|
|
625
|
+
.num, .ik-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
|
|
626
|
+
.ik-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
|
|
627
|
+
/* On a phone a table with the ik-stack class becomes one card per row, each cell labelled from
|
|
628
|
+
its data-label attribute. The headings stay in the page for screen readers. */
|
|
629
|
+
@media (max-width: 640px) {
|
|
630
|
+
table.ik-stack, table.ik-stack tbody, table.ik-stack tr, table.ik-stack td { display: block; width: auto; }
|
|
631
|
+
table.ik-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
632
|
+
table.ik-stack tr { padding: var(--ik-space-3) 0; border-bottom: 1px solid var(--ik-line); }
|
|
633
|
+
table.ik-stack td { padding: 2px 0; border: 0; overflow-wrap: anywhere; }
|
|
634
|
+
table.ik-stack td[data-label]::before { content: attr(data-label) ": "; color: var(--ik-ink-muted); font-weight: 600; }
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
/* --------------------------------------------------------------- motion */
|
|
638
|
+
/* 0.01ms rather than 0, because a zero transition does not fire transitionend everywhere. */
|
|
639
|
+
@media (prefers-reduced-motion: reduce) {
|
|
640
|
+
*, *::before, *::after {
|
|
641
|
+
animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
|
|
642
|
+
transition-duration: 0.01ms !important; scroll-behavior: auto !important;
|
|
643
|
+
}
|
|
644
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,40 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atomic-ui/theme",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "The Impkt product theme: one stylesheet and the Urbanist fonts for the plain HTML products, generated from the Impkt brand by @atomic-ui/design-tokens.",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/matthill8286/impkt-design-system.git",
|
|
8
|
+
"directory": "packages/theme"
|
|
9
|
+
},
|
|
10
|
+
"type": "module",
|
|
11
|
+
"exports": {
|
|
12
|
+
"./theme.css": "./dist/theme.css",
|
|
13
|
+
"./fonts/*": "./dist/fonts/*",
|
|
14
|
+
"./package.json": "./package.json"
|
|
15
|
+
},
|
|
16
|
+
"bin": {
|
|
17
|
+
"impkt-theme-copy": "./scripts/copy-to-product.mjs"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@types/node": "^20.14.0",
|
|
21
|
+
"tsx": "^4.16.0",
|
|
22
|
+
"typescript": "^5.5.0",
|
|
23
|
+
"vitest": "^2.0.0",
|
|
24
|
+
"@atomic-ui/design-tokens": "^0.2.0"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"dist",
|
|
28
|
+
"scripts/copy-to-product.mjs",
|
|
29
|
+
"README.md"
|
|
30
|
+
],
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"registry": "https://registry.npmjs.org",
|
|
33
|
+
"access": "public"
|
|
34
|
+
},
|
|
35
|
+
"scripts": {
|
|
36
|
+
"build": "tsx scripts/build.ts",
|
|
37
|
+
"typecheck": "tsc -p tsconfig.json",
|
|
38
|
+
"test": "vitest run"
|
|
39
|
+
}
|
|
6
40
|
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Copy the built theme into a plain HTML product.
|
|
4
|
+
*
|
|
5
|
+
* pnpm theme:copy ../impkt-tender
|
|
6
|
+
* node packages/theme/scripts/copy-to-product.mjs /path/to/product [public folder]
|
|
7
|
+
*
|
|
8
|
+
* Copies dist/theme.css and dist/fonts into the product's public folder, which is
|
|
9
|
+
* `public` unless a second argument names another, and writes the theme's version
|
|
10
|
+
* and the design system's commit on the first line of the copy, so anyone can see
|
|
11
|
+
* which theme a product carries. Build the theme first with `pnpm build`.
|
|
12
|
+
*/
|
|
13
|
+
import { execFileSync } from 'node:child_process';
|
|
14
|
+
import { cpSync, existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
|
|
15
|
+
import { basename, dirname, join, resolve } from 'node:path';
|
|
16
|
+
import { fileURLToPath } from 'node:url';
|
|
17
|
+
|
|
18
|
+
const root = join(dirname(fileURLToPath(import.meta.url)), '..');
|
|
19
|
+
const [product, folder = 'public'] = process.argv.slice(2);
|
|
20
|
+
if (!product) {
|
|
21
|
+
console.error('Use: copy-to-product.mjs <product folder> [public folder]');
|
|
22
|
+
process.exit(1);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const dist = join(root, 'dist');
|
|
26
|
+
if (!existsSync(join(dist, 'theme.css'))) {
|
|
27
|
+
console.error('There is no dist/theme.css. Run pnpm build first.');
|
|
28
|
+
process.exit(1);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const { version } = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8'));
|
|
32
|
+
// The commit is the design system's own, so it is read only in a checkout of it, not in an installed package.
|
|
33
|
+
const inRepository = basename(dirname(root)) === 'packages' && existsSync(join(root, '..', '..', 'pnpm-workspace.yaml'));
|
|
34
|
+
let commit = inRepository ? 'uncommitted' : 'as published';
|
|
35
|
+
if (inRepository) try {
|
|
36
|
+
commit = execFileSync('git', ['rev-parse', '--short', 'HEAD'], { cwd: root, encoding: 'utf8' }).trim();
|
|
37
|
+
const dirty = execFileSync('git', ['status', '--porcelain', '--', '.'], { cwd: root, encoding: 'utf8' }).trim();
|
|
38
|
+
if (dirty) commit += ' with uncommitted changes';
|
|
39
|
+
} catch {
|
|
40
|
+
// git is not installed: the version is enough.
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// pnpm runs a root script from the repository root, so a relative path is read from where it was typed.
|
|
44
|
+
const target = resolve(process.env.INIT_CWD ?? process.cwd(), product, folder);
|
|
45
|
+
if (!existsSync(target)) mkdirSync(target, { recursive: true });
|
|
46
|
+
const first = `/* Copied from matthill8286/impkt-design-system, @atomic-ui/theme version ${version}, commit ${commit}. To update, build the design system and run pnpm theme:copy again. */\n`;
|
|
47
|
+
writeFileSync(join(target, 'theme.css'), first + readFileSync(join(dist, 'theme.css'), 'utf8'));
|
|
48
|
+
rmSync(join(target, 'fonts'), { recursive: true, force: true });
|
|
49
|
+
cpSync(join(dist, 'fonts'), join(target, 'fonts'), { recursive: true });
|
|
50
|
+
console.log(`copied @atomic-ui/theme ${version} (${commit}) to ${join(target, 'theme.css')} and ${join(target, 'fonts')}`);
|