@jsekulowicz/ds-components 0.16.0 → 0.16.1

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.
@@ -5620,7 +5620,7 @@
5620
5620
  {
5621
5621
  "kind": "variable",
5622
5622
  "name": "segmentedControlStyles",
5623
- "default": "css` :host { display: inline-flex; flex-direction: column; gap: var(--ds-space-1); max-width: 100%; } :host([disabled]) { cursor: not-allowed; opacity: 0.6; } .group { /* Equal columns that all size to the widest segment: with a shrink-to-fit track, equal 1fr columns each resolve to the widest cell's content, so no segment ends up narrower than its label needs. When the host is given an explicit width they simply share it evenly. */ display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; /* The track colour shows through the 1px padding and gaps as a hairline frame and dividers between the otherwise borderless segments. */ gap: 1px; padding: 1px; background: var(--ds-color-border-subtle); border-radius: var(--ds-radius-sm); max-width: 100%; } .segment { min-width: 0; } /* Give unselected segments a surface that's distinct from the track so each option reads as its own tile; the selected one keeps the accent fill from the primary button variant. Drop the button min-width floor so the grid drives sizing. */ .segment::part(button) { min-width: 0; border-radius: calc(var(--ds-radius-sm) - 1px); } .segment[variant='ghost']::part(button) { background: var(--ds-color-bg); } .segment[variant='ghost']::part(button):hover { background: var(--ds-color-bg-subtle); } /* Square off the inner edges so the row reads as one connected control, rounding only the outer corners of the first and last segments. */ .segment:first-child:not(:last-child)::part(button) { border-top-right-radius: 0; border-bottom-right-radius: 0; } .segment:last-child:not(:first-child)::part(button) { border-top-left-radius: 0; border-bottom-left-radius: 0; } .segment:not(:first-child):not(:last-child)::part(button) { border-radius: 0; } `"
5623
+ "default": "css` :host { display: inline-flex; flex-direction: column; gap: var(--ds-space-1); max-width: 100%; } :host([disabled]) { cursor: not-allowed; opacity: 0.6; } .group { /* Equal columns that all size to the widest segment: with a shrink-to-fit track, equal 1fr columns each resolve to the widest cell's content, so no segment ends up narrower than its label needs. When the host is given an explicit width they simply share it evenly. */ display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; /* The track colour shows through the 1px padding and gaps as a hairline frame and dividers between the otherwise borderless segments. */ gap: 1px; padding: 1px; background: var(--ds-color-border-subtle); border-radius: var(--ds-radius-sm); max-width: 100%; } .segment { min-width: 0; } /* Lift the focused segment above its neighbours so the full focus ring is visible instead of being painted over by the adjacent segment. */ .segment:focus-within { position: relative; z-index: 1; } /* Give unselected segments a surface that's distinct from the track so each option reads as its own tile; the selected one keeps the accent fill from the primary button variant. Drop the button min-width floor so the grid drives sizing. */ .segment::part(button) { min-width: 0; border-radius: calc(var(--ds-radius-sm) - 1px); } .segment[variant='ghost']::part(button) { background: var(--ds-color-bg); } .segment[variant='ghost']::part(button):hover { background: var(--ds-color-bg-subtle); } /* Square off the inner edges so the row reads as one connected control, rounding only the outer corners of the first and last segments. */ .segment:first-child:not(:last-child)::part(button) { border-top-right-radius: 0; border-bottom-right-radius: 0; } .segment:last-child:not(:first-child)::part(button) { border-top-left-radius: 0; border-bottom-left-radius: 0; } .segment:not(:first-child):not(:last-child)::part(button) { border-radius: 0; } `"
5624
5624
  }
5625
5625
  ],
5626
5626
  "exports": [
@@ -1 +1 @@
1
- {"version":3,"file":"segmented-control.styles.d.ts","sourceRoot":"","sources":["../../../src/atoms/segmented-control/segmented-control.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB,yBAyDlC,CAAC"}
1
+ {"version":3,"file":"segmented-control.styles.d.ts","sourceRoot":"","sources":["../../../src/atoms/segmented-control/segmented-control.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB,yBA+DlC,CAAC"}
@@ -29,6 +29,12 @@ export const segmentedControlStyles = css `
29
29
  .segment {
30
30
  min-width: 0;
31
31
  }
32
+ /* Lift the focused segment above its neighbours so the full focus ring is
33
+ visible instead of being painted over by the adjacent segment. */
34
+ .segment:focus-within {
35
+ position: relative;
36
+ z-index: 1;
37
+ }
32
38
  /* Give unselected segments a surface that's distinct from the track so each
33
39
  option reads as its own tile; the selected one keeps the accent fill from
34
40
  the primary button variant. Drop the button min-width floor so the grid
@@ -1 +1 @@
1
- {"version":3,"file":"segmented-control.styles.js","sourceRoot":"","sources":["../../../src/atoms/segmented-control/segmented-control.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyDxC,CAAC"}
1
+ {"version":3,"file":"segmented-control.styles.js","sourceRoot":"","sources":["../../../src/atoms/segmented-control/segmented-control.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+DxC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsekulowicz/ds-components",
3
- "version": "0.16.0",
3
+ "version": "0.16.1",
4
4
  "description": "Lit web components for the Design System Library (atoms, molecules, organisms, templates, pages).",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {