@skewedaspect/sleekspace-ui 0.8.0 → 0.9.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/{src/components → components}/Accordion/SkAccordion.vue.d.ts +1 -1
- package/dist/{src/components → components}/Accordion/types.d.ts +1 -1
- package/dist/{src/components → components}/Alert/SkAlert.vue.d.ts +1 -1
- package/dist/{src/components → components}/Alert/types.d.ts +1 -1
- package/dist/{src/components → components}/Avatar/SkAvatar.vue.d.ts +1 -1
- package/dist/{src/components → components}/Avatar/types.d.ts +1 -1
- package/dist/{src/components → components}/Breadcrumbs/SkBreadcrumbs.vue.d.ts +2 -2
- package/dist/{src/components → components}/Breadcrumbs/types.d.ts +1 -1
- package/dist/{src/components → components}/Button/SkButton.vue.d.ts +1 -1
- package/dist/{src/components → components}/Button/types.d.ts +1 -1
- package/dist/{src/components → components}/Card/SkCard.vue.d.ts +1 -1
- package/dist/components/Card/types.d.ts +2 -0
- package/dist/{src/components → components}/Checkbox/SkCheckbox.vue.d.ts +1 -1
- package/dist/{src/components → components}/Checkbox/types.d.ts +1 -1
- package/dist/{src/components → components}/Collapsible/SkCollapsible.vue.d.ts +1 -1
- package/dist/components/Collapsible/types.d.ts +2 -0
- package/dist/{src/components → components}/ColorPicker/SkColorPicker.vue.d.ts +1 -1
- package/dist/{src/components → components}/ColorPicker/types.d.ts +1 -1
- package/dist/{src/components → components}/ContextMenu/SkContextMenu.vue.d.ts +1 -1
- package/dist/components/ContextMenu/types.d.ts +2 -0
- package/dist/{src/components → components}/Divider/SkDivider.vue.d.ts +1 -1
- package/dist/{src/components → components}/Dropdown/SkDropdown.vue.d.ts +10 -2
- package/dist/{src/components → components}/Dropdown/types.d.ts +2 -1
- package/dist/{src/components → components}/Input/SkInput.vue.d.ts +1 -1
- package/dist/{src/components → components}/Input/types.d.ts +1 -1
- package/dist/{src/components → components}/Listbox/SkListbox.vue.d.ts +1 -1
- package/dist/{src/components → components}/Listbox/types.d.ts +1 -1
- package/dist/{src/components → components}/Modal/SkModal.vue.d.ts +1 -1
- package/dist/{src/components → components}/Modal/types.d.ts +1 -1
- package/dist/{src/components → components}/NavBar/SkNavBar.vue.d.ts +10 -2
- package/dist/{src/components → components}/NavBar/context.d.ts +2 -0
- package/dist/components/NavBar/types.d.ts +10 -0
- package/dist/{src/components → components}/NumberInput/SkNumberInput.vue.d.ts +1 -1
- package/dist/{src/components → components}/NumberInput/types.d.ts +1 -1
- package/dist/{src/components → components}/Page/SkPage.vue.d.ts +9 -0
- package/dist/{src/components → components}/Pagination/SkPagination.vue.d.ts +3 -3
- package/dist/{src/components → components}/Pagination/types.d.ts +1 -1
- package/dist/{src/components → components}/Panel/SkPanel.vue.d.ts +1 -1
- package/dist/{src/components → components}/Panel/types.d.ts +1 -1
- package/dist/{src/components → components}/Popover/SkPopover.vue.d.ts +1 -1
- package/dist/{src/components → components}/Progress/SkProgress.vue.d.ts +1 -1
- package/dist/{src/components → components}/Progress/types.d.ts +1 -1
- package/dist/{src/components → components}/Radio/SkRadio.vue.d.ts +1 -1
- package/dist/{src/components → components}/Radio/types.d.ts +1 -1
- package/dist/components/ScrollArea/SkScrollArea.vue.d.ts +141 -0
- package/dist/{src/components → components}/ScrollArea/types.d.ts +1 -1
- package/dist/{src/components → components}/Select/SkSelect.vue.d.ts +1 -1
- package/dist/{src/components → components}/Select/types.d.ts +1 -1
- package/dist/{src/components → components}/Sidebar/SkSidebar.vue.d.ts +1 -1
- package/dist/{src/components → components}/Sidebar/types.d.ts +1 -1
- package/dist/{src/components → components}/Slider/SkSlider.vue.d.ts +1 -1
- package/dist/{src/components → components}/Slider/types.d.ts +1 -1
- package/dist/{src/components → components}/Spinner/SkSpinner.vue.d.ts +1 -1
- package/dist/{src/components → components}/Spinner/types.d.ts +1 -1
- package/dist/{src/components → components}/Splitter/types.d.ts +1 -1
- package/dist/{src/components → components}/Switch/SkSwitch.vue.d.ts +1 -1
- package/dist/{src/components → components}/Switch/types.d.ts +1 -1
- package/dist/{src/components → components}/Table/SkTable.vue.d.ts +1 -1
- package/dist/{src/components → components}/Table/types.d.ts +1 -1
- package/dist/{src/components → components}/Tabs/SkTab.vue.d.ts +1 -1
- package/dist/{src/components → components}/Tabs/SkTabs.vue.d.ts +1 -1
- package/dist/{src/components → components}/Tag/SkTag.vue.d.ts +1 -1
- package/dist/{src/components → components}/TagsInput/SkTagsInput.vue.d.ts +1 -1
- package/dist/{src/components → components}/TagsInput/types.d.ts +1 -1
- package/dist/{src/components → components}/Textarea/SkTextarea.vue.d.ts +1 -1
- package/dist/{src/components → components}/Textarea/types.d.ts +1 -1
- package/dist/{src/components → components}/Toolbar/types.d.ts +1 -1
- package/dist/{src/components → components}/Tooltip/SkTooltip.vue.d.ts +1 -1
- package/dist/{src/components → components}/Tooltip/types.d.ts +1 -1
- package/dist/{src/components → components}/TreeView/types.d.ts +1 -1
- package/dist/composables/useCustomColors.d.ts +36 -0
- package/{src → dist}/global.d.ts +6 -2
- package/dist/sleekspace-ui.css +4253 -1251
- package/dist/sleekspace-ui.es.js +204 -109
- package/dist/sleekspace-ui.umd.js +204 -109
- package/dist/static/classes.d.ts +18 -0
- package/dist/static/components/alert.d.ts +12 -0
- package/dist/static/components/avatar.d.ts +9 -0
- package/dist/static/components/breadcrumbs.d.ts +6 -0
- package/dist/static/components/button.d.ts +13 -0
- package/dist/static/components/card.d.ts +5 -0
- package/dist/static/components/checkbox.d.ts +10 -0
- package/dist/static/components/colorPicker.d.ts +8 -0
- package/dist/static/components/divider.d.ts +8 -0
- package/dist/static/components/dropdown.d.ts +8 -0
- package/dist/static/components/field.d.ts +15 -0
- package/dist/static/components/group.d.ts +5 -0
- package/dist/static/components/input.d.ts +14 -0
- package/dist/static/components/navBar.d.ts +16 -0
- package/dist/static/components/numberInput.d.ts +15 -0
- package/dist/static/components/page.d.ts +9 -0
- package/dist/static/components/pagination.d.ts +5 -0
- package/dist/static/components/panel.d.ts +11 -0
- package/dist/static/components/progress.d.ts +9 -0
- package/dist/static/components/radio.d.ts +11 -0
- package/dist/static/components/select.d.ts +10 -0
- package/dist/static/components/sidebar.d.ts +9 -0
- package/dist/static/components/skeleton.d.ts +11 -0
- package/dist/static/components/slider.d.ts +12 -0
- package/dist/static/components/spinner.d.ts +12 -0
- package/dist/static/components/switchInput.d.ts +10 -0
- package/dist/static/components/table.d.ts +12 -0
- package/dist/static/components/tag.d.ts +8 -0
- package/dist/static/components/tagsInput.d.ts +7 -0
- package/dist/static/components/textarea.d.ts +12 -0
- package/dist/static/components/toolbar.d.ts +12 -0
- package/dist/static/components/tooltip.d.ts +7 -0
- package/dist/static/escape.d.ts +2 -0
- package/dist/static/index.cjs.js +1 -0
- package/dist/static/index.d.ts +68 -0
- package/dist/static/index.es.js +732 -0
- package/dist/static/render.d.ts +12 -0
- package/dist/static/specs.d.ts +2 -0
- package/dist/static/types.d.ts +43 -0
- package/dist/tokens.css +322 -0
- package/dist/types/index.d.ts +36 -0
- package/docs/guides/installation.md +8 -2
- package/docs/guides/pure-css/_meta.yaml +8 -0
- package/docs/guides/pure-css/class-api.md +1070 -0
- package/docs/guides/pure-css/custom-elements.md +574 -0
- package/docs/guides/pure-css/index.md +86 -0
- package/docs/guides/pure-css/limitations.md +152 -0
- package/docs/guides/pure-css/static-helpers.md +1203 -0
- package/llms-full.txt +3736 -261
- package/package.json +16 -5
- package/src/components/Card/SkCard.vue +1 -0
- package/src/components/ContextMenu/SkContextMenuRadioGroup.vue +4 -1
- package/src/components/Dropdown/SkDropdown.vue +20 -3
- package/src/components/Dropdown/SkDropdownRadioGroup.vue +4 -1
- package/src/components/Dropdown/types.ts +2 -1
- package/src/components/NavBar/SkNavBar.vue +14 -4
- package/src/components/NavBar/context.ts +4 -2
- package/src/components/NavBar/types.ts +6 -1
- package/src/components/Page/SkPage.vue +11 -0
- package/src/components/Panel/SkPanel.vue +2 -1
- package/src/components/ScrollArea/SkScrollArea.vue +78 -5
- package/src/components/TreeView/SkTreeView.vue +7 -2
- package/src/composables/useCustomColors.ts +86 -77
- package/src/composables/usePortalContext.test.ts +0 -2
- package/src/shims.d.ts +10 -0
- package/src/static/__tests__/parity.test.ts +717 -0
- package/src/static/__tests__/parityHarness.test.ts +98 -0
- package/src/static/__tests__/parityHarness.ts +260 -0
- package/src/static/classes.test.ts +82 -0
- package/src/static/classes.ts +111 -0
- package/src/static/components/__tests__/helpers.test.ts +837 -0
- package/src/static/components/alert.ts +117 -0
- package/src/static/components/avatar.ts +86 -0
- package/src/static/components/breadcrumbs.ts +28 -0
- package/src/static/components/button.ts +75 -0
- package/src/static/components/card.ts +27 -0
- package/src/static/components/checkbox.ts +48 -0
- package/src/static/components/colorPicker.ts +45 -0
- package/src/static/components/divider.ts +39 -0
- package/src/static/components/dropdown.ts +36 -0
- package/src/static/components/field.ts +86 -0
- package/src/static/components/group.ts +27 -0
- package/src/static/components/input.ts +55 -0
- package/src/static/components/navBar.ts +94 -0
- package/src/static/components/numberInput.ts +64 -0
- package/src/static/components/page.ts +31 -0
- package/src/static/components/pagination.ts +27 -0
- package/src/static/components/panel.ts +33 -0
- package/src/static/components/progress.ts +31 -0
- package/src/static/components/radio.ts +53 -0
- package/src/static/components/select.ts +51 -0
- package/src/static/components/sidebar.ts +85 -0
- package/src/static/components/skeleton.ts +66 -0
- package/src/static/components/slider.ts +50 -0
- package/src/static/components/spinner.ts +94 -0
- package/src/static/components/switchInput.ts +49 -0
- package/src/static/components/table.ts +88 -0
- package/src/static/components/tag.ts +76 -0
- package/src/static/components/tagsInput.ts +35 -0
- package/src/static/components/textarea.ts +53 -0
- package/src/static/components/toolbar.ts +74 -0
- package/src/static/components/tooltip.ts +29 -0
- package/src/static/escape.test.ts +53 -0
- package/src/static/escape.ts +28 -0
- package/src/static/generated/defaults.ts +378 -0
- package/src/static/generated/propTypes.ts +425 -0
- package/src/static/index.ts +116 -0
- package/src/static/render.test.ts +83 -0
- package/src/static/render.ts +76 -0
- package/src/static/specs.test.ts +58 -0
- package/src/static/specs.ts +230 -0
- package/src/static/types.ts +176 -0
- package/src/styles/__tests__/testHelpers.ts +97 -0
- package/src/styles/base/_custom-elements.scss +51 -0
- package/src/styles/base/_index.scss +4 -0
- package/src/styles/components/__tests__/componentSelectors.test.ts +2575 -0
- package/src/styles/components/_alert.scss +82 -39
- package/src/styles/components/_avatar.scss +102 -47
- package/src/styles/components/_breadcrumbs.scss +39 -37
- package/src/styles/components/_button.scss +58 -5
- package/src/styles/components/_card.scss +64 -2
- package/src/styles/components/_checkbox.scss +35 -5
- package/src/styles/components/_color-picker.scss +48 -13
- package/src/styles/components/_divider.scss +86 -52
- package/src/styles/components/_dropdown.scss +214 -0
- package/src/styles/components/_field.scss +76 -23
- package/src/styles/components/_group.scss +190 -79
- package/src/styles/components/_index.scss +1 -0
- package/src/styles/components/_input.scss +81 -5
- package/src/styles/components/_menu.scss +1 -1
- package/src/styles/components/_navbar.scss +76 -45
- package/src/styles/components/_number-input.scss +88 -83
- package/src/styles/components/_page.scss +82 -23
- package/src/styles/components/_pagination.scss +240 -212
- package/src/styles/components/_panel.scss +268 -122
- package/src/styles/components/_progress.scss +120 -70
- package/src/styles/components/_radio.scss +35 -5
- package/src/styles/components/_scroll-area.scss +50 -22
- package/src/styles/components/_select.scss +40 -9
- package/src/styles/components/_sidebar.scss +59 -34
- package/src/styles/components/_skeleton.scss +111 -65
- package/src/styles/components/_slider.scss +34 -10
- package/src/styles/components/_spinner.scss +107 -56
- package/src/styles/components/_switch.scss +36 -5
- package/src/styles/components/_table.scss +150 -166
- package/src/styles/components/_tag.scss +244 -154
- package/src/styles/components/_tags-input.scss +46 -12
- package/src/styles/components/_textarea.scss +36 -5
- package/src/styles/components/_toolbar.scss +85 -31
- package/src/styles/components/_tooltip.scss +172 -3
- package/src/styles/mixins/_cut-border.scss +18 -4
- package/src/styles/mixins/_dual-selector.scss +192 -0
- package/src/styles/mixins/_index.scss +1 -0
- package/src/styles/mixins/dualSelector.test.ts +151 -0
- package/src/styles/themes/_colorful.scss +25 -0
- package/src/styles/themes/_greyscale.scss +25 -0
- package/src/styles/themes/_shade-scale.scss +39 -0
- package/src/styles/tokens/_semantic-color-kinds.scss +66 -0
- package/src/{types.ts → types/index.ts} +19 -11
- package/web-types.json +970 -137
- package/dist/src/components/Card/types.d.ts +0 -2
- package/dist/src/components/Collapsible/types.d.ts +0 -2
- package/dist/src/components/ContextMenu/types.d.ts +0 -2
- package/dist/src/components/NavBar/types.d.ts +0 -6
- package/dist/src/components/ScrollArea/SkScrollArea.vue.d.ts +0 -40
- package/dist/src/composables/useCustomColors.d.ts +0 -74
- package/dist/src/composables/useCustomColors.test.d.ts +0 -1
- package/dist/src/composables/useFocusTrap.test.d.ts +0 -1
- package/dist/src/composables/usePortalContext.test.d.ts +0 -1
- package/dist/src/styles/mixins/fluidSize.test.d.ts +0 -1
- package/dist/src/types.d.ts +0 -29
- /package/dist/{src/components → components}/Accordion/SkAccordionItem.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Accordion/index.d.ts +0 -0
- /package/dist/{src/components → components}/Avatar/index.d.ts +0 -0
- /package/dist/{src/components → components}/Breadcrumbs/SkBreadcrumbItem.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Breadcrumbs/SkBreadcrumbSeparator.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Breadcrumbs/index.d.ts +0 -0
- /package/dist/{src/components → components}/Checkbox/index.d.ts +0 -0
- /package/dist/{src/components → components}/Collapsible/index.d.ts +0 -0
- /package/dist/{src/components → components}/ColorPicker/index.d.ts +0 -0
- /package/dist/{src/components → components}/ContextMenu/SkContextMenuCheckboxItem.vue.d.ts +0 -0
- /package/dist/{src/components → components}/ContextMenu/SkContextMenuItem.vue.d.ts +0 -0
- /package/dist/{src/components → components}/ContextMenu/SkContextMenuLabel.vue.d.ts +0 -0
- /package/dist/{src/components → components}/ContextMenu/SkContextMenuRadioGroup.vue.d.ts +0 -0
- /package/dist/{src/components → components}/ContextMenu/SkContextMenuRadioItem.vue.d.ts +0 -0
- /package/dist/{src/components → components}/ContextMenu/SkContextMenuSeparator.vue.d.ts +0 -0
- /package/dist/{src/components → components}/ContextMenu/SkContextMenuSubmenu.vue.d.ts +0 -0
- /package/dist/{src/components → components}/ContextMenu/index.d.ts +0 -0
- /package/dist/{src/components → components}/Divider/types.d.ts +0 -0
- /package/dist/{src/components → components}/Dropdown/SkDropdownCheckboxItem.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Dropdown/SkDropdownMenuItem.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Dropdown/SkDropdownMenuLabel.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Dropdown/SkDropdownMenuSeparator.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Dropdown/SkDropdownRadioGroup.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Dropdown/SkDropdownRadioItem.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Dropdown/SkDropdownSubmenu.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Dropdown/index.d.ts +0 -0
- /package/dist/{src/components → components}/Field/SkField.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Field/index.d.ts +0 -0
- /package/dist/{src/components → components}/Field/types.d.ts +0 -0
- /package/dist/{src/components → components}/Group/SkGroup.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Group/types.d.ts +0 -0
- /package/dist/{src/components → components}/Input/index.d.ts +0 -0
- /package/dist/{src/components → components}/Listbox/SkListboxItem.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Listbox/SkListboxSeparator.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Listbox/index.d.ts +0 -0
- /package/dist/{src/components → components}/Modal/index.d.ts +0 -0
- /package/dist/{src/components → components}/NavBar/index.d.ts +0 -0
- /package/dist/{src/components → components}/NumberInput/index.d.ts +0 -0
- /package/dist/{src/components → components}/Page/SkPageSidebarToggle.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Page/index.d.ts +0 -0
- /package/dist/{src/components → components}/Page/types.d.ts +0 -0
- /package/dist/{src/components → components}/Pagination/SkPaginationItem.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Pagination/index.d.ts +0 -0
- /package/dist/{src/components → components}/Popover/index.d.ts +0 -0
- /package/dist/{src/components → components}/Popover/types.d.ts +0 -0
- /package/dist/{src/components → components}/Progress/index.d.ts +0 -0
- /package/dist/{src/components → components}/Radio/SkRadioGroup.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Radio/index.d.ts +0 -0
- /package/dist/{src/components → components}/ScrollArea/index.d.ts +0 -0
- /package/dist/{src/components → components}/Select/SkSelectItem.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Select/SkSelectSeparator.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Select/index.d.ts +0 -0
- /package/dist/{src/components → components}/Sidebar/SkSidebarItem.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Sidebar/SkSidebarSection.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Skeleton/SkSkeleton.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Skeleton/index.d.ts +0 -0
- /package/dist/{src/components → components}/Skeleton/types.d.ts +0 -0
- /package/dist/{src/components → components}/Slider/index.d.ts +0 -0
- /package/dist/{src/components → components}/Spinner/index.d.ts +0 -0
- /package/dist/{src/components → components}/Splitter/SkSplitter.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Splitter/SkSplitterHandle.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Splitter/SkSplitterPanel.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Splitter/index.d.ts +0 -0
- /package/dist/{src/components → components}/Switch/index.d.ts +0 -0
- /package/dist/{src/components → components}/Table/index.d.ts +0 -0
- /package/dist/{src/components → components}/Tabs/SkTabList.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Tabs/SkTabPanel.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Tabs/SkTabPanels.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Tabs/types.d.ts +0 -0
- /package/dist/{src/components → components}/Tag/types.d.ts +0 -0
- /package/dist/{src/components → components}/TagsInput/index.d.ts +0 -0
- /package/dist/{src/components → components}/Textarea/index.d.ts +0 -0
- /package/dist/{src/components → components}/Theme/SkTheme.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Theme/types.d.ts +0 -0
- /package/dist/{src/components → components}/Theme/useTheme.d.ts +0 -0
- /package/dist/{src/components → components}/Toast/SkToast.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Toast/SkToastProvider.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Toast/index.d.ts +0 -0
- /package/dist/{src/components → components}/Toast/types.d.ts +0 -0
- /package/dist/{src/components → components}/Toast/useToast.d.ts +0 -0
- /package/dist/{src/components → components}/Toolbar/SkToolbar.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Toolbar/SkToolbarButton.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Toolbar/SkToolbarSeparator.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Toolbar/SkToolbarToggleGroup.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Toolbar/SkToolbarToggleItem.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Toolbar/index.d.ts +0 -0
- /package/dist/{src/components → components}/Tooltip/SkTooltipProvider.vue.d.ts +0 -0
- /package/dist/{src/components → components}/Tooltip/index.d.ts +0 -0
- /package/dist/{src/components → components}/TreeView/SkTreeItem.vue.d.ts +0 -0
- /package/dist/{src/components → components}/TreeView/SkTreeView.vue.d.ts +0 -0
- /package/dist/{src/components → components}/TreeView/index.d.ts +0 -0
- /package/dist/{src/composables → composables}/useFocusTrap.d.ts +0 -0
- /package/dist/{src/composables → composables}/usePageDrawer.d.ts +0 -0
- /package/dist/{src/composables → composables}/usePortalContext.d.ts +0 -0
- /package/dist/{src/index.d.ts → index.d.ts} +0 -0
|
@@ -2,30 +2,15 @@
|
|
|
2
2
|
// Toolbar Component Styles
|
|
3
3
|
//----------------------------------------------------------------------------------------------------------------------
|
|
4
4
|
|
|
5
|
-
@use '
|
|
6
|
-
|
|
7
|
-
$kinds: (neutral, primary, accent, info, success, warning, danger);
|
|
8
|
-
|
|
9
|
-
//----------------------------------------------------------------------------------------------------------------------
|
|
10
|
-
// Kind Mixin
|
|
11
|
-
//----------------------------------------------------------------------------------------------------------------------
|
|
12
|
-
|
|
13
|
-
@mixin toolbar-kind($kind)
|
|
14
|
-
{
|
|
15
|
-
&.sk-#{ '' + $kind }
|
|
16
|
-
{
|
|
17
|
-
--sk-toolbar-color-base: var(--sk-#{ $kind }-base);
|
|
18
|
-
--sk-toolbar-fg: var(--sk-#{ $kind }-text);
|
|
19
|
-
--sk-toolbar-hover: var(--sk-#{ $kind }-hover);
|
|
20
|
-
--sk-toolbar-active: var(--sk-#{ $kind }-active);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
5
|
+
@use '../theme/variables' as *;
|
|
6
|
+
@use '../mixins' as *;
|
|
23
7
|
|
|
24
8
|
//----------------------------------------------------------------------------------------------------------------------
|
|
25
9
|
// Toolbar Root
|
|
26
10
|
//----------------------------------------------------------------------------------------------------------------------
|
|
27
11
|
|
|
28
|
-
.sk-toolbar
|
|
12
|
+
.sk-toolbar,
|
|
13
|
+
sk-toolbar
|
|
29
14
|
{
|
|
30
15
|
--sk-toolbar-color-base: var(--sk-neutral-base);
|
|
31
16
|
--sk-toolbar-fg: var(--sk-neutral-text);
|
|
@@ -50,11 +35,6 @@ $kinds: (neutral, primary, accent, info, success, warning, danger);
|
|
|
50
35
|
background: oklch(from var(--sk-toolbar-color-base) l c h / 0.08);
|
|
51
36
|
position: relative;
|
|
52
37
|
|
|
53
|
-
&.sk-vertical
|
|
54
|
-
{
|
|
55
|
-
flex-direction: column;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
38
|
//------------------------------------------------------------------------------------------------------------------
|
|
59
39
|
// Corner Toggle Classes
|
|
60
40
|
//------------------------------------------------------------------------------------------------------------------
|
|
@@ -134,17 +114,81 @@ $kinds: (neutral, primary, accent, info, success, warning, danger);
|
|
|
134
114
|
);
|
|
135
115
|
}
|
|
136
116
|
}
|
|
117
|
+
}
|
|
137
118
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
119
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
120
|
+
// Kind Variants
|
|
121
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
141
122
|
|
|
142
|
-
|
|
123
|
+
@each $kind in $kinds
|
|
124
|
+
{
|
|
125
|
+
@include kind-variant('toolbar', $kind)
|
|
143
126
|
{
|
|
144
|
-
|
|
127
|
+
--sk-toolbar-color-base: var(--sk-#{ $kind }-base);
|
|
128
|
+
--sk-toolbar-fg: var(--sk-#{ $kind }-text);
|
|
129
|
+
--sk-toolbar-hover: var(--sk-#{ $kind }-hover);
|
|
130
|
+
--sk-toolbar-active: var(--sk-#{ $kind }-active);
|
|
145
131
|
}
|
|
146
132
|
}
|
|
147
133
|
|
|
134
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
135
|
+
// Orientation Modifier
|
|
136
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
137
|
+
|
|
138
|
+
@include single-choice-modifier('toolbar', 'orientation', 'vertical')
|
|
139
|
+
{
|
|
140
|
+
flex-direction: column;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
@include single-choice-modifier('toolbar', 'orientation', 'horizontal')
|
|
144
|
+
{
|
|
145
|
+
flex-direction: row;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
149
|
+
// Defaults When Absent
|
|
150
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
151
|
+
|
|
152
|
+
// Default kind: neutral — explicit :not() chain for zero-specificity default.
|
|
153
|
+
$_toolbar-kind-not: '';
|
|
154
|
+
@each $kind in $kinds
|
|
155
|
+
{
|
|
156
|
+
$_toolbar-kind-not: $_toolbar-kind-not + ':not(.sk-' + $kind + ')';
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.sk-toolbar:where(#{ $_toolbar-kind-not })
|
|
160
|
+
{
|
|
161
|
+
--sk-toolbar-color-base: var(--sk-neutral-base);
|
|
162
|
+
--sk-toolbar-fg: var(--sk-neutral-text);
|
|
163
|
+
--sk-toolbar-hover: var(--sk-neutral-hover);
|
|
164
|
+
--sk-toolbar-active: var(--sk-neutral-active);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// Default orientation: horizontal — fires when no sk-orientation-* class is present.
|
|
168
|
+
@include defaults-when-absent('toolbar', 'sk-orientation-')
|
|
169
|
+
{
|
|
170
|
+
flex-direction: row;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
174
|
+
// Custom-Element API Defaults (attribute-absence path)
|
|
175
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
176
|
+
|
|
177
|
+
// Default kind: neutral — fires when <sk-toolbar> has no kind attribute.
|
|
178
|
+
@include defaults-when-no-attr('toolbar', 'kind')
|
|
179
|
+
{
|
|
180
|
+
--sk-toolbar-color-base: var(--sk-neutral-base);
|
|
181
|
+
--sk-toolbar-fg: var(--sk-neutral-text);
|
|
182
|
+
--sk-toolbar-hover: var(--sk-neutral-hover);
|
|
183
|
+
--sk-toolbar-active: var(--sk-neutral-active);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// Default orientation: horizontal — fires when <sk-toolbar> has no orientation attribute.
|
|
187
|
+
@include defaults-when-no-attr('toolbar', 'orientation')
|
|
188
|
+
{
|
|
189
|
+
flex-direction: row;
|
|
190
|
+
}
|
|
191
|
+
|
|
148
192
|
//----------------------------------------------------------------------------------------------------------------------
|
|
149
193
|
// Toolbar Button
|
|
150
194
|
//----------------------------------------------------------------------------------------------------------------------
|
|
@@ -280,19 +324,29 @@ $kinds: (neutral, primary, accent, info, success, warning, danger);
|
|
|
280
324
|
{
|
|
281
325
|
background: oklch(from var(--sk-toolbar-color-base) l c h / 0.2);
|
|
282
326
|
|
|
283
|
-
.sk-toolbar.sk-horizontal >
|
|
327
|
+
.sk-toolbar.sk-orientation-horizontal > &,
|
|
328
|
+
sk-toolbar[orientation=horizontal] > &
|
|
284
329
|
{
|
|
285
330
|
width: 1px;
|
|
286
331
|
align-self: stretch;
|
|
287
332
|
margin: var(--sk-space-xs) var(--sk-space-xxs);
|
|
288
333
|
}
|
|
289
334
|
|
|
290
|
-
.sk-toolbar.sk-vertical >
|
|
335
|
+
.sk-toolbar.sk-orientation-vertical > &,
|
|
336
|
+
sk-toolbar[orientation=vertical] > &
|
|
291
337
|
{
|
|
292
338
|
height: 1px;
|
|
293
339
|
align-self: stretch;
|
|
294
340
|
margin: var(--sk-space-xxs) var(--sk-space-xs);
|
|
295
341
|
}
|
|
342
|
+
|
|
343
|
+
// Default: horizontal (no orientation class/attribute)
|
|
344
|
+
.sk-toolbar:where(:not([class*="sk-orientation-"])) > &
|
|
345
|
+
{
|
|
346
|
+
width: 1px;
|
|
347
|
+
align-self: stretch;
|
|
348
|
+
margin: var(--sk-space-xs) var(--sk-space-xxs);
|
|
349
|
+
}
|
|
296
350
|
}
|
|
297
351
|
|
|
298
352
|
//----------------------------------------------------------------------------------------------------------------------
|
|
@@ -1,5 +1,166 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
2
|
+
// Tooltip Component Styles
|
|
3
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
4
|
+
|
|
5
|
+
@use '../theme/variables' as *;
|
|
6
|
+
@use '../mixins' as *;
|
|
7
|
+
|
|
8
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
9
|
+
// Tooltip Design Tokens
|
|
10
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
.sk-tooltip,
|
|
13
|
+
sk-tooltip
|
|
14
|
+
{
|
|
15
|
+
// Color tokens
|
|
16
|
+
--sk-tooltip-color-base: var(--sk-neutral-base);
|
|
17
|
+
--sk-tooltip-border-color: transparent;
|
|
18
|
+
|
|
19
|
+
// Calculate darkened background like buttons (ghost hover state)
|
|
20
|
+
--sk-tooltip-bg: color-mix(
|
|
21
|
+
in oklch,
|
|
22
|
+
color-mix(in oklch, var(--sk-tooltip-color-base) 75%, transparent 25%),
|
|
23
|
+
#000 46.25%
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
// Calculate hover-like background
|
|
27
|
+
--sk-tooltip-bg-hover: color-mix(in oklch, var(--sk-tooltip-bg) 85%, white 15%);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
31
|
+
// Tooltip Root
|
|
32
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
33
|
+
|
|
34
|
+
.sk-tooltip,
|
|
35
|
+
sk-tooltip
|
|
36
|
+
{
|
|
37
|
+
// Cut corners (border controlled by variant)
|
|
38
|
+
@include cut-border(
|
|
39
|
+
var(--sk-radius-md),
|
|
40
|
+
var(--sk-border-width-thin),
|
|
41
|
+
var(--sk-tooltip-border-color),
|
|
42
|
+
(top-left top-right bottom-left bottom-right)
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
position: relative;
|
|
46
|
+
padding: calc(var(--sk-space-md) / 4 + 2px) calc(var(--sk-space-lg) / 4 + 4px);
|
|
47
|
+
font-size: 0.875rem;
|
|
48
|
+
line-height: 1.4;
|
|
49
|
+
|
|
50
|
+
background: oklch(from var(--sk-tooltip-bg-hover) calc(l * 0.9) c h / 0.95);
|
|
51
|
+
color: var(--sk-neutral-text);
|
|
52
|
+
box-shadow:
|
|
53
|
+
var(--sk-shadow-md),
|
|
54
|
+
0 0 8px oklch(from var(--sk-tooltip-color-base) l c h / 0.4);
|
|
55
|
+
|
|
56
|
+
max-width: 20rem;
|
|
57
|
+
z-index: var(--sk-z-tooltip);
|
|
58
|
+
|
|
59
|
+
// Content animation
|
|
60
|
+
&[data-state='delayed-open'],
|
|
61
|
+
&[data-state='instant-open']
|
|
62
|
+
{
|
|
63
|
+
animation: sk-tooltip-show var(--sk-transition-duration-fast) ease-out;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&[data-state='closed']
|
|
67
|
+
{
|
|
68
|
+
animation: sk-tooltip-hide var(--sk-transition-duration-fast) ease-in;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
73
|
+
// Kind Variants
|
|
74
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
75
|
+
|
|
76
|
+
@each $kind in $kinds
|
|
77
|
+
{
|
|
78
|
+
@include kind-variant('tooltip', $kind)
|
|
79
|
+
{
|
|
80
|
+
--sk-tooltip-color-base: var(--sk-#{ $kind }-base);
|
|
81
|
+
color: var(--sk-#{ $kind }-text);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
86
|
+
// Variant Variants (solid / outline)
|
|
87
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
88
|
+
|
|
89
|
+
@include variant-variant('tooltip', 'solid')
|
|
90
|
+
{
|
|
91
|
+
// Solid variant is the default — darkened background
|
|
92
|
+
background: oklch(from var(--sk-tooltip-bg-hover) calc(l * 0.9) c h / 0.95);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
@include variant-variant('tooltip', 'outline')
|
|
96
|
+
{
|
|
97
|
+
// Border uses the color-base variable (works with custom colors)
|
|
98
|
+
--sk-tooltip-border-color: var(--sk-tooltip-color-base);
|
|
99
|
+
|
|
100
|
+
background: oklch(0 0 0 / 0.9);
|
|
101
|
+
box-shadow:
|
|
102
|
+
var(--sk-shadow-md),
|
|
103
|
+
inset 0 0 20px oklch(from var(--sk-tooltip-color-base) l c h / 0.5),
|
|
104
|
+
0 0 8px oklch(from var(--sk-tooltip-color-base) l c h / 0.4);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
108
|
+
// Placement Modifiers (single-choice — naive CSS positioning)
|
|
109
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
110
|
+
|
|
111
|
+
@include single-choice-modifier('tooltip', 'placement', 'top', 'placement')
|
|
112
|
+
{
|
|
113
|
+
// Placement is handled by the positioning library (Floating UI / Radix).
|
|
114
|
+
// This modifier exists so pure-CSS consumers can hint positioning.
|
|
115
|
+
transform-origin: bottom center;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@include single-choice-modifier('tooltip', 'placement', 'bottom', 'placement')
|
|
119
|
+
{
|
|
120
|
+
transform-origin: top center;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@include single-choice-modifier('tooltip', 'placement', 'left', 'placement')
|
|
124
|
+
{
|
|
125
|
+
transform-origin: right center;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
@include single-choice-modifier('tooltip', 'placement', 'right', 'placement')
|
|
129
|
+
{
|
|
130
|
+
transform-origin: left center;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
134
|
+
// Defaults When Absent
|
|
135
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
136
|
+
|
|
137
|
+
// Default kind: neutral
|
|
138
|
+
$_tooltip-kind-not: '';
|
|
139
|
+
@each $kind in $kinds
|
|
140
|
+
{
|
|
141
|
+
$_tooltip-kind-not: $_tooltip-kind-not + ':not(.sk-' + $kind + ')';
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.sk-tooltip:where(#{ $_tooltip-kind-not })
|
|
145
|
+
{
|
|
146
|
+
--sk-tooltip-color-base: var(--sk-neutral-base);
|
|
147
|
+
color: var(--sk-neutral-text);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
151
|
+
// Custom-Element API Defaults (attribute-absence path)
|
|
152
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
153
|
+
|
|
154
|
+
// Default kind: neutral
|
|
155
|
+
@include defaults-when-no-attr('tooltip', 'kind')
|
|
156
|
+
{
|
|
157
|
+
--sk-tooltip-color-base: var(--sk-neutral-base);
|
|
158
|
+
color: var(--sk-neutral-text);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
162
|
+
// Tooltip Content (legacy class — kept for Radix/Floating UI compatibility)
|
|
163
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
3
164
|
|
|
4
165
|
.sk-tooltip-content
|
|
5
166
|
{
|
|
@@ -153,6 +314,8 @@
|
|
|
153
314
|
}
|
|
154
315
|
}
|
|
155
316
|
|
|
317
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
318
|
+
|
|
156
319
|
.sk-tooltip-arrow
|
|
157
320
|
{
|
|
158
321
|
// Solid variant - match the background
|
|
@@ -175,7 +338,10 @@
|
|
|
175
338
|
margin: 0;
|
|
176
339
|
}
|
|
177
340
|
|
|
341
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
178
342
|
// Animations
|
|
343
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
344
|
+
|
|
179
345
|
@keyframes sk-tooltip-show
|
|
180
346
|
{
|
|
181
347
|
from
|
|
@@ -212,8 +378,11 @@
|
|
|
212
378
|
|
|
213
379
|
@include reduced-motion
|
|
214
380
|
{
|
|
215
|
-
.sk-tooltip-content[data-state]
|
|
381
|
+
.sk-tooltip-content[data-state],
|
|
382
|
+
.sk-tooltip[data-state]
|
|
216
383
|
{
|
|
217
384
|
animation: none;
|
|
218
385
|
}
|
|
219
386
|
}
|
|
387
|
+
|
|
388
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
@@ -35,16 +35,30 @@
|
|
|
35
35
|
$cut-bottom-right: list.index($corners, bottom-right) != null;
|
|
36
36
|
$cut-bottom-left: list.index($corners, bottom-left) != null;
|
|
37
37
|
|
|
38
|
+
// Resolve per-corner radii up front — Sass's `if()` function is deprecated, so use `@if`/`@else` and
|
|
39
|
+
// pass the results through as property values.
|
|
40
|
+
$top-left-radius: 0;
|
|
41
|
+
@if $cut-top-left { $top-left-radius: $cut; }
|
|
42
|
+
|
|
43
|
+
$top-right-radius: 0;
|
|
44
|
+
@if $cut-top-right { $top-right-radius: $cut; }
|
|
45
|
+
|
|
46
|
+
$bottom-right-radius: 0;
|
|
47
|
+
@if $cut-bottom-right { $bottom-right-radius: $cut; }
|
|
48
|
+
|
|
49
|
+
$bottom-left-radius: 0;
|
|
50
|
+
@if $cut-bottom-left { $bottom-left-radius: $cut; }
|
|
51
|
+
|
|
38
52
|
// Modern browsers with corner-shape support
|
|
39
53
|
@supports (corner-shape: bevel)
|
|
40
54
|
{
|
|
41
55
|
border: $border-width solid $border-color;
|
|
42
56
|
|
|
43
57
|
// Apply border-radius only to specified corners
|
|
44
|
-
border-top-left-radius:
|
|
45
|
-
border-top-right-radius:
|
|
46
|
-
border-bottom-right-radius:
|
|
47
|
-
border-bottom-left-radius:
|
|
58
|
+
border-top-left-radius: $top-left-radius;
|
|
59
|
+
border-top-right-radius: $top-right-radius;
|
|
60
|
+
border-bottom-right-radius: $bottom-right-radius;
|
|
61
|
+
border-bottom-left-radius: $bottom-left-radius;
|
|
48
62
|
|
|
49
63
|
corner-shape: bevel;
|
|
50
64
|
}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
2
|
+
// Dual-Selector Mixins
|
|
3
|
+
//
|
|
4
|
+
// Emit class-form + attribute-form selector pairs so components can be authored as
|
|
5
|
+
// `<div class="sk-foo sk-primary">` (Layer 1 class API) or `<sk-foo kind="primary">` (Layer 2
|
|
6
|
+
// custom-element API) with the same compiled rules.
|
|
7
|
+
//
|
|
8
|
+
// Also provides the `defaults-when-absent` helper, which applies a default modifier's rules
|
|
9
|
+
// via `:where(:not([class*="prefix-"]))` — zero-specificity so any explicit class wins — for
|
|
10
|
+
// Bootstrap-style ergonomics where `<div class="sk-foo">` alone renders the default look.
|
|
11
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
12
|
+
|
|
13
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
14
|
+
// Private Helpers
|
|
15
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
16
|
+
|
|
17
|
+
// _attr-variant — shared core for kind-variant / size-variant / variant-variant.
|
|
18
|
+
// Emits `.sk-<component>.sk-<value>` and `sk-<component>[<attr>="<value>"]`.
|
|
19
|
+
// Force string coercion via `"" + $value` to suppress CSS color-name interpolation warnings
|
|
20
|
+
// (Sass warns when `yellow` or `red` appear in interpolation as color values, not strings).
|
|
21
|
+
@mixin _attr-variant($component, $attr, $value)
|
|
22
|
+
{
|
|
23
|
+
$v: "" + $value;
|
|
24
|
+
.sk-#{ $component }.sk-#{ $v },
|
|
25
|
+
sk-#{ $component }[#{ $attr }="#{ $v }"]
|
|
26
|
+
{
|
|
27
|
+
@content;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// _attr-valued-modifier — shared core for list-modifier / single-choice-modifier.
|
|
32
|
+
// $operator is the CSS attribute selector operator: '~=' for space-lists, '=' for exclusive.
|
|
33
|
+
// Force string coercion via `"" + $value` to suppress CSS color-name interpolation warnings
|
|
34
|
+
// (Sass warns when `yellow` or `red` appear in interpolation as color values, not strings).
|
|
35
|
+
@mixin _attr-valued-modifier($component, $family, $value, $attr, $operator)
|
|
36
|
+
{
|
|
37
|
+
$v: "" + $value;
|
|
38
|
+
$attribute: $family;
|
|
39
|
+
@if $attr != null { $attribute: $attr; }
|
|
40
|
+
|
|
41
|
+
.sk-#{ $component }.sk-#{ $family }-#{ $v },
|
|
42
|
+
sk-#{ $component }[#{ $attribute }#{ $operator }"#{ $v }"]
|
|
43
|
+
{
|
|
44
|
+
@content;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
49
|
+
// kind-variant
|
|
50
|
+
//
|
|
51
|
+
// Delegates to `_attr-variant` with attr = 'kind'.
|
|
52
|
+
// Emits `.sk-<component>.sk-<kind>` and `sk-<component>[kind="<kind>"]`.
|
|
53
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
54
|
+
|
|
55
|
+
@mixin kind-variant($component, $kind)
|
|
56
|
+
{
|
|
57
|
+
@include _attr-variant($component, 'kind', $kind)
|
|
58
|
+
{
|
|
59
|
+
@content;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
64
|
+
// size-variant
|
|
65
|
+
//
|
|
66
|
+
// Delegates to `_attr-variant` with attr = 'size', and additionally emits the `sk-size-<size>`
|
|
67
|
+
// prefixed class. The prefixed form is what `defaults-when-absent` keys on via `[class*="sk-size-"]`
|
|
68
|
+
// — a plain `[class*="sk-"]` would match every class in the library, so sizes need their own
|
|
69
|
+
// distinct prefix.
|
|
70
|
+
//
|
|
71
|
+
// Emits:
|
|
72
|
+
// .sk-<component>.sk-<size>,
|
|
73
|
+
// .sk-<component>.sk-size-<size>,
|
|
74
|
+
// sk-<component>[size="<size>"]
|
|
75
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
76
|
+
|
|
77
|
+
@mixin size-variant($component, $size)
|
|
78
|
+
{
|
|
79
|
+
.sk-#{ $component }.sk-#{ $size },
|
|
80
|
+
.sk-#{ $component }.sk-size-#{ $size },
|
|
81
|
+
sk-#{ $component }[size="#{ $size }"]
|
|
82
|
+
{
|
|
83
|
+
@content;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
88
|
+
// variant-variant
|
|
89
|
+
//
|
|
90
|
+
// Delegates to `_attr-variant` with attr = 'variant'.
|
|
91
|
+
// Emits `.sk-<component>.sk-<variant>` and `sk-<component>[variant="<variant>"]`.
|
|
92
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
93
|
+
|
|
94
|
+
@mixin variant-variant($component, $variant)
|
|
95
|
+
{
|
|
96
|
+
@include _attr-variant($component, 'variant', $variant)
|
|
97
|
+
{
|
|
98
|
+
@content;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
103
|
+
// bool-modifier
|
|
104
|
+
//
|
|
105
|
+
// Emit `.sk-<component>.sk-<modifier>` and `sk-<component>[<modifier>]` (attribute presence).
|
|
106
|
+
// Use for booleans like `no-border`, `no-decoration`, `dense`, `animated`.
|
|
107
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
108
|
+
|
|
109
|
+
@mixin bool-modifier($component, $modifier)
|
|
110
|
+
{
|
|
111
|
+
.sk-#{ $component }.sk-#{ $modifier },
|
|
112
|
+
sk-#{ $component }[#{ $modifier }]
|
|
113
|
+
{
|
|
114
|
+
@content;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
119
|
+
// list-modifier
|
|
120
|
+
//
|
|
121
|
+
// Emit `.sk-<component>.sk-<family>-<value>` and `sk-<component>[<attr>~="<value>"]` for a
|
|
122
|
+
// single value of a space-separated list attribute. Use for `corners` (top-left, top-right, ...)
|
|
123
|
+
// or other multi-value families. Pass `$attr` when the HTML attribute name differs from `$family`.
|
|
124
|
+
//
|
|
125
|
+
// Example: @include list-modifier('panel', 'cut', 'top-left', 'corners') { ... }
|
|
126
|
+
// → .sk-panel.sk-cut-top-left, sk-panel[corners~="top-left"] { ... }
|
|
127
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
128
|
+
|
|
129
|
+
@mixin list-modifier($component, $family, $value, $attr: null)
|
|
130
|
+
{
|
|
131
|
+
@include _attr-valued-modifier($component, $family, $value, $attr, '~=')
|
|
132
|
+
{
|
|
133
|
+
@content;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
138
|
+
// single-choice-modifier
|
|
139
|
+
//
|
|
140
|
+
// Emit `.sk-<component>.sk-<family>-<value>` and `sk-<component>[<attr>="<value>"]` for a
|
|
141
|
+
// single value of an exclusive attribute. Use for `decoration-corner`, `orientation`, etc.
|
|
142
|
+
// Pass `$attr` when the HTML attribute name differs from `$family`.
|
|
143
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
144
|
+
|
|
145
|
+
@mixin single-choice-modifier($component, $family, $value, $attr: null)
|
|
146
|
+
{
|
|
147
|
+
@include _attr-valued-modifier($component, $family, $value, $attr, '=')
|
|
148
|
+
{
|
|
149
|
+
@content;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
154
|
+
// defaults-when-absent
|
|
155
|
+
//
|
|
156
|
+
// Emit `.sk-<component>:where(:not([class*="<prefix>"]))` — zero-specificity so any explicit
|
|
157
|
+
// class from the family wins. Use to apply default modifier rules when the author hasn't
|
|
158
|
+
// specified any class from the family.
|
|
159
|
+
//
|
|
160
|
+
// Note: this targets the class API (.sk-<component>) only. For the custom-element API, use
|
|
161
|
+
// `defaults-when-no-attr` to key on attribute absence instead.
|
|
162
|
+
//
|
|
163
|
+
// Example: @include defaults-when-absent('panel', 'sk-cut-') { --sk-panel-cut-br: ...; }
|
|
164
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
165
|
+
|
|
166
|
+
@mixin defaults-when-absent($component, $prefix)
|
|
167
|
+
{
|
|
168
|
+
.sk-#{ $component }:where(:not([class*="#{ $prefix }"]))
|
|
169
|
+
{
|
|
170
|
+
@content;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
175
|
+
// defaults-when-no-attr
|
|
176
|
+
//
|
|
177
|
+
// Emit `sk-<component>:where(:not([<attr>]))` — zero-specificity so any explicit attribute
|
|
178
|
+
// value wins. Use alongside `defaults-when-absent` to apply the same default modifier rules
|
|
179
|
+
// for the custom-element API when no modifier attribute is present.
|
|
180
|
+
//
|
|
181
|
+
// Example: @include defaults-when-no-attr('panel', 'kind') { --sk-panel-color-base: ...; }
|
|
182
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
183
|
+
|
|
184
|
+
@mixin defaults-when-no-attr($component, $attr)
|
|
185
|
+
{
|
|
186
|
+
sk-#{ $component }:where(:not([#{ $attr }]))
|
|
187
|
+
{
|
|
188
|
+
@content;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
//----------------------------------------------------------------------------------------------------------------------
|