@driveflux/beam 3.0.6 → 3.0.8-next.0

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.
@@ -1,7 +1,7 @@
1
1
  import { type VariantProps } from 'class-variance-authority';
2
2
  import * as React from 'react';
3
3
  declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
4
- variant?: "warning" | "error" | "default" | null | undefined;
4
+ variant?: "error" | "default" | "warning" | null | undefined;
5
5
  } & import("class-variance-authority/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
6
6
  declare const AlertIcon: React.ForwardRefExoticComponent<React.HTMLAttributes<SVGSVGElement> & {
7
7
  variant?: "default" | "error" | "warning";
@@ -1,7 +1,7 @@
1
1
  import type { StoryObj } from '@storybook/react';
2
2
  declare const meta: {
3
3
  component: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & import("class-variance-authority").VariantProps<(props?: ({
4
- variant?: "warning" | "error" | "default" | null | undefined;
4
+ variant?: "error" | "default" | "warning" | null | undefined;
5
5
  } & import("class-variance-authority/types").ClassProp) | undefined) => string> & import("react").RefAttributes<HTMLDivElement>>;
6
6
  };
7
7
  export default meta;
@@ -1,7 +1,7 @@
1
1
  import { type VariantProps } from 'class-variance-authority';
2
2
  import type * as React from 'react';
3
3
  declare const badgeVariants: (props?: ({
4
- colorScheme?: "info" | "warning" | "success" | "error" | "accent" | null | undefined;
4
+ colorScheme?: "error" | "info" | "warning" | "success" | "accent" | null | undefined;
5
5
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
6
  export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
7
7
  }
@@ -2,7 +2,7 @@ import { type VariantProps } from 'class-variance-authority';
2
2
  import * as React from 'react';
3
3
  declare const buttonVariants: (props?: ({
4
4
  variant?: "outline" | "outline-white" | null | undefined;
5
- colorScheme?: "warning" | "success" | "link" | "default" | "accent" | null | undefined;
5
+ colorScheme?: "link" | "default" | "warning" | "success" | "accent" | null | undefined;
6
6
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
7
  export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
8
8
  asChild?: boolean;
@@ -1,10 +1,12 @@
1
1
  import { type VariantProps } from 'class-variance-authority';
2
2
  import * as React from 'react';
3
3
  declare const textButtonVariants: (props?: ({
4
- variant?: "link" | "default" | null | undefined;
4
+ variant?: "default" | "link" | null | undefined;
5
5
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
6
  export interface TextButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof textButtonVariants> {
7
7
  asChild?: boolean;
8
+ isDisabled?: boolean;
9
+ isLoading?: boolean;
8
10
  }
9
11
  declare const TextButton: React.ForwardRefExoticComponent<TextButtonProps & React.RefAttributes<HTMLButtonElement>>;
10
12
  export default TextButton;
@@ -1 +1 @@
1
- {"version":3,"file":"TextButton.d.ts","sourceRoot":"","sources":["../../src/button/TextButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,QAAA,MAAM,kBAAkB;;8EAavB,CAAA;AAED,MAAM,WAAW,eAChB,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACpD,YAAY,CAAC,OAAO,kBAAkB,CAAC;IACxC,OAAO,CAAC,EAAE,OAAO,CAAA;CACjB;AAED,QAAA,MAAM,UAAU,2FAWf,CAAA;AAGD,eAAe,UAAU,CAAA"}
1
+ {"version":3,"file":"TextButton.d.ts","sourceRoot":"","sources":["../../src/button/TextButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,QAAA,MAAM,kBAAkB;;8EAavB,CAAA;AAED,MAAM,WAAW,eAChB,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACpD,YAAY,CAAC,OAAO,kBAAkB,CAAC;IACxC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,QAAA,MAAM,UAAU,2FAyBf,CAAA;AAGD,eAAe,UAAU,CAAA"}
@@ -26,6 +26,30 @@ function _object_spread(target) {
26
26
  }
27
27
  return target;
28
28
  }
29
+ function ownKeys(object, enumerableOnly) {
30
+ var keys = Object.keys(object);
31
+ if (Object.getOwnPropertySymbols) {
32
+ var symbols = Object.getOwnPropertySymbols(object);
33
+ if (enumerableOnly) {
34
+ symbols = symbols.filter(function(sym) {
35
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
36
+ });
37
+ }
38
+ keys.push.apply(keys, symbols);
39
+ }
40
+ return keys;
41
+ }
42
+ function _object_spread_props(target, source) {
43
+ source = source != null ? source : {};
44
+ if (Object.getOwnPropertyDescriptors) {
45
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
46
+ } else {
47
+ ownKeys(Object(source)).forEach(function(key) {
48
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
49
+ });
50
+ }
51
+ return target;
52
+ }
29
53
  function _object_without_properties(source, excluded) {
30
54
  if (source == null) return {};
31
55
  var target = _object_without_properties_loose(source, excluded);
@@ -57,6 +81,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
57
81
  import { Slot } from '@radix-ui/react-slot';
58
82
  import { cva } from 'class-variance-authority';
59
83
  import * as React from 'react';
84
+ import LoadingAnimation from '../animations/LoadingAnimation.js';
60
85
  import { cn } from '../utils.js';
61
86
  var textButtonVariants = cva('inline cursor-pointer disabled:pointer-events-none disabled:opacity-30 text-base leading-[19.6px] bg-transparent border-0 p-0 m-0', {
62
87
  variants: {
@@ -70,19 +95,25 @@ var textButtonVariants = cva('inline cursor-pointer disabled:pointer-events-none
70
95
  }
71
96
  });
72
97
  var TextButton = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
73
- var className = _param.className, variant = _param.variant, _param_asChild = _param.asChild, asChild = _param_asChild === void 0 ? false : _param_asChild, props = _object_without_properties(_param, [
98
+ var className = _param.className, variant = _param.variant, _param_asChild = _param.asChild, asChild = _param_asChild === void 0 ? false : _param_asChild, isDisabled = _param.isDisabled, isLoading = _param.isLoading, children = _param.children, props = _object_without_properties(_param, [
74
99
  "className",
75
100
  "variant",
76
- "asChild"
101
+ "asChild",
102
+ "isDisabled",
103
+ "isLoading",
104
+ "children"
77
105
  ]);
78
106
  var Comp = asChild ? Slot : 'button';
79
- return /*#__PURE__*/ _jsx(Comp, _object_spread({
107
+ return /*#__PURE__*/ _jsx(Comp, _object_spread_props(_object_spread({
80
108
  className: cn(textButtonVariants({
81
109
  variant: variant,
82
110
  className: className
83
111
  })),
84
- ref: ref
85
- }, props));
112
+ ref: ref,
113
+ disabled: isDisabled || isLoading
114
+ }, props), {
115
+ children: isLoading ? /*#__PURE__*/ _jsx(LoadingAnimation, {}) : children
116
+ }));
86
117
  });
87
118
  TextButton.displayName = 'TextButton';
88
119
  export default TextButton;
@@ -27,7 +27,7 @@ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<
27
27
  ref?: React.Ref<HTMLInputElement>;
28
28
  } & {
29
29
  asChild?: boolean;
30
- }, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "value" | "onChange" | "type"> & {
30
+ }, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "value" | "type" | "onChange"> & {
31
31
  value?: string;
32
32
  onValueChange?: (search: string) => void;
33
33
  } & React.RefAttributes<HTMLInputElement>, "ref"> & CommandInputProps & React.RefAttributes<HTMLInputElement>>;
package/dist/text/Text.js CHANGED
@@ -78,7 +78,7 @@ function _object_without_properties_loose(source, excluded) {
78
78
  return target;
79
79
  }
80
80
  import * as React from 'react';
81
- import { cn } from '../utils';
81
+ import { cn } from '../utils.js';
82
82
  var Text = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
83
83
  var _param_as = _param.as, as = _param_as === void 0 ? 'p' : _param_as, className = _param.className, children = _param.children, props = _object_without_properties(_param, [
84
84
  "as",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@driveflux/beam",
3
- "version": "3.0.6",
3
+ "version": "3.0.8-next.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./accordion": {
@@ -232,7 +232,7 @@
232
232
  "sonner": "^2.0.7",
233
233
  "tailwind-merge": "^3.3.1",
234
234
  "tailwindcss-animate": "^1.0.7",
235
- "@driveflux/time": "6.0.0",
235
+ "@driveflux/time": "6.0.1-next.0",
236
236
  "vaul": "^1.1.2",
237
237
  "vite": "^7.1.11"
238
238
  },