gd-bs 6.5.0 → 6.5.2
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/build/bs.js +1 -1
- package/build/components/dropdown/index.js +1 -1
- package/build/components/form/control.js +5 -2
- package/dist/gd-bs-icons.js +1 -1
- package/dist/gd-bs-icons.min.js +1 -1
- package/dist/gd-bs.js +1 -1
- package/dist/gd-bs.min.js +1 -1
- package/package.json +1 -1
- package/src/components/dropdown/index.ts +2 -2
- package/src/components/form/control.ts +7 -2
- package/src/styles/_custom.scss +7 -1
- package/src/styles/_root.scss +1 -0
- package/src/styles/_tippy.scss +9 -0
package/package.json
CHANGED
|
@@ -209,7 +209,7 @@ class _Dropdown extends Base<IDropdownProps> implements IDropdown {
|
|
|
209
209
|
let toggle = this.el.querySelector(".dropdown-toggle") as HTMLElement;
|
|
210
210
|
if (toggle && this._elMenu) {
|
|
211
211
|
// Set the type, based on the current dropdown type
|
|
212
|
-
let popoverType = PopoverTypes.
|
|
212
|
+
let popoverType = PopoverTypes.LightBorder;
|
|
213
213
|
switch (this.props.type) {
|
|
214
214
|
case DropdownTypes.Danger:
|
|
215
215
|
case DropdownTypes.OutlineDanger:
|
|
@@ -606,4 +606,4 @@ class _Dropdown extends Base<IDropdownProps> implements IDropdown {
|
|
|
606
606
|
this._popover ? this._popover.toggle() : null;
|
|
607
607
|
}
|
|
608
608
|
}
|
|
609
|
-
export const Dropdown = (props: IDropdownProps, template?: string): IDropdown => { return new _Dropdown(props, template); }
|
|
609
|
+
export const Dropdown = (props: IDropdownProps, template?: string): IDropdown => { return new _Dropdown(props, template); }
|
|
@@ -665,13 +665,18 @@ export class FormControl implements IFormControl {
|
|
|
665
665
|
|
|
666
666
|
// Updates the control validation
|
|
667
667
|
updateValidation(elControl: Element, validation: IFormControlValidationResult) {
|
|
668
|
+
// See if this is a checkbox/switch
|
|
669
|
+
let isCheckbox = elControl.querySelectorAll(".form-check").length > 0;
|
|
670
|
+
|
|
668
671
|
// Get the form controls
|
|
669
|
-
let elFormControls = elControl.querySelectorAll(".form-control");
|
|
672
|
+
let elFormControls = isCheckbox ? [elControl] : elControl.querySelectorAll(".form-control");
|
|
670
673
|
elFormControls = elFormControls.length == 0 ? elControl.querySelectorAll(".form-select") : elFormControls;
|
|
674
|
+
|
|
675
|
+
// Parse the form controls
|
|
671
676
|
for (let i = 0; i < elFormControls.length; i++) {
|
|
672
677
|
// Ensure the control exists
|
|
673
678
|
let elFormControl = elFormControls[i] as HTMLElement;
|
|
674
|
-
if (
|
|
679
|
+
if (!isCheckbox) {
|
|
675
680
|
// Clear the invalid/valid classes
|
|
676
681
|
elFormControl.classList.remove("is-invalid");
|
|
677
682
|
elFormControl.classList.remove("is-valid");
|
package/src/styles/_custom.scss
CHANGED
|
@@ -238,6 +238,9 @@
|
|
|
238
238
|
.carousel-indicators [data-bs-target] {
|
|
239
239
|
background-color: var(--sp-neutral-dark, #201f1e) !important;
|
|
240
240
|
}
|
|
241
|
+
.dropdown-divider {
|
|
242
|
+
border-color: var(--sp-neutral-quaternary, #d2d0ce);
|
|
243
|
+
}
|
|
241
244
|
/* Color match dropdown hover */
|
|
242
245
|
.dropdown-item:hover, .dropdown-item:focus {
|
|
243
246
|
background-color: var(--sp-neutral-quaternary, #d2d0ce);
|
|
@@ -248,7 +251,10 @@
|
|
|
248
251
|
}
|
|
249
252
|
/* Dropdown Menu - Using the popover component for the menu, so we don't need to hide it by default */
|
|
250
253
|
.dropdown-menu {
|
|
251
|
-
|
|
254
|
+
--bs-dropdown-header-color: var(--sp-info-icon, #605e5c);
|
|
255
|
+
--bs-dropdown-link-active-color: var(--sp-white, #ffffff);
|
|
256
|
+
--bs-dropdown-link-active-bg: var(--sp-theme-primary, #0078d4);
|
|
257
|
+
display: contents;
|
|
252
258
|
}
|
|
253
259
|
/* Show checkboxes & toggles as buttons */
|
|
254
260
|
.form-check .form-check-input, .form-select:hover {
|
package/src/styles/_root.scss
CHANGED
|
@@ -122,6 +122,7 @@
|
|
|
122
122
|
--bs-highlight-color: var(--sp-neutral-dark);
|
|
123
123
|
--bs-highlight-bg: var(--sp-neutral-quaternary-alt);
|
|
124
124
|
--bs-border-color: var(--sp-neutral-quaternary);
|
|
125
|
+
--bs-border-color-translucent: color-mix(in srgb, var(--sp-black, #000000), transparent 82%);
|
|
125
126
|
--bs-focus-ring-color: color-mix(in srgb, var(--sp-theme-primary), transparent 75%);
|
|
126
127
|
--bs-form-valid-color: var(--sp-success-icon);
|
|
127
128
|
--bs-form-valid-border-color: var(--sp-success-icon);
|
package/src/styles/_tippy.scss
CHANGED
|
@@ -147,6 +147,9 @@
|
|
|
147
147
|
.tippy-box[data-theme~='light-border'][data-placement^='right']>.tippy-arrow::before {
|
|
148
148
|
border-right-color: var(--sp-white, #ffffff) !important;
|
|
149
149
|
}
|
|
150
|
+
.tippy-box[data-theme~='light-border'][data-placement^='bottom']>.tippy-arrow::after {
|
|
151
|
+
border-bottom-color: var(--sp-neutral-quaternary, #d2d0ce) !important;
|
|
152
|
+
}
|
|
150
153
|
.tippy-box[data-theme~='light-border'][data-placement^='top']>.tippy-arrow::after {
|
|
151
154
|
border-top-color: var(--sp-neutral-quaternary, #d2d0ce) !important;
|
|
152
155
|
}
|
|
@@ -186,3 +189,9 @@
|
|
|
186
189
|
.tippy-box[data-theme~='sharepoint'][data-placement^='right']>.tippy-arrow::before {
|
|
187
190
|
border-right-color: var(--sp-theme-dark, #005a9e);
|
|
188
191
|
}
|
|
192
|
+
|
|
193
|
+
/* Add some padding if the Tippy content is a dropdown */
|
|
194
|
+
.tippy-content:has(>.dropdown-menu) {
|
|
195
|
+
padding-top: 0.5rem !important;
|
|
196
|
+
padding-bottom: 0.5rem !important;
|
|
197
|
+
}
|