@seeqdev/qomponents 0.0.173 → 0.0.174
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/index.esm.js +406 -376
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +406 -376
- package/dist/index.js.map +1 -1
- package/dist/styles.css +2769 -3437
- package/package.json +15 -12
- package/dist/Accordion/Accordion.d.ts +0 -4
- package/dist/Accordion/Accordion.js +0 -7
- package/dist/Accordion/Accordion.js.map +0 -1
- package/dist/Accordion/Accordion.stories.d.ts +0 -5
- package/dist/Accordion/Accordion.stories.js +0 -75
- package/dist/Accordion/Accordion.stories.js.map +0 -1
- package/dist/Accordion/Accordion.test.d.ts +0 -1
- package/dist/Accordion/Accordion.test.js +0 -55
- package/dist/Accordion/Accordion.test.js.map +0 -1
- package/dist/Accordion/Accordion.types.d.ts +0 -86
- package/dist/Accordion/Accordion.types.js +0 -2
- package/dist/Accordion/Accordion.types.js.map +0 -1
- package/dist/Accordion/index.d.ts +0 -1
- package/dist/Accordion/index.js +0 -2
- package/dist/Accordion/index.js.map +0 -1
- package/dist/Alert/Alert.d.ts +0 -7
- package/dist/Alert/Alert.js +0 -32
- package/dist/Alert/Alert.js.map +0 -1
- package/dist/Alert/Alert.stories.d.ts +0 -5
- package/dist/Alert/Alert.stories.js +0 -57
- package/dist/Alert/Alert.stories.js.map +0 -1
- package/dist/Alert/Alert.test.d.ts +0 -1
- package/dist/Alert/Alert.test.js +0 -50
- package/dist/Alert/Alert.test.js.map +0 -1
- package/dist/Alert/Alert.types.d.ts +0 -63
- package/dist/Alert/Alert.types.js +0 -2
- package/dist/Alert/Alert.types.js.map +0 -1
- package/dist/Alert/index.d.ts +0 -1
- package/dist/Alert/index.js +0 -2
- package/dist/Alert/index.js.map +0 -1
- package/dist/Button/Button.d.ts +0 -10
- package/dist/Button/Button.js +0 -90
- package/dist/Button/Button.js.map +0 -1
- package/dist/Button/Button.stories.d.ts +0 -9
- package/dist/Button/Button.stories.js +0 -29
- package/dist/Button/Button.stories.js.map +0 -1
- package/dist/Button/Button.test.d.ts +0 -1
- package/dist/Button/Button.test.js +0 -47
- package/dist/Button/Button.test.js.map +0 -1
- package/dist/Button/Button.types.d.ts +0 -148
- package/dist/Button/Button.types.js +0 -5
- package/dist/Button/Button.types.js.map +0 -1
- package/dist/Button/index.d.ts +0 -1
- package/dist/Button/index.js +0 -2
- package/dist/Button/index.js.map +0 -1
- package/dist/ButtonGroup/ButtonGroup.d.ts +0 -7
- package/dist/ButtonGroup/ButtonGroup.js +0 -35
- package/dist/ButtonGroup/ButtonGroup.js.map +0 -1
- package/dist/ButtonGroup/ButtonGroup.stories.d.ts +0 -5
- package/dist/ButtonGroup/ButtonGroup.stories.js +0 -317
- package/dist/ButtonGroup/ButtonGroup.stories.js.map +0 -1
- package/dist/ButtonGroup/ButtonGroup.test.d.ts +0 -1
- package/dist/ButtonGroup/ButtonGroup.test.js +0 -66
- package/dist/ButtonGroup/ButtonGroup.test.js.map +0 -1
- package/dist/ButtonGroup/ButtonGroup.types.d.ts +0 -81
- package/dist/ButtonGroup/ButtonGroup.types.js +0 -2
- package/dist/ButtonGroup/ButtonGroup.types.js.map +0 -1
- package/dist/ButtonGroup/index.d.ts +0 -1
- package/dist/ButtonGroup/index.js +0 -2
- package/dist/ButtonGroup/index.js.map +0 -1
- package/dist/ButtonWithDropdown/ButtonWithDropdown.d.ts +0 -4
- package/dist/ButtonWithDropdown/ButtonWithDropdown.js +0 -36
- package/dist/ButtonWithDropdown/ButtonWithDropdown.js.map +0 -1
- package/dist/ButtonWithDropdown/ButtonWithDropdown.stories.d.ts +0 -5
- package/dist/ButtonWithDropdown/ButtonWithDropdown.stories.js +0 -104
- package/dist/ButtonWithDropdown/ButtonWithDropdown.stories.js.map +0 -1
- package/dist/ButtonWithDropdown/ButtonWithDropdown.test.d.ts +0 -1
- package/dist/ButtonWithDropdown/ButtonWithDropdown.test.js +0 -93
- package/dist/ButtonWithDropdown/ButtonWithDropdown.test.js.map +0 -1
- package/dist/ButtonWithDropdown/ButtonWithDropdown.types.d.ts +0 -233
- package/dist/ButtonWithDropdown/ButtonWithDropdown.types.js +0 -2
- package/dist/ButtonWithDropdown/ButtonWithDropdown.types.js.map +0 -1
- package/dist/ButtonWithDropdown/index.d.ts +0 -1
- package/dist/ButtonWithDropdown/index.js +0 -2
- package/dist/ButtonWithDropdown/index.js.map +0 -1
- package/dist/ButtonWithPopover/ButtonWithPopover.d.ts +0 -4
- package/dist/ButtonWithPopover/ButtonWithPopover.js +0 -55
- package/dist/ButtonWithPopover/ButtonWithPopover.js.map +0 -1
- package/dist/ButtonWithPopover/ButtonWithPopover.stories.d.ts +0 -5
- package/dist/ButtonWithPopover/ButtonWithPopover.stories.js +0 -25
- package/dist/ButtonWithPopover/ButtonWithPopover.stories.js.map +0 -1
- package/dist/ButtonWithPopover/ButtonWithPopover.test.d.ts +0 -1
- package/dist/ButtonWithPopover/ButtonWithPopover.test.js +0 -81
- package/dist/ButtonWithPopover/ButtonWithPopover.test.js.map +0 -1
- package/dist/ButtonWithPopover/ButtonWithPopover.types.d.ts +0 -134
- package/dist/ButtonWithPopover/ButtonWithPopover.types.js +0 -2
- package/dist/ButtonWithPopover/ButtonWithPopover.types.js.map +0 -1
- package/dist/ButtonWithPopover/index.d.ts +0 -1
- package/dist/ButtonWithPopover/index.js +0 -2
- package/dist/ButtonWithPopover/index.js.map +0 -1
- package/dist/Carousel/Carousel.d.ts +0 -9
- package/dist/Carousel/Carousel.js +0 -75
- package/dist/Carousel/Carousel.js.map +0 -1
- package/dist/Carousel/Carousel.stories.d.ts +0 -5
- package/dist/Carousel/Carousel.stories.js +0 -63
- package/dist/Carousel/Carousel.stories.js.map +0 -1
- package/dist/Carousel/Carousel.test.d.ts +0 -1
- package/dist/Carousel/Carousel.test.js +0 -48
- package/dist/Carousel/Carousel.test.js.map +0 -1
- package/dist/Carousel/Carousel.types.d.ts +0 -86
- package/dist/Carousel/Carousel.types.js +0 -2
- package/dist/Carousel/Carousel.types.js.map +0 -1
- package/dist/Carousel/index.d.ts +0 -1
- package/dist/Carousel/index.js +0 -2
- package/dist/Carousel/index.js.map +0 -1
- package/dist/Checkbox/Checkbox.d.ts +0 -7
- package/dist/Checkbox/Checkbox.js +0 -25
- package/dist/Checkbox/Checkbox.js.map +0 -1
- package/dist/Checkbox/Checkbox.stories.d.ts +0 -5
- package/dist/Checkbox/Checkbox.stories.js +0 -12
- package/dist/Checkbox/Checkbox.stories.js.map +0 -1
- package/dist/Checkbox/Checkbox.test.d.ts +0 -1
- package/dist/Checkbox/Checkbox.test.js +0 -94
- package/dist/Checkbox/Checkbox.test.js.map +0 -1
- package/dist/Checkbox/Checkbox.types.d.ts +0 -92
- package/dist/Checkbox/Checkbox.types.js +0 -2
- package/dist/Checkbox/Checkbox.types.js.map +0 -1
- package/dist/Checkbox/index.d.ts +0 -1
- package/dist/Checkbox/index.js +0 -2
- package/dist/Checkbox/index.js.map +0 -1
- package/dist/Collapse/Collapse.d.ts +0 -4
- package/dist/Collapse/Collapse.js +0 -17
- package/dist/Collapse/Collapse.js.map +0 -1
- package/dist/Collapse/Collapse.stories.d.ts +0 -5
- package/dist/Collapse/Collapse.stories.js +0 -15
- package/dist/Collapse/Collapse.stories.js.map +0 -1
- package/dist/Collapse/Collapse.test.d.ts +0 -1
- package/dist/Collapse/Collapse.test.js +0 -17
- package/dist/Collapse/Collapse.test.js.map +0 -1
- package/dist/Collapse/Collapse.types.d.ts +0 -19
- package/dist/Collapse/Collapse.types.js +0 -2
- package/dist/Collapse/Collapse.types.js.map +0 -1
- package/dist/Collapse/index.d.ts +0 -1
- package/dist/Collapse/index.js +0 -2
- package/dist/Collapse/index.js.map +0 -1
- package/dist/Icon/Icon.d.ts +0 -10
- package/dist/Icon/Icon.js +0 -56
- package/dist/Icon/Icon.js.map +0 -1
- package/dist/Icon/Icon.stories.d.ts +0 -5
- package/dist/Icon/Icon.stories.js +0 -15
- package/dist/Icon/Icon.stories.js.map +0 -1
- package/dist/Icon/Icon.test.d.ts +0 -1
- package/dist/Icon/Icon.test.js +0 -55
- package/dist/Icon/Icon.test.js.map +0 -1
- package/dist/Icon/Icon.types.d.ts +0 -91
- package/dist/Icon/Icon.types.js +0 -16
- package/dist/Icon/Icon.types.js.map +0 -1
- package/dist/Icon/index.d.ts +0 -1
- package/dist/Icon/index.js +0 -2
- package/dist/Icon/index.js.map +0 -1
- package/dist/InputGroup/InputGroup.d.ts +0 -7
- package/dist/InputGroup/InputGroup.js +0 -34
- package/dist/InputGroup/InputGroup.js.map +0 -1
- package/dist/InputGroup/InputGroup.stories.d.ts +0 -5
- package/dist/InputGroup/InputGroup.stories.js +0 -129
- package/dist/InputGroup/InputGroup.stories.js.map +0 -1
- package/dist/InputGroup/InputGroup.test.d.ts +0 -1
- package/dist/InputGroup/InputGroup.test.js +0 -42
- package/dist/InputGroup/InputGroup.test.js.map +0 -1
- package/dist/InputGroup/InputGroup.types.d.ts +0 -62
- package/dist/InputGroup/InputGroup.types.js +0 -2
- package/dist/InputGroup/InputGroup.types.js.map +0 -1
- package/dist/InputGroup/index.d.ts +0 -2
- package/dist/InputGroup/index.js +0 -2
- package/dist/InputGroup/index.js.map +0 -1
- package/dist/Modal/Modal.d.ts +0 -5
- package/dist/Modal/Modal.js +0 -76
- package/dist/Modal/Modal.js.map +0 -1
- package/dist/Modal/Modal.stories.d.ts +0 -10
- package/dist/Modal/Modal.stories.js +0 -44
- package/dist/Modal/Modal.stories.js.map +0 -1
- package/dist/Modal/Modal.test.d.ts +0 -1
- package/dist/Modal/Modal.test.js +0 -108
- package/dist/Modal/Modal.test.js.map +0 -1
- package/dist/Modal/Modal.types.d.ts +0 -244
- package/dist/Modal/Modal.types.js +0 -2
- package/dist/Modal/Modal.types.js.map +0 -1
- package/dist/Modal/index.d.ts +0 -1
- package/dist/Modal/index.js +0 -2
- package/dist/Modal/index.js.map +0 -1
- package/dist/ProgressBar/ProgressBar.d.ts +0 -4
- package/dist/ProgressBar/ProgressBar.js +0 -72
- package/dist/ProgressBar/ProgressBar.js.map +0 -1
- package/dist/ProgressBar/ProgressBar.stories.d.ts +0 -5
- package/dist/ProgressBar/ProgressBar.stories.js +0 -35
- package/dist/ProgressBar/ProgressBar.stories.js.map +0 -1
- package/dist/ProgressBar/ProgressBar.test.d.ts +0 -1
- package/dist/ProgressBar/ProgressBar.test.js +0 -43
- package/dist/ProgressBar/ProgressBar.test.js.map +0 -1
- package/dist/ProgressBar/ProgressBar.types.d.ts +0 -77
- package/dist/ProgressBar/ProgressBar.types.js +0 -2
- package/dist/ProgressBar/ProgressBar.types.js.map +0 -1
- package/dist/ProgressBar/index.d.ts +0 -1
- package/dist/ProgressBar/index.js +0 -2
- package/dist/ProgressBar/index.js.map +0 -1
- package/dist/SeeqActionDropdown/SeeqActionDropdown.d.ts +0 -4
- package/dist/SeeqActionDropdown/SeeqActionDropdown.js +0 -39
- package/dist/SeeqActionDropdown/SeeqActionDropdown.js.map +0 -1
- package/dist/SeeqActionDropdown/SeeqActionDropdown.stories.d.ts +0 -5
- package/dist/SeeqActionDropdown/SeeqActionDropdown.stories.js +0 -56
- package/dist/SeeqActionDropdown/SeeqActionDropdown.stories.js.map +0 -1
- package/dist/SeeqActionDropdown/SeeqActionDropdown.test.d.ts +0 -1
- package/dist/SeeqActionDropdown/SeeqActionDropdown.test.js +0 -73
- package/dist/SeeqActionDropdown/SeeqActionDropdown.test.js.map +0 -1
- package/dist/SeeqActionDropdown/SeeqActionDropdown.types.d.ts +0 -160
- package/dist/SeeqActionDropdown/SeeqActionDropdown.types.js +0 -2
- package/dist/SeeqActionDropdown/SeeqActionDropdown.types.js.map +0 -1
- package/dist/SeeqActionDropdown/index.d.ts +0 -1
- package/dist/SeeqActionDropdown/index.js +0 -2
- package/dist/SeeqActionDropdown/index.js.map +0 -1
- package/dist/SeeqActionDropdown/variants.d.ts +0 -5
- package/dist/SeeqActionDropdown/variants.js +0 -29
- package/dist/SeeqActionDropdown/variants.js.map +0 -1
- package/dist/Select/Select.d.ts +0 -15
- package/dist/Select/Select.js +0 -177
- package/dist/Select/Select.js.map +0 -1
- package/dist/Select/Select.stories.d.ts +0 -5
- package/dist/Select/Select.stories.js +0 -40
- package/dist/Select/Select.stories.js.map +0 -1
- package/dist/Select/Select.test.d.ts +0 -1
- package/dist/Select/Select.test.js +0 -175
- package/dist/Select/Select.test.js.map +0 -1
- package/dist/Select/Select.types.d.ts +0 -220
- package/dist/Select/Select.types.js +0 -2
- package/dist/Select/Select.types.js.map +0 -1
- package/dist/Select/index.d.ts +0 -2
- package/dist/Select/index.js +0 -3
- package/dist/Select/index.js.map +0 -1
- package/dist/Slider/Slider.d.ts +0 -6
- package/dist/Slider/Slider.js +0 -10
- package/dist/Slider/Slider.js.map +0 -1
- package/dist/Slider/Slider.stories.d.ts +0 -5
- package/dist/Slider/Slider.stories.js +0 -14
- package/dist/Slider/Slider.stories.js.map +0 -1
- package/dist/Slider/Slider.test.d.ts +0 -1
- package/dist/Slider/Slider.test.js +0 -32
- package/dist/Slider/Slider.test.js.map +0 -1
- package/dist/Slider/Slider.types.d.ts +0 -85
- package/dist/Slider/Slider.types.js +0 -2
- package/dist/Slider/Slider.types.js.map +0 -1
- package/dist/Slider/index.d.ts +0 -1
- package/dist/Slider/index.js +0 -2
- package/dist/Slider/index.js.map +0 -1
- package/dist/SvgIcon/SvgIcon.d.ts +0 -20
- package/dist/SvgIcon/SvgIcon.js +0 -28
- package/dist/SvgIcon/SvgIcon.js.map +0 -1
- package/dist/SvgIcon/SvgIcon.stories.d.ts +0 -5
- package/dist/SvgIcon/SvgIcon.stories.js +0 -18
- package/dist/SvgIcon/SvgIcon.stories.js.map +0 -1
- package/dist/SvgIcon/SvgIcon.test.d.ts +0 -1
- package/dist/SvgIcon/SvgIcon.test.js +0 -41
- package/dist/SvgIcon/SvgIcon.test.js.map +0 -1
- package/dist/SvgIcon/SvgIcon.types.d.ts +0 -76
- package/dist/SvgIcon/SvgIcon.types.js +0 -3
- package/dist/SvgIcon/SvgIcon.types.js.map +0 -1
- package/dist/SvgIcon/index.d.ts +0 -1
- package/dist/SvgIcon/index.js +0 -2
- package/dist/SvgIcon/index.js.map +0 -1
- package/dist/Tabs/Tabs.d.ts +0 -4
- package/dist/Tabs/Tabs.js +0 -17
- package/dist/Tabs/Tabs.js.map +0 -1
- package/dist/Tabs/Tabs.stories.d.ts +0 -5
- package/dist/Tabs/Tabs.stories.js +0 -73
- package/dist/Tabs/Tabs.stories.js.map +0 -1
- package/dist/Tabs/Tabs.test.d.ts +0 -1
- package/dist/Tabs/Tabs.test.js +0 -86
- package/dist/Tabs/Tabs.test.js.map +0 -1
- package/dist/Tabs/Tabs.types.d.ts +0 -95
- package/dist/Tabs/Tabs.types.js +0 -2
- package/dist/Tabs/Tabs.types.js.map +0 -1
- package/dist/Tabs/index.d.ts +0 -1
- package/dist/Tabs/index.js +0 -2
- package/dist/Tabs/index.js.map +0 -1
- package/dist/TextArea/TextArea.d.ts +0 -7
- package/dist/TextArea/TextArea.js +0 -55
- package/dist/TextArea/TextArea.js.map +0 -1
- package/dist/TextArea/TextArea.stories.d.ts +0 -5
- package/dist/TextArea/TextArea.stories.js +0 -10
- package/dist/TextArea/TextArea.stories.js.map +0 -1
- package/dist/TextArea/TextArea.test.d.ts +0 -1
- package/dist/TextArea/TextArea.test.js +0 -130
- package/dist/TextArea/TextArea.test.js.map +0 -1
- package/dist/TextArea/TextArea.types.d.ts +0 -116
- package/dist/TextArea/TextArea.types.js +0 -2
- package/dist/TextArea/TextArea.types.js.map +0 -1
- package/dist/TextArea/index.d.ts +0 -1
- package/dist/TextArea/index.js +0 -2
- package/dist/TextArea/index.js.map +0 -1
- package/dist/TextField/TextField.d.ts +0 -7
- package/dist/TextField/TextField.js +0 -85
- package/dist/TextField/TextField.js.map +0 -1
- package/dist/TextField/TextField.stories.d.ts +0 -5
- package/dist/TextField/TextField.stories.js +0 -11
- package/dist/TextField/TextField.stories.js.map +0 -1
- package/dist/TextField/TextField.test.d.ts +0 -1
- package/dist/TextField/TextField.test.js +0 -41
- package/dist/TextField/TextField.test.js.map +0 -1
- package/dist/TextField/TextField.types.d.ts +0 -199
- package/dist/TextField/TextField.types.js +0 -2
- package/dist/TextField/TextField.types.js.map +0 -1
- package/dist/TextField/index.d.ts +0 -1
- package/dist/TextField/index.js +0 -2
- package/dist/TextField/index.js.map +0 -1
- package/dist/ToolbarButton/ToolbarButton.d.ts +0 -3
- package/dist/ToolbarButton/ToolbarButton.js +0 -57
- package/dist/ToolbarButton/ToolbarButton.js.map +0 -1
- package/dist/ToolbarButton/ToolbarButton.stories.d.ts +0 -5
- package/dist/ToolbarButton/ToolbarButton.stories.js +0 -28
- package/dist/ToolbarButton/ToolbarButton.stories.js.map +0 -1
- package/dist/ToolbarButton/ToolbarButton.test.d.ts +0 -1
- package/dist/ToolbarButton/ToolbarButton.test.js +0 -85
- package/dist/ToolbarButton/ToolbarButton.test.js.map +0 -1
- package/dist/ToolbarButton/ToolbarButton.types.d.ts +0 -122
- package/dist/ToolbarButton/ToolbarButton.types.js +0 -2
- package/dist/ToolbarButton/ToolbarButton.types.js.map +0 -1
- package/dist/ToolbarButton/index.d.ts +0 -1
- package/dist/ToolbarButton/index.js +0 -2
- package/dist/ToolbarButton/index.js.map +0 -1
- package/dist/Tooltip/QTip.stories.d.ts +0 -5
- package/dist/Tooltip/QTip.stories.js +0 -19
- package/dist/Tooltip/QTip.stories.js.map +0 -1
- package/dist/Tooltip/QTip.types.d.ts +0 -13
- package/dist/Tooltip/QTip.types.js +0 -2
- package/dist/Tooltip/QTip.types.js.map +0 -1
- package/dist/Tooltip/QTipPerformance.stories.d.ts +0 -5
- package/dist/Tooltip/QTipPerformance.stories.js +0 -26
- package/dist/Tooltip/QTipPerformance.stories.js.map +0 -1
- package/dist/Tooltip/Qtip.d.ts +0 -26
- package/dist/Tooltip/Qtip.js +0 -168
- package/dist/Tooltip/Qtip.js.map +0 -1
- package/dist/Tooltip/Tooltip.d.ts +0 -13
- package/dist/Tooltip/Tooltip.js +0 -34
- package/dist/Tooltip/Tooltip.js.map +0 -1
- package/dist/Tooltip/Tooltip.stories.d.ts +0 -5
- package/dist/Tooltip/Tooltip.stories.js +0 -15
- package/dist/Tooltip/Tooltip.stories.js.map +0 -1
- package/dist/Tooltip/Tooltip.types.d.ts +0 -22
- package/dist/Tooltip/Tooltip.types.js +0 -3
- package/dist/Tooltip/Tooltip.types.js.map +0 -1
- package/dist/Tooltip/TooltipPerformance.stories.d.ts +0 -5
- package/dist/Tooltip/TooltipPerformance.stories.js +0 -26
- package/dist/Tooltip/TooltipPerformance.stories.js.map +0 -1
- package/dist/Tooltip/index.d.ts +0 -2
- package/dist/Tooltip/index.js +0 -3
- package/dist/Tooltip/index.js.map +0 -1
- package/dist/Tooltip/qTip.utilities.d.ts +0 -3
- package/dist/Tooltip/qTip.utilities.js +0 -11
- package/dist/Tooltip/qTip.utilities.js.map +0 -1
- package/dist/index.d.ts +0 -46
- package/dist/setupTests.d.ts +0 -1
- package/dist/setupTests.js +0 -6
- package/dist/setupTests.js.map +0 -1
- package/dist/types.d.ts +0 -27
- package/dist/types.js +0 -26
- package/dist/types.js.map +0 -1
- package/dist/utils/browserId.d.ts +0 -9
- package/dist/utils/browserId.js +0 -29
- package/dist/utils/browserId.js.map +0 -1
- package/dist/utils/svg.d.ts +0 -15
- package/dist/utils/svg.js +0 -20
- package/dist/utils/svg.js.map +0 -1
- package/dist/utils/validateStyleDimension.d.ts +0 -2
- package/dist/utils/validateStyleDimension.js +0 -14
- package/dist/utils/validateStyleDimension.js.map +0 -1
- package/dist/utils/validateStyleDimension.test.d.ts +0 -1
- package/dist/utils/validateStyleDimension.test.js +0 -20
- package/dist/utils/validateStyleDimension.test.js.map +0 -1
package/dist/index.esm.js
CHANGED
|
@@ -46,34 +46,34 @@ const getQTipData = ({ tooltip, tooltipPlacement, isHtmlTooltip, tooltipTestId,
|
|
|
46
46
|
: undefined;
|
|
47
47
|
|
|
48
48
|
const colorClassesThemeLight = {
|
|
49
|
-
'theme': 'tw
|
|
50
|
-
'white': 'tw
|
|
51
|
-
'dark-gray': 'tw
|
|
52
|
-
'warning': 'tw
|
|
53
|
-
'darkish-gray': 'tw
|
|
54
|
-
'gray': 'tw
|
|
49
|
+
'theme': 'tw:text-sq-theme-dark',
|
|
50
|
+
'white': 'tw:text-sq-white',
|
|
51
|
+
'dark-gray': 'tw:text-sq-fairly-dark-gray',
|
|
52
|
+
'warning': 'tw:text-sq-warning',
|
|
53
|
+
'darkish-gray': 'tw:text-sq-darkish-gray',
|
|
54
|
+
'gray': 'tw:text-sq-disabled-gray',
|
|
55
55
|
'color': '',
|
|
56
|
-
'info': 'tw
|
|
57
|
-
'text': 'tw
|
|
56
|
+
'info': 'tw:text-sq-theme-link',
|
|
57
|
+
'text': 'tw:text-sq-text-color',
|
|
58
58
|
'inherit': '',
|
|
59
|
-
'danger': 'tw
|
|
60
|
-
'theme-light': 'tw
|
|
61
|
-
'success': 'tw
|
|
59
|
+
'danger': 'tw:text-sq-danger',
|
|
60
|
+
'theme-light': 'tw:text-sq-theme-light',
|
|
61
|
+
'success': 'tw:text-sq-success',
|
|
62
62
|
};
|
|
63
63
|
const colorClassesThemeDark = {
|
|
64
|
-
'theme': 'dark:
|
|
64
|
+
'theme': 'tw:dark:text-sq-theme-darker',
|
|
65
65
|
'white': '',
|
|
66
|
-
'dark-gray': 'tw
|
|
66
|
+
'dark-gray': 'tw:text-sq-fairly-dark-gray',
|
|
67
67
|
'warning': '',
|
|
68
|
-
'darkish-gray': 'tw
|
|
69
|
-
'gray': 'dark:
|
|
68
|
+
'darkish-gray': 'tw:text-sq-darkish-gray',
|
|
69
|
+
'gray': 'tw:dark:text-sq-dark-disabled-gray',
|
|
70
70
|
'color': '',
|
|
71
|
-
'info': 'dark:
|
|
72
|
-
'text': 'dark:
|
|
71
|
+
'info': 'tw:dark:text-sq-theme-link',
|
|
72
|
+
'text': 'tw:dark:text-sq-dark-text',
|
|
73
73
|
'inherit': '',
|
|
74
|
-
'danger': 'tw
|
|
75
|
-
'theme-light': 'tw
|
|
76
|
-
'success': 'tw
|
|
74
|
+
'danger': 'tw:text-sq-danger',
|
|
75
|
+
'theme-light': 'tw:text-sq-theme-light',
|
|
76
|
+
'success': 'tw:text-sq-success',
|
|
77
77
|
};
|
|
78
78
|
/**
|
|
79
79
|
* Icon:
|
|
@@ -85,14 +85,14 @@ const Icon = ({ onClick, icon, iconPrefix = undefined, type = 'theme', extraClas
|
|
|
85
85
|
const errorMessage = color === undefined || color === ''
|
|
86
86
|
? 'Icon with type="color" must have prop color specified.'
|
|
87
87
|
: 'Icon with prop color must have type="color".';
|
|
88
|
-
return jsx$1("div", { className: "tw
|
|
88
|
+
return jsx$1("div", { className: "tw:text-sq-danger-color", children: errorMessage });
|
|
89
89
|
}
|
|
90
90
|
const fontAwesomePrefix = iconPrefix ? iconPrefix : 'fa-sharp fa-regular';
|
|
91
91
|
const iconPrefixString = icon.startsWith('fc') ? 'fc' : fontAwesomePrefix;
|
|
92
92
|
const style = type === 'color' && color ? { color } : {};
|
|
93
93
|
const sizeClass = size ? `fa-${size}` : small ? 'fa-sm' : large ? 'fa-lg' : '';
|
|
94
94
|
const appliedClassNames = `${iconPrefixString} ${icon} ${sizeClass}
|
|
95
|
-
${colorClassesThemeLight[type]} ${colorClassesThemeDark[type]} ${onClick ? 'tw
|
|
95
|
+
${colorClassesThemeLight[type]} ${colorClassesThemeDark[type]} ${onClick ? 'tw:cursor-pointer' : ''} ${extraClassNames} tw:focus:outline-none tw:focus-visible:outline-none tw:outline-none`;
|
|
96
96
|
const tooltipData = getQTipData(tooltipProps);
|
|
97
97
|
return (jsx$1("i", { className: appliedClassNames, style: style, onClick: onClick, "data-testid": testId, "data-customid": customId, id: id, "data-number": number, ...tooltipData }));
|
|
98
98
|
};
|
|
@@ -103,58 +103,58 @@ const Icon = ({ onClick, icon, iconPrefix = undefined, type = 'theme', extraClas
|
|
|
103
103
|
* - include tooltips and/or icons
|
|
104
104
|
*/
|
|
105
105
|
const Button = ({ onClick, label, variant = 'outline', type = 'button', size = 'sm', disabled, extraClassNames, id, testId, stopPropagation = true, tooltip, tooltipOptions, iconStyle = 'text', icon, iconColor, iconPosition = 'left', iconPrefix = undefined, preventBlur = false, isHtmlTooltip = false, tooltipTestId, }) => {
|
|
106
|
-
const baseClasses = 'tw
|
|
106
|
+
const baseClasses = 'tw:px-2.5 tw:rounded-md tw:focus:ring-0 tw:focus-visible:outline-none tw:cursor-pointer tw:disabled:pointer-events-none';
|
|
107
107
|
const baseClassesByVariant = {
|
|
108
|
-
'outline': 'disabled:
|
|
109
|
-
'theme': 'disabled:
|
|
110
|
-
'danger': 'tw
|
|
111
|
-
'tw
|
|
112
|
-
'theme-light': 'disabled:
|
|
113
|
-
'no-border': 'disabled:
|
|
114
|
-
'warning': 'tw
|
|
108
|
+
'outline': 'tw:disabled:opacity-50 tw:border-solid tw:border',
|
|
109
|
+
'theme': 'tw:disabled:opacity-50 tw:border-solid tw:border',
|
|
110
|
+
'danger': 'tw:bg-sq-danger tw:hover:bg-sq-danger-hover/80 tw:disabled:opacity-50 tw:border-solid tw:border ' +
|
|
111
|
+
'tw:border-sq-danger tw:hover:border-sq-danger-hover/80',
|
|
112
|
+
'theme-light': 'tw:disabled:opacity-50 tw:border-solid tw:border',
|
|
113
|
+
'no-border': 'tw:bg-transparent tw:disabled:opacity-50',
|
|
114
|
+
'warning': 'tw:bg-sq-warning tw:border-solid tw:border tw:border-sq-warning',
|
|
115
115
|
};
|
|
116
116
|
const textClassesByVariantLightTheme = {
|
|
117
|
-
'outline': 'tw
|
|
118
|
-
'theme': 'tw
|
|
119
|
-
'theme-light': 'tw
|
|
120
|
-
'danger': 'tw
|
|
121
|
-
'no-border': 'tw
|
|
122
|
-
'warning': 'tw
|
|
117
|
+
'outline': 'tw:text-sq-text-color',
|
|
118
|
+
'theme': 'tw:text-sq-white',
|
|
119
|
+
'theme-light': 'tw:text-sq-white',
|
|
120
|
+
'danger': 'tw:text-sq-white',
|
|
121
|
+
'no-border': 'tw:text-sq-text-color',
|
|
122
|
+
'warning': 'tw:text-sq-white',
|
|
123
123
|
};
|
|
124
124
|
const textClassesByVariantDarkTheme = {
|
|
125
|
-
'outline': 'dark:
|
|
126
|
-
'theme': 'dark:
|
|
127
|
-
'theme-light': 'dark:
|
|
128
|
-
'danger': 'dark:
|
|
129
|
-
'no-border': 'dark:
|
|
130
|
-
'warning': 'dark:
|
|
125
|
+
'outline': 'tw:dark:text-sq-dark-text',
|
|
126
|
+
'theme': 'tw:dark:text-sq-white',
|
|
127
|
+
'theme-light': 'tw:dark:text-sq-white',
|
|
128
|
+
'danger': 'tw:dark:text-sq-white',
|
|
129
|
+
'no-border': 'tw:dark:text-sq-dark-text',
|
|
130
|
+
'warning': 'tw:dark:text-sq-white',
|
|
131
131
|
};
|
|
132
132
|
const classesByVariantLightTheme = {
|
|
133
|
-
'outline': 'tw
|
|
134
|
-
' focus:
|
|
135
|
-
'theme': 'tw
|
|
136
|
-
' hover:
|
|
133
|
+
'outline': 'tw:bg-sq-white tw:dark:bg-sq-dark-background tw:border-sq-disabled-gray tw:hover:bg-sq-light-gray' +
|
|
134
|
+
' tw:focus:bg-sq-dark-gray tw:active:bg-sq-dark-gray tw:focus:border-sq-color-dark tw:active:border-sq-color-dark',
|
|
135
|
+
'theme': 'tw:bg-sq-theme-dark tw:hover:bg-sq-theme-highlight tw:border-sq-theme-dark' +
|
|
136
|
+
' tw:hover:border-sq-theme-highlight',
|
|
137
137
|
'danger': '',
|
|
138
|
-
'theme-light': 'tw
|
|
138
|
+
'theme-light': 'tw:bg-sq-theme-icon tw:hover:bg-sq-theme-link tw:border-sq-theme-icon tw:hover:border-sq-theme-link',
|
|
139
139
|
'no-border': '',
|
|
140
140
|
'warning': '',
|
|
141
141
|
};
|
|
142
142
|
const classesByVariantDarkTheme = {
|
|
143
|
-
'outline': 'dark:
|
|
144
|
-
' dark:focus:
|
|
145
|
-
' dark:active:
|
|
146
|
-
'theme': 'dark:
|
|
147
|
-
' dark:hover:
|
|
143
|
+
'outline': 'tw:dark:border-sq-dark-disabled-gray tw:dark:hover:bg-sq-highlight-color-dark' +
|
|
144
|
+
' tw:dark:focus:bg-sq-multi-gray-dark tw:dark:active:bg-sq-multi-gray-dark tw:dark:focus:border-sq-theme-dark' +
|
|
145
|
+
' tw:dark:active:border-sq-theme-dark',
|
|
146
|
+
'theme': 'tw:dark:bg-sq-theme-dark tw:dark:hover:bg-sq-theme-highlight tw:dark:border-sq-theme-dark' +
|
|
147
|
+
' tw:dark:hover:border-sq-theme-highlight',
|
|
148
148
|
'danger': '',
|
|
149
|
-
'theme-light': 'dark:
|
|
150
|
-
' dark:hover:
|
|
149
|
+
'theme-light': 'tw:dark:bg-sq-theme-icon tw:dark:hover:bg-sq-link-dark tw:dark:border-sq-icon-dark' +
|
|
150
|
+
' tw:dark:hover:border-sq-link-dark',
|
|
151
151
|
'no-border': '',
|
|
152
152
|
'warning': '',
|
|
153
153
|
};
|
|
154
154
|
const sizeClasses = {
|
|
155
|
-
xs: 'tw
|
|
156
|
-
sm: 'tw
|
|
157
|
-
lg: 'tw
|
|
155
|
+
xs: 'tw:text-xs tw:py-0.5',
|
|
156
|
+
sm: 'tw:text-sm tw:py-1',
|
|
157
|
+
lg: 'tw:text-xl tw:py-1',
|
|
158
158
|
};
|
|
159
159
|
const appliedClasses = `${baseClasses} ${baseClassesByVariant[variant]} ${sizeClasses[size]} ${classesByVariantLightTheme[variant]} ${classesByVariantDarkTheme[variant]} ${textClassesByVariantLightTheme[variant]} ${textClassesByVariantDarkTheme[variant]} ${extraClassNames}`;
|
|
160
160
|
let tooltipData = undefined;
|
|
@@ -167,7 +167,7 @@ const Button = ({ onClick, label, variant = 'outline', type = 'button', size = '
|
|
|
167
167
|
'data-qtip-delay': tooltipOptions?.delay ?? DEFAULT_TOOL_TIP_DELAY,
|
|
168
168
|
};
|
|
169
169
|
}
|
|
170
|
-
const iconClass = iconPosition === 'left' ? 'tw
|
|
170
|
+
const iconClass = iconPosition === 'left' ? 'tw:mr-1' : 'tw:ml-1';
|
|
171
171
|
const iconElement = icon && (jsx$1(Icon, { icon: icon, iconPrefix: iconPrefix, type: iconStyle, color: iconColor, extraClassNames: label
|
|
172
172
|
? `${iconClass} ${textClassesByVariantLightTheme[variant]} ${textClassesByVariantDarkTheme[variant]}`
|
|
173
173
|
: '', testId: `${id}_spinner` }));
|
|
@@ -1384,7 +1384,7 @@ const flip$4 = function (options) {
|
|
|
1384
1384
|
if (!ignoreCrossAxisOverflow ||
|
|
1385
1385
|
// We leave the current main axis only if every placement on that axis
|
|
1386
1386
|
// overflows the main axis.
|
|
1387
|
-
overflowsData.every(d => d.overflows[0] > 0
|
|
1387
|
+
overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
|
|
1388
1388
|
// Try next placement and re-run the lifecycle.
|
|
1389
1389
|
return {
|
|
1390
1390
|
data: {
|
|
@@ -2123,14 +2123,9 @@ function getWindowScrollBarX$1(element, rect) {
|
|
|
2123
2123
|
return rect.left + leftScroll;
|
|
2124
2124
|
}
|
|
2125
2125
|
|
|
2126
|
-
function getHTMLOffset(documentElement, scroll
|
|
2127
|
-
if (ignoreScrollbarX === void 0) {
|
|
2128
|
-
ignoreScrollbarX = false;
|
|
2129
|
-
}
|
|
2126
|
+
function getHTMLOffset(documentElement, scroll) {
|
|
2130
2127
|
const htmlRect = documentElement.getBoundingClientRect();
|
|
2131
|
-
const x = htmlRect.left + scroll.scrollLeft - (
|
|
2132
|
-
// RTL <body> scrollbar.
|
|
2133
|
-
getWindowScrollBarX$1(documentElement, htmlRect));
|
|
2128
|
+
const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX$1(documentElement, htmlRect);
|
|
2134
2129
|
const y = htmlRect.top + scroll.scrollTop;
|
|
2135
2130
|
return {
|
|
2136
2131
|
x,
|
|
@@ -2169,7 +2164,7 @@ function convertOffsetParentRelativeRectToViewportRelativeRect$1(_ref) {
|
|
|
2169
2164
|
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
2170
2165
|
}
|
|
2171
2166
|
}
|
|
2172
|
-
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll
|
|
2167
|
+
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
2173
2168
|
return {
|
|
2174
2169
|
width: rect.width * scale.x,
|
|
2175
2170
|
height: rect.height * scale.y,
|
|
@@ -2203,6 +2198,10 @@ function getDocumentRect$1(element) {
|
|
|
2203
2198
|
};
|
|
2204
2199
|
}
|
|
2205
2200
|
|
|
2201
|
+
// Safety check: ensure the scrollbar space is reasonable in case this
|
|
2202
|
+
// calculation is affected by unusual styles.
|
|
2203
|
+
// Most scrollbars leave 15-18px of space.
|
|
2204
|
+
const SCROLLBAR_MAX = 25;
|
|
2206
2205
|
function getViewportRect$1(element, strategy) {
|
|
2207
2206
|
const win = getWindow(element);
|
|
2208
2207
|
const html = getDocumentElement(element);
|
|
@@ -2220,6 +2219,24 @@ function getViewportRect$1(element, strategy) {
|
|
|
2220
2219
|
y = visualViewport.offsetTop;
|
|
2221
2220
|
}
|
|
2222
2221
|
}
|
|
2222
|
+
const windowScrollbarX = getWindowScrollBarX$1(html);
|
|
2223
|
+
// <html> `overflow: hidden` + `scrollbar-gutter: stable` reduces the
|
|
2224
|
+
// visual width of the <html> but this is not considered in the size
|
|
2225
|
+
// of `html.clientWidth`.
|
|
2226
|
+
if (windowScrollbarX <= 0) {
|
|
2227
|
+
const doc = html.ownerDocument;
|
|
2228
|
+
const body = doc.body;
|
|
2229
|
+
const bodyStyles = getComputedStyle(body);
|
|
2230
|
+
const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
|
|
2231
|
+
const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
|
|
2232
|
+
if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {
|
|
2233
|
+
width -= clippingStableScrollbarWidth;
|
|
2234
|
+
}
|
|
2235
|
+
} else if (windowScrollbarX <= SCROLLBAR_MAX) {
|
|
2236
|
+
// If the <body> scrollbar is on the left, the width needs to be extended
|
|
2237
|
+
// by the scrollbar amount so there isn't extra space on the right.
|
|
2238
|
+
width += windowScrollbarX;
|
|
2239
|
+
}
|
|
2223
2240
|
return {
|
|
2224
2241
|
width,
|
|
2225
2242
|
height,
|
|
@@ -4742,31 +4759,30 @@ function getSvgIconPath(icon) {
|
|
|
4742
4759
|
}
|
|
4743
4760
|
|
|
4744
4761
|
const popoverBorderStyles = [
|
|
4745
|
-
'tw
|
|
4746
|
-
'tw
|
|
4747
|
-
'tw
|
|
4748
|
-
'tw
|
|
4749
|
-
'dark:
|
|
4762
|
+
'tw:border-solid',
|
|
4763
|
+
'tw:border',
|
|
4764
|
+
'tw:rounded-md',
|
|
4765
|
+
'tw:border-sq-disabled-gray',
|
|
4766
|
+
'tw:dark:border-gray-500',
|
|
4750
4767
|
].join(' ');
|
|
4751
4768
|
const triggerBackgroundStyles = [
|
|
4752
|
-
'tw
|
|
4753
|
-
'hover:
|
|
4754
|
-
'active:
|
|
4755
|
-
'dark:
|
|
4756
|
-
'dark:hover:
|
|
4757
|
-
'dark:active:
|
|
4769
|
+
'tw:bg-transparent',
|
|
4770
|
+
'tw:hover:bg-sq-worksheetspanel-gray',
|
|
4771
|
+
'tw:active:bg-sq-worksheetspanel-gray',
|
|
4772
|
+
'tw:dark:bg-transparent',
|
|
4773
|
+
'tw:dark:hover:bg-sq-field-disabled-gray/30',
|
|
4774
|
+
'tw:dark:active:bg-sq-field-disabled-gray/30',
|
|
4758
4775
|
].join(' ');
|
|
4759
4776
|
const activeBackgroundStyles = [
|
|
4760
4777
|
'active',
|
|
4761
|
-
'tw
|
|
4762
|
-
'
|
|
4763
|
-
'
|
|
4764
|
-
'dark:
|
|
4765
|
-
'dark:
|
|
4766
|
-
'dark:active:tw-bg-sq-dark-disabled-gray',
|
|
4778
|
+
'tw:bg-sq-overlay',
|
|
4779
|
+
'tw:active:bg-sq-overlay',
|
|
4780
|
+
'tw:dark:bg-sq-dark-disabled-gray',
|
|
4781
|
+
'tw:dark:hover:border-sq-dark-disabled-gray/30',
|
|
4782
|
+
'tw:dark:active:bg-sq-dark-disabled-gray/30',
|
|
4767
4783
|
].join(' ');
|
|
4768
|
-
const bgStyles$3 = ['tw
|
|
4769
|
-
const disabledClasses$4 = ['tw
|
|
4784
|
+
const bgStyles$3 = ['tw:bg-sq-white', 'tw:dark:bg-sq-dark-background'].join(' ');
|
|
4785
|
+
const disabledClasses$4 = ['tw:opacity-50', 'tw:cursor-not-allowed'].join(' ');
|
|
4770
4786
|
const PopoverContent = React.forwardRef(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (jsx$1(Content2$3, { ref: ref, align: align, sideOffset: sideOffset, ...props, asChild: true })));
|
|
4771
4787
|
const ToolbarButton = ({ isSmall = false, label, icon, secondIcon, forceSmallIcon = false, tooltipText, id, popoverContent, extraClassNames, testId, tooltipTestId, tooltipOptions, isActive = false, isHtmlTooltip = false, hasArrow = false, disabled = false, isPrimaryAnSvg = false, primaryIconExtraClassNames = false, iconHeight = 24, iconWidth = 24, primaryIconViewbox = '0 0 24 24', onClick, onHide, }) => {
|
|
4772
4788
|
let tooltipData = undefined;
|
|
@@ -4784,12 +4800,12 @@ const ToolbarButton = ({ isSmall = false, label, icon, secondIcon, forceSmallIco
|
|
|
4784
4800
|
onHide && onHide();
|
|
4785
4801
|
}
|
|
4786
4802
|
};
|
|
4787
|
-
return (jsxs(Root2$3, { defaultOpen: false, onOpenChange: onOpenChange, children: [jsx$1(Trigger$3, { id: id, className: `tw-border-none tw
|
|
4803
|
+
return (jsxs(Root2$3, { defaultOpen: false, onOpenChange: onOpenChange, children: [jsx$1(Trigger$3, { id: id, className: `tw:bg-transparent tw:border-none tw:mx-[1.5px] tw:first:ml-0 tw:last:mr-0 ${isActive ? 'active' : ''}`, disabled: disabled, "data-testid": testId, onClick: (e) => {
|
|
4788
4804
|
onClick && onClick(e);
|
|
4789
|
-
}, children: jsxs("div", { ...tooltipData, className: `tw
|
|
4790
|
-
' tw
|
|
4791
|
-
' data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2' +
|
|
4792
|
-
popoverBorderStyles, children: [hasArrow && (jsx$1(Arrow2$2, { asChild: true, children: jsx$1("div", { className: " tw
|
|
4805
|
+
}, children: jsxs("div", { ...tooltipData, className: `tw:flex tw:flex-col tw:items-center tw:rounded-md ${isSmall ? 'tw:py-px tw:px-1' : 'tw:px-2 tw:py-[5px]'} ${disabled ? disabledClasses$4 : isActive ? activeBackgroundStyles : triggerBackgroundStyles} ${extraClassNames || ''}`, children: [jsxs("span", { className: "tw:nowrap", children: [isPrimaryAnSvg ? (jsx$1("svg", { xmlns: "http://www.w3.org/2000/svg", className: `tw:text-sq-text-color tw:dark:text-sq-dark-text ${primaryIconExtraClassNames || ''}`, viewBox: primaryIconViewbox, height: `${iconHeight}px`, width: `${iconWidth}px`, fill: "currentColor", "data-testid": testId, children: jsx$1("path", { d: getSvgIconPath(icon) }) })) : (jsx$1(Icon, { icon: icon, testId: "firstIcon", type: "text", size: !isSmall && !label && !secondIcon && !forceSmallIcon ? 'lg' : 'sm', extraClassNames: `tw:text-sq-text-color tw:dark:text-sq-dark-text` })), secondIcon && jsx$1(Icon, { icon: secondIcon, type: "text", testId: "secondIcon" }), popoverContent ? (jsx$1(Icon, { icon: "fc-arrow-dropdown", extraClassNames: "tw:text-sq-text-color tw:dark:text-sq-dark-text tw:ml-[3px] tw:text-[0.5rem]", type: "text", size: "sm" })) : undefined] }), !isSmall && (jsx$1("small", { className: "tw:text-sq-text-color tw:dark:text-sq-dark-text tw:text-[0.625rem]", children: label }))] }) }), !!popoverContent ? (jsx$1(PopoverContent, { sideOffset: 2, align: "start", children: jsxs("div", { className: bgStyles$3 +
|
|
4806
|
+
' tw:relative tw:z-[1000] tw:min-w-6 tw:p-[0.5rem] tw:focus-visible:outline-none tw:outline-none tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out' +
|
|
4807
|
+
' tw:data-[state=closed]:fade-out-0 tw:data-[state=open]:fade-in-0 tw:data-[state=closed]:zoom-out-95 tw:data-[state=open]:zoom-in-95 tw:data-[side=bottom]:slide-in-from-top-2 tw:data-[side=left]:slide-in-from-right-2 tw:data-[side=right]:slide-in-from-left-2 tw:data-[side=top]:slide-in-from-bottom-2' +
|
|
4808
|
+
popoverBorderStyles, children: [hasArrow && (jsx$1(Arrow2$2, { asChild: true, children: jsx$1("div", { className: " tw:fill-transparent tw:bg-sq-white tw:w-[15px] tw:h-[15px] tw:mt-[-7px] tw:rotate-45 tw:dark:bg-sq-dark-background tw:border-b tw:border-r tw:border-sq-disabled-gray tw:dark:border-gray-500" }) })), popoverContent] }) })) : undefined] }));
|
|
4793
4809
|
};
|
|
4794
4810
|
|
|
4795
4811
|
const setValidInputDimension = (width, height) => {
|
|
@@ -4806,24 +4822,24 @@ const setValidInputDimension = (width, height) => {
|
|
|
4806
4822
|
return inputStyle;
|
|
4807
4823
|
};
|
|
4808
4824
|
|
|
4809
|
-
const errorClasses$4 = 'tw
|
|
4825
|
+
const errorClasses$4 = 'tw:border-sq-danger';
|
|
4810
4826
|
const borderColorClasses$4 = [
|
|
4811
|
-
'tw
|
|
4812
|
-
'dark:
|
|
4813
|
-
'dark:focus:
|
|
4814
|
-
'dark:active:
|
|
4815
|
-
'focus:
|
|
4816
|
-
'active:
|
|
4827
|
+
'tw:border-sq-disabled-gray',
|
|
4828
|
+
'tw:dark:border-sq-dark-disabled-gray',
|
|
4829
|
+
'tw:dark:focus:border-sq-theme-dark-dark',
|
|
4830
|
+
'tw:dark:active:border-sq-theme-darker',
|
|
4831
|
+
'tw:focus:border-sq-theme-dark',
|
|
4832
|
+
'tw:active:border-sq-theme-dark',
|
|
4817
4833
|
].join(' ');
|
|
4818
|
-
const baseClasses$6 = 'tw
|
|
4819
|
-
' disabled:
|
|
4820
|
-
' disabled:
|
|
4821
|
-
' dark:
|
|
4822
|
-
const darkTheme$3 = 'dark:
|
|
4823
|
-
const lightTheme$3 = 'tw
|
|
4834
|
+
const baseClasses$6 = 'tw:h-[2.125rem] tw:leading-normal tw:outline-none tw:py-1 tw:px-3' +
|
|
4835
|
+
' tw:disabled:pointer-events-none tw:disabled:bg-sq-light-gray tw:disabled:dark:bg-sq-dark-disabled-gray' +
|
|
4836
|
+
' tw:disabled:cursor-not-allowed tw:p-1 tw:border-solid tw:border tw:placeholder-gray-400' +
|
|
4837
|
+
' tw:dark:placeholder-sq-dark-text/30 specTextField';
|
|
4838
|
+
const darkTheme$3 = 'tw:dark:bg-sq-dark-background tw:dark:text-sq-dark-text tw:disabled:dark:text-sq-dark-text/30';
|
|
4839
|
+
const lightTheme$3 = 'tw:text-sq-text-color tw:disabled:text-sq-darkish-gray';
|
|
4824
4840
|
const sizeClasses = {
|
|
4825
|
-
sm: 'tw
|
|
4826
|
-
lg: 'tw
|
|
4841
|
+
sm: 'tw:text-sm',
|
|
4842
|
+
lg: 'tw:text-xl',
|
|
4827
4843
|
};
|
|
4828
4844
|
/**
|
|
4829
4845
|
* Textfield.
|
|
@@ -4865,12 +4881,12 @@ const TextField = React__default.forwardRef((props, ref) => {
|
|
|
4865
4881
|
internalRef.current.value = `${value}`;
|
|
4866
4882
|
}
|
|
4867
4883
|
}, [value]);
|
|
4868
|
-
let borderRadius = 'tw
|
|
4884
|
+
let borderRadius = 'tw:rounded-md';
|
|
4869
4885
|
if (inputGroup === 'left') {
|
|
4870
|
-
borderRadius = 'tw
|
|
4886
|
+
borderRadius = 'tw:rounded-l-md tw:border-r-0 tw:focus:border-r' + ' tw:active:border-r';
|
|
4871
4887
|
}
|
|
4872
4888
|
else if (inputGroup === 'right') {
|
|
4873
|
-
borderRadius = 'tw
|
|
4889
|
+
borderRadius = 'tw:rounded-r-md tw:border-l-0 tw:focus:border-l tw:active:border-l';
|
|
4874
4890
|
}
|
|
4875
4891
|
const appliedClasses = `${baseClasses$6} ${sizeClasses[size]} ${extraClassNames} ${lightTheme$3} ${darkTheme$3} ${borderRadius} ${showError ? errorClasses$4 : borderColorClasses$4} `;
|
|
4876
4892
|
const inputProp = setValidInputDimension(inputWidth, inputHeight)
|
|
@@ -4883,18 +4899,18 @@ const TextField = React__default.forwardRef((props, ref) => {
|
|
|
4883
4899
|
inputLenghtProp.maxLength = maxLength;
|
|
4884
4900
|
if (minLength)
|
|
4885
4901
|
inputLenghtProp.minLength = minLength;
|
|
4886
|
-
return (jsxs(Fragment, { children: [jsx$1("input", { ref: setAllRefs, "data-testid": testId, name: name, id: id, type: type, value: value, className: appliedClasses, placeholder: placeholder, disabled: disabled, readOnly: readonly, autoComplete: autoComplete, onChange: handleChange, onFocus: onFocus, onBlur: onBlur, onKeyDown: onKeyDown, onKeyUp: onKeyUp, step: step, required: required, min: min, max: max, ...inputLenghtProp, ...inputProp, ...tooltipData }), errorText && showError && jsx$1("div", { className: "tw
|
|
4902
|
+
return (jsxs(Fragment, { children: [jsx$1("input", { ref: setAllRefs, "data-testid": testId, name: name, id: id, type: type, value: value, className: appliedClasses, placeholder: placeholder, disabled: disabled, readOnly: readonly, autoComplete: autoComplete, onChange: handleChange, onFocus: onFocus, onBlur: onBlur, onKeyDown: onKeyDown, onKeyUp: onKeyUp, step: step, required: required, min: min, max: max, ...inputLenghtProp, ...inputProp, ...tooltipData }), errorText && showError && jsx$1("div", { className: "tw:text-sq-danger tw:text-xs tw:mt-1", children: errorText })] }));
|
|
4887
4903
|
});
|
|
4888
4904
|
|
|
4889
|
-
const alignment = 'tw
|
|
4890
|
-
const labelClasses = 'tw
|
|
4891
|
-
const baseClasses$5 = 'tw-border
|
|
4892
|
-
' dark:
|
|
4893
|
-
' checked:
|
|
4894
|
-
' checked:active:
|
|
4895
|
-
' dark:disabled:
|
|
4896
|
-
const checkboxClasses = `tw
|
|
4897
|
-
const radioClasses = `tw
|
|
4905
|
+
const alignment = 'tw:flex';
|
|
4906
|
+
const labelClasses = 'tw:ml-1.5 tw:text-sm tw:-mt-0.5';
|
|
4907
|
+
const baseClasses$5 = 'tw:appearance-none tw:border tw:h-3.5 tw:w-3.5 tw:focus:ring-0 tw:focus:ring-offset-0 tw:outline-none tw:focus:outline-none' +
|
|
4908
|
+
' tw:dark:bg-sq-dark-background tw:dark:border-sq-dark-text tw:dark:hover:bg-sq-dark-background' +
|
|
4909
|
+
' tw:checked:text-white tw:checked:border-sq-text-color tw:checked:hover:border-sq-theme-dark' +
|
|
4910
|
+
' tw:checked:active:border-sq-theme-darker tw:checked:focus:border-sq-theme-dark tw:disabled:border-sq-disabled-gray' +
|
|
4911
|
+
' tw:dark:disabled:border-sq-fairly-dark-gray tw:dark:checked:focus:bg-sq-dark-background';
|
|
4912
|
+
const checkboxClasses = `tw:form-checkbox tw:rounded ${baseClasses$5}`;
|
|
4913
|
+
const radioClasses = `tw:form-radio tw:rounded-full ${baseClasses$5}`;
|
|
4898
4914
|
/**
|
|
4899
4915
|
* Checkbox and Radio Box Component.
|
|
4900
4916
|
*/
|
|
@@ -4902,26 +4918,25 @@ const Checkbox = (props) => {
|
|
|
4902
4918
|
const { type = 'checkbox', value, disabled = false, label, onChange, onClick, onKeyDown, checked, defaultChecked, id, name, extraClassNames, extraLabelClassNames, testId, ...tooltipProps } = props;
|
|
4903
4919
|
const assignedId = id ?? 'checkbox_' + Math.random();
|
|
4904
4920
|
const tooltipData = getQTipData(tooltipProps);
|
|
4905
|
-
return (jsxs("span", { className: `${alignment} ${extraClassNames}`, children: [jsx$1("input", { value: value, type: type, "data-testid": testId, name: name, id: assignedId, readOnly: !onChange, checked: checked, defaultChecked: defaultChecked, className: `${type === 'checkbox' ? checkboxClasses : radioClasses} ${disabled ? 'tw
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
' disabled:
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
const
|
|
4917
|
-
const errorClasses$3 = 'tw-border-sq-danger-color';
|
|
4921
|
+
return (jsxs("span", { className: `${alignment} ${extraClassNames}`, children: [jsx$1("input", { value: value, type: type, "data-testid": testId, name: name, id: assignedId, readOnly: !onChange, checked: checked, defaultChecked: defaultChecked, className: `${type === 'checkbox' ? checkboxClasses : radioClasses} ${disabled ? 'tw:cursor-not-allowed' : 'tw:cursor-pointer'}`, disabled: disabled, onClick: onClick, onChange: onChange, onKeyDown: onKeyDown, ...tooltipData }), label && (jsx$1("label", { htmlFor: assignedId, className: `${labelClasses} ${extraLabelClassNames} ${disabled
|
|
4922
|
+
? 'tw:cursor-not-allowed tw:dark:text-sq-fairly-dark-gray tw:text-sq-fairly-dark-gray'
|
|
4923
|
+
: 'tw:cursor-pointer tw:text-sq-text-color tw:dark:text-sq-dark-text'}`, children: label }))] }));
|
|
4924
|
+
};
|
|
4925
|
+
|
|
4926
|
+
const baseClasses$4 = 'tw:leading-normal tw:outline-none tw:py-1 tw:px-3 tw:rounded-md tw:w-full' +
|
|
4927
|
+
' tw:disabled:pointer-events-none tw:disabled:bg-sq-light-gray tw:disabled:dark:bg-sq-dark-disabled-gray' +
|
|
4928
|
+
' tw:disabled:cursor-not-allowed tw:p-1 tw:border-solid tw:border tw:text-sm';
|
|
4929
|
+
const darkTheme$2 = 'tw:dark:bg-sq-dark-background tw:dark:text-sq-dark-text ' +
|
|
4930
|
+
'tw:dark:placeholder-sq-dark-text/30 tw:disabled:dark:text-sq-dark-text/30';
|
|
4931
|
+
const lightTheme$2 = 'tw:text-sq-text-color tw:placeholder-gray-400 tw:disabled:text-sq-darkish-gray';
|
|
4932
|
+
const errorClasses$3 = 'tw:border-sq-danger';
|
|
4918
4933
|
const borderColorClasses$3 = [
|
|
4919
|
-
'tw
|
|
4920
|
-
'dark:
|
|
4921
|
-
'dark:focus:
|
|
4922
|
-
'dark:active:
|
|
4923
|
-
'focus:
|
|
4924
|
-
'active:
|
|
4934
|
+
'tw:border-sq-disabled-gray',
|
|
4935
|
+
'tw:dark:border-sq-dark-disabled-gray',
|
|
4936
|
+
'tw:dark:focus:border-sq-theme-darker',
|
|
4937
|
+
'tw:dark:active:border-sq-theme-darker',
|
|
4938
|
+
'tw:focus:border-sq-theme-dark',
|
|
4939
|
+
'tw:active:border-sq-theme-dark',
|
|
4925
4940
|
].join(' ');
|
|
4926
4941
|
/**
|
|
4927
4942
|
* TextArea.
|
|
@@ -4970,25 +4985,25 @@ const TextArea = React__default.forwardRef(({ readonly = false, disabled = false
|
|
|
4970
4985
|
* display correctly.
|
|
4971
4986
|
*/
|
|
4972
4987
|
const Tooltip = ({ position = 'bottom', children, text, delay = DEFAULT_TOOL_TIP_DELAY, }) => {
|
|
4973
|
-
const arrowBaseClasses =
|
|
4974
|
-
const centerArrowVertically = 'before:
|
|
4975
|
-
const centerArrowHorizontally = 'before:
|
|
4976
|
-
const arrowRight = `${arrowBaseClasses} ${centerArrowVertically} before:
|
|
4977
|
-
before:
|
|
4978
|
-
const arrowLeft = `${arrowBaseClasses} ${centerArrowVertically} before:
|
|
4979
|
-
before:
|
|
4980
|
-
const arrowBottom = `${arrowBaseClasses} ${centerArrowHorizontally} before:-
|
|
4981
|
-
before:
|
|
4982
|
-
const arrowTop = `${arrowBaseClasses} ${centerArrowHorizontally} before:-
|
|
4983
|
-
before:
|
|
4988
|
+
const arrowBaseClasses = "tw:before:content-[''] tw:before:absolute tw:before:border-8";
|
|
4989
|
+
const centerArrowVertically = 'tw:before:top-1/2 tw:before:-translate-y-1/2';
|
|
4990
|
+
const centerArrowHorizontally = 'tw:before:left-1/2 tw:before:-translate-x-1/2';
|
|
4991
|
+
const arrowRight = `${arrowBaseClasses} ${centerArrowVertically} tw:before:right-[100%] tw:before:border-y-transparent
|
|
4992
|
+
tw:before:border-l-transparent tw:before:border-r-sq-black`;
|
|
4993
|
+
const arrowLeft = `${arrowBaseClasses} ${centerArrowVertically} tw:before:left-[100%] tw:before:border-y-transparent
|
|
4994
|
+
tw:before:border-l-sq-black tw:before:border-r-transparent`;
|
|
4995
|
+
const arrowBottom = `${arrowBaseClasses} ${centerArrowHorizontally} tw:before:-top-4 tw:before:border-b-sq-black
|
|
4996
|
+
tw:before:border-r-transparent tw:before:border-l-transparent tw:before:border-t-transparent`;
|
|
4997
|
+
const arrowTop = `${arrowBaseClasses} ${centerArrowHorizontally} tw:before:-bottom-4 tw:before:border-b-transparent
|
|
4998
|
+
tw:before:border-t-sq-black tw:before:border-l-transparent tw:before:border-r-transparent`;
|
|
4984
4999
|
const placements = {
|
|
4985
|
-
top:
|
|
4986
|
-
left:
|
|
4987
|
-
right: `tw
|
|
4988
|
-
bottom:
|
|
5000
|
+
top: `tw:-top-2 tw:-translate-y-full tw:left-1/2 tw:-translate-x-1/2 ${arrowTop}`,
|
|
5001
|
+
left: `tw:-translate-x-full tw:-left-3 tw:-translate-y-1/2 tw:top-1/2 ${arrowLeft}`,
|
|
5002
|
+
right: `tw:translate-x-full tw:-right-3 tw:-translate-y-1/2 tw:top-1/2 ${arrowRight}`,
|
|
5003
|
+
bottom: `tw:-bottom-2 tw:translate-y-full tw:left-1/2 tw:-translate-x-1/2 ${arrowBottom}`,
|
|
4989
5004
|
};
|
|
4990
|
-
return (jsxs("div", { className: "tw
|
|
4991
|
-
tw
|
|
5005
|
+
return (jsxs("div", { className: "tw:group tw:relative tw:inline-block", children: [children, jsx$1("div", { className: `tw:z-50 tw:whitespace-nowrap tw:hidden tw:group-hover:inline-block tw:group-hover:delay-[${delay}ms]
|
|
5006
|
+
tw:absolute tw:opacity-0 tw:group-hover:opacity-100 tw:rounded tw:bg-sq-black tw:p-2 tw:text-xs tw:text-sq-white ${placements[position]}`, children: text })] }));
|
|
4992
5007
|
};
|
|
4993
5008
|
|
|
4994
5009
|
/*! @license DOMPurify 3.2.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.3/LICENSE */
|
|
@@ -7474,8 +7489,8 @@ const QTip = () => {
|
|
|
7474
7489
|
: positionTooltip();
|
|
7475
7490
|
}
|
|
7476
7491
|
};
|
|
7477
|
-
return (jsx$1(Fragment, { children: jsxs("div", { onMouseEnter: () => setOverTooltip(true), onMouseLeave: () => setOverTooltip(false), "data-testid": tooltipTestId, ref: tooltipRef, className: 'tw
|
|
7478
|
-
(show ? 'tw
|
|
7492
|
+
return (jsx$1(Fragment, { children: jsxs("div", { onMouseEnter: () => setOverTooltip(true), onMouseLeave: () => setOverTooltip(false), "data-testid": tooltipTestId, ref: tooltipRef, className: 'tw:absolute tw:rounded tw:bg-black tw:max-w-96 tw:p-2 tw:text-xs tw:text-sq-white tw:z-[9999] tw:fade-in ' +
|
|
7493
|
+
(show ? 'tw:visible' : 'tw:invisible tw:pointer-events-none'), children: [html ? jsx$1(HTMLTip, { text: tooltipText }) : tooltipText, jsx$1("div", { className: "tw:absolute tw:w-[10px] tw:h-[10px] tw:rotate-45 tw:bg-sq-black", ref: tooltipArrowRef })] }) }));
|
|
7479
7494
|
};
|
|
7480
7495
|
|
|
7481
7496
|
function _typeof$1(o) {
|
|
@@ -13890,75 +13905,75 @@ var CreatableSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
13890
13905
|
});
|
|
13891
13906
|
var CreatableSelect$1 = CreatableSelect;
|
|
13892
13907
|
|
|
13893
|
-
const baseClasses$3 = ['focus:tw
|
|
13894
|
-
const containerStyles = ['tw
|
|
13895
|
-
const errorClasses$2 = 'tw
|
|
13896
|
-
const borderColorClasses$2 = ['tw
|
|
13908
|
+
const baseClasses$3 = ['focus:tw:ring-0', 'tw:disabled:cursor-not-allowed'].join(' ');
|
|
13909
|
+
const containerStyles = ['tw:bg-sq-white', 'tw:dark:bg-sq-dark-background'].join(' ');
|
|
13910
|
+
const errorClasses$2 = 'tw:border-sq-danger-color';
|
|
13911
|
+
const borderColorClasses$2 = ['tw:border-sq-disabled-gray', 'tw:dark:border-sq-dark-disabled-gray'].join(' ');
|
|
13897
13912
|
const borderStyles$3 = [
|
|
13898
|
-
'tw
|
|
13899
|
-
'tw
|
|
13900
|
-
'hover:
|
|
13901
|
-
'focus:tw
|
|
13902
|
-
'active:tw
|
|
13903
|
-
'dark:hover:
|
|
13904
|
-
'dark:focus:tw
|
|
13905
|
-
'dark:active:tw
|
|
13913
|
+
'tw:border-solid',
|
|
13914
|
+
'tw:border',
|
|
13915
|
+
'tw:hover:border-sq-theme-dark',
|
|
13916
|
+
'focus:tw:border-sq-theme-dark',
|
|
13917
|
+
'active:tw:border-sq-theme-dark',
|
|
13918
|
+
'tw:dark:hover:border-sq-theme-dark-dark',
|
|
13919
|
+
'dark:focus:tw:border-sq-theme-dark-dark',
|
|
13920
|
+
'dark:active:tw:border-sq-theme-dark-dark',
|
|
13906
13921
|
].join(' ');
|
|
13907
|
-
const textStyles = ['tw
|
|
13922
|
+
const textStyles = ['tw:text-sq-text-color', 'tw:dark:text-sq-dark-text', 'tw:text-sm'].join(' ');
|
|
13908
13923
|
const textActiveStyles = [
|
|
13909
|
-
'hover:
|
|
13910
|
-
'focus:tw
|
|
13911
|
-
'active:tw
|
|
13912
|
-
'dark:
|
|
13913
|
-
'dark:hover:
|
|
13914
|
-
'dark:focus:tw
|
|
13915
|
-
'dark:active:tw
|
|
13924
|
+
'tw:hover:text-sq-theme-dark',
|
|
13925
|
+
'focus:tw:text-sq-theme-dark',
|
|
13926
|
+
'active:tw:text-sq-theme-dark',
|
|
13927
|
+
'tw:dark:text-sq-dark-disabled-gray',
|
|
13928
|
+
'tw:dark:hover:text-sq-theme-dark-dark',
|
|
13929
|
+
'dark:focus:tw:text-sq-theme-dark-dark',
|
|
13930
|
+
'dark:active:tw:text-sq-theme-dark-dark',
|
|
13916
13931
|
].join(' ');
|
|
13917
13932
|
const menuStyles = [
|
|
13918
|
-
'tw
|
|
13919
|
-
'tw
|
|
13920
|
-
'tw
|
|
13921
|
-
'tw
|
|
13922
|
-
'dark:
|
|
13923
|
-
'tw
|
|
13924
|
-
'tw
|
|
13925
|
-
'!tw
|
|
13933
|
+
'tw:border-solid',
|
|
13934
|
+
'tw:border',
|
|
13935
|
+
'tw:rounded-b',
|
|
13936
|
+
'tw:border-sq-disabled-gray',
|
|
13937
|
+
'tw:dark:border-sq-dark-disabled-gray',
|
|
13938
|
+
'tw:whitespace-nowrap',
|
|
13939
|
+
'tw:min-w-fit',
|
|
13940
|
+
'!tw:z-[9999]',
|
|
13926
13941
|
].join(' ');
|
|
13927
13942
|
const menuListStyles = [
|
|
13928
|
-
'tw
|
|
13929
|
-
'tw
|
|
13930
|
-
'dark:
|
|
13931
|
-
'tw
|
|
13932
|
-
'!tw
|
|
13943
|
+
'tw:rounded-b',
|
|
13944
|
+
'tw:bg-sq-white',
|
|
13945
|
+
'tw:dark:bg-sq-dark-background',
|
|
13946
|
+
'tw:min-w-fit',
|
|
13947
|
+
'!tw:z-[9999]',
|
|
13933
13948
|
'specSelectMenu',
|
|
13934
13949
|
].join(' ');
|
|
13935
13950
|
const groupHeadingStyles = [
|
|
13936
|
-
'tw
|
|
13937
|
-
'dark:
|
|
13938
|
-
'tw
|
|
13939
|
-
'tw
|
|
13940
|
-
'tw
|
|
13951
|
+
'tw:bg-sq-light-gray',
|
|
13952
|
+
'tw:dark:bg-sq-dark-disabled-gray',
|
|
13953
|
+
'tw:text-sq-darkish-gray',
|
|
13954
|
+
'tw:py-1',
|
|
13955
|
+
'tw:px-2.5',
|
|
13941
13956
|
'specSelectGroupHeading',
|
|
13942
13957
|
].join(' ');
|
|
13943
13958
|
const optionStyles = [
|
|
13944
|
-
'hover:
|
|
13945
|
-
'hover:
|
|
13946
|
-
'dark:hover:
|
|
13947
|
-
'tw
|
|
13948
|
-
'tw
|
|
13959
|
+
'tw:hover:bg-sq-gray-highlight',
|
|
13960
|
+
'tw:hover:cursor-pointer',
|
|
13961
|
+
'tw:dark:hover:bg-sq-gray-highlight-dark',
|
|
13962
|
+
'tw:py-1',
|
|
13963
|
+
'tw:px-2.5',
|
|
13949
13964
|
'specSelectOption',
|
|
13950
13965
|
].join(' ');
|
|
13951
|
-
const disabledClasses$3 = ['tw
|
|
13952
|
-
const dropDownIndicatorStyles = `tw
|
|
13953
|
-
const placeholderStyles = ['tw
|
|
13966
|
+
const disabledClasses$3 = ['tw:bg-sq-field-disabled-gray', 'tw:cursor-not-allowed'].join(' ');
|
|
13967
|
+
const dropDownIndicatorStyles = `tw:text-sq-disabled-gray ${textActiveStyles} specOpenIt`;
|
|
13968
|
+
const placeholderStyles = ['tw:text-gray-400', 'tw:dark:text-sq-dark-text-lighter', 'specOpenSelect'].join(' ');
|
|
13954
13969
|
const multiValueStyles = [
|
|
13955
|
-
'tw
|
|
13956
|
-
'dark:
|
|
13957
|
-
'tw
|
|
13958
|
-
'tw
|
|
13959
|
-
'tw
|
|
13960
|
-
'tw
|
|
13961
|
-
'tw
|
|
13970
|
+
'tw:bg-sq-disabled-gray',
|
|
13971
|
+
'tw:dark:bg-sq-multi-gray-dark',
|
|
13972
|
+
'tw:text-sm',
|
|
13973
|
+
'tw:py-0.5',
|
|
13974
|
+
'tw:px-1',
|
|
13975
|
+
'tw:m-0.5',
|
|
13976
|
+
'tw:rounded-sm',
|
|
13962
13977
|
'specOpenSelect',
|
|
13963
13978
|
].join(' ');
|
|
13964
13979
|
/**
|
|
@@ -14023,38 +14038,38 @@ const Select = ({ options, value, placeholder = 'select', noOptionsMessage = 'no
|
|
|
14023
14038
|
filterOption: filterOption ? filterOption : filterConfig ? createFilter(filterConfig) : undefined,
|
|
14024
14039
|
classNames: {
|
|
14025
14040
|
control: ({ menuIsOpen }) => {
|
|
14026
|
-
let border = menuIsOpen ? 'tw
|
|
14041
|
+
let border = menuIsOpen ? 'tw:rounded-t-md' : 'tw:rounded-md';
|
|
14027
14042
|
// if it's on the left side of the input group make sure the right side is straight and not curved
|
|
14028
14043
|
if (inputGroup === 'left') {
|
|
14029
|
-
border = menuIsOpen ? 'tw
|
|
14044
|
+
border = menuIsOpen ? 'tw:rounded-tl-md' : 'tw:rounded-l-md';
|
|
14030
14045
|
}
|
|
14031
14046
|
else if (inputGroup === 'right') {
|
|
14032
|
-
border = menuIsOpen ? 'tw
|
|
14047
|
+
border = menuIsOpen ? 'tw:rounded-tr-md' : 'tw:rounded-r-md';
|
|
14033
14048
|
}
|
|
14034
14049
|
const appliedClasses = `${borderStyles$3} ${border} ${showError ? errorClasses$2 : borderColorClasses$2} ${small ? 'reactSelectMinHeightSmall' : 'reactSelectMinHeight'} ${controlClassNames}`;
|
|
14035
|
-
return `${appliedClasses} ${baseClasses$3} ${containerStyles} specSelectControl ${isDisabled ? disabledClasses$3 : ''} ${small ? 'tw
|
|
14050
|
+
return `${appliedClasses} ${baseClasses$3} ${containerStyles} specSelectControl ${isDisabled ? disabledClasses$3 : ''} ${small ? 'tw:pl-2 tw:pr-1' : 'tw:pl-2.5 tw:pr-1.5'}`;
|
|
14036
14051
|
},
|
|
14037
14052
|
placeholder: () => placeholderStyles,
|
|
14038
14053
|
container: ({ selectProps }) => {
|
|
14039
|
-
const containerBorderStyles = selectProps?.menuIsOpen ? 'tw
|
|
14054
|
+
const containerBorderStyles = selectProps?.menuIsOpen ? 'tw:rounded-t-md' : 'tw:rounded-md';
|
|
14040
14055
|
return `${textStyles} ${extraClassNames} ${containerBorderStyles}`;
|
|
14041
14056
|
},
|
|
14042
14057
|
input: () => textStyles + ' specSelectInput',
|
|
14043
14058
|
menuList: () => menuListStyles,
|
|
14044
14059
|
menu: () => menuStyles,
|
|
14045
|
-
menuPortal: () => '!tw
|
|
14060
|
+
menuPortal: () => '!tw:z-[9000]',
|
|
14046
14061
|
dropdownIndicator: () => dropDownIndicatorStyles,
|
|
14047
14062
|
option: ({ isSelected, isDisabled }) => {
|
|
14048
14063
|
let classes = optionStyles;
|
|
14049
14064
|
if (isDisabled) {
|
|
14050
14065
|
classes += ' specDisabledOption ';
|
|
14051
14066
|
}
|
|
14052
|
-
return isSelected ? classes + ' tw
|
|
14067
|
+
return isSelected ? classes + ' tw:bg-sq-colored-hover tw:dark:bg-sq-colored-hover-dark' : classes;
|
|
14053
14068
|
},
|
|
14054
14069
|
singleValue: () => 'specOpenSelect',
|
|
14055
14070
|
multiValue: () => multiValueStyles,
|
|
14056
|
-
multiValueRemove: () => 'hover:
|
|
14057
|
-
clearIndicator: () => 'tw
|
|
14071
|
+
multiValueRemove: () => 'tw:hover:text-sq-danger-color specSelectMultiValueRemove',
|
|
14072
|
+
clearIndicator: () => 'tw:text-sq-disabled-gray tw:hover:text-sq-danger-color specClearSelect',
|
|
14058
14073
|
group: () => 'specSelectGroup',
|
|
14059
14074
|
groupHeading: () => groupHeadingStyles,
|
|
14060
14075
|
},
|
|
@@ -14444,11 +14459,11 @@ var classNames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
|
|
|
14444
14459
|
const Dialog = Root$4;
|
|
14445
14460
|
const DialogPortal = Portal$1;
|
|
14446
14461
|
const DialogClose = Close;
|
|
14447
|
-
const DialogContent = React__default.forwardRef(({ className, children, ...props }, ref) => (jsxs(DialogPortal, { children: [jsx$1("div", { className: "tw
|
|
14448
|
-
tw
|
|
14449
|
-
tw
|
|
14462
|
+
const DialogContent = React__default.forwardRef(({ className, children, ...props }, ref) => (jsxs(DialogPortal, { children: [jsx$1("div", { className: "tw:select-none tw:fixed tw:w-full tw:h-full tw:opacity-50 tw:inset-0 tw:z-[1009] tw:bg-sq-dark-background\n tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out tw:data-[state=closed]:fade-out-0\n tw:data-[state=open]:fade-in-0 " }), jsxs(Content$2, { ref: ref, className: `tw:fixed tw:left-[50%] tw:top-0 tw:my-6 tw:translate-x-[-50%] tw:z-[1010] tw:grid
|
|
14463
|
+
tw:gap-4 tw:border tw:bg-sq-white tw:dark:bg-sq-dark-background tw:p-6 tw:shadow-lg tw:duration-200
|
|
14464
|
+
tw:rounded-lg ${className}`, ...props, children: [jsx$1(DialogTitle$1, { className: "tw:hidden" }), children] })] })));
|
|
14450
14465
|
DialogContent.displayName = Content$2.displayName;
|
|
14451
|
-
const DialogHeader = (props) => (jsx$1("div", { className: "tw
|
|
14466
|
+
const DialogHeader = (props) => (jsx$1("div", { className: "tw:w-full tw:justify-between", children: jsx$1("div", { ...props }) }));
|
|
14452
14467
|
DialogHeader.displayName = 'DialogHeader';
|
|
14453
14468
|
const DialogFooter = (props) => jsx$1("div", { ...props });
|
|
14454
14469
|
DialogFooter.displayName = 'DialogFooter';
|
|
@@ -14486,26 +14501,26 @@ const Modal = ({ titleIcon, title = 'Modal title example', titleSuffixLabel, sub
|
|
|
14486
14501
|
let titleIconElement = jsx$1(Fragment, {});
|
|
14487
14502
|
if (titleIcon) {
|
|
14488
14503
|
if (typeof titleIcon === 'string') {
|
|
14489
|
-
titleIconElement = (jsx$1(Icon, { icon: titleIcon, testId: "modalTitleIcon", extraClassNames: "tw
|
|
14504
|
+
titleIconElement = (jsx$1(Icon, { icon: titleIcon, testId: "modalTitleIcon", extraClassNames: "tw:flex tw:text-xl tw:mt-1" }));
|
|
14490
14505
|
}
|
|
14491
14506
|
else {
|
|
14492
|
-
titleIconElement = jsx$1("div", { className: "tw
|
|
14507
|
+
titleIconElement = jsx$1("div", { className: "tw:mt-1.5", children: titleIcon });
|
|
14493
14508
|
}
|
|
14494
14509
|
}
|
|
14495
|
-
return (jsxs(Fragment, { children: [titleIcon && titleIconPosition === 'left' ? jsx$1("div", { className: "tw
|
|
14510
|
+
return (jsxs(Fragment, { children: [titleIcon && titleIconPosition === 'left' ? jsx$1("div", { className: "tw:flex tw:mr-2", children: titleIconElement }) : jsx$1(Fragment, {}), jsx$1(DialogTitle, { asChild: true, children: isTitleEditable ? (jsxs("div", { className: "tw:flex tw:w-full tw:items-center", children: [jsx$1(TextField, { extraClassNames: inputExtraClassNames, value: title, type: "text", testId: "modalTitle", onChange: onTitleChanged, placeholder: titlePlaceholder, required: titleRequired, showError: !!titleError }), titleError && jsx$1("p", { className: "tw:text-sq-danger tw:min-w-fit tw:pl-2 tw:mb-0", children: titleError })] })) : (customHeader ?? (jsxs("div", { "data-testid": "modalTitle", className: "modal-title", children: [jsxs("div", { className: "tw:flex tw:items-center", children: [jsx$1("h3", { children: title }), titleSuffixLabel && jsx$1("span", { className: "tw:text-xl tw:pl-0.5", children: titleSuffixLabel })] }), subtitle && (jsx$1("div", { className: "tw:italic tw:text-sm tw:text-left tw:mt-1", "data-testid": "modal-subtitle", children: subtitle }))] }))) }), titleIcon && titleIconPosition === 'right' ? jsx$1("div", { className: "tw:flex tw:ml-4", children: titleIconElement }) : jsx$1(Fragment, {})] }));
|
|
14496
14511
|
};
|
|
14497
|
-
return open ? (jsx$1(Dialog, { open: true, onOpenChange: onClose, modal: keepFocusInsideModal, children: jsxs(DialogContent, { onPointerDownOutside: (e) => (onPointerDownOutside ? onPointerDownOutside(e) : e.preventDefault()), onInteractOutside: (e) => (onInteractOutside ? onInteractOutside(e) : e.preventDefault()), "data-testid": testId, className: classNames(`modalContent tw
|
|
14498
|
-
'tw
|
|
14499
|
-
'tw
|
|
14500
|
-
'tw
|
|
14501
|
-
'tw
|
|
14502
|
-
'tw
|
|
14503
|
-
'tw
|
|
14504
|
-
'tw
|
|
14505
|
-
'tw
|
|
14506
|
-
'tw
|
|
14507
|
-
'tw
|
|
14508
|
-
}, dialogClassName), children: [jsxs(DialogHeader, { className: "modal-header tw
|
|
14512
|
+
return open ? (jsx$1(Dialog, { open: true, onOpenChange: onClose, modal: keepFocusInsideModal, children: jsxs(DialogContent, { onPointerDownOutside: (e) => (onPointerDownOutside ? onPointerDownOutside(e) : e.preventDefault()), onInteractOutside: (e) => (onInteractOutside ? onInteractOutside(e) : e.preventDefault()), "data-testid": testId, className: classNames(`modalContent tw:w-full !tw:p-0 tw:border-none tw:shadow-none tw:dark:text-sq-dark-text !tw:gap-0`, {
|
|
14513
|
+
'tw:max-w-xs': size === 'xs',
|
|
14514
|
+
'tw:max-w-sm': size === 'sm',
|
|
14515
|
+
'tw:max-w-md': size === 'md',
|
|
14516
|
+
'tw:max-w-lg': size === 'lg',
|
|
14517
|
+
'tw:max-w-xl': size === 'xl',
|
|
14518
|
+
'tw:max-w-2xl': size === '2xl',
|
|
14519
|
+
'tw:max-w-3xl': size === '3xl',
|
|
14520
|
+
'tw:max-w-4xl': size === '4xl',
|
|
14521
|
+
'tw:max-w-5xl': size === '5xl',
|
|
14522
|
+
'tw:max-w-6xl': size === '6xl',
|
|
14523
|
+
}, dialogClassName), children: [jsxs(DialogHeader, { className: "modal-header tw:flex tw:w-full tw:justify-between tw:border-sq-disabled-gray\n tw:dark:border-sq-dark-disabled-gray tw:border-0 tw:border-b tw:px-6 tw:py-4", children: [jsx$1("div", { className: "tw:flex tw:w-full", children: renderTitle() }), !hideCloseIcon && (jsx$1(DialogClose, { autoFocus: false, className: "tw:[&:has(:focus-visible)]:none tw:opacity-70 tw:bg-transparent tw:hover:opacity-100 close tw:text-base tw:cursor-pointer tw:ml-4", "data-testid": "closeButton", children: jsx$1("span", { className: "tw:cursor-pointer", children: "\u00D7" }) }))] }), jsx$1(DialogDescription, { className: "modal-body tw:px-6 tw:py-4 tw:overflow-y-auto", asChild: true, children: children }), !hideFooterButtons && (jsx$1(DialogFooter, { className: "modal-footer tw:px-6 tw:py-4", children: modalFooter ?? (jsxs("div", { className: "tw:flex tw:w-full tw:justify-between", "data-testid": "modalFooter", children: [jsx$1("div", { className: "tw:flex tw:justify-start", children: customButton && (jsx$1(Button, { label: customButtonLabel, onClick: onClickCustomButton, disabled: disableCustomButton, extraClassNames: "tw:justify-start tw:min-w-[100px]", testId: "customButton", variant: customButtonVariant })) }), jsxs("div", { className: "tw:flex tw:justify-end", children: [jsx$1("div", { className: "tw:flex tw:items-center", children: middleFooterSection }), !hideCancelButton && (jsx$1(DialogClose, { asChild: true, children: jsx$1(Button, { label: cancelButtonLabel, extraClassNames: "tw:mr-5 tw:min-w-[100px]", tooltip: cancelButtonTooltip, variant: "outline", stopPropagation: false, testId: "cancelButton" }) })), !hideSubmitButton && (jsx$1(Button, { label: submitButtonLabel, onClick: handleSubmit, disabled: disableSubmitButton || isLoading, variant: submitButtonVariant, stopPropagation: stopPropagationSubmitButton, tooltip: submitButtonTooltip, icon: isLoading ? 'fc-loading-notch tw:animate-spin' : undefined, iconPosition: "left", testId: "submitButton", extraClassNames: "tw:min-w-[100px]" }))] })] })) }))] }) })) : (jsx$1(Fragment, {}));
|
|
14509
14524
|
};
|
|
14510
14525
|
|
|
14511
14526
|
function createCollection(name) {
|
|
@@ -14963,11 +14978,11 @@ const Tabs = ({ tabs, defaultActiveTab, activeTab, onTabSelect, extraClassNames,
|
|
|
14963
14978
|
return;
|
|
14964
14979
|
onTabSelect && onTabSelect(tabId);
|
|
14965
14980
|
};
|
|
14966
|
-
return (jsxs(Root2$2, { className: `tw
|
|
14967
|
-
? 'tw
|
|
14968
|
-
: 'hover:
|
|
14969
|
-
? 'dark:
|
|
14970
|
-
: 'dark:
|
|
14981
|
+
return (jsxs(Root2$2, { className: `tw:flex tw:flex-col tw:min-w-[300px] tw:max-w-full tw:flex-grow tw:focus-visible:outline-none ${extraClassNames || ''}`, defaultValue: defaultActiveTab, "data-testid": testId, id: id, value: activeTab, onValueChange: handleTabSelect, children: [jsx$1(List, { className: `tw:flex tw:flex-row tw:flex-wrap tw:z-[1001]`, children: tabs.map(({ id, icon, label, tabExtraClassNames, testId: tabsTestId, disabled, tabLabelExtraClassNames = '' }, index) => (jsx$1(Trigger$2, { className: `tw:bg-sq-white tw:dark:bg-sq-dark-background tw:h-[25px] tw:focus-visible:outline-none tw:min-w-[100px] tw:px-4 tw:border-solid tw:flex tw:flex-1 tw:justify-center tw:items-center tw:border-r-[2px] tw:last:border-r-0 tw:border-sq-overlay tw:dark:border-gray-700 ${stretchTabs ? '' : 'tw:max-w-max tw:min-w-fit'} ${tabExtraClassNames || ''} ${activeTab === id
|
|
14982
|
+
? 'tw:border-b-sq-theme-dark tw:dark:border-b-sq-theme-dark tw:border-b-[3px]'
|
|
14983
|
+
: 'tw:hover:bg-sq-light-gray tw:border-b-[1px] tw:hover:dark:bg-gray-700'}`, "data-testid": tabsTestId, disabled: disabled, value: id, children: jsxs("span", { className: "tw:flex tw:items-center tw:overflow-hidden", children: [icon && (jsx$1(Icon, { icon: icon, testId: `${id}_tab-icon`, extraClassNames: "tw:text-[0.9375rem] tw:mr-[7px] tw:flex-shrink-0" })), jsx$1("span", { className: `tw:text-[0.875rem] tw:font-medium tw:whitespace-nowrap tw:overflow-hidden tw:text-ellipsis ${activeTab === id
|
|
14984
|
+
? 'tw:dark:text-sq-dark-text tw:text-gray-500'
|
|
14985
|
+
: 'tw:dark:text-sq-theme-darker tw:text-sq-theme-dark'} ${tabLabelExtraClassNames}`, children: label })] }) }, `${label}-${id}-${index}`))) }), tabs.map((tab, index) => (jsx$1(Content$1, { className: `tw:bg-sq-white tw:dark:bg-sq-dark-background tw:overflow-y-auto tw:-mt-[1px] tw:border-t-[1px] tw:border-t-sq-overlay tw:dark:border-t-gray-700 tw:z-[500] tw:flex tw:flex-col tw:flex-grow tw:focus-visible:outline-none ${tab.tabContentExtraClassNames || ''}`, value: tab.id, children: tab.content }, `${tab.label}_${index}_content`)))] }));
|
|
14971
14986
|
};
|
|
14972
14987
|
|
|
14973
14988
|
var COLLAPSIBLE_NAME = "Collapsible";
|
|
@@ -15392,18 +15407,18 @@ var Trigger2 = AccordionTrigger;
|
|
|
15392
15407
|
var Content2$2 = AccordionContent;
|
|
15393
15408
|
|
|
15394
15409
|
const Accordion = ({ accordionItems, defaultValue, value, onItemSelect, disabled, extraClassNames, testId, }) => {
|
|
15395
|
-
return (jsx$1(Root2$1, { className: `tw
|
|
15410
|
+
return (jsx$1(Root2$1, { className: `tw:rounded-md tw:w-full tw:focus-visible:outline-none ${extraClassNames || ''}`, type: "single", defaultValue: defaultValue, value: value, collapsible: true, "data-testid": testId, onValueChange: (_value) => onItemSelect(_value), children: accordionItems.map((item) => (jsxs(Item, { className: `tw:p-0 tw:flex tw:flex-col tw:w-full`, disabled: disabled, value: item.value, children: [jsx$1(Trigger2, { disabled: disabled, className: `tw:w-full tw:cursor-default tw:focus-visible:outline-none tw:bg-transparent`, children: item.trigger }), jsx$1(Content2$2, { className: `tw:data-[state=open]:animate-slideDown tw:data-[state=closed]:animate-slideUp tw:overflow-hidden tw:focus-visible:outline-none ${item.contentClassNames || ''}`, children: item.content })] }, item.value))) }));
|
|
15396
15411
|
};
|
|
15397
15412
|
|
|
15398
|
-
const bgStyles$2 = ['tw
|
|
15413
|
+
const bgStyles$2 = ['tw:bg-sq-white', 'tw:dark:bg-sq-dark-background'].join(' ');
|
|
15399
15414
|
const borderStyles$2 = [
|
|
15400
|
-
'tw
|
|
15401
|
-
'tw
|
|
15402
|
-
'tw
|
|
15403
|
-
'tw
|
|
15404
|
-
'dark:
|
|
15415
|
+
'tw:border-solid',
|
|
15416
|
+
'tw:border',
|
|
15417
|
+
'tw:rounded-popover',
|
|
15418
|
+
'tw:border-sq-disabled-gray',
|
|
15419
|
+
'tw:dark:border-gray-500',
|
|
15405
15420
|
].join(' ');
|
|
15406
|
-
const disabledClasses$2 = ['tw
|
|
15421
|
+
const disabledClasses$2 = ['tw:opacity-50', 'tw:cursor-not-allowed'].join(' ');
|
|
15407
15422
|
const ButtonWithPopover = ({ children, trigger, id, hasArrow, extraTriggerClassNames, extraPopoverClassNames, containerTestId, onInteractOutside, onPointerDownOutside, isTriggerAsChild = false, shouldTriggerFullWidth = false, disabled = false, align = 'end', alignOffset = -35, placement = 'bottom', placementOffset = 2, isHoverEnabled = false, hoverOpenDelay = 300, onOpenChange, isOpen, isCloseOnContentClick = false, isPortal = false, ...tooltipProps }) => {
|
|
15408
15423
|
const tooltipData = getQTipData(tooltipProps);
|
|
15409
15424
|
const timeout = useRef(null);
|
|
@@ -15434,12 +15449,12 @@ const ButtonWithPopover = ({ children, trigger, id, hasArrow, extraTriggerClassN
|
|
|
15434
15449
|
};
|
|
15435
15450
|
React.useEffect(() => clearHoverTimeout, []);
|
|
15436
15451
|
const renderContent = () => {
|
|
15437
|
-
return (jsx$1(Content2$3, { sideOffset: placementOffset, align: align, side: placement, onInteractOutside: onInteractOutside, onPointerDownOutside: onPointerDownOutside, alignOffset: isHoverEnabled ? -10 : alignOffset, asChild: true, onClick: () => isCloseOnContentClick && onOpenChange && onOpenChange(false), className: "focus-visible:tw
|
|
15438
|
-
data-[side=top]:
|
|
15439
|
-
${extraPopoverClassNames || ''}`, children: [hasArrow && (jsx$1(Arrow2$2, { asChild: true, children: jsx$1("div", { className: "tw
|
|
15452
|
+
return (jsx$1(Content2$3, { sideOffset: placementOffset, align: align, side: placement, onInteractOutside: onInteractOutside, onPointerDownOutside: onPointerDownOutside, alignOffset: isHoverEnabled ? -10 : alignOffset, asChild: true, onClick: () => isCloseOnContentClick && onOpenChange && onOpenChange(false), className: "focus-visible:tw:outline-none tw:outline-none tw:w-full tw:h-full", children: jsxs("div", { "data-testid": containerTestId, className: `${bgStyles$2} ${borderStyles$2} tw:relative tw:z-[1200] tw:min-w-6 tw:focus-visible:outline-none tw:outline-none data-[state=open]:tw:animate-in data-[state=closed]:tw:animate-out
|
|
15453
|
+
tw:data-[side=top]:animate-slideDownAndFade data-[side=right]:tw:animate-slideLeftAndFade tw:data-[side=bottom]:animate-slideUpAndFade tw:data-[side=left]:animate-slideRightAndFade tw:text-sq-text-color
|
|
15454
|
+
${extraPopoverClassNames || ''}`, children: [hasArrow && (jsx$1(Arrow2$2, { asChild: true, children: jsx$1("div", { className: "tw:fill-transparent tw:bg-sq-white tw:w-[15px] tw:h-[15px] tw:mt-[-7px] tw:rotate-45 tw:dark:bg-sq-dark-background tw:border-b tw:border-r tw:border-sq-disabled-gray tw:dark:border-gray-500" }) })), children] }) }));
|
|
15440
15455
|
};
|
|
15441
15456
|
const renderPopover = (popoverOpenState) => {
|
|
15442
|
-
return (jsxs(Root2$3, { open: popoverOpenState, defaultOpen: false, onOpenChange: onOpenChange, children: [trigger ? (jsx$1(Trigger$3, { id: id, asChild: isTriggerAsChild, className: `focus-visible:
|
|
15457
|
+
return (jsxs(Root2$3, { open: popoverOpenState, defaultOpen: false, onOpenChange: onOpenChange, children: [trigger ? (jsx$1(Trigger$3, { id: id, asChild: isTriggerAsChild, className: `tw:focus-visible:outline-none tw:outline-none tw:bg-transparent ${shouldTriggerFullWidth ? 'tw:w-full tw:h-full' : ''}`, disabled: disabled, children: jsx$1("div", { ...tooltipData, onMouseOver: onHoverStart, onMouseOut: onHoverEnd, className: `tw:focus-visible:outline-none tw:outline-none tw:dark:text-sq-white ${disabled ? disabledClasses$2 : ''} ${shouldTriggerFullWidth ? 'tw:flex tw:flex-col tw:items-center tw:justify-center' : 'tw:inline'} ${extraTriggerClassNames || ''}`, children: trigger }) })) : (jsx$1(Trigger$3, { asChild: true, children: jsx$1("div", {}) })), isPortal ? jsx$1(Portal$2, { children: renderContent() }) : renderContent()] }));
|
|
15443
15458
|
};
|
|
15444
15459
|
return isHoverEnabled ? renderPopover(isHoveredOpen) : renderPopover(isOpen);
|
|
15445
15460
|
};
|
|
@@ -16504,65 +16519,65 @@ var SubTrigger2 = DropdownMenuSubTrigger;
|
|
|
16504
16519
|
var SubContent2 = DropdownMenuSubContent;
|
|
16505
16520
|
|
|
16506
16521
|
const borderStyles$1 = [
|
|
16507
|
-
'tw
|
|
16508
|
-
'tw
|
|
16509
|
-
'tw
|
|
16510
|
-
'tw
|
|
16511
|
-
'dark:
|
|
16522
|
+
'tw:border-solid',
|
|
16523
|
+
'tw:border',
|
|
16524
|
+
'tw:rounded-popover',
|
|
16525
|
+
'tw:border-sq-disabled-gray',
|
|
16526
|
+
'tw:dark:border-gray-500',
|
|
16512
16527
|
].join(' ');
|
|
16513
|
-
const bgStyles$1 = ['tw
|
|
16514
|
-
const disabledClasses$1 = ['tw
|
|
16528
|
+
const bgStyles$1 = ['tw:bg-sq-white', 'tw:dark:bg-sq-dark-background'].join(' ');
|
|
16529
|
+
const disabledClasses$1 = ['tw:opacity-50', 'tw:cursor-not-allowed'].join(' ');
|
|
16515
16530
|
const ButtonWithDropdown = ({ dropdownItems, triggerIcon, id, extraClassNames = '', contentExtraClassNames = '', containerTestId, disabled = false, align = 'end', placement = 'bottom', placementOffset = 5, alignOffset = -35, hasArrow = false, onOpenChange, isOpen, setFocusOnTriggerOnClose = true, keepFocusInsideDropdown = true, onContainerClick, ...tooltipProps }) => {
|
|
16516
16531
|
const tooltipData = getQTipData(tooltipProps);
|
|
16517
|
-
return (jsxs(Root2, { defaultOpen: false, open: isOpen, onOpenChange: onOpenChange, modal: keepFocusInsideDropdown, children: [jsx$1(Trigger, { id: id, className: `tw-border-none focus-visible:
|
|
16532
|
+
return (jsxs(Root2, { defaultOpen: false, open: isOpen, onOpenChange: onOpenChange, modal: keepFocusInsideDropdown, children: [jsx$1(Trigger, { id: id, className: `tw:bg-transparent tw:border-none tw:focus-visible:outline-none tw:focus:outline-none tw:focus-within:outline-none`, disabled: disabled, children: jsx$1("div", { ...tooltipData, className: `tw:bg-transparent tw:flex tw:flex-col tw:items-center tw:focus-visible:outline-none tw:focus:outline-none tw:focus-within:outline-none ${disabled ? disabledClasses$1 : ''} ${extraClassNames}`, children: triggerIcon }) }), jsx$1(Portal2, { children: jsx$1(Content2, { onClick: onContainerClick, sideOffset: placementOffset, side: placement, align: align, alignOffset: alignOffset, asChild: true, onCloseAutoFocus: (e) => !setFocusOnTriggerOnClose && e.preventDefault(), className: "tw:focus-visible:outline-none tw:outline-none", children: jsxs("div", { "data-testid": containerTestId, className: `${bgStyles$1} tw:relative tw:z-[1200] tw:min-w-6 tw:py-2 tw:focus-visible:outline-none tw:outline-none tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out forceFont tw:data-[side=top]:animate-slideDownAndFade tw:data-[side=right]:animate-slideLeftAndFade tw:data-[side=bottom]:animate-slideUpAndFade tw:data-[side=left]:animate-slideRightAndFade ${borderStyles$1} ${contentExtraClassNames}`, children: [hasArrow && (jsx$1(Arrow2, { asChild: true, children: jsx$1("div", { className: "tw:fill-transparent tw:bg-sq-white tw:w-[15px] tw:h-[15px] tw:rotate-45 tw:dark:bg-sq-dark-background tw:border-b tw:border-r tw:border-sq-disabled-gray tw:dark:border-gray-500 tw:mt-[-7px]" }) })), dropdownItems.map((item, index) => {
|
|
16518
16533
|
const tooltipData = getQTipData(item);
|
|
16519
16534
|
if (item.isLabel) {
|
|
16520
|
-
return (jsxs(Label2, { className: item.itemExtraClassNames, ...tooltipData, children: [item.icon && (jsx$1(Icon, { icon: item.icon, testId: item.iconTestId, type: "text", color: item.iconColor, extraClassNames: "tw
|
|
16535
|
+
return (jsxs(Label2, { className: item.itemExtraClassNames, ...tooltipData, children: [item.icon && (jsx$1(Icon, { icon: item.icon, testId: item.iconTestId, type: "text", color: item.iconColor, extraClassNames: "tw:text-sq-text-color tw:dark:text-sq-white tw:w-[18px]" })), jsx$1("div", { "data-testid": item.labelTestId, className: `tw:text-[0.8125rem] tw:ml-1 ${item.disabled ? 'tw:text-sq-disabled-gray' : 'tw:text-sq-text-color tw:dark:text-sq-white'} tw:not-italic tw:font-normal ${item.labelClasses}`, children: item.label })] }, (item.id || '') + index));
|
|
16521
16536
|
}
|
|
16522
16537
|
if (Array.isArray(item.subMenuItems) && item.subMenuItems.length > 0) {
|
|
16523
|
-
return (jsxs(Sub2, { children: [jsxs(SubTrigger2, { id: id, className: `tw
|
|
16524
|
-
? '!tw
|
|
16525
|
-
: 'tw
|
|
16526
|
-
return (jsxs(Item2, { onSelect: subItem.onClick, "data-qtip-text": subItem.tooltip, className: "tw
|
|
16527
|
-
? 'tw
|
|
16528
|
-
: 'tw
|
|
16538
|
+
return (jsxs(Sub2, { children: [jsxs(SubTrigger2, { id: id, className: `tw:cursor-pointer tw:flex tw:justify-between tw:dark:text-sq-white tw:hover:bg-sq-gray-highlight tw:dark:hover:bg-sq-gray-highlight-dark tw:leading-none tw:items-center tw:h-[27px] tw:pl-[19px] tw:relative tw:select-none tw:outline-none tw:data-disabled:pointer-events-none ${item.itemExtraClassNames || ''}`, "data-testid": item.testId, disabled: item.disabled, ...tooltipData, children: [jsxs("div", { className: "tw:flex", children: [item.icon && (jsx$1(Icon, { icon: item.icon, extraClassNames: `tw:w-[18px] ${item.disabled
|
|
16539
|
+
? '!tw:text-sq-disabled-gray'
|
|
16540
|
+
: 'tw:text-sq-text-color tw:dark:text-sq-white'} ${item.iconExtraClassNames || ''}` })), jsx$1("div", { "data-testid": item.labelTestId, "data-customid": item.labelCustomId, className: `tw:text-[0.8125rem] tw:ml-1 ${item.disabled && '!tw:opacity-30'} tw:not-italic tw:font-semibold ${item.labelClasses}`, children: item.label })] }), jsx$1(Icon, { size: "sm", icon: "fc-arrow-dropdown tw:rotate-270", extraClassNames: `${item.disabled ? 'tw:text-sq-disabled-gray' : 'tw:text-sq-text-color tw:dark:text-sq-white'} tw:w-[18px] tw:ml-4 tw:text-[0.5rem] tw:justify-center tw:flex` })] }), jsx$1(Portal2, { children: jsx$1(SubContent2, { className: "tw:focus-visible:outline-none tw:outline-none", children: jsx$1("div", { "data-testid": containerTestId, className: `${bgStyles$1} tw:relative tw:z-[1000] tw:min-w-6 tw:py-2 tw:focus-visible:outline-none tw:outline-none tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out forceFont tw:data-[side=top]:animate-slideDownAndFade tw:data-[side=right]:animate-slideLeftAndFade tw:data-[side=bottom]:animate-slideUpAndFade tw:data-[side=left]:animate-slideRightAndFade ${borderStyles$1}`, children: item.subMenuItems.map((subItem, subIndex) => {
|
|
16541
|
+
return (jsxs(Item2, { onSelect: subItem.onClick, "data-qtip-text": subItem.tooltip, className: "tw:cursor-pointer tw:flex tw:dark:text-sq-white tw:hover:bg-sq-gray-highlight tw:dark:hover:bg-sq-gray-highlight-dark tw:leading-none tw:items-center tw:h-[27px] tw:px-[19px] tw:relative tw:select-none tw:outline-none tw:data-disabled:pointer-events-none", disabled: subItem.disabled, children: [subItem.iconClass && (jsx$1(Icon, { icon: subItem.iconClass, type: "text", extraClassNames: `tw:w-[18px] ${item.disabled && '!tw:opacity-30'}` })), jsx$1("div", { className: `tw:text-[0.8125rem] tw:ml-1 ${subItem.disabled
|
|
16542
|
+
? 'tw:text-sq-disabled-gray'
|
|
16543
|
+
: 'tw:text-sq-text-color tw:dark:text-sq-white'} tw:not-italic tw:font-normal ${item.labelClasses}`, children: subItem.label })] }, subItem.label + subIndex));
|
|
16529
16544
|
}) }) }) })] }, (item.id || item.icon || '') + index));
|
|
16530
16545
|
}
|
|
16531
16546
|
return (jsxs("div", { ...tooltipData, children: [jsxs(Item2, { "data-customid": item.itemCustomId, onSelect: (e) => {
|
|
16532
16547
|
item.onClick(e);
|
|
16533
|
-
}, className: `tw
|
|
16548
|
+
}, className: `tw:cursor-pointer tw:flex tw:dark:text-sq-white tw:hover:bg-sq-gray-highlight tw:dark:hover:bg-sq-gray-highlight-dark tw:leading-none tw:items-center tw:min-h-[27px] tw:px-[19px] tw:relative tw:select-none tw:outline-none tw:data-disabled:pointer-events-none ${item.itemExtraClassNames || ''}`, "data-testid": item.testId, disabled: item.disabled, children: [item.icon && (jsx$1(Icon, { icon: item.icon, testId: item.iconTestId, type: (item.iconType || 'text'), color: item.iconColor, customId: item.iconCustomId, extraClassNames: `tw:w-[18px] ${item.disabled && '!tw:opacity-30'} ${item.iconExtraClassNames || ''}` })), jsx$1("div", { "data-testid": item.labelTestId, "data-customid": item.labelCustomId, className: `tw:text-[0.8125rem] tw:ml-1 ${item.disabled ? 'tw:text-sq-disabled-gray' : 'tw:text-sq-text-color tw:dark:text-sq-white'} tw:not-italic tw:font-normal ${item.labelClasses || ''}`, children: item.label })] }, (item.id || item.icon || '') + index), item.hasDivider && (jsx$1(Separator2, { "data-testid": `dropdown-divider-${index}`, className: "tw:h-px tw:bg-sq-disabled-gray tw:dark:bg-gray-500 tw:my-2" }))] }, (item.id || '') + index));
|
|
16534
16549
|
})] }) }) })] }));
|
|
16535
16550
|
};
|
|
16536
16551
|
|
|
16537
|
-
const baseClasses$2 = 'tw
|
|
16538
|
-
' tw
|
|
16539
|
-
const darkTheme$1 = 'dark:
|
|
16540
|
-
const lightTheme$1 = 'tw
|
|
16541
|
-
const errorClasses$1 = 'tw
|
|
16542
|
-
const borderColorClasses$1 = 'tw
|
|
16552
|
+
const baseClasses$2 = 'tw:mx-auto tw:p-4 tw:leading-normal tw:outline-none tw:py-2 tw:px-3 tw:rounded-[10px] tw:w-full tw:relative' +
|
|
16553
|
+
' tw:border-solid tw:border tw:text-sm tw:flex tw:flex-col tw:justify-center tw:items-center';
|
|
16554
|
+
const darkTheme$1 = 'tw:dark:bg-sq-theme-hover-dark tw:dark:text-sq-text-color-dark';
|
|
16555
|
+
const lightTheme$1 = 'tw:text-sq-text-color tw:bg-sq-theme-highlight';
|
|
16556
|
+
const errorClasses$1 = 'tw:border-sq-danger';
|
|
16557
|
+
const borderColorClasses$1 = 'tw:border-sq-theme-dark';
|
|
16543
16558
|
/**
|
|
16544
16559
|
* Alert.
|
|
16545
16560
|
*/
|
|
16546
16561
|
const Alert = ({ children, dismissible = true, onClose, show = true, variant, testId = 'alert-id', id, extraClassNames, ...tooltipProps }) => {
|
|
16547
16562
|
const appliedTheme = {
|
|
16548
16563
|
theme: `${lightTheme$1} ${darkTheme$1}`,
|
|
16549
|
-
formulaError: 'tw
|
|
16550
|
-
danger: 'tw
|
|
16551
|
-
warning: 'tw
|
|
16552
|
-
gray: 'tw
|
|
16564
|
+
formulaError: 'tw:text-red-800 tw:bg-red-200 !tw:rounded-[4px]',
|
|
16565
|
+
danger: 'tw:text-sq-text-color tw:bg-sq-danger',
|
|
16566
|
+
warning: 'tw:bg-sq-bg-warning tw:text-sq-text-color',
|
|
16567
|
+
gray: 'tw:bg-sq-hover-gray tw:text-sq-text-color tw:dark:bg-sq-tools-background-dark tw:dark:text-sq-text-color-dark',
|
|
16553
16568
|
};
|
|
16554
16569
|
const appliedBorderTheme = {
|
|
16555
16570
|
theme: borderColorClasses$1,
|
|
16556
16571
|
danger: errorClasses$1,
|
|
16557
|
-
warning: 'tw
|
|
16558
|
-
gray: 'tw
|
|
16559
|
-
formulaError: 'tw
|
|
16572
|
+
warning: 'tw:border-none',
|
|
16573
|
+
gray: 'tw:border-sq-darkish-gray',
|
|
16574
|
+
formulaError: 'tw:border-red-100',
|
|
16560
16575
|
};
|
|
16561
16576
|
const appliedClasses = `${baseClasses$2} ${appliedTheme[variant]} ${extraClassNames} ${appliedBorderTheme[variant]}`;
|
|
16562
16577
|
if (!show) {
|
|
16563
16578
|
return jsx$1("div", {});
|
|
16564
16579
|
}
|
|
16565
|
-
return (jsxs("div", { "data-testid": testId, id: id, className: appliedClasses, children: [children, dismissible && (jsx$1(Icon, { icon: "fc-delete", type: variant.match(/danger|warning|formulaError/) ? 'color' : 'theme', color: variant.match(/danger|warning|formulaError/) ? 'inherit' : undefined, extraClassNames: `tw
|
|
16580
|
+
return (jsxs("div", { "data-testid": testId, id: id, className: appliedClasses, children: [children, dismissible && (jsx$1(Icon, { icon: "fc-delete", type: variant.match(/danger|warning|formulaError/) ? 'color' : 'theme', color: variant.match(/danger|warning|formulaError/) ? 'inherit' : undefined, extraClassNames: `tw:self-end tw:text-[0.6875rem] tw:cursor-pointer tw:absolute tw:right-[10px] tw:top-[10px] ${variant.match(/danger|warning|gray|formulaError/) ? 'tw:text-sq-text-color tw:dark:text-sq-dark-text' : ''}`, testId: `${testId}-close-btn`, onClick: onClose, ...tooltipProps }))] }));
|
|
16566
16581
|
};
|
|
16567
16582
|
|
|
16568
16583
|
/**
|
|
@@ -16581,47 +16596,40 @@ const Alert = ({ children, dismissible = true, onClose, show = true, variant, te
|
|
|
16581
16596
|
* @param tooltipProps - props to pass to the tooltip
|
|
16582
16597
|
*/
|
|
16583
16598
|
const SvgIcon = ({ onClick, icon, color, type = 'default', extraClassNames, viewBox = '0 0 19 19', id, testId, customId, ...tooltipProps }) => {
|
|
16584
|
-
const appliedClassNames = `${onClick ? 'tw
|
|
16585
|
-
tw
|
|
16599
|
+
const appliedClassNames = `${onClick ? 'tw:cursor-pointer' : ''} ${extraClassNames} focus:tw:outline-none focus-visible:tw:outline-none
|
|
16600
|
+
tw:outline-none`;
|
|
16586
16601
|
const tooltipData = getQTipData(tooltipProps);
|
|
16587
16602
|
const appliedType = type === 'default' ? 'currentColor' : 'rgb(var(--sq-icon))';
|
|
16588
|
-
return (jsx$1("div", { onClick: onClick, ...tooltipData, className: `svgContainer ${appliedClassNames}`, children: jsx$1("svg", { xmlns: "http://www.w3.org/2000/svg", className: `tw
|
|
16603
|
+
return (jsx$1("div", { onClick: onClick, ...tooltipData, className: `svgContainer ${appliedClassNames}`, children: jsx$1("svg", { xmlns: "http://www.w3.org/2000/svg", className: `tw:sq-icon tw:dark:text-sq-white`, viewBox: viewBox, fill: color ? color : appliedType, "data-testid": testId, children: jsx$1("path", { d: getSvgIconPath(icon) }) }) }));
|
|
16589
16604
|
};
|
|
16590
16605
|
|
|
16591
16606
|
const SeeqActionDropdownItem = (item) => {
|
|
16592
16607
|
let renderIcon = jsx$1(Fragment, {});
|
|
16593
16608
|
if (item.icon) {
|
|
16594
|
-
renderIcon = isSvgIcon(item.icon) ? (jsx$1(SvgIcon, { icon: item.icon, extraClassNames: 'tw-
|
|
16595
|
-
' dark:tw-text-sq-white tw-text-[22px] tw-text-sq-white ' +
|
|
16596
|
-
item.iconExtraClassNames, ...item })) : (jsx$1(Icon, { icon: item.icon, type: "text", extraClassNames: 'tw-rounded-[3px] tw-h-8 tw-w-8 tw-flex tw-justify-center tw-items-center tw-bg-sq-color-dark dark:tw-text-sq-white tw-text-[1.375rem] tw-text-sq-white ' +
|
|
16597
|
-
item.iconExtraClassNames }));
|
|
16609
|
+
renderIcon = isSvgIcon(item.icon) ? (jsx$1(SvgIcon, { icon: item.icon, extraClassNames: 'tw:p-1 tw:h-8 tw:w-8 tw:dark:text-sq-white tw:!text-[1.375rem] tw:text-sq-white ' + item.iconExtraClassNames, ...item })) : (jsx$1(Icon, { icon: item.icon, type: "text", extraClassNames: 'tw:dark:text-sq-white tw:!text-[1.375rem] tw:text-sq-white ' + item.iconExtraClassNames }));
|
|
16598
16610
|
}
|
|
16599
|
-
return (jsxs("div", { className: "tw
|
|
16611
|
+
return (jsxs("div", { className: "tw:flex-col tw:flex tw:p-[10px] tw:pl-5 tw:w-[600px]", children: [jsxs("div", { className: "tw:flex tw:flex-row tw:gap-2 tw:items-end", children: [jsx$1("div", { className: "tw:rounded-[3px] tw:h-8 tw:w-8 tw:bg-sq-theme-dark tw:flex tw:justify-center tw:items-center ", children: renderIcon }), jsx$1("h4", { className: "tw:text-base tw:font-[600] tw:leading-[20px] mb-0", children: item.display })] }), jsx$1("div", { className: "tw:text-[0.8125rem] tw:font-normal", children: item.text })] }));
|
|
16600
16612
|
};
|
|
16601
16613
|
const ViewWorkbench = (item) => {
|
|
16602
16614
|
let renderIcon = jsx$1(Fragment, {});
|
|
16603
16615
|
if (item.icon) {
|
|
16604
|
-
renderIcon = isSvgIcon(item.icon) ? (jsx$1(SvgIcon, { icon: item.icon, extraClassNames: 'tw-
|
|
16605
|
-
' tw-text-sq-text-color ' +
|
|
16606
|
-
item.iconExtraClassNames, type: "default", ...item })) : (jsx$1(Icon, { icon: item.icon, type: "text", extraClassNames: 'tw-flex tw-justify-center tw-items-center tw-text-[1.25rem] dark:tw-text-sq-white' +
|
|
16607
|
-
' tw-text-sq-text-color ' +
|
|
16608
|
-
item.iconExtraClassNames }));
|
|
16616
|
+
renderIcon = isSvgIcon(item.icon) ? (jsx$1(SvgIcon, { icon: item.icon, extraClassNames: 'tw:w-4 tw:text-[1.25rem] tw:dark:text-sq-white' + ' tw:text-sq-text-color ' + item.iconExtraClassNames, type: "default", ...item })) : (jsx$1(Icon, { icon: item.icon, type: "text", extraClassNames: 'tw:text-[1.25rem] tw:dark:text-sq-white tw:text-sq-text-color ' + item.iconExtraClassNames }));
|
|
16609
16617
|
}
|
|
16610
|
-
return (jsx$1("div", { className: "tw
|
|
16618
|
+
return (jsx$1("div", { className: "tw:flex-col tw:flex tw:p-[10px]", children: jsxs("div", { className: "tw:flex tw:flex-row tw:gap-2 tw:items-end", children: [jsx$1("div", { className: "tw:rounded-[3px] tw:h-5 tw:w-5 tw:flex tw:justify-center tw:items-center ", children: renderIcon }), jsx$1("div", { className: "tw:text-[0.8125rem]", children: item.display })] }) }));
|
|
16611
16619
|
};
|
|
16612
16620
|
const InsertSeeqContent = (item) => {
|
|
16613
|
-
return (jsxs("div", { className: "tw
|
|
16621
|
+
return (jsxs("div", { className: "tw:flex-col tw:flex tw:justify-start tw:p-[10px] tw:font-normal tw:text-left tw:text-sq-text-color tw:dark:text-sq-dark-text", children: [jsx$1("h5", { className: "tw:text-[1rem] tw:font-medium tw:text-sq-theme-dark tw:leading-[18px]", children: item.display }), jsx$1("div", { className: "tw:text-[0.8125rem] tw:text-sq-text-color tw:dark:text-sq-dark-text !tw:mt-1", children: item.text })] }));
|
|
16614
16622
|
};
|
|
16615
16623
|
|
|
16616
16624
|
const borderStyles = [
|
|
16617
|
-
'tw
|
|
16618
|
-
'tw
|
|
16619
|
-
'tw
|
|
16620
|
-
'tw
|
|
16621
|
-
'dark:
|
|
16625
|
+
'tw:border-solid',
|
|
16626
|
+
'tw:border',
|
|
16627
|
+
'tw:rounded-md',
|
|
16628
|
+
'tw:border-sq-disabled-gray',
|
|
16629
|
+
'tw:dark:border-gray-500',
|
|
16622
16630
|
].join(' ');
|
|
16623
|
-
const bgStyles = ['tw
|
|
16624
|
-
const disabledClasses = ['tw
|
|
16631
|
+
const bgStyles = ['tw:bg-sq-white', 'tw:dark:bg-sq-dark-background'].join(' ');
|
|
16632
|
+
const disabledClasses = ['tw:opacity-50', 'tw:cursor-not-allowed'].join(' ');
|
|
16625
16633
|
const renderItem = (variant, item) => {
|
|
16626
16634
|
switch (variant) {
|
|
16627
16635
|
case 'create-workbench':
|
|
@@ -16636,31 +16644,31 @@ const renderItem = (variant, item) => {
|
|
|
16636
16644
|
};
|
|
16637
16645
|
const SeeqActionDropdown = ({ seeqActionDropdownItems, trigger, id, extraClassNames, containerTestId, disabled = false, align = 'end', placement = 'bottom', placementOffset = 5, alignOffset = -35, hasArrow = false, onOpenChange, isOpen, setFocusOnTriggerOnClose = true, keepFocusInsideDropdown = true, variant, ...tooltipProps }) => {
|
|
16638
16646
|
const tooltipData = getQTipData(tooltipProps);
|
|
16639
|
-
return (jsxs(Root2, { defaultOpen: false, open: isOpen, onOpenChange: onOpenChange, modal: keepFocusInsideDropdown, children: [jsx$1(Trigger, { id: id, "data-testid": id, className: `tw
|
|
16640
|
-
' tw
|
|
16641
|
-
' data-[state=open]:
|
|
16642
|
-
' forceFont data-[side=top]:
|
|
16643
|
-
borderStyles, children: [hasArrow && (jsx$1(Arrow2, { asChild: true, children: jsx$1("div", { className: " tw
|
|
16647
|
+
return (jsxs(Root2, { defaultOpen: false, open: isOpen, onOpenChange: onOpenChange, modal: keepFocusInsideDropdown, children: [jsx$1(Trigger, { id: id, "data-testid": id, className: `tw:border-none tw:focus-visible:outline-none tw:focus:outline-none tw:focus-within:outline-none`, asChild: true, disabled: disabled, children: jsx$1("div", { ...tooltipData, className: `tw:bg-transparent tw:flex tw:flex-col tw:items-center tw:focus-visible:outline-none tw:focus:outline-none tw:focus-within:outline-none ${disabled ? disabledClasses : ''} ${extraClassNames || ''}`, children: trigger }) }), jsx$1(Content2, { sideOffset: placementOffset, side: placement, align: align, alignOffset: alignOffset, asChild: true, onCloseAutoFocus: (e) => !setFocusOnTriggerOnClose && e.preventDefault(), className: "tw:focus-visible:outline-none tw:outline-none", children: jsxs("div", { "data-testid": containerTestId, className: bgStyles +
|
|
16648
|
+
' tw:relative tw:z-[1200] tw:min-w-6 tw:py-2 tw:focus-visible:outline-none tw:outline-none' +
|
|
16649
|
+
' tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out' +
|
|
16650
|
+
' forceFont tw:data-[side=top]:animate-slideDownAndFade tw:data-[side=right]:animate-slideLeftAndFade tw:data-[side=bottom]:animate-slideUpAndFade tw:data-[side=left]:animate-slideRightAndFade ' +
|
|
16651
|
+
borderStyles, children: [hasArrow && (jsx$1(Arrow2, { asChild: true, children: jsx$1("div", { className: " tw:fill-transparent tw:bg-sq-white tw:w-[15px] tw:h-[15px] tw:rotate-45 tw:dark:bg-sq-dark-background tw:border-b tw:border-r tw:border-sq-disabled-gray tw:dark:border-gray-500 tw:mt-[-7px]" }) })), seeqActionDropdownItems.map((item, index) => {
|
|
16644
16652
|
return (jsxs("div", { children: [jsx$1(Item2, { onSelect: (e) => {
|
|
16645
16653
|
item.action(e);
|
|
16646
|
-
}, className: `tw
|
|
16654
|
+
}, className: `tw:cursor-pointer tw:flex tw:dark:text-sq-white tw:hover:bg-sq-gray-highlight tw:dark:hover:bg-sq-gray-highlight-dark tw:relative tw:select-none tw:outline-none tw:data-[disabled]:text-sq-disabled-gray tw:data-[disabled]:pointer-events-none`, "data-testid": item.testId, disabled: !item.enabled, children: renderItem(variant, item) }), item.divider && (jsx$1(Separator2, { "data-testid": `dropdown-divider-${index}`, className: "tw:h-px tw:bg-sq-disabled-gray tw:dark:bg-gray-500 tw:my-2" }))] }, item.display + index));
|
|
16647
16655
|
})] }) })] }));
|
|
16648
16656
|
};
|
|
16649
16657
|
|
|
16650
|
-
const baseClasses$1 = 'tw
|
|
16651
|
-
const errorClasses = 'tw
|
|
16658
|
+
const baseClasses$1 = 'tw:flex tw:outline-none tw:rounded-md tw:w-full tw:relative tw:flex-wrap';
|
|
16659
|
+
const errorClasses = 'tw:border-sq-danger';
|
|
16652
16660
|
const borderColorClasses = [
|
|
16653
|
-
'tw
|
|
16654
|
-
'dark:
|
|
16655
|
-
'dark:focus:
|
|
16656
|
-
'dark:active:
|
|
16657
|
-
'focus:
|
|
16658
|
-
'active:
|
|
16661
|
+
'tw:border-sq-disabled-gray',
|
|
16662
|
+
'tw:dark:border-sq-dark-disabled-gray',
|
|
16663
|
+
'tw:dark:focus:border-sq-theme-darker',
|
|
16664
|
+
'tw:dark:active:border-sq-theme-darker',
|
|
16665
|
+
'tw:focus:border-sq-theme-dark',
|
|
16666
|
+
'tw:active:border-sq-theme-dark',
|
|
16659
16667
|
].join(' ');
|
|
16660
|
-
const fieldBorderRadius = 'tw
|
|
16661
|
-
const fieldClasses = 'tw
|
|
16662
|
-
const darkTheme = 'dark:
|
|
16663
|
-
const lightTheme = 'tw
|
|
16668
|
+
const fieldBorderRadius = 'tw:rounded-l-md tw:rounded-r-none';
|
|
16669
|
+
const fieldClasses = 'tw:leading-normal tw:outline-none tw:py-1 tw:px-3' + 'tw:p-1 tw:border-solid tw:border';
|
|
16670
|
+
const darkTheme = 'tw:dark:bg-sq-dark-background tw:dark:text-sq-dark-text tw:disabled:dark:text-sq-disabled-gray';
|
|
16671
|
+
const lightTheme = 'tw:text-sq-text-color tw:disabled:text-sq-darkish-gray';
|
|
16664
16672
|
/**
|
|
16665
16673
|
* InputGroup.
|
|
16666
16674
|
*/
|
|
@@ -16670,8 +16678,10 @@ const InputGroup = React__default.forwardRef((props, ref) => {
|
|
|
16670
16678
|
const appliedClasses = `${baseClasses$1} ${extraClassNames}`;
|
|
16671
16679
|
const fieldAppliedClasses = `${fieldClasses} ${extraClassNames} ${lightTheme} ${darkTheme} ${fieldBorderRadius} ${showError ? errorClasses : borderColorClasses} `;
|
|
16672
16680
|
const elementsToAppend = append.filter(Boolean);
|
|
16673
|
-
return (jsxs("div", { id: `input-group-${id}`, className: appliedClasses, children: [field ? (jsx$1("div", { "data-testid": testId, className: `tw
|
|
16674
|
-
return item?.variant === 'button' ? (jsx$1(Button, { extraClassNames: `$
|
|
16681
|
+
return (jsxs("div", { id: `input-group-${id}`, className: appliedClasses, children: [field ? (jsx$1("div", { "data-testid": testId, className: `tw:flex tw:flex-1 tw:cursor-pointer tw:active:z-50 ${fieldAppliedClasses}`, children: field })) : (jsx$1(TextField, { testId: testId, readonly: readonly, onChange: onChange, onKeyUp: onKeyUp, onFocus: onFocus, onBlur: onBlur, onKeyDown: onKeyDown, name: name, ref: ref, showError: showError, value: value, required: required, placeholder: placeholder, autoComplete: autoComplete, autoFocus: autoFocus, id: id, type: type, disabled: disabled, step: step, min: min, max: max, maxLength: maxLength, minLength: minLength, extraClassNames: `tw:flex tw:flex-1 tw:w-full tw:focus:z-30 tw:rounded-r-none tw:last:rounded-r-md ${extraClassNames}`, ...tooltipData })), elementsToAppend.map((item, index) => {
|
|
16682
|
+
return item?.variant === 'button' ? (jsx$1(Button, { extraClassNames: `$
|
|
16683
|
+
index ? 'tw:-ml-px' : 'tw:ml-0'
|
|
16684
|
+
} tw:focus:z-40 tw:focus:border tw:rounded-none tw:last:rounded-r-md`, ...item.buttonProps }, index)) : (jsx$1("div", { className: `${borderColorClasses} ${index ? 'tw:-ml-px' : 'tw:ml-0'} tw:flex tw:items-center tw:justify-center tw:rounded-none tw:last:rounded-r-md tw:active:z-30 tw:active:border tw:border`, children: item?.element }, index));
|
|
16675
16685
|
})] }));
|
|
16676
16686
|
});
|
|
16677
16687
|
|
|
@@ -16720,22 +16730,23 @@ const clamp$1 = (min, max, v) => {
|
|
|
16720
16730
|
return v;
|
|
16721
16731
|
};
|
|
16722
16732
|
|
|
16733
|
+
function formatErrorMessage(message, errorCode) {
|
|
16734
|
+
return errorCode
|
|
16735
|
+
? `${message}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${errorCode}`
|
|
16736
|
+
: message;
|
|
16737
|
+
}
|
|
16738
|
+
|
|
16723
16739
|
let warning = () => { };
|
|
16724
16740
|
let invariant = () => { };
|
|
16725
16741
|
if (process.env.NODE_ENV !== "production") {
|
|
16726
|
-
const formatMessage = (message, errorCode) => {
|
|
16727
|
-
return errorCode
|
|
16728
|
-
? `${message}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${errorCode}`
|
|
16729
|
-
: message;
|
|
16730
|
-
};
|
|
16731
16742
|
warning = (check, message, errorCode) => {
|
|
16732
16743
|
if (!check && typeof console !== "undefined") {
|
|
16733
|
-
console.warn(
|
|
16744
|
+
console.warn(formatErrorMessage(message, errorCode));
|
|
16734
16745
|
}
|
|
16735
16746
|
};
|
|
16736
16747
|
invariant = (check, message, errorCode) => {
|
|
16737
16748
|
if (!check) {
|
|
16738
|
-
throw new Error(
|
|
16749
|
+
throw new Error(formatErrorMessage(message, errorCode));
|
|
16739
16750
|
}
|
|
16740
16751
|
};
|
|
16741
16752
|
}
|
|
@@ -16856,10 +16867,10 @@ function velocityPerSecond(velocity, frameDuration) {
|
|
|
16856
16867
|
}
|
|
16857
16868
|
|
|
16858
16869
|
const warned = new Set();
|
|
16859
|
-
function warnOnce(condition, message,
|
|
16870
|
+
function warnOnce(condition, message, errorCode) {
|
|
16860
16871
|
if (condition || warned.has(message))
|
|
16861
16872
|
return;
|
|
16862
|
-
console.warn(message);
|
|
16873
|
+
console.warn(formatErrorMessage(message, errorCode));
|
|
16863
16874
|
warned.add(message);
|
|
16864
16875
|
}
|
|
16865
16876
|
|
|
@@ -18464,6 +18475,10 @@ class JSAnimation extends WithPromise {
|
|
|
18464
18475
|
get duration() {
|
|
18465
18476
|
return millisecondsToSeconds(this.calculatedDuration);
|
|
18466
18477
|
}
|
|
18478
|
+
get iterationDuration() {
|
|
18479
|
+
const { delay = 0 } = this.options || {};
|
|
18480
|
+
return this.duration + millisecondsToSeconds(delay);
|
|
18481
|
+
}
|
|
18467
18482
|
get time() {
|
|
18468
18483
|
return millisecondsToSeconds(this.currentTime);
|
|
18469
18484
|
}
|
|
@@ -19066,6 +19081,10 @@ class NativeAnimation extends WithPromise {
|
|
|
19066
19081
|
const duration = this.animation.effect?.getComputedTiming?.().duration || 0;
|
|
19067
19082
|
return millisecondsToSeconds(Number(duration));
|
|
19068
19083
|
}
|
|
19084
|
+
get iterationDuration() {
|
|
19085
|
+
const { delay = 0 } = this.options || {};
|
|
19086
|
+
return this.duration + millisecondsToSeconds(delay);
|
|
19087
|
+
}
|
|
19069
19088
|
get time() {
|
|
19070
19089
|
return millisecondsToSeconds(Number(this.animation.currentTime) || 0);
|
|
19071
19090
|
}
|
|
@@ -19252,12 +19271,9 @@ function canAnimate(keyframes, name, type, velocity) {
|
|
|
19252
19271
|
((type === "spring" || isGenerator(type)) && velocity));
|
|
19253
19272
|
}
|
|
19254
19273
|
|
|
19255
|
-
|
|
19256
|
-
|
|
19257
|
-
|
|
19258
|
-
*/
|
|
19259
|
-
function isHTMLElement(element) {
|
|
19260
|
-
return isObject(element) && "offsetHeight" in element;
|
|
19274
|
+
function makeAnimationInstant(options) {
|
|
19275
|
+
options.duration = 0;
|
|
19276
|
+
options.type = "keyframes";
|
|
19261
19277
|
}
|
|
19262
19278
|
|
|
19263
19279
|
/**
|
|
@@ -19274,7 +19290,14 @@ const acceleratedValues = new Set([
|
|
|
19274
19290
|
const supportsWaapi = /*@__PURE__*/ memo(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
|
|
19275
19291
|
function supportsBrowserAnimation(options) {
|
|
19276
19292
|
const { motionValue, name, repeatDelay, repeatType, damping, type } = options;
|
|
19277
|
-
|
|
19293
|
+
const subject = motionValue?.owner?.current;
|
|
19294
|
+
/**
|
|
19295
|
+
* We use this check instead of isHTMLElement() because we explicitly
|
|
19296
|
+
* **don't** want elements in different timing contexts (i.e. popups)
|
|
19297
|
+
* to be accelerated, as it's not possible to sync these animations
|
|
19298
|
+
* properly with those driven from the main window frameloop.
|
|
19299
|
+
*/
|
|
19300
|
+
if (!(subject instanceof HTMLElement)) {
|
|
19278
19301
|
return false;
|
|
19279
19302
|
}
|
|
19280
19303
|
const { onUpdate, transformTemplate } = motionValue.owner.getProps();
|
|
@@ -19345,7 +19368,7 @@ class AsyncMotionValueAnimation extends WithPromise {
|
|
|
19345
19368
|
onUpdate?.(getFinalKeyframe$1(keyframes, options, finalKeyframe));
|
|
19346
19369
|
}
|
|
19347
19370
|
keyframes[0] = keyframes[keyframes.length - 1];
|
|
19348
|
-
options
|
|
19371
|
+
makeAnimationInstant(options);
|
|
19349
19372
|
options.repeat = 0;
|
|
19350
19373
|
}
|
|
19351
19374
|
/**
|
|
@@ -19412,6 +19435,9 @@ class AsyncMotionValueAnimation extends WithPromise {
|
|
|
19412
19435
|
get duration() {
|
|
19413
19436
|
return this.animation.duration;
|
|
19414
19437
|
}
|
|
19438
|
+
get iterationDuration() {
|
|
19439
|
+
return this.animation.iterationDuration;
|
|
19440
|
+
}
|
|
19415
19441
|
get time() {
|
|
19416
19442
|
return this.animation.time;
|
|
19417
19443
|
}
|
|
@@ -19848,6 +19874,14 @@ const getValueAsType = (value, type) => {
|
|
|
19848
19874
|
: value;
|
|
19849
19875
|
};
|
|
19850
19876
|
|
|
19877
|
+
/**
|
|
19878
|
+
* Checks if an element is an HTML element in a way
|
|
19879
|
+
* that works across iframes
|
|
19880
|
+
*/
|
|
19881
|
+
function isHTMLElement(element) {
|
|
19882
|
+
return isObject(element) && "offsetHeight" in element;
|
|
19883
|
+
}
|
|
19884
|
+
|
|
19851
19885
|
/**
|
|
19852
19886
|
* Maximum time between the value of two frames, beyond which we
|
|
19853
19887
|
* assume the velocity has since been 0.
|
|
@@ -19881,7 +19915,7 @@ class MotionValue {
|
|
|
19881
19915
|
* An object containing a SubscriptionManager for each active event.
|
|
19882
19916
|
*/
|
|
19883
19917
|
this.events = {};
|
|
19884
|
-
this.updateAndNotify = (v
|
|
19918
|
+
this.updateAndNotify = (v) => {
|
|
19885
19919
|
const currentTime = time.now();
|
|
19886
19920
|
/**
|
|
19887
19921
|
* If we're updating the value during another frame or eventloop
|
|
@@ -19902,10 +19936,6 @@ class MotionValue {
|
|
|
19902
19936
|
}
|
|
19903
19937
|
}
|
|
19904
19938
|
}
|
|
19905
|
-
// Update render subscribers
|
|
19906
|
-
if (render) {
|
|
19907
|
-
this.events.renderRequest?.notify(this.current);
|
|
19908
|
-
}
|
|
19909
19939
|
};
|
|
19910
19940
|
this.hasAnimated = false;
|
|
19911
19941
|
this.setCurrent(init);
|
|
@@ -20016,9 +20046,9 @@ class MotionValue {
|
|
|
20016
20046
|
*
|
|
20017
20047
|
* @public
|
|
20018
20048
|
*/
|
|
20019
|
-
set(v
|
|
20020
|
-
if (!
|
|
20021
|
-
this.updateAndNotify(v
|
|
20049
|
+
set(v) {
|
|
20050
|
+
if (!this.passiveEffect) {
|
|
20051
|
+
this.updateAndNotify(v);
|
|
20022
20052
|
}
|
|
20023
20053
|
else {
|
|
20024
20054
|
this.passiveEffect(v, this.updateAndNotify);
|
|
@@ -27381,7 +27411,7 @@ var Thumb = SliderThumb;
|
|
|
27381
27411
|
*/
|
|
27382
27412
|
const Slider = (props) => {
|
|
27383
27413
|
const { onValueChange, onPointerUp, id, value, name, disabled = false, rootExtraClassNames = '', trackExtraClassNames = '', rangeExtraClassNames = '', thumbExtraClassNames = '', step, min, max, } = props;
|
|
27384
|
-
return (jsxs(Root$1, { className: `tw
|
|
27414
|
+
return (jsxs(Root$1, { className: `tw:relative tw:flex tw:h-5 tw:w-full tw:touch-none tw:select-none tw:items-center ${rootExtraClassNames}`, defaultValue: [value], value: [value], onValueChange: (value) => onValueChange && onValueChange(value), onPointerUp: (e) => onPointerUp && onPointerUp(e), name: name, id: id, max: max, min: min, disabled: disabled, step: step, children: [jsx$1(Track, { className: `tw:relative tw:h-[5px] tw:grow tw:rounded-sm tw:bg-sq-dark-gray tw:dark:bg-sq-dark-disabled-gray ${trackExtraClassNames}`, children: jsx$1(Range, { className: `tw:absolute tw:h-full tw:rounded-full ${rangeExtraClassNames}` }) }), jsx$1(Thumb, { className: `tw:block tw:h-[15px] tw:w-[15px] tw:rounded-full tw:bg-sq-theme-dark active:tw:bg-sq-theme-darker tw:focus:outline-none tw:focus-visible:outline-none tw:aria-disabled:bg-sq-dark-gray tw:dark:aria-disabled:bg-sq-dark-disabled-gray tw:transition tw:ease-in-out ${thumbExtraClassNames}`, "aria-disabled": disabled })] }));
|
|
27385
27415
|
};
|
|
27386
27416
|
|
|
27387
27417
|
var PROGRESS_NAME = "Progress";
|
|
@@ -28650,7 +28680,7 @@ function validateWCAG2Parms(parms) {
|
|
|
28650
28680
|
};
|
|
28651
28681
|
}
|
|
28652
28682
|
|
|
28653
|
-
const baseLabelClasses = 'tw
|
|
28683
|
+
const baseLabelClasses = 'tw:left-1 tw:text-xs tw:text-sq-text-color tw:dark:text-sq-dark-text tw:items-center tw:h-[18px]';
|
|
28654
28684
|
const ProgressIndicator = (props) => {
|
|
28655
28685
|
const { value, color = undefined, testId, label, extraClasses = '', labelClasses = '', valuesLength, max, index, totalValue, ...tooltipProps } = props;
|
|
28656
28686
|
const tooltipData = getQTipData(tooltipProps);
|
|
@@ -28663,19 +28693,19 @@ const ProgressIndicator = (props) => {
|
|
|
28663
28693
|
if (totalValue >= max) {
|
|
28664
28694
|
// If progress is 100%, round both ends
|
|
28665
28695
|
if (index === 0 && valuesLength === 1) {
|
|
28666
|
-
roundedCorners = 'tw
|
|
28696
|
+
roundedCorners = 'tw:rounded-[15px]';
|
|
28667
28697
|
}
|
|
28668
28698
|
else if (index === 0) {
|
|
28669
|
-
roundedCorners = 'tw
|
|
28699
|
+
roundedCorners = 'tw:rounded-l-[15px]';
|
|
28670
28700
|
}
|
|
28671
28701
|
else if (index === valuesLength - 1) {
|
|
28672
|
-
roundedCorners = 'tw
|
|
28702
|
+
roundedCorners = 'tw:rounded-r-[15px]';
|
|
28673
28703
|
}
|
|
28674
28704
|
}
|
|
28675
28705
|
else {
|
|
28676
28706
|
// Otherwise, only round the leftmost indicator
|
|
28677
28707
|
if (index === 0) {
|
|
28678
|
-
roundedCorners = 'tw
|
|
28708
|
+
roundedCorners = 'tw:rounded-l-[15px]';
|
|
28679
28709
|
}
|
|
28680
28710
|
}
|
|
28681
28711
|
useEffect(() => {
|
|
@@ -28687,13 +28717,13 @@ const ProgressIndicator = (props) => {
|
|
|
28687
28717
|
return () => clearTimeout(timeout);
|
|
28688
28718
|
}, [value]);
|
|
28689
28719
|
const bgColor = color || undefined;
|
|
28690
|
-
const bgClass = color ? '' : 'tw
|
|
28720
|
+
const bgClass = color ? '' : 'tw:bg-sq-theme-dark';
|
|
28691
28721
|
const computeTextClass = (elem) => {
|
|
28692
28722
|
const computedStyle = getComputedStyle(elem);
|
|
28693
28723
|
const backgroundColor = computedStyle.backgroundColor;
|
|
28694
28724
|
const textColorClass = tinycolor(backgroundColor).isDark()
|
|
28695
|
-
? 'tw
|
|
28696
|
-
: 'tw
|
|
28725
|
+
? 'tw:text-sq-white tw:dark:text-sq-white'
|
|
28726
|
+
: 'tw:text-sq-text-color tw:dark:text-sq-text-color';
|
|
28697
28727
|
setTextColorClass(textColorClass);
|
|
28698
28728
|
};
|
|
28699
28729
|
useEffect(() => {
|
|
@@ -28701,35 +28731,35 @@ const ProgressIndicator = (props) => {
|
|
|
28701
28731
|
computeTextClass(indicatorElementRef.current);
|
|
28702
28732
|
}
|
|
28703
28733
|
}, [!!indicatorElementRef.current]);
|
|
28704
|
-
return (createElement(Indicator, { className: `tw
|
|
28734
|
+
return (createElement(Indicator, { className: `tw:ease-[cubic-bezier(0.65, 0, 0.35, 1)] tw:w-full tw:h-[18px] tw:duration-[660ms] tw:flex tw:justify-center tw:items-center ${valuesLength === 1 ? '' : 'tw:overflow-hidden'} ${roundedCorners} ${bgClass} ${extraClasses}`, ...tooltipData, "data-qtip-text": tooltipProps.tooltip ? tooltipProps.tooltip : `${value}%`, "data-testid": `progress-bar-indicator-${testId ? testId : value}`, key: `${index}-${value}`, ref: indicatorElementRef, style: {
|
|
28705
28735
|
// Background color will default to the theme color if undefined
|
|
28706
28736
|
backgroundColor: bgColor,
|
|
28707
28737
|
animation: 'width 660ms forwards',
|
|
28708
28738
|
width: `${animatedWidth}%`,
|
|
28709
|
-
} }, label ? (jsx$1("span", { className: `${baseLabelClasses} ${labelClasses} ${textColorClass} ${valuesLength === 1 ? 'tw
|
|
28739
|
+
} }, label ? (jsx$1("span", { className: `${baseLabelClasses} ${labelClasses} ${textColorClass} ${valuesLength === 1 ? 'tw:absolute tw:z-50' : ''}`, children: label })) : undefined));
|
|
28710
28740
|
};
|
|
28711
28741
|
const ProgressBar = ({ values = [], max = 100, containerExtraClasses = '', zeroValueLabel = 'No progress yet', }) => {
|
|
28712
28742
|
const totalValue = values.reduce((acc, { value }) => acc + value, 0);
|
|
28713
|
-
return (jsx$1(Root, { className: `tw
|
|
28714
|
-
return createElement(ProgressIndicator, { ...props, max: max, valuesLength: values.length, index: i, totalValue: totalValue, key: i });
|
|
28715
|
-
})) : (jsx$1("div", { className: `${baseLabelClasses} tw
|
|
28743
|
+
return (jsx$1(Root, { className: `tw:relative tw:h-[18px] tw:w-full tw:overflow-hidden tw:rounded-[15px] tw:bg-sq-dark-gray tw:dark:bg-sq-dark-disabled-gray tw:flex tw:flex-1 ${containerExtraClasses}`, max: max, value: totalValue, children: totalValue > 0 ? (values.map((props, i) => {
|
|
28744
|
+
return (createElement(ProgressIndicator, { ...props, max: max, valuesLength: values.length, index: i, totalValue: totalValue, key: i }));
|
|
28745
|
+
})) : (jsx$1("div", { className: `${baseLabelClasses} tw:mx-auto tw:overflow-hidden`, children: zeroValueLabel })) }));
|
|
28716
28746
|
};
|
|
28717
28747
|
|
|
28718
|
-
const baseClasses = 'tw
|
|
28748
|
+
const baseClasses = 'tw:flex tw:outline-none tw:w-full tw:relative tw:flex-wrap';
|
|
28719
28749
|
const activeClassesByVariantLightTheme = {
|
|
28720
|
-
'outline': '!tw
|
|
28721
|
-
'theme': 'tw
|
|
28750
|
+
'outline': '!tw:bg-sq-disabled-gray tw:border-sq-theme-dark',
|
|
28751
|
+
'theme': 'tw:bg-sq-theme-highlight',
|
|
28722
28752
|
'danger': '',
|
|
28723
28753
|
'theme-light': '',
|
|
28724
|
-
'no-border': '!tw
|
|
28754
|
+
'no-border': '!tw:bg-sq-disabled-gray',
|
|
28725
28755
|
'warning': '',
|
|
28726
28756
|
};
|
|
28727
28757
|
const activeClassesByVariantDarkTheme = {
|
|
28728
|
-
'outline': 'dark
|
|
28729
|
-
'theme': 'dark:
|
|
28758
|
+
'outline': '!tw:dark:bg-sq-multi-gray-dark tw:dark:border-sq-theme-dark',
|
|
28759
|
+
'theme': 'tw:dark:bg-sq-theme-highlight',
|
|
28730
28760
|
'danger': '',
|
|
28731
28761
|
'theme-light': '',
|
|
28732
|
-
'no-border': 'dark
|
|
28762
|
+
'no-border': '!tw:dark:bg-sq-multi-gray-dark',
|
|
28733
28763
|
'warning': '',
|
|
28734
28764
|
};
|
|
28735
28765
|
/**
|
|
@@ -28741,7 +28771,7 @@ const ButtonGroup = (props) => {
|
|
|
28741
28771
|
const appliedClasses = `${baseClasses} ${extraClassNames}`;
|
|
28742
28772
|
return (jsx$1("div", { id: id ? `button-group-${id}` : undefined, "data-testid": testId, className: appliedClasses, ...tooltipData, children: buttons
|
|
28743
28773
|
.filter(Boolean)
|
|
28744
|
-
.map((item, index) => item?.variant === 'button' ? (jsx$1(Button, { ...item.buttonProps, extraClassNames: `tw
|
|
28774
|
+
.map((item, index) => item?.variant === 'button' ? (jsx$1(Button, { ...item.buttonProps, extraClassNames: `tw:ml-[-1px] tw:focus:z-40 tw:outline-none tw:focus:border tw:rounded-none tw:first:rounded-l-md tw:last:rounded-r-md ${item.buttonProps?.isActive
|
|
28745
28775
|
? `${activeClassesByVariantLightTheme[item?.buttonProps?.variant ?? 'outline']} ${activeClassesByVariantDarkTheme[item?.buttonProps?.variant ?? 'outline']} `
|
|
28746
28776
|
: ''} ${item.buttonProps.extraClassNames}`, onClick: () => onChange && onChange(item?.buttonProps?.value) }, index)) : (item?.element)) }));
|
|
28747
28777
|
};
|
|
@@ -28751,7 +28781,7 @@ const ButtonGroup = (props) => {
|
|
|
28751
28781
|
* - Easily create a carousel with custom slides.
|
|
28752
28782
|
* - Supports automatic sliding, navigation arrows, and slide indicators.
|
|
28753
28783
|
*/
|
|
28754
|
-
const Carousel = ({ testId = 'carousel-id', activeIndex = 0, extraClassNames = '', onSlide = () => { }, autoSlide, showIndicators = true, continuous = true, interval = 4000, prevIcon = 'fc-arrow-dropdown tw
|
|
28784
|
+
const Carousel = ({ testId = 'carousel-id', activeIndex = 0, extraClassNames = '', onSlide = () => { }, autoSlide, showIndicators = true, continuous = true, interval = 4000, prevIcon = 'fc-arrow-dropdown tw:rotate-90', nextIcon = 'fc-arrow-dropdown tw:rotate-270', showArrows = true, iconExtraClassNames = '', carouselItems = [], }) => {
|
|
28755
28785
|
const [currentIndex, setCurrentIndex] = useState(activeIndex);
|
|
28756
28786
|
const changeSlide = (nextIndex) => {
|
|
28757
28787
|
const newIndex = (nextIndex + carouselItems.length) % carouselItems.length;
|
|
@@ -28813,7 +28843,7 @@ const Carousel = ({ testId = 'carousel-id', activeIndex = 0, extraClassNames = '
|
|
|
28813
28843
|
transition: { type: 'spring', damping: 20, stiffness: 100 },
|
|
28814
28844
|
}),
|
|
28815
28845
|
};
|
|
28816
|
-
return (jsxs("div", { "data-testid": testId, className: `tw
|
|
28846
|
+
return (jsxs("div", { "data-testid": testId, className: `tw:flex tw:flex-col tw:items-center tw:justify-center tw:w-full tw:overflow-hidden ${extraClassNames}`, children: [jsxs("div", { className: "tw:flex tw:items-center tw:w-full tw:h-max tw:gap-1", children: [showArrows && (jsx$1(Button, { icon: prevIcon, size: "lg", variant: "no-border", testId: "carousel-prev", extraClassNames: `${currentIndex === 0 && !continuous ? 'tw:invisible' : ''} ${iconExtraClassNames} tw:animate-fadeIn`, onClick: onBackClick })), jsx$1("div", { className: "tw:h-full tw:w-full tw:overflow-hidden", children: jsx$1(motion.div, { custom: 1, initial: "initial", animate: "animate", exit: "exit", variants: slideVariants, className: "tw:w-full", children: carouselItems[currentIndex] }, currentIndex) }), showArrows && (jsx$1(Button, { icon: nextIcon, testId: "carousel-next", size: "lg", variant: "no-border", extraClassNames: `${currentIndex === carouselItems.length - 1 && !continuous ? 'tw:invisible' : ''} ${iconExtraClassNames} tw:animate-fadeIn`, onClick: onForwardClick }))] }), showIndicators && (jsx$1("div", { className: "tw:flex tw:gap-1 tw:mt-2", children: carouselItems.map((_, i) => (jsx$1("div", { className: `tw:w-2 tw:h-2 tw:rounded-full tw:cursor-pointer ${i === currentIndex ? 'tw:bg-sq-theme-dark' : 'tw:bg-sq-darkish-gray'}`, onClick: () => changeSlide(i) }, i))) }))] }));
|
|
28817
28847
|
};
|
|
28818
28848
|
|
|
28819
28849
|
const buttonTypes = ['button', 'reset', 'submit', 'link'];
|