katalyst-tables 3.6.2 → 3.8.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +33 -0
- data/app/assets/builds/katalyst/tables.min.js.map +1 -1
- data/app/assets/images/katalyst/tables/icons/sort-asc.svg +3 -0
- data/app/assets/images/katalyst/tables/icons/sort-desc.svg +3 -0
- data/app/assets/stylesheets/katalyst/_tables.scss +3 -0
- data/app/assets/stylesheets/katalyst/tables/query.css +142 -0
- data/app/assets/stylesheets/katalyst/tables/{_summary.scss → summary.css} +1 -1
- data/app/assets/stylesheets/katalyst/tables/table.css +164 -0
- data/app/assets/stylesheets/katalyst/tables.css +3 -0
- data/app/components/concerns/katalyst/tables/orderable.rb +1 -1
- data/app/components/concerns/katalyst/tables/sortable.rb +1 -1
- data/app/components/katalyst/summary_table_component.rb +4 -2
- data/app/components/katalyst/table_component.rb +5 -1
- data/app/components/katalyst/tables/cells/boolean_component.rb +1 -1
- data/app/components/katalyst/tables/cells/currency_component.rb +1 -1
- data/app/components/katalyst/tables/cells/date_component.rb +1 -1
- data/app/components/katalyst/tables/cells/date_time_component.rb +1 -1
- data/app/components/katalyst/tables/cells/enum_component.rb +1 -1
- data/app/components/katalyst/tables/cells/number_component.rb +1 -1
- data/app/components/katalyst/tables/cells/ordinal_component.rb +3 -3
- data/app/components/katalyst/tables/cells/rich_text_component.rb +1 -1
- data/app/components/katalyst/tables/cells/select_component.rb +4 -4
- data/app/components/katalyst/tables/query/input_component.html.erb +1 -1
- data/app/components/katalyst/tables/query/modal_component.html.erb +1 -1
- data/app/components/katalyst/tables/query_component.rb +2 -1
- data/app/models/katalyst/tables/suggestions/constant_value.rb +1 -3
- data/app/models/katalyst/tables/suggestions/database_value.rb +1 -5
- data/lib/katalyst/tables/collection/type/boolean.rb +2 -4
- data/lib/katalyst/tables/collection/type/date.rb +6 -8
- data/lib/katalyst/tables/collection/type/enum.rb +10 -2
- data/lib/katalyst/tables/collection/type/string.rb +24 -5
- data/lib/katalyst/tables/collection/type/value.rb +33 -28
- metadata +10 -19
- data/app/assets/stylesheets/katalyst/tables/_index.scss +0 -3
- data/app/assets/stylesheets/katalyst/tables/_ordinal.scss +0 -38
- data/app/assets/stylesheets/katalyst/tables/_query.scss +0 -142
- data/app/assets/stylesheets/katalyst/tables/_select.scss +0 -7
- data/app/assets/stylesheets/katalyst/tables/_table.scss +0 -128
- data/app/assets/stylesheets/katalyst/tables/typed-columns/_boolean.scss +0 -4
- data/app/assets/stylesheets/katalyst/tables/typed-columns/_currency.scss +0 -8
- data/app/assets/stylesheets/katalyst/tables/typed-columns/_date.scss +0 -4
- data/app/assets/stylesheets/katalyst/tables/typed-columns/_datetime.scss +0 -4
- data/app/assets/stylesheets/katalyst/tables/typed-columns/_enum.scss +0 -19
- data/app/assets/stylesheets/katalyst/tables/typed-columns/_index.scss +0 -6
- data/app/assets/stylesheets/katalyst/tables/typed-columns/_number.scss +0 -8
@@ -1,142 +0,0 @@
|
|
1
|
-
[data-controller="tables--query"] {
|
2
|
-
position: relative;
|
3
|
-
|
4
|
-
.query-input {
|
5
|
-
position: relative;
|
6
|
-
display: grid;
|
7
|
-
grid-template-areas: "input button";
|
8
|
-
grid-template-columns: 1fr auto;
|
9
|
-
|
10
|
-
[role="combobox"] {
|
11
|
-
grid-area: input;
|
12
|
-
background: transparent;
|
13
|
-
caret-color: black;
|
14
|
-
resize: none;
|
15
|
-
}
|
16
|
-
|
17
|
-
&[data-connected] [role="combobox"] {
|
18
|
-
color: transparent;
|
19
|
-
}
|
20
|
-
|
21
|
-
button {
|
22
|
-
grid-area: button;
|
23
|
-
flex: 0;
|
24
|
-
}
|
25
|
-
|
26
|
-
.highlight {
|
27
|
-
grid-area: input;
|
28
|
-
visibility: hidden;
|
29
|
-
border: 1px solid transparent;
|
30
|
-
color: black;
|
31
|
-
z-index: -1;
|
32
|
-
font-size: 1rem;
|
33
|
-
padding: 2px;
|
34
|
-
|
35
|
-
overflow-wrap: break-word;
|
36
|
-
white-space: pre-wrap;
|
37
|
-
|
38
|
-
.value {
|
39
|
-
color: #666666;
|
40
|
-
}
|
41
|
-
}
|
42
|
-
|
43
|
-
&[data-connected] .highlight {
|
44
|
-
visibility: visible;
|
45
|
-
}
|
46
|
-
}
|
47
|
-
}
|
48
|
-
|
49
|
-
.query-modal {
|
50
|
-
--suggestion-hover: rgba(0, 0, 0, 0.1);
|
51
|
-
--suggestion-selected: #888;
|
52
|
-
|
53
|
-
position: absolute;
|
54
|
-
top: 100%;
|
55
|
-
left: 0;
|
56
|
-
right: 0;
|
57
|
-
border: 1px solid rgba(0, 0, 0, 0.16);
|
58
|
-
box-shadow:
|
59
|
-
0 3px 6px rgba(0, 0, 0, 0.16),
|
60
|
-
0 3px 6px rgba(0, 0, 0, 0.23);
|
61
|
-
background: white;
|
62
|
-
border-radius: 4px;
|
63
|
-
z-index: 1;
|
64
|
-
opacity: 0;
|
65
|
-
transition: opacity 0.125s;
|
66
|
-
pointer-events: none;
|
67
|
-
display: grid;
|
68
|
-
grid-template-areas: "header" "content" "footer";
|
69
|
-
grid-template-rows: auto 1fr auto;
|
70
|
-
|
71
|
-
&[data-open] {
|
72
|
-
opacity: 1;
|
73
|
-
pointer-events: unset;
|
74
|
-
}
|
75
|
-
|
76
|
-
header {
|
77
|
-
grid-area: header;
|
78
|
-
}
|
79
|
-
|
80
|
-
.content {
|
81
|
-
grid-area: content;
|
82
|
-
padding-top: 0.5rem;
|
83
|
-
}
|
84
|
-
|
85
|
-
h4 {
|
86
|
-
padding-inline: 1rem;
|
87
|
-
}
|
88
|
-
|
89
|
-
ul {
|
90
|
-
margin-block: 0;
|
91
|
-
padding-inline-start: 0;
|
92
|
-
list-style: none;
|
93
|
-
|
94
|
-
li {
|
95
|
-
position: relative;
|
96
|
-
display: flex;
|
97
|
-
align-items: baseline;
|
98
|
-
padding-inline: 1rem;
|
99
|
-
padding-block: 0.125rem;
|
100
|
-
|
101
|
-
&[aria-selected="true"],
|
102
|
-
&:hover {
|
103
|
-
outline: none;
|
104
|
-
background: var(--suggestion-hover);
|
105
|
-
}
|
106
|
-
|
107
|
-
&[aria-selected="true"]::after {
|
108
|
-
content: "";
|
109
|
-
position: absolute;
|
110
|
-
left: 0;
|
111
|
-
top: 0;
|
112
|
-
bottom: 0;
|
113
|
-
width: 4px;
|
114
|
-
background: var(--suggestion-selected);
|
115
|
-
}
|
116
|
-
|
117
|
-
&:hover {
|
118
|
-
cursor: pointer;
|
119
|
-
}
|
120
|
-
}
|
121
|
-
}
|
122
|
-
|
123
|
-
.error {
|
124
|
-
background: #fff2f2;
|
125
|
-
border-bottom: 1px solid #fdd3d3;
|
126
|
-
padding: 0.5rem 1rem;
|
127
|
-
|
128
|
-
code {
|
129
|
-
font-weight: bold;
|
130
|
-
}
|
131
|
-
}
|
132
|
-
|
133
|
-
footer {
|
134
|
-
grid-area: footer;
|
135
|
-
display: flex;
|
136
|
-
justify-content: flex-start;
|
137
|
-
padding-inline: 1rem;
|
138
|
-
padding-block: 0.5rem;
|
139
|
-
border-top: 1px solid #d3d3d3;
|
140
|
-
font-size: small;
|
141
|
-
}
|
142
|
-
}
|
@@ -1,128 +0,0 @@
|
|
1
|
-
@use "ordinal" as *;
|
2
|
-
@use "select" as *;
|
3
|
-
@use "typed-columns";
|
4
|
-
|
5
|
-
$grey: #f0ecf3 !default;
|
6
|
-
|
7
|
-
$table-header-color: transparent !default;
|
8
|
-
$row-border-color: $grey !default;
|
9
|
-
$row-height: 48px !default;
|
10
|
-
$cell-spacing: 0.5rem !default;
|
11
|
-
$tag-color: $grey !default;
|
12
|
-
$on-tag-color: black !default;
|
13
|
-
|
14
|
-
$width-small: 6rem !default;
|
15
|
-
$width-medium: 12rem !default;
|
16
|
-
$width-large: 16rem !default;
|
17
|
-
|
18
|
-
table {
|
19
|
-
--row-height: #{$row-height};
|
20
|
-
--cell-spacing: #{$cell-spacing};
|
21
|
-
--table-header-color: #{$table-header-color};
|
22
|
-
--row-border-color: #{$row-border-color};
|
23
|
-
--tag-color: #{$tag-color};
|
24
|
-
--on-tag-color: #{$on-tag-color};
|
25
|
-
|
26
|
-
--width-small: #{$width-small};
|
27
|
-
--width-medium: #{$width-medium};
|
28
|
-
--width-large: #{$width-large};
|
29
|
-
}
|
30
|
-
|
31
|
-
table {
|
32
|
-
border: none;
|
33
|
-
table-layout: fixed;
|
34
|
-
border-collapse: collapse;
|
35
|
-
text-align: left;
|
36
|
-
width: 100%;
|
37
|
-
|
38
|
-
thead {
|
39
|
-
background: var(--table-header-color);
|
40
|
-
}
|
41
|
-
|
42
|
-
tr {
|
43
|
-
height: var(--row-height);
|
44
|
-
line-height: var(--row-height);
|
45
|
-
}
|
46
|
-
|
47
|
-
th,
|
48
|
-
td {
|
49
|
-
border: none;
|
50
|
-
box-shadow: inset 0px -1px 0px var(--row-border-color);
|
51
|
-
overflow: hidden;
|
52
|
-
text-overflow: ellipsis;
|
53
|
-
vertical-align: top;
|
54
|
-
white-space: nowrap;
|
55
|
-
background-color: white;
|
56
|
-
padding-right: var(--cell-spacing);
|
57
|
-
|
58
|
-
&:last-child {
|
59
|
-
padding-right: 0;
|
60
|
-
}
|
61
|
-
|
62
|
-
> a {
|
63
|
-
display: block;
|
64
|
-
overflow: hidden;
|
65
|
-
white-space: nowrap;
|
66
|
-
text-overflow: ellipsis;
|
67
|
-
text-decoration: none;
|
68
|
-
}
|
69
|
-
|
70
|
-
> img,
|
71
|
-
> a > img {
|
72
|
-
max-height: 3rem;
|
73
|
-
padding: 0;
|
74
|
-
}
|
75
|
-
|
76
|
-
> .trix-content {
|
77
|
-
overflow: hidden;
|
78
|
-
text-overflow: ellipsis;
|
79
|
-
}
|
80
|
-
}
|
81
|
-
|
82
|
-
th {
|
83
|
-
font-weight: bold;
|
84
|
-
|
85
|
-
:where(&.width-s) {
|
86
|
-
width: var(--width-small);
|
87
|
-
}
|
88
|
-
|
89
|
-
:where(&.width-m) {
|
90
|
-
width: var(--width-medium);
|
91
|
-
}
|
92
|
-
|
93
|
-
:where(&.width-l) {
|
94
|
-
width: var(--width-large);
|
95
|
-
}
|
96
|
-
}
|
97
|
-
|
98
|
-
thead a.ascending:after,
|
99
|
-
[data-sort="asc"] a::after {
|
100
|
-
display: inline-block;
|
101
|
-
content: " ";
|
102
|
-
position: relative;
|
103
|
-
margin-left: 1rem;
|
104
|
-
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 13'%3E%3Cpath d='M.541 0l11.125 12.573a.5.5 0 00.749 0L23.541 0h-23z' fill='%23000' fill-rule='evenodd'/%3E%3C/svg%3E");
|
105
|
-
background-size: 14px 14px;
|
106
|
-
height: 14px;
|
107
|
-
width: 14px;
|
108
|
-
top: 0;
|
109
|
-
transform: rotate(180deg);
|
110
|
-
}
|
111
|
-
|
112
|
-
thead a.descending:after,
|
113
|
-
[data-sort="desc"] a::after {
|
114
|
-
display: inline-block;
|
115
|
-
content: " ";
|
116
|
-
position: relative;
|
117
|
-
margin-left: 1rem;
|
118
|
-
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 13'%3E%3Cpath d='M.541 0l11.125 12.573a.5.5 0 00.749 0L23.541 0h-23z' fill='%23000' fill-rule='evenodd'/%3E%3C/svg%3E");
|
119
|
-
background-size: 14px 14px;
|
120
|
-
height: 14px;
|
121
|
-
width: 14px;
|
122
|
-
top: 4px;
|
123
|
-
}
|
124
|
-
|
125
|
-
caption {
|
126
|
-
margin: 2rem 0;
|
127
|
-
}
|
128
|
-
}
|
@@ -1,19 +0,0 @@
|
|
1
|
-
:where(th.type-enum, td.type-enum) {
|
2
|
-
width: var(--width-small);
|
3
|
-
}
|
4
|
-
|
5
|
-
:where(td.type-enum) {
|
6
|
-
// ensure ellipsis is the correct color
|
7
|
-
color: var(--on-tag-color);
|
8
|
-
|
9
|
-
small {
|
10
|
-
background: var(--tag-color);
|
11
|
-
border-radius: 0.25rem;
|
12
|
-
padding: 0.25rem;
|
13
|
-
font-size: small;
|
14
|
-
}
|
15
|
-
}
|
16
|
-
|
17
|
-
table td.type-enum {
|
18
|
-
text-overflow: unset;
|
19
|
-
}
|