@ulu/frontend 0.1.0-beta.2 → 0.1.0-beta.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ ## Version 0.1.0-beta.3
4
+
5
+ - scss/components/tabs - Add breakpoint to vertical tabs (to go to horizontal)
6
+
3
7
  ## Version 0.1.0-beta.2
4
8
 
5
9
  - scss
@@ -4638,46 +4638,46 @@
4638
4638
  </tfoot>
4639
4639
  </table>
4640
4640
  <h2 class="h2">Complex Table</h2>
4641
- <table class="data-table" id="dt-1">
4641
+ <table class="data-table" id="dt-18">
4642
4642
  <caption>
4643
4643
  This Is The Table's Caption
4644
4644
  </caption>
4645
4645
  <thead>
4646
4646
  <tr>
4647
- <th id="dt-1-type" rowspan="2">Type</th>
4648
- <th id="dt-1-group" colspan="2">Group</th>
4649
- <th id="dt-1-details" colspan="2">Details</th>
4650
- <th id="dt-1-id" rowspan="2">Id</th>
4647
+ <th id="dt-18-type" rowspan="2">Type</th>
4648
+ <th id="dt-18-group" colspan="2">Group</th>
4649
+ <th id="dt-18-details" colspan="2">Details</th>
4650
+ <th id="dt-18-id" rowspan="2">Id</th>
4651
4651
  </tr>
4652
4652
  <tr>
4653
- <th headers="dt-1-group" id="dt-1-primary">Primary</th>
4654
- <th headers="dt-1-group" id="dt-1-secondary">Secondary</th>
4655
- <th headers="dt-1-details" id="dt-1-before">Before Task</th>
4656
- <th headers="dt-1-details" id="dt-1-after">After Task</th>
4653
+ <th headers="dt-18-group" id="dt-18-primary">Primary</th>
4654
+ <th headers="dt-18-group" id="dt-18-secondary">Secondary</th>
4655
+ <th headers="dt-18-details" id="dt-18-before">Before Task</th>
4656
+ <th headers="dt-18-details" id="dt-18-after">After Task</th>
4657
4657
  </tr>
4658
4658
  </thead>
4659
4659
  <tbody>
4660
4660
  <tr>
4661
- <th rowspan="3" headers="dt-1-type dt-1-r1" id="dt-1-r1">Default</th>
4662
- <td headers="dt-1-group dt-1-primary dt-1-r1">Lorem Ipsum</td>
4663
- <td headers="dt-1-group dt-1-secondary dt-1-r1">Lorem Ipsum</td>
4664
- <td headers="dt-1-details dt-1-before dt-1-r1">Lorem Ipsum</td>
4665
- <td headers="dt-1-details dt-1-after dt-1-r1">Lorem Ipsum</td>
4666
- <td headers="dt-1-id">OL-53-GHSLE</td>
4661
+ <th rowspan="3" headers="dt-18-type dt-18-r1" id="dt-18-r1">Default</th>
4662
+ <td headers="dt-18-group dt-18-primary dt-18-r1">Lorem Ipsum</td>
4663
+ <td headers="dt-18-group dt-18-secondary dt-18-r1">Lorem Ipsum</td>
4664
+ <td headers="dt-18-details dt-18-before dt-18-r1">Lorem Ipsum</td>
4665
+ <td headers="dt-18-details dt-18-after dt-18-r1">Lorem Ipsum</td>
4666
+ <td headers="dt-18-id">OL-53-GHSLE</td>
4667
4667
  </tr>
4668
4668
  <tr>
4669
- <td headers="dt-1-group dt-1-primary dt-1-r1">Lorem Ipsum</td>
4670
- <td headers="dt-1-group dt-1-secondary dt-1-r1">Lorem Ipsum</td>
4671
- <td headers="dt-1-details dt-1-before dt-1-r1">Lorem Ipsum</td>
4672
- <td headers="dt-1-details dt-1-after dt-1-r1">Lorem Ipsum</td>
4673
- <td headers="dt-1-id">OL-53-GHSLE</td>
4669
+ <td headers="dt-18-group dt-18-primary dt-18-r1">Lorem Ipsum</td>
4670
+ <td headers="dt-18-group dt-18-secondary dt-18-r1">Lorem Ipsum</td>
4671
+ <td headers="dt-18-details dt-18-before dt-18-r1">Lorem Ipsum</td>
4672
+ <td headers="dt-18-details dt-18-after dt-18-r1">Lorem Ipsum</td>
4673
+ <td headers="dt-18-id">OL-53-GHSLE</td>
4674
4674
  </tr>
