Skip to content

Commit ad4c6c3

Browse files
feat(segmented-control): DLT-413 new component (#1144)
1 parent 89c1ed0 commit ad4c6c3

20 files changed

+2679
-5
lines changed
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
{
2+
"classes": [
3+
{
4+
"class": "d-segmented-control",
5+
"applies": "N/A",
6+
"description": "Container class for the segmented control."
7+
},
8+
{
9+
"class": "d-segmented-control--vertical",
10+
"applies": ".d-segmented-control",
11+
"description": "Stacks items vertically."
12+
},
13+
{
14+
"class": "d-segmented-control--borderless",
15+
"applies": ".d-segmented-control",
16+
"description": "Removes the border and padding from the container."
17+
},
18+
{
19+
"class": "d-segmented-control--hide-divider",
20+
"applies": ".d-segmented-control",
21+
"description": "Hides the dividers between items."
22+
},
23+
{
24+
"class": "d-segmented-control--spread-evenly",
25+
"applies": ".d-segmented-control",
26+
"description": "Distributes items equally across the container width."
27+
},
28+
{
29+
"class": "d-segmented-control--xs",
30+
"applies": ".d-segmented-control",
31+
"description": "Extra small size."
32+
},
33+
{
34+
"class": "d-segmented-control--sm",
35+
"applies": ".d-segmented-control",
36+
"description": "Small size (default)."
37+
},
38+
{
39+
"class": "d-segmented-control--md",
40+
"applies": ".d-segmented-control",
41+
"description": "Medium size."
42+
},
43+
{
44+
"class": "d-segmented-control--lg",
45+
"applies": ".d-segmented-control",
46+
"description": "Large size."
47+
},
48+
{
49+
"class": "d-segmented-control--xl",
50+
"applies": ".d-segmented-control",
51+
"description": "Extra large size."
52+
},
53+
{
54+
"class": "d-segmented-control__item",
55+
"applies": "N/A",
56+
"description": "Styles each item within the segmented control."
57+
},
58+
{
59+
"class": "d-segmented-control__item-label",
60+
"applies": "N/A",
61+
"description": "Styles the label container within each item."
62+
}
63+
],
64+
"accessible": [
65+
{
66+
"item": "role=\"radiogroup\"",
67+
"applies": ".d-segmented-control",
68+
"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>)"
69+
},
70+
{
71+
"item": "aria-label",
72+
"applies": ".d-segmented-control",
73+
"description": "Provides an accessible name for the radio group."
74+
},
75+
{
76+
"item": "aria-orientation",
77+
"applies": ".d-segmented-control",
78+
"description": "Indicates whether the control is horizontal or vertical, informing screen readers of the expected keyboard navigation direction."
79+
},
80+
{
81+
"item": "role=\"radio\"",
82+
"applies": ".d-segmented-control__item",
83+
"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>)"
84+
},
85+
{
86+
"item": "aria-checked",
87+
"applies": ".d-segmented-control__item",
88+
"description": "Set to \"true\" on the selected item, \"false\" on all others."
89+
},
90+
{
91+
"item": "tabindex",
92+
"applies": ".d-segmented-control__item",
93+
"description": "Roving tabindex: the selected item has tabindex=\"0\", all others have tabindex=\"-1\". Arrow keys move focus between items."
94+
},
95+
{
96+
"item": "aria-disabled",
97+
"applies": ".d-segmented-control__item",
98+
"description": "Set to \"true\" on disabled items. Arrow key navigation skips disabled items."
99+
}
100+
]
101+
}

apps/dialtone-documentation/docs/_data/site-nav.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,10 @@
433433
"text": "Scroller",
434434
"link": "/components/scroller.html"
435435
},
436+
{
437+
"text": "Segmented Control",
438+
"link": "/components/segmented-control.html"
439+
},
436440
{
437441
"text": "Select Menu",
438442
"link": "/components/select-menu.html"

0 commit comments

Comments
 (0)