@skewedaspect/sleekspace-ui 0.5.1 → 0.7.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.
Files changed (121) hide show
  1. package/dist/components/Card/SkCard.vue.d.ts +13 -1
  2. package/dist/components/ColorPicker/SkColorPicker.vue.d.ts +29 -0
  3. package/dist/components/ColorPicker/index.d.ts +2 -0
  4. package/dist/components/ColorPicker/types.d.ts +4 -0
  5. package/dist/components/ContextMenu/SkContextMenu.vue.d.ts +25 -0
  6. package/dist/components/ContextMenu/SkContextMenuCheckboxItem.vue.d.ts +28 -0
  7. package/dist/components/ContextMenu/SkContextMenuItem.vue.d.ts +26 -0
  8. package/dist/components/ContextMenu/SkContextMenuLabel.vue.d.ts +17 -0
  9. package/dist/components/ContextMenu/SkContextMenuRadioGroup.vue.d.ts +26 -0
  10. package/dist/components/ContextMenu/SkContextMenuRadioItem.vue.d.ts +23 -0
  11. package/dist/components/ContextMenu/SkContextMenuSeparator.vue.d.ts +2 -0
  12. package/dist/components/ContextMenu/SkContextMenuSubmenu.vue.d.ts +24 -0
  13. package/dist/components/ContextMenu/index.d.ts +9 -0
  14. package/dist/components/ContextMenu/types.d.ts +2 -0
  15. package/dist/components/Dropdown/SkDropdown.vue.d.ts +1 -1
  16. package/dist/components/Dropdown/SkDropdownCheckboxItem.vue.d.ts +28 -0
  17. package/dist/components/Dropdown/SkDropdownMenuLabel.vue.d.ts +17 -0
  18. package/dist/components/Dropdown/SkDropdownRadioGroup.vue.d.ts +26 -0
  19. package/dist/components/Dropdown/SkDropdownRadioItem.vue.d.ts +23 -0
  20. package/dist/components/Dropdown/index.d.ts +4 -0
  21. package/dist/components/Panel/SkPanel.vue.d.ts +15 -1
  22. package/dist/components/Panel/types.d.ts +1 -0
  23. package/dist/components/Popover/SkPopover.vue.d.ts +1 -1
  24. package/dist/components/ScrollArea/SkScrollArea.vue.d.ts +31 -0
  25. package/dist/components/ScrollArea/index.d.ts +2 -0
  26. package/dist/components/ScrollArea/types.d.ts +4 -0
  27. package/dist/components/Select/SkSelect.vue.d.ts +61 -0
  28. package/dist/components/Select/SkSelectItem.vue.d.ts +134 -0
  29. package/dist/components/Select/SkSelectSeparator.vue.d.ts +2 -0
  30. package/dist/components/Select/index.d.ts +4 -0
  31. package/dist/components/Select/types.d.ts +3 -0
  32. package/dist/components/Sidebar/SkSidebar.vue.d.ts +8 -1
  33. package/dist/components/Sidebar/types.d.ts +1 -0
  34. package/dist/components/Skeleton/SkSkeleton.vue.d.ts +2 -2
  35. package/dist/components/Splitter/SkSplitter.vue.d.ts +29 -0
  36. package/dist/components/Splitter/SkSplitterHandle.vue.d.ts +7 -0
  37. package/dist/components/Splitter/SkSplitterPanel.vue.d.ts +30 -0
  38. package/dist/components/Splitter/index.d.ts +4 -0
  39. package/dist/components/Splitter/types.d.ts +3 -0
  40. package/dist/components/Toolbar/SkToolbar.vue.d.ts +31 -0
  41. package/dist/components/Toolbar/SkToolbarButton.vue.d.ts +22 -0
  42. package/dist/components/Toolbar/SkToolbarSeparator.vue.d.ts +2 -0
  43. package/dist/components/Toolbar/SkToolbarToggleGroup.vue.d.ts +31 -0
  44. package/dist/components/Toolbar/SkToolbarToggleItem.vue.d.ts +23 -0
  45. package/dist/components/Toolbar/index.d.ts +6 -0
  46. package/dist/components/Toolbar/types.d.ts +5 -0
  47. package/dist/components/Tooltip/SkTooltip.vue.d.ts +1 -1
  48. package/dist/components/TreeView/SkTreeItem.vue.d.ts +39 -0
  49. package/dist/components/TreeView/SkTreeView.vue.d.ts +31 -0
  50. package/dist/components/TreeView/index.d.ts +3 -0
  51. package/dist/components/TreeView/types.d.ts +3 -0
  52. package/dist/index.d.ts +61 -0
  53. package/dist/sleekspace-ui.css +1644 -65
  54. package/dist/sleekspace-ui.es.js +17444 -6063
  55. package/dist/sleekspace-ui.umd.js +17426 -6045
  56. package/package.json +2 -1
  57. package/src/components/Card/SkCard.vue +17 -1
  58. package/src/components/ColorPicker/SkColorPicker.vue +355 -0
  59. package/src/components/ColorPicker/index.ts +6 -0
  60. package/src/components/ColorPicker/types.ts +11 -0
  61. package/src/components/ContextMenu/SkContextMenu.vue +83 -0
  62. package/src/components/ContextMenu/SkContextMenuCheckboxItem.vue +72 -0
  63. package/src/components/ContextMenu/SkContextMenuItem.vue +49 -0
  64. package/src/components/ContextMenu/SkContextMenuLabel.vue +17 -0
  65. package/src/components/ContextMenu/SkContextMenuRadioGroup.vue +36 -0
  66. package/src/components/ContextMenu/SkContextMenuRadioItem.vue +53 -0
  67. package/src/components/ContextMenu/SkContextMenuSeparator.vue +21 -0
  68. package/src/components/ContextMenu/SkContextMenuSubmenu.vue +94 -0
  69. package/src/components/ContextMenu/index.ts +15 -0
  70. package/src/components/ContextMenu/types.ts +9 -0
  71. package/src/components/Dropdown/SkDropdown.vue +1 -1
  72. package/src/components/Dropdown/SkDropdownCheckboxItem.vue +72 -0
  73. package/src/components/Dropdown/SkDropdownMenuItem.vue +1 -1
  74. package/src/components/Dropdown/SkDropdownMenuLabel.vue +17 -0
  75. package/src/components/Dropdown/SkDropdownRadioGroup.vue +36 -0
  76. package/src/components/Dropdown/SkDropdownRadioItem.vue +53 -0
  77. package/src/components/Dropdown/SkDropdownSubmenu.vue +2 -2
  78. package/src/components/Dropdown/index.ts +4 -0
  79. package/src/components/Panel/SkPanel.vue +29 -4
  80. package/src/components/Panel/types.ts +3 -0
  81. package/src/components/ScrollArea/SkScrollArea.vue +87 -0
  82. package/src/components/ScrollArea/index.ts +8 -0
  83. package/src/components/ScrollArea/types.ts +11 -0
  84. package/src/components/Select/SkSelect.vue +210 -0
  85. package/src/components/Select/SkSelectItem.vue +112 -0
  86. package/src/components/Select/SkSelectSeparator.vue +40 -0
  87. package/src/components/Select/index.ts +10 -0
  88. package/src/components/Select/types.ts +10 -0
  89. package/src/components/Sidebar/SkSidebar.vue +39 -2
  90. package/src/components/Sidebar/types.ts +2 -0
  91. package/src/components/Splitter/SkSplitter.vue +65 -0
  92. package/src/components/Splitter/SkSplitterHandle.vue +40 -0
  93. package/src/components/Splitter/SkSplitterPanel.vue +45 -0
  94. package/src/components/Splitter/index.ts +10 -0
  95. package/src/components/Splitter/types.ts +10 -0
  96. package/src/components/Toolbar/SkToolbar.vue +69 -0
  97. package/src/components/Toolbar/SkToolbarButton.vue +36 -0
  98. package/src/components/Toolbar/SkToolbarSeparator.vue +15 -0
  99. package/src/components/Toolbar/SkToolbarToggleGroup.vue +49 -0
  100. package/src/components/Toolbar/SkToolbarToggleItem.vue +37 -0
  101. package/src/components/Toolbar/index.ts +12 -0
  102. package/src/components/Toolbar/types.ts +12 -0
  103. package/src/components/TreeView/SkTreeItem.vue +84 -0
  104. package/src/components/TreeView/SkTreeView.vue +120 -0
  105. package/src/components/TreeView/index.ts +9 -0
  106. package/src/components/TreeView/types.ts +10 -0
  107. package/src/global.d.ts +22 -0
  108. package/src/index.ts +110 -0
  109. package/src/styles/components/_card.scss +45 -9
  110. package/src/styles/components/_color-picker.scss +552 -0
  111. package/src/styles/components/_index.scss +6 -0
  112. package/src/styles/components/_listbox.scss +1 -0
  113. package/src/styles/components/_menu.scss +52 -3
  114. package/src/styles/components/_panel.scss +119 -13
  115. package/src/styles/components/_scroll-area.scss +120 -0
  116. package/src/styles/components/_select.scss +439 -0
  117. package/src/styles/components/_sidebar.scss +83 -4
  118. package/src/styles/components/_splitter.scss +136 -0
  119. package/src/styles/components/_toolbar.scss +296 -0
  120. package/src/styles/components/_tree-view.scss +187 -0
  121. package/web-types.json +1244 -197
