@duskmoon-dev/components 0.2.1 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -5
- package/dist/classes/index.d.ts +1 -0
- package/dist/classes/index.js +100 -15
- package/dist/classes/markdown.d.ts +9 -0
- package/dist/components/alert/Alert.types.d.ts +1 -1
- package/dist/components/alert/index.js +6 -0
- package/dist/components/auto-complete/AutoComplete.types.d.ts +1 -1
- package/dist/components/auto-complete/index.js +3 -0
- package/dist/components/badge/Badge.types.d.ts +1 -1
- package/dist/components/badge/index.js +4 -0
- package/dist/components/button/Button.types.d.ts +1 -1
- package/dist/components/button/index.js +3 -0
- package/dist/components/checkbox/Checkbox.types.d.ts +1 -1
- package/dist/components/checkbox/index.js +8 -1
- package/dist/components/divider/Divider.types.d.ts +1 -1
- package/dist/components/divider/index.js +8 -2
- package/dist/components/dm-drawer/index.js +3 -0
- package/dist/components/dm-page-header/index.js +3 -0
- package/dist/components/dm-pro-table/index.js +3 -0
- package/dist/components/dm-query/index.js +3 -0
- package/dist/components/dm-search/index.js +3 -0
- package/dist/components/dm-table/index.js +3 -0
- package/dist/components/dm-toolbar/index.js +3 -0
- package/dist/components/dropdown/index.js +3 -0
- package/dist/components/markdown/Markdown.d.ts +3 -0
- package/dist/components/markdown/Markdown.types.d.ts +14 -0
- package/dist/components/markdown/index.d.ts +2 -0
- package/dist/components/markdown/index.js +171 -0
- package/dist/components/popconfirm/index.js +3 -0
- package/dist/components/progress/Progress.types.d.ts +1 -1
- package/dist/components/progress/index.js +6 -3
- package/dist/components/radio/Radio.types.d.ts +1 -1
- package/dist/components/radio/index.js +8 -1
- package/dist/components/rate/Rate.types.d.ts +1 -1
- package/dist/components/rate/index.js +8 -2
- package/dist/components/slider/Slider.types.d.ts +1 -1
- package/dist/components/slider/index.js +9 -2
- package/dist/components/switch/Switch.types.d.ts +1 -1
- package/dist/components/switch/index.js +8 -1
- package/dist/components/tag/Tag.types.d.ts +1 -1
- package/dist/components/tag/index.js +5 -2
- package/dist/components/timeline/Timeline.types.d.ts +1 -1
- package/dist/components/timeline/index.js +6 -1
- package/dist/components/tour/index.js +3 -0
- package/dist/generated/version.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +252 -43
- package/dist/infrastructure.js +1 -1
- package/dist/styles.css +545 -0
- package/package.json +9 -2
package/README.md
CHANGED
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
# @duskmoon-dev/components
|
|
2
2
|
|
|
3
|
-
The
|
|
3
|
+
The DuskMoon React component package.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
bun add @duskmoon-dev/components
|
|
8
|
+
bun add @duskmoon-dev/components @duskmoon-dev/core react react-dom
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Import the stylesheet once in your app:
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import "@duskmoon-dev/components/styles.css";
|
|
9
15
|
```
|
|
10
16
|
|
|
11
17
|
## Features
|
|
12
18
|
|
|
13
|
-
- **
|
|
14
|
-
- **
|
|
15
|
-
- **Modular
|
|
19
|
+
- **React 19 ready**: Components and examples target the current React runtime.
|
|
20
|
+
- **TypeScript first**: Public props and helper APIs ship with declarations.
|
|
21
|
+
- **Modular exports**: Import from the root package or from component subpaths.
|
|
22
|
+
- **DuskMoon styling**: Component classes and CSS are backed by
|
|
23
|
+
`@duskmoon-dev/core`.
|
|
16
24
|
|
|
17
25
|
## Usage
|
|
18
26
|
|
|
@@ -25,6 +33,23 @@ export default function MyComponent() {
|
|
|
25
33
|
}
|
|
26
34
|
```
|
|
27
35
|
|
|
36
|
+
Root imports are also supported:
|
|
37
|
+
|
|
38
|
+
```tsx
|
|
39
|
+
import { Button, DmTable, theme } from "@duskmoon-dev/components";
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Public Surface
|
|
43
|
+
|
|
44
|
+
- 71 standard components such as `Button`, `Table`, `Modal`, `Select`, and
|
|
45
|
+
`Typography`.
|
|
46
|
+
- 21 DuskMoon workflow components such as `DmLayout`, `DmSearch`, `DmTable`,
|
|
47
|
+
`DmProTable`, and `DmToolbar`.
|
|
48
|
+
- 13 infrastructure exports including `theme`, `version`,
|
|
49
|
+
`unstableSetRender`, `GetProps`, `GetRef`, and DuskMoon theme helpers.
|
|
50
|
+
- Component subpath exports follow `@duskmoon-dev/components/{component-id}`,
|
|
51
|
+
for example `@duskmoon-dev/components/date-picker`.
|
|
52
|
+
|
|
28
53
|
## Development
|
|
29
54
|
|
|
30
55
|
```bash
|
|
@@ -36,4 +61,7 @@ bun run test
|
|
|
36
61
|
|
|
37
62
|
# Typecheck
|
|
38
63
|
bun run typecheck
|
|
64
|
+
|
|
65
|
+
# Check parity manifest coverage
|
|
66
|
+
bun run parity:components
|
|
39
67
|
```
|
package/dist/classes/index.d.ts
CHANGED
package/dist/classes/index.js
CHANGED
|
@@ -5,6 +5,12 @@ import {
|
|
|
5
5
|
// src/classes/alert.ts
|
|
6
6
|
var alertBaseClass = "alert";
|
|
7
7
|
var alertColorClasses = {
|
|
8
|
+
primary: "alert-primary",
|
|
9
|
+
secondary: "alert-secondary",
|
|
10
|
+
tertiary: "alert-tertiary",
|
|
11
|
+
accent: "alert-accent",
|
|
12
|
+
neutral: "alert-neutral",
|
|
13
|
+
base: "alert-base",
|
|
8
14
|
info: "alert-info",
|
|
9
15
|
success: "alert-success",
|
|
10
16
|
warning: "alert-warning",
|
|
@@ -83,6 +89,9 @@ var autoCompleteColorClasses = {
|
|
|
83
89
|
primary: "autocomplete-primary",
|
|
84
90
|
secondary: "autocomplete-secondary",
|
|
85
91
|
tertiary: "autocomplete-tertiary",
|
|
92
|
+
accent: "autocomplete-accent",
|
|
93
|
+
neutral: "autocomplete-neutral",
|
|
94
|
+
base: "autocomplete-base",
|
|
86
95
|
info: "autocomplete-info",
|
|
87
96
|
success: "autocomplete-success",
|
|
88
97
|
warning: "autocomplete-warning",
|
|
@@ -155,6 +164,10 @@ var badgeBaseClass = "badge";
|
|
|
155
164
|
var badgeColorClasses = {
|
|
156
165
|
primary: "badge-primary",
|
|
157
166
|
secondary: "badge-secondary",
|
|
167
|
+
tertiary: "badge-tertiary",
|
|
168
|
+
accent: "badge-accent",
|
|
169
|
+
neutral: "badge-neutral",
|
|
170
|
+
base: "badge-base",
|
|
158
171
|
info: "badge-info",
|
|
159
172
|
success: "badge-success",
|
|
160
173
|
warning: "badge-warning",
|
|
@@ -213,6 +226,9 @@ var buttonColorClasses = {
|
|
|
213
226
|
primary: "btn-primary",
|
|
214
227
|
secondary: "btn-secondary",
|
|
215
228
|
tertiary: "btn-tertiary",
|
|
229
|
+
accent: "btn-accent",
|
|
230
|
+
neutral: "btn-neutral",
|
|
231
|
+
base: "btn-base",
|
|
216
232
|
info: "btn-info",
|
|
217
233
|
success: "btn-success",
|
|
218
234
|
warning: "btn-warning",
|
|
@@ -400,7 +416,14 @@ var checkboxLabelBaseClass = "checkbox-text";
|
|
|
400
416
|
var checkboxColorClasses = {
|
|
401
417
|
primary: "checkbox-primary",
|
|
402
418
|
secondary: "checkbox-secondary",
|
|
403
|
-
tertiary: "checkbox-tertiary"
|
|
419
|
+
tertiary: "checkbox-tertiary",
|
|
420
|
+
accent: "checkbox-accent",
|
|
421
|
+
neutral: "checkbox-neutral",
|
|
422
|
+
base: "checkbox-base",
|
|
423
|
+
info: "checkbox-info",
|
|
424
|
+
success: "checkbox-success",
|
|
425
|
+
warning: "checkbox-warning",
|
|
426
|
+
error: "checkbox-error"
|
|
404
427
|
};
|
|
405
428
|
var checkboxSizeClasses = {
|
|
406
429
|
sm: "checkbox-sm",
|
|
@@ -610,10 +633,16 @@ var dividerThicknessClasses = {
|
|
|
610
633
|
thick: "divider-thick"
|
|
611
634
|
};
|
|
612
635
|
var dividerColorClasses = {
|
|
613
|
-
neutral: "",
|
|
614
636
|
primary: "divider-primary",
|
|
615
637
|
secondary: "divider-secondary",
|
|
616
|
-
tertiary: "divider-tertiary"
|
|
638
|
+
tertiary: "divider-tertiary",
|
|
639
|
+
accent: "divider-accent",
|
|
640
|
+
neutral: "divider-neutral",
|
|
641
|
+
base: "divider-base",
|
|
642
|
+
info: "divider-info",
|
|
643
|
+
success: "divider-success",
|
|
644
|
+
warning: "divider-warning",
|
|
645
|
+
error: "divider-error"
|
|
617
646
|
};
|
|
618
647
|
var dividerSpacingClasses = {
|
|
619
648
|
normal: "",
|
|
@@ -1514,13 +1543,16 @@ function getPopconfirmClasses({
|
|
|
1514
1543
|
// src/classes/progress.ts
|
|
1515
1544
|
var progressBaseClass = "progress";
|
|
1516
1545
|
var progressColorClasses = {
|
|
1517
|
-
primary: "",
|
|
1546
|
+
primary: "progress-primary",
|
|
1518
1547
|
secondary: "progress-secondary",
|
|
1519
1548
|
tertiary: "progress-tertiary",
|
|
1549
|
+
accent: "progress-accent",
|
|
1550
|
+
neutral: "progress-neutral",
|
|
1551
|
+
base: "progress-base",
|
|
1552
|
+
info: "progress-info",
|
|
1520
1553
|
success: "progress-success",
|
|
1521
|
-
error: "progress-error",
|
|
1522
1554
|
warning: "progress-warning",
|
|
1523
|
-
|
|
1555
|
+
error: "progress-error"
|
|
1524
1556
|
};
|
|
1525
1557
|
var progressSizeClasses = {
|
|
1526
1558
|
sm: "progress-sm",
|
|
@@ -1580,7 +1612,14 @@ var radioLabelBaseClass = "radio-label";
|
|
|
1580
1612
|
var radioColorClasses = {
|
|
1581
1613
|
primary: "radio-primary",
|
|
1582
1614
|
secondary: "radio-secondary",
|
|
1583
|
-
tertiary: "radio-tertiary"
|
|
1615
|
+
tertiary: "radio-tertiary",
|
|
1616
|
+
accent: "radio-accent",
|
|
1617
|
+
neutral: "radio-neutral",
|
|
1618
|
+
base: "radio-base",
|
|
1619
|
+
info: "radio-info",
|
|
1620
|
+
success: "radio-success",
|
|
1621
|
+
warning: "radio-warning",
|
|
1622
|
+
error: "radio-error"
|
|
1584
1623
|
};
|
|
1585
1624
|
var radioSizeClasses = {
|
|
1586
1625
|
sm: "radio-sm",
|
|
@@ -1626,10 +1665,16 @@ var rateSizeClasses = {
|
|
|
1626
1665
|
xl: "rating-xl"
|
|
1627
1666
|
};
|
|
1628
1667
|
var rateColorClasses = {
|
|
1629
|
-
primary: "",
|
|
1668
|
+
primary: "rating-primary",
|
|
1630
1669
|
secondary: "rating-secondary",
|
|
1631
1670
|
tertiary: "rating-tertiary",
|
|
1632
|
-
|
|
1671
|
+
accent: "rating-accent",
|
|
1672
|
+
neutral: "rating-neutral",
|
|
1673
|
+
base: "rating-base",
|
|
1674
|
+
info: "rating-info",
|
|
1675
|
+
success: "rating-success",
|
|
1676
|
+
warning: "rating-warning",
|
|
1677
|
+
error: "rating-error"
|
|
1633
1678
|
};
|
|
1634
1679
|
function getRateClasses({
|
|
1635
1680
|
size = "md",
|
|
@@ -1846,9 +1891,16 @@ var sliderSizeClasses = {
|
|
|
1846
1891
|
lg: "slider-lg"
|
|
1847
1892
|
};
|
|
1848
1893
|
var sliderColorClasses = {
|
|
1849
|
-
primary: "",
|
|
1894
|
+
primary: "slider-primary",
|
|
1850
1895
|
secondary: "slider-secondary",
|
|
1851
|
-
tertiary: "slider-tertiary"
|
|
1896
|
+
tertiary: "slider-tertiary",
|
|
1897
|
+
accent: "slider-accent",
|
|
1898
|
+
neutral: "slider-neutral",
|
|
1899
|
+
base: "slider-base",
|
|
1900
|
+
info: "slider-info",
|
|
1901
|
+
success: "slider-success",
|
|
1902
|
+
warning: "slider-warning",
|
|
1903
|
+
error: "slider-error"
|
|
1852
1904
|
};
|
|
1853
1905
|
function getSliderClasses({
|
|
1854
1906
|
size = "md",
|
|
@@ -2016,7 +2068,14 @@ var switchSizeClasses = {
|
|
|
2016
2068
|
var switchColorClasses = {
|
|
2017
2069
|
primary: "switch-primary",
|
|
2018
2070
|
secondary: "switch-secondary",
|
|
2019
|
-
tertiary: "switch-tertiary"
|
|
2071
|
+
tertiary: "switch-tertiary",
|
|
2072
|
+
accent: "switch-accent",
|
|
2073
|
+
neutral: "switch-neutral",
|
|
2074
|
+
base: "switch-base",
|
|
2075
|
+
info: "switch-info",
|
|
2076
|
+
success: "switch-success",
|
|
2077
|
+
warning: "switch-warning",
|
|
2078
|
+
error: "switch-error"
|
|
2020
2079
|
};
|
|
2021
2080
|
function getSwitchClasses({
|
|
2022
2081
|
size = "md",
|
|
@@ -2104,10 +2163,13 @@ var tagColorClasses = {
|
|
|
2104
2163
|
primary: "chip-primary",
|
|
2105
2164
|
secondary: "chip-secondary",
|
|
2106
2165
|
tertiary: "chip-tertiary",
|
|
2166
|
+
accent: "chip-accent",
|
|
2167
|
+
neutral: "chip-neutral",
|
|
2168
|
+
base: "chip-base",
|
|
2169
|
+
info: "chip-info",
|
|
2107
2170
|
success: "chip-success",
|
|
2108
|
-
error: "chip-error",
|
|
2109
2171
|
warning: "chip-warning",
|
|
2110
|
-
|
|
2172
|
+
error: "chip-error"
|
|
2111
2173
|
};
|
|
2112
2174
|
function getTagClasses({
|
|
2113
2175
|
color,
|
|
@@ -2223,10 +2285,15 @@ var timelineSizeClasses = {
|
|
|
2223
2285
|
lg: "timeline-lg"
|
|
2224
2286
|
};
|
|
2225
2287
|
var timelineMarkerColorClasses = {
|
|
2226
|
-
primary: "",
|
|
2288
|
+
primary: "timeline-marker-primary",
|
|
2227
2289
|
secondary: "timeline-marker-secondary",
|
|
2228
2290
|
tertiary: "timeline-marker-tertiary",
|
|
2291
|
+
accent: "timeline-marker-accent",
|
|
2292
|
+
neutral: "timeline-marker-neutral",
|
|
2293
|
+
base: "timeline-marker-base",
|
|
2294
|
+
info: "timeline-marker-info",
|
|
2229
2295
|
success: "timeline-marker-success",
|
|
2296
|
+
warning: "timeline-marker-warning",
|
|
2230
2297
|
error: "timeline-marker-error"
|
|
2231
2298
|
};
|
|
2232
2299
|
function getTimelineClasses({
|
|
@@ -2510,6 +2577,18 @@ function getTypographyLinkClasses({
|
|
|
2510
2577
|
}) {
|
|
2511
2578
|
return cn(typographyLinkClass, status && typographyStatusClasses[status], disabled && typographyDisabledClass, ellipsis && typographyEllipsisClass, className);
|
|
2512
2579
|
}
|
|
2580
|
+
// src/classes/markdown.ts
|
|
2581
|
+
var markdownBaseClass = "markdown-body";
|
|
2582
|
+
var markdownFrontMatterClass = "dm-front-matter";
|
|
2583
|
+
var markdownColorCodeClass = "dm-color-code";
|
|
2584
|
+
var markdownColorChipClass = "dm-color-chip";
|
|
2585
|
+
var markdownColorChipSwatchClass = "dm-color-chip-swatch";
|
|
2586
|
+
function getMarkdownClasses({
|
|
2587
|
+
variant,
|
|
2588
|
+
className
|
|
2589
|
+
}) {
|
|
2590
|
+
return cn(markdownBaseClass, variant && `${markdownBaseClass}-${variant}`, className);
|
|
2591
|
+
}
|
|
2513
2592
|
// src/classes/upload.ts
|
|
2514
2593
|
var uploadBaseClass = "file-upload";
|
|
2515
2594
|
var uploadTriggerClass = "file-upload-trigger";
|
|
@@ -2994,6 +3073,11 @@ export {
|
|
|
2994
3073
|
mentionsNoOptionsClass,
|
|
2995
3074
|
mentionsDropdownClass,
|
|
2996
3075
|
mentionsBaseClass,
|
|
3076
|
+
markdownFrontMatterClass,
|
|
3077
|
+
markdownColorCodeClass,
|
|
3078
|
+
markdownColorChipSwatchClass,
|
|
3079
|
+
markdownColorChipClass,
|
|
3080
|
+
markdownBaseClass,
|
|
2997
3081
|
listSizeClasses,
|
|
2998
3082
|
listItemTrailingClass,
|
|
2999
3083
|
listItemTextClass,
|
|
@@ -3128,6 +3212,7 @@ export {
|
|
|
3128
3212
|
getMentionsOptionClasses,
|
|
3129
3213
|
getMentionsDropdownClasses,
|
|
3130
3214
|
getMentionsClasses,
|
|
3215
|
+
getMarkdownClasses,
|
|
3131
3216
|
getListItemClasses,
|
|
3132
3217
|
getListClasses,
|
|
3133
3218
|
getLayoutSiderClasses,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const markdownBaseClass = "markdown-body";
|
|
2
|
+
export declare const markdownFrontMatterClass = "dm-front-matter";
|
|
3
|
+
export declare const markdownColorCodeClass = "dm-color-code";
|
|
4
|
+
export declare const markdownColorChipClass = "dm-color-chip";
|
|
5
|
+
export declare const markdownColorChipSwatchClass = "dm-color-chip-swatch";
|
|
6
|
+
export declare function getMarkdownClasses({ variant, className, }: {
|
|
7
|
+
variant?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
}): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComponentProps } from "react";
|
|
2
|
-
export type AlertColor = "info" | "success" | "warning" | "error";
|
|
2
|
+
export type AlertColor = "primary" | "secondary" | "tertiary" | "accent" | "neutral" | "base" | "info" | "success" | "warning" | "error";
|
|
3
3
|
export type AlertAppearance = "filled" | "outline" | "tonal";
|
|
4
4
|
export interface AlertProps extends ComponentProps<"div"> {
|
|
5
5
|
color?: AlertColor;
|
|
@@ -31,6 +31,12 @@ function cn(...inputs) {
|
|
|
31
31
|
// src/classes/alert.ts
|
|
32
32
|
var alertBaseClass = "alert";
|
|
33
33
|
var alertColorClasses = {
|
|
34
|
+
primary: "alert-primary",
|
|
35
|
+
secondary: "alert-secondary",
|
|
36
|
+
tertiary: "alert-tertiary",
|
|
37
|
+
accent: "alert-accent",
|
|
38
|
+
neutral: "alert-neutral",
|
|
39
|
+
base: "alert-base",
|
|
34
40
|
info: "alert-info",
|
|
35
41
|
success: "alert-success",
|
|
36
42
|
warning: "alert-warning",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ComponentProps, ForwardRefExoticComponent, ReactNode, RefAttributes } from "react";
|
|
2
2
|
export type AutoCompleteSize = "sm" | "md" | "lg";
|
|
3
|
-
export type AutoCompleteColor = "primary" | "secondary" | "tertiary" | "info" | "success" | "warning" | "error";
|
|
3
|
+
export type AutoCompleteColor = "primary" | "secondary" | "tertiary" | "accent" | "neutral" | "base" | "info" | "success" | "warning" | "error";
|
|
4
4
|
export interface AutoCompleteOptionType {
|
|
5
5
|
value: string;
|
|
6
6
|
label?: ReactNode;
|
|
@@ -46,6 +46,9 @@ var autoCompleteColorClasses = {
|
|
|
46
46
|
primary: "autocomplete-primary",
|
|
47
47
|
secondary: "autocomplete-secondary",
|
|
48
48
|
tertiary: "autocomplete-tertiary",
|
|
49
|
+
accent: "autocomplete-accent",
|
|
50
|
+
neutral: "autocomplete-neutral",
|
|
51
|
+
base: "autocomplete-base",
|
|
49
52
|
info: "autocomplete-info",
|
|
50
53
|
success: "autocomplete-success",
|
|
51
54
|
warning: "autocomplete-warning",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComponentProps } from "react";
|
|
2
|
-
export type BadgeColor = "primary" | "secondary" | "info" | "success" | "warning" | "error";
|
|
2
|
+
export type BadgeColor = "primary" | "secondary" | "tertiary" | "accent" | "neutral" | "base" | "info" | "success" | "warning" | "error";
|
|
3
3
|
export type BadgeAppearance = "filled" | "outline" | "tonal" | "ghost";
|
|
4
4
|
export type BadgeSize = "sm" | "md" | "lg";
|
|
5
5
|
export interface BadgeProps extends ComponentProps<"div"> {
|
|
@@ -30,6 +30,10 @@ var badgeBaseClass = "badge";
|
|
|
30
30
|
var badgeColorClasses = {
|
|
31
31
|
primary: "badge-primary",
|
|
32
32
|
secondary: "badge-secondary",
|
|
33
|
+
tertiary: "badge-tertiary",
|
|
34
|
+
accent: "badge-accent",
|
|
35
|
+
neutral: "badge-neutral",
|
|
36
|
+
base: "badge-base",
|
|
33
37
|
info: "badge-info",
|
|
34
38
|
success: "badge-success",
|
|
35
39
|
warning: "badge-warning",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComponentProps } from "react";
|
|
2
|
-
export type ButtonColor = "primary" | "secondary" | "tertiary" | "info" | "success" | "warning" | "error";
|
|
2
|
+
export type ButtonColor = "primary" | "secondary" | "tertiary" | "accent" | "neutral" | "base" | "info" | "success" | "warning" | "error";
|
|
3
3
|
export type ButtonAppearance = "filled" | "outline" | "tonal" | "ghost" | "text";
|
|
4
4
|
export type ButtonShape = "rect" | "circle" | "square";
|
|
5
5
|
export type ButtonSize = "xs" | "sm" | "md" | "lg";
|
|
@@ -31,6 +31,9 @@ var buttonColorClasses = {
|
|
|
31
31
|
primary: "btn-primary",
|
|
32
32
|
secondary: "btn-secondary",
|
|
33
33
|
tertiary: "btn-tertiary",
|
|
34
|
+
accent: "btn-accent",
|
|
35
|
+
neutral: "btn-neutral",
|
|
36
|
+
base: "btn-base",
|
|
34
37
|
info: "btn-info",
|
|
35
38
|
success: "btn-success",
|
|
36
39
|
warning: "btn-warning",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ChangeEvent, ComponentProps, ReactNode } from "react";
|
|
2
|
-
export type CheckboxColor = "primary" | "secondary" | "tertiary";
|
|
2
|
+
export type CheckboxColor = "primary" | "secondary" | "tertiary" | "accent" | "neutral" | "base" | "info" | "success" | "warning" | "error";
|
|
3
3
|
export type CheckboxSize = "sm" | "md" | "lg";
|
|
4
4
|
export type CheckboxLabelPosition = "left" | "right";
|
|
5
5
|
export interface CheckboxProps extends Omit<ComponentProps<"input">, "children" | "className" | "size" | "type"> {
|
|
@@ -41,7 +41,14 @@ var checkboxLabelBaseClass = "checkbox-text";
|
|
|
41
41
|
var checkboxColorClasses = {
|
|
42
42
|
primary: "checkbox-primary",
|
|
43
43
|
secondary: "checkbox-secondary",
|
|
44
|
-
tertiary: "checkbox-tertiary"
|
|
44
|
+
tertiary: "checkbox-tertiary",
|
|
45
|
+
accent: "checkbox-accent",
|
|
46
|
+
neutral: "checkbox-neutral",
|
|
47
|
+
base: "checkbox-base",
|
|
48
|
+
info: "checkbox-info",
|
|
49
|
+
success: "checkbox-success",
|
|
50
|
+
warning: "checkbox-warning",
|
|
51
|
+
error: "checkbox-error"
|
|
45
52
|
};
|
|
46
53
|
var checkboxSizeClasses = {
|
|
47
54
|
sm: "checkbox-sm",
|
|
@@ -2,7 +2,7 @@ import type { ComponentProps } from "react";
|
|
|
2
2
|
export type DividerOrientation = "horizontal" | "vertical";
|
|
3
3
|
export type DividerVariant = "solid" | "dashed" | "dotted";
|
|
4
4
|
export type DividerThickness = "thin" | "medium" | "thick";
|
|
5
|
-
export type DividerColor = "neutral" | "
|
|
5
|
+
export type DividerColor = "primary" | "secondary" | "tertiary" | "accent" | "neutral" | "base" | "info" | "success" | "warning" | "error";
|
|
6
6
|
export type DividerSpacing = "normal" | "compact" | "comfortable" | "spacious";
|
|
7
7
|
export interface DividerProps extends ComponentProps<"div"> {
|
|
8
8
|
orientation?: DividerOrientation;
|
|
@@ -45,10 +45,16 @@ var dividerThicknessClasses = {
|
|
|
45
45
|
thick: "divider-thick"
|
|
46
46
|
};
|
|
47
47
|
var dividerColorClasses = {
|
|
48
|
-
neutral: "",
|
|
49
48
|
primary: "divider-primary",
|
|
50
49
|
secondary: "divider-secondary",
|
|
51
|
-
tertiary: "divider-tertiary"
|
|
50
|
+
tertiary: "divider-tertiary",
|
|
51
|
+
accent: "divider-accent",
|
|
52
|
+
neutral: "divider-neutral",
|
|
53
|
+
base: "divider-base",
|
|
54
|
+
info: "divider-info",
|
|
55
|
+
success: "divider-success",
|
|
56
|
+
warning: "divider-warning",
|
|
57
|
+
error: "divider-error"
|
|
52
58
|
};
|
|
53
59
|
var dividerSpacingClasses = {
|
|
54
60
|
normal: "",
|
|
@@ -31,6 +31,9 @@ var buttonColorClasses = {
|
|
|
31
31
|
primary: "btn-primary",
|
|
32
32
|
secondary: "btn-secondary",
|
|
33
33
|
tertiary: "btn-tertiary",
|
|
34
|
+
accent: "btn-accent",
|
|
35
|
+
neutral: "btn-neutral",
|
|
36
|
+
base: "btn-base",
|
|
34
37
|
info: "btn-info",
|
|
35
38
|
success: "btn-success",
|
|
36
39
|
warning: "btn-warning",
|
|
@@ -31,6 +31,9 @@ var buttonColorClasses = {
|
|
|
31
31
|
primary: "btn-primary",
|
|
32
32
|
secondary: "btn-secondary",
|
|
33
33
|
tertiary: "btn-tertiary",
|
|
34
|
+
accent: "btn-accent",
|
|
35
|
+
neutral: "btn-neutral",
|
|
36
|
+
base: "btn-base",
|
|
34
37
|
info: "btn-info",
|
|
35
38
|
success: "btn-success",
|
|
36
39
|
warning: "btn-warning",
|
|
@@ -31,6 +31,9 @@ var buttonColorClasses = {
|
|
|
31
31
|
primary: "btn-primary",
|
|
32
32
|
secondary: "btn-secondary",
|
|
33
33
|
tertiary: "btn-tertiary",
|
|
34
|
+
accent: "btn-accent",
|
|
35
|
+
neutral: "btn-neutral",
|
|
36
|
+
base: "btn-base",
|
|
34
37
|
info: "btn-info",
|
|
35
38
|
success: "btn-success",
|
|
36
39
|
warning: "btn-warning",
|
|
@@ -31,6 +31,9 @@ var buttonColorClasses = {
|
|
|
31
31
|
primary: "btn-primary",
|
|
32
32
|
secondary: "btn-secondary",
|
|
33
33
|
tertiary: "btn-tertiary",
|
|
34
|
+
accent: "btn-accent",
|
|
35
|
+
neutral: "btn-neutral",
|
|
36
|
+
base: "btn-base",
|
|
34
37
|
info: "btn-info",
|
|
35
38
|
success: "btn-success",
|
|
36
39
|
warning: "btn-warning",
|
|
@@ -31,6 +31,9 @@ var buttonColorClasses = {
|
|
|
31
31
|
primary: "btn-primary",
|
|
32
32
|
secondary: "btn-secondary",
|
|
33
33
|
tertiary: "btn-tertiary",
|
|
34
|
+
accent: "btn-accent",
|
|
35
|
+
neutral: "btn-neutral",
|
|
36
|
+
base: "btn-base",
|
|
34
37
|
info: "btn-info",
|
|
35
38
|
success: "btn-success",
|
|
36
39
|
warning: "btn-warning",
|
|
@@ -31,6 +31,9 @@ var buttonColorClasses = {
|
|
|
31
31
|
primary: "btn-primary",
|
|
32
32
|
secondary: "btn-secondary",
|
|
33
33
|
tertiary: "btn-tertiary",
|
|
34
|
+
accent: "btn-accent",
|
|
35
|
+
neutral: "btn-neutral",
|
|
36
|
+
base: "btn-base",
|
|
34
37
|
info: "btn-info",
|
|
35
38
|
success: "btn-success",
|
|
36
39
|
warning: "btn-warning",
|
|
@@ -31,6 +31,9 @@ var buttonColorClasses = {
|
|
|
31
31
|
primary: "btn-primary",
|
|
32
32
|
secondary: "btn-secondary",
|
|
33
33
|
tertiary: "btn-tertiary",
|
|
34
|
+
accent: "btn-accent",
|
|
35
|
+
neutral: "btn-neutral",
|
|
36
|
+
base: "btn-base",
|
|
34
37
|
info: "btn-info",
|
|
35
38
|
success: "btn-success",
|
|
36
39
|
warning: "btn-warning",
|
|
@@ -31,6 +31,9 @@ var buttonColorClasses = {
|
|
|
31
31
|
primary: "btn-primary",
|
|
32
32
|
secondary: "btn-secondary",
|
|
33
33
|
tertiary: "btn-tertiary",
|
|
34
|
+
accent: "btn-accent",
|
|
35
|
+
neutral: "btn-neutral",
|
|
36
|
+
base: "btn-base",
|
|
34
37
|
info: "btn-info",
|
|
35
38
|
success: "btn-success",
|
|
36
39
|
warning: "btn-warning",
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
export type MarkdownFrontMatterMode = "render" | "hidden" | "disabled";
|
|
3
|
+
export interface MarkdownProps extends Omit<ComponentProps<"div">, "children"> {
|
|
4
|
+
/** Markdown source to render. */
|
|
5
|
+
markdown?: string;
|
|
6
|
+
/** Convert soft line endings to `<br>` elements. @default true */
|
|
7
|
+
breaks?: boolean;
|
|
8
|
+
/** Add a visual swatch to inline code containing a valid CSS color. @default true */
|
|
9
|
+
colorChips?: boolean;
|
|
10
|
+
/** Control handling of YAML front matter at the beginning of the source. @default "render" */
|
|
11
|
+
frontMatter?: MarkdownFrontMatterMode;
|
|
12
|
+
/** Optional color variant used to build the `markdown-body-{variant}` class. */
|
|
13
|
+
variant?: string;
|
|
14
|
+
}
|