@deepgram/styles 0.2.11 → 0.2.13

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.
Files changed (142) hide show
  1. package/README.md +285 -317
  2. package/design-system.yaml +3115 -3336
  3. package/dist/deepgram.css +1 -1
  4. package/dist/deepgram.expanded.css +741 -880
  5. package/dist/react/ActionGroup.d.ts +4 -0
  6. package/dist/react/ActionGroup.js +9 -0
  7. package/dist/react/Alert.d.ts +34 -0
  8. package/dist/react/Alert.js +71 -0
  9. package/dist/react/Btn.d.ts +11 -0
  10. package/dist/react/Btn.js +16 -0
  11. package/dist/react/Card.d.ts +26 -0
  12. package/dist/react/Card.js +51 -0
  13. package/dist/react/CardHeading.d.ts +4 -0
  14. package/dist/react/CardHeading.js +9 -0
  15. package/dist/react/CardHeadings.d.ts +7 -0
  16. package/dist/react/CardHeadings.js +16 -0
  17. package/dist/react/Checkbox.d.ts +4 -0
  18. package/dist/react/Checkbox.js +9 -0
  19. package/dist/react/CheckboxDescription.d.ts +4 -0
  20. package/dist/react/CheckboxDescription.js +9 -0
  21. package/dist/react/CheckboxGroup.d.ts +4 -0
  22. package/dist/react/CheckboxGroup.js +9 -0
  23. package/dist/react/CheckboxLabel.d.ts +4 -0
  24. package/dist/react/CheckboxLabel.js +9 -0
  25. package/dist/react/CodeBlock.d.ts +7 -0
  26. package/dist/react/CodeBlock.js +12 -0
  27. package/dist/react/Columns.d.ts +25 -0
  28. package/dist/react/Columns.js +44 -0
  29. package/dist/react/ConstrainWidth.d.ts +4 -0
  30. package/dist/react/ConstrainWidth.js +9 -0
  31. package/dist/react/DragDropZone.d.ts +17 -0
  32. package/dist/react/DragDropZone.js +38 -0
  33. package/dist/react/Footer.d.ts +10 -0
  34. package/dist/react/Footer.js +23 -0
  35. package/dist/react/FormError.d.ts +4 -0
  36. package/dist/react/FormError.js +9 -0
  37. package/dist/react/FormField.d.ts +4 -0
  38. package/dist/react/FormField.js +9 -0
  39. package/dist/react/FormHelper.d.ts +4 -0
  40. package/dist/react/FormHelper.js +9 -0
  41. package/dist/react/FormLabel.d.ts +4 -0
  42. package/dist/react/FormLabel.js +9 -0
  43. package/dist/react/GridMobileStack.d.ts +4 -0
  44. package/dist/react/GridMobileStack.js +9 -0
  45. package/dist/react/Hero.d.ts +25 -0
  46. package/dist/react/Hero.js +58 -0
  47. package/dist/react/Icon.d.ts +5 -0
  48. package/dist/react/Icon.js +10 -0
  49. package/dist/react/Input.d.ts +6 -0
  50. package/dist/react/Input.js +11 -0
  51. package/dist/react/ItemTitle.d.ts +4 -0
  52. package/dist/react/ItemTitle.js +9 -0
  53. package/dist/react/Newsletter.d.ts +8 -0
  54. package/dist/react/Newsletter.js +17 -0
  55. package/dist/react/Option.d.ts +4 -0
  56. package/dist/react/Option.js +9 -0
  57. package/dist/react/PageHeading.d.ts +10 -0
  58. package/dist/react/PageHeading.js +23 -0
  59. package/dist/react/PageHeadings.d.ts +13 -0
  60. package/dist/react/PageHeadings.js +30 -0
  61. package/dist/react/Prose.d.ts +6 -0
  62. package/dist/react/Prose.js +11 -0
  63. package/dist/react/Radio.d.ts +4 -0
  64. package/dist/react/Radio.js +9 -0
  65. package/dist/react/RadioDescription.d.ts +7 -0
  66. package/dist/react/RadioDescription.js +16 -0
  67. package/dist/react/RadioGroup.d.ts +4 -0
  68. package/dist/react/RadioGroup.js +9 -0
  69. package/dist/react/RadioLabel.d.ts +4 -0
  70. package/dist/react/RadioLabel.js +9 -0
  71. package/dist/react/Section.d.ts +9 -0
  72. package/dist/react/Section.js +14 -0
  73. package/dist/react/SectionHeading.d.ts +4 -0
  74. package/dist/react/SectionHeading.js +9 -0
  75. package/dist/react/Select.d.ts +4 -0
  76. package/dist/react/Select.js +9 -0
  77. package/dist/react/Spinner.d.ts +7 -0
  78. package/dist/react/Spinner.js +16 -0
  79. package/dist/react/Status.d.ts +12 -0
  80. package/dist/react/Status.js +17 -0
  81. package/dist/react/TextUtilities.d.ts +4 -0
  82. package/dist/react/TextUtilities.js +9 -0
  83. package/dist/react/Textarea.d.ts +4 -0
  84. package/dist/react/Textarea.js +9 -0
  85. package/dist/react/Toggle.d.ts +4 -0
  86. package/dist/react/Toggle.js +9 -0
  87. package/dist/react/ToggleGroup.d.ts +4 -0
  88. package/dist/react/ToggleGroup.js +9 -0
  89. package/dist/react/ToggleLabel.d.ts +4 -0
  90. package/dist/react/ToggleLabel.js +9 -0
  91. package/dist/react/index.d.ts +43 -0
  92. package/dist/react/index.js +43 -0
  93. package/dist/utils.d.ts +16 -0
  94. package/dist/utils.js +50 -0
  95. package/lib/deepgram.css +531 -486
  96. package/lib/tailwind-theme.css +0 -1
  97. package/package.json +17 -2
  98. package/src/react/ActionGroup.tsx +14 -0
  99. package/src/react/Alert.tsx +130 -0
  100. package/src/react/Btn.tsx +28 -0
  101. package/src/react/Card.tsx +93 -0
  102. package/src/react/CardHeading.tsx +14 -0
  103. package/src/react/CardHeadings.tsx +27 -0
  104. package/src/react/Checkbox.tsx +14 -0
  105. package/src/react/CheckboxDescription.tsx +14 -0
  106. package/src/react/CheckboxGroup.tsx +14 -0
  107. package/src/react/CheckboxLabel.tsx +14 -0
  108. package/src/react/CodeBlock.tsx +20 -0
  109. package/src/react/Columns.tsx +82 -0
  110. package/src/react/ConstrainWidth.tsx +14 -0
  111. package/src/react/DragDropZone.tsx +68 -0
  112. package/src/react/Footer.tsx +40 -0
  113. package/src/react/FormError.tsx +14 -0
  114. package/src/react/FormField.tsx +14 -0
  115. package/src/react/FormHelper.tsx +14 -0
  116. package/src/react/FormLabel.tsx +14 -0
  117. package/src/react/GridMobileStack.tsx +14 -0
  118. package/src/react/Hero.tsx +105 -0
  119. package/src/react/Icon.tsx +16 -0
  120. package/src/react/Input.tsx +18 -0
  121. package/src/react/ItemTitle.tsx +14 -0
  122. package/src/react/Newsletter.tsx +29 -0
  123. package/src/react/Option.tsx +14 -0
  124. package/src/react/PageHeading.tsx +40 -0
  125. package/src/react/PageHeadings.tsx +53 -0
  126. package/src/react/Prose.tsx +18 -0
  127. package/src/react/Radio.tsx +14 -0
  128. package/src/react/RadioDescription.tsx +27 -0
  129. package/src/react/RadioGroup.tsx +14 -0
  130. package/src/react/RadioLabel.tsx +14 -0
  131. package/src/react/Section.tsx +24 -0
  132. package/src/react/SectionHeading.tsx +14 -0
  133. package/src/react/Select.tsx +14 -0
  134. package/src/react/Spinner.tsx +27 -0
  135. package/src/react/Status.tsx +30 -0
  136. package/src/react/TextUtilities.tsx +14 -0
  137. package/src/react/Textarea.tsx +14 -0
  138. package/src/react/Toggle.tsx +14 -0
  139. package/src/react/ToggleGroup.tsx +14 -0
  140. package/src/react/ToggleLabel.tsx +14 -0
  141. package/src/react/index.ts +43 -0
  142. package/src/utils.ts +60 -0
