@yaks/ui 0.0.0-stage → 0.2.36
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/Address.css +9 -0
- package/Address.js +32 -0
- package/Address.js.map +1 -0
- package/Address.ts +35 -0
- package/Annotated.css +17 -0
- package/Annotated.js +27 -0
- package/Annotated.js.map +1 -0
- package/Annotated.ts +32 -0
- package/AppShell.css +133 -0
- package/AppShell.js +90 -0
- package/AppShell.js.map +1 -0
- package/AppShell.ts +75 -0
- package/At.css +16 -0
- package/At.js +28 -0
- package/At.js.map +1 -0
- package/At.ts +37 -0
- package/Attachments.css +110 -0
- package/Attachments.js +119 -0
- package/Attachments.js.map +1 -0
- package/Attachments.ts +158 -0
- package/Badge.css +41 -0
- package/Badge.js +49 -0
- package/Badge.js.map +1 -0
- package/Badge.ts +38 -0
- package/Body.css +61 -0
- package/Body.js +103 -0
- package/Body.js.map +1 -0
- package/Body.ts +144 -0
- package/Button.css +121 -0
- package/Button.js +161 -0
- package/Button.js.map +1 -0
- package/Button.ts +92 -0
- package/Card.css +173 -0
- package/Card.js +165 -0
- package/Card.js.map +1 -0
- package/Card.ts +185 -0
- package/Cards.css +16 -0
- package/Cards.js +36 -0
- package/Cards.js.map +1 -0
- package/Cards.ts +64 -0
- package/Catalog.css +53 -0
- package/Catalog.js +55 -0
- package/Catalog.js.map +1 -0
- package/Catalog.ts +77 -0
- package/Chart.css +55 -0
- package/Chart.js +54 -0
- package/Chart.js.map +1 -0
- package/Chart.ts +62 -0
- package/Check.css +27 -0
- package/Check.js +77 -0
- package/Check.js.map +1 -0
- package/Check.ts +109 -0
- package/Chip.css +64 -0
- package/Chip.js +100 -0
- package/Chip.js.map +1 -0
- package/Chip.ts +66 -0
- package/Chips.css +10 -0
- package/Chips.js +41 -0
- package/Chips.js.map +1 -0
- package/Chips.ts +49 -0
- package/Choices.css +59 -0
- package/Choices.js +56 -0
- package/Choices.js.map +1 -0
- package/Choices.ts +73 -0
- package/Combobox.js +115 -0
- package/Combobox.js.map +1 -0
- package/Combobox.ts +230 -0
- package/Composer.css +247 -0
- package/Composer.js +222 -0
- package/Composer.js.map +1 -0
- package/Composer.ts +249 -0
- package/Contents.css +87 -0
- package/Contents.js +85 -0
- package/Contents.js.map +1 -0
- package/Contents.ts +117 -0
- package/Copy.css +28 -0
- package/Copy.js +62 -0
- package/Copy.js.map +1 -0
- package/Copy.ts +76 -0
- package/Doc.css +29 -0
- package/Doc.js +46 -0
- package/Doc.js.map +1 -0
- package/Doc.ts +64 -0
- package/Dock.css +157 -0
- package/Dock.js +229 -0
- package/Dock.js.map +1 -0
- package/Dock.ts +234 -0
- package/Dot.css +132 -0
- package/Dot.js +91 -0
- package/Dot.js.map +1 -0
- package/Dot.ts +72 -0
- package/Drop.css +133 -0
- package/Drop.js +148 -0
- package/Drop.js.map +1 -0
- package/Drop.ts +162 -0
- package/Edit.css +32 -0
- package/Edit.js +77 -0
- package/Edit.js.map +1 -0
- package/Edit.ts +72 -0
- package/Empty.css +32 -0
- package/Empty.js +45 -0
- package/Empty.js.map +1 -0
- package/Empty.ts +61 -0
- package/ErrorNotice.css +107 -0
- package/ErrorNotice.js +127 -0
- package/ErrorNotice.js.map +1 -0
- package/ErrorNotice.ts +133 -0
- package/Field.css +42 -0
- package/Field.js +186 -0
- package/Field.js.map +1 -0
- package/Field.ts +251 -0
- package/Form.css +95 -0
- package/Form.js +158 -0
- package/Form.js.map +1 -0
- package/Form.ts +212 -0
- package/Gallery.css +42 -0
- package/Gallery.js +57 -0
- package/Gallery.js.map +1 -0
- package/Gallery.ts +89 -0
- package/Group.css +8 -0
- package/Group.js +25 -0
- package/Group.js.map +1 -0
- package/Group.ts +40 -0
- package/Head.css +108 -0
- package/Head.js +124 -0
- package/Head.js.map +1 -0
- package/Head.ts +161 -0
- package/Icon.css +14 -0
- package/Icon.js +79 -0
- package/Icon.js.map +1 -0
- package/Icon.ts +78 -0
- package/IconButton.css +32 -0
- package/IconButton.js +74 -0
- package/IconButton.js.map +1 -0
- package/IconButton.ts +55 -0
- package/Id.css +29 -0
- package/Id.js +42 -0
- package/Id.js.map +1 -0
- package/Id.ts +31 -0
- package/Identity.css +122 -0
- package/Identity.js +88 -0
- package/Identity.js.map +1 -0
- package/Identity.ts +100 -0
- package/Index.css +68 -0
- package/Index.js +66 -0
- package/Index.js.map +1 -0
- package/Index.ts +63 -0
- package/LICENSE +202 -0
- package/Layer.css +82 -0
- package/Layer.js +86 -0
- package/Layer.js.map +1 -0
- package/Layer.ts +85 -0
- package/Lightbox.css +86 -0
- package/Lightbox.js +69 -0
- package/Lightbox.js.map +1 -0
- package/Lightbox.ts +79 -0
- package/Loading.css +22 -0
- package/Loading.js +75 -0
- package/Loading.js.map +1 -0
- package/Loading.ts +87 -0
- package/Logo.css +32 -0
- package/Logo.js +69 -0
- package/Logo.js.map +1 -0
- package/Logo.ts +81 -0
- package/Match.css +7 -0
- package/Match.js +51 -0
- package/Match.js.map +1 -0
- package/Match.ts +53 -0
- package/Menu.css +202 -0
- package/Menu.js +197 -0
- package/Menu.js.map +1 -0
- package/Menu.ts +233 -0
- package/Meter.css +49 -0
- package/Meter.js +149 -0
- package/Meter.js.map +1 -0
- package/Meter.ts +126 -0
- package/Metrics.css +43 -0
- package/Metrics.js +72 -0
- package/Metrics.js.map +1 -0
- package/Metrics.ts +66 -0
- package/Modal.css +94 -0
- package/Modal.js +114 -0
- package/Modal.js.map +1 -0
- package/Modal.ts +149 -0
- package/ModalDOM.css +23 -0
- package/More.css +135 -0
- package/More.js +135 -0
- package/More.js.map +1 -0
- package/More.ts +157 -0
- package/Notes.css +51 -0
- package/Notes.js +64 -0
- package/Notes.js.map +1 -0
- package/Notes.ts +95 -0
- package/Notice.css +30 -0
- package/Notice.js +50 -0
- package/Notice.js.map +1 -0
- package/Notice.ts +40 -0
- package/Overlay.css +8 -0
- package/Overlay.js +25 -0
- package/Overlay.js.map +1 -0
- package/Overlay.ts +33 -0
- package/Pager.css +33 -0
- package/Pager.js +44 -0
- package/Pager.js.map +1 -0
- package/Pager.ts +56 -0
- package/Pairs.css +50 -0
- package/Pairs.js +45 -0
- package/Pairs.js.map +1 -0
- package/Pairs.ts +88 -0
- package/Palette.css +77 -0
- package/Palette.js +41 -0
- package/Palette.js.map +1 -0
- package/Palette.ts +44 -0
- package/Panes.css +68 -0
- package/Panes.js +100 -0
- package/Panes.js.map +1 -0
- package/Panes.ts +97 -0
- package/Passage.css +58 -0
- package/Passage.js +80 -0
- package/Passage.js.map +1 -0
- package/Passage.ts +112 -0
- package/Peek.css +75 -0
- package/Peek.js +51 -0
- package/Peek.js.map +1 -0
- package/Peek.ts +74 -0
- package/Pills.css +127 -0
- package/Pills.js +119 -0
- package/Pills.js.map +1 -0
- package/Pills.ts +131 -0
- package/Plan.css +73 -0
- package/Plan.js +62 -0
- package/Plan.js.map +1 -0
- package/Plan.ts +80 -0
- package/Popover.css +47 -0
- package/Popover.js +62 -0
- package/Popover.js.map +1 -0
- package/Popover.ts +80 -0
- package/Preview.css +89 -0
- package/Preview.js +84 -0
- package/Preview.js.map +1 -0
- package/Preview.ts +98 -0
- package/Prop.css +117 -0
- package/Prop.js +94 -0
- package/Prop.js.map +1 -0
- package/Prop.ts +91 -0
- package/Quote.css +55 -0
- package/Quote.js +79 -0
- package/Quote.js.map +1 -0
- package/Quote.ts +85 -0
- package/README.md +596 -2
- package/Report.css +76 -0
- package/Report.js +105 -0
- package/Report.js.map +1 -0
- package/Report.ts +118 -0
- package/Rows.css +289 -0
- package/Rows.js +265 -0
- package/Rows.js.map +1 -0
- package/Rows.ts +337 -0
- package/Save.css +112 -0
- package/Save.js +100 -0
- package/Save.js.map +1 -0
- package/Save.ts +102 -0
- package/Section.css +52 -0
- package/Section.js +73 -0
- package/Section.js.map +1 -0
- package/Section.ts +86 -0
- package/Select.css +140 -0
- package/Select.js +208 -0
- package/Select.js.map +1 -0
- package/Select.ts +238 -0
- package/Shell.css +292 -0
- package/Shell.js +197 -0
- package/Shell.js.map +1 -0
- package/Shell.ts +193 -0
- package/SideNav.css +105 -0
- package/SideNav.js +197 -0
- package/SideNav.js.map +1 -0
- package/SideNav.ts +189 -0
- package/Skip.css +11 -0
- package/Skip.js +18 -0
- package/Skip.js.map +1 -0
- package/Skip.ts +16 -0
- package/Spark.css +14 -0
- package/Spark.js +84 -0
- package/Spark.js.map +1 -0
- package/Spark.ts +67 -0
- package/Stack.css +13 -0
- package/Stack.js +20 -0
- package/Stack.js.map +1 -0
- package/Stack.ts +31 -0
- package/Stamp.css +11 -0
- package/Stamp.js +40 -0
- package/Stamp.js.map +1 -0
- package/Stamp.ts +62 -0
- package/State.css +10 -0
- package/State.js +38 -0
- package/State.js.map +1 -0
- package/State.ts +38 -0
- package/Surface.css +139 -0
- package/Surface.js +79 -0
- package/Surface.js.map +1 -0
- package/Surface.ts +55 -0
- package/Table.css +147 -0
- package/Table.js +289 -0
- package/Table.js.map +1 -0
- package/Table.ts +343 -0
- package/Tabs.css +100 -0
- package/Tabs.js +108 -0
- package/Tabs.js.map +1 -0
- package/Tabs.ts +111 -0
- package/Tile.css +164 -0
- package/Tile.js +211 -0
- package/Tile.js.map +1 -0
- package/Tile.ts +174 -0
- package/Time.css +5 -0
- package/Time.js +80 -0
- package/Time.js.map +1 -0
- package/Time.ts +105 -0
- package/Timeline.css +35 -0
- package/Timeline.js +55 -0
- package/Timeline.js.map +1 -0
- package/Timeline.ts +84 -0
- package/Tip.css +18 -0
- package/Tip.js +24 -0
- package/Tip.js.map +1 -0
- package/Tip.ts +29 -0
- package/Toast.css +25 -0
- package/Toast.js +32 -0
- package/Toast.js.map +1 -0
- package/Toast.ts +34 -0
- package/Toolbar.css +66 -0
- package/Toolbar.js +58 -0
- package/Toolbar.js.map +1 -0
- package/Toolbar.ts +68 -0
- package/Transcript.css +221 -0
- package/Transcript.js +254 -0
- package/Transcript.js.map +1 -0
- package/Transcript.ts +296 -0
- package/Turns.css +49 -0
- package/Turns.js +58 -0
- package/Turns.js.map +1 -0
- package/Turns.ts +67 -0
- package/Value.css +33 -0
- package/Value.js +60 -0
- package/Value.js.map +1 -0
- package/Value.ts +48 -0
- package/_dist/Address.d.ts +3 -0
- package/_dist/Address.d.ts.map +1 -0
- package/_dist/Annotated.d.ts +3 -0
- package/_dist/Annotated.d.ts.map +1 -0
- package/_dist/AppShell.d.ts +3 -0
- package/_dist/AppShell.d.ts.map +1 -0
- package/_dist/At.d.ts +14 -0
- package/_dist/At.d.ts.map +1 -0
- package/_dist/Attachments.d.ts +6 -0
- package/_dist/Attachments.d.ts.map +1 -0
- package/_dist/Badge.d.ts +19 -0
- package/_dist/Badge.d.ts.map +1 -0
- package/_dist/Body.d.ts +5 -0
- package/_dist/Body.d.ts.map +1 -0
- package/_dist/Button.d.ts +18 -0
- package/_dist/Button.d.ts.map +1 -0
- package/_dist/Card.d.ts +28 -0
- package/_dist/Card.d.ts.map +1 -0
- package/_dist/Cards.d.ts +15 -0
- package/_dist/Cards.d.ts.map +1 -0
- package/_dist/Catalog.d.ts +3 -0
- package/_dist/Catalog.d.ts.map +1 -0
- package/_dist/Chart.d.ts +5 -0
- package/_dist/Chart.d.ts.map +1 -0
- package/_dist/Check.d.ts +17 -0
- package/_dist/Check.d.ts.map +1 -0
- package/_dist/Chip.d.ts +22 -0
- package/_dist/Chip.d.ts.map +1 -0
- package/_dist/Chips.d.ts +15 -0
- package/_dist/Chips.d.ts.map +1 -0
- package/_dist/Choices.d.ts +3 -0
- package/_dist/Choices.d.ts.map +1 -0
- package/_dist/Combobox.d.ts +55 -0
- package/_dist/Combobox.d.ts.map +1 -0
- package/_dist/Composer.d.ts +15 -0
- package/_dist/Composer.d.ts.map +1 -0
- package/_dist/Contents.d.ts +20 -0
- package/_dist/Contents.d.ts.map +1 -0
- package/_dist/Copy.d.ts +24 -0
- package/_dist/Copy.d.ts.map +1 -0
- package/_dist/Doc.d.ts +3 -0
- package/_dist/Doc.d.ts.map +1 -0
- package/_dist/Dock.d.ts +29 -0
- package/_dist/Dock.d.ts.map +1 -0
- package/_dist/Dot.d.ts +16 -0
- package/_dist/Dot.d.ts.map +1 -0
- package/_dist/Drop.d.ts +27 -0
- package/_dist/Drop.d.ts.map +1 -0
- package/_dist/Edit.d.ts +3 -0
- package/_dist/Edit.d.ts.map +1 -0
- package/_dist/Empty.d.ts +16 -0
- package/_dist/Empty.d.ts.map +1 -0
- package/_dist/ErrorNotice.d.ts +16 -0
- package/_dist/ErrorNotice.d.ts.map +1 -0
- package/_dist/Field.d.ts +53 -0
- package/_dist/Field.d.ts.map +1 -0
- package/_dist/Form.d.ts +44 -0
- package/_dist/Form.d.ts.map +1 -0
- package/_dist/Gallery.d.ts +3 -0
- package/_dist/Gallery.d.ts.map +1 -0
- package/_dist/Group.d.ts +14 -0
- package/_dist/Group.d.ts.map +1 -0
- package/_dist/Head.d.ts +13 -0
- package/_dist/Head.d.ts.map +1 -0
- package/_dist/Icon.d.ts +23 -0
- package/_dist/Icon.d.ts.map +1 -0
- package/_dist/IconButton.d.ts +8 -0
- package/_dist/IconButton.d.ts.map +1 -0
- package/_dist/Id.d.ts +3 -0
- package/_dist/Id.d.ts.map +1 -0
- package/_dist/Identity.d.ts +15 -0
- package/_dist/Identity.d.ts.map +1 -0
- package/_dist/Index.d.ts +3 -0
- package/_dist/Index.d.ts.map +1 -0
- package/_dist/Layer.d.ts +8 -0
- package/_dist/Layer.d.ts.map +1 -0
- package/_dist/Lightbox.d.ts +27 -0
- package/_dist/Lightbox.d.ts.map +1 -0
- package/_dist/Loading.d.ts +24 -0
- package/_dist/Loading.d.ts.map +1 -0
- package/_dist/Logo.d.ts +26 -0
- package/_dist/Logo.d.ts.map +1 -0
- package/_dist/Match.d.ts +5 -0
- package/_dist/Match.d.ts.map +1 -0
- package/_dist/Menu.d.ts +23 -0
- package/_dist/Menu.d.ts.map +1 -0
- package/_dist/Meter.d.ts +10 -0
- package/_dist/Meter.d.ts.map +1 -0
- package/_dist/Metrics.d.ts +3 -0
- package/_dist/Metrics.d.ts.map +1 -0
- package/_dist/Modal.d.ts +32 -0
- package/_dist/Modal.d.ts.map +1 -0
- package/_dist/More.d.ts +29 -0
- package/_dist/More.d.ts.map +1 -0
- package/_dist/Notes.d.ts +3 -0
- package/_dist/Notes.d.ts.map +1 -0
- package/_dist/Notice.d.ts +15 -0
- package/_dist/Notice.d.ts.map +1 -0
- package/_dist/Overlay.d.ts +3 -0
- package/_dist/Overlay.d.ts.map +1 -0
- package/_dist/Pager.d.ts +3 -0
- package/_dist/Pager.d.ts.map +1 -0
- package/_dist/Pairs.d.ts +3 -0
- package/_dist/Pairs.d.ts.map +1 -0
- package/_dist/Palette.d.ts +3 -0
- package/_dist/Palette.d.ts.map +1 -0
- package/_dist/Panes.d.ts +3 -0
- package/_dist/Panes.d.ts.map +1 -0
- package/_dist/Passage.d.ts +3 -0
- package/_dist/Passage.d.ts.map +1 -0
- package/_dist/Peek.d.ts +3 -0
- package/_dist/Peek.d.ts.map +1 -0
- package/_dist/Pills.d.ts +3 -0
- package/_dist/Pills.d.ts.map +1 -0
- package/_dist/Plan.d.ts +4 -0
- package/_dist/Plan.d.ts.map +1 -0
- package/_dist/Popover.d.ts +3 -0
- package/_dist/Popover.d.ts.map +1 -0
- package/_dist/Preview.d.ts +8 -0
- package/_dist/Preview.d.ts.map +1 -0
- package/_dist/Prop.d.ts +7 -0
- package/_dist/Prop.d.ts.map +1 -0
- package/_dist/Quote.d.ts +3 -0
- package/_dist/Quote.d.ts.map +1 -0
- package/_dist/Report.d.ts +8 -0
- package/_dist/Report.d.ts.map +1 -0
- package/_dist/Rows.d.ts +36 -0
- package/_dist/Rows.d.ts.map +1 -0
- package/_dist/Save.d.ts +4 -0
- package/_dist/Save.d.ts.map +1 -0
- package/_dist/Section.d.ts +3 -0
- package/_dist/Section.d.ts.map +1 -0
- package/_dist/Select.d.ts +29 -0
- package/_dist/Select.d.ts.map +1 -0
- package/_dist/Shell.d.ts +3 -0
- package/_dist/Shell.d.ts.map +1 -0
- package/_dist/SideNav.d.ts +31 -0
- package/_dist/SideNav.d.ts.map +1 -0
- package/_dist/Skip.d.ts +3 -0
- package/_dist/Skip.d.ts.map +1 -0
- package/_dist/Spark.d.ts +9 -0
- package/_dist/Spark.d.ts.map +1 -0
- package/_dist/Stack.d.ts +11 -0
- package/_dist/Stack.d.ts.map +1 -0
- package/_dist/Stamp.d.ts +3 -0
- package/_dist/Stamp.d.ts.map +1 -0
- package/_dist/State.d.ts +16 -0
- package/_dist/State.d.ts.map +1 -0
- package/_dist/Surface.d.ts +7 -0
- package/_dist/Surface.d.ts.map +1 -0
- package/_dist/Table.d.ts +10 -0
- package/_dist/Table.d.ts.map +1 -0
- package/_dist/Tabs.d.ts +30 -0
- package/_dist/Tabs.d.ts.map +1 -0
- package/_dist/Tile.d.ts +3 -0
- package/_dist/Tile.d.ts.map +1 -0
- package/_dist/Time.d.ts +24 -0
- package/_dist/Time.d.ts.map +1 -0
- package/_dist/Timeline.d.ts +3 -0
- package/_dist/Timeline.d.ts.map +1 -0
- package/_dist/Tip.d.ts +3 -0
- package/_dist/Tip.d.ts.map +1 -0
- package/_dist/Toast.d.ts +5 -0
- package/_dist/Toast.d.ts.map +1 -0
- package/_dist/Toolbar.d.ts +3 -0
- package/_dist/Toolbar.d.ts.map +1 -0
- package/_dist/Transcript.d.ts +35 -0
- package/_dist/Transcript.d.ts.map +1 -0
- package/_dist/Turns.d.ts +3 -0
- package/_dist/Turns.d.ts.map +1 -0
- package/_dist/Value.d.ts +3 -0
- package/_dist/Value.d.ts.map +1 -0
- package/_dist/ahead.d.ts +41 -0
- package/_dist/ahead.d.ts.map +1 -0
- package/_dist/chart-marks.d.ts +75 -0
- package/_dist/chart-marks.d.ts.map +1 -0
- package/_dist/clock.d.ts +4 -0
- package/_dist/clock.d.ts.map +1 -0
- package/_dist/contents-browser.d.ts +29 -0
- package/_dist/contents-browser.d.ts.map +1 -0
- package/_dist/contributions.d.ts +5 -0
- package/_dist/contributions.d.ts.map +1 -0
- package/_dist/copy-browser.d.ts +4 -0
- package/_dist/copy-browser.d.ts.map +1 -0
- package/_dist/el.d.ts +58 -0
- package/_dist/el.d.ts.map +1 -0
- package/_dist/everforest.d.ts +8 -0
- package/_dist/everforest.d.ts.map +1 -0
- package/_dist/float.d.ts +55 -0
- package/_dist/float.d.ts.map +1 -0
- package/_dist/gouache.d.ts +9 -0
- package/_dist/gouache.d.ts.map +1 -0
- package/_dist/guide.d.ts +38 -0
- package/_dist/guide.d.ts.map +1 -0
- package/_dist/halved.d.ts +3 -0
- package/_dist/halved.d.ts.map +1 -0
- package/_dist/history.d.ts +15 -0
- package/_dist/history.d.ts.map +1 -0
- package/_dist/interaction.d.ts +15 -0
- package/_dist/interaction.d.ts.map +1 -0
- package/_dist/kit.d.ts +30 -0
- package/_dist/kit.d.ts.map +1 -0
- package/_dist/ledger.d.ts +3 -0
- package/_dist/ledger.d.ts.map +1 -0
- package/_dist/linen.d.ts +8 -0
- package/_dist/linen.d.ts.map +1 -0
- package/_dist/menus-browser.d.ts +2 -0
- package/_dist/menus-browser.d.ts.map +1 -0
- package/_dist/menus.d.ts +6 -0
- package/_dist/menus.d.ts.map +1 -0
- package/_dist/mod.d.ts +47 -0
- package/_dist/mod.d.ts.map +1 -0
- package/_dist/modal-browser.d.ts +2 -0
- package/_dist/modal-browser.d.ts.map +1 -0
- package/_dist/modal-head.d.ts +43 -0
- package/_dist/modal-head.d.ts.map +1 -0
- package/_dist/navigate.d.ts +170 -0
- package/_dist/navigate.d.ts.map +1 -0
- package/_dist/overlays.d.ts +16 -0
- package/_dist/overlays.d.ts.map +1 -0
- package/_dist/palette-browser.d.ts +3 -0
- package/_dist/palette-browser.d.ts.map +1 -0
- package/_dist/panes-browser.d.ts +4 -0
- package/_dist/panes-browser.d.ts.map +1 -0
- package/_dist/paper.d.ts +6 -0
- package/_dist/paper.d.ts.map +1 -0
- package/_dist/parts.d.ts +102 -0
- package/_dist/parts.d.ts.map +1 -0
- package/_dist/pencil.d.ts +6 -0
- package/_dist/pencil.d.ts.map +1 -0
- package/_dist/placement.d.ts +12 -0
- package/_dist/placement.d.ts.map +1 -0
- package/_dist/relative.d.ts +41 -0
- package/_dist/relative.d.ts.map +1 -0
- package/_dist/rosepine.d.ts +8 -0
- package/_dist/rosepine.d.ts.map +1 -0
- package/_dist/routes.d.ts +20 -0
- package/_dist/routes.d.ts.map +1 -0
- package/_dist/sheet.d.ts +44 -0
- package/_dist/sheet.d.ts.map +1 -0
- package/_dist/slide.d.ts +4 -0
- package/_dist/slide.d.ts.map +1 -0
- package/_dist/stock.d.ts +21 -0
- package/_dist/stock.d.ts.map +1 -0
- package/_dist/store.d.ts +2 -0
- package/_dist/store.d.ts.map +1 -0
- package/_dist/theme.d.ts +102 -0
- package/_dist/theme.d.ts.map +1 -0
- package/_dist/ui.d.ts +2 -0
- package/_dist/ui.d.ts.map +1 -0
- package/_dist/video-cover.d.ts +3 -0
- package/_dist/video-cover.d.ts.map +1 -0
- package/_dist/viewport.d.ts +14 -0
- package/_dist/viewport.d.ts.map +1 -0
- package/_dist/wear.d.ts +5 -0
- package/_dist/wear.d.ts.map +1 -0
- package/ahead.js +81 -0
- package/ahead.js.map +1 -0
- package/ahead.ts +102 -0
- package/base.css +220 -0
- package/base.js +129 -0
- package/base.js.map +1 -0
- package/base.ts +127 -0
- package/chart-marks.js +156 -0
- package/chart-marks.js.map +1 -0
- package/chart-marks.ts +221 -0
- package/clock.js +41 -0
- package/clock.js.map +1 -0
- package/clock.ts +39 -0
- package/contents-browser.js +122 -0
- package/contents-browser.js.map +1 -0
- package/contents-browser.ts +135 -0
- package/contributions.js +28 -0
- package/contributions.js.map +1 -0
- package/contributions.ts +21 -0
- package/copy-browser.js +39 -0
- package/copy-browser.js.map +1 -0
- package/copy-browser.ts +44 -0
- package/deno.json +1 -0
- package/derived.css +64 -0
- package/el.js +176 -0
- package/el.js.map +1 -0
- package/el.ts +240 -0
- package/everforest.css +65 -0
- package/everforest.js +54 -0
- package/everforest.js.map +1 -0
- package/everforest.ts +52 -0
- package/float.js +182 -0
- package/float.js.map +1 -0
- package/float.ts +222 -0
- package/gouache.css +62 -0
- package/gouache.js +54 -0
- package/gouache.js.map +1 -0
- package/gouache.ts +52 -0
- package/guide.js +124 -0
- package/guide.js.map +1 -0
- package/guide.ts +222 -0
- package/halved.js +88 -0
- package/halved.js.map +1 -0
- package/halved.ts +102 -0
- package/history.js +11 -0
- package/history.js.map +1 -0
- package/history.ts +22 -0
- package/interaction.js +23 -0
- package/interaction.js.map +1 -0
- package/interaction.ts +43 -0
- package/kit.js +345 -0
- package/kit.js.map +1 -0
- package/kit.ts +408 -0
- package/ledger/Button.css +22 -0
- package/ledger/Head.css +72 -0
- package/ledger/Tabs.css +19 -0
- package/ledger/Tile.css +12 -0
- package/ledger.js +52 -0
- package/ledger.js.map +1 -0
- package/ledger.ts +34 -0
- package/linen.css +71 -0
- package/linen.js +54 -0
- package/linen.js.map +1 -0
- package/linen.ts +52 -0
- package/lucide.d.ts +4 -0
- package/menus-browser.js +72 -0
- package/menus-browser.js.map +1 -0
- package/menus-browser.ts +75 -0
- package/menus.js +84 -0
- package/menus.js.map +1 -0
- package/menus.ts +90 -0
- package/mod.js +46 -0
- package/mod.js.map +1 -0
- package/mod.ts +78 -0
- package/modal-browser.js +29 -0
- package/modal-browser.js.map +1 -0
- package/modal-browser.ts +31 -0
- package/modal-head.js +75 -0
- package/modal-head.js.map +1 -0
- package/modal-head.ts +81 -0
- package/navigate.js +934 -0
- package/navigate.js.map +1 -0
- package/navigate.ts +1177 -0
- package/overlays.js +177 -0
- package/overlays.js.map +1 -0
- package/overlays.ts +257 -0
- package/package.json +280 -4
- package/palette-browser.js +52 -0
- package/palette-browser.js.map +1 -0
- package/palette-browser.ts +54 -0
- package/panes-browser.js +40 -0
- package/panes-browser.js.map +1 -0
- package/panes-browser.ts +59 -0
- package/paper/base.css +28 -0
- package/paper/grain.css +18 -0
- package/paper.js +14 -0
- package/paper.js.map +1 -0
- package/paper.ts +16 -0
- package/parts.js +102 -0
- package/parts.js.map +1 -0
- package/parts.ts +117 -0
- package/pencil/Address.css +5 -0
- package/pencil/At.css +14 -0
- package/pencil/Body.css +10 -0
- package/pencil/Button.css +81 -0
- package/pencil/Card.css +175 -0
- package/pencil/Chart.css +31 -0
- package/pencil/Check.css +66 -0
- package/pencil/Chip.css +100 -0
- package/pencil/Chips.css +6 -0
- package/pencil/Copy.css +33 -0
- package/pencil/Drop.css +145 -0
- package/pencil/Empty.css +48 -0
- package/pencil/Field.css +42 -0
- package/pencil/Form.css +88 -0
- package/pencil/Loading.css +14 -0
- package/pencil/Menu.css +26 -0
- package/pencil/More.css +41 -0
- package/pencil/Report.css +11 -0
- package/pencil/Rows.css +48 -0
- package/pencil/SideNav.css +173 -0
- package/pencil/State.css +28 -0
- package/pencil/Surface.css +69 -0
- package/pencil/Tabs.css +137 -0
- package/pencil/base.css +19 -0
- package/pencil/paper.webp +0 -0
- package/pencil/pencil.svg +181 -0
- package/pencil.js +81 -0
- package/pencil.js.map +1 -0
- package/pencil.ts +34 -0
- package/placement.js +62 -0
- package/placement.js.map +1 -0
- package/placement.ts +93 -0
- package/relative.js +150 -0
- package/relative.js.map +1 -0
- package/relative.ts +186 -0
- package/resizes.js +23 -0
- package/resizes.js.map +1 -0
- package/resizes.ts +37 -0
- package/rosepine.css +59 -0
- package/rosepine.js +54 -0
- package/rosepine.js.map +1 -0
- package/rosepine.ts +52 -0
- package/routes.js +136 -0
- package/routes.js.map +1 -0
- package/routes.ts +190 -0
- package/sheet.js +7 -0
- package/sheet.js.map +1 -0
- package/sheet.ts +72 -0
- package/slide.js +37 -0
- package/slide.js.map +1 -0
- package/slide.ts +41 -0
- package/stock.js +38 -0
- package/stock.js.map +1 -0
- package/stock.ts +54 -0
- package/store.js +6 -0
- package/store.js.map +1 -0
- package/store.ts +14 -0
- package/theme.js +21 -0
- package/theme.js.map +1 -0
- package/theme.ts +159 -0
- package/ui.js +2 -0
- package/ui.js.map +1 -0
- package/ui.ts +2 -0
- package/video-cover.js +55 -0
- package/video-cover.js.map +1 -0
- package/video-cover.ts +72 -0
- package/viewport.js +56 -0
- package/viewport.js.map +1 -0
- package/viewport.ts +61 -0
- package/wear-build.ts +12 -0
- package/wear.js +40 -0
- package/wear.js.map +1 -0
- package/wear.ts +65 -0
package/Table.ts
ADDED
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Things in rows under column headings: `Table.Head` holds a `Table.Row` of
|
|
3
|
+
* `Table.Heading`s, and `Table.Body` a `Table.Row` of `Table.Cell`s for each
|
|
4
|
+
* thing. The table is a grid, not an html table, so a cell keeps to one line
|
|
5
|
+
* and cuts short with an ellipsis, as a table cell cannot; each row is a
|
|
6
|
+
* subgrid of it, so the cells line up. `cols` says what each column holds,
|
|
7
|
+
* which is how wide it runs: a variant its cells wear, or nothing for text.
|
|
8
|
+
*
|
|
9
|
+
* A row a press picks wears `Row-picks`, and is raised while the keyboard
|
|
10
|
+
* is on it (`Row-focus` shows that); `Row-hover` is the one under the
|
|
11
|
+
* pointer; a row that tells of the rest rather than naming a thing (what is
|
|
12
|
+
* too small to list) is `Row-quiet`, its words muted. A heading a press sorts
|
|
13
|
+
* by wears `Heading-sorts`, and
|
|
14
|
+
* `Heading-asc` or `Heading-desc` once the rows run by it, which its arrow
|
|
15
|
+
* says; `Heading-num` heads a column of numbers. A cell
|
|
16
|
+
* is `Cell-num` for a number, set right and never cut; `Cell-key` for the
|
|
17
|
+
* name of what its row holds, in a table of pairs; and `Cell-prose` for text
|
|
18
|
+
* that wraps rather than cutting short. What a press on a row or a heading
|
|
19
|
+
* does is the caller's. The table's `style` is its own: it carries the
|
|
20
|
+
* columns.
|
|
21
|
+
*
|
|
22
|
+
* A table can be a tree, its rows holding rows. A row that holds some starts
|
|
23
|
+
* its first cell with a `Toggle`, a press showing them under it (`Toggle-open`
|
|
24
|
+
* while they show), and a row sits an `Indent` deep for each row it is under;
|
|
25
|
+
* an `Indent` is as wide as a `Toggle`, and stands for one in a row that holds
|
|
26
|
+
* none, so the words of every row line up under its parent's.
|
|
27
|
+
*
|
|
28
|
+
* A wide table sits in `Table.Scroll`, an unpainted horizontal scrollport.
|
|
29
|
+
* A card's border stays on the outer card, outside this scrollport, so only
|
|
30
|
+
* the table's content contributes overflow and its frame is never clipped.
|
|
31
|
+
*
|
|
32
|
+
* Each part says what it is to a reader of the page by its role (`table`,
|
|
33
|
+
* `row`, `cell`, …), as an html table's elements would, and a terminal lays
|
|
34
|
+
* it out as the grid it is (@yaks/tui's `grid`).
|
|
35
|
+
*
|
|
36
|
+
* @module
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
import type { Sheet } from './sheet.ts'
|
|
40
|
+
/* @ts-types="npm:@types/react@19.3.0" */ import { createElement as h, type FunctionComponent } from 'react'
|
|
41
|
+
import { block, type Part, type Props } from './el.js'
|
|
42
|
+
import type { Colors, Specimen } from './theme.ts'
|
|
43
|
+
import { Value } from './Value.js'
|
|
44
|
+
|
|
45
|
+
/** What a column holds: the variant its cells wear (`num`, `key`,
|
|
46
|
+
* `prose`), or nothing for text. */
|
|
47
|
+
export type Col = string | false | null | undefined
|
|
48
|
+
|
|
49
|
+
/** What a table is drawn with: what each of its columns holds, and anything
|
|
50
|
+
* a part takes. */
|
|
51
|
+
export type TableProps = Props & { cols?: Col[] }
|
|
52
|
+
|
|
53
|
+
let Base = block('div', 'Table', {
|
|
54
|
+
Scroll: 'div',
|
|
55
|
+
Head: 'div',
|
|
56
|
+
Body: 'div',
|
|
57
|
+
Row: 'div',
|
|
58
|
+
Heading: 'div',
|
|
59
|
+
Cell: 'div',
|
|
60
|
+
Toggle: 'button',
|
|
61
|
+
Sort: 'button',
|
|
62
|
+
Indent: 'span',
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
// A part that says what it is to a reader of the page.
|
|
66
|
+
let roled = (P: Part, role: string): Part => (p: Props) => h(P, { role, ...p })
|
|
67
|
+
|
|
68
|
+
// The arrow a sorted heading ends with: the way its rows run.
|
|
69
|
+
let arrow = (mod: Props['mod']) => {
|
|
70
|
+
let mods = [mod].flat()
|
|
71
|
+
return mods.includes('asc') ? ' ↑' : mods.includes('desc') ? ' ↓' : ''
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// The tracks the columns run in, each named by what it holds (Table.css).
|
|
75
|
+
let template = (cols: Col[]) =>
|
|
76
|
+
cols.map((k) => k ? `var(--col-${k}, var(--col))` : 'var(--col)').join(' ')
|
|
77
|
+
|
|
78
|
+
/** A table. */
|
|
79
|
+
export let Table:
|
|
80
|
+
& FunctionComponent<TableProps>
|
|
81
|
+
& Record<
|
|
82
|
+
| 'Scroll'
|
|
83
|
+
| 'Head'
|
|
84
|
+
| 'Body'
|
|
85
|
+
| 'Row'
|
|
86
|
+
| 'Heading'
|
|
87
|
+
| 'Cell'
|
|
88
|
+
| 'Toggle'
|
|
89
|
+
| 'Sort'
|
|
90
|
+
| 'Indent',
|
|
91
|
+
Part
|
|
92
|
+
> = Object
|
|
93
|
+
.assign(
|
|
94
|
+
({ cols = [], ...p }: TableProps) =>
|
|
95
|
+
h(Base, { role: 'table', ...p, style: { '--cols': template(cols) } }),
|
|
96
|
+
{
|
|
97
|
+
Scroll: Base.Scroll,
|
|
98
|
+
Head: roled(Base.Head, 'rowgroup'),
|
|
99
|
+
Body: roled(Base.Body, 'rowgroup'),
|
|
100
|
+
Row: roled(Base.Row, 'row'),
|
|
101
|
+
Heading: ({ children, ...p }: Props) =>
|
|
102
|
+
h(
|
|
103
|
+
Base.Heading,
|
|
104
|
+
{ role: 'columnheader', ...p },
|
|
105
|
+
children,
|
|
106
|
+
h(
|
|
107
|
+
'span',
|
|
108
|
+
{ className: 'Table_Direction', 'aria-hidden': true },
|
|
109
|
+
arrow(p.mod),
|
|
110
|
+
),
|
|
111
|
+
),
|
|
112
|
+
Cell: roled(Base.Cell, 'cell'),
|
|
113
|
+
Toggle: Base.Toggle,
|
|
114
|
+
Sort: Base.Sort,
|
|
115
|
+
Indent: (p: Props) => h(Base.Indent, { 'aria-hidden': true, ...p }),
|
|
116
|
+
},
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
/** What it is, in a line. */
|
|
120
|
+
export let description =
|
|
121
|
+
'Things in rows under column headings, each cell one line.'
|
|
122
|
+
|
|
123
|
+
/** A grid of rows in a terminal too: every cell one line, cut with an
|
|
124
|
+
* ellipsis, a number set right and prose wrapped; headings muted until they
|
|
125
|
+
* sort; the row the keyboard is on raised. */
|
|
126
|
+
export let sheet = (c: Colors): Sheet => ({
|
|
127
|
+
Table: { grid: true },
|
|
128
|
+
Table_Row: { row: true },
|
|
129
|
+
Table_Heading: { fg: c.muted, ellipsis: true },
|
|
130
|
+
'Table_Heading-asc': { fg: c.accent },
|
|
131
|
+
'Table_Heading-desc': { fg: c.accent },
|
|
132
|
+
'Table_Heading-num': { align: 'right' },
|
|
133
|
+
'Table_Row-focus': { bg: c.card, fg: c.text },
|
|
134
|
+
'Table_Row-hover': { bg: c.surface },
|
|
135
|
+
'Table_Row-quiet': { fg: c.muted },
|
|
136
|
+
Table_Cell: { spaced: true, ellipsis: true },
|
|
137
|
+
'Table_Cell-num': { fg: c.number, align: 'right' },
|
|
138
|
+
'Table_Cell-key': { fg: c.muted },
|
|
139
|
+
'Table_Cell-prose': { fg: c.muted, wrap: true },
|
|
140
|
+
Table_Toggle: { fg: c.muted, glyph: '▸' },
|
|
141
|
+
'Table_Toggle-open': { glyph: '▾' },
|
|
142
|
+
Table_Indent: { glyph: ' ' },
|
|
143
|
+
})
|
|
144
|
+
|
|
145
|
+
let { Head, Body, Row, Heading, Cell, Toggle, Indent } = Table
|
|
146
|
+
|
|
147
|
+
let prop = (name: string, type: string, about: string, mod?: string) =>
|
|
148
|
+
h(
|
|
149
|
+
Row,
|
|
150
|
+
{ key: name, mod: ['picks', mod] },
|
|
151
|
+
h(Cell, {}, name),
|
|
152
|
+
h(Cell, {}, h(Value, { mod: 'id' }, type)),
|
|
153
|
+
h(Cell, { mod: 'prose' }, about),
|
|
154
|
+
h(Cell, { mod: 'num' }, '12,403'),
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
let pair = (key: string, value: string, shape?: string) =>
|
|
158
|
+
h(
|
|
159
|
+
Row,
|
|
160
|
+
{ key },
|
|
161
|
+
h(Cell, { mod: 'key' }, key),
|
|
162
|
+
h(Cell, {}, h(Value, { mod: shape }, value)),
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
// A specimen's own room, narrower than what its table holds.
|
|
166
|
+
let narrow: Props = { style: { maxWidth: '22rem' } }
|
|
167
|
+
|
|
168
|
+
// A row of a tree: as deep as it is, a toggle when it holds rows.
|
|
169
|
+
let branch = (
|
|
170
|
+
depth: number,
|
|
171
|
+
name: string,
|
|
172
|
+
holds: string,
|
|
173
|
+
n: string,
|
|
174
|
+
open?: boolean | null,
|
|
175
|
+
) =>
|
|
176
|
+
h(
|
|
177
|
+
Row,
|
|
178
|
+
{ key: name, mod: 'picks' },
|
|
179
|
+
h(
|
|
180
|
+
Cell,
|
|
181
|
+
{},
|
|
182
|
+
Array.from({ length: depth }, (_, i) => h(Indent, { key: i })),
|
|
183
|
+
open == null
|
|
184
|
+
? h(Indent, {})
|
|
185
|
+
: h(Toggle, { type: 'button', mod: open && 'open' }),
|
|
186
|
+
name,
|
|
187
|
+
),
|
|
188
|
+
h(Cell, {}, holds),
|
|
189
|
+
h(Cell, { mod: 'num' }, n),
|
|
190
|
+
)
|
|
191
|
+
|
|
192
|
+
/** A table sorted by one column, with the keyboard on a row and one under
|
|
193
|
+
* the pointer; a column too narrow for what it holds, sorted the other way;
|
|
194
|
+
* a tree; and a table of pairs. */
|
|
195
|
+
export let specimens = (): Specimen[] => [
|
|
196
|
+
[
|
|
197
|
+
'Table, Heading-sorts, Heading-desc, Heading-num, Row-picks, Row-focus, ' +
|
|
198
|
+
'Row-hover, Row-quiet, Cell-prose, Cell-num',
|
|
199
|
+
h(
|
|
200
|
+
Table,
|
|
201
|
+
{ cols: [null, null, 'prose', 'num'] },
|
|
202
|
+
h(
|
|
203
|
+
Head,
|
|
204
|
+
{},
|
|
205
|
+
h(
|
|
206
|
+
Row,
|
|
207
|
+
{},
|
|
208
|
+
h(
|
|
209
|
+
Heading,
|
|
210
|
+
{ mod: 'sorts' },
|
|
211
|
+
h(Table.Sort, { type: 'button' }, 'name'),
|
|
212
|
+
),
|
|
213
|
+
h(Heading, {}, 'type'),
|
|
214
|
+
h(Heading, {}, 'description'),
|
|
215
|
+
h(Heading, { mod: ['sorts', 'desc', 'num'] }, 'entities'),
|
|
216
|
+
),
|
|
217
|
+
),
|
|
218
|
+
h(
|
|
219
|
+
Body,
|
|
220
|
+
{},
|
|
221
|
+
prop('status', 'string · enum', 'where the task stands', 'focus'),
|
|
222
|
+
prop('owner', 'ref → session', 'who holds it', 'hover'),
|
|
223
|
+
prop(
|
|
224
|
+
'seen',
|
|
225
|
+
'string',
|
|
226
|
+
'when it was last read, by whom, and through which session: ' +
|
|
227
|
+
'prose wraps where a column of text would cut short',
|
|
228
|
+
),
|
|
229
|
+
h(
|
|
230
|
+
Row,
|
|
231
|
+
{ key: 'rest', mod: 'quiet' },
|
|
232
|
+
h(Cell, {}, '3 more'),
|
|
233
|
+
h(Cell, {}, ''),
|
|
234
|
+
h(Cell, { mod: 'prose' }, 'what the rows above leave out'),
|
|
235
|
+
h(Cell, { mod: 'num' }, '41'),
|
|
236
|
+
),
|
|
237
|
+
),
|
|
238
|
+
),
|
|
239
|
+
],
|
|
240
|
+
[
|
|
241
|
+
'Table, Heading-asc, Cell cut short',
|
|
242
|
+
h(
|
|
243
|
+
'div',
|
|
244
|
+
narrow,
|
|
245
|
+
h(
|
|
246
|
+
Table,
|
|
247
|
+
{ cols: [null, null, 'num'] },
|
|
248
|
+
h(
|
|
249
|
+
Head,
|
|
250
|
+
{},
|
|
251
|
+
h(
|
|
252
|
+
Row,
|
|
253
|
+
{},
|
|
254
|
+
h(Heading, { mod: ['sorts', 'asc'] }, 'id'),
|
|
255
|
+
h(Heading, {}, 'title'),
|
|
256
|
+
h(Heading, { mod: 'num' }, 'comments'),
|
|
257
|
+
),
|
|
258
|
+
),
|
|
259
|
+
h(
|
|
260
|
+
Body,
|
|
261
|
+
{},
|
|
262
|
+
h(
|
|
263
|
+
Row,
|
|
264
|
+
{},
|
|
265
|
+
h(Cell, {}, 'T-105'),
|
|
266
|
+
h(Cell, {}, 'The inspector shows every value where it stands'),
|
|
267
|
+
h(Cell, { mod: 'num' }, '3'),
|
|
268
|
+
),
|
|
269
|
+
h(
|
|
270
|
+
Row,
|
|
271
|
+
{},
|
|
272
|
+
h(Cell, {}, 'T-98'),
|
|
273
|
+
h(Cell, {}, 'A row keeps to one line'),
|
|
274
|
+
h(Cell, { mod: 'num' }, '1,204'),
|
|
275
|
+
),
|
|
276
|
+
),
|
|
277
|
+
),
|
|
278
|
+
),
|
|
279
|
+
],
|
|
280
|
+
[
|
|
281
|
+
'Table, Toggle, Toggle-open, Indent',
|
|
282
|
+
h(
|
|
283
|
+
Table,
|
|
284
|
+
{ cols: [null, null, 'num'] },
|
|
285
|
+
h(
|
|
286
|
+
Body,
|
|
287
|
+
{},
|
|
288
|
+
branch(0, '@yaks/task', '4 components', '40,213', true),
|
|
289
|
+
branch(1, 'task', 'a mark', '12,403', null),
|
|
290
|
+
branch(1, 'filed', '4 properties', '12,000', true),
|
|
291
|
+
branch(2, 'priority', 'number', ''),
|
|
292
|
+
branch(0, '@yaks/topic', '2 components', '381', false),
|
|
293
|
+
),
|
|
294
|
+
),
|
|
295
|
+
],
|
|
296
|
+
[
|
|
297
|
+
'Table, Scroll',
|
|
298
|
+
h(
|
|
299
|
+
Table.Scroll,
|
|
300
|
+
{ style: { maxWidth: '12rem' } },
|
|
301
|
+
h(
|
|
302
|
+
Table,
|
|
303
|
+
{ cols: ['num', 'num', 'num'] },
|
|
304
|
+
h(
|
|
305
|
+
Head,
|
|
306
|
+
null,
|
|
307
|
+
h(
|
|
308
|
+
Row,
|
|
309
|
+
null,
|
|
310
|
+
['Input', 'Cached', 'Output'].map((label) =>
|
|
311
|
+
h(Heading, { mod: 'num' }, label)
|
|
312
|
+
),
|
|
313
|
+
),
|
|
314
|
+
),
|
|
315
|
+
h(
|
|
316
|
+
Body,
|
|
317
|
+
null,
|
|
318
|
+
h(
|
|
319
|
+
Row,
|
|
320
|
+
null,
|
|
321
|
+
['1,234,567,890', '1,111,222,333', '456,789,012'].map((n) =>
|
|
322
|
+
h(Cell, { mod: 'num' }, n)
|
|
323
|
+
),
|
|
324
|
+
),
|
|
325
|
+
),
|
|
326
|
+
),
|
|
327
|
+
),
|
|
328
|
+
],
|
|
329
|
+
[
|
|
330
|
+
'Table, Cell-key',
|
|
331
|
+
h(
|
|
332
|
+
Table,
|
|
333
|
+
{ cols: ['key', null] },
|
|
334
|
+
h(
|
|
335
|
+
Body,
|
|
336
|
+
{},
|
|
337
|
+
pair('title', 'Inspect the data model'),
|
|
338
|
+
pair('priority', '2', 'num'),
|
|
339
|
+
pair('assignee', 'null', 'nil'),
|
|
340
|
+
),
|
|
341
|
+
),
|
|
342
|
+
],
|
|
343
|
+
]
|
package/Tabs.css
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/* A row of tabs: chips that read as controls, gapless (a tab's padding is
|
|
2
|
+
the spacing), the one showing lit. A badge says what waits behind a tab
|
|
3
|
+
without opening it: raised beside the face, a gap from it, never over
|
|
4
|
+
it, so the tab is as wide as both. Tabs that don't fit wrap to another
|
|
5
|
+
line, each kept whole, as pencil's do. */
|
|
6
|
+
.Tabs {
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-wrap: wrap;
|
|
9
|
+
align-items: center;
|
|
10
|
+
}
|
|
11
|
+
.Tabs_Tab {
|
|
12
|
+
font: inherit;
|
|
13
|
+
-webkit-user-select: none; /* pressed, not read, even where it links */
|
|
14
|
+
user-select: none;
|
|
15
|
+
color: var(--muted);
|
|
16
|
+
text-decoration: none; /* a tab that links reads as a tab */
|
|
17
|
+
background: none;
|
|
18
|
+
border: 1px solid transparent;
|
|
19
|
+
border-radius: calc(var(--radius) - 2px);
|
|
20
|
+
padding: 3px 4px;
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
min-width: var(--tap);
|
|
23
|
+
min-height: var(--tap);
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: center; /* the face stays centred as the floor grows */
|
|
26
|
+
justify-content: center;
|
|
27
|
+
gap: 3px;
|
|
28
|
+
overflow-wrap: normal;
|
|
29
|
+
}
|
|
30
|
+
@media (hover: hover) and (pointer: fine) {
|
|
31
|
+
.Tabs_Tab:hover {
|
|
32
|
+
color: var(--text); /* the face alone answers the pointer: no fill */
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
.Tabs_Tab-hover {
|
|
36
|
+
color: var(--text); /* the face alone answers the pointer: no fill */
|
|
37
|
+
}
|
|
38
|
+
.Tabs_Tab-on,
|
|
39
|
+
.Tabs_Input:checked ~ .Tabs_Tab {
|
|
40
|
+
color: var(--text);
|
|
41
|
+
background: var(--soft);
|
|
42
|
+
border-color: var(--border2);
|
|
43
|
+
}
|
|
44
|
+
/* Raised like a superscript; the shift is paint only, so the line keeps
|
|
45
|
+
its height. */
|
|
46
|
+
.Tabs_Badge {
|
|
47
|
+
position: relative;
|
|
48
|
+
top: -0.5em;
|
|
49
|
+
min-width: 1.1em;
|
|
50
|
+
padding: 0 0.25em;
|
|
51
|
+
border-radius: 1em;
|
|
52
|
+
background: var(--accent);
|
|
53
|
+
color: var(--bg);
|
|
54
|
+
font-size: 0.65em;
|
|
55
|
+
line-height: 1.5;
|
|
56
|
+
font-variant-numeric: tabular-nums;
|
|
57
|
+
text-align: center;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* A set (`TabSet`): the fieldset's own frame gone, its legend over the row,
|
|
61
|
+
each item's radio unseen but kept, so the keyboard and a form still have
|
|
62
|
+
it, and its focus ringed on its tab. Every panel wraps to a line of its
|
|
63
|
+
own under the tabs, and only the checked one's shows: a panel keeps its
|
|
64
|
+
own display, so a card stays a card. */
|
|
65
|
+
.Tabs:has(> .Tabs_Item) {
|
|
66
|
+
flex-wrap: wrap;
|
|
67
|
+
position: relative;
|
|
68
|
+
min-width: 0;
|
|
69
|
+
margin: 0;
|
|
70
|
+
padding: 0;
|
|
71
|
+
border: 0;
|
|
72
|
+
}
|
|
73
|
+
.Tabs_Legend {
|
|
74
|
+
margin-bottom: var(--half-gap);
|
|
75
|
+
padding: 0;
|
|
76
|
+
color: var(--text);
|
|
77
|
+
font-weight: 600;
|
|
78
|
+
}
|
|
79
|
+
.Tabs_Item {
|
|
80
|
+
display: contents;
|
|
81
|
+
}
|
|
82
|
+
.Tabs_Input {
|
|
83
|
+
position: absolute;
|
|
84
|
+
width: 1px;
|
|
85
|
+
height: 1px;
|
|
86
|
+
opacity: 0;
|
|
87
|
+
pointer-events: none;
|
|
88
|
+
}
|
|
89
|
+
.Tabs_Input:focus-visible ~ .Tabs_Tab {
|
|
90
|
+
outline: 2px solid var(--accent);
|
|
91
|
+
outline-offset: -2px;
|
|
92
|
+
}
|
|
93
|
+
.Tabs_Panel {
|
|
94
|
+
order: 1;
|
|
95
|
+
flex: 1 1 100%;
|
|
96
|
+
min-width: 0;
|
|
97
|
+
}
|
|
98
|
+
.Tabs_Input:not(:checked) ~ .Tabs_Panel {
|
|
99
|
+
display: none;
|
|
100
|
+
}
|
package/Tabs.js
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A row of tabs, one of them on:
|
|
3
|
+
* `<Tabs><Tabs.Tab mod='on'>…</Tabs.Tab></Tabs>`. A tab's face is the
|
|
4
|
+
* caller's (an icon, a word), and so is what pressing it does. `Tabs.Badge`,
|
|
5
|
+
* inside a tab, counts what waits behind it.
|
|
6
|
+
*
|
|
7
|
+
* `Tab-line` gives each control its own line in a terminal.
|
|
8
|
+
*
|
|
9
|
+
* Tabs can hold what they show: a `TabSet` is the same block on a fieldset,
|
|
10
|
+
* `TabSet.Legend` naming the choice and each `TabSet.Item` a radio, its `Tab`
|
|
11
|
+
* (the radio's label) and its `Panel`. The radios own which tab is on, arrow
|
|
12
|
+
* keys and all, so the set works without script; the checked one's panel
|
|
13
|
+
* shows under the row. A panel holding a card's worth is drawn as one:
|
|
14
|
+
* `<TabSet.Panel as={Card}>`.
|
|
15
|
+
*
|
|
16
|
+
* @module
|
|
17
|
+
*/ /* @ts-types="npm:@types/react@19.3.0" */ import { createElement as h } from "react";
|
|
18
|
+
import { block } from "./el.js";
|
|
19
|
+
/** A row of tabs. */ export let Tabs = block('div', 'Tabs', {
|
|
20
|
+
Tab: 'button',
|
|
21
|
+
Badge: 'span'
|
|
22
|
+
});
|
|
23
|
+
/** Tabs holding their panels: the same block on a form's elements, the row
|
|
24
|
+
* a fieldset, each tab the label of its radio. */ export let TabSet = block('fieldset', 'Tabs', {
|
|
25
|
+
Legend: 'legend',
|
|
26
|
+
Item: 'div',
|
|
27
|
+
Input: 'input',
|
|
28
|
+
Tab: 'label',
|
|
29
|
+
Badge: 'span',
|
|
30
|
+
Panel: 'section'
|
|
31
|
+
});
|
|
32
|
+
/** What it is, in a line. */ export let description = 'A row of tabs, one of them on.';
|
|
33
|
+
/** A tab is its face, a space between two where a browser pads them, and
|
|
34
|
+
* one between its face and its badge where a browser's gap is; the lit one
|
|
35
|
+
* is raised. A terminal has no checked radio to show one panel by, so a set
|
|
36
|
+
* reads as its radios, each with its panel under it. */ export let sheet = (c)=>({
|
|
37
|
+
Tabs: {
|
|
38
|
+
spaced: true
|
|
39
|
+
},
|
|
40
|
+
Tabs_Tab: {
|
|
41
|
+
fg: c.muted,
|
|
42
|
+
spaced: true
|
|
43
|
+
},
|
|
44
|
+
'Tabs_Tab-line': {
|
|
45
|
+
block: true
|
|
46
|
+
},
|
|
47
|
+
'Tabs_Tab-hover': {
|
|
48
|
+
fg: c.text
|
|
49
|
+
},
|
|
50
|
+
'Tabs_Tab-on': {
|
|
51
|
+
fg: c.text,
|
|
52
|
+
bg: c.card
|
|
53
|
+
},
|
|
54
|
+
Tabs_Badge: {
|
|
55
|
+
fg: c.bg,
|
|
56
|
+
bg: c.accent
|
|
57
|
+
},
|
|
58
|
+
Tabs_Legend: {
|
|
59
|
+
bold: true
|
|
60
|
+
},
|
|
61
|
+
Tabs_Item: {
|
|
62
|
+
spaced: true
|
|
63
|
+
},
|
|
64
|
+
Tabs_Panel: {
|
|
65
|
+
indent: 2
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
let { Tab, Badge } = Tabs;
|
|
69
|
+
let { Legend, Item, Panel } = TabSet;
|
|
70
|
+
let item = (id, tab, panel, checked = false)=>/*#__PURE__*/ h(Item, {}, /*#__PURE__*/ h(TabSet.Input, {
|
|
71
|
+
type: 'radio',
|
|
72
|
+
name: 'tabs-specimen',
|
|
73
|
+
id,
|
|
74
|
+
checked
|
|
75
|
+
}), /*#__PURE__*/ h(TabSet.Tab, {
|
|
76
|
+
for: id
|
|
77
|
+
}, tab), /*#__PURE__*/ h(Panel, {}, panel));
|
|
78
|
+
/** A row with one tab on, one under the pointer, and one with a badge; and
|
|
79
|
+
* a set whose first tab is checked. */ export let specimens = ()=>[
|
|
80
|
+
[
|
|
81
|
+
'Tabs, Tab-line',
|
|
82
|
+
/*#__PURE__*/ h(Tabs, {}, /*#__PURE__*/ h(Tab, {
|
|
83
|
+
mod: [
|
|
84
|
+
'line',
|
|
85
|
+
'on'
|
|
86
|
+
]
|
|
87
|
+
}, 'All'), /*#__PURE__*/ h(Tab, {
|
|
88
|
+
mod: 'line'
|
|
89
|
+
}, 'Selected'))
|
|
90
|
+
],
|
|
91
|
+
[
|
|
92
|
+
'Tabs, Tab-on, Tab-hover, Badge',
|
|
93
|
+
/*#__PURE__*/ h(Tabs, {}, /*#__PURE__*/ h(Tab, {
|
|
94
|
+
type: 'button',
|
|
95
|
+
mod: 'on'
|
|
96
|
+
}, 'Board'), /*#__PURE__*/ h(Tab, {
|
|
97
|
+
type: 'button',
|
|
98
|
+
mod: 'hover'
|
|
99
|
+
}, 'List'), /*#__PURE__*/ h(Tab, {
|
|
100
|
+
type: 'button'
|
|
101
|
+
}, 'Inbox', /*#__PURE__*/ h(Badge, {}, '3')))
|
|
102
|
+
],
|
|
103
|
+
[
|
|
104
|
+
'TabSet, Legend, Item, Panel',
|
|
105
|
+
/*#__PURE__*/ h(TabSet, {}, /*#__PURE__*/ h(Legend, {}, 'Which app do you use?'), item('tabs-claude', 'Claude', 'Add the connector in Settings.', true), item('tabs-chatgpt', 'ChatGPT', 'Turn on developer mode first.'))
|
|
106
|
+
]
|
|
107
|
+
];
|
|
108
|
+
//# sourceMappingURL=Tabs.js.map
|
package/Tabs.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tabs.js","sources":["./Tabs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;CAgBC,GAGD,uCAAuC,GAAG,SAAS,iBAAiB,CAAC,gBAA0B;AAC/F,SAAS,KAAK,kBAA4B;AAG1C,mBAAmB,GACnB,OAAO,IAAI,OAA6C,MAAM,OAAO,QAAQ;EAC3E,KAAK;EACL,OAAO;AACT,GAAE;AAEF;gDACgD,GAChD,OAAO,IAAI,SAGP,MACE,YACA,QACA;EACE,QAAQ;EACR,MAAM;EACN,OAAO;EACP,KAAK;EACL,OAAO;EACP,OAAO;AACT,GACD;AAEL,2BAA2B,GAC3B,OAAO,IAAI,cAAc,iCAAgC;AAEzD;;;sDAGsD,GACtD,OAAO,IAAI,QAAQ,CAAC,IAAqB,CAAC;IACxC,MAAM;MAAE,QAAQ;IAAK;IACrB,UAAU;MAAE,IAAI,EAAE,KAAK;MAAE,QAAQ;IAAK;IACtC,iBAAiB;MAAE,OAAO;IAAK;IAC/B,kBAAkB;MAAE,IAAI,EAAE,IAAI;IAAC;IAC/B,eAAe;MAAE,IAAI,EAAE,IAAI;MAAE,IAAI,EAAE,IAAI;IAAC;IACxC,YAAY;MAAE,IAAI,EAAE,EAAE;MAAE,IAAI,EAAE,MAAM;IAAC;IACrC,aAAa;MAAE,MAAM;IAAK;IAC1B,WAAW;MAAE,QAAQ;IAAK;IAC1B,YAAY;MAAE,QAAQ;IAAE;EAC1B,CAAC,EAAC;AAEF,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG;AACrB,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG;AAE9B,IAAI,OAAO,CAAC,IAAY,KAAa,OAAe,UAAU,KAAK,iBACjE,EACE,MACA,CAAC,iBACD,EAAE,OAAO,KAAK,EAAE;IAAE,MAAM;IAAS,MAAM;IAAiB;IAAI;EAAQ,kBACpE,EAAE,OAAO,GAAG,EAAE;IAAE,KAAK;EAAG,GAAG,oBAC3B,EAAE,OAAO,CAAC,GAAG;AAGjB;qCACqC,GACrC,OAAO,IAAI,YAAY,IAAkB;IACvC;MACE;oBACA,EACE,MACA,CAAC,iBACD,EAAE,KAAK;QAAE,KAAK;UAAC;UAAQ;SAAK;MAAC,GAAG,sBAChC,EAAE,KAAK;QAAE,KAAK;MAAO,GAAG;KAE3B;IACD;MACE;oBACA,EACE,MACA,CAAC,iBACD,EAAE,KAAK;QAAE,MAAM;QAAU,KAAK;MAAK,GAAG,wBACtC,EAAE,KAAK;QAAE,MAAM;QAAU,KAAK;MAAQ,GAAG,uBACzC,EAAE,KAAK;QAAE,MAAM;MAAS,GAAG,uBAAS,EAAE,OAAO,CAAC,GAAG;KAEpD;IACD;MACE;oBACA,EACE,QACA,CAAC,iBACD,EAAE,QAAQ,CAAC,GAAG,0BACd,KAAK,eAAe,UAAU,kCAAkC,OAChE,KAAK,gBAAgB,WAAW;KAEnC;GACF,CAAA"}
|
package/Tabs.ts
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A row of tabs, one of them on:
|
|
3
|
+
* `<Tabs><Tabs.Tab mod='on'>…</Tabs.Tab></Tabs>`. A tab's face is the
|
|
4
|
+
* caller's (an icon, a word), and so is what pressing it does. `Tabs.Badge`,
|
|
5
|
+
* inside a tab, counts what waits behind it.
|
|
6
|
+
*
|
|
7
|
+
* `Tab-line` gives each control its own line in a terminal.
|
|
8
|
+
*
|
|
9
|
+
* Tabs can hold what they show: a `TabSet` is the same block on a fieldset,
|
|
10
|
+
* `TabSet.Legend` naming the choice and each `TabSet.Item` a radio, its `Tab`
|
|
11
|
+
* (the radio's label) and its `Panel`. The radios own which tab is on, arrow
|
|
12
|
+
* keys and all, so the set works without script; the checked one's panel
|
|
13
|
+
* shows under the row. A panel holding a card's worth is drawn as one:
|
|
14
|
+
* `<TabSet.Panel as={Card}>`.
|
|
15
|
+
*
|
|
16
|
+
* @module
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import type { Sheet } from './sheet.ts'
|
|
20
|
+
/* @ts-types="npm:@types/react@19.3.0" */ import { createElement as h } from 'react'
|
|
21
|
+
import { block, type Part } from './el.js'
|
|
22
|
+
import type { Colors, Specimen } from './theme.ts'
|
|
23
|
+
|
|
24
|
+
/** A row of tabs. */
|
|
25
|
+
export let Tabs: Part & Record<'Tab' | 'Badge', Part> = block('div', 'Tabs', {
|
|
26
|
+
Tab: 'button',
|
|
27
|
+
Badge: 'span',
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
/** Tabs holding their panels: the same block on a form's elements, the row
|
|
31
|
+
* a fieldset, each tab the label of its radio. */
|
|
32
|
+
export let TabSet:
|
|
33
|
+
& Part
|
|
34
|
+
& Record<'Legend' | 'Item' | 'Input' | 'Tab' | 'Badge' | 'Panel', Part> =
|
|
35
|
+
block(
|
|
36
|
+
'fieldset',
|
|
37
|
+
'Tabs',
|
|
38
|
+
{
|
|
39
|
+
Legend: 'legend',
|
|
40
|
+
Item: 'div',
|
|
41
|
+
Input: 'input',
|
|
42
|
+
Tab: 'label',
|
|
43
|
+
Badge: 'span',
|
|
44
|
+
Panel: 'section',
|
|
45
|
+
},
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
/** What it is, in a line. */
|
|
49
|
+
export let description = 'A row of tabs, one of them on.'
|
|
50
|
+
|
|
51
|
+
/** A tab is its face, a space between two where a browser pads them, and
|
|
52
|
+
* one between its face and its badge where a browser's gap is; the lit one
|
|
53
|
+
* is raised. A terminal has no checked radio to show one panel by, so a set
|
|
54
|
+
* reads as its radios, each with its panel under it. */
|
|
55
|
+
export let sheet = (c: Colors): Sheet => ({
|
|
56
|
+
Tabs: { spaced: true },
|
|
57
|
+
Tabs_Tab: { fg: c.muted, spaced: true },
|
|
58
|
+
'Tabs_Tab-line': { block: true },
|
|
59
|
+
'Tabs_Tab-hover': { fg: c.text },
|
|
60
|
+
'Tabs_Tab-on': { fg: c.text, bg: c.card },
|
|
61
|
+
Tabs_Badge: { fg: c.bg, bg: c.accent },
|
|
62
|
+
Tabs_Legend: { bold: true },
|
|
63
|
+
Tabs_Item: { spaced: true },
|
|
64
|
+
Tabs_Panel: { indent: 2 },
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
let { Tab, Badge } = Tabs
|
|
68
|
+
let { Legend, Item, Panel } = TabSet
|
|
69
|
+
|
|
70
|
+
let item = (id: string, tab: string, panel: string, checked = false) =>
|
|
71
|
+
h(
|
|
72
|
+
Item,
|
|
73
|
+
{},
|
|
74
|
+
h(TabSet.Input, { type: 'radio', name: 'tabs-specimen', id, checked }),
|
|
75
|
+
h(TabSet.Tab, { for: id }, tab),
|
|
76
|
+
h(Panel, {}, panel),
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
/** A row with one tab on, one under the pointer, and one with a badge; and
|
|
80
|
+
* a set whose first tab is checked. */
|
|
81
|
+
export let specimens = (): Specimen[] => [
|
|
82
|
+
[
|
|
83
|
+
'Tabs, Tab-line',
|
|
84
|
+
h(
|
|
85
|
+
Tabs,
|
|
86
|
+
{},
|
|
87
|
+
h(Tab, { mod: ['line', 'on'] }, 'All'),
|
|
88
|
+
h(Tab, { mod: 'line' }, 'Selected'),
|
|
89
|
+
),
|
|
90
|
+
],
|
|
91
|
+
[
|
|
92
|
+
'Tabs, Tab-on, Tab-hover, Badge',
|
|
93
|
+
h(
|
|
94
|
+
Tabs,
|
|
95
|
+
{},
|
|
96
|
+
h(Tab, { type: 'button', mod: 'on' }, 'Board'),
|
|
97
|
+
h(Tab, { type: 'button', mod: 'hover' }, 'List'),
|
|
98
|
+
h(Tab, { type: 'button' }, 'Inbox', h(Badge, {}, '3')),
|
|
99
|
+
),
|
|
100
|
+
],
|
|
101
|
+
[
|
|
102
|
+
'TabSet, Legend, Item, Panel',
|
|
103
|
+
h(
|
|
104
|
+
TabSet,
|
|
105
|
+
{},
|
|
106
|
+
h(Legend, {}, 'Which app do you use?'),
|
|
107
|
+
item('tabs-claude', 'Claude', 'Add the connector in Settings.', true),
|
|
108
|
+
item('tabs-chatgpt', 'ChatGPT', 'Turn on developer mode first.'),
|
|
109
|
+
),
|
|
110
|
+
],
|
|
111
|
+
]
|