@allxsmith/bestax-bulma 5.48.1 → 5.49.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -3
- package/dist/bestax.css +1 -1
- package/dist/bestax.css.map +1 -1
- package/dist/esm/form/_pickerInternals/segmentMap.js +7 -7
- package/dist/esm/form/_pickerInternals/segmentMap.js.map +1 -1
- package/dist/esm/helpers/splitterLayout.js +166 -0
- package/dist/esm/helpers/splitterLayout.js.map +1 -0
- package/dist/esm/layout/Splitter.js +374 -0
- package/dist/esm/layout/Splitter.js.map +1 -0
- package/dist/extras.css +1 -1
- package/dist/extras.css.map +1 -1
- package/dist/index.cjs +533 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +1 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/types/helpers/splitterLayout.d.ts +62 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/layout/Splitter.d.ts +125 -0
- package/dist/types-cjs/helpers/splitterLayout.d.ts +62 -0
- package/dist/types-cjs/index.d.ts +1 -0
- package/dist/types-cjs/layout/Splitter.d.ts +125 -0
- package/dist/versions/bestax-no-dark-mode.css +1 -1
- package/dist/versions/bestax-no-dark-mode.css.map +1 -1
- package/dist/versions/bestax-no-helpers-prefixed.css +1 -1
- package/dist/versions/bestax-no-helpers-prefixed.css.map +1 -1
- package/dist/versions/bestax-no-helpers.css +1 -1
- package/dist/versions/bestax-no-helpers.css.map +1 -1
- package/dist/versions/bestax-prefixed.css +1 -1
- package/dist/versions/bestax-prefixed.css.map +1 -1
- package/package.json +2 -2
- package/src/scss/CLAUDE.md +1 -1
- package/src/scss/bestax.scss +1 -0
- package/src/scss/extras.scss +3 -0
- package/src/scss/layout/_index.scss +5 -0
- package/src/scss/layout/_splitter.scss +184 -0
- package/src/scss/versions/bestax-no-dark-mode.scss +1 -0
- package/src/scss/versions/bestax-no-helpers-prefixed.scss +1 -0
- package/src/scss/versions/bestax-no-helpers.scss +1 -0
- package/src/scss/versions/bestax-prefixed.scss +1 -0
package/src/scss/CLAUDE.md
CHANGED
|
@@ -9,7 +9,7 @@ of their own — Bulma provides it. A partial exists only for components that ex
|
|
|
9
9
|
|
|
10
10
|
- `bestax.scss` — main entrypoint: `@use 'bulma/sass' with ($primary: #1e6b99)` + all the extras
|
|
11
11
|
- `extras.scss` — extras-only entrypoint (builds `dist/extras.css`, for apps bringing their own Bulma)
|
|
12
|
-
- `components/`, `form/`, `elements/`, `helpers/` — one `_foo.scss` partial per extra,
|
|
12
|
+
- `components/`, `form/`, `elements/`, `layout/`, `helpers/` — one `_foo.scss` partial per extra,
|
|
13
13
|
**registered in that folder's `_index.scss`** (an unregistered partial silently ships nothing)
|
|
14
14
|
- `_variables.scss` — `$extras-*` tokens derived from Bulma's HSL channel vars (`--bulma-primary-h/s/l`)
|
|
15
15
|
- `_mixins.scss` — shared mixins: `extras-transition`, `extras-focus-outline` (a11y), `extras-sr-only`
|
package/src/scss/bestax.scss
CHANGED
package/src/scss/extras.scss
CHANGED
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
// Bestax Extras - Splitter Styles
|
|
2
|
+
// Panes side by side or one above the other, with a handle between each pair
|
|
3
|
+
// to drag. Bulma has no resizable layout.
|
|
4
|
+
//
|
|
5
|
+
// The root is a flex row or column, and each pane grows by its percentage
|
|
6
|
+
// over a zero basis, which the component sets inline, so the server and the
|
|
7
|
+
// client lay it out the same. A handle is a strip of fixed size with a line
|
|
8
|
+
// down its middle and a short grip, both borders, so forced colors keeps them.
|
|
9
|
+
|
|
10
|
+
@use "bulma/sass/utilities/initial-variables" as iv;
|
|
11
|
+
@use "bulma/sass/utilities/css-variables" as cv;
|
|
12
|
+
@use "../mixins" as *;
|
|
13
|
+
|
|
14
|
+
// The strip across the line: what a mouse grabs. It reaches 24px for a
|
|
15
|
+
// coarse pointer, WCAG 2.5.8's minimum target.
|
|
16
|
+
$splitter-handle-size: 0.75rem !default;
|
|
17
|
+
$splitter-handle-size-coarse: 1.5rem !default;
|
|
18
|
+
$splitter-line-size: 1px !default;
|
|
19
|
+
$splitter-line-color: cv.getVar("border") !default;
|
|
20
|
+
$splitter-line-active-size: 2px !default;
|
|
21
|
+
// bestax's blue: 5.7:1 on `scheme-main` in light and 3.2:1 in dark.
|
|
22
|
+
$splitter-line-active-color: cv.getVar("primary") !default;
|
|
23
|
+
$splitter-grip-length: 1.5rem !default;
|
|
24
|
+
$splitter-grip-size: 0.25rem !default;
|
|
25
|
+
$splitter-grip-color: cv.getVar("border-hover") !default;
|
|
26
|
+
$splitter-grip-radius: cv.getVar("radius-rounded") !default;
|
|
27
|
+
|
|
28
|
+
.#{iv.$class-prefix}splitter {
|
|
29
|
+
@include cv.register-vars(
|
|
30
|
+
(
|
|
31
|
+
"splitter-handle-size": #{$splitter-handle-size},
|
|
32
|
+
"splitter-handle-size-coarse": #{$splitter-handle-size-coarse},
|
|
33
|
+
"splitter-line-size": #{$splitter-line-size},
|
|
34
|
+
"splitter-line-color": #{$splitter-line-color},
|
|
35
|
+
"splitter-line-active-size": #{$splitter-line-active-size},
|
|
36
|
+
"splitter-line-active-color": #{$splitter-line-active-color},
|
|
37
|
+
"splitter-grip-length": #{$splitter-grip-length},
|
|
38
|
+
"splitter-grip-size": #{$splitter-grip-size},
|
|
39
|
+
"splitter-grip-color": #{$splitter-grip-color},
|
|
40
|
+
"splitter-grip-radius": #{$splitter-grip-radius},
|
|
41
|
+
)
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// ---- The root and the panes ----------------------------------------------------
|
|
46
|
+
|
|
47
|
+
.#{iv.$class-prefix}splitter {
|
|
48
|
+
display: flex;
|
|
49
|
+
flex-direction: row;
|
|
50
|
+
min-width: 0;
|
|
51
|
+
min-height: 0;
|
|
52
|
+
|
|
53
|
+
&.#{iv.$class-prefix}is-vertical {
|
|
54
|
+
flex-direction: column;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&:not(:last-child) {
|
|
58
|
+
margin-bottom: cv.getVar("block-spacing");
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// A pane can be narrower than its content, which scrolls rather than being
|
|
63
|
+
// cut off. For content meant to scroll, a ScrollArea in the pane gives the
|
|
64
|
+
// keyboard a way in.
|
|
65
|
+
.#{iv.$class-prefix}splitter-pane {
|
|
66
|
+
min-width: 0;
|
|
67
|
+
min-height: 0;
|
|
68
|
+
overflow: auto;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// ---- The handle ------------------------------------------------------------------
|
|
72
|
+
|
|
73
|
+
.#{iv.$class-prefix}splitter-handle {
|
|
74
|
+
position: relative;
|
|
75
|
+
flex: none;
|
|
76
|
+
display: flex;
|
|
77
|
+
align-items: center;
|
|
78
|
+
justify-content: center;
|
|
79
|
+
inline-size: cv.getVar("splitter-handle-size");
|
|
80
|
+
cursor: col-resize;
|
|
81
|
+
touch-action: none;
|
|
82
|
+
user-select: none;
|
|
83
|
+
|
|
84
|
+
// The line, down the middle of the strip.
|
|
85
|
+
&::before {
|
|
86
|
+
content: "";
|
|
87
|
+
position: absolute;
|
|
88
|
+
inset-block: 0;
|
|
89
|
+
inset-inline-start: 50%;
|
|
90
|
+
border-inline-start: cv.getVar("splitter-line-size") solid cv.getVar("splitter-line-color");
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// The grip: a short bar across the middle of the line.
|
|
94
|
+
&::after {
|
|
95
|
+
content: "";
|
|
96
|
+
position: relative;
|
|
97
|
+
block-size: cv.getVar("splitter-grip-length");
|
|
98
|
+
inline-size: 0;
|
|
99
|
+
border-inline: calc(#{cv.getVar("splitter-grip-size")} / 2) solid cv.getVar("splitter-grip-color");
|
|
100
|
+
border-radius: cv.getVar("splitter-grip-radius");
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
&:hover::before,
|
|
104
|
+
&:focus-visible::before,
|
|
105
|
+
&.#{iv.$class-prefix}is-active::before {
|
|
106
|
+
border-inline-start-width: cv.getVar("splitter-line-active-size");
|
|
107
|
+
border-inline-start-color: cv.getVar("splitter-line-active-color");
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
&:hover::after,
|
|
111
|
+
&:focus-visible::after,
|
|
112
|
+
&.#{iv.$class-prefix}is-active::after {
|
|
113
|
+
border-color: cv.getVar("splitter-line-active-color");
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&:focus {
|
|
117
|
+
outline: none;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&:focus-visible {
|
|
121
|
+
@include extras-focus-outline;
|
|
122
|
+
outline-offset: -2px;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// Stacked panes: the handle lies across, and the line and grip turn with it.
|
|
127
|
+
.#{iv.$class-prefix}splitter.#{iv.$class-prefix}is-vertical > .#{iv.$class-prefix}splitter-handle {
|
|
128
|
+
inline-size: auto;
|
|
129
|
+
block-size: cv.getVar("splitter-handle-size");
|
|
130
|
+
cursor: row-resize;
|
|
131
|
+
|
|
132
|
+
&::before {
|
|
133
|
+
inset-block: auto;
|
|
134
|
+
inset-inline: 0;
|
|
135
|
+
inset-block-start: 50%;
|
|
136
|
+
border-inline-start: 0;
|
|
137
|
+
border-block-start: cv.getVar("splitter-line-size") solid cv.getVar("splitter-line-color");
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
&::after {
|
|
141
|
+
block-size: 0;
|
|
142
|
+
inline-size: cv.getVar("splitter-grip-length");
|
|
143
|
+
border-inline: 0;
|
|
144
|
+
border-block: calc(#{cv.getVar("splitter-grip-size")} / 2) solid cv.getVar("splitter-grip-color");
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
&:hover::before,
|
|
148
|
+
&:focus-visible::before,
|
|
149
|
+
&.#{iv.$class-prefix}is-active::before {
|
|
150
|
+
border-block-start-width: cv.getVar("splitter-line-active-size");
|
|
151
|
+
border-block-start-color: cv.getVar("splitter-line-active-color");
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// ---- Media ---------------------------------------------------------------------
|
|
156
|
+
|
|
157
|
+
// A finger needs a wider strip than a mouse.
|
|
158
|
+
@media (pointer: coarse) {
|
|
159
|
+
.#{iv.$class-prefix}splitter-handle {
|
|
160
|
+
inline-size: cv.getVar("splitter-handle-size-coarse");
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.#{iv.$class-prefix}splitter.#{iv.$class-prefix}is-vertical > .#{iv.$class-prefix}splitter-handle {
|
|
164
|
+
inline-size: auto;
|
|
165
|
+
block-size: cv.getVar("splitter-handle-size-coarse");
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// The line and grip are borders, which forced colors keeps; the active one
|
|
170
|
+
// takes the system's highlight.
|
|
171
|
+
@media (forced-colors: active) {
|
|
172
|
+
.#{iv.$class-prefix}splitter-handle:hover::before,
|
|
173
|
+
.#{iv.$class-prefix}splitter-handle:focus-visible::before,
|
|
174
|
+
.#{iv.$class-prefix}splitter-handle.#{iv.$class-prefix}is-active::before,
|
|
175
|
+
.#{iv.$class-prefix}splitter-handle:hover::after,
|
|
176
|
+
.#{iv.$class-prefix}splitter-handle:focus-visible::after,
|
|
177
|
+
.#{iv.$class-prefix}splitter-handle.#{iv.$class-prefix}is-active::after {
|
|
178
|
+
border-color: Highlight;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.#{iv.$class-prefix}splitter-handle:focus-visible {
|
|
182
|
+
outline-color: CanvasText;
|
|
183
|
+
}
|
|
184
|
+
}
|