@utrecht/component-library-css 1.0.0-alpha.512 → 1.0.0-alpha.514

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.
Files changed (2) hide show
  1. package/dist/index.css +61 -16
  2. package/package.json +2 -2
package/dist/index.css CHANGED
@@ -2661,8 +2661,19 @@ ol.utrecht-breadcrumb__list {
2661
2661
  * @license EUPL-1.2
2662
2662
  * Copyright (c) 2021 Robbert Broersma
2663
2663
  */
2664
+ /**
2665
+ * @license EUPL-1.2
2666
+ * Copyright (c) 2021 Robbert Broersma
2667
+ */
2668
+ /**
2669
+ * @license EUPL-1.2
2670
+ * Copyright (c) 2021 Gemeente Utrecht
2671
+ * Copyright (c) 2021 Robbert Broersma
2672
+ */
2673
+ /* stylelint-disable-next-line block-no-empty */
2664
2674
  .utrecht-form-toggle {
2665
2675
  align-items: center;
2676
+ block-size: var(--utrecht-form-toggle-height, 2em);
2666
2677
  border-color: var(--utrecht-form-toggle-border-color, currentColor);
2667
2678
  border-radius: var(--utrecht-form-toggle-border-radius, 999rem);
2668
2679
  border-style: var(--utrecht-form-toggle-border-style, solid);
@@ -2670,7 +2681,7 @@ ol.utrecht-breadcrumb__list {
2670
2681
  color: var(--utrecht-form-toggle-color);
2671
2682
  cursor: var(--utrecht-action-activate-cursor);
2672
2683
  display: flex;
2673
- height: var(--utrecht-form-toggle-height, 2em);
2684
+ inline-size: var(--utrecht-form-toggle-width, 6em);
2674
2685
  padding-block-end: var(--utrecht-form-toggle-padding-block-end);
2675
2686
  padding-block-start: var(--utrecht-form-toggle-padding-block-start);
2676
2687
  padding-inline-end: var(--utrecht-form-toggle-padding-inline-end);
@@ -2678,13 +2689,34 @@ ol.utrecht-breadcrumb__list {
2678
2689
  position: relative;
2679
2690
  -webkit-user-select: none;
2680
2691
  user-select: none;
2681
- width: var(--utrecht-form-toggle-width, 6em);
2692
+ }
2693
+ @media screen and (-ms-high-contrast: active), screen and (forced-colors: active) {
2694
+ .utrecht-form-toggle {
2695
+ --utrecht-form-toggle-background-color: ButtonFace;
2696
+ --utrecht-form-toggle-border-color: buttonborder;
2697
+ --utrecht-form-toggle-border-width: 1px;
2698
+ --utrecht-form-toggle-border-radius: var(--utrecht-form-toggle-track-border-radius);
2699
+ --utrecht-form-toggle-thumb-background-color: ButtonText;
2700
+ --utrecht-form-toggle-thumb-disabled-background-color: GrayText;
2701
+ /* TODO: Apply `GrayText` to the border-color */
2702
+ border-color: var(--utrecht-form-toggle-track-disabled-border-color, var(--utrecht-form-toggle-track-border-color));
2703
+ border-width: min(var(--utrecht-form-toggle-border-width, 1px), 1px);
2704
+ /* TODO: Find a way to express the `pressed` state */
2705
+ }
2682
2706
  }
2683
2707
 
2684
- .utrecht-form-toggle--focus {
2685
- border-color: var(--utrecht-form-toggle-focus-border-color, var(--utrecht-form-toggle-border-color, currentColor));
2686
- border-style: var(--utrecht-form-toggle-focus-border-style, var(--utrecht-form-toggle-border-style, solid));
2687
- border-width: var(--utrecht-form-toggle-focus-border-width, var(--utrecht-form-toggle-border-width, 1px));
2708
+ .utrecht-form-toggle--focus-visible, .utrecht-form-toggle--html-div:focus-visible {
2709
+ /* - The browser default focus ring should apply when these CSS custom properties are not set.
2710
+ * - Make the `box-shadow` value available, so components that have their own `box-shadow`
2711
+ * can combine it with the focus ring box shadow.
2712
+ */
2713
+ --_utrecht-focus-ring-box-shadow: 0 0 0 var(--utrecht-focus-outline-width, 0)
2714
+ var(--utrecht-focus-inverse-outline-color, transparent);
2715
+ box-shadow: var(--_utrecht-focus-ring-box-shadow);
2716
+ outline-color: var(--utrecht-focus-outline-color, revert);
2717
+ outline-offset: var(--utrecht-focus-outline-offset, revert);
2718
+ outline-style: var(--utrecht-focus-outline-style, revert);
2719
+ outline-width: var(--utrecht-focus-outline-width, revert);
2688
2720
  }
2689
2721
 
2690
2722
  .utrecht-form-toggle--hover {
@@ -2692,7 +2724,7 @@ ol.utrecht-breadcrumb__list {
2692
2724
  color: var(--utrecht-form-toggle-hover-color, var(--utrecht-form-toggle-color));
2693
2725
  }
2694
2726
 
2695
- .utrecht-form-toggle--disabled {
2727
+ .utrecht-form-toggle--disabled, .utrecht-form-toggle--html-div:disabled {
2696
2728
  border-color: var(--utrecht-form-toggle-disabled-border-color, var(--utrecht-form-toggle-border-color, currentColor));
2697
2729
  border-style: var(--utrecht-form-toggle-disabled-border-style, var(--utrecht-form-toggle-border-style, solid));
2698
2730
  border-width: var(--utrecht-form-toggle-disabled-border-width, var(--utrecht-form-toggle-border-width, 1px));
@@ -2727,10 +2759,10 @@ ol.utrecht-breadcrumb__list {
2727
2759
  .utrecht-form-toggle__track {
2728
2760
  align-items: center;
2729
2761
  background-color: var(--utrecht-form-toggle-accent-color);
2762
+ block-size: 100%;
2730
2763
  border-radius: var(--utrecht-form-toggle-track-border-radius, var(--utrecht-form-toggle-border-radius));
2731
2764
  display: flex;
2732
- height: 100%;
2733
- width: 100%;
2765
+ inline-size: 100%;
2734
2766
  }
2735
2767
 
2736
2768
  .utrecht-form-toggle__track--checked, .utrecht-form-toggle--html-checkbox .utrecht-form-toggle__checkbox:checked ~ .utrecht-form-toggle__track {
@@ -2744,11 +2776,12 @@ ol.utrecht-breadcrumb__list {
2744
2776
 
2745
2777
  .utrecht-form-toggle--html-checkbox .utrecht-form-toggle__checkbox {
2746
2778
  /* Source: https://kittygiraudel.com/snippets/sr-only-class/ */
2779
+ block-size: 1px !important;
2747
2780
  border: 0 !important;
2748
2781
  clip: rect(1px, 1px, 1px, 1px) !important;
2749
2782
  -webkit-clip-path: inset(50%) !important;
2750
2783
  clip-path: inset(50%) !important;
2751
- height: 1px !important;
2784
+ inline-size: 1px !important;
2752
2785
  /* stylelint-disable-next-line property-disallowed-list */
2753
2786
  margin: -1px !important;
2754
2787
  overflow: hidden !important;
@@ -2756,12 +2789,6 @@ ol.utrecht-breadcrumb__list {
2756
2789
  padding: 0 !important;
2757
2790
  position: absolute !important;
2758
2791
  white-space: nowrap !important;
2759
- width: 1px !important;
2760
- }
2761
- .utrecht-form-toggle--html-checkbox .utrecht-form-toggle__checkbox:focus ~ .utrecht-form-toggle__track {
2762
- outline-color: var(--utrecht-form-toggle-focus-border-color, var(--utrecht-form-toggle-border-color, currentColor));
2763
- outline-style: var(--utrecht-form-toggle-focus-border-style, var(--utrecht-form-toggle-border-style, solid));
2764
- outline-width: var(--utrecht-form-toggle-focus-border-width, var(--utrecht-form-toggle-border-width, 1px));
2765
2792
  }
2766
2793
  /**
2767
2794
  * @license EUPL-1.2
@@ -5483,6 +5510,24 @@ however browsers don't seem to have implemented great looking supixel tweening y
5483
5510
  font-variant-numeric: slashed-zero;
5484
5511
  }
5485
5512
 
5513
+ /**
5514
+ * This class name is experimental.
5515
+ */
5516
+ .utrecht-textbox--placeholder-ltr::placeholder, .utrecht-textbox--placeholder-ltr:placeholder-shown {
5517
+ /* For <input dir="rtr" placeholder="+31 555 1234">,
5518
+ * behave as `dir="auto"` when the placeholder is shown. */
5519
+ direction: ltr;
5520
+ }
5521
+
5522
+ /**
5523
+ * This class name is experimental.
5524
+ */
5525
+ .utrecht-textbox--placeholder-rtl::placeholder, .utrecht-textbox--placeholder-rtl:placeholder-shown {
5526
+ /* For <input dir="rtr" placeholder="+31 555 1234">,
5527
+ * behave as `dir="auto"` when the placeholder is shown. */
5528
+ direction: rtl;
5529
+ }
5530
+
5486
5531
  .utrecht-textbox--url {
5487
5532
  font-variant-ligatures: none;
5488
5533
  }
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.0-alpha.512",
2
+ "version": "1.0.0-alpha.514",
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",
@@ -26,5 +26,5 @@
26
26
  "clean": "rimraf dist/"
27
27
  },
28
28
  "main": "dist/index.css",
29
- "gitHead": "a47f0c83f0f8a5f94d82d7332c8ce982eb499941"
29
+ "gitHead": "94a84d1619a8303adc5933bebf5fe05b8ae2dae7"
30
30
  }