@charcoal-ui/react 1.0.0-alpha.1 → 1.0.0
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/README.md +0 -1
- package/dist/_lib/compat.d.ts +15 -0
- package/dist/_lib/compat.d.ts.map +1 -0
- package/dist/_lib/index.d.ts +26 -0
- package/dist/_lib/index.d.ts.map +1 -0
- package/dist/components/Button/index.d.ts +22 -0
- package/dist/components/Button/index.d.ts.map +1 -0
- package/dist/components/Button/index.story.d.ts +36 -0
- package/dist/components/Button/index.story.d.ts.map +1 -0
- package/dist/components/Clickable/index.d.ts +19 -0
- package/dist/components/Clickable/index.d.ts.map +1 -0
- package/dist/components/Clickable/index.story.d.ts +9 -0
- package/dist/components/Clickable/index.story.d.ts.map +1 -0
- package/dist/components/FieldLabel/index.d.ts +11 -0
- package/dist/components/FieldLabel/index.d.ts.map +1 -0
- package/dist/components/IconButton/index.d.ts +14 -0
- package/dist/components/IconButton/index.d.ts.map +1 -0
- package/dist/components/IconButton/index.story.d.ts +29 -0
- package/dist/components/IconButton/index.story.d.ts.map +1 -0
- package/dist/components/Radio/index.d.ts +24 -0
- package/dist/components/Radio/index.d.ts.map +1 -0
- package/dist/components/Radio/index.story.d.ts +25 -0
- package/dist/components/Radio/index.story.d.ts.map +1 -0
- package/dist/components/Radio/index.test.d.ts +2 -0
- package/dist/components/Radio/index.test.d.ts.map +1 -0
- package/dist/components/Switch/index.d.ts +16 -0
- package/dist/components/Switch/index.d.ts.map +1 -0
- package/dist/components/Switch/index.story.d.ts +14 -0
- package/dist/components/Switch/index.story.d.ts.map +1 -0
- package/dist/components/TextField/index.d.ts +37 -0
- package/dist/components/TextField/index.d.ts.map +1 -0
- package/dist/components/TextField/index.story.d.ts +22 -0
- package/dist/components/TextField/index.story.d.ts.map +1 -0
- package/dist/components/a11y.test.d.ts +2 -0
- package/dist/components/a11y.test.d.ts.map +1 -0
- package/dist/core/ComponentAbstraction.d.ts +24 -0
- package/dist/core/ComponentAbstraction.d.ts.map +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.modern.js +285 -0
- package/dist/index.modern.js.map +1 -0
- package/dist/index.module.js +2 -0
- package/dist/index.module.js.map +1 -0
- package/dist/styled.d.ts +83 -0
- package/dist/styled.d.ts.map +1 -0
- package/package.json +7 -7
- package/src/components/Radio/index.test.tsx +1 -2
- package/src/components/a11y.test.tsx +1 -2
- package/src/index.ts +6 -1
- package/src/type.d.ts +1 -1
package/dist/styled.d.ts
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
export declare const theme: (spec: (o: Record<string, unknown> & Readonly<{
|
|
2
|
+
bg: Record<string, unknown> & {
|
|
3
|
+
readonly transparent: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
4
|
+
readonly background1: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
5
|
+
readonly background2: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
6
|
+
readonly surface1: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
7
|
+
readonly surface2: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
8
|
+
readonly surface3: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
9
|
+
readonly surface4: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
10
|
+
readonly surface6: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
11
|
+
readonly surface7: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
12
|
+
readonly surface8: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
13
|
+
readonly surface9: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
14
|
+
readonly link1: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
15
|
+
readonly link2: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
16
|
+
readonly text1: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
17
|
+
readonly text2: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
18
|
+
readonly text3: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
19
|
+
readonly text4: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
20
|
+
readonly text5: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
21
|
+
readonly icon6: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
22
|
+
readonly brand: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
23
|
+
readonly assertive: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
24
|
+
} & {
|
|
25
|
+
readonly surface5: (direction: "to top" | "to bottom" | "to left" | "to right") => import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
26
|
+
readonly callToAction: (direction: "to top" | "to bottom" | "to left" | "to right") => import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
27
|
+
};
|
|
28
|
+
font: {
|
|
29
|
+
readonly transparent: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
30
|
+
readonly background1: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
31
|
+
readonly background2: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
32
|
+
readonly surface1: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
33
|
+
readonly surface2: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
34
|
+
readonly surface3: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
35
|
+
readonly surface4: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
36
|
+
readonly surface6: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
37
|
+
readonly surface7: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
38
|
+
readonly surface8: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
39
|
+
readonly surface9: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
40
|
+
readonly link1: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
41
|
+
readonly link2: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
42
|
+
readonly text1: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
43
|
+
readonly text2: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
44
|
+
readonly text3: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
45
|
+
readonly text4: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
46
|
+
readonly text5: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
47
|
+
readonly icon6: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
48
|
+
readonly brand: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
49
|
+
readonly assertive: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
50
|
+
};
|
|
51
|
+
}> & {
|
|
52
|
+
readonly typography: (size: keyof import("@charcoal-ui/theme").Typography) => import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, "bold" | "monospace" | "preserveHalfLeading">;
|
|
53
|
+
} & {
|
|
54
|
+
readonly margin: import("@charcoal-ui/styled").ModifiedArgumented<import("@charcoal-ui/styled").Internal, "left" | "right" | "top" | "bottom" | "horizontal" | "vertical" | "all", [0 | "auto" | 4 | 8 | 16 | 24 | 40 | 64 | 104 | 168 | 272 | 440]>;
|
|
55
|
+
readonly padding: import("@charcoal-ui/styled").ModifiedArgumented<import("@charcoal-ui/styled").Internal, "left" | "right" | "top" | "bottom" | "horizontal" | "vertical" | "all", [0 | "auto" | 4 | 8 | 16 | 24 | 40 | 64 | 104 | 168 | 272 | 440]>;
|
|
56
|
+
} & {
|
|
57
|
+
readonly width: Readonly<{
|
|
58
|
+
px: (size: 0 | "auto" | 4 | 8 | 16 | 24 | 40 | 64 | 104 | 168 | 272 | 440) => import("@charcoal-ui/styled").Internal;
|
|
59
|
+
column: (span: number) => import("@charcoal-ui/styled").Internal;
|
|
60
|
+
auto: import("@charcoal-ui/styled").Internal;
|
|
61
|
+
full: import("@charcoal-ui/styled").Internal;
|
|
62
|
+
}>;
|
|
63
|
+
readonly height: Readonly<{
|
|
64
|
+
px: (size: 0 | "auto" | 4 | 8 | 16 | 24 | 40 | 64 | 104 | 168 | 272 | 440) => import("@charcoal-ui/styled").Internal;
|
|
65
|
+
column: (span: number) => import("@charcoal-ui/styled").Internal;
|
|
66
|
+
auto: import("@charcoal-ui/styled").Internal;
|
|
67
|
+
full: import("@charcoal-ui/styled").Internal;
|
|
68
|
+
}>;
|
|
69
|
+
} & import("@charcoal-ui/styled").Internal & {
|
|
70
|
+
readonly disabled: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, never>;
|
|
71
|
+
} & Readonly<{
|
|
72
|
+
border: {
|
|
73
|
+
readonly default: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, "left" | "right" | "top" | "bottom">;
|
|
74
|
+
};
|
|
75
|
+
}> & Readonly<{
|
|
76
|
+
borderRadius: (radius: "none" | 4 | 8 | 16 | 24 | "oval") => import("@charcoal-ui/styled").Internal;
|
|
77
|
+
}> & Readonly<{
|
|
78
|
+
outline: {
|
|
79
|
+
readonly default: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, "focus">;
|
|
80
|
+
readonly assertive: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, "focus">;
|
|
81
|
+
};
|
|
82
|
+
}>) => import("@charcoal-ui/styled").Internal | (false | null | undefined) | (import("@charcoal-ui/styled").Internal | (false | null | undefined))[]) => import("@charcoal-ui/styled").ThemeProp<import("styled-components").DefaultTheme>;
|
|
83
|
+
//# sourceMappingURL=styled.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../src/styled.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0OAAsB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@charcoal-ui/react",
|
|
3
|
-
"version": "1.0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
"types": "./dist/index.d.ts",
|
|
14
14
|
"sideEffects": false,
|
|
15
15
|
"scripts": {
|
|
16
|
-
"build": "microbundle -f modern,esm,cjs --tsconfig tsconfig.build.json",
|
|
16
|
+
"build": "microbundle -f modern,esm,cjs --tsconfig tsconfig.build.json --jsx React.createElement --jsxFragment React.Fragment",
|
|
17
17
|
"typecheck": "tsc --noEmit --project tsconfig.build.json",
|
|
18
18
|
"clean": "rimraf dist"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@charcoal-ui/icons": "^1.0.0
|
|
21
|
+
"@charcoal-ui/icons": "^1.0.0",
|
|
22
22
|
"@react-types/switch": "^3.1.2",
|
|
23
23
|
"@storybook/addon-actions": "^6.4.17",
|
|
24
24
|
"@storybook/addon-knobs": "^6.4.0",
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"typescript": "^4.5.5"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@charcoal-ui/
|
|
53
|
-
"@charcoal-ui/
|
|
54
|
-
"@charcoal-ui/utils": "^1.0.0
|
|
52
|
+
"@charcoal-ui/styled": "^1.0.0",
|
|
53
|
+
"@charcoal-ui/theme": "^1.0.0",
|
|
54
|
+
"@charcoal-ui/utils": "^1.0.0",
|
|
55
55
|
"@react-aria/checkbox": "^3.2.3",
|
|
56
56
|
"@react-aria/switch": "^3.1.3",
|
|
57
57
|
"@react-aria/textfield": "^3.5.0",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "addc6d8f443865a8b56327ef9a4ff2e69942a30b"
|
|
75
75
|
}
|
|
@@ -2,8 +2,7 @@ import { fireEvent, render, screen } from '@testing-library/react'
|
|
|
2
2
|
import React from 'react'
|
|
3
3
|
import { ThemeProvider } from 'styled-components'
|
|
4
4
|
import Radio, { RadioGroup } from '.'
|
|
5
|
-
import
|
|
6
|
-
const { light } = createTheme
|
|
5
|
+
import { light } from '@charcoal-ui/theme'
|
|
7
6
|
|
|
8
7
|
describe('Radio', () => {
|
|
9
8
|
describe('__DEV__ mode', () => {
|
|
@@ -6,8 +6,7 @@ import { render } from '@testing-library/react'
|
|
|
6
6
|
import { ThemeProvider } from 'styled-components'
|
|
7
7
|
import { Story } from '../_lib/compat'
|
|
8
8
|
import ComponentAbstraction, { DefaultLink } from '../core/ComponentAbstraction'
|
|
9
|
-
import
|
|
10
|
-
const { light, dark } = createTheme
|
|
9
|
+
import { light, dark } from '@charcoal-ui/theme'
|
|
11
10
|
|
|
12
11
|
expect.extend(toHaveNoViolations)
|
|
13
12
|
|
package/src/index.ts
CHANGED
|
@@ -13,7 +13,12 @@ export {
|
|
|
13
13
|
default as IconButton,
|
|
14
14
|
type IconButtonProps,
|
|
15
15
|
} from './components/IconButton'
|
|
16
|
-
export {
|
|
16
|
+
export {
|
|
17
|
+
default as Radio,
|
|
18
|
+
type RadioProps,
|
|
19
|
+
RadioGroup,
|
|
20
|
+
type RadioGroupProps,
|
|
21
|
+
} from './components/Radio'
|
|
17
22
|
export { default as Switch, type SwitchProps } from './components/Switch'
|
|
18
23
|
export {
|
|
19
24
|
default as TextField,
|
package/src/type.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSProp, DefaultTheme } from 'styled-components'
|
|
2
|
-
import {
|
|
2
|
+
import { CharcoalTheme as Theme } from '@charcoal-ui/theme'
|
|
3
3
|
|
|
4
4
|
declare module 'styled-components' {
|
|
5
5
|
export interface DefaultTheme extends Theme {}
|