@soul-refiner/design-system 2.0.0-alpha.0 → 2.0.0-alpha.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.
|
@@ -6,7 +6,7 @@ type NativeProps = Pick<React.HTMLAttributes<SVGElement>, 'children' | 'classNam
|
|
|
6
6
|
export interface IconProps extends NativeProps {
|
|
7
7
|
as?: React.ElementType;
|
|
8
8
|
color?: (typeof COLORS)[number];
|
|
9
|
-
size?: 16 | 20 | 24 | 40;
|
|
9
|
+
size?: 16 | 20 | 24 | 32 | 40;
|
|
10
10
|
sx?: string;
|
|
11
11
|
}
|
|
12
12
|
export declare const Icon: ({ as, children, color, size, sx, ...rest }: IconProps) => React.JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { DrawerProps } from '../../../components/surfaces/drawer';
|
|
2
3
|
/*************************************************************************************************************************
|
|
3
4
|
* Inner Navigation
|
|
4
5
|
*/
|
|
@@ -21,7 +22,7 @@ declare const InnerNav: {
|
|
|
21
22
|
displayName: string;
|
|
22
23
|
};
|
|
23
24
|
Drawer: {
|
|
24
|
-
({ children, label }: InnerNavDrawerProps): React.JSX.Element;
|
|
25
|
+
({ children, label, controlledOpen, onOpenChange, }: InnerNavDrawerProps): React.JSX.Element;
|
|
25
26
|
displayName: string;
|
|
26
27
|
};
|
|
27
28
|
DrawerHeader: {
|
|
@@ -85,7 +86,7 @@ export type InnerNavHeaderProps = React.PropsWithChildren;
|
|
|
85
86
|
/*************************************************************************************************************************
|
|
86
87
|
* Create Button
|
|
87
88
|
*/
|
|
88
|
-
export interface InnerNavDrawerProps extends React.PropsWithChildren {
|
|
89
|
+
export interface InnerNavDrawerProps extends DrawerProps, React.PropsWithChildren {
|
|
89
90
|
label: React.ReactNode;
|
|
90
91
|
}
|
|
91
92
|
export { InnerNav };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { useEffect } from 'react';
|
|
3
|
-
import
|
|
3
|
+
import { css, styled, keyframes } from 'styled-components';
|
|
4
4
|
import Image$1 from 'next/image';
|
|
5
5
|
import { setAlign, ELEMENT_PARAGRAPH, ELEMENT_H1, ELEMENT_H2, ELEMENT_H3, ELEMENT_H4, ELEMENT_H5, ELEMENT_H6, isCollapsed, findNode, isBlock, toggleNodeType, useEditorRef, useEditorState, useMarkToolbarButtonState, MARK_BOLD, useMarkToolbarButton, MARK_ITALIC, MARK_STRIKETHROUGH, MARK_UNDERLINE, MARK_CODE, useLinkToolbarButtonState, useLinkToolbarButton, useListToolbarButtonState, ELEMENT_OL, useListToolbarButton, ELEMENT_UL, insertTable, ELEMENT_BLOCKQUOTE, insertNodes, getPluginType, PlateElement, someNode, getBlockAbove, isEditorReadOnly, createPluginFactory, setNodes, useLink, useFloatingLinkSelectors, useFloatingLinkInsertState, useFloatingLinkInsert, useFloatingLinkEditState, useFloatingLinkEdit, FloatingLinkUrlInput, LinkOpenButton, ELEMENT_LINK, ELEMENT_IMAGE as ELEMENT_IMAGE$1, ELEMENT_TABLE, ELEMENT_TD, ELEMENT_TH, ELEMENT_TR, MARK_SUBSCRIPT, MARK_SUPERSCRIPT, createBlockquotePlugin, createCodeBlockPlugin, createHeadingPlugin, createHorizontalRulePlugin, createImagePlugin, createTextIndentPlugin, createIndentListPlugin, createListPlugin, createMediaEmbedPlugin, createResetNodePlugin, createTablePlugin, createAlignPlugin, createIndentPlugin, createLineHeightPlugin, createCodePlugin, createBoldPlugin, createFontBackgroundColorPlugin, createFontSizePlugin, createFontFamilyPlugin, createItalicPlugin, createStrikethroughPlugin, createSubscriptPlugin, createSuperscriptPlugin, createUnderlinePlugin, ELEMENT_MEDIA, ELEMENT_MEDIA_EMBED, KEYS_HEADING, isBlockAboveEmpty, isSelectionAtBlockStart, ELEMENT_TODO_LI, ELEMENT_HR, ELEMENT_CODE_BLOCK, createExitBreakPlugin, createHistoryPlugin, createSelectOnBackspacePlugin, createSoftBreakPlugin, createPlugins, Plate, PlateContent, createLinkPlugin as createLinkPlugin$1, insertImage, insertNode } from '@udecode/plate';
|
|
6
6
|
import { Tooltip as Tooltip$1 } from 'react-tooltip';
|
|
@@ -6225,7 +6225,7 @@ const ListElement = ({ children, variant = 'ul', ...props }) => {
|
|
|
6225
6225
|
React__default.createElement(React__default.Fragment, null,
|
|
6226
6226
|
React__default.createElement(Element, null, React__default.Children.map(children, (child) => (React__default.createElement(Li, null, child)))))));
|
|
6227
6227
|
};
|
|
6228
|
-
const Li = styled
|
|
6228
|
+
const Li = styled.li `
|
|
6229
6229
|
margin: 16px 0px;
|
|
6230
6230
|
padding-left: 8px;
|
|
6231
6231
|
|
|
@@ -7681,13 +7681,13 @@ const AnimatedToast = ({ message, type, onClose, animationDuration = 4, }) => {
|
|
|
7681
7681
|
React__default.createElement(ToastAnimation, { className: `${toastIsClosed ? 'toast-closed' : ''}` },
|
|
7682
7682
|
React__default.createElement(Toast, { content: message, type: type, isAnimated: true, animationDuration: animationDuration }))));
|
|
7683
7683
|
};
|
|
7684
|
-
const Container$5 = styled
|
|
7684
|
+
const Container$5 = styled.div `
|
|
7685
7685
|
position: fixed;
|
|
7686
7686
|
z-index: 9999;
|
|
7687
7687
|
bottom: 16px;
|
|
7688
7688
|
right: 16px;
|
|
7689
7689
|
`;
|
|
7690
|
-
const ToastAnimation = styled
|
|
7690
|
+
const ToastAnimation = styled.div `
|
|
7691
7691
|
animation: slide-in 0.4s ease-in-out forwards;
|
|
7692
7692
|
|
|
7693
7693
|
&.toast-closed {
|
|
@@ -10344,7 +10344,7 @@ const NavWrapper = styled.nav `
|
|
|
10344
10344
|
width: 365px;
|
|
10345
10345
|
padding: 24px 12px 24px 16px;
|
|
10346
10346
|
box-sizing: border-box;
|
|
10347
|
-
background-color: var(--color-
|
|
10347
|
+
background-color: var(--color-blue-10);
|
|
10348
10348
|
border-right: 1px solid var(--color-grey-9);
|
|
10349
10349
|
`;
|
|
10350
10350
|
const InnerNavItem = ({ active, href, icon, label, sx, onClick, }) => {
|
|
@@ -10359,7 +10359,7 @@ const Item$1 = styled(Link$2) `
|
|
|
10359
10359
|
align-items: center;
|
|
10360
10360
|
border-radius: 8px;
|
|
10361
10361
|
font-family: var(--font-inter);
|
|
10362
|
-
font-weight:
|
|
10362
|
+
font-weight: 500;
|
|
10363
10363
|
font-size: 16px;
|
|
10364
10364
|
line-height: 24px;
|
|
10365
10365
|
color: var(--color-blue-2);
|
|
@@ -10464,10 +10464,12 @@ const InnerNavHeader = ({ children }) => {
|
|
|
10464
10464
|
const HeaderWrapper = styled.div ``;
|
|
10465
10465
|
InnerNav.Header = InnerNavHeader;
|
|
10466
10466
|
InnerNavHeader.displayName = 'InnerNav.Header';
|
|
10467
|
-
const InnerNavDrawer = ({ children, label }) => {
|
|
10468
|
-
return (React__default.createElement(Drawer,
|
|
10467
|
+
const InnerNavDrawer = ({ children, label, controlledOpen, onOpenChange, }) => {
|
|
10468
|
+
return (React__default.createElement(Drawer, { controlledOpen: controlledOpen, onOpenChange: onOpenChange },
|
|
10469
10469
|
React__default.createElement(Drawer.Trigger, null,
|
|
10470
|
-
React__default.createElement(Button$3, { icon: React__default.createElement(Plus, { color: "white" }), size: "small", sx: "width: 100%; margin-bottom: 24px;", type: "primary"
|
|
10470
|
+
React__default.createElement(Button$3, { icon: React__default.createElement(Plus, { color: "white" }), size: "small", sx: "width: 100%; margin-bottom: 24px;", type: "primary", onClick: () => {
|
|
10471
|
+
onOpenChange?.();
|
|
10472
|
+
} }, label)),
|
|
10471
10473
|
children));
|
|
10472
10474
|
};
|
|
10473
10475
|
InnerNav.Drawer = InnerNavDrawer;
|