@validationcloud/fractal-ui 1.39.1 → 1.41.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.
Files changed (73) hide show
  1. package/dist/assets/animated-loader.svg.js +4 -0
  2. package/dist/components/animated-loader/animated-loader.js +20 -0
  3. package/dist/components/badge/badge.js +31 -0
  4. package/dist/components/box/box.js +69 -0
  5. package/dist/components/button/button.js +137 -0
  6. package/dist/components/client-modal/client-modal.js +33 -0
  7. package/dist/components/decorated-icon/decorated-icon.js +30 -0
  8. package/dist/components/dropdown-menu/dropdown-menu.js +63 -0
  9. package/dist/components/icon/icon.js +8 -0
  10. package/dist/components/input-button/input-button.js +41 -0
  11. package/dist/components/mount-svg-sprite/mount-svg-sprite.js +18 -0
  12. package/dist/components/page-padding/page-padding.js +25 -0
  13. package/dist/components/protocol-logo/protocol-logo.js +89 -0
  14. package/dist/components/scroll-area/index.js +5 -0
  15. package/dist/components/scroll-area/scroll-area.js +63 -0
  16. package/dist/components/skeleton/skeleton.js +12 -0
  17. package/dist/components/text-input/text-input.js +57 -0
  18. package/dist/components/tooltip/tooltip.js +66 -0
  19. package/dist/components/tooltip-provider/tooltip-provider.js +14 -0
  20. package/dist/index.d.ts +2 -17
  21. package/dist/index.js +37 -765
  22. package/dist/internal/modal-header.js +18 -0
  23. package/dist/internal/modal.js +35 -0
  24. package/dist/internal/react-portal.js +17 -0
  25. package/dist/internal/round-button.js +32 -0
  26. package/dist/{tailwind-merge-DQj6rVv5.js → lib/tailwind-merge.js} +1 -1
  27. package/dist/src/components/scroll-area/index.d.ts +8 -0
  28. package/dist/{components → src/components}/scroll-area/scroll-area.d.ts +0 -7
  29. package/dist/src/index.d.ts +18 -0
  30. package/dist/utils/disable-password-managers.js +10 -0
  31. package/package.json +18 -19
  32. package/dist/components/animated-loader/animated-loader.stories.d.ts +0 -8
  33. package/dist/components/badge/badge.stories.d.ts +0 -17
  34. package/dist/components/box/box.stories.d.ts +0 -19
  35. package/dist/components/button/button.stories.d.ts +0 -28
  36. package/dist/components/client-modal/client-modal.stories.d.ts +0 -8
  37. package/dist/components/decorated-icon/decorated-icon.stories.d.ts +0 -18
  38. package/dist/components/dropdown-menu/dropdown-menu.stories.d.ts +0 -10
  39. package/dist/components/icon/icon-showcase.stories.d.ts +0 -13
  40. package/dist/components/icon/icon.stories.d.ts +0 -8
  41. package/dist/components/input-button/input-button.stories.d.ts +0 -11
  42. package/dist/components/page-padding/page-padding.stories.d.ts +0 -10
  43. package/dist/components/protocol-logo/protocol-logo.stories.d.ts +0 -503
  44. package/dist/components/scroll-area/scroll-area.stories.d.ts +0 -12
  45. package/dist/components/skeleton/skeleton.stories.d.ts +0 -13
  46. package/dist/components/text-input/text-input.stories.d.ts +0 -26
  47. package/dist/components/tooltip/tooltip.stories.d.ts +0 -325
  48. package/dist/utils.d.ts +0 -1
  49. package/dist/utils.js +0 -4
  50. /package/dist/{components → src/components}/animated-loader/animated-loader.d.ts +0 -0
  51. /package/dist/{components → src/components}/badge/badge.d.ts +0 -0
  52. /package/dist/{components → src/components}/box/box.d.ts +0 -0
  53. /package/dist/{components → src/components}/button/button.d.ts +0 -0
  54. /package/dist/{components → src/components}/client-modal/client-modal.d.ts +0 -0
  55. /package/dist/{components → src/components}/decorated-icon/decorated-icon.d.ts +0 -0
  56. /package/dist/{components → src/components}/dropdown-menu/dropdown-menu.d.ts +0 -0
  57. /package/dist/{components → src/components}/icon/icon-ids.d.ts +0 -0
  58. /package/dist/{components → src/components}/icon/icon.d.ts +0 -0
  59. /package/dist/{components → src/components}/input-button/input-button.d.ts +0 -0
  60. /package/dist/{components → src/components}/mount-svg-sprite/mount-svg-sprite.d.ts +0 -0
  61. /package/dist/{components → src/components}/page-padding/page-padding.d.ts +0 -0
  62. /package/dist/{components → src/components}/protocol-logo/protocol-logo-ids.d.ts +0 -0
  63. /package/dist/{components → src/components}/protocol-logo/protocol-logo.d.ts +0 -0
  64. /package/dist/{components → src/components}/skeleton/skeleton.d.ts +0 -0
  65. /package/dist/{components → src/components}/text-input/text-input.d.ts +0 -0
  66. /package/dist/{components → src/components}/tooltip/tooltip.d.ts +0 -0
  67. /package/dist/{components → src/components}/tooltip-provider/tooltip-provider.d.ts +0 -0
  68. /package/dist/{internal → src/internal}/modal-header.d.ts +0 -0
  69. /package/dist/{internal → src/internal}/modal.d.ts +0 -0
  70. /package/dist/{internal → src/internal}/react-portal.d.ts +0 -0
  71. /package/dist/{internal → src/internal}/round-button.d.ts +0 -0
  72. /package/dist/{lib → src/lib}/tailwind-merge.d.ts +0 -0
  73. /package/dist/{utils → src/utils}/disable-password-managers.d.ts +0 -0
