@scaleflex/ui-tw 0.0.106 → 0.0.107
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.
|
@@ -10,7 +10,7 @@ var _excluded = ["className", "size"],
|
|
|
10
10
|
import { cva } from 'class-variance-authority';
|
|
11
11
|
import * as React from 'react';
|
|
12
12
|
import { Button, ButtonSize, ButtonVariant } from '../button';
|
|
13
|
-
import { getBaseInputClasses } from '../styles/shared-classes';
|
|
13
|
+
import { getBaseInputClasses, selectionHighlightClassNames } from '../styles/shared-classes';
|
|
14
14
|
import { Textarea } from '../textarea';
|
|
15
15
|
import { FormSize } from '../types/form-size';
|
|
16
16
|
import { cn } from '../utils/cn';
|
|
@@ -119,7 +119,7 @@ function InputGroupInput(_ref5) {
|
|
|
119
119
|
props = _objectWithoutProperties(_ref5, _excluded5);
|
|
120
120
|
return /*#__PURE__*/React.createElement("input", _extends({
|
|
121
121
|
"data-slot": "input-group-control",
|
|
122
|
-
className: cn.apply(void 0, _toConsumableArray(getBaseInputClasses(false, false)).concat(['flex h-full min-w-0 flex-1 rounded-none border-0 shadow-none', className]))
|
|
122
|
+
className: cn.apply(void 0, _toConsumableArray(getBaseInputClasses(false, false)).concat([selectionHighlightClassNames, 'flex h-full min-w-0 flex-1 rounded-none border-0 shadow-none', className]))
|
|
123
123
|
}, props));
|
|
124
124
|
}
|
|
125
125
|
function InputGroupTextarea(_ref6) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { LabelProps } from './label.types';
|
|
3
|
-
declare function Label({ className, size, children, icon, tooltip, disabledTooltip, disabled, ...props }: LabelProps): React.JSX.Element;
|
|
3
|
+
declare function Label({ className, size, children, icon, tooltip, disabledTooltip, disabled, noTruncate, ...props }: LabelProps): React.JSX.Element;
|
|
4
4
|
export { Label };
|
package/label/label.component.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["className", "size", "children", "icon", "tooltip", "disabledTooltip", "disabled"];
|
|
3
|
+
var _excluded = ["className", "size", "children", "icon", "tooltip", "disabledTooltip", "disabled", "noTruncate"];
|
|
4
4
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
5
5
|
import { FormSize } from '@scaleflex/ui-tw/types/form-size';
|
|
6
6
|
import { cn } from '@scaleflex/ui-tw/utils/cn';
|
|
@@ -25,6 +25,7 @@ function Label(_ref) {
|
|
|
25
25
|
tooltip = _ref.tooltip,
|
|
26
26
|
disabledTooltip = _ref.disabledTooltip,
|
|
27
27
|
disabled = _ref.disabled,
|
|
28
|
+
noTruncate = _ref.noTruncate,
|
|
28
29
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
29
30
|
return /*#__PURE__*/React.createElement(LabelPrimitive.Root, _extends({
|
|
30
31
|
"data-slot": "label",
|
|
@@ -32,7 +33,7 @@ function Label(_ref) {
|
|
|
32
33
|
size: size,
|
|
33
34
|
className: className
|
|
34
35
|
}))
|
|
35
|
-
}, props), /*#__PURE__*/React.createElement("span", {
|
|
36
|
+
}, props), noTruncate ? children : /*#__PURE__*/React.createElement("span", {
|
|
36
37
|
className: cn('truncate')
|
|
37
38
|
}, children), (icon || tooltip || disabledTooltip) && /*#__PURE__*/React.createElement(LabelIcon, {
|
|
38
39
|
size: size,
|
package/label/label.types.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export interface LabelProps extends Omit<ComponentProps<typeof LabelPrimitive.Ro
|
|
|
7
7
|
tooltip?: ReactElement | string;
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
disabledTooltip?: ReactElement | string;
|
|
10
|
+
noTruncate?: boolean;
|
|
10
11
|
}
|
|
11
12
|
export interface LabelIconProps extends ComponentProps<'span'>, Pick<LabelProps, 'size' | 'tooltip'> {
|
|
12
13
|
icon?: ReactElement;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleflex/ui-tw",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.107",
|
|
4
4
|
"author": "scaleflex",
|
|
5
5
|
"repository": "github:scaleflex/ui",
|
|
6
6
|
"homepage": "https://github.com/scaleflex/ui/blob/master/README.md",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@radix-ui/react-slot": "^1.1.2",
|
|
26
26
|
"@radix-ui/react-switch": "^1.0.1",
|
|
27
27
|
"@radix-ui/react-tooltip": "^1.2.6",
|
|
28
|
-
"@scaleflex/icons-tw": "^0.0.
|
|
28
|
+
"@scaleflex/icons-tw": "^0.0.107",
|
|
29
29
|
"@tanstack/react-table": "^8.21.3",
|
|
30
30
|
"@types/lodash.merge": "^4.6.9",
|
|
31
31
|
"class-variance-authority": "^0.7.1",
|