From 231f5c8312311842845c4a733e8a3dd17dd05606 Mon Sep 17 00:00:00 2001 From: bordun Date: Thu, 6 May 2021 20:17:45 +0200 Subject: [PATCH] docs: gridTemplate --- resources/docs/docs/widgets/properties-reference.md | 5 +++-- src/client/widgets/basics/menu.js | 2 +- src/client/widgets/basics/switch.js | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/resources/docs/docs/widgets/properties-reference.md b/resources/docs/docs/widgets/properties-reference.md index bb0c382d..6285b24b 100644 --- a/resources/docs/docs/widgets/properties-reference.md +++ b/resources/docs/docs/widgets/properties-reference.md @@ -108,7 +108,7 @@ |
css#
| `string` | "" | CSS rules. See documentation.

Available css variables:
- `--color-background`: `colorBg`
- `--color-widget`: `colorWidget`
- `--color-fill`: `colorFill`
- `--color-stroke`: `colorStroke`
- `--color-text`: `colorText`
- `--widget-padding`: `padding`
- `--line-width`: `lineWidth`
- `--alpha-fill-on`: `alphaFillOn`
- `--alpha-fill-off`: `alphaFillOff`
- `--alpha-stroke`: `alphaStroke`
- `--color-text-on`: `colorTextOn` | |
colorTextOn#
| `string` | "auto" | Defines the widget's text color when active. | |
layout#
| `string` | "vertical" | Defines how items should be laid out

Choices: `vertical`, `horizontal`, `grid` | - |
gridTemplate#
| `string`|
`number` | "" | If `layout` is `grid`, can be either a number of columns of a value css grid-template definition. | + |
gridTemplate#
| `string`|
`number` | "" | If `layout` is `grid`, can be either a number of columns or a valid value for the css property "grid-template". | === "switch" @@ -154,7 +154,7 @@ | | `string` | "center" | Set to `top` or `bottom` to change menu alignment (otherwise center)

Choices: `center`, `top`, `bottom` | | | `string` | "center" | Set to `left` or `right` to change menu alignment (otherwise center)

Choices: `center`, `left`, `right` | | | `string` | "circular" | Defines whether the menu's layout should be rendered in a circle or in a box

Choices: `circular`, `horizontal`, `vertical`, `grid` | - | | `string`|
`number` | "" | If `layout` is `grid`, can be either a number of columns of a value css grid-template definition. | + | | `string`|
`number` | "" | If `layout` is `grid`, can be either a number of columns or a valid value for the css property "grid-template". | === "menu" @@ -180,6 +180,7 @@ | property | type |default | description | | --- | --- | --- | --- | |
asYouType#
| `boolean` | false | Set to `true` to make the input send its value at each keystroke | + |
numeric#
| `boolean` | false | Set to `true` to allow numeric values only and display a numeric keyboard on mobile devices | |
validation#
| `string` | "" | Regular expression: if the submitted value doesn't match the regular expression, it will be reset to the last valid value.

If leading and trailing slashes are omitted, they will be added automatically and the flag will be set to "gm"

Examples:
- `^[0-9]*$` accepts digits only, any number of them
- `/^[a-zs]{0,10}$/i` accept between 0 and 10 alphabetic characters and spaces (case insensitive) | ??? api "
file#
" diff --git a/src/client/widgets/basics/menu.js b/src/client/widgets/basics/menu.js index 125080db..92fdc302 100644 --- a/src/client/widgets/basics/menu.js +++ b/src/client/widgets/basics/menu.js @@ -34,7 +34,7 @@ class Menu extends MenuBase { layout: {type: 'string', value: 'circular', choices: ['circular', 'horizontal', 'vertical', 'grid'], help: [ 'Defines whether the menu\'s layout should be rendered in a circle or in a box' ]}, - gridTemplate: {type: 'string|number', value: '', help:'If `layout` is `grid`, can be either a number of columns of a value css grid-template definition.'}, + gridTemplate: {type: 'string|number', value: '', help:'If `layout` is `grid`, can be either a number of columns or a valid value for the css property "grid-template".'}, }, class_specific: { toggle: {type: 'boolean', value: false, help: 'Set to `true` to make the menu stay opened after mouse/touch release'}, diff --git a/src/client/widgets/basics/switch.js b/src/client/widgets/basics/switch.js index 34d93e1c..c0282c6d 100644 --- a/src/client/widgets/basics/switch.js +++ b/src/client/widgets/basics/switch.js @@ -18,7 +18,7 @@ class Switch extends MenuBase { _separator_switch_style: 'Switch style', colorTextOn: {type: 'string', value: 'auto', help: 'Defines the widget\'s text color when active.'}, layout: {type: 'string', value: 'vertical', choices: ['vertical', 'horizontal', 'grid'], help:'Defines how items should be laid out'}, - gridTemplate: {type: 'string|number', value: '', help:'If `layout` is `grid`, can be either a number of columns of a value css grid-template definition.'}, + gridTemplate: {type: 'string|number', value: '', help:'If `layout` is `grid`, can be either a number of columns or a valid value for the css property "grid-template".'}, }, class_specific: { values: {type: 'array|object', value: {'Value 1':1,'Value 2':2}, help: [