@wavv/ui 2.2.3 → 2.2.5
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/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/Accordion.d.ts +24 -3
- package/build/components/Accordion/Accordion.js +2 -1
- package/build/components/Accordion/Header.js +4 -4
- package/build/components/Accordion/Item.d.ts +12 -1
- package/build/components/Accordion/Item.js +12 -1
- package/build/components/Accordion/Panel.d.ts +3 -0
- package/build/components/Audio.js +3 -3
- package/build/components/Button/Button.d.ts +1 -1
- package/build/components/Button/Group.d.ts +1 -1
- package/build/components/Calendar.d.ts +4 -1
- package/build/components/CalendarParts/CalendarHeader.js +3 -3
- package/build/components/CalendarParts/useMinMax.js +3 -3
- package/build/components/Checkbox.d.ts +4 -3
- package/build/components/Checkbox.js +12 -20
- package/build/components/Code/Code.js +3 -3
- package/build/components/Code/Endpoint.js +3 -3
- package/build/components/ComboBox.d.ts +2 -2
- 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/DropdownMenu.d.ts +5 -5
- 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.d.ts +4 -2
- package/build/components/Form.js +9 -9
- package/build/components/Grid.js +3 -3
- package/build/components/Icon/customIcons.js +3 -3
- package/build/components/ImageViewer.js +3 -3
- package/build/components/InlineCode.js +3 -3
- package/build/components/Inputs/DatePicker.d.ts +5 -1
- package/build/components/Inputs/DateRangePicker.d.ts +5 -1
- package/build/components/Inputs/InlineInput.js +3 -3
- package/build/components/Inputs/NumberInput.d.ts +2 -2
- package/build/components/Inputs/PhoneInput.d.ts +2 -2
- package/build/components/Inputs/PhoneInput.js +3 -3
- package/build/components/Inputs/SearchInput.d.ts +2 -2
- package/build/components/Inputs/TextArea.d.ts +2 -4
- package/build/components/Inputs/TextInput.d.ts +2 -4
- package/build/components/Inputs/TextInput.js +3 -3
- package/build/components/Inputs/TimeInput.d.ts +2 -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/Modal.d.ts +35 -21
- package/build/components/Modal.js +15 -3
- package/build/components/MultiSelect/SearchDropdown.d.ts +2 -2
- package/build/components/MultiSelect/SearchDropdown.js +3 -3
- package/build/components/Pagination.js +3 -3
- package/build/components/Popover.d.ts +13 -3
- package/build/components/Popover.js +3 -3
- package/build/components/Radio.js +3 -3
- package/build/components/RangeCalendar.d.ts +4 -1
- package/build/components/Select.d.ts +5 -5
- package/build/components/Slider.js +3 -3
- package/build/components/Table/Body.d.ts +5 -3
- package/build/components/Table/Body.js +3 -3
- package/build/components/Table/Cell.d.ts +5 -2
- package/build/components/Table/Column.d.ts +9 -2
- package/build/components/Table/ColumnSort.js +3 -3
- package/build/components/Table/Header.js +5 -5
- package/build/components/Table/Resizer.js +3 -3
- package/build/components/Table/Row.js +2 -2
- package/build/components/Table/Table.d.ts +34 -7
- package/build/components/Table/contentStyles.js +3 -3
- package/build/components/Tabs.d.ts +24 -4
- package/build/components/ToggleButton/ToggleButton.d.ts +4 -0
- package/build/components/ToggleButton/ToggleButton.js +3 -3
- package/build/components/ToggleButton/ToggleButtonGroup.d.ts +9 -1
- package/build/components/Tooltip.d.ts +6 -3
- package/build/components/Tree/Tree.d.ts +25 -3
- package/build/components/Tree/TreeItem.d.ts +11 -2
- package/build/components/Tree/TreeItem.js +2 -1
- package/build/components/UnstyledButton.js +3 -3
- package/build/components/helpers/getIcon.d.ts +1 -1
- package/build/components/helpers/mergePadding.js +3 -3
- package/build/components/typeDefs/inputTypes.d.ts +1 -0
- package/build/components/typeDefs/reactAriaTypes.d.ts +126 -0
- package/build/components/typeDefs/reactAriaTypes.js +0 -0
- package/build/components/typeDefs/selectionTypes.d.ts +1 -0
- 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/theme/core/dark/dark.js +3 -3
- package/build/theme/core/light/light.js +3 -3
- package/build/theme/eighties/dark/dark.js +3 -3
- package/build/theme/eighties/light/light.js +3 -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
- package/build/components/Table/Check.d.ts +0 -3
- package/build/components/Table/Check.js +0 -35
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
function
|
|
2
|
+
function Checkbox(props) {
|
|
3
3
|
return /*#__PURE__*/ jsx("svg", {
|
|
4
4
|
viewBox: "0 0 24 24",
|
|
5
5
|
fill: "none",
|
|
@@ -11,5 +11,5 @@ function Checkbox_Checkbox(props) {
|
|
|
11
11
|
})
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
|
-
const
|
|
15
|
-
export {
|
|
14
|
+
const icons_Checkbox = Checkbox;
|
|
15
|
+
export { icons_Checkbox as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
const
|
|
2
|
+
const Exclamation = (props)=>/*#__PURE__*/ jsxs("svg", {
|
|
3
3
|
viewBox: "0 0 24 24",
|
|
4
4
|
fill: "none",
|
|
5
5
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -21,5 +21,5 @@ const Exclamation_Exclamation = (props)=>/*#__PURE__*/ jsxs("svg", {
|
|
|
21
21
|
})
|
|
22
22
|
]
|
|
23
23
|
});
|
|
24
|
-
const
|
|
25
|
-
export {
|
|
24
|
+
const icons_Exclamation = Exclamation;
|
|
25
|
+
export { icons_Exclamation as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
const
|
|
2
|
+
const PhoneEnd = (props)=>/*#__PURE__*/ jsxs("svg", {
|
|
3
3
|
viewBox: "0 0 24 24",
|
|
4
4
|
fill: "none",
|
|
5
5
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -24,5 +24,5 @@ const PhoneEnd_PhoneEnd = (props)=>/*#__PURE__*/ jsxs("svg", {
|
|
|
24
24
|
})
|
|
25
25
|
]
|
|
26
26
|
});
|
|
27
|
-
const
|
|
28
|
-
export {
|
|
27
|
+
const icons_PhoneEnd = PhoneEnd;
|
|
28
|
+
export { icons_PhoneEnd as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
const
|
|
2
|
+
const PhoneForward = (props)=>/*#__PURE__*/ jsxs("svg", {
|
|
3
3
|
viewBox: "0 0 24 24",
|
|
4
4
|
fill: "none",
|
|
5
5
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -18,5 +18,5 @@ const PhoneForward_PhoneForward = (props)=>/*#__PURE__*/ jsxs("svg", {
|
|
|
18
18
|
})
|
|
19
19
|
]
|
|
20
20
|
});
|
|
21
|
-
const
|
|
22
|
-
export {
|
|
21
|
+
const icons_PhoneForward = PhoneForward;
|
|
22
|
+
export { icons_PhoneForward as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
const
|
|
2
|
+
const PhoneHold = (props)=>/*#__PURE__*/ jsxs("svg", {
|
|
3
3
|
viewBox: "0 0 24 24",
|
|
4
4
|
fill: "none",
|
|
5
5
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -18,5 +18,5 @@ const PhoneHold_PhoneHold = (props)=>/*#__PURE__*/ jsxs("svg", {
|
|
|
18
18
|
})
|
|
19
19
|
]
|
|
20
20
|
});
|
|
21
|
-
const
|
|
22
|
-
export {
|
|
21
|
+
const icons_PhoneHold = PhoneHold;
|
|
22
|
+
export { icons_PhoneHold as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
function
|
|
2
|
+
function Record(props) {
|
|
3
3
|
return /*#__PURE__*/ jsx("svg", {
|
|
4
4
|
viewBox: "0 0 24 24",
|
|
5
5
|
fill: "none",
|
|
@@ -14,5 +14,5 @@ function Record_Record(props) {
|
|
|
14
14
|
})
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
|
-
const
|
|
18
|
-
export {
|
|
17
|
+
const icons_Record = Record;
|
|
18
|
+
export { icons_Record as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
const
|
|
2
|
+
const ShieldWavv = (props)=>/*#__PURE__*/ jsxs("svg", {
|
|
3
3
|
viewBox: "0 0 24 24",
|
|
4
4
|
fill: "none",
|
|
5
5
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -26,5 +26,5 @@ const ShieldWavv_ShieldWavv = (props)=>/*#__PURE__*/ jsxs("svg", {
|
|
|
26
26
|
})
|
|
27
27
|
]
|
|
28
28
|
});
|
|
29
|
-
const
|
|
30
|
-
export {
|
|
29
|
+
const icons_ShieldWavv = ShieldWavv;
|
|
30
|
+
export { icons_ShieldWavv as default };
|
|
@@ -1,10 +1,28 @@
|
|
|
1
1
|
import { type DisclosureGroupProps } from 'react-aria-components';
|
|
2
2
|
import type { Margin, MaxHeight, Width } from '../types';
|
|
3
|
-
type Props =
|
|
3
|
+
type Props = {
|
|
4
|
+
allowsMultipleExpanded?: DisclosureGroupProps['allowsMultipleExpanded'];
|
|
5
|
+
expandedKeys?: DisclosureGroupProps['expandedKeys'];
|
|
6
|
+
defaultExpandedKeys?: DisclosureGroupProps['defaultExpandedKeys'];
|
|
7
|
+
onExpandedChange?: DisclosureGroupProps['onExpandedChange'];
|
|
8
|
+
/** Disables all items in the accordion */
|
|
9
|
+
disabled?: DisclosureGroupProps['isDisabled'];
|
|
10
|
+
className?: DisclosureGroupProps['className'];
|
|
11
|
+
style?: DisclosureGroupProps['style'];
|
|
12
|
+
} & Width & MaxHeight & Margin & Omit<DisclosureGroupProps, 'isDisabled'>;
|
|
4
13
|
declare const Accordion: {
|
|
5
|
-
({ children, maxHeight, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
({ children, maxHeight, disabled, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
6
15
|
Item: {
|
|
7
|
-
({ children, ...props }:
|
|
16
|
+
({ children, disabled, ...props }: {
|
|
17
|
+
id?: import("react-aria-components").DisclosureProps["id"];
|
|
18
|
+
isExpanded?: import("react-aria-components").DisclosureProps["isExpanded"];
|
|
19
|
+
defaultExpanded?: import("react-aria-components").DisclosureProps["defaultExpanded"];
|
|
20
|
+
onExpandedChange?: import("react-aria-components").DisclosureProps["onExpandedChange"];
|
|
21
|
+
disabled?: import("react-aria-components").DisclosureProps["isDisabled"];
|
|
22
|
+
children?: import("react-aria-components").DisclosureProps["children"];
|
|
23
|
+
className?: import("react-aria-components").DisclosureProps["className"];
|
|
24
|
+
style?: import("react-aria-components").DisclosureProps["style"];
|
|
25
|
+
} & Omit<import("react-aria-components").DisclosureProps, "isDisabled">): import("react/jsx-runtime").JSX.Element;
|
|
8
26
|
displayName: string;
|
|
9
27
|
};
|
|
10
28
|
Header: {
|
|
@@ -404,6 +422,9 @@ declare const Accordion: {
|
|
|
404
422
|
};
|
|
405
423
|
Panel: {
|
|
406
424
|
({ children, maxHeight, ...props }: {
|
|
425
|
+
children: import("react-aria-components").DisclosurePanelProps["children"];
|
|
426
|
+
className?: import("react-aria-components").DisclosurePanelProps["className"];
|
|
427
|
+
style?: import("react-aria-components").DisclosurePanelProps["style"];
|
|
407
428
|
background?: string;
|
|
408
429
|
} & MaxHeight & import("react-aria-components").DisclosurePanelProps): import("react/jsx-runtime").JSX.Element;
|
|
409
430
|
displayName: string;
|
|
@@ -5,10 +5,11 @@ import { marginProps, maxWidthHeightProps, widthHeightProps } from "../helpers/s
|
|
|
5
5
|
import Header from "./Header.js";
|
|
6
6
|
import Item from "./Item.js";
|
|
7
7
|
import Panel from "./Panel.js";
|
|
8
|
-
const Accordion = ({ children, maxHeight, ...props })=>/*#__PURE__*/ jsx(Container, {
|
|
8
|
+
const Accordion = ({ children, maxHeight, disabled, ...props })=>/*#__PURE__*/ jsx(Container, {
|
|
9
9
|
style: {
|
|
10
10
|
maxHeight
|
|
11
11
|
},
|
|
12
|
+
isDisabled: disabled,
|
|
12
13
|
...props,
|
|
13
14
|
children: children
|
|
14
15
|
});
|
|
@@ -8,7 +8,7 @@ import isPropAllowed from "../helpers/isPropAllowed.js";
|
|
|
8
8
|
import { paddingProps } from "../helpers/styledProps.js";
|
|
9
9
|
import Icon from "../Icon/index.js";
|
|
10
10
|
import AriaButton from "../Inputs/helpers/AriaButton.js";
|
|
11
|
-
const
|
|
11
|
+
const Header = ({ children, triggerIconPosition = 'right', background, title, iconLeft, iconRight, ...props })=>{
|
|
12
12
|
const triggerRef = useRef(null);
|
|
13
13
|
return /*#__PURE__*/ jsxs(HeaderContainer, {
|
|
14
14
|
onClick: ()=>triggerRef.current?.click(),
|
|
@@ -81,6 +81,6 @@ const Content = styled.div({
|
|
|
81
81
|
alignItems: 'center',
|
|
82
82
|
flexGrow: 1
|
|
83
83
|
});
|
|
84
|
-
|
|
85
|
-
const
|
|
86
|
-
export {
|
|
84
|
+
Header.displayName = 'Accordion.Header';
|
|
85
|
+
const Accordion_Header = Header;
|
|
86
|
+
export { Accordion_Header as default };
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import { type DisclosureProps } from 'react-aria-components';
|
|
2
|
+
type Props = {
|
|
3
|
+
id?: DisclosureProps['id'];
|
|
4
|
+
isExpanded?: DisclosureProps['isExpanded'];
|
|
5
|
+
defaultExpanded?: DisclosureProps['defaultExpanded'];
|
|
6
|
+
onExpandedChange?: DisclosureProps['onExpandedChange'];
|
|
7
|
+
/** Disables the item */
|
|
8
|
+
disabled?: DisclosureProps['isDisabled'];
|
|
9
|
+
children?: DisclosureProps['children'];
|
|
10
|
+
className?: DisclosureProps['className'];
|
|
11
|
+
style?: DisclosureProps['style'];
|
|
12
|
+
} & Omit<DisclosureProps, 'isDisabled'>;
|
|
2
13
|
declare const Item: {
|
|
3
|
-
({ children, ...props }:
|
|
14
|
+
({ children, disabled, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
4
15
|
displayName: string;
|
|
5
16
|
};
|
|
6
17
|
export default Item;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import styled from "@emotion/styled";
|
|
3
3
|
import { Disclosure } from "react-aria-components";
|
|
4
|
-
const Item = ({ children, ...props })=>/*#__PURE__*/ jsx(ItemContainer, {
|
|
4
|
+
const Item = ({ children, disabled, ...props })=>/*#__PURE__*/ jsx(ItemContainer, {
|
|
5
|
+
isDisabled: disabled,
|
|
5
6
|
...props,
|
|
6
7
|
children: children
|
|
7
8
|
});
|
|
@@ -18,6 +19,16 @@ const ItemContainer = styled(Disclosure)(({ theme })=>({
|
|
|
18
19
|
transform: 'rotate(90deg)'
|
|
19
20
|
}
|
|
20
21
|
}
|
|
22
|
+
},
|
|
23
|
+
'&[data-disabled="true"]': {
|
|
24
|
+
cursor: 'not-allowed',
|
|
25
|
+
'& > div:first-of-type': {
|
|
26
|
+
pointerEvents: 'none',
|
|
27
|
+
userSelect: 'none',
|
|
28
|
+
'& > *': {
|
|
29
|
+
opacity: 0.4
|
|
30
|
+
}
|
|
31
|
+
}
|
|
21
32
|
}
|
|
22
33
|
}));
|
|
23
34
|
Item.displayName = 'Accordion.Item';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { type DisclosurePanelProps } from 'react-aria-components';
|
|
2
2
|
import type { MaxHeight } from '../types';
|
|
3
3
|
type PanelProps = {
|
|
4
|
+
children: DisclosurePanelProps['children'];
|
|
5
|
+
className?: DisclosurePanelProps['className'];
|
|
6
|
+
style?: DisclosurePanelProps['style'];
|
|
4
7
|
background?: string;
|
|
5
8
|
} & MaxHeight & DisclosurePanelProps;
|
|
6
9
|
declare const Panel: {
|
|
@@ -5,7 +5,7 @@ import Button from "./Button/index.js";
|
|
|
5
5
|
import { marginProps } from "./helpers/styledProps.js";
|
|
6
6
|
import Slider from "./Slider.js";
|
|
7
7
|
import Waveform from "./Waveform.js";
|
|
8
|
-
const
|
|
8
|
+
const Audio = ({ src, title, width, infoPosition, centerAlignContent, small, tiny, iconOnly, buttonProps, collapsed, hideSliderOnStop, hideTimeOnStop, hideCurrentTime, fontSizeTitle, fontSizeTime, fallbackDuration, waveform, onPlay, onPause, onStop, ref, ...rest })=>{
|
|
9
9
|
const [isPlaying, setIsPlaying] = useState(false);
|
|
10
10
|
const [isCleared, setIsCleared] = useState(true);
|
|
11
11
|
const [progress, setProgress] = useState(0);
|
|
@@ -244,5 +244,5 @@ const Data = styled.div(({ theme, secondary, fontSize })=>({
|
|
|
244
244
|
color: secondary ? theme.scale6 : theme.scale10,
|
|
245
245
|
fontSize: fontSize || 10
|
|
246
246
|
}), marginProps);
|
|
247
|
-
const
|
|
248
|
-
export {
|
|
247
|
+
const components_Audio = Audio;
|
|
248
|
+
export { components_Audio as default };
|
|
@@ -2,7 +2,7 @@ import type { Margin } from '../types';
|
|
|
2
2
|
import type { BasicButtonProps, ButtonComponentProps } from './ButtonTypes';
|
|
3
3
|
declare const _default: (({ content, children, dropdown, options, ref, ...rest }: ButtonComponentProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
4
4
|
Group: ({ children, disabled, outline, size, tiny, small, large, secondary, negative, positive, caution, collapse, ...props }: ({
|
|
5
|
-
children: (import("react").ReactElement<BasicButtonProps | ButtonComponentProps, string | import("react").JSXElementConstructor<any>> | import("react").ReactElement<import("../Tooltip").
|
|
5
|
+
children: (import("react").ReactElement<BasicButtonProps | ButtonComponentProps, string | import("react").JSXElementConstructor<any>> | import("react").ReactElement<import("../Tooltip").Props, string | import("react").JSXElementConstructor<any>>) | (import("react").ReactElement<BasicButtonProps | ButtonComponentProps, string | import("react").JSXElementConstructor<any>> | import("react").ReactElement<import("../Tooltip").Props, string | import("react").JSXElementConstructor<any>>)[];
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
size?: import("../types").Sizes;
|
|
8
8
|
tiny?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReactElement } from 'react';
|
|
2
|
-
import type { TooltipProps } from '../Tooltip';
|
|
2
|
+
import type { Props as TooltipProps } from '../Tooltip';
|
|
3
3
|
import type { Attributes } from '../typeDefs/elementTypes';
|
|
4
4
|
import type { Margin, Sizes, Width } from '../types';
|
|
5
5
|
import type { BasicButtonProps, ButtonComponentProps, ButtonStyles } from './ButtonTypes';
|
|
@@ -6,6 +6,9 @@ type Props = {
|
|
|
6
6
|
date?: Date;
|
|
7
7
|
/** The function to be called when a date is selected */
|
|
8
8
|
onChange: (date: Date) => void;
|
|
9
|
-
|
|
9
|
+
firstDayOfWeek?: CalendarProps<CalendarDate>['firstDayOfWeek'];
|
|
10
|
+
className?: CalendarProps<CalendarDate>['className'];
|
|
11
|
+
style?: CalendarProps<CalendarDate>['style'];
|
|
12
|
+
} & CalendarBaseProps & Pick<CalendarProps<CalendarDate>, 'firstDayOfWeek' | 'className' | 'style'>;
|
|
10
13
|
declare const Calendar: ({ date, onChange, preventPast, preventFuture, noShadow, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
11
14
|
export default Calendar;
|
|
@@ -6,7 +6,7 @@ import { range } from "es-toolkit";
|
|
|
6
6
|
import Icon from "../Icon/index.js";
|
|
7
7
|
import AriaButton from "../Inputs/helpers/AriaButton.js";
|
|
8
8
|
import Select from "../Select.js";
|
|
9
|
-
const
|
|
9
|
+
const CalendarHeader = ({ date, setDate })=>{
|
|
10
10
|
const { calendar } = useTheme();
|
|
11
11
|
const months = [
|
|
12
12
|
{
|
|
@@ -142,5 +142,5 @@ const NavButton = styled(AriaButton)(({ theme })=>({
|
|
|
142
142
|
cursor: 'not-allowed'
|
|
143
143
|
}
|
|
144
144
|
}));
|
|
145
|
-
const
|
|
146
|
-
export {
|
|
145
|
+
const CalendarParts_CalendarHeader = CalendarHeader;
|
|
146
|
+
export { CalendarParts_CalendarHeader as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useMemo } from "react";
|
|
2
2
|
import { getNow, getObjFromDate } from "./utils.js";
|
|
3
3
|
const now = getNow();
|
|
4
|
-
const
|
|
4
|
+
const useMinMax = ({ past, future })=>{
|
|
5
5
|
const min = useMemo(()=>{
|
|
6
6
|
if (true === past) return now;
|
|
7
7
|
if (past instanceof Date) return getObjFromDate(past);
|
|
@@ -19,5 +19,5 @@ const useMinMax_useMinMax = ({ past, future })=>{
|
|
|
19
19
|
max
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
-
const
|
|
23
|
-
export {
|
|
22
|
+
const CalendarParts_useMinMax = useMinMax;
|
|
23
|
+
export { CalendarParts_useMinMax as default };
|
|
@@ -17,9 +17,10 @@ type Props = {
|
|
|
17
17
|
partial?: boolean;
|
|
18
18
|
/** Sets the gap between the label and the checkbox */
|
|
19
19
|
gap?: number;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
onChange?: CheckboxProps['onChange'];
|
|
21
|
+
className?: CheckboxProps['className'];
|
|
22
|
+
style?: CheckboxProps['style'];
|
|
23
|
+
} & Margin & Omit<CheckboxProps, 'value' | 'isDisabled' | 'isReadOnly' | 'isSelected' | 'isIndeterminate'>;
|
|
23
24
|
declare const Checkbox: ({ label, labelPosition, checked, partial, disabled, readOnly, onChange, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
24
25
|
export declare const ControlContainer: import("@emotion/styled").StyledComponent<CheckboxProps & import("react").RefAttributes<HTMLLabelElement> & {
|
|
25
26
|
theme?: import("@emotion/react").Theme;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import styled from "@emotion/styled";
|
|
3
|
-
import { useEffect, useState } from "react";
|
|
4
3
|
import { Checkbox } from "react-aria-components";
|
|
5
4
|
import icons_Checkbox from "../assets/icons/Checkbox.js";
|
|
6
5
|
import CheckboxOff from "../assets/icons/CheckboxOff.js";
|
|
@@ -9,33 +8,26 @@ import { ControlLabel } from "./FormControl.js";
|
|
|
9
8
|
import { marginProps } from "./helpers/styledProps.js";
|
|
10
9
|
import Icon from "./Icon/index.js";
|
|
11
10
|
const Checkbox_Checkbox = ({ label, labelPosition, checked, partial, disabled, readOnly, onChange, ...props })=>{
|
|
12
|
-
const [on, setOn] = useState(checked || false);
|
|
13
11
|
const labelRight = 'right' === labelPosition;
|
|
14
|
-
const
|
|
15
|
-
const value = partial ? true : !on;
|
|
16
|
-
setOn(value);
|
|
17
|
-
if (onChange) onChange(value);
|
|
18
|
-
};
|
|
19
|
-
useEffect(()=>{
|
|
20
|
-
const checkedSet = 'boolean' == typeof checked;
|
|
21
|
-
const value = checkedSet ? checked : on;
|
|
22
|
-
setOn(value);
|
|
23
|
-
}, [
|
|
24
|
-
checked,
|
|
25
|
-
on
|
|
26
|
-
]);
|
|
12
|
+
const isControlled = 'boolean' == typeof checked;
|
|
27
13
|
return /*#__PURE__*/ jsx(ControlContainer, {
|
|
28
14
|
labelRight: labelRight,
|
|
29
|
-
|
|
30
|
-
|
|
15
|
+
...isControlled ? {
|
|
16
|
+
isSelected: checked
|
|
17
|
+
} : {},
|
|
18
|
+
...true === partial ? {
|
|
19
|
+
isIndeterminate: true
|
|
20
|
+
} : {},
|
|
31
21
|
isDisabled: disabled,
|
|
32
22
|
isReadOnly: readOnly,
|
|
33
|
-
onChange:
|
|
23
|
+
onChange: onChange,
|
|
34
24
|
...props,
|
|
35
25
|
children: ({ isIndeterminate, isSelected })=>{
|
|
26
|
+
const isChecked = isSelected;
|
|
27
|
+
const isPartial = partial || isIndeterminate;
|
|
36
28
|
let svg = /*#__PURE__*/ jsx(CheckboxOff, {});
|
|
37
|
-
if (
|
|
38
|
-
else if (
|
|
29
|
+
if (isPartial) svg = /*#__PURE__*/ jsx(CheckboxPartial, {});
|
|
30
|
+
else if (isChecked) svg = /*#__PURE__*/ jsx(icons_Checkbox, {});
|
|
39
31
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
40
32
|
children: [
|
|
41
33
|
label && /*#__PURE__*/ jsx(ControlLabel, {
|
|
@@ -7,7 +7,7 @@ import { Highlight, themes } from "prism-react-renderer";
|
|
|
7
7
|
import { marginProps } from "../helpers/styledProps.js";
|
|
8
8
|
import Copy from "./Copy.js";
|
|
9
9
|
import Endpoint from "./Endpoint.js";
|
|
10
|
-
const
|
|
10
|
+
const Code = ({ children, code, className: metaData, lang: langProp, lineHighlights: lineHighlightsProp, noNumbers: noNumbersProp, margin, marginTop, marginBottom, marginRight, marginLeft })=>{
|
|
11
11
|
const { name: themeName } = useTheme();
|
|
12
12
|
const rest = {
|
|
13
13
|
margin,
|
|
@@ -113,5 +113,5 @@ const LineNumber = styled.span(({ theme })=>({
|
|
|
113
113
|
color: theme.scale6,
|
|
114
114
|
userSelect: 'none'
|
|
115
115
|
}));
|
|
116
|
-
const
|
|
117
|
-
export {
|
|
116
|
+
const Code_Code = Code;
|
|
117
|
+
export { Code_Code as default };
|
|
@@ -32,7 +32,7 @@ const getStyles = (method, theme)=>{
|
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
|
-
const
|
|
35
|
+
const Endpoint = ({ method, url })=>{
|
|
36
36
|
const theme = useTheme();
|
|
37
37
|
const styles = getStyles(method.toUpperCase(), theme);
|
|
38
38
|
return /*#__PURE__*/ jsxs(Container, {
|
|
@@ -78,5 +78,5 @@ const Url = styled.div(({ theme })=>({
|
|
|
78
78
|
fontSize: theme.font.size.lg,
|
|
79
79
|
padding: theme.size.md
|
|
80
80
|
}));
|
|
81
|
-
const
|
|
82
|
-
export {
|
|
81
|
+
const Code_Endpoint = Endpoint;
|
|
82
|
+
export { Code_Endpoint as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ComboBoxProps } from './typeDefs/reactAriaTypes';
|
|
2
2
|
import type { OpenStateProps, SelectInputProps } from './typeDefs/selectionTypes';
|
|
3
3
|
type Props = {
|
|
4
4
|
/** Use when loading options asynchronously with onTextChange */
|
|
@@ -8,7 +8,7 @@ type Props = {
|
|
|
8
8
|
/** The function to be called when the input text does not match any options */
|
|
9
9
|
onCreate?: (text: string) => void;
|
|
10
10
|
ref?: React.Ref<HTMLInputElement>;
|
|
11
|
-
} & SelectInputProps & OpenStateProps &
|
|
11
|
+
} & SelectInputProps & OpenStateProps & ComboBoxProps;
|
|
12
12
|
declare const _default: (({ backgroundColor, menuBackground, children, fontSize, disabled, invalid, required, readOnly, loading, loadingResults, label, options, placeholder, placeholderColor, description, errorMessage, textOnly, value, defaultValue, width, height, maxHeight, iconLeft, leftElement, rightElement, allowRepeatSelection, allowsEmptyCollection, position, fixedPosition, open, onOpenChange, before, after, onChange, onCreate, afterShow, afterHide, onTextChange, ref, ...props }: Props) => import("react/jsx-runtime").JSX.Element) & {
|
|
13
13
|
Item: ({ id, value, header, body, leftElement, rightElement, inline, disabled, ...props }: import("..").SelectItem & Omit<import("react-aria-components").ListBoxItemProps<object>, "id" | "value" | "isDisabled">) => import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
Section: ({ id, title, children }: {
|
|
@@ -10,7 +10,7 @@ import InputContainerStyles from "../Inputs/helpers/InputContainerStyles.js";
|
|
|
10
10
|
import InputStyles from "../Inputs/helpers/InputStyles.js";
|
|
11
11
|
import ListStyles from "../ListHelpers/ListStyles.js";
|
|
12
12
|
import CommandOptions from "./CommandOptions.js";
|
|
13
|
-
const
|
|
13
|
+
const CommandMenu = ({ options, inputProps, modalProps, triggerRef, position, offset, open, onChange, setOpen, ...props })=>{
|
|
14
14
|
const [search, setSearch] = useState('');
|
|
15
15
|
const listRef = useRef(null);
|
|
16
16
|
const scrollId = useRef(null);
|
|
@@ -132,5 +132,5 @@ const Overlay = styled(ModalOverlay)(({ overlayColor, overlayBlur = true, zIndex
|
|
|
132
132
|
backgroundColor: overlayColor || 'rgba(0, 0, 0, 0.2)',
|
|
133
133
|
backdropFilter: overlayBlur ? `blur(${'number' == typeof overlayBlur ? overlayBlur : 4}px)` : 'none'
|
|
134
134
|
}));
|
|
135
|
-
const
|
|
136
|
-
export {
|
|
135
|
+
const CommandMenu_CommandMenu = CommandMenu;
|
|
136
|
+
export { CommandMenu_CommandMenu as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import styled from "@emotion/styled";
|
|
3
3
|
import { Command } from "cmdk";
|
|
4
|
-
const
|
|
4
|
+
const CommandSection = ({ id, title, children })=>/*#__PURE__*/ jsx(Section, {
|
|
5
5
|
id: id,
|
|
6
6
|
heading: title,
|
|
7
7
|
children: children
|
|
@@ -15,5 +15,5 @@ const Section = styled(Command.Group)(({ theme })=>({
|
|
|
15
15
|
pointerEvents: 'none'
|
|
16
16
|
}
|
|
17
17
|
}));
|
|
18
|
-
const
|
|
19
|
-
export {
|
|
18
|
+
const CommandMenu_CommandSection = CommandSection;
|
|
19
|
+
export { CommandMenu_CommandSection as default };
|
package/build/components/Dot.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useTheme } from "@emotion/react";
|
|
3
3
|
import styled from "@emotion/styled";
|
|
4
4
|
import { marginProps, positionProps } from "./helpers/styledProps.js";
|
|
5
|
-
const
|
|
5
|
+
const Dot = ({ children, type, color, size = 'tiny', ...props })=>{
|
|
6
6
|
const theme = useTheme();
|
|
7
7
|
let dotColor = color || theme.color.brand;
|
|
8
8
|
let dotSize = size;
|
|
@@ -56,5 +56,5 @@ const StyledDot = styled.div(({ theme: { font, scale10 }, color, size, textColor
|
|
|
56
56
|
fontSize: font.size.sm,
|
|
57
57
|
color: textColor || scale10
|
|
58
58
|
}), marginProps, positionProps);
|
|
59
|
-
const
|
|
60
|
-
export {
|
|
59
|
+
const components_Dot = Dot;
|
|
60
|
+
export { components_Dot as default };
|
|
@@ -5,7 +5,7 @@ import { isEqual } from "es-toolkit/predicate";
|
|
|
5
5
|
import { useEffect, useImperativeHandle, useRef, useState } from "react";
|
|
6
6
|
import { createStateWithContent, getEntities, getFocusStateAtEnd, getPastedState, getRawState, hasMissingEntities, insertFieldEntity } from "./draftUtils.js";
|
|
7
7
|
import { Description, InputContainer, InputWrapper, Label, isInputFilled, useInputFocus } from "./InputHelpers.js";
|
|
8
|
-
const
|
|
8
|
+
const DraftEditor = ({ value, onChange, onEnterKey, onFocus, onBlur, mergeFields = [], placeholder = 'Text...', description, invalid, width, height, maxHeight, noPadding = false, readOnly = false, displayMergedValues = false, color, overflow, clampLines, label, disabled, borderRadius, backgroundColor, fontSize, textOnly, margin, marginLeft, marginRight, marginTop, marginBottom, ref, className, ...rest })=>{
|
|
9
9
|
const [editorState, setEditorState] = useState(()=>createStateWithContent(value, mergeFields, displayMergedValues));
|
|
10
10
|
const { focused, handleFocus, handleBlur } = useInputFocus(onFocus, onBlur);
|
|
11
11
|
const [missingField, setMissingField] = useState(false);
|
|
@@ -184,5 +184,5 @@ const EditorContainer = styled(InputContainer)(({ theme, height, noPadding, disa
|
|
|
184
184
|
}
|
|
185
185
|
};
|
|
186
186
|
});
|
|
187
|
-
const
|
|
188
|
-
export {
|
|
187
|
+
const components_DraftEditor = DraftEditor;
|
|
188
|
+
export { components_DraftEditor as default };
|
|
@@ -10,7 +10,7 @@ import GridListItem from "./ListBoxParts/GridListItem.js";
|
|
|
10
10
|
import GridListSection from "./ListHelpers/GridListSection.js";
|
|
11
11
|
import ListStyles from "./ListHelpers/ListStyles.js";
|
|
12
12
|
import MotionPopover from "./MotionPopover.js";
|
|
13
|
-
const
|
|
13
|
+
const Dropdown = ({ children, before, after, open, label, placeholder = 'Select', options = [], width, height, value, defaultValue, loading, hideCaret, color, disabled, readOnly, placeholderColor, fontSize, fontWeight, description, errorMessage, position, backgroundColor, menuBackground, iconLeft, leftElement, rightElement, onChange, onOpenChange, afterShow, afterHide, ...props })=>{
|
|
14
14
|
const [isOpen, handleOpenChange] = useControlledOpenState({
|
|
15
15
|
open,
|
|
16
16
|
onOpenChange,
|
|
@@ -124,7 +124,7 @@ const InputWrapper = styled(AriaButton)(({ theme: { input }, isDisabled, backgro
|
|
|
124
124
|
}));
|
|
125
125
|
const MenuContainer = styled.div(ListStyles);
|
|
126
126
|
const Item = GridListItem;
|
|
127
|
-
const
|
|
127
|
+
const components_Dropdown = Object.assign(Dropdown, {
|
|
128
128
|
Item
|
|
129
129
|
});
|
|
130
|
-
export {
|
|
130
|
+
export { components_Dropdown as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type ReactElement, type ReactNode } from 'react';
|
|
2
|
-
import { type
|
|
2
|
+
import { type ButtonProps } from 'react-aria-components';
|
|
3
|
+
import type { DropdownMenuProps } from './typeDefs/reactAriaTypes';
|
|
3
4
|
import type { ListOption, OpenStateProps, SelectInputProps } from './typeDefs/selectionTypes';
|
|
4
5
|
import type { ThemeProp } from './types';
|
|
5
6
|
type SelectProps = Pick<SelectInputProps, 'children' | 'afterShow' | 'afterHide' | 'position' | 'fixedPosition' | 'before' | 'after' | 'menuBackground'>;
|
|
6
|
-
type MenuProps = Omit<AriaMenuProps<ListOption>, 'selectionMode' | 'selectedKeys' | 'onSelectionChange'>;
|
|
7
7
|
type NoSelection = {
|
|
8
8
|
selectionMode?: never;
|
|
9
9
|
selectedKeys?: never;
|
|
@@ -23,7 +23,7 @@ type MultiSelection = {
|
|
|
23
23
|
onSelectionChange?: (items: 'all' | string[]) => void;
|
|
24
24
|
};
|
|
25
25
|
type SelectionProps = NoSelection | SingleSelection | MultiSelection;
|
|
26
|
-
type
|
|
26
|
+
type Props = {
|
|
27
27
|
/** The options to be displayed in the menu */
|
|
28
28
|
options?: ListOption[];
|
|
29
29
|
/** The element that will trigger the opening of the menu */
|
|
@@ -36,9 +36,9 @@ type DropdownMenuProps = {
|
|
|
36
36
|
offset?: number;
|
|
37
37
|
/** Opens the menu on right-click instead of left-click */
|
|
38
38
|
triggerOnContextMenu?: boolean;
|
|
39
|
-
} & SelectProps &
|
|
39
|
+
} & SelectProps & DropdownMenuProps & SelectionProps & OpenStateProps;
|
|
40
40
|
declare const DropdownMenu: {
|
|
41
|
-
({ children, position, fixedPosition, trigger, isTriggerButton, triggerProps, triggerOnContextMenu, menuBackground, options, offset, selectionMode, selectedKeys, before, after, open, afterShow, afterHide, onSelectionChange, onOpenChange, ...props }:
|
|
41
|
+
({ children, position, fixedPosition, trigger, isTriggerButton, triggerProps, triggerOnContextMenu, menuBackground, options, offset, selectionMode, selectedKeys, before, after, open, afterShow, afterHide, onSelectionChange, onOpenChange, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
42
42
|
Item: {
|
|
43
43
|
({ id, value, children, header, body, leftElement, rightElement, inline, disabled, checkbox, onClick, ...props }: import("./DropdownMenuParts/MenuItem").Props): import("react/jsx-runtime").JSX.Element;
|
|
44
44
|
displayName: string;
|
|
@@ -4,7 +4,7 @@ import { Menu } from "react-aria-components";
|
|
|
4
4
|
import ListSection from "../ListHelpers/ListSection.js";
|
|
5
5
|
import ListStyles, { preventProps } from "../ListHelpers/ListStyles.js";
|
|
6
6
|
import MenuItem from "./MenuItem.js";
|
|
7
|
-
const
|
|
7
|
+
const MenuOptions = ({ options, children, autoWidth, itemProps, width, ref, before, after, menuBackground, ...props })=>/*#__PURE__*/ jsxs(MenuContainer, {
|
|
8
8
|
autoWidth: autoWidth,
|
|
9
9
|
width: width,
|
|
10
10
|
background: menuBackground,
|
|
@@ -43,5 +43,5 @@ const MenuOptions_MenuOptions = ({ options, children, autoWidth, itemProps, widt
|
|
|
43
43
|
]
|
|
44
44
|
});
|
|
45
45
|
const MenuContainer = styled('div', preventProps)(ListStyles);
|
|
46
|
-
const
|
|
47
|
-
export {
|
|
46
|
+
const DropdownMenuParts_MenuOptions = MenuOptions;
|
|
47
|
+
export { DropdownMenuParts_MenuOptions as default };
|
|
@@ -35,7 +35,7 @@ const filterOptions = (options, searchTerm)=>{
|
|
|
35
35
|
return acc;
|
|
36
36
|
}, []);
|
|
37
37
|
};
|
|
38
|
-
const
|
|
38
|
+
const DropdownSelect = ({ label, options, width, search, onChange, ...props })=>{
|
|
39
39
|
const [selected, setSelected] = useState(new Set());
|
|
40
40
|
const [isOpen, setIsOpen] = useState(false);
|
|
41
41
|
const [searchVal, setSearchVal] = useState('');
|
|
@@ -167,5 +167,5 @@ const Empty = styled.div(({ theme })=>({
|
|
|
167
167
|
paddingTop: 4,
|
|
168
168
|
paddingBottom: 8
|
|
169
169
|
}));
|
|
170
|
-
const
|
|
171
|
-
export { Label,
|
|
170
|
+
const components_DropdownSelect = DropdownSelect;
|
|
171
|
+
export { Label, components_DropdownSelect as default };
|