@yuneta/gobj-ui 7.32.4 → 7.32.6
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 +50 -5
- package/dist/gobj-ui.cjs.js +134 -109
- package/dist/gobj-ui.es.js +134 -109
- package/package.json +1 -1
- package/src/c_yui_treedb_topic_with_form.js +4 -2
- package/src/lib_icons.js +35 -4
- package/src/lib_icons.test.js +23 -0
- package/src/tabulator.css +81 -0
- package/src/tabulator_css.test.js +40 -49
- package/src/yui_icons.css +80 -8
- package/src/yui_icons.test.js +95 -0
- package/src/yui_table_standard.js +22 -8
- package/src/yui_table_standard.test.js +32 -14
package/README.md
CHANGED
|
@@ -3249,6 +3249,10 @@ A row of that topic with `"icon": "yi-u-transformer"` shows that drawing.
|
|
|
3249
3249
|
- **The drawing is a MASK**, like the library's: painted with `currentColor`,
|
|
3250
3250
|
one colour, the shapes' alpha only. A multicolour svg comes out as a
|
|
3251
3251
|
silhouette.
|
|
3252
|
+
- **It is 1em tall, like every icon.** A drawing that is wider than tall gets
|
|
3253
|
+
a wider box, from its viewBox (`svg_icon_width()`), up to 1.25em
|
|
3254
|
+
(`USER_ICON_MAX_WIDTH`, the widest icon of the library). A wider drawing
|
|
3255
|
+
is drawn smaller, so that it does not push the controls of its row aside.
|
|
3252
3256
|
- **The svg is rebuilt, never inserted.** `yui_svg_sanitize()` parses it and
|
|
3253
3257
|
writes a new one from the shapes alone (`path`, `circle`, `rect`, `ellipse`,
|
|
3254
3258
|
`line`, `polyline`, `polygon`, `g`) and their geometric and stroke
|
|
@@ -4436,8 +4440,11 @@ adds its ✕ (`yui_table_filter_clear()`). It does this when the table is
|
|
|
4436
4440
|
built and again each time Tabulator builds the columns again. Call it right
|
|
4437
4441
|
after `new Tabulator(...)`.
|
|
4438
4442
|
|
|
4439
|
-
The app must define the keys `"rows"`, `"filter by column"`
|
|
4440
|
-
and the paginator keys of `yui_tabulator_lang()`.
|
|
4443
|
+
The app must define the keys `"rows"`, `"rows_one"`, `"filter by column"`
|
|
4444
|
+
and `"clear"`, and the paginator keys of `yui_tabulator_lang()`. The count
|
|
4445
|
+
takes the plural of the number it goes with: `"rows_one"` for one row ("1
|
|
4446
|
+
fila"), `"rows"` for the others. Without `"rows_one"` i18next falls back to
|
|
4447
|
+
`"rows"`, and one row reads "1 filas".
|
|
4441
4448
|
|
|
4442
4449
|
Two things to look at when you apply it:
|
|
4443
4450
|
|
|
@@ -4492,6 +4499,23 @@ text is in the yunetas `CLAUDE.md` ("JS GUI conventions"); in short:
|
|
|
4492
4499
|
- **One icon shape per meaning** (chevron = open/close one thing, shafted
|
|
4493
4500
|
arrow = step or back, tree box = one level, double chevron = all). Never
|
|
4494
4501
|
reuse a glyph because it is there.
|
|
4502
|
+
- **Every icon is 1em tall** (`yui_icons.css`, 7.32.6+). The box of an icon
|
|
4503
|
+
is 1em wide. A glyph that is wider than tall gets a wider box, its viewBox
|
|
4504
|
+
width over its height: `yi-file-csv` (576 x 512) is 1.125em wide, and
|
|
4505
|
+
`yi-code` (640 x 512) is 1.25em. A new icon that is wider than tall goes
|
|
4506
|
+
into the list of its width, and `yui_icons.test.js` names an icon that is
|
|
4507
|
+
missing from it:
|
|
4508
|
+
|
|
4509
|
+
```css
|
|
4510
|
+
.yi-file-csv::before,
|
|
4511
|
+
.yi-sitemap::before {
|
|
4512
|
+
width: 1.125em;
|
|
4513
|
+
}
|
|
4514
|
+
```
|
|
4515
|
+
|
|
4516
|
+
A Bulma `.icon` grows to hold a wide glyph. Up to 7.32.5 every box was a
|
|
4517
|
+
1em square, and a wide glyph was drawn smaller to fit: in one row of tool
|
|
4518
|
+
buttons, `yi-code` was 80% of the height of the others.
|
|
4495
4519
|
- **Bulma helpers carry `!important`** (`.is-hidden`, `.is-flex`): toggle
|
|
4496
4520
|
`is-hidden`, or use `style.setProperty('display', 'none', 'important')`.
|
|
4497
4521
|
- **Data goes into the DOM as text, never as a string.** `createElement2()`
|
|
@@ -4584,7 +4608,7 @@ the tables of `gui_treedb` and `gui_agent`. Other tables can obey it too.
|
|
|
4584
4608
|
a control has none, for example the action buttons or the selection
|
|
4585
4609
|
checkbox.
|
|
4586
4610
|
2. The footer shows the paginator at all times, also when all the rows fit
|
|
4587
|
-
in one page.
|
|
4611
|
+
in one page. On a phone the paginator takes one line (see below).
|
|
4588
4612
|
3. The table holds all its rows in the browser and pages them there. This
|
|
4589
4613
|
is local pagination.
|
|
4590
4614
|
4. Each toolbar above the table takes one row. When the row does not fit,
|
|
@@ -4617,10 +4641,31 @@ since 7.32.4. Up to 7.32.0 it hid the paginator when all the rows fit, and
|
|
|
4617
4641
|
its toolbar wrapped into two rows on a phone. Up to 7.32.3 the columns of a
|
|
4618
4642
|
document, a hook, a file and a time had no filter.
|
|
4619
4643
|
|
|
4644
|
+
The paginator on a phone takes one line, from `tabulator.css` (7.32.6+),
|
|
4645
|
+
for every table of an app that imports it. At the mobile width of Bulma
|
|
4646
|
+
(768 px and less):
|
|
4647
|
+
|
|
4648
|
+
- First, Prev, Next and Last show the icons of the period navigator
|
|
4649
|
+
(`C_YUI_PERIOD`): `yi-backward-step`, `yi-chevron-left`,
|
|
4650
|
+
`yi-chevron-right` and `yi-forward-step`. Each button keeps its name in
|
|
4651
|
+
the table's language: Tabulator writes "First Page" and the others as
|
|
4652
|
+
`title` and `aria-label`.
|
|
4653
|
+
- The label "Rows per page" is hidden. The select keeps the same text as its
|
|
4654
|
+
`title` and `aria-label`.
|
|
4655
|
+
- Of the numbered pages, only the current one shows. The steps and the ends
|
|
4656
|
+
reach the others.
|
|
4657
|
+
- Each icon is `YUI_TOOLBAR_ICON_SIZE` (1.25rem), the size of the icons of
|
|
4658
|
+
the toolbar above the table, in a 2rem button.
|
|
4659
|
+
|
|
4660
|
+
Up to 7.32.5 the words took three lines of the footer on a 390 px phone.
|
|
4661
|
+
`tabulator.css` takes the masks from `yui_icons.css` as custom properties
|
|
4662
|
+
(`--yi-backward-step` and the others), so the app must import it. Every app
|
|
4663
|
+
of the ecosystem does.
|
|
4664
|
+
|
|
4620
4665
|
How to make sure that a table obeys it: open the DEPLOYED page at 390 px.
|
|
4621
4666
|
Each control of the toolbar is on one line, the paginator
|
|
4622
|
-
(`.tabulator-paginator`) has a width with one page of rows
|
|
4623
|
-
of data has a filter box.
|
|
4667
|
+
(`.tabulator-paginator`) has a width with one page of rows and is one line,
|
|
4668
|
+
and each column of data has a filter box.
|
|
4624
4669
|
|
|
4625
4670
|
Why each point:
|
|
4626
4671
|
|