@utrecht/component-library-css 3.0.1-alpha.37 → 3.0.1-alpha.39

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/dist/html.css CHANGED
@@ -1591,6 +1591,28 @@ however browsers don't seem to have implemented great looking supixel tweening y
1591
1591
  .utrecht-html input[type=time i],
1592
1592
  .utrecht-html input[type=url i],
1593
1593
  .utrecht-html input[type=week i] {
1594
+ /* The average character inline-size is an approximation, with a default that works for Dutch text.
1595
+ * The average might need to be configured specifically, for other scripts (CJK characters)
1596
+ * and very wide or very narrow fonts.
1597
+ * For monospace fonts it can be set to `1ch`.
1598
+ */
1599
+ --_utrecht-textbox-value-char: 0.667em + 0.334ch;
1600
+ /* Because this element uses `border-box` box-sizing, we need to manually add up the
1601
+ * border width, padding width and the content width.
1602
+ *
1603
+ * Browsers and browser addons can add buttons inside the content box, for example
1604
+ * for autocomplete. To avoid overlap between the UI and the text, we reserve
1605
+ * some additional pixels to make space. We use 44px in accordance with the WCAG target size.
1606
+ *
1607
+ * When you are certain an element has no such UI, you can set the `autocomplete-ui-size` to `0px` (not to `0`).
1608
+ */
1609
+ --_utrecht-textbox-max-inline-size: calc(
1610
+ calc(var(--utrecht-textbox-value-max-length) * var(--_utrecht-textbox-value-char)) +
1611
+ var(--utrecht-textbox-padding-inline-end, var(--utrecht-form-control-padding-inline-end, 0)) +
1612
+ var(--utrecht-textbox-padding-inline-start, var(--utrecht-form-control-padding-inline-start, 0)) +
1613
+ var(--utrecht-textbox-border-width, var(--utrecht-form-control-border-width, 0)) +
1614
+ var(--utrecht-textbox-autocomplete-ui-size, 44px)
1615
+ );
1594
1616
  background-color: var(--utrecht-textbox-background-color, var(--utrecht-form-control-background-color));
1595
1617
  block-size: initial; /* harden */
1596
1618
  border-width: var(--utrecht-textbox-border-width, var(--utrecht-form-control-border-width));
@@ -1607,7 +1629,7 @@ however browsers don't seem to have implemented great looking supixel tweening y
1607
1629
  line-height: var(--utrecht-textbox-line-height, var(--utrecht-form-control-line-height, initial));
1608
1630
  min-block-size: var(--utrecht-pointer-target-min-size, 44px);
1609
1631
  min-inline-size: var(--utrecht-pointer-target-min-size, 44px);
1610
- max-inline-size: var(--utrecht-textbox-max-inline-size, var(--utrecht-form-control-max-inline-size));
1632
+ max-inline-size: min(var(--_utrecht-textbox-max-inline-size, 100%), var(--utrecht-textbox-max-inline-size, var(--utrecht-form-control-max-inline-size)));
1611
1633
  padding-block-end: var(--utrecht-textbox-padding-block-end, var(--utrecht-form-control-padding-block-end, 0));
1612
1634
  padding-block-start: var(--utrecht-textbox-padding-block-start, var(--utrecht-form-control-padding-block-start, 0));
1613
1635
  padding-inline-end: var(--utrecht-textbox-padding-inline-end, var(--utrecht-form-control-padding-inline-end, initial));
package/dist/index.css CHANGED
@@ -6465,6 +6465,28 @@ however browsers don't seem to have implemented great looking supixel tweening y
6465
6465
  * https://github.com/hudochenkov/stylelint-order/pull/162 */
6466
6466
  /* stylelint-disable order/properties-alphabetical-order */
6467
6467
  .utrecht-textbox {
6468
+ /* The average character inline-size is an approximation, with a default that works for Dutch text.
6469
+ * The average might need to be configured specifically, for other scripts (CJK characters)
6470
+ * and very wide or very narrow fonts.
6471
+ * For monospace fonts it can be set to `1ch`.
6472
+ */
6473
+ --_utrecht-textbox-value-char: 0.667em + 0.334ch;
6474
+ /* Because this element uses `border-box` box-sizing, we need to manually add up the
6475
+ * border width, padding width and the content width.
6476
+ *
6477
+ * Browsers and browser addons can add buttons inside the content box, for example
6478
+ * for autocomplete. To avoid overlap between the UI and the text, we reserve
6479
+ * some additional pixels to make space. We use 44px in accordance with the WCAG target size.
6480
+ *
6481
+ * When you are certain an element has no such UI, you can set the `autocomplete-ui-size` to `0px` (not to `0`).
6482
+ */
6483
+ --_utrecht-textbox-max-inline-size: calc(
6484
+ calc(var(--utrecht-textbox-value-max-length) * var(--_utrecht-textbox-value-char)) +
6485
+ var(--utrecht-textbox-padding-inline-end, var(--utrecht-form-control-padding-inline-end, 0)) +
6486
+ var(--utrecht-textbox-padding-inline-start, var(--utrecht-form-control-padding-inline-start, 0)) +
6487
+ var(--utrecht-textbox-border-width, var(--utrecht-form-control-border-width, 0)) +
6488
+ var(--utrecht-textbox-autocomplete-ui-size, 44px)
6489
+ );
6468
6490
  background-color: var(--utrecht-textbox-background-color, var(--utrecht-form-control-background-color));
6469
6491
  block-size: initial; /* harden */
6470
6492
  border-width: var(--utrecht-textbox-border-width, var(--utrecht-form-control-border-width));
@@ -6481,7 +6503,7 @@ however browsers don't seem to have implemented great looking supixel tweening y
6481
6503
  line-height: var(--utrecht-textbox-line-height, var(--utrecht-form-control-line-height, initial));
6482
6504
  min-block-size: var(--utrecht-pointer-target-min-size, 44px);
6483
6505
  min-inline-size: var(--utrecht-pointer-target-min-size, 44px);
6484
- max-inline-size: var(--utrecht-textbox-max-inline-size, var(--utrecht-form-control-max-inline-size));
6506
+ max-inline-size: min(var(--_utrecht-textbox-max-inline-size, 100%), var(--utrecht-textbox-max-inline-size, var(--utrecht-form-control-max-inline-size)));
6485
6507
  padding-block-end: var(--utrecht-textbox-padding-block-end, var(--utrecht-form-control-padding-block-end, 0));
6486
6508
  padding-block-start: var(--utrecht-textbox-padding-block-start, var(--utrecht-form-control-padding-block-start, 0));
6487
6509
  padding-inline-end: var(--utrecht-textbox-padding-inline-end, var(--utrecht-form-control-padding-inline-end, initial));
@@ -6552,6 +6574,53 @@ however browsers don't seem to have implemented great looking supixel tweening y
6552
6574
  font-variant-numeric: slashed-zero;
6553
6575
  }
6554
6576
 
6577
+ .utrecht-textbox--postal-code-nl-size {
6578
+ /* Dutch postal code: 4 numbers, 1 space and 2 letters */
6579
+ --utrecht-textbox-value-max-length: 7;
6580
+ }
6581
+
6582
+ .utrecht-textbox--house-number-size {
6583
+ /* Dutch house number is 99999 at most: 5 numbers */
6584
+ --utrecht-textbox-value-max-length: 5;
6585
+ }
6586
+
6587
+ .utrecht-textbox--house-letter-size {
6588
+ /* Dutch house letter is 1 letter */
6589
+ --utrecht-textbox-value-max-length: 1;
6590
+ }
6591
+
6592
+ .utrecht-textbox--house-addition-size {
6593
+ /* Dutch house addition is optional, between 1 and 4 alphanumeric characters */
6594
+ --utrecht-textbox-value-max-length: 4;
6595
+ }
6596
+
6597
+ .utrecht-textbox--voorvoegsel-size {
6598
+ /* "Tabel 36 Voorvoegselstabel" by "Rijksdienst voor Identiteitsgegevens" has a list
6599
+ * of all allowed values. The longest value is 10 characters.
6600
+ * The class name is in Dutch because it is a Dutch concept. */
6601
+ --utrecht-textbox-value-max-length: 10;
6602
+ }
6603
+
6604
+ .utrecht-textbox--tel-size {
6605
+ /* International telephone number standard E.164 allows 15 numbers, with optional space for 4 spaces */
6606
+ --utrecht-textbox-value-max-length: 19;
6607
+ }
6608
+
6609
+ .utrecht-textbox--tel-nl-size {
6610
+ /* Dutch telephone number: 10 number, typically with at most 3 spaces */
6611
+ --utrecht-textbox-value-max-length: 13;
6612
+ }
6613
+
6614
+ .utrecht-textbox--iban-size {
6615
+ /* Maximum IBAN: 33 characters, plus 8 spaces (one space after every 4 characters) */
6616
+ --utrecht-textbox-value-max-length: 41;
6617
+ }
6618
+
6619
+ .utrecht-textbox--iban-nl-size {
6620
+ /* Dutch IBAN: 18 characters, plus 4 spaces (one space after every 4 characters) */
6621
+ --utrecht-textbox-value-max-length: 22;
6622
+ }
6623
+
6555
6624
  /**
6556
6625
  * This class name is experimental.
6557
6626
  */
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.0.1-alpha.37",
2
+ "version": "3.0.1-alpha.39",
3
3
  "author": "Community for NL Design System",
4
4
  "description": "Component library bundle for the Municipality of Utrecht based on the NL Design System architecture",
5
5
  "license": "EUPL-1.2",