@wavv/ui 2.2.2 → 2.2.4
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/build/assets/icons/Checkbox.js +3 -3
- package/build/assets/icons/Exclamation.js +3 -3
- package/build/assets/icons/PersonSupport.d.ts +3 -0
- package/build/assets/icons/PersonSupport.js +39 -0
- package/build/assets/icons/PhoneEnd.js +3 -3
- package/build/assets/icons/PhoneForward.js +3 -3
- package/build/assets/icons/PhoneHold.js +3 -3
- package/build/assets/icons/Record.js +3 -3
- package/build/assets/icons/ShieldWavv.js +3 -3
- package/build/components/Accordion/Header.js +4 -4
- package/build/components/Audio.js +3 -3
- package/build/components/CalendarParts/CalendarHeader.js +3 -3
- package/build/components/CalendarParts/useMinMax.js +3 -3
- package/build/components/Code/Code.js +3 -3
- package/build/components/Code/Endpoint.js +3 -3
- package/build/components/CommandMenu/CommandMenu.js +3 -3
- package/build/components/CommandMenu/CommandSection.js +3 -3
- package/build/components/Dot.js +3 -3
- package/build/components/DraftEditor.js +3 -3
- package/build/components/Dropdown.js +3 -3
- package/build/components/DropdownMenuParts/MenuOptions.js +3 -3
- package/build/components/DropdownSelect.js +3 -3
- package/build/components/Editor/RichTextToolbar.js +3 -3
- package/build/components/Focusable.js +3 -3
- package/build/components/Form.js +9 -9
- package/build/components/Grid.js +3 -3
- package/build/components/Icon/customIcons.d.ts +1 -0
- package/build/components/Icon/customIcons.js +5 -3
- package/build/components/Icon/icons.d.ts +1 -1
- package/build/components/Icon/icons.js +1 -1
- package/build/components/ImageViewer.js +3 -3
- package/build/components/InlineCode.js +3 -3
- package/build/components/Inputs/InlineInput.js +3 -3
- package/build/components/Inputs/PhoneInput.js +3 -3
- package/build/components/Inputs/TextInput.js +3 -3
- package/build/components/Inputs/helpers/LabelWrapper.js +3 -3
- package/build/components/Inputs/helpers/useDynamicWidth.js +3 -3
- package/build/components/ListHelpers/ItemHeaderBody.js +3 -3
- package/build/components/ListHelpers/ListSection.js +3 -3
- package/build/components/MultiSelect/SearchDropdown.js +3 -3
- package/build/components/Pagination.js +3 -3
- package/build/components/Popover.js +3 -3
- package/build/components/Radio.js +3 -3
- package/build/components/Slider.js +3 -3
- package/build/components/Table/Body.js +3 -3
- package/build/components/Table/ColumnSort.js +3 -3
- package/build/components/Table/Header.js +3 -3
- package/build/components/Table/Resizer.js +3 -3
- package/build/components/Table/contentStyles.js +3 -3
- package/build/components/ToggleButton/ToggleButton.js +11 -11
- package/build/components/UnstyledButton.js +3 -3
- package/build/components/helpers/mergePadding.js +3 -3
- package/build/global-styles/ResetStyles.js +3 -3
- package/build/hooks/useControlledOpenState.js +3 -3
- package/build/hooks/useOnClickOutside.js +3 -3
- package/build/hooks/useWindowSize.js +3 -3
- package/build/tailwind/theme.css +8 -0
- package/build/theme/ThemeTypes.d.ts +29 -0
- package/build/theme/common/common.d.ts +8 -0
- package/build/theme/core/colors.d.ts +25 -2
- package/build/theme/core/colors.js +8 -0
- package/build/theme/core/dark/dark.js +105 -0
- package/build/theme/core/light/light.js +108 -3
- package/build/theme/eighties/colors.d.ts +8 -0
- package/build/theme/eighties/colors.js +8 -0
- package/build/theme/eighties/dark/dark.js +105 -0
- package/build/theme/eighties/light/light.js +108 -3
- package/build/utils/chunk.js +3 -3
- package/build/utils/copyToClipboard.js +3 -3
- package/build/utils/formatNumber.js +3 -3
- package/package.json +24 -24
|
@@ -10,7 +10,7 @@ import Input from "./helpers/Input.js";
|
|
|
10
10
|
import InputContainerStyles from "./helpers/InputContainerStyles.js";
|
|
11
11
|
import InputMessage from "./helpers/InputMessage.js";
|
|
12
12
|
import Label from "./helpers/Label.js";
|
|
13
|
-
const
|
|
13
|
+
const PhoneInput = ({ value, label, placeholder, iconLeft, iconRight, leftElement, rightElement, loading, fontSize, placeholderColor, disabled, readOnly, invalid, required, description, errorMessage, onChange, ref, ...props })=>{
|
|
14
14
|
const [inputValue, setInputValue] = useState('');
|
|
15
15
|
const internalRef = useRef(null);
|
|
16
16
|
useImperativeHandle(ref, ()=>internalRef.current);
|
|
@@ -92,5 +92,5 @@ const PhoneInput_PhoneInput = ({ value, label, placeholder, iconLeft, iconRight,
|
|
|
92
92
|
});
|
|
93
93
|
};
|
|
94
94
|
const InputContainer = styled(TextField)(InputContainerStyles);
|
|
95
|
-
const
|
|
96
|
-
export {
|
|
95
|
+
const Inputs_PhoneInput = PhoneInput;
|
|
96
|
+
export { Inputs_PhoneInput as default };
|
|
@@ -10,7 +10,7 @@ import InputContainerStyles from "./helpers/InputContainerStyles.js";
|
|
|
10
10
|
import InputMessage from "./helpers/InputMessage.js";
|
|
11
11
|
import isAcceptable from "./helpers/isAcceptable.js";
|
|
12
12
|
import Label from "./helpers/Label.js";
|
|
13
|
-
const
|
|
13
|
+
const TextInput = ({ value, label, placeholder, iconLeft, iconRight, leftElement, rightElement, loading, fontSize, placeholderColor, disabled, readOnly, invalid, required, description, errorMessage, accepts, asTrigger, onChange, onInput, ref, ...props })=>{
|
|
14
14
|
const [inputValue, setInputValue] = useState('');
|
|
15
15
|
useEffect(()=>{
|
|
16
16
|
if (null != value && inputValue !== value) setInputValue(value);
|
|
@@ -70,5 +70,5 @@ const TextInput_TextInput = ({ value, label, placeholder, iconLeft, iconRight, l
|
|
|
70
70
|
const InputContainer = styled(TextField)(InputContainerStyles, ({ asTrigger })=>({
|
|
71
71
|
pointerEvents: asTrigger ? 'none' : void 0
|
|
72
72
|
}));
|
|
73
|
-
const
|
|
74
|
-
export {
|
|
73
|
+
const Inputs_TextInput = TextInput;
|
|
74
|
+
export { Inputs_TextInput as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import styled from "@emotion/styled";
|
|
2
|
-
const
|
|
2
|
+
const LabelWrapper = styled.div(({ readOnly })=>({
|
|
3
3
|
display: 'flex',
|
|
4
4
|
flexDirection: 'column',
|
|
5
5
|
boxSizing: 'border-box',
|
|
@@ -10,5 +10,5 @@ const LabelWrapper_LabelWrapper = styled.div(({ readOnly })=>({
|
|
|
10
10
|
caretColor: readOnly ? 'transparent' : void 0
|
|
11
11
|
}
|
|
12
12
|
}));
|
|
13
|
-
const
|
|
14
|
-
export {
|
|
13
|
+
const helpers_LabelWrapper = LabelWrapper;
|
|
14
|
+
export { helpers_LabelWrapper as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import styled from "@emotion/styled";
|
|
3
3
|
import { useLayoutEffect, useRef, useState } from "react";
|
|
4
|
-
const
|
|
4
|
+
const useDynamicWidth = ({ value, placeholder, fontSize, active = true })=>{
|
|
5
5
|
const textWidthRef = useRef(null);
|
|
6
6
|
const [inputWidth, setInputWidth] = useState(active ? 50 : void 0);
|
|
7
7
|
useLayoutEffect(()=>{
|
|
@@ -35,5 +35,5 @@ const HiddenWidthRef = styled.div(({ theme: { font }, fontSize })=>({
|
|
|
35
35
|
fontSize: fontSize || font.size.lg,
|
|
36
36
|
zIndex: -1
|
|
37
37
|
}));
|
|
38
|
-
const
|
|
39
|
-
export {
|
|
38
|
+
const helpers_useDynamicWidth = useDynamicWidth;
|
|
39
|
+
export { helpers_useDynamicWidth as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import styled from "@emotion/styled";
|
|
3
3
|
import { Text } from "react-aria-components";
|
|
4
|
-
const
|
|
4
|
+
const ItemHeaderBody = ({ header, body, inline, disabled, isGridItem })=>/*#__PURE__*/ jsxs(HeaderBodyContainer, {
|
|
5
5
|
inline: inline,
|
|
6
6
|
children: [
|
|
7
7
|
/*#__PURE__*/ jsx(ItemHeader, {
|
|
@@ -32,5 +32,5 @@ const ItemSubtext = styled(Text)(({ theme, disabled })=>({
|
|
|
32
32
|
color: disabled ? theme.scale4 : theme.scale6,
|
|
33
33
|
cursor: disabled ? 'inherit' : void 0
|
|
34
34
|
}));
|
|
35
|
-
const
|
|
36
|
-
export {
|
|
35
|
+
const ListHelpers_ItemHeaderBody = ItemHeaderBody;
|
|
36
|
+
export { ListHelpers_ItemHeaderBody as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ListBoxSection } from "react-aria-components";
|
|
3
3
|
import ListHeader from "./ListHeader.js";
|
|
4
|
-
const
|
|
4
|
+
const ListSection = ({ id, title, children })=>/*#__PURE__*/ jsxs(ListBoxSection, {
|
|
5
5
|
id: id,
|
|
6
6
|
children: [
|
|
7
7
|
title && /*#__PURE__*/ jsx(ListHeader, {
|
|
@@ -10,5 +10,5 @@ const ListSection_ListSection = ({ id, title, children })=>/*#__PURE__*/ jsxs(Li
|
|
|
10
10
|
children
|
|
11
11
|
]
|
|
12
12
|
});
|
|
13
|
-
const
|
|
14
|
-
export {
|
|
13
|
+
const ListHelpers_ListSection = ListSection;
|
|
14
|
+
export { ListHelpers_ListSection as default };
|
|
@@ -9,7 +9,7 @@ import isAcceptable from "../Inputs/helpers/isAcceptable.js";
|
|
|
9
9
|
import useDynamicWidth from "../Inputs/helpers/useDynamicWidth.js";
|
|
10
10
|
import ListOptions from "../ListBoxParts/ListOptions.js";
|
|
11
11
|
import MotionPopover from "../MotionPopover.js";
|
|
12
|
-
const
|
|
12
|
+
const SearchDropdown = ({ options, items, triggerRef, placeholder, placeholderColor, fontSize, position, fixedPosition, maxHeight, disabled, accepts, addItem, removeItem, afterShow, afterHide, onTextChange, onValidChange, ref, ...props })=>{
|
|
13
13
|
const [isOpen, setIsOpen] = useState(false);
|
|
14
14
|
const [filteredOptions, setFilteredOptions] = useState([]);
|
|
15
15
|
const [inputText, setInputText] = useState('');
|
|
@@ -151,5 +151,5 @@ const InputShakeContainer = styled.div(({ shake })=>({
|
|
|
151
151
|
animation: shake ? `${shakeAnimation} .5s linear` : void 0
|
|
152
152
|
}
|
|
153
153
|
}));
|
|
154
|
-
const
|
|
155
|
-
export {
|
|
154
|
+
const MultiSelect_SearchDropdown = SearchDropdown;
|
|
155
|
+
export { MultiSelect_SearchDropdown as default };
|
|
@@ -5,7 +5,7 @@ import { chunk, range } from "../utils/index.js";
|
|
|
5
5
|
import { marginProps } from "./helpers/styledProps.js";
|
|
6
6
|
import Icon from "./Icon/index.js";
|
|
7
7
|
const toNum = (val)=>val ? +val : 0;
|
|
8
|
-
const
|
|
8
|
+
const Pagination = ({ onPageNav, page, totalPages, maxVisibleNumbers, width, ...props })=>{
|
|
9
9
|
const [currentPage, setCurrentPage] = useState(toNum(page) || 1);
|
|
10
10
|
const [currentChunk, setCurrentChunk] = useState(0);
|
|
11
11
|
const numbers = range(1, totalPages);
|
|
@@ -117,5 +117,5 @@ const Page = styled(Control)(({ theme, selected })=>({
|
|
|
117
117
|
const Ellipses = styled.span(({ theme })=>({
|
|
118
118
|
color: theme.scale6
|
|
119
119
|
}));
|
|
120
|
-
const
|
|
121
|
-
export {
|
|
120
|
+
const components_Pagination = Pagination;
|
|
121
|
+
export { components_Pagination as default };
|
|
@@ -4,7 +4,7 @@ import { DialogTrigger } from "react-aria-components";
|
|
|
4
4
|
import { useControlledOpenState } from "../hooks/index.js";
|
|
5
5
|
import AriaButton from "./Inputs/helpers/AriaButton.js";
|
|
6
6
|
import MotionPopover from "./MotionPopover.js";
|
|
7
|
-
const
|
|
7
|
+
const Popover = ({ children, position = 'bottom', fixedPosition, trigger, isTriggerButton, triggerProps, offset = 4, afterShow, afterHide, open, onOpenChange, ...props })=>{
|
|
8
8
|
const [isOpen, handleOpenChange] = useControlledOpenState({
|
|
9
9
|
open,
|
|
10
10
|
onOpenChange,
|
|
@@ -36,5 +36,5 @@ const Popover_Popover = ({ children, position = 'bottom', fixedPosition, trigger
|
|
|
36
36
|
]
|
|
37
37
|
});
|
|
38
38
|
};
|
|
39
|
-
const
|
|
40
|
-
export {
|
|
39
|
+
const components_Popover = Popover;
|
|
40
|
+
export { components_Popover as default };
|
|
@@ -2,7 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import RadioButton from "../assets/icons/RadioButton.js";
|
|
3
3
|
import { ControlContainer, ControlInput, ControlLabel } from "./FormControl.js";
|
|
4
4
|
import Icon from "./Icon/index.js";
|
|
5
|
-
const
|
|
5
|
+
const Radio = ({ id, label, labelPosition, checked, disabled, margin, marginTop, marginBottom, marginRight, marginLeft, className, readOnly, iconColor, ...props })=>{
|
|
6
6
|
const labelRight = 'right' === labelPosition;
|
|
7
7
|
const marginProps = {
|
|
8
8
|
margin,
|
|
@@ -41,5 +41,5 @@ const Radio_Radio = ({ id, label, labelPosition, checked, disabled, margin, marg
|
|
|
41
41
|
]
|
|
42
42
|
});
|
|
43
43
|
};
|
|
44
|
-
const
|
|
45
|
-
export {
|
|
44
|
+
const components_Radio = Radio;
|
|
45
|
+
export { components_Radio as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import styled from "@emotion/styled";
|
|
3
3
|
import { marginProps } from "./helpers/styledProps.js";
|
|
4
|
-
const
|
|
4
|
+
const Slider = ({ value, max = 100, step = 1, width, height, disabled, onChange, ...props })=>{
|
|
5
5
|
const handleControlGrab = (event)=>{
|
|
6
6
|
const { value: progressValue } = event.target;
|
|
7
7
|
if (onChange) onChange(+progressValue);
|
|
@@ -46,5 +46,5 @@ const ProgressSlider = styled.input(({ theme, percent, width, height, disabled,
|
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
}, marginProps);
|
|
49
|
-
const
|
|
50
|
-
export {
|
|
49
|
+
const components_Slider = Slider;
|
|
50
|
+
export { components_Slider as default };
|
|
@@ -2,7 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import styled from "@emotion/styled";
|
|
3
3
|
import { TableBody, TableLoadMoreItem } from "react-aria-components";
|
|
4
4
|
import Spinner from "../Spinner.js";
|
|
5
|
-
const
|
|
5
|
+
const Body = ({ children, emptyFallback, fetching, loading, scrollOffset, onLoadMore, ...rest })=>{
|
|
6
6
|
const emptyContent = loading ? /*#__PURE__*/ jsx(SpinnerContainer, {
|
|
7
7
|
children: /*#__PURE__*/ jsx(Spinner, {})
|
|
8
8
|
}) : emptyFallback;
|
|
@@ -45,5 +45,5 @@ const SpinnerContainer = styled.div(({ theme })=>({
|
|
|
45
45
|
color: theme.scale6,
|
|
46
46
|
paddingTop: 4
|
|
47
47
|
}));
|
|
48
|
-
const
|
|
49
|
-
export {
|
|
48
|
+
const Table_Body = Body;
|
|
49
|
+
export { Table_Body as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useTheme } from "@emotion/react";
|
|
3
|
-
const
|
|
3
|
+
const ColumnSort = ({ sortDirection })=>{
|
|
4
4
|
const { accent, scale4 } = useTheme();
|
|
5
5
|
const topColor = 'asc' === sortDirection ? accent : scale4;
|
|
6
6
|
const bottomColor = 'desc' === sortDirection ? accent : scale4;
|
|
@@ -22,5 +22,5 @@ const ColumnSort_ColumnSort = ({ sortDirection })=>{
|
|
|
22
22
|
]
|
|
23
23
|
});
|
|
24
24
|
};
|
|
25
|
-
const
|
|
26
|
-
export {
|
|
25
|
+
const Table_ColumnSort = ColumnSort;
|
|
26
|
+
export { Table_ColumnSort as default };
|
|
@@ -6,7 +6,7 @@ import mergePadding from "../helpers/mergePadding.js";
|
|
|
6
6
|
import Check from "./Check.js";
|
|
7
7
|
import Column from "./Column.js";
|
|
8
8
|
import context from "./context.js";
|
|
9
|
-
const
|
|
9
|
+
const Header = ({ children, backgroundColor, padding, paddingTop, paddingRight, paddingBottom, paddingLeft, ...rest })=>{
|
|
10
10
|
const { setHeaderPadding, selectionMode } = useContext(context);
|
|
11
11
|
useEffect(()=>{
|
|
12
12
|
const values = padding ?? paddingTop ?? paddingRight ?? paddingBottom ?? paddingLeft;
|
|
@@ -60,5 +60,5 @@ const TableHead = styled(TableHeader)(({ backgroundColor })=>({
|
|
|
60
60
|
borderLeft: '2px solid transparent'
|
|
61
61
|
}
|
|
62
62
|
}));
|
|
63
|
-
const
|
|
64
|
-
export {
|
|
63
|
+
const Table_Header = Header;
|
|
64
|
+
export { Table_Header as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styled from "@emotion/styled";
|
|
2
2
|
import { ColumnResizer } from "react-aria-components";
|
|
3
|
-
const
|
|
3
|
+
const Resizer = styled(ColumnResizer)(({ theme })=>({
|
|
4
4
|
width: 9,
|
|
5
5
|
height: 18,
|
|
6
6
|
backgroundColor: theme.scale4,
|
|
@@ -21,5 +21,5 @@ const Resizer_Resizer = styled(ColumnResizer)(({ theme })=>({
|
|
|
21
21
|
backgroundColor: theme.accent
|
|
22
22
|
}
|
|
23
23
|
}));
|
|
24
|
-
const
|
|
25
|
-
export {
|
|
24
|
+
const Table_Resizer = Resizer;
|
|
25
|
+
export { Table_Resizer as default };
|
|
@@ -12,9 +12,9 @@ const baseStyles = ({ direction, justify, align = 'center', gap = 8 })=>({
|
|
|
12
12
|
height: '100%',
|
|
13
13
|
gap
|
|
14
14
|
});
|
|
15
|
-
const
|
|
15
|
+
const contentStyles = [
|
|
16
16
|
baseStyles,
|
|
17
17
|
paddingProps
|
|
18
18
|
];
|
|
19
|
-
const
|
|
20
|
-
export {
|
|
19
|
+
const Table_contentStyles = contentStyles;
|
|
20
|
+
export { Table_contentStyles as default };
|
|
@@ -6,7 +6,7 @@ import { ToggleButton } from "react-aria-components";
|
|
|
6
6
|
import getIcon from "../helpers/getIcon.js";
|
|
7
7
|
import { marginProps, paddingProps } from "../helpers/styledProps.js";
|
|
8
8
|
import { ToggleContext } from "./context.js";
|
|
9
|
-
const
|
|
9
|
+
const ToggleButton_ToggleButton = ({ children, disabled, size, positive, negative, caution, secondary, iconLeft, iconRight, borderRadius, ...props })=>{
|
|
10
10
|
const { type, joined, size: toggleSize, height } = useContext(ToggleContext);
|
|
11
11
|
const { button } = useTheme();
|
|
12
12
|
const { iconSize } = button[size || toggleSize];
|
|
@@ -43,15 +43,15 @@ const Button = styled(ToggleButton)(({ theme, secondary, negative, positive, cau
|
|
|
43
43
|
if (positive) buttonType = 'positive';
|
|
44
44
|
if (caution) buttonType = 'caution';
|
|
45
45
|
if (isDisabled) buttonType = 'disabled';
|
|
46
|
-
const sizeStyle = theme.
|
|
47
|
-
const style = theme.
|
|
48
|
-
const background = style.
|
|
49
|
-
const backgroundHover = style.
|
|
50
|
-
const backgroundActive = style.
|
|
46
|
+
const sizeStyle = theme.toggleButton[size || 'small'];
|
|
47
|
+
const style = theme.toggleButton[buttonType];
|
|
48
|
+
const background = style.background.default;
|
|
49
|
+
const backgroundHover = style.background.hover;
|
|
50
|
+
const backgroundActive = style.background.active;
|
|
51
51
|
const borderColor = style.border.default;
|
|
52
|
-
const color = style.
|
|
53
|
-
const colorHover = style.
|
|
54
|
-
const colorActive = style.
|
|
52
|
+
const color = style.color.default;
|
|
53
|
+
const colorHover = style.color.hover;
|
|
54
|
+
const colorActive = style.color.active;
|
|
55
55
|
const buttonHeight = height || sizeStyle.height;
|
|
56
56
|
return {
|
|
57
57
|
display: 'inline-flex',
|
|
@@ -100,5 +100,5 @@ const Button = styled(ToggleButton)(({ theme, secondary, negative, positive, cau
|
|
|
100
100
|
} : {}
|
|
101
101
|
};
|
|
102
102
|
}, marginProps, paddingProps);
|
|
103
|
-
const
|
|
104
|
-
export {
|
|
103
|
+
const components_ToggleButton_ToggleButton = ToggleButton_ToggleButton;
|
|
104
|
+
export { components_ToggleButton_ToggleButton as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Button } from "react-aria-components";
|
|
3
|
-
const
|
|
3
|
+
const UnstyledButton = ({ children, ...props })=>/*#__PURE__*/ jsx(Button, {
|
|
4
4
|
...props,
|
|
5
5
|
children: children
|
|
6
6
|
});
|
|
7
|
-
const
|
|
8
|
-
export {
|
|
7
|
+
const components_UnstyledButton = UnstyledButton;
|
|
8
|
+
export { components_UnstyledButton as default };
|
|
@@ -3,7 +3,7 @@ const parseValue = (value)=>{
|
|
|
3
3
|
if ('string' == typeof value) return Number.parseInt(value.replace('px', ''), 10);
|
|
4
4
|
return 0;
|
|
5
5
|
};
|
|
6
|
-
const
|
|
6
|
+
const mergePadding = (paddingObj)=>{
|
|
7
7
|
const paddingValues = {
|
|
8
8
|
top: 0,
|
|
9
9
|
right: 0,
|
|
@@ -43,5 +43,5 @@ const mergePadding_mergePadding = (paddingObj)=>{
|
|
|
43
43
|
if (void 0 !== paddingLeft) paddingValues.left = parseValue(paddingLeft);
|
|
44
44
|
return paddingValues;
|
|
45
45
|
};
|
|
46
|
-
const
|
|
47
|
-
export {
|
|
46
|
+
const helpers_mergePadding = mergePadding;
|
|
47
|
+
export { helpers_mergePadding as default };
|
|
@@ -12,7 +12,7 @@ const loadFonts = (fonts)=>{
|
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
14
|
};
|
|
15
|
-
const
|
|
15
|
+
const ResetStyles = ({ families, fontFamily })=>{
|
|
16
16
|
useEffect(()=>{
|
|
17
17
|
loadFonts(families);
|
|
18
18
|
}, [
|
|
@@ -29,5 +29,5 @@ const ResetStyles_ResetStyles = ({ families, fontFamily })=>{
|
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
};
|
|
32
|
-
const
|
|
33
|
-
export {
|
|
32
|
+
const global_styles_ResetStyles = ResetStyles;
|
|
33
|
+
export { global_styles_ResetStyles as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect, useState } from "react";
|
|
2
|
-
const
|
|
2
|
+
const useControlledOpenState = ({ open, onOpenChange, afterShow, afterHide })=>{
|
|
3
3
|
const [isOpen, setIsOpen] = useState(false);
|
|
4
4
|
useEffect(()=>{
|
|
5
5
|
if (void 0 !== open && open !== isOpen) setIsOpen(open);
|
|
@@ -18,5 +18,5 @@ const useControlledOpenState_useControlledOpenState = ({ open, onOpenChange, aft
|
|
|
18
18
|
handleOpenChange
|
|
19
19
|
];
|
|
20
20
|
};
|
|
21
|
-
const
|
|
22
|
-
export {
|
|
21
|
+
const hooks_useControlledOpenState = useControlledOpenState;
|
|
22
|
+
export { hooks_useControlledOpenState as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useRef } from "react";
|
|
2
2
|
import useEventListener from "./useEventListener.js";
|
|
3
|
-
const
|
|
3
|
+
const useOnClickOutside = (onClickOutside, condition, exclusions)=>{
|
|
4
4
|
const ref = useRef(null);
|
|
5
5
|
const handleOutsideClick = (event)=>{
|
|
6
6
|
if (ref?.current && null !== event) {
|
|
@@ -17,5 +17,5 @@ const useOnClickOutside_useOnClickOutside = (onClickOutside, condition, exclusio
|
|
|
17
17
|
useEventListener(document, 'touchstart', handleOutsideClick, condition);
|
|
18
18
|
return ref;
|
|
19
19
|
};
|
|
20
|
-
const
|
|
21
|
-
export {
|
|
20
|
+
const hooks_useOnClickOutside = useOnClickOutside;
|
|
21
|
+
export { hooks_useOnClickOutside as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect, useState } from "react";
|
|
2
|
-
const
|
|
2
|
+
const useWindowSize = ()=>{
|
|
3
3
|
const initialState = {
|
|
4
4
|
width: null,
|
|
5
5
|
height: null
|
|
@@ -21,5 +21,5 @@ const useWindowSize_useWindowSize = ()=>{
|
|
|
21
21
|
}, []);
|
|
22
22
|
return windowSize;
|
|
23
23
|
};
|
|
24
|
-
const
|
|
25
|
-
export {
|
|
24
|
+
const hooks_useWindowSize = useWindowSize;
|
|
25
|
+
export { hooks_useWindowSize as default };
|
package/build/tailwind/theme.css
CHANGED
|
@@ -24,24 +24,32 @@
|
|
|
24
24
|
--color-errorTint0: rgba(255,96,104,0.05);
|
|
25
25
|
--color-errorTint1: rgba(255,96,104,0.1);
|
|
26
26
|
--color-errorTint2: rgba(255,96,104,0.2);
|
|
27
|
+
--color-errorTint3: rgba(255,96,104,0.3);
|
|
28
|
+
--color-errorTint4: rgba(255,96,104,0.4);
|
|
27
29
|
--color-warning: #FF9900;
|
|
28
30
|
--color-warningShade1: #E68A00;
|
|
29
31
|
--color-warningShade2: #CC7A00;
|
|
30
32
|
--color-warningTint0: rgba(255,153,0,0.05);
|
|
31
33
|
--color-warningTint1: rgba(255,153,0,0.1);
|
|
32
34
|
--color-warningTint2: rgba(255,153,0,0.2);
|
|
35
|
+
--color-warningTint3: rgba(255,153,0,0.3);
|
|
36
|
+
--color-warningTint4: rgba(255,153,0,0.4);
|
|
33
37
|
--color-alert: #F0BB00;
|
|
34
38
|
--color-alertShade1: #E4B200;
|
|
35
39
|
--color-alertShade2: #C09600;
|
|
36
40
|
--color-alertTint0: rgba(240,187,0,0.05);
|
|
37
41
|
--color-alertTint1: rgba(240,187,0,0.1);
|
|
38
42
|
--color-alertTint2: rgba(240,187,0,0.2);
|
|
43
|
+
--color-alertTint3: rgba(240,187,0,0.3);
|
|
44
|
+
--color-alertTint4: rgba(240,187,0,0.4);
|
|
39
45
|
--color-success: #00C242;
|
|
40
46
|
--color-successShade1: #00AF3B;
|
|
41
47
|
--color-successShade2: #009B35;
|
|
42
48
|
--color-successTint0: rgba(0,194,66,0.05);
|
|
43
49
|
--color-successTint1: rgba(0,194,66,0.1);
|
|
44
50
|
--color-successTint2: rgba(0,194,66,0.2);
|
|
51
|
+
--color-successTint3: rgba(0,194,66,0.3);
|
|
52
|
+
--color-successTint4: rgba(0,194,66,0.4);
|
|
45
53
|
--color-grayscale0: rgba(0,29,50,0.05);
|
|
46
54
|
--color-grayscale1: rgba(0,29,50,0.1);
|
|
47
55
|
--color-grayscale2: rgba(0,29,50,0.2);
|
|
@@ -56,6 +56,23 @@ export type ButtonState = {
|
|
|
56
56
|
};
|
|
57
57
|
divider: string;
|
|
58
58
|
};
|
|
59
|
+
export type ToggleButtonState = {
|
|
60
|
+
color: {
|
|
61
|
+
default: string;
|
|
62
|
+
hover: string;
|
|
63
|
+
active: string;
|
|
64
|
+
};
|
|
65
|
+
background: {
|
|
66
|
+
default: string;
|
|
67
|
+
hover: string;
|
|
68
|
+
active: string;
|
|
69
|
+
};
|
|
70
|
+
border: {
|
|
71
|
+
default: string;
|
|
72
|
+
hover: string;
|
|
73
|
+
active: string;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
59
76
|
export interface ITheme {
|
|
60
77
|
name: 'light' | 'dark';
|
|
61
78
|
accent: string;
|
|
@@ -105,6 +122,18 @@ export interface ITheme {
|
|
|
105
122
|
default: string;
|
|
106
123
|
};
|
|
107
124
|
};
|
|
125
|
+
toggleButton: {
|
|
126
|
+
tiny: ButtonSize;
|
|
127
|
+
small: ButtonSize;
|
|
128
|
+
medium: ButtonSize;
|
|
129
|
+
large: ButtonSize;
|
|
130
|
+
primary: ToggleButtonState;
|
|
131
|
+
secondary: ToggleButtonState;
|
|
132
|
+
negative: ToggleButtonState;
|
|
133
|
+
positive: ToggleButtonState;
|
|
134
|
+
caution: ToggleButtonState;
|
|
135
|
+
disabled: ToggleButtonState;
|
|
136
|
+
};
|
|
108
137
|
calendar: {
|
|
109
138
|
background: {
|
|
110
139
|
container: string;
|
|
@@ -25,24 +25,32 @@ declare const _default: {
|
|
|
25
25
|
errorTint0: string;
|
|
26
26
|
errorTint1: string;
|
|
27
27
|
errorTint2: string;
|
|
28
|
+
errorTint3: string;
|
|
29
|
+
errorTint4: string;
|
|
28
30
|
warning: string;
|
|
29
31
|
warningShade1: string;
|
|
30
32
|
warningShade2: string;
|
|
31
33
|
warningTint0: string;
|
|
32
34
|
warningTint1: string;
|
|
33
35
|
warningTint2: string;
|
|
36
|
+
warningTint3: string;
|
|
37
|
+
warningTint4: string;
|
|
34
38
|
alert: string;
|
|
35
39
|
alertShade1: string;
|
|
36
40
|
alertShade2: string;
|
|
37
41
|
alertTint0: string;
|
|
38
42
|
alertTint1: string;
|
|
39
43
|
alertTint2: string;
|
|
44
|
+
alertTint3: string;
|
|
45
|
+
alertTint4: string;
|
|
40
46
|
success: string;
|
|
41
47
|
successShade1: string;
|
|
42
48
|
successShade2: string;
|
|
43
49
|
successTint0: string;
|
|
44
50
|
successTint1: string;
|
|
45
51
|
successTint2: string;
|
|
52
|
+
successTint3: string;
|
|
53
|
+
successTint4: string;
|
|
46
54
|
grayscale0: string;
|
|
47
55
|
grayscale1: string;
|
|
48
56
|
grayscale2: string;
|
|
@@ -24,24 +24,32 @@ declare const colors: {
|
|
|
24
24
|
errorTint0: string;
|
|
25
25
|
errorTint1: string;
|
|
26
26
|
errorTint2: string;
|
|
27
|
+
errorTint3: string;
|
|
28
|
+
errorTint4: string;
|
|
27
29
|
warning: string;
|
|
28
30
|
warningShade1: string;
|
|
29
31
|
warningShade2: string;
|
|
30
32
|
warningTint0: string;
|
|
31
33
|
warningTint1: string;
|
|
32
34
|
warningTint2: string;
|
|
35
|
+
warningTint3: string;
|
|
36
|
+
warningTint4: string;
|
|
33
37
|
alert: string;
|
|
34
38
|
alertShade1: string;
|
|
35
39
|
alertShade2: string;
|
|
36
40
|
alertTint0: string;
|
|
37
41
|
alertTint1: string;
|
|
38
42
|
alertTint2: string;
|
|
43
|
+
alertTint3: string;
|
|
44
|
+
alertTint4: string;
|
|
39
45
|
success: string;
|
|
40
46
|
successShade1: string;
|
|
41
47
|
successShade2: string;
|
|
42
48
|
successTint0: string;
|
|
43
49
|
successTint1: string;
|
|
44
50
|
successTint2: string;
|
|
51
|
+
successTint3: string;
|
|
52
|
+
successTint4: string;
|
|
45
53
|
grayscale0: string;
|
|
46
54
|
grayscale1: string;
|
|
47
55
|
grayscale2: string;
|
|
@@ -117,6 +125,10 @@ export interface IColors {
|
|
|
117
125
|
errorTint1: string;
|
|
118
126
|
/** 20% of #FF6068 */
|
|
119
127
|
errorTint2: string;
|
|
128
|
+
/** 30% of #FF6068 */
|
|
129
|
+
errorTint3: string;
|
|
130
|
+
/** 40% of #FF6068 */
|
|
131
|
+
errorTint4: string;
|
|
120
132
|
/** #FF9900 */
|
|
121
133
|
warning: string;
|
|
122
134
|
/** #E68A00 */
|
|
@@ -129,6 +141,10 @@ export interface IColors {
|
|
|
129
141
|
warningTint1: string;
|
|
130
142
|
/** 20% of #FF9900 */
|
|
131
143
|
warningTint2: string;
|
|
144
|
+
/** 30% of #FF9900 */
|
|
145
|
+
warningTint3: string;
|
|
146
|
+
/** 40% of #FF9900 */
|
|
147
|
+
warningTint4: string;
|
|
132
148
|
/** #F0BB00 */
|
|
133
149
|
alert: string;
|
|
134
150
|
/** #E4B200 */
|
|
@@ -141,6 +157,10 @@ export interface IColors {
|
|
|
141
157
|
alertTint1: string;
|
|
142
158
|
/** 20% of #F0BB00 */
|
|
143
159
|
alertTint2: string;
|
|
160
|
+
/** 30% of #F0BB00 */
|
|
161
|
+
alertTint3: string;
|
|
162
|
+
/** 40% of #F0BB00 */
|
|
163
|
+
alertTint4: string;
|
|
144
164
|
/** #00C242 */
|
|
145
165
|
success: string;
|
|
146
166
|
/** #00AF3B */
|
|
@@ -149,10 +169,13 @@ export interface IColors {
|
|
|
149
169
|
successShade2: string;
|
|
150
170
|
/** 5% of #00C242 */
|
|
151
171
|
successTint0: string;
|
|
152
|
-
/** 10% of #00C242 */
|
|
153
|
-
successTint1: string;
|
|
172
|
+
/** 10% of #00C242 */ successTint1: string;
|
|
154
173
|
/** 20% of #00C242 */
|
|
155
174
|
successTint2: string;
|
|
175
|
+
/** 30% of #00C242 */
|
|
176
|
+
successTint3: string;
|
|
177
|
+
/** 40% of #00C242 */
|
|
178
|
+
successTint4: string;
|
|
156
179
|
/** 5% of #001D32 */
|
|
157
180
|
grayscale0: string;
|
|
158
181
|
/** 10% of #001D32 */
|
|
@@ -32,24 +32,32 @@ const colors = {
|
|
|
32
32
|
errorTint0: transparentize(0.95, error),
|
|
33
33
|
errorTint1: transparentize(0.9, error),
|
|
34
34
|
errorTint2: transparentize(0.8, error),
|
|
35
|
+
errorTint3: transparentize(0.7, error),
|
|
36
|
+
errorTint4: transparentize(0.6, error),
|
|
35
37
|
warning,
|
|
36
38
|
warningShade1: '#E68A00',
|
|
37
39
|
warningShade2: '#CC7A00',
|
|
38
40
|
warningTint0: transparentize(0.95, warning),
|
|
39
41
|
warningTint1: transparentize(0.9, warning),
|
|
40
42
|
warningTint2: transparentize(0.8, warning),
|
|
43
|
+
warningTint3: transparentize(0.7, warning),
|
|
44
|
+
warningTint4: transparentize(0.6, warning),
|
|
41
45
|
alert: alertColor,
|
|
42
46
|
alertShade1: '#E4B200',
|
|
43
47
|
alertShade2: '#C09600',
|
|
44
48
|
alertTint0: transparentize(0.95, alertColor),
|
|
45
49
|
alertTint1: transparentize(0.9, alertColor),
|
|
46
50
|
alertTint2: transparentize(0.8, alertColor),
|
|
51
|
+
alertTint3: transparentize(0.7, alertColor),
|
|
52
|
+
alertTint4: transparentize(0.6, alertColor),
|
|
47
53
|
success,
|
|
48
54
|
successShade1: '#00AF3B',
|
|
49
55
|
successShade2: '#009B35',
|
|
50
56
|
successTint0: transparentize(0.95, success),
|
|
51
57
|
successTint1: transparentize(0.9, success),
|
|
52
58
|
successTint2: transparentize(0.8, success),
|
|
59
|
+
successTint3: transparentize(0.7, success),
|
|
60
|
+
successTint4: transparentize(0.6, success),
|
|
53
61
|
grayscale0: transparentize(0.95, grayVal),
|
|
54
62
|
grayscale1: transparentize(0.9, grayVal),
|
|
55
63
|
grayscale2: transparentize(0.8, grayVal),
|