@scaleflex/ui-tw 0.0.114 → 0.0.116

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,6 @@
1
+ import * as AvatarPrimitive from '@radix-ui/react-avatar';
2
+ import React, { type ComponentProps } from 'react';
3
+ declare function Avatar({ className, ...props }: ComponentProps<typeof AvatarPrimitive.Root>): React.JSX.Element;
4
+ declare function AvatarImage({ className, ...props }: ComponentProps<typeof AvatarPrimitive.Image>): React.JSX.Element;
5
+ declare function AvatarFallback({ className, ...props }: ComponentProps<typeof AvatarPrimitive.Fallback>): React.JSX.Element;
6
+ export { Avatar, AvatarImage, AvatarFallback };
@@ -0,0 +1,33 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["className"],
4
+ _excluded2 = ["className"],
5
+ _excluded3 = ["className"];
6
+ import * as AvatarPrimitive from '@radix-ui/react-avatar';
7
+ import { cn } from '@scaleflex/ui-tw/utils/cn';
8
+ import React from 'react';
9
+ function Avatar(_ref) {
10
+ var className = _ref.className,
11
+ props = _objectWithoutProperties(_ref, _excluded);
12
+ return /*#__PURE__*/React.createElement(AvatarPrimitive.Root, _extends({
13
+ "data-slot": "avatar",
14
+ className: cn('relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full', className)
15
+ }, props));
16
+ }
17
+ function AvatarImage(_ref2) {
18
+ var className = _ref2.className,
19
+ props = _objectWithoutProperties(_ref2, _excluded2);
20
+ return /*#__PURE__*/React.createElement(AvatarPrimitive.Image, _extends({
21
+ "data-slot": "avatar-image",
22
+ className: cn('aspect-square h-full w-full', className)
23
+ }, props));
24
+ }
25
+ function AvatarFallback(_ref3) {
26
+ var className = _ref3.className,
27
+ props = _objectWithoutProperties(_ref3, _excluded3);
28
+ return /*#__PURE__*/React.createElement(AvatarPrimitive.Fallback, _extends({
29
+ "data-slot": "avatar-fallback",
30
+ className: cn('bg-muted flex h-full w-full items-center justify-center rounded-full', className)
31
+ }, props));
32
+ }
33
+ export { Avatar, AvatarImage, AvatarFallback };
@@ -0,0 +1 @@
1
+ export { Avatar, AvatarImage, AvatarFallback } from './avatar.component';
@@ -0,0 +1 @@
1
+ export { Avatar, AvatarImage, AvatarFallback } from './avatar.component';
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
3
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
4
4
  var _excluded = ["className", "children", "size", "startIcon", "endIcon", "variant", "loading", "asChild", "disabled"];
5
5
  import { Slot } from '@radix-ui/react-slot';
6
6
  import SpinnerIcon from '@scaleflex/icons-tw/spinner';
