@skewedaspect/sleekspace-ui 0.8.1 → 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/components/Dropdown/SkDropdown.vue.d.ts +9 -1
- package/dist/components/Dropdown/types.d.ts +2 -1
- package/dist/components/NavBar/SkNavBar.vue.d.ts +9 -1
- package/dist/components/NavBar/context.d.ts +2 -0
- package/dist/components/NavBar/types.d.ts +5 -1
- package/dist/components/Page/SkPage.vue.d.ts +9 -0
- package/dist/components/ScrollArea/SkScrollArea.vue.d.ts +105 -4
- package/dist/composables/useCustomColors.d.ts +18 -56
- 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/composables/useCustomColors.test.d.ts +0 -1
- package/dist/composables/useFocusTrap.test.d.ts +0 -1
- package/dist/composables/usePortalContext.test.d.ts +0 -1
- package/dist/styles/mixins/fluidSize.test.d.ts +0 -1
- package/dist/types.d.ts +0 -29
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Pure-CSS Limitations
|
|
3
|
+
description: What the pure-CSS layer of Sleekspace covers, what it doesn't, and when to reach for the Vue components instead.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Pure-CSS Limitations
|
|
7
|
+
|
|
8
|
+
Let's be direct: pure-CSS Sleekspace is not Sleekspace. It's the presentational subset — the
|
|
9
|
+
parts that are just CSS talking to HTML structure. If you need interactivity, you need Vue.
|
|
10
|
+
|
|
11
|
+
This page tells you exactly what that means so you can make the right call before you start.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## What's completely out of scope
|
|
16
|
+
|
|
17
|
+
These components are Vue-only. There is no class-API, custom-element, or static-helper form
|
|
18
|
+
for them, and there won't be — they fundamentally require JS state management.
|
|
19
|
+
|
|
20
|
+
### Modal, Popover, ContextMenu, Toast
|
|
21
|
+
|
|
22
|
+
All four require:
|
|
23
|
+
- Portal/teleport rendering to a document-level container
|
|
24
|
+
- Focus trapping and restoration
|
|
25
|
+
- Escape-key and click-outside dismiss
|
|
26
|
+
- ARIA attributes that change dynamically (`aria-expanded`, `aria-modal`)
|
|
27
|
+
|
|
28
|
+
You cannot replicate a production-quality modal with CSS alone. Use the Vue components.
|
|
29
|
+
|
|
30
|
+
### Tabs, Accordion, Collapsible, TreeView
|
|
31
|
+
|
|
32
|
+
These are state machines:
|
|
33
|
+
- Tabs track which panel is active, activate on click/keyboard, and update `aria-selected`
|
|
34
|
+
- Accordion and Collapsible manage open/closed state and animate height
|
|
35
|
+
- TreeView manages selection, expansion, keyboard navigation (arrow keys, Home/End)
|
|
36
|
+
|
|
37
|
+
The `<details>` / CSS `:checked` tricks can approximate some of this for simple cases, but
|
|
38
|
+
they break on complex trees, keyboard navigation, and multi-open scenarios. The Vue versions
|
|
39
|
+
are correct; the CSS approximations are not.
|
|
40
|
+
|
|
41
|
+
### Listbox, ScrollArea, Splitter
|
|
42
|
+
|
|
43
|
+
- **Listbox** — needs selection state, keyboard navigation, and `aria-activedescendant`
|
|
44
|
+
- **ScrollArea** — provides custom scrollbars via overflow regions; the pure-CSS scroll
|
|
45
|
+
styling applies to native scrollbars, not the JS-managed virtualized variant
|
|
46
|
+
- **Splitter** — requires pointer capture and drag tracking to resize panes
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## What's in scope but reduced
|
|
51
|
+
|
|
52
|
+
These components exist in the pure-CSS layer but are missing capabilities present in the
|
|
53
|
+
Vue versions.
|
|
54
|
+
|
|
55
|
+
### Slider — single thumb only
|
|
56
|
+
|
|
57
|
+
The static helper and class API render `<input type="range">`, which is inherently single-thumb.
|
|
58
|
+
The Vue `SkSlider` supports dual-thumb range selection via two overlapping range inputs managed
|
|
59
|
+
in JS. There is no CSS-only dual-thumb solution.
|
|
60
|
+
|
|
61
|
+
**What you get:** A fully styled single-thumb slider with kind + size modifiers.
|
|
62
|
+
**What's missing:** `min`/`max` value range selection (dual thumb).
|
|
63
|
+
|
|
64
|
+
### Dropdown — `<details>` disclosure, not a menu
|
|
65
|
+
|
|
66
|
+
The static helper renders `<details class="sk-dropdown"><summary>…</summary>…</details>`.
|
|
67
|
+
This gives you a zero-JS disclosure widget that opens and closes. It is **not** a menu:
|
|
68
|
+
- No focus trap
|
|
69
|
+
- No arrow-key navigation between items
|
|
70
|
+
- No `role="menu"` / `role="menuitem"` semantics
|
|
71
|
+
- Items don't get `aria-checked` or keyboard activation
|
|
72
|
+
|
|
73
|
+
Use this for simple show/hide disclosure patterns. For actual menus (accessible, keyboard-navigable
|
|
74
|
+
dropdowns), use the Vue `SkDropdown`.
|
|
75
|
+
|
|
76
|
+
### Select — popup styling is Chromium-only
|
|
77
|
+
|
|
78
|
+
The class API applies `sk-select` to a native `<select>`. The closed button state (the
|
|
79
|
+
select trigger) is fully cross-browser styled. However, the open popup panel (the dropdown
|
|
80
|
+
list of options) only supports `appearance: base-select` styling in Chromium-based browsers
|
|
81
|
+
(Chrome, Edge) as of 2026. Firefox and Safari show the native OS popup.
|
|
82
|
+
|
|
83
|
+
If cross-browser custom select styling matters, use the Vue `SkSelect` which uses a custom
|
|
84
|
+
floating-UI panel in all browsers.
|
|
85
|
+
|
|
86
|
+
### ColorPicker — native swatch only
|
|
87
|
+
|
|
88
|
+
The static helper renders `<input type="color">`. This gives you a styled color swatch button
|
|
89
|
+
that opens the browser's native color picker on click. It respects the `size` modifier.
|
|
90
|
+
|
|
91
|
+
**What's missing:**
|
|
92
|
+
- The OKLCH palette panel
|
|
93
|
+
- Hex / RGB / HSL / OKLCH format switching
|
|
94
|
+
- The alpha channel slider
|
|
95
|
+
- Any kind of themed appearance inside the popup (that's browser chrome)
|
|
96
|
+
|
|
97
|
+
Use Vue `SkColorPicker` for the full-featured picker.
|
|
98
|
+
|
|
99
|
+
### Alert, Spinner, NavBar, Sidebar, Tag, Avatar, Field, Table — inner DOM not auto-injected by custom elements
|
|
100
|
+
|
|
101
|
+
The static helpers and Vue components for these 8 components emit an inner DOM structure beyond
|
|
102
|
+
the root element (icon wrappers, content wrappers, inner panels, etc.). The custom-element
|
|
103
|
+
form applies CSS via attribute selectors but does **not** inject this inner DOM — you must
|
|
104
|
+
write it yourself when using `<sk-alert>`, `<sk-spinner>`, etc. as custom elements.
|
|
105
|
+
|
|
106
|
+
Use the [static helpers](./static-helpers.md) or [class API examples](./class-api.md) to see
|
|
107
|
+
the expected inner structure for each component.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Browser caveats
|
|
112
|
+
|
|
113
|
+
### `corner-shape: bevel`
|
|
114
|
+
|
|
115
|
+
Sleekspace's beveled corners use `corner-shape: bevel` (CSS Shapes Level 2). This is supported
|
|
116
|
+
in modern Chrome and emerging in other engines. Older browsers fall back to `clip-path: polygon(…)`
|
|
117
|
+
which preserves the visual shape but loses the border rendering on cut edges. The fallback is
|
|
118
|
+
provided automatically — no author action needed.
|
|
119
|
+
|
|
120
|
+
### `color-mix(in oklch, …)`
|
|
121
|
+
|
|
122
|
+
Theme colors are computed with `color-mix()` in the OKLCH color space for perceptually uniform
|
|
123
|
+
mixing. This requires a modern browser (Chrome 111+, Firefox 113+, Safari 16.2+). Older browsers
|
|
124
|
+
see the fallback static color values baked into the CSS custom properties.
|
|
125
|
+
|
|
126
|
+
### `:where(:not(…))` chains
|
|
127
|
+
|
|
128
|
+
Default modifier behavior (e.g., applying `sk-neutral` styles when no `kind` attribute is
|
|
129
|
+
set) uses zero-specificity `:where()` with negation chains. This requires browsers that
|
|
130
|
+
support `:where()` — all evergreen browsers since 2021. IE11 is not supported and never will be.
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## When to reach for Vue instead
|
|
135
|
+
|
|
136
|
+
Use the pure-CSS layer when:
|
|
137
|
+
- You're building a static site (VitePress, Astro, 11ty) and want Sleekspace visuals without JS
|
|
138
|
+
- You need the CSS for a non-JS environment (email templates, print stylesheets)
|
|
139
|
+
- You're prototyping layout and just need the styling primitives
|
|
140
|
+
- You want the look of Sleekspace in a non-Vue app (React, Svelte, plain HTML)
|
|
141
|
+
|
|
142
|
+
Reach for the Vue components when:
|
|
143
|
+
- You need any interactive component (Modal, Tabs, Accordion, etc.)
|
|
144
|
+
- You need a production-quality Dropdown with keyboard navigation
|
|
145
|
+
- You need dual-thumb Slider
|
|
146
|
+
- You need cross-browser custom Select styling
|
|
147
|
+
- You need the full ColorPicker palette UI
|
|
148
|
+
- You need form validation integration (Vue components emit update events and expose validation state)
|
|
149
|
+
- You need theme switching at runtime (Vue components react to the reactive theme store)
|
|
150
|
+
|
|
151
|
+
The answer isn't always "use Vue." For purely presentational output — especially build-time
|
|
152
|
+
HTML generation — the pure-CSS layer is lighter and perfectly correct.
|