Skip to content

Commit

Permalink
🔖 Prepare for 0.13.0a2 release
Browse files Browse the repository at this point in the history
  • Loading branch information
snehilvj committed Aug 12, 2023
1 parent 01221f2 commit 53cf8fe
Show file tree
Hide file tree
Showing 11 changed files with 272 additions and 224 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Change Log

# 0.13.0a2

### Added

* New component:
* InputWrapper

### Fixed

* Missing input props from TimeInput
* Pass empty list as default prop for Select and MultiSelect
* Remove left over MantineProvider from Switch testing

# 0.13.0a1

This release is based on Mantine v6.
Expand Down
142 changes: 71 additions & 71 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dash_mantine_components",
"version": "0.13.0a1",
"version": "0.13.0a2",
"description": "Plotly Dash Components based on Mantine",
"main": "index.ts",
"repository": {
Expand Down
27 changes: 27 additions & 0 deletions src/ts/components/core/InputWrapper.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React from "react";
import { Input } from "@mantine/core";
import { DashBaseProps } from "props/dash";
import {
MantineStyleSystemProps,
InputWrapperBaseProps,
MantineStylesAPIProps,
} from "props/mantine";

export type Props = {
/** children */
children?: React.ReactNode;
} & InputWrapperBaseProps &
MantineStyleSystemProps &
MantineStylesAPIProps &
DashBaseProps;

/** Base component to create custom inputs */
const InputWrapper = (props: Props) => {
const { setProps, children, ...other } = props;

return <Input.Wrapper {...other}> {children} </Input.Wrapper>;
};

InputWrapper.defaultProps = {};

export default InputWrapper;
10 changes: 4 additions & 6 deletions src/ts/components/core/Switch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,10 @@ const Switch = (props: Props) => {
};

return (
<MantineProvider withNormalizeCSS withGlobalStyles>
<MantineSwitch
onChange={(ev) => updateProps(ev.currentTarget.checked)}
{...other}
/>
</MantineProvider>
<MantineSwitch
onChange={(ev) => updateProps(ev.currentTarget.checked)}
{...other}
/>
);
};

Expand Down
1 change: 1 addition & 0 deletions src/ts/components/core/select/MultiSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ const MultiSelect = (props: Props) => {
MultiSelect.defaultProps = {
persisted_props: ["value"],
persistence_type: "local",
data: [],
};

export default MultiSelect;
1 change: 1 addition & 0 deletions src/ts/components/core/select/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ const Select = (props: Props) => {
Select.defaultProps = {
persisted_props: ["value"],
persistence_type: "local",
data: [],
};

export default Select;
2 changes: 2 additions & 0 deletions src/ts/components/dates/TimeInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
MantineStyleSystemProps,
MantineStylesAPIProps,
TextInputProps,
InputComponentProps,
} from "props/mantine";

type Props = {
Expand All @@ -18,6 +19,7 @@ type Props = {
/** Debounce time in ms */
debounce?: number;
} & TextInputProps &
InputComponentProps &
PersistenceProps &
DashBaseProps &
MantineStylesAPIProps &
Expand Down
2 changes: 2 additions & 0 deletions src/ts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ import HoverCardDropdown from "./components/core/hovercard/HoverCardDropdown";
import HoverCardTarget from "./components/core/hovercard/HoverCardTarget";
import Image from "./components/core/image/Image";
import Indicator from "./components/core/Indicator";
import InputWrapper from "./components/core/InputWrapper";
import JsonInput from "./components/core/textinput/JsonInput";
import Kbd from "./components/core/Kbd";
import List from "./components/core/list/List";
Expand Down Expand Up @@ -169,6 +170,7 @@ export {
HoverCardTarget,
Image,
Indicator,
InputWrapper,
JsonInput,
Kbd,
List,
Expand Down
2 changes: 1 addition & 1 deletion src/ts/props/dates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export type CalendarHeaderSettings = {
withPrevious?: boolean;
/** Component size */
size?: MantineSize;
}
};

type DecadeLevelSettings = DecadeLevelBaseSettings & CalendarHeaderSettings;
type YearLevelSettings = YearLevelBaseSettings & CalendarHeaderSettings;
Expand Down
Loading

0 comments on commit 53cf8fe

Please sign in to comment.