@elaraai/east-ui 1.0.60 → 1.0.62
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/dist/src/buttons/button/index.d.ts +3 -2
- package/dist/src/buttons/button/index.d.ts.map +1 -1
- package/dist/src/buttons/button/index.js +2 -2
- package/dist/src/buttons/button/types.d.ts +1 -0
- package/dist/src/buttons/button/types.d.ts.map +1 -1
- package/dist/src/buttons/copy-button/index.d.ts +4 -2
- package/dist/src/buttons/copy-button/index.d.ts.map +1 -1
- package/dist/src/buttons/copy-button/index.js +2 -2
- package/dist/src/buttons/copy-button/types.d.ts +2 -0
- package/dist/src/buttons/copy-button/types.d.ts.map +1 -1
- package/dist/src/buttons/icon-button/index.d.ts +5 -1
- package/dist/src/buttons/icon-button/index.d.ts.map +1 -1
- package/dist/src/buttons/icon-button/index.js +1 -1
- package/dist/src/buttons/icon-button/types.d.ts +4 -0
- package/dist/src/buttons/icon-button/types.d.ts.map +1 -1
- package/dist/src/charts/sparkline/index.d.ts +3 -3
- package/dist/src/charts/sparkline/index.js +3 -3
- package/dist/src/charts/spec/index.d.ts +1 -1
- package/dist/src/charts/spec/index.js +1 -1
- package/dist/src/collections/table/types.d.ts +1 -0
- package/dist/src/collections/table/types.d.ts.map +1 -1
- package/dist/src/collections/tree-view/index.d.ts +8 -2
- package/dist/src/collections/tree-view/index.d.ts.map +1 -1
- package/dist/src/collections/tree-view/index.js +4 -4
- package/dist/src/component.d.ts +80 -0
- package/dist/src/component.d.ts.map +1 -1
- package/dist/src/component.js +31 -0
- package/dist/src/component.js.map +1 -1
- package/dist/src/disclosure/carousel/index.d.ts +1 -1
- package/dist/src/disclosure/carousel/index.js +1 -1
- package/dist/src/disclosure/segment-group/index.d.ts +1 -0
- package/dist/src/disclosure/segment-group/index.d.ts.map +1 -1
- package/dist/src/disclosure/segment-group/types.d.ts +1 -0
- package/dist/src/disclosure/segment-group/types.d.ts.map +1 -1
- package/dist/src/disclosure/tabs/index.d.ts +1 -0
- package/dist/src/disclosure/tabs/index.d.ts.map +1 -1
- package/dist/src/disclosure/tabs/types.d.ts +1 -0
- package/dist/src/disclosure/tabs/types.d.ts.map +1 -1
- package/dist/src/display/avatar/index.d.ts +2 -0
- package/dist/src/display/avatar/index.d.ts.map +1 -1
- package/dist/src/display/avatar/types.d.ts +2 -0
- package/dist/src/display/avatar/types.d.ts.map +1 -1
- package/dist/src/display/avatar-group/types.d.ts +1 -0
- package/dist/src/display/avatar-group/types.d.ts.map +1 -1
- package/dist/src/display/badge/index.d.ts +2 -0
- package/dist/src/display/badge/index.d.ts.map +1 -1
- package/dist/src/display/badge/types.d.ts +2 -0
- package/dist/src/display/badge/types.d.ts.map +1 -1
- package/dist/src/display/icon/index.d.ts +3 -1
- package/dist/src/display/icon/index.d.ts.map +1 -1
- package/dist/src/display/icon/index.js +1 -1
- package/dist/src/display/icon/types.d.ts +2 -0
- package/dist/src/display/icon/types.d.ts.map +1 -1
- package/dist/src/display/kbd/types.d.ts +2 -0
- package/dist/src/display/kbd/types.d.ts.map +1 -1
- package/dist/src/display/segmented-meter/index.js +1 -1
- package/dist/src/display/stat/types.d.ts +1 -0
- package/dist/src/display/stat/types.d.ts.map +1 -1
- package/dist/src/display/tag/index.d.ts +2 -0
- package/dist/src/display/tag/index.d.ts.map +1 -1
- package/dist/src/display/tag/types.d.ts +2 -0
- package/dist/src/display/tag/types.d.ts.map +1 -1
- package/dist/src/forms/checkbox/types.d.ts +2 -0
- package/dist/src/forms/checkbox/types.d.ts.map +1 -1
- package/dist/src/forms/field/index.d.ts +4 -0
- package/dist/src/forms/field/index.d.ts.map +1 -1
- package/dist/src/forms/field/types.d.ts +8 -0
- package/dist/src/forms/field/types.d.ts.map +1 -1
- package/dist/src/forms/radio-card-group/types.d.ts +2 -0
- package/dist/src/forms/radio-card-group/types.d.ts.map +1 -1
- package/dist/src/forms/radio-group/types.d.ts +2 -0
- package/dist/src/forms/radio-group/types.d.ts.map +1 -1
- package/dist/src/forms/slider/index.d.ts +2 -0
- package/dist/src/forms/slider/index.d.ts.map +1 -1
- package/dist/src/forms/slider/types.d.ts +2 -0
- package/dist/src/forms/slider/types.d.ts.map +1 -1
- package/dist/src/forms/switch/types.d.ts +2 -0
- package/dist/src/forms/switch/types.d.ts.map +1 -1
- package/dist/src/forms/tags-input/types.d.ts +2 -0
- package/dist/src/forms/tags-input/types.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal.d.ts +1 -1
- package/dist/src/internal.d.ts.map +1 -1
- package/dist/src/internal.js +1 -1
- package/dist/src/internal.js.map +1 -1
- package/dist/src/layout/box/index.d.ts +2 -2
- package/dist/src/layout/box/index.js +2 -2
- package/dist/src/layout/configurator/index.d.ts +207 -0
- package/dist/src/layout/configurator/index.d.ts.map +1 -0
- package/dist/src/layout/configurator/index.js +177 -0
- package/dist/src/layout/configurator/index.js.map +1 -0
- package/dist/src/layout/configurator/types.d.ts +57 -0
- package/dist/src/layout/configurator/types.d.ts.map +1 -0
- package/dist/src/layout/configurator/types.js +38 -0
- package/dist/src/layout/configurator/types.js.map +1 -0
- package/dist/src/layout/index.d.ts +1 -0
- package/dist/src/layout/index.d.ts.map +1 -1
- package/dist/src/layout/index.js +1 -0
- package/dist/src/layout/index.js.map +1 -1
- package/dist/src/navigation/nav-list/types.d.ts +3 -0
- package/dist/src/navigation/nav-list/types.d.ts.map +1 -1
- package/dist/src/overlays/command-palette/types.d.ts +2 -0
- package/dist/src/overlays/command-palette/types.d.ts.map +1 -1
- package/dist/src/runtime/charts/sparkline.d.ts +1 -1
- package/dist/src/runtime/charts/sparkline.js +1 -1
- package/dist/src/runtime/disclosure/carousel.d.ts +3 -3
- package/dist/src/runtime/disclosure/carousel.js +3 -3
- package/dist/src/runtime/disclosure/collapsible.d.ts +1 -1
- package/dist/src/runtime/disclosure/collapsible.js +1 -1
- package/dist/src/runtime/layout/box.d.ts +1 -1
- package/dist/src/runtime/layout/box.js +1 -1
- package/dist/src/runtime/layout/configurator.d.ts +56 -0
- package/dist/src/runtime/layout/configurator.d.ts.map +1 -0
- package/dist/src/runtime/layout/configurator.js +53 -0
- package/dist/src/runtime/layout/configurator.js.map +1 -0
- package/dist/src/runtime/layout/grid.d.ts +4 -4
- package/dist/src/runtime/layout/grid.js +4 -4
- package/dist/src/runtime/layout/index.d.ts +1 -0
- package/dist/src/runtime/layout/index.d.ts.map +1 -1
- package/dist/src/runtime/layout/index.js +1 -0
- package/dist/src/runtime/layout/index.js.map +1 -1
- package/dist/src/runtime/layout/splitter.d.ts +2 -2
- package/dist/src/runtime/layout/splitter.js +2 -2
- package/dist/src/runtime/layout/stack.d.ts +1 -1
- package/dist/src/runtime/layout/stack.js +1 -1
- package/dist/src/runtime/layout/sticky.d.ts +2 -2
- package/dist/src/runtime/layout/sticky.js +2 -2
- package/dist/src/runtime/overlays/hover-card.d.ts +1 -1
- package/dist/src/runtime/overlays/hover-card.js +1 -1
- package/dist/src/runtime/typography/heading.d.ts +1 -1
- package/dist/src/runtime/typography/heading.js +1 -1
- package/dist/src/runtime/typography/highlight.d.ts +1 -1
- package/dist/src/runtime/typography/highlight.js +1 -1
- package/dist/src/runtime/typography/text.d.ts +1 -1
- package/dist/src/runtime/typography/text.js +1 -1
- package/dist/src/style/namespace.d.ts +1 -0
- package/dist/src/style/namespace.d.ts.map +1 -1
- package/dist/src/style/scheme.d.ts +6 -1
- package/dist/src/style/scheme.d.ts.map +1 -1
- package/dist/src/style/scheme.js +5 -0
- package/dist/src/style/scheme.js.map +1 -1
- package/dist/src/typography/heading/index.d.ts +1 -1
- package/dist/src/typography/heading/index.js +1 -1
- package/dist/src/typography/highlight/index.d.ts +1 -1
- package/dist/src/typography/highlight/index.js +1 -1
- package/dist/src/typography/list/index.d.ts +2 -0
- package/dist/src/typography/list/index.d.ts.map +1 -1
- package/dist/src/typography/list/types.d.ts +2 -0
- package/dist/src/typography/list/types.d.ts.map +1 -1
- package/dist/src/typography/text/index.d.ts +1 -1
- package/dist/src/typography/text/index.js +1 -1
- package/dist/test/buttons/button-group.examples.d.ts +1 -2
- package/dist/test/buttons/button-group.examples.d.ts.map +1 -1
- package/dist/test/buttons/button-group.examples.js +36 -17
- package/dist/test/buttons/button-group.examples.js.map +1 -1
- package/dist/test/buttons/button.examples.d.ts +3 -9
- package/dist/test/buttons/button.examples.d.ts.map +1 -1
- package/dist/test/buttons/button.examples.js +77 -81
- package/dist/test/buttons/button.examples.js.map +1 -1
- package/dist/test/buttons/close-button.examples.d.ts +3 -3
- package/dist/test/buttons/close-button.examples.d.ts.map +1 -1
- package/dist/test/buttons/close-button.examples.js +41 -23
- package/dist/test/buttons/close-button.examples.js.map +1 -1
- package/dist/test/buttons/copy-button.examples.d.ts +3 -2
- package/dist/test/buttons/copy-button.examples.d.ts.map +1 -1
- package/dist/test/buttons/copy-button.examples.js +28 -15
- package/dist/test/buttons/copy-button.examples.js.map +1 -1
- package/dist/test/buttons/icon-button.examples.d.ts +1 -4
- package/dist/test/buttons/icon-button.examples.d.ts.map +1 -1
- package/dist/test/buttons/icon-button.examples.js +118 -36
- package/dist/test/buttons/icon-button.examples.js.map +1 -1
- package/dist/test/buttons/toggle.examples.d.ts +1 -2
- package/dist/test/buttons/toggle.examples.d.ts.map +1 -1
- package/dist/test/buttons/toggle.examples.js +35 -22
- package/dist/test/buttons/toggle.examples.js.map +1 -1
- package/dist/test/charts/chart.examples.d.ts +17 -43
- package/dist/test/charts/chart.examples.d.ts.map +1 -1
- package/dist/test/charts/chart.examples.js +169 -432
- package/dist/test/charts/chart.examples.js.map +1 -1
- package/dist/test/charts/sparkline.examples.d.ts +2 -9
- package/dist/test/charts/sparkline.examples.d.ts.map +1 -1
- package/dist/test/charts/sparkline.examples.js +79 -70
- package/dist/test/charts/sparkline.examples.js.map +1 -1
- package/dist/test/collections/blend.examples.d.ts +13 -7
- package/dist/test/collections/blend.examples.d.ts.map +1 -1
- package/dist/test/collections/blend.examples.js +66 -65
- package/dist/test/collections/blend.examples.js.map +1 -1
- package/dist/test/collections/board.examples.d.ts +13 -11
- package/dist/test/collections/board.examples.d.ts.map +1 -1
- package/dist/test/collections/board.examples.js +228 -205
- package/dist/test/collections/board.examples.js.map +1 -1
- package/dist/test/collections/calendar.examples.d.ts +2 -6
- package/dist/test/collections/calendar.examples.d.ts.map +1 -1
- package/dist/test/collections/calendar.examples.js +91 -124
- package/dist/test/collections/calendar.examples.js.map +1 -1
- package/dist/test/collections/data-list.examples.d.ts +1 -7
- package/dist/test/collections/data-list.examples.d.ts.map +1 -1
- package/dist/test/collections/data-list.examples.js +93 -89
- package/dist/test/collections/data-list.examples.js.map +1 -1
- package/dist/test/collections/deck.examples.d.ts +8 -4
- package/dist/test/collections/deck.examples.d.ts.map +1 -1
- package/dist/test/collections/deck.examples.js +171 -106
- package/dist/test/collections/deck.examples.js.map +1 -1
- package/dist/test/collections/flowchart.examples.d.ts +13 -3
- package/dist/test/collections/flowchart.examples.d.ts.map +1 -1
- package/dist/test/collections/flowchart.examples.js +41 -81
- package/dist/test/collections/flowchart.examples.js.map +1 -1
- package/dist/test/collections/gantt.examples.d.ts +12 -23
- package/dist/test/collections/gantt.examples.d.ts.map +1 -1
- package/dist/test/collections/gantt.examples.js +246 -382
- package/dist/test/collections/gantt.examples.js.map +1 -1
- package/dist/test/collections/library.examples.d.ts +9 -6
- package/dist/test/collections/library.examples.d.ts.map +1 -1
- package/dist/test/collections/library.examples.js +63 -156
- package/dist/test/collections/library.examples.js.map +1 -1
- package/dist/test/collections/map.examples.d.ts +10 -5
- package/dist/test/collections/map.examples.d.ts.map +1 -1
- package/dist/test/collections/map.examples.js +76 -106
- package/dist/test/collections/map.examples.js.map +1 -1
- package/dist/test/collections/matrix.examples.d.ts +14 -38
- package/dist/test/collections/matrix.examples.d.ts.map +1 -1
- package/dist/test/collections/matrix.examples.js +103 -169
- package/dist/test/collections/matrix.examples.js.map +1 -1
- package/dist/test/collections/pagination.examples.d.ts +3 -3
- package/dist/test/collections/pagination.examples.d.ts.map +1 -1
- package/dist/test/collections/pagination.examples.js +49 -31
- package/dist/test/collections/pagination.examples.js.map +1 -1
- package/dist/test/collections/planner.examples.d.ts +15 -108
- package/dist/test/collections/planner.examples.d.ts.map +1 -1
- package/dist/test/collections/planner.examples.js +335 -401
- package/dist/test/collections/planner.examples.js.map +1 -1
- package/dist/test/collections/roster.examples.d.ts +19 -16
- package/dist/test/collections/roster.examples.d.ts.map +1 -1
- package/dist/test/collections/roster.examples.js +166 -168
- package/dist/test/collections/roster.examples.js.map +1 -1
- package/dist/test/collections/schematic.examples.d.ts +18 -13
- package/dist/test/collections/schematic.examples.d.ts.map +1 -1
- package/dist/test/collections/schematic.examples.js +417 -418
- package/dist/test/collections/schematic.examples.js.map +1 -1
- package/dist/test/collections/table.examples.d.ts +33 -38
- package/dist/test/collections/table.examples.d.ts.map +1 -1
- package/dist/test/collections/table.examples.js +293 -399
- package/dist/test/collections/table.examples.js.map +1 -1
- package/dist/test/collections/tree-view.examples.d.ts +2 -10
- package/dist/test/collections/tree-view.examples.d.ts.map +1 -1
- package/dist/test/collections/tree-view.examples.js +133 -178
- package/dist/test/collections/tree-view.examples.js.map +1 -1
- package/dist/test/collections/value-tree.examples.d.ts +23 -9
- package/dist/test/collections/value-tree.examples.d.ts.map +1 -1
- package/dist/test/collections/value-tree.examples.js +181 -227
- package/dist/test/collections/value-tree.examples.js.map +1 -1
- package/dist/test/container/card.examples.d.ts +7 -14
- package/dist/test/container/card.examples.d.ts.map +1 -1
- package/dist/test/container/card.examples.js +109 -117
- package/dist/test/container/card.examples.js.map +1 -1
- package/dist/test/disclosure/accordion.examples.d.ts +1 -6
- package/dist/test/disclosure/accordion.examples.d.ts.map +1 -1
- package/dist/test/disclosure/accordion.examples.js +73 -78
- package/dist/test/disclosure/accordion.examples.js.map +1 -1
- package/dist/test/disclosure/carousel.examples.d.ts +1 -7
- package/dist/test/disclosure/carousel.examples.d.ts.map +1 -1
- package/dist/test/disclosure/carousel.examples.js +87 -60
- package/dist/test/disclosure/carousel.examples.js.map +1 -1
- package/dist/test/disclosure/collapsible.examples.d.ts +3 -3
- package/dist/test/disclosure/collapsible.examples.d.ts.map +1 -1
- package/dist/test/disclosure/collapsible.examples.js +27 -23
- package/dist/test/disclosure/collapsible.examples.js.map +1 -1
- package/dist/test/disclosure/option-list.examples.js +3 -3
- package/dist/test/disclosure/option-list.examples.js.map +1 -1
- package/dist/test/disclosure/segment-group.examples.d.ts +3 -3
- package/dist/test/disclosure/segment-group.examples.d.ts.map +1 -1
- package/dist/test/disclosure/segment-group.examples.js +46 -36
- package/dist/test/disclosure/segment-group.examples.js.map +1 -1
- package/dist/test/disclosure/show-more.examples.d.ts +1 -2
- package/dist/test/disclosure/show-more.examples.d.ts.map +1 -1
- package/dist/test/disclosure/show-more.examples.js +24 -17
- package/dist/test/disclosure/show-more.examples.js.map +1 -1
- package/dist/test/disclosure/story.examples.d.ts +8 -8
- package/dist/test/disclosure/story.examples.d.ts.map +1 -1
- package/dist/test/disclosure/story.examples.js +109 -93
- package/dist/test/disclosure/story.examples.js.map +1 -1
- package/dist/test/disclosure/tabs.examples.d.ts +1 -8
- package/dist/test/disclosure/tabs.examples.d.ts.map +1 -1
- package/dist/test/disclosure/tabs.examples.js +94 -107
- package/dist/test/disclosure/tabs.examples.js.map +1 -1
- package/dist/test/display/avatar-group.examples.d.ts +1 -3
- package/dist/test/display/avatar-group.examples.d.ts.map +1 -1
- package/dist/test/display/avatar-group.examples.js +34 -29
- package/dist/test/display/avatar-group.examples.js.map +1 -1
- package/dist/test/display/avatar.examples.d.ts +1 -4
- package/dist/test/display/avatar.examples.d.ts.map +1 -1
- package/dist/test/display/avatar.examples.js +88 -40
- package/dist/test/display/avatar.examples.js.map +1 -1
- package/dist/test/display/badge.examples.d.ts +1 -9
- package/dist/test/display/badge.examples.d.ts.map +1 -1
- package/dist/test/display/badge.examples.js +93 -79
- package/dist/test/display/badge.examples.js.map +1 -1
- package/dist/test/display/bar-strip.examples.d.ts +1 -3
- package/dist/test/display/bar-strip.examples.d.ts.map +1 -1
- package/dist/test/display/bar-strip.examples.js +42 -48
- package/dist/test/display/bar-strip.examples.js.map +1 -1
- package/dist/test/display/chip-rail.examples.d.ts +1 -4
- package/dist/test/display/chip-rail.examples.d.ts.map +1 -1
- package/dist/test/display/chip-rail.examples.js +86 -36
- package/dist/test/display/chip-rail.examples.js.map +1 -1
- package/dist/test/display/combine.examples.d.ts.map +1 -1
- package/dist/test/display/combine.examples.js +102 -162
- package/dist/test/display/combine.examples.js.map +1 -1
- package/dist/test/display/editable-chip.examples.d.ts +1 -5
- package/dist/test/display/editable-chip.examples.d.ts.map +1 -1
- package/dist/test/display/editable-chip.examples.js +77 -51
- package/dist/test/display/editable-chip.examples.js.map +1 -1
- package/dist/test/display/icon.examples.d.ts +0 -1
- package/dist/test/display/icon.examples.d.ts.map +1 -1
- package/dist/test/display/icon.examples.js +101 -21
- package/dist/test/display/icon.examples.js.map +1 -1
- package/dist/test/display/image.examples.d.ts +1 -3
- package/dist/test/display/image.examples.d.ts.map +1 -1
- package/dist/test/display/image.examples.js +50 -25
- package/dist/test/display/image.examples.js.map +1 -1
- package/dist/test/display/kbd.examples.d.ts +1 -3
- package/dist/test/display/kbd.examples.d.ts.map +1 -1
- package/dist/test/display/kbd.examples.js +34 -29
- package/dist/test/display/kbd.examples.js.map +1 -1
- package/dist/test/display/meter.examples.d.ts +1 -4
- package/dist/test/display/meter.examples.d.ts.map +1 -1
- package/dist/test/display/meter.examples.js +107 -35
- package/dist/test/display/meter.examples.js.map +1 -1
- package/dist/test/display/metric-chip.examples.d.ts +4 -5
- package/dist/test/display/metric-chip.examples.d.ts.map +1 -1
- package/dist/test/display/metric-chip.examples.js +99 -35
- package/dist/test/display/metric-chip.examples.js.map +1 -1
- package/dist/test/display/segmented-meter.examples.d.ts +2 -2
- package/dist/test/display/segmented-meter.examples.d.ts.map +1 -1
- package/dist/test/display/segmented-meter.examples.js +43 -44
- package/dist/test/display/segmented-meter.examples.js.map +1 -1
- package/dist/test/display/stat.examples.d.ts +1 -5
- package/dist/test/display/stat.examples.d.ts.map +1 -1
- package/dist/test/display/stat.examples.js +83 -48
- package/dist/test/display/stat.examples.js.map +1 -1
- package/dist/test/display/tag.examples.d.ts +1 -8
- package/dist/test/display/tag.examples.d.ts.map +1 -1
- package/dist/test/display/tag.examples.js +109 -71
- package/dist/test/display/tag.examples.js.map +1 -1
- package/dist/test/display/trace.examples.d.ts +1 -4
- package/dist/test/display/trace.examples.d.ts.map +1 -1
- package/dist/test/display/trace.examples.js +113 -57
- package/dist/test/display/trace.examples.js.map +1 -1
- package/dist/test/extension.examples.js +1 -1
- package/dist/test/extension.examples.js.map +1 -1
- package/dist/test/feedback/banner.examples.d.ts +1 -12
- package/dist/test/feedback/banner.examples.d.ts.map +1 -1
- package/dist/test/feedback/banner.examples.js +53 -63
- package/dist/test/feedback/banner.examples.js.map +1 -1
- package/dist/test/feedback/progress.examples.d.ts +3 -7
- package/dist/test/feedback/progress.examples.d.ts.map +1 -1
- package/dist/test/feedback/progress.examples.js +84 -51
- package/dist/test/feedback/progress.examples.js.map +1 -1
- package/dist/test/feedback/status.examples.d.ts +1 -3
- package/dist/test/feedback/status.examples.d.ts.map +1 -1
- package/dist/test/feedback/status.examples.js +35 -24
- package/dist/test/feedback/status.examples.js.map +1 -1
- package/dist/test/forms/checkbox.examples.d.ts +1 -2
- package/dist/test/forms/checkbox.examples.d.ts.map +1 -1
- package/dist/test/forms/checkbox.examples.js +27 -17
- package/dist/test/forms/checkbox.examples.js.map +1 -1
- package/dist/test/forms/combobox.examples.d.ts +2 -9
- package/dist/test/forms/combobox.examples.d.ts.map +1 -1
- package/dist/test/forms/combobox.examples.js +100 -126
- package/dist/test/forms/combobox.examples.js.map +1 -1
- package/dist/test/forms/date-range-input.examples.d.ts +3 -6
- package/dist/test/forms/date-range-input.examples.d.ts.map +1 -1
- package/dist/test/forms/date-range-input.examples.js +82 -76
- package/dist/test/forms/date-range-input.examples.js.map +1 -1
- package/dist/test/forms/field.examples.d.ts +1 -1
- package/dist/test/forms/field.examples.d.ts.map +1 -1
- package/dist/test/forms/field.examples.js +24 -11
- package/dist/test/forms/field.examples.js.map +1 -1
- package/dist/test/forms/file-upload.examples.d.ts +1 -3
- package/dist/test/forms/file-upload.examples.d.ts.map +1 -1
- package/dist/test/forms/file-upload.examples.js +30 -33
- package/dist/test/forms/file-upload.examples.js.map +1 -1
- package/dist/test/forms/input.examples.d.ts +1 -11
- package/dist/test/forms/input.examples.d.ts.map +1 -1
- package/dist/test/forms/input.examples.js +106 -118
- package/dist/test/forms/input.examples.js.map +1 -1
- package/dist/test/forms/radio-card-group.examples.d.ts +3 -4
- package/dist/test/forms/radio-card-group.examples.d.ts.map +1 -1
- package/dist/test/forms/radio-card-group.examples.js +66 -47
- package/dist/test/forms/radio-card-group.examples.js.map +1 -1
- package/dist/test/forms/radio-group.examples.d.ts +3 -4
- package/dist/test/forms/radio-group.examples.d.ts.map +1 -1
- package/dist/test/forms/radio-group.examples.js +65 -48
- package/dist/test/forms/radio-group.examples.js.map +1 -1
- package/dist/test/forms/select.examples.d.ts +1 -3
- package/dist/test/forms/select.examples.d.ts.map +1 -1
- package/dist/test/forms/select.examples.js +34 -49
- package/dist/test/forms/select.examples.js.map +1 -1
- package/dist/test/forms/slider.examples.d.ts +1 -2
- package/dist/test/forms/slider.examples.d.ts.map +1 -1
- package/dist/test/forms/slider.examples.js +26 -24
- package/dist/test/forms/slider.examples.js.map +1 -1
- package/dist/test/forms/switch.examples.d.ts +1 -2
- package/dist/test/forms/switch.examples.d.ts.map +1 -1
- package/dist/test/forms/switch.examples.js +26 -19
- package/dist/test/forms/switch.examples.js.map +1 -1
- package/dist/test/forms/tags-input.examples.d.ts +0 -3
- package/dist/test/forms/tags-input.examples.d.ts.map +1 -1
- package/dist/test/forms/tags-input.examples.js +14 -32
- package/dist/test/forms/tags-input.examples.js.map +1 -1
- package/dist/test/forms/textarea.examples.d.ts +1 -3
- package/dist/test/forms/textarea.examples.d.ts.map +1 -1
- package/dist/test/forms/textarea.examples.js +28 -28
- package/dist/test/forms/textarea.examples.js.map +1 -1
- package/dist/test/forms/time-range-input.examples.d.ts +3 -5
- package/dist/test/forms/time-range-input.examples.d.ts.map +1 -1
- package/dist/test/forms/time-range-input.examples.js +73 -64
- package/dist/test/forms/time-range-input.examples.js.map +1 -1
- package/dist/test/layout/aligned-stack.examples.d.ts +13 -95
- package/dist/test/layout/aligned-stack.examples.d.ts.map +1 -1
- package/dist/test/layout/aligned-stack.examples.js +225 -368
- package/dist/test/layout/aligned-stack.examples.js.map +1 -1
- package/dist/test/layout/box.examples.d.ts +1 -12
- package/dist/test/layout/box.examples.d.ts.map +1 -1
- package/dist/test/layout/box.examples.js +135 -103
- package/dist/test/layout/box.examples.js.map +1 -1
- package/dist/test/layout/dock.examples.d.ts +9 -17
- package/dist/test/layout/dock.examples.d.ts.map +1 -1
- package/dist/test/layout/dock.examples.js +49 -33
- package/dist/test/layout/dock.examples.js.map +1 -1
- package/dist/test/layout/flex.examples.d.ts +1 -8
- package/dist/test/layout/flex.examples.d.ts.map +1 -1
- package/dist/test/layout/flex.examples.js +104 -72
- package/dist/test/layout/flex.examples.js.map +1 -1
- package/dist/test/layout/grid.examples.d.ts +2 -10
- package/dist/test/layout/grid.examples.d.ts.map +1 -1
- package/dist/test/layout/grid.examples.js +126 -127
- package/dist/test/layout/grid.examples.js.map +1 -1
- package/dist/test/layout/scroll-area.examples.js +2 -2
- package/dist/test/layout/scroll-area.examples.js.map +1 -1
- package/dist/test/layout/separator.examples.d.ts +3 -10
- package/dist/test/layout/separator.examples.d.ts.map +1 -1
- package/dist/test/layout/separator.examples.js +71 -84
- package/dist/test/layout/separator.examples.js.map +1 -1
- package/dist/test/layout/splitter.examples.d.ts +2 -8
- package/dist/test/layout/splitter.examples.d.ts.map +1 -1
- package/dist/test/layout/splitter.examples.js +100 -104
- package/dist/test/layout/splitter.examples.js.map +1 -1
- package/dist/test/layout/stack.examples.d.ts +2 -10
- package/dist/test/layout/stack.examples.d.ts.map +1 -1
- package/dist/test/layout/stack.examples.js +116 -83
- package/dist/test/layout/stack.examples.js.map +1 -1
- package/dist/test/layout/sticky.examples.js +2 -2
- package/dist/test/layout/sticky.examples.js.map +1 -1
- package/dist/test/navigation/app.examples.d.ts +5 -11
- package/dist/test/navigation/app.examples.d.ts.map +1 -1
- package/dist/test/navigation/app.examples.js +27 -42
- package/dist/test/navigation/app.examples.js.map +1 -1
- package/dist/test/navigation/breadcrumb.examples.d.ts +1 -3
- package/dist/test/navigation/breadcrumb.examples.d.ts.map +1 -1
- package/dist/test/navigation/breadcrumb.examples.js +13 -43
- package/dist/test/navigation/breadcrumb.examples.js.map +1 -1
- package/dist/test/navigation/nav-list.examples.d.ts +1 -4
- package/dist/test/navigation/nav-list.examples.d.ts.map +1 -1
- package/dist/test/navigation/nav-list.examples.js +141 -84
- package/dist/test/navigation/nav-list.examples.js.map +1 -1
- package/dist/test/overlays/command-palette.examples.d.ts +1 -4
- package/dist/test/overlays/command-palette.examples.d.ts.map +1 -1
- package/dist/test/overlays/command-palette.examples.js +75 -52
- package/dist/test/overlays/command-palette.examples.js.map +1 -1
- package/dist/test/overlays/dialog.examples.d.ts +1 -2
- package/dist/test/overlays/dialog.examples.d.ts.map +1 -1
- package/dist/test/overlays/dialog.examples.js +18 -19
- package/dist/test/overlays/dialog.examples.js.map +1 -1
- package/dist/test/overlays/drawer.examples.d.ts +2 -4
- package/dist/test/overlays/drawer.examples.d.ts.map +1 -1
- package/dist/test/overlays/drawer.examples.js +55 -32
- package/dist/test/overlays/drawer.examples.js.map +1 -1
- package/dist/test/overlays/hover-card.examples.d.ts +1 -2
- package/dist/test/overlays/hover-card.examples.d.ts.map +1 -1
- package/dist/test/overlays/hover-card.examples.js +17 -19
- package/dist/test/overlays/hover-card.examples.js.map +1 -1
- package/dist/test/overlays/menu.examples.d.ts +1 -2
- package/dist/test/overlays/menu.examples.d.ts.map +1 -1
- package/dist/test/overlays/menu.examples.js +18 -25
- package/dist/test/overlays/menu.examples.js.map +1 -1
- package/dist/test/overlays/popover.examples.d.ts +1 -2
- package/dist/test/overlays/popover.examples.d.ts.map +1 -1
- package/dist/test/overlays/popover.examples.js +20 -22
- package/dist/test/overlays/popover.examples.js.map +1 -1
- package/dist/test/overlays/toggle-tip.examples.d.ts +1 -2
- package/dist/test/overlays/toggle-tip.examples.d.ts.map +1 -1
- package/dist/test/overlays/toggle-tip.examples.js +15 -18
- package/dist/test/overlays/toggle-tip.examples.js.map +1 -1
- package/dist/test/platform/slice.examples.d.ts +2 -9
- package/dist/test/platform/slice.examples.d.ts.map +1 -1
- package/dist/test/platform/slice.examples.js +197 -289
- package/dist/test/platform/slice.examples.js.map +1 -1
- package/dist/test/slice/slice.examples.d.ts +0 -4
- package/dist/test/slice/slice.examples.d.ts.map +1 -1
- package/dist/test/slice/slice.examples.js +168 -218
- package/dist/test/slice/slice.examples.js.map +1 -1
- package/dist/test/style.examples.js +4 -4
- package/dist/test/style.examples.js.map +1 -1
- package/dist/test/typography/code-block.examples.d.ts +1 -9
- package/dist/test/typography/code-block.examples.d.ts.map +1 -1
- package/dist/test/typography/code-block.examples.js +82 -88
- package/dist/test/typography/code-block.examples.js.map +1 -1
- package/dist/test/typography/code.examples.d.ts +1 -7
- package/dist/test/typography/code.examples.d.ts.map +1 -1
- package/dist/test/typography/code.examples.js +54 -60
- package/dist/test/typography/code.examples.js.map +1 -1
- package/dist/test/typography/heading.examples.d.ts +1 -8
- package/dist/test/typography/heading.examples.d.ts.map +1 -1
- package/dist/test/typography/heading.examples.js +82 -68
- package/dist/test/typography/heading.examples.js.map +1 -1
- package/dist/test/typography/highlight.examples.d.ts +4 -8
- package/dist/test/typography/highlight.examples.d.ts.map +1 -1
- package/dist/test/typography/highlight.examples.js +49 -59
- package/dist/test/typography/highlight.examples.js.map +1 -1
- package/dist/test/typography/link.examples.d.ts +1 -7
- package/dist/test/typography/link.examples.d.ts.map +1 -1
- package/dist/test/typography/link.examples.js +57 -60
- package/dist/test/typography/link.examples.js.map +1 -1
- package/dist/test/typography/list.examples.d.ts +3 -11
- package/dist/test/typography/list.examples.d.ts.map +1 -1
- package/dist/test/typography/list.examples.js +117 -107
- package/dist/test/typography/list.examples.js.map +1 -1
- package/dist/test/typography/mark.examples.d.ts +1 -8
- package/dist/test/typography/mark.examples.d.ts.map +1 -1
- package/dist/test/typography/mark.examples.js +49 -68
- package/dist/test/typography/mark.examples.js.map +1 -1
- package/dist/test/typography/note.examples.d.ts +1 -3
- package/dist/test/typography/note.examples.d.ts.map +1 -1
- package/dist/test/typography/note.examples.js +24 -25
- package/dist/test/typography/note.examples.js.map +1 -1
- package/dist/test/typography/numeric.examples.d.ts +1 -5
- package/dist/test/typography/numeric.examples.d.ts.map +1 -1
- package/dist/test/typography/numeric.examples.js +60 -40
- package/dist/test/typography/numeric.examples.js.map +1 -1
- package/dist/test/typography/text.examples.d.ts +1 -18
- package/dist/test/typography/text.examples.d.ts.map +1 -1
- package/dist/test/typography/text.examples.js +146 -149
- package/dist/test/typography/text.examples.js.map +1 -1
- package/package.json +3 -3
|
@@ -4,17 +4,15 @@ import { jsx as _jsx, jsxs as _jsxs } from "@elaraai/east-ui/jsx-runtime";
|
|
|
4
4
|
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
5
5
|
*/
|
|
6
6
|
/** @jsxImportSource @elaraai/east-ui */
|
|
7
|
-
import { East, IntegerType, FloatType,
|
|
7
|
+
import { East, IntegerType, FloatType, StringType, StructType, ArrayType, BooleanType, NullType, example, variant } from "@elaraai/east";
|
|
8
8
|
import { State, UIComponentType } from "@elaraai/east-ui";
|
|
9
|
-
import {
|
|
9
|
+
import { Box, Button, Chart, Configurator, HStack, Reactive, Select, Switch, Table, Text, VStack } from "@elaraai/east-ui";
|
|
10
10
|
// Rows for the tooltip-over-sticky-header layering example (below).
|
|
11
|
-
const TOOLTIP_TABLE_ROWS = Array.from({ length: 14 }, (_, i) => ({
|
|
12
|
-
id: `SKU-${String(i + 1).padStart(3, "0")}`,
|
|
13
|
-
region: ["North", "South", "East", "West"][i % 4],
|
|
14
|
-
value: BigInt(600 + i * 73),
|
|
15
|
-
}));
|
|
16
11
|
// ============================================================================
|
|
17
|
-
//
|
|
12
|
+
// Module-scope fixtures — one per configurator cell (consolidation epic #455).
|
|
13
|
+
// ============================================================================
|
|
14
|
+
// ============================================================================
|
|
15
|
+
// Basic — the search-index front door
|
|
18
16
|
// ============================================================================
|
|
19
17
|
export const lineBasic = example({
|
|
20
18
|
keywords: ["Chart", "Line", "single-series", "band", "grid"],
|
|
@@ -24,405 +22,181 @@ export const lineBasic = example({
|
|
|
24
22
|
{ month: "Jan", sales: 100n }, { month: "Feb", sales: 150n },
|
|
25
23
|
{ month: "Mar", sales: 120n }, { month: "Apr", sales: 180n },
|
|
26
24
|
], ArrayType(StructType({ month: StringType, sales: IntegerType })));
|
|
27
|
-
return (_jsx(Box, { height: "
|
|
28
|
-
}),
|
|
29
|
-
inputs: [],
|
|
30
|
-
});
|
|
31
|
-
export const tooltipOverStickyTable = example({
|
|
32
|
-
keywords: ["Chart", "tooltip", "zIndex", "z-index", "sticky", "stickyHeader", "Table", "header", "overlay", "layering", "portal"],
|
|
33
|
-
description: "Chart hover tooltip layers ABOVE a sibling Table's sticky column header — hover the line near the BOTTOM of the chart so the tooltip overlaps the header row directly below it. The tooltip's z-index must sit on its own positioned content (the visx portal wrapper is position:static, so its z-index is ignored) or the sticky header (z-index 2) paints over it.",
|
|
34
|
-
fn: East.function([], UIComponentType, ($) => {
|
|
35
|
-
const chartRows = $.const([
|
|
36
|
-
{ month: "Jan", sales: 100n }, { month: "Feb", sales: 150n }, { month: "Mar", sales: 120n },
|
|
37
|
-
{ month: "Apr", sales: 180n }, { month: "May", sales: 140n }, { month: "Jun", sales: 170n },
|
|
38
|
-
], ArrayType(StructType({ month: StringType, sales: IntegerType })));
|
|
39
|
-
const tableRows = $.const(TOOLTIP_TABLE_ROWS, ArrayType(StructType({ id: StringType, region: StringType, value: IntegerType })));
|
|
40
|
-
return (_jsxs(VStack, { gap: "0", align: "stretch", width: "100%", children: [_jsx(Box, { height: "160px", width: "100%", children: _jsx(Chart, { layers: Chart.Line(chartRows, { x: r => r.month, y: r => r.sales }, { color: "teal.solid" }), grid: true, tooltip: true }) }), _jsx(Table, { data: tableRows, columns: ["id", "region", "value"], height: "150px", stickyHeader: true })] }));
|
|
41
|
-
}),
|
|
42
|
-
inputs: [],
|
|
43
|
-
});
|
|
44
|
-
export const columnStackedDiverging = example({
|
|
45
|
-
keywords: ["Chart", "Column", "stack", "stacked", "negative", "diverging", "bidirectional", "refLine"],
|
|
46
|
-
description: "Diverging stacked columns — a positive stack grows UP from zero and a negative stack (values × -1) grows DOWN, on one left axis; the negative stacked bars must render (a bare bot−top height collapses them to zero).",
|
|
47
|
-
fn: East.function([], UIComponentType, ($) => {
|
|
48
|
-
const freed = $.const([
|
|
49
|
-
{ day: "Mon", grp: "A", kl: 40.0 }, { day: "Mon", grp: "B", kl: 30.0 },
|
|
50
|
-
{ day: "Tue", grp: "A", kl: 55.0 }, { day: "Tue", grp: "B", kl: 20.0 },
|
|
51
|
-
{ day: "Wed", grp: "A", kl: 35.0 }, { day: "Wed", grp: "B", kl: 45.0 },
|
|
52
|
-
], ArrayType(StructType({ day: StringType, grp: StringType, kl: FloatType })));
|
|
53
|
-
const consumed = $.const([
|
|
54
|
-
{ day: "Mon", grp: "X", kl: 25.0 }, { day: "Mon", grp: "Y", kl: 35.0 },
|
|
55
|
-
{ day: "Tue", grp: "X", kl: 40.0 }, { day: "Tue", grp: "Y", kl: 15.0 },
|
|
56
|
-
{ day: "Wed", grp: "X", kl: 30.0 }, { day: "Wed", grp: "Y", kl: 20.0 },
|
|
57
|
-
], ArrayType(StructType({ day: StringType, grp: StringType, kl: FloatType })));
|
|
58
|
-
return (_jsx(Box, { height: "280px", width: "100%", children: _jsx(Chart, { grid: true, legend: true, tooltip: true, layers: [
|
|
59
|
-
Chart.Column(freed, { x: r => r.day, y: r => r.kl, by: r => r.grp }, { stack: "freed" }),
|
|
60
|
-
Chart.Column(consumed, { x: r => r.day, y: r => r.kl.multiply(-1.0), by: r => r.grp }, { stack: "consumed" }),
|
|
61
|
-
Chart.refLine({ y: 0.0 }),
|
|
62
|
-
] }) }));
|
|
63
|
-
}),
|
|
64
|
-
inputs: [],
|
|
65
|
-
});
|
|
66
|
-
export const lineMultiColumns = example({
|
|
67
|
-
keywords: ["Chart", "Line", "multi-series", "columns", "wide", "legend"],
|
|
68
|
-
description: "Multiple lines from wide value columns",
|
|
69
|
-
fn: East.function([], UIComponentType, ($) => {
|
|
70
|
-
const rows = $.const([
|
|
71
|
-
{ month: "Jan", mac: 10n, linux: 120n }, { month: "Feb", mac: 95n, linux: 110n },
|
|
72
|
-
{ month: "Mar", mac: 87n, linux: 125n }, { month: "Apr", mac: 110n, linux: 100n },
|
|
73
|
-
], ArrayType(StructType({ month: StringType, mac: IntegerType, linux: IntegerType })));
|
|
74
|
-
return (_jsx(Box, { height: "240px", width: "100%", children: _jsx(Chart, { layers: Chart.Line(rows, { x: r => r.month, columns: { Mac: r => r.mac, Linux: r => r.linux } }), legend: true, grid: true, tooltip: true }) }));
|
|
75
|
-
}),
|
|
76
|
-
inputs: [],
|
|
77
|
-
});
|
|
78
|
-
export const lineBreakdown = example({
|
|
79
|
-
keywords: ["Chart", "Line", "multi-series", "breakdown", "by", "split"],
|
|
80
|
-
description: "One line per breakdown value (long-format split)",
|
|
81
|
-
fn: East.function([], UIComponentType, ($) => {
|
|
82
|
-
const rows = $.const([
|
|
83
|
-
{ month: "Jan", os: "Mac", n: 10n }, { month: "Jan", os: "Linux", n: 120n },
|
|
84
|
-
{ month: "Feb", os: "Mac", n: 95n }, { month: "Feb", os: "Linux", n: 110n },
|
|
85
|
-
{ month: "Mar", os: "Mac", n: 87n }, { month: "Mar", os: "Linux", n: 125n },
|
|
86
|
-
], ArrayType(StructType({ month: StringType, os: StringType, n: IntegerType })));
|
|
87
|
-
return (_jsx(Box, { height: "240px", width: "100%", children: _jsx(Chart, { layers: Chart.Line(rows, { x: r => r.month, y: r => r.n, by: r => r.os }), legend: true, grid: true }) }));
|
|
25
|
+
return (_jsx(Box, { height: "260px", width: "100%", children: _jsx(Chart, { layers: Chart.Line(rows, { x: r => r.month, y: r => r.sales }, { color: "teal.solid" }), grid: true, tooltip: true }) }));
|
|
88
26
|
}),
|
|
89
27
|
inputs: [],
|
|
90
28
|
});
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
29
|
+
// ============================================================================
|
|
30
|
+
// Line — live configurator over the mark + axis dimensions
|
|
31
|
+
// ============================================================================
|
|
32
|
+
export const lineVariants = example({
|
|
33
|
+
keywords: ["Chart", "Line", "multi-series", "columns", "wide", "legend", "breakdown", "by", "split", "curve", "natural", "smooth", "step", "dots", "strokeWidth", "stepAfter", "stepBefore", "setpoint", "held", "dash", "layers", "per-series-style", "opacity", "tooltip", "fan", "sample-path", "overlay", "decoration", "time", "temporal", "DateTime", "format", "linear", "numeric", "domain", "axis", "numTicks", "tickValues", "ticks", "integer", "day", "align", "Planner", "extent", "runtime", "expression", "SubtypeExprOrValue", "forecast", "tickStyle", "titleStyle", "titleGap", "font", "typography", "fontSize", "fontFamily", "fontWeight", "color", "letterSpacing", "legibility", "label", "currency", "date", "compact", "pin", "explicit", "#318", "Column", "Reactive", "State", "interactive", "Switch", "Configurator", "getTag", "configurator"],
|
|
34
|
+
description: "Line chart configurator — a curve axis plus points and tick-format switches on ONE live line; the aside’s Q4 column tracks a reactive peak against a pinned domain",
|
|
35
|
+
fn: East.function([], UIComponentType, (_$) => {
|
|
36
|
+
const LINE_CURVE_NATURAL_DATA = [
|
|
96
37
|
{ month: "Jan", sales: 100n }, { month: "Feb", sales: 150n },
|
|
97
38
|
{ month: "Mar", sales: 120n }, { month: "Apr", sales: 180n },
|
|
98
|
-
]
|
|
99
|
-
return (_jsx(
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
})
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
inputs: [],
|
|
153
|
-
});
|
|
154
|
-
export const lineNumericX = example({
|
|
155
|
-
keywords: ["Chart", "Line", "linear", "numeric", "domain"],
|
|
156
|
-
description: "Continuous numeric x-axis with an explicit domain",
|
|
157
|
-
fn: East.function([], UIComponentType, ($) => {
|
|
158
|
-
const rows = $.const([
|
|
159
|
-
{ dose: 0.5, response: 12.0 }, { dose: 1.0, response: 30.0 },
|
|
160
|
-
{ dose: 2.5, response: 55.0 }, { dose: 5.0, response: 70.0 },
|
|
161
|
-
], ArrayType(StructType({ dose: FloatType, response: FloatType })));
|
|
162
|
-
return (_jsx(Box, { height: "240px", width: "100%", children: _jsx(Chart, { layers: Chart.Line(rows, { x: r => r.dose, y: r => r.response }, { color: "purple.solid" }), x: { label: "Dose", scale: "linear", domain: [0, 6] }, y: { label: "Response" }, grid: true }) }));
|
|
163
|
-
}),
|
|
164
|
-
inputs: [],
|
|
165
|
-
});
|
|
166
|
-
export const lineIntegerDayTicks = example({
|
|
167
|
-
keywords: ["Chart", "axis", "numTicks", "tickValues", "ticks", "integer", "day", "align", "Planner"],
|
|
168
|
-
description: "Explicit integer day ticks (tickValues) on the x-axis — pins the ticks to [0,1,…,6] so a stacked Planner's day columns line up, instead of the auto-niced set",
|
|
169
|
-
fn: East.function([], UIComponentType, ($) => {
|
|
170
|
-
const rows = $.const([
|
|
171
|
-
{ day: 0.0, temp: 22.0 }, { day: 2.0, temp: 20.5 },
|
|
172
|
-
{ day: 4.0, temp: 18.0 }, { day: 6.0, temp: 16.5 },
|
|
173
|
-
], ArrayType(StructType({ day: FloatType, temp: FloatType })));
|
|
174
|
-
return (_jsx(Box, { height: "240px", width: "100%", children: _jsx(Chart, { layers: Chart.Line(rows, { x: r => r.day, y: r => r.temp }, { color: "teal.solid" }), x: { label: "Day", scale: "linear", domain: [0, 6], tickValues: [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0] }, y: { label: "°C", numTicks: 3 }, grid: true }) }));
|
|
175
|
-
}),
|
|
176
|
-
inputs: [],
|
|
177
|
-
});
|
|
178
|
-
export const lineRuntimeDomain = example({
|
|
179
|
-
keywords: ["Chart", "Line", "domain", "axis", "extent", "runtime", "expression", "SubtypeExprOrValue", "forecast"],
|
|
180
|
-
description: "Numeric x-axis whose upper extent is runtime-driven — the domain max is an East expression (decision day + p95 + buffer)",
|
|
181
|
-
fn: East.function([], UIComponentType, ($) => {
|
|
182
|
-
const rows = $.const([
|
|
183
|
-
{ day: 0.0, value: 10.0 }, { day: 1.5, value: 22.0 },
|
|
184
|
-
{ day: 3.0, value: 41.0 }, { day: 4.0, value: 52.0 },
|
|
185
|
-
], ArrayType(StructType({ day: FloatType, value: FloatType })));
|
|
186
|
-
// A data-derived press-ETA: the axis ends exactly where the forecast does,
|
|
187
|
-
// rather than at a compile-time constant.
|
|
188
|
-
const decisionDay = $.const(2.0, FloatType);
|
|
189
|
-
const p95 = $.const(3.5, FloatType);
|
|
190
|
-
const buffer = $.const(1.0, FloatType);
|
|
191
|
-
return (_jsx(Box, { height: "240px", width: "100%", children: _jsx(Chart, { layers: Chart.Line(rows, { x: r => r.day, y: r => r.value }, { color: "teal.solid" }), x: { label: "Day", scale: "linear", domain: [0, decisionDay.add(p95).add(buffer)] }, y: { label: "Forecast" }, grid: true }) }));
|
|
192
|
-
}),
|
|
193
|
-
inputs: [],
|
|
194
|
-
});
|
|
195
|
-
export const lineRuntimeTimeDomain = example({
|
|
196
|
-
keywords: ["Chart", "Line", "domain", "time", "DateTime", "axis", "extent", "runtime", "expression"],
|
|
197
|
-
description: "Time x-axis whose extent is given by DateTime expressions (runtime-driven temporal domain)",
|
|
198
|
-
fn: East.function([], UIComponentType, ($) => {
|
|
199
|
-
const rows = $.const([
|
|
200
|
-
{ at: new Date("2025-01-01"), v: 10.0 },
|
|
201
|
-
{ at: new Date("2025-02-01"), v: 18.0 },
|
|
202
|
-
{ at: new Date("2025-03-01"), v: 26.0 },
|
|
203
|
-
], ArrayType(StructType({ at: DateTimeType, v: FloatType })));
|
|
204
|
-
const start = $.const(new Date("2024-12-15"), DateTimeType);
|
|
205
|
-
const end = $.const(new Date("2025-03-20"), DateTimeType);
|
|
206
|
-
return (_jsx(Box, { height: "240px", width: "100%", children: _jsx(Chart, { layers: Chart.Line(rows, { x: r => r.at, y: r => r.v }), x: { label: "Month", scale: "time", domain: [start, end], format: Chart.format.date("MMM YYYY") }, y: { label: "Value" }, grid: true }) }));
|
|
207
|
-
}),
|
|
208
|
-
inputs: [],
|
|
209
|
-
});
|
|
210
|
-
/**
|
|
211
|
-
* Axis typography overrides (#315) — `tickStyle` / `titleStyle` on any axis
|
|
212
|
-
* restyle its tick labels and caption over the spec chrome (mono 11px,
|
|
213
|
-
* `fg.muted`): CSS font size, theme font family (`sans` / `serif` / `mono`),
|
|
214
|
-
* weight, colour token, and letter spacing. Here the weekday date ticks read
|
|
215
|
-
* in 12px sans `fg.default` and the y caption is a semibold sans eyebrow —
|
|
216
|
-
* the legibility treatment for a dense dashboard lane.
|
|
217
|
-
*/
|
|
218
|
-
export const axisTextStyled = example({
|
|
219
|
-
keywords: ["Chart", "axis", "tickStyle", "titleStyle", "titleGap", "font", "typography", "fontSize", "fontFamily", "fontWeight", "color", "letterSpacing", "legibility", "ticks", "label"],
|
|
220
|
-
description: "Axis typography overrides — tickStyle/titleStyle set font size / family / weight / colour per axis (weekday date ticks in 12px sans fg.default), and titleGap pushes the y caption out from the ticks",
|
|
221
|
-
fn: East.function([], UIComponentType, ($) => {
|
|
222
|
-
const rows = $.const([
|
|
223
|
-
{ at: new Date("2026-03-30T12:00:00Z"), v: 8.0 },
|
|
224
|
-
{ at: new Date("2026-03-31T12:00:00Z"), v: 10.0 },
|
|
225
|
-
{ at: new Date("2026-04-01T12:00:00Z"), v: 14.0 },
|
|
226
|
-
{ at: new Date("2026-04-02T12:00:00Z"), v: 12.0 },
|
|
227
|
-
{ at: new Date("2026-04-03T12:00:00Z"), v: 9.0 },
|
|
228
|
-
], ArrayType(StructType({ at: DateTimeType, v: FloatType })));
|
|
229
|
-
return (_jsx(Box, { height: "240px", width: "100%", children: _jsx(Chart, { layers: Chart.Line(rows, { x: r => r.at, y: r => r.v }), x: { scale: "time", format: Chart.format.date("ddd DD"), tickStyle: { fontSize: "12px", fontFamily: "sans", color: "fg.default" } }, y: { label: "Clarified kL", titleGap: 6, tickStyle: { fontSize: "12px" }, titleStyle: { fontFamily: "sans", fontWeight: "semibold", color: "fg.default", letterSpacing: "0.02em" } }, grid: true }) }));
|
|
230
|
-
}),
|
|
231
|
-
inputs: [],
|
|
232
|
-
});
|
|
233
|
-
export const lineSampleFan = example({
|
|
234
|
-
keywords: ["Chart", "Line", "opacity", "legend", "tooltip", "fan", "sample-path", "by", "overlay", "decoration"],
|
|
235
|
-
description: "A faint fan of generative sample paths (low stroke opacity, kept out of both the legend and the tooltip) behind a bold median line",
|
|
236
|
-
fn: East.function([], UIComponentType, ($) => {
|
|
237
|
-
const fan = $.const([
|
|
238
|
-
{ t: 0n, sid: "s0", y: 10.0 }, { t: 1n, sid: "s0", y: 14.0 }, { t: 2n, sid: "s0", y: 13.0 },
|
|
239
|
-
{ t: 0n, sid: "s1", y: 11.0 }, { t: 1n, sid: "s1", y: 9.0 }, { t: 2n, sid: "s1", y: 15.0 },
|
|
240
|
-
{ t: 0n, sid: "s2", y: 9.0 }, { t: 1n, sid: "s2", y: 12.0 }, { t: 2n, sid: "s2", y: 11.0 },
|
|
241
|
-
], ArrayType(StructType({ t: IntegerType, sid: StringType, y: FloatType })));
|
|
242
|
-
const median = $.const([
|
|
243
|
-
{ t: 0n, y: 10.0 }, { t: 1n, y: 12.0 }, { t: 2n, y: 13.0 },
|
|
244
|
-
], ArrayType(StructType({ t: IntegerType, y: FloatType })));
|
|
245
|
-
return (_jsx(Box, { height: "260px", width: "100%", children: _jsx(Chart, { layers: [
|
|
246
|
-
// Decoration layer: out of the legend AND the tooltip, so hovering
|
|
247
|
-
// surfaces only the median rather than one row per sample id.
|
|
248
|
-
Chart.Line(fan, { x: r => r.t, y: r => r.y, by: r => r.sid }, { opacity: 0.2, legend: false, tooltip: false, dots: false }),
|
|
249
|
-
Chart.Line(median, { x: r => r.t, y: r => r.y }, { key: "Median", color: "blue.solid", width: 2, dots: false }),
|
|
250
|
-
], x: { label: "Step", scale: "linear" }, y: { label: "Value" }, legend: true, grid: true, tooltip: true }) }));
|
|
39
|
+
];
|
|
40
|
+
return (_jsx(Reactive, { children: $ => {
|
|
41
|
+
const rows = $.const(LINE_CURVE_NATURAL_DATA, ArrayType(StructType({ month: StringType, sales: IntegerType })));
|
|
42
|
+
// Enumerated axes are just their variants — `getTag()` gives the
|
|
43
|
+
// segment key AND its label, so there is no parallel table to
|
|
44
|
+
// keep in step.
|
|
45
|
+
const curves = $.const([
|
|
46
|
+
variant("linear", null), variant("natural", null),
|
|
47
|
+
variant("step", null), variant("stepAfter", null),
|
|
48
|
+
], ArrayType(Chart.Spec.Types.Curve));
|
|
49
|
+
const curveBind = $.let(State.bind([StringType], "chart_curve", "natural"));
|
|
50
|
+
const pointsBind = $.let(State.bind([BooleanType], "chart_points", true));
|
|
51
|
+
const formatBind = $.let(State.bind([BooleanType], "chart_format", false));
|
|
52
|
+
const peak = $.let(State.bind([IntegerType], "chart_peak", 90n));
|
|
53
|
+
const curveKey = $.let(curveBind.read());
|
|
54
|
+
const dots = $.let(pointsBind.read());
|
|
55
|
+
const compactFmt = $.let(formatBind.read());
|
|
56
|
+
const peakVal = $.let(peak.read());
|
|
57
|
+
const onCurve = $.const(East.function([StringType], NullType, ($, next) => { $(curveBind.write(next)); }));
|
|
58
|
+
const onPoints = $.const(East.function([BooleanType], NullType, ($, next) => { $(pointsBind.write(next)); }));
|
|
59
|
+
const onFormat = $.const(East.function([BooleanType], NullType, ($, next) => { $(formatBind.write(next)); }));
|
|
60
|
+
const bump = $.const(East.function([], NullType, $ => {
|
|
61
|
+
const cur = $.let(peak.read());
|
|
62
|
+
const next = $.let(cur.greater(140n).ifElse(_$ => 60n, _$ => cur.add(15n)));
|
|
63
|
+
$(peak.write(next));
|
|
64
|
+
}));
|
|
65
|
+
// Each selection is a lookup into the same array the control renders.
|
|
66
|
+
const curve = $.let(curves.filter((_$, v) => v.getTag().equal(curveKey)).get(0n));
|
|
67
|
+
// curve / dots / format are runtime expressions on the ONE line
|
|
68
|
+
// chart; grid stays on (the design norm) and the pinned y-domain
|
|
69
|
+
// rides the reactive aside chart where it belongs.
|
|
70
|
+
const yFormat = $.let(compactFmt.ifElse(_$ => Chart.format.currency({ compact: true }), _$ => Chart.format.number()));
|
|
71
|
+
const preview = $.let(_jsx(Chart, { layers: Chart.Line(rows, { x: r => r.month, y: r => r.sales }, { curve, dots, color: "teal.solid", width: 2 }), y: { format: yFormat }, grid: true, tooltip: true }));
|
|
72
|
+
// The aside is the old `interactiveValue` isolate: the Q4 column is
|
|
73
|
+
// sourced from reactive State (same `chart_peak` key), proving
|
|
74
|
+
// expression-valued data.
|
|
75
|
+
const peakRows = $.const([
|
|
76
|
+
{ q: "Q1", v: 40n }, { q: "Q2", v: 65n }, { q: "Q3", v: 55n }, { q: "Q4", v: peakVal },
|
|
77
|
+
], ArrayType(StructType({ q: StringType, v: IntegerType })));
|
|
78
|
+
return (_jsx(Configurator, { controls: [
|
|
79
|
+
Configurator.Control("Curve", curveKey, _jsx(Select, { value: curveKey, onChange: onCurve, size: "sm", items: curves.map((_$, v) => Select.Item(v.getTag(), v.getTag())) })),
|
|
80
|
+
// A Slot, not a Control: the switches report as the spec
|
|
81
|
+
// rows below rather than as one value.
|
|
82
|
+
Configurator.Slot("Marks", _jsx(HStack, { gap: "5", align: "center", wrap: "wrap", children: _jsx(Switch, { checked: dots, label: "Points", onChange: onPoints }) })),
|
|
83
|
+
Configurator.Slot("Axes", _jsx(HStack, { gap: "5", align: "center", wrap: "wrap", children: _jsx(Switch, { checked: compactFmt, label: "Compact currency", onChange: onFormat }) })),
|
|
84
|
+
], preview: _jsx(Box, { height: "260px", width: "100%", children: preview }), aside: {
|
|
85
|
+
label: "Peak · Reactive",
|
|
86
|
+
body: (_jsxs(VStack, { gap: "3", align: "stretch", children: [_jsx(Box, { height: "260px", width: "100%", children: _jsx(Chart, { layers: Chart.Column(peakRows, { x: r => r.q, y: r => r.v }, { color: "teal.solid" }), y: { domain: [0, 160] } }) }), _jsxs(HStack, { gap: "3", align: "center", wrap: "wrap", children: [_jsx(Text.MonoLabel, { children: East.str `Q4 · ${East.print(peakVal)}` }), _jsx(Button, { size: "xs", onClick: bump, children: "Bump Q4" })] })] })),
|
|
87
|
+
}, spec: [
|
|
88
|
+
Configurator.Spec("Points", dots.ifElse(_$ => "on", _$ => "off")),
|
|
89
|
+
Configurator.Spec("Tick format", compactFmt.ifElse(_$ => "compact currency", _$ => "number")),
|
|
90
|
+
Configurator.Spec("Aside domain", "0 – 160 pinned"),
|
|
91
|
+
] }));
|
|
92
|
+
} }));
|
|
251
93
|
}),
|
|
252
94
|
inputs: [],
|
|
253
95
|
});
|
|
254
96
|
// ============================================================================
|
|
255
|
-
// Column —
|
|
97
|
+
// Column + Bar (#249 split) — each series grammar is a build-time encoding,
|
|
98
|
+
// so each is its own single-instance example.
|
|
256
99
|
// ============================================================================
|
|
257
|
-
|
|
258
|
-
keywords: ["Chart", "Column", "bar", "vertical", "single-series", "currency"],
|
|
259
|
-
description: "Single column series (vertical bars) with a compact-currency y-axis",
|
|
260
|
-
fn: East.function([], UIComponentType, ($) => {
|
|
261
|
-
const rows = $.const([
|
|
262
|
-
{ q: "Q1", revenue: 186n }, { q: "Q2", revenue: 305n }, { q: "Q3", revenue: 237n }, { q: "Q4", revenue: 273n },
|
|
263
|
-
], ArrayType(StructType({ q: StringType, revenue: IntegerType })));
|
|
264
|
-
return (_jsx(Box, { height: "220px", width: "100%", children: _jsx(Chart, { layers: Chart.Column(rows, { x: r => r.q, y: r => r.revenue }, { color: "teal.solid" }), y: { format: Chart.format.currency({ compact: true }) }, grid: true }) }));
|
|
265
|
-
}),
|
|
266
|
-
inputs: [],
|
|
267
|
-
});
|
|
268
|
-
export const columnPerCategory = example({
|
|
269
|
-
keywords: ["Chart", "Column", "bar", "per-category", "colors", "composition", "single-series"],
|
|
270
|
-
description: "A single column series coloured per x-category (composition mix) — full-width columns, in data order, no grouped split",
|
|
271
|
-
fn: East.function([], UIComponentType, ($) => {
|
|
272
|
-
const rows = $.const([
|
|
273
|
-
{ discipline: "RN", share: 42n }, { discipline: "EN", share: 28n }, { discipline: "Physio", share: 16n },
|
|
274
|
-
{ discipline: "OT", share: 9n }, { discipline: "Admin", share: 5n },
|
|
275
|
-
], ArrayType(StructType({ discipline: StringType, share: IntegerType })));
|
|
276
|
-
return (_jsx(Box, { height: "220px", width: "100%", children: _jsx(Chart, { layers: Chart.Column(rows, {
|
|
277
|
-
x: r => r.discipline, y: r => r.share,
|
|
278
|
-
colors: { RN: "teal.solid", EN: "cyan.solid", Physio: "blue.solid", OT: "purple.solid", Admin: "gray.solid" },
|
|
279
|
-
}), grid: true }) }));
|
|
280
|
-
}),
|
|
281
|
-
inputs: [],
|
|
282
|
-
});
|
|
100
|
+
/** Grouped multi-series columns with an explicit colour map. */
|
|
283
101
|
export const columnGrouped = example({
|
|
284
|
-
keywords: ["Chart", "Column", "
|
|
285
|
-
description: "Grouped columns
|
|
102
|
+
keywords: ["Chart", "Column", "vertical", "grouped", "columns", "multi-series", "colors", "custom", "palette", "legend", "grid"],
|
|
103
|
+
description: "Grouped columns — two series per region with an explicit colour map",
|
|
286
104
|
fn: East.function([], UIComponentType, ($) => {
|
|
287
|
-
const
|
|
105
|
+
const COLUMN_GROUPED_DATA = [
|
|
288
106
|
{ region: "NA", a: 40n, b: 30n }, { region: "EU", a: 55n, b: 45n }, { region: "APAC", a: 30n, b: 60n },
|
|
289
|
-
]
|
|
290
|
-
|
|
107
|
+
];
|
|
108
|
+
const rows = $.const(COLUMN_GROUPED_DATA, ArrayType(StructType({ region: StringType, a: IntegerType, b: IntegerType })));
|
|
109
|
+
return (_jsx(Box, { height: "260px", width: "100%", children: _jsx(Chart, { layers: Chart.Column(rows, { x: r => r.region, columns: { Product: r => r.a, Service: r => r.b }, colors: { Product: "purple.solid", Service: "orange.solid" } }), legend: true, grid: true }) }));
|
|
291
110
|
}),
|
|
292
111
|
inputs: [],
|
|
293
112
|
});
|
|
113
|
+
/** Stacked columns — two series share one stack key. */
|
|
294
114
|
export const columnStacked = example({
|
|
295
|
-
keywords: ["Chart", "Column", "
|
|
296
|
-
description: "Stacked columns
|
|
115
|
+
keywords: ["Chart", "Column", "stacked", "stack", "columns", "multi-series", "legend", "grid"],
|
|
116
|
+
description: "Stacked columns — mobile and desktop traffic share one stack",
|
|
297
117
|
fn: East.function([], UIComponentType, ($) => {
|
|
298
|
-
const
|
|
118
|
+
const COLUMN_STACKED_DATA = [
|
|
299
119
|
{ week: "W1", mobile: 50n, desktop: 100n }, { week: "W2", mobile: 70n, desktop: 120n },
|
|
300
120
|
{ week: "W3", mobile: 60n, desktop: 110n },
|
|
301
|
-
]
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
inputs: [],
|
|
305
|
-
});
|
|
306
|
-
export const columnPercentStacked = example({
|
|
307
|
-
keywords: ["Chart", "Column", "bar", "stackOffset", "expand", "percent", "breakdown"],
|
|
308
|
-
description: "100% stacked columns by breakdown, percent axis",
|
|
309
|
-
fn: East.function([], UIComponentType, ($) => {
|
|
310
|
-
const rows = $.const([
|
|
311
|
-
{ week: "W1", channel: "Search", spend: 40n }, { week: "W1", channel: "Social", spend: 60n },
|
|
312
|
-
{ week: "W2", channel: "Search", spend: 55n }, { week: "W2", channel: "Social", spend: 45n },
|
|
313
|
-
], ArrayType(StructType({ week: StringType, channel: StringType, spend: IntegerType })));
|
|
314
|
-
return (_jsx(Box, { height: "240px", width: "100%", children: _jsx(Chart, { layers: Chart.Column(rows, { x: r => r.week, y: r => r.spend, by: r => r.channel }, { stack: "mix" }), stackOffset: "expand", y: { format: Chart.format.percent() }, legend: true }) }));
|
|
121
|
+
];
|
|
122
|
+
const rows = $.const(COLUMN_STACKED_DATA, ArrayType(StructType({ week: StringType, mobile: IntegerType, desktop: IntegerType })));
|
|
123
|
+
return (_jsx(Box, { height: "260px", width: "100%", children: _jsx(Chart, { layers: Chart.Column(rows, { x: r => r.week, columns: { Mobile: r => r.mobile, Desktop: r => r.desktop } }, { stack: "traffic" }), legend: true, grid: true }) }));
|
|
315
124
|
}),
|
|
316
125
|
inputs: [],
|
|
317
126
|
});
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
127
|
+
/** Percent-stacked columns — stackOffset expand + a percent axis format. */
|
|
128
|
+
export const columnPercent = example({
|
|
129
|
+
keywords: ["Chart", "Column", "stack", "stackOffset", "expand", "percent", "breakdown", "by", "legend"],
|
|
130
|
+
description: "Percent-stacked columns — stackOffset expand normalises the mix to 100%",
|
|
321
131
|
fn: East.function([], UIComponentType, ($) => {
|
|
322
|
-
const
|
|
132
|
+
const COLUMN_PERCENT_STACKED_DATA = [
|
|
323
133
|
{ week: "W1", channel: "Search", spend: 40n }, { week: "W1", channel: "Social", spend: 60n },
|
|
324
134
|
{ week: "W2", channel: "Search", spend: 55n }, { week: "W2", channel: "Social", spend: 45n },
|
|
325
|
-
]
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
inputs: [],
|
|
329
|
-
});
|
|
330
|
-
// ============================================================================
|
|
331
|
-
// Bar — horizontal bars (#249): numeric x measure, categorical y band
|
|
332
|
-
// ============================================================================
|
|
333
|
-
export const barRanked = example({
|
|
334
|
-
keywords: ["Chart", "Bar", "horizontal", "ranked", "categorical-y", "long-labels", "AlignedStack", "plotGutter", "currency"],
|
|
335
|
-
description: "Ranked horizontal bars — numeric x, categorical y; long category labels sit in an AlignedStack left gutter",
|
|
336
|
-
fn: East.function([], UIComponentType, ($) => {
|
|
337
|
-
const rows = $.const([
|
|
338
|
-
{ product: "Industrial Conveyor Belts", revenue: 482n },
|
|
339
|
-
{ product: "Hydraulic Press Fittings", revenue: 305n },
|
|
340
|
-
{ product: "Pneumatic Valve Assemblies", revenue: 237n },
|
|
341
|
-
{ product: "Stainless Fastener Kits", revenue: 186n },
|
|
342
|
-
{ product: "Bearing Housings", revenue: 121n },
|
|
343
|
-
], ArrayType(StructType({ product: StringType, revenue: IntegerType })));
|
|
344
|
-
return (_jsx(AlignedStack, { gutter: { left: "170px", right: "12px" }, children: _jsx(Box, { height: "240px", width: "100%", children: _jsx(Chart, { layers: Chart.Bar(rows, { x: r => r.revenue, y: r => r.product }, { color: "teal.solid" }), x: { format: Chart.format.currency({ compact: true }) }, grid: true, tooltip: true }) }) }));
|
|
345
|
-
}),
|
|
346
|
-
inputs: [],
|
|
347
|
-
});
|
|
348
|
-
export const barGrouped = example({
|
|
349
|
-
keywords: ["Chart", "Bar", "horizontal", "grouped", "columns", "multi-series"],
|
|
350
|
-
description: "Grouped horizontal bars from value columns — one sub-bar per column within each category band",
|
|
351
|
-
fn: East.function([], UIComponentType, ($) => {
|
|
352
|
-
const rows = $.const([
|
|
353
|
-
{ site: "North", loaded: 42n, empty: 18n }, { site: "South", loaded: 35n, empty: 25n },
|
|
354
|
-
{ site: "West", loaded: 28n, empty: 12n },
|
|
355
|
-
], ArrayType(StructType({ site: StringType, loaded: IntegerType, empty: IntegerType })));
|
|
356
|
-
return (_jsx(Box, { height: "240px", width: "100%", children: _jsx(Chart, { layers: Chart.Bar(rows, { y: r => r.site, columns: { Loaded: r => r.loaded, Empty: r => r.empty } }), legend: true, grid: true }) }));
|
|
135
|
+
];
|
|
136
|
+
const rows = $.const(COLUMN_PERCENT_STACKED_DATA, ArrayType(StructType({ week: StringType, channel: StringType, spend: IntegerType })));
|
|
137
|
+
return (_jsx(Box, { height: "260px", width: "100%", children: _jsx(Chart, { layers: Chart.Column(rows, { x: r => r.week, y: r => r.spend, by: r => r.channel }, { stack: "mix" }), stackOffset: "expand", y: { format: Chart.format.percent() }, legend: true }) }));
|
|
357
138
|
}),
|
|
358
139
|
inputs: [],
|
|
359
140
|
});
|
|
141
|
+
/** Horizontal Bar — ranked categorical-y with stacked shifts and tooltip. */
|
|
360
142
|
export const barStacked = example({
|
|
361
|
-
keywords: ["Chart", "Bar", "horizontal", "stacked", "stack", "by", "
|
|
362
|
-
description: "Stacked horizontal bars
|
|
143
|
+
keywords: ["Chart", "Bar", "horizontal", "ranked", "categorical-y", "long-labels", "stacked", "stack", "by", "tooltip", "legend", "grid"],
|
|
144
|
+
description: "Stacked horizontal bars — sites ranked on the categorical y-axis, day/night shifts stacked",
|
|
363
145
|
fn: East.function([], UIComponentType, ($) => {
|
|
364
|
-
const
|
|
146
|
+
const BAR_STACKED_DATA = [
|
|
365
147
|
{ site: "North", shift: "Day", tonnes: 120n }, { site: "North", shift: "Night", tonnes: 80n },
|
|
366
148
|
{ site: "South", shift: "Day", tonnes: 95n }, { site: "South", shift: "Night", tonnes: 110n },
|
|
367
149
|
{ site: "West", shift: "Day", tonnes: 60n }, { site: "West", shift: "Night", tonnes: 45n },
|
|
368
|
-
]
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
inputs: [],
|
|
372
|
-
});
|
|
373
|
-
export const barPercentStacked = example({
|
|
374
|
-
keywords: ["Chart", "Bar", "horizontal", "stackOffset", "expand", "percent", "breakdown"],
|
|
375
|
-
description: "100% stacked horizontal bars by breakdown — percent x-axis via stackOffset expand",
|
|
376
|
-
fn: East.function([], UIComponentType, ($) => {
|
|
377
|
-
const rows = $.const([
|
|
378
|
-
{ week: "W1", channel: "Search", spend: 40n }, { week: "W1", channel: "Social", spend: 60n },
|
|
379
|
-
{ week: "W2", channel: "Search", spend: 55n }, { week: "W2", channel: "Social", spend: 45n },
|
|
380
|
-
], ArrayType(StructType({ week: StringType, channel: StringType, spend: IntegerType })));
|
|
381
|
-
return (_jsx(Box, { height: "240px", width: "100%", children: _jsx(Chart, { layers: Chart.Bar(rows, { x: r => r.spend, y: r => r.week, by: r => r.channel }, { stack: "mix" }), stackOffset: "expand", x: { format: Chart.format.percent() }, legend: true }) }));
|
|
150
|
+
];
|
|
151
|
+
const rows = $.const(BAR_STACKED_DATA, ArrayType(StructType({ site: StringType, shift: StringType, tonnes: IntegerType })));
|
|
152
|
+
return (_jsx(Box, { height: "260px", width: "100%", children: _jsx(Chart, { layers: Chart.Bar(rows, { x: r => r.tonnes, y: r => r.site, by: r => r.shift }, { stack: "tonnage" }), legend: true, tooltip: true, grid: true }) }));
|
|
382
153
|
}),
|
|
383
154
|
inputs: [],
|
|
384
155
|
});
|
|
385
156
|
// ============================================================================
|
|
386
|
-
// Area —
|
|
157
|
+
// Area / Band / Scatter — each mark contract is its own single instance.
|
|
387
158
|
// ============================================================================
|
|
159
|
+
/** Stacked areas — two series share one stack with a soft fill. */
|
|
388
160
|
export const areaStacked = example({
|
|
389
|
-
keywords: ["Chart", "Area", "stacked", "stack", "fillOpacity", "columns"],
|
|
390
|
-
description: "Stacked
|
|
161
|
+
keywords: ["Chart", "Area", "stacked", "stack", "fillOpacity", "columns", "legend", "grid"],
|
|
162
|
+
description: "Stacked areas — mobile and desktop traffic share one stack with a soft fill",
|
|
391
163
|
fn: East.function([], UIComponentType, ($) => {
|
|
392
|
-
const
|
|
164
|
+
const AREA_STACKED_DATA = [
|
|
393
165
|
{ month: "Jan", mobile: 50n, desktop: 100n }, { month: "Feb", mobile: 70n, desktop: 120n },
|
|
394
166
|
{ month: "Mar", mobile: 60n, desktop: 110n }, { month: "Apr", mobile: 90n, desktop: 140n },
|
|
395
|
-
]
|
|
396
|
-
|
|
167
|
+
];
|
|
168
|
+
const rows = $.const(AREA_STACKED_DATA, ArrayType(StructType({ month: StringType, mobile: IntegerType, desktop: IntegerType })));
|
|
169
|
+
return (_jsx(Box, { height: "280px", width: "100%", children: _jsx(Chart, { layers: Chart.Area(rows, { x: r => r.month, columns: { Mobile: r => r.mobile, Desktop: r => r.desktop } }, { stack: "traffic", fillOpacity: 0.5 }), legend: true, grid: true }) }));
|
|
397
170
|
}),
|
|
398
171
|
inputs: [],
|
|
399
172
|
});
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
173
|
+
/** Band — an area-range confidence band under its value line. */
|
|
174
|
+
export const bandConfidence = example({
|
|
175
|
+
keywords: ["Chart", "Band", "area-range", "confidence", "low", "high", "Line", "legend", "tooltip", "grid"],
|
|
176
|
+
description: "Confidence band — Chart.Band low/high under the value line",
|
|
403
177
|
fn: East.function([], UIComponentType, ($) => {
|
|
404
|
-
const
|
|
178
|
+
const AREA_CONFIDENCE_BAND_DATA = [
|
|
405
179
|
{ day: "Mon", value: 100n, lo: 80n, hi: 120n }, { day: "Tue", value: 150n, lo: 130n, hi: 170n },
|
|
406
180
|
{ day: "Wed", value: 130n, lo: 110n, hi: 150n }, { day: "Thu", value: 180n, lo: 160n, hi: 200n },
|
|
407
|
-
]
|
|
408
|
-
|
|
409
|
-
|
|
181
|
+
];
|
|
182
|
+
const rows = $.const(AREA_CONFIDENCE_BAND_DATA, ArrayType(StructType({ day: StringType, value: IntegerType, lo: IntegerType, hi: IntegerType })));
|
|
183
|
+
return (_jsx(Box, { height: "280px", width: "100%", children: _jsx(Chart, { layers: [
|
|
184
|
+
Chart.Band(rows, { x: r => r.day, low: r => r.lo, high: r => r.hi }, { key: "Range", color: "link", fillOpacity: 0.3 }),
|
|
410
185
|
Chart.Line(rows, { x: r => r.day, y: r => r.value }, { key: "Value", color: "blue.solid", width: 2 }),
|
|
411
186
|
], legend: true, tooltip: true, grid: true }) }));
|
|
412
187
|
}),
|
|
413
188
|
inputs: [],
|
|
414
189
|
});
|
|
415
|
-
|
|
416
|
-
// Scatter
|
|
417
|
-
// ============================================================================
|
|
190
|
+
/** Quadrant scatter — two series with pinned domains and refLine cross-hairs. */
|
|
418
191
|
export const scatterQuadrants = example({
|
|
419
|
-
keywords: ["Chart", "Scatter", "
|
|
420
|
-
description: "
|
|
192
|
+
keywords: ["Chart", "Scatter", "domain", "reference", "refLine", "quadrant", "linear", "legend"],
|
|
193
|
+
description: "Quadrant scatter — pinned 0–100 domains with refLine cross-hairs at 50",
|
|
421
194
|
fn: East.function([], UIComponentType, ($) => {
|
|
422
|
-
const
|
|
195
|
+
const SCATTER_QUADRANTS_DATA = [
|
|
423
196
|
{ effort: 10.0, value: 80.0, baseline: 20.0 }, { effort: 35.0, value: 55.0, baseline: 60.0 },
|
|
424
197
|
{ effort: 70.0, value: 30.0, baseline: 90.0 },
|
|
425
|
-
]
|
|
198
|
+
];
|
|
199
|
+
const rows = $.const(SCATTER_QUADRANTS_DATA, ArrayType(StructType({ effort: FloatType, value: FloatType, baseline: FloatType })));
|
|
426
200
|
return (_jsx(Box, { height: "280px", width: "100%", children: _jsx(Chart, { layers: [
|
|
427
201
|
Chart.Scatter(rows, { x: r => r.effort, columns: { Value: r => r.value, Baseline: r => r.baseline } }, { size: 6 }),
|
|
428
202
|
Chart.refLine({ x: 50, dash: "3 3" }),
|
|
@@ -431,69 +205,74 @@ export const scatterQuadrants = example({
|
|
|
431
205
|
}),
|
|
432
206
|
inputs: [],
|
|
433
207
|
});
|
|
208
|
+
/** Bubble scatter — per-point size encodes a third measure. */
|
|
434
209
|
export const scatterBubble = example({
|
|
435
|
-
keywords: ["Chart", "Scatter", "
|
|
436
|
-
description: "Bubble
|
|
210
|
+
keywords: ["Chart", "Scatter", "size", "bubble", "per-point", "grid"],
|
|
211
|
+
description: "Bubble scatter — per-point size encodes population",
|
|
437
212
|
fn: East.function([], UIComponentType, ($) => {
|
|
438
|
-
const
|
|
213
|
+
const SCATTER_BUBBLE_DATA = [
|
|
439
214
|
{ gdp: 1.2, life: 62.0, pop: 1400.0 }, { gdp: 4.5, life: 78.0, pop: 330.0 },
|
|
440
215
|
{ gdp: 2.1, life: 70.0, pop: 210.0 }, { gdp: 5.8, life: 82.0, pop: 125.0 },
|
|
441
|
-
]
|
|
442
|
-
|
|
216
|
+
];
|
|
217
|
+
const rows = $.const(SCATTER_BUBBLE_DATA, ArrayType(StructType({ gdp: FloatType, life: FloatType, pop: FloatType })));
|
|
218
|
+
return (_jsx(Box, { height: "280px", width: "100%", children: _jsx(Chart, { layers: Chart.Scatter(rows, { x: r => r.gdp, y: r => r.life, size: r => r.pop }), x: { label: "GDP per capita" }, y: { label: "Life expectancy" }, grid: true }) }));
|
|
443
219
|
}),
|
|
444
220
|
inputs: [],
|
|
445
221
|
});
|
|
446
222
|
// ============================================================================
|
|
447
|
-
// Composed —
|
|
223
|
+
// Composed — each preset is one multi-layer chart.
|
|
448
224
|
// ============================================================================
|
|
225
|
+
/** Column + Line mixed marks on one chart. */
|
|
449
226
|
export const composedColumnLine = example({
|
|
450
|
-
keywords: ["Chart", "Composed", "column", "
|
|
451
|
-
description: "
|
|
227
|
+
keywords: ["Chart", "Composed", "column", "line", "mixed-marks", "legend", "tooltip", "grid"],
|
|
228
|
+
description: "Composed marks — revenue columns under a dotted profit line",
|
|
452
229
|
fn: East.function([], UIComponentType, ($) => {
|
|
453
|
-
const
|
|
230
|
+
const COMPOSED_COLUMN_LINE_DATA = [
|
|
454
231
|
{ month: "Jan", revenue: 186n, profit: 80n }, { month: "Feb", revenue: 305n, profit: 120n },
|
|
455
232
|
{ month: "Mar", revenue: 237n, profit: 95n }, { month: "Apr", revenue: 273n, profit: 150n },
|
|
456
|
-
]
|
|
457
|
-
|
|
233
|
+
];
|
|
234
|
+
const rows = $.const(COMPOSED_COLUMN_LINE_DATA, ArrayType(StructType({ month: StringType, revenue: IntegerType, profit: IntegerType })));
|
|
235
|
+
return (_jsx(Box, { height: "300px", width: "100%", children: _jsx(Chart, { layers: [
|
|
458
236
|
Chart.Column(rows, { x: r => r.month, y: r => r.revenue }, { key: "Revenue", color: "teal.solid" }),
|
|
459
237
|
Chart.Line(rows, { x: r => r.month, y: r => r.profit }, { key: "Profit", color: "purple.solid", dots: true }),
|
|
460
238
|
], legend: true, tooltip: true, grid: true }) }));
|
|
461
239
|
}),
|
|
462
240
|
inputs: [],
|
|
463
241
|
});
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
242
|
+
/** Dual-axis forecast — Area + Band + right-axis trend + capacity refLine. */
|
|
243
|
+
export const composedDualAxis = example({
|
|
244
|
+
keywords: ["Chart", "Composed", "dual-axis", "axis", "y2", "Area", "Band", "Line", "refLine", "stack", "forecast"],
|
|
245
|
+
description: "Dual-axis forecast — stacked areas + confidence band with a right-axis trend and capacity refLine",
|
|
467
246
|
fn: East.function([], UIComponentType, ($) => {
|
|
468
|
-
const
|
|
247
|
+
const COMPOSED_DUAL_AXIS_FORECAST_DATA = [
|
|
469
248
|
{ month: "Jan", mobile: 50n, desktop: 100n, lo: 130n, hi: 170n, trend: 150n },
|
|
470
249
|
{ month: "Feb", mobile: 70n, desktop: 120n, lo: 165n, hi: 215n, trend: 190n },
|
|
471
250
|
{ month: "Mar", mobile: 60n, desktop: 110n, lo: 150n, hi: 200n, trend: 175n },
|
|
472
251
|
{ month: "Apr", mobile: 90n, desktop: 140n, lo: 205n, hi: 265n, trend: 235n },
|
|
473
|
-
]
|
|
252
|
+
];
|
|
253
|
+
const rows = $.const(COMPOSED_DUAL_AXIS_FORECAST_DATA, ArrayType(StructType({
|
|
474
254
|
month: StringType, mobile: IntegerType, desktop: IntegerType, lo: IntegerType, hi: IntegerType, trend: IntegerType,
|
|
475
255
|
})));
|
|
476
256
|
return (_jsx(Box, { height: "300px", width: "100%", children: _jsx(Chart, { layers: [
|
|
477
257
|
Chart.Area(rows, { x: r => r.month, columns: { Mobile: r => r.mobile, Desktop: r => r.desktop } }, { stack: "traffic", fillOpacity: 0.5 }),
|
|
478
|
-
Chart.Band(rows, { x: r => r.month, low: r => r.lo, high: r => r.hi }, { key: "Confidence", color: "
|
|
258
|
+
Chart.Band(rows, { x: r => r.month, low: r => r.lo, high: r => r.hi }, { key: "Confidence", color: "link", fillOpacity: 0.3 }),
|
|
479
259
|
Chart.Line(rows, { x: r => r.month, y: r => r.trend }, { key: "Trend", color: "red.solid", dash: "5 5", dots: false, axis: "right", order: 10 }),
|
|
480
260
|
Chart.refLine({ y: 200, label: "Capacity", dash: "4 4" }),
|
|
481
261
|
], y: { label: "Sessions" }, y2: { label: "Trend", format: Chart.format.compact() }, legend: true, tooltip: true, grid: true }) }));
|
|
482
262
|
}),
|
|
483
263
|
inputs: [],
|
|
484
264
|
});
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
keywords: ["Chart", "refLine", "refBand", "refDot", "reference", "annotation"],
|
|
490
|
-
description: "A target line, a normal-range band, and a highlighted peak dot",
|
|
265
|
+
/** Reference annotations — refBand, refLine and refDot around one line. */
|
|
266
|
+
export const composedAnnotations = example({
|
|
267
|
+
keywords: ["Chart", "reference", "refLine", "refBand", "refDot", "annotation", "grid"],
|
|
268
|
+
description: "Reference annotations — a normal band, target line and peak dot around one series",
|
|
491
269
|
fn: East.function([], UIComponentType, ($) => {
|
|
492
|
-
const
|
|
270
|
+
const REFERENCE_ANNOTATIONS_DATA = [
|
|
493
271
|
{ month: "Jan", value: 100n }, { month: "Feb", value: 150n },
|
|
494
272
|
{ month: "Mar", value: 237n }, { month: "Apr", value: 180n },
|
|
495
|
-
]
|
|
496
|
-
|
|
273
|
+
];
|
|
274
|
+
const rows = $.const(REFERENCE_ANNOTATIONS_DATA, ArrayType(StructType({ month: StringType, value: IntegerType })));
|
|
275
|
+
return (_jsx(Box, { height: "300px", width: "100%", children: _jsx(Chart, { layers: [
|
|
497
276
|
Chart.refBand({ y: [120, 200], label: "Normal" }),
|
|
498
277
|
Chart.Line(rows, { x: r => r.month, y: r => r.value }, { color: "teal.solid" }),
|
|
499
278
|
Chart.refLine({ y: 220, label: "Target", dash: "4 4" }),
|
|
@@ -503,65 +282,23 @@ export const referenceAnnotations = example({
|
|
|
503
282
|
inputs: [],
|
|
504
283
|
});
|
|
505
284
|
// ============================================================================
|
|
506
|
-
//
|
|
285
|
+
// Behavioral isolates
|
|
507
286
|
// ============================================================================
|
|
508
|
-
export const
|
|
509
|
-
keywords: ["Chart", "
|
|
510
|
-
description: "
|
|
511
|
-
fn: East.function([], UIComponentType, ($) => {
|
|
512
|
-
const rows = $.const([
|
|
513
|
-
{ at: new Date("2025-01-01"), revenue: 12000n }, { at: new Date("2025-02-01"), revenue: 18500n },
|
|
514
|
-
{ at: new Date("2025-03-01"), revenue: 21000n },
|
|
515
|
-
], ArrayType(StructType({ at: DateTimeType, revenue: IntegerType })));
|
|
516
|
-
return (_jsx(Box, { height: "240px", width: "100%", children: _jsx(Chart, { layers: Chart.Column(rows, { x: r => r.at, y: r => r.revenue }, { color: "teal.solid" }), x: { format: Chart.format.date("MMM") }, y: { format: Chart.format.currency({ compact: true }) }, grid: true }) }));
|
|
517
|
-
}),
|
|
518
|
-
inputs: [],
|
|
519
|
-
});
|
|
520
|
-
// ============================================================================
|
|
521
|
-
// Interactive — value sourced from reactive State (proves expression-valued data)
|
|
522
|
-
// ============================================================================
|
|
523
|
-
export const interactiveValue = example({
|
|
524
|
-
keywords: ["Chart", "Column", "Reactive", "State", "interactive", "expression"],
|
|
525
|
-
description: "A column chart whose last value is driven by reactive State",
|
|
526
|
-
fn: East.function([], UIComponentType, (_$) => (_jsx(Reactive, { children: $ => {
|
|
527
|
-
const peak = $.let(State.bind([IntegerType], "chart_peak", 90n));
|
|
528
|
-
const peakVal = $.let(peak.read());
|
|
529
|
-
const rows = $.const([
|
|
530
|
-
{ q: "Q1", v: 40n }, { q: "Q2", v: 65n }, { q: "Q3", v: 55n }, { q: "Q4", v: peakVal },
|
|
531
|
-
], ArrayType(StructType({ q: StringType, v: IntegerType })));
|
|
532
|
-
return _jsx(Chart, { layers: Chart.Column(rows, { x: r => r.q, y: r => r.v }, { color: "teal.solid" }), grid: true });
|
|
533
|
-
} }))),
|
|
534
|
-
inputs: [],
|
|
535
|
-
});
|
|
536
|
-
/**
|
|
537
|
-
* Explicit Date ticks on a `time` axis (#318) — `tickValues` accepts
|
|
538
|
-
* `DateTime[]` positions on a time scale (previously float-only), rendered
|
|
539
|
-
* through the date `tickFormat`; pins ticks to exact instants (e.g. a stacked
|
|
540
|
-
* Planner's day-column starts under a shared AlignedStack gutter) instead of
|
|
541
|
-
* the scale's auto-chosen ones. Float `tickValues` on linear axes unchanged.
|
|
542
|
-
*/
|
|
543
|
-
export const chartTimeTickValues = example({
|
|
544
|
-
keywords: ["Chart", "axis", "tickValues", "DateTime", "time", "date", "ticks", "pin", "explicit", "#318"],
|
|
545
|
-
description: "Explicit Date tickValues on a time axis (#318) — ticks pinned to exact Monday instants render through the date tickFormat; a pinned [min, max) domain matches a stacked Planner's day columns",
|
|
287
|
+
export const tooltipOverStickyTable = example({
|
|
288
|
+
keywords: ["Chart", "tooltip", "zIndex", "z-index", "sticky", "stickyHeader", "Table", "header", "overlay", "layering", "portal"],
|
|
289
|
+
description: "Chart hover tooltip layers ABOVE a sibling Table's sticky column header — hover the line near the BOTTOM of the chart so the tooltip overlaps the header row directly below it. The tooltip's z-index must sit on its own positioned content (the visx portal wrapper is position:static, so its z-index is ignored) or the sticky header (z-index 2) paints over it.",
|
|
546
290
|
fn: East.function([], UIComponentType, ($) => {
|
|
547
|
-
const
|
|
548
|
-
{
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
new Date("2026-03-30T00:00:00Z"),
|
|
559
|
-
new Date("2026-04-01T00:00:00Z"),
|
|
560
|
-
new Date("2026-04-03T00:00:00Z"),
|
|
561
|
-
new Date("2026-04-05T00:00:00Z"),
|
|
562
|
-
],
|
|
563
|
-
format: Chart.format.date("ddd DD"),
|
|
564
|
-
}, grid: true }) }));
|
|
291
|
+
const TOOLTIP_TABLE_ROWS = Array.from({ length: 14 }, (_, i) => ({
|
|
292
|
+
id: `SKU-${String(i + 1).padStart(3, "0")}`,
|
|
293
|
+
region: ["North", "South", "East", "West"][i % 4],
|
|
294
|
+
value: BigInt(600 + i * 73),
|
|
295
|
+
}));
|
|
296
|
+
const chartRows = $.const([
|
|
297
|
+
{ month: "Jan", sales: 100n }, { month: "Feb", sales: 150n }, { month: "Mar", sales: 120n },
|
|
298
|
+
{ month: "Apr", sales: 180n }, { month: "May", sales: 140n }, { month: "Jun", sales: 170n },
|
|
299
|
+
], ArrayType(StructType({ month: StringType, sales: IntegerType })));
|
|
300
|
+
const tableRows = $.const(TOOLTIP_TABLE_ROWS, ArrayType(StructType({ id: StringType, region: StringType, value: IntegerType })));
|
|
301
|
+
return (_jsxs(VStack, { gap: "0", align: "stretch", width: "100%", children: [_jsx(Box, { height: "260px", width: "100%", children: _jsx(Chart, { layers: Chart.Line(chartRows, { x: r => r.month, y: r => r.sales }, { color: "teal.solid" }), grid: true, tooltip: true }) }), _jsx(Table, { data: tableRows, columns: ["id", "region", "value"], height: "150px", stickyHeader: true })] }));
|
|
565
302
|
}),
|
|
566
303
|
inputs: [],
|
|
567
304
|
});
|