@@ -9,7 +9,6 @@
9
9
 
10
10
  /* Source scanning for class detection */
11
11
  @source "./deepgram.css";
12
- @source inline("visible");
13
12
 
14
13
  /* Dark mode support */
15
14
  @variant dark (&.dark);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepgram/styles",
3
- "version": "0.2.11",
3
+ "version": "0.2.13",
4
4
  "description": "Tailwind-based design system and styles library for Deepgram design system and demos",
5
5
  "author": "Deepgram",
6
6
  "license": "ISC",
@@ -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"
@@ -85,17 +86,31 @@
85
86
  },
86
87
  "./logo/lettermark-circle-dark": {
87
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"
88
99
  }
89
100
  },
90
101
  "publishConfig": {
91
102
  "access": "public"
92
103
  },
93
104
  "peerDependencies": {
94
- "tailwindcss": "^4.0.0"
105
+ "tailwindcss": "^4.0.0",
106
+ "react": "^18.0.0 || ^19.0.0"
95
107
  },
96
108
  "peerDependenciesMeta": {
97
109
  "tailwindcss": {
98
110
  "optional": true
111
+ },
112
+ "react": {
113
+ "optional": true
99
114
  }
100
115
  }
101
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,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
+ );
@@ -0,0 +1,82 @@
1
+ import React from 'react';
2
+ import { forwardRef, type ComponentPropsWithRef } from 'react';
3
+
4
+ export interface ColumnsProps extends ComponentPropsWithRef<'div'> {
5
+ fixed?: boolean;
6
+ }
7
+
8
+ export const Columns = forwardRef<HTMLDivElement, ColumnsProps>(
9
+ function Columns({ fixed, className, children, ...props }, ref) {
10
+ const cls = [
11
+ 'dg-columns',
12
+ fixed && 'dg-columns--fixed',
13
+ className,
14
+ ].filter(Boolean).join(' ');
15
+ return <div ref={ref} className={cls} {...props}>{children}</div>;
16
+ }
17
+ );
18
+
19
+ export interface ColumnsWrapperProps extends ComponentPropsWithRef<'div'> {
20
+ }
21
+
22
+ export const ColumnsWrapper = forwardRef<HTMLDivElement, ColumnsWrapperProps>(
23
+ function ColumnsWrapper({ className, children, ...props }, ref) {
24
+ const cls = [
25
+ 'dg-columns__wrapper',
26
+ className,
27
+ ].filter(Boolean).join(' ');
28
+ return <div ref={ref} className={cls} {...props}>{children}</div>;
29
+ }
30
+ );
31
+
32
+ export interface ColumnsMobileHeaderProps extends ComponentPropsWithRef<'div'> {
33
+ }
34
+
35
+ export const ColumnsMobileHeader = forwardRef<HTMLDivElement, ColumnsMobileHeaderProps>(
36
+ function ColumnsMobileHeader({ className, children, ...props }, ref) {
37
+ const cls = [
38
+ 'dg-columns__mobile-header',
39
+ className,
40
+ ].filter(Boolean).join(' ');
41
+ return <div ref={ref} className={cls} {...props}>{children}</div>;
42
+ }
43
+ );
44
+
45
+ export interface ColumnsSidebarToggleProps extends ComponentPropsWithRef<'div'> {
46
+ }
47
+
48
+ export const ColumnsSidebarToggle = forwardRef<HTMLDivElement, ColumnsSidebarToggleProps>(
49
+ function ColumnsSidebarToggle({ className, children, ...props }, ref) {
50
+ const cls = [
51
+ 'dg-columns__sidebar-toggle',
52
+ className,
53
+ ].filter(Boolean).join(' ');
54
+ return <div ref={ref} className={cls} {...props}>{children}</div>;
55
+ }
56
+ );
57
+
58
+ export interface ColumnsColumnProps extends Omit<ComponentPropsWithRef<'div'>, 'is'> {
59
+ is?: React.ElementType;
60
+ left?: boolean;
61
+ right?: boolean;
62
+ center?: boolean;
63
+ sm?: boolean;
64
+ lg?: boolean;
65
+ xl?: boolean;
66
+ }
67
+
68
+ export const ColumnsColumn = forwardRef<HTMLElement, ColumnsColumnProps>(
69
+ function ColumnsColumn({ is: Tag = 'div', left, right, center, sm, lg, xl, className, children, ...props }, ref) {
70
+ const cls = [
71
+ 'dg-columns__column',
72
+ left && 'dg-columns__column--left',
73
+ right && 'dg-columns__column--right',
74
+ center && 'dg-columns__column--center',
75
+ sm && 'dg-columns__column--sm',
76
+ lg && 'dg-columns__column--lg',
77
+ xl && 'dg-columns__column--xl',
78
+ className,
79
+ ].filter(Boolean).join(' ');
80
+ return <Tag ref={ref} className={cls} {...props}>{children}</Tag>;
81
+ }
82
+ );
@@ -0,0 +1,14 @@
1
+ import { forwardRef, type ComponentPropsWithRef } from 'react';
2
+
3
+ export interface ConstrainWidthProps extends ComponentPropsWithRef<'div'> {
4
+ }
5
+
6
+ export const ConstrainWidth = forwardRef<HTMLDivElement, ConstrainWidthProps>(
7
+ function ConstrainWidth({ className, children, ...props }, ref) {
8
+ const cls = [
9
+ 'dg-constrain-width',
10
+ className,
11
+ ].filter(Boolean).join(' ');
12
+ return <div ref={ref} className={cls} {...props}>{children}</div>;
13
+ }
14
+ );
@@ -0,0 +1,68 @@
1
+ import { forwardRef, type ComponentPropsWithRef } from 'react';
2
+
3
+ export interface DragDropZoneProps extends ComponentPropsWithRef<'div'> {
4
+ }
5
+
6
+ export const DragDropZone = forwardRef<HTMLDivElement, DragDropZoneProps>(
7
+ function DragDropZone({ className, children, ...props }, ref) {
8
+ const cls = [
9
+ 'dg-drag-drop-zone',
10
+ className,
11
+ ].filter(Boolean).join(' ');
12
+ return <div ref={ref} className={cls} {...props}>{children}</div>;
13
+ }
14
+ );
15
+
16
+ export interface DragDropZoneInputProps extends ComponentPropsWithRef<'input'> {
17
+ }
18
+
19
+ export const DragDropZoneInput = forwardRef<HTMLInputElement, DragDropZoneInputProps>(
20
+ function DragDropZoneInput({ className, ...props }, ref) {
21
+ const cls = [
22
+ 'dg-drag-drop-zone__input',
23
+ className,
24
+ ].filter(Boolean).join(' ');
25
+ return <input ref={ref} type="file" className={cls} {...props} />;
26
+ }
27
+ );
28
+
29
+ export interface DragDropZoneIconProps extends ComponentPropsWithRef<'i'> {
30
+ name?: string;
31
+ }
32
+
33
+ export const DragDropZoneIcon = forwardRef<HTMLElement, DragDropZoneIconProps>(
34
+ function DragDropZoneIcon({ name, className, children, ...props }, ref) {
35
+ const cls = [
36
+ 'dg-drag-drop-zone__icon',
37
+ name && `fas fa-${name}`,
38
+ className,
39
+ ].filter(Boolean).join(' ');
40
+ return <i ref={ref} className={cls} {...props}>{children}</i>;
41
+ }
42
+ );
43
+
44
+ export interface DragDropZoneTextProps extends ComponentPropsWithRef<'p'> {
45
+ }
46
+
47
+ export const DragDropZoneText = forwardRef<HTMLParagraphElement, DragDropZoneTextProps>(
48
+ function DragDropZoneText({ className, children, ...props }, ref) {
49
+ const cls = [
50
+ 'dg-drag-drop-zone__text',
51
+ className,
52
+ ].filter(Boolean).join(' ');
53
+ return <p ref={ref} className={cls} {...props}>{children}</p>;
54
+ }
55
+ );
56
+
57
+ export interface DragDropZoneHintProps extends ComponentPropsWithRef<'p'> {
58
+ }
59
+
60
+ export const DragDropZoneHint = forwardRef<HTMLParagraphElement, DragDropZoneHintProps>(
61
+ function DragDropZoneHint({ className, children, ...props }, ref) {
62
+ const cls = [
63
+ 'dg-drag-drop-zone__hint',
64
+ className,
65
+ ].filter(Boolean).join(' ');
66
+ return <p ref={ref} className={cls} {...props}>{children}</p>;
67
+ }
68
+ );
@@ -0,0 +1,40 @@
1
+ import { forwardRef, type ComponentPropsWithRef } from 'react';
2
+
3
+ export interface FooterProps extends ComponentPropsWithRef<'footer'> {
4
+ }
5
+
6
+ export const Footer = forwardRef<HTMLElement, FooterProps>(
7
+ function Footer({ className, children, ...props }, ref) {
8
+ const cls = [
9
+ 'dg-footer',
10
+ className,
11
+ ].filter(Boolean).join(' ');
12
+ return <footer ref={ref} className={cls} {...props}>{children}</footer>;
13
+ }
14
+ );
15
+
16
+ export interface FooterSocialLinksProps extends ComponentPropsWithRef<'div'> {
17
+ }
18
+
19
+ export const FooterSocialLinks = forwardRef<HTMLDivElement, FooterSocialLinksProps>(
20
+ function FooterSocialLinks({ className, children, ...props }, ref) {
21
+ const cls = [
22
+ 'dg-footer__social-links',
23
+ className,
24
+ ].filter(Boolean).join(' ');
25
+ return <div ref={ref} className={cls} {...props}>{children}</div>;
26
+ }
27
+ );
28
+
29
+ export interface FooterSocialLinkProps extends ComponentPropsWithRef<'a'> {
30
+ }
31
+
32
+ export const FooterSocialLink = forwardRef<HTMLAnchorElement, FooterSocialLinkProps>(
33
+ function FooterSocialLink({ className, children, ...props }, ref) {
34
+ const cls = [
35
+ 'dg-footer__social-link',
36
+ className,
37
+ ].filter(Boolean).join(' ');
38
+ return <a ref={ref} className={cls} {...props}>{children}</a>;
39
+ }
40
+ );
@@ -0,0 +1,14 @@
1
+ import { forwardRef, type ComponentPropsWithRef } from 'react';
2
+
3
+ export interface FormErrorProps extends ComponentPropsWithRef<'span'> {
4
+ }
5
+
6
+ export const FormError = forwardRef<HTMLSpanElement, FormErrorProps>(
7
+ function FormError({ className, children, ...props }, ref) {
8
+ const cls = [
9
+ 'dg-form-error',
10
+ className,
11
+ ].filter(Boolean).join(' ');
12
+ return <span ref={ref} className={cls} {...props}>{children}</span>;
13
+ }
14
+ );