@charcoal-ui/react 2.0.1 → 2.1.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/dist/_lib/compat.d.ts +13 -13
- package/dist/_lib/index.d.ts +25 -25
- package/dist/components/Button/index.d.ts +21 -21
- package/dist/components/Button/index.story.d.ts +35 -35
- package/dist/components/Checkbox/index.d.ts +20 -20
- package/dist/components/Checkbox/index.story.d.ts +15 -15
- package/dist/components/Clickable/index.d.ts +18 -18
- package/dist/components/Clickable/index.story.d.ts +8 -8
- package/dist/components/DropdownSelector/Listbox.d.ts +9 -9
- package/dist/components/DropdownSelector/Popover.d.ts +9 -9
- package/dist/components/DropdownSelector/index.d.ts +31 -31
- package/dist/components/DropdownSelector/index.story.d.ts +21 -21
- package/dist/components/FieldLabel/index.d.ts +10 -10
- package/dist/components/Icon/index.d.ts +11 -11
- package/dist/components/Icon/index.story.d.ts +23 -23
- package/dist/components/IconButton/index.d.ts +13 -13
- package/dist/components/IconButton/index.story.d.ts +28 -28
- package/dist/components/LoadingSpinner/index.d.ts +14 -14
- package/dist/components/LoadingSpinner/index.story.d.ts +9 -9
- package/dist/components/Modal/ModalPlumbing.d.ts +4 -4
- package/dist/components/Modal/index.d.ts +41 -17
- package/dist/components/Modal/index.d.ts.map +1 -1
- package/dist/components/Modal/index.story.d.ts +32 -32
- package/dist/components/MultiSelect/context.d.ts +13 -13
- package/dist/components/MultiSelect/index.d.ts +23 -23
- package/dist/components/MultiSelect/index.story.d.ts +74 -74
- package/dist/components/MultiSelect/index.test.d.ts +1 -1
- package/dist/components/Radio/index.d.ts +23 -23
- package/dist/components/Radio/index.story.d.ts +33 -33
- package/dist/components/Radio/index.test.d.ts +1 -1
- package/dist/components/SegmentedControl/RadioGroupContext.d.ts +8 -8
- package/dist/components/SegmentedControl/index.d.ts +19 -19
- package/dist/components/SegmentedControl/index.story.d.ts +10 -10
- package/dist/components/Switch/index.d.ts +15 -15
- package/dist/components/Switch/index.story.d.ts +13 -13
- package/dist/components/TagItem/index.d.ts +25 -0
- package/dist/components/TagItem/index.d.ts.map +1 -0
- package/dist/components/TagItem/index.story.d.ts +26 -0
- package/dist/components/TagItem/index.story.d.ts.map +1 -0
- package/dist/components/TextField/index.d.ts +43 -43
- package/dist/components/TextField/index.story.d.ts +29 -29
- package/dist/components/a11y.test.d.ts +1 -1
- package/dist/core/ComponentAbstraction.d.ts +23 -23
- package/dist/core/OverlayProvider.d.ts +2 -0
- package/dist/core/OverlayProvider.d.ts.map +1 -0
- package/dist/core/SSRProvider.d.ts +1 -1
- package/dist/index.cjs +3333 -3297
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +18 -16
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4401 -0
- package/dist/index.js.map +1 -0
- package/dist/styled.d.ts +92 -92
- package/package.json +16 -14
- package/src/components/Modal/index.tsx +24 -0
- package/src/components/TagItem/index.story.tsx +188 -0
- package/src/components/TagItem/index.tsx +176 -0
- package/src/core/OverlayProvider.tsx +1 -0
- package/src/index.ts +2 -0
- package/dist/index.modern.js +0 -4685
- package/dist/index.modern.js.map +0 -1
- package/dist/index.module.js +0 -4371
- package/dist/index.module.js.map +0 -1
package/dist/styled.d.ts
CHANGED
|
@@ -1,93 +1,93 @@
|
|
|
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 surface10: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
15
|
-
readonly link1: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
16
|
-
readonly link2: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
17
|
-
readonly text1: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
18
|
-
readonly text2: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
19
|
-
readonly text3: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
20
|
-
readonly text4: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
21
|
-
readonly text5: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
22
|
-
readonly icon6: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
23
|
-
readonly brand: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
24
|
-
readonly assertive: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
25
|
-
readonly warning: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
26
|
-
readonly success: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
27
|
-
readonly updatedItem: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
28
|
-
readonly border: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
29
|
-
} & {
|
|
30
|
-
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>;
|
|
31
|
-
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>;
|
|
32
|
-
};
|
|
33
|
-
font: {
|
|
34
|
-
readonly transparent: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
35
|
-
readonly background1: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
36
|
-
readonly background2: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
37
|
-
readonly surface1: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
38
|
-
readonly surface2: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
39
|
-
readonly surface3: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
40
|
-
readonly surface4: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
41
|
-
readonly surface6: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
42
|
-
readonly surface7: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
43
|
-
readonly surface8: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
44
|
-
readonly surface9: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
45
|
-
readonly surface10: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
46
|
-
readonly link1: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
47
|
-
readonly link2: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
48
|
-
readonly text1: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
49
|
-
readonly text2: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
50
|
-
readonly text3: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
51
|
-
readonly text4: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
52
|
-
readonly text5: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
53
|
-
readonly icon6: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
54
|
-
readonly brand: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
55
|
-
readonly assertive: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
56
|
-
readonly warning: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
57
|
-
readonly success: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
58
|
-
readonly updatedItem: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
59
|
-
readonly border: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
60
|
-
};
|
|
61
|
-
}> & {
|
|
62
|
-
readonly typography: (size: keyof import("@charcoal-ui/theme").Typography) => import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, "bold" | "monospace" | "preserveHalfLeading">;
|
|
63
|
-
} & {
|
|
64
|
-
readonly margin: import("@charcoal-ui/styled").ModifiedArgumented<import("@charcoal-ui/styled").Internal, "
|
|
65
|
-
readonly padding: import("@charcoal-ui/styled").ModifiedArgumented<import("@charcoal-ui/styled").Internal, "
|
|
66
|
-
} & {
|
|
67
|
-
readonly width: Readonly<{
|
|
68
|
-
px: (size: 0 | "auto" | 4 | 8 | 16 | 24 | 40 | 64 | 104 | 168 | 272 | 440) => import("@charcoal-ui/styled").Internal;
|
|
69
|
-
column: (span: number) => import("@charcoal-ui/styled").Internal;
|
|
70
|
-
auto: import("@charcoal-ui/styled").Internal;
|
|
71
|
-
full: import("@charcoal-ui/styled").Internal;
|
|
72
|
-
}>;
|
|
73
|
-
readonly height: Readonly<{
|
|
74
|
-
px: (size: 0 | "auto" | 4 | 8 | 16 | 24 | 40 | 64 | 104 | 168 | 272 | 440) => import("@charcoal-ui/styled").Internal;
|
|
75
|
-
column: (span: number) => import("@charcoal-ui/styled").Internal;
|
|
76
|
-
auto: import("@charcoal-ui/styled").Internal;
|
|
77
|
-
full: import("@charcoal-ui/styled").Internal;
|
|
78
|
-
}>;
|
|
79
|
-
} & import("@charcoal-ui/styled").Internal & {
|
|
80
|
-
readonly disabled: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, never>;
|
|
81
|
-
} & Readonly<{
|
|
82
|
-
border: {
|
|
83
|
-
readonly default: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, "left" | "right" | "top" | "bottom">;
|
|
84
|
-
};
|
|
85
|
-
}> & Readonly<{
|
|
86
|
-
borderRadius: (radius: "none" | 4 | 8 | 16 | 24 | "oval") => import("@charcoal-ui/styled").Internal;
|
|
87
|
-
}> & Readonly<{
|
|
88
|
-
outline: {
|
|
89
|
-
readonly default: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, "focus">;
|
|
90
|
-
readonly assertive: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, "focus">;
|
|
91
|
-
};
|
|
92
|
-
}>) => 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>;
|
|
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 surface10: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
15
|
+
readonly link1: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
16
|
+
readonly link2: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
17
|
+
readonly text1: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
18
|
+
readonly text2: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
19
|
+
readonly text3: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
20
|
+
readonly text4: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
21
|
+
readonly text5: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
22
|
+
readonly icon6: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
23
|
+
readonly brand: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
24
|
+
readonly assertive: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
25
|
+
readonly warning: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
26
|
+
readonly success: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
27
|
+
readonly updatedItem: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
28
|
+
readonly border: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
29
|
+
} & {
|
|
30
|
+
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>;
|
|
31
|
+
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>;
|
|
32
|
+
};
|
|
33
|
+
font: {
|
|
34
|
+
readonly transparent: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
35
|
+
readonly background1: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
36
|
+
readonly background2: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
37
|
+
readonly surface1: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
38
|
+
readonly surface2: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
39
|
+
readonly surface3: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
40
|
+
readonly surface4: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
41
|
+
readonly surface6: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
42
|
+
readonly surface7: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
43
|
+
readonly surface8: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
44
|
+
readonly surface9: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
45
|
+
readonly surface10: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
46
|
+
readonly link1: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
47
|
+
readonly link2: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
48
|
+
readonly text1: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
49
|
+
readonly text2: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
50
|
+
readonly text3: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
51
|
+
readonly text4: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
52
|
+
readonly text5: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
53
|
+
readonly icon6: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
54
|
+
readonly brand: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
55
|
+
readonly assertive: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
56
|
+
readonly warning: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
57
|
+
readonly success: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
58
|
+
readonly updatedItem: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
59
|
+
readonly border: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, keyof import("@charcoal-ui/theme").ThemeEffect>;
|
|
60
|
+
};
|
|
61
|
+
}> & {
|
|
62
|
+
readonly typography: (size: keyof import("@charcoal-ui/theme").Typography) => import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, "bold" | "monospace" | "preserveHalfLeading">;
|
|
63
|
+
} & {
|
|
64
|
+
readonly margin: import("@charcoal-ui/styled").ModifiedArgumented<import("@charcoal-ui/styled").Internal, "horizontal" | "vertical" | "all" | "left" | "right" | "top" | "bottom", [0 | "auto" | 4 | 8 | 16 | 24 | 40 | 64 | 104 | 168 | 272 | 440]>;
|
|
65
|
+
readonly padding: import("@charcoal-ui/styled").ModifiedArgumented<import("@charcoal-ui/styled").Internal, "horizontal" | "vertical" | "all" | "left" | "right" | "top" | "bottom", [0 | "auto" | 4 | 8 | 16 | 24 | 40 | 64 | 104 | 168 | 272 | 440]>;
|
|
66
|
+
} & {
|
|
67
|
+
readonly width: Readonly<{
|
|
68
|
+
px: (size: 0 | "auto" | 4 | 8 | 16 | 24 | 40 | 64 | 104 | 168 | 272 | 440) => import("@charcoal-ui/styled").Internal;
|
|
69
|
+
column: (span: number) => import("@charcoal-ui/styled").Internal;
|
|
70
|
+
auto: import("@charcoal-ui/styled").Internal;
|
|
71
|
+
full: import("@charcoal-ui/styled").Internal;
|
|
72
|
+
}>;
|
|
73
|
+
readonly height: Readonly<{
|
|
74
|
+
px: (size: 0 | "auto" | 4 | 8 | 16 | 24 | 40 | 64 | 104 | 168 | 272 | 440) => import("@charcoal-ui/styled").Internal;
|
|
75
|
+
column: (span: number) => import("@charcoal-ui/styled").Internal;
|
|
76
|
+
auto: import("@charcoal-ui/styled").Internal;
|
|
77
|
+
full: import("@charcoal-ui/styled").Internal;
|
|
78
|
+
}>;
|
|
79
|
+
} & import("@charcoal-ui/styled").Internal & {
|
|
80
|
+
readonly disabled: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, never>;
|
|
81
|
+
} & Readonly<{
|
|
82
|
+
border: {
|
|
83
|
+
readonly default: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, "left" | "right" | "top" | "bottom">;
|
|
84
|
+
};
|
|
85
|
+
}> & Readonly<{
|
|
86
|
+
borderRadius: (radius: "none" | 4 | 8 | 16 | 24 | "oval") => import("@charcoal-ui/styled").Internal;
|
|
87
|
+
}> & Readonly<{
|
|
88
|
+
outline: {
|
|
89
|
+
readonly default: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, "focus">;
|
|
90
|
+
readonly assertive: import("@charcoal-ui/styled").Modified<import("@charcoal-ui/styled").Internal, "focus">;
|
|
91
|
+
};
|
|
92
|
+
}>) => 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>;
|
|
93
93
|
//# sourceMappingURL=styled.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@charcoal-ui/react",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"source": "./src/index.ts",
|
|
7
6
|
"main": "./dist/index.cjs",
|
|
8
|
-
"module": "./dist/index.
|
|
7
|
+
"module": "./dist/index.js",
|
|
9
8
|
"exports": {
|
|
10
9
|
"require": "./dist/index.cjs",
|
|
11
|
-
"default": "./dist/index.
|
|
10
|
+
"default": "./dist/index.js"
|
|
12
11
|
},
|
|
13
12
|
"types": "./dist/index.d.ts",
|
|
14
13
|
"sideEffects": false,
|
|
15
14
|
"scripts": {
|
|
16
|
-
"build": "
|
|
17
|
-
"
|
|
18
|
-
"
|
|
15
|
+
"build": "run-p --print-label 'build:*'",
|
|
16
|
+
"build:bundle": "FORCE_COLOR=1 tsup",
|
|
17
|
+
"build:dts": "tsc --project tsconfig.build.json --pretty --emitDeclarationOnly",
|
|
18
|
+
"typecheck": "tsc --project tsconfig.build.json --pretty --noEmit",
|
|
19
|
+
"clean": "rimraf dist .tsbuildinfo"
|
|
19
20
|
},
|
|
20
21
|
"devDependencies": {
|
|
21
22
|
"@react-types/switch": "^3.1.2",
|
|
@@ -39,20 +40,21 @@
|
|
|
39
40
|
"@types/warning": "^3.0.0",
|
|
40
41
|
"jest-axe": "^5.0.1",
|
|
41
42
|
"jest-styled-components": "^7.0.8",
|
|
42
|
-
"
|
|
43
|
+
"npm-run-all": "^4.1.5",
|
|
43
44
|
"react": "^17.0.2",
|
|
44
45
|
"react-dom": "^17.0.2",
|
|
45
46
|
"react-router-dom": "^6.2.1",
|
|
46
47
|
"rimraf": "^3.0.2",
|
|
47
48
|
"styled-components": "^5.3.3",
|
|
49
|
+
"tsup": "^6.5.0",
|
|
48
50
|
"typescript": "^4.5.5"
|
|
49
51
|
},
|
|
50
52
|
"dependencies": {
|
|
51
|
-
"@charcoal-ui/icons": "^2.0
|
|
52
|
-
"@charcoal-ui/styled": "^2.0
|
|
53
|
-
"@charcoal-ui/theme": "^2.0
|
|
54
|
-
"@charcoal-ui/utils": "^2.0
|
|
55
|
-
"@react-aria/button": "^3.6.
|
|
53
|
+
"@charcoal-ui/icons": "^2.1.0",
|
|
54
|
+
"@charcoal-ui/styled": "^2.1.0",
|
|
55
|
+
"@charcoal-ui/theme": "^2.1.0",
|
|
56
|
+
"@charcoal-ui/utils": "^2.1.0",
|
|
57
|
+
"@react-aria/button": "^3.6.3",
|
|
56
58
|
"@react-aria/checkbox": "^3.2.3",
|
|
57
59
|
"@react-aria/dialog": "^3.2.1",
|
|
58
60
|
"@react-aria/focus": "^3.6.1",
|
|
@@ -84,5 +86,5 @@
|
|
|
84
86
|
"url": "https://github.com/pixiv/charcoal.git",
|
|
85
87
|
"directory": "packages/react"
|
|
86
88
|
},
|
|
87
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "ad3c5f816dfc2ad8b5d6e3a4102fc664db1d9606"
|
|
88
90
|
}
|
|
@@ -36,6 +36,30 @@ export type ModalProps = AriaModalOverlayProps &
|
|
|
36
36
|
|
|
37
37
|
const DEFAULT_Z_INDEX = 10
|
|
38
38
|
|
|
39
|
+
/**
|
|
40
|
+
* モーダルコンポーネント。
|
|
41
|
+
*
|
|
42
|
+
* @example アプリケーションルートで `<OverlayProvider>` で囲った上で利用する
|
|
43
|
+
* ```tsx
|
|
44
|
+
* import {
|
|
45
|
+
* OverlayProvider,
|
|
46
|
+
* Modal,
|
|
47
|
+
* ModalHeader,
|
|
48
|
+
* ModalBody,
|
|
49
|
+
* ModalButtons
|
|
50
|
+
* } from '@charcoal-ui/react'
|
|
51
|
+
*
|
|
52
|
+
* <OverlayProvider>
|
|
53
|
+
* <App>
|
|
54
|
+
* <Modal isOpen={state.isOpen} onClose={() => state.close()} isDismissable>
|
|
55
|
+
* <ModalHeader />
|
|
56
|
+
* <ModalBody>...</ModalBody>
|
|
57
|
+
* <ModalButtons>...</ModalButtons>
|
|
58
|
+
* </Modal>
|
|
59
|
+
* </App>
|
|
60
|
+
* </OverlayProvider>
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
39
63
|
export default function Modal({
|
|
40
64
|
children,
|
|
41
65
|
zIndex = DEFAULT_Z_INDEX,
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { action } from '@storybook/addon-actions'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
import styled from 'styled-components'
|
|
4
|
+
import TagItem, { TagItemProps } from '.'
|
|
5
|
+
import { Story } from '../../_lib/compat'
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
title: 'TagItem',
|
|
9
|
+
component: TagItem,
|
|
10
|
+
argTypes: {
|
|
11
|
+
bgColor: {
|
|
12
|
+
control: {
|
|
13
|
+
type: 'color',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const Default: Story<TagItemProps> = (props) => {
|
|
20
|
+
return <TagItem {...props} onClick={action('click')} />
|
|
21
|
+
}
|
|
22
|
+
Default.args = {
|
|
23
|
+
label: '#女の子',
|
|
24
|
+
bgColor: '#7ACCB1',
|
|
25
|
+
href: '',
|
|
26
|
+
rel: '',
|
|
27
|
+
target: '',
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const Playground: Story<TagItemProps> = ({
|
|
31
|
+
bgColor,
|
|
32
|
+
label,
|
|
33
|
+
translatedLabel,
|
|
34
|
+
}) => {
|
|
35
|
+
return (
|
|
36
|
+
<div>
|
|
37
|
+
<Container>
|
|
38
|
+
<div>
|
|
39
|
+
<TagItem
|
|
40
|
+
label={label}
|
|
41
|
+
size="M"
|
|
42
|
+
status="default"
|
|
43
|
+
bgColor={bgColor}
|
|
44
|
+
onClick={action('click')}
|
|
45
|
+
/>
|
|
46
|
+
</div>
|
|
47
|
+
<div />
|
|
48
|
+
<div>
|
|
49
|
+
<TagItem
|
|
50
|
+
label={label}
|
|
51
|
+
translatedLabel={translatedLabel}
|
|
52
|
+
size="M"
|
|
53
|
+
status="default"
|
|
54
|
+
bgColor={bgColor}
|
|
55
|
+
onClick={action('click')}
|
|
56
|
+
/>
|
|
57
|
+
</div>
|
|
58
|
+
<div />
|
|
59
|
+
</Container>
|
|
60
|
+
<Container>
|
|
61
|
+
<div>
|
|
62
|
+
<TagItem
|
|
63
|
+
label={label}
|
|
64
|
+
size="M"
|
|
65
|
+
status="active"
|
|
66
|
+
bgColor={bgColor}
|
|
67
|
+
onClick={action('click')}
|
|
68
|
+
/>
|
|
69
|
+
</div>
|
|
70
|
+
<div />
|
|
71
|
+
<div>
|
|
72
|
+
<TagItem
|
|
73
|
+
label={label}
|
|
74
|
+
translatedLabel={translatedLabel}
|
|
75
|
+
size="M"
|
|
76
|
+
status="active"
|
|
77
|
+
bgColor={bgColor}
|
|
78
|
+
onClick={action('click')}
|
|
79
|
+
/>
|
|
80
|
+
</div>
|
|
81
|
+
<div />
|
|
82
|
+
</Container>
|
|
83
|
+
<Container>
|
|
84
|
+
<div>
|
|
85
|
+
<TagItem
|
|
86
|
+
label={label}
|
|
87
|
+
size="M"
|
|
88
|
+
status="inactive"
|
|
89
|
+
bgColor={bgColor}
|
|
90
|
+
onClick={action('click')}
|
|
91
|
+
/>
|
|
92
|
+
</div>
|
|
93
|
+
<div>
|
|
94
|
+
<TagItem
|
|
95
|
+
label={label}
|
|
96
|
+
size="M"
|
|
97
|
+
status="inactive"
|
|
98
|
+
disabled
|
|
99
|
+
bgColor={bgColor}
|
|
100
|
+
onClick={action('click')}
|
|
101
|
+
/>
|
|
102
|
+
</div>
|
|
103
|
+
<div>
|
|
104
|
+
<TagItem
|
|
105
|
+
label={label}
|
|
106
|
+
translatedLabel={translatedLabel}
|
|
107
|
+
size="M"
|
|
108
|
+
status="inactive"
|
|
109
|
+
bgColor={bgColor}
|
|
110
|
+
onClick={action('click')}
|
|
111
|
+
/>
|
|
112
|
+
</div>
|
|
113
|
+
<div>
|
|
114
|
+
<TagItem
|
|
115
|
+
label={label}
|
|
116
|
+
translatedLabel={translatedLabel}
|
|
117
|
+
size="M"
|
|
118
|
+
status="inactive"
|
|
119
|
+
disabled
|
|
120
|
+
bgColor={bgColor}
|
|
121
|
+
onClick={action('click')}
|
|
122
|
+
/>
|
|
123
|
+
</div>
|
|
124
|
+
</Container>
|
|
125
|
+
<Container>
|
|
126
|
+
<div>
|
|
127
|
+
<TagItem
|
|
128
|
+
label={label}
|
|
129
|
+
size="S"
|
|
130
|
+
status="default"
|
|
131
|
+
bgColor={bgColor}
|
|
132
|
+
onClick={action('click')}
|
|
133
|
+
/>
|
|
134
|
+
</div>
|
|
135
|
+
</Container>
|
|
136
|
+
<Container>
|
|
137
|
+
<div>
|
|
138
|
+
<TagItem
|
|
139
|
+
label={label}
|
|
140
|
+
size="S"
|
|
141
|
+
status="active"
|
|
142
|
+
bgColor={bgColor}
|
|
143
|
+
onClick={action('click')}
|
|
144
|
+
/>
|
|
145
|
+
</div>
|
|
146
|
+
</Container>
|
|
147
|
+
<Container>
|
|
148
|
+
<div>
|
|
149
|
+
<TagItem
|
|
150
|
+
label={label}
|
|
151
|
+
size="S"
|
|
152
|
+
status="inactive"
|
|
153
|
+
bgColor={bgColor}
|
|
154
|
+
onClick={action('click')}
|
|
155
|
+
/>
|
|
156
|
+
</div>
|
|
157
|
+
<div>
|
|
158
|
+
<TagItem
|
|
159
|
+
label={label}
|
|
160
|
+
size="S"
|
|
161
|
+
status="inactive"
|
|
162
|
+
disabled
|
|
163
|
+
bgColor={bgColor}
|
|
164
|
+
onClick={action('click')}
|
|
165
|
+
/>
|
|
166
|
+
</div>
|
|
167
|
+
</Container>
|
|
168
|
+
</div>
|
|
169
|
+
)
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
const Container = styled.div`
|
|
173
|
+
display: grid;
|
|
174
|
+
grid-template-columns: repeat(4, 1fr);
|
|
175
|
+
|
|
176
|
+
& > div {
|
|
177
|
+
display: flex;
|
|
178
|
+
align-items: center;
|
|
179
|
+
justify-content: center;
|
|
180
|
+
padding: 1em;
|
|
181
|
+
}
|
|
182
|
+
`
|
|
183
|
+
|
|
184
|
+
Playground.args = {
|
|
185
|
+
label: '#女の子',
|
|
186
|
+
translatedLabel: 'girl',
|
|
187
|
+
bgColor: '#7ACCB1',
|
|
188
|
+
}
|