@aliens-syndicate/table 0.0.0-stage → 0.2.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.
@@ -0,0 +1,253 @@
1
+ Style UiTable
2
+ # Every look of the table reads a --ui-table-* property that the ui-table writes from its own properties, so a table
3
+ # changes only itself. The defaults follow the theme tokens of the project (--color-*, --space-*, --radius-*), in
4
+ # light and dark.
5
+ ui-table
6
+ display: grid
7
+ gap: var(--ui-table-gap)
8
+ width: var(--ui-table-width)
9
+ min-width: 0
10
+ box-sizing: border-box
11
+ color: var(--ui-table-color)
12
+ background: var(--ui-table-background)
13
+ border: var(--ui-table-border-size) solid var(--ui-table-border-color)
14
+ border-radius: var(--ui-table-radius)
15
+ box-shadow: var(--ui-table-shadow)
16
+ padding: var(--ui-table-padding)
17
+ font-size: var(--ui-table-font-size)
18
+ ui-table-top, ui-table-bottom
19
+ display: flex
20
+ flex-wrap: wrap
21
+ align-items: end
22
+ gap: var(--space-3, 0.75rem)
23
+ ui-table-top:empty, ui-table-bottom:empty
24
+ display: none
25
+ ui-table-scroll
26
+ overflow: auto
27
+ min-width: 0
28
+ max-height: var(--ui-table-max-height)
29
+ ui-table-scroll:focus-visible
30
+ outline: 2px solid var(--color-focus, #3e6b23)
31
+ outline-offset: 2px
32
+ ui-table-grid
33
+ width: 100%
34
+ border-collapse: separate
35
+ border-spacing: 0 var(--ui-table-row-gap)
36
+ text-align: start
37
+ ui-table-caption
38
+ padding-bottom: var(--space-2, 0.5rem)
39
+ text-align: start
40
+ font-weight: var(--weight-bold, 700)
41
+ ui-table-caption:empty
42
+ display: none
43
+ ui-table-head-cell
44
+ position: relative
45
+ padding: var(--ui-table-header-padding)
46
+ background: var(--ui-table-header-background)
47
+ color: var(--ui-table-header-color)
48
+ font-size: var(--ui-table-header-font-size)
49
+ font-weight: var(--ui-table-header-font-weight)
50
+ text-transform: var(--ui-table-header-transform)
51
+ text-align: start
52
+ vertical-align: middle
53
+ white-space: nowrap
54
+ border-bottom: 1px solid var(--ui-table-header-border-color)
55
+ ui-table[data-sticky-header="true"] ui-table-head-cell
56
+ position: sticky
57
+ top: 0
58
+ z-index: 1
59
+ ui-table-head-cell[data-align="center"], ui-table-cell[data-align="center"]
60
+ text-align: center
61
+ ui-table-head-cell[data-align="end"], ui-table-cell[data-align="end"]
62
+ text-align: end
63
+ ui-table-head-cell[draggable="true"]
64
+ cursor: grab
65
+ ui-table-head-cell[data-dragging="true"]
66
+ opacity: 0.5
67
+ ui-table-head-cell:focus-visible
68
+ outline: 2px solid var(--color-focus, #3e6b23)
69
+ outline-offset: -2px
70
+ ui-table-row
71
+ height: var(--ui-table-row-height)
72
+ background: var(--ui-table-row-background)
73
+ color: var(--ui-table-row-color)
74
+ box-shadow: var(--ui-table-row-shadow)
75
+ ui-table[data-striped="true"] ui-table-row:nth-child(even)
76
+ background: var(--ui-table-row-alt-background)
77
+ ui-table-row:hover
78
+ background: var(--ui-table-row-hover-background)
79
+ ui-table-row[data-selected="true"]
80
+ background: var(--ui-table-row-selected-background)
81
+ ui-table-cell, ui-table-select
82
+ padding: var(--ui-table-cell-padding)
83
+ border-bottom: 1px solid var(--ui-table-row-border-color)
84
+ vertical-align: middle
85
+ text-align: start
86
+ white-space: nowrap
87
+ ui-table[data-lines="grid"] ui-table-cell, ui-table[data-lines="grid"] ui-table-select, ui-table[data-lines="grid"] ui-table-head-cell
88
+ border-inline-end: 1px solid var(--ui-table-row-border-color)
89
+ ui-table[data-lines="none"] ui-table-cell, ui-table[data-lines="none"] ui-table-select
90
+ border-bottom-color: transparent
91
+ ui-table-cell[data-wrap="normal"]
92
+ white-space: normal
93
+ ui-table-cell[data-empty="true"]
94
+ color: var(--color-muted, #52604e)
95
+ ui-table-row > :first-child
96
+ border-start-start-radius: var(--ui-table-row-radius)
97
+ border-end-start-radius: var(--ui-table-row-radius)
98
+ ui-table-row > :last-child
99
+ border-start-end-radius: var(--ui-table-row-radius)
100
+ border-end-end-radius: var(--ui-table-row-radius)
101
+ ui-table[data-density="compact"]
102
+ --ui-table-cell-padding: var(--space-1, 0.25rem) var(--space-3, 0.75rem)
103
+ --ui-table-header-padding: var(--space-2, 0.5rem) var(--space-3, 0.75rem)
104
+ ui-table[data-density="comfortable"]
105
+ --ui-table-cell-padding: var(--space-4, 1rem) var(--space-5, 1.25rem)
106
+ --ui-table-header-padding: var(--space-4, 1rem) var(--space-5, 1.25rem)
107
+ ui-table[aria-busy="true"] ui-table-body
108
+ opacity: 0.6
109
+ transition: opacity 0.2s
110
+ ui-table-sort
111
+ display: inline-flex
112
+ align-items: center
113
+ gap: var(--space-1, 0.25rem)
114
+ padding: 0
115
+ border: 0
116
+ background: transparent
117
+ color: inherit
118
+ font: inherit
119
+ text-transform: inherit
120
+ cursor: pointer
121
+ border-radius: var(--radius-sm, 0.25rem)
122
+ ui-table-sort:focus-visible
123
+ outline: 2px solid var(--color-focus, #3e6b23)
124
+ outline-offset: 2px
125
+ ui-table-sort-icon::after
126
+ content: "↕"
127
+ opacity: 0.45
128
+ ui-table-head-cell[aria-sort="ascending"] ui-table-sort-icon::after
129
+ content: "↑"
130
+ opacity: 1
131
+ ui-table-head-cell[aria-sort="descending"] ui-table-sort-icon::after
132
+ content: "↓"
133
+ opacity: 1
134
+ ui-table-head-cell[data-sort-order] ui-table-sort-icon::before
135
+ content: attr(data-sort-order)
136
+ ui-table-resize
137
+ position: absolute
138
+ top: 0
139
+ inset-inline-end: 0
140
+ width: 0.5rem
141
+ height: 100%
142
+ cursor: col-resize
143
+ touch-action: none
144
+ ui-table-resize::after
145
+ content: ""
146
+ position: absolute
147
+ inset-block: 25%
148
+ inset-inline-end: 0.2rem
149
+ width: 2px
150
+ background: var(--ui-table-header-border-color)
151
+ ui-table-resize:hover::after, ui-table-resize:focus-visible::after
152
+ background: var(--color-focus, #3e6b23)
153
+ ui-table-resize:focus-visible
154
+ outline: none
155
+ ui-table-column-label:empty
156
+ display: none
157
+ ui-table-select
158
+ width: 2.75rem
159
+ ui-table-select ui-checkbox-text, ui-table-head-cell ui-checkbox-text
160
+ position: absolute
161
+ width: 1px
162
+ height: 1px
163
+ overflow: hidden
164
+ clip-path: inset(50%)
165
+ white-space: nowrap
166
+ ui-table-message:empty
167
+ display: none
168
+ ui-table-message-text
169
+ margin: 0
170
+ padding: var(--space-6, 1.5rem) var(--space-4, 1rem)
171
+ text-align: center
172
+ color: var(--color-muted, #52604e)
173
+ ui-table-message-text_error
174
+ color: var(--color-danger, #a5243a)
175
+ ui-table-message-text[hidden], ui-table-state[hidden], ui-table-count[hidden]
176
+ display: none
177
+ ui-table-search, ui-table-filter-text, ui-table-filter-select, ui-table-filter-range, ui-table-page-size
178
+ width: var(--ui-table-control-width)
179
+ max-width: 100%
180
+ ui-table-search ui-input, ui-table-filter-text ui-input, ui-table-filter-range ui-input
181
+ grid-template-columns: minmax(0, 1fr)
182
+ min-width: 0
183
+ ui-table-search ui-input-box, ui-table-filter-text ui-input-box, ui-table-filter-range ui-input-box
184
+ min-width: 0
185
+ ui-table-filter-range-label
186
+ display: block
187
+ margin-bottom: 0.375rem
188
+ font-size: 0.875rem
189
+ font-weight: 600
190
+ ui-table-filter-range-fields
191
+ display: grid
192
+ grid-template-columns: 1fr 1fr
193
+ gap: var(--space-2, 0.5rem)
194
+ ui-table-sort
195
+ display: inline-flex
196
+ ui-table-sort-direction
197
+ display: inline-flex
198
+ align-self: end
199
+ ui-table[data-table] ui-table-sort
200
+ align-items: center
201
+ ui-table-pagination
202
+ display: flex
203
+ flex-wrap: wrap
204
+ align-items: center
205
+ gap: var(--space-2, 0.5rem)
206
+ flex: 1 1 auto
207
+ ui-table-pagination[data-align="between"] ui-table-pagination-status
208
+ order: -1
209
+ margin-inline-end: auto
210
+ ui-table-pagination[data-align="end"]
211
+ justify-content: flex-end
212
+ ui-table-pagination[data-align="center"]
213
+ justify-content: center
214
+ ui-table-pagination-status
215
+ color: var(--color-muted, #52604e)
216
+ font-size: var(--text-small, 0.875rem)
217
+ ui-table-pagination-pages
218
+ display: inline-flex
219
+ align-items: center
220
+ gap: var(--space-1, 0.25rem)
221
+ ui-table-pagination-pages:empty
222
+ display: none
223
+ ui-table-pagination-page
224
+ min-width: 2.25rem
225
+ height: 2.25rem
226
+ padding: 0 var(--space-2, 0.5rem)
227
+ border: 1px solid var(--color-outline, #d5ddd1)
228
+ border-radius: var(--radius-md, 0.5rem)
229
+ background: var(--color-canvas, #ffffff)
230
+ color: inherit
231
+ font: inherit
232
+ cursor: pointer
233
+ ui-table-pagination-page[aria-current="page"]
234
+ background: var(--color-brand, #315724)
235
+ border-color: var(--color-brand, #315724)
236
+ color: var(--color-on-brand, #ffffff)
237
+ ui-table-pagination-page:focus-visible
238
+ outline: 2px solid var(--color-focus, #3e6b23)
239
+ outline-offset: 2px
240
+ ui-table-pagination-gap
241
+ padding: 0 var(--space-1, 0.25rem)
242
+ color: var(--color-muted, #52604e)
243
+ ui-table-count
244
+ color: var(--color-muted, #52604e)
245
+ font-size: var(--text-small, 0.875rem)
246
+ align-self: center
247
+ ui-table-refresh[data-loading="true"] space-icon
248
+ animation: ui-table-spin 0.8s linear infinite
249
+ @keyframes ui-table-spin
250
+ to { transform: rotate(360deg) }
251
+ @media (prefers-reduced-motion: reduce)
252
+ ui-table-refresh[data-loading="true"] space-icon
253
+ animation: none
@@ -0,0 +1,5 @@
1
+ Markup UiTableAction
2
+ # A button of a row, drawn by ui-button of @aliens-syndicate/elements. action names an action of the .logic; when the
3
+ # action takes one parameter (params: user: User, the Model of the table), it receives the row of the button.
4
+ span variant="ui-table-action"
5
+ ui-button label={$text} icon={$icon} layout={$layout} action={$action} variant={$variant} selectable="false" disabled={$disabled} loader="none" loading="false" loading-time="2s" loader-color="auto" loader-size="1.25rem" loader-speed="0.8s" background="auto" color="auto" border-size="var(--border-width-sm, 1px)" border-style="solid" border-color="auto" radius="var(--radius-md, 0.5rem)" shadow="0" shadow-color="transparent" padding="0 var(--space-2, 0.5rem)" font-size="var(--text-small, 0.875rem)" font-weight="var(--weight-bold, 700)" letter-spacing="normal" text-transform="none" gap="var(--space-2, 0.5rem)" icon-size="1.1rem" width="auto" height="2rem" hover-background="auto" hover-color="auto" hover-border-color="auto" hover-shadow="0" hover-shadow-color="transparent" selected-background="auto" selected-color="auto" selected-border-color="var(--color-brand, #315724)" selected-shadow="0" selected-shadow-color="transparent" focus-border-color="auto" focus-ring-size="3px" focus-ring-color="var(--color-focus, #3e6b23)" disabled-background="var(--color-surface, #f6f8f3)" disabled-color="var(--color-muted, #52604e)" disabled-border-color="var(--color-outline, #d5ddd1)"
@@ -0,0 +1,6 @@
1
+ Markup UiTableCell
2
+ # A cell of the row template, in the column named by column. Without tags below it the cell shows the value of the
3
+ # column as text, or the fallback (empty, then the one of the column, then the one of the table) when the value is null,
4
+ # missing or "". The tags written below it replace that: read the row with {$row.field}; the values arrive as text.
5
+ td variant="ui-table-cell" data-table-cell={$column} data-empty={$empty} data-align={$align}
6
+ slot
@@ -0,0 +1,14 @@
1
+ Markup UiTableColumn
2
+ # A column of a ui-table. id names a column of the table (kind="data"), or a column of your own: kind="action" for the
3
+ # buttons of a row and kind="select" for the selection boxes (with a box that selects the page when the table selects
4
+ # several rows). label is the header text; the tags written below it join the header. align, width, min-width and wrap
5
+ # set the look of the column; empty replaces the fallback of the table for its cells.
6
+ div variant="ui-table-column" data-table-column={$id} data-kind={$kind} data-align={$align} data-wrap={$wrap} data-empty={$empty} data-width={$width} data-min-width={$min-width}
7
+ span={$label} variant="ui-table-column-label"
8
+ match {$kind}
9
+ case data
10
+ slot
11
+ case action
12
+ slot
13
+ case select
14
+ ui-checkbox label={$select-label} description="" name="" variant="ui-checkbox" checked="false" disabled="false" label-selectable="true" position="start" items="center" gap="0" text-gap="0" box-size="1.125rem" box-radius="var(--radius-sm, 0.25rem)" box-background="var(--color-canvas, #ffffff)" box-border-size="var(--border-width-md, 2px)" box-border-style="solid" box-border-color="var(--color-outline-strong, #71816a)" box-shadow="0" box-shadow-color="transparent" check-style="tick" check-color="var(--color-on-brand, #ffffff)" check-size="0.75rem" checked-background="var(--color-brand, #315724)" checked-border-color="var(--color-brand, #315724)" checked-label-color="inherit" checked-label-decoration="none" label-color="inherit" label-size="var(--text-small, 0.875rem)" label-weight="400" label-style="normal" label-transform="none" description-color="var(--color-muted, #52604e)" description-size="var(--text-caption, 0.75rem)" description-weight="400" description-style="normal" hover-border-color="var(--color-brand, #315724)" hover-background="var(--color-surface, #f6f8f3)" focus-border-color="var(--color-brand, #315724)" focus-ring-size="3px" focus-ring-color="var(--color-focus, #3e6b23)" disabled-background="var(--color-surface, #f6f8f3)" disabled-border-color="var(--color-outline, #d5ddd1)" disabled-color="var(--color-muted, #52604e)"
@@ -0,0 +1,6 @@
1
+ Markup UiTableCount
2
+ # A number of the table: show is total (every row, when known), filtered (after search and filters), loaded (the rows
3
+ # here), shown (the rows on the page) or selected. text writes it with {count}, and also takes {total}, {filtered},
4
+ # {loaded}, {shown} and {selected}. A number that is not known is not shown.
5
+ span variant="ui-table-count" data-table-control="count" data-table-for={$table} data-position={$position} data-count={$show} data-text={$text} aria-live="polite" hidden
6
+ span variant="ui-table-count-text" data-table-count-text
@@ -0,0 +1,13 @@
1
+ Logic UiTableEngine
2
+ # The actions of the buttons and choices of the table controls. The table engine handles the press; the button and
3
+ # the option need an action, and these do nothing.
4
+ actions:
5
+ press:
6
+ returns: void
7
+ body:
8
+ return
9
+
10
+ choose:
11
+ returns: void
12
+ body:
13
+ return
@@ -0,0 +1,8 @@
1
+ Markup UiTableFilterRange
2
+ # A range filter of a number column declared with filter: range: the rows between the minimum and the maximum, either
3
+ # of them empty for no limit.
4
+ div variant="ui-table-filter-range" data-table-control="filter-range" data-table-for={$table} data-column={$column} data-position={$position} style="--ui-table-control-width: {$width}"
5
+ span={$label} variant="ui-table-filter-range-label"
6
+ div variant="ui-table-filter-range-fields"
7
+ ui-input type="numeric" country="BR" mask="" label="" placeholder={$min-placeholder} hint="" success-text="" error-text="" name="{$column}-min" value="" required="false" disabled="false" readonly="false" minlength="0" maxlength="0" value-format="masked" look="outline" clearable="false" show-icon="false" icon="search-01" show-count="false" show-dial-code="false" state-border="false" label-color="inherit" label-size="0.875rem" label-weight="600" hint-color="var(--color-muted, #52604e)" hint-size="0.75rem" error-color="#d92d20" success-color="#16a34a" width="100%" height="2.5rem" padding="0 0.875rem" radius="var(--radius-md, 0.5rem)" background="var(--color-canvas, #ffffff)" color="var(--color-text, #182015)" border-size="1px" border-style="solid" border-color="var(--color-outline-strong, #71816a)" hover-border-color="var(--color-outline-strong, #71816a)" focus-border-color="var(--color-focus, #3e6b23)" focus-ring-size="3px" focus-ring-color="color-mix(in srgb, var(--color-focus, #3e6b23) 25%, transparent)" shadow="0" shadow-color="transparent" font-family="inherit" font-size="0.9375rem" placeholder-color="var(--color-muted, #52604e)" icon-color="var(--color-muted, #52604e)" icon-size="1.1rem" gap="0.375rem" disabled-background="var(--color-surface, #f6f8f3)"
8
+ ui-input type="numeric" country="BR" mask="" label="" placeholder={$max-placeholder} hint="" success-text="" error-text="" name="{$column}-max" value="" required="false" disabled="false" readonly="false" minlength="0" maxlength="0" value-format="masked" look="outline" clearable="false" show-icon="false" icon="search-01" show-count="false" show-dial-code="false" state-border="false" label-color="inherit" label-size="0.875rem" label-weight="600" hint-color="var(--color-muted, #52604e)" hint-size="0.75rem" error-color="#d92d20" success-color="#16a34a" width="100%" height="2.5rem" padding="0 0.875rem" radius="var(--radius-md, 0.5rem)" background="var(--color-canvas, #ffffff)" color="var(--color-text, #182015)" border-size="1px" border-style="solid" border-color="var(--color-outline-strong, #71816a)" hover-border-color="var(--color-outline-strong, #71816a)" focus-border-color="var(--color-focus, #3e6b23)" focus-ring-size="3px" focus-ring-color="color-mix(in srgb, var(--color-focus, #3e6b23) 25%, transparent)" shadow="0" shadow-color="transparent" font-family="inherit" font-size="0.9375rem" placeholder-color="var(--color-muted, #52604e)" icon-color="var(--color-muted, #52604e)" icon-size="1.1rem" gap="0.375rem" disabled-background="var(--color-surface, #f6f8f3)"
@@ -0,0 +1,8 @@
1
+ Markup UiTableFilterSelect
2
+ # A choice filter of a column declared with filter: equals. all-text is the choice that clears it. With options="auto" a
3
+ # local table lists the values its rows hold; options="own" uses the ui-table-option tags written below it.
4
+ div variant="ui-table-filter-select" data-table-control="filter-select" data-table-for={$table} data-column={$column} data-options={$options} data-all-text={$all-text} data-position={$position} style="--ui-table-control-width: {$width}"
5
+ ui-select list-style="listview" name={$column} placeholder={$placeholder} value="" disabled="false" variant="ui-select" visible-items="6" item-height="2.5rem" list-position="below" list-offset="0.25rem" z-index="1000" width="100%" height="2.5rem" padding="var(--space-2, 0.5rem) var(--space-3, 0.75rem)" background="var(--color-canvas, #ffffff)" color="var(--color-text, #182015)" border-size="var(--border-width-sm, 1px)" border-style="solid" border-color="var(--color-outline-strong, #71816a)" radius="var(--radius-md, 0.5rem)" shadow="0" shadow-color="transparent" font-size="0.9375rem" font-weight="var(--weight-regular, 400)" arrow="true" arrow-icon="arrow-down-01" arrow-size="1rem" arrow-color="var(--color-muted, #52604e)" arrow-rotate="true" list-background="var(--color-canvas, #ffffff)" list-border-size="var(--border-width-sm, 1px)" list-border-style="solid" list-border-color="var(--color-outline, #d5ddd1)" list-radius="var(--radius-md, 0.5rem)" list-shadow="24px" list-shadow-color="rgba(0, 0, 0, 0.2)" scrollbar="thin" scrollbar-color="var(--color-outline-strong, #71816a)" scrollbar-track="var(--color-surface, #f6f8f3)" item-padding="var(--space-2, 0.5rem) var(--space-3, 0.75rem)" item-color="var(--color-text, #182015)" item-hover-background="var(--color-surface, #f6f8f3)" item-hover-color="var(--color-text, #182015)" item-selected-background="var(--color-accent, #e7f4d3)" item-selected-color="var(--color-on-accent, #25411c)" item-disabled-color="var(--color-muted, #52604e)" divider="false" divider-style="solid" divider-color="var(--color-outline, #d5ddd1)" divider-size="var(--border-width-sm, 1px)" hover-border-color="var(--color-brand, #315724)" hover-background="var(--color-surface, #f6f8f3)" open-border-color="var(--color-brand, #315724)" focus-ring-size="3px" focus-ring-color="var(--color-focus, #3e6b23)" disabled-background="var(--color-surface, #f6f8f3)" disabled-border-color="var(--color-outline, #d5ddd1)" disabled-color="var(--color-muted, #52604e)" invalid-value="ignore" invalid-border-color="var(--color-danger, #a5243a)" invalid-color="var(--color-danger, #a5243a)" clearable="false" clear-color="var(--color-muted, #52604e)" clear-size="1.1rem" clear-label="Clear" pill-gap="0.5rem" pill-radius="var(--radius-pill, 9999px)" pill-height="2rem" pill-border-color="var(--color-outline-strong, #71816a)" grid-columns="3" grid-gap="0.5rem" grid-radius="var(--radius-md, 0.5rem)" grid-border-color="var(--color-outline-strong, #71816a)" label={$label} required="false" required-color="#dd3333" label-color="inherit" label-size="0.875rem" label-weight="600" label-gap="0.375rem" hint="" hint-color="var(--color-muted, #52604e)" hint-size="0.8rem" show-icon="false" icon="search-01" icon-color="var(--color-muted, #52604e)" icon-size="1.1rem" placeholder-color="inherit" font-family="inherit" item-font-size="inherit" item-font-weight="inherit" item-radius="0" list-padding="0" list-gap="0" show-check="false" check-color="currentColor" animation="none" duration="0.15s"
6
+ ui-select-option value="" text={$all-text} action="ui-table-engine.choose" disabled="false"
7
+ span={$all-text} data-table-option-text
8
+ slot
@@ -0,0 +1,4 @@
1
+ Markup UiTableFilterText
2
+ # A text filter of a column declared with filter: text: the rows keep the ones whose value holds the words.
3
+ div variant="ui-table-filter-text" data-table-control="filter-text" data-table-for={$table} data-column={$column} data-position={$position} style="--ui-table-control-width: {$width}"
4
+ ui-input type="text" country="BR" mask="" label={$label} placeholder={$placeholder} hint="" success-text="" error-text="" name={$column} value="" required="false" disabled="false" readonly="false" minlength="0" maxlength="0" value-format="masked" look="outline" clearable="false" show-icon="false" icon="search-01" show-count="false" show-dial-code="false" state-border="false" label-color="inherit" label-size="0.875rem" label-weight="600" hint-color="var(--color-muted, #52604e)" hint-size="0.75rem" error-color="#d92d20" success-color="#16a34a" width="100%" height="2.5rem" padding="0 0.875rem" radius="var(--radius-md, 0.5rem)" background="var(--color-canvas, #ffffff)" color="var(--color-text, #182015)" border-size="1px" border-style="solid" border-color="var(--color-outline-strong, #71816a)" hover-border-color="var(--color-outline-strong, #71816a)" focus-border-color="var(--color-focus, #3e6b23)" focus-ring-size="3px" focus-ring-color="color-mix(in srgb, var(--color-focus, #3e6b23) 25%, transparent)" shadow="0" shadow-color="transparent" font-family="inherit" font-size="0.9375rem" placeholder-color="var(--color-muted, #52604e)" icon-color="var(--color-muted, #52604e)" icon-size="1.1rem" gap="0.375rem" disabled-background="var(--color-surface, #f6f8f3)"
@@ -0,0 +1,4 @@
1
+ Markup UiTableOption
2
+ # One choice of ui-table-sort (a column that sorts) or of ui-table-filter-select with options="own" (a value).
3
+ ui-select-option value={$value} text={$text} action="ui-table-engine.choose" disabled="false"
4
+ span={$text}
@@ -0,0 +1,6 @@
1
+ Markup UiTablePageSize
2
+ # How many rows a page shows, from the sizes of pagination: in the .logic. option-text writes each one ({size}).
3
+ div variant="ui-table-page-size" data-table-control="page-size" data-table-for={$table} data-option-text={$option-text} data-position={$position} style="--ui-table-control-width: {$width}"
4
+ ui-select list-style="listview" name="page-size" placeholder="" value="" disabled="false" variant="ui-select" visible-items="6" item-height="2.5rem" list-position="below" list-offset="0.25rem" z-index="1000" width="100%" height="2.5rem" padding="var(--space-2, 0.5rem) var(--space-3, 0.75rem)" background="var(--color-canvas, #ffffff)" color="var(--color-text, #182015)" border-size="var(--border-width-sm, 1px)" border-style="solid" border-color="var(--color-outline-strong, #71816a)" radius="var(--radius-md, 0.5rem)" shadow="0" shadow-color="transparent" font-size="0.9375rem" font-weight="var(--weight-regular, 400)" arrow="true" arrow-icon="arrow-down-01" arrow-size="1rem" arrow-color="var(--color-muted, #52604e)" arrow-rotate="true" list-background="var(--color-canvas, #ffffff)" list-border-size="var(--border-width-sm, 1px)" list-border-style="solid" list-border-color="var(--color-outline, #d5ddd1)" list-radius="var(--radius-md, 0.5rem)" list-shadow="24px" list-shadow-color="rgba(0, 0, 0, 0.2)" scrollbar="thin" scrollbar-color="var(--color-outline-strong, #71816a)" scrollbar-track="var(--color-surface, #f6f8f3)" item-padding="var(--space-2, 0.5rem) var(--space-3, 0.75rem)" item-color="var(--color-text, #182015)" item-hover-background="var(--color-surface, #f6f8f3)" item-hover-color="var(--color-text, #182015)" item-selected-background="var(--color-accent, #e7f4d3)" item-selected-color="var(--color-on-accent, #25411c)" item-disabled-color="var(--color-muted, #52604e)" divider="false" divider-style="solid" divider-color="var(--color-outline, #d5ddd1)" divider-size="var(--border-width-sm, 1px)" hover-border-color="var(--color-brand, #315724)" hover-background="var(--color-surface, #f6f8f3)" open-border-color="var(--color-brand, #315724)" focus-ring-size="3px" focus-ring-color="var(--color-focus, #3e6b23)" disabled-background="var(--color-surface, #f6f8f3)" disabled-border-color="var(--color-outline, #d5ddd1)" disabled-color="var(--color-muted, #52604e)" invalid-value="ignore" invalid-border-color="var(--color-danger, #a5243a)" invalid-color="var(--color-danger, #a5243a)" clearable="false" clear-color="var(--color-muted, #52604e)" clear-size="1.1rem" clear-label="Clear" pill-gap="0.5rem" pill-radius="var(--radius-pill, 9999px)" pill-height="2rem" pill-border-color="var(--color-outline-strong, #71816a)" grid-columns="3" grid-gap="0.5rem" grid-radius="var(--radius-md, 0.5rem)" grid-border-color="var(--color-outline-strong, #71816a)" label={$label} required="false" required-color="#dd3333" label-color="inherit" label-size="0.875rem" label-weight="600" label-gap="0.375rem" hint="" hint-color="var(--color-muted, #52604e)" hint-size="0.8rem" show-icon="false" icon="search-01" icon-color="var(--color-muted, #52604e)" icon-size="1.1rem" placeholder-color="inherit" font-family="inherit" item-font-size="inherit" item-font-weight="inherit" item-radius="0" list-padding="0" list-gap="0" show-check="false" check-color="currentColor" animation="none" duration="0.15s"
5
+ ui-select-option value="" text="" action="ui-table-engine.choose" disabled="false"
6
+ span data-table-option-text
@@ -0,0 +1,11 @@
1
+ Markup UiTablePagination
2
+ # The pages of a table declared with pagination:. status-text writes the range ({from}, {to}, {total}, {page}, {pages});
3
+ # unknown-text is used when a remote service does not say the total. numbers="true" adds the page buttons. The look of
4
+ # the buttons comes from variant, previous-layout and next-layout (text, icon-start, icon-end or icon).
5
+ nav variant="ui-table-pagination" label={$label} data-table-control="pagination" data-table-for={$table} data-position={$position} data-numbers={$numbers} data-status-text={$status-text} data-unknown-text={$unknown-text} data-page-text={$page-text} data-align={$align}
6
+ span variant="ui-table-pagination-step" data-table-previous
7
+ ui-button label={$previous-text} icon={$previous-icon} layout={$previous-layout} action="ui-table-engine.press" variant={$variant} selectable="false" disabled="false" loader="none" loading="false" loading-time="2s" loader-color="auto" loader-size="1.25rem" loader-speed="0.8s" background="auto" color="auto" border-size="var(--border-width-sm, 1px)" border-style="solid" border-color="auto" radius="var(--radius-md, 0.5rem)" shadow="0" shadow-color="transparent" padding="var(--space-2, 0.5rem) var(--space-3, 0.75rem)" font-size="var(--text-small, 0.875rem)" font-weight="var(--weight-bold, 700)" letter-spacing="normal" text-transform="none" gap="var(--space-2, 0.5rem)" icon-size="1.1rem" width="auto" height="2.25rem" hover-background="auto" hover-color="auto" hover-border-color="auto" hover-shadow="0" hover-shadow-color="transparent" selected-background="auto" selected-color="auto" selected-border-color="var(--color-brand, #315724)" selected-shadow="0" selected-shadow-color="transparent" focus-border-color="auto" focus-ring-size="3px" focus-ring-color="var(--color-focus, #3e6b23)" disabled-background="var(--color-surface, #f6f8f3)" disabled-color="var(--color-muted, #52604e)" disabled-border-color="var(--color-outline, #d5ddd1)"
8
+ span variant="ui-table-pagination-pages" data-table-pages
9
+ output variant="ui-table-pagination-status" data-table-page-status aria-live="polite"
10
+ span variant="ui-table-pagination-step" data-table-next
11
+ ui-button label={$next-text} icon={$next-icon} layout={$next-layout} action="ui-table-engine.press" variant={$variant} selectable="false" disabled="false" loader="none" loading="false" loading-time="2s" loader-color="auto" loader-size="1.25rem" loader-speed="0.8s" background="auto" color="auto" border-size="var(--border-width-sm, 1px)" border-style="solid" border-color="auto" radius="var(--radius-md, 0.5rem)" shadow="0" shadow-color="transparent" padding="var(--space-2, 0.5rem) var(--space-3, 0.75rem)" font-size="var(--text-small, 0.875rem)" font-weight="var(--weight-bold, 700)" letter-spacing="normal" text-transform="none" gap="var(--space-2, 0.5rem)" icon-size="1.1rem" width="auto" height="2.25rem" hover-background="auto" hover-color="auto" hover-border-color="auto" hover-shadow="0" hover-shadow-color="transparent" selected-background="auto" selected-color="auto" selected-border-color="var(--color-brand, #315724)" selected-shadow="0" selected-shadow-color="transparent" focus-border-color="auto" focus-ring-size="3px" focus-ring-color="var(--color-focus, #3e6b23)" disabled-background="var(--color-surface, #f6f8f3)" disabled-color="var(--color-muted, #52604e)" disabled-border-color="var(--color-outline, #d5ddd1)"
@@ -0,0 +1,5 @@
1
+ Markup UiTableRefresh
2
+ # Asks the table for its rows again (its load action, or the signal of rows:), keeping search, filters, sorting and
3
+ # page. While the rows load, data-loading is true.
4
+ span variant="ui-table-refresh" data-table-control="refresh" data-table-for={$table} data-position={$position} data-loading="false"
5
+ ui-button label={$text} icon={$icon} layout={$layout} action="ui-table-engine.press" variant={$variant} selectable="false" disabled="false" loader="none" loading="false" loading-time="2s" loader-color="auto" loader-size="1.25rem" loader-speed="0.8s" background="auto" color="auto" border-size="var(--border-width-sm, 1px)" border-style="solid" border-color="auto" radius="var(--radius-md, 0.5rem)" shadow="0" shadow-color="transparent" padding="var(--space-2, 0.5rem) var(--space-3, 0.75rem)" font-size="var(--text-small, 0.875rem)" font-weight="var(--weight-bold, 700)" letter-spacing="normal" text-transform="none" gap="var(--space-2, 0.5rem)" icon-size="1.1rem" width="auto" height="2.25rem" hover-background="auto" hover-color="auto" hover-border-color="auto" hover-shadow="0" hover-shadow-color="transparent" selected-background="auto" selected-color="auto" selected-border-color="var(--color-brand, #315724)" selected-shadow="0" selected-shadow-color="transparent" focus-border-color="auto" focus-ring-size="3px" focus-ring-color="var(--color-focus, #3e6b23)" disabled-background="var(--color-surface, #f6f8f3)" disabled-color="var(--color-muted, #52604e)" disabled-border-color="var(--color-outline, #d5ddd1)"
@@ -0,0 +1,5 @@
1
+ Markup UiTableSearch
2
+ # The search field of a table: table names it (leave it empty inside its ui-table). It searches the columns of search:
3
+ # in the .logic; a remote table sends the words to its load action after a pause of delay milliseconds.
4
+ div variant="ui-table-search" data-table-control="search" data-table-for={$table} data-position={$position} data-delay={$delay} style="--ui-table-control-width: {$width}"
5
+ ui-input type="text" country="BR" mask="" label={$label} placeholder={$placeholder} hint="" success-text="" error-text="" name="search" value="" required="false" disabled="false" readonly="false" minlength="0" maxlength="0" value-format="masked" look="outline" clearable="false" show-icon="true" icon="search-01" show-count="false" show-dial-code="false" state-border="false" label-color="inherit" label-size="0.875rem" label-weight="600" hint-color="var(--color-muted, #52604e)" hint-size="0.75rem" error-color="#d92d20" success-color="#16a34a" width="100%" height="2.5rem" padding="0 0.875rem" radius="var(--radius-md, 0.5rem)" background="var(--color-canvas, #ffffff)" color="var(--color-text, #182015)" border-size="1px" border-style="solid" border-color="var(--color-outline-strong, #71816a)" hover-border-color="var(--color-outline-strong, #71816a)" focus-border-color="var(--color-focus, #3e6b23)" focus-ring-size="3px" focus-ring-color="color-mix(in srgb, var(--color-focus, #3e6b23) 25%, transparent)" shadow="0" shadow-color="transparent" font-family="inherit" font-size="0.9375rem" placeholder-color="var(--color-muted, #52604e)" icon-color="var(--color-muted, #52604e)" icon-size="1.1rem" gap="0.375rem" disabled-background="var(--color-surface, #f6f8f3)"
@@ -0,0 +1,4 @@
1
+ Markup UiTableSelect
2
+ # The selection box of a row, in a column of kind="select". label names the box for assistive technology.
3
+ td variant="ui-table-select" data-table-cell={$column} data-table-select
4
+ ui-checkbox label={$label} description="" name="" variant="ui-checkbox" checked="false" disabled="false" label-selectable="true" position="start" items="center" gap="0" text-gap="0" box-size="1.125rem" box-radius="var(--radius-sm, 0.25rem)" box-background="var(--color-canvas, #ffffff)" box-border-size="var(--border-width-md, 2px)" box-border-style="solid" box-border-color="var(--color-outline-strong, #71816a)" box-shadow="0" box-shadow-color="transparent" check-style="tick" check-color="var(--color-on-brand, #ffffff)" check-size="0.75rem" checked-background="var(--color-brand, #315724)" checked-border-color="var(--color-brand, #315724)" checked-label-color="inherit" checked-label-decoration="none" label-color="inherit" label-size="var(--text-small, 0.875rem)" label-weight="400" label-style="normal" label-transform="none" description-color="var(--color-muted, #52604e)" description-size="var(--text-caption, 0.75rem)" description-weight="400" description-style="normal" hover-border-color="var(--color-brand, #315724)" hover-background="var(--color-surface, #f6f8f3)" focus-border-color="var(--color-brand, #315724)" focus-ring-size="3px" focus-ring-color="var(--color-focus, #3e6b23)" disabled-background="var(--color-surface, #f6f8f3)" disabled-border-color="var(--color-outline, #d5ddd1)" disabled-color="var(--color-muted, #52604e)"
@@ -0,0 +1,8 @@
1
+ Markup UiTableSort
2
+ # Sorting outside the header: the ui-table-option tags below it name the columns that sort, and the button turns the
3
+ # direction. It drives the same sorting as the header, so both always agree.
4
+ div variant="ui-table-sort" data-table-control="sort" data-table-for={$table} data-position={$position} data-ascending-text={$ascending-text} data-descending-text={$descending-text} data-direction="none" style="--ui-table-control-width: {$width}"
5
+ ui-select list-style="listview" name="sort" placeholder={$placeholder} value="" disabled="false" variant="ui-select" visible-items="6" item-height="2.5rem" list-position="below" list-offset="0.25rem" z-index="1000" width="100%" height="2.5rem" padding="var(--space-2, 0.5rem) var(--space-3, 0.75rem)" background="var(--color-canvas, #ffffff)" color="var(--color-text, #182015)" border-size="var(--border-width-sm, 1px)" border-style="solid" border-color="var(--color-outline-strong, #71816a)" radius="var(--radius-md, 0.5rem)" shadow="0" shadow-color="transparent" font-size="0.9375rem" font-weight="var(--weight-regular, 400)" arrow="true" arrow-icon="arrow-down-01" arrow-size="1rem" arrow-color="var(--color-muted, #52604e)" arrow-rotate="true" list-background="var(--color-canvas, #ffffff)" list-border-size="var(--border-width-sm, 1px)" list-border-style="solid" list-border-color="var(--color-outline, #d5ddd1)" list-radius="var(--radius-md, 0.5rem)" list-shadow="24px" list-shadow-color="rgba(0, 0, 0, 0.2)" scrollbar="thin" scrollbar-color="var(--color-outline-strong, #71816a)" scrollbar-track="var(--color-surface, #f6f8f3)" item-padding="var(--space-2, 0.5rem) var(--space-3, 0.75rem)" item-color="var(--color-text, #182015)" item-hover-background="var(--color-surface, #f6f8f3)" item-hover-color="var(--color-text, #182015)" item-selected-background="var(--color-accent, #e7f4d3)" item-selected-color="var(--color-on-accent, #25411c)" item-disabled-color="var(--color-muted, #52604e)" divider="false" divider-style="solid" divider-color="var(--color-outline, #d5ddd1)" divider-size="var(--border-width-sm, 1px)" hover-border-color="var(--color-brand, #315724)" hover-background="var(--color-surface, #f6f8f3)" open-border-color="var(--color-brand, #315724)" focus-ring-size="3px" focus-ring-color="var(--color-focus, #3e6b23)" disabled-background="var(--color-surface, #f6f8f3)" disabled-border-color="var(--color-outline, #d5ddd1)" disabled-color="var(--color-muted, #52604e)" invalid-value="ignore" invalid-border-color="var(--color-danger, #a5243a)" invalid-color="var(--color-danger, #a5243a)" clearable="false" clear-color="var(--color-muted, #52604e)" clear-size="1.1rem" clear-label="Clear" pill-gap="0.5rem" pill-radius="var(--radius-pill, 9999px)" pill-height="2rem" pill-border-color="var(--color-outline-strong, #71816a)" grid-columns="3" grid-gap="0.5rem" grid-radius="var(--radius-md, 0.5rem)" grid-border-color="var(--color-outline-strong, #71816a)" label={$label} required="false" required-color="#dd3333" label-color="inherit" label-size="0.875rem" label-weight="600" label-gap="0.375rem" hint="" hint-color="var(--color-muted, #52604e)" hint-size="0.8rem" show-icon="false" icon="search-01" icon-color="var(--color-muted, #52604e)" icon-size="1.1rem" placeholder-color="inherit" font-family="inherit" item-font-size="inherit" item-font-weight="inherit" item-radius="0" list-padding="0" list-gap="0" show-check="false" check-color="currentColor" animation="none" duration="0.15s"
6
+ slot
7
+ span variant="ui-table-sort-direction" data-table-direction
8
+ ui-button label={$ascending-text} icon="arrow-up-down" layout="icon" action="ui-table-engine.press" variant={$variant} selectable="false" disabled="false" loader="none" loading="false" loading-time="2s" loader-color="auto" loader-size="1.25rem" loader-speed="0.8s" background="auto" color="auto" border-size="var(--border-width-sm, 1px)" border-style="solid" border-color="auto" radius="var(--radius-md, 0.5rem)" shadow="0" shadow-color="transparent" padding="0" font-size="var(--text-small, 0.875rem)" font-weight="var(--weight-bold, 700)" letter-spacing="normal" text-transform="none" gap="var(--space-2, 0.5rem)" icon-size="1.1rem" width="2.5rem" height="2.5rem" hover-background="auto" hover-color="auto" hover-border-color="auto" hover-shadow="0" hover-shadow-color="transparent" selected-background="auto" selected-color="auto" selected-border-color="var(--color-brand, #315724)" selected-shadow="0" selected-shadow-color="transparent" focus-border-color="auto" focus-ring-size="3px" focus-ring-color="var(--color-focus, #3e6b23)" disabled-background="var(--color-surface, #f6f8f3)" disabled-color="var(--color-muted, #52604e)" disabled-border-color="var(--color-outline, #d5ddd1)"
@@ -0,0 +1,5 @@
1
+ Markup UiTableState
2
+ # What the table shows instead of rows when when is loading (before the first rows), empty or error. The tags written
3
+ # below it replace the text of the ui-table for that state.
4
+ div variant="ui-table-state" data-table-control="state" data-table-for={$table} data-when={$when} hidden
5
+ slot