Skip to content

Commit

Permalink
chore(release): 1.0.0-alpha.1
Browse files Browse the repository at this point in the history
# [1.0.0-alpha.1](v0.9.1...v1.0.0-alpha.1) (2021-10-29)

### Features

* make it compatible with styles alpha ([d24e556](d24e556))

### BREAKING CHANGES

* Updates some types to be compatible with the latest alpha of Dash
  • Loading branch information
semantic-release-bot committed Oct 29, 2021
1 parent d24e556 commit 7f9c436
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 26 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# [1.0.0-alpha.1](https://github.com/dash-ui/react/compare/v0.9.1...v1.0.0-alpha.1) (2021-10-29)

### Features

- make it compatible with styles alpha ([d24e556](https://github.com/dash-ui/react/commit/d24e556d6dbf98fa402bb6bb4c37838679a95baf))

### BREAKING CHANGES

- Updates some types to be compatible with the latest alpha of Dash

# Changelog

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dash-ui/react",
"version": "0.9.1",
"version": "1.0.0-alpha.1",
"description": "React components and hooks for dash-ui",
"license": "MIT",
"author": "Jared Lunde <[email protected]> (https://jaredLunde.com)",
Expand Down
20 changes: 14 additions & 6 deletions server/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as React from "react";
import type { Styles } from "@dash-ui/styles";
import * as React from "react";
/**
* A function for creating a React `<style>` component for
* inserting Dash styles in SSR.
*
* @param html The HTML generated by `renderToStaticMarkup()` or `renderToString()`
* @param styles An instance of `styles()`. Defaults to the default styles instance
* @param html - The HTML generated by `renderToStaticMarkup()` or `renderToString()`
* @param styles - An instance of `styles()`. Defaults to the default styles instance
* in `@dash-ui/styles`.
*/
export declare function toComponent(
Expand All @@ -15,6 +15,9 @@ export declare function toComponent(
/**
* A React component for injecting SSR CSS styles into Next.js documents
*
* @param root0
* @param root0.html
* @param root0.styles
* @example
* // _document.js
* import React from 'react'
Expand All @@ -36,7 +39,13 @@ export declare function toComponent(
* }
* }
*/
export declare const Style: React.FC<StyleProps>;
export declare function Style({
html,
styles,
}: StyleProps): React.ReactElement<
any,
string | React.JSXElementConstructor<any>
>;
export interface StyleProps {
/**
* The HTML generated by Next.js, `renderToStaticMarkup()` or `renderToString()`
Expand All @@ -51,9 +60,8 @@ export interface StyleProps {
* Creates a Gatsby replaceRenderer for injecting styles generated by Dash on
* the server into the Gatsby `<head>` component
*
* @param styles An instance of `styles()`. Defaults to the default styles instance
* @param styles - An instance of `styles()`. Defaults to the default styles instance
* in `@dash-ui/styles`.
*
* @example
* // gatsby-ssr.js
* exports.replaceRenderer = require('@dash-ui/react/server').createGatsbyRenderer()
Expand Down
38 changes: 19 additions & 19 deletions types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import * as React from "react";
import type {
StyleObject,
StyleCallback,
Styles,
DashTokens,
DashThemes,
DashTokens,
Falsy,
StyleCallback,
StyleObject,
Styles,
} from "@dash-ui/styles";
import * as React from "react";
/**
* A hook for consuming dash context from the provider
*/
Expand All @@ -20,6 +20,10 @@ export interface DashContextValue {
/**
* The Dash context provider. Use this to control the `styles()` instance
* your app is using.
*
* @param root0
* @param root0.styles
* @param root0.children
*/
export declare function DashProvider({
styles,
Expand All @@ -35,6 +39,9 @@ export interface DashProviderProps {
/**
* A component for creating an inline `<style>` tag that is unmounted when
* the component unmounts.
*
* @param root0
* @param root0.css
*/
export declare function Inline({ css: input }: InlineProps): JSX.Element | null;
export interface InlineProps {
Expand All @@ -50,9 +57,8 @@ export interface InlineProps {
* A hook for inserting transient global styles into the DOM. These styles
* will be injected when the hook mounts and flushed when the hook unmounts.
*
* @param value Global CSS to inject into the DOM and flush when the hook unmounts
* @param deps A dependency array that will force the hook to re-insert global styles
*
* @param value - Global CSS to inject into the DOM and flush when the hook unmounts
* @param deps - A dependency array that will force the hook to re-insert global styles
* @example
* const Component = () => {
* const [userFontSize, setUserFontSize] = React.useState('100%')
Expand All @@ -75,9 +81,8 @@ export declare function useGlobal(
* A hook for inserting transient CSS tokens into the DOM. These tokens
* will be injected when the hook mounts and flushed when the hook unmounts.
*
* @param value CSS tokens to inject into the DOM and flush when the hook unmounts
* @param deps A dependency array that will force the hook to re-insert tokens
*
* @param value - CSS tokens to inject into the DOM and flush when the hook unmounts
* @param deps - A dependency array that will force the hook to re-insert tokens
* @example
* const Component = () => {
* const [userFontSize, setUserFontSize] = React.useState('100%')
Expand All @@ -96,9 +101,8 @@ export declare function useTokens(
* A hook for inserting transient CSS theme tokens into the DOM. These tokens
* will be injected when the hook mounts and flushed when the hook unmounts.
*
* @param value Themes to inject into the DOM and flush when the hook unmounts
* @param deps A dependency array that will force the hook to re-insert themes
*
* @param value - Themes to inject into the DOM and flush when the hook unmounts
* @param deps - A dependency array that will force the hook to re-insert themes
* @example
* const Component = () => {
* const [color, setColor] = React.useState('aliceblue')
Expand All @@ -112,11 +116,7 @@ export declare function useTokens(
* }
*/
export declare function useThemes(
value:
| DeepPartial<{
[Name in keyof DashThemes]: DashThemes[Name];
}>
| Falsy,
value: DeepPartial<DashThemes> | Falsy,
deps?: React.DependencyList
): void;
declare type DeepPartial<T> = T extends (...args: any[]) => any
Expand Down

0 comments on commit 7f9c436

Please sign in to comment.