actual-css 0.11.0 → 0.12.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/CHANGELOG.md +73 -0
- package/README.md +29 -5
- package/components.json +15 -17
- package/dist/actual.full.css +403 -227
- package/dist/actual.full.min.css +1 -1
- package/docs/brand/favicon.svg +5 -0
- package/docs/brand/lockup.svg +12 -0
- package/docs/brand/logo-dark.svg +9 -0
- package/docs/brand/logo-light.svg +9 -0
- package/docs/brand/logo.svg +11 -0
- package/docs/brand/mark.svg +11 -0
- package/docs/navigation.json +4 -2
- package/docs/pages/components/alert.md +2 -10
- package/docs/pages/components/badge.md +3 -9
- package/docs/pages/components/bleed.md +5 -4
- package/docs/pages/components/card.md +31 -2
- package/docs/pages/components/close.md +9 -3
- package/docs/pages/components/dialog.md +248 -31
- package/docs/pages/components/drawer.md +2 -2
- package/docs/pages/components/meter.md +2 -0
- package/docs/pages/components/navbar.md +8 -9
- package/docs/pages/components/table.md +3 -3
- package/docs/pages/enhancements/flyout.md +2 -2
- package/docs/pages/enhancements/scrollspy.md +1 -1
- package/docs/pages/enhancements/status-bar.md +2 -2
- package/docs/pages/examples/overview.md +3 -1
- package/docs/pages/forms/date-picker.md +90 -0
- package/docs/pages/forms/detached-actions.md +37 -30
- package/docs/pages/forms/form-actions.md +61 -28
- package/docs/pages/forms/input-policy.md +1 -1
- package/docs/pages/forms/overview.md +6 -5
- package/docs/pages/forms/sticky-actions.md +85 -83
- package/docs/pages/forms/validation.md +5 -5
- package/docs/pages/foundations/philosophy.md +5 -3
- package/docs/pages/foundations/theming.md +15 -4
- package/docs/pages/foundations/tokens.md +50 -33
- package/docs/pages/foundations/typography.md +4 -7
- package/docs/pages/guides/bootstrap.md +2 -2
- package/docs/pages/guides/design-tools.md +36 -0
- package/docs/pages/guides/integrating-actual-css.md +5 -1
- package/docs/pages/guides/introduction.md +3 -4
- package/docs/pages/guides/modular-import.md +3 -0
- package/docs/pages/guides/progressive-enhancement.md +2 -2
- package/docs/pages/guides/tailwind.md +70 -0
- package/docs/pages/guides/upgrading.md +74 -0
- package/docs/pages/layout/cluster.md +28 -2
- package/docs/pages/layout/overview.md +1 -1
- package/docs/pages/layout/stack.md +21 -16
- package/docs/pages/layout/topbar.md +1 -1
- package/docs/pages/patterns/navigation-list.md +16 -46
- package/docs/pages/patterns/overview.md +3 -4
- package/docs/pages/utilities/flex.md +30 -20
- package/docs/pages/utilities/sizing-wrapping.md +1 -1
- package/docs/pages/utilities/spacing.md +4 -3
- package/package.json +3 -2
- package/reserved-classes.json +3 -3
- package/skills/actual-css/references/enhancements.md +38 -0
- package/src/cli/actual-css.js +75 -6
- package/src/css/components/avatar.css +16 -9
- package/src/css/components/badge.css +1 -5
- package/src/css/components/bleed.css +5 -5
- package/src/css/components/button.css +17 -10
- package/src/css/components/card.css +18 -10
- package/src/css/components/chat.css +4 -5
- package/src/css/components/close.css +17 -6
- package/src/css/components/drawer.css +19 -3
- package/src/css/components/flyout.css +3 -0
- package/src/css/components/index.css +0 -1
- package/src/css/components/meter.css +5 -2
- package/src/css/components/modal.css +157 -69
- package/src/css/components/navbar.css +14 -25
- package/src/css/core/base.css +1 -1
- package/src/css/core/reset.css +2 -1
- package/src/css/core/theme.css +4 -0
- package/src/css/core/tokens.css +28 -10
- package/src/css/core/variants.css +41 -14
- package/src/css/forms/form-actions.css +15 -10
- package/src/css/forms/native.css +5 -1
- package/src/css/layout/cluster.css +11 -0
- package/src/css/layout/topbar.css +12 -6
- package/src/css/utilities/base.css +5 -0
- package/src/css/utilities/extra.css +3 -7
- package/src/tooling/color.js +65 -0
- package/src/tooling/design-components.js +286 -0
- package/src/tooling/design-export.js +69 -0
- package/src/tooling/design-tokens.js +474 -0
- package/src/tooling/penpot-plugin/manifest.json +7 -0
- package/src/tooling/penpot-plugin/plugin.js +272 -0
- package/src/tooling/penpot-plugin/ui.html +58 -0
- package/src/tooling/theme-contrast.js +209 -0
- package/docs/pages/patterns/actions.md +0 -52
- package/src/css/components/actions.css +0 -27
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32"><title>Actual</title>
|
|
2
|
+
<rect width="32" height="32" rx="7" fill="#52396F"/>
|
|
3
|
+
<path fill="#F4EFFA" fill-rule="evenodd" d="M10.0,26.5 L27.6,26.5 L18.8,7.5ZM22.7,23.4 L14.9,23.4 L18.8,14.9Z"/>
|
|
4
|
+
<path fill="#C4A8E8" d="M4.4,26.5 L7.6,26.5 L15.7,9.0 L14.1,5.5Z"/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-226 -82 7688 1067" width="1922" height="267" role="img" aria-label="Actual·css"><title>Actual·css</title>
|
|
2
|
+
<!-- Docs adaptation: fills follow the site theme via --text/--primary, with the
|
|
3
|
+
brand hex as fallback for standalone rendering. The OS-scheme override
|
|
4
|
+
is dropped on purpose: the docs theme picker owns the scheme. -->
|
|
5
|
+
<style>
|
|
6
|
+
.t { fill: var(--text, #52396F); }
|
|
7
|
+
.d { fill: var(--primary, #9B7BCB); }
|
|
8
|
+
</style>
|
|
9
|
+
<path class="t" d="M698 800H42L370 89ZM100 763H640L370 177ZM1117 778Q1185 778 1240 751Q1295 724 1326.5 676Q1358 628 1359 568H1395Q1395 637 1358.5 693.5Q1322 750 1258.5 782.5Q1195 815 1117 815Q1041 815 976 777Q911 739 873 674.5Q835 610 835 534V370Q835 294 872.5 229.5Q910 165 974.5 127Q1039 89 1115 89Q1192 89 1255.5 121.5Q1319 154 1356 210.5Q1393 267 1393 336H1357Q1356 276 1324 228Q1292 180 1237.5 153Q1183 126 1115 126Q1049 126 993 159Q937 192 904 248Q871 304 871 370V534Q871 600 904.5 656Q938 712 994.5 745Q1051 778 1117 778ZM2131 104V141H1868V800H1832V141H1569V104ZM2309 104H2346V534Q2346 600 2379 656Q2412 712 2468 745Q2524 778 2590 778Q2656 778 2712 745Q2768 712 2801 656Q2834 600 2834 534V104H2871V534Q2871 610 2833 674.5Q2795 739 2730.5 777Q2666 815 2590 815Q2514 815 2449.5 777Q2385 739 2347 674.5Q2309 610 2309 534ZM3311 104H3350L3636 800H3596L3502 570H3159L3064 800H3025ZM3174 534H3487L3330 152ZM3855 800V104H3892V763H4377V800ZM5557 778Q5625 778 5680 751Q5735 724 5766.5 676Q5798 628 5799 568H5835Q5835 637 5798.5 693.5Q5762 750 5698.5 782.5Q5635 815 5557 815Q5481 815 5416 777Q5351 739 5313 674.5Q5275 610 5275 534V370Q5275 294 5312.5 229.5Q5350 165 5414.5 127Q5479 89 5555 89Q5632 89 5695.5 121.5Q5759 154 5796 210.5Q5833 267 5833 336H5797Q5796 276 5764 228Q5732 180 5677.5 153Q5623 126 5555 126Q5489 126 5433 159Q5377 192 5344 248Q5311 304 5311 370V534Q5311 600 5344.5 656Q5378 712 5434.5 745Q5491 778 5557 778ZM6052 282Q6052 224 6082.5 180Q6113 136 6168.5 112Q6224 88 6297 88Q6367 88 6425.5 117.5Q6484 147 6518 200Q6552 253 6552 321H6515Q6515 262 6486 217Q6457 172 6407 147.5Q6357 123 6296 123Q6242 123 6195 140Q6148 157 6118.5 192Q6089 227 6089 280Q6089 328 6117 356.5Q6145 385 6190 400Q6235 415 6316 432Q6398 449 6443.5 464.5Q6489 480 6520.5 516Q6552 552 6552 617Q6552 682 6517.5 726.5Q6483 771 6426 793Q6369 815 6302 815Q6219 815 6156 784Q6093 753 6059.5 696.5Q6026 640 6026 567H6063Q6063 631 6091.5 679Q6120 727 6174 753.5Q6228 780 6302 780Q6394 780 6454.5 736Q6515 692 6515 616Q6515 564 6489 536Q6463 508 6423.5 495.5Q6384 483 6305 467Q6220 450 6166.5 429.5Q6113 409 6082.5 373.5Q6052 338 6052 282ZM6792 282Q6792 224 6822.5 180Q6853 136 6908.5 112Q6964 88 7037 88Q7107 88 7165.5 117.5Q7224 147 7258 200Q7292 253 7292 321H7255Q7255 262 7226 217Q7197 172 7147 147.5Q7097 123 7036 123Q6982 123 6935 140Q6888 157 6858.5 192Q6829 227 6829 280Q6829 328 6857 356.5Q6885 385 6930 400Q6975 415 7056 432Q7138 449 7183.5 464.5Q7229 480 7260.5 516Q7292 552 7292 617Q7292 682 7257.5 726.5Q7223 771 7166 793Q7109 815 7042 815Q6959 815 6896 784Q6833 753 6799.5 696.5Q6766 640 6766 567H6803Q6803 631 6831.5 679Q6860 727 6914 753.5Q6968 780 7042 780Q7134 780 7194.5 736Q7255 692 7255 616Q7255 564 7229 536Q7203 508 7163.5 495.5Q7124 483 7045 467Q6960 450 6906.5 429.5Q6853 409 6822.5 373.5Q6792 338 6792 282Z"/>
|
|
10
|
+
<path class="d" d="M-56.0,800.0 L-15.3,800.0 L288.9,140.7 L268.5,96.5Z"/>
|
|
11
|
+
<path class="d" d="M4810 367Q4848 367 4874.5 393.5Q4901 420 4901 457Q4901 494 4874.5 521Q4848 548 4810 548Q4773 548 4746 521Q4719 494 4719 457Q4719 420 4745.5 393.5Q4772 367 4810 367Z"/>
|
|
12
|
+
</svg>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-128 -82 7590 1067" width="1898" height="267" role="img" aria-label="Actual·css"><title>Actual·css</title>
|
|
2
|
+
<style>
|
|
3
|
+
.t { fill: #F4EFFA; }
|
|
4
|
+
.d { fill: #B292DB; }
|
|
5
|
+
@media (prefers-color-scheme: dark) { .t { fill: #F4EFFA; } .d { fill: #B292DB; } }
|
|
6
|
+
</style>
|
|
7
|
+
<path class="t" d="M698 800H42L370 89ZM100 763H640L370 177ZM1117 778Q1185 778 1240 751Q1295 724 1326.5 676Q1358 628 1359 568H1395Q1395 637 1358.5 693.5Q1322 750 1258.5 782.5Q1195 815 1117 815Q1041 815 976 777Q911 739 873 674.5Q835 610 835 534V370Q835 294 872.5 229.5Q910 165 974.5 127Q1039 89 1115 89Q1192 89 1255.5 121.5Q1319 154 1356 210.5Q1393 267 1393 336H1357Q1356 276 1324 228Q1292 180 1237.5 153Q1183 126 1115 126Q1049 126 993 159Q937 192 904 248Q871 304 871 370V534Q871 600 904.5 656Q938 712 994.5 745Q1051 778 1117 778ZM2131 104V141H1868V800H1832V141H1569V104ZM2309 104H2346V534Q2346 600 2379 656Q2412 712 2468 745Q2524 778 2590 778Q2656 778 2712 745Q2768 712 2801 656Q2834 600 2834 534V104H2871V534Q2871 610 2833 674.5Q2795 739 2730.5 777Q2666 815 2590 815Q2514 815 2449.5 777Q2385 739 2347 674.5Q2309 610 2309 534ZM3311 104H3350L3636 800H3596L3502 570H3159L3064 800H3025ZM3174 534H3487L3330 152ZM3855 800V104H3892V763H4377V800ZM5557 778Q5625 778 5680 751Q5735 724 5766.5 676Q5798 628 5799 568H5835Q5835 637 5798.5 693.5Q5762 750 5698.5 782.5Q5635 815 5557 815Q5481 815 5416 777Q5351 739 5313 674.5Q5275 610 5275 534V370Q5275 294 5312.5 229.5Q5350 165 5414.5 127Q5479 89 5555 89Q5632 89 5695.5 121.5Q5759 154 5796 210.5Q5833 267 5833 336H5797Q5796 276 5764 228Q5732 180 5677.5 153Q5623 126 5555 126Q5489 126 5433 159Q5377 192 5344 248Q5311 304 5311 370V534Q5311 600 5344.5 656Q5378 712 5434.5 745Q5491 778 5557 778ZM6052 282Q6052 224 6082.5 180Q6113 136 6168.5 112Q6224 88 6297 88Q6367 88 6425.5 117.5Q6484 147 6518 200Q6552 253 6552 321H6515Q6515 262 6486 217Q6457 172 6407 147.5Q6357 123 6296 123Q6242 123 6195 140Q6148 157 6118.5 192Q6089 227 6089 280Q6089 328 6117 356.5Q6145 385 6190 400Q6235 415 6316 432Q6398 449 6443.5 464.5Q6489 480 6520.5 516Q6552 552 6552 617Q6552 682 6517.5 726.5Q6483 771 6426 793Q6369 815 6302 815Q6219 815 6156 784Q6093 753 6059.5 696.5Q6026 640 6026 567H6063Q6063 631 6091.5 679Q6120 727 6174 753.5Q6228 780 6302 780Q6394 780 6454.5 736Q6515 692 6515 616Q6515 564 6489 536Q6463 508 6423.5 495.5Q6384 483 6305 467Q6220 450 6166.5 429.5Q6113 409 6082.5 373.5Q6052 338 6052 282ZM6792 282Q6792 224 6822.5 180Q6853 136 6908.5 112Q6964 88 7037 88Q7107 88 7165.5 117.5Q7224 147 7258 200Q7292 253 7292 321H7255Q7255 262 7226 217Q7197 172 7147 147.5Q7097 123 7036 123Q6982 123 6935 140Q6888 157 6858.5 192Q6829 227 6829 280Q6829 328 6857 356.5Q6885 385 6930 400Q6975 415 7056 432Q7138 449 7183.5 464.5Q7229 480 7260.5 516Q7292 552 7292 617Q7292 682 7257.5 726.5Q7223 771 7166 793Q7109 815 7042 815Q6959 815 6896 784Q6833 753 6799.5 696.5Q6766 640 6766 567H6803Q6803 631 6831.5 679Q6860 727 6914 753.5Q6968 780 7042 780Q7134 780 7194.5 736Q7255 692 7255 616Q7255 564 7229 536Q7203 508 7163.5 495.5Q7124 483 7045 467Q6960 450 6906.5 429.5Q6853 409 6822.5 373.5Q6792 338 6792 282Z"/>
|
|
8
|
+
<path class="d" d="M4810 367Q4848 367 4874.5 393.5Q4901 420 4901 457Q4901 494 4874.5 521Q4848 548 4810 548Q4773 548 4746 521Q4719 494 4719 457Q4719 420 4745.5 393.5Q4772 367 4810 367Z"/>
|
|
9
|
+
</svg>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-128 -82 7590 1067" width="1898" height="267" role="img" aria-label="Actual·css"><title>Actual·css</title>
|
|
2
|
+
<style>
|
|
3
|
+
.t { fill: #52396F; }
|
|
4
|
+
.d { fill: #9B7BCB; }
|
|
5
|
+
@media (prefers-color-scheme: dark) { .t { fill: #52396F; } .d { fill: #9B7BCB; } }
|
|
6
|
+
</style>
|
|
7
|
+
<path class="t" d="M698 800H42L370 89ZM100 763H640L370 177ZM1117 778Q1185 778 1240 751Q1295 724 1326.5 676Q1358 628 1359 568H1395Q1395 637 1358.5 693.5Q1322 750 1258.5 782.5Q1195 815 1117 815Q1041 815 976 777Q911 739 873 674.5Q835 610 835 534V370Q835 294 872.5 229.5Q910 165 974.5 127Q1039 89 1115 89Q1192 89 1255.5 121.5Q1319 154 1356 210.5Q1393 267 1393 336H1357Q1356 276 1324 228Q1292 180 1237.5 153Q1183 126 1115 126Q1049 126 993 159Q937 192 904 248Q871 304 871 370V534Q871 600 904.5 656Q938 712 994.5 745Q1051 778 1117 778ZM2131 104V141H1868V800H1832V141H1569V104ZM2309 104H2346V534Q2346 600 2379 656Q2412 712 2468 745Q2524 778 2590 778Q2656 778 2712 745Q2768 712 2801 656Q2834 600 2834 534V104H2871V534Q2871 610 2833 674.5Q2795 739 2730.5 777Q2666 815 2590 815Q2514 815 2449.5 777Q2385 739 2347 674.5Q2309 610 2309 534ZM3311 104H3350L3636 800H3596L3502 570H3159L3064 800H3025ZM3174 534H3487L3330 152ZM3855 800V104H3892V763H4377V800ZM5557 778Q5625 778 5680 751Q5735 724 5766.5 676Q5798 628 5799 568H5835Q5835 637 5798.5 693.5Q5762 750 5698.5 782.5Q5635 815 5557 815Q5481 815 5416 777Q5351 739 5313 674.5Q5275 610 5275 534V370Q5275 294 5312.5 229.5Q5350 165 5414.5 127Q5479 89 5555 89Q5632 89 5695.5 121.5Q5759 154 5796 210.5Q5833 267 5833 336H5797Q5796 276 5764 228Q5732 180 5677.5 153Q5623 126 5555 126Q5489 126 5433 159Q5377 192 5344 248Q5311 304 5311 370V534Q5311 600 5344.5 656Q5378 712 5434.5 745Q5491 778 5557 778ZM6052 282Q6052 224 6082.5 180Q6113 136 6168.5 112Q6224 88 6297 88Q6367 88 6425.5 117.5Q6484 147 6518 200Q6552 253 6552 321H6515Q6515 262 6486 217Q6457 172 6407 147.5Q6357 123 6296 123Q6242 123 6195 140Q6148 157 6118.5 192Q6089 227 6089 280Q6089 328 6117 356.5Q6145 385 6190 400Q6235 415 6316 432Q6398 449 6443.5 464.5Q6489 480 6520.5 516Q6552 552 6552 617Q6552 682 6517.5 726.5Q6483 771 6426 793Q6369 815 6302 815Q6219 815 6156 784Q6093 753 6059.5 696.5Q6026 640 6026 567H6063Q6063 631 6091.5 679Q6120 727 6174 753.5Q6228 780 6302 780Q6394 780 6454.5 736Q6515 692 6515 616Q6515 564 6489 536Q6463 508 6423.5 495.5Q6384 483 6305 467Q6220 450 6166.5 429.5Q6113 409 6082.5 373.5Q6052 338 6052 282ZM6792 282Q6792 224 6822.5 180Q6853 136 6908.5 112Q6964 88 7037 88Q7107 88 7165.5 117.5Q7224 147 7258 200Q7292 253 7292 321H7255Q7255 262 7226 217Q7197 172 7147 147.5Q7097 123 7036 123Q6982 123 6935 140Q6888 157 6858.5 192Q6829 227 6829 280Q6829 328 6857 356.5Q6885 385 6930 400Q6975 415 7056 432Q7138 449 7183.5 464.5Q7229 480 7260.5 516Q7292 552 7292 617Q7292 682 7257.5 726.5Q7223 771 7166 793Q7109 815 7042 815Q6959 815 6896 784Q6833 753 6799.5 696.5Q6766 640 6766 567H6803Q6803 631 6831.5 679Q6860 727 6914 753.5Q6968 780 7042 780Q7134 780 7194.5 736Q7255 692 7255 616Q7255 564 7229 536Q7203 508 7163.5 495.5Q7124 483 7045 467Q6960 450 6906.5 429.5Q6853 409 6822.5 373.5Q6792 338 6792 282Z"/>
|
|
8
|
+
<path class="d" d="M4810 367Q4848 367 4874.5 393.5Q4901 420 4901 457Q4901 494 4874.5 521Q4848 548 4810 548Q4773 548 4746 521Q4719 494 4719 457Q4719 420 4745.5 393.5Q4772 367 4810 367Z"/>
|
|
9
|
+
</svg>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-128 -82 7590 1067" width="1898" height="267" role="img" aria-label="Actual·css"><title>Actual·css</title>
|
|
2
|
+
<!-- Docs adaptation: fills follow the site theme via --text/--primary, with the
|
|
3
|
+
brand hex as fallback for standalone rendering. The OS-scheme override
|
|
4
|
+
is dropped on purpose: the docs theme picker owns the scheme. -->
|
|
5
|
+
<style>
|
|
6
|
+
.t { fill: var(--text, #52396F); }
|
|
7
|
+
.d { fill: var(--primary, #9B7BCB); }
|
|
8
|
+
</style>
|
|
9
|
+
<path class="t" d="M698 800H42L370 89ZM100 763H640L370 177ZM1117 778Q1185 778 1240 751Q1295 724 1326.5 676Q1358 628 1359 568H1395Q1395 637 1358.5 693.5Q1322 750 1258.5 782.5Q1195 815 1117 815Q1041 815 976 777Q911 739 873 674.5Q835 610 835 534V370Q835 294 872.5 229.5Q910 165 974.5 127Q1039 89 1115 89Q1192 89 1255.5 121.5Q1319 154 1356 210.5Q1393 267 1393 336H1357Q1356 276 1324 228Q1292 180 1237.5 153Q1183 126 1115 126Q1049 126 993 159Q937 192 904 248Q871 304 871 370V534Q871 600 904.5 656Q938 712 994.5 745Q1051 778 1117 778ZM2131 104V141H1868V800H1832V141H1569V104ZM2309 104H2346V534Q2346 600 2379 656Q2412 712 2468 745Q2524 778 2590 778Q2656 778 2712 745Q2768 712 2801 656Q2834 600 2834 534V104H2871V534Q2871 610 2833 674.5Q2795 739 2730.5 777Q2666 815 2590 815Q2514 815 2449.5 777Q2385 739 2347 674.5Q2309 610 2309 534ZM3311 104H3350L3636 800H3596L3502 570H3159L3064 800H3025ZM3174 534H3487L3330 152ZM3855 800V104H3892V763H4377V800ZM5557 778Q5625 778 5680 751Q5735 724 5766.5 676Q5798 628 5799 568H5835Q5835 637 5798.5 693.5Q5762 750 5698.5 782.5Q5635 815 5557 815Q5481 815 5416 777Q5351 739 5313 674.5Q5275 610 5275 534V370Q5275 294 5312.5 229.5Q5350 165 5414.5 127Q5479 89 5555 89Q5632 89 5695.5 121.5Q5759 154 5796 210.5Q5833 267 5833 336H5797Q5796 276 5764 228Q5732 180 5677.5 153Q5623 126 5555 126Q5489 126 5433 159Q5377 192 5344 248Q5311 304 5311 370V534Q5311 600 5344.5 656Q5378 712 5434.5 745Q5491 778 5557 778ZM6052 282Q6052 224 6082.5 180Q6113 136 6168.5 112Q6224 88 6297 88Q6367 88 6425.5 117.5Q6484 147 6518 200Q6552 253 6552 321H6515Q6515 262 6486 217Q6457 172 6407 147.5Q6357 123 6296 123Q6242 123 6195 140Q6148 157 6118.5 192Q6089 227 6089 280Q6089 328 6117 356.5Q6145 385 6190 400Q6235 415 6316 432Q6398 449 6443.5 464.5Q6489 480 6520.5 516Q6552 552 6552 617Q6552 682 6517.5 726.5Q6483 771 6426 793Q6369 815 6302 815Q6219 815 6156 784Q6093 753 6059.5 696.5Q6026 640 6026 567H6063Q6063 631 6091.5 679Q6120 727 6174 753.5Q6228 780 6302 780Q6394 780 6454.5 736Q6515 692 6515 616Q6515 564 6489 536Q6463 508 6423.5 495.5Q6384 483 6305 467Q6220 450 6166.5 429.5Q6113 409 6082.5 373.5Q6052 338 6052 282ZM6792 282Q6792 224 6822.5 180Q6853 136 6908.5 112Q6964 88 7037 88Q7107 88 7165.5 117.5Q7224 147 7258 200Q7292 253 7292 321H7255Q7255 262 7226 217Q7197 172 7147 147.5Q7097 123 7036 123Q6982 123 6935 140Q6888 157 6858.5 192Q6829 227 6829 280Q6829 328 6857 356.5Q6885 385 6930 400Q6975 415 7056 432Q7138 449 7183.5 464.5Q7229 480 7260.5 516Q7292 552 7292 617Q7292 682 7257.5 726.5Q7223 771 7166 793Q7109 815 7042 815Q6959 815 6896 784Q6833 753 6799.5 696.5Q6766 640 6766 567H6803Q6803 631 6831.5 679Q6860 727 6914 753.5Q6968 780 7042 780Q7134 780 7194.5 736Q7255 692 7255 616Q7255 564 7229 536Q7203 508 7163.5 495.5Q7124 483 7045 467Q6960 450 6906.5 429.5Q6853 409 6822.5 373.5Q6792 338 6792 282Z"/>
|
|
10
|
+
<path class="d" d="M4810 367Q4848 367 4874.5 393.5Q4901 420 4901 457Q4901 494 4874.5 521Q4848 548 4810 548Q4773 548 4746 521Q4719 494 4719 457Q4719 420 4745.5 393.5Q4772 367 4810 367Z"/>
|
|
11
|
+
</svg>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="512" height="512"><title>Actual</title>
|
|
2
|
+
<!-- Docs adaptation: fills follow the site theme via --text/--primary, with the
|
|
3
|
+
brand hex as fallback for standalone rendering. The OS-scheme override
|
|
4
|
+
is dropped on purpose: the docs theme picker owns the scheme. -->
|
|
5
|
+
<style>
|
|
6
|
+
.ring { fill: var(--text, #52396F); }
|
|
7
|
+
.bar { fill: var(--primary, #9B7BCB); }
|
|
8
|
+
</style>
|
|
9
|
+
<path class="ring" fill-rule="evenodd" d="M124.7,451.9 L475.4,451.9 L300.1,71.9ZM406.6,407.9 L193.5,407.9 L300.1,177.0Z"/>
|
|
10
|
+
<path class="bar" d="M36.6,451.9 L85.1,451.9 L241.7,112.6 L217.4,60.1Z"/>
|
|
11
|
+
</svg>
|
package/docs/navigation.json
CHANGED
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
"modular-import",
|
|
10
10
|
"progressive-enhancement",
|
|
11
11
|
"bootstrap",
|
|
12
|
-
"tailwind"
|
|
12
|
+
"tailwind",
|
|
13
|
+
"design-tools",
|
|
14
|
+
"upgrading"
|
|
13
15
|
]
|
|
14
16
|
},
|
|
15
17
|
{
|
|
@@ -81,6 +83,7 @@
|
|
|
81
83
|
"overview",
|
|
82
84
|
"controls",
|
|
83
85
|
"combobox",
|
|
86
|
+
"date-picker",
|
|
84
87
|
"rich-text",
|
|
85
88
|
"labels",
|
|
86
89
|
"floating-field",
|
|
@@ -103,7 +106,6 @@
|
|
|
103
106
|
"slug": "patterns",
|
|
104
107
|
"pages": [
|
|
105
108
|
"overview",
|
|
106
|
-
"actions",
|
|
107
109
|
"navigation-list",
|
|
108
110
|
"icon-input",
|
|
109
111
|
"icon-slot",
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
- Supports longer text and lists.
|
|
7
7
|
- Links inherit alert color by default.
|
|
8
8
|
- Alerts are soft by default. Use `.surface` for neutral chrome with the intent only in the ink, `.solid` or `.outline` when the message needs stronger or quieter emphasis.
|
|
9
|
-
- Use `<menu class="
|
|
9
|
+
- Use `<menu class="cluster">` for alert action lists.
|
|
10
10
|
- Use `role="alert"` only when the alert is injected dynamically and should be announced.
|
|
11
11
|
- Not a toast.
|
|
12
12
|
- Could have simple or complex html content.
|
|
@@ -90,7 +90,7 @@ intent treatment when the color itself carries the meaning.
|
|
|
90
90
|
<p>Check your billing details or try another card.</p>
|
|
91
91
|
</div>
|
|
92
92
|
|
|
93
|
-
<menu class="
|
|
93
|
+
<menu class="cluster">
|
|
94
94
|
<li><a class="btn danger sm" href="/billing">Update billing</a></li>
|
|
95
95
|
<li><a href="/support">Contact support</a></li>
|
|
96
96
|
</menu>
|
|
@@ -128,14 +128,6 @@ center.
|
|
|
128
128
|
I'm a surface alert — theme chrome, intent in the ink
|
|
129
129
|
</div>
|
|
130
130
|
|
|
131
|
-
<div class="alert danger compact" role="alert">
|
|
132
|
-
I'm an error in a compact context
|
|
133
|
-
</div>
|
|
134
|
-
|
|
135
|
-
<div class="alert danger spacious" role="alert">
|
|
136
|
-
I'm an error in a spacious context
|
|
137
|
-
</div>
|
|
138
|
-
|
|
139
131
|
<div class="alert danger outline" role="alert">
|
|
140
132
|
I'm an outline error <a href="#">with a link</a>
|
|
141
133
|
</div>
|
|
@@ -126,15 +126,9 @@ Regular
|
|
|
126
126
|
<span class="badge success lg">Large</span>
|
|
127
127
|
```
|
|
128
128
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
```html demo
|
|
134
|
-
<span class="compact"><span class="badge success">Compact</span></span>
|
|
135
|
-
<span><span class="badge success">Default</span></span>
|
|
136
|
-
<span class="spacious"><span class="badge success">Spacious</span></span>
|
|
137
|
-
```
|
|
129
|
+
A badge keeps its size inside a `.compact` or `.spacious` context: its
|
|
130
|
+
geometry is intrinsic to its label. Use `.sm` / `.lg` for a smaller or larger
|
|
131
|
+
badge.
|
|
138
132
|
|
|
139
133
|
## With an icon
|
|
140
134
|
|
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
`.bleed` lets a direct child of a padded surface reach its edges. Use it for a
|
|
4
4
|
full-width image, a colored header or footer, or a notice band.
|
|
5
5
|
|
|
6
|
-
It works inside `.card`, `.drawer`,
|
|
7
|
-
owns the padding, so place `.bleed`
|
|
8
|
-
|
|
9
|
-
`actual-css/css/components/bleed`
|
|
6
|
+
It works inside `.card`, `.drawer`, a modal's direct `<form>` or `.stack`, and
|
|
7
|
+
an accordion panel. The accordion panel owns the padding, so place `.bleed`
|
|
8
|
+
directly inside the panel, after the summary. A deeper descendant stays within
|
|
9
|
+
its wrapper. A modular build imports `actual-css/css/components/bleed`
|
|
10
|
+
alongside the surface component.
|
|
10
11
|
|
|
11
12
|
```html demo
|
|
12
13
|
<article class="card stack" style="--card-max-inline-size: 24rem">
|
|
@@ -39,7 +39,7 @@ gap.
|
|
|
39
39
|
|
|
40
40
|
<p>Using the right HTML tags improves both SEO and accessibility. Lean on landmarks and live lists.</p>
|
|
41
41
|
|
|
42
|
-
<ul class="cluster
|
|
42
|
+
<ul class="cluster tight" aria-label="Tags">
|
|
43
43
|
<li><span class="badge primary soft secondary">HTML</span></li>
|
|
44
44
|
<li><span class="badge soft primary">Accessibility</span></li>
|
|
45
45
|
<li><span class="badge outline">5 min read</span></li>
|
|
@@ -53,6 +53,34 @@ gap.
|
|
|
53
53
|
</div>
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
+
## Slot rows
|
|
57
|
+
|
|
58
|
+
A direct `<header>` or `<footer>` is a wrapping split row by default: title and
|
|
59
|
+
badge, date and action, one left one right. A primitive, role or utility on the
|
|
60
|
+
slot replaces that row — `.media` for an avatar beside a title, `.cluster` for a
|
|
61
|
+
start-aligned group, `cluster form-actions` for a form's action row,
|
|
62
|
+
`.justify-content-end` to push actions right. The footer stays anchored to the
|
|
63
|
+
bottom either way.
|
|
64
|
+
|
|
65
|
+
```html demo
|
|
66
|
+
<div style="max-inline-size: 32rem">
|
|
67
|
+
<article class="card">
|
|
68
|
+
<header class="media">
|
|
69
|
+
<span class="avatar"><abbr>AM</abbr></span>
|
|
70
|
+
<hgroup>
|
|
71
|
+
<h3>Ada Meridian</h3>
|
|
72
|
+
<p class="muted">Design systems</p>
|
|
73
|
+
</hgroup>
|
|
74
|
+
</header>
|
|
75
|
+
<p>Reviews every token change before it ships.</p>
|
|
76
|
+
<footer class="cluster justify-content-end">
|
|
77
|
+
<button type="button" class="btn ghost">Dismiss</button>
|
|
78
|
+
<button type="button" class="btn primary">Follow</button>
|
|
79
|
+
</footer>
|
|
80
|
+
</article>
|
|
81
|
+
</div>
|
|
82
|
+
```
|
|
83
|
+
|
|
56
84
|
## Bleed
|
|
57
85
|
|
|
58
86
|
Use `.bleed` on a direct child to bring an image or band to the card edge. See
|
|
@@ -155,4 +183,5 @@ treatments on either side of it.
|
|
|
155
183
|
- `--card-radius` — corner radius.
|
|
156
184
|
- `--card-max-inline-size` — maximum width.
|
|
157
185
|
- `--card-pad` — inner padding, relayed to direct children for `.bleed`. `.compact` lowers it.
|
|
158
|
-
- `--card-gap` — space between direct children of a bare card. A composed layout primitive owns its own gap instead.
|
|
186
|
+
- `--card-gap` — space between direct children of a bare card. `.compact` lowers it; a parent's `--gap` and an inherited density do not reach it. A composed layout primitive owns its own gap instead.
|
|
187
|
+
- `--items-align` — cross-axis alignment of the slot rows, set by the `.items-*` helpers on the card or the slot.
|
|
@@ -28,7 +28,9 @@
|
|
|
28
28
|
In a `.modal` or a `.drawer`, the close sits out of the content flow at the
|
|
29
29
|
panel's top inline-end corner. Place it as a direct child of the dialog, of its
|
|
30
30
|
top-level `form` or `header`, or of a `form` inside that header; a `.close`
|
|
31
|
-
deeper in the content keeps its own place
|
|
31
|
+
deeper in the content keeps its own place, so wrapping it in a `.cluster` keeps
|
|
32
|
+
it in the header's row. A header that hosts the corner close reserves inline
|
|
33
|
+
room so a title never runs under it. See [Dialog](dialog.md) and
|
|
32
34
|
[Drawer](drawer.md).
|
|
33
35
|
|
|
34
36
|
```html
|
|
@@ -43,6 +45,10 @@ deeper in the content keeps its own place. See [Dialog](dialog.md) and
|
|
|
43
45
|
|
|
44
46
|
- `--close-size` — inline and block size of the button; `--control-size` unless the container sets it.
|
|
45
47
|
- `--close-icon-size` — size of the X.
|
|
48
|
+
- `--close-bg` — background of the dialog corner close; `--surface-subtle` unless the dialog or a painted band sets it, e.g. `transparent` for a bare X.
|
|
49
|
+
- `--close-color` — ink of the X; `--text-muted` at the dialog corner, otherwise inherited from the context.
|
|
50
|
+
- `--close-hover-color` — ink of the dialog corner close on hover; `--text` unless a band sets its own foreground.
|
|
51
|
+
- `--close-hover-overlay` — hover and active wash that tints the fill the context gave the control; the dialog corner sets it `transparent` so a hover changes only the ink.
|
|
46
52
|
|
|
47
|
-
Alerts and badges declare both hooks on themselves, so set them on the
|
|
48
|
-
or on the button.
|
|
53
|
+
Alerts and badges declare both size hooks on themselves, so set them on the
|
|
54
|
+
container or on the button.
|
|
@@ -6,17 +6,72 @@
|
|
|
6
6
|
|
|
7
7
|
## Class reference
|
|
8
8
|
|
|
9
|
-
| Class
|
|
10
|
-
|
|
|
11
|
-
| `.modal`
|
|
12
|
-
| `.scrollable`
|
|
13
|
-
| `.dialog-
|
|
14
|
-
| `.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
9
|
+
| Class | Kind | Description |
|
|
10
|
+
| -------------- | ----------- | ---------------------------------------------- |
|
|
11
|
+
| `.modal` | Component | Centered surface on the native `<dialog>`. |
|
|
12
|
+
| `.scrollable` | Variant | Header and footer stay while the body scrolls. |
|
|
13
|
+
| `.dialog-icon` | Component | Circular intent-aware icon well. |
|
|
14
|
+
| `.close` | Composition | Icon-only close button, at the top end. |
|
|
15
|
+
|
|
16
|
+
## Anatomy
|
|
17
|
+
|
|
18
|
+
`.modal` is the outer surface and deliberately has no inner padding. Wrap its
|
|
19
|
+
content in a direct `<form>` or `.stack`; that wrapper owns the padding, rhythm,
|
|
20
|
+
and overflow. Put `.stack` on the wrapper, never on `dialog.modal` itself.
|
|
21
|
+
|
|
22
|
+
For a header band, place `<header>` directly under `dialog.modal`, before the
|
|
23
|
+
body wrapper. Put a flexible `.media` title region first and a `.cluster` of
|
|
24
|
+
controls second. The title has the close control's minimum height; its leading
|
|
25
|
+
icon and every trailing control share the same center axis. A wrapped title
|
|
26
|
+
simply makes the row taller.
|
|
27
|
+
|
|
28
|
+
A direct `dialog > header` is dialog chrome and forms a distinct header band,
|
|
29
|
+
painted `--surface-subtle`. Change the fill with a surface utility on the header
|
|
30
|
+
(`<header class="background-raised">`). Put an ordinary content heading inside
|
|
31
|
+
the padded `form` or `.stack` instead.
|
|
32
|
+
|
|
33
|
+
Keep a corner [`.close`](close.md) as a direct child of the dialog and put the
|
|
34
|
+
title in the wrapper's direct `<header>`. The button then stays outside the
|
|
35
|
+
content flow while the header reserves enough inline space to keep its title
|
|
36
|
+
clear.
|
|
37
|
+
|
|
38
|
+
A `.close` placed as a direct child of the chrome header is still the corner
|
|
39
|
+
overlay. That header reserves the same inline room for it, never below its own
|
|
40
|
+
`--modal-pad`, so a wrapping title stays clear either way.
|
|
41
|
+
|
|
42
|
+
The corner close overlays the panel edge, so a body tall enough to scroll would
|
|
43
|
+
run its scrollbar under the button. Give such a dialog the `scrollable` anatomy:
|
|
44
|
+
the close then sits over the fixed header and the scrollbar starts below it.
|
|
45
|
+
|
|
46
|
+
Add `.bleed` to that header, or to the wrapper's footer, when it should form a
|
|
47
|
+
full-width band. It reaches the dialog edges and corners, keeps the modal's
|
|
48
|
+
inner padding, and takes a surface utility such as `.background-subtle`.
|
|
49
|
+
|
|
50
|
+
The wrapper's `<footer>` is a structural slot: it stays fixed under
|
|
51
|
+
`.scrollable` but has no layout of its own. Compose the action row in markup —
|
|
52
|
+
`<footer class="cluster justify-content-end">` for trailing actions,
|
|
53
|
+
`.justify-content-space-between` for a split pair.
|
|
54
|
+
|
|
55
|
+
### Where each region lives
|
|
56
|
+
|
|
57
|
+
Two anatomies are legitimate. Pick one; each owns its scroll, footer, and close
|
|
58
|
+
placement.
|
|
59
|
+
|
|
60
|
+
**Wrapper header** — a `<header>` inside the `form`/`.stack` body. The wrapper
|
|
61
|
+
owns padding, rhythm, and overflow. With `.scrollable` the header and footer are
|
|
62
|
+
fixed rows and the content between them scrolls. The `.close` stays a direct
|
|
63
|
+
child of the dialog and the header reserves its inline room.
|
|
64
|
+
|
|
65
|
+
**External header** — a direct `dialog > header`, before the body wrapper. The
|
|
66
|
+
header is dialog chrome outside the scroll container, so it never scrolls. The
|
|
67
|
+
footer stays inside the wrapper and is the trailing fixed row under
|
|
68
|
+
`.scrollable`. Wrap the `.close` in the header's trailing `.cluster` to keep it
|
|
69
|
+
in flow; a `.close` that is a direct child of the header is still the absolute
|
|
70
|
+
corner overlay, and the header reserves its room.
|
|
71
|
+
|
|
72
|
+
The `.scrollable` row template follows the regions the wrapper actually holds,
|
|
73
|
+
so a modal without a header, without a footer, or with an external header all
|
|
74
|
+
keep the footer reachable and the body scrollable.
|
|
20
75
|
|
|
21
76
|
## Usage
|
|
22
77
|
|
|
@@ -69,7 +124,7 @@ runtime, backdrop clicks give a small static feedback instead of closing.
|
|
|
69
124
|
<p>The project, saved reports, and connected automations will be removed permanently.</p>
|
|
70
125
|
</div>
|
|
71
126
|
|
|
72
|
-
<footer>
|
|
127
|
+
<footer class="cluster justify-content-end">
|
|
73
128
|
<button class="btn outline" value="cancel">Cancel</button>
|
|
74
129
|
|
|
75
130
|
<button class="btn danger"
|
|
@@ -81,11 +136,19 @@ runtime, backdrop clicks give a small static feedback instead of closing.
|
|
|
81
136
|
</dialog>
|
|
82
137
|
```
|
|
83
138
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
139
|
+
### Confirmation with an icon and an action band
|
|
140
|
+
|
|
141
|
+
For a compact confirmation with a leading status icon, put a `.dialog-icon` and
|
|
142
|
+
the text column in a `.media` row. The first heading of that column centers on
|
|
143
|
+
the icon; following copy stays in the same column. The icon well accepts the
|
|
144
|
+
shared intent and emphasis classes: `dialog-icon danger soft` is the tinted red
|
|
145
|
+
circle.
|
|
146
|
+
|
|
147
|
+
The action band is the footer composed with existing primitives: `.bleed`
|
|
148
|
+
reaches the panel edges and corners, `.background-subtle` paints it, and
|
|
149
|
+
`.cluster.justify-content-space-between` splits the decision pair. Keep the
|
|
150
|
+
cancel-style action first, so it holds the leading edge and never sits next to
|
|
151
|
+
the committing one.
|
|
89
152
|
|
|
90
153
|
```html demo
|
|
91
154
|
<button class="btn danger"
|
|
@@ -97,7 +160,7 @@ band without changing the semantics of the form or its buttons.
|
|
|
97
160
|
Deactivate account
|
|
98
161
|
</button>
|
|
99
162
|
|
|
100
|
-
<dialog class="modal
|
|
163
|
+
<dialog class="modal"
|
|
101
164
|
id="deactivate-dialog"
|
|
102
165
|
closedby="none"
|
|
103
166
|
style="--modal-size: 40rem">
|
|
@@ -107,13 +170,13 @@ band without changing the semantics of the form or its buttons.
|
|
|
107
170
|
<i class="ti ti-alert-triangle"></i>
|
|
108
171
|
</span>
|
|
109
172
|
|
|
110
|
-
<header>
|
|
173
|
+
<header class="stack">
|
|
111
174
|
<h3>Deactivate account</h3>
|
|
112
175
|
<p class="muted">Are you sure you want to deactivate your account? All of your data will be permanently removed. This action cannot be undone.</p>
|
|
113
176
|
</header>
|
|
114
177
|
</div>
|
|
115
178
|
|
|
116
|
-
<footer>
|
|
179
|
+
<footer class="bleed background-subtle cluster justify-content-space-between">
|
|
117
180
|
<button class="btn outline" value="cancel">Cancel</button>
|
|
118
181
|
<button class="btn danger" value="deactivate">Deactivate</button>
|
|
119
182
|
</footer>
|
|
@@ -121,6 +184,48 @@ band without changing the semantics of the form or its buttons.
|
|
|
121
184
|
</dialog>
|
|
122
185
|
```
|
|
123
186
|
|
|
187
|
+
For a trailing illustration, use a direct `<header>` as the message region and
|
|
188
|
+
compose it as a non-wrapping split cluster. `.grow` keeps the text column
|
|
189
|
+
flexible while `.dialog-icon` stays at the inline end.
|
|
190
|
+
|
|
191
|
+
Use the same anatomy in a `.card` instead when the surface belongs in page
|
|
192
|
+
content and does not need modal focus or a backdrop.
|
|
193
|
+
|
|
194
|
+
```html demo
|
|
195
|
+
<button class="btn"
|
|
196
|
+
type="button"
|
|
197
|
+
commandfor="customize-dialog"
|
|
198
|
+
command="show-modal"
|
|
199
|
+
aria-haspopup="dialog"
|
|
200
|
+
aria-controls="customize-dialog">
|
|
201
|
+
Customize workspace
|
|
202
|
+
</button>
|
|
203
|
+
|
|
204
|
+
<dialog class="modal"
|
|
205
|
+
id="customize-dialog"
|
|
206
|
+
closedby="none"
|
|
207
|
+
aria-labelledby="customize-dialog-title">
|
|
208
|
+
<form method="dialog">
|
|
209
|
+
<header class="cluster"
|
|
210
|
+
style="--cluster-align: start; --cluster-justify: space-between; --cluster-wrap: nowrap">
|
|
211
|
+
<hgroup class="grow">
|
|
212
|
+
<h3 id="customize-dialog-title">Make this workspace your own</h3>
|
|
213
|
+
<p class="muted">Choose colors and defaults now, or continue with the current settings.</p>
|
|
214
|
+
</hgroup>
|
|
215
|
+
|
|
216
|
+
<span class="dialog-icon success soft" aria-hidden="true">
|
|
217
|
+
<i class="ti ti-check"></i>
|
|
218
|
+
</span>
|
|
219
|
+
</header>
|
|
220
|
+
|
|
221
|
+
<footer class="bleed background-subtle cluster justify-content-end">
|
|
222
|
+
<button class="btn ghost" value="later">Later</button>
|
|
223
|
+
<button class="btn primary" value="customize">Customize</button>
|
|
224
|
+
</footer>
|
|
225
|
+
</form>
|
|
226
|
+
</dialog>
|
|
227
|
+
```
|
|
228
|
+
|
|
124
229
|
## Information modal
|
|
125
230
|
|
|
126
231
|
Use this shape for contextual information or lightweight secondary content. It
|
|
@@ -163,6 +268,67 @@ has no action button; the header close button dismisses the dialog.
|
|
|
163
268
|
</dialog>
|
|
164
269
|
```
|
|
165
270
|
|
|
271
|
+
## Action modal
|
|
272
|
+
|
|
273
|
+
Use this shape when contextual information leads to one non-destructive next
|
|
274
|
+
step, such as reviewing a setup before continuing. Unlike an alert dialog, it
|
|
275
|
+
can be dismissed without choosing the action; unlike an information modal, it
|
|
276
|
+
has a primary action in a footer.
|
|
277
|
+
|
|
278
|
+
Use `.dialog-icon` with the media object for a leading title icon. An `.alert`
|
|
279
|
+
belongs in the body only when the dialog contains a distinct status message;
|
|
280
|
+
the dialog title itself is not an alert.
|
|
281
|
+
|
|
282
|
+
```html demo
|
|
283
|
+
<button class="btn primary"
|
|
284
|
+
type="button"
|
|
285
|
+
commandfor="setup-dialog"
|
|
286
|
+
command="show-modal"
|
|
287
|
+
aria-haspopup="dialog"
|
|
288
|
+
aria-controls="setup-dialog">
|
|
289
|
+
Continue setup
|
|
290
|
+
</button>
|
|
291
|
+
|
|
292
|
+
<dialog class="modal"
|
|
293
|
+
id="setup-dialog"
|
|
294
|
+
closedby="any"
|
|
295
|
+
data-dialog-dismissible
|
|
296
|
+
aria-labelledby="setup-dialog-title">
|
|
297
|
+
<header>
|
|
298
|
+
<div class="media items-center grow">
|
|
299
|
+
<span class="dialog-icon warning soft" aria-hidden="true">
|
|
300
|
+
<i class="ti ti-alert-triangle"></i>
|
|
301
|
+
</span>
|
|
302
|
+
|
|
303
|
+
<h2 id="setup-dialog-title">Finish workspace setup</h2>
|
|
304
|
+
</div>
|
|
305
|
+
|
|
306
|
+
<div class="cluster">
|
|
307
|
+
<button class="close"
|
|
308
|
+
type="button"
|
|
309
|
+
commandfor="setup-dialog"
|
|
310
|
+
command="request-close"
|
|
311
|
+
aria-controls="setup-dialog"
|
|
312
|
+
aria-label="Close dialog"></button>
|
|
313
|
+
</div>
|
|
314
|
+
</header>
|
|
315
|
+
|
|
316
|
+
<form method="dialog" class="stack">
|
|
317
|
+
<div class="card stack">
|
|
318
|
+
<p><strong>Acme workspace</strong></p>
|
|
319
|
+
<p>Team plan</p>
|
|
320
|
+
<p>Starts October 1</p>
|
|
321
|
+
</div>
|
|
322
|
+
|
|
323
|
+
<p>Confirm these settings to finish setting up the workspace.</p>
|
|
324
|
+
|
|
325
|
+
<footer class="cluster justify-content-end">
|
|
326
|
+
<button class="btn primary inline-size-full" value="continue">Continue</button>
|
|
327
|
+
</footer>
|
|
328
|
+
</form>
|
|
329
|
+
</dialog>
|
|
330
|
+
```
|
|
331
|
+
|
|
166
332
|
## Scrollable modal
|
|
167
333
|
|
|
168
334
|
Use `modal scrollable` when the header and footer should stay visible while the
|
|
@@ -177,6 +343,9 @@ keyboard-focusable so it can be scrolled without a pointer — it takes a focus
|
|
|
177
343
|
ring like any other focusable element, and it can claim initial focus when
|
|
178
344
|
nothing focusable precedes it. Mark the control you want focused `autofocus`.
|
|
179
345
|
|
|
346
|
+
Each non-header/footer child region is its own scrollport, so wrap the body in a
|
|
347
|
+
single element (`<div class="stack">`) when there should be one scrollbar.
|
|
348
|
+
|
|
180
349
|
```html demo
|
|
181
350
|
<button class="btn"
|
|
182
351
|
type="button"
|
|
@@ -208,7 +377,7 @@ nothing focusable precedes it. Mark the control you want focused `autofocus`.
|
|
|
208
377
|
<p>Section 7. Continued use confirms acceptance of the current terms.</p>
|
|
209
378
|
</div>
|
|
210
379
|
|
|
211
|
-
<footer>
|
|
380
|
+
<footer class="cluster justify-content-end">
|
|
212
381
|
<button class="btn outline" value="cancel">Cancel</button>
|
|
213
382
|
|
|
214
383
|
<button class="btn primary" value="accept">
|
|
@@ -219,6 +388,55 @@ nothing focusable precedes it. Mark the control you want focused `autofocus`.
|
|
|
219
388
|
</dialog>
|
|
220
389
|
```
|
|
221
390
|
|
|
391
|
+
An external header follows the same contract from the other side: the header is
|
|
392
|
+
chrome outside the wrapper, the footer stays in the wrapper, and the content
|
|
393
|
+
between them scrolls.
|
|
394
|
+
|
|
395
|
+
```html demo
|
|
396
|
+
<button class="btn"
|
|
397
|
+
type="button"
|
|
398
|
+
commandfor="external-scroll-dialog"
|
|
399
|
+
command="show-modal"
|
|
400
|
+
aria-haspopup="dialog"
|
|
401
|
+
aria-controls="external-scroll-dialog">
|
|
402
|
+
Open external-header modal
|
|
403
|
+
</button>
|
|
404
|
+
|
|
405
|
+
<dialog class="modal scrollable"
|
|
406
|
+
id="external-scroll-dialog"
|
|
407
|
+
closedby="any"
|
|
408
|
+
aria-labelledby="external-scroll-title">
|
|
409
|
+
<header>
|
|
410
|
+
<h3 id="external-scroll-title">Release notes</h3>
|
|
411
|
+
|
|
412
|
+
<div class="cluster">
|
|
413
|
+
<button class="close"
|
|
414
|
+
type="button"
|
|
415
|
+
commandfor="external-scroll-dialog"
|
|
416
|
+
command="request-close"
|
|
417
|
+
aria-controls="external-scroll-dialog"
|
|
418
|
+
aria-label="Close dialog"></button>
|
|
419
|
+
</div>
|
|
420
|
+
</header>
|
|
421
|
+
|
|
422
|
+
<form method="dialog" class="stack">
|
|
423
|
+
<div class="stack">
|
|
424
|
+
<p>Section 1. The service stores project settings, interface preferences, and theme choices.</p>
|
|
425
|
+
<p>Section 2. Administrators can invite users and review access periodically.</p>
|
|
426
|
+
<p>Section 3. Billing changes may affect future invoices.</p>
|
|
427
|
+
<p>Section 4. Export tools are provided for common formats.</p>
|
|
428
|
+
<p>Section 5. Support requests should include browser and account context.</p>
|
|
429
|
+
<p>Section 6. Continued use confirms acceptance of the current terms.</p>
|
|
430
|
+
</div>
|
|
431
|
+
|
|
432
|
+
<footer class="cluster justify-content-end">
|
|
433
|
+
<button class="btn outline" value="cancel">Cancel</button>
|
|
434
|
+
<button class="btn primary" value="accept">Accept</button>
|
|
435
|
+
</footer>
|
|
436
|
+
</form>
|
|
437
|
+
</dialog>
|
|
438
|
+
```
|
|
439
|
+
|
|
222
440
|
## Overlays inside modals
|
|
223
441
|
|
|
224
442
|
Flyouts and tooltips opened from inside a modal dialog stay exactly where they
|
|
@@ -357,7 +575,7 @@ transition.
|
|
|
357
575
|
<p>This dialog morphs to and from the trigger button.</p>
|
|
358
576
|
</header>
|
|
359
577
|
|
|
360
|
-
<footer>
|
|
578
|
+
<footer class="cluster justify-content-end">
|
|
361
579
|
<button class="btn outline" value="cancel">Cancel</button>
|
|
362
580
|
<button class="btn primary" value="confirm">Confirm</button>
|
|
363
581
|
</footer>
|
|
@@ -371,20 +589,19 @@ Prefer native dialog behavior whenever possible. The framework runtime should
|
|
|
371
589
|
not replace the platform modal system; it should only make dialogs declarative,
|
|
372
590
|
animation-friendly, and consistent across supported browsers.
|
|
373
591
|
|
|
374
|
-
The close button is anchored to the dialog surface, not the content flow: it
|
|
375
|
-
sits at the top `inline-end`, inside the panel. The button itself is out of
|
|
376
|
-
flow, while the header reserves enough inline padding to keep its title clear.
|
|
377
|
-
Keep the button a direct child of `dialog.modal` so the scrolling content
|
|
378
|
-
(`> form` or `> .stack`) never competes with it.
|
|
379
|
-
|
|
380
592
|
## CSS hooks
|
|
381
593
|
|
|
382
594
|
- `--modal-size` — maximum dialog width. Fallback-only, so a class on the
|
|
383
595
|
dialog or an inherited value both reach it. A dialog is shrink-to-fit: a
|
|
384
596
|
composition that must fill this width sets `inline-size` as well.
|
|
597
|
+
- `--modal-pad` — padding of the direct `<form>` or `.stack` content wrapper.
|
|
385
598
|
- `--dialog-viewport-gap` — distance kept between the dialog and the viewport edges.
|
|
386
|
-
- `--dialog-icon-size` — diameter of the `.dialog-icon` circle.
|
|
387
|
-
|
|
599
|
+
- `--dialog-icon-size` — diameter of the `.dialog-icon` circle. The heading
|
|
600
|
+
beside a leading icon reads the same hook to center on it, so set it on the
|
|
601
|
+
icon's media row (or the dialog) and both inherit one value. A value on the
|
|
602
|
+
icon alone sizes only the circle.
|
|
603
|
+
- `--dialog-icon-glyph-size` — size of the glyph centered inside `.dialog-icon`;
|
|
604
|
+
same placement as `--dialog-icon-size`.
|
|
388
605
|
- `--close-size` / `--close-icon-size` — size of the corner `.close` and of its
|
|
389
|
-
X. The header reserves the close size
|
|
606
|
+
X. The header reserves the close size, its edge inset, and a content gap so
|
|
390
607
|
the title never runs under it.
|
|
@@ -61,7 +61,7 @@ your intended target `autofocus`; otherwise the body claims initial focus.
|
|
|
61
61
|
</header>
|
|
62
62
|
|
|
63
63
|
<nav>
|
|
64
|
-
<ul class="nav-list
|
|
64
|
+
<ul class="nav-list">
|
|
65
65
|
<li><a href="#" aria-current="page">Home</a></li>
|
|
66
66
|
<li><a href="#">Users</a></li>
|
|
67
67
|
<li><a href="#">Settings</a></li>
|
|
@@ -103,7 +103,7 @@ actions and the close button can close the drawer.
|
|
|
103
103
|
<p>Unsaved changes will be lost if you close without saving.</p>
|
|
104
104
|
</div>
|
|
105
105
|
|
|
106
|
-
<footer class="cluster
|
|
106
|
+
<footer class="cluster justify-content-end">
|
|
107
107
|
<button class="btn" value="save">Save</button>
|
|
108
108
|
</footer>
|
|
109
109
|
</form>
|