@scaleflex/ui-tw 0.0.16 → 0.0.18
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.
|
@@ -44,20 +44,22 @@ function FormSwitchField(_ref) {
|
|
|
44
44
|
disabled: disabled,
|
|
45
45
|
size: size
|
|
46
46
|
}, switchProps))), /*#__PURE__*/React.createElement(Label, {
|
|
47
|
+
className: "text-foreground",
|
|
47
48
|
htmlFor: field.name,
|
|
48
49
|
tooltip: tooltip,
|
|
49
50
|
size: size
|
|
50
51
|
}, label)) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Label, {
|
|
52
|
+
className: "text-foreground",
|
|
51
53
|
htmlFor: field.name,
|
|
52
54
|
tooltip: tooltip,
|
|
53
55
|
size: size
|
|
54
|
-
}, label), /*#__PURE__*/React.createElement(FormControl, null, /*#__PURE__*/React.createElement(Switch, {
|
|
56
|
+
}, label), /*#__PURE__*/React.createElement(FormControl, null, /*#__PURE__*/React.createElement(Switch, _extends({
|
|
55
57
|
id: field.name,
|
|
56
58
|
checked: field.value,
|
|
57
59
|
onCheckedChange: field.onChange,
|
|
58
60
|
disabled: disabled,
|
|
59
61
|
size: size
|
|
60
|
-
})))), description && /*#__PURE__*/React.createElement(FormDescription, {
|
|
62
|
+
}, switchProps))))), description && /*#__PURE__*/React.createElement(FormDescription, {
|
|
61
63
|
size: size
|
|
62
64
|
}, description), /*#__PURE__*/React.createElement(FormMessage, null));
|
|
63
65
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleflex/ui-tw",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.18",
|
|
4
4
|
"author": "scaleflex",
|
|
5
5
|
"repository": "github:scaleflex/ui",
|
|
6
6
|
"homepage": "https://github.com/scaleflex/ui/blob/master/README.md",
|
|
@@ -14,10 +14,11 @@
|
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@popperjs/core": "^2.6.0",
|
|
16
16
|
"@radix-ui/react-label": "^2.1.6",
|
|
17
|
+
"@radix-ui/react-separator": "^1.1.6",
|
|
17
18
|
"@radix-ui/react-slot": "^1.1.2",
|
|
18
19
|
"@radix-ui/react-switch": "^1.0.1",
|
|
19
20
|
"@radix-ui/react-tooltip": "^1.2.6",
|
|
20
|
-
"@scaleflex/icons-tw": "^0.0.
|
|
21
|
+
"@scaleflex/icons-tw": "^0.0.18",
|
|
21
22
|
"@types/lodash.merge": "^4.6.9",
|
|
22
23
|
"class-variance-authority": "^0.7.1",
|
|
23
24
|
"lodash.merge": "^4.6.2",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Separator } from './separator.component';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Separator } from './separator.component';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { ComponentProps } from 'react';
|
|
4
|
+
declare function Separator({ className, orientation, decorative, ...props }: ComponentProps<typeof SeparatorPrimitive.Root>): React.JSX.Element;
|
|
5
|
+
export { Separator };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["className", "orientation", "decorative"];
|
|
4
|
+
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
5
|
+
import { cn } from '@scaleflex/ui-tw/utils/cn';
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
function Separator(_ref) {
|
|
8
|
+
var className = _ref.className,
|
|
9
|
+
_ref$orientation = _ref.orientation,
|
|
10
|
+
orientation = _ref$orientation === void 0 ? 'horizontal' : _ref$orientation,
|
|
11
|
+
_ref$decorative = _ref.decorative,
|
|
12
|
+
decorative = _ref$decorative === void 0 ? true : _ref$decorative,
|
|
13
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
14
|
+
return /*#__PURE__*/React.createElement(SeparatorPrimitive.Root, _extends({
|
|
15
|
+
"data-slot": "separator-root",
|
|
16
|
+
decorative: decorative,
|
|
17
|
+
orientation: orientation,
|
|
18
|
+
className: cn('bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px', className)
|
|
19
|
+
}, props));
|
|
20
|
+
}
|
|
21
|
+
export { Separator };
|