@@ -0,0 +1,296 @@
1
+ //----------------------------------------------------------------------------------------------------------------------
2
+ // Toolbar Component Styles
3
+ //----------------------------------------------------------------------------------------------------------------------
4
+
5
+ @use '@/styles/mixins/cut-border' as *;
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
+ }
23
+
24
+ //----------------------------------------------------------------------------------------------------------------------
25
+ // Toolbar Root
26
+ //----------------------------------------------------------------------------------------------------------------------
27
+
28
+ .sk-toolbar
29
+ {
30
+ --sk-toolbar-color-base: var(--sk-neutral-base);
31
+ --sk-toolbar-fg: var(--sk-neutral-text);
32
+ --sk-toolbar-hover: var(--sk-neutral-hover);
33
+ --sk-toolbar-active: var(--sk-neutral-active);
34
+
35
+ // Cut size matches button corners: height / radius-factor ≈ 10px
36
+ --sk-toolbar-cut-size: calc(2.5rem / var(--sk-border-radius-factor));
37
+ --sk-toolbar-border-width: var(--sk-border-width-thin);
38
+ --sk-toolbar-border-color: oklch(from var(--sk-toolbar-color-base) l c h / 0.2);
39
+
40
+ // Per-corner cut sizes (toggled on by .sk-cut-* classes)
41
+ --sk-toolbar-cut-tl: 0px;
42
+ --sk-toolbar-cut-tr: 0px;
43
+ --sk-toolbar-cut-br: 0px;
44
+ --sk-toolbar-cut-bl: 0px;
45
+
46
+ display: flex;
47
+ align-items: center;
48
+ gap: var(--sk-space-xs);
49
+ padding: var(--sk-space-xs);
50
+ background: oklch(from var(--sk-toolbar-color-base) l c h / 0.08);
51
+ position: relative;
52
+
53
+ &.sk-vertical
54
+ {
55
+ flex-direction: column;
56
+ }
57
+
58
+ //------------------------------------------------------------------------------------------------------------------
59
+ // Corner Toggle Classes
60
+ //------------------------------------------------------------------------------------------------------------------
61
+
62
+ &.sk-cut-top-left { --sk-toolbar-cut-tl: var(--sk-toolbar-cut-size); }
63
+ &.sk-cut-top-right { --sk-toolbar-cut-tr: var(--sk-toolbar-cut-size); }
64
+ &.sk-cut-bottom-right { --sk-toolbar-cut-br: var(--sk-toolbar-cut-size); }
65
+ &.sk-cut-bottom-left { --sk-toolbar-cut-bl: var(--sk-toolbar-cut-size); }
66
+
67
+ //------------------------------------------------------------------------------------------------------------------
68
+ // Beveled Corners (modern)
69
+ //------------------------------------------------------------------------------------------------------------------
70
+
71
+ @supports (corner-shape: bevel)
72
+ {
73
+ border: var(--sk-toolbar-border-width) solid var(--sk-toolbar-border-color);
74
+ border-top-left-radius: var(--sk-toolbar-cut-tl);
75
+ border-top-right-radius: var(--sk-toolbar-cut-tr);
76
+ border-bottom-right-radius: var(--sk-toolbar-cut-br);
77
+ border-bottom-left-radius: var(--sk-toolbar-cut-bl);
78
+ corner-shape: bevel;
79
+ }
80
+
81
+ //------------------------------------------------------------------------------------------------------------------
82
+ // Beveled Corners (fallback)
83
+ //------------------------------------------------------------------------------------------------------------------
84
+
85
+ @supports not (corner-shape: bevel)
86
+ {
87
+ border: none;
88
+
89
+ clip-path: polygon(
90
+ var(--sk-toolbar-cut-tl) 0,
91
+ calc(100% - var(--sk-toolbar-cut-tr)) 0,
92
+ 100% var(--sk-toolbar-cut-tr),
93
+ 100% calc(100% - var(--sk-toolbar-cut-br)),
94
+ calc(100% - var(--sk-toolbar-cut-br)) 100%,
95
+ var(--sk-toolbar-cut-bl) 100%,
96
+ 0 calc(100% - var(--sk-toolbar-cut-bl)),
97
+ 0 var(--sk-toolbar-cut-tl)
98
+ );
99
+
100
+ // Border via double-polygon clip-path
101
+ &::before
102
+ {
103
+ content: '';
104
+ position: absolute;
105
+ top: 0;
106
+ left: 0;
107
+ right: 0;
108
+ bottom: 0;
109
+ background-color: var(--sk-toolbar-border-color);
110
+ z-index: -1;
111
+
112
+ clip-path: polygon(
113
+ // Outer ring (clockwise)
114
+ var(--sk-toolbar-cut-tl) 0,
115
+ calc(100% - var(--sk-toolbar-cut-tr)) 0,
116
+ 100% var(--sk-toolbar-cut-tr),
117
+ 100% calc(100% - var(--sk-toolbar-cut-br)),
118
+ calc(100% - var(--sk-toolbar-cut-br)) 100%,
119
+ var(--sk-toolbar-cut-bl) 100%,
120
+ 0 calc(100% - var(--sk-toolbar-cut-bl)),
121
+ 0 var(--sk-toolbar-cut-tl),
122
+ var(--sk-toolbar-cut-tl) 0,
123
+
124
+ // Inner ring (counter-clockwise)
125
+ calc(var(--sk-toolbar-cut-tl) + var(--sk-toolbar-border-width)) var(--sk-toolbar-border-width),
126
+ var(--sk-toolbar-border-width) calc(var(--sk-toolbar-cut-tl) + var(--sk-toolbar-border-width)),
127
+ var(--sk-toolbar-border-width) calc(100% - var(--sk-toolbar-cut-bl) - var(--sk-toolbar-border-width)),
128
+ calc(var(--sk-toolbar-cut-bl) + var(--sk-toolbar-border-width)) calc(100% - var(--sk-toolbar-border-width)),
129
+ calc(100% - var(--sk-toolbar-cut-br) - var(--sk-toolbar-border-width)) calc(100% - var(--sk-toolbar-border-width)),
130
+ calc(100% - var(--sk-toolbar-border-width)) calc(100% - var(--sk-toolbar-cut-br) - var(--sk-toolbar-border-width)),
131
+ calc(100% - var(--sk-toolbar-border-width)) calc(var(--sk-toolbar-cut-tr) + var(--sk-toolbar-border-width)),
132
+ calc(100% - var(--sk-toolbar-cut-tr) - var(--sk-toolbar-border-width)) var(--sk-toolbar-border-width),
133
+ calc(var(--sk-toolbar-cut-tl) + var(--sk-toolbar-border-width)) var(--sk-toolbar-border-width)
134
+ );
135
+ }
136
+ }
137
+
138
+ //------------------------------------------------------------------------------------------------------------------
139
+ // Kind Variants
140
+ //------------------------------------------------------------------------------------------------------------------
141
+
142
+ @each $kind in $kinds
143
+ {
144
+ @include toolbar-kind($kind);
145
+ }
146
+ }
147
+
148
+ //----------------------------------------------------------------------------------------------------------------------
149
+ // Toolbar Button
150
+ //----------------------------------------------------------------------------------------------------------------------
151
+
152
+ .sk-toolbar-button
153
+ {
154
+ display: flex;
155
+ align-items: center;
156
+ justify-content: center;
157
+ gap: var(--sk-space-xs);
158
+ padding: var(--sk-space-xs) var(--sk-space-sm);
159
+ border: none;
160
+ background: transparent;
161
+ color: var(--sk-toolbar-fg);
162
+ cursor: pointer;
163
+ font-size: var(--sk-font-size-sm);
164
+ line-height: 1;
165
+
166
+ @include cut-border(
167
+ $cut: 10px,
168
+ $border-width: 0px,
169
+ $border-color: transparent,
170
+ $corners: (top-left bottom-right)
171
+ );
172
+
173
+ transition:
174
+ background var(--sk-transition-duration-fast) var(--sk-transition-timing-default),
175
+ color var(--sk-transition-duration-fast) var(--sk-transition-timing-default);
176
+
177
+ &:hover:not(:disabled)
178
+ {
179
+ background: oklch(from var(--sk-toolbar-color-base) l c h / 0.15);
180
+ }
181
+
182
+ &:active:not(:disabled)
183
+ {
184
+ background: oklch(from var(--sk-toolbar-color-base) l c h / 0.25);
185
+ }
186
+
187
+ &:focus-visible
188
+ {
189
+ outline: var(--sk-border-width-base) solid var(--sk-toolbar-color-base);
190
+ outline-offset: 2px;
191
+ }
192
+
193
+ &:disabled
194
+ {
195
+ opacity: 0.5;
196
+ cursor: not-allowed;
197
+ }
198
+ }
199
+
200
+ //----------------------------------------------------------------------------------------------------------------------
201
+ // Toolbar Toggle Group
202
+ //----------------------------------------------------------------------------------------------------------------------
203
+
204
+ .sk-toolbar-toggle-group
205
+ {
206
+ display: flex;
207
+ align-items: center;
208
+ gap: 1px;
209
+ }
210
+
211
+ //----------------------------------------------------------------------------------------------------------------------
212
+ // Toolbar Toggle Item
213
+ //----------------------------------------------------------------------------------------------------------------------
214
+
215
+ .sk-toolbar-toggle-item
216
+ {
217
+ display: flex;
218
+ align-items: center;
219
+ justify-content: center;
220
+ padding: var(--sk-space-xs) var(--sk-space-sm);
221
+ border: none;
222
+ background: transparent;
223
+ color: var(--sk-toolbar-fg);
224
+ cursor: pointer;
225
+ font-size: var(--sk-font-size-sm);
226
+ line-height: 1;
227
+
228
+ @include cut-border(
229
+ $cut: 10px,
230
+ $border-width: 0px,
231
+ $border-color: transparent,
232
+ $corners: (top-left bottom-right)
233
+ );
234
+
235
+ transition:
236
+ background var(--sk-transition-duration-fast) var(--sk-transition-timing-default),
237
+ color var(--sk-transition-duration-fast) var(--sk-transition-timing-default);
238
+
239
+ &:hover:not(:disabled)
240
+ {
241
+ background: oklch(from var(--sk-toolbar-color-base) l c h / 0.15);
242
+ }
243
+
244
+ &:active:not(:disabled)
245
+ {
246
+ background: oklch(from var(--sk-toolbar-color-base) l c h / 0.25);
247
+ }
248
+
249
+ &[data-state='on']
250
+ {
251
+ background: oklch(from var(--sk-toolbar-color-base) l c h / 0.25);
252
+ color: var(--sk-toolbar-color-base);
253
+
254
+ &:hover:not(:disabled)
255
+ {
256
+ background: oklch(from var(--sk-toolbar-color-base) l c h / 0.35);
257
+ }
258
+ }
259
+
260
+ &:focus-visible
261
+ {
262
+ outline: var(--sk-border-width-base) solid var(--sk-toolbar-color-base);
263
+ outline-offset: 2px;
264
+ }
265
+
266
+ &:disabled
267
+ {
268
+ opacity: 0.5;
269
+ cursor: not-allowed;
270
+ }
271
+ }
272
+
273
+ //----------------------------------------------------------------------------------------------------------------------
274
+ // Toolbar Separator
275
+ //----------------------------------------------------------------------------------------------------------------------
276
+
277
+ .sk-toolbar-separator
278
+ {
279
+ background: oklch(from var(--sk-toolbar-color-base) l c h / 0.2);
280
+
281
+ .sk-toolbar.sk-horizontal > &
282
+ {
283
+ width: 1px;
284
+ align-self: stretch;
285
+ margin: var(--sk-space-xs) var(--sk-space-xxs);
286
+ }
287
+
288
+ .sk-toolbar.sk-vertical > &
289
+ {
290
+ height: 1px;
291
+ align-self: stretch;
292
+ margin: var(--sk-space-xxs) var(--sk-space-xs);
293
+ }
294
+ }
295
+
296
+ //----------------------------------------------------------------------------------------------------------------------
@@ -0,0 +1,187 @@
1
+ //----------------------------------------------------------------------------------------------------------------------
2
+ // TreeView Component Styles
3
+ //----------------------------------------------------------------------------------------------------------------------
4
+
5
+ @use '@/styles/mixins/cut-border' as *;
6
+
7
+ $kinds: (neutral, primary, accent, info, success, warning, danger);
8
+
9
+ //----------------------------------------------------------------------------------------------------------------------
10
+ // Kind Mixin
11
+ //----------------------------------------------------------------------------------------------------------------------
12
+
13
+ @mixin tree-view-kind($kind)
14
+ {
15
+ &.sk-#{ '' + $kind }
16
+ {
17
+ --sk-tree-color-base: var(--sk-#{ $kind }-base);
18
+ --sk-tree-fg: var(--sk-#{ $kind }-text);
19
+ }
20
+ }
21
+
22
+ //----------------------------------------------------------------------------------------------------------------------
23
+ // TreeView Root
24
+ //----------------------------------------------------------------------------------------------------------------------
25
+
26
+ .sk-tree-view
27
+ {
28
+ --sk-tree-color-base: var(--sk-neutral-base);
29
+ --sk-tree-fg: var(--sk-neutral-text);
30
+ --sk-tree-indent: 1.25rem;
31
+
32
+ list-style: none;
33
+ padding: 0;
34
+ margin: 0;
35
+
36
+ @each $kind in $kinds
37
+ {
38
+ @include tree-view-kind($kind);
39
+ }
40
+ }
41
+
42
+ //----------------------------------------------------------------------------------------------------------------------
43
+ // TreeView Item
44
+ //----------------------------------------------------------------------------------------------------------------------
45
+
46
+ .sk-tree-item
47
+ {
48
+ display: flex;
49
+ align-items: center;
50
+ gap: var(--sk-space-xs);
51
+ padding: var(--sk-space-3xs) var(--sk-space-md) var(--sk-space-3xs) var(--sk-space-xs);
52
+ color: var(--sk-tree-fg);
53
+ cursor: pointer;
54
+ user-select: none;
55
+ position: relative;
56
+ font-size: var(--sk-font-size-sm);
57
+ line-height: 1.5;
58
+ outline: none;
59
+
60
+ transition:
61
+ background var(--sk-transition-duration-fast) var(--sk-transition-timing-default);
62
+
63
+ // Beveled clip-path matching sidebar items (top-left + bottom-right, 10px)
64
+ &:hover:not([data-disabled])
65
+ {
66
+ background: oklch(from var(--sk-tree-color-base) l c h / 0.1);
67
+ clip-path: polygon(
68
+ 10px 0%,
69
+ 100% 0%,
70
+ 100% calc(100% - 10px),
71
+ calc(100% - 10px) 100%,
72
+ 0% 100%,
73
+ 0% 10px
74
+ );
75
+ }
76
+
77
+ &:active:not([data-disabled])
78
+ {
79
+ background: oklch(from var(--sk-tree-color-base) l c h / 0.15);
80
+ }
81
+
82
+ &[data-selected]
83
+ {
84
+ background: oklch(from var(--sk-tree-color-base) l c h / 0.2);
85
+ clip-path: polygon(
86
+ 10px 0%,
87
+ 100% 0%,
88
+ 100% calc(100% - 10px),
89
+ calc(100% - 10px) 100%,
90
+ 0% 100%,
91
+ 0% 10px
92
+ );
93
+
94
+ // Active indicator: 2px L-shape tracing the left edge + top-left bevel
95
+ &::before
96
+ {
97
+ content: '';
98
+ position: absolute;
99
+ inset: 0;
100
+ background: var(--sk-tree-color-base);
101
+ clip-path: polygon(
102
+ 0% 100%,
103
+ 0px 10px,
104
+ 10px 0px,
105
+ 11.41px 1.41px,
106
+ 2px 10.83px,
107
+ 2px 100%
108
+ );
109
+ }
110
+ }
111
+
112
+ &[data-selected]:hover:not([data-disabled])
113
+ {
114
+ background: oklch(from var(--sk-tree-color-base) l c h / 0.25);
115
+ }
116
+
117
+ &:focus-visible
118
+ {
119
+ outline: var(--sk-border-width-base) solid var(--sk-tree-color-base);
120
+ outline-offset: -1px;
121
+ }
122
+
123
+ &[data-disabled]
124
+ {
125
+ opacity: 0.5;
126
+ cursor: not-allowed;
127
+ }
128
+ }
129
+
130
+ //----------------------------------------------------------------------------------------------------------------------
131
+ // Chevron
132
+ //----------------------------------------------------------------------------------------------------------------------
133
+
134
+ .sk-tree-item-chevron
135
+ {
136
+ display: flex;
137
+ align-items: center;
138
+ justify-content: center;
139
+ width: 1rem;
140
+ height: 1rem;
141
+ flex-shrink: 0;
142
+ color: oklch(from var(--sk-tree-fg) l c h / 0.5);
143
+ transition: transform var(--sk-transition-duration-fast) var(--sk-transition-timing-default);
144
+
145
+ &.sk-expanded
146
+ {
147
+ transform: rotate(90deg);
148
+ }
149
+ }
150
+
151
+ // Spacer for leaf nodes (keeps text aligned with branches)
152
+ .sk-tree-item-chevron-spacer
153
+ {
154
+ width: 1rem;
155
+ flex-shrink: 0;
156
+ }
157
+
158
+ //----------------------------------------------------------------------------------------------------------------------
159
+ // Slots
160
+ //----------------------------------------------------------------------------------------------------------------------
161
+
162
+ .sk-tree-item-leading
163
+ {
164
+ display: flex;
165
+ align-items: center;
166
+ flex-shrink: 0;
167
+ }
168
+
169
+ .sk-tree-item-content
170
+ {
171
+ flex: 1;
172
+ min-width: 0;
173
+ overflow: hidden;
174
+ text-overflow: ellipsis;
175
+ white-space: nowrap;
176
+ }
177
+
178
+ .sk-tree-item-trailing
179
+ {
180
+ display: flex;
181
+ align-items: center;
182
+ flex-shrink: 0;
183
+ margin-left: auto;
184
+ gap: var(--sk-space-3xs);
185
+ }
186
+
187
+ //----------------------------------------------------------------------------------------------------------------------