4675
4675
  <tr>
4676
- <td headers="dt-1-group dt-1-primary dt-1-r1">Lorem Ipsum</td>
4677
- <td headers="dt-1-group dt-1-secondary dt-1-r1">Lorem Ipsum</td>
4678
- <td headers="dt-1-details dt-1-before dt-1-r1">Lorem Ipsum</td>
4679
- <td headers="dt-1-details dt-1-after dt-1-r1">Lorem Ipsum</td>
4680
- <td headers="dt-1-id">OL-53-GHSLE</td>
4676
+ <td headers="dt-18-group dt-18-primary dt-18-r1">Lorem Ipsum</td>
4677
+ <td headers="dt-18-group dt-18-secondary dt-18-r1">Lorem Ipsum</td>
4678
+ <td headers="dt-18-details dt-18-before dt-18-r1">Lorem Ipsum</td>
4679
+ <td headers="dt-18-details dt-18-after dt-18-r1">Lorem Ipsum</td>
4680
+ <td headers="dt-18-id">OL-53-GHSLE</td>
4681
4681
  </tr>
4682
4682
  </tbody>
4683
4683
  </table>
@@ -4609,6 +4609,12 @@
4609
4609
  <button type="button" id="tabs-1-3">
4610
4610
  Tab Label 3
4611
4611
  </button>
4612
+ <button type="button" id="tabs-1-4">
4613
+ Tab Label 4
4614
+ </button>
4615
+ <button type="button" id="tabs-1-5">
4616
+ Tab Label 5
4617
+ </button>
4612
4618
  </div>
4613
4619
  <div class="tabs__tabpanel" aria-labelledby="tabs-1-1">
4614
4620
  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam commodo felis nisi, nec pretium justo varius sit amet. Vestibulum vitae quam in velit scelerisque tincidunt et vitae mauris. Fusce aliquet, ipsum sit amet lacinia euismod, est risus rhoncus ligula, eget egestas urna ligula nec enim. Fusce vulputate ornare ligula ut tempus. Sed accumsan orci sed turpis iaculis, at aliquam nibh rhoncus. Maecenas porta lorem a sem tincidunt, sed tristique ex laoreet. Nullam accumsan metus at lobortis interdum. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam sagittis sem erat, quis fermentum lectus ultrices quis.</p>
@@ -4624,6 +4630,12 @@
4624
4630
  <div class="tabs__tabpanel" aria-labelledby="tabs-1-3">
4625
4631
  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam commodo felis nisi, nec pretium justo varius sit amet. Vestibulum vitae quam in velit scelerisque tincidunt et vitae mauris. Fusce aliquet, ipsum sit amet lacinia euismod, est risus rhoncus ligula, eget egestas urna ligula nec enim. Fusce vulputate ornare ligula ut tempus. Sed accumsan orci sed turpis iaculis, at aliquam nibh rhoncus. Maecenas porta lorem a sem tincidunt, sed tristique ex laoreet. Nullam accumsan metus at lobortis interdum. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam sagittis sem erat, quis fermentum lectus ultrices quis.</p>
4626
4632
  </div>
4633
+ <div class="tabs__tabpanel" aria-labelledby="tabs-1-4">
4634
+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam commodo felis nisi, nec pretium justo varius sit amet. Vestibulum vitae quam in velit scelerisque tincidunt et vitae mauris. Fusce aliquet, ipsum sit amet lacinia euismod, est risus rhoncus ligula, eget egestas urna ligula nec enim. Fusce vulputate ornare ligula ut tempus. Sed accumsan orci sed turpis iaculis, at aliquam nibh rhoncus. Maecenas porta lorem a sem tincidunt, sed tristique ex laoreet. Nullam accumsan metus at lobortis interdum. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam sagittis sem erat, quis fermentum lectus ultrices quis.</p>
4635
+ </div>
4636
+ <div class="tabs__tabpanel" aria-labelledby="tabs-1-5">
4637
+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam commodo felis nisi, nec pretium justo varius sit amet. Vestibulum vitae quam in velit scelerisque tincidunt et vitae mauris. Fusce aliquet, ipsum sit amet lacinia euismod, est risus rhoncus ligula, eget egestas urna ligula nec enim. Fusce vulputate ornare ligula ut tempus. Sed accumsan orci sed turpis iaculis, at aliquam nibh rhoncus. Maecenas porta lorem a sem tincidunt, sed tristique ex laoreet. Nullam accumsan metus at lobortis interdum. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam sagittis sem erat, quis fermentum lectus ultrices quis.</p>
4638
+ </div>
4627
4639
  </div>
