@scaleflex/ui-tw 0.0.98 → 0.0.102

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.
@@ -0,0 +1,8 @@
1
+ import * as AccordionPrimitive from '@radix-ui/react-accordion';
2
+ import * as React from 'react';
3
+ import type { ComponentProps } from 'react';
4
+ declare function Accordion({ ...props }: ComponentProps<typeof AccordionPrimitive.Root>): React.JSX.Element;
5
+ declare function AccordionItem({ className, ...props }: ComponentProps<typeof AccordionPrimitive.Item>): React.JSX.Element;
6
+ declare function AccordionTrigger({ className, children, ...props }: ComponentProps<typeof AccordionPrimitive.Trigger>): React.JSX.Element;
7
+ declare function AccordionContent({ className, children, ...props }: ComponentProps<typeof AccordionPrimitive.Content>): React.JSX.Element;
8
+ export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
@@ -0,0 +1,49 @@
1
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
2
+ import _objectDestructuringEmpty from "@babel/runtime/helpers/objectDestructuringEmpty";
3
+ import _extends from "@babel/runtime/helpers/extends";
4
+ var _excluded = ["className"],
5
+ _excluded2 = ["className", "children"],
6
+ _excluded3 = ["className", "children"];
7
+ import * as AccordionPrimitive from '@radix-ui/react-accordion';
8
+ import { cn } from '@scaleflex/ui-tw/utils/cn';
9
+ import { ChevronDownIcon } from 'lucide-react';
10
+ import * as React from 'react';
11
+ function Accordion(_ref) {
12
+ var props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
13
+ return /*#__PURE__*/React.createElement(AccordionPrimitive.Root, _extends({
14
+ "data-slot": "accordion"
15
+ }, props));
16
+ }
17
+ function AccordionItem(_ref2) {
18
+ var className = _ref2.className,
19
+ props = _objectWithoutProperties(_ref2, _excluded);
20
+ return /*#__PURE__*/React.createElement(AccordionPrimitive.Item, _extends({
21
+ "data-slot": "accordion-item",
22
+ className: cn('border-b-border border-b last:border-b-0', className)
23
+ }, props));
24
+ }
25
+ function AccordionTrigger(_ref3) {
26
+ var className = _ref3.className,
27
+ children = _ref3.children,
28
+ props = _objectWithoutProperties(_ref3, _excluded2);
29
+ return /*#__PURE__*/React.createElement(AccordionPrimitive.Header, {
30
+ className: "flex"
31
+ }, /*#__PURE__*/React.createElement(AccordionPrimitive.Trigger, _extends({
32
+ "data-slot": "accordion-trigger",
33
+ className: cn('focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 cursor-pointer items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180', className)
34
+ }, props), children, /*#__PURE__*/React.createElement(ChevronDownIcon, {
35
+ className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"
36
+ })));
37
+ }
38
+ function AccordionContent(_ref4) {
39
+ var className = _ref4.className,
40
+ children = _ref4.children,
41
+ props = _objectWithoutProperties(_ref4, _excluded3);
42
+ return /*#__PURE__*/React.createElement(AccordionPrimitive.Content, _extends({
43
+ "data-slot": "accordion-content",
44
+ className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm"
45
+ }, props), /*#__PURE__*/React.createElement("div", {
46
+ className: cn('pt-0 pb-4', className)
47
+ }, children));
48
+ }
49
+ export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
@@ -0,0 +1 @@
1
+ export { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from './accordion.component';
@@ -0,0 +1 @@
1
+ export { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from './accordion.component';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleflex/ui-tw",
3
- "version": "0.0.98",
3
+ "version": "0.0.102",
4
4
  "author": "scaleflex",
5
5
  "repository": "github:scaleflex/ui",
6
6
  "homepage": "https://github.com/scaleflex/ui/blob/master/README.md",
@@ -13,6 +13,7 @@
13
13
  "main": "lib/index.js",
14
14
  "dependencies": {
15
15
  "@popperjs/core": "^2.6.0",
16
+ "@radix-ui/react-accordion": "^1.2.12",
16
17
  "@radix-ui/react-checkbox": "^1.3.2",
17
18
  "@radix-ui/react-dropdown-menu": "^2.1.15",
18
19
  "@radix-ui/react-label": "^2.1.6",
@@ -23,7 +24,7 @@
23
24
  "@radix-ui/react-slot": "^1.1.2",
24
25
  "@radix-ui/react-switch": "^1.0.1",
25
26
  "@radix-ui/react-tooltip": "^1.2.6",
26
- "@scaleflex/icons-tw": "^0.0.98",
27
+ "@scaleflex/icons-tw": "^0.0.102",
27
28
  "@tanstack/react-table": "^8.21.3",
28
29
  "@types/lodash.merge": "^4.6.9",
29
30
  "class-variance-authority": "^0.7.1",
@@ -0,0 +1 @@
1
+ export { Skeleton } from './skeleton.component';
@@ -0,0 +1 @@
1
+ export { Skeleton } from './skeleton.component';
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ import type { ComponentProps } from 'react';
3
+ declare function Skeleton({ className, ...props }: ComponentProps<'div'>): React.JSX.Element;
4
+ export { Skeleton };
@@ -0,0 +1,14 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["className"];
4
+ import { cn } from '@scaleflex/ui-tw/utils/cn';
5
+ import * as React from 'react';
6
+ function Skeleton(_ref) {
7
+ var className = _ref.className,
8
+ props = _objectWithoutProperties(_ref, _excluded);
9
+ return /*#__PURE__*/React.createElement("div", _extends({
10
+ "data-slot": "skeleton",
11
+ className: cn('bg-accent animate-pulse rounded-md', className)
12
+ }, props));
13
+ }
14
+ export { Skeleton };