@fairgarden/design 0.1.0-alpha.1 → 0.1.0-alpha.2
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 +51 -27
- package/actions/button/Button.d.ts.map +1 -1
- package/actions/button/Button.js +13 -1
- package/actions/button/Button.js.map +1 -1
- package/actions/button/button.module.css +85 -25
- package/actions/chip/Chip.d.ts +2 -2
- package/actions/chip/Chip.js +2 -2
- package/actions/chip/chip.module.css +12 -18
- package/actions/link/Link.d.ts +1 -1
- package/actions/link/link.module.css +22 -19
- package/actions/toggle/Toggle.js +1 -1
- package/actions/toggle/toggle.module.css +27 -23
- package/content/card/card.module.css +27 -27
- package/content/card-grid/CardGrid.js +1 -1
- package/content/card-grid/card-grid.module.css +3 -3
- package/content/carousel/Carousel.d.ts.map +1 -1
- package/content/carousel/Carousel.js +1 -4
- package/content/carousel/Carousel.js.map +1 -1
- package/content/carousel/carousel.module.css +19 -9
- package/content/code-block/CodeActionsMenu.d.ts +34 -0
- package/content/code-block/CodeActionsMenu.d.ts.map +1 -0
- package/content/code-block/CodeActionsMenu.js +102 -0
- package/content/code-block/CodeActionsMenu.js.map +1 -0
- package/content/code-block/CodeBlock.d.ts +37 -0
- package/content/code-block/CodeBlock.d.ts.map +1 -0
- package/content/code-block/CodeBlock.js +30 -0
- package/content/code-block/CodeBlock.js.map +1 -0
- package/content/code-block/CodeBlockFrame.d.ts +54 -0
- package/content/code-block/CodeBlockFrame.d.ts.map +1 -0
- package/content/code-block/CodeBlockFrame.js +80 -0
- package/content/code-block/CodeBlockFrame.js.map +1 -0
- package/content/code-block/CodeBlockHeader.d.ts +26 -0
- package/content/code-block/CodeBlockHeader.d.ts.map +1 -0
- package/content/code-block/CodeBlockHeader.js +16 -0
- package/content/code-block/CodeBlockHeader.js.map +1 -0
- package/content/code-block/CodeBlockLazy.d.ts +11 -0
- package/content/code-block/CodeBlockLazy.d.ts.map +1 -0
- package/content/code-block/CodeBlockLazy.js +14 -0
- package/content/code-block/CodeBlockLazy.js.map +1 -0
- package/content/code-block/CodeBlockLoading.d.ts +31 -0
- package/content/code-block/CodeBlockLoading.d.ts.map +1 -0
- package/content/code-block/CodeBlockLoading.js +90 -0
- package/content/code-block/CodeBlockLoading.js.map +1 -0
- package/content/code-block/CodeBlockSection.d.ts +40 -0
- package/content/code-block/CodeBlockSection.d.ts.map +1 -0
- package/content/code-block/CodeBlockSection.js +105 -0
- package/content/code-block/CodeBlockSection.js.map +1 -0
- package/content/code-block/CodeBlockToasts.d.ts +26 -0
- package/content/code-block/CodeBlockToasts.d.ts.map +1 -0
- package/content/code-block/CodeBlockToasts.js +88 -0
- package/content/code-block/CodeBlockToasts.js.map +1 -0
- package/content/code-block/code-block.module.css +949 -0
- package/content/code-block/index.d.ts +4 -0
- package/content/code-block/index.d.ts.map +1 -0
- package/content/code-block/index.js +4 -0
- package/content/code-block/index.js.map +1 -0
- package/content/demo/DemoContent.d.ts +32 -0
- package/content/demo/DemoContent.d.ts.map +1 -0
- package/content/demo/DemoContent.js +87 -0
- package/content/demo/DemoContent.js.map +1 -0
- package/content/demo/DemoFrame.d.ts +6 -0
- package/content/demo/DemoFrame.d.ts.map +1 -0
- package/content/demo/DemoFrame.js +17 -0
- package/content/demo/DemoFrame.js.map +1 -0
- package/content/demo/DemoLazy.d.ts +11 -0
- package/content/demo/DemoLazy.d.ts.map +1 -0
- package/content/demo/DemoLazy.js +14 -0
- package/content/demo/DemoLazy.js.map +1 -0
- package/content/demo/DemoLoading.d.ts +23 -0
- package/content/demo/DemoLoading.d.ts.map +1 -0
- package/content/demo/DemoLoading.js +26 -0
- package/content/demo/DemoLoading.js.map +1 -0
- package/content/demo/demo.module.css +163 -0
- package/content/demo/index.d.ts +4 -0
- package/content/demo/index.d.ts.map +1 -0
- package/content/demo/index.js +4 -0
- package/content/demo/index.js.map +1 -0
- package/content/empty-state/EmptyState.d.ts +1 -1
- package/content/empty-state/EmptyState.js +1 -1
- package/content/empty-state/empty-state.module.css +11 -11
- package/content/feature-grid/feature-grid.module.css +22 -22
- package/content/index-rows/IndexRows.d.ts +2 -2
- package/content/index-rows/IndexRows.d.ts.map +1 -1
- package/content/index-rows/IndexRows.js +1 -1
- package/content/index-rows/index-rows.module.css +29 -29
- package/content/pricing/Pricing.d.ts +4 -4
- package/content/pricing/Pricing.d.ts.map +1 -1
- package/content/pricing/Pricing.js +4 -4
- package/content/pricing/Pricing.js.map +1 -1
- package/content/pricing/pricing.module.css +22 -22
- package/content/profile/Profile.d.ts +1 -1
- package/content/profile/Profile.js +2 -2
- package/content/profile/profile.module.css +13 -13
- package/content/quote/Quote.d.ts +1 -1
- package/content/quote/quote.module.css +9 -9
- package/content/timeline/Timeline.d.ts +1 -1
- package/content/timeline/Timeline.d.ts.map +1 -1
- package/content/timeline/Timeline.js +5 -5
- package/content/timeline/Timeline.js.map +1 -1
- package/content/timeline/timeline.module.css +12 -12
- package/content/types-table/TypePre.d.ts +11 -0
- package/content/types-table/TypePre.d.ts.map +1 -0
- package/content/types-table/TypePre.js +13 -0
- package/content/types-table/TypePre.js.map +1 -0
- package/content/types-table/TypesTable.d.ts +22 -0
- package/content/types-table/TypesTable.d.ts.map +1 -0
- package/content/types-table/TypesTable.js +124 -0
- package/content/types-table/TypesTable.js.map +1 -0
- package/content/types-table/index.d.ts +3 -0
- package/content/types-table/index.d.ts.map +1 -0
- package/content/types-table/index.js +3 -0
- package/content/types-table/index.js.map +1 -0
- package/content/types-table/types-table.module.css +160 -0
- package/data/chart/Chart.d.ts +8 -1
- package/data/chart/Chart.d.ts.map +1 -1
- package/data/chart/Chart.js +28 -15
- package/data/chart/Chart.js.map +1 -1
- package/data/chart/chart.module.css +20 -6
- package/data/figure/Figure.d.ts +1 -1
- package/data/figure/Figure.js +1 -1
- package/data/figure/figure.module.css +7 -7
- package/data/map/Map.d.ts +3 -3
- package/data/map/Map.d.ts.map +1 -1
- package/data/map/Map.js +10 -8
- package/data/map/Map.js.map +1 -1
- package/data/map/MapCanvas.d.ts.map +1 -1
- package/data/map/MapCanvas.js +5 -9
- package/data/map/MapCanvas.js.map +1 -1
- package/data/map/map.module.css +39 -14
- package/data/map/mapStyle.d.ts +2 -2
- package/data/map/mapStyle.d.ts.map +1 -1
- package/data/map/mapStyle.js +5 -5
- package/data/map/mapStyle.js.map +1 -1
- package/data/scroll-area/ScrollArea.d.ts.map +1 -1
- package/data/scroll-area/ScrollArea.js +8 -4
- package/data/scroll-area/ScrollArea.js.map +1 -1
- package/data/scroll-area/scroll-area.module.css +28 -9
- package/data/spec-grid/spec-grid.module.css +8 -8
- package/data/spec-list/spec-list.module.css +3 -3
- package/data/spec-sheet/SpecSheet.d.ts +2 -2
- package/data/spec-sheet/SpecSheet.js +1 -1
- package/data/spec-sheet/spec-sheet.module.css +9 -9
- package/data/stat/Stat.d.ts +1 -1
- package/data/stat/Stat.d.ts.map +1 -1
- package/data/stat/stat.module.css +4 -4
- package/data/table/Table.d.ts +6 -5
- package/data/table/Table.d.ts.map +1 -1
- package/data/table/Table.js.map +1 -1
- package/data/table/table.module.css +43 -46
- package/disclosure/accordion/Accordion.d.ts +1 -1
- package/disclosure/accordion/Accordion.js +1 -1
- package/disclosure/accordion/accordion.module.css +12 -12
- package/disclosure/collapsible/Collapsible.d.ts +4 -4
- package/disclosure/collapsible/Collapsible.js +4 -4
- package/disclosure/collapsible/collapsible.module.css +10 -10
- package/disclosure/faq/FAQ.d.ts +3 -3
- package/disclosure/faq/FAQ.d.ts.map +1 -1
- package/disclosure/faq/FAQ.js +3 -3
- package/disclosure/faq/FAQ.js.map +1 -1
- package/disclosure/faq/faq.module.css +20 -20
- package/feedback/alert/alert.module.css +4 -4
- package/feedback/avatar/avatar-group.module.css +2 -2
- package/feedback/avatar/avatar.module.css +9 -9
- package/feedback/badge/Badge.d.ts +1 -1
- package/feedback/badge/badge.module.css +7 -7
- package/feedback/meter/Meter.d.ts +2 -2
- package/feedback/meter/meter.module.css +14 -14
- package/feedback/progress/Progress.d.ts +1 -1
- package/feedback/progress/progress.module.css +7 -7
- package/feedback/tag/tag.module.css +7 -7
- package/feedback/toast/Toast.d.ts +3 -3
- package/feedback/toast/Toast.d.ts.map +1 -1
- package/feedback/toast/Toast.js +17 -7
- package/feedback/toast/Toast.js.map +1 -1
- package/feedback/toast/toast.module.css +31 -20
- package/forms/autocomplete/Autocomplete.d.ts +11 -0
- package/forms/autocomplete/Autocomplete.d.ts.map +1 -1
- package/forms/autocomplete/Autocomplete.js +27 -6
- package/forms/autocomplete/Autocomplete.js.map +1 -1
- package/forms/autocomplete/autocomplete.module.css +35 -41
- package/forms/checkbox/Checkbox.js +1 -1
- package/forms/checkbox/checkbox.module.css +29 -25
- package/forms/checkbox-group/checkbox-group.module.css +4 -4
- package/forms/combobox/Combobox.d.ts +10 -0
- package/forms/combobox/Combobox.d.ts.map +1 -1
- package/forms/combobox/Combobox.js +28 -7
- package/forms/combobox/Combobox.js.map +1 -1
- package/forms/combobox/combobox.module.css +34 -41
- package/forms/field/field.module.css +1 -1
- package/forms/fieldset/Fieldset.d.ts +1 -1
- package/forms/fieldset/Fieldset.js +2 -2
- package/forms/fieldset/fieldset.module.css +14 -14
- package/forms/form/form.module.css +2 -2
- package/forms/input/Input.d.ts +10 -3
- package/forms/input/Input.d.ts.map +1 -1
- package/forms/input/Input.js +10 -4
- package/forms/input/Input.js.map +1 -1
- package/forms/input/input.module.css +38 -21
- package/forms/number-field/number-field.module.css +24 -23
- package/forms/radio/Radio.d.ts +1 -1
- package/forms/radio/Radio.d.ts.map +1 -1
- package/forms/radio/Radio.js +5 -3
- package/forms/radio/Radio.js.map +1 -1
- package/forms/radio/radio.module.css +38 -30
- package/forms/radio-group/RadioGroup.d.ts +1 -1
- package/forms/radio-group/radio-group.module.css +3 -3
- package/forms/search/Search.d.ts +10 -0
- package/forms/search/Search.d.ts.map +1 -1
- package/forms/search/Search.js +25 -6
- package/forms/search/Search.js.map +1 -1
- package/forms/search/search.module.css +25 -33
- package/forms/select/Select.d.ts +10 -2
- package/forms/select/Select.d.ts.map +1 -1
- package/forms/select/Select.js +27 -12
- package/forms/select/Select.js.map +1 -1
- package/forms/select/select.module.css +42 -48
- package/forms/slider/Slider.js +2 -2
- package/forms/slider/slider.module.css +23 -23
- package/forms/switch/Switch.js +1 -1
- package/forms/switch/switch.module.css +23 -19
- package/foundations/expanding-box/ExpandingBox.d.ts +86 -0
- package/foundations/expanding-box/ExpandingBox.d.ts.map +1 -0
- package/foundations/expanding-box/ExpandingBox.js +179 -0
- package/foundations/expanding-box/ExpandingBox.js.map +1 -0
- package/foundations/expanding-box/expanding-box.module.css +415 -0
- package/foundations/expanding-box/index.d.ts +3 -0
- package/foundations/expanding-box/index.d.ts.map +1 -0
- package/foundations/expanding-box/index.js +3 -0
- package/foundations/expanding-box/index.js.map +1 -0
- package/foundations/expanding-box/startExpandingTransition.d.ts +33 -0
- package/foundations/expanding-box/startExpandingTransition.d.ts.map +1 -0
- package/foundations/expanding-box/startExpandingTransition.js +82 -0
- package/foundations/expanding-box/startExpandingTransition.js.map +1 -0
- package/foundations/ground/Ground.d.ts +1 -1
- package/foundations/ground/ground.module.css +4 -4
- package/foundations/icon/Icon.d.ts +1 -1
- package/foundations/icon/Icon.js +1 -1
- package/foundations/icon/icon.module.css +1 -1
- package/foundations/outline-morph/OutlineMorph.d.ts +112 -0
- package/foundations/outline-morph/OutlineMorph.d.ts.map +1 -0
- package/foundations/outline-morph/OutlineMorph.js +83 -0
- package/foundations/outline-morph/OutlineMorph.js.map +1 -0
- package/foundations/outline-morph/index.d.ts +3 -0
- package/foundations/outline-morph/index.d.ts.map +1 -0
- package/foundations/outline-morph/index.js +3 -0
- package/foundations/outline-morph/index.js.map +1 -0
- package/foundations/outline-morph/morphEngine.d.ts +219 -0
- package/foundations/outline-morph/morphEngine.d.ts.map +1 -0
- package/foundations/outline-morph/morphEngine.js +1331 -0
- package/foundations/outline-morph/morphEngine.js.map +1 -0
- package/foundations/outline-morph/outline-morph.module.css +113 -0
- package/foundations/outline-morph/useOutlineMorphRoot.d.ts +50 -0
- package/foundations/outline-morph/useOutlineMorphRoot.d.ts.map +1 -0
- package/foundations/outline-morph/useOutlineMorphRoot.js +55 -0
- package/foundations/outline-morph/useOutlineMorphRoot.js.map +1 -0
- package/foundations/separator/separator.module.css +10 -10
- package/foundations/sticker/Sticker.d.ts +4 -4
- package/foundations/sticker/Sticker.d.ts.map +1 -1
- package/foundations/sticker/Sticker.js +3 -3
- package/foundations/sticker/sticker.module.css +10 -10
- package/icons/paths.d.ts +1 -1
- package/icons/paths.d.ts.map +1 -1
- package/icons/paths.js +50 -0
- package/icons/paths.js.map +1 -1
- package/navigation/breadcrumb/Breadcrumb.d.ts +7 -1
- package/navigation/breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/navigation/breadcrumb/Breadcrumb.js +8 -8
- package/navigation/breadcrumb/Breadcrumb.js.map +1 -1
- package/navigation/breadcrumb/breadcrumb.module.css +14 -14
- package/navigation/file-tabs/FileTabs.d.ts +169 -0
- package/navigation/file-tabs/FileTabs.d.ts.map +1 -0
- package/navigation/file-tabs/FileTabs.js +253 -0
- package/navigation/file-tabs/FileTabs.js.map +1 -0
- package/navigation/file-tabs/file-tabs.module.css +868 -0
- package/navigation/file-tabs/index.d.ts +2 -0
- package/navigation/file-tabs/index.d.ts.map +1 -0
- package/navigation/file-tabs/index.js +2 -0
- package/navigation/file-tabs/index.js.map +1 -0
- package/navigation/nav-drawer/NavDrawer.d.ts +32 -6
- package/navigation/nav-drawer/NavDrawer.d.ts.map +1 -1
- package/navigation/nav-drawer/NavDrawer.js +94 -28
- package/navigation/nav-drawer/NavDrawer.js.map +1 -1
- package/navigation/nav-drawer/nav-drawer.module.css +78 -55
- package/navigation/navigation-bar/NavigationBar.d.ts +31 -11
- package/navigation/navigation-bar/NavigationBar.d.ts.map +1 -1
- package/navigation/navigation-bar/NavigationBar.js +40 -17
- package/navigation/navigation-bar/NavigationBar.js.map +1 -1
- package/navigation/navigation-bar/navigation-bar.module.css +58 -27
- package/navigation/navigation-menu/NavigationMenu.d.ts +9 -9
- package/navigation/navigation-menu/NavigationMenu.d.ts.map +1 -1
- package/navigation/navigation-menu/NavigationMenu.js +15 -15
- package/navigation/navigation-menu/navigation-menu.module.css +39 -53
- package/navigation/pagination/Pagination.js +1 -1
- package/navigation/pagination/pagination.module.css +24 -24
- package/navigation/sidebar-nav/SidebarNav.d.ts +71 -0
- package/navigation/sidebar-nav/SidebarNav.d.ts.map +1 -0
- package/navigation/sidebar-nav/SidebarNav.js +169 -0
- package/navigation/sidebar-nav/SidebarNav.js.map +1 -0
- package/navigation/sidebar-nav/index.d.ts +2 -0
- package/navigation/sidebar-nav/index.d.ts.map +1 -0
- package/navigation/sidebar-nav/index.js +2 -0
- package/navigation/sidebar-nav/index.js.map +1 -0
- package/navigation/sidebar-nav/sidebar-nav.module.css +270 -0
- package/navigation/table-of-contents/TableOfContents.d.ts +92 -0
- package/navigation/table-of-contents/TableOfContents.d.ts.map +1 -0
- package/navigation/table-of-contents/TableOfContents.js +211 -0
- package/navigation/table-of-contents/TableOfContents.js.map +1 -0
- package/navigation/table-of-contents/index.d.ts +3 -0
- package/navigation/table-of-contents/index.d.ts.map +1 -0
- package/navigation/table-of-contents/index.js +3 -0
- package/navigation/table-of-contents/index.js.map +1 -0
- package/navigation/table-of-contents/table-of-contents.module.css +322 -0
- package/navigation/table-of-contents/useActiveHeading.d.ts +37 -0
- package/navigation/table-of-contents/useActiveHeading.d.ts.map +1 -0
- package/navigation/table-of-contents/useActiveHeading.js +111 -0
- package/navigation/table-of-contents/useActiveHeading.js.map +1 -0
- package/navigation/tabs/Tabs.d.ts +2 -2
- package/navigation/tabs/Tabs.js +3 -3
- package/navigation/tabs/tabs.module.css +22 -19
- package/navigation/toolbar/Toolbar.d.ts +7 -1
- package/navigation/toolbar/Toolbar.d.ts.map +1 -1
- package/navigation/toolbar/Toolbar.js +3 -3
- package/navigation/toolbar/Toolbar.js.map +1 -1
- package/navigation/toolbar/toolbar.module.css +6 -6
- package/overlays/alert-dialog/AlertDialog.d.ts +14 -4
- package/overlays/alert-dialog/AlertDialog.d.ts.map +1 -1
- package/overlays/alert-dialog/AlertDialog.js +15 -5
- package/overlays/alert-dialog/AlertDialog.js.map +1 -1
- package/overlays/alert-dialog/alert-dialog.module.css +4 -4
- package/overlays/context-menu/ContextMenu.d.ts +1 -1
- package/overlays/context-menu/ContextMenu.js +1 -1
- package/overlays/dialog/Dialog.d.ts +26 -11
- package/overlays/dialog/Dialog.d.ts.map +1 -1
- package/overlays/dialog/Dialog.js +36 -17
- package/overlays/dialog/Dialog.js.map +1 -1
- package/overlays/dialog/dialog.module.css +32 -31
- package/overlays/dialog/morph.d.ts +17 -0
- package/overlays/dialog/morph.d.ts.map +1 -0
- package/overlays/dialog/morph.js +44 -0
- package/overlays/dialog/morph.js.map +1 -0
- package/overlays/menu/Menu.d.ts +18 -7
- package/overlays/menu/Menu.d.ts.map +1 -1
- package/overlays/menu/Menu.js +35 -12
- package/overlays/menu/Menu.js.map +1 -1
- package/overlays/menu/menu.module.css +26 -50
- package/overlays/menu/morph.d.ts +16 -0
- package/overlays/menu/morph.d.ts.map +1 -0
- package/overlays/menu/morph.js +36 -0
- package/overlays/menu/morph.js.map +1 -0
- package/overlays/menu/popup.d.ts +2 -0
- package/overlays/menu/popup.d.ts.map +1 -1
- package/overlays/menu/popup.js +11 -3
- package/overlays/menu/popup.js.map +1 -1
- package/overlays/menubar/Menubar.d.ts +10 -1
- package/overlays/menubar/Menubar.d.ts.map +1 -1
- package/overlays/menubar/Menubar.js +22 -12
- package/overlays/menubar/Menubar.js.map +1 -1
- package/overlays/menubar/menubar.module.css +13 -13
- package/overlays/popover/Popover.d.ts +22 -8
- package/overlays/popover/Popover.d.ts.map +1 -1
- package/overlays/popover/Popover.js +51 -16
- package/overlays/popover/Popover.js.map +1 -1
- package/overlays/popover/popover.module.css +73 -47
- package/overlays/preview-card/PreviewCard.d.ts +3 -3
- package/overlays/preview-card/PreviewCard.d.ts.map +1 -1
- package/overlays/preview-card/PreviewCard.js +5 -6
- package/overlays/preview-card/PreviewCard.js.map +1 -1
- package/overlays/preview-card/preview-card.module.css +19 -54
- package/overlays/search-dialog/SearchDialog.d.ts +89 -0
- package/overlays/search-dialog/SearchDialog.d.ts.map +1 -0
- package/overlays/search-dialog/SearchDialog.js +220 -0
- package/overlays/search-dialog/SearchDialog.js.map +1 -0
- package/overlays/search-dialog/SearchDialogPopup.d.ts +39 -0
- package/overlays/search-dialog/SearchDialogPopup.d.ts.map +1 -0
- package/overlays/search-dialog/SearchDialogPopup.js +80 -0
- package/overlays/search-dialog/SearchDialogPopup.js.map +1 -0
- package/overlays/search-dialog/SearchDialogTrigger.d.ts +24 -0
- package/overlays/search-dialog/SearchDialogTrigger.d.ts.map +1 -0
- package/overlays/search-dialog/SearchDialogTrigger.js +32 -0
- package/overlays/search-dialog/SearchDialogTrigger.js.map +1 -0
- package/overlays/search-dialog/index.d.ts +3 -0
- package/overlays/search-dialog/index.d.ts.map +1 -0
- package/overlays/search-dialog/index.js +3 -0
- package/overlays/search-dialog/index.js.map +1 -0
- package/overlays/search-dialog/search-dialog.module.css +492 -0
- package/overlays/search-dialog/useShortcutLabel.d.ts +13 -0
- package/overlays/search-dialog/useShortcutLabel.d.ts.map +1 -0
- package/overlays/search-dialog/useShortcutLabel.js +19 -0
- package/overlays/search-dialog/useShortcutLabel.js.map +1 -0
- package/overlays/search-dialog/variants.d.ts +25 -0
- package/overlays/search-dialog/variants.d.ts.map +1 -0
- package/overlays/search-dialog/variants.js +31 -0
- package/overlays/search-dialog/variants.js.map +1 -0
- package/overlays/tooltip/Tooltip.d.ts +3 -3
- package/overlays/tooltip/Tooltip.d.ts.map +1 -1
- package/overlays/tooltip/Tooltip.js +3 -3
- package/overlays/tooltip/Tooltip.js.map +1 -1
- package/overlays/tooltip/tooltip.module.css +2 -2
- package/package.json +27 -19
- package/page/announcement-bar/AnnouncementBar.d.ts +1 -1
- package/page/announcement-bar/AnnouncementBar.js +4 -4
- package/page/announcement-bar/AnnouncementBar.js.map +1 -1
- package/page/announcement-bar/announcement-bar.module.css +11 -17
- package/page/cta-block/CTABlock.d.ts +5 -5
- package/page/cta-block/CTABlock.d.ts.map +1 -1
- package/page/cta-block/CTABlock.js +2 -2
- package/page/cta-block/cta-block.module.css +26 -26
- package/page/docs-layout/DocsLayout.d.ts +83 -0
- package/page/docs-layout/DocsLayout.d.ts.map +1 -0
- package/page/docs-layout/DocsLayout.js +108 -0
- package/page/docs-layout/DocsLayout.js.map +1 -0
- package/page/docs-layout/docs-layout.module.css +266 -0
- package/page/docs-layout/index.d.ts +2 -0
- package/page/docs-layout/index.d.ts.map +1 -0
- package/page/docs-layout/index.js +2 -0
- package/page/docs-layout/index.js.map +1 -0
- package/page/footer/Footer.d.ts +1 -1
- package/page/footer/Footer.js +1 -1
- package/page/footer/footer.module.css +31 -31
- package/page/hero/Hero.d.ts +3 -3
- package/page/hero/Hero.d.ts.map +1 -1
- package/page/hero/Hero.js +1 -1
- package/page/hero/hero.module.css +36 -36
- package/page/marquee/Marquee.d.ts +2 -2
- package/page/marquee/Marquee.js +1 -1
- package/page/marquee/marquee.module.css +11 -11
- package/page/newsletter/Newsletter.d.ts.map +1 -1
- package/page/newsletter/Newsletter.js +4 -59
- package/page/newsletter/Newsletter.js.map +1 -1
- package/page/newsletter/newsletter.module.css +44 -22
- package/page/section-bar/SectionBar.d.ts +10 -3
- package/page/section-bar/SectionBar.d.ts.map +1 -1
- package/page/section-bar/SectionBar.js +21 -11
- package/page/section-bar/SectionBar.js.map +1 -1
- package/page/section-bar/section-bar.module.css +43 -46
- package/page/section-divider/SectionDivider.d.ts +2 -2
- package/page/section-divider/SectionDivider.js +4 -4
- package/page/section-divider/SectionDivider.js.map +1 -1
- package/page/section-divider/section-divider.module.css +18 -18
- package/page/section-header/SectionHeader.d.ts +7 -7
- package/page/section-header/SectionHeader.d.ts.map +1 -1
- package/page/section-header/SectionHeader.js +3 -3
- package/page/section-header/SectionHeader.js.map +1 -1
- package/page/section-header/section-header.module.css +16 -16
- package/utils/Ornament.d.ts +1 -1
- package/utils/Ornament.js +2 -2
- package/utils/assignRef.d.ts +7 -1
- package/utils/assignRef.d.ts.map +1 -1
- package/utils/assignRef.js +18 -0
- package/utils/assignRef.js.map +1 -1
- package/utils/docs/DemoTitle.d.ts +12 -0
- package/utils/docs/DemoTitle.d.ts.map +1 -0
- package/utils/docs/DemoTitle.js +11 -0
- package/utils/docs/DemoTitle.js.map +1 -0
- package/utils/docs/Pre.d.ts +39 -0
- package/utils/docs/Pre.d.ts.map +1 -0
- package/utils/docs/Pre.js +26 -0
- package/utils/docs/Pre.js.map +1 -0
- package/utils/docs/createDemo.d.ts +89 -0
- package/utils/docs/createDemo.d.ts.map +1 -0
- package/utils/docs/createDemo.js +51 -0
- package/utils/docs/createDemo.js.map +1 -0
- package/utils/docs/createMdxComponents.d.ts +52 -0
- package/utils/docs/createMdxComponents.d.ts.map +1 -0
- package/utils/docs/createMdxComponents.js +59 -0
- package/utils/docs/createMdxComponents.js.map +1 -0
- package/utils/docs/createTypes.d.ts +23 -0
- package/utils/docs/createTypes.d.ts.map +1 -0
- package/utils/docs/createTypes.js +27 -0
- package/utils/docs/createTypes.js.map +1 -0
- package/utils/docs/index.d.ts +8 -0
- package/utils/docs/index.d.ts.map +1 -0
- package/utils/docs/index.js +16 -0
- package/utils/docs/index.js.map +1 -0
- package/utils/docs/mdx.module.css +201 -0
- package/utils/docs/serverSourceEnhancers.d.ts +26 -0
- package/utils/docs/serverSourceEnhancers.d.ts.map +1 -0
- package/utils/docs/serverSourceEnhancers.js +32 -0
- package/utils/docs/serverSourceEnhancers.js.map +1 -0
- package/utils/docs/toSidebarItems.d.ts +23 -0
- package/utils/docs/toSidebarItems.d.ts.map +1 -0
- package/utils/docs/toSidebarItems.js +36 -0
- package/utils/docs/toSidebarItems.js.map +1 -0
- package/utils/font-fallbacks.css +176 -0
- package/utils/fonts.d.ts +1 -0
- package/utils/fonts.d.ts.map +1 -1
- package/utils/fonts.js +12 -0
- package/utils/fonts.js.map +1 -1
- package/utils/frame.d.ts +4 -0
- package/utils/frame.d.ts.map +1 -0
- package/utils/frame.js +11 -0
- package/utils/frame.js.map +1 -0
- package/utils/global.css +480 -266
- package/utils/line.module.css +17 -17
- package/utils/media.css +1 -1
- package/utils/ornament.module.css +19 -19
- package/utils/overlay.d.ts +4 -4
- package/utils/overlay.js +4 -4
- package/utils/pattern.module.css +45 -45
- package/utils/print.css +48 -34
- package/utils/reset.css +9 -2
- package/utils/roles.css +29 -29
- package/utils/seriesPatterns.js +3 -3
- package/utils/syntax.module.css +92 -0
- package/utils/theme.css +6 -6
- package/utils/tokens.css +262 -192
- package/utils/tokens.d.ts +51 -8
- package/utils/tokens.d.ts.map +1 -1
- package/utils/tokens.js +46 -9
- package/utils/tokens.js.map +1 -1
- package/utils/type.module.css +87 -87
- package/utils/useReleaseMark.d.ts +13 -0
- package/utils/useReleaseMark.d.ts.map +1 -0
- package/utils/useReleaseMark.js +44 -0
- package/utils/useReleaseMark.js.map +1 -0
- package/utils/view-transitions.css +122 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/content/code-block/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/content/code-block/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,OAAO,EAAE,gBAAgB,EAA8B,MAAM,oBAAoB,CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { ContentProps } from '@fairgarden/docs/CodeHighlighter/types';
|
|
3
|
+
import type { CodeBlockOptions } from '../code-block/CodeBlock';
|
|
4
|
+
import type { PrimaryScale, RadixScale } from '../../utils/scales';
|
|
5
|
+
export { demo } from './DemoFrame';
|
|
6
|
+
/** Demo's own content props: JSON, so a demo's props (`<DemoX collapse />`) can carry them. */
|
|
7
|
+
export type DemoOptions = CodeBlockOptions;
|
|
8
|
+
/** Props for DemoContent: the content props the demo factories hand over, plus the preview hook and scales. */
|
|
9
|
+
export type DemoContentProps = ContentProps<DemoOptions> & {
|
|
10
|
+
/**
|
|
11
|
+
* Wraps or replaces what renders in the preview surface, such as a docs
|
|
12
|
+
* site's iframe of the demo's own page. Called with useDemo's `component`.
|
|
13
|
+
* Default: the component as is. A rendered preview that runs edge to edge
|
|
14
|
+
* cancels the surface's inset with `margin: calc(-1 * var(--demo-inset))`.
|
|
15
|
+
* A function, so pass it from a client component that wraps DemoContent.
|
|
16
|
+
*/
|
|
17
|
+
renderPreview?: (component: React.ReactNode) => React.ReactNode;
|
|
18
|
+
/** Primary scale: frame, labels, syntax inks, focus ring. Never defaulted [D133]. */
|
|
19
|
+
primary?: PrimaryScale;
|
|
20
|
+
/** Secondary scale: keywords, highlight accent, the selected file tab. Never defaulted. */
|
|
21
|
+
secondary?: RadixScale;
|
|
22
|
+
className?: string;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* A demo: the live component on the page ground, with a Select of the
|
|
26
|
+
* variants in its top-start corner (two or more), above the embedded code
|
|
27
|
+
* with the file tabs, the actions (copy, copy link, view source, TS | JS)
|
|
28
|
+
* and, with `collapse`, the window. Every file's `#slug` has a hidden
|
|
29
|
+
* scroll target before the frame.
|
|
30
|
+
*/
|
|
31
|
+
export declare function DemoContent(props: DemoContentProps): React.JSX.Element;
|
|
32
|
+
//# sourceMappingURL=DemoContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DemoContent.d.ts","sourceRoot":"","sources":["../../src/content/demo/DemoContent.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAA;AAK1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAS/D,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAyClE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAElC,+FAA+F;AAC/F,MAAM,MAAM,WAAW,GAAG,gBAAgB,CAAA;AAE1C,+GAA+G;AAC/G,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,WAAW,CAAC,GAAG;IACzD;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,KAAK,KAAK,CAAC,SAAS,CAAA;IAC/D,qFAAqF;IACrF,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB,2FAA2F;IAC3F,SAAS,CAAC,EAAE,UAAU,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,qBAgElD"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useCodeWindow } from '@fairgarden/docs/useCodeWindow';
|
|
4
|
+
import { useDemo } from '@fairgarden/docs/useDemo';
|
|
5
|
+
import { useScrollAnchor } from '@fairgarden/docs/useScrollAnchor';
|
|
6
|
+
import { isOn, variantItems } from '../code-block/CodeBlockFrame';
|
|
7
|
+
import { CodeBlockSection, SWAP_ANCHOR_MS, useCodeBlockOptions, } from '../code-block/CodeBlockSection';
|
|
8
|
+
import { useCopyToasts } from '../code-block/CodeBlockToasts';
|
|
9
|
+
import { Select } from '../../forms/select';
|
|
10
|
+
import { useScopeAttributes } from '../../utils/scope';
|
|
11
|
+
import { demo } from './DemoFrame';
|
|
12
|
+
import styles from './demo.module.css';
|
|
13
|
+
/*
|
|
14
|
+
* Demo: a live component above its source. It is the `@fairgarden/docs`
|
|
15
|
+
* DemoContent component, built as fg-docs' DemoContent: pass it to
|
|
16
|
+
* `createDemoFactory({ DemoContent })` or `createDemoWithVariantsFactory`.
|
|
17
|
+
* It calls `useDemo(props)` and renders the selected variant's component in
|
|
18
|
+
* the preview surface (with any runtime error laid across its top edge),
|
|
19
|
+
* the variants in a Select in its corner, and the Code Block's code section
|
|
20
|
+
* embedded beneath. The engine owns the variant, file and transform state,
|
|
21
|
+
* the swap, the hash deep links, the stored preferences and copy.
|
|
22
|
+
*
|
|
23
|
+
* Implementation (CSS Modules + CVA)
|
|
24
|
+
* - Module: demo.module.css; CVA function `demo`.
|
|
25
|
+
* - Axes: `primary`, `secondary` → scales module classes.
|
|
26
|
+
* - Compound variants: none. Defaults: color axes none [D133].
|
|
27
|
+
* - Color fallback: inherits the scope, and passes both scales to the
|
|
28
|
+
* embedded code section and the variant Select.
|
|
29
|
+
* - States: static. The variant Select, the file tabs, the actions and the
|
|
30
|
+
* window render the engine's state; a variant change updates the Select at
|
|
31
|
+
* once and the code swaps after --fgd-duration-swap (instant under
|
|
32
|
+
* --motionNotOK). The error (useDemo's `error`, reported through a
|
|
33
|
+
* `CodeControllerContext`) is `role="alert"` in the danger roles, no
|
|
34
|
+
* shadow.
|
|
35
|
+
* - Parts: base (the root: scroll targets, then the frame), target (a hidden
|
|
36
|
+
* `#slug` scroll target), frame (the one edge), bar (the variant bar),
|
|
37
|
+
* variantSelect (its Select trigger, in the top-start corner), stage
|
|
38
|
+
* (holds the error and the surface), error, preview (the surface), code
|
|
39
|
+
* (the embedded code section's root).
|
|
40
|
+
* - Scope: none. Container: none; inherits its context.
|
|
41
|
+
*
|
|
42
|
+
* The frame never clips: the error hangs across the preview's top edge and
|
|
43
|
+
* the code's ⋮ hangs past the frame's inline end, so each part
|
|
44
|
+
* rounds its own corners to the frame's inner radius. The surface clips its
|
|
45
|
+
* own content without a scroll container, so a sticky demo still docks. The
|
|
46
|
+
* preview prints as rendered (components carry their own print fallbacks),
|
|
47
|
+
* the variant bar as its selected name and the code in full, black on white.
|
|
48
|
+
*/
|
|
49
|
+
export { demo } from './DemoFrame';
|
|
50
|
+
/**
|
|
51
|
+
* A demo: the live component on the page ground, with a Select of the
|
|
52
|
+
* variants in its top-start corner (two or more), above the embedded code
|
|
53
|
+
* with the file tabs, the actions (copy, copy link, view source, TS | JS)
|
|
54
|
+
* and, with `collapse`, the window. Every file's `#slug` has a hidden
|
|
55
|
+
* scroll target before the frame.
|
|
56
|
+
*/
|
|
57
|
+
export function DemoContent(props) {
|
|
58
|
+
const { renderPreview, primary, secondary, className, ...contentProps } = props;
|
|
59
|
+
const collapsible = isOn(contentProps.collapse);
|
|
60
|
+
const scope = useScopeAttributes();
|
|
61
|
+
const codeWindow = useCodeWindow();
|
|
62
|
+
const toasts = useCopyToasts();
|
|
63
|
+
const demoResult = useDemo(contentProps, useCodeBlockOptions(collapsible, codeWindow, toasts));
|
|
64
|
+
// Variant swaps anchor on the whole demo (the preview and code both reflow),
|
|
65
|
+
// held at the variant bar, as in the source.
|
|
66
|
+
const { containerRef: variantAnchorRef, anchorScroll: anchorVariantScroll } = useScrollAnchor();
|
|
67
|
+
const barRef = React.useRef(null);
|
|
68
|
+
const items = React.useMemo(() => variantItems(demoResult.variants), [demoResult.variants]);
|
|
69
|
+
const selectVariant = (value) => {
|
|
70
|
+
if (barRef.current)
|
|
71
|
+
anchorVariantScroll(barRef.current, SWAP_ANCHOR_MS);
|
|
72
|
+
demoResult.selectVariant(value);
|
|
73
|
+
};
|
|
74
|
+
return (React.createElement("div", { ...scope, className: demo({ primary, secondary, className }) },
|
|
75
|
+
demoResult.allFilesSlugs.map((file) => (React.createElement("span", { key: file.slug, id: file.slug, className: styles.target }))),
|
|
76
|
+
React.createElement("div", { ref: variantAnchorRef, className: styles.frame },
|
|
77
|
+
items.length > 1 ? (React.createElement("div", { ref: barRef, className: styles.bar },
|
|
78
|
+
React.createElement(Select, { "aria-label": "Variant", items: items, value: demoResult.selectedVariant, onValueChange: (value) => {
|
|
79
|
+
if (value != null)
|
|
80
|
+
selectVariant(value);
|
|
81
|
+
}, primary: primary, secondary: secondary, className: styles.variantSelect }))) : null,
|
|
82
|
+
React.createElement("div", { className: styles.stage },
|
|
83
|
+
demoResult.error ? (React.createElement("div", { role: "alert", className: styles.error }, demoResult.error)) : null,
|
|
84
|
+
React.createElement("div", { className: styles.preview }, renderPreview ? renderPreview(demoResult.component) : demoResult.component)),
|
|
85
|
+
React.createElement(CodeBlockSection, { code: demoResult, codeWindow: codeWindow, collapsible: collapsible, toasts: toasts, embedded: true, primary: primary, secondary: secondary, className: styles.code }))));
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=DemoContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DemoContent.js","sourceRoot":"","sources":["../../src/content/demo/DemoContent.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Demo's CVA function. */
|
|
2
|
+
export declare const demo: (props?: ({
|
|
3
|
+
primary?: "ruby" | "brown" | "crimson" | "gold" | "gray" | "indigo" | "olive" | "pink" | "plum" | "purple" | "red" | "tomato" | "violet" | "bronze" | "iris" | "mauve" | "sage" | "sand" | "slate" | null | undefined;
|
|
4
|
+
secondary?: "ruby" | "blue" | "brown" | "crimson" | "cyan" | "gold" | "gray" | "green" | "indigo" | "lime" | "olive" | "orange" | "pink" | "plum" | "purple" | "red" | "teal" | "tomato" | "violet" | "yellow" | "amber" | "bronze" | "grass" | "iris" | "jade" | "mauve" | "mint" | "sage" | "sand" | "sky" | "slate" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
//# sourceMappingURL=DemoFrame.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DemoFrame.d.ts","sourceRoot":"","sources":["../../src/content/demo/DemoFrame.tsx"],"names":[],"mappings":"AAWA,2BAA2B;AAC3B,eAAO,MAAM,IAAI;;;8EAMf,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { cva } from 'class-variance-authority';
|
|
2
|
+
import { primaryScaleVariants, secondaryScaleVariants } from '../../utils/scales';
|
|
3
|
+
import styles from './demo.module.css';
|
|
4
|
+
/*
|
|
5
|
+
* Internal to Demo: the CVA function the loaded demo and its loading state
|
|
6
|
+
* share, in a module with no docs engine runtime, so the loading path stays
|
|
7
|
+
* light. Re-exported by DemoContent.
|
|
8
|
+
*/
|
|
9
|
+
/** Demo's CVA function. */
|
|
10
|
+
export const demo = cva(styles.base, {
|
|
11
|
+
variants: {
|
|
12
|
+
// Color axes: never defaulted, so an omitted prop inherits the scope [D133].
|
|
13
|
+
primary: primaryScaleVariants,
|
|
14
|
+
secondary: secondaryScaleVariants,
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=DemoFrame.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DemoFrame.js","sourceRoot":"","sources":["../../src/content/demo/DemoFrame.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAA;AAE9C,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AACjF,OAAO,MAAM,MAAM,mBAAmB,CAAA;AAEtC;;;;GAIG;AAEH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE;IACnC,QAAQ,EAAE;QACR,6EAA6E;QAC7E,OAAO,EAAE,oBAAoB;QAC7B,SAAS,EAAE,sBAAsB;KAClC;CACF,CAAC,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { DemoContentProps } from './DemoContent';
|
|
3
|
+
/**
|
|
4
|
+
* Demo, code-split: the demo factories' `DemoContent` that loads
|
|
5
|
+
* DemoContent (`useDemo`, the code section, the Select) in its own chunk,
|
|
6
|
+
* as fg-docs' DemoContentLazy. Pair it with `DemoContentLoading:
|
|
7
|
+
* DemoLoading`, which shows while the chunk loads. Props, `renderPreview`
|
|
8
|
+
* included, pass through to DemoContent.
|
|
9
|
+
*/
|
|
10
|
+
export declare function DemoLazy(props: DemoContentProps): React.JSX.Element;
|
|
11
|
+
//# sourceMappingURL=DemoLazy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DemoLazy.d.ts","sourceRoot":"","sources":["../../src/content/demo/DemoLazy.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAErD;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,gBAAgB,qBAO/C"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { LazyContent } from '@fairgarden/docs/CoordinatedLazy';
|
|
4
|
+
/**
|
|
5
|
+
* Demo, code-split: the demo factories' `DemoContent` that loads
|
|
6
|
+
* DemoContent (`useDemo`, the code section, the Select) in its own chunk,
|
|
7
|
+
* as fg-docs' DemoContentLazy. Pair it with `DemoContentLoading:
|
|
8
|
+
* DemoLoading`, which shows while the chunk loads. Props, `renderPreview`
|
|
9
|
+
* included, pass through to DemoContent.
|
|
10
|
+
*/
|
|
11
|
+
export function DemoLazy(props) {
|
|
12
|
+
return (React.createElement(LazyContent, { content: () => import('./DemoContent').then((mod) => ({ default: mod.DemoContent })), props: props }));
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=DemoLazy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DemoLazy.js","sourceRoot":"","sources":["../../src/content/demo/DemoLazy.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAI9D;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAuB;IAC9C,OAAO,CACL,oBAAC,WAAW,IACV,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC,EACpF,KAAK,EAAE,KAAK,GACZ,CACH,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { ContentLoadingProps } from '@fairgarden/docs/CodeHighlighter/types';
|
|
3
|
+
import type { PrimaryScale, RadixScale } from '../../utils/scales';
|
|
4
|
+
import type { DemoOptions } from './DemoContent';
|
|
5
|
+
/** Props for DemoLoading: what the demo factories hand `DemoContentLoading`, plus the preview hook and scales. */
|
|
6
|
+
export type DemoLoadingProps = ContentLoadingProps<DemoOptions> & {
|
|
7
|
+
/**
|
|
8
|
+
* As DemoContent's `renderPreview`, called with the fallback's
|
|
9
|
+
* `component`. Pass the loaded demo's, or a stand-in the same size: a
|
|
10
|
+
* preview that must mount only once (an iframe) renders its stand-in here,
|
|
11
|
+
* since the swap replaces the loading tree.
|
|
12
|
+
*/
|
|
13
|
+
renderPreview?: (component: React.ReactNode) => React.ReactNode;
|
|
14
|
+
primary?: PrimaryScale;
|
|
15
|
+
secondary?: RadixScale;
|
|
16
|
+
className?: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* The loading state of a demo: the component above its precomputed code,
|
|
20
|
+
* with the controls disabled until the content loads.
|
|
21
|
+
*/
|
|
22
|
+
export declare function DemoLoading(props: DemoLoadingProps): React.JSX.Element;
|
|
23
|
+
//# sourceMappingURL=DemoLoading.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DemoLoading.d.ts","sourceRoot":"","sources":["../../src/content/demo/DemoLoading.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAA;AAKjF,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAElE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAehD,kHAAkH;AAClH,MAAM,MAAM,gBAAgB,GAAG,mBAAmB,CAAC,WAAW,CAAC,GAAG;IAChE;;;;;OAKG;IACH,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,KAAK,KAAK,CAAC,SAAS,CAAA;IAC/D,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB,SAAS,CAAC,EAAE,UAAU,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,qBAwClD"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { isOn, variantItems } from '../code-block/CodeBlockFrame';
|
|
4
|
+
import { CodeBlockSectionLoading, fallbackSlugs } from '../code-block/CodeBlockLoading';
|
|
5
|
+
import { Select } from '../../forms/select';
|
|
6
|
+
import { useScopeAttributes } from '../../utils/scope';
|
|
7
|
+
import { demo } from './DemoFrame';
|
|
8
|
+
import styles from './demo.module.css';
|
|
9
|
+
/**
|
|
10
|
+
* The loading state of a demo: the component above its precomputed code,
|
|
11
|
+
* with the controls disabled until the content loads.
|
|
12
|
+
*/
|
|
13
|
+
export function DemoLoading(props) {
|
|
14
|
+
const { renderPreview, primary, secondary, className, ...fallback } = props;
|
|
15
|
+
const scope = useScopeAttributes();
|
|
16
|
+
const items = variantItems(Object.keys(fallback.components ?? {}));
|
|
17
|
+
return (React.createElement("div", { ...scope, className: demo({ primary, secondary, className }) },
|
|
18
|
+
fallbackSlugs(fallback, fallback.fileNames ?? []).map((slug) => (React.createElement("span", { key: slug, id: slug, className: styles.target }))),
|
|
19
|
+
React.createElement("div", { className: styles.frame },
|
|
20
|
+
items.length > 1 ? (React.createElement("div", { className: styles.bar },
|
|
21
|
+
React.createElement(Select, { "aria-label": "Variant", items: items, value: fallback.initialVariant ?? items[0].value, disabled: true, primary: primary, secondary: secondary, className: styles.variantSelect }))) : null,
|
|
22
|
+
React.createElement("div", { className: styles.stage },
|
|
23
|
+
React.createElement("div", { className: styles.preview }, renderPreview ? renderPreview(fallback.component) : fallback.component)),
|
|
24
|
+
React.createElement(CodeBlockSectionLoading, { fallback: fallback, collapsible: isOn(fallback.collapse), embedded: true, primary: primary, secondary: secondary, className: styles.code }))));
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=DemoLoading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DemoLoading.js","sourceRoot":"","sources":["../../src/content/demo/DemoLoading.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AACjE,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AACvF,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAE3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAEtD,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,MAAM,MAAM,mBAAmB,CAAA;AA2BtC;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,KAAuB;IACjD,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,QAAQ,EAAE,GAAG,KAAK,CAAA;IAC3E,MAAM,KAAK,GAAG,kBAAkB,EAAE,CAAA;IAClC,MAAM,KAAK,GAAG,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,CAAA;IAElE,OAAO,CACL,gCAAS,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC;QAC/D,aAAa,CAAC,QAAQ,EAAE,QAAQ,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAC/D,8BAAM,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,GAAI,CACxD,CAAC;QACF,6BAAK,SAAS,EAAE,MAAM,CAAC,KAAK;YACzB,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAClB,6BAAK,SAAS,EAAE,MAAM,CAAC,GAAG;gBACxB,oBAAC,MAAM,kBACM,SAAS,EACpB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,QAAQ,CAAC,cAAc,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,EAChD,QAAQ,QACR,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,MAAM,CAAC,aAAa,GAC/B,CACE,CACP,CAAC,CAAC,CAAC,IAAI;YACR,6BAAK,SAAS,EAAE,MAAM,CAAC,KAAK;gBAC1B,6BAAK,SAAS,EAAE,MAAM,CAAC,OAAO,IAC3B,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CACnE,CACF;YACN,oBAAC,uBAAuB,IACtB,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EACpC,QAAQ,QACR,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,MAAM,CAAC,IAAI,GACtB,CACE,CACF,CACP,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Demo. Parts: `base` (the root: the scroll targets, then the frame),
|
|
3
|
+
* `target` (a hidden `#slug` scroll target), `frame` (the one edge around
|
|
4
|
+
* preview and code), `bar` (the variant bar), `variantSelect` (its Select
|
|
5
|
+
* trigger, in the top-start corner), `stage` (holds the error and the
|
|
6
|
+
* surface), `error`, `preview` (the surface), `code` (the embedded Code
|
|
7
|
+
* Block's root).
|
|
8
|
+
*
|
|
9
|
+
* The frame never clips: the error hangs across the preview's top edge and
|
|
10
|
+
* the Code Block's ⋮ hangs past the frame's inline end. Each part
|
|
11
|
+
* rounds its own corners to the frame's inner radius instead. Colors are role
|
|
12
|
+
* variables and scale steps only; nothing is transparent, shadowed or graded
|
|
13
|
+
* [D12]. Local custom properties carry dimensions only.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/* Composition sits in top-level rules, outside the layers: Lightning CSS
|
|
17
|
+
* (Next.js with Turbopack) rejects `composes` inside @layer or any nesting.
|
|
18
|
+
* The composed classes keep their own layers. */
|
|
19
|
+
.error {
|
|
20
|
+
composes: typeData from '../../utils/type.module.css';
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@layer base {
|
|
24
|
+
.base {
|
|
25
|
+
min-inline-size: 0;
|
|
26
|
+
margin-block: var(--size-px-5);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* A hidden target for native `#slug` links: in flow, so the browser can
|
|
30
|
+
* scroll to it, and zero tall. */
|
|
31
|
+
.target {
|
|
32
|
+
display: block;
|
|
33
|
+
block-size: 0;
|
|
34
|
+
scroll-margin-block-start: var(--size-px-3);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* The frame: every fill has an edge [D12]. */
|
|
38
|
+
.frame {
|
|
39
|
+
/* The parts' corner radius, inside the frame's edge. */
|
|
40
|
+
--demo-radius: calc(var(--radius-2-25) - var(--border-size-1));
|
|
41
|
+
|
|
42
|
+
min-inline-size: 0;
|
|
43
|
+
border: var(--border-size-1) solid var(--role-rule);
|
|
44
|
+
border-radius: var(--radius-2-25);
|
|
45
|
+
background-color: var(--primary1);
|
|
46
|
+
color: var(--primary12);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* The variant bar: the preview's ground, with the Select in its corner. */
|
|
50
|
+
.bar {
|
|
51
|
+
display: flex;
|
|
52
|
+
border-start-start-radius: var(--demo-radius);
|
|
53
|
+
border-start-end-radius: var(--demo-radius);
|
|
54
|
+
background-color: var(--role-ground);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* The error's containing block: it hangs across the surface's top edge
|
|
58
|
+
* from here, outside the surface's clip. */
|
|
59
|
+
.stage {
|
|
60
|
+
position: relative;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/*
|
|
64
|
+
* The surface: the page ground, inset --size-px-7, a wrapping row with a
|
|
65
|
+
* --size-px-3 gap. It clips its content without a scroll container, so a
|
|
66
|
+
* sticky demo docks against the page. `--demo-inset` is the inset a
|
|
67
|
+
* rendered preview cancels to run edge to edge.
|
|
68
|
+
*/
|
|
69
|
+
.preview {
|
|
70
|
+
--demo-inset: var(--size-px-7);
|
|
71
|
+
|
|
72
|
+
display: flex;
|
|
73
|
+
flex-wrap: wrap;
|
|
74
|
+
gap: var(--size-px-3);
|
|
75
|
+
align-items: center;
|
|
76
|
+
min-inline-size: 0;
|
|
77
|
+
padding: var(--demo-inset);
|
|
78
|
+
background-color: var(--role-ground);
|
|
79
|
+
overflow: hidden;
|
|
80
|
+
overflow: clip;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* Without a variant bar, the surface takes the frame's top corners. */
|
|
84
|
+
.stage:first-child > .preview {
|
|
85
|
+
border-start-start-radius: var(--demo-radius);
|
|
86
|
+
border-start-end-radius: var(--demo-radius);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/*
|
|
90
|
+
* The runtime error: laid across the surface's top edge, so showing it
|
|
91
|
+
* never shifts layout. The danger edge at --border-size-2 and the danger
|
|
92
|
+
* text on the face; no shadow.
|
|
93
|
+
*/
|
|
94
|
+
.error {
|
|
95
|
+
position: absolute;
|
|
96
|
+
z-index: 1;
|
|
97
|
+
inset-block-start: 0;
|
|
98
|
+
inset-inline: var(--size-px-2-5);
|
|
99
|
+
translate: 0 -50%;
|
|
100
|
+
padding: var(--size-px-1) var(--size-px-2-5);
|
|
101
|
+
border: var(--border-size-2) solid var(--role-danger-edge);
|
|
102
|
+
border-radius: var(--radius-2-25);
|
|
103
|
+
background-color: var(--primary1);
|
|
104
|
+
color: var(--role-danger-text);
|
|
105
|
+
white-space: pre-wrap;
|
|
106
|
+
overflow-wrap: anywhere;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@layer variants {
|
|
111
|
+
/*
|
|
112
|
+
* The variant Select, compact, in the top-start corner: the frame's edge
|
|
113
|
+
* doubles as its top and start edges, its outer corner follows the
|
|
114
|
+
* frame's, and its inner corner rounds so it reads as its own chip.
|
|
115
|
+
*/
|
|
116
|
+
.bar > .variantSelect {
|
|
117
|
+
inline-size: auto;
|
|
118
|
+
min-inline-size: var(--size-px-11);
|
|
119
|
+
max-inline-size: 100%;
|
|
120
|
+
block-size: var(--fgd-size-hit);
|
|
121
|
+
border-block-start-width: 0;
|
|
122
|
+
border-inline-start-width: 0;
|
|
123
|
+
border-radius: 0;
|
|
124
|
+
border-start-start-radius: var(--demo-radius);
|
|
125
|
+
border-end-end-radius: var(--radius-2-25);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/* The embedded Code Block's foot follows the frame's inner radius. */
|
|
129
|
+
.frame > .code {
|
|
130
|
+
border-end-start-radius: var(--demo-radius);
|
|
131
|
+
border-end-end-radius: var(--demo-radius);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
@layer states {
|
|
136
|
+
/* The corner Select's ring sits inside it, off the frame's edge [D45]. */
|
|
137
|
+
.bar > .variantSelect:focus-visible {
|
|
138
|
+
outline-offset: calc(-1 * var(--border-size-2));
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
@layer print {
|
|
143
|
+
@media print {
|
|
144
|
+
/* The preview never splits across pages; the code block keeps its own rule. */
|
|
145
|
+
.stage {
|
|
146
|
+
break-inside: avoid;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* The variant bar prints the selected variant's name as text. */
|
|
150
|
+
.bar > .variantSelect {
|
|
151
|
+
border-width: 0;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/* A runtime error prints in flow above the preview, not over it; the
|
|
155
|
+
* print remap turns the danger roles black, and its 2 px edge still
|
|
156
|
+
* marks it. */
|
|
157
|
+
.error {
|
|
158
|
+
position: static;
|
|
159
|
+
translate: none;
|
|
160
|
+
margin: var(--size-px-2) var(--size-px-2-5) 0;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/content/demo/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/content/demo/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,OAAO,EAAE,WAAW,EAAyB,MAAM,eAAe,CAAA"}
|
|
@@ -50,7 +50,7 @@ export declare function EmptyState(props: EmptyStateProps): React.ReactElement<u
|
|
|
50
50
|
/** Props for EmptyStateDrawing: `div` props, `render`, and the sticker's art (`viewBox`, `halo`, line art as children). */
|
|
51
51
|
export type EmptyStateDrawingProps = Omit<useRender.ComponentProps<'div'>, 'children'> & Pick<StickerProps, 'viewBox' | 'halo' | 'children'>;
|
|
52
52
|
/**
|
|
53
|
-
* The drawing (`illustrated`): a §6.5 Sticker at `--
|
|
53
|
+
* The drawing (`illustrated`): a §6.5 Sticker at `--fgd-size-art-s` with its
|
|
54
54
|
* halo, decorative (`aria-hidden`); the spot size `--size-px-9` below
|
|
55
55
|
* 360 px. Pass the asset's `viewBox`, its pre-expanded `halo` path and its
|
|
56
56
|
* line art as children. The sticker brings its own `white` scope, so it
|
|
@@ -84,7 +84,7 @@ export function EmptyState(props) {
|
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
/**
|
|
87
|
-
* The drawing (`illustrated`): a §6.5 Sticker at `--
|
|
87
|
+
* The drawing (`illustrated`): a §6.5 Sticker at `--fgd-size-art-s` with its
|
|
88
88
|
* halo, decorative (`aria-hidden`); the spot size `--size-px-9` below
|
|
89
89
|
* 360 px. Pass the asset's `viewBox`, its pre-expanded `halo` path and its
|
|
90
90
|
* line art as children. The sticker brings its own `white` scope, so it
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* dashes are exact [D36]), drawing (holds the §6.5 Sticker), trail (holds
|
|
6
6
|
* the shared ornament-trail), heading, text, action. Static. Colors are role
|
|
7
7
|
* variables only; local custom properties carry dimensions only:
|
|
8
|
-
* --empty-state-pad the frame padding (--
|
|
9
|
-
* --empty-state-art the drawing's fixed size (--
|
|
8
|
+
* --empty-state-pad the frame padding (--size-px-7-5; --size-px-5 below 360 px)
|
|
9
|
+
* --empty-state-art the drawing's fixed size (--fgd-size-art-s; --size-px-9 below 360 px)
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
/* Composition sits in top-level rules, outside the layers: Lightning CSS
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
|
|
28
28
|
@layer base {
|
|
29
29
|
.base {
|
|
30
|
-
--empty-state-pad: var(--
|
|
31
|
-
--empty-state-art: var(--
|
|
30
|
+
--empty-state-pad: var(--size-px-7-5);
|
|
31
|
+
--empty-state-art: var(--fgd-size-art-s);
|
|
32
32
|
|
|
33
33
|
container-type: inline-size;
|
|
34
34
|
min-inline-size: 0;
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
text-align: center;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
/* The §4.7.4 provisional frame: line-dashed in --role-rule, --
|
|
48
|
+
/* The §4.7.4 provisional frame: line-dashed in --role-rule, --radius-2-25, inset by
|
|
49
49
|
half its stroke so the whole line sits inside the box. */
|
|
50
50
|
.frameLine {
|
|
51
51
|
position: absolute;
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
.frameRect {
|
|
60
60
|
fill: none;
|
|
61
61
|
stroke: var(--role-rule);
|
|
62
|
-
rx: var(--
|
|
63
|
-
ry: var(--
|
|
62
|
+
rx: var(--radius-2-25);
|
|
63
|
+
ry: var(--radius-2-25);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
/* Stack: drawing or trail → 24 → heading → 12 → text → 24 → action. */
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
.text {
|
|
98
98
|
position: relative;
|
|
99
99
|
max-inline-size: 40ch;
|
|
100
|
-
margin: var(--
|
|
100
|
+
margin: var(--size-px-2-5) 0 0;
|
|
101
101
|
color: var(--primary12);
|
|
102
102
|
}
|
|
103
103
|
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
display: flex;
|
|
107
107
|
flex-wrap: wrap;
|
|
108
108
|
justify-content: center;
|
|
109
|
-
gap: var(--
|
|
109
|
+
gap: var(--size-px-2-5);
|
|
110
110
|
margin-block-start: var(--size-px-5);
|
|
111
111
|
}
|
|
112
112
|
|
|
@@ -130,10 +130,10 @@
|
|
|
130
130
|
/* Framed and illustrated share the dashed frame; illustrated adds the drawing. */
|
|
131
131
|
.framed .frame,
|
|
132
132
|
.illustrated .frame {
|
|
133
|
-
border-radius: var(--
|
|
133
|
+
border-radius: var(--radius-2-25);
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
/* Inline
|
|
136
|
+
/* Inline: one sentence in place of the content; no frame, no padding. */
|
|
137
137
|
.inline .frame {
|
|
138
138
|
justify-items: start;
|
|
139
139
|
padding: 0;
|