coursecode 0.1.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/LICENSE +21 -0
- package/README.md +322 -0
- package/THIRD_PARTY_NOTICES.md +22 -0
- package/bin/cli.js +331 -0
- package/framework/assets/logo-coursecode-black.svg +14 -0
- package/framework/assets/logo-coursecode-white.svg +14 -0
- package/framework/assets/logo-coursecode.svg +14 -0
- package/framework/css/01-base.css +160 -0
- package/framework/css/02-layout.css +499 -0
- package/framework/css/accessibility.css +834 -0
- package/framework/css/components/accordions.css +710 -0
- package/framework/css/components/assessments.css +520 -0
- package/framework/css/components/audio-player.css +570 -0
- package/framework/css/components/badges.css +80 -0
- package/framework/css/components/breadcrumbs.css +87 -0
- package/framework/css/components/buttons.css +707 -0
- package/framework/css/components/callouts.css +1280 -0
- package/framework/css/components/cards.css +475 -0
- package/framework/css/components/carousel.css +193 -0
- package/framework/css/components/checkbox-group.css +123 -0
- package/framework/css/components/checklist.css +203 -0
- package/framework/css/components/collapse.css +96 -0
- package/framework/css/components/comparison.css +33 -0
- package/framework/css/components/content-image.css +36 -0
- package/framework/css/components/document-gallery.css +425 -0
- package/framework/css/components/dropdown.css +115 -0
- package/framework/css/components/embed-frame.css +142 -0
- package/framework/css/components/engagement.css +412 -0
- package/framework/css/components/features.css +35 -0
- package/framework/css/components/flip-cards.css +253 -0
- package/framework/css/components/footer.css +353 -0
- package/framework/css/components/forms.css +294 -0
- package/framework/css/components/hero.css +216 -0
- package/framework/css/components/images.css +528 -0
- package/framework/css/components/interactive-timeline.css +274 -0
- package/framework/css/components/intro-cards.css +30 -0
- package/framework/css/components/lightbox.css +666 -0
- package/framework/css/components/loading.css +65 -0
- package/framework/css/components/modals.css +235 -0
- package/framework/css/components/notifications.css +107 -0
- package/framework/css/components/quote.css +150 -0
- package/framework/css/components/sidebar.css +684 -0
- package/framework/css/components/slide-header.css +52 -0
- package/framework/css/components/spinner.css +62 -0
- package/framework/css/components/stats.css +44 -0
- package/framework/css/components/steps.css +232 -0
- package/framework/css/components/tables.css +90 -0
- package/framework/css/components/tabs.css +347 -0
- package/framework/css/components/timeline.css +154 -0
- package/framework/css/components/toggle.css +95 -0
- package/framework/css/components/tooltip.css +226 -0
- package/framework/css/components/video-player.css +438 -0
- package/framework/css/design-tokens.css +707 -0
- package/framework/css/framework.css +86 -0
- package/framework/css/interactions/accessibility.css +75 -0
- package/framework/css/interactions/base.css +92 -0
- package/framework/css/interactions/drag-drop.css +295 -0
- package/framework/css/interactions/fill-in-the-blank.css +236 -0
- package/framework/css/interactions/hotspots.css +69 -0
- package/framework/css/interactions/index.css +45 -0
- package/framework/css/interactions/interactive-image.css +359 -0
- package/framework/css/interactions/likert.css +126 -0
- package/framework/css/interactions/matching.css +354 -0
- package/framework/css/interactions/numeric-input.css +78 -0
- package/framework/css/interactions/sequencing.css +378 -0
- package/framework/css/interactions/true-false.css +177 -0
- package/framework/css/layouts/article.css +258 -0
- package/framework/css/layouts/base.css +30 -0
- package/framework/css/layouts/canvas.css +38 -0
- package/framework/css/layouts/focused.css +236 -0
- package/framework/css/layouts/index.css +29 -0
- package/framework/css/layouts/presentation.css +191 -0
- package/framework/css/layouts/traditional.css +52 -0
- package/framework/css/responsive.css +439 -0
- package/framework/css/utilities/accessibility-utils.css +59 -0
- package/framework/css/utilities/animations.css +419 -0
- package/framework/css/utilities/borders.css +72 -0
- package/framework/css/utilities/colors.css +76 -0
- package/framework/css/utilities/container.css +46 -0
- package/framework/css/utilities/decorative.css +442 -0
- package/framework/css/utilities/display.css +257 -0
- package/framework/css/utilities/flexbox.css +80 -0
- package/framework/css/utilities/grid.css +69 -0
- package/framework/css/utilities/icons.css +534 -0
- package/framework/css/utilities/lists.css +190 -0
- package/framework/css/utilities/spacing.css +167 -0
- package/framework/css/utilities/tables.css +81 -0
- package/framework/css/utilities/typography.css +159 -0
- package/framework/css/utilities/visibility.css +117 -0
- package/framework/docs/COURSE_AUTHORING_GUIDE.md +1773 -0
- package/framework/docs/COURSE_OUTLINE_GUIDE.md +725 -0
- package/framework/docs/COURSE_OUTLINE_TEMPLATE.md +161 -0
- package/framework/docs/DATA_MODEL.md +409 -0
- package/framework/docs/FRAMEWORK_GUIDE.md +1088 -0
- package/framework/docs/USER_GUIDE.md +583 -0
- package/framework/docs/examples/cloudflare-channel-relay.js +169 -0
- package/framework/docs/examples/cloudflare-data-worker.js +102 -0
- package/framework/docs/examples/cloudflare-error-worker.js +228 -0
- package/framework/index.html +175 -0
- package/framework/js/app/AppActions.js +410 -0
- package/framework/js/app/AppState.js +225 -0
- package/framework/js/app/AppUI.js +616 -0
- package/framework/js/assessment/AssessmentActions.js +615 -0
- package/framework/js/assessment/AssessmentFactory.js +471 -0
- package/framework/js/assessment/AssessmentState.js +322 -0
- package/framework/js/assessment/AssessmentUI.js +451 -0
- package/framework/js/automation/api-engagement.js +196 -0
- package/framework/js/automation/api-interactions.js +167 -0
- package/framework/js/automation/api.js +242 -0
- package/framework/js/automation/index.js +41 -0
- package/framework/js/components/interactions/drag-drop.js +884 -0
- package/framework/js/components/interactions/fill-in.js +535 -0
- package/framework/js/components/interactions/hotspot.js +702 -0
- package/framework/js/components/interactions/interaction-base.js +511 -0
- package/framework/js/components/interactions/likert.js +301 -0
- package/framework/js/components/interactions/matching.js +699 -0
- package/framework/js/components/interactions/multiple-choice.js +377 -0
- package/framework/js/components/interactions/numeric.js +271 -0
- package/framework/js/components/interactions/sequencing.js +423 -0
- package/framework/js/components/interactions/true-false.js +241 -0
- package/framework/js/components/ui-components/accordion.js +442 -0
- package/framework/js/components/ui-components/alert.js +88 -0
- package/framework/js/components/ui-components/audio-player.js +1193 -0
- package/framework/js/components/ui-components/callout.js +121 -0
- package/framework/js/components/ui-components/carousel.js +145 -0
- package/framework/js/components/ui-components/checkbox-group.js +87 -0
- package/framework/js/components/ui-components/checklist.js +40 -0
- package/framework/js/components/ui-components/collapse.js +114 -0
- package/framework/js/components/ui-components/comparison.js +30 -0
- package/framework/js/components/ui-components/conditional-display.js +150 -0
- package/framework/js/components/ui-components/content-image.js +41 -0
- package/framework/js/components/ui-components/dropdown.js +262 -0
- package/framework/js/components/ui-components/embed-frame.js +274 -0
- package/framework/js/components/ui-components/features.js +33 -0
- package/framework/js/components/ui-components/flip-card.js +230 -0
- package/framework/js/components/ui-components/form-validator.js +76 -0
- package/framework/js/components/ui-components/hero.js +49 -0
- package/framework/js/components/ui-components/index.js +12 -0
- package/framework/js/components/ui-components/interactive-image.js +235 -0
- package/framework/js/components/ui-components/interactive-timeline.js +285 -0
- package/framework/js/components/ui-components/intro-cards.js +35 -0
- package/framework/js/components/ui-components/lightbox.js +652 -0
- package/framework/js/components/ui-components/modal.js +386 -0
- package/framework/js/components/ui-components/notifications.js +145 -0
- package/framework/js/components/ui-components/progress.js +88 -0
- package/framework/js/components/ui-components/quote.js +41 -0
- package/framework/js/components/ui-components/stats.js +33 -0
- package/framework/js/components/ui-components/steps.js +41 -0
- package/framework/js/components/ui-components/tabs.js +255 -0
- package/framework/js/components/ui-components/timeline.js +42 -0
- package/framework/js/components/ui-components/toggle-group.js +73 -0
- package/framework/js/components/ui-components/tooltip.js +458 -0
- package/framework/js/components/ui-components/value-display.js +133 -0
- package/framework/js/components/ui-components/video-player.js +686 -0
- package/framework/js/core/component-catalog.js +121 -0
- package/framework/js/core/event-bus.js +178 -0
- package/framework/js/core/interaction-catalog.js +149 -0
- package/framework/js/dev/runtime-linter.js +1725 -0
- package/framework/js/drivers/cmi5-driver.js +768 -0
- package/framework/js/drivers/driver-factory.js +77 -0
- package/framework/js/drivers/driver-interface.js +110 -0
- package/framework/js/drivers/http-driver-base.js +241 -0
- package/framework/js/drivers/lti-driver.js +508 -0
- package/framework/js/drivers/proxy-driver.js +444 -0
- package/framework/js/drivers/scorm-12-driver.js +560 -0
- package/framework/js/drivers/scorm-2004-driver.js +775 -0
- package/framework/js/drivers/scorm-driver-base.js +112 -0
- package/framework/js/engagement/engagement-manager.js +404 -0
- package/framework/js/engagement/engagement-progress.js +191 -0
- package/framework/js/engagement/engagement-trackers.js +215 -0
- package/framework/js/engagement/requirement-strategies.js +268 -0
- package/framework/js/main.js +727 -0
- package/framework/js/managers/accessibility-manager.js +499 -0
- package/framework/js/managers/assessment-manager.js +230 -0
- package/framework/js/managers/audio-manager.js +944 -0
- package/framework/js/managers/comment-manager.js +88 -0
- package/framework/js/managers/flag-manager.js +86 -0
- package/framework/js/managers/interaction-manager.js +254 -0
- package/framework/js/managers/interaction-registry.js +96 -0
- package/framework/js/managers/objective-manager.js +423 -0
- package/framework/js/managers/score-manager.js +441 -0
- package/framework/js/managers/video-manager.js +536 -0
- package/framework/js/navigation/Breadcrumbs.js +234 -0
- package/framework/js/navigation/NavigationActions.js +1132 -0
- package/framework/js/navigation/NavigationState.js +276 -0
- package/framework/js/navigation/NavigationUI.js +574 -0
- package/framework/js/navigation/document-gallery.js +357 -0
- package/framework/js/navigation/navigation-helpers.js +175 -0
- package/framework/js/navigation/navigation-validators.js +174 -0
- package/framework/js/state/index.js +8 -0
- package/framework/js/state/lms-connection.js +482 -0
- package/framework/js/state/lms-error-utils.js +58 -0
- package/framework/js/state/state-commits.js +200 -0
- package/framework/js/state/state-domains.js +86 -0
- package/framework/js/state/state-manager.js +502 -0
- package/framework/js/state/state-validation.js +311 -0
- package/framework/js/state/transaction-log.js +41 -0
- package/framework/js/state/xapi-statement-service.js +325 -0
- package/framework/js/utilities/access-control.js +99 -0
- package/framework/js/utilities/breakpoint-manager.js +315 -0
- package/framework/js/utilities/canvas-slide.js +35 -0
- package/framework/js/utilities/conditional-display.js +388 -0
- package/framework/js/utilities/course-channel.js +214 -0
- package/framework/js/utilities/course-helpers.js +420 -0
- package/framework/js/utilities/data-reporter.js +273 -0
- package/framework/js/utilities/error-reporter.js +313 -0
- package/framework/js/utilities/hotspot-helper.js +341 -0
- package/framework/js/utilities/icons.js +348 -0
- package/framework/js/utilities/logger.js +92 -0
- package/framework/js/utilities/markdown-renderer.js +45 -0
- package/framework/js/utilities/scroll-tracker.js +68 -0
- package/framework/js/utilities/ui-initializer.js +146 -0
- package/framework/js/utilities/utilities.js +293 -0
- package/framework/js/utilities/view-manager.js +227 -0
- package/framework/js/validation/html-validators.js +422 -0
- package/framework/js/validation/scorm-validators.js +438 -0
- package/framework/js/vendor/pipwerks.js +931 -0
- package/framework/scripts/generate-narration.js +629 -0
- package/framework/scripts/tts-providers/azure-provider.js +178 -0
- package/framework/scripts/tts-providers/base-provider.js +81 -0
- package/framework/scripts/tts-providers/deepgram-provider.js +135 -0
- package/framework/scripts/tts-providers/elevenlabs-provider.js +148 -0
- package/framework/scripts/tts-providers/google-provider.js +272 -0
- package/framework/scripts/tts-providers/index.js +158 -0
- package/framework/scripts/tts-providers/openai-provider.js +143 -0
- package/framework/version.json +63 -0
- package/lib/authoring-api.js +919 -0
- package/lib/build-linter.js +450 -0
- package/lib/build-packaging.js +186 -0
- package/lib/build.js +88 -0
- package/lib/cloud.js +691 -0
- package/lib/convert.js +341 -0
- package/lib/course-parser.js +936 -0
- package/lib/course-writer.js +258 -0
- package/lib/create.js +248 -0
- package/lib/css-index.js +237 -0
- package/lib/dev.js +51 -0
- package/lib/export-content.js +1246 -0
- package/lib/headless-browser.js +413 -0
- package/lib/import.js +377 -0
- package/lib/index.js +80 -0
- package/lib/info.js +79 -0
- package/lib/interaction-formatters.js +568 -0
- package/lib/manifest/cmi5-manifest.js +63 -0
- package/lib/manifest/lti-tool-config.js +53 -0
- package/lib/manifest/manifest-factory.js +99 -0
- package/lib/manifest/scorm-12-manifest.js +61 -0
- package/lib/manifest/scorm-2004-manifest.js +94 -0
- package/lib/manifest/scorm-proxy-manifest.js +104 -0
- package/lib/manifest-parser.js +96 -0
- package/lib/mcp-prompts.js +753 -0
- package/lib/mcp-server.js +316 -0
- package/lib/narration.js +53 -0
- package/lib/pdf-structure.js +142 -0
- package/lib/preview-export.js +231 -0
- package/lib/preview-routes-api.js +662 -0
- package/lib/preview-routes-editing.js +159 -0
- package/lib/preview-routes-lms.js +230 -0
- package/lib/preview-server.js +564 -0
- package/lib/project-utils.js +269 -0
- package/lib/proxy-templates/proxy.html +68 -0
- package/lib/proxy-templates/scorm-bridge.js +112 -0
- package/lib/scaffold.js +193 -0
- package/lib/schema-extractor.js +361 -0
- package/lib/slide-source-editor.js +586 -0
- package/lib/stub-player/app-viewer.js +195 -0
- package/lib/stub-player/app.js +370 -0
- package/lib/stub-player/catalog-panel.js +312 -0
- package/lib/stub-player/config-panel.js +1303 -0
- package/lib/stub-player/content-generator.js +586 -0
- package/lib/stub-player/content-viewer.js +173 -0
- package/lib/stub-player/debug-panel.js +420 -0
- package/lib/stub-player/edit-mode.js +922 -0
- package/lib/stub-player/edit-utils.js +400 -0
- package/lib/stub-player/header-bar.js +354 -0
- package/lib/stub-player/interaction-editor.js +210 -0
- package/lib/stub-player/interactions-panel.js +565 -0
- package/lib/stub-player/lms-api.js +1094 -0
- package/lib/stub-player/login-screen.js +74 -0
- package/lib/stub-player/outline-mode.js +689 -0
- package/lib/stub-player/styles/_assessments-panel.css +245 -0
- package/lib/stub-player/styles/_base.css +89 -0
- package/lib/stub-player/styles/_catalog-icons.css +96 -0
- package/lib/stub-player/styles/_catalog-panel.css +291 -0
- package/lib/stub-player/styles/_config-panel.css +636 -0
- package/lib/stub-player/styles/_content-viewer.css +834 -0
- package/lib/stub-player/styles/_debug-panel.css +576 -0
- package/lib/stub-player/styles/_edit-mode.css +128 -0
- package/lib/stub-player/styles/_header-bar.css +343 -0
- package/lib/stub-player/styles/_interaction-editor.css +140 -0
- package/lib/stub-player/styles/_interactions-panel.css +1038 -0
- package/lib/stub-player/styles/_login-screen.css +102 -0
- package/lib/stub-player/styles/_outline-mode.css +752 -0
- package/lib/stub-player/styles.css +15 -0
- package/lib/stub-player.js +160 -0
- package/lib/test-data-reporting.js +176 -0
- package/lib/test-error-reporting.js +146 -0
- package/lib/token.js +86 -0
- package/lib/upgrade.js +257 -0
- package/lib/validation-rules.js +517 -0
- package/lib/vite-plugin-content-discovery.js +296 -0
- package/package.json +108 -0
- package/schemas/XMLSchema.dtd +402 -0
- package/schemas/adlcp_v1p3.xsd +111 -0
- package/schemas/adlnav_v1p3.xsd +61 -0
- package/schemas/adlseq_v1p3.xsd +93 -0
- package/schemas/common/anyElement.xsd +27 -0
- package/schemas/common/dataTypes.xsd +138 -0
- package/schemas/common/elementNames.xsd +767 -0
- package/schemas/common/elementTypes.xsd +786 -0
- package/schemas/common/rootElement.xsd +31 -0
- package/schemas/common/vocabTypes.xsd +345 -0
- package/schemas/common/vocabValues.xsd +257 -0
- package/schemas/datatypes.dtd +203 -0
- package/schemas/ims_xml.xsd +35 -0
- package/schemas/imscp_v1p1.xsd +368 -0
- package/schemas/imsss_v1p0.xsd +67 -0
- package/schemas/imsss_v1p0auxresource.xsd +19 -0
- package/schemas/imsss_v1p0control.xsd +20 -0
- package/schemas/imsss_v1p0delivery.xsd +17 -0
- package/schemas/imsss_v1p0limit.xsd +47 -0
- package/schemas/imsss_v1p0objective.xsd +67 -0
- package/schemas/imsss_v1p0random.xsd +16 -0
- package/schemas/imsss_v1p0rollup.xsd +46 -0
- package/schemas/imsss_v1p0seqrule.xsd +108 -0
- package/schemas/imsss_v1p0util.xsd +94 -0
- package/schemas/license.txt +17 -0
- package/schemas/lom.xsd +102 -0
- package/schemas/lomCustom.xsd +62 -0
- package/schemas/lomLoose.xsd +62 -0
- package/schemas/lomStrict.xsd +62 -0
- package/schemas/xml.xsd +81 -0
- package/template/.env.example +92 -0
- package/template/course/assets/audio/example-intro.mp3 +0 -0
- package/template/course/assets/audio/example-ui-demo--compact-player.mp3 +0 -0
- package/template/course/assets/audio/example-ui-demo--demo-modal.mp3 +0 -0
- package/template/course/assets/audio/example-ui-demo--full-player.mp3 +0 -0
- package/template/course/assets/docs/example_md_1.md +39 -0
- package/template/course/assets/docs/example_md_2.md +41 -0
- package/template/course/assets/docs/example_pdf_1_thumbnail.png +0 -0
- package/template/course/assets/docs/example_pdf_2.pdf +0 -0
- package/template/course/assets/images/course-architecture.svg +36 -0
- package/template/course/assets/images/logo.svg +14 -0
- package/template/course/assets/widgets/counter-demo.html +190 -0
- package/template/course/assets/widgets/gravity-painter.html +384 -0
- package/template/course/course-config.js +539 -0
- package/template/course/icons.js +19 -0
- package/template/course/interactions/PLUGIN_GUIDE.md +97 -0
- package/template/course/slides/example-course-structure.js +138 -0
- package/template/course/slides/example-final-exam.js +144 -0
- package/template/course/slides/example-finishing.js +127 -0
- package/template/course/slides/example-interactions-showcase.js +615 -0
- package/template/course/slides/example-preview-tour.js +129 -0
- package/template/course/slides/example-remedial.js +143 -0
- package/template/course/slides/example-summary.js +103 -0
- package/template/course/slides/example-ui-showcase.js +1805 -0
- package/template/course/slides/example-welcome.js +123 -0
- package/template/course/slides/example-workflow.js +140 -0
- package/template/course/theme.css +165 -0
- package/template/eslint.config.js +47 -0
- package/template/package.json +28 -0
- package/template/vite.config.js +339 -0
|
@@ -0,0 +1,1280 @@
|
|
|
1
|
+
/* ============================================================================
|
|
2
|
+
CALLOUTS & ALERTS - Informational banners and dismissible alerts
|
|
3
|
+
============================================================================
|
|
4
|
+
|
|
5
|
+
PURPOSE: Highlight important information, warnings, and notices
|
|
6
|
+
|
|
7
|
+
INCLUDES:
|
|
8
|
+
- Base callout styles
|
|
9
|
+
- Callout variants (info, success, warning, error, note, tip, important, quote, example, definition)
|
|
10
|
+
- Callout style variants (outlined, filled, minimal, banner, card)
|
|
11
|
+
- Callout size variants (compact, large)
|
|
12
|
+
- Callout with icon support (data-icon attribute)
|
|
13
|
+
- Callout with title support
|
|
14
|
+
- Dismissible callouts
|
|
15
|
+
- Alert component (dismissible version)
|
|
16
|
+
- Alert close button
|
|
17
|
+
|
|
18
|
+
DEPENDENCIES:
|
|
19
|
+
- Requires: design-tokens.css (for CSS variables)
|
|
20
|
+
|
|
21
|
+
USED BY:
|
|
22
|
+
- Content slides for important notices
|
|
23
|
+
- Warning messages
|
|
24
|
+
- Success confirmations
|
|
25
|
+
- Error notifications
|
|
26
|
+
- Tips and helpful hints
|
|
27
|
+
- Quotations and definitions
|
|
28
|
+
|
|
29
|
+
AI DEBUGGING TIPS:
|
|
30
|
+
- Callout not showing? Check if parent has display: none or hidden
|
|
31
|
+
- Wrong color? Verify variant class (.callout--info, .callout--success, etc.)
|
|
32
|
+
- Border not visible? Check border-left-color is being applied
|
|
33
|
+
- Icon missing? Add callout-with-icon class and data-icon attribute
|
|
34
|
+
- Style not applying? Check data-callout-style attribute value
|
|
35
|
+
|
|
36
|
+
STRUCTURE:
|
|
37
|
+
1. Callout CSS variables (configurable accent colors)
|
|
38
|
+
2. Callout base styles
|
|
39
|
+
3. Callout type variants (info, success, warning, error, note, tip, etc.)
|
|
40
|
+
4. Callout style variants (outlined, filled, minimal, banner, card)
|
|
41
|
+
5. Callout size variants (compact, large)
|
|
42
|
+
6. Callout with icon
|
|
43
|
+
7. Callout with title
|
|
44
|
+
8. Dismissible callouts
|
|
45
|
+
9. Alert component
|
|
46
|
+
|
|
47
|
+
COMMON CLASSES:
|
|
48
|
+
.callout - Base callout (required)
|
|
49
|
+
.callout--info - Blue info callout
|
|
50
|
+
.callout--success - Green success callout
|
|
51
|
+
.callout--warning - Orange warning callout
|
|
52
|
+
.callout--danger - Red error callout
|
|
53
|
+
.callout-note - Gray neutral note
|
|
54
|
+
.callout-tip - Purple helpful tip
|
|
55
|
+
.callout-important - Strong emphasis
|
|
56
|
+
.callout-quote - Quotation styling
|
|
57
|
+
.callout-example - Example/code block
|
|
58
|
+
.callout-definition - Term definition
|
|
59
|
+
.callout--compact - Smaller size
|
|
60
|
+
.callout--large - Larger size
|
|
61
|
+
.callout-with-icon - Enable icon display
|
|
62
|
+
.callout-with-title - Structured title+body
|
|
63
|
+
.callout--dismissible - Can be closed
|
|
64
|
+
.alert - Dismissible alert
|
|
65
|
+
.alert-close - Close button for alerts
|
|
66
|
+
|
|
67
|
+
DATA ATTRIBUTES:
|
|
68
|
+
data-callout-style="outlined|filled|minimal|banner|card"
|
|
69
|
+
data-icon="auto|info|success|warning|error|tip|note"
|
|
70
|
+
data-icon-position="left|top"
|
|
71
|
+
|
|
72
|
+
LAST UPDATED: 2024-12-04
|
|
73
|
+
============================================================================ */
|
|
74
|
+
|
|
75
|
+
/* ============================================================================
|
|
76
|
+
CALLOUT CSS VARIABLES - Configurable accent colors
|
|
77
|
+
============================================================================
|
|
78
|
+
|
|
79
|
+
These variables allow custom callout colors via theme overrides.
|
|
80
|
+
Example: .callout-custom { --callout-accent: #8b5cf6; --callout-bg: #f5f3ff; }
|
|
81
|
+
============================================================================ */
|
|
82
|
+
|
|
83
|
+
.callout {
|
|
84
|
+
/* Default values - overridden by variant classes */
|
|
85
|
+
--callout-accent: var(--color-info);
|
|
86
|
+
--callout-bg: var(--color-info-light);
|
|
87
|
+
--callout-text: var(--text-body);
|
|
88
|
+
--callout-heading: var(--callout-accent);
|
|
89
|
+
--callout-icon-bg: color-mix(in srgb, var(--callout-accent) 12%, transparent);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* ============================================================================
|
|
93
|
+
CALLOUT COMPONENT - Base Styles
|
|
94
|
+
============================================================================ */
|
|
95
|
+
|
|
96
|
+
.callout {
|
|
97
|
+
position: relative;
|
|
98
|
+
padding: var(--space-4) var(--space-5);
|
|
99
|
+
background: linear-gradient(135deg,
|
|
100
|
+
var(--callout-bg) 0%,
|
|
101
|
+
color-mix(in srgb, var(--callout-bg) 85%, white) 100%);
|
|
102
|
+
border-width: 1px 1px 1px 3px;
|
|
103
|
+
border-style: solid;
|
|
104
|
+
border-color: color-mix(in srgb, var(--callout-accent) 15%, transparent);
|
|
105
|
+
border-left-color: var(--callout-accent);
|
|
106
|
+
border-radius: var(--radius-xl);
|
|
107
|
+
box-shadow:
|
|
108
|
+
0 1px 3px rgba(0, 0, 0, 0.04),
|
|
109
|
+
0 4px 12px rgba(0, 0, 0, 0.03),
|
|
110
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.6);
|
|
111
|
+
color: var(--callout-text);
|
|
112
|
+
overflow: hidden;
|
|
113
|
+
|
|
114
|
+
/* Smooth transitions for interactive states */
|
|
115
|
+
transition:
|
|
116
|
+
box-shadow var(--transition-normal),
|
|
117
|
+
transform var(--transition-normal),
|
|
118
|
+
border-color var(--transition-normal);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* Subtle hover enhancement - makes callouts feel more polished */
|
|
122
|
+
.callout:hover {
|
|
123
|
+
box-shadow:
|
|
124
|
+
0 2px 6px rgba(0, 0, 0, 0.06),
|
|
125
|
+
0 8px 20px rgba(0, 0, 0, 0.04),
|
|
126
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.6);
|
|
127
|
+
border-color: color-mix(in srgb, var(--callout-accent) 25%, transparent);
|
|
128
|
+
border-left-color: var(--callout-accent);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* Focus state for interactive/clickable callouts */
|
|
132
|
+
.callout:focus-within {
|
|
133
|
+
outline: var(--focus-ring-width) solid var(--focus-ring-color);
|
|
134
|
+
outline-offset: var(--focus-ring-offset);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* Don't show focus outline when video player elements are focused inside callout */
|
|
138
|
+
.callout:has(.video-player-wrapper):focus-within {
|
|
139
|
+
outline: none;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/* Responsive padding - more breathing room on larger screens */
|
|
143
|
+
@media (min-width: 768px) {
|
|
144
|
+
.callout {
|
|
145
|
+
padding: var(--space-5) var(--space-6);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.callout p {
|
|
150
|
+
margin: 0;
|
|
151
|
+
line-height: var(--line-height-relaxed);
|
|
152
|
+
font-size: var(--font-size-base);
|
|
153
|
+
letter-spacing: -0.01em;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.callout p+p {
|
|
157
|
+
margin-top: var(--space-3);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.callout h3,
|
|
161
|
+
.callout h4 {
|
|
162
|
+
margin-top: 0;
|
|
163
|
+
margin-bottom: var(--space-2);
|
|
164
|
+
font-size: var(--font-size-base);
|
|
165
|
+
font-weight: var(--font-weight-semibold);
|
|
166
|
+
color: var(--callout-heading);
|
|
167
|
+
letter-spacing: -0.02em;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/* Better heading spacing when followed by content */
|
|
171
|
+
.callout h3+p,
|
|
172
|
+
.callout h4+p {
|
|
173
|
+
margin-top: 0;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.callout ul,
|
|
177
|
+
.callout ol {
|
|
178
|
+
margin: var(--space-2) 0;
|
|
179
|
+
padding-left: var(--space-5);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.callout li {
|
|
183
|
+
margin-bottom: var(--space-1);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.callout li:last-child {
|
|
187
|
+
margin-bottom: 0;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/* Links inside callouts - inherit accent color */
|
|
191
|
+
.callout a {
|
|
192
|
+
color: var(--callout-accent);
|
|
193
|
+
text-decoration: underline;
|
|
194
|
+
text-decoration-thickness: 1px;
|
|
195
|
+
text-underline-offset: 2px;
|
|
196
|
+
transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.callout a:hover {
|
|
200
|
+
color: var(--callout-heading);
|
|
201
|
+
text-decoration-thickness: 2px;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/* Code inside callouts */
|
|
205
|
+
.callout code {
|
|
206
|
+
background-color: var(--bg-muted);
|
|
207
|
+
padding: 0.125em 0.375em;
|
|
208
|
+
border-radius: var(--radius-sm);
|
|
209
|
+
font-size: 0.9em;
|
|
210
|
+
font-family: var(--font-family-mono, ui-monospace, monospace);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/* Strong/bold text uses accent color for emphasis */
|
|
214
|
+
.callout strong {
|
|
215
|
+
color: var(--callout-heading);
|
|
216
|
+
font-weight: var(--font-weight-semibold);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/* Reduce motion for users who prefer it */
|
|
220
|
+
@media (prefers-reduced-motion: reduce) {
|
|
221
|
+
.callout {
|
|
222
|
+
transition: none;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/* ============================================================================
|
|
227
|
+
CALLOUT TYPE VARIANTS - Semantic color types
|
|
228
|
+
============================================================================ */
|
|
229
|
+
|
|
230
|
+
/* Info - Blue (default) */
|
|
231
|
+
.callout--info {
|
|
232
|
+
--callout-accent: var(--color-info);
|
|
233
|
+
--callout-bg: var(--color-info-light);
|
|
234
|
+
--callout-icon-bg: color-mix(in srgb, var(--color-info) 12%, transparent);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/* Success - Green */
|
|
238
|
+
.callout--success {
|
|
239
|
+
--callout-accent: var(--color-success);
|
|
240
|
+
--callout-bg: var(--color-success-light);
|
|
241
|
+
--callout-icon-bg: color-mix(in srgb, var(--color-success) 12%, transparent);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/* Warning - Orange/Amber */
|
|
245
|
+
.callout--warning {
|
|
246
|
+
--callout-accent: var(--color-warning-text);
|
|
247
|
+
--callout-bg: var(--color-warning-light);
|
|
248
|
+
--callout-icon-bg: color-mix(in srgb, var(--color-warning) 15%, transparent);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/* Error - Red */
|
|
252
|
+
.callout--danger {
|
|
253
|
+
--callout-accent: var(--color-danger-text);
|
|
254
|
+
--callout-bg: var(--color-danger-light);
|
|
255
|
+
--callout-icon-bg: color-mix(in srgb, var(--color-danger) 12%, transparent);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/* Note - Neutral gray */
|
|
259
|
+
.callout-note {
|
|
260
|
+
--callout-accent: var(--text-secondary);
|
|
261
|
+
--callout-bg: var(--bg-subtle);
|
|
262
|
+
--callout-heading: var(--text-primary);
|
|
263
|
+
--callout-icon-bg: color-mix(in srgb, var(--text-secondary) 12%, transparent);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/* Tip - Purple */
|
|
267
|
+
.callout-tip {
|
|
268
|
+
--callout-accent: var(--color-secondary);
|
|
269
|
+
--callout-bg: var(--color-secondary-alpha-05);
|
|
270
|
+
--callout-icon-bg: color-mix(in srgb, var(--color-secondary) 12%, transparent);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/* Important - Strong emphasis (dark/bold) */
|
|
274
|
+
.callout-important {
|
|
275
|
+
--callout-accent: var(--text-primary);
|
|
276
|
+
--callout-bg: var(--bg-muted);
|
|
277
|
+
--callout-heading: var(--text-primary);
|
|
278
|
+
--callout-icon-bg: color-mix(in srgb, var(--text-primary) 10%, transparent);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/* Quote - Styled for quotations */
|
|
282
|
+
.callout-quote {
|
|
283
|
+
--callout-accent: var(--text-muted);
|
|
284
|
+
--callout-bg: var(--bg-subtle);
|
|
285
|
+
--callout-heading: var(--text-secondary);
|
|
286
|
+
font-style: italic;
|
|
287
|
+
padding-left: calc(var(--space-5) + 1.75rem);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.callout-quote::before {
|
|
291
|
+
content: '"';
|
|
292
|
+
position: absolute;
|
|
293
|
+
left: var(--space-5);
|
|
294
|
+
top: var(--space-3);
|
|
295
|
+
font-size: 2.5rem;
|
|
296
|
+
line-height: 1;
|
|
297
|
+
color: var(--border-strong);
|
|
298
|
+
font-style: normal;
|
|
299
|
+
font-family: Georgia, serif;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.callout-quote cite,
|
|
303
|
+
.callout-quote .callout-author {
|
|
304
|
+
display: block;
|
|
305
|
+
margin-top: var(--space-3);
|
|
306
|
+
font-style: normal;
|
|
307
|
+
font-size: var(--font-size-sm);
|
|
308
|
+
color: var(--text-secondary);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.callout-quote cite::before,
|
|
312
|
+
.callout-quote .callout-author::before {
|
|
313
|
+
content: '— ';
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/* Example - For code/example blocks */
|
|
317
|
+
.callout-example {
|
|
318
|
+
--callout-accent: var(--text-muted);
|
|
319
|
+
--callout-bg: var(--bg-subtle);
|
|
320
|
+
--callout-icon-bg: color-mix(in srgb, var(--text-muted) 12%, transparent);
|
|
321
|
+
font-family: var(--font-family-mono, ui-monospace, monospace);
|
|
322
|
+
font-size: var(--font-size-sm);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/* Definition - For term definitions */
|
|
326
|
+
.callout-definition {
|
|
327
|
+
--callout-accent: var(--color-primary);
|
|
328
|
+
--callout-bg: var(--color-primary-alpha-10);
|
|
329
|
+
--callout-icon-bg: color-mix(in srgb, var(--color-primary) 12%, transparent);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.callout-definition .callout-term {
|
|
333
|
+
font-weight: var(--font-weight-bold);
|
|
334
|
+
color: var(--color-primary);
|
|
335
|
+
margin-bottom: var(--space-1);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/* ============================================================================
|
|
339
|
+
CALLOUT STYLE VARIANTS - Visual style via data attribute
|
|
340
|
+
============================================================================
|
|
341
|
+
|
|
342
|
+
Usage: <div class="callout callout--info" data-callout-style="outlined">
|
|
343
|
+
============================================================================ */
|
|
344
|
+
|
|
345
|
+
/* Default style (left border) is the base - no additional styling needed */
|
|
346
|
+
|
|
347
|
+
/* Outlined - Border all around, no background fill */
|
|
348
|
+
.callout[data-callout-style="outlined"],
|
|
349
|
+
.callout--outlined {
|
|
350
|
+
background: transparent;
|
|
351
|
+
border-width: 2px 2px 2px 3px;
|
|
352
|
+
border-style: solid;
|
|
353
|
+
border-color: color-mix(in srgb, var(--callout-accent) 40%, transparent);
|
|
354
|
+
border-left-color: var(--callout-accent);
|
|
355
|
+
box-shadow: none;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.callout--outlined:hover,
|
|
359
|
+
.callout[data-callout-style="outlined"]:hover {
|
|
360
|
+
border-color: color-mix(in srgb, var(--callout-accent) 60%, transparent);
|
|
361
|
+
border-left-color: var(--callout-accent);
|
|
362
|
+
box-shadow: 0 2px 8px color-mix(in srgb, var(--callout-accent) 10%, transparent);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
/* Filled - Stronger background, no left border accent */
|
|
366
|
+
.callout[data-callout-style="filled"],
|
|
367
|
+
.callout--filled {
|
|
368
|
+
border-left-width: 0;
|
|
369
|
+
border-radius: var(--radius-xl);
|
|
370
|
+
border: none;
|
|
371
|
+
box-shadow:
|
|
372
|
+
0 2px 4px rgba(0, 0, 0, 0.1),
|
|
373
|
+
0 4px 12px rgba(0, 0, 0, 0.08);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.callout--filled.callout--info,
|
|
377
|
+
.callout[data-callout-style="filled"].callout--info {
|
|
378
|
+
background-color: var(--color-info);
|
|
379
|
+
color: var(--color-white);
|
|
380
|
+
--callout-heading: var(--color-white);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.callout--filled.callout--success,
|
|
384
|
+
.callout[data-callout-style="filled"].callout--success {
|
|
385
|
+
background-color: var(--color-success);
|
|
386
|
+
color: var(--color-white);
|
|
387
|
+
--callout-heading: var(--color-white);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.callout--filled.callout--warning,
|
|
391
|
+
.callout[data-callout-style="filled"].callout--warning {
|
|
392
|
+
background-color: var(--color-warning);
|
|
393
|
+
color: var(--color-gray-900);
|
|
394
|
+
--callout-heading: var(--color-gray-900);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.callout--filled.callout--danger,
|
|
398
|
+
.callout[data-callout-style="filled"].callout--danger {
|
|
399
|
+
background-color: var(--color-danger);
|
|
400
|
+
color: var(--color-white);
|
|
401
|
+
--callout-heading: var(--color-white);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
.callout--filled.callout-tip,
|
|
405
|
+
.callout[data-callout-style="filled"].callout-tip {
|
|
406
|
+
background-color: var(--color-secondary);
|
|
407
|
+
color: var(--color-gray-900);
|
|
408
|
+
--callout-heading: var(--color-gray-900);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.callout--filled.callout-note,
|
|
412
|
+
.callout[data-callout-style="filled"].callout-note {
|
|
413
|
+
background-color: var(--color-gray-600);
|
|
414
|
+
color: var(--color-white);
|
|
415
|
+
--callout-heading: var(--color-white);
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.callout--filled.callout-important,
|
|
419
|
+
.callout[data-callout-style="filled"].callout-important {
|
|
420
|
+
background-color: var(--color-gray-900);
|
|
421
|
+
color: var(--color-white);
|
|
422
|
+
--callout-heading: var(--color-white);
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
/* Minimal - No border, very subtle background */
|
|
426
|
+
.callout[data-callout-style="minimal"],
|
|
427
|
+
.callout--minimal {
|
|
428
|
+
border: none;
|
|
429
|
+
box-shadow: none;
|
|
430
|
+
background: var(--callout-bg);
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
.callout--minimal:hover,
|
|
434
|
+
.callout[data-callout-style="minimal"]:hover {
|
|
435
|
+
box-shadow: none;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/* Banner - Full-width, no border-radius */
|
|
439
|
+
.callout[data-callout-style="banner"],
|
|
440
|
+
.callout--banner {
|
|
441
|
+
border-radius: 0;
|
|
442
|
+
margin-left: calc(-1 * var(--space-4));
|
|
443
|
+
margin-right: calc(-1 * var(--space-4));
|
|
444
|
+
padding-left: var(--space-6);
|
|
445
|
+
padding-right: var(--space-6);
|
|
446
|
+
border-left: 4px solid var(--callout-accent);
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
/* Card - Card-like with shadow, centered content option */
|
|
450
|
+
.callout[data-callout-style="card"],
|
|
451
|
+
.callout--card {
|
|
452
|
+
background: var(--bg-surface);
|
|
453
|
+
border: 1px solid var(--border-default);
|
|
454
|
+
border-left-width: 1px;
|
|
455
|
+
box-shadow:
|
|
456
|
+
0 1px 3px rgba(0, 0, 0, 0.04),
|
|
457
|
+
0 6px 16px rgba(0, 0, 0, 0.06);
|
|
458
|
+
text-align: center;
|
|
459
|
+
padding: var(--space-6) var(--space-5);
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
.callout--card:hover,
|
|
463
|
+
.callout[data-callout-style="card"]:hover {
|
|
464
|
+
box-shadow:
|
|
465
|
+
0 2px 6px rgba(0, 0, 0, 0.06),
|
|
466
|
+
0 12px 24px rgba(0, 0, 0, 0.08);
|
|
467
|
+
transform: translateY(-1px);
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
.callout--card .callout-icon,
|
|
471
|
+
.callout[data-callout-style="card"] .callout-icon {
|
|
472
|
+
margin-bottom: var(--space-3);
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
/* ============================================================================
|
|
476
|
+
CALLOUT SIZE VARIANTS
|
|
477
|
+
============================================================================ */
|
|
478
|
+
|
|
479
|
+
/* Compact - Reduced padding, smaller text */
|
|
480
|
+
.callout--compact {
|
|
481
|
+
padding: var(--space-2) var(--space-3);
|
|
482
|
+
font-size: var(--font-size-sm);
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
.callout--compact h3,
|
|
486
|
+
.callout--compact h4 {
|
|
487
|
+
font-size: var(--font-size-base);
|
|
488
|
+
margin-bottom: var(--space-1);
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
.callout--compact p {
|
|
492
|
+
font-size: var(--font-size-sm);
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
/* Large - Increased padding, larger text */
|
|
496
|
+
.callout--large {
|
|
497
|
+
padding: var(--space-6) var(--space-8);
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
.callout--large h3,
|
|
501
|
+
.callout--large h4 {
|
|
502
|
+
font-size: var(--font-size-xl);
|
|
503
|
+
margin-bottom: var(--space-3);
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
.callout--large p {
|
|
507
|
+
font-size: var(--font-size-lg);
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
/* ============================================================================
|
|
511
|
+
CALLOUT WITH ICON - Icon integration via data-icon attribute
|
|
512
|
+
============================================================================
|
|
513
|
+
|
|
514
|
+
Usage:
|
|
515
|
+
<div class="callout callout--info callout-with-icon" data-icon="auto">...</div>
|
|
516
|
+
<div class="callout callout--warning callout-with-icon" data-icon="warning">...</div>
|
|
517
|
+
============================================================================ */
|
|
518
|
+
|
|
519
|
+
.callout-with-icon {
|
|
520
|
+
padding-left: calc(var(--space-5) + 2.75rem);
|
|
521
|
+
position: relative;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
.callout-with-icon::before {
|
|
525
|
+
content: '';
|
|
526
|
+
position: absolute;
|
|
527
|
+
left: var(--space-5);
|
|
528
|
+
top: 50%;
|
|
529
|
+
transform: translateY(-50%);
|
|
530
|
+
width: 1.75rem;
|
|
531
|
+
height: 1.75rem;
|
|
532
|
+
background-color: var(--callout-icon-bg);
|
|
533
|
+
border-radius: 50%;
|
|
534
|
+
background-size: 1rem 1rem;
|
|
535
|
+
background-repeat: no-repeat;
|
|
536
|
+
background-position: center;
|
|
537
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
/* Icon position: top (stacked above content) */
|
|
541
|
+
.callout-with-icon[data-icon-position="top"] {
|
|
542
|
+
padding-left: var(--space-5);
|
|
543
|
+
padding-top: calc(var(--space-5) + 3rem);
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
.callout-with-icon[data-icon-position="top"]::before {
|
|
547
|
+
left: 50%;
|
|
548
|
+
top: var(--space-4);
|
|
549
|
+
transform: translateX(-50%) translateY(0);
|
|
550
|
+
width: 2.25rem;
|
|
551
|
+
height: 2.25rem;
|
|
552
|
+
background-size: 1.25rem 1.25rem;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
/* Auto icon - inherits from callout type */
|
|
556
|
+
.callout--info.callout-with-icon[data-icon="auto"]::before,
|
|
557
|
+
.callout-with-icon[data-icon="info"]::before {
|
|
558
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d4ed8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='16' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'/%3E%3C/svg%3E");
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
.callout--success.callout-with-icon[data-icon="auto"]::before,
|
|
562
|
+
.callout-with-icon[data-icon="success"]::before {
|
|
563
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23007a43' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/%3E%3Cpolyline points='22 4 12 14.01 9 11.01'/%3E%3C/svg%3E");
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
.callout--warning.callout-with-icon[data-icon="auto"]::before,
|
|
567
|
+
.callout-with-icon[data-icon="warning"]::before {
|
|
568
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b45309' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E");
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
.callout--danger.callout-with-icon[data-icon="auto"]::before,
|
|
572
|
+
.callout-with-icon[data-icon="error"]::before {
|
|
573
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b91c1c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='15' y1='9' x2='9' y2='15'/%3E%3Cline x1='9' y1='9' x2='15' y2='15'/%3E%3C/svg%3E");
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
.callout-tip.callout-with-icon[data-icon="auto"]::before,
|
|
577
|
+
.callout-with-icon[data-icon="tip"]::before {
|
|
578
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23581c87' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z'/%3E%3C/svg%3E");
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
.callout-note.callout-with-icon[data-icon="auto"]::before,
|
|
582
|
+
.callout-with-icon[data-icon="note"]::before {
|
|
583
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cpolyline points='10 9 9 9 8 9'/%3E%3C/svg%3E");
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
.callout-important.callout-with-icon[data-icon="auto"]::before,
|
|
587
|
+
.callout-with-icon[data-icon="important"]::before {
|
|
588
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111827' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E");
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
.callout-definition.callout-with-icon[data-icon="auto"]::before,
|
|
592
|
+
.callout-with-icon[data-icon="definition"]::before {
|
|
593
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23240250' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/%3E%3C/svg%3E");
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
/* Compact size adjustments for icons */
|
|
597
|
+
.callout--compact.callout-with-icon {
|
|
598
|
+
padding-left: calc(var(--space-3) + 2.25rem);
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
.callout--compact.callout-with-icon::before {
|
|
602
|
+
left: var(--space-3);
|
|
603
|
+
width: 1.5rem;
|
|
604
|
+
height: 1.5rem;
|
|
605
|
+
background-size: 0.875rem 0.875rem;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
/* Large size adjustments for icons */
|
|
609
|
+
.callout--large.callout-with-icon {
|
|
610
|
+
padding-left: calc(var(--space-8) + 3.5rem);
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
.callout--large.callout-with-icon::before {
|
|
614
|
+
left: var(--space-7);
|
|
615
|
+
width: 2.25rem;
|
|
616
|
+
height: 2.25rem;
|
|
617
|
+
background-size: 1.25rem 1.25rem;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
/* Filled style icon adjustments (white icons on dark background) */
|
|
621
|
+
.callout--filled.callout-with-icon::before,
|
|
622
|
+
.callout[data-callout-style="filled"].callout-with-icon::before {
|
|
623
|
+
background-color: rgba(255, 255, 255, 0.2);
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
/* ============================================================================
|
|
627
|
+
CALLOUT WITH CUSTOM ICON/EMOJI - Inline element support
|
|
628
|
+
============================================================================
|
|
629
|
+
|
|
630
|
+
For custom emojis or icons not covered by data-icon attribute.
|
|
631
|
+
Uses a real element instead of ::before pseudo-element.
|
|
632
|
+
|
|
633
|
+
Usage:
|
|
634
|
+
<div class="callout callout--warning callout-has-icon">
|
|
635
|
+
<span class="callout-icon">🔄</span>
|
|
636
|
+
<div class="callout-content">
|
|
637
|
+
<h3>Title</h3>
|
|
638
|
+
<p>Message content here.</p>
|
|
639
|
+
</div>
|
|
640
|
+
</div>
|
|
641
|
+
|
|
642
|
+
Or simpler (no title):
|
|
643
|
+
<div class="callout callout--info callout-has-icon">
|
|
644
|
+
<span class="callout-icon">💡</span>
|
|
645
|
+
<p>Simple message with emoji.</p>
|
|
646
|
+
</div>
|
|
647
|
+
============================================================================ */
|
|
648
|
+
|
|
649
|
+
.callout-has-icon {
|
|
650
|
+
display: flex;
|
|
651
|
+
gap: var(--space-4);
|
|
652
|
+
align-items: center;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
/* Icon container - works with emoji, SVG, or icon fonts */
|
|
656
|
+
.callout-has-icon>.callout-icon {
|
|
657
|
+
flex-shrink: 0;
|
|
658
|
+
display: flex;
|
|
659
|
+
align-items: center;
|
|
660
|
+
justify-content: center;
|
|
661
|
+
/* Default size - use .icon-* classes to override */
|
|
662
|
+
font-size: 1.5rem;
|
|
663
|
+
line-height: 1;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
/* Allow icon size classes to override */
|
|
667
|
+
.callout-has-icon>.callout-icon.icon-xs {
|
|
668
|
+
font-size: 0.75rem;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
.callout-has-icon>.callout-icon.icon-sm {
|
|
672
|
+
font-size: 1rem;
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
.callout-has-icon>.callout-icon.icon-md {
|
|
676
|
+
font-size: 1.25rem;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
.callout-has-icon>.callout-icon.icon-lg {
|
|
680
|
+
font-size: 1.5rem;
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
.callout-has-icon>.callout-icon.icon-xl {
|
|
684
|
+
font-size: 2rem;
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
.callout-has-icon>.callout-icon.icon-2xl {
|
|
688
|
+
font-size: 3rem;
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
.callout-has-icon>.callout-icon.icon-3xl {
|
|
692
|
+
font-size: 4rem;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
/* Optional: Add circle background with modifier class */
|
|
696
|
+
.callout-has-icon>.callout-icon.callout-icon-circle {
|
|
697
|
+
width: 2.5rem;
|
|
698
|
+
height: 2.5rem;
|
|
699
|
+
background-color: var(--callout-icon-bg);
|
|
700
|
+
border-radius: 50%;
|
|
701
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
/* SVG icons inside .callout-icon */
|
|
705
|
+
.callout-has-icon>.callout-icon svg {
|
|
706
|
+
width: 1.25rem;
|
|
707
|
+
height: 1.25rem;
|
|
708
|
+
color: var(--callout-accent);
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
/* Content wrapper - takes remaining space */
|
|
712
|
+
.callout-has-icon>.callout-content {
|
|
713
|
+
flex: 1;
|
|
714
|
+
min-width: 0;
|
|
715
|
+
/* Prevent overflow */
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
/* Direct paragraph (no wrapper needed for simple callouts) */
|
|
719
|
+
.callout-has-icon>p {
|
|
720
|
+
flex: 1;
|
|
721
|
+
min-width: 0;
|
|
722
|
+
margin: 0;
|
|
723
|
+
/* Center single paragraph with icon */
|
|
724
|
+
align-self: center;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
/* Reset heading margins inside content */
|
|
728
|
+
.callout-has-icon .callout-content h3,
|
|
729
|
+
.callout-has-icon .callout-content h4 {
|
|
730
|
+
margin-top: 0;
|
|
731
|
+
margin-bottom: var(--space-2);
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
.callout-has-icon .callout-content p:last-child {
|
|
735
|
+
margin-bottom: 0;
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
/* Size variants */
|
|
739
|
+
.callout--compact.callout-has-icon {
|
|
740
|
+
gap: var(--space-3);
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
.callout--compact.callout-has-icon>.callout-icon {
|
|
744
|
+
font-size: 1.125rem;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
.callout--compact.callout-has-icon>.callout-icon.callout-icon-circle {
|
|
748
|
+
width: 2rem;
|
|
749
|
+
height: 2rem;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
.callout--compact.callout-has-icon>.callout-icon svg {
|
|
753
|
+
width: 1rem;
|
|
754
|
+
height: 1rem;
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
.callout--large.callout-has-icon {
|
|
758
|
+
gap: var(--space-5);
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
.callout--large.callout-has-icon>.callout-icon {
|
|
762
|
+
font-size: 2rem;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
.callout--large.callout-has-icon>.callout-icon.callout-icon-circle {
|
|
766
|
+
width: 3.5rem;
|
|
767
|
+
height: 3.5rem;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
.callout--large.callout-has-icon>.callout-icon svg {
|
|
771
|
+
width: 1.75rem;
|
|
772
|
+
height: 1.75rem;
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
/* Filled style - light icon background */
|
|
776
|
+
.callout--filled.callout-has-icon>.callout-icon,
|
|
777
|
+
.callout[data-callout-style="filled"].callout-has-icon>.callout-icon {
|
|
778
|
+
background-color: rgba(255, 255, 255, 0.2);
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
.callout--filled.callout-has-icon>.callout-icon svg,
|
|
782
|
+
.callout[data-callout-style="filled"].callout-has-icon>.callout-icon svg {
|
|
783
|
+
color: var(--color-white);
|
|
784
|
+
filter: brightness(0) invert(1);
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
/* Card style icon adjustments (centered) */
|
|
788
|
+
.callout--card.callout-with-icon,
|
|
789
|
+
.callout[data-callout-style="card"].callout-with-icon {
|
|
790
|
+
padding-left: var(--space-6);
|
|
791
|
+
padding-top: calc(var(--space-6) + 3.5rem);
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
.callout--card.callout-with-icon::before,
|
|
795
|
+
.callout[data-callout-style="card"].callout-with-icon::before {
|
|
796
|
+
left: 50%;
|
|
797
|
+
top: var(--space-5);
|
|
798
|
+
transform: translateX(-50%) translateY(0);
|
|
799
|
+
width: 2.75rem;
|
|
800
|
+
height: 2.75rem;
|
|
801
|
+
background-size: 1.5rem 1.5rem;
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
/* ============================================================================
|
|
805
|
+
CALLOUT WITH TITLE - Structured header and body
|
|
806
|
+
============================================================================
|
|
807
|
+
|
|
808
|
+
Usage:
|
|
809
|
+
<div class="callout callout--info callout-with-title">
|
|
810
|
+
<div class="callout-header">
|
|
811
|
+
<svg class="callout-icon">...</svg>
|
|
812
|
+
<h4 class="callout-title">Important Note</h4>
|
|
813
|
+
</div>
|
|
814
|
+
<div class="callout-body">
|
|
815
|
+
Detailed message content here.
|
|
816
|
+
</div>
|
|
817
|
+
</div>
|
|
818
|
+
============================================================================ */
|
|
819
|
+
|
|
820
|
+
.callout-with-title {
|
|
821
|
+
padding: 0;
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
.callout-with-title .callout-header {
|
|
825
|
+
display: flex;
|
|
826
|
+
align-items: center;
|
|
827
|
+
gap: var(--space-3);
|
|
828
|
+
padding: var(--space-4) var(--space-5);
|
|
829
|
+
background: linear-gradient(135deg,
|
|
830
|
+
rgba(0, 0, 0, 0.02) 0%,
|
|
831
|
+
transparent 100%);
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
/* Optional: Add border between header and body */
|
|
835
|
+
.callout-with-title .callout-header-bordered {
|
|
836
|
+
border-bottom: 1px solid color-mix(in srgb, var(--callout-accent) 10%, transparent);
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
.callout-with-title .callout-icon {
|
|
840
|
+
width: 1.5rem;
|
|
841
|
+
height: 1.5rem;
|
|
842
|
+
flex-shrink: 0;
|
|
843
|
+
color: var(--callout-accent);
|
|
844
|
+
background-color: var(--callout-icon-bg);
|
|
845
|
+
padding: 0.375rem;
|
|
846
|
+
border-radius: 50%;
|
|
847
|
+
box-sizing: content-box;
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
.callout-with-title .callout-title {
|
|
851
|
+
margin: 0;
|
|
852
|
+
font-size: var(--font-size-base);
|
|
853
|
+
font-weight: var(--font-weight-semibold);
|
|
854
|
+
color: var(--callout-heading);
|
|
855
|
+
letter-spacing: -0.01em;
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
.callout-with-title .callout-body {
|
|
859
|
+
padding: var(--space-4) var(--space-5);
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
.callout-with-title .callout-body p:last-child {
|
|
863
|
+
margin-bottom: 0;
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
/* ============================================================================
|
|
867
|
+
DISMISSIBLE CALLOUTS
|
|
868
|
+
============================================================================
|
|
869
|
+
|
|
870
|
+
Usage:
|
|
871
|
+
<div class="callout callout--info callout--dismissible">
|
|
872
|
+
<button class="callout-close" aria-label="Dismiss">×</button>
|
|
873
|
+
<p>This callout can be dismissed.</p>
|
|
874
|
+
</div>
|
|
875
|
+
============================================================================ */
|
|
876
|
+
|
|
877
|
+
.callout--dismissible {
|
|
878
|
+
padding-right: calc(var(--space-4) + 2.5rem);
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
.callout-close {
|
|
882
|
+
position: absolute;
|
|
883
|
+
top: var(--space-3);
|
|
884
|
+
right: var(--space-3);
|
|
885
|
+
width: 1.75rem;
|
|
886
|
+
height: 1.75rem;
|
|
887
|
+
display: flex;
|
|
888
|
+
align-items: center;
|
|
889
|
+
justify-content: center;
|
|
890
|
+
background: transparent;
|
|
891
|
+
border: none;
|
|
892
|
+
border-radius: var(--radius-md);
|
|
893
|
+
font-size: 1.25rem;
|
|
894
|
+
line-height: 1;
|
|
895
|
+
color: var(--callout-accent);
|
|
896
|
+
opacity: 0.7;
|
|
897
|
+
cursor: pointer;
|
|
898
|
+
transition: opacity var(--transition-fast), background-color var(--transition-fast);
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
.callout-close:hover {
|
|
902
|
+
opacity: 1;
|
|
903
|
+
background-color: rgba(0, 0, 0, 0.05);
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
.callout-close:focus-visible {
|
|
907
|
+
outline: var(--focus-ring-width) solid var(--focus-ring-color);
|
|
908
|
+
outline-offset: var(--focus-ring-offset);
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
/* Filled style close button (white) */
|
|
912
|
+
.callout--filled .callout-close,
|
|
913
|
+
.callout[data-callout-style="filled"] .callout-close {
|
|
914
|
+
color: var(--color-white);
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
.callout--filled .callout-close:hover,
|
|
918
|
+
.callout[data-callout-style="filled"] .callout-close:hover {
|
|
919
|
+
background-color: rgba(255, 255, 255, 0.2);
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
/* ============================================================================
|
|
923
|
+
ALERT COMPONENT - Dismissible variant of callouts
|
|
924
|
+
============================================================================ */
|
|
925
|
+
|
|
926
|
+
.alert {
|
|
927
|
+
position: relative;
|
|
928
|
+
padding: var(--space-4) var(--space-8) var(--space-4) var(--space-4);
|
|
929
|
+
margin-bottom: var(--space-4);
|
|
930
|
+
border: 1px solid transparent;
|
|
931
|
+
border-radius: var(--radius-lg);
|
|
932
|
+
border-left-width: 4px;
|
|
933
|
+
box-shadow: var(--shadow-sm);
|
|
934
|
+
overflow: hidden;
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
.alert p {
|
|
938
|
+
margin: 0;
|
|
939
|
+
line-height: var(--line-height-normal);
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
.alert-info {
|
|
943
|
+
color: var(--color-info-text);
|
|
944
|
+
background-color: var(--color-info-light);
|
|
945
|
+
border-color: var(--color-info);
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
.alert-success {
|
|
949
|
+
color: var(--color-success-text);
|
|
950
|
+
background-color: var(--color-success-light);
|
|
951
|
+
border-color: var(--color-success);
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
.alert-warning {
|
|
955
|
+
color: var(--color-warning-text);
|
|
956
|
+
background-color: var(--color-warning-light);
|
|
957
|
+
border-color: var(--color-warning);
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
.alert-danger {
|
|
961
|
+
color: var(--color-danger-text);
|
|
962
|
+
background-color: var(--color-danger-light);
|
|
963
|
+
border-color: var(--color-danger);
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
.alert-close {
|
|
967
|
+
position: absolute;
|
|
968
|
+
top: 50%;
|
|
969
|
+
right: var(--space-4);
|
|
970
|
+
transform: translateY(-50%);
|
|
971
|
+
background: transparent;
|
|
972
|
+
border: none;
|
|
973
|
+
font-size: 1.5rem;
|
|
974
|
+
font-weight: bold;
|
|
975
|
+
line-height: 1;
|
|
976
|
+
color: inherit;
|
|
977
|
+
opacity: 0.7;
|
|
978
|
+
cursor: pointer;
|
|
979
|
+
padding: 0 var(--space-2);
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
.alert-close:hover {
|
|
983
|
+
opacity: 1;
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
/* ============================================================================
|
|
987
|
+
CALLOUT - Modern, structured context panel system
|
|
988
|
+
============================================================================
|
|
989
|
+
|
|
990
|
+
PURPOSE:
|
|
991
|
+
- Cleaner default ("tonal") callouts for high-frequency usage
|
|
992
|
+
- Consistent content slots: icon, title, body, meta, actions
|
|
993
|
+
- Explicit severity + density modifiers
|
|
994
|
+
|
|
995
|
+
USAGE:
|
|
996
|
+
<aside class="callout callout--warning">
|
|
997
|
+
<span class="callout__icon">⚠</span>
|
|
998
|
+
<h4 class="callout__title">Heads up</h4>
|
|
999
|
+
<div class="callout__body"><p>Message text.</p></div>
|
|
1000
|
+
<div class="callout__actions"><button class="btn btn-sm btn-outline-secondary">Action</button></div>
|
|
1001
|
+
</aside>
|
|
1002
|
+
|
|
1003
|
+
MODIFIERS:
|
|
1004
|
+
- Severity: callout--neutral|info|success|warning|danger
|
|
1005
|
+
- Density: callout--compact|spacious
|
|
1006
|
+
- Style: callout--filled
|
|
1007
|
+
- Behavior: callout--actionable|dismissible
|
|
1008
|
+
============================================================================ */
|
|
1009
|
+
|
|
1010
|
+
.callout {
|
|
1011
|
+
--callout-accent: var(--color-info);
|
|
1012
|
+
--callout-bg: var(--color-info-light);
|
|
1013
|
+
--callout-border: color-mix(in srgb, var(--callout-accent) 16%, transparent);
|
|
1014
|
+
--callout-title: var(--color-info-text);
|
|
1015
|
+
--callout-text: var(--text-body);
|
|
1016
|
+
--callout-link: var(--callout-title);
|
|
1017
|
+
--callout-fill: var(--color-info);
|
|
1018
|
+
--callout-on-fill: var(--color-white);
|
|
1019
|
+
|
|
1020
|
+
position: relative;
|
|
1021
|
+
display: grid;
|
|
1022
|
+
grid-template-columns: auto 1fr;
|
|
1023
|
+
column-gap: var(--space-3);
|
|
1024
|
+
row-gap: var(--space-2);
|
|
1025
|
+
align-items: start;
|
|
1026
|
+
padding: var(--space-4) var(--space-5);
|
|
1027
|
+
border: var(--border-width-thin) solid var(--callout-border);
|
|
1028
|
+
border-radius: var(--radius-xl);
|
|
1029
|
+
background: color-mix(in srgb, var(--callout-bg) 28%, var(--bg-surface));
|
|
1030
|
+
color: var(--callout-text);
|
|
1031
|
+
box-shadow: var(--shadow-xs);
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
/* Accent rail for quick scanability in dense content */
|
|
1035
|
+
.callout::before {
|
|
1036
|
+
content: '';
|
|
1037
|
+
position: absolute;
|
|
1038
|
+
top: 0;
|
|
1039
|
+
bottom: 0;
|
|
1040
|
+
left: 0;
|
|
1041
|
+
width: var(--border-width-thick);
|
|
1042
|
+
border-radius: var(--radius-xl) 0 0 var(--radius-xl);
|
|
1043
|
+
background: var(--callout-accent);
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
/* No icon: collapse to single-column layout */
|
|
1047
|
+
.callout:not(:has(.callout__icon)) {
|
|
1048
|
+
grid-template-columns: 1fr;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
.callout__title,
|
|
1052
|
+
.callout__body,
|
|
1053
|
+
.callout__meta,
|
|
1054
|
+
.callout__actions {
|
|
1055
|
+
grid-column: 2;
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
.callout:not(:has(.callout__icon)) .callout__title,
|
|
1059
|
+
.callout:not(:has(.callout__icon)) .callout__body,
|
|
1060
|
+
.callout:not(:has(.callout__icon)) .callout__meta,
|
|
1061
|
+
.callout:not(:has(.callout__icon)) .callout__actions {
|
|
1062
|
+
grid-column: 1;
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
.callout__icon {
|
|
1066
|
+
display: inline-flex;
|
|
1067
|
+
align-items: center;
|
|
1068
|
+
justify-content: center;
|
|
1069
|
+
width: 1.25rem;
|
|
1070
|
+
height: 1.25rem;
|
|
1071
|
+
margin-top: 0.1rem;
|
|
1072
|
+
color: var(--callout-title);
|
|
1073
|
+
font-size: 1rem;
|
|
1074
|
+
font-weight: var(--font-weight-semibold);
|
|
1075
|
+
line-height: 1;
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
.callout__title {
|
|
1079
|
+
margin: 0;
|
|
1080
|
+
justify-self: start;
|
|
1081
|
+
text-align: left;
|
|
1082
|
+
color: var(--callout-title);
|
|
1083
|
+
font-size: var(--font-size-sm);
|
|
1084
|
+
font-weight: var(--font-weight-semibold);
|
|
1085
|
+
line-height: var(--line-height-snug);
|
|
1086
|
+
letter-spacing: 0.01em;
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
.callout__body {
|
|
1090
|
+
color: var(--callout-text);
|
|
1091
|
+
font-size: var(--font-size-base);
|
|
1092
|
+
line-height: var(--line-height-relaxed);
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
.callout__body p {
|
|
1096
|
+
margin: 0;
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
.callout__body p + p {
|
|
1100
|
+
margin-top: var(--space-2);
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
.callout__meta {
|
|
1104
|
+
color: var(--text-muted);
|
|
1105
|
+
font-size: var(--font-size-xs);
|
|
1106
|
+
font-weight: var(--font-weight-medium);
|
|
1107
|
+
letter-spacing: 0.02em;
|
|
1108
|
+
text-transform: uppercase;
|
|
1109
|
+
line-height: var(--line-height-normal);
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
.callout__actions {
|
|
1113
|
+
display: flex;
|
|
1114
|
+
flex-wrap: wrap;
|
|
1115
|
+
align-items: center;
|
|
1116
|
+
gap: var(--space-2);
|
|
1117
|
+
margin-top: var(--space-1);
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
.callout a {
|
|
1121
|
+
color: var(--callout-link);
|
|
1122
|
+
text-decoration: underline;
|
|
1123
|
+
text-underline-offset: 2px;
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
.callout a:hover {
|
|
1127
|
+
text-decoration-thickness: 2px;
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
/* Severity modifiers */
|
|
1131
|
+
.callout--neutral {
|
|
1132
|
+
--callout-accent: var(--text-secondary);
|
|
1133
|
+
--callout-bg: var(--bg-subtle);
|
|
1134
|
+
--callout-border: color-mix(in srgb, var(--text-secondary) 34%, transparent);
|
|
1135
|
+
--callout-title: var(--text-primary);
|
|
1136
|
+
--callout-link: var(--color-primary);
|
|
1137
|
+
--callout-fill: var(--color-gray-700);
|
|
1138
|
+
--callout-on-fill: var(--color-white);
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
.callout--info {
|
|
1142
|
+
--callout-accent: var(--color-info);
|
|
1143
|
+
--callout-bg: var(--color-info-light);
|
|
1144
|
+
--callout-border: color-mix(in srgb, var(--color-info) 18%, transparent);
|
|
1145
|
+
--callout-title: var(--color-info-text);
|
|
1146
|
+
--callout-link: var(--color-info-text);
|
|
1147
|
+
--callout-fill: var(--color-info);
|
|
1148
|
+
--callout-on-fill: var(--color-white);
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
.callout--success {
|
|
1152
|
+
--callout-accent: var(--color-success);
|
|
1153
|
+
--callout-bg: var(--color-success-light);
|
|
1154
|
+
--callout-border: color-mix(in srgb, var(--color-success) 18%, transparent);
|
|
1155
|
+
--callout-title: var(--color-success-text);
|
|
1156
|
+
--callout-link: var(--color-success-text);
|
|
1157
|
+
--callout-fill: var(--color-success);
|
|
1158
|
+
--callout-on-fill: var(--color-white);
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
.callout--warning {
|
|
1162
|
+
--callout-accent: var(--color-warning-text);
|
|
1163
|
+
--callout-bg: var(--color-warning-light);
|
|
1164
|
+
--callout-border: color-mix(in srgb, var(--color-warning) 24%, transparent);
|
|
1165
|
+
--callout-title: var(--color-warning-text);
|
|
1166
|
+
--callout-link: var(--color-warning-text);
|
|
1167
|
+
--callout-fill: var(--color-warning);
|
|
1168
|
+
--callout-on-fill: var(--color-on-warning);
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
.callout--danger {
|
|
1172
|
+
--callout-accent: var(--color-danger-text);
|
|
1173
|
+
--callout-bg: var(--color-danger-light);
|
|
1174
|
+
--callout-border: color-mix(in srgb, var(--color-danger) 22%, transparent);
|
|
1175
|
+
--callout-title: var(--color-danger-text);
|
|
1176
|
+
--callout-link: var(--color-danger-text);
|
|
1177
|
+
--callout-fill: var(--color-danger);
|
|
1178
|
+
--callout-on-fill: var(--color-on-danger);
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
/* Density modifiers */
|
|
1182
|
+
.callout--compact {
|
|
1183
|
+
padding: var(--space-3) var(--space-4);
|
|
1184
|
+
column-gap: var(--space-2);
|
|
1185
|
+
row-gap: var(--space-1);
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
.callout--compact .callout__title {
|
|
1189
|
+
font-size: var(--font-size-xs);
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
.callout--compact .callout__body {
|
|
1193
|
+
font-size: var(--font-size-sm);
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
.callout--spacious {
|
|
1197
|
+
padding: var(--space-5) var(--space-6);
|
|
1198
|
+
column-gap: var(--space-4);
|
|
1199
|
+
row-gap: var(--space-2);
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
/* Filled variant for high urgency only */
|
|
1203
|
+
.callout--filled {
|
|
1204
|
+
background: var(--callout-fill);
|
|
1205
|
+
color: var(--callout-on-fill);
|
|
1206
|
+
border-color: transparent;
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
.callout--filled::before {
|
|
1210
|
+
display: none;
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
.callout--filled .callout__title,
|
|
1214
|
+
.callout--filled .callout__icon,
|
|
1215
|
+
.callout--filled .callout__body,
|
|
1216
|
+
.callout--filled .callout__meta,
|
|
1217
|
+
.callout--filled a {
|
|
1218
|
+
color: var(--callout-on-fill);
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
/* Optional interactive state */
|
|
1222
|
+
.callout--actionable {
|
|
1223
|
+
cursor: pointer;
|
|
1224
|
+
transition: border-color var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-interactive), transform var(--transition-interactive);
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
.callout--actionable:hover {
|
|
1228
|
+
border-color: color-mix(in srgb, var(--callout-accent) 38%, transparent);
|
|
1229
|
+
box-shadow: var(--shadow-sm);
|
|
1230
|
+
transform: translateY(var(--motion-lift-sm));
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
.callout--actionable:active {
|
|
1234
|
+
transform: translateY(0) scale(var(--motion-press-scale));
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
.callout--actionable:focus-within {
|
|
1238
|
+
outline: var(--focus-ring-width) solid var(--focus-ring-color);
|
|
1239
|
+
outline-offset: var(--focus-ring-offset);
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
/* Dismissible variant */
|
|
1243
|
+
.callout--dismissible {
|
|
1244
|
+
padding-right: calc(var(--space-6) + 2rem);
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
.callout__dismiss {
|
|
1248
|
+
position: absolute;
|
|
1249
|
+
top: var(--space-2);
|
|
1250
|
+
right: var(--space-2);
|
|
1251
|
+
width: 2rem;
|
|
1252
|
+
height: 2rem;
|
|
1253
|
+
display: inline-flex;
|
|
1254
|
+
font-size: 1rem;
|
|
1255
|
+
align-items: center;
|
|
1256
|
+
justify-content: center;
|
|
1257
|
+
border: none;
|
|
1258
|
+
border-radius: var(--radius-md);
|
|
1259
|
+
background: transparent;
|
|
1260
|
+
color: currentColor;
|
|
1261
|
+
opacity: 0.7;
|
|
1262
|
+
cursor: pointer;
|
|
1263
|
+
transition: opacity var(--transition-fast), background-color var(--transition-fast);
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
.callout__dismiss:hover {
|
|
1267
|
+
opacity: 1;
|
|
1268
|
+
background: color-mix(in srgb, currentColor 10%, transparent);
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
.callout__dismiss:focus-visible {
|
|
1272
|
+
outline: var(--focus-ring-width) solid var(--focus-ring-color);
|
|
1273
|
+
outline-offset: var(--focus-ring-offset);
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1276
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1277
|
+
.callout--actionable {
|
|
1278
|
+
transition: none;
|
|
1279
|
+
}
|
|
1280
|
+
}
|