@pine-ds/core 3.15.3 → 3.16.1
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/components/pds-dropdown-menu-item.js +1 -1
- package/components/pds-dropdown-menu-item.js.map +1 -1
- package/components/pds-dropdown-menu.js +70 -27
- package/components/pds-dropdown-menu.js.map +1 -1
- package/components/pds-input.js +1 -1
- package/components/pds-input.js.map +1 -1
- package/components/pds-multiselect.js +42 -6
- package/components/pds-multiselect.js.map +1 -1
- package/components/pds-table.js +5 -2
- package/components/pds-table.js.map +1 -1
- package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/pds-dropdown-menu-item.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-dropdown-menu.cjs.entry.js +70 -27
- package/dist/cjs/pds-dropdown-menu.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-input.cjs.entry.js +1 -1
- package/dist/cjs/pds-input.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-multiselect.cjs.entry.js +42 -6
- package/dist/cjs/pds-multiselect.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-table.cjs.entry.js +5 -2
- package/dist/cjs/pds-table.entry.cjs.js.map +1 -1
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.css +5 -1
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.css +32 -0
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js +69 -26
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js.map +1 -1
- package/dist/collection/components/pds-input/pds-input.css +10 -0
- package/dist/collection/components/pds-input/stories/pds-input.stories.js +8 -0
- package/dist/collection/components/pds-multiselect/pds-multiselect.js +42 -6
- package/dist/collection/components/pds-multiselect/pds-multiselect.js.map +1 -1
- package/dist/collection/components/pds-table/pds-table.js +5 -2
- package/dist/collection/components/pds-table/pds-table.js.map +1 -1
- package/dist/docs.json +1 -1
- package/dist/esm/pds-dropdown-menu-item.entry.js +1 -1
- package/dist/esm/pds-dropdown-menu-item.entry.js.map +1 -1
- package/dist/esm/pds-dropdown-menu.entry.js +70 -27
- package/dist/esm/pds-dropdown-menu.entry.js.map +1 -1
- package/dist/esm/pds-input.entry.js +1 -1
- package/dist/esm/pds-input.entry.js.map +1 -1
- package/dist/esm/pds-multiselect.entry.js +42 -6
- package/dist/esm/pds-multiselect.entry.js.map +1 -1
- package/dist/esm/pds-table.entry.js +5 -2
- package/dist/esm/pds-table.entry.js.map +1 -1
- package/dist/esm-es5/pds-dropdown-menu-item.entry.js +1 -1
- package/dist/esm-es5/pds-dropdown-menu-item.entry.js.map +1 -1
- package/dist/esm-es5/pds-dropdown-menu.entry.js +1 -1
- package/dist/esm-es5/pds-dropdown-menu.entry.js.map +1 -1
- package/dist/esm-es5/pds-input.entry.js +1 -1
- package/dist/esm-es5/pds-input.entry.js.map +1 -1
- package/dist/esm-es5/pds-multiselect.entry.js +1 -1
- package/dist/esm-es5/pds-multiselect.entry.js.map +1 -1
- package/dist/esm-es5/pds-table.entry.js +1 -1
- package/dist/esm-es5/pds-table.entry.js.map +1 -1
- package/dist/pine-core/p-23aba538.entry.js +2 -0
- package/dist/pine-core/p-23aba538.entry.js.map +1 -0
- package/dist/pine-core/p-3c026ec7.system.entry.js +2 -0
- package/dist/pine-core/p-3c026ec7.system.entry.js.map +1 -0
- package/dist/pine-core/p-7ecfe996.entry.js +2 -0
- package/dist/pine-core/p-7ecfe996.entry.js.map +1 -0
- package/dist/pine-core/p-8b4f76e4.system.entry.js +2 -0
- package/dist/pine-core/p-8b4f76e4.system.entry.js.map +1 -0
- package/dist/pine-core/{p-ea8aba18.entry.js → p-8eb29dbd.entry.js} +2 -2
- package/dist/pine-core/{p-ea8aba18.entry.js.map → p-8eb29dbd.entry.js.map} +1 -1
- package/dist/pine-core/p-C7XKS9nY.system.js.map +1 -0
- package/dist/pine-core/p-CCKncKbB.system.js.map +1 -0
- package/dist/pine-core/p-DZEhYV6y.system.js.map +1 -0
- package/dist/pine-core/p-DsJJz9LK.system.js.map +1 -0
- package/dist/pine-core/p-EnxcYko8.system.js.map +1 -0
- package/dist/pine-core/p-JAVnELnm.system.js +1 -1
- package/dist/pine-core/p-b61669b4.system.entry.js +2 -0
- package/dist/pine-core/p-b61669b4.system.entry.js.map +1 -0
- package/dist/pine-core/p-bcebce69.entry.js +2 -0
- package/dist/pine-core/{p-56cf3af8.entry.js.map → p-bcebce69.entry.js.map} +1 -1
- package/dist/pine-core/p-d456c898.entry.js +2 -0
- package/dist/pine-core/p-d456c898.entry.js.map +1 -0
- package/dist/pine-core/{p-0c2f13c3.system.entry.js → p-f03f4602.system.entry.js} +2 -2
- package/dist/pine-core/{p-0c2f13c3.system.entry.js.map → p-f03f4602.system.entry.js.map} +1 -1
- package/dist/pine-core/p-f94ae58d.system.entry.js +2 -0
- package/dist/pine-core/{p-5f552640.system.entry.js.map → p-f94ae58d.system.entry.js.map} +1 -1
- package/dist/pine-core/pds-dropdown-menu-item.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-dropdown-menu.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-input.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-multiselect.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-table.entry.esm.js.map +1 -1
- package/dist/pine-core/pine-core.esm.js +1 -1
- package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu.d.ts +1 -0
- package/dist/types/components/pds-multiselect/pds-multiselect.d.ts +2 -0
- package/dist/vscode.html-data.json +1 -1
- package/hydrate/index.js +120 -38
- package/hydrate/index.mjs +120 -38
- package/package.json +2 -2
- package/dist/pine-core/p-56cf3af8.entry.js +0 -2
- package/dist/pine-core/p-5f552640.system.entry.js +0 -2
- package/dist/pine-core/p-946d7d11.system.entry.js +0 -2
- package/dist/pine-core/p-946d7d11.system.entry.js.map +0 -1
- package/dist/pine-core/p-9660a2c2.entry.js +0 -2
- package/dist/pine-core/p-9660a2c2.entry.js.map +0 -1
- package/dist/pine-core/p-9c0ec80a.entry.js +0 -2
- package/dist/pine-core/p-9c0ec80a.entry.js.map +0 -1
- package/dist/pine-core/p-C7nuqPJm.system.js.map +0 -1
- package/dist/pine-core/p-CCgKUhC7.system.js.map +0 -1
- package/dist/pine-core/p-GH_AtkdO.system.js.map +0 -1
- package/dist/pine-core/p-anXbtQm4.system.js.map +0 -1
- package/dist/pine-core/p-bf18c945.entry.js +0 -2
- package/dist/pine-core/p-bf18c945.entry.js.map +0 -1
- package/dist/pine-core/p-d98310b9.system.entry.js +0 -2
- package/dist/pine-core/p-d98310b9.system.entry.js.map +0 -1
- package/dist/pine-core/p-f00f70bf.system.entry.js +0 -2
- package/dist/pine-core/p-f00f70bf.system.entry.js.map +0 -1
- package/dist/pine-core/p-g2zH2UyI.system.js.map +0 -1
package/hydrate/index.js
CHANGED
|
@@ -9135,7 +9135,7 @@ class PdsDivider {
|
|
|
9135
9135
|
}; }
|
|
9136
9136
|
}
|
|
9137
9137
|
|
|
9138
|
-
const pdsDropdownMenuCss = ":host{display:block}.is-hidden{display:none}.pds-dropdown-menu--panel{background-color:var(--pine-color-background-container);border-radius:var(--pine-dimension-xs);left:var(--pine-dimension-none);min-width:170px;padding:var(--pine-dimension-xs);position:fixed;z-index:var(--pine-z-index-overlay)}:host-context([data-theme=dark]) .pds-dropdown-menu--panel{border:var(--pine-border)}";
|
|
9138
|
+
const pdsDropdownMenuCss = ":host{display:block}.is-hidden{display:none}.pds-dropdown-menu--panel{background-color:var(--pine-color-background-container);border-radius:var(--pine-dimension-xs);left:var(--pine-dimension-none);min-width:170px;padding:var(--pine-dimension-xs);position:fixed;z-index:var(--pine-z-index-overlay)}:host-context([data-theme=dark]) .pds-dropdown-menu--panel{border:var(--pine-border)}::slotted(a),::slotted(button){-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:var(--pine-dimension-xs);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pine-color-text) !important;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;font:var(--pine-typography-body-medium);gap:var(--pine-dimension-xs);margin:calc(var(--pine-border-width) + 2px);padding:var(--pine-dimension-xs);text-align:start;text-decoration:none !important;width:calc(100% - (var(--pine-border-width) + 2px) * 2)}::slotted(.destructive){color:var(--pine-color-danger) !important}::slotted([aria-disabled=true]),::slotted([disabled]){cursor:not-allowed;opacity:0.5;pointer-events:none}";
|
|
9139
9139
|
|
|
9140
9140
|
/**
|
|
9141
9141
|
* @part menu-panel - Exposes the dropdown menu container for styling.
|
|
@@ -9165,14 +9165,22 @@ class PdsDropdownMenu {
|
|
|
9165
9165
|
this.slotEl = event.target;
|
|
9166
9166
|
// Get all elements assigned to this slot
|
|
9167
9167
|
const assignedElements = this.slotEl.assignedElements();
|
|
9168
|
-
//
|
|
9169
|
-
//
|
|
9170
|
-
|
|
9168
|
+
// Allowed elements: pds-dropdown-menu-item, pds-dropdown-menu-separator, <a>, <button>
|
|
9169
|
+
// Raw <a> and <button> elements are allowed for edge cases requiring native browser/framework
|
|
9170
|
+
// behavior (e.g., Rails UJS, Turbo) that cannot work through Shadow DOM.
|
|
9171
|
+
const allowedTags = ['pds-dropdown-menu-item', 'pds-dropdown-menu-separator', 'a', 'button'];
|
|
9172
|
+
const invalidElements = assignedElements.filter(el => !allowedTags.includes(el.tagName.toLowerCase()));
|
|
9171
9173
|
if (invalidElements.length > 0) {
|
|
9172
|
-
|
|
9173
|
-
|
|
9174
|
-
|
|
9175
|
-
|
|
9174
|
+
const invalidTags = invalidElements.map(el => el.tagName.toLowerCase()).join(', ');
|
|
9175
|
+
console.warn(`pds-dropdown-menu: Unexpected element(s) found: ${invalidTags}. ` +
|
|
9176
|
+
`Expected: ${allowedTags.join(', ')}`);
|
|
9177
|
+
}
|
|
9178
|
+
// Store all focusable items for keyboard navigation
|
|
9179
|
+
// This includes pds-dropdown-menu-item components and raw <a>/<button> elements
|
|
9180
|
+
this.menuItems = assignedElements.filter(el => {
|
|
9181
|
+
const tag = el.tagName.toLowerCase();
|
|
9182
|
+
return tag === 'pds-dropdown-menu-item' || tag === 'a' || tag === 'button';
|
|
9183
|
+
});
|
|
9176
9184
|
};
|
|
9177
9185
|
// Toggle dropdown open/closed
|
|
9178
9186
|
this.toggleDropdown = () => {
|
|
@@ -9241,31 +9249,66 @@ class PdsDropdownMenu {
|
|
|
9241
9249
|
this.cleanupAutoUpdate = null;
|
|
9242
9250
|
}
|
|
9243
9251
|
}
|
|
9252
|
+
// Check if a menu item is disabled (handles both component and raw elements)
|
|
9253
|
+
isItemDisabled(item) {
|
|
9254
|
+
const tagName = item.tagName.toLowerCase();
|
|
9255
|
+
if (tagName === 'pds-dropdown-menu-item') {
|
|
9256
|
+
return item.disabled;
|
|
9257
|
+
}
|
|
9258
|
+
else if (tagName === 'button') {
|
|
9259
|
+
return item.disabled;
|
|
9260
|
+
}
|
|
9261
|
+
else if (tagName === 'a') {
|
|
9262
|
+
return item.getAttribute('aria-disabled') === 'true';
|
|
9263
|
+
}
|
|
9264
|
+
return false;
|
|
9265
|
+
}
|
|
9244
9266
|
// Get the index of the currently focused menu item
|
|
9245
9267
|
getFocusedItemIndex() {
|
|
9246
9268
|
const activeElement = document.activeElement;
|
|
9247
9269
|
if (!activeElement)
|
|
9248
9270
|
return -1;
|
|
9249
|
-
|
|
9271
|
+
// For raw elements, check direct match
|
|
9272
|
+
// For pds-dropdown-menu-item, also check if the active element is inside the shadow root
|
|
9273
|
+
return this.menuItems.findIndex(item => {
|
|
9274
|
+
if (item === activeElement)
|
|
9275
|
+
return true;
|
|
9276
|
+
// Check if activeElement is inside the item's shadow root (for pds-dropdown-menu-item)
|
|
9277
|
+
if (item.tagName.toLowerCase() === 'pds-dropdown-menu-item') {
|
|
9278
|
+
const shadowRoot = item.shadowRoot;
|
|
9279
|
+
if (shadowRoot === null || shadowRoot === void 0 ? void 0 : shadowRoot.contains(activeElement))
|
|
9280
|
+
return true;
|
|
9281
|
+
}
|
|
9282
|
+
return false;
|
|
9283
|
+
});
|
|
9250
9284
|
}
|
|
9251
9285
|
// Focus a specific menu item by index
|
|
9252
9286
|
focusItemByIndex(index) {
|
|
9253
|
-
var _a, _b, _c, _d;
|
|
9287
|
+
var _a, _b, _c, _d, _e;
|
|
9254
9288
|
if (index >= 0 && index < this.menuItems.length) {
|
|
9255
9289
|
this.currentFocusIndex = index;
|
|
9256
|
-
|
|
9257
|
-
const
|
|
9258
|
-
|
|
9259
|
-
|
|
9260
|
-
|
|
9261
|
-
|
|
9262
|
-
|
|
9263
|
-
|
|
9264
|
-
|
|
9290
|
+
const item = this.menuItems[index];
|
|
9291
|
+
const tagName = item.tagName.toLowerCase();
|
|
9292
|
+
if (tagName === 'pds-dropdown-menu-item') {
|
|
9293
|
+
// For pds-dropdown-menu-item, focus the inner element
|
|
9294
|
+
const menuItem = item;
|
|
9295
|
+
const innerButton = (_a = menuItem.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('button');
|
|
9296
|
+
const innerLink = ((_d = (_c = (_b = menuItem.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('pds-link')) === null || _c === void 0 ? void 0 : _c.shadowRoot) === null || _d === void 0 ? void 0 : _d.querySelector('a'))
|
|
9297
|
+
|| ((_e = menuItem.shadowRoot) === null || _e === void 0 ? void 0 : _e.querySelector('a'));
|
|
9298
|
+
if (innerButton) {
|
|
9299
|
+
innerButton.focus();
|
|
9300
|
+
}
|
|
9301
|
+
else if (innerLink) {
|
|
9302
|
+
innerLink.focus();
|
|
9303
|
+
}
|
|
9304
|
+
else {
|
|
9305
|
+
// Fallback to focusing the host
|
|
9306
|
+
menuItem.focus();
|
|
9307
|
+
}
|
|
9265
9308
|
}
|
|
9266
9309
|
else {
|
|
9267
|
-
//
|
|
9268
|
-
|
|
9310
|
+
// For raw <a> or <button> elements, focus directly
|
|
9311
|
+
item.focus();
|
|
9269
9312
|
}
|
|
9270
9313
|
}
|
|
9271
9314
|
}
|
|
@@ -9275,7 +9318,7 @@ class PdsDropdownMenu {
|
|
|
9275
9318
|
// Skip disabled items
|
|
9276
9319
|
let attempts = 0;
|
|
9277
9320
|
const maxAttempts = this.menuItems.length;
|
|
9278
|
-
while (attempts < maxAttempts && this.menuItems[nextIndex]
|
|
9321
|
+
while (attempts < maxAttempts && this.isItemDisabled(this.menuItems[nextIndex])) {
|
|
9279
9322
|
nextIndex = (nextIndex + 1) % this.menuItems.length;
|
|
9280
9323
|
attempts++;
|
|
9281
9324
|
}
|
|
@@ -9292,7 +9335,7 @@ class PdsDropdownMenu {
|
|
|
9292
9335
|
// Skip disabled items
|
|
9293
9336
|
let attempts = 0;
|
|
9294
9337
|
const maxAttempts = this.menuItems.length;
|
|
9295
|
-
while (attempts < maxAttempts && this.menuItems[prevIndex]
|
|
9338
|
+
while (attempts < maxAttempts && this.isItemDisabled(this.menuItems[prevIndex])) {
|
|
9296
9339
|
prevIndex = prevIndex <= 0 ? this.menuItems.length - 1 : prevIndex - 1;
|
|
9297
9340
|
attempts++;
|
|
9298
9341
|
}
|
|
@@ -9323,7 +9366,7 @@ class PdsDropdownMenu {
|
|
|
9323
9366
|
if (this.menuItems.length > 0) {
|
|
9324
9367
|
// Find first non-disabled item
|
|
9325
9368
|
let firstIndex = 0;
|
|
9326
|
-
while (firstIndex < this.menuItems.length && this.menuItems[firstIndex]
|
|
9369
|
+
while (firstIndex < this.menuItems.length && this.isItemDisabled(this.menuItems[firstIndex])) {
|
|
9327
9370
|
firstIndex++;
|
|
9328
9371
|
}
|
|
9329
9372
|
if (firstIndex < this.menuItems.length) {
|
|
@@ -9336,7 +9379,7 @@ class PdsDropdownMenu {
|
|
|
9336
9379
|
if (this.menuItems.length > 0) {
|
|
9337
9380
|
// Find last non-disabled item
|
|
9338
9381
|
let lastIndex = this.menuItems.length - 1;
|
|
9339
|
-
while (lastIndex >= 0 && this.menuItems[lastIndex]
|
|
9382
|
+
while (lastIndex >= 0 && this.isItemDisabled(this.menuItems[lastIndex])) {
|
|
9340
9383
|
lastIndex--;
|
|
9341
9384
|
}
|
|
9342
9385
|
if (lastIndex >= 0) {
|
|
@@ -9366,7 +9409,7 @@ class PdsDropdownMenu {
|
|
|
9366
9409
|
event.preventDefault();
|
|
9367
9410
|
// Find the first non-disabled item
|
|
9368
9411
|
let firstFocusableIndex = 0;
|
|
9369
|
-
while (firstFocusableIndex < this.menuItems.length && this.menuItems[firstFocusableIndex]
|
|
9412
|
+
while (firstFocusableIndex < this.menuItems.length && this.isItemDisabled(this.menuItems[firstFocusableIndex])) {
|
|
9370
9413
|
firstFocusableIndex++;
|
|
9371
9414
|
}
|
|
9372
9415
|
if (firstFocusableIndex < this.menuItems.length) {
|
|
@@ -9378,7 +9421,7 @@ class PdsDropdownMenu {
|
|
|
9378
9421
|
event.preventDefault();
|
|
9379
9422
|
// Find the first non-disabled item
|
|
9380
9423
|
let firstFocusableIndex = 0;
|
|
9381
|
-
while (firstFocusableIndex < this.menuItems.length && this.menuItems[firstFocusableIndex]
|
|
9424
|
+
while (firstFocusableIndex < this.menuItems.length && this.isItemDisabled(this.menuItems[firstFocusableIndex])) {
|
|
9382
9425
|
firstFocusableIndex++;
|
|
9383
9426
|
}
|
|
9384
9427
|
if (firstFocusableIndex < this.menuItems.length) {
|
|
@@ -9401,7 +9444,7 @@ class PdsDropdownMenu {
|
|
|
9401
9444
|
}
|
|
9402
9445
|
}
|
|
9403
9446
|
render() {
|
|
9404
|
-
return (hAsync(Host, { key: '
|
|
9447
|
+
return (hAsync(Host, { key: '3144bc264072eccf89cdca45a0b28eb004b5d06e', id: this.componentId }, hAsync("slot", { key: '500288f266dc7ab7e1ac5070e628c31a6ed50861', name: "trigger", onSlotchange: this.handleTriggerSlotChange }), hAsync("pds-box", { key: '4085130e381b8be28e2e36de073c0755a455e30c', "border-radius": "sm", display: "flex", direction: "column", class: "pds-dropdown-menu--panel is-hidden", shadow: "100", role: "menu", "aria-orientation": "vertical", part: "menu-panel" }, hAsync("slot", { key: '2c4d53799576d1c6913df9bb854bfbaf50e5032c', onSlotchange: this.handleSlotChange }))));
|
|
9405
9448
|
}
|
|
9406
9449
|
get host() { return getElement(this); }
|
|
9407
9450
|
static get style() { return pdsDropdownMenuCss; }
|
|
@@ -9419,7 +9462,7 @@ class PdsDropdownMenu {
|
|
|
9419
9462
|
}; }
|
|
9420
9463
|
}
|
|
9421
9464
|
|
|
9422
|
-
const pdsDropdownMenuItemCss = ":host{cursor:pointer;display:-ms-flexbox;display:flex;width:100%;}:host(.is-disabled){cursor:not-allowed !important;opacity:0.5 !important}:host(.is-disabled) .pds-dropdown-menu-item__content{cursor:not-allowed !important;pointer-events:none !important}.pds-dropdown-menu-item__content{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:var(--pine-dimension-xs);color:var(--pine-color-text);display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;font:var(--pine-typography-body-medium);gap:var(--pine-dimension-xs);margin:calc(var(--pine-border-width) + 2px);padding:var(--pine-dimension-xs);text-align:start;width:100%;}.pds-dropdown-menu-item__content:hover{background-color:var(--pine-color-background-muted);color:var(--pine-color-text-hover)}.pds-dropdown-menu-item__content{}.pds-dropdown-menu-item__content:focus,.pds-dropdown-menu-item__content:focus-visible,.pds-dropdown-menu-item__content.has-focus{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}:host(.destructive) .pds-dropdown-menu-item__content{-ms-flex-align:center;align-items:center;color:var(--pine-color-danger)}:host(.destructive) .pds-dropdown-menu-item__content:hover{background-color:var(--pine-color-danger-disabled);color:var(--pine-color-danger-hover)}:host(.destructive) .pds-dropdown-menu-item__content:focus,:host(.destructive) .pds-dropdown-menu-item__content:focus-visible,:host(.destructive) .pds-dropdown-menu-item__content.has-focus{background-color:var(--pine-color-danger-disabled);outline:var(--pine-outline-focus-danger);outline-offset:var(--pine-border-width)}pds-link::part(link):focus,pds-link::part(link):focus-visible{-webkit-box-shadow:none;box-shadow:none;outline:none}pds-link::part(link){display:
|
|
9465
|
+
const pdsDropdownMenuItemCss = ":host{cursor:pointer;display:-ms-flexbox;display:flex;width:100%;}:host(.is-disabled){cursor:not-allowed !important;opacity:0.5 !important}:host(.is-disabled) .pds-dropdown-menu-item__content{cursor:not-allowed !important;pointer-events:none !important}.pds-dropdown-menu-item__content{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:var(--pine-dimension-xs);color:var(--pine-color-text);display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;font:var(--pine-typography-body-medium);gap:var(--pine-dimension-xs);margin:calc(var(--pine-border-width) + 2px);padding:var(--pine-dimension-xs);text-align:start;width:100%;}.pds-dropdown-menu-item__content:hover{background-color:var(--pine-color-background-muted);color:var(--pine-color-text-hover)}.pds-dropdown-menu-item__content{}.pds-dropdown-menu-item__content:focus,.pds-dropdown-menu-item__content:focus-visible,.pds-dropdown-menu-item__content.has-focus{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}:host(.destructive) .pds-dropdown-menu-item__content{--pds-context-link-color:var(--pine-color-danger);--pds-context-link-color-hover:var(--pine-color-danger-hover);-ms-flex-align:center;align-items:center;color:var(--pine-color-danger)}:host(.destructive) .pds-dropdown-menu-item__content:hover{background-color:var(--pine-color-danger-disabled);color:var(--pine-color-danger-hover)}:host(.destructive) .pds-dropdown-menu-item__content:focus,:host(.destructive) .pds-dropdown-menu-item__content:focus-visible,:host(.destructive) .pds-dropdown-menu-item__content.has-focus{background-color:var(--pine-color-danger-disabled);outline:var(--pine-outline-focus-danger);outline-offset:var(--pine-border-width)}pds-link::part(link):focus,pds-link::part(link):focus-visible{-webkit-box-shadow:none;box-shadow:none;outline:none}pds-link::part(link){-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);margin:calc(var(--pine-dimension-xs) * -1);padding:var(--pine-dimension-xs);text-decoration:none;width:calc(100% + var(--pine-dimension-xs) * 2)}";
|
|
9423
9466
|
|
|
9424
9467
|
class PdsDropdownMenuItem {
|
|
9425
9468
|
constructor(hostRef) {
|
|
@@ -10554,7 +10597,7 @@ const pdsInputTokensCss$1 = ":host{--pine-input-color-background-danger:var(--pi
|
|
|
10554
10597
|
|
|
10555
10598
|
const labelCss$4 = ":host{display:inline-block}:host([aria-disabled=true]) label{color:var(--pine-color-text-label-disabled)}:host([aria-readonly=true]) label{color:var(--pine-color-text-label-readonly)}label{color:var(--pine-color-text-label);font:var(--pine-typography-body-medium);letter-spacing:var(--pine-letter-spacing)}";
|
|
10556
10599
|
|
|
10557
|
-
const pdsInputCss = ":host{--pds-input-background:var(--pine-color-background-container);--pds-input-border-color:var(--pine-color-border);--pds-input-border-color-hover:var(--pine-color-border-hover);--pds-input-border-color-disabled:var(--pine-color-border-disabled);--pds-input-border-radius:var(--pine-dimension-125);--pds-input-border-width:var(--pine-border-width-thin);--pds-input-padding-x:var(--pine-dimension-150);--pds-input-padding-y:calc(var(--pine-dimension-xs) - var(--pine-border-width));--pds-input-font:var(--pine-typography-body);--pds-input-text-color:var(--pine-color-text-strong);--pds-input-placeholder-color:var(--pine-color-text-placeholder);--pds-input-icon-color:var(--pine-color-text-secondary);--pds-input-disabled-background:var(--pine-color-background-container-disabled);--pds-input-disabled-text-color:var(--pine-color-text-disabled);--pds-input-error-color:var(--pine-color-text-message-danger);--pds-input-error-background:var(--pine-input-color-background-danger);--pds-input-error-border:var(--pine-color-border-danger);--pds-input-error-border-hover:var(--pine-color-border-danger-hover);--pds-input-addon-background:var(--pine-color-background-subtle);--pds-input-addon-color:var(--pine-color-text-secondary);--pds-input-field-min-height:var(--pine-dimension-450);--box-shadow-focus:0 0 0 1px var(--pine-color-background-container), 0 0 0 3px var(--pine-color-focus-ring);--box-shadow-focus-error:0 0 0 1px var(--pine-color-background-container), 0 0 0 3px var(--pine-color-focus-ring-danger);display:inline}:host pds-select::part(select){background-color:var(--pds-input-error-background);border-color:var(--pds-input-error-border)}:host::part(prefix),:host::part(suffix){-ms-flex-align:center;align-items:center;color:var(--pine-color-text-label-readonly);display:-ms-flexbox;display:flex;height:100%;position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);white-space:nowrap;z-index:var(--pine-z-index-raised)}:host::part(prefix){border-end-start-radius:var(--pds-input-border-radius);-webkit-border-end:var(--pine-border-width-none);border-inline-end:var(--pine-border-width-none);border-start-start-radius:var(--pds-input-border-radius);left:var(--pds-input-padding-x)}:host::part(suffix){border-end-end-radius:var(--pds-input-border-radius);-webkit-border-start:var(--pine-border-width-none);border-inline-start:var(--pine-border-width-none);border-start-end-radius:var(--pds-input-border-radius);right:var(--pds-input-padding-x)}:host::part(prepend),:host::part(append){-ms-flex-align:center;align-items:center;background-color:var(--pds-input-addon-background);border:var(--pds-input-border-width) solid var(--pds-input-border-color);color:var(--pds-input-addon-color);display:-ms-flexbox;display:flex;overflow:visible}:host::part(prepend){border-end-start-radius:var(--pds-input-border-radius);-webkit-border-end:var(--pine-border-width-none);border-inline-end:var(--pine-border-width-none);border-start-start-radius:var(--pds-input-border-radius)}:host::part(append){border-end-end-radius:var(--pds-input-border-radius);-webkit-border-start:var(--pine-border-width-none);border-inline-start:var(--pine-border-width-none);border-start-end-radius:var(--pds-input-border-radius)}:host([has-prepend]) ::slotted(pds-button[slot=prepend]){--pds-button-background:var(--pds-input-addon-background);--pds-button-border:var(--pine-border-width-none);--pds-button-border-radius:var(--pine-dimension-none);--pds-button-border-radius-end-end:var(--pine-dimension-none);--pds-button-border-radius-start-end:var(--pine-dimension-none);--pds-button-border-radius-start-start:var(--pds-input-border-radius);--pds-button-border-radius-end-start:var(--pds-input-border-radius);--pds-button-min-height:calc(var(--pine-dimension-450) - calc(2 * var(--pine-border-width)));--pds-button-box-shadow-focus:0 0 0 3px var(--pine-color-focus-ring);--pds-button-outline-focus:none}:host([has-append]) ::slotted(pds-button[slot=append]){--pds-button-background:var(--pds-input-addon-background);--pds-button-border:var(--pine-border-width-none);--pds-button-border-radius:var(--pine-dimension-none);--pds-button-border-radius-end-start:var(--pine-dimension-none);--pds-button-border-radius-start-start:var(--pine-dimension-none);--pds-button-border-radius-start-end:var(--pds-input-border-radius);--pds-button-border-radius-end-end:var(--pds-input-border-radius);--pds-button-min-height:calc(var(--pine-dimension-450) - calc(2 * var(--pine-border-width)));--pds-button-box-shadow-focus:0 0 0 3px var(--pine-color-focus-ring);--pds-button-outline-focus:none}:host([has-prepend]) ::slotted(pds-select[slot=prepend]){--pds-select-background:var(--pds-input-addon-background);--pds-select-border:var(--pine-border-width-none);--pds-select-border-radius-end-end:var(--pine-dimension-none);--pds-select-border-radius-start-end:var(--pine-dimension-none);--pds-select-min-height:calc(var(--pine-dimension-450) - calc(2 * var(--pine-border-width)))}:host([has-append]) ::slotted(pds-select[slot=append]){--pds-select-background:var(--pds-input-addon-background);--pds-select-border:var(--pine-border-width-none);--pds-select-border-radius-end-start:var(--pine-dimension-none);--pds-select-border-radius-start-start:var(--pine-dimension-none);--pds-select-min-height:calc(var(--pine-dimension-450) - calc(2 * var(--pine-border-width)))}:host([aria-readonly=true]) input{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-readonly)}:host([disabled=true])::part(prepend),:host([disabled=true])::part(append){background-color:var(--pds-input-disabled-background);border:var(--pds-input-border-width) solid var(--pds-input-border-color-disabled)}:host([full-width=true]){width:100%}:host([invalid=true])::part(prepend),:host([invalid=true])::part(append){background-color:var(--pds-input-error-background);border:var(--pds-input-border-width) solid var(--pds-input-error-border)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([invalid]):not([aria-readonly=true])){--pds-input-background:var(--pine-color-accent-disabled);--pds-input-border-color:var(--pine-color-accent);--pds-input-border-color-hover:var(--pine-color-accent-hover);--pds-input-text-color:var(--pine-color-text-accent)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([invalid]):not([aria-readonly=true]))::part(prefix),:host([highlight]:not([disabled]):not([aria-disabled=true]):not([invalid]):not([aria-readonly=true]))::part(suffix){color:var(--pine-color-text-accent)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([invalid]):not([aria-readonly=true])) .pds-input__field:focus-visible{outline-color:var(--pine-color-focus-ring)}.pds-input{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.pds-input__label-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs)}.pds-input__label{color:var(--pine-color-text-strong);-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs)}.pds-input__label-wrapper .pds-input__label{-webkit-margin-after:0;margin-block-end:0}.pds-input__action{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);-webkit-margin-start:var(--pine-dimension-xs);margin-inline-start:var(--pine-dimension-xs)}.pds-input__field-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;position:relative;width:100%}.pds-input__field-wrapper.has-prefix .pds-input__field{-webkit-padding-start:calc(2 * var(--pds-input-padding-x) + var(--prefix-width, 1em));padding-inline-start:calc(2 * var(--pds-input-padding-x) + var(--prefix-width, 1em))}.pds-input__field-wrapper.has-suffix .pds-input__field{-webkit-padding-end:calc(2 * var(--pds-input-padding-x) + var(--suffix-width, 1em));padding-inline-end:calc(2 * var(--pds-input-padding-x) + var(--suffix-width, 1em))}.pds-input__field-wrapper.has-prepend .pds-input__field{border-end-start-radius:var(--pine-dimension-none);border-start-start-radius:var(--pine-dimension-none)}.pds-input__field-wrapper.has-append .pds-input__field{border-end-end-radius:var(--pine-dimension-none);border-start-end-radius:var(--pine-dimension-none)}.pds-input__field{background:var(--pds-input-background);border:var(--pds-input-border-width) solid var(--pds-input-border-color);border-radius:var(--pds-input-border-radius);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pds-input-text-color);-ms-flex:1;flex:1;font:var(--pds-input-font);letter-spacing:var(--pine-letter-spacing);min-height:var(--pds-input-field-min-height);min-width:var(--pine-dimension-none);padding:var(--pds-input-padding-y) var(--pds-input-padding-x);-webkit-transition:border-color 0.2s ease;transition:border-color 0.2s ease;width:100%}.pds-input__field:hover:not(:disabled){border-color:var(--pds-input-border-color-hover)}.pds-input__field:disabled{background:var(--pds-input-disabled-background);border-color:var(--pine-color-border-disabled);color:var(--pds-input-disabled-text-color);cursor:not-allowed}.pds-input__field:disabled::-webkit-input-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-input__field:disabled::-moz-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-input__field:disabled:-ms-input-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-input__field:disabled::-ms-input-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-input__field:disabled::placeholder{color:var(--pine-color-text-placeholder-disabled)}.has-error .pds-input__field:hover:not(:disabled){border-color:var(--pds-input-error-border-hover)}:host-context([data-theme=dark]) .has-error .pds-input__field:hover:not(:disabled){border-color:var(--pine-color-red-950)}.pds-input__field:focus-visible:not(.has-error){border-color:var(--pine-color-border-active);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width);position:relative;z-index:1}:host([has-prepend]) .pds-input__field:focus-visible:not(.has-error),:host([has-append]) .pds-input__field:focus-visible:not(.has-error),:host([has-prefix]) .pds-input__field:focus-visible:not(.has-error),:host([has-suffix]) .pds-input__field:focus-visible:not(.has-error){outline-offset:var(--pine-dimension-none)}.pds-input__field::-webkit-input-placeholder{color:var(--pds-input-placeholder-color)}.pds-input__field::-moz-placeholder{color:var(--pds-input-placeholder-color)}.pds-input__field:-ms-input-placeholder{color:var(--pds-input-placeholder-color)}.pds-input__field::-ms-input-placeholder{color:var(--pds-input-placeholder-color)}.pds-input__field::placeholder{color:var(--pds-input-placeholder-color)}.has-error .pds-input__field{background-color:var(--pds-input-error-background);border-color:var(--pds-input-error-border)}:host-context([data-theme=dark]) .has-error .pds-input__field{background-color:var(--pine-color-red-950)}.has-error .pds-input__field:focus-visible{outline-color:var(--pine-color-focus-ring-danger);position:relative;z-index:1}.pds-input__error-message,.pds-input__helper-message{color:var(--pine-color-text-message);font:var(--pine-typography-body-sm-medium);-webkit-margin-after:var(--pine-dimension-none);margin-block-end:var(--pine-dimension-none);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-input__error-message{color:var(--pds-input-error-color);display:-ms-flexbox;display:flex;gap:var(--pine-dimension-2xs)}.pds-input__error-message pds-icon{-webkit-margin-before:var(--pine-dimension-025);margin-block-start:var(--pine-dimension-025)}.visually-hidden{border:0;clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0, 0 0, 0 0);clip-path:polygon(0 0, 0 0, 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}";
|
|
10600
|
+
const pdsInputCss = ":host{--pds-input-background:var(--pine-color-background-container);--pds-input-border-color:var(--pine-color-border);--pds-input-border-color-hover:var(--pine-color-border-hover);--pds-input-border-color-disabled:var(--pine-color-border-disabled);--pds-input-border-radius:var(--pine-dimension-125);--pds-input-border-width:var(--pine-border-width-thin);--pds-input-padding-x:var(--pine-dimension-150);--pds-input-padding-y:calc(var(--pine-dimension-xs) - var(--pine-border-width));--pds-input-font:var(--pine-typography-body);--pds-input-text-color:var(--pine-color-text-strong);--pds-input-placeholder-color:var(--pine-color-text-placeholder);--pds-input-icon-color:var(--pine-color-text-secondary);--pds-input-disabled-background:var(--pine-color-background-container-disabled);--pds-input-disabled-text-color:var(--pine-color-text-disabled);--pds-input-error-color:var(--pine-color-text-message-danger);--pds-input-error-background:var(--pine-input-color-background-danger);--pds-input-error-border:var(--pine-color-border-danger);--pds-input-error-border-hover:var(--pine-color-border-danger-hover);--pds-input-addon-background:var(--pine-color-background-subtle);--pds-input-addon-color:var(--pine-color-text-secondary);--pds-input-field-min-height:var(--pine-dimension-450);--box-shadow-focus:0 0 0 1px var(--pine-color-background-container), 0 0 0 3px var(--pine-color-focus-ring);--box-shadow-focus-error:0 0 0 1px var(--pine-color-background-container), 0 0 0 3px var(--pine-color-focus-ring-danger);display:inline}:host pds-select::part(select){background-color:var(--pds-input-error-background);border-color:var(--pds-input-error-border)}:host::part(prefix),:host::part(suffix){-ms-flex-align:center;align-items:center;color:var(--pine-color-text-label-readonly);display:-ms-flexbox;display:flex;height:100%;position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);white-space:nowrap;z-index:var(--pine-z-index-raised)}:host::part(prefix){border-end-start-radius:var(--pds-input-border-radius);-webkit-border-end:var(--pine-border-width-none);border-inline-end:var(--pine-border-width-none);border-start-start-radius:var(--pds-input-border-radius);left:var(--pds-input-padding-x)}:host::part(suffix){border-end-end-radius:var(--pds-input-border-radius);-webkit-border-start:var(--pine-border-width-none);border-inline-start:var(--pine-border-width-none);border-start-end-radius:var(--pds-input-border-radius);right:var(--pds-input-padding-x)}:host::part(prepend),:host::part(append){-ms-flex-align:center;align-items:center;background-color:var(--pds-input-addon-background);border:var(--pds-input-border-width) solid var(--pds-input-border-color);color:var(--pds-input-addon-color);display:-ms-flexbox;display:flex;overflow:visible}:host::part(prepend){border-end-start-radius:var(--pds-input-border-radius);-webkit-border-end:var(--pine-border-width-none);border-inline-end:var(--pine-border-width-none);border-start-start-radius:var(--pds-input-border-radius)}:host::part(append){border-end-end-radius:var(--pds-input-border-radius);-webkit-border-start:var(--pine-border-width-none);border-inline-start:var(--pine-border-width-none);border-start-end-radius:var(--pds-input-border-radius)}:host([has-prepend]) ::slotted(pds-button[slot=prepend]){--pds-button-background:var(--pds-input-addon-background);--pds-button-border:var(--pine-border-width-none);--pds-button-border-radius:var(--pine-dimension-none);--pds-button-border-radius-end-end:var(--pine-dimension-none);--pds-button-border-radius-start-end:var(--pine-dimension-none);--pds-button-border-radius-start-start:var(--pds-input-border-radius);--pds-button-border-radius-end-start:var(--pds-input-border-radius);--pds-button-min-height:calc(var(--pine-dimension-450) - calc(2 * var(--pine-border-width)));--pds-button-box-shadow-focus:0 0 0 3px var(--pine-color-focus-ring);--pds-button-outline-focus:none}:host([has-append]) ::slotted(pds-button[slot=append]){--pds-button-background:var(--pds-input-addon-background);--pds-button-border:var(--pine-border-width-none);--pds-button-border-radius:var(--pine-dimension-none);--pds-button-border-radius-end-start:var(--pine-dimension-none);--pds-button-border-radius-start-start:var(--pine-dimension-none);--pds-button-border-radius-start-end:var(--pds-input-border-radius);--pds-button-border-radius-end-end:var(--pds-input-border-radius);--pds-button-min-height:calc(var(--pine-dimension-450) - calc(2 * var(--pine-border-width)));--pds-button-box-shadow-focus:0 0 0 3px var(--pine-color-focus-ring);--pds-button-outline-focus:none}:host([has-prepend]) ::slotted(pds-select[slot=prepend]){--pds-select-background:var(--pds-input-addon-background);--pds-select-border:var(--pine-border-width-none);--pds-select-border-radius-end-end:var(--pine-dimension-none);--pds-select-border-radius-start-end:var(--pine-dimension-none);--pds-select-min-height:calc(var(--pine-dimension-450) - calc(2 * var(--pine-border-width)))}:host([has-append]) ::slotted(pds-select[slot=append]){--pds-select-background:var(--pds-input-addon-background);--pds-select-border:var(--pine-border-width-none);--pds-select-border-radius-end-start:var(--pine-dimension-none);--pds-select-border-radius-start-start:var(--pine-dimension-none);--pds-select-min-height:calc(var(--pine-dimension-450) - calc(2 * var(--pine-border-width)))}:host([aria-readonly=true]) input{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-readonly)}:host([disabled=true])::part(prepend),:host([disabled=true])::part(append){background-color:var(--pds-input-disabled-background);border:var(--pds-input-border-width) solid var(--pds-input-border-color-disabled)}:host([full-width=true]){width:100%}:host([invalid=true])::part(prepend),:host([invalid=true])::part(append){background-color:var(--pds-input-error-background);border:var(--pds-input-border-width) solid var(--pds-input-error-border)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([invalid]):not([aria-readonly=true])){--pds-input-background:var(--pine-color-accent-disabled);--pds-input-border-color:var(--pine-color-accent);--pds-input-border-color-hover:var(--pine-color-accent-hover);--pds-input-text-color:var(--pine-color-text-accent)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([invalid]):not([aria-readonly=true]))::part(prefix),:host([highlight]:not([disabled]):not([aria-disabled=true]):not([invalid]):not([aria-readonly=true]))::part(suffix){color:var(--pine-color-text-accent)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([invalid]):not([aria-readonly=true])) .pds-input__field:focus-visible{outline-color:var(--pine-color-focus-ring)}.pds-input{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.pds-input__label-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs)}.pds-input__label{color:var(--pine-color-text-strong);-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs)}.pds-input__label-wrapper .pds-input__label{-webkit-margin-after:0;margin-block-end:0}.pds-input__action{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);-webkit-margin-start:var(--pine-dimension-xs);margin-inline-start:var(--pine-dimension-xs)}.pds-input__field-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;position:relative;width:100%}.pds-input__field-wrapper.has-prefix .pds-input__field{-webkit-padding-start:calc(2 * var(--pds-input-padding-x) + var(--prefix-width, 1em));padding-inline-start:calc(2 * var(--pds-input-padding-x) + var(--prefix-width, 1em))}.pds-input__field-wrapper.has-suffix .pds-input__field{-webkit-padding-end:calc(2 * var(--pds-input-padding-x) + var(--suffix-width, 1em));padding-inline-end:calc(2 * var(--pds-input-padding-x) + var(--suffix-width, 1em))}.pds-input__field-wrapper.has-prepend .pds-input__field{border-end-start-radius:var(--pine-dimension-none);border-start-start-radius:var(--pine-dimension-none)}.pds-input__field-wrapper.has-append .pds-input__field{border-end-end-radius:var(--pine-dimension-none);border-start-end-radius:var(--pine-dimension-none)}.pds-input__field{background:var(--pds-input-background);border:var(--pds-input-border-width) solid var(--pds-input-border-color);border-radius:var(--pds-input-border-radius);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pds-input-text-color);-ms-flex:1;flex:1;font:var(--pds-input-font);letter-spacing:var(--pine-letter-spacing);min-height:var(--pds-input-field-min-height);min-width:var(--pine-dimension-none);padding:var(--pds-input-padding-y) var(--pds-input-padding-x);-webkit-transition:border-color 0.2s ease;transition:border-color 0.2s ease;width:100%}.pds-input__field:hover:not(:disabled){border-color:var(--pds-input-border-color-hover)}.pds-input__field:disabled{background:var(--pds-input-disabled-background);border-color:var(--pine-color-border-disabled);color:var(--pds-input-disabled-text-color);cursor:not-allowed}.pds-input__field:disabled::-webkit-input-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-input__field:disabled::-moz-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-input__field:disabled:-ms-input-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-input__field:disabled::-ms-input-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-input__field:disabled::placeholder{color:var(--pine-color-text-placeholder-disabled)}.has-error .pds-input__field:hover:not(:disabled){border-color:var(--pds-input-error-border-hover)}:host-context([data-theme=dark]) .has-error .pds-input__field:hover:not(:disabled){border-color:var(--pine-color-red-950)}.pds-input__field:focus-visible:not(.has-error){border-color:var(--pine-color-border-active);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width);position:relative;z-index:1}:host([has-prepend]) .pds-input__field:focus-visible:not(.has-error),:host([has-append]) .pds-input__field:focus-visible:not(.has-error),:host([has-prefix]) .pds-input__field:focus-visible:not(.has-error),:host([has-suffix]) .pds-input__field:focus-visible:not(.has-error){outline-offset:var(--pine-dimension-none)}.pds-input__field::-webkit-input-placeholder{color:var(--pds-input-placeholder-color)}.pds-input__field::-moz-placeholder{color:var(--pds-input-placeholder-color)}.pds-input__field:-ms-input-placeholder{color:var(--pds-input-placeholder-color)}.pds-input__field::-ms-input-placeholder{color:var(--pds-input-placeholder-color)}.pds-input__field::placeholder{color:var(--pds-input-placeholder-color)}.has-error .pds-input__field{background-color:var(--pds-input-error-background);border-color:var(--pds-input-error-border)}:host-context([data-theme=dark]) .has-error .pds-input__field{background-color:var(--pine-color-red-950)}.has-error .pds-input__field:focus-visible{outline-color:var(--pine-color-focus-ring-danger);position:relative;z-index:1}.pds-input__error-message,.pds-input__helper-message{color:var(--pine-color-text-message);font:var(--pine-typography-body-sm-medium);-webkit-margin-after:var(--pine-dimension-none);margin-block-end:var(--pine-dimension-none);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-input__error-message{color:var(--pds-input-error-color);display:-ms-flexbox;display:flex;gap:var(--pine-dimension-2xs)}.pds-input__error-message pds-icon{-webkit-margin-before:var(--pine-dimension-025);margin-block-start:var(--pine-dimension-025)}.visually-hidden{border:0;clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0, 0 0, 0 0);clip-path:polygon(0 0, 0 0, 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.pds-input__field::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none;background-color:var(--pds-input-placeholder-color);cursor:pointer;height:var(--pine-dimension-sm);-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.646 3.646a.5.5 0 0 1 .708 0L8 7.293l3.646-3.647a.5.5 0 0 1 .708.708L8.707 8l3.647 3.646a.5.5 0 0 1-.708.708L8 8.707l-3.646 3.647a.5.5 0 0 1-.708-.708L7.293 8 3.646 4.354a.5.5 0 0 1 0-.708'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.646 3.646a.5.5 0 0 1 .708 0L8 7.293l3.646-3.647a.5.5 0 0 1 .708.708L8.707 8l3.647 3.646a.5.5 0 0 1-.708.708L8 8.707l-3.646 3.647a.5.5 0 0 1-.708-.708L7.293 8 3.646 4.354a.5.5 0 0 1 0-.708'/%3E%3C/svg%3E\");-webkit-mask-size:contain;mask-size:contain;width:var(--pine-dimension-sm)}";
|
|
10558
10601
|
|
|
10559
10602
|
/**
|
|
10560
10603
|
* @slot append - Content to be displayed after the input field
|
|
@@ -11593,6 +11636,10 @@ class PdsMultiselect {
|
|
|
11593
11636
|
this.creating = false;
|
|
11594
11637
|
// Flag to prevent focusout from closing during open transition
|
|
11595
11638
|
this.isOpening = false;
|
|
11639
|
+
// Flag to track if initial async fetch has been triggered (prevents double fetch)
|
|
11640
|
+
this.initialAsyncFetchTriggered = false;
|
|
11641
|
+
// Flag to track if value changed during loading and needs resolution after fetch completes
|
|
11642
|
+
this.pendingUnresolvedFetch = false;
|
|
11596
11643
|
this.handleTriggerClick = () => {
|
|
11597
11644
|
if (this.disabled)
|
|
11598
11645
|
return;
|
|
@@ -11716,6 +11763,12 @@ class PdsMultiselect {
|
|
|
11716
11763
|
this.updateOptionsFromSlot();
|
|
11717
11764
|
this.syncSelectedItems();
|
|
11718
11765
|
});
|
|
11766
|
+
// If we have preselected values and asyncUrl, fetch options to resolve them
|
|
11767
|
+
// This ensures the trigger shows "X items" instead of placeholder on initial render
|
|
11768
|
+
if (this.asyncUrl && this.ensureValueArray().length > 0) {
|
|
11769
|
+
this.initialAsyncFetchTriggered = true;
|
|
11770
|
+
this.fetchOptions('', 1);
|
|
11771
|
+
}
|
|
11719
11772
|
}
|
|
11720
11773
|
setupSlotChangeListener() {
|
|
11721
11774
|
var _a;
|
|
@@ -11759,6 +11812,21 @@ class PdsMultiselect {
|
|
|
11759
11812
|
}
|
|
11760
11813
|
this.syncSelectedItems();
|
|
11761
11814
|
this.updateFormValue();
|
|
11815
|
+
// If using asyncUrl and some values couldn't be resolved, fetch options
|
|
11816
|
+
// This handles programmatic value changes where the options aren't loaded yet
|
|
11817
|
+
if (this.asyncUrl) {
|
|
11818
|
+
const valueArray = this.ensureValueArray();
|
|
11819
|
+
const hasUnresolvedValues = valueArray.length > 0 && this.selectedItems.length < valueArray.length;
|
|
11820
|
+
if (hasUnresolvedValues) {
|
|
11821
|
+
if (this.loading) {
|
|
11822
|
+
// Mark that we need to re-check after current fetch completes
|
|
11823
|
+
this.pendingUnresolvedFetch = true;
|
|
11824
|
+
}
|
|
11825
|
+
else {
|
|
11826
|
+
this.fetchOptions('', 1);
|
|
11827
|
+
}
|
|
11828
|
+
}
|
|
11829
|
+
}
|
|
11762
11830
|
}
|
|
11763
11831
|
optionsChanged() {
|
|
11764
11832
|
if (this.options) {
|
|
@@ -12027,6 +12095,15 @@ class PdsMultiselect {
|
|
|
12027
12095
|
}
|
|
12028
12096
|
finally {
|
|
12029
12097
|
this.loading = false;
|
|
12098
|
+
// Check if value changed during loading and still has unresolved values
|
|
12099
|
+
if (this.pendingUnresolvedFetch) {
|
|
12100
|
+
this.pendingUnresolvedFetch = false;
|
|
12101
|
+
const valueArray = this.ensureValueArray();
|
|
12102
|
+
const hasUnresolvedValues = valueArray.length > 0 && this.selectedItems.length < valueArray.length;
|
|
12103
|
+
if (hasUnresolvedValues) {
|
|
12104
|
+
this.fetchOptions('', 1);
|
|
12105
|
+
}
|
|
12106
|
+
}
|
|
12030
12107
|
}
|
|
12031
12108
|
}
|
|
12032
12109
|
async createOption(query) {
|
|
@@ -12094,10 +12171,12 @@ class PdsMultiselect {
|
|
|
12094
12171
|
this.isOpening = true;
|
|
12095
12172
|
this.isOpen = true;
|
|
12096
12173
|
this.highlightedIndex = -1;
|
|
12097
|
-
// Trigger initial fetch if async
|
|
12098
|
-
if (this.asyncUrl && this.internalOptions.length === 0) {
|
|
12174
|
+
// Trigger initial fetch if async (skip if already fetching from componentDidLoad)
|
|
12175
|
+
if (this.asyncUrl && this.internalOptions.length === 0 && !this.initialAsyncFetchTriggered) {
|
|
12099
12176
|
this.debouncedFetchAsyncOptions(this.searchQuery, 1);
|
|
12100
12177
|
}
|
|
12178
|
+
// Reset the flag so subsequent opens can fetch if needed
|
|
12179
|
+
this.initialAsyncFetchTriggered = false;
|
|
12101
12180
|
requestAnimationFrame(() => {
|
|
12102
12181
|
var _a;
|
|
12103
12182
|
this.positionDropdown();
|
|
@@ -12236,19 +12315,19 @@ class PdsMultiselect {
|
|
|
12236
12315
|
}
|
|
12237
12316
|
render() {
|
|
12238
12317
|
const hasSelections = this.selectedItems.length > 0;
|
|
12239
|
-
return (hAsync(Host, { key: '
|
|
12318
|
+
return (hAsync(Host, { key: '52253faa88bce1a67e657e160b2d260ff92bc28b', "aria-disabled": this.disabled ? 'true' : null }, hAsync("div", { key: '43f73781a96bd421b7079984aaf4e1905a2ec29e', class: "pds-multiselect" }, this.label && (hAsync("label", { key: '926e23ac24621da0af4336bfc64b9d4a6d44579b', htmlFor: this.componentId, class: {
|
|
12240
12319
|
'pds-multiselect__label': true,
|
|
12241
12320
|
'visually-hidden': this.hideLabel,
|
|
12242
|
-
} }, this.label)), hAsync("div", { key: '
|
|
12321
|
+
} }, this.label)), hAsync("div", { key: '5051808a8b883ee8b5e7e3acef927091f206aaaf', class: "pds-multiselect__wrapper", ref: el => (this.containerEl = el), onFocusout: this.handleContainerFocusOut, style: { width: this.triggerWidth } }, hAsync("button", { key: '4590bd41e14927fc9d652e0920b0cd7900bf4b1a', ref: el => (this.triggerEl = el), type: "button", class: {
|
|
12243
12322
|
'pds-multiselect__trigger': true,
|
|
12244
12323
|
'pds-multiselect__trigger--open': this.isOpen,
|
|
12245
12324
|
'pds-multiselect__trigger--disabled': this.disabled,
|
|
12246
12325
|
'pds-multiselect__trigger--invalid': this.invalid || !!this.errorMessage,
|
|
12247
12326
|
'pds-multiselect__trigger--has-value': hasSelections,
|
|
12248
|
-
}, id: this.componentId, disabled: this.disabled, "aria-required": this.required ? 'true' : undefined, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-haspopup": "listbox", "aria-describedby": assignDescription(this.componentId, this.invalid || !!this.errorMessage, this.errorMessage || this.helperMessage), "aria-invalid": this.invalid || !!this.errorMessage ? 'true' : undefined, onClick: this.handleTriggerClick, onKeyDown: this.handleTriggerKeyDown }, hAsync("span", { key: '
|
|
12327
|
+
}, id: this.componentId, disabled: this.disabled, "aria-required": this.required ? 'true' : undefined, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-haspopup": "listbox", "aria-describedby": assignDescription(this.componentId, this.invalid || !!this.errorMessage, this.errorMessage || this.helperMessage), "aria-invalid": this.invalid || !!this.errorMessage ? 'true' : undefined, onClick: this.handleTriggerClick, onKeyDown: this.handleTriggerKeyDown }, hAsync("span", { key: '3033d029f02288071a16b2ef4a5399bb4b86ae7e', class: {
|
|
12249
12328
|
'pds-multiselect__trigger-text': true,
|
|
12250
12329
|
'pds-multiselect__trigger-text--placeholder': !hasSelections,
|
|
12251
|
-
} }, this.getTriggerText()), hAsync("pds-icon", { key: '
|
|
12330
|
+
} }, this.getTriggerText()), hAsync("pds-icon", { key: '4d971d7a95e5e47c9141a6614f71b194bfa74dfb', class: "pds-multiselect__icon", icon: enlarge })), this.renderDropdown()), this.helperMessage && !(this.errorMessage && this.errorMessage.length > 0) && (hAsync("p", { key: '3571fafc7c78f785ccd7a1a8d73675b5e33fa317', class: "pds-multiselect__helper", id: messageId(this.componentId, 'helper') }, this.helperMessage)), this.errorMessage && (hAsync("p", { key: '4acd308de067093578520a4ec85f299960f6e2c0', class: "pds-multiselect__error", id: messageId(this.componentId, 'error') }, hAsync("pds-icon", { key: 'a4cdf56804b77e474b9c757512ed6da54ddc5535', icon: danger, size: "small" }), this.errorMessage)), hAsync("div", { key: '10eac87a742d793b3f4e3acb55bbe469b547e3d3', style: { display: 'none' } }, hAsync("slot", { key: '1d55851a6f4a35f86684af5be7b6c840c2ed083b' })))));
|
|
12252
12331
|
}
|
|
12253
12332
|
static get formAssociated() { return true; }
|
|
12254
12333
|
get el() { return getElement(this); }
|
|
@@ -16600,9 +16679,12 @@ class PdsTable {
|
|
|
16600
16679
|
this.setupResponsiveScrolling();
|
|
16601
16680
|
}
|
|
16602
16681
|
// Apply default sort if specified
|
|
16682
|
+
// Use requestAnimationFrame to defer until child components are fully initialized
|
|
16603
16683
|
if (this.defaultSortColumn) {
|
|
16604
|
-
|
|
16605
|
-
|
|
16684
|
+
requestAnimationFrame(() => {
|
|
16685
|
+
void this.applyDefaultSort().catch((err) => {
|
|
16686
|
+
console.warn('Failed to apply default sort.', err);
|
|
16687
|
+
});
|
|
16606
16688
|
});
|
|
16607
16689
|
}
|
|
16608
16690
|
}
|