@@ -0,0 +1,18 @@
1
+ import { jsxs as l, jsx as o } from "react/jsx-runtime";
2
+ import { RoundButton as s } from "./round-button.js";
3
+ import "react";
4
+ import { Icon as c } from "../components/icon/icon.js";
5
+ import { twMerge as f } from "../lib/tailwind-merge.js";
6
+ function u({ title: e, description: r, onClose: t, disabled: a, className: m, ...n }) {
7
+ return /* @__PURE__ */ l("div", { className: f("gap-r4 flex flex-row items-center justify-between", m), ...n, children: [
8
+ /* @__PURE__ */ l("div", { className: "flex flex-col gap-2", children: [
9
+ e && (typeof e == "string" ? /* @__PURE__ */ o("h3", { className: "tg-title-and-quote-bold", children: e }) : e),
10
+ r && (typeof r == "string" ? /* @__PURE__ */ o("p", { className: "tg-body text-neutral-40", children: r }) : r)
11
+ ] }),
12
+ " ",
13
+ t && /* @__PURE__ */ o(s, { disabled: a, onClick: t, children: /* @__PURE__ */ o(c, { icon: "close", className: "size-3" }) })
14
+ ] });
15
+ }
16
+ export {
17
+ u as ModalHeader
18
+ };
@@ -0,0 +1,35 @@
1
+ import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
+ import "react";
3
+ import { Box as o } from "../components/box/box.js";
4
+ import { twMerge as r } from "../lib/tailwind-merge.js";
5
+ function p({ isExiting: a, className: i, children: l, ...t }) {
6
+ return /* @__PURE__ */ d("div", { className: "relative z-50", children: [
7
+ /* @__PURE__ */ e(
8
+ "div",
9
+ {
10
+ className: r(
11
+ "animate-modal-backdrop-enter bg-neutral-60/85 fixed inset-0",
12
+ a && "animate-modal-backdrop-exit"
13
+ ),
14
+ "aria-hidden": "true"
15
+ }
16
+ ),
17
+ /* @__PURE__ */ e("div", { className: "fixed inset-0 overflow-y-scroll", children: /* @__PURE__ */ e("div", { className: "xs:p-4 flex min-h-full items-center justify-center p-1", children: /* @__PURE__ */ e(
18
+ o,
19
+ {
20
+ borderRadius: "rounded-xl",
21
+ padding: "p-r6",
22
+ className: r(
23
+ "animate-modal-panel-enter gap-r6 shadow-modal mx-auto flex flex-col items-stretch",
24
+ a && "animate-modal-panel-exit",
25
+ i
26
+ ),
27
+ ...t,
28
+ children: l
29
+ }
30
+ ) }) })
31
+ ] });
32
+ }
33
+ export {
34
+ p as Modal
35
+ };
@@ -0,0 +1,17 @@
1
+ "use client";
2
+ import { useState as u, useEffect as f } from "react";
3
+ import { createPortal as l } from "react-dom";
4
+ function i({ children: n, wrapperId: t }) {
5
+ const [o, r] = u(!1);
6
+ if (f(() => {
7
+ r(!0);
8
+ }, []), !o)
9
+ return null;
10
+ const e = document.getElementById(t);
11
+ if (!e)
12
+ throw new Error(`Element with id '${t}' not found`);
13
+ return l(n, e);
14
+ }
15
+ export {
16
+ i as ReactPortal
17
+ };
@@ -0,0 +1,32 @@
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { Slot as s } from "radix-ui";
3
+ import { forwardRef as u } from "react";
4
+ import { twMerge as l } from "../lib/tailwind-merge.js";
5
+ const a = u(
6
+ ({ asChild: e, className: r, ...t }, n) => {
7
+ const o = e ? s.Root : "button";
8
+ return /* @__PURE__ */ i(
9
+ o,
10
+ {
11
+ ref: n,
12
+ className: l(
13
+ "bg-neutral-60 text-neutral-30 ring-1.5 ring-neutral-60 flex flex-none cursor-pointer items-center justify-center rounded-full text-nowrap transition ease-in-out ring-inset",
14
+ // size:
15
+ "xs:size-9 size-8 p-2",
16
+ // focus:
17
+ "focus-visible:ring-neutral-10 focus:border-none focus:outline-none focus-visible:ring-2",
18
+ // hover:
19
+ "hover:bg-neutral-60 hover:text-neutral-10 hover:ring-1.5 hover:ring-neutral-40",
20
+ // disabled state:
21
+ "disabled:bg-neutral-70 disabled:text-neutral-40 disabled:ring-neutral-60 disabled:pointer-events-none disabled:cursor-default",
22
+ r
23
+ ),
24
+ ...t
25
+ }
26
+ );
27
+ }
28
+ );
29
+ a.displayName = "RoundButton";
30
+ export {
31
+ a as RoundButton
32
+ };
@@ -35,5 +35,5 @@ const e = t({
35
35
  }
36
36
  });