4628
4640
  <h2 class="h2">Full Width</h2>
4629
4641
  <div class="tabs tabs--full-width">
@@ -4594,7 +4594,7 @@
4594
4594
 
4595
4595
  <hr class="rule rule--light rule--margin-large">
4596
4596
  <div class="wysiwyg">
4597
- <p>Guide Landing page</p>
4597
+ <p>Guide Landing page (unused/not output)</p>
4598
4598
 
4599
4599
  </div>
4600
4600
  </div>
@@ -4596,6 +4596,9 @@
4596
4596
 
4597
4597
  <li><a href="#printing">Printing</a>
4598
4598
  </li>
4599
+
4600
+ <li><a href="#javascript">Javascript</a>
4601
+ </li>
4599
4602
  </ol>
4600
4603
  </div>
4601
4604
  </div>
@@ -4637,6 +4640,8 @@
4637
4640
  <p>For in-depth details and examples, please refer to the scss core breakpoint module and the javascript ui breakpoints module.</p>
4638
4641
  <h2 id="printing" tabindex="-1">Printing</h2>
4639
4642
  <p>While most components can be printed directly, certain components, such as those with interactive or collapsible elements, may require JavaScript assistance to ensure optimal print output. The JavaScript modules provided offer the necessary mechanisms for managing print behavior in these specific cases.</p>
4643
+ <h2 id="javascript" tabindex="-1">Javascript</h2>
4644
+ <p>Javascript modules are mostly used for static/traditional sites, a Vue specific library is in development that offers the same functionality for Vue apps.</p>
4640
4645
 
4641
4646
  </div>
4642
4647
  </div>
@@ -4658,6 +4658,7 @@
4658
4658
  <span class="pjs-token pjs-string">"vertical-divider-width"</span> <span class="pjs-token pjs-punctuation">:</span> 0px<span class="pjs-token pjs-punctuation">,</span>
4659
4659
  <span class="pjs-token pjs-string">"vertical-tab-gap"</span> <span class="pjs-token pjs-punctuation">:</span> 0.75em<span class="pjs-token pjs-punctuation">,</span>
4660
4660
  <span class="pjs-token pjs-string">"vertical-indicator-left"</span> <span class="pjs-token pjs-punctuation">:</span> <span class="pjs-token pjs-boolean">true</span><span class="pjs-token pjs-punctuation">,</span>
4661
+ <span class="pjs-token pjs-string">"vertical-breakpoint"</span> <span class="pjs-token pjs-punctuation">:</span> <span class="pjs-token pjs-boolean">true</span><span class="pjs-token pjs-punctuation">,</span>
4661
4662
  <span class="pjs-token pjs-string">"horizontal-tab-wrap"</span> <span class="pjs-token pjs-punctuation">:</span> <span class="pjs-token pjs-boolean">false</span>
4662
4663
  <span class="pjs-token pjs-punctuation">)</span><span class="pjs-token pjs-punctuation">;</span></code></pre>
4663
4664
  <details>
@@ -4666,8 +4667,8 @@
4666
4667
  <li><strong>File:</strong> _tabs.scss</li>
4667
4668
  <li><strong>Group:</strong> tabs</li>
4668
4669
  <li><strong>Type:</strong> variable</li>
4669
- <li><strong>Lines (comments):</strong> 28-50</li>
4670
- <li><strong>Lines (code):</strong> 52-74</li>
4670
+ <li><strong>Lines (comments):</strong> 32-55</li>
4671
+ <li><strong>Lines (code):</strong> 57-80</li>
4671
4672
  </ul>
4672
4673
  </details>
4673
4674
  <h4 id="map-properties" tabindex="-1">Map Properties</h4>
@@ -4802,6 +4803,12 @@
4802
4803
  <td style="text-align:left">The indicator for selected tab should be on the left when vertical (false will be on right/inside)</td>
4803
4804
  </tr>
4804
4805
  <tr>
