@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,415 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Expanding box: a behavior-free 9-slice frame whose pieces morph between
|
|
3
|
+
* two boxes through View Transitions (the search trigger into its dialog,
|
|
4
|
+
* §9.10 [D194]). CVA function `expandingBox` in ExpandingBox.tsx, applied to
|
|
5
|
+
* each of the three rows. Parts: host (exported: the owner's element that
|
|
6
|
+
* holds the rows), row, head / content / foot (the rows), corner and edge
|
|
7
|
+
* (the head and foot cells), inner (the content wrapper), face, left and
|
|
8
|
+
* right (the face and the side edges), main, extra, extraFallback, end
|
|
9
|
+
* (exported: the piece that rides the right edge), landing (the trigger box
|
|
10
|
+
* landing from a close).
|
|
11
|
+
*
|
|
12
|
+
* Geometry: head and foot are rows of --xb-cell cells (corner, edge,
|
|
13
|
+
* corner); the content row is pulled over both by --xb-cell, and its face,
|
|
14
|
+
* left and right pieces, absolute against the host, draw the face and the
|
|
15
|
+
* side edges under the corners. Radius, edge and cell are the same in every
|
|
16
|
+
* state, so the corner pieces are identical in both snapshots and only
|
|
17
|
+
* translate; the four edges stretch only along their length, keeping their
|
|
18
|
+
* weight, and the borderless face stretches freely.
|
|
19
|
+
*
|
|
20
|
+
* View Transitions: each piece reads its view-transition-name from a
|
|
21
|
+
* custom property the rows set inline per instance (`--xb-tl` … `--xb-focus`,
|
|
22
|
+
* `none` while the box is not active), so no name is ever written here and
|
|
23
|
+
* two boxes never collide. Every piece carries a view-transition-class
|
|
24
|
+
* (`fgd-xb` plus its kind, read from --xb-class so CSS Modules never hash
|
|
25
|
+
* it); utils/view-transitions.css styles the groups and images by class.
|
|
26
|
+
* While <html data-fgd-expanding="close"> is set, every piece also carries
|
|
27
|
+
* `closing`, so the close runs on the faster duration.
|
|
28
|
+
*
|
|
29
|
+
* Frame: one radius, --xb-radius (--radius-2-25, published on the host),
|
|
30
|
+
* and one edge, --xb-edge (--border-size-2), collapsed and expanded alike;
|
|
31
|
+
* only the color is per state: --role-rule collapsed (the field-like
|
|
32
|
+
* trigger), --primary12 expanded. Opening switches at the snapshot swap;
|
|
33
|
+
* closing keeps the landing trigger's frame --primary12 until the morph has
|
|
34
|
+
* finished (`landing`), so the color changes on the landed box. The
|
|
35
|
+
* focus ring follows the radius. The dialog's sheet keeps the same frame:
|
|
36
|
+
* its owner insets the host by the page margin. Face --primary1. Hover
|
|
37
|
+
* (collapsed) steps the edge --role-rule → --primary12 at the same weight
|
|
38
|
+
* [D140]; never a transform [D181]. Local custom properties carry dimensions
|
|
39
|
+
* and transition names and classes only; colors are role variables.
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
@layer base {
|
|
43
|
+
/*
|
|
44
|
+
* The owner's element (trigger button, dialog popup): the positioned box
|
|
45
|
+
* the face, the side edges and the focus ring measure against. Zero
|
|
46
|
+
* specificity, so the owner's own position (a fixed popup) and sizing
|
|
47
|
+
* win. It publishes
|
|
48
|
+
* the frame radius, the same collapsed and expanded, for the rows and for
|
|
49
|
+
* any ring the owner draws on the host itself.
|
|
50
|
+
*/
|
|
51
|
+
:where(.host) {
|
|
52
|
+
--xb-radius: var(--radius-2-25);
|
|
53
|
+
|
|
54
|
+
position: relative;
|
|
55
|
+
isolation: isolate;
|
|
56
|
+
display: flex;
|
|
57
|
+
flex-direction: column;
|
|
58
|
+
box-sizing: border-box;
|
|
59
|
+
padding: 0;
|
|
60
|
+
border: 0;
|
|
61
|
+
background: none;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/*
|
|
65
|
+
* The edge, and the corner cell: the radius plus a size-px-1 straight run
|
|
66
|
+
* (8 + 4 = 12 px), which holds the radius and the edge (8 + 2).
|
|
67
|
+
*/
|
|
68
|
+
.row {
|
|
69
|
+
--xb-edge: var(--border-size-2);
|
|
70
|
+
--xb-cell: calc(var(--xb-radius) + var(--size-px-1));
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.head,
|
|
74
|
+
.foot {
|
|
75
|
+
display: flex;
|
|
76
|
+
flex: none;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* Above the face and the side edges (same layer, later), below the content. */
|
|
80
|
+
.foot {
|
|
81
|
+
position: relative;
|
|
82
|
+
z-index: -1;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.corner,
|
|
86
|
+
.edge {
|
|
87
|
+
box-sizing: border-box;
|
|
88
|
+
block-size: var(--xb-cell);
|
|
89
|
+
border: 0 solid var(--primary12);
|
|
90
|
+
background-color: var(--primary1);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.corner {
|
|
94
|
+
flex: none;
|
|
95
|
+
inline-size: var(--xb-cell);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* Edges tuck under the corners, so no seam opens between them. */
|
|
99
|
+
.edge {
|
|
100
|
+
flex: 1 1 auto;
|
|
101
|
+
margin-inline: calc(-1 * var(--border-size-2));
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.head > .corner,
|
|
105
|
+
.head > .edge {
|
|
106
|
+
border-block-start-width: var(--xb-edge);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.foot > .corner,
|
|
110
|
+
.foot > .edge {
|
|
111
|
+
border-block-end-width: var(--xb-edge);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.tl,
|
|
115
|
+
.bl {
|
|
116
|
+
border-inline-start-width: var(--xb-edge);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.tr,
|
|
120
|
+
.br {
|
|
121
|
+
border-inline-end-width: var(--xb-edge);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.tl {
|
|
125
|
+
border-start-start-radius: var(--xb-radius);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.tr {
|
|
129
|
+
border-start-end-radius: var(--xb-radius);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.bl {
|
|
133
|
+
border-end-start-radius: var(--xb-radius);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.br {
|
|
137
|
+
border-end-end-radius: var(--xb-radius);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/*
|
|
141
|
+
* View-transition classes travel in --xb-class and are read through var():
|
|
142
|
+
* CSS Modules would hash a literal view-transition-class ident, and the
|
|
143
|
+
* global rules select these exact names.
|
|
144
|
+
*/
|
|
145
|
+
.tl,
|
|
146
|
+
.tr,
|
|
147
|
+
.bl,
|
|
148
|
+
.br {
|
|
149
|
+
--xb-class: fgd-xb fgd-xb-corner;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.t,
|
|
153
|
+
.b {
|
|
154
|
+
--xb-class: fgd-xb fgd-xb-edge;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.corner,
|
|
158
|
+
.edge,
|
|
159
|
+
.content,
|
|
160
|
+
.face,
|
|
161
|
+
.left,
|
|
162
|
+
.right,
|
|
163
|
+
.main,
|
|
164
|
+
.main .end,
|
|
165
|
+
.extra,
|
|
166
|
+
.extraFallback {
|
|
167
|
+
view-transition-class: var(--xb-class);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.tl {
|
|
171
|
+
view-transition-name: var(--xb-tl);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.t {
|
|
175
|
+
view-transition-name: var(--xb-t);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.tr {
|
|
179
|
+
view-transition-name: var(--xb-tr);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.bl {
|
|
183
|
+
view-transition-name: var(--xb-bl);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.b {
|
|
187
|
+
view-transition-name: var(--xb-b);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.br {
|
|
191
|
+
view-transition-name: var(--xb-br);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/*
|
|
195
|
+
* Pulled over the head and foot rows; the pieces inside carry their own
|
|
196
|
+
* names. Inset by the frame's edge, so content never covers the frame.
|
|
197
|
+
*/
|
|
198
|
+
.content {
|
|
199
|
+
display: flex;
|
|
200
|
+
flex-direction: column;
|
|
201
|
+
flex: 1 1 auto;
|
|
202
|
+
min-block-size: 0;
|
|
203
|
+
margin-block: calc(-1 * var(--xb-cell));
|
|
204
|
+
padding: var(--xb-edge);
|
|
205
|
+
border-radius: var(--xb-radius);
|
|
206
|
+
view-transition-name: var(--xb-content);
|
|
207
|
+
--xb-class: fgd-xb fgd-xb-content;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/*
|
|
211
|
+
* The face and the two side edges, starting where the corner curves end,
|
|
212
|
+
* so they overlap the corners' size-px-1 straight run, under both rows.
|
|
213
|
+
* The face has no border; each side edge is a strip one edge wide, so in
|
|
214
|
+
* the morph it stretches only along its length.
|
|
215
|
+
*/
|
|
216
|
+
.face,
|
|
217
|
+
.left,
|
|
218
|
+
.right {
|
|
219
|
+
position: absolute;
|
|
220
|
+
inset-block: var(--xb-radius);
|
|
221
|
+
z-index: -1;
|
|
222
|
+
box-sizing: border-box;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.face {
|
|
226
|
+
inset-inline: 0;
|
|
227
|
+
background-color: var(--primary1);
|
|
228
|
+
view-transition-name: var(--xb-face);
|
|
229
|
+
--xb-class: fgd-xb fgd-xb-face;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.left,
|
|
233
|
+
.right {
|
|
234
|
+
inline-size: var(--xb-edge);
|
|
235
|
+
border: 0 solid var(--primary12);
|
|
236
|
+
--xb-class: fgd-xb fgd-xb-edge;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.left {
|
|
240
|
+
inset-inline-start: 0;
|
|
241
|
+
border-inline-start-width: var(--xb-edge);
|
|
242
|
+
view-transition-name: var(--xb-l);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.right {
|
|
246
|
+
inset-inline-end: 0;
|
|
247
|
+
border-inline-end-width: var(--xb-edge);
|
|
248
|
+
view-transition-name: var(--xb-r);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/* The content wrapper (the `className` prop): main, extra, then the rest. */
|
|
252
|
+
.inner {
|
|
253
|
+
display: flex;
|
|
254
|
+
flex-direction: column;
|
|
255
|
+
flex: 1 1 auto;
|
|
256
|
+
min-block-size: 0;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/* Rides the left edge. */
|
|
260
|
+
.main {
|
|
261
|
+
view-transition-name: var(--xb-main);
|
|
262
|
+
--xb-class: fgd-xb fgd-xb-main;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/* Rides the right edge: one element inside main. */
|
|
266
|
+
.main .end {
|
|
267
|
+
view-transition-name: var(--xb-end);
|
|
268
|
+
--xb-class: fgd-xb fgd-xb-end;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.extra,
|
|
272
|
+
.extraFallback {
|
|
273
|
+
view-transition-name: var(--xb-extra);
|
|
274
|
+
--xb-class: fgd-xb fgd-xb-extra;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/* The empty extra a box without ExpandingBoxExtra grows from (the trigger's). */
|
|
278
|
+
.extraFallback {
|
|
279
|
+
inline-size: 100%;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.inner:has(.extra) > .extraFallback {
|
|
283
|
+
display: none;
|
|
284
|
+
view-transition-name: none;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
288
|
+
.corner,
|
|
289
|
+
.edge,
|
|
290
|
+
.left,
|
|
291
|
+
.right {
|
|
292
|
+
transition-property: border-color;
|
|
293
|
+
transition-duration: var(--fgd-duration-quick);
|
|
294
|
+
transition-timing-function: var(--ease-out-3);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
@layer variants {
|
|
300
|
+
/* Trigger-sized: the field edge's color; radius and weight are shared. */
|
|
301
|
+
.collapsed > .corner,
|
|
302
|
+
.collapsed > .edge,
|
|
303
|
+
.collapsed > .left,
|
|
304
|
+
.collapsed > .right {
|
|
305
|
+
border-color: var(--role-rule);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/*
|
|
309
|
+
* The focus ring's own piece, covering the whole box: it stays on the
|
|
310
|
+
* always-mounted trigger in both snapshots, so the ring hands off (it
|
|
311
|
+
* shows once the frame lands) rather than morphing with the frame.
|
|
312
|
+
*/
|
|
313
|
+
.collapsed > .face::after {
|
|
314
|
+
content: '';
|
|
315
|
+
position: absolute;
|
|
316
|
+
inset-block: calc(-1 * var(--xb-radius));
|
|
317
|
+
inset-inline: 0;
|
|
318
|
+
border-radius: var(--xb-radius);
|
|
319
|
+
view-transition-name: var(--xb-focus);
|
|
320
|
+
view-transition-class: var(--xb-class);
|
|
321
|
+
--xb-class: fgd-xb fgd-xb-focus;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
@layer states {
|
|
326
|
+
/* The host hands its focus ring to the box, which draws it round the whole frame. */
|
|
327
|
+
.host:focus-visible:has(> .collapsed) {
|
|
328
|
+
outline: none;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.host:focus-visible > .collapsed > .face::after {
|
|
332
|
+
outline: var(--fgd-focus-width) solid var(--primary12);
|
|
333
|
+
outline-offset: var(--fgd-focus-offset);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/* Hover: the field edge step at the same weight [D140]; the ring suppresses it. */
|
|
337
|
+
.host:hover:not(:focus-visible) > .collapsed > .corner,
|
|
338
|
+
.host:hover:not(:focus-visible) > .collapsed > .edge,
|
|
339
|
+
.host:hover:not(:focus-visible) > .collapsed > .left,
|
|
340
|
+
.host:hover:not(:focus-visible) > .collapsed > .right {
|
|
341
|
+
border-color: var(--primary12);
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
/*
|
|
345
|
+
* Landing from a close: the trigger's frame stays --primary12 in the new
|
|
346
|
+
* snapshot and while the morph runs, then eases to --role-rule on the
|
|
347
|
+
* landed box once the flag clears (--fgd-duration-quick).
|
|
348
|
+
*/
|
|
349
|
+
.landing > .corner,
|
|
350
|
+
.landing > .edge,
|
|
351
|
+
.landing > .left,
|
|
352
|
+
.landing > .right {
|
|
353
|
+
border-color: var(--primary12);
|
|
354
|
+
transition: none;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/* Closing: every piece's group runs the faster close (startExpandingTransition sets the flag). */
|
|
358
|
+
:root[data-fgd-expanding='close'] .tl,
|
|
359
|
+
:root[data-fgd-expanding='close'] .tr,
|
|
360
|
+
:root[data-fgd-expanding='close'] .bl,
|
|
361
|
+
:root[data-fgd-expanding='close'] .br {
|
|
362
|
+
--xb-class: fgd-xb fgd-xb-corner closing;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
:root[data-fgd-expanding='close'] .t,
|
|
366
|
+
:root[data-fgd-expanding='close'] .b,
|
|
367
|
+
:root[data-fgd-expanding='close'] .left,
|
|
368
|
+
:root[data-fgd-expanding='close'] .right {
|
|
369
|
+
--xb-class: fgd-xb fgd-xb-edge closing;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
:root[data-fgd-expanding='close'] .content {
|
|
373
|
+
--xb-class: fgd-xb fgd-xb-content closing;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
:root[data-fgd-expanding='close'] .face {
|
|
377
|
+
--xb-class: fgd-xb fgd-xb-face closing;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
:root[data-fgd-expanding='close'] .collapsed > .face::after {
|
|
381
|
+
--xb-class: fgd-xb fgd-xb-focus closing;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
:root[data-fgd-expanding='close'] .main {
|
|
385
|
+
--xb-class: fgd-xb fgd-xb-main closing;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
:root[data-fgd-expanding='close'] .main .end {
|
|
389
|
+
--xb-class: fgd-xb fgd-xb-end closing;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
:root[data-fgd-expanding='close'] .extra,
|
|
393
|
+
:root[data-fgd-expanding='close'] .extraFallback {
|
|
394
|
+
--xb-class: fgd-xb fgd-xb-extra closing;
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
@layer print {
|
|
399
|
+
@media print {
|
|
400
|
+
/* The box prints as its content in one black --border-size-1 frame (the remap turns --primary12 black). */
|
|
401
|
+
.head,
|
|
402
|
+
.foot,
|
|
403
|
+
.face,
|
|
404
|
+
.left,
|
|
405
|
+
.right {
|
|
406
|
+
display: none;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.content {
|
|
410
|
+
margin-block: 0;
|
|
411
|
+
padding: 0;
|
|
412
|
+
border: var(--border-size-1) solid var(--primary12);
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/foundations/expanding-box/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,4BAA4B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/foundations/expanding-box/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,4BAA4B,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** Which way the morph runs: `open` grows the trigger into the dialog; `close` is the faster way back. */
|
|
2
|
+
export type ExpandingTransitionDirection = 'open' | 'close';
|
|
3
|
+
/** Options for `startExpandingTransition`. */
|
|
4
|
+
export type StartExpandingTransitionOptions = {
|
|
5
|
+
/** `open` or `close`: sets `<html data-fgd-expanding>`, which picks the timing. */
|
|
6
|
+
direction: ExpandingTransitionDirection;
|
|
7
|
+
/** The owner's `morph` prop. Default `true`; `false` applies the update at once, with no morph. */
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* The element the morph reads the shared switch and tokens on, usually the
|
|
11
|
+
* trigger (default: the root): `--fgd-outline-morph: none` there, or the
|
|
12
|
+
* direction's duration token (`--fgd-duration-expand` to open,
|
|
13
|
+
* `--fgd-duration-collapse` to close) resolving to 0, applies the update
|
|
14
|
+
* at once [D204].
|
|
15
|
+
*/
|
|
16
|
+
source?: Element | null;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Runs `update` (the state change that swaps which box is active) as the
|
|
20
|
+
* morph. Resolves once the morph finishes, or on a microtask when it doesn't
|
|
21
|
+
* run. Never rejects.
|
|
22
|
+
*
|
|
23
|
+
* Without View Transitions or `view-transition-class`, under
|
|
24
|
+
* `prefers-reduced-motion: reduce`, in forced colors or print, with
|
|
25
|
+
* `enabled: false`, where `--fgd-outline-morph: none` applies to the source,
|
|
26
|
+
* or with the direction's duration token at 0 (read at call time), it calls
|
|
27
|
+
* `update()` directly and the change is instant. Otherwise it sets
|
|
28
|
+
* `<html data-fgd-expanding="open|close">` and calls
|
|
29
|
+
* `document.startViewTransition(() => flushSync(update))`, removing the flag
|
|
30
|
+
* when the last running morph settles. Re-entry guards are the owner's.
|
|
31
|
+
*/
|
|
32
|
+
export declare function startExpandingTransition(update: () => void, options: StartExpandingTransitionOptions): Promise<void>;
|
|
33
|
+
//# sourceMappingURL=startExpandingTransition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"startExpandingTransition.d.ts","sourceRoot":"","sources":["../../src/foundations/expanding-box/startExpandingTransition.ts"],"names":[],"mappings":"AAUA,0GAA0G;AAC1G,MAAM,MAAM,4BAA4B,GAAG,MAAM,GAAG,OAAO,CAAA;AAE3D,8CAA8C;AAC9C,MAAM,MAAM,+BAA+B,GAAG;IAC5C,mFAAmF;IACnF,SAAS,EAAE,4BAA4B,CAAA;IACvC,mGAAmG;IACnG,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;CACxB,CAAA;AA2CD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,MAAM,IAAI,EAClB,OAAO,EAAE,+BAA+B,GACvC,OAAO,CAAC,IAAI,CAAC,CA8Bf"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { flushSync } from 'react-dom';
|
|
3
|
+
/** Morphs running now; the root flag stays until the last one settles. */
|
|
4
|
+
let running = 0;
|
|
5
|
+
const noop = () => { };
|
|
6
|
+
/** A `<time>` custom property's computed value in ms ("333ms", "0.2s"), or null. */
|
|
7
|
+
function timeMs(value) {
|
|
8
|
+
const match = value.trim().match(/^(-?[\d.]+)(ms|s)$/);
|
|
9
|
+
return match ? parseFloat(match[1]) * (match[2] === 's' ? 1000 : 1) : null;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Whether the morph can run, read now: View Transitions with
|
|
13
|
+
* `view-transition-class` (the pieces are styled by class); motion allowed,
|
|
14
|
+
* no forced colors and not printing (as the outline morph, §9.17); the
|
|
15
|
+
* owner's `morph` on; the shared switch `--fgd-outline-morph` not `none` on
|
|
16
|
+
* the source; and the direction's duration token not 0 there [D204].
|
|
17
|
+
*/
|
|
18
|
+
function canMorph(options) {
|
|
19
|
+
if (options.enabled === false)
|
|
20
|
+
return false;
|
|
21
|
+
if (typeof document === 'undefined' || typeof document.startViewTransition !== 'function') {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
if (typeof CSS === 'undefined' || !CSS.supports('view-transition-class', 'a')) {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
if (typeof matchMedia === 'function' &&
|
|
28
|
+
(matchMedia('(prefers-reduced-motion: reduce)').matches ||
|
|
29
|
+
matchMedia('(forced-colors: active)').matches ||
|
|
30
|
+
matchMedia('print').matches)) {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
const style = getComputedStyle(options.source ?? document.documentElement);
|
|
34
|
+
if (style.getPropertyValue('--fgd-outline-morph').trim() === 'none')
|
|
35
|
+
return false;
|
|
36
|
+
const token = options.direction === 'open' ? '--fgd-duration-expand' : '--fgd-duration-collapse';
|
|
37
|
+
const duration = timeMs(style.getPropertyValue(token));
|
|
38
|
+
return duration === null || duration > 0;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Runs `update` (the state change that swaps which box is active) as the
|
|
42
|
+
* morph. Resolves once the morph finishes, or on a microtask when it doesn't
|
|
43
|
+
* run. Never rejects.
|
|
44
|
+
*
|
|
45
|
+
* Without View Transitions or `view-transition-class`, under
|
|
46
|
+
* `prefers-reduced-motion: reduce`, in forced colors or print, with
|
|
47
|
+
* `enabled: false`, where `--fgd-outline-morph: none` applies to the source,
|
|
48
|
+
* or with the direction's duration token at 0 (read at call time), it calls
|
|
49
|
+
* `update()` directly and the change is instant. Otherwise it sets
|
|
50
|
+
* `<html data-fgd-expanding="open|close">` and calls
|
|
51
|
+
* `document.startViewTransition(() => flushSync(update))`, removing the flag
|
|
52
|
+
* when the last running morph settles. Re-entry guards are the owner's.
|
|
53
|
+
*/
|
|
54
|
+
export function startExpandingTransition(update, options) {
|
|
55
|
+
if (!canMorph(options)) {
|
|
56
|
+
update();
|
|
57
|
+
return Promise.resolve();
|
|
58
|
+
}
|
|
59
|
+
const root = document.documentElement;
|
|
60
|
+
running += 1;
|
|
61
|
+
root.dataset.fgdExpanding = options.direction;
|
|
62
|
+
const settle = () => {
|
|
63
|
+
running -= 1;
|
|
64
|
+
if (running === 0) {
|
|
65
|
+
delete root.dataset.fgdExpanding;
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
let transition;
|
|
69
|
+
try {
|
|
70
|
+
transition = document.startViewTransition(() => flushSync(update));
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
// A browser that refuses to start one: apply the change as the fallback does.
|
|
74
|
+
settle();
|
|
75
|
+
update();
|
|
76
|
+
return Promise.resolve();
|
|
77
|
+
}
|
|
78
|
+
// A skipped morph (a duplicate name, a newer transition) still applies the update.
|
|
79
|
+
transition.ready.catch(noop);
|
|
80
|
+
return transition.finished.then(noop, noop).then(settle);
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=startExpandingTransition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"startExpandingTransition.js","sourceRoot":"","sources":["../../src/foundations/expanding-box/startExpandingTransition.ts"],"names":[],"mappings":"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"}
|
|
@@ -51,7 +51,7 @@ interface GroundFieldProps {
|
|
|
51
51
|
*/
|
|
52
52
|
preset: FieldPreset;
|
|
53
53
|
/**
|
|
54
|
-
* The one framed feature field per page: `--
|
|
54
|
+
* The one framed feature field per page: `--fgd-radius-feature` and a
|
|
55
55
|
* `--border-size-2` `--primary12` edge [D95]. Default `false`.
|
|
56
56
|
*/
|
|
57
57
|
framed?: boolean;
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
--role-edge: var(--primary12);
|
|
38
38
|
--ground-edge: var(--border-size-1);
|
|
39
39
|
|
|
40
|
-
padding: var(--
|
|
40
|
+
padding: var(--fgd-space-margin);
|
|
41
41
|
border: var(--ground-edge) solid var(--role-edge);
|
|
42
|
-
border-radius: var(--
|
|
42
|
+
border-radius: var(--radius-2-25);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
/*
|
|
@@ -60,11 +60,11 @@
|
|
|
60
60
|
--role-edge: var(--primary12);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
/* The one framed feature field per page: --
|
|
63
|
+
/* The one framed feature field per page: --fgd-radius-feature and a --border-size-2 edge [D95, D177]. */
|
|
64
64
|
.framed {
|
|
65
65
|
--ground-edge: var(--border-size-2);
|
|
66
66
|
|
|
67
|
-
border-radius: var(--
|
|
67
|
+
border-radius: var(--fgd-radius-feature);
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
|
|
@@ -5,7 +5,7 @@ export type { IconName, IconTier };
|
|
|
5
5
|
/**
|
|
6
6
|
* Icon classes (§6.10) [D166]. `size` is the Material Symbols tier:
|
|
7
7
|
* `inline` 16 px (`--size-px-3`), `tag` 20 px (`--size-px-4`), `block` 36 px
|
|
8
|
-
* (`--
|
|
8
|
+
* (`--fgd-size-icon-block`). The icon has no color axes: it is filled in
|
|
9
9
|
* `currentColor` and takes its part's ink role.
|
|
10
10
|
*/
|
|
11
11
|
export declare const icon: (props?: ({
|
package/foundations/icon/Icon.js
CHANGED
|
@@ -6,7 +6,7 @@ import styles from './icon.module.css';
|
|
|
6
6
|
/**
|
|
7
7
|
* Icon classes (§6.10) [D166]. `size` is the Material Symbols tier:
|
|
8
8
|
* `inline` 16 px (`--size-px-3`), `tag` 20 px (`--size-px-4`), `block` 36 px
|
|
9
|
-
* (`--
|
|
9
|
+
* (`--fgd-size-icon-block`). The icon has no color axes: it is filled in
|
|
10
10
|
* `currentColor` and takes its part's ink role.
|
|
11
11
|
*/
|
|
12
12
|
export const icon = cva(styles.base, {
|