37
37
  export {
38
- e as t
38
+ e as twMerge
39
39
  };
@@ -0,0 +1,8 @@
1
+ import { Root, Viewport, Scrollbar, Thumb, Corner } from './scroll-area';
2
+ export declare const ScrollArea: {
3
+ Root: typeof Root;
4
+ Viewport: typeof Viewport;
5
+ Scrollbar: typeof Scrollbar;
6
+ Thumb: typeof Thumb;
7
+ Corner: typeof Corner;
8
+ };
@@ -10,11 +10,4 @@ type ScrollAreaThumbProps = {} & React.ComponentPropsWithoutRef<typeof RadixScro
10
10
  export declare function Thumb({ className, ...props }: ScrollAreaThumbProps): import("react/jsx-runtime").JSX.Element;
11
11
  type ScrollAreaCornerProps = {} & React.ComponentPropsWithoutRef<typeof RadixScrollArea.Corner>;
12
12
  export declare function Corner({ className, ...props }: ScrollAreaCornerProps): import("react/jsx-runtime").JSX.Element;
13
- export declare const ScrollArea: {
14
- Root: typeof Root;
15
- Viewport: typeof Viewport;
16
- Scrollbar: typeof Scrollbar;
17
- Thumb: typeof Thumb;
18
- Corner: typeof Corner;
19
- };
20
13
  export {};
