carbon-components-svelte 0.108.0 → 0.109.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/css/_badge-indicator.scss +48 -0
- package/css/_box.scss +71 -0
- package/css/_breadcrumb.scss +19 -2
- package/css/_checkbox-readonly.scss +0 -7
- package/css/_combobox-readonly.scss +0 -6
- package/css/_contained-list.scss +3 -21
- package/css/_content-switcher-low-contrast.scss +128 -0
- package/css/_content-switcher.scss +65 -0
- package/css/_copy-button-portal.scss +9 -0
- package/css/_copy-input.scss +120 -0
- package/css/_data-table-highlighted-row.scss +55 -0
- package/css/_data-table-sticky-column-menu.scss +28 -0
- package/css/_data-table-toolbar.scss +146 -0
- package/css/_data-table-zebra-hidden.scss +24 -0
- package/css/_datepicker.scss +1 -2
- package/css/_dropdown-readonly.scss +0 -6
- package/css/_fluid-combo-box.scss +67 -0
- package/css/_fluid-date-picker.scss +336 -0
- package/css/_fluid-list-box.scss +344 -0
- package/css/_fluid-multiselect.scss +51 -0
- package/css/_fluid-number-input.scss +423 -0
- package/css/_fluid-pin-code-input.scss +222 -0
- package/css/_fluid-search.scss +118 -0
- package/css/_fluid-select.scss +188 -0
- package/css/_fluid-text-area.scss +217 -0
- package/css/_fluid-text-input.scss +211 -0
- package/css/_fluid-time-picker.scss +398 -0
- package/css/_list-box-menu-item.scss +41 -0
- package/css/_modal-full-width.scss +17 -0
- package/css/_multiselect-readonly.scss +0 -6
- package/css/_multiselect.scss +3 -8
- package/css/_number-input.scss +1 -2
- package/css/_overflow-menu.scss +68 -0
- package/css/_pagination.scss +32 -0
- package/css/_pin-code-input.scss +112 -0
- package/css/_popover.scss +1 -26
- package/css/_radiobutton-readonly.scss +0 -6
- package/css/_search.scss +41 -0
- package/css/_select-readonly.scss +0 -6
- package/css/_select.scss +21 -0
- package/css/_slider.scss +1 -15
- package/css/_spacing-scale.scss +17 -0
- package/css/_stack.scss +13 -68
- package/css/_tabs.scss +332 -2
- package/css/_tag.scss +13 -0
- package/css/_text-area-readonly.scss +0 -6
- package/css/_text-area-warn.scss +0 -7
- package/css/_text-input.scss +26 -0
- package/css/_toggle-readonly.scss +0 -6
- package/css/_tooltip.scss +1 -2
- package/css/_truncate-multiline.scss +24 -0
- package/css/_type.scss +71 -0
- package/css/_ui-shell-classic.scss +1 -3
- package/css/_ui-shell.scss +4 -50
- package/css/all.css +1 -1
- package/css/all.scss +33 -14
- package/css/css.d.ts +2 -2
- package/css/g10.css +1 -1
- package/css/g10.scss +31 -3
- package/css/g100.css +1 -1
- package/css/g100.scss +31 -3
- package/css/g80.css +1 -1
- package/css/g80.scss +31 -3
- package/css/g90.css +1 -1
- package/css/g90.scss +31 -3
- package/css/white.css +1 -1
- package/css/white.scss +31 -3
- package/package.json +1 -1
- package/src/Accordion/AccordionItem.svelte +8 -4
- package/src/Accordion/AccordionItem.svelte.d.ts +4 -3
- package/src/BadgeIndicator/BadgeIndicator.svelte +37 -0
- package/src/BadgeIndicator/BadgeIndicator.svelte.d.ts +31 -0
- package/src/BadgeIndicator/index.js +1 -0
- package/src/Box/Box.svelte +150 -0
- package/src/Box/Box.svelte.d.ts +119 -0
- package/src/Box/index.js +1 -0
- package/src/Button/Button.svelte +297 -46
- package/src/Button/Button.svelte.d.ts +15 -0
- package/src/Checkbox/Checkbox.svelte +6 -3
- package/src/Checkbox/CheckboxGroup.svelte +2 -2
- package/src/CodeSnippet/CodeSnippet.svelte +30 -26
- package/src/CodeSnippet/CodeSnippet.svelte.d.ts +12 -0
- package/src/ComboBox/ComboBox.svelte +251 -95
- package/src/ComboBox/ComboBox.svelte.d.ts +60 -3
- package/src/ComboBox/FluidComboBoxSkeleton.svelte +16 -0
- package/src/ComboBox/FluidComboBoxSkeleton.svelte.d.ts +22 -0
- package/src/ComboBox/index.js +1 -0
- package/src/ComposedModal/ComposedModal.svelte +26 -29
- package/src/ComposedModal/ComposedModal.svelte.d.ts +7 -1
- package/src/ComposedModal/ModalFooter.svelte +1 -1
- package/src/ContentSwitcher/ContentSwitcher.svelte +39 -39
- package/src/ContentSwitcher/ContentSwitcher.svelte.d.ts +13 -9
- package/src/ContentSwitcher/Switch.svelte +109 -16
- package/src/ContentSwitcher/Switch.svelte.d.ts +19 -4
- package/src/ContextMenu/ContextMenu.svelte +39 -25
- package/src/ContextMenu/ContextMenu.svelte.d.ts +4 -2
- package/src/ContextMenu/ContextMenuGroup.svelte +4 -4
- package/src/ContextMenu/ContextMenuOption.svelte +8 -3
- package/src/ContextMenu/ContextMenuRadioGroup.svelte +4 -4
- package/src/CopyButton/CopyButton.svelte +11 -13
- package/src/CopyButton/CopyButton.svelte.d.ts +7 -1
- package/src/CopyInput/CopyInput.svelte +256 -0
- package/src/CopyInput/CopyInput.svelte.d.ts +167 -0
- package/src/CopyInput/CopyInputSkeleton.svelte +20 -0
- package/src/CopyInput/CopyInputSkeleton.svelte.d.ts +27 -0
- package/src/CopyInput/FluidCopyInputSkeleton.svelte +14 -0
- package/src/CopyInput/FluidCopyInputSkeleton.svelte.d.ts +22 -0
- package/src/CopyInput/index.js +3 -0
- package/src/DataTable/DataTable.svelte +182 -27
- package/src/DataTable/DataTable.svelte.d.ts +57 -1
- package/src/DataTable/TableHeader.svelte +2 -0
- package/src/DataTable/Toolbar.svelte +28 -7
- package/src/DataTable/Toolbar.svelte.d.ts +4 -2
- package/src/DatePicker/DatePicker.svelte +221 -64
- package/src/DatePicker/DatePicker.svelte.d.ts +13 -0
- package/src/DatePicker/DatePickerInput.svelte +6 -0
- package/src/DatePicker/FluidDatePickerSkeleton.svelte +32 -0
- package/src/DatePicker/FluidDatePickerSkeleton.svelte.d.ts +28 -0
- package/src/DatePicker/datePickerTopLayer.d.ts +1 -0
- package/src/DatePicker/datePickerTopLayer.js +6 -1
- package/src/DatePicker/index.js +1 -0
- package/src/Dropdown/Dropdown.svelte +241 -86
- package/src/Dropdown/Dropdown.svelte.d.ts +61 -3
- package/src/Dropdown/FluidDropdownSkeleton.svelte +16 -0
- package/src/Dropdown/FluidDropdownSkeleton.svelte.d.ts +22 -0
- package/src/Dropdown/index.js +1 -0
- package/src/FileUploader/FileUploader.svelte +25 -15
- package/src/FileUploader/FileUploaderButton.svelte +1 -1
- package/src/FileUploader/FileUploaderDropContainer.svelte +20 -6
- package/src/FileUploader/FileUploaderDropContainer.svelte.d.ts +1 -0
- package/src/FileUploader/FileUploaderSkeleton.svelte +12 -2
- package/src/FileUploader/FileUploaderSkeleton.svelte.d.ts +12 -0
- package/src/ImageLoader/ImageLoader.svelte +2 -2
- package/src/InlineLoading/InlineLoading.svelte +7 -9
- package/src/ListBox/ListBox.svelte +0 -1
- package/src/ListBox/ListBoxField.svelte +4 -3
- package/src/ListBox/ListBoxField.svelte.d.ts +2 -2
- package/src/ListBox/ListBoxMenu.svelte +2 -0
- package/src/ListBox/ListBoxMenu.svelte.d.ts +4 -1
- package/src/ListBox/ListBoxMenuItem.svelte +11 -3
- package/src/ListBox/ListBoxMenuItem.svelte.d.ts +6 -0
- package/src/ListBox/list-box-utils.d.ts +22 -0
- package/src/ListBox/list-box-utils.js +30 -0
- package/src/LocalStorage/LocalStorage.svelte +59 -25
- package/src/LocalStorage/LocalStorage.svelte.d.ts +8 -1
- package/src/Modal/Modal.svelte +23 -15
- package/src/Modal/Modal.svelte.d.ts +7 -1
- package/src/MultiSelect/FluidMultiSelectSkeleton.svelte +16 -0
- package/src/MultiSelect/FluidMultiSelectSkeleton.svelte.d.ts +22 -0
- package/src/MultiSelect/MultiSelect.svelte +287 -135
- package/src/MultiSelect/MultiSelect.svelte.d.ts +33 -5
- package/src/MultiSelect/index.js +1 -0
- package/src/NumberInput/FluidNumberInputSkeleton.svelte +14 -0
- package/src/NumberInput/FluidNumberInputSkeleton.svelte.d.ts +22 -0
- package/src/NumberInput/NumberInput.svelte +56 -21
- package/src/NumberInput/NumberInput.svelte.d.ts +8 -0
- package/src/NumberInput/index.js +1 -0
- package/src/OverflowMenu/OverflowMenu.svelte +124 -85
- package/src/OverflowMenu/OverflowMenu.svelte.d.ts +4 -2
- package/src/OverflowMenu/OverflowMenuItem.svelte +69 -35
- package/src/OverflowMenu/OverflowMenuItem.svelte.d.ts +39 -5
- package/src/Pagination/Pagination.svelte +51 -10
- package/src/Pagination/Pagination.svelte.d.ts +22 -0
- package/src/Pagination/PaginationSkeleton.svelte +9 -0
- package/src/Pagination/PaginationSkeleton.svelte.d.ts +6 -0
- package/src/PaginationNav/PaginationNav.svelte +1 -1
- package/src/PaginationNav/PaginationOverflow.svelte +1 -1
- package/src/PinCodeInput/FluidPinCodeInputSkeleton.svelte +14 -0
- package/src/PinCodeInput/FluidPinCodeInputSkeleton.svelte.d.ts +22 -0
- package/src/PinCodeInput/PinCodeInput.svelte +517 -0
- package/src/PinCodeInput/PinCodeInput.svelte.d.ts +220 -0
- package/src/PinCodeInput/PinCodeInputSkeleton.svelte +20 -0
- package/src/PinCodeInput/PinCodeInputSkeleton.svelte.d.ts +27 -0
- package/src/PinCodeInput/index.js +3 -0
- package/src/Popover/Popover.svelte +15 -6
- package/src/Popover/Popover.svelte.d.ts +3 -0
- package/src/Portal/FloatingPortal.svelte +32 -220
- package/src/Portal/FloatingPortal.svelte.d.ts +2 -5
- package/src/ProgressIndicator/ProgressIndicator.svelte +6 -6
- package/src/RadioButtonGroup/RadioButtonGroup.svelte +6 -14
- package/src/Search/FluidSearchSkeleton.svelte +14 -0
- package/src/Search/FluidSearchSkeleton.svelte.d.ts +21 -0
- package/src/Search/Search.svelte +20 -3
- package/src/Search/Search.svelte.d.ts +10 -1
- package/src/Search/SearchSkeleton.svelte +8 -2
- package/src/Search/SearchSkeleton.svelte.d.ts +7 -1
- package/src/Search/index.js +1 -0
- package/src/Select/FluidSelectSkeleton.svelte +14 -0
- package/src/Select/FluidSelectSkeleton.svelte.d.ts +21 -0
- package/src/Select/Select.svelte +46 -15
- package/src/Select/Select.svelte.d.ts +10 -1
- package/src/Select/index.js +1 -0
- package/src/SessionStorage/SessionStorage.svelte +59 -25
- package/src/SessionStorage/SessionStorage.svelte.d.ts +8 -1
- package/src/SkeletonText/SkeletonText.svelte +1 -1
- package/src/Slider/RangeSlider.svelte +18 -12
- package/src/Slider/Slider.svelte +25 -14
- package/src/Stack/Stack.svelte +9 -0
- package/src/Stack/Stack.svelte.d.ts +7 -0
- package/src/StructuredList/StructuredList.svelte +24 -8
- package/src/StructuredList/StructuredList.svelte.d.ts +12 -3
- package/src/StructuredList/StructuredListInput.svelte +6 -2
- package/src/StructuredList/StructuredListRow.svelte +11 -4
- package/src/Tabs/Tab.svelte +175 -16
- package/src/Tabs/Tab.svelte.d.ts +20 -3
- package/src/Tabs/Tabs.svelte +87 -25
- package/src/Tabs/Tabs.svelte.d.ts +38 -1
- package/src/Tabs/TabsSkeleton.svelte +1 -1
- package/src/Tag/Tag.svelte +6 -0
- package/src/Tag/Tag.svelte.d.ts +6 -0
- package/src/Text/Text.svelte +114 -0
- package/src/Text/Text.svelte.d.ts +132 -0
- package/src/Text/index.js +1 -0
- package/src/TextArea/FluidTextAreaSkeleton.svelte +14 -0
- package/src/TextArea/FluidTextAreaSkeleton.svelte.d.ts +22 -0
- package/src/TextArea/TextArea.svelte +56 -14
- package/src/TextArea/TextArea.svelte.d.ts +8 -0
- package/src/TextArea/index.js +1 -0
- package/src/TextInput/FluidTextInputSkeleton.svelte +14 -0
- package/src/TextInput/FluidTextInputSkeleton.svelte.d.ts +22 -0
- package/src/TextInput/PasswordInput.svelte +90 -65
- package/src/TextInput/PasswordInput.svelte.d.ts +16 -1
- package/src/TextInput/PasswordInputSkeleton.svelte +20 -0
- package/src/TextInput/PasswordInputSkeleton.svelte.d.ts +28 -0
- package/src/TextInput/TextInput.svelte +39 -25
- package/src/TextInput/TextInput.svelte.d.ts +10 -1
- package/src/TextInput/index.js +2 -0
- package/src/Theme/Theme.svelte +13 -11
- package/src/Tile/ExpandableTile.svelte +27 -13
- package/src/Tile/ExpandableTile.svelte.d.ts +2 -0
- package/src/Tile/SelectableTileGroup.svelte +6 -6
- package/src/Tile/TileGroup.svelte +4 -4
- package/src/TimePicker/FluidTimePickerSkeleton.svelte +25 -0
- package/src/TimePicker/FluidTimePickerSkeleton.svelte.d.ts +28 -0
- package/src/TimePicker/TimePicker.svelte +198 -81
- package/src/TimePicker/TimePicker.svelte.d.ts +12 -0
- package/src/TimePicker/TimePickerSelect.svelte +131 -56
- package/src/TimePicker/index.js +1 -0
- package/src/TooltipDefinition/TooltipDefinition.svelte +5 -6
- package/src/TooltipIcon/TooltipIcon.svelte +5 -5
- package/src/TreeView/TreeView.svelte +16 -8
- package/src/TreeView/TreeView.svelte.d.ts +1 -0
- package/src/TreeView/TreeViewNode.svelte +31 -12
- package/src/TreeView/TreeViewNodeList.svelte +26 -16
- package/src/Truncate/Truncate.svelte +21 -3
- package/src/Truncate/Truncate.svelte.d.ts +7 -0
- package/src/Truncate/truncate.d.ts +4 -2
- package/src/Truncate/truncate.js +21 -10
- package/src/UIShell/HeaderAction.svelte +13 -9
- package/src/UIShell/HeaderAction.svelte.d.ts +6 -2
- package/src/UIShell/HeaderGlobalAction.svelte +12 -3
- package/src/UIShell/HeaderGlobalAction.svelte.d.ts +3 -1
- package/src/UIShell/HeaderNavItem.svelte +2 -2
- package/src/UIShell/HeaderNavMenu.svelte +34 -22
- package/src/UIShell/HeaderNavMenu.svelte.d.ts +4 -1
- package/src/UIShell/HeaderSearch.svelte +19 -8
- package/src/UIShell/HeaderSearch.svelte.d.ts +8 -2
- package/src/UIShell/HeaderSideNavItems.svelte +15 -0
- package/src/UIShell/HeaderSideNavItems.svelte.d.ts +25 -0
- package/src/UIShell/index.js +1 -0
- package/src/index.d.ts +21 -0
- package/src/index.js +21 -0
- package/src/utils/copyFeedback.d.ts +1 -1
- package/src/utils/copyFeedback.js +13 -7
- package/src/utils/dismiss.d.ts +21 -0
- package/src/utils/dismiss.js +164 -0
- package/src/utils/floatingPosition.d.ts +50 -0
- package/src/utils/floatingPosition.js +197 -0
- package/src/utils/getScrollableAncestors.d.ts +7 -0
- package/src/utils/getScrollableAncestors.js +28 -0
- package/src/utils/outsideDismiss.d.ts +6 -0
- package/src/utils/outsideDismiss.js +28 -0
- package/src/utils/overflowTitle.d.ts +15 -0
- package/src/utils/overflowTitle.js +35 -0
- package/src/utils/rafThrottle.d.ts +10 -0
- package/src/utils/rafThrottle.js +38 -0
- package/src/utils/rovingFocus.d.ts +35 -0
- package/src/utils/rovingFocus.js +129 -0
- package/src/utils/typeahead.d.ts +13 -0
- package/src/utils/typeahead.js +37 -0
- package/src/utils/virtualize.d.ts +17 -0
- package/src/utils/virtualize.js +63 -18
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ Carbon Components Svelte is a [Svelte](https://github.com/sveltejs/svelte) compo
|
|
|
10
10
|
|
|
11
11
|
Design systems facilitate design and development through reuse, consistency, and extensibility.
|
|
12
12
|
|
|
13
|
-
The Carbon Svelte
|
|
13
|
+
The Carbon Svelte ecosystem also includes:
|
|
14
14
|
|
|
15
15
|
- **[Carbon Icons Svelte](https://github.com/carbon-design-system/carbon-icons-svelte)**: 2,600+ Carbon icons as Svelte components
|
|
16
16
|
- **[Carbon Pictograms Svelte](https://github.com/carbon-design-system/carbon-pictograms-svelte)**: 1,500+ Carbon pictograms as Svelte components
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
@import "carbon-components/scss/globals/scss/vars";
|
|
2
|
+
@import "carbon-components/scss/globals/scss/vendor/@carbon/elements/scss/import-once/import-once";
|
|
3
|
+
@import "carbon-components/scss/globals/scss/typography";
|
|
4
|
+
|
|
5
|
+
/// Badge indicator (Carbon React BadgeIndicator; absent from v10).
|
|
6
|
+
/// An empty dot or a numbered count overlaid on a positioned ancestor.
|
|
7
|
+
/// @access private
|
|
8
|
+
/// @group components
|
|
9
|
+
@mixin badge-indicator {
|
|
10
|
+
.#{$prefix}--badge-indicator {
|
|
11
|
+
@include type-style("helper-text-01");
|
|
12
|
+
|
|
13
|
+
position: absolute;
|
|
14
|
+
display: flex;
|
|
15
|
+
padding: 0 $carbon--spacing-02 $carbon--spacing-01;
|
|
16
|
+
border-radius: 100px;
|
|
17
|
+
background: $support-error;
|
|
18
|
+
color: $text-on-color;
|
|
19
|
+
|
|
20
|
+
inset-block-start: 0;
|
|
21
|
+
inset-inline-end: 0;
|
|
22
|
+
|
|
23
|
+
margin-block-start: $carbon--spacing-03;
|
|
24
|
+
margin-inline-end: $carbon--spacing-03;
|
|
25
|
+
|
|
26
|
+
max-block-size: $carbon--spacing-05;
|
|
27
|
+
min-block-size: $carbon--spacing-03;
|
|
28
|
+
min-inline-size: $carbon--spacing-03;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.#{$prefix}--badge-indicator--count {
|
|
32
|
+
margin-block-start: $carbon--spacing-02;
|
|
33
|
+
margin-inline-end: $carbon--spacing-02;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.#{$prefix}--btn__badge-wrapper {
|
|
37
|
+
position: relative;
|
|
38
|
+
display: inline-flex;
|
|
39
|
+
|
|
40
|
+
.#{$prefix}--badge-indicator {
|
|
41
|
+
pointer-events: none;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@include exports("badge-indicator") {
|
|
47
|
+
@include badge-indicator;
|
|
48
|
+
}
|
package/css/_box.scss
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
@import "carbon-components/scss/globals/scss/vars";
|
|
2
|
+
@import "carbon-components/scss/globals/scss/vendor/@carbon/elements/scss/import-once/import-once";
|
|
3
|
+
@import "./spacing-scale";
|
|
4
|
+
|
|
5
|
+
/// Box utility classes for fill, inset, and border tokens.
|
|
6
|
+
/// @access private
|
|
7
|
+
/// @group components
|
|
8
|
+
@mixin box {
|
|
9
|
+
// Token names follow Carbon v11; values resolve through v10 theme variables.
|
|
10
|
+
$fill-tokens: (
|
|
11
|
+
background: $background,
|
|
12
|
+
layer-01: $ui-01,
|
|
13
|
+
layer-02: $ui-02,
|
|
14
|
+
layer-03: $ui-03,
|
|
15
|
+
field: $field-01,
|
|
16
|
+
inverse: $background-inverse,
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
@each $name, $value in $fill-tokens {
|
|
20
|
+
.#{$prefix}--box-fill-#{$name} {
|
|
21
|
+
background-color: $value;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
$border-tokens: (
|
|
26
|
+
subtle: $border-subtle,
|
|
27
|
+
strong: $border-strong,
|
|
28
|
+
interactive: $border-interactive,
|
|
29
|
+
disabled: $border-disabled,
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
@each $name, $value in $border-tokens {
|
|
33
|
+
.#{$prefix}--box-border-#{$name} {
|
|
34
|
+
border: 1px solid $value;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@each $step, $size in $ccs-spacing-scale {
|
|
39
|
+
.#{$prefix}--box-p-#{$step} {
|
|
40
|
+
padding: $size;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.#{$prefix}--box-px-#{$step} {
|
|
44
|
+
padding-inline: $size;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.#{$prefix}--box-py-#{$step} {
|
|
48
|
+
padding-block: $size;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.#{$prefix}--box-m-#{$step} {
|
|
52
|
+
margin: $size;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.#{$prefix}--box-mx-#{$step} {
|
|
56
|
+
margin-inline: $size;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.#{$prefix}--box-my-#{$step} {
|
|
60
|
+
margin-block: $size;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.#{$prefix}--box-full-width {
|
|
65
|
+
width: 100%;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@include exports("box") {
|
|
70
|
+
@include box;
|
|
71
|
+
}
|
package/css/_breadcrumb.scss
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
@import "carbon-components/scss/globals/scss/vendor/@carbon/elements/scss/import-once/import-once";
|
|
4
4
|
@import "carbon-components/scss/globals/scss/typography";
|
|
5
5
|
|
|
6
|
-
/// Small breadcrumb
|
|
6
|
+
/// Small breadcrumb (Carbon React size="sm")
|
|
7
7
|
/// @access private
|
|
8
8
|
/// @group components
|
|
9
9
|
@mixin breadcrumb-sm {
|
|
@@ -35,8 +35,10 @@
|
|
|
35
35
|
height: $carbon--spacing-05;
|
|
36
36
|
min-height: $carbon--spacing-05;
|
|
37
37
|
|
|
38
|
+
// Carbon shifts this icon down 4px inside breadcrumb items. At 1rem trigger
|
|
39
|
+
// size the icon is already centered, so reset `transform`.
|
|
38
40
|
.#{$prefix}--overflow-menu__icon {
|
|
39
|
-
transform:
|
|
41
|
+
transform: none;
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
44
|
}
|
|
@@ -44,3 +46,18 @@
|
|
|
44
46
|
@include exports('breadcrumb-sm') {
|
|
45
47
|
@include breadcrumb-sm;
|
|
46
48
|
}
|
|
49
|
+
|
|
50
|
+
/// Carbon's `--sm`/`--xl` caret sets `width: 40px` on `::after`. Same
|
|
51
|
+
/// specificity as the breadcrumb rule, but Carbon loads first. Force `width: 0`
|
|
52
|
+
/// here so the caret stays a triangle.
|
|
53
|
+
/// @access private
|
|
54
|
+
/// @group components
|
|
55
|
+
@mixin breadcrumb-menu-caret {
|
|
56
|
+
.#{$prefix}--breadcrumb-menu-options.#{$prefix}--overflow-menu-options[data-floating-menu-direction='bottom']::after {
|
|
57
|
+
width: 0;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@include exports('breadcrumb-menu-caret') {
|
|
62
|
+
@include breadcrumb-menu-caret;
|
|
63
|
+
}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
// This file backports readonly checkbox styles from carbon-components v11+
|
|
2
|
-
// to ensure compatibility with carbon-components v10.58.12.
|
|
3
|
-
// The readonly checkbox feature was added to Carbon Design System in Nov 2022.
|
|
4
|
-
|
|
5
1
|
@import "carbon-components/scss/globals/scss/vars";
|
|
6
2
|
@import "carbon-components/scss/globals/scss/helper-mixins";
|
|
7
3
|
@import "carbon-components/scss/globals/scss/vendor/@carbon/elements/scss/import-once/import-once";
|
|
@@ -10,9 +6,6 @@
|
|
|
10
6
|
/// @access private
|
|
11
7
|
/// @group checkbox
|
|
12
8
|
@mixin checkbox-readonly {
|
|
13
|
-
//----------------------------------------------
|
|
14
|
-
// Read-only
|
|
15
|
-
// ---------------------------------------------
|
|
16
9
|
.#{$prefix}--checkbox-wrapper--readonly .#{$prefix}--checkbox-label {
|
|
17
10
|
cursor: default;
|
|
18
11
|
}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
// This file backports readonly combo-box styles from carbon-components v11+
|
|
2
|
-
// to ensure compatibility with carbon-components v10.58.12.
|
|
3
|
-
|
|
4
1
|
@import "carbon-components/scss/globals/scss/vars";
|
|
5
2
|
@import "carbon-components/scss/globals/scss/helper-mixins";
|
|
6
3
|
@import "carbon-components/scss/globals/scss/vendor/@carbon/elements/scss/import-once/import-once";
|
|
@@ -9,9 +6,6 @@
|
|
|
9
6
|
/// @access private
|
|
10
7
|
/// @group combobox
|
|
11
8
|
@mixin combobox-readonly {
|
|
12
|
-
//----------------------------------------------
|
|
13
|
-
// Read-only
|
|
14
|
-
// ---------------------------------------------
|
|
15
9
|
.#{$prefix}--list-box.#{$prefix}--combo-box--readonly,
|
|
16
10
|
.#{$prefix}--list-box.#{$prefix}--combo-box--readonly:hover {
|
|
17
11
|
background-color: transparent;
|
package/css/_contained-list.scss
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
// This file adds contained list styles from carbon-components v11+
|
|
2
|
-
// to ensure compatibility with carbon-components v10.58.12.
|
|
3
|
-
// The ContainedList component provides a structured list with header and items.
|
|
4
|
-
|
|
5
1
|
@import "carbon-components/scss/globals/scss/vars";
|
|
6
2
|
@import "carbon-components/scss/globals/scss/helper-mixins";
|
|
7
3
|
@import "carbon-components/scss/globals/scss/vendor/@carbon/elements/scss/import-once/import-once";
|
|
@@ -10,19 +6,15 @@
|
|
|
10
6
|
/// @access private
|
|
11
7
|
/// @group contained-list
|
|
12
8
|
@mixin contained-list {
|
|
13
|
-
// Tag within contained list
|
|
14
9
|
.#{$prefix}--contained-list .#{$prefix}--tag {
|
|
15
|
-
// Tag size adjustments for contained list context
|
|
16
10
|
height: 1.5rem; // 24px equivalent to md size
|
|
17
11
|
}
|
|
18
12
|
|
|
19
|
-
// List container
|
|
20
13
|
.#{$prefix}--contained-list > ul {
|
|
21
14
|
padding: 0;
|
|
22
15
|
margin: 0;
|
|
23
16
|
}
|
|
24
17
|
|
|
25
|
-
// Header
|
|
26
18
|
.#{$prefix}--contained-list__header {
|
|
27
19
|
position: sticky;
|
|
28
20
|
z-index: 1;
|
|
@@ -37,7 +29,6 @@
|
|
|
37
29
|
width: 100%;
|
|
38
30
|
}
|
|
39
31
|
|
|
40
|
-
// Search within contained list
|
|
41
32
|
.#{$prefix}--contained-list .#{$prefix}--search {
|
|
42
33
|
position: sticky;
|
|
43
34
|
z-index: 1;
|
|
@@ -47,12 +38,10 @@
|
|
|
47
38
|
}
|
|
48
39
|
}
|
|
49
40
|
|
|
50
|
-
// Search top offset for disclosed variant (fixed height)
|
|
51
41
|
.#{$prefix}--contained-list--disclosed .#{$prefix}--search {
|
|
52
42
|
top: 2rem; // Fixed header height for disclosed variant
|
|
53
43
|
}
|
|
54
44
|
|
|
55
|
-
// Search top offset for on-page variant (size-dependent)
|
|
56
45
|
.#{$prefix}--contained-list--on-page .#{$prefix}--search {
|
|
57
46
|
top: 3rem; // Default md size header height
|
|
58
47
|
}
|
|
@@ -72,7 +61,6 @@
|
|
|
72
61
|
top: 4.5rem; // xl size header height
|
|
73
62
|
}
|
|
74
63
|
|
|
75
|
-
// Omit search input background when used inside contained list
|
|
76
64
|
.#{$prefix}--contained-list .#{$prefix}--search .#{$prefix}--search-input {
|
|
77
65
|
background-color: $ui-background;
|
|
78
66
|
border-bottom: 1px solid $ui-03;
|
|
@@ -109,7 +97,6 @@
|
|
|
109
97
|
outline: none;
|
|
110
98
|
}
|
|
111
99
|
|
|
112
|
-
// "On Page" variant
|
|
113
100
|
.#{$prefix}--contained-list--on-page + .#{$prefix}--contained-list--on-page {
|
|
114
101
|
margin-top: $spacing-05;
|
|
115
102
|
}
|
|
@@ -123,7 +110,6 @@
|
|
|
123
110
|
color: $text-01;
|
|
124
111
|
}
|
|
125
112
|
|
|
126
|
-
// Size variants for on-page header
|
|
127
113
|
.#{$prefix}--contained-list--on-page.#{$prefix}--contained-list--sm
|
|
128
114
|
.#{$prefix}--contained-list__header {
|
|
129
115
|
height: 2rem;
|
|
@@ -139,7 +125,7 @@
|
|
|
139
125
|
height: 4.5rem;
|
|
140
126
|
}
|
|
141
127
|
|
|
142
|
-
//
|
|
128
|
+
// Disclosed variant
|
|
143
129
|
.#{$prefix}--contained-list--disclosed .#{$prefix}--contained-list__header {
|
|
144
130
|
@include type-style('label-01');
|
|
145
131
|
|
|
@@ -148,7 +134,6 @@
|
|
|
148
134
|
color: $text-02;
|
|
149
135
|
}
|
|
150
136
|
|
|
151
|
-
// List item
|
|
152
137
|
.#{$prefix}--contained-list-item {
|
|
153
138
|
position: relative;
|
|
154
139
|
display: list-item;
|
|
@@ -176,15 +161,12 @@
|
|
|
176
161
|
.#{$prefix}--contained-list-item__content {
|
|
177
162
|
@include type-style('body-short-01');
|
|
178
163
|
|
|
179
|
-
//
|
|
180
|
-
|
|
181
|
-
// Height is 3rem (48px) for md size, so padding = (48px - 20px) / 2 = 14px
|
|
182
|
-
padding: 0.875rem $spacing-05; // 14px vertical, 16px horizontal
|
|
164
|
+
// Vertical padding centers body-short-01 in the row height
|
|
165
|
+
padding: 0.875rem $spacing-05;
|
|
183
166
|
color: $text-01;
|
|
184
167
|
min-height: 3rem; // md size default
|
|
185
168
|
}
|
|
186
169
|
|
|
187
|
-
// Size variants for list items
|
|
188
170
|
.#{$prefix}--contained-list--sm
|
|
189
171
|
.#{$prefix}--contained-list-item__content,
|
|
190
172
|
.#{$prefix}--contained-list--sm
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
@import "carbon-components/scss/globals/scss/vars";
|
|
2
|
+
@import "carbon-components/scss/globals/scss/functions";
|
|
3
|
+
@import "carbon-components/scss/globals/scss/typography";
|
|
4
|
+
@import "carbon-components/scss/globals/scss/vendor/@carbon/elements/scss/import-once/import-once";
|
|
5
|
+
|
|
6
|
+
/// Low contrast content switcher (Carbon React lowContrast).
|
|
7
|
+
/// v10 has no low-contrast tokens. Selected segment becomes an outlined card;
|
|
8
|
+
/// unselected buttons stay transparent. Light themes use a gray container;
|
|
9
|
+
/// dark themes use a transparent container with a raised selected card ($ui-02).
|
|
10
|
+
///
|
|
11
|
+
/// Single-theme builds detect light/dark from background lightness. `all.css`
|
|
12
|
+
/// uses CSS custom properties, so lightness() fails; default to light and
|
|
13
|
+
/// override via `[theme="g80"|"g90"|"g100"]`.
|
|
14
|
+
/// @access private
|
|
15
|
+
/// @group components
|
|
16
|
+
@mixin content-switcher-low-contrast {
|
|
17
|
+
$custom-props: feature-flag-enabled("enable-css-custom-properties");
|
|
18
|
+
$is-light-theme: true;
|
|
19
|
+
@if not $custom-props {
|
|
20
|
+
$is-light-theme: lightness($ui-background) > 50%;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.#{$prefix}--content-switcher--low-contrast {
|
|
24
|
+
background-color: if($is-light-theme, $ui-03, transparent);
|
|
25
|
+
|
|
26
|
+
.#{$prefix}--content-switcher-btn {
|
|
27
|
+
border-color: $ui-04;
|
|
28
|
+
color: $text-secondary;
|
|
29
|
+
|
|
30
|
+
&::before {
|
|
31
|
+
background-color: $border-strong;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&::after {
|
|
35
|
+
border-radius: to-rem(4px);
|
|
36
|
+
background-color: $ui-02;
|
|
37
|
+
box-shadow: inset 0 0 0 to-rem(1px) $border-inverse;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&:hover,
|
|
41
|
+
&:active {
|
|
42
|
+
background-color: $hover-selected-ui;
|
|
43
|
+
color: $text-primary;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// `background-color` must be re-asserted so a disabled switch does not
|
|
47
|
+
// keep the hover fill (the `:hover`/`:disabled` rules are equal
|
|
48
|
+
// specificity; this resets it).
|
|
49
|
+
&:disabled {
|
|
50
|
+
background-color: transparent;
|
|
51
|
+
color: $text-disabled;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Carbon's first/last disabled rules set `border-color` at equal
|
|
55
|
+
// specificity and win by source order, so re-assert the disabled border
|
|
56
|
+
// for every position. v10 `$border-disabled` is lighter than the
|
|
57
|
+
// container (invisible); `$disabled-02` matches React's v11
|
|
58
|
+
// `border-disabled` (gray 30).
|
|
59
|
+
&:disabled,
|
|
60
|
+
&:disabled:first-child,
|
|
61
|
+
&:disabled:last-child {
|
|
62
|
+
border-color: $disabled-02;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.#{$prefix}--content-switcher-btn.#{$prefix}--content-switcher--selected {
|
|
67
|
+
background-color: transparent;
|
|
68
|
+
color: $text-primary;
|
|
69
|
+
font-weight: 600;
|
|
70
|
+
|
|
71
|
+
&:focus {
|
|
72
|
+
box-shadow: none;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&:focus::after {
|
|
76
|
+
box-shadow: inset 0 0 0 to-rem(2px) $focus;
|
|
77
|
+
clip-path: none;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&:disabled {
|
|
81
|
+
border: to-rem(1px) solid $disabled-02;
|
|
82
|
+
border-radius: to-rem(4px);
|
|
83
|
+
color: $text-disabled;
|
|
84
|
+
|
|
85
|
+
&::after {
|
|
86
|
+
box-shadow: none;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// The active card carries its own outline, so suppress the dividers on both
|
|
92
|
+
// sides of it (its own and the next sibling's). The resting `&::before` rule
|
|
93
|
+
// above outranks Carbon's selected resets, so they must be re-asserted here
|
|
94
|
+
// at higher specificity.
|
|
95
|
+
.#{$prefix}--content-switcher--selected::before,
|
|
96
|
+
.#{$prefix}--content-switcher--selected
|
|
97
|
+
+ .#{$prefix}--content-switcher-btn::before {
|
|
98
|
+
background-color: transparent;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Unselected icon-only switches use $icon-secondary (Carbon React lowContrast).
|
|
102
|
+
&.#{$prefix}--content-switcher--icon-only
|
|
103
|
+
.#{$prefix}--content-switcher-btn
|
|
104
|
+
svg {
|
|
105
|
+
fill: $icon-secondary;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Selected icon-only switches use $icon-primary on the light card
|
|
109
|
+
// (overrides the $icon-secondary fill above).
|
|
110
|
+
&.#{$prefix}--content-switcher--icon-only
|
|
111
|
+
.#{$prefix}--content-switcher-btn.#{$prefix}--content-switcher--selected
|
|
112
|
+
svg {
|
|
113
|
+
fill: $icon-primary;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
@if $custom-props {
|
|
118
|
+
@each $dark-theme in ("g80", "g90", "g100") {
|
|
119
|
+
[theme="#{$dark-theme}"] .#{$prefix}--content-switcher--low-contrast {
|
|
120
|
+
background-color: transparent;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
@include exports("content-switcher-low-contrast") {
|
|
127
|
+
@include content-switcher-low-contrast;
|
|
128
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
@import "carbon-components/scss/globals/scss/vars";
|
|
2
|
+
@import "carbon-components/scss/globals/scss/helper-mixins";
|
|
3
|
+
@import "carbon-components/scss/globals/scss/vendor/@carbon/elements/scss/import-once/import-once";
|
|
4
|
+
@import "carbon-components/scss/globals/scss/typography";
|
|
5
|
+
|
|
6
|
+
/// Icon-only content switcher (Carbon React IconSwitch).
|
|
7
|
+
/// v10 has no icon-only variant. Tooltip label renders in a portal (`Switch.svelte`).
|
|
8
|
+
/// @access private
|
|
9
|
+
/// @group components
|
|
10
|
+
@mixin content-switcher-icon-only {
|
|
11
|
+
// Double class to outrank the equal-specificity base `.#{$prefix}--content-switcher`
|
|
12
|
+
// rule, since these overrides are emitted before Carbon's base styles.
|
|
13
|
+
.#{$prefix}--content-switcher.#{$prefix}--content-switcher--icon-only {
|
|
14
|
+
width: fit-content;
|
|
15
|
+
justify-content: flex-start;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.#{$prefix}--content-switcher--icon-only .#{$prefix}--content-switcher-btn {
|
|
19
|
+
width: to-rem(40px);
|
|
20
|
+
justify-content: center;
|
|
21
|
+
padding: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.#{$prefix}--content-switcher--icon-only.#{$prefix}--content-switcher--sm
|
|
25
|
+
.#{$prefix}--content-switcher-btn {
|
|
26
|
+
width: to-rem(32px);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.#{$prefix}--content-switcher--icon-only.#{$prefix}--content-switcher--xl
|
|
30
|
+
.#{$prefix}--content-switcher-btn {
|
|
31
|
+
width: to-rem(48px);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.#{$prefix}--content-switcher--icon-only .#{$prefix}--content-switcher-btn svg {
|
|
35
|
+
// The svg is a flex item, so z-index lifts it above the button's
|
|
36
|
+
// `::after` selected-state fill overlay without needing `position`.
|
|
37
|
+
z-index: 1;
|
|
38
|
+
fill: $icon-primary;
|
|
39
|
+
transition: fill $duration--fast-01 motion(standard, productive);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// xl: 20px icon (Carbon React lg); sm/default stay 16px.
|
|
43
|
+
.#{$prefix}--content-switcher--icon-only.#{$prefix}--content-switcher--xl
|
|
44
|
+
.#{$prefix}--content-switcher-btn
|
|
45
|
+
svg {
|
|
46
|
+
block-size: to-rem(20px);
|
|
47
|
+
inline-size: to-rem(20px);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.#{$prefix}--content-switcher--icon-only
|
|
51
|
+
.#{$prefix}--content-switcher-btn.#{$prefix}--content-switcher--selected
|
|
52
|
+
svg {
|
|
53
|
+
fill: $icon-inverse;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.#{$prefix}--content-switcher--icon-only
|
|
57
|
+
.#{$prefix}--content-switcher-btn:disabled
|
|
58
|
+
svg {
|
|
59
|
+
fill: $icon-disabled;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@include exports('content-switcher-icon-only') {
|
|
64
|
+
@include content-switcher-icon-only;
|
|
65
|
+
}
|
|
@@ -10,6 +10,15 @@
|
|
|
10
10
|
.#{$prefix}--copy-btn.#{$prefix}--copy-btn--portal-active.#{$prefix}--copy-btn--animating::before,
|
|
11
11
|
.#{$prefix}--copy-btn.#{$prefix}--copy-btn--portal-active .#{$prefix}--copy-btn__feedback,
|
|
12
12
|
.#{$prefix}--copy-btn.#{$prefix}--copy-btn--portal-active.#{$prefix}--copy-btn--animating
|
|
13
|
+
.#{$prefix}--copy-btn__feedback,
|
|
14
|
+
// The inline code snippet variant renders its own button without the
|
|
15
|
+
// `bx--copy-btn` class, so the rules above do not reach it. Carbon's
|
|
16
|
+
// `.bx--snippet--inline.bx--copy-btn--animating::before` still shows the
|
|
17
|
+
// native caret beside the portalled tooltip.
|
|
18
|
+
.#{$prefix}--snippet--inline.#{$prefix}--copy-btn--portal-active.#{$prefix}--copy-btn--animating::before,
|
|
19
|
+
.#{$prefix}--snippet--inline.#{$prefix}--copy-btn--portal-active
|
|
20
|
+
.#{$prefix}--copy-btn__feedback,
|
|
21
|
+
.#{$prefix}--snippet--inline.#{$prefix}--copy-btn--portal-active.#{$prefix}--copy-btn--animating
|
|
13
22
|
.#{$prefix}--copy-btn__feedback {
|
|
14
23
|
display: none;
|
|
15
24
|
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
@import "carbon-components/scss/globals/scss/vars";
|
|
2
|
+
@import "carbon-components/scss/globals/scss/helper-mixins";
|
|
3
|
+
@import "carbon-components/scss/globals/scss/vendor/@carbon/elements/scss/import-once/import-once";
|
|
4
|
+
|
|
5
|
+
@mixin copy-input {
|
|
6
|
+
// Reserve room so the value never sits under the copy button.
|
|
7
|
+
.#{$prefix}--copy-input__field-wrapper .#{$prefix}--text-input {
|
|
8
|
+
padding-right: 2.5rem;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
text-overflow: ellipsis;
|
|
11
|
+
white-space: nowrap;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.#{$prefix}--copy-input__field-wrapper .#{$prefix}--text-input--sm {
|
|
15
|
+
padding-right: 2rem;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.#{$prefix}--copy-input__field-wrapper .#{$prefix}--text-input--xl {
|
|
19
|
+
padding-right: 3rem;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Fluid form shorthand padding must not collapse right padding below button width.
|
|
23
|
+
.#{$prefix}--form--fluid,
|
|
24
|
+
.#{$prefix}--text-input--fluid {
|
|
25
|
+
.#{$prefix}--copy-input__field-wrapper .#{$prefix}--text-input {
|
|
26
|
+
padding-right: $carbon--spacing-08;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.#{$prefix}--copy-input__field-wrapper .#{$prefix}--text-input--sm {
|
|
30
|
+
padding-right: $carbon--spacing-07;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.#{$prefix}--copy-input__field-wrapper .#{$prefix}--text-input--xl {
|
|
34
|
+
padding-right: $carbon--spacing-09;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Transparent overlay pinned to the right edge of the field.
|
|
39
|
+
.#{$prefix}--copy-input__field-wrapper .#{$prefix}--copy-btn {
|
|
40
|
+
@include focus-outline("reset");
|
|
41
|
+
|
|
42
|
+
position: absolute;
|
|
43
|
+
right: 0;
|
|
44
|
+
display: flex;
|
|
45
|
+
width: to-rem(40px);
|
|
46
|
+
height: 100%;
|
|
47
|
+
min-height: auto;
|
|
48
|
+
align-items: center;
|
|
49
|
+
justify-content: center;
|
|
50
|
+
margin: 0;
|
|
51
|
+
padding: 0;
|
|
52
|
+
border: 0;
|
|
53
|
+
background: none;
|
|
54
|
+
cursor: pointer;
|
|
55
|
+
transition: outline $duration--fast-01 motion(standard, productive);
|
|
56
|
+
|
|
57
|
+
&:hover,
|
|
58
|
+
&:active {
|
|
59
|
+
background: none;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Show the button's own focus ring when it (not the input) is focused.
|
|
63
|
+
&:focus {
|
|
64
|
+
@include focus-outline("outline");
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.#{$prefix}--snippet__icon {
|
|
68
|
+
fill: $icon-secondary;
|
|
69
|
+
transition: fill $duration--fast-01 motion(standard, productive);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&:hover .#{$prefix}--snippet__icon,
|
|
73
|
+
&:focus .#{$prefix}--snippet__icon {
|
|
74
|
+
fill: $icon-primary;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&:disabled {
|
|
78
|
+
cursor: not-allowed;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&:disabled .#{$prefix}--snippet__icon {
|
|
82
|
+
fill: $icon-disabled;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Match the copy button width to the input height for each size.
|
|
87
|
+
.#{$prefix}--copy-input__field-wrapper
|
|
88
|
+
.#{$prefix}--text-input--sm
|
|
89
|
+
~ .#{$prefix}--copy-btn {
|
|
90
|
+
width: to-rem(32px);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.#{$prefix}--copy-input__field-wrapper
|
|
94
|
+
.#{$prefix}--text-input--xl
|
|
95
|
+
~ .#{$prefix}--copy-btn {
|
|
96
|
+
width: to-rem(48px);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// Fluid copy button matches the password visibility toggle in
|
|
100
|
+
// `_fluid-text-input.scss` (32×32px on the value row).
|
|
101
|
+
.#{$prefix}--form--fluid,
|
|
102
|
+
.#{$prefix}--text-input--fluid {
|
|
103
|
+
.#{$prefix}--copy-input__field-wrapper .#{$prefix}--copy-btn {
|
|
104
|
+
block-size: to-rem(32px);
|
|
105
|
+
inline-size: to-rem(32px);
|
|
106
|
+
width: to-rem(32px);
|
|
107
|
+
height: to-rem(32px);
|
|
108
|
+
min-height: to-rem(32px);
|
|
109
|
+
inset-block-start: to-rem(26px);
|
|
110
|
+
inset-inline-end: $spacing-03;
|
|
111
|
+
right: auto;
|
|
112
|
+
align-items: center;
|
|
113
|
+
padding: 0;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@include exports("copy-input") {
|
|
119
|
+
@include copy-input;
|
|
120
|
+
}
|