From 363b7ecf9ed0a0e8813177a865ba5e86119e77b6 Mon Sep 17 00:00:00 2001 From: bellord13 Date: Mon, 30 Jun 2025 19:38:33 +0300 Subject: [PATCH] fix --- assets/toolkit/toolkit.css | 14 +++++++-- templates/form/field/material/input/edit.php | 5 +++- tests/cheatSheet/button/buttons-line-item.php | 13 ++++++++ tests/cheatSheet/button/buttons-line.php | 30 +++++++++++++++++++ tests/cheatSheet/button/buttons.php | 2 +- tests/cheatsheetTest.php | 1 + 6 files changed, 61 insertions(+), 4 deletions(-) create mode 100644 tests/cheatSheet/button/buttons-line-item.php create mode 100644 tests/cheatSheet/button/buttons-line.php diff --git a/assets/toolkit/toolkit.css b/assets/toolkit/toolkit.css index 1560037..eb19b21 100644 --- a/assets/toolkit/toolkit.css +++ b/assets/toolkit/toolkit.css @@ -736,7 +736,8 @@ --kit-color-button-content: var(--kit-color-button-content-default); --kit-color-button-material: var(--kit-color-button-material-default); - font-family: var(--kit-font-family); + font-size: 0.9em; + /*font-family: var(--kit-font-family);*/ display: inline-flex; flex-direction: row; align-items: center; @@ -810,7 +811,6 @@ --line-clamp-height: 1em; white-space: normal; text-transform: uppercase; - font-size: 0.9em; } .kit-button.kit-disabled, .kit-button:disabled, @@ -844,6 +844,16 @@ display: block; width: 100%; } +.kit-button.kit-button--line { + font-size: 0.9em; + align-items: baseline; + height: 1.15em; + padding: 0.125em 0.75em 0; + line-height: 1em; +} +.kit-button.kit-button--line .kit-button__icon { + height: 0.8em; +} .kit-button.kit-button--radius, .kit-button.kit-button--radius:before, .kit-button.kit-button--radius .kit-button__border { diff --git a/templates/form/field/material/input/edit.php b/templates/form/field/material/input/edit.php index d39f215..d141572 100644 --- a/templates/form/field/material/input/edit.php +++ b/templates/form/field/material/input/edit.php @@ -9,6 +9,7 @@ use Wt\Core\Form\Field\DefaultField; use Wt\Core\Templater\Shell; use Wt\Core\Templater\Tools as TemplaterTools; use Wt\Core\Tools; +use Wt\Core\Form\Interfaces; $bLabel = mb_strlen($field->getLabel()); $labelAttrs = []; @@ -62,7 +63,9 @@ if($isDatepicker) { ?>" value="getValue())?>" maxlength="255" - placeholder="getPlaceholder()).''?>" + + placeholder="getPlaceholder())?>" + templater()->render('kit:button', [ + 'LABEL' => 'sit', + 'CLASS' => 'kit-button kit-button--primary kit-button--line ', +]);?> amet, consectetur adipisicing elit. +Aspernatur aut consequatur eveniet fugit hic, magnam maiores modi, placeat reprehenderit +rerum similique veritatis! templater()->render('kit:button', [ + 'LABEL' => 'Aliquam', + 'CLASS' => 'kit-button kit-button--primary kit-button--line ', + 'ICON' => service()->templater()->get('kit:svg/star'), +]);?> templater()->render('kit:button', [ + 'LABEL' => 'deleniti', + 'CLASS' => 'kit-button kit-button--primary kit-button--line ', +]);?> deleniti hic labore modi quaerat similique? \ No newline at end of file diff --git a/tests/cheatSheet/button/buttons-line.php b/tests/cheatSheet/button/buttons-line.php new file mode 100644 index 0000000..1373448 --- /dev/null +++ b/tests/cheatSheet/button/buttons-line.php @@ -0,0 +1,30 @@ +
+

24px

+

+ +

+

20px

+

+ +

+

16px

+

+ +

+

15px

+

+ +

+

14px

+

+ +

+

13px

+

+ +

+

11px

+

+ +

+
\ No newline at end of file diff --git a/tests/cheatSheet/button/buttons.php b/tests/cheatSheet/button/buttons.php index 2974fa9..f98d035 100644 --- a/tests/cheatSheet/button/buttons.php +++ b/tests/cheatSheet/button/buttons.php @@ -6,7 +6,7 @@
material
material radius
material round
- '; service()->templater()->render('kit:button', [ 'LABEL' => 'default', diff --git a/tests/cheatsheetTest.php b/tests/cheatsheetTest.php index f979bb4..ff63072 100644 --- a/tests/cheatsheetTest.php +++ b/tests/cheatsheetTest.php @@ -57,6 +57,7 @@ function include_section ($name, $filePath){ include_section('Textarea fields',__DIR__ . '/cheatSheet/field/textarea.php'); include_section('File fields',__DIR__ . '/cheatSheet/field/file.php'); include_section('Buttons',__DIR__ . '/cheatSheet/button/buttons.php'); + include_section('Buttons Line',__DIR__ . '/cheatSheet/button/buttons-line.php'); include_section('Form',__DIR__ . '/cheatSheet/form.php'); ?>