intergalactic 15.111.0 → 15.112.0-prerelease.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +53 -0
- package/accordion/lib/cjs/Accordion.js +9 -9
- package/accordion/lib/es6/Accordion.js +9 -9
- package/accordion/package.json +1 -1
- package/animation/lib/cjs/Animation.js +11 -11
- package/animation/lib/cjs/Collapse.js +28 -28
- package/animation/lib/cjs/FadeInOut.js +28 -28
- package/animation/lib/cjs/Scale.js +28 -28
- package/animation/lib/cjs/Slide.js +28 -28
- package/animation/lib/cjs/Transform.js +28 -28
- package/animation/lib/es6/Animation.js +11 -11
- package/animation/lib/es6/Collapse.js +28 -28
- package/animation/lib/es6/FadeInOut.js +28 -28
- package/animation/lib/es6/Scale.js +28 -28
- package/animation/lib/es6/Slide.js +28 -28
- package/animation/lib/es6/Transform.js +28 -28
- package/animation/package.json +1 -1
- package/badge/lib/cjs/Badge.js +6 -6
- package/badge/lib/es6/Badge.js +6 -6
- package/badge/package.json +1 -1
- package/base-trigger/lib/cjs/BaseTrigger.js +18 -18
- package/base-trigger/lib/cjs/ButtonTrigger.js +3 -3
- package/base-trigger/lib/cjs/FilterTrigger.js +7 -7
- package/base-trigger/lib/cjs/LinkTrigger.js +12 -12
- package/base-trigger/lib/es6/BaseTrigger.js +18 -18
- package/base-trigger/lib/es6/ButtonTrigger.js +3 -3
- package/base-trigger/lib/es6/FilterTrigger.js +7 -7
- package/base-trigger/lib/es6/LinkTrigger.js +12 -12
- package/base-trigger/package.json +1 -1
- package/breadcrumbs/lib/cjs/Breadcrumbs.js +8 -8
- package/breadcrumbs/lib/es6/Breadcrumbs.js +8 -8
- package/breadcrumbs/package.json +1 -1
- package/breakpoints/package.json +1 -1
- package/button/lib/cjs/component/Button/Button.js +27 -27
- package/button/lib/cjs/component/ButtonLink/ButtonLink.js +20 -20
- package/button/lib/es6/component/Button/Button.js +27 -27
- package/button/lib/es6/component/ButtonLink/ButtonLink.js +20 -20
- package/button/package.json +1 -1
- package/card/lib/cjs/Card.js +6 -6
- package/card/lib/es6/Card.js +6 -6
- package/card/package.json +1 -1
- package/carousel/lib/cjs/Carousel.js +23 -26
- package/carousel/lib/cjs/Carousel.js.map +1 -1
- package/carousel/lib/es6/Carousel.js +23 -26
- package/carousel/lib/es6/Carousel.js.map +1 -1
- package/carousel/package.json +1 -1
- package/checkbox/lib/cjs/Checkbox.js +18 -18
- package/checkbox/lib/es6/Checkbox.js +18 -18
- package/checkbox/package.json +1 -1
- package/color-picker/PaletteManager.d.ts +20 -31
- package/color-picker/lib/cjs/ColorPicker.js +24 -24
- package/color-picker/lib/cjs/PaletteManager.js +26 -29
- package/color-picker/lib/cjs/PaletteManager.js.map +1 -1
- package/color-picker/lib/cjs/components/InputColor.js +24 -24
- package/color-picker/lib/es6/ColorPicker.js +24 -24
- package/color-picker/lib/es6/PaletteManager.js +26 -29
- package/color-picker/lib/es6/PaletteManager.js.map +1 -1
- package/color-picker/lib/es6/components/InputColor.js +24 -24
- package/color-picker/lib/types/PaletteManager.d.ts +20 -31
- package/color-picker/package.json +1 -1
- package/components.json +73 -73
- package/core/package.json +1 -1
- package/counter/lib/cjs/Counter.js +13 -15
- package/counter/lib/cjs/Counter.js.map +1 -1
- package/counter/lib/es6/Counter.js +13 -15
- package/counter/lib/es6/Counter.js.map +1 -1
- package/counter/package.json +1 -1
- package/d3-chart/a11y/PlotA11yModule.d.ts +1 -1
- package/d3-chart/component/Chart/AbstractChart.d.ts +2 -1
- package/d3-chart/component/Chart/AbstractChart.type.d.ts +11 -1
- package/d3-chart/component/ChartLegend/BaseLegend.d.ts +1 -1
- package/d3-chart/component/ChartLegend/BaseLegend.type.d.ts +2 -1
- package/d3-chart/component/ChartLegend/LegendItem/LegendItem.type.d.ts +14 -4
- package/d3-chart/component/ChartLegend/LegendTable/LegendTable.type.d.ts +1 -1
- package/d3-chart/lib/cjs/Area.js +11 -11
- package/d3-chart/lib/cjs/Axis.js +14 -14
- package/d3-chart/lib/cjs/Bar.js +16 -16
- package/d3-chart/lib/cjs/Bubble.js +12 -12
- package/d3-chart/lib/cjs/CompactHorizontalBar.js +16 -16
- package/d3-chart/lib/cjs/Donut.js +9 -9
- package/d3-chart/lib/cjs/Dots.js +8 -8
- package/d3-chart/lib/cjs/HorizontalBar.js +16 -16
- package/d3-chart/lib/cjs/Hover.js +3 -3
- package/d3-chart/lib/cjs/Line.js +9 -9
- package/d3-chart/lib/cjs/Plot.js +3 -3
- package/d3-chart/lib/cjs/Radar.js +19 -19
- package/d3-chart/lib/cjs/RadialTree.js +12 -12
- package/d3-chart/lib/cjs/Reference.js +12 -12
- package/d3-chart/lib/cjs/ScatterPlot.js +9 -9
- package/d3-chart/lib/cjs/Tooltip.js +9 -9
- package/d3-chart/lib/cjs/Venn.js +9 -9
- package/d3-chart/lib/cjs/a11y/PlotA11yModule.js +2 -2
- package/d3-chart/lib/cjs/a11y/PlotA11yModule.js.map +1 -1
- package/d3-chart/lib/cjs/a11y/PlotA11yView.js +21 -18
- package/d3-chart/lib/cjs/a11y/PlotA11yView.js.map +1 -1
- package/d3-chart/lib/cjs/component/Chart/AbstractChart.js +5 -2
- package/d3-chart/lib/cjs/component/Chart/AbstractChart.js.map +1 -1
- package/d3-chart/lib/cjs/component/Chart/AbstractChart.type.js.map +1 -1
- package/d3-chart/lib/cjs/component/Chart/AreaChart.js +10 -0
- package/d3-chart/lib/cjs/component/Chart/AreaChart.js.map +1 -1
- package/d3-chart/lib/cjs/component/Chart/BarChart.js +10 -0
- package/d3-chart/lib/cjs/component/Chart/BarChart.js.map +1 -1
- package/d3-chart/lib/cjs/component/Chart/BubbleChart.js +10 -0
- package/d3-chart/lib/cjs/component/Chart/BubbleChart.js.map +1 -1
- package/d3-chart/lib/cjs/component/Chart/CigaretteChart.js +10 -1
- package/d3-chart/lib/cjs/component/Chart/CigaretteChart.js.map +1 -1
- package/d3-chart/lib/cjs/component/Chart/CompactHorizontalBarChart.js +10 -0
- package/d3-chart/lib/cjs/component/Chart/CompactHorizontalBarChart.js.map +1 -1
- package/d3-chart/lib/cjs/component/Chart/DonutChart.js +10 -0
- package/d3-chart/lib/cjs/component/Chart/DonutChart.js.map +1 -1
- package/d3-chart/lib/cjs/component/Chart/HistogramChart.js +10 -0
- package/d3-chart/lib/cjs/component/Chart/HistogramChart.js.map +1 -1
- package/d3-chart/lib/cjs/component/Chart/LineChart.js +10 -0
- package/d3-chart/lib/cjs/component/Chart/LineChart.js.map +1 -1
- package/d3-chart/lib/cjs/component/Chart/RadarChart.js +11 -0
- package/d3-chart/lib/cjs/component/Chart/RadarChart.js.map +1 -1
- package/d3-chart/lib/cjs/component/Chart/ScatterPlotChart.js +10 -0
- package/d3-chart/lib/cjs/component/Chart/ScatterPlotChart.js.map +1 -1
- package/d3-chart/lib/cjs/component/Chart/VennChart.js +11 -3
- package/d3-chart/lib/cjs/component/Chart/VennChart.js.map +1 -1
- package/d3-chart/lib/cjs/component/ChartLegend/BaseLegend.js +4 -10
- package/d3-chart/lib/cjs/component/ChartLegend/BaseLegend.js.map +1 -1
- package/d3-chart/lib/cjs/component/ChartLegend/BaseLegend.type.js.map +1 -1
- package/d3-chart/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +7 -5
- package/d3-chart/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
- package/d3-chart/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +35 -30
- package/d3-chart/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
- package/d3-chart/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
- package/d3-chart/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +8 -7
- package/d3-chart/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
- package/d3-chart/lib/cjs/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
- package/d3-chart/lib/cjs/translations/de.json +2 -1
- package/d3-chart/lib/cjs/translations/en.json +2 -1
- package/d3-chart/lib/cjs/translations/es.json +2 -1
- package/d3-chart/lib/cjs/translations/fr.json +2 -1
- package/d3-chart/lib/cjs/translations/it.json +2 -1
- package/d3-chart/lib/cjs/translations/ja.json +2 -1
- package/d3-chart/lib/cjs/translations/ko.json +2 -1
- package/d3-chart/lib/cjs/translations/nl.json +2 -1
- package/d3-chart/lib/cjs/translations/pl.json +2 -1
- package/d3-chart/lib/cjs/translations/pt.json +2 -1
- package/d3-chart/lib/cjs/translations/sv.json +2 -1
- package/d3-chart/lib/cjs/translations/tr.json +2 -1
- package/d3-chart/lib/cjs/translations/vi.json +2 -1
- package/d3-chart/lib/cjs/translations/zh.json +2 -1
- package/d3-chart/lib/es6/Area.js +11 -11
- package/d3-chart/lib/es6/Axis.js +14 -14
- package/d3-chart/lib/es6/Bar.js +16 -16
- package/d3-chart/lib/es6/Bubble.js +12 -12
- package/d3-chart/lib/es6/CompactHorizontalBar.js +16 -16
- package/d3-chart/lib/es6/Donut.js +9 -9
- package/d3-chart/lib/es6/Dots.js +8 -8
- package/d3-chart/lib/es6/HorizontalBar.js +16 -16
- package/d3-chart/lib/es6/Hover.js +3 -3
- package/d3-chart/lib/es6/Line.js +9 -9
- package/d3-chart/lib/es6/Plot.js +3 -3
- package/d3-chart/lib/es6/Radar.js +19 -19
- package/d3-chart/lib/es6/RadialTree.js +12 -12
- package/d3-chart/lib/es6/Reference.js +12 -12
- package/d3-chart/lib/es6/ScatterPlot.js +9 -9
- package/d3-chart/lib/es6/Tooltip.js +9 -9
- package/d3-chart/lib/es6/Venn.js +9 -9
- package/d3-chart/lib/es6/a11y/PlotA11yModule.js +2 -2
- package/d3-chart/lib/es6/a11y/PlotA11yModule.js.map +1 -1
- package/d3-chart/lib/es6/a11y/PlotA11yView.js +21 -18
- package/d3-chart/lib/es6/a11y/PlotA11yView.js.map +1 -1
- package/d3-chart/lib/es6/component/Chart/AbstractChart.js +5 -2
- package/d3-chart/lib/es6/component/Chart/AbstractChart.js.map +1 -1
- package/d3-chart/lib/es6/component/Chart/AbstractChart.type.js.map +1 -1
- package/d3-chart/lib/es6/component/Chart/AreaChart.js +10 -0
- package/d3-chart/lib/es6/component/Chart/AreaChart.js.map +1 -1
- package/d3-chart/lib/es6/component/Chart/BarChart.js +10 -0
- package/d3-chart/lib/es6/component/Chart/BarChart.js.map +1 -1
- package/d3-chart/lib/es6/component/Chart/BubbleChart.js +10 -0
- package/d3-chart/lib/es6/component/Chart/BubbleChart.js.map +1 -1
- package/d3-chart/lib/es6/component/Chart/CigaretteChart.js +10 -1
- package/d3-chart/lib/es6/component/Chart/CigaretteChart.js.map +1 -1
- package/d3-chart/lib/es6/component/Chart/CompactHorizontalBarChart.js +10 -0
- package/d3-chart/lib/es6/component/Chart/CompactHorizontalBarChart.js.map +1 -1
- package/d3-chart/lib/es6/component/Chart/DonutChart.js +10 -0
- package/d3-chart/lib/es6/component/Chart/DonutChart.js.map +1 -1
- package/d3-chart/lib/es6/component/Chart/HistogramChart.js +10 -0
- package/d3-chart/lib/es6/component/Chart/HistogramChart.js.map +1 -1
- package/d3-chart/lib/es6/component/Chart/LineChart.js +10 -0
- package/d3-chart/lib/es6/component/Chart/LineChart.js.map +1 -1
- package/d3-chart/lib/es6/component/Chart/RadarChart.js +11 -0
- package/d3-chart/lib/es6/component/Chart/RadarChart.js.map +1 -1
- package/d3-chart/lib/es6/component/Chart/ScatterPlotChart.js +10 -0
- package/d3-chart/lib/es6/component/Chart/ScatterPlotChart.js.map +1 -1
- package/d3-chart/lib/es6/component/Chart/VennChart.js +11 -3
- package/d3-chart/lib/es6/component/Chart/VennChart.js.map +1 -1
- package/d3-chart/lib/es6/component/ChartLegend/BaseLegend.js +4 -10
- package/d3-chart/lib/es6/component/ChartLegend/BaseLegend.js.map +1 -1
- package/d3-chart/lib/es6/component/ChartLegend/BaseLegend.type.js.map +1 -1
- package/d3-chart/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +7 -5
- package/d3-chart/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
- package/d3-chart/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +35 -30
- package/d3-chart/lib/es6/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
- package/d3-chart/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
- package/d3-chart/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +8 -7
- package/d3-chart/lib/es6/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
- package/d3-chart/lib/es6/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
- package/d3-chart/lib/es6/translations/de.json +2 -1
- package/d3-chart/lib/es6/translations/en.json +2 -1
- package/d3-chart/lib/es6/translations/es.json +2 -1
- package/d3-chart/lib/es6/translations/fr.json +2 -1
- package/d3-chart/lib/es6/translations/it.json +2 -1
- package/d3-chart/lib/es6/translations/ja.json +2 -1
- package/d3-chart/lib/es6/translations/ko.json +2 -1
- package/d3-chart/lib/es6/translations/nl.json +2 -1
- package/d3-chart/lib/es6/translations/pl.json +2 -1
- package/d3-chart/lib/es6/translations/pt.json +2 -1
- package/d3-chart/lib/es6/translations/sv.json +2 -1
- package/d3-chart/lib/es6/translations/tr.json +2 -1
- package/d3-chart/lib/es6/translations/vi.json +2 -1
- package/d3-chart/lib/es6/translations/zh.json +2 -1
- package/d3-chart/lib/types/a11y/PlotA11yModule.d.ts +1 -1
- package/d3-chart/lib/types/component/Chart/AbstractChart.d.ts +2 -1
- package/d3-chart/lib/types/component/Chart/AbstractChart.type.d.ts +11 -1
- package/d3-chart/lib/types/component/ChartLegend/BaseLegend.d.ts +1 -1
- package/d3-chart/lib/types/component/ChartLegend/BaseLegend.type.d.ts +2 -1
- package/d3-chart/lib/types/component/ChartLegend/LegendItem/LegendItem.type.d.ts +14 -4
- package/d3-chart/lib/types/component/ChartLegend/LegendTable/LegendTable.type.d.ts +1 -1
- package/d3-chart/lib/types/translations/__intergalactic-dynamic-locales.d.ts +13 -0
- package/d3-chart/package.json +1 -1
- package/d3-chart/translations/__intergalactic-dynamic-locales.d.ts +13 -0
- package/data-table/lib/cjs/Body.js +3 -3
- package/data-table/lib/cjs/DataTable.js +36 -36
- package/data-table/lib/es6/Body.js +3 -3
- package/data-table/lib/es6/DataTable.js +36 -36
- package/data-table/package.json +1 -1
- package/date-picker/lib/cjs/components/Calendar.js +21 -21
- package/date-picker/lib/cjs/components/DateRangeComparatorAbstract.js +29 -29
- package/date-picker/lib/cjs/components/InputTrigger.js +29 -29
- package/date-picker/lib/cjs/components/PickerAbstract.js +29 -29
- package/date-picker/lib/cjs/components/RangePickerAbstract.js +29 -29
- package/date-picker/lib/es6/components/Calendar.js +21 -21
- package/date-picker/lib/es6/components/DateRangeComparatorAbstract.js +29 -29
- package/date-picker/lib/es6/components/InputTrigger.js +29 -29
- package/date-picker/lib/es6/components/PickerAbstract.js +29 -29
- package/date-picker/lib/es6/components/RangePickerAbstract.js +29 -29
- package/date-picker/package.json +1 -1
- package/divider/lib/cjs/Divider.js +10 -10
- package/divider/lib/es6/Divider.js +10 -10
- package/divider/package.json +1 -1
- package/dot/lib/cjs/Dot.js +10 -10
- package/dot/lib/es6/Dot.js +10 -10
- package/dot/package.json +1 -1
- package/drag-and-drop/index.d.ts +22 -8
- package/drag-and-drop/lib/cjs/DragAndDrop.js +172 -125
- package/drag-and-drop/lib/cjs/DragAndDrop.js.map +1 -1
- package/drag-and-drop/lib/cjs/index.d.js.map +1 -1
- package/drag-and-drop/lib/cjs/translations/de.json +6 -5
- package/drag-and-drop/lib/cjs/translations/en.json +6 -5
- package/drag-and-drop/lib/cjs/translations/es.json +6 -5
- package/drag-and-drop/lib/cjs/translations/fr.json +6 -5
- package/drag-and-drop/lib/cjs/translations/it.json +6 -5
- package/drag-and-drop/lib/cjs/translations/ja.json +6 -5
- package/drag-and-drop/lib/cjs/translations/ko.json +6 -5
- package/drag-and-drop/lib/cjs/translations/nl.json +6 -5
- package/drag-and-drop/lib/cjs/translations/pl.json +6 -5
- package/drag-and-drop/lib/cjs/translations/pt.json +6 -5
- package/drag-and-drop/lib/cjs/translations/sv.json +6 -5
- package/drag-and-drop/lib/cjs/translations/tr.json +6 -5
- package/drag-and-drop/lib/cjs/translations/vi.json +6 -5
- package/drag-and-drop/lib/cjs/translations/zh.json +6 -5
- package/drag-and-drop/lib/es6/DragAndDrop.js +172 -125
- package/drag-and-drop/lib/es6/DragAndDrop.js.map +1 -1
- package/drag-and-drop/lib/es6/index.d.js.map +1 -1
- package/drag-and-drop/lib/es6/translations/de.json +6 -5
- package/drag-and-drop/lib/es6/translations/en.json +6 -5
- package/drag-and-drop/lib/es6/translations/es.json +6 -5
- package/drag-and-drop/lib/es6/translations/fr.json +6 -5
- package/drag-and-drop/lib/es6/translations/it.json +6 -5
- package/drag-and-drop/lib/es6/translations/ja.json +6 -5
- package/drag-and-drop/lib/es6/translations/ko.json +6 -5
- package/drag-and-drop/lib/es6/translations/nl.json +6 -5
- package/drag-and-drop/lib/es6/translations/pl.json +6 -5
- package/drag-and-drop/lib/es6/translations/pt.json +6 -5
- package/drag-and-drop/lib/es6/translations/sv.json +6 -5
- package/drag-and-drop/lib/es6/translations/tr.json +6 -5
- package/drag-and-drop/lib/es6/translations/vi.json +6 -5
- package/drag-and-drop/lib/es6/translations/zh.json +6 -5
- package/drag-and-drop/lib/types/index.d.ts +22 -8
- package/drag-and-drop/package.json +1 -1
- package/dropdown/lib/cjs/AbstractDropdown.js +1 -5
- package/dropdown/lib/cjs/AbstractDropdown.js.map +1 -1
- package/dropdown/lib/cjs/Dropdown.js +15 -15
- package/dropdown/lib/es6/AbstractDropdown.js +1 -5
- package/dropdown/lib/es6/AbstractDropdown.js.map +1 -1
- package/dropdown/lib/es6/Dropdown.js +15 -15
- package/dropdown/package.json +1 -1
- package/dropdown-menu/index.d.ts +2 -0
- package/dropdown-menu/lib/cjs/DropdownMenu.js +83 -73
- package/dropdown-menu/lib/cjs/DropdownMenu.js.map +1 -1
- package/dropdown-menu/lib/cjs/index.d.js.map +1 -1
- package/dropdown-menu/lib/cjs/style/dropdown-menu.shadow.css +3 -3
- package/dropdown-menu/lib/es6/DropdownMenu.js +80 -69
- package/dropdown-menu/lib/es6/DropdownMenu.js.map +1 -1
- package/dropdown-menu/lib/es6/index.d.js.map +1 -1
- package/dropdown-menu/lib/es6/style/dropdown-menu.shadow.css +3 -3
- package/dropdown-menu/lib/types/index.d.ts +2 -0
- package/dropdown-menu/package.json +1 -1
- package/ellipsis/lib/cjs/Ellipsis.js +23 -19
- package/ellipsis/lib/cjs/Ellipsis.js.map +1 -1
- package/ellipsis/lib/es6/Ellipsis.js +23 -19
- package/ellipsis/lib/es6/Ellipsis.js.map +1 -1
- package/ellipsis/package.json +1 -1
- package/errors/lib/cjs/Error.js +9 -9
- package/errors/lib/es6/Error.js +9 -9
- package/errors/package.json +1 -1
- package/feature-popover/lib/cjs/FeaturePopover.js +11 -11
- package/feature-popover/lib/es6/FeaturePopover.js +11 -11
- package/feature-popover/package.json +1 -1
- package/feedback-form/component/feedback-rating/FeedbackRating.d.ts +5 -11
- package/feedback-form/lib/cjs/FeedbackForm.js +7 -7
- package/feedback-form/lib/cjs/component/checkbox-button/CheckboxButton.js +3 -3
- package/feedback-form/lib/cjs/component/feedback-rating/FeedbackRating.js +2 -2
- package/feedback-form/lib/cjs/component/feedback-rating/FeedbackRating.js.map +1 -1
- package/feedback-form/lib/cjs/component/slider-rating/SliderRating.js +6 -6
- package/feedback-form/lib/es6/FeedbackForm.js +7 -7
- package/feedback-form/lib/es6/component/checkbox-button/CheckboxButton.js +3 -3
- package/feedback-form/lib/es6/component/feedback-rating/FeedbackRating.js +2 -2
- package/feedback-form/lib/es6/component/feedback-rating/FeedbackRating.js.map +1 -1
- package/feedback-form/lib/es6/component/slider-rating/SliderRating.js +6 -6
- package/feedback-form/lib/types/component/feedback-rating/FeedbackRating.d.ts +5 -11
- package/feedback-form/package.json +1 -1
- package/flags/lib/cjs/Flags.js +3 -3
- package/flags/lib/es6/Flags.js +3 -3
- package/flags/lib/sprites/sprite@1x.css +256 -256
- package/flags/lib/sprites/sprite@2x.css +257 -257
- package/flags/package.json +1 -1
- package/flex-box/lib/cjs/Box/useBox.js +3 -3
- package/flex-box/lib/cjs/Flex/useFlex.js +3 -3
- package/flex-box/lib/cjs/invalid-state-box/InvalidStateBox.js +2 -2
- package/flex-box/lib/es6/Box/useBox.js +3 -3
- package/flex-box/lib/es6/Flex/useFlex.js +3 -3
- package/flex-box/lib/es6/invalid-state-box/InvalidStateBox.js +2 -2
- package/flex-box/package.json +1 -1
- package/format-text/lib/cjs/FormatText.js +5 -5
- package/format-text/lib/es6/FormatText.js +5 -5
- package/format-text/package.json +1 -1
- package/fullscreen-modal/lib/cjs/FullscreenModal.js +13 -13
- package/fullscreen-modal/lib/es6/FullscreenModal.js +13 -13
- package/fullscreen-modal/package.json +1 -1
- package/grid/lib/cjs/Grid.js +114 -114
- package/grid/lib/es6/Grid.js +114 -114
- package/grid/package.json +1 -1
- package/i18n-unplugin/package.json +1 -1
- package/icon/Tack/l/index.d.ts +6 -0
- package/icon/Tack/l/index.js +38 -0
- package/icon/Tack/l/index.mjs +26 -0
- package/icon/Tack/m/index.d.ts +6 -0
- package/icon/Tack/m/index.js +38 -0
- package/icon/Tack/m/index.mjs +26 -0
- package/icon/TackNo/l/index.d.ts +6 -0
- package/icon/TackNo/l/index.js +41 -0
- package/icon/TackNo/l/index.mjs +29 -0
- package/icon/TackNo/m/index.d.ts +6 -0
- package/icon/TackNo/m/index.js +41 -0
- package/icon/TackNo/m/index.mjs +29 -0
- package/icon/Yext/l/index.d.ts +6 -0
- package/icon/Yext/l/index.js +52 -0
- package/icon/Yext/l/index.mjs +40 -0
- package/icon/Yext/m/index.d.ts +6 -0
- package/icon/Yext/m/index.js +52 -0
- package/icon/Yext/m/index.mjs +40 -0
- package/icon/color/BirdeyeColored/l/index.d.ts +6 -0
- package/icon/color/BirdeyeColored/l/index.js +39 -0
- package/icon/color/BirdeyeColored/l/index.mjs +27 -0
- package/icon/color/BirdeyeColored/m/index.d.ts +6 -0
- package/icon/color/BirdeyeColored/m/index.js +39 -0
- package/icon/color/BirdeyeColored/m/index.mjs +27 -0
- package/icon/color/CallTrackingMetricsColored/l/index.d.ts +6 -0
- package/icon/color/CallTrackingMetricsColored/l/index.js +43 -0
- package/icon/color/CallTrackingMetricsColored/l/index.mjs +31 -0
- package/icon/color/CallTrackingMetricsColored/m/index.d.ts +6 -0
- package/icon/color/CallTrackingMetricsColored/m/index.js +43 -0
- package/icon/color/CallTrackingMetricsColored/m/index.mjs +31 -0
- package/icon/color/CampaignMonitorColored/l/index.d.ts +6 -0
- package/icon/color/CampaignMonitorColored/l/index.js +37 -0
- package/icon/color/CampaignMonitorColored/l/index.mjs +25 -0
- package/icon/color/CampaignMonitorColored/m/index.d.ts +6 -0
- package/icon/color/CampaignMonitorColored/m/index.js +37 -0
- package/icon/color/CampaignMonitorColored/m/index.mjs +25 -0
- package/icon/color/Confluence/l/index.js +4 -4
- package/icon/color/Confluence/l/index.mjs +4 -4
- package/icon/color/Confluence/m/index.js +4 -4
- package/icon/color/Confluence/m/index.mjs +4 -4
- package/icon/color/ConstantContactColored/l/index.d.ts +6 -0
- package/icon/color/ConstantContactColored/l/index.js +45 -0
- package/icon/color/ConstantContactColored/l/index.mjs +33 -0
- package/icon/color/ConstantContactColored/m/index.d.ts +6 -0
- package/icon/color/ConstantContactColored/m/index.js +45 -0
- package/icon/color/ConstantContactColored/m/index.mjs +33 -0
- package/icon/color/GoogleDisplayVideoAds/l/index.d.ts +6 -0
- package/icon/color/GoogleDisplayVideoAds/l/index.js +53 -0
- package/icon/color/GoogleDisplayVideoAds/l/index.mjs +41 -0
- package/icon/color/GoogleDisplayVideoAds/m/index.d.ts +6 -0
- package/icon/color/GoogleDisplayVideoAds/m/index.js +53 -0
- package/icon/color/GoogleDisplayVideoAds/m/index.mjs +41 -0
- package/icon/color/InstagramColored/l/index.d.ts +6 -0
- package/icon/color/InstagramColored/l/index.js +188 -0
- package/icon/color/InstagramColored/l/index.mjs +176 -0
- package/icon/color/InstagramColored/m/index.d.ts +6 -0
- package/icon/color/InstagramColored/m/index.js +188 -0
- package/icon/color/InstagramColored/m/index.mjs +176 -0
- package/icon/color/MetaColored/l/index.d.ts +6 -0
- package/icon/color/MetaColored/l/index.js +75 -0
- package/icon/color/MetaColored/l/index.mjs +63 -0
- package/icon/color/MetaColored/m/index.d.ts +6 -0
- package/icon/color/MetaColored/m/index.js +83 -0
- package/icon/color/MetaColored/m/index.mjs +71 -0
- package/icon/color/MicrosoftOffice/l/index.js +10 -10
- package/icon/color/MicrosoftOffice/l/index.mjs +10 -10
- package/icon/color/MicrosoftOffice/m/index.js +10 -10
- package/icon/color/MicrosoftOffice/m/index.mjs +10 -10
- package/icon/color/PipedriveColored/l/index.d.ts +6 -0
- package/icon/color/PipedriveColored/l/index.js +43 -0
- package/icon/color/PipedriveColored/l/index.mjs +31 -0
- package/icon/color/PipedriveColored/m/index.d.ts +6 -0
- package/icon/color/PipedriveColored/m/index.js +43 -0
- package/icon/color/PipedriveColored/m/index.mjs +31 -0
- package/icon/color/ShopifyColored/l/index.d.ts +6 -0
- package/icon/color/ShopifyColored/l/index.js +45 -0
- package/icon/color/ShopifyColored/l/index.mjs +33 -0
- package/icon/color/ShopifyColored/m/index.d.ts +6 -0
- package/icon/color/ShopifyColored/m/index.js +45 -0
- package/icon/color/ShopifyColored/m/index.mjs +33 -0
- package/icon/color/WhatConvertsColored/l/index.d.ts +6 -0
- package/icon/color/WhatConvertsColored/l/index.js +39 -0
- package/icon/color/WhatConvertsColored/l/index.mjs +27 -0
- package/icon/color/WhatConvertsColored/m/index.d.ts +6 -0
- package/icon/color/WhatConvertsColored/m/index.js +39 -0
- package/icon/color/WhatConvertsColored/m/index.mjs +27 -0
- package/icon/color/WooCommerceColored/l/index.d.ts +6 -0
- package/icon/color/WooCommerceColored/l/index.js +43 -0
- package/icon/color/WooCommerceColored/l/index.mjs +31 -0
- package/icon/color/WooCommerceColored/m/index.d.ts +6 -0
- package/icon/color/WooCommerceColored/m/index.js +43 -0
- package/icon/color/WooCommerceColored/m/index.mjs +31 -0
- package/icon/lib/cjs/Icon.js +5 -5
- package/icon/lib/es6/Icon.js +5 -5
- package/icon/package.json +1 -1
- package/icon/pay/Discover/l/index.js +1 -1
- package/icon/pay/Discover/l/index.mjs +1 -1
- package/icon/pay/Discover/m/index.js +1 -1
- package/icon/pay/Discover/m/index.mjs +1 -1
- package/icon/pay/JCB/l/index.js +10 -10
- package/icon/pay/JCB/l/index.mjs +10 -10
- package/icon/pay/JCB/m/index.js +10 -10
- package/icon/pay/JCB/m/index.mjs +10 -10
- package/icon/pay/Visa/l/index.js +2 -2
- package/icon/pay/Visa/l/index.mjs +2 -2
- package/icon/pay/Visa/m/index.js +2 -2
- package/icon/pay/Visa/m/index.mjs +2 -2
- package/illustration/lib/cjs/index.js +1 -1
- package/illustration/lib/es6/index.js +1 -1
- package/illustration/package.json +1 -1
- package/inline-edit/lib/cjs/InlineEdit.js +4 -4
- package/inline-edit/lib/es6/InlineEdit.js +4 -4
- package/inline-edit/package.json +1 -1
- package/inline-input/lib/cjs/InlineInput.js +14 -14
- package/inline-input/lib/es6/InlineInput.js +14 -14
- package/inline-input/package.json +1 -1
- package/input/lib/cjs/Input.js +17 -17
- package/input/lib/es6/Input.js +17 -17
- package/input/package.json +1 -1
- package/input-mask/lib/cjs/InputMask.js +6 -6
- package/input-mask/lib/cjs/InputMask.js.map +1 -1
- package/input-mask/lib/es6/InputMask.js +6 -6
- package/input-mask/lib/es6/InputMask.js.map +1 -1
- package/input-mask/package.json +1 -1
- package/input-number/lib/cjs/InputNumber.js +9 -9
- package/input-number/lib/es6/InputNumber.js +9 -9
- package/input-number/package.json +1 -1
- package/input-tags/lib/cjs/InputTags.js +12 -12
- package/input-tags/lib/es6/InputTags.js +12 -12
- package/input-tags/package.json +1 -1
- package/link/lib/cjs/Link.js +12 -12
- package/link/lib/es6/Link.js +12 -12
- package/link/package.json +1 -1
- package/mini-chart/component/trend/Trend.d.ts +1 -1
- package/mini-chart/lib/cjs/component/score/Donut.js +9 -9
- package/mini-chart/lib/cjs/component/score/Donut.js.map +1 -1
- package/mini-chart/lib/cjs/component/score/Line.js +17 -17
- package/mini-chart/lib/cjs/component/score/Line.js.map +1 -1
- package/mini-chart/lib/cjs/component/trend/Bar.js +7 -7
- package/mini-chart/lib/cjs/component/trend/Bar.js.map +1 -1
- package/mini-chart/lib/cjs/component/trend/Line.js +7 -7
- package/mini-chart/lib/cjs/component/trend/Line.js.map +1 -1
- package/mini-chart/lib/cjs/component/trend/Trend.js +1 -1
- package/mini-chart/lib/cjs/component/trend/Trend.js.map +1 -1
- package/mini-chart/lib/es6/component/score/Donut.js +9 -9
- package/mini-chart/lib/es6/component/score/Donut.js.map +1 -1
- package/mini-chart/lib/es6/component/score/Line.js +17 -17
- package/mini-chart/lib/es6/component/score/Line.js.map +1 -1
- package/mini-chart/lib/es6/component/trend/Bar.js +7 -7
- package/mini-chart/lib/es6/component/trend/Bar.js.map +1 -1
- package/mini-chart/lib/es6/component/trend/Line.js +7 -7
- package/mini-chart/lib/es6/component/trend/Line.js.map +1 -1
- package/mini-chart/lib/es6/component/trend/Trend.js +1 -1
- package/mini-chart/lib/es6/component/trend/Trend.js.map +1 -1
- package/mini-chart/lib/types/component/trend/Trend.d.ts +1 -1
- package/mini-chart/package.json +1 -1
- package/modal/lib/cjs/Modal.js +8 -8
- package/modal/lib/es6/Modal.js +8 -8
- package/modal/package.json +1 -1
- package/neighbor-location/package.json +1 -1
- package/notice/lib/cjs/Notice.js +14 -14
- package/notice/lib/es6/Notice.js +14 -14
- package/notice/package.json +1 -1
- package/notice-bubble/lib/cjs/NoticeBubble.js +15 -15
- package/notice-bubble/lib/es6/NoticeBubble.js +15 -15
- package/notice-bubble/package.json +1 -1
- package/notice-global/lib/cjs/NoticeGlobal.js +11 -11
- package/notice-global/lib/es6/NoticeGlobal.js +11 -11
- package/notice-global/package.json +1 -1
- package/outside-click/package.json +1 -1
- package/package.json +1 -1
- package/pagination/lib/cjs/Pagination.js +11 -10
- package/pagination/lib/cjs/Pagination.js.map +1 -1
- package/pagination/lib/es6/Pagination.js +11 -10
- package/pagination/lib/es6/Pagination.js.map +1 -1
- package/pagination/package.json +1 -1
- package/pills/lib/cjs/Pills.js +13 -13
- package/pills/lib/es6/Pills.js +13 -13
- package/pills/package.json +1 -1
- package/popper/lib/cjs/Popper.js +6 -6
- package/popper/lib/es6/Popper.js +6 -6
- package/popper/package.json +1 -1
- package/portal/package.json +1 -1
- package/product-head/lib/cjs/Info.js +4 -4
- package/product-head/lib/cjs/ProductHead.js +5 -5
- package/product-head/lib/cjs/Title.js +4 -4
- package/product-head/lib/es6/Info.js +4 -4
- package/product-head/lib/es6/ProductHead.js +5 -5
- package/product-head/lib/es6/Title.js +4 -4
- package/product-head/package.json +1 -1
- package/progress-bar/lib/cjs/ProgressBar.js +15 -15
- package/progress-bar/lib/es6/ProgressBar.js +15 -15
- package/progress-bar/package.json +1 -1
- package/radio/lib/cjs/Radio.js +16 -16
- package/radio/lib/es6/Radio.js +16 -16
- package/radio/package.json +1 -1
- package/scroll-area/lib/cjs/ScrollArea.js +21 -21
- package/scroll-area/lib/cjs/ScrollBar.js +6 -6
- package/scroll-area/lib/es6/ScrollArea.js +21 -21
- package/scroll-area/lib/es6/ScrollBar.js +6 -6
- package/scroll-area/package.json +1 -1
- package/select/lib/cjs/InputSearch.js +6 -6
- package/select/lib/cjs/Select.js +8 -8
- package/select/lib/es6/InputSearch.js +6 -6
- package/select/lib/es6/Select.js +8 -8
- package/select/package.json +1 -1
- package/side-panel/lib/cjs/SidePanel.js +16 -16
- package/side-panel/lib/es6/SidePanel.js +16 -16
- package/side-panel/package.json +1 -1
- package/skeleton/lib/cjs/Charts/Area.js +9 -9
- package/skeleton/lib/cjs/Charts/Bar.js +9 -9
- package/skeleton/lib/cjs/Charts/Bubble.js +9 -9
- package/skeleton/lib/cjs/Charts/CompactHorizontalBar.js +9 -9
- package/skeleton/lib/cjs/Charts/Donut.js +9 -9
- package/skeleton/lib/cjs/Charts/Histogram.js +9 -9
- package/skeleton/lib/cjs/Charts/Line.js +9 -9
- package/skeleton/lib/cjs/Charts/RadialTree.js +9 -9
- package/skeleton/lib/cjs/Charts/ScatterPlot.js +9 -9
- package/skeleton/lib/cjs/Charts/Venn.js +9 -9
- package/skeleton/lib/cjs/Skeleton.js +8 -8
- package/skeleton/lib/es6/Charts/Area.js +9 -9
- package/skeleton/lib/es6/Charts/Bar.js +9 -9
- package/skeleton/lib/es6/Charts/Bubble.js +9 -9
- package/skeleton/lib/es6/Charts/CompactHorizontalBar.js +9 -9
- package/skeleton/lib/es6/Charts/Donut.js +9 -9
- package/skeleton/lib/es6/Charts/Histogram.js +9 -9
- package/skeleton/lib/es6/Charts/Line.js +9 -9
- package/skeleton/lib/es6/Charts/RadialTree.js +9 -9
- package/skeleton/lib/es6/Charts/ScatterPlot.js +9 -9
- package/skeleton/lib/es6/Charts/Venn.js +9 -9
- package/skeleton/lib/es6/Skeleton.js +8 -8
- package/skeleton/package.json +1 -1
- package/slider/lib/cjs/Slider.js +8 -8
- package/slider/lib/es6/Slider.js +8 -8
- package/slider/package.json +1 -1
- package/spin/lib/cjs/Spin.js +13 -13
- package/spin/lib/es6/Spin.js +13 -13
- package/spin/package.json +1 -1
- package/spin-container/lib/cjs/SpinContainer.js +8 -8
- package/spin-container/lib/es6/SpinContainer.js +8 -8
- package/spin-container/package.json +1 -1
- package/sticky/lib/cjs/Sticky.js +2 -2
- package/sticky/lib/es6/Sticky.js +2 -2
- package/sticky/package.json +1 -1
- package/switch/lib/cjs/Switch.js +23 -30
- package/switch/lib/cjs/Switch.js.map +1 -1
- package/switch/lib/es6/Switch.js +23 -30
- package/switch/lib/es6/Switch.js.map +1 -1
- package/switch/package.json +1 -1
- package/tab-line/lib/cjs/TabLine.js +13 -13
- package/tab-line/lib/es6/TabLine.js +13 -13
- package/tab-line/package.json +1 -1
- package/tab-panel/lib/cjs/TabPanel.js +8 -8
- package/tab-panel/lib/es6/TabPanel.js +8 -8
- package/tab-panel/package.json +1 -1
- package/tag/lib/cjs/Tag.js +23 -23
- package/tag/lib/es6/Tag.js +23 -23
- package/tag/package.json +1 -1
- package/textarea/lib/cjs/Textarea.js +8 -8
- package/textarea/lib/es6/Textarea.js +8 -8
- package/textarea/package.json +1 -1
- package/time-picker/lib/cjs/TimePicker.js +12 -12
- package/time-picker/lib/es6/TimePicker.js +12 -12
- package/time-picker/package.json +1 -1
- package/tooltip/lib/cjs/Tooltip.js +9 -9
- package/tooltip/lib/es6/Tooltip.js +9 -9
- package/tooltip/package.json +1 -1
- package/typography/lib/cjs/Blockquote.js +4 -4
- package/typography/lib/cjs/Hint.js +7 -7
- package/typography/lib/cjs/List.js +5 -5
- package/typography/lib/cjs/Text.js +34 -34
- package/typography/lib/es6/Blockquote.js +4 -4
- package/typography/lib/es6/Hint.js +7 -7
- package/typography/lib/es6/List.js +5 -5
- package/typography/lib/es6/Text.js +34 -34
- package/typography/package.json +1 -1
- package/utils/lib/components/invalid-state-pattern/InvalidStatePattern.js +2 -2
- package/utils/lib/components/invalid-state-pattern/InvalidStatePattern.mjs +2 -2
- package/utils/lib/core/types/Component.d.ts +23 -2
- package/utils/lib/core/types/Component.js +1 -1
- package/utils/lib/core/types/Component.js.map +1 -1
- package/utils/lib/core/types/Component.mjs +1 -1
- package/utils/lib/core/types/Component.mjs.map +1 -1
- package/utils/lib/injectStyle.js +1 -1
- package/utils/lib/injectStyle.mjs +1 -1
- package/widget-empty/lib/cjs/WidgetEmpty.js +5 -5
- package/widget-empty/lib/es6/WidgetEmpty.js +5 -5
- package/widget-empty/package.json +1 -1
- package/wizard/lib/cjs/Wizard.js +12 -12
- package/wizard/lib/es6/Wizard.js +12 -12
- package/wizard/package.json +1 -1
@@ -12,30 +12,30 @@ import { assignProps as _assignProps4 } from 'intergalactic/core';
|
|
12
12
|
import { assignProps as _assignProps3 } from 'intergalactic/core';
|
13
13
|
import { assignProps as _assignProps2 } from 'intergalactic/core';
|
14
14
|
import { assignProps as _assignProps } from 'intergalactic/core';
|
15
|
-
var _excluded = ["color"];
|
15
|
+
var _excluded = ["id", "checked", "color", "onChangeLegendItem"];
|
16
16
|
import React from 'react';
|
17
17
|
import createComponent, { Component, sstyled, Root } from 'intergalactic/core';
|
18
18
|
import { Flex, Box } from 'intergalactic/flex-box';
|
19
19
|
import Checkbox from 'intergalactic/checkbox';
|
20
20
|
import { Text as TypographyText } from 'intergalactic/typography';
|
21
21
|
/*__reshadow-styles__:"./legend-item.shadow.css"*/
|
22
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
23
|
-
"__SLegendItem": "
|
24
|
-
"_disabled": "
|
25
|
-
"__SPointShape": "
|
26
|
-
"_color": "
|
27
|
-
"--color": "--
|
28
|
-
"_shape_Circle": "
|
29
|
-
"_size_l": "
|
30
|
-
"_size_m": "
|
31
|
-
"_shape_Line": "
|
32
|
-
"_shape_Square": "
|
33
|
-
"_shape_Pattern": "
|
34
|
-
"__SIcon": "
|
35
|
-
"__SLabel": "
|
36
|
-
"__SAdditionalLabel": "
|
37
|
-
"__SCount": "
|
38
|
-
"__SPatternSymbol": "
|
22
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SLegendItem_asnfj_gg_{min-width:0;align-items:flex-start}@media (hover:hover){.___SLegendItem_asnfj_gg_:hover{cursor:pointer}.___SLegendItem_asnfj_gg_.__disabled_asnfj_gg_:hover{cursor:default}}.___SPointShape_asnfj_gg_.__color_asnfj_gg_{background-color:var(--color_asnfj);margin-right:8px;flex-shrink:0}.___SPointShape_asnfj_gg_._shape_Circle_asnfj_gg_._size_l_asnfj_gg_{width:16px;height:16px;border-radius:8px;margin-top:4px}.___SPointShape_asnfj_gg_._shape_Circle_asnfj_gg_._size_m_asnfj_gg_{width:12px;height:12px;border-radius:6px;margin-top:4px}.___SPointShape_asnfj_gg_._shape_Line_asnfj_gg_._size_l_asnfj_gg_{width:16px;height:4px;border-radius:3px;margin-top:9px}.___SPointShape_asnfj_gg_._shape_Line_asnfj_gg_._size_m_asnfj_gg_{width:12px;height:4px;border-radius:3px;margin-top:8px}.___SPointShape_asnfj_gg_._shape_Square_asnfj_gg_._size_l_asnfj_gg_{width:16px;height:16px;border-radius:2px;margin-top:4px}.___SPointShape_asnfj_gg_._shape_Square_asnfj_gg_._size_m_asnfj_gg_{width:12px;height:12px;border-radius:2px;margin-top:4px}.___SPointShape_asnfj_gg_._shape_Pattern_asnfj_gg_{background-color:transparent;margin-right:4px}.___SIcon_asnfj_gg_{line-height:0;margin-right:4px}.___SIcon_asnfj_gg_._size_l_asnfj_gg_{margin-top:4px}.___SIcon_asnfj_gg_._size_m_asnfj_gg_{margin-top:2px}.___SLabel_asnfj_gg_{min-width:0}.___SAdditionalLabel_asnfj_gg_._size_l_asnfj_gg_,.___SCount_asnfj_gg_._size_l_asnfj_gg_,.___SLabel_asnfj_gg_._size_l_asnfj_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%)}.___SAdditionalLabel_asnfj_gg_._size_m_asnfj_gg_,.___SCount_asnfj_gg_._size_m_asnfj_gg_,.___SLabel_asnfj_gg_._size_m_asnfj_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SAdditionalLabel_asnfj_gg_,.___SCount_asnfj_gg_{margin-left:4px}.___SAdditionalLabel_asnfj_gg_{white-space:nowrap;display:flex;align-items:flex-start}.___SAdditionalLabel_asnfj_gg_::before{content:\"\";display:inline-block;background-color:var(--intergalactic-text-secondary, #6c6e79);height:4px;width:4px;border-radius:2px;margin-right:4px}.___SAdditionalLabel_asnfj_gg_._size_l_asnfj_gg_::before{margin-top:10px}.___SAdditionalLabel_asnfj_gg_._size_m_asnfj_gg_::before{margin-top:8px}.___SPatternSymbol_asnfj_gg_{transform:scale(.8)}" /*__inner_css_end__*/, "asnfj_gg_") /*__reshadow_css_end__*/, {
|
23
|
+
"__SLegendItem": "___SLegendItem_asnfj_gg_",
|
24
|
+
"_disabled": "__disabled_asnfj_gg_",
|
25
|
+
"__SPointShape": "___SPointShape_asnfj_gg_",
|
26
|
+
"_color": "__color_asnfj_gg_",
|
27
|
+
"--color": "--color_asnfj",
|
28
|
+
"_shape_Circle": "_shape_Circle_asnfj_gg_",
|
29
|
+
"_size_l": "_size_l_asnfj_gg_",
|
30
|
+
"_size_m": "_size_m_asnfj_gg_",
|
31
|
+
"_shape_Line": "_shape_Line_asnfj_gg_",
|
32
|
+
"_shape_Square": "_shape_Square_asnfj_gg_",
|
33
|
+
"_shape_Pattern": "_shape_Pattern_asnfj_gg_",
|
34
|
+
"__SIcon": "___SIcon_asnfj_gg_",
|
35
|
+
"__SLabel": "___SLabel_asnfj_gg_",
|
36
|
+
"__SAdditionalLabel": "___SAdditionalLabel_asnfj_gg_",
|
37
|
+
"__SCount": "___SCount_asnfj_gg_",
|
38
|
+
"__SPatternSymbol": "___SPatternSymbol_asnfj_gg_"
|
39
39
|
});
|
40
40
|
import { StaticShapes } from './LegendItem.type';
|
41
41
|
import resolveColorEnhance from 'intergalactic/utils/lib/enhances/resolveColorEnhance';
|
@@ -58,9 +58,9 @@ var LegendItemRoot = /*#__PURE__*/function (_Component) {
|
|
58
58
|
label = _this$asProps.label,
|
59
59
|
id = _this$asProps.id,
|
60
60
|
size = _this$asProps.size,
|
61
|
-
onClick = _this$asProps.onClick,
|
62
61
|
resolveColor = _this$asProps.resolveColor,
|
63
|
-
patterns = _this$asProps.patterns
|
62
|
+
patterns = _this$asProps.patterns,
|
63
|
+
onChangeLegendItem = _this$asProps.onChangeLegendItem;
|
64
64
|
return {
|
65
65
|
id: id,
|
66
66
|
label: label,
|
@@ -70,11 +70,10 @@ var LegendItemRoot = /*#__PURE__*/function (_Component) {
|
|
70
70
|
patternKey: color,
|
71
71
|
patterns: patterns,
|
72
72
|
size: size,
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
}
|
73
|
+
onChange: function onChange(value) {
|
74
|
+
onChangeLegendItem(id, value);
|
75
|
+
},
|
76
|
+
'aria-labelledby': id
|
78
77
|
};
|
79
78
|
}
|
80
79
|
}, {
|
@@ -89,9 +88,17 @@ var LegendItemRoot = /*#__PURE__*/function (_Component) {
|
|
89
88
|
key: "getLabelProps",
|
90
89
|
value: function getLabelProps() {
|
91
90
|
var _this$asProps2 = this.asProps,
|
91
|
+
id = _this$asProps2.id,
|
92
|
+
checked = _this$asProps2.checked,
|
92
93
|
color = _this$asProps2.color,
|
94
|
+
onChangeLegendItem = _this$asProps2.onChangeLegendItem,
|
93
95
|
props = _objectWithoutProperties(_this$asProps2, _excluded);
|
94
96
|
return _objectSpread(_objectSpread({}, props), {}, {
|
97
|
+
id: id,
|
98
|
+
checked: checked,
|
99
|
+
onClick: function onClick() {
|
100
|
+
return onChangeLegendItem(id, !checked);
|
101
|
+
},
|
95
102
|
children: props.label
|
96
103
|
});
|
97
104
|
}
|
@@ -155,9 +162,8 @@ function Shape(props) {
|
|
155
162
|
patternKey = _props$patternKey === void 0 ? getChartDefaultColorName(0) : _props$patternKey,
|
156
163
|
Children = props.Children,
|
157
164
|
hasChildren = props.children,
|
158
|
-
|
159
|
-
|
160
|
-
patterns = props.patterns;
|
165
|
+
patterns = props.patterns,
|
166
|
+
onChange = props.onChange;
|
161
167
|
if (hasChildren) {
|
162
168
|
return /*#__PURE__*/React.createElement(Children, null);
|
163
169
|
}
|
@@ -176,8 +182,7 @@ function Shape(props) {
|
|
176
182
|
"size": size,
|
177
183
|
"checked": checked,
|
178
184
|
"theme": checked ? color : undefined,
|
179
|
-
"
|
180
|
-
"aria-label": label
|
185
|
+
"onChange": onChange
|
181
186
|
})), patterns && /*#__PURE__*/React.createElement(Box, _ref9.cn("Box", {
|
182
187
|
"mt": '2px',
|
183
188
|
"mr": 1
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LegendItem.js","names":["React","createComponent","Component","sstyled","Root","Flex","Box","Checkbox","Text","TypographyText","style","_sstyled","insert","StaticShapes","resolveColorEnhance","PatternSymbol","getChartDefaultColorName","LegendItemRoot","_Component","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","key","value","getShapeProps","_this$asProps","asProps","checked","color","shape","label","id","size","onClick","resolveColor","patterns","patternKey","onKeyUp","e","getIconProps","props","_objectSpread","children","icon","getLabelProps","_this$asProps2","_objectWithoutProperties","_excluded","getAdditionalLabelProps","additionalInfo","concat","undefined","getCountProps","count","render","_ref","_ref7","SLegendItem","_this$asProps3","styles","Children","disabled","includes","createElement","cn","_assignProps","_defineProperty","Fragment","LegendItemComponent","Shape","Icon","Label","AdditionalLabel","Count","_ref2","arguments[0]","_ref10","SPointShape","SPatternSymbol","_props$patternKey","hasChildren","_ref8","_ref9","_assignProps2","_ref15","_ref3","_ref11","SIcon","_assignProps3","displayName","_ref16","_ref4","_ref12","SLabel","_assignProps4","_ref17","_ref5","_ref13","SAdditionalLabel","_assignProps5","_ref18","_ref6","_ref14","SCount","_assignProps6"],"sources":["../../../../../src/component/ChartLegend/LegendItem/LegendItem.tsx"],"sourcesContent":["import React, { DOMAttributes } from 'react';\nimport createComponent, { Component, sstyled, Root, IRootComponentProps } from '@semcore/core';\nimport { Flex, Box } from '@semcore/flex-box';\nimport Checkbox from '@semcore/checkbox';\nimport { Text as TypographyText } from '@semcore/typography';\n\nimport style from './legend-item.shadow.css';\nimport {\n ShapeProps,\n LegendItemProps,\n LegendItemType,\n LegendItem,\n StaticShapes,\n} from './LegendItem.type';\nimport resolveColorEnhance from '@semcore/utils/lib/enhances/resolveColorEnhance';\nimport { PatternSymbol } from '../../../Pattern';\nimport { getChartDefaultColorName } from '../../../utils';\n\nclass LegendItemRoot extends Component<\n LegendItemProps & { resolveColor: ReturnType<typeof resolveColorEnhance> }\n> {\n static displayName = 'LegendItem';\n static style = style;\n\n static enhance = [resolveColorEnhance()];\n\n static defaultProps = () => ({\n children: (\n <>\n <LegendItemComponent.Shape />\n <LegendItemComponent.Icon />\n <LegendItemComponent.Label />\n <LegendItemComponent.AdditionalLabel />\n <LegendItemComponent.Count />\n </>\n ),\n });\n\n getShapeProps(): ShapeProps & DOMAttributes<HTMLLabelElement> {\n const { checked, color, shape, label, id, size, onClick, resolveColor, patterns } =\n this.asProps;\n\n return {\n id,\n label,\n shape,\n checked,\n color: resolveColor(color),\n patternKey: color,\n patterns,\n size,\n onKeyUp: (e: React.KeyboardEvent<HTMLLabelElement>) => {\n if (onClick && e.key === ' ') {\n onClick();\n }\n },\n };\n }\n\n getIconProps(): LegendItem & IRootComponentProps {\n const props = this.asProps;\n\n return {\n ...props,\n children: props.icon,\n };\n }\n\n getLabelProps(): Omit<LegendItem, 'color'> & IRootComponentProps {\n const { color, ...props } = this.asProps;\n\n return {\n ...props,\n children: props.label,\n };\n }\n\n getAdditionalLabelProps(): LegendItem & IRootComponentProps {\n const props = this.asProps;\n\n const { additionalInfo } = props;\n\n return {\n ...props,\n children: additionalInfo && 'label' in additionalInfo ? `${additionalInfo.label}` : undefined,\n };\n }\n\n getCountProps(): LegendItem & IRootComponentProps {\n const props = this.asProps;\n\n const { additionalInfo } = props;\n\n return {\n ...props,\n children:\n additionalInfo && 'count' in additionalInfo ? `(${additionalInfo.count})` : undefined,\n };\n }\n\n render() {\n const SLegendItem = Root;\n const { styles, Children, shape } = this.asProps;\n\n // @ts-ignore\n const disabled = StaticShapes.includes(shape);\n\n return sstyled(styles)(\n <SLegendItem render={Flex} disabled={disabled}>\n <Children />\n </SLegendItem>,\n );\n }\n}\n\nfunction Shape(props: IRootComponentProps & ShapeProps & DOMAttributes<HTMLLabelElement>) {\n const SPointShape = Root;\n const SPatternSymbol = PatternSymbol;\n const {\n styles,\n size,\n shape,\n checked,\n color,\n patternKey = getChartDefaultColorName(0),\n Children,\n children: hasChildren,\n onKeyUp,\n label,\n patterns,\n } = props;\n\n if (hasChildren) {\n return <Children />;\n }\n\n if (shape === 'Pattern') {\n return sstyled(styles)(\n <Box mr={1}>\n <SPatternSymbol color={color} patternKey={patternKey} />\n </Box>,\n );\n }\n\n if (shape === 'Checkbox') {\n return sstyled(styles)(\n <>\n <Checkbox\n size={size}\n checked={checked}\n theme={checked ? color : undefined}\n onKeyUp={onKeyUp}\n aria-label={label}\n />\n {patterns && (\n <Box mt={'2px'} mr={1}>\n <SPatternSymbol color={color} patternKey={patternKey} />\n </Box>\n )}\n </>,\n );\n }\n\n return sstyled(styles)(\n <SPointShape render={Box}>\n <Children />\n </SPointShape>,\n );\n}\n\nfunction Icon({ styles, children: hasChildren, Children }: IRootComponentProps) {\n const SIcon = Root;\n\n if (!hasChildren) {\n return null;\n }\n\n return sstyled(styles)(\n <SIcon render={Box} tag={'span'}>\n <Children />\n </SIcon>,\n );\n}\nIcon.displayName = 'Icon';\n\nfunction Label({ styles, children: hasChildren, Children }: IRootComponentProps) {\n const SLabel = Root;\n\n if (!hasChildren) {\n return null;\n }\n\n return sstyled(styles)(\n <SLabel render={TypographyText} use={'primary'}>\n <Children />\n </SLabel>,\n );\n}\nLabel.displayName = 'Label';\n\nfunction AdditionalLabel({ styles, children: hasChildren, Children }: IRootComponentProps) {\n const SAdditionalLabel = Root;\n\n if (!hasChildren) {\n return null;\n }\n\n return sstyled(styles)(\n <SAdditionalLabel render={TypographyText} use={'secondary'}>\n <Children />\n </SAdditionalLabel>,\n );\n}\nAdditionalLabel.displayName = 'AdditionalLabel';\n\nfunction Count({ styles, children: hasChildren, Children }: IRootComponentProps) {\n const SCount = Root;\n\n if (!hasChildren) {\n return null;\n }\n\n return sstyled(styles)(\n <SCount render={TypographyText} use={'secondary'}>\n <Children />\n </SCount>,\n );\n}\nCount.displayName = 'Count';\n\nexport const LegendItemComponent: LegendItemType = createComponent(LegendItemRoot, {\n Shape,\n Icon,\n Label,\n AdditionalLabel,\n Count,\n});\n"],"mappings":";;;;;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAyB,OAAO;AAC5C,OAAOC,eAAe,IAAIC,SAAS,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I,EAAJA,IAAI;EACJC,KAAK,EAALA,KAAK;EACLC,eAAe,EAAfA,eAAe;EACfC,KAAK,EAALA;AACF,CAAC,CAAC"}
|
1
|
+
{"version":3,"file":"LegendItem.js","names":["React","createComponent","Component","sstyled","Root","Flex","Box","Checkbox","Text","TypographyText","style","_sstyled","insert","StaticShapes","resolveColorEnhance","PatternSymbol","getChartDefaultColorName","LegendItemRoot","_Component","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","key","value","getShapeProps","_this$asProps","asProps","checked","color","shape","label","id","size","resolveColor","patterns","onChangeLegendItem","patternKey","onChange","getIconProps","props","_objectSpread","children","icon","getLabelProps","_this$asProps2","_objectWithoutProperties","_excluded","onClick","getAdditionalLabelProps","additionalInfo","concat","undefined","getCountProps","count","render","_ref","_ref7","SLegendItem","_this$asProps3","styles","Children","disabled","includes","createElement","cn","_assignProps","_defineProperty","Fragment","LegendItemComponent","Shape","Icon","Label","AdditionalLabel","Count","_ref2","arguments[0]","_ref10","SPointShape","SPatternSymbol","_props$patternKey","hasChildren","_ref8","_ref9","_assignProps2","_ref15","_ref3","_ref11","SIcon","_assignProps3","displayName","_ref16","_ref4","_ref12","SLabel","_assignProps4","_ref17","_ref5","_ref13","SAdditionalLabel","_assignProps5","_ref18","_ref6","_ref14","SCount","_assignProps6"],"sources":["../../../../../src/component/ChartLegend/LegendItem/LegendItem.tsx"],"sourcesContent":["import React, { DOMAttributes, HTMLProps } from 'react';\nimport createComponent, { Component, sstyled, Root, IRootComponentProps } from '@semcore/core';\nimport { Flex, Box } from '@semcore/flex-box';\nimport Checkbox from '@semcore/checkbox';\nimport { Text as TypographyText } from '@semcore/typography';\n\nimport style from './legend-item.shadow.css';\nimport {\n ShapeProps,\n LegendItemProps,\n LegendItemType,\n LegendItem,\n StaticShapes,\n} from './LegendItem.type';\nimport resolveColorEnhance from '@semcore/utils/lib/enhances/resolveColorEnhance';\nimport { PatternSymbol } from '../../../Pattern';\nimport { getChartDefaultColorName } from '../../../utils';\n\nclass LegendItemRoot extends Component<\n LegendItemProps & { resolveColor: ReturnType<typeof resolveColorEnhance> }\n> {\n static displayName = 'LegendItem';\n static style = style;\n\n static enhance = [resolveColorEnhance()];\n\n static defaultProps = () => ({\n children: (\n <>\n <LegendItemComponent.Shape />\n <LegendItemComponent.Icon />\n <LegendItemComponent.Label />\n <LegendItemComponent.AdditionalLabel />\n <LegendItemComponent.Count />\n </>\n ),\n });\n\n getShapeProps() {\n const { checked, color, shape, label, id, size, resolveColor, patterns, onChangeLegendItem } =\n this.asProps;\n\n return {\n id,\n label,\n shape,\n checked,\n color: resolveColor(color),\n patternKey: color,\n patterns,\n size,\n onChange: (value: boolean) => {\n onChangeLegendItem(id, value);\n },\n 'aria-labelledby': id,\n };\n }\n\n getIconProps(): LegendItem & IRootComponentProps {\n const props = this.asProps;\n\n return {\n ...props,\n children: props.icon,\n };\n }\n\n getLabelProps(): Omit<LegendItem, 'color'> & IRootComponentProps & { onClick: () => void } {\n const { id, checked, color, onChangeLegendItem, ...props } = this.asProps;\n\n return {\n ...props,\n id,\n checked,\n onClick: () => onChangeLegendItem(id, !checked),\n children: props.label,\n };\n }\n\n getAdditionalLabelProps(): LegendItem & IRootComponentProps {\n const props = this.asProps;\n\n const { additionalInfo } = props;\n\n return {\n ...props,\n children: additionalInfo && 'label' in additionalInfo ? `${additionalInfo.label}` : undefined,\n };\n }\n\n getCountProps(): LegendItem & IRootComponentProps {\n const props = this.asProps;\n\n const { additionalInfo } = props;\n\n return {\n ...props,\n children:\n additionalInfo && 'count' in additionalInfo ? `(${additionalInfo.count})` : undefined,\n };\n }\n\n render() {\n const SLegendItem = Root;\n const { styles, Children, shape } = this.asProps;\n\n // @ts-ignore\n const disabled = StaticShapes.includes(shape);\n\n return sstyled(styles)(\n <SLegendItem render={Flex} disabled={disabled}>\n <Children />\n </SLegendItem>,\n );\n }\n}\n\nfunction Shape(props: IRootComponentProps & ShapeProps & DOMAttributes<HTMLLabelElement>) {\n const SPointShape = Root;\n const SPatternSymbol = PatternSymbol;\n const {\n styles,\n size,\n shape,\n checked,\n color,\n patternKey = getChartDefaultColorName(0),\n Children,\n children: hasChildren,\n patterns,\n onChange,\n } = props;\n\n if (hasChildren) {\n return <Children />;\n }\n\n if (shape === 'Pattern') {\n return sstyled(styles)(\n <Box mr={1}>\n <SPatternSymbol color={color} patternKey={patternKey} />\n </Box>,\n );\n }\n\n if (shape === 'Checkbox') {\n return sstyled(styles)(\n <>\n <Checkbox\n size={size}\n checked={checked}\n theme={checked ? color : undefined}\n onChange={onChange}\n />\n {patterns && (\n <Box mt={'2px'} mr={1}>\n <SPatternSymbol color={color} patternKey={patternKey} />\n </Box>\n )}\n </>,\n );\n }\n\n return sstyled(styles)(\n <SPointShape render={Box}>\n <Children />\n </SPointShape>,\n );\n}\n\nfunction Icon({ styles, children: hasChildren, Children }: IRootComponentProps) {\n const SIcon = Root;\n\n if (!hasChildren) {\n return null;\n }\n\n return sstyled(styles)(\n <SIcon render={Box} tag={'span'}>\n <Children />\n </SIcon>,\n );\n}\nIcon.displayName = 'Icon';\n\nfunction Label({ styles, children: hasChildren, Children }: IRootComponentProps) {\n const SLabel = Root;\n\n if (!hasChildren) {\n return null;\n }\n\n return sstyled(styles)(\n <SLabel render={TypographyText} use={'primary'}>\n <Children />\n </SLabel>,\n );\n}\nLabel.displayName = 'Label';\n\nfunction AdditionalLabel({ styles, children: hasChildren, Children }: IRootComponentProps) {\n const SAdditionalLabel = Root;\n\n if (!hasChildren) {\n return null;\n }\n\n return sstyled(styles)(\n <SAdditionalLabel render={TypographyText} use={'secondary'}>\n <Children />\n </SAdditionalLabel>,\n );\n}\nAdditionalLabel.displayName = 'AdditionalLabel';\n\nfunction Count({ styles, children: hasChildren, Children }: IRootComponentProps) {\n const SCount = Root;\n\n if (!hasChildren) {\n return null;\n }\n\n return sstyled(styles)(\n <SCount render={TypographyText} use={'secondary'}>\n <Children />\n </SCount>,\n );\n}\nCount.displayName = 'Count';\n\nexport const LegendItemComponent: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O,CAAC4D,MAAM,CAAC,eACpB/D,KAAA,CAAAmE,aAAA,CAACwC,MAAM,EAAAD,MAAA,CAAAtC,EAAA,WAAAxB,aAAA,KAAAgE,aAAA;IAAA,OAA8B;EAAW,GAAAH,KAAA,kBAC9CzG,KAAA,CAAAmE,aAAA,CAACH,QAAQ,EAAA0C,MAAA,CAAAtC,EAAA,iBAAG,CACL;AAEb;AACAS,KAAK,CAACgB,WAAW,GAAG,OAAO;AAE3B,OAAO,IAAMrB,mBAAmC,GAAGvE,eAAe,CAACgB,cAAc,EAAE;EACjFwD,KAAK,EAALA,KAAK;EACLC,IAAI,EAAJA,IAAI;EACJC,KAAK,EAALA,KAAK;EACLC,eAAe,EAAfA,eAAe;EACfC,KAAK,EAALA;AACF,CAAC,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LegendItem.type.js","names":["StaticShapes"],"sources":["../../../../../src/component/ChartLegend/LegendItem/LegendItem.type.ts"],"sourcesContent":["import { Flex } from '@semcore/flex-box';\nimport { Intergalactic, Root } from '@semcore/core';\nimport Icon from '@semcore/icon';\nimport { Text } from '@semcore/typography';\nimport { LSize } from '../BaseLegend.type';\nimport { PatternsConfig } from '../../../Pattern';\n\n/**\n * Key of chart data item\n */\nexport type LegendItemKey = string;\n\nexport type LegendItem = {\n /**\n * One of keys from data set\n */\n id: LegendItemKey;\n /**\n * Label for data item in Legend\n */\n label: string;\n /**\n * Flag for selected data item\n */\n checked: boolean;\n /**\n * Color of data item\n */\n color: string;\n /**\n * Icon before label\n */\n icon?: typeof Icon;\n /**\n * Additional info with sub-label or count\n */\n additionalInfo?: { label: string } | { count: number };\n\n patternKey?: string;\n\n /** Enables patterns symbols that enhances charts accessibility */\n patterns?: PatternsConfig;\n};\n\nexport type LegendItemProps = LegendItem & {\n /**\n * Size for legend item\n */\n size: LSize;\n /**\n * Shape of data item on Legend panel\n */\n shape: ShapeType;\n /**\n * Handler for select/deselect legend item.\n * !Need to redefine onClick, because we don't have `event` in it.\n */\n onClick
|
1
|
+
{"version":3,"file":"LegendItem.type.js","names":["StaticShapes"],"sources":["../../../../../src/component/ChartLegend/LegendItem/LegendItem.type.ts"],"sourcesContent":["import { Flex } from '@semcore/flex-box';\nimport { Intergalactic, Root } from '@semcore/core';\nimport Icon from '@semcore/icon';\nimport { Text } from '@semcore/typography';\nimport { LSize } from '../BaseLegend.type';\nimport { PatternsConfig } from '../../../Pattern';\n\n/**\n * Key of chart data item\n */\nexport type LegendItemKey = string;\n\nexport type LegendItem = {\n /**\n * One of keys from data set\n */\n id: LegendItemKey;\n /**\n * Label for data item in Legend\n */\n label: string;\n /**\n * Flag for selected data item\n */\n checked: boolean;\n /**\n * Color of data item\n */\n color: string;\n /**\n * Icon before label\n */\n icon?: typeof Icon;\n /**\n * Additional info with sub-label or count\n */\n additionalInfo?: { label: string } | { count: number };\n\n patternKey?: string;\n\n /** Enables patterns symbols that enhances charts accessibility */\n patterns?: PatternsConfig;\n};\n\nexport type LegendItemProps = LegendItem & {\n /**\n * Size for legend item\n */\n size: LSize;\n /**\n * Shape of data item on Legend panel\n */\n shape: ShapeType;\n /**\n * Handler for select/deselect legend item.\n * !Need to redefine onClick, because we don't have `event` in it.\n * @deprecated\n */\n onClick?: () => void;\n\n /** Enables patterns symbols that enhances charts accessibility */\n patterns?: PatternsConfig;\n\n /**\n * Handler for select/deselect legend item\n */\n onChangeLegendItem: (id: LegendItemKey, checked: boolean) => void;\n};\n\nexport type ShapeProps = LegendItem &\n (\n | {\n size: LSize;\n shape: Exclude<ShapeType, 'Checkbox'>;\n }\n | {\n size: LSize;\n shape: Extract<ShapeType, 'Checkbox'>;\n onChange: (checked: boolean, e?: React.SyntheticEvent<HTMLInputElement>) => void;\n }\n );\n\nexport const StaticShapes = ['Circle', 'Line', 'Square', 'Pattern'] as const;\n\nexport type ShapeType = 'Checkbox' | typeof StaticShapes[number];\n\nexport type LegendItemType = Intergalactic.Component<typeof Flex, Partial<LegendItemProps>> & {\n Shape: Intergalactic.Component<typeof Root, Partial<ShapeProps>>;\n Icon: Intergalactic.Component<typeof Icon, Partial<LegendItem>>;\n Label: Intergalactic.Component<typeof Text, Partial<Omit<LegendItem, 'theme'>>>;\n AdditionalLabel: Intergalactic.Component<typeof Text, Partial<LegendItem>>;\n Count: Intergalactic.Component<typeof Text, Partial<LegendItem>>;\n};\n"],"mappings":"AAOA;AACA;AACA;;AAyEA,OAAO,IAAMA,YAAY,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAU"}
|
@@ -11,12 +11,12 @@ import React from 'react';
|
|
11
11
|
import createComponent, { sstyled, Root } from 'intergalactic/core';
|
12
12
|
import { Box } from 'intergalactic/flex-box';
|
13
13
|
/*__reshadow-styles__:"./legend-table.shadow.css"*/
|
14
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
15
|
-
"__SLegendTable": "
|
16
|
-
"_columns-count": "__columns-
|
17
|
-
"__SColumnItem": "
|
18
|
-
"_size_l": "
|
19
|
-
"_size_m": "
|
14
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SLegendTable_128ci_gg_.__columns-count_128ci_gg_{font-feature-settings:\"tnum\";font-variant-numeric:tabular-nums;display:grid;grid-template-columns:auto .2fr;align-items:center;height:-moz-fit-content;height:fit-content;grid-column-gap:16px;grid-row-gap:8px}.___SColumnItem_128ci_gg_._size_l_128ci_gg_{font-size:var(--intergalactic-fs-300, 16px);text-align:right}.___SColumnItem_128ci_gg_._size_m_128ci_gg_{font-size:var(--intergalactic-fs-200, 14px);text-align:right}" /*__inner_css_end__*/, "128ci_gg_") /*__reshadow_css_end__*/, {
|
15
|
+
"__SLegendTable": "___SLegendTable_128ci_gg_",
|
16
|
+
"_columns-count": "__columns-count_128ci_gg_",
|
17
|
+
"__SColumnItem": "___SColumnItem_128ci_gg_",
|
18
|
+
"_size_l": "_size_l_128ci_gg_",
|
19
|
+
"_size_m": "_size_m_128ci_gg_"
|
20
20
|
});
|
21
21
|
import { LegendItemComponent } from '../LegendItem/LegendItem';
|
22
22
|
import { BaseLegend } from '../BaseLegend';
|
@@ -42,7 +42,8 @@ var LegendTableRoot = /*#__PURE__*/function (_BaseLegend) {
|
|
42
42
|
items = _this$asProps.items;
|
43
43
|
var columnsCount = (_items$ = items[0]) === null || _items$ === void 0 ? void 0 : _items$.columns.length;
|
44
44
|
return _ref3 = sstyled(styles), /*#__PURE__*/React.createElement(SLegendTable, _ref3.cn("SLegendTable", _objectSpread({}, _assignProps({
|
45
|
-
"columns-count": columnsCount + 1
|
45
|
+
"columns-count": columnsCount + 1,
|
46
|
+
"role": 'group'
|
46
47
|
}, _ref))), items.map(function (_ref5, index) {
|
47
48
|
var id = _ref5.id,
|
48
49
|
_ref5$columns = _ref5.columns,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LegendTable.js","names":["React","createComponent","sstyled","Root","Box","style","_sstyled","insert","LegendItemComponent","BaseLegend","LegendTableRoot","_BaseLegend","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","key","value","render","_ref","asProps","_ref3","_items$","SLegendTable","_this$asProps","styles","Children","_this$asProps$size","size","items","columnsCount","columns","length","createElement","cn","_objectSpread","_assignProps","map","_ref5","index","id","_ref5$columns","Fragment","item","concat","LegendTable","Column","_defineProperty","children","LegendItem","ColumnComponent","props","_ref2","arguments[0]","_ref4","SColumnItem","_assignProps2","gridColumnStart","gridColumnEnd"],"sources":["../../../../../src/component/ChartLegend/LegendTable/LegendTable.tsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { sstyled, Root, IRootComponentProps } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport { LegendTableType, LegendTableProps, LegendColumnProps } from './LegendTable.type';\nimport style from './legend-table.shadow.css';\nimport { LegendItemComponent } from '../LegendItem/LegendItem';\nimport { BaseLegend } from '../BaseLegend';\n\nclass LegendTableRoot extends BaseLegend<LegendTableProps> {\n static displayName = 'LegendTable';\n static style = style;\n\n static defaultProps = () => ({\n children: <LegendTable.LegendItem />,\n });\n\n render() {\n const SLegendTable = Root;\n const { styles, Children, size = 'm', items } = this.asProps;\n const columnsCount = items[0]?.columns.length;\n\n return sstyled(styles)(\n <SLegendTable render={Box} columns-count={columnsCount + 1}>\n {items.map(({ id, columns = [] }, index) => {\n return (\n <React.Fragment key={id}>\n <Children />\n {columns.map((item, index) => {\n return (\n <React.Fragment key={`${id}__${index}`}>\n <LegendTable.Column index={index} size={size} styles={styles}>\n {item}\n </LegendTable.Column>\n </React.Fragment>\n );\n })}\n </React.Fragment>\n );\n })}\n </SLegendTable>,\n );\n }\n}\n\nfunction ColumnComponent(props: LegendColumnProps & IRootComponentProps) {\n const SColumnItem = Root;\n const { styles, index, size, Children } = props;\n\n return sstyled(styles)(\n <SColumnItem\n style={{ gridColumnStart: `${index + 2}`, gridColumnEnd: `${index + 3}` }}\n render={Box}\n size={size}\n >\n <Children />\n </SColumnItem>,\n );\n}\n\nexport const LegendTable: LegendTableType = createComponent(LegendTableRoot, {\n LegendItem: LegendItemComponent,\n Column: ColumnComponent,\n});\n"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,eAAe,IAAIC,OAAO,EAAEC,IAAI,QAA6B,eAAe;AACnF,SAASC,GAAG,QAAQ,mBAAmB;AAAC;AAAA,IAAAC,KAAA,+BAAAC,QAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAGxC,SAASC,mBAAmB,QAAQ,0BAA0B;AAC9D,SAASC,UAAU,QAAQ,eAAe;AAAC,IAErCC,eAAe,0BAAAC,WAAA;EAAAC,SAAA,CAAAF,eAAA,EAAAC,WAAA;EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,eAAA;EAAA,SAAAA,gBAAA;IAAAK,eAAA,OAAAL,eAAA;IAAA,OAAAG,MAAA,CAAAG,KAAA,OAAAC,SAAA;EAAA;EAAAC,YAAA,CAAAR,eAAA;IAAAS,GAAA;IAAAC,KAAA,EAQnB,SAAAC,OAAA,EAAS;MAAA,IAAAC,IAAA,QAAAC,OAAA;QAAAC,KAAA;QAAAC,OAAA;MACP,IAAMC,YAAY,GAKMtB,GAAG;MAJ3B,IAAAuB,aAAA,GAAgD,IAAI,CAACJ,OAAO;QAApDK,MAAM,GAAAD,aAAA,CAANC,MAAM;QAAEC,QAAQ,GAAAF,aAAA,CAARE,QAAQ;QAAAC,kBAAA,GAAAH,aAAA,CAAEI,IAAI;QAAJA,IAAI,GAAAD,kBAAA,cAAG,GAAG,GAAAA,kBAAA;QAAEE,KAAK,GAAAL,aAAA,CAALK,KAAK;MAC3C,IAAMC,YAAY,IAAAR,OAAA,GAAGO,KAAK,CAAC,CAAC,CAAC,cAAAP,OAAA,uBAARA,OAAA,CAAUS,OAAO,CAACC,MAAM;MAE7C,OAAAX,KAAA,GAAOtB,OAAO,CAAC0B,MAAM,CAAC,eACpB5B,KAAA,CAAAoC,aAAA,CAACV,YAAY,EAAAF,KAAA,CAAAa,EAAA,iBAAAC,aAAA,KAAAC,YAAA;QAAA,iBAA6BN,YAAY,GAAG;
|
1
|
+
{"version":3,"file":"LegendTable.js","names":["React","createComponent","sstyled","Root","Box","style","_sstyled","insert","LegendItemComponent","BaseLegend","LegendTableRoot","_BaseLegend","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","key","value","render","_ref","asProps","_ref3","_items$","SLegendTable","_this$asProps","styles","Children","_this$asProps$size","size","items","columnsCount","columns","length","createElement","cn","_objectSpread","_assignProps","map","_ref5","index","id","_ref5$columns","Fragment","item","concat","LegendTable","Column","_defineProperty","children","LegendItem","ColumnComponent","props","_ref2","arguments[0]","_ref4","SColumnItem","_assignProps2","gridColumnStart","gridColumnEnd"],"sources":["../../../../../src/component/ChartLegend/LegendTable/LegendTable.tsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { sstyled, Root, IRootComponentProps } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport { LegendTableType, LegendTableProps, LegendColumnProps } from './LegendTable.type';\nimport style from './legend-table.shadow.css';\nimport { LegendItemComponent } from '../LegendItem/LegendItem';\nimport { BaseLegend } from '../BaseLegend';\n\nclass LegendTableRoot extends BaseLegend<LegendTableProps> {\n static displayName = 'LegendTable';\n static style = style;\n\n static defaultProps = () => ({\n children: <LegendTable.LegendItem />,\n });\n\n render() {\n const SLegendTable = Root;\n const { styles, Children, size = 'm', items } = this.asProps;\n const columnsCount = items[0]?.columns.length;\n\n return sstyled(styles)(\n <SLegendTable render={Box} columns-count={columnsCount + 1} role={'group'}>\n {items.map(({ id, columns = [] }, index) => {\n return (\n <React.Fragment key={id}>\n <Children />\n {columns.map((item, index) => {\n return (\n <React.Fragment key={`${id}__${index}`}>\n <LegendTable.Column index={index} size={size} styles={styles}>\n {item}\n </LegendTable.Column>\n </React.Fragment>\n );\n })}\n </React.Fragment>\n );\n })}\n </SLegendTable>,\n );\n }\n}\n\nfunction ColumnComponent(props: LegendColumnProps & IRootComponentProps) {\n const SColumnItem = Root;\n const { styles, index, size, Children } = props;\n\n return sstyled(styles)(\n <SColumnItem\n style={{ gridColumnStart: `${index + 2}`, gridColumnEnd: `${index + 3}` }}\n render={Box}\n size={size}\n >\n <Children />\n </SColumnItem>,\n );\n}\n\nexport const LegendTable: LegendTableType = createComponent(LegendTableRoot, {\n LegendItem: LegendItemComponent,\n Column: ColumnComponent,\n});\n"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,eAAe,IAAIC,OAAO,EAAEC,IAAI,QAA6B,eAAe;AACnF,SAASC,GAAG,QAAQ,mBAAmB;AAAC;AAAA,IAAAC,KAAA,+BAAAC,QAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAGxC,SAASC,mBAAmB,QAAQ,0BAA0B;AAC9D,SAASC,UAAU,QAAQ,eAAe;AAAC,IAErCC,eAAe,0BAAAC,WAAA;EAAAC,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b,MAAA,CAAKL,KAAK,GAAG,CAAC,CAAE;MAAEmB,aAAa,KAAAd,MAAA,CAAKL,KAAK,GAAG,CAAC;IAAG,CAAC;IAAA,QAEnEX;EAAI,GAAAwB,KAAA,kBAEVvD,KAAA,CAAAoC,aAAA,CAACP,QAAQ,EAAA4B,KAAA,CAAApB,EAAA,iBAAG,CACA;AAElB;AAEA,OAAO,IAAMW,WAA4B,GAAG/C,eAAe,CAACS,eAAe,EAAE;EAC3E0C,UAAU,EAAE5C,mBAAmB;EAC/ByC,MAAM,EAAEI;AACV,CAAC,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LegendTable.type.js","names":[],"sources":["../../../../../src/component/ChartLegend/LegendTable/LegendTable.type.ts"],"sourcesContent":["import { Intergalactic } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport { LegendItem, LegendItemType } from '../LegendItem/LegendItem.type';\nimport React from 'react';\nimport { LegendProps, LSize } from '../BaseLegend.type';\n\nexport type LegendTableProps =
|
1
|
+
{"version":3,"file":"LegendTable.type.js","names":[],"sources":["../../../../../src/component/ChartLegend/LegendTable/LegendTable.type.ts"],"sourcesContent":["import { Intergalactic } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport { LegendItem, LegendItemType } from '../LegendItem/LegendItem.type';\nimport React from 'react';\nimport { LegendProps, LSize } from '../BaseLegend.type';\n\nexport type LegendTableProps = Intergalactic.InternalTypings.EfficientOmit<LegendProps, 'items'> & {\n /**\n * Legend items\n */\n items: Array<LegendItem & { columns: Array<React.ReactNode> }>;\n};\n\nexport type LegendColumnProps = {\n index: number;\n size: LSize;\n};\n\nexport type LegendTableType = Intergalactic.Component<typeof Box, LegendTableProps> & {\n LegendItem: LegendItemType;\n Column: Intergalactic.Component<typeof Box, Partial<LegendColumnProps>>;\n};\n"],"mappings":""}
|
@@ -7,6 +7,6 @@ export type A11yViewProps = {
|
|
7
7
|
plotLabel: string;
|
8
8
|
locale: NavigatorLanguage['language'];
|
9
9
|
config: PartialDataSummarizationConfig;
|
10
|
-
plotRef: React.RefObject<
|
10
|
+
plotRef: React.RefObject<HTMLElement>;
|
11
11
|
};
|
12
12
|
export declare const PlotA11yModule: React.FC<A11yViewProps>;
|
@@ -11,7 +11,7 @@ type ChartState = {
|
|
11
11
|
highlightedLine: number;
|
12
12
|
withTrend: boolean;
|
13
13
|
};
|
14
|
-
export declare abstract class AbstractChart<D extends ListData | ObjectData, T extends BaseChartProps<D>, E =
|
14
|
+
export declare abstract class AbstractChart<D extends ListData | ObjectData, T extends BaseChartProps<D>, E extends readonly ((...args: any[]) => any)[] = []> extends Component<T, {}, ChartState, E> {
|
15
15
|
static style: {};
|
16
16
|
static defaultProps: Partial<BaseChartProps<any>>;
|
17
17
|
/**
|
@@ -27,6 +27,7 @@ export declare abstract class AbstractChart<D extends ListData | ObjectData, T e
|
|
27
27
|
}>;
|
28
28
|
protected abstract get xScale(): ScaleBand<any> | ScaleLinear<any, any> | ScaleTime<any, any>;
|
29
29
|
protected abstract get yScale(): ScaleBand<any> | ScaleLinear<any, any> | ScaleTime<any, any>;
|
30
|
+
protected abstract getLegendAriaLabel(): string;
|
30
31
|
protected abstract renderChart(): React.ReactNode;
|
31
32
|
protected abstract renderTooltip(): React.ReactNode;
|
32
33
|
protected get dataKeys(): string[];
|
@@ -6,6 +6,7 @@ import { BaseChartLegendProps } from '../ChartLegend/BaseLegend.type';
|
|
6
6
|
import { TrendProps } from '../ChartLegend/LegendFlex/LegendFlex.type';
|
7
7
|
import { PatternsConfig } from '../../Pattern';
|
8
8
|
import { PlotSummarizerConfig } from '../../Plot';
|
9
|
+
import { Intergalactic } from 'intergalactic/utils/lib/core';
|
9
10
|
export type BaseLegendProps = BaseChartLegendProps & {
|
10
11
|
/**
|
11
12
|
* Disable hover (for transition items legend of each not hovered)
|
@@ -36,7 +37,16 @@ export type BaseLegendProps = BaseChartLegendProps & {
|
|
36
37
|
});
|
37
38
|
export type ObjectData = Record<string, unknown>;
|
38
39
|
export type ListData = ObjectData[];
|
39
|
-
|
40
|
+
/**
|
41
|
+
* Chart, Legend must have an accessible names (aria-name).
|
42
|
+
* It should describe chart or legend content.
|
43
|
+
*/
|
44
|
+
export type AriaNameProps = Intergalactic.RequireAtLeastOne<{
|
45
|
+
'aria-label'?: string;
|
46
|
+
'aria-labelledby'?: string;
|
47
|
+
title?: string;
|
48
|
+
}>;
|
49
|
+
export type BaseChartProps<T extends ListData | ObjectData> = FlexProps & AriaNameProps & {
|
40
50
|
/**
|
41
51
|
* Chart data. For all charts except Donut(Pie), Radar and Venn should be an Array
|
42
52
|
*/
|
@@ -8,7 +8,7 @@ export declare abstract class BaseLegend<T extends LegendProps> extends Componen
|
|
8
8
|
setHints(): void;
|
9
9
|
getItem(index: number): import("./LegendItem/LegendItem.type").LegendItem;
|
10
10
|
getLegendItemProps(_: {}, index: number): LegendItemProps & Intergalactic.InternalTypings.ComponentPropsNesting<'div'>;
|
11
|
-
|
11
|
+
onChangeLegendItem: (id: LegendItemKey, checked: boolean) => void;
|
12
12
|
bindOnMouseEnterItem: (id: LegendItemKey) => (e: React.SyntheticEvent) => void;
|
13
13
|
bindOnMouseLeaveItem: (id: LegendItemKey) => (e: React.SyntheticEvent) => void;
|
14
14
|
}
|
@@ -3,8 +3,9 @@ import { BoxProps, FlexProps } from 'intergalactic/flex-box';
|
|
3
3
|
import { LegendItem, LegendItemKey, ShapeType } from './LegendItem/LegendItem.type';
|
4
4
|
import { DataStructureHints } from '../../a11y/hints';
|
5
5
|
import type { PatternsConfig } from '../../Pattern';
|
6
|
+
import { AriaNameProps } from '../Chart/AbstractChart.type';
|
6
7
|
export type LSize = 'm' | 'l';
|
7
|
-
export type BaseChartLegendProps = FlexProps & {
|
8
|
+
export type BaseChartLegendProps = FlexProps & AriaNameProps & {
|
8
9
|
/**
|
9
10
|
* Size for legend items
|
10
11
|
*/
|
@@ -1,3 +1,4 @@
|
|
1
|
+
/// <reference types="react" />
|
1
2
|
import { Flex } from 'intergalactic/flex-box';
|
2
3
|
import { Intergalactic, Root } from 'intergalactic/core';
|
3
4
|
import Icon from 'intergalactic/icon';
|
@@ -53,15 +54,24 @@ export type LegendItemProps = LegendItem & {
|
|
53
54
|
/**
|
54
55
|
* Handler for select/deselect legend item.
|
55
56
|
* !Need to redefine onClick, because we don't have `event` in it.
|
57
|
+
* @deprecated
|
56
58
|
*/
|
57
|
-
onClick
|
59
|
+
onClick?: () => void;
|
58
60
|
/** Enables patterns symbols that enhances charts accessibility */
|
59
61
|
patterns?: PatternsConfig;
|
62
|
+
/**
|
63
|
+
* Handler for select/deselect legend item
|
64
|
+
*/
|
65
|
+
onChangeLegendItem: (id: LegendItemKey, checked: boolean) => void;
|
60
66
|
};
|
61
|
-
export type ShapeProps = LegendItem & {
|
67
|
+
export type ShapeProps = LegendItem & ({
|
62
68
|
size: LSize;
|
63
|
-
shape: ShapeType
|
64
|
-
}
|
69
|
+
shape: Exclude<ShapeType, 'Checkbox'>;
|
70
|
+
} | {
|
71
|
+
size: LSize;
|
72
|
+
shape: Extract<ShapeType, 'Checkbox'>;
|
73
|
+
onChange: (checked: boolean, e?: React.SyntheticEvent<HTMLInputElement>) => void;
|
74
|
+
});
|
65
75
|
export declare const StaticShapes: readonly ["Circle", "Line", "Square", "Pattern"];
|
66
76
|
export type ShapeType = 'Checkbox' | typeof StaticShapes[number];
|
67
77
|
export type LegendItemType = Intergalactic.Component<typeof Flex, Partial<LegendItemProps>> & {
|
@@ -3,7 +3,7 @@ import { Box } from 'intergalactic/flex-box';
|
|
3
3
|
import { LegendItem, LegendItemType } from '../LegendItem/LegendItem.type';
|
4
4
|
import React from 'react';
|
5
5
|
import { LegendProps, LSize } from '../BaseLegend.type';
|
6
|
-
export type LegendTableProps =
|
6
|
+
export type LegendTableProps = Intergalactic.InternalTypings.EfficientOmit<LegendProps, 'items'> & {
|
7
7
|
/**
|
8
8
|
* Legend items
|
9
9
|
*/
|
@@ -1,41 +1,54 @@
|
|
1
1
|
export declare const localizedMessages: {
|
2
2
|
en: {
|
3
3
|
trend: string;
|
4
|
+
legendForChart: string;
|
4
5
|
};
|
5
6
|
es: {
|
6
7
|
trend: string;
|
8
|
+
legendForChart: string;
|
7
9
|
};
|
8
10
|
fr: {
|
9
11
|
trend: string;
|
12
|
+
legendForChart: string;
|
10
13
|
};
|
11
14
|
it: {
|
12
15
|
trend: string;
|
16
|
+
legendForChart: string;
|
13
17
|
};
|
14
18
|
ja: {
|
15
19
|
trend: string;
|
20
|
+
legendForChart: string;
|
16
21
|
};
|
17
22
|
ko: {
|
18
23
|
trend: string;
|
24
|
+
legendForChart: string;
|
19
25
|
};
|
20
26
|
nl: {
|
21
27
|
trend: string;
|
28
|
+
legendForChart: string;
|
22
29
|
};
|
23
30
|
pt: {
|
24
31
|
trend: string;
|
32
|
+
legendForChart: string;
|
25
33
|
};
|
26
34
|
tr: {
|
27
35
|
trend: string;
|
36
|
+
legendForChart: string;
|
28
37
|
};
|
29
38
|
vi: {
|
30
39
|
trend: string;
|
40
|
+
legendForChart: string;
|
31
41
|
};
|
32
42
|
zh: {
|
33
43
|
trend: string;
|
44
|
+
legendForChart: string;
|
34
45
|
};
|
35
46
|
pl: {
|
36
47
|
trend: string;
|
48
|
+
legendForChart: string;
|
37
49
|
};
|
38
50
|
sv: {
|
39
51
|
trend: string;
|
52
|
+
legendForChart: string;
|
40
53
|
};
|
41
54
|
};
|
package/d3-chart/package.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"name":"intergalactic/d3-chart","description":"Semrush D3 Chart Component","version":"3.
|
1
|
+
{"name":"intergalactic/d3-chart","description":"Semrush D3 Chart Component","version":"3.55.2-prerelease.0","main":"lib/cjs/index.js","module":"lib/es6/index.js","typings":"lib/types/index.d.ts","sideEffects":false,"author":"UI-kit team <ui-kit-team@semrush.com>","license":"MIT","exports":{"require":"./lib/cjs/index.js","import":"./lib/es6/index.js","types":"./lib/types/index.d.ts"},"scripts":{"build":"pnpm semcore-builder --source=js,ts"},"dependencies":{"@formatjs/intl":"2.3.0","@semcore/animation":"2.36.0-prerelease.0","@semcore/divider":"4.35.0-prerelease.0","@semcore/flex-box":"5.36.0-prerelease.0","@semcore/popper":"5.43.0-prerelease.0","@semcore/utils":"4.41.0-prerelease.0","@types/d3-shape":"^3.1.0","@upsetjs/venn.js":"1.4.2","d3-array":"3.1.6","d3-interpolate":"3.0.1","d3-polygon":"^3.0.1","d3-scale":"4.0.2","d3-shape":"3.2.0","d3-time":"3.1.0","d3-time-format":"4.1.0","d3-transition":"3.0.1","hoist-non-react-statics":"3.3.2"},"peerDependencies":{"@semcore/core":"^2.34.0-prerelease.0","react":"16.8 - 18","react-dom":"16.8 - 18"},"repository":{"type":"git","url":"https://github.com/semrush/intergalactic.git","directory":"semcore/d3-chart"},"devDependencies":{"@semcore/babel-plugin-react-semcore":"^4.2.1","@semcore/button":"*","@semcore/divider":"*","@semcore/checkbox":"*","@semcore/dropdown-menu":"*","@semcore/ellipsis":"*","@semcore/icon":"*","@semcore/testing-utils":"1.0.0","@semcore/typography":"*","@semcore/utils":"*","@types/d3-array":"^3.0.2","@types/d3-scale":"^4.0.2","@types/d3-transition":"^3.0.1","@types/react":"18.0.21"}}
|