@apipass/design-system 8.3.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/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/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,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),y=require("react");;/* empty css */const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),y=require("react");;/* empty css */const i=require("../../primitives/Dialog/Dialog.cjs"),C=require("../../primitives/Input/Input.cjs"),x=require("../../layout/Flex/Flex.cjs"),l=require("../../primitives/Button/Button.cjs");function P(t){return t.isOpen?e.jsx(v,{...t}):null}function v({title:t,message:u,confirmValue:o,confirmValueLabel:j,confirmLabel:c="Confirm",cancelLabel:m="Cancel",isDanger:p=!1,isLoading:r=!1,onConfirm:h,onClose:d}){const[g,D]=y.useState(""),s=o?g===o:!0;function a(){!s||r||h()}function f(){r||d()}return e.jsx(i.DialogModal,{isOpen:!0,onOpenChange:n=>!n&&f(),children:e.jsxs(i.Dialog,{children:[e.jsxs(x.Flex,{direction:"row",alignPrimary:"space-between",alignSecondary:"center",children:[e.jsx(i.DialogTitle,{children:t}),e.jsx(i.DialogClose,{onPress:f})]}),e.jsxs(i.DialogBody,{children:[u&&e.jsx("p",{className:"confirm-dialog-message",dangerouslySetInnerHTML:{__html:u}}),o&&e.jsx(C.InputField,{label:j,value:g,onChange:D,autoFocus:!0,onKeyDown:n=>{n.continuePropagation(),n.key==="Enter"&&!n.repeat&&!n.nativeEvent.isComposing&&a()},isRequired:!0,validationBehavior:"aria"})]}),e.jsxs(x.Flex,{direction:"row",gap:"200",alignPrimary:"end",className:"confirm-dialog-footer",children:[e.jsx(l.Button,{variant:"neutral",onPress:d,isDisabled:r,children:m}),p?e.jsx(l.ButtonDanger,{variant:"danger-primary",onPress:a,isDisabled:!s,isPending:r,children:c}):e.jsx(l.Button,{variant:"primary",onPress:a,isDisabled:!s,isPending:r,children:c})]})]})})}exports.ConfirmDialog=P;
|
|
2
2
|
//# sourceMappingURL=ConfirmDialog.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),D=require("../../../vendor/clsx/dist/clsx.cjs"),b=require("react");;/* empty css */const we=require("../../primitives/Search/Search.cjs"),i=require("../../primitives/Table/Table.cjs"),me=require("../../icons/IconChevronDown.cjs"),ye=require("../../icons/IconChevronRight.cjs"),Se=require("../../primitives/Pagination/Pagination.cjs"),ve=require("../../primitives/PermissionGate/PermissionGate.cjs"),Q=require("../../hooks/useLoadingVisibility.cjs"),Ne=require("../../layout/Flex/Flex.cjs"),Ce=require("../../primitives/BrandLoader/BrandLoader.cjs"),Te=require("../../primitives/IconButton/IconButton.cjs"),Pe=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});function qe(t,n){return t==null||n==null?t==null?n==null?0:1:-1:t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():typeof t=="number"&&typeof n=="number"?t-n:Pe.compare(String(t),String(n))}function Re(t,n,d){const o=n.sortValue??(x=>x[n.key]),h=d==="descending"?-1:1;return[...t].sort((x,g)=>qe(o(x),o(g))*h)}function Me({action:t,item:n}){const d=t.isPending===!0,o=t.isAllowed!==!1&&!d,h=a.jsx(Te.IconButton,{variant:"text",size:"small","aria-label":t.label,isDisabled:!o&&!d,isPending:d,onPress:o?()=>t.onPress(n):void 0,children:t.icon});return o?h:a.jsx(ve.PermissionGate,{isAllowed:!1,noAccessLabel:t.noAccessLabel??"",isPending:d,pendingLabel:t.pendingLabel??"",children:h})}function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),D=require("../../../vendor/clsx/dist/clsx.cjs"),b=require("react");;/* empty css */const we=require("../../primitives/Search/Search.cjs"),i=require("../../primitives/Table/Table.cjs"),me=require("../../icons/IconChevronDown.cjs"),ye=require("../../icons/IconChevronRight.cjs"),Se=require("../../primitives/Pagination/Pagination.cjs"),ve=require("../../primitives/PermissionGate/PermissionGate.cjs"),Q=require("../../hooks/useLoadingVisibility.cjs"),Ne=require("../../layout/Flex/Flex.cjs"),Ce=require("../../primitives/BrandLoader/BrandLoader.cjs"),Te=require("../../primitives/IconButton/IconButton.cjs"),Pe=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});function qe(t,n){return t==null||n==null?t==null?n==null?0:1:-1:t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():typeof t=="number"&&typeof n=="number"?t-n:Pe.compare(String(t),String(n))}function Re(t,n,d){const o=n.sortValue??(x=>x[n.key]),h=d==="descending"?-1:1;return[...t].sort((x,g)=>qe(o(x),o(g))*h)}function Me({action:t,item:n}){const d=t.isPending===!0,o=t.isAllowed!==!1&&!d,h=a.jsx(Te.IconButton,{variant:"text",size:"small","aria-label":t.label,isDisabled:!o&&!d,isPending:d,onPress:o?()=>t.onPress(n):void 0,children:t.icon});return o?h:a.jsx(ve.PermissionGate,{isAllowed:!1,noAccessLabel:t.noAccessLabel??"",isPending:d,pendingLabel:t.pendingLabel??"",children:h})}function U({columns:t,data:n,actions:d,rowActions:o,rowActionsLabel:h="",selectable:x=!1,selectionType:g="checkbox",selectedKeys:J,onSelectionChange:W,defaultSortDescriptor:X,sortDescriptor:Y,onSortChange:y,ariaLabel:Z,dense:_,striped:A,maxHeight:I,searchPlaceholder:K="Search...",searchKeys:S=[],isLoading:v=!1,isRefreshing:V=!1,loadingMessage:N,emptyMessage:ee="No records found",previousLabel:ae="Previous",nextLabel:te="Next",pageSize:f=10,nestedColumns:B,getNestedData:E,nestedLoadingMessage:se,nestedEmptyMessage:ne="No records found",nestedSearchKeys:le,nestedSearchPlaceholder:re,nestedActions:C,nestedPageSize:ie}){const T=Q.useLoadingVisibility(v),F=Q.useLoadingVisibility(V&&!v),[P,oe]=b.useState(""),[de,q]=b.useState(1),[ce,ue]=b.useState(X),u=Y??ce,[H,be]=b.useState(new Set),[$,p]=b.useState(new Map),R=!!E&&!!B,M=!!o;function z(e,s){be(r=>{const c=new Set(r);return s?c.add(e):c.delete(e),c})}function he(e){const s=e.id,r=!H.has(s);if(z(s,r),!r||$.has(s))return;const c=E(e);c instanceof Promise?(p(l=>new Map(l).set(s,{status:"loading",data:[]})),c.then(l=>{p(m=>new Map(m).set(s,{status:"loaded",data:l}))},()=>{p(l=>{const m=new Map(l);return m.delete(s),m}),z(s,!1)})):p(l=>new Map(l).set(s,{status:"loaded",data:c}))}const j=S.length>0,xe=t.some(e=>e.isRowHeader),ge=j||!!d,w=b.useMemo(()=>{if(!P.trim()||!j)return n;const e=P.toLowerCase();return n.filter(s=>S.some(r=>String(s[r]??"").toLowerCase().includes(e)))},[n,P,S,j]),L=t.find(e=>e.sortable&&String(e.key)===String(u==null?void 0:u.column)),G=b.useMemo(()=>L&&u?Re(w,L,u.direction):w,[w,L,u]);function fe(e){ue(e),q(1),y==null||y(e)}const O=Math.max(1,Math.ceil(G.length/f)),k=Math.min(de,O),pe=G.slice((k-1)*f,k*f);function je(e,s){return s.render?s.render(e):String(e[s.key]??"")}return a.jsxs(Ne.Flex,{direction:"column",gap:"300",className:D.clsx("data-table",I!==void 0&&"data-table--fill"),children:[ge&&a.jsxs("div",{className:"data-table-toolbar",children:[j&&a.jsx(we.Search,{placeholder:K,onSearch:e=>{oe(e),q(1)},className:"data-table-search"}),d&&a.jsx("div",{className:"data-table-actions",children:d})]}),v||T?a.jsx("div",{role:"status","aria-live":"polite","aria-label":N,className:D.clsx("data-table-status",T?"data-table-loading":"data-table-loading-delay"),children:T&&a.jsxs(a.Fragment,{children:[a.jsx(Ce.BrandLoader,{"aria-hidden":!0,variant:"trace",size:"32",tone:"brand"}),a.jsx("span",{children:N})]})}):a.jsxs("div",{className:D.clsx("data-table-body",F&&"data-table-body--refreshing"),"aria-busy":V||void 0,children:[F&&a.jsx("div",{role:"progressbar","aria-label":N,className:"data-table-refresh-indicator"}),w.length===0?a.jsx("div",{role:"status",className:"data-table-status data-table-empty",children:ee}):a.jsxs(i.Table,{"aria-label":Z,dense:_,striped:A,maxHeight:I,selectionMode:x?g==="radio"?"single":"multiple":"none",selectionType:g,selectedKeys:J,onSelectionChange:W,sortDescriptor:u,onSortChange:fe,children:[a.jsxs(i.TableHead,{children:[R&&a.jsx(i.TableColumn,{className:"data-table-expand-col"}),t.map((e,s)=>a.jsx(i.TableColumn,{id:String(e.key),align:e.align,allowsSorting:e.sortable,isRowHeader:xe?e.isRowHeader:s===0,children:e.label},String(e.key))),M&&a.jsx(i.TableColumn,{align:"right",className:"data-table-row-actions-col",children:h})]}),a.jsx(i.TableBody,{children:pe.flatMap(e=>{const s=H.has(e.id),r=$.get(e.id),c=[a.jsxs(i.TableRow,{id:e.id,children:[R&&a.jsx(i.TableCell,{className:"data-table-expand-cell",children:a.jsx("button",{type:"button",className:"data-table-expand-btn","aria-label":s?"Collapse row":"Expand row","aria-expanded":s,onClick:()=>he(e),children:s?a.jsx(me.IconChevronDown,{size:"16"}):a.jsx(ye.IconChevronRight,{size:"16"})})}),t.map(l=>a.jsx(i.TableCell,{align:l.align,children:je(e,l)},String(l.key))),M&&a.jsx(i.TableCell,{align:"right",className:"data-table-row-actions-cell",children:a.jsx("div",{className:"data-table-row-actions",children:(typeof o=="function"?o(e):o).map(l=>a.jsx(Me,{action:l,item:e},l.key))})})]},e.id)];return s&&c.push(a.jsx(i.TableRow,{id:`${e.id}-nested`,className:"data-table-nested-row",children:a.jsx(i.TableCell,{colSpan:t.length+(R?1:0)+(x?1:0)+(M?1:0),className:"data-table-nested-cell",children:a.jsx(U,{columns:B,data:(r==null?void 0:r.data)??[],isLoading:!r||r.status==="loading",loadingMessage:se??"",emptyMessage:ne,searchKeys:le,searchPlaceholder:re,actions:C==null?void 0:C(e),pageSize:ie??f})})},`${e.id}-nested`)),c})})]})]}),a.jsx(Se.Pagination,{page:k,totalPages:O,onPageChange:q,previousLabel:ae,nextLabel:te})]})}exports.DataTable=U;
|
|
2
2
|
//# sourceMappingURL=DataTable.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),b=require("../../../vendor/clsx/dist/clsx.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),b=require("../../../vendor/clsx/dist/clsx.cjs"),i=require("react");;/* empty css */const y=require("../../primitives/Tooltip/Tooltip.cjs"),z=require("../../icons/IconInfo.cjs"),T=require("../../icons/IconChevronDown.cjs"),u=require("../../primitives/IconButton/IconButton.cjs"),B=i.forwardRef(function({title:g,description:o,descriptionButtonLabel:x,headerActions:n,isCollapsible:s,collapseButtonLabel:m,expandButtonLabel:h,collapsed:a,defaultCollapsed:j,onCollapsedChange:r,children:w,className:f,...v},I){const d=i.useId(),c=a!==void 0,[p,N]=i.useState(j??!1),t=s===!0&&(c?a===!0:p);function q(){const l=!t;c||N(l),r==null||r(l)}return e.jsxs("div",{ref:I,className:b.clsx("widget",f),...v,"data-collapsed":t||void 0,children:[e.jsxs("div",{className:"widget-header widget-drag-handle",children:[e.jsxs("span",{className:"widget-header-title-group",children:[e.jsx("span",{className:"widget-header-title",children:g}),o&&e.jsx(y.Tooltip,{content:o,placement:"bottom",offset:4,children:e.jsx(u.IconButton,{"aria-label":x,variant:"subtle",size:"small",className:"widget-header-description-trigger",children:e.jsx(z.IconInfo,{size:"14"})})})]}),(n||s)&&e.jsxs("div",{className:"widget-header-actions",children:[n,s&&e.jsx(u.IconButton,{"aria-label":t?h:m,"aria-expanded":!t,"aria-controls":d,variant:"subtle",size:"small",className:"widget-header-collapse-trigger",onPress:q,children:e.jsx(T.IconChevronDown,{size:"16",className:"widget-header-collapse-indicator"})})]})]}),e.jsx("div",{id:d,className:"widget-body",hidden:t,children:w})]})});exports.Widget=B;
|
|
2
2
|
//# sourceMappingURL=Widget.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),y=require("../../../vendor/clsx/dist/clsx.cjs"),A=require("react"),c=require("../../../_virtual/index.cjs");;/* empty css */;/* empty css */;/* empty css */const G=c.WidthProvider(c),_=".widget-drag-handle",w=".widget-header-actions";function S({layout:o,onLayoutChange:r,cols:u=12,rowHeight:E=80,isEditable:g=!1,isDraggable:m,isResizable:b,className:q,style:D,children:i}){const R=o.map(({id:e,x:a,y:t,w:s,h:d})=>({i:e,x:a,y:t,w:s,h:d})),n=m??g;function T(e){r==null||r(e.map(({i:a,x:t,y:s,w:d,h:x})=>({id:a,x:t,y:s,w:d,h:x})))}return l.jsx(G,{className:y.clsx("widget-grid",n&&"widget-grid-draggable",q),style:D,layout:R,cols:u,rowHeight:E,isDraggable:n,isResizable:b??g,draggableHandle:_,draggableCancel:w,onLayoutChange:T,children:(Array.isArray(i)?i:[i]).map(e=>A.isValidElement(e)?l.jsx("div",{className:"widget-grid-item",children:e},e.key):e)})}exports.WidgetGrid=S;
|
|
2
2
|
//# sourceMappingURL=WidgetGrid.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),L=require("../../../../vendor/clsx/dist/clsx.cjs"),C=require("react"),_=require("../useChartInstance.cjs"),m=require("../ChartLegend/ChartLegend.cjs"),p=require("../ChartLegend/use-chart-legend.cjs"),y=require("./bar-chart-option.cjs");;/* empty css */const M={};function E({categories:n,series:r,orientation:o="vertical",stacking:i="off",valueLabel:c="auto",legend:g="inline",valueAxis:a=M,valueFormatter:l,onSeriesColorChange:f,legendLabels:S,className:b,...q}){const{containerRef:I,chart:s,theme:e,resolveSeriesColor:O}=_.useChartInstance(),{items:T,colorsBySeriesId:u,colorTokensBySeriesId:j,hiddenSeriesIds:d,toggleSeries:v}=p.useChartLegend(r,(e==null?void 0:e.seriesColors)??[],O),h=C.useMemo(()=>r.filter(B=>!d.has(B.id)),[r,d]);C.useEffect(()=>{!s||!e||s.setOption(y.buildBarChartOption({categories:n,series:h,orientation:o,stacking:i,valueLabel:c,valueAxis:a,theme:e,seriesColorOverrides:u,valueFormatter:l}),{notMerge:!0})},[s,e,n,h,o,i,c,a,u,l]);const x=g!=="none"&&r.length>0;return t.jsxs("div",{className:L.clsx("bar-chart",b),...q,children:[x&&t.jsx(m.ChartLegend,{items:T,onToggle:v,onColorChange:f,colorTokensBySeriesId:j,labels:S}),t.jsx("div",{ref:I,className:"bar-chart__canvas"})]})}exports.BarChart=E;
|
|
2
2
|
//# sourceMappingURL=BarChart.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),S=require("react"),l=require("react-aria-components"),C=require("../chart-palette.cjs");;/* empty css */const _=require("../../../hooks/useOverlayPortal.cjs"),m={palette:"Color palette",colorOption:e=>`Color ${e}`,automaticColor:"Automatic color"};function d(e){try{return l.parseColor(e).toString("hex")}catch{return e}}function E(e,c){const o=c.toString("hex"),n=e.findIndex(r=>d(r)===o);return n<0?void 0:C.CHART_SERIES_COLOR_TOKENS[n]}function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),S=require("react"),l=require("react-aria-components"),C=require("../chart-palette.cjs");;/* empty css */const _=require("../../../hooks/useOverlayPortal.cjs"),m={palette:"Color palette",colorOption:e=>`Color ${e}`,automaticColor:"Automatic color"};function d(e){try{return l.parseColor(e).toString("hex")}catch{return e}}function E(e,c){const o=c.toString("hex"),n=e.findIndex(r=>d(r)===o);return n<0?void 0:C.CHART_SERIES_COLOR_TOKENS[n]}function f(e){const c=window.getComputedStyle(e);return C.CHART_SERIES_COLOR_TOKENS.map(o=>c.getPropertyValue(o).trim())}const P=[];function R({colorToken:e,isResettable:c,labels:o,onChoose:n}){const[r,h]=S.useState(P),i=S.useRef(null);S.useLayoutEffect(()=>{const a=i.current;a&&r.length===0&&h(f(a))},[r]);const u=e?C.CHART_SERIES_COLOR_TOKENS.indexOf(e):-1,p=u<0?void 0:r[u];return t.jsxs("div",{ref:i,className:"chart-color-picker",children:[t.jsx(l.ColorSwatchPicker,{className:"chart-color-picker__colors","aria-label":o.palette,value:p,onChange:a=>{const s=E(r,a);s&&n(s)},children:r.map((a,s)=>t.jsx(l.ColorSwatchPickerItem,{color:a,className:"chart-color-picker__color",children:t.jsx(l.ColorSwatch,{"aria-label":o.colorOption(s+1)})},C.CHART_SERIES_COLOR_TOKENS[s]))}),c&&t.jsx(l.Button,{className:"chart-color-picker__reset",onPress:()=>n(null),children:o.automaticColor})]})}function x({colorToken:e,onChange:c,isResettable:o=!0,labels:n,triggerLabel:r,triggerClassName:h,triggerStyle:i,children:u}){const p=_.useOverlayPortalContainer(),a={...m,...n};return t.jsxs(l.DialogTrigger,{children:[t.jsx(l.Button,{className:h,style:i,"aria-label":r,children:u}),t.jsx(l.Popover,{className:"chart-color-picker-popover",placement:"bottom start",UNSTABLE_portalContainer:p,children:t.jsx(l.Dialog,{className:"chart-color-picker-dialog","aria-label":a.palette,children:({close:s})=>t.jsx(R,{colorToken:e,isResettable:o,labels:a,onChoose:O=>{s(),c(O)}})})})]})}exports.ChartColorPicker=x;
|
|
2
2
|
//# sourceMappingURL=ChartColorPicker.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),d=require("../chart-palette.cjs");function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),d=require("../chart-palette.cjs");function m(t,r,u){const[s,S]=c.useState(()=>new Set),l=c.useCallback(e=>{S(n=>{const o=new Set(n);return o.has(e)?o.delete(e):o.add(e),o})},[]),h=c.useMemo(()=>{const e={};return t.forEach((n,o)=>{e[n.id]=n.colorToken??d.CHART_SERIES_COLOR_TOKENS[o%d.CHART_SERIES_COLOR_TOKENS.length]}),e},[t]),i=c.useMemo(()=>{const e={};return t.forEach((n,o)=>{const T=n.colorToken?u(n.colorToken):void 0;e[n.id]=T??r[o%r.length]}),e},[t,r,u]);return{items:c.useMemo(()=>t.map(e=>({id:e.id,name:e.name,color:i[e.id],isHidden:s.has(e.id)})),[t,i,s]),colorsBySeriesId:i,colorTokensBySeriesId:h,hiddenSeriesIds:s,toggleSeries:l}}exports.useChartLegend=m;
|
|
2
2
|
//# sourceMappingURL=use-chart-legend.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),ee=require("../../../../vendor/clsx/dist/clsx.cjs"),i=require("react"),te=require("../ChartLegend/ChartLegend.cjs"),re=require("../ChartLegend/use-chart-legend.cjs"),ne=require("../chart-palette.cjs"),I=require("../chart-share.cjs"),ie=require("../useChartInstance.cjs"),se=require("./pie-chart-option.cjs"),h=require("./pie-chart-slices.cjs");;/* empty css */const ce={others:"Others",total:"Total",backToPrevious:e=>`Back from ${e}`},oe=200,ae=["percent"],le=[];function ue(e,s,a){if(!e||s.length===0)return;const l=s.includes("percent"),S=s.includes("value");return l&&S?`${a(e.value)} (${I.formatShare(e.share)})`:S?a(e.value):I.formatShare(e.share)}function de(e){const[s,a]=i.useState(0);return i.useLayoutEffect(()=>{if(!e)return;const l=new ResizeObserver(()=>a(Math.min(e.clientWidth,e.clientHeight)));return l.observe(e),()=>l.disconnect()},[e]),s}function he({data:e,shape:s="donut",labelContent:a=ae,showTotal:l="auto",total:S,valueFormatter:p,legend:q="inline",legendPosition:y="bottom",legendValues:M=le,onSeriesColorChange:A,onFocusChange:b,legendLabels:R,
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),ee=require("../../../../vendor/clsx/dist/clsx.cjs"),i=require("react"),te=require("../ChartLegend/ChartLegend.cjs"),re=require("../ChartLegend/use-chart-legend.cjs"),ne=require("../chart-palette.cjs"),I=require("../chart-share.cjs"),ie=require("../useChartInstance.cjs"),se=require("./pie-chart-option.cjs"),h=require("./pie-chart-slices.cjs");;/* empty css */const ce={others:"Others",total:"Total",backToPrevious:e=>`Back from ${e}`},oe=200,ae=["percent"],le=[];function ue(e,s,a){if(!e||s.length===0)return;const l=s.includes("percent"),S=s.includes("value");return l&&S?`${a(e.value)} (${I.formatShare(e.share)})`:S?a(e.value):I.formatShare(e.share)}function de(e){const[s,a]=i.useState(0);return i.useLayoutEffect(()=>{if(!e)return;const l=new ResizeObserver(()=>a(Math.min(e.clientWidth,e.clientHeight)));return l.observe(e),()=>l.disconnect()},[e]),s}function he({data:e,shape:s="donut",labelContent:a=ae,showTotal:l="auto",total:S,valueFormatter:p,legend:q="inline",legendPosition:y="bottom",legendValues:M=le,onSeriesColorChange:A,onFocusChange:b,legendLabels:$,labels:R,className:B,...U}){const{containerRef:D,chart:u,theme:c,resolveSeriesColor:H}=ie.useChartInstance(),o={...ce,...R},[f,V]=i.useState(null),[w,z]=i.useState(null),G=de(w),K=i.useMemo(()=>e.map(t=>({id:t.id,name:h.displayNameOf(t,o.others),colorToken:t.colorToken??(t.isOthers?ne.CHART_NEUTRAL_COLOR_TOKEN:void 0)})),[e,o.others]),{items:W,colorsBySeriesId:k,colorTokensBySeriesId:X,hiddenSeriesIds:L,toggleSeries:Z}=re.useChartLegend(K,(c==null?void 0:c.seriesColors)??[],H),d=i.useMemo(()=>h.buildPieSlices({nodes:e.filter(t=>!L.has(t.id)),colorsByRootId:k,fallbackColor:(c==null?void 0:c.neutralColor)??"#9ca3af",othersName:o.others}),[e,L,k,c,o.others]),r=i.useMemo(()=>f===null?void 0:h.findSlice(d,f),[d,f]),m=r?r.children:d,_=i.useCallback(t=>{V(t),b==null||b(t)},[b]);i.useEffect(()=>{f!==null&&!r&&_(null)},[f,r,_]),i.useEffect(()=>{!u||!c||u.setOption(se.buildPieChartOption({slices:m,shape:s,labelContent:a,theme:c,valueFormatter:p}),{notMerge:!0})},[u,c,m,s,a,p]),i.useEffect(()=>{if(!u)return;function t(T){var P;const x=(P=T.data)==null?void 0:P.id;if(typeof x!="string")return;const C=h.findSlice(m,x);C&&C.children.length>0&&_(C.id)}return u.on("click",t),()=>{u.off("click",t)}},[u,m,_]);function v(t){return p?p(t):String(t)}const J=W.map(t=>({...t,detail:ue(d.find(T=>T.id===t.id),M,v)})),g=l==="on"||l==="auto"&&G>=oe,N=r?r.value:S??h.totalOf(d),O=r?h.findParentSlice(d,r.id):void 0,Q=q!=="none"&&e.length>0,E=n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"pie-chart__total-value",children:v(N)}),n.jsx("span",{className:"pie-chart__total-caption",children:r?r.name:o.total})]});function j(){_(O?O.id:null)}function Y(){return r?n.jsx("button",{type:"button",className:"pie-chart__center pie-chart__center--button","aria-label":o.backToPrevious(r.name),onClick:j,children:g&&E}):g&&n.jsx("div",{className:"pie-chart__center",children:E})}function F(){return r?n.jsxs("button",{type:"button",className:"pie-chart__footer pie-chart__footer--button","aria-label":o.backToPrevious(r.name),onClick:j,children:[r.name,g&&`: ${v(N)}`]}):g&&n.jsx("div",{className:"pie-chart__footer",children:`${o.total}: ${v(N)}`})}return n.jsxs("div",{className:ee.clsx("pie-chart",`pie-chart--legend-${y}`,B),...U,children:[Q&&n.jsx(te.ChartLegend,{className:"pie-chart__legend",items:J,onToggle:Z,onColorChange:A,colorTokensBySeriesId:X,labels:$}),n.jsxs("div",{className:"pie-chart__body",children:[n.jsxs("div",{ref:z,className:"pie-chart__stage",children:[n.jsx("div",{ref:D,className:"pie-chart__canvas"}),s==="donut"&&Y()]}),s==="pie"&&F()]})]})}exports.PieChart=he;
|
|
2
2
|
//# sourceMappingURL=PieChart.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),j=require("../../../../vendor/clsx/dist/clsx.cjs"),h=require("react"),E=require("../useChartInstance.cjs"),L=require("../ChartLegend/ChartLegend.cjs"),b=require("../ChartLegend/use-chart-legend.cjs"),Y=require("./time-series-option.cjs");;/* empty css */const x={},
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),j=require("../../../../vendor/clsx/dist/clsx.cjs"),h=require("react"),E=require("../useChartInstance.cjs"),L=require("../ChartLegend/ChartLegend.cjs"),b=require("../ChartLegend/use-chart-legend.cjs"),Y=require("./time-series-option.cjs");;/* empty css */const x={},X={},k={};function p({series:r,displayType:i="line",legend:C="inline",line:n=k,xAxis:o=x,yAxis:c=X,showSymbols:a=!1,showValueLabels:l=!1,valueFormatter:u,onSeriesColorChange:T,legendLabels:I,className:O,...f}){const{containerRef:_,chart:s,theme:e,resolveSeriesColor:m}=E.useChartInstance(),{items:q,colorsBySeriesId:d,colorTokensBySeriesId:P,hiddenSeriesIds:S,toggleSeries:v}=b.useChartLegend(r,(e==null?void 0:e.seriesColors)??[],m),g=h.useMemo(()=>r.filter(N=>!S.has(N.id)),[r,S]);h.useEffect(()=>{!s||!e||s.setOption(Y.buildTimeSeriesOption({series:g,displayType:i,line:n,xAxis:o,yAxis:c,theme:e,showSymbols:a,showValueLabels:l,seriesColorOverrides:d,valueFormatter:u}),{notMerge:!0})},[s,e,g,i,n,o,c,a,l,d,u]);const M=C!=="none"&&r.length>0;return t.jsxs("div",{className:j.clsx("time-series-chart",O),...f,children:[M&&t.jsx(L.ChartLegend,{items:q,onToggle:v,onColorChange:T,colorTokensBySeriesId:P,labels:I}),t.jsx("div",{ref:_,className:"time-series-chart__canvas"})]})}exports.TimeSeriesChart=p;
|
|
2
2
|
//# sourceMappingURL=TimeSeriesChart.cjs.map
|
|
@@ -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,WAAAS,EACA,GAAGC,CACL,EACAC,EACA,CACA,MAAMC,EAAaC,EAAAA,KACjBP,EACA,SACA,eAAeC,CAAI,GACnB,kBAAkBC,CAAO,EAAA,EAGrB,CAAE,MAAAM,EAAO,GAAGC,CAAA,EAAgBL,EAElC,OAAOM,EAAcN,CAAK,EACxBd,EAAAA,IAACqB,EAAAA,KAAA,CACE,GAAIF,EACL,WAAAN,EACA,UAAWG,EACX,IAAAD,EAEC,SAAAD,EAAM,QAAA,CAAA,EAGTd,EAAAA,IAACsB,EAAAA,OAAA,CACE,GAAIH,EACL,UAAWH,EACX,UAAAZ,EACA,WAAAS,EACA,IAAAE,EAEC,SAAAb,EAAqBY,EAAM,SAAUV,CAAS,CAAA,CAAA,CAGrD,CAAC,EAWYmB,EAAed,EAAM,WAAW,SAC3C,CACE,UAAAC,EACA,KAAAC,EAAO,SACP,QAAAC,EAAU,iBACV,UAAAR,EACA,WAAAS,EACA,GAAGC,CACL,EACAC,EACA,CACA,MAAMC,EAAaC,EAAAA,KACjBP,EACA,SACA,eAAeC,CAAI,GACnB,kBAAkBC,CAAO,EAAA,EAGrB,CAAE,MAAAM,EAAO,GAAGC,CAAA,EAAgBL,EAElC,OAAOM,EAAcN,CAAK,EACxBd,EAAAA,IAACqB,EAAAA,KAAA,CACE,GAAIF,EACL,WAAAN,EACA,UAAWG,EACX,IAAAD,EAEC,SAAAD,EAAM,QAAA,CAAA,EAGTd,EAAAA,IAACsB,EAAAA,OAAA,CACE,GAAIH,EACL,UAAWH,EACX,UAAAZ,EACA,WAAAS,EACA,IAAAE,EAEC,SAAAb,EAAqBY,EAAM,SAAUV,CAAS,CAAA,CAAA,CAGrD,CAAC,EAeD,SAASgB,EACPN,EAEyC,CACzC,MAAO,SAAUA,CACnB,CAKO,MAAMU,EAAc,CAAC,CAC1B,MAAAC,EAAQ,QACR,UAAAf,EACA,GAAGI,CACL,IAAwB,CACtB,MAAME,EAAaC,EAAAA,KACjBP,EACA,eACA,sBAAsBe,CAAK,EAAA,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","align"],"mappings":";;;;;;AAYA,MAAMA,IACJ,gBAAAC,EAACC,GAAA,EAAY,eAAW,IAAC,SAAQ,SAAQ,MAAK,MAAK,MAAK,UAAA,CAAU;AAGpE,SAASC,EACPC,GACAC,GAC4B;AAC5B,SAAKA,IACE,CAACC,MACN,gBAAAC,EAAAC,GAAA,EACG,UAAA;AAAA,IAAAR;AAAA,IACA,OAAOI,KAAa,aAAaA,EAASE,CAAW,IAAIF;AAAA,EAAA,GAC5D,IALqBA;AAOzB;AAQO,MAAMK,IAASC,EAAM,WAAW,SACrC;AAAA,EACE,WAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,SAAAC,IAAU;AAAA,EACV,WAAAR;AAAA,EACA,YAAAS;AAAA,EACA,GAAGC;AACL,GACAC,GACA;AACA,QAAMC,IAAaC;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,GAWYmB,IAAed,EAAM,WAAW,SAC3C;AAAA,EACE,WAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,SAAAC,IAAU;AAAA,EACV,WAAAR;AAAA,EACA,YAAAS;AAAA,EACA,GAAGC;AACL,GACAC,GACA;AACA,QAAMC,IAAaC;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,SAAAC,EACA,MAAAC,EACA,GAAGC,CACL,EAA0B,CACxB,MAAMC,EAAaC,EAAAA,KAAKT,EAAW,oBAAoB,EACjDU,EAAaC,EAAAA,OAAiC,IAAI,EACxDC,EAAAA,oBAAoBF,CAAU,EAG9B,MAAMG,EAAkBC,EAAAA,0BAAA,EACxB,aACGC,EAAA,CAAS,UAAWP,EAAa,GAAGD,EACnC,gBAACS,EAAAA,MAAA,CACE,SAAA,CAAAf,GAASgB,EAAAA,IAACC,EAAAA,OAAO,SAAAjB,CAAA,CAAM,EACxBkB,EAAAA,KAACC,EAAAA,MAAA,CAAS,UAAU,WAClB,SAAA,CAAAH,EAAAA,IAACI,EAAAA,MAAA,CACC,UAAU,iBACV,YAAAjB,EACA,cAAekB,EAAAA,kCAAkCZ,CAAU,CAAA,CAAA,EAE7DO,EAAAA,IAACM,EAAAA,OAAA,CAAU,IAAKb,EAAY,UAAU,mBACpC,SAAAO,EAAAA,IAACO,EAAAA,gBAAA,CAAgB,cAAY,MAAA,CAAO,CAAA,CACtC,CAAA,EACF,EACAP,EAAAA,IAACQ,EAAAA,QAAA,CACC,UAAU,mBACV,yBAA0BZ,EAE1B,SAAAI,EAAAA,IAACS,EAAAA,QAAA,CAAQ,MAAApB,EAAe,SAAAD,CAAA,CAAS,CAAA,CAAA,EAElCH,GAAee,EAAAA,IAACU,EAAAA,YAAA,CAAa,SAAAzB,CAAA,CAAY,EAC1Ce,EAAAA,IAACW,EAAAA,YAAY,SAAAzB,CAAA,CAAa,CAAA,CAAA,CAC5B,CAAA,CACF,CAEJ,CAGO,SAASY,EAA2B,CAAE,GAAGR,GAA2B,CACzE,OAAOU,EAAAA,IAACY,EAAAA,SAAA,CAAe,YAAY,QAAS,GAAGtB,EAAO,CACxD,CAGO,SAASuB,EAAa,CAAE,SAAAzB,EAAU,UAAAL,EAAW,GAAGO,GAA4B,CACjF,MAAMC,EAAaC,EAAAA,KAAKT,EAAW,eAAe,EAC5C+B,EAAY,OAAO1B,GAAa,SAAWA,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,gBAAAgB,EAACC,KAAO,UAAAjB,EAAA,CAAM;AAAA,IACxB,gBAAAkB,EAACC,GAAA,EAAS,WAAU,YAClB,UAAA;AAAA,MAAA,gBAAAH;AAAA,QAACI;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,aAAAjB;AAAA,UACA,eAAekB,EAAkCZ,CAAU;AAAA,QAAA;AAAA,MAAA;AAAA,MAE7D,gBAAAO,EAACM,GAAA,EAAU,KAAKb,GAAY,WAAU,oBACpC,UAAA,gBAAAO,EAACO,GAAA,EAAgB,eAAY,OAAA,CAAO,EAAA,CACtC;AAAA,IAAA,GACF;AAAA,IACA,gBAAAP;AAAA,MAACQ;AAAAA,MAAA;AAAA,QACC,WAAU;AAAA,QACV,0BAA0BZ;AAAA,QAE1B,UAAA,gBAAAI,EAACS,GAAA,EAAQ,OAAApB,GAAe,UAAAD,EAAA,CAAS;AAAA,MAAA;AAAA,IAAA;AAAA,IAElCH,KAAe,gBAAAe,EAACU,GAAA,EAAa,UAAAzB,EAAA,CAAY;AAAA,IAC1C,gBAAAe,EAACW,KAAY,UAAAzB,EAAA,CAAa;AAAA,EAAA,EAAA,CAC5B,EAAA,CACF;AAEJ;AAGO,SAASY,EAA2B,EAAE,GAAGR,KAA2B;AACzE,SAAO,gBAAAU,EAACY,GAAA,EAAe,aAAY,SAAS,GAAGtB,GAAO;AACxD;AAGO,SAASuB,EAAa,EAAE,UAAAzB,GAAU,WAAAL,GAAW,GAAGO,KAA4B;AACjF,QAAMC,IAAaC,EAAKT,GAAW,eAAe;AAElD,2BACG+B,GAAA,EAAY,WAFG,OAAO1B,KAAa,WAAWA,IAAW,IAEvB,WAAWG,GAAa,GAAGD,GAC5D,UAAA,gBAAAY,EAAAa,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAf,EAACgB,GAAA,EAAU,WAAU,sBAAA,CAAsB;AAAA,IAC1C5B;AAAA,EAAA,EAAA,CACH,EAAA,CACF;AAEJ;"}
|