@handijit/ui 0.0.0-stage → 1.0.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/LICENSE +21 -0
- package/README.md +872 -2
- package/build/base.css +1 -0
- package/build/charts.cjs +2 -0
- package/build/charts.cjs.map +1 -0
- package/build/charts.css +1 -0
- package/build/charts.js +1865 -0
- package/build/charts.js.map +1 -0
- package/build/chat.cjs +4 -0
- package/build/chat.cjs.map +1 -0
- package/build/chat.css +1 -0
- package/build/chat.js +1120 -0
- package/build/chat.js.map +1 -0
- package/build/components/Accordion/index.cjs +2 -0
- package/build/components/Accordion/index.cjs.map +1 -0
- package/build/components/Accordion/index.d.ts +29 -0
- package/build/components/Accordion/index.js +42 -0
- package/build/components/Accordion/index.js.map +1 -0
- package/build/components/Accordion/style.css +1 -0
- package/build/components/Alert/index.cjs +2 -0
- package/build/components/Alert/index.cjs.map +1 -0
- package/build/components/Alert/index.d.ts +15 -0
- package/build/components/Alert/index.js +30 -0
- package/build/components/Alert/index.js.map +1 -0
- package/build/components/Alert/style.css +1 -0
- package/build/components/Avatar/index.cjs +2 -0
- package/build/components/Avatar/index.cjs.map +1 -0
- package/build/components/Avatar/index.d.ts +26 -0
- package/build/components/Avatar/index.js +57 -0
- package/build/components/Avatar/index.js.map +1 -0
- package/build/components/Avatar/style.css +1 -0
- package/build/components/Badge/index.cjs +2 -0
- package/build/components/Badge/index.cjs.map +1 -0
- package/build/components/Badge/index.d.ts +26 -0
- package/build/components/Badge/index.js +26 -0
- package/build/components/Badge/index.js.map +1 -0
- package/build/components/Badge/style.css +1 -0
- package/build/components/BottomSheet/index.cjs +2 -0
- package/build/components/BottomSheet/index.cjs.map +1 -0
- package/build/components/BottomSheet/index.d.ts +21 -0
- package/build/components/BottomSheet/index.js +85 -0
- package/build/components/BottomSheet/index.js.map +1 -0
- package/build/components/BottomSheet/style.css +1 -0
- package/build/components/Breadcrumb/index.cjs +2 -0
- package/build/components/Breadcrumb/index.cjs.map +1 -0
- package/build/components/Breadcrumb/index.d.ts +20 -0
- package/build/components/Breadcrumb/index.js +31 -0
- package/build/components/Breadcrumb/index.js.map +1 -0
- package/build/components/Breadcrumb/style.css +1 -0
- package/build/components/Button/index.cjs +2 -0
- package/build/components/Button/index.cjs.map +1 -0
- package/build/components/Button/index.d.ts +32 -0
- package/build/components/Button/index.js +88 -0
- package/build/components/Button/index.js.map +1 -0
- package/build/components/Button/style.css +1 -0
- package/build/components/Card/index.cjs +2 -0
- package/build/components/Card/index.cjs.map +1 -0
- package/build/components/Card/index.d.ts +51 -0
- package/build/components/Card/index.js +58 -0
- package/build/components/Card/index.js.map +1 -0
- package/build/components/Card/style.css +1 -0
- package/build/components/Carousel/index.cjs +2 -0
- package/build/components/Carousel/index.cjs.map +1 -0
- package/build/components/Carousel/index.d.ts +24 -0
- package/build/components/Carousel/index.js +111 -0
- package/build/components/Carousel/index.js.map +1 -0
- package/build/components/Carousel/style.css +1 -0
- package/build/components/Checkbox/index.cjs +2 -0
- package/build/components/Checkbox/index.cjs.map +1 -0
- package/build/components/Checkbox/index.d.ts +10 -0
- package/build/components/Checkbox/index.js +33 -0
- package/build/components/Checkbox/index.js.map +1 -0
- package/build/components/Checkbox/style.css +1 -0
- package/build/components/Chip/index.cjs +2 -0
- package/build/components/Chip/index.cjs.map +1 -0
- package/build/components/Chip/index.d.ts +27 -0
- package/build/components/Chip/index.js +67 -0
- package/build/components/Chip/index.js.map +1 -0
- package/build/components/Chip/style.css +1 -0
- package/build/components/ChipGroup/index.cjs +2 -0
- package/build/components/ChipGroup/index.cjs.map +1 -0
- package/build/components/ChipGroup/index.d.ts +34 -0
- package/build/components/ChipGroup/index.js +64 -0
- package/build/components/ChipGroup/index.js.map +1 -0
- package/build/components/ChipGroup/style.css +1 -0
- package/build/components/CodeBadge/index.cjs +2 -0
- package/build/components/CodeBadge/index.cjs.map +1 -0
- package/build/components/CodeBadge/index.d.ts +36 -0
- package/build/components/CodeBadge/index.js +62 -0
- package/build/components/CodeBadge/index.js.map +1 -0
- package/build/components/CodeBadge/style.css +1 -0
- package/build/components/Combobox/index.cjs +2 -0
- package/build/components/Combobox/index.cjs.map +1 -0
- package/build/components/Combobox/index.d.ts +6 -0
- package/build/components/Combobox/index.js +302 -0
- package/build/components/Combobox/index.js.map +1 -0
- package/build/components/Combobox/style.css +1 -0
- package/build/components/CommandPalette/index.cjs +2 -0
- package/build/components/CommandPalette/index.cjs.map +1 -0
- package/build/components/CommandPalette/index.d.ts +37 -0
- package/build/components/CommandPalette/index.js +181 -0
- package/build/components/CommandPalette/index.js.map +1 -0
- package/build/components/CommandPalette/style.css +1 -0
- package/build/components/ConfirmDialog/index.cjs +2 -0
- package/build/components/ConfirmDialog/index.cjs.map +1 -0
- package/build/components/ConfirmDialog/index.d.ts +34 -0
- package/build/components/ConfirmDialog/index.js +85 -0
- package/build/components/ConfirmDialog/index.js.map +1 -0
- package/build/components/CopyField/index.cjs +2 -0
- package/build/components/CopyField/index.cjs.map +1 -0
- package/build/components/CopyField/index.d.ts +20 -0
- package/build/components/CopyField/index.js +44 -0
- package/build/components/CopyField/index.js.map +1 -0
- package/build/components/CopyField/style.css +1 -0
- package/build/components/DataTable/index.cjs +2 -0
- package/build/components/DataTable/index.cjs.map +1 -0
- package/build/components/DataTable/index.d.ts +60 -0
- package/build/components/DataTable/index.js +109 -0
- package/build/components/DataTable/index.js.map +1 -0
- package/build/components/DataTable/style.css +1 -0
- package/build/components/DateField/index.cjs +2 -0
- package/build/components/DateField/index.cjs.map +1 -0
- package/build/components/DateField/index.d.ts +44 -0
- package/build/components/DateField/index.js +79 -0
- package/build/components/DateField/index.js.map +1 -0
- package/build/components/DateField/style.css +1 -0
- package/build/components/Directory/index.cjs +2 -0
- package/build/components/Directory/index.cjs.map +1 -0
- package/build/components/Directory/index.d.ts +51 -0
- package/build/components/Directory/index.js +46 -0
- package/build/components/Directory/index.js.map +1 -0
- package/build/components/Directory/style.css +1 -0
- package/build/components/Disclosure/index.cjs +2 -0
- package/build/components/Disclosure/index.cjs.map +1 -0
- package/build/components/Disclosure/index.d.ts +34 -0
- package/build/components/Disclosure/index.js +64 -0
- package/build/components/Disclosure/index.js.map +1 -0
- package/build/components/Disclosure/style.css +1 -0
- package/build/components/Divider/index.cjs +2 -0
- package/build/components/Divider/index.cjs.map +1 -0
- package/build/components/Divider/index.d.ts +10 -0
- package/build/components/Divider/index.js +24 -0
- package/build/components/Divider/index.js.map +1 -0
- package/build/components/Divider/style.css +1 -0
- package/build/components/Drawer/index.cjs +2 -0
- package/build/components/Drawer/index.cjs.map +1 -0
- package/build/components/Drawer/index.d.ts +22 -0
- package/build/components/Drawer/index.js +88 -0
- package/build/components/Drawer/index.js.map +1 -0
- package/build/components/Drawer/style.css +1 -0
- package/build/components/EmptyState/index.cjs +2 -0
- package/build/components/EmptyState/index.cjs.map +1 -0
- package/build/components/EmptyState/index.d.ts +19 -0
- package/build/components/EmptyState/index.js +35 -0
- package/build/components/EmptyState/index.js.map +1 -0
- package/build/components/EmptyState/style.css +1 -0
- package/build/components/Field/index.cjs +2 -0
- package/build/components/Field/index.cjs.map +1 -0
- package/build/components/Field/index.d.ts +31 -0
- package/build/components/Field/index.js +52 -0
- package/build/components/Field/index.js.map +1 -0
- package/build/components/Field/style.css +1 -0
- package/build/components/FileUpload/index.cjs +2 -0
- package/build/components/FileUpload/index.cjs.map +1 -0
- package/build/components/FileUpload/index.d.ts +42 -0
- package/build/components/FileUpload/index.js +145 -0
- package/build/components/FileUpload/index.js.map +1 -0
- package/build/components/FileUpload/style.css +1 -0
- package/build/components/FilterBar/index.cjs +2 -0
- package/build/components/FilterBar/index.cjs.map +1 -0
- package/build/components/FilterBar/index.d.ts +28 -0
- package/build/components/FilterBar/index.js +35 -0
- package/build/components/FilterBar/index.js.map +1 -0
- package/build/components/FilterBar/style.css +1 -0
- package/build/components/IconButton/index.cjs +2 -0
- package/build/components/IconButton/index.cjs.map +1 -0
- package/build/components/IconButton/index.d.ts +22 -0
- package/build/components/IconButton/index.js +61 -0
- package/build/components/IconButton/index.js.map +1 -0
- package/build/components/IconButton/style.css +1 -0
- package/build/components/Input/index.cjs +2 -0
- package/build/components/Input/index.cjs.map +1 -0
- package/build/components/Input/index.d.ts +15 -0
- package/build/components/Input/index.js +52 -0
- package/build/components/Input/index.js.map +1 -0
- package/build/components/Input/style.css +1 -0
- package/build/components/Kbd/index.cjs +2 -0
- package/build/components/Kbd/index.cjs.map +1 -0
- package/build/components/Kbd/index.d.ts +12 -0
- package/build/components/Kbd/index.js +13 -0
- package/build/components/Kbd/index.js.map +1 -0
- package/build/components/Kbd/style.css +1 -0
- package/build/components/Link/index.cjs +2 -0
- package/build/components/Link/index.cjs.map +1 -0
- package/build/components/Link/index.d.ts +5 -0
- package/build/components/Link/index.js +11 -0
- package/build/components/Link/index.js.map +1 -0
- package/build/components/Menu/index.cjs +2 -0
- package/build/components/Menu/index.cjs.map +1 -0
- package/build/components/Menu/index.d.ts +46 -0
- package/build/components/Menu/index.js +241 -0
- package/build/components/Menu/index.js.map +1 -0
- package/build/components/Menu/style.css +1 -0
- package/build/components/Modal/index.cjs +2 -0
- package/build/components/Modal/index.cjs.map +1 -0
- package/build/components/Modal/index.d.ts +28 -0
- package/build/components/Modal/index.js +92 -0
- package/build/components/Modal/index.js.map +1 -0
- package/build/components/Modal/style.css +1 -0
- package/build/components/PageHeader/index.cjs +2 -0
- package/build/components/PageHeader/index.cjs.map +1 -0
- package/build/components/PageHeader/index.d.ts +24 -0
- package/build/components/PageHeader/index.js +34 -0
- package/build/components/PageHeader/index.js.map +1 -0
- package/build/components/PageHeader/style.css +1 -0
- package/build/components/Pagination/index.cjs +2 -0
- package/build/components/Pagination/index.cjs.map +1 -0
- package/build/components/Pagination/index.d.ts +39 -0
- package/build/components/Pagination/index.js +128 -0
- package/build/components/Pagination/index.js.map +1 -0
- package/build/components/Pagination/style.css +1 -0
- package/build/components/Panel/index.cjs +2 -0
- package/build/components/Panel/index.cjs.map +1 -0
- package/build/components/Panel/index.d.ts +43 -0
- package/build/components/Panel/index.js +55 -0
- package/build/components/Panel/index.js.map +1 -0
- package/build/components/Panel/style.css +1 -0
- package/build/components/PasswordInput/index.cjs +2 -0
- package/build/components/PasswordInput/index.cjs.map +1 -0
- package/build/components/PasswordInput/index.d.ts +14 -0
- package/build/components/PasswordInput/index.js +40 -0
- package/build/components/PasswordInput/index.js.map +1 -0
- package/build/components/PasswordInput/style.css +1 -0
- package/build/components/Popover/index.cjs +2 -0
- package/build/components/Popover/index.cjs.map +1 -0
- package/build/components/Popover/index.d.ts +20 -0
- package/build/components/Popover/index.js +91 -0
- package/build/components/Popover/index.js.map +1 -0
- package/build/components/Popover/style.css +1 -0
- package/build/components/Price/index.cjs +2 -0
- package/build/components/Price/index.cjs.map +1 -0
- package/build/components/Price/index.d.ts +22 -0
- package/build/components/Price/index.js +46 -0
- package/build/components/Price/index.js.map +1 -0
- package/build/components/Price/style.css +1 -0
- package/build/components/Progress/index.cjs +2 -0
- package/build/components/Progress/index.cjs.map +1 -0
- package/build/components/Progress/index.d.ts +49 -0
- package/build/components/Progress/index.js +120 -0
- package/build/components/Progress/index.js.map +1 -0
- package/build/components/Progress/style.css +1 -0
- package/build/components/PromptDialog/index.cjs +2 -0
- package/build/components/PromptDialog/index.cjs.map +1 -0
- package/build/components/PromptDialog/index.d.ts +36 -0
- package/build/components/PromptDialog/index.js +119 -0
- package/build/components/PromptDialog/index.js.map +1 -0
- package/build/components/PromptDialog/style.css +1 -0
- package/build/components/QuantityStepper/index.cjs +2 -0
- package/build/components/QuantityStepper/index.cjs.map +1 -0
- package/build/components/QuantityStepper/index.d.ts +21 -0
- package/build/components/QuantityStepper/index.js +106 -0
- package/build/components/QuantityStepper/index.js.map +1 -0
- package/build/components/QuantityStepper/style.css +1 -0
- package/build/components/Radio/index.cjs +2 -0
- package/build/components/Radio/index.cjs.map +1 -0
- package/build/components/Radio/index.d.ts +12 -0
- package/build/components/Radio/index.js +35 -0
- package/build/components/Radio/index.js.map +1 -0
- package/build/components/Radio/style.css +1 -0
- package/build/components/RadioCard/index.cjs +2 -0
- package/build/components/RadioCard/index.cjs.map +1 -0
- package/build/components/RadioCard/index.d.ts +16 -0
- package/build/components/RadioCard/index.js +48 -0
- package/build/components/RadioCard/index.js.map +1 -0
- package/build/components/RadioCard/style.css +1 -0
- package/build/components/RangeSlider/index.cjs +2 -0
- package/build/components/RangeSlider/index.cjs.map +1 -0
- package/build/components/RangeSlider/index.d.ts +26 -0
- package/build/components/RangeSlider/index.js +102 -0
- package/build/components/RangeSlider/index.js.map +1 -0
- package/build/components/RangeSlider/style.css +1 -0
- package/build/components/Rating/index.cjs +2 -0
- package/build/components/Rating/index.cjs.map +1 -0
- package/build/components/Rating/index.d.ts +16 -0
- package/build/components/Rating/index.js +29 -0
- package/build/components/Rating/index.js.map +1 -0
- package/build/components/Rating/style.css +1 -0
- package/build/components/RatingInput/index.cjs +2 -0
- package/build/components/RatingInput/index.cjs.map +1 -0
- package/build/components/RatingInput/index.d.ts +21 -0
- package/build/components/RatingInput/index.js +75 -0
- package/build/components/RatingInput/index.js.map +1 -0
- package/build/components/RatingInput/style.css +1 -0
- package/build/components/ScrollArea/index.cjs +2 -0
- package/build/components/ScrollArea/index.cjs.map +1 -0
- package/build/components/ScrollArea/index.d.ts +23 -0
- package/build/components/ScrollArea/index.js +65 -0
- package/build/components/ScrollArea/index.js.map +1 -0
- package/build/components/ScrollArea/style.css +1 -0
- package/build/components/SectionHeader/index.cjs +2 -0
- package/build/components/SectionHeader/index.cjs.map +1 -0
- package/build/components/SectionHeader/index.d.ts +17 -0
- package/build/components/SectionHeader/index.js +25 -0
- package/build/components/SectionHeader/index.js.map +1 -0
- package/build/components/SectionHeader/style.css +1 -0
- package/build/components/SegmentedControl/index.cjs +2 -0
- package/build/components/SegmentedControl/index.cjs.map +1 -0
- package/build/components/SegmentedControl/index.d.ts +24 -0
- package/build/components/SegmentedControl/index.js +69 -0
- package/build/components/SegmentedControl/index.js.map +1 -0
- package/build/components/SegmentedControl/style.css +1 -0
- package/build/components/Select/index.cjs +2 -0
- package/build/components/Select/index.cjs.map +1 -0
- package/build/components/Select/index.d.ts +39 -0
- package/build/components/Select/index.js +179 -0
- package/build/components/Select/index.js.map +1 -0
- package/build/components/Select/style.css +1 -0
- package/build/components/Skeleton/index.cjs +2 -0
- package/build/components/Skeleton/index.cjs.map +1 -0
- package/build/components/Skeleton/index.d.ts +25 -0
- package/build/components/Skeleton/index.js +50 -0
- package/build/components/Skeleton/index.js.map +1 -0
- package/build/components/Skeleton/style.css +1 -0
- package/build/components/Spinner/index.cjs +2 -0
- package/build/components/Spinner/index.cjs.map +1 -0
- package/build/components/Spinner/index.d.ts +11 -0
- package/build/components/Spinner/index.js +15 -0
- package/build/components/Spinner/index.js.map +1 -0
- package/build/components/Spinner/style.css +1 -0
- package/build/components/Stat/index.cjs +2 -0
- package/build/components/Stat/index.cjs.map +1 -0
- package/build/components/Stat/index.d.ts +34 -0
- package/build/components/Stat/index.js +72 -0
- package/build/components/Stat/index.js.map +1 -0
- package/build/components/Stat/style.css +1 -0
- package/build/components/StatusDot/index.cjs +2 -0
- package/build/components/StatusDot/index.cjs.map +1 -0
- package/build/components/StatusDot/index.d.ts +23 -0
- package/build/components/StatusDot/index.js +23 -0
- package/build/components/StatusDot/index.js.map +1 -0
- package/build/components/StatusDot/style.css +1 -0
- package/build/components/Steps/index.cjs +2 -0
- package/build/components/Steps/index.cjs.map +1 -0
- package/build/components/Steps/index.d.ts +23 -0
- package/build/components/Steps/index.js +69 -0
- package/build/components/Steps/index.js.map +1 -0
- package/build/components/Steps/style.css +1 -0
- package/build/components/SummaryCard/index.cjs +2 -0
- package/build/components/SummaryCard/index.cjs.map +1 -0
- package/build/components/SummaryCard/index.d.ts +24 -0
- package/build/components/SummaryCard/index.js +33 -0
- package/build/components/SummaryCard/index.js.map +1 -0
- package/build/components/SummaryCard/style.css +1 -0
- package/build/components/Switch/index.cjs +2 -0
- package/build/components/Switch/index.cjs.map +1 -0
- package/build/components/Switch/index.d.ts +16 -0
- package/build/components/Switch/index.js +42 -0
- package/build/components/Switch/index.js.map +1 -0
- package/build/components/Switch/style.css +1 -0
- package/build/components/Table/index.cjs +2 -0
- package/build/components/Table/index.cjs.map +1 -0
- package/build/components/Table/index.d.ts +28 -0
- package/build/components/Table/index.js +58 -0
- package/build/components/Table/index.js.map +1 -0
- package/build/components/Table/style.css +1 -0
- package/build/components/TableCheckbox/index.cjs +2 -0
- package/build/components/TableCheckbox/index.cjs.map +1 -0
- package/build/components/TableCheckbox/index.d.ts +15 -0
- package/build/components/TableCheckbox/index.js +31 -0
- package/build/components/TableCheckbox/index.js.map +1 -0
- package/build/components/TableCheckbox/style.css +1 -0
- package/build/components/Tabs/index.cjs +2 -0
- package/build/components/Tabs/index.cjs.map +1 -0
- package/build/components/Tabs/index.d.ts +27 -0
- package/build/components/Tabs/index.js +102 -0
- package/build/components/Tabs/index.js.map +1 -0
- package/build/components/Tabs/style.css +1 -0
- package/build/components/TagInput/index.cjs +2 -0
- package/build/components/TagInput/index.cjs.map +1 -0
- package/build/components/TagInput/index.d.ts +25 -0
- package/build/components/TagInput/index.js +124 -0
- package/build/components/TagInput/index.js.map +1 -0
- package/build/components/TagInput/style.css +1 -0
- package/build/components/TextLink/index.cjs +2 -0
- package/build/components/TextLink/index.cjs.map +1 -0
- package/build/components/TextLink/index.d.ts +16 -0
- package/build/components/TextLink/index.js +32 -0
- package/build/components/TextLink/index.js.map +1 -0
- package/build/components/TextLink/style.css +1 -0
- package/build/components/Textarea/index.cjs +2 -0
- package/build/components/Textarea/index.cjs.map +1 -0
- package/build/components/Textarea/index.d.ts +20 -0
- package/build/components/Textarea/index.js +68 -0
- package/build/components/Textarea/index.js.map +1 -0
- package/build/components/Textarea/style.css +1 -0
- package/build/components/Tile/index.cjs +2 -0
- package/build/components/Tile/index.cjs.map +1 -0
- package/build/components/Tile/index.d.ts +19 -0
- package/build/components/Tile/index.js +24 -0
- package/build/components/Tile/index.js.map +1 -0
- package/build/components/Tile/style.css +1 -0
- package/build/components/Timeline/index.cjs +2 -0
- package/build/components/Timeline/index.cjs.map +1 -0
- package/build/components/Timeline/index.d.ts +24 -0
- package/build/components/Timeline/index.js +56 -0
- package/build/components/Timeline/index.js.map +1 -0
- package/build/components/Timeline/style.css +1 -0
- package/build/components/Toast/index.cjs +2 -0
- package/build/components/Toast/index.cjs.map +1 -0
- package/build/components/Toast/index.d.ts +43 -0
- package/build/components/Toast/index.js +136 -0
- package/build/components/Toast/index.js.map +1 -0
- package/build/components/Toast/style.css +1 -0
- package/build/components/ToastPortal/index.cjs +2 -0
- package/build/components/ToastPortal/index.cjs.map +1 -0
- package/build/components/ToastPortal/index.d.ts +8 -0
- package/build/components/ToastPortal/index.js +15 -0
- package/build/components/ToastPortal/index.js.map +1 -0
- package/build/components/Tooltip/index.cjs +2 -0
- package/build/components/Tooltip/index.cjs.map +1 -0
- package/build/components/Tooltip/index.d.ts +23 -0
- package/build/components/Tooltip/index.js +116 -0
- package/build/components/Tooltip/index.js.map +1 -0
- package/build/components/Tooltip/style.css +1 -0
- package/build/constants/breakpoint.constants.cjs +2 -0
- package/build/constants/breakpoint.constants.cjs.map +1 -0
- package/build/constants/breakpoint.constants.d.ts +8 -0
- package/build/constants/breakpoint.constants.js +9 -0
- package/build/constants/breakpoint.constants.js.map +1 -0
- package/build/constants/combobox.constants.cjs +2 -0
- package/build/constants/combobox.constants.cjs.map +1 -0
- package/build/constants/combobox.constants.d.ts +11 -0
- package/build/constants/combobox.constants.js +7 -0
- package/build/constants/combobox.constants.js.map +1 -0
- package/build/constants/scroll.constants.cjs +2 -0
- package/build/constants/scroll.constants.cjs.map +1 -0
- package/build/constants/scroll.constants.d.ts +7 -0
- package/build/constants/scroll.constants.js +5 -0
- package/build/constants/scroll.constants.js.map +1 -0
- package/build/enums/ui-size.enum.cjs +2 -0
- package/build/enums/ui-size.enum.cjs.map +1 -0
- package/build/enums/ui-size.enum.d.ts +9 -0
- package/build/enums/ui-size.enum.js +5 -0
- package/build/enums/ui-size.enum.js.map +1 -0
- package/build/enums/ui-variant.enum.cjs +2 -0
- package/build/enums/ui-variant.enum.cjs.map +1 -0
- package/build/enums/ui-variant.enum.d.ts +20 -0
- package/build/enums/ui-variant.enum.js +5 -0
- package/build/enums/ui-variant.enum.js.map +1 -0
- package/build/helpers/class-name.helper.cjs +2 -0
- package/build/helpers/class-name.helper.cjs.map +1 -0
- package/build/helpers/class-name.helper.d.ts +3 -0
- package/build/helpers/class-name.helper.js +10 -0
- package/build/helpers/class-name.helper.js.map +1 -0
- package/build/helpers/component.helper.cjs +2 -0
- package/build/helpers/component.helper.cjs.map +1 -0
- package/build/helpers/component.helper.d.ts +13 -0
- package/build/helpers/component.helper.js +5 -0
- package/build/helpers/component.helper.js.map +1 -0
- package/build/helpers/focus.helper.cjs +2 -0
- package/build/helpers/focus.helper.cjs.map +1 -0
- package/build/helpers/focus.helper.d.ts +42 -0
- package/build/helpers/focus.helper.js +65 -0
- package/build/helpers/focus.helper.js.map +1 -0
- package/build/helpers/label.helper.cjs +2 -0
- package/build/helpers/label.helper.cjs.map +1 -0
- package/build/helpers/label.helper.d.ts +11 -0
- package/build/helpers/label.helper.js +11 -0
- package/build/helpers/label.helper.js.map +1 -0
- package/build/helpers/portal.helper.cjs +2 -0
- package/build/helpers/portal.helper.cjs.map +1 -0
- package/build/helpers/portal.helper.d.ts +28 -0
- package/build/helpers/portal.helper.js +36 -0
- package/build/helpers/portal.helper.js.map +1 -0
- package/build/helpers/scroll.helper.cjs +2 -0
- package/build/helpers/scroll.helper.cjs.map +1 -0
- package/build/helpers/scroll.helper.d.ts +8 -0
- package/build/helpers/scroll.helper.js +11 -0
- package/build/helpers/scroll.helper.js.map +1 -0
- package/build/helpers/text.helper.cjs +2 -0
- package/build/helpers/text.helper.cjs.map +1 -0
- package/build/helpers/text.helper.d.ts +5 -0
- package/build/helpers/text.helper.js +6 -0
- package/build/helpers/text.helper.js.map +1 -0
- package/build/helpers/theme.helper.cjs +24 -0
- package/build/helpers/theme.helper.cjs.map +1 -0
- package/build/helpers/theme.helper.d.ts +49 -0
- package/build/helpers/theme.helper.js +75 -0
- package/build/helpers/theme.helper.js.map +1 -0
- package/build/hooks/useAnnounce.cjs +2 -0
- package/build/hooks/useAnnounce.cjs.map +1 -0
- package/build/hooks/useAnnounce.d.ts +4 -0
- package/build/hooks/useAnnounce.js +23 -0
- package/build/hooks/useAnnounce.js.map +1 -0
- package/build/hooks/useAsyncSearch.cjs +2 -0
- package/build/hooks/useAsyncSearch.cjs.map +1 -0
- package/build/hooks/useAsyncSearch.d.ts +11 -0
- package/build/hooks/useAsyncSearch.js +17 -0
- package/build/hooks/useAsyncSearch.js.map +1 -0
- package/build/hooks/useCopyFeedback.cjs +2 -0
- package/build/hooks/useCopyFeedback.cjs.map +1 -0
- package/build/hooks/useCopyFeedback.d.ts +10 -0
- package/build/hooks/useCopyFeedback.js +25 -0
- package/build/hooks/useCopyFeedback.js.map +1 -0
- package/build/hooks/useDismissOnEscape.cjs +2 -0
- package/build/hooks/useDismissOnEscape.cjs.map +1 -0
- package/build/hooks/useDismissOnEscape.d.ts +12 -0
- package/build/hooks/useDismissOnEscape.js +18 -0
- package/build/hooks/useDismissOnEscape.js.map +1 -0
- package/build/hooks/useListboxNavigation.cjs +2 -0
- package/build/hooks/useListboxNavigation.cjs.map +1 -0
- package/build/hooks/useListboxNavigation.d.ts +7 -0
- package/build/hooks/useListboxNavigation.js +53 -0
- package/build/hooks/useListboxNavigation.js.map +1 -0
- package/build/hooks/usePortalSurface.cjs +2 -0
- package/build/hooks/usePortalSurface.cjs.map +1 -0
- package/build/hooks/usePortalSurface.d.ts +25 -0
- package/build/hooks/usePortalSurface.js +19 -0
- package/build/hooks/usePortalSurface.js.map +1 -0
- package/build/hooks/usePositioning.cjs +2 -0
- package/build/hooks/usePositioning.cjs.map +1 -0
- package/build/hooks/usePositioning.d.ts +13 -0
- package/build/hooks/usePositioning.js +74 -0
- package/build/hooks/usePositioning.js.map +1 -0
- package/build/hooks/useScrollLock.cjs +2 -0
- package/build/hooks/useScrollLock.cjs.map +1 -0
- package/build/hooks/useScrollLock.d.ts +2 -0
- package/build/hooks/useScrollLock.js +34 -0
- package/build/hooks/useScrollLock.js.map +1 -0
- package/build/hooks/useSheetViewport.cjs +2 -0
- package/build/hooks/useSheetViewport.cjs.map +1 -0
- package/build/hooks/useSheetViewport.d.ts +6 -0
- package/build/hooks/useSheetViewport.js +29 -0
- package/build/hooks/useSheetViewport.js.map +1 -0
- package/build/hooks/useStickToBottom.cjs +2 -0
- package/build/hooks/useStickToBottom.cjs.map +1 -0
- package/build/hooks/useStickToBottom.d.ts +12 -0
- package/build/hooks/useStickToBottom.js +39 -0
- package/build/hooks/useStickToBottom.js.map +1 -0
- package/build/hooks/useUiTheme.cjs +2 -0
- package/build/hooks/useUiTheme.cjs.map +1 -0
- package/build/hooks/useUiTheme.d.ts +7 -0
- package/build/hooks/useUiTheme.js +36 -0
- package/build/hooks/useUiTheme.js.map +1 -0
- package/build/hooks/useUiTokens.cjs +2 -0
- package/build/hooks/useUiTokens.cjs.map +1 -0
- package/build/hooks/useUiTokens.d.ts +11 -0
- package/build/hooks/useUiTokens.js +39 -0
- package/build/hooks/useUiTokens.js.map +1 -0
- package/build/hooks/useVirtualList.cjs +2 -0
- package/build/hooks/useVirtualList.cjs.map +1 -0
- package/build/hooks/useVirtualList.d.ts +13 -0
- package/build/hooks/useVirtualList.js +41 -0
- package/build/hooks/useVirtualList.js.map +1 -0
- package/build/index.cjs +2 -0
- package/build/index.cjs.map +1 -0
- package/build/index.d.ts +95 -0
- package/build/index.js +207 -0
- package/build/index.js.map +1 -0
- package/build/scss/_colors.generated.scss +119 -0
- package/build/scss/_index.scss +6 -0
- package/build/scss/_metrics.generated.scss +49 -0
- package/build/scss/_mixins.scss +710 -0
- package/build/scss/_variables.scss +51 -0
- package/build/styles/base.d.ts +0 -0
- package/build/styles.css +133 -0
- package/build/theme/UiProvider.cjs +2 -0
- package/build/theme/UiProvider.cjs.map +1 -0
- package/build/theme/UiProvider.d.ts +22 -0
- package/build/theme/UiProvider.js +30 -0
- package/build/theme/UiProvider.js.map +1 -0
- package/build/theme/UiThemeScript.cjs +2 -0
- package/build/theme/UiThemeScript.cjs.map +1 -0
- package/build/theme/UiThemeScript.d.ts +19 -0
- package/build/theme/UiThemeScript.js +8 -0
- package/build/theme/UiThemeScript.js.map +1 -0
- package/build/theme/context.cjs +2 -0
- package/build/theme/context.cjs.map +1 -0
- package/build/theme/context.d.ts +5 -0
- package/build/theme/context.js +8 -0
- package/build/theme/context.js.map +1 -0
- package/build/theme/initUi.cjs +2 -0
- package/build/theme/initUi.cjs.map +1 -0
- package/build/theme/initUi.d.ts +7 -0
- package/build/theme/initUi.js +10 -0
- package/build/theme/initUi.js.map +1 -0
- package/build/theme/palette.cjs +2 -0
- package/build/theme/palette.cjs.map +1 -0
- package/build/theme/palette.d.ts +219 -0
- package/build/theme/palette.js +148 -0
- package/build/theme/palette.js.map +1 -0
- package/build/theme/tokens.cjs +2 -0
- package/build/theme/tokens.cjs.map +1 -0
- package/build/theme/tokens.d.ts +225 -0
- package/build/theme/tokens.js +384 -0
- package/build/theme/tokens.js.map +1 -0
- package/build/types/charts/AreaChart/index.d.ts +14 -0
- package/build/types/charts/BarChart/index.d.ts +16 -0
- package/build/types/charts/BoxPlot/index.d.ts +43 -0
- package/build/types/charts/ComposedChart/index.d.ts +16 -0
- package/build/types/charts/Heatmap/index.d.ts +30 -0
- package/build/types/charts/Histogram/index.d.ts +29 -0
- package/build/types/charts/LineChart/index.d.ts +14 -0
- package/build/types/charts/PieChart/index.d.ts +36 -0
- package/build/types/charts/RadarChart/index.d.ts +40 -0
- package/build/types/charts/ScatterPlot/index.d.ts +41 -0
- package/build/types/charts/core/CartesianChart.d.ts +43 -0
- package/build/types/charts/core/ChartFrame.d.ts +55 -0
- package/build/types/charts/core/axes.d.ts +37 -0
- package/build/types/charts/core/cartesian.d.ts +80 -0
- package/build/types/charts/core/format.d.ts +19 -0
- package/build/types/charts/core/margins.d.ts +9 -0
- package/build/types/charts/core/palette.d.ts +13 -0
- package/build/types/charts/core/path.d.ts +24 -0
- package/build/types/charts/core/scale.d.ts +40 -0
- package/build/types/charts/core/series.d.ts +11 -0
- package/build/types/charts/core/spatial.d.ts +12 -0
- package/build/types/charts/core/stats.d.ts +34 -0
- package/build/types/charts/core/types.d.ts +31 -0
- package/build/types/charts/core/useChartWidth.d.ts +7 -0
- package/build/types/charts/index.d.ts +21 -0
- package/build/types/chat/ActionList/index.d.ts +46 -0
- package/build/types/chat/AppBar/index.d.ts +21 -0
- package/build/types/chat/ChatMessage/index.d.ts +24 -0
- package/build/types/chat/ChatThread/index.d.ts +24 -0
- package/build/types/chat/Citation/index.d.ts +15 -0
- package/build/types/chat/CodeBlock/format.d.ts +7 -0
- package/build/types/chat/CodeBlock/grammars.d.ts +44 -0
- package/build/types/chat/CodeBlock/highlight.d.ts +22 -0
- package/build/types/chat/CodeBlock/index.d.ts +33 -0
- package/build/types/chat/DescriptionList/index.d.ts +16 -0
- package/build/types/chat/Legend/index.d.ts +20 -0
- package/build/types/chat/MessageActions/index.d.ts +21 -0
- package/build/types/chat/PromptInput/index.d.ts +47 -0
- package/build/types/chat/PromptSuggestions/index.d.ts +25 -0
- package/build/types/chat/Prose/index.d.ts +15 -0
- package/build/types/chat/ReasoningBlock/index.d.ts +24 -0
- package/build/types/chat/ReasoningText/index.d.ts +14 -0
- package/build/types/chat/SegmentBar/index.d.ts +46 -0
- package/build/types/chat/SourceList/index.d.ts +25 -0
- package/build/types/chat/TerminalOutput/index.d.ts +25 -0
- package/build/types/chat/ToolCall/index.d.ts +41 -0
- package/build/types/chat/index.d.ts +26 -0
- package/build/types/combobox.type.d.ts +49 -0
- package/build/types/common-element-props.type.d.ts +8 -0
- package/build/types/helpers/class-name.helper.d.ts +3 -0
- package/build/types/helpers/component.helper.d.ts +13 -0
- package/build/types/helpers/label.helper.d.ts +12 -0
- package/build/types/hook.type.d.ts +36 -0
- package/build/types/link.type.d.ts +14 -0
- package/build/types/positioning.type.d.ts +38 -0
- package/build/types/theme/palette.d.ts +219 -0
- package/build/types/theme/tokens.d.ts +225 -0
- package/build/types/theme.type.d.ts +223 -0
- package/build/types/types/common-element-props.type.d.ts +8 -0
- package/build/types/types/link.type.d.ts +14 -0
- package/build/types/types/theme.type.d.ts +223 -0
- package/package.json +487 -4
package/build/charts.js
ADDED
|
@@ -0,0 +1,1865 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as m, jsxs as X, Fragment as Ft } from "react/jsx-runtime";
|
|
3
|
+
import { useId as pe, useState as Tt, useRef as Pt, useEffect as te, useCallback as et, useLayoutEffect as ye, memo as ot, useMemo as L } from "react";
|
|
4
|
+
import { useAnnounce as $e, useUi as xt } from "@handijit/ui";
|
|
5
|
+
const it = (t, o) => Object.assign(t, { displayName: o }), we = "ui-axis-AqLAe", ke = "ui-axis__label-dHxpo", Ne = "ui-axis__grid-RVxXW", ve = "ui-axis__baseline-jhG2z", rt = {
|
|
6
|
+
axis: we,
|
|
7
|
+
axis__label: ke,
|
|
8
|
+
axis__grid: Ne,
|
|
9
|
+
axis__baseline: ve
|
|
10
|
+
}, vt = (t, o, e) => {
|
|
11
|
+
const n = e(t);
|
|
12
|
+
return t.map((r, i) => ({ position: o(r), label: n[i] }));
|
|
13
|
+
}, xe = 6.4, ut = (t) => t.length * xe, ge = (t, o = 8) => {
|
|
14
|
+
if (t.length < 2) return [...t];
|
|
15
|
+
const e = Math.max(...t.map((i) => ut(i.label))), n = Math.abs(t[1].position - t[0].position), r = n <= 0 ? 1 : Math.max(1, Math.ceil((e + o) / n));
|
|
16
|
+
return t.filter((i, d) => d % r === 0);
|
|
17
|
+
}, Gt = (t, o) => {
|
|
18
|
+
const e = Math.max(1, Math.floor(o / xe));
|
|
19
|
+
return t.length <= e ? t : `${t.slice(0, Math.max(1, e - 1))}…`;
|
|
20
|
+
}, ft = ({ area: t, ticks: o, side: e, hasGrid: n = !1 }) => /* @__PURE__ */ m("g", { className: rt.axis, "aria-hidden": !0, children: o.map(
|
|
21
|
+
(r) => e === "bottom" ? /* @__PURE__ */ X("g", { children: [
|
|
22
|
+
n && /* @__PURE__ */ m(
|
|
23
|
+
"line",
|
|
24
|
+
{
|
|
25
|
+
className: rt.axis__grid,
|
|
26
|
+
x1: r.position,
|
|
27
|
+
x2: r.position,
|
|
28
|
+
y1: t.top,
|
|
29
|
+
y2: t.bottom
|
|
30
|
+
}
|
|
31
|
+
),
|
|
32
|
+
/* @__PURE__ */ m(
|
|
33
|
+
"text",
|
|
34
|
+
{
|
|
35
|
+
className: rt.axis__label,
|
|
36
|
+
x: r.position,
|
|
37
|
+
y: t.bottom + 16,
|
|
38
|
+
textAnchor: "middle",
|
|
39
|
+
children: r.label
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
] }, `${r.position}-${r.label}`) : /* @__PURE__ */ X("g", { children: [
|
|
43
|
+
n && /* @__PURE__ */ m(
|
|
44
|
+
"line",
|
|
45
|
+
{
|
|
46
|
+
className: rt.axis__grid,
|
|
47
|
+
x1: t.left,
|
|
48
|
+
x2: t.right,
|
|
49
|
+
y1: r.position,
|
|
50
|
+
y2: r.position
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
/* @__PURE__ */ m(
|
|
54
|
+
"text",
|
|
55
|
+
{
|
|
56
|
+
className: rt.axis__label,
|
|
57
|
+
x: e === "left" ? t.left - 8 : t.right + 8,
|
|
58
|
+
y: r.position,
|
|
59
|
+
dy: "0.32em",
|
|
60
|
+
textAnchor: e === "left" ? "end" : "start",
|
|
61
|
+
children: r.label
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
] }, `${r.position}-${r.label}`)
|
|
65
|
+
) }), Yt = ({ area: t, ticks: o, side: e }) => /* @__PURE__ */ m("g", { className: rt.axis, "aria-hidden": !0, children: e === "bottom" ? /* @__PURE__ */ X(Ft, { children: [
|
|
66
|
+
/* @__PURE__ */ m(
|
|
67
|
+
"line",
|
|
68
|
+
{
|
|
69
|
+
className: rt.axis__baseline,
|
|
70
|
+
x1: t.left,
|
|
71
|
+
x2: t.right,
|
|
72
|
+
y1: t.bottom,
|
|
73
|
+
y2: t.bottom
|
|
74
|
+
}
|
|
75
|
+
),
|
|
76
|
+
ge(o).map((n) => /* @__PURE__ */ m(
|
|
77
|
+
"text",
|
|
78
|
+
{
|
|
79
|
+
className: rt.axis__label,
|
|
80
|
+
x: n.position,
|
|
81
|
+
y: t.bottom + 16,
|
|
82
|
+
textAnchor: "middle",
|
|
83
|
+
children: n.label
|
|
84
|
+
},
|
|
85
|
+
`${n.position}-${n.label}`
|
|
86
|
+
))
|
|
87
|
+
] }) : /* @__PURE__ */ X(Ft, { children: [
|
|
88
|
+
/* @__PURE__ */ m(
|
|
89
|
+
"line",
|
|
90
|
+
{
|
|
91
|
+
className: rt.axis__baseline,
|
|
92
|
+
x1: t.left,
|
|
93
|
+
x2: t.left,
|
|
94
|
+
y1: t.top,
|
|
95
|
+
y2: t.bottom
|
|
96
|
+
}
|
|
97
|
+
),
|
|
98
|
+
o.map((n) => /* @__PURE__ */ m(
|
|
99
|
+
"text",
|
|
100
|
+
{
|
|
101
|
+
className: rt.axis__label,
|
|
102
|
+
x: t.left - 8,
|
|
103
|
+
y: n.position,
|
|
104
|
+
dy: "0.32em",
|
|
105
|
+
textAnchor: "end",
|
|
106
|
+
children: Gt(n.label, t.left - 12)
|
|
107
|
+
},
|
|
108
|
+
`${n.position}-${n.label}`
|
|
109
|
+
))
|
|
110
|
+
] }) }), V = (t) => Math.round(t * 100) / 100, Ae = (t) => {
|
|
111
|
+
const o = [];
|
|
112
|
+
let e = [];
|
|
113
|
+
for (const n of t)
|
|
114
|
+
n === null || !Number.isFinite(n.x) || !Number.isFinite(n.y) ? (e.length > 0 && o.push(e), e = []) : e.push(n);
|
|
115
|
+
return e.length > 0 && o.push(e), o;
|
|
116
|
+
}, qt = (t) => t.map((o, e) => `${e === 0 ? "M" : "L"}${V(o.x)},${V(o.y)}`).join(""), be = (t) => {
|
|
117
|
+
const o = t.length;
|
|
118
|
+
if (o < 3) return qt(t);
|
|
119
|
+
const e = [], n = [];
|
|
120
|
+
for (let i = 0; i < o - 1; i += 1) {
|
|
121
|
+
const d = t[i + 1].x - t[i].x;
|
|
122
|
+
n.push(d === 0 ? 0 : (t[i + 1].y - t[i].y) / d);
|
|
123
|
+
}
|
|
124
|
+
e.push(n[0]);
|
|
125
|
+
for (let i = 1; i < o - 1; i += 1)
|
|
126
|
+
e.push(
|
|
127
|
+
n[i - 1] * n[i] <= 0 ? 0 : (n[i - 1] + n[i]) / 2
|
|
128
|
+
);
|
|
129
|
+
e.push(n[o - 2]);
|
|
130
|
+
for (let i = 0; i < o - 1; i += 1) {
|
|
131
|
+
if (n[i] === 0) {
|
|
132
|
+
e[i] = 0, e[i + 1] = 0;
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
const d = e[i] / n[i], u = e[i + 1] / n[i], k = d * d + u * u;
|
|
136
|
+
if (k > 9) {
|
|
137
|
+
const T = 3 / Math.sqrt(k);
|
|
138
|
+
e[i] = T * d * n[i], e[i + 1] = T * u * n[i];
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
let r = `M${V(t[0].x)},${V(t[0].y)}`;
|
|
142
|
+
for (let i = 0; i < o - 1; i += 1) {
|
|
143
|
+
const d = t[i], u = t[i + 1], k = (u.x - d.x) / 3;
|
|
144
|
+
r += `C${V(d.x + k)},${V(d.y + e[i] * k)} ${V(u.x - k)},${V(u.y - e[i + 1] * k)} ${V(u.x)},${V(u.y)}`;
|
|
145
|
+
}
|
|
146
|
+
return r;
|
|
147
|
+
}, Te = (t, o = "linear") => Ae(t).map((e) => o === "monotone" ? be(e) : qt(e)).join(""), Ie = (t, o, e = "linear") => {
|
|
148
|
+
const n = [];
|
|
149
|
+
let r = [], i = [];
|
|
150
|
+
const d = () => {
|
|
151
|
+
if (r.length > 0) {
|
|
152
|
+
const u = e === "monotone" ? be : qt, k = u([...i].reverse()).replace(/^M/, "L");
|
|
153
|
+
n.push(`${u(r)}${k}Z`);
|
|
154
|
+
}
|
|
155
|
+
r = [], i = [];
|
|
156
|
+
};
|
|
157
|
+
return t.forEach((u, k) => {
|
|
158
|
+
const T = o[k];
|
|
159
|
+
u === null || T === null || T === void 0 ? d() : (r.push(u), i.push(T));
|
|
160
|
+
}), d(), n.join("");
|
|
161
|
+
}, nt = (t, o, e, n) => ({
|
|
162
|
+
x: t + e * Math.sin(n),
|
|
163
|
+
y: o - e * Math.cos(n)
|
|
164
|
+
}), ee = (t, o, e, n, r, i) => {
|
|
165
|
+
const d = i - r;
|
|
166
|
+
if (d <= 0 || e <= 0) return "";
|
|
167
|
+
if (d >= Math.PI * 2 - 1e-6) {
|
|
168
|
+
const g = (R, z) => `M${V(t)},${V(o - R)}A${R},${R} 0 1 ${z} ${V(t)},${V(o + R)}A${R},${R} 0 1 ${z} ${V(t)},${V(o - R)}Z`;
|
|
169
|
+
return g(e, 1) + (n > 0 ? g(n, 0) : "");
|
|
170
|
+
}
|
|
171
|
+
const u = d > Math.PI ? 1 : 0, k = nt(t, o, e, r), T = nt(t, o, e, i);
|
|
172
|
+
if (n <= 0)
|
|
173
|
+
return `M${V(t)},${V(o)}L${V(k.x)},${V(k.y)}A${e},${e} 0 ${u} 1 ${V(T.x)},${V(T.y)}Z`;
|
|
174
|
+
const A = nt(t, o, n, i), I = nt(t, o, n, r);
|
|
175
|
+
return `M${V(k.x)},${V(k.y)}A${e},${e} 0 ${u} 1 ${V(T.x)},${V(T.y)}L${V(A.x)},${V(A.y)}A${n},${n} 0 ${u} 0 ${V(I.x)},${V(I.y)}Z`;
|
|
176
|
+
}, ne = (t) => t.length === 0 ? "" : `${qt(t)}Z`, pt = (t, o) => {
|
|
177
|
+
const [e, n] = t, [r, i] = o, d = n - e, u = (k) => d === 0 ? (r + i) / 2 : r + (k - e) / d * (i - r);
|
|
178
|
+
return u.domain = t, u.range = o, u.invert = (k) => i === r ? e : e + (k - r) / (i - r) * d, u;
|
|
179
|
+
}, Dt = (t, o, { paddingInner: e = 0.2, paddingOuter: n = 0.1 } = {}) => {
|
|
180
|
+
const [r, i] = o, d = t.length, u = d === 0 ? 0 : (i - r) / Math.max(1, d - e + n * 2), k = u * (1 - e), T = r + u * n, A = new Map(t.map((g, R) => [g, R])), I = (g) => {
|
|
181
|
+
const R = A.get(g);
|
|
182
|
+
return R === void 0 ? Number.NaN : T + R * u;
|
|
183
|
+
};
|
|
184
|
+
return I.domain = t, I.range = o, I.bandwidth = k, I.step = u, I.indexAt = (g) => d === 0 ? -1 : Math.min(
|
|
185
|
+
d - 1,
|
|
186
|
+
Math.max(
|
|
187
|
+
0,
|
|
188
|
+
Math.floor((g - r - u * n + (u - k) / 2) / u)
|
|
189
|
+
)
|
|
190
|
+
), I;
|
|
191
|
+
}, Zt = (t, o, e) => {
|
|
192
|
+
const n = Math.abs(o - t);
|
|
193
|
+
if (n === 0 || !Number.isFinite(n) || e <= 0) return 1;
|
|
194
|
+
const r = n / e, i = 10 ** Math.floor(Math.log10(r)), d = r / i;
|
|
195
|
+
return (d >= 7.5 ? 10 : d >= 3.5 ? 5 : d >= 1.5 ? 2 : 1) * i;
|
|
196
|
+
}, Ut = (t, o) => {
|
|
197
|
+
const e = Math.max(0, -Math.floor(Math.log10(o)) + 1);
|
|
198
|
+
return Number(t.toFixed(Math.min(e, 12)));
|
|
199
|
+
}, At = (t, o, e = 5) => {
|
|
200
|
+
if (!Number.isFinite(t) || !Number.isFinite(o)) return [0, 1];
|
|
201
|
+
let n = Math.min(t, o), r = Math.max(t, o);
|
|
202
|
+
if (n === r) {
|
|
203
|
+
if (n === 0) return [0, 1];
|
|
204
|
+
const d = Math.abs(n) * 0.5;
|
|
205
|
+
n = n > 0 ? 0 : n - d, r = r < 0 ? 0 : r + d;
|
|
206
|
+
}
|
|
207
|
+
const i = Zt(n, r, e);
|
|
208
|
+
return [Ut(Math.floor(n / i) * i, i), Ut(Math.ceil(r / i) * i, i)];
|
|
209
|
+
}, ct = (t, o, e = 5) => {
|
|
210
|
+
if (!Number.isFinite(t) || !Number.isFinite(o)) return [];
|
|
211
|
+
if (t === o) return [t];
|
|
212
|
+
const n = Zt(t, o, e), r = Math.ceil(t / n - 1e-9), i = Math.floor(o / n + 1e-9), d = [];
|
|
213
|
+
for (let u = r; u <= i && d.length < 1e3; u += 1)
|
|
214
|
+
d.push(Ut(u * n, n));
|
|
215
|
+
return d;
|
|
216
|
+
}, Ce = (t, o) => {
|
|
217
|
+
if (t.length === 0) return -1;
|
|
218
|
+
let e = 0, n = t.length - 1;
|
|
219
|
+
for (; e < n; ) {
|
|
220
|
+
const r = e + n >> 1;
|
|
221
|
+
t[r] < o ? e = r + 1 : n = r;
|
|
222
|
+
}
|
|
223
|
+
return e > 0 && Math.abs(t[e - 1] - o) <= Math.abs(t[e] - o) ? e - 1 : e;
|
|
224
|
+
}, Ot = (t) => t.filter((o) => typeof o == "number" && Number.isFinite(o)), yt = (t) => {
|
|
225
|
+
if (t.length === 0) return [0, 0];
|
|
226
|
+
let o = t[0], e = t[0];
|
|
227
|
+
for (const n of t)
|
|
228
|
+
n < o && (o = n), n > e && (e = n);
|
|
229
|
+
return [o, e];
|
|
230
|
+
}, Wt = (t, o) => {
|
|
231
|
+
if (t.length === 0) return Number.NaN;
|
|
232
|
+
if (t.length === 1) return t[0];
|
|
233
|
+
const e = (t.length - 1) * Math.min(1, Math.max(0, o)), n = Math.floor(e), r = e - n;
|
|
234
|
+
return n + 1 < t.length ? t[n] + (t[n + 1] - t[n]) * r : t[n];
|
|
235
|
+
}, Fe = (t) => {
|
|
236
|
+
const o = Ot(t).sort((d, u) => d - u);
|
|
237
|
+
if (o.length === 0) return null;
|
|
238
|
+
const e = Wt(o, 0.25), n = Wt(o, 0.75), r = (n - e) * 1.5, i = o.filter((d) => d >= e - r && d <= n + r);
|
|
239
|
+
return {
|
|
240
|
+
count: o.length,
|
|
241
|
+
min: o[0],
|
|
242
|
+
q1: e,
|
|
243
|
+
median: Wt(o, 0.5),
|
|
244
|
+
q3: n,
|
|
245
|
+
max: o[o.length - 1],
|
|
246
|
+
whiskerLow: i[0] ?? e,
|
|
247
|
+
whiskerHigh: i[i.length - 1] ?? n,
|
|
248
|
+
outliers: o.filter((d) => d < e - r || d > n + r)
|
|
249
|
+
};
|
|
250
|
+
}, Re = (t, o) => {
|
|
251
|
+
const e = Ot(t);
|
|
252
|
+
if (e.length === 0) return [];
|
|
253
|
+
const [n, r] = yt(e);
|
|
254
|
+
if (n === r) return [{ from: n, to: n + 1, count: e.length }];
|
|
255
|
+
const i = o ?? Math.ceil(Math.log2(e.length)) + 1, d = Zt(n, r, Math.max(1, i)), u = Math.floor(n / d) * d, k = Math.max(1, Math.ceil((r - u) / d - 1e-9)), T = Array.from({ length: k }, (A, I) => ({
|
|
256
|
+
from: u + I * d,
|
|
257
|
+
to: u + (I + 1) * d,
|
|
258
|
+
count: 0
|
|
259
|
+
}));
|
|
260
|
+
for (const A of e) {
|
|
261
|
+
const I = Math.min(T.length - 1, Math.floor((A - u) / d));
|
|
262
|
+
T[I].count += 1;
|
|
263
|
+
}
|
|
264
|
+
return T;
|
|
265
|
+
}, Nt = (t) => typeof t == "number" && Number.isFinite(t) ? t : null, lt = { top: 12, right: 16, bottom: 28, minLeft: 32 }, Se = (t, o) => {
|
|
266
|
+
const e = t.map(() => 0), n = t.map(() => 0), r = {};
|
|
267
|
+
for (const i of o)
|
|
268
|
+
r[i] = t.map((d, u) => {
|
|
269
|
+
const k = Nt(d[i]) ?? 0;
|
|
270
|
+
if (k >= 0) {
|
|
271
|
+
const A = e[u];
|
|
272
|
+
return e[u] += k, { base: A, top: e[u] };
|
|
273
|
+
}
|
|
274
|
+
const T = n[u];
|
|
275
|
+
return n[u] += k, { base: T, top: n[u] };
|
|
276
|
+
});
|
|
277
|
+
return r;
|
|
278
|
+
}, He = (t) => {
|
|
279
|
+
const { rows: o, xKey: e, series: n, width: r, height: i, isStacked: d, curve: u, formatX: k } = t, T = n.some((v) => v.type === "bar"), I = (T && n.every((v) => v.type === "bar") ? t.orientation : "vertical") === "horizontal", g = o.map((v) => v[e]), R = !T && !I && g.length > 1 && g.every((v) => Nt(v) !== null), z = {};
|
|
280
|
+
if (d)
|
|
281
|
+
for (const v of ["left", "right"])
|
|
282
|
+
for (const B of ["bar", "area"]) {
|
|
283
|
+
const W = n.filter((Q) => (Q.axis ?? "left") === v && Q.type === B).map((Q) => Q.key);
|
|
284
|
+
Object.assign(z, Se(o, W));
|
|
285
|
+
}
|
|
286
|
+
const S = (v, B) => {
|
|
287
|
+
if (z[v]) return z[v][B];
|
|
288
|
+
const W = Nt(o[B][v]);
|
|
289
|
+
return W === null ? null : { base: 0, top: W };
|
|
290
|
+
}, q = (v) => {
|
|
291
|
+
const B = n.filter((dt) => (dt.axis ?? "left") === v);
|
|
292
|
+
if (B.length === 0) return null;
|
|
293
|
+
let W = Number.POSITIVE_INFINITY, Q = Number.NEGATIVE_INFINITY;
|
|
294
|
+
for (const dt of B)
|
|
295
|
+
for (let Mt = 0; Mt < o.length; Mt += 1) {
|
|
296
|
+
const mt = S(dt.key, Mt);
|
|
297
|
+
mt && (W = Math.min(W, mt.top, mt.base), Q = Math.max(Q, mt.top, mt.base));
|
|
298
|
+
}
|
|
299
|
+
if (B.some((dt) => dt.type !== "line") && (W = Math.min(W, 0), Q = Math.max(Q, 0)), !Number.isFinite(W) || !Number.isFinite(Q)) return [0, 1];
|
|
300
|
+
const [st, K] = v === "left" ? t.domain ?? [void 0, void 0] : [void 0, void 0], tt = At(st ?? W, K ?? Q);
|
|
301
|
+
return [st ?? tt[0], K ?? tt[1]];
|
|
302
|
+
}, D = q("left") ?? [0, 1], N = q("right"), C = N !== null && !I, P = t.formatLeft(ct(D[0], D[1], 5)), M = N ? t.formatRight(ct(N[0], N[1], 5)) : [], w = o.map((v) => k(v[e])), h = I ? Math.min(r * 0.4, Math.max(lt.minLeft, ...w.map(ut)) + 12) : Math.max(lt.minLeft, ...P.map(ut)) + 10, p = C ? Math.max(lt.minLeft, ...M.map(ut)) + 10 : lt.right, a = {
|
|
303
|
+
left: h,
|
|
304
|
+
top: lt.top,
|
|
305
|
+
right: Math.max(h + 1, r - p),
|
|
306
|
+
bottom: Math.max(lt.top + 1, i - lt.bottom),
|
|
307
|
+
width: Math.max(1, r - p - h),
|
|
308
|
+
height: Math.max(1, i - lt.bottom - lt.top)
|
|
309
|
+
}, l = I ? [a.top, a.bottom] : [a.left, a.right], c = I ? [a.left, a.right] : [a.bottom, a.top], s = pt(D, c), f = N ? pt(N, c) : s, b = (v) => (v.axis ?? "left") === "right" && N ? f : s;
|
|
310
|
+
let $, y = 0, _ = null;
|
|
311
|
+
if (R) {
|
|
312
|
+
const v = g.map((B) => Nt(B));
|
|
313
|
+
_ = pt(yt(v), l), $ = v.map(_);
|
|
314
|
+
} else {
|
|
315
|
+
const v = Dt(
|
|
316
|
+
o.map((B, W) => String(W)),
|
|
317
|
+
l,
|
|
318
|
+
T ? { paddingInner: 0.24, paddingOuter: 0.12 } : { paddingInner: 0, paddingOuter: 0 }
|
|
319
|
+
);
|
|
320
|
+
y = v.bandwidth, $ = o.map((B, W) => v(String(W)) + v.bandwidth / 2);
|
|
321
|
+
}
|
|
322
|
+
const G = (v, B) => I ? { x: B, y: v } : { x: v, y: B }, H = [], j = n.filter((v) => v.type === "bar"), Y = d ? 1 : Math.max(1, j.length), O = Y > 1 ? Math.min(2, y * 0.04) : 0, x = Math.max(1, (y - O * (Y - 1)) / Y);
|
|
323
|
+
j.forEach((v, B) => {
|
|
324
|
+
const W = b(v), Q = d ? 0 : B;
|
|
325
|
+
o.forEach((st, K) => {
|
|
326
|
+
const tt = S(v.key, K);
|
|
327
|
+
if (!tt || tt.top === tt.base) return;
|
|
328
|
+
const dt = $[K] - y / 2 + Q * (x + O), Mt = W(tt.base), mt = W(tt.top), Jt = Math.min(Mt, mt), Kt = Math.max(1, Math.abs(mt - Mt));
|
|
329
|
+
H.push(
|
|
330
|
+
I ? {
|
|
331
|
+
key: v.key,
|
|
332
|
+
index: K,
|
|
333
|
+
tone: v.tone,
|
|
334
|
+
x: Jt,
|
|
335
|
+
y: dt,
|
|
336
|
+
width: Kt,
|
|
337
|
+
height: x
|
|
338
|
+
} : {
|
|
339
|
+
key: v.key,
|
|
340
|
+
index: K,
|
|
341
|
+
tone: v.tone,
|
|
342
|
+
x: dt,
|
|
343
|
+
y: Jt,
|
|
344
|
+
width: x,
|
|
345
|
+
height: Kt
|
|
346
|
+
}
|
|
347
|
+
);
|
|
348
|
+
});
|
|
349
|
+
});
|
|
350
|
+
const F = {}, E = [], U = [];
|
|
351
|
+
for (const v of n) {
|
|
352
|
+
if (v.type === "bar") continue;
|
|
353
|
+
const B = b(v), W = o.map((Q, st) => {
|
|
354
|
+
const K = S(v.key, st);
|
|
355
|
+
return K ? G($[st], B(K.top)) : null;
|
|
356
|
+
});
|
|
357
|
+
if (F[v.key] = W, v.type === "area") {
|
|
358
|
+
const Q = o.map((st, K) => {
|
|
359
|
+
const tt = S(v.key, K);
|
|
360
|
+
return tt ? G($[K], B(tt.base)) : null;
|
|
361
|
+
});
|
|
362
|
+
U.push({ key: v.key, tone: v.tone, d: Ie(W, Q, u) });
|
|
363
|
+
}
|
|
364
|
+
E.push({ key: v.key, tone: v.tone, d: Te(W, u) });
|
|
365
|
+
}
|
|
366
|
+
const ht = o.map((v, B) => {
|
|
367
|
+
let W = null;
|
|
368
|
+
for (const st of n) {
|
|
369
|
+
const K = S(st.key, B);
|
|
370
|
+
if (!K) continue;
|
|
371
|
+
const tt = b(st)(K.top);
|
|
372
|
+
W = W === null ? tt : I ? Math.max(W, tt) : Math.min(W, tt);
|
|
373
|
+
}
|
|
374
|
+
const Q = I ? a.left : a.bottom;
|
|
375
|
+
return G($[B], W ?? Q);
|
|
376
|
+
}), It = (v, B, W) => vt(
|
|
377
|
+
ct(
|
|
378
|
+
B[0],
|
|
379
|
+
B[1],
|
|
380
|
+
I ? Math.max(2, Math.floor(a.width / 90)) : Math.max(2, Math.floor(a.height / 48))
|
|
381
|
+
),
|
|
382
|
+
v,
|
|
383
|
+
W
|
|
384
|
+
), Me = _ ? ct(_.domain[0], _.domain[1], Math.max(2, Math.floor(a.width / 90))).map(
|
|
385
|
+
(v) => ({
|
|
386
|
+
position: _(v),
|
|
387
|
+
label: k(v)
|
|
388
|
+
})
|
|
389
|
+
) : o.map((v, B) => ({
|
|
390
|
+
position: $[B],
|
|
391
|
+
label: I ? Gt(w[B], h - 12) : w[B]
|
|
392
|
+
}));
|
|
393
|
+
return {
|
|
394
|
+
zero: D[0] < 0 && D[1] > 0 ? s(0) : null,
|
|
395
|
+
area: a,
|
|
396
|
+
centers: $,
|
|
397
|
+
bandwidth: y,
|
|
398
|
+
isContinuous: R,
|
|
399
|
+
categoryTicks: Me,
|
|
400
|
+
leftTicks: It(s, D, t.formatLeft),
|
|
401
|
+
rightTicks: C && N ? It(f, N, t.formatRight) : [],
|
|
402
|
+
hasRightAxis: C,
|
|
403
|
+
lines: E,
|
|
404
|
+
areas: U,
|
|
405
|
+
bars: H,
|
|
406
|
+
points: F,
|
|
407
|
+
anchors: ht
|
|
408
|
+
};
|
|
409
|
+
}, oe = (...t) => {
|
|
410
|
+
let o = "";
|
|
411
|
+
for (const e of t)
|
|
412
|
+
e && (o = o === "" ? e : `${o} ${e}`);
|
|
413
|
+
return o;
|
|
414
|
+
}, se = [
|
|
415
|
+
"cat-1",
|
|
416
|
+
"cat-2",
|
|
417
|
+
"cat-3",
|
|
418
|
+
"cat-4",
|
|
419
|
+
"cat-5",
|
|
420
|
+
"series-2"
|
|
421
|
+
], St = (t, o) => o ?? se[t % se.length], Z = (t) => t === "muted" ? "var(--ui-text-3)" : `var(--ui-${t})`, Le = "ui-chart-iR-5u", Ee = "ui-chart__canvas-4wf8o", ze = "ui-chart__svg-yC5iw", Pe = "ui-chart__overlay-kbXEv", De = "ui-chart__tooltip-wbhLY", Ge = "ui-chart__tooltipTitle-j-1Nw", qe = "ui-chart__tooltipRow-phors", Oe = "ui-chart__tooltipLabel-72x80", Be = "ui-chart__tooltipValue-caeby", We = "ui-chart__swatch--mk77", Ve = "ui-chart__legend-EhXcQ", je = "ui-chart__legendItem--AaGe", Xe = "ui-chart__srOnly-Oyem2", J = {
|
|
422
|
+
chart: Le,
|
|
423
|
+
chart__canvas: Ee,
|
|
424
|
+
chart__svg: ze,
|
|
425
|
+
chart__overlay: Pe,
|
|
426
|
+
chart__tooltip: De,
|
|
427
|
+
chart__tooltipTitle: Ge,
|
|
428
|
+
chart__tooltipRow: qe,
|
|
429
|
+
chart__tooltipLabel: Oe,
|
|
430
|
+
chart__tooltipValue: Be,
|
|
431
|
+
chart__swatch: We,
|
|
432
|
+
chart__legend: Ve,
|
|
433
|
+
chart__legendItem: je,
|
|
434
|
+
"chart__legendItem--hidden": "ui-chart__legendItem--hidden-D3li8",
|
|
435
|
+
chart__srOnly: Xe
|
|
436
|
+
}, ae = 12, gt = ({
|
|
437
|
+
label: t,
|
|
438
|
+
description: o,
|
|
439
|
+
containerRef: e,
|
|
440
|
+
width: n,
|
|
441
|
+
height: r,
|
|
442
|
+
plot: i,
|
|
443
|
+
overlay: d,
|
|
444
|
+
underlay: u,
|
|
445
|
+
itemCount: k,
|
|
446
|
+
columns: T,
|
|
447
|
+
pick: A,
|
|
448
|
+
tooltip: I,
|
|
449
|
+
anchor: g,
|
|
450
|
+
tooltipSide: R = "inward",
|
|
451
|
+
announce: z,
|
|
452
|
+
table: S,
|
|
453
|
+
legend: q,
|
|
454
|
+
className: D,
|
|
455
|
+
testId: N
|
|
456
|
+
}) => {
|
|
457
|
+
const C = pe(), P = $e(), [M, w] = Tt(null), h = Pt(null), p = Pt(null), a = Pt(null);
|
|
458
|
+
te(() => {
|
|
459
|
+
M !== null && M >= k && w(k > 0 ? k - 1 : null);
|
|
460
|
+
}, [M, k]), te(
|
|
461
|
+
() => () => {
|
|
462
|
+
h.current !== null && cancelAnimationFrame(h.current);
|
|
463
|
+
},
|
|
464
|
+
[]
|
|
465
|
+
);
|
|
466
|
+
const l = et(
|
|
467
|
+
(y) => {
|
|
468
|
+
const _ = y.currentTarget.getBoundingClientRect();
|
|
469
|
+
a.current = { x: y.clientX - _.left, y: y.clientY - _.top }, h.current === null && (h.current = requestAnimationFrame(() => {
|
|
470
|
+
h.current = null;
|
|
471
|
+
const G = a.current;
|
|
472
|
+
G && w(A(G.x, G.y));
|
|
473
|
+
}));
|
|
474
|
+
},
|
|
475
|
+
[A]
|
|
476
|
+
), c = (y) => {
|
|
477
|
+
const _ = Math.min(k - 1, Math.max(0, y));
|
|
478
|
+
w(_), P(z(_));
|
|
479
|
+
}, s = (y) => {
|
|
480
|
+
if (k === 0) return;
|
|
481
|
+
const _ = M ?? -1, G = T ?? 1, H = y.key === "ArrowRight" ? _ + 1 : y.key === "ArrowLeft" ? Math.max(0, _ - 1) : y.key === "ArrowDown" ? _ < 0 ? 0 : _ + G : y.key === "ArrowUp" ? Math.max(0, _ - G) : y.key === "Home" ? 0 : y.key === "End" ? k - 1 : null;
|
|
482
|
+
if (y.key === "Escape" && M !== null) {
|
|
483
|
+
y.preventDefault(), w(null);
|
|
484
|
+
return;
|
|
485
|
+
}
|
|
486
|
+
H !== null && (y.preventDefault(), c(H));
|
|
487
|
+
}, f = M === null ? null : I(M), b = M === null ? null : g(M), $ = b == null ? void 0 : b.x;
|
|
488
|
+
return ye(() => {
|
|
489
|
+
const y = p.current;
|
|
490
|
+
if (!y || $ === void 0) return;
|
|
491
|
+
const _ = y.offsetWidth, G = $ > n / 2, H = R === "outward" ? !G : G, j = $ - ae - _, Y = $ + ae, O = j >= 0, x = Y + _ <= n, F = R === "outward" ? H ? j : Y : H ? O || !x ? j : Y : x || !O ? Y : j;
|
|
492
|
+
y.style.left = `${Math.min(Math.max(0, F), Math.max(0, n - _))}px`;
|
|
493
|
+
}, [M, $, n, R]), /* @__PURE__ */ X("figure", { className: oe(J.chart, D), "data-testid": N, children: [
|
|
494
|
+
/* @__PURE__ */ X("div", { ref: e, className: J.chart__canvas, style: { blockSize: r }, children: [
|
|
495
|
+
/* @__PURE__ */ X(
|
|
496
|
+
"svg",
|
|
497
|
+
{
|
|
498
|
+
className: J.chart__svg,
|
|
499
|
+
width: n,
|
|
500
|
+
height: r,
|
|
501
|
+
viewBox: `0 0 ${n} ${r}`,
|
|
502
|
+
role: "img",
|
|
503
|
+
"aria-label": t,
|
|
504
|
+
"aria-describedby": o ? C : void 0,
|
|
505
|
+
tabIndex: k > 0 ? 0 : void 0,
|
|
506
|
+
onPointerMove: l,
|
|
507
|
+
onPointerDown: l,
|
|
508
|
+
onPointerLeave: () => w(null),
|
|
509
|
+
onKeyDown: s,
|
|
510
|
+
onBlur: () => w(null),
|
|
511
|
+
children: [
|
|
512
|
+
M !== null && u && /* @__PURE__ */ m("g", { className: J.chart__overlay, children: u(M) }),
|
|
513
|
+
i,
|
|
514
|
+
M !== null && /* @__PURE__ */ m("g", { className: J.chart__overlay, children: d(M) })
|
|
515
|
+
]
|
|
516
|
+
}
|
|
517
|
+
),
|
|
518
|
+
f && b && /* Okunan karşılığı duyuru ve tablo; ipucu yalnızca görsel. */
|
|
519
|
+
/* @__PURE__ */ X(
|
|
520
|
+
"div",
|
|
521
|
+
{
|
|
522
|
+
ref: p,
|
|
523
|
+
"aria-hidden": !0,
|
|
524
|
+
className: J.chart__tooltip,
|
|
525
|
+
style: { insetBlockStart: Math.max(24, Math.min(b.y, r - 24)) },
|
|
526
|
+
children: [
|
|
527
|
+
f.title && /* @__PURE__ */ m("span", { className: J.chart__tooltipTitle, children: f.title }),
|
|
528
|
+
f.rows.map((y) => /* @__PURE__ */ X("span", { className: J.chart__tooltipRow, children: [
|
|
529
|
+
y.tone && /* @__PURE__ */ m(
|
|
530
|
+
"span",
|
|
531
|
+
{
|
|
532
|
+
className: J.chart__swatch,
|
|
533
|
+
style: { backgroundColor: Z(y.tone) }
|
|
534
|
+
}
|
|
535
|
+
),
|
|
536
|
+
/* @__PURE__ */ m("span", { className: J.chart__tooltipLabel, children: y.label }),
|
|
537
|
+
/* @__PURE__ */ m("span", { className: J.chart__tooltipValue, children: y.value })
|
|
538
|
+
] }, y.id))
|
|
539
|
+
]
|
|
540
|
+
}
|
|
541
|
+
)
|
|
542
|
+
] }),
|
|
543
|
+
q && q.entries.length > 1 && /* @__PURE__ */ m("ul", { className: J.chart__legend, children: q.entries.map((y) => {
|
|
544
|
+
const _ = q.hidden.has(y.id);
|
|
545
|
+
return /* @__PURE__ */ m("li", { children: /* @__PURE__ */ X(
|
|
546
|
+
"button",
|
|
547
|
+
{
|
|
548
|
+
type: "button",
|
|
549
|
+
className: oe(
|
|
550
|
+
J.chart__legendItem,
|
|
551
|
+
_ && J["chart__legendItem--hidden"]
|
|
552
|
+
),
|
|
553
|
+
"aria-pressed": !_,
|
|
554
|
+
onClick: () => q.onToggle(y.id),
|
|
555
|
+
children: [
|
|
556
|
+
/* @__PURE__ */ m(Ye, { tone: y.tone, isHidden: _ }),
|
|
557
|
+
y.label
|
|
558
|
+
]
|
|
559
|
+
}
|
|
560
|
+
) }, y.id);
|
|
561
|
+
}) }),
|
|
562
|
+
o && /* @__PURE__ */ m("p", { id: C, className: J.chart__srOnly, children: o }),
|
|
563
|
+
/* @__PURE__ */ m("div", { className: J.chart__srOnly, children: /* @__PURE__ */ X("table", { children: [
|
|
564
|
+
/* @__PURE__ */ m("caption", { children: t }),
|
|
565
|
+
/* @__PURE__ */ m("thead", { children: /* @__PURE__ */ m("tr", { children: S.columns.map((y, _) => /* @__PURE__ */ m("th", { scope: "col", children: y }, _)) }) }),
|
|
566
|
+
/* @__PURE__ */ m("tbody", { children: S.rows.map((y, _) => /* @__PURE__ */ m("tr", { children: y.map(
|
|
567
|
+
(G, H) => H === 0 ? /* @__PURE__ */ m("th", { scope: "row", children: G }, H) : /* @__PURE__ */ m("td", { children: G }, H)
|
|
568
|
+
) }, _)) })
|
|
569
|
+
] }) })
|
|
570
|
+
] });
|
|
571
|
+
}, Ye = ({ tone: t, isHidden: o }) => /* @__PURE__ */ m(
|
|
572
|
+
"span",
|
|
573
|
+
{
|
|
574
|
+
"aria-hidden": !0,
|
|
575
|
+
className: J.chart__swatch,
|
|
576
|
+
style: o ? { backgroundColor: "transparent", boxShadow: `inset 0 0 0 2px ${Z(t)}` } : { backgroundColor: Z(t) }
|
|
577
|
+
}
|
|
578
|
+
), re = /* @__PURE__ */ new Map(), _e = (t, o) => {
|
|
579
|
+
const e = `${t ?? ""}|${JSON.stringify(o)}`;
|
|
580
|
+
let n = re.get(e);
|
|
581
|
+
return n || (n = new Intl.NumberFormat(t, o), re.set(e, n)), n;
|
|
582
|
+
}, ce = (t) => {
|
|
583
|
+
if (t === 0 || !Number.isFinite(t)) return null;
|
|
584
|
+
const [o, e] = Math.abs(t).toExponential(9).split("e"), n = Number(e);
|
|
585
|
+
return { first: n, last: n - (o.replace(".", "").replace(/0+$/, "").length - 1) };
|
|
586
|
+
}, Ht = (t) => (o) => {
|
|
587
|
+
const e = o.reduce(
|
|
588
|
+
(n, r) => {
|
|
589
|
+
var i;
|
|
590
|
+
return Math.min(n, ((i = ce(r)) == null ? void 0 : i.last) ?? n);
|
|
591
|
+
},
|
|
592
|
+
Number.POSITIVE_INFINITY
|
|
593
|
+
);
|
|
594
|
+
return o.map(
|
|
595
|
+
(n) => {
|
|
596
|
+
var r;
|
|
597
|
+
return _e(t, {
|
|
598
|
+
notation: "compact",
|
|
599
|
+
maximumSignificantDigits: Math.min(
|
|
600
|
+
21,
|
|
601
|
+
Math.max(1, (((r = ce(n)) == null ? void 0 : r.first) ?? 0) - e + 1)
|
|
602
|
+
)
|
|
603
|
+
}).format(n);
|
|
604
|
+
}
|
|
605
|
+
);
|
|
606
|
+
}, bt = (t) => (o) => _e(t, { maximumFractionDigits: 2 }).format(o), Ue = 640, Ze = typeof window > "u" ? () => {
|
|
607
|
+
} : ye, _t = (t) => {
|
|
608
|
+
const o = Pt(null), [e, n] = Tt(t ?? Ue);
|
|
609
|
+
return Ze(() => {
|
|
610
|
+
if (t !== void 0) {
|
|
611
|
+
n(t);
|
|
612
|
+
return;
|
|
613
|
+
}
|
|
614
|
+
const r = o.current;
|
|
615
|
+
if (!r) return;
|
|
616
|
+
const i = (u) => {
|
|
617
|
+
const k = Math.floor(u);
|
|
618
|
+
k > 0 && n((T) => T === k ? T : k);
|
|
619
|
+
};
|
|
620
|
+
if (i(r.clientWidth), typeof ResizeObserver > "u") return;
|
|
621
|
+
const d = new ResizeObserver(([u]) => i(u.contentRect.width));
|
|
622
|
+
return d.observe(r), () => d.disconnect();
|
|
623
|
+
}, [t]), [o, e];
|
|
624
|
+
}, Qe = "ui-line-CLpqU", Je = "ui-area-LkWXB", Ke = "ui-bar-260Bd", tn = "ui-point-Vc-kX", en = "ui-marker-G-xZb", nn = "ui-crosshair-nV-xX", on = "ui-band-jnG7s", sn = "ui-zero-GpHvw", at = {
|
|
625
|
+
line: Qe,
|
|
626
|
+
area: Je,
|
|
627
|
+
bar: Ke,
|
|
628
|
+
point: tn,
|
|
629
|
+
marker: en,
|
|
630
|
+
crosshair: nn,
|
|
631
|
+
band: on,
|
|
632
|
+
zero: sn
|
|
633
|
+
}, an = 280, ie = "—", rn = ({
|
|
634
|
+
label: t,
|
|
635
|
+
description: o,
|
|
636
|
+
data: e,
|
|
637
|
+
xKey: n,
|
|
638
|
+
xLabel: r,
|
|
639
|
+
series: i,
|
|
640
|
+
height: d = an,
|
|
641
|
+
width: u,
|
|
642
|
+
isStacked: k = !1,
|
|
643
|
+
orientation: T = "vertical",
|
|
644
|
+
curve: A = "monotone",
|
|
645
|
+
hasPoints: I = !1,
|
|
646
|
+
formatX: g = String,
|
|
647
|
+
formatValue: R,
|
|
648
|
+
domain: z,
|
|
649
|
+
className: S,
|
|
650
|
+
testId: q
|
|
651
|
+
}) => {
|
|
652
|
+
const { labels: D } = xt(), N = D == null ? void 0 : D.locale, [C, P] = _t(u), [M, w] = Tt(() => /* @__PURE__ */ new Set()), h = L(() => R ?? bt(N), [R, N]), p = L(() => Ht(N), [N]), a = et(
|
|
653
|
+
(x) => x == null ? "" : g(x),
|
|
654
|
+
[g]
|
|
655
|
+
), l = L(
|
|
656
|
+
() => i.map((x, F) => ({ ...x, tone: St(F, x.tone) })),
|
|
657
|
+
[i]
|
|
658
|
+
), c = L(() => l.filter((x) => !M.has(x.key)), [l, M]), s = L(
|
|
659
|
+
() => He({
|
|
660
|
+
rows: e,
|
|
661
|
+
xKey: n,
|
|
662
|
+
series: c,
|
|
663
|
+
width: P,
|
|
664
|
+
height: d,
|
|
665
|
+
isStacked: k,
|
|
666
|
+
orientation: T,
|
|
667
|
+
curve: A,
|
|
668
|
+
formatX: a,
|
|
669
|
+
formatLeft: p,
|
|
670
|
+
formatRight: p,
|
|
671
|
+
domain: z
|
|
672
|
+
}),
|
|
673
|
+
[
|
|
674
|
+
e,
|
|
675
|
+
n,
|
|
676
|
+
c,
|
|
677
|
+
P,
|
|
678
|
+
d,
|
|
679
|
+
k,
|
|
680
|
+
T,
|
|
681
|
+
A,
|
|
682
|
+
a,
|
|
683
|
+
p,
|
|
684
|
+
z
|
|
685
|
+
]
|
|
686
|
+
), f = T === "horizontal" && c.length > 0 && c.every((x) => x.type === "bar"), b = c.some((x) => x.type === "bar"), $ = L(() => {
|
|
687
|
+
const x = s.centers.map((F, E) => ({ center: F, index: E })).sort((F, E) => F.center - E.center);
|
|
688
|
+
return { centers: x.map((F) => F.center), indices: x.map((F) => F.index) };
|
|
689
|
+
}, [s.centers]), y = et(
|
|
690
|
+
(x, F) => {
|
|
691
|
+
const { area: E } = s;
|
|
692
|
+
if (x < E.left - 4 || x > E.right + 4 || F < E.top - 4 || F > E.bottom + 4)
|
|
693
|
+
return null;
|
|
694
|
+
const U = Ce($.centers, f ? F : x);
|
|
695
|
+
return U < 0 ? null : $.indices[U];
|
|
696
|
+
},
|
|
697
|
+
[s, $, f]
|
|
698
|
+
), _ = et(
|
|
699
|
+
(x) => {
|
|
700
|
+
var F;
|
|
701
|
+
return {
|
|
702
|
+
title: a((F = e[x]) == null ? void 0 : F[n]),
|
|
703
|
+
rows: c.map((E) => {
|
|
704
|
+
var ht;
|
|
705
|
+
const U = Nt((ht = e[x]) == null ? void 0 : ht[E.key]);
|
|
706
|
+
return {
|
|
707
|
+
id: E.key,
|
|
708
|
+
label: E.label,
|
|
709
|
+
tone: E.tone,
|
|
710
|
+
value: U === null ? ie : (E.format ?? h)(U)
|
|
711
|
+
};
|
|
712
|
+
})
|
|
713
|
+
};
|
|
714
|
+
},
|
|
715
|
+
[e, n, c, h, a]
|
|
716
|
+
), G = et(
|
|
717
|
+
(x) => {
|
|
718
|
+
const F = _(x);
|
|
719
|
+
return `${F.title}: ${F.rows.map((E) => `${E.label} ${E.value}`).join(", ")}`;
|
|
720
|
+
},
|
|
721
|
+
[_]
|
|
722
|
+
), H = L(
|
|
723
|
+
() => ({
|
|
724
|
+
columns: [r ?? n, ...l.map((x) => x.label)],
|
|
725
|
+
rows: e.map((x) => [
|
|
726
|
+
a(x[n]),
|
|
727
|
+
...l.map((F) => {
|
|
728
|
+
const E = Nt(x[F.key]);
|
|
729
|
+
return E === null ? ie : (F.format ?? h)(E);
|
|
730
|
+
})
|
|
731
|
+
])
|
|
732
|
+
}),
|
|
733
|
+
[e, n, r, l, h, a]
|
|
734
|
+
), j = L(
|
|
735
|
+
() => /* @__PURE__ */ X("g", { children: [
|
|
736
|
+
f ? /* @__PURE__ */ X(Ft, { children: [
|
|
737
|
+
/* @__PURE__ */ m(ft, { area: s.area, ticks: s.leftTicks, side: "bottom", hasGrid: !0 }),
|
|
738
|
+
/* @__PURE__ */ m(Yt, { area: s.area, ticks: s.categoryTicks, side: "left" })
|
|
739
|
+
] }) : /* @__PURE__ */ X(Ft, { children: [
|
|
740
|
+
/* @__PURE__ */ m(ft, { area: s.area, ticks: s.leftTicks, side: "left", hasGrid: !0 }),
|
|
741
|
+
s.hasRightAxis && /* @__PURE__ */ m(ft, { area: s.area, ticks: s.rightTicks, side: "right" }),
|
|
742
|
+
/* @__PURE__ */ m(Yt, { area: s.area, ticks: s.categoryTicks, side: "bottom" })
|
|
743
|
+
] }),
|
|
744
|
+
s.zero !== null && (f ? /* @__PURE__ */ m(
|
|
745
|
+
"line",
|
|
746
|
+
{
|
|
747
|
+
className: at.zero,
|
|
748
|
+
x1: s.zero,
|
|
749
|
+
x2: s.zero,
|
|
750
|
+
y1: s.area.top,
|
|
751
|
+
y2: s.area.bottom
|
|
752
|
+
}
|
|
753
|
+
) : /* @__PURE__ */ m(
|
|
754
|
+
"line",
|
|
755
|
+
{
|
|
756
|
+
className: at.zero,
|
|
757
|
+
x1: s.area.left,
|
|
758
|
+
x2: s.area.right,
|
|
759
|
+
y1: s.zero,
|
|
760
|
+
y2: s.zero
|
|
761
|
+
}
|
|
762
|
+
)),
|
|
763
|
+
s.areas.map((x) => /* @__PURE__ */ m(
|
|
764
|
+
"path",
|
|
765
|
+
{
|
|
766
|
+
d: x.d,
|
|
767
|
+
className: at.area,
|
|
768
|
+
style: { fill: `color-mix(in srgb, ${Z(x.tone)} 18%, transparent)` }
|
|
769
|
+
},
|
|
770
|
+
`area-${x.key}`
|
|
771
|
+
)),
|
|
772
|
+
s.bars.map((x) => /* @__PURE__ */ m(
|
|
773
|
+
"rect",
|
|
774
|
+
{
|
|
775
|
+
className: at.bar,
|
|
776
|
+
x: x.x,
|
|
777
|
+
y: x.y,
|
|
778
|
+
width: x.width,
|
|
779
|
+
height: x.height,
|
|
780
|
+
rx: Math.min(3, x.width / 4, x.height / 4),
|
|
781
|
+
style: { fill: Z(x.tone) }
|
|
782
|
+
},
|
|
783
|
+
`bar-${x.key}-${x.index}`
|
|
784
|
+
)),
|
|
785
|
+
s.lines.map((x) => /* @__PURE__ */ m(
|
|
786
|
+
"path",
|
|
787
|
+
{
|
|
788
|
+
d: x.d,
|
|
789
|
+
className: at.line,
|
|
790
|
+
style: { stroke: Z(x.tone) }
|
|
791
|
+
},
|
|
792
|
+
`line-${x.key}`
|
|
793
|
+
)),
|
|
794
|
+
c.filter((x) => x.type !== "bar").flatMap(
|
|
795
|
+
(x) => (s.points[x.key] ?? []).map(
|
|
796
|
+
(F, E, U) => F && (I || !U[E - 1] && !U[E + 1]) ? /* @__PURE__ */ m(
|
|
797
|
+
"circle",
|
|
798
|
+
{
|
|
799
|
+
className: at.point,
|
|
800
|
+
cx: F.x,
|
|
801
|
+
cy: F.y,
|
|
802
|
+
r: 3,
|
|
803
|
+
style: { fill: Z(x.tone) }
|
|
804
|
+
},
|
|
805
|
+
`point-${x.key}-${E}`
|
|
806
|
+
) : null
|
|
807
|
+
)
|
|
808
|
+
)
|
|
809
|
+
] }),
|
|
810
|
+
[s, I, f, c]
|
|
811
|
+
), Y = et(
|
|
812
|
+
(x) => {
|
|
813
|
+
if (!b || s.bandwidth <= 0) return null;
|
|
814
|
+
const { area: F } = s, E = s.centers[x], U = s.bandwidth * 0.12;
|
|
815
|
+
return f ? /* @__PURE__ */ m(
|
|
816
|
+
"rect",
|
|
817
|
+
{
|
|
818
|
+
className: at.band,
|
|
819
|
+
x: F.left,
|
|
820
|
+
width: F.width,
|
|
821
|
+
y: E - s.bandwidth / 2 - U,
|
|
822
|
+
height: s.bandwidth + U * 2
|
|
823
|
+
}
|
|
824
|
+
) : /* @__PURE__ */ m(
|
|
825
|
+
"rect",
|
|
826
|
+
{
|
|
827
|
+
className: at.band,
|
|
828
|
+
y: F.top,
|
|
829
|
+
height: F.height,
|
|
830
|
+
x: E - s.bandwidth / 2 - U,
|
|
831
|
+
width: s.bandwidth + U * 2
|
|
832
|
+
}
|
|
833
|
+
);
|
|
834
|
+
},
|
|
835
|
+
[s, f, b]
|
|
836
|
+
), O = et(
|
|
837
|
+
(x) => {
|
|
838
|
+
const { area: F } = s, E = s.centers[x];
|
|
839
|
+
return /* @__PURE__ */ X(Ft, { children: [
|
|
840
|
+
!b && /* @__PURE__ */ m(
|
|
841
|
+
"line",
|
|
842
|
+
{
|
|
843
|
+
className: at.crosshair,
|
|
844
|
+
x1: E,
|
|
845
|
+
x2: E,
|
|
846
|
+
y1: F.top,
|
|
847
|
+
y2: F.bottom
|
|
848
|
+
}
|
|
849
|
+
),
|
|
850
|
+
c.filter((U) => U.type !== "bar").map((U) => {
|
|
851
|
+
var It;
|
|
852
|
+
const ht = (It = s.points[U.key]) == null ? void 0 : It[x];
|
|
853
|
+
return ht ? /* @__PURE__ */ m(
|
|
854
|
+
"circle",
|
|
855
|
+
{
|
|
856
|
+
className: at.marker,
|
|
857
|
+
cx: ht.x,
|
|
858
|
+
cy: ht.y,
|
|
859
|
+
r: 4.5,
|
|
860
|
+
style: { fill: Z(U.tone) }
|
|
861
|
+
},
|
|
862
|
+
U.key
|
|
863
|
+
) : null;
|
|
864
|
+
})
|
|
865
|
+
] });
|
|
866
|
+
},
|
|
867
|
+
[s, c, b]
|
|
868
|
+
);
|
|
869
|
+
return /* @__PURE__ */ m(
|
|
870
|
+
gt,
|
|
871
|
+
{
|
|
872
|
+
label: t,
|
|
873
|
+
description: o,
|
|
874
|
+
containerRef: C,
|
|
875
|
+
width: P,
|
|
876
|
+
height: d,
|
|
877
|
+
plot: j,
|
|
878
|
+
overlay: O,
|
|
879
|
+
underlay: Y,
|
|
880
|
+
itemCount: e.length,
|
|
881
|
+
pick: y,
|
|
882
|
+
tooltip: _,
|
|
883
|
+
anchor: (x) => s.anchors[x] ?? { x: 0, y: 0 },
|
|
884
|
+
announce: G,
|
|
885
|
+
table: H,
|
|
886
|
+
legend: {
|
|
887
|
+
entries: l.map((x) => ({ id: x.key, label: x.label, tone: x.tone })),
|
|
888
|
+
hidden: M,
|
|
889
|
+
onToggle: (x) => w((F) => {
|
|
890
|
+
const E = new Set(F);
|
|
891
|
+
return E.has(x) ? E.delete(x) : l.length - F.size > 1 && E.add(x), E;
|
|
892
|
+
})
|
|
893
|
+
},
|
|
894
|
+
className: S,
|
|
895
|
+
testId: q
|
|
896
|
+
}
|
|
897
|
+
);
|
|
898
|
+
}, Bt = ot(rn), cn = ({ series: t, ...o }) => {
|
|
899
|
+
const e = L(() => t.map((n) => ({ ...n, type: "line" })), [t]);
|
|
900
|
+
return /* @__PURE__ */ m(Bt, { ...o, series: e });
|
|
901
|
+
}, jn = /* @__PURE__ */ ot(/* @__PURE__ */ it(cn, "LineChart")), ln = ({ series: t, ...o }) => {
|
|
902
|
+
const e = L(() => t.map((n) => ({ ...n, type: "area" })), [t]);
|
|
903
|
+
return /* @__PURE__ */ m(Bt, { ...o, series: e });
|
|
904
|
+
}, Xn = /* @__PURE__ */ ot(/* @__PURE__ */ it(ln, "AreaChart")), hn = ({ series: t, ...o }) => {
|
|
905
|
+
const e = L(() => t.map((n) => ({ ...n, type: "bar" })), [t]);
|
|
906
|
+
return /* @__PURE__ */ m(Bt, { ...o, series: e });
|
|
907
|
+
}, Yn = /* @__PURE__ */ ot(/* @__PURE__ */ it(hn, "BarChart")), dn = (t) => /* @__PURE__ */ m(Bt, { ...t }), Un = /* @__PURE__ */ ot(
|
|
908
|
+
/* @__PURE__ */ it(dn, "ComposedChart")
|
|
909
|
+
), mn = "ui-slice-dFWuh", un = "ui-center__value-GnqKe", fn = "ui-center__label-DsgTV", Ct = {
|
|
910
|
+
slice: mn,
|
|
911
|
+
center__value: un,
|
|
912
|
+
center__label: fn
|
|
913
|
+
}, Lt = 6, le = 1.5, pn = ({
|
|
914
|
+
label: t,
|
|
915
|
+
description: o,
|
|
916
|
+
data: e,
|
|
917
|
+
variant: n = "donut",
|
|
918
|
+
centerValue: r,
|
|
919
|
+
centerLabel: i,
|
|
920
|
+
valueLabel: d,
|
|
921
|
+
height: u = 260,
|
|
922
|
+
width: k,
|
|
923
|
+
formatValue: T,
|
|
924
|
+
className: A,
|
|
925
|
+
testId: I
|
|
926
|
+
}) => {
|
|
927
|
+
const { labels: g } = xt(), [R, z] = _t(k), [S, q] = Tt(() => /* @__PURE__ */ new Set()), D = L(() => bt(g == null ? void 0 : g.locale), [g == null ? void 0 : g.locale]), N = T ?? D, C = L(
|
|
928
|
+
() => e.map((a, l) => ({ ...a, tone: St(l, a.tone) })),
|
|
929
|
+
[e]
|
|
930
|
+
), P = L(() => {
|
|
931
|
+
const a = C.filter(
|
|
932
|
+
(_) => !S.has(_.id) && Number.isFinite(_.value) && _.value > 0
|
|
933
|
+
), l = a.reduce((_, G) => _ + G.value, 0), c = z / 2, s = u / 2, f = Math.max(8, Math.min(z, u) / 2 - Lt - 4), b = n === "donut" ? f * 0.62 : 0;
|
|
934
|
+
let $ = 0;
|
|
935
|
+
const y = a.map((_) => {
|
|
936
|
+
const G = l > 0 ? _.value / l * Math.PI * 2 : 0, H = $;
|
|
937
|
+
return $ += G, { ..._, start: H, end: $, share: l > 0 ? _.value / l : 0 };
|
|
938
|
+
});
|
|
939
|
+
return { cx: c, cy: s, outer: f, inner: b, total: l, slices: y };
|
|
940
|
+
}, [C, S, z, u, n]), M = L(() => {
|
|
941
|
+
const a = new Intl.NumberFormat(g == null ? void 0 : g.locale, {
|
|
942
|
+
style: "percent",
|
|
943
|
+
maximumFractionDigits: 1
|
|
944
|
+
});
|
|
945
|
+
return (l) => a.format(l);
|
|
946
|
+
}, [g == null ? void 0 : g.locale]), w = L(() => {
|
|
947
|
+
const { cx: a, cy: l, outer: c, inner: s, slices: f, total: b } = P;
|
|
948
|
+
return /* @__PURE__ */ X("g", { children: [
|
|
949
|
+
f.map(($) => /* @__PURE__ */ m(
|
|
950
|
+
"path",
|
|
951
|
+
{
|
|
952
|
+
className: Ct.slice,
|
|
953
|
+
d: ee(a, l, c, s, $.start, $.end),
|
|
954
|
+
style: { fill: Z($.tone), strokeWidth: f.length > 1 ? le : 0 }
|
|
955
|
+
},
|
|
956
|
+
$.id
|
|
957
|
+
)),
|
|
958
|
+
n === "donut" && /* @__PURE__ */ X("g", { "aria-hidden": !0, className: Ct.center, children: [
|
|
959
|
+
/* @__PURE__ */ m(
|
|
960
|
+
"text",
|
|
961
|
+
{
|
|
962
|
+
className: Ct.center__value,
|
|
963
|
+
x: a,
|
|
964
|
+
y: i ? l - 4 : l,
|
|
965
|
+
dy: "0.32em",
|
|
966
|
+
textAnchor: "middle",
|
|
967
|
+
children: r ?? N(b)
|
|
968
|
+
}
|
|
969
|
+
),
|
|
970
|
+
i && /* @__PURE__ */ m(
|
|
971
|
+
"text",
|
|
972
|
+
{
|
|
973
|
+
className: Ct.center__label,
|
|
974
|
+
x: a,
|
|
975
|
+
y: l + 16,
|
|
976
|
+
dy: "0.32em",
|
|
977
|
+
textAnchor: "middle",
|
|
978
|
+
children: i
|
|
979
|
+
}
|
|
980
|
+
)
|
|
981
|
+
] })
|
|
982
|
+
] });
|
|
983
|
+
}, [P, n, r, i, N]), h = et(
|
|
984
|
+
(a, l) => {
|
|
985
|
+
const { cx: c, cy: s, outer: f, inner: b, slices: $ } = P, y = Math.hypot(a - c, l - s);
|
|
986
|
+
if (y > f + Lt || y < b) return null;
|
|
987
|
+
let _ = Math.atan2(a - c, -(l - s));
|
|
988
|
+
_ < 0 && (_ += Math.PI * 2);
|
|
989
|
+
const G = $.findIndex((H) => _ >= H.start && _ < H.end);
|
|
990
|
+
return G < 0 ? null : G;
|
|
991
|
+
},
|
|
992
|
+
[P]
|
|
993
|
+
), p = (a) => {
|
|
994
|
+
const l = P.slices[a];
|
|
995
|
+
return `${N(l.value)} (${M(l.share)})`;
|
|
996
|
+
};
|
|
997
|
+
return /* @__PURE__ */ m(
|
|
998
|
+
gt,
|
|
999
|
+
{
|
|
1000
|
+
label: t,
|
|
1001
|
+
description: o,
|
|
1002
|
+
containerRef: R,
|
|
1003
|
+
width: z,
|
|
1004
|
+
height: u,
|
|
1005
|
+
plot: w,
|
|
1006
|
+
overlay: (a) => {
|
|
1007
|
+
const { cx: l, cy: c, outer: s, inner: f, slices: b } = P, $ = b[a], y = ($.start + $.end) / 2, _ = nt(0, 0, Lt, y);
|
|
1008
|
+
return /* @__PURE__ */ m(
|
|
1009
|
+
"path",
|
|
1010
|
+
{
|
|
1011
|
+
className: Ct.slice,
|
|
1012
|
+
d: ee(l + _.x, c + _.y, s, f, $.start, $.end),
|
|
1013
|
+
style: { fill: Z($.tone), strokeWidth: le }
|
|
1014
|
+
}
|
|
1015
|
+
);
|
|
1016
|
+
},
|
|
1017
|
+
itemCount: P.slices.length,
|
|
1018
|
+
pick: h,
|
|
1019
|
+
tooltip: (a) => {
|
|
1020
|
+
const l = P.slices[a];
|
|
1021
|
+
return {
|
|
1022
|
+
rows: [{ id: l.id, label: l.label, value: p(a), tone: l.tone }]
|
|
1023
|
+
};
|
|
1024
|
+
},
|
|
1025
|
+
anchor: (a) => {
|
|
1026
|
+
const { cx: l, cy: c, outer: s, slices: f } = P, b = f[a];
|
|
1027
|
+
return nt(l, c, s + Lt, (b.start + b.end) / 2);
|
|
1028
|
+
},
|
|
1029
|
+
tooltipSide: "outward",
|
|
1030
|
+
announce: (a) => `${P.slices[a].label}: ${p(a)}`,
|
|
1031
|
+
table: {
|
|
1032
|
+
columns: [t, d],
|
|
1033
|
+
rows: C.map((a) => [
|
|
1034
|
+
a.label,
|
|
1035
|
+
Number.isFinite(a.value) ? N(a.value) : "—"
|
|
1036
|
+
])
|
|
1037
|
+
},
|
|
1038
|
+
legend: {
|
|
1039
|
+
entries: C.map((a) => ({ id: a.id, label: a.label, tone: a.tone })),
|
|
1040
|
+
hidden: S,
|
|
1041
|
+
onToggle: (a) => q((l) => {
|
|
1042
|
+
const c = new Set(l);
|
|
1043
|
+
return c.has(a) ? c.delete(a) : C.length - l.size > 1 && c.add(a), c;
|
|
1044
|
+
})
|
|
1045
|
+
},
|
|
1046
|
+
className: A,
|
|
1047
|
+
testId: I
|
|
1048
|
+
}
|
|
1049
|
+
);
|
|
1050
|
+
}, Zn = /* @__PURE__ */ ot(/* @__PURE__ */ it(pn, "PieChart")), Qt = (t, o, e, { top: n = 12, right: r = 16, bottom: i = 28 } = {}) => {
|
|
1051
|
+
const d = Math.max(32, ...e.map(ut)) + 10;
|
|
1052
|
+
return {
|
|
1053
|
+
left: d,
|
|
1054
|
+
top: n,
|
|
1055
|
+
right: Math.max(d + 1, t - r),
|
|
1056
|
+
bottom: Math.max(n + 1, o - i),
|
|
1057
|
+
width: Math.max(1, t - r - d),
|
|
1058
|
+
height: Math.max(1, o - n - i)
|
|
1059
|
+
};
|
|
1060
|
+
}, Rt = (t, o) => Math.max(2, Math.floor(t / (o ? 90 : 48))), yn = (t, o = 24) => {
|
|
1061
|
+
const e = /* @__PURE__ */ new Map(), n = (r, i) => `${r}:${i}`;
|
|
1062
|
+
return t.forEach((r, i) => {
|
|
1063
|
+
if (!Number.isFinite(r.x) || !Number.isFinite(r.y)) return;
|
|
1064
|
+
const d = n(Math.floor(r.x / o), Math.floor(r.y / o)), u = e.get(d);
|
|
1065
|
+
u ? u.push(i) : e.set(d, [i]);
|
|
1066
|
+
}), {
|
|
1067
|
+
nearest: (r, i, d) => {
|
|
1068
|
+
const u = Math.ceil(d / o), k = Math.floor(r / o), T = Math.floor(i / o);
|
|
1069
|
+
let A = null, I = d * d;
|
|
1070
|
+
for (let g = -u; g <= u; g += 1)
|
|
1071
|
+
for (let R = -u; R <= u; R += 1)
|
|
1072
|
+
for (const z of e.get(n(k + g, T + R)) ?? []) {
|
|
1073
|
+
const S = (t[z].x - r) ** 2 + (t[z].y - i) ** 2;
|
|
1074
|
+
S <= I && (I = S, A = z);
|
|
1075
|
+
}
|
|
1076
|
+
return A;
|
|
1077
|
+
}
|
|
1078
|
+
};
|
|
1079
|
+
}, xn = "ui-point-YKyMm", gn = "ui-marker-ToO1T", he = {
|
|
1080
|
+
point: xn,
|
|
1081
|
+
marker: gn
|
|
1082
|
+
}, $t = { plain: 4, min: 3, max: 16 }, bn = 22, _n = ({
|
|
1083
|
+
label: t,
|
|
1084
|
+
description: o,
|
|
1085
|
+
series: e,
|
|
1086
|
+
xLabel: n,
|
|
1087
|
+
yLabel: r,
|
|
1088
|
+
sizeLabel: i,
|
|
1089
|
+
height: d = 300,
|
|
1090
|
+
width: u,
|
|
1091
|
+
formatX: k,
|
|
1092
|
+
formatY: T,
|
|
1093
|
+
className: A,
|
|
1094
|
+
testId: I
|
|
1095
|
+
}) => {
|
|
1096
|
+
const { labels: g } = xt(), [R, z] = _t(u), [S, q] = Tt(() => /* @__PURE__ */ new Set()), D = L(() => bt(g == null ? void 0 : g.locale), [g == null ? void 0 : g.locale]), N = L(() => Ht(g == null ? void 0 : g.locale), [g == null ? void 0 : g.locale]), C = k ?? D, P = T ?? D, M = L(
|
|
1097
|
+
() => e.map((c, s) => ({ ...c, tone: St(s, c.tone) })),
|
|
1098
|
+
[e]
|
|
1099
|
+
), w = L(
|
|
1100
|
+
() => M.filter((c) => !S.has(c.id)).flatMap(
|
|
1101
|
+
(c) => c.data.filter((s) => Number.isFinite(s.x) && Number.isFinite(s.y)).map((s) => ({ ...s, series: c }))
|
|
1102
|
+
).sort((c, s) => c.x - s.x || c.y - s.y),
|
|
1103
|
+
[M, S]
|
|
1104
|
+
), h = L(() => {
|
|
1105
|
+
const c = At(...yt(w.map((O) => O.x))), s = At(...yt(w.map((O) => O.y))), f = ct(s[0], s[1], Rt(d, !1)), b = Qt(z, d, N(f), { right: 20 }), $ = pt(c, [b.left, b.right]), y = pt(s, [b.bottom, b.top]), _ = Ot(w.map((O) => O.size)), [G, H] = yt(_), j = (O) => O === void 0 || !Number.isFinite(O) || _.length === 0 ? $t.plain : H === G ? ($t.min + $t.max) / 2 : Math.sqrt(
|
|
1106
|
+
$t.min ** 2 + (O - G) / (H - G) * ($t.max ** 2 - $t.min ** 2)
|
|
1107
|
+
), Y = w.map((O) => ({
|
|
1108
|
+
...O,
|
|
1109
|
+
cx: $(O.x),
|
|
1110
|
+
cy: y(O.y),
|
|
1111
|
+
r: j(O.size)
|
|
1112
|
+
}));
|
|
1113
|
+
return {
|
|
1114
|
+
area: b,
|
|
1115
|
+
placed: Y,
|
|
1116
|
+
index: yn(Y.map((O) => ({ x: O.cx, y: O.cy }))),
|
|
1117
|
+
xTicks: vt(ct(c[0], c[1], Rt(b.width, !0)), $, N),
|
|
1118
|
+
yTicks: vt(f, y, N)
|
|
1119
|
+
};
|
|
1120
|
+
}, [w, z, d, N]), p = L(
|
|
1121
|
+
() => /* @__PURE__ */ X("g", { children: [
|
|
1122
|
+
/* @__PURE__ */ m(ft, { area: h.area, ticks: h.yTicks, side: "left", hasGrid: !0 }),
|
|
1123
|
+
/* @__PURE__ */ m(ft, { area: h.area, ticks: h.xTicks, side: "bottom", hasGrid: !0 }),
|
|
1124
|
+
h.placed.map((c, s) => /* @__PURE__ */ m(
|
|
1125
|
+
"circle",
|
|
1126
|
+
{
|
|
1127
|
+
className: he.point,
|
|
1128
|
+
cx: c.cx,
|
|
1129
|
+
cy: c.cy,
|
|
1130
|
+
r: c.r,
|
|
1131
|
+
style: {
|
|
1132
|
+
fill: `color-mix(in srgb, ${Z(c.series.tone)} 72%, transparent)`,
|
|
1133
|
+
stroke: Z(c.series.tone)
|
|
1134
|
+
}
|
|
1135
|
+
},
|
|
1136
|
+
s
|
|
1137
|
+
))
|
|
1138
|
+
] }),
|
|
1139
|
+
[h]
|
|
1140
|
+
), a = et(
|
|
1141
|
+
(c, s) => h.index.nearest(c, s, bn),
|
|
1142
|
+
[h]
|
|
1143
|
+
), l = (c) => {
|
|
1144
|
+
const s = h.placed[c];
|
|
1145
|
+
return {
|
|
1146
|
+
title: s.label ?? s.series.label,
|
|
1147
|
+
rows: [
|
|
1148
|
+
{ id: "series", label: s.series.label, value: "", tone: s.series.tone },
|
|
1149
|
+
{ id: "x", label: n, value: C(s.x) },
|
|
1150
|
+
{ id: "y", label: r, value: P(s.y) },
|
|
1151
|
+
...s.size !== void 0 && i ? [{ id: "size", label: i, value: D(s.size) }] : []
|
|
1152
|
+
]
|
|
1153
|
+
};
|
|
1154
|
+
};
|
|
1155
|
+
return /* @__PURE__ */ m(
|
|
1156
|
+
gt,
|
|
1157
|
+
{
|
|
1158
|
+
label: t,
|
|
1159
|
+
description: o,
|
|
1160
|
+
containerRef: R,
|
|
1161
|
+
width: z,
|
|
1162
|
+
height: d,
|
|
1163
|
+
plot: p,
|
|
1164
|
+
overlay: (c) => {
|
|
1165
|
+
const s = h.placed[c];
|
|
1166
|
+
return /* @__PURE__ */ m(
|
|
1167
|
+
"circle",
|
|
1168
|
+
{
|
|
1169
|
+
className: he.marker,
|
|
1170
|
+
cx: s.cx,
|
|
1171
|
+
cy: s.cy,
|
|
1172
|
+
r: s.r + 3,
|
|
1173
|
+
style: { stroke: Z(s.series.tone) }
|
|
1174
|
+
}
|
|
1175
|
+
);
|
|
1176
|
+
},
|
|
1177
|
+
itemCount: h.placed.length,
|
|
1178
|
+
pick: a,
|
|
1179
|
+
tooltip: l,
|
|
1180
|
+
anchor: (c) => ({ x: h.placed[c].cx, y: h.placed[c].cy }),
|
|
1181
|
+
announce: (c) => {
|
|
1182
|
+
const s = h.placed[c];
|
|
1183
|
+
return `${s.label ? `${s.label}, ` : ""}${s.series.label}: ${n} ${C(s.x)}, ${r} ${P(s.y)}`;
|
|
1184
|
+
},
|
|
1185
|
+
table: {
|
|
1186
|
+
columns: [t, n, r],
|
|
1187
|
+
rows: w.map((c) => [c.label ?? c.series.label, C(c.x), P(c.y)])
|
|
1188
|
+
},
|
|
1189
|
+
legend: {
|
|
1190
|
+
entries: M.map((c) => ({ id: c.id, label: c.label, tone: c.tone })),
|
|
1191
|
+
hidden: S,
|
|
1192
|
+
onToggle: (c) => q((s) => {
|
|
1193
|
+
const f = new Set(s);
|
|
1194
|
+
return f.has(c) ? f.delete(c) : M.length - s.size > 1 && f.add(c), f;
|
|
1195
|
+
})
|
|
1196
|
+
},
|
|
1197
|
+
className: A,
|
|
1198
|
+
testId: I
|
|
1199
|
+
}
|
|
1200
|
+
);
|
|
1201
|
+
}, Qn = /* @__PURE__ */ ot(
|
|
1202
|
+
/* @__PURE__ */ it(_n, "ScatterPlot")
|
|
1203
|
+
), Mn = "ui-labels-MJWYF", $n = "ui-empty-AW7c9", wn = "ui-focus-hLQdB", Et = {
|
|
1204
|
+
labels: Mn,
|
|
1205
|
+
empty: $n,
|
|
1206
|
+
focus: wn
|
|
1207
|
+
}, Vt = 8, kn = 28, jt = 140, de = (t, o, e) => {
|
|
1208
|
+
var r;
|
|
1209
|
+
const n = (r = t[o]) == null ? void 0 : r[e];
|
|
1210
|
+
return typeof n == "number" && Number.isFinite(n) ? n : null;
|
|
1211
|
+
}, me = (t) => t.map((o, e) => String(e)), Nn = ({
|
|
1212
|
+
label: t,
|
|
1213
|
+
description: o,
|
|
1214
|
+
columns: e,
|
|
1215
|
+
rows: n,
|
|
1216
|
+
values: r,
|
|
1217
|
+
valueLabel: i,
|
|
1218
|
+
tone: d = "cat-1",
|
|
1219
|
+
height: u = 280,
|
|
1220
|
+
width: k,
|
|
1221
|
+
formatValue: T,
|
|
1222
|
+
className: A,
|
|
1223
|
+
testId: I
|
|
1224
|
+
}) => {
|
|
1225
|
+
const { labels: g } = xt(), [R, z] = _t(k), S = L(() => bt(g == null ? void 0 : g.locale), [g == null ? void 0 : g.locale]), q = T ?? S, D = `ui-heat-${pe().replace(/:/g, "")}`, N = L(() => {
|
|
1226
|
+
const p = { left: Math.min(z * 0.3, Math.max(32, ...n.map(ut)) + 12), top: 8, right: z - 8, bottom: u - 28 - kn }, a = Dt(me(e), [p.left, p.right], {
|
|
1227
|
+
paddingInner: 0.06,
|
|
1228
|
+
paddingOuter: 0
|
|
1229
|
+
}), l = Dt(me(n), [p.top, p.bottom], {
|
|
1230
|
+
paddingInner: 0.06,
|
|
1231
|
+
paddingOuter: 0
|
|
1232
|
+
}), [c, s] = yt(Ot(r.flat())), f = ($) => $ === null ? null : s === c ? 60 : Vt + ($ - c) / (s - c) * (100 - Vt), b = n.flatMap(
|
|
1233
|
+
($, y) => e.map((_, G) => {
|
|
1234
|
+
const H = de(r, y, G);
|
|
1235
|
+
return {
|
|
1236
|
+
row: $,
|
|
1237
|
+
column: _,
|
|
1238
|
+
key: `${y}:${G}`,
|
|
1239
|
+
value: H,
|
|
1240
|
+
x: a(String(G)),
|
|
1241
|
+
y: l(String(y)),
|
|
1242
|
+
width: a.bandwidth,
|
|
1243
|
+
height: l.bandwidth,
|
|
1244
|
+
mix: f(H)
|
|
1245
|
+
};
|
|
1246
|
+
})
|
|
1247
|
+
);
|
|
1248
|
+
return { area: p, x: a, y: l, cells: b, min: c, max: s };
|
|
1249
|
+
}, [e, n, r, z, u]), C = Z(d), P = L(() => {
|
|
1250
|
+
const { area: h, x: p, y: a, cells: l } = N, c = q(N.max), s = h.right - ut(c) - 8, f = ge(
|
|
1251
|
+
e.map((b, $) => ({
|
|
1252
|
+
position: p(String($)) + p.bandwidth / 2,
|
|
1253
|
+
label: b
|
|
1254
|
+
}))
|
|
1255
|
+
);
|
|
1256
|
+
return /* @__PURE__ */ X("g", { children: [
|
|
1257
|
+
l.map((b) => /* @__PURE__ */ m(
|
|
1258
|
+
"rect",
|
|
1259
|
+
{
|
|
1260
|
+
className: b.mix === null ? Et.empty : void 0,
|
|
1261
|
+
x: b.x,
|
|
1262
|
+
y: b.y,
|
|
1263
|
+
width: b.width,
|
|
1264
|
+
height: b.height,
|
|
1265
|
+
rx: 2,
|
|
1266
|
+
style: b.mix === null ? void 0 : { fill: `color-mix(in srgb, ${C} ${b.mix}%, var(--ui-surface))` }
|
|
1267
|
+
},
|
|
1268
|
+
b.key
|
|
1269
|
+
)),
|
|
1270
|
+
/* @__PURE__ */ X("g", { "aria-hidden": !0, className: Et.labels, children: [
|
|
1271
|
+
n.map((b, $) => /* @__PURE__ */ m(
|
|
1272
|
+
"text",
|
|
1273
|
+
{
|
|
1274
|
+
x: h.left - 8,
|
|
1275
|
+
y: a(String($)) + a.bandwidth / 2,
|
|
1276
|
+
dy: "0.32em",
|
|
1277
|
+
textAnchor: "end",
|
|
1278
|
+
children: Gt(b, h.left - 12)
|
|
1279
|
+
},
|
|
1280
|
+
$
|
|
1281
|
+
)),
|
|
1282
|
+
f.map((b) => /* @__PURE__ */ m("text", { x: b.position, y: h.bottom + 16, textAnchor: "middle", children: b.label }, b.position))
|
|
1283
|
+
] }),
|
|
1284
|
+
/* @__PURE__ */ m("defs", { children: /* @__PURE__ */ X("linearGradient", { id: D, children: [
|
|
1285
|
+
/* @__PURE__ */ m(
|
|
1286
|
+
"stop",
|
|
1287
|
+
{
|
|
1288
|
+
offset: "0%",
|
|
1289
|
+
style: {
|
|
1290
|
+
stopColor: `color-mix(in srgb, ${C} ${Vt}%, var(--ui-surface))`
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
),
|
|
1294
|
+
/* @__PURE__ */ m("stop", { offset: "100%", style: { stopColor: C } })
|
|
1295
|
+
] }) }),
|
|
1296
|
+
/* @__PURE__ */ X("g", { "aria-hidden": !0, className: Et.labels, children: [
|
|
1297
|
+
/* @__PURE__ */ m(
|
|
1298
|
+
"rect",
|
|
1299
|
+
{
|
|
1300
|
+
x: s - jt,
|
|
1301
|
+
y: u - 18,
|
|
1302
|
+
width: jt,
|
|
1303
|
+
height: 8,
|
|
1304
|
+
rx: 4,
|
|
1305
|
+
style: { fill: `url(#${D})` }
|
|
1306
|
+
}
|
|
1307
|
+
),
|
|
1308
|
+
/* @__PURE__ */ m("text", { x: s - jt - 8, y: u - 14, dy: "0.32em", textAnchor: "end", children: q(N.min) }),
|
|
1309
|
+
/* @__PURE__ */ m("text", { x: h.right, y: u - 14, dy: "0.32em", textAnchor: "end", children: c })
|
|
1310
|
+
] })
|
|
1311
|
+
] });
|
|
1312
|
+
}, [N, e, n, C, D, u, q]), M = et(
|
|
1313
|
+
(h, p) => {
|
|
1314
|
+
const { area: a, x: l, y: c } = N;
|
|
1315
|
+
if (h < a.left || h > a.right || p < a.top || p > a.bottom) return null;
|
|
1316
|
+
const s = l.indexAt(h), f = c.indexAt(p);
|
|
1317
|
+
return s < 0 || f < 0 ? null : f * e.length + s;
|
|
1318
|
+
},
|
|
1319
|
+
[N, e.length]
|
|
1320
|
+
), w = (h) => {
|
|
1321
|
+
const p = N.cells[h];
|
|
1322
|
+
return { cell: p, value: p.value === null ? "—" : q(p.value) };
|
|
1323
|
+
};
|
|
1324
|
+
return /* @__PURE__ */ m(
|
|
1325
|
+
gt,
|
|
1326
|
+
{
|
|
1327
|
+
label: t,
|
|
1328
|
+
description: o,
|
|
1329
|
+
containerRef: R,
|
|
1330
|
+
width: z,
|
|
1331
|
+
height: u,
|
|
1332
|
+
plot: P,
|
|
1333
|
+
overlay: (h) => {
|
|
1334
|
+
const p = N.cells[h];
|
|
1335
|
+
return /* @__PURE__ */ m(
|
|
1336
|
+
"rect",
|
|
1337
|
+
{
|
|
1338
|
+
className: Et.focus,
|
|
1339
|
+
x: p.x - 1,
|
|
1340
|
+
y: p.y - 1,
|
|
1341
|
+
width: p.width + 2,
|
|
1342
|
+
height: p.height + 2,
|
|
1343
|
+
rx: 3
|
|
1344
|
+
}
|
|
1345
|
+
);
|
|
1346
|
+
},
|
|
1347
|
+
itemCount: N.cells.length,
|
|
1348
|
+
columns: e.length,
|
|
1349
|
+
pick: M,
|
|
1350
|
+
tooltip: (h) => {
|
|
1351
|
+
const { cell: p, value: a } = w(h);
|
|
1352
|
+
return {
|
|
1353
|
+
title: `${p.row} · ${p.column}`,
|
|
1354
|
+
rows: [{ id: "value", label: i, value: a, tone: d }]
|
|
1355
|
+
};
|
|
1356
|
+
},
|
|
1357
|
+
anchor: (h) => {
|
|
1358
|
+
const p = N.cells[h];
|
|
1359
|
+
return { x: p.x + p.width / 2, y: p.y + p.height / 2 };
|
|
1360
|
+
},
|
|
1361
|
+
announce: (h) => {
|
|
1362
|
+
const { cell: p, value: a } = w(h);
|
|
1363
|
+
return `${p.row}, ${p.column}: ${i} ${a}`;
|
|
1364
|
+
},
|
|
1365
|
+
table: {
|
|
1366
|
+
columns: [t, ...e],
|
|
1367
|
+
rows: n.map((h, p) => [
|
|
1368
|
+
h,
|
|
1369
|
+
...e.map((a, l) => {
|
|
1370
|
+
const c = de(r, p, l);
|
|
1371
|
+
return c === null ? "—" : q(c);
|
|
1372
|
+
})
|
|
1373
|
+
])
|
|
1374
|
+
},
|
|
1375
|
+
className: A,
|
|
1376
|
+
testId: I
|
|
1377
|
+
}
|
|
1378
|
+
);
|
|
1379
|
+
}, Jn = /* @__PURE__ */ ot(/* @__PURE__ */ it(Nn, "Heatmap")), vn = "ui-box-7zEQ-", An = "ui-median-J5g6o", Tn = "ui-outlier-M0VN-", In = "ui-band-kK09D", zt = {
|
|
1380
|
+
box: vn,
|
|
1381
|
+
median: An,
|
|
1382
|
+
outlier: Tn,
|
|
1383
|
+
band: In
|
|
1384
|
+
}, Cn = ({
|
|
1385
|
+
label: t,
|
|
1386
|
+
description: o,
|
|
1387
|
+
groups: e,
|
|
1388
|
+
groupLabel: n,
|
|
1389
|
+
labels: r,
|
|
1390
|
+
height: i = 280,
|
|
1391
|
+
width: d,
|
|
1392
|
+
formatValue: u,
|
|
1393
|
+
className: k,
|
|
1394
|
+
testId: T
|
|
1395
|
+
}) => {
|
|
1396
|
+
const { labels: A } = xt(), [I, g] = _t(d), R = L(() => bt(A == null ? void 0 : A.locale), [A == null ? void 0 : A.locale]), z = L(() => Ht(A == null ? void 0 : A.locale), [A == null ? void 0 : A.locale]), S = u ?? R, q = L(
|
|
1397
|
+
() => e.map((M, w) => ({
|
|
1398
|
+
group: M,
|
|
1399
|
+
tone: St(w, M.tone),
|
|
1400
|
+
stats: Fe(M.values)
|
|
1401
|
+
})),
|
|
1402
|
+
[e]
|
|
1403
|
+
), D = L(() => {
|
|
1404
|
+
const M = q.flatMap((f) => f.stats ? [f.stats.min, f.stats.max] : []), [w, h] = M.length ? yt(M) : [0, 1], p = At(w, h), a = ct(p[0], p[1], Rt(i, !1)), l = Qt(g, i, z(a)), c = Dt(
|
|
1405
|
+
e.map((f) => f.id),
|
|
1406
|
+
[l.left, l.right],
|
|
1407
|
+
{ paddingInner: 0.4, paddingOuter: 0.2 }
|
|
1408
|
+
), s = pt(p, [l.bottom, l.top]);
|
|
1409
|
+
return {
|
|
1410
|
+
area: l,
|
|
1411
|
+
band: c,
|
|
1412
|
+
y: s,
|
|
1413
|
+
yTicks: vt(a, s, z),
|
|
1414
|
+
groupTicks: e.map((f) => ({
|
|
1415
|
+
position: c(f.id) + c.bandwidth / 2,
|
|
1416
|
+
label: f.label
|
|
1417
|
+
}))
|
|
1418
|
+
};
|
|
1419
|
+
}, [q, e, g, i, z]), N = (M) => [
|
|
1420
|
+
{ id: "max", label: r.max, value: S(M.whiskerHigh) },
|
|
1421
|
+
{ id: "q3", label: r.q3, value: S(M.q3) },
|
|
1422
|
+
{ id: "median", label: r.median, value: S(M.median) },
|
|
1423
|
+
{ id: "q1", label: r.q1, value: S(M.q1) },
|
|
1424
|
+
{ id: "min", label: r.min, value: S(M.whiskerLow) },
|
|
1425
|
+
...M.outliers.length > 0 ? [{ id: "outliers", label: r.outliers, value: R(M.outliers.length) }] : [],
|
|
1426
|
+
{ id: "count", label: r.count, value: R(M.count) }
|
|
1427
|
+
], C = L(() => {
|
|
1428
|
+
const { area: M, band: w, y: h } = D;
|
|
1429
|
+
return /* @__PURE__ */ X("g", { children: [
|
|
1430
|
+
/* @__PURE__ */ m(ft, { area: M, ticks: D.yTicks, side: "left", hasGrid: !0 }),
|
|
1431
|
+
/* @__PURE__ */ m(Yt, { area: M, ticks: D.groupTicks, side: "bottom" }),
|
|
1432
|
+
q.map(({ group: p, tone: a, stats: l }) => {
|
|
1433
|
+
if (!l) return null;
|
|
1434
|
+
const c = w(p.id), s = c + w.bandwidth / 2, f = w.bandwidth * 0.3, b = Z(a);
|
|
1435
|
+
return /* @__PURE__ */ X("g", { style: { stroke: b }, className: zt.box, children: [
|
|
1436
|
+
/* @__PURE__ */ m("line", { x1: s, x2: s, y1: h(l.whiskerHigh), y2: h(l.q3) }),
|
|
1437
|
+
/* @__PURE__ */ m("line", { x1: s, x2: s, y1: h(l.q1), y2: h(l.whiskerLow) }),
|
|
1438
|
+
/* @__PURE__ */ m(
|
|
1439
|
+
"line",
|
|
1440
|
+
{
|
|
1441
|
+
x1: s - f,
|
|
1442
|
+
x2: s + f,
|
|
1443
|
+
y1: h(l.whiskerHigh),
|
|
1444
|
+
y2: h(l.whiskerHigh)
|
|
1445
|
+
}
|
|
1446
|
+
),
|
|
1447
|
+
/* @__PURE__ */ m(
|
|
1448
|
+
"line",
|
|
1449
|
+
{
|
|
1450
|
+
x1: s - f,
|
|
1451
|
+
x2: s + f,
|
|
1452
|
+
y1: h(l.whiskerLow),
|
|
1453
|
+
y2: h(l.whiskerLow)
|
|
1454
|
+
}
|
|
1455
|
+
),
|
|
1456
|
+
/* @__PURE__ */ m(
|
|
1457
|
+
"rect",
|
|
1458
|
+
{
|
|
1459
|
+
x: c,
|
|
1460
|
+
width: w.bandwidth,
|
|
1461
|
+
y: h(l.q3),
|
|
1462
|
+
height: Math.max(1, h(l.q1) - h(l.q3)),
|
|
1463
|
+
rx: 2,
|
|
1464
|
+
style: { fill: `color-mix(in srgb, ${b} 22%, transparent)` }
|
|
1465
|
+
}
|
|
1466
|
+
),
|
|
1467
|
+
/* @__PURE__ */ m(
|
|
1468
|
+
"line",
|
|
1469
|
+
{
|
|
1470
|
+
className: zt.median,
|
|
1471
|
+
x1: c,
|
|
1472
|
+
x2: c + w.bandwidth,
|
|
1473
|
+
y1: h(l.median),
|
|
1474
|
+
y2: h(l.median)
|
|
1475
|
+
}
|
|
1476
|
+
),
|
|
1477
|
+
l.outliers.map(($, y) => /* @__PURE__ */ m("circle", { className: zt.outlier, cx: s, cy: h($), r: 3 }, y))
|
|
1478
|
+
] }, p.id);
|
|
1479
|
+
})
|
|
1480
|
+
] });
|
|
1481
|
+
}, [D, q]), P = et(
|
|
1482
|
+
(M, w) => {
|
|
1483
|
+
const { area: h, band: p } = D;
|
|
1484
|
+
if (M < h.left || M > h.right || w < h.top - 4 || w > h.bottom + 4)
|
|
1485
|
+
return null;
|
|
1486
|
+
const a = p.indexAt(M);
|
|
1487
|
+
return a < 0 ? null : a;
|
|
1488
|
+
},
|
|
1489
|
+
[D]
|
|
1490
|
+
);
|
|
1491
|
+
return /* @__PURE__ */ m(
|
|
1492
|
+
gt,
|
|
1493
|
+
{
|
|
1494
|
+
label: t,
|
|
1495
|
+
description: o,
|
|
1496
|
+
containerRef: I,
|
|
1497
|
+
width: g,
|
|
1498
|
+
height: i,
|
|
1499
|
+
plot: C,
|
|
1500
|
+
underlay: (M) => {
|
|
1501
|
+
const { area: w, band: h } = D, p = h.step * 0.2;
|
|
1502
|
+
return /* @__PURE__ */ m(
|
|
1503
|
+
"rect",
|
|
1504
|
+
{
|
|
1505
|
+
className: zt.band,
|
|
1506
|
+
x: h(e[M].id) - p,
|
|
1507
|
+
width: h.bandwidth + p * 2,
|
|
1508
|
+
y: w.top,
|
|
1509
|
+
height: w.height
|
|
1510
|
+
}
|
|
1511
|
+
);
|
|
1512
|
+
},
|
|
1513
|
+
overlay: () => null,
|
|
1514
|
+
itemCount: e.length,
|
|
1515
|
+
pick: P,
|
|
1516
|
+
tooltip: (M) => {
|
|
1517
|
+
const w = q[M];
|
|
1518
|
+
return {
|
|
1519
|
+
title: w.group.label,
|
|
1520
|
+
rows: w.stats ? N(w.stats).map((h) => ({
|
|
1521
|
+
...h,
|
|
1522
|
+
tone: h.id === "median" ? w.tone : void 0
|
|
1523
|
+
})) : []
|
|
1524
|
+
};
|
|
1525
|
+
},
|
|
1526
|
+
anchor: (M) => {
|
|
1527
|
+
const w = q[M], { band: h, y: p } = D;
|
|
1528
|
+
return {
|
|
1529
|
+
x: h(w.group.id) + h.bandwidth / 2,
|
|
1530
|
+
y: w.stats ? p(w.stats.q3) : D.area.bottom
|
|
1531
|
+
};
|
|
1532
|
+
},
|
|
1533
|
+
announce: (M) => {
|
|
1534
|
+
const w = q[M];
|
|
1535
|
+
return w.stats ? `${w.group.label}: ${N(w.stats).map((h) => `${h.label} ${h.value}`).join(", ")}` : w.group.label;
|
|
1536
|
+
},
|
|
1537
|
+
table: {
|
|
1538
|
+
columns: [
|
|
1539
|
+
n,
|
|
1540
|
+
r.min,
|
|
1541
|
+
r.q1,
|
|
1542
|
+
r.median,
|
|
1543
|
+
r.q3,
|
|
1544
|
+
r.max,
|
|
1545
|
+
r.count
|
|
1546
|
+
],
|
|
1547
|
+
rows: q.map(
|
|
1548
|
+
({ group: M, stats: w }) => w ? [
|
|
1549
|
+
M.label,
|
|
1550
|
+
S(w.whiskerLow),
|
|
1551
|
+
S(w.q1),
|
|
1552
|
+
S(w.median),
|
|
1553
|
+
S(w.q3),
|
|
1554
|
+
S(w.whiskerHigh),
|
|
1555
|
+
R(w.count)
|
|
1556
|
+
] : [M.label, "—", "—", "—", "—", "—", "0"]
|
|
1557
|
+
)
|
|
1558
|
+
},
|
|
1559
|
+
className: k,
|
|
1560
|
+
testId: T
|
|
1561
|
+
}
|
|
1562
|
+
);
|
|
1563
|
+
}, Kn = /* @__PURE__ */ ot(/* @__PURE__ */ it(Cn, "BoxPlot")), Fn = "ui-baseline-wWs7h", Rn = "ui-band-xvYtL", ue = {
|
|
1564
|
+
baseline: Fn,
|
|
1565
|
+
band: Rn
|
|
1566
|
+
}, wt = 1, Sn = ({
|
|
1567
|
+
label: t,
|
|
1568
|
+
description: o,
|
|
1569
|
+
values: e,
|
|
1570
|
+
bins: n,
|
|
1571
|
+
valueLabel: r,
|
|
1572
|
+
countLabel: i,
|
|
1573
|
+
tone: d = "cat-1",
|
|
1574
|
+
height: u = 260,
|
|
1575
|
+
width: k,
|
|
1576
|
+
formatValue: T,
|
|
1577
|
+
className: A,
|
|
1578
|
+
testId: I
|
|
1579
|
+
}) => {
|
|
1580
|
+
const { labels: g } = xt(), [R, z] = _t(k), S = L(() => bt(g == null ? void 0 : g.locale), [g == null ? void 0 : g.locale]), q = L(() => Ht(g == null ? void 0 : g.locale), [g == null ? void 0 : g.locale]), D = T ?? S, N = L(() => Re(e, n), [e, n]), C = L(() => {
|
|
1581
|
+
var $, y;
|
|
1582
|
+
const h = Math.max(1, ...N.map((_) => _.count)), p = At(0, h), a = ct(0, p[1], Rt(u, !1)).filter(Number.isInteger), l = Qt(z, u, q(a)), c = (($ = N[0]) == null ? void 0 : $.from) ?? 0, s = ((y = N[N.length - 1]) == null ? void 0 : y.to) ?? 1, f = pt([c, s], [l.left, l.right]), b = pt(p, [l.bottom, l.top]);
|
|
1583
|
+
return {
|
|
1584
|
+
area: l,
|
|
1585
|
+
columns: N.map((_) => ({
|
|
1586
|
+
x: f(_.from) + wt / 2,
|
|
1587
|
+
width: Math.max(1, f(_.to) - f(_.from) - wt),
|
|
1588
|
+
y: b(_.count),
|
|
1589
|
+
height: Math.max(0, l.bottom - b(_.count)),
|
|
1590
|
+
center: (f(_.from) + f(_.to)) / 2
|
|
1591
|
+
})),
|
|
1592
|
+
xTicks: vt(ct(c, s, Rt(l.width, !0)), f, q),
|
|
1593
|
+
yTicks: vt(a, b, q)
|
|
1594
|
+
};
|
|
1595
|
+
}, [N, z, u, q]), P = (h) => `${D(N[h].from)} – ${D(N[h].to)}`, M = L(
|
|
1596
|
+
() => /* @__PURE__ */ X("g", { children: [
|
|
1597
|
+
/* @__PURE__ */ m(ft, { area: C.area, ticks: C.yTicks, side: "left", hasGrid: !0 }),
|
|
1598
|
+
/* @__PURE__ */ m(ft, { area: C.area, ticks: C.xTicks, side: "bottom" }),
|
|
1599
|
+
/* @__PURE__ */ m(
|
|
1600
|
+
"line",
|
|
1601
|
+
{
|
|
1602
|
+
className: ue.baseline,
|
|
1603
|
+
x1: C.area.left,
|
|
1604
|
+
x2: C.area.right,
|
|
1605
|
+
y1: C.area.bottom,
|
|
1606
|
+
y2: C.area.bottom
|
|
1607
|
+
}
|
|
1608
|
+
),
|
|
1609
|
+
C.columns.map(
|
|
1610
|
+
(h, p) => h.height > 0 ? /* @__PURE__ */ m(
|
|
1611
|
+
"rect",
|
|
1612
|
+
{
|
|
1613
|
+
x: h.x,
|
|
1614
|
+
y: h.y,
|
|
1615
|
+
width: h.width,
|
|
1616
|
+
height: h.height,
|
|
1617
|
+
style: { fill: Z(d) }
|
|
1618
|
+
},
|
|
1619
|
+
p
|
|
1620
|
+
) : null
|
|
1621
|
+
)
|
|
1622
|
+
] }),
|
|
1623
|
+
[C, d]
|
|
1624
|
+
), w = et(
|
|
1625
|
+
(h, p) => {
|
|
1626
|
+
const { area: a, columns: l } = C;
|
|
1627
|
+
if (h < a.left || h > a.right || p < a.top - 4 || p > a.bottom + 4)
|
|
1628
|
+
return null;
|
|
1629
|
+
const c = l.findIndex(
|
|
1630
|
+
(s) => h >= s.x - wt && h <= s.x + s.width + wt
|
|
1631
|
+
);
|
|
1632
|
+
return c < 0 ? null : c;
|
|
1633
|
+
},
|
|
1634
|
+
[C]
|
|
1635
|
+
);
|
|
1636
|
+
return /* @__PURE__ */ m(
|
|
1637
|
+
gt,
|
|
1638
|
+
{
|
|
1639
|
+
label: t,
|
|
1640
|
+
description: o,
|
|
1641
|
+
containerRef: R,
|
|
1642
|
+
width: z,
|
|
1643
|
+
height: u,
|
|
1644
|
+
plot: M,
|
|
1645
|
+
underlay: (h) => {
|
|
1646
|
+
const p = C.columns[h];
|
|
1647
|
+
return /* @__PURE__ */ m(
|
|
1648
|
+
"rect",
|
|
1649
|
+
{
|
|
1650
|
+
className: ue.band,
|
|
1651
|
+
x: p.x - wt / 2,
|
|
1652
|
+
width: p.width + wt,
|
|
1653
|
+
y: C.area.top,
|
|
1654
|
+
height: C.area.height
|
|
1655
|
+
}
|
|
1656
|
+
);
|
|
1657
|
+
},
|
|
1658
|
+
overlay: () => null,
|
|
1659
|
+
itemCount: N.length,
|
|
1660
|
+
pick: w,
|
|
1661
|
+
tooltip: (h) => ({
|
|
1662
|
+
title: P(h),
|
|
1663
|
+
rows: [{ id: "count", label: i, value: S(N[h].count), tone: d }]
|
|
1664
|
+
}),
|
|
1665
|
+
anchor: (h) => ({ x: C.columns[h].center, y: C.columns[h].y }),
|
|
1666
|
+
announce: (h) => `${r} ${P(h)}: ${i} ${S(N[h].count)}`,
|
|
1667
|
+
table: {
|
|
1668
|
+
columns: [r, i],
|
|
1669
|
+
rows: N.map((h, p) => [P(p), S(h.count)])
|
|
1670
|
+
},
|
|
1671
|
+
className: A,
|
|
1672
|
+
testId: I
|
|
1673
|
+
}
|
|
1674
|
+
);
|
|
1675
|
+
}, to = /* @__PURE__ */ ot(/* @__PURE__ */ it(Sn, "Histogram")), Hn = "ui-grid-fHioN", Ln = "ui-shape-Vbb9D", En = "ui-labels-nRfEk", zn = "ui-axisLabel-UOZQ7", Pn = "ui-spoke-P-6cp", Dn = "ui-marker-xzn9h", kt = {
|
|
1676
|
+
grid: Hn,
|
|
1677
|
+
shape: Ln,
|
|
1678
|
+
labels: En,
|
|
1679
|
+
axisLabel: zn,
|
|
1680
|
+
spoke: Pn,
|
|
1681
|
+
marker: Dn
|
|
1682
|
+
}, fe = 10, Gn = 16, qn = 28, Xt = (t, o) => {
|
|
1683
|
+
const e = t.values[o];
|
|
1684
|
+
return typeof e == "number" && Number.isFinite(e) ? e : null;
|
|
1685
|
+
}, On = ({
|
|
1686
|
+
label: t,
|
|
1687
|
+
description: o,
|
|
1688
|
+
axes: e,
|
|
1689
|
+
series: n,
|
|
1690
|
+
max: r,
|
|
1691
|
+
height: i = 320,
|
|
1692
|
+
width: d,
|
|
1693
|
+
formatValue: u,
|
|
1694
|
+
className: k,
|
|
1695
|
+
testId: T
|
|
1696
|
+
}) => {
|
|
1697
|
+
const { labels: A } = xt(), [I, g] = _t(d), [R, z] = Tt(() => /* @__PURE__ */ new Set()), S = L(() => Ht(A == null ? void 0 : A.locale), [A == null ? void 0 : A.locale]), q = L(() => bt(A == null ? void 0 : A.locale), [A == null ? void 0 : A.locale]), D = u ?? q, N = L(
|
|
1698
|
+
() => n.map((a, l) => ({ ...a, tone: St(l, a.tone) })),
|
|
1699
|
+
[n]
|
|
1700
|
+
), C = L(() => N.filter((a) => !R.has(a.id)), [N, R]), P = L(() => {
|
|
1701
|
+
const a = e.length, l = a > 0 ? Math.PI * 2 / a : 0, c = e.map((j, Y) => Y * l), s = Math.min(g * 0.22, Math.max(0, ...e.map((j) => ut(j.label)))), f = Math.max(24, Math.min(i / 2 - 24, g / 2 - s - fe - 4)), b = g / 2, $ = i / 2;
|
|
1702
|
+
let y = 0;
|
|
1703
|
+
for (const j of n)
|
|
1704
|
+
for (const Y of e) {
|
|
1705
|
+
const O = Xt(j, Y.key);
|
|
1706
|
+
O !== null && O > y && (y = O);
|
|
1707
|
+
}
|
|
1708
|
+
const _ = r !== void 0 && r > 0 ? r : At(0, y, 4)[1], G = ct(0, _, 4).filter((j) => j > 0);
|
|
1709
|
+
return { cx: b, cy: $, radius: f, angles: c, step: l, top: _, rings: G, scale: (j) => Math.min(Math.max(j, 0), _) / _ * f, labelRoom: s };
|
|
1710
|
+
}, [e, n, r, g, i]), M = L(() => {
|
|
1711
|
+
const { cx: a, cy: l, angles: c, scale: s } = P;
|
|
1712
|
+
return C.map((f) => ({
|
|
1713
|
+
...f,
|
|
1714
|
+
points: e.map((b, $) => {
|
|
1715
|
+
const y = Xt(f, b.key);
|
|
1716
|
+
return { ...nt(a, l, s(y ?? 0), c[$]), value: y };
|
|
1717
|
+
})
|
|
1718
|
+
}));
|
|
1719
|
+
}, [P, C, e]), w = L(() => {
|
|
1720
|
+
const { cx: a, cy: l, radius: c, angles: s, rings: f, scale: b, labelRoom: $ } = P, y = f.length > 0 ? b(f[0]) : c, _ = Math.max(1, Math.ceil(Gn / Math.max(1, y))), G = S(f);
|
|
1721
|
+
return /* @__PURE__ */ X("g", { children: [
|
|
1722
|
+
/* @__PURE__ */ X("g", { "aria-hidden": !0, className: kt.grid, children: [
|
|
1723
|
+
f.map((H) => /* @__PURE__ */ m(
|
|
1724
|
+
"path",
|
|
1725
|
+
{
|
|
1726
|
+
d: ne(s.map((j) => nt(a, l, b(H), j)))
|
|
1727
|
+
},
|
|
1728
|
+
H
|
|
1729
|
+
)),
|
|
1730
|
+
s.map((H, j) => {
|
|
1731
|
+
const Y = nt(a, l, c, H);
|
|
1732
|
+
return /* @__PURE__ */ m("line", { x1: a, y1: l, x2: Y.x, y2: Y.y }, e[j].key);
|
|
1733
|
+
})
|
|
1734
|
+
] }),
|
|
1735
|
+
M.map((H) => /* @__PURE__ */ m(
|
|
1736
|
+
"path",
|
|
1737
|
+
{
|
|
1738
|
+
className: kt.shape,
|
|
1739
|
+
d: ne(H.points),
|
|
1740
|
+
style: {
|
|
1741
|
+
fill: `color-mix(in srgb, ${Z(H.tone)} 14%, transparent)`,
|
|
1742
|
+
stroke: Z(H.tone)
|
|
1743
|
+
}
|
|
1744
|
+
},
|
|
1745
|
+
H.id
|
|
1746
|
+
)),
|
|
1747
|
+
/* @__PURE__ */ X("g", { "aria-hidden": !0, className: kt.labels, children: [
|
|
1748
|
+
f.map(
|
|
1749
|
+
(H, j) => (f.length - 1 - j) % _ === 0 ? /* @__PURE__ */ m("text", { x: a + 4, y: l - b(H), dy: "1.1em", children: G[j] }, H) : null
|
|
1750
|
+
),
|
|
1751
|
+
e.map((H, j) => {
|
|
1752
|
+
const Y = s[j], O = nt(a, l, c + fe, Y), x = Math.sin(Y), F = Math.cos(Y), E = x > 0.3 ? "start" : x < -0.3 ? "end" : "middle", U = F > 0.3 ? "-0.2em" : F < -0.3 ? "0.9em" : "0.32em";
|
|
1753
|
+
return /* @__PURE__ */ m(
|
|
1754
|
+
"text",
|
|
1755
|
+
{
|
|
1756
|
+
className: kt.axisLabel,
|
|
1757
|
+
x: O.x,
|
|
1758
|
+
y: O.y,
|
|
1759
|
+
dy: U,
|
|
1760
|
+
textAnchor: E,
|
|
1761
|
+
children: Gt(H.label, E === "middle" ? c * 1.4 : $)
|
|
1762
|
+
},
|
|
1763
|
+
H.key
|
|
1764
|
+
);
|
|
1765
|
+
})
|
|
1766
|
+
] })
|
|
1767
|
+
] });
|
|
1768
|
+
}, [P, M, e, S]), h = et(
|
|
1769
|
+
(a, l) => {
|
|
1770
|
+
const { cx: c, cy: s, radius: f, step: b } = P;
|
|
1771
|
+
if (e.length === 0 || Math.hypot(a - c, l - s) > f + qn) return null;
|
|
1772
|
+
let $ = Math.atan2(a - c, -(l - s));
|
|
1773
|
+
return $ < 0 && ($ += Math.PI * 2), Math.round($ / b) % e.length;
|
|
1774
|
+
},
|
|
1775
|
+
[P, e.length]
|
|
1776
|
+
), p = (a) => M.map((l) => {
|
|
1777
|
+
const c = l.points[a].value;
|
|
1778
|
+
return {
|
|
1779
|
+
id: l.id,
|
|
1780
|
+
label: l.label,
|
|
1781
|
+
value: c === null ? "—" : D(c),
|
|
1782
|
+
tone: l.tone
|
|
1783
|
+
};
|
|
1784
|
+
});
|
|
1785
|
+
return /* @__PURE__ */ m(
|
|
1786
|
+
gt,
|
|
1787
|
+
{
|
|
1788
|
+
label: t,
|
|
1789
|
+
description: o,
|
|
1790
|
+
containerRef: I,
|
|
1791
|
+
width: g,
|
|
1792
|
+
height: i,
|
|
1793
|
+
plot: w,
|
|
1794
|
+
overlay: (a) => {
|
|
1795
|
+
const { cx: l, cy: c, radius: s, angles: f } = P, b = nt(l, c, s, f[a]);
|
|
1796
|
+
return /* @__PURE__ */ X("g", { children: [
|
|
1797
|
+
/* @__PURE__ */ m("line", { className: kt.spoke, x1: l, y1: c, x2: b.x, y2: b.y }),
|
|
1798
|
+
M.map(($) => {
|
|
1799
|
+
const y = $.points[a];
|
|
1800
|
+
return y.value === null ? null : /* @__PURE__ */ m(
|
|
1801
|
+
"circle",
|
|
1802
|
+
{
|
|
1803
|
+
className: kt.marker,
|
|
1804
|
+
cx: y.x,
|
|
1805
|
+
cy: y.y,
|
|
1806
|
+
r: 4.5,
|
|
1807
|
+
style: { fill: Z($.tone) }
|
|
1808
|
+
},
|
|
1809
|
+
$.id
|
|
1810
|
+
);
|
|
1811
|
+
})
|
|
1812
|
+
] });
|
|
1813
|
+
},
|
|
1814
|
+
itemCount: e.length,
|
|
1815
|
+
pick: h,
|
|
1816
|
+
tooltip: (a) => ({ title: e[a].label, rows: p(a) }),
|
|
1817
|
+
anchor: (a) => {
|
|
1818
|
+
const { cx: l, cy: c, radius: s, angles: f } = P;
|
|
1819
|
+
let b = 0;
|
|
1820
|
+
for (const $ of M) {
|
|
1821
|
+
const y = $.points[a];
|
|
1822
|
+
b = Math.max(b, Math.hypot(y.x - l, y.y - c));
|
|
1823
|
+
}
|
|
1824
|
+
return nt(l, c, Math.min(s, b), f[a]);
|
|
1825
|
+
},
|
|
1826
|
+
tooltipSide: "outward",
|
|
1827
|
+
announce: (a) => `${e[a].label}: ${p(a).map((l) => `${l.label} ${l.value}`).join(", ")}`,
|
|
1828
|
+
table: {
|
|
1829
|
+
columns: [t, ...N.map((a) => a.label)],
|
|
1830
|
+
rows: e.map((a) => [
|
|
1831
|
+
a.label,
|
|
1832
|
+
...N.map((l) => {
|
|
1833
|
+
const c = Xt(l, a.key);
|
|
1834
|
+
return c === null ? "—" : D(c);
|
|
1835
|
+
})
|
|
1836
|
+
])
|
|
1837
|
+
},
|
|
1838
|
+
legend: N.length > 1 ? {
|
|
1839
|
+
entries: N.map((a) => ({ id: a.id, label: a.label, tone: a.tone })),
|
|
1840
|
+
hidden: R,
|
|
1841
|
+
onToggle: (a) => z((l) => {
|
|
1842
|
+
const c = new Set(l);
|
|
1843
|
+
return c.has(a) ? c.delete(a) : N.length - l.size > 1 && c.add(a), c;
|
|
1844
|
+
})
|
|
1845
|
+
} : void 0,
|
|
1846
|
+
className: k,
|
|
1847
|
+
testId: T
|
|
1848
|
+
}
|
|
1849
|
+
);
|
|
1850
|
+
}, eo = /* @__PURE__ */ ot(
|
|
1851
|
+
/* @__PURE__ */ it(On, "RadarChart")
|
|
1852
|
+
);
|
|
1853
|
+
export {
|
|
1854
|
+
Xn as AreaChart,
|
|
1855
|
+
Yn as BarChart,
|
|
1856
|
+
Kn as BoxPlot,
|
|
1857
|
+
Un as ComposedChart,
|
|
1858
|
+
Jn as Heatmap,
|
|
1859
|
+
to as Histogram,
|
|
1860
|
+
jn as LineChart,
|
|
1861
|
+
Zn as PieChart,
|
|
1862
|
+
eo as RadarChart,
|
|
1863
|
+
Qn as ScatterPlot
|
|
1864
|
+
};
|
|
1865
|
+
//# sourceMappingURL=charts.js.map
|