@skewedaspect/sleekspace-ui 0.7.1 → 0.8.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/dist/sleekspace-ui.css +984 -291
- package/dist/sleekspace-ui.es.js +31559 -29868
- package/dist/sleekspace-ui.umd.js +32210 -30438
- package/dist/{components → src/components}/Accordion/SkAccordion.vue.d.ts +1 -1
- package/dist/{components → src/components}/Accordion/types.d.ts +1 -1
- package/dist/{components → src/components}/Alert/SkAlert.vue.d.ts +1 -1
- package/dist/{components → src/components}/Alert/types.d.ts +1 -1
- package/dist/{components → src/components}/Avatar/SkAvatar.vue.d.ts +1 -1
- package/dist/{components → src/components}/Avatar/types.d.ts +1 -1
- package/dist/{components → src/components}/Breadcrumbs/SkBreadcrumbs.vue.d.ts +2 -2
- package/dist/{components → src/components}/Breadcrumbs/types.d.ts +1 -1
- package/dist/{components → src/components}/Button/SkButton.vue.d.ts +9 -1
- package/dist/{components → src/components}/Button/types.d.ts +1 -1
- package/dist/{components → src/components}/Card/SkCard.vue.d.ts +1 -1
- package/dist/src/components/Card/types.d.ts +2 -0
- package/dist/{components → src/components}/Checkbox/SkCheckbox.vue.d.ts +1 -1
- package/dist/{components → src/components}/Checkbox/types.d.ts +1 -1
- package/dist/{components → src/components}/Collapsible/SkCollapsible.vue.d.ts +1 -1
- package/dist/src/components/Collapsible/types.d.ts +2 -0
- package/dist/{components → src/components}/ColorPicker/SkColorPicker.vue.d.ts +1 -1
- package/dist/{components → src/components}/ColorPicker/types.d.ts +1 -1
- package/dist/{components → src/components}/ContextMenu/SkContextMenu.vue.d.ts +1 -1
- package/dist/src/components/ContextMenu/types.d.ts +2 -0
- package/dist/{components → src/components}/Divider/SkDivider.vue.d.ts +1 -1
- package/dist/{components → src/components}/Dropdown/SkDropdown.vue.d.ts +1 -1
- package/dist/{components → src/components}/Dropdown/types.d.ts +1 -1
- package/dist/{components → src/components}/Input/SkInput.vue.d.ts +1 -1
- package/dist/{components → src/components}/Input/types.d.ts +1 -1
- package/dist/{components → src/components}/Listbox/SkListbox.vue.d.ts +1 -1
- package/dist/{components → src/components}/Listbox/types.d.ts +1 -1
- package/dist/{components → src/components}/Modal/SkModal.vue.d.ts +1 -1
- package/dist/{components → src/components}/Modal/types.d.ts +1 -1
- package/dist/{components → src/components}/NavBar/SkNavBar.vue.d.ts +2 -1
- package/dist/src/components/NavBar/context.d.ts +3 -0
- package/dist/{components → src/components}/NavBar/types.d.ts +1 -1
- package/dist/{components → src/components}/NumberInput/SkNumberInput.vue.d.ts +1 -1
- package/dist/{components → src/components}/NumberInput/types.d.ts +1 -1
- package/dist/src/components/Page/SkPage.vue.d.ts +161 -0
- package/dist/src/components/Page/SkPageSidebarToggle.vue.d.ts +41 -0
- package/dist/src/components/Page/index.d.ts +3 -0
- package/dist/src/components/Page/types.d.ts +39 -0
- package/dist/{components → src/components}/Pagination/SkPagination.vue.d.ts +3 -3
- package/dist/{components → src/components}/Pagination/types.d.ts +1 -1
- package/dist/{components → src/components}/Panel/SkPanel.vue.d.ts +1 -1
- package/dist/{components → src/components}/Panel/types.d.ts +1 -1
- package/dist/{components → src/components}/Popover/SkPopover.vue.d.ts +1 -1
- package/dist/{components → src/components}/Progress/SkProgress.vue.d.ts +1 -1
- package/dist/{components → src/components}/Progress/types.d.ts +1 -1
- package/dist/{components → src/components}/Radio/SkRadio.vue.d.ts +1 -1
- package/dist/{components → src/components}/Radio/types.d.ts +1 -1
- package/dist/{components → src/components}/ScrollArea/SkScrollArea.vue.d.ts +9 -0
- package/dist/{components → src/components}/ScrollArea/types.d.ts +1 -1
- package/dist/{components → src/components}/Select/SkSelect.vue.d.ts +1 -1
- package/dist/{components → src/components}/Select/SkSelectItem.vue.d.ts +6 -18
- package/dist/{components → src/components}/Select/types.d.ts +1 -1
- package/dist/{components → src/components}/Sidebar/SkSidebar.vue.d.ts +10 -2
- package/dist/{components → src/components}/Sidebar/types.d.ts +1 -1
- package/dist/{components → src/components}/Slider/SkSlider.vue.d.ts +1 -1
- package/dist/{components → src/components}/Slider/types.d.ts +1 -1
- package/dist/{components → src/components}/Spinner/SkSpinner.vue.d.ts +1 -1
- package/dist/{components → src/components}/Spinner/types.d.ts +1 -1
- package/dist/{components → src/components}/Splitter/types.d.ts +1 -1
- package/dist/{components → src/components}/Switch/SkSwitch.vue.d.ts +1 -1
- package/dist/{components → src/components}/Switch/types.d.ts +1 -1
- package/dist/{components → src/components}/Table/SkTable.vue.d.ts +1 -1
- package/dist/{components → src/components}/Table/types.d.ts +1 -1
- package/dist/{components → src/components}/Tabs/SkTab.vue.d.ts +1 -1
- package/dist/{components → src/components}/Tabs/SkTabs.vue.d.ts +2 -2
- package/dist/{components → src/components}/Tag/SkTag.vue.d.ts +1 -1
- package/dist/{components → src/components}/TagsInput/SkTagsInput.vue.d.ts +1 -1
- package/dist/{components → src/components}/TagsInput/types.d.ts +1 -1
- package/dist/{components → src/components}/Textarea/SkTextarea.vue.d.ts +1 -1
- package/dist/{components → src/components}/Textarea/types.d.ts +1 -1
- package/dist/{components → src/components}/Toolbar/types.d.ts +1 -1
- package/dist/{components → src/components}/Tooltip/SkTooltip.vue.d.ts +1 -1
- package/dist/{components → src/components}/Tooltip/types.d.ts +1 -1
- package/dist/{components → src/components}/TreeView/SkTreeView.vue.d.ts +5 -5
- package/dist/{components → src/components}/TreeView/types.d.ts +1 -1
- package/dist/src/composables/useFocusTrap.d.ts +17 -0
- package/dist/src/composables/usePageDrawer.d.ts +35 -0
- package/dist/src/composables/usePortalContext.test.d.ts +1 -0
- package/dist/{index.d.ts → src/index.d.ts} +2 -0
- package/dist/src/styles/mixins/fluidSize.test.d.ts +1 -0
- package/dist/tokens.css +60 -0
- package/llms-full.txt +6349 -0
- package/llms.txt +46 -0
- package/package.json +16 -11
- package/src/components/Button/SkButton.vue +25 -13
- package/src/components/NavBar/SkNavBar.vue +12 -1
- package/src/components/NavBar/context.ts +16 -0
- package/src/components/Page/SkPage.vue +460 -72
- package/src/components/Page/SkPageSidebarToggle.vue +148 -0
- package/src/components/Page/index.ts +1 -0
- package/src/components/Page/types.ts +30 -5
- package/src/components/ScrollArea/SkScrollArea.vue +12 -0
- package/src/components/Select/SkSelectItem.vue +2 -2
- package/src/components/Sidebar/SkSidebar.vue +10 -0
- package/src/components/TreeView/SkTreeView.vue +6 -6
- package/src/composables/useFocusTrap.test.ts +184 -0
- package/src/composables/useFocusTrap.ts +141 -0
- package/src/composables/usePageDrawer.ts +96 -0
- package/src/global.d.ts +1 -0
- package/src/index.ts +5 -0
- package/src/styles/components/_accordion.scss +15 -0
- package/src/styles/components/_alert.scss +1 -0
- package/src/styles/components/_avatar.scss +1 -0
- package/src/styles/components/_breadcrumbs.scss +7 -0
- package/src/styles/components/_button.scss +291 -214
- package/src/styles/components/_checkbox.scss +9 -1
- package/src/styles/components/_collapsible.scss +15 -0
- package/src/styles/components/_color-picker.scss +4 -1
- package/src/styles/components/_input.scss +1 -0
- package/src/styles/components/_listbox.scss +8 -2
- package/src/styles/components/_menu.scss +9 -2
- package/src/styles/components/_modal.scss +18 -2
- package/src/styles/components/_navbar.scss +22 -6
- package/src/styles/components/_number-input.scss +1 -0
- package/src/styles/components/_page.scss +220 -12
- package/src/styles/components/_pagination.scss +10 -1
- package/src/styles/components/_panel.scss +8 -3
- package/src/styles/components/_popover.scss +15 -2
- package/src/styles/components/_progress.scss +14 -0
- package/src/styles/components/_radio.scss +8 -1
- package/src/styles/components/_scroll-area.scss +56 -0
- package/src/styles/components/_select.scss +3 -1
- package/src/styles/components/_sidebar.scss +78 -38
- package/src/styles/components/_skeleton.scss +18 -0
- package/src/styles/components/_slider.scss +1 -0
- package/src/styles/components/_spinner.scss +15 -0
- package/src/styles/components/_switch.scss +5 -0
- package/src/styles/components/_table.scss +1 -0
- package/src/styles/components/_tabs.scss +6 -0
- package/src/styles/components/_tag.scss +2 -0
- package/src/styles/components/_tags-input.scss +1 -0
- package/src/styles/components/_textarea.scss +1 -0
- package/src/styles/components/_toast.scss +16 -1
- package/src/styles/components/_toolbar.scss +2 -0
- package/src/styles/components/_tooltip.scss +14 -1
- package/src/styles/components/_tree-view.scss +6 -1
- package/src/styles/mixins/_index.scss +1 -0
- package/src/styles/mixins/_responsive.scss +184 -0
- package/src/styles/mixins/fluidSize.test.ts +149 -0
- package/src/styles/tokens/_foundation-breakpoints.scss +26 -0
- package/src/styles/tokens/_foundation-z-index.scss +38 -0
- package/src/styles/tokens/index.scss +2 -0
- package/web-types.json +194 -14
- package/dist/components/Card/types.d.ts +0 -2
- package/dist/components/Collapsible/types.d.ts +0 -2
- package/dist/components/ContextMenu/types.d.ts +0 -2
- package/dist/components/Page/SkPage.vue.d.ts +0 -64
- package/dist/components/Page/index.d.ts +0 -2
- package/dist/components/Page/types.d.ts +0 -16
- package/dist/{components → src/components}/Accordion/SkAccordionItem.vue.d.ts +0 -0
- package/dist/{components → src/components}/Accordion/index.d.ts +0 -0
- package/dist/{components → src/components}/Avatar/index.d.ts +0 -0
- package/dist/{components → src/components}/Breadcrumbs/SkBreadcrumbItem.vue.d.ts +0 -0
- package/dist/{components → src/components}/Breadcrumbs/SkBreadcrumbSeparator.vue.d.ts +0 -0
- package/dist/{components → src/components}/Breadcrumbs/index.d.ts +0 -0
- package/dist/{components → src/components}/Checkbox/index.d.ts +0 -0
- package/dist/{components → src/components}/Collapsible/index.d.ts +0 -0
- package/dist/{components → src/components}/ColorPicker/index.d.ts +0 -0
- package/dist/{components → src/components}/ContextMenu/SkContextMenuCheckboxItem.vue.d.ts +0 -0
- package/dist/{components → src/components}/ContextMenu/SkContextMenuItem.vue.d.ts +0 -0
- package/dist/{components → src/components}/ContextMenu/SkContextMenuLabel.vue.d.ts +0 -0
- package/dist/{components → src/components}/ContextMenu/SkContextMenuRadioGroup.vue.d.ts +0 -0
- package/dist/{components → src/components}/ContextMenu/SkContextMenuRadioItem.vue.d.ts +0 -0
- package/dist/{components → src/components}/ContextMenu/SkContextMenuSeparator.vue.d.ts +0 -0
- package/dist/{components → src/components}/ContextMenu/SkContextMenuSubmenu.vue.d.ts +0 -0
- package/dist/{components → src/components}/ContextMenu/index.d.ts +0 -0
- package/dist/{components → src/components}/Divider/types.d.ts +0 -0
- package/dist/{components → src/components}/Dropdown/SkDropdownCheckboxItem.vue.d.ts +0 -0
- package/dist/{components → src/components}/Dropdown/SkDropdownMenuItem.vue.d.ts +0 -0
- package/dist/{components → src/components}/Dropdown/SkDropdownMenuLabel.vue.d.ts +0 -0
- package/dist/{components → src/components}/Dropdown/SkDropdownMenuSeparator.vue.d.ts +0 -0
- package/dist/{components → src/components}/Dropdown/SkDropdownRadioGroup.vue.d.ts +0 -0
- package/dist/{components → src/components}/Dropdown/SkDropdownRadioItem.vue.d.ts +0 -0
- package/dist/{components → src/components}/Dropdown/SkDropdownSubmenu.vue.d.ts +0 -0
- package/dist/{components → src/components}/Dropdown/index.d.ts +0 -0
- package/dist/{components → src/components}/Field/SkField.vue.d.ts +0 -0
- package/dist/{components → src/components}/Field/index.d.ts +0 -0
- package/dist/{components → src/components}/Field/types.d.ts +0 -0
- package/dist/{components → src/components}/Group/SkGroup.vue.d.ts +0 -0
- package/dist/{components → src/components}/Group/types.d.ts +0 -0
- package/dist/{components → src/components}/Input/index.d.ts +0 -0
- package/dist/{components → src/components}/Listbox/SkListboxItem.vue.d.ts +0 -0
- package/dist/{components → src/components}/Listbox/SkListboxSeparator.vue.d.ts +0 -0
- package/dist/{components → src/components}/Listbox/index.d.ts +0 -0
- package/dist/{components → src/components}/Modal/index.d.ts +0 -0
- package/dist/{components → src/components}/NavBar/index.d.ts +0 -0
- package/dist/{components → src/components}/NumberInput/index.d.ts +0 -0
- package/dist/{components → src/components}/Pagination/SkPaginationItem.vue.d.ts +0 -0
- package/dist/{components → src/components}/Pagination/index.d.ts +0 -0
- package/dist/{components → src/components}/Popover/index.d.ts +0 -0
- package/dist/{components → src/components}/Popover/types.d.ts +0 -0
- package/dist/{components → src/components}/Progress/index.d.ts +0 -0
- package/dist/{components → src/components}/Radio/SkRadioGroup.vue.d.ts +0 -0
- package/dist/{components → src/components}/Radio/index.d.ts +0 -0
- package/dist/{components → src/components}/ScrollArea/index.d.ts +0 -0
- package/dist/{components → src/components}/Select/SkSelectSeparator.vue.d.ts +0 -0
- package/dist/{components → src/components}/Select/index.d.ts +0 -0
- package/dist/{components → src/components}/Sidebar/SkSidebarItem.vue.d.ts +0 -0
- package/dist/{components → src/components}/Sidebar/SkSidebarSection.vue.d.ts +0 -0
- package/dist/{components → src/components}/Skeleton/SkSkeleton.vue.d.ts +2 -2
- /package/dist/{components → src/components}/Skeleton/index.d.ts +0 -0
- /package/dist/{components → src/components}/Skeleton/types.d.ts +0 -0
- /package/dist/{components → src/components}/Slider/index.d.ts +0 -0
- /package/dist/{components → src/components}/Spinner/index.d.ts +0 -0
- /package/dist/{components → src/components}/Splitter/SkSplitter.vue.d.ts +0 -0
- /package/dist/{components → src/components}/Splitter/SkSplitterHandle.vue.d.ts +0 -0
- /package/dist/{components → src/components}/Splitter/SkSplitterPanel.vue.d.ts +0 -0
- /package/dist/{components → src/components}/Splitter/index.d.ts +0 -0
- /package/dist/{components → src/components}/Switch/index.d.ts +0 -0
- /package/dist/{components → src/components}/Table/index.d.ts +0 -0
- /package/dist/{components → src/components}/Tabs/SkTabList.vue.d.ts +0 -0
- /package/dist/{components → src/components}/Tabs/SkTabPanel.vue.d.ts +0 -0
- /package/dist/{components → src/components}/Tabs/SkTabPanels.vue.d.ts +0 -0
- /package/dist/{components → src/components}/Tabs/types.d.ts +0 -0
- /package/dist/{components → src/components}/Tag/types.d.ts +0 -0
- /package/dist/{components → src/components}/TagsInput/index.d.ts +0 -0
- /package/dist/{components → src/components}/Textarea/index.d.ts +0 -0
- /package/dist/{components → src/components}/Theme/SkTheme.vue.d.ts +0 -0
- /package/dist/{components → src/components}/Theme/types.d.ts +0 -0
- /package/dist/{components → src/components}/Theme/useTheme.d.ts +0 -0
- /package/dist/{components → src/components}/Toast/SkToast.vue.d.ts +0 -0
- /package/dist/{components → src/components}/Toast/SkToastProvider.vue.d.ts +0 -0
- /package/dist/{components → src/components}/Toast/index.d.ts +0 -0
- /package/dist/{components → src/components}/Toast/types.d.ts +0 -0
- /package/dist/{components → src/components}/Toast/useToast.d.ts +0 -0
- /package/dist/{components → src/components}/Toolbar/SkToolbar.vue.d.ts +0 -0
- /package/dist/{components → src/components}/Toolbar/SkToolbarButton.vue.d.ts +0 -0
- /package/dist/{components → src/components}/Toolbar/SkToolbarSeparator.vue.d.ts +0 -0
- /package/dist/{components → src/components}/Toolbar/SkToolbarToggleGroup.vue.d.ts +0 -0
- /package/dist/{components → src/components}/Toolbar/SkToolbarToggleItem.vue.d.ts +0 -0
- /package/dist/{components → src/components}/Toolbar/index.d.ts +0 -0
- /package/dist/{components → src/components}/Tooltip/SkTooltipProvider.vue.d.ts +0 -0
- /package/dist/{components → src/components}/Tooltip/index.d.ts +0 -0
- /package/dist/{components → src/components}/TreeView/SkTreeItem.vue.d.ts +0 -0
- /package/dist/{components → src/components}/TreeView/index.d.ts +0 -0
- /package/dist/{composables → src/composables}/useCustomColors.d.ts +0 -0
- /package/dist/{composables → src/composables}/useCustomColors.test.d.ts +0 -0
- /package/dist/{composables/usePortalContext.test.d.ts → src/composables/useFocusTrap.test.d.ts} +0 -0
- /package/dist/{composables → src/composables}/usePortalContext.d.ts +0 -0
- /package/dist/{types.d.ts → src/types.d.ts} +0 -0
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
//----------------------------------------------------------------------------------------------------------------------
|
|
2
2
|
// Button Component Styles
|
|
3
|
+
//
|
|
4
|
+
// Structure:
|
|
5
|
+
// .sk-button - Outer hit zone. Transparent layout container. Carries kind/size/variant classes
|
|
6
|
+
// and state (disabled, loading, pressed). On touch devices it grows to a 44px
|
|
7
|
+
// floor so the tap target is comfortable; the inner chrome stays at its natural
|
|
8
|
+
// size so the button visually looks the same on desktop and mobile.
|
|
9
|
+
// .sk-button-chrome - Visible button body. Background, border, cut-border, padding, height, font,
|
|
10
|
+
// box-shadow, transitions. Sized by --sk-button-current-* vars driven by the
|
|
11
|
+
// size variant on the outer .sk-button.
|
|
3
12
|
//----------------------------------------------------------------------------------------------------------------------
|
|
4
13
|
|
|
5
14
|
@use '../theme/variables' as *;
|
|
@@ -58,7 +67,7 @@
|
|
|
58
67
|
/// Line height for button text (1.5 for comfortable vertical spacing)
|
|
59
68
|
--sk-button-line-height: 1.5;
|
|
60
69
|
|
|
61
|
-
/// Gap between
|
|
70
|
+
/// Gap between content items (icon + text spacing)
|
|
62
71
|
--sk-button-gap: 0.5rem;
|
|
63
72
|
|
|
64
73
|
//------------------------------------------------------------------------------------------------------------------
|
|
@@ -155,10 +164,23 @@
|
|
|
155
164
|
|
|
156
165
|
/// Hover border color - slightly lighter than base for emphasis
|
|
157
166
|
--sk-button-border-hover: color-mix(in oklch, var(--sk-button-color-base), white 12.68%);
|
|
167
|
+
|
|
168
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
169
|
+
// Chrome sizing tokens (set by size variants, consumed by .sk-button-chrome)
|
|
170
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
171
|
+
|
|
172
|
+
--sk-button-current-height: calc(var(--sk-button-height-base) * var(--sk-button-scale-md));
|
|
173
|
+
--sk-button-current-padding-x: var(--sk-button-padding-base);
|
|
174
|
+
--sk-button-current-font-size: calc(var(--sk-button-font-size-base) * var(--sk-button-font-scale-md));
|
|
175
|
+
--sk-button-current-cut-size: calc(var(--sk-button-current-height) / var(--sk-button-radius-factor));
|
|
158
176
|
}
|
|
159
177
|
|
|
160
178
|
//----------------------------------------------------------------------------------------------------------------------
|
|
161
179
|
// Variant Mixins
|
|
180
|
+
//
|
|
181
|
+
// Each mixin sets CSS custom properties on the .sk-button for kind-specific colors, and uses a
|
|
182
|
+
// descendant selector (.sk-button-chrome) to paint the visible chrome. State transitions update
|
|
183
|
+
// vars on the button OR directly target the chrome element.
|
|
162
184
|
//----------------------------------------------------------------------------------------------------------------------
|
|
163
185
|
|
|
164
186
|
// Mixin for solid variant
|
|
@@ -176,17 +198,21 @@
|
|
|
176
198
|
// Set dynamic border color
|
|
177
199
|
--sk-button-border-color: var(--sk-button-border-base);
|
|
178
200
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
201
|
+
.sk-button-chrome
|
|
202
|
+
{
|
|
203
|
+
background-color: var(--sk-button-bg);
|
|
204
|
+
color: var(--sk-button-text);
|
|
205
|
+
}
|
|
182
206
|
|
|
183
207
|
&:hover:not(:disabled)
|
|
184
208
|
{
|
|
185
|
-
// Update border color and glow shadow
|
|
186
209
|
--sk-button-border-color: var(--sk-button-border-hover);
|
|
187
210
|
--sk-button-glow-shadow: 0 0 var(--sk-button-glow-size) oklch(from var(--sk-button-border-base) l c h / var(--sk-button-glow-opacity));
|
|
188
211
|
|
|
189
|
-
|
|
212
|
+
.sk-button-chrome
|
|
213
|
+
{
|
|
214
|
+
background-color: var(--sk-button-bg-hover);
|
|
215
|
+
}
|
|
190
216
|
}
|
|
191
217
|
|
|
192
218
|
&:active:not(:disabled)
|
|
@@ -194,8 +220,11 @@
|
|
|
194
220
|
--sk-button-border-color: var(--sk-button-border-hover);
|
|
195
221
|
--sk-button-glow-shadow: 0 0 0 transparent;
|
|
196
222
|
|
|
197
|
-
|
|
198
|
-
|
|
223
|
+
.sk-button-chrome
|
|
224
|
+
{
|
|
225
|
+
background-color: var(--sk-button-bg);
|
|
226
|
+
color: var(--sk-button-color-base);
|
|
227
|
+
}
|
|
199
228
|
}
|
|
200
229
|
|
|
201
230
|
&:focus-visible
|
|
@@ -210,24 +239,26 @@
|
|
|
210
239
|
{
|
|
211
240
|
&.sk-#{ "" + $kind }
|
|
212
241
|
{
|
|
213
|
-
// Override base color tokens for this kind
|
|
214
242
|
--sk-button-color-base: var(--sk-#{ $kind }-base);
|
|
215
243
|
--sk-button-text: var(--sk-#{ $kind }-text);
|
|
216
|
-
|
|
217
|
-
// Set generic kind color for list markers and other cross-component features
|
|
218
244
|
--sk-kind-color: var(--sk-#{ $kind }-base);
|
|
219
|
-
|
|
220
245
|
--sk-button-border-color: var(--sk-button-border-base);
|
|
221
246
|
|
|
222
|
-
|
|
223
|
-
|
|
247
|
+
.sk-button-chrome
|
|
248
|
+
{
|
|
249
|
+
background-color: var(--sk-button-outline-bg);
|
|
250
|
+
color: var(--sk-button-color-base);
|
|
251
|
+
}
|
|
224
252
|
|
|
225
253
|
&:hover:not(:disabled)
|
|
226
254
|
{
|
|
227
255
|
--sk-button-border-color: var(--sk-button-border-hover);
|
|
228
256
|
--sk-button-glow-shadow: 0 0 var(--sk-button-glow-size) oklch(from var(--sk-button-border-base) l c h / var(--sk-button-glow-opacity));
|
|
229
257
|
|
|
230
|
-
|
|
258
|
+
.sk-button-chrome
|
|
259
|
+
{
|
|
260
|
+
background-color: var(--sk-button-bg);
|
|
261
|
+
}
|
|
231
262
|
}
|
|
232
263
|
|
|
233
264
|
&:active:not(:disabled)
|
|
@@ -235,8 +266,11 @@
|
|
|
235
266
|
--sk-button-border-color: var(--sk-button-border-hover);
|
|
236
267
|
--sk-button-glow-shadow: 0 0 0 transparent;
|
|
237
268
|
|
|
238
|
-
|
|
239
|
-
|
|
269
|
+
.sk-button-chrome
|
|
270
|
+
{
|
|
271
|
+
background-color: var(--sk-button-bg-hover);
|
|
272
|
+
color: var(--sk-button-text);
|
|
273
|
+
}
|
|
240
274
|
}
|
|
241
275
|
}
|
|
242
276
|
}
|
|
@@ -246,23 +280,25 @@
|
|
|
246
280
|
{
|
|
247
281
|
&.sk-#{ "" + $kind }
|
|
248
282
|
{
|
|
249
|
-
// Override base color tokens for this kind
|
|
250
283
|
--sk-button-color-base: var(--sk-#{ $kind }-base);
|
|
251
284
|
--sk-button-text: var(--sk-#{ $kind }-text);
|
|
252
|
-
|
|
253
|
-
// Set generic kind color for list markers and other cross-component features
|
|
254
285
|
--sk-kind-color: var(--sk-#{ $kind }-base);
|
|
255
|
-
|
|
256
286
|
--sk-button-border-color: oklch(from var(--sk-button-border-base) l c h / var(--sk-button-subtle-border-opacity));
|
|
257
287
|
|
|
258
|
-
|
|
259
|
-
|
|
288
|
+
.sk-button-chrome
|
|
289
|
+
{
|
|
290
|
+
background-color: oklch(from var(--sk-button-bg) l c h / var(--sk-button-subtle-opacity));
|
|
291
|
+
color: var(--sk-button-color-base);
|
|
292
|
+
}
|
|
260
293
|
|
|
261
294
|
&:hover:not(:disabled)
|
|
262
295
|
{
|
|
263
296
|
--sk-button-glow-shadow: 0 0 var(--sk-button-glow-size) oklch(from var(--sk-button-border-base) l c h / var(--sk-button-glow-opacity));
|
|
264
297
|
|
|
265
|
-
|
|
298
|
+
.sk-button-chrome
|
|
299
|
+
{
|
|
300
|
+
background-color: var(--sk-button-bg-hover);
|
|
301
|
+
}
|
|
266
302
|
}
|
|
267
303
|
|
|
268
304
|
&:active:not(:disabled)
|
|
@@ -270,8 +306,11 @@
|
|
|
270
306
|
--sk-button-border-color: var(--sk-button-border-base);
|
|
271
307
|
--sk-button-glow-shadow: 0 0 0 transparent;
|
|
272
308
|
|
|
273
|
-
|
|
274
|
-
|
|
309
|
+
.sk-button-chrome
|
|
310
|
+
{
|
|
311
|
+
background-color: var(--sk-button-bg);
|
|
312
|
+
color: var(--sk-button-text);
|
|
313
|
+
}
|
|
275
314
|
}
|
|
276
315
|
}
|
|
277
316
|
}
|
|
@@ -281,23 +320,25 @@
|
|
|
281
320
|
{
|
|
282
321
|
&.sk-#{ "" + $kind }
|
|
283
322
|
{
|
|
284
|
-
// Override base color tokens for this kind
|
|
285
323
|
--sk-button-color-base: var(--sk-#{ $kind }-base);
|
|
286
324
|
--sk-button-text: var(--sk-#{ $kind }-text);
|
|
287
|
-
|
|
288
|
-
// Set generic kind color for list markers and other cross-component features
|
|
289
325
|
--sk-kind-color: var(--sk-#{ $kind }-base);
|
|
290
|
-
|
|
291
326
|
--sk-button-border-color: transparent;
|
|
292
327
|
|
|
293
|
-
|
|
294
|
-
|
|
328
|
+
.sk-button-chrome
|
|
329
|
+
{
|
|
330
|
+
background-color: transparent;
|
|
331
|
+
color: var(--sk-button-color-base);
|
|
332
|
+
}
|
|
295
333
|
|
|
296
334
|
&:hover:not(:disabled)
|
|
297
335
|
{
|
|
298
336
|
--sk-button-glow-shadow: 0 0 var(--sk-button-glow-size) oklch(from var(--sk-button-border-base) l c h / var(--sk-button-glow-opacity));
|
|
299
337
|
|
|
300
|
-
|
|
338
|
+
.sk-button-chrome
|
|
339
|
+
{
|
|
340
|
+
background-color: var(--sk-button-bg-hover);
|
|
341
|
+
}
|
|
301
342
|
}
|
|
302
343
|
|
|
303
344
|
&:active:not(:disabled)
|
|
@@ -305,8 +346,11 @@
|
|
|
305
346
|
--sk-button-border-color: var(--sk-button-border-hover);
|
|
306
347
|
--sk-button-glow-shadow: 0 0 0 transparent;
|
|
307
348
|
|
|
308
|
-
|
|
309
|
-
|
|
349
|
+
.sk-button-chrome
|
|
350
|
+
{
|
|
351
|
+
background-color: var(--sk-button-bg-hover);
|
|
352
|
+
color: var(--sk-button-text);
|
|
353
|
+
}
|
|
310
354
|
}
|
|
311
355
|
}
|
|
312
356
|
}
|
|
@@ -316,30 +360,29 @@
|
|
|
316
360
|
{
|
|
317
361
|
&.sk-#{ "" + $kind }
|
|
318
362
|
{
|
|
319
|
-
// Override base color tokens for this kind
|
|
320
363
|
--sk-button-color-base: var(--sk-#{ $kind }-base);
|
|
321
364
|
--sk-button-text: var(--sk-#{ $kind }-text);
|
|
322
|
-
|
|
323
|
-
// Set generic kind color for list markers and other cross-component features
|
|
324
365
|
--sk-kind-color: var(--sk-#{ $kind }-base);
|
|
325
|
-
|
|
326
366
|
--sk-button-radius-factor: 10;
|
|
327
367
|
--sk-button-border-width: 0;
|
|
328
368
|
--sk-button-border-color: transparent;
|
|
329
369
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
370
|
+
.sk-button-chrome
|
|
371
|
+
{
|
|
372
|
+
background-color: transparent;
|
|
373
|
+
color: var(--sk-button-color-base);
|
|
374
|
+
text-decoration: none;
|
|
375
|
+
border: none;
|
|
376
|
+
}
|
|
334
377
|
|
|
335
|
-
&:hover:not(:disabled)
|
|
378
|
+
&:hover:not(:disabled) .sk-button-chrome
|
|
336
379
|
{
|
|
337
380
|
color: color-mix(in oklch, var(--sk-button-color-base) 92%, white 8%);
|
|
338
381
|
text-decoration-color: var(--sk-button-text);
|
|
339
382
|
text-decoration: underline;
|
|
340
383
|
}
|
|
341
384
|
|
|
342
|
-
&:active:not(:disabled)
|
|
385
|
+
&:active:not(:disabled) .sk-button-chrome
|
|
343
386
|
{
|
|
344
387
|
color: var(--sk-button-text);
|
|
345
388
|
text-decoration-color: var(--sk-button-border-hover);
|
|
@@ -348,26 +391,28 @@
|
|
|
348
391
|
}
|
|
349
392
|
}
|
|
350
393
|
|
|
394
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
395
|
+
// Outer Hit Zone
|
|
351
396
|
//----------------------------------------------------------------------------------------------------------------------
|
|
352
397
|
|
|
353
398
|
.sk-button
|
|
354
399
|
{
|
|
355
|
-
// Base styles
|
|
356
400
|
position: relative;
|
|
357
401
|
display: inline-flex;
|
|
358
402
|
align-items: center;
|
|
359
403
|
justify-content: center;
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
404
|
+
flex-shrink: 0;
|
|
405
|
+
|
|
406
|
+
// Strip default UA styling; chrome paints the button visually.
|
|
407
|
+
background: transparent;
|
|
408
|
+
border: none;
|
|
409
|
+
padding: 0;
|
|
364
410
|
text-decoration: none; // Remove underline when rendered as anchor tag
|
|
365
|
-
|
|
366
|
-
|
|
411
|
+
appearance: none;
|
|
412
|
+
font-family: inherit;
|
|
367
413
|
cursor: pointer;
|
|
368
414
|
user-select: none;
|
|
369
415
|
touch-action: manipulation;
|
|
370
|
-
flex-shrink: 0;
|
|
371
416
|
|
|
372
417
|
// Override list marker color to match component kind
|
|
373
418
|
// Uses generic --sk-kind-color set by kind mixins
|
|
@@ -376,119 +421,67 @@
|
|
|
376
421
|
color: var(--sk-kind-color, var(--sk-button-color-base));
|
|
377
422
|
}
|
|
378
423
|
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
$corners: (top-left bottom-right)
|
|
385
|
-
);
|
|
424
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
425
|
+
// Coarse-pointer touch-target floor (44px minimum on touch devices).
|
|
426
|
+
// Chrome stays at its natural size; the button itself grows so the tap target is comfortable.
|
|
427
|
+
// The `dense` prop opts out for tight toolbars and data tables where the consumer accepts the tradeoff.
|
|
428
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
386
429
|
|
|
387
|
-
|
|
388
|
-
// Fallback browsers clip the shadow due to clip-path limitations
|
|
389
|
-
@supports (corner-shape: bevel)
|
|
430
|
+
&:not(.sk-dense)
|
|
390
431
|
{
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
// Transitions
|
|
395
|
-
transition:
|
|
396
|
-
color var(--sk-button-transition-duration) var(--sk-button-transition-easing),
|
|
397
|
-
background-color var(--sk-button-transition-duration) var(--sk-button-transition-easing),
|
|
398
|
-
border-color var(--sk-button-transition-duration) var(--sk-button-transition-easing),
|
|
399
|
-
box-shadow var(--sk-button-transition-duration) var(--sk-button-transition-easing);
|
|
432
|
+
@include touch
|
|
433
|
+
{
|
|
434
|
+
min-height: 44px;
|
|
400
435
|
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
436
|
+
&.sk-icon-only
|
|
437
|
+
{
|
|
438
|
+
min-width: 44px;
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
}
|
|
404
442
|
|
|
405
443
|
//------------------------------------------------------------------------------------------------------------------
|
|
406
|
-
// Size variants
|
|
444
|
+
// Size variants -- set chrome sizing vars; .sk-button-chrome consumes them below.
|
|
407
445
|
//------------------------------------------------------------------------------------------------------------------
|
|
408
446
|
|
|
409
447
|
&.sk-xs
|
|
410
448
|
{
|
|
411
|
-
--sk-button-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
padding-right: var(--sk-button-padding-xs);
|
|
416
|
-
font-size: calc(var(--sk-button-font-size-base) * var(--sk-button-font-scale-xs));
|
|
417
|
-
|
|
418
|
-
@include cut-border(
|
|
419
|
-
$cut: var(--sk-button-cut-size),
|
|
420
|
-
$border-width: var(--sk-button-border-width),
|
|
421
|
-
$border-color: var(--sk-button-border-color),
|
|
422
|
-
$corners: (top-left bottom-right)
|
|
423
|
-
);
|
|
449
|
+
--sk-button-current-height: calc(var(--sk-button-height-base) * var(--sk-button-scale-xs));
|
|
450
|
+
--sk-button-current-padding-x: var(--sk-button-padding-xs);
|
|
451
|
+
--sk-button-current-font-size: calc(var(--sk-button-font-size-base) * var(--sk-button-font-scale-xs));
|
|
452
|
+
--sk-button-current-cut-size: calc(var(--sk-button-current-height) / var(--sk-button-radius-factor));
|
|
424
453
|
}
|
|
425
454
|
|
|
426
455
|
&.sk-sm
|
|
427
456
|
{
|
|
428
|
-
--sk-button-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
padding-right: var(--sk-button-padding-base);
|
|
433
|
-
font-size: calc(var(--sk-button-font-size-base) * var(--sk-button-font-scale-sm));
|
|
434
|
-
|
|
435
|
-
@include cut-border(
|
|
436
|
-
$cut: var(--sk-button-cut-size),
|
|
437
|
-
$border-width: var(--sk-button-border-width),
|
|
438
|
-
$border-color: var(--sk-button-border-color),
|
|
439
|
-
$corners: (top-left bottom-right)
|
|
440
|
-
);
|
|
457
|
+
--sk-button-current-height: calc(var(--sk-button-height-base) * var(--sk-button-scale-sm));
|
|
458
|
+
--sk-button-current-padding-x: var(--sk-button-padding-base);
|
|
459
|
+
--sk-button-current-font-size: calc(var(--sk-button-font-size-base) * var(--sk-button-font-scale-sm));
|
|
460
|
+
--sk-button-current-cut-size: calc(var(--sk-button-current-height) / var(--sk-button-radius-factor));
|
|
441
461
|
}
|
|
442
462
|
|
|
443
463
|
&.sk-md
|
|
444
464
|
{
|
|
445
|
-
--sk-button-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
padding-right: var(--sk-button-padding-base);
|
|
450
|
-
font-size: calc(var(--sk-button-font-size-base) * var(--sk-button-font-scale-md));
|
|
451
|
-
|
|
452
|
-
@include cut-border(
|
|
453
|
-
$cut: var(--sk-button-cut-size),
|
|
454
|
-
$border-width: var(--sk-button-border-width),
|
|
455
|
-
$border-color: var(--sk-button-border-color),
|
|
456
|
-
$corners: (top-left bottom-right)
|
|
457
|
-
);
|
|
465
|
+
--sk-button-current-height: calc(var(--sk-button-height-base) * var(--sk-button-scale-md));
|
|
466
|
+
--sk-button-current-padding-x: var(--sk-button-padding-base);
|
|
467
|
+
--sk-button-current-font-size: calc(var(--sk-button-font-size-base) * var(--sk-button-font-scale-md));
|
|
468
|
+
--sk-button-current-cut-size: calc(var(--sk-button-current-height) / var(--sk-button-radius-factor));
|
|
458
469
|
}
|
|
459
470
|
|
|
460
471
|
&.sk-lg
|
|
461
472
|
{
|
|
462
|
-
--sk-button-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
padding-right: var(--sk-button-padding-base);
|
|
467
|
-
font-size: calc(var(--sk-button-font-size-base) * var(--sk-button-font-scale-lg));
|
|
468
|
-
|
|
469
|
-
@include cut-border(
|
|
470
|
-
$cut: var(--sk-button-cut-size),
|
|
471
|
-
$border-width: var(--sk-button-border-width),
|
|
472
|
-
$border-color: var(--sk-button-border-color),
|
|
473
|
-
$corners: (top-left bottom-right)
|
|
474
|
-
);
|
|
473
|
+
--sk-button-current-height: calc(var(--sk-button-height-base) * var(--sk-button-scale-lg));
|
|
474
|
+
--sk-button-current-padding-x: var(--sk-button-padding-base);
|
|
475
|
+
--sk-button-current-font-size: calc(var(--sk-button-font-size-base) * var(--sk-button-font-scale-lg));
|
|
476
|
+
--sk-button-current-cut-size: calc(var(--sk-button-current-height) / var(--sk-button-radius-factor));
|
|
475
477
|
}
|
|
476
478
|
|
|
477
479
|
&.sk-xl
|
|
478
480
|
{
|
|
479
|
-
--sk-button-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
padding-right: var(--sk-button-padding-xl);
|
|
484
|
-
font-size: calc(var(--sk-button-font-size-base) * var(--sk-button-font-scale-xl));
|
|
485
|
-
|
|
486
|
-
@include cut-border(
|
|
487
|
-
$cut: var(--sk-button-cut-size),
|
|
488
|
-
$border-width: var(--sk-button-border-width),
|
|
489
|
-
$border-color: var(--sk-button-border-color),
|
|
490
|
-
$corners: (top-left bottom-right)
|
|
491
|
-
);
|
|
481
|
+
--sk-button-current-height: calc(var(--sk-button-height-base) * var(--sk-button-scale-xl));
|
|
482
|
+
--sk-button-current-padding-x: var(--sk-button-padding-xl);
|
|
483
|
+
--sk-button-current-font-size: calc(var(--sk-button-font-size-base) * var(--sk-button-font-scale-xl));
|
|
484
|
+
--sk-button-current-cut-size: calc(var(--sk-button-current-height) / var(--sk-button-radius-factor));
|
|
492
485
|
}
|
|
493
486
|
|
|
494
487
|
//------------------------------------------------------------------------------------------------------------------
|
|
@@ -506,7 +499,11 @@
|
|
|
506
499
|
&.sk-neutral
|
|
507
500
|
{
|
|
508
501
|
--sk-button-border-color: color-mix(in oklch, var(--sk-button-border-base), white 25%);
|
|
509
|
-
|
|
502
|
+
|
|
503
|
+
.sk-button-chrome
|
|
504
|
+
{
|
|
505
|
+
color: color-mix(in oklch, var(--sk-button-color-base), white 50%);
|
|
506
|
+
}
|
|
510
507
|
}
|
|
511
508
|
}
|
|
512
509
|
|
|
@@ -536,7 +533,10 @@
|
|
|
536
533
|
&:disabled,
|
|
537
534
|
&.sk-loading
|
|
538
535
|
{
|
|
539
|
-
|
|
536
|
+
.sk-button-chrome
|
|
537
|
+
{
|
|
538
|
+
background-color: oklch(from var(--sk-button-bg) l c h / 0.45);
|
|
539
|
+
}
|
|
540
540
|
}
|
|
541
541
|
|
|
542
542
|
// Special case: neutral text and border are lighter (halfway to white) for better differentiation
|
|
@@ -546,7 +546,11 @@
|
|
|
546
546
|
from color-mix(in oklch, var(--sk-button-border-base), white 50%)
|
|
547
547
|
l c h / var(--sk-button-subtle-border-opacity)
|
|
548
548
|
);
|
|
549
|
-
|
|
549
|
+
|
|
550
|
+
.sk-button-chrome
|
|
551
|
+
{
|
|
552
|
+
color: color-mix(in oklch, var(--sk-button-color-base), white 50%);
|
|
553
|
+
}
|
|
550
554
|
}
|
|
551
555
|
}
|
|
552
556
|
|
|
@@ -556,15 +560,13 @@
|
|
|
556
560
|
|
|
557
561
|
&.sk-ghost
|
|
558
562
|
{
|
|
559
|
-
border-color: transparent;
|
|
560
|
-
|
|
561
563
|
@each $kind in $kinds
|
|
562
564
|
{
|
|
563
565
|
@include button-ghost-kind($kind);
|
|
564
566
|
}
|
|
565
567
|
|
|
566
568
|
// Special case: neutral text is lighter (halfway to white) for better differentiation
|
|
567
|
-
&.sk-neutral
|
|
569
|
+
&.sk-neutral .sk-button-chrome
|
|
568
570
|
{
|
|
569
571
|
color: color-mix(in oklch, var(--sk-button-color-base), white 50%);
|
|
570
572
|
}
|
|
@@ -576,11 +578,14 @@
|
|
|
576
578
|
|
|
577
579
|
&.sk-link
|
|
578
580
|
{
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
581
|
+
--sk-button-current-padding-x: 0;
|
|
582
|
+
|
|
583
|
+
.sk-button-chrome
|
|
584
|
+
{
|
|
585
|
+
text-decoration: underline;
|
|
586
|
+
text-underline-offset: 2px;
|
|
587
|
+
border-color: transparent;
|
|
588
|
+
}
|
|
584
589
|
|
|
585
590
|
@each $kind in $kinds
|
|
586
591
|
{
|
|
@@ -590,9 +595,12 @@
|
|
|
590
595
|
// Special case: neutral text is lighter (halfway to white) for better differentiation
|
|
591
596
|
&.sk-neutral
|
|
592
597
|
{
|
|
593
|
-
|
|
598
|
+
.sk-button-chrome
|
|
599
|
+
{
|
|
600
|
+
color: color-mix(in oklch, var(--sk-button-color-base), white 50%);
|
|
601
|
+
}
|
|
594
602
|
|
|
595
|
-
&:hover:not(:disabled)
|
|
603
|
+
&:hover:not(:disabled) .sk-button-chrome
|
|
596
604
|
{
|
|
597
605
|
color: color-mix(in oklch, var(--sk-button-color-base), white 60%);
|
|
598
606
|
}
|
|
@@ -632,121 +640,190 @@
|
|
|
632
640
|
&.sk-solid
|
|
633
641
|
{
|
|
634
642
|
--sk-button-border-color: var(--sk-button-border-hover);
|
|
635
|
-
|
|
636
|
-
|
|
643
|
+
|
|
644
|
+
.sk-button-chrome
|
|
645
|
+
{
|
|
646
|
+
background-color: var(--sk-button-bg-hover);
|
|
647
|
+
color: var(--sk-button-text);
|
|
648
|
+
}
|
|
637
649
|
|
|
638
650
|
&:hover:not(:disabled)
|
|
639
651
|
{
|
|
640
652
|
--sk-button-glow-shadow: 0 0 var(--sk-button-glow-size) oklch(from var(--sk-button-border-base) l c h / var(--sk-button-glow-opacity));
|
|
641
|
-
|
|
653
|
+
|
|
654
|
+
.sk-button-chrome
|
|
655
|
+
{
|
|
656
|
+
background-color: color-mix(in oklch, var(--sk-button-bg) 70%, white 30%);
|
|
657
|
+
}
|
|
642
658
|
}
|
|
643
659
|
}
|
|
644
660
|
|
|
645
661
|
&.sk-outline
|
|
646
662
|
{
|
|
647
663
|
--sk-button-border-color: var(--sk-button-border-hover);
|
|
648
|
-
|
|
649
|
-
|
|
664
|
+
|
|
665
|
+
.sk-button-chrome
|
|
666
|
+
{
|
|
667
|
+
background-color: var(--sk-button-bg);
|
|
668
|
+
color: var(--sk-button-text);
|
|
669
|
+
}
|
|
650
670
|
}
|
|
651
671
|
|
|
652
672
|
&.sk-subtle
|
|
653
673
|
{
|
|
654
674
|
--sk-button-border-color: transparent;
|
|
655
|
-
|
|
656
|
-
|
|
675
|
+
|
|
676
|
+
.sk-button-chrome
|
|
677
|
+
{
|
|
678
|
+
background-color: var(--sk-button-bg);
|
|
679
|
+
color: var(--sk-button-text);
|
|
680
|
+
}
|
|
657
681
|
|
|
658
682
|
&:hover:not(:disabled)
|
|
659
683
|
{
|
|
660
684
|
--sk-button-border-color: transparent;
|
|
661
685
|
--sk-button-glow-shadow: 0 0 var(--sk-button-glow-size) oklch(from var(--sk-button-border-base) l c h / var(--sk-button-glow-opacity));
|
|
662
|
-
|
|
686
|
+
|
|
687
|
+
.sk-button-chrome
|
|
688
|
+
{
|
|
689
|
+
background-color: var(--sk-button-bg-hover);
|
|
690
|
+
}
|
|
663
691
|
}
|
|
664
692
|
}
|
|
665
693
|
|
|
666
694
|
&.sk-ghost
|
|
667
695
|
{
|
|
668
696
|
--sk-button-border-color: color-mix(in oklch, var(--sk-button-border-base) 50%, transparent 50%);
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
697
|
+
|
|
698
|
+
.sk-button-chrome
|
|
699
|
+
{
|
|
700
|
+
border-color: color-mix(in oklch, var(--sk-button-border-base) 50%, transparent 50%);
|
|
701
|
+
background-color: var(--sk-button-outline-bg);
|
|
702
|
+
color: var(--sk-button-text);
|
|
703
|
+
}
|
|
672
704
|
}
|
|
673
705
|
|
|
674
|
-
&.sk-link
|
|
706
|
+
&.sk-link .sk-button-chrome
|
|
675
707
|
{
|
|
676
708
|
color: var(--sk-button-text);
|
|
677
709
|
}
|
|
678
710
|
}
|
|
679
711
|
|
|
680
712
|
//------------------------------------------------------------------------------------------------------------------
|
|
681
|
-
//
|
|
713
|
+
// Icon-only: chrome becomes square
|
|
682
714
|
//------------------------------------------------------------------------------------------------------------------
|
|
683
715
|
|
|
684
|
-
.sk-button-loader
|
|
685
|
-
{
|
|
686
|
-
position: absolute;
|
|
687
|
-
width: 1em;
|
|
688
|
-
height: 1em;
|
|
689
|
-
border: 2px solid currentColor;
|
|
690
|
-
border-right-color: transparent;
|
|
691
|
-
border-radius: 50%;
|
|
692
|
-
animation: sk-button-spin 0.6s linear infinite;
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
//------------------------------------------------------------------------------------------------------------------
|
|
696
|
-
// Icon support
|
|
697
|
-
//------------------------------------------------------------------------------------------------------------------
|
|
698
|
-
|
|
699
|
-
// Icon-only buttons have square aspect ratio and larger icons
|
|
700
716
|
&.sk-icon-only
|
|
701
717
|
{
|
|
702
|
-
padding-
|
|
703
|
-
|
|
704
|
-
|
|
718
|
+
--sk-button-current-padding-x: 0;
|
|
719
|
+
|
|
720
|
+
.sk-button-chrome
|
|
721
|
+
{
|
|
722
|
+
aspect-ratio: 1;
|
|
723
|
+
}
|
|
705
724
|
|
|
706
725
|
.sk-button-icon
|
|
707
726
|
{
|
|
708
727
|
font-size: 1.25em;
|
|
709
728
|
}
|
|
710
729
|
}
|
|
730
|
+
}
|
|
711
731
|
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
flex-shrink: 0;
|
|
719
|
-
line-height: 1;
|
|
732
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
733
|
+
// Inner Visual Chrome
|
|
734
|
+
//
|
|
735
|
+
// Lives inside .sk-button. Draws the button body at its natural size. Consumes the
|
|
736
|
+
// --sk-button-current-* vars set by size variants on the outer .sk-button.
|
|
737
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
720
738
|
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
739
|
+
.sk-button-chrome
|
|
740
|
+
{
|
|
741
|
+
position: relative;
|
|
742
|
+
display: inline-flex;
|
|
743
|
+
align-items: center;
|
|
744
|
+
justify-content: center;
|
|
745
|
+
gap: var(--sk-button-gap);
|
|
746
|
+
height: var(--sk-button-current-height);
|
|
747
|
+
padding-left: var(--sk-button-current-padding-x);
|
|
748
|
+
padding-right: var(--sk-button-current-padding-x);
|
|
749
|
+
font-weight: var(--sk-button-font-weight);
|
|
750
|
+
font-size: var(--sk-button-current-font-size);
|
|
751
|
+
line-height: var(--sk-button-line-height);
|
|
752
|
+
border-width: var(--sk-button-border-width);
|
|
753
|
+
border-style: solid;
|
|
754
|
+
flex-shrink: 0;
|
|
755
|
+
box-sizing: border-box;
|
|
756
|
+
|
|
757
|
+
@include cut-border(
|
|
758
|
+
$cut: var(--sk-button-current-cut-size),
|
|
759
|
+
$border-width: var(--sk-button-border-width),
|
|
760
|
+
$border-color: var(--sk-button-border-color),
|
|
761
|
+
$corners: (top-left bottom-right)
|
|
762
|
+
);
|
|
728
763
|
|
|
729
|
-
//
|
|
730
|
-
|
|
764
|
+
// Apply glow shadow (only works in modern browsers with corner-shape support)
|
|
765
|
+
// Fallback browsers clip the shadow due to clip-path limitations
|
|
766
|
+
@supports (corner-shape: bevel)
|
|
731
767
|
{
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
gap: var(--sk-button-gap);
|
|
768
|
+
box-shadow: var(--sk-button-glow-shadow);
|
|
769
|
+
}
|
|
735
770
|
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
771
|
+
transition:
|
|
772
|
+
color var(--sk-button-transition-duration) var(--sk-button-transition-easing),
|
|
773
|
+
background-color var(--sk-button-transition-duration) var(--sk-button-transition-easing),
|
|
774
|
+
border-color var(--sk-button-transition-duration) var(--sk-button-transition-easing),
|
|
775
|
+
box-shadow var(--sk-button-transition-duration) var(--sk-button-transition-easing);
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
779
|
+
// Inner content pieces (live inside .sk-button-chrome)
|
|
780
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
781
|
+
|
|
782
|
+
.sk-button-loader
|
|
783
|
+
{
|
|
784
|
+
position: absolute;
|
|
785
|
+
width: 1em;
|
|
786
|
+
height: 1em;
|
|
787
|
+
border: 2px solid currentColor;
|
|
788
|
+
border-right-color: transparent;
|
|
789
|
+
border-radius: 50%;
|
|
790
|
+
animation: sk-button-spin 0.6s linear infinite;
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
.sk-button-icon
|
|
794
|
+
{
|
|
795
|
+
display: inline-flex;
|
|
796
|
+
align-items: center;
|
|
797
|
+
justify-content: center;
|
|
798
|
+
flex-shrink: 0;
|
|
799
|
+
line-height: 1;
|
|
800
|
+
|
|
801
|
+
svg
|
|
802
|
+
{
|
|
803
|
+
width: 1em;
|
|
804
|
+
height: 1em;
|
|
805
|
+
display: block;
|
|
740
806
|
}
|
|
807
|
+
}
|
|
741
808
|
|
|
742
|
-
|
|
743
|
-
|
|
809
|
+
.sk-button-content
|
|
810
|
+
{
|
|
811
|
+
display: inline-flex;
|
|
812
|
+
align-items: center;
|
|
813
|
+
gap: var(--sk-button-gap);
|
|
814
|
+
|
|
815
|
+
&.loading
|
|
744
816
|
{
|
|
745
|
-
|
|
746
|
-
align-items: center;
|
|
817
|
+
visibility: hidden;
|
|
747
818
|
}
|
|
748
819
|
}
|
|
749
820
|
|
|
821
|
+
.sk-button-text
|
|
822
|
+
{
|
|
823
|
+
display: inline-flex;
|
|
824
|
+
align-items: center;
|
|
825
|
+
}
|
|
826
|
+
|
|
750
827
|
//----------------------------------------------------------------------------------------------------------------------
|
|
751
828
|
// Animations
|
|
752
829
|
//----------------------------------------------------------------------------------------------------------------------
|