@reactberry/system 2.0.0-beta → 2.0.0-beta.1
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.
- package/README.md +1 -1
- package/package.json +2 -1
- package/src/blocks/Accordion/index.tsx +3 -3
- package/src/blocks/AnimatedCarousel/index.tsx +2 -2
- package/src/blocks/AppleGlow/index.tsx +2 -2
- package/src/blocks/Avatar/index.tsx +3 -3
- package/src/blocks/Await/index.tsx +1 -1
- package/src/blocks/Cards/AnimatedCard/index.tsx +2 -2
- package/src/blocks/Cards/FluorescentCard/index.tsx +3 -3
- package/src/blocks/Cards/InfoCard/index.tsx +1 -1
- package/src/blocks/Cards/TickerCard/index.tsx +1 -1
- package/src/blocks/Carousel/index.tsx +1 -1
- package/src/blocks/Checkbox/index.tsx +3 -3
- package/src/blocks/Collection/index.tsx +1 -1
- package/src/blocks/Container/index.tsx +1 -1
- package/src/blocks/Controls/Control.tsx +4 -4
- package/src/blocks/CyclingNumber/index.tsx +1 -1
- package/src/blocks/DisplaySet/index.tsx +1 -1
- package/src/blocks/Divider/index.tsx +1 -1
- package/src/blocks/Draggable/index.tsx +4 -4
- package/src/blocks/Drawer/index.tsx +5 -5
- package/src/blocks/DynamicIsland/DynamicIsland.tsx +1 -1
- package/src/blocks/Fader/index.tsx +1 -1
- package/src/blocks/FamilyDrawer/README.md +3 -3
- package/src/blocks/FamilyDrawer/example.tsx +2 -2
- package/src/blocks/FamilyDrawer/index.tsx +3 -3
- package/src/blocks/FamilyDrawer/views/DefaultView.tsx +2 -2
- package/src/blocks/FamilyDrawer/views/KeyView.tsx +2 -2
- package/src/blocks/FamilyDrawer/views/PhraseView.tsx +2 -2
- package/src/blocks/FamilyDrawer/views/RemoveView.tsx +2 -2
- package/src/blocks/FieldSet/index.tsx +2 -2
- package/src/blocks/Filesystem/index.tsx +2 -2
- package/src/blocks/Gallery/Carousel/index.tsx +3 -3
- package/src/blocks/Gallery/Modal/index.tsx +1 -1
- package/src/blocks/Gallery/index.tsx +2 -2
- package/src/blocks/GradientMesh/index.tsx +2 -2
- package/src/blocks/Group/index.tsx +1 -1
- package/src/blocks/Heading/index.tsx +1 -1
- package/src/blocks/HorizontalScroller/index.tsx +1 -1
- package/src/blocks/Icon/index.tsx +2 -2
- package/src/blocks/Indicator/index.tsx +1 -1
- package/src/blocks/InlineEditor/index.tsx +3 -3
- package/src/blocks/List/index.tsx +1 -1
- package/src/blocks/Main/index.tsx +1 -1
- package/src/blocks/Marquee/index.tsx +1 -1
- package/src/blocks/MaskedField/index.tsx +1 -1
- package/src/blocks/Menu/MenuContent.tsx +1 -1
- package/src/blocks/Menu/MenuItem.tsx +1 -1
- package/src/blocks/Menu/index.tsx +1 -1
- package/src/blocks/Modal/index.tsx +5 -5
- package/src/blocks/MorphingPopover/index.tsx +2 -2
- package/src/blocks/Overlay/Backdrop.tsx +1 -1
- package/src/blocks/Overlay/OverscrollGuard.tsx +1 -1
- package/src/blocks/Parallax/index.tsx +1 -1
- package/src/blocks/ParallaxSection/index.tsx +1 -1
- package/src/blocks/Placeholder/index.tsx +1 -1
- package/src/blocks/Popover/index.tsx +1 -1
- package/src/blocks/Progress/index.tsx +1 -1
- package/src/blocks/ProgressiveBlur/index.tsx +1 -1
- package/src/blocks/ScrollContainer/index.tsx +1 -1
- package/src/blocks/ShinyText/index.tsx +1 -1
- package/src/blocks/Skeleton/index.tsx +3 -3
- package/src/blocks/Slider/SliderControls.tsx +2 -2
- package/src/blocks/Slider/index.tsx +1 -1
- package/src/blocks/Slideshow/index.tsx +2 -2
- package/src/blocks/Spotlight/index.tsx +1 -1
- package/src/blocks/Steps/StepIndicator.tsx +3 -3
- package/src/blocks/Steps/StepProgress.tsx +1 -1
- package/src/blocks/Steps/Steps.tsx +1 -1
- package/src/blocks/Steps/StepsTracker.tsx +1 -1
- package/src/blocks/StickySectionStack/index.tsx +2 -2
- package/src/blocks/Switch/index.tsx +1 -1
- package/src/blocks/SystemNotice/index.tsx +3 -3
- package/src/blocks/Table/README.md +1 -1
- package/src/blocks/Tag/index.tsx +1 -1
- package/src/blocks/TextBreak/index.tsx +2 -2
- package/src/blocks/TextReveal/index.tsx +2 -2
- package/src/blocks/Thumbnail/index.tsx +1 -1
- package/src/blocks/Ticker/index.tsx +1 -1
- package/src/blocks/Toast/index.tsx +5 -5
- package/src/blocks/Tooltip/index.tsx +1 -1
- package/src/blocks/Underlay/index.tsx +1 -1
- package/src/blocks/Upload/UploadBtn.tsx +2 -2
- package/src/blocks/VideoMarquee/index.tsx +1 -1
- package/src/blocks/index.ts +1 -0
- package/src/blocks/pagination/Pagination.tsx +1 -1
- package/src/blocks/pagination/PaginationList.tsx +1 -1
- package/src/docs/README.md +5 -6
- package/src/hooks/useOverlay.ts +2 -2
- package/src/providers/DesignSystemProvider.tsx +3 -3
- package/src/themes/default/assets/badge-avatar.tsx +1 -1
- package/src/themes/default/assets/logo.tsx +1 -1
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ Install `@reactberry/system` together with its peer dependencies in your consumi
|
|
|
16
16
|
npm install @reactberry/system@beta styled-components next react react-dom
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
If you want the exact current prerelease, install `@reactberry/system@2.0.0-beta` instead.
|
|
19
|
+
If you want the exact current prerelease, install `@reactberry/system@2.0.0-beta.1` instead.
|
|
20
20
|
|
|
21
21
|
- `next`
|
|
22
22
|
- `react`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reactberry/system",
|
|
3
|
-
"version": "2.0.0-beta",
|
|
3
|
+
"version": "2.0.0-beta.1",
|
|
4
4
|
"description": "Reusable Next.js UI library package for Reactberry projects.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -62,6 +62,7 @@
|
|
|
62
62
|
"./elements": "./src/elements/index.ts",
|
|
63
63
|
"./icons": "./src/icons/index.tsx",
|
|
64
64
|
"./charts": "./src/charts/index.ts",
|
|
65
|
+
"./types": "./src/types.ts",
|
|
65
66
|
"./package.json": "./package.json"
|
|
66
67
|
},
|
|
67
68
|
"keywords": [
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { Box } from "
|
|
2
|
+
import { Box } from "../../elements";
|
|
3
3
|
import { AnimatePresence, motion } from "motion/react";
|
|
4
4
|
import React, { useState } from "react";
|
|
5
|
-
import { useLocalStorage } from "
|
|
5
|
+
import { useLocalStorage } from "../../hooks/use-local-storage";
|
|
6
6
|
|
|
7
|
-
import { IconArrowSmDown } from "
|
|
7
|
+
import { IconArrowSmDown } from "../../icons";
|
|
8
8
|
import Group from "../Group";
|
|
9
9
|
|
|
10
10
|
interface AccordionItem {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// carousel.tsx
|
|
2
2
|
"use client";
|
|
3
3
|
|
|
4
|
-
import { Box } from "
|
|
4
|
+
import { Box } from "../../elements";
|
|
5
5
|
import {
|
|
6
6
|
AnimatePresence,
|
|
7
7
|
MotionConfig,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
useSpring,
|
|
11
11
|
} from "motion/react";
|
|
12
12
|
import { useEffect, useState } from "react";
|
|
13
|
-
import type { ImageType } from "
|
|
13
|
+
import type { ImageType } from "../../types";
|
|
14
14
|
import { ControlLeft, ControlRight } from "../Controls/Control";
|
|
15
15
|
|
|
16
16
|
const COLLAPSED_ASPECT_RATIO = 0.5;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import { useEffect, useRef, useCallback } from "react"
|
|
4
4
|
import { motion, AnimatePresence } from "motion/react"
|
|
5
|
-
import Box, { BoxProps } from "
|
|
6
|
-
import { useReducedMotion } from "
|
|
5
|
+
import Box, { BoxProps } from "../../elements/box"
|
|
6
|
+
import { useReducedMotion } from "../../hooks/useReducedMotion"
|
|
7
7
|
|
|
8
8
|
// Default Apple Intelligence colors
|
|
9
9
|
const DEFAULT_COLORS = [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import Box, { BoxProps } from "
|
|
3
|
-
import Text from "
|
|
4
|
-
import { pickColor } from "
|
|
2
|
+
import Box, { BoxProps } from "../../elements/box";
|
|
3
|
+
import Text from "../../elements/text";
|
|
4
|
+
import { pickColor } from "../../utils/pickColor";
|
|
5
5
|
import Image from "next/image";
|
|
6
6
|
|
|
7
7
|
interface AvatarProps extends BoxProps {
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
useMotionValue,
|
|
8
8
|
useSpring,
|
|
9
9
|
} from "motion/react";
|
|
10
|
-
import Box, { BoxProps } from "
|
|
11
|
-
import { useReducedMotion } from "
|
|
10
|
+
import Box, { BoxProps } from "../../../elements/box";
|
|
11
|
+
import { useReducedMotion } from "../../../hooks/useReducedMotion";
|
|
12
12
|
|
|
13
13
|
interface AnimatedCardProps extends Omit<BoxProps, "ref" | "children"> {
|
|
14
14
|
children: React.ReactNode;
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
useMotionValue,
|
|
8
8
|
useSpring,
|
|
9
9
|
} from "motion/react";
|
|
10
|
-
import Box, { BoxProps } from "
|
|
10
|
+
import Box, { BoxProps } from "../../../elements/box";
|
|
11
11
|
import styled from "styled-components";
|
|
12
|
-
import { useReducedMotion } from "
|
|
13
|
-
import { useTouchDevice } from "
|
|
12
|
+
import { useReducedMotion } from "../../../hooks/useReducedMotion";
|
|
13
|
+
import { useTouchDevice } from "../../../hooks/useTouchDevice";
|
|
14
14
|
|
|
15
15
|
interface FluorescentCardProps extends Omit<BoxProps, "ref" | "children"> {
|
|
16
16
|
children: React.ReactNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { Box, Button, Text } from "
|
|
3
|
+
import { Box, Button, Text } from "../../../elements";
|
|
4
4
|
import { AnimatePresence, HTMLMotionProps, motion } from "motion/react";
|
|
5
5
|
import Image from "next/image";
|
|
6
6
|
import { useState } from "react";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { AnimatePresence, motion } from "motion/react";
|
|
4
|
-
import { Box, Text } from "
|
|
4
|
+
import { Box, Text } from "../../../elements";
|
|
5
5
|
import Image from "next/image";
|
|
6
6
|
|
|
7
7
|
interface TickerCardProps {
|
|
@@ -4,7 +4,7 @@ import React, { useRef, useState } from "react";
|
|
|
4
4
|
import styled from "styled-components";
|
|
5
5
|
import { AnimatePresence, useScroll, useMotionValueEvent } from "motion/react";
|
|
6
6
|
import { animate } from "motion";
|
|
7
|
-
import { Box } from "
|
|
7
|
+
import { Box } from "../../elements";
|
|
8
8
|
import { ControlLeft, ControlRight } from "../Controls/Control";
|
|
9
9
|
import Group from "../Group";
|
|
10
10
|
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import React from "react"
|
|
4
4
|
import { motion } from "motion/react"
|
|
5
|
-
import { Box } from "
|
|
6
|
-
import Group from "
|
|
7
|
-
import { IconDotsAnim } from "
|
|
5
|
+
import { Box } from "../../elements"
|
|
6
|
+
import Group from "../Group"
|
|
7
|
+
import { IconDotsAnim } from "../../icons"
|
|
8
8
|
|
|
9
9
|
export interface CheckboxProps {
|
|
10
10
|
/** Whether the checkbox is checked */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { motion } from "motion/react";
|
|
2
2
|
|
|
3
|
-
import Box, { BoxProps } from "
|
|
4
|
-
import { IconArrowLeft, IconArrowRight } from "
|
|
5
|
-
// import { IconDownloadData } from "
|
|
6
|
-
// import { IconLaunch } from "
|
|
3
|
+
import Box, { BoxProps } from "../../elements/box";
|
|
4
|
+
import { IconArrowLeft, IconArrowRight } from "../../icons";
|
|
5
|
+
// import { IconDownloadData } from "../../icons";
|
|
6
|
+
// import { IconLaunch } from "../../icons";
|
|
7
7
|
|
|
8
8
|
interface ControlProps extends BoxProps {
|
|
9
9
|
children: React.ReactNode;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { motion, MotionConfig, useInView } from "motion/react";
|
|
3
3
|
import NumberFlow, { useCanAnimate, Format } from "@number-flow/react";
|
|
4
|
-
import { Text } from "
|
|
4
|
+
import { Text } from "../../elements";
|
|
5
5
|
import { useEffect, useState, useRef } from "react";
|
|
6
6
|
|
|
7
7
|
const MotionNumberFlow = motion.create(NumberFlow);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import React, { useRef, useEffect, useState } from "react";
|
|
3
3
|
import { motion, useDragControls } from "motion/react";
|
|
4
|
-
import { Box, Button, Text } from "
|
|
5
|
-
import { IconMove3 } from "
|
|
6
|
-
// import { IconCInfo } from "
|
|
7
|
-
import { useLocalStorage } from "
|
|
4
|
+
import { Box, Button, Text } from "../../elements";
|
|
5
|
+
import { IconMove3 } from "../../icons";
|
|
6
|
+
// import { IconCInfo } from "../../icons";
|
|
7
|
+
import { useLocalStorage } from "../../hooks/use-local-storage";
|
|
8
8
|
|
|
9
9
|
// PanelHeader Component
|
|
10
10
|
interface PanelHeaderProps {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import React, { useRef } from "react";
|
|
3
3
|
import { createPortal } from "react-dom";
|
|
4
|
-
import { Box, Button, Text } from "
|
|
4
|
+
import { Box, Button, Text } from "../../elements";
|
|
5
5
|
import { AnimatePresence, motion } from "motion/react";
|
|
6
|
-
import { IconEAdd, IconERemove } from "
|
|
7
|
-
import { useSidebar } from "
|
|
8
|
-
import { useOverlay } from "
|
|
9
|
-
import { Backdrop, OverscrollGuard } from "
|
|
6
|
+
import { IconEAdd, IconERemove } from "../../icons";
|
|
7
|
+
import { useSidebar } from "../../hooks/use-sidebar";
|
|
8
|
+
import { useOverlay } from "../../hooks/useOverlay";
|
|
9
|
+
import { Backdrop, OverscrollGuard } from "../Overlay";
|
|
10
10
|
|
|
11
11
|
interface DrawerProps {
|
|
12
12
|
children: React.ReactNode;
|
|
@@ -15,7 +15,7 @@ A sophisticated drawer component with multiple animated views, perfect for walle
|
|
|
15
15
|
### Basic Usage
|
|
16
16
|
|
|
17
17
|
```tsx
|
|
18
|
-
import { FamilyDrawer } from "
|
|
18
|
+
import { FamilyDrawer } from "@reactberry/system/blocks";
|
|
19
19
|
|
|
20
20
|
function MyComponent() {
|
|
21
21
|
return (
|
|
@@ -27,8 +27,8 @@ function MyComponent() {
|
|
|
27
27
|
### Advanced Usage
|
|
28
28
|
|
|
29
29
|
```tsx
|
|
30
|
-
import { FamilyDrawer } from "
|
|
31
|
-
import { Button, Text } from "
|
|
30
|
+
import { FamilyDrawer } from "@reactberry/system/blocks";
|
|
31
|
+
import { Button, Text } from "@reactberry/system/elements";
|
|
32
32
|
|
|
33
33
|
function MyComponent() {
|
|
34
34
|
const handleViewChange = (view) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { Box, Text, Button } from "
|
|
5
|
-
import { Container } from "
|
|
4
|
+
import { Box, Text, Button } from "../../elements";
|
|
5
|
+
import { Container } from "..";
|
|
6
6
|
import FamilyDrawer from "./index";
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import React, { useState, useMemo } from "react";
|
|
4
|
-
import { Box, Button, Text } from "
|
|
5
|
-
import { Drawer, DrawerButton } from "
|
|
4
|
+
import { Box, Button, Text } from "../../elements";
|
|
5
|
+
import { Drawer, DrawerButton } from "../Drawer";
|
|
6
6
|
import { AnimatePresence, motion } from "motion/react";
|
|
7
|
-
import { IconGear } from "
|
|
7
|
+
import { IconGear } from "../../icons";
|
|
8
8
|
import useMeasure from "react-use-measure";
|
|
9
9
|
|
|
10
10
|
import { DefaultView } from "./views/DefaultView";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { Box, Button, Text } from "
|
|
5
|
-
import { IconLock, IconOWarning, IconText } from "
|
|
4
|
+
import { Box, Button, Text } from "../../../elements";
|
|
5
|
+
import { IconLock, IconOWarning, IconText } from "../../../icons";
|
|
6
6
|
import { FamilyDrawerView } from "../index";
|
|
7
7
|
|
|
8
8
|
interface DefaultViewProps {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { Box, Button, Text } from "
|
|
4
|
+
import { Box, Button, Text } from "../../../elements";
|
|
5
5
|
import {
|
|
6
6
|
IconBan,
|
|
7
7
|
IconCCheck,
|
|
8
8
|
IconLock,
|
|
9
9
|
IconOWarning,
|
|
10
10
|
IconUserFocus,
|
|
11
|
-
} from "
|
|
11
|
+
} from "../../../icons";
|
|
12
12
|
import { FamilyDrawerView } from "../index";
|
|
13
13
|
|
|
14
14
|
interface KeyViewProps {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { Box, Button, Text } from "
|
|
4
|
+
import { Box, Button, Text } from "../../../elements";
|
|
5
5
|
import {
|
|
6
6
|
IconBan,
|
|
7
7
|
IconCCheck,
|
|
8
8
|
IconOWarning,
|
|
9
9
|
IconText,
|
|
10
10
|
IconUserFocus,
|
|
11
|
-
} from "
|
|
11
|
+
} from "../../../icons";
|
|
12
12
|
import { FamilyDrawerView } from "../index";
|
|
13
13
|
|
|
14
14
|
interface PhraseViewProps {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { Box, Button, Text } from "
|
|
5
|
-
import { IconOWarning } from "
|
|
4
|
+
import { Box, Button, Text } from "../../../elements";
|
|
5
|
+
import { IconOWarning } from "../../../icons";
|
|
6
6
|
import { FamilyDrawerView } from "../index";
|
|
7
7
|
|
|
8
8
|
interface RemoveViewProps {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { Box, Text } from "
|
|
4
|
-
import Field, { FieldProps } from "
|
|
3
|
+
import { Box, Text } from "../../elements";
|
|
4
|
+
import Field, { FieldProps } from "../../elements/field";
|
|
5
5
|
import { TextareaHTMLAttributes, forwardRef } from "react";
|
|
6
6
|
|
|
7
7
|
type CommonProps = {
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
import React, { useState } from "react"
|
|
4
4
|
import { AnimatePresence, motion } from "motion/react"
|
|
5
|
-
import { Box, Button, Text } from "
|
|
5
|
+
import { Box, Button, Text } from "../../elements"
|
|
6
6
|
import {
|
|
7
7
|
Icon24Folder,
|
|
8
8
|
IconArrowSmRight,
|
|
9
9
|
IconDocFolder,
|
|
10
10
|
IconFile,
|
|
11
|
-
} from "
|
|
11
|
+
} from "../../icons"
|
|
12
12
|
|
|
13
13
|
export type FilesystemNode = {
|
|
14
14
|
name: string
|
|
@@ -5,14 +5,14 @@ import { useState } from "react";
|
|
|
5
5
|
import { variants } from "../utils/animationVariants";
|
|
6
6
|
import downloadPhoto from "../utils/downloadPhoto";
|
|
7
7
|
import { useSwipeable } from "react-swipeable";
|
|
8
|
-
import Box from "
|
|
8
|
+
import Box from "../../../elements/box";
|
|
9
9
|
import {
|
|
10
10
|
IconArrowLeft,
|
|
11
11
|
IconArrowRight,
|
|
12
12
|
IconDownloadData,
|
|
13
13
|
IconLaunch,
|
|
14
|
-
} from "
|
|
15
|
-
import { useKeypress } from "
|
|
14
|
+
} from "../../../icons";
|
|
15
|
+
import { useKeypress } from "../../../hooks/useKeypress";
|
|
16
16
|
import { Control } from "../../Controls/Control";
|
|
17
17
|
|
|
18
18
|
export default function Carousel({
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
DialogBackdrop,
|
|
7
7
|
} from "@headlessui/react";
|
|
8
8
|
import { useRef, useState } from "react";
|
|
9
|
-
import Box, { BoxProps } from "
|
|
9
|
+
import Box, { BoxProps } from "../../../elements/box";
|
|
10
10
|
import { useRouter } from "next/navigation";
|
|
11
11
|
|
|
12
12
|
type ModalProps = DialogProps<any> &
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import Image from "next/image";
|
|
3
|
-
import Box from "
|
|
3
|
+
import Box from "../../elements/box";
|
|
4
4
|
import { useState } from "react";
|
|
5
5
|
import Modal from "./Modal";
|
|
6
6
|
import Carousel from "./Carousel";
|
|
7
7
|
import Collection from "../Collection";
|
|
8
8
|
import { motion } from "motion/react";
|
|
9
|
-
import type { ImageType } from "
|
|
9
|
+
import type { ImageType } from "../../types";
|
|
10
10
|
|
|
11
11
|
type GalleryProps = {
|
|
12
12
|
images: ImageType[];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { MeshGradient } from "@paper-design/shaders-react";
|
|
4
|
-
import { Box } from "
|
|
4
|
+
import { Box } from "../../elements";
|
|
5
5
|
import styled from "styled-components";
|
|
6
|
-
import { useReducedMotion } from "
|
|
6
|
+
import { useReducedMotion } from "../../hooks/useReducedMotion";
|
|
7
7
|
|
|
8
8
|
interface GradientMeshProps {
|
|
9
9
|
/** Animation intensity level */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { designSystemIcons, type DesignSystemIconName } from "
|
|
4
|
-
import { Box } from "
|
|
3
|
+
import { designSystemIcons, type DesignSystemIconName } from "../../icons";
|
|
4
|
+
import { Box } from "../../elements";
|
|
5
5
|
import { useMemo } from "react";
|
|
6
6
|
|
|
7
7
|
interface IconComponentProps {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client"
|
|
2
|
-
import { IconPencil } from "
|
|
3
|
-
import { Box, Text, Button, Field } from "
|
|
2
|
+
import { IconPencil } from "../../icons"
|
|
3
|
+
import { Box, Text, Button, Field } from "../../elements"
|
|
4
4
|
import React, { useState, useRef, useEffect } from "react"
|
|
5
5
|
import Textarea from "react-textarea-autosize"
|
|
6
6
|
import Group from "../Group"
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
type MaskPresetType,
|
|
11
11
|
} from "../MaskedField"
|
|
12
12
|
|
|
13
|
-
import { IconDCheck, IconERemove } from "
|
|
13
|
+
import { IconDCheck, IconERemove } from "../../icons"
|
|
14
14
|
|
|
15
15
|
type InlineEditorProps = {
|
|
16
16
|
id: string | number
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useState } from "react";
|
|
2
2
|
import { motion, AnimatePresence } from "motion/react";
|
|
3
|
-
import { Box, Text } from "
|
|
3
|
+
import { Box, Text } from "../../elements";
|
|
4
4
|
import { useMenu } from "./MenuContext";
|
|
5
5
|
|
|
6
6
|
interface MenuItem {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState, useContext } from "react";
|
|
2
2
|
import { motion } from "motion/react";
|
|
3
|
-
import { Box, Text } from "
|
|
3
|
+
import { Box, Text } from "../../elements";
|
|
4
4
|
import { useMenu } from "./MenuContext";
|
|
5
5
|
import Link from "next/link";
|
|
6
6
|
import { ThemeContext } from "styled-components";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { Box } from "
|
|
3
|
+
import { Box } from "../../elements";
|
|
4
4
|
import { MenuProvider, useMenu } from "./MenuContext";
|
|
5
5
|
import { MenuItem } from "./MenuItem";
|
|
6
6
|
import { MenuContent } from "./MenuContent";
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import { AnimatePresence, motion } from "motion/react";
|
|
20
|
-
import { Box } from "
|
|
21
|
-
import { useKeypress } from "
|
|
22
|
-
import { useOverlay } from "
|
|
23
|
-
import { Backdrop } from "
|
|
20
|
+
import { Box } from "../../elements";
|
|
21
|
+
import { useKeypress } from "../../hooks/useKeypress";
|
|
22
|
+
import { useOverlay } from "../../hooks/useOverlay";
|
|
23
|
+
import { Backdrop } from "../Overlay";
|
|
24
24
|
import { usePathname, useRouter } from "next/navigation";
|
|
25
25
|
import {
|
|
26
26
|
createContext,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
import { createPortal } from "react-dom";
|
|
35
35
|
|
|
36
36
|
// Re-export for consumers that import these directly from Modal
|
|
37
|
-
export { pushThemeColor, popThemeColor } from "
|
|
37
|
+
export { pushThemeColor, popThemeColor } from "../../utils/overlayTheme";
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
* Context that exposes the Modal's close function to children.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import React, { useCallback, useEffect, useId, useRef, useState } from "react";
|
|
4
|
-
import { Box } from "
|
|
4
|
+
import { Box } from "../../elements";
|
|
5
5
|
import { createPortal } from "react-dom";
|
|
6
|
-
import { useClickOutside } from "
|
|
6
|
+
import { useClickOutside } from "../../hooks/useClickOutside";
|
|
7
7
|
import {
|
|
8
8
|
AnimatePresence,
|
|
9
9
|
MotionConfig,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { motion, useScroll, useTransform } from "motion/react";
|
|
3
3
|
import React, { useRef } from "react";
|
|
4
4
|
import Image from "next/image";
|
|
5
|
-
import { Box } from "
|
|
5
|
+
import { Box } from "../../elements";
|
|
6
6
|
|
|
7
7
|
interface ParallaxSectionProps {
|
|
8
8
|
image: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { Text } from "
|
|
2
|
+
import { Text } from "../../elements";
|
|
3
3
|
import { motion } from "motion/react";
|
|
4
|
-
import Collection from "
|
|
5
|
-
import Placeholder from "
|
|
4
|
+
import Collection from "../Collection";
|
|
5
|
+
import Placeholder from "../Placeholder";
|
|
6
6
|
|
|
7
7
|
interface SkeletonProps {
|
|
8
8
|
count?: number; // Number of placeholder items to show
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Box } from "
|
|
2
|
-
import { IconArrowLeft, IconArrowRight } from "
|
|
1
|
+
import { Box } from "../../elements";
|
|
2
|
+
import { IconArrowLeft, IconArrowRight } from "../../icons";
|
|
3
3
|
import { AnimatePresence, motion } from "motion/react";
|
|
4
4
|
import { Control } from "../Controls/Control";
|
|
5
5
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { motion, type PanInfo } from "motion/react";
|
|
3
3
|
import { ReactNode, type WheelEvent } from "react";
|
|
4
4
|
import useSlider, { ResponsiveConfig, SliderConfig } from "./useSlider";
|
|
5
|
-
import { Box } from "
|
|
5
|
+
import { Box } from "../../elements";
|
|
6
6
|
import SliderControls from "./SliderControls";
|
|
7
7
|
|
|
8
8
|
interface Props {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { Box } from "
|
|
3
|
-
import type { ImageType } from "
|
|
2
|
+
import { Box } from "../../elements";
|
|
3
|
+
import type { ImageType } from "../../types";
|
|
4
4
|
import { motion, AnimatePresence } from "motion/react";
|
|
5
5
|
import { useState, useEffect } from "react";
|
|
6
6
|
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
useMotionValue,
|
|
7
7
|
useSpring,
|
|
8
8
|
} from "motion/react";
|
|
9
|
-
import Box, { BoxProps } from "
|
|
9
|
+
import Box, { BoxProps } from "../../elements/box";
|
|
10
10
|
|
|
11
11
|
interface SpotlightProps extends Omit<BoxProps, "children"> {
|
|
12
12
|
children: React.ReactNode;
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { motion } from "motion/react";
|
|
5
|
-
import { Box, Text } from "
|
|
6
|
-
import Tooltip from "
|
|
5
|
+
import { Box, Text } from "../../elements";
|
|
6
|
+
import Tooltip from "../Tooltip";
|
|
7
7
|
import { useHover } from "./hooks";
|
|
8
8
|
import { StepThemeConfig } from "./types";
|
|
9
|
-
import { IconDCheck } from "
|
|
9
|
+
import { IconDCheck } from "../../icons";
|
|
10
10
|
|
|
11
11
|
interface StepIndicatorProps {
|
|
12
12
|
/** Whether this step is currently active */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { Box, Text } from "
|
|
4
|
+
import { Box, Text } from "../../elements";
|
|
5
5
|
import StepProgress from "./StepProgress";
|
|
6
6
|
import { BaseStepProps } from "./types";
|
|
7
7
|
import { useStepNavigation } from "./hooks";
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { Children, type ReactNode, useMemo, useRef } from "react";
|
|
4
4
|
import { motion, type MotionValue, useScroll, useTransform } from "motion/react";
|
|
5
5
|
|
|
6
|
-
import { Box, type BoxProps } from "
|
|
7
|
-
import { useReducedMotion } from "
|
|
6
|
+
import { Box, type BoxProps } from "../../elements";
|
|
7
|
+
import { useReducedMotion } from "../../hooks/useReducedMotion";
|
|
8
8
|
|
|
9
9
|
export interface StickySectionStackProps extends BoxProps {
|
|
10
10
|
children: ReactNode;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import Box, { BoxProps } from "
|
|
3
|
-
import Text from "
|
|
2
|
+
import Box, { BoxProps } from "../../elements/box";
|
|
3
|
+
import Text from "../../elements/text";
|
|
4
4
|
import Divider from "../Divider";
|
|
5
5
|
import React from "react";
|
|
6
|
-
import { IconDotsAnim } from "
|
|
6
|
+
import { IconDotsAnim } from "../../icons";
|
|
7
7
|
|
|
8
8
|
interface SystemNoticeProps extends BoxProps {
|
|
9
9
|
message: React.ReactNode;
|
package/src/blocks/Tag/index.tsx
CHANGED
|
@@ -4,8 +4,8 @@ import { useMemo, useRef } from "react";
|
|
|
4
4
|
import { motion, type MotionValue, useScroll, useTransform } from "motion/react";
|
|
5
5
|
import styled from "styled-components";
|
|
6
6
|
|
|
7
|
-
import { Text, type TextProps } from "
|
|
8
|
-
import { useReducedMotion } from "
|
|
7
|
+
import { Text, type TextProps } from "../../elements";
|
|
8
|
+
import { useReducedMotion } from "../../hooks/useReducedMotion";
|
|
9
9
|
|
|
10
10
|
type ScrollOffset = NonNullable<Parameters<typeof useScroll>[0]>["offset"];
|
|
11
11
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { animate, motion, useMotionValue } from "motion/react";
|
|
4
|
-
import { Box } from "
|
|
4
|
+
import { Box } from "../../elements";
|
|
5
5
|
import useMeasure from "react-use-measure";
|
|
6
6
|
|
|
7
7
|
interface TickerProps {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import Box from "
|
|
3
|
-
import Text from "
|
|
4
|
-
import { BoxProps } from "
|
|
2
|
+
import Box from "../../elements/box";
|
|
3
|
+
import Text from "../../elements/text";
|
|
4
|
+
import { BoxProps } from "../../elements/box";
|
|
5
5
|
import React from "react";
|
|
6
|
-
import { IconERemove } from "
|
|
7
|
-
import { Button } from "
|
|
6
|
+
import { IconERemove } from "../../icons";
|
|
7
|
+
import { Button } from "../../elements";
|
|
8
8
|
|
|
9
9
|
interface ToastProps extends BoxProps {
|
|
10
10
|
message: React.ReactNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { Box, Text } from "
|
|
3
|
+
import { Box, Text } from "../../elements";
|
|
4
4
|
import { AnimatePresence, motion } from "motion/react";
|
|
5
5
|
import React, { useEffect, useState } from "react";
|
|
6
6
|
import { createPortal } from "react-dom";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Button, Box } from "
|
|
2
|
+
import { Button, Box } from "../../elements";
|
|
3
3
|
import { UploadContainerProps } from "./types";
|
|
4
|
-
import { IconDotsAnim, IconUpload } from "
|
|
4
|
+
import { IconDotsAnim, IconUpload } from "../../icons";
|
|
5
5
|
|
|
6
6
|
function UploadBtn({
|
|
7
7
|
children,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
import { useEffect, useRef, useState } from "react";
|
|
12
12
|
import useMeasure from "react-use-measure";
|
|
13
13
|
|
|
14
|
-
import { Box, Text } from "
|
|
14
|
+
import { Box, Text } from "../../elements";
|
|
15
15
|
import { ControlLeft, ControlRight } from "../Controls/Control";
|
|
16
16
|
|
|
17
17
|
export interface VideoMarqueeItem {
|
package/src/blocks/index.ts
CHANGED
|
@@ -17,6 +17,7 @@ export { default as Switch } from "./Switch";
|
|
|
17
17
|
export { default as Tooltip } from "./Tooltip";
|
|
18
18
|
export { default as Popover } from "./Popover";
|
|
19
19
|
export { default as MorphingPopover } from "./MorphingPopover";
|
|
20
|
+
export { default as Modal, useModalClose, pushThemeColor, popThemeColor } from "./Modal";
|
|
20
21
|
export { Menu, MenuItem, MenuContent } from "./Menu";
|
|
21
22
|
export { default as Accordion } from "./Accordion";
|
|
22
23
|
export { Drawer, DrawerButton } from "./Drawer";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import Icon from "../Icon";
|
|
4
|
-
import { Box, Button } from "
|
|
4
|
+
import { Box, Button } from "../../elements";
|
|
5
5
|
import { usePathname, useRouter, useSearchParams } from "next/navigation";
|
|
6
6
|
import { useCallback } from "react";
|
|
7
7
|
|
package/src/docs/README.md
CHANGED
|
@@ -53,10 +53,10 @@ docs/
|
|
|
53
53
|
|
|
54
54
|
```jsx
|
|
55
55
|
// Core elements (fully documented)
|
|
56
|
-
import { Box, Text, Button, Field } from '
|
|
56
|
+
import { Box, Text, Button, Field } from '@reactberry/system/elements';
|
|
57
57
|
|
|
58
58
|
// Composed blocks (documentation in progress)
|
|
59
|
-
import { Avatar, Container, Heading } from '
|
|
59
|
+
import { Avatar, Container, Heading } from '@reactberry/system/blocks';
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
### 2. Basic Usage
|
|
@@ -82,14 +82,13 @@ function WelcomeCard() {
|
|
|
82
82
|
### 3. Theme Integration
|
|
83
83
|
|
|
84
84
|
```jsx
|
|
85
|
-
import {
|
|
86
|
-
import { theme } from '@/design-system/themes';
|
|
85
|
+
import { DesignSystemProvider } from '@reactberry/system/providers';
|
|
87
86
|
|
|
88
87
|
function App() {
|
|
89
88
|
return (
|
|
90
|
-
<
|
|
89
|
+
<DesignSystemProvider>
|
|
91
90
|
<WelcomeCard />
|
|
92
|
-
</
|
|
91
|
+
</DesignSystemProvider>
|
|
93
92
|
);
|
|
94
93
|
}
|
|
95
94
|
```
|
package/src/hooks/useOverlay.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { useState, useEffect } from "react";
|
|
4
|
-
import { pushThemeColor, popThemeColor } from "
|
|
5
|
-
import { useStandaloneMode } from "
|
|
4
|
+
import { pushThemeColor, popThemeColor } from "../utils/overlayTheme";
|
|
5
|
+
import { useStandaloneMode } from "./useStandaloneMode";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Shared behavioral hook for overlay components (Modal, Drawer, etc.).
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
import { PropsWithChildren, useEffect, useMemo } from "react";
|
|
4
4
|
import { ThemeProvider } from "styled-components";
|
|
5
5
|
|
|
6
|
-
import GlobalStyles from "
|
|
7
|
-
import { themes, type ThemeName } from "
|
|
8
|
-
import { setCurrentTheme } from "
|
|
6
|
+
import GlobalStyles from "../themes/default/global";
|
|
7
|
+
import { themes, type ThemeName } from "../themes";
|
|
8
|
+
import { setCurrentTheme } from "../themes/default/utils";
|
|
9
9
|
import StyledComponentsRegistry from "./StyledComponentsRegistry";
|
|
10
10
|
|
|
11
11
|
interface DesignSystemProviderProps extends PropsWithChildren {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
3
|
import { motion } from "motion/react"
|
|
4
|
-
import Box, { BoxProps } from "
|
|
4
|
+
import Box, { BoxProps } from "../../../elements/box"
|
|
5
5
|
|
|
6
6
|
type BadgeAvatarProps = BoxProps & {
|
|
7
7
|
/** Flip the smile upside down to show a sad face. */
|