4806
+ <td style="text-align:left">vertical-breakpoint</td>
4807
+ <td style="text-align:left">Boolean</td>
4808
+ <td style="text-align:left">true</td>
4809
+ <td style="text-align:left">Set the breakpoint when the vertical tabs should switch to horizontal (defaults to breakpoint 'default')</td>
4810
+ </tr>
4811
+ <tr>
4805
4812
  <td style="text-align:left">horizontal-tab-wrap</td>
4806
4813
  <td style="text-align:left">Boolean</td>
4807
4814
  <td style="text-align:left">false</td>
@@ -4823,8 +4830,8 @@
4823
4830
  <li><strong>File:</strong> _tabs.scss</li>
4824
4831
  <li><strong>Group:</strong> tabs</li>
4825
4832
  <li><strong>Type:</strong> mixin</li>
4826
- <li><strong>Lines (comments):</strong> 76-79</li>
4827
- <li><strong>Lines (code):</strong> 81-83</li>
4833
+ <li><strong>Lines (comments):</strong> 82-85</li>
4834
+ <li><strong>Lines (code):</strong> 87-89</li>
4828
4835
  </ul>
4829
4836
  </details>
4830
4837
  <h4 id="examples" tabindex="-1">Examples</h4>
@@ -4863,8 +4870,8 @@
4863
4870
  <li><strong>File:</strong> _tabs.scss</li>
4864
4871
  <li><strong>Group:</strong> tabs</li>
4865
4872
  <li><strong>Type:</strong> mixin</li>
4866
- <li><strong>Lines (comments):</strong> 95-97</li>
4867
- <li><strong>Lines (code):</strong> 99-255</li>
4873
+ <li><strong>Lines (comments):</strong> 101-103</li>
4874
+ <li><strong>Lines (code):</strong> 105-244</li>
4868
4875
  </ul>
4869
4876
  </details>
4870
4877
  <h4 id="examples-1" tabindex="-1">Examples</h4>
@@ -4887,8 +4894,8 @@
4887
4894
  <li><strong>File:</strong> _tabs.scss</li>
4888
4895
  <li><strong>Group:</strong> tabs</li>
4889
4896
  <li><strong>Type:</strong> function</li>
4890
- <li><strong>Lines (comments):</strong> 85-88</li>
4891
- <li><strong>Lines (code):</strong> 90-93</li>
4897
+ <li><strong>Lines (comments):</strong> 91-94</li>
4898
+ <li><strong>Lines (code):</strong> 96-99</li>
4892
4899
  </ul>
4893
4900
  </details>
4894
4901
  <h4 id="examples-2" tabindex="-1">Examples</h4>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ulu/frontend",
3
- "version": "0.1.0-beta.2",
3
+ "version": "0.1.0-beta.3",
4
4
  "description": "Modular Sass Theming Library",
5
5
  "browser": "js/index.js",
6
6
  "main": "index.js",
@@ -22,6 +22,10 @@ $-fallbacks: (
22
22
  "tab-font-weight" : (
23
23
  "function" : meta.get-function("get", false, "typography"),
24
24
  "property" : "font-weight-semibold"
25
+ ),
26
+ "vertical-breakpoint" : (
27
+ "function" : meta.get-function("get", false, "breakpoint"),
28
+ "property" : "default"
25
29
  )
26
30
  );
27
31
 
