mirror of
https://github.com/rowyio/rowy.git
synced 2026-09-03 12:53:55 +02:00
* Bump ejs from 3.1.6 to 3.1.8
Bumps [ejs](https://github.com/mde/ejs) from 3.1.6 to 3.1.8.
- [Release notes](https://github.com/mde/ejs/releases)
- [Changelog](https://github.com/mde/ejs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mde/ejs/compare/v3.1.6...v3.1.8)
---
updated-dependencies:
- dependency-name: ejs
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
* Bump minimist from 1.2.5 to 1.2.6
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)
---
updated-dependencies:
- dependency-name: minimist
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
* Bump tmpl from 1.0.4 to 1.0.5
Bumps [tmpl](https://github.com/daaku/nodejs-tmpl) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/daaku/nodejs-tmpl/releases)
- [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5)
---
updated-dependencies:
- dependency-name: tmpl
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
* Bump protobufjs from 6.11.2 to 6.11.3
Bumps [protobufjs](https://github.com/protobufjs/protobuf.js) from 6.11.2 to 6.11.3.
- [Release notes](https://github.com/protobufjs/protobuf.js/releases)
- [Changelog](https://github.com/protobufjs/protobuf.js/blob/v6.11.3/CHANGELOG.md)
- [Commits](https://github.com/protobufjs/protobuf.js/compare/v6.11.2...v6.11.3)
---
updated-dependencies:
- dependency-name: protobufjs
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
* fix(rich-text-editor): fix dark mode ui appearance (#696)
* fix(rich-text-editor): fix dark mode ui appearance
* Update src/components/RichTextEditor.tsx
Co-authored-by: Sidney Alcantara <sidney@sidney.me>
* Update src/components/RichTextEditor.tsx
Co-authored-by: Sidney Alcantara <sidney@sidney.me>
* Update src/components/RichTextEditor.tsx
Co-authored-by: Sidney Alcantara <sidney@sidney.me>
* Update src/components/RichTextEditor.tsx
Co-authored-by: Sidney Alcantara <sidney@sidney.me>
* Update src/components/RichTextEditor.tsx
Co-authored-by: Sidney Alcantara <sidney@sidney.me>
* Update src/components/RichTextEditor.tsx
Co-authored-by: Sidney Alcantara <sidney@sidney.me>
* Update src/components/RichTextEditor.tsx
Co-authored-by: Sidney Alcantara <sidney@sidney.me>
* Update src/theme/RichTextEditorDarkCSS.tsx
Co-authored-by: Sidney Alcantara <sidney@sidney.me>
* Update src/theme/RichTextEditorLightCSS.tsx
Co-authored-by: Sidney Alcantara <sidney@sidney.me>
* fix(rich-text-editor): add stylings to dropdown
* fix(rich-text-editor): add toolbar stylings
* fix(rich-text-editor): reset hover&focus bg
Co-authored-by: Sidney Alcantara <sidney@sidney.me>
* update date & time filter operators for clarity
* Action field: prevent selecting self as required field (fixes ROWY-551)
* Date & Time: only show date for date filters
* move fullScreenButton to be shared, remove md settings
* bundle-analyzer
* Leaf icon: use mdi-material-ui
* Feat: Percentage field color customization (#692)
* feat(percentage-c11n): convert to table cell
* feat(percentage-c11n): add logic to default configs
* feat(percentage-c11n): add color picker to settings
* feat(percentage-c11n): change default colors
* feat(percentage-c11n): fix button text color
* feat(percentage-c11n): add labels to settings
* feat(percentage-c11n): add preview section
* feat(percentage-c11n): fix cache issues with debouncing
* feat(percentage-c11n): add width responsiveness to color picker
* feat(percentage-c11n): fix responsiveness issues
* feat(percentage-c11n): add checkbox, refactor a little
* feat(percentage-c11n): convert data type to array
* feat(percentage-c11n): refactor config states
* feat(percentage-c11n): fix defaults
* feat(percentage-c11n): add basic cell without bg
* feat(percentage-c11n): remove collapse
* feat(percentage-c11n): refactor checkStates
* feat(percentage-c11n): add grid layout
* feat(percentage-c11n): chore conventions
* feat(percentage-c11n): add default theme color to sidedrawer
* remove redundant fragment
Co-authored-by: Sidney Alcantara <sidney@sidney.me>
* fix text color in preview
Co-authored-by: Sidney Alcantara <sidney@sidney.me>
* fix: change state to derived state
Co-authored-by: Sidney Alcantara <sidney@sidney.me>
* fix: review suggestions
* fix: remove redundant change call
Co-authored-by: Sidney Alcantara <sidney@sidney.me>
* fix(percentage-c11n): remove redundant dependencies
Co-authored-by: Shams <shams.mosowi@gmail.com>
Co-authored-by: Sidney Alcantara <sidney@sidney.me>
* extend callable timeout to over 9minutes
* fix timeout value
* fix page loading with white screen while system is in dark mode
* Revert "bundle-analyzer"
This reverts commit dd214b96e4.
* fix nav items not accessible with Tab
* Percentage: don’t display if value null or undefined
* fix NavDrawer causing compile to fail
* show text field if collections array is empy
* column ids
* row ID
* fix create table showing empty dropdown for collections
* fix row not writing to db once all required fields are written
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Han Tuerker <46192266+htuerker@users.noreply.github.com>
Co-authored-by: shamsmosowi <shams.mosowi@gmail.com>
77 lines
1.7 KiB
TypeScript
77 lines
1.7 KiB
TypeScript
import { useState, useRef, MutableRefObject, useLayoutEffect } from "react";
|
|
import { Box, useTheme } from "@mui/material";
|
|
|
|
import { Color, ColorPicker } from "react-color-palette";
|
|
|
|
const useResponsiveWidth = (): [
|
|
width: number,
|
|
setRef: MutableRefObject<HTMLElement | null>
|
|
] => {
|
|
const ref = useRef(null);
|
|
const [width, setWidth] = useState(0);
|
|
|
|
useLayoutEffect(() => {
|
|
if (!ref || !ref.current) {
|
|
return;
|
|
}
|
|
const resizeObserver = new ResizeObserver((targets) => {
|
|
const { width: currentWidth } = targets[0].contentRect;
|
|
setWidth(currentWidth);
|
|
});
|
|
|
|
resizeObserver.observe(ref.current);
|
|
|
|
return () => {
|
|
resizeObserver.disconnect();
|
|
};
|
|
}, []);
|
|
|
|
return [width, ref];
|
|
};
|
|
|
|
export interface IColorPickerProps {
|
|
value: Color;
|
|
onChangeComplete: (color: Color) => void;
|
|
disabled?: boolean;
|
|
}
|
|
|
|
export default function ColorPickerInput({
|
|
value,
|
|
onChangeComplete,
|
|
disabled = false,
|
|
}: IColorPickerProps) {
|
|
const [localValue, setLocalValue] = useState(value);
|
|
const [width, setRef] = useResponsiveWidth();
|
|
const theme = useTheme();
|
|
|
|
return (
|
|
<Box
|
|
ref={setRef}
|
|
sx={[
|
|
{
|
|
padding: theme.spacing(1.5),
|
|
paddingTop: theme.spacing(1),
|
|
transitionDuration: 0,
|
|
"& .rcp": {
|
|
border: "none",
|
|
"& .rcp-saturation": {
|
|
borderRadius: theme.spacing(0.5),
|
|
},
|
|
"& .rcp-body": {
|
|
boxSizing: "unset",
|
|
},
|
|
},
|
|
},
|
|
]}
|
|
>
|
|
<ColorPicker
|
|
width={width}
|
|
height={150}
|
|
color={localValue}
|
|
onChange={(color) => setLocalValue(color)}
|
|
onChangeComplete={onChangeComplete}
|
|
/>
|
|
</Box>
|
|
);
|
|
}
|