@apipass/design-system 8.2.0 → 8.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/embedded-styles.js +2 -2
- package/dist/lib/lib.index.cjs +1 -1
- package/dist/lib/lib.index.js +798 -796
- package/dist/lib/lib.index.js.map +1 -1
- package/dist/lib/style.css +1 -1
- package/dist/lib/ui/components/ConfirmDialog/ConfirmDialog.cjs +1 -1
- package/dist/lib/ui/components/DataTable/DataTable.cjs +1 -1
- package/dist/lib/ui/components/Widget/Widget.cjs +1 -1
- package/dist/lib/ui/components/WidgetGrid/WidgetGrid.cjs +1 -1
- package/dist/lib/ui/components/charts/BarChart/BarChart.cjs +1 -1
- package/dist/lib/ui/components/charts/ChartColorPicker/ChartColorPicker.cjs +1 -1
- package/dist/lib/ui/components/charts/ChartLegend/use-chart-legend.cjs +1 -1
- package/dist/lib/ui/components/charts/PieChart/PieChart.cjs +1 -1
- package/dist/lib/ui/components/charts/TimeSeriesChart/TimeSeriesChart.cjs +1 -1
- package/dist/lib/ui/components/charts/TimeSeriesChart/TimeSeriesChart.cjs.map +1 -1
- package/dist/lib/ui/components/charts/TimeSeriesChart/TimeSeriesChart.js +55 -52
- package/dist/lib/ui/components/charts/TimeSeriesChart/TimeSeriesChart.js.map +1 -1
- package/dist/lib/ui/components/charts/TimeSeriesChart/time-series-option.cjs +1 -1
- package/dist/lib/ui/components/charts/TimeSeriesChart/time-series-option.cjs.map +1 -1
- package/dist/lib/ui/components/charts/TimeSeriesChart/time-series-option.js +37 -29
- package/dist/lib/ui/components/charts/TimeSeriesChart/time-series-option.js.map +1 -1
- package/dist/lib/ui/components/charts/TopList/TopList.cjs +1 -1
- package/dist/lib/ui/primitives/Avatar/Avatar.js +6 -6
- package/dist/lib/ui/primitives/BrandLoader/BrandLoader.cjs +1 -1
- package/dist/lib/ui/primitives/Button/Button.cjs.map +1 -1
- package/dist/lib/ui/primitives/Button/Button.js +6 -6
- package/dist/lib/ui/primitives/Button/Button.js.map +1 -1
- package/dist/lib/ui/primitives/CodeBlock/CodeBlock.cjs +1 -1
- package/dist/lib/ui/primitives/CodeEditor/CodeEditor.cjs +1 -1
- package/dist/lib/ui/primitives/ComboBox/ComboBox.cjs +1 -1
- package/dist/lib/ui/primitives/ComboBox/ComboBox.cjs.map +1 -1
- package/dist/lib/ui/primitives/ComboBox/ComboBox.js +40 -56
- package/dist/lib/ui/primitives/ComboBox/ComboBox.js.map +1 -1
- package/dist/lib/ui/primitives/ComboBox/MultiComboBox.cjs +2 -0
- package/dist/lib/ui/primitives/ComboBox/MultiComboBox.cjs.map +1 -0
- package/dist/lib/ui/primitives/ComboBox/MultiComboBox.js +179 -0
- package/dist/lib/ui/primitives/ComboBox/MultiComboBox.js.map +1 -0
- package/dist/lib/ui/primitives/ComboBox/comboBoxFocus.cjs +2 -0
- package/dist/lib/ui/primitives/ComboBox/comboBoxFocus.cjs.map +1 -0
- package/dist/lib/ui/primitives/ComboBox/comboBoxFocus.js +30 -0
- package/dist/lib/ui/primitives/ComboBox/comboBoxFocus.js.map +1 -0
- package/dist/lib/ui/primitives/DateRangePicker/DateRangePicker.cjs +1 -1
- package/dist/lib/ui/primitives/FileUpload/FileUpload.cjs +1 -1
- package/dist/lib/ui/primitives/FileUpload/FileUpload.js +24 -24
- package/dist/lib/ui/primitives/Image/Image.cjs +1 -1
- package/dist/lib/ui/primitives/Input/Input.cjs +1 -1
- package/dist/lib/ui/primitives/Input/Input.js +2 -2
- package/dist/lib/ui/primitives/JsonViewer/JsonEditor.cjs +1 -1
- package/dist/lib/ui/primitives/Link/Link.cjs +1 -1
- package/dist/lib/ui/primitives/Link/Link.js +3 -3
- package/dist/lib/ui/primitives/Menu/Menu.cjs +1 -1
- package/dist/lib/ui/primitives/Menu/Menu.js +28 -28
- package/dist/lib/ui/primitives/Search/Search.js +8 -8
- package/dist/lib/ui/primitives/Select/MultiSelect.cjs +1 -1
- package/dist/lib/ui/primitives/Select/MultiSelect.js +17 -17
- package/dist/lib/ui/primitives/Select/MultiSelect.js.map +1 -1
- package/dist/lib/ui/primitives/Tag/Tag.cjs +1 -1
- package/dist/lib/ui/primitives/Tag/Tag.cjs.map +1 -1
- package/dist/lib/ui/primitives/Tag/Tag.js +47 -38
- package/dist/lib/ui/primitives/Tag/Tag.js.map +1 -1
- package/dist/lib/ui/primitives/Textarea/Textarea.cjs +1 -1
- package/dist/lib/ui/primitives/Tooltip/Tooltip.cjs +1 -1
- package/dist/lib/ui/primitives/Tooltip/Tooltip.cjs.map +1 -1
- package/dist/lib/ui/primitives/Tooltip/Tooltip.js +29 -29
- package/dist/lib/ui/primitives/Tooltip/Tooltip.js.map +1 -1
- package/dist/lib/ui/utils/AnchorOrButton.cjs +1 -1
- package/dist/lib/ui/utils/AnchorOrButton.cjs.map +1 -1
- package/dist/lib/ui/utils/AnchorOrButton.js +10 -12
- package/dist/lib/ui/utils/AnchorOrButton.js.map +1 -1
- package/dist/lib/vendor/@monaco-editor/react/dist/index.cjs +1 -1
- package/dist/lib/vendor/@monaco-editor/react/dist/index.cjs.map +1 -1
- package/dist/lib/vendor/@monaco-editor/react/dist/index.js +41 -41
- package/dist/lib/vendor/react-aria/dist/private/interactions/createEventHandler.cjs +2 -0
- package/dist/lib/vendor/react-aria/dist/private/interactions/createEventHandler.cjs.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/interactions/createEventHandler.js +28 -0
- package/dist/lib/vendor/react-aria/dist/private/interactions/createEventHandler.js.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/interactions/createKeyboardShortcutHandler.cjs +2 -0
- package/dist/lib/vendor/react-aria/dist/private/interactions/createKeyboardShortcutHandler.cjs.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/interactions/createKeyboardShortcutHandler.js +93 -0
- package/dist/lib/vendor/react-aria/dist/private/interactions/createKeyboardShortcutHandler.js.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/interactions/focusSafely.cjs +2 -0
- package/dist/lib/vendor/react-aria/dist/private/interactions/focusSafely.cjs.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/interactions/focusSafely.js +20 -0
- package/dist/lib/vendor/react-aria/dist/private/interactions/focusSafely.js.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/interactions/useFocus.cjs +2 -0
- package/dist/lib/vendor/react-aria/dist/private/interactions/useFocus.cjs.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/interactions/useFocus.js +32 -0
- package/dist/lib/vendor/react-aria/dist/private/interactions/useFocus.js.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/interactions/useFocusVisible.cjs +2 -0
- package/dist/lib/vendor/react-aria/dist/private/interactions/useFocusVisible.cjs.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/interactions/useFocusVisible.js +94 -0
- package/dist/lib/vendor/react-aria/dist/private/interactions/useFocusVisible.js.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/interactions/useFocusable.cjs +2 -0
- package/dist/lib/vendor/react-aria/dist/private/interactions/useFocusable.cjs.map +1 -0
- package/dist/lib/vendor/{@react-aria/interactions/dist → react-aria/dist/private/interactions}/useFocusable.js +10 -10
- package/dist/lib/vendor/react-aria/dist/private/interactions/useFocusable.js.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/interactions/useHover.cjs +2 -0
- package/dist/lib/vendor/react-aria/dist/private/interactions/useHover.cjs.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/interactions/useHover.js +82 -0
- package/dist/lib/vendor/react-aria/dist/private/interactions/useHover.js.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/interactions/useKeyboard.cjs +2 -0
- package/dist/lib/vendor/react-aria/dist/private/interactions/useKeyboard.cjs.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/interactions/useKeyboard.js +44 -0
- package/dist/lib/vendor/react-aria/dist/private/interactions/useKeyboard.js.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/interactions/utils.cjs +2 -0
- package/dist/lib/vendor/react-aria/dist/private/interactions/utils.cjs.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/interactions/utils.js +59 -0
- package/dist/lib/vendor/react-aria/dist/private/interactions/utils.js.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/ssr/SSRProvider.cjs +2 -0
- package/dist/lib/vendor/react-aria/dist/private/ssr/SSRProvider.cjs.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/ssr/SSRProvider.js +52 -0
- package/dist/lib/vendor/react-aria/dist/private/ssr/SSRProvider.js.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/tooltip/useTooltipTrigger.cjs +2 -0
- package/dist/lib/vendor/react-aria/dist/private/tooltip/useTooltipTrigger.cjs.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/tooltip/useTooltipTrigger.js +62 -0
- package/dist/lib/vendor/react-aria/dist/private/tooltip/useTooltipTrigger.js.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/chain.cjs +2 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/chain.cjs.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/chain.js +9 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/chain.js.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/domHelpers.cjs +2 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/domHelpers.cjs.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/domHelpers.js +36 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/domHelpers.js.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/focusWithoutScrolling.cjs +2 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/focusWithoutScrolling.cjs.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/focusWithoutScrolling.js +9 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/focusWithoutScrolling.js.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/isVirtualEvent.cjs.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/isVirtualEvent.js.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/mergeProps.cjs +2 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/mergeProps.cjs.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/mergeProps.js +24 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/mergeProps.js.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/mergeRefs.cjs +2 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/mergeRefs.cjs.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/mergeRefs.js +22 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/mergeRefs.js.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/openLink.cjs +2 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/openLink.cjs.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/openLink.js +26 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/openLink.js.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/platform.cjs +2 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/platform.cjs.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/platform.js +40 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/platform.js.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/runAfterTransition.cjs +2 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/runAfterTransition.cjs.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/runAfterTransition.js +43 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/runAfterTransition.js.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/shadowdom/DOMFunctions.cjs +2 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/shadowdom/DOMFunctions.cjs.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/shadowdom/DOMFunctions.js +33 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/shadowdom/DOMFunctions.js.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/useGlobalListeners.cjs +2 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/useGlobalListeners.cjs.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/useGlobalListeners.js +35 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/useGlobalListeners.js.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/useId.cjs +2 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/useId.cjs.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/useId.js +44 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/useId.js.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/useLayoutEffect.cjs.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/useLayoutEffect.js.map +1 -0
- package/dist/lib/vendor/{@react-aria/utils/dist → react-aria/dist/private/utils}/useSyncRef.cjs +1 -1
- package/dist/lib/vendor/react-aria/dist/private/utils/useSyncRef.cjs.map +1 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/useSyncRef.js +13 -0
- package/dist/lib/vendor/react-aria/dist/private/utils/useSyncRef.js.map +1 -0
- package/dist/lib/vendor/react-draggable/build/cjs/Draggable.cjs +1 -1
- package/dist/lib/vendor/react-draggable/build/cjs/Draggable.js +8 -8
- package/dist/lib/vendor/react-grid-layout/build/GridItem.cjs +1 -1
- package/dist/lib/vendor/react-grid-layout/build/GridItem.js +7 -7
- package/dist/lib/vendor/react-grid-layout/build/ReactGridLayout.cjs +1 -1
- package/dist/lib/vendor/react-grid-layout/build/ReactGridLayout.js +7 -7
- package/dist/lib/vendor/react-grid-layout/build/ReactGridLayout.js.map +1 -1
- package/dist/lib/vendor/react-grid-layout/build/ResponsiveReactGridLayout.cjs +1 -1
- package/dist/lib/vendor/react-grid-layout/build/ResponsiveReactGridLayout.js +10 -10
- package/dist/lib/vendor/react-grid-layout/build/ResponsiveReactGridLayout.js.map +1 -1
- package/dist/lib/vendor/react-grid-layout/build/components/WidthProvider.cjs +1 -1
- package/dist/lib/vendor/react-grid-layout/build/components/WidthProvider.js +8 -8
- package/dist/lib/vendor/react-grid-layout/build/components/WidthProvider.js.map +1 -1
- package/dist/lib/vendor/react-grid-layout/build/utils.cjs +1 -1
- package/dist/lib/vendor/react-grid-layout/build/utils.js +18 -18
- package/dist/lib/vendor/react-resizable/build/Resizable.cjs +1 -1
- package/dist/lib/vendor/react-resizable/build/Resizable.js +61 -61
- package/dist/lib/vendor/react-resizable/build/Resizable.js.map +1 -1
- package/dist/lib/vendor/react-resizable/build/ResizableBox.cjs +1 -1
- package/dist/lib/vendor/react-resizable/build/ResizableBox.js +7 -7
- package/dist/lib/vendor/react-resizable/build/ResizableBox.js.map +1 -1
- package/dist/lib/vendor/react-resizable/build/utils.cjs +1 -1
- package/dist/lib/vendor/react-resizable/build/utils.cjs.map +1 -1
- package/dist/lib/vendor/react-stately/dist/private/flags/flags.cjs +2 -0
- package/dist/lib/vendor/react-stately/dist/private/flags/flags.cjs.map +1 -0
- package/dist/lib/vendor/react-stately/dist/private/flags/flags.js +8 -0
- package/dist/lib/vendor/react-stately/dist/private/flags/flags.js.map +1 -0
- package/dist/lib/vendor/react-stately/dist/private/overlays/useOverlayTriggerState.cjs +2 -0
- package/dist/lib/vendor/react-stately/dist/private/overlays/useOverlayTriggerState.cjs.map +1 -0
- package/dist/lib/vendor/react-stately/dist/private/overlays/useOverlayTriggerState.js +32 -0
- package/dist/lib/vendor/react-stately/dist/private/overlays/useOverlayTriggerState.js.map +1 -0
- package/dist/lib/vendor/react-stately/dist/private/tooltip/useTooltipTriggerState.cjs +2 -0
- package/dist/lib/vendor/react-stately/dist/private/tooltip/useTooltipTriggerState.cjs.map +1 -0
- package/dist/lib/vendor/react-stately/dist/private/tooltip/useTooltipTriggerState.js +43 -0
- package/dist/lib/vendor/react-stately/dist/private/tooltip/useTooltipTriggerState.js.map +1 -0
- package/dist/lib/vendor/react-stately/dist/private/utils/useControlledState.cjs +2 -0
- package/dist/lib/vendor/react-stately/dist/private/utils/useControlledState.cjs.map +1 -0
- package/dist/lib/vendor/react-stately/dist/private/utils/useControlledState.js +29 -0
- package/dist/lib/vendor/react-stately/dist/private/utils/useControlledState.js.map +1 -0
- package/dist/lib/vendor/react-toastify/dist/index.cjs +1 -1
- package/dist/lib/vendor/react-toastify/dist/index.js +10 -10
- package/dist/types/ui/components/charts/TimeSeriesChart/TimeSeriesChart.d.ts +4 -3
- package/dist/types/ui/components/charts/TimeSeriesChart/time-series-option.d.ts +5 -0
- package/dist/types/ui/primitives/ComboBox/MultiComboBox.d.ts +28 -0
- package/dist/types/ui/primitives/ComboBox/comboBoxFocus.d.ts +3 -0
- package/dist/types/ui/primitives/Tag/Tag.d.ts +2 -1
- package/dist/types/ui/primitives/index.d.ts +1 -0
- package/dist/types/ui/utils/AnchorOrButton.d.ts +3 -1
- package/package.json +3 -3
- package/dist/lib/vendor/@react-aria/interactions/dist/createEventHandler.cjs +0 -2
- package/dist/lib/vendor/@react-aria/interactions/dist/createEventHandler.cjs.map +0 -1
- package/dist/lib/vendor/@react-aria/interactions/dist/createEventHandler.js +0 -29
- package/dist/lib/vendor/@react-aria/interactions/dist/createEventHandler.js.map +0 -1
- package/dist/lib/vendor/@react-aria/interactions/dist/focusSafely.cjs +0 -2
- package/dist/lib/vendor/@react-aria/interactions/dist/focusSafely.cjs.map +0 -1
- package/dist/lib/vendor/@react-aria/interactions/dist/focusSafely.js +0 -18
- package/dist/lib/vendor/@react-aria/interactions/dist/focusSafely.js.map +0 -1
- package/dist/lib/vendor/@react-aria/interactions/dist/useFocus.cjs +0 -2
- package/dist/lib/vendor/@react-aria/interactions/dist/useFocus.cjs.map +0 -1
- package/dist/lib/vendor/@react-aria/interactions/dist/useFocus.js +0 -31
- package/dist/lib/vendor/@react-aria/interactions/dist/useFocus.js.map +0 -1
- package/dist/lib/vendor/@react-aria/interactions/dist/useFocusVisible.cjs +0 -2
- package/dist/lib/vendor/@react-aria/interactions/dist/useFocusVisible.cjs.map +0 -1
- package/dist/lib/vendor/@react-aria/interactions/dist/useFocusVisible.js +0 -66
- package/dist/lib/vendor/@react-aria/interactions/dist/useFocusVisible.js.map +0 -1
- package/dist/lib/vendor/@react-aria/interactions/dist/useFocusable.cjs +0 -2
- package/dist/lib/vendor/@react-aria/interactions/dist/useFocusable.cjs.map +0 -1
- package/dist/lib/vendor/@react-aria/interactions/dist/useFocusable.js.map +0 -1
- package/dist/lib/vendor/@react-aria/interactions/dist/useHover.cjs +0 -2
- package/dist/lib/vendor/@react-aria/interactions/dist/useHover.cjs.map +0 -1
- package/dist/lib/vendor/@react-aria/interactions/dist/useHover.js +0 -81
- package/dist/lib/vendor/@react-aria/interactions/dist/useHover.js.map +0 -1
- package/dist/lib/vendor/@react-aria/interactions/dist/useKeyboard.cjs +0 -2
- package/dist/lib/vendor/@react-aria/interactions/dist/useKeyboard.cjs.map +0 -1
- package/dist/lib/vendor/@react-aria/interactions/dist/useKeyboard.js +0 -13
- package/dist/lib/vendor/@react-aria/interactions/dist/useKeyboard.js.map +0 -1
- package/dist/lib/vendor/@react-aria/interactions/dist/utils.cjs +0 -2
- package/dist/lib/vendor/@react-aria/interactions/dist/utils.cjs.map +0 -1
- package/dist/lib/vendor/@react-aria/interactions/dist/utils.js +0 -64
- package/dist/lib/vendor/@react-aria/interactions/dist/utils.js.map +0 -1
- package/dist/lib/vendor/@react-aria/ssr/dist/SSRProvider.cjs +0 -2
- package/dist/lib/vendor/@react-aria/ssr/dist/SSRProvider.cjs.map +0 -1
- package/dist/lib/vendor/@react-aria/ssr/dist/SSRProvider.js +0 -49
- package/dist/lib/vendor/@react-aria/ssr/dist/SSRProvider.js.map +0 -1
- package/dist/lib/vendor/@react-aria/tooltip/dist/useTooltipTrigger.cjs +0 -2
- package/dist/lib/vendor/@react-aria/tooltip/dist/useTooltipTrigger.cjs.map +0 -1
- package/dist/lib/vendor/@react-aria/tooltip/dist/useTooltipTrigger.js +0 -61
- package/dist/lib/vendor/@react-aria/tooltip/dist/useTooltipTrigger.js.map +0 -1
- package/dist/lib/vendor/@react-aria/utils/dist/DOMFunctions.cjs +0 -2
- package/dist/lib/vendor/@react-aria/utils/dist/DOMFunctions.cjs.map +0 -1
- package/dist/lib/vendor/@react-aria/utils/dist/DOMFunctions.js +0 -28
- package/dist/lib/vendor/@react-aria/utils/dist/DOMFunctions.js.map +0 -1
- package/dist/lib/vendor/@react-aria/utils/dist/chain.cjs +0 -2
- package/dist/lib/vendor/@react-aria/utils/dist/chain.cjs.map +0 -1
- package/dist/lib/vendor/@react-aria/utils/dist/chain.js +0 -9
- package/dist/lib/vendor/@react-aria/utils/dist/chain.js.map +0 -1
- package/dist/lib/vendor/@react-aria/utils/dist/domHelpers.cjs +0 -2
- package/dist/lib/vendor/@react-aria/utils/dist/domHelpers.cjs.map +0 -1
- package/dist/lib/vendor/@react-aria/utils/dist/domHelpers.js +0 -16
- package/dist/lib/vendor/@react-aria/utils/dist/domHelpers.js.map +0 -1
- package/dist/lib/vendor/@react-aria/utils/dist/focusWithoutScrolling.cjs +0 -2
- package/dist/lib/vendor/@react-aria/utils/dist/focusWithoutScrolling.cjs.map +0 -1
- package/dist/lib/vendor/@react-aria/utils/dist/focusWithoutScrolling.js +0 -46
- package/dist/lib/vendor/@react-aria/utils/dist/focusWithoutScrolling.js.map +0 -1
- package/dist/lib/vendor/@react-aria/utils/dist/isVirtualEvent.cjs.map +0 -1
- package/dist/lib/vendor/@react-aria/utils/dist/isVirtualEvent.js.map +0 -1
- package/dist/lib/vendor/@react-aria/utils/dist/mergeProps.cjs +0 -2
- package/dist/lib/vendor/@react-aria/utils/dist/mergeProps.cjs.map +0 -1
- package/dist/lib/vendor/@react-aria/utils/dist/mergeProps.js +0 -23
- package/dist/lib/vendor/@react-aria/utils/dist/mergeProps.js.map +0 -1
- package/dist/lib/vendor/@react-aria/utils/dist/platform.cjs +0 -2
- package/dist/lib/vendor/@react-aria/utils/dist/platform.cjs.map +0 -1
- package/dist/lib/vendor/@react-aria/utils/dist/platform.js +0 -24
- package/dist/lib/vendor/@react-aria/utils/dist/platform.js.map +0 -1
- package/dist/lib/vendor/@react-aria/utils/dist/runAfterTransition.cjs +0 -2
- package/dist/lib/vendor/@react-aria/utils/dist/runAfterTransition.cjs.map +0 -1
- package/dist/lib/vendor/@react-aria/utils/dist/runAfterTransition.js +0 -36
- package/dist/lib/vendor/@react-aria/utils/dist/runAfterTransition.js.map +0 -1
- package/dist/lib/vendor/@react-aria/utils/dist/useEffectEvent.cjs +0 -2
- package/dist/lib/vendor/@react-aria/utils/dist/useEffectEvent.cjs.map +0 -1
- package/dist/lib/vendor/@react-aria/utils/dist/useEffectEvent.js +0 -19
- package/dist/lib/vendor/@react-aria/utils/dist/useEffectEvent.js.map +0 -1
- package/dist/lib/vendor/@react-aria/utils/dist/useGlobalListeners.cjs +0 -2
- package/dist/lib/vendor/@react-aria/utils/dist/useGlobalListeners.cjs.map +0 -1
- package/dist/lib/vendor/@react-aria/utils/dist/useGlobalListeners.js +0 -35
- package/dist/lib/vendor/@react-aria/utils/dist/useGlobalListeners.js.map +0 -1
- package/dist/lib/vendor/@react-aria/utils/dist/useId.cjs +0 -2
- package/dist/lib/vendor/@react-aria/utils/dist/useId.cjs.map +0 -1
- package/dist/lib/vendor/@react-aria/utils/dist/useId.js +0 -43
- package/dist/lib/vendor/@react-aria/utils/dist/useId.js.map +0 -1
- package/dist/lib/vendor/@react-aria/utils/dist/useLayoutEffect.cjs.map +0 -1
- package/dist/lib/vendor/@react-aria/utils/dist/useLayoutEffect.js.map +0 -1
- package/dist/lib/vendor/@react-aria/utils/dist/useSyncRef.cjs.map +0 -1
- package/dist/lib/vendor/@react-aria/utils/dist/useSyncRef.js +0 -13
- package/dist/lib/vendor/@react-aria/utils/dist/useSyncRef.js.map +0 -1
- package/dist/lib/vendor/@react-stately/flags/dist/import.cjs +0 -2
- package/dist/lib/vendor/@react-stately/flags/dist/import.cjs.map +0 -1
- package/dist/lib/vendor/@react-stately/flags/dist/import.js +0 -8
- package/dist/lib/vendor/@react-stately/flags/dist/import.js.map +0 -1
- package/dist/lib/vendor/@react-stately/overlays/dist/useOverlayTriggerState.cjs +0 -2
- package/dist/lib/vendor/@react-stately/overlays/dist/useOverlayTriggerState.cjs.map +0 -1
- package/dist/lib/vendor/@react-stately/overlays/dist/useOverlayTriggerState.js +0 -30
- package/dist/lib/vendor/@react-stately/overlays/dist/useOverlayTriggerState.js.map +0 -1
- package/dist/lib/vendor/@react-stately/tooltip/dist/useTooltipTriggerState.cjs +0 -2
- package/dist/lib/vendor/@react-stately/tooltip/dist/useTooltipTriggerState.cjs.map +0 -1
- package/dist/lib/vendor/@react-stately/tooltip/dist/useTooltipTriggerState.js +0 -42
- package/dist/lib/vendor/@react-stately/tooltip/dist/useTooltipTriggerState.js.map +0 -1
- package/dist/lib/vendor/@react-stately/utils/dist/useControlledState.cjs +0 -2
- package/dist/lib/vendor/@react-stately/utils/dist/useControlledState.cjs.map +0 -1
- package/dist/lib/vendor/@react-stately/utils/dist/useControlledState.js +0 -30
- package/dist/lib/vendor/@react-stately/utils/dist/useControlledState.js.map +0 -1
- /package/dist/lib/vendor/{@react-aria/utils/dist → react-aria/dist/private/utils}/isVirtualEvent.cjs +0 -0
- /package/dist/lib/vendor/{@react-aria/utils/dist → react-aria/dist/private/utils}/isVirtualEvent.js +0 -0
- /package/dist/lib/vendor/{@react-aria/utils/dist → react-aria/dist/private/utils}/useLayoutEffect.cjs +0 -0
- /package/dist/lib/vendor/{@react-aria/utils/dist → react-aria/dist/private/utils}/useLayoutEffect.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time-series-option.js","sources":["../../../../../../src/ui/components/charts/TimeSeriesChart/time-series-option.ts"],"sourcesContent":["import type { ChartTheme } from \"../chart-theme\";\n\nexport interface TimeSeriesPoint {\n timestamp: number;\n value: number | null;\n}\n\nexport interface TimeSeriesData {\n id: string;\n name: string;\n points: TimeSeriesPoint[];\n // Nome de token, nunca hex: é o que mantém a cor válida nos dois temas. Sem ele a série\n // recebe a próxima cor da paleta.\n colorToken?: string;\n}\n\nexport type TimeSeriesDisplayType = \"line\" | \"bar\" | \"area\";\n\nexport type TimeSeriesLineStyle = \"solid\" | \"dashed\" | \"dotted\";\n\nexport type TimeSeriesLineWidth = \"thin\" | \"normal\" | \"thick\";\n\nexport interface TimeSeriesLineOptions {\n style?: TimeSeriesLineStyle;\n width?: TimeSeriesLineWidth;\n}\n\nexport type TimeSeriesLegendMode = \"inline\" | \"none\";\n\nexport type TimeSeriesAxisScale = \"linear\" | \"log\";\n\nexport interface TimeSeriesYAxisOptions {\n scale?: TimeSeriesAxisScale;\n min?: number;\n max?: number;\n includeZero?: boolean;\n}\n\nexport interface TimeSeriesOptionInput {\n series: TimeSeriesData[];\n displayType: TimeSeriesDisplayType;\n line: TimeSeriesLineOptions;\n yAxis: TimeSeriesYAxisOptions;\n theme: ChartTheme;\n showSymbols: boolean;\n showValueLabels: boolean;\n seriesColorOverrides: Record<string, string>;\n valueFormatter?: (value: number) => string;\n}\n\n// A legenda saiu do canvas e virou HTML (`ChartLegend`), entao a grade nao reserva mais faixa\n// para ela: quem divide a altura agora e o flex do componente.\nconst GRID_PADDING = { top: 16, right: 16, bottom: 24, left: 56 } as const;\n\nconst SYMBOL_SIZE_PX: number = 6;\n\nconst AREA_OPACITY: number = 0.15;\n\nconst LINE_WIDTH_PX: Record<TimeSeriesLineWidth, number> = { thin: 1, normal: 2, thick: 4 };\n\nconst DEFAULT_LINE_STYLE: TimeSeriesLineStyle = \"solid\";\n\nconst DEFAULT_LINE_WIDTH: TimeSeriesLineWidth = \"normal\";\n\n// O eixo de tempo do ECharts rotula a marca de dia so com o numero do dia -- \"2\", \"3\", \"4\" --, que\n// sozinho nao diz nem o mes. Aqui a marca de dia vira data e a marca dentro do dia vira hora, que e\n// o que se espera de uma serie temporal.\n//\n// A precisao sai do proprio instante, e nao de um nivel pedido ao ECharts: ele alinha as marcas ao\n// nivel que cabe no eixo, entao meia-noite e marca de dia, minuto cheio e marca de hora, e assim por\n// diante. Ler o instante e o que permite usar `Intl` e escrever a data na convencao de quem le -- o\n// objeto de niveis do ECharts so aceita template, e um `{dd}/{MM}` fixo seria lido como mes/dia por\n// metade dos usuarios.\nconst YEAR_LABEL: Intl.DateTimeFormat = new Intl.DateTimeFormat(undefined, { year: \"numeric\" });\n\nconst DAY_LABEL: Intl.DateTimeFormat = new Intl.DateTimeFormat(undefined, {\n day: \"2-digit\",\n month: \"2-digit\",\n});\n\nconst MINUTE_LABEL: Intl.DateTimeFormat = new Intl.DateTimeFormat(undefined, {\n hour: \"2-digit\",\n minute: \"2-digit\",\n hour12: false,\n});\n\nconst SECOND_LABEL: Intl.DateTimeFormat = new Intl.DateTimeFormat(undefined, {\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\",\n hour12: false,\n});\n\nfunction timeAxisLabel(timestamp: number): string {\n const instant: Date = new Date(timestamp);\n if (instant.getSeconds() !== 0 || instant.getMilliseconds() !== 0) return SECOND_LABEL.format(instant);\n if (instant.getHours() !== 0 || instant.getMinutes() !== 0) return MINUTE_LABEL.format(instant);\n // Primeiro de janeiro e a marca de ano do ECharts, e ali a data sem o ano nao situa ninguem.\n if (instant.getMonth() === 0 && instant.getDate() === 1) return YEAR_LABEL.format(instant);\n return DAY_LABEL.format(instant);\n}\n\n// O ponto de gap chega ao formatter como `null` — o ECharts monta o bloco do tooltip sem marcar\n// `noValue`, então formata o vazio junto com o resto. O tipo público promete `number` ao\n// consumidor, e é esta guarda que mantém a promessa em vez de transformá-la em aviso.\nfunction nullSafeValueFormatter(\n input: TimeSeriesOptionInput,\n): ((value: number | null | undefined) => string) | undefined {\n const { valueFormatter } = input;\n if (!valueFormatter) return undefined;\n return (value: number | null | undefined) => (value == null ? \"\" : valueFormatter(value));\n}\n\nfunction seriesLabel(input: TimeSeriesOptionInput): Record<string, unknown> {\n const { showValueLabels, theme } = input;\n const formatValue: ((value: number | null | undefined) => string) | undefined =\n nullSafeValueFormatter(input);\n return {\n show: showValueLabels,\n position: \"top\",\n color: theme.labelColor,\n formatter: formatValue\n ? (params: { value: [number, number | null] }) => formatValue(params.value[1])\n : undefined,\n };\n}\n\nfunction seriesEntry(\n data: TimeSeriesData,\n input: TimeSeriesOptionInput,\n color: string,\n): Record<string, unknown> {\n const values: Array<[number, number | null]> = data.points.map((point: TimeSeriesPoint) => [\n point.timestamp,\n point.value,\n ]);\n const label: Record<string, unknown> = seriesLabel(input);\n\n if (input.displayType === \"bar\") {\n return { id: data.id, name: data.name, type: \"bar\", data: values, itemStyle: { color }, label };\n }\n\n return {\n id: data.id,\n name: data.name,\n type: \"line\",\n data: values,\n showSymbol: input.showSymbols,\n symbolSize: SYMBOL_SIZE_PX,\n lineStyle: {\n color,\n type: input.line.style ?? DEFAULT_LINE_STYLE,\n width: LINE_WIDTH_PX[input.line.width ?? DEFAULT_LINE_WIDTH],\n },\n itemStyle: { color },\n areaStyle: input.displayType === \"area\" ? { color, opacity: AREA_OPACITY } : undefined,\n label,\n };\n}\n\n// O retorno é `Record<string, unknown>` de propósito, e não `EChartsOption`: é o que impede\n// um tipo da biblioteca de vazar para o resto do design system.\nexport function buildTimeSeriesOption(input: TimeSeriesOptionInput): Record<string, unknown> {\n const { series, yAxis, theme, seriesColorOverrides } = input;\n const formatValue: ((value: number | null | undefined) => string) | undefined =\n nullSafeValueFormatter(input);\n\n return {\n animation: false,\n color: theme.seriesColors,\n textStyle: { fontFamily: theme.fontFamily, color: theme.labelColor },\n grid: {\n ...GRID_PADDING,\n containLabel: false,\n },\n tooltip: {\n trigger: \"axis\",\n backgroundColor: theme.tooltipBackgroundColor,\n borderColor: theme.tooltipBorderColor,\n textStyle: { color: theme.labelColor },\n valueFormatter: formatValue,\n },\n xAxis: {\n type: \"time\",\n axisLine: { lineStyle: { color: theme.axisLineColor } },\n axisTick: { show: false },\n axisLabel: { color: theme.labelColor, hideOverlap: true, formatter: timeAxisLabel },\n splitLine: { show: false },\n },\n yAxis: {\n type: yAxis.scale === \"log\" ? \"log\" : \"value\",\n scale: yAxis.includeZero !== true,\n min: yAxis.min,\n max: yAxis.max,\n axisLine: { show: false },\n axisLabel: { color: theme.labelColor, formatter: formatValue },\n splitLine: { lineStyle: { color: theme.splitLineColor } },\n },\n series: series.map((data: TimeSeriesData, index: number) =>\n seriesEntry(\n data,\n input,\n seriesColorOverrides[data.id] ?? theme.seriesColors[index % theme.seriesColors.length],\n ),\n ),\n };\n}\n"],"names":["GRID_PADDING","SYMBOL_SIZE_PX","AREA_OPACITY","LINE_WIDTH_PX","DEFAULT_LINE_STYLE","DEFAULT_LINE_WIDTH","YEAR_LABEL","DAY_LABEL","MINUTE_LABEL","SECOND_LABEL","timeAxisLabel","timestamp","instant","nullSafeValueFormatter","input","valueFormatter","value","seriesLabel","showValueLabels","theme","formatValue","params","seriesEntry","data","color","values","point","label","buildTimeSeriesOption","series","yAxis","seriesColorOverrides","index"],"mappings":"AAoDA,MAAMA,IAAe,EAAE,KAAK,IAAI,OAAO,IAAI,QAAQ,IAAI,MAAM,GAAA,GAEvDC,IAAyB,GAEzBC,IAAuB,MAEvBC,IAAqD,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,EAAA,GAElFC,IAA0C,SAE1CC,IAA0C,UAW1CC,IAAkC,IAAI,KAAK,eAAe,QAAW,EAAE,MAAM,WAAW,GAExFC,IAAiC,IAAI,KAAK,eAAe,QAAW;AAAA,EACxE,KAAK;AAAA,EACL,OAAO;AACT,CAAC,GAEKC,IAAoC,IAAI,KAAK,eAAe,QAAW;AAAA,EAC3E,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,QAAQ;AACV,CAAC,GAEKC,IAAoC,IAAI,KAAK,eAAe,QAAW;AAAA,EAC3E,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AACV,CAAC;AAED,SAASC,EAAcC,GAA2B;AAChD,QAAMC,IAAgB,IAAI,KAAKD,CAAS;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AA,IAE1D,QAAQU,EAAO;AAAA,MAAI,CAACN,GAAsBS,MACxCV;AAAA,QACEC;AAAA,QACAT;AAAA,QACAiB,EAAqBR,EAAK,EAAE,KAAKJ,EAAM,aAAaa,IAAQb,EAAM,aAAa,MAAM;AAAA,MAAA;AAAA,IACvF;AAAA,EACF;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"time-series-option.js","sources":["../../../../../../src/ui/components/charts/TimeSeriesChart/time-series-option.ts"],"sourcesContent":["import type { ChartTheme } from \"../chart-theme\";\n\nexport interface TimeSeriesPoint {\n timestamp: number;\n value: number | null;\n}\n\nexport interface TimeSeriesData {\n id: string;\n name: string;\n points: TimeSeriesPoint[];\n // Nome de token, nunca hex: é o que mantém a cor válida nos dois temas. Sem ele a série\n // recebe a próxima cor da paleta.\n colorToken?: string;\n}\n\nexport type TimeSeriesDisplayType = \"line\" | \"bar\" | \"area\";\n\nexport type TimeSeriesLineStyle = \"solid\" | \"dashed\" | \"dotted\";\n\nexport type TimeSeriesLineWidth = \"thin\" | \"normal\" | \"thick\";\n\nexport interface TimeSeriesLineOptions {\n style?: TimeSeriesLineStyle;\n width?: TimeSeriesLineWidth;\n}\n\nexport type TimeSeriesLegendMode = \"inline\" | \"none\";\n\nexport type TimeSeriesAxisScale = \"linear\" | \"log\";\n\nexport interface TimeSeriesYAxisOptions {\n scale?: TimeSeriesAxisScale;\n min?: number;\n max?: number;\n includeZero?: boolean;\n}\n\nexport interface TimeSeriesXAxisOptions {\n min?: number;\n max?: number;\n}\n\nexport interface TimeSeriesOptionInput {\n series: TimeSeriesData[];\n displayType: TimeSeriesDisplayType;\n line: TimeSeriesLineOptions;\n xAxis: TimeSeriesXAxisOptions;\n yAxis: TimeSeriesYAxisOptions;\n theme: ChartTheme;\n showSymbols: boolean;\n showValueLabels: boolean;\n seriesColorOverrides: Record<string, string>;\n valueFormatter?: (value: number) => string;\n}\n\n// A legenda saiu do canvas e virou HTML (`ChartLegend`), entao a grade nao reserva mais faixa\n// para ela: quem divide a altura agora e o flex do componente.\nconst GRID_PADDING_PX: { top: number; right: number; bottom: number; left: number } = {\n top: 16,\n right: 16,\n bottom: 8,\n left: 8,\n};\n\nconst SYMBOL_SIZE_PX: number = 6;\n\nconst AREA_OPACITY: number = 0.15;\n\nconst LINE_WIDTH_PX: Record<TimeSeriesLineWidth, number> = { thin: 1, normal: 2, thick: 4 };\n\nconst DEFAULT_LINE_STYLE: TimeSeriesLineStyle = \"solid\";\n\nconst DEFAULT_LINE_WIDTH: TimeSeriesLineWidth = \"normal\";\n\n// O eixo de tempo do ECharts rotula a marca de dia so com o numero do dia -- \"2\", \"3\", \"4\" --, que\n// sozinho nao diz nem o mes. Aqui a marca de dia vira data e a marca dentro do dia vira hora, que e\n// o que se espera de uma serie temporal.\n//\n// A precisao sai do proprio instante, e nao de um nivel pedido ao ECharts: ele alinha as marcas ao\n// nivel que cabe no eixo, entao meia-noite e marca de dia, minuto cheio e marca de hora, e assim por\n// diante. Ler o instante e o que permite usar `Intl` e escrever a data na convencao de quem le -- o\n// objeto de niveis do ECharts so aceita template, e um `{dd}/{MM}` fixo seria lido como mes/dia por\n// metade dos usuarios.\nconst YEAR_LABEL: Intl.DateTimeFormat = new Intl.DateTimeFormat(undefined, { year: \"numeric\" });\n\nconst DAY_LABEL: Intl.DateTimeFormat = new Intl.DateTimeFormat(undefined, {\n day: \"2-digit\",\n month: \"2-digit\",\n});\n\nconst MINUTE_LABEL: Intl.DateTimeFormat = new Intl.DateTimeFormat(undefined, {\n hour: \"2-digit\",\n minute: \"2-digit\",\n hour12: false,\n});\n\nconst SECOND_LABEL: Intl.DateTimeFormat = new Intl.DateTimeFormat(undefined, {\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\",\n hour12: false,\n});\n\nfunction timeAxisLabel(timestamp: number): string {\n const instant: Date = new Date(timestamp);\n if (instant.getSeconds() !== 0 || instant.getMilliseconds() !== 0) return SECOND_LABEL.format(instant);\n if (instant.getHours() !== 0 || instant.getMinutes() !== 0) return MINUTE_LABEL.format(instant);\n // Primeiro de janeiro e a marca de ano do ECharts, e ali a data sem o ano nao situa ninguem.\n if (instant.getMonth() === 0 && instant.getDate() === 1) return YEAR_LABEL.format(instant);\n return DAY_LABEL.format(instant);\n}\n\n// O ponto de gap chega ao formatter como `null` — o ECharts monta o bloco do tooltip sem marcar\n// `noValue`, então formata o vazio junto com o resto. O tipo público promete `number` ao\n// consumidor, e é esta guarda que mantém a promessa em vez de transformá-la em aviso.\nfunction nullSafeValueFormatter(\n input: TimeSeriesOptionInput,\n): ((value: number | null | undefined) => string) | undefined {\n const { valueFormatter } = input;\n if (!valueFormatter) return undefined;\n return (value: number | null | undefined) => (value == null ? \"\" : valueFormatter(value));\n}\n\nfunction seriesLabel(input: TimeSeriesOptionInput): Record<string, unknown> {\n const { showValueLabels, theme } = input;\n const formatValue: ((value: number | null | undefined) => string) | undefined =\n nullSafeValueFormatter(input);\n return {\n show: showValueLabels,\n position: \"top\",\n color: theme.labelColor,\n formatter: formatValue\n ? (params: { value: [number, number | null] }) => formatValue(params.value[1])\n : undefined,\n };\n}\n\nfunction seriesEntry(\n data: TimeSeriesData,\n input: TimeSeriesOptionInput,\n color: string,\n): Record<string, unknown> {\n const values: Array<[number, number | null]> = data.points.map((point: TimeSeriesPoint) => [\n point.timestamp,\n point.value,\n ]);\n const label: Record<string, unknown> = seriesLabel(input);\n\n if (input.displayType === \"bar\") {\n return { id: data.id, name: data.name, type: \"bar\", data: values, itemStyle: { color }, label };\n }\n\n return {\n id: data.id,\n name: data.name,\n type: \"line\",\n data: values,\n showSymbol: input.showSymbols,\n symbolSize: SYMBOL_SIZE_PX,\n lineStyle: {\n color,\n type: input.line.style ?? DEFAULT_LINE_STYLE,\n width: LINE_WIDTH_PX[input.line.width ?? DEFAULT_LINE_WIDTH],\n },\n itemStyle: { color },\n areaStyle: input.displayType === \"area\" ? { color, opacity: AREA_OPACITY } : undefined,\n label,\n };\n}\n\n// O retorno é `Record<string, unknown>` de propósito, e não `EChartsOption`: é o que impede\n// um tipo da biblioteca de vazar para o resto do design system.\nexport function buildTimeSeriesOption(input: TimeSeriesOptionInput): Record<string, unknown> {\n const { series, xAxis, yAxis, theme, seriesColorOverrides } = input;\n const formatValue: ((value: number | null | undefined) => string) | undefined =\n nullSafeValueFormatter(input);\n\n return {\n animation: false,\n color: theme.seriesColors,\n textStyle: { fontFamily: theme.fontFamily, color: theme.labelColor },\n grid: {\n ...GRID_PADDING_PX,\n containLabel: true,\n },\n tooltip: {\n trigger: \"axis\",\n confine: true,\n backgroundColor: theme.tooltipBackgroundColor,\n borderColor: theme.tooltipBorderColor,\n textStyle: { color: theme.labelColor },\n valueFormatter: formatValue,\n },\n xAxis: {\n type: \"time\",\n min: xAxis.min,\n max: xAxis.max,\n axisLine: { lineStyle: { color: theme.axisLineColor } },\n axisTick: { show: false },\n axisLabel: { color: theme.labelColor, hideOverlap: true, formatter: timeAxisLabel },\n splitLine: { show: false },\n },\n yAxis: {\n type: yAxis.scale === \"log\" ? \"log\" : \"value\",\n scale: yAxis.includeZero !== true,\n min: yAxis.min,\n max: yAxis.max,\n axisLine: { show: false },\n axisLabel: { color: theme.labelColor, formatter: formatValue },\n splitLine: { lineStyle: { color: theme.splitLineColor } },\n },\n series: series.map((data: TimeSeriesData, index: number) =>\n seriesEntry(\n data,\n input,\n seriesColorOverrides[data.id] ?? theme.seriesColors[index % theme.seriesColors.length],\n ),\n ),\n };\n}\n"],"names":["GRID_PADDING_PX","SYMBOL_SIZE_PX","AREA_OPACITY","LINE_WIDTH_PX","DEFAULT_LINE_STYLE","DEFAULT_LINE_WIDTH","YEAR_LABEL","DAY_LABEL","MINUTE_LABEL","SECOND_LABEL","timeAxisLabel","timestamp","instant","nullSafeValueFormatter","input","valueFormatter","value","seriesLabel","showValueLabels","theme","formatValue","params","seriesEntry","data","color","values","point","label","buildTimeSeriesOption","series","xAxis","yAxis","seriesColorOverrides","index"],"mappings":"AA0DA,MAAMA,IAAgF;AAAA,EACpF,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,aAAaA,EAAM;AAAA,MACnB,WAAW,EAAE,OAAOA,EAAM,WAAA;AAAA,MAC1B,gBAAgBC;AAAA,IAAA;AAAA,IAElB,OAAO;AAAA,MACL,MAAM;AAAA,MACN,KAAKU,EAAM;AAAA,MACX,KAAKA,EAAM;AAAA,MACX,UAAU,EAAE,WAAW,EAAE,OAAOX,EAAM,gBAAc;AAAA,MACpD,UAAU,EAAE,MAAM,GAAA;AAAA,MAClB,WAAW,EAAE,OAAOA,EAAM,YAAY,aAAa,IAAM,WAAWT,EAAA;AAAA,MACpE,WAAW,EAAE,MAAM,GAAA;AAAA,IAAM;AAAA,IAE3B,OAAO;AAAA,MACL,MAAMqB,EAAM,UAAU,QAAQ,QAAQ;AAAA,MACtC,OAAOA,EAAM,gBAAgB;AAAA,MAC7B,KAAKA,EAAM;AAAA,MACX,KAAKA,EAAM;AAAA,MACX,UAAU,EAAE,MAAM,GAAA;AAAA,MAClB,WAAW,EAAE,OAAOZ,EAAM,YAAY,WAAWC,EAAA;AAAA,MACjD,WAAW,EAAE,WAAW,EAAE,OAAOD,EAAM,iBAAe;AAAA,IAAE;AAAA,IAE1D,QAAQU,EAAO;AAAA,MAAI,CAACN,GAAsBU,MACxCX;AAAA,QACEC;AAAA,QACAT;AAAA,QACAkB,EAAqBT,EAAK,EAAE,KAAKJ,EAAM,aAAac,IAAQd,EAAM,aAAa,MAAM;AAAA,MAAA;AAAA,IACvF;AAAA,EACF;AAEJ;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react/jsx-runtime"),w=require("../../../../vendor/clsx/dist/clsx.cjs"),c=require("react"),_=require("../chart-palette.cjs"),q=require("../useChartInstance.cjs"),g=require("./top-list-option.cjs");;/* empty css */const M=["value"],P=_.CHART_SERIES_COLOR_TOKENS[0];function A(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function j(t,a){const u=new Set(t.map(e=>e.id)),o=a.filter(e=>u.has(e)),d=t.map(e=>e.id).filter(e=>!o.includes(e));return[...o,...d]}function y({items:t,sort:a="desc",total:u,valueDisplay:o=M,valueFormatter:d,colorToken:e=P,className:x,...C}){const{containerRef:f,chart:p,theme:l,resolveSeriesColor:h}=q.useChartInstance(),O=c.useRef(!1),v=c.useRef([]),[R,L]=c.useState(0),[S,m]=c.useState(0);c.useEffect(()=>{const r=f.current;if(!r)return;const s=new ResizeObserver(()=>{L(r.clientHeight),m(r.clientWidth)});return s.observe(r),()=>s.disconnect()},[f]);const E=R>0,I=g.labeledRowStepFor(R,t.length),T=c.useMemo(()=>{const r=h(e),s=[];return t.forEach(i=>{const n=(i.colorToken?h(i.colorToken):void 0)??r;n&&s.push([i.id,n])}),Object.fromEntries(s)},[t,e,l,h]);return c.useEffect(()=>{if(!p||!l||!E)return;const r=O.current&&!A();v.current=j(t,v.current);const s=new Map(t.map(n=>[n.id,n])),i=v.current.map(n=>s.get(n));p.setOption(g.buildTopListOption({items:i,sort:a,total:u,valueDisplay:o,theme:l,colorsByItemId:T,animate:r,labeledRowStep:I,canvasWidthPx:S,valueFormatter:d}),{replaceMerge:["series","yAxis"]}),O.current=!0},[p,l,t,a,u,o,T,E,I,S,d]),b.jsx("div",{className:w.clsx("top-list",x),...C,children:b.jsx("div",{ref:f,className:"top-list__canvas"})})}exports.TopList=y;
|
|
2
2
|
//# sourceMappingURL=TopList.cjs.map
|
|
@@ -46,7 +46,7 @@ function b({
|
|
|
46
46
|
);
|
|
47
47
|
return /* @__PURE__ */ s("span", { className: l, ...o, children: h({ initials: e, src: r, alt: n }) });
|
|
48
48
|
}
|
|
49
|
-
const
|
|
49
|
+
const k = u.forwardRef(function({
|
|
50
50
|
className: r,
|
|
51
51
|
src: a = null,
|
|
52
52
|
square: e = !1,
|
|
@@ -64,7 +64,7 @@ const C = u.forwardRef(function({
|
|
|
64
64
|
a ? "avatar-image" : "avatar-initials"
|
|
65
65
|
);
|
|
66
66
|
return /* @__PURE__ */ s(f, { ...l, className: v, ref: c, children: h({ initials: n, src: a, alt: i }) });
|
|
67
|
-
}),
|
|
67
|
+
}), C = ({
|
|
68
68
|
className: t,
|
|
69
69
|
children: r,
|
|
70
70
|
title: a,
|
|
@@ -77,7 +77,7 @@ const C = u.forwardRef(function({
|
|
|
77
77
|
/* @__PURE__ */ s(g, { slot: "label", children: a }),
|
|
78
78
|
e && /* @__PURE__ */ s(x, { slot: "description", children: e })
|
|
79
79
|
] });
|
|
80
|
-
},
|
|
80
|
+
}, T = ({
|
|
81
81
|
className: t,
|
|
82
82
|
children: r,
|
|
83
83
|
max: a = 3,
|
|
@@ -99,8 +99,8 @@ const C = u.forwardRef(function({
|
|
|
99
99
|
};
|
|
100
100
|
export {
|
|
101
101
|
b as Avatar,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
C as AvatarBlock,
|
|
103
|
+
k as AvatarButton,
|
|
104
|
+
T as AvatarGroup
|
|
105
105
|
};
|
|
106
106
|
//# sourceMappingURL=Avatar.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),w=require("../../../vendor/clsx/dist/clsx.cjs"),r=require("react"),N=require("../../hooks/useAnimationFrame.cjs"),n=require("./brandLoaderVariants.cjs"),q=require("./brandLoaderSymbolContext.cjs");;/* empty css */const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),w=require("../../../vendor/clsx/dist/clsx.cjs"),r=require("react"),N=require("../../hooks/useAnimationFrame.cjs"),n=require("./brandLoaderVariants.cjs"),q=require("./brandLoaderSymbolContext.cjs");;/* empty css */const $=require("../../hooks/useMediaQuery.cjs");function A(){return typeof window<"u"&&typeof window.requestAnimationFrame=="function"&&typeof SVGPathElement<"u"&&typeof SVGPathElement.prototype.getPointAtLength=="function"}function S(s,o){return typeof s.getTotalLength=="function"?s.getTotalLength():o}function B({label:s,"aria-hidden":o,variant:t="trace",size:a="32",tone:i="accent",speed:b=1,isPaused:f=!1,symbol:p,className:h,...m}){const g=q.useBrandLoaderSymbol(),c=p??g,x=$.useCustomMediaQuery("(prefers-reduced-motion: reduce)"),d=!f&&!x;return e.jsx("span",{role:o?void 0:"status","aria-label":s,"aria-hidden":o||void 0,className:w.clsx("brand-loader",`brand-loader-size-${a}`,`brand-loader-tone-${i}`,`brand-loader-${c}`,`brand-loader-variant-${t}`,!d&&"brand-loader-paused",h),...m,children:c==="neutral"?e.jsx(k,{}):e.jsx(C,{variant:t,speed:b,isAnimating:d&&A()},t)})}function k(){return e.jsxs("svg",{className:"brand-loader-neutral-glyph",viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:[e.jsx("circle",{className:"brand-loader-neutral-track",cx:"12",cy:"12",r:"9"}),e.jsx("circle",{className:"brand-loader-neutral-arc",cx:"12",cy:"12",r:"9",pathLength:100})]})}function C({variant:s,speed:o,isAnimating:t}){const a=n.brandLoaderVariants[s],i=`brand-loader-sweep-${r.useId().replace(/:/g,"")}`,b=r.useRef(null),f=r.useRef(null),p=r.useRef(null),h=r.useRef(null),m=r.useRef(null),g=r.useRef(null),c=r.useRef(null),x=r.useRef(null),d=r.useRef(0),y=r.useRef(null),P=()=>d.current%a.period/a.period;return r.useLayoutEffect(()=>{const u=b.current,l=f.current,L=p.current,R=h.current;if(!u||!l||!L||!R)return;const j={strokes:u,slash:l,big:L,tri:R,ball:m.current,sweepClip:g.current,sweepEdge:c.current,lengths:{slash:S(l,n.brandLoaderPathLengths.slash),big:S(L,n.brandLoaderPathLengths.big),tri:S(R,n.brandLoaderPathLengths.tri)}};x.current=j,y.current=null,t?a.render(d.current%a.period/a.period,j):a.renderRest(j)},[a,t]),N.useAnimationFrame(u=>{const l=x.current;l&&(y.current!==null&&(d.current+=(u-y.current)*o),y.current=u,a.render(P(),l))},t),e.jsxs("svg",{className:"brand-loader-symbol",viewBox:n.brandLoaderViewBox,"aria-hidden":"true",focusable:"false",children:[s==="sweep"&&e.jsx("defs",{children:e.jsx("clipPath",{id:i,children:e.jsx("polygon",{ref:g})})}),e.jsxs("g",{ref:b,className:"brand-loader-strokes",clipPath:s==="sweep"?`url(#${i})`:void 0,children:[s==="comet"&&e.jsxs("g",{className:"brand-loader-ghost",children:[e.jsx("path",{d:n.brandLoaderSymbolPaths.slash}),e.jsx("path",{d:n.brandLoaderSymbolPaths.big}),e.jsx("path",{d:n.brandLoaderSymbolPaths.tri})]}),e.jsx("path",{ref:f,className:"brand-loader-piece brand-loader-slash",d:n.brandLoaderSymbolPaths.slash}),e.jsx("path",{ref:p,className:"brand-loader-piece brand-loader-big",d:n.brandLoaderSymbolPaths.big}),e.jsx("path",{ref:h,className:"brand-loader-piece brand-loader-tri",d:n.brandLoaderSymbolPaths.tri})]}),s==="bounce"&&e.jsx("ellipse",{ref:m,className:"brand-loader-ball"}),s==="sweep"&&e.jsx("line",{ref:c,className:"brand-loader-sweep-edge"})]})}exports.BrandLoader=B;
|
|
2
2
|
//# sourceMappingURL=BrandLoader.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.cjs","sources":["../../../../../src/ui/primitives/Button/Button.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport React, { ComponentPropsWithoutRef } from \"react\";\nimport {\n Button as RACButton,\n Link as RACLink,\n type ButtonProps as RACButtonProps,\n} from \"react-aria-components\";\nimport { type AnchorOrButtonProps } from \"utils\";\nimport { BrandLoader } from \"../BrandLoader/BrandLoader\";\nimport \"./button.css\";\n\nconst pendingIndicator = (\n <BrandLoader aria-hidden variant=\"pulse\" size=\"16\" tone=\"current\" />\n);\n\nfunction withPendingIndicator(\n children: RACButtonProps[\"children\"],\n isPending: boolean | undefined,\n): RACButtonProps[\"children\"] {\n if (!isPending) return children;\n return (renderProps) => (\n <>\n {pendingIndicator}\n {typeof children === \"function\" ? children(renderProps) : children}\n </>\n );\n}\n\nexport type ButtonProps = Omit<ButtonBaseProps, \"variant\"> & {\n variant?: Exclude<\n ButtonBaseProps[\"variant\"],\n \"danger-primary\" | \"danger-subtle\"\n >;\n};\nexport const Button = React.forwardRef(function Button(\n {\n className,\n size = \"medium\",\n variant = \"primary\",\n isPending,\n isDisabled,\n ...props\n }: ButtonProps,\n ref: React.ForwardedRef<HTMLElement>,\n) {\n const classNames = clsx(\n className,\n \"button\",\n `button-size-${size}`,\n `button-variant-${variant}`,\n );\n\n const { style, ...sharedProps } = props;\n\n return isAnchorProps(props) ? (\n <RACLink\n {...sharedProps}\n isDisabled={isDisabled}\n className={classNames}\n ref={ref as React.ForwardedRef<HTMLAnchorElement>}\n >\n {props.children}\n </RACLink>\n ) : (\n <RACButton\n {...sharedProps}\n className={classNames}\n isPending={isPending}\n isDisabled={isDisabled}\n ref={ref as React.ForwardedRef<HTMLButtonElement>}\n >\n {withPendingIndicator(props.children, isPending)}\n </RACButton>\n );\n});\n\nexport type ButtonDangerProps = Omit<ButtonBaseProps, \"variant\"> & {\n variant?: Exclude<\n ButtonBaseProps[\"variant\"],\n \"primary\" | \"subtle\" | \"neutral\" | \"text\"\n >;\n};\n/**\n * Only used for destructive actions\n */\nexport const ButtonDanger = React.forwardRef(function Button(\n {\n className,\n size = \"medium\",\n variant = \"danger-primary\",\n isPending,\n isDisabled,\n ...props\n }: ButtonDangerProps,\n ref: React.ForwardedRef<HTMLElement>,\n) {\n const classNames = clsx(\n className,\n \"button\",\n `button-size-${size}`,\n `button-variant-${variant}`,\n );\n\n const { style, ...sharedProps } = props;\n\n return isAnchorProps(props) ? (\n <RACLink\n {...sharedProps}\n isDisabled={isDisabled}\n className={classNames}\n ref={ref as React.ForwardedRef<HTMLAnchorElement>}\n >\n {props.children}\n </RACLink>\n ) : (\n <RACButton\n {...sharedProps}\n className={classNames}\n isPending={isPending}\n isDisabled={isDisabled}\n ref={ref as React.ForwardedRef<HTMLButtonElement>}\n >\n {withPendingIndicator(props.children, isPending)}\n </RACButton>\n );\n});\n\ntype ButtonBaseProps = {\n type?: ComponentPropsWithoutRef<\"button\">[\"type\"];\n isPending?: boolean;\n size?: \"small\" | \"medium\";\n variant?:\n | \"primary\"\n | \"neutral\"\n | \"subtle\"\n | \"text\"\n | \"danger-primary\"\n | \"danger-subtle\";\n} & AnchorOrButtonProps;\n\nfunction isAnchorProps(\n props: ButtonBaseProps | ButtonDangerProps,\n): props is (ButtonBaseProps | ButtonDangerProps) &\n ComponentPropsWithoutRef<typeof RACLink> {\n return \"href\" in props;\n}\n\nexport type ButtonGroupProps = React.ComponentPropsWithoutRef<\"div\"> & {\n align?: \"start\" | \"end\" | \"center\" | \"justify\" | \"stack\";\n};\nexport const ButtonGroup = ({\n align = \"start\",\n className,\n ...props\n}: ButtonGroupProps) => {\n const classNames = clsx(\n className,\n \"button-group\",\n `button-group-align-${align}`,\n );\n return <div className={classNames} {...props} />;\n};\n"],"names":["pendingIndicator","jsx","BrandLoader","withPendingIndicator","children","isPending","renderProps","jsxs","Fragment","Button","React","className","size","variant","isDisabled","props","ref","classNames","clsx","style","sharedProps","isAnchorProps","RACLink","RACButton","ButtonDanger","ButtonGroup","align"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.cjs","sources":["../../../../../src/ui/primitives/Button/Button.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport React, { ComponentPropsWithoutRef } from \"react\";\nimport {\n Button as RACButton,\n Link as RACLink,\n type ButtonProps as RACButtonProps,\n type LinkProps as RACLinkProps,\n} from \"react-aria-components\";\nimport { type AnchorOrButtonProps } from \"utils\";\nimport { BrandLoader } from \"../BrandLoader/BrandLoader\";\nimport \"./button.css\";\n\nconst pendingIndicator = (\n <BrandLoader aria-hidden variant=\"pulse\" size=\"16\" tone=\"current\" />\n);\n\nfunction withPendingIndicator(\n children: RACButtonProps[\"children\"],\n isPending: boolean | undefined,\n): RACButtonProps[\"children\"] {\n if (!isPending) return children;\n return (renderProps) => (\n <>\n {pendingIndicator}\n {typeof children === \"function\" ? children(renderProps) : children}\n </>\n );\n}\n\nexport type ButtonProps = Omit<ButtonBaseProps, \"variant\"> & {\n variant?: Exclude<\n ButtonBaseProps[\"variant\"],\n \"danger-primary\" | \"danger-subtle\"\n >;\n};\nexport const Button = React.forwardRef(function Button(\n {\n className,\n size = \"medium\",\n variant = \"primary\",\n isPending,\n isDisabled,\n ...props\n }: ButtonProps,\n ref: React.ForwardedRef<HTMLElement>,\n) {\n const classNames = clsx(\n className,\n \"button\",\n `button-size-${size}`,\n `button-variant-${variant}`,\n );\n\n const { style, ...sharedProps } = props;\n\n return isAnchorProps(props) ? (\n <RACLink\n {...(sharedProps as RACLinkProps)}\n isDisabled={isDisabled}\n className={classNames}\n ref={ref as React.ForwardedRef<HTMLAnchorElement>}\n >\n {props.children}\n </RACLink>\n ) : (\n <RACButton\n {...(sharedProps as RACButtonProps)}\n className={classNames}\n isPending={isPending}\n isDisabled={isDisabled}\n ref={ref as React.ForwardedRef<HTMLButtonElement>}\n >\n {withPendingIndicator(props.children, isPending)}\n </RACButton>\n );\n});\n\nexport type ButtonDangerProps = Omit<ButtonBaseProps, \"variant\"> & {\n variant?: Exclude<\n ButtonBaseProps[\"variant\"],\n \"primary\" | \"subtle\" | \"neutral\" | \"text\"\n >;\n};\n/**\n * Only used for destructive actions\n */\nexport const ButtonDanger = React.forwardRef(function Button(\n {\n className,\n size = \"medium\",\n variant = \"danger-primary\",\n isPending,\n isDisabled,\n ...props\n }: ButtonDangerProps,\n ref: React.ForwardedRef<HTMLElement>,\n) {\n const classNames = clsx(\n className,\n \"button\",\n `button-size-${size}`,\n `button-variant-${variant}`,\n );\n\n const { style, ...sharedProps } = props;\n\n return isAnchorProps(props) ? (\n <RACLink\n {...(sharedProps as RACLinkProps)}\n isDisabled={isDisabled}\n className={classNames}\n ref={ref as React.ForwardedRef<HTMLAnchorElement>}\n >\n {props.children}\n </RACLink>\n ) : (\n <RACButton\n {...(sharedProps as RACButtonProps)}\n className={classNames}\n isPending={isPending}\n isDisabled={isDisabled}\n ref={ref as React.ForwardedRef<HTMLButtonElement>}\n >\n {withPendingIndicator(props.children, isPending)}\n </RACButton>\n );\n});\n\ntype ButtonBaseProps = {\n type?: ComponentPropsWithoutRef<\"button\">[\"type\"];\n isPending?: boolean;\n size?: \"small\" | \"medium\";\n variant?:\n | \"primary\"\n | \"neutral\"\n | \"subtle\"\n | \"text\"\n | \"danger-primary\"\n | \"danger-subtle\";\n} & AnchorOrButtonProps;\n\nfunction isAnchorProps(\n props: ButtonBaseProps | ButtonDangerProps,\n): props is (ButtonBaseProps | ButtonDangerProps) &\n ComponentPropsWithoutRef<typeof RACLink> {\n return \"href\" in props;\n}\n\nexport type ButtonGroupProps = React.ComponentPropsWithoutRef<\"div\"> & {\n align?: \"start\" | \"end\" | \"center\" | \"justify\" | \"stack\";\n};\nexport const ButtonGroup = ({\n align = \"start\",\n className,\n ...props\n}: ButtonGroupProps) => {\n const classNames = clsx(\n className,\n \"button-group\",\n `button-group-align-${align}`,\n );\n return <div className={classNames} {...props} />;\n};\n"],"names":["pendingIndicator","jsx","BrandLoader","withPendingIndicator","children","isPending","renderProps","jsxs","Fragment","Button","React","className","size","variant","isDisabled","props","ref","classNames","clsx","style","sharedProps","isAnchorProps","RACLink","RACButton","ButtonDanger","ButtonGroup","align"],"mappings":"mSAYA,MAAMA,EACJC,EAAAA,IAACC,cAAA,CAAY,cAAW,GAAC,QAAQ,QAAQ,KAAK,KAAK,KAAK,SAAA,CAAU,EAGpE,SAASC,EACPC,EACAC,EAC4B,CAC5B,OAAKA,EACGC,GACNC,EAAAA,KAAAC,EAAAA,SAAA,CACG,SAAA,CAAAR,EACA,OAAOI,GAAa,WAAaA,EAASE,CAAW,EAAIF,CAAA,EAC5D,EALqBA,CAOzB,CAQO,MAAMK,EAASC,EAAM,WAAW,SACrC,CACE,UAAAC,EACA,KAAAC,EAAO,SACP,QAAAC,EAAU,UACV,UAAAR,EACA,WAAA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AA,EAE7B,OAAOzB,EAAAA,IAAC,MAAA,CAAI,UAAWgB,EAAa,GAAGF,EAAO,CAChD"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as b, Fragment as g } from "react/jsx-runtime";
|
|
2
2
|
import { clsx as d } from "../../../vendor/clsx/dist/clsx.js";
|
|
3
3
|
import l from "react";
|
|
4
4
|
import { Link as f, Button as h } from "react-aria-components";
|
|
5
|
-
import { BrandLoader as
|
|
5
|
+
import { BrandLoader as p } from "../BrandLoader/BrandLoader.js";
|
|
6
6
|
/* empty css */
|
|
7
|
-
const y = /* @__PURE__ */ e(
|
|
7
|
+
const y = /* @__PURE__ */ e(p, { "aria-hidden": !0, variant: "pulse", size: "16", tone: "current" });
|
|
8
8
|
function B(t, r) {
|
|
9
|
-
return r ? (o) => /* @__PURE__ */ g
|
|
9
|
+
return r ? (o) => /* @__PURE__ */ b(g, { children: [
|
|
10
10
|
y,
|
|
11
11
|
typeof t == "function" ? t(o) : t
|
|
12
12
|
] }) : t;
|
|
@@ -24,7 +24,7 @@ const I = l.forwardRef(function({
|
|
|
24
24
|
"button",
|
|
25
25
|
`button-size-${o}`,
|
|
26
26
|
`button-variant-${a}`
|
|
27
|
-
), { style:
|
|
27
|
+
), { style: $, ...m } = n;
|
|
28
28
|
return N(n) ? /* @__PURE__ */ e(
|
|
29
29
|
f,
|
|
30
30
|
{
|
|
@@ -58,7 +58,7 @@ const I = l.forwardRef(function({
|
|
|
58
58
|
"button",
|
|
59
59
|
`button-size-${o}`,
|
|
60
60
|
`button-variant-${a}`
|
|
61
|
-
), { style:
|
|
61
|
+
), { style: $, ...m } = n;
|
|
62
62
|
return N(n) ? /* @__PURE__ */ e(
|
|
63
63
|
f,
|
|
64
64
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../../../../../src/ui/primitives/Button/Button.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport React, { ComponentPropsWithoutRef } from \"react\";\nimport {\n Button as RACButton,\n Link as RACLink,\n type ButtonProps as RACButtonProps,\n} from \"react-aria-components\";\nimport { type AnchorOrButtonProps } from \"utils\";\nimport { BrandLoader } from \"../BrandLoader/BrandLoader\";\nimport \"./button.css\";\n\nconst pendingIndicator = (\n <BrandLoader aria-hidden variant=\"pulse\" size=\"16\" tone=\"current\" />\n);\n\nfunction withPendingIndicator(\n children: RACButtonProps[\"children\"],\n isPending: boolean | undefined,\n): RACButtonProps[\"children\"] {\n if (!isPending) return children;\n return (renderProps) => (\n <>\n {pendingIndicator}\n {typeof children === \"function\" ? children(renderProps) : children}\n </>\n );\n}\n\nexport type ButtonProps = Omit<ButtonBaseProps, \"variant\"> & {\n variant?: Exclude<\n ButtonBaseProps[\"variant\"],\n \"danger-primary\" | \"danger-subtle\"\n >;\n};\nexport const Button = React.forwardRef(function Button(\n {\n className,\n size = \"medium\",\n variant = \"primary\",\n isPending,\n isDisabled,\n ...props\n }: ButtonProps,\n ref: React.ForwardedRef<HTMLElement>,\n) {\n const classNames = clsx(\n className,\n \"button\",\n `button-size-${size}`,\n `button-variant-${variant}`,\n );\n\n const { style, ...sharedProps } = props;\n\n return isAnchorProps(props) ? (\n <RACLink\n {...sharedProps}\n isDisabled={isDisabled}\n className={classNames}\n ref={ref as React.ForwardedRef<HTMLAnchorElement>}\n >\n {props.children}\n </RACLink>\n ) : (\n <RACButton\n {...sharedProps}\n className={classNames}\n isPending={isPending}\n isDisabled={isDisabled}\n ref={ref as React.ForwardedRef<HTMLButtonElement>}\n >\n {withPendingIndicator(props.children, isPending)}\n </RACButton>\n );\n});\n\nexport type ButtonDangerProps = Omit<ButtonBaseProps, \"variant\"> & {\n variant?: Exclude<\n ButtonBaseProps[\"variant\"],\n \"primary\" | \"subtle\" | \"neutral\" | \"text\"\n >;\n};\n/**\n * Only used for destructive actions\n */\nexport const ButtonDanger = React.forwardRef(function Button(\n {\n className,\n size = \"medium\",\n variant = \"danger-primary\",\n isPending,\n isDisabled,\n ...props\n }: ButtonDangerProps,\n ref: React.ForwardedRef<HTMLElement>,\n) {\n const classNames = clsx(\n className,\n \"button\",\n `button-size-${size}`,\n `button-variant-${variant}`,\n );\n\n const { style, ...sharedProps } = props;\n\n return isAnchorProps(props) ? (\n <RACLink\n {...sharedProps}\n isDisabled={isDisabled}\n className={classNames}\n ref={ref as React.ForwardedRef<HTMLAnchorElement>}\n >\n {props.children}\n </RACLink>\n ) : (\n <RACButton\n {...sharedProps}\n className={classNames}\n isPending={isPending}\n isDisabled={isDisabled}\n ref={ref as React.ForwardedRef<HTMLButtonElement>}\n >\n {withPendingIndicator(props.children, isPending)}\n </RACButton>\n );\n});\n\ntype ButtonBaseProps = {\n type?: ComponentPropsWithoutRef<\"button\">[\"type\"];\n isPending?: boolean;\n size?: \"small\" | \"medium\";\n variant?:\n | \"primary\"\n | \"neutral\"\n | \"subtle\"\n | \"text\"\n | \"danger-primary\"\n | \"danger-subtle\";\n} & AnchorOrButtonProps;\n\nfunction isAnchorProps(\n props: ButtonBaseProps | ButtonDangerProps,\n): props is (ButtonBaseProps | ButtonDangerProps) &\n ComponentPropsWithoutRef<typeof RACLink> {\n return \"href\" in props;\n}\n\nexport type ButtonGroupProps = React.ComponentPropsWithoutRef<\"div\"> & {\n align?: \"start\" | \"end\" | \"center\" | \"justify\" | \"stack\";\n};\nexport const ButtonGroup = ({\n align = \"start\",\n className,\n ...props\n}: ButtonGroupProps) => {\n const classNames = clsx(\n className,\n \"button-group\",\n `button-group-align-${align}`,\n );\n return <div className={classNames} {...props} />;\n};\n"],"names":["pendingIndicator","jsx","BrandLoader","withPendingIndicator","children","isPending","renderProps","jsxs","Fragment","Button","React","className","size","variant","isDisabled","props","ref","classNames","clsx","style","sharedProps","isAnchorProps","RACLink","RACButton","ButtonDanger","ButtonGroup","align"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../../../../src/ui/primitives/Button/Button.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport React, { ComponentPropsWithoutRef } from \"react\";\nimport {\n Button as RACButton,\n Link as RACLink,\n type ButtonProps as RACButtonProps,\n type LinkProps as RACLinkProps,\n} from \"react-aria-components\";\nimport { type AnchorOrButtonProps } from \"utils\";\nimport { BrandLoader } from \"../BrandLoader/BrandLoader\";\nimport \"./button.css\";\n\nconst pendingIndicator = (\n <BrandLoader aria-hidden variant=\"pulse\" size=\"16\" tone=\"current\" />\n);\n\nfunction withPendingIndicator(\n children: RACButtonProps[\"children\"],\n isPending: boolean | undefined,\n): RACButtonProps[\"children\"] {\n if (!isPending) return children;\n return (renderProps) => (\n <>\n {pendingIndicator}\n {typeof children === \"function\" ? children(renderProps) : children}\n </>\n );\n}\n\nexport type ButtonProps = Omit<ButtonBaseProps, \"variant\"> & {\n variant?: Exclude<\n ButtonBaseProps[\"variant\"],\n \"danger-primary\" | \"danger-subtle\"\n >;\n};\nexport const Button = React.forwardRef(function Button(\n {\n className,\n size = \"medium\",\n variant = \"primary\",\n isPending,\n isDisabled,\n ...props\n }: ButtonProps,\n ref: React.ForwardedRef<HTMLElement>,\n) {\n const classNames = clsx(\n className,\n \"button\",\n `button-size-${size}`,\n `button-variant-${variant}`,\n );\n\n const { style, ...sharedProps } = props;\n\n return isAnchorProps(props) ? (\n <RACLink\n {...(sharedProps as RACLinkProps)}\n isDisabled={isDisabled}\n className={classNames}\n ref={ref as React.ForwardedRef<HTMLAnchorElement>}\n >\n {props.children}\n </RACLink>\n ) : (\n <RACButton\n {...(sharedProps as RACButtonProps)}\n className={classNames}\n isPending={isPending}\n isDisabled={isDisabled}\n ref={ref as React.ForwardedRef<HTMLButtonElement>}\n >\n {withPendingIndicator(props.children, isPending)}\n </RACButton>\n );\n});\n\nexport type ButtonDangerProps = Omit<ButtonBaseProps, \"variant\"> & {\n variant?: Exclude<\n ButtonBaseProps[\"variant\"],\n \"primary\" | \"subtle\" | \"neutral\" | \"text\"\n >;\n};\n/**\n * Only used for destructive actions\n */\nexport const ButtonDanger = React.forwardRef(function Button(\n {\n className,\n size = \"medium\",\n variant = \"danger-primary\",\n isPending,\n isDisabled,\n ...props\n }: ButtonDangerProps,\n ref: React.ForwardedRef<HTMLElement>,\n) {\n const classNames = clsx(\n className,\n \"button\",\n `button-size-${size}`,\n `button-variant-${variant}`,\n );\n\n const { style, ...sharedProps } = props;\n\n return isAnchorProps(props) ? (\n <RACLink\n {...(sharedProps as RACLinkProps)}\n isDisabled={isDisabled}\n className={classNames}\n ref={ref as React.ForwardedRef<HTMLAnchorElement>}\n >\n {props.children}\n </RACLink>\n ) : (\n <RACButton\n {...(sharedProps as RACButtonProps)}\n className={classNames}\n isPending={isPending}\n isDisabled={isDisabled}\n ref={ref as React.ForwardedRef<HTMLButtonElement>}\n >\n {withPendingIndicator(props.children, isPending)}\n </RACButton>\n );\n});\n\ntype ButtonBaseProps = {\n type?: ComponentPropsWithoutRef<\"button\">[\"type\"];\n isPending?: boolean;\n size?: \"small\" | \"medium\";\n variant?:\n | \"primary\"\n | \"neutral\"\n | \"subtle\"\n | \"text\"\n | \"danger-primary\"\n | \"danger-subtle\";\n} & AnchorOrButtonProps;\n\nfunction isAnchorProps(\n props: ButtonBaseProps | ButtonDangerProps,\n): props is (ButtonBaseProps | ButtonDangerProps) &\n ComponentPropsWithoutRef<typeof RACLink> {\n return \"href\" in props;\n}\n\nexport type ButtonGroupProps = React.ComponentPropsWithoutRef<\"div\"> & {\n align?: \"start\" | \"end\" | \"center\" | \"justify\" | \"stack\";\n};\nexport const ButtonGroup = ({\n align = \"start\",\n className,\n ...props\n}: ButtonGroupProps) => {\n const classNames = clsx(\n className,\n \"button-group\",\n `button-group-align-${align}`,\n );\n return <div className={classNames} {...props} />;\n};\n"],"names":["pendingIndicator","jsx","BrandLoader","withPendingIndicator","children","isPending","renderProps","jsxs","Fragment","Button","React","className","size","variant","isDisabled","props","ref","classNames","clsx","style","sharedProps","isAnchorProps","RACLink","RACButton","ButtonDanger","ButtonGroup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aC;AAAA,IACjBP;AAAA,IACA;AAAA,IACA,eAAeC,CAAI;AAAA,IACnB,kBAAkBC,CAAO;AAAA,EAAA,GAGrB,EAAE,OAAAM,GAAO,GAAGC,EAAA,IAAgBL;AAElC,SAAOM,EAAcN,CAAK,IACxB,gBAAAd;AAAA,IAACqB;AAAAA,IAAA;AAAA,MACE,GAAIF;AAAA,MACL,YAAAN;AAAA,MACA,WAAWG;AAAA,MACX,KAAAD;AAAA,MAEC,UAAAD,EAAM;AAAA,IAAA;AAAA,EAAA,IAGT,gBAAAd;AAAA,IAACsB;AAAAA,IAAA;AAAA,MACE,GAAIH;AAAA,MACL,WAAWH;AAAA,MACX,WAAAZ;AAAA,MACA,YAAAS;AAAA,MACA,KAAAE;AAAA,MAEC,UAAAb,EAAqBY,EAAM,UAAUV,CAAS;AAAA,IAAA;AAAA,EAAA;AAGrD,CAAC;AAeD,SAASgB,EACPN,GAEyC;AACzC,SAAO,UAAUA;AACnB;AAKO,MAAMU,IAAc,CAAC;AAAA,EAC1B,OAAAC,IAAQ;AAAA,EACR,WAAAf;AAAA,EACA,GAAGI;AACL,MAAwB;AACtB,QAAME,IAAaC;AAAA,IACjBP;AAAA,IACA;AAAA,IACA,sBAAsBe,CAAK;AAAA,EAAA;AAE7B,SAAO,gBAAAzB,EAAC,OAAA,EAAI,WAAWgB,GAAa,GAAGF,GAAO;AAChD;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("react");;/* empty css */const a=require("../IconButton/IconButton.cjs"),l=require("../../icons/IconCheck.cjs"),d=require("../../icons/IconCopy.cjs");function u({text:c,copyLabel:n="Copy",copiedLabel:r="Copied"}){const[o,t]=s.useState(!1);function i(){navigator.clipboard.writeText(c).then(()=>{t(!0),setTimeout(()=>t(!1),2e3)}).catch(()=>{})}return e.jsxs("div",{className:"codeblock","data-copied":o||void 0,children:[e.jsx("code",{className:"codeblock-text",children:c}),e.jsx(a.IconButton,{"aria-label":o?r:n,variant:"subtle",size:"small",onPress:i,children:o?e.jsx(l.IconCheck,{}):e.jsx(d.IconCopy,{})})]})}exports.CodeBlock=u;
|
|
2
2
|
//# sourceMappingURL=CodeBlock.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),h=require("../../../vendor/clsx/dist/clsx.cjs"),u=require("react"),F=require("../../../vendor/@monaco-editor/react/dist/index.cjs");;/* empty css */const m=require("../Fieldset/Fieldset.cjs"),g=require("../Button/Button.cjs");function j({value:d,defaultValue:s,onChange:o,language:i="javascript",theme:n="vs",height:r="300px",isDisabled:t=!1,isReadOnly:a=!1,options:f,className:p,editorRef:l}){const[c,v]=u.useState(!1),E=u.useRef(null);function N(x,B){l&&(l.current=x),x.onDidFocusEditorWidget(()=>v(!0)),x.onDidBlurEditorWidget(()=>v(!1))}const C=h.clsx("code-editor-wrapper",p,{"code-editor-focused":c,"code-editor-disabled":t});return e.jsx("div",{ref:E,className:C,"data-disabled":t||void 0,style:{height:r},children:e.jsx(F.default,{height:"100%",value:d,defaultValue:s,language:i,theme:n,onChange:o,onMount:N,loading:e.jsx("div",{className:"code-editor-loading"}),options:{readOnly:a||t,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:13,lineNumbersMinChars:3,...f}})})}function q({className:d,label:s,description:o,errorMessage:i,...n}){const r=u.useId(),t=h.clsx(d,"field");return e.jsxs("div",{className:t,children:[s&&e.jsx(m.Label,{htmlFor:r,children:s}),e.jsx(j,{...n}),o&&e.jsx(m.Description,{children:o}),i&&typeof i=="string"&&e.jsx(m.FieldError,{children:i})]})}const y="Clique no editor e pressione F1 para visualizar os atalhos do teclado";function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),h=require("../../../vendor/clsx/dist/clsx.cjs"),u=require("react"),F=require("../../../vendor/@monaco-editor/react/dist/index.cjs");;/* empty css */const m=require("../Fieldset/Fieldset.cjs"),g=require("../Button/Button.cjs");function j({value:d,defaultValue:s,onChange:o,language:i="javascript",theme:n="vs",height:r="300px",isDisabled:t=!1,isReadOnly:a=!1,options:f,className:p,editorRef:l}){const[c,v]=u.useState(!1),E=u.useRef(null);function N(x,B){l&&(l.current=x),x.onDidFocusEditorWidget(()=>v(!0)),x.onDidBlurEditorWidget(()=>v(!1))}const C=h.clsx("code-editor-wrapper",p,{"code-editor-focused":c,"code-editor-disabled":t});return e.jsx("div",{ref:E,className:C,"data-disabled":t||void 0,style:{height:r},children:e.jsx(F.default,{height:"100%",value:d,defaultValue:s,language:i,theme:n,onChange:o,onMount:N,loading:e.jsx("div",{className:"code-editor-loading"}),options:{readOnly:a||t,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:13,lineNumbersMinChars:3,...f}})})}function q({className:d,label:s,description:o,errorMessage:i,...n}){const r=u.useId(),t=h.clsx(d,"field");return e.jsxs("div",{className:t,children:[s&&e.jsx(m.Label,{htmlFor:r,children:s}),e.jsx(j,{...n}),o&&e.jsx(m.Description,{children:o}),i&&typeof i=="string"&&e.jsx(m.FieldError,{children:i})]})}const y="Clique no editor e pressione F1 para visualizar os atalhos do teclado";function T({title:d,shortcutHint:s=y,onBeautify:o,className:i,isDisabled:n=!1,isReadOnly:r=!1,...t}){const a=u.useRef(null),f=!n&&!r;function p(){var l,c;if(o){o();return}(c=(l=a.current)==null?void 0:l.getAction("editor.action.formatDocument"))==null||c.run()}return e.jsxs("div",{className:h.clsx("code-editor-panel",i),children:[f&&e.jsxs("div",{className:"code-editor-panel-header",children:[e.jsxs("div",{className:"code-editor-panel-title-group",children:[e.jsx("span",{className:"code-editor-panel-title",children:d}),s&&e.jsxs("span",{className:"code-editor-panel-hint",children:["(",s,")"]})]}),e.jsx(g.Button,{size:"small",variant:"primary",onPress:p,children:"Beautify"})]}),e.jsx(j,{...t,isDisabled:n,isReadOnly:r,editorRef:a})]})}exports.CodeEditor=j;exports.CodeEditorField=q;exports.CodeEditorPanel=T;
|
|
2
2
|
//# sourceMappingURL=CodeEditor.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("../../../vendor/clsx/dist/clsx.cjs"),C=require("react"),t=require("react-aria-components"),x=require("./comboBoxFocus.cjs");;/* empty css */const B=require("../../hooks/useOverlayPortal.cjs"),n=require("../Fieldset/Fieldset.cjs"),q=require("../Input/Input.cjs"),I=require("../../icons/IconChevronDown.cjs"),l=require("../ListBox/ListBox.cjs"),g=require("../../icons/IconCheck.cjs");function N({className:o,label:r,description:s,errorMessage:c,placeholder:i,children:b,items:d,...j}){const p=a.clsx(o,"combobox-container"),u=C.useRef(null);x.useKeepFocusOnInput(u);const h=B.useOverlayPortalContainer();return e.jsx(m,{className:p,...j,children:e.jsxs(n.Field,{children:[r&&e.jsx(n.Label,{children:r}),e.jsxs(t.Group,{className:"combobox",children:[e.jsx(q.Input,{className:"combobox-input",placeholder:i,onPointerDown:x.openMenuWhenFocusedInputIsPressed(u)}),e.jsx(t.Button,{ref:u,className:"combobox-trigger",children:e.jsx(I.IconChevronDown,{"aria-hidden":"true"})})]}),e.jsx(t.Popover,{className:"combobox-popover",UNSTABLE_portalContainer:h,children:e.jsx(l.ListBox,{items:d,children:b})}),s&&e.jsx(n.Description,{children:s}),e.jsx(n.FieldError,{children:c})]})})}function m({...o}){return e.jsx(t.ComboBox,{menuTrigger:"focus",...o})}function f({children:o,className:r,...s}){const c=a.clsx(r,"combobox-item"),i=typeof o=="string"?o:"";return e.jsx(l.ListBoxItem,{textValue:i,className:c,...s,children:e.jsxs(e.Fragment,{children:[e.jsx(g.IconCheck,{className:"combobox-item-check"}),o]})})}exports.ComboBox=m;exports.ComboBoxField=N;exports.ComboBoxItem=f;
|
|
2
2
|
//# sourceMappingURL=ComboBox.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboBox.cjs","sources":["../../../../../src/ui/primitives/ComboBox/ComboBox.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { useOverlayPortalContainer } from \"hooks\";\nimport { IconCheck, IconChevronDown } from \"icons\";\nimport {\n Description,\n Field,\n FieldError,\n Input,\n ListBox,\n ListBoxItem,\n Label,\n SharedFieldProps,\n type ListBoxItemProps,\n} from \"primitives\";\nimport {
|
|
1
|
+
{"version":3,"file":"ComboBox.cjs","sources":["../../../../../src/ui/primitives/ComboBox/ComboBox.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { useOverlayPortalContainer } from \"hooks\";\nimport { IconCheck, IconChevronDown } from \"icons\";\nimport {\n Description,\n Field,\n FieldError,\n Input,\n ListBox,\n ListBoxItem,\n Label,\n SharedFieldProps,\n type ListBoxItemProps,\n} from \"primitives\";\nimport { useRef } from \"react\";\nimport {\n Button as RACButton,\n ComboBox as RACComboBox,\n Group as RACGroup,\n Popover as RACPopover,\n type ComboBoxProps as RACComboBoxProps,\n} from \"react-aria-components\";\nimport {\n openMenuWhenFocusedInputIsPressed,\n useKeepFocusOnInput,\n} from \"./comboBoxFocus\";\nimport \"./combobox.css\";\n\nexport interface ComboBoxFieldProps<T extends object>\n extends Omit<ComboBoxProps<T>, \"children\">,\n SharedFieldProps {\n items?: Iterable<T>;\n children: React.ReactNode | ((item: T) => React.ReactNode);\n}\n\nexport function ComboBoxField<T extends object>({\n className,\n label,\n description,\n errorMessage,\n placeholder,\n children,\n items,\n ...props\n}: ComboBoxFieldProps<T>) {\n const classNames = clsx(className, \"combobox-container\");\n const triggerRef = useRef<HTMLButtonElement | null>(null);\n useKeepFocusOnInput(triggerRef);\n // Sem container explícito o dropdown faz portal no document.body — fora da\n // shadow root do MFE, sem CSS. Ver ui/hooks/useOverlayPortal.\n const portalContainer = useOverlayPortalContainer();\n return (\n <ComboBox className={classNames} {...props}>\n <Field>\n {label && <Label>{label}</Label>}\n <RACGroup className=\"combobox\">\n <Input\n className=\"combobox-input\"\n placeholder={placeholder}\n onPointerDown={openMenuWhenFocusedInputIsPressed(triggerRef)}\n />\n <RACButton ref={triggerRef} className=\"combobox-trigger\">\n <IconChevronDown aria-hidden=\"true\" />\n </RACButton>\n </RACGroup>\n <RACPopover\n className=\"combobox-popover\"\n UNSTABLE_portalContainer={portalContainer}\n >\n <ListBox items={items}>{children}</ListBox>\n </RACPopover>\n {description && <Description>{description}</Description>}\n <FieldError>{errorMessage}</FieldError>\n </Field>\n </ComboBox>\n );\n}\n\nexport type ComboBoxProps<T extends object> = RACComboBoxProps<T>;\nexport function ComboBox<T extends object>({ ...props }: ComboBoxProps<T>) {\n return <RACComboBox<T> menuTrigger=\"focus\" {...props} />;\n}\n\nexport type ComboBoxItemProps = ListBoxItemProps;\nexport function ComboBoxItem({ children, className, ...props }: ComboBoxItemProps) {\n const classNames = clsx(className, \"combobox-item\");\n const textValue = typeof children === \"string\" ? children : \"\";\n return (\n <ListBoxItem textValue={textValue} className={classNames} {...props}>\n <>\n <IconCheck className=\"combobox-item-check\" />\n {children}\n </>\n </ListBoxItem>\n );\n}\n"],"names":["ComboBoxField","className","label","description","errorMessage","placeholder","children","items","props","classNames","clsx","triggerRef","useRef","useKeepFocusOnInput","portalContainer","useOverlayPortalContainer","ComboBox","Field","jsx","Label","jsxs","RACGroup","Input","openMenuWhenFocusedInputIsPressed","RACButton","IconChevronDown","RACPopover","ListBox","Description","FieldError","RACComboBox","ComboBoxItem","textValue","ListBoxItem","Fragment","IconCheck"],"mappings":"4gBAmCO,SAASA,EAAgC,CAC9C,UAAAC,EACA,MAAAC,EACA,YAAAC,EACA,aAAAC,EACA,YAAAC,EACA,SAA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A,EAAW,GAC5D,aACG2B,EAAAA,YAAA,CAAY,UAAAD,EAAsB,UAAWvB,EAAa,GAAGD,EAC5D,SAAAY,EAAAA,KAAAc,EAAAA,SAAA,CACE,SAAA,CAAAhB,EAAAA,IAACiB,EAAAA,UAAA,CAAU,UAAU,qBAAA,CAAsB,EAC1C7B,CAAA,CAAA,CACH,CAAA,CACF,CAEJ"}
|
|
@@ -1,82 +1,66 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { clsx as
|
|
3
|
-
import { useRef as
|
|
4
|
-
import { Group as
|
|
1
|
+
import { jsx as o, jsxs as c, Fragment as b } from "react/jsx-runtime";
|
|
2
|
+
import { clsx as s } from "../../../vendor/clsx/dist/clsx.js";
|
|
3
|
+
import { useRef as f } from "react";
|
|
4
|
+
import { Group as d, Button as h, Popover as C, ComboBox as N } from "react-aria-components";
|
|
5
|
+
import { useKeepFocusOnInput as B, openMenuWhenFocusedInputIsPressed as g } from "./comboBoxFocus.js";
|
|
5
6
|
/* empty css */
|
|
6
|
-
import { useOverlayPortalContainer as
|
|
7
|
-
import { Field as F, Label as
|
|
7
|
+
import { useOverlayPortalContainer as I } from "../../hooks/useOverlayPortal.js";
|
|
8
|
+
import { Field as F, Label as v, Description as L, FieldError as P } from "../Fieldset/Fieldset.js";
|
|
8
9
|
import { Input as D } from "../Input/Input.js";
|
|
9
|
-
import { IconChevronDown as
|
|
10
|
-
import { ListBox as k, ListBoxItem as
|
|
11
|
-
import { IconCheck as
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
return e instanceof ShadowRoot || e instanceof Document ? e.activeElement : null;
|
|
15
|
-
}
|
|
16
|
-
function j(o) {
|
|
17
|
-
g(() => {
|
|
18
|
-
const e = o.current;
|
|
19
|
-
if (!e) return;
|
|
20
|
-
function t(n) {
|
|
21
|
-
n.preventDefault();
|
|
22
|
-
}
|
|
23
|
-
return e.addEventListener("mousedown", t), () => e.removeEventListener("mousedown", t);
|
|
24
|
-
}, [o]);
|
|
25
|
-
}
|
|
26
|
-
function J({
|
|
27
|
-
className: o,
|
|
10
|
+
import { IconChevronDown as j } from "../../icons/IconChevronDown.js";
|
|
11
|
+
import { ListBox as k, ListBoxItem as w } from "../ListBox/ListBox.js";
|
|
12
|
+
import { IconCheck as y } from "../../icons/IconCheck.js";
|
|
13
|
+
function $({
|
|
14
|
+
className: r,
|
|
28
15
|
label: e,
|
|
29
16
|
description: t,
|
|
30
17
|
errorMessage: n,
|
|
31
|
-
placeholder:
|
|
32
|
-
children:
|
|
33
|
-
items:
|
|
18
|
+
placeholder: i,
|
|
19
|
+
children: a,
|
|
20
|
+
items: l,
|
|
34
21
|
...p
|
|
35
22
|
}) {
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
const
|
|
39
|
-
return /* @__PURE__ */
|
|
40
|
-
e && /* @__PURE__ */
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */
|
|
23
|
+
const u = s(r, "combobox-container"), m = f(null);
|
|
24
|
+
B(m);
|
|
25
|
+
const x = I();
|
|
26
|
+
return /* @__PURE__ */ o(E, { className: u, ...p, children: /* @__PURE__ */ c(F, { children: [
|
|
27
|
+
e && /* @__PURE__ */ o(v, { children: e }),
|
|
28
|
+
/* @__PURE__ */ c(d, { className: "combobox", children: [
|
|
29
|
+
/* @__PURE__ */ o(
|
|
43
30
|
D,
|
|
44
31
|
{
|
|
45
32
|
className: "combobox-input",
|
|
46
|
-
placeholder:
|
|
47
|
-
onPointerDown: (
|
|
48
|
-
var a;
|
|
49
|
-
R(s.currentTarget) === s.currentTarget && ((a = c.current) == null || a.click());
|
|
50
|
-
}
|
|
33
|
+
placeholder: i,
|
|
34
|
+
onPointerDown: g(m)
|
|
51
35
|
}
|
|
52
36
|
),
|
|
53
|
-
/* @__PURE__ */
|
|
37
|
+
/* @__PURE__ */ o(h, { ref: m, className: "combobox-trigger", children: /* @__PURE__ */ o(j, { "aria-hidden": "true" }) })
|
|
54
38
|
] }),
|
|
55
|
-
/* @__PURE__ */
|
|
39
|
+
/* @__PURE__ */ o(
|
|
56
40
|
C,
|
|
57
41
|
{
|
|
58
42
|
className: "combobox-popover",
|
|
59
|
-
UNSTABLE_portalContainer:
|
|
60
|
-
children: /* @__PURE__ */
|
|
43
|
+
UNSTABLE_portalContainer: x,
|
|
44
|
+
children: /* @__PURE__ */ o(k, { items: l, children: a })
|
|
61
45
|
}
|
|
62
46
|
),
|
|
63
|
-
t && /* @__PURE__ */
|
|
64
|
-
/* @__PURE__ */
|
|
47
|
+
t && /* @__PURE__ */ o(L, { children: t }),
|
|
48
|
+
/* @__PURE__ */ o(P, { children: n })
|
|
65
49
|
] }) });
|
|
66
50
|
}
|
|
67
|
-
function
|
|
68
|
-
return /* @__PURE__ */
|
|
51
|
+
function E({ ...r }) {
|
|
52
|
+
return /* @__PURE__ */ o(N, { menuTrigger: "focus", ...r });
|
|
69
53
|
}
|
|
70
|
-
function
|
|
71
|
-
const n =
|
|
72
|
-
return /* @__PURE__ */
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
|
|
54
|
+
function q({ children: r, className: e, ...t }) {
|
|
55
|
+
const n = s(e, "combobox-item");
|
|
56
|
+
return /* @__PURE__ */ o(w, { textValue: typeof r == "string" ? r : "", className: n, ...t, children: /* @__PURE__ */ c(b, { children: [
|
|
57
|
+
/* @__PURE__ */ o(y, { className: "combobox-item-check" }),
|
|
58
|
+
r
|
|
75
59
|
] }) });
|
|
76
60
|
}
|
|
77
61
|
export {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
62
|
+
E as ComboBox,
|
|
63
|
+
$ as ComboBoxField,
|
|
64
|
+
q as ComboBoxItem
|
|
81
65
|
};
|
|
82
66
|
//# sourceMappingURL=ComboBox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboBox.js","sources":["../../../../../src/ui/primitives/ComboBox/ComboBox.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { useOverlayPortalContainer } from \"hooks\";\nimport { IconCheck, IconChevronDown } from \"icons\";\nimport {\n Description,\n Field,\n FieldError,\n Input,\n ListBox,\n ListBoxItem,\n Label,\n SharedFieldProps,\n type ListBoxItemProps,\n} from \"primitives\";\nimport {
|
|
1
|
+
{"version":3,"file":"ComboBox.js","sources":["../../../../../src/ui/primitives/ComboBox/ComboBox.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { useOverlayPortalContainer } from \"hooks\";\nimport { IconCheck, IconChevronDown } from \"icons\";\nimport {\n Description,\n Field,\n FieldError,\n Input,\n ListBox,\n ListBoxItem,\n Label,\n SharedFieldProps,\n type ListBoxItemProps,\n} from \"primitives\";\nimport { useRef } from \"react\";\nimport {\n Button as RACButton,\n ComboBox as RACComboBox,\n Group as RACGroup,\n Popover as RACPopover,\n type ComboBoxProps as RACComboBoxProps,\n} from \"react-aria-components\";\nimport {\n openMenuWhenFocusedInputIsPressed,\n useKeepFocusOnInput,\n} from \"./comboBoxFocus\";\nimport \"./combobox.css\";\n\nexport interface ComboBoxFieldProps<T extends object>\n extends Omit<ComboBoxProps<T>, \"children\">,\n SharedFieldProps {\n items?: Iterable<T>;\n children: React.ReactNode | ((item: T) => React.ReactNode);\n}\n\nexport function ComboBoxField<T extends object>({\n className,\n label,\n description,\n errorMessage,\n placeholder,\n children,\n items,\n ...props\n}: ComboBoxFieldProps<T>) {\n const classNames = clsx(className, \"combobox-container\");\n const triggerRef = useRef<HTMLButtonElement | null>(null);\n useKeepFocusOnInput(triggerRef);\n // Sem container explícito o dropdown faz portal no document.body — fora da\n // shadow root do MFE, sem CSS. Ver ui/hooks/useOverlayPortal.\n const portalContainer = useOverlayPortalContainer();\n return (\n <ComboBox className={classNames} {...props}>\n <Field>\n {label && <Label>{label}</Label>}\n <RACGroup className=\"combobox\">\n <Input\n className=\"combobox-input\"\n placeholder={placeholder}\n onPointerDown={openMenuWhenFocusedInputIsPressed(triggerRef)}\n />\n <RACButton ref={triggerRef} className=\"combobox-trigger\">\n <IconChevronDown aria-hidden=\"true\" />\n </RACButton>\n </RACGroup>\n <RACPopover\n className=\"combobox-popover\"\n UNSTABLE_portalContainer={portalContainer}\n >\n <ListBox items={items}>{children}</ListBox>\n </RACPopover>\n {description && <Description>{description}</Description>}\n <FieldError>{errorMessage}</FieldError>\n </Field>\n </ComboBox>\n );\n}\n\nexport type ComboBoxProps<T extends object> = RACComboBoxProps<T>;\nexport function ComboBox<T extends object>({ ...props }: ComboBoxProps<T>) {\n return <RACComboBox<T> menuTrigger=\"focus\" {...props} />;\n}\n\nexport type ComboBoxItemProps = ListBoxItemProps;\nexport function ComboBoxItem({ children, className, ...props }: ComboBoxItemProps) {\n const classNames = clsx(className, \"combobox-item\");\n const textValue = typeof children === \"string\" ? children : \"\";\n return (\n <ListBoxItem textValue={textValue} className={classNames} {...props}>\n <>\n <IconCheck className=\"combobox-item-check\" />\n {children}\n </>\n </ListBoxItem>\n );\n}\n"],"names":["ComboBoxField","className","label","description","errorMessage","placeholder","children","items","props","classNames","clsx","triggerRef","useRef","useKeepFocusOnInput","portalContainer","useOverlayPortalContainer","ComboBox","Field","jsx","Label","jsxs","RACGroup","Input","openMenuWhenFocusedInputIsPressed","RACButton","IconChevronDown","RACPopover","ListBox","Description","FieldError","RACComboBox","ComboBoxItem","ListBoxItem","Fragment","IconCheck"],"mappings":";;;;;;;;;;;;AAmCO,SAASA,EAAgC;AAAA,EAC9C,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,GAAGC;AACL,GAA0B;AACxB,QAAMC,IAAaC,EAAKT,GAAW,oBAAoB,GACjDU,IAAaC,EAAiC,IAAI;AACxD,EAAAC,EAAoBF,CAAU;AAG9B,QAAMG,IAAkBC,EAAA;AACxB,2BACGC,GAAA,EAAS,WAAWP,GAAa,GAAGD,GACnC,4BAACS,GAAA,EACE,UAAA;AAAA,IAAAf,KAAS,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|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),A=require("../../../vendor/clsx/dist/clsx.cjs"),f=require("react"),d=require("react-aria-components"),K=require("./comboBoxFocus.cjs");;/* empty css */const U=require("../Tag/Tag.cjs"),V=require("../../icons/IconChevronDown.cjs"),W=require("../../hooks/useOverlayPortal.cjs"),j=require("../Fieldset/Fieldset.cjs"),G=require("../ListBox/ListBox.cjs"),H=require("../Input/Input.cjs");function _(e,n){return e.length===n.length&&e.every((c,u)=>c===n[u])}function k(e,n){return e.localeCompare(n,void 0,{sensitivity:"base"})===0}function z(e,n){if(e){for(const c of e.collection)if(c.type==="item"&&k(c.textValue,n))return c.key}}function J(e){const n=new Map;return e==null||e.selectedItems.forEach(c=>n.set(c.key,c.textValue)),n}function Q({keys:e,inputValue:n,placeholder:c,canRemove:u,removeValueLabel:y,onRemoveKey:g,onSubmitText:B}){const s=f.useContext(d.ComboBoxStateContext),x=f.useRef(null),a=f.useRef(null);K.useKeepFocusOnInput(x);const C=J(s),m=o=>C.get(o)||String(o);function p(o){var i;g(o),(i=a.current)==null||i.focus()}function I(o){const i=e[e.length-1],b=u&&n===""&&i!==void 0;if(o.key==="Backspace"&&b){g(i);return}const q=(s==null?void 0:s.selectionManager.focusedKey)!=null;if(o.key!=="Enter"||q)return;const h=n.trim();h!==""&&(o.preventDefault(),B(h,z(s,h)))}return r.jsxs(d.Group,{className:"combobox combobox-multiple",children:[e.length>0&&r.jsx("span",{className:"combobox-tags",role:"list",onMouseDown:K.keepFocusOnInput,children:r.jsx(d.ButtonContext.Provider,{value:null,children:e.map(o=>r.jsx(U.Tag,{role:"listitem",scheme:"neutral",variant:"secondary",removeLabel:u?y(m(o)):void 0,onRemove:u?()=>p(o):void 0,children:m(o)},`${typeof o}:${o}`))})}),r.jsx(H.Input,{ref:a,className:"combobox-input",placeholder:e.length===0?c:void 0,onKeyDown:I,onPointerDown:K.openMenuWhenFocusedInputIsPressed(x)}),r.jsx(d.Button,{ref:x,className:"combobox-trigger",children:r.jsx(V.IconChevronDown,{"aria-hidden":"true"})})]})}function X({className:e,label:n,description:c,errorMessage:u,placeholder:y,children:g,items:B,value:s,defaultValue:x,onChange:a,removeValueLabel:C,allowsCustomValue:m,validateCustomValue:p,invalidCustomValueMessage:I,isInvalid:o,isDisabled:i,isReadOnly:b,...q}){const h=A.clsx(e,"combobox-container"),[P,R]=f.useState(x??[]),l=s??P,[F,w]=f.useState(""),[M,N]=f.useState(!1),L=W.useOverlayPortalContainer();function S(t){_(t,l)||(s===void 0&&R(t),a==null||a(t))}function T(t){w(t),N(!1)}function O(t){t.length>l.length&&T(""),S(t)}function E(t){return m===!0&&((p==null?void 0:p(t))??!0)}function $(t,v){if(v===void 0&&!E(t)){N(m===!0);return}const D=v??t;T(""),l.includes(D)||S([...l,D])}return r.jsx(d.ComboBox,{...q,className:h,selectionMode:"multiple",menuTrigger:"focus",value:l,onChange:O,inputValue:F,onInputChange:T,isInvalid:o||M,isDisabled:i,isReadOnly:b,children:r.jsxs(j.Field,{children:[n&&r.jsx(j.Label,{children:n}),r.jsx(Q,{keys:l,inputValue:F,placeholder:y,canRemove:!i&&!b,removeValueLabel:C,onRemoveKey:t=>S(l.filter(v=>v!==t)),onSubmitText:$}),r.jsx(d.Popover,{className:"combobox-popover",UNSTABLE_portalContainer:L,children:r.jsx(G.ListBox,{items:B,children:g})}),c&&r.jsx(j.Description,{children:c}),r.jsx(j.FieldError,{children:M?I:u})]})})}exports.MultiComboBoxField=X;
|
|
2
|
+
//# sourceMappingURL=MultiComboBox.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MultiComboBox.cjs","sources":["../../../../../src/ui/primitives/ComboBox/MultiComboBox.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { useOverlayPortalContainer } from \"hooks\";\nimport { IconChevronDown } from \"icons\";\nimport {\n Description,\n Field,\n FieldError,\n Input,\n Label,\n ListBox,\n SharedFieldProps,\n Tag,\n} from \"primitives\";\nimport React, { useContext, useRef, useState } from \"react\";\nimport {\n Button as RACButton,\n ButtonContext as RACButtonContext,\n ComboBox as RACComboBox,\n ComboBoxStateContext as RACComboBoxStateContext,\n Group as RACGroup,\n Popover as RACPopover,\n type ComboBoxProps as RACComboBoxProps,\n type Key as RACKey,\n} from \"react-aria-components\";\nimport {\n keepFocusOnInput,\n openMenuWhenFocusedInputIsPressed,\n useKeepFocusOnInput,\n} from \"./comboBoxFocus\";\nimport \"./combobox.css\";\n\ntype MultiComboBoxState = NonNullable<\n React.ContextType<typeof RACComboBoxStateContext>\n>;\n\ntype PropsManagedByMultiComboBox =\n | \"children\"\n | \"selectionMode\"\n | \"value\"\n | \"defaultValue\"\n | \"onChange\"\n | \"selectedKey\"\n | \"defaultSelectedKey\"\n | \"onSelectionChange\"\n | \"allowsCustomValue\"\n | \"inputValue\"\n | \"defaultInputValue\"\n | \"onInputChange\"\n | \"menuTrigger\";\n\ninterface CustomValueValidationProps {\n validateCustomValue: (text: string) => boolean;\n invalidCustomValueMessage: string;\n}\n\ninterface WithoutCustomValueValidation {\n validateCustomValue?: never;\n invalidCustomValueMessage?: never;\n}\n\ntype CustomValueProps =\n | ({ allowsCustomValue: true } & (\n | CustomValueValidationProps\n | WithoutCustomValueValidation\n ))\n | ({ allowsCustomValue?: false } & WithoutCustomValueValidation);\n\nexport type MultiComboBoxFieldProps<T extends object> = Omit<\n RACComboBoxProps<T, \"multiple\">,\n PropsManagedByMultiComboBox\n> &\n SharedFieldProps &\n CustomValueProps & {\n items?: Iterable<T>;\n children: React.ReactNode | ((item: T) => React.ReactNode);\n value?: RACKey[];\n defaultValue?: RACKey[];\n onChange?: (keys: RACKey[]) => void;\n removeValueLabel: (valueText: string) => string;\n };\n\nfunction hasSameKeys(a: readonly RACKey[], b: readonly RACKey[]): boolean {\n return a.length === b.length && a.every((key, index) => key === b[index]);\n}\n\nfunction isSameText(a: string, b: string): boolean {\n return a.localeCompare(b, undefined, { sensitivity: \"base\" }) === 0;\n}\n\nfunction itemKeyWithText(\n state: MultiComboBoxState | null,\n text: string,\n): RACKey | undefined {\n if (!state) return undefined;\n for (const node of state.collection) {\n if (node.type === \"item\" && isSameText(node.textValue, text))\n return node.key;\n }\n return undefined;\n}\n\nfunction selectedTextByKey(\n state: MultiComboBoxState | null,\n): Map<RACKey, string> {\n const texts = new Map<RACKey, string>();\n state?.selectedItems.forEach((item) => texts.set(item.key, item.textValue));\n return texts;\n}\n\ninterface MultiComboBoxControlProps {\n keys: RACKey[];\n inputValue: string;\n placeholder?: string;\n canRemove: boolean;\n removeValueLabel: (valueText: string) => string;\n onRemoveKey: (key: RACKey) => void;\n onSubmitText: (text: string, matchingItemKey: RACKey | undefined) => void;\n}\n\nfunction MultiComboBoxControl({\n keys,\n inputValue,\n placeholder,\n canRemove,\n removeValueLabel,\n onRemoveKey,\n onSubmitText,\n}: MultiComboBoxControlProps) {\n const state = useContext(RACComboBoxStateContext);\n const triggerRef = useRef<HTMLButtonElement | null>(null);\n const inputRef = useRef<HTMLInputElement | null>(null);\n useKeepFocusOnInput(triggerRef);\n const textByKey = selectedTextByKey(state);\n const textOf = (key: RACKey) => textByKey.get(key) || String(key);\n\n function removeKey(key: RACKey) {\n onRemoveKey(key);\n inputRef.current?.focus();\n }\n\n function handleKeyDown(event: React.KeyboardEvent<HTMLInputElement>) {\n const lastKey: RACKey | undefined = keys[keys.length - 1];\n const canRemoveLastKey =\n canRemove && inputValue === \"\" && lastKey !== undefined;\n if (event.key === \"Backspace\" && canRemoveLastKey) {\n onRemoveKey(lastKey);\n return;\n }\n const isChoosingHighlightedItem =\n state?.selectionManager.focusedKey != null;\n if (event.key !== \"Enter\" || isChoosingHighlightedItem) return;\n const text = inputValue.trim();\n if (text === \"\") return;\n event.preventDefault();\n onSubmitText(text, itemKeyWithText(state, text));\n }\n\n return (\n <RACGroup className=\"combobox combobox-multiple\">\n {keys.length > 0 && (\n <span\n className=\"combobox-tags\"\n role=\"list\"\n onMouseDown={keepFocusOnInput}\n >\n <RACButtonContext.Provider value={null}>\n {keys.map((key) => (\n <Tag\n key={`${typeof key}:${key}`}\n role=\"listitem\"\n scheme=\"neutral\"\n variant=\"secondary\"\n removeLabel={\n canRemove ? removeValueLabel(textOf(key)) : undefined\n }\n onRemove={canRemove ? () => removeKey(key) : undefined}\n >\n {textOf(key)}\n </Tag>\n ))}\n </RACButtonContext.Provider>\n </span>\n )}\n <Input\n ref={inputRef}\n className=\"combobox-input\"\n placeholder={keys.length === 0 ? placeholder : undefined}\n onKeyDown={handleKeyDown}\n onPointerDown={openMenuWhenFocusedInputIsPressed(triggerRef)}\n />\n <RACButton ref={triggerRef} className=\"combobox-trigger\">\n <IconChevronDown aria-hidden=\"true\" />\n </RACButton>\n </RACGroup>\n );\n}\n\nexport function MultiComboBoxField<T extends object>({\n className,\n label,\n description,\n errorMessage,\n placeholder,\n children,\n items,\n value,\n defaultValue,\n onChange,\n removeValueLabel,\n allowsCustomValue,\n validateCustomValue,\n invalidCustomValueMessage,\n isInvalid,\n isDisabled,\n isReadOnly,\n ...props\n}: MultiComboBoxFieldProps<T>) {\n const classNames = clsx(className, \"combobox-container\");\n const [uncontrolledKeys, setUncontrolledKeys] = useState<RACKey[]>(\n defaultValue ?? [],\n );\n const keys = value ?? uncontrolledKeys;\n const [inputValue, setInputValue] = useState(\"\");\n const [isCustomValueRejected, setCustomValueRejected] = useState(false);\n // Sem container explícito o dropdown faz portal no document.body — fora da\n // shadow root do MFE, sem CSS. Ver ui/hooks/useOverlayPortal.\n const portalContainer = useOverlayPortalContainer();\n\n function changeKeys(nextKeys: RACKey[]) {\n if (hasSameKeys(nextKeys, keys)) return;\n if (value === undefined) setUncontrolledKeys(nextKeys);\n onChange?.(nextKeys);\n }\n\n function changeInput(text: string) {\n setInputValue(text);\n setCustomValueRejected(false);\n }\n\n function changeSelection(nextKeys: RACKey[]) {\n if (nextKeys.length > keys.length) changeInput(\"\");\n changeKeys(nextKeys);\n }\n\n function isAcceptedCustomValue(text: string): boolean {\n return allowsCustomValue === true && (validateCustomValue?.(text) ?? true);\n }\n\n function addTypedValue(text: string, matchingItemKey: RACKey | undefined) {\n if (matchingItemKey === undefined && !isAcceptedCustomValue(text)) {\n setCustomValueRejected(allowsCustomValue === true);\n return;\n }\n const key = matchingItemKey ?? text;\n changeInput(\"\");\n if (!keys.includes(key)) changeKeys([...keys, key]);\n }\n\n return (\n <RACComboBox<T, \"multiple\">\n {...props}\n className={classNames}\n selectionMode=\"multiple\"\n menuTrigger=\"focus\"\n value={keys}\n onChange={changeSelection}\n inputValue={inputValue}\n onInputChange={changeInput}\n isInvalid={isInvalid || isCustomValueRejected}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n >\n <Field>\n {label && <Label>{label}</Label>}\n <MultiComboBoxControl\n keys={keys}\n inputValue={inputValue}\n placeholder={placeholder}\n canRemove={!isDisabled && !isReadOnly}\n removeValueLabel={removeValueLabel}\n onRemoveKey={(key) => changeKeys(keys.filter((k) => k !== key))}\n onSubmitText={addTypedValue}\n />\n <RACPopover\n className=\"combobox-popover\"\n UNSTABLE_portalContainer={portalContainer}\n >\n <ListBox items={items}>{children}</ListBox>\n </RACPopover>\n {description && <Description>{description}</Description>}\n <FieldError>\n {isCustomValueRejected ? invalidCustomValueMessage : errorMessage}\n </FieldError>\n </Field>\n </RACComboBox>\n );\n}\n"],"names":["hasSameKeys","a","b","key","index","isSameText","itemKeyWithText","state","text","node","selectedTextByKey","texts","item","MultiComboBoxControl","keys","inputValue","placeholder","canRemove","removeValueLabel","onRemoveKey","onSubmitText","useContext","RACComboBoxStateContext","triggerRef","useRef","inputRef","useKeepFocusOnInput","textByKey","textOf","removeKey","_a","handleKeyDown","event","lastKey","canRemoveLastKey","isChoosingHighlightedItem","jsxs","RACGroup","jsx","keepFocusOnInput","RACButtonContext","Tag","Input","openMenuWhenFocusedInputIsPressed","RACButton","IconChevronDown","MultiComboBoxField","className","label","description","errorMessage","children","items","value","defaultValue","onChange","allowsCustomValue","validateCustomValue","invalidCustomValueMessage","isInvalid","isDisabled","isReadOnly","props","classNames","clsx","uncontrolledKeys","setUncontrolledKeys","useState","setInputValue","isCustomValueRejected","setCustomValueRejected","portalContainer","useOverlayPortalContainer","changeKeys","nextKeys","changeInput","changeSelection","isAcceptedCustomValue","addTypedValue","matchingItemKey","RACComboBox","Field","Label","k","RACPopover","ListBox","Description","FieldError"],"mappings":"igBAiFA,SAASA,EAAYC,EAAsBC,EAA+B,CACxE,OAAOD,EAAE,SAAWC,EAAE,QAAUD,EAAE,MAAM,CAACE,EAAKC,IAAUD,IAAQD,EAAEE,CAAK,CAAC,CAC1E,CAEA,SAASC,EAAWJ,EAAWC,EAAoB,CACjD,OAAOD,EAAE,cAAcC,EAAG,OAAW,CAAE,YAAa,MAAA,CAAQ,IAAM,CACpE,CAEA,SAASI,EACPC,EACAC,EACoB,CACpB,GAAKD,GACL,UAAWE,KAAQF,EAAM,WACvB,GAAIE,EAAK,OAAS,QAAUJ,EAAWI,EAAK,UAAWD,CAAI,EACzD,OAAOC,EAAK,IAGlB,CAEA,SAASC,EACPH,EACqB,CACrB,MAAMI,MAAY,IAClB,OAAAJ,GAAA,MAAAA,EAAO,cAAc,QAASK,GAASD,EAAM,IAAIC,EAAK,IAAKA,EAAK,SAAS,GAClED,CACT,CAYA,SAASE,EAAqB,CAC5B,KAAAC,EACA,WAAAC,EACA,YAAAC,EACA,UAAAC,EACA,iBAAAC,EACA,YAAAC,EACA,aAAAC,CACF,EAA8B,CAC5B,MAAMb,EAAQc,EAAAA,WAAWC,sBAAuB,EAC1CC,EAAaC,EAAAA,OAAiC,IAAI,EAClDC,EAAWD,EAAAA,OAAgC,IAAI,EACrDE,EAAAA,oBAAoBH,CAAU,EAC9B,MAAMI,EAAYjB,EAAkBH,CAAK,EACnCqB,EAAUzB,GAAgBwB,EAAU,IAAIxB,CAAG,GAAK,OAAOA,CAAG,EAEhE,SAAS0B,EAAU1B,EAAa,OAC9BgB,EAAYhB,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