@deepgram/styles 0.2.10 → 0.2.12
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/LICENSE +12 -19
- package/README.md +354 -386
- package/design-system.yaml +3742 -3869
- package/dist/deepgram.css +1 -1
- package/dist/deepgram.expanded.css +750 -1607
- package/dist/logo/lettermark-circle-dark.svg +15 -0
- package/dist/logo/lettermark-circle-light.svg +15 -0
- package/dist/logo/lettermark-circle.svg +27 -0
- package/dist/logo/lettermark-dark.svg +3 -0
- package/dist/logo/lettermark-light.svg +3 -0
- package/dist/logo/lettermark-square-dark.svg +10 -0
- package/dist/logo/lettermark-square-light.svg +10 -0
- package/dist/logo/lettermark-square.svg +22 -0
- package/dist/logo/lettermark.svg +9 -0
- package/dist/logo/wordmark-dark.svg +4 -0
- package/dist/logo/wordmark-light.svg +4 -0
- package/dist/logo/wordmark.svg +10 -0
- package/dist/react/ActionGroup.d.ts +4 -0
- package/dist/react/ActionGroup.js +9 -0
- package/dist/react/Alert.d.ts +34 -0
- package/dist/react/Alert.js +71 -0
- package/dist/react/Btn.d.ts +11 -0
- package/dist/react/Btn.js +16 -0
- package/dist/react/BtnCollapse.d.ts +4 -0
- package/dist/react/BtnCollapse.js +9 -0
- package/dist/react/BtnDangerGhost.d.ts +4 -0
- package/dist/react/BtnDangerGhost.js +9 -0
- package/dist/react/BtnGhost.d.ts +4 -0
- package/dist/react/BtnGhost.js +9 -0
- package/dist/react/BtnIcon.d.ts +4 -0
- package/dist/react/BtnIcon.js +9 -0
- package/dist/react/BtnSecondary.d.ts +4 -0
- package/dist/react/BtnSecondary.js +9 -0
- package/dist/react/BtnSmall.d.ts +4 -0
- package/dist/react/BtnSmall.js +9 -0
- package/dist/react/Card.d.ts +26 -0
- package/dist/react/Card.js +51 -0
- package/dist/react/CardHeading.d.ts +4 -0
- package/dist/react/CardHeading.js +9 -0
- package/dist/react/CardHeadings.d.ts +7 -0
- package/dist/react/CardHeadings.js +16 -0
- package/dist/react/Checkbox.d.ts +4 -0
- package/dist/react/Checkbox.js +9 -0
- package/dist/react/CheckboxDescription.d.ts +4 -0
- package/dist/react/CheckboxDescription.js +9 -0
- package/dist/react/CheckboxGroup.d.ts +4 -0
- package/dist/react/CheckboxGroup.js +9 -0
- package/dist/react/CheckboxLabel.d.ts +4 -0
- package/dist/react/CheckboxLabel.js +9 -0
- package/dist/react/CodeBlock.d.ts +7 -0
- package/dist/react/CodeBlock.js +12 -0
- package/dist/react/Columns.d.ts +25 -0
- package/dist/react/Columns.js +44 -0
- package/dist/react/ConstrainWidth.d.ts +4 -0
- package/dist/react/ConstrainWidth.js +9 -0
- package/dist/react/DragDropZone.d.ts +17 -0
- package/dist/react/DragDropZone.js +38 -0
- package/dist/react/Footer.d.ts +10 -0
- package/dist/react/Footer.js +23 -0
- package/dist/react/FormError.d.ts +4 -0
- package/dist/react/FormError.js +9 -0
- package/dist/react/FormField.d.ts +4 -0
- package/dist/react/FormField.js +9 -0
- package/dist/react/FormHelper.d.ts +4 -0
- package/dist/react/FormHelper.js +9 -0
- package/dist/react/FormLabel.d.ts +4 -0
- package/dist/react/FormLabel.js +9 -0
- package/dist/react/GridMobileStack.d.ts +4 -0
- package/dist/react/GridMobileStack.js +9 -0
- package/dist/react/Header.d.ts +25 -0
- package/dist/react/Header.js +58 -0
- package/dist/react/Hero.d.ts +25 -0
- package/dist/react/Hero.js +58 -0
- package/dist/react/Icon.d.ts +5 -0
- package/dist/react/Icon.js +10 -0
- package/dist/react/Input.d.ts +6 -0
- package/dist/react/Input.js +11 -0
- package/dist/react/ItemTitle.d.ts +4 -0
- package/dist/react/ItemTitle.js +9 -0
- package/dist/react/Link.d.ts +4 -0
- package/dist/react/Link.js +9 -0
- package/dist/react/Modal.d.ts +8 -0
- package/dist/react/Modal.js +17 -0
- package/dist/react/Newsletter.d.ts +8 -0
- package/dist/react/Newsletter.js +17 -0
- package/dist/react/Option.d.ts +4 -0
- package/dist/react/Option.js +9 -0
- package/dist/react/PageHeading.d.ts +10 -0
- package/dist/react/PageHeading.js +23 -0
- package/dist/react/PageHeadings.d.ts +13 -0
- package/dist/react/PageHeadings.js +30 -0
- package/dist/react/Prose.d.ts +6 -0
- package/dist/react/Prose.js +11 -0
- package/dist/react/Radio.d.ts +4 -0
- package/dist/react/Radio.js +9 -0
- package/dist/react/RadioDescription.d.ts +7 -0
- package/dist/react/RadioDescription.js +16 -0
- package/dist/react/RadioGroup.d.ts +4 -0
- package/dist/react/RadioGroup.js +9 -0
- package/dist/react/RadioLabel.d.ts +4 -0
- package/dist/react/RadioLabel.js +9 -0
- package/dist/react/Section.d.ts +9 -0
- package/dist/react/Section.js +14 -0
- package/dist/react/SectionHeading.d.ts +4 -0
- package/dist/react/SectionHeading.js +9 -0
- package/dist/react/Select.d.ts +4 -0
- package/dist/react/Select.js +9 -0
- package/dist/react/Spinner.d.ts +7 -0
- package/dist/react/Spinner.js +16 -0
- package/dist/react/Status.d.ts +12 -0
- package/dist/react/Status.js +17 -0
- package/dist/react/TextUtilities.d.ts +4 -0
- package/dist/react/TextUtilities.js +9 -0
- package/dist/react/Textarea.d.ts +4 -0
- package/dist/react/Textarea.js +9 -0
- package/dist/react/Toggle.d.ts +4 -0
- package/dist/react/Toggle.js +9 -0
- package/dist/react/ToggleGroup.d.ts +4 -0
- package/dist/react/ToggleGroup.js +9 -0
- package/dist/react/ToggleLabel.d.ts +4 -0
- package/dist/react/ToggleLabel.js +9 -0
- package/dist/react/index.d.ts +43 -0
- package/dist/react/index.js +43 -0
- package/dist/utils.d.ts +16 -0
- package/dist/utils.js +50 -0
- package/lib/deepgram.css +595 -752
- package/lib/tailwind-theme.css +27 -22
- package/package.json +54 -3
- package/src/react/ActionGroup.tsx +14 -0
- package/src/react/Alert.tsx +130 -0
- package/src/react/Btn.tsx +28 -0
- package/src/react/BtnCollapse.tsx +14 -0
- package/src/react/BtnDangerGhost.tsx +14 -0
- package/src/react/BtnGhost.tsx +14 -0
- package/src/react/BtnIcon.tsx +14 -0
- package/src/react/BtnSecondary.tsx +14 -0
- package/src/react/BtnSmall.tsx +14 -0
- package/src/react/Card.tsx +93 -0
- package/src/react/CardHeading.tsx +14 -0
- package/src/react/CardHeadings.tsx +27 -0
- package/src/react/Checkbox.tsx +14 -0
- package/src/react/CheckboxDescription.tsx +14 -0
- package/src/react/CheckboxGroup.tsx +14 -0
- package/src/react/CheckboxLabel.tsx +14 -0
- package/src/react/CodeBlock.tsx +20 -0
- package/src/react/Columns.tsx +82 -0
- package/src/react/ConstrainWidth.tsx +14 -0
- package/src/react/DragDropZone.tsx +68 -0
- package/src/react/Footer.tsx +40 -0
- package/src/react/FormError.tsx +14 -0
- package/src/react/FormField.tsx +14 -0
- package/src/react/FormHelper.tsx +14 -0
- package/src/react/FormLabel.tsx +14 -0
- package/src/react/GridMobileStack.tsx +14 -0
- package/src/react/Header.tsx +105 -0
- package/src/react/Hero.tsx +105 -0
- package/src/react/Icon.tsx +16 -0
- package/src/react/Input.tsx +18 -0
- package/src/react/ItemTitle.tsx +14 -0
- package/src/react/Link.tsx +14 -0
- package/src/react/Modal.tsx +29 -0
- package/src/react/Newsletter.tsx +29 -0
- package/src/react/Option.tsx +14 -0
- package/src/react/PageHeading.tsx +40 -0
- package/src/react/PageHeadings.tsx +53 -0
- package/src/react/Prose.tsx +18 -0
- package/src/react/Radio.tsx +14 -0
- package/src/react/RadioDescription.tsx +27 -0
- package/src/react/RadioGroup.tsx +14 -0
- package/src/react/RadioLabel.tsx +14 -0
- package/src/react/Section.tsx +24 -0
- package/src/react/SectionHeading.tsx +14 -0
- package/src/react/Select.tsx +14 -0
- package/src/react/Spinner.tsx +27 -0
- package/src/react/Status.tsx +30 -0
- package/src/react/TextUtilities.tsx +14 -0
- package/src/react/Textarea.tsx +14 -0
- package/src/react/Toggle.tsx +14 -0
- package/src/react/ToggleGroup.tsx +14 -0
- package/src/react/ToggleLabel.tsx +14 -0
- package/src/react/index.ts +43 -0
- package/src/utils.ts +60 -0
package/lib/tailwind-theme.css
CHANGED
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
|
|
10
10
|
/* Source scanning for class detection */
|
|
11
11
|
@source "./deepgram.css";
|
|
12
|
-
@source inline("collapsed selected visible");
|
|
13
12
|
|
|
14
13
|
/* Dark mode support */
|
|
15
14
|
@variant dark (&.dark);
|
|
@@ -18,22 +17,24 @@
|
|
|
18
17
|
@theme {
|
|
19
18
|
--color-dg-primary: var(--dg-primary, #13ef95);
|
|
20
19
|
--color-dg-secondary: var(--dg-secondary, #149afb);
|
|
21
|
-
--color-dg-almost-black: #050506;
|
|
22
|
-
--color-dg-background: #0b0b0c;
|
|
23
|
-
--color-dg-charcoal: #1a1a1f;
|
|
24
|
-
--color-dg-
|
|
25
|
-
--color-dg-
|
|
26
|
-
--color-dg-
|
|
27
|
-
--color-dg-
|
|
28
|
-
--color-dg-
|
|
29
|
-
--color-dg-
|
|
30
|
-
--color-dg-
|
|
31
|
-
--color-dg-
|
|
32
|
-
--color-dg-
|
|
33
|
-
--color-dg-
|
|
34
|
-
--color-dg-
|
|
35
|
-
--color-dg-
|
|
36
|
-
--color-dg-
|
|
20
|
+
--color-dg-almost-black: light-dark(#f8f9fa, #050506);
|
|
21
|
+
--color-dg-background: light-dark(#ffffff, #0b0b0c);
|
|
22
|
+
--color-dg-charcoal: light-dark(#f3f4f6, #1a1a1f);
|
|
23
|
+
--color-dg-solid: light-dark(#000000, #ffffff);
|
|
24
|
+
--color-dg-translucent: light-dark(rgba(255, 255, 255, 0.5), rgba(0, 0, 0, 0.5));
|
|
25
|
+
--color-dg-border: light-dark(#d1d5db, #2c2c33);
|
|
26
|
+
--color-dg-pebble: light-dark(#9ca3af, #4e4e52);
|
|
27
|
+
--color-dg-slate: light-dark(#6b7280, #949498);
|
|
28
|
+
--color-dg-text: light-dark(#111827, #fbfbff);
|
|
29
|
+
--color-dg-fog: light-dark(#1f2937, #edede2);
|
|
30
|
+
--color-dg-platinum: light-dark(#374151, #e1e1e5);
|
|
31
|
+
--color-dg-muted: light-dark(#6b7280, #949498);
|
|
32
|
+
--color-dg-on-solid: light-dark(#ffffff, #000000);
|
|
33
|
+
--color-dg-success: light-dark(#15803d, #12b76a);
|
|
34
|
+
--color-dg-warning: light-dark(#a16207, #fec84b);
|
|
35
|
+
--color-dg-danger: light-dark(#b91c1c, #f04438);
|
|
36
|
+
--color-dg-gradient-start: light-dark(#0369a1, #008fc1);
|
|
37
|
+
--color-dg-gradient-end: light-dark(#059669, #00f099);
|
|
37
38
|
|
|
38
39
|
--font-dg-sans: "Inter", "-apple-system", "BlinkMacSystemFont", "Segoe UI", "Roboto", "Helvetica", "Arial", sans-serif;
|
|
39
40
|
--font-dg-noto: "Noto Sans", "-apple-system", "BlinkMacSystemFont", "Segoe UI", "Roboto", "Helvetica", "Arial", sans-serif;
|
|
@@ -60,10 +61,14 @@
|
|
|
60
61
|
/* Base styles */
|
|
61
62
|
@layer base {
|
|
62
63
|
:root {
|
|
64
|
+
color-scheme: light dark;
|
|
63
65
|
--dg-base-font-size: 16px;
|
|
64
66
|
--dg-border-width: 0.125rem;
|
|
65
|
-
--dg-primary: #13ef95;
|
|
66
|
-
--dg-secondary: #149afb;
|
|
67
|
+
--dg-primary: light-dark(#047857, #13ef95);
|
|
68
|
+
--dg-secondary: light-dark(#0369a1, #149afb);
|
|
69
|
+
--dg-syntax-keyword: #f97583;
|
|
70
|
+
--dg-syntax-variable: #79b8ff;
|
|
71
|
+
--dg-syntax-function: #b392f0;
|
|
67
72
|
}
|
|
68
73
|
|
|
69
74
|
html {
|
|
@@ -141,13 +146,13 @@
|
|
|
141
146
|
|
|
142
147
|
/* Custom utilities */
|
|
143
148
|
@utility dg-gradient-border {
|
|
144
|
-
background-image: linear-gradient(
|
|
149
|
+
background-image: linear-gradient(var(--color-dg-on-solid), var(--color-dg-on-solid)), linear-gradient(90deg, color-mix(in srgb, var(--dg-secondary, #149afb) 70%, black), color-mix(in srgb, var(--dg-primary, #13ef95) 70%, black), color-mix(in srgb, var(--dg-secondary, #149afb) 70%, black), color-mix(in srgb, var(--dg-primary, #13ef95) 70%, black));
|
|
145
150
|
background-origin: padding-box, border-box;
|
|
146
151
|
background-clip: padding-box, border-box;
|
|
147
152
|
background-repeat: no-repeat;
|
|
148
153
|
background-position: center;
|
|
149
154
|
background-size: 100% 100%;
|
|
150
|
-
background-color:
|
|
155
|
+
background-color: var(--color-dg-on-solid);
|
|
151
156
|
}
|
|
152
157
|
|
|
153
158
|
@utility dg-bg-reset {
|
|
@@ -164,5 +169,5 @@
|
|
|
164
169
|
}
|
|
165
170
|
|
|
166
171
|
@utility dg-shadow-subtle {
|
|
167
|
-
box-shadow:
|
|
172
|
+
box-shadow: color-mix(in srgb, var(--color-dg-pebble) 5%, transparent) 0 0.0625rem 0.125rem;
|
|
168
173
|
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepgram/styles",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.12",
|
|
4
4
|
"description": "Tailwind-based design system and styles library for Deepgram design system and demos",
|
|
5
5
|
"author": "Deepgram",
|
|
6
|
-
"license": "
|
|
6
|
+
"license": "ISC",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/deepgram/dx-design.git",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"files": [
|
|
25
25
|
"dist/",
|
|
26
26
|
"lib/",
|
|
27
|
+
"src/",
|
|
27
28
|
"design-system.yaml",
|
|
28
29
|
"README.md",
|
|
29
30
|
"LICENSE"
|
|
@@ -49,17 +50,67 @@
|
|
|
49
50
|
},
|
|
50
51
|
"./design-system": {
|
|
51
52
|
"default": "./design-system.yaml"
|
|
53
|
+
},
|
|
54
|
+
"./logo/wordmark": {
|
|
55
|
+
"default": "./dist/logo/wordmark.svg"
|
|
56
|
+
},
|
|
57
|
+
"./logo/wordmark-light": {
|
|
58
|
+
"default": "./dist/logo/wordmark-light.svg"
|
|
59
|
+
},
|
|
60
|
+
"./logo/wordmark-dark": {
|
|
61
|
+
"default": "./dist/logo/wordmark-dark.svg"
|
|
62
|
+
},
|
|
63
|
+
"./logo/lettermark": {
|
|
64
|
+
"default": "./dist/logo/lettermark.svg"
|
|
65
|
+
},
|
|
66
|
+
"./logo/lettermark-light": {
|
|
67
|
+
"default": "./dist/logo/lettermark-light.svg"
|
|
68
|
+
},
|
|
69
|
+
"./logo/lettermark-dark": {
|
|
70
|
+
"default": "./dist/logo/lettermark-dark.svg"
|
|
71
|
+
},
|
|
72
|
+
"./logo/lettermark-square": {
|
|
73
|
+
"default": "./dist/logo/lettermark-square.svg"
|
|
74
|
+
},
|
|
75
|
+
"./logo/lettermark-square-light": {
|
|
76
|
+
"default": "./dist/logo/lettermark-square-light.svg"
|
|
77
|
+
},
|
|
78
|
+
"./logo/lettermark-square-dark": {
|
|
79
|
+
"default": "./dist/logo/lettermark-square-dark.svg"
|
|
80
|
+
},
|
|
81
|
+
"./logo/lettermark-circle": {
|
|
82
|
+
"default": "./dist/logo/lettermark-circle.svg"
|
|
83
|
+
},
|
|
84
|
+
"./logo/lettermark-circle-light": {
|
|
85
|
+
"default": "./dist/logo/lettermark-circle-light.svg"
|
|
86
|
+
},
|
|
87
|
+
"./logo/lettermark-circle-dark": {
|
|
88
|
+
"default": "./dist/logo/lettermark-circle-dark.svg"
|
|
89
|
+
},
|
|
90
|
+
"./utils": {
|
|
91
|
+
"types": "./dist/utils.d.ts",
|
|
92
|
+
"import": "./dist/utils.js",
|
|
93
|
+
"default": "./dist/utils.js"
|
|
94
|
+
},
|
|
95
|
+
"./react": {
|
|
96
|
+
"types": "./dist/react/index.d.ts",
|
|
97
|
+
"import": "./dist/react/index.js",
|
|
98
|
+
"default": "./dist/react/index.js"
|
|
52
99
|
}
|
|
53
100
|
},
|
|
54
101
|
"publishConfig": {
|
|
55
102
|
"access": "public"
|
|
56
103
|
},
|
|
57
104
|
"peerDependencies": {
|
|
58
|
-
"tailwindcss": "^4.0.0"
|
|
105
|
+
"tailwindcss": "^4.0.0",
|
|
106
|
+
"react": "^18.0.0 || ^19.0.0"
|
|
59
107
|
},
|
|
60
108
|
"peerDependenciesMeta": {
|
|
61
109
|
"tailwindcss": {
|
|
62
110
|
"optional": true
|
|
111
|
+
},
|
|
112
|
+
"react": {
|
|
113
|
+
"optional": true
|
|
63
114
|
}
|
|
64
115
|
}
|
|
65
116
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { forwardRef, type ComponentPropsWithRef } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface ActionGroupProps extends ComponentPropsWithRef<'div'> {
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export const ActionGroup = forwardRef<HTMLDivElement, ActionGroupProps>(
|
|
7
|
+
function ActionGroup({ className, children, ...props }, ref) {
|
|
8
|
+
const cls = [
|
|
9
|
+
'dg-action-group',
|
|
10
|
+
className,
|
|
11
|
+
].filter(Boolean).join(' ');
|
|
12
|
+
return <div ref={ref} className={cls} {...props}>{children}</div>;
|
|
13
|
+
}
|
|
14
|
+
);
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { forwardRef, type ComponentPropsWithRef } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface AlertProps extends ComponentPropsWithRef<'div'> {
|
|
4
|
+
warning?: boolean;
|
|
5
|
+
success?: boolean;
|
|
6
|
+
danger?: boolean;
|
|
7
|
+
info?: boolean;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const Alert = forwardRef<HTMLDivElement, AlertProps>(
|
|
11
|
+
function Alert({ warning, success, danger, info, className, children, ...props }, ref) {
|
|
12
|
+
const cls = [
|
|
13
|
+
'dg-alert',
|
|
14
|
+
warning && 'dg-alert--warning',
|
|
15
|
+
success && 'dg-alert--success',
|
|
16
|
+
danger && 'dg-alert--danger',
|
|
17
|
+
info && 'dg-alert--info',
|
|
18
|
+
className,
|
|
19
|
+
].filter(Boolean).join(' ');
|
|
20
|
+
return <div ref={ref} className={cls} {...props}>{children}</div>;
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
export interface AlertContentProps extends ComponentPropsWithRef<'div'> {
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const AlertContent = forwardRef<HTMLDivElement, AlertContentProps>(
|
|
28
|
+
function AlertContent({ className, children, ...props }, ref) {
|
|
29
|
+
const cls = [
|
|
30
|
+
'dg-alert__content',
|
|
31
|
+
className,
|
|
32
|
+
].filter(Boolean).join(' ');
|
|
33
|
+
return <div ref={ref} className={cls} {...props}>{children}</div>;
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
export interface AlertIconProps extends ComponentPropsWithRef<'i'> {
|
|
38
|
+
name?: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export const AlertIcon = forwardRef<HTMLElement, AlertIconProps>(
|
|
42
|
+
function AlertIcon({ name, className, children, ...props }, ref) {
|
|
43
|
+
const cls = [
|
|
44
|
+
'dg-alert__icon',
|
|
45
|
+
name && `fas fa-${name}`,
|
|
46
|
+
className,
|
|
47
|
+
].filter(Boolean).join(' ');
|
|
48
|
+
return <i ref={ref} className={cls} {...props}>{children}</i>;
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
export interface AlertBodyProps extends ComponentPropsWithRef<'div'> {
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export const AlertBody = forwardRef<HTMLDivElement, AlertBodyProps>(
|
|
56
|
+
function AlertBody({ className, children, ...props }, ref) {
|
|
57
|
+
const cls = [
|
|
58
|
+
'dg-alert__body',
|
|
59
|
+
className,
|
|
60
|
+
].filter(Boolean).join(' ');
|
|
61
|
+
return <div ref={ref} className={cls} {...props}>{children}</div>;
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
export interface AlertTitleProps extends ComponentPropsWithRef<'h3'> {
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export const AlertTitle = forwardRef<HTMLHeadingElement, AlertTitleProps>(
|
|
69
|
+
function AlertTitle({ className, children, ...props }, ref) {
|
|
70
|
+
const cls = [
|
|
71
|
+
'dg-alert__title',
|
|
72
|
+
className,
|
|
73
|
+
].filter(Boolean).join(' ');
|
|
74
|
+
return <h3 ref={ref} className={cls} {...props}>{children}</h3>;
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
export interface AlertDescriptionProps extends ComponentPropsWithRef<'div'> {
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export const AlertDescription = forwardRef<HTMLDivElement, AlertDescriptionProps>(
|
|
82
|
+
function AlertDescription({ className, children, ...props }, ref) {
|
|
83
|
+
const cls = [
|
|
84
|
+
'dg-alert__description',
|
|
85
|
+
className,
|
|
86
|
+
].filter(Boolean).join(' ');
|
|
87
|
+
return <div ref={ref} className={cls} {...props}>{children}</div>;
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
|
|
91
|
+
export interface AlertActionsProps extends ComponentPropsWithRef<'div'> {
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export const AlertActions = forwardRef<HTMLDivElement, AlertActionsProps>(
|
|
95
|
+
function AlertActions({ className, children, ...props }, ref) {
|
|
96
|
+
const cls = [
|
|
97
|
+
'dg-alert__actions',
|
|
98
|
+
className,
|
|
99
|
+
].filter(Boolean).join(' ');
|
|
100
|
+
return <div ref={ref} className={cls} {...props}>{children}</div>;
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
export interface AlertListProps extends ComponentPropsWithRef<'ul'> {
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export const AlertList = forwardRef<HTMLUListElement, AlertListProps>(
|
|
108
|
+
function AlertList({ className, children, ...props }, ref) {
|
|
109
|
+
const cls = [
|
|
110
|
+
'dg-alert__list',
|
|
111
|
+
className,
|
|
112
|
+
].filter(Boolean).join(' ');
|
|
113
|
+
return <ul ref={ref} className={cls} {...props}>{children}</ul>;
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
export interface AlertDismissProps extends ComponentPropsWithRef<'button'> {
|
|
118
|
+
name?: string;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export const AlertDismiss = forwardRef<HTMLButtonElement, AlertDismissProps>(
|
|
122
|
+
function AlertDismiss({ name, className, children, ...props }, ref) {
|
|
123
|
+
const cls = [
|
|
124
|
+
'dg-alert__dismiss',
|
|
125
|
+
name && `fas fa-${name}`,
|
|
126
|
+
className,
|
|
127
|
+
].filter(Boolean).join(' ');
|
|
128
|
+
return <button ref={ref} className={cls} {...props}>{children}</button>;
|
|
129
|
+
}
|
|
130
|
+
);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { forwardRef, type ComponentPropsWithRef } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface BtnProps extends ComponentPropsWithRef<'button'> {
|
|
4
|
+
sm?: boolean;
|
|
5
|
+
primary?: boolean;
|
|
6
|
+
secondary?: boolean;
|
|
7
|
+
ghost?: boolean;
|
|
8
|
+
dangerGhost?: boolean;
|
|
9
|
+
iconOnly?: boolean;
|
|
10
|
+
collapse?: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const Btn = forwardRef<HTMLButtonElement, BtnProps>(
|
|
14
|
+
function Btn({ sm, primary, secondary, ghost, dangerGhost, iconOnly, collapse, className, children, ...props }, ref) {
|
|
15
|
+
const cls = [
|
|
16
|
+
'dg-btn',
|
|
17
|
+
sm && 'dg-btn--sm',
|
|
18
|
+
primary && 'dg-btn--primary',
|
|
19
|
+
secondary && 'dg-btn--secondary',
|
|
20
|
+
ghost && 'dg-btn--ghost',
|
|
21
|
+
dangerGhost && 'dg-btn--danger-ghost',
|
|
22
|
+
iconOnly && 'dg-btn--icon-only',
|
|
23
|
+
collapse && 'dg-btn--collapse',
|
|
24
|
+
className,
|
|
25
|
+
].filter(Boolean).join(' ');
|
|
26
|
+
return <button ref={ref} className={cls} {...props}>{children}</button>;
|
|
27
|
+
}
|
|
28
|
+
);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { forwardRef, type ComponentPropsWithRef } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface BtnCollapseProps extends ComponentPropsWithRef<'div'> {
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export const BtnCollapse = forwardRef<HTMLDivElement, BtnCollapseProps>(
|
|
7
|
+
function BtnCollapse({ className, children, ...props }, ref) {
|
|
8
|
+
const cls = [
|
|
9
|
+
'dg-btn-collapse',
|
|
10
|
+
className,
|
|
11
|
+
].filter(Boolean).join(' ');
|
|
12
|
+
return <div ref={ref} className={cls} {...props}>{children}</div>;
|
|
13
|
+
}
|
|
14
|
+
);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { forwardRef, type ComponentPropsWithRef } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface BtnDangerGhostProps extends ComponentPropsWithRef<'div'> {
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export const BtnDangerGhost = forwardRef<HTMLDivElement, BtnDangerGhostProps>(
|
|
7
|
+
function BtnDangerGhost({ className, children, ...props }, ref) {
|
|
8
|
+
const cls = [
|
|
9
|
+
'dg-btn-danger-ghost',
|
|
10
|
+
className,
|
|
11
|
+
].filter(Boolean).join(' ');
|
|
12
|
+
return <div ref={ref} className={cls} {...props}>{children}</div>;
|
|
13
|
+
}
|
|
14
|
+
);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { forwardRef, type ComponentPropsWithRef } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface BtnGhostProps extends ComponentPropsWithRef<'div'> {
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export const BtnGhost = forwardRef<HTMLDivElement, BtnGhostProps>(
|
|
7
|
+
function BtnGhost({ className, children, ...props }, ref) {
|
|
8
|
+
const cls = [
|
|
9
|
+
'dg-btn-ghost',
|
|
10
|
+
className,
|
|
11
|
+
].filter(Boolean).join(' ');
|
|
12
|
+
return <div ref={ref} className={cls} {...props}>{children}</div>;
|
|
13
|
+
}
|
|
14
|
+
);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { forwardRef, type ComponentPropsWithRef } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface BtnIconProps extends ComponentPropsWithRef<'div'> {
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export const BtnIcon = forwardRef<HTMLDivElement, BtnIconProps>(
|
|
7
|
+
function BtnIcon({ className, children, ...props }, ref) {
|
|
8
|
+
const cls = [
|
|
9
|
+
'dg-btn-icon',
|
|
10
|
+
className,
|
|
11
|
+
].filter(Boolean).join(' ');
|
|
12
|
+
return <div ref={ref} className={cls} {...props}>{children}</div>;
|
|
13
|
+
}
|
|
14
|
+
);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { forwardRef, type ComponentPropsWithRef } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface BtnSecondaryProps extends ComponentPropsWithRef<'div'> {
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export const BtnSecondary = forwardRef<HTMLDivElement, BtnSecondaryProps>(
|
|
7
|
+
function BtnSecondary({ className, children, ...props }, ref) {
|
|
8
|
+
const cls = [
|
|
9
|
+
'dg-btn-secondary',
|
|
10
|
+
className,
|
|
11
|
+
].filter(Boolean).join(' ');
|
|
12
|
+
return <div ref={ref} className={cls} {...props}>{children}</div>;
|
|
13
|
+
}
|
|
14
|
+
);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { forwardRef, type ComponentPropsWithRef } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface BtnSmallProps extends ComponentPropsWithRef<'div'> {
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export const BtnSmall = forwardRef<HTMLDivElement, BtnSmallProps>(
|
|
7
|
+
function BtnSmall({ className, children, ...props }, ref) {
|
|
8
|
+
const cls = [
|
|
9
|
+
'dg-btn-small',
|
|
10
|
+
className,
|
|
11
|
+
].filter(Boolean).join(' ');
|
|
12
|
+
return <div ref={ref} className={cls} {...props}>{children}</div>;
|
|
13
|
+
}
|
|
14
|
+
);
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { forwardRef, type ComponentPropsWithRef } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface CardProps extends ComponentPropsWithRef<'div'> {
|
|
4
|
+
compact?: boolean;
|
|
5
|
+
spacious?: boolean;
|
|
6
|
+
bordered?: boolean;
|
|
7
|
+
structured?: boolean;
|
|
8
|
+
selectable?: boolean;
|
|
9
|
+
fileUpload?: boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const Card = forwardRef<HTMLDivElement, CardProps>(
|
|
13
|
+
function Card({ compact, spacious, bordered, structured, selectable, fileUpload, className, children, ...props }, ref) {
|
|
14
|
+
const cls = [
|
|
15
|
+
'dg-card',
|
|
16
|
+
compact && 'dg-card--compact',
|
|
17
|
+
spacious && 'dg-card--spacious',
|
|
18
|
+
bordered && 'dg-card--bordered',
|
|
19
|
+
structured && 'dg-card--structured',
|
|
20
|
+
selectable && 'dg-card--selectable',
|
|
21
|
+
fileUpload && 'dg-card--file-upload',
|
|
22
|
+
className,
|
|
23
|
+
].filter(Boolean).join(' ');
|
|
24
|
+
return <div ref={ref} className={cls} {...props}>{children}</div>;
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
export interface CardImageProps extends ComponentPropsWithRef<'div'> {
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const CardImage = forwardRef<HTMLDivElement, CardImageProps>(
|
|
32
|
+
function CardImage({ className, children, ...props }, ref) {
|
|
33
|
+
const cls = [
|
|
34
|
+
'dg-card__image',
|
|
35
|
+
className,
|
|
36
|
+
].filter(Boolean).join(' ');
|
|
37
|
+
return <div ref={ref} className={cls} {...props}>{children}</div>;
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
export interface CardIconProps extends ComponentPropsWithRef<'i'> {
|
|
42
|
+
name?: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export const CardIcon = forwardRef<HTMLElement, CardIconProps>(
|
|
46
|
+
function CardIcon({ name, className, children, ...props }, ref) {
|
|
47
|
+
const cls = [
|
|
48
|
+
'dg-card__icon',
|
|
49
|
+
name && `fas fa-${name}`,
|
|
50
|
+
className,
|
|
51
|
+
].filter(Boolean).join(' ');
|
|
52
|
+
return <i ref={ref} className={cls} {...props}>{children}</i>;
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
export interface CardHeaderProps extends ComponentPropsWithRef<'div'> {
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export const CardHeader = forwardRef<HTMLDivElement, CardHeaderProps>(
|
|
60
|
+
function CardHeader({ className, children, ...props }, ref) {
|
|
61
|
+
const cls = [
|
|
62
|
+
'dg-card__header',
|
|
63
|
+
className,
|
|
64
|
+
].filter(Boolean).join(' ');
|
|
65
|
+
return <div ref={ref} className={cls} {...props}>{children}</div>;
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
export interface CardBodyProps extends ComponentPropsWithRef<'div'> {
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export const CardBody = forwardRef<HTMLDivElement, CardBodyProps>(
|
|
73
|
+
function CardBody({ className, children, ...props }, ref) {
|
|
74
|
+
const cls = [
|
|
75
|
+
'dg-card__body',
|
|
76
|
+
className,
|
|
77
|
+
].filter(Boolean).join(' ');
|
|
78
|
+
return <div ref={ref} className={cls} {...props}>{children}</div>;
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
export interface CardFooterProps extends ComponentPropsWithRef<'div'> {
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export const CardFooter = forwardRef<HTMLDivElement, CardFooterProps>(
|
|
86
|
+
function CardFooter({ className, children, ...props }, ref) {
|
|
87
|
+
const cls = [
|
|
88
|
+
'dg-card__footer',
|
|
89
|
+
className,
|
|
90
|
+
].filter(Boolean).join(' ');
|
|
91
|
+
return <div ref={ref} className={cls} {...props}>{children}</div>;
|
|
92
|
+
}
|
|
93
|
+
);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { forwardRef, type ComponentPropsWithRef } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface CardHeadingProps extends ComponentPropsWithRef<'h3'> {
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export const CardHeading = forwardRef<HTMLHeadingElement, CardHeadingProps>(
|
|
7
|
+
function CardHeading({ className, children, ...props }, ref) {
|
|
8
|
+
const cls = [
|
|
9
|
+
'dg-card-heading',
|
|
10
|
+
className,
|
|
11
|
+
].filter(Boolean).join(' ');
|
|
12
|
+
return <h3 ref={ref} className={cls} {...props}>{children}</h3>;
|
|
13
|
+
}
|
|
14
|
+
);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { forwardRef, type ComponentPropsWithRef } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface CardHeadingsProps extends ComponentPropsWithRef<'div'> {
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export const CardHeadings = forwardRef<HTMLDivElement, CardHeadingsProps>(
|
|
7
|
+
function CardHeadings({ className, children, ...props }, ref) {
|
|
8
|
+
const cls = [
|
|
9
|
+
'dg-card-headings',
|
|
10
|
+
className,
|
|
11
|
+
].filter(Boolean).join(' ');
|
|
12
|
+
return <div ref={ref} className={cls} {...props}>{children}</div>;
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
export interface CardHeadingsTitleProps extends ComponentPropsWithRef<'h3'> {
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const CardHeadingsTitle = forwardRef<HTMLHeadingElement, CardHeadingsTitleProps>(
|
|
20
|
+
function CardHeadingsTitle({ className, children, ...props }, ref) {
|
|
21
|
+
const cls = [
|
|
22
|
+
'dg-card-headings__title',
|
|
23
|
+
className,
|
|
24
|
+
].filter(Boolean).join(' ');
|
|
25
|
+
return <h3 ref={ref} className={cls} {...props}>{children}</h3>;
|
|
26
|
+
}
|
|
27
|
+
);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { forwardRef, type ComponentPropsWithRef } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface CheckboxProps extends ComponentPropsWithRef<'input'> {
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(
|
|
7
|
+
function Checkbox({ className, ...props }, ref) {
|
|
8
|
+
const cls = [
|
|
9
|
+
'dg-checkbox',
|
|
10
|
+
className,
|
|
11
|
+
].filter(Boolean).join(' ');
|
|
12
|
+
return <input ref={ref} type="checkbox" className={cls} {...props} />;
|
|
13
|
+
}
|
|
14
|
+
);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { forwardRef, type ComponentPropsWithRef } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface CheckboxDescriptionProps extends ComponentPropsWithRef<'div'> {
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export const CheckboxDescription = forwardRef<HTMLDivElement, CheckboxDescriptionProps>(
|
|
7
|
+
function CheckboxDescription({ className, children, ...props }, ref) {
|
|
8
|
+
const cls = [
|
|
9
|
+
'dg-checkbox-description',
|
|
10
|
+
className,
|
|
11
|
+
].filter(Boolean).join(' ');
|
|
12
|
+
return <div ref={ref} className={cls} {...props}>{children}</div>;
|
|
13
|
+
}
|
|
14
|
+
);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { forwardRef, type ComponentPropsWithRef } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface CheckboxGroupProps extends ComponentPropsWithRef<'div'> {
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export const CheckboxGroup = forwardRef<HTMLDivElement, CheckboxGroupProps>(
|
|
7
|
+
function CheckboxGroup({ className, children, ...props }, ref) {
|
|
8
|
+
const cls = [
|
|
9
|
+
'dg-checkbox-group',
|
|
10
|
+
className,
|
|
11
|
+
].filter(Boolean).join(' ');
|
|
12
|
+
return <div ref={ref} className={cls} {...props}>{children}</div>;
|
|
13
|
+
}
|
|
14
|
+
);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { forwardRef, type ComponentPropsWithRef } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface CheckboxLabelProps extends ComponentPropsWithRef<'label'> {
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export const CheckboxLabel = forwardRef<HTMLLabelElement, CheckboxLabelProps>(
|
|
7
|
+
function CheckboxLabel({ className, children, ...props }, ref) {
|
|
8
|
+
const cls = [
|
|
9
|
+
'dg-checkbox-label',
|
|
10
|
+
className,
|
|
11
|
+
].filter(Boolean).join(' ');
|
|
12
|
+
return <label ref={ref} className={cls} {...props}>{children}</label>;
|
|
13
|
+
}
|
|
14
|
+
);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { forwardRef, type ComponentPropsWithRef } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface CodeBlockProps extends ComponentPropsWithRef<'div'> {
|
|
4
|
+
compact?: boolean;
|
|
5
|
+
tall?: boolean;
|
|
6
|
+
noScroll?: boolean;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const CodeBlock = forwardRef<HTMLDivElement, CodeBlockProps>(
|
|
10
|
+
function CodeBlock({ compact, tall, noScroll, className, children, ...props }, ref) {
|
|
11
|
+
const cls = [
|
|
12
|
+
'dg-code-block',
|
|
13
|
+
compact && 'dg-code-block--compact',
|
|
14
|
+
tall && 'dg-code-block--tall',
|
|
15
|
+
noScroll && 'dg-code-block--no-scroll',
|
|
16
|
+
className,
|
|
17
|
+
].filter(Boolean).join(' ');
|
|
18
|
+
return <div ref={ref} className={cls} {...props}>{children}</div>;
|
|
19
|
+
}
|
|
20
|
+
);
|