@brickclay-org/ui 0.1.84 → 0.1.86

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brickclay-org/ui",
3
- "version": "0.1.84",
3
+ "version": "0.1.86",
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,3 @@
1
+ <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M9.3231 9.64369V12.858C10.4542 12.7564 10.9302 12.1229 10.9302 11.2862C10.9302 10.4804 10.56 10.0037 9.3231 9.64369ZM8.35882 8.03655V5.14369C7.30678 5.27709 6.75167 5.89262 6.75167 6.56762C6.75167 7.24262 7.1901 7.73987 8.35882 8.03655ZM9.27167 8.27344L9.61625 8.36248C11.5037 8.81537 12.5374 9.61702 12.5374 11.1981C12.5374 13.0168 11.1019 14.0486 9.27167 14.1823V15.4294H8.46071V14.1823C6.63757 14.0412 5.195 12.9798 5.14453 11.1981H6.63017C6.75939 12.0666 7.30517 12.705 8.46071 12.831V9.59516L8.16628 9.52091C6.34314 9.0828 5.35989 8.23648 5.35989 6.72962C5.35989 5.06687 6.65203 3.96823 8.46071 3.82712V2.57227H9.27167V3.8268C11.0659 3.9753 12.3651 5.08873 12.4226 6.77398H10.9296C10.8364 5.83862 10.1903 5.29669 9.27167 5.17777V8.27344Z" fill="#6D7793"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M8.61453 15.375V13.8495C7.97103 13.7665 7.41828 13.5438 6.95628 13.1813C6.49428 12.8188 6.15078 12.3173 5.92578 11.6768L6.62103 11.3737C6.83753 11.9352 7.13503 12.3678 7.51353 12.6713C7.89203 12.9748 8.40503 13.126 9.05253 13.125C9.62253 13.125 10.1435 12.983 10.6155 12.699C11.0875 12.415 11.3233 11.957 11.3228 11.325C11.3228 10.7915 11.1493 10.363 10.8023 10.0395C10.4548 9.716 9.80528 9.40125 8.85378 9.09525C7.88428 8.78675 7.20203 8.43425 6.80703 8.03775C6.41203 7.64075 6.21453 7.124 6.21453 6.4875C6.21453 5.7905 6.48178 5.23375 7.01628 4.81725C7.55078 4.40125 8.08328 4.17625 8.61378 4.14225V2.625H9.36378V4.14225C9.88328 4.19425 10.3293 4.33825 10.7018 4.57425C11.0743 4.81025 11.3833 5.146 11.6288 5.5815L10.962 5.922C10.7835 5.599 10.5375 5.3375 10.224 5.1375C9.91053 4.9375 9.51153 4.8375 9.02703 4.8375C8.44803 4.8375 7.95953 4.99075 7.56153 5.29725C7.16353 5.60325 6.96453 6 6.96453 6.4875C6.96453 6.948 7.12778 7.321 7.45428 7.6065C7.78128 7.8925 8.43628 8.19075 9.41928 8.50125C10.3293 8.78925 10.9993 9.1595 11.4293 9.612C11.8583 10.0645 12.0728 10.6325 12.0728 11.316C12.0728 12.069 11.8078 12.6673 11.2778 13.1108C10.7478 13.5543 10.1098 13.8032 9.36378 13.8577V15.375H8.61453Z" fill="#6D7793"/>
3
+ </svg>
@@ -1,5 +1,3 @@
1
- <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M10 1.66666C5.39763 1.66666 1.66667 5.39762 1.66667 10C1.66667 14.6024 5.39763 18.3333 10 18.3333C14.6024 18.3333 18.3333 14.6024 18.3333 10C18.3333 5.39762 14.6024 1.66666 10 1.66666Z" stroke="#A1A3AE" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
3
- <path d="M10 5.83334V14.1667" stroke="#A1A3AE" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
4
- <path d="M12.5 7.91666C12.5 6.85609 11.3807 5.99999 10 5.99999C8.61931 5.99999 7.5 6.85609 7.5 7.91666C7.5 8.97723 8.61931 9.83332 10 9.83332C11.3807 9.83332 12.5 10.6894 12.5 11.75C12.5 12.8106 11.3807 13.6667 10 13.6667C8.61931 13.6667 7.5 12.8106 7.5 11.75" stroke="#A1A3AE" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
1
+ <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M9.01795 15.75C8.80545 15.75 8.62745 15.678 8.48395 15.534C8.34045 15.39 8.26845 15.212 8.26795 15V14.1375C7.70545 14.0125 7.2117 13.7938 6.7867 13.4813C6.3617 13.1688 6.01795 12.7313 5.75545 12.1688C5.66795 11.9938 5.66495 11.8095 5.74645 11.616C5.82795 11.4225 5.9747 11.2818 6.1867 11.1938C6.3617 11.1188 6.54296 11.122 6.73046 11.2035C6.91796 11.285 7.0617 11.4193 7.1617 11.6063C7.3742 11.9813 7.64295 12.2658 7.96795 12.4598C8.29295 12.6538 8.69296 12.7505 9.16796 12.75C9.68046 12.75 10.1147 12.6345 10.4707 12.4035C10.8267 12.1725 11.005 11.813 11.0055 11.325C11.0055 10.8875 10.868 10.5408 10.593 10.2848C10.318 10.0288 9.68045 9.738 8.68045 9.4125C7.60545 9.075 6.86795 8.672 6.46795 8.2035C6.06795 7.735 5.86795 7.163 5.86795 6.4875C5.86795 5.675 6.13045 5.04375 6.65545 4.59375C7.18045 4.14375 7.71795 3.8875 8.26795 3.825V3C8.26795 2.7875 8.33995 2.60925 8.48395 2.46525C8.62795 2.32125 8.80595 2.2495 9.01795 2.25C9.22995 2.2505 9.4082 2.3225 9.5527 2.466C9.6972 2.6095 9.76895 2.7875 9.76795 3V3.825C10.243 3.9 10.6555 4.05325 11.0055 4.28475C11.3555 4.51625 11.643 4.8005 11.868 5.1375C11.9805 5.3 12.0025 5.48125 11.934 5.68125C11.8655 5.88125 11.7247 6.025 11.5117 6.1125C11.3367 6.1875 11.1555 6.19075 10.968 6.12225C10.7805 6.05375 10.6055 5.93175 10.443 5.75625C10.2805 5.58075 10.0897 5.4465 9.8707 5.3535C9.6517 5.2605 9.37995 5.2135 9.05545 5.2125C8.50545 5.2125 8.0867 5.3345 7.7992 5.5785C7.5117 5.8225 7.36795 6.1255 7.36795 6.4875C7.36795 6.9 7.55545 7.225 7.93045 7.4625C8.30545 7.7 8.95546 7.95 9.88046 8.2125C10.743 8.4625 11.3962 8.8595 11.8402 9.4035C12.2842 9.9475 12.506 10.5755 12.5055 11.2875C12.5055 12.175 12.243 12.85 11.718 13.3125C11.193 13.775 10.543 14.0625 9.76795 14.175V15C9.76795 15.2125 9.69596 15.3908 9.55196 15.5348C9.40796 15.6788 9.22995 15.7505 9.01795 15.75Z" fill="#A1A3AE"/>
5
3
  </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="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 absolute left-0 w-full min-w-[250px] max-w-full bg-white border border-[#E3E3E7] rounded-xl shadow-lg z-[99] overflow-hidden cursor-default p-2.5;
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
- .hierarchical-option:hover{
145
- @apply bg-[#f9f9f9];
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-[#f7f7f7];
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 {
@@ -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 */
@@ -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 absolute left-0 top-full mt-1 w-[80px] bg-white border border-[#E3E3E7] rounded-[4px] shadow-lg z-50 max-h-48 overflow-y-auto;
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
- /* ---- Panel ----
13
- No overflow:hidden here the arrow deliberately hangs outside the box. Put
14
- any scrolling on the content you project instead. */
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 fixed z-[10000] bg-white border border-[#E3E3E7] rounded-lg p-3 cursor-default;
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
- /* Dropdown */
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 absolute left-0 w-full bg-white border border-[#E3E3E7] rounded-xl shadow-lg z-[100] overflow-hidden cursor-default p-2.5;
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-[#F8F8F8] rounded-md;
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
 
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';