@discourser/design-system 0.9.3 → 0.9.4
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/components/AbsoluteCenter.d.ts +4 -0
- package/dist/components/AbsoluteCenter.d.ts.map +1 -0
- package/dist/components/Accordion.d.ts +12 -0
- package/dist/components/Accordion.d.ts.map +1 -0
- package/dist/components/Avatar.d.ts +17 -0
- package/dist/components/Avatar.d.ts.map +1 -0
- package/dist/components/Badge.d.ts +13 -0
- package/dist/components/Badge.d.ts.map +1 -0
- package/dist/components/Button.d.ts +39 -0
- package/dist/components/Button.d.ts.map +1 -0
- package/dist/components/Card.d.ts +17 -0
- package/dist/components/Card.d.ts.map +1 -0
- package/dist/components/Checkbox.d.ts +507 -0
- package/dist/components/Checkbox.d.ts.map +1 -0
- package/dist/components/CloseButton.d.ts +4 -0
- package/dist/components/CloseButton.d.ts.map +1 -0
- package/dist/components/Dialog.d.ts +16 -0
- package/dist/components/Dialog.d.ts.map +1 -0
- package/dist/components/Drawer.d.ts +17 -0
- package/dist/components/Drawer.d.ts.map +1 -0
- package/dist/components/Group.d.ts +4 -0
- package/dist/components/Group.d.ts.map +1 -0
- package/dist/components/Heading.d.ts +10 -0
- package/dist/components/Heading.d.ts.map +1 -0
- package/dist/components/Icon.d.ts +4 -0
- package/dist/components/Icon.d.ts.map +1 -0
- package/dist/components/IconButton.d.ts +5 -0
- package/dist/components/IconButton.d.ts.map +1 -0
- package/dist/components/Input.d.ts +5 -0
- package/dist/components/Input.d.ts.map +1 -0
- package/dist/components/InputAddon.d.ts +4 -0
- package/dist/components/InputAddon.d.ts.map +1 -0
- package/dist/components/InputGroup.d.ts +14 -0
- package/dist/components/InputGroup.d.ts.map +1 -0
- package/dist/components/Loader.d.ts +25 -0
- package/dist/components/Loader.d.ts.map +1 -0
- package/dist/components/Popover.d.ts +20 -0
- package/dist/components/Popover.d.ts.map +1 -0
- package/dist/components/Progress.d.ts +14 -0
- package/dist/components/Progress.d.ts.map +1 -0
- package/dist/components/RadioGroup.d.ts +14 -0
- package/dist/components/RadioGroup.d.ts.map +1 -0
- package/dist/components/Select.d.ts +26 -0
- package/dist/components/Select.d.ts.map +1 -0
- package/dist/components/Skeleton.d.ts +16 -0
- package/dist/components/Skeleton.d.ts.map +1 -0
- package/dist/components/Slider.d.ts +34 -0
- package/dist/components/Slider.d.ts.map +1 -0
- package/dist/components/Spinner.d.ts +4 -0
- package/dist/components/Spinner.d.ts.map +1 -0
- package/dist/components/Switch.d.ts +10 -0
- package/dist/components/Switch.d.ts.map +1 -0
- package/dist/components/Tabs.d.ts +11 -0
- package/dist/components/Tabs.d.ts.map +1 -0
- package/dist/components/Textarea.d.ts +5 -0
- package/dist/components/Textarea.d.ts.map +1 -0
- package/dist/components/Toast.d.ts +4 -0
- package/dist/components/Toast.d.ts.map +1 -0
- package/dist/components/Tooltip.d.ts +19 -0
- package/dist/components/Tooltip.d.ts.map +1 -0
- package/dist/components/index.d.ts +30 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/contracts/design-language.contract.d.ts +175 -0
- package/dist/contracts/design-language.contract.d.ts.map +1 -0
- package/dist/index.d.ts +7 -21506
- package/dist/index.d.ts.map +1 -0
- package/dist/languages/index.d.ts +4 -0
- package/dist/languages/index.d.ts.map +1 -0
- package/dist/languages/material3.language.d.ts +9 -0
- package/dist/languages/material3.language.d.ts.map +1 -0
- package/dist/languages/transform.d.ts +98 -0
- package/dist/languages/transform.d.ts.map +1 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/preset/colors/index.d.ts +1485 -0
- package/dist/preset/colors/index.d.ts.map +1 -0
- package/dist/preset/colors/m3-error.d.ts +295 -0
- package/dist/preset/colors/m3-error.d.ts.map +1 -0
- package/dist/preset/colors/m3-neutral.d.ts +301 -0
- package/dist/preset/colors/m3-neutral.d.ts.map +1 -0
- package/dist/preset/colors/m3-primary.d.ts +312 -0
- package/dist/preset/colors/m3-primary.d.ts.map +1 -0
- package/dist/preset/index.d.ts +3 -0
- package/dist/preset/index.d.ts.map +1 -0
- package/dist/preset/layer-styles.d.ts +6 -0
- package/dist/preset/layer-styles.d.ts.map +1 -0
- package/dist/preset/recipes/absolute-center.d.ts +2 -0
- package/dist/preset/recipes/absolute-center.d.ts.map +1 -0
- package/dist/preset/recipes/accordion.d.ts +2 -0
- package/dist/preset/recipes/accordion.d.ts.map +1 -0
- package/dist/preset/recipes/avatar.d.ts +2 -0
- package/dist/preset/recipes/avatar.d.ts.map +1 -0
- package/dist/preset/recipes/badge.d.ts +2 -0
- package/dist/preset/recipes/badge.d.ts.map +1 -0
- package/dist/preset/recipes/button.d.ts +2 -0
- package/dist/preset/recipes/button.d.ts.map +1 -0
- package/dist/preset/recipes/card.d.ts +2 -0
- package/dist/preset/recipes/card.d.ts.map +1 -0
- package/dist/preset/recipes/checkbox.d.ts +2 -0
- package/dist/preset/recipes/checkbox.d.ts.map +1 -0
- package/dist/preset/recipes/dialog.d.ts +2 -0
- package/dist/preset/recipes/dialog.d.ts.map +1 -0
- package/dist/preset/recipes/drawer.d.ts +2 -0
- package/dist/preset/recipes/drawer.d.ts.map +1 -0
- package/dist/preset/recipes/field.d.ts +2 -0
- package/dist/preset/recipes/field.d.ts.map +1 -0
- package/dist/preset/recipes/group.d.ts +2 -0
- package/dist/preset/recipes/group.d.ts.map +1 -0
- package/dist/preset/recipes/heading.d.ts +2 -0
- package/dist/preset/recipes/heading.d.ts.map +1 -0
- package/dist/preset/recipes/index.d.ts +28 -0
- package/dist/preset/recipes/index.d.ts.map +1 -0
- package/dist/preset/recipes/input-addon.d.ts +2 -0
- package/dist/preset/recipes/input-addon.d.ts.map +1 -0
- package/dist/preset/recipes/input-group.d.ts +2 -0
- package/dist/preset/recipes/input-group.d.ts.map +1 -0
- package/dist/preset/recipes/input.d.ts +114 -0
- package/dist/preset/recipes/input.d.ts.map +1 -0
- package/dist/preset/recipes/popover.d.ts +2 -0
- package/dist/preset/recipes/popover.d.ts.map +1 -0
- package/dist/preset/recipes/progress.d.ts +2 -0
- package/dist/preset/recipes/progress.d.ts.map +1 -0
- package/dist/preset/recipes/radio-group.d.ts +2 -0
- package/dist/preset/recipes/radio-group.d.ts.map +1 -0
- package/dist/preset/recipes/select.d.ts +2 -0
- package/dist/preset/recipes/select.d.ts.map +1 -0
- package/dist/preset/recipes/skeleton.d.ts +2 -0
- package/dist/preset/recipes/skeleton.d.ts.map +1 -0
- package/dist/preset/recipes/slider.d.ts +2 -0
- package/dist/preset/recipes/slider.d.ts.map +1 -0
- package/dist/preset/recipes/spinner.d.ts +2 -0
- package/dist/preset/recipes/spinner.d.ts.map +1 -0
- package/dist/preset/recipes/switch.d.ts +2 -0
- package/dist/preset/recipes/switch.d.ts.map +1 -0
- package/dist/preset/recipes/tabs.d.ts +2 -0
- package/dist/preset/recipes/tabs.d.ts.map +1 -0
- package/dist/preset/recipes/textarea.d.ts +2 -0
- package/dist/preset/recipes/textarea.d.ts.map +1 -0
- package/dist/preset/recipes/toast.d.ts +2 -0
- package/dist/preset/recipes/toast.d.ts.map +1 -0
- package/dist/preset/recipes/tooltip.d.ts +2 -0
- package/dist/preset/recipes/tooltip.d.ts.map +1 -0
- package/dist/preset/semantic-tokens.d.ts +197 -0
- package/dist/preset/semantic-tokens.d.ts.map +1 -0
- package/dist/preset/shadows.d.ts +49 -0
- package/dist/preset/shadows.d.ts.map +1 -0
- package/dist/preset/text-styles.d.ts +6 -0
- package/dist/preset/text-styles.d.ts.map +1 -0
- package/dist/recipes/button.recipe.d.ts +2 -0
- package/dist/recipes/button.recipe.d.ts.map +1 -0
- package/dist/recipes/card.recipe.d.ts +2 -0
- package/dist/recipes/card.recipe.d.ts.map +1 -0
- package/dist/recipes/dialog.recipe.d.ts +2 -0
- package/dist/recipes/dialog.recipe.d.ts.map +1 -0
- package/dist/recipes/icon-button.recipe.d.ts +2 -0
- package/dist/recipes/icon-button.recipe.d.ts.map +1 -0
- package/dist/recipes/index.d.ts +7 -0
- package/dist/recipes/index.d.ts.map +1 -0
- package/dist/recipes/input.recipe.d.ts +2 -0
- package/dist/recipes/input.recipe.d.ts.map +1 -0
- package/dist/recipes/switch.recipe.d.ts +2 -0
- package/dist/recipes/switch.recipe.d.ts.map +1 -0
- package/dist/stories/foundations/components/ColorSwatch.d.ts +21 -0
- package/dist/stories/foundations/components/ColorSwatch.d.ts.map +1 -0
- package/dist/stories/foundations/components/ElevationCard.d.ts +11 -0
- package/dist/stories/foundations/components/ElevationCard.d.ts.map +1 -0
- package/dist/stories/foundations/components/SpacingBox.d.ts +11 -0
- package/dist/stories/foundations/components/SpacingBox.d.ts.map +1 -0
- package/dist/stories/foundations/components/TypeSpecimen.d.ts +12 -0
- package/dist/stories/foundations/components/TypeSpecimen.d.ts.map +1 -0
- package/dist/utils/cn.d.ts +6 -0
- package/dist/utils/cn.d.ts.map +1 -0
- package/package.json +4 -2
- package/src/components/AbsoluteCenter.tsx +7 -0
- package/src/components/Accordion.tsx +27 -0
- package/src/components/Avatar.tsx +55 -0
- package/src/components/Badge.tsx +29 -0
- package/src/components/Button.tsx +116 -0
- package/src/components/Card.tsx +24 -0
- package/src/components/Checkbox.tsx +48 -0
- package/src/components/CloseButton.tsx +21 -0
- package/src/components/Dialog.tsx +25 -0
- package/src/components/Drawer.tsx +29 -0
- package/src/components/Group.tsx +7 -0
- package/src/components/Heading.tsx +9 -0
- package/src/components/Icon.tsx +6 -0
- package/src/components/IconButton.tsx +10 -0
- package/src/components/Input.tsx +7 -0
- package/src/components/InputAddon.tsx +7 -0
- package/src/components/InputGroup.tsx +44 -0
- package/src/components/Loader.tsx +71 -0
- package/src/components/Popover.tsx +34 -0
- package/src/components/Progress.tsx +19 -0
- package/src/components/RadioGroup.tsx +21 -0
- package/src/components/Select.tsx +70 -0
- package/src/components/Skeleton.tsx +37 -0
- package/src/components/Slider.tsx +156 -0
- package/src/components/Spinner.tsx +7 -0
- package/src/components/Switch.tsx +19 -0
- package/src/components/Tabs.tsx +17 -0
- package/src/components/Textarea.tsx +7 -0
- package/src/components/Toast.tsx +96 -0
- package/src/components/Tooltip.tsx +65 -0
- package/src/components/index.ts +48 -0
- package/src/contracts/design-language.contract.ts +198 -0
- package/src/global.css +4 -0
- package/src/index.ts +18 -0
- package/src/languages/index.ts +9 -0
- package/src/languages/material3.language.ts +379 -0
- package/src/languages/transform.ts +131 -0
- package/src/main.ts +33 -0
- package/src/preset/colors/index.ts +14 -0
- package/src/preset/colors/m3-error.ts +76 -0
- package/src/preset/colors/m3-neutral.ts +89 -0
- package/src/preset/colors/m3-primary.ts +107 -0
- package/src/preset/index.ts +189 -0
- package/src/preset/layer-styles.ts +14 -0
- package/src/preset/recipes/absolute-center.ts +37 -0
- package/src/preset/recipes/accordion.ts +92 -0
- package/src/preset/recipes/avatar.ts +152 -0
- package/src/preset/recipes/badge.ts +49 -0
- package/src/preset/recipes/button.ts +110 -0
- package/src/preset/recipes/card.ts +69 -0
- package/src/preset/recipes/checkbox.ts +109 -0
- package/src/preset/recipes/dialog.ts +157 -0
- package/src/preset/recipes/drawer.ts +203 -0
- package/src/preset/recipes/field.ts +40 -0
- package/src/preset/recipes/group.ts +77 -0
- package/src/preset/recipes/heading.ts +26 -0
- package/src/preset/recipes/index.ts +40 -0
- package/src/preset/recipes/input-addon.ts +42 -0
- package/src/preset/recipes/input-group.ts +66 -0
- package/src/preset/recipes/input.ts +87 -0
- package/src/preset/recipes/popover.ts +77 -0
- package/src/preset/recipes/progress.ts +120 -0
- package/src/preset/recipes/radio-group.ts +99 -0
- package/src/preset/recipes/select.ts +175 -0
- package/src/preset/recipes/skeleton.ts +64 -0
- package/src/preset/recipes/slider.ts +174 -0
- package/src/preset/recipes/spinner.ts +33 -0
- package/src/preset/recipes/switch.ts +136 -0
- package/src/preset/recipes/tabs.ts +177 -0
- package/src/preset/recipes/textarea.ts +82 -0
- package/src/preset/recipes/toast.ts +51 -0
- package/src/preset/recipes/tooltip.ts +38 -0
- package/src/preset/semantic-tokens.ts +75 -0
- package/src/preset/shadows.ts +50 -0
- package/src/preset/text-styles.ts +21 -0
- package/src/recipes/button.recipe.ts +120 -0
- package/src/recipes/card.recipe.ts +50 -0
- package/src/recipes/dialog.recipe.ts +130 -0
- package/src/recipes/icon-button.recipe.ts +96 -0
- package/src/recipes/index.ts +6 -0
- package/src/recipes/input.recipe.ts +93 -0
- package/src/recipes/switch.recipe.ts +117 -0
- package/src/stories/foundations/Colors.mdx +380 -0
- package/src/stories/foundations/Elevation.mdx +292 -0
- package/src/stories/foundations/Spacing.mdx +223 -0
- package/src/stories/foundations/Typography.mdx +264 -0
- package/src/stories/foundations/components/ColorSwatch.tsx +166 -0
- package/src/stories/foundations/components/ElevationCard.tsx +81 -0
- package/src/stories/foundations/components/SpacingBox.tsx +94 -0
- package/src/stories/foundations/components/TypeSpecimen.tsx +117 -0
- package/src/test/setup.ts +12 -0
- package/src/test/vitest.d.ts +29 -0
- package/src/utils/cn.ts +8 -0
- package/src/vite-env.d.ts +1 -0
- package/dist/index.d.cts +0 -21506
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../src/preset/recipes/tabs.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI,0CA6Kf,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../src/preset/recipes/textarea.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,mFA+EnB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../../src/preset/recipes/toast.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,KAAK,0CA+ChB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../src/preset/recipes/tooltip.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO,0CAkClB,CAAA"}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* M3 Semantic Tokens - layered on top of Park UI
|
|
3
|
+
*
|
|
4
|
+
* These provide M3-style naming (surface, onSurface, etc.)
|
|
5
|
+
* while Park UI components use their own naming (fg, canvas, etc.)
|
|
6
|
+
*/
|
|
7
|
+
export declare const m3SemanticTokens: {
|
|
8
|
+
surface: {
|
|
9
|
+
DEFAULT: {
|
|
10
|
+
value: {
|
|
11
|
+
base: string;
|
|
12
|
+
_dark: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
dim: {
|
|
16
|
+
value: {
|
|
17
|
+
base: string;
|
|
18
|
+
_dark: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
bright: {
|
|
22
|
+
value: {
|
|
23
|
+
base: string;
|
|
24
|
+
_dark: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
container: {
|
|
28
|
+
DEFAULT: {
|
|
29
|
+
value: {
|
|
30
|
+
base: string;
|
|
31
|
+
_dark: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
low: {
|
|
35
|
+
value: {
|
|
36
|
+
base: string;
|
|
37
|
+
_dark: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
lowest: {
|
|
41
|
+
value: {
|
|
42
|
+
base: string;
|
|
43
|
+
_dark: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
high: {
|
|
47
|
+
value: {
|
|
48
|
+
base: string;
|
|
49
|
+
_dark: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
highest: {
|
|
53
|
+
value: {
|
|
54
|
+
base: string;
|
|
55
|
+
_dark: string;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
onSurface: {
|
|
61
|
+
DEFAULT: {
|
|
62
|
+
value: {
|
|
63
|
+
base: string;
|
|
64
|
+
_dark: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
variant: {
|
|
68
|
+
value: {
|
|
69
|
+
base: string;
|
|
70
|
+
_dark: string;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
m3Primary: {
|
|
75
|
+
DEFAULT: {
|
|
76
|
+
value: {
|
|
77
|
+
base: string;
|
|
78
|
+
_dark: string;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
container: {
|
|
82
|
+
value: {
|
|
83
|
+
base: string;
|
|
84
|
+
_dark: string;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
onM3Primary: {
|
|
89
|
+
DEFAULT: {
|
|
90
|
+
value: {
|
|
91
|
+
base: string;
|
|
92
|
+
_dark: string;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
container: {
|
|
96
|
+
value: {
|
|
97
|
+
base: string;
|
|
98
|
+
_dark: string;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
secondary: {
|
|
103
|
+
DEFAULT: {
|
|
104
|
+
value: {
|
|
105
|
+
base: string;
|
|
106
|
+
_dark: string;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
container: {
|
|
110
|
+
value: {
|
|
111
|
+
base: string;
|
|
112
|
+
_dark: string;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
onSecondary: {
|
|
117
|
+
DEFAULT: {
|
|
118
|
+
value: {
|
|
119
|
+
base: string;
|
|
120
|
+
_dark: string;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
container: {
|
|
124
|
+
value: {
|
|
125
|
+
base: string;
|
|
126
|
+
_dark: string;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
tertiary: {
|
|
131
|
+
DEFAULT: {
|
|
132
|
+
value: {
|
|
133
|
+
base: string;
|
|
134
|
+
_dark: string;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
container: {
|
|
138
|
+
value: {
|
|
139
|
+
base: string;
|
|
140
|
+
_dark: string;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
onTertiary: {
|
|
145
|
+
DEFAULT: {
|
|
146
|
+
value: {
|
|
147
|
+
base: string;
|
|
148
|
+
_dark: string;
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
container: {
|
|
152
|
+
value: {
|
|
153
|
+
base: string;
|
|
154
|
+
_dark: string;
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
outline: {
|
|
159
|
+
DEFAULT: {
|
|
160
|
+
value: {
|
|
161
|
+
base: string;
|
|
162
|
+
_dark: string;
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
variant: {
|
|
166
|
+
value: {
|
|
167
|
+
base: string;
|
|
168
|
+
_dark: string;
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
inverseSurface: {
|
|
173
|
+
value: {
|
|
174
|
+
base: string;
|
|
175
|
+
_dark: string;
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
inverseOnSurface: {
|
|
179
|
+
value: {
|
|
180
|
+
base: string;
|
|
181
|
+
_dark: string;
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
inversePrimary: {
|
|
185
|
+
value: {
|
|
186
|
+
base: string;
|
|
187
|
+
_dark: string;
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
scrim: {
|
|
191
|
+
value: {
|
|
192
|
+
base: string;
|
|
193
|
+
_dark: string;
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
//# sourceMappingURL=semantic-tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"semantic-tokens.d.ts","sourceRoot":"","sources":["../../src/preset/semantic-tokens.ts"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8D3B,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shadow semantic tokens from Park UI
|
|
3
|
+
* Adjusted to use 'base' instead of '_light' and neutral.a* instead of black.a*
|
|
4
|
+
*/
|
|
5
|
+
export declare const shadows: {
|
|
6
|
+
xs: {
|
|
7
|
+
value: {
|
|
8
|
+
base: string;
|
|
9
|
+
_dark: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
sm: {
|
|
13
|
+
value: {
|
|
14
|
+
base: string;
|
|
15
|
+
_dark: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
md: {
|
|
19
|
+
value: {
|
|
20
|
+
base: string;
|
|
21
|
+
_dark: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
lg: {
|
|
25
|
+
value: {
|
|
26
|
+
base: string;
|
|
27
|
+
_dark: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
xl: {
|
|
31
|
+
value: {
|
|
32
|
+
base: string;
|
|
33
|
+
_dark: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
'2xl': {
|
|
37
|
+
value: {
|
|
38
|
+
base: string;
|
|
39
|
+
_dark: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
inset: {
|
|
43
|
+
value: {
|
|
44
|
+
base: string;
|
|
45
|
+
_dark: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=shadows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shadows.d.ts","sourceRoot":"","sources":["../../src/preset/shadows.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2ClB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-styles.d.ts","sourceRoot":"","sources":["../../src/preset/text-styles.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,UAAU,oCAcrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.recipe.d.ts","sourceRoot":"","sources":["../../src/recipes/button.recipe.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,mFAqHvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.recipe.d.ts","sourceRoot":"","sources":["../../src/recipes/card.recipe.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,mFA+CrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.recipe.d.ts","sourceRoot":"","sources":["../../src/recipes/dialog.recipe.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,0CA+HvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon-button.recipe.d.ts","sourceRoot":"","sources":["../../src/recipes/icon-button.recipe.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,mFA6F3B,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { buttonRecipe } from './button.recipe';
|
|
2
|
+
export { cardRecipe } from './card.recipe';
|
|
3
|
+
export { iconButtonRecipe } from './icon-button.recipe';
|
|
4
|
+
export { inputRecipe } from './input.recipe';
|
|
5
|
+
export { dialogRecipe } from './dialog.recipe';
|
|
6
|
+
export { switchRecipe } from './switch.recipe';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/recipes/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.recipe.d.ts","sourceRoot":"","sources":["../../src/recipes/input.recipe.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,mFA0FtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.recipe.d.ts","sourceRoot":"","sources":["../../src/recipes/switch.recipe.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,0CAkHvB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
interface ColorSwatchProps {
|
|
2
|
+
name: string;
|
|
3
|
+
value: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const ColorSwatch: ({ name, value, description }: ColorSwatchProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
interface TonalSwatchProps {
|
|
8
|
+
paletteName: string;
|
|
9
|
+
tone: number;
|
|
10
|
+
value: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const TonalSwatch: ({ paletteName, tone, value }: TonalSwatchProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
interface SemanticSwatchProps {
|
|
14
|
+
name: string;
|
|
15
|
+
lightValue: string;
|
|
16
|
+
darkValue: string;
|
|
17
|
+
description?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const SemanticSwatch: ({ name, lightValue, darkValue, description, }: SemanticSwatchProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=ColorSwatch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColorSwatch.d.ts","sourceRoot":"","sources":["../../../../src/stories/foundations/components/ColorSwatch.tsx"],"names":[],"mappings":"AAEA,UAAU,gBAAgB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,WAAW,GAAI,8BAA8B,gBAAgB,4CA2CzE,CAAC;AAEF,UAAU,gBAAgB;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,WAAW,GAAI,8BAA8B,gBAAgB,4CAyBzE,CAAC;AAEF,UAAU,mBAAmB;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,cAAc,GAAI,+CAK5B,mBAAmB,4CAmErB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface ElevationCardProps {
|
|
2
|
+
level: string;
|
|
3
|
+
shadow: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const ElevationCard: ({ level, shadow }: ElevationCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
interface ElevationGridProps {
|
|
7
|
+
elevations: Record<string, string>;
|
|
8
|
+
}
|
|
9
|
+
export declare const ElevationGrid: ({ elevations }: ElevationGridProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=ElevationCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ElevationCard.d.ts","sourceRoot":"","sources":["../../../../src/stories/foundations/components/ElevationCard.tsx"],"names":[],"mappings":"AAEA,UAAU,kBAAkB;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,aAAa,GAAI,mBAAmB,kBAAkB,4CAiDlE,CAAC;AAEF,UAAU,kBAAkB;IAC1B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpC;AAED,eAAO,MAAM,aAAa,GAAI,gBAAgB,kBAAkB,4CAkB/D,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface SpacingBoxProps {
|
|
2
|
+
name: string;
|
|
3
|
+
value: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const SpacingBox: ({ name, value }: SpacingBoxProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
interface SpacingGridProps {
|
|
7
|
+
spacings: Record<string, string>;
|
|
8
|
+
}
|
|
9
|
+
export declare const SpacingGrid: ({ spacings }: SpacingGridProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=SpacingBox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpacingBox.d.ts","sourceRoot":"","sources":["../../../../src/stories/foundations/components/SpacingBox.tsx"],"names":[],"mappings":"AAEA,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,UAAU,GAAI,iBAAiB,eAAe,4CAiE1D,CAAC;AAEF,UAAU,gBAAgB;IACxB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED,eAAO,MAAM,WAAW,GAAI,cAAc,gBAAgB,4CAezD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface TypeSpecimenProps {
|
|
2
|
+
name: string;
|
|
3
|
+
fontSize: string;
|
|
4
|
+
lineHeight: string;
|
|
5
|
+
fontWeight: string;
|
|
6
|
+
letterSpacing: string;
|
|
7
|
+
fontFamily: string;
|
|
8
|
+
sampleText?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const TypeSpecimen: ({ name, fontSize, lineHeight, fontWeight, letterSpacing, fontFamily, sampleText, }: TypeSpecimenProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=TypeSpecimen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TypeSpecimen.d.ts","sourceRoot":"","sources":["../../../../src/stories/foundations/components/TypeSpecimen.tsx"],"names":[],"mappings":"AAEA,UAAU,iBAAiB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,YAAY,GAAI,oFAQ1B,iBAAiB,4CAsFnB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../src/utils/cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAE7C;;GAEG;AACH,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@discourser/design-system",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.4",
|
|
4
4
|
"description": "Aesthetic-agnostic design system with Panda CSS and Ark UI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -60,14 +60,16 @@
|
|
|
60
60
|
"files": [
|
|
61
61
|
"dist",
|
|
62
62
|
"styled-system",
|
|
63
|
+
"src",
|
|
63
64
|
"guidelines"
|
|
64
65
|
],
|
|
65
66
|
"scripts": {
|
|
66
67
|
"dev": "pnpm docs:generate && storybook dev -p 6006",
|
|
67
|
-
"build": "pnpm build:panda && pnpm build:lib && pnpm build:css",
|
|
68
|
+
"build": "pnpm build:panda && pnpm build:lib && pnpm build:types && pnpm build:css",
|
|
68
69
|
"build:panda": "panda codegen",
|
|
69
70
|
"build:css": "panda cssgen --outfile dist/styles.css",
|
|
70
71
|
"build:lib": "tsup",
|
|
72
|
+
"build:types": "tsc --project tsconfig.build.json",
|
|
71
73
|
"build:storybook": "pnpm docs:generate && storybook build",
|
|
72
74
|
"prepare": "panda codegen && husky",
|
|
73
75
|
"lint": "eslint src --ext .ts,.tsx",
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ark } from '@ark-ui/react/factory'
|
|
2
|
+
import type { ComponentProps } from 'react'
|
|
3
|
+
import { styled } from 'styled-system/jsx'
|
|
4
|
+
import { absoluteCenter } from 'styled-system/recipes'
|
|
5
|
+
|
|
6
|
+
export type AbsoluteCenterProps = ComponentProps<typeof AbsoluteCenter>
|
|
7
|
+
export const AbsoluteCenter = styled(ark.div, absoluteCenter)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { Accordion } from '@ark-ui/react/accordion'
|
|
3
|
+
import { ark } from '@ark-ui/react/factory'
|
|
4
|
+
import type { ComponentProps } from 'react'
|
|
5
|
+
import { createStyleContext } from 'styled-system/jsx'
|
|
6
|
+
import { accordion } from 'styled-system/recipes'
|
|
7
|
+
|
|
8
|
+
const ChevronDownIcon = () => (
|
|
9
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
|
10
|
+
<path d="m6 9 6 6 6-6"></path>
|
|
11
|
+
</svg>
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
const { withProvider, withContext } = createStyleContext(accordion)
|
|
15
|
+
|
|
16
|
+
export type RootProps = ComponentProps<typeof Root>
|
|
17
|
+
export const Root = withProvider(Accordion.Root, 'root')
|
|
18
|
+
export const RootProvider = withProvider(Accordion.RootProvider, 'root')
|
|
19
|
+
export const Item = withContext(Accordion.Item, 'item')
|
|
20
|
+
export const ItemContent = withContext(Accordion.ItemContent, 'itemContent')
|
|
21
|
+
export const ItemIndicator = withContext(Accordion.ItemIndicator, 'itemIndicator', {
|
|
22
|
+
defaultProps: { children: <ChevronDownIcon /> },
|
|
23
|
+
})
|
|
24
|
+
export const ItemTrigger = withContext(Accordion.ItemTrigger, 'itemTrigger')
|
|
25
|
+
export const ItemBody = withContext(ark.div, 'itemBody')
|
|
26
|
+
|
|
27
|
+
export { AccordionContext as Context } from '@ark-ui/react/accordion'
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { Avatar } from '@ark-ui/react/avatar'
|
|
3
|
+
import { type ComponentProps, forwardRef } from 'react'
|
|
4
|
+
import { createStyleContext } from 'styled-system/jsx'
|
|
5
|
+
import { avatar } from 'styled-system/recipes'
|
|
6
|
+
|
|
7
|
+
const UserIcon = () => (
|
|
8
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
|
9
|
+
<path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"></path>
|
|
10
|
+
<circle cx="12" cy="7" r="4"></circle>
|
|
11
|
+
</svg>
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
const { withProvider, withContext } = createStyleContext(avatar)
|
|
15
|
+
|
|
16
|
+
export type RootProps = ComponentProps<typeof Root>
|
|
17
|
+
export const Root = withProvider(Avatar.Root, 'root')
|
|
18
|
+
export const RootProvider = withProvider(Avatar.RootProvider, 'root')
|
|
19
|
+
export const Image = withContext(Avatar.Image, 'image', {
|
|
20
|
+
defaultProps: {
|
|
21
|
+
draggable: 'false',
|
|
22
|
+
referrerPolicy: 'no-referrer',
|
|
23
|
+
},
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
export { AvatarContext as Context } from '@ark-ui/react/avatar'
|
|
27
|
+
|
|
28
|
+
export interface FallbackProps extends ComponentProps<typeof StyledFallback> {
|
|
29
|
+
/**
|
|
30
|
+
* The name to derive the initials from.
|
|
31
|
+
* If not provided, the fallback will display a generic icon.
|
|
32
|
+
*/
|
|
33
|
+
name?: string | undefined
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const StyledFallback = withContext(Avatar.Fallback, 'fallback')
|
|
37
|
+
|
|
38
|
+
export const Fallback = forwardRef<HTMLDivElement, FallbackProps>(function Fallback(props, ref) {
|
|
39
|
+
const { name, children, asChild, ...rest } = props
|
|
40
|
+
|
|
41
|
+
const fallbackContent = children || asChild ? children : name ? getInitials(name) : <UserIcon />
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<StyledFallback ref={ref} {...rest}>
|
|
45
|
+
{fallbackContent}
|
|
46
|
+
</StyledFallback>
|
|
47
|
+
)
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
const getInitials = (name: string) => {
|
|
51
|
+
const names = name.trim().split(' ')
|
|
52
|
+
const firstName = names[0] || ''
|
|
53
|
+
const lastName = names.length > 1 ? names[names.length - 1] : ''
|
|
54
|
+
return firstName && lastName ? `${firstName[0]}${lastName[0]}` : firstName[0]
|
|
55
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ark } from '@ark-ui/react/factory';
|
|
2
|
+
import { forwardRef, type ComponentProps } from 'react';
|
|
3
|
+
import { css, cx } from 'styled-system/css';
|
|
4
|
+
import { styled } from 'styled-system/jsx';
|
|
5
|
+
import { badge } from 'styled-system/recipes';
|
|
6
|
+
|
|
7
|
+
type BaseBadgeProps = ComponentProps<typeof BaseBadge>;
|
|
8
|
+
const BaseBadge = styled(ark.div, badge);
|
|
9
|
+
|
|
10
|
+
// Override colorPalette type to provide specific values
|
|
11
|
+
export interface BadgeProps extends Omit<BaseBadgeProps, 'colorPalette'> {
|
|
12
|
+
/**
|
|
13
|
+
* The color palette to use for the badge.
|
|
14
|
+
* @default "primary"
|
|
15
|
+
*/
|
|
16
|
+
colorPalette?: 'primary' | 'neutral' | 'error' | 'gray' | 'red' | undefined;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const Badge = forwardRef<HTMLDivElement, BadgeProps>(
|
|
20
|
+
function Badge(props, ref) {
|
|
21
|
+
const { colorPalette = 'primary', className, ...rest } = props;
|
|
22
|
+
|
|
23
|
+
// Apply colorPalette using Panda's css() function
|
|
24
|
+
const colorPaletteClass = css({ colorPalette });
|
|
25
|
+
const mergedClassName = cx(colorPaletteClass, className);
|
|
26
|
+
|
|
27
|
+
return <BaseBadge ref={ref} {...rest} className={mergedClassName} />;
|
|
28
|
+
},
|
|
29
|
+
);
|