@atomic-ui/blocks 0.12.1 → 0.13.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/custom-elements.json +201 -7
- package/dist/{chunk-WGDMORWT.js → chunk-EGNQHWY6.js} +3 -1
- package/dist/chunk-EGNQHWY6.js.map +1 -0
- package/dist/{chunk-XNRFZCNB.js → chunk-JIITZUGI.js} +10 -7
- package/dist/chunk-JIITZUGI.js.map +1 -0
- package/dist/{chunk-7X4WGV6K.js → chunk-KDDXCGEZ.js} +4 -2
- package/dist/{chunk-7X4WGV6K.js.map → chunk-KDDXCGEZ.js.map} +1 -1
- package/dist/{chunk-SYTQIQT2.js → chunk-KOYQRJKY.js} +24 -5
- package/dist/chunk-KOYQRJKY.js.map +1 -0
- package/dist/{chunk-I2DL3DRU.js → chunk-W3MK3EEO.js} +4 -3
- package/dist/chunk-W3MK3EEO.js.map +1 -0
- package/dist/chunk-X3U2SOVV.js +461 -0
- package/dist/chunk-X3U2SOVV.js.map +1 -0
- package/dist/components/g2-case.js +2 -2
- package/dist/components/g2-shared.d.ts +2 -0
- package/dist/components/g2-shared.js +3 -1
- package/dist/components/g2-site.js +2 -2
- package/dist/components/g2-tools.js +2 -2
- package/dist/components/journey.d.ts +85 -16
- package/dist/components/journey.js +7 -3
- package/dist/components/site.js +1 -1
- package/dist/index.js +6 -6
- package/dist/standalone/atomic-ui-blocks.js +1030 -983
- package/dist/standalone/atomic-ui-blocks.js.map +3 -3
- package/package.json +3 -3
- package/dist/chunk-GRKPKJZH.js +0 -275
- package/dist/chunk-GRKPKJZH.js.map +0 -1
- package/dist/chunk-I2DL3DRU.js.map +0 -1
- package/dist/chunk-SYTQIQT2.js.map +0 -1
- package/dist/chunk-WGDMORWT.js.map +0 -1
- package/dist/chunk-XNRFZCNB.js.map +0 -1
package/custom-elements.json
CHANGED
|
@@ -2648,6 +2648,11 @@
|
|
|
2648
2648
|
"kind": "variable",
|
|
2649
2649
|
"name": "accentOn"
|
|
2650
2650
|
},
|
|
2651
|
+
{
|
|
2652
|
+
"kind": "variable",
|
|
2653
|
+
"name": "accentOnInk",
|
|
2654
|
+
"description": "The accent as a mark on the fixed ink, lifted for a brand whose accent is too dark to read there."
|
|
2655
|
+
},
|
|
2651
2656
|
{
|
|
2652
2657
|
"kind": "variable",
|
|
2653
2658
|
"name": "band",
|
|
@@ -2777,6 +2782,14 @@
|
|
|
2777
2782
|
"module": "src/components/g2-shared.ts"
|
|
2778
2783
|
}
|
|
2779
2784
|
},
|
|
2785
|
+
{
|
|
2786
|
+
"kind": "js",
|
|
2787
|
+
"name": "accentOnInk",
|
|
2788
|
+
"declaration": {
|
|
2789
|
+
"name": "accentOnInk",
|
|
2790
|
+
"module": "src/components/g2-shared.ts"
|
|
2791
|
+
}
|
|
2792
|
+
},
|
|
2780
2793
|
{
|
|
2781
2794
|
"kind": "js",
|
|
2782
2795
|
"name": "band",
|
|
@@ -4277,10 +4290,43 @@
|
|
|
4277
4290
|
"default": "['note', 'wireframe', 'component', 'code', 'live']",
|
|
4278
4291
|
"description": "The stages a button passes through on its way to being live, in order."
|
|
4279
4292
|
},
|
|
4293
|
+
{
|
|
4294
|
+
"kind": "variable",
|
|
4295
|
+
"name": "JOURNEY_MOVES",
|
|
4296
|
+
"type": {
|
|
4297
|
+
"text": "[\n { name: 'flatten', ms: 640, easing: [0.65, 0, 0.35, 1] },\n { name: 'ink-in', ms: 560, easing: [0.22, 1, 0.36, 1] },\n { name: 'compile', ms: 720, easing: [0.83, 0, 0.17, 1] },\n { name: 'ship', ms: 600, easing: [0.34, 1.56, 0.64, 1] },\n]"
|
|
4298
|
+
},
|
|
4299
|
+
"default": "[ { name: 'flatten', ms: 640, easing: [0.65, 0, 0.35, 1] }, { name: 'ink-in', ms: 560, easing: [0.22, 1, 0.36, 1] }, { name: 'compile', ms: 720, easing: [0.83, 0, 0.17, 1] }, { name: 'ship', ms: 600, easing: [0.34, 1.56, 0.64, 1] }, ]",
|
|
4300
|
+
"description": "The moves between stages, in order: the move into stage k is MOVES[k - 1]. Each easing is the motion spec's (11:830)."
|
|
4301
|
+
},
|
|
4302
|
+
{
|
|
4303
|
+
"kind": "function",
|
|
4304
|
+
"name": "cubicBezier",
|
|
4305
|
+
"return": {
|
|
4306
|
+
"type": {
|
|
4307
|
+
"text": "(x: number) => number"
|
|
4308
|
+
}
|
|
4309
|
+
},
|
|
4310
|
+
"parameters": [
|
|
4311
|
+
{
|
|
4312
|
+
"name": "[x1, y1, x2, y2]",
|
|
4313
|
+
"type": {
|
|
4314
|
+
"text": "readonly number[]"
|
|
4315
|
+
}
|
|
4316
|
+
}
|
|
4317
|
+
],
|
|
4318
|
+
"description": "A CSS cubic-bezier as a function of progress, for the frame loop, which applies the spec's easing itself."
|
|
4319
|
+
},
|
|
4280
4320
|
{
|
|
4281
4321
|
"kind": "class",
|
|
4282
|
-
"description": "A call to action drawn as the thing it once was: a sticky note from a\nworkshop, a wireframe box, a designed component, the code that renders it,\nand at last the live button. A page shows it at the stage each section is\nabout, so the same button is seen being made as the page is read.\n\n**It is the same link at every stage.** Whatever it is drawn as, it is one\n`<a>` whose name is its words, so a screen reader and a keyboard meet an\nordinary link; the note, the wireframe cross, the measuring marks and the\nlines of code around it are decoration and are hidden (1.3.1, 4.1.2). Its\ntarget is at least 44px tall at every stage (2.5.8).\n\n**A page that shows it more than once sets `decorative` on the copies.** A\ndecorative one is a picture of the button, not a control: it has no link\nand is hidden from a screen reader, so the page does not hold five links\nthat say the same thing (2.4.4).\n\n**It keeps its shape as it scales.** The drawing is about 14 wide to 9\ntall at any width, 560 by 360 on a wide page and 347 by 223 on a phone, and\neverything in it is sized from its own width.\n\n**One button can follow the page.** Give `track` a selector for the page's\nsections, each carrying `data-journey-stage`, and the button takes the stage\nof whichever section is across the middle of the screen
|
|
4322
|
+
"description": "A call to action drawn as the thing it once was: a sticky note from a\nworkshop, a wireframe box, a designed component, the code that renders it,\nand at last the live button. A page shows it at the stage each section is\nabout, so the same button is seen being made as the page is read.\n\n**It is the same link at every stage.** Whatever it is drawn as, it is one\n`<a>` whose name is its words, so a screen reader and a keyboard meet an\nordinary link; the note, the wireframe cross, the measuring marks and the\nlines of code around it are decoration and are hidden (1.3.1, 4.1.2). Its\ntarget is at least 44px tall at every stage (2.5.8).\n\n**A page that shows it more than once sets `decorative` on the copies.** A\ndecorative one is a picture of the button, not a control: it has no link\nand is hidden from a screen reader, so the page does not hold five links\nthat say the same thing (2.4.4).\n\n**It keeps its shape as it scales.** The drawing is about 14 wide to 9\ntall at any width, 560 by 360 on a wide page and 347 by 223 on a phone, and\neverything in it is sized from its own width.\n\n**One button can follow the page.** Give `track` a selector for the page's\nsections, each carrying `data-journey-stage`, and the button takes the stage\nof whichever section is across the middle of the screen. Between two\nsections the whole morph is scrubbed by the scroll, as the motion spec\n(`11:830`) asks: the shapes, the words and the design notes all follow the\nscroll, and the move is complete as the next section crosses the middle of\nthe screen. Scrolling back halfway leaves it halfway.\n\nWhere the browser has scroll-driven animations, the scroll drives the stage\nitself through a scroll timeline, with no script running as the page moves;\nthe button only measures where the sections are, again when the page is\nresized. Elsewhere a frame loop reads the scroll at most once a frame, and\nonly while the page scrolls. Either way each move between two sections is\nshaped by that move's easing, so ship overshoots near the end of its range.\n\n**One button can travel.** Set `travel` and the button stays in view while\nits sections scroll past, as the spec's one moving object does. It is sticky,\nso put it in a column as tall as the tracked sections, beside them, such as\nthe second column of a grid whose first holds the sections. It sits\n`--impakt-journey-travel-top` from the top of the screen, a fifth of the\nscreen unless the page sets it. On a phone, where the sections stack, leave\n`travel` off and give each section its own decorative copy.\n\n**Each move has its own timing**, from the motion spec: flatten 640ms, ink\nin 560ms, compile 720ms, ship 600ms with an overshoot, lift 180ms on hover\nand press 140ms. Each is read from `--impakt-motion-journey-<move>-duration`\nand `-easing`. When `stage` is set by hand the move runs on that timing.\n**Only transforms, opacity and colour move**, so a change of stage costs no\nlayout.\n\n**With reduced motion asked for** each stage cuts straight to its final\nstate: there is no morph, no scale and no change of position. A tracked\nbutton swaps to a section's stage as soon as the section enters the screen,\nand pointing at the live button changes its colour only (2.3.3).\n\n**`annotations` draws the design notes around it**, as the site's motion\nframes show: the stage's caption above, a handwritten note in the margin at\nthe note stage, the width and height marks at the wireframe and component,\nthe spec tags under the component and a pointer at the live button. They\nare decoration and are hidden from a screen reader. Leave it off when the\nbutton is a plain call to action.\n\nThe words on every fill are a pair the tokens already measured: the accent\nwith its own text colour, and the text colour with the card colour (1.4.3).\nA brand whose ink is dark may colour the words in the code window by\nsetting `--impakt-journey-code-words`.",
|
|
4283
4323
|
"name": "ImpaktJourneyButton",
|
|
4324
|
+
"cssProperties": [
|
|
4325
|
+
{
|
|
4326
|
+
"description": "With `travel`: how far from the top of the screen the button stays.",
|
|
4327
|
+
"name": "--impakt-journey-travel-top"
|
|
4328
|
+
}
|
|
4329
|
+
],
|
|
4284
4330
|
"members": [
|
|
4285
4331
|
{
|
|
4286
4332
|
"kind": "field",
|
|
@@ -4339,6 +4385,18 @@
|
|
|
4339
4385
|
"default": "''",
|
|
4340
4386
|
"attribute": "track"
|
|
4341
4387
|
},
|
|
4388
|
+
{
|
|
4389
|
+
"kind": "field",
|
|
4390
|
+
"name": "travel",
|
|
4391
|
+
"privacy": "public",
|
|
4392
|
+
"type": {
|
|
4393
|
+
"text": "boolean"
|
|
4394
|
+
},
|
|
4395
|
+
"description": "With `track`: stay in view while the tracked sections scroll past. Place it in a column as tall as they are.",
|
|
4396
|
+
"default": "false",
|
|
4397
|
+
"attribute": "travel",
|
|
4398
|
+
"reflects": true
|
|
4399
|
+
},
|
|
4342
4400
|
{
|
|
4343
4401
|
"kind": "field",
|
|
4344
4402
|
"name": "code",
|
|
@@ -4436,19 +4494,71 @@
|
|
|
4436
4494
|
},
|
|
4437
4495
|
{
|
|
4438
4496
|
"kind": "field",
|
|
4439
|
-
"name": "
|
|
4497
|
+
"name": "frameRequest",
|
|
4440
4498
|
"type": {
|
|
4441
4499
|
"text": "number"
|
|
4442
4500
|
},
|
|
4443
4501
|
"privacy": "private",
|
|
4444
4502
|
"default": "0"
|
|
4445
4503
|
},
|
|
4504
|
+
{
|
|
4505
|
+
"kind": "field",
|
|
4506
|
+
"name": "resizeObserver",
|
|
4507
|
+
"type": {
|
|
4508
|
+
"text": "ResizeObserver | undefined"
|
|
4509
|
+
},
|
|
4510
|
+
"privacy": "private"
|
|
4511
|
+
},
|
|
4512
|
+
{
|
|
4513
|
+
"kind": "field",
|
|
4514
|
+
"name": "easings",
|
|
4515
|
+
"type": {
|
|
4516
|
+
"text": "Array<(x: number) => number>"
|
|
4517
|
+
},
|
|
4518
|
+
"privacy": "private",
|
|
4519
|
+
"default": "[]"
|
|
4520
|
+
},
|
|
4446
4521
|
{
|
|
4447
4522
|
"kind": "field",
|
|
4448
4523
|
"name": "onScroll",
|
|
4449
4524
|
"privacy": "private",
|
|
4450
4525
|
"readonly": true
|
|
4451
4526
|
},
|
|
4527
|
+
{
|
|
4528
|
+
"kind": "field",
|
|
4529
|
+
"name": "onResize",
|
|
4530
|
+
"privacy": "private",
|
|
4531
|
+
"readonly": true
|
|
4532
|
+
},
|
|
4533
|
+
{
|
|
4534
|
+
"kind": "field",
|
|
4535
|
+
"name": "frameEl",
|
|
4536
|
+
"type": {
|
|
4537
|
+
"text": "HTMLElement | null"
|
|
4538
|
+
},
|
|
4539
|
+
"privacy": "private",
|
|
4540
|
+
"readonly": true
|
|
4541
|
+
},
|
|
4542
|
+
{
|
|
4543
|
+
"kind": "method",
|
|
4544
|
+
"name": "reduced",
|
|
4545
|
+
"privacy": "private",
|
|
4546
|
+
"return": {
|
|
4547
|
+
"type": {
|
|
4548
|
+
"text": "boolean"
|
|
4549
|
+
}
|
|
4550
|
+
}
|
|
4551
|
+
},
|
|
4552
|
+
{
|
|
4553
|
+
"kind": "method",
|
|
4554
|
+
"name": "unwatch",
|
|
4555
|
+
"privacy": "private",
|
|
4556
|
+
"return": {
|
|
4557
|
+
"type": {
|
|
4558
|
+
"text": "void"
|
|
4559
|
+
}
|
|
4560
|
+
}
|
|
4561
|
+
},
|
|
4452
4562
|
{
|
|
4453
4563
|
"kind": "method",
|
|
4454
4564
|
"name": "watch",
|
|
@@ -4458,7 +4568,7 @@
|
|
|
4458
4568
|
"text": "void"
|
|
4459
4569
|
}
|
|
4460
4570
|
},
|
|
4461
|
-
"description": "Follow the sections named by `track
|
|
4571
|
+
"description": "Follow the sections named by `track`. Without reduced motion the section across the middle of the screen\nsets the stage and the scroll scrubs the morph between sections; with it, a section sets the stage as soon as\nit enters the screen and nothing is scrubbed."
|
|
4462
4572
|
},
|
|
4463
4573
|
{
|
|
4464
4574
|
"kind": "method",
|
|
@@ -4478,6 +4588,17 @@
|
|
|
4478
4588
|
}
|
|
4479
4589
|
]
|
|
4480
4590
|
},
|
|
4591
|
+
{
|
|
4592
|
+
"kind": "method",
|
|
4593
|
+
"name": "entered",
|
|
4594
|
+
"privacy": "private",
|
|
4595
|
+
"return": {
|
|
4596
|
+
"type": {
|
|
4597
|
+
"text": "void"
|
|
4598
|
+
}
|
|
4599
|
+
},
|
|
4600
|
+
"description": "With reduced motion: the stage of the last section whose top has come onto the screen."
|
|
4601
|
+
},
|
|
4481
4602
|
{
|
|
4482
4603
|
"kind": "method",
|
|
4483
4604
|
"name": "become",
|
|
@@ -4505,17 +4626,65 @@
|
|
|
4505
4626
|
"text": "void"
|
|
4506
4627
|
}
|
|
4507
4628
|
},
|
|
4508
|
-
"description": "Scrub
|
|
4629
|
+
"description": "Scrub with a scroll timeline where the browser has one and the page scrolls the document; otherwise with a frame loop."
|
|
4509
4630
|
},
|
|
4510
4631
|
{
|
|
4511
4632
|
"kind": "method",
|
|
4512
|
-
"name": "
|
|
4633
|
+
"name": "rootScrolls",
|
|
4634
|
+
"privacy": "private",
|
|
4635
|
+
"return": {
|
|
4636
|
+
"type": {
|
|
4637
|
+
"text": "boolean"
|
|
4638
|
+
}
|
|
4639
|
+
},
|
|
4640
|
+
"description": "Whether the tracked sections scroll with the document, which is the scroller a root scroll timeline follows."
|
|
4641
|
+
},
|
|
4642
|
+
{
|
|
4643
|
+
"kind": "method",
|
|
4644
|
+
"name": "easingOf",
|
|
4645
|
+
"privacy": "private",
|
|
4646
|
+
"return": {
|
|
4647
|
+
"type": {
|
|
4648
|
+
"text": "readonly number[]"
|
|
4649
|
+
}
|
|
4650
|
+
},
|
|
4651
|
+
"parameters": [
|
|
4652
|
+
{
|
|
4653
|
+
"name": "name",
|
|
4654
|
+
"type": {
|
|
4655
|
+
"text": "string"
|
|
4656
|
+
}
|
|
4657
|
+
},
|
|
4658
|
+
{
|
|
4659
|
+
"name": "fallback",
|
|
4660
|
+
"type": {
|
|
4661
|
+
"text": "readonly number[]"
|
|
4662
|
+
}
|
|
4663
|
+
}
|
|
4664
|
+
],
|
|
4665
|
+
"description": "The easing of a move, from its token if the page sets one, as four numbers."
|
|
4666
|
+
},
|
|
4667
|
+
{
|
|
4668
|
+
"kind": "method",
|
|
4669
|
+
"name": "gaps",
|
|
4670
|
+
"privacy": "private",
|
|
4671
|
+
"return": {
|
|
4672
|
+
"type": {
|
|
4673
|
+
"text": "Array<{ from: number; to: number; start: number; end: number }>"
|
|
4674
|
+
}
|
|
4675
|
+
},
|
|
4676
|
+
"description": "Each gap between two tracked sections, as the scroll positions it runs between and the stages at its ends."
|
|
4677
|
+
},
|
|
4678
|
+
{
|
|
4679
|
+
"kind": "method",
|
|
4680
|
+
"name": "timeline",
|
|
4513
4681
|
"privacy": "private",
|
|
4514
4682
|
"return": {
|
|
4515
4683
|
"type": {
|
|
4516
4684
|
"text": "void"
|
|
4517
4685
|
}
|
|
4518
|
-
}
|
|
4686
|
+
},
|
|
4687
|
+
"description": "The scroll timeline. Each gap animates its own number from 0 to 1 across the scroll between its two sections,\nshaped by the move's easing, and the stage is the first section's stage plus each gap's step times its number.\nThe browser runs it as the page scrolls; this only runs again when the page is resized."
|
|
4519
4688
|
},
|
|
4520
4689
|
{
|
|
4521
4690
|
"kind": "method",
|
|
@@ -4526,7 +4695,7 @@
|
|
|
4526
4695
|
"text": "void"
|
|
4527
4696
|
}
|
|
4528
4697
|
},
|
|
4529
|
-
"description": "The
|
|
4698
|
+
"description": "The frame loop. The section across the middle of the screen gives the whole part of the stage; how far the next\nsection has risen toward the middle, shaped by the move's easing, gives the rest, so the move is complete as\nthe next section crosses it."
|
|
4530
4699
|
},
|
|
4531
4700
|
{
|
|
4532
4701
|
"kind": "method",
|
|
@@ -4619,6 +4788,15 @@
|
|
|
4619
4788
|
"default": "''",
|
|
4620
4789
|
"fieldName": "track"
|
|
4621
4790
|
},
|
|
4791
|
+
{
|
|
4792
|
+
"name": "travel",
|
|
4793
|
+
"type": {
|
|
4794
|
+
"text": "boolean"
|
|
4795
|
+
},
|
|
4796
|
+
"description": "With `track`: stay in view while the tracked sections scroll past. Place it in a column as tall as they are.",
|
|
4797
|
+
"default": "false",
|
|
4798
|
+
"fieldName": "travel"
|
|
4799
|
+
},
|
|
4622
4800
|
{
|
|
4623
4801
|
"name": "code",
|
|
4624
4802
|
"type": {
|
|
@@ -4702,6 +4880,22 @@
|
|
|
4702
4880
|
"module": "src/components/journey.ts"
|
|
4703
4881
|
}
|
|
4704
4882
|
},
|
|
4883
|
+
{
|
|
4884
|
+
"kind": "js",
|
|
4885
|
+
"name": "JOURNEY_MOVES",
|
|
4886
|
+
"declaration": {
|
|
4887
|
+
"name": "JOURNEY_MOVES",
|
|
4888
|
+
"module": "src/components/journey.ts"
|
|
4889
|
+
}
|
|
4890
|
+
},
|
|
4891
|
+
{
|
|
4892
|
+
"kind": "js",
|
|
4893
|
+
"name": "cubicBezier",
|
|
4894
|
+
"declaration": {
|
|
4895
|
+
"name": "cubicBezier",
|
|
4896
|
+
"module": "src/components/journey.ts"
|
|
4897
|
+
}
|
|
4898
|
+
},
|
|
4705
4899
|
{
|
|
4706
4900
|
"kind": "js",
|
|
4707
4901
|
"name": "ImpaktJourneyButton",
|
|
@@ -8,6 +8,7 @@ var inkLine = token("color.ink-line", "#2E2E2E");
|
|
|
8
8
|
var inkMuted = token("color.ink-muted", "#A8A8A6");
|
|
9
9
|
var accent = token("color.accent.default", "#FFD43B");
|
|
10
10
|
var accentOn = token("color.accent.on", "#111111");
|
|
11
|
+
var accentOnInk = token("color.accent.on-ink", "#FFD43B");
|
|
11
12
|
var band = unsafeCSS("var(--impakt-band, var(--impakt-color-ink, #111111))");
|
|
12
13
|
var bandOn = unsafeCSS("var(--impakt-band-on, var(--impakt-color-paper, #EFEFED))");
|
|
13
14
|
var bandMuted = unsafeCSS("var(--impakt-band-muted, var(--impakt-color-ink-muted, #A8A8A6))");
|
|
@@ -36,6 +37,7 @@ export {
|
|
|
36
37
|
inkMuted,
|
|
37
38
|
accent,
|
|
38
39
|
accentOn,
|
|
40
|
+
accentOnInk,
|
|
39
41
|
band,
|
|
40
42
|
bandOn,
|
|
41
43
|
bandMuted,
|
|
@@ -45,4 +47,4 @@ export {
|
|
|
45
47
|
levelOf,
|
|
46
48
|
pad
|
|
47
49
|
};
|
|
48
|
-
//# sourceMappingURL=chunk-
|
|
50
|
+
//# sourceMappingURL=chunk-EGNQHWY6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/g2-shared.ts"],"sourcesContent":["/**\n * The colours the G2 Noire blocks share.\n *\n * Two kinds. The fixed ink set is for a surface that stays ink in both themes,\n * such as a stage tag or a callout, so the yellow on it stays readable in dark.\n * The band set follows the `impakt-section` band a block sits on: `tone=\"ink\"`\n * sets `--impakt-band` and `--impakt-band-on`, and a block drawn outside any band\n * falls back to the ink values, so it is drawn as an ink panel of its own.\n *\n * Every value is a token with the G2 literal as its fallback, so the theme can\n * take them over without a change here.\n */\nimport { css, unsafeCSS } from 'lit';\nimport { token } from '@atomic-ui/ui';\n\n/** Ink, `#111111`. It does not flip in dark. */\nexport const ink = token('color.ink', '#111111');\n/** Paper, `#EFEFED`: text on ink. */\nexport const paper = token('color.paper', '#EFEFED');\n/** A raised surface on ink, `#1C1C1C`. */\nexport const inkRaised = token('color.ink-raised', '#1C1C1C');\n/** A line on ink, `#2E2E2E`. */\nexport const inkLine = token('color.ink-line', '#2E2E2E');\n/** Quiet text on ink, 7:1 on `#111111`. */\nexport const inkMuted = token('color.ink-muted', '#A8A8A6');\nexport const accent = token('color.accent.default', '#FFD43B');\nexport const accentOn = token('color.accent.on', '#111111');\n/** The accent as a mark on the fixed ink, lifted for a brand whose accent is too dark to read there. */\nexport const accentOnInk = token('color.accent.on-ink', '#FFD43B');\n\n/** The band behind the block. */\nexport const band = unsafeCSS('var(--impakt-band, var(--impakt-color-ink, #111111))');\n/** Text on the band. */\nexport const bandOn = unsafeCSS('var(--impakt-band-on, var(--impakt-color-paper, #EFEFED))');\n/** Quiet text on the band. */\nexport const bandMuted = unsafeCSS('var(--impakt-band-muted, var(--impakt-color-ink-muted, #A8A8A6))');\n/** A tile raised off the band: `#1C1C1C` on an ink band. */\nexport const bandRaised = unsafeCSS(\n 'var(--impakt-color-band-raised, color-mix(in srgb, var(--impakt-band-on, #EFEFED) 6%, var(--impakt-band, var(--impakt-color-ink, #111111))))',\n);\n/** A line on the band: `#2E2E2E` on an ink band. */\nexport const bandLine = unsafeCSS(\n 'var(--impakt-color-band-line, color-mix(in srgb, var(--impakt-band-on, #EFEFED) 16%, var(--impakt-band, var(--impakt-color-ink, #111111))))',\n);\n\n/** Small uppercase mono, the G2 label: 11px, +6% tracking. */\nexport const monoLabel = css`\n font-family: var(--impakt-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);\n font-size: 0.6875rem;\n font-weight: 400;\n line-height: 1.4;\n letter-spacing: 0.06em;\n text-transform: uppercase;\n`;\n\n/** The level a heading is given, kept between 1 and 6. */\nexport const levelOf = (n: number | undefined, fallback = 3): number => Math.min(Math.max(Number(n) || fallback, 1), 6);\n\n/** \"1\" → \"01\". */\nexport const pad = (n: number): string => String(n).padStart(2, '0');\n"],"mappings":";AAYA,SAAS,KAAK,iBAAiB;AAC/B,SAAS,aAAa;AAGf,IAAM,MAAM,MAAM,aAAa,SAAS;AAExC,IAAM,QAAQ,MAAM,eAAe,SAAS;AAE5C,IAAM,YAAY,MAAM,oBAAoB,SAAS;AAErD,IAAM,UAAU,MAAM,kBAAkB,SAAS;AAEjD,IAAM,WAAW,MAAM,mBAAmB,SAAS;AACnD,IAAM,SAAS,MAAM,wBAAwB,SAAS;AACtD,IAAM,WAAW,MAAM,mBAAmB,SAAS;AAEnD,IAAM,cAAc,MAAM,uBAAuB,SAAS;AAG1D,IAAM,OAAO,UAAU,sDAAsD;AAE7E,IAAM,SAAS,UAAU,2DAA2D;AAEpF,IAAM,YAAY,UAAU,kEAAkE;AAE9F,IAAM,aAAa;AAAA,EACxB;AACF;AAEO,IAAM,WAAW;AAAA,EACtB;AACF;AAGO,IAAM,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUlB,IAAM,UAAU,CAAC,GAAuB,WAAW,MAAc,KAAK,IAAI,KAAK,IAAI,OAAO,CAAC,KAAK,UAAU,CAAC,GAAG,CAAC;AAG/G,IAAM,MAAM,CAAC,MAAsB,OAAO,CAAC,EAAE,SAAS,GAAG,GAAG;","names":[]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
accent,
|
|
3
3
|
accentOn,
|
|
4
|
+
accentOnInk,
|
|
4
5
|
ink,
|
|
5
6
|
inkLine,
|
|
6
7
|
inkMuted,
|
|
@@ -9,7 +10,7 @@ import {
|
|
|
9
10
|
monoLabel,
|
|
10
11
|
pad,
|
|
11
12
|
paper
|
|
12
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EGNQHWY6.js";
|
|
13
14
|
|
|
14
15
|
// packages/blocks/src/components/g2-site.ts
|
|
15
16
|
import { css, html, nothing } from "lit";
|
|
@@ -48,7 +49,7 @@ var ImpaktStageTag = class extends ImpaktElement {
|
|
|
48
49
|
:host { display: inline-block; vertical-align: middle; }
|
|
49
50
|
.tag { display: inline-flex; align-items: baseline; gap: 0.6em; padding: 6px 10px; background: ${ink}; border: 1px solid ${ink}; ${monoLabel}; font-size: 0.75rem; font-weight: ${fontWeight("medium")}; white-space: nowrap; }
|
|
50
51
|
:host([on-ink]) .tag { background: ${inkRaised}; border-color: ${inkLine}; }
|
|
51
|
-
.index { color: ${
|
|
52
|
+
.index { color: ${accentOnInk}; }
|
|
52
53
|
.phase { color: ${paper}; }
|
|
53
54
|
.label { color: ${inkMuted}; }
|
|
54
55
|
@media (prefers-color-scheme: dark) { .tag { border-color: ${inkLine}; } }
|
|
@@ -101,13 +102,15 @@ var ImpaktSectionHead = class extends ImpaktElement {
|
|
|
101
102
|
spaceAround,
|
|
102
103
|
css`
|
|
103
104
|
:host { display: block; container-type: inline-size; color: ${t.text}; }
|
|
104
|
-
.top { display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; min-block-size: 29px; }
|
|
105
|
-
|
|
105
|
+
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: ${space(2)} ${space(4)}; min-block-size: 29px; }
|
|
106
|
+
/* The label row in G2 Mono M: IBM Plex Mono 13px at 1.5 (14:728). */
|
|
107
|
+
.label { margin: 0; font-family: ${t.fontMono}; font-size: var(--impakt-type-mono-m-size, 0.8125rem); line-height: var(--impakt-type-mono-m-line-height, 1.5); color: ${t.textMuted}; }
|
|
106
108
|
.body { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: ${space(10)}; row-gap: ${space(6)}; align-items: end; margin-block-start: ${space(6)}; }
|
|
107
109
|
.heading { margin: 0; font-family: ${t.fontHeading}; font-weight: ${fontWeight("semibold")}; color: var(--impakt-color-text-heading, ${t.text}); text-wrap: balance; overflow-wrap: anywhere; }
|
|
108
110
|
:host([size='m']) .heading { font-size: clamp(2.25rem, 1.2rem + 4cqi, 3.25rem); line-height: 1; letter-spacing: -0.04em; max-inline-size: 11.5em; }
|
|
109
111
|
:host([size='l']) .heading { font-size: clamp(2.5rem, 1.2rem + 5cqi, 4rem); line-height: 1; letter-spacing: -0.04em; max-inline-size: 11.5em; }
|
|
110
|
-
:
|
|
112
|
+
/* Display XL: 120px on a 1080px column and 52px on a 350px phone column, line height 1 and -5% (9:303, 14:734). */
|
|
113
|
+
:host([size='xl']) .heading { font-size: clamp(3.25rem, 1.2128rem + 9.315cqi, 7.5rem); line-height: var(--impakt-type-display-xl-line-height, 1); letter-spacing: var(--impakt-type-display-xl-tracking, -0.05em); }
|
|
111
114
|
.lead { margin: ${space(5)} 0 0; max-inline-size: 36rem; font-size: 1rem; line-height: 1.55; color: ${t.textMuted}; }
|
|
112
115
|
.side { display: grid; gap: ${space(6)}; justify-items: end; }
|
|
113
116
|
/* Beside a picture in the aside, such as the journey button, the heading sits level with the middle of it. */
|
|
@@ -191,7 +194,7 @@ var ImpaktServiceCard = class extends ImpaktElement {
|
|
|
191
194
|
.more { margin-block-start: ${space(2)}; ${monoLabel}; font-weight: ${fontWeight("medium")}; }
|
|
192
195
|
article:has(a):hover, article:focus-within, :host([featured]) article { background: ${ink}; color: ${paper}; border-color: ${ink}; }
|
|
193
196
|
article:has(a):hover :is(.text, .tags), article:focus-within :is(.text, .tags), :host([featured]) :is(.text, .tags) { color: ${inkMuted}; }
|
|
194
|
-
article:has(a):hover :is(.dot, .more), article:focus-within :is(.dot, .more), :host([featured]) :is(.dot, .more) { color: ${
|
|
197
|
+
article:has(a):hover :is(.dot, .more), article:focus-within :is(.dot, .more), :host([featured]) :is(.dot, .more) { color: ${accentOnInk}; }
|
|
195
198
|
@media (max-width: 47.99rem) { article { min-block-size: 0; justify-content: flex-start; } }
|
|
196
199
|
@media (forced-colors: active) { article { border-color: CanvasText; } .dot { background: CanvasText; } }
|
|
197
200
|
`
|
|
@@ -496,4 +499,4 @@ export {
|
|
|
496
499
|
ImpaktColumnList,
|
|
497
500
|
ImpaktOfficeCard
|
|
498
501
|
};
|
|
499
|
-
//# sourceMappingURL=chunk-
|
|
502
|
+
//# sourceMappingURL=chunk-JIITZUGI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/g2-site.ts"],"sourcesContent":["/**\n * The G2 Noire site blocks: the stage tag and section head every section starts\n * with, the service card, the cursors and hand notes on the hero, the facts,\n * numbered and column lists, and the office card.\n */\nimport { css, html, nothing, type TemplateResult } from 'lit';\nimport { ImpaktElement, focusRing, fontWeight, say, space, spaceAround, t } from '@atomic-ui/ui';\nimport { accent, accentOn, accentOnInk, ink, inkLine, inkMuted, inkRaised, levelOf, monoLabel, pad, paper } from './g2-shared';\n\n/** The five stages of a project, as the stage tags name them. */\nexport type StageName = 'note' | 'wireframe' | 'component' | 'code' | 'live';\n\n/** Each stage's number, phase and name, in English; `say` puts them in the page's language. */\nexport const STAGE_WORDS: Record<StageName, readonly [string, string, string]> = {\n note: ['01', 'Discover', 'Note'],\n wireframe: ['02', 'Design low-fi', 'Wireframe'],\n component: ['03', 'Design hi-fi', 'Component'],\n code: ['04', 'Build', 'Code'],\n live: ['05', 'Launch', 'Live'],\n};\n\n/**\n * A small square mono tag that says which stage of a project a section shows,\n * such as \"01 Discover Note\": the number in the accent, the phase in paper and\n * the stage's name quieter, on ink.\n *\n * Set `stage` for one of the five stages, or `index`, `phase` and `label` for\n * your own words; each one set wins over the stage's. On an ink band, set\n * `on-ink`: the tag is raised off the band with a line round it.\n *\n * **It is decoration.** The section's heading says what the section is, so the\n * tag is hidden from a screen reader unless `announce` is set (1.3.1). The tag\n * stays ink in both themes, so the yellow on it stays readable (1.4.3).\n *\n * @category content\n * @icon tag\n */\nexport class ImpaktStageTag extends ImpaktElement {\n static properties = {\n stage: { type: String, reflect: true },\n index: { type: String },\n phase: { type: String },\n label: { type: String },\n onInk: { type: Boolean, reflect: true, attribute: 'on-ink' },\n announce: { type: Boolean },\n };\n /** One of the five stages, which fills in the words. Leave empty to give them yourself. */\n declare stage: StageName | '';\n /** The number, such as \"01\". */\n declare index: string;\n /** The phase, such as \"Discover\". */\n declare phase: string;\n /** The stage's name, such as \"Note\". */\n declare label: string;\n /** Raise the tag off an ink band, with a line round it. */\n declare onInk: boolean;\n /** Let a screen reader read the tag. Leave off when the heading beside it says the same. */\n declare announce: boolean;\n\n constructor() {\n super();\n this.stage = '';\n this.index = '';\n this.phase = '';\n this.label = '';\n this.onInk = false;\n this.announce = false;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: inline-block; vertical-align: middle; }\n .tag { display: inline-flex; align-items: baseline; gap: 0.6em; padding: 6px 10px; background: ${ink}; border: 1px solid ${ink}; ${monoLabel}; font-size: 0.75rem; font-weight: ${fontWeight('medium')}; white-space: nowrap; }\n :host([on-ink]) .tag { background: ${inkRaised}; border-color: ${inkLine}; }\n .index { color: ${accentOnInk}; }\n .phase { color: ${paper}; }\n .label { color: ${inkMuted}; }\n @media (prefers-color-scheme: dark) { .tag { border-color: ${inkLine}; } }\n @media (forced-colors: active) { .tag { border-color: CanvasText; } .index, .phase, .label { color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n const words = this.stage && this.stage in STAGE_WORDS ? STAGE_WORDS[this.stage] : undefined;\n const index = this.index || words?.[0] || '';\n const phase = this.phase || (words ? say(words[1]) : '');\n const label = this.label || (words ? say(words[2]) : '');\n if (!index && !phase && !label) return html``;\n return html`<span class=\"tag\" part=\"tag\" aria-hidden=${this.announce ? nothing : 'true'}\n >${index ? html`<span class=\"index\" part=\"index\">${index}</span>` : nothing}${phase ? html`<span class=\"phase\" part=\"phase\">${phase}</span>` : nothing}${\n label ? html`<span class=\"label\" part=\"label\">${label}</span>` : nothing\n }</span\n >`;\n }\n}\n\n/**\n * The head of a section: a mono label such as \"# Services\" with an optional\n * stage tag on the right, then a display heading and a lead.\n *\n * `size` sets the heading: `xl` (120px) for a page's hero, `l` (64px), and `m`\n * (52px) for a section. Give the heading as `heading`, or in the `heading` slot\n * when part of it is picked out with `impakt-highlight` or an accent word. The\n * lead goes under the heading, or with `lead-position=\"side\"` at the foot of a\n * 340px column on the right. The `aside` slot holds a picture on the right,\n * such as a journey object at 448 by 288.\n *\n * **One heading, at the level the page needs.** `level` is 1 for a page's hero\n * and 2 for a section (1.3.1, 2.4.6). The \"#\" before the label is decoration.\n *\n * **It stacks in a narrow column**, measured against its own width: the label\n * row, the heading, the lead and the aside, in reading order (1.4.10). It takes\n * its colours from the band it is on, so it reads on paper, ink and accent.\n *\n * @category layout\n * @icon heading\n * @role heading\n * @slot heading - The heading, when it holds more than words, such as an `impakt-highlight`. Replaces `heading`.\n * @slot lead - The lead, when it holds more than words. Replaces `lead`.\n * @slot tag - Something on the right of the label row, in place of the stage tag.\n * @slot aside - A picture on the right of the heading, such as a journey object.\n */\nexport class ImpaktSectionHead extends ImpaktElement {\n static properties = {\n label: { type: String },\n heading: { type: String },\n lead: { type: String },\n size: { type: String, reflect: true },\n level: { type: Number, reflect: true },\n leadPosition: { type: String, reflect: true, attribute: 'lead-position' },\n stage: { type: String },\n stageOnInk: { type: Boolean, attribute: 'stage-on-ink' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** The mono label above the heading, such as \"Services\". A \"#\" is drawn before it. */\n declare label: string;\n declare heading: string;\n /** A sentence or two about the section. */\n declare lead: string;\n /** How large the heading is: `xl` 120px, `l` 64px, `m` 52px. */\n declare size: 'xl' | 'l' | 'm';\n /** The heading's level: 1 for a page's hero, 2 for a section. */\n declare level: 1 | 2;\n /** Where the lead goes: under the heading, or at the foot of a column on the right. */\n declare leadPosition: 'below' | 'side';\n /** A stage tag on the right of the label row. Leave empty for none. */\n declare stage: StageName | '';\n /** Draw the stage tag for an ink band. */\n declare stageOnInk: boolean;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.label = '';\n this.heading = '';\n this.lead = '';\n this.size = 'm';\n this.level = 2;\n this.leadPosition = 'below';\n this.stage = '';\n this.stageOnInk = false;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; color: ${t.text}; }\n .top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: ${space(2)} ${space(4)}; min-block-size: 29px; }\n /* The label row in G2 Mono M: IBM Plex Mono 13px at 1.5 (14:728). */\n .label { margin: 0; font-family: ${t.fontMono}; font-size: var(--impakt-type-mono-m-size, 0.8125rem); line-height: var(--impakt-type-mono-m-line-height, 1.5); color: ${t.textMuted}; }\n .body { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: ${space(10)}; row-gap: ${space(6)}; align-items: end; margin-block-start: ${space(6)}; }\n .heading { margin: 0; font-family: ${t.fontHeading}; font-weight: ${fontWeight('semibold')}; color: var(--impakt-color-text-heading, ${t.text}); text-wrap: balance; overflow-wrap: anywhere; }\n :host([size='m']) .heading { font-size: clamp(2.25rem, 1.2rem + 4cqi, 3.25rem); line-height: 1; letter-spacing: -0.04em; max-inline-size: 11.5em; }\n :host([size='l']) .heading { font-size: clamp(2.5rem, 1.2rem + 5cqi, 4rem); line-height: 1; letter-spacing: -0.04em; max-inline-size: 11.5em; }\n /* Display XL: 120px on a 1080px column and 52px on a 350px phone column, line height 1 and -5% (9:303, 14:734). */\n :host([size='xl']) .heading { font-size: clamp(3.25rem, 1.2128rem + 9.315cqi, 7.5rem); line-height: var(--impakt-type-display-xl-line-height, 1); letter-spacing: var(--impakt-type-display-xl-tracking, -0.05em); }\n .lead { margin: ${space(5)} 0 0; max-inline-size: 36rem; font-size: 1rem; line-height: 1.55; color: ${t.textMuted}; }\n .side { display: grid; gap: ${space(6)}; justify-items: end; }\n /* Beside a picture in the aside, such as the journey button, the heading sits level with the middle of it. */\n .body.aside { align-items: center; }\n .side .lead { margin: 0; max-inline-size: 340px; inline-size: 340px; }\n .side:not(:has(.lead)) { align-self: center; }\n ::slotted([slot='aside']) { display: block; max-inline-size: 100%; }\n @container (max-width: 47.99rem) {\n .body { grid-template-columns: minmax(0, 1fr); }\n .side { justify-items: stretch; }\n .side .lead { inline-size: auto; }\n }\n `,\n ];\n\n render(): TemplateResult {\n const lead = html`<p class=\"lead\" part=\"lead\"><slot name=\"lead\">${this.lead}</slot></p>`;\n const showLead = Boolean(this.lead) || this.hasSlot('lead');\n const inner = html`<slot name=\"heading\">${this.heading}</slot>`;\n const heading = Number(this.level) === 1 ? html`<h1 class=\"heading\" part=\"heading\">${inner}</h1>` : html`<h2 class=\"heading\" part=\"heading\">${inner}</h2>`;\n const side = this.leadPosition === 'side';\n return html`<header part=\"head\">\n <div class=\"top\">\n ${this.label ? html`<p class=\"label\" part=\"label\"><span aria-hidden=\"true\"># </span>${this.label}</p>` : html`<span></span>`}\n <slot name=\"tag\">${this.stage ? html`<impakt-stage-tag stage=${this.stage} ?on-ink=${this.stageOnInk}></impakt-stage-tag>` : nothing}</slot>\n </div>\n <div class=${this.hasSlot('aside') ? 'body aside' : 'body'}>\n <div class=\"main\">${heading}${showLead && !side ? lead : nothing}</div>\n <div class=\"side\">${showLead && side ? lead : nothing}<slot name=\"aside\"></slot></div>\n </div>\n </header>`;\n }\n\n /** Whether a child is in the named slot. On a server, where there are no children, only the attribute counts. */\n private hasSlot(name: string): boolean {\n const children = (this as unknown as { children?: HTMLCollection }).children;\n if (!children) return false;\n return Array.from(children).some((c) => c.getAttribute('slot') === name);\n }\n}\n\n/**\n * A service on the services grid: a number and a dot at the top, then at the\n * foot its name, a line about it, mono tags such as \"React Native · Expo\" and\n * \"Learn more\".\n *\n * **The card is one link.** The link is on the service's name, a heading, and\n * stretched over the card (2.4.4, 2.5.8). The number, dot and \"Learn more\"\n * line are decoration. Pointing at the card and focusing it look the same: it\n * turns to ink with paper words and the dot and \"Learn more\" in the accent,\n * which holds 4.5:1 on ink, and the focus ring is drawn round it (2.4.7).\n *\n * `featured` draws a card inked all the time, as it is when pointed at, for\n * the one service a page picks out or a sheet that shows the state.\n *\n * Put cards in a four-column grid with a 10px gap. On a phone the words sit at\n * the top and the card is as tall as they are.\n *\n * @category content\n * @icon card\n */\nexport class ImpaktServiceCard extends ImpaktElement {\n static properties = {\n number: { type: String },\n heading: { type: String },\n text: { type: String },\n tags: { type: String },\n href: { type: String },\n linkText: { type: String, attribute: 'link-text' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n featured: { type: Boolean, reflect: true },\n };\n /** The number at the top, such as \"01\". */\n declare number: string;\n /** The service's name. */\n declare heading: string;\n /** A line about it. */\n declare text: string;\n /** What it uses or includes, such as \"React Native · Expo · Store launch\". Set in mono capitals. */\n declare tags: string;\n /** Where the card goes. Leave empty for a card that goes nowhere. */\n declare href: string;\n /** The line at the foot of a card that goes somewhere. */\n declare linkText: string;\n declare headingLevel: number;\n /** Draw the card inked, as when it is pointed at. */\n declare featured: boolean;\n\n constructor() {\n super();\n this.featured = false;\n this.number = '';\n this.heading = '';\n this.text = '';\n this.tags = '';\n this.href = '';\n this.linkText = 'Learn more';\n this.headingLevel = 3;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; block-size: 100%; }\n article { position: relative; box-sizing: border-box; block-size: 100%; min-block-size: 330px; display: flex; flex-direction: column; justify-content: space-between; gap: ${space(6)}; padding: ${space(6)}; background: ${t.surfaceCard}; color: ${t.text}; border: 1px solid ${t.text}; transition: background-color 140ms ease-out, color 140ms ease-out; }\n .top { display: flex; align-items: center; justify-content: space-between; }\n .number { font-family: ${t.fontMono}; font-size: 0.75rem; letter-spacing: 0.06em; }\n .dot { inline-size: 10px; block-size: 10px; border-radius: 50%; background: currentColor; }\n .foot { display: grid; gap: ${space(3)}; }\n .heading { margin: 0; font-family: ${t.fontHeading}; font-size: 1.5rem; font-weight: ${fontWeight('semibold')}; line-height: 1.15; letter-spacing: -0.02em; }\n .heading a { color: inherit; text-decoration: none; }\n .heading a::after { content: ''; position: absolute; inset: 0; }\n .heading a:focus-visible { outline: none; }\n .heading a:focus-visible::after { box-shadow: ${t.focusShadow}; }\n .text { margin: 0; font-size: 0.9375rem; line-height: 1.5; color: ${t.textMuted}; }\n .tags { margin: ${space(1)} 0 0; ${monoLabel}; color: ${t.textMuted}; }\n .more { margin-block-start: ${space(2)}; ${monoLabel}; font-weight: ${fontWeight('medium')}; }\n article:has(a):hover, article:focus-within, :host([featured]) article { background: ${ink}; color: ${paper}; border-color: ${ink}; }\n article:has(a):hover :is(.text, .tags), article:focus-within :is(.text, .tags), :host([featured]) :is(.text, .tags) { color: ${inkMuted}; }\n article:has(a):hover :is(.dot, .more), article:focus-within :is(.dot, .more), :host([featured]) :is(.dot, .more) { color: ${accentOnInk}; }\n @media (max-width: 47.99rem) { article { min-block-size: 0; justify-content: flex-start; } }\n @media (forced-colors: active) { article { border-color: CanvasText; } .dot { background: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n const level = levelOf(this.headingLevel);\n return html`<article part=\"card\">\n <div class=\"top\" aria-hidden=\"true\">\n <span class=\"number\" part=\"number\">${this.number}</span>\n <span class=\"dot\" part=\"dot\"></span>\n </div>\n <div class=\"foot\">\n <div class=\"heading\" part=\"heading\" role=\"heading\" aria-level=${level}>\n ${this.href ? html`<a href=${this.href} part=\"link\">${this.heading}</a>` : this.heading}\n </div>\n ${this.text ? html`<p class=\"text\" part=\"text\">${this.text}</p>` : nothing}\n ${this.tags ? html`<p class=\"tags\" part=\"tags\">${this.tags}</p>` : nothing}\n ${this.href && this.linkText ? html`<span class=\"more\" part=\"more\" aria-hidden=\"true\">${this.linkText} →</span>` : nothing}\n </div>\n </article>`;\n }\n}\n\n/**\n * A pointer with a name beside it, as if someone were working on the page with\n * you: the cursors round a hero's heading.\n *\n * The name is on ink, outlined, or on the accent. With `drift` it moves a few\n * pixels to and fro, slowly; it stays still for anyone who asks for less\n * motion (2.3.3), and it never moves more than 5 seconds without a way to stop\n * it mattering, because it carries nothing (2.2.2).\n *\n * **It is decoration**, hidden from a screen reader (1.3.1).\n *\n * @category media\n * @icon pointer\n */\nexport class ImpaktCursor extends ImpaktElement {\n static properties = {\n name: { type: String },\n variant: { type: String, reflect: true },\n drift: { type: Boolean, reflect: true },\n };\n /** The name beside the pointer, such as \"Client\". */\n declare name: string;\n /** How the name is drawn: on ink, outlined, or on the accent. */\n declare variant: 'ink' | 'outline' | 'accent';\n /** Move slowly to and fro. Still for anyone who asks for less motion. */\n declare drift: boolean;\n\n constructor() {\n super();\n this.name = '';\n this.variant = 'ink';\n this.drift = false;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: inline-block; position: relative; pointer-events: none; }\n .cursor { display: inline-flex; align-items: flex-start; }\n svg { display: block; flex: none; }\n .arrow { fill: ${ink}; stroke: ${paper}; }\n .name { margin: 16px 0 0 -2px; padding: 4px 7px; ${monoLabel}; font-weight: ${fontWeight('medium')}; white-space: nowrap; background: ${ink}; color: ${paper}; border: 1px solid ${ink}; }\n :host([variant='outline']) .name { background: ${t.surfaceCard}; color: ${t.text}; border-color: ${t.text}; }\n :host([variant='accent']) .name { background: ${accent}; color: ${accentOn}; border-color: ${accentOn}; }\n :host([drift]) .cursor { animation: drift 7s ease-in-out infinite alternate; }\n @keyframes drift { 0% { transform: translate(0, 0); } 50% { transform: translate(6px, -3px); } 100% { transform: translate(-3px, 4px); } }\n @media (prefers-reduced-motion: reduce) { :host([drift]) .cursor { animation: none; } }\n @media (forced-colors: active) { .arrow { fill: CanvasText; stroke: Canvas; } .name { border-color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n return html`<span class=\"cursor\" part=\"cursor\" aria-hidden=\"true\">\n <svg viewBox=\"0 0 16 22\" width=\"16\" height=\"22\" focusable=\"false\"><path class=\"arrow\" d=\"M1.5 1.5v16.2l4.3-4.1 3 6.6 2.6-1.2-3-6.5h6z\" stroke-width=\"1.25\" stroke-linejoin=\"round\" /></svg>\n ${this.name ? html`<span class=\"name\" part=\"name\">${this.name}</span>` : nothing}\n </span>`;\n }\n}\n\n/**\n * A short note in handwriting, with an arrow if it points at something, such\n * as \"keep scrolling, this note becomes the real button.\"\n *\n * The face is `--impakt-font-family-hand` (Kalam in the G2 designs), and the\n * body face until a brand sets it. The note is real text and is read, unless\n * `decorative` is set because it repeats something said elsewhere (1.3.1).\n * The arrow is always decoration.\n *\n * @category content\n * @icon pen\n * @slot - The note, when it holds more than words. Replaces `text`.\n */\nexport class ImpaktHandNote extends ImpaktElement {\n static properties = {\n text: { type: String },\n arrow: { type: String, reflect: true },\n decorative: { type: Boolean, reflect: true },\n };\n /** The note. */\n declare text: string;\n /** Where an arrow points from the note. */\n declare arrow: 'none' | 'left' | 'right' | 'down' | 'up';\n /** Hide the note from a screen reader, when it repeats something said elsewhere. */\n declare decorative: boolean;\n\n constructor() {\n super();\n this.text = '';\n this.arrow = 'none';\n this.decorative = false;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: inline-block; max-inline-size: 18rem; }\n .note { display: inline-flex; align-items: center; gap: ${space(2)}; }\n :host(:is([arrow='down'], [arrow='up'])) .note { flex-direction: column; align-items: flex-start; }\n :host(:is([arrow='left'], [arrow='up'])) svg { order: -1; }\n p { margin: 0; font-family: var(--impakt-font-family-hand, ${t.fontBody}); font-size: 1.25rem; line-height: 1.2; color: ${t.textMuted}; }\n svg { flex: none; color: ${t.textMuted}; }\n :host([arrow='left']) svg { transform: scaleX(-1); }\n :host([arrow='down']) svg { transform: rotate(90deg); }\n :host([arrow='up']) svg { transform: rotate(-90deg); }\n @media (forced-colors: active) { p, svg { color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n const arrow =\n this.arrow && this.arrow !== 'none'\n ? html`<svg viewBox=\"0 0 40 24\" width=\"40\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M2 16c8-10 20-12 34-6M30 4l6 6-7 4\" /></svg>`\n : nothing;\n return html`<div class=\"note\" part=\"note\" aria-hidden=${this.decorative ? 'true' : nothing}><p part=\"text\"><slot>${this.text}</slot></p>${arrow}</div>`;\n }\n}\n\n/** One fact: a label and its value. */\nexport interface FactItem {\n /** What it is, such as \"Client\". Set in mono capitals. */\n label: string;\n /** The fact, such as \"Vehicle importer · UK → Cyprus\". */\n value: string;\n /** Make the value a link, such as `mailto:` for an email address. */\n href?: string;\n /** This value's size, in place of the block's. */\n size?: 'sm' | 'md' | 'lg' | 'xl';\n}\n\n/**\n * A few facts, each a mono label over its value: a case study's client, role,\n * platform and stack in four columns under an ink rule, or contact details\n * stacked with the email set large.\n *\n * A description list, so each value is read with its label (1.3.1). Columns\n * wrap to fit their width, so they stack on a phone (1.4.10).\n *\n * @category content\n * @icon list\n */\nexport class ImpaktFacts extends ImpaktElement {\n static properties = {\n items: { type: Array },\n layout: { type: String, reflect: true },\n size: { type: String, reflect: true },\n label: { type: String },\n };\n /** The facts, in order. */\n declare items: FactItem[];\n /** Side by side under a rule each, or stacked. */\n declare layout: 'columns' | 'stacked';\n /** The values' size: `sm` 16px, `md` 18px, `lg` 24px, `xl` 32px. An item can set its own. */\n declare size: 'sm' | 'md' | 'lg' | 'xl';\n /** A name for the list, for a screen reader. Leave empty for none. */\n declare label: string;\n\n constructor() {\n super();\n this.items = [];\n this.layout = 'columns';\n this.size = 'md';\n this.label = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host { display: block; color: ${t.text}; }\n dl { margin: 0; display: grid; gap: ${space(5)}; }\n :host([layout='columns']) dl { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); column-gap: ${space(5)}; row-gap: ${space(6)}; }\n :host([layout='columns']) .fact { border-block-start: 1px solid ${t.text}; padding-block-start: ${space(4)}; }\n dt { ${monoLabel}; color: ${t.textMuted}; }\n dd { margin: ${space(2)} 0 0; font-family: ${t.fontBody}; line-height: 1.3; overflow-wrap: anywhere; }\n :host([layout='columns']) dd { margin-block-start: ${space(3)}; }\n .sm { font-size: 1rem; }\n .md { font-size: 1.125rem; }\n .lg { font-size: 1.5rem; letter-spacing: -0.01em; }\n .xl { font-size: clamp(1.5rem, 1rem + 2vw, 2rem); letter-spacing: -0.02em; }\n a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }\n a:hover { text-decoration-thickness: 2px; }\n @media (forced-colors: active) { :host([layout='columns']) .fact { border-color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n if (!this.items.length) return html``;\n return html`<dl part=\"list\" aria-label=${this.label || nothing}>\n ${this.items.map(\n (item) => html`<div class=\"fact\" part=\"fact\">\n <dt part=\"label\">${item.label}</dt>\n <dd part=\"value\" class=${item.size ?? this.size}>${item.href ? html`<a href=${item.href}>${item.value}</a>` : item.value}</dd>\n </div>`,\n )}\n </dl>`;\n }\n}\n\n/** One row of a numbered list. */\nexport interface NumberedItem {\n heading: string;\n text?: string;\n}\n\n/**\n * A numbered list under an ink rule, each row split by a hairline: the number,\n * a heading and a line of quieter text in three columns. \"Three rules we don't\n * break\", the steps of a project, a tool's features.\n *\n * An ordered list, so a screen reader says how many rows there are and which\n * one this is, and the drawn numbers are hidden from it (1.3.1). Each heading\n * is at the level the page asks for. It stacks in a narrow column, measured\n * against its own width (1.4.10), and takes its colours from its band.\n *\n * @category content\n * @icon list-ordered\n */\nexport class ImpaktNumberedList extends ImpaktElement {\n static properties = {\n items: { type: Array },\n start: { type: Number },\n headingLevel: { type: Number, attribute: 'heading-level' },\n label: { type: String },\n };\n declare items: NumberedItem[];\n /** The number the first row is given. */\n declare start: number;\n declare headingLevel: number;\n /** A name for the list, for a screen reader. Leave empty for none. */\n declare label: string;\n\n constructor() {\n super();\n this.items = [];\n this.start = 1;\n this.headingLevel = 3;\n this.label = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; container-type: inline-size; color: ${t.text}; }\n ol { margin: 0; padding: 0; list-style: none; border-block-start: 1px solid ${t.text}; }\n li { display: grid; grid-template-columns: 60px minmax(0, 520fr) minmax(0, 420fr); column-gap: ${space(10)}; align-items: center; padding-block: ${space(6)}; border-block-end: 1px solid ${t.rule}; }\n .n { font-family: ${t.fontMono}; font-size: 0.75rem; letter-spacing: 0.06em; color: ${t.textMuted}; }\n .heading { margin: 0; font-family: ${t.fontHeading}; font-size: clamp(1.5rem, 1rem + 2cqi, 2rem); font-weight: ${fontWeight('semibold')}; line-height: 1.15; letter-spacing: -0.025em; }\n .text { margin: 0; font-size: 0.9375rem; line-height: 1.55; color: ${t.textMuted}; }\n @container (max-width: 47.99rem) {\n li { grid-template-columns: minmax(0, 1fr); row-gap: ${space(2)}; }\n }\n @media (forced-colors: active) { ol { border-color: CanvasText; } li { border-color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n if (!this.items.length) return html``;\n const level = levelOf(this.headingLevel);\n const start = Number.isFinite(Number(this.start)) ? Number(this.start) : 1;\n return html`<ol part=\"list\" role=\"list\" start=${start} aria-label=${this.label || nothing}>\n ${this.items.map(\n (item, i) => html`<li part=\"item\">\n <span class=\"n\" aria-hidden=\"true\">${pad(start + i)}</span>\n <div class=\"heading\" role=\"heading\" aria-level=${level} part=\"heading\">${item.heading}</div>\n ${item.text ? html`<p class=\"text\" part=\"text\">${item.text}</p>` : html`<span></span>`}\n </li>`,\n )}\n </ol>`;\n }\n}\n\n/** One column of a column list. */\nexport interface ColumnListColumn {\n /** The column's heading, such as \"Design\". Set in mono capitals. */\n heading: string;\n /** What is in it, each a line set large. */\n items: string[];\n}\n\n/**\n * What a studio does, in four columns: each under an ink rule, with a mono\n * heading such as \"Engineering\" and a stack of what it covers set large. The\n * items are words, not links.\n *\n * Each column's heading is a heading at the level the page asks for, and its\n * items a list (1.3.1). The columns wrap to fit their width (1.4.10).\n *\n * @category content\n * @icon columns\n */\nexport class ImpaktColumnList extends ImpaktElement {\n static properties = {\n columns: { type: Array },\n headingLevel: { type: Number, attribute: 'heading-level' },\n };\n declare columns: ColumnListColumn[];\n declare headingLevel: number;\n\n constructor() {\n super();\n this.columns = [];\n this.headingLevel = 3;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; color: ${t.text}; }\n .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: ${space(8)} ${space(5)}; }\n section { border-block-start: 1px solid ${t.text}; padding-block-start: ${space(4)}; }\n .heading { margin: 0; ${monoLabel}; color: ${t.textMuted}; }\n ul { margin: ${space(3)} 0 0; padding: 0; list-style: none; display: grid; gap: ${space(2)}; }\n li { font-family: ${t.fontHeading}; font-size: 1.5rem; font-weight: ${fontWeight('semibold')}; line-height: 1.2; letter-spacing: -0.02em; }\n @media (forced-colors: active) { section { border-color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n if (!this.columns.length) return html``;\n const level = levelOf(this.headingLevel);\n return html`<div class=\"grid\" part=\"grid\">\n ${this.columns.map(\n (col) => html`<section part=\"column\">\n <div class=\"heading\" role=\"heading\" aria-level=${level} part=\"heading\">${col.heading}</div>\n <ul role=\"list\" part=\"list\">${(col.items ?? []).map((item) => html`<li part=\"item\">${item}</li>`)}</ul>\n </section>`,\n )}\n </div>`;\n }\n}\n\n/**\n * An office: a mono line with its time zone and hours, its name set large, the\n * region under it and a line about it, on a white card with an ink border. An\n * accent tag at the top right can say how its hours meet another office's,\n * such as \"+2h · same working day\".\n *\n * The name is a heading at the level the page asks for (1.3.1). The tag is\n * text and is read; on a narrow card it moves above the name (1.4.10).\n *\n * @category content\n * @icon map-pin\n */\nexport class ImpaktOfficeCard extends ImpaktElement {\n static properties = {\n hours: { type: String },\n name: { type: String },\n region: { type: String },\n text: { type: String },\n tag: { type: String },\n headingLevel: { type: Number, attribute: 'heading-level' },\n };\n /** The time zone and hours, such as \"GMT · Mon–Fri 9–18\". */\n declare hours: string;\n /** The office, such as \"UK\". */\n declare name: string;\n /** Where it is, such as \"United Kingdom\". */\n declare region: string;\n /** A line about it. */\n declare text: string;\n /** An accent tag at the top right, such as \"+2h · same working day\". Leave empty for none. */\n declare tag: string;\n declare headingLevel: number;\n\n constructor() {\n super();\n this.hours = '';\n this.name = '';\n this.region = '';\n this.text = '';\n this.tag = '';\n this.headingLevel = 3;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; block-size: 100%; container-type: inline-size; }\n article { box-sizing: border-box; block-size: 100%; display: grid; align-content: start; gap: ${space(2)}; padding: ${space(8)}; background: ${t.surfaceCard}; color: ${t.text}; border: 1px solid ${t.text}; }\n .top { display: flex; flex-wrap: wrap-reverse; justify-content: space-between; align-items: center; gap: ${space(2)}; }\n .hours { margin: 0; ${monoLabel}; color: ${t.textMuted}; }\n .tag { margin: 0; padding: 3px 6px; ${monoLabel}; font-weight: ${fontWeight('medium')}; background: ${accent}; color: ${accentOn}; }\n .name { margin: ${space(2)} 0 0; font-family: ${t.fontHeading}; font-size: clamp(2.5rem, 1rem + 10cqi, 4rem); font-weight: ${fontWeight('semibold')}; line-height: 1; letter-spacing: -0.04em; overflow-wrap: anywhere; }\n .region { margin: ${space(2)} 0 0; font-size: 1rem; line-height: 1.4; }\n .text { margin: ${space(2)} 0 0; font-size: 0.9375rem; line-height: 1.5; color: ${t.textMuted}; }\n @container (max-width: 22rem) { article { padding: ${space(5)}; } }\n @media (forced-colors: active) { article { border-color: CanvasText; } .tag { border: 1px solid CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n const level = levelOf(this.headingLevel);\n return html`<article part=\"card\">\n ${\n this.hours || this.tag\n ? html`<div class=\"top\">${this.hours ? html`<p class=\"hours\" part=\"hours\">${this.hours}</p>` : html`<span></span>`}${this.tag ? html`<p class=\"tag\" part=\"tag\">${this.tag}</p>` : nothing}</div>`\n : nothing\n }\n <div class=\"name\" role=\"heading\" aria-level=${level} part=\"name\">${this.name}</div>\n ${this.region ? html`<p class=\"region\" part=\"region\">${this.region}</p>` : nothing}\n ${this.text ? html`<p class=\"text\" part=\"text\">${this.text}</p>` : nothing}\n </article>`;\n }\n}\n\ncustomElements.define('impakt-stage-tag', ImpaktStageTag);\ncustomElements.define('impakt-section-head', ImpaktSectionHead);\ncustomElements.define('impakt-service-card', ImpaktServiceCard);\ncustomElements.define('impakt-cursor', ImpaktCursor);\ncustomElements.define('impakt-hand-note', ImpaktHandNote);\ncustomElements.define('impakt-facts', ImpaktFacts);\ncustomElements.define('impakt-numbered-list', ImpaktNumberedList);\ncustomElements.define('impakt-column-list', ImpaktColumnList);\ncustomElements.define('impakt-office-card', ImpaktOfficeCard);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-stage-tag': ImpaktStageTag;\n 'impakt-section-head': ImpaktSectionHead;\n 'impakt-service-card': ImpaktServiceCard;\n 'impakt-cursor': ImpaktCursor;\n 'impakt-hand-note': ImpaktHandNote;\n 'impakt-facts': ImpaktFacts;\n 'impakt-numbered-list': ImpaktNumberedList;\n 'impakt-column-list': ImpaktColumnList;\n 'impakt-office-card': ImpaktOfficeCard;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAKA,SAAS,KAAK,MAAM,eAAoC;AACxD,SAAS,eAAe,WAAW,YAAY,KAAK,OAAO,aAAa,SAAS;AAO1E,IAAM,cAAoE;AAAA,EAC/E,MAAM,CAAC,MAAM,YAAY,MAAM;AAAA,EAC/B,WAAW,CAAC,MAAM,iBAAiB,WAAW;AAAA,EAC9C,WAAW,CAAC,MAAM,gBAAgB,WAAW;AAAA,EAC7C,MAAM,CAAC,MAAM,SAAS,MAAM;AAAA,EAC5B,MAAM,CAAC,MAAM,UAAU,MAAM;AAC/B;AAkBO,IAAM,iBAAN,cAA6B,cAAc;AAAA,EAChD;AAAA,SAAO,aAAa;AAAA,MAClB,OAAO,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,MACrC,OAAO,EAAE,MAAM,OAAO;AAAA,MACtB,OAAO,EAAE,MAAM,OAAO;AAAA,MACtB,OAAO,EAAE,MAAM,OAAO;AAAA,MACtB,OAAO,EAAE,MAAM,SAAS,SAAS,MAAM,WAAW,SAAS;AA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EA,eAAe,OAAO,oBAAoB,cAAc;AACxD,eAAe,OAAO,uBAAuB,iBAAiB;AAC9D,eAAe,OAAO,uBAAuB,iBAAiB;AAC9D,eAAe,OAAO,iBAAiB,YAAY;AACnD,eAAe,OAAO,oBAAoB,cAAc;AACxD,eAAe,OAAO,gBAAgB,WAAW;AACjD,eAAe,OAAO,wBAAwB,kBAAkB;AAChE,eAAe,OAAO,sBAAsB,gBAAgB;AAC5D,eAAe,OAAO,sBAAsB,gBAAgB;","names":[]}
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
levelOf,
|
|
12
12
|
monoLabel,
|
|
13
13
|
paper
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-EGNQHWY6.js";
|
|
15
15
|
|
|
16
16
|
// packages/blocks/src/components/g2-tools.ts
|
|
17
17
|
import { css, html, nothing } from "lit";
|
|
@@ -55,6 +55,8 @@ var ImpaktFlow = class extends ImpaktElement {
|
|
|
55
55
|
.box.accent { background: ${accent}; border-color: ${accent}; color: ${accentOn}; }
|
|
56
56
|
.label { margin: 0 0 ${space(2)}; ${monoLabel}; color: ${t.textMuted}; }
|
|
57
57
|
.text { margin: ${space(2)} 0 0; font-size: 0.875rem; line-height: 1.5; color: ${t.textMuted}; }
|
|
58
|
+
/* On the soft fill the muted words are drawn a step toward the ink, so they read at 4.5:1 for a brand whose soft fill is its own tint. */
|
|
59
|
+
.soft :is(.label, .text) { color: color-mix(in srgb, ${t.textMuted} 80%, ${t.text}); }
|
|
58
60
|
:host([on-ink]) :is(.card, .soft) :is(.label, .text) { color: ${bandMuted}; }
|
|
59
61
|
.ink :is(.label, .text) { color: ${inkMuted}; }
|
|
60
62
|
.accent :is(.label, .text) { color: ${accentOn}; }
|
|
@@ -94,4 +96,4 @@ customElements.define("impakt-flow", ImpaktFlow);
|
|
|
94
96
|
export {
|
|
95
97
|
ImpaktFlow
|
|
96
98
|
};
|
|
97
|
-
//# sourceMappingURL=chunk-
|
|
99
|
+
//# sourceMappingURL=chunk-KDDXCGEZ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/g2-tools.ts"],"sourcesContent":["/**\n * The G2 Noire blocks for the AI tools pages: the flow that shows how a tool\n * works, or how a visitor gets from one page to the next.\n */\nimport { css, html, nothing, type TemplateResult } from 'lit';\nimport { ImpaktElement, fontWeight, space, t } from '@atomic-ui/ui';\nimport { accent, accentOn, bandLine, bandMuted, bandOn, bandRaised, ink, inkLine, inkMuted, levelOf, monoLabel, paper } from './g2-shared';\n\n/** One step of a flow. */\nexport interface FlowStep {\n /** A mono label, such as \"01 · Model\". */\n label?: string;\n /** What happens, such as \"Reads and drafts\". */\n heading: string;\n /** A line about it. */\n text?: string;\n /** The box: white with an ink border, soft, ink, or the accent. */\n tone?: 'card' | 'soft' | 'ink' | 'accent';\n /** Words on the arrow that leads to this step, such as \"back\". */\n connector?: string;\n}\n\n/**\n * Steps in a row joined by arrows: how a tool works (\"Reads and drafts\",\n * \"Checks every answer\", \"Makes the call\"), or the pages a visitor passes\n * through. Each box has a tone, a mono label, a heading and a line; an arrow\n * can carry words such as \"back\".\n *\n * **An ordered list.** A screen reader meets the steps in order, each heading\n * at the level the page asks for; the arrows are decoration, and words on an\n * arrow are read before the step they lead to (1.3.1). In a narrow column,\n * measured against its own width, the steps stack and the arrows point down\n * (1.4.10).\n *\n * On an ink band, set `on-ink`: white boxes become tiles raised off the band.\n * The ink and accent boxes keep their colours in both themes, so their words\n * keep their contrast (1.4.3).\n *\n * @category content\n * @icon flow\n */\nexport class ImpaktFlow extends ImpaktElement {\n static properties = {\n steps: { type: Array },\n size: { type: String, reflect: true },\n onInk: { type: Boolean, reflect: true, attribute: 'on-ink' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n label: { type: String },\n };\n declare steps: FlowStep[];\n /** The headings' size: `md` 18px for a flow of pages, `lg` 32px for how a tool works. */\n declare size: 'md' | 'lg';\n /** Draw white boxes as tiles raised off an ink band. */\n declare onInk: boolean;\n declare headingLevel: number;\n /** A name for the list, for a screen reader. Leave empty for none. */\n declare label: string;\n\n constructor() {\n super();\n this.steps = [];\n this.size = 'md';\n this.onInk = false;\n this.headingLevel = 3;\n this.label = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; container-type: inline-size; }\n ol { margin: 0; padding: 0; list-style: none; display: flex; align-items: stretch; }\n li { flex: 1 1 0; min-inline-size: 0; display: flex; align-items: stretch; }\n li:not(:first-child) { flex-basis: 56px; }\n .arrow { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; inline-size: 56px; color: ${t.text}; }\n :host([on-ink]) .arrow { color: ${bandOn}; }\n .arrow svg { display: block; }\n .via { font-size: 0.75rem; line-height: 1.2; color: ${t.textMuted}; }\n :host([on-ink]) .via { color: ${bandMuted}; }\n .box { flex: 1 1 auto; min-inline-size: 0; box-sizing: border-box; padding: ${space(4)} ${space(5)}; border: 1px solid ${t.text}; background: ${t.surfaceCard}; color: ${t.text}; }\n :host([size='lg']) .box { padding: ${space(6)}; }\n .box.soft { background: ${t.surfaceSubtle}; }\n :host([on-ink]) .box.card, :host([on-ink]) .box.soft { background: ${bandRaised}; border-color: ${bandLine}; color: ${bandOn}; }\n .box.ink { background: ${ink}; border-color: ${inkLine}; color: ${paper}; }\n .box.accent { background: ${accent}; border-color: ${accent}; color: ${accentOn}; }\n .label { margin: 0 0 ${space(2)}; ${monoLabel}; color: ${t.textMuted}; }\n .text { margin: ${space(2)} 0 0; font-size: 0.875rem; line-height: 1.5; color: ${t.textMuted}; }\n :host([on-ink]) :is(.card, .soft) :is(.label, .text) { color: ${bandMuted}; }\n .ink :is(.label, .text) { color: ${inkMuted}; }\n .accent :is(.label, .text) { color: ${accentOn}; }\n .heading { margin: 0; font-family: ${t.fontHeading}; font-size: 1.125rem; font-weight: ${fontWeight('medium')}; line-height: 1.25; letter-spacing: -0.01em; }\n :host([size='lg']) .heading { font-size: clamp(1.5rem, 1rem + 2cqi, 2rem); font-weight: ${fontWeight('semibold')}; line-height: 1.1; letter-spacing: -0.03em; }\n @container (max-width: 47.99rem) {\n ol, li { flex-direction: column; }\n .arrow { inline-size: auto; block-size: 48px; flex-direction: row; }\n .arrow svg { transform: rotate(90deg); }\n }\n @media (forced-colors: active) { .box { border-color: CanvasText; } .accent { border-width: 3px; } }\n `,\n ];\n\n render(): TemplateResult {\n if (!this.steps?.length) return html``;\n const level = levelOf(this.headingLevel);\n return html`<ol part=\"list\" role=\"list\" aria-label=${this.label || nothing}>\n ${this.steps.map(\n (step, i) => html`<li part=\"step\">\n ${\n i > 0\n ? html`<span class=\"arrow\" part=\"arrow\">\n <svg viewBox=\"0 0 36 12\" width=\"36\" height=\"12\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.25\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M0 6h34M29 1l5 5-5 5\" /></svg>\n ${step.connector ? html`<span class=\"via\">${step.connector}</span>` : nothing}\n </span>`\n : nothing\n }\n <div class=\"box ${step.tone ?? 'card'}\" part=\"box\">\n ${step.label ? html`<p class=\"label\">${step.label}</p>` : nothing}\n <div class=\"heading\" role=\"heading\" aria-level=${level}>${step.heading}</div>\n ${step.text ? html`<p class=\"text\">${step.text}</p>` : nothing}\n </div>\n </li>`,\n )}\n </ol>`;\n }\n}\n\ncustomElements.define('impakt-flow', ImpaktFlow);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-flow': ImpaktFlow;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAIA,SAAS,KAAK,MAAM,eAAoC;AACxD,SAAS,eAAe,YAAY,OAAO,SAAS;AAoC7C,IAAM,aAAN,cAAyB,cAAc;AAAA,EAC5C;AAAA,SAAO,aAAa;AAAA,MAClB,OAAO,EAAE,MAAM,MAAM;AAAA,MACrB,MAAM,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,MACpC,OAAO,EAAE,MAAM,SAAS,SAAS,MAAM,WAAW,SAAS;AAAA,MAC3D,cAAc,EAAE,MAAM,QAAQ,WAAW,gBAAgB;AAAA,MACzD,OAAO,EAAE,MAAM,OAAO;AAAA,IACxB;AAAA;AAAA,EAUA,cAAc;AACZ,UAAM;AACN,SAAK,QAAQ,CAAC;AACd,SAAK,OAAO;AACZ,SAAK,QAAQ;AACb,SAAK,eAAe;AACpB,SAAK,QAAQ;AAAA,EACf;AAAA,EAEA;AAAA,SAAO,SAAS;AAAA,MACd,GAAG,cAAc;AAAA,MACjB;AAAA;AAAA;AAAA;AAAA;AAAA,sJAKkJ,EAAE,IAAI;AAAA,wCACpH,MAAM;AAAA;AAAA,4DAEc,EAAE,SAAS;AAAA,sCACjC,SAAS;AAAA,oFACqC,MAAM,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,uBAAuB,EAAE,IAAI,iBAAiB,EAAE,WAAW,YAAY,EAAE,IAAI;AAAA,2CAC1I,MAAM,CAAC,CAAC;AAAA,gCACnB,EAAE,aAAa;AAAA,2EAC4B,UAAU,mBAAmB,QAAQ,YAAY,MAAM;AAAA,+BACnG,GAAG,mBAAmB,OAAO,YAAY,KAAK;AAAA,kCAC3C,MAAM,mBAAmB,MAAM,YAAY,QAAQ;AAAA,6BACxD,MAAM,CAAC,CAAC,KAAK,SAAS,YAAY,EAAE,SAAS;AAAA,wBAClD,MAAM,CAAC,CAAC,uDAAuD,EAAE,SAAS;AAAA,
|
|
1
|
+
{"version":3,"sources":["../src/components/g2-tools.ts"],"sourcesContent":["/**\n * The G2 Noire blocks for the AI tools pages: the flow that shows how a tool\n * works, or how a visitor gets from one page to the next.\n */\nimport { css, html, nothing, type TemplateResult } from 'lit';\nimport { ImpaktElement, fontWeight, space, t } from '@atomic-ui/ui';\nimport { accent, accentOn, bandLine, bandMuted, bandOn, bandRaised, ink, inkLine, inkMuted, levelOf, monoLabel, paper } from './g2-shared';\n\n/** One step of a flow. */\nexport interface FlowStep {\n /** A mono label, such as \"01 · Model\". */\n label?: string;\n /** What happens, such as \"Reads and drafts\". */\n heading: string;\n /** A line about it. */\n text?: string;\n /** The box: white with an ink border, soft, ink, or the accent. */\n tone?: 'card' | 'soft' | 'ink' | 'accent';\n /** Words on the arrow that leads to this step, such as \"back\". */\n connector?: string;\n}\n\n/**\n * Steps in a row joined by arrows: how a tool works (\"Reads and drafts\",\n * \"Checks every answer\", \"Makes the call\"), or the pages a visitor passes\n * through. Each box has a tone, a mono label, a heading and a line; an arrow\n * can carry words such as \"back\".\n *\n * **An ordered list.** A screen reader meets the steps in order, each heading\n * at the level the page asks for; the arrows are decoration, and words on an\n * arrow are read before the step they lead to (1.3.1). In a narrow column,\n * measured against its own width, the steps stack and the arrows point down\n * (1.4.10).\n *\n * On an ink band, set `on-ink`: white boxes become tiles raised off the band.\n * The ink and accent boxes keep their colours in both themes, so their words\n * keep their contrast (1.4.3).\n *\n * @category content\n * @icon flow\n */\nexport class ImpaktFlow extends ImpaktElement {\n static properties = {\n steps: { type: Array },\n size: { type: String, reflect: true },\n onInk: { type: Boolean, reflect: true, attribute: 'on-ink' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n label: { type: String },\n };\n declare steps: FlowStep[];\n /** The headings' size: `md` 18px for a flow of pages, `lg` 32px for how a tool works. */\n declare size: 'md' | 'lg';\n /** Draw white boxes as tiles raised off an ink band. */\n declare onInk: boolean;\n declare headingLevel: number;\n /** A name for the list, for a screen reader. Leave empty for none. */\n declare label: string;\n\n constructor() {\n super();\n this.steps = [];\n this.size = 'md';\n this.onInk = false;\n this.headingLevel = 3;\n this.label = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; container-type: inline-size; }\n ol { margin: 0; padding: 0; list-style: none; display: flex; align-items: stretch; }\n li { flex: 1 1 0; min-inline-size: 0; display: flex; align-items: stretch; }\n li:not(:first-child) { flex-basis: 56px; }\n .arrow { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; inline-size: 56px; color: ${t.text}; }\n :host([on-ink]) .arrow { color: ${bandOn}; }\n .arrow svg { display: block; }\n .via { font-size: 0.75rem; line-height: 1.2; color: ${t.textMuted}; }\n :host([on-ink]) .via { color: ${bandMuted}; }\n .box { flex: 1 1 auto; min-inline-size: 0; box-sizing: border-box; padding: ${space(4)} ${space(5)}; border: 1px solid ${t.text}; background: ${t.surfaceCard}; color: ${t.text}; }\n :host([size='lg']) .box { padding: ${space(6)}; }\n .box.soft { background: ${t.surfaceSubtle}; }\n :host([on-ink]) .box.card, :host([on-ink]) .box.soft { background: ${bandRaised}; border-color: ${bandLine}; color: ${bandOn}; }\n .box.ink { background: ${ink}; border-color: ${inkLine}; color: ${paper}; }\n .box.accent { background: ${accent}; border-color: ${accent}; color: ${accentOn}; }\n .label { margin: 0 0 ${space(2)}; ${monoLabel}; color: ${t.textMuted}; }\n .text { margin: ${space(2)} 0 0; font-size: 0.875rem; line-height: 1.5; color: ${t.textMuted}; }\n /* On the soft fill the muted words are drawn a step toward the ink, so they read at 4.5:1 for a brand whose soft fill is its own tint. */\n .soft :is(.label, .text) { color: color-mix(in srgb, ${t.textMuted} 80%, ${t.text}); }\n :host([on-ink]) :is(.card, .soft) :is(.label, .text) { color: ${bandMuted}; }\n .ink :is(.label, .text) { color: ${inkMuted}; }\n .accent :is(.label, .text) { color: ${accentOn}; }\n .heading { margin: 0; font-family: ${t.fontHeading}; font-size: 1.125rem; font-weight: ${fontWeight('medium')}; line-height: 1.25; letter-spacing: -0.01em; }\n :host([size='lg']) .heading { font-size: clamp(1.5rem, 1rem + 2cqi, 2rem); font-weight: ${fontWeight('semibold')}; line-height: 1.1; letter-spacing: -0.03em; }\n @container (max-width: 47.99rem) {\n ol, li { flex-direction: column; }\n .arrow { inline-size: auto; block-size: 48px; flex-direction: row; }\n .arrow svg { transform: rotate(90deg); }\n }\n @media (forced-colors: active) { .box { border-color: CanvasText; } .accent { border-width: 3px; } }\n `,\n ];\n\n render(): TemplateResult {\n if (!this.steps?.length) return html``;\n const level = levelOf(this.headingLevel);\n return html`<ol part=\"list\" role=\"list\" aria-label=${this.label || nothing}>\n ${this.steps.map(\n (step, i) => html`<li part=\"step\">\n ${\n i > 0\n ? html`<span class=\"arrow\" part=\"arrow\">\n <svg viewBox=\"0 0 36 12\" width=\"36\" height=\"12\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.25\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M0 6h34M29 1l5 5-5 5\" /></svg>\n ${step.connector ? html`<span class=\"via\">${step.connector}</span>` : nothing}\n </span>`\n : nothing\n }\n <div class=\"box ${step.tone ?? 'card'}\" part=\"box\">\n ${step.label ? html`<p class=\"label\">${step.label}</p>` : nothing}\n <div class=\"heading\" role=\"heading\" aria-level=${level}>${step.heading}</div>\n ${step.text ? html`<p class=\"text\">${step.text}</p>` : nothing}\n </div>\n </li>`,\n )}\n </ol>`;\n }\n}\n\ncustomElements.define('impakt-flow', ImpaktFlow);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-flow': ImpaktFlow;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAIA,SAAS,KAAK,MAAM,eAAoC;AACxD,SAAS,eAAe,YAAY,OAAO,SAAS;AAoC7C,IAAM,aAAN,cAAyB,cAAc;AAAA,EAC5C;AAAA,SAAO,aAAa;AAAA,MAClB,OAAO,EAAE,MAAM,MAAM;AAAA,MACrB,MAAM,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,MACpC,OAAO,EAAE,MAAM,SAAS,SAAS,MAAM,WAAW,SAAS;AAAA,MAC3D,cAAc,EAAE,MAAM,QAAQ,WAAW,gBAAgB;AAAA,MACzD,OAAO,EAAE,MAAM,OAAO;AAAA,IACxB;AAAA;AAAA,EAUA,cAAc;AACZ,UAAM;AACN,SAAK,QAAQ,CAAC;AACd,SAAK,OAAO;AACZ,SAAK,QAAQ;AACb,SAAK,eAAe;AACpB,SAAK,QAAQ;AAAA,EACf;AAAA,EAEA;AAAA,SAAO,SAAS;AAAA,MACd,GAAG,cAAc;AAAA,MACjB;AAAA;AAAA;AAAA;AA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