@indico-data/design-system 2.29.2 → 2.30.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indico-data/design-system",
3
- "version": "2.29.2",
3
+ "version": "2.30.1",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "main": "lib/index.js",
@@ -1,11 +1,11 @@
1
- @import './variables.scss';
2
-
1
+ @import 'variables.scss';
3
2
  .floatui-container {
4
3
  z-index: 99;
5
4
  }
6
5
 
7
6
  .floatui-content {
8
7
  border-radius: var(--pf-floatui-border-radius);
9
- border: 1px solid var(--pf-floatui-border-color);
8
+ border: solid 1px;
9
+ border-color: var(--pf-floatui-border-color);
10
10
  background: var(--pf-floatui-background-color);
11
11
  }
@@ -1,3 +1,11 @@
1
1
  form {
2
2
  width: 100%;
3
3
  }
4
+ :root [data-theme='light'],
5
+ :root {
6
+ --pf-form-input-border-color: var(--pf-border-color);
7
+ }
8
+
9
+ :root [data-theme='dark'] {
10
+ --pf-form-input-border-color: var(--pf-border-color);
11
+ }
@@ -41,6 +41,7 @@ const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
41
41
  form,
42
42
  maxLength,
43
43
  autofocus,
44
+ defaultValue,
44
45
  ...rest
45
46
  },
46
47
  ref,
@@ -70,6 +71,8 @@ const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
70
71
  aria-invalid={hasErrors ? true : undefined}
71
72
  aria-describedby={hasErrors || helpText ? `${name}-helper` : undefined}
72
73
  aria-required={isRequired}
74
+ value={value}
75
+ defaultValue={defaultValue}
73
76
  {...rest}
74
77
  />
75
78
  </div>
