@perses-dev/components 0.52.0-beta.2 → 0.52.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AlignSelector/AlignSelector.js.map +1 -0
- package/dist/{src/FormEditor → AlignSelector}/index.js.map +1 -1
- package/dist/ColorPicker/ColorPicker.js.map +1 -0
- package/dist/ColorPicker/OptionsColorPicker.js.map +1 -0
- package/dist/ColorPicker/index.js.map +1 -0
- package/dist/ContentWithLegend/ContentWithLegend.js.map +1 -0
- package/dist/{src/FormatControls → ContentWithLegend}/index.js.map +1 -1
- package/dist/ContentWithLegend/model/content-with-legend-model.js.map +1 -0
- package/dist/DensitySelector/DensitySelector.js.map +1 -0
- package/dist/{src/SortSelector → DensitySelector}/index.js.map +1 -1
- package/dist/Dialog/Dialog.js.map +1 -0
- package/dist/Dialog/DiscardChangesConfirmationDialog.js.map +1 -0
- package/dist/{src/test → Dialog}/index.js.map +1 -1
- package/dist/DragAndDrop/DragAndDropList.js.map +1 -0
- package/dist/DragAndDrop/DragButton.js.map +1 -0
- package/dist/DragAndDrop/DropIndicator.js.map +1 -0
- package/dist/DragAndDrop/index.js.map +1 -0
- package/dist/DragAndDrop/model.js.map +1 -0
- package/dist/Drawer/Drawer.js.map +1 -0
- package/dist/Drawer/index.js.map +1 -0
- package/dist/EChart/EChart.js.map +1 -0
- package/dist/EChart/index.js.map +1 -0
- package/dist/ErrorAlert.js.map +1 -0
- package/dist/ErrorBoundary.js.map +1 -0
- package/dist/FontSizeSelector/FontSizeSelector.js.map +1 -0
- package/dist/FontSizeSelector/index.js.map +1 -0
- package/dist/FormEditor/FormActions.js.map +1 -0
- package/dist/{src/Overlay → FormEditor}/index.js.map +1 -1
- package/dist/FormatControls/FormatControls.js.map +1 -0
- package/dist/{src/InfoTooltip → FormatControls}/index.js.map +1 -1
- package/dist/InfoTooltip/InfoTooltip.js.map +1 -0
- package/dist/InfoTooltip/index.js.map +1 -0
- package/dist/JSONEditor.js.map +1 -0
- package/dist/Legend/CompactLegend.js.map +1 -0
- package/dist/Legend/Legend.js.map +1 -0
- package/dist/Legend/LegendColorBadge.js.map +1 -0
- package/dist/Legend/ListLegend.js.map +1 -0
- package/dist/Legend/ListLegendItem.js.map +1 -0
- package/dist/Legend/TableLegend.js.map +1 -0
- package/dist/Legend/index.js.map +1 -0
- package/dist/Legend/legend-model.js.map +1 -0
- package/dist/LinksEditor/LinksEditor.js.map +1 -0
- package/dist/{src/controls → LinksEditor}/index.js.map +1 -1
- package/dist/ModeSelector/ModeSelector.js.map +1 -0
- package/dist/ModeSelector/index.js.map +1 -0
- package/dist/OptionsEditorLayout/OptionsEditorColumn.js.map +1 -0
- package/dist/OptionsEditorLayout/OptionsEditorControl.js.map +1 -0
- package/dist/OptionsEditorLayout/OptionsEditorGrid.js.map +1 -0
- package/dist/OptionsEditorLayout/OptionsEditorGroup.js.map +1 -0
- package/dist/{src/FontSizeSelector → OptionsEditorLayout}/index.js.map +1 -1
- package/dist/Overlay/Overlay.js.map +1 -0
- package/dist/Overlay/index.js.map +1 -0
- package/dist/RefreshIntervalPicker/RefreshIntervalPicker.js.map +1 -0
- package/dist/{src/ValueMappingEditor → RefreshIntervalPicker}/index.js.map +1 -1
- package/dist/SettingsAutocomplete/SettingsAutocomplete.js.map +1 -0
- package/dist/{src/ToolbarIconButton → SettingsAutocomplete}/index.js.map +1 -1
- package/dist/SortSelector/SortSelector.js.map +1 -0
- package/dist/SortSelector/SortSelectorButtons.js.map +1 -0
- package/dist/SortSelector/index.js.map +1 -0
- package/dist/Table/InnerTable.js.map +1 -0
- package/dist/Table/Table.js.map +1 -0
- package/dist/Table/TableBody.js.map +1 -0
- package/dist/Table/TableCell.js.map +1 -0
- package/dist/Table/TableCheckbox.js.map +1 -0
- package/dist/Table/TableFoot.js.map +1 -0
- package/dist/Table/TableHead.js.map +1 -0
- package/dist/Table/TableHeaderCell.js.map +1 -0
- package/dist/Table/TableRow.js.map +1 -0
- package/dist/Table/VirtualizedTable.js.map +1 -0
- package/dist/Table/VirtualizedTableContainer.js.map +1 -0
- package/dist/Table/hooks/useTableKeyboardNav.js.map +1 -0
- package/dist/Table/hooks/useVirtualizedTableKeyboardNav.js.map +1 -0
- package/dist/Table/index.js.map +1 -0
- package/dist/Table/model/table-model.js.map +1 -0
- package/dist/ThresholdsEditor/ThresholdInput.js.map +1 -0
- package/dist/ThresholdsEditor/ThresholdsEditor.js.map +1 -0
- package/dist/ThresholdsEditor/index.js.map +1 -0
- package/dist/TimeRangeSelector/DateTimeRangePicker.js.map +1 -0
- package/dist/TimeRangeSelector/TimeRangeSelector.js.map +1 -0
- package/dist/TimeRangeSelector/index.js.map +1 -0
- package/dist/TimeRangeSelector/utils.js.map +1 -0
- package/dist/TimeSeriesTooltip/SeriesInfo.js.map +1 -0
- package/dist/TimeSeriesTooltip/SeriesLabelsStack.js.map +1 -0
- package/dist/TimeSeriesTooltip/SeriesMarker.js.map +1 -0
- package/dist/TimeSeriesTooltip/TimeChartTooltip.js.map +1 -0
- package/dist/TimeSeriesTooltip/TooltipContent.js.map +1 -0
- package/dist/TimeSeriesTooltip/TooltipHeader.js.map +1 -0
- package/dist/TimeSeriesTooltip/index.js.map +1 -0
- package/dist/TimeSeriesTooltip/nearby-series.js.map +1 -0
- package/dist/TimeSeriesTooltip/tooltip-model.js.map +1 -0
- package/dist/TimeSeriesTooltip/utils.js.map +1 -0
- package/dist/ToolbarIconButton/ToolbarIconButton.js.map +1 -0
- package/dist/ToolbarIconButton/index.js.map +1 -0
- package/dist/TransformsEditor/TransformEditor.js.map +1 -0
- package/dist/TransformsEditor/TransformEditorContainer.js.map +1 -0
- package/dist/TransformsEditor/TransformsEditor.js.map +1 -0
- package/dist/{src/AlignSelector → TransformsEditor}/index.js.map +1 -1
- package/dist/ValueMappingEditor/ValueMappingEditor.js.map +1 -0
- package/dist/ValueMappingEditor/ValueMappingsEditor.js.map +1 -0
- package/dist/{src/DensitySelector → ValueMappingEditor}/index.js.map +1 -1
- package/dist/YAxisLabel.js.map +1 -0
- package/dist/context/ChartsProvider.js.map +1 -0
- package/dist/context/SnackbarProvider.js.map +1 -0
- package/dist/context/TimeZoneProvider.js.map +1 -0
- package/dist/{src/ErrorBoundary.js.map → context/index.js.map} +1 -1
- package/dist/controls/TextField.js.map +1 -0
- package/dist/{src/Table → controls}/index.js.map +1 -1
- package/dist/index.js.map +1 -0
- package/dist/model/graph.js.map +1 -0
- package/dist/model/index.js.map +1 -0
- package/dist/model/theme.js.map +1 -0
- package/dist/model/timeOption.js.map +1 -0
- package/dist/test/index.js.map +1 -0
- package/dist/test/render.js.map +1 -0
- package/dist/{src/context/index.js.map → test/setup-tests.js.map} +1 -1
- package/dist/{src/Dialog → test-utils}/index.js.map +1 -1
- package/dist/test-utils/theme.js.map +1 -0
- package/dist/theme/component-overrides/alert.js.map +1 -0
- package/dist/theme/component-overrides/paper.js.map +1 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/theme/palette/background.js.map +1 -0
- package/dist/theme/palette/colors/blue.js.map +1 -0
- package/dist/theme/palette/colors/common.js.map +1 -0
- package/dist/theme/palette/colors/green.js.map +1 -0
- package/dist/theme/palette/colors/grey.js.map +1 -0
- package/dist/theme/palette/colors/index.js.map +1 -0
- package/dist/theme/palette/colors/orange.js.map +1 -0
- package/dist/theme/palette/colors/purple.js.map +1 -0
- package/dist/theme/palette/colors/red.js.map +1 -0
- package/dist/theme/palette/colors/types.js.map +1 -0
- package/dist/theme/palette/error.js.map +1 -0
- package/dist/theme/palette/grey.js.map +1 -0
- package/dist/theme/palette/index.js.map +1 -0
- package/dist/theme/palette/palette-options.js.map +1 -0
- package/dist/theme/palette/primary.js.map +1 -0
- package/dist/theme/palette/secondary.js.map +1 -0
- package/dist/theme/palette/success.js.map +1 -0
- package/dist/theme/palette/text.js.map +1 -0
- package/dist/theme/palette/warning.js.map +1 -0
- package/dist/theme/theme.js.map +1 -0
- package/dist/theme/types/ThemeExtension.d.js.map +1 -0
- package/dist/theme/typography.js.map +1 -0
- package/dist/utils/axis.js.map +1 -0
- package/dist/utils/chart-actions.js.map +1 -0
- package/dist/utils/combine-sx.js.map +1 -0
- package/dist/utils/component-ids.js.map +1 -0
- package/dist/utils/format.js.map +1 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/mathjs.js.map +1 -0
- package/dist/utils/theme-gen.js.map +1 -0
- package/package.json +4 -4
- package/dist/src/AlignSelector/AlignSelector.js.map +0 -1
- package/dist/src/ColorPicker/ColorPicker.js.map +0 -1
- package/dist/src/ColorPicker/OptionsColorPicker.js.map +0 -1
- package/dist/src/ColorPicker/index.js.map +0 -1
- package/dist/src/ContentWithLegend/ContentWithLegend.js.map +0 -1
- package/dist/src/ContentWithLegend/index.js.map +0 -1
- package/dist/src/ContentWithLegend/model/content-with-legend-model.js.map +0 -1
- package/dist/src/DensitySelector/DensitySelector.js.map +0 -1
- package/dist/src/Dialog/Dialog.js.map +0 -1
- package/dist/src/Dialog/DiscardChangesConfirmationDialog.js.map +0 -1
- package/dist/src/DragAndDrop/DragAndDropList.js.map +0 -1
- package/dist/src/DragAndDrop/DragButton.js.map +0 -1
- package/dist/src/DragAndDrop/DropIndicator.js.map +0 -1
- package/dist/src/DragAndDrop/index.js.map +0 -1
- package/dist/src/DragAndDrop/model.js.map +0 -1
- package/dist/src/Drawer/Drawer.js.map +0 -1
- package/dist/src/Drawer/index.js.map +0 -1
- package/dist/src/EChart/EChart.js.map +0 -1
- package/dist/src/EChart/index.js.map +0 -1
- package/dist/src/ErrorAlert.js.map +0 -1
- package/dist/src/FontSizeSelector/FontSizeSelector.js.map +0 -1
- package/dist/src/FormEditor/FormActions.js.map +0 -1
- package/dist/src/FormatControls/FormatControls.js.map +0 -1
- package/dist/src/InfoTooltip/InfoTooltip.js.map +0 -1
- package/dist/src/JSONEditor.js.map +0 -1
- package/dist/src/Legend/CompactLegend.js.map +0 -1
- package/dist/src/Legend/Legend.js.map +0 -1
- package/dist/src/Legend/LegendColorBadge.js.map +0 -1
- package/dist/src/Legend/ListLegend.js.map +0 -1
- package/dist/src/Legend/ListLegendItem.js.map +0 -1
- package/dist/src/Legend/TableLegend.js.map +0 -1
- package/dist/src/Legend/index.js.map +0 -1
- package/dist/src/Legend/legend-model.js.map +0 -1
- package/dist/src/LinksEditor/LinksEditor.js.map +0 -1
- package/dist/src/LinksEditor/index.js.map +0 -1
- package/dist/src/ModeSelector/ModeSelector.js.map +0 -1
- package/dist/src/ModeSelector/index.js.map +0 -1
- package/dist/src/OptionsEditorLayout/OptionsEditorColumn.js.map +0 -1
- package/dist/src/OptionsEditorLayout/OptionsEditorControl.js.map +0 -1
- package/dist/src/OptionsEditorLayout/OptionsEditorGrid.js.map +0 -1
- package/dist/src/OptionsEditorLayout/OptionsEditorGroup.js.map +0 -1
- package/dist/src/OptionsEditorLayout/index.js.map +0 -1
- package/dist/src/Overlay/Overlay.js.map +0 -1
- package/dist/src/RefreshIntervalPicker/RefreshIntervalPicker.js.map +0 -1
- package/dist/src/RefreshIntervalPicker/index.js.map +0 -1
- package/dist/src/SettingsAutocomplete/SettingsAutocomplete.js.map +0 -1
- package/dist/src/SettingsAutocomplete/index.js.map +0 -1
- package/dist/src/SortSelector/SortSelector.js.map +0 -1
- package/dist/src/SortSelector/SortSelectorButtons.js.map +0 -1
- package/dist/src/Table/InnerTable.js.map +0 -1
- package/dist/src/Table/Table.js.map +0 -1
- package/dist/src/Table/TableBody.js.map +0 -1
- package/dist/src/Table/TableCell.js.map +0 -1
- package/dist/src/Table/TableCheckbox.js.map +0 -1
- package/dist/src/Table/TableFoot.js.map +0 -1
- package/dist/src/Table/TableHead.js.map +0 -1
- package/dist/src/Table/TableHeaderCell.js.map +0 -1
- package/dist/src/Table/TableRow.js.map +0 -1
- package/dist/src/Table/VirtualizedTable.js.map +0 -1
- package/dist/src/Table/VirtualizedTableContainer.js.map +0 -1
- package/dist/src/Table/hooks/useTableKeyboardNav.js.map +0 -1
- package/dist/src/Table/hooks/useVirtualizedTableKeyboardNav.js.map +0 -1
- package/dist/src/Table/model/table-model.js.map +0 -1
- package/dist/src/ThresholdsEditor/ThresholdInput.js.map +0 -1
- package/dist/src/ThresholdsEditor/ThresholdsEditor.js.map +0 -1
- package/dist/src/ThresholdsEditor/index.js.map +0 -1
- package/dist/src/TimeRangeSelector/DateTimeRangePicker.js.map +0 -1
- package/dist/src/TimeRangeSelector/TimeRangeSelector.js.map +0 -1
- package/dist/src/TimeRangeSelector/index.js.map +0 -1
- package/dist/src/TimeRangeSelector/utils.js.map +0 -1
- package/dist/src/TimeSeriesTooltip/SeriesInfo.js.map +0 -1
- package/dist/src/TimeSeriesTooltip/SeriesLabelsStack.js.map +0 -1
- package/dist/src/TimeSeriesTooltip/SeriesMarker.js.map +0 -1
- package/dist/src/TimeSeriesTooltip/TimeChartTooltip.js.map +0 -1
- package/dist/src/TimeSeriesTooltip/TooltipContent.js.map +0 -1
- package/dist/src/TimeSeriesTooltip/TooltipHeader.js.map +0 -1
- package/dist/src/TimeSeriesTooltip/index.js.map +0 -1
- package/dist/src/TimeSeriesTooltip/nearby-series.js.map +0 -1
- package/dist/src/TimeSeriesTooltip/tooltip-model.js.map +0 -1
- package/dist/src/TimeSeriesTooltip/utils.js.map +0 -1
- package/dist/src/ToolbarIconButton/ToolbarIconButton.js.map +0 -1
- package/dist/src/TransformsEditor/TransformEditor.js.map +0 -1
- package/dist/src/TransformsEditor/TransformEditorContainer.js.map +0 -1
- package/dist/src/TransformsEditor/TransformsEditor.js.map +0 -1
- package/dist/src/TransformsEditor/index.js.map +0 -1
- package/dist/src/ValueMappingEditor/ValueMappingEditor.js.map +0 -1
- package/dist/src/ValueMappingEditor/ValueMappingsEditor.js.map +0 -1
- package/dist/src/YAxisLabel.js.map +0 -1
- package/dist/src/context/ChartsProvider.js.map +0 -1
- package/dist/src/context/SnackbarProvider.js.map +0 -1
- package/dist/src/context/TimeZoneProvider.js.map +0 -1
- package/dist/src/controls/TextField.js.map +0 -1
- package/dist/src/index.js.map +0 -1
- package/dist/src/model/graph.js.map +0 -1
- package/dist/src/model/index.js.map +0 -1
- package/dist/src/model/theme.js.map +0 -1
- package/dist/src/model/timeOption.js.map +0 -1
- package/dist/src/test/render.js.map +0 -1
- package/dist/src/test/setup-tests.js.map +0 -1
- package/dist/src/test-utils/index.js.map +0 -1
- package/dist/src/test-utils/theme.js.map +0 -1
- package/dist/src/theme/component-overrides/alert.js.map +0 -1
- package/dist/src/theme/component-overrides/paper.js.map +0 -1
- package/dist/src/theme/index.js.map +0 -1
- package/dist/src/theme/palette/background.js.map +0 -1
- package/dist/src/theme/palette/colors/blue.js.map +0 -1
- package/dist/src/theme/palette/colors/common.js.map +0 -1
- package/dist/src/theme/palette/colors/green.js.map +0 -1
- package/dist/src/theme/palette/colors/grey.js.map +0 -1
- package/dist/src/theme/palette/colors/index.js.map +0 -1
- package/dist/src/theme/palette/colors/orange.js.map +0 -1
- package/dist/src/theme/palette/colors/purple.js.map +0 -1
- package/dist/src/theme/palette/colors/red.js.map +0 -1
- package/dist/src/theme/palette/colors/types.js.map +0 -1
- package/dist/src/theme/palette/error.js.map +0 -1
- package/dist/src/theme/palette/grey.js.map +0 -1
- package/dist/src/theme/palette/index.js.map +0 -1
- package/dist/src/theme/palette/palette-options.js.map +0 -1
- package/dist/src/theme/palette/primary.js.map +0 -1
- package/dist/src/theme/palette/secondary.js.map +0 -1
- package/dist/src/theme/palette/success.js.map +0 -1
- package/dist/src/theme/palette/text.js.map +0 -1
- package/dist/src/theme/palette/warning.js.map +0 -1
- package/dist/src/theme/theme.js.map +0 -1
- package/dist/src/theme/types/ThemeExtension.d.js.map +0 -1
- package/dist/src/theme/typography.js.map +0 -1
- package/dist/src/utils/axis.js.map +0 -1
- package/dist/src/utils/chart-actions.js.map +0 -1
- package/dist/src/utils/combine-sx.js.map +0 -1
- package/dist/src/utils/component-ids.js.map +0 -1
- package/dist/src/utils/format.js.map +0 -1
- package/dist/src/utils/index.js.map +0 -1
- package/dist/src/utils/mathjs.js.map +0 -1
- package/dist/src/utils/theme-gen.js.map +0 -1
- /package/dist/{src/AlignSelector → AlignSelector}/AlignSelector.js +0 -0
- /package/dist/{src/AlignSelector → AlignSelector}/index.js +0 -0
- /package/dist/{src/ColorPicker → ColorPicker}/ColorPicker.js +0 -0
- /package/dist/{src/ColorPicker → ColorPicker}/OptionsColorPicker.js +0 -0
- /package/dist/{src/ColorPicker → ColorPicker}/index.js +0 -0
- /package/dist/{src/ContentWithLegend → ContentWithLegend}/ContentWithLegend.js +0 -0
- /package/dist/{src/ContentWithLegend → ContentWithLegend}/index.js +0 -0
- /package/dist/{src/ContentWithLegend → ContentWithLegend}/model/content-with-legend-model.js +0 -0
- /package/dist/{src/DensitySelector → DensitySelector}/DensitySelector.js +0 -0
- /package/dist/{src/DensitySelector → DensitySelector}/index.js +0 -0
- /package/dist/{src/Dialog → Dialog}/Dialog.js +0 -0
- /package/dist/{src/Dialog → Dialog}/DiscardChangesConfirmationDialog.js +0 -0
- /package/dist/{src/Dialog → Dialog}/index.js +0 -0
- /package/dist/{src/DragAndDrop → DragAndDrop}/DragAndDropList.js +0 -0
- /package/dist/{src/DragAndDrop → DragAndDrop}/DragButton.js +0 -0
- /package/dist/{src/DragAndDrop → DragAndDrop}/DropIndicator.js +0 -0
- /package/dist/{src/DragAndDrop → DragAndDrop}/index.js +0 -0
- /package/dist/{src/DragAndDrop → DragAndDrop}/model.js +0 -0
- /package/dist/{src/Drawer → Drawer}/Drawer.js +0 -0
- /package/dist/{src/Drawer → Drawer}/index.js +0 -0
- /package/dist/{src/EChart → EChart}/EChart.js +0 -0
- /package/dist/{src/EChart → EChart}/index.js +0 -0
- /package/dist/{src/ErrorAlert.js → ErrorAlert.js} +0 -0
- /package/dist/{src/ErrorBoundary.js → ErrorBoundary.js} +0 -0
- /package/dist/{src/FontSizeSelector → FontSizeSelector}/FontSizeSelector.js +0 -0
- /package/dist/{src/FontSizeSelector → FontSizeSelector}/index.js +0 -0
- /package/dist/{src/FormEditor → FormEditor}/FormActions.js +0 -0
- /package/dist/{src/FormEditor → FormEditor}/index.js +0 -0
- /package/dist/{src/FormatControls → FormatControls}/FormatControls.js +0 -0
- /package/dist/{src/FormatControls → FormatControls}/index.js +0 -0
- /package/dist/{src/InfoTooltip → InfoTooltip}/InfoTooltip.js +0 -0
- /package/dist/{src/InfoTooltip → InfoTooltip}/index.js +0 -0
- /package/dist/{src/JSONEditor.js → JSONEditor.js} +0 -0
- /package/dist/{src/Legend → Legend}/CompactLegend.js +0 -0
- /package/dist/{src/Legend → Legend}/Legend.js +0 -0
- /package/dist/{src/Legend → Legend}/LegendColorBadge.js +0 -0
- /package/dist/{src/Legend → Legend}/ListLegend.js +0 -0
- /package/dist/{src/Legend → Legend}/ListLegendItem.js +0 -0
- /package/dist/{src/Legend → Legend}/TableLegend.js +0 -0
- /package/dist/{src/Legend → Legend}/index.js +0 -0
- /package/dist/{src/Legend → Legend}/legend-model.js +0 -0
- /package/dist/{src/LinksEditor → LinksEditor}/LinksEditor.js +0 -0
- /package/dist/{src/LinksEditor → LinksEditor}/index.js +0 -0
- /package/dist/{src/ModeSelector → ModeSelector}/ModeSelector.js +0 -0
- /package/dist/{src/ModeSelector → ModeSelector}/index.js +0 -0
- /package/dist/{src/OptionsEditorLayout → OptionsEditorLayout}/OptionsEditorColumn.js +0 -0
- /package/dist/{src/OptionsEditorLayout → OptionsEditorLayout}/OptionsEditorControl.js +0 -0
- /package/dist/{src/OptionsEditorLayout → OptionsEditorLayout}/OptionsEditorGrid.js +0 -0
- /package/dist/{src/OptionsEditorLayout → OptionsEditorLayout}/OptionsEditorGroup.js +0 -0
- /package/dist/{src/OptionsEditorLayout → OptionsEditorLayout}/index.js +0 -0
- /package/dist/{src/Overlay → Overlay}/Overlay.js +0 -0
- /package/dist/{src/Overlay → Overlay}/index.js +0 -0
- /package/dist/{src/RefreshIntervalPicker → RefreshIntervalPicker}/RefreshIntervalPicker.js +0 -0
- /package/dist/{src/RefreshIntervalPicker → RefreshIntervalPicker}/index.js +0 -0
- /package/dist/{src/SettingsAutocomplete → SettingsAutocomplete}/SettingsAutocomplete.js +0 -0
- /package/dist/{src/SettingsAutocomplete → SettingsAutocomplete}/index.js +0 -0
- /package/dist/{src/SortSelector → SortSelector}/SortSelector.js +0 -0
- /package/dist/{src/SortSelector → SortSelector}/SortSelectorButtons.js +0 -0
- /package/dist/{src/SortSelector → SortSelector}/index.js +0 -0
- /package/dist/{src/Table → Table}/InnerTable.js +0 -0
- /package/dist/{src/Table → Table}/Table.js +0 -0
- /package/dist/{src/Table → Table}/TableBody.js +0 -0
- /package/dist/{src/Table → Table}/TableCell.js +0 -0
- /package/dist/{src/Table → Table}/TableCheckbox.js +0 -0
- /package/dist/{src/Table → Table}/TableFoot.js +0 -0
- /package/dist/{src/Table → Table}/TableHead.js +0 -0
- /package/dist/{src/Table → Table}/TableHeaderCell.js +0 -0
- /package/dist/{src/Table → Table}/TableRow.js +0 -0
- /package/dist/{src/Table → Table}/VirtualizedTable.js +0 -0
- /package/dist/{src/Table → Table}/VirtualizedTableContainer.js +0 -0
- /package/dist/{src/Table → Table}/hooks/useTableKeyboardNav.js +0 -0
- /package/dist/{src/Table → Table}/hooks/useVirtualizedTableKeyboardNav.js +0 -0
- /package/dist/{src/Table → Table}/index.js +0 -0
- /package/dist/{src/Table → Table}/model/table-model.js +0 -0
- /package/dist/{src/ThresholdsEditor → ThresholdsEditor}/ThresholdInput.js +0 -0
- /package/dist/{src/ThresholdsEditor → ThresholdsEditor}/ThresholdsEditor.js +0 -0
- /package/dist/{src/ThresholdsEditor → ThresholdsEditor}/index.js +0 -0
- /package/dist/{src/TimeRangeSelector → TimeRangeSelector}/DateTimeRangePicker.js +0 -0
- /package/dist/{src/TimeRangeSelector → TimeRangeSelector}/TimeRangeSelector.js +0 -0
- /package/dist/{src/TimeRangeSelector → TimeRangeSelector}/index.js +0 -0
- /package/dist/{src/TimeRangeSelector → TimeRangeSelector}/utils.js +0 -0
- /package/dist/{src/TimeSeriesTooltip → TimeSeriesTooltip}/SeriesInfo.js +0 -0
- /package/dist/{src/TimeSeriesTooltip → TimeSeriesTooltip}/SeriesLabelsStack.js +0 -0
- /package/dist/{src/TimeSeriesTooltip → TimeSeriesTooltip}/SeriesMarker.js +0 -0
- /package/dist/{src/TimeSeriesTooltip → TimeSeriesTooltip}/TimeChartTooltip.js +0 -0
- /package/dist/{src/TimeSeriesTooltip → TimeSeriesTooltip}/TooltipContent.js +0 -0
- /package/dist/{src/TimeSeriesTooltip → TimeSeriesTooltip}/TooltipHeader.js +0 -0
- /package/dist/{src/TimeSeriesTooltip → TimeSeriesTooltip}/index.js +0 -0
- /package/dist/{src/TimeSeriesTooltip → TimeSeriesTooltip}/nearby-series.js +0 -0
- /package/dist/{src/TimeSeriesTooltip → TimeSeriesTooltip}/tooltip-model.js +0 -0
- /package/dist/{src/TimeSeriesTooltip → TimeSeriesTooltip}/utils.js +0 -0
- /package/dist/{src/ToolbarIconButton → ToolbarIconButton}/ToolbarIconButton.js +0 -0
- /package/dist/{src/ToolbarIconButton → ToolbarIconButton}/index.js +0 -0
- /package/dist/{src/TransformsEditor → TransformsEditor}/TransformEditor.js +0 -0
- /package/dist/{src/TransformsEditor → TransformsEditor}/TransformEditorContainer.js +0 -0
- /package/dist/{src/TransformsEditor → TransformsEditor}/TransformsEditor.js +0 -0
- /package/dist/{src/TransformsEditor → TransformsEditor}/index.js +0 -0
- /package/dist/{src/ValueMappingEditor → ValueMappingEditor}/ValueMappingEditor.js +0 -0
- /package/dist/{src/ValueMappingEditor → ValueMappingEditor}/ValueMappingsEditor.js +0 -0
- /package/dist/{src/ValueMappingEditor → ValueMappingEditor}/index.js +0 -0
- /package/dist/{src/YAxisLabel.js → YAxisLabel.js} +0 -0
- /package/dist/cjs/{src/AlignSelector → AlignSelector}/AlignSelector.js +0 -0
- /package/dist/cjs/{src/AlignSelector → AlignSelector}/index.js +0 -0
- /package/dist/cjs/{src/ColorPicker → ColorPicker}/ColorPicker.js +0 -0
- /package/dist/cjs/{src/ColorPicker → ColorPicker}/OptionsColorPicker.js +0 -0
- /package/dist/cjs/{src/ColorPicker → ColorPicker}/index.js +0 -0
- /package/dist/cjs/{src/ContentWithLegend → ContentWithLegend}/ContentWithLegend.js +0 -0
- /package/dist/cjs/{src/ContentWithLegend → ContentWithLegend}/index.js +0 -0
- /package/dist/cjs/{src/ContentWithLegend → ContentWithLegend}/model/content-with-legend-model.js +0 -0
- /package/dist/cjs/{src/DensitySelector → DensitySelector}/DensitySelector.js +0 -0
- /package/dist/cjs/{src/DensitySelector → DensitySelector}/index.js +0 -0
- /package/dist/cjs/{src/Dialog → Dialog}/Dialog.js +0 -0
- /package/dist/cjs/{src/Dialog → Dialog}/DiscardChangesConfirmationDialog.js +0 -0
- /package/dist/cjs/{src/Dialog → Dialog}/index.js +0 -0
- /package/dist/cjs/{src/DragAndDrop → DragAndDrop}/DragAndDropList.js +0 -0
- /package/dist/cjs/{src/DragAndDrop → DragAndDrop}/DragButton.js +0 -0
- /package/dist/cjs/{src/DragAndDrop → DragAndDrop}/DropIndicator.js +0 -0
- /package/dist/cjs/{src/DragAndDrop → DragAndDrop}/index.js +0 -0
- /package/dist/cjs/{src/DragAndDrop → DragAndDrop}/model.js +0 -0
- /package/dist/cjs/{src/Drawer → Drawer}/Drawer.js +0 -0
- /package/dist/cjs/{src/Drawer → Drawer}/index.js +0 -0
- /package/dist/cjs/{src/EChart → EChart}/EChart.js +0 -0
- /package/dist/cjs/{src/EChart → EChart}/index.js +0 -0
- /package/dist/cjs/{src/ErrorAlert.js → ErrorAlert.js} +0 -0
- /package/dist/cjs/{src/ErrorBoundary.js → ErrorBoundary.js} +0 -0
- /package/dist/cjs/{src/FontSizeSelector → FontSizeSelector}/FontSizeSelector.js +0 -0
- /package/dist/cjs/{src/FontSizeSelector → FontSizeSelector}/index.js +0 -0
- /package/dist/cjs/{src/FormEditor → FormEditor}/FormActions.js +0 -0
- /package/dist/cjs/{src/FormEditor → FormEditor}/index.js +0 -0
- /package/dist/cjs/{src/FormatControls → FormatControls}/FormatControls.js +0 -0
- /package/dist/cjs/{src/FormatControls → FormatControls}/index.js +0 -0
- /package/dist/cjs/{src/InfoTooltip → InfoTooltip}/InfoTooltip.js +0 -0
- /package/dist/cjs/{src/InfoTooltip → InfoTooltip}/index.js +0 -0
- /package/dist/cjs/{src/JSONEditor.js → JSONEditor.js} +0 -0
- /package/dist/cjs/{src/Legend → Legend}/CompactLegend.js +0 -0
- /package/dist/cjs/{src/Legend → Legend}/Legend.js +0 -0
- /package/dist/cjs/{src/Legend → Legend}/LegendColorBadge.js +0 -0
- /package/dist/cjs/{src/Legend → Legend}/ListLegend.js +0 -0
- /package/dist/cjs/{src/Legend → Legend}/ListLegendItem.js +0 -0
- /package/dist/cjs/{src/Legend → Legend}/TableLegend.js +0 -0
- /package/dist/cjs/{src/Legend → Legend}/index.js +0 -0
- /package/dist/cjs/{src/Legend → Legend}/legend-model.js +0 -0
- /package/dist/cjs/{src/LinksEditor → LinksEditor}/LinksEditor.js +0 -0
- /package/dist/cjs/{src/LinksEditor → LinksEditor}/index.js +0 -0
- /package/dist/cjs/{src/ModeSelector → ModeSelector}/ModeSelector.js +0 -0
- /package/dist/cjs/{src/ModeSelector → ModeSelector}/index.js +0 -0
- /package/dist/cjs/{src/OptionsEditorLayout → OptionsEditorLayout}/OptionsEditorColumn.js +0 -0
- /package/dist/cjs/{src/OptionsEditorLayout → OptionsEditorLayout}/OptionsEditorControl.js +0 -0
- /package/dist/cjs/{src/OptionsEditorLayout → OptionsEditorLayout}/OptionsEditorGrid.js +0 -0
- /package/dist/cjs/{src/OptionsEditorLayout → OptionsEditorLayout}/OptionsEditorGroup.js +0 -0
- /package/dist/cjs/{src/OptionsEditorLayout → OptionsEditorLayout}/index.js +0 -0
- /package/dist/cjs/{src/Overlay → Overlay}/Overlay.js +0 -0
- /package/dist/cjs/{src/Overlay → Overlay}/index.js +0 -0
- /package/dist/cjs/{src/RefreshIntervalPicker → RefreshIntervalPicker}/RefreshIntervalPicker.js +0 -0
- /package/dist/cjs/{src/RefreshIntervalPicker → RefreshIntervalPicker}/index.js +0 -0
- /package/dist/cjs/{src/SettingsAutocomplete → SettingsAutocomplete}/SettingsAutocomplete.js +0 -0
- /package/dist/cjs/{src/SettingsAutocomplete → SettingsAutocomplete}/index.js +0 -0
- /package/dist/cjs/{src/SortSelector → SortSelector}/SortSelector.js +0 -0
- /package/dist/cjs/{src/SortSelector → SortSelector}/SortSelectorButtons.js +0 -0
- /package/dist/cjs/{src/SortSelector → SortSelector}/index.js +0 -0
- /package/dist/cjs/{src/Table → Table}/InnerTable.js +0 -0
- /package/dist/cjs/{src/Table → Table}/Table.js +0 -0
- /package/dist/cjs/{src/Table → Table}/TableBody.js +0 -0
- /package/dist/cjs/{src/Table → Table}/TableCell.js +0 -0
- /package/dist/cjs/{src/Table → Table}/TableCheckbox.js +0 -0
- /package/dist/cjs/{src/Table → Table}/TableFoot.js +0 -0
- /package/dist/cjs/{src/Table → Table}/TableHead.js +0 -0
- /package/dist/cjs/{src/Table → Table}/TableHeaderCell.js +0 -0
- /package/dist/cjs/{src/Table → Table}/TableRow.js +0 -0
- /package/dist/cjs/{src/Table → Table}/VirtualizedTable.js +0 -0
- /package/dist/cjs/{src/Table → Table}/VirtualizedTableContainer.js +0 -0
- /package/dist/cjs/{src/Table → Table}/hooks/useTableKeyboardNav.js +0 -0
- /package/dist/cjs/{src/Table → Table}/hooks/useVirtualizedTableKeyboardNav.js +0 -0
- /package/dist/cjs/{src/Table → Table}/index.js +0 -0
- /package/dist/cjs/{src/Table → Table}/model/table-model.js +0 -0
- /package/dist/cjs/{src/ThresholdsEditor → ThresholdsEditor}/ThresholdInput.js +0 -0
- /package/dist/cjs/{src/ThresholdsEditor → ThresholdsEditor}/ThresholdsEditor.js +0 -0
- /package/dist/cjs/{src/ThresholdsEditor → ThresholdsEditor}/index.js +0 -0
- /package/dist/cjs/{src/TimeRangeSelector → TimeRangeSelector}/DateTimeRangePicker.js +0 -0
- /package/dist/cjs/{src/TimeRangeSelector → TimeRangeSelector}/TimeRangeSelector.js +0 -0
- /package/dist/cjs/{src/TimeRangeSelector → TimeRangeSelector}/index.js +0 -0
- /package/dist/cjs/{src/TimeRangeSelector → TimeRangeSelector}/utils.js +0 -0
- /package/dist/cjs/{src/TimeSeriesTooltip → TimeSeriesTooltip}/SeriesInfo.js +0 -0
- /package/dist/cjs/{src/TimeSeriesTooltip → TimeSeriesTooltip}/SeriesLabelsStack.js +0 -0
- /package/dist/cjs/{src/TimeSeriesTooltip → TimeSeriesTooltip}/SeriesMarker.js +0 -0
- /package/dist/cjs/{src/TimeSeriesTooltip → TimeSeriesTooltip}/TimeChartTooltip.js +0 -0
- /package/dist/cjs/{src/TimeSeriesTooltip → TimeSeriesTooltip}/TooltipContent.js +0 -0
- /package/dist/cjs/{src/TimeSeriesTooltip → TimeSeriesTooltip}/TooltipHeader.js +0 -0
- /package/dist/cjs/{src/TimeSeriesTooltip → TimeSeriesTooltip}/index.js +0 -0
- /package/dist/cjs/{src/TimeSeriesTooltip → TimeSeriesTooltip}/nearby-series.js +0 -0
- /package/dist/cjs/{src/TimeSeriesTooltip → TimeSeriesTooltip}/tooltip-model.js +0 -0
- /package/dist/cjs/{src/TimeSeriesTooltip → TimeSeriesTooltip}/utils.js +0 -0
- /package/dist/cjs/{src/ToolbarIconButton → ToolbarIconButton}/ToolbarIconButton.js +0 -0
- /package/dist/cjs/{src/ToolbarIconButton → ToolbarIconButton}/index.js +0 -0
- /package/dist/cjs/{src/TransformsEditor → TransformsEditor}/TransformEditor.js +0 -0
- /package/dist/cjs/{src/TransformsEditor → TransformsEditor}/TransformEditorContainer.js +0 -0
- /package/dist/cjs/{src/TransformsEditor → TransformsEditor}/TransformsEditor.js +0 -0
- /package/dist/cjs/{src/TransformsEditor → TransformsEditor}/index.js +0 -0
- /package/dist/cjs/{src/ValueMappingEditor → ValueMappingEditor}/ValueMappingEditor.js +0 -0
- /package/dist/cjs/{src/ValueMappingEditor → ValueMappingEditor}/ValueMappingsEditor.js +0 -0
- /package/dist/cjs/{src/ValueMappingEditor → ValueMappingEditor}/index.js +0 -0
- /package/dist/cjs/{src/YAxisLabel.js → YAxisLabel.js} +0 -0
- /package/dist/cjs/{src/context → context}/ChartsProvider.js +0 -0
- /package/dist/cjs/{src/context → context}/SnackbarProvider.js +0 -0
- /package/dist/cjs/{src/context → context}/TimeZoneProvider.js +0 -0
- /package/dist/cjs/{src/context → context}/index.js +0 -0
- /package/dist/cjs/{src/controls → controls}/TextField.js +0 -0
- /package/dist/cjs/{src/controls → controls}/index.js +0 -0
- /package/dist/cjs/{src/index.js → index.js} +0 -0
- /package/dist/cjs/{src/model → model}/graph.js +0 -0
- /package/dist/cjs/{src/model → model}/index.js +0 -0
- /package/dist/cjs/{src/model → model}/theme.js +0 -0
- /package/dist/cjs/{src/model → model}/timeOption.js +0 -0
- /package/dist/cjs/{src/test → test}/index.js +0 -0
- /package/dist/cjs/{src/test → test}/render.js +0 -0
- /package/dist/cjs/{src/test → test}/setup-tests.js +0 -0
- /package/dist/cjs/{src/test-utils → test-utils}/index.js +0 -0
- /package/dist/cjs/{src/test-utils → test-utils}/theme.js +0 -0
- /package/dist/cjs/{src/theme → theme}/component-overrides/alert.js +0 -0
- /package/dist/cjs/{src/theme → theme}/component-overrides/paper.js +0 -0
- /package/dist/cjs/{src/theme → theme}/index.js +0 -0
- /package/dist/cjs/{src/theme → theme}/palette/background.js +0 -0
- /package/dist/cjs/{src/theme → theme}/palette/colors/blue.js +0 -0
- /package/dist/cjs/{src/theme → theme}/palette/colors/common.js +0 -0
- /package/dist/cjs/{src/theme → theme}/palette/colors/green.js +0 -0
- /package/dist/cjs/{src/theme → theme}/palette/colors/grey.js +0 -0
- /package/dist/cjs/{src/theme → theme}/palette/colors/index.js +0 -0
- /package/dist/cjs/{src/theme → theme}/palette/colors/orange.js +0 -0
- /package/dist/cjs/{src/theme → theme}/palette/colors/purple.js +0 -0
- /package/dist/cjs/{src/theme → theme}/palette/colors/red.js +0 -0
- /package/dist/cjs/{src/theme → theme}/palette/colors/types.js +0 -0
- /package/dist/cjs/{src/theme → theme}/palette/error.js +0 -0
- /package/dist/cjs/{src/theme → theme}/palette/grey.js +0 -0
- /package/dist/cjs/{src/theme → theme}/palette/index.js +0 -0
- /package/dist/cjs/{src/theme → theme}/palette/palette-options.js +0 -0
- /package/dist/cjs/{src/theme → theme}/palette/primary.js +0 -0
- /package/dist/cjs/{src/theme → theme}/palette/secondary.js +0 -0
- /package/dist/cjs/{src/theme → theme}/palette/success.js +0 -0
- /package/dist/cjs/{src/theme → theme}/palette/text.js +0 -0
- /package/dist/cjs/{src/theme → theme}/palette/warning.js +0 -0
- /package/dist/cjs/{src/theme → theme}/theme.js +0 -0
- /package/dist/cjs/{src/theme → theme}/types/ThemeExtension.d.js +0 -0
- /package/dist/cjs/{src/theme → theme}/typography.js +0 -0
- /package/dist/cjs/{src/utils → utils}/axis.js +0 -0
- /package/dist/cjs/{src/utils → utils}/chart-actions.js +0 -0
- /package/dist/cjs/{src/utils → utils}/combine-sx.js +0 -0
- /package/dist/cjs/{src/utils → utils}/component-ids.js +0 -0
- /package/dist/cjs/{src/utils → utils}/format.js +0 -0
- /package/dist/cjs/{src/utils → utils}/index.js +0 -0
- /package/dist/cjs/{src/utils → utils}/mathjs.js +0 -0
- /package/dist/cjs/{src/utils → utils}/theme-gen.js +0 -0
- /package/dist/{src/context → context}/ChartsProvider.js +0 -0
- /package/dist/{src/context → context}/SnackbarProvider.js +0 -0
- /package/dist/{src/context → context}/TimeZoneProvider.js +0 -0
- /package/dist/{src/context → context}/index.js +0 -0
- /package/dist/{src/controls → controls}/TextField.js +0 -0
- /package/dist/{src/controls → controls}/index.js +0 -0
- /package/dist/{src/index.js → index.js} +0 -0
- /package/dist/{src/model → model}/graph.js +0 -0
- /package/dist/{src/model → model}/index.js +0 -0
- /package/dist/{src/model → model}/theme.js +0 -0
- /package/dist/{src/model → model}/timeOption.js +0 -0
- /package/dist/{src/test → test}/index.js +0 -0
- /package/dist/{src/test → test}/render.js +0 -0
- /package/dist/{src/test → test}/setup-tests.js +0 -0
- /package/dist/{src/test-utils → test-utils}/index.js +0 -0
- /package/dist/{src/test-utils → test-utils}/theme.js +0 -0
- /package/dist/{src/theme → theme}/component-overrides/alert.js +0 -0
- /package/dist/{src/theme → theme}/component-overrides/paper.js +0 -0
- /package/dist/{src/theme → theme}/index.js +0 -0
- /package/dist/{src/theme → theme}/palette/background.js +0 -0
- /package/dist/{src/theme → theme}/palette/colors/blue.js +0 -0
- /package/dist/{src/theme → theme}/palette/colors/common.js +0 -0
- /package/dist/{src/theme → theme}/palette/colors/green.js +0 -0
- /package/dist/{src/theme → theme}/palette/colors/grey.js +0 -0
- /package/dist/{src/theme → theme}/palette/colors/index.js +0 -0
- /package/dist/{src/theme → theme}/palette/colors/orange.js +0 -0
- /package/dist/{src/theme → theme}/palette/colors/purple.js +0 -0
- /package/dist/{src/theme → theme}/palette/colors/red.js +0 -0
- /package/dist/{src/theme → theme}/palette/colors/types.js +0 -0
- /package/dist/{src/theme → theme}/palette/error.js +0 -0
- /package/dist/{src/theme → theme}/palette/grey.js +0 -0
- /package/dist/{src/theme → theme}/palette/index.js +0 -0
- /package/dist/{src/theme → theme}/palette/palette-options.js +0 -0
- /package/dist/{src/theme → theme}/palette/primary.js +0 -0
- /package/dist/{src/theme → theme}/palette/secondary.js +0 -0
- /package/dist/{src/theme → theme}/palette/success.js +0 -0
- /package/dist/{src/theme → theme}/palette/text.js +0 -0
- /package/dist/{src/theme → theme}/palette/warning.js +0 -0
- /package/dist/{src/theme → theme}/theme.js +0 -0
- /package/dist/{src/theme → theme}/types/ThemeExtension.d.js +0 -0
- /package/dist/{src/theme → theme}/typography.js +0 -0
- /package/dist/{src/utils → utils}/axis.js +0 -0
- /package/dist/{src/utils → utils}/chart-actions.js +0 -0
- /package/dist/{src/utils → utils}/combine-sx.js +0 -0
- /package/dist/{src/utils → utils}/component-ids.js +0 -0
- /package/dist/{src/utils → utils}/format.js +0 -0
- /package/dist/{src/utils → utils}/index.js +0 -0
- /package/dist/{src/utils → utils}/mathjs.js +0 -0
- /package/dist/{src/utils → utils}/theme-gen.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/theme/palette/background.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { PaletteMode, PaletteOptions } from '@mui/material';\nimport { blue, grey, white } from './colors';\n\nexport const background = (mode: PaletteMode): PaletteOptions['background'] => {\n const navigation = blue[150];\n const overlay = 'rgba(21, 23, 33, 0.75)'; // grey[900] with opacity 75%\n return mode === 'light'\n ? {\n navigation,\n overlay,\n default: white,\n paper: grey[50],\n code: grey[50],\n tooltip: grey[100],\n lighter: grey[50],\n border: grey[100],\n }\n : {\n navigation,\n overlay,\n default: grey[900],\n paper: grey[850],\n code: grey[800],\n tooltip: grey[600],\n lighter: grey[700],\n border: grey[600],\n };\n};\n"],"names":["blue","grey","white","background","mode","navigation","overlay","default","paper","code","tooltip","lighter","border"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,SAASA,IAAI,EAAEC,IAAI,EAAEC,KAAK,QAAQ,WAAW;AAE7C,OAAO,MAAMC,aAAa,CAACC;IACzB,MAAMC,aAAaL,IAAI,CAAC,IAAI;IAC5B,MAAMM,UAAU,0BAA0B,6BAA6B;IACvE,OAAOF,SAAS,UACZ;QACEC;QACAC;QACAC,SAASL;QACTM,OAAOP,IAAI,CAAC,GAAG;QACfQ,MAAMR,IAAI,CAAC,GAAG;QACdS,SAAST,IAAI,CAAC,IAAI;QAClBU,SAASV,IAAI,CAAC,GAAG;QACjBW,QAAQX,IAAI,CAAC,IAAI;IACnB,IACA;QACEI;QACAC;QACAC,SAASN,IAAI,CAAC,IAAI;QAClBO,OAAOP,IAAI,CAAC,IAAI;QAChBQ,MAAMR,IAAI,CAAC,IAAI;QACfS,SAAST,IAAI,CAAC,IAAI;QAClBU,SAASV,IAAI,CAAC,IAAI;QAClBW,QAAQX,IAAI,CAAC,IAAI;IACnB;AACN,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/theme/palette/colors/blue.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { PersesColor } from './types';\n\nexport const blue: PersesColor = {\n 50: '#E7F1FC',\n 100: '#D0E3FA',\n 150: '#B8D5F7',\n 200: '#A1C7F5',\n 300: '#72ABF0',\n 400: '#438FEB',\n 500: '#1473E6',\n 600: '#105CB8',\n 700: '#0C458A',\n 800: '#082E5C',\n 850: '#062345',\n 900: '#04172E',\n 950: '#020C17',\n};\n"],"names":["blue"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAIjC,OAAO,MAAMA,OAAoB;IAC/B,IAAI;IACJ,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;AACP,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/theme/palette/colors/common.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport const white = '#FFFFFF';\nexport const black = '#000000';\n"],"names":["white","black"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAO,MAAMA,QAAQ,UAAU;AAC/B,OAAO,MAAMC,QAAQ,UAAU"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/theme/palette/colors/green.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { PersesColor } from './types';\n\nexport const green: PersesColor = {\n 50: '#EAF9F1',\n 100: '#D5F2E3',\n 150: '#C1ECD4',\n 200: '#ACE5C6',\n 300: '#82D9AA',\n 400: '#59CC8D',\n 500: '#2FBF71',\n 600: '#26995A',\n 700: '#1C7344',\n 800: '#134C2D',\n 850: '#0E3922',\n 900: '#092617',\n 950: '#05130B',\n};\n"],"names":["green"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAIjC,OAAO,MAAMA,QAAqB;IAChC,IAAI;IACJ,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;AACP,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/theme/palette/colors/grey.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { PersesColor } from './types';\n\nexport const grey: PersesColor = {\n 50: '#F0F1F6',\n 100: '#E1E3ED',\n 150: '#D2D5E4',\n 200: '#C3C7DB',\n 300: '#A4ACC8',\n 400: '#8690B6',\n 500: '#717CA4',\n 600: '#535D83',\n 700: '#3E4662',\n 800: '#2A2E42',\n 850: '#1F2331',\n 900: '#151721',\n 950: '#0A0C10',\n};\n"],"names":["grey"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAIjC,OAAO,MAAMA,OAAoB;IAC/B,IAAI;IACJ,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;AACP,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/theme/palette/colors/index.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './blue';\nexport * from './common';\nexport * from './green';\nexport * from './grey';\nexport * from './orange';\nexport * from './purple';\nexport * from './red';\nexport * from './types';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,SAAS;AACvB,cAAc,WAAW;AACzB,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,QAAQ;AACtB,cAAc,UAAU"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/theme/palette/colors/orange.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { PersesColor } from './types';\n\nexport const orange: PersesColor = {\n 50: '#FFF5E8',\n 100: '#FFECD2',\n 150: '#FFE2BB',\n 200: '#FFD9A4',\n 300: '#FFC577',\n 400: '#FFB249',\n 500: '#FF9F1C',\n 600: '#CC7F16',\n 700: '#995F11',\n 800: '#66400B',\n 850: '#4D3008',\n 900: '#332006',\n 950: '#1A1003',\n};\n"],"names":["orange"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAIjC,OAAO,MAAMA,SAAsB;IACjC,IAAI;IACJ,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;AACP,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/theme/palette/colors/purple.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { PersesColor } from './types';\n\nexport const purple: PersesColor = {\n 50: '#EFE9FD',\n 100: '#E0D2FC',\n 150: '#D0BCFA',\n 200: '#C1A6F8',\n 300: '#A179F5',\n 400: '#824DF1',\n 500: '#6320EE',\n 600: '#4F1ABE',\n 700: '#3B138F',\n 800: '#280D5F',\n 850: '#1E0A47',\n 900: '#140630',\n 950: '#0A0318',\n};\n"],"names":["purple"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAIjC,OAAO,MAAMA,SAAsB;IACjC,IAAI;IACJ,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;AACP,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/theme/palette/colors/red.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { PersesColor } from './types';\n\nexport const red: PersesColor = {\n 50: '#FDEDED',\n 100: '#FBDADA',\n 150: '#F9C8C8',\n 200: '#F7B5B5',\n 300: '#F29191',\n 400: '#EE6C6C',\n 500: '#EA4747',\n 600: '#BD3939',\n 700: '#902B2B',\n 800: '#621D1D',\n 850: '#4C1616',\n 900: '#350F0F',\n 950: '#1F0808',\n};\n"],"names":["red"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAIjC,OAAO,MAAMA,MAAmB;IAC9B,IAAI;IACJ,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;AACP,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/theme/palette/colors/types.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport type HexColor = `#${string}`;\n\nexport interface PersesColor {\n 50: HexColor;\n 100: HexColor;\n 150: HexColor;\n 200: HexColor;\n 300: HexColor;\n 400: HexColor;\n 500: HexColor;\n 600: HexColor;\n 700: HexColor;\n 800: HexColor;\n 850: HexColor;\n 900: HexColor;\n 950: HexColor;\n}\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAIjC,WAcC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/theme/palette/error.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { PaletteMode, SimplePaletteColorOptions } from '@mui/material';\nimport { red } from './colors';\n\nexport const error = (mode: PaletteMode): SimplePaletteColorOptions => {\n return mode === 'light'\n ? {\n main: red[500],\n dark: red[600],\n light: red[50],\n }\n : {\n main: red[400],\n dark: red[800],\n light: red[300],\n };\n};\n"],"names":["red","error","mode","main","dark","light"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,SAASA,GAAG,QAAQ,WAAW;AAE/B,OAAO,MAAMC,QAAQ,CAACC;IACpB,OAAOA,SAAS,UACZ;QACEC,MAAMH,GAAG,CAAC,IAAI;QACdI,MAAMJ,GAAG,CAAC,IAAI;QACdK,OAAOL,GAAG,CAAC,GAAG;IAChB,IACA;QACEG,MAAMH,GAAG,CAAC,IAAI;QACdI,MAAMJ,GAAG,CAAC,IAAI;QACdK,OAAOL,GAAG,CAAC,IAAI;IACjB;AACN,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/theme/palette/grey.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { PaletteOptions, PaletteMode } from '@mui/material';\nimport { grey } from './colors/grey';\n\nexport const greyOption = (mode: PaletteMode): PaletteOptions['grey'] => {\n return mode === 'light'\n ? {\n 50: grey[50],\n 100: grey[100],\n 200: grey[200],\n 300: grey[300],\n 400: grey[400],\n 500: grey[500],\n 600: grey[600],\n 700: grey[700],\n 800: grey[800],\n 900: grey[900],\n 950: grey[950],\n }\n : // Reverse greys from darkest to lightest for Dark mode\n {\n 50: grey[950],\n 100: grey[900],\n 200: grey[800],\n 300: grey[700],\n 400: grey[600],\n 500: grey[500],\n 600: grey[400],\n 700: grey[300],\n 800: grey[200],\n 900: grey[100],\n 950: grey[50],\n };\n};\n"],"names":["grey","greyOption","mode"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,SAASA,IAAI,QAAQ,gBAAgB;AAErC,OAAO,MAAMC,aAAa,CAACC;IACzB,OAAOA,SAAS,UACZ;QACE,IAAIF,IAAI,CAAC,GAAG;QACZ,KAAKA,IAAI,CAAC,IAAI;QACd,KAAKA,IAAI,CAAC,IAAI;QACd,KAAKA,IAAI,CAAC,IAAI;QACd,KAAKA,IAAI,CAAC,IAAI;QACd,KAAKA,IAAI,CAAC,IAAI;QACd,KAAKA,IAAI,CAAC,IAAI;QACd,KAAKA,IAAI,CAAC,IAAI;QACd,KAAKA,IAAI,CAAC,IAAI;QACd,KAAKA,IAAI,CAAC,IAAI;QACd,KAAKA,IAAI,CAAC,IAAI;IAChB,IAEA;QACE,IAAIA,IAAI,CAAC,IAAI;QACb,KAAKA,IAAI,CAAC,IAAI;QACd,KAAKA,IAAI,CAAC,IAAI;QACd,KAAKA,IAAI,CAAC,IAAI;QACd,KAAKA,IAAI,CAAC,IAAI;QACd,KAAKA,IAAI,CAAC,IAAI;QACd,KAAKA,IAAI,CAAC,IAAI;QACd,KAAKA,IAAI,CAAC,IAAI;QACd,KAAKA,IAAI,CAAC,IAAI;QACd,KAAKA,IAAI,CAAC,IAAI;QACd,KAAKA,IAAI,CAAC,GAAG;IACf;AACN,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/theme/palette/index.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './palette-options';\nexport type { PersesColor, HexColor } from './colors';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,oBAAoB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/theme/palette/palette-options.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { PaletteMode, PaletteOptions } from '@mui/material';\nimport { text } from './text';\nimport { background } from './background';\nimport { greyOption } from './grey';\nimport { black, white } from './colors/common';\nimport { primary } from './primary';\nimport { secondary } from './secondary';\nimport { blue, green, grey, orange, purple, red } from './colors';\nimport { error } from './error';\nimport { success } from './success';\nimport { warning } from './warning';\n\n/**\n * Returns the MUI PaletteOptions for the given mode.\n */\nexport function getPaletteOptions(mode: PaletteMode): PaletteOptions {\n // Palette options should be split out into their own files with functions\n // for creating the option values based on light/dark mode\n return {\n mode,\n primary: primary(mode),\n secondary: secondary(mode),\n grey: greyOption(mode),\n background: background(mode),\n text: text(mode),\n error: error(mode),\n warning: warning(mode),\n info: primary(mode),\n success: success(mode),\n common: {\n white,\n black,\n },\n\n // custom colors\n designSystem: {\n blue,\n green,\n grey,\n orange,\n purple,\n red,\n },\n };\n}\n"],"names":["text","background","greyOption","black","white","primary","secondary","blue","green","grey","orange","purple","red","error","success","warning","getPaletteOptions","mode","info","common","designSystem"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,SAASA,IAAI,QAAQ,SAAS;AAC9B,SAASC,UAAU,QAAQ,eAAe;AAC1C,SAASC,UAAU,QAAQ,SAAS;AACpC,SAASC,KAAK,EAAEC,KAAK,QAAQ,kBAAkB;AAC/C,SAASC,OAAO,QAAQ,YAAY;AACpC,SAASC,SAAS,QAAQ,cAAc;AACxC,SAASC,IAAI,EAAEC,KAAK,EAAEC,IAAI,EAAEC,MAAM,EAAEC,MAAM,EAAEC,GAAG,QAAQ,WAAW;AAClE,SAASC,KAAK,QAAQ,UAAU;AAChC,SAASC,OAAO,QAAQ,YAAY;AACpC,SAASC,OAAO,QAAQ,YAAY;AAEpC;;CAEC,GACD,OAAO,SAASC,kBAAkBC,IAAiB;IACjD,0EAA0E;IAC1E,0DAA0D;IAC1D,OAAO;QACLA;QACAZ,SAASA,QAAQY;QACjBX,WAAWA,UAAUW;QACrBR,MAAMP,WAAWe;QACjBhB,YAAYA,WAAWgB;QACvBjB,MAAMA,KAAKiB;QACXJ,OAAOA,MAAMI;QACbF,SAASA,QAAQE;QACjBC,MAAMb,QAAQY;QACdH,SAASA,QAAQG;QACjBE,QAAQ;YACNf;YACAD;QACF;QAEA,gBAAgB;QAChBiB,cAAc;YACZb;YACAC;YACAC;YACAC;YACAC;YACAC;QACF;IACF;AACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/theme/palette/primary.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { PaletteMode, SimplePaletteColorOptions } from '@mui/material';\nimport { blue } from './colors';\n\nexport const primary = (mode: PaletteMode): SimplePaletteColorOptions => {\n return mode === 'light'\n ? {\n main: blue[500],\n dark: blue[600],\n light: blue[50],\n }\n : {\n main: blue[400],\n dark: blue[800],\n light: blue[200],\n };\n};\n"],"names":["blue","primary","mode","main","dark","light"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,SAASA,IAAI,QAAQ,WAAW;AAEhC,OAAO,MAAMC,UAAU,CAACC;IACtB,OAAOA,SAAS,UACZ;QACEC,MAAMH,IAAI,CAAC,IAAI;QACfI,MAAMJ,IAAI,CAAC,IAAI;QACfK,OAAOL,IAAI,CAAC,GAAG;IACjB,IACA;QACEG,MAAMH,IAAI,CAAC,IAAI;QACfI,MAAMJ,IAAI,CAAC,IAAI;QACfK,OAAOL,IAAI,CAAC,IAAI;IAClB;AACN,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/theme/palette/secondary.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { SimplePaletteColorOptions, PaletteMode } from '@mui/material';\nimport { grey, white } from './colors';\n\nexport const secondary = (mode: PaletteMode): SimplePaletteColorOptions => {\n return mode === 'light'\n ? {\n main: grey[600],\n dark: grey[900],\n light: grey[100],\n }\n : {\n main: white,\n dark: white,\n light: white,\n };\n};\n"],"names":["grey","white","secondary","mode","main","dark","light"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,SAASA,IAAI,EAAEC,KAAK,QAAQ,WAAW;AAEvC,OAAO,MAAMC,YAAY,CAACC;IACxB,OAAOA,SAAS,UACZ;QACEC,MAAMJ,IAAI,CAAC,IAAI;QACfK,MAAML,IAAI,CAAC,IAAI;QACfM,OAAON,IAAI,CAAC,IAAI;IAClB,IACA;QACEI,MAAMH;QACNI,MAAMJ;QACNK,OAAOL;IACT;AACN,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/theme/palette/success.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { PaletteMode, SimplePaletteColorOptions } from '@mui/material';\nimport { green } from './colors';\n\nexport const success = (mode: PaletteMode): SimplePaletteColorOptions => {\n return mode === 'light'\n ? {\n main: green[500],\n dark: green[700],\n light: green[50],\n }\n : {\n main: green[400],\n dark: green[800],\n light: green[300],\n };\n};\n"],"names":["green","success","mode","main","dark","light"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,SAASA,KAAK,QAAQ,WAAW;AAEjC,OAAO,MAAMC,UAAU,CAACC;IACtB,OAAOA,SAAS,UACZ;QACEC,MAAMH,KAAK,CAAC,IAAI;QAChBI,MAAMJ,KAAK,CAAC,IAAI;QAChBK,OAAOL,KAAK,CAAC,GAAG;IAClB,IACA;QACEG,MAAMH,KAAK,CAAC,IAAI;QAChBI,MAAMJ,KAAK,CAAC,IAAI;QAChBK,OAAOL,KAAK,CAAC,IAAI;IACnB;AACN,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/theme/palette/text.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { PaletteOptions, PaletteMode } from '@mui/material';\nimport { grey, white, blue } from './colors';\n\nexport const text = (mode: PaletteMode): PaletteOptions['text'] => {\n const navigation = grey[800];\n const accent = grey[300];\n return mode === 'light'\n ? {\n navigation,\n accent,\n primary: grey[800],\n secondary: grey[700],\n disabled: grey[300],\n link: blue[500],\n linkHover: blue[600],\n }\n : {\n navigation,\n accent,\n primary: white,\n secondary: grey[50],\n disabled: grey[600],\n link: blue[400],\n linkHover: blue[500],\n };\n};\n"],"names":["grey","white","blue","text","mode","navigation","accent","primary","secondary","disabled","link","linkHover"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,SAASA,IAAI,EAAEC,KAAK,EAAEC,IAAI,QAAQ,WAAW;AAE7C,OAAO,MAAMC,OAAO,CAACC;IACnB,MAAMC,aAAaL,IAAI,CAAC,IAAI;IAC5B,MAAMM,SAASN,IAAI,CAAC,IAAI;IACxB,OAAOI,SAAS,UACZ;QACEC;QACAC;QACAC,SAASP,IAAI,CAAC,IAAI;QAClBQ,WAAWR,IAAI,CAAC,IAAI;QACpBS,UAAUT,IAAI,CAAC,IAAI;QACnBU,MAAMR,IAAI,CAAC,IAAI;QACfS,WAAWT,IAAI,CAAC,IAAI;IACtB,IACA;QACEG;QACAC;QACAC,SAASN;QACTO,WAAWR,IAAI,CAAC,GAAG;QACnBS,UAAUT,IAAI,CAAC,IAAI;QACnBU,MAAMR,IAAI,CAAC,IAAI;QACfS,WAAWT,IAAI,CAAC,IAAI;IACtB;AACN,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/theme/palette/warning.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { PaletteMode, SimplePaletteColorOptions } from '@mui/material';\nimport { orange } from './colors';\n\nexport const warning = (mode: PaletteMode): SimplePaletteColorOptions => {\n return mode === 'light'\n ? {\n main: orange[500],\n dark: orange[700],\n light: orange[50],\n }\n : {\n main: orange[400],\n dark: orange[800],\n light: orange[300],\n };\n};\n"],"names":["orange","warning","mode","main","dark","light"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,SAASA,MAAM,QAAQ,WAAW;AAElC,OAAO,MAAMC,UAAU,CAACC;IACtB,OAAOA,SAAS,UACZ;QACEC,MAAMH,MAAM,CAAC,IAAI;QACjBI,MAAMJ,MAAM,CAAC,IAAI;QACjBK,OAAOL,MAAM,CAAC,GAAG;IACnB,IACA;QACEG,MAAMH,MAAM,CAAC,IAAI;QACjBI,MAAMJ,MAAM,CAAC,IAAI;QACjBK,OAAOL,MAAM,CAAC,IAAI;IACpB;AACN,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/theme/theme.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { createTheme, PaletteMode, ThemeOptions, Theme } from '@mui/material';\nimport { MuiAlert } from './component-overrides/alert';\nimport { MuiPaper } from './component-overrides/paper';\nimport { getPaletteOptions } from './palette';\nimport { typography } from './typography';\n\nconst getModalBackgroundStyle = ({\n theme,\n}: {\n theme: Omit<Theme, 'components'>;\n}): { backgroundImage?: string; backgroundColor?: string } => {\n const backgroundStyle =\n theme.palette.mode === 'light'\n ? {}\n : {\n backgroundImage: 'unset',\n backgroundColor: theme.palette.designSystem.grey[800],\n };\n return {\n ...backgroundStyle,\n };\n};\n\n/**\n * Gets theme used by all components for the provided mode. For more details, see:\n * - Base colors, typography, sizing - go/chrono-ui-theme\n * - Material UI defaults: https://material-ui.com/customization/default-theme/\n * - Material UI variables: https://material-ui.com/customization/theming/#theme-configuration-variables\n * - Material UI global overrides and default props: https://material-ui.com/customization/globals/#css\n *\n * Need to reinstantiate the theme everytime to support switching between light and dark themes\n * https://github.com/mui-org/material-ui/issues/18831\n */\nexport function getTheme(mode: PaletteMode, options: ThemeOptions = {}): Theme {\n return createTheme({\n palette: getPaletteOptions(mode),\n typography,\n mixins: {},\n components,\n ...options,\n });\n}\n\n// Overrides for component default prop values and styles go here\nconst components: ThemeOptions['components'] = {\n MuiAlert,\n MuiFormControl: {\n defaultProps: {\n size: 'small',\n },\n },\n MuiPaper,\n MuiTextField: {\n defaultProps: {\n size: 'small',\n },\n },\n MuiDrawer: {\n styleOverrides: {\n paper: getModalBackgroundStyle,\n },\n },\n MuiDialog: {\n styleOverrides: {\n paper: getModalBackgroundStyle,\n },\n },\n MuiPopover: {\n styleOverrides: {\n paper: getModalBackgroundStyle,\n },\n },\n};\n"],"names":["createTheme","MuiAlert","MuiPaper","getPaletteOptions","typography","getModalBackgroundStyle","theme","backgroundStyle","palette","mode","backgroundImage","backgroundColor","designSystem","grey","getTheme","options","mixins","components","MuiFormControl","defaultProps","size","MuiTextField","MuiDrawer","styleOverrides","paper","MuiDialog","MuiPopover"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,WAAW,QAA0C,gBAAgB;AAC9E,SAASC,QAAQ,QAAQ,8BAA8B;AACvD,SAASC,QAAQ,QAAQ,8BAA8B;AACvD,SAASC,iBAAiB,QAAQ,YAAY;AAC9C,SAASC,UAAU,QAAQ,eAAe;AAE1C,MAAMC,0BAA0B,CAAC,EAC/BC,KAAK,EAGN;IACC,MAAMC,kBACJD,MAAME,OAAO,CAACC,IAAI,KAAK,UACnB,CAAC,IACD;QACEC,iBAAiB;QACjBC,iBAAiBL,MAAME,OAAO,CAACI,YAAY,CAACC,IAAI,CAAC,IAAI;IACvD;IACN,OAAO;QACL,GAAGN,eAAe;IACpB;AACF;AAEA;;;;;;;;;CASC,GACD,OAAO,SAASO,SAASL,IAAiB,EAAEM,UAAwB,CAAC,CAAC;IACpE,OAAOf,YAAY;QACjBQ,SAASL,kBAAkBM;QAC3BL;QACAY,QAAQ,CAAC;QACTC;QACA,GAAGF,OAAO;IACZ;AACF;AAEA,iEAAiE;AACjE,MAAME,aAAyC;IAC7ChB;IACAiB,gBAAgB;QACdC,cAAc;YACZC,MAAM;QACR;IACF;IACAlB;IACAmB,cAAc;QACZF,cAAc;YACZC,MAAM;QACR;IACF;IACAE,WAAW;QACTC,gBAAgB;YACdC,OAAOnB;QACT;IACF;IACAoB,WAAW;QACTF,gBAAgB;YACdC,OAAOnB;QACT;IACF;IACAqB,YAAY;QACVH,gBAAgB;YACdC,OAAOnB;QACT;IACF;AACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/theme/types/ThemeExtension.d.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Allows extending Lab types/components also\nimport type {} from '@mui/lab/themeAugmentation';\n\n// Use Typescript interface augmentation to extend the MUI type definition\ndeclare module '@mui/material' {\n interface Color {\n 150: string;\n 250: string;\n 350: string;\n 450: string;\n 550: string;\n 650: string;\n 750: string;\n 850: string;\n 950: string;\n }\n}\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,6CAA6C;AAC7C,WAAiD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/theme/typography.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport '@fontsource/lato/300.css';\nimport '@fontsource/lato/400.css';\nimport '@fontsource/lato/700.css';\nimport '@fontsource/lato/900.css';\nimport { ThemeOptions } from '@mui/material';\n\n// Font weights need to correspond with the imports at the top of the file\n// (Lato supports 100, 300, 400, 700, 900)\nconst fontWeightLight = 300;\nconst fontWeightRegular = 400;\nconst fontWeightMedium = 700;\nconst fontWeightBold = 900;\n\n/**\n * Theme typography options that are the same across both the dark and light themes.\n */\nexport const typography: ThemeOptions['typography'] = {\n fontFamily: '\"Lato\", sans-serif',\n\n fontWeightLight,\n fontWeightRegular,\n fontWeightMedium,\n fontWeightBold,\n\n h1: {\n fontSize: '1.5rem', // 24px\n fontWeight: fontWeightMedium,\n lineHeight: '32px',\n },\n h2: {\n fontSize: '1.25rem', // 20px\n fontWeight: fontWeightMedium,\n lineHeight: '28px',\n },\n h3: {\n fontSize: '1rem', // 16px\n fontWeight: fontWeightMedium,\n lineHeight: '24px',\n },\n h4: {\n fontSize: '0.875rem', // 14px\n fontWeight: fontWeightMedium,\n lineHeight: '22px',\n },\n h5: undefined,\n h6: undefined,\n\n body1: {\n fontSize: '0.875rem', // 14px\n fontWeight: fontWeightRegular,\n lineHeight: '20px',\n },\n body2: {\n fontSize: '0.75rem', // 12px\n fontWeight: fontWeightRegular,\n lineHeight: '18px',\n },\n subtitle1: {\n fontSize: '1rem', // 16px\n fontWeight: fontWeightRegular,\n lineHeight: '24px',\n letterSpacing: '0.02rem',\n },\n subtitle2: {\n fontSize: '0.875rem', // 14px\n fontWeight: fontWeightMedium,\n lineHeight: '22px',\n letterSpacing: '0.03rem',\n textTransform: 'uppercase',\n },\n\n button: {\n // 14px\n fontSize: '0.875rem',\n fontWeight: fontWeightMedium,\n // 20 px\n lineHeight: '1.25rem',\n textTransform: 'none',\n letterSpacing: '0.03rem',\n },\n caption: {\n fontSize: '0.6875rem', // 11px\n fontWeight: fontWeightRegular,\n lineHeight: '16px',\n },\n};\n"],"names":["fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","typography","fontFamily","h1","fontSize","fontWeight","lineHeight","h2","h3","h4","h5","undefined","h6","body1","body2","subtitle1","letterSpacing","subtitle2","textTransform","button","caption"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAO,2BAA2B;AAClC,OAAO,2BAA2B;AAClC,OAAO,2BAA2B;AAClC,OAAO,2BAA2B;AAGlC,0EAA0E;AAC1E,0CAA0C;AAC1C,MAAMA,kBAAkB;AACxB,MAAMC,oBAAoB;AAC1B,MAAMC,mBAAmB;AACzB,MAAMC,iBAAiB;AAEvB;;CAEC,GACD,OAAO,MAAMC,aAAyC;IACpDC,YAAY;IAEZL;IACAC;IACAC;IACAC;IAEAG,IAAI;QACFC,UAAU;QACVC,YAAYN;QACZO,YAAY;IACd;IACAC,IAAI;QACFH,UAAU;QACVC,YAAYN;QACZO,YAAY;IACd;IACAE,IAAI;QACFJ,UAAU;QACVC,YAAYN;QACZO,YAAY;IACd;IACAG,IAAI;QACFL,UAAU;QACVC,YAAYN;QACZO,YAAY;IACd;IACAI,IAAIC;IACJC,IAAID;IAEJE,OAAO;QACLT,UAAU;QACVC,YAAYP;QACZQ,YAAY;IACd;IACAQ,OAAO;QACLV,UAAU;QACVC,YAAYP;QACZQ,YAAY;IACd;IACAS,WAAW;QACTX,UAAU;QACVC,YAAYP;QACZQ,YAAY;QACZU,eAAe;IACjB;IACAC,WAAW;QACTb,UAAU;QACVC,YAAYN;QACZO,YAAY;QACZU,eAAe;QACfE,eAAe;IACjB;IAEAC,QAAQ;QACN,OAAO;QACPf,UAAU;QACVC,YAAYN;QACZ,QAAQ;QACRO,YAAY;QACZY,eAAe;QACfF,eAAe;IACjB;IACAI,SAAS;QACPhB,UAAU;QACVC,YAAYP;QACZQ,YAAY;IACd;AACF,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/axis.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport merge from 'lodash/merge';\nimport type { XAXisComponentOption, YAXisComponentOption } from 'echarts';\nimport { formatValue, FormatOptions } from '@perses-dev/core';\n\n/*\n * Populate yAxis or xAxis properties, returns an Array since multiple axes will be supported in the future\n */\nexport function getFormattedAxis(axis?: YAXisComponentOption | XAXisComponentOption, unit?: FormatOptions): unknown[] {\n // TODO: support alternate yAxis that shows on right side\n const AXIS_DEFAULT = {\n type: 'value',\n boundaryGap: [0, '10%'],\n axisLabel: {\n formatter: (value: number): string => {\n return formatValue(value, unit);\n },\n },\n };\n return [merge(AXIS_DEFAULT, axis)];\n}\n"],"names":["merge","formatValue","getFormattedAxis","axis","unit","AXIS_DEFAULT","type","boundaryGap","axisLabel","formatter","value"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAOA,WAAW,eAAe;AAEjC,SAASC,WAAW,QAAuB,mBAAmB;AAE9D;;CAEC,GACD,OAAO,SAASC,iBAAiBC,IAAkD,EAAEC,IAAoB;IACvG,yDAAyD;IACzD,MAAMC,eAAe;QACnBC,MAAM;QACNC,aAAa;YAAC;YAAG;SAAM;QACvBC,WAAW;YACTC,WAAW,CAACC;gBACV,OAAOT,YAAYS,OAAON;YAC5B;QACF;IACF;IACA,OAAO;QAACJ,MAAMK,cAAcF;KAAM;AACpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/chart-actions.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { ECharts as EChartsInstance } from 'echarts/core';\nimport { TimeSeries, TimeSeriesValueTuple } from '@perses-dev/core';\nimport { DatapointInfo, PINNED_CROSSHAIR_SERIES_NAME, TimeChartSeriesMapping } from '../model';\n\nexport interface ZoomEventData {\n start: number;\n end: number;\n}\n\n/**\n * Enable dataZoom without requring user to click toolbox icon.\n * https://stackoverflow.com/questions/57183297/is-there-a-way-to-use-zoom-of-type-select-without-showing-the-toolbar\n */\nexport function enableDataZoom(chart: EChartsInstance): void {\n const chartModel = chart['_model'];\n if (chartModel === undefined) return;\n if (chartModel.option.toolbox !== undefined && chartModel.option.toolbox.length > 0) {\n // check if hidden data zoom icon is unselected (if selected it would be 'emphasis' instead of 'normal')\n if (chartModel.option.toolbox[0].feature.dataZoom.iconStatus.zoom === 'normal') {\n chart.dispatchAction({\n type: 'takeGlobalCursor',\n key: 'dataZoomSelect',\n dataZoomSelectActive: true,\n });\n }\n }\n}\n\n/**\n * Restore chart to original state before zoom or other actions were dispatched\n */\nexport function restoreChart(chart: EChartsInstance): void {\n // TODO: support incremental unzoom instead of restore to original state\n chart.dispatchAction({\n type: 'restore', // https://echarts.apache.org/en/api.html#events.restore\n });\n}\n\n/*\n * Clear all highlighted series when cursor exits canvas\n * https://echarts.apache.org/en/api.html#action.downplay\n */\nexport function clearHighlightedSeries(chart: EChartsInstance): void {\n if (chart.dispatchAction !== undefined) {\n // Clear any selected data points\n chart.dispatchAction({\n type: 'unselect',\n });\n\n // Clear any highlighted series\n chart.dispatchAction({\n type: 'downplay',\n });\n }\n}\n\n/*\n * Convert a point from pixel coordinate to logical coordinate.\n * Used to determine if cursor is over chart canvas and closest datapoint.\n * https://echarts.apache.org/en/api.html#echartsInstance.convertFromPixel\n */\nexport function getPointInGrid(cursorCoordX: number, cursorCoordY: number, chart?: EChartsInstance): number[] | null {\n if (chart === undefined) {\n return null;\n }\n\n const pointInPixel = [cursorCoordX, cursorCoordY];\n if (!chart.containPixel('grid', pointInPixel)) {\n return null;\n }\n\n const pointInGrid: number[] = chart.convertFromPixel('grid', pointInPixel);\n return pointInGrid;\n}\n\n/*\n * TimeSeriesChart tooltip is built custom to support finding nearby series instead of single or all series.\n * This means ECharts actions need to be dispatched manually for series highlighting, datapoint select state, etc.\n * More info: https://echarts.apache.org/en/api.html#action\n */\nexport function batchDispatchNearbySeriesActions(\n chart: EChartsInstance,\n nearbySeriesIndexes: number[],\n emphasizedSeriesIndexes: number[],\n nonEmphasizedSeriesIndexes: number[],\n emphasizedDatapoints: DatapointInfo[],\n duplicateDatapoints: DatapointInfo[]\n): void {\n // Accounts for multiple series that are rendered direct on top of eachother.\n // Only applies select state to the datapoint that is visible to avoid color mismatch.\n const lastEmphasizedDatapoint =\n duplicateDatapoints.length > 0\n ? duplicateDatapoints[duplicateDatapoints.length - 1]\n : emphasizedDatapoints[emphasizedDatapoints.length - 1];\n if (lastEmphasizedDatapoint !== undefined) {\n // Corresponds to select options inside getTimeSeries util.\n // https://echarts.apache.org/en/option.html#series-line.select.itemStyle\n chart.dispatchAction({\n type: 'select',\n seriesIndex: lastEmphasizedDatapoint.seriesIndex,\n dataIndex: lastEmphasizedDatapoint.dataIndex,\n // Shared crosshair should not emphasize datapoints on adjacent charts.\n escapeConnect: true, // TODO: try to remove escapeConnect and match by seriesName for cross panel correlation\n });\n }\n\n // Clears emphasis state of all lines that are not emphasized.\n // Emphasized is a subset of just the nearby series that are closest to cursor.\n chart.dispatchAction({\n type: 'downplay',\n seriesIndex: nonEmphasizedSeriesIndexes,\n });\n\n // https://echarts.apache.org/en/api.html#action.highlight\n if (emphasizedSeriesIndexes.length > 0) {\n // Fadeout opacity of all series not closest to cursor.\n chart.dispatchAction({\n type: 'highlight',\n seriesIndex: emphasizedSeriesIndexes,\n notBlur: false, // ensure blur IS triggered, this is default but setting so it is explicit\n escapeConnect: true, // shared crosshair should not emphasize series on adjacent charts\n });\n } else {\n // When no emphasized series with bold text, notBlur allows opacity fadeout to not trigger.\n chart.dispatchAction({\n type: 'highlight',\n seriesIndex: nearbySeriesIndexes,\n notBlur: true, // do not trigger blur state when cursor is not immediately close to any series\n escapeConnect: true, // shared crosshair should not emphasize series on adjacent charts\n });\n\n // Clears selected datapoints since no bold series in tooltip, restore does not impact highlighting\n chart.dispatchAction({\n type: 'toggleSelect', // https://echarts.apache.org/en/api.html#action.toggleSelect\n });\n }\n}\n\n/*\n * Determine whether a markLine was pushed into the final series, which means crosshair was already pinned onClick\n */\nexport function checkCrosshairPinnedStatus(seriesMapping: TimeChartSeriesMapping): boolean {\n const isCrosshairPinned = seriesMapping[seriesMapping.length - 1]?.name === PINNED_CROSSHAIR_SERIES_NAME;\n return isCrosshairPinned;\n}\n\n/*\n * Find closest timestamp to logical x coordinate returned from echartsInstance.convertFromPixel\n * Used to find nearby series in time series tooltip.\n */\nexport function getClosestTimestamp(timeSeriesValues?: TimeSeriesValueTuple[], cursorX?: number): number | null {\n if (timeSeriesValues === undefined || cursorX === undefined) {\n return null;\n }\n\n let currentClosestTimestamp: number | null = null;\n let currentClosestDistance = Infinity;\n\n for (const [timestamp] of timeSeriesValues) {\n const distance = Math.abs(timestamp - cursorX);\n if (distance < currentClosestDistance) {\n currentClosestTimestamp = timestamp;\n currentClosestDistance = distance;\n }\n }\n return currentClosestTimestamp;\n}\n\n/*\n * Find closest timestamp in full dataset, used to snap crosshair into place onClick when tooltip is pinned.\n */\nexport function getClosestTimestampInFullDataset(data: TimeSeries[], cursorX?: number): number | null {\n if (cursorX === undefined) {\n return null;\n }\n const totalSeries = data.length;\n let closestTimestamp = null;\n for (let seriesIdx = 0; seriesIdx < totalSeries; seriesIdx++) {\n const currentDataset = totalSeries > 0 ? data[seriesIdx] : null;\n if (!currentDataset) break;\n const currentValues: TimeSeriesValueTuple[] = currentDataset.values;\n closestTimestamp = getClosestTimestamp(currentValues, cursorX);\n }\n return closestTimestamp;\n}\n"],"names":["PINNED_CROSSHAIR_SERIES_NAME","enableDataZoom","chart","chartModel","undefined","option","toolbox","length","feature","dataZoom","iconStatus","zoom","dispatchAction","type","key","dataZoomSelectActive","restoreChart","clearHighlightedSeries","getPointInGrid","cursorCoordX","cursorCoordY","pointInPixel","containPixel","pointInGrid","convertFromPixel","batchDispatchNearbySeriesActions","nearbySeriesIndexes","emphasizedSeriesIndexes","nonEmphasizedSeriesIndexes","emphasizedDatapoints","duplicateDatapoints","lastEmphasizedDatapoint","seriesIndex","dataIndex","escapeConnect","notBlur","checkCrosshairPinnedStatus","seriesMapping","isCrosshairPinned","name","getClosestTimestamp","timeSeriesValues","cursorX","currentClosestTimestamp","currentClosestDistance","Infinity","timestamp","distance","Math","abs","getClosestTimestampInFullDataset","data","totalSeries","closestTimestamp","seriesIdx","currentDataset","currentValues","values"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAIjC,SAAwBA,4BAA4B,QAAgC,WAAW;AAO/F;;;CAGC,GACD,OAAO,SAASC,eAAeC,KAAsB;IACnD,MAAMC,aAAaD,KAAK,CAAC,SAAS;IAClC,IAAIC,eAAeC,WAAW;IAC9B,IAAID,WAAWE,MAAM,CAACC,OAAO,KAAKF,aAAaD,WAAWE,MAAM,CAACC,OAAO,CAACC,MAAM,GAAG,GAAG;QACnF,wGAAwG;QACxG,IAAIJ,WAAWE,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AaE,YAAa;QAC5D,MAAMC,iBAAiBH,cAAc,IAAID,IAAI,CAACG,UAAU,GAAG;QAC3D,IAAI,CAACC,gBAAgB;QACrB,MAAMC,gBAAwCD,eAAeE,MAAM;QACnEJ,mBAAmBb,oBAAoBgB,eAAed;IACxD;IACA,OAAOW;AACT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/combine-sx.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { SxProps, Theme } from '@mui/material';\n\n/**\n * Combines sx props from multiple sources. Useful when creating a component and\n * you want consumers to be able to provide SxProps that should be combined with\n * some built-in styles.\n */\nexport function combineSx(...sxProps: Array<SxProps<Theme> | undefined>): SxProps<Theme> {\n return sxProps.flatMap((sx) => {\n if (sx === undefined) return [];\n if (Array.isArray(sx)) return sx;\n return [sx];\n });\n}\n"],"names":["combineSx","sxProps","flatMap","sx","undefined","Array","isArray"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAIjC;;;;CAIC,GACD,OAAO,SAASA,UAAU,GAAGC,OAA0C;IACrE,OAAOA,QAAQC,OAAO,CAAC,CAACC;QACtB,IAAIA,OAAOC,WAAW,OAAO,EAAE;QAC/B,IAAIC,MAAMC,OAAO,CAACH,KAAK,OAAOA;QAC9B,OAAO;YAACA;SAAG;IACb;AACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/component-ids.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { useRef } from 'react';\n\ndeclare global {\n // eslint-disable-next-line no-var\n var useIdValue: number;\n}\n\n/**\n * Generates a unique (stable) ID for a component. Should be replaced with React.useId once we support only React 18.\n */\nexport function useId(prefix: string): string {\n if (globalThis.useIdValue === undefined) {\n globalThis.useIdValue = 0;\n }\n\n const id = useRef<string | undefined>(undefined);\n if (id.current === undefined) {\n id.current = `${prefix}-${globalThis.useIdValue++}`;\n }\n return id.current;\n}\n"],"names":["useRef","useId","prefix","globalThis","useIdValue","undefined","id","current"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,MAAM,QAAQ,QAAQ;AAO/B;;CAEC,GACD,OAAO,SAASC,MAAMC,MAAc;IAClC,IAAIC,WAAWC,UAAU,KAAKC,WAAW;QACvCF,WAAWC,UAAU,GAAG;IAC1B;IAEA,MAAME,KAAKN,OAA2BK;IACtC,IAAIC,GAAGC,OAAO,KAAKF,WAAW;QAC5BC,GAAGC,OAAO,GAAG,GAAGL,OAAO,CAAC,EAAEC,WAAWC,UAAU,IAAI;IACrD;IACA,OAAOE,GAAGC,OAAO;AACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/format.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { formatInTimeZone } from 'date-fns-tz';\nimport { format } from 'date-fns';\n\nexport function dateFormatOptionsWithTimeZone(\n dateFormatOptions: Intl.DateTimeFormatOptions,\n timeZone?: string\n): Intl.DateTimeFormatOptions {\n /*\n * if timeZone is provided, and is not local|browser,\n * then set timeZone option (recognize UTC regardless of uppercase/lowercase)\n * otherwise, default to browser timeZone setting\n */\n if (timeZone) {\n const lowerTimeZone = timeZone.toLowerCase();\n if (lowerTimeZone !== 'local' && lowerTimeZone !== 'browser') {\n return {\n ...dateFormatOptions,\n timeZone: lowerTimeZone === 'utc' ? 'UTC' : timeZone,\n };\n }\n }\n return dateFormatOptions;\n}\n\nexport function formatWithTimeZone(date: Date, formatString: string, timeZone?: string): string {\n /*\n * if timeZone is provided, and is not local|browser,\n * then format using timeZone option (recognize UTC regardless of uppercase/lowercase)\n * otherwise, format without timeZone option, defaulting to browser timeZone setting\n */\n const lowerTimeZone = timeZone?.toLowerCase();\n if (!timeZone || lowerTimeZone === 'local' || lowerTimeZone === 'browser') {\n return format(date, formatString);\n } else {\n return formatInTimeZone(date, lowerTimeZone === 'utc' ? 'UTC' : timeZone, formatString);\n }\n}\n\n// https://echarts.apache.org/en/option.html#xAxis.axisLabel.formatter\nexport function getFormattedAxisLabel(rangeMs: number):\n | string\n | {\n month: '{MMM}';\n year: '{yearStyle|{yyyy}}\\n{monthStyle|{MMM}}';\n day: '{MM}/{dd}';\n } {\n const dayMs = 86400000;\n const monthMs = 2629440000;\n const yearMs = 31536000000;\n\n // more than 5 years\n if (rangeMs > yearMs * 5) {\n return '{yyyy}';\n }\n\n // more than 2 years\n if (rangeMs > yearMs * 2) {\n return '{MMM} {yyyy}';\n }\n\n // between 5 days to 6 months\n if (rangeMs > dayMs * 5 && rangeMs < monthMs * 6) {\n return '{MM}/{dd}'; // 12/01\n }\n\n // between 2 and 5 days\n if (rangeMs > dayMs * 2 && rangeMs <= dayMs * 5) {\n return '{MM}/{dd} {HH}:{mm}'; // 12/01 12:30\n }\n\n return {\n year: '{yearStyle|{yyyy}}\\n{monthStyle|{MMM}}',\n month: '{MMM}', // Jan, Feb, ...\n day: '{MM}/{dd}',\n };\n}\n\ninterface FormattedDateTime {\n formattedDate: string;\n formattedTime: string;\n}\n\nexport const getDateAndTime = (timeMs?: number): FormattedDateTime => {\n if (!timeMs) {\n return { formattedDate: '', formattedTime: '' };\n }\n const date = new Date(timeMs);\n const formattedDate = format(date, 'MMM dd, yyyy - ');\n const formattedTime = format(date, 'HH:mm:ss');\n return {\n formattedDate,\n formattedTime,\n };\n};\n"],"names":["formatInTimeZone","format","dateFormatOptionsWithTimeZone","dateFormatOptions","timeZone","lowerTimeZone","toLowerCase","formatWithTimeZone","date","formatString","getFormattedAxisLabel","rangeMs","dayMs","monthMs","yearMs","year","month","day","getDateAndTime","timeMs","formattedDate","formattedTime","Date"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,gBAAgB,QAAQ,cAAc;AAC/C,SAASC,MAAM,QAAQ,WAAW;AAElC,OAAO,SAASC,8BACdC,iBAA6C,EAC7CC,QAAiB;IAEjB;;;;GAIC,GACD,IAAIA,UAAU;QACZ,MAAMC,gBAAgBD,SAASE,WAAW;QAC1C,IAAID,kBAAkB,WAAWA,kBAAkB,WAAW;YAC5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n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './axis';\nexport * from './chart-actions';\nexport * from './combine-sx';\nexport * from './component-ids';\nexport * from './format';\nexport * from './theme-gen';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC,cAAc,eAAe;AAC7B,cAAc,kBAAkB;AAChC,cAAc,WAAW;AACzB,cAAc,cAAc"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/mathjs.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { roundDependencies, create } from 'mathjs';\n\n// This ensures we get a minimal mathjs bundle for just what we need (see https://mathjs.org/docs/custom_bundling.html)\nconst { round } = create({ roundDependencies });\nexport { round };\n"],"names":["roundDependencies","create","round"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,iBAAiB,EAAEC,MAAM,QAAQ,SAAS;AAEnD,uHAAuH;AACvH,MAAM,EAAEC,KAAK,EAAE,GAAGD,OAAO;IAAED;AAAkB;AAC7C,SAASE,KAAK,GAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/theme-gen.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Theme } from '@mui/material';\nimport merge from 'lodash/merge';\nimport { EChartsTheme, PersesChartsTheme } from '../model';\n\nconst DEFAULT_TEXT_COLOR = '#222';\n\n// avoid component override type errors since only palette and typography are used\ntype MuiTheme = Omit<Theme, 'components'>;\n\nexport function generateChartsTheme(\n muiTheme: MuiTheme,\n persesChartsThemeOverride: Partial<PersesChartsTheme>\n): PersesChartsTheme {\n const primaryTextColor = muiTheme.palette.text?.primary ?? DEFAULT_TEXT_COLOR;\n\n const muiConvertedTheme: EChartsTheme = {\n title: {\n show: false,\n },\n textStyle: {\n color: primaryTextColor,\n fontFamily: muiTheme.typography.fontFamily,\n fontSize: 12,\n },\n grid: {\n top: 5,\n right: 20,\n bottom: 0,\n left: 20,\n containLabel: true,\n },\n // Accessible categorical palette from: https://davidmathlogic.com/colorblind\n color: [\n '#56B4E9', // lt blue\n '#009E73', // med green\n '#0072B2', // dk blue\n '#CC79A7', // lt purple\n '#F0E442', // yellow\n '#E69F00', // orange\n '#D55E00', // red\n ],\n categoryAxis: {\n show: true,\n axisLabel: {\n show: true,\n color: primaryTextColor,\n margin: 15,\n },\n axisTick: {\n show: false,\n length: 6,\n lineStyle: {\n color: muiTheme.palette.grey[600],\n },\n },\n axisLine: {\n show: true,\n lineStyle: {\n color: muiTheme.palette.grey[600],\n },\n },\n splitLine: {\n show: true,\n lineStyle: {\n width: 0.5,\n color: muiTheme.palette.grey[300],\n opacity: 0.4,\n },\n },\n splitArea: {\n show: false,\n areaStyle: {\n color: [muiTheme.palette.grey[300]],\n },\n },\n },\n timeAxis: {\n show: true,\n axisLabel: {\n show: true,\n color: primaryTextColor,\n margin: 15,\n },\n axisTick: {\n show: false,\n length: 6,\n lineStyle: {\n color: muiTheme.palette.grey[600],\n },\n },\n axisLine: {\n show: true,\n lineStyle: {\n color: muiTheme.palette.grey[600],\n },\n },\n splitLine: {\n show: true,\n lineStyle: {\n width: 0.5,\n color: muiTheme.palette.grey[300],\n opacity: 0.4,\n },\n },\n splitArea: {\n show: false,\n areaStyle: {\n color: [muiTheme.palette.grey[300]],\n },\n },\n },\n valueAxis: {\n show: true,\n axisLabel: {\n color: primaryTextColor,\n margin: 12,\n },\n axisLine: {\n show: false,\n },\n splitLine: {\n show: true,\n lineStyle: {\n width: 0.5,\n color: muiTheme.palette.grey[300],\n opacity: 0.6,\n },\n },\n },\n legend: {\n orient: 'horizontal',\n textStyle: {\n color: primaryTextColor,\n },\n pageTextStyle: {\n color: muiTheme.palette.grey[600],\n },\n pageIconColor: muiTheme?.palette?.action?.active,\n pageIconInactiveColor: muiTheme?.palette?.action?.disabled,\n },\n toolbox: {\n show: true,\n top: 10,\n right: 10,\n iconStyle: {\n borderColor: primaryTextColor,\n },\n },\n tooltip: {\n backgroundColor: muiTheme.palette.designSystem?.grey[800],\n borderColor: muiTheme.palette.designSystem?.grey[800],\n textStyle: {\n color: '#fff',\n fontSize: 11,\n },\n },\n axisPointer: {\n lineStyle: {\n color: muiTheme.palette.grey[500],\n },\n },\n markLine: {\n symbol: 'none',\n symbolSize: 0,\n itemStyle: {\n color: muiTheme.palette.grey[500],\n },\n lineStyle: {\n type: 'dashed',\n width: 1,\n },\n },\n line: {\n showSymbol: false,\n symbol: 'circle',\n symbolSize: 4,\n smooth: false,\n lineStyle: {\n width: 1,\n },\n emphasis: {\n lineStyle: {\n width: 1.5,\n },\n },\n },\n bar: {\n barMaxWidth: 150,\n itemStyle: {\n borderWidth: 0,\n borderRadius: 0,\n borderColor: muiTheme.palette.grey[300],\n },\n label: {\n show: false,\n color: primaryTextColor,\n },\n },\n gauge: {\n detail: {\n fontSize: 18,\n fontWeight: 600,\n valueAnimation: false,\n },\n splitLine: {\n distance: 0,\n length: 4,\n lineStyle: {\n width: 1,\n },\n },\n splitNumber: 12,\n },\n };\n\n return merge(\n {\n echartsTheme: muiConvertedTheme,\n noDataOption: {\n title: {\n show: true,\n textStyle: {\n color: primaryTextColor,\n fontSize: 16,\n fontWeight: 400,\n },\n text: 'No data',\n left: 'center',\n top: 'center',\n },\n xAxis: {\n show: false,\n },\n yAxis: {\n show: false,\n },\n },\n sparkline: {\n width: 2,\n color: '#1976d2',\n },\n container: {\n padding: {\n default: parseInt(muiTheme.spacing(1.5), 10),\n },\n },\n thresholds: {\n defaultColor: muiTheme.palette.success.main,\n palette: ['#FFCC00', muiTheme.palette.warning.main, muiTheme.palette.error.main],\n },\n },\n persesChartsThemeOverride\n );\n}\n"],"names":["merge","DEFAULT_TEXT_COLOR","generateChartsTheme","muiTheme","persesChartsThemeOverride","primaryTextColor","palette","text","primary","muiConvertedTheme","title","show","textStyle","color","fontFamily","typography","fontSize","grid","top","right","bottom","left","containLabel","categoryAxis","axisLabel","margin","axisTick","length","lineStyle","grey","axisLine","splitLine","width","opacity","splitArea","areaStyle","timeAxis","valueAxis","legend","orient","pageTextStyle","pageIconColor","action","active","pageIconInactiveColor","disabled","toolbox","iconStyle","borderColor","tooltip","backgroundColor","designSystem","axisPointer","markLine","symbol","symbolSize","itemStyle","type","line","showSymbol","smooth","emphasis","bar","barMaxWidth","borderWidth","borderRadius","label","gauge","detail","fontWeight","valueAnimation","distance","splitNumber","echartsTheme","noDataOption","xAxis","yAxis","sparkline","container","padding","default","parseInt","spacing","thresholds","defaultColor","success","main","warning","error"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,OAAOA,WAAW,eAAe;AAGjC,MAAMC,qBAAqB;AAK3B,OAAO,SAASC,oBACdC,QAAkB,EAClBC,yBAAqD;IAErD,MAAMC,mBAAmBF,SAASG,OAAO,CAACC,IAAI,EAAEC,WAAWP;IAE3D,MAAMQ,oBAAkC;QACtCC,OAAO;YACLC,MAAM;QACR;QACAC,WAAW;YACTC,OAAOR;YACPS,YAAYX,SAASY,UAAU,CAACD,UAAU;YAC1CE,UAAU;QACZ;QACAC,MAAM;YACJC,KAAK;YACLC,OAAO;YACPC,QAAQ;YACRC,MAAM;YACNC,cAAc;QAChB;QACA,6EAA6E;QAC7ET,OAAO;YACL;YACA;YACA;YACA;YACA;YACA;YACA;SACD;QACDU,cAAc;YACZZ,MAAM;YACNa,WAAW;gBACTb,MAAM;gBACNE,OAAOR;gBACPoB,QAAQ;YACV;YACAC,UAAU;gBACRf,MAAM;gBACNgB,QAAQ;gBACRC,WAAW;oBACTf,OAAOV,SAASG,OAAO,CAACuB,IAAI,CAAC,IAAI;gBACnC;YACF;YACAC,UAAU;gBACRnB,MAAM;gBACNiB,WAAW;oBACTf,OAAOV,SAASG,OAAO,CAACuB,IAAI,CAAC,IAAI;gBACnC;YACF;YACAE,WAAW;gBACTpB,MAAM;gBACNiB,WAAW;oBACTI,OAAO;oBACPnB,OAAOV,SAASG,OAAO,CAACuB,IAAI,CAAC,IAAI;oBACjCI,SAAS;gBACX;YACF;YACAC,WAAW;gBACTvB,MAAM;gBACNwB,WAAW;oB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,SAAS;gBACPC,SAASC,SAAS9E,SAAS+E,OAAO,CAAC,MAAM;YAC3C;QACF;QACAC,YAAY;YACVC,cAAcjF,SAASG,OAAO,CAAC+E,OAAO,CAACC,IAAI;YAC3ChF,SAAS;gBAAC;gBAAWH,SAASG,OAAO,CAACiF,OAAO,CAACD,IAAI;gBAAEnF,SAASG,OAAO,CAACkF,KAAK,CAACF,IAAI;aAAC;QAClF;IACF,GACAlF;AAEJ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@perses-dev/components",
|
|
3
|
-
"version": "0.52.0-beta.
|
|
3
|
+
"version": "0.52.0-beta.4",
|
|
4
4
|
"description": "Common UI components used across Perses features",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/perses/perses/blob/main/README.md",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"scripts": {
|
|
18
18
|
"clean": "rimraf dist/",
|
|
19
19
|
"build": "concurrently \"npm:build:*\"",
|
|
20
|
-
"build:cjs": "swc ./src -d dist/cjs --config-file ../.cjs.swcrc",
|
|
21
|
-
"build:esm": "swc ./src -d dist --config-file ../.swcrc",
|
|
20
|
+
"build:cjs": "swc ./src -d dist/cjs --strip-leading-paths --config-file ../.cjs.swcrc",
|
|
21
|
+
"build:esm": "swc ./src -d dist --strip-leading-paths --config-file ../.swcrc",
|
|
22
22
|
"build:types": "tsc --project tsconfig.build.json",
|
|
23
23
|
"type-check": "tsc --noEmit",
|
|
24
24
|
"start": "concurrently -P \"npm:build:* -- {*}\" -- --watch",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@codemirror/lang-json": "^6.0.1",
|
|
34
34
|
"@fontsource/lato": "^4.5.10",
|
|
35
35
|
"@mui/x-date-pickers": "^7.23.1",
|
|
36
|
-
"@perses-dev/core": "0.52.0-beta.
|
|
36
|
+
"@perses-dev/core": "0.52.0-beta.4",
|
|
37
37
|
"@tanstack/react-table": "^8.20.5",
|
|
38
38
|
"@uiw/react-codemirror": "^4.19.1",
|
|
39
39
|
"date-fns": "^4.1.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/AlignSelector/AlignSelector.tsx"],"sourcesContent":["// Copyright 2024 The Perses Authors\n// Licensed under the Apache License | Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing | software\n// distributed under the License is distributed on an \"AS IS\" BASIS |\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND | either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Button, ButtonGroup, ButtonGroupProps } from '@mui/material';\nimport { ReactElement } from 'react';\n\nexport type AlignOption = 'left' | 'center' | 'right';\n\nexport interface AlignSelectorProps extends Omit<ButtonGroupProps, 'onChange'> {\n onChange: (align: AlignOption) => void;\n value?: AlignOption;\n}\n\nexport function AlignSelector({ onChange, value = 'left', ...props }: AlignSelectorProps): ReactElement {\n const handleSortChange = (option: AlignOption): void => {\n onChange(option);\n };\n\n return (\n <ButtonGroup aria-label=\"Alignement\" {...props}>\n <Button key=\"left\" onClick={() => handleSortChange('left')} variant={value === 'left' ? 'contained' : 'outlined'}>\n Left\n </Button>\n <Button\n key=\"center\"\n onClick={() => handleSortChange('center')}\n variant={value === 'center' ? 'contained' : 'outlined'}\n >\n Center\n </Button>\n <Button\n key=\"right\"\n onClick={() => handleSortChange('right')}\n variant={value === 'right' ? 'contained' : 'outlined'}\n >\n Right\n </Button>\n </ButtonGroup>\n );\n}\n"],"names":["Button","ButtonGroup","AlignSelector","onChange","value","props","handleSortChange","option","aria-label","onClick","variant"],"mappings":"AAAA,oCAAoC;AACpC,oEAAoE;AACpE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,wEAAwE;AACxE,qEAAqE;AACrE,6EAA6E;AAC7E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,MAAM,EAAEC,WAAW,QAA0B,gBAAgB;AAUtE,OAAO,SAASC,cAAc,EAAEC,QAAQ,EAAEC,QAAQ,MAAM,EAAE,GAAGC,OAA2B;IACtF,MAAMC,mBAAmB,CAACC;QACxBJ,SAASI;IACX;IAEA,qBACE,MAACN;QAAYO,cAAW;QAAc,GAAGH,KAAK;;0BAC5C,KAACL;gBAAkBS,SAAS,IAAMH,iBAAiB;gBAASI,SAASN,UAAU,SAAS,cAAc;0BAAY;eAAtG;0BAGZ,KAACJ;gBAECS,SAAS,IAAMH,iBAAiB;gBAChCI,SAASN,UAAU,WAAW,cAAc;0BAC7C;eAHK;0BAMN,KAACJ;gBAECS,SAAS,IAAMH,iBAAiB;gBAChCI,SAASN,UAAU,UAAU,cAAc;0BAC5C;eAHK;;;AAQZ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/ColorPicker/ColorPicker.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { IconButton, Stack, TextField } from '@mui/material';\nimport { ChangeEvent, ReactElement, useState } from 'react';\nimport { HexColorPicker } from 'react-colorful';\nimport CircleIcon from 'mdi-material-ui/Circle';\nimport DeleteIcon from 'mdi-material-ui/Delete';\n\ninterface ColorPickerProps {\n color: string;\n onChange?: (color: string) => void;\n onClear?: () => void;\n /**\n * Preset color palette\n */\n palette?: string[];\n}\n\nexport const ColorPicker = ({ color, onChange, onClear, palette }: ColorPickerProps): ReactElement => {\n // value is the visible value for the controlled text input\n const [value, setValue] = useState(color);\n\n const handleColorChange = (color: string): void => {\n setValue(color);\n onChange?.(color);\n };\n\n // we should update this if https://github.com/omgovich/react-colorful/issues/157 is resolved\n const handleInputChange = (e: ChangeEvent<HTMLInputElement>): void => {\n const inputValue = e.target.value.replace(/([^0-9A-F]+)/gi, '').substring(0, 8);\n setValue(`#${inputValue}`); // always prefix input value with # to indicate hex format\n // only set color if input value is a valid hex color\n if (isValidHex(e.target.value)) {\n onChange?.(e.target.value);\n }\n };\n\n return (\n <Stack spacing={1}>\n <HexColorPicker color={color} onChange={handleColorChange} style={{ width: '100%' }} />\n <Stack direction=\"row\" flexWrap=\"wrap\" justifyContent=\"space-evenly\" width=\"200px\">\n {palette &&\n palette.map((color, i) => (\n <IconButton\n key={i}\n size=\"small\"\n aria-label={`change color to ${color}`}\n sx={{ color }}\n onClick={() => handleColorChange(color)}\n >\n <CircleIcon />\n </IconButton>\n ))}\n </Stack>\n <Stack direction=\"row\" gap={1} alignItems=\"center\">\n <TextField\n inputProps={{ 'aria-label': 'enter hex color' }}\n fullWidth\n value={value}\n onChange={handleInputChange}\n />\n {onClear && (\n <IconButton onClick={onClear}>\n <DeleteIcon />\n </IconButton>\n )}\n </Stack>\n </Stack>\n );\n};\n\nconst isValidHex = (value: string, alpha?: boolean): boolean => {\n const matcher = /^#?([0-9A-F]{3,8})$/i;\n const match = matcher.exec(value);\n const length = match && match[1] ? match[1].length : 0;\n return (\n length === 3 || // '#rgb' format\n length === 6 || // '#rrggbb' format\n (!!alpha && length === 4) || // '#rgba' format\n (!!alpha && length === 8) // '#rrggbbaa' format\n );\n};\n"],"names":["IconButton","Stack","TextField","useState","HexColorPicker","CircleIcon","DeleteIcon","ColorPicker","color","onChange","onClear","palette","value","setValue","handleColorChange","handleInputChange","e","inputValue","target","replace","substring","isValidHex","spacing","style","width","direction","flexWrap","justifyContent","map","i","size","aria-label","sx","onClick","gap","alignItems","inputProps","fullWidth","alpha","matcher","match","exec","length"],"mappings":"AA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AM;wBACZyB,SAAS,IAAMnB,kBAAkBN;kCAEjC,cAAA,KAACH;uBANIwB;;0BAUb,MAAC5B;gBAAMwB,WAAU;gBAAMS,KAAK;gBAAGC,YAAW;;kCACxC,KAACjC;wBACCkC,YAAY;4BAAE,cAAc;wBAAkB;wBAC9CC,SAAS;wBACTzB,OAAOA;wBACPH,UAAUM;;oBAEXL,yBACC,KAACV;wBAAWiC,SAASvB;kCACnB,cAAA,KAACJ;;;;;;AAMb,EAAE;AAEF,MAAMe,aAAa,CAACT,OAAe0B;IACjC,MAAMC,UAAU;IAChB,MAAMC,QAAQD,QAAQE,IAAI,CAAC7B;IAC3B,MAAM8B,SAASF,SAASA,KAAK,CAAC,EAAE,GAAGA,KAAK,CAAC,EAAE,CAACE,MAAM,GAAG;IACrD,OACEA,WAAW,KAAK,gBAAgB;IAChCA,WAAW,KAAK,mBAAmB;IAClC,CAAC,CAACJ,SAASI,WAAW,KAAM,iBAAiB;IAC7C,CAAC,CAACJ,SAASI,WAAW,EAAG,qBAAqB;;AAEnD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/ColorPicker/OptionsColorPicker.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { ReactElement, useState, MouseEvent } from 'react';\nimport { styled, IconButton, Popover } from '@mui/material';\nimport CircleIcon from 'mdi-material-ui/Circle';\nimport { useChartsTheme } from '../context';\nimport { ColorPicker } from './ColorPicker';\n\nexport interface OptionsColorPickerProps {\n label: string;\n color: string;\n onColorChange: (color: string) => void;\n onClear?: () => void;\n}\n\nexport function OptionsColorPicker({ label, color, onColorChange, onClear }: OptionsColorPickerProps): ReactElement {\n const [anchorEl, setAnchorEl] = useState<HTMLButtonElement | null>(null);\n const isOpen = Boolean(anchorEl);\n\n const openColorPicker = (event: MouseEvent<HTMLButtonElement>): void => {\n setAnchorEl(event.currentTarget);\n };\n\n const closeColorPicker = (): void => {\n setAnchorEl(null);\n };\n\n const {\n thresholds: { defaultColor, palette },\n } = useChartsTheme();\n\n return (\n <>\n <ColorIconButton\n size=\"small\"\n aria-label={`change ${label} color`}\n isSelected={isOpen}\n iconColor={color}\n onClick={openColorPicker}\n >\n <CircleIcon />\n </ColorIconButton>\n <Popover\n data-testid=\"options color picker\"\n open={isOpen}\n anchorEl={anchorEl}\n onClose={closeColorPicker}\n slotProps={{ paper: { sx: { padding: (theme) => theme.spacing(2) } } }}\n anchorOrigin={{\n vertical: 'top',\n horizontal: 'left',\n }}\n transformOrigin={{\n vertical: 'top',\n horizontal: 'right',\n }}\n >\n <ColorPicker color={color} palette={[defaultColor, ...palette]} onChange={onColorChange} onClear={onClear} />\n </Popover>\n </>\n );\n}\n\nconst ColorIconButton = styled(IconButton, {\n shouldForwardProp: (props) => props !== 'isSelected' && props !== 'iconColor',\n})<{\n iconColor?: string;\n isSelected?: boolean;\n}>(({ iconColor, isSelected }) => ({\n backgroundColor: isSelected && iconColor ? `${iconColor}3F` : 'undefined', // 3F represents 25% opacity\n color: iconColor,\n}));\n"],"names":["useState","styled","IconButton","Popover","CircleIcon","useChartsTheme","ColorPicker","OptionsColorPicker","label","color","onColorChange","onClear","anchorEl","setAnchorEl","isOpen","Boolean","openColorPicker","event","currentTarget","closeColorPicker","thresholds","defaultColor","palette","ColorIconButton","size","aria-label","isSelected","iconColor","onClick","data-testid","open","onClose","slotProps","paper","sx","padding","theme","spacing","anchorOrigin","vertical","horizontal","transformOrigin","onChange","shouldForwardProp","props","backgroundColor"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CA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B,OAAOC,YAAY;IACzCyC,mBAAmB,CAACC,QAAUA,UAAU,gBAAgBA,UAAU;AACpE,GAGG,CAAC,EAAEjB,SAAS,EAAED,UAAU,EAAE,GAAM,CAAA;QACjCmB,iBAAiBnB,cAAcC,YAAY,GAAGA,UAAU,EAAE,CAAC,GAAG;QAC9DlB,OAAOkB;IACT,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/ColorPicker/index.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './ColorPicker';\nexport * from './OptionsColorPicker';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,gBAAgB;AAC9B,cAAc,uBAAuB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/ContentWithLegend/ContentWithLegend.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { ReactElement } from 'react';\nimport { Box, useTheme } from '@mui/material';\nimport { getLegendSize } from '@perses-dev/core';\nimport { Legend } from '../Legend';\nimport { ContentWithLegendProps, getContentWithLegendLayout } from './model/content-with-legend-model';\n\n/**\n * Component to help lay out content alongside a `Legend` component based on the\n * configuration of the legend.\n *\n * See the documentation for the `Legend` component for more details about the\n * features and configuration of the legend.\n */\nexport function ContentWithLegend({\n children,\n legendProps,\n width,\n height,\n spacing = 0,\n legendSize,\n minChildrenWidth = 100,\n minChildrenHeight = 100,\n}: ContentWithLegendProps): ReactElement {\n const theme = useTheme();\n const { content, legend, margin } = getContentWithLegendLayout({\n width,\n height,\n legendProps,\n minChildrenHeight,\n minChildrenWidth,\n spacing,\n theme,\n legendSize: getLegendSize(legendSize),\n });\n\n return (\n <Box\n style={{\n width,\n height,\n }}\n sx={{\n position: 'relative',\n overflow: 'hidden',\n }}\n >\n <Box\n style={{\n width: content.width,\n height: content.height,\n }}\n sx={{\n marginRight: `${margin.right}px`,\n marginBottom: `${margin.bottom}px`,\n }}\n >\n {typeof children === 'function' ? children({ width: content.width, height: content.height }) : children}\n </Box>\n {legendProps && legend.show && <Legend {...legendProps} height={legend.height} width={legend.width} />}\n </Box>\n );\n}\n"],"names":["Box","useTheme","getLegendSize","Legend","getContentWithLegendLayout","ContentWithLegend","children","legendProps","width","height","spacing","legendSize","minChildrenWidth","minChildrenHeight","theme","content","legend","margin","style","sx","position","overflow","marginRight","right","marginBottom","bottom","show"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAGjC,SAASA,GAAG,EAAEC,QAAQ,QAAQ,gBAAgB;AAC9C,SAASC,aAAa,QAAQ,mBAAmB;AACjD,SAASC,MAAM,QAAQ,YAAY;AACnC,SAAiCC,0BAA0B,QAAQ,oCAAoC;AAEvG;;;;;;CAMC,GACD,OAAO,SAASC,kBAAkB,EAChCC,QAAQ,EACRC,WAAW,EACXC,KAAK,EACLC,MAAM,EACNC,UAAU,CAAC,EACXC,UAAU,EACVC,mBAAmB,GAAG,EACtBC,oBAAoB,GAAG,EACA;IACvB,MAAMC,QAAQb;IACd,MAAM,EAAEc,OAAO,EAAEC,MAAM,EAAEC,MAAM,EAAE,GAAGb,2BAA2B;QAC7DI;QACAC;QACAF;QACAM;QACAD;QACAF;QACAI;QACAH,YAAYT,cAAcS;IAC5B;IAEA,qBACE,MAACX;QACCkB,OAAO;YACLV;YACAC;QACF;QACAU,IAAI;YACFC,UAAU;YACVC,UAAU;QACZ;;0BAEA,KAACrB;gBACCkB,OAAO;oBACLV,OAAOO,QAAQP,KAAK;oBACpBC,QAAQM,QAAQN,MAAM;gBACxB;gBACAU,IAAI;oBACFG,aAAa,GAAGL,OAAOM,KAAK,CAAC,EAAE,CAAC;oBAChCC,cAAc,GAAGP,OAAOQ,MAAM,CAAC,EAAE,CAAC;gBACpC;0BAEC,OAAOnB,aAAa,aAAaA,SAAS;oBAAEE,OAAOO,QAAQP,KAAK;oBAAEC,QAAQM,QAAQN,MAAM;gBAAC,KAAKH;;YAEhGC,eAAeS,OAAOU,IAAI,kBAAI,KAACvB;gBAAQ,GAAGI,WAAW;gBAAEE,QAAQO,OAAOP,MAAM;gBAAED,OAAOQ,OAAOR,KAAK;;;;AAGxG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/ContentWithLegend/index.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './ContentWithLegend';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,sBAAsB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/ContentWithLegend/model/content-with-legend-model.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Theme } from '@mui/material';\nimport { LegendPositions, getLegendMode, LegendSize } from '@perses-dev/core';\nimport { LegendProps } from '../../Legend';\nimport { getTableCellLayout } from '../../Table';\n\ntype Dimensions = {\n width: number;\n height: number;\n};\n\nexport interface ContentWithLegendProps {\n /**\n * Width of the overall component layout in pixels.\n */\n width: number;\n /**\n * Height of overall component layout in pixels.\n */\n height: number;\n /**\n * Child content to render next to the legend. May be a react node or a\n * function that returns a react node. The function provides the expected\n * height and width for the content, which can be useful for passing down\n * to chart components.\n */\n children: React.ReactNode | (({ width, height }: Dimensions) => React.ReactNode);\n\n /**\n * Size used for the legend.\n *\n * @default 'medium'\n */\n legendSize?: LegendSize;\n\n /**\n * Props to configure the legend. If not set, the content is rendered without\n * a legend.\n */\n legendProps?: Omit<LegendProps, 'width' | 'height'>;\n\n /**\n * Space to put between the children and the legend in pixels.\n */\n spacing?: number;\n\n /**\n * Minimum width required for the content specified by the `children` prop.\n * If this width cannot be maintained with a right positioned legend, the\n * legend will not be shown.\n */\n minChildrenWidth?: number;\n\n /**\n * Minimum height required for the content specified by the `children` prop.\n * If this width cannot be maintained with a bottom positioned legend, the\n * legend will not be shown.\n */\n minChildrenHeight?: number;\n}\n\nexport interface ContentWithLegendLayoutOpts\n extends Required<Omit<ContentWithLegendProps, 'children' | 'legendProps'>> {\n legendProps?: ContentWithLegendProps['legendProps'];\n theme: Theme;\n}\n\nexport interface ContentWithLegendLayout {\n legend: Dimensions & {\n show: boolean;\n };\n content: Dimensions;\n margin: {\n right: number;\n bottom: number;\n };\n}\n\ntype LegendSizeConfig = Record<LegendSize, Record<LegendPositions, number>>;\n\nexport const TABLE_LEGEND_SIZE: LegendSizeConfig = {\n medium: {\n // 5 rows plus header. Value to be multiplied by row height in pixels.\n bottom: 6,\n\n // Pixel value\n right: 250,\n },\n small: {\n // 3 rows plus header. Value to be multiplied by row height in pixels.\n bottom: 4,\n\n // Pixel value\n right: 150,\n },\n};\n\nconst PANEL_HEIGHT_LG_BREAKPOINT = 300;\nconst LEGEND_HEIGHT_SM = 40;\nconst LEGEND_HEIGHT_LG = 100;\n\n/**\n * Returns information for laying out content alongside a legend.\n */\nexport function getContentWithLegendLayout({\n width,\n height,\n legendProps,\n legendSize,\n minChildrenHeight,\n minChildrenWidth,\n spacing,\n theme,\n}: ContentWithLegendLayoutOpts): ContentWithLegendLayout {\n const legendOptions = legendProps?.options;\n const hasLegend = !!legendOptions;\n\n const noLegendLayout: ContentWithLegendLayout = {\n legend: {\n show: false,\n width: 0,\n height: 0,\n },\n content: {\n width,\n height,\n },\n margin: {\n right: 0,\n bottom: 0,\n },\n };\n\n if (!hasLegend) {\n return noLegendLayout;\n }\n\n const { position } = legendOptions;\n const mode = getLegendMode(legendOptions.mode);\n\n let legendWidth;\n let legendHeight;\n\n if (mode === 'list') {\n // TODO: normalize list to share similar height options as the table\n // when we add more size options.\n legendWidth = position === 'right' ? 200 : width;\n\n // TODO: account for number of legend items returned when adjusting legend spacing\n legendHeight = LEGEND_HEIGHT_SM;\n if (position === 'right') {\n legendHeight = height;\n } else if (height >= PANEL_HEIGHT_LG_BREAKPOINT) {\n legendHeight = LEGEND_HEIGHT_LG;\n }\n } else {\n // Table mode\n\n const tableLayout = getTableCellLayout(theme, 'compact');\n\n const tableColumns = legendProps?.tableProps?.columns || [];\n const columnsWidth = tableColumns.reduce((total, col) => {\n if (typeof col.width === 'number') {\n total += col.width;\n }\n return total;\n }, 0);\n\n legendWidth = position === 'right' ? TABLE_LEGEND_SIZE[legendSize]['right'] + columnsWidth : width;\n\n // Use the smaller of the size-based row count or the number of legend items + 1 for the header.\n const rowsToShow = Math.min(TABLE_LEGEND_SIZE[legendSize]['bottom'], legendProps.data.length + 1);\n legendHeight = position === 'bottom' ? rowsToShow * tableLayout.height : height;\n }\n\n const contentWidth = position === 'right' ? width - legendWidth - spacing : width;\n const contentHeight = position === 'bottom' ? height - legendHeight - spacing : height;\n\n if (\n (position === 'right' && contentWidth < minChildrenWidth) ||\n (position === 'bottom' && contentHeight < minChildrenHeight)\n ) {\n // Legend does not fit. Just show the content.\n return noLegendLayout;\n }\n\n return {\n legend: {\n width: legendWidth,\n height: legendHeight,\n show: true,\n },\n content: {\n width: contentWidth,\n height: contentHeight,\n },\n margin: {\n right: position === 'right' ? spacing : 0,\n bottom: position === 'bottom' ? spacing : 0,\n },\n };\n}\n"],"names":["getLegendMode","getTableCellLayout","TABLE_LEGEND_SIZE","medium","bottom","right","small","PANEL_HEIGHT_LG_BREAKPOINT","LEGEND_HEIGHT_SM","LEGEND_HEIGHT_LG","getContentWithLegendLayout","width","height","legendProps","legendSize","minChildrenHeight","minChildrenWidth","spacing","theme","legendOptions","options","hasLegend","noLegendLayout","legend","show","content","margin","position","mode","legendWidth","legendHeight","tableLayout","tableColumns","tableProps","columns","columnsWidth","reduce","total","col","rowsToShow","Math","min","data","length","contentWidth","contentHeight"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1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,MAAMc,eAAenB,aAAaoB,YAAYC,WAAW,EAAE;QAC3D,MAAMC,eAAeH,aAAaI,MAAM,CAAC,CAACC,OAAOC;YAC/C,IAAI,OAAOA,IAAI3B,KAAK,KAAK,UAAU;gBACjC0B,SAASC,IAAI3B,KAAK;YACpB;YACA,OAAO0B;QACT,GAAG;QAEHR,cAAcF,aAAa,UAAUzB,iBAAiB,CAACY,WAAW,CAAC,QAAQ,GAAGqB,eAAexB;QAE7F,gGAAgG;QAChG,MAAM4B,aAAaC,KAAKC,GAAG,CAACvC,iBAAiB,CAACY,WAAW,CAAC,SAAS,EAAED,YAAY6B,IAAI,CAACC,MAAM,GAAG;QAC/Fb,eAAeH,aAAa,WAAWY,aAAaR,YAAYnB,MAAM,GAAGA;IAC3E;IAEA,MAAMgC,eAAejB,aAAa,UAAUhB,QAAQkB,cAAcZ,UAAUN;IAC5E,MAAMkC,gBAAgBlB,aAAa,WAAWf,SAASkB,eAAeb,UAAUL;IAEhF,IACE,AAACe,aAAa,WAAWiB,eAAe5B,oBACvCW,aAAa,YAAYkB,gBAAgB9B,mBAC1C;QACA,8CAA8C;QAC9C,OAAOO;IACT;IAEA,OAAO;QACLC,QAAQ;YACNZ,OAAOkB;YACPjB,QAAQkB;YACRN,MAAM;QACR;QACAC,SAAS;YACPd,OAAOiC;YACPhC,QAAQiC;QACV;QACAnB,QAAQ;YACNrB,OAAOsB,aAAa,UAAUV,UAAU;YACxCb,QAAQuB,aAAa,WAAWV,UAAU;QAC5C;IACF;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/DensitySelector/DensitySelector.tsx"],"sourcesContent":["// Copyright 2024 The Perses Authors\n// Licensed under the Apache License | Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing | software\n// distributed under the License is distributed on an \"AS IS\" BASIS |\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND | either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { ReactElement } from 'react';\nimport { OptionsEditorControl } from '../OptionsEditorLayout';\nimport { SettingsAutocomplete } from '../SettingsAutocomplete';\n\nconst DENSITY_OPTIONS: Array<{ id: DensityOption; label: string }> = [\n { id: 'compact', label: 'Compact' },\n { id: 'standard', label: 'Standard' },\n { id: 'comfortable', label: 'Comfortable' },\n];\n\nexport type DensityOption = 'compact' | 'standard' | 'comfortable';\n\nexport interface DensitySelectorProps {\n onChange: (density: DensityOption) => void;\n value?: DensityOption;\n}\n\nexport function DensitySelector({ onChange, value = 'standard' }: DensitySelectorProps): ReactElement {\n const handleSortChange = (_: unknown, { id }: { id: DensityOption }): void => {\n onChange(id);\n };\n\n return (\n <OptionsEditorControl\n label=\"Density\"\n control={\n <SettingsAutocomplete\n value={DENSITY_OPTIONS.find((o) => o.id === value)}\n options={DENSITY_OPTIONS}\n getOptionLabel={(o) => o.label}\n onChange={handleSortChange}\n disableClearable\n />\n }\n />\n );\n}\n"],"names":["OptionsEditorControl","SettingsAutocomplete","DENSITY_OPTIONS","id","label","DensitySelector","onChange","value","handleSortChange","_","control","find","o","options","getOptionLabel","disableClearable"],"mappings":"AAAA,oCAAoC;AACpC,oEAAoE;AACpE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,wEAAwE;AACxE,qEAAqE;AACrE,6EAA6E;AAC7E,sEAAsE;AACtE,iCAAiC;;AAGjC,SAASA,oBAAoB,QAAQ,yBAAyB;AAC9D,SAASC,oBAAoB,QAAQ,0BAA0B;AAE/D,MAAMC,kBAA+D;IACnE;QAAEC,IAAI;QAAWC,OAAO;IAAU;IAClC;QAAED,IAAI;QAAYC,OAAO;IAAW;IACpC;QAAED,IAAI;QAAeC,OAAO;IAAc;CAC3C;AASD,OAAO,SAASC,gBAAgB,EAAEC,QAAQ,EAAEC,QAAQ,UAAU,EAAwB;IACpF,MAAMC,mBAAmB,CAACC,GAAY,EAAEN,EAAE,EAAyB;QACjEG,SAASH;IACX;IAEA,qBACE,KAACH;QACCI,OAAM;QACNM,uBACE,KAACT;YACCM,OAAOL,gBAAgBS,IAAI,CAAC,CAACC,IAAMA,EAAET,EAAE,KAAKI;YAC5CM,SAASX;YACTY,gBAAgB,CAACF,IAAMA,EAAER,KAAK;YAC9BE,UAAUE;YACVO,gBAAgB;;;AAK1B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Dialog/Dialog.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { ReactElement, MouseEvent } from 'react';\nimport {\n Button,\n ButtonProps,\n Dialog as MuiDialog,\n DialogActions,\n DialogContent,\n DialogContentProps as MuiDialogContentProps,\n DialogProps,\n DialogTitle,\n DialogTitleProps,\n IconButton,\n styled,\n Theme,\n} from '@mui/material';\nimport CloseIcon from 'mdi-material-ui/Close';\nimport { combineSx } from '../utils';\n\nexport interface DialogHeaderProps extends DialogTitleProps {\n /**\n * Callback fired when close button is clicked. If undefined, close button will not appear in header.\n */\n onClose?: (e: MouseEvent<HTMLElement>) => void;\n}\n\nexport type DialogButtonProps = Omit<ButtonProps, 'variant' | 'color' | 'type'>;\n\nexport type DialogContentProps = MuiDialogContentProps;\n\nconst Header = ({ children, onClose, ...props }: DialogHeaderProps): ReactElement => {\n return (\n <>\n <DialogTitle style={{ textOverflow: 'ellipsis', overflow: 'hidden' }} {...props}>\n {children}\n </DialogTitle>\n {onClose && (\n <IconButton aria-label=\"Close\" onClick={onClose} sx={dialogCloseIconButtonStyle}>\n <CloseIcon />\n </IconButton>\n )}\n </>\n );\n};\n\nconst Content = ({ children, sx, ...props }: DialogContentProps): ReactElement => (\n <DialogContent dividers {...props} sx={combineSx({ minWidth: `500px`, textWrap: 'balance' }, sx)}>\n {children}\n </DialogContent>\n);\n\nconst PrimaryButton = ({ children, ...props }: DialogButtonProps): ReactElement => (\n <Button variant=\"contained\" type=\"submit\" {...props}>\n {children}\n </Button>\n);\n\nconst SecondaryButton = ({ children, ...props }: DialogButtonProps): ReactElement => (\n <Button variant=\"outlined\" color=\"secondary\" {...props}>\n {children}\n </Button>\n);\n\n/*\n * Material-ui has a prop \"scroll=paper\" that is specifically for dialog header and actions to be sticky and body to scroll,\n * but that doesn't work when dialog content is wrapped in form.\n * https://github.com/mui-org/material-ui/issues/13253\n * This component adds style to get expected behavior & should be used whenever we have a Form inside a Dialog\n */\nconst Form = styled('form')({\n overflowY: 'auto',\n display: 'flex',\n flexDirection: 'column',\n});\n\n/**\n * Render the CSS of the dialog's close button, according to the given material theme.\n * @param theme material theme\n */\nconst dialogCloseIconButtonStyle = (theme: Theme): Record<string, unknown> => {\n return { position: 'absolute', top: theme.spacing(0.5), right: theme.spacing(0.5) };\n};\n\nexport const Dialog = ({ children, ...props }: DialogProps): ReactElement => (\n <MuiDialog {...props}>{children}</MuiDialog>\n);\n\nDialog.Header = Header;\nDialog.Form = Form;\nDialog.Content = Content;\nDialog.PrimaryButton = PrimaryButton;\nDialog.SecondaryButton = SecondaryButton;\nDialog.Actions = DialogActions;\n"],"names":["Button","Dialog","MuiDialog","DialogActions","DialogContent","DialogTitle","IconButton","styled","CloseIcon","combineSx","Header","children","onClose","props","style","textOverflow","overflow","aria-label","onClick","sx","dialogCloseIconButtonStyle","Content","dividers","minWidth","textWrap","PrimaryButton","variant","type","SecondaryButton","color","Form","overflowY","display","flexDirection","theme","position","top","spacing","right","Actions"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mE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AYC,KAAKF,MAAMG,OAAO,CAAC;QAAMC,OAAOJ,MAAMG,OAAO,CAAC;IAAK;AACpF;AAEA,OAAO,MAAMpC,SAAS,CAAC,EAAEU,QAAQ,EAAE,GAAGE,OAAoB,iBACxD,KAACX;QAAW,GAAGW,KAAK;kBAAGF;OACvB;AAEFV,OAAOS,MAAM,GAAGA;AAChBT,OAAO6B,IAAI,GAAGA;AACd7B,OAAOoB,OAAO,GAAGA;AACjBpB,OAAOwB,aAAa,GAAGA;AACvBxB,OAAO2B,eAAe,GAAGA;AACzB3B,OAAOsC,OAAO,GAAGpC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Dialog/DiscardChangesConfirmationDialog.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Button } from '@mui/material';\nimport { ReactElement } from 'react';\nimport { Dialog } from './Dialog';\n\ninterface DiscardChangesConfirmationDialogProps {\n description: string;\n isOpen: boolean;\n onCancel: () => void;\n onDiscardChanges: () => void;\n}\n\nexport const DiscardChangesConfirmationDialog = (props: DiscardChangesConfirmationDialogProps): ReactElement => {\n const { description, isOpen, onCancel, onDiscardChanges } = props;\n\n return (\n <Dialog open={isOpen} aria-labelledby=\"discard-dialog\">\n <Dialog.Header>Discard Changes</Dialog.Header>\n <Dialog.Content>{description}</Dialog.Content>\n <Dialog.Actions>\n <Button variant=\"contained\" onClick={onDiscardChanges}>\n Discard Changes\n </Button>\n <Button variant=\"outlined\" color=\"secondary\" onClick={onCancel}>\n Cancel\n </Button>\n </Dialog.Actions>\n </Dialog>\n );\n};\n"],"names":["Button","Dialog","DiscardChangesConfirmationDialog","props","description","isOpen","onCancel","onDiscardChanges","open","aria-labelledby","Header","Content","Actions","variant","onClick","color"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,MAAM,QAAQ,gBAAgB;AAEvC,SAASC,MAAM,QAAQ,WAAW;AASlC,OAAO,MAAMC,mCAAmC,CAACC;IAC/C,MAAM,EAAEC,WAAW,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,gBAAgB,EAAE,GAAGJ;IAE5D,qBACE,MAACF;QAAOO,MAAMH;QAAQI,mBAAgB;;0BACpC,KAACR,OAAOS,MAAM;0BAAC;;0BACf,KAACT,OAAOU,OAAO;0BAAEP;;0BACjB,MAACH,OAAOW,OAAO;;kCACb,KAACZ;wBAAOa,SAAQ;wBAAYC,SAASP;kCAAkB;;kCAGvD,KAACP;wBAAOa,SAAQ;wBAAWE,OAAM;wBAAYD,SAASR;kCAAU;;;;;;AAMxE,EAAE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/DragAndDrop/DragAndDropList.tsx"],"sourcesContent":["// Copyright 2024 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { ReactElement, ReactNode, useEffect, useRef, useState } from 'react';\nimport { reorderWithEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/util/reorder-with-edge';\nimport {\n monitorForElements,\n draggable,\n dropTargetForElements,\n} from '@atlaskit/pragmatic-drag-and-drop/element/adapter';\nimport { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';\nimport { attachClosestEdge, extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';\nimport { Stack } from '@mui/material';\nimport { idle, State } from './model';\nimport { DropIndicator } from './DropIndicator';\n\ninterface MonitorElementsProps {\n elements: Array<Record<string, unknown>>;\n accessKey: string;\n axis?: 'vertical' | 'horizontal';\n onChange: (elements: Array<Record<string, unknown>>) => void;\n}\n\n/**\n * This hook is responsible for monitoring the drag and drop of elements.\n * It will call the onChange function with the new order of elements when a drop is detected.\n *\n * @param elements - The list of elements to monitor\n * @param accessKey - The key to use to identify the elements (key of the object)\n * @param axis - The axis to monitor the drag and drop on\n * @param onChange - The function to call when a drop is detected\n */\nexport function useDragAndDropMonitor({\n elements,\n accessKey,\n axis = 'vertical',\n onChange,\n}: MonitorElementsProps): void {\n return useEffect(() => {\n return monitorForElements({\n onDrop({ location, source }) {\n const target = location.current.dropTargets[0];\n if (!target) {\n return;\n }\n\n const sourceData = source.data;\n const targetData = target.data;\n\n const indexOfSource = elements.findIndex((column) => column[accessKey] === sourceData[accessKey]);\n const indexOfTarget = elements.findIndex((column) => column[accessKey] === targetData[accessKey]);\n\n if (indexOfTarget < 0 || indexOfSource < 0) {\n return;\n }\n\n const closestEdgeOfTarget = extractClosestEdge(targetData);\n\n onChange(\n reorderWithEdge({\n list: elements,\n startIndex: indexOfSource,\n indexOfTarget,\n closestEdgeOfTarget,\n axis: axis,\n })\n );\n },\n });\n }, [accessKey, axis, elements, onChange]);\n}\n\nexport interface DragAndDropElementProps {\n children: ReactNode;\n data: Record<string, unknown>;\n}\n\n/*\n * This component wraps the children that should be draggable\n */\nexport function DragAndDropElement({ children, data }: DragAndDropElementProps): ReactElement {\n const ref = useRef<HTMLDivElement>(null);\n const [state, setState] = useState<State>(idle);\n\n useEffect(() => {\n const element = ref.current;\n if (!element) {\n return;\n }\n\n return combine(\n draggable({\n element,\n getInitialData() {\n return data;\n },\n onDragStart() {\n setState({ type: 'is-dragging' });\n },\n onDrop() {\n setState(idle);\n },\n }),\n dropTargetForElements({\n element,\n canDrop({ source }) {\n // not allowing dropping on yourself\n if (source.element === element) {\n return false;\n }\n // only allowing tasks to be dropped on me\n return true;\n },\n getData({ input }) {\n return attachClosestEdge(data, {\n element,\n input,\n allowedEdges: ['top', 'bottom'],\n });\n },\n getIsSticky() {\n return true;\n },\n onDragEnter({ self }) {\n const closestEdge = extractClosestEdge(self.data);\n setState({ type: 'is-dragging-over', closestEdge });\n },\n onDrag({ self }) {\n const closestEdge = extractClosestEdge(self.data);\n\n // Only need to update react state if nothing has changed.\n // Prevents re-rendering.\n setState((current) => {\n if (current.type === 'is-dragging-over' && current.closestEdge === closestEdge) {\n return current;\n }\n return { type: 'is-dragging-over', closestEdge };\n });\n },\n onDragLeave() {\n setState(idle);\n },\n onDrop() {\n setState(idle);\n },\n })\n );\n }, [data]);\n\n return (\n <Stack ref={ref} spacing={1} style={{ opacity: state.type === 'is-dragging' ? 0.5 : 'unset' }}>\n {state.type === 'is-dragging-over' && state.closestEdge === 'top' ? <DropIndicator /> : null}\n {children}\n {state.type === 'is-dragging-over' && state.closestEdge === 'bottom' ? <DropIndicator /> : null}\n </Stack>\n );\n}\n"],"names":["useEffect","useRef","useState","reorderWithEdge","monitorForElements","draggable","dropTargetForElements","combine","attachClosestEdge","extractClosestEdge","Stack","idle","DropIndicator","useDragAndDropMonitor","elements","accessKey","axis","onChange","onDrop","location","source","target","current","dropTargets","sourceData","data","targetData","indexOfSource","findIndex","column","indexOfTarget","closestEdgeOfTarget","list","startIndex","DragAndDropElement","children","ref","state","setState","element","getInitialData","onDragStart","type","canDrop","getData","input","allowedEdges","getIsSticky","onDragEnter","self","closestEdge","onDrag","onDragLeave","spacing","style","opacity"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE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,GAAG;QAACc;KAAK;IAET,qBACE,MAACf;QAAM0B,KAAKA;QAAKiB,SAAS;QAAGC,OAAO;YAAEC,SAASlB,MAAMK,IAAI,KAAK,gBAAgB,MAAM;QAAQ;;YACzFL,MAAMK,IAAI,KAAK,sBAAsBL,MAAMa,WAAW,KAAK,sBAAQ,KAACtC,qBAAmB;YACvFuB;YACAE,MAAMK,IAAI,KAAK,sBAAsBL,MAAMa,WAAW,KAAK,yBAAW,KAACtC,qBAAmB;;;AAGjG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/DragAndDrop/DragButton.tsx"],"sourcesContent":["// Copyright 2024 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { IconButton, IconButtonProps, Menu, MenuItem, MenuProps } from '@mui/material';\nimport DragIcon from 'mdi-material-ui/Drag';\nimport { useState, MouseEvent, ReactElement, forwardRef } from 'react';\n\nexport function handleMoveUp<T>(element: T, elements: T[]): T[] {\n const index = elements.indexOf(element);\n if (index === 0) {\n return elements;\n }\n\n const newElements = [...elements];\n newElements.splice(index, 1);\n newElements.splice(index - 1, 0, element);\n return newElements;\n}\n\nexport function handleMoveDown<T>(element: T, elements: T[]): T[] {\n const index = elements.indexOf(element);\n if (index === elements.length - 1) {\n return elements;\n }\n\n const newElements = [...elements];\n newElements.splice(index, 1);\n newElements.splice(index + 1, 0, element);\n return newElements;\n}\n\nexport interface DragButtonProps extends IconButtonProps {\n onMoveUp?: () => void;\n onMoveDown?: () => void;\n onMoveLeft?: () => void;\n onMoveRight?: () => void;\n menuSx?: MenuProps['sx'];\n}\n\nexport const DragButton = forwardRef<HTMLButtonElement, DragButtonProps>(function DragButton(\n { onMoveUp, onMoveDown, onMoveLeft, onMoveRight, menuSx, ...otherProps }: DragButtonProps,\n ref\n): ReactElement {\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);\n const open = Boolean(anchorEl);\n\n function handleClick(event: MouseEvent<HTMLElement>): void {\n setAnchorEl(event.currentTarget);\n }\n\n function handleMove(callback?: () => void): void {\n setAnchorEl(null);\n callback?.();\n }\n\n return (\n <>\n <IconButton\n {...otherProps}\n ref={ref}\n aria-label=\"move\"\n aria-haspopup={true}\n aria-expanded={open}\n size=\"small\"\n onClick={handleClick}\n >\n <DragIcon />\n </IconButton>\n {(onMoveUp || onMoveDown || onMoveLeft || onMoveRight) && (\n <Menu\n id=\"drag-button-menu\"\n MenuListProps={{\n 'aria-labelledby': 'drag-button-menu',\n }}\n anchorEl={anchorEl}\n open={open}\n onClose={() => handleMove(undefined)}\n sx={menuSx}\n >\n {onMoveUp && <MenuItem onClick={() => handleMove(onMoveUp)}>Move Up</MenuItem>}\n {onMoveDown && <MenuItem onClick={() => handleMove(onMoveDown)}>Move Down</MenuItem>}\n {onMoveLeft && <MenuItem onClick={() => handleMove(onMoveLeft)}>Move Left</MenuItem>}\n {onMoveRight && <MenuItem onClick={() => handleMove(onMoveRight)}>Move Right</MenuItem>}\n {onMoveRight && <MenuItem onClick={() => handleMove(onMoveRight)}>Move Right</MenuItem>}\n </Menu>\n )}\n </>\n );\n});\n"],"names":["IconButton","Menu","MenuItem","DragIcon","useState","forwardRef","handleMoveUp","element","elements","index","indexOf","newElements","splice","handleMoveDown","length","DragButton","onMoveUp","onMoveDown","onMoveLeft","onMoveRight","menuSx","otherProps","ref","anchorEl","setAnchorEl","open","Boolean","handleClick","event","currentTarget","handleMove","callback","aria-label","aria-haspopup","aria-expanded","size","onClick","id","MenuListProps","onClose","undefined","sx"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;A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;gBACfU,MAAK;gBACLC,SAAST;0BAET,cAAA,KAACxB;;YAEDa,CAAAA,YAAYC,cAAcC,cAAcC,WAAU,mBAClD,MAAClB;gBACCoC,IAAG;gBACHC,eAAe;oBACb,mBAAmB;gBACrB;gBACAf,UAAUA;gBACVE,MAAMA;gBACNc,SAAS,IAAMT,WAAWU;gBAC1BC,IAAIrB;;oBAEHJ,0BAAY,KAACd;wBAASkC,SAAS,IAAMN,WAAWd;kCAAW;;oBAC3DC,4BAAc,KAACf;wBAASkC,SAAS,IAAMN,WAAWb;kCAAa;;oBAC/DC,4BAAc,KAAChB;wBAASkC,SAAS,IAAMN,WAAWZ;kCAAa;;oBAC/DC,6BAAe,KAACjB;wBAASkC,SAAS,IAAMN,WAAWX;kCAAc;;oBACjEA,6BAAe,KAACjB;wBAASkC,SAAS,IAAMN,WAAWX;kCAAc;;;;;;AAK5E,GAAG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/DragAndDrop/DropIndicator.tsx"],"sourcesContent":["// Copyright 2024 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Box, Stack } from '@mui/material';\nimport { ReactElement } from 'react';\n\nexport function DropIndicator(): ReactElement {\n return (\n <Stack direction=\"row\" alignItems=\"center\">\n <Box\n sx={{\n content: '\"\"',\n width: 8,\n height: 8,\n boxSizing: 'border-box',\n position: 'absolute',\n backgroundColor: (theme) => theme.palette.background.default,\n border: (theme) => `2px solid ${theme.palette.info.main}`,\n borderRadius: '50%',\n }}\n ></Box>\n <Box\n sx={{\n content: '\"\"',\n height: 2,\n background: (theme) => theme.palette.info.main,\n width: '100%',\n }}\n ></Box>\n </Stack>\n );\n}\n"],"names":["Box","Stack","DropIndicator","direction","alignItems","sx","content","width","height","boxSizing","position","backgroundColor","theme","palette","background","default","border","info","main","borderRadius"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,GAAG,EAAEC,KAAK,QAAQ,gBAAgB;AAG3C,OAAO,SAASC;IACd,qBACE,MAACD;QAAME,WAAU;QAAMC,YAAW;;0BAChC,KAACJ;gBACCK,IAAI;oBACFC,SAAS;oBACTC,OAAO;oBACPC,QAAQ;oBACRC,WAAW;oBACXC,UAAU;oBACVC,iBAAiB,CAACC,QAAUA,MAAMC,OAAO,CAACC,UAAU,CAACC,OAAO;oBAC5DC,QAAQ,CAACJ,QAAU,CAAC,UAAU,EAAEA,MAAMC,OAAO,CAACI,IAAI,CAACC,IAAI,EAAE;oBACzDC,cAAc;gBAChB;;0BAEF,KAACnB;gBACCK,IAAI;oBACFC,SAAS;oBACTE,QAAQ;oBACRM,YAAY,CAACF,QAAUA,MAAMC,OAAO,CAACI,IAAI,CAACC,IAAI;oBAC9CX,OAAO;gBACT;;;;AAIR"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/DragAndDrop/index.ts"],"sourcesContent":["// Copyright 2024 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './DropIndicator';\nexport * from './DragAndDropList';\nexport * from './DragButton';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,kBAAkB;AAChC,cAAc,oBAAoB;AAClC,cAAc,eAAe"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/DragAndDrop/model.ts"],"sourcesContent":["// Copyright 2024 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';\n\nexport type State =\n | {\n type: 'idle';\n }\n | {\n type: 'is-dragging';\n }\n | {\n type: 'is-dragging-over';\n closestEdge: Edge | null;\n };\n\nexport const idle: State = { type: 'idle' };\n"],"names":["idle","type"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAgBjC,OAAO,MAAMA,OAAc;IAAEC,MAAM;AAAO,EAAE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Drawer/Drawer.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Drawer as MuiDrawer, DrawerProps as MuiDrawerProps, useMediaQuery } from '@mui/material';\nimport { ReactElement } from 'react';\nimport { combineSx } from '../utils';\n\nexport interface DrawerProps extends MuiDrawerProps {\n isOpen: boolean;\n onClose: () => void;\n anchor?: 'left' | 'right';\n}\n\nconst DRAWER_DEFAULT_WIDTH = 1080;\n\nexport const Drawer = ({\n anchor = 'right',\n isOpen,\n onClose,\n PaperProps,\n children,\n ...rest\n}: DrawerProps): ReactElement => {\n const isSmaller = useMediaQuery(`(max-width:${DRAWER_DEFAULT_WIDTH}px)`);\n\n return (\n <MuiDrawer\n {...rest}\n open={isOpen}\n onClose={onClose}\n anchor={anchor}\n PaperProps={{\n ...PaperProps,\n sx: combineSx(\n {\n width: isSmaller ? '100%' : `${DRAWER_DEFAULT_WIDTH}px`,\n overflow: 'hidden',\n },\n PaperProps?.sx\n ),\n }}\n >\n {children}\n </MuiDrawer>\n );\n};\n"],"names":["Drawer","MuiDrawer","useMediaQuery","combineSx","DRAWER_DEFAULT_WIDTH","anchor","isOpen","onClose","PaperProps","children","rest","isSmaller","open","sx","width","overflow"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,UAAUC,SAAS,EAAiCC,aAAa,QAAQ,gBAAgB;AAElG,SAASC,SAAS,QAAQ,WAAW;AAQrC,MAAMC,uBAAuB;AAE7B,OAAO,MAAMJ,SAAS,CAAC,EACrBK,SAAS,OAAO,EAChBC,MAAM,EACNC,OAAO,EACPC,UAAU,EACVC,QAAQ,EACR,GAAGC,MACS;IACZ,MAAMC,YAAYT,cAAc,CAAC,WAAW,EAAEE,qBAAqB,GAAG,CAAC;IAEvE,qBACE,KAACH;QACE,GAAGS,IAAI;QACRE,MAAMN;QACNC,SAASA;QACTF,QAAQA;QACRG,YAAY;YACV,GAAGA,UAAU;YACbK,IAAIV,UACF;gBACEW,OAAOH,YAAY,SAAS,GAAGP,qBAAqB,EAAE,CAAC;gBACvDW,UAAU;YACZ,GACAP,YAAYK;QAEhB;kBAECJ;;AAGP,EAAE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Drawer/index.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './Drawer';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,WAAW"}
|