Skip to content

Commit 7f9c436

Browse files
chore(release): 1.0.0-alpha.1
# [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
1 parent d24e556 commit 7f9c436

File tree

4 files changed

+44
-26
lines changed

4 files changed

+44
-26
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# [1.0.0-alpha.1](https://github.com/dash-ui/react/compare/v0.9.1...v1.0.0-alpha.1) (2021-10-29)
2+
3+
### Features
4+
5+
- make it compatible with styles alpha ([d24e556](https://github.com/dash-ui/react/commit/d24e556d6dbf98fa402bb6bb4c37838679a95baf))
6+
7+
### BREAKING CHANGES
8+
9+
- Updates some types to be compatible with the latest alpha of Dash
10+
111
# Changelog
212

313
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.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@dash-ui/react",
3-
"version": "0.9.1",
3+
"version": "1.0.0-alpha.1",
44
"description": "React components and hooks for dash-ui",
55
"license": "MIT",
66
"author": "Jared Lunde <[email protected]> (https://jaredLunde.com)",

server/types/index.d.ts

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import * as React from "react";
21
import type { Styles } from "@dash-ui/styles";
2+
import * as React from "react";
33
/**
44
* A function for creating a React `<style>` component for
55
* inserting Dash styles in SSR.
66
*
7-
* @param html The HTML generated by `renderToStaticMarkup()` or `renderToString()`
8-
* @param styles An instance of `styles()`. Defaults to the default styles instance
7+
* @param html - The HTML generated by `renderToStaticMarkup()` or `renderToString()`
8+
* @param styles - An instance of `styles()`. Defaults to the default styles instance
99
* in `@dash-ui/styles`.
1010
*/
1111
export declare function toComponent(
@@ -15,6 +15,9 @@ export declare function toComponent(
1515
/**
1616
* A React component for injecting SSR CSS styles into Next.js documents
1717
*
18+
* @param root0
19+
* @param root0.html
20+
* @param root0.styles
1821
* @example
1922
* // _document.js
2023
* import React from 'react'
@@ -36,7 +39,13 @@ export declare function toComponent(
3639
* }
3740
* }
3841
*/
39-
export declare const Style: React.FC<StyleProps>;
42+
export declare function Style({
43+
html,
44+
styles,
45+
}: StyleProps): React.ReactElement<
46+
any,
47+
string | React.JSXElementConstructor<any>
48+
>;
4049
export interface StyleProps {
4150
/**
4251
* The HTML generated by Next.js, `renderToStaticMarkup()` or `renderToString()`
@@ -51,9 +60,8 @@ export interface StyleProps {
5160
* Creates a Gatsby replaceRenderer for injecting styles generated by Dash on
5261
* the server into the Gatsby `<head>` component
5362
*
54-
* @param styles An instance of `styles()`. Defaults to the default styles instance
63+
* @param styles - An instance of `styles()`. Defaults to the default styles instance
5564
* in `@dash-ui/styles`.
56-
*
5765
* @example
5866
* // gatsby-ssr.js
5967
* exports.replaceRenderer = require('@dash-ui/react/server').createGatsbyRenderer()

types/index.d.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import * as React from "react";
21
import type {
3-
StyleObject,
4-
StyleCallback,
5-
Styles,
6-
DashTokens,
72
DashThemes,
3+
DashTokens,
84
Falsy,
5+
StyleCallback,
6+
StyleObject,
7+
Styles,
98
} from "@dash-ui/styles";
9+
import * as React from "react";
1010
/**
1111
* A hook for consuming dash context from the provider
1212
*/
@@ -20,6 +20,10 @@ export interface DashContextValue {
2020
/**
2121
* The Dash context provider. Use this to control the `styles()` instance
2222
* your app is using.
23+
*
24+
* @param root0
25+
* @param root0.styles
26+
* @param root0.children
2327
*/
2428
export declare function DashProvider({
2529
styles,
@@ -35,6 +39,9 @@ export interface DashProviderProps {
3539
/**
3640
* A component for creating an inline `<style>` tag that is unmounted when
3741
* the component unmounts.
42+
*
43+
* @param root0
44+
* @param root0.css
3845
*/
3946
export declare function Inline({ css: input }: InlineProps): JSX.Element | null;
4047
export interface InlineProps {
@@ -50,9 +57,8 @@ export interface InlineProps {
5057
* A hook for inserting transient global styles into the DOM. These styles
5158
* will be injected when the hook mounts and flushed when the hook unmounts.
5259
*
53-
* @param value Global CSS to inject into the DOM and flush when the hook unmounts
54-
* @param deps A dependency array that will force the hook to re-insert global styles
55-
*
60+
* @param value - Global CSS to inject into the DOM and flush when the hook unmounts
61+
* @param deps - A dependency array that will force the hook to re-insert global styles
5662
* @example
5763
* const Component = () => {
5864
* const [userFontSize, setUserFontSize] = React.useState('100%')
@@ -75,9 +81,8 @@ export declare function useGlobal(
7581
* A hook for inserting transient CSS tokens into the DOM. These tokens
7682
* will be injected when the hook mounts and flushed when the hook unmounts.
7783
*
78-
* @param value CSS tokens to inject into the DOM and flush when the hook unmounts
79-
* @param deps A dependency array that will force the hook to re-insert tokens
80-
*
84+
* @param value - CSS tokens to inject into the DOM and flush when the hook unmounts
85+
* @param deps - A dependency array that will force the hook to re-insert tokens
8186
* @example
8287
* const Component = () => {
8388
* const [userFontSize, setUserFontSize] = React.useState('100%')
@@ -96,9 +101,8 @@ export declare function useTokens(
96101
* A hook for inserting transient CSS theme tokens into the DOM. These tokens
97102
* will be injected when the hook mounts and flushed when the hook unmounts.
98103
*
99-
* @param value Themes to inject into the DOM and flush when the hook unmounts
100-
* @param deps A dependency array that will force the hook to re-insert themes
101-
*
104+
* @param value - Themes to inject into the DOM and flush when the hook unmounts
105+
* @param deps - A dependency array that will force the hook to re-insert themes
102106
* @example
103107
* const Component = () => {
104108
* const [color, setColor] = React.useState('aliceblue')
@@ -112,11 +116,7 @@ export declare function useTokens(
112116
* }
113117
*/
114118
export declare function useThemes(
115-
value:
116-
| DeepPartial<{
117-
[Name in keyof DashThemes]: DashThemes[Name];
118-
}>
119-
| Falsy,
119+
value: DeepPartial<DashThemes> | Falsy,
120120
deps?: React.DependencyList
121121
): void;
122122
declare type DeepPartial<T> = T extends (...args: any[]) => any

0 commit comments

Comments
 (0)