@seeqdev/qomponents 0.0.185 → 0.0.187
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/README.md +8 -0
- package/dist/example/src/Example.tsx +7 -7
- package/dist/index.esm.js +423 -352
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +423 -352
- package/dist/index.js.map +1 -1
- package/dist/src/SeeqActionDropdown/SeeqActionDropdown.types.d.ts +5 -0
- package/dist/styles.css +2514 -3133
- package/package.json +5 -4
- package/dist/src/Accordion/Accordion.js +0 -8
- package/dist/src/Accordion/Accordion.stories.js +0 -96
- package/dist/src/Accordion/Accordion.test.js +0 -54
- package/dist/src/Accordion/Accordion.types.js +0 -1
- package/dist/src/Accordion/index.js +0 -1
- package/dist/src/Alert/Alert.js +0 -33
- package/dist/src/Alert/Alert.stories.js +0 -72
- package/dist/src/Alert/Alert.test.js +0 -49
- package/dist/src/Alert/Alert.types.js +0 -1
- package/dist/src/Alert/index.js +0 -1
- package/dist/src/Button/Button.js +0 -107
- package/dist/src/Button/Button.stories.js +0 -74
- package/dist/src/Button/Button.test.js +0 -65
- package/dist/src/Button/Button.types.js +0 -4
- package/dist/src/Button/index.js +0 -1
- package/dist/src/ButtonGroup/ButtonGroup.js +0 -34
- package/dist/src/ButtonGroup/ButtonGroup.stories.js +0 -328
- package/dist/src/ButtonGroup/ButtonGroup.test.js +0 -65
- package/dist/src/ButtonGroup/ButtonGroup.types.js +0 -1
- package/dist/src/ButtonGroup/index.js +0 -1
- package/dist/src/ButtonWithDropdown/ButtonWithDropdown.js +0 -46
- package/dist/src/ButtonWithDropdown/ButtonWithDropdown.stories.js +0 -119
- package/dist/src/ButtonWithDropdown/ButtonWithDropdown.test.js +0 -92
- package/dist/src/ButtonWithDropdown/ButtonWithDropdown.types.js +0 -1
- package/dist/src/ButtonWithDropdown/index.js +0 -1
- package/dist/src/ButtonWithPopover/ButtonWithPopover.js +0 -54
- package/dist/src/ButtonWithPopover/ButtonWithPopover.stories.js +0 -51
- package/dist/src/ButtonWithPopover/ButtonWithPopover.test.js +0 -80
- package/dist/src/ButtonWithPopover/ButtonWithPopover.types.js +0 -1
- package/dist/src/ButtonWithPopover/index.js +0 -1
- package/dist/src/Carousel/Carousel.js +0 -80
- package/dist/src/Carousel/Carousel.stories.js +0 -100
- package/dist/src/Carousel/Carousel.test.js +0 -47
- package/dist/src/Carousel/Carousel.types.js +0 -1
- package/dist/src/Carousel/index.js +0 -1
- package/dist/src/Checkbox/Checkbox.js +0 -24
- package/dist/src/Checkbox/Checkbox.stories.js +0 -21
- package/dist/src/Checkbox/Checkbox.test.js +0 -93
- package/dist/src/Checkbox/Checkbox.types.js +0 -1
- package/dist/src/Checkbox/index.js +0 -1
- package/dist/src/Collapse/Collapse.js +0 -16
- package/dist/src/Collapse/Collapse.stories.js +0 -28
- package/dist/src/Collapse/Collapse.test.js +0 -16
- package/dist/src/Collapse/Collapse.types.js +0 -1
- package/dist/src/Collapse/index.js +0 -1
- package/dist/src/Icon/Icon.js +0 -55
- package/dist/src/Icon/Icon.stories.js +0 -31
- package/dist/src/Icon/Icon.test.js +0 -54
- package/dist/src/Icon/Icon.types.js +0 -15
- package/dist/src/Icon/index.js +0 -1
- package/dist/src/InputGroup/InputGroup.js +0 -33
- package/dist/src/InputGroup/InputGroup.stories.js +0 -144
- package/dist/src/InputGroup/InputGroup.test.js +0 -41
- package/dist/src/InputGroup/InputGroup.types.js +0 -1
- package/dist/src/InputGroup/index.js +0 -1
- package/dist/src/Modal/Modal.js +0 -86
- package/dist/src/Modal/Modal.stories.js +0 -79
- package/dist/src/Modal/Modal.test.js +0 -107
- package/dist/src/Modal/Modal.types.js +0 -1
- package/dist/src/Modal/index.js +0 -1
- package/dist/src/ProgressBar/ProgressBar.js +0 -71
- package/dist/src/ProgressBar/ProgressBar.stories.js +0 -46
- package/dist/src/ProgressBar/ProgressBar.test.js +0 -42
- package/dist/src/ProgressBar/ProgressBar.types.js +0 -1
- package/dist/src/ProgressBar/index.js +0 -1
- package/dist/src/SeeqActionDropdown/SeeqActionDropdown.js +0 -41
- package/dist/src/SeeqActionDropdown/SeeqActionDropdown.stories.js +0 -73
- package/dist/src/SeeqActionDropdown/SeeqActionDropdown.test.js +0 -72
- package/dist/src/SeeqActionDropdown/SeeqActionDropdown.types.js +0 -1
- package/dist/src/SeeqActionDropdown/index.js +0 -1
- package/dist/src/SeeqActionDropdown/variants.js +0 -34
- package/dist/src/Select/Select.js +0 -171
- package/dist/src/Select/Select.stories.js +0 -50
- package/dist/src/Select/Select.test.js +0 -176
- package/dist/src/Select/Select.types.js +0 -1
- package/dist/src/Select/index.js +0 -2
- package/dist/src/Slider/Slider.js +0 -11
- package/dist/src/Slider/Slider.stories.js +0 -37
- package/dist/src/Slider/Slider.test.js +0 -31
- package/dist/src/Slider/Slider.types.js +0 -1
- package/dist/src/Slider/index.js +0 -1
- package/dist/src/SvgIcon/SvgIcon.js +0 -27
- package/dist/src/SvgIcon/SvgIcon.stories.js +0 -26
- package/dist/src/SvgIcon/SvgIcon.test.js +0 -40
- package/dist/src/SvgIcon/SvgIcon.types.js +0 -2
- package/dist/src/SvgIcon/index.js +0 -1
- package/dist/src/Tabs/Tabs.js +0 -18
- package/dist/src/Tabs/Tabs.stories.js +0 -83
- package/dist/src/Tabs/Tabs.test.js +0 -91
- package/dist/src/Tabs/Tabs.types.js +0 -1
- package/dist/src/Tabs/index.js +0 -1
- package/dist/src/TextArea/TextArea.js +0 -54
- package/dist/src/TextArea/TextArea.stories.js +0 -21
- package/dist/src/TextArea/TextArea.test.js +0 -129
- package/dist/src/TextArea/TextArea.types.js +0 -1
- package/dist/src/TextArea/index.js +0 -1
- package/dist/src/TextField/TextField.js +0 -85
- package/dist/src/TextField/TextField.stories.js +0 -30
- package/dist/src/TextField/TextField.test.js +0 -40
- package/dist/src/TextField/TextField.types.js +0 -1
- package/dist/src/TextField/index.js +0 -1
- package/dist/src/ToolbarButton/ToolbarButton.js +0 -58
- package/dist/src/ToolbarButton/ToolbarButton.stories.js +0 -63
- package/dist/src/ToolbarButton/ToolbarButton.test.js +0 -89
- package/dist/src/ToolbarButton/ToolbarButton.types.js +0 -1
- package/dist/src/ToolbarButton/index.js +0 -1
- package/dist/src/Tooltip/QTip.stories.js +0 -22
- package/dist/src/Tooltip/QTip.types.js +0 -1
- package/dist/src/Tooltip/QTipPerformance.stories.js +0 -27
- package/dist/src/Tooltip/Qtip.js +0 -168
- package/dist/src/Tooltip/Tooltip.js +0 -34
- package/dist/src/Tooltip/Tooltip.stories.js +0 -20
- package/dist/src/Tooltip/Tooltip.types.js +0 -2
- package/dist/src/Tooltip/TooltipPerformance.stories.js +0 -25
- package/dist/src/Tooltip/index.js +0 -2
- package/dist/src/Tooltip/qTip.utilities.js +0 -10
- package/dist/src/index.js +0 -47
- package/dist/src/setupTests.js +0 -5
- package/dist/src/types.js +0 -25
- package/dist/src/utils/browserId.js +0 -28
- package/dist/src/utils/svg.js +0 -19
- package/dist/src/utils/validateStyleDimension.js +0 -13
- package/dist/src/utils/validateStyleDimension.test.js +0 -19
package/dist/index.js
CHANGED
|
@@ -66,34 +66,34 @@ const getQTipData = ({ tooltip, tooltipPlacement, isHtmlTooltip, tooltipTestId,
|
|
|
66
66
|
: undefined;
|
|
67
67
|
|
|
68
68
|
const colorClassesThemeLight = {
|
|
69
|
-
'theme': 'tw
|
|
70
|
-
'white': 'tw
|
|
71
|
-
'dark-gray': 'tw
|
|
72
|
-
'warning': 'tw
|
|
73
|
-
'darkish-gray': 'tw
|
|
74
|
-
'gray': 'tw
|
|
69
|
+
'theme': 'tw:text-sq-theme-dark',
|
|
70
|
+
'white': 'tw:text-sq-white',
|
|
71
|
+
'dark-gray': 'tw:text-sq-fairly-dark-gray',
|
|
72
|
+
'warning': 'tw:text-sq-warning',
|
|
73
|
+
'darkish-gray': 'tw:text-sq-darkish-gray',
|
|
74
|
+
'gray': 'tw:text-sq-disabled-gray',
|
|
75
75
|
'color': '',
|
|
76
|
-
'info': 'tw
|
|
77
|
-
'text': 'tw
|
|
76
|
+
'info': 'tw:text-sq-theme-link',
|
|
77
|
+
'text': 'tw:text-sq-text-color',
|
|
78
78
|
'inherit': '',
|
|
79
|
-
'danger': 'tw
|
|
80
|
-
'theme-light': 'tw
|
|
81
|
-
'success': 'tw
|
|
79
|
+
'danger': 'tw:text-sq-danger',
|
|
80
|
+
'theme-light': 'tw:text-sq-theme-light',
|
|
81
|
+
'success': 'tw:text-sq-success',
|
|
82
82
|
};
|
|
83
83
|
const colorClassesThemeDark = {
|
|
84
|
-
'theme': 'dark:
|
|
84
|
+
'theme': 'tw:dark:text-sq-theme-darker',
|
|
85
85
|
'white': '',
|
|
86
|
-
'dark-gray': 'tw
|
|
86
|
+
'dark-gray': 'tw:text-sq-fairly-dark-gray',
|
|
87
87
|
'warning': '',
|
|
88
|
-
'darkish-gray': 'tw
|
|
89
|
-
'gray': 'dark:
|
|
88
|
+
'darkish-gray': 'tw:text-sq-darkish-gray',
|
|
89
|
+
'gray': 'tw:dark:text-sq-dark-disabled-gray',
|
|
90
90
|
'color': '',
|
|
91
|
-
'info': 'dark:
|
|
92
|
-
'text': 'dark:
|
|
91
|
+
'info': 'tw:dark:text-sq-theme-link',
|
|
92
|
+
'text': 'tw:dark:text-sq-dark-text',
|
|
93
93
|
'inherit': '',
|
|
94
|
-
'danger': 'tw
|
|
95
|
-
'theme-light': 'tw
|
|
96
|
-
'success': 'tw
|
|
94
|
+
'danger': 'tw:text-sq-danger',
|
|
95
|
+
'theme-light': 'tw:text-sq-theme-light',
|
|
96
|
+
'success': 'tw:text-sq-success',
|
|
97
97
|
};
|
|
98
98
|
/**
|
|
99
99
|
* Icon:
|
|
@@ -105,14 +105,14 @@ const Icon = ({ onClick, icon, iconPrefix = undefined, type = 'theme', extraClas
|
|
|
105
105
|
const errorMessage = color === undefined || color === ''
|
|
106
106
|
? 'Icon with type="color" must have prop color specified.'
|
|
107
107
|
: 'Icon with prop color must have type="color".';
|
|
108
|
-
return jsxRuntime.jsx("div", { className: "tw
|
|
108
|
+
return jsxRuntime.jsx("div", { className: "tw:text-sq-danger", children: errorMessage });
|
|
109
109
|
}
|
|
110
110
|
const fontAwesomePrefix = iconPrefix ? iconPrefix : 'fa-sharp fa-regular';
|
|
111
111
|
const iconPrefixString = icon.startsWith('fc') ? 'fc' : fontAwesomePrefix;
|
|
112
112
|
const style = type === 'color' && color ? { color } : {};
|
|
113
113
|
const sizeClass = size ? `fa-${size}` : small ? 'fa-sm' : large ? 'fa-lg' : '';
|
|
114
114
|
const appliedClassNames = `${iconPrefixString} ${icon} ${sizeClass}
|
|
115
|
-
${colorClassesThemeLight[type]} ${colorClassesThemeDark[type]} ${onClick ? 'tw
|
|
115
|
+
${colorClassesThemeLight[type]} ${colorClassesThemeDark[type]} ${onClick ? 'tw:cursor-pointer' : ''} ${extraClassNames} tw:focus:outline-none tw:focus-visible:outline-none tw:outline-none`;
|
|
116
116
|
const tooltipData = getQTipData(tooltipProps);
|
|
117
117
|
return (jsxRuntime.jsx("i", { className: appliedClassNames, style: style, onClick: onClick, "data-testid": testId, "data-customid": customId, id: id, "data-number": number, ...tooltipData }));
|
|
118
118
|
};
|
|
@@ -123,71 +123,71 @@ const Icon = ({ onClick, icon, iconPrefix = undefined, type = 'theme', extraClas
|
|
|
123
123
|
* - include tooltips and/or icons
|
|
124
124
|
*/
|
|
125
125
|
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, }) => {
|
|
126
|
-
const baseClasses = 'tw
|
|
126
|
+
const baseClasses = 'tw:px-2.5 tw:rounded-md tw:focus:ring-0 tw:focus-visible:outline-none tw:aria-disabled:cursor-not-allowed tw:disabled:pointer-events-none';
|
|
127
127
|
const baseClassesByVariant = {
|
|
128
|
-
'outline': 'disabled:
|
|
129
|
-
'theme': 'disabled:
|
|
130
|
-
'danger': 'tw
|
|
131
|
-
'tw
|
|
132
|
-
'theme-light': 'disabled:
|
|
133
|
-
'no-border': 'disabled:
|
|
134
|
-
'warning': 'tw
|
|
135
|
-
'disabled:
|
|
128
|
+
'outline': 'tw:disabled:opacity-50 tw:aria-disabled:opacity-50 tw:border-solid tw:border',
|
|
129
|
+
'theme': 'tw:disabled:opacity-50 tw:aria-disabled:opacity-50 tw:border-solid tw:border',
|
|
130
|
+
'danger': 'tw:bg-sq-danger tw:disabled:opacity-50 tw:aria-disabled:opacity-50 ' +
|
|
131
|
+
'tw:border-solid tw:border tw:border-sq-danger',
|
|
132
|
+
'theme-light': 'tw:disabled:opacity-50 tw:aria-disabled:opacity-50 tw:border-solid tw:border',
|
|
133
|
+
'no-border': 'tw:disabled:opacity-50 tw:aria-disabled:opacity-50',
|
|
134
|
+
'warning': 'tw:bg-sq-warning tw:border-solid tw:border tw:border-sq-warning ' +
|
|
135
|
+
'tw:disabled:opacity-50 tw:aria-disabled:opacity-50',
|
|
136
136
|
};
|
|
137
137
|
const textClassesByVariantLightTheme = {
|
|
138
|
-
'outline': 'tw
|
|
139
|
-
'theme': 'tw
|
|
140
|
-
'theme-light': 'tw
|
|
141
|
-
'danger': 'tw
|
|
142
|
-
'no-border': 'tw
|
|
143
|
-
'warning': 'tw
|
|
138
|
+
'outline': 'tw:text-sq-text-color',
|
|
139
|
+
'theme': 'tw:text-sq-white',
|
|
140
|
+
'theme-light': 'tw:text-sq-white',
|
|
141
|
+
'danger': 'tw:text-sq-white',
|
|
142
|
+
'no-border': 'tw:text-sq-text-color',
|
|
143
|
+
'warning': 'tw:text-sq-white',
|
|
144
144
|
};
|
|
145
145
|
const textClassesByVariantDarkTheme = {
|
|
146
|
-
'outline': 'dark:
|
|
147
|
-
'theme': 'dark:
|
|
148
|
-
'theme-light': 'dark:
|
|
149
|
-
'danger': 'dark:
|
|
150
|
-
'no-border': 'dark:
|
|
151
|
-
'warning': 'dark:
|
|
146
|
+
'outline': 'tw:dark:text-sq-dark-text',
|
|
147
|
+
'theme': 'tw:dark:text-sq-white',
|
|
148
|
+
'theme-light': 'tw:dark:text-sq-white',
|
|
149
|
+
'danger': 'tw:dark:text-sq-white',
|
|
150
|
+
'no-border': 'tw:dark:text-sq-dark-text',
|
|
151
|
+
'warning': 'tw:dark:text-sq-white',
|
|
152
152
|
};
|
|
153
153
|
const classesByVariantLightTheme = {
|
|
154
|
-
'outline': 'tw
|
|
155
|
-
'theme': 'tw
|
|
154
|
+
'outline': 'tw:bg-white tw:border-sq-disabled-gray',
|
|
155
|
+
'theme': 'tw:bg-sq-theme-dark tw:border-sq-theme-dark',
|
|
156
156
|
'danger': '',
|
|
157
|
-
'theme-light': 'tw
|
|
157
|
+
'theme-light': 'tw:bg-sq-icon',
|
|
158
158
|
'no-border': '',
|
|
159
159
|
'warning': '',
|
|
160
160
|
};
|
|
161
161
|
const classesByVariantDarkTheme = {
|
|
162
|
-
'outline': 'dark:
|
|
163
|
-
'theme': 'dark:
|
|
162
|
+
'outline': 'tw:dark:bg-sq-dark-background tw:dark:border-sq-dark-disabled-gray',
|
|
163
|
+
'theme': 'tw:dark:bg-sq-theme-dark tw:dark:border-sq-theme-dark',
|
|
164
164
|
'danger': '',
|
|
165
|
-
'theme-light': 'dark:
|
|
165
|
+
'theme-light': 'tw:dark:bg-sq-icon-dark tw:dark:border-sq-icon-dark',
|
|
166
166
|
'no-border': '',
|
|
167
167
|
'warning': '',
|
|
168
168
|
};
|
|
169
169
|
const activeClassesByVariantLightTheme = {
|
|
170
|
-
'outline': 'hover:
|
|
171
|
-
' active:
|
|
172
|
-
'theme': 'hover:
|
|
173
|
-
'danger': 'hover:
|
|
174
|
-
'theme-light': 'hover:
|
|
170
|
+
'outline': 'tw:hover:bg-sq-light-gray tw:focus:bg-sq-dark-gray tw:active:bg-sq-dark-gray tw:focus:border-sq-theme-dark' +
|
|
171
|
+
' tw:active:border-sq-theme-dark',
|
|
172
|
+
'theme': 'tw:hover:bg-sq-theme-highlight tw:hover:border-sq-theme-highlight',
|
|
173
|
+
'danger': 'tw:hover:bg-sq-bg-danger tw:hover:border-sq-bg-danger',
|
|
174
|
+
'theme-light': 'tw:hover:bg-sq-link tw:hover:border-sq-link',
|
|
175
175
|
'no-border': '',
|
|
176
176
|
'warning': '',
|
|
177
177
|
};
|
|
178
178
|
const activeClassesByVariantDarkTheme = {
|
|
179
|
-
'outline': 'dark:hover:
|
|
180
|
-
' dark:active:
|
|
181
|
-
'theme': 'dark:hover:
|
|
182
|
-
'danger': 'dark:hover:
|
|
183
|
-
'theme-light': 'dark:hover:
|
|
179
|
+
'outline': 'tw:dark:hover:bg-sq-highlight-color-dark tw:dark:focus:bg-sq-multi-gray-dark' +
|
|
180
|
+
' tw:dark:active:bg-sq-multi-gray-dark tw:dark:focus:border-sq-theme-dark tw:dark:active:border-sq-theme-dark',
|
|
181
|
+
'theme': 'tw:dark:hover:bg-sq-theme-highlight tw:dark:hover:border-sq-theme-highlight',
|
|
182
|
+
'danger': 'tw:dark:hover:bg-sq-bg-danger tw:dark:hover:border-sq-bg-danger',
|
|
183
|
+
'theme-light': 'tw:dark:hover:bg-sq-link-dark tw:dark:hover:border-sq-link-dark',
|
|
184
184
|
'no-border': '',
|
|
185
185
|
'warning': '',
|
|
186
186
|
};
|
|
187
187
|
const sizeClasses = {
|
|
188
|
-
xs: 'tw
|
|
189
|
-
sm: 'tw
|
|
190
|
-
lg: 'tw
|
|
188
|
+
xs: 'tw:text-xs tw:py-0.5',
|
|
189
|
+
sm: 'tw:text-sm tw:py-1',
|
|
190
|
+
lg: 'tw:text-xl tw:py-1',
|
|
191
191
|
};
|
|
192
192
|
let tooltipData = undefined;
|
|
193
193
|
let appliedClasses = `${baseClasses} ${baseClassesByVariant[variant]} ${sizeClasses[size]} ${classesByVariantLightTheme[variant]} ${classesByVariantDarkTheme[variant]} ${textClassesByVariantLightTheme[variant]} ${textClassesByVariantDarkTheme[variant]} ${extraClassNames}`;
|
|
@@ -203,7 +203,7 @@ const Button = ({ onClick, label, variant = 'outline', type = 'button', size = '
|
|
|
203
203
|
'data-qtip-delay': tooltipOptions?.delay ?? DEFAULT_TOOL_TIP_DELAY,
|
|
204
204
|
};
|
|
205
205
|
}
|
|
206
|
-
const iconClass = iconPosition === 'left' ? 'tw
|
|
206
|
+
const iconClass = iconPosition === 'left' ? 'tw:mr-1' : 'tw:ml-1';
|
|
207
207
|
const iconElement = icon && (jsxRuntime.jsx(Icon, { icon: icon, iconPrefix: iconPrefix, type: iconStyle, color: iconColor, extraClassNames: label
|
|
208
208
|
? `${iconClass} ${textClassesByVariantLightTheme[variant]} ${textClassesByVariantDarkTheme[variant]}`
|
|
209
209
|
: '', testId: `${id}_spinner` }));
|
|
@@ -4428,6 +4428,13 @@ function RemoveScrollSideCar(props) {
|
|
|
4428
4428
|
if ('touches' in event && moveDirection === 'h' && target.type === 'range') {
|
|
4429
4429
|
return false;
|
|
4430
4430
|
}
|
|
4431
|
+
// allow drag selection (iOS); check if selection's anchorNode is the same as target or contains target
|
|
4432
|
+
var selection = window.getSelection();
|
|
4433
|
+
var anchorNode = selection && selection.anchorNode;
|
|
4434
|
+
var isTouchingSelection = anchorNode ? anchorNode === target || anchorNode.contains(target) : false;
|
|
4435
|
+
if (isTouchingSelection) {
|
|
4436
|
+
return false;
|
|
4437
|
+
}
|
|
4431
4438
|
var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
|
|
4432
4439
|
if (!canBeScrolledInMainDirection) {
|
|
4433
4440
|
return true;
|
|
@@ -4838,31 +4845,30 @@ function getSvgIconPath(icon) {
|
|
|
4838
4845
|
}
|
|
4839
4846
|
|
|
4840
4847
|
const popoverBorderStyles = [
|
|
4841
|
-
'tw
|
|
4842
|
-
'tw
|
|
4843
|
-
'tw
|
|
4844
|
-
'tw
|
|
4845
|
-
'dark:
|
|
4848
|
+
'tw:border-solid',
|
|
4849
|
+
'tw:border',
|
|
4850
|
+
'tw:rounded-md',
|
|
4851
|
+
'tw:border-sq-disabled-gray',
|
|
4852
|
+
'tw:dark:border-gray-500',
|
|
4846
4853
|
].join(' ');
|
|
4847
4854
|
const triggerBackgroundStyles = [
|
|
4848
|
-
'tw
|
|
4849
|
-
'hover:
|
|
4850
|
-
'active:
|
|
4851
|
-
'dark:
|
|
4852
|
-
'dark:hover:
|
|
4853
|
-
'dark:active:
|
|
4855
|
+
'tw:bg-transparent',
|
|
4856
|
+
'tw:hover:bg-sq-worksheetspanel-gray',
|
|
4857
|
+
'tw:active:bg-sq-worksheetspanel-gray',
|
|
4858
|
+
'tw:dark:bg-transparent',
|
|
4859
|
+
'tw:dark:hover:bg-sq-field-disabled-gray/30',
|
|
4860
|
+
'tw:dark:active:bg-sq-field-disabled-gray/30',
|
|
4854
4861
|
].join(' ');
|
|
4855
4862
|
const activeBackgroundStyles = [
|
|
4856
4863
|
'active',
|
|
4857
|
-
'tw
|
|
4858
|
-
'
|
|
4859
|
-
'
|
|
4860
|
-
'dark:
|
|
4861
|
-
'dark:
|
|
4862
|
-
'dark:active:tw-bg-sq-dark-disabled-gray',
|
|
4864
|
+
'tw:bg-sq-overlay',
|
|
4865
|
+
'tw:active:bg-sq-overlay',
|
|
4866
|
+
'tw:dark:bg-sq-dark-disabled-gray',
|
|
4867
|
+
'tw:dark:hover:border-sq-dark-disabled-gray/30',
|
|
4868
|
+
'tw:dark:active:bg-sq-dark-disabled-gray/30',
|
|
4863
4869
|
].join(' ');
|
|
4864
|
-
const bgStyles$3 = ['tw
|
|
4865
|
-
const disabledClasses$4 = ['tw
|
|
4870
|
+
const bgStyles$3 = ['tw:bg-sq-white', 'tw:dark:bg-sq-dark-background'].join(' ');
|
|
4871
|
+
const disabledClasses$4 = ['tw:opacity-50', 'tw:cursor-not-allowed'].join(' ');
|
|
4866
4872
|
const PopoverContent = React__namespace.forwardRef(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (jsxRuntime.jsx(Content2$3, { ref: ref, align: align, sideOffset: sideOffset, ...props, asChild: true })));
|
|
4867
4873
|
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, }) => {
|
|
4868
4874
|
let tooltipData = undefined;
|
|
@@ -4880,12 +4886,12 @@ const ToolbarButton = ({ isSmall = false, label, icon, secondIcon, forceSmallIco
|
|
|
4880
4886
|
onHide && onHide();
|
|
4881
4887
|
}
|
|
4882
4888
|
};
|
|
4883
|
-
return (jsxRuntime.jsxs(Root2$3, { defaultOpen: false, onOpenChange: onOpenChange, children: [jsxRuntime.jsx(Trigger$3, { id: id, className: `tw-border-none tw
|
|
4889
|
+
return (jsxRuntime.jsxs(Root2$3, { defaultOpen: false, onOpenChange: onOpenChange, children: [jsxRuntime.jsx(Trigger$3, { id: id, className: `tw:bg-transparent tw:border-none tw:mx-sq-1.5 tw:first:ml-0 tw:last:mr-0 ${isActive ? 'active' : ''}`, disabled: disabled, "data-testid": testId, onClick: (e) => {
|
|
4884
4890
|
onClick && onClick(e);
|
|
4885
|
-
}, children: jsxRuntime.jsxs("div", { ...tooltipData, className: `tw
|
|
4886
|
-
' tw
|
|
4887
|
-
' 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' +
|
|
4888
|
-
popoverBorderStyles, children: [hasArrow && (jsxRuntime.jsx(Arrow2$2, { asChild: true, children: jsxRuntime.jsx("div", { className: " tw
|
|
4891
|
+
}, children: jsxRuntime.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-sq-5'} ${disabled ? disabledClasses$4 : isActive ? activeBackgroundStyles : triggerBackgroundStyles} ${extraClassNames || ''}`, children: [jsxRuntime.jsxs("span", { className: "tw:nowrap", children: [isPrimaryAnSvg ? (jsxRuntime.jsx("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: jsxRuntime.jsx("path", { d: getSvgIconPath(icon) }) })) : (jsxRuntime.jsx(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 && jsxRuntime.jsx(Icon, { icon: secondIcon, type: "text", testId: "secondIcon" }), popoverContent ? (jsxRuntime.jsx(Icon, { icon: "fc-arrow-dropdown", extraClassNames: "tw:text-sq-text-color tw:dark:text-sq-dark-text tw:ml-sq-3 tw:text-2", type: "text", size: "sm" })) : undefined] }), !isSmall && jsxRuntime.jsx("small", { className: "tw:text-sq-text-color tw:dark:text-sq-dark-text tw:text-2.5", children: label })] }) }), !!popoverContent ? (jsxRuntime.jsx(PopoverContent, { sideOffset: 2, align: "start", children: jsxRuntime.jsxs("div", { className: bgStyles$3 +
|
|
4892
|
+
' tw:relative tw:z-[1000] tw:min-w-6 tw:p-2 tw:focus-visible:outline-none tw:outline-none tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out' +
|
|
4893
|
+
' 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' +
|
|
4894
|
+
popoverBorderStyles, children: [hasArrow && (jsxRuntime.jsx(Arrow2$2, { asChild: true, children: jsxRuntime.jsx("div", { className: " tw:fill-transparent tw:bg-sq-white tw:w-sq-15 tw:h-sq-15 tw:-mt-sq-7 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] }));
|
|
4889
4895
|
};
|
|
4890
4896
|
|
|
4891
4897
|
const setValidInputDimension = (width, height) => {
|
|
@@ -4902,24 +4908,24 @@ const setValidInputDimension = (width, height) => {
|
|
|
4902
4908
|
return inputStyle;
|
|
4903
4909
|
};
|
|
4904
4910
|
|
|
4905
|
-
const errorClasses$4 = 'tw
|
|
4911
|
+
const errorClasses$4 = 'tw:border-sq-danger';
|
|
4906
4912
|
const borderColorClasses$4 = [
|
|
4907
|
-
'tw
|
|
4908
|
-
'dark:
|
|
4909
|
-
'dark:focus:
|
|
4910
|
-
'dark:active:
|
|
4911
|
-
'focus:
|
|
4912
|
-
'active:
|
|
4913
|
+
'tw:border-sq-disabled-gray',
|
|
4914
|
+
'tw:dark:border-sq-dark-disabled-gray',
|
|
4915
|
+
'tw:dark:focus:border-sq-theme-dark-dark',
|
|
4916
|
+
'tw:dark:active:border-sq-theme-darker',
|
|
4917
|
+
'tw:focus:border-sq-theme-dark',
|
|
4918
|
+
'tw:active:border-sq-theme-dark',
|
|
4913
4919
|
].join(' ');
|
|
4914
|
-
const baseClasses$6 = 'tw
|
|
4915
|
-
' disabled:
|
|
4916
|
-
' disabled:
|
|
4917
|
-
' dark:
|
|
4918
|
-
const darkTheme$3 = 'dark:
|
|
4919
|
-
const lightTheme$3 = 'tw
|
|
4920
|
+
const baseClasses$6 = 'tw:h-8.5 tw:leading-normal tw:outline-none tw:py-1 tw:px-3' +
|
|
4921
|
+
' tw:disabled:pointer-events-none tw:disabled:bg-sq-light-gray tw:disabled:dark:bg-sq-dark-disabled-gray' +
|
|
4922
|
+
' tw:disabled:cursor-not-allowed tw:p-1 tw:border-solid tw:border tw:placeholder-gray-400' +
|
|
4923
|
+
' tw:dark:placeholder-sq-dark-text/30 specTextField';
|
|
4924
|
+
const darkTheme$3 = 'tw:dark:bg-sq-dark-background tw:dark:text-sq-dark-text tw:disabled:dark:text-sq-dark-text/30';
|
|
4925
|
+
const lightTheme$3 = 'tw:text-sq-text-color tw:disabled:text-sq-darkish-gray';
|
|
4920
4926
|
const sizeClasses = {
|
|
4921
|
-
sm: 'tw
|
|
4922
|
-
lg: 'tw
|
|
4927
|
+
sm: 'tw:text-sm',
|
|
4928
|
+
lg: 'tw:text-xl',
|
|
4923
4929
|
};
|
|
4924
4930
|
/**
|
|
4925
4931
|
* Textfield.
|
|
@@ -4961,12 +4967,12 @@ const TextField = React.forwardRef((props, ref) => {
|
|
|
4961
4967
|
internalRef.current.value = `${value}`;
|
|
4962
4968
|
}
|
|
4963
4969
|
}, [value]);
|
|
4964
|
-
let borderRadius = 'tw
|
|
4970
|
+
let borderRadius = 'tw:rounded-md';
|
|
4965
4971
|
if (inputGroup === 'left') {
|
|
4966
|
-
borderRadius = 'tw
|
|
4972
|
+
borderRadius = 'tw:rounded-l-md tw:border-r-0 tw:focus:border-r' + ' tw:active:border-r';
|
|
4967
4973
|
}
|
|
4968
4974
|
else if (inputGroup === 'right') {
|
|
4969
|
-
borderRadius = 'tw
|
|
4975
|
+
borderRadius = 'tw:rounded-r-md tw:border-l-0 tw:focus:border-l tw:active:border-l';
|
|
4970
4976
|
}
|
|
4971
4977
|
const appliedClasses = `${baseClasses$6} ${sizeClasses[size]} ${extraClassNames} ${lightTheme$3} ${darkTheme$3} ${borderRadius} ${showError ? errorClasses$4 : borderColorClasses$4} `;
|
|
4972
4978
|
const inputProp = setValidInputDimension(inputWidth, inputHeight)
|
|
@@ -4979,18 +4985,18 @@ const TextField = React.forwardRef((props, ref) => {
|
|
|
4979
4985
|
inputLenghtProp.maxLength = maxLength;
|
|
4980
4986
|
if (minLength)
|
|
4981
4987
|
inputLenghtProp.minLength = minLength;
|
|
4982
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("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 && jsxRuntime.jsx("div", { className: "tw
|
|
4988
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("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 && jsxRuntime.jsx("div", { className: "tw:text-sq-danger tw:text-xs tw:mt-1", children: errorText })] }));
|
|
4983
4989
|
});
|
|
4984
4990
|
|
|
4985
|
-
const alignment = 'tw
|
|
4986
|
-
const labelClasses = 'tw
|
|
4987
|
-
const baseClasses$5 = 'tw-border
|
|
4988
|
-
' dark:
|
|
4989
|
-
' checked:
|
|
4990
|
-
' checked:active:
|
|
4991
|
-
' dark:disabled:
|
|
4992
|
-
const checkboxClasses = `tw
|
|
4993
|
-
const radioClasses = `tw
|
|
4991
|
+
const alignment = 'tw:flex';
|
|
4992
|
+
const labelClasses = 'tw:ml-1.5 tw:text-sm tw:-mt-0.5';
|
|
4993
|
+
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' +
|
|
4994
|
+
' tw:dark:bg-sq-dark-background tw:dark:border-sq-dark-text tw:dark:hover:bg-sq-dark-background' +
|
|
4995
|
+
' tw:checked:text-white tw:checked:border-sq-text-color tw:checked:hover:border-sq-theme-dark' +
|
|
4996
|
+
' tw:checked:active:border-sq-theme-darker tw:checked:focus:border-sq-theme-dark tw:disabled:border-sq-disabled-gray' +
|
|
4997
|
+
' tw:dark:disabled:border-sq-fairly-dark-gray tw:dark:checked:focus:bg-sq-dark-background';
|
|
4998
|
+
const checkboxClasses = `tw:form-checkbox tw:rounded ${baseClasses$5}`;
|
|
4999
|
+
const radioClasses = `tw:form-radio tw:rounded-full ${baseClasses$5}`;
|
|
4994
5000
|
/**
|
|
4995
5001
|
* Checkbox and Radio Box Component.
|
|
4996
5002
|
*/
|
|
@@ -4998,25 +5004,25 @@ const Checkbox = (props) => {
|
|
|
4998
5004
|
const { type = 'checkbox', value, disabled = false, label, onChange, onClick, onKeyDown, checked, defaultChecked, id, name, extraClassNames, extraLabelClassNames, testId, ...tooltipProps } = props;
|
|
4999
5005
|
const assignedId = id ?? 'checkbox_' + Math.random();
|
|
5000
5006
|
const tooltipData = getQTipData(tooltipProps);
|
|
5001
|
-
return (jsxRuntime.jsxs("span", { className: `${alignment} ${extraClassNames}`, children: [jsxRuntime.jsx("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
|
|
5002
|
-
? 'tw
|
|
5003
|
-
: 'tw
|
|
5004
|
-
};
|
|
5005
|
-
|
|
5006
|
-
const baseClasses$4 = 'tw
|
|
5007
|
-
' disabled:
|
|
5008
|
-
' disabled:
|
|
5009
|
-
const darkTheme$2 = 'dark:
|
|
5010
|
-
'dark:
|
|
5011
|
-
const lightTheme$2 = 'tw
|
|
5012
|
-
const errorClasses$3 = 'tw
|
|
5007
|
+
return (jsxRuntime.jsxs("span", { className: `${alignment} ${extraClassNames}`, children: [jsxRuntime.jsx("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 && (jsxRuntime.jsx("label", { htmlFor: assignedId, className: `${labelClasses} ${extraLabelClassNames} ${disabled
|
|
5008
|
+
? 'tw:cursor-not-allowed tw:dark:text-sq-fairly-dark-gray tw:text-sq-fairly-dark-gray'
|
|
5009
|
+
: 'tw:cursor-pointer tw:text-sq-text-color tw:dark:text-sq-dark-text'}`, children: label }))] }));
|
|
5010
|
+
};
|
|
5011
|
+
|
|
5012
|
+
const baseClasses$4 = 'tw:leading-normal tw:outline-none tw:py-1 tw:px-3 tw:rounded-md tw:w-full' +
|
|
5013
|
+
' tw:disabled:pointer-events-none tw:disabled:bg-sq-light-gray tw:disabled:dark:bg-sq-dark-disabled-gray' +
|
|
5014
|
+
' tw:disabled:cursor-not-allowed tw:p-1 tw:border-solid tw:border tw:text-sm';
|
|
5015
|
+
const darkTheme$2 = 'tw:dark:bg-sq-dark-background tw:dark:text-sq-dark-text ' +
|
|
5016
|
+
'tw:dark:placeholder-sq-dark-text/30 tw:disabled:dark:text-sq-dark-text/30';
|
|
5017
|
+
const lightTheme$2 = 'tw:text-sq-text-color tw:placeholder-gray-400 tw:disabled:text-sq-darkish-gray';
|
|
5018
|
+
const errorClasses$3 = 'tw:border-sq-danger';
|
|
5013
5019
|
const borderColorClasses$3 = [
|
|
5014
|
-
'tw
|
|
5015
|
-
'dark:
|
|
5016
|
-
'dark:focus:
|
|
5017
|
-
'dark:active:
|
|
5018
|
-
'focus:
|
|
5019
|
-
'active:
|
|
5020
|
+
'tw:border-sq-disabled-gray',
|
|
5021
|
+
'tw:dark:border-sq-dark-disabled-gray',
|
|
5022
|
+
'tw:dark:focus:border-sq-theme-darker',
|
|
5023
|
+
'tw:dark:active:border-sq-theme-darker',
|
|
5024
|
+
'tw:focus:border-sq-theme-dark',
|
|
5025
|
+
'tw:active:border-sq-theme-dark',
|
|
5020
5026
|
].join(' ');
|
|
5021
5027
|
/**
|
|
5022
5028
|
* TextArea.
|
|
@@ -5065,25 +5071,25 @@ const TextArea = React.forwardRef(({ readonly = false, disabled = false, onChang
|
|
|
5065
5071
|
* display correctly.
|
|
5066
5072
|
*/
|
|
5067
5073
|
const Tooltip = ({ position = 'bottom', children, text, delay = DEFAULT_TOOL_TIP_DELAY, }) => {
|
|
5068
|
-
const arrowBaseClasses = "before:
|
|
5069
|
-
const centerArrowVertically = 'before:
|
|
5070
|
-
const centerArrowHorizontally = 'before:
|
|
5071
|
-
const arrowRight = `${arrowBaseClasses} ${centerArrowVertically} before:
|
|
5072
|
-
before:
|
|
5073
|
-
const arrowLeft = `${arrowBaseClasses} ${centerArrowVertically} before:
|
|
5074
|
-
before:
|
|
5075
|
-
const arrowBottom = `${arrowBaseClasses} ${centerArrowHorizontally} before:-
|
|
5076
|
-
before:
|
|
5077
|
-
const arrowTop = `${arrowBaseClasses} ${centerArrowHorizontally} before:-
|
|
5078
|
-
before:
|
|
5074
|
+
const arrowBaseClasses = "tw:before:content-[''] tw:before:absolute tw:before:border-8";
|
|
5075
|
+
const centerArrowVertically = 'tw:before:top-1/2 tw:before:-translate-y-1/2';
|
|
5076
|
+
const centerArrowHorizontally = 'tw:before:left-1/2 tw:before:-translate-x-1/2';
|
|
5077
|
+
const arrowRight = `${arrowBaseClasses} ${centerArrowVertically} tw:before:right-full tw:before:border-y-transparent
|
|
5078
|
+
tw:before:border-l-transparent tw:before:border-r-sq-black`;
|
|
5079
|
+
const arrowLeft = `${arrowBaseClasses} ${centerArrowVertically} tw:before:left-full tw:before:border-y-transparent
|
|
5080
|
+
tw:before:border-l-sq-black tw:before:border-r-transparent`;
|
|
5081
|
+
const arrowBottom = `${arrowBaseClasses} ${centerArrowHorizontally} tw:before:-top-4 tw:before:border-b-sq-black
|
|
5082
|
+
tw:before:border-r-transparent tw:before:border-l-transparent tw:before:border-t-transparent`;
|
|
5083
|
+
const arrowTop = `${arrowBaseClasses} ${centerArrowHorizontally} tw:before:-bottom-4 tw:before:border-b-transparent
|
|
5084
|
+
tw:before:border-t-sq-black tw:before:border-l-transparent tw:before:border-r-transparent`;
|
|
5079
5085
|
const placements = {
|
|
5080
|
-
top:
|
|
5081
|
-
left:
|
|
5082
|
-
right: `tw
|
|
5083
|
-
bottom:
|
|
5086
|
+
top: `tw:-top-2 tw:-translate-y-full tw:left-1/2 tw:-translate-x-1/2 ${arrowTop}`,
|
|
5087
|
+
left: `tw:-translate-x-full tw:-left-3 tw:-translate-y-1/2 tw:top-1/2 ${arrowLeft}`,
|
|
5088
|
+
right: `tw:translate-x-full tw:-right-3 tw:-translate-y-1/2 tw:top-1/2 ${arrowRight}`,
|
|
5089
|
+
bottom: `tw:-bottom-2 tw:translate-y-full tw:left-1/2 tw:-translate-x-1/2 ${arrowBottom}`,
|
|
5084
5090
|
};
|
|
5085
|
-
return (jsxRuntime.jsxs("div", { className: "tw
|
|
5086
|
-
tw
|
|
5091
|
+
return (jsxRuntime.jsxs("div", { className: "tw:group tw:relative tw:inline-block", children: [children, jsxRuntime.jsx("div", { className: `tw:z-50 tw:whitespace-nowrap tw:hidden tw:group-hover:inline-block tw:group-hover:delay-[${delay}ms]
|
|
5092
|
+
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 })] }));
|
|
5087
5093
|
};
|
|
5088
5094
|
|
|
5089
5095
|
/*! @license DOMPurify 3.2.6 | (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.6/LICENSE */
|
|
@@ -7583,8 +7589,8 @@ const QTip = () => {
|
|
|
7583
7589
|
: positionTooltip();
|
|
7584
7590
|
}
|
|
7585
7591
|
};
|
|
7586
|
-
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("div", { onMouseEnter: () => setOverTooltip(true), onMouseLeave: () => setOverTooltip(false), "data-testid": tooltipTestId, ref: tooltipRef, className: 'tw
|
|
7587
|
-
(show ? 'tw
|
|
7592
|
+
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.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 ' +
|
|
7593
|
+
(show ? 'tw:visible' : 'tw:invisible tw:pointer-events-none'), children: [html ? jsxRuntime.jsx(HTMLTip, { text: tooltipText }) : tooltipText, jsxRuntime.jsx("div", { className: "tw:absolute tw:w-2.5 tw:h-2.5 tw:rotate-45 tw:bg-sq-black", ref: tooltipArrowRef })] }) }));
|
|
7588
7594
|
};
|
|
7589
7595
|
|
|
7590
7596
|
function _typeof(o) {
|
|
@@ -13999,70 +14005,77 @@ var CreatableSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
13999
14005
|
});
|
|
14000
14006
|
var CreatableSelect$1 = CreatableSelect;
|
|
14001
14007
|
|
|
14002
|
-
const baseClasses$3 = ['focus:
|
|
14003
|
-
const containerStyles = ['tw
|
|
14004
|
-
const errorClasses$2 = 'tw
|
|
14005
|
-
const borderColorClasses$2 = ['tw
|
|
14006
|
-
const borderStyles$3 = ['tw
|
|
14008
|
+
const baseClasses$3 = ['tw:focus:ring-0', 'tw:disabled:cursor-not-allowed'].join(' ');
|
|
14009
|
+
const containerStyles = ['tw:bg-sq-white', 'tw:dark:bg-sq-dark-background'].join(' ');
|
|
14010
|
+
const errorClasses$2 = 'tw:border-sq-danger';
|
|
14011
|
+
const borderColorClasses$2 = ['tw:border-sq-disabled-gray', 'tw:dark:border-sq-dark-disabled-gray'].join(' ');
|
|
14012
|
+
const borderStyles$3 = ['tw:border-solid', 'tw:border'].join(' ');
|
|
14007
14013
|
const borderActiveClasses = [
|
|
14008
|
-
'hover:
|
|
14009
|
-
'focus-within:
|
|
14010
|
-
'active:
|
|
14011
|
-
'dark:hover:
|
|
14012
|
-
'dark:focus-within:
|
|
14013
|
-
'dark:active:
|
|
14014
|
+
'tw:hover:border-sq-theme-dark',
|
|
14015
|
+
'tw:focus-within:border-sq-theme-dark',
|
|
14016
|
+
'tw:active:border-sq-theme-dark',
|
|
14017
|
+
'tw:dark:hover:border-sq-theme-dark-dark',
|
|
14018
|
+
'tw:dark:focus-within:border-sq-theme-dark-dark',
|
|
14019
|
+
'tw:dark:active:border-sq-theme-dark-dark',
|
|
14014
14020
|
].join(' ');
|
|
14015
|
-
const textStyles = ['tw
|
|
14021
|
+
const textStyles = ['tw:text-sq-text-color', 'tw:dark:text-sq-dark-text', 'tw:text-sm'].join(' ');
|
|
14016
14022
|
const textActiveStyles = [
|
|
14017
|
-
'hover:
|
|
14018
|
-
'
|
|
14019
|
-
'
|
|
14023
|
+
'tw:hover:text-sq-theme-dark',
|
|
14024
|
+
'tw:focus:text-sq-theme-dark',
|
|
14025
|
+
'tw:active:text-sq-theme-dark',
|
|
14026
|
+
'tw:dark:text-sq-dark-disabled-gray',
|
|
14027
|
+
'tw:dark:hover:text-sq-theme-dark-dark',
|
|
14028
|
+
'tw:dark:focus:text-sq-theme-dark-dark',
|
|
14029
|
+
'tw:dark:active:text-sq-theme-dark-dark',
|
|
14030
|
+
'tw:hover:text-sq-theme-dark',
|
|
14031
|
+
'tw:dark:text-sq-dark-disabled-gray',
|
|
14032
|
+
'tw:dark:hover:text-sq-theme-dark-dark',
|
|
14020
14033
|
].join(' ');
|
|
14021
14034
|
const menuStyles = [
|
|
14022
|
-
'tw
|
|
14023
|
-
'tw
|
|
14024
|
-
'tw
|
|
14025
|
-
'tw
|
|
14026
|
-
'dark:
|
|
14027
|
-
'tw
|
|
14028
|
-
'tw
|
|
14029
|
-
'
|
|
14035
|
+
'tw:border-solid',
|
|
14036
|
+
'tw:border',
|
|
14037
|
+
'tw:rounded-b',
|
|
14038
|
+
'tw:border-sq-disabled-gray',
|
|
14039
|
+
'tw:dark:border-sq-dark-disabled-gray',
|
|
14040
|
+
'tw:whitespace-nowrap',
|
|
14041
|
+
'tw:min-w-fit',
|
|
14042
|
+
'tw:!z-[9999]',
|
|
14030
14043
|
].join(' ');
|
|
14031
14044
|
const menuListStyles = [
|
|
14032
|
-
'tw
|
|
14033
|
-
'tw
|
|
14034
|
-
'dark:
|
|
14035
|
-
'tw
|
|
14036
|
-
'
|
|
14045
|
+
'tw:rounded-b',
|
|
14046
|
+
'tw:bg-sq-white',
|
|
14047
|
+
'tw:dark:bg-sq-dark-background',
|
|
14048
|
+
'tw:min-w-fit',
|
|
14049
|
+
'tw:!z-[9999]',
|
|
14037
14050
|
'specSelectMenu',
|
|
14038
14051
|
].join(' ');
|
|
14039
14052
|
const groupHeadingStyles = [
|
|
14040
|
-
'tw
|
|
14041
|
-
'dark:
|
|
14042
|
-
'tw
|
|
14043
|
-
'tw
|
|
14044
|
-
'tw
|
|
14053
|
+
'tw:bg-sq-light-gray',
|
|
14054
|
+
'tw:dark:bg-sq-dark-disabled-gray',
|
|
14055
|
+
'tw:text-sq-darkish-gray',
|
|
14056
|
+
'tw:py-1',
|
|
14057
|
+
'tw:px-2.5',
|
|
14045
14058
|
'specSelectGroupHeading',
|
|
14046
14059
|
].join(' ');
|
|
14047
14060
|
const optionStyles = [
|
|
14048
|
-
'hover:
|
|
14049
|
-
'hover:
|
|
14050
|
-
'dark:hover:
|
|
14051
|
-
'tw
|
|
14052
|
-
'tw
|
|
14061
|
+
'tw:hover:bg-sq-gray-highlight',
|
|
14062
|
+
'tw:hover:cursor-pointer',
|
|
14063
|
+
'tw:dark:hover:bg-sq-gray-highlight-dark',
|
|
14064
|
+
'tw:py-1',
|
|
14065
|
+
'tw:px-2.5',
|
|
14053
14066
|
'specSelectOption',
|
|
14054
14067
|
].join(' ');
|
|
14055
|
-
const disabledClasses$3 = ['tw
|
|
14056
|
-
const dropDownIndicatorStyles = `tw
|
|
14057
|
-
const placeholderStyles = ['tw
|
|
14068
|
+
const disabledClasses$3 = ['tw:bg-sq-field-disabled-gray', 'tw:!cursor-not-allowed', 'tw:opacity-50'].join(' ');
|
|
14069
|
+
const dropDownIndicatorStyles = `tw:text-sq-disabled-gray ${textActiveStyles} specOpenIt`;
|
|
14070
|
+
const placeholderStyles = ['tw:text-gray-400', 'tw:dark:text-sq-dark-text-lighter', 'specOpenSelect'].join(' ');
|
|
14058
14071
|
const multiValueStyles = [
|
|
14059
|
-
'tw
|
|
14060
|
-
'dark:
|
|
14061
|
-
'tw
|
|
14062
|
-
'tw
|
|
14063
|
-
'tw
|
|
14064
|
-
'tw
|
|
14065
|
-
'tw
|
|
14072
|
+
'tw:bg-sq-disabled-gray',
|
|
14073
|
+
'tw:dark:bg-sq-multi-gray-dark',
|
|
14074
|
+
'tw:text-sm',
|
|
14075
|
+
'tw:py-0.5',
|
|
14076
|
+
'tw:px-1',
|
|
14077
|
+
'tw:m-0.5',
|
|
14078
|
+
'tw:rounded-sm',
|
|
14066
14079
|
'specOpenSelect',
|
|
14067
14080
|
].join(' ');
|
|
14068
14081
|
/**
|
|
@@ -14127,38 +14140,38 @@ const Select = ({ options, value, placeholder = 'select', noOptionsMessage = 'no
|
|
|
14127
14140
|
filterOption: filterOption ? filterOption : filterConfig ? createFilter(filterConfig) : undefined,
|
|
14128
14141
|
classNames: {
|
|
14129
14142
|
control: ({ menuIsOpen }) => {
|
|
14130
|
-
let border = menuIsOpen ? 'tw
|
|
14143
|
+
let border = menuIsOpen ? 'tw:rounded-t-md' : 'tw:rounded-md';
|
|
14131
14144
|
// if it's on the left side of the input group make sure the right side is straight and not curved
|
|
14132
14145
|
if (inputGroup === 'left') {
|
|
14133
|
-
border = menuIsOpen ? 'tw
|
|
14146
|
+
border = menuIsOpen ? 'tw:rounded-tl-md' : 'tw:rounded-l-md';
|
|
14134
14147
|
}
|
|
14135
14148
|
else if (inputGroup === 'right') {
|
|
14136
|
-
border = menuIsOpen ? 'tw
|
|
14149
|
+
border = menuIsOpen ? 'tw:rounded-tr-md' : 'tw:rounded-r-md';
|
|
14137
14150
|
}
|
|
14138
14151
|
const appliedClasses = `${borderStyles$3} ${isDisabled ? '' : borderActiveClasses} ${border} ${showError ? errorClasses$2 : borderColorClasses$2} ${small ? 'reactSelectMinHeightSmall' : 'reactSelectMinHeight'} ${controlClassNames}`;
|
|
14139
|
-
return `${appliedClasses} ${baseClasses$3} ${containerStyles} specSelectControl ${isDisabled ? disabledClasses$3 : ''} ${small ? 'tw
|
|
14152
|
+
return `${appliedClasses} ${baseClasses$3} ${containerStyles} specSelectControl ${isDisabled ? disabledClasses$3 : ''} ${small ? 'tw:pl-2 tw:pr-1' : 'tw:pl-2.5 tw:pr-1.5'}`;
|
|
14140
14153
|
},
|
|
14141
14154
|
placeholder: () => placeholderStyles,
|
|
14142
14155
|
container: ({ selectProps }) => {
|
|
14143
|
-
const containerBorderStyles = selectProps?.menuIsOpen ? 'tw
|
|
14144
|
-
return `${textStyles} ${extraClassNames} ${containerBorderStyles}
|
|
14156
|
+
const containerBorderStyles = selectProps?.menuIsOpen ? 'tw:rounded-t-md' : 'tw:rounded-md';
|
|
14157
|
+
return `${textStyles} ${extraClassNames} ${containerBorderStyles} tw:!pointer-events-auto`;
|
|
14145
14158
|
},
|
|
14146
14159
|
input: () => textStyles + ' specSelectInput',
|
|
14147
14160
|
menuList: () => menuListStyles,
|
|
14148
14161
|
menu: () => menuStyles,
|
|
14149
|
-
menuPortal: () => '
|
|
14162
|
+
menuPortal: () => 'tw:!z-[9000]',
|
|
14150
14163
|
dropdownIndicator: () => dropDownIndicatorStyles,
|
|
14151
14164
|
option: ({ isSelected, isDisabled }) => {
|
|
14152
14165
|
let classes = optionStyles;
|
|
14153
14166
|
if (isDisabled) {
|
|
14154
14167
|
classes += ' specDisabledOption ';
|
|
14155
14168
|
}
|
|
14156
|
-
return isSelected ? classes + ' tw
|
|
14169
|
+
return isSelected ? classes + ' tw:bg-sq-colored-hover tw:dark:bg-sq-colored-hover-dark' : classes;
|
|
14157
14170
|
},
|
|
14158
14171
|
singleValue: () => 'specOpenSelect',
|
|
14159
14172
|
multiValue: () => multiValueStyles,
|
|
14160
|
-
multiValueRemove: () => 'hover:
|
|
14161
|
-
clearIndicator: () => 'tw
|
|
14173
|
+
multiValueRemove: () => 'tw:hover:text-sq-danger specSelectMultiValueRemove',
|
|
14174
|
+
clearIndicator: () => 'tw:text-sq-disabled-gray tw:hover:text-sq-danger specClearSelect',
|
|
14162
14175
|
group: () => 'specSelectGroup',
|
|
14163
14176
|
groupHeading: () => groupHeadingStyles,
|
|
14164
14177
|
},
|
|
@@ -14550,11 +14563,11 @@ var classNames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
|
|
|
14550
14563
|
const Dialog = Root$4;
|
|
14551
14564
|
const DialogPortal = Portal$1;
|
|
14552
14565
|
const DialogClose = Close;
|
|
14553
|
-
const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => (jsxRuntime.jsxs(DialogPortal, { children: [jsxRuntime.jsx("div", { className: "tw
|
|
14554
|
-
tw
|
|
14555
|
-
tw
|
|
14566
|
+
const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => (jsxRuntime.jsxs(DialogPortal, { children: [jsxRuntime.jsx("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 " }), jsxRuntime.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
|
|
14567
|
+
tw:gap-4 tw:border tw:bg-sq-white tw:dark:bg-sq-dark-background tw:shadow-lg tw:duration-200
|
|
14568
|
+
tw:rounded-lg ${className}`, ...props, children: [jsxRuntime.jsx(DialogTitle$1, { className: "tw:hidden" }), children] })] })));
|
|
14556
14569
|
DialogContent.displayName = Content$2.displayName;
|
|
14557
|
-
const DialogHeader = (props) => (jsxRuntime.jsx("div", { className: "tw
|
|
14570
|
+
const DialogHeader = (props) => (jsxRuntime.jsx("div", { className: "tw:w-full tw:justify-between", children: jsxRuntime.jsx("div", { ...props }) }));
|
|
14558
14571
|
DialogHeader.displayName = 'DialogHeader';
|
|
14559
14572
|
const DialogFooter = (props) => jsxRuntime.jsx("div", { ...props });
|
|
14560
14573
|
DialogFooter.displayName = 'DialogFooter';
|
|
@@ -14592,26 +14605,26 @@ const Modal = ({ titleIcon, title = 'Modal title example', titleSuffixLabel, sub
|
|
|
14592
14605
|
let titleIconElement = jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
14593
14606
|
if (titleIcon) {
|
|
14594
14607
|
if (typeof titleIcon === 'string') {
|
|
14595
|
-
titleIconElement = (jsxRuntime.jsx(Icon, { icon: titleIcon, testId: "modalTitleIcon", extraClassNames: "tw
|
|
14608
|
+
titleIconElement = (jsxRuntime.jsx(Icon, { icon: titleIcon, testId: "modalTitleIcon", extraClassNames: "tw:flex tw:text-xl tw:mt-1" }));
|
|
14596
14609
|
}
|
|
14597
14610
|
else {
|
|
14598
|
-
titleIconElement = jsxRuntime.jsx("div", { className: "tw
|
|
14611
|
+
titleIconElement = jsxRuntime.jsx("div", { className: "tw:mt-1.5", children: titleIcon });
|
|
14599
14612
|
}
|
|
14600
14613
|
}
|
|
14601
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [titleIcon && titleIconPosition === 'left' ? jsxRuntime.jsx("div", { className: "tw
|
|
14614
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [titleIcon && titleIconPosition === 'left' ? jsxRuntime.jsx("div", { className: "tw:flex tw:mr-2", children: titleIconElement }) : jsxRuntime.jsx(jsxRuntime.Fragment, {}), jsxRuntime.jsx(DialogTitle, { asChild: true, children: isTitleEditable ? (jsxRuntime.jsxs("div", { className: "tw:flex tw:w-full tw:items-center", children: [jsxRuntime.jsx(TextField, { extraClassNames: inputExtraClassNames, value: title, type: "text", testId: "modalTitle", onChange: onTitleChanged, placeholder: titlePlaceholder, required: titleRequired, showError: !!titleError }), titleError && jsxRuntime.jsx("p", { className: "tw:text-sq-danger tw:min-w-fit tw:pl-2 tw:mb-0", children: titleError })] })) : (customHeader ?? (jsxRuntime.jsxs("div", { "data-testid": "modalTitle", className: "modal-title", children: [jsxRuntime.jsxs("div", { className: "tw:flex tw:items-center", children: [jsxRuntime.jsx("h3", { children: title }), titleSuffixLabel && jsxRuntime.jsx("span", { className: "tw:text-xl tw:pl-0.5", children: titleSuffixLabel })] }), subtitle && (jsxRuntime.jsx("div", { className: "tw:italic tw:text-sm tw:text-left tw:mt-1", "data-testid": "modal-subtitle", children: subtitle }))] }))) }), titleIcon && titleIconPosition === 'right' ? jsxRuntime.jsx("div", { className: "tw:flex tw:ml-4", children: titleIconElement }) : jsxRuntime.jsx(jsxRuntime.Fragment, {})] }));
|
|
14602
14615
|
};
|
|
14603
|
-
return open ? (jsxRuntime.jsx(Dialog, { open: true, onOpenChange: onClose, modal: keepFocusInsideModal, children: jsxRuntime.jsxs(DialogContent, { onPointerDownOutside: (e) => (onPointerDownOutside ? onPointerDownOutside(e) : e.preventDefault()), onInteractOutside: (e) => (onInteractOutside ? onInteractOutside(e) : e.preventDefault()), "data-testid": testId, className: classNames(`modalContent tw
|
|
14604
|
-
'tw
|
|
14605
|
-
'tw
|
|
14606
|
-
'tw
|
|
14607
|
-
'tw
|
|
14608
|
-
'tw
|
|
14609
|
-
'tw
|
|
14610
|
-
'tw
|
|
14611
|
-
'tw
|
|
14612
|
-
'tw
|
|
14613
|
-
'tw
|
|
14614
|
-
}, dialogClassName), children: [jsxRuntime.jsxs(DialogHeader, { className: "modal-header tw
|
|
14616
|
+
return open ? (jsxRuntime.jsx(Dialog, { open: true, onOpenChange: onClose, modal: keepFocusInsideModal, children: jsxRuntime.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:border-none tw:shadow-none tw:dark:text-sq-dark-text tw:!gap-0`, {
|
|
14617
|
+
'tw:max-w-xs': size === 'xs',
|
|
14618
|
+
'tw:max-w-sm': size === 'sm',
|
|
14619
|
+
'tw:max-w-md': size === 'md',
|
|
14620
|
+
'tw:max-w-lg': size === 'lg',
|
|
14621
|
+
'tw:max-w-xl': size === 'xl',
|
|
14622
|
+
'tw:max-w-2xl': size === '2xl',
|
|
14623
|
+
'tw:max-w-3xl': size === '3xl',
|
|
14624
|
+
'tw:max-w-4xl': size === '4xl',
|
|
14625
|
+
'tw:max-w-5xl': size === '5xl',
|
|
14626
|
+
'tw:max-w-6xl': size === '6xl',
|
|
14627
|
+
}, dialogClassName), children: [jsxRuntime.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: [jsxRuntime.jsx("div", { className: "tw:flex tw:w-full", children: renderTitle() }), !hideCloseIcon && (jsxRuntime.jsx(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: jsxRuntime.jsx("span", { className: "tw:cursor-pointer", children: "\u00D7" }) }))] }), jsxRuntime.jsx(DialogDescription, { className: "modal-body tw:px-6 tw:py-4 tw:overflow-y-auto", asChild: true, children: children }), !hideFooterButtons && (jsxRuntime.jsx(DialogFooter, { className: "modal-footer tw:px-6 tw:py-4", children: modalFooter ?? (jsxRuntime.jsxs("div", { className: "tw:flex tw:w-full tw:justify-between", "data-testid": "modalFooter", children: [jsxRuntime.jsx("div", { className: "tw:flex tw:justify-start", children: customButton && (jsxRuntime.jsx(Button, { label: customButtonLabel, onClick: onClickCustomButton, disabled: disableCustomButton, extraClassNames: "tw:justify-start tw:min-w-25", testId: "customButton", variant: customButtonVariant })) }), jsxRuntime.jsxs("div", { className: "tw:flex tw:justify-end", children: [jsxRuntime.jsx("div", { className: "tw:flex tw:items-center", children: middleFooterSection }), !hideCancelButton && (jsxRuntime.jsx(DialogClose, { asChild: true, children: jsxRuntime.jsx(Button, { label: cancelButtonLabel, extraClassNames: "tw:mr-5 tw:min-w-25", tooltip: cancelButtonTooltip, variant: "outline", stopPropagation: false, testId: "cancelButton" }) })), !hideSubmitButton && (jsxRuntime.jsx(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-25" }))] })] })) }))] }) })) : (jsxRuntime.jsx(jsxRuntime.Fragment, {}));
|
|
14615
14628
|
};
|
|
14616
14629
|
|
|
14617
14630
|
function createCollection(name) {
|
|
@@ -15075,11 +15088,11 @@ const Tabs = ({ tabs, defaultActiveTab, activeTab, onTabSelect, extraClassNames,
|
|
|
15075
15088
|
return;
|
|
15076
15089
|
onTabSelect && onTabSelect(tabId);
|
|
15077
15090
|
};
|
|
15078
|
-
return (jsxRuntime.jsxs(Root2$2, { className: `tw
|
|
15079
|
-
? 'tw
|
|
15080
|
-
: 'hover:
|
|
15081
|
-
? 'dark:
|
|
15082
|
-
: 'dark:
|
|
15091
|
+
return (jsxRuntime.jsxs(Root2$2, { className: `tw:flex tw:flex-col tw:min-w-75 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: [jsxRuntime.jsx(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) => (jsxRuntime.jsx(Trigger$2, { className: `tw:bg-sq-white tw:dark:bg-sq-dark-background tw:h-sq-25 tw:focus-visible:outline-none tw:min-w-25 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
|
|
15092
|
+
? 'tw:border-b-sq-theme-darker tw:dark:border-b-sq-theme-darker tw:border-b-[0.1875rem]'
|
|
15093
|
+
: 'tw:hover:bg-sq-light-gray tw:border-b-[0.0625rem] tw:hover:dark:bg-gray-700'}`, "data-testid": tabsTestId, disabled: disabled, value: id, children: jsxRuntime.jsxs("span", { className: "tw:flex tw:items-center tw:overflow-hidden", children: [icon && (jsxRuntime.jsx(Icon, { icon: icon, testId: `${id}_tab-icon`, extraClassNames: "tw:text-sq-15 tw:mr-sq-7 tw:flex-shrink-0" })), jsxRuntime.jsx("span", { className: `tw:text-sq-13 tw:font-medium tw:whitespace-nowrap tw:overflow-hidden tw:text-ellipsis ${activeTab === id
|
|
15094
|
+
? 'tw:dark:text-sq-dark-text tw:text-gray-500'
|
|
15095
|
+
: 'tw:dark:text-sq-theme-darker tw:text-sq-theme-dark'} ${tabLabelExtraClassNames}`, children: label })] }) }, `${label}-${id}-${index}`))) }), tabs.map((tab, index) => (jsxRuntime.jsx(Content$1, { className: `tw:bg-sq-white tw:dark:bg-sq-dark-background tw:overflow-y-auto tw:-mt-sq-1 tw:border-t-[0.0625rem] 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`)))] }));
|
|
15083
15096
|
};
|
|
15084
15097
|
|
|
15085
15098
|
var COLLAPSIBLE_NAME = "Collapsible";
|
|
@@ -15507,18 +15520,18 @@ var Trigger2 = AccordionTrigger;
|
|
|
15507
15520
|
var Content2$2 = AccordionContent;
|
|
15508
15521
|
|
|
15509
15522
|
const Accordion = ({ accordionItems, defaultValue, value, onItemSelect, disabled, extraClassNames, testId, }) => {
|
|
15510
|
-
return (jsxRuntime.jsx(Root2$1, { className: `tw
|
|
15523
|
+
return (jsxRuntime.jsx(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) => (jsxRuntime.jsxs(Item, { className: `tw:p-0 tw:flex tw:flex-col tw:w-full`, disabled: disabled, value: item.value, children: [jsxRuntime.jsx(Trigger2, { disabled: disabled, className: `tw:w-full tw:cursor-default tw:focus-visible:outline-none tw:bg-transparent`, children: item.trigger }), jsxRuntime.jsx(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))) }));
|
|
15511
15524
|
};
|
|
15512
15525
|
|
|
15513
|
-
const bgStyles$2 = ['tw
|
|
15526
|
+
const bgStyles$2 = ['tw:bg-sq-white', 'tw:dark:bg-sq-dark-background'].join(' ');
|
|
15514
15527
|
const borderStyles$2 = [
|
|
15515
|
-
'tw
|
|
15516
|
-
'tw
|
|
15517
|
-
'tw
|
|
15518
|
-
'tw
|
|
15519
|
-
'dark:
|
|
15528
|
+
'tw:border-solid',
|
|
15529
|
+
'tw:border',
|
|
15530
|
+
'tw:rounded-[0.5rem]',
|
|
15531
|
+
'tw:border-sq-disabled-gray',
|
|
15532
|
+
'tw:dark:border-gray-500',
|
|
15520
15533
|
].join(' ');
|
|
15521
|
-
const disabledClasses$2 = ['tw
|
|
15534
|
+
const disabledClasses$2 = ['tw:opacity-50', 'tw:cursor-not-allowed'].join(' ');
|
|
15522
15535
|
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 }) => {
|
|
15523
15536
|
const tooltipData = getQTipData(tooltipProps);
|
|
15524
15537
|
const timeout = React.useRef(null);
|
|
@@ -15549,12 +15562,12 @@ const ButtonWithPopover = ({ children, trigger, id, hasArrow, extraTriggerClassN
|
|
|
15549
15562
|
};
|
|
15550
15563
|
React__namespace.useEffect(() => clearHoverTimeout, []);
|
|
15551
15564
|
const renderContent = () => {
|
|
15552
|
-
return (jsxRuntime.jsx(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:
|
|
15553
|
-
data-[side=top]:
|
|
15554
|
-
${extraPopoverClassNames || ''}`, children: [hasArrow && (jsxRuntime.jsx(Arrow2$2, { asChild: true, children: jsxRuntime.jsx("div", { className: "tw
|
|
15565
|
+
return (jsxRuntime.jsx(Content2$3, { sideOffset: placementOffset, align: align, side: placement, onInteractOutside: onInteractOutside, onPointerDownOutside: onPointerDownOutside, alignOffset: isHoverEnabled ? -10 : alignOffset, asChild: true, onClick: () => isCloseOnContentClick && onOpenChange && onOpenChange(false), className: "tw:focus-visible:outline-none tw:outline-none tw:w-full tw:h-full", children: jsxRuntime.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 tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out
|
|
15566
|
+
tw:data-[side=top]:animate-slideDownAndFade tw:data-[side=right]:animate-slideLeftAndFade tw:data-[side=bottom]:animate-slideUpAndFade tw:data-[side=left]:animate-slideRightAndFade tw:text-sq-text-color
|
|
15567
|
+
${extraPopoverClassNames || ''}`, children: [hasArrow && (jsxRuntime.jsx(Arrow2$2, { asChild: true, children: jsxRuntime.jsx("div", { className: "tw:fill-transparent tw:bg-sq-white tw:w-sq-15 tw:h-sq-15 tw:-mt-sq-7 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] }) }));
|
|
15555
15568
|
};
|
|
15556
15569
|
const renderPopover = (popoverOpenState) => {
|
|
15557
|
-
return (jsxRuntime.jsxs(Root2$3, { open: popoverOpenState, defaultOpen: false, onOpenChange: onOpenChange, children: [trigger ? (jsxRuntime.jsx(Trigger$3, { id: id, asChild: isTriggerAsChild, className: `focus-visible:
|
|
15570
|
+
return (jsxRuntime.jsxs(Root2$3, { open: popoverOpenState, defaultOpen: false, onOpenChange: onOpenChange, children: [trigger ? (jsxRuntime.jsx(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: jsxRuntime.jsx("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 }) })) : (jsxRuntime.jsx(Trigger$3, { asChild: true, children: jsxRuntime.jsx("div", {}) })), isPortal ? jsxRuntime.jsx(Portal$2, { children: renderContent() }) : renderContent()] }));
|
|
15558
15571
|
};
|
|
15559
15572
|
return isHoverEnabled ? renderPopover(isHoveredOpen) : renderPopover(isOpen);
|
|
15560
15573
|
};
|
|
@@ -16624,65 +16637,65 @@ var SubTrigger2 = DropdownMenuSubTrigger;
|
|
|
16624
16637
|
var SubContent2 = DropdownMenuSubContent;
|
|
16625
16638
|
|
|
16626
16639
|
const borderStyles$1 = [
|
|
16627
|
-
'tw
|
|
16628
|
-
'tw
|
|
16629
|
-
'tw
|
|
16630
|
-
'tw
|
|
16631
|
-
'dark:
|
|
16640
|
+
'tw:border-solid',
|
|
16641
|
+
'tw:border',
|
|
16642
|
+
'tw:rounded-[0.5rem]',
|
|
16643
|
+
'tw:border-sq-disabled-gray',
|
|
16644
|
+
'tw:dark:border-gray-500',
|
|
16632
16645
|
].join(' ');
|
|
16633
|
-
const bgStyles$1 = ['tw
|
|
16634
|
-
const disabledClasses$1 = ['tw
|
|
16646
|
+
const bgStyles$1 = ['tw:bg-sq-white', 'tw:dark:bg-sq-dark-background'].join(' ');
|
|
16647
|
+
const disabledClasses$1 = ['tw:opacity-50', 'tw:cursor-not-allowed'].join(' ');
|
|
16635
16648
|
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 }) => {
|
|
16636
16649
|
const tooltipData = getQTipData(tooltipProps);
|
|
16637
|
-
return (jsxRuntime.jsxs(Root2, { defaultOpen: false, open: isOpen, onOpenChange: onOpenChange, modal: keepFocusInsideDropdown, children: [jsxRuntime.jsx(Trigger, { id: id, className: `tw-border-none focus-visible:
|
|
16650
|
+
return (jsxRuntime.jsxs(Root2, { defaultOpen: false, open: isOpen, onOpenChange: onOpenChange, modal: keepFocusInsideDropdown, children: [jsxRuntime.jsx(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: jsxRuntime.jsx("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 }) }), jsxRuntime.jsx(Portal2, { children: jsxRuntime.jsx(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: jsxRuntime.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 && (jsxRuntime.jsx(Arrow2, { asChild: true, children: jsxRuntime.jsx("div", { className: "tw:fill-transparent tw:bg-sq-white tw:w-sq-15 tw:h-sq-15 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-sq-7" }) })), dropdownItems.map((item, index) => {
|
|
16638
16651
|
const tooltipData = getQTipData(item);
|
|
16639
16652
|
if (item.isLabel) {
|
|
16640
|
-
return (jsxRuntime.jsxs(Label2, { className: item.itemExtraClassNames, ...tooltipData, children: [item.icon && (jsxRuntime.jsx(Icon, { icon: item.icon, testId: item.iconTestId, type: "text", color: item.iconColor, extraClassNames: "tw
|
|
16653
|
+
return (jsxRuntime.jsxs(Label2, { className: item.itemExtraClassNames, ...tooltipData, children: [item.icon && (jsxRuntime.jsx(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-4.5" })), jsxRuntime.jsx("div", { "data-testid": item.labelTestId, className: `tw:text-sq-13 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));
|
|
16641
16654
|
}
|
|
16642
16655
|
if (Array.isArray(item.subMenuItems) && item.subMenuItems.length > 0) {
|
|
16643
|
-
return (jsxRuntime.jsxs(Sub2, { children: [jsxRuntime.jsxs(SubTrigger2, { id: id, className: `tw
|
|
16644
|
-
? '
|
|
16645
|
-
: 'tw
|
|
16646
|
-
return (jsxRuntime.jsxs(Item2, { onSelect: subItem.onClick, "data-qtip-text": subItem.tooltip, className: "tw
|
|
16647
|
-
? 'tw
|
|
16648
|
-
: 'tw
|
|
16656
|
+
return (jsxRuntime.jsxs(Sub2, { children: [jsxRuntime.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-sq-27 tw:pl-sq-19 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: [jsxRuntime.jsxs("div", { className: "tw:flex", children: [item.icon && (jsxRuntime.jsx(Icon, { icon: item.icon, extraClassNames: `tw:w-4.5 ${item.disabled
|
|
16657
|
+
? 'tw:!text-sq-disabled-gray'
|
|
16658
|
+
: 'tw:text-sq-text-color tw:dark:text-sq-white'} ${item.iconExtraClassNames || ''}` })), jsxRuntime.jsx("div", { "data-testid": item.labelTestId, "data-customid": item.labelCustomId, className: `tw:text-sq-13 tw:ml-1 ${item.disabled && 'tw:!opacity-30'} tw:not-italic tw:font-semibold ${item.labelClasses}`, children: item.label })] }), jsxRuntime.jsx(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-4.5 tw:ml-4 tw:text-2 tw:justify-center tw:flex` })] }), jsxRuntime.jsx(Portal2, { children: jsxRuntime.jsx(SubContent2, { className: "tw:focus-visible:outline-none tw:outline-none", children: jsxRuntime.jsx("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) => {
|
|
16659
|
+
return (jsxRuntime.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-sq-27 tw:px-sq-19 tw:relative tw:select-none tw:outline-none tw:data-disabled:pointer-events-none", disabled: subItem.disabled, children: [subItem.iconClass && (jsxRuntime.jsx(Icon, { icon: subItem.iconClass, type: "text", extraClassNames: `tw:w-4.5 ${item.disabled && 'tw:!opacity-30'}` })), jsxRuntime.jsx("div", { className: `tw:text-sq-13 tw:ml-1 ${subItem.disabled
|
|
16660
|
+
? 'tw:text-sq-disabled-gray'
|
|
16661
|
+
: 'tw:text-sq-text-color tw:dark:text-sq-white'} tw:not-italic tw:font-normal ${item.labelClasses}`, children: subItem.label })] }, subItem.label + subIndex));
|
|
16649
16662
|
}) }) }) })] }, (item.id || item.icon || '') + index));
|
|
16650
16663
|
}
|
|
16651
16664
|
return (jsxRuntime.jsxs("div", { ...tooltipData, children: [jsxRuntime.jsxs(Item2, { "data-customid": item.itemCustomId, onSelect: (e) => {
|
|
16652
16665
|
item.onClick(e);
|
|
16653
|
-
}, className: `tw
|
|
16666
|
+
}, 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-sq-27 tw:px-sq-19 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 && (jsxRuntime.jsx(Icon, { icon: item.icon, testId: item.iconTestId, type: (item.iconType || 'text'), color: item.iconColor, customId: item.iconCustomId, extraClassNames: `tw:w-sq-4.5 ${item.disabled && 'tw:!opacity-30'} ${item.iconExtraClassNames || ''}` })), jsxRuntime.jsx("div", { "data-testid": item.labelTestId, "data-customid": item.labelCustomId, className: `tw:text-sq-13 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 && (jsxRuntime.jsx(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));
|
|
16654
16667
|
})] }) }) })] }));
|
|
16655
16668
|
};
|
|
16656
16669
|
|
|
16657
|
-
const baseClasses$2 = 'tw
|
|
16658
|
-
' tw
|
|
16659
|
-
const darkTheme$1 = 'dark:
|
|
16660
|
-
const lightTheme$1 = 'tw
|
|
16661
|
-
const errorClasses$1 = 'tw
|
|
16662
|
-
const borderColorClasses$1 = 'tw
|
|
16670
|
+
const baseClasses$2 = 'tw:mx-auto tw:leading-normal tw:outline-none tw:py-2 tw:px-3 tw:rounded-[10px] tw:w-full tw:relative' +
|
|
16671
|
+
' tw:border-solid tw:border tw:text-sm tw:flex tw:flex-col tw:justify-center tw:items-center';
|
|
16672
|
+
const darkTheme$1 = 'tw:dark:bg-sq-theme-hover-dark tw:dark:text-sq-text-color-dark';
|
|
16673
|
+
const lightTheme$1 = 'tw:text-sq-text-color tw:bg-sq-theme-highlight/10';
|
|
16674
|
+
const errorClasses$1 = 'tw:border-sq-danger';
|
|
16675
|
+
const borderColorClasses$1 = 'tw:border-sq-theme-dark';
|
|
16663
16676
|
/**
|
|
16664
16677
|
* Alert.
|
|
16665
16678
|
*/
|
|
16666
16679
|
const Alert = ({ children, dismissible = true, onClose, show = true, variant, testId = 'alert-id', id, extraClassNames, ...tooltipProps }) => {
|
|
16667
16680
|
const appliedTheme = {
|
|
16668
16681
|
theme: `${lightTheme$1} ${darkTheme$1}`,
|
|
16669
|
-
formulaError: 'tw
|
|
16670
|
-
danger: 'tw
|
|
16671
|
-
warning: 'tw
|
|
16672
|
-
gray: 'tw
|
|
16682
|
+
formulaError: 'tw:text-red-800 tw:bg-red-200 tw:!rounded-[0.25rem]',
|
|
16683
|
+
danger: 'tw:text-sq-text-color tw:bg-sq-danger',
|
|
16684
|
+
warning: 'tw:bg-sq-bg-warning tw:text-sq-text-color',
|
|
16685
|
+
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',
|
|
16673
16686
|
};
|
|
16674
16687
|
const appliedBorderTheme = {
|
|
16675
16688
|
theme: borderColorClasses$1,
|
|
16676
16689
|
danger: errorClasses$1,
|
|
16677
|
-
warning: 'tw
|
|
16678
|
-
gray: 'tw
|
|
16679
|
-
formulaError: 'tw
|
|
16690
|
+
warning: 'tw:border-none',
|
|
16691
|
+
gray: 'tw:border-sq-darkish-gray',
|
|
16692
|
+
formulaError: 'tw:border-red-100',
|
|
16680
16693
|
};
|
|
16681
16694
|
const appliedClasses = `${baseClasses$2} ${appliedTheme[variant]} ${extraClassNames} ${appliedBorderTheme[variant]}`;
|
|
16682
16695
|
if (!show) {
|
|
16683
16696
|
return jsxRuntime.jsx("div", {});
|
|
16684
16697
|
}
|
|
16685
|
-
return (jsxRuntime.jsxs("div", { "data-testid": testId, id: id, className: appliedClasses, children: [children, dismissible && (jsxRuntime.jsx(Icon, { icon: "fc-delete", type: variant.match(/danger|warning|formulaError/) ? 'color' : 'theme', color: variant.match(/danger|warning|formulaError/) ? 'inherit' : undefined, extraClassNames: `tw
|
|
16698
|
+
return (jsxRuntime.jsxs("div", { "data-testid": testId, id: id, className: appliedClasses, children: [children, dismissible && (jsxRuntime.jsx(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-size-11 tw:cursor-pointer tw:absolute tw:right-2.5 tw:top-2.5 ${variant.match(/danger|warning|gray|formulaError/) ? 'tw:text-sq-text-color tw:dark:text-sq-dark-text' : ''}`, testId: `${testId}-close-btn`, onClick: onClose, ...tooltipProps }))] }));
|
|
16686
16699
|
};
|
|
16687
16700
|
|
|
16688
16701
|
/**
|
|
@@ -16701,47 +16714,40 @@ const Alert = ({ children, dismissible = true, onClose, show = true, variant, te
|
|
|
16701
16714
|
* @param tooltipProps - props to pass to the tooltip
|
|
16702
16715
|
*/
|
|
16703
16716
|
const SvgIcon = ({ onClick, icon, color, type = 'default', extraClassNames, viewBox = '0 0 19 19', id, testId, customId, ...tooltipProps }) => {
|
|
16704
|
-
const appliedClassNames = `${onClick ? 'tw
|
|
16705
|
-
tw
|
|
16717
|
+
const appliedClassNames = `${onClick ? 'tw:cursor-pointer' : ''} ${extraClassNames} tw:focus:outline-none tw:focus-visible:outline-none
|
|
16718
|
+
tw:outline-none`;
|
|
16706
16719
|
const tooltipData = getQTipData(tooltipProps);
|
|
16707
16720
|
const appliedType = type === 'default' ? 'currentColor' : 'rgb(var(--sq-icon))';
|
|
16708
|
-
return (jsxRuntime.jsx("div", { onClick: onClick, ...tooltipData, className: `svgContainer ${appliedClassNames}`, children: jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: `tw
|
|
16721
|
+
return (jsxRuntime.jsx("div", { onClick: onClick, ...tooltipData, className: `svgContainer ${appliedClassNames}`, children: jsxRuntime.jsx("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: jsxRuntime.jsx("path", { d: getSvgIconPath(icon) }) }) }));
|
|
16709
16722
|
};
|
|
16710
16723
|
|
|
16711
16724
|
const SeeqActionDropdownItem = (item) => {
|
|
16712
16725
|
let renderIcon = jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
16713
16726
|
if (item.icon) {
|
|
16714
|
-
renderIcon = isSvgIcon(item.icon) ? (jsxRuntime.jsx(SvgIcon, { icon: item.icon, extraClassNames: 'tw-
|
|
16715
|
-
' dark:tw-text-sq-white tw-text-[22px] tw-text-sq-white ' +
|
|
16716
|
-
item.iconExtraClassNames, ...item })) : (jsxRuntime.jsx(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 ' +
|
|
16717
|
-
item.iconExtraClassNames }));
|
|
16727
|
+
renderIcon = isSvgIcon(item.icon) ? (jsxRuntime.jsx(SvgIcon, { icon: item.icon, extraClassNames: item.iconExtraClassNames + 'tw:p-1 tw:h-8 tw:w-8 tw:dark:text-sq-white tw:!text-5.5 tw:text-sq-white', ...item })) : (jsxRuntime.jsx(Icon, { icon: item.icon, type: "text", extraClassNames: 'tw:dark:text-sq-white tw:!text-5.5 tw:text-sq-white ' + item.iconExtraClassNames }));
|
|
16718
16728
|
}
|
|
16719
|
-
return (jsxRuntime.jsxs("div", { className: "tw
|
|
16729
|
+
return (jsxRuntime.jsxs("div", { className: "tw:flex-col tw:flex tw:p-2.5 tw:pl-5 tw:w-150", children: [jsxRuntime.jsxs("div", { className: "tw:flex tw:flex-row tw:gap-2 tw:items-end", children: [jsxRuntime.jsx("div", { className: classNames('tw:rounded-[0.1875rem] tw:h-8 tw:w-8 tw:bg-sq-theme-dark tw:flex tw:justify-center tw:items-center ', item.iconContainerExtraClassNames), children: renderIcon }), jsxRuntime.jsx("h4", { className: "tw:text-base tw:font-[600] tw:leading-5 mb-0", children: item.display })] }), jsxRuntime.jsx("div", { className: "tw:text-sq-13 tw:font-normal", children: item.text })] }));
|
|
16720
16730
|
};
|
|
16721
16731
|
const ViewWorkbench = (item) => {
|
|
16722
16732
|
let renderIcon = jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
16723
16733
|
if (item.icon) {
|
|
16724
|
-
renderIcon = isSvgIcon(item.icon) ? (jsxRuntime.jsx(SvgIcon, { icon: item.icon, extraClassNames: 'tw-
|
|
16725
|
-
' tw-text-sq-text-color ' +
|
|
16726
|
-
item.iconExtraClassNames, type: "default", ...item })) : (jsxRuntime.jsx(Icon, { icon: item.icon, type: "text", extraClassNames: 'tw-flex tw-justify-center tw-items-center tw-text-[1.25rem] dark:tw-text-sq-white' +
|
|
16727
|
-
' tw-text-sq-text-color ' +
|
|
16728
|
-
item.iconExtraClassNames }));
|
|
16734
|
+
renderIcon = isSvgIcon(item.icon) ? (jsxRuntime.jsx(SvgIcon, { icon: item.icon, extraClassNames: 'tw:w-4 tw:text-5 tw:dark:text-sq-white' + ' tw:text-sq-text-color ' + item.iconExtraClassNames, type: "default", ...item })) : (jsxRuntime.jsx(Icon, { icon: item.icon, type: "text", extraClassNames: 'tw:text-5 tw:dark:text-sq-white tw:text-sq-text-color ' + item.iconExtraClassNames }));
|
|
16729
16735
|
}
|
|
16730
|
-
return (jsxRuntime.jsx("div", { className: "tw
|
|
16736
|
+
return (jsxRuntime.jsx("div", { className: "tw:flex-col tw:flex tw:p-2.5", children: jsxRuntime.jsxs("div", { className: "tw:flex tw:flex-row tw:gap-2 tw:items-end", children: [jsxRuntime.jsx("div", { className: "tw:rounded-[0.1875rem] tw:h-5 tw:w-5 tw:flex tw:justify-center tw:items-center ", children: renderIcon }), jsxRuntime.jsx("div", { className: "tw:text-sq-13", children: item.display })] }) }));
|
|
16731
16737
|
};
|
|
16732
16738
|
const InsertSeeqContent = (item) => {
|
|
16733
|
-
return (jsxRuntime.jsxs("div", { className: "tw
|
|
16739
|
+
return (jsxRuntime.jsxs("div", { className: "tw:flex-col tw:flex tw:justify-start tw:p-2.5 tw:font-normal tw:text-left tw:text-sq-text-color tw:dark:text-sq-dark-text", children: [jsxRuntime.jsx("h5", { className: "tw:text-4 tw:font-medium tw:text-sq-theme-dark tw:leading-4.5", children: item.display }), jsxRuntime.jsx("div", { className: "tw:text-sq-13 tw:text-sq-text-color tw:dark:text-sq-dark-text tw:!mt-1", children: item.text })] }));
|
|
16734
16740
|
};
|
|
16735
16741
|
|
|
16736
16742
|
const borderStyles = [
|
|
16737
|
-
'tw
|
|
16738
|
-
'tw
|
|
16739
|
-
'tw
|
|
16740
|
-
'tw
|
|
16741
|
-
'dark:
|
|
16743
|
+
'tw:border-solid',
|
|
16744
|
+
'tw:border',
|
|
16745
|
+
'tw:rounded-md',
|
|
16746
|
+
'tw:border-sq-disabled-gray',
|
|
16747
|
+
'tw:dark:border-gray-500',
|
|
16742
16748
|
].join(' ');
|
|
16743
|
-
const bgStyles = ['tw
|
|
16744
|
-
const disabledClasses = ['tw
|
|
16749
|
+
const bgStyles = ['tw:bg-sq-white', 'tw:dark:bg-sq-dark-background'].join(' ');
|
|
16750
|
+
const disabledClasses = ['tw:opacity-50', 'tw:cursor-not-allowed'].join(' ');
|
|
16745
16751
|
const renderItem = (variant, item) => {
|
|
16746
16752
|
switch (variant) {
|
|
16747
16753
|
case 'create-workbench':
|
|
@@ -16756,31 +16762,31 @@ const renderItem = (variant, item) => {
|
|
|
16756
16762
|
};
|
|
16757
16763
|
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 }) => {
|
|
16758
16764
|
const tooltipData = getQTipData(tooltipProps);
|
|
16759
|
-
return (jsxRuntime.jsxs(Root2, { defaultOpen: false, open: isOpen, onOpenChange: onOpenChange, modal: keepFocusInsideDropdown, children: [jsxRuntime.jsx(Trigger, { id: id, "data-testid": id, className: `tw
|
|
16760
|
-
' tw
|
|
16761
|
-
' data-[state=open]:
|
|
16762
|
-
' forceFont data-[side=top]:
|
|
16763
|
-
borderStyles, children: [hasArrow && (jsxRuntime.jsx(Arrow2, { asChild: true, children: jsxRuntime.jsx("div", { className: " tw
|
|
16765
|
+
return (jsxRuntime.jsxs(Root2, { defaultOpen: false, open: isOpen, onOpenChange: onOpenChange, modal: keepFocusInsideDropdown, children: [jsxRuntime.jsx(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: jsxRuntime.jsx("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 }) }), jsxRuntime.jsx(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: jsxRuntime.jsxs("div", { "data-testid": containerTestId, className: bgStyles +
|
|
16766
|
+
' tw:relative tw:z-[1200] tw:min-w-6 tw:py-2 tw:focus-visible:outline-none tw:outline-none' +
|
|
16767
|
+
' tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out' +
|
|
16768
|
+
' 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 ' +
|
|
16769
|
+
borderStyles, children: [hasArrow && (jsxRuntime.jsx(Arrow2, { asChild: true, children: jsxRuntime.jsx("div", { className: " tw:fill-transparent tw:bg-sq-white tw:w-sq-15 tw:h-sq-15 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-sq-7" }) })), seeqActionDropdownItems.map((item, index) => {
|
|
16764
16770
|
return (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx(Item2, { onSelect: (e) => {
|
|
16765
16771
|
item.action(e);
|
|
16766
|
-
}, className: `tw
|
|
16772
|
+
}, 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 && (jsxRuntime.jsx(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));
|
|
16767
16773
|
})] }) })] }));
|
|
16768
16774
|
};
|
|
16769
16775
|
|
|
16770
|
-
const baseClasses$1 = 'tw
|
|
16771
|
-
const errorClasses = 'tw
|
|
16776
|
+
const baseClasses$1 = 'tw:flex tw:outline-none tw:rounded-md tw:w-full tw:relative tw:flex-wrap';
|
|
16777
|
+
const errorClasses = 'tw:border-sq-danger';
|
|
16772
16778
|
const borderColorClasses = [
|
|
16773
|
-
'tw
|
|
16774
|
-
'dark:
|
|
16775
|
-
'dark:focus:
|
|
16776
|
-
'dark:active:
|
|
16777
|
-
'focus:
|
|
16778
|
-
'active:
|
|
16779
|
+
'tw:border-sq-disabled-gray',
|
|
16780
|
+
'tw:dark:border-sq-dark-disabled-gray',
|
|
16781
|
+
'tw:dark:focus:border-sq-theme-darker',
|
|
16782
|
+
'tw:dark:active:border-sq-theme-darker',
|
|
16783
|
+
'tw:focus:border-sq-theme-dark',
|
|
16784
|
+
'tw:active:border-sq-theme-dark',
|
|
16779
16785
|
].join(' ');
|
|
16780
|
-
const fieldBorderRadius = 'tw
|
|
16781
|
-
const fieldClasses = 'tw
|
|
16782
|
-
const darkTheme = 'dark:
|
|
16783
|
-
const lightTheme = 'tw
|
|
16786
|
+
const fieldBorderRadius = 'tw:rounded-l-md tw:rounded-r-none';
|
|
16787
|
+
const fieldClasses = 'tw:leading-normal tw:outline-none tw:py-1 tw:px-3' + 'tw:p-1 tw:border-solid tw:border';
|
|
16788
|
+
const darkTheme = 'tw:dark:bg-sq-dark-background tw:dark:text-sq-dark-text tw:disabled:dark:text-sq-disabled-gray';
|
|
16789
|
+
const lightTheme = 'tw:text-sq-text-color tw:disabled:text-sq-darkish-gray';
|
|
16784
16790
|
/**
|
|
16785
16791
|
* InputGroup.
|
|
16786
16792
|
*/
|
|
@@ -16790,8 +16796,10 @@ const InputGroup = React.forwardRef((props, ref) => {
|
|
|
16790
16796
|
const appliedClasses = `${baseClasses$1} ${extraClassNames}`;
|
|
16791
16797
|
const fieldAppliedClasses = `${fieldClasses} ${extraClassNames} ${lightTheme} ${darkTheme} ${fieldBorderRadius} ${showError ? errorClasses : borderColorClasses} `;
|
|
16792
16798
|
const elementsToAppend = append.filter(Boolean);
|
|
16793
|
-
return (jsxRuntime.jsxs("div", { id: `input-group-${id}`, className: appliedClasses, children: [field ? (jsxRuntime.jsx("div", { "data-testid": testId, className: `tw
|
|
16794
|
-
return item?.variant === 'button' ? (jsxRuntime.jsx(Button, { extraClassNames: `$
|
|
16799
|
+
return (jsxRuntime.jsxs("div", { id: `input-group-${id}`, className: appliedClasses, children: [field ? (jsxRuntime.jsx("div", { "data-testid": testId, className: `tw:flex tw:flex-1 tw:cursor-pointer tw:active:z-50 ${fieldAppliedClasses}`, children: field })) : (jsxRuntime.jsx(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) => {
|
|
16800
|
+
return item?.variant === 'button' ? (jsxRuntime.jsx(Button, { extraClassNames: `$
|
|
16801
|
+
index ? 'tw:-ml-px' : 'tw:ml-0'
|
|
16802
|
+
} tw:focus:z-40 tw:focus:border tw:rounded-none tw:last:rounded-r-md`, ...item.buttonProps }, index)) : (jsxRuntime.jsx("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));
|
|
16795
16803
|
})] }));
|
|
16796
16804
|
});
|
|
16797
16805
|
|
|
@@ -16848,7 +16856,8 @@ function formatErrorMessage(message, errorCode) {
|
|
|
16848
16856
|
|
|
16849
16857
|
let warning = () => { };
|
|
16850
16858
|
let invariant = () => { };
|
|
16851
|
-
if (process
|
|
16859
|
+
if (typeof process !== "undefined" &&
|
|
16860
|
+
process.env?.NODE_ENV !== "production") {
|
|
16852
16861
|
warning = (check, message, errorCode) => {
|
|
16853
16862
|
if (!check && typeof console !== "undefined") {
|
|
16854
16863
|
console.warn(formatErrorMessage(message, errorCode));
|
|
@@ -17304,6 +17313,17 @@ const isCSSVariableToken = (value) => {
|
|
|
17304
17313
|
return singleCssVariableRegex.test(value.split("/*")[0].trim());
|
|
17305
17314
|
};
|
|
17306
17315
|
const singleCssVariableRegex = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
|
|
17316
|
+
/**
|
|
17317
|
+
* Check if a value contains a CSS variable anywhere (e.g. inside calc()).
|
|
17318
|
+
* Unlike isCSSVariableToken which checks if the value IS a var() token,
|
|
17319
|
+
* this checks if the value CONTAINS var() somewhere in the string.
|
|
17320
|
+
*/
|
|
17321
|
+
function containsCSSVariable(value) {
|
|
17322
|
+
if (typeof value !== "string")
|
|
17323
|
+
return false;
|
|
17324
|
+
// Strip comments to avoid false positives
|
|
17325
|
+
return value.split("/*")[0].includes("var(--");
|
|
17326
|
+
}
|
|
17307
17327
|
|
|
17308
17328
|
const number = {
|
|
17309
17329
|
test: (v) => typeof v === "number",
|
|
@@ -19101,6 +19121,12 @@ class NativeAnimation extends WithPromise {
|
|
|
19101
19121
|
super();
|
|
19102
19122
|
this.finishedTime = null;
|
|
19103
19123
|
this.isStopped = false;
|
|
19124
|
+
/**
|
|
19125
|
+
* Tracks a manually-set start time that takes precedence over WAAPI's
|
|
19126
|
+
* dynamic startTime. This is cleared when play() or time setter is called,
|
|
19127
|
+
* allowing WAAPI to take over timing.
|
|
19128
|
+
*/
|
|
19129
|
+
this.manualStartTime = null;
|
|
19104
19130
|
if (!options)
|
|
19105
19131
|
return;
|
|
19106
19132
|
const { element, name, keyframes, pseudoElement, allowFlatten = false, finalKeyframe, onComplete, } = options;
|
|
@@ -19136,6 +19162,7 @@ class NativeAnimation extends WithPromise {
|
|
|
19136
19162
|
play() {
|
|
19137
19163
|
if (this.isStopped)
|
|
19138
19164
|
return;
|
|
19165
|
+
this.manualStartTime = null;
|
|
19139
19166
|
this.animation.play();
|
|
19140
19167
|
if (this.state === "finished") {
|
|
19141
19168
|
this.updateFinished();
|
|
@@ -19199,6 +19226,7 @@ class NativeAnimation extends WithPromise {
|
|
|
19199
19226
|
return millisecondsToSeconds(Number(this.animation.currentTime) || 0);
|
|
19200
19227
|
}
|
|
19201
19228
|
set time(newTime) {
|
|
19229
|
+
this.manualStartTime = null;
|
|
19202
19230
|
this.finishedTime = null;
|
|
19203
19231
|
this.animation.currentTime = secondsToMilliseconds(newTime);
|
|
19204
19232
|
}
|
|
@@ -19221,10 +19249,10 @@ class NativeAnimation extends WithPromise {
|
|
|
19221
19249
|
: this.animation.playState;
|
|
19222
19250
|
}
|
|
19223
19251
|
get startTime() {
|
|
19224
|
-
return Number(this.animation.startTime);
|
|
19252
|
+
return this.manualStartTime ?? Number(this.animation.startTime);
|
|
19225
19253
|
}
|
|
19226
19254
|
set startTime(newStartTime) {
|
|
19227
|
-
this.animation.startTime = newStartTime;
|
|
19255
|
+
this.manualStartTime = this.animation.startTime = newStartTime;
|
|
19228
19256
|
}
|
|
19229
19257
|
/**
|
|
19230
19258
|
* Attaches a timeline to the animation, for instance the `ScrollTimeline`.
|
|
@@ -19286,7 +19314,7 @@ class NativeAnimationExtended extends NativeAnimation {
|
|
|
19286
19314
|
*/
|
|
19287
19315
|
replaceTransitionType(options);
|
|
19288
19316
|
super(options);
|
|
19289
|
-
if (options.startTime) {
|
|
19317
|
+
if (options.startTime !== undefined) {
|
|
19290
19318
|
this.startTime = options.startTime;
|
|
19291
19319
|
}
|
|
19292
19320
|
this.options = options;
|
|
@@ -19294,7 +19322,7 @@ class NativeAnimationExtended extends NativeAnimation {
|
|
|
19294
19322
|
/**
|
|
19295
19323
|
* WAAPI doesn't natively have any interruption capabilities.
|
|
19296
19324
|
*
|
|
19297
|
-
* Rather than read
|
|
19325
|
+
* Rather than read committed styles back out of the DOM, we can
|
|
19298
19326
|
* create a renderless JS animation and sample it twice to calculate
|
|
19299
19327
|
* its current value, "previous" value, and therefore allow
|
|
19300
19328
|
* Motion to calculate velocity for any subsequent animation.
|
|
@@ -19311,8 +19339,14 @@ class NativeAnimationExtended extends NativeAnimation {
|
|
|
19311
19339
|
...options,
|
|
19312
19340
|
autoplay: false,
|
|
19313
19341
|
});
|
|
19314
|
-
|
|
19315
|
-
|
|
19342
|
+
/**
|
|
19343
|
+
* Use wall-clock elapsed time for sampling.
|
|
19344
|
+
* Under CPU load, WAAPI's currentTime may not reflect actual
|
|
19345
|
+
* elapsed time, causing incorrect sampling and visual jumps.
|
|
19346
|
+
*/
|
|
19347
|
+
const sampleTime = Math.max(sampleDelta, time.now() - this.startTime);
|
|
19348
|
+
const delta = clamp$1(0, sampleDelta, sampleTime - sampleDelta);
|
|
19349
|
+
motionValue.setWithVelocity(sampleAnimation.sample(Math.max(0, sampleTime - delta)).value, sampleAnimation.sample(sampleTime).value, delta);
|
|
19316
19350
|
sampleAnimation.stop();
|
|
19317
19351
|
}
|
|
19318
19352
|
}
|
|
@@ -19490,7 +19524,7 @@ class AsyncMotionValueAnimation extends WithPromise {
|
|
|
19490
19524
|
* progress, which would feel snappier.
|
|
19491
19525
|
*
|
|
19492
19526
|
* However, if there's a delay (main thread work) between the creation of
|
|
19493
|
-
* the animation and the first
|
|
19527
|
+
* the animation and the first committed frame, we prefer to use resolvedAt
|
|
19494
19528
|
* to avoid a sudden jump into the animation.
|
|
19495
19529
|
*/
|
|
19496
19530
|
const startTime = sync
|
|
@@ -19759,17 +19793,36 @@ const numberValueTypes = {
|
|
|
19759
19793
|
right: px,
|
|
19760
19794
|
bottom: px,
|
|
19761
19795
|
left: px,
|
|
19796
|
+
inset: px,
|
|
19797
|
+
insetBlock: px,
|
|
19798
|
+
insetBlockStart: px,
|
|
19799
|
+
insetBlockEnd: px,
|
|
19800
|
+
insetInline: px,
|
|
19801
|
+
insetInlineStart: px,
|
|
19802
|
+
insetInlineEnd: px,
|
|
19762
19803
|
// Spacing props
|
|
19763
19804
|
padding: px,
|
|
19764
19805
|
paddingTop: px,
|
|
19765
19806
|
paddingRight: px,
|
|
19766
19807
|
paddingBottom: px,
|
|
19767
19808
|
paddingLeft: px,
|
|
19809
|
+
paddingBlock: px,
|
|
19810
|
+
paddingBlockStart: px,
|
|
19811
|
+
paddingBlockEnd: px,
|
|
19812
|
+
paddingInline: px,
|
|
19813
|
+
paddingInlineStart: px,
|
|
19814
|
+
paddingInlineEnd: px,
|
|
19768
19815
|
margin: px,
|
|
19769
19816
|
marginTop: px,
|
|
19770
19817
|
marginRight: px,
|
|
19771
19818
|
marginBottom: px,
|
|
19772
19819
|
marginLeft: px,
|
|
19820
|
+
marginBlock: px,
|
|
19821
|
+
marginBlockStart: px,
|
|
19822
|
+
marginBlockEnd: px,
|
|
19823
|
+
marginInline: px,
|
|
19824
|
+
marginInlineStart: px,
|
|
19825
|
+
marginInlineEnd: px,
|
|
19773
19826
|
// Misc
|
|
19774
19827
|
backgroundPositionX: px,
|
|
19775
19828
|
backgroundPositionY: px,
|
|
@@ -19887,6 +19940,16 @@ class DOMKeyframesResolver extends KeyframeResolver {
|
|
|
19887
19940
|
const [origin, target] = unresolvedKeyframes;
|
|
19888
19941
|
const originType = findDimensionValueType(origin);
|
|
19889
19942
|
const targetType = findDimensionValueType(target);
|
|
19943
|
+
/**
|
|
19944
|
+
* If one keyframe contains embedded CSS variables (e.g. in calc()) and the other
|
|
19945
|
+
* doesn't, we need to measure to convert to pixels. This handles GitHub issue #3410.
|
|
19946
|
+
*/
|
|
19947
|
+
const originHasVar = containsCSSVariable(origin);
|
|
19948
|
+
const targetHasVar = containsCSSVariable(target);
|
|
19949
|
+
if (originHasVar !== targetHasVar && positionalValues[name]) {
|
|
19950
|
+
this.needsMeasurement = true;
|
|
19951
|
+
return;
|
|
19952
|
+
}
|
|
19890
19953
|
/**
|
|
19891
19954
|
* Either we don't recognise these value types or we can animate between them.
|
|
19892
19955
|
*/
|
|
@@ -20421,16 +20484,24 @@ const isPrimaryPointer = (event) => {
|
|
|
20421
20484
|
}
|
|
20422
20485
|
};
|
|
20423
20486
|
|
|
20424
|
-
const
|
|
20487
|
+
const interactiveElements = new Set([
|
|
20425
20488
|
"BUTTON",
|
|
20426
20489
|
"INPUT",
|
|
20427
20490
|
"SELECT",
|
|
20428
20491
|
"TEXTAREA",
|
|
20429
20492
|
"A",
|
|
20430
20493
|
]);
|
|
20494
|
+
/**
|
|
20495
|
+
* Checks if an element is an interactive form element that should prevent
|
|
20496
|
+
* drag gestures from starting when clicked.
|
|
20497
|
+
*
|
|
20498
|
+
* This specifically targets form controls, buttons, and links - not just any
|
|
20499
|
+
* element with tabIndex, since motion elements with tap handlers automatically
|
|
20500
|
+
* get tabIndex=0 for keyboard accessibility.
|
|
20501
|
+
*/
|
|
20431
20502
|
function isElementKeyboardAccessible(element) {
|
|
20432
|
-
return (
|
|
20433
|
-
element.
|
|
20503
|
+
return (interactiveElements.has(element.tagName) ||
|
|
20504
|
+
element.isContentEditable === true);
|
|
20434
20505
|
}
|
|
20435
20506
|
|
|
20436
20507
|
const isPressing = new WeakSet();
|
|
@@ -27678,7 +27749,7 @@ var Thumb = SliderThumb;
|
|
|
27678
27749
|
*/
|
|
27679
27750
|
const Slider = (props) => {
|
|
27680
27751
|
const { onValueChange, onPointerUp, id, value, name, disabled = false, rootExtraClassNames = '', trackExtraClassNames = '', rangeExtraClassNames = '', thumbExtraClassNames = '', step, min, max, } = props;
|
|
27681
|
-
return (jsxRuntime.jsxs(Root$1, { className: `tw
|
|
27752
|
+
return (jsxRuntime.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: [jsxRuntime.jsx(Track, { className: `tw:relative tw:h-sq-5 tw:grow tw:rounded-sm tw:bg-sq-dark-gray tw:dark:bg-sq-dark-disabled-gray ${trackExtraClassNames}`, children: jsxRuntime.jsx(Range, { className: `tw:absolute tw:h-full tw:rounded-full ${rangeExtraClassNames}` }) }), jsxRuntime.jsx(Thumb, { className: `tw:block tw:h-sq-15 tw:w-sq-15 tw:rounded-full tw:bg-sq-theme-dark tw:active: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 })] }));
|
|
27682
27753
|
};
|
|
27683
27754
|
|
|
27684
27755
|
// src/create-context.tsx
|
|
@@ -29159,7 +29230,7 @@ var tinycolor$1 = {exports: {}};
|
|
|
29159
29230
|
var tinycolorExports = tinycolor$1.exports;
|
|
29160
29231
|
var tinycolor = /*@__PURE__*/getDefaultExportFromCjs(tinycolorExports);
|
|
29161
29232
|
|
|
29162
|
-
const baseLabelClasses = 'tw
|
|
29233
|
+
const baseLabelClasses = 'tw:left-1 tw:text-xs tw:text-sq-text-color tw:dark:text-sq-dark-text tw:items-center tw:h-4.5';
|
|
29163
29234
|
const ProgressIndicator = (props) => {
|
|
29164
29235
|
const { value, color = undefined, testId, label, extraClasses = '', labelClasses = '', valuesLength, max, index, totalValue, ...tooltipProps } = props;
|
|
29165
29236
|
const tooltipData = getQTipData(tooltipProps);
|
|
@@ -29172,19 +29243,19 @@ const ProgressIndicator = (props) => {
|
|
|
29172
29243
|
if (totalValue >= max) {
|
|
29173
29244
|
// If progress is 100%, round both ends
|
|
29174
29245
|
if (index === 0 && valuesLength === 1) {
|
|
29175
|
-
roundedCorners = 'tw
|
|
29246
|
+
roundedCorners = 'tw:rounded-[0.9375rem]';
|
|
29176
29247
|
}
|
|
29177
29248
|
else if (index === 0) {
|
|
29178
|
-
roundedCorners = 'tw
|
|
29249
|
+
roundedCorners = 'tw:rounded-l-[0.9375rem]';
|
|
29179
29250
|
}
|
|
29180
29251
|
else if (index === valuesLength - 1) {
|
|
29181
|
-
roundedCorners = 'tw
|
|
29252
|
+
roundedCorners = 'tw:rounded-r-[0.9375rem]';
|
|
29182
29253
|
}
|
|
29183
29254
|
}
|
|
29184
29255
|
else {
|
|
29185
29256
|
// Otherwise, only round the leftmost indicator
|
|
29186
29257
|
if (index === 0) {
|
|
29187
|
-
roundedCorners = 'tw
|
|
29258
|
+
roundedCorners = 'tw:rounded-l-[0.9375rem]';
|
|
29188
29259
|
}
|
|
29189
29260
|
}
|
|
29190
29261
|
React.useEffect(() => {
|
|
@@ -29196,13 +29267,13 @@ const ProgressIndicator = (props) => {
|
|
|
29196
29267
|
return () => clearTimeout(timeout);
|
|
29197
29268
|
}, [value]);
|
|
29198
29269
|
const bgColor = color || undefined;
|
|
29199
|
-
const bgClass = color ? '' : 'tw
|
|
29270
|
+
const bgClass = color ? '' : 'tw:bg-sq-theme-dark';
|
|
29200
29271
|
const computeTextClass = (elem) => {
|
|
29201
29272
|
const computedStyle = getComputedStyle(elem);
|
|
29202
29273
|
const backgroundColor = computedStyle.backgroundColor;
|
|
29203
29274
|
const textColorClass = tinycolor(backgroundColor).isDark()
|
|
29204
|
-
? 'tw
|
|
29205
|
-
: 'tw
|
|
29275
|
+
? 'tw:text-sq-white tw:dark:text-sq-white'
|
|
29276
|
+
: 'tw:text-sq-text-color tw:dark:text-sq-text-color';
|
|
29206
29277
|
setTextColorClass(textColorClass);
|
|
29207
29278
|
};
|
|
29208
29279
|
React.useEffect(() => {
|
|
@@ -29210,35 +29281,35 @@ const ProgressIndicator = (props) => {
|
|
|
29210
29281
|
computeTextClass(indicatorElementRef.current);
|
|
29211
29282
|
}
|
|
29212
29283
|
}, [!!indicatorElementRef.current]);
|
|
29213
|
-
return (React.createElement(Indicator, { className: `tw
|
|
29284
|
+
return (React.createElement(Indicator, { className: `tw:ease-[cubic-bezier(0.65, 0, 0.35, 1)] tw:w-full tw:h-4.5 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: {
|
|
29214
29285
|
// Background color will default to the theme color if undefined
|
|
29215
29286
|
backgroundColor: bgColor,
|
|
29216
29287
|
animation: 'width 660ms forwards',
|
|
29217
29288
|
width: `${animatedWidth}%`,
|
|
29218
|
-
} }, label ? (jsxRuntime.jsx("span", { className: `${baseLabelClasses} ${labelClasses} ${textColorClass} ${valuesLength === 1 ? 'tw
|
|
29289
|
+
} }, label ? (jsxRuntime.jsx("span", { className: `${baseLabelClasses} ${labelClasses} ${textColorClass} ${valuesLength === 1 ? 'tw:absolute tw:z-50' : ''}`, children: label })) : undefined));
|
|
29219
29290
|
};
|
|
29220
29291
|
const ProgressBar = ({ values = [], max = 100, containerExtraClasses = '', zeroValueLabel = 'No progress yet', }) => {
|
|
29221
29292
|
const totalValue = values.reduce((acc, { value }) => acc + value, 0);
|
|
29222
|
-
return (jsxRuntime.jsx(Root, { className: `tw
|
|
29293
|
+
return (jsxRuntime.jsx(Root, { className: `tw:relative tw:h-4.5 tw:w-full tw:overflow-hidden tw:rounded-[0.9375rem] 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) => {
|
|
29223
29294
|
return (React.createElement(ProgressIndicator, { ...props, max: max, valuesLength: values.length, index: i, totalValue: totalValue, key: i }));
|
|
29224
|
-
})) : (jsxRuntime.jsx("div", { className: `${baseLabelClasses} tw
|
|
29295
|
+
})) : (jsxRuntime.jsx("div", { className: `${baseLabelClasses} tw:mx-auto tw:overflow-hidden`, children: zeroValueLabel })) }));
|
|
29225
29296
|
};
|
|
29226
29297
|
|
|
29227
|
-
const baseClasses = 'tw
|
|
29298
|
+
const baseClasses = 'tw:flex tw:outline-none tw:w-full tw:relative tw:flex-wrap';
|
|
29228
29299
|
const activeClassesByVariantLightTheme = {
|
|
29229
|
-
'outline': '
|
|
29230
|
-
'theme': 'tw
|
|
29300
|
+
'outline': 'tw:!bg-sq-disabled-gray tw:border-sq-theme-dark',
|
|
29301
|
+
'theme': 'tw:bg-sq-theme-highlight',
|
|
29231
29302
|
'danger': '',
|
|
29232
29303
|
'theme-light': '',
|
|
29233
|
-
'no-border': '
|
|
29304
|
+
'no-border': 'tw:!bg-sq-disabled-gray',
|
|
29234
29305
|
'warning': '',
|
|
29235
29306
|
};
|
|
29236
29307
|
const activeClassesByVariantDarkTheme = {
|
|
29237
|
-
'outline': 'dark
|
|
29238
|
-
'theme': 'dark:
|
|
29308
|
+
'outline': 'tw:!dark:bg-sq-multi-gray-dark tw:dark:border-sq-theme-dark',
|
|
29309
|
+
'theme': 'tw:dark:bg-sq-theme-highlight',
|
|
29239
29310
|
'danger': '',
|
|
29240
29311
|
'theme-light': '',
|
|
29241
|
-
'no-border': 'dark
|
|
29312
|
+
'no-border': 'tw:!dark:bg-sq-multi-gray-dark',
|
|
29242
29313
|
'warning': '',
|
|
29243
29314
|
};
|
|
29244
29315
|
/**
|
|
@@ -29250,7 +29321,7 @@ const ButtonGroup = (props) => {
|
|
|
29250
29321
|
const appliedClasses = `${baseClasses} ${extraClassNames}`;
|
|
29251
29322
|
return (jsxRuntime.jsx("div", { id: id ? `button-group-${id}` : undefined, "data-testid": testId, className: appliedClasses, ...tooltipData, children: buttons
|
|
29252
29323
|
.filter(Boolean)
|
|
29253
|
-
.map((item, index) => item?.variant === 'button' ? (jsxRuntime.jsx(Button, { ...item.buttonProps, extraClassNames: `tw
|
|
29324
|
+
.map((item, index) => item?.variant === 'button' ? (jsxRuntime.jsx(Button, { ...item.buttonProps, extraClassNames: `tw:-ml-sq-1 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
|
|
29254
29325
|
? `${activeClassesByVariantLightTheme[item?.buttonProps?.variant ?? 'outline']} ${activeClassesByVariantDarkTheme[item?.buttonProps?.variant ?? 'outline']} `
|
|
29255
29326
|
: ''} ${item.buttonProps.extraClassNames}`, onClick: () => onChange && onChange(item?.buttonProps?.value) }, index)) : (item?.element)) }));
|
|
29256
29327
|
};
|
|
@@ -29260,7 +29331,7 @@ const ButtonGroup = (props) => {
|
|
|
29260
29331
|
* - Easily create a carousel with custom slides.
|
|
29261
29332
|
* - Supports automatic sliding, navigation arrows, and slide indicators.
|
|
29262
29333
|
*/
|
|
29263
|
-
const Carousel = ({ testId = 'carousel-id', activeIndex = 0, extraClassNames = '', onSlide = () => { }, autoSlide, showIndicators = true, continuous = true, interval = 4000, prevIcon = 'fc-arrow-dropdown tw
|
|
29334
|
+
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 = [], }) => {
|
|
29264
29335
|
const [currentIndex, setCurrentIndex] = React.useState(activeIndex);
|
|
29265
29336
|
const changeSlide = (nextIndex) => {
|
|
29266
29337
|
const newIndex = (nextIndex + carouselItems.length) % carouselItems.length;
|
|
@@ -29327,7 +29398,7 @@ const Carousel = ({ testId = 'carousel-id', activeIndex = 0, extraClassNames = '
|
|
|
29327
29398
|
transition: springTransition,
|
|
29328
29399
|
}),
|
|
29329
29400
|
};
|
|
29330
|
-
return (jsxRuntime.jsxs("div", { "data-testid": testId, className: `tw
|
|
29401
|
+
return (jsxRuntime.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: [jsxRuntime.jsxs("div", { className: "tw:flex tw:items-center tw:w-full tw:h-max tw:gap-1", children: [showArrows && (jsxRuntime.jsx(Button, { icon: prevIcon, size: "lg", variant: "no-border", testId: "carousel-prev", extraClassNames: `${currentIndex === 0 && !continuous ? 'tw:invisible' : ''} ${iconExtraClassNames} tw:animate-fadeIn`, onClick: onBackClick })), jsxRuntime.jsx("div", { className: "tw:h-full tw:w-full tw:overflow-hidden", children: jsxRuntime.jsx(motion.div, { custom: 1, initial: "initial", animate: "animate", exit: "exit", variants: slideVariants, className: "tw:w-full", children: carouselItems[currentIndex] }, currentIndex) }), showArrows && (jsxRuntime.jsx(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 && (jsxRuntime.jsx("div", { className: "tw:flex tw:gap-1 tw:mt-2", children: carouselItems.map((_, i) => (jsxRuntime.jsx("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))) }))] }));
|
|
29331
29402
|
};
|
|
29332
29403
|
|
|
29333
29404
|
const buttonTypes = ['button', 'reset', 'submit', 'link'];
|