@seeqdev/qomponents 0.0.110 → 0.0.111
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/InputGroup/InputGroup.types.d.ts +19 -4
- package/dist/index.esm.js +39 -34
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +39 -34
- package/dist/index.js.map +1 -1
- package/dist/styles.css +22 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4643,8 +4643,8 @@ const setValidInputDimension = (width, height) => {
|
|
|
4643
4643
|
return inputStyle;
|
|
4644
4644
|
};
|
|
4645
4645
|
|
|
4646
|
-
const errorClasses$
|
|
4647
|
-
const borderColorClasses$
|
|
4646
|
+
const errorClasses$4 = 'tw-border-sq-danger-color';
|
|
4647
|
+
const borderColorClasses$4 = [
|
|
4648
4648
|
'tw-border-sq-disabled-gray',
|
|
4649
4649
|
'dark:tw-border-sq-dark-disabled-gray',
|
|
4650
4650
|
'dark:focus:tw-border-sq-color-dark-dark',
|
|
@@ -4656,8 +4656,8 @@ const baseClasses$5 = 'tw-h-inputs tw-leading-normal tw-outline-none tw-py-1 tw-
|
|
|
4656
4656
|
' disabled:tw-pointer-events-none disabled:tw-bg-sq-light-gray disabled:dark:tw-bg-sq-dark-disabled-gray' +
|
|
4657
4657
|
' disabled:tw-cursor-not-allowed tw-p-1 tw-border-solid tw-border tw-placeholder-gray-400' +
|
|
4658
4658
|
' dark:tw-placeholder-sq-dark-text-lighter specTextField';
|
|
4659
|
-
const darkTheme$
|
|
4660
|
-
const lightTheme$
|
|
4659
|
+
const darkTheme$3 = 'dark:tw-bg-sq-dark-background dark:tw-text-sq-dark-text disabled:dark:tw-text-sq-dark-text-lighter';
|
|
4660
|
+
const lightTheme$3 = 'tw-text-sq-text-color disabled:tw-text-sq-darkish-gray';
|
|
4661
4661
|
const sizeClasses = {
|
|
4662
4662
|
sm: 'tw-text-sm',
|
|
4663
4663
|
lg: 'tw-text-xl',
|
|
@@ -4702,7 +4702,7 @@ const TextField = React.forwardRef((props, ref) => {
|
|
|
4702
4702
|
else if (inputGroup === 'right') {
|
|
4703
4703
|
borderRadius = 'tw-rounded-r-sm tw-border-l-0 focus:tw-border-l active:tw-border-l';
|
|
4704
4704
|
}
|
|
4705
|
-
const appliedClasses = `${baseClasses$5} ${sizeClasses[size]} ${extraClassNames} ${lightTheme$
|
|
4705
|
+
const appliedClasses = `${baseClasses$5} ${sizeClasses[size]} ${extraClassNames} ${lightTheme$3} ${darkTheme$3} ${borderRadius} ${showError ? errorClasses$4 : borderColorClasses$4} `;
|
|
4706
4706
|
const inputProp = setValidInputDimension(inputWidth, inputHeight)
|
|
4707
4707
|
? {
|
|
4708
4708
|
style: setValidInputDimension(inputWidth, inputHeight),
|
|
@@ -4744,11 +4744,11 @@ const Checkbox = (props) => {
|
|
|
4744
4744
|
const baseClasses$3 = 'tw-leading-normal tw-outline-none tw-py-1 tw-px-3 tw-rounded-sm tw-w-full' +
|
|
4745
4745
|
' disabled:tw-pointer-events-none disabled:tw-bg-sq-light-gray disabled:dark:tw-bg-sq-dark-disabled-gray' +
|
|
4746
4746
|
' disabled:tw-cursor-not-allowed tw-p-1 tw-border-solid tw-border tw-text-sm';
|
|
4747
|
-
const darkTheme$
|
|
4747
|
+
const darkTheme$2 = 'dark:tw-bg-sq-dark-background dark:tw-text-sq-dark-text ' +
|
|
4748
4748
|
'dark:tw-placeholder-sq-dark-text-lighter disabled:dark:tw-text-sq-dark-text-lighter';
|
|
4749
|
-
const lightTheme$
|
|
4750
|
-
const errorClasses$
|
|
4751
|
-
const borderColorClasses$
|
|
4749
|
+
const lightTheme$2 = 'tw-text-sq-text-color tw-placeholder-gray-400 disabled:tw-text-sq-darkish-gray';
|
|
4750
|
+
const errorClasses$3 = 'tw-border-sq-danger-color';
|
|
4751
|
+
const borderColorClasses$3 = [
|
|
4752
4752
|
'tw-border-sq-disabled-gray',
|
|
4753
4753
|
'dark:tw-border-sq-dark-disabled-gray',
|
|
4754
4754
|
'dark:focus:tw-border-sq-color-dark-dark',
|
|
@@ -4760,7 +4760,7 @@ const borderColorClasses$2 = [
|
|
|
4760
4760
|
* TextArea.
|
|
4761
4761
|
*/
|
|
4762
4762
|
const TextArea = ({ readonly = false, disabled = false, onChange, onKeyUp, onFocus, onBlur, onKeyDown, id, name, rows = 3, cols = undefined, value, placeholder, showError, extraClassNames, testId, autoFocus = false, }) => {
|
|
4763
|
-
const appliedClasses = `${baseClasses$3} ${extraClassNames} ${lightTheme$
|
|
4763
|
+
const appliedClasses = `${baseClasses$3} ${extraClassNames} ${lightTheme$2} ${darkTheme$2} ${showError ? errorClasses$3 : borderColorClasses$3}`;
|
|
4764
4764
|
return (React.createElement("textarea", { "data-testid": testId, name: name, id: id, value: value, className: appliedClasses, placeholder: placeholder, disabled: disabled, readOnly: readonly, onChange: onChange, onFocus: onFocus, onBlur: onBlur, onKeyDown: onKeyDown, onKeyUp: onKeyUp, rows: rows, cols: cols, autoFocus: autoFocus }));
|
|
4765
4765
|
};
|
|
4766
4766
|
|
|
@@ -11593,7 +11593,7 @@ var colors = {
|
|
|
11593
11593
|
neutral80: 'hsl(0, 0%, 20%)',
|
|
11594
11594
|
neutral90: 'hsl(0, 0%, 10%)'
|
|
11595
11595
|
};
|
|
11596
|
-
var borderRadius = 4;
|
|
11596
|
+
var borderRadius$1 = 4;
|
|
11597
11597
|
// Used to calculate consistent margin/padding on elements
|
|
11598
11598
|
var baseUnit = 4;
|
|
11599
11599
|
// The minimum height of the control
|
|
@@ -11606,7 +11606,7 @@ var spacing = {
|
|
|
11606
11606
|
menuGutter: menuGutter
|
|
11607
11607
|
};
|
|
11608
11608
|
var defaultTheme = {
|
|
11609
|
-
borderRadius: borderRadius,
|
|
11609
|
+
borderRadius: borderRadius$1,
|
|
11610
11610
|
colors: colors,
|
|
11611
11611
|
spacing: spacing
|
|
11612
11612
|
};
|
|
@@ -13339,8 +13339,8 @@ var CreatableSelect$1 = CreatableSelect;
|
|
|
13339
13339
|
|
|
13340
13340
|
const baseClasses$2 = ['focus:tw-ring-0', 'disabled:tw-cursor-not-allowed'].join(' ');
|
|
13341
13341
|
const containerStyles = ['tw-bg-white', 'dark:tw-bg-sq-dark-background'].join(' ');
|
|
13342
|
-
const errorClasses$
|
|
13343
|
-
const borderColorClasses$
|
|
13342
|
+
const errorClasses$2 = 'tw-border-sq-danger-color';
|
|
13343
|
+
const borderColorClasses$2 = ['tw-border-sq-disabled-gray', 'dark:tw-border-sq-dark-disabled-gray'].join(' ');
|
|
13344
13344
|
const borderStyles$3 = [
|
|
13345
13345
|
'tw-border-solid',
|
|
13346
13346
|
'tw-border',
|
|
@@ -13478,7 +13478,7 @@ const Select = ({ options, value, placeholder = 'select', noOptionsMessage = 'no
|
|
|
13478
13478
|
else if (inputGroup === 'right') {
|
|
13479
13479
|
border = menuIsOpen ? 'tw-rounded-tr-sm' : 'tw-rounded-r-sm';
|
|
13480
13480
|
}
|
|
13481
|
-
const appliedClasses = `${borderStyles$3} ${border} ${showError ? errorClasses$
|
|
13481
|
+
const appliedClasses = `${borderStyles$3} ${border} ${showError ? errorClasses$2 : borderColorClasses$2} ${small ? 'reactSelectMinHeightSmall' : 'reactSelectMinHeight'} `;
|
|
13482
13482
|
return `${appliedClasses} ${baseClasses$2} specSelectControl ${isDisabled ? disabledClasses$3 : ''} ${small ? 'tw-pl-2 tw-pr-1' : 'tw-pl-2.5 tw-pr-1.5'}`;
|
|
13483
13483
|
},
|
|
13484
13484
|
placeholder: () => placeholderStyles,
|
|
@@ -15851,22 +15851,22 @@ const ButtonWithDropdown = ({ dropdownItems, triggerIcon, id, extraClassNames, c
|
|
|
15851
15851
|
|
|
15852
15852
|
const baseClasses$1 = 'tw-mx-auto tw-p-4 tw-leading-normal tw-outline-none tw-py-2 tw-px-3 tw-rounded-sm tw-w-full' +
|
|
15853
15853
|
' tw-border-solid tw-border tw-text-sm tw-flex tw-flex-col tw-justify-center tw-items-center';
|
|
15854
|
-
const darkTheme = 'dark:tw-bg-sq-colored-hover-dark dark:tw-text-sq-dark-text';
|
|
15855
|
-
const lightTheme = 'tw-text-sq-text-color tw-bg-sq-colored-hover';
|
|
15856
|
-
const errorClasses = 'tw-border-sq-danger-color';
|
|
15857
|
-
const borderColorClasses = 'tw-border-sq-color-dark';
|
|
15854
|
+
const darkTheme$1 = 'dark:tw-bg-sq-colored-hover-dark dark:tw-text-sq-dark-text';
|
|
15855
|
+
const lightTheme$1 = 'tw-text-sq-text-color tw-bg-sq-colored-hover';
|
|
15856
|
+
const errorClasses$1 = 'tw-border-sq-danger-color';
|
|
15857
|
+
const borderColorClasses$1 = 'tw-border-sq-color-dark';
|
|
15858
15858
|
/**
|
|
15859
15859
|
* Alert.
|
|
15860
15860
|
*/
|
|
15861
15861
|
const Alert = ({ children, dismissible = true, onClose, show = true, variant, testId, id, extraClassNames, }) => {
|
|
15862
15862
|
const appliedTheme = {
|
|
15863
|
-
theme: `${lightTheme} ${darkTheme}`,
|
|
15863
|
+
theme: `${lightTheme$1} ${darkTheme$1}`,
|
|
15864
15864
|
danger: 'tw-text-sq-text-color tw-bg-sq-danger-color',
|
|
15865
15865
|
warning: 'tw-bg-sq-bg-warning-color tw-text-sq-text-color',
|
|
15866
15866
|
};
|
|
15867
15867
|
const appliedBorderTheme = {
|
|
15868
|
-
theme: borderColorClasses,
|
|
15869
|
-
danger: errorClasses,
|
|
15868
|
+
theme: borderColorClasses$1,
|
|
15869
|
+
danger: errorClasses$1,
|
|
15870
15870
|
warning: 'tw-border-none',
|
|
15871
15871
|
};
|
|
15872
15872
|
const appliedClasses = `${baseClasses$1} ${appliedTheme[variant]} ${extraClassNames} ${appliedBorderTheme[variant]}`;
|
|
@@ -15943,24 +15943,29 @@ const SeeqActionDropdown = ({ seeqActionDropdownItems, trigger, id, extraClassNa
|
|
|
15943
15943
|
};
|
|
15944
15944
|
|
|
15945
15945
|
const baseClasses = 'tw-flex tw-outline-none tw-rounded-sm tw-w-full tw-relative tw-flex-wrap tw-items-stretch';
|
|
15946
|
+
const errorClasses = 'tw-border-sq-danger-color';
|
|
15947
|
+
const borderColorClasses = [
|
|
15948
|
+
'tw-border-sq-disabled-gray',
|
|
15949
|
+
'dark:tw-border-sq-dark-disabled-gray',
|
|
15950
|
+
'dark:focus:tw-border-sq-color-dark-dark',
|
|
15951
|
+
'dark:active:tw-border-sq-color-dark-dark',
|
|
15952
|
+
'focus:tw-border-sq-color-dark',
|
|
15953
|
+
'active:tw-border-sq-color-dark',
|
|
15954
|
+
].join(' ');
|
|
15955
|
+
let borderRadius = 'tw-rounded-sm tw-rounded-r-none';
|
|
15956
|
+
const fieldClasses = 'tw-leading-normal tw-outline-none tw-py-1 tw-px-3' + 'tw-p-1 tw-border-solid tw-border';
|
|
15957
|
+
const darkTheme = 'dark:tw-bg-sq-dark-background dark:tw-text-sq-dark-text disabled:dark:tw-text-sq-dark-text-lighter';
|
|
15958
|
+
const lightTheme = 'tw-text-sq-text-color disabled:tw-text-sq-darkish-gray';
|
|
15946
15959
|
/**
|
|
15947
15960
|
* InputGroup.
|
|
15948
15961
|
*/
|
|
15949
|
-
const InputGroup = ({ readonly = false, onChange, onKeyUp, onFocus, onBlur, onKeyDown,
|
|
15962
|
+
const InputGroup = ({ readonly = false, onChange, onKeyUp, onFocus, onBlur, onKeyDown, name, value, placeholder, append = [], extraClassNames = '', id, testId, showError, required, autoComplete, autoFocus, disabled, type, step, min, max, field, ...tooltipProps }) => {
|
|
15950
15963
|
const tooltipData = getQTipData(tooltipProps);
|
|
15951
15964
|
const appliedClasses = `${baseClasses} ${extraClassNames}`;
|
|
15952
|
-
const
|
|
15953
|
-
'tw-border-sq-disabled-gray',
|
|
15954
|
-
'dark:tw-border-sq-dark-disabled-gray',
|
|
15955
|
-
'dark:focus:tw-border-sq-color-dark-dark',
|
|
15956
|
-
'dark:active:tw-border-sq-color-dark-dark',
|
|
15957
|
-
'focus:tw-border-sq-color-dark',
|
|
15958
|
-
'active:tw-border-sq-color-dark',
|
|
15959
|
-
].join(' ');
|
|
15960
|
-
const textfield = (React.createElement(TextField, { readonly: onClick ? true : readonly, onChange: onChange, onKeyUp: onKeyUp, onFocus: onFocus, onBlur: onBlur, onKeyDown: onKeyDown, name: name, showError: showError, value: value, required: required, placeholder: placeholder, autoComplete: autoComplete, autoFocus: autoFocus, id: id, type: type, disabled: disabled, step: step, min: min, max: max, extraClassNames: `tw-flex tw-flex-1 tw-rounded-r-none focus:tw-z-30 ${onClick ? 'tw-cursor-pointer' : ''} ${extraClassNames}`, ...tooltipData }));
|
|
15965
|
+
const fieldAppliedClasses = `${fieldClasses} ${extraClassNames} ${lightTheme} ${darkTheme} ${borderRadius} ${showError ? errorClasses : borderColorClasses} `;
|
|
15961
15966
|
return (React.createElement("div", { id: id, "data-testid": testId, className: appliedClasses },
|
|
15962
|
-
|
|
15963
|
-
append.filter(Boolean).map((item, index) => item.variant === 'button' ? (React.createElement(Button, { key: index, extraClassNames: "tw-ml-[-1px] focus:tw-z-40 focus:tw-border tw-rounded-l-none tw-rounded-r-none last:tw-rounded-r-sm", onClick: item.buttonProps.onClick, variant: item.buttonProps.variant, icon: item.buttonProps.icon, iconColor: item.buttonProps.iconColor, testId: item.buttonProps.testId, disabled: item.buttonProps.disabled, label: item.buttonProps.label, iconStyle: item.buttonProps.iconStyle })) : (React.createElement("div", { key: index, className: `${borderColorClasses} tw-flex tw-items-center tw-
|
|
15967
|
+
field ? (React.createElement("div", { className: `tw-flex tw-flex-1 tw-cursor-pointer active:tw-z-50 ${fieldAppliedClasses}` }, field)) : (React.createElement(TextField, { readonly: readonly, onChange: onChange, onKeyUp: onKeyUp, onFocus: onFocus, onBlur: onBlur, onKeyDown: onKeyDown, name: name, showError: showError, value: value, required: required, placeholder: placeholder, autoComplete: autoComplete, autoFocus: autoFocus, id: id, type: type, disabled: disabled, step: step, min: min, max: max, extraClassNames: `tw-flex tw-flex-1 tw-rounded-r-none focus:tw-z-30 ${extraClassNames}`, ...tooltipData })),
|
|
15968
|
+
append.filter(Boolean).map((item, index) => item.variant === 'button' ? (React.createElement(Button, { key: index, extraClassNames: "tw-ml-[-1px] focus:tw-z-40 focus:tw-border tw-rounded-l-none tw-rounded-r-none last:tw-rounded-r-sm", onClick: item.buttonProps.onClick, variant: item.buttonProps.variant, icon: item.buttonProps.icon, iconColor: item.buttonProps.iconColor, testId: item.buttonProps.testId, disabled: item.buttonProps.disabled, label: item.buttonProps.label, iconStyle: item.buttonProps.iconStyle })) : (React.createElement("div", { key: index, className: `${borderColorClasses} tw-flex tw-items-center tw-justify-center tw-rounded-none tw-ml-[-1px] active:tw-z-30 active:tw-border tw-border last:tw-rounded-r-sm` }, item.element)))));
|
|
15964
15969
|
};
|
|
15965
15970
|
|
|
15966
15971
|
// packages/react/context/src/createContext.tsx
|