@@ -12,7 +12,7 @@ import { ButtonSize, ButtonVariant, buttonBaseClassNames, buttonSizeOptions, but
12
12
  import { createRipple, isIconSize } from './button.utils';
13
13
  import { EndIcon } from './components/end-icon';
14
14
  import { StartIcon, startIconVariants } from './components/start-icon';
15
- var buttonVariants = cva('', {
15
+ var buttonVariants = cva([].concat(_toConsumableArray(buttonBaseClassNames), [focusRingClassNames]), {
16
16
  variants: {
17
17
  variant: buttonVariantOptions,
18
18
  size: buttonSizeOptions
@@ -45,6 +45,9 @@ var Button = /*#__PURE__*/React.forwardRef(function Button(_ref, ref) {
45
45
  var Comp = asChild ? Slot : 'button';
46
46
  var isIcon = isIconSize(size);
47
47
  var handleClick = function handleClick(e) {
48
+ if (e.button !== 0 || e.metaKey || e.ctrlKey) {
49
+ return;
50
+ }
48
51
  if (localRef.current) {
49
52
  createRipple(e, localRef.current);
50
53
  }
@@ -52,12 +55,12 @@ var Button = /*#__PURE__*/React.forwardRef(function Button(_ref, ref) {
52
55
  return /*#__PURE__*/React.createElement(Comp, _extends({
53
56
  ref: localRef,
54
57
  "data-slot": "button",
55
- className: cn.apply(void 0, _toConsumableArray(buttonBaseClassNames).concat([focusRingClassNames, buttonVariants({
58
+ className: cn(buttonVariants({
56
59
  variant: variant,
57
60
  size: size,
58
61
  className: className
59
- }), loading && 'pointer-events-none opacity-30'])),
60
- disabled: disabled,
62
+ }), loading && 'pointer-events-none opacity-30'),
63
+ disabled: !asChild ? disabled : undefined,
61
64
  onMouseDown: handleClick,
62
65
  onKeyDown: function onKeyDown(e) {
63
66
  if (e.key === 'Enter') {
@@ -30,13 +30,14 @@ export var CopyToClipboardButton = function CopyToClipboardButton(props) {
30
30
  setOpen = _useState6[1];
31
31
  var handleCopy = /*#__PURE__*/function () {
32
32
  var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
33
- return _regeneratorRuntime.wrap(function _callee$(_context) {
33
+ var _t;
34
+ return _regeneratorRuntime.wrap(function (_context) {
34
35
  while (1) switch (_context.prev = _context.next) {
35
36
  case 0:
36
37
  _context.prev = 0;
37
- _context.next = 3;
38
+ _context.next = 1;
38
39
  return navigator.clipboard.writeText(text);
39
- case 3:
40
+ case 1:
40
41
  setTooltipText(copiedTooltip);
41
42
  setTooltipVariant('success');
42
43
  setOpen(true);
@@ -47,17 +48,17 @@ export var CopyToClipboardButton = function CopyToClipboardButton(props) {
47
48
  setTooltipText(initialTooltip);
48
49
  setTooltipVariant('default');
49
50
  }, 2000);
50
- _context.next = 13;
51
+ _context.next = 3;
51
52
  break;
52
- case 10:
53
- _context.prev = 10;
54
- _context.t0 = _context["catch"](0);
55
- console.error('Failed to copy', _context.t0);
56
- case 13:
53
+ case 2:
54
+ _context.prev = 2;
55
+ _t = _context["catch"](0);
56
+ console.error('Failed to copy', _t);
57
+ case 3:
57
58
  case "end":
58
59
  return _context.stop();
59
60
  }
60
- }, _callee, null, [[0, 10]]);
61
+ }, _callee, null, [[0, 2]]);
61
62
  }));
62
63
  return function handleCopy() {
63
64
  return _ref.apply(this, arguments);
@@ -1,5 +1,4 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
3
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
3
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
5
4
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
@@ -12,7 +11,6 @@ var _excluded = ["className", "classNames", "showOutsideDays", "captionLayout",
12
11
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
13
12
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
14
13
  import { Button, buttonVariants } from '@scaleflex/ui-tw/button';
15
- import { buttonBaseClassNames } from '@scaleflex/ui-tw/button/button.constants';
16
14
  import { cn } from '@scaleflex/ui-tw/utils/cn';
17
15
  import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';
18
16
  import React from 'react';
@@ -52,12 +50,12 @@ function Calendar(_ref) {
52
50
  months: cn('flex gap-4 flex-col md:flex-row relative', defaultClassNames.months),
53
51
  month: cn('flex flex-col w-full gap-4', defaultClassNames.month),
54
52
  nav: cn('flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between', defaultClassNames.nav),
55
- button_previous: cn.apply(void 0, [buttonVariants({
53
+ button_previous: cn(buttonVariants({
56
54
  variant: buttonVariant
57
- }), 'size-(--cell-size) aria-disabled:opacity-50 p-0 select-none', defaultClassNames.button_previous].concat(_toConsumableArray(buttonBaseClassNames))),
58
- button_next: cn.apply(void 0, [buttonVariants({
55
+ }), 'size-(--cell-size) aria-disabled:opacity-50 p-0 select-none', defaultClassNames.button_previous),
56
+ button_next: cn(buttonVariants({
59
57
  variant: buttonVariant
60
- }), 'size-(--cell-size) aria-disabled:opacity-50 p-0 select-none', defaultClassNames.button_next].concat(_toConsumableArray(buttonBaseClassNames))),
58
+ }), 'size-(--cell-size) aria-disabled:opacity-50 p-0 select-none', defaultClassNames.button_next),
61
59
  month_caption: cn('flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)', defaultClassNames.month_caption),
62
60
  dropdowns: cn('w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5', defaultClassNames.dropdowns),
63
61
  dropdown_root: cn('relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md', defaultClassNames.dropdown_root),
@@ -4,7 +4,6 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
5
5
  var _excluded = ["options", "value", "onChange", "placeholder", "className", "disabled", "size", "readOnly", "popoverClassName", "onBlur", "showGroupSeparator", "defaultOpen", "searchPlaceholder", "popoverContentProps", "actions", "fixedActions", "triggerProps"];
6
6
  import { ButtonVariant, buttonVariants } from '@scaleflex/ui-tw/button';
7
- import { buttonBaseClassNames } from '@scaleflex/ui-tw/button/button.constants';
8
7
  import { createClearHandlers } from '@scaleflex/ui-tw/combobox/combobox.utils';
9
8
  import { Pill } from '@scaleflex/ui-tw/pill';
10
9
  import { Popover, PopoverTrigger } from '@scaleflex/ui-tw/popover';
@@ -123,10 +122,10 @@ export function ComboboxMultiTag(_ref) {
123
122
  tabIndex: 0,
124
123
  "data-clear-icon": "true",
125
124
  "aria-label": "Clear all",
126
- className: cn.apply(void 0, _toConsumableArray(buttonBaseClassNames).concat([focusRingClassNames, buttonVariants({
125
+ className: cn(buttonVariants({
127
126
  size: buttonSize,
128
127
  variant: ButtonVariant.GhostSecondary
129
- })]))
128
+ }))
130
129
  }, "Clear all"), /*#__PURE__*/React.createElement(ChevronsUpDownIcon, {
131
130
  className: cn('text-muted-foreground/70 mr-1.5 ml-auto shrink-0', iconSizeInTriggerOptions[size])
132
131
  })) : /*#__PURE__*/React.createElement(ChevronsUpDownIcon, {
@@ -4,7 +4,6 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
5
5
  var _excluded = ["options", "value", "onChange", "placeholder", "className", "disabled", "size", "readOnly", "popoverClassName", "onBlur", "showGroupSeparator", "defaultOpen", "searchPlaceholder", "popoverContentProps", "actions", "fixedActions", "triggerProps"];
6
6
  import { ButtonVariant, buttonVariants } from '@scaleflex/ui-tw/button';
7
- import { buttonBaseClassNames } from '@scaleflex/ui-tw/button/button.constants';
8
7
  import { SelectActions } from '@scaleflex/ui-tw/combobox/combobox.component';
9
8
  import { createClearHandlers, flattenUsersOptions, isUserOptionGroup } from '@scaleflex/ui-tw/combobox/combobox.utils';
10
9
  import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from '@scaleflex/ui-tw/command';
@@ -161,10 +160,10 @@ export function ComboboxUsers(_ref) {
161
160
  tabIndex: 0,
162
161
  "data-clear-icon": "true",
163
162
  "aria-label": "Clear all",
164
- className: cn.apply(void 0, _toConsumableArray(buttonBaseClassNames).concat([focusRingClassNames, buttonVariants({
163
+ className: cn(buttonVariants({
165
164
  size: buttonSize,
166
165
  variant: ButtonVariant.GhostSecondary
167
- })]))
166
+ }))
168
167
  }, "Clear all"), /*#__PURE__*/React.createElement(ChevronsUpDownIcon, {
169
168
  className: cn('text-muted-foreground/70 mr-1.5 ml-auto shrink-0', iconSizeInTriggerOptions[size])
170
169
  })) : /*#__PURE__*/React.createElement(ChevronsUpDownIcon, {
@@ -4,7 +4,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
4
4
  var _excluded = ["children", "open", "disabled", "readOnly", "size", "className", "selected", "showClear", "onClearAll", "formItemId", "triggerProps"],
5
5
  _excluded2 = ["children", "open", "label", "disabled", "readOnly", "size", "className", "selected", "showClear", "onClearAll", "formItemId", "triggerProps", "icon", "iconClassName", "optionsLength", "selectedLength", "onCheckboxClick", "toggleFirstOption", "displayCount"];
6
6
  import { buttonVariants } from '@scaleflex/ui-tw/button';
7
- import { ButtonVariant, buttonBaseClassNames } from '@scaleflex/ui-tw/button/button.constants';
7
+ import { ButtonVariant } from '@scaleflex/ui-tw/button/button.constants';
8
8
  import { VisualCheckbox } from '@scaleflex/ui-tw/checkbox/checkbox.component';
9
9
  import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from '@scaleflex/ui-tw/command';
10
10
  import { CommandCheckboxItem } from '@scaleflex/ui-tw/command/command.component';
@@ -13,7 +13,7 @@ import { PopoverContent, PopoverTrigger } from '@scaleflex/ui-tw/popover';
13
13
  import { SelectSeparator, selectTriggerVariants } from '@scaleflex/ui-tw/select/select.component';
14
14
  import { getBaseSelectClassNames, selectLabelSizeOptions, selectReadOnlyClassNames } from '@scaleflex/ui-tw/select/select.constants';
15
15
  import { Separator } from '@scaleflex/ui-tw/separator';
16
- import { focusRingClassNames, getBaseInputClasses } from '@scaleflex/ui-tw/styles/shared-classes';
16
+ import { getBaseInputClasses } from '@scaleflex/ui-tw/styles/shared-classes';
17
17
  import { getToolbarSizes } from '@scaleflex/ui-tw/textarea/textarea.utils';
18
18
  import { FormSize } from '@scaleflex/ui-tw/types/form-size';
19
19
  import { cn } from '@scaleflex/ui-tw/utils/cn';
@@ -87,10 +87,10 @@ export function ComboboxTrigger(_ref2) {
87
87
  tabIndex: 0,
88
88
  "data-clear-icon": "true",
89
89
  "aria-label": "Clear all",
90
- className: cn.apply(void 0, _toConsumableArray(buttonBaseClassNames).concat([focusRingClassNames, buttonVariants({
90
+ className: cn(buttonVariants({
91
91
  size: iconSize,
92
92
  variant: ButtonVariant.GhostSecondary
93
- })]))
93
+ }))
94
94
  }, /*#__PURE__*/React.createElement(XIcon, {
95
95
  "data-clear-icon": true,
96
96
  className: cn('text-muted-foreground/70 hover:text-muted-foreground shrink-0', iconSizeInTriggerOptions[size])
@@ -176,10 +176,10 @@ export function ComboboxCheckboxTrigger(_ref3) {
176
176
  tabIndex: 0,
177
177
  "data-clear-icon": "true",
178
178
  "aria-label": "Clear all",
179
- className: cn.apply(void 0, _toConsumableArray(buttonBaseClassNames).concat([focusRingClassNames, buttonVariants({
179
+ className: cn(buttonVariants({
180
180
  size: iconSize,
181
181
  variant: ButtonVariant.GhostSecondary
182
- }), optionsLength === 1 && '-mr-2']))
182
+ }), optionsLength === 1 && '-mr-2')
183
183
  }, /*#__PURE__*/React.createElement(XIcon, {
184
184
  "data-clear-icon": true,
185
185
  className: cn('text-muted-foreground/70 hover:text-muted-foreground shrink-0', iconSizeInTriggerOptions[size])
@@ -1,4 +1,3 @@
1
- import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
1
  import _extends from "@babel/runtime/helpers/extends";
3
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
3
  var _excluded = ["className"],
@@ -10,11 +9,10 @@ var _excluded = ["className"],
10
9
  _excluded7 = ["className", "size"],
11
10
  _excluded8 = ["className"],
12
11
  _excluded9 = ["className", "size", "isGroup", "icon", "tooltip", "children", "selectedValue", "multiple", "value", "shortcut", "disabledTooltip", "disabled", "iconClassName", "textClassName"],
13
- _excluded10 = ["className", "size", "isGroup", "name", "email", "profileUrl", "selectedValue", "multiple", "value", "disabled", "textClassName"],
14
- _excluded11 = ["className", "textClassName", "size", "isGroup", "children", "selectedValue", "value", "icon", "disabled", "tooltip", "disabledTooltip"],
15
- _excluded12 = ["className"];
12
+ _excluded0 = ["className", "size", "isGroup", "name", "email", "profileUrl", "selectedValue", "multiple", "value", "disabled", "textClassName"],
13
+ _excluded1 = ["className", "textClassName", "size", "isGroup", "children", "selectedValue", "value", "icon", "disabled", "tooltip", "disabledTooltip"],
14
+ _excluded10 = ["className"];
16
15
  import { ButtonVariant, buttonVariants } from '@scaleflex/ui-tw/button';
17
- import { buttonBaseClassNames } from '@scaleflex/ui-tw/button/button.constants';
18
16
  import { Checkbox } from '@scaleflex/ui-tw/checkbox';
19
17
  import { Dialog, DialogFormDescription, DialogFormHeader, DialogFormTitle, DialogWideContent } from '@scaleflex/ui-tw/dialog';
20
18
  import { LabelIcon } from '@scaleflex/ui-tw/label/components/label-icon';
@@ -22,7 +20,6 @@ import { crossSizeOptions } from '@scaleflex/ui-tw/search/search.constants';
22
20
  import { SelectIcon } from '@scaleflex/ui-tw/select/components/select-icon';
23
21
  import { selectItemVariants, selectTriggerVariants } from '@scaleflex/ui-tw/select/select.component';
24
22
  import { getOptionInGroupPaddingLeft } from '@scaleflex/ui-tw/select/select.utils';
25
- import { focusRingClassNames } from '@scaleflex/ui-tw/styles/shared-classes';
26
23
  import { switchThumbSizeOptions } from '@scaleflex/ui-tw/switch/switch.constants';
27
24
  import { FormSize } from '@scaleflex/ui-tw/types/form-size';
28
25
  import { cn } from '@scaleflex/ui-tw/utils/cn';
@@ -121,10 +118,10 @@ function CommandClear(_ref4) {
121
118
  onClick: onClickClear,
122
119
  "data-clear-icon": "true",
123
120
  "aria-label": "Clear search",
124
- className: cn.apply(void 0, _toConsumableArray(buttonBaseClassNames).concat([focusRingClassNames, buttonVariants({
121
+ className: cn(buttonVariants({
125
122
  size: crossSize,
126
123
  variant: ButtonVariant.GhostSecondary
127
- }), 'absolute top-1/2 right-2 -translate-y-1/2', className]))
124
+ }), 'absolute top-1/2 right-2 -translate-y-1/2', className)
128
125
  }, props), /*#__PURE__*/React.createElement(XIcon, {
129
126
  "data-clear-icon": true,
130
127
  className: cn('text-muted-foreground/70 hover:text-muted-foreground shrink-0')
@@ -220,19 +217,19 @@ function CommandItem(_ref9) {
220
217
  className: cn('text-primary ml-auto h-4 w-4', selected ? 'opacity-100' : 'opacity-0')
221
218
  })));
222
219
  }
223
- function CommandUserItem(_ref10) {
224
- var className = _ref10.className,
225
- size = _ref10.size,
226
- isGroup = _ref10.isGroup,
227
- name = _ref10.name,
228
- email = _ref10.email,
229
- profileUrl = _ref10.profileUrl,
230
- selectedValue = _ref10.selectedValue,
231
- multiple = _ref10.multiple,
232
- value = _ref10.value,
233
- disabled = _ref10.disabled,
234
- textClassName = _ref10.textClassName,
235
- props = _objectWithoutProperties(_ref10, _excluded10);
220
+ function CommandUserItem(_ref0) {
221
+ var className = _ref0.className,
222
+ size = _ref0.size,
223
+ isGroup = _ref0.isGroup,
224
+ name = _ref0.name,
225
+ email = _ref0.email,
226
+ profileUrl = _ref0.profileUrl,
227
+ selectedValue = _ref0.selectedValue,
228
+ multiple = _ref0.multiple,
229
+ value = _ref0.value,
230
+ disabled = _ref0.disabled,
231
+ textClassName = _ref0.textClassName,
232
+ props = _objectWithoutProperties(_ref0, _excluded0);
236
233
  var selected = value && (multiple ? selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.includes(value) : value === selectedValue);
237
234
  return /*#__PURE__*/React.createElement(CommandPrimitive.Item, _extends({
238
235
  "data-slot": "command-item",
@@ -264,19 +261,19 @@ function CommandUserItem(_ref10) {
264
261
  className: cn('text-primary ml-auto h-4 w-4', selected ? 'opacity-100' : 'opacity-0')
265
262
  })));
266
263
  }
267
- function CommandCheckboxItem(_ref11) {
268
- var className = _ref11.className,
269
- textClassName = _ref11.textClassName,
270
- size = _ref11.size,
271
- isGroup = _ref11.isGroup,
272
- children = _ref11.children,
273
- selectedValue = _ref11.selectedValue,
274
- value = _ref11.value,
275
- icon = _ref11.icon,
276
- disabled = _ref11.disabled,
277
- tooltip = _ref11.tooltip,
278
- disabledTooltip = _ref11.disabledTooltip,
279
- props = _objectWithoutProperties(_ref11, _excluded11);
264
+ function CommandCheckboxItem(_ref1) {
265
+ var className = _ref1.className,
266
+ textClassName = _ref1.textClassName,
267
+ size = _ref1.size,
268
+ isGroup = _ref1.isGroup,
269
+ children = _ref1.children,
270
+ selectedValue = _ref1.selectedValue,
271
+ value = _ref1.value,
272
+ icon = _ref1.icon,
273
+ disabled = _ref1.disabled,
274
+ tooltip = _ref1.tooltip,
275
+ disabledTooltip = _ref1.disabledTooltip,
276
+ props = _objectWithoutProperties(_ref1, _excluded1);
280
277
  var selected = value && (selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.includes(value));
281
278
  return /*#__PURE__*/React.createElement(CommandPrimitive.Item, _extends({
282
279
  "data-slot": "command-checkbox-item",
@@ -305,9 +302,9 @@ function CommandCheckboxItem(_ref11) {
305
302
  tooltip: disabled ? disabledTooltip : tooltip
306
303
  }))));
307
304
  }
308
- function CommandShortcut(_ref12) {
309
- var className = _ref12.className,
310
- props = _objectWithoutProperties(_ref12, _excluded12);
305
+ function CommandShortcut(_ref10) {
306
+ var className = _ref10.className,
307
+ props = _objectWithoutProperties(_ref10, _excluded10);
311
308
  return /*#__PURE__*/React.createElement("span", _extends({
312
309
  "data-slot": "command-shortcut",
313
310
  className: cn('text-muted-foreground ml-auto text-xs tracking-widest', className)
@@ -79,12 +79,12 @@ function ContextMenuContent(_ref9) {
79
79
  className: cn('bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out 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 border-secondary z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md', className)
80
80
  }, props)));
81
81
  }
82
- function ContextMenuItem(_ref10) {
83
- var className = _ref10.className,
84
- inset = _ref10.inset,
85
- _ref10$variant = _ref10.variant,
86
- variant = _ref10$variant === void 0 ? 'default' : _ref10$variant,
87
- props = _objectWithoutProperties(_ref10, _excluded4);
82
+ function ContextMenuItem(_ref0) {
83
+ var className = _ref0.className,
84
+ inset = _ref0.inset,
85
+ _ref0$variant = _ref0.variant,
86
+ variant = _ref0$variant === void 0 ? 'default' : _ref0$variant,
87
+ props = _objectWithoutProperties(_ref0, _excluded4);
88
88
  return /*#__PURE__*/React.createElement(ContextMenuPrimitive.Item, _extends({
89
89
  "data-slot": "context-menu-item",
90
90
  "data-inset": inset,
@@ -92,11 +92,11 @@ function ContextMenuItem(_ref10) {
92
92
  className: cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className)
93
93
  }, props));
94
94
  }
95
- function ContextMenuCheckboxItem(_ref11) {
96
- var className = _ref11.className,
97
- children = _ref11.children,
98
- checked = _ref11.checked,
99
- props = _objectWithoutProperties(_ref11, _excluded5);
95
+ function ContextMenuCheckboxItem(_ref1) {
96
+ var className = _ref1.className,
97
+ children = _ref1.children,
98
+ checked = _ref1.checked,
99
+ props = _objectWithoutProperties(_ref1, _excluded5);
100
100
  return /*#__PURE__*/React.createElement(ContextMenuPrimitive.CheckboxItem, _extends({
101
101
  "data-slot": "context-menu-checkbox-item",
102
102
  className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
@@ -107,10 +107,10 @@ function ContextMenuCheckboxItem(_ref11) {
107
107
  className: "size-4"
108
108
  }))), children);
109
109
  }
110
- function ContextMenuRadioItem(_ref12) {
111
- var className = _ref12.className,
112
- children = _ref12.children,
113
- props = _objectWithoutProperties(_ref12, _excluded6);
110
+ function ContextMenuRadioItem(_ref10) {
111
+ var className = _ref10.className,
112
+ children = _ref10.children,
113
+ props = _objectWithoutProperties(_ref10, _excluded6);
114
114
  return /*#__PURE__*/React.createElement(ContextMenuPrimitive.RadioItem, _extends({
115
115
  "data-slot": "context-menu-radio-item",
116
116
  className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className)
@@ -120,27 +120,27 @@ function ContextMenuRadioItem(_ref12) {
120
120
  className: "size-2 fill-current"
121
121
  }))), children);
122
122
  }
123
- function ContextMenuLabel(_ref13) {
124
- var className = _ref13.className,
125
- inset = _ref13.inset,
126
- props = _objectWithoutProperties(_ref13, _excluded7);
123
+ function ContextMenuLabel(_ref11) {
124
+ var className = _ref11.className,
125
+ inset = _ref11.inset,
126
+ props = _objectWithoutProperties(_ref11, _excluded7);
127
127
  return /*#__PURE__*/React.createElement(ContextMenuPrimitive.Label, _extends({
128
128
  "data-slot": "context-menu-label",
129
129
  "data-inset": inset,
130
130
  className: cn('text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8', className)
131
131
  }, props));
132
132
  }
133
- function ContextMenuSeparator(_ref14) {
134
- var className = _ref14.className,
135
- props = _objectWithoutProperties(_ref14, _excluded8);
133
+ function ContextMenuSeparator(_ref12) {
134
+ var className = _ref12.className,
135
+ props = _objectWithoutProperties(_ref12, _excluded8);
136
136
  return /*#__PURE__*/React.createElement(ContextMenuPrimitive.Separator, _extends({
137
137
  "data-slot": "context-menu-separator",
138
138
  className: cn('bg-border -mx-1 my-1 h-px', className)
139
139
  }, props));
140
140
  }
141
- function ContextMenuShortcut(_ref15) {
142
- var className = _ref15.className,
143
- props = _objectWithoutProperties(_ref15, _excluded9);
141
+ function ContextMenuShortcut(_ref13) {
142
+ var className = _ref13.className,
143
+ props = _objectWithoutProperties(_ref13, _excluded9);
144
144
  return /*#__PURE__*/React.createElement("span", _extends({
145
145
  "data-slot": "context-menu-shortcut",
146
146
  className: cn('text-muted-foreground ml-auto text-xs tracking-widest', className)
@@ -10,12 +10,12 @@ var _excluded = ["className"],
10
10
  _excluded7 = ["className"],
11
11
  _excluded8 = ["className"],
12
12
  _excluded9 = ["className"],
13
+ _excluded0 = ["className"],
14
+ _excluded1 = ["className"],
13
15
  _excluded10 = ["className"],
14
16
  _excluded11 = ["className"],
15
17
  _excluded12 = ["className"],
16
- _excluded13 = ["className"],
17
- _excluded14 = ["className"],
18
- _excluded15 = ["className"];
18
+ _excluded13 = ["className"];
19
19
  import * as DialogPrimitive from '@radix-ui/react-dialog';
20
20
  import { Button } from '@scaleflex/ui-tw/button';
21
21
  import { focusRingClassNames } from '@scaleflex/ui-tw/styles/shared-classes';
@@ -116,82 +116,82 @@ function DialogFormHeader(_ref9) {
116
116
  className: cn('text-foreground flex flex-col items-center justify-center p-6 pt-8 text-center', className)
117
117
  }, props));
118
118
  }
119
- function DialogWideBody(_ref10) {
120
- var className = _ref10.className,
121
- props = _objectWithoutProperties(_ref10, _excluded6);
119
+ function DialogWideBody(_ref0) {
120
+ var className = _ref0.className,
121
+ props = _objectWithoutProperties(_ref0, _excluded6);
122
122
  return /*#__PURE__*/React.createElement("div", _extends({
123
123
  "data-slot": "dialog-body",
124
124
  className: cn('p-6', className)
125
125
  }, props));
126
126
  }
127
- function DialogFormBody(_ref11) {
128
- var className = _ref11.className,
129
- props = _objectWithoutProperties(_ref11, _excluded7);
127
+ function DialogFormBody(_ref1) {
128
+ var className = _ref1.className,
129
+ props = _objectWithoutProperties(_ref1, _excluded7);
130
130
  return /*#__PURE__*/React.createElement("div", _extends({
131
131
  "data-slot": "dialog-body",
132
132
  className: cn('px-6', className)
133
133
  }, props));
134
134
  }
135
- function DialogWideTitle(_ref12) {
136
- var className = _ref12.className,
137
- props = _objectWithoutProperties(_ref12, _excluded8);
135
+ function DialogWideTitle(_ref10) {
136
+ var className = _ref10.className,
137
+ props = _objectWithoutProperties(_ref10, _excluded8);
138
138
  return /*#__PURE__*/React.createElement(DialogPrimitive.Title, _extends({
139
139
  "data-slot": "dialog-title",
140
140
  className: cn('text-lg leading-7', className)
141
141
  }, props));
142
142
  }
143
- function DialogFormTitle(_ref13) {
144
- var className = _ref13.className,
145
- props = _objectWithoutProperties(_ref13, _excluded9);
143
+ function DialogFormTitle(_ref11) {
144
+ var className = _ref11.className,
145
+ props = _objectWithoutProperties(_ref11, _excluded9);
146
146
  return /*#__PURE__*/React.createElement(DialogPrimitive.Title, _extends({
147
147
  "data-slot": "dialog-title",
148
148
  className: cn('text-foreground text-lg leading-7 font-medium', className)
149
149
  }, props));
150
150
  }
151
- function DialogFormDescription(_ref14) {
152
- var className = _ref14.className,
153
- props = _objectWithoutProperties(_ref14, _excluded10);
151
+ function DialogFormDescription(_ref12) {
152
+ var className = _ref12.className,
153
+ props = _objectWithoutProperties(_ref12, _excluded0);
154
154
  return /*#__PURE__*/React.createElement(DialogPrimitive.Description, _extends({
155
155
  "data-slot": "dialog-description",
156
156
  className: cn('text-muted-foreground text-sm', className)
157
157
  }, props));
158
158
  }
159
- function DialogFormIcon(_ref15) {
160
- var className = _ref15.className,
161
- props = _objectWithoutProperties(_ref15, _excluded11);
159
+ function DialogFormIcon(_ref13) {
160
+ var className = _ref13.className,
161
+ props = _objectWithoutProperties(_ref13, _excluded1);
162
162
  return /*#__PURE__*/React.createElement("div", _extends({
163
163
  className: cn('bg-accent mb-2 flex h-16 w-16 items-center justify-center rounded-full', "[&_svg:not([class*='text-'])]:text-primary [&_svg:not([class*='size-'])]:size-9", className)
164
164
  }, props));
165
165
  }
166
- function DialogFormWarningIcon(_ref16) {
167
- var className = _ref16.className,
168
- props = _objectWithoutProperties(_ref16, _excluded12);
166
+ function DialogFormWarningIcon(_ref14) {
167
+ var className = _ref14.className,
168
+ props = _objectWithoutProperties(_ref14, _excluded10);
169
169
  return /*#__PURE__*/React.createElement(DialogFormIcon, _extends({
170
170
  className: cn(className, 'bg-warning-10')
171
171
  }, props), /*#__PURE__*/React.createElement(CircleAlertIcon, {
172
172
  className: "text-warning"
173
173
  }));
174
174
  }
175
- function DialogFormErrorIcon(_ref17) {
176
- var className = _ref17.className,
177
- props = _objectWithoutProperties(_ref17, _excluded13);
175
+ function DialogFormErrorIcon(_ref15) {
176
+ var className = _ref15.className,
177
+ props = _objectWithoutProperties(_ref15, _excluded11);
178
178
  return /*#__PURE__*/React.createElement(DialogFormIcon, _extends({
179
179
  className: cn(className, 'bg-destructive-10')
180
180
  }, props), /*#__PURE__*/React.createElement(CircleAlertIcon, {
181
181
  className: "text-destructive"
182
182
  }));
183
183
  }
184
- function DialogWideFooter(_ref18) {
185
- var className = _ref18.className,
186
- props = _objectWithoutProperties(_ref18, _excluded14);
184
+ function DialogWideFooter(_ref16) {
185
+ var className = _ref16.className,
186
+ props = _objectWithoutProperties(_ref16, _excluded12);
187
187
  return /*#__PURE__*/React.createElement("div", _extends({
188
188
  "data-slot": "dialog-footer",
189
189
  className: cn('border-border flex flex-col-reverse gap-3 border-t p-6 sm:flex-row sm:justify-end', className)
190
190
  }, props));
191
191
  }
192
- function DialogFormFooter(_ref19) {
193
- var className = _ref19.className,
194
- props = _objectWithoutProperties(_ref19, _excluded15);
192
+ function DialogFormFooter(_ref17) {
193
+ var className = _ref17.className,
194
+ props = _objectWithoutProperties(_ref17, _excluded13);
195
195
  return /*#__PURE__*/React.createElement("div", _extends({
196
196
  "data-slot": "dialog-footer",
197
197
  className: cn('flex justify-end gap-3 p-6', className)
@@ -11,7 +11,7 @@ var _excluded = ["className", "sideOffset"],
11
11
  _excluded7 = ["className", "size"],
12
12
  _excluded8 = ["className", "inset", "children", "size"],
13
13
  _excluded9 = ["className", "children", "label", "labelClassName", "size", "icon", "asChild"],
14
- _excluded10 = ["className"];
14
+ _excluded0 = ["className"];
15
15
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
16
16
  import { Slot } from '@radix-ui/react-slot';
17
17
  import { DropdownMenuItemSize, dropdownMenuButtonTriggerOptions, dropdownMenuCheckboxItemSizeOptions, dropdownMenuIconSizeOptions, dropdownMenuItemIconSizeOptions, dropdownMenuItemIndicatorSizeOptions, dropdownMenuItemSizeOptions, dropdownMenuShortcutSizeOptions } from '@scaleflex/ui-tw/dropdown-menu/dropdown-menu.constants';
@@ -188,11 +188,11 @@ function DropdownMenuRadioItem(_ref9) {
188
188
  className: "size-2 fill-current"
189
189
  }))), children);
190
190
  }
191
- function DropdownMenuLabel(_ref10) {
192
- var className = _ref10.className,
193
- _ref10$size = _ref10.size,
194
- size = _ref10$size === void 0 ? DropdownMenuItemSize.Sm : _ref10$size,
195
- props = _objectWithoutProperties(_ref10, _excluded5);
191
+ function DropdownMenuLabel(_ref0) {
192
+ var className = _ref0.className,
193
+ _ref0$size = _ref0.size,
194
+ size = _ref0$size === void 0 ? DropdownMenuItemSize.Sm : _ref0$size,
195
+ props = _objectWithoutProperties(_ref0, _excluded5);
196
196
  return /*#__PURE__*/React.createElement(DropdownMenuPrimitive.Label, _extends({
197
197
  "data-slot": "dropdown-menu-label",
198
198
  className: cn(dropdownMenuLabelVariants({
@@ -200,18 +200,18 @@ function DropdownMenuLabel(_ref10) {
200
200
  }), className)
201
201
  }, props));
202
202
  }
203
- function DropdownMenuSeparator(_ref11) {
204
- var className = _ref11.className,
205
- props = _objectWithoutProperties(_ref11, _excluded6);
203
+ function DropdownMenuSeparator(_ref1) {
204
+ var className = _ref1.className,
205
+ props = _objectWithoutProperties(_ref1, _excluded6);
206
206
  return /*#__PURE__*/React.createElement(DropdownMenuPrimitive.Separator, _extends({
207
207
  "data-slot": "dropdown-menu-separator",
208
208
  className: cn('bg-border -mx-1 my-1 h-px', className)
209
209
  }, props));
210
210
  }
211
- function DropdownMenuShortcut(_ref12) {
212
- var className = _ref12.className,
213
- size = _ref12.size,
214
- props = _objectWithoutProperties(_ref12, _excluded7);
211
+ function DropdownMenuShortcut(_ref10) {
212
+ var className = _ref10.className,
213
+ size = _ref10.size,
214
+ props = _objectWithoutProperties(_ref10, _excluded7);
215
215
  return /*#__PURE__*/React.createElement("span", _extends({
216
216
  "data-slot": "dropdown-menu-shortcut",
217
217
  className: cn('text-muted-foreground absolute tracking-widest', dropdownMenuShortcutVariants({
@@ -219,19 +219,19 @@ function DropdownMenuShortcut(_ref12) {
219
219
  }), className)
220
220
  }, props));
221
221
  }
222
- function DropdownMenuSub(_ref13) {
223
- var props = _extends({}, (_objectDestructuringEmpty(_ref13), _ref13));
222
+ function DropdownMenuSub(_ref11) {
223
+ var props = _extends({}, (_objectDestructuringEmpty(_ref11), _ref11));
224
224
  return /*#__PURE__*/React.createElement(DropdownMenuPrimitive.Sub, _extends({
225
225
  "data-slot": "dropdown-menu-sub"
226
226
  }, props));
227
227
  }
228
- function DropdownMenuSubTrigger(_ref14) {
229
- var className = _ref14.className,
230
- inset = _ref14.inset,
231
- children = _ref14.children,
232
- _ref14$size = _ref14.size,
233
- size = _ref14$size === void 0 ? DropdownMenuItemSize.Sm : _ref14$size,
234
- props = _objectWithoutProperties(_ref14, _excluded8);
228
+ function DropdownMenuSubTrigger(_ref12) {
229
+ var className = _ref12.className,
230
+ inset = _ref12.inset,
231
+ children = _ref12.children,
232
+ _ref12$size = _ref12.size,
233
+ size = _ref12$size === void 0 ? DropdownMenuItemSize.Sm : _ref12$size,
234
+ props = _objectWithoutProperties(_ref12, _excluded8);
235
235
  return /*#__PURE__*/React.createElement(DropdownMenuPrimitive.SubTrigger, _extends({
236
236
  "data-slot": "dropdown-menu-sub-trigger",
237
237
  "data-inset": inset,
@@ -244,17 +244,17 @@ function DropdownMenuSubTrigger(_ref14) {
244
244
  }))
245
245
  }));
246
246
  }
247
- function DropdownMenuButtonTrigger(_ref15) {
248
- var className = _ref15.className,
249
- children = _ref15.children,
250
- label = _ref15.label,
251
- labelClassName = _ref15.labelClassName,
252
- _ref15$size = _ref15.size,
253
- size = _ref15$size === void 0 ? DropdownMenuItemSize.Sm : _ref15$size,
254
- icon = _ref15.icon,
255
- _ref15$asChild = _ref15.asChild,
256
- asChild = _ref15$asChild === void 0 ? false : _ref15$asChild,
257
- props = _objectWithoutProperties(_ref15, _excluded9);
247
+ function DropdownMenuButtonTrigger(_ref13) {
248
+ var className = _ref13.className,
249
+ children = _ref13.children,
250
+ label = _ref13.label,
251
+ labelClassName = _ref13.labelClassName,
252
+ _ref13$size = _ref13.size,
253
+ size = _ref13$size === void 0 ? DropdownMenuItemSize.Sm : _ref13$size,
254
+ icon = _ref13.icon,
255
+ _ref13$asChild = _ref13.asChild,
256
+ asChild = _ref13$asChild === void 0 ? false : _ref13$asChild,
257
+ props = _objectWithoutProperties(_ref13, _excluded9);
258
258
  var Comp = asChild ? Slot : 'button';
259
259
  return /*#__PURE__*/React.createElement(DropdownMenuPrimitive.Trigger, _extends({
260
260
  asChild: true
@@ -278,9 +278,9 @@ function DropdownMenuButtonTrigger(_ref15) {
278
278
  }))
279
279
  })));
280
280
  }
281
- function DropdownMenuSubContent(_ref16) {
282
- var className = _ref16.className,
283
- props = _objectWithoutProperties(_ref16, _excluded10);
281
+ function DropdownMenuSubContent(_ref14) {
282
+ var className = _ref14.className,
283
+ props = _objectWithoutProperties(_ref14, _excluded0);
284
284
  return /*#__PURE__*/React.createElement(DropdownMenuPrimitive.SubContent, _extends({
285
285
  "data-slot": "dropdown-menu-sub-content",
286
286
  className: cn('origin-(--radix-dropdown-menu-content-transform-origin)', 'bg-popover text-popover-foreground border-border z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-lg', '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', 'data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95', 'data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95', className)
@@ -8,7 +8,7 @@ declare const inputGroupVariants: (props?: ({
8
8
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
9
9
  declare function InputGroup({ className, size, ...props }: ComponentProps<'div'> & VariantProps<typeof inputGroupVariants>): React.JSX.Element;
10
10
  declare const inputGroupAddonVariants: (props?: ({
11
- align?: "block-end" | "block-start" | "inline-end" | "inline-start" | null | undefined;
11
+ align?: "inline-end" | "inline-start" | "block-end" | "block-start" | null | undefined;
12
12
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
13
13
  declare function InputGroupAddon({ className, align, ...props }: ComponentProps<'div'> & VariantProps<typeof inputGroupAddonVariants>): React.JSX.Element;
14
14
  declare function InputGroupButton({ className, type, variant, size, ...props }: ButtonProps): React.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleflex/ui-tw",
3
- "version": "0.0.114",
3
+ "version": "0.0.116",
4
4
  "author": "scaleflex",
5
5
  "repository": "github:scaleflex/ui",
6
6
  "homepage": "https://github.com/scaleflex/ui/blob/master/README.md",
@@ -14,6 +14,7 @@
14
14
  "dependencies": {
15
15
  "@popperjs/core": "^2.6.0",
16
16
  "@radix-ui/react-accordion": "^1.2.12",
17
+ "@radix-ui/react-avatar": "^1.1.1",
17
18
  "@radix-ui/react-checkbox": "^1.3.2",
18
19
  "@radix-ui/react-context-menu": "^2.2.16",
19
20
  "@radix-ui/react-dropdown-menu": "^2.1.15",
@@ -25,7 +26,7 @@
25
26
  "@radix-ui/react-slot": "^1.1.2",
26
27
  "@radix-ui/react-switch": "^1.0.1",
27
28
  "@radix-ui/react-tooltip": "^1.2.6",
28
- "@scaleflex/icons-tw": "^0.0.114",
29
+ "@scaleflex/icons-tw": "^0.0.116",
29
30
  "@tanstack/react-table": "^8.21.3",
30
31
  "@types/lodash.merge": "^4.6.9",
31
32
  "class-variance-authority": "^0.7.1",
@@ -1,13 +1,11 @@
1
- import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
1
  import _extends from "@babel/runtime/helpers/extends";
3
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
5
4
  var _excluded = ["className", "size", "disabled", "readOnly", "onChange"];
6
5
  import { buttonVariants } from '@scaleflex/ui-tw/button';
7
- import { ButtonVariant, buttonBaseClassNames } from '@scaleflex/ui-tw/button/button.constants';
6
+ import { ButtonVariant } from '@scaleflex/ui-tw/button/button.constants';
8
7
  import { Input } from '@scaleflex/ui-tw/input';
9
8
  import { crossSizeOptions, iconSizeOptions, searchPaddingMap } from '@scaleflex/ui-tw/search/search.constants';
10
- import { focusRingClassNames } from '@scaleflex/ui-tw/styles/shared-classes';
11
9
  import { FormSize } from '@scaleflex/ui-tw/types/form-size';
12
10
  import { cn } from '@scaleflex/ui-tw/utils/cn';
13
11
  import { Search as SearchIcon, XIcon } from 'lucide-react';
@@ -58,10 +56,10 @@ export function Search(_ref) {
58
56
  onClick: handleClear,
59
57
  "data-clear-icon": "true",
60
58
  "aria-label": "Clear",
61
- className: cn.apply(void 0, _toConsumableArray(buttonBaseClassNames).concat([focusRingClassNames, buttonVariants({
59
+ className: cn(buttonVariants({
62
60
  size: crossSize,
63
61
  variant: ButtonVariant.GhostSecondary
64
- }), 'absolute top-1/2 right-2 -translate-y-1/2']))
62
+ }), 'absolute top-1/2 right-2 -translate-y-1/2')
65
63
  }, /*#__PURE__*/React.createElement(XIcon, {
66
64
  "data-clear-icon": true,
67
65
  className: cn('text-muted-foreground/70 hover:text-muted-foreground shrink-0')
@@ -168,9 +168,9 @@ function SelectScrollUpButton(_ref9) {
168
168
  className: "text-muted-foreground/70 size-4"
169
169
  }));
170
170
  }
171
- function SelectScrollDownButton(_ref10) {
172
- var className = _ref10.className,
173
- props = _objectWithoutProperties(_ref10, _excluded7);
171
+ function SelectScrollDownButton(_ref0) {
172
+ var className = _ref0.className,
173
+ props = _objectWithoutProperties(_ref0, _excluded7);
174
174
  return /*#__PURE__*/React.createElement(SelectPrimitive.ScrollDownButton, _extends({
175
175
  "data-slot": "select-scroll-down-button",
176
176
  className: cn('flex cursor-default items-center justify-center py-1', className)
@@ -0,0 +1 @@
1
+ export { Tabs, TabsList, TabsTrigger, TabsContent, TabsListUnderline, TabsTriggerUnderline, TabsListSidebar, TabsTriggerSidebar, } from './tabs.component';
package/tabs/index.js ADDED
@@ -0,0 +1,5 @@
1
+ export {
2
+ // primitives
3
+ Tabs, TabsList, TabsTrigger, TabsContent,
4
+ // variants
5
+ TabsListUnderline, TabsTriggerUnderline, TabsListSidebar, TabsTriggerSidebar } from './tabs.component';
@@ -0,0 +1,15 @@
1
+ import * as TabsPrimitive from '@radix-ui/react-tabs';
2
+ import * as React from 'react';
3
+ type TabsProps = React.ComponentProps<typeof TabsPrimitive.Root>;
4
+ declare function Tabs({ className, ...props }: TabsProps): React.JSX.Element;
5
+ type TabsListProps = React.ComponentProps<typeof TabsPrimitive.List>;
6
+ declare function TabsList({ className, ...props }: TabsListProps): React.JSX.Element;
7
+ type TabsTriggerProps = React.ComponentProps<typeof TabsPrimitive.Trigger>;
8
+ declare function TabsTrigger({ className, ...props }: TabsTriggerProps): React.JSX.Element;
9
+ type TabsContentProps = React.ComponentProps<typeof TabsPrimitive.Content>;
10
+ declare function TabsContent({ className, ...props }: TabsContentProps): React.JSX.Element;
11
+ declare function TabsListUnderline({ className, ...props }: TabsListProps): React.JSX.Element;
12
+ declare function TabsTriggerUnderline({ className, ...props }: TabsTriggerProps): React.JSX.Element;
13
+ declare function TabsListSidebar({ className, ...props }: TabsListProps): React.JSX.Element;
14
+ declare function TabsTriggerSidebar({ className, ...props }: TabsTriggerProps): React.JSX.Element;
15
+ export { Tabs, TabsList, TabsTrigger, TabsContent, TabsListUnderline, TabsTriggerUnderline, TabsListSidebar, TabsTriggerSidebar, };
@@ -0,0 +1,98 @@
1
+ 'use client';
2
+
3
+ import _extends from "@babel/runtime/helpers/extends";
4
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
5
+ var _excluded = ["className"],
6
+ _excluded2 = ["className"],
7
+ _excluded3 = ["className"],
8
+ _excluded4 = ["className"],
9
+ _excluded5 = ["className"],
10
+ _excluded6 = ["className"],
11
+ _excluded7 = ["className"],
12
+ _excluded8 = ["className"];
13
+ import * as TabsPrimitive from '@radix-ui/react-tabs';
14
+ import { focusRingClassNames } from '@scaleflex/ui-tw/styles/shared-classes';
15
+ import { cn } from '@scaleflex/ui-tw/utils/cn';
16
+ import * as React from 'react';
17
+
18
+ /* -------------------------------------------------------------------------- */
19
+ /* Primitives */
20
+ /* -------------------------------------------------------------------------- */
21
+
22
+ function Tabs(_ref) {
23
+ var className = _ref.className,
24
+ props = _objectWithoutProperties(_ref, _excluded);
25
+ return /*#__PURE__*/React.createElement(TabsPrimitive.Root, _extends({
26
+ "data-slot": "tabs",
27
+ className: cn(className)
28
+ }, props));
29
+ }
30
+ function TabsList(_ref2) {
31
+ var className = _ref2.className,
32
+ props = _objectWithoutProperties(_ref2, _excluded2);
33
+ return /*#__PURE__*/React.createElement(TabsPrimitive.List, _extends({
34
+ "data-slot": "tabs-list",
35
+ className: cn(className)
36
+ }, props));
37
+ }
38
+ function TabsTrigger(_ref3) {
39
+ var className = _ref3.className,
40
+ props = _objectWithoutProperties(_ref3, _excluded3);
41
+ return /*#__PURE__*/React.createElement(TabsPrimitive.Trigger, _extends({
42
+ "data-slot": "tabs-trigger",
43
+ className: cn(focusRingClassNames, 'inline-flex cursor-pointer items-center justify-center disabled:pointer-events-none disabled:opacity-50', className)
44
+ }, props));
45
+ }
46
+ function TabsContent(_ref4) {
47
+ var className = _ref4.className,
48
+ props = _objectWithoutProperties(_ref4, _excluded4);
49
+ return /*#__PURE__*/React.createElement(TabsPrimitive.Content, _extends({
50
+ "data-slot": "tabs-content",
51
+ className: cn('flex-1 outline-none', className)
52
+ }, props));
53
+ }
54
+
55
+ /* -------------------------------------------------------------------------- */
56
+ /* Styled variants */
57
+ /* -------------------------------------------------------------------------- */
58
+
59
+ /* ---------------------------- Underline (horizontal) ---------------------------- */
60
+
61
+ function TabsListUnderline(_ref5) {
62
+ var className = _ref5.className,
63
+ props = _objectWithoutProperties(_ref5, _excluded5);
64
+ return /*#__PURE__*/React.createElement(TabsList, _extends({
65
+ className: cn('border-border mb-3 inline-flex w-full items-end justify-start gap-6 border-b bg-transparent p-0', className)
66
+ }, props));
67
+ }
68
+ function TabsTriggerUnderline(_ref6) {
69
+ var className = _ref6.className,
70
+ props = _objectWithoutProperties(_ref6, _excluded6);
71
+ return /*#__PURE__*/React.createElement(TabsTrigger, _extends({
72
+ className: cn('relative rounded-none px-0 pt-3 pb-3 text-base leading-none focus-visible:rounded-md', 'text-foreground transition-colors', 'data-[state=active]:text-primary',
73
+ // underline indicator
74
+ "after:bg-primary after:absolute after:right-0 after:bottom-[-2px] after:left-0 after:h-0.5 after:rounded-full after:content-['']", 'after:opacity-0 data-[state=active]:after:opacity-100', className)
75
+ }, props));
76
+ }
77
+
78
+ /* ------------------------------ Sidebar (vertical) ------------------------------ */
79
+
80
+ function TabsListSidebar(_ref7) {
81
+ var className = _ref7.className,
82
+ props = _objectWithoutProperties(_ref7, _excluded7);
83
+ return /*#__PURE__*/React.createElement(TabsList, _extends({
84
+ className: cn('flex w-72 flex-col items-stretch justify-start gap-1 bg-transparent p-0', className)
85
+ }, props));
86
+ }
87
+ function TabsTriggerSidebar(_ref8) {
88
+ var className = _ref8.className,
89
+ props = _objectWithoutProperties(_ref8, _excluded8);
90
+ return /*#__PURE__*/React.createElement(TabsTrigger, _extends({
91
+ className: cn("text-foreground [&_svg:not([class*='text-'])]:text-muted-foreground inline-flex w-full items-center justify-start gap-1.5 rounded-md px-4 py-3 text-base whitespace-nowrap transition-colors", 'data-[state=active]:bg-accent data-[state=active]:text-primary data-[state=active]:[&_svg:not([class*="text-"])]:text-primary', "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-5.5", className)
92
+ }, props));
93
+ }
94
+ export {
95
+ // primitives
96
+ Tabs, TabsList, TabsTrigger, TabsContent,
97
+ // variants
98
+ TabsListUnderline, TabsTriggerUnderline, TabsListSidebar, TabsTriggerSidebar };