Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
1b176c8
init segmented control
francisrupert Mar 19, 2026
c8c5c8c
refactor to use DtSegmentedControlItem child component with slot-baseโ€ฆ
francisrupert Mar 19, 2026
bd32bf8
update spacing and border-radius
francisrupert Mar 19, 2026
f622cd8
consolidate watchers with watchEffect and extract constants
francisrupert Mar 19, 2026
5812e3d
borderless prop
francisrupert Mar 19, 2026
615eb0f
add story for DtSegmentedControlItem
francisrupert Mar 19, 2026
34b3e7f
add aria-orientation attribute to segmented control
francisrupert Mar 19, 2026
218065f
add trailing slot story example for segmented control
francisrupert Mar 19, 2026
c99b572
update segmented control size prop to use standard size values and chโ€ฆ
francisrupert Mar 19, 2026
025288d
divider
francisrupert Mar 20, 2026
1e14261
init segmented control doc
francisrupert Mar 20, 2026
55972f9
.
francisrupert Mar 20, 2026
686547d
hideDivider
francisrupert Mar 20, 2026
00a4dbc
.
francisrupert Mar 20, 2026
606de43
default activation mode auto
francisrupert Mar 20, 2026
e39a788
reformat template strings in variant files for improved readability
francisrupert Mar 20, 2026
b98fa98
add id prop, change/before-change events, and comprehensive test coveโ€ฆ
francisrupert Mar 23, 2026
2123cd6
update segmented control description and keywords for clarity
francisrupert Mar 23, 2026
f53b3e7
prevent change event when clicking already-selected segmented controlโ€ฆ
francisrupert Mar 23, 2026
50a09f5
export default constants and use them in stories for consistency
francisrupert Mar 23, 2026
b7a2f05
add tabbable fallback logic to ensure keyboard accessibility when selโ€ฆ
francisrupert Mar 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 101 additions & 0 deletions apps/dialtone-documentation/docs/_data/segmented-control.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
{
"classes": [
{
"class": "d-segmented-control",
"applies": "N/A",
"description": "Container class for the segmented control."
},
{
"class": "d-segmented-control--vertical",
"applies": ".d-segmented-control",
"description": "Stacks items vertically."
},
{
"class": "d-segmented-control--borderless",
"applies": ".d-segmented-control",
"description": "Removes the border and padding from the container."
},
{
"class": "d-segmented-control--hide-divider",
"applies": ".d-segmented-control",
"description": "Hides the dividers between items."
},
{
"class": "d-segmented-control--spread-evenly",
"applies": ".d-segmented-control",
"description": "Distributes items equally across the container width."
},
{
"class": "d-segmented-control--xs",
"applies": ".d-segmented-control",
"description": "Extra small size."
},
{
"class": "d-segmented-control--sm",
"applies": ".d-segmented-control",
"description": "Small size (default)."
},
{
"class": "d-segmented-control--md",
"applies": ".d-segmented-control",
"description": "Medium size."
},
{
"class": "d-segmented-control--lg",
"applies": ".d-segmented-control",
"description": "Large size."
},
{
"class": "d-segmented-control--xl",
"applies": ".d-segmented-control",
"description": "Extra large size."
},
{
"class": "d-segmented-control__item",
"applies": "N/A",
"description": "Styles each item within the segmented control."
},
{
"class": "d-segmented-control__item-label",
"applies": "N/A",
"description": "Styles the label container within each item."
}
],
"accessible": [
{
"item": "role=\"radiogroup\"",
"applies": ".d-segmented-control",
"description": "Identifies the container as a group of radio controls. (<a class=\"d-link\" href=\"https://www.w3.org/TR/wai-aria-1.2/#radiogroup\" target=\"_blank\" rel=\"noopener noreferrer\">Source</a>)"
},
{
"item": "aria-label",
"applies": ".d-segmented-control",
"description": "Provides an accessible name for the radio group."
},
{
"item": "aria-orientation",
"applies": ".d-segmented-control",
"description": "Indicates whether the control is horizontal or vertical, informing screen readers of the expected keyboard navigation direction."
},
{
"item": "role=\"radio\"",
"applies": ".d-segmented-control__item",
"description": "Identifies each item as a radio button within the group. (<a class=\"d-link\" href=\"https://www.w3.org/TR/wai-aria-1.2/#radio\" target=\"_blank\" rel=\"noopener noreferrer\">Source</a>)"
},
{
"item": "aria-checked",
"applies": ".d-segmented-control__item",
"description": "Set to \"true\" on the selected item, \"false\" on all others."
},
{
"item": "tabindex",
"applies": ".d-segmented-control__item",
"description": "Roving tabindex: the selected item has tabindex=\"0\", all others have tabindex=\"-1\". Arrow keys move focus between items."
},
{
"item": "aria-disabled",
"applies": ".d-segmented-control__item",
"description": "Set to \"true\" on disabled items. Arrow key navigation skips disabled items."
}
]
}
4 changes: 4 additions & 0 deletions apps/dialtone-documentation/docs/_data/site-nav.json
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,10 @@
"text": "Scroller",
"link": "/components/scroller.html"
},
{
"text": "Segmented Control",
"link": "/components/segmented-control.html"
},
{
"text": "Select Menu",
"link": "/components/select-menu.html"
Expand Down
Loading
Loading