testio-tailwind 3.23.0 → 3.24.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.
@@ -30,6 +30,9 @@ This document serves as a comprehensive reference for AI Agents to utilize the T
30
30
  - 🔧 **Splitview Improvements**: Fixed splitview details close button and responsive behavior
31
31
  - 🏷️ **Image Tags**: Added support for image tagging in components
32
32
  - 🔧 **HAML Conversion**: Tables documentation files converted to HAML format
33
+ - ✨ **Form Group Enhancements**: Added vertical form groups, form addons with text/icons, and form card component
34
+ - 📋 **Form Hints**: Expanded form hints with collapsable help text and learn more triggers
35
+ - 🌐 **Multi-language Support**: Added optional-non-en attribute for internationalized optional labels
33
36
 
34
37
  ---
35
38
 
@@ -696,6 +699,8 @@ Centered layout with max-width constraints for optimal readability on widescreen
696
699
  ## Form Components
697
700
 
698
701
  ### Form Group Structure
702
+
703
+ #### Horizontal Form Group (Default)
699
704
  ```html
700
705
  <div class="form-group">
701
706
  <label class="form-label">Email Address</label>
@@ -707,6 +712,40 @@ Centered layout with max-width constraints for optimal readability on widescreen
707
712
  <label class="form-label optional">Phone Number</label>
708
713
  <input type="tel" class="form-control">
709
714
  </div>
715
+
716
+ <!-- Optional field with custom translation -->
717
+ <div class="form-group">
718
+ <label class="form-label optional-non-en" data-optional-non-en="(freiwillig)">Phone Number</label>
719
+ <input type="tel" class="form-control">
720
+ </div>
721
+
722
+ <!-- Inverted (for dark backgrounds) -->
723
+ <div class="form-group inverted">
724
+ <label class="form-label">Email Address</label>
725
+ <input type="email" class="form-control" placeholder="Enter email">
726
+ </div>
727
+ ```
728
+
729
+ #### Vertical Form Group
730
+ Use vertical form groups in tight spaces and narrow containers where horizontal layout cannot fit:
731
+
732
+ ```html
733
+ <div class="form-group vertical">
734
+ <label class="form-label">Email Address</label>
735
+ <input type="email" class="form-control" placeholder="Enter email">
736
+ </div>
737
+
738
+ <!-- Optional field with custom translation -->
739
+ <div class="form-group vertical">
740
+ <label class="form-label optional-non-en" data-optional-non-en="(freiwillig)">Phone Number</label>
741
+ <input type="tel" class="form-control">
742
+ </div>
743
+
744
+ <!-- Inverted (for dark backgrounds) -->
745
+ <div class="form-group vertical inverted">
746
+ <label class="form-label">Email Address</label>
747
+ <input type="email" class="form-control" placeholder="Enter email">
748
+ </div>
710
749
  ```
711
750
 
712
751
  ### Form Inputs
@@ -739,6 +778,29 @@ Centered layout with max-width constraints for optimal readability on widescreen
739
778
  <div class="form-hint error">Please enter a valid email</div>
740
779
  ```
741
780
 
781
+ #### Collapsable Form Hints
782
+ ```html
783
+ <!-- Collapsable form hint with learn more trigger -->
784
+ <div class="form-group">
785
+ <label class="form-label">Your Project</label>
786
+ <div class="col">
787
+ <input class="form-control" type="text" placeholder="Some delicious placeholder text">
788
+ <details class="form-hint-collapsable">
789
+ <summary>
790
+ <div class="form-hint">
791
+ <span>
792
+ This is a help text.
793
+ <span class="form-hint-trigger form-hint-collapsed-text">Learn more</span>
794
+ <span class="form-hint-trigger form-hint-expanded-text">Close</span>
795
+ </span>
796
+ </div>
797
+ </summary>
798
+ <div class="form-hint-collapsable-message">Good examples are "Java wrapper lib for our 5-endpoint REST API" or "Help integration Intercom into our web interface"</div>
799
+ </details>
800
+ </div>
801
+ </div>
802
+ ```
803
+
742
804
  ### Form Grid Layout
743
805
  ```html
744
806
  <!-- Standard form grid -->
@@ -993,10 +1055,62 @@ Centered layout with max-width constraints for optimal readability on widescreen
993
1055
 
994
1056
  ### Form with Addon
995
1057
  ```html
1058
+ <!-- Text addon (e.g., currency) -->
996
1059
  <div class="form-group with-addon">
997
1060
  <label class="form-label">Price</label>
998
1061
  <input type="number" class="form-control" placeholder="0.00">
999
- <div class="form-addon">USD</div>
1062
+ <div class="form-addon">
1063
+ <span class="text-label">EUR</span>
1064
+ </div>
1065
+ </div>
1066
+
1067
+ <!-- Icon addon (e.g., validation status) -->
1068
+ <div class="form-group with-addon">
1069
+ <label class="form-label">Email Address</label>
1070
+ <input type="email" class="form-control" placeholder="Enter email">
1071
+ <div class="form-addon">
1072
+ <span class="icon icon-check-circle-filled text-success"></span>
1073
+ </div>
1074
+ </div>
1075
+ ```
1076
+
1077
+ ### Form Card
1078
+ A card component containing a form with various input elements. Useful for collapsable form sections or multi-form layouts.
1079
+
1080
+ ```html
1081
+ <div class="form-card">
1082
+ <div class="form-card-heading">
1083
+ <div class="form-card-title">Form Card Title</div>
1084
+ <div class="form-card-actions">
1085
+ <button class="btn btn-square btn-sm btn-primary">
1086
+ <i class="icon icon-arrow-upward"></i>
1087
+ </button>
1088
+ <button class="btn btn-square btn-sm btn-primary">
1089
+ <i class="icon icon-arrow-downward"></i>
1090
+ </button>
1091
+ <button class="btn btn-square btn-sm btn-primary">
1092
+ <i class="icon icon-remove"></i>
1093
+ </button>
1094
+ </div>
1095
+ </div>
1096
+ <div class="form-grid">
1097
+ <div class="form-group">
1098
+ <label class="form-label">Input</label>
1099
+ <input class="form-control" type="text" placeholder="Enter text">
1100
+ </div>
1101
+ <div class="form-group">
1102
+ <label class="form-label">Textarea</label>
1103
+ <textarea class="form-control" rows="4" placeholder="Enter description"></textarea>
1104
+ </div>
1105
+ <div class="form-group form-select">
1106
+ <label class="form-label">Select</label>
1107
+ <select class="tom-select" placeholder="Please select">
1108
+ <option value=""></option>
1109
+ <option value="Option 1">Option 1</option>
1110
+ <option value="Option 2">Option 2</option>
1111
+ </select>
1112
+ </div>
1113
+ </div>
1000
1114
  </div>
1001
1115
  ```
1002
1116
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testio-tailwind",
3
- "version": "3.23.0",
3
+ "version": "3.24.0",
4
4
  "description": "Tailwind based design system for Test IO",
5
5
  "scripts": {
6
6
  "clean": "del dist --force",
@@ -2,6 +2,10 @@
2
2
  @apply relative grid grid-cols-1 md:grid-cols-1-3 md:gap-xs lg:gap-grid-gutter;
3
3
  }
4
4
 
5
+ .form-group.vertical {
6
+ @apply relative grid grid-cols-1 gap-0;
7
+ }
8
+
5
9
  .form-label {
6
10
  @apply text-label leading-tight;
7
11
 
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  tags: "forms"
3
- title: Forms
3
+ title: Form group
4
4
  ---
5
5
 
6
- %p.mb-heading Various form input fields showcasing different states including optional, disabled, and inverted styles.
6
+ %p.mb-heading Form groups are used to wrap labels and form controls in order to provide proper spacing and structure. They change into a vertical layout on smaller screens.
7
7
  .form-grid
8
8
  .form-group
9
9
  %label.form-label Input
@@ -0,0 +1,28 @@
1
+ ---
2
+ tags: "forms"
3
+ title: Form group vertical
4
+ ---
5
+
6
+ %p.mb-heading Form groups with vertical layout are used to wrap labels and form controls. Us them in tight spaces and narrow containers in which you can't afford the horizontal layout.
7
+ .form-grid
8
+ .form-group.vertical
9
+ %label.form-label Input
10
+ %input.form-control{type:'text', placeholder:"Some delicious placeholder text"}
11
+ .form-group.vertical
12
+ %label.form-label.optional Not required input
13
+ %input.form-control{type:'text', placeholder:"Some delicious placeholder text"}
14
+ .form-group.vertical
15
+ %label.form-label.optional-non-en{"data-optional-non-en": "(freiwillig)"} Not required input
16
+ %div
17
+ %input.form-control{type:'text', placeholder:"Some delicious placeholder text"}
18
+ .form-hint For most cases you can use the english optional label, but we also added support for any translation you might need. Just add the data-optional-non-en => t(optional)
19
+ .form-group.vertical
20
+ %label.form-label Input disabled
21
+ %input.form-control{type:'text', value:"Some delicious readonly value text", disabled:"true"}
22
+ .form-grid.bg-black.p-3.mt-md
23
+ .form-group.vertical.inverted
24
+ %label.form-label Input inverted
25
+ %input.form-control{type:'text', placeholder:"Some delicious placeholder text"}
26
+ .form-group.vertical.inverted
27
+ %label.form-label Input inverted disabled
28
+ %input.form-control{type:'text', value:"Some delicious readonly value text", disabled:"true"}