@brickclay-org/ui 0.1.85 → 0.1.87
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 +895 -649
- package/fesm2022/brickclay-org-ui.mjs.map +1 -1
- package/index.d.ts +327 -156
- package/package.json +1 -6
- package/src/assets/icons/double-chevron-left.svg +4 -0
- package/src/assets/icons/double-chevron-right.svg +4 -0
- package/src/lib/hierarchical-select/hierarchical-select.css +34 -19
- package/src/lib/input/input.css +19 -4
- package/src/lib/popover/popover.css +18 -4
- package/src/lib/select/select.css +27 -3
- package/src/lib/toastr/toastr.css +14 -29
- package/src/styles.css +13 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brickclay-org/ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.87",
|
|
4
4
|
"schematics": "./schematics/collection.json",
|
|
5
5
|
"ng-add": {
|
|
6
6
|
"save": "dependencies"
|
|
@@ -12,11 +12,6 @@
|
|
|
12
12
|
"moment": "^2.29.0",
|
|
13
13
|
"ngx-mask": "^20.0.3"
|
|
14
14
|
},
|
|
15
|
-
"peerDependenciesMeta": {
|
|
16
|
-
"@angular/cdk": {
|
|
17
|
-
"optional": true
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
15
|
"dependencies": {
|
|
21
16
|
"tslib": "^2.3.0"
|
|
22
17
|
},
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M16 5L11 10L16 15" stroke="#6B7080" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
<path d="M8 5L3 10L8 15" stroke="#6B7080" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M4 15L9 10L4 5" stroke="#6B7080" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
<path d="M12 15L17 10L12 5" stroke="#6B7080" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
</svg>
|
|
@@ -72,23 +72,24 @@
|
|
|
72
72
|
@apply rotate-180;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
+
/*
|
|
76
|
+
* Positioning (top/left, width, flip above/below) is now owned entirely by CDK's connected
|
|
77
|
+
* overlay strategy in hierarchical-select.html — this panel is portalled into .cdk-overlay-pane,
|
|
78
|
+
* not laid out inline next to the control anymore. `position: static` (plus left-auto) reflects
|
|
79
|
+
* that: the panel no longer self-positions, so it must not compete with the pane's own placement.
|
|
80
|
+
* The old `[data-position]` top/bottom rules are gone for the same reason — `position: static`
|
|
81
|
+
* makes top/bottom inert either way, but stating that directly beats relying on it implicitly.
|
|
82
|
+
*
|
|
83
|
+
* Declared explicitly rather than just omitted: CSS cascades per-property, and a consumer with a
|
|
84
|
+
* stale cached copy of this package (or their own pre-CDK fork of this class name) could still
|
|
85
|
+
* have `position: absolute` on `.hierarchical-dropdown-panel` loaded globally elsewhere — if this
|
|
86
|
+
* rule simply stopped mentioning `position` instead of stating `static`, that stale declaration
|
|
87
|
+
* would be the only one left, and it would win by default. This exact mechanism broke
|
|
88
|
+
* `bk-input`'s phone-country dropdown in a downstream consumer before this component and
|
|
89
|
+
* `bk-select` were fixed here too.
|
|
90
|
+
*/
|
|
75
91
|
.hierarchical-dropdown-panel {
|
|
76
|
-
@apply
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/* Inset dropdown: anchor to .hierarchical-select-field (trigger), not the outer container + label. */
|
|
80
|
-
.hierarchical-dropdown-panel[data-position='bottom'] {
|
|
81
|
-
top: calc(100% + 4px);
|
|
82
|
-
bottom: auto;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.hierarchical-dropdown-panel[data-position='top'] {
|
|
86
|
-
bottom: calc(100% + 4px);
|
|
87
|
-
top: auto;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.hierarchical-dropdown-panel-fixed {
|
|
91
|
-
z-index: 10050;
|
|
92
|
+
@apply static left-auto w-full min-w-[250px] max-w-full bg-white border border-[#E3E3E7] rounded-xl shadow-lg overflow-hidden cursor-default p-2.5;
|
|
92
93
|
}
|
|
93
94
|
|
|
94
95
|
.hierarchical-search {
|
|
@@ -141,11 +142,25 @@
|
|
|
141
142
|
}
|
|
142
143
|
}
|
|
143
144
|
|
|
144
|
-
|
|
145
|
-
|
|
145
|
+
/* Hover/marked is a touch darker than the selected fill so the two states
|
|
146
|
+
don't look identical. */
|
|
147
|
+
.hierarchical-option:hover,
|
|
148
|
+
.hierarchical-option.marked {
|
|
149
|
+
@apply bg-[#F1F1F3];
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.hierarchical-option.marked.disabled-item {
|
|
153
|
+
@apply bg-transparent;
|
|
146
154
|
}
|
|
147
155
|
.hierarchical-option.selected {
|
|
148
|
-
@apply bg-[#
|
|
156
|
+
@apply bg-[#F8F8F8];
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* A selected row still reacts to hover/keyboard-mark for feedback, while
|
|
160
|
+
staying clearly selected. */
|
|
161
|
+
.hierarchical-option.selected:hover,
|
|
162
|
+
.hierarchical-option.selected.marked {
|
|
163
|
+
@apply bg-[#F1F1F3];
|
|
149
164
|
}
|
|
150
165
|
|
|
151
166
|
.hierarchical-option.selected.disabled-item {
|
package/src/lib/input/input.css
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
height: 40px;
|
|
24
24
|
box-sizing: border-box;
|
|
25
25
|
box-shadow: 0 1px 2px 0 rgba(16, 24, 40, 0.05);
|
|
26
|
-
|
|
26
|
+
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
/* Default/Initial State */
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
|
|
59
59
|
/* Phone Input Field - Add padding-left for selector space */
|
|
60
60
|
.input-field--phone {
|
|
61
|
-
@apply pl-[80px];
|
|
61
|
+
@apply !pl-[80px];
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
/* URL Input Field - Add padding-left for prefix space */
|
|
@@ -141,8 +141,23 @@
|
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
/* Phone Dropdown Menu */
|
|
144
|
+
/*
|
|
145
|
+
* Positioning (top/left, flip above/below) is now owned entirely by CDK's connected overlay
|
|
146
|
+
* strategy in input.html — this panel is portalled into .cdk-overlay-pane, not laid out inline
|
|
147
|
+
* next to the trigger anymore. `absolute`/`top-full`/`mt-1` here would take it out of the pane's
|
|
148
|
+
* normal flow, making CDK always measure a 0-height pane (nothing left in-flow to size against)
|
|
149
|
+
* and silently bypassing its fit/flip logic entirely — this rule is visual styling only now.
|
|
150
|
+
*
|
|
151
|
+
* `position: static` is declared explicitly rather than just omitted: CSS cascades per-property,
|
|
152
|
+
* and a consumer with a stale cached copy of this package (or their own pre-CDK fork of this
|
|
153
|
+
* class name) could still have `position: absolute; top-full; mt-1` on `.input-phone-dropdown`
|
|
154
|
+
* loaded globally elsewhere — if this rule simply stopped mentioning `position` instead of
|
|
155
|
+
* stating `static`, that stale declaration would be the only one left, and it would win by
|
|
156
|
+
* default. This exact mechanism broke this dropdown in a downstream consumer before it was
|
|
157
|
+
* fixed here at the source.
|
|
158
|
+
*/
|
|
144
159
|
.input-phone-dropdown {
|
|
145
|
-
@apply
|
|
160
|
+
@apply static left-auto top-auto mt-0 w-[80px] bg-white border border-[#E3E3E7] rounded-[4px] shadow-lg max-h-48 overflow-y-auto;
|
|
146
161
|
}
|
|
147
162
|
|
|
148
163
|
.input-phone-dropdown-item {
|
|
@@ -394,4 +409,4 @@
|
|
|
394
409
|
|
|
395
410
|
.input-container--sm .input-phone-selector-arrow {
|
|
396
411
|
@apply w-3 h-3;
|
|
397
|
-
}
|
|
412
|
+
}
|
|
@@ -9,11 +9,25 @@
|
|
|
9
9
|
@apply inline-flex;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
/*
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
/*
|
|
13
|
+
* ---- Panel ----
|
|
14
|
+
* No overflow:hidden here — the arrow deliberately hangs outside the box. Put
|
|
15
|
+
* any scrolling on the content you project instead.
|
|
16
|
+
*
|
|
17
|
+
* Positioning (top/left, flip above/below/left/right) is now owned entirely by CDK's connected
|
|
18
|
+
* overlay strategy in popover.html — this panel is portalled into .cdk-overlay-pane, not laid
|
|
19
|
+
* out inline next to the trigger anymore. `position: static` reflects that: the panel no longer
|
|
20
|
+
* self-positions, so it must not compete with the pane's own placement.
|
|
21
|
+
*
|
|
22
|
+
* Declared explicitly rather than just omitted: CSS cascades per-property, and a consumer with a
|
|
23
|
+
* stale cached copy of this package (or their own pre-CDK fork of this class name) could still
|
|
24
|
+
* have `position: fixed` on `.bk-popover-panel` loaded globally elsewhere — if this rule simply
|
|
25
|
+
* stopped mentioning `position` instead of stating `static`, that stale declaration would be the
|
|
26
|
+
* only one left, and it would win by default. This exact mechanism broke `bk-input`'s
|
|
27
|
+
* phone-country dropdown in a downstream consumer before it was fixed at the source.
|
|
28
|
+
*/
|
|
15
29
|
.bk-popover-panel {
|
|
16
|
-
@apply
|
|
30
|
+
@apply static z-[10000] bg-white border border-[#E3E3E7] rounded-lg p-3 cursor-default;
|
|
17
31
|
box-shadow: 0 12px 24px -6px rgba(16, 24, 40, 0.12), 0 4px 8px -4px rgba(16, 24, 40, 0.06);
|
|
18
32
|
|
|
19
33
|
/* Hidden for the first frame, which exists only so the panel can be measured
|
|
@@ -165,9 +165,23 @@
|
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
/*
|
|
168
|
+
/*
|
|
169
|
+
* Dropdown
|
|
170
|
+
*
|
|
171
|
+
* Positioning (top/left, width, flip above/below) is now owned entirely by CDK's connected
|
|
172
|
+
* overlay strategy in select.html — this panel is portalled into .cdk-overlay-pane, not laid
|
|
173
|
+
* out inline next to the control anymore. `position: static` (plus left-auto) reflects that: the
|
|
174
|
+
* panel no longer self-positions, so it must not compete with the pane's own placement.
|
|
175
|
+
*
|
|
176
|
+
* Declared explicitly rather than just omitted: CSS cascades per-property, and a consumer with a
|
|
177
|
+
* stale cached copy of this package (or their own pre-CDK fork of this class name) could still
|
|
178
|
+
* have `position: absolute` on `.bk-dropdown-panel` loaded globally elsewhere — if this rule
|
|
179
|
+
* simply stopped mentioning `position` instead of stating `static`, that stale declaration would
|
|
180
|
+
* be the only one left, and it would win by default. This exact mechanism broke `bk-input`'s
|
|
181
|
+
* phone-country dropdown in a downstream consumer before this component itself was fixed here.
|
|
182
|
+
*/
|
|
169
183
|
.bk-dropdown-panel {
|
|
170
|
-
@apply
|
|
184
|
+
@apply static left-auto w-full bg-white border border-[#E3E3E7] rounded-xl shadow-lg overflow-hidden cursor-default p-2.5;
|
|
171
185
|
}
|
|
172
186
|
|
|
173
187
|
/* Opt-in grid dropdown. List-mode selectors above and below remain unchanged. */
|
|
@@ -350,15 +364,25 @@
|
|
|
350
364
|
.bk-option {
|
|
351
365
|
@apply flex items-center p-2.5 cursor-pointer transition-colors font-normal text-sm text-[#141414] min-w-0;
|
|
352
366
|
|
|
367
|
+
/* Hover/marked is a touch darker than the selected fill so the two states
|
|
368
|
+
no longer look identical. */
|
|
353
369
|
&:hover,
|
|
354
370
|
&.bk-marked {
|
|
355
|
-
@apply bg-[#
|
|
371
|
+
@apply bg-[#F1F1F3] rounded-md;
|
|
356
372
|
}
|
|
357
373
|
|
|
358
374
|
&.bk-selected {
|
|
359
375
|
@apply bg-[#F8F8F8] rounded-md;
|
|
360
376
|
}
|
|
361
377
|
|
|
378
|
+
/* A selected row still reacts to hover (it stays clickable — e.g. to
|
|
379
|
+
de-select), so give it the same hover fill instead of letting the
|
|
380
|
+
selected background suppress the hover feedback. */
|
|
381
|
+
&.bk-selected:hover,
|
|
382
|
+
&.bk-selected.bk-marked {
|
|
383
|
+
@apply bg-[#F1F1F3];
|
|
384
|
+
}
|
|
385
|
+
|
|
362
386
|
&.bk-option-disabled {
|
|
363
387
|
@apply opacity-50 cursor-not-allowed;
|
|
364
388
|
|
|
@@ -3,36 +3,21 @@
|
|
|
3
3
|
═══════════════════════════════════════════════════════════════════════════ */
|
|
4
4
|
|
|
5
5
|
/* ─── Container ───────────────────────────────────────────────────────────── */
|
|
6
|
+
/*
|
|
7
|
+
* Positioning (fixed + top/left/right/bottom/centering per corner) is owned entirely by CDK's
|
|
8
|
+
* GlobalPositionStrategy now (see toastr.service.ts) — it sets those as inline styles on the
|
|
9
|
+
* `.cdk-global-overlay-wrapper` it creates around this component, from its own prebuilt CSS.
|
|
10
|
+
* This class only lays out the toast stack *within* that wrapper.
|
|
11
|
+
*/
|
|
6
12
|
.toast-container {
|
|
7
|
-
@apply
|
|
8
|
-
/* Make sure nothing in the app sits above the toast + allow only toast items to capture clicks */
|
|
9
|
-
z-index: 2147483647 !important;
|
|
13
|
+
@apply flex flex-col gap-3 max-w-[calc(100vw-2rem)];
|
|
10
14
|
pointer-events: none;
|
|
11
15
|
}
|
|
12
16
|
|
|
13
|
-
/*
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
.toast-container[data-position="top-left"] {
|
|
19
|
-
@apply top-4 left-4;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.toast-container[data-position="top-center"] {
|
|
23
|
-
@apply top-4 left-1/2 -translate-x-1/2;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.toast-container[data-position="bottom-right"] {
|
|
27
|
-
@apply bottom-4 right-4;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.toast-container[data-position="bottom-left"] {
|
|
31
|
-
@apply bottom-4 left-4;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.toast-container[data-position="bottom-center"] {
|
|
35
|
-
@apply bottom-4 left-1/2 -translate-x-1/2;
|
|
17
|
+
/* Guarantee toasts stack above dialogs/popovers/etc. that also use CDK overlays — CDK's own
|
|
18
|
+
z-index otherwise just reflects creation order. Targets the pane CDK wraps this panel in. */
|
|
19
|
+
.cdk-overlay-pane.bk-toastr-panel {
|
|
20
|
+
z-index: 2147483647 !important;
|
|
36
21
|
}
|
|
37
22
|
|
|
38
23
|
/* ─── Toast item (base) ───────────────────────────────────────────────────── */
|
|
@@ -208,11 +193,11 @@
|
|
|
208
193
|
max-width: 100%;
|
|
209
194
|
}
|
|
210
195
|
|
|
196
|
+
/* Center positions hug their own content width and float centered rather than stretching
|
|
197
|
+
full-bleed like the corner positions — CDK only owns the container's outer placement,
|
|
198
|
+
this inner alignment is still ours to keep. */
|
|
211
199
|
.toast-container[data-position="top-center"],
|
|
212
200
|
.toast-container[data-position="bottom-center"] {
|
|
213
|
-
left: 50% !important;
|
|
214
|
-
right: auto !important;
|
|
215
|
-
transform: translateX(-50%) !important;
|
|
216
201
|
align-items: center;
|
|
217
202
|
}
|
|
218
203
|
|
package/src/styles.css
CHANGED
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
/* Brickclay Component Styles - Tailwind source files */
|
|
2
|
+
/*
|
|
3
|
+
* CDK Overlay's own base positioning CSS (.cdk-overlay-container/.cdk-overlay-pane/
|
|
4
|
+
* .cdk-overlay-backdrop position: fixed/absolute rules). bk-dialog and every CDK-Overlay-based
|
|
5
|
+
* control (bk-select, bk-input's phone dropdown, bk-hierarchical-select, ...) rely on it —
|
|
6
|
+
* without it, the position strategy sets top/left via JS on elements that have no positioning
|
|
7
|
+
* base rule, so nothing actually moves. Bundled here (not left for each consumer to add to their
|
|
8
|
+
* own angular.json) so it ships automatically with the package: any app already importing this
|
|
9
|
+
* file gets it for free. A bare specifier (not a relative path) is deliberate — this file is
|
|
10
|
+
* consumed from two different depths (this workspace's own `projects/brickclay-lib/src/`, and,
|
|
11
|
+
* once published, `<consumer>/node_modules/@brickclay-org/ui/src/`), and only Node-style
|
|
12
|
+
* resolution (walk up until `node_modules/@angular/cdk` is found) works correctly from both.
|
|
13
|
+
*/
|
|
14
|
+
@import '@angular/cdk/overlay-prebuilt.css';
|
|
2
15
|
@import './lib/breadcrumb/breadcrumb.css';
|
|
3
16
|
@import './lib/toggle/toggle.css';
|
|
4
17
|
@import './lib/checkbox/checkbox.css';
|