Skip to content

Commit

Permalink
Merge pull request #399 from qoretechnologies/feature/rich-text-editor
Browse files Browse the repository at this point in the history
Rich Text Editor V1
  • Loading branch information
Foxhoundn authored Jul 18, 2024
2 parents 6170c28 + 5c00565 commit 05b84e6
Show file tree
Hide file tree
Showing 16 changed files with 781 additions and 129 deletions.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@qoretechnologies/reqore",
"version": "0.47.4",
"version": "0.48.0",
"description": "ReQore is a highly theme-able and modular UI library for React",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -115,6 +115,9 @@
"react-window": "^1.8.6",
"scheduler": "^0.23.0",
"shortid": "^2.2.16",
"slate": "^0.103.0",
"slate-history": "^0.100.0",
"slate-react": "^0.107.0",
"styled-components": "^5.3.6",
"thenby": "^1.3.4",
"use-context-selector": "^1.4.1",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ export const ButtonBadge = memo(({ wrapGroup, compact, ...props }: IReqoreButton
minimal={!(content as IReqoreTagProps)?.effect?.gradient}
{...(typeof content === 'string' || typeof content === 'number'
? { label: content }
: content)}
: (content as IReqoreTagProps))}
/>
),
[props]
Expand Down
4 changes: 3 additions & 1 deletion src/components/Dropdown/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ function ReqoreDropdown<T = IReqoreButtonProps>({
isDefaultOpen = false,
onItemSelect,
closeOnOutsideClick,
closeOnInsideClick,
blur,
closeOnAnyClick,
delay,
Expand Down Expand Up @@ -100,7 +101,7 @@ function ReqoreDropdown<T = IReqoreButtonProps>({
style: buttonStyle || rest.style,
disabled: !size(items) || (rest as any).disabled,
className: `${(rest as any)?.className || ''} reqore-dropdown-control`,
}) as T,
} as T),
[items, icon, rightIcon, buttonStyle, caretPosition, rest]
);

Expand All @@ -127,6 +128,7 @@ function ReqoreDropdown<T = IReqoreButtonProps>({
return (
<ReqorePopover
closeOnOutsideClick={closeOnOutsideClick}
closeOnInsideClick={closeOnInsideClick}
blur={blur}
closeOnAnyClick={closeOnAnyClick}
delay={delay}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Effect/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ export const StyledEffect = styled.span`
`;

export const StyledTextEffect = styled(StyledEffect).attrs((props) => ({ ...props, isText: true }))`
display: ${({ inline }) => (inline ? 'inline' : 'inline-block')};
display: ${({ inline, block }) => (inline ? 'inline' : block ? 'block' : 'inline-block')};
${({ effect }: IReqoreTextEffectProps) =>
effect && effect.gradient
Expand Down
16 changes: 15 additions & 1 deletion src/components/Paragraph/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export interface IReqoreParagraphProps
IWithReqoreEffect,
IReqoreIntent {
size?: TSizes | string;
block?: boolean;
inline?: boolean;
}

export const StyledParagraph = styled(StyledTextEffect)`
Expand All @@ -24,7 +26,18 @@ export const StyledParagraph = styled(StyledTextEffect)`

export const ReqoreP = memo(
forwardRef(
({ size, children, customTheme, intent, className, ...props }: IReqoreParagraphProps, ref) => {
(
{
size,
children,
customTheme,
intent,
className,
block = true,
...props
}: IReqoreParagraphProps,
ref
) => {
const theme = useReqoreTheme('main', customTheme, intent);

return (
Expand All @@ -34,6 +47,7 @@ export const ReqoreP = memo(
theme={theme}
color={theme.text.color}
intent={intent}
block={block}
{...props}
_size={size}
className={`${className || ''} reqore-paragraph`}
Expand Down
Loading

0 comments on commit 05b84e6

Please sign in to comment.