@@ -6,6 +6,15 @@ const meta: Meta = {
6
6
  title: 'Components/Pill',
7
7
  component: Pill,
8
8
  argTypes: {
9
+ className: {
10
+ control: false,
11
+ table: {
12
+ category: 'Props',
13
+ type: {
14
+ summary: 'css class name',
15
+ },
16
+ },
17
+ },
9
18
  children: {
10
19
  control: 'text',
11
20
  description: 'The content displayed inside the pill',
@@ -16,7 +25,7 @@ const meta: Meta = {
16
25
  },
17
26
  },
18
27
  },
19
- status: {
28
+ color: {
20
29
  control: {
21
30
  type: 'select',
22
31
  options: ['success', 'warning', 'error', 'info', 'neutral', 'primary', 'secondary'],
@@ -1,3 +1,4 @@
1
+ import classNames from 'classnames';
1
2
  import DataTable, {
2
3
  Direction as RDTDirection,
3
4
  Alignment as RDTAlignment,
@@ -16,17 +17,23 @@ export const Table = <T,>(props: TableProps<T>) => {
16
17
  isDisabled,
17
18
  isLoading,
18
19
  subHeaderAlign = 'left',
20
+ className,
19
21
  ...rest
20
22
  } = props;
23
+
24
+ const combinedClassName = classNames(className, {
25
+ 'table--striped': striped,
26
+ });
27
+
21
28
  return (
22
- <div className="table-wrapper">
29
+ <div className="table">
23
30
  <DataTable
24
31
  responsive={responsive}
25
32
  direction={direction as RDTDirection}
26
33
  subHeaderAlign={subHeaderAlign as RDTAlignment}
27
34
  keyField={keyField}
28
35
  striped={striped}
29
- className={`${striped ? 'pf__table--striped' : ''}`}
36
+ className={combinedClassName}
30
37
  disabled={isDisabled}
31
38
  noDataComponent={noDataComponent}
32
39
  progressPending={isLoading}
@@ -1,79 +1,95 @@
1
1
  @import 'variables.scss';
2
2
 
3
- :root,
4
- :root [data-theme='light'],
5
- :root [data-theme='dark'] {
6
- .table-loading {
7
- color: var(--pf-table-font-color);
8
- }
9
- .table-wrapper {
3
+ .table-loading {
4
+ color: var(--pf-table-font-color);
5
+ }
6
+
7
+ .table {
8
+ background-color: var(--pf-table-background-color);
9
+ color: var(--pf-table-font-color);
10
+ border-radius: var(--pf-rounded);
11
+ border: 1px solid var(--pf-table-border-color);
12
+
13
+ .rdt_Table,
14
+ .rdt_TableRow,
15
+ .rdt_TableCol,
16
+ .rdt_TableCol_Sortable,
17
+ .rdt_TableCell,
18
+ .rdt_TableHeader,
19
+ .rdt_TableFooter,
20
+ .rdt_TableHead,
21
+ .rdt_TableHeadRow,
22
+ .rdt_TableBody,
23
+ .rdt_ExpanderRow,
24
+ .rdt_Pagination {
10
25
  background-color: var(--pf-table-background-color);
11
26
  color: var(--pf-table-font-color);
27
+ }
12
28
 
13
- .rdt_Table,
14
- .rdt_TableRow,
15
- .rdt_TableCol,
16
- .rdt_TableCol_Sortable,
17
- .rdt_TableCell,
18
- .rdt_TableHeader,
19
- .rdt_TableFooter,
20
- .rdt_TableHead,
21
- .rdt_TableHeadRow,
22
- .rdt_TableBody,
23
- .rdt_ExpanderRow,
24
- .rdt_Pagination {
25
- background-color: var(--pf-table-background-color);
26
- color: var(--pf-table-font-color);
29
+ button {
30
+ svg {
31
+ fill: var(--pf-table-font-color);
27
32
  }
28
- button {
33
+
34
+ &:disabled {
29
35
  svg {
30
- fill: var(--pf-table-font-color);
36
+ fill: var(--pf-table-disabled-color);
31
37
  }
38
+ }
39
+ }
32
40
 
33
- &:disabled {
34
- svg {
35
- fill: var(--pf-gray-color-900);
36
- }
37
- }
41
+ .rdt_TableHeader {
42
+ border-radius: var(--pf-rounded) 0;
43
+ border-bottom: var(--pf-border-sm) solid var(--pf-table-border-color);
44
+ }
45
+
46
+ .rdt_TableHeadRow,
47
+ .rdt_TableRow {
48
+ border-bottom: none !important;
49
+ & > :first-child {
50
+ padding-left: var(--pf-padding-4);
51
+ min-width: 60px;
52
+ justify-content: left;
38
53
  }
39
54
  }
40
55
 
41
- .pf__table--striped {
42
- .rdt_TableRow:nth-child(odd) {
56
+ .rdt_TableRow {
57
+ border-top: none;
58
+
59
+ &:hover {
43
60
  .rdt_TableCell {
44
- background-color: var(--pf-table-stripe-color);
61
+ background-color: var(--pf-table-hover-color) !important;
45
62
  }
46
63
  }
47
- }
48
- }
49
64
 
50
- :root [data-theme='light'] {
51
- .table-wrapper {
52
- .rdt_Table,
53
- .rdt_TableRow,
54
- .rdt_TableCol,
55
- .rdt_TableCol_Sortable,
56
- .rdt_TableCell,
57
- .rdt_TableHeader,
58
- .rdt_TableFooter,
59
- .rdt_TableHead,
60
- .rdt_TableHeadRow,
61
- .rdt_TableBody,
62
- .rdt_ExpanderRow,
63
- .rdt_Pagination {
64
- background-color: var(--pf-table-background-color);
65
- color: var(--pf-table-font-color);
66
- }
67
- button {
68
- svg {
69
- fill: var(--pf-table-font-color);
65
+ &:first-child {
66
+ .rdt_TableCell {
67
+ border-top: var(--pf-border-sm) solid var(--pf-table-border-color);
70
68
  }
69
+ }
71
70
 
72
- &:disabled {
73
- svg {
74
- fill: var(--pf-gray-color-300);
75
- }
71
+ &:last-child {
72
+ .rdt_TableCell {
73
+ border-bottom: var(--pf-border-sm) solid var(--pf-table-border-color);
76
74
  }
77
75
  }
78
76
  }
77
+
78
+ .rdt_TableCell,
79
+ .rdt_TableCol {
80
+ font-size: var(--pf-font-size-base);
81
+
82
+ &:not(:first-child) {
83
+ border-left: var(--pf-border-sm) solid var(--pf-table-border-color);
84
+ }
85
+ }
86
+
87
+ .table--striped .rdt_TableRow:nth-child(odd) .rdt_TableCell {
88
+ background-color: var(--pf-table-stripe-color);
89
+ }
90
+
91
+ .rdt_Pagination {
92
+ border-top: var(--pf-border-sm) solid var(--pf-table-border-color);
93
+ border-radius: 0 0 var(--pf-rounded) var(--pf-rounded);
94
+ }
79
95
  }
@@ -1,19 +1,19 @@
1
- // Common Variables
2
- :root,
3
- :root [data-theme='light'],
4
- :root [data-theme='dark'] {
5
- --pf-table-font-color: var(--pf-gray-color);
6
- --pf-table-stripe-color: var(--pf-gray-color-100);
7
- }
8
-
9
1
  // Light Theme Specific Variables
10
2
  :root [data-theme='light'] {
11
3
  --pf-table-background-color: var(--pf-white-color);
4
+ --pf-table-font-color: var(--pf-gray-color);
5
+ --pf-table-border-color: var(--pf-gray-color-200);
12
6
  --pf-table-stripe-color: var(--pf-gray-color-100);
7
+ --pf-table-hover-color: var(--pf-gray-color-200);
8
+ --pf-table-disabled-color: var(--pf-gray-color-300);
13
9
  }
14
10
 
15
11
  // Dark Theme Specific Variables
16
12
  :root [data-theme='dark'] {
17
13
  --pf-table-background-color: var(--pf-primary-color-700);
18
- --pf-table-stripe-color: var(--pf-primary-color-400);
14
+ --pf-table-font-color: var(--pf-gray-color);
15
+ --pf-table-border-color: var(--pf-primary-color-300);
16
+ --pf-table-stripe-color: var(--pf-primary-color-600);
17
+ --pf-table-hover-color: var(--pf-primary-color-400);
18
+ --pf-table-disabled-color: var(--pf-gray-color-900);
19
19
  }