jekyll-v4-theme-primer 0.11.0 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +24 -3
- data/_layouts/default.html +4 -2
- data/_sass/@primer/css/autocomplete/suggester.scss +11 -11
- data/_sass/@primer/css/avatars/avatar-parent-child.scss +2 -2
- data/_sass/@primer/css/avatars/circle-badge.scss +3 -3
- data/_sass/@primer/css/base/base.scss +5 -5
- data/_sass/@primer/css/base/kbd.scss +5 -5
- data/_sass/@primer/css/base/normalize.scss +3 -2
- data/_sass/@primer/css/box/box-overlay.scss +3 -3
- data/_sass/@primer/css/branch-name/branch-name.scss +6 -6
- data/_sass/@primer/css/buttons/button.scss +63 -63
- data/_sass/@primer/css/buttons/misc.scss +26 -26
- data/_sass/@primer/css/color-modes/native.scss +4 -2
- data/_sass/@primer/css/core/index.scss +0 -1
- data/_sass/@primer/css/forms/form-control.scss +18 -18
- data/_sass/@primer/css/forms/form-group.scss +31 -30
- data/_sass/@primer/css/forms/form-select.scss +1 -1
- data/_sass/@primer/css/forms/index.scss +0 -1
- data/_sass/@primer/css/forms/input-group.scss +10 -0
- data/_sass/@primer/css/forms/radio-group.scss +6 -6
- data/_sass/@primer/css/header/header.scss +7 -7
- data/_sass/@primer/css/labels/index.scss +0 -1
- data/_sass/@primer/css/layout/app-frame.scss +13 -13
- data/_sass/@primer/css/layout/page-layout.scss +2 -6
- data/_sass/@primer/css/layout/stack.scss +7 -7
- data/_sass/@primer/css/markdown/blob-csv.scss +2 -2
- data/_sass/@primer/css/markdown/code.scss +3 -3
- data/_sass/@primer/css/markdown/footnotes.scss +3 -3
- data/_sass/@primer/css/markdown/headings.scss +4 -4
- data/_sass/@primer/css/markdown/images.scss +3 -3
- data/_sass/@primer/css/markdown/lists.scss +4 -4
- data/_sass/@primer/css/markdown/markdown-body.scss +4 -4
- data/_sass/@primer/css/markdown/tables.scss +4 -4
- data/_sass/@primer/css/marketing/buttons/button.scss +9 -10
- data/_sass/@primer/css/marketing/support/variables.scss +15 -0
- data/_sass/@primer/css/marketing/utilities/layout.scss +0 -1
- data/_sass/@primer/css/navigation/filter-list.scss +8 -8
- data/_sass/@primer/css/navigation/sidenav.scss +12 -12
- data/_sass/@primer/css/navigation/subnav.scss +9 -9
- data/_sass/@primer/css/pagination/pagination.scss +7 -7
- data/_sass/@primer/css/primitives/index.scss +9 -9
- data/_sass/@primer/css/select-menu/select-menu.scss +41 -41
- data/_sass/@primer/css/support/mixins/color-modes.scss +89 -1
- data/_sass/@primer/css/support/mixins/misc.scss +8 -8
- data/_sass/@primer/css/support/variables/misc.scss +2 -2
- data/_sass/@primer/css/support/variables/typography.scss +1 -1
- data/_sass/@primer/css/toasts/toasts.scss +17 -17
- data/_sass/@primer/css/tooltips/tooltips.scss +9 -62
- data/_sass/@primer/css/utilities/borders.scss +9 -9
- data/_sass/@primer/css/utilities/box-shadow.scss +8 -4
- data/_sass/@primer/css/utilities/colors.scss +59 -60
- data/_sass/@primer/css/utilities/details.scss +1 -1
- data/_sass/@primer/css/utilities/flexbox.scss +0 -1
- data/_sass/@primer/css/utilities/layout.scss +7 -5
- data/_sass/@primer/css/utilities/margin.scss +0 -2
- data/_sass/@primer/css/utilities/padding.scss +0 -1
- data/_sass/@primer/css/utilities/typography.scss +8 -8
- data/_sass/@primer/css/utilities/visibility-display.scss +10 -9
- data/_sass/@primer/primitives/dist/scss/base/size/size.scss +17 -0
- data/_sass/@primer/primitives/dist/scss/base/typography/typography.scss +4 -0
- data/_sass/@primer/primitives/dist/scss/colors/_dark.scss +29 -20
- data/_sass/@primer/primitives/dist/scss/colors/_dark_colorblind.scss +14 -5
- data/_sass/@primer/primitives/dist/scss/colors/_dark_dimmed.scss +14 -5
- data/_sass/@primer/primitives/dist/scss/colors/_dark_high_contrast.scss +12 -3
- data/_sass/@primer/primitives/dist/scss/colors/_dark_tritanopia.scss +14 -5
- data/_sass/@primer/primitives/dist/scss/colors/_light.scss +13 -4
- data/_sass/@primer/primitives/dist/scss/colors/_light_colorblind.scss +13 -4
- data/_sass/@primer/primitives/dist/scss/colors/_light_high_contrast.scss +13 -4
- data/_sass/@primer/primitives/dist/scss/colors/_light_tritanopia.scss +13 -4
- data/_sass/@primer/primitives/dist/scss/functional/motion/motion.scss +3 -0
- data/_sass/@primer/primitives/dist/scss/functional/size/border.scss +12 -0
- data/_sass/@primer/primitives/dist/scss/functional/size/breakpoints.scss +6 -0
- data/_sass/@primer/primitives/dist/scss/functional/size/size-coarse.scss +3 -0
- data/_sass/@primer/primitives/dist/scss/functional/size/size-fine.scss +3 -0
- data/_sass/@primer/primitives/dist/scss/functional/size/size.scss +72 -0
- data/_sass/@primer/primitives/dist/scss/functional/size/viewport.scss +6 -0
- data/_sass/@primer/primitives/dist/scss/functional/themes/dark-colorblind.scss +503 -0
- data/_sass/@primer/primitives/dist/scss/functional/themes/dark-dimmed.scss +503 -0
- data/_sass/@primer/primitives/dist/scss/functional/themes/dark-high-contrast.scss +503 -0
- data/_sass/@primer/primitives/dist/scss/functional/themes/dark-tritanopia.scss +503 -0
- data/_sass/@primer/primitives/dist/scss/functional/themes/dark.scss +503 -0
- data/_sass/@primer/primitives/dist/scss/functional/themes/light-colorblind.scss +503 -0
- data/_sass/@primer/primitives/dist/scss/functional/themes/light-high-contrast.scss +503 -0
- data/_sass/@primer/primitives/dist/scss/functional/themes/light-tritanopia.scss +503 -0
- data/_sass/@primer/primitives/dist/scss/functional/themes/light.scss +503 -0
- data/_sass/@primer/primitives/dist/scss/functional/typography/typography.scss +45 -0
- data/_sass/@primer/primitives/tokens-next-private/scss/base/size/size.scss +17 -21
- data/_sass/@primer/primitives/tokens-next-private/scss/base/typography/typography.scss +4 -8
- data/_sass/@primer/primitives/tokens-next-private/scss/functional/motion/motion.scss +3 -0
- data/_sass/@primer/primitives/tokens-next-private/scss/functional/size/border.scss +12 -16
- data/_sass/@primer/primitives/tokens-next-private/scss/functional/size/breakpoints.scss +6 -10
- data/_sass/@primer/primitives/tokens-next-private/scss/functional/size/size-coarse.scss +3 -7
- data/_sass/@primer/primitives/tokens-next-private/scss/functional/size/size-fine.scss +3 -7
- data/_sass/@primer/primitives/tokens-next-private/scss/functional/size/size.scss +72 -51
- data/_sass/@primer/primitives/tokens-next-private/scss/functional/size/viewport.scss +6 -19
- data/_sass/@primer/primitives/tokens-next-private/scss/functional/themes/dark-colorblind.scss +503 -391
- data/_sass/@primer/primitives/tokens-next-private/scss/functional/themes/dark-dimmed.scss +503 -391
- data/_sass/@primer/primitives/tokens-next-private/scss/functional/themes/dark-high-contrast.scss +503 -391
- data/_sass/@primer/primitives/tokens-next-private/scss/functional/themes/dark-tritanopia.scss +503 -391
- data/_sass/@primer/primitives/tokens-next-private/scss/functional/themes/dark.scss +503 -391
- data/_sass/@primer/primitives/tokens-next-private/scss/functional/themes/light-colorblind.scss +503 -366
- data/_sass/@primer/primitives/tokens-next-private/scss/functional/themes/light-high-contrast.scss +503 -366
- data/_sass/@primer/primitives/tokens-next-private/scss/functional/themes/light-tritanopia.scss +503 -366
- data/_sass/@primer/primitives/tokens-next-private/scss/functional/themes/light.scss +503 -366
- data/_sass/@primer/primitives/tokens-next-private/scss/functional/typography/typography.scss +45 -49
- data/_sass/@primer/primitives/tokens-v2-private/scss/tokens/base/size/size.scss +2 -2
- data/_sass/@primer/primitives/tokens-v2-private/scss/tokens/base/typography/typography.scss +2 -2
- data/_sass/@primer/primitives/tokens-v2-private/scss/tokens/functional/size/border.scss +2 -2
- data/_sass/@primer/primitives/tokens-v2-private/scss/tokens/functional/size/breakpoints.scss +2 -2
- data/_sass/@primer/primitives/tokens-v2-private/scss/tokens/functional/size/size-coarse.scss +2 -2
- data/_sass/@primer/primitives/tokens-v2-private/scss/tokens/functional/size/size-fine.scss +2 -2
- data/_sass/@primer/primitives/tokens-v2-private/scss/tokens/functional/size/size.scss +2 -2
- data/_sass/@primer/primitives/tokens-v2-private/scss/tokens/functional/size/viewport.scss +2 -2
- data/_sass/@primer/primitives/tokens-v2-private/scss/tokens/functional/typography/typography.scss +2 -2
- data/_sass/@primer/view-components/README.md +1 -1
- data/_sass/@primer/view-components/app/assets/javascripts/app/components/primer/alpha/action_bar_element.d.ts +17 -0
- data/_sass/@primer/view-components/app/assets/javascripts/app/components/primer/alpha/action_menu/action_menu_element.d.ts +51 -0
- data/_sass/@primer/view-components/app/assets/javascripts/app/components/primer/alpha/dropdown/menu.d.ts +1 -0
- data/_sass/@primer/view-components/app/assets/javascripts/app/components/primer/alpha/dropdown.d.ts +1 -0
- data/_sass/@primer/view-components/app/assets/javascripts/app/components/primer/alpha/image_crop.d.ts +1 -0
- data/_sass/@primer/view-components/app/assets/javascripts/app/components/primer/alpha/modal_dialog.d.ts +18 -0
- data/_sass/@primer/view-components/app/assets/javascripts/app/components/primer/alpha/segmented_control.d.ts +12 -0
- data/_sass/@primer/view-components/app/assets/javascripts/app/components/primer/alpha/tab_container.d.ts +1 -0
- data/_sass/@primer/view-components/app/assets/javascripts/app/components/primer/alpha/toggle_switch.d.ts +30 -0
- data/_sass/@primer/view-components/app/assets/javascripts/app/components/primer/alpha/tool_tip.d.ts +27 -0
- data/_sass/@primer/view-components/app/assets/javascripts/app/components/primer/alpha/x_banner.d.ts +13 -0
- data/_sass/@primer/view-components/app/assets/javascripts/app/components/primer/anchored_position.d.ts +27 -0
- data/_sass/@primer/view-components/app/assets/javascripts/app/components/primer/beta/auto_complete/auto_complete.d.ts +1 -0
- data/_sass/@primer/view-components/app/assets/javascripts/app/components/primer/beta/clipboard_copy.d.ts +1 -0
- data/_sass/@primer/view-components/app/assets/javascripts/app/components/primer/beta/nav_list.d.ts +17 -0
- data/_sass/@primer/view-components/app/{components/primer/alpha/nav_list.d.ts → assets/javascripts/app/components/primer/beta/nav_list_group_element.d.ts} +3 -9
- data/_sass/@primer/view-components/app/assets/javascripts/app/components/primer/dialog_helper.d.ts +15 -0
- data/_sass/@primer/view-components/app/assets/javascripts/app/components/primer/focus_group.d.ts +19 -0
- data/_sass/@primer/view-components/app/assets/javascripts/app/components/primer/primer.d.ts +23 -0
- data/_sass/@primer/view-components/app/assets/javascripts/app/components/primer/scrollable_region.d.ts +13 -0
- data/_sass/@primer/view-components/app/assets/javascripts/lib/primer/forms/primer_multi_input.d.ts +10 -0
- data/_sass/@primer/view-components/app/assets/javascripts/lib/primer/forms/primer_text_field.d.ts +1 -0
- data/_sass/@primer/view-components/app/assets/javascripts/lib/primer/forms/toggle_switch_input.d.ts +5 -0
- data/_sass/@primer/view-components/app/assets/javascripts/primer_view_components.js +1 -1
- data/_sass/@primer/view-components/app/assets/javascripts/primer_view_components.js.map +1 -1
- data/_sass/@primer/view-components/app/assets/styles/primer_view_components.css +1 -3
- data/_sass/@primer/view-components/app/assets/styles/primer_view_components.css.map +1 -1
- data/_sass/@primer/view-components/app/components/primer/alpha/action_bar.css +1 -0
- data/_sass/@primer/view-components/app/components/primer/alpha/action_bar.css.json +14 -0
- data/_sass/@primer/view-components/app/components/primer/alpha/action_bar_element.d.ts +17 -0
- data/_sass/@primer/view-components/app/components/primer/alpha/action_bar_element.js +180 -0
- data/_sass/@primer/view-components/app/components/primer/alpha/action_list.css +1 -1
- data/_sass/@primer/view-components/app/components/primer/alpha/action_list.css.json +136 -1
- data/_sass/@primer/view-components/app/components/primer/alpha/action_menu/action_menu_element.d.ts +51 -0
- data/_sass/@primer/view-components/app/components/primer/alpha/action_menu/action_menu_element.js +470 -0
- data/_sass/@primer/view-components/app/components/primer/alpha/auto_complete.css +1 -1
- data/_sass/@primer/view-components/app/components/primer/alpha/auto_complete.css.json +23 -1
- data/_sass/@primer/view-components/app/components/primer/alpha/banner.css +1 -1
- data/_sass/@primer/view-components/app/components/primer/alpha/banner.css.json +24 -1
- data/_sass/@primer/view-components/app/components/primer/alpha/button_marketing.css +1 -1
- data/_sass/@primer/view-components/app/components/primer/alpha/button_marketing.css.json +33 -1
- data/_sass/@primer/view-components/app/components/primer/alpha/dialog.css +1 -1
- data/_sass/@primer/view-components/app/components/primer/alpha/dialog.css.json +65 -1
- data/_sass/@primer/view-components/app/components/primer/alpha/dropdown.css +1 -1
- data/_sass/@primer/view-components/app/components/primer/alpha/dropdown.css.json +40 -1
- data/_sass/@primer/view-components/app/components/primer/alpha/layout.css +1 -1
- data/_sass/@primer/view-components/app/components/primer/alpha/layout.css.json +80 -1
- data/_sass/@primer/view-components/app/components/primer/alpha/menu.css +1 -1
- data/_sass/@primer/view-components/app/components/primer/alpha/menu.css.json +28 -1
- data/_sass/@primer/view-components/app/components/primer/alpha/modal_dialog.js +50 -27
- data/_sass/@primer/view-components/app/components/primer/alpha/overlay.css +1 -0
- data/_sass/@primer/view-components/app/components/primer/alpha/overlay.css.json +11 -0
- data/_sass/@primer/view-components/app/components/primer/alpha/segmented_control.css +1 -1
- data/_sass/@primer/view-components/app/components/primer/alpha/segmented_control.css.json +29 -1
- data/_sass/@primer/view-components/app/components/primer/alpha/segmented_control.js +4 -4
- data/_sass/@primer/view-components/app/components/primer/alpha/tab_nav.css +1 -1
- data/_sass/@primer/view-components/app/components/primer/alpha/tab_nav.css.json +24 -1
- data/_sass/@primer/view-components/app/components/primer/alpha/text_field.css +1 -3
- data/_sass/@primer/view-components/app/components/primer/alpha/text_field.css.json +144 -1
- data/_sass/@primer/view-components/app/components/primer/alpha/toggle_switch.css +1 -1
- data/_sass/@primer/view-components/app/components/primer/alpha/toggle_switch.css.json +40 -1
- data/_sass/@primer/view-components/app/components/primer/alpha/toggle_switch.d.ts +2 -1
- data/_sass/@primer/view-components/app/components/primer/alpha/toggle_switch.js +54 -45
- data/_sass/@primer/view-components/app/components/primer/alpha/tool_tip.d.ts +4 -2
- data/_sass/@primer/view-components/app/components/primer/alpha/tool_tip.js +159 -72
- data/_sass/@primer/view-components/app/components/primer/alpha/underline_nav.css +1 -1
- data/_sass/@primer/view-components/app/components/primer/alpha/underline_nav.css.json +28 -1
- data/_sass/@primer/view-components/app/components/primer/alpha/x_banner.d.ts +3 -1
- data/_sass/@primer/view-components/app/components/primer/alpha/x_banner.js +25 -10
- data/_sass/@primer/view-components/app/components/primer/anchored_position.d.ts +27 -0
- data/_sass/@primer/view-components/app/components/primer/anchored_position.js +157 -0
- data/_sass/@primer/view-components/app/components/primer/beta/avatar.css +1 -1
- data/_sass/@primer/view-components/app/components/primer/beta/avatar.css.json +17 -1
- data/_sass/@primer/view-components/app/components/primer/beta/avatar_stack.css +1 -1
- data/_sass/@primer/view-components/app/components/primer/beta/avatar_stack.css.json +28 -1
- data/_sass/@primer/view-components/app/components/primer/beta/blankslate.css +1 -1
- data/_sass/@primer/view-components/app/components/primer/beta/blankslate.css.json +23 -1
- data/_sass/@primer/view-components/app/components/primer/beta/border_box.css +1 -1
- data/_sass/@primer/view-components/app/components/primer/beta/border_box.css.json +54 -1
- data/_sass/@primer/view-components/app/components/primer/beta/breadcrumbs.css +1 -1
- data/_sass/@primer/view-components/app/components/primer/beta/breadcrumbs.css.json +11 -1
- data/_sass/@primer/view-components/app/components/primer/beta/button.css +1 -1
- data/_sass/@primer/view-components/app/components/primer/beta/button.css.json +77 -1
- data/_sass/@primer/view-components/app/components/primer/beta/button_group.css +1 -0
- data/_sass/@primer/view-components/app/components/primer/beta/button_group.css.json +12 -0
- data/_sass/@primer/view-components/app/components/primer/beta/counter.css +1 -1
- data/_sass/@primer/view-components/app/components/primer/beta/counter.css.json +10 -1
- data/_sass/@primer/view-components/app/components/primer/beta/flash.css +1 -1
- data/_sass/@primer/view-components/app/components/primer/beta/flash.css.json +27 -1
- data/_sass/@primer/view-components/app/components/primer/beta/label.css +1 -1
- data/_sass/@primer/view-components/app/components/primer/beta/label.css.json +25 -1
- data/_sass/@primer/view-components/app/components/primer/beta/link.css +1 -1
- data/_sass/@primer/view-components/app/components/primer/beta/link.css.json +20 -1
- data/_sass/@primer/view-components/app/components/primer/beta/nav_list.d.ts +17 -0
- data/_sass/@primer/view-components/app/components/primer/beta/nav_list.js +170 -0
- data/_sass/@primer/view-components/app/components/primer/beta/nav_list_group_element.d.ts +19 -0
- data/_sass/@primer/view-components/app/components/primer/{alpha/nav_list.js → beta/nav_list_group_element.js} +30 -53
- data/_sass/@primer/view-components/app/components/primer/beta/popover.css +1 -1
- data/_sass/@primer/view-components/app/components/primer/beta/popover.css.json +39 -1
- data/_sass/@primer/view-components/app/components/primer/beta/progress_bar.css +1 -1
- data/_sass/@primer/view-components/app/components/primer/beta/progress_bar.css.json +10 -1
- data/_sass/@primer/view-components/app/components/primer/beta/state.css +1 -1
- data/_sass/@primer/view-components/app/components/primer/beta/state.css.json +13 -1
- data/_sass/@primer/view-components/app/components/primer/beta/subhead.css +1 -1
- data/_sass/@primer/view-components/app/components/primer/beta/subhead.css.json +14 -1
- data/_sass/@primer/view-components/app/components/primer/beta/timeline_item.css +1 -1
- data/_sass/@primer/view-components/app/components/primer/beta/timeline_item.css.json +16 -1
- data/_sass/@primer/view-components/app/components/primer/beta/truncate.css +1 -1
- data/_sass/@primer/view-components/app/components/primer/beta/truncate.css.json +12 -1
- data/_sass/@primer/view-components/app/components/primer/dialog_helper.d.ts +15 -0
- data/_sass/@primer/view-components/app/components/primer/dialog_helper.js +117 -0
- data/_sass/@primer/view-components/app/components/primer/focus_group.d.ts +19 -0
- data/_sass/@primer/view-components/app/components/primer/focus_group.js +163 -0
- data/_sass/@primer/view-components/app/components/primer/primer.d.ts +10 -3
- data/_sass/@primer/view-components/app/components/primer/primer.js +10 -3
- data/_sass/@primer/view-components/app/components/primer/scrollable_region.d.ts +13 -0
- data/_sass/@primer/view-components/app/components/primer/scrollable_region.js +52 -0
- data/_sass/@primer/view-components/app/components/primer/truncate.css.json +13 -1
- data/_sass/@primer/view-components/lib/primer/forms/primer_multi_input.js +2 -3
- data/_sass/@primer/view-components/lib/primer/forms/primer_text_field.js +55 -11
- data/_sass/@primer/view-components/lib/primer/forms/toggle_switch_input.js +7 -2
- data/_sass/@primer/view-components/package.json +34 -33
- data/_sass/@primer/view-components/static/arguments.json +2786 -454
- data/_sass/@primer/view-components/static/audited_at.json +39 -24
- data/_sass/@primer/view-components/static/classes.json +612 -0
- data/_sass/@primer/view-components/static/constants.json +318 -77
- data/_sass/@primer/view-components/static/info_arch.json +15698 -0
- data/_sass/@primer/view-components/static/previews.json +6814 -0
- data/_sass/@primer/view-components/static/statuses.json +41 -26
- data/_sass/{jekyll-theme-primer.scss → jekyll-v4-theme-primer.scss} +14 -3
- data/_sass/primer.scss +1 -1
- data/assets/css/style.scss +1 -1
- data/assets/js/github-clipboard-copy-element.js +154 -0
- data/assets/js/primer-clipboard-copy.js +106 -0
- metadata +77 -18
- data/_sass/@primer/css/actionlist/action-list-item-divider.scss +0 -48
- data/_sass/@primer/css/actionlist/action-list-item.scss +0 -593
- data/_sass/@primer/css/actionlist/action-list-tree.scss +0 -118
- data/_sass/@primer/css/actionlist/action-list-variables.scss +0 -8
- data/_sass/@primer/css/actionlist/action-list.scss +0 -67
- data/_sass/@primer/css/actionlist/index.scss +0 -6
- data/_sass/@primer/css/forms/form-validation.scss +0 -265
- data/_sass/@primer/css/labels/diffstat.scss +0 -37
- data/_sass/@primer/view-components/app/components/primer/time_ago_component.js +0 -1
- /data/_sass/@primer/view-components/app/{components/primer/local_time.d.ts → assets/javascripts/app/components/primer/beta/relative_time.d.ts} +0 -0
- /data/_sass/@primer/view-components/app/components/primer/{local_time.js → beta/relative_time.d.ts} +0 -0
- /data/_sass/@primer/view-components/app/components/primer/{time_ago_component.d.ts → beta/relative_time.js} +0 -0
@@ -20,17 +20,17 @@ let SegmentedControlElement = class SegmentedControlElement extends HTMLElement
|
|
20
20
|
__classPrivateFieldGet(this, _SegmentedControlElement_instances, "m", _SegmentedControlElement_updateButtonLabels).call(this);
|
21
21
|
}
|
22
22
|
select(event) {
|
23
|
-
var _a, _b;
|
24
23
|
const button = event.currentTarget;
|
25
24
|
for (const item of this.items) {
|
26
25
|
item.classList.remove('SegmentedControl-item--selected');
|
27
|
-
|
26
|
+
item.querySelector('[aria-current]')?.setAttribute('aria-current', 'false');
|
28
27
|
}
|
29
|
-
|
28
|
+
button.closest('li.SegmentedControl-item')?.classList.add('SegmentedControl-item--selected');
|
30
29
|
button.setAttribute('aria-current', 'true');
|
31
30
|
}
|
32
31
|
};
|
33
|
-
_SegmentedControlElement_instances = new WeakSet()
|
32
|
+
_SegmentedControlElement_instances = new WeakSet();
|
33
|
+
_SegmentedControlElement_updateButtonLabels = function _SegmentedControlElement_updateButtonLabels() {
|
34
34
|
for (const label of this.querySelectorAll('.Button-label')) {
|
35
35
|
label.setAttribute('data-content', label.textContent || '');
|
36
36
|
}
|
@@ -1 +1 @@
|
|
1
|
-
.tabnav{border-bottom:var(--
|
1
|
+
.tabnav{border-bottom:var(--borderWidth-thin,max(1px,.0625rem)) solid var(--borderColor-default,var(--color-border-default));margin-bottom:var(--stack-gap-normal,1rem);margin-top:0}.tabnav-tabs{display:flex;margin-bottom:calc(var(--borderWidth-thin,max(1px, .0625rem))*-1);overflow:auto}.tabnav-tab{background-color:initial;border:var(--borderWidth-thin,max(1px,.0625rem)) solid #0000;border-bottom:0;color:var(--fgColor-muted,var(--color-fg-muted));display:inline-block;flex-shrink:0;font-size:var(--text-body-size-medium,.875rem);line-height:23px;padding:var(--base-size-8,.5rem) var(--control-medium-paddingInline-spacious,1rem);-webkit-text-decoration:none;text-decoration:none;transition:color .2s cubic-bezier(.3,0,.5,1)}.tabnav-tab.selected,.tabnav-tab[aria-current]:not([aria-current=false]),.tabnav-tab[aria-selected=true]{background-color:var(--bgColor-default,var(--color-canvas-default));border-color:var(--borderColor-default,var(--color-border-default));border-radius:var(--borderRadius-medium,.375rem) var(--borderRadius-medium,.375rem) 0 0;color:var(--fgColor-default,var(--color-fg-default))}.tabnav-tab.selected .octicon,.tabnav-tab[aria-current]:not([aria-current=false]) .octicon,.tabnav-tab[aria-selected=true] .octicon{color:inherit}.tabnav-tab:hover{color:var(--fgColor-default,var(--color-fg-default));-webkit-text-decoration:none;text-decoration:none;transition-duration:.1s}.tabnav-tab:focus,.tabnav-tab:focus-visible{border-radius:var(--borderRadius-medium,.375rem) var(--borderRadius-medium,.375rem) 0 0!important;outline-offset:-6px}.tabnav-tab .octicon,.tabnav-tab:active{color:var(--fgColor-muted,var(--color-fg-muted))}.tabnav-tab .octicon{margin-right:var(--control-small-gap,.25rem)}.tabnav-tab .Counter{color:inherit;margin-left:var(--control-small-gap,.25rem)}.tabnav-extra{color:var(--fgColor-muted,var(--color-fg-muted));display:inline-block;font-size:var(--text-body-size-small,.75rem);margin-left:10px;padding-top:10px}.tabnav-extra>.octicon{margin-right:2px}a.tabnav-extra:hover{color:var(--fgColor-accent,var(--color-accent-fg));-webkit-text-decoration:none;text-decoration:none}.tabnav-btn{margin-left:var(--controlStack-medium-gap-condensed,.5rem)}
|
@@ -1 +1,24 @@
|
|
1
|
-
{
|
1
|
+
{
|
2
|
+
"name": "alpha/tab_nav",
|
3
|
+
"selectors": [
|
4
|
+
".tabnav",
|
5
|
+
".tabnav-tabs",
|
6
|
+
".tabnav-tab",
|
7
|
+
".tabnav-tab.selected",
|
8
|
+
".tabnav-tab[aria-current]:not([aria-current=false])",
|
9
|
+
".tabnav-tab[aria-selected=true]",
|
10
|
+
".tabnav-tab.selected .octicon",
|
11
|
+
".tabnav-tab[aria-current]:not([aria-current=false]) .octicon",
|
12
|
+
".tabnav-tab[aria-selected=true] .octicon",
|
13
|
+
".tabnav-tab:hover",
|
14
|
+
".tabnav-tab:focus",
|
15
|
+
".tabnav-tab:focus-visible",
|
16
|
+
".tabnav-tab .octicon",
|
17
|
+
".tabnav-tab:active",
|
18
|
+
".tabnav-tab .Counter",
|
19
|
+
".tabnav-extra",
|
20
|
+
".tabnav-extra>.octicon",
|
21
|
+
"a.tabnav-extra:hover",
|
22
|
+
".tabnav-btn"
|
23
|
+
]
|
24
|
+
}
|
@@ -1,3 +1 @@
|
|
1
|
-
.FormControl{display:inline-flex;flex-direction:column;gap:var(--base-size-4,4px)}.FormControl--fullWidth{display:flex}.FormControl-label{color:var(--color-fg-default);font-size:var(--primer-text-body-size-medium,14px);font-weight:var(--base-text-weight-semibold,600);line-height:var(--primer-text-body-lineHeight-medium,1.42857);-webkit-user-select:none;user-select:none}.FormControl-caption{color:var(--color-fg-muted);font-size:var(--primer-text-caption-size,12px);font-weight:var(--primer-text-caption-weight,400);line-height:var(--primer-text-caption-lineHeight,1.33333);margin-bottom:0}.FormControl-inlineValidation{fill:var(--color-danger-fg);align-items:center;color:var(--color-danger-fg);display:flex;flex-direction:row;font-size:var(--primer-text-caption-size,12px);font-weight:var(--base-text-weight-semibold,600);gap:var(--base-size-4,4px)}.FormControl-inlineValidation p{margin-bottom:0}.FormControl-input,.FormControl-select,.FormControl-textarea{background-color:var(--color-canvas-default);border:var(--primer-borderWidth-thin,1px) solid var(--color-border-default);color:var(--color-fg-default)}.FormControl-input[disabled],.FormControl-select[disabled],.FormControl-textarea[disabled]{-webkit-text-fill-color:var(--color-primer-fg-disabled);background-color:var(--color-input-disabled-bg);border-color:var(--color-border-default);color:var(--color-primer-fg-disabled);cursor:not-allowed;opacity:1}.FormControl-input[invalid]:not(:focus),.FormControl-select[invalid]:not(:focus),.FormControl-textarea[invalid]:not(:focus){border-color:var(--color-danger-emphasis)}.FormControl-input:not([type=checkbox],[type=radio]):focus,.FormControl-select:not([type=checkbox],[type=radio]):focus,.FormControl-textarea:not([type=checkbox],[type=radio]):focus{border-color:var(--color-accent-fg);box-shadow:inset 0 0 0 1px var(--color-accent-fg);outline:none}.FormControl-input:not([type=checkbox],[type=radio]):focus:not(:focus-visible),.FormControl-select:not([type=checkbox],[type=radio]):focus:not(:focus-visible),.FormControl-textarea:not([type=checkbox],[type=radio]):focus:not(:focus-visible){border-color:#0000;border-color:var(--color-accent-fg);box-shadow:inset 0 0 0 1px #0000 var(--color-accent-fg);outline:none}.FormControl-input:not([type=checkbox],[type=radio]):focus-visible,.FormControl-select:not([type=checkbox],[type=radio]):focus-visible,.FormControl-textarea:not([type=checkbox],[type=radio]):focus-visible{border-color:var(--color-accent-fg);box-shadow:inset 0 0 0 1px var(--color-accent-fg);outline:none}.FormControl-input,.FormControl-select,.FormControl-textarea{border-radius:var(--primer-borderRadius-medium,6px);font-size:var(--primer-text-body-size-medium,14px);line-height:var(--primer-text-body-lineHeight-medium,1.42857);padding-block:calc(var(--primer-control-medium-paddingBlock, 6px) - var(--primer-borderWidth-thin, 1px));padding-inline:var(--primer-control-medium-paddingInline-condensed,8px);transition:80ms cubic-bezier(.33,1,.68,1);transition-property:color,background-color,box-shadow,border-color;width:100%}.FormControl-input[disabled]::placeholder,.FormControl-select[disabled]::placeholder,.FormControl-textarea[disabled]::placeholder{color:var(--color-primer-fg-disabled)}.FormControl-input[readonly],.FormControl-select[readonly],.FormControl-textarea[readonly]{background-color:var(--color-input-disabled-bg)}.FormControl-input::placeholder,.FormControl-select::placeholder,.FormControl-textarea::placeholder{color:var(--color-fg-subtle);opacity:1}.FormControl-input.FormControl-small,.FormControl-select.FormControl-small,.FormControl-textarea.FormControl-small{font-size:var(--primer-text-body-size-small,12px);height:var(--primer-control-small-size,28px);padding-block:var(--primer-control-small-paddingBlock,4px);padding-inline:var(--primer-control-small-paddingInline-normal,8px)}.FormControl-input.FormControl-medium,.FormControl-select.FormControl-medium,.FormControl-textarea.FormControl-medium{height:var(--primer-control-medium-size,32px)}.FormControl-input.FormControl-large,.FormControl-select.FormControl-large,.FormControl-textarea.FormControl-large{height:var(--primer-control-large-size,40px);padding-block:var(--primer-control-large-paddingBlock,10px);padding-inline:var(--primer-control-large-paddingInline-normal,12px)}.FormControl-input.FormControl-inset,.FormControl-select.FormControl-inset,.FormControl-textarea.FormControl-inset{background-color:var(--color-canvas-inset)}.FormControl-input.FormControl-inset:focus,.FormControl-input.FormControl-inset:focus-visible,.FormControl-select.FormControl-inset:focus,.FormControl-select.FormControl-inset:focus-visible,.FormControl-textarea.FormControl-inset:focus,.FormControl-textarea.FormControl-inset:focus-visible{background-color:var(--color-canvas-default)}.FormControl-input.FormControl-monospace,.FormControl-select.FormControl-monospace,.FormControl-textarea.FormControl-monospace{font-family:var(
|
2
|
-
--primer-fontStack-monospace,"ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace"
|
3
|
-
)}.FormControl-input.FormControl-error,.FormControl-select.FormControl-error,.FormControl-textarea.FormControl-error{border-color:var(--color-danger-emphasis)}.FormControl-input.FormControl-success,.FormControl-select.FormControl-success,.FormControl-textarea.FormControl-success{border-color:var(--color-success-emphasis)}.FormControl-input.FormControl-warning,.FormControl-select.FormControl-warning,.FormControl-textarea.FormControl-warning{border-color:var(--color-attention-emphasis)}.FormControl-toggleSwitchInput{align-items:flex-start;display:flex;gap:var(--base-size-16,16px)}.FormControl-input-wrap{display:grid;position:relative}.FormControl-input-wrap .FormControl-input-leadingVisualWrap{color:var(--color-fg-muted);display:block;height:var(--base-size-16,16px);left:var(--base-size-8,8px);pointer-events:none;position:absolute;top:var(--base-size-8,8px);width:var(--base-size-16,16px)}.FormControl-input-wrap .FormControl-input-leadingVisualWrap .FormControl-input-leadingVisual{display:block;-webkit-user-select:none;user-select:none}.FormControl-input-wrap .FormControl-input-trailingAction{align-items:center;background:#0000;border:0;border-radius:var(--primer-borderRadius-small);color:var(--color-fg-muted);cursor:pointer;display:grid;height:var(--primer-control-xsmall-size,24px);justify-content:center;padding:0;position:absolute;right:var(--base-size-4,4px);top:var(--base-size-4,4px);transition:.2s cubic-bezier(.3,0,.5,1);transition-property:color,background-color,border-color;width:var(--primer-control-xsmall-size,24px);z-index:4}.FormControl-input-wrap .FormControl-input-trailingAction svg{-webkit-user-select:none;user-select:none}.FormControl-input-wrap .FormControl-input-trailingAction[disabled]{color:var(--color-primer-fg-disabled);pointer-events:none}.FormControl-input-wrap .FormControl-input-trailingAction:hover{background:var(--color-action-list-item-default-hover-bg)}.FormControl-input-wrap .FormControl-input-trailingAction:active{background:var(--color-action-list-item-default-active-bg)}.FormControl-input-wrap .FormControl-input-trailingAction.FormControl-input-trailingAction--divider:before{background:var(--color-border-default);content:"";display:block;height:var(--base-size-16);left:calc(var(--base-size-4, 4px)*-1);position:absolute;top:calc((var(--primer-control-xsmall-size) - var(--base-size-16))/2);width:var(--primer-borderWidth-thin)}.FormControl-input-wrap .FormControl-input-trailingAction:after{content:"";height:100%;left:50%;min-height:var(--primer-control-medium-size,32px) var(--primer-control-medium-size,32px);position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:100%}@media (pointer:coarse){.FormControl-input-wrap .FormControl-input-trailingAction:after{min-height:var(--primer-control-minTarget-coarse,44px);min-width:var(--primer-control-minTarget-coarse,44px)}}.FormControl-input-wrap.FormControl-input-wrap--leadingVisual .FormControl-input{padding-inline-start:calc(var(--primer-control-medium-paddingInline-condensed, 8px) + var(--base-size-16, 16px) + var(--primer-control-medium-gap, 8px))}.FormControl-input-wrap.FormControl-input-wrap--trailingAction .FormControl-input{padding-inline-end:calc(var(--primer-control-medium-paddingInline-condensed, 8px) + var(--base-size-16, 16px) + var(--primer-control-medium-gap, 8px))}.FormControl-input-wrap.FormControl-input-wrap--trailingAction.FormControl-input-wrap-trailingAction--divider .FormControl-input{padding-inline-end:calc(var(--primer-control-medium-paddingInline-condensed, 8px) + var(--base-size-16, 16px) + var(--primer-control-medium-gap, 8px) + var(--primer-borderWidth-thin, 1px))}.FormControl-input-wrap.FormControl-small .FormControl-input-leadingVisualWrap{left:calc(var(--primer-control-medium-paddingInline-condensed, 8px) - .125rem);top:calc(var(--primer-control-medium-paddingInline-condensed, 8px) - .125rem)}.FormControl-input-wrap.FormControl-small.FormControl-input-wrap--trailingAction .FormControl-input.FormControl-small{padding-inline-end:calc(var(--primer-control-small-paddingInline-condensed, 8px) + var(--base-size-16, 16px) + var(--primer-control-small-gap, 8px))}.FormControl-input-wrap.FormControl-small.FormControl-input-wrap--trailingAction.FormControl-input-wrap-trailingAction--divider .FormControl-input.FormControl-small{padding-inline-end:calc(var(--primer-control-small-paddingInline-condensed, 8px) + var(--base-size-16, 16px) + var(--primer-control-small-gap, 8px) + var(--primer-borderWidth-thin, 1px))}.FormControl-input-wrap.FormControl-small .FormControl-input-trailingAction{height:calc(var(--primer-control-small-size, 28px) - var(--base-size-8, 8px));width:calc(var(--primer-control-small-size, 28px) - var(--base-size-8, 8px))}.FormControl-input-wrap.FormControl-small .FormControl-input-trailingAction:before{top:calc((var(--primer-control-xsmall-size) - var(--base-size-16))/4)}.FormControl-input-wrap.FormControl-large .FormControl-input-leadingVisualWrap{left:var(--primer-control-medium-paddingInline-normal,12px);top:var(--primer-control-medium-paddingInline-normal,12px)}.FormControl-input-wrap.FormControl-large.FormControl-input-wrap--leadingVisual .FormControl-input.FormControl-large{padding-inline-start:calc(var(--primer-control-large-paddingInline-normal, 12px) + var(--base-size-16, 16px) + var(--primer-control-large-gap, 8px))}.FormControl-input-wrap.FormControl-large.FormControl-input-wrap--trailingAction .FormControl-input.FormControl-large{padding-inline-end:calc(var(--primer-control-large-paddingInline-normal, 12px) + var(--base-size-16, 16px) + var(--primer-control-large-gap, 8px))}.FormControl-input-wrap.FormControl-large.FormControl-input-wrap--trailingAction.FormControl-input-wrap-trailingAction--divider .FormControl-input.FormControl-large{padding-inline-end:calc(var(--primer-control-large-paddingInline-normal, 12px) + var(--base-size-16, 16px) + var(--primer-control-large-gap, 8px) + var(--primer-borderWidth-thin, 1px))}.FormControl-input-wrap.FormControl-large .FormControl-input-trailingAction{height:var(--primer-control-small-size,28px);right:calc(var(--primer-control-medium-paddingInline-condensed, 8px) - .125rem);top:calc(var(--primer-control-medium-paddingInline-condensed, 8px) - .125rem);width:var(--primer-control-small-size,28px)}.FormControl-input-wrap.FormControl-large .FormControl-input-trailingAction:before{height:var(--base-size-20);top:unset}.FormControl-select-wrap{display:grid;grid-template-columns:minmax(0,auto) var(--base-size-16,16px)}.FormControl-select-wrap:after{background-color:var(--color-fg-muted);content:"";grid-column:2;grid-row:1;height:var(--base-size-16,16px);-webkit-mask:url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9IiM1ODYwNjkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTQuNDI3IDkuNDI3IDMuMzk2IDMuMzk2YS4yNTEuMjUxIDAgMCAwIC4zNTQgMGwzLjM5Ni0zLjM5NkEuMjUuMjUgMCAwIDAgMTEuMzk2IDlINC42MDRhLjI1LjI1IDAgMCAwLS4xNzcuNDI3ek00LjQyMyA2LjQ3IDcuODIgMy4wNzJhLjI1LjI1IDAgMCAxIC4zNTQgMEwxMS41NyA2LjQ3YS4yNS4yNSAwIDAgMS0uMTc3LjQyN0g0LjZhLjI1LjI1IDAgMCAxLS4xNzctLjQyN3oiLz48L3N2Zz4=");mask:url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9IiM1ODYwNjkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTQuNDI3IDkuNDI3IDMuMzk2IDMuMzk2YS4yNTEuMjUxIDAgMCAwIC4zNTQgMGwzLjM5Ni0zLjM5NkEuMjUuMjUgMCAwIDAgMTEuMzk2IDlINC42MDRhLjI1LjI1IDAgMCAwLS4xNzcuNDI3ek00LjQyMyA2LjQ3IDcuODIgMy4wNzJhLjI1LjI1IDAgMCAxIC4zNTQgMEwxMS41NyA2LjQ3YS4yNS4yNSAwIDAgMS0uMTc3LjQyN0g0LjZhLjI1LjI1IDAgMCAxLS4xNzctLjQyN3oiLz48L3N2Zz4=");-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;padding-right:var(--base-size-4,4px);place-self:center end;pointer-events:none;width:var(--base-size-16,16px)}.FormControl-select-wrap .FormControl-select{-webkit-appearance:none;appearance:none;grid-column:1/-1;grid-row:1;padding-right:var(--base-size-20,20px)}.FormControl-checkbox-wrap,.FormControl-radio-wrap{display:inline-grid;gap:var(--base-size-8,8px);grid-template-columns:min-content auto}.FormControl-checkbox-wrap .FormControl-checkbox-labelWrap,.FormControl-checkbox-wrap .FormControl-radio-labelWrap,.FormControl-radio-wrap .FormControl-checkbox-labelWrap,.FormControl-radio-wrap .FormControl-radio-labelWrap{display:flex;flex-direction:column;gap:var(--base-size-4,4px)}.FormControl-checkbox-wrap .FormControl-label,.FormControl-radio-wrap .FormControl-label{cursor:pointer}input[type=checkbox].FormControl-checkbox{background-color:var(--color-canvas-default);border:var(--primer-borderWidth-thin,1px) solid var(--color-border-default);color:var(--color-fg-default)}input.FormControl-checkbox[type=checkbox][disabled]{-webkit-text-fill-color:var(--color-primer-fg-disabled);background-color:var(--color-input-disabled-bg);border-color:var(--color-border-default);color:var(--color-primer-fg-disabled);cursor:not-allowed;opacity:1}input.FormControl-checkbox[type=checkbox][invalid]:not(:focus){border-color:var(--color-danger-emphasis)}input.FormControl-checkbox[type=checkbox]:not([type=checkbox],[type=radio]):focus{border-color:var(--color-accent-fg);box-shadow:inset 0 0 0 1px var(--color-accent-fg);outline:none}input.FormControl-checkbox[type=checkbox]:not([type=checkbox],[type=radio]):focus:not(:focus-visible){border-color:#0000;border-color:var(--color-accent-fg);box-shadow:inset 0 0 0 1px #0000 var(--color-accent-fg);outline:none}input.FormControl-checkbox[type=checkbox]:not([type=checkbox],[type=radio]):focus-visible{border-color:var(--color-accent-fg);box-shadow:inset 0 0 0 1px var(--color-accent-fg);outline:none}input[type=checkbox].FormControl-checkbox{-webkit-appearance:none;appearance:none;border-color:var(--color-neutral-emphasis);border-radius:var(--primer-borderRadius-small,3px);cursor:pointer;display:grid;height:var(--base-size-16,16px);margin:.125rem 0 0;place-content:center;position:relative;transition:background-color,border-color 80ms cubic-bezier(.33,1,.68,1);width:var(--base-size-16,16px)}input.FormControl-checkbox[type=checkbox]:before{background-color:var(--color-fg-on-emphasis);clip-path:inset(var(--base-size-16,16px) 0 0 0);content:"";height:var(--base-size-16,16px);-webkit-mask-image:url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iOSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTExLjc4LjIyYS43NS43NSAwIDAgMSAwIDEuMDYxTDQuNTIgOC41NDFhLjc1Mi43NTIgMCAwIDEtMS4wNjIgMEwuMjAyIDUuMjg1YS43NS43NSAwIDAgMSAxLjA2MS0xLjA2MWwyLjcyNSAyLjcyM0wxMC43MTguMjJhLjc1MS43NTEgMCAwIDEgMS4wNjIgMFoiIGZpbGw9IiNmZmYiLz48L3N2Zz4=");mask-image:url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iOSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTExLjc4LjIyYS43NS43NSAwIDAgMSAwIDEuMDYxTDQuNTIgOC41NDFhLjc1Mi43NTIgMCAwIDEtMS4wNjIgMEwuMjAyIDUuMjg1YS43NS43NSAwIDAgMSAxLjA2MS0xLjA2MWwyLjcyNSAyLjcyM0wxMC43MTguMjJhLjc1MS43NTEgMCAwIDEgMS4wNjIgMFoiIGZpbGw9IiNmZmYiLz48L3N2Zz4=");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:75%;mask-size:75%;transition:visibility 0s linear .23s;visibility:hidden;width:var(--base-size-16,16px)}@media screen and (prefers-reduced-motion:no-preference){input.FormControl-checkbox[type=checkbox]:before{animation:checkmarkOut 80ms cubic-bezier(.65,0,.35,1) forwards}}input.FormControl-checkbox[type=checkbox]:after{content:"";height:100%;left:50%;min-height:var(--primer-control-medium-size,32px) var(--primer-control-medium-size,32px);position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:100%}input.FormControl-checkbox[type=checkbox][disabled]~.FormControl-checkbox-labelWrap .FormControl-label,input.FormControl-checkbox[type=checkbox][disabled]~.FormControl-radio-labelWrap .FormControl-label{color:var(--color-primer-fg-disabled);cursor:not-allowed}input.FormControl-checkbox[type=checkbox]:checked{background:var(--color-accent-fg);border-color:var(--color-accent-fg);transition:background-color,border-color 80ms cubic-bezier(.32,0,.67,0) 0ms}input.FormControl-checkbox[type=checkbox]:checked:before{transition:visibility 0s linear 0s;visibility:visible}@media screen and (prefers-reduced-motion:no-preference){input.FormControl-checkbox[type=checkbox]:checked:before{animation:checkmarkIn 80ms cubic-bezier(.65,0,.35,1) 80ms forwards}}input.FormControl-checkbox[type=checkbox]:checked:disabled{background-color:var(--color-primer-fg-disabled);border-color:var(--color-primer-fg-disabled);cursor:not-allowed;opacity:1}input.FormControl-checkbox[type=checkbox]:checked:disabled:before{background-color:var(--color-fg-on-emphasis)}@media (forced-colors:active){input.FormControl-checkbox[type=checkbox]:checked{background-color:canvastext;border-color:canvastext}}input.FormControl-checkbox[type=checkbox]:focus-visible{box-shadow:none;outline:2px solid var(--color-accent-fg);outline-offset:2px}input.FormControl-checkbox[type=checkbox]:indeterminate:before{-webkit-mask-image:url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTAgMWExIDEgMCAwIDEgMS0xaDhhMSAxIDAgMSAxIDAgMkgxYTEgMSAwIDAgMS0xLTFaIiBmaWxsPSIjZmZmIi8+PC9zdmc+");mask-image:url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTAgMWExIDEgMCAwIDEgMS0xaDhhMSAxIDAgMSAxIDAgMkgxYTEgMSAwIDAgMS0xLTFaIiBmaWxsPSIjZmZmIi8+PC9zdmc+");visibility:visible}input[type=radio].FormControl-radio{background-color:var(--color-canvas-default);border:var(--primer-borderWidth-thin,1px) solid var(--color-border-default);color:var(--color-fg-default)}input.FormControl-radio[type=radio][disabled]{-webkit-text-fill-color:var(--color-primer-fg-disabled);background-color:var(--color-input-disabled-bg);border-color:var(--color-border-default);color:var(--color-primer-fg-disabled);cursor:not-allowed;opacity:1}input.FormControl-radio[type=radio][invalid]:not(:focus){border-color:var(--color-danger-emphasis)}input.FormControl-radio[type=radio]:not([type=checkbox],[type=radio]):focus{border-color:var(--color-accent-fg);box-shadow:inset 0 0 0 1px var(--color-accent-fg);outline:none}input.FormControl-radio[type=radio]:not([type=checkbox],[type=radio]):focus:not(:focus-visible){border-color:#0000;border-color:var(--color-accent-fg);box-shadow:inset 0 0 0 1px #0000 var(--color-accent-fg);outline:none}input.FormControl-radio[type=radio]:not([type=checkbox],[type=radio]):focus-visible{border-color:var(--color-accent-fg);box-shadow:inset 0 0 0 1px var(--color-accent-fg);outline:none}input[type=radio].FormControl-radio{-webkit-appearance:none;appearance:none;border-color:var(--color-neutral-emphasis);border-radius:var(--primer-borderRadius-full,100vh);cursor:pointer;height:var(--base-size-16,16px);margin:.125rem 0 0;position:relative;transition:background-color,border-color 80ms cubic-bezier(.33,1,.68,1);width:var(--base-size-16,16px)}input.FormControl-radio[type=radio]:after{content:"";height:100%;left:50%;min-height:var(--primer-control-medium-size,32px) var(--primer-control-medium-size,32px);position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:100%}input.FormControl-radio[type=radio]:checked{border-color:var(--color-accent-fg);border-width:var(--base-size-4,4px)}input.FormControl-radio[type=radio]:checked:disabled{border-color:var(--color-primer-fg-disabled);cursor:not-allowed}input.FormControl-radio[type=radio]:focus-visible{box-shadow:none;outline:2px solid var(--color-accent-fg);outline-offset:2px}@media (forced-colors:active){input[type=radio].FormControl-radio{background-color:canvastext;border-color:canvastext}}@keyframes checkmarkIn{0%{clip-path:inset(var(--base-size-16,16px) 0 0 0)}to{clip-path:inset(0 0 0 0)}}@keyframes checkmarkOut{0%{clip-path:inset(0 0 0 0)}to{clip-path:inset(var(--base-size-16,16px) 0 0 0)}}
|
1
|
+
.FormControl{display:inline-flex;flex-direction:column;gap:var(--base-size-4,.25rem)}.FormControl--fullWidth{display:flex}.FormControl-label{color:var(--fgColor-default,var(--color-fg-default));font-size:var(--text-body-size-medium,.875rem);font-weight:var(--base-text-weight-semibold,600);line-height:var(--text-body-lineHeight-medium,1.4285)}.FormControl-caption{color:var(--fgColor-muted,var(--color-fg-muted));font-weight:var(--text-caption-weight,400);margin-bottom:0}.FormControl-caption,.FormControl-inlineValidation{font-size:var(--text-caption-size,.75rem);line-height:var(--text-caption-lineHeight,1.3333)}.FormControl-inlineValidation{color:var(--control-borderColor-danger,var(--color-danger-emphasis));display:flex;font-weight:var(--base-text-weight-semibold,600);fill:var(--control-borderColor-danger,var(--color-danger-emphasis));align-items:flex-start;flex-direction:row;gap:var(--base-size-4,.25rem)}.FormControl-inlineValidation p{margin-bottom:0}.FormControl-inlineValidation--success{color:var(--control-borderColor-success,var(--color-success-emphasis));fill:var(--control-borderColor-success,var(--color-success-emphasis))}.FormControl-inlineValidation--visual{align-items:center;display:flex;min-height:var(--base-size-16,1rem)}.FormControl-spacingWrapper{display:flex;flex-direction:column;row-gap:.5rem}.FormControl-horizontalGroup{column-gap:.5rem;display:flex}.FormControl-input,.FormControl-select,.FormControl-textarea{background-color:var(--bgColor-default,var(--color-canvas-default));border:var(--borderWidth-thin,max(1px,.0625rem)) solid var(--control-borderColor-rest,var(--color-border-default));border-radius:var(--borderRadius-medium,.375rem);box-shadow:var(--shadow-inset,var(--color-primer-shadow-inset));color:var(--fgColor-default,var(--color-fg-default));font-size:var(--text-body-size-medium,.875rem);line-height:var(--text-body-lineHeight-medium,1.4285);padding-block:calc(var(--control-medium-paddingBlock, 6px) - var(--borderWidth-thin, 1px));padding-inline:var(--control-medium-paddingInline-condensed,.5rem);transition:80ms cubic-bezier(.33,1,.68,1);transition-property:color,background-color,box-shadow,border-color;width:100%}.FormControl-input[disabled],.FormControl-select[disabled],.FormControl-textarea[disabled]{background-color:var(--control-bgColor-disabled,var(--color-input-disabled-bg));border-color:var(--control-borderColor-disabled,var(--color-btn-border));box-shadow:none;color:var(--control-fgColor-disabled,var(--color-primer-fg-disabled));cursor:not-allowed;opacity:1;-webkit-text-fill-color:var(--control-fgColor-disabled,var(--color-primer-fg-disabled))}.FormControl-input[invalid=true]:not(:focus),.FormControl-select[invalid=true]:not(:focus),.FormControl-textarea[invalid=true]:not(:focus){border-color:var(--control-borderColor-danger,var(--color-danger-emphasis))}.FormControl-input[invalid=false]:not(:focus),.FormControl-select[invalid=false]:not(:focus),.FormControl-textarea[invalid=false]:not(:focus){border-color:var(--control-borderColor-success,var(--color-success-emphasis))}.FormControl-input:not([type=checkbox],[type=radio]):focus,.FormControl-select:not([type=checkbox],[type=radio]):focus,.FormControl-textarea:not([type=checkbox],[type=radio]):focus{border-color:var(--focus-outlineColor,var(--color-accent-fg));box-shadow:inset 0 0 0 1px var(--focus-outlineColor,var(--color-accent-fg));outline:none}.FormControl-input:not([type=checkbox],[type=radio]):focus:not(:focus-visible),.FormControl-select:not([type=checkbox],[type=radio]):focus:not(:focus-visible),.FormControl-textarea:not([type=checkbox],[type=radio]):focus:not(:focus-visible){border-color:#0000;border-color:var(--focus-outlineColor,var(--color-accent-fg));box-shadow:inset 0 0 0 1px #0000 var(--focus-outlineColor,var(--color-accent-fg));outline:none}.FormControl-input:not([type=checkbox],[type=radio]):focus-visible,.FormControl-select:not([type=checkbox],[type=radio]):focus-visible,.FormControl-textarea:not([type=checkbox],[type=radio]):focus-visible{border-color:var(--focus-outlineColor,var(--color-accent-fg));box-shadow:inset 0 0 0 1px var(--focus-outlineColor,var(--color-accent-fg));outline:none}.FormControl-input[disabled]::placeholder,.FormControl-select[disabled]::placeholder,.FormControl-textarea[disabled]::placeholder{color:var(--control-fgColor-disabled,var(--color-primer-fg-disabled))}.FormControl-input[readonly],.FormControl-select[readonly],.FormControl-textarea[readonly]{background-color:var(--control-bgColor-disabled,var(--color-input-disabled-bg))}.FormControl-input::placeholder,.FormControl-select::placeholder,.FormControl-textarea::placeholder{color:var(--control-fgColor-placeholder,var(--color-fg-subtle));opacity:1}.FormControl-input.FormControl-small,.FormControl-select.FormControl-small,.FormControl-textarea.FormControl-small{font-size:var(--text-body-size-small,.75rem);height:var(--control-small-size,1.75rem);padding-block:var(--control-small-paddingBlock,.25rem);padding-inline:var(--control-small-paddingInline-normal,.75rem)}.FormControl-input.FormControl-medium,.FormControl-select.FormControl-medium,.FormControl-textarea.FormControl-medium{height:var(--control-medium-size,2rem)}.FormControl-input.FormControl-large,.FormControl-select.FormControl-large,.FormControl-textarea.FormControl-large{height:var(--control-large-size,2.5rem);padding-block:var(--control-large-paddingBlock,.625rem);padding-inline:var(--control-large-paddingInline-normal,.75rem)}.FormControl-input.FormControl-inset,.FormControl-select.FormControl-inset,.FormControl-textarea.FormControl-inset{background-color:var(--bgColor-muted,var(--color-canvas-subtle))}.FormControl-input.FormControl-inset:focus,.FormControl-input.FormControl-inset:focus-visible,.FormControl-select.FormControl-inset:focus,.FormControl-select.FormControl-inset:focus-visible,.FormControl-textarea.FormControl-inset:focus,.FormControl-textarea.FormControl-inset:focus-visible{background-color:var(--bgColor-default,var(--color-canvas-default))}.FormControl-input.FormControl-monospace,.FormControl-select.FormControl-monospace,.FormControl-textarea.FormControl-monospace{font-family:var(--fontStack-monospace,ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace)}.FormControl-input.FormControl-error,.FormControl-select.FormControl-error,.FormControl-textarea.FormControl-error{border-color:var(--control-borderColor-danger,var(--color-danger-emphasis))}.FormControl-input.FormControl-success,.FormControl-select.FormControl-success,.FormControl-textarea.FormControl-success{border-color:var(--control-borderColor-success,var(--color-success-emphasis))}.FormControl-input.FormControl-warning,.FormControl-select.FormControl-warning,.FormControl-textarea.FormControl-warning{border-color:var(--control-borderColor-warning,var(--color-attention-emphasis))}.FormControl-toggleSwitchInput{align-items:flex-start;display:flex;gap:var(--base-size-16,1rem)}.FormControl-input-wrap{display:grid;position:relative}.FormControl-input-wrap .FormControl-input-leadingVisualWrap{color:var(--fgColor-muted,var(--color-fg-muted));display:block;height:var(--base-size-16,1rem);left:var(--base-size-8,.5rem);pointer-events:none;position:absolute;top:var(--base-size-8,.5rem);width:var(--base-size-16,1rem)}.FormControl-input-wrap .FormControl-input-leadingVisualWrap .FormControl-input-leadingVisual{display:block;-webkit-user-select:none;user-select:none}.FormControl-input-wrap .FormControl-input-trailingAction{align-items:center;background:#0000;border:0;border-radius:var(--borderRadius-small,.1875rem);color:var(--fgColor-muted,var(--color-fg-muted));cursor:pointer;display:grid;height:var(--control-xsmall-size,1.5rem);justify-content:center;padding:0;position:absolute;right:var(--base-size-4,.25rem);top:var(--base-size-4,.25rem);transition:.2s cubic-bezier(.3,0,.5,1);transition-property:color,background-color,border-color;width:var(--control-xsmall-size,1.5rem);z-index:4}.FormControl-input-wrap .FormControl-input-trailingAction svg{-webkit-user-select:none;user-select:none}.FormControl-input-wrap .FormControl-input-trailingAction[disabled]{color:var(--control-fgColor-disabled,var(--color-primer-fg-disabled));pointer-events:none}.FormControl-input-wrap .FormControl-input-trailingAction:hover{background:var(--control-transparent-bgColor-hover,var(--color-action-list-item-default-hover-bg))}.FormControl-input-wrap .FormControl-input-trailingAction:active{background:var(--control-transparent-bgColor-active,var(--color-action-list-item-default-active-bg))}.FormControl-input-wrap .FormControl-input-trailingAction.FormControl-input-trailingAction--divider:before{background:var(--borderColor-default,var(--color-border-default));content:"";display:block;height:var(--base-size-16,1rem);left:calc(var(--base-size-4,.25rem)*-1);position:absolute;top:calc((var(--control-xsmall-size,1.5rem) - var(--base-size-16,1rem))/2);width:var(--borderWidth-thin,max(1px,.0625rem))}.FormControl-input-wrap .FormControl-input-trailingAction:after{content:"";height:100%;left:50%;min-height:var(--control-medium-size,2rem) var(--control-medium-size,2rem);position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:100%}@media (pointer:coarse){.FormControl-input-wrap .FormControl-input-trailingAction:after{min-height:var(--control-minTarget-coarse,2.75rem);min-width:var(--control-minTarget-coarse,2.75rem)}}.FormControl-input-wrap.FormControl-input-wrap--leadingVisual .FormControl-input{padding-inline-start:calc(var(--control-medium-paddingInline-condensed,.5rem) + var(--base-size-16,1rem) + var(--control-medium-gap,.5rem))}.FormControl-input-wrap.FormControl-input-wrap--trailingAction .FormControl-input{padding-inline-end:calc(var(--control-medium-paddingInline-condensed,.5rem) + var(--base-size-16,1rem) + var(--control-medium-gap,.5rem))}.FormControl-input-wrap.FormControl-input-wrap--trailingAction.FormControl-input-wrap-trailingAction--divider .FormControl-input{padding-inline-end:calc(var(--control-medium-paddingInline-condensed,.5rem) + var(--base-size-16,1rem) + var(--control-medium-gap,.5rem) + var(--borderWidth-thin,max(1px, .0625rem)))}.FormControl-input-wrap.FormControl-input-wrap--small .FormControl-input-leadingVisualWrap{left:calc(var(--control-medium-paddingInline-condensed,.5rem) - .125rem);top:calc(var(--control-medium-paddingInline-condensed,.5rem) - .125rem)}.FormControl-input-wrap.FormControl-input-wrap--small.FormControl-input-wrap--trailingAction .FormControl-input.FormControl-small{padding-inline-end:calc(var(--control-small-paddingInline-condensed,.5rem) + var(--base-size-16,1rem) + var(--control-small-gap,.25rem))}.FormControl-input-wrap.FormControl-input-wrap--small.FormControl-input-wrap--trailingAction.FormControl-input-wrap-trailingAction--divider .FormControl-input.FormControl-small{padding-inline-end:calc(var(--control-small-paddingInline-condensed,.5rem) + var(--base-size-16,1rem) + var(--control-small-gap,.25rem) + var(--borderWidth-thin,max(1px, .0625rem)))}.FormControl-input-wrap.FormControl-input-wrap--small .FormControl-input-trailingAction{height:calc(var(--control-small-size,1.75rem) - var(--base-size-8,.5rem));width:calc(var(--control-small-size,1.75rem) - var(--base-size-8,.5rem))}.FormControl-input-wrap.FormControl-input-wrap--small .FormControl-input-trailingAction:before{top:calc((var(--control-xsmall-size,1.5rem) - var(--base-size-16,1rem))/4)}.FormControl-input-wrap.FormControl-input-wrap--large .FormControl-input-leadingVisualWrap{left:var(--control-medium-paddingInline-normal,.75rem);top:var(--control-medium-paddingInline-normal,.75rem)}.FormControl-input-wrap.FormControl-input-wrap--large.FormControl-input-wrap--leadingVisual .FormControl-input.FormControl-large{padding-inline-start:calc(var(--control-large-paddingInline-normal,.75rem) + var(--base-size-16,1rem) + var(--control-large-gap,.5rem))}.FormControl-input-wrap.FormControl-input-wrap--large.FormControl-input-wrap--trailingAction .FormControl-input.FormControl-large{padding-inline-end:calc(var(--control-large-paddingInline-normal,.75rem) + var(--base-size-16,1rem) + var(--control-large-gap,.5rem))}.FormControl-input-wrap.FormControl-input-wrap--large.FormControl-input-wrap--trailingAction.FormControl-input-wrap-trailingAction--divider .FormControl-input.FormControl-large{padding-inline-end:calc(var(--control-large-paddingInline-normal,.75rem) + var(--base-size-16,1rem) + var(--control-large-gap,.5rem) + var(--borderWidth-thin,max(1px, .0625rem)))}.FormControl-input-wrap.FormControl-input-wrap--large .FormControl-input-trailingAction{height:var(--control-small-size,1.75rem);right:calc(var(--control-medium-paddingInline-condensed,.5rem) - .125rem);top:calc(var(--control-medium-paddingInline-condensed,.5rem) - .125rem);width:var(--control-small-size,1.75rem)}.FormControl-input-wrap.FormControl-input-wrap--large .FormControl-input-trailingAction:before{height:var(--base-size-20,1.25rem);top:unset}.FormControl-select-wrap{display:grid;grid-template-columns:minmax(0,auto) var(--base-size-16,1rem)}.FormControl-select-wrap:after{background-color:var(--bgColor-neutral-emphasis,var(--color-fg-subtle));content:"";grid-column:2;grid-row:1;height:var(--base-size-16,1rem);-webkit-mask:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iIzU4NjA2OSI+PHBhdGggZD0ibTQuNDI3IDkuNDI3IDMuMzk2IDMuMzk2YS4yNS4yNSAwIDAgMCAuMzU0IDBsMy4zOTYtMy4zOTZBLjI1LjI1IDAgMCAwIDExLjM5NiA5SDQuNjA0YS4yNS4yNSAwIDAgMC0uMTc3LjQyN000LjQyMyA2LjQ3IDcuODIgMy4wNzJhLjI1LjI1IDAgMCAxIC4zNTQgMEwxMS41NyA2LjQ3YS4yNS4yNSAwIDAgMS0uMTc3LjQyN0g0LjZhLjI1LjI1IDAgMCAxLS4xNzctLjQyNyIvPjwvc3ZnPg==");mask:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iIzU4NjA2OSI+PHBhdGggZD0ibTQuNDI3IDkuNDI3IDMuMzk2IDMuMzk2YS4yNS4yNSAwIDAgMCAuMzU0IDBsMy4zOTYtMy4zOTZBLjI1LjI1IDAgMCAwIDExLjM5NiA5SDQuNjA0YS4yNS4yNSAwIDAgMC0uMTc3LjQyN000LjQyMyA2LjQ3IDcuODIgMy4wNzJhLjI1LjI1IDAgMCAxIC4zNTQgMEwxMS41NyA2LjQ3YS4yNS4yNSAwIDAgMS0uMTc3LjQyN0g0LjZhLjI1LjI1IDAgMCAxLS4xNzctLjQyNyIvPjwvc3ZnPg==");-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;padding-right:var(--base-size-4,.25rem);place-self:center end;pointer-events:none;width:var(--base-size-16,1rem)}.FormControl-select-wrap .FormControl-select{-webkit-appearance:none;appearance:none;grid-column:1/-1;grid-row:1;padding-right:var(--base-size-20,1.25rem)}.FormControl-checkbox-wrap,.FormControl-radio-wrap{display:inline-grid;gap:var(--base-size-8,.5rem);grid-template-columns:min-content auto}.FormControl-checkbox-wrap .FormControl-checkbox-labelWrap,.FormControl-checkbox-wrap .FormControl-radio-labelWrap,.FormControl-radio-wrap .FormControl-checkbox-labelWrap,.FormControl-radio-wrap .FormControl-radio-labelWrap{display:flex;flex-direction:column;gap:var(--base-size-4,.25rem)}.FormControl-checkbox-wrap .FormControl-label,.FormControl-radio-wrap .FormControl-label{cursor:pointer}.FormControl-check-group-wrap fieldset,.FormControl-radio-group-wrap fieldset{border:0;margin:0;padding:0}input[type=checkbox].FormControl-checkbox{-webkit-appearance:none;appearance:none;background-color:var(--bgColor-default,var(--color-canvas-default));border:var(--borderWidth-thin,max(1px,.0625rem)) solid var(--control-borderColor-rest,var(--color-border-default));border-color:var(--control-borderColor-emphasis,var(--color-switch-knob-border));border-radius:var(--borderRadius-small,.1875rem);box-shadow:var(--shadow-inset,var(--color-primer-shadow-inset));color:var(--fgColor-default,var(--color-fg-default));cursor:pointer;display:grid;height:var(--base-size-16,1rem);margin:.125rem 0 0;place-content:center;position:relative;transition:background-color,border-color 80ms cubic-bezier(.33,1,.68,1);width:var(--base-size-16,1rem)}input.FormControl-checkbox[type=checkbox][disabled]{background-color:var(--control-bgColor-disabled,var(--color-input-disabled-bg));border-color:var(--control-borderColor-disabled,var(--color-btn-border));box-shadow:none;color:var(--control-fgColor-disabled,var(--color-primer-fg-disabled));cursor:not-allowed;opacity:1;-webkit-text-fill-color:var(--control-fgColor-disabled,var(--color-primer-fg-disabled))}input.FormControl-checkbox[type=checkbox][invalid=true]:not(:focus){border-color:var(--control-borderColor-danger,var(--color-danger-emphasis))}input.FormControl-checkbox[type=checkbox][invalid=false]:not(:focus){border-color:var(--control-borderColor-success,var(--color-success-emphasis))}input.FormControl-checkbox[type=checkbox]:not([type=checkbox],[type=radio]):focus{border-color:var(--focus-outlineColor,var(--color-accent-fg));box-shadow:inset 0 0 0 1px var(--focus-outlineColor,var(--color-accent-fg));outline:none}input.FormControl-checkbox[type=checkbox]:not([type=checkbox],[type=radio]):focus:not(:focus-visible){border-color:#0000;border-color:var(--focus-outlineColor,var(--color-accent-fg));box-shadow:inset 0 0 0 1px #0000 var(--focus-outlineColor,var(--color-accent-fg));outline:none}input.FormControl-checkbox[type=checkbox]:not([type=checkbox],[type=radio]):focus-visible{border-color:var(--focus-outlineColor,var(--color-accent-fg));box-shadow:inset 0 0 0 1px var(--focus-outlineColor,var(--color-accent-fg));outline:none}input.FormControl-checkbox[type=checkbox]:before{background-color:var(--control-checked-fgColor-rest,var(--color-switch-track-checked-fg));clip-path:inset(var(--base-size-16,1rem) 0 0 0);content:"";height:var(--base-size-16,1rem);-webkit-mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSI5IiBmaWxsPSJub25lIj48cGF0aCBmaWxsPSIjZmZmIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMS43OC4yMmEuNzUuNzUgMCAwIDEgMCAxLjA2MUw0LjUyIDguNTQxYS43NS43NSAwIDAgMS0xLjA2MiAwTC4yMDIgNS4yODVhLjc1Ljc1IDAgMCAxIDEuMDYxLTEuMDYxbDIuNzI1IDIuNzIzTDEwLjcxOC4yMmEuNzUuNzUgMCAwIDEgMS4wNjIgMCIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+");mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSI5IiBmaWxsPSJub25lIj48cGF0aCBmaWxsPSIjZmZmIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMS43OC4yMmEuNzUuNzUgMCAwIDEgMCAxLjA2MUw0LjUyIDguNTQxYS43NS43NSAwIDAgMS0xLjA2MiAwTC4yMDIgNS4yODVhLjc1Ljc1IDAgMCAxIDEuMDYxLTEuMDYxbDIuNzI1IDIuNzIzTDEwLjcxOC4yMmEuNzUuNzUgMCAwIDEgMS4wNjIgMCIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:75%;mask-size:75%;transition:visibility 0s linear .23s;visibility:hidden;width:var(--base-size-16,1rem)}@media screen and (prefers-reduced-motion:no-preference){input.FormControl-checkbox[type=checkbox]:before{animation:checkmarkOut 80ms cubic-bezier(.65,0,.35,1) forwards}}input.FormControl-checkbox[type=checkbox]:after{content:"";height:100%;left:50%;min-height:var(--control-medium-size,2rem) var(--control-medium-size,2rem);position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:100%}input.FormControl-checkbox[type=checkbox][disabled]~.FormControl-checkbox-labelWrap .FormControl-label{color:var(--control-fgColor-disabled,var(--color-primer-fg-disabled));cursor:not-allowed}input.FormControl-checkbox[type=checkbox]:checked{background:var(--control-checked-bgColor-rest,var(--color-accent-fg));border-color:var(--control-checked-borderColor-rest,var(--color-accent-fg));transition:background-color,border-color 80ms cubic-bezier(.32,0,.67,0) 0ms}input.FormControl-checkbox[type=checkbox]:checked:before{transition:visibility 0s linear 0s;visibility:visible}@media screen and (prefers-reduced-motion:no-preference){input.FormControl-checkbox[type=checkbox]:checked:before{animation:checkmarkIn 80ms cubic-bezier(.65,0,.35,1) 80ms forwards}}input.FormControl-checkbox[type=checkbox]:checked:disabled{background-color:var(--control-fgColor-disabled,var(--color-primer-fg-disabled));border-color:var(--control-fgColor-disabled,var(--color-primer-fg-disabled));cursor:not-allowed;opacity:1}input.FormControl-checkbox[type=checkbox]:checked:disabled:before{background-color:var(--control-checked-fgColor-rest,var(--color-switch-track-checked-fg))}@media (forced-colors:active){input.FormControl-checkbox[type=checkbox]:checked{background-color:canvastext;border-color:canvastext}}input.FormControl-checkbox[type=checkbox]:focus-visible{box-shadow:none;outline:2px solid var(--focus-outlineColor,var(--color-accent-fg));outline-offset:2px}input.FormControl-checkbox[type=checkbox]:indeterminate:before{-webkit-mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMCIgaGVpZ2h0PSIyIiBmaWxsPSJub25lIj48cGF0aCBmaWxsPSIjZmZmIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0wIDFhMSAxIDAgMCAxIDEtMWg4YTEgMSAwIDEgMSAwIDJIMWExIDEgMCAwIDEtMS0xIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=");mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMCIgaGVpZ2h0PSIyIiBmaWxsPSJub25lIj48cGF0aCBmaWxsPSIjZmZmIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0wIDFhMSAxIDAgMCAxIDEtMWg4YTEgMSAwIDEgMSAwIDJIMWExIDEgMCAwIDEtMS0xIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=");visibility:visible}input[type=radio].FormControl-radio{-webkit-appearance:none;appearance:none;background-color:var(--bgColor-default,var(--color-canvas-default));border:var(--borderWidth-thin,max(1px,.0625rem)) solid var(--control-borderColor-rest,var(--color-border-default));border-color:var(--control-borderColor-emphasis,var(--color-switch-knob-border));border-radius:var(--borderRadius-full,624.9375rem);box-shadow:var(--shadow-inset,var(--color-primer-shadow-inset));color:var(--fgColor-default,var(--color-fg-default));cursor:pointer;height:var(--base-size-16,1rem);margin:.125rem 0 0;position:relative;transition:background-color,border-color 80ms cubic-bezier(.33,1,.68,1);width:var(--base-size-16,1rem)}input.FormControl-radio[type=radio][disabled]{background-color:var(--control-bgColor-disabled,var(--color-input-disabled-bg));border-color:var(--control-borderColor-disabled,var(--color-btn-border));box-shadow:none;color:var(--control-fgColor-disabled,var(--color-primer-fg-disabled));cursor:not-allowed;opacity:1;-webkit-text-fill-color:var(--control-fgColor-disabled,var(--color-primer-fg-disabled))}input.FormControl-radio[type=radio][invalid=true]:not(:focus){border-color:var(--control-borderColor-danger,var(--color-danger-emphasis))}input.FormControl-radio[type=radio][invalid=false]:not(:focus){border-color:var(--control-borderColor-success,var(--color-success-emphasis))}input.FormControl-radio[type=radio]:not([type=checkbox],[type=radio]):focus{border-color:var(--focus-outlineColor,var(--color-accent-fg));box-shadow:inset 0 0 0 1px var(--focus-outlineColor,var(--color-accent-fg));outline:none}input.FormControl-radio[type=radio]:not([type=checkbox],[type=radio]):focus:not(:focus-visible){border-color:#0000;border-color:var(--focus-outlineColor,var(--color-accent-fg));box-shadow:inset 0 0 0 1px #0000 var(--focus-outlineColor,var(--color-accent-fg));outline:none}input.FormControl-radio[type=radio]:not([type=checkbox],[type=radio]):focus-visible{border-color:var(--focus-outlineColor,var(--color-accent-fg));box-shadow:inset 0 0 0 1px var(--focus-outlineColor,var(--color-accent-fg));outline:none}input.FormControl-radio[type=radio]:after{content:"";height:100%;left:50%;min-height:var(--control-medium-size,2rem) var(--control-medium-size,2rem);position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:100%}input.FormControl-radio[type=radio][disabled]~.FormControl-radio-labelWrap .FormControl-label{color:var(--control-fgColor-disabled,var(--color-primer-fg-disabled));cursor:not-allowed}input.FormControl-radio[type=radio]:checked{border-color:var(--control-checked-borderColor-rest,var(--color-accent-fg));border-width:var(--base-size-4,.25rem)}input.FormControl-radio[type=radio]:checked:disabled,input.FormControl-radio[type=radio][disabled]:checked{border-color:var(--control-fgColor-disabled,var(--color-primer-fg-disabled));cursor:not-allowed}input.FormControl-radio[type=radio]:checked:disabled~.FormControl-radio-labelWrap .FormControl-label,input.FormControl-radio[type=radio][disabled]:checked~.FormControl-radio-labelWrap .FormControl-label{color:var(--control-fgColor-disabled,var(--color-primer-fg-disabled));cursor:not-allowed}input.FormControl-radio[type=radio]:focus-visible{box-shadow:none;outline:2px solid var(--focus-outlineColor,var(--color-accent-fg));outline-offset:2px}@media (forced-colors:active){input[type=radio].FormControl-radio{background-color:canvastext;border-color:canvastext}}@keyframes checkmarkIn{0%{clip-path:inset(var(--base-size-16,1rem) 0 0 0)}to{clip-path:inset(0 0 0 0)}}@keyframes checkmarkOut{0%{clip-path:inset(0 0 0 0)}to{clip-path:inset(var(--base-size-16,1rem) 0 0 0)}}
|
@@ -1 +1,144 @@
|
|
1
|
-
{
|
1
|
+
{
|
2
|
+
"name": "alpha/text_field",
|
3
|
+
"selectors": [
|
4
|
+
".FormControl",
|
5
|
+
".FormControl--fullWidth",
|
6
|
+
".FormControl-label",
|
7
|
+
".FormControl-caption",
|
8
|
+
".FormControl-inlineValidation",
|
9
|
+
".FormControl-inlineValidation p",
|
10
|
+
".FormControl-inlineValidation--success",
|
11
|
+
".FormControl-inlineValidation--visual",
|
12
|
+
".FormControl-spacingWrapper",
|
13
|
+
".FormControl-horizontalGroup",
|
14
|
+
".FormControl-input",
|
15
|
+
".FormControl-select",
|
16
|
+
".FormControl-textarea",
|
17
|
+
".FormControl-input[disabled]",
|
18
|
+
".FormControl-select[disabled]",
|
19
|
+
".FormControl-textarea[disabled]",
|
20
|
+
".FormControl-input[invalid=true]:not(:focus)",
|
21
|
+
".FormControl-select[invalid=true]:not(:focus)",
|
22
|
+
".FormControl-textarea[invalid=true]:not(:focus)",
|
23
|
+
".FormControl-input[invalid=false]:not(:focus)",
|
24
|
+
".FormControl-select[invalid=false]:not(:focus)",
|
25
|
+
".FormControl-textarea[invalid=false]:not(:focus)",
|
26
|
+
".FormControl-input:not([type=checkbox],[type=radio]):focus",
|
27
|
+
".FormControl-select:not([type=checkbox],[type=radio]):focus",
|
28
|
+
".FormControl-textarea:not([type=checkbox],[type=radio]):focus",
|
29
|
+
".FormControl-input:not([type=checkbox],[type=radio]):focus:not(:focus-visible)",
|
30
|
+
".FormControl-select:not([type=checkbox],[type=radio]):focus:not(:focus-visible)",
|
31
|
+
".FormControl-textarea:not([type=checkbox],[type=radio]):focus:not(:focus-visible)",
|
32
|
+
".FormControl-input:not([type=checkbox],[type=radio]):focus-visible",
|
33
|
+
".FormControl-select:not([type=checkbox],[type=radio]):focus-visible",
|
34
|
+
".FormControl-textarea:not([type=checkbox],[type=radio]):focus-visible",
|
35
|
+
".FormControl-input[disabled]::placeholder",
|
36
|
+
".FormControl-select[disabled]::placeholder",
|
37
|
+
".FormControl-textarea[disabled]::placeholder",
|
38
|
+
".FormControl-input[readonly]",
|
39
|
+
".FormControl-select[readonly]",
|
40
|
+
".FormControl-textarea[readonly]",
|
41
|
+
".FormControl-input::placeholder",
|
42
|
+
".FormControl-select::placeholder",
|
43
|
+
".FormControl-textarea::placeholder",
|
44
|
+
".FormControl-input.FormControl-small",
|
45
|
+
".FormControl-select.FormControl-small",
|
46
|
+
".FormControl-textarea.FormControl-small",
|
47
|
+
".FormControl-input.FormControl-medium",
|
48
|
+
".FormControl-select.FormControl-medium",
|
49
|
+
".FormControl-textarea.FormControl-medium",
|
50
|
+
".FormControl-input.FormControl-large",
|
51
|
+
".FormControl-select.FormControl-large",
|
52
|
+
".FormControl-textarea.FormControl-large",
|
53
|
+
".FormControl-input.FormControl-inset",
|
54
|
+
".FormControl-select.FormControl-inset",
|
55
|
+
".FormControl-textarea.FormControl-inset",
|
56
|
+
".FormControl-input.FormControl-inset:focus",
|
57
|
+
".FormControl-input.FormControl-inset:focus-visible",
|
58
|
+
".FormControl-select.FormControl-inset:focus",
|
59
|
+
".FormControl-select.FormControl-inset:focus-visible",
|
60
|
+
".FormControl-textarea.FormControl-inset:focus",
|
61
|
+
".FormControl-textarea.FormControl-inset:focus-visible",
|
62
|
+
".FormControl-input.FormControl-monospace",
|
63
|
+
".FormControl-select.FormControl-monospace",
|
64
|
+
".FormControl-textarea.FormControl-monospace",
|
65
|
+
".FormControl-input.FormControl-error",
|
66
|
+
".FormControl-select.FormControl-error",
|
67
|
+
".FormControl-textarea.FormControl-error",
|
68
|
+
".FormControl-input.FormControl-success",
|
69
|
+
".FormControl-select.FormControl-success",
|
70
|
+
".FormControl-textarea.FormControl-success",
|
71
|
+
".FormControl-input.FormControl-warning",
|
72
|
+
".FormControl-select.FormControl-warning",
|
73
|
+
".FormControl-textarea.FormControl-warning",
|
74
|
+
".FormControl-toggleSwitchInput",
|
75
|
+
".FormControl-input-wrap",
|
76
|
+
".FormControl-input-wrap .FormControl-input-leadingVisualWrap",
|
77
|
+
".FormControl-input-wrap .FormControl-input-leadingVisualWrap .FormControl-input-leadingVisual",
|
78
|
+
".FormControl-input-wrap .FormControl-input-trailingAction",
|
79
|
+
".FormControl-input-wrap .FormControl-input-trailingAction svg",
|
80
|
+
".FormControl-input-wrap .FormControl-input-trailingAction[disabled]",
|
81
|
+
".FormControl-input-wrap .FormControl-input-trailingAction:hover",
|
82
|
+
".FormControl-input-wrap .FormControl-input-trailingAction:active",
|
83
|
+
".FormControl-input-wrap .FormControl-input-trailingAction.FormControl-input-trailingAction--divider:before",
|
84
|
+
".FormControl-input-wrap .FormControl-input-trailingAction:after",
|
85
|
+
".FormControl-input-wrap.FormControl-input-wrap--leadingVisual .FormControl-input",
|
86
|
+
".FormControl-input-wrap.FormControl-input-wrap--trailingAction .FormControl-input",
|
87
|
+
".FormControl-input-wrap.FormControl-input-wrap--trailingAction.FormControl-input-wrap-trailingAction--divider .FormControl-input",
|
88
|
+
".FormControl-input-wrap.FormControl-input-wrap--small .FormControl-input-leadingVisualWrap",
|
89
|
+
".FormControl-input-wrap.FormControl-input-wrap--small.FormControl-input-wrap--trailingAction .FormControl-input.FormControl-small",
|
90
|
+
".FormControl-input-wrap.FormControl-input-wrap--small.FormControl-input-wrap--trailingAction.FormControl-input-wrap-trailingAction--divider .FormControl-input.FormControl-small",
|
91
|
+
".FormControl-input-wrap.FormControl-input-wrap--small .FormControl-input-trailingAction",
|
92
|
+
".FormControl-input-wrap.FormControl-input-wrap--small .FormControl-input-trailingAction:before",
|
93
|
+
".FormControl-input-wrap.FormControl-input-wrap--large .FormControl-input-leadingVisualWrap",
|
94
|
+
".FormControl-input-wrap.FormControl-input-wrap--large.FormControl-input-wrap--leadingVisual .FormControl-input.FormControl-large",
|
95
|
+
".FormControl-input-wrap.FormControl-input-wrap--large.FormControl-input-wrap--trailingAction .FormControl-input.FormControl-large",
|
96
|
+
".FormControl-input-wrap.FormControl-input-wrap--large.FormControl-input-wrap--trailingAction.FormControl-input-wrap-trailingAction--divider .FormControl-input.FormControl-large",
|
97
|
+
".FormControl-input-wrap.FormControl-input-wrap--large .FormControl-input-trailingAction",
|
98
|
+
".FormControl-input-wrap.FormControl-input-wrap--large .FormControl-input-trailingAction:before",
|
99
|
+
".FormControl-select-wrap",
|
100
|
+
".FormControl-select-wrap:after",
|
101
|
+
".FormControl-select-wrap .FormControl-select",
|
102
|
+
".FormControl-checkbox-wrap",
|
103
|
+
".FormControl-radio-wrap",
|
104
|
+
".FormControl-checkbox-wrap .FormControl-checkbox-labelWrap",
|
105
|
+
".FormControl-checkbox-wrap .FormControl-radio-labelWrap",
|
106
|
+
".FormControl-radio-wrap .FormControl-checkbox-labelWrap",
|
107
|
+
".FormControl-radio-wrap .FormControl-radio-labelWrap",
|
108
|
+
".FormControl-checkbox-wrap .FormControl-label",
|
109
|
+
".FormControl-radio-wrap .FormControl-label",
|
110
|
+
".FormControl-check-group-wrap fieldset",
|
111
|
+
".FormControl-radio-group-wrap fieldset",
|
112
|
+
"input[type=checkbox].FormControl-checkbox",
|
113
|
+
"input.FormControl-checkbox[type=checkbox][disabled]",
|
114
|
+
"input.FormControl-checkbox[type=checkbox][invalid=true]:not(:focus)",
|
115
|
+
"input.FormControl-checkbox[type=checkbox][invalid=false]:not(:focus)",
|
116
|
+
"input.FormControl-checkbox[type=checkbox]:not([type=checkbox],[type=radio]):focus",
|
117
|
+
"input.FormControl-checkbox[type=checkbox]:not([type=checkbox],[type=radio]):focus:not(:focus-visible)",
|
118
|
+
"input.FormControl-checkbox[type=checkbox]:not([type=checkbox],[type=radio]):focus-visible",
|
119
|
+
"input.FormControl-checkbox[type=checkbox]:before",
|
120
|
+
"input.FormControl-checkbox[type=checkbox]:after",
|
121
|
+
"input.FormControl-checkbox[type=checkbox][disabled]~.FormControl-checkbox-labelWrap .FormControl-label",
|
122
|
+
"input.FormControl-checkbox[type=checkbox]:checked",
|
123
|
+
"input.FormControl-checkbox[type=checkbox]:checked:before",
|
124
|
+
"input.FormControl-checkbox[type=checkbox]:checked:disabled",
|
125
|
+
"input.FormControl-checkbox[type=checkbox]:checked:disabled:before",
|
126
|
+
"input.FormControl-checkbox[type=checkbox]:focus-visible",
|
127
|
+
"input.FormControl-checkbox[type=checkbox]:indeterminate:before",
|
128
|
+
"input[type=radio].FormControl-radio",
|
129
|
+
"input.FormControl-radio[type=radio][disabled]",
|
130
|
+
"input.FormControl-radio[type=radio][invalid=true]:not(:focus)",
|
131
|
+
"input.FormControl-radio[type=radio][invalid=false]:not(:focus)",
|
132
|
+
"input.FormControl-radio[type=radio]:not([type=checkbox],[type=radio]):focus",
|
133
|
+
"input.FormControl-radio[type=radio]:not([type=checkbox],[type=radio]):focus:not(:focus-visible)",
|
134
|
+
"input.FormControl-radio[type=radio]:not([type=checkbox],[type=radio]):focus-visible",
|
135
|
+
"input.FormControl-radio[type=radio]:after",
|
136
|
+
"input.FormControl-radio[type=radio][disabled]~.FormControl-radio-labelWrap .FormControl-label",
|
137
|
+
"input.FormControl-radio[type=radio]:checked",
|
138
|
+
"input.FormControl-radio[type=radio]:checked:disabled",
|
139
|
+
"input.FormControl-radio[type=radio][disabled]:checked",
|
140
|
+
"input.FormControl-radio[type=radio]:checked:disabled~.FormControl-radio-labelWrap .FormControl-label",
|
141
|
+
"input.FormControl-radio[type=radio][disabled]:checked~.FormControl-radio-labelWrap .FormControl-label",
|
142
|
+
"input.FormControl-radio[type=radio]:focus-visible"
|
143
|
+
]
|
144
|
+
}
|
@@ -1 +1 @@
|
|
1
|
-
.ToggleSwitch,.ToggleSwitch.ToggleSwitch{display:inline-flex}.ToggleSwitch{align-items:center;gap:var(--
|
1
|
+
.ToggleSwitch,.ToggleSwitch.ToggleSwitch{display:inline-flex}.ToggleSwitch{align-items:center;gap:var(--controlStack-medium-gap-condensed,.5rem)}.ToggleSwitch--checked .ToggleSwitch-statusOn{height:auto;visibility:visible}.ToggleSwitch--checked .ToggleSwitch-statusOff{height:0;visibility:hidden}.ToggleSwitch-track{-webkit-appearance:none;appearance:none;background-color:var(--controlTrack-bgColor-rest,var(--color-switch-track-bg));border:var(--borderWidth-thin,max(1px,.0625rem)) solid var(--controlTrack-borderColor-rest,var(--color-switch-track-border));border-radius:var(--borderRadius-medium,.375rem);cursor:pointer;display:block;height:var(--control-medium-size,2rem);overflow:hidden;padding:0;position:relative;-webkit-text-decoration:none;text-decoration:none;transition-duration:80ms;transition-property:background-color,border-color;transition-timing-function:cubic-bezier(.5,1,.89,1);-webkit-user-select:none;user-select:none;width:var(--base-size-64,4rem)}.ToggleSwitch-track:focus,.ToggleSwitch-track:focus-visible{outline-offset:1px}.ToggleSwitch-track:hover{background-color:var(--controlTrack-bgColor-hover,var(--color-switch-track-hover-bg))}.ToggleSwitch-track:active{background-color:var(--controlTrack-bgColor-active,var(--color-switch-track-active-bg))}@media (pointer:coarse){.ToggleSwitch-track:before{content:"";height:100%;left:50%;min-height:44px;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:100%}}@media (prefers-reduced-motion){.ToggleSwitch-track,.ToggleSwitch-track *{transition:none}}.ToggleSwitch-track[aria-pressed=true][disabled]{background-color:var(--controlTrack-bgColor-disabled,var(--color-switch-track-disabled-bg));border-color:#0000;color:var(--control-checked-fgColor-disabled,var(--color-switch-track-checked-disabled-fg))}.ToggleSwitch-track[aria-pressed=true]{background-color:var(--control-checked-bgColor-rest,var(--color-switch-track-checked-bg));border-color:var(--borderColor-transparent,#0000)}.ToggleSwitch-track[aria-pressed=true]:not([disabled]):hover{background-color:var(--control-checked-bgColor-hover,var(--color-switch-track-checked-hover-bg))}.ToggleSwitch-track[aria-pressed=true]:not([disabled]):active{background-color:var(--control-checked-bgColor-active,var(--color-switch-track-checked-active-bg))}.ToggleSwitch-track[aria-pressed=true] .ToggleSwitch-knob{background-color:var(--controlKnob-bgColor-checked,var(--color-switch-knob-checked-bg));border-color:var(--controlKnob-borderColor-checked,var(--color-switch-knob-checked-border));transform:translateX(100%)}.ToggleSwitch-track[aria-pressed=true] .ToggleSwitch-lineIcon{transform:translateX(0)}.ToggleSwitch-track[aria-pressed=true] .ToggleSwitch-circleIcon{transform:translateX(100%)}.ToggleSwitch-track[disabled]{background-color:var(--controlTrack-bgColor-disabled,var(--color-switch-track-disabled-bg));border-color:#0000;cursor:not-allowed;transition-property:none}.ToggleSwitch-track[disabled] .ToggleSwitch-knob{border-color:var(--borderColor-default,var(--color-border-default));box-shadow:none}.ToggleSwitch-track[disabled] .ToggleSwitch-circleIcon,.ToggleSwitch-track[disabled] .ToggleSwitch-lineIcon{color:var(--controlTrack-fgColor-disabled,var(--color-switch-track-disabled-fg))}.ToggleSwitch-icons{align-items:center;display:flex;height:100%;overflow:hidden;width:100%}.ToggleSwitch-lineIcon{color:var(--control-checked-fgColor-rest,var(--color-switch-track-checked-fg));transform:translateX(-100%)}.ToggleSwitch-circleIcon,.ToggleSwitch-lineIcon{flex:1 0 50%;line-height:0;transition-duration:80ms;transition-property:transform}.ToggleSwitch-circleIcon{color:var(--controlTrack-fgColor-rest,var(--color-switch-track-fg));transform:translateX(0)}.ToggleSwitch-knob{background-color:var(--controlKnob-bgColor-rest,var(--color-switch-knob-bg));border:var(--borderWidth-thin,max(1px,.0625rem)) solid var(--controlKnob-borderColor-rest,var(--color-switch-knob-border));border-radius:var(--borderRadius-medium,.375rem);bottom:0;box-shadow:var(--shadow-resting-medium,var(--color-shadow-medium)),var(--button-default-shadow-inset,var(--color-btn-inset-shadow));position:absolute;top:0;transition-duration:80ms;transition-property:transform;transition-timing-function:cubic-bezier(.5,1,.89,1);width:50%;z-index:1}@media (prefers-reduced-motion){.ToggleSwitch-knob{transition:none}}.ToggleSwitch-status{color:var(--fgColor-default,var(--color-fg-default));font-size:var(--text-body-size-medium,.875rem);line-height:1.5;position:relative;text-align:right}.ToggleSwitch-statusIcon{display:flex;margin-top:.063rem;width:var(--base-size-16,1rem)}.ToggleSwitch--small .ToggleSwitch-status{font-size:var(--text-body-size-small,.75rem)}.ToggleSwitch--small .ToggleSwitch-track{height:var(--control-xsmall-size,1.5rem);width:var(--base-size-48,3rem)}.ToggleSwitch--disabled .ToggleSwitch-status{color:var(--fgColor-muted,var(--color-fg-muted))}.ToggleSwitch-statusOn{height:0;visibility:hidden}.ToggleSwitch-statusOff{height:auto;visibility:visible}.ToggleSwitch--statusAtEnd{flex-direction:row-reverse}.ToggleSwitch--statusAtEnd .ToggleSwitch-status{text-align:left}
|
@@ -1 +1,40 @@
|
|
1
|
-
{
|
1
|
+
{
|
2
|
+
"name": "alpha/toggle_switch",
|
3
|
+
"selectors": [
|
4
|
+
".ToggleSwitch",
|
5
|
+
".ToggleSwitch.ToggleSwitch",
|
6
|
+
".ToggleSwitch--checked .ToggleSwitch-statusOn",
|
7
|
+
".ToggleSwitch--checked .ToggleSwitch-statusOff",
|
8
|
+
".ToggleSwitch-track",
|
9
|
+
".ToggleSwitch-track:focus",
|
10
|
+
".ToggleSwitch-track:focus-visible",
|
11
|
+
".ToggleSwitch-track:hover",
|
12
|
+
".ToggleSwitch-track:active",
|
13
|
+
".ToggleSwitch-track:before",
|
14
|
+
".ToggleSwitch-track *",
|
15
|
+
".ToggleSwitch-track[aria-pressed=true][disabled]",
|
16
|
+
".ToggleSwitch-track[aria-pressed=true]",
|
17
|
+
".ToggleSwitch-track[aria-pressed=true]:not([disabled]):hover",
|
18
|
+
".ToggleSwitch-track[aria-pressed=true]:not([disabled]):active",
|
19
|
+
".ToggleSwitch-track[aria-pressed=true] .ToggleSwitch-knob",
|
20
|
+
".ToggleSwitch-track[aria-pressed=true] .ToggleSwitch-lineIcon",
|
21
|
+
".ToggleSwitch-track[aria-pressed=true] .ToggleSwitch-circleIcon",
|
22
|
+
".ToggleSwitch-track[disabled]",
|
23
|
+
".ToggleSwitch-track[disabled] .ToggleSwitch-knob",
|
24
|
+
".ToggleSwitch-track[disabled] .ToggleSwitch-circleIcon",
|
25
|
+
".ToggleSwitch-track[disabled] .ToggleSwitch-lineIcon",
|
26
|
+
".ToggleSwitch-icons",
|
27
|
+
".ToggleSwitch-lineIcon",
|
28
|
+
".ToggleSwitch-circleIcon",
|
29
|
+
".ToggleSwitch-knob",
|
30
|
+
".ToggleSwitch-status",
|
31
|
+
".ToggleSwitch-statusIcon",
|
32
|
+
".ToggleSwitch--small .ToggleSwitch-status",
|
33
|
+
".ToggleSwitch--small .ToggleSwitch-track",
|
34
|
+
".ToggleSwitch--disabled .ToggleSwitch-status",
|
35
|
+
".ToggleSwitch-statusOn",
|
36
|
+
".ToggleSwitch-statusOff",
|
37
|
+
".ToggleSwitch--statusAtEnd",
|
38
|
+
".ToggleSwitch--statusAtEnd .ToggleSwitch-status"
|
39
|
+
]
|
40
|
+
}
|
@@ -2,11 +2,12 @@ declare class ToggleSwitchElement extends HTMLElement {
|
|
2
2
|
switch: HTMLElement;
|
3
3
|
loadingSpinner: HTMLElement;
|
4
4
|
errorIcon: HTMLElement;
|
5
|
+
private toggling;
|
5
6
|
get src(): string | null;
|
6
7
|
get csrf(): string | null;
|
7
8
|
get csrfField(): string;
|
8
9
|
isRemote(): boolean;
|
9
|
-
toggle(): void
|
10
|
+
toggle(): Promise<void>;
|
10
11
|
turnOn(): void;
|
11
12
|
turnOff(): void;
|
12
13
|
isOn(): boolean;
|
@@ -5,8 +5,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
6
6
|
};
|
7
7
|
import { controller, target } from '@github/catalyst';
|
8
|
-
import { debounce } from '@github/mini-throttle/decorators';
|
9
8
|
let ToggleSwitchElement = class ToggleSwitchElement extends HTMLElement {
|
9
|
+
constructor() {
|
10
|
+
super(...arguments);
|
11
|
+
this.toggling = false;
|
12
|
+
}
|
10
13
|
get src() {
|
11
14
|
const src = this.getAttribute('src');
|
12
15
|
if (!src)
|
@@ -26,46 +29,66 @@ let ToggleSwitchElement = class ToggleSwitchElement extends HTMLElement {
|
|
26
29
|
isRemote() {
|
27
30
|
return this.src != null;
|
28
31
|
}
|
29
|
-
toggle() {
|
32
|
+
async toggle() {
|
33
|
+
if (this.toggling)
|
34
|
+
return;
|
35
|
+
this.toggling = true;
|
30
36
|
if (this.isDisabled()) {
|
31
37
|
return;
|
32
38
|
}
|
33
|
-
if (this.isRemote()) {
|
34
|
-
this.setLoadingState();
|
35
|
-
this.submitForm();
|
36
|
-
}
|
37
|
-
else {
|
39
|
+
if (!this.isRemote()) {
|
38
40
|
this.performToggle();
|
41
|
+
this.toggling = false;
|
42
|
+
return;
|
43
|
+
}
|
44
|
+
// toggle immediately to tell screen readers the switch was clicked
|
45
|
+
this.performToggle();
|
46
|
+
this.setLoadingState();
|
47
|
+
try {
|
48
|
+
await this.submitForm();
|
49
|
+
}
|
50
|
+
catch (error) {
|
51
|
+
if (error instanceof Error) {
|
52
|
+
// because we toggle immediately when the switch is clicked, toggle back to the
|
53
|
+
// old state on failure
|
54
|
+
this.setErrorState(error.message || 'An error occurred, please try again.');
|
55
|
+
this.performToggle();
|
56
|
+
}
|
57
|
+
return;
|
58
|
+
}
|
59
|
+
finally {
|
60
|
+
this.toggling = false;
|
39
61
|
}
|
62
|
+
this.setSuccessState();
|
40
63
|
}
|
41
64
|
turnOn() {
|
42
65
|
if (this.isDisabled()) {
|
43
66
|
return;
|
44
67
|
}
|
45
|
-
this.switch.setAttribute('aria-
|
68
|
+
this.switch.setAttribute('aria-pressed', 'true');
|
46
69
|
this.classList.add('ToggleSwitch--checked');
|
47
70
|
}
|
48
71
|
turnOff() {
|
49
72
|
if (this.isDisabled()) {
|
50
73
|
return;
|
51
74
|
}
|
52
|
-
this.switch.setAttribute('aria-
|
75
|
+
this.switch.setAttribute('aria-pressed', 'false');
|
53
76
|
this.classList.remove('ToggleSwitch--checked');
|
54
77
|
}
|
55
78
|
isOn() {
|
56
|
-
return this.switch.getAttribute('aria-
|
79
|
+
return this.switch.getAttribute('aria-pressed') === 'true';
|
57
80
|
}
|
58
81
|
isOff() {
|
59
82
|
return !this.isOn();
|
60
83
|
}
|
61
84
|
isDisabled() {
|
62
|
-
return this.switch.getAttribute('
|
85
|
+
return this.switch.getAttribute('disabled') != null;
|
63
86
|
}
|
64
87
|
disable() {
|
65
|
-
this.switch.setAttribute('
|
88
|
+
this.switch.setAttribute('disabled', 'disabled');
|
66
89
|
}
|
67
90
|
enable() {
|
68
|
-
this.switch.
|
91
|
+
this.switch.removeAttribute('disabled');
|
69
92
|
}
|
70
93
|
performToggle() {
|
71
94
|
if (this.isOn()) {
|
@@ -76,9 +99,10 @@ let ToggleSwitchElement = class ToggleSwitchElement extends HTMLElement {
|
|
76
99
|
}
|
77
100
|
}
|
78
101
|
setLoadingState() {
|
79
|
-
this.disable();
|
80
102
|
this.errorIcon.setAttribute('hidden', 'hidden');
|
81
103
|
this.loadingSpinner.removeAttribute('hidden');
|
104
|
+
const event = new CustomEvent('toggleSwitchLoading', { bubbles: true });
|
105
|
+
this.dispatchEvent(event);
|
82
106
|
}
|
83
107
|
setSuccessState() {
|
84
108
|
const event = new CustomEvent('toggleSwitchSuccess', { bubbles: true });
|
@@ -95,43 +119,31 @@ let ToggleSwitchElement = class ToggleSwitchElement extends HTMLElement {
|
|
95
119
|
this.errorIcon.removeAttribute('hidden');
|
96
120
|
}
|
97
121
|
this.loadingSpinner.setAttribute('hidden', 'hidden');
|
98
|
-
this.enable();
|
99
122
|
}
|
100
123
|
async submitForm() {
|
101
124
|
const body = new FormData();
|
102
125
|
if (this.csrf) {
|
103
126
|
body.append(this.csrfField, this.csrf);
|
104
127
|
}
|
105
|
-
body.append('value', this.isOn() ? '
|
128
|
+
body.append('value', this.isOn() ? '1' : '0');
|
129
|
+
if (!this.src)
|
130
|
+
throw new Error('invalid src');
|
131
|
+
let response;
|
106
132
|
try {
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
'Requested-With': 'XMLHttpRequest'
|
116
|
-
},
|
117
|
-
body
|
118
|
-
});
|
119
|
-
}
|
120
|
-
catch (error) {
|
121
|
-
throw new Error('A network error occurred, please try again.');
|
122
|
-
}
|
123
|
-
if (response.ok) {
|
124
|
-
this.setSuccessState();
|
125
|
-
this.performToggle();
|
126
|
-
}
|
127
|
-
else {
|
128
|
-
throw new Error(await response.text());
|
129
|
-
}
|
133
|
+
response = await fetch(this.src, {
|
134
|
+
credentials: 'same-origin',
|
135
|
+
method: 'POST',
|
136
|
+
headers: {
|
137
|
+
'Requested-With': 'XMLHttpRequest',
|
138
|
+
},
|
139
|
+
body,
|
140
|
+
});
|
130
141
|
}
|
131
142
|
catch (error) {
|
132
|
-
|
133
|
-
|
134
|
-
|
143
|
+
throw new Error('A network error occurred, please try again.');
|
144
|
+
}
|
145
|
+
if (!response.ok) {
|
146
|
+
throw new Error(await response.text());
|
135
147
|
}
|
136
148
|
}
|
137
149
|
};
|
@@ -144,9 +156,6 @@ __decorate([
|
|
144
156
|
__decorate([
|
145
157
|
target
|
146
158
|
], ToggleSwitchElement.prototype, "errorIcon", void 0);
|
147
|
-
__decorate([
|
148
|
-
debounce(300)
|
149
|
-
], ToggleSwitchElement.prototype, "submitForm", null);
|
150
159
|
ToggleSwitchElement = __decorate([
|
151
160
|
controller
|
152
161
|
], ToggleSwitchElement);
|
@@ -1,7 +1,9 @@
|
|
1
|
-
|
1
|
+
import '@oddbird/popover-polyfill';
|
2
|
+
type Direction = 'n' | 's' | 'e' | 'w' | 'ne' | 'se' | 'nw' | 'sw';
|
2
3
|
declare class ToolTipElement extends HTMLElement {
|
3
4
|
#private;
|
4
5
|
styles(): string;
|
6
|
+
get showReason(): "focus" | "mouse";
|
5
7
|
get htmlFor(): string;
|
6
8
|
set htmlFor(value: string);
|
7
9
|
get type(): 'description' | 'label';
|
@@ -13,7 +15,7 @@ declare class ToolTipElement extends HTMLElement {
|
|
13
15
|
get hiddenFromView(): true | false;
|
14
16
|
connectedCallback(): void;
|
15
17
|
disconnectedCallback(): void;
|
16
|
-
handleEvent(event: Event): void
|
18
|
+
handleEvent(event: Event): Promise<void>;
|
17
19
|
static observedAttributes: string[];
|
18
20
|
attributeChangedCallback(name: string): void;
|
19
21
|
}
|