@@ -47,6 +51,7 @@ $-fallbacks: (
47
51
  /// @prop {Dimension} vertical-divider-width [0px] Divider between tabs and panels when vertical
48
52
  /// @prop {Dimension} vertical-tab-gap [0.75em] The gap between tabs when vertical
49
53
  /// @prop {Boolean} vertical-indicator-left [true] The indicator for selected tab should be on the left when vertical (false will be on right/inside)
54
+ /// @prop {Boolean} vertical-breakpoint [true] Set the breakpoint when the vertical tabs should switch to horizontal (defaults to breakpoint 'default')
50
55
  /// @prop {Boolean} horizontal-tab-wrap [false] Set to true to allow line wrapping when the tabs are in horizontal orientation, vertical is always allowed to wrap
51
56
 
52
57
  $config: (
@@ -70,6 +75,7 @@ $config: (
70
75
  "vertical-divider-width" : 0px,
71
76
  "vertical-tab-gap" : 0.75em,
72
77
  "vertical-indicator-left" : true,
78
+ "vertical-breakpoint" : true,
73
79
  "horizontal-tab-wrap" : false
74
80
  ) !default;
75
81
 
@@ -110,20 +116,30 @@ $config: (
110
116
  display: flex;
111
117
  gap: get("tab-gap");
112
118
  overflow-x: auto;
119
+ border-bottom: get("tablist-divider");
120
+ border-bottom-width: get("tablist-divider-width");
113
121
  }
114
122
  [role="tab"] {
115
123
  display: block;
116
124
  position: relative;
117
125
  cursor: pointer;
126
+ text-align: center;
118
127
  padding: get("tab-padding");
119
128
  color: color.get(get("tab-color"));
120
129
  font-weight: get("tab-font-weight");
130
+ @if (not get("horizontal-tab-wrap")) {
131
+ white-space: nowrap;
132
+ }
121
133
  // Indicator
122
134
  &::after {
123
135
  content: "";
124
136
  position: absolute;
125
137
  background-color: color.get(get("indicator-color"));
126
138
  opacity: 0;
139
+ bottom: 0;
140
+ left: 0;
141
+ right: 0;
142
+ height: get("indicator-size");
127
143
  }
128
144
  &:hover {
129
145
  color: color.get(get("tab-color-hover"));
@@ -131,35 +147,11 @@ $config: (
131
147
  &[aria-selected="true"] {
132
148
  color: color.get(get("tab-color-selected"));
133
149
  background-color: color.get(get("tab-background-color-selected"));
134
-
135
- }
136
- }
137
-
138
- // Styling for horizontal tabs
139
- &:not(#{ $prefix }--vertical) {
140
- [role="tablist"] {
141
- border-bottom: get("tablist-divider");
142
- border-bottom-width: get("tablist-divider-width");
143
- }
144
- [role="tab"] {
145
- text-align: center;
146
- @if (not get("horizontal-tab-wrap")) {
147
- white-space: nowrap;
148
- }
149
150
  &::after {
150
- bottom: 0;
151
- left: 0;
152
- right: 0;
153
- height: get("indicator-size");
154
- }
155
- &[aria-selected="true"] {
156
- &::after {
157
- opacity: 1;
158
- }
151
+ opacity: 1;
159
152
  }
160
153
  }
161
154
  }
162
-
163
155
  [role="tabpanel"] {
164
156
  position: relative;
165
157
  z-index: 1;
@@ -182,36 +174,33 @@ $config: (
182
174
  }
183
175
  }
184
176
 
185
- #{ $prefix }--vertical {
186
- display: grid;
187
- grid-template-columns: get("vertical-tablist-width") auto;
188
- [role="tablist"] {
189
- flex-direction: column;
190
- gap: get("vertical-tab-gap");
191
- border-right: get("tablist-divider");
192
- border-right-width: get("vertical-divider-width");
193
- grid-column: 1;
194
- }
195
- [role="tab"] {
196
- padding: get("vertical-tab-padding");
197
- &::after {
198
- @if (get("vertical-indicator-left")) {
199
- left: 0;
200
- } @else {
201
- right: 0;
202
- }
203
- bottom: 0;
204
- top: 0;
205
- width: get("indicator-size");
177
+ @include breakpoint.min(get("vertical-breakpoint")) {
178
+ #{ $prefix }--vertical {
179
+ display: grid;
180
+ grid-template-columns: get("vertical-tablist-width") auto;
181
+ [role="tablist"] {
182
+ flex-direction: column;
183
+ gap: get("vertical-tab-gap");
184
+ border-right: get("tablist-divider");
185
+ border-right-width: get("vertical-divider-width");
186
+ grid-column: 1;
206
187
  }
207
- &[aria-selected="true"] {
188
+ [role="tab"] {
189
+ padding: get("vertical-tab-padding");
190
+ white-space: normal;
191
+ text-align: left;
208
192
  &::after {
209
- opacity: 1;
193
+ left: if(get("vertical-indicator-left"), 0, auto);
194
+ right: if(not get("vertical-indicator-left"), 0, auto);;
195
+ bottom: 0;
196
+ top: 0;
197
+ width: get("indicator-size");
198
+ height: auto;
210
199
  }
211
200
  }
212
- }
213
- [role="tabpanel"] {
214
- grid-column: 2; // needed for equalHeights in vertical
201
+ [role="tabpanel"] {
202
+ grid-column: 2; // needed for equalHeights in vertical
203
+ }
215
204
  }
216
205
  }
217
206