primer_view_components 0.0.121 → 0.0.122
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -0
- data/app/assets/styles/primer_view_components.css +2 -2
- data/app/assets/styles/primer_view_components.css.map +1 -1
- data/app/components/primer/alpha/action_list.css.json +123 -1
- data/app/components/primer/alpha/auto_complete.css.json +23 -1
- data/app/components/primer/alpha/banner.css.json +24 -1
- data/app/components/primer/alpha/button_marketing.css.json +33 -1
- data/app/components/primer/alpha/check_box.rb +74 -0
- data/app/components/primer/alpha/check_box_group.rb +36 -0
- data/app/components/primer/alpha/dialog.css.json +82 -1
- data/app/components/primer/alpha/dialog.rb +1 -1
- data/app/components/primer/alpha/dropdown.css.json +40 -1
- data/app/components/primer/alpha/form_button.rb +32 -0
- data/app/components/primer/alpha/form_control.html.erb +26 -0
- data/app/components/primer/alpha/form_control.rb +105 -0
- data/app/components/primer/alpha/layout.css.json +80 -1
- data/app/components/primer/alpha/menu.css.json +28 -1
- data/app/components/primer/alpha/multi_input.rb +81 -0
- data/app/components/primer/alpha/radio_button.rb +25 -0
- data/app/components/primer/alpha/radio_button_group.rb +36 -0
- data/app/components/primer/alpha/segmented_control.css +1 -1
- data/app/components/primer/alpha/segmented_control.css.json +31 -1
- data/app/components/primer/alpha/segmented_control.css.map +1 -1
- data/app/components/primer/alpha/segmented_control.pcss +43 -12
- data/app/components/primer/alpha/select.rb +37 -0
- data/app/components/primer/alpha/submit_button.rb +32 -0
- data/app/components/primer/alpha/tab_nav.css.json +24 -1
- data/app/components/primer/alpha/tab_panels.rb +7 -0
- data/app/components/primer/alpha/text_area.rb +24 -0
- data/app/components/primer/alpha/text_field.css +2 -2
- data/app/components/primer/alpha/text_field.css.json +134 -1
- data/app/components/primer/alpha/text_field.css.map +1 -1
- data/app/components/primer/alpha/text_field.pcss +27 -0
- data/app/components/primer/alpha/text_field.rb +15 -20
- data/app/components/primer/alpha/toggle_switch.css +1 -1
- data/app/components/primer/alpha/toggle_switch.css.json +40 -1
- data/app/components/primer/alpha/toggle_switch.css.map +1 -1
- data/app/components/primer/alpha/toggle_switch.pcss +31 -61
- data/app/components/primer/alpha/underline_nav.css.json +28 -1
- data/app/components/primer/beta/avatar.css.json +17 -1
- data/app/components/primer/beta/avatar_stack.css.json +28 -1
- data/app/components/primer/beta/blankslate.css.json +22 -1
- data/app/components/primer/beta/border_box.css.json +54 -1
- data/app/components/primer/beta/breadcrumbs.css.json +11 -1
- data/app/components/primer/beta/button.css.json +71 -1
- data/app/components/primer/beta/counter.css.json +10 -1
- data/app/components/primer/beta/flash.css.json +27 -1
- data/app/components/primer/beta/label.css.json +25 -1
- data/app/components/primer/beta/link.css.json +19 -1
- data/app/components/primer/beta/popover.css.json +39 -1
- data/app/components/primer/beta/progress_bar.css.json +10 -1
- data/app/components/primer/beta/state.css.json +13 -1
- data/app/components/primer/beta/subhead.css.json +12 -1
- data/app/components/primer/beta/timeline_item.css.json +16 -1
- data/app/components/primer/beta/truncate.css.json +12 -1
- data/app/components/primer/component.rb +10 -2
- data/app/components/primer/truncate.css.json +13 -1
- data/app/forms/{select_list_form.rb → select_form.rb} +1 -1
- data/app/lib/primer/css/layout.css.json +316 -1
- data/app/lib/primer/css/utilities.css.json +1659 -1
- data/lib/primer/form_components.rb +26 -6
- data/lib/primer/forms/builder.rb +1 -17
- data/lib/primer/forms/button.rb +4 -1
- data/lib/primer/forms/check_box_group.html.erb +14 -9
- data/lib/primer/forms/check_box_group.rb +5 -0
- data/lib/primer/forms/dsl/check_box_group_input.rb +3 -4
- data/lib/primer/forms/dsl/input.rb +33 -2
- data/lib/primer/forms/dsl/input_methods.rb +49 -1
- data/lib/primer/forms/dsl/radio_button_group_input.rb +2 -3
- data/lib/primer/forms/dsl/{select_list_input.rb → select_input.rb} +2 -2
- data/lib/primer/forms/dsl/text_field_input.rb +7 -5
- data/lib/primer/forms/form_control.rb +0 -1
- data/lib/primer/forms/group.html.erb +1 -1
- data/lib/primer/forms/multi.html.erb +8 -6
- data/lib/primer/forms/multi.rb +2 -0
- data/lib/primer/forms/radio_button_group.html.erb +14 -9
- data/lib/primer/forms/radio_button_group.rb +5 -0
- data/lib/primer/forms/{select_list.html.erb → select.html.erb} +0 -0
- data/lib/primer/forms/{select_list.rb → select.rb} +2 -2
- data/lib/primer/forms/spacing_wrapper.html.erb +1 -1
- data/lib/primer/forms/text_area.rb +1 -1
- data/lib/primer/forms/text_field.rb +5 -1
- data/lib/primer/forms/utils.rb +20 -0
- data/lib/primer/view_components/engine.rb +1 -1
- data/lib/primer/view_components/version.rb +1 -1
- data/lib/primer/yard/backend.rb +1 -15
- data/lib/primer/yard/component_manifest.rb +44 -25
- data/lib/primer/yard/component_ref.rb +40 -0
- data/lib/primer/yard/docs_helper.rb +16 -2
- data/lib/primer/yard/legacy_gatsby_backend.rb +9 -15
- data/lib/primer/yard/lookbook_docs_helper.rb +32 -0
- data/lib/primer/yard/lookbook_pages_backend.rb +194 -0
- data/lib/primer/yard/registry.rb +6 -21
- data/lib/primer/yard/renders_many_handler.rb +1 -1
- data/lib/primer/yard/renders_one_handler.rb +1 -1
- data/lib/primer/yard.rb +14 -0
- data/lib/tasks/docs.rake +26 -13
- data/previews/pages/forms/01_introduction.md.erb +44 -0
- data/previews/pages/forms/02_getting_started.md.erb +125 -0
- data/previews/pages/forms/03_caption_templates.md.erb +30 -0
- data/previews/pages/forms/04_after_content.md.erb +39 -0
- data/previews/pages/forms/05_groups_layouts.md.erb +22 -0
- data/previews/pages/forms/06_miscellaneous_inputs.md.erb +43 -0
- data/previews/pages/forms/07_toggle_switch_forms.md.erb +58 -0
- data/previews/pages/forms/08_validations.md.erb +28 -0
- data/previews/pages/forms/09_compound_forms.md.erb +97 -0
- data/previews/primer/alpha/check_box_group_preview.rb +89 -0
- data/previews/primer/alpha/check_box_preview.rb +62 -0
- data/previews/primer/alpha/form_control_preview/playground.html.erb +9 -0
- data/previews/primer/alpha/form_control_preview.rb +106 -0
- data/previews/primer/alpha/multi_input_preview/playground.html.erb +41 -0
- data/previews/primer/alpha/multi_input_preview.rb +80 -0
- data/previews/primer/alpha/radio_button_group_preview.rb +83 -0
- data/previews/primer/alpha/radio_button_preview.rb +62 -0
- data/previews/primer/alpha/select_preview.rb +130 -0
- data/previews/primer/alpha/text_area_preview.rb +87 -0
- data/previews/primer/alpha/text_field_preview.rb +10 -1
- data/previews/primer/forms/forms_preview/example_toggle_switch_form.html.erb +2 -2
- data/previews/primer/forms/forms_preview/{select_list_form.html.erb → select_form.html.erb} +1 -1
- data/previews/primer/forms/forms_preview.rb +3 -1
- data/static/arguments.json +1358 -1328
- data/static/audited_at.json +10 -0
- data/static/constants.json +20 -0
- data/static/previews.json +218 -40
- data/static/statuses.json +10 -0
- metadata +41 -7
@@ -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
|
+
}
|
@@ -77,6 +77,13 @@ module Primer
|
|
77
77
|
@body_arguments[:role] = :tablist
|
78
78
|
@body_arguments[:"aria-label"] = label
|
79
79
|
end
|
80
|
+
|
81
|
+
def before_render
|
82
|
+
# Eagerly evaluate content to avoid https://github.com/primer/view_components/issues/1790
|
83
|
+
content
|
84
|
+
|
85
|
+
super
|
86
|
+
end
|
80
87
|
end
|
81
88
|
end
|
82
89
|
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Primer
|
4
|
+
module Alpha
|
5
|
+
TextArea = Primer::FormComponents.from_input(Primer::Forms::Dsl::TextAreaInput)
|
6
|
+
|
7
|
+
# Text areas are multi-line text inputs rendered using the `<textarea>` tag in HTML.
|
8
|
+
#
|
9
|
+
# @form_usage
|
10
|
+
# class ExampleForm < ApplicationForm
|
11
|
+
# form do |example_form|
|
12
|
+
# example_form.text_area(attributes)
|
13
|
+
# end
|
14
|
+
# end
|
15
|
+
class TextArea < Primer::Component
|
16
|
+
status :alpha
|
17
|
+
|
18
|
+
# @!method initialize
|
19
|
+
#
|
20
|
+
# @macro form_full_width_arguments
|
21
|
+
# @macro form_input_arguments
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -1,3 +1,3 @@
|
|
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(
|
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-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(--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
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)}}
|
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}.FormControl-check-group-wrap fieldset,.FormControl-radio-group-wrap fieldset{border:0;margin:0;padding:0}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 +1,134 @@
|
|
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-spacingWrapper",
|
11
|
+
".FormControl-horizontalGroup",
|
12
|
+
".FormControl-input",
|
13
|
+
".FormControl-select",
|
14
|
+
".FormControl-textarea",
|
15
|
+
".FormControl-input[disabled]",
|
16
|
+
".FormControl-select[disabled]",
|
17
|
+
".FormControl-textarea[disabled]",
|
18
|
+
".FormControl-input[invalid]:not(:focus)",
|
19
|
+
".FormControl-select[invalid]:not(:focus)",
|
20
|
+
".FormControl-textarea[invalid]:not(:focus)",
|
21
|
+
".FormControl-input:not([type=checkbox],[type=radio]):focus",
|
22
|
+
".FormControl-select:not([type=checkbox],[type=radio]):focus",
|
23
|
+
".FormControl-textarea:not([type=checkbox],[type=radio]):focus",
|
24
|
+
".FormControl-input:not([type=checkbox],[type=radio]):focus:not(:focus-visible)",
|
25
|
+
".FormControl-select:not([type=checkbox],[type=radio]):focus:not(:focus-visible)",
|
26
|
+
".FormControl-textarea:not([type=checkbox],[type=radio]):focus:not(:focus-visible)",
|
27
|
+
".FormControl-input:not([type=checkbox],[type=radio]):focus-visible",
|
28
|
+
".FormControl-select:not([type=checkbox],[type=radio]):focus-visible",
|
29
|
+
".FormControl-textarea:not([type=checkbox],[type=radio]):focus-visible",
|
30
|
+
".FormControl-input[disabled]::placeholder",
|
31
|
+
".FormControl-select[disabled]::placeholder",
|
32
|
+
".FormControl-textarea[disabled]::placeholder",
|
33
|
+
".FormControl-input[readonly]",
|
34
|
+
".FormControl-select[readonly]",
|
35
|
+
".FormControl-textarea[readonly]",
|
36
|
+
".FormControl-input::placeholder",
|
37
|
+
".FormControl-select::placeholder",
|
38
|
+
".FormControl-textarea::placeholder",
|
39
|
+
".FormControl-input.FormControl-small",
|
40
|
+
".FormControl-select.FormControl-small",
|
41
|
+
".FormControl-textarea.FormControl-small",
|
42
|
+
".FormControl-input.FormControl-medium",
|
43
|
+
".FormControl-select.FormControl-medium",
|
44
|
+
".FormControl-textarea.FormControl-medium",
|
45
|
+
".FormControl-input.FormControl-large",
|
46
|
+
".FormControl-select.FormControl-large",
|
47
|
+
".FormControl-textarea.FormControl-large",
|
48
|
+
".FormControl-input.FormControl-inset",
|
49
|
+
".FormControl-select.FormControl-inset",
|
50
|
+
".FormControl-textarea.FormControl-inset",
|
51
|
+
".FormControl-input.FormControl-inset:focus",
|
52
|
+
".FormControl-input.FormControl-inset:focus-visible",
|
53
|
+
".FormControl-select.FormControl-inset:focus",
|
54
|
+
".FormControl-select.FormControl-inset:focus-visible",
|
55
|
+
".FormControl-textarea.FormControl-inset:focus",
|
56
|
+
".FormControl-textarea.FormControl-inset:focus-visible",
|
57
|
+
".FormControl-input.FormControl-monospace",
|
58
|
+
".FormControl-select.FormControl-monospace",
|
59
|
+
".FormControl-textarea.FormControl-monospace",
|
60
|
+
".FormControl-input.FormControl-error",
|
61
|
+
".FormControl-select.FormControl-error",
|
62
|
+
".FormControl-textarea.FormControl-error",
|
63
|
+
".FormControl-input.FormControl-success",
|
64
|
+
".FormControl-select.FormControl-success",
|
65
|
+
".FormControl-textarea.FormControl-success",
|
66
|
+
".FormControl-input.FormControl-warning",
|
67
|
+
".FormControl-select.FormControl-warning",
|
68
|
+
".FormControl-textarea.FormControl-warning",
|
69
|
+
".FormControl-toggleSwitchInput",
|
70
|
+
".FormControl-input-wrap",
|
71
|
+
".FormControl-input-wrap .FormControl-input-leadingVisualWrap",
|
72
|
+
".FormControl-input-wrap .FormControl-input-leadingVisualWrap .FormControl-input-leadingVisual",
|
73
|
+
".FormControl-input-wrap .FormControl-input-trailingAction",
|
74
|
+
".FormControl-input-wrap .FormControl-input-trailingAction svg",
|
75
|
+
".FormControl-input-wrap .FormControl-input-trailingAction[disabled]",
|
76
|
+
".FormControl-input-wrap .FormControl-input-trailingAction:hover",
|
77
|
+
".FormControl-input-wrap .FormControl-input-trailingAction:active",
|
78
|
+
".FormControl-input-wrap .FormControl-input-trailingAction.FormControl-input-trailingAction--divider:before",
|
79
|
+
".FormControl-input-wrap .FormControl-input-trailingAction:after",
|
80
|
+
".FormControl-input-wrap.FormControl-input-wrap--leadingVisual .FormControl-input",
|
81
|
+
".FormControl-input-wrap.FormControl-input-wrap--trailingAction .FormControl-input",
|
82
|
+
".FormControl-input-wrap.FormControl-input-wrap--trailingAction.FormControl-input-wrap-trailingAction--divider .FormControl-input",
|
83
|
+
".FormControl-input-wrap.FormControl-small .FormControl-input-leadingVisualWrap",
|
84
|
+
".FormControl-input-wrap.FormControl-small.FormControl-input-wrap--trailingAction .FormControl-input.FormControl-small",
|
85
|
+
".FormControl-input-wrap.FormControl-small.FormControl-input-wrap--trailingAction.FormControl-input-wrap-trailingAction--divider .FormControl-input.FormControl-small",
|
86
|
+
".FormControl-input-wrap.FormControl-small .FormControl-input-trailingAction",
|
87
|
+
".FormControl-input-wrap.FormControl-small .FormControl-input-trailingAction:before",
|
88
|
+
".FormControl-input-wrap.FormControl-large .FormControl-input-leadingVisualWrap",
|
89
|
+
".FormControl-input-wrap.FormControl-large.FormControl-input-wrap--leadingVisual .FormControl-input.FormControl-large",
|
90
|
+
".FormControl-input-wrap.FormControl-large.FormControl-input-wrap--trailingAction .FormControl-input.FormControl-large",
|
91
|
+
".FormControl-input-wrap.FormControl-large.FormControl-input-wrap--trailingAction.FormControl-input-wrap-trailingAction--divider .FormControl-input.FormControl-large",
|
92
|
+
".FormControl-input-wrap.FormControl-large .FormControl-input-trailingAction",
|
93
|
+
".FormControl-input-wrap.FormControl-large .FormControl-input-trailingAction:before",
|
94
|
+
".FormControl-select-wrap",
|
95
|
+
".FormControl-select-wrap:after",
|
96
|
+
".FormControl-select-wrap .FormControl-select",
|
97
|
+
".FormControl-checkbox-wrap",
|
98
|
+
".FormControl-radio-wrap",
|
99
|
+
".FormControl-checkbox-wrap .FormControl-checkbox-labelWrap",
|
100
|
+
".FormControl-checkbox-wrap .FormControl-radio-labelWrap",
|
101
|
+
".FormControl-radio-wrap .FormControl-checkbox-labelWrap",
|
102
|
+
".FormControl-radio-wrap .FormControl-radio-labelWrap",
|
103
|
+
".FormControl-checkbox-wrap .FormControl-label",
|
104
|
+
".FormControl-radio-wrap .FormControl-label",
|
105
|
+
".FormControl-check-group-wrap fieldset",
|
106
|
+
".FormControl-radio-group-wrap fieldset",
|
107
|
+
"input[type=checkbox].FormControl-checkbox",
|
108
|
+
"input.FormControl-checkbox[type=checkbox][disabled]",
|
109
|
+
"input.FormControl-checkbox[type=checkbox][invalid]:not(:focus)",
|
110
|
+
"input.FormControl-checkbox[type=checkbox]:not([type=checkbox],[type=radio]):focus",
|
111
|
+
"input.FormControl-checkbox[type=checkbox]:not([type=checkbox],[type=radio]):focus:not(:focus-visible)",
|
112
|
+
"input.FormControl-checkbox[type=checkbox]:not([type=checkbox],[type=radio]):focus-visible",
|
113
|
+
"input.FormControl-checkbox[type=checkbox]:before",
|
114
|
+
"input.FormControl-checkbox[type=checkbox]:after",
|
115
|
+
"input.FormControl-checkbox[type=checkbox][disabled]~.FormControl-checkbox-labelWrap .FormControl-label",
|
116
|
+
"input.FormControl-checkbox[type=checkbox][disabled]~.FormControl-radio-labelWrap .FormControl-label",
|
117
|
+
"input.FormControl-checkbox[type=checkbox]:checked",
|
118
|
+
"input.FormControl-checkbox[type=checkbox]:checked:before",
|
119
|
+
"input.FormControl-checkbox[type=checkbox]:checked:disabled",
|
120
|
+
"input.FormControl-checkbox[type=checkbox]:checked:disabled:before",
|
121
|
+
"input.FormControl-checkbox[type=checkbox]:focus-visible",
|
122
|
+
"input.FormControl-checkbox[type=checkbox]:indeterminate:before",
|
123
|
+
"input[type=radio].FormControl-radio",
|
124
|
+
"input.FormControl-radio[type=radio][disabled]",
|
125
|
+
"input.FormControl-radio[type=radio][invalid]:not(:focus)",
|
126
|
+
"input.FormControl-radio[type=radio]:not([type=checkbox],[type=radio]):focus",
|
127
|
+
"input.FormControl-radio[type=radio]:not([type=checkbox],[type=radio]):focus:not(:focus-visible)",
|
128
|
+
"input.FormControl-radio[type=radio]:not([type=checkbox],[type=radio]):focus-visible",
|
129
|
+
"input.FormControl-radio[type=radio]:after",
|
130
|
+
"input.FormControl-radio[type=radio]:checked",
|
131
|
+
"input.FormControl-radio[type=radio]:checked:disabled",
|
132
|
+
"input.FormControl-radio[type=radio]:focus-visible"
|
133
|
+
]
|
134
|
+
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["text_field.pcss","../../../../lib/postcss_mixins/focusBoxShadowInset.pcss","<no source>","../../../../lib/postcss_mixins/focusOutline.pcss"],"names":[],"mappings":"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","file":"text_field.css","sourcesContent":["/* FormControl */\n\n/* groups label, field, caption and inline error message */\n.FormControl {\n display: inline-flex;\n flex-direction: column;\n gap: var(--base-size-4, 4px);\n}\n\n/* fill container */\n.FormControl--fullWidth {\n display: flex;\n}\n\n/* <label> */\n.FormControl-label {\n font-size: var(--primer-text-body-size-medium, 14px);\n font-weight: var(--base-text-weight-semibold, 600);\n line-height: var(--primer-text-body-lineHeight-medium, calc(20 / 14));\n color: var(--color-fg-default);\n user-select: none;\n}\n\n/* optional caption */\n.FormControl-caption {\n margin-bottom: 0;\n font-size: var(--primer-text-caption-size, 12px);\n font-weight: var(--primer-text-caption-weight, 400);\n line-height: var(--primer-text-caption-lineHeight, calc(16 / 12));\n color: var(--color-fg-muted);\n}\n\n/* inline validation message */\n.FormControl-inlineValidation {\n display: flex;\n font-size: var(--primer-text-caption-size, 12px);\n font-weight: var(--base-text-weight-semibold, 600);\n color: var(--color-danger-fg);\n fill: var(--color-danger-fg);\n flex-direction: row;\n align-items: center;\n gap: var(--base-size-4, 4px);\n\n & p {\n margin-bottom: 0;\n }\n}\n\n/* shared among all form control components (input, select, textarea, checkbox, radio) */\n@define-mixin Field {\n color: var(--color-fg-default);\n background-color: var(--color-canvas-default);\n border: var(--primer-borderWidth-thin, 1px) solid var(--color-border-default);\n\n &[disabled] {\n color: var(--color-primer-fg-disabled);\n cursor: not-allowed;\n background-color: var(--color-input-disabled-bg);\n border-color: var(--color-border-default);\n opacity: 1;\n -webkit-text-fill-color: var(--color-primer-fg-disabled);\n }\n\n &:not(:focus)[invalid] {\n border-color: var(--color-danger-emphasis);\n }\n\n &:not([type='checkbox'], [type='radio']):focus {\n @mixin focusBoxShadowInset;\n\n /* remove fallback :focus if :focus-visible is supported */\n &:not(:focus-visible) {\n border-color: transparent;\n\n @mixin focusBoxShadowInset 1px transparent;\n }\n }\n\n /* default focus state */\n &:not([type='checkbox'], [type='radio']):focus-visible {\n @mixin focusBoxShadowInset;\n }\n}\n\n/* TextInput structure\n** ===================\n**\n** .FormControl\n** ├─ .FormControl-label\n** │ ├─ .FormControl-input-wrap\n** │ │ ├─ .FormControl-input-leadingVisualWrap\n** │ │ │ ├─ .FormControl-input-leadingVisual\n** │ │ ├─ .FormControl-input\n** │ │ ├─ .FormControl-input-trailingAction\n** ├─ .FormControl-inlineValidation\n** ├─ .FormControl-caption */\n\n/* // Select structure\n** ===================\n**\n** .FormControl\n** ├─ .FormControl-label\n** │ ├─ .FormControl-select-wrap\n** │ │ ├─ .FormControl-select\n** ├─ .FormControl-inlineValidation\n** ├─ .FormControl-caption */\n\n/* // Textarea structure\n** ===================\n**\n** .FormControl\n** ├─ .FormControl-label\n** ├─ .FormControl-textarea\n** ├─ .FormControl-inlineValidation\n** ├─ .FormControl-caption */\n\n.FormControl-input,\n.FormControl-select,\n.FormControl-textarea {\n @mixin Field;\n\n width: 100%;\n font-size: var(--primer-text-body-size-medium, 14px);\n line-height: var(--primer-text-body-lineHeight-medium, calc(20 / 14));\n border-radius: var(--primer-borderRadius-medium, 6px);\n transition: 80ms cubic-bezier(0.33, 1, 0.68, 1);\n transition-property: color, background-color, box-shadow, border-color;\n padding-inline: var(--primer-control-medium-paddingInline-condensed, 8px);\n padding-block: calc(var(--primer-control-medium-paddingBlock, 6px) - var(--primer-borderWidth-thin, 1px));\n\n &[disabled] {\n &::placeholder {\n color: var(--color-primer-fg-disabled);\n }\n }\n\n &[readonly] {\n background-color: var(--color-input-disabled-bg);\n }\n\n &::placeholder {\n color: var(--color-fg-subtle);\n opacity: 1;\n }\n\n /* sizes */\n\n &.FormControl-small {\n height: var(--primer-control-small-size, 28px);\n padding-inline: var(--primer-control-small-paddingInline-normal, 8px);\n padding-block: var(--primer-control-small-paddingBlock, 4px);\n font-size: var(--primer-text-body-size-small, 12px);\n }\n\n &.FormControl-medium {\n height: var(--primer-control-medium-size, 32px);\n }\n\n &.FormControl-large {\n height: var(--primer-control-large-size, 40px);\n padding-inline: var(--primer-control-large-paddingInline-normal, 12px);\n padding-block: var(--primer-control-large-paddingBlock, 10px);\n }\n\n /* variants */\n\n &.FormControl-inset {\n background-color: var(--color-canvas-inset);\n\n &:focus-visible,\n &:focus {\n background-color: var(--color-canvas-default);\n }\n }\n\n &.FormControl-monospace {\n font-family:\n var(\n --primer-fontStack-monospace,\n 'ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace'\n );\n }\n\n /* validation states */\n\n &.FormControl-error {\n border-color: var(--color-danger-emphasis);\n }\n\n &.FormControl-success {\n border-color: var(--color-success-emphasis);\n }\n\n &.FormControl-warning {\n border-color: var(--color-attention-emphasis);\n }\n}\n\n.FormControl-toggleSwitchInput {\n display: flex;\n align-items: flex-start;\n gap: var(--base-size-16, 16px);\n}\n\n/* positioning for leading/trailing items for TextInput */\n.FormControl-input-wrap {\n position: relative;\n display: grid;\n\n & .FormControl-input-leadingVisualWrap {\n position: absolute;\n top: var(--base-size-8, 8px);\n left: var(--base-size-8, 8px);\n display: block;\n width: var(--base-size-16, 16px);\n height: var(--base-size-16, 16px);\n color: var(--color-fg-muted);\n pointer-events: none;\n\n /* octicon */\n & .FormControl-input-leadingVisual {\n display: block;\n user-select: none;\n }\n }\n\n /* TODO: replace with new Button component */\n & .FormControl-input-trailingAction {\n position: absolute;\n top: var(--base-size-4, 4px);\n right: var(--base-size-4, 4px);\n z-index: 4;\n display: grid;\n width: var(--primer-control-xsmall-size, 24px);\n height: var(--primer-control-xsmall-size, 24px);\n padding: 0;\n color: var(--color-fg-muted);\n cursor: pointer;\n background: transparent;\n border: 0;\n border-radius: var(--primer-borderRadius-small);\n transition: 0.2s cubic-bezier(0.3, 0, 0.5, 1);\n transition-property: color, background-color, border-color;\n align-items: center;\n justify-content: center;\n\n & svg {\n user-select: none;\n }\n\n &[disabled] {\n color: var(--color-primer-fg-disabled);\n pointer-events: none;\n }\n\n &:hover {\n background: var(--color-action-list-item-default-hover-bg);\n }\n\n &:active {\n background: var(--color-action-list-item-default-active-bg);\n }\n\n /* show vertical divider line between field and button */\n &.FormControl-input-trailingAction--divider {\n &::before {\n position: absolute;\n top: calc((var(--primer-control-xsmall-size) - var(--base-size-16)) / 2);\n left: calc(var(--base-size-4, 4px) * -1);\n display: block;\n width: var(--primer-borderWidth-thin);\n height: var(--base-size-16);\n content: '';\n background: var(--color-border-default);\n }\n }\n\n &::after {\n @mixin minTouchTarget var(--primer-control-medium-size, 32px) var(--primer-control-medium-size, 32px);\n\n @media (pointer: coarse) {\n min-width: var(--primer-control-minTarget-coarse, 44px);\n min-height: var(--primer-control-minTarget-coarse, 44px);\n }\n }\n }\n\n /* if leadingVisual is present */\n\n /*\n\t┌──32px──┬────────────────────┐\n\t╎ ┌───┐ ┌────────────────┐ ╎\n\t╎ 16px 16px ╎\n\t╎ └───┘ └────────────────┘ ╎\n\t└───────8px───────────────────┘\n\t*/\n\n &.FormControl-input-wrap--leadingVisual {\n & .FormControl-input {\n padding-inline-start:\n calc(\n var(--primer-control-medium-paddingInline-condensed, 8px) + var(--base-size-16, 16px) +\n var(--primer-control-medium-gap, 8px)\n ); /* 32px */\n }\n }\n\n /*\n\t┌──────────────────┬──32px──┐\n\t╎ ┌──────────────┐ ┌────┐ ╎\n\t╎ 24px 24px ╎\n\t╎ └──────────────┘ └────┘ ╎\n\t└──────────────────┴────────┘\n */\n\n /* if trailingAction is present */\n &.FormControl-input-wrap--trailingAction {\n & .FormControl-input {\n padding-inline-end:\n calc(\n var(--primer-control-medium-paddingInline-condensed, 8px) + var(--base-size-16, 16px) +\n var(--primer-control-medium-gap, 8px)\n ); /* 32px */\n }\n\n /*\n\t\t32px + 1px border\n\t\t┌──────────────────┬──33px──┐\n\t\t╎ ┌──────────────┐ ┌────┐ ╎\n\t\t╎ 24px 24px ╎\n\t\t╎ └──────────────┘ └────┘ ╎\n\t\t└──────────────────┴────────┘\n\t\t*/\n\n /* if trailingAction divider is present, add 1px padding to accomodate input field text\n ** can be refactored to has(.FormControl-input-trailingAction--divider) */\n &.FormControl-input-wrap-trailingAction--divider {\n & .FormControl-input {\n padding-inline-end:\n calc(\n var(--primer-control-medium-paddingInline-condensed, 8px) + var(--base-size-16, 16px) +\n var(--primer-control-medium-gap, 8px) + var(--primer-borderWidth-thin, 1px)\n ); /* 33px */\n }\n }\n }\n\n /* size modifications can be refactored with :has() - FormControl-input-wrap:has(.FormControl-large)\n // sizes */\n &.FormControl-small {\n & .FormControl-input-leadingVisualWrap {\n top: calc(var(--primer-control-medium-paddingInline-condensed, 8px) - 0.125rem); /* 6px */\n left: calc(var(--primer-control-medium-paddingInline-condensed, 8px) - 0.125rem); /* 6px */\n }\n\n /*\n ┌──────────────────┬──28px──┐\n ╎ ┌──────────────┐ ┌────┐ ╎\n ╎ 20px 20px ╎\n ╎ └──────────────┘ └────┘ ╎\n └──────────────────┴────────┘\n */\n\n &.FormControl-input-wrap--trailingAction {\n & .FormControl-input.FormControl-small {\n padding-inline-end:\n calc(\n var(--primer-control-small-paddingInline-condensed, 8px) + var(--base-size-16, 16px) +\n var(--primer-control-small-gap, 8px)\n ); /* 28px */\n }\n\n /*\n\t\t\t28px + 1px border\n\t\t\t┌──────────────────┬──29px──┐\n\t\t\t╎ ┌──────────────┐ ┌────┐ ╎\n\t\t\t╎ 20px 20px ╎\n\t\t\t╎ └──────────────┘ └────┘ ╎\n\t\t\t└──────────────────┴────────┘\n\t\t\t*/\n\n &.FormControl-input-wrap-trailingAction--divider {\n & .FormControl-input.FormControl-small {\n padding-inline-end:\n calc(\n var(--primer-control-small-paddingInline-condensed, 8px) + var(--base-size-16, 16px) +\n var(--primer-control-small-gap, 8px) + var(--primer-borderWidth-thin, 1px)\n ); /* 29px */\n }\n }\n }\n\n & .FormControl-input-trailingAction {\n width: calc(var(--primer-control-small-size, 28px) - var(--base-size-8, 8px));\n height: calc(var(--primer-control-small-size, 28px) - var(--base-size-8, 8px));\n\n &::before {\n top: calc((var(--primer-control-xsmall-size) - var(--base-size-16)) / 4); /* 2px */\n }\n }\n }\n\n &.FormControl-large {\n & .FormControl-input-leadingVisualWrap {\n top: var(--primer-control-medium-paddingInline-normal, 12px);\n left: var(--primer-control-medium-paddingInline-normal, 12px);\n }\n\n /*\n ┌──36px──┬───12px padding──────┐\n ╎ ┌───┐ ┌────────────────┐ ╎\n ╎ 16px 16px ╎\n ╎ └───┘ └────────────────┘ ╎\n └12px───8px───────────────────┘\n */\n\n &.FormControl-input-wrap--leadingVisual {\n & .FormControl-input.FormControl-large {\n padding-inline-start:\n calc(\n var(--primer-control-large-paddingInline-normal, 12px) + var(--base-size-16, 16px) +\n var(--primer-control-large-gap, 8px)\n ); /* 36px */\n }\n }\n\n /*\n ┌──────────────────┬──36px──┐\n ╎ ┌──────────────┐ ┌────┐ ╎\n ╎ 28px 28px ╎\n ╎ └──────────────┘ └────┘ ╎\n └──────────────────┴────────┘\n */\n\n &.FormControl-input-wrap--trailingAction {\n & .FormControl-input.FormControl-large {\n padding-inline-end:\n calc(\n var(--primer-control-large-paddingInline-normal, 12px) + var(--base-size-16, 16px) +\n var(--primer-control-large-gap, 8px)\n ); /* 36px */\n }\n\n /*\n\t\t\t┌──────────────────┬──37px──┐\n\t\t\t╎ ┌──────────────┐ ┌────┐ ╎\n\t\t\t╎ 28px 28px ╎\n\t\t\t╎ └──────────────┘ └────┘ ╎\n\t\t\t└──────────────────┴────────┘\n\t\t\t*/\n\n &.FormControl-input-wrap-trailingAction--divider {\n & .FormControl-input.FormControl-large {\n padding-inline-end:\n calc(\n var(--primer-control-large-paddingInline-normal, 12px) + var(--base-size-16, 16px) +\n var(--primer-control-large-gap, 8px) + var(--primer-borderWidth-thin, 1px)\n ); /* 37px */\n }\n }\n }\n\n & .FormControl-input-trailingAction {\n top: calc(var(--primer-control-medium-paddingInline-condensed, 8px) - 0.125rem); /* 6px */\n right: calc(var(--primer-control-medium-paddingInline-condensed, 8px) - 0.125rem); /* 6px */\n width: var(--primer-control-small-size, 28px);\n height: var(--primer-control-small-size, 28px);\n\n &::before {\n top: unset;\n height: var(--base-size-20);\n }\n }\n }\n}\n\n.FormControl-select-wrap {\n display: grid;\n grid-template-columns: minmax(0, auto) var(--base-size-16, 16px);\n\n /* mask allows for background-color to respect themes */\n &::after {\n width: var(--base-size-16, 16px);\n height: var(--base-size-16, 16px);\n padding-right: var(--base-size-4, 4px);\n pointer-events: none;\n content: '';\n background-color: var(--color-fg-muted);\n mask: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0iIzU4NjA2OSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNC40MjcgOS40MjdsMy4zOTYgMy4zOTZhLjI1MS4yNTEgMCAwMC4zNTQgMGwzLjM5Ni0zLjM5NkEuMjUuMjUgMCAwMDExLjM5NiA5SDQuNjA0YS4yNS4yNSAwIDAwLS4xNzcuNDI3ek00LjQyMyA2LjQ3TDcuODIgMy4wNzJhLjI1LjI1IDAgMDEuMzU0IDBMMTEuNTcgNi40N2EuMjUuMjUgMCAwMS0uMTc3LjQyN0g0LjZhLjI1LjI1IDAgMDEtLjE3Ny0uNDI3eiIgLz48L3N2Zz4=');\n mask-size: contain;\n mask-repeat: no-repeat;\n grid-column: 2;\n grid-row: 1;\n place-self: center end;\n }\n\n /* spans entire grid below mask */\n & .FormControl-select {\n grid-column: 1/-1;\n grid-row: 1;\n appearance: none;\n padding-right: var(--base-size-20, 20px);\n }\n}\n\n/* checkbox + radio specific styles */\n\n/* // Checkbox + Radio structure\n** ===================\n**\n** .FormControl-radio-wrap\n** ├─ .FormControl-radio\n** ├─ .FormControl-radio-labelWrap\n** │ ├─ .FormControl-label\n** │ ├─ .FormControl-caption */\n\n.FormControl-checkbox-wrap,\n.FormControl-radio-wrap {\n display: inline-grid;\n grid-template-columns: min-content auto;\n gap: var(--base-size-8, 8px);\n\n & .FormControl-checkbox-labelWrap,\n & .FormControl-radio-labelWrap {\n display: flex;\n flex-direction: column;\n gap: var(--base-size-4, 4px);\n }\n\n & .FormControl-label {\n cursor: pointer;\n }\n}\n\n/* these selectors are temporary to override base.scss\n** once Field styles are widely adopted, we can adjust this and the global base styles */\ninput[type='checkbox'].FormControl-checkbox {\n @mixin Field;\n\n position: relative;\n display: grid;\n width: var(--base-size-16, 16px);\n height: var(--base-size-16, 16px);\n margin: 0;\n margin-top: 0.125rem; /* 2px to center align with label (20px line-height) */\n cursor: pointer;\n border-color: var(--color-neutral-emphasis);\n border-radius: var(--primer-borderRadius-small, 3px);\n transition: background-color, border-color 80ms cubic-bezier(0.33, 1, 0.68, 1); /* checked -> unchecked - add 120ms delay to fully see animation-out */\n appearance: none;\n place-content: center;\n\n &::before {\n width: var(--base-size-16, 16px);\n height: var(--base-size-16, 16px);\n visibility: hidden;\n content: '';\n background-color: var(--color-fg-on-emphasis);\n transition: visibility 0s linear 230ms;\n clip-path: inset(var(--base-size-16, 16px) 0 0 0);\n\n /* octicon checkmark image */\n mask-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iOSIgdmlld0JveD0iMCAwIDEyIDkiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMTEuNzgwMyAwLjIxOTYyNUMxMS45MjEgMC4zNjA0MjcgMTIgMC41NTEzMDUgMTIgMC43NTAzMTNDMTIgMC45NDkzMjEgMTEuOTIxIDEuMTQwMTkgMTEuNzgwMyAxLjI4MUw0LjUxODYgOC41NDA0MkM0LjM3Nzc1IDguNjgxIDQuMTg2ODIgOC43NiAzLjk4Nzc0IDguNzZDMy43ODg2NyA4Ljc2IDMuNTk3NzMgOC42ODEgMy40NTY4OSA4LjU0MDQyTDAuMjAxNjIyIDUuMjg2MkMwLjA2ODkyNzcgNS4xNDM4MyAtMC4wMDMzMDkwNSA0Ljk1NTU1IDAuMDAwMTE2NDkzIDQuNzYwOThDMC4wMDM1NTIwNSA0LjU2NjQzIDAuMDgyMzg5NCA0LjM4MDgxIDAuMjIwMDMyIDQuMjQzMjFDMC4zNTc2NjUgNC4xMDU2MiAwLjU0MzM1NSA0LjAyNjgxIDAuNzM3OTcgNC4wMjMzOEMwLjkzMjU4NCA0LjAxOTk0IDEuMTIwOTMgNC4wOTIxNyAxLjI2MzM0IDQuMjI0ODJMMy45ODc3NCA2Ljk0ODM1TDEwLjcxODYgMC4yMTk2MjVDMTAuODU5NSAwLjA3ODk5MjMgMTEuMDUwNCAwIDExLjI0OTUgMEMxMS40NDg1IDAgMTEuNjM5NSAwLjA3ODk5MjMgMTEuNzgwMyAwLjIxOTYyNVoiIGZpbGw9IndoaXRlIi8+Cjwvc3ZnPgo=');\n mask-size: 75%;\n mask-repeat: no-repeat;\n mask-position: center;\n\n @media screen and (prefers-reduced-motion: no-preference) {\n animation: checkmarkOut 80ms cubic-bezier(0.65, 0, 0.35, 1) forwards; /* slightly snappier animation out */\n }\n }\n\n /* extend touch target */\n &::after {\n @mixin minTouchTarget var(--primer-control-medium-size, 32px) var(--primer-control-medium-size, 32px);\n }\n\n &[disabled] {\n & ~ .FormControl-checkbox-labelWrap,\n & ~ .FormControl-radio-labelWrap {\n & .FormControl-label {\n color: var(--color-primer-fg-disabled);\n cursor: not-allowed;\n }\n }\n }\n\n &:checked {\n background: var(--color-accent-fg);\n border-color: var(--color-accent-fg);\n transition: background-color, border-color 80ms cubic-bezier(0.32, 0, 0.67, 0) 0ms; /* unchecked -> checked */\n\n &::before {\n visibility: visible;\n transition: visibility 0s linear 0s;\n\n @media screen and (prefers-reduced-motion: no-preference) {\n animation: checkmarkIn 80ms cubic-bezier(0.65, 0, 0.35, 1) forwards 80ms;\n }\n }\n\n &:disabled {\n cursor: not-allowed;\n background-color: var(--color-primer-fg-disabled);\n border-color: var(--color-primer-fg-disabled);\n opacity: 1;\n\n &::before {\n background-color: var(--color-fg-on-emphasis);\n }\n }\n\n /* Windows High Contrast mode */\n @media (forced-colors: active) {\n background-color: canvastext;\n border-color: canvastext;\n }\n }\n\n &:focus-visible {\n @mixin focusOutline 2px;\n }\n\n &:indeterminate {\n &::before {\n mask-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMiIgdmlld0JveD0iMCAwIDEwIDIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMCAxQzAgMC40NDc3MTUgMC40NDc3MTUgMCAxIDBIOUM5LjU1MjI5IDAgMTAgMC40NDc3MTUgMTAgMUMxMCAxLjU1MjI4IDkuNTUyMjkgMiA5IDJIMUMwLjQ0NzcxNSAyIDAgMS41NTIyOCAwIDFaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K');\n visibility: visible;\n }\n }\n}\n\ninput[type='radio'].FormControl-radio {\n @mixin Field;\n\n position: relative;\n width: var(--base-size-16, 16px);\n height: var(--base-size-16, 16px);\n margin: 0;\n margin-top: 0.125rem; /* 2px to center align with label (20px line-height) */\n cursor: pointer;\n border-color: var(--color-neutral-emphasis);\n border-radius: var(--primer-borderRadius-full, 100vh);\n transition: background-color, border-color 80ms cubic-bezier(0.33, 1, 0.68, 1); /* checked -> unchecked - add 120ms delay to fully see animation-out */\n appearance: none;\n\n &::after {\n @mixin minTouchTarget var(--primer-control-medium-size, 32px) var(--primer-control-medium-size, 32px);\n }\n\n &:checked {\n border-color: var(--color-accent-fg);\n border-width: var(--base-size-4, 4px);\n\n &:disabled {\n cursor: not-allowed;\n border-color: var(--color-primer-fg-disabled);\n }\n }\n\n &:focus-visible {\n @mixin focusOutline 2px;\n }\n\n /* Windows High Contrast mode */\n @media (forced-colors: active) {\n background-color: canvastext;\n border-color: canvastext;\n }\n}\n\n@keyframes checkmarkIn {\n from {\n clip-path: inset(var(--base-size-16, 16px) 0 0 0);\n }\n\n to {\n clip-path: inset(0 0 0 0);\n }\n}\n\n@keyframes checkmarkOut {\n from {\n clip-path: inset(0 0 0 0);\n }\n\n to {\n clip-path: inset(var(--base-size-16, 16px) 0 0 0);\n }\n}\n","/* inset box-shadow for form controls */\n@define-mixin focusBoxShadowInset $outlineWidth: 1px, $outlineColor: var(--color-accent-fg) {\n border-color: var(--color-accent-fg);\n outline: none;\n box-shadow: inset 0 0 0 $outlineWidth $outlineColor;\n}\n",null,"@define-mixin focusOutline $outlineOffset: -2px, $outlineColor: var(--color-accent-fg) {\n outline: 2px solid $outlineColor;\n outline-offset: $outlineOffset;\n box-shadow: none;\n}\n"]}
|
1
|
+
{"version":3,"sources":["text_field.pcss","../../../../lib/postcss_mixins/focusBoxShadowInset.pcss","<no source>","../../../../lib/postcss_mixins/focusOutline.pcss"],"names":[],"mappings":"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","file":"text_field.css","sourcesContent":["/* FormControl */\n\n/* groups label, field, caption and inline error message */\n.FormControl {\n display: inline-flex;\n flex-direction: column;\n gap: var(--base-size-4, 4px);\n}\n\n/* fill container */\n.FormControl--fullWidth {\n display: flex;\n}\n\n/* <label> */\n.FormControl-label {\n font-size: var(--primer-text-body-size-medium, 14px);\n font-weight: var(--base-text-weight-semibold, 600);\n line-height: var(--primer-text-body-lineHeight-medium, calc(20 / 14));\n color: var(--color-fg-default);\n user-select: none;\n}\n\n/* optional caption */\n.FormControl-caption {\n margin-bottom: 0;\n font-size: var(--primer-text-caption-size, 12px);\n font-weight: var(--primer-text-caption-weight, 400);\n line-height: var(--primer-text-caption-lineHeight, calc(16 / 12));\n color: var(--color-fg-muted);\n}\n\n/* inline validation message */\n.FormControl-inlineValidation {\n display: flex;\n font-size: var(--primer-text-caption-size, 12px);\n font-weight: var(--base-text-weight-semibold, 600);\n color: var(--color-danger-fg);\n fill: var(--color-danger-fg);\n flex-direction: row;\n align-items: center;\n gap: var(--base-size-4, 4px);\n\n & p {\n margin-bottom: 0;\n }\n}\n\n.FormControl-spacingWrapper {\n display: flex;\n flex-direction: column;\n row-gap: 0.5rem;\n}\n\n.FormControl-horizontalGroup {\n display: flex;\n column-gap: 0.5rem;\n}\n\n/* shared among all form control components (input, select, textarea, checkbox, radio) */\n@define-mixin Field {\n color: var(--color-fg-default);\n background-color: var(--color-canvas-default);\n border: var(--primer-borderWidth-thin, 1px) solid var(--color-border-default);\n\n &[disabled] {\n color: var(--color-primer-fg-disabled);\n cursor: not-allowed;\n background-color: var(--color-input-disabled-bg);\n border-color: var(--color-border-default);\n opacity: 1;\n -webkit-text-fill-color: var(--color-primer-fg-disabled);\n }\n\n &:not(:focus)[invalid] {\n border-color: var(--color-danger-emphasis);\n }\n\n &:not([type='checkbox'], [type='radio']):focus {\n @mixin focusBoxShadowInset;\n\n /* remove fallback :focus if :focus-visible is supported */\n &:not(:focus-visible) {\n border-color: transparent;\n\n @mixin focusBoxShadowInset 1px transparent;\n }\n }\n\n /* default focus state */\n &:not([type='checkbox'], [type='radio']):focus-visible {\n @mixin focusBoxShadowInset;\n }\n}\n\n/* TextInput structure\n** ===================\n**\n** .FormControl\n** ├─ .FormControl-label\n** │ ├─ .FormControl-input-wrap\n** │ │ ├─ .FormControl-input-leadingVisualWrap\n** │ │ │ ├─ .FormControl-input-leadingVisual\n** │ │ ├─ .FormControl-input\n** │ │ ├─ .FormControl-input-trailingAction\n** ├─ .FormControl-inlineValidation\n** ├─ .FormControl-caption */\n\n/* // Select structure\n** ===================\n**\n** .FormControl\n** ├─ .FormControl-label\n** │ ├─ .FormControl-select-wrap\n** │ │ ├─ .FormControl-select\n** ├─ .FormControl-inlineValidation\n** ├─ .FormControl-caption */\n\n/* // Textarea structure\n** ===================\n**\n** .FormControl\n** ├─ .FormControl-label\n** ├─ .FormControl-textarea\n** ├─ .FormControl-inlineValidation\n** ├─ .FormControl-caption */\n\n.FormControl-input,\n.FormControl-select,\n.FormControl-textarea {\n @mixin Field;\n\n width: 100%;\n font-size: var(--primer-text-body-size-medium, 14px);\n line-height: var(--primer-text-body-lineHeight-medium, calc(20 / 14));\n border-radius: var(--primer-borderRadius-medium, 6px);\n transition: 80ms cubic-bezier(0.33, 1, 0.68, 1);\n transition-property: color, background-color, box-shadow, border-color;\n padding-inline: var(--primer-control-medium-paddingInline-condensed, 8px);\n padding-block: calc(var(--primer-control-medium-paddingBlock, 6px) - var(--primer-borderWidth-thin, 1px));\n\n &[disabled] {\n &::placeholder {\n color: var(--color-primer-fg-disabled);\n }\n }\n\n &[readonly] {\n background-color: var(--color-input-disabled-bg);\n }\n\n &::placeholder {\n color: var(--color-fg-subtle);\n opacity: 1;\n }\n\n /* sizes */\n\n &.FormControl-small {\n height: var(--primer-control-small-size, 28px);\n padding-inline: var(--primer-control-small-paddingInline-normal, 8px);\n padding-block: var(--primer-control-small-paddingBlock, 4px);\n font-size: var(--primer-text-body-size-small, 12px);\n }\n\n &.FormControl-medium {\n height: var(--primer-control-medium-size, 32px);\n }\n\n &.FormControl-large {\n height: var(--primer-control-large-size, 40px);\n padding-inline: var(--primer-control-large-paddingInline-normal, 12px);\n padding-block: var(--primer-control-large-paddingBlock, 10px);\n }\n\n /* variants */\n\n &.FormControl-inset {\n background-color: var(--color-canvas-inset);\n\n &:focus-visible,\n &:focus {\n background-color: var(--color-canvas-default);\n }\n }\n\n &.FormControl-monospace {\n font-family:\n var(\n --primer-fontStack-monospace,\n 'ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace'\n );\n }\n\n /* validation states */\n\n &.FormControl-error {\n border-color: var(--color-danger-emphasis);\n }\n\n &.FormControl-success {\n border-color: var(--color-success-emphasis);\n }\n\n &.FormControl-warning {\n border-color: var(--color-attention-emphasis);\n }\n}\n\n.FormControl-toggleSwitchInput {\n display: flex;\n align-items: flex-start;\n gap: var(--base-size-16, 16px);\n}\n\n/* positioning for leading/trailing items for TextInput */\n.FormControl-input-wrap {\n position: relative;\n display: grid;\n\n & .FormControl-input-leadingVisualWrap {\n position: absolute;\n top: var(--base-size-8, 8px);\n left: var(--base-size-8, 8px);\n display: block;\n width: var(--base-size-16, 16px);\n height: var(--base-size-16, 16px);\n color: var(--color-fg-muted);\n pointer-events: none;\n\n /* octicon */\n & .FormControl-input-leadingVisual {\n display: block;\n user-select: none;\n }\n }\n\n /* TODO: replace with new Button component */\n & .FormControl-input-trailingAction {\n position: absolute;\n top: var(--base-size-4, 4px);\n right: var(--base-size-4, 4px);\n z-index: 4;\n display: grid;\n width: var(--primer-control-xsmall-size, 24px);\n height: var(--primer-control-xsmall-size, 24px);\n padding: 0;\n color: var(--color-fg-muted);\n cursor: pointer;\n background: transparent;\n border: 0;\n border-radius: var(--primer-borderRadius-small);\n transition: 0.2s cubic-bezier(0.3, 0, 0.5, 1);\n transition-property: color, background-color, border-color;\n align-items: center;\n justify-content: center;\n\n & svg {\n user-select: none;\n }\n\n &[disabled] {\n color: var(--color-primer-fg-disabled);\n pointer-events: none;\n }\n\n &:hover {\n background: var(--color-action-list-item-default-hover-bg);\n }\n\n &:active {\n background: var(--color-action-list-item-default-active-bg);\n }\n\n /* show vertical divider line between field and button */\n &.FormControl-input-trailingAction--divider {\n &::before {\n position: absolute;\n top: calc((var(--primer-control-xsmall-size) - var(--base-size-16)) / 2);\n left: calc(var(--base-size-4, 4px) * -1);\n display: block;\n width: var(--primer-borderWidth-thin);\n height: var(--base-size-16);\n content: '';\n background: var(--color-border-default);\n }\n }\n\n &::after {\n @mixin minTouchTarget var(--primer-control-medium-size, 32px) var(--primer-control-medium-size, 32px);\n\n @media (pointer: coarse) {\n min-width: var(--primer-control-minTarget-coarse, 44px);\n min-height: var(--primer-control-minTarget-coarse, 44px);\n }\n }\n }\n\n /* if leadingVisual is present */\n\n /*\n\t┌──32px──┬────────────────────┐\n\t╎ ┌───┐ ┌────────────────┐ ╎\n\t╎ 16px 16px ╎\n\t╎ └───┘ └────────────────┘ ╎\n\t└───────8px───────────────────┘\n\t*/\n\n &.FormControl-input-wrap--leadingVisual {\n & .FormControl-input {\n padding-inline-start:\n calc(\n var(--primer-control-medium-paddingInline-condensed, 8px) + var(--base-size-16, 16px) +\n var(--primer-control-medium-gap, 8px)\n ); /* 32px */\n }\n }\n\n /*\n\t┌──────────────────┬──32px──┐\n\t╎ ┌──────────────┐ ┌────┐ ╎\n\t╎ 24px 24px ╎\n\t╎ └──────────────┘ └────┘ ╎\n\t└──────────────────┴────────┘\n */\n\n /* if trailingAction is present */\n &.FormControl-input-wrap--trailingAction {\n & .FormControl-input {\n padding-inline-end:\n calc(\n var(--primer-control-medium-paddingInline-condensed, 8px) + var(--base-size-16, 16px) +\n var(--primer-control-medium-gap, 8px)\n ); /* 32px */\n }\n\n /*\n\t\t32px + 1px border\n\t\t┌──────────────────┬──33px──┐\n\t\t╎ ┌──────────────┐ ┌────┐ ╎\n\t\t╎ 24px 24px ╎\n\t\t╎ └──────────────┘ └────┘ ╎\n\t\t└──────────────────┴────────┘\n\t\t*/\n\n /* if trailingAction divider is present, add 1px padding to accomodate input field text\n ** can be refactored to has(.FormControl-input-trailingAction--divider) */\n &.FormControl-input-wrap-trailingAction--divider {\n & .FormControl-input {\n padding-inline-end:\n calc(\n var(--primer-control-medium-paddingInline-condensed, 8px) + var(--base-size-16, 16px) +\n var(--primer-control-medium-gap, 8px) + var(--primer-borderWidth-thin, 1px)\n ); /* 33px */\n }\n }\n }\n\n /* size modifications can be refactored with :has() - FormControl-input-wrap:has(.FormControl-large)\n // sizes */\n &.FormControl-small {\n & .FormControl-input-leadingVisualWrap {\n top: calc(var(--primer-control-medium-paddingInline-condensed, 8px) - 0.125rem); /* 6px */\n left: calc(var(--primer-control-medium-paddingInline-condensed, 8px) - 0.125rem); /* 6px */\n }\n\n /*\n ┌──────────────────┬──28px──┐\n ╎ ┌──────────────┐ ┌────┐ ╎\n ╎ 20px 20px ╎\n ╎ └──────────────┘ └────┘ ╎\n └──────────────────┴────────┘\n */\n\n &.FormControl-input-wrap--trailingAction {\n & .FormControl-input.FormControl-small {\n padding-inline-end:\n calc(\n var(--primer-control-small-paddingInline-condensed, 8px) + var(--base-size-16, 16px) +\n var(--primer-control-small-gap, 8px)\n ); /* 28px */\n }\n\n /*\n\t\t\t28px + 1px border\n\t\t\t┌──────────────────┬──29px──┐\n\t\t\t╎ ┌──────────────┐ ┌────┐ ╎\n\t\t\t╎ 20px 20px ╎\n\t\t\t╎ └──────────────┘ └────┘ ╎\n\t\t\t└──────────────────┴────────┘\n\t\t\t*/\n\n &.FormControl-input-wrap-trailingAction--divider {\n & .FormControl-input.FormControl-small {\n padding-inline-end:\n calc(\n var(--primer-control-small-paddingInline-condensed, 8px) + var(--base-size-16, 16px) +\n var(--primer-control-small-gap, 8px) + var(--primer-borderWidth-thin, 1px)\n ); /* 29px */\n }\n }\n }\n\n & .FormControl-input-trailingAction {\n width: calc(var(--primer-control-small-size, 28px) - var(--base-size-8, 8px));\n height: calc(var(--primer-control-small-size, 28px) - var(--base-size-8, 8px));\n\n &::before {\n top: calc((var(--primer-control-xsmall-size) - var(--base-size-16)) / 4); /* 2px */\n }\n }\n }\n\n &.FormControl-large {\n & .FormControl-input-leadingVisualWrap {\n top: var(--primer-control-medium-paddingInline-normal, 12px);\n left: var(--primer-control-medium-paddingInline-normal, 12px);\n }\n\n /*\n ┌──36px──┬───12px padding──────┐\n ╎ ┌───┐ ┌────────────────┐ ╎\n ╎ 16px 16px ╎\n ╎ └───┘ └────────────────┘ ╎\n └12px───8px───────────────────┘\n */\n\n &.FormControl-input-wrap--leadingVisual {\n & .FormControl-input.FormControl-large {\n padding-inline-start:\n calc(\n var(--primer-control-large-paddingInline-normal, 12px) + var(--base-size-16, 16px) +\n var(--primer-control-large-gap, 8px)\n ); /* 36px */\n }\n }\n\n /*\n ┌──────────────────┬──36px──┐\n ╎ ┌──────────────┐ ┌────┐ ╎\n ╎ 28px 28px ╎\n ╎ └──────────────┘ └────┘ ╎\n └──────────────────┴────────┘\n */\n\n &.FormControl-input-wrap--trailingAction {\n & .FormControl-input.FormControl-large {\n padding-inline-end:\n calc(\n var(--primer-control-large-paddingInline-normal, 12px) + var(--base-size-16, 16px) +\n var(--primer-control-large-gap, 8px)\n ); /* 36px */\n }\n\n /*\n\t\t\t┌──────────────────┬──37px──┐\n\t\t\t╎ ┌──────────────┐ ┌────┐ ╎\n\t\t\t╎ 28px 28px ╎\n\t\t\t╎ └──────────────┘ └────┘ ╎\n\t\t\t└──────────────────┴────────┘\n\t\t\t*/\n\n &.FormControl-input-wrap-trailingAction--divider {\n & .FormControl-input.FormControl-large {\n padding-inline-end:\n calc(\n var(--primer-control-large-paddingInline-normal, 12px) + var(--base-size-16, 16px) +\n var(--primer-control-large-gap, 8px) + var(--primer-borderWidth-thin, 1px)\n ); /* 37px */\n }\n }\n }\n\n & .FormControl-input-trailingAction {\n top: calc(var(--primer-control-medium-paddingInline-condensed, 8px) - 0.125rem); /* 6px */\n right: calc(var(--primer-control-medium-paddingInline-condensed, 8px) - 0.125rem); /* 6px */\n width: var(--primer-control-small-size, 28px);\n height: var(--primer-control-small-size, 28px);\n\n &::before {\n top: unset;\n height: var(--base-size-20);\n }\n }\n }\n}\n\n.FormControl-select-wrap {\n display: grid;\n grid-template-columns: minmax(0, auto) var(--base-size-16, 16px);\n\n /* mask allows for background-color to respect themes */\n &::after {\n width: var(--base-size-16, 16px);\n height: var(--base-size-16, 16px);\n padding-right: var(--base-size-4, 4px);\n pointer-events: none;\n content: '';\n background-color: var(--color-fg-muted);\n mask: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0iIzU4NjA2OSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNC40MjcgOS40MjdsMy4zOTYgMy4zOTZhLjI1MS4yNTEgMCAwMC4zNTQgMGwzLjM5Ni0zLjM5NkEuMjUuMjUgMCAwMDExLjM5NiA5SDQuNjA0YS4yNS4yNSAwIDAwLS4xNzcuNDI3ek00LjQyMyA2LjQ3TDcuODIgMy4wNzJhLjI1LjI1IDAgMDEuMzU0IDBMMTEuNTcgNi40N2EuMjUuMjUgMCAwMS0uMTc3LjQyN0g0LjZhLjI1LjI1IDAgMDEtLjE3Ny0uNDI3eiIgLz48L3N2Zz4=');\n mask-size: contain;\n mask-repeat: no-repeat;\n grid-column: 2;\n grid-row: 1;\n place-self: center end;\n }\n\n /* spans entire grid below mask */\n & .FormControl-select {\n grid-column: 1/-1;\n grid-row: 1;\n appearance: none;\n padding-right: var(--base-size-20, 20px);\n }\n}\n\n/* checkbox + radio specific styles */\n\n/* // Checkbox + Radio structure\n** ===================\n**\n** .FormControl-radio-wrap\n** ├─ .FormControl-radio\n** ├─ .FormControl-radio-labelWrap\n** │ ├─ .FormControl-label\n** │ ├─ .FormControl-caption */\n\n.FormControl-checkbox-wrap,\n.FormControl-radio-wrap {\n display: inline-grid;\n grid-template-columns: min-content auto;\n gap: var(--base-size-8, 8px);\n\n & .FormControl-checkbox-labelWrap,\n & .FormControl-radio-labelWrap {\n display: flex;\n flex-direction: column;\n gap: var(--base-size-4, 4px);\n }\n\n & .FormControl-label {\n cursor: pointer;\n }\n}\n\n.FormControl-radio-group-wrap {\n & fieldset {\n padding: 0;\n margin: 0;\n border: 0;\n }\n}\n\n.FormControl-check-group-wrap {\n & fieldset {\n padding: 0;\n margin: 0;\n border: 0;\n }\n}\n\n/* these selectors are temporary to override base.scss\n** once Field styles are widely adopted, we can adjust this and the global base styles */\ninput[type='checkbox'].FormControl-checkbox {\n @mixin Field;\n\n position: relative;\n display: grid;\n width: var(--base-size-16, 16px);\n height: var(--base-size-16, 16px);\n margin: 0;\n margin-top: 0.125rem; /* 2px to center align with label (20px line-height) */\n cursor: pointer;\n border-color: var(--color-neutral-emphasis);\n border-radius: var(--primer-borderRadius-small, 3px);\n transition: background-color, border-color 80ms cubic-bezier(0.33, 1, 0.68, 1); /* checked -> unchecked - add 120ms delay to fully see animation-out */\n appearance: none;\n place-content: center;\n\n &::before {\n width: var(--base-size-16, 16px);\n height: var(--base-size-16, 16px);\n visibility: hidden;\n content: '';\n background-color: var(--color-fg-on-emphasis);\n transition: visibility 0s linear 230ms;\n clip-path: inset(var(--base-size-16, 16px) 0 0 0);\n\n /* octicon checkmark image */\n mask-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iOSIgdmlld0JveD0iMCAwIDEyIDkiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMTEuNzgwMyAwLjIxOTYyNUMxMS45MjEgMC4zNjA0MjcgMTIgMC41NTEzMDUgMTIgMC43NTAzMTNDMTIgMC45NDkzMjEgMTEuOTIxIDEuMTQwMTkgMTEuNzgwMyAxLjI4MUw0LjUxODYgOC41NDA0MkM0LjM3Nzc1IDguNjgxIDQuMTg2ODIgOC43NiAzLjk4Nzc0IDguNzZDMy43ODg2NyA4Ljc2IDMuNTk3NzMgOC42ODEgMy40NTY4OSA4LjU0MDQyTDAuMjAxNjIyIDUuMjg2MkMwLjA2ODkyNzcgNS4xNDM4MyAtMC4wMDMzMDkwNSA0Ljk1NTU1IDAuMDAwMTE2NDkzIDQuNzYwOThDMC4wMDM1NTIwNSA0LjU2NjQzIDAuMDgyMzg5NCA0LjM4MDgxIDAuMjIwMDMyIDQuMjQzMjFDMC4zNTc2NjUgNC4xMDU2MiAwLjU0MzM1NSA0LjAyNjgxIDAuNzM3OTcgNC4wMjMzOEMwLjkzMjU4NCA0LjAxOTk0IDEuMTIwOTMgNC4wOTIxNyAxLjI2MzM0IDQuMjI0ODJMMy45ODc3NCA2Ljk0ODM1TDEwLjcxODYgMC4yMTk2MjVDMTAuODU5NSAwLjA3ODk5MjMgMTEuMDUwNCAwIDExLjI0OTUgMEMxMS40NDg1IDAgMTEuNjM5NSAwLjA3ODk5MjMgMTEuNzgwMyAwLjIxOTYyNVoiIGZpbGw9IndoaXRlIi8+Cjwvc3ZnPgo=');\n mask-size: 75%;\n mask-repeat: no-repeat;\n mask-position: center;\n\n @media screen and (prefers-reduced-motion: no-preference) {\n animation: checkmarkOut 80ms cubic-bezier(0.65, 0, 0.35, 1) forwards; /* slightly snappier animation out */\n }\n }\n\n /* extend touch target */\n &::after {\n @mixin minTouchTarget var(--primer-control-medium-size, 32px) var(--primer-control-medium-size, 32px);\n }\n\n &[disabled] {\n & ~ .FormControl-checkbox-labelWrap,\n & ~ .FormControl-radio-labelWrap {\n & .FormControl-label {\n color: var(--color-primer-fg-disabled);\n cursor: not-allowed;\n }\n }\n }\n\n &:checked {\n background: var(--color-accent-fg);\n border-color: var(--color-accent-fg);\n transition: background-color, border-color 80ms cubic-bezier(0.32, 0, 0.67, 0) 0ms; /* unchecked -> checked */\n\n &::before {\n visibility: visible;\n transition: visibility 0s linear 0s;\n\n @media screen and (prefers-reduced-motion: no-preference) {\n animation: checkmarkIn 80ms cubic-bezier(0.65, 0, 0.35, 1) forwards 80ms;\n }\n }\n\n &:disabled {\n cursor: not-allowed;\n background-color: var(--color-primer-fg-disabled);\n border-color: var(--color-primer-fg-disabled);\n opacity: 1;\n\n &::before {\n background-color: var(--color-fg-on-emphasis);\n }\n }\n\n /* Windows High Contrast mode */\n @media (forced-colors: active) {\n background-color: canvastext;\n border-color: canvastext;\n }\n }\n\n &:focus-visible {\n @mixin focusOutline 2px;\n }\n\n &:indeterminate {\n &::before {\n mask-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMiIgdmlld0JveD0iMCAwIDEwIDIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMCAxQzAgMC40NDc3MTUgMC40NDc3MTUgMCAxIDBIOUM5LjU1MjI5IDAgMTAgMC40NDc3MTUgMTAgMUMxMCAxLjU1MjI4IDkuNTUyMjkgMiA5IDJIMUMwLjQ0NzcxNSAyIDAgMS41NTIyOCAwIDFaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K');\n visibility: visible;\n }\n }\n}\n\ninput[type='radio'].FormControl-radio {\n @mixin Field;\n\n position: relative;\n width: var(--base-size-16, 16px);\n height: var(--base-size-16, 16px);\n margin: 0;\n margin-top: 0.125rem; /* 2px to center align with label (20px line-height) */\n cursor: pointer;\n border-color: var(--color-neutral-emphasis);\n border-radius: var(--primer-borderRadius-full, 100vh);\n transition: background-color, border-color 80ms cubic-bezier(0.33, 1, 0.68, 1); /* checked -> unchecked - add 120ms delay to fully see animation-out */\n appearance: none;\n\n &::after {\n @mixin minTouchTarget var(--primer-control-medium-size, 32px) var(--primer-control-medium-size, 32px);\n }\n\n &:checked {\n border-color: var(--color-accent-fg);\n border-width: var(--base-size-4, 4px);\n\n &:disabled {\n cursor: not-allowed;\n border-color: var(--color-primer-fg-disabled);\n }\n }\n\n &:focus-visible {\n @mixin focusOutline 2px;\n }\n\n /* Windows High Contrast mode */\n @media (forced-colors: active) {\n background-color: canvastext;\n border-color: canvastext;\n }\n}\n\n@keyframes checkmarkIn {\n from {\n clip-path: inset(var(--base-size-16, 16px) 0 0 0);\n }\n\n to {\n clip-path: inset(0 0 0 0);\n }\n}\n\n@keyframes checkmarkOut {\n from {\n clip-path: inset(0 0 0 0);\n }\n\n to {\n clip-path: inset(var(--base-size-16, 16px) 0 0 0);\n }\n}\n","/* inset box-shadow for form controls */\n@define-mixin focusBoxShadowInset $outlineWidth: 1px, $outlineColor: var(--color-accent-fg) {\n border-color: var(--color-accent-fg);\n outline: none;\n box-shadow: inset 0 0 0 $outlineWidth $outlineColor;\n}\n",null,"@define-mixin focusOutline $outlineOffset: -2px, $outlineColor: var(--color-accent-fg) {\n outline: 2px solid $outlineColor;\n outline-offset: $outlineOffset;\n box-shadow: none;\n}\n"]}
|
@@ -46,6 +46,17 @@
|
|
46
46
|
}
|
47
47
|
}
|
48
48
|
|
49
|
+
.FormControl-spacingWrapper {
|
50
|
+
display: flex;
|
51
|
+
flex-direction: column;
|
52
|
+
row-gap: 0.5rem;
|
53
|
+
}
|
54
|
+
|
55
|
+
.FormControl-horizontalGroup {
|
56
|
+
display: flex;
|
57
|
+
column-gap: 0.5rem;
|
58
|
+
}
|
59
|
+
|
49
60
|
/* shared among all form control components (input, select, textarea, checkbox, radio) */
|
50
61
|
@define-mixin Field {
|
51
62
|
color: var(--color-fg-default);
|
@@ -532,6 +543,22 @@
|
|
532
543
|
}
|
533
544
|
}
|
534
545
|
|
546
|
+
.FormControl-radio-group-wrap {
|
547
|
+
& fieldset {
|
548
|
+
padding: 0;
|
549
|
+
margin: 0;
|
550
|
+
border: 0;
|
551
|
+
}
|
552
|
+
}
|
553
|
+
|
554
|
+
.FormControl-check-group-wrap {
|
555
|
+
& fieldset {
|
556
|
+
padding: 0;
|
557
|
+
margin: 0;
|
558
|
+
border: 0;
|
559
|
+
}
|
560
|
+
}
|
561
|
+
|
535
562
|
/* these selectors are temporary to override base.scss
|
536
563
|
** once Field styles are widely adopted, we can adjust this and the global base styles */
|
537
564
|
input[type='checkbox'].FormControl-checkbox {
|
@@ -4,8 +4,14 @@ module Primer
|
|
4
4
|
module Alpha
|
5
5
|
TextField = Primer::FormComponents.from_input(Primer::Forms::Dsl::TextFieldInput)
|
6
6
|
|
7
|
-
#
|
8
|
-
#
|
7
|
+
# Text fields are single-line text inputs rendered as `<input type="text">` in HTML.
|
8
|
+
#
|
9
|
+
# @form_usage
|
10
|
+
# class ExampleForm < ApplicationForm
|
11
|
+
# form do |example_form|
|
12
|
+
# example_form.text_field(attributes)
|
13
|
+
# end
|
14
|
+
# end
|
9
15
|
class TextField < Primer::Component
|
10
16
|
status :alpha
|
11
17
|
|
@@ -79,28 +85,17 @@ module Primer
|
|
79
85
|
# )
|
80
86
|
# ) %>
|
81
87
|
#
|
82
|
-
# @
|
83
|
-
# @
|
84
|
-
# @
|
85
|
-
#
|
86
|
-
# @param caption [String] Caption text to render below the input.
|
87
|
-
# @param label [String] Label text displayed above the input.
|
88
|
-
# @param visually_hide_label [Boolean] Whether or not to visually hide the label. If `true` the label will be hidden visually but still available to screen readers.
|
89
|
-
# @param size [Symbol] The size of the field. <%= one_of(Primer::Forms::Dsl::Input::SIZE_OPTIONS) %>
|
90
|
-
# @param show_clear_button [Boolean] Whether or not to include a clear button inside the input that clears the input's contents when clicked.
|
91
|
-
# @param clear_button_id [String] The HTML id attribute of the clear button.
|
92
|
-
# @param full_width [Boolean] Controls whether or not the input takes the full width of its container.
|
93
|
-
# @param disabled [Boolean] Whether or not the input should accept keyboard and mouse input.
|
94
|
-
# @param invalid [Boolean] If `true`, renders the input in a visually invalid state.
|
88
|
+
# @macro form_size_arguments
|
89
|
+
# @macro form_full_width_arguments
|
90
|
+
# @macro form_input_arguments
|
91
|
+
#
|
95
92
|
# @param placeholder [String] Placeholder text.
|
96
93
|
# @param inset [Boolean] If `true`, renders the input in a visually inset state.
|
97
94
|
# @param monospace [Boolean] If `true`, uses a monospace font for the input field.
|
98
|
-
# @param leading_visual [Hash] Renders a leading visual icon before the text field's cursor. The hash will be passed to Primer's [Octicon component](https://primer.style/view-components/components/octicon).
|
99
|
-
# @param validation_message [String] A validation message to display beneath the input. Implicitly sets `invalid` to `true`.
|
100
|
-
# @param label_arguments [Hash] System arugments passed to the Rails builder's `#label` method. These arguments will appear as HTML attributes on the `<label>` tag.
|
101
95
|
# @param auto_check_src [String] When provided, makes a request to the given URL whenever the contents of the text field changes. If the server responds with a non-2xx status code, the response body is used as the validation message.
|
102
|
-
# @param
|
103
|
-
# @param
|
96
|
+
# @param leading_visual [Hash] Renders a leading visual icon before the text field's cursor. The hash will be passed to Primer's <%= link_to_component(Primer::Beta::Octicon) %> component.
|
97
|
+
# @param show_clear_button [Boolean] Whether or not to include a clear button inside the input that clears the input's contents when clicked.
|
98
|
+
# @param clear_button_id [String] The HTML id attribute of the clear button.
|
104
99
|
end
|
105
100
|
end
|
106
101
|
end
|
@@ -1 +1 @@
|
|
1
|
-
.ToggleSwitch,.ToggleSwitch.ToggleSwitch{display:inline-flex}.ToggleSwitch{align-items:center;gap:var(--primer-controlStack-medium-gap-condensed,8px)}.ToggleSwitch
|
1
|
+
.ToggleSwitch,.ToggleSwitch.ToggleSwitch{display:inline-flex}.ToggleSwitch{align-items:center;gap:var(--primer-controlStack-medium-gap-condensed,8px)}.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(--color-switch-track-bg);border:var(--primer-borderWidth-thin,1px) solid var(--color-switch-track-border);border-radius:var(--primer-borderRadius-medium,6px);cursor:pointer;display:block;height:var(--primer-control-medium-size,32px);overflow:hidden;padding:0;position:relative;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,64px)}.ToggleSwitch-track:focus,.ToggleSwitch-track:focus-visible{outline-offset:1px}.ToggleSwitch-track:hover{background-color:var(--color-switch-track-hover-bg)}.ToggleSwitch-track:active{background-color: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-checked=true][aria-disabled=true]{background-color:var(--color-switch-track-disabled-bg);border-color:#0000;color:var(--color-switch-track-checked-disabled-fg)}.ToggleSwitch-track[aria-checked=true]{background-color:var(--color-switch-track-checked-bg);border-color:var(--color-switch-track-checked-border)}.ToggleSwitch-track[aria-checked=true]:not([aria-disabled=true]):hover{background-color:var(--color-switch-track-checked-hover-bg)}.ToggleSwitch-track[aria-checked=true]:not([aria-disabled=true]):active{background-color:var(--color-switch-track-checked-active-bg)}.ToggleSwitch-track[aria-checked=true] .ToggleSwitch-knob{background-color:var(--color-switch-knob-checked-bg);border-color:var(--color-switch-knob-checked-border);transform:translateX(100%)}.ToggleSwitch-track[aria-checked=true] .ToggleSwitch-lineIcon{transform:translateX(0)}.ToggleSwitch-track[aria-checked=true] .ToggleSwitch-circleIcon{transform:translateX(100%)}.ToggleSwitch-track[aria-disabled=true]{background-color:var(--color-switch-track-disabled-bg);border-color:#0000;cursor:not-allowed;transition-property:none}.ToggleSwitch-track[aria-disabled=true] .ToggleSwitch-knob{border-color:var(--color-border-default);box-shadow:none}.ToggleSwitch-track[aria-disabled=true] .ToggleSwitch-circleIcon,.ToggleSwitch-track[aria-disabled=true] .ToggleSwitch-lineIcon{color:var(--color-switch-track-disabled-fg)}.ToggleSwitch-icons{align-items:center;display:flex;height:100%;overflow:hidden;width:100%}.ToggleSwitch-lineIcon{color: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(--color-switch-track-fg);transform:translateX(0)}.ToggleSwitch-knob{background-color:var(--color-switch-knob-bg);border:var(--primer-borderWidth-thin,1px) solid var(--color-switch-knob-border);border-radius:var(--primer-borderRadius-medium,6px);bottom:0;box-shadow:var(--color-shadow-medium),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(--color-fg-default);font-size:var(--primer-text-body-size-medium,14px);line-height:1.5;position:relative;text-align:right}.ToggleSwitch-statusIcon{display:flex;margin-top:.063rem;width:var(--base-size-16,16px)}.ToggleSwitch--small .ToggleSwitch-status{font-size:var(--primer-text-body-size-small,12px)}.ToggleSwitch--small .ToggleSwitch-track{height:var(--primer-control-xsmall-size,24px);width:var(--base-size-48,48px)}.ToggleSwitch--disabled .ToggleSwitch-status{color: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}
|