@@ -0,0 +1,18 @@
1
+ export { AnimatedLoader } from './components/animated-loader/animated-loader';
2
+ export { Badge } from './components/badge/badge';
3
+ export { Box } from './components/box/box';
4
+ export { Button } from './components/button/button';
5
+ export { ClientModal } from './components/client-modal/client-modal';
6
+ export { DecoratedIcon } from './components/decorated-icon/decorated-icon';
7
+ export { DropdownMenu, DropdownMenuItem } from './components/dropdown-menu/dropdown-menu';
8
+ export { ScrollArea } from './components/scroll-area';
9
+ export { Icon, type IconID } from './components/icon/icon';
10
+ export { InputButton } from './components/input-button/input-button';
11
+ export { MountSvgSprite } from './components/mount-svg-sprite/mount-svg-sprite';
12
+ export { PagePadding } from './components/page-padding/page-padding';
13
+ export { ProtocolLogo } from './components/protocol-logo/protocol-logo';
14
+ export { Skeleton } from './components/skeleton/skeleton';
15
+ export { TextInput } from './components/text-input/text-input';
16
+ export { Tooltip } from './components/tooltip/tooltip';
17
+ export { TooltipProvider } from './components/tooltip-provider/tooltip-provider';
18
+ export { twMerge } from './lib/tailwind-merge';
@@ -0,0 +1,10 @@
1
+ const t = {
2
+ "data-lpignore": !0,
3
+ "data-1p-ignore": !0,
4
+ "data-form-type": "other",
5
+ "data-bwignore": !0,
6
+ autoComplete: "off"
7
+ };
8
+ export {
9
+ t as DISABLE_PASSWORD_MANAGERS_ATTRIBUTES
10
+ };
package/package.json CHANGED
@@ -1,33 +1,29 @@
1
1
  {
2
2
  "name": "@validationcloud/fractal-ui",
3
3
  "private": false,
4
- "version": "1.39.1",
5
- "module": "./dist/fractal-ui.js",
4
+ "version": "1.41.0",
5
+ "module": "./dist/index.js",
6
6
  "type": "module",
7
7
  "files": [
8
- "dist",
9
- "README.md"
8
+ "dist"
10
9
  ],
11
10
  "license": "MIT",
12
11
  "scripts": {
13
- "dev": "vite",
14
- "build": "tsc && vite build",
12
+ "build": "vite build",
15
13
  "lint": "eslint",
16
- "preview": "vite preview",
17
14
  "storybook": "storybook dev -p 6006",
18
15
  "build-storybook": "storybook build",
19
16
  "format": "prettier --write .",
20
- "typecheck": "tsc --noEmit"
17
+ "format:check": "prettier --check .",
18
+ "typecheck": "tsc -b --noEmit"
21
19
  },
22
20
  "exports": {
23
21
  ".": {
24
22
  "import": "./dist/index.js"
25
23
  },
26
- "./utils": {
27
- "import": "./dist/utils.js"
28
- },
29
24
  "./tailwind.css": "./dist/styles/tailwind.css"
30
25
  },
26
+ "types": "./dist/index.d.ts",
31
27
  "release": {
32
28
  "branches": [
33
29
  "main"
@@ -44,7 +40,8 @@
44
40
  "tailwind-merge": "^3"
45
41
  },
46
42
  "devDependencies": {
47
- "@eslint/js": "^9.36.0",
43
+ "@eslint/compat": "^1.4.0",
44
+ "@eslint/js": "^9.37.0",
48
45
  "@storybook/addon-docs": "^9",
49
46
  "@storybook/addon-onboarding": "^9",
50
47
  "@storybook/react-vite": "^9",
@@ -53,22 +50,24 @@
53
50
  "@types/node": "^24",
54
51
  "@types/react": "^19",
55
52
  "@types/react-dom": "^19",
56
- "@vitejs/plugin-react": "^5.0.3",
57
- "eslint": "^9.36.0",
58
- "eslint-plugin-react-hooks": "^5.2.0",
59
- "eslint-plugin-react-refresh": "^0.4.21",
53
+ "@vitejs/plugin-react": "^5.0.4",
54
+ "eslint": "^9.37.0",
55
+ "eslint-config-prettier": "^10.1.8",
56
+ "eslint-plugin-react-hooks": "^7.0.0",
57
+ "eslint-plugin-react-refresh": "^0.4.23",
60
58
  "eslint-plugin-storybook": "^9",
61
59
  "globals": "^16.4.0",
62
60
  "postcss": "^8.5.6",
61
+ "prettier": "3.6.2",
63
62
  "prettier-plugin-tailwindcss": "^0.6.14",
64
63
  "rollup-plugin-analyzer": "^4.0.0",
65
64
  "rollup-plugin-copy": "^3.5.0",
66
65
  "rollup-preserve-directives": "^1.1.3",
67
66
  "storybook": "^9",
68
- "tailwindcss": "^4.1.13",
67
+ "tailwindcss": "^4.1.14",
69
68
  "typescript": "^5",
70
- "typescript-eslint": "^8.44.1",
71
- "vite": "^7.1.7",
69
+ "typescript-eslint": "^8.46.0",
70
+ "vite": "^7.1.9",
72
71
  "vite-plugin-dts": "^4.5.4"
73
72
  },
74
73
  "peerDependencies": {
@@ -1,8 +0,0 @@
1
- import { StoryObj } from '@storybook/react-vite';
2
- import { AnimatedLoader } from './animated-loader';
3
- declare const meta: {
4
- component: typeof AnimatedLoader;
5
- };
6
- export default meta;
7
- type Story = StoryObj<typeof meta>;
8
- export declare const Example: Story;
@@ -1,17 +0,0 @@
1
- import { StoryObj } from '@storybook/react-vite';
2
- declare const meta: {
3
- component: import('react').ForwardRefExoticComponent<{
4
- color?: "number" | "success" | "primary" | "successInverted";
5
- size?: "caption" | "tag" | "bodyBold";
6
- } & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
7
- asChild?: boolean;
8
- } & import('react').RefAttributes<HTMLDivElement>>;
9
- };
10
- export default meta;
11
- type Story = StoryObj<typeof meta>;
12
- export declare const DefaultExample: Story;
13
- export declare const Preview: Story;
14
- export declare const NumberTag: Story;
15
- export declare const ValueTag: Story;
16
- export declare const AsLink: Story;
17
- export declare const AsButton: Story;
@@ -1,19 +0,0 @@
1
- import { StoryObj } from '@storybook/react-vite';
2
- declare const meta: {
3
- component: import('react').ForwardRefExoticComponent<{
4
- header?: React.ReactNode;
5
- borderRadius?: "rounded-xl" | "rounded-lg";
6
- padding?: "p-r6" | "p-r4" | "p-0";
7
- background?: "bg-neutral-60" | "bg-neutral-70" | "bg-neutral-80" | "bg-gradient-box" | "transparent";
8
- borderColor?: "border-secondary-40";
9
- } & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
10
- asChild?: boolean;
11
- } & import('react').RefAttributes<HTMLDivElement>>;
12
- };
13
- export default meta;
14
- type Story = StoryObj<typeof meta>;
15
- export declare const EmptyBox: Story;
16
- export declare const BoxWithHeader: Story;
17
- export declare const BoxWithoutHeader: Story;
18
- export declare const GradientBox: Story;
19
- export declare const RenderedAsDifferentElement: Story;
@@ -1,28 +0,0 @@
1
- import { StoryObj } from '@storybook/react-vite';
2
- declare const meta: {
3
- component: import('react').ForwardRefExoticComponent<{
4
- className?: string;
5
- variant?: "primary" | "warning" | "info" | "gradient" | "secondary" | "ghost" | "text" | "light" | "redText";
6
- size?: "xlarge" | "large" | "medium" | "small" | "xsmall";
7
- } & Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
8
- asChild?: boolean;
9
- } & import('react').RefAttributes<HTMLButtonElement>>;
10
- args: {
11
- disabled: false;
12
- };
13
- };
14
- export default meta;
15
- type Story = StoryObj<typeof meta>;
16
- export declare const Primary: Story;
17
- export declare const Secondary: Story;
18
- export declare const Light: Story;
19
- export declare const Gradient: Story;
20
- export declare const Warning: Story;
21
- export declare const Info: Story;
22
- export declare const RedText: Story;
23
- export declare const Ghost: Story;
24
- export declare const GhostButtonInTextLayout: Story;
25
- export declare const AllSizes: Story;
26
- export declare const AllVariants: Story;
27
- export declare const ButtonLink: Story;
28
- export declare const LoadingState: Story;
@@ -1,8 +0,0 @@
1
- import { StoryObj } from '@storybook/react';
2
- import { ClientModal } from './client-modal';
3
- declare const meta: {
4
- component: typeof ClientModal;
5
- };
6
- export default meta;
7
- type Story = StoryObj<typeof meta>;
8
- export declare const Default: Story;
@@ -1,18 +0,0 @@
1
- import { StoryObj } from '@storybook/react-vite';
2
- import { DecoratedIcon } from './decorated-icon';
3
- declare const meta: {
4
- component: typeof DecoratedIcon;
5
- argTypes: {
6
- symbolScale: {
7
- control: {
8
- type: "range";
9
- min: number;
10
- max: number;
11
- step: number;
12
- };
13
- };
14
- };
15
- };
16
- export default meta;
17
- type Story = StoryObj<typeof meta>;
18
- export declare const ExampleDecoratedIcon: Story;
@@ -1,10 +0,0 @@
1
- import { StoryObj } from '@storybook/react';
2
- import { DropdownMenu } from './dropdown-menu';
3
- declare const meta: {
4
- component: typeof DropdownMenu;
5
- argTypes: {};
6
- };
7
- export default meta;
8
- type Story = StoryObj<typeof meta>;
9
- export declare const Example: Story;
10
- export declare const LongItemLabels: Story;
@@ -1,13 +0,0 @@
1
- import { StoryObj } from '@storybook/react-vite';
2
- type IconShowcaseProps = {
3
- backgroundColor: string;
4
- roundBackground: boolean;
5
- className: string;
6
- };
7
- declare function IconShowcase({ backgroundColor, roundBackground, className }: IconShowcaseProps): import("react/jsx-runtime").JSX.Element;
8
- declare const meta: {
9
- component: typeof IconShowcase;
10
- };
11
- export default meta;
12
- type Story = StoryObj<typeof meta>;
13
- export declare const IconShowcaseStory: Story;
@@ -1,8 +0,0 @@
1
- import { StoryObj } from '@storybook/react-vite';
2
- import { Icon } from './icon';
3
- declare const meta: {
4
- component: typeof Icon;
5
- };
6
- export default meta;
7
- type Story = StoryObj<typeof meta>;
8
- export declare const ExampleIcon: Story;
@@ -1,11 +0,0 @@
1
- import { StoryObj } from '@storybook/react-vite';
2
- import { InputButton } from './input-button';
3
- declare const meta: {
4
- component: typeof InputButton;
5
- };
6
- export default meta;
7
- type Story = StoryObj<typeof meta>;
8
- export declare const DefaultEnter: Story;
9
- export declare const DefaultClear: Story;
10
- export declare const Disabled: Story;
11
- export declare const CTA: Story;
@@ -1,10 +0,0 @@
1
- import { StoryObj } from '@storybook/react-vite';
2
- declare const meta: {
3
- component: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
4
- asChild?: boolean;
5
- } & import('react').RefAttributes<HTMLDivElement>>;
6
- };
7
- export default meta;
8
- type Story = StoryObj<typeof meta>;
9
- export declare const Example: Story;
10
- export declare const LayoutExample: Story;