gd-bs 6.7.6 → 6.7.7
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/formItem.js +4 -0
- package/build/components/dropdown/index.js +75 -0
- package/build/components/dropdown/item.js +4 -0
- package/build/components/floating-ui/index.js +44 -41
- package/dist/gd-bs-icons.js +1 -1
- package/dist/gd-bs-icons.min.js +1 -1
- package/dist/gd-bs.d.ts +5 -0
- package/dist/gd-bs.js +1 -1
- package/dist/gd-bs.min.js +1 -1
- package/indexv2.html +2 -2
- package/package.json +1 -1
- package/src/components/dropdown/formItem.ts +6 -0
- package/src/components/dropdown/index.ts +84 -0
- package/src/components/dropdown/item.ts +6 -0
- package/src/components/dropdown/types.d.ts +1 -0
- package/src/components/floating-ui/index.ts +55 -47
- package/src/components/floating-ui/types.d.ts +4 -0
- package/src/styles/_floating-ui.scss +137 -33
package/indexv2.html
CHANGED
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
|
|
178
178
|
<h5>Dropdown</h5>
|
|
179
179
|
|
|
180
|
-
<bs-dropdown auto-select="true" is-split="false" label="My Dropdown:" on-change="MyLib.ddlChange">
|
|
180
|
+
<bs-dropdown auto-select="true" is-split="false" label="My Dropdown:" search="true" on-change="MyLib.ddlChange">
|
|
181
181
|
<item is-header="true">Header 1</item>
|
|
182
182
|
<item is-divider="true"></item>
|
|
183
183
|
<item value="1">Item 1</item>
|
|
@@ -545,7 +545,7 @@
|
|
|
545
545
|
cardRender: (el) => { console.log("Card Render: ", el); },
|
|
546
546
|
cardBodyRender: (el) => { console.log("Card Body Render: ", el); },
|
|
547
547
|
collapseInit: obj => { window["collapseDemo"] = obj; },
|
|
548
|
-
ddlChange: (item) => { alert("Selected Item: " + (item ? item.text : "No Selection")); },
|
|
548
|
+
ddlChange: (item) => { debugger; alert("Selected Item: " + (item ? item.text : "No Selection")); },
|
|
549
549
|
fileClicked: (btn) => { alert(btn.text + " clicked."); },
|
|
550
550
|
formCustomControl: (ctrl) => { ctrl.el.innerHTML = "<h3>Custom Control</h3>"; },
|
|
551
551
|
inputGrouponChange: (val) => { console.log("Value changed to: " + val); },
|
package/package.json
CHANGED
|
@@ -87,6 +87,9 @@ export class DropdownFormItem {
|
|
|
87
87
|
// The component HTML element
|
|
88
88
|
get el(): HTMLElement { return this._el; }
|
|
89
89
|
|
|
90
|
+
// Hides the item
|
|
91
|
+
hide() { this._el.classList.add("d-none"); }
|
|
92
|
+
|
|
90
93
|
// Returns true if the item is selected
|
|
91
94
|
get isSelected(): boolean { return this._isSelected; }
|
|
92
95
|
set isSelected(value: boolean) { this._isSelected = value; }
|
|
@@ -94,6 +97,9 @@ export class DropdownFormItem {
|
|
|
94
97
|
// The component properties
|
|
95
98
|
get props(): IDropdownItem { return this._props; }
|
|
96
99
|
|
|
100
|
+
// Shows the item
|
|
101
|
+
show() { this._el.classList.remove("d-none"); }
|
|
102
|
+
|
|
97
103
|
// Toggles the item selection
|
|
98
104
|
toggle() {
|
|
99
105
|
// Skip the dividers, headers
|
|
@@ -38,6 +38,7 @@ class _Dropdown extends Base<IDropdownProps> implements IDropdown {
|
|
|
38
38
|
private _autoSelect: boolean = null;
|
|
39
39
|
private _cb: ICheckboxGroup = null;
|
|
40
40
|
private _elMenu: HTMLElement;
|
|
41
|
+
private _elSearch: HTMLInputElement;
|
|
41
42
|
private _floatingUI: IFloatingUI = null;
|
|
42
43
|
private _initFl: boolean = false;
|
|
43
44
|
private _items: Array<DropdownFormItem | DropdownItem> = null;
|
|
@@ -52,6 +53,9 @@ class _Dropdown extends Base<IDropdownProps> implements IDropdown {
|
|
|
52
53
|
// Configure the events
|
|
53
54
|
this.configureEvents();
|
|
54
55
|
|
|
56
|
+
// Configure search
|
|
57
|
+
this.configureSearch();
|
|
58
|
+
|
|
55
59
|
// Configure the parent
|
|
56
60
|
this.configureParent();
|
|
57
61
|
|
|
@@ -258,6 +262,16 @@ class _Dropdown extends Base<IDropdownProps> implements IDropdown {
|
|
|
258
262
|
elTarget: toggle,
|
|
259
263
|
placement: typeof (this.props.placement) === "number" ? this.props.placement : FloatingUIPlacements.BottomStart,
|
|
260
264
|
theme: popoverType,
|
|
265
|
+
onShow: () => {
|
|
266
|
+
// See if the search element exists
|
|
267
|
+
if (this._elSearch) {
|
|
268
|
+
// Clear the search
|
|
269
|
+
this._elSearch.value = "";
|
|
270
|
+
|
|
271
|
+
// Show all the items
|
|
272
|
+
for (let i = 0; i < this._items.length; i++) { this._items[i].show(); }
|
|
273
|
+
}
|
|
274
|
+
},
|
|
261
275
|
options: {
|
|
262
276
|
arrow: false,
|
|
263
277
|
flip: true,
|
|
@@ -396,6 +410,73 @@ class _Dropdown extends Base<IDropdownProps> implements IDropdown {
|
|
|
396
410
|
}
|
|
397
411
|
}
|
|
398
412
|
|
|
413
|
+
// Configures the search option for the dropdown
|
|
414
|
+
private configureSearch() {
|
|
415
|
+
// See if search is enabled and the menu exists
|
|
416
|
+
if (this.props.search != true || this._elMenu == null) { return; }
|
|
417
|
+
|
|
418
|
+
// Create the search textbox
|
|
419
|
+
this._elSearch = document.createElement("input");
|
|
420
|
+
this._elSearch.classList.add("form-control");
|
|
421
|
+
this._elSearch.type = "search";
|
|
422
|
+
this._elSearch.placeholder = "Search for item...";
|
|
423
|
+
|
|
424
|
+
// Insert the item as the first element
|
|
425
|
+
this._elMenu.firstChild ? this._elMenu.insertBefore(this._elSearch, this._elMenu.firstChild) : this._elMenu.appendChild(this._elSearch);
|
|
426
|
+
|
|
427
|
+
// Create the empty text
|
|
428
|
+
let elEmptyText = document.createElement("h6")
|
|
429
|
+
elEmptyText.classList.add("dropdown-header");
|
|
430
|
+
elEmptyText.classList.add("d-none");
|
|
431
|
+
elEmptyText.innerHTML = "No items were found...";
|
|
432
|
+
this._elMenu.appendChild(elEmptyText);
|
|
433
|
+
|
|
434
|
+
// Add the element to the ignore list
|
|
435
|
+
this._floatingUI.addIgnoreElement(this._elSearch);
|
|
436
|
+
|
|
437
|
+
// Add the event
|
|
438
|
+
this._elSearch.addEventListener("input", () => {
|
|
439
|
+
// Get the value
|
|
440
|
+
let searchText = (this._elSearch.value || "").toLocaleLowerCase();
|
|
441
|
+
|
|
442
|
+
// Set the flags
|
|
443
|
+
let itemsFound = false;
|
|
444
|
+
let showAll = searchText == "";
|
|
445
|
+
|
|
446
|
+
// Hide the empty text
|
|
447
|
+
elEmptyText.classList.add("d-none");
|
|
448
|
+
|
|
449
|
+
// Parse the items
|
|
450
|
+
for (let i = 0; i < this._items.length; i++) {
|
|
451
|
+
let item = this._items[i];
|
|
452
|
+
|
|
453
|
+
// See if we are showing all the items
|
|
454
|
+
if (showAll) {
|
|
455
|
+
// Show the item
|
|
456
|
+
item.show();
|
|
457
|
+
} else {
|
|
458
|
+
// See if the value contains the text
|
|
459
|
+
if ((item.props.text || "").toLowerCase().indexOf(searchText) >= 0) {
|
|
460
|
+
// Show the item
|
|
461
|
+
item.show();
|
|
462
|
+
|
|
463
|
+
// Set the flag
|
|
464
|
+
itemsFound = true;
|
|
465
|
+
} else {
|
|
466
|
+
// Hide the item
|
|
467
|
+
item.hide();
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
// See if no items were found
|
|
473
|
+
if (!showAll && !itemsFound) {
|
|
474
|
+
// Show the empty message
|
|
475
|
+
elEmptyText.classList.remove("d-none");
|
|
476
|
+
}
|
|
477
|
+
});
|
|
478
|
+
}
|
|
479
|
+
|
|
399
480
|
// Generates the checkbox items
|
|
400
481
|
private generateCheckboxItems(): ICheckboxGroupItem[] {
|
|
401
482
|
let cbItems: ICheckboxGroupItem[] = [];
|
|
@@ -644,6 +725,9 @@ class _Dropdown extends Base<IDropdownProps> implements IDropdown {
|
|
|
644
725
|
}
|
|
645
726
|
}
|
|
646
727
|
}
|
|
728
|
+
|
|
729
|
+
// Configure search
|
|
730
|
+
this.configureSearch();
|
|
647
731
|
}
|
|
648
732
|
|
|
649
733
|
// Sets the label of the dropdown
|
|
@@ -153,12 +153,18 @@ export class DropdownItem {
|
|
|
153
153
|
// The component HTML element
|
|
154
154
|
get el(): HTMLElement { return this._el; }
|
|
155
155
|
|
|
156
|
+
// Hides the item
|
|
157
|
+
hide() { this._el.classList.add("d-none"); }
|
|
158
|
+
|
|
156
159
|
// Returns true if the item is selected
|
|
157
160
|
get isSelected(): boolean { return this._isSelected; }
|
|
158
161
|
|
|
159
162
|
// The component properties
|
|
160
163
|
get props(): IDropdownItem { return this._props; }
|
|
161
164
|
|
|
165
|
+
// Shows the item
|
|
166
|
+
show() { this._el.classList.remove("d-none"); }
|
|
167
|
+
|
|
162
168
|
// Toggles the item selection
|
|
163
169
|
toggle() {
|
|
164
170
|
// Skip the dividers, headers and nav items
|
|
@@ -155,6 +155,7 @@ export interface IDropdownProps extends IBaseProps<IDropdown> {
|
|
|
155
155
|
onMenuRendering?: (props: IFloatingUIProps) => IFloatingUIProps;
|
|
156
156
|
placement?: number;
|
|
157
157
|
required?: boolean;
|
|
158
|
+
search?: boolean;
|
|
158
159
|
title?: string;
|
|
159
160
|
type?: number;
|
|
160
161
|
updateLabel?: boolean;
|
|
@@ -49,18 +49,15 @@ export enum FloatingUITypes {
|
|
|
49
49
|
*/
|
|
50
50
|
class _FloatingUI {
|
|
51
51
|
private _elArrow: HTMLElement = null;
|
|
52
|
-
private _elTarget: HTMLElement = null;
|
|
53
52
|
private _elContent: HTMLElement = null;
|
|
53
|
+
private _elIgnore: HTMLElement[] = null;
|
|
54
|
+
private _elTarget: HTMLElement = null;
|
|
54
55
|
private _options: ComputePositionConfig = null;
|
|
55
56
|
private _props: IFloatingUIProps = null;
|
|
56
57
|
|
|
57
|
-
// Static events
|
|
58
|
-
private static Events = [];
|
|
59
|
-
private static EventsCreated = false;
|
|
60
|
-
private static ScrollEvents = [];
|
|
61
|
-
|
|
62
58
|
// Constructor
|
|
63
59
|
constructor(props: IFloatingUIProps) {
|
|
60
|
+
this._elIgnore = [];
|
|
64
61
|
this._elTarget = props.elTarget;
|
|
65
62
|
this._props = props;
|
|
66
63
|
|
|
@@ -82,6 +79,7 @@ class _FloatingUI {
|
|
|
82
79
|
this._props.show ? this.show() : this.hide();
|
|
83
80
|
}
|
|
84
81
|
|
|
82
|
+
// Add the events to trigger, refresh and hide the element
|
|
85
83
|
private addEvents(trigger: string = "") {
|
|
86
84
|
// Events
|
|
87
85
|
if (trigger.indexOf("mouse") >= 0) {
|
|
@@ -99,48 +97,29 @@ class _FloatingUI {
|
|
|
99
97
|
});
|
|
100
98
|
}
|
|
101
99
|
|
|
102
|
-
//
|
|
103
|
-
|
|
104
|
-
//
|
|
105
|
-
if (
|
|
106
|
-
// Hide the element
|
|
107
|
-
this.hide();
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
_FloatingUI.ScrollEvents.push((ev: Event) => {
|
|
111
|
-
// Refresh the content
|
|
112
|
-
this.refresh();
|
|
113
|
-
});
|
|
100
|
+
// Create the event
|
|
101
|
+
document.addEventListener("click", (ev) => {
|
|
102
|
+
// Do nothing if we toggled this component
|
|
103
|
+
if (this._elTarget.contains(ev.target as HTMLElement)) { return; }
|
|
114
104
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
setTimeout(() => {
|
|
121
|
-
// Parse the events
|
|
122
|
-
_FloatingUI.Events.forEach(fnEvent => {
|
|
123
|
-
// Call the event
|
|
124
|
-
fnEvent(ev);
|
|
125
|
-
});
|
|
126
|
-
}, 10);
|
|
127
|
-
});
|
|
105
|
+
// Parse the elements to ignore
|
|
106
|
+
for (let i = 0; i < this._elIgnore.length; i++) {
|
|
107
|
+
// Do nothing if it triggered the click
|
|
108
|
+
if (this._elIgnore[i].contains(ev.target as HTMLElement)) { return; }
|
|
109
|
+
}
|
|
128
110
|
|
|
129
|
-
//
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
setTimeout(() => {
|
|
133
|
-
// Parse the events
|
|
134
|
-
_FloatingUI.ScrollEvents.forEach(fnEvent => {
|
|
135
|
-
// Call the event
|
|
136
|
-
fnEvent(ev);
|
|
137
|
-
});
|
|
138
|
-
}, 10);
|
|
139
|
-
});
|
|
111
|
+
// Hide the element
|
|
112
|
+
this.hide();
|
|
113
|
+
});
|
|
140
114
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
115
|
+
// Create the scroll event
|
|
116
|
+
window.addEventListener("scroll", (ev) => {
|
|
117
|
+
// Wait for the other events to run
|
|
118
|
+
setTimeout(() => {
|
|
119
|
+
// Refresh the content
|
|
120
|
+
this.refresh();
|
|
121
|
+
}, 10);
|
|
122
|
+
});
|
|
144
123
|
}
|
|
145
124
|
|
|
146
125
|
// Creates the floating ui
|
|
@@ -369,13 +348,33 @@ class _FloatingUI {
|
|
|
369
348
|
* Public Methods
|
|
370
349
|
*/
|
|
371
350
|
|
|
351
|
+
addIgnoreElement(el: HTMLElement) { this._elIgnore.push(el); }
|
|
352
|
+
|
|
353
|
+
removeIgnoreElement(el: HTMLElement) {
|
|
354
|
+
// Parse the elements
|
|
355
|
+
for (let i = 0; i < this._elIgnore.length; i++) {
|
|
356
|
+
// See if this is the element to remove
|
|
357
|
+
if (this._elIgnore[i].isEqualNode(el)) {
|
|
358
|
+
// Remove it
|
|
359
|
+
this._elIgnore.splice(i, 1);
|
|
360
|
+
return;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
|
|
372
365
|
setContent(el) { this._elContent = el; this.refresh(); }
|
|
373
366
|
|
|
374
367
|
// Hides the content
|
|
375
368
|
hide() {
|
|
376
369
|
// Remove it from the document
|
|
377
370
|
this._elContent.classList.add("d-none");
|
|
378
|
-
if (document.body.contains(this._elContent)) {
|
|
371
|
+
if (document.body.contains(this._elContent)) {
|
|
372
|
+
// Remove the element from the page
|
|
373
|
+
document.body.removeChild(this._elContent);
|
|
374
|
+
|
|
375
|
+
// Call the event
|
|
376
|
+
this._props.onHide ? this._props.onHide() : null;
|
|
377
|
+
}
|
|
379
378
|
}
|
|
380
379
|
|
|
381
380
|
// Determines if the content is visible
|
|
@@ -385,7 +384,16 @@ class _FloatingUI {
|
|
|
385
384
|
show() {
|
|
386
385
|
// Append it to the document
|
|
387
386
|
this._elContent.classList.remove("d-none");
|
|
388
|
-
if (!document.body.contains(this._elContent)) {
|
|
387
|
+
if (!document.body.contains(this._elContent)) {
|
|
388
|
+
// Add the element to the page
|
|
389
|
+
document.body.appendChild(this._elContent);
|
|
390
|
+
|
|
391
|
+
// Refresh the position
|
|
392
|
+
this.refresh();
|
|
393
|
+
|
|
394
|
+
// Call the event
|
|
395
|
+
this._props.onShow ? this._props.onShow() : null;
|
|
396
|
+
}
|
|
389
397
|
}
|
|
390
398
|
|
|
391
399
|
// Toggles the floating ui
|
|
@@ -5,8 +5,10 @@ import { IBaseProps } from "../types";
|
|
|
5
5
|
export const FloatingUIPlacements: IFloatingUIPlacements;
|
|
6
6
|
|
|
7
7
|
export interface IFloatingUI {
|
|
8
|
+
addIgnoreElement: (el: Element) => void;
|
|
8
9
|
hide: () => void;
|
|
9
10
|
isVisible: boolean;
|
|
11
|
+
removeIgnoreElement: (el: Element) => void;
|
|
10
12
|
setContent: (el: string | Element) => void;
|
|
11
13
|
show: () => void;
|
|
12
14
|
toggle: () => void;
|
|
@@ -29,6 +31,8 @@ export interface IFloatingUIOptions {
|
|
|
29
31
|
export interface IFloatingUIProps extends IBaseProps<IFloatingUI> {
|
|
30
32
|
elContent: HTMLElement;
|
|
31
33
|
elTarget: HTMLElement;
|
|
34
|
+
onHide?: (el?: HTMLElement) => void;
|
|
35
|
+
onShow?: (el?: HTMLElement) => void;
|
|
32
36
|
options?: IFloatingUIOptions;
|
|
33
37
|
placement?: number;
|
|
34
38
|
show?: boolean;
|
|
@@ -30,6 +30,15 @@
|
|
|
30
30
|
&.floating-dropdown .dropdown-item {
|
|
31
31
|
border-radius: var(--bs-dropdown-border-radius, 5px);
|
|
32
32
|
}
|
|
33
|
+
|
|
34
|
+
&.floating-dropdown .dropdown-item.active {
|
|
35
|
+
background-color: var(--sp-theme-primary, #0078d4);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&.floating-dropdown .dropdown-item:hover {
|
|
39
|
+
background-color: var(--bs-dropdown-link-hover-bg, #faf9f8);
|
|
40
|
+
color: var(--bs-dropdown-link-hover-color, #201f1e);
|
|
41
|
+
}
|
|
33
42
|
}
|
|
34
43
|
|
|
35
44
|
/** Floating-UI */
|
|
@@ -47,11 +56,21 @@
|
|
|
47
56
|
|
|
48
57
|
/* Floating UI primary theme color */
|
|
49
58
|
&[data-theme~='primary'],
|
|
50
|
-
&[data-theme~='primary']>div
|
|
59
|
+
&[data-theme~='primary']>div,
|
|
60
|
+
&[data-theme~='primary'] .dropdown-item {
|
|
51
61
|
background-color: var(--sp-theme-primary, #0078d4);
|
|
52
62
|
color: var(--sp-white, #ffffff);
|
|
53
63
|
}
|
|
54
64
|
|
|
65
|
+
&[data-theme~='primary'] .dropdown-item.active {
|
|
66
|
+
background-color: var(--sp-white, #ffffff);
|
|
67
|
+
color: var(--sp-theme-primary, #0078d4);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&[data-theme~='primary'] .dropdown-item:hover {
|
|
71
|
+
background-color: var(--sp-theme-tertiary);
|
|
72
|
+
}
|
|
73
|
+
|
|
55
74
|
&[data-theme~='primary'] {
|
|
56
75
|
border-style: solid;
|
|
57
76
|
border-width: .8px;
|
|
@@ -76,11 +95,21 @@
|
|
|
76
95
|
|
|
77
96
|
/* Floating UI secondary theme color */
|
|
78
97
|
&[data-theme~='secondary'],
|
|
79
|
-
&[data-theme~='secondary']>div
|
|
98
|
+
&[data-theme~='secondary']>div,
|
|
99
|
+
&[data-theme~='secondary'] .dropdown-item {
|
|
80
100
|
background-color: var(--sp-info-icon, #605e5c);
|
|
81
101
|
color: var(--sp-white, #ffffff);
|
|
82
102
|
}
|
|
83
103
|
|
|
104
|
+
&[data-theme~='secondary'] .dropdown-item.active {
|
|
105
|
+
background-color: var(--sp-white, #ffffff);
|
|
106
|
+
color: var(--sp-info-icon, #605e5c);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&[data-theme~='secondary'] .dropdown-item:hover {
|
|
110
|
+
background-color: var(--sp-neutral-lighter);
|
|
111
|
+
}
|
|
112
|
+
|
|
84
113
|
&[data-theme~='secondary'] {
|
|
85
114
|
border-style: solid;
|
|
86
115
|
border-width: .8px;
|
|
@@ -105,12 +134,22 @@
|
|
|
105
134
|
|
|
106
135
|
/* Floating UI success theme color */
|
|
107
136
|
&[data-theme~='success'],
|
|
108
|
-
&[data-theme~='success']>div
|
|
137
|
+
&[data-theme~='success']>div,
|
|
138
|
+
&[data-theme~='success'] .dropdown-item {
|
|
109
139
|
background-color: var(--sp-success-icon, #107c10);
|
|
110
140
|
color: var(--sp-white, #ffffff);
|
|
111
141
|
}
|
|
112
142
|
|
|
113
|
-
&[data-theme~='
|
|
143
|
+
&[data-theme~='success'] .dropdown-item.active {
|
|
144
|
+
background-color: var(--sp-white, #ffffff);
|
|
145
|
+
color: var(--sp-success-icon, #107c10);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&[data-theme~='success'] .dropdown-item:hover {
|
|
149
|
+
background-color: var(--sp-neutral-lighter);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
&[data-theme~='success'] {
|
|
114
153
|
border-style: solid;
|
|
115
154
|
border-width: .8px;
|
|
116
155
|
border-color: var(--sp-theme-primary, #107c10);
|
|
@@ -134,12 +173,22 @@
|
|
|
134
173
|
|
|
135
174
|
/* Floating UI info theme color */
|
|
136
175
|
&[data-theme~='info'],
|
|
137
|
-
&[data-theme~='info']>div
|
|
176
|
+
&[data-theme~='info']>div,
|
|
177
|
+
&[data-theme~='info'] .dropdown-item {
|
|
138
178
|
background-color: var(--sp-accent, #8764b8);
|
|
139
179
|
color: var(--sp-black, #000000);
|
|
140
180
|
}
|
|
141
181
|
|
|
142
|
-
&[data-theme~='
|
|
182
|
+
&[data-theme~='info'] .dropdown-item.active {
|
|
183
|
+
background-color: var(--sp-black, #000000);
|
|
184
|
+
color: var(--sp-accent, #8764b8);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
&[data-theme~='info'] .dropdown-item:hover {
|
|
188
|
+
background-color: var(--sp-neutral-dark);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
&[data-theme~='info'] {
|
|
143
192
|
border-style: solid;
|
|
144
193
|
border-width: .8px;
|
|
145
194
|
border-color: var(--sp-theme-primary, #8764b8);
|
|
@@ -163,12 +212,22 @@
|
|
|
163
212
|
|
|
164
213
|
/* Floating UI warning theme color */
|
|
165
214
|
&[data-theme~='warning'],
|
|
166
|
-
&[data-theme~='warning']>div
|
|
215
|
+
&[data-theme~='warning']>div,
|
|
216
|
+
&[data-theme~='warning'] .dropdown-item {
|
|
167
217
|
background-color: var(--sp-severe-warning-icon, #d83b01);
|
|
168
218
|
color: var(--sp-white, #ffffff);
|
|
169
219
|
}
|
|
170
220
|
|
|
171
|
-
&[data-theme~='
|
|
221
|
+
&[data-theme~='warning'] .dropdown-item.active {
|
|
222
|
+
background-color: var(--sp-white, #ffffff);
|
|
223
|
+
color: var(--sp-severe-warning-icon, #d83b01);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
&[data-theme~='warning'] .dropdown-item:hover {
|
|
227
|
+
background-color: var(--sp-neutral-lighter);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
&[data-theme~='warning'] {
|
|
172
231
|
border-style: solid;
|
|
173
232
|
border-width: .8px;
|
|
174
233
|
border-color: var(--sp-theme-primary, #d83b01);
|
|
@@ -192,12 +251,22 @@
|
|
|
192
251
|
|
|
193
252
|
/* Floating UI danger theme color */
|
|
194
253
|
&[data-theme~='danger'],
|
|
195
|
-
&[data-theme~='danger']>div
|
|
254
|
+
&[data-theme~='danger']>div,
|
|
255
|
+
&[data-theme~='danger'] .dropdown-item {
|
|
196
256
|
background-color: var(--sp-error-icon, #a80000);
|
|
197
257
|
color: var(--sp-white, #ffffff);
|
|
198
258
|
}
|
|
199
259
|
|
|
200
|
-
&[data-theme~='
|
|
260
|
+
&[data-theme~='danger'] .dropdown-item.active {
|
|
261
|
+
background-color: var(--sp-white, #ffffff);
|
|
262
|
+
color: var(--sp-error-icon, #a80000);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
&[data-theme~='danger'] .dropdown-item:hover {
|
|
266
|
+
background-color: var(--sp-neutral-lighter);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
&[data-theme~='danger'] {
|
|
201
270
|
border-style: solid;
|
|
202
271
|
border-width: .8px;
|
|
203
272
|
border-color: var(--sp-theme-primary, #a80000);
|
|
@@ -221,79 +290,108 @@
|
|
|
221
290
|
|
|
222
291
|
/* Floating UI light theme color - override Tippy default to match Bootstrap */
|
|
223
292
|
&[data-theme~='light'],
|
|
224
|
-
&[data-theme~='light']>div
|
|
225
|
-
|
|
226
|
-
color: var(--sp-
|
|
293
|
+
&[data-theme~='light']>div,
|
|
294
|
+
&[data-theme~='light'] .dropdown-item {
|
|
295
|
+
background-color: var(--sp-neutral-lighter, #f3f2f1);
|
|
296
|
+
color: var(--sp-black, #000000);
|
|
227
297
|
}
|
|
228
298
|
|
|
229
|
-
&[data-theme~='
|
|
299
|
+
&[data-theme~='light'] .dropdown-item.active {
|
|
300
|
+
background-color: var(--sp-black, #000000);
|
|
301
|
+
color: var(--sp-neutral-lighter, #f3f2f1);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
&[data-theme~='light'] .dropdown-item:hover {
|
|
305
|
+
background-color: var(--sp-white);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
&[data-theme~='light'] {
|
|
230
309
|
border-style: solid;
|
|
231
310
|
border-width: .8px;
|
|
232
311
|
border-color: var(--sp-theme-primary, #f3f2f1);
|
|
233
312
|
}
|
|
234
313
|
|
|
235
314
|
&[data-theme~='light'][data-placement^='top']>.arrow::before {
|
|
236
|
-
border-top-color: var(--sp-neutral-lighter, #f3f2f1)
|
|
315
|
+
border-top-color: var(--sp-neutral-lighter, #f3f2f1);
|
|
237
316
|
}
|
|
238
317
|
|
|
239
318
|
&[data-theme~='light'][data-placement^='bottom']>.arrow::before {
|
|
240
|
-
border-bottom-color: var(--sp-neutral-lighter, #f3f2f1)
|
|
319
|
+
border-bottom-color: var(--sp-neutral-lighter, #f3f2f1);
|
|
241
320
|
}
|
|
242
321
|
|
|
243
322
|
&[data-theme~='light'][data-placement^='left']>.arrow::before {
|
|
244
|
-
border-left-color: var(--sp-neutral-lighter, #f3f2f1)
|
|
323
|
+
border-left-color: var(--sp-neutral-lighter, #f3f2f1);
|
|
245
324
|
}
|
|
246
325
|
|
|
247
326
|
&[data-theme~='light'][data-placement^='right']>.arrow::before {
|
|
248
|
-
border-right-color: var(--sp-neutral-lighter, #f3f2f1)
|
|
327
|
+
border-right-color: var(--sp-neutral-lighter, #f3f2f1);
|
|
249
328
|
}
|
|
250
329
|
|
|
251
330
|
/* Floating UI light-border theme color - override Tippy default to match Bootstrap */
|
|
252
331
|
&[data-theme~='light-border'],
|
|
253
|
-
&[data-theme~='light-border']>div
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
color: var(--sp-primary-text, #333333)
|
|
332
|
+
&[data-theme~='light-border']>div,
|
|
333
|
+
&[data-theme~='light-border'] .dropdown-item {
|
|
334
|
+
background-color: var(--sp-white, #ffffff);
|
|
335
|
+
color: var(--sp-primary-text, #333333);
|
|
257
336
|
}
|
|
258
337
|
|
|
259
|
-
&[data-theme~='
|
|
338
|
+
&[data-theme~='light-border'] .dropdown-item.active {
|
|
339
|
+
background-color: var(--sp-primary-text, #333333);
|
|
340
|
+
color: var(--sp-white, #ffffff);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
&[data-theme~='light-border'] .dropdown-item:hover {
|
|
344
|
+
background-color: var(--sp-black);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
&[data-theme~='light-border'] {
|
|
260
348
|
border-style: solid;
|
|
261
349
|
border-width: .8px;
|
|
262
350
|
border-color: var(--sp-theme-primary, #ffffff);
|
|
263
351
|
}
|
|
264
352
|
|
|
265
353
|
&[data-theme~='light-border'][data-placement^='top']>.arrow::before {
|
|
266
|
-
border-top-color: var(--sp-white, #ffffff)
|
|
354
|
+
border-top-color: var(--sp-white, #ffffff);
|
|
267
355
|
}
|
|
268
356
|
|
|
269
357
|
&[data-theme~='light-border'][data-placement^='bottom']>.arrow::before {
|
|
270
|
-
border-bottom-color: var(--sp-white, #ffffff)
|
|
358
|
+
border-bottom-color: var(--sp-white, #ffffff);
|
|
271
359
|
}
|
|
272
360
|
|
|
273
361
|
&[data-theme~='light-border'][data-placement^='left']>.arrow::before {
|
|
274
|
-
border-left-color: var(--sp-white, #ffffff)
|
|
362
|
+
border-left-color: var(--sp-white, #ffffff);
|
|
275
363
|
}
|
|
276
364
|
|
|
277
365
|
&[data-theme~='light-border'][data-placement^='right']>.arrow::before {
|
|
278
|
-
border-right-color: var(--sp-white, #ffffff)
|
|
366
|
+
border-right-color: var(--sp-white, #ffffff);
|
|
279
367
|
}
|
|
280
368
|
|
|
281
369
|
&[data-theme~='light-border'][data-placement^='bottom']>.arrow::after {
|
|
282
|
-
border-bottom-color: var(--sp-neutral-quaternary, #d2d0ce)
|
|
370
|
+
border-bottom-color: var(--sp-neutral-quaternary, #d2d0ce);
|
|
283
371
|
}
|
|
284
372
|
|
|
285
373
|
&[data-theme~='light-border'][data-placement^='top']>.arrow::after {
|
|
286
|
-
border-top-color: var(--sp-neutral-quaternary, #d2d0ce)
|
|
374
|
+
border-top-color: var(--sp-neutral-quaternary, #d2d0ce);
|
|
287
375
|
}
|
|
288
376
|
|
|
289
377
|
/* Floating UI dark theme color */
|
|
290
378
|
&[data-theme~='dark'],
|
|
291
|
-
&[data-theme~='dark']>div
|
|
379
|
+
&[data-theme~='dark']>div,
|
|
380
|
+
&[data-theme~='dark'] .dropdown-item {
|
|
292
381
|
background-color: var(--sp-neutral-dark, #201f1e);
|
|
293
382
|
color: var(--sp-white, #ffffff);
|
|
294
383
|
}
|
|
295
384
|
|
|
296
|
-
&[data-theme~='
|
|
385
|
+
&[data-theme~='dark'] .dropdown-item.active {
|
|
386
|
+
background-color: var(--sp-white, #ffffff);
|
|
387
|
+
color: var(--sp-neutral-dark, #201f1e);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
&[data-theme~='dark'] .dropdown-item:hover {
|
|
391
|
+
background-color: var(--sp-neutral-lighter);
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
&[data-theme~='dark'] {
|
|
297
395
|
border-style: solid;
|
|
298
396
|
border-width: .8px;
|
|
299
397
|
border-color: var(--sp-theme-primary, #201f1e);
|
|
@@ -317,12 +415,18 @@
|
|
|
317
415
|
|
|
318
416
|
/* Floating UI SharePoint theme color */
|
|
319
417
|
&[data-theme~='sharepoint'],
|
|
320
|
-
&[data-theme~='sharepoint']>div
|
|
418
|
+
&[data-theme~='sharepoint']>div,
|
|
419
|
+
&[data-theme~='sharepoint'] .dropdown-item {
|
|
321
420
|
background-color: var(--sp-theme-dark, #005a9e);
|
|
322
421
|
color: var(--sp-white, #ffffff);
|
|
323
422
|
}
|
|
324
423
|
|
|
325
|
-
&[data-theme~='
|
|
424
|
+
&[data-theme~='sharepoint'] .dropdown-item.active {
|
|
425
|
+
background-color: var(--sp-white, #ffffff);
|
|
426
|
+
color: var(--sp-theme-dark, #005a9e);
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
&[data-theme~='sharepoint'] {
|
|
326
430
|
border-style: solid;
|
|
327
431
|
border-width: .8px;
|
|
328
432
|
border-color: var(--sp-theme-primary, #005a9e);
|