@duskmoon-dev/components 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/classes/index.d.ts +0 -1
- package/dist/classes/index.js +96 -31
- 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/DmProTable.d.ts +1 -1
- package/dist/components/dm-pro-table/DmProTable.types.d.ts +3 -2
- package/dist/components/dm-pro-table/index.js +11 -20
- 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/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 +0 -1
- package/dist/index.js +432 -377
- package/dist/infrastructure.js +1 -1
- package/dist/styles.css +502 -0
- package/package.json +1 -5
- package/dist/classes/dm-pro-table-inner.d.ts +0 -1
- package/dist/components/dm-pro-table-inner/DmProTableInner.d.ts +0 -7
- package/dist/components/dm-pro-table-inner/DmProTableInner.types.d.ts +0 -5
- package/dist/components/dm-pro-table-inner/index.d.ts +0 -2
- package/dist/components/dm-pro-table-inner/index.js +0 -2622
package/dist/classes/index.d.ts
CHANGED
|
@@ -32,7 +32,6 @@ export * from "./dm-infinite-scroll";
|
|
|
32
32
|
export * from "./dm-page-header";
|
|
33
33
|
export * from "./dm-pagination";
|
|
34
34
|
export * from "./dm-pro-table";
|
|
35
|
-
export * from "./dm-pro-table-inner";
|
|
36
35
|
export * from "./dm-provider";
|
|
37
36
|
export * from "./dm-query";
|
|
38
37
|
export * from "./dm-search";
|
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: "",
|
|
@@ -803,20 +832,6 @@ var dmProTableColumnSettingClass = "dm-pro-table-column-setting";
|
|
|
803
832
|
function getDmProTableClasses({ className }) {
|
|
804
833
|
return cn(dmProTableBaseClass, className);
|
|
805
834
|
}
|
|
806
|
-
// src/classes/dm-table.ts
|
|
807
|
-
var dmTableBaseClass = "dm-table";
|
|
808
|
-
var dmTableSearchClass = "dm-table-search";
|
|
809
|
-
var dmTableCardClass = "dm-table-card";
|
|
810
|
-
var dmTableHeaderClass = "dm-table-header";
|
|
811
|
-
var dmTableTitleClass = "dm-table-title";
|
|
812
|
-
var dmTableExtraClass = "dm-table-extra";
|
|
813
|
-
var dmTableIndicatorsClass = "dm-table-indicators";
|
|
814
|
-
var dmTableTableExtraClass = "dm-table-table-extra";
|
|
815
|
-
var dmTableColumnSettingClass = "dm-table-column-setting";
|
|
816
|
-
var dmTablePaginationClass = "dm-table-pagination";
|
|
817
|
-
function getDmTableClasses({ className }) {
|
|
818
|
-
return cn(dmTableBaseClass, className);
|
|
819
|
-
}
|
|
820
835
|
// src/classes/dm-provider.ts
|
|
821
836
|
var dmProviderClass = "dm-provider";
|
|
822
837
|
function getDmProviderClasses({ className }) {
|
|
@@ -890,6 +905,20 @@ function getDmTabsClasses({
|
|
|
890
905
|
const isVerticalLine = type === "line" && (tabPosition === "left" || tabPosition === "right");
|
|
891
906
|
return cn(type === "line" && (isVerticalLine ? dmTabsLineVerticalClass : dmTabsLineHorizontalClass), type !== "line" && (transparentCard ? dmTabsCardTransparentClass : dmTabsCardClass), optionTree && dmTabsOptionTreeClass, className);
|
|
892
907
|
}
|
|
908
|
+
// src/classes/dm-table.ts
|
|
909
|
+
var dmTableBaseClass = "dm-table";
|
|
910
|
+
var dmTableSearchClass = "dm-table-search";
|
|
911
|
+
var dmTableCardClass = "dm-table-card";
|
|
912
|
+
var dmTableHeaderClass = "dm-table-header";
|
|
913
|
+
var dmTableTitleClass = "dm-table-title";
|
|
914
|
+
var dmTableExtraClass = "dm-table-extra";
|
|
915
|
+
var dmTableIndicatorsClass = "dm-table-indicators";
|
|
916
|
+
var dmTableTableExtraClass = "dm-table-table-extra";
|
|
917
|
+
var dmTableColumnSettingClass = "dm-table-column-setting";
|
|
918
|
+
var dmTablePaginationClass = "dm-table-pagination";
|
|
919
|
+
function getDmTableClasses({ className }) {
|
|
920
|
+
return cn(dmTableBaseClass, className);
|
|
921
|
+
}
|
|
893
922
|
// src/classes/dm-toolbar.ts
|
|
894
923
|
var dmToolbarBaseClass = "dm-toolbar";
|
|
895
924
|
var dmToolbarItemClass = "dm-toolbar-item";
|
|
@@ -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({
|
|
@@ -3161,7 +3228,6 @@ export {
|
|
|
3161
3228
|
getDmSearchClasses,
|
|
3162
3229
|
getDmSearchClasses as getDmQueryClasses,
|
|
3163
3230
|
getDmProviderClasses,
|
|
3164
|
-
getDmTableClasses as getDmProTableInnerClasses,
|
|
3165
3231
|
getDmProTableClasses,
|
|
3166
3232
|
getDmPaginationRefreshClasses,
|
|
3167
3233
|
getDmPaginationClasses,
|
|
@@ -3330,7 +3396,6 @@ export {
|
|
|
3330
3396
|
dmProviderClass,
|
|
3331
3397
|
dmProTableToolbarClass,
|
|
3332
3398
|
dmProTableTitleClass,
|
|
3333
|
-
dmTableBaseClass as dmProTableInnerBaseClass,
|
|
3334
3399
|
dmProTableHeaderClass,
|
|
3335
3400
|
dmProTableColumnSettingClass,
|
|
3336
3401
|
dmProTableBaseClass,
|
|
@@ -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",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { TableRecord } from "../table/Table.types";
|
|
3
3
|
import type { DmProTableProps } from "./DmProTable.types";
|
|
4
|
-
export declare function DmProTable<T extends TableRecord = TableRecord>({ headerTitle, toolBarRender, toolbarItems, showTitleBar, columnSettingVisible, className, ...props }: DmProTableProps<T>): React.JSX.Element;
|
|
4
|
+
export declare function DmProTable<T extends TableRecord = TableRecord>({ headerTitle, toolBarRender, toolbarItems, showTitleBar, columnSettingVisible, className, rowData, ...props }: DmProTableProps<T>): React.JSX.Element;
|
|
5
5
|
export declare namespace DmProTable {
|
|
6
6
|
var displayName: string;
|
|
7
7
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
-
import type {
|
|
2
|
+
import type { DmTableProps } from "../dm-table";
|
|
3
3
|
import type { DmToolbarItem } from "../dm-toolbar";
|
|
4
4
|
import type { TableRecord } from "../table/Table.types";
|
|
5
|
-
export interface DmProTableProps<T = TableRecord> extends
|
|
5
|
+
export interface DmProTableProps<T = TableRecord> extends Omit<DmTableProps<T>, "dataSource"> {
|
|
6
|
+
rowData?: T[];
|
|
6
7
|
headerTitle?: ReactNode;
|
|
7
8
|
toolBarRender?: (() => ReactNode[] | ReactNode) | ReactNode[] | ReactNode;
|
|
8
9
|
toolbarItems?: DmToolbarItem[];
|
|
@@ -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",
|
|
@@ -2996,20 +2999,6 @@ function DmTable({
|
|
|
2996
2999
|
});
|
|
2997
3000
|
}
|
|
2998
3001
|
DmTable.displayName = "DmTable";
|
|
2999
|
-
// src/components/dm-pro-table-inner/DmProTableInner.tsx
|
|
3000
|
-
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
3001
|
-
function DmProTableInner({
|
|
3002
|
-
rowData,
|
|
3003
|
-
className,
|
|
3004
|
-
...props
|
|
3005
|
-
}) {
|
|
3006
|
-
return /* @__PURE__ */ jsx13(DmTable, {
|
|
3007
|
-
...props,
|
|
3008
|
-
className: getDmTableClasses({ className }),
|
|
3009
|
-
dataSource: rowData
|
|
3010
|
-
});
|
|
3011
|
-
}
|
|
3012
|
-
DmProTableInner.displayName = "DmProTableInner";
|
|
3013
3002
|
// src/classes/dm-pro-table.ts
|
|
3014
3003
|
var dmProTableBaseClass = "dm-pro-table";
|
|
3015
3004
|
var dmProTableHeaderClass = "dm-pro-table-header";
|
|
@@ -3021,7 +3010,7 @@ function getDmProTableClasses({ className }) {
|
|
|
3021
3010
|
}
|
|
3022
3011
|
|
|
3023
3012
|
// src/components/dm-pro-table/DmProTable.tsx
|
|
3024
|
-
import { jsx as
|
|
3013
|
+
import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
3025
3014
|
function renderToolbar(toolBarRender) {
|
|
3026
3015
|
if (typeof toolBarRender === "function")
|
|
3027
3016
|
return toolBarRender();
|
|
@@ -3034,6 +3023,7 @@ function DmProTable({
|
|
|
3034
3023
|
showTitleBar = true,
|
|
3035
3024
|
columnSettingVisible,
|
|
3036
3025
|
className,
|
|
3026
|
+
rowData,
|
|
3037
3027
|
...props
|
|
3038
3028
|
}) {
|
|
3039
3029
|
return /* @__PURE__ */ jsxs12("div", {
|
|
@@ -3042,17 +3032,17 @@ function DmProTable({
|
|
|
3042
3032
|
showTitleBar ? /* @__PURE__ */ jsxs12("div", {
|
|
3043
3033
|
className: dmProTableHeaderClass,
|
|
3044
3034
|
children: [
|
|
3045
|
-
/* @__PURE__ */
|
|
3035
|
+
/* @__PURE__ */ jsx13("div", {
|
|
3046
3036
|
className: dmProTableTitleClass,
|
|
3047
3037
|
children: headerTitle
|
|
3048
3038
|
}),
|
|
3049
3039
|
/* @__PURE__ */ jsxs12("div", {
|
|
3050
3040
|
className: dmProTableToolbarClass,
|
|
3051
3041
|
children: [
|
|
3052
|
-
toolbarItems?.length ? /* @__PURE__ */
|
|
3042
|
+
toolbarItems?.length ? /* @__PURE__ */ jsx13(DmToolbar, {
|
|
3053
3043
|
items: toolbarItems
|
|
3054
3044
|
}) : renderToolbar(toolBarRender),
|
|
3055
|
-
columnSettingVisible ? /* @__PURE__ */
|
|
3045
|
+
columnSettingVisible ? /* @__PURE__ */ jsx13(Button, {
|
|
3056
3046
|
type: "button",
|
|
3057
3047
|
color: "secondary",
|
|
3058
3048
|
appearance: "outline",
|
|
@@ -3063,9 +3053,10 @@ function DmProTable({
|
|
|
3063
3053
|
})
|
|
3064
3054
|
]
|
|
3065
3055
|
}) : null,
|
|
3066
|
-
/* @__PURE__ */
|
|
3056
|
+
/* @__PURE__ */ jsx13(DmTable, {
|
|
3067
3057
|
...props,
|
|
3068
|
-
columnSettingVisible: showTitleBar ? false : columnSettingVisible
|
|
3058
|
+
columnSettingVisible: showTitleBar ? false : columnSettingVisible,
|
|
3059
|
+
dataSource: rowData
|
|
3069
3060
|
})
|
|
3070
3061
|
]
|
|
3071
3062
|
});
|
|
@@ -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",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComponentProps } from "react";
|
|
2
|
-
export type ProgressColor = "primary" | "secondary" | "tertiary" | "
|
|
2
|
+
export type ProgressColor = "primary" | "secondary" | "tertiary" | "accent" | "neutral" | "base" | "info" | "success" | "warning" | "error";
|
|
3
3
|
export type ProgressSize = "sm" | "md" | "lg" | "xl";
|
|
4
4
|
export interface ProgressProps extends ComponentProps<"div"> {
|
|
5
5
|
color?: ProgressColor;
|
|
@@ -31,13 +31,16 @@ function cn(...inputs) {
|
|
|
31
31
|
// src/classes/progress.ts
|
|
32
32
|
var progressBaseClass = "progress";
|
|
33
33
|
var progressColorClasses = {
|
|
34
|
-
primary: "",
|
|
34
|
+
primary: "progress-primary",
|
|
35
35
|
secondary: "progress-secondary",
|
|
36
36
|
tertiary: "progress-tertiary",
|
|
37
|
+
accent: "progress-accent",
|
|
38
|
+
neutral: "progress-neutral",
|
|
39
|
+
base: "progress-base",
|
|
40
|
+
info: "progress-info",
|
|
37
41
|
success: "progress-success",
|
|
38
|
-
error: "progress-error",
|
|
39
42
|
warning: "progress-warning",
|
|
40
|
-
|
|
43
|
+
error: "progress-error"
|
|
41
44
|
};
|
|
42
45
|
var progressSizeClasses = {
|
|
43
46
|
sm: "progress-sm",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ChangeEvent, ComponentProps, ReactNode } from "react";
|
|
2
|
-
export type RadioColor = "primary" | "secondary" | "tertiary";
|
|
2
|
+
export type RadioColor = "primary" | "secondary" | "tertiary" | "accent" | "neutral" | "base" | "info" | "success" | "warning" | "error";
|
|
3
3
|
export type RadioSize = "sm" | "md" | "lg";
|
|
4
4
|
export type RadioLabelPosition = "left" | "right";
|
|
5
5
|
export interface RadioProps extends Omit<ComponentProps<"input">, "children" | "className" | "size" | "type"> {
|
|
@@ -37,7 +37,14 @@ var radioLabelBaseClass = "radio-label";
|
|
|
37
37
|
var radioColorClasses = {
|
|
38
38
|
primary: "radio-primary",
|
|
39
39
|
secondary: "radio-secondary",
|
|
40
|
-
tertiary: "radio-tertiary"
|
|
40
|
+
tertiary: "radio-tertiary",
|
|
41
|
+
accent: "radio-accent",
|
|
42
|
+
neutral: "radio-neutral",
|
|
43
|
+
base: "radio-base",
|
|
44
|
+
info: "radio-info",
|
|
45
|
+
success: "radio-success",
|
|
46
|
+
warning: "radio-warning",
|
|
47
|
+
error: "radio-error"
|
|
41
48
|
};
|
|
42
49
|
var radioSizeClasses = {
|
|
43
50
|
sm: "radio-sm",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ComponentProps, ReactNode } from "react";
|
|
2
2
|
export type RateSize = "sm" | "md" | "lg" | "xl";
|
|
3
|
-
export type RateColor = "primary" | "secondary" | "tertiary" | "warning";
|
|
3
|
+
export type RateColor = "primary" | "secondary" | "tertiary" | "accent" | "neutral" | "base" | "info" | "success" | "warning" | "error";
|
|
4
4
|
export interface RateCharacterRenderInfo {
|
|
5
5
|
index: number;
|
|
6
6
|
value: number;
|