@hellboy/ds 0.1.2 → 0.2.7
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 +568 -71
- package/{src/style/components/badge → dist/components}/badge.css +9 -25
- package/dist/components/badge.d.mts +12 -0
- package/dist/components/badge.d.ts +12 -0
- package/dist/components/badge.js +42 -0
- package/dist/components/badge.mjs +15 -0
- package/dist/components/banner.css +280 -0
- package/dist/components/banner.d.mts +12 -0
- package/dist/components/banner.d.ts +12 -0
- package/dist/components/banner.js +184 -0
- package/dist/components/banner.mjs +147 -0
- package/dist/components/button-group.css +289 -0
- package/dist/components/button-group.d.mts +81 -0
- package/dist/components/button-group.d.ts +81 -0
- package/dist/components/button-group.js +180 -0
- package/dist/components/button-group.mjs +143 -0
- package/{src/style/components/button → dist/components}/button.css +59 -62
- package/dist/components/button.d.mts +57 -0
- package/dist/components/button.d.ts +57 -0
- package/dist/components/button.js +129 -0
- package/dist/components/button.mjs +92 -0
- package/{src/style/components/card → dist/components}/card.css +9 -30
- package/dist/components/card.d.mts +31 -0
- package/dist/components/card.d.ts +31 -0
- package/dist/components/card.js +59 -0
- package/dist/components/card.mjs +32 -0
- package/{src/style → dist}/components/checkbox.css +51 -43
- package/dist/components/checkbox.d.mts +31 -0
- package/dist/components/checkbox.d.ts +31 -0
- package/dist/components/checkbox.js +130 -0
- package/dist/components/checkbox.mjs +93 -0
- package/{src/style/components/code-block → dist/components}/code-block.css +3 -7
- package/dist/components/code-block.d.mts +24 -0
- package/dist/components/code-block.d.ts +24 -0
- package/dist/components/code-block.js +43 -0
- package/dist/components/code-block.mjs +16 -0
- package/dist/components/color-control.css +285 -0
- package/dist/components/color-control.d.mts +5 -0
- package/dist/components/color-control.d.ts +5 -0
- package/dist/components/color-control.js +534 -0
- package/dist/components/color-control.mjs +497 -0
- package/dist/components/dialog.css +930 -0
- package/dist/components/dialog.d.mts +32 -0
- package/dist/components/dialog.d.ts +32 -0
- package/dist/components/dialog.js +1111 -0
- package/dist/components/dialog.mjs +1074 -0
- package/dist/components/divider.css +356 -0
- package/dist/components/divider.d.mts +32 -0
- package/dist/components/divider.d.ts +32 -0
- package/dist/components/divider.js +344 -0
- package/dist/components/divider.mjs +307 -0
- package/{src/style/components/drag-handle → dist/components}/drag-handle.css +3 -18
- package/dist/components/drag-handle.d.mts +11 -0
- package/dist/components/drag-handle.d.ts +11 -0
- package/dist/components/drag-handle.js +103 -0
- package/dist/components/drag-handle.mjs +66 -0
- package/dist/components/drawer.css +1027 -0
- package/dist/components/drawer.d.mts +14 -0
- package/dist/components/drawer.d.ts +14 -0
- package/dist/components/drawer.js +1072 -0
- package/dist/components/drawer.mjs +1035 -0
- package/dist/components/floating-bar.css +17 -0
- package/dist/components/floating-bar.d.mts +25 -0
- package/dist/components/floating-bar.d.ts +25 -0
- package/dist/components/floating-bar.js +52 -0
- package/dist/components/floating-bar.mjs +25 -0
- package/dist/components/footer.css +40 -0
- package/dist/components/footer.d.mts +8 -0
- package/dist/components/footer.d.ts +8 -0
- package/dist/components/footer.js +44 -0
- package/dist/components/footer.mjs +17 -0
- package/dist/components/grid.css +47 -0
- package/dist/components/grid.d.mts +27 -0
- package/dist/components/grid.d.ts +27 -0
- package/dist/components/grid.js +52 -0
- package/dist/components/grid.mjs +25 -0
- package/dist/components/header.css +1075 -0
- package/dist/components/header.d.mts +35 -0
- package/dist/components/header.d.ts +35 -0
- package/dist/components/header.js +1402 -0
- package/dist/components/header.mjs +1365 -0
- package/dist/components/hero.css +121 -0
- package/dist/components/hero.d.mts +111 -0
- package/dist/components/hero.d.ts +111 -0
- package/dist/components/hero.js +285 -0
- package/dist/components/hero.mjs +248 -0
- package/{src/style/components/icons → dist/components}/icons.css +14 -15
- package/dist/components/icons.d.mts +104 -0
- package/dist/components/icons.d.ts +104 -0
- package/dist/components/icons.js +239 -0
- package/dist/components/icons.mjs +203 -0
- package/{src/style/components/input → dist/components}/input.css +189 -102
- package/dist/components/input.d.mts +114 -0
- package/dist/components/input.d.ts +114 -0
- package/dist/components/input.js +926 -0
- package/dist/components/input.mjs +879 -0
- package/dist/components/layout.css +551 -0
- package/dist/components/layout.d.mts +16 -0
- package/dist/components/layout.d.ts +16 -0
- package/dist/components/layout.js +387 -0
- package/dist/components/layout.mjs +352 -0
- package/{src/style/components/list → dist/components}/list.css +47 -41
- package/dist/components/list.d.mts +46 -0
- package/dist/components/list.d.ts +46 -0
- package/dist/components/list.js +124 -0
- package/dist/components/list.mjs +96 -0
- package/dist/components/navbar.css +706 -0
- package/dist/components/navbar.d.mts +56 -0
- package/dist/components/navbar.d.ts +56 -0
- package/dist/components/navbar.js +994 -0
- package/dist/components/navbar.mjs +952 -0
- package/{src/style/components/page-index → dist/components}/page-index.css +2 -47
- package/dist/components/page-index.d.mts +25 -0
- package/dist/components/page-index.d.ts +25 -0
- package/dist/components/page-index.js +239 -0
- package/dist/components/page-index.mjs +202 -0
- package/{src/style/components/page → dist/components}/page.css +4 -15
- package/dist/components/page.d.mts +30 -0
- package/dist/components/page.d.ts +30 -0
- package/dist/components/page.js +40 -0
- package/dist/components/page.mjs +13 -0
- package/dist/components/popover.css +87 -0
- package/dist/components/popover.d.mts +22 -0
- package/dist/components/popover.d.ts +22 -0
- package/dist/components/popover.js +243 -0
- package/dist/components/popover.mjs +206 -0
- package/{src/style → dist}/components/radio.css +8 -51
- package/dist/components/radio.d.mts +59 -0
- package/dist/components/radio.d.ts +59 -0
- package/dist/components/radio.js +133 -0
- package/dist/components/radio.mjs +95 -0
- package/dist/components/section.css +993 -0
- package/dist/components/section.d.mts +33 -0
- package/dist/components/section.d.ts +33 -0
- package/dist/components/section.js +1401 -0
- package/dist/components/section.mjs +1364 -0
- package/dist/components/select.css +391 -0
- package/dist/components/select.d.mts +63 -0
- package/dist/components/select.d.ts +63 -0
- package/dist/components/select.js +452 -0
- package/dist/components/select.mjs +415 -0
- package/{src/style/components/slider → dist/components}/slider.css +55 -33
- package/dist/components/slider.d.mts +69 -0
- package/dist/components/slider.d.ts +69 -0
- package/dist/components/slider.js +254 -0
- package/dist/components/slider.mjs +217 -0
- package/dist/components/switch.css +1081 -0
- package/dist/components/switch.d.mts +33 -0
- package/dist/components/switch.d.ts +33 -0
- package/dist/components/switch.js +1092 -0
- package/dist/components/switch.mjs +1055 -0
- package/{src/style/components/table → dist/components}/table.css +3 -28
- package/dist/components/table.d.mts +42 -0
- package/dist/components/table.d.ts +42 -0
- package/dist/components/table.js +108 -0
- package/dist/components/table.mjs +76 -0
- package/dist/components/tag.css +97 -0
- package/dist/components/tag.d.mts +12 -0
- package/dist/components/tag.d.ts +12 -0
- package/dist/components/tag.js +42 -0
- package/dist/components/tag.mjs +15 -0
- package/dist/components/textarea.css +1359 -0
- package/dist/components/textarea.d.mts +84 -0
- package/dist/components/textarea.d.ts +84 -0
- package/dist/components/textarea.js +1962 -0
- package/dist/components/textarea.mjs +1924 -0
- package/{src/style/components/theme-control → dist/components}/theme-control.css +3 -7
- package/dist/components/theme-control.d.mts +9 -0
- package/dist/components/theme-control.d.ts +9 -0
- package/dist/components/theme-control.js +235 -0
- package/dist/components/theme-control.mjs +200 -0
- package/{src/style/components/tooltip → dist/components}/tooltip.css +5 -13
- package/dist/components/tooltip.d.mts +12 -0
- package/dist/components/tooltip.d.ts +12 -0
- package/dist/components/tooltip.js +200 -0
- package/dist/components/tooltip.mjs +163 -0
- package/dist/icons-Czahnf-r.d.mts +15 -0
- package/dist/icons-Czahnf-r.d.ts +15 -0
- package/dist/index.css +2915 -2068
- package/dist/index.d.mts +144 -721
- package/dist/index.d.ts +144 -721
- package/dist/index.js +4076 -2282
- package/dist/index.mjs +4132 -2366
- package/dist/theme.css +34 -34
- package/package.json +27 -8
- package/dist/index.css.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/hellboy-ds-0.1.2.tgz +0 -0
- package/src/components/badge/Badge.tsx +0 -29
- package/src/components/badge/index.ts +0 -1
- package/src/components/banner/Banner.tsx +0 -48
- package/src/components/banner/banner.css +0 -44
- package/src/components/banner/index.ts +0 -1
- package/src/components/button/button.tsx +0 -127
- package/src/components/button/index.ts +0 -1
- package/src/components/card/card.tsx +0 -57
- package/src/components/card/index.ts +0 -1
- package/src/components/checkbox/Checkbox.tsx +0 -98
- package/src/components/checkbox/index.ts +0 -1
- package/src/components/code-block/code-block.tsx +0 -44
- package/src/components/code-block/index.ts +0 -1
- package/src/components/color-control/color-control.tsx +0 -322
- package/src/components/color-control/index.ts +0 -1
- package/src/components/drag-handle/DragHandle.tsx +0 -78
- package/src/components/drag-handle/index.ts +0 -1
- package/src/components/drawer/drawer.tsx +0 -82
- package/src/components/drawer/index.ts +0 -1
- package/src/components/floating-bar/floating-bar.tsx +0 -52
- package/src/components/floating-bar/index.ts +0 -2
- package/src/components/footer/footer.tsx +0 -28
- package/src/components/footer/index.ts +0 -1
- package/src/components/grid/Grid.tsx +0 -53
- package/src/components/grid/index.ts +0 -1
- package/src/components/header/header.tsx +0 -57
- package/src/components/header/index.ts +0 -1
- package/src/components/icons/icons.tsx +0 -44
- package/src/components/icons/index.ts +0 -1
- package/src/components/index.ts +0 -29
- package/src/components/input/DatePicker.tsx +0 -133
- package/src/components/input/Input.tsx +0 -220
- package/src/components/input/InputDate.tsx +0 -10
- package/src/components/input/InputDateTime.tsx +0 -10
- package/src/components/input/InputEmail.tsx +0 -10
- package/src/components/input/InputField.tsx +0 -137
- package/src/components/input/InputNumber.tsx +0 -10
- package/src/components/input/InputPassword.tsx +0 -10
- package/src/components/input/InputSearch.tsx +0 -10
- package/src/components/input/InputTel.tsx +0 -10
- package/src/components/input/InputText.tsx +0 -10
- package/src/components/input/InputTime.tsx +0 -10
- package/src/components/input/InputUrl.tsx +0 -10
- package/src/components/input/TimePicker.tsx +0 -151
- package/src/components/input/index.ts +0 -11
- package/src/components/layout/Layout.tsx +0 -244
- package/src/components/layout/index.ts +0 -1
- package/src/components/list/List.tsx +0 -159
- package/src/components/list/index.ts +0 -1
- package/src/components/navbar/MenuCategory.tsx +0 -20
- package/src/components/navbar/MenuGroup.tsx +0 -288
- package/src/components/navbar/MenuItem.tsx +0 -65
- package/src/components/navbar/Navbar.tsx +0 -23
- package/src/components/navbar/index.ts +0 -4
- package/src/components/page/index.ts +0 -1
- package/src/components/page/page.tsx +0 -46
- package/src/components/page-index/PageIndex.tsx +0 -275
- package/src/components/page-index/index.ts +0 -1
- package/src/components/popover/index.ts +0 -1
- package/src/components/popover/popover.tsx +0 -199
- package/src/components/radio/Radio.tsx +0 -176
- package/src/components/radio/index.ts +0 -1
- package/src/components/section/index.ts +0 -1
- package/src/components/section/section.tsx +0 -66
- package/src/components/select/Select.tsx +0 -212
- package/src/components/select/index.ts +0 -1
- package/src/components/slider/Slider.tsx +0 -267
- package/src/components/slider/index.ts +0 -1
- package/src/components/switch/index.ts +0 -1
- package/src/components/switch/switch.tsx +0 -99
- package/src/components/table/Table.tsx +0 -147
- package/src/components/table/index.ts +0 -1
- package/src/components/theme-control/index.ts +0 -1
- package/src/components/theme-control/theme-control.tsx +0 -78
- package/src/components/tooltip/index.ts +0 -1
- package/src/components/tooltip/tooltip.tsx +0 -207
- package/src/contexts/NavbarTooltipContext.tsx +0 -48
- package/src/contexts/index.ts +0 -1
- package/src/foundations/motion.md +0 -136
- package/src/index.ts +0 -40
- package/src/style/_shared/field.css +0 -69
- package/src/style/components/color-control/color-control.css +0 -126
- package/src/style/components/drawer/drawer.css +0 -210
- package/src/style/components/floating-bar/floating-bar.css +0 -39
- package/src/style/components/footer/footer.css +0 -108
- package/src/style/components/grid/grid.css +0 -33
- package/src/style/components/header/header.css +0 -44
- package/src/style/components/layout/layout.css +0 -205
- package/src/style/components/navbar/navbar.css +0 -342
- package/src/style/components/popover/popover.css +0 -44
- package/src/style/components/section/section.css +0 -67
- package/src/style/components/select/select.css +0 -143
- package/src/style/components/switch/switch.css +0 -267
- package/src/style/foundations/global.css +0 -316
- package/src/style/foundations/motion.css +0 -164
- package/src/style/foundations/spacing.css +0 -51
- package/src/style/foundations/typography.css +0 -39
- package/src/style/foundations/z-index.css +0 -81
- package/src/style/modes/dark.css +0 -146
- package/src/style/modes/light.css +0 -147
- package/src/style/semantic.css +0 -52
- package/src/style/styles.css +0 -51
- package/src/style/themes/theme.json +0 -37
- package/src/utils/README.md +0 -305
- package/src/utils/USER_PREFERENCES.md +0 -558
- package/src/utils/theme.ts +0 -127
- package/src/utils/user-preferences.ts +0 -577
- package/tsconfig.json +0 -25
- package/tsup.config.ts +0 -52
|
@@ -1,108 +1,83 @@
|
|
|
1
|
-
/* table.css */
|
|
2
|
-
|
|
1
|
+
/* src/style/components/table/table.css */
|
|
3
2
|
.table {
|
|
4
3
|
width: 100%;
|
|
5
4
|
border-collapse: collapse;
|
|
6
5
|
font-size: var(--font-size-sm);
|
|
7
6
|
line-height: var(--line-height-normal);
|
|
7
|
+
margin: var(--spacing-6) 0;
|
|
8
8
|
}
|
|
9
|
-
|
|
10
|
-
/* Size variants */
|
|
11
9
|
.table--sm {
|
|
12
10
|
font-size: var(--font-size-xs);
|
|
13
11
|
}
|
|
14
|
-
|
|
15
12
|
.table--sm .table__cell,
|
|
16
13
|
.table--sm .table__cell--header {
|
|
17
14
|
padding: var(--spacing-2) var(--spacing-3);
|
|
18
15
|
}
|
|
19
|
-
|
|
20
16
|
.table--md .table__cell,
|
|
21
17
|
.table--md .table__cell--header {
|
|
22
18
|
padding: var(--spacing-3) var(--spacing-4);
|
|
23
19
|
}
|
|
24
|
-
|
|
25
20
|
.table--lg .table__cell,
|
|
26
21
|
.table--lg .table__cell--header {
|
|
27
22
|
padding: var(--spacing-4) var(--spacing-6);
|
|
28
23
|
}
|
|
29
|
-
|
|
30
|
-
/* Default padding for md size */
|
|
31
24
|
.table__cell,
|
|
32
25
|
.table__cell--header {
|
|
33
26
|
padding: var(--spacing-3) var(--spacing-4);
|
|
34
27
|
text-align: left;
|
|
35
28
|
vertical-align: top;
|
|
36
29
|
}
|
|
37
|
-
|
|
38
30
|
.table__cell--header {
|
|
39
31
|
font-weight: var(--font-weight-semibold);
|
|
40
32
|
background-color: var(--color-bg-2);
|
|
41
33
|
border-bottom: 1px solid var(--color-foreground-2);
|
|
42
34
|
color: var(--color-foreground-1);
|
|
43
35
|
}
|
|
44
|
-
|
|
45
36
|
.table__cell {
|
|
46
37
|
color: var(--color-foreground-1);
|
|
47
38
|
border-bottom: 1px solid var(--color-foreground-2);
|
|
48
39
|
border-bottom-color: rgba(0, 0, 0, 0.1);
|
|
49
40
|
transition: background-color var(--transition-base, 0.2s ease);
|
|
50
41
|
}
|
|
51
|
-
|
|
52
42
|
.table__row:hover .table__cell:not(.table__cell--header) {
|
|
53
43
|
background-color: transparent;
|
|
54
44
|
}
|
|
55
|
-
|
|
56
|
-
/* Bordered variant */
|
|
57
45
|
.table--bordered {
|
|
58
46
|
border: 1px solid var(--color-foreground-2);
|
|
59
47
|
border-color: rgba(0, 0, 0, 0.1);
|
|
60
48
|
}
|
|
61
|
-
|
|
62
49
|
.table--bordered .table__cell,
|
|
63
50
|
.table--bordered .table__cell--header {
|
|
64
51
|
border-right: 1px solid var(--color-foreground-2);
|
|
65
52
|
border-right-color: rgba(0, 0, 0, 0.1);
|
|
66
53
|
}
|
|
67
|
-
|
|
68
54
|
.table--bordered .table__cell:last-child,
|
|
69
55
|
.table--bordered .table__cell--header:last-child {
|
|
70
56
|
border-right: none;
|
|
71
57
|
}
|
|
72
|
-
|
|
73
58
|
.table--bordered .table__row:last-child .table__cell {
|
|
74
59
|
border-bottom: none;
|
|
75
60
|
}
|
|
76
|
-
|
|
77
|
-
/* Striped variant - zebra pattern using background color variations */
|
|
78
61
|
.table--striped tbody .table__row:nth-child(odd) {
|
|
79
62
|
background-color: var(--color-bg-3);
|
|
80
63
|
}
|
|
81
|
-
|
|
82
64
|
.table--striped tbody .table__row:nth-child(even) {
|
|
83
65
|
background-color: var(--color-bg-2);
|
|
84
66
|
}
|
|
85
|
-
|
|
86
67
|
.table--striped tbody .table__row:nth-child(even) .table__cell {
|
|
87
68
|
background-color: transparent;
|
|
88
69
|
}
|
|
89
|
-
|
|
90
70
|
.table--striped tbody .table__row:nth-child(odd) .table__cell {
|
|
91
71
|
background-color: transparent;
|
|
92
72
|
}
|
|
93
|
-
|
|
94
|
-
/* Hover variant */
|
|
95
73
|
.table--hover tbody .table__row:hover {
|
|
96
74
|
background-color: var(--color-bg-2);
|
|
97
75
|
transition: background-color var(--motion-duration-fast) var(--motion-easing-standard);
|
|
98
76
|
}
|
|
99
|
-
|
|
100
77
|
.table--hover tbody .table__row:hover .table__cell {
|
|
101
78
|
background-color: transparent;
|
|
102
79
|
}
|
|
103
|
-
|
|
104
|
-
/* Responsive wrapper */
|
|
105
80
|
.table-container {
|
|
106
81
|
overflow-x: auto;
|
|
107
82
|
margin: var(--spacing-4) 0;
|
|
108
|
-
}
|
|
83
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface TableProps extends React.TableHTMLAttributes<HTMLTableElement> {
|
|
4
|
+
/**
|
|
5
|
+
* Whether the table should have a border
|
|
6
|
+
*/
|
|
7
|
+
bordered?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Whether the table should have striped rows
|
|
10
|
+
*/
|
|
11
|
+
striped?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Whether the table should have hover effects
|
|
14
|
+
*/
|
|
15
|
+
hover?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Size variant for the table
|
|
18
|
+
*/
|
|
19
|
+
size?: "sm" | "md" | "lg";
|
|
20
|
+
}
|
|
21
|
+
interface TableHeadProps extends React.HTMLAttributes<HTMLTableSectionElement> {
|
|
22
|
+
}
|
|
23
|
+
interface TableBodyProps extends React.HTMLAttributes<HTMLTableSectionElement> {
|
|
24
|
+
}
|
|
25
|
+
interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement> {
|
|
26
|
+
}
|
|
27
|
+
interface TableCellProps extends React.TdHTMLAttributes<HTMLTableCellElement> {
|
|
28
|
+
/**
|
|
29
|
+
* Whether this is a header cell
|
|
30
|
+
*/
|
|
31
|
+
header?: boolean;
|
|
32
|
+
}
|
|
33
|
+
interface TableContainerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
34
|
+
}
|
|
35
|
+
declare const Table: React.FC<TableProps>;
|
|
36
|
+
declare const TableHead: React.FC<TableHeadProps>;
|
|
37
|
+
declare const TableBody: React.FC<TableBodyProps>;
|
|
38
|
+
declare const TableRow: React.FC<TableRowProps>;
|
|
39
|
+
declare const TableCell: React.FC<TableCellProps>;
|
|
40
|
+
declare const TableContainer: React.FC<TableContainerProps>;
|
|
41
|
+
|
|
42
|
+
export { Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableContainer, type TableContainerProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface TableProps extends React.TableHTMLAttributes<HTMLTableElement> {
|
|
4
|
+
/**
|
|
5
|
+
* Whether the table should have a border
|
|
6
|
+
*/
|
|
7
|
+
bordered?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Whether the table should have striped rows
|
|
10
|
+
*/
|
|
11
|
+
striped?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Whether the table should have hover effects
|
|
14
|
+
*/
|
|
15
|
+
hover?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Size variant for the table
|
|
18
|
+
*/
|
|
19
|
+
size?: "sm" | "md" | "lg";
|
|
20
|
+
}
|
|
21
|
+
interface TableHeadProps extends React.HTMLAttributes<HTMLTableSectionElement> {
|
|
22
|
+
}
|
|
23
|
+
interface TableBodyProps extends React.HTMLAttributes<HTMLTableSectionElement> {
|
|
24
|
+
}
|
|
25
|
+
interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement> {
|
|
26
|
+
}
|
|
27
|
+
interface TableCellProps extends React.TdHTMLAttributes<HTMLTableCellElement> {
|
|
28
|
+
/**
|
|
29
|
+
* Whether this is a header cell
|
|
30
|
+
*/
|
|
31
|
+
header?: boolean;
|
|
32
|
+
}
|
|
33
|
+
interface TableContainerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
34
|
+
}
|
|
35
|
+
declare const Table: React.FC<TableProps>;
|
|
36
|
+
declare const TableHead: React.FC<TableHeadProps>;
|
|
37
|
+
declare const TableBody: React.FC<TableBodyProps>;
|
|
38
|
+
declare const TableRow: React.FC<TableRowProps>;
|
|
39
|
+
declare const TableCell: React.FC<TableCellProps>;
|
|
40
|
+
declare const TableContainer: React.FC<TableContainerProps>;
|
|
41
|
+
|
|
42
|
+
export { Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableContainer, type TableContainerProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps };
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/components/table/index.ts
|
|
21
|
+
var table_exports = {};
|
|
22
|
+
__export(table_exports, {
|
|
23
|
+
Table: () => Table,
|
|
24
|
+
TableBody: () => TableBody,
|
|
25
|
+
TableCell: () => TableCell,
|
|
26
|
+
TableContainer: () => TableContainer,
|
|
27
|
+
TableHead: () => TableHead,
|
|
28
|
+
TableRow: () => TableRow
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(table_exports);
|
|
31
|
+
|
|
32
|
+
// src/components/table/Table.tsx
|
|
33
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
|
+
var Table = ({
|
|
35
|
+
bordered = false,
|
|
36
|
+
striped = true,
|
|
37
|
+
hover = true,
|
|
38
|
+
size = "md",
|
|
39
|
+
className = "",
|
|
40
|
+
children,
|
|
41
|
+
...props
|
|
42
|
+
}) => {
|
|
43
|
+
const classes = [
|
|
44
|
+
"table",
|
|
45
|
+
bordered && "table--bordered",
|
|
46
|
+
striped && "table--striped",
|
|
47
|
+
hover && "table--hover",
|
|
48
|
+
size && `table--${size}`,
|
|
49
|
+
className
|
|
50
|
+
].filter(Boolean).join(" ");
|
|
51
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("table", { className: classes, ...props, children });
|
|
52
|
+
};
|
|
53
|
+
var TableHead = ({
|
|
54
|
+
className = "",
|
|
55
|
+
children,
|
|
56
|
+
...props
|
|
57
|
+
}) => {
|
|
58
|
+
const classes = ["table__head", className].filter(Boolean).join(" ");
|
|
59
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("thead", { className: classes, ...props, children });
|
|
60
|
+
};
|
|
61
|
+
var TableBody = ({
|
|
62
|
+
className = "",
|
|
63
|
+
children,
|
|
64
|
+
...props
|
|
65
|
+
}) => {
|
|
66
|
+
const classes = ["table__body", className].filter(Boolean).join(" ");
|
|
67
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tbody", { className: classes, ...props, children });
|
|
68
|
+
};
|
|
69
|
+
var TableRow = ({
|
|
70
|
+
className = "",
|
|
71
|
+
children,
|
|
72
|
+
...props
|
|
73
|
+
}) => {
|
|
74
|
+
const classes = ["table__row", className].filter(Boolean).join(" ");
|
|
75
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tr", { className: classes, ...props, children });
|
|
76
|
+
};
|
|
77
|
+
var TableCell = ({
|
|
78
|
+
header = false,
|
|
79
|
+
className = "",
|
|
80
|
+
children,
|
|
81
|
+
...props
|
|
82
|
+
}) => {
|
|
83
|
+
const classes = [
|
|
84
|
+
header ? "table__cell--header" : "table__cell",
|
|
85
|
+
className
|
|
86
|
+
].filter(Boolean).join(" ");
|
|
87
|
+
if (header) {
|
|
88
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", { className: classes, ...props, children });
|
|
89
|
+
}
|
|
90
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { className: classes, ...props, children });
|
|
91
|
+
};
|
|
92
|
+
var TableContainer = ({
|
|
93
|
+
className = "",
|
|
94
|
+
children,
|
|
95
|
+
...props
|
|
96
|
+
}) => {
|
|
97
|
+
const classes = ["table-container scrollable", className].filter(Boolean).join(" ");
|
|
98
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: classes, ...props, children });
|
|
99
|
+
};
|
|
100
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
101
|
+
0 && (module.exports = {
|
|
102
|
+
Table,
|
|
103
|
+
TableBody,
|
|
104
|
+
TableCell,
|
|
105
|
+
TableContainer,
|
|
106
|
+
TableHead,
|
|
107
|
+
TableRow
|
|
108
|
+
});
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// src/components/table/Table.tsx
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
var Table = ({
|
|
4
|
+
bordered = false,
|
|
5
|
+
striped = true,
|
|
6
|
+
hover = true,
|
|
7
|
+
size = "md",
|
|
8
|
+
className = "",
|
|
9
|
+
children,
|
|
10
|
+
...props
|
|
11
|
+
}) => {
|
|
12
|
+
const classes = [
|
|
13
|
+
"table",
|
|
14
|
+
bordered && "table--bordered",
|
|
15
|
+
striped && "table--striped",
|
|
16
|
+
hover && "table--hover",
|
|
17
|
+
size && `table--${size}`,
|
|
18
|
+
className
|
|
19
|
+
].filter(Boolean).join(" ");
|
|
20
|
+
return /* @__PURE__ */ jsx("table", { className: classes, ...props, children });
|
|
21
|
+
};
|
|
22
|
+
var TableHead = ({
|
|
23
|
+
className = "",
|
|
24
|
+
children,
|
|
25
|
+
...props
|
|
26
|
+
}) => {
|
|
27
|
+
const classes = ["table__head", className].filter(Boolean).join(" ");
|
|
28
|
+
return /* @__PURE__ */ jsx("thead", { className: classes, ...props, children });
|
|
29
|
+
};
|
|
30
|
+
var TableBody = ({
|
|
31
|
+
className = "",
|
|
32
|
+
children,
|
|
33
|
+
...props
|
|
34
|
+
}) => {
|
|
35
|
+
const classes = ["table__body", className].filter(Boolean).join(" ");
|
|
36
|
+
return /* @__PURE__ */ jsx("tbody", { className: classes, ...props, children });
|
|
37
|
+
};
|
|
38
|
+
var TableRow = ({
|
|
39
|
+
className = "",
|
|
40
|
+
children,
|
|
41
|
+
...props
|
|
42
|
+
}) => {
|
|
43
|
+
const classes = ["table__row", className].filter(Boolean).join(" ");
|
|
44
|
+
return /* @__PURE__ */ jsx("tr", { className: classes, ...props, children });
|
|
45
|
+
};
|
|
46
|
+
var TableCell = ({
|
|
47
|
+
header = false,
|
|
48
|
+
className = "",
|
|
49
|
+
children,
|
|
50
|
+
...props
|
|
51
|
+
}) => {
|
|
52
|
+
const classes = [
|
|
53
|
+
header ? "table__cell--header" : "table__cell",
|
|
54
|
+
className
|
|
55
|
+
].filter(Boolean).join(" ");
|
|
56
|
+
if (header) {
|
|
57
|
+
return /* @__PURE__ */ jsx("th", { className: classes, ...props, children });
|
|
58
|
+
}
|
|
59
|
+
return /* @__PURE__ */ jsx("td", { className: classes, ...props, children });
|
|
60
|
+
};
|
|
61
|
+
var TableContainer = ({
|
|
62
|
+
className = "",
|
|
63
|
+
children,
|
|
64
|
+
...props
|
|
65
|
+
}) => {
|
|
66
|
+
const classes = ["table-container scrollable", className].filter(Boolean).join(" ");
|
|
67
|
+
return /* @__PURE__ */ jsx("div", { className: classes, ...props, children });
|
|
68
|
+
};
|
|
69
|
+
export {
|
|
70
|
+
Table,
|
|
71
|
+
TableBody,
|
|
72
|
+
TableCell,
|
|
73
|
+
TableContainer,
|
|
74
|
+
TableHead,
|
|
75
|
+
TableRow
|
|
76
|
+
};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/* src/style/components/tag/tag.css */
|
|
2
|
+
.tag {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
background-color: var(--color-foreground-1);
|
|
6
|
+
color: var(--color-bg-1);
|
|
7
|
+
cursor: default;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
font-family: var(--font-family-action);
|
|
10
|
+
font-weight: var(--font-weight-medium);
|
|
11
|
+
border-radius: var(--radius-md);
|
|
12
|
+
white-space: nowrap;
|
|
13
|
+
transition: all var(--transition-base, 0.2s ease);
|
|
14
|
+
text-transform: uppercase;
|
|
15
|
+
}
|
|
16
|
+
.tag.clickable:hover {
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
}
|
|
19
|
+
.tag--sm {
|
|
20
|
+
padding: 0.08rem 0.4rem;
|
|
21
|
+
font-size: var(--font-size-xs, 0.75rem);
|
|
22
|
+
min-height: 16px;
|
|
23
|
+
}
|
|
24
|
+
.tag--md {
|
|
25
|
+
padding: var(--spacing-1, 0.25rem) var(--spacing-2, 0.5rem) 0.1rem var(--spacing-2, 0.5rem);
|
|
26
|
+
font-size: var(--font-size-sm, 0.875rem);
|
|
27
|
+
min-height: 24px;
|
|
28
|
+
}
|
|
29
|
+
.tag--lg {
|
|
30
|
+
padding: var(--spacing-1, 0.25rem) var(--spacing-3, 0.75rem);
|
|
31
|
+
font-size: var(--font-size-base, 1rem);
|
|
32
|
+
min-height: 32px;
|
|
33
|
+
}
|
|
34
|
+
.tag--primary {
|
|
35
|
+
background-color: var(--color-primary);
|
|
36
|
+
color: var(--color-on-primary);
|
|
37
|
+
outline-width: 0;
|
|
38
|
+
}
|
|
39
|
+
.tag--primary.clickable:hover {
|
|
40
|
+
outline: 2px solid var(--color-primary-hover);
|
|
41
|
+
}
|
|
42
|
+
.tag--secondary {
|
|
43
|
+
background-color: var(--color-secondary);
|
|
44
|
+
color: var(--color-on-secondary);
|
|
45
|
+
outline-width: 0;
|
|
46
|
+
}
|
|
47
|
+
.tag--secondary.clickable:hover {
|
|
48
|
+
outline: 2px solid var(--color-secondary-hover);
|
|
49
|
+
}
|
|
50
|
+
.tag--tertiary {
|
|
51
|
+
background-color: var(--color-tertiary);
|
|
52
|
+
color: var(--color-on-tertiary);
|
|
53
|
+
outline-width: 0;
|
|
54
|
+
}
|
|
55
|
+
.tag--tertiary.clickable:hover {
|
|
56
|
+
outline: 2px solid var(--color-tertiary-hover);
|
|
57
|
+
}
|
|
58
|
+
.tag--accent {
|
|
59
|
+
background-color: var(--color-accent);
|
|
60
|
+
color: var(--color-on-accent);
|
|
61
|
+
outline-width: 0;
|
|
62
|
+
}
|
|
63
|
+
.tag--accent.clickable:hover {
|
|
64
|
+
outline: 2px solid var(--color-accent-hover);
|
|
65
|
+
}
|
|
66
|
+
.tag--success {
|
|
67
|
+
background-color: hsla(var(--success-hue), var(--success-saturation), var(--success-lightness), 1);
|
|
68
|
+
color: hsla(var(--success-hue), var(--success-saturation), 96%, 1);
|
|
69
|
+
border-color: hsla(var(--success-hue), var(--success-saturation), var(--success-lightness), 1);
|
|
70
|
+
}
|
|
71
|
+
.tag--success.clickable:hover {
|
|
72
|
+
outline: 2px solid hsla(var(--success-hue), var(--success-saturation), var(--success-lightness), 1);
|
|
73
|
+
}
|
|
74
|
+
.tag--warning {
|
|
75
|
+
background-color: hsla(var(--warning-hue), var(--warning-saturation), var(--warning-lightness), 1);
|
|
76
|
+
color: hsla(var(--warning-hue), var(--warning-saturation), 96%, 1);
|
|
77
|
+
border-color: hsla(var(--warning-hue), var(--warning-saturation), var(--warning-lightness), 1);
|
|
78
|
+
}
|
|
79
|
+
.tag--warning.clickable:hover {
|
|
80
|
+
outline: 2px solid hsla(var(--warning-hue), var(--warning-saturation), var(--warming-lightness), 1);
|
|
81
|
+
}
|
|
82
|
+
.tag--error {
|
|
83
|
+
background-color: hsla(var(--error-hue), var(--error-saturation), var(--error-lightness), 1);
|
|
84
|
+
color: hsla(var(--error-hue), var(--error-saturation), 96%, 1);
|
|
85
|
+
border-color: hsla(var(--error-hue), var(--error-saturation), var(--error-lightness), 1);
|
|
86
|
+
}
|
|
87
|
+
.tag--error.clickable:hover {
|
|
88
|
+
outline: 2px solid hsla(var(--error-hue), var(--error-saturation), var(--error-lightness), 1);
|
|
89
|
+
}
|
|
90
|
+
.tag--info {
|
|
91
|
+
background-color: hsla(var(--info-hue), var(--info-saturation), var(--info-lightness), 1);
|
|
92
|
+
color: hsla(var(--info-hue), var(--info-saturation), 96%, 1);
|
|
93
|
+
border-color: hsla(var(--info-hue), var(--info-saturation), var(--info-lightness), 1);
|
|
94
|
+
}
|
|
95
|
+
.tag--info.clickable:hover {
|
|
96
|
+
outline: 2px solid hsla(var(--info-hue), var(--info-saturation), var(--info-lightness), 1);
|
|
97
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
type TagVariant = 'primary' | 'secondary' | 'tertiary' | 'accent' | 'success' | 'warning' | 'error' | 'info';
|
|
4
|
+
type TagSize = 'sm' | 'md' | 'lg';
|
|
5
|
+
interface TagProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
6
|
+
variant?: TagVariant;
|
|
7
|
+
size?: TagSize;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare const Tag: React.FC<TagProps>;
|
|
11
|
+
|
|
12
|
+
export { Tag, type TagProps, type TagSize, type TagVariant };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
type TagVariant = 'primary' | 'secondary' | 'tertiary' | 'accent' | 'success' | 'warning' | 'error' | 'info';
|
|
4
|
+
type TagSize = 'sm' | 'md' | 'lg';
|
|
5
|
+
interface TagProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
6
|
+
variant?: TagVariant;
|
|
7
|
+
size?: TagSize;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare const Tag: React.FC<TagProps>;
|
|
11
|
+
|
|
12
|
+
export { Tag, type TagProps, type TagSize, type TagVariant };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/components/tag/index.ts
|
|
21
|
+
var tag_exports = {};
|
|
22
|
+
__export(tag_exports, {
|
|
23
|
+
Tag: () => Tag
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(tag_exports);
|
|
26
|
+
|
|
27
|
+
// src/components/tag/Tag.tsx
|
|
28
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
+
var Tag = ({
|
|
30
|
+
variant = "primary",
|
|
31
|
+
size = "md",
|
|
32
|
+
className = "",
|
|
33
|
+
children,
|
|
34
|
+
...props
|
|
35
|
+
}) => {
|
|
36
|
+
const classes = ["tag", `tag--${variant}`, `tag--${size}`, className].filter(Boolean).join(" ");
|
|
37
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: classes, ...props, children });
|
|
38
|
+
};
|
|
39
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
40
|
+
0 && (module.exports = {
|
|
41
|
+
Tag
|
|
42
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// src/components/tag/Tag.tsx
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
var Tag = ({
|
|
4
|
+
variant = "primary",
|
|
5
|
+
size = "md",
|
|
6
|
+
className = "",
|
|
7
|
+
children,
|
|
8
|
+
...props
|
|
9
|
+
}) => {
|
|
10
|
+
const classes = ["tag", `tag--${variant}`, `tag--${size}`, className].filter(Boolean).join(" ");
|
|
11
|
+
return /* @__PURE__ */ jsx("span", { className: classes, ...props, children });
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
Tag
|
|
15
|
+
};
|