@brickclay-org/ui 0.1.93 → 0.1.94
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/fesm2022/brickclay-org-ui.mjs +396 -205
- package/fesm2022/brickclay-org-ui.mjs.map +1 -1
- package/index.d.ts +474 -256
- package/package.json +1 -1
- package/src/assets/images/icons/global/popup-cross-white.svg +11 -0
- package/src/assets/images/icons/global/popup-cross.svg +4 -0
- package/src/lib/kanban/component/kanban/kanban.css +72 -18
package/package.json
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clip-path="url(#clip0_256_95)">
|
|
3
|
+
<path d="M10.9997 10.9301C10.8123 11.1163 10.5589 11.2209 10.2947 11.2209C10.0305 11.2209 9.77707 11.1163 9.5897 10.9301L1.0497 2.49009C0.955976 2.39713 0.881582 2.28653 0.830813 2.16467C0.780044 2.04281 0.753906 1.9121 0.753906 1.78009C0.753906 1.64808 0.780044 1.51737 0.830813 1.39551C0.881582 1.27365 0.955976 1.16305 1.0497 1.07009C1.23707 0.883839 1.49052 0.779297 1.7547 0.779297C2.01889 0.779297 2.27234 0.883839 2.4597 1.07009L10.9997 9.51009C11.0934 9.60305 11.1678 9.71365 11.2186 9.83551C11.2694 9.95737 11.2955 10.0881 11.2955 10.2201C11.2955 10.3521 11.2694 10.4828 11.2186 10.6047C11.1678 10.7265 11.0934 10.8371 10.9997 10.9301Z" fill="white"/>
|
|
4
|
+
<path d="M2.45845 11.0007C2.2675 11.1943 2.00745 11.3041 1.73553 11.306C1.4636 11.3078 1.20206 11.2016 1.00845 11.0107C0.814846 10.8197 0.705025 10.5597 0.703149 10.2877C0.701274 10.0158 0.807498 9.75425 0.998454 9.56064L9.53845 1.00064C9.72941 0.807034 9.98945 0.697212 10.2614 0.695337C10.5333 0.693461 10.7948 0.799686 10.9885 0.990641C11.1821 1.1816 11.2919 1.44164 11.2938 1.71357C11.2956 1.9855 11.1894 2.24704 10.9985 2.44064L2.45845 11.0007Z" fill="white"/>
|
|
5
|
+
</g>
|
|
6
|
+
<defs>
|
|
7
|
+
<clipPath id="clip0_256_95">
|
|
8
|
+
<rect width="12" height="12" fill="white"/>
|
|
9
|
+
</clipPath>
|
|
10
|
+
</defs>
|
|
11
|
+
</svg>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M10.9997 10.9301C10.8123 11.1163 10.5589 11.2209 10.2947 11.2209C10.0305 11.2209 9.77707 11.1163 9.5897 10.9301L1.0497 2.49009C0.955976 2.39713 0.881582 2.28653 0.830813 2.16467C0.780044 2.04281 0.753906 1.9121 0.753906 1.78009C0.753906 1.64808 0.780044 1.51737 0.830813 1.39551C0.881582 1.27365 0.955976 1.16305 1.0497 1.07009C1.23707 0.883839 1.49052 0.779297 1.7547 0.779297C2.01889 0.779297 2.27234 0.883839 2.4597 1.07009L10.9997 9.51009C11.0934 9.60305 11.1678 9.71365 11.2186 9.83551C11.2694 9.95737 11.2955 10.0881 11.2955 10.2201C11.2955 10.3521 11.2694 10.4828 11.2186 10.6047C11.1678 10.7265 11.0934 10.8371 10.9997 10.9301Z" fill="#A1A5B7"/>
|
|
3
|
+
<path d="M2.45845 11.0002C2.2675 11.1938 2.00745 11.3036 1.73553 11.3055C1.4636 11.3073 1.20206 11.2011 1.00845 11.0102C0.814846 10.8192 0.705025 10.5592 0.703149 10.2872C0.701274 10.0153 0.807498 9.75376 0.998454 9.56015L9.53845 1.00015C9.72941 0.806546 9.98945 0.696724 10.2614 0.694849C10.5333 0.692973 10.7948 0.799198 10.9885 0.990153C11.1821 1.18111 11.2919 1.44115 11.2938 1.71308C11.2956 1.98501 11.1894 2.24655 10.9985 2.44015L2.45845 11.0002Z" fill="#A1A5B7"/>
|
|
4
|
+
</svg>
|
|
@@ -39,8 +39,18 @@
|
|
|
39
39
|
scrolling, or where its scrollbar sits — `.bk-kanban` fills
|
|
40
40
|
`.bk-kanban-board`'s content box (`w-full h-full`, below), correctly
|
|
41
41
|
inset by whatever padding/border `boardClass` added, and scrolls entirely
|
|
42
|
-
on its own from there.
|
|
43
|
-
|
|
42
|
+
on its own from there.
|
|
43
|
+
|
|
44
|
+
`:where(...)` here (and on `.bk-kanban-column`/`.bk-kanban-column-header`
|
|
45
|
+
below) drops this rule's specificity to zero — Angular injects this
|
|
46
|
+
component's own stylesheet *after* the app's global Tailwind bundle, so
|
|
47
|
+
without it a same-specificity utility class passed through `boardClass`
|
|
48
|
+
would lose to whatever's declared here regardless of source order (a
|
|
49
|
+
plain class selector always beats a zero-specificity one, load order
|
|
50
|
+
doesn't matter). Wrapping the *base* rule instead of fighting that with
|
|
51
|
+
`!important` means any class `boardClass` supplies just wins outright,
|
|
52
|
+
no per-property workaround needed. */
|
|
53
|
+
:where(.bk-kanban-board) {
|
|
44
54
|
display: block;
|
|
45
55
|
height: 100%;
|
|
46
56
|
}
|
|
@@ -99,31 +109,35 @@
|
|
|
99
109
|
/* ---------- Column ---------- */
|
|
100
110
|
|
|
101
111
|
/*
|
|
102
|
-
`
|
|
103
|
-
`bg-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
`--bk-kanban-column-bg`
|
|
108
|
-
|
|
112
|
+
`:where(...)` — see `.bk-kanban-board`'s own comment above for why. A
|
|
113
|
+
plain `columnClass="bg-red-500"` (or `border-2 border-red-500`,
|
|
114
|
+
`rounded-none`, anything this rule also declares) now reliably wins, the
|
|
115
|
+
same as it always did for properties this rule *doesn't* touch.
|
|
116
|
+
|
|
117
|
+
`background` still reads `--bk-kanban-column-bg` with a fallback rather
|
|
118
|
+
than a hardcoded `#f9fafa` — that's not the specificity workaround it used
|
|
119
|
+
to be (the `:where()` above already solves that for a plain `bg-*` utility
|
|
120
|
+
too), just a convenient second way in: set the custom property directly
|
|
121
|
+
(inline style, a global CSS rule, whatever) without needing to know this
|
|
122
|
+
component's exact Tailwind class name.
|
|
109
123
|
*/
|
|
110
|
-
.bk-kanban-column {
|
|
124
|
+
:where(.bk-kanban-column) {
|
|
111
125
|
@apply flex flex-col shrink-0 w-[300px] max-w-[85vw] rounded-xl border border-[#EBEDF3] overflow-hidden;
|
|
112
126
|
background: var(--bk-kanban-column-bg, #f9fafa);
|
|
113
127
|
scroll-snap-align: start;
|
|
114
128
|
}
|
|
115
129
|
|
|
116
|
-
/* Same custom-property
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
`panelClass`. */
|
|
120
|
-
.bk-kanban-column-header {
|
|
130
|
+
/* Same `:where()` + custom-property-as-convenience reasoning as
|
|
131
|
+
`.bk-kanban-column` above, so `columns[].colHeaderClass` reliably wins on
|
|
132
|
+
any property here — background included, same trick `bk-dialog` uses for
|
|
133
|
+
`--bk-dialog-panel-bg` via `panelClass`. */
|
|
134
|
+
:where(.bk-kanban-column-header) {
|
|
121
135
|
@apply flex items-center justify-between gap-2 px-3 py-2.5;
|
|
122
136
|
background: var(--bk-kanban-header-bg, #f9fafa);
|
|
123
137
|
border-bottom: 1px solid #ebedf3;
|
|
124
138
|
}
|
|
125
139
|
|
|
126
|
-
/* `
|
|
140
|
+
/* `dragColumn` makes this the drag handle (see kanban.html) — cursor
|
|
127
141
|
feedback only shows up once dragging is actually possible, and switches to
|
|
128
142
|
`grabbing` mid-drag the same way `.bk-kanban-card` does for cards. CDK adds
|
|
129
143
|
`cdk-drag-disabled` to the `cdkDrag` host itself (`.bk-kanban-column`), not
|
|
@@ -170,16 +184,56 @@
|
|
|
170
184
|
@apply text-xs font-medium text-[#78829D];
|
|
171
185
|
}
|
|
172
186
|
|
|
187
|
+
/* ---------- Header add button (showAddItem) ----------
|
|
188
|
+
|
|
189
|
+
`bk-button` (`variant="primary"`, `size="xxsm"`) supplies its own bg/
|
|
190
|
+
border/rounded/active/disabled chrome as-is — `buttonClass` (kanban.html)
|
|
191
|
+
only ever covers the two things `bk-button` itself doesn't: a fixed
|
|
192
|
+
square size (`size-6`, in place of the size's own text-button padding)
|
|
193
|
+
and a hover state (`.btn-primary` in `ui-button.css` defines
|
|
194
|
+
`active:`/`focus-visible:` but no `hover:` of its own — this is the
|
|
195
|
+
per-instance override that input exists for, not a reason to touch the
|
|
196
|
+
shared component). The remove button below takes a different approach
|
|
197
|
+
(`bk-icon-button` + a hover-driven icon swap) — the two aren't meant to
|
|
198
|
+
match, this one just didn't need it. This class only ever places the
|
|
199
|
+
button: sits in the same header row as the title/count/actions-template
|
|
200
|
+
slot, and `justify-between` on `.bk-kanban-column-header` already spreads
|
|
201
|
+
everything in that row apart, so `shrink-0` is the only thing this needs,
|
|
202
|
+
same reasoning as `.bk-kanban-column-actions` just above. */
|
|
203
|
+
|
|
204
|
+
.bk-kanban-add-btn {
|
|
205
|
+
@apply shrink-0;
|
|
206
|
+
}
|
|
207
|
+
|
|
173
208
|
/* ---------- Card ---------- */
|
|
174
209
|
|
|
175
210
|
.bk-kanban-card {
|
|
176
|
-
@apply bg-white rounded-lg border border-[#EBEDF3] p-3 cursor-pointer;
|
|
211
|
+
@apply relative bg-white rounded-lg border border-[#EBEDF3] p-3 cursor-pointer;
|
|
177
212
|
box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
|
|
178
213
|
transition:
|
|
179
214
|
box-shadow 150ms ease,
|
|
180
215
|
border-color 150ms ease;
|
|
181
216
|
}
|
|
182
217
|
|
|
218
|
+
/* ---------- Card remove button (showRemoveItem) ----------
|
|
219
|
+
|
|
220
|
+
Absolutely positioned over the card's own top-right corner rather than
|
|
221
|
+
flowed into `cardTemplate`'s content — it's board-owned chrome, present
|
|
222
|
+
regardless of what a consumer's own card body renders, so click/drag
|
|
223
|
+
isolation (stopped in the template before either reaches this button's
|
|
224
|
+
ancestors — see kanban.ts's onRemoveButtonClick doc comment) is
|
|
225
|
+
guaranteed by the board itself rather than left to every consumer to get
|
|
226
|
+
right. `.bk-kanban-card` picked up `relative` above specifically so this
|
|
227
|
+
has something to position against. `bk-icon-button` here, not `bk-button`
|
|
228
|
+
— `removeButtonVariant()`/`removeButtonIcon()` in kanban.ts swap `variant`
|
|
229
|
+
and the icon asset itself on `(hovered)`, mirroring `AddFleet`'s own close
|
|
230
|
+
button exactly (down to reusing its `popup-cross`/`popup-cross-white`
|
|
231
|
+
icon pair) — `bk-icon-button` has no real `:hover` of its own either, only
|
|
232
|
+
`active:`. This class only ever places it. */
|
|
233
|
+
.bk-kanban-remove-btn {
|
|
234
|
+
@apply absolute top-1.5 right-1.5 z-10;
|
|
235
|
+
}
|
|
236
|
+
|
|
183
237
|
.bk-kanban-card:hover {
|
|
184
238
|
@apply border-[#C4CADA];
|
|
185
239
|
box-shadow: 0 2px 6px rgba(16, 24, 40, 0.08);
|
|
@@ -249,7 +303,7 @@
|
|
|
249
303
|
transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
|
|
250
304
|
}
|
|
251
305
|
|
|
252
|
-
/* Same treatment one level up, for `
|
|
306
|
+
/* Same treatment one level up, for `dragColumn` — a column being
|
|
253
307
|
dragged gets the heavier shadow a whole column's worth of chrome warrants
|
|
254
308
|
(cards use a lighter one, being the smaller unit), and its placeholder
|
|
255
309
|
reuses the exact dashed-border look `.bk-kanban-card`'s placeholder uses,
|