@pine-ds/core 3.27.0 → 3.28.0
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/i18n-format.js +1 -0
- package/components/pds-alert.js +1 -1
- package/components/pds-avatar.js +1 -1
- package/components/pds-chip2.js +1 -1
- package/components/pds-multiselect.js +1 -1
- package/components/pds-textarea.js +1 -1
- package/components/pds-toast.js +1 -1
- package/dist/cjs/i18n-format-CrpIhahc.js +64 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/pds-alert.cjs.entry.js +7 -1
- package/dist/cjs/pds-avatar.cjs.entry.js +8 -2
- package/dist/cjs/pds-chip.cjs.entry.js +8 -3
- package/dist/cjs/pds-multiselect.cjs.entry.js +91 -12
- package/dist/cjs/pds-textarea.cjs.entry.js +12 -5
- package/dist/cjs/pds-toast.cjs.entry.js +9 -3
- package/dist/cjs/pine-core.cjs.js +1 -1
- package/dist/collection/components/pds-alert/pds-alert.js +30 -1
- package/dist/collection/components/pds-avatar/pds-avatar.js +31 -2
- package/dist/collection/components/pds-chip/pds-chip.js +31 -3
- package/dist/collection/components/pds-multiselect/pds-multiselect.js +358 -17
- package/dist/collection/components/pds-textarea/pds-textarea.js +35 -5
- package/dist/collection/components/pds-toast/pds-toast.js +32 -3
- package/dist/collection/i18n/i18n-format.js +59 -0
- package/dist/collection/i18n/index.js +1 -0
- package/dist/docs.json +505 -6
- package/dist/esm/i18n-format-BKsJZTyn.js +61 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pds-alert.entry.js +7 -1
- package/dist/esm/pds-avatar.entry.js +8 -2
- package/dist/esm/pds-chip.entry.js +8 -3
- package/dist/esm/pds-multiselect.entry.js +91 -12
- package/dist/esm/pds-textarea.entry.js +12 -5
- package/dist/esm/pds-toast.entry.js +9 -3
- package/dist/esm/pine-core.js +1 -1
- package/dist/esm-es5/i18n-format-BKsJZTyn.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/pds-alert.entry.js +1 -1
- package/dist/esm-es5/pds-avatar.entry.js +1 -1
- package/dist/esm-es5/pds-chip.entry.js +1 -1
- package/dist/esm-es5/pds-multiselect.entry.js +1 -1
- package/dist/esm-es5/pds-textarea.entry.js +1 -1
- package/dist/esm-es5/pds-toast.entry.js +1 -1
- package/dist/esm-es5/pine-core.js +1 -1
- package/dist/pine-core/p-041243ee.system.entry.js +1 -0
- package/dist/pine-core/{p-7b71f1bf.system.entry.js → p-1f4910b0.system.entry.js} +1 -1
- package/dist/pine-core/p-25f8690f.entry.js +1 -0
- package/dist/pine-core/p-2af1d1d3.system.entry.js +1 -0
- package/dist/pine-core/p-2cc1ec4c.entry.js +1 -0
- package/dist/pine-core/{p-1e1804ed.system.entry.js → p-5f36fafa.system.entry.js} +1 -1
- package/dist/pine-core/p-621fdce1.entry.js +1 -0
- package/dist/pine-core/{p-b0b6acdb.system.entry.js → p-8a00e32b.system.entry.js} +1 -1
- package/dist/pine-core/p-BKsJZTyn.js +1 -0
- package/dist/pine-core/p-C61CFP22.system.js +1 -1
- package/dist/pine-core/p-Cr7-rJtJ.system.js +1 -0
- package/dist/pine-core/p-af48e6ae.entry.js +1 -0
- package/dist/pine-core/{p-cce6dcf0.system.entry.js → p-c7c17fe3.system.entry.js} +1 -1
- package/dist/pine-core/p-e48161a5.entry.js +1 -0
- package/dist/pine-core/p-fda3f3c6.entry.js +1 -0
- package/dist/pine-core/pine-core.esm.js +1 -1
- package/dist/types/components/pds-alert/pds-alert.d.ts +6 -0
- package/dist/types/components/pds-avatar/pds-avatar.d.ts +6 -0
- package/dist/types/components/pds-chip/pds-chip.d.ts +5 -0
- package/dist/types/components/pds-multiselect/pds-multiselect.d.ts +67 -4
- package/dist/types/components/pds-textarea/pds-textarea.d.ts +6 -0
- package/dist/types/components/pds-toast/pds-toast.d.ts +6 -0
- package/dist/types/components.d.ts +187 -9
- package/dist/types/i18n/i18n-format.d.ts +38 -0
- package/dist/types/i18n/index.d.ts +2 -0
- package/hydrate/index.js +211 -28
- package/hydrate/index.mjs +211 -28
- package/package.json +3 -2
- package/dist/pine-core/p-190ba1df.entry.js +0 -1
- package/dist/pine-core/p-638e9cb3.entry.js +0 -1
- package/dist/pine-core/p-68121613.system.entry.js +0 -1
- package/dist/pine-core/p-829c52dc.entry.js +0 -1
- package/dist/pine-core/p-a739bdfa.entry.js +0 -1
- package/dist/pine-core/p-b88be8be.entry.js +0 -1
- package/dist/pine-core/p-f2315f2a.entry.js +0 -1
- package/dist/pine-core/p-f928817f.system.entry.js +0 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* i18n formatting helpers for Pine components.
|
|
3
|
+
*
|
|
4
|
+
* Pine stays string-agnostic: user-facing text is supplied by the consumer as
|
|
5
|
+
* props (English-defaulted). These helpers only handle the two things a prop
|
|
6
|
+
* value can't express on its own — interpolating live component state into a
|
|
7
|
+
* translated template, and picking the right plural form. No stored strings, no
|
|
8
|
+
* locale registry; the locale is read from the DOM (`lang`), the web-standard
|
|
9
|
+
* signal a consumer already sets.
|
|
10
|
+
*
|
|
11
|
+
* Two limitations of DOM-`lang` locale resolution, both inherent to inferring
|
|
12
|
+
* locale from the DOM rather than being told it:
|
|
13
|
+
*
|
|
14
|
+
* 1. Not reactive. `resolveLocale` is read during render; Stencil has no
|
|
15
|
+
* reactive dependency on a DOM attribute, so changing `lang` at runtime
|
|
16
|
+
* (`document.documentElement.lang = 'pl'`) does NOT re-render mounted
|
|
17
|
+
* components — the plural form stays stale until unrelated state forces a
|
|
18
|
+
* render. Fine when locale changes via full-page navigation; a consumer that
|
|
19
|
+
* switches locale client-side should pass the already-formatted/pluralized
|
|
20
|
+
* string as the prop instead.
|
|
21
|
+
* 2. Does not cross shadow boundaries. `el.closest('[lang]')` stops at the host's
|
|
22
|
+
* shadow root. A Pine component nested inside another custom element whose
|
|
23
|
+
* `lang` sits on that outer host will not see it and falls back to
|
|
24
|
+
* `document.documentElement.lang`. Set `lang` on (or above) the Pine element
|
|
25
|
+
* in the same tree, or pass a pre-formatted string, when that matters.
|
|
26
|
+
*/
|
|
27
|
+
/** Replace `{token}` placeholders with `vars`; unknown tokens stay literal. */
|
|
28
|
+
function formatMessage(template, vars) {
|
|
29
|
+
if (!vars)
|
|
30
|
+
return template;
|
|
31
|
+
return template.replace(/\{(\w+)\}/g, (_match, key) => key in vars ? String(vars[key]) : `{${key}}`);
|
|
32
|
+
}
|
|
33
|
+
/** Nearest `[lang]` ancestor, then `<html lang>`, then `'en'`. */
|
|
34
|
+
function resolveLocale(el) {
|
|
35
|
+
var _a;
|
|
36
|
+
const fromEl = el && typeof el.closest === 'function' ? (_a = el.closest('[lang]')) === null || _a === void 0 ? void 0 : _a.getAttribute('lang') : null;
|
|
37
|
+
const fromDoc = typeof document !== 'undefined' ? document.documentElement.lang : '';
|
|
38
|
+
return fromEl || fromDoc || 'en';
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Pick the CLDR plural form for `count` in the element's locale (via the
|
|
42
|
+
* platform `Intl.PluralRules`) and interpolate `{count}`. `forms` come from the
|
|
43
|
+
* caller — component props, English-defaulted — and fall back to `other`.
|
|
44
|
+
*/
|
|
45
|
+
function pluralize(el, count, forms, vars) {
|
|
46
|
+
let category = 'other';
|
|
47
|
+
try {
|
|
48
|
+
category = new Intl.PluralRules(resolveLocale(el)).select(count);
|
|
49
|
+
}
|
|
50
|
+
catch (_a) {
|
|
51
|
+
/* invalid locale tag → fall back to 'other' */
|
|
52
|
+
}
|
|
53
|
+
// Prefer the selected category, then the required `other`, then `one`; never
|
|
54
|
+
// return empty. `||` (not `??`) so an empty-string form is skipped too, not
|
|
55
|
+
// treated as present — a bare `{count}` still shows the number rather than
|
|
56
|
+
// leaving the trigger with no accessible name.
|
|
57
|
+
const template = forms[category] || forms.other || forms.one || '{count}';
|
|
58
|
+
return formatMessage(template, Object.assign({ count }, vars));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export { formatMessage as f, pluralize as p };
|
package/dist/esm/loader.js
CHANGED
|
@@ -4,7 +4,7 @@ export { s as setNonce } from './index-CaRgVPt7.js';
|
|
|
4
4
|
const defineCustomElements = async (win, options) => {
|
|
5
5
|
if (typeof window === 'undefined') return undefined;
|
|
6
6
|
await globalScripts();
|
|
7
|
-
return bootstrapLazy(JSON.parse("[[\"pds-multiselect\",[[321,\"pds-multiselect\",{\"componentId\":[1,\"component-id\"],\"label\":[1],\"placeholder\":[1],\"searchPlaceholder\":[1,\"search-placeholder\"],\"closePanelOnSelect\":[4,\"close-panel-on-select\"],\"name\":[1],\"value\":[1040],\"disabled\":[4],\"asyncUrl\":[1,\"async-url\"],\"asyncMethod\":[1,\"async-method\"],\"debounce\":[2],\"fetchTimeout\":[2,\"fetch-timeout\"],\"maxSelections\":[2,\"max-selections\"],\"maxHeight\":[1,\"max-height\"],\"triggerWidth\":[1,\"trigger-width\"],\"minWidth\":[1,\"min-width\"],\"panelWidth\":[1,\"panel-width\"],\"hideLabel\":[4,\"hide-label\"],\"hideSelectedItems\":[4,\"hide-selected-items\"],\"selectedDisplay\":[1,\"selected-display\"],\"pillPosition\":[1,\"pill-position\"],\"maxInlinePills\":[2,\"max-inline-pills\"],\"errorMessage\":[1,\"error-message\"],\"helperMessage\":[1,\"helper-message\"],\"invalid\":[4],\"required\":[4],\"loading\":[1028],\"options\":[16],\"formatResult\":[16],\"createUrl\":[1,\"create-url\"],\"csrfToken\":[1,\"csrf-token\"],\"csrfHeaderName\":[1,\"csrf-header-name\"],\"isOpen\":[32],\"searchQuery\":[32],\"highlightedIndex\":[32],\"internalOptions\":[32],\"selectedItems\":[32],\"currentPage\":[32],\"hasMore\":[32],\"creating\":[32],\"removalAnnouncement\":[32],\"setFocus\":[64],\"clear\":[64]},[[8,\"keydown\",\"handleWindowKeyDown\"]],{\"debounce\":[{\"setupDebounce\":0}],\"value\":[{\"valueChanged\":0}],\"options\":[{\"optionsChanged\":0}],\"internalOptions\":[{\"internalOptionsChanged\":0}]}]]],[\"pds-combobox\",[[321,\"pds-combobox\",{\"componentId\":[1,\"component-id\"],\"name\":[513],\"customOptionLayouts\":[4,\"custom-option-layouts\"],\"customTriggerContent\":[4,\"custom-trigger-content\"],\"disabled\":[4],\"dropdownPlacement\":[1,\"dropdown-placement\"],\"dropdownWidth\":[1,\"dropdown-width\"],\"dropdownMount\":[1,\"dropdown-mount\"],\"hideLabel\":[4,\"hide-label\"],\"label\":[1],\"maxHeight\":[1,\"max-height\"],\"mode\":[1],\"placeholder\":[1],\"trigger\":[1],\"triggerWidth\":[1,\"trigger-width\"],\"triggerVariant\":[1,\"trigger-variant\"],\"triggerShape\":[1,\"trigger-shape\"],\"chipSentiment\":[1,\"chip-sentiment\"],\"chipLarge\":[4,\"chip-large\"],\"chipIcon\":[1,\"chip-icon\"],\"chipDot\":[4,\"chip-dot\"],\"value\":[1025],\"asyncUrl\":[1,\"async-url\"],\"asyncMethod\":[1,\"async-method\"],\"debounce\":[2],\"fetchTimeout\":[2,\"fetch-timeout\"],\"loading\":[1028],\"options\":[16],\"formatResult\":[16],\"displayText\":[32],\"filteredItems\":[32],\"highlightedIndex\":[32],\"isOpen\":[32],\"selectedOption\":[32],\"selectedOptionLayoutContent\":[32],\"selectedOptionChipProps\":[32],\"internalOptions\":[32],\"currentPage\":[32],\"hasMore\":[32],\"setFocus\":[64],\"getSelectedValue\":[64]},null,{\"isOpen\":[{\"isOpenChanged\":0}],\"debounce\":[{\"setupDebounce\":0}],\"options\":[{\"optionsChanged\":0}],\"value\":[{\"handleValueChange\":0}],\"selectedOption\":[{\"handleSelectedOptionChange\":0}]}]]],[\"pds-alert\",[[257,\"pds-alert\",{\"componentId\":[1,\"component-id\"],\"heading\":[1],\"small\":[4],\"dismissible\":[4],\"hideIcon\":[4,\"hide-icon\"],\"variant\":[1],\"hasActionsContent\":[32]}]]],[\"pds-copytext\",[[1,\"pds-copytext\",{\"border\":[516],\"componentId\":[1,\"component-id\"],\"fullWidth\":[4,\"full-width\"],\"truncate\":[4],\"value\":[1]},null,{\"truncate\":[{\"handleTruncateChange\":0}],\"value\":[{\"handleValueChange\":0}]}]]],[\"pds-table-head\",[[257,\"pds-table-head\",{\"indeterminate\":[1028],\"isSelected\":[1028,\"is-selected\"],\"border\":[516],\"background\":[516]}]]],[\"pds-table-row\",[[257,\"pds-table-row\",{\"indeterminate\":[1028],\"isSelected\":[1028,\"is-selected\"],\"hasDivider\":[32],\"isLastRow\":[32]}]]],[\"pds-dropdown-menu-item\",[[257,\"pds-dropdown-menu-item\",{\"componentId\":[1,\"component-id\"],\"destructive\":[4],\"disabled\":[516],\"download\":[1],\"href\":[1],\"external\":[516],\"target\":[513],\"hasFocus\":[32],\"clickItem\":[64]}]]],[\"pds-property\",[[257,\"pds-property\",{\"componentId\":[1,\"component-id\"],\"icon\":[1]}]]],[\"pds-accordion\",[[257,\"pds-accordion\",{\"componentId\":[1,\"component-id\"],\"isOpen\":[1540,\"open\"]},null,{\"isOpen\":[{\"handleOpenState\":0}]}]]],[\"pds-avatar\",[[1,\"pds-avatar\",{\"alt\":[1],\"badge\":[4],\"componentId\":[1,\"component-id\"],\"dropdown\":[4],\"image\":[1],\"initials\":[1],\"size\":[513],\"variant\":[513]}]]],[\"pds-dropdown-menu\",[[257,\"pds-dropdown-menu\",{\"componentId\":[1,\"component-id\"],\"placement\":[1],\"currentFocusIndex\":[32]},[[8,\"keydown\",\"handleKeyDown\"],[8,\"click\",\"handleWindowClick\"]]]]],[\"pds-filter\",[[257,\"pds-filter\",{\"componentId\":[1,\"component-id\"],\"variant\":[1],\"icon\":[1],\"text\":[1],\"isOpen\":[32],\"showFilter\":[64],\"hideFilter\":[64]},[[9,\"resize\",\"handleWindowResize\"],[9,\"scroll\",\"handleWindowScroll\"],[4,\"toggle\",\"handlePopoverToggle\"],[4,\"click\",\"handleDocumentClick\"],[4,\"keydown\",\"handleEscapeKey\"]]]]],[\"pds-input\",[[321,\"pds-input\",{\"autocomplete\":[1],\"componentId\":[1,\"component-id\"],\"debounce\":[2],\"disabled\":[4],\"errorMessage\":[1,\"error-message\"],\"helperMessage\":[1,\"helper-message\"],\"invalid\":[4],\"label\":[1],\"hideLabel\":[4,\"hide-label\"],\"max\":[1],\"maxlength\":[1],\"min\":[1],\"minlength\":[1],\"name\":[1],\"pattern\":[1],\"placeholder\":[1],\"readonly\":[4],\"required\":[4],\"step\":[1],\"type\":[1],\"value\":[1032],\"fullWidth\":[4,\"full-width\"],\"highlight\":[516],\"hasPrefix\":[32],\"hasSuffix\":[32],\"hasPrepend\":[32],\"hasAppend\":[32],\"hasAction\":[32],\"hasFocus\":[32],\"setFocus\":[64]},null,{\"debounce\":[{\"debounceChanged\":0}],\"value\":[{\"valueChanged\":0}]}]]],[\"pds-radio\",[[262,\"pds-radio\",{\"checked\":[4],\"componentId\":[1,\"component-id\"],\"disabled\":[4],\"errorMessage\":[1,\"error-message\"],\"helperMessage\":[1,\"helper-message\"],\"hasBorder\":[4,\"has-border\"],\"invalid\":[4],\"label\":[1],\"hideLabel\":[4,\"hide-label\"],\"name\":[1],\"required\":[4],\"value\":[1],\"_hasImage\":[32]}]]],[\"pds-radio-group\",[[262,\"pds-radio-group\",{\"componentId\":[1,\"component-id\"],\"direction\":[1],\"errorMessage\":[1,\"error-message\"],\"helperMessage\":[1,\"helper-message\"],\"gap\":[1],\"disabled\":[4],\"invalid\":[4],\"groupLabel\":[1,\"group-label\"],\"name\":[1],\"required\":[4]},[[0,\"change\",\"handleRadioChange\"]],{\"name\":[{\"handlePropsChange\":0}],\"disabled\":[{\"handlePropsChange\":0}],\"invalid\":[{\"handlePropsChange\":0}],\"required\":[{\"handlePropsChange\":0}]}]]],[\"pds-select\",[[321,\"pds-select\",{\"autocomplete\":[1],\"componentId\":[1,\"component-id\"],\"disabled\":[4],\"errorMessage\":[1,\"error-message\"],\"hideLabel\":[4,\"hide-label\"],\"helperMessage\":[1,\"helper-message\"],\"invalid\":[4],\"label\":[1],\"multiple\":[4],\"name\":[1],\"required\":[4],\"highlight\":[516],\"value\":[1025]},null,{\"value\":[{\"valueChanged\":0}],\"multiple\":[{\"multipleChanged\":0}]}]]],[\"pds-sortable-item\",[[262,\"pds-sortable-item\",{\"enableActions\":[4,\"enable-actions\"],\"componentId\":[1,\"component-id\"],\"showHandle\":[1028,\"show-handle\"]}]]],[\"pds-switch\",[[65,\"pds-switch\",{\"componentId\":[1,\"component-id\"],\"checked\":[1028],\"disabled\":[4],\"errorMessage\":[1,\"error-message\"],\"hideLabel\":[4,\"hide-label\"],\"helperMessage\":[1,\"helper-message\"],\"invalid\":[4],\"label\":[1],\"name\":[1],\"required\":[4],\"value\":[1]},null,{\"checked\":[{\"checkedChanged\":0}]}]]],[\"pds-textarea\",[[321,\"pds-textarea\",{\"autocomplete\":[1],\"componentId\":[1,\"component-id\"],\"disabled\":[4],\"debounce\":[2],\"errorMessage\":[1,\"error-message\"],\"helperMessage\":[1,\"helper-message\"],\"invalid\":[1028],\"label\":[1],\"hideLabel\":[4,\"hide-label\"],\"name\":[1],\"placeholder\":[1],\"readonly\":[4],\"required\":[4],\"rows\":[2],\"maxLength\":[514,\"max-length\"],\"highlight\":[516],\"value\":[1025],\"hasFocus\":[32],\"hasAction\":[32],\"setFocus\":[64]},null,{\"debounce\":[{\"debounceChanged\":0}],\"value\":[{\"valueChanged\":0}],\"maxLength\":[{\"maxLengthChanged\":0}]}]]],[\"pds-toast\",[[257,\"pds-toast\",{\"componentId\":[1,\"component-id\"],\"dismissible\":[4],\"duration\":[2],\"icon\":[1],\"type\":[1],\"isVisible\":[32],\"isAnimatingOut\":[32],\"dismiss\":[64]},null,{\"duration\":[{\"handleDurationChange\":0}]}]]],[\"mock-pds-modal\",[[260,\"mock-pds-modal\",{\"componentId\":[1,\"component-id\"],\"size\":[1],\"scrollable\":[4],\"backdropDismiss\":[4,\"backdrop-dismiss\"],\"open\":[1028],\"showModal\":[64],\"hideModal\":[64]}]]],[\"pds-container\",[[257,\"pds-container\",{\"size\":[1],\"tag\":[1],\"centered\":[4]}]]],[\"pds-divider\",[[1,\"pds-divider\",{\"componentId\":[1,\"component-id\"],\"offset\":[1],\"vertical\":[4]}]]],[\"pds-dropdown-menu-separator\",[[1,\"pds-dropdown-menu-separator\",{\"componentId\":[1,\"component-id\"],\"disabled\":[4]}]]],[\"pds-filters\",[[257,\"pds-filters\",{\"componentId\":[1,\"component-id\"]}]]],[\"pds-image\",[[1,\"pds-image\",{\"alt\":[1],\"componentId\":[1,\"component-id\"],\"height\":[2],\"loading\":[1],\"sizes\":[1],\"src\":[1],\"srcset\":[1],\"width\":[2]}]]],[\"pds-modal\",[[260,\"pds-modal\",{\"backdropDismiss\":[4,\"backdrop-dismiss\"],\"componentId\":[1,\"component-id\"],\"open\":[1028],\"size\":[1],\"scrollable\":[4],\"focusableElementsArray\":[32],\"showModal\":[64],\"hideModal\":[64]},null,{\"open\":[{\"handleOpenChange\":0}]}]]],[\"pds-modal-content\",[[260,\"pds-modal-content\",{\"border\":[1537],\"contentMaxHeight\":[32]}]]],[\"pds-modal-footer\",[[260,\"pds-modal-footer\"]]],[\"pds-modal-header\",[[260,\"pds-modal-header\"]]],[\"pds-popover\",[[257,\"pds-popover\",{\"popoverTargetAction\":[1,\"popover-target-action\"],\"popoverType\":[1,\"popover-type\"],\"componentId\":[1,\"component-id\"],\"maxWidth\":[2,\"max-width\"],\"placement\":[513],\"active\":[32],\"show\":[64],\"hide\":[64],\"toggle\":[64]}]]],[\"pds-progress\",[[1,\"pds-progress\",{\"animated\":[4],\"componentId\":[1,\"component-id\"],\"fillColor\":[1,\"fill-color\"],\"label\":[1],\"percent\":[2],\"showPercent\":[4,\"show-percent\"]}]]],[\"pds-row\",[[0,\"pds-row\",{\"alignItems\":[1,\"align-items\"],\"border\":[4],\"colGap\":[1,\"col-gap\"],\"colGapBlock\":[1,\"col-gap-block\"],\"colGapInline\":[1,\"col-gap-inline\"],\"componentId\":[1,\"component-id\"],\"justifyContent\":[1,\"justify-content\"],\"minHeight\":[1,\"min-height\"],\"noWrap\":[4,\"no-wrap\"]}]]],[\"pds-sortable\",[[262,\"pds-sortable\",{\"border\":[516],\"disabled\":[516],\"componentId\":[1,\"component-id\"],\"dividers\":[516],\"handleType\":[1,\"handle-type\"]},null,{\"disabled\":[{\"handleDisabledChange\":0}]}]]],[\"pds-tab\",[[260,\"pds-tab\",{\"disabled\":[4],\"name\":[1],\"parentComponentId\":[1,\"parent-component-id\"],\"variant\":[1],\"index\":[2],\"selected\":[4]}]]],[\"pds-table\",[[257,\"pds-table\",{\"compact\":[4],\"componentId\":[1,\"component-id\"],\"responsive\":[4],\"fixedColumn\":[4,\"fixed-column\"],\"selectable\":[4],\"disableSelectAll\":[4,\"disable-select-all\"],\"rowDividers\":[516,\"row-dividers\"],\"defaultSortColumn\":[1,\"default-sort-column\"],\"defaultSortDirection\":[1,\"default-sort-direction\"],\"sortingColumn\":[32],\"sortingDirection\":[32]},[[0,\"pdsTableSort\",\"handleTableSort\"],[0,\"pdsTableSelectAll\",\"handleTableSelectAll\"],[0,\"pdsTableRowSelected\",\"handleTableSelect\"]]]]],[\"pds-table-body\",[[257,\"pds-table-body\"]]],[\"pds-tabpanel\",[[260,\"pds-tabpanel\",{\"name\":[1],\"parentComponentId\":[1,\"parent-component-id\"],\"variant\":[1],\"selected\":[1028]}]]],[\"pds-tabs\",[[257,\"pds-tabs\",{\"tablistLabel\":[1,\"tablist-label\"],\"componentId\":[1,\"component-id\"],\"variant\":[1],\"activeTabName\":[1025,\"active-tab-name\"],\"activeTabIndex\":[1026,\"active-tab-index\"]},[[16,\"pdsTabClick\",\"tabClickHandler\"],[0,\"keydown\",\"handleKeyDown\"]]]]],[\"pds-tooltip\",[[260,\"pds-tooltip\",{\"content\":[1],\"componentId\":[1,\"component-id\"],\"hasArrow\":[4,\"has-arrow\"],\"htmlContent\":[4,\"html-content\"],\"placement\":[513],\"maxWidth\":[1,\"max-width\"],\"opened\":[1540],\"_isInteractiveOpen\":[32],\"showTooltip\":[64],\"hideTooltip\":[64]},null,{\"opened\":[{\"handleOpenToggle\":0}]}]]],[\"pds-loader\",[[257,\"pds-loader\",{\"isLoading\":[4,\"is-loading\"],\"showLabel\":[4,\"show-label\"],\"size\":[513],\"variant\":[1]}]]],[\"pds-icon\",[[1,\"pds-icon\",{\"color\":[1],\"flipRtl\":[4,\"flip-rtl\"],\"icon\":[8],\"name\":[513],\"size\":[513],\"src\":[1],\"ariaLabel\":[32],\"isVisible\":[32],\"svgContent\":[32]},null,{\"size\":[{\"updateStyles\":0}],\"color\":[{\"updateStyles\":0}],\"name\":[{\"onIconPropertyChange\":0}],\"src\":[{\"onIconPropertyChange\":0}],\"icon\":[{\"onIconPropertyChange\":0}]}]]],[\"pds-button\",[[257,\"pds-button\",{\"componentId\":[1,\"component-id\"],\"download\":[1],\"disabled\":[516],\"fullWidth\":[4,\"full-width\"],\"href\":[1],\"icon\":[1],\"iconOnly\":[4,\"icon-only\"],\"loading\":[4],\"name\":[1],\"target\":[1],\"type\":[1],\"value\":[1],\"size\":[1],\"variant\":[1],\"hasStartContent\":[32],\"hasEndContent\":[32]},[[16,\"keydown\",\"handleFormKeyDown\"]]]]],[\"pds-link\",[[257,\"pds-link\",{\"color\":[1],\"download\":[1],\"componentId\":[1,\"component-id\"],\"external\":[4],\"target\":[1],\"variant\":[1],\"fontSize\":[1,\"font-size\"],\"href\":[1],\"turbo\":[1],\"turboFrame\":[1,\"turbo-frame\"],\"turboAction\":[1,\"turbo-action\"],\"turboMethod\":[1,\"turbo-method\"],\"turboConfirm\":[1,\"turbo-confirm\"],\"turboStream\":[1,\"turbo-stream\"],\"turboPrefetch\":[1,\"turbo-prefetch\"],\"turboPreload\":[1,\"turbo-preload\"]}]]],[\"pds-table-head-cell\",[[257,\"pds-table-head-cell\",{\"cellAlign\":[1,\"cell-align\"],\"sortable\":[4],\"sortingDirection\":[32],\"tableScrolling\":[32],\"isSelected\":[32],\"hasHeadBorder\":[32],\"hasHeadBackground\":[32],\"isActive\":[32],\"setActiveSort\":[64],\"clearActiveSort\":[64]}]]],[\"pds-table-cell\",[[257,\"pds-table-cell\",{\"cellAlign\":[1,\"cell-align\"],\"truncate\":[4],\"tableScrolling\":[32]},null,{\"truncate\":[{\"handleTruncateChange\":0}]}]]],[\"pds-chip\",[[257,\"pds-chip\",{\"componentId\":[1,\"component-id\"],\"dot\":[4],\"icon\":[1],\"large\":[4],\"size\":[1],\"sentiment\":[1],\"variant\":[1],\"removeUrl\":[1,\"remove-url\"],\"removeHttpMethod\":[1,\"remove-http-method\"],\"removeTarget\":[1,\"remove-target\"]}]]],[\"pds-text\",[[257,\"pds-text\",{\"align\":[1],\"color\":[1],\"decoration\":[1],\"gutter\":[1],\"italic\":[4],\"size\":[1],\"weight\":[1],\"tag\":[1],\"truncate\":[516]},null,{\"truncate\":[{\"handleTruncateChange\":0}],\"size\":[{\"validateSize\":0}]}]]],[\"pds-checkbox\",[[65,\"pds-checkbox\",{\"checked\":[1028],\"componentId\":[1,\"component-id\"],\"disabled\":[4],\"errorMessage\":[1,\"error-message\"],\"helperMessage\":[1,\"helper-message\"],\"indeterminate\":[1028],\"invalid\":[4],\"label\":[1],\"hideLabel\":[4,\"hide-label\"],\"name\":[1],\"required\":[4],\"value\":[1]},null,{\"checked\":[{\"updateIndeterminate\":0},{\"checkedChanged\":0}]}]]],[\"pds-box\",[[0,\"pds-box\",{\"alignItems\":[1,\"align-items\"],\"alignItemsXs\":[1,\"align-items-xs\"],\"alignItemsSm\":[1,\"align-items-sm\"],\"alignItemsMd\":[1,\"align-items-md\"],\"alignItemsLg\":[1,\"align-items-lg\"],\"alignItemsXl\":[1,\"align-items-xl\"],\"alignSelf\":[1,\"align-self\"],\"alignSelfXs\":[1,\"align-self-xs\"],\"alignSelfSm\":[1,\"align-self-sm\"],\"alignSelfMd\":[1,\"align-self-md\"],\"alignSelfLg\":[1,\"align-self-lg\"],\"alignSelfXl\":[1,\"align-self-xl\"],\"auto\":[4],\"autoXs\":[4,\"auto-xs\"],\"autoSm\":[4,\"auto-sm\"],\"autoMd\":[4,\"auto-md\"],\"autoLg\":[4,\"auto-lg\"],\"autoXl\":[4,\"auto-xl\"],\"backgroundColor\":[1,\"background-color\"],\"border\":[4],\"borderColor\":[1,\"border-color\"],\"borderRadius\":[1,\"border-radius\"],\"direction\":[1],\"display\":[1],\"fit\":[4],\"fitXs\":[4,\"fit-xs\"],\"fitSm\":[4,\"fit-sm\"],\"fitMd\":[4,\"fit-md\"],\"fitLg\":[4,\"fit-lg\"],\"fitXl\":[4,\"fit-xl\"],\"gap\":[1],\"gapXs\":[1,\"gap-xs\"],\"gapSm\":[1,\"gap-sm\"],\"gapMd\":[1,\"gap-md\"],\"gapLg\":[1,\"gap-lg\"],\"gapXl\":[1,\"gap-xl\"],\"wrap\":[4],\"wrapXs\":[4,\"wrap-xs\"],\"wrapSm\":[4,\"wrap-sm\"],\"wrapMd\":[4,\"wrap-md\"],\"wrapLg\":[4,\"wrap-lg\"],\"wrapXl\":[4,\"wrap-xl\"],\"flex\":[1],\"justifyContent\":[1,\"justify-content\"],\"justifyContentXs\":[1,\"justify-content-xs\"],\"justifyContentSm\":[1,\"justify-content-sm\"],\"justifyContentMd\":[1,\"justify-content-md\"],\"justifyContentLg\":[1,\"justify-content-lg\"],\"justifyContentXl\":[1,\"justify-content-xl\"],\"marginBlockStart\":[1,\"margin-block-start\"],\"marginBlockStartXs\":[1,\"margin-block-start-xs\"],\"marginBlockStartSm\":[1,\"margin-block-start-sm\"],\"marginBlockStartMd\":[1,\"margin-block-start-md\"],\"marginBlockStartLg\":[1,\"margin-block-start-lg\"],\"marginBlockStartXl\":[1,\"margin-block-start-xl\"],\"marginInlineStart\":[1,\"margin-inline-start\"],\"marginInlineStartXs\":[1,\"margin-inline-start-xs\"],\"marginInlineStartSm\":[1,\"margin-inline-start-sm\"],\"marginInlineStartMd\":[1,\"margin-inline-start-md\"],\"marginInlineStartLg\":[1,\"margin-inline-start-lg\"],\"marginInlineStartXl\":[1,\"margin-inline-start-xl\"],\"marginInlineEnd\":[1,\"margin-inline-end\"],\"marginInlineEndXs\":[1,\"margin-inline-end-xs\"],\"marginInlineEndSm\":[1,\"margin-inline-end-sm\"],\"marginInlineEndMd\":[1,\"margin-inline-end-md\"],\"marginInlineEndLg\":[1,\"margin-inline-end-lg\"],\"marginInlineEndXl\":[1,\"margin-inline-end-xl\"],\"marginBlockEnd\":[1,\"margin-block-end\"],\"marginBlockEndXs\":[1,\"margin-block-end-xs\"],\"marginBlockEndSm\":[1,\"margin-block-end-sm\"],\"marginBlockEndMd\":[1,\"margin-block-end-md\"],\"marginBlockEndLg\":[1,\"margin-block-end-lg\"],\"marginBlockEndXl\":[1,\"margin-block-end-xl\"],\"minHeight\":[513,\"min-height\"],\"minWidth\":[513,\"min-width\"],\"offset\":[1],\"offsetXs\":[1,\"offset-xs\"],\"offsetSm\":[1,\"offset-sm\"],\"offsetMd\":[1,\"offset-md\"],\"offsetLg\":[1,\"offset-lg\"],\"offsetXl\":[1,\"offset-xl\"],\"padding\":[1],\"paddingXs\":[1,\"padding-xs\"],\"paddingSm\":[1,\"padding-sm\"],\"paddingMd\":[1,\"padding-md\"],\"paddingLg\":[1,\"padding-lg\"],\"paddingXl\":[1,\"padding-xl\"],\"paddingBlockStart\":[1,\"padding-block-start\"],\"paddingBlockStartXs\":[1,\"padding-block-start-xs\"],\"paddingBlockStartSm\":[1,\"padding-block-start-sm\"],\"paddingBlockStartMd\":[1,\"padding-block-start-md\"],\"paddingBlockStartLg\":[1,\"padding-block-start-lg\"],\"paddingBlockStartXl\":[1,\"padding-block-start-xl\"],\"paddingBlockEnd\":[1,\"padding-block-end\"],\"paddingBlockEndXs\":[1,\"padding-block-end-xs\"],\"paddingBlockEndSm\":[1,\"padding-block-end-sm\"],\"paddingBlockEndMd\":[1,\"padding-block-end-md\"],\"paddingBlockEndLg\":[1,\"padding-block-end-lg\"],\"paddingBlockEndXl\":[1,\"padding-block-end-xl\"],\"paddingInlineStart\":[1,\"padding-inline-start\"],\"paddingInlineStartXs\":[1,\"padding-inline-start-xs\"],\"paddingInlineStartSm\":[1,\"padding-inline-start-sm\"],\"paddingInlineStartMd\":[1,\"padding-inline-start-md\"],\"paddingInlineStartLg\":[1,\"padding-inline-start-lg\"],\"paddingInlineStartXl\":[1,\"padding-inline-start-xl\"],\"paddingInlineEnd\":[1,\"padding-inline-end\"],\"paddingInlineEndXs\":[1,\"padding-inline-end-xs\"],\"paddingInlineEndSm\":[1,\"padding-inline-end-sm\"],\"paddingInlineEndMd\":[1,\"padding-inline-end-md\"],\"paddingInlineEndLg\":[1,\"padding-inline-end-lg\"],\"paddingInlineEndXl\":[1,\"padding-inline-end-xl\"],\"shadow\":[1],\"size\":[1],\"sizeXs\":[1,\"size-xs\"],\"sizeSm\":[1,\"size-sm\"],\"sizeMd\":[1,\"size-md\"],\"sizeLg\":[1,\"size-lg\"],\"sizeXl\":[1,\"size-xl\"]}]]]]"), options);
|
|
7
|
+
return bootstrapLazy(JSON.parse("[[\"pds-multiselect\",[[321,\"pds-multiselect\",{\"componentId\":[1,\"component-id\"],\"label\":[1],\"placeholder\":[1],\"searchPlaceholder\":[1,\"search-placeholder\"],\"searchOptionsLabel\":[1,\"search-options-label\"],\"selectedItemsLabel\":[1,\"selected-items-label\"],\"optionsLabel\":[1,\"options-label\"],\"noOptionsFoundLabel\":[1,\"no-options-found-label\"],\"createOptionLabel\":[1,\"create-option-label\"],\"createOptionAriaLabel\":[1,\"create-option-aria-label\"],\"itemRemovedLabel\":[1,\"item-removed-label\"],\"pillRemoveLabel\":[1,\"pill-remove-label\"],\"selectedCountLabelOne\":[1,\"selected-count-label-one\"],\"selectedCountLabelOther\":[1,\"selected-count-label-other\"],\"selectedCountLabels\":[1,\"selected-count-labels\"],\"closePanelOnSelect\":[4,\"close-panel-on-select\"],\"name\":[1],\"value\":[1040],\"disabled\":[4],\"asyncUrl\":[1,\"async-url\"],\"asyncMethod\":[1,\"async-method\"],\"debounce\":[2],\"fetchTimeout\":[2,\"fetch-timeout\"],\"maxSelections\":[2,\"max-selections\"],\"maxHeight\":[1,\"max-height\"],\"triggerWidth\":[1,\"trigger-width\"],\"minWidth\":[1,\"min-width\"],\"panelWidth\":[1,\"panel-width\"],\"hideLabel\":[4,\"hide-label\"],\"hideSelectedItems\":[4,\"hide-selected-items\"],\"selectedDisplay\":[1,\"selected-display\"],\"pillPosition\":[1,\"pill-position\"],\"maxInlinePills\":[2,\"max-inline-pills\"],\"errorMessage\":[1,\"error-message\"],\"helperMessage\":[1,\"helper-message\"],\"invalid\":[4],\"required\":[4],\"loading\":[1028],\"options\":[16],\"formatResult\":[16],\"createUrl\":[1,\"create-url\"],\"csrfToken\":[1,\"csrf-token\"],\"csrfHeaderName\":[1,\"csrf-header-name\"],\"isOpen\":[32],\"searchQuery\":[32],\"highlightedIndex\":[32],\"internalOptions\":[32],\"selectedItems\":[32],\"currentPage\":[32],\"hasMore\":[32],\"creating\":[32],\"removalAnnouncement\":[32],\"setFocus\":[64],\"clear\":[64]},[[8,\"keydown\",\"handleWindowKeyDown\"]],{\"debounce\":[{\"setupDebounce\":0}],\"value\":[{\"valueChanged\":0}],\"options\":[{\"optionsChanged\":0}],\"internalOptions\":[{\"internalOptionsChanged\":0}]}]]],[\"pds-combobox\",[[321,\"pds-combobox\",{\"componentId\":[1,\"component-id\"],\"name\":[513],\"customOptionLayouts\":[4,\"custom-option-layouts\"],\"customTriggerContent\":[4,\"custom-trigger-content\"],\"disabled\":[4],\"dropdownPlacement\":[1,\"dropdown-placement\"],\"dropdownWidth\":[1,\"dropdown-width\"],\"dropdownMount\":[1,\"dropdown-mount\"],\"hideLabel\":[4,\"hide-label\"],\"label\":[1],\"maxHeight\":[1,\"max-height\"],\"mode\":[1],\"placeholder\":[1],\"trigger\":[1],\"triggerWidth\":[1,\"trigger-width\"],\"triggerVariant\":[1,\"trigger-variant\"],\"triggerShape\":[1,\"trigger-shape\"],\"chipSentiment\":[1,\"chip-sentiment\"],\"chipLarge\":[4,\"chip-large\"],\"chipIcon\":[1,\"chip-icon\"],\"chipDot\":[4,\"chip-dot\"],\"value\":[1025],\"asyncUrl\":[1,\"async-url\"],\"asyncMethod\":[1,\"async-method\"],\"debounce\":[2],\"fetchTimeout\":[2,\"fetch-timeout\"],\"loading\":[1028],\"options\":[16],\"formatResult\":[16],\"displayText\":[32],\"filteredItems\":[32],\"highlightedIndex\":[32],\"isOpen\":[32],\"selectedOption\":[32],\"selectedOptionLayoutContent\":[32],\"selectedOptionChipProps\":[32],\"internalOptions\":[32],\"currentPage\":[32],\"hasMore\":[32],\"setFocus\":[64],\"getSelectedValue\":[64]},null,{\"isOpen\":[{\"isOpenChanged\":0}],\"debounce\":[{\"setupDebounce\":0}],\"options\":[{\"optionsChanged\":0}],\"value\":[{\"handleValueChange\":0}],\"selectedOption\":[{\"handleSelectedOptionChange\":0}]}]]],[\"pds-alert\",[[257,\"pds-alert\",{\"componentId\":[1,\"component-id\"],\"heading\":[1],\"small\":[4],\"dismissible\":[4],\"hideIcon\":[4,\"hide-icon\"],\"variant\":[1],\"dismissLabel\":[1,\"dismiss-label\"],\"hasActionsContent\":[32]}]]],[\"pds-copytext\",[[1,\"pds-copytext\",{\"border\":[516],\"componentId\":[1,\"component-id\"],\"fullWidth\":[4,\"full-width\"],\"truncate\":[4],\"value\":[1]},null,{\"truncate\":[{\"handleTruncateChange\":0}],\"value\":[{\"handleValueChange\":0}]}]]],[\"pds-table-head\",[[257,\"pds-table-head\",{\"indeterminate\":[1028],\"isSelected\":[1028,\"is-selected\"],\"border\":[516],\"background\":[516]}]]],[\"pds-table-row\",[[257,\"pds-table-row\",{\"indeterminate\":[1028],\"isSelected\":[1028,\"is-selected\"],\"hasDivider\":[32],\"isLastRow\":[32]}]]],[\"pds-dropdown-menu-item\",[[257,\"pds-dropdown-menu-item\",{\"componentId\":[1,\"component-id\"],\"destructive\":[4],\"disabled\":[516],\"download\":[1],\"href\":[1],\"external\":[516],\"target\":[513],\"hasFocus\":[32],\"clickItem\":[64]}]]],[\"pds-property\",[[257,\"pds-property\",{\"componentId\":[1,\"component-id\"],\"icon\":[1]}]]],[\"pds-accordion\",[[257,\"pds-accordion\",{\"componentId\":[1,\"component-id\"],\"isOpen\":[1540,\"open\"]},null,{\"isOpen\":[{\"handleOpenState\":0}]}]]],[\"pds-avatar\",[[1,\"pds-avatar\",{\"alt\":[1],\"badge\":[4],\"componentId\":[1,\"component-id\"],\"dropdown\":[4],\"image\":[1],\"initials\":[1],\"size\":[513],\"variant\":[513],\"triggerLabel\":[1,\"trigger-label\"]}]]],[\"pds-dropdown-menu\",[[257,\"pds-dropdown-menu\",{\"componentId\":[1,\"component-id\"],\"placement\":[1],\"currentFocusIndex\":[32]},[[8,\"keydown\",\"handleKeyDown\"],[8,\"click\",\"handleWindowClick\"]]]]],[\"pds-filter\",[[257,\"pds-filter\",{\"componentId\":[1,\"component-id\"],\"variant\":[1],\"icon\":[1],\"text\":[1],\"isOpen\":[32],\"showFilter\":[64],\"hideFilter\":[64]},[[9,\"resize\",\"handleWindowResize\"],[9,\"scroll\",\"handleWindowScroll\"],[4,\"toggle\",\"handlePopoverToggle\"],[4,\"click\",\"handleDocumentClick\"],[4,\"keydown\",\"handleEscapeKey\"]]]]],[\"pds-input\",[[321,\"pds-input\",{\"autocomplete\":[1],\"componentId\":[1,\"component-id\"],\"debounce\":[2],\"disabled\":[4],\"errorMessage\":[1,\"error-message\"],\"helperMessage\":[1,\"helper-message\"],\"invalid\":[4],\"label\":[1],\"hideLabel\":[4,\"hide-label\"],\"max\":[1],\"maxlength\":[1],\"min\":[1],\"minlength\":[1],\"name\":[1],\"pattern\":[1],\"placeholder\":[1],\"readonly\":[4],\"required\":[4],\"step\":[1],\"type\":[1],\"value\":[1032],\"fullWidth\":[4,\"full-width\"],\"highlight\":[516],\"hasPrefix\":[32],\"hasSuffix\":[32],\"hasPrepend\":[32],\"hasAppend\":[32],\"hasAction\":[32],\"hasFocus\":[32],\"setFocus\":[64]},null,{\"debounce\":[{\"debounceChanged\":0}],\"value\":[{\"valueChanged\":0}]}]]],[\"pds-radio\",[[262,\"pds-radio\",{\"checked\":[4],\"componentId\":[1,\"component-id\"],\"disabled\":[4],\"errorMessage\":[1,\"error-message\"],\"helperMessage\":[1,\"helper-message\"],\"hasBorder\":[4,\"has-border\"],\"invalid\":[4],\"label\":[1],\"hideLabel\":[4,\"hide-label\"],\"name\":[1],\"required\":[4],\"value\":[1],\"_hasImage\":[32]}]]],[\"pds-radio-group\",[[262,\"pds-radio-group\",{\"componentId\":[1,\"component-id\"],\"direction\":[1],\"errorMessage\":[1,\"error-message\"],\"helperMessage\":[1,\"helper-message\"],\"gap\":[1],\"disabled\":[4],\"invalid\":[4],\"groupLabel\":[1,\"group-label\"],\"name\":[1],\"required\":[4]},[[0,\"change\",\"handleRadioChange\"]],{\"name\":[{\"handlePropsChange\":0}],\"disabled\":[{\"handlePropsChange\":0}],\"invalid\":[{\"handlePropsChange\":0}],\"required\":[{\"handlePropsChange\":0}]}]]],[\"pds-select\",[[321,\"pds-select\",{\"autocomplete\":[1],\"componentId\":[1,\"component-id\"],\"disabled\":[4],\"errorMessage\":[1,\"error-message\"],\"hideLabel\":[4,\"hide-label\"],\"helperMessage\":[1,\"helper-message\"],\"invalid\":[4],\"label\":[1],\"multiple\":[4],\"name\":[1],\"required\":[4],\"highlight\":[516],\"value\":[1025]},null,{\"value\":[{\"valueChanged\":0}],\"multiple\":[{\"multipleChanged\":0}]}]]],[\"pds-sortable-item\",[[262,\"pds-sortable-item\",{\"enableActions\":[4,\"enable-actions\"],\"componentId\":[1,\"component-id\"],\"showHandle\":[1028,\"show-handle\"]}]]],[\"pds-switch\",[[65,\"pds-switch\",{\"componentId\":[1,\"component-id\"],\"checked\":[1028],\"disabled\":[4],\"errorMessage\":[1,\"error-message\"],\"hideLabel\":[4,\"hide-label\"],\"helperMessage\":[1,\"helper-message\"],\"invalid\":[4],\"label\":[1],\"name\":[1],\"required\":[4],\"value\":[1]},null,{\"checked\":[{\"checkedChanged\":0}]}]]],[\"pds-textarea\",[[321,\"pds-textarea\",{\"autocomplete\":[1],\"componentId\":[1,\"component-id\"],\"disabled\":[4],\"debounce\":[2],\"errorMessage\":[1,\"error-message\"],\"helperMessage\":[1,\"helper-message\"],\"invalid\":[1028],\"label\":[1],\"hideLabel\":[4,\"hide-label\"],\"name\":[1],\"placeholder\":[1],\"readonly\":[4],\"required\":[4],\"rows\":[2],\"maxLength\":[514,\"max-length\"],\"highlight\":[516],\"value\":[1025],\"characterCountLabel\":[1,\"character-count-label\"],\"hasFocus\":[32],\"hasAction\":[32],\"setFocus\":[64]},null,{\"debounce\":[{\"debounceChanged\":0}],\"value\":[{\"valueChanged\":0}],\"maxLength\":[{\"maxLengthChanged\":0}]}]]],[\"pds-toast\",[[257,\"pds-toast\",{\"componentId\":[1,\"component-id\"],\"dismissible\":[4],\"duration\":[2],\"icon\":[1],\"type\":[1],\"dismissLabel\":[1,\"dismiss-label\"],\"isVisible\":[32],\"isAnimatingOut\":[32],\"dismiss\":[64]},null,{\"duration\":[{\"handleDurationChange\":0}]}]]],[\"mock-pds-modal\",[[260,\"mock-pds-modal\",{\"componentId\":[1,\"component-id\"],\"size\":[1],\"scrollable\":[4],\"backdropDismiss\":[4,\"backdrop-dismiss\"],\"open\":[1028],\"showModal\":[64],\"hideModal\":[64]}]]],[\"pds-container\",[[257,\"pds-container\",{\"size\":[1],\"tag\":[1],\"centered\":[4]}]]],[\"pds-divider\",[[1,\"pds-divider\",{\"componentId\":[1,\"component-id\"],\"offset\":[1],\"vertical\":[4]}]]],[\"pds-dropdown-menu-separator\",[[1,\"pds-dropdown-menu-separator\",{\"componentId\":[1,\"component-id\"],\"disabled\":[4]}]]],[\"pds-filters\",[[257,\"pds-filters\",{\"componentId\":[1,\"component-id\"]}]]],[\"pds-image\",[[1,\"pds-image\",{\"alt\":[1],\"componentId\":[1,\"component-id\"],\"height\":[2],\"loading\":[1],\"sizes\":[1],\"src\":[1],\"srcset\":[1],\"width\":[2]}]]],[\"pds-modal\",[[260,\"pds-modal\",{\"backdropDismiss\":[4,\"backdrop-dismiss\"],\"componentId\":[1,\"component-id\"],\"open\":[1028],\"size\":[1],\"scrollable\":[4],\"focusableElementsArray\":[32],\"showModal\":[64],\"hideModal\":[64]},null,{\"open\":[{\"handleOpenChange\":0}]}]]],[\"pds-modal-content\",[[260,\"pds-modal-content\",{\"border\":[1537],\"contentMaxHeight\":[32]}]]],[\"pds-modal-footer\",[[260,\"pds-modal-footer\"]]],[\"pds-modal-header\",[[260,\"pds-modal-header\"]]],[\"pds-popover\",[[257,\"pds-popover\",{\"popoverTargetAction\":[1,\"popover-target-action\"],\"popoverType\":[1,\"popover-type\"],\"componentId\":[1,\"component-id\"],\"maxWidth\":[2,\"max-width\"],\"placement\":[513],\"active\":[32],\"show\":[64],\"hide\":[64],\"toggle\":[64]}]]],[\"pds-progress\",[[1,\"pds-progress\",{\"animated\":[4],\"componentId\":[1,\"component-id\"],\"fillColor\":[1,\"fill-color\"],\"label\":[1],\"percent\":[2],\"showPercent\":[4,\"show-percent\"]}]]],[\"pds-row\",[[0,\"pds-row\",{\"alignItems\":[1,\"align-items\"],\"border\":[4],\"colGap\":[1,\"col-gap\"],\"colGapBlock\":[1,\"col-gap-block\"],\"colGapInline\":[1,\"col-gap-inline\"],\"componentId\":[1,\"component-id\"],\"justifyContent\":[1,\"justify-content\"],\"minHeight\":[1,\"min-height\"],\"noWrap\":[4,\"no-wrap\"]}]]],[\"pds-sortable\",[[262,\"pds-sortable\",{\"border\":[516],\"disabled\":[516],\"componentId\":[1,\"component-id\"],\"dividers\":[516],\"handleType\":[1,\"handle-type\"]},null,{\"disabled\":[{\"handleDisabledChange\":0}]}]]],[\"pds-tab\",[[260,\"pds-tab\",{\"disabled\":[4],\"name\":[1],\"parentComponentId\":[1,\"parent-component-id\"],\"variant\":[1],\"index\":[2],\"selected\":[4]}]]],[\"pds-table\",[[257,\"pds-table\",{\"compact\":[4],\"componentId\":[1,\"component-id\"],\"responsive\":[4],\"fixedColumn\":[4,\"fixed-column\"],\"selectable\":[4],\"disableSelectAll\":[4,\"disable-select-all\"],\"rowDividers\":[516,\"row-dividers\"],\"defaultSortColumn\":[1,\"default-sort-column\"],\"defaultSortDirection\":[1,\"default-sort-direction\"],\"sortingColumn\":[32],\"sortingDirection\":[32]},[[0,\"pdsTableSort\",\"handleTableSort\"],[0,\"pdsTableSelectAll\",\"handleTableSelectAll\"],[0,\"pdsTableRowSelected\",\"handleTableSelect\"]]]]],[\"pds-table-body\",[[257,\"pds-table-body\"]]],[\"pds-tabpanel\",[[260,\"pds-tabpanel\",{\"name\":[1],\"parentComponentId\":[1,\"parent-component-id\"],\"variant\":[1],\"selected\":[1028]}]]],[\"pds-tabs\",[[257,\"pds-tabs\",{\"tablistLabel\":[1,\"tablist-label\"],\"componentId\":[1,\"component-id\"],\"variant\":[1],\"activeTabName\":[1025,\"active-tab-name\"],\"activeTabIndex\":[1026,\"active-tab-index\"]},[[16,\"pdsTabClick\",\"tabClickHandler\"],[0,\"keydown\",\"handleKeyDown\"]]]]],[\"pds-tooltip\",[[260,\"pds-tooltip\",{\"content\":[1],\"componentId\":[1,\"component-id\"],\"hasArrow\":[4,\"has-arrow\"],\"htmlContent\":[4,\"html-content\"],\"placement\":[513],\"maxWidth\":[1,\"max-width\"],\"opened\":[1540],\"_isInteractiveOpen\":[32],\"showTooltip\":[64],\"hideTooltip\":[64]},null,{\"opened\":[{\"handleOpenToggle\":0}]}]]],[\"pds-loader\",[[257,\"pds-loader\",{\"isLoading\":[4,\"is-loading\"],\"showLabel\":[4,\"show-label\"],\"size\":[513],\"variant\":[1]}]]],[\"pds-icon\",[[1,\"pds-icon\",{\"color\":[1],\"flipRtl\":[4,\"flip-rtl\"],\"icon\":[8],\"name\":[513],\"size\":[513],\"src\":[1],\"ariaLabel\":[32],\"isVisible\":[32],\"svgContent\":[32]},null,{\"size\":[{\"updateStyles\":0}],\"color\":[{\"updateStyles\":0}],\"name\":[{\"onIconPropertyChange\":0}],\"src\":[{\"onIconPropertyChange\":0}],\"icon\":[{\"onIconPropertyChange\":0}]}]]],[\"pds-button\",[[257,\"pds-button\",{\"componentId\":[1,\"component-id\"],\"download\":[1],\"disabled\":[516],\"fullWidth\":[4,\"full-width\"],\"href\":[1],\"icon\":[1],\"iconOnly\":[4,\"icon-only\"],\"loading\":[4],\"name\":[1],\"target\":[1],\"type\":[1],\"value\":[1],\"size\":[1],\"variant\":[1],\"hasStartContent\":[32],\"hasEndContent\":[32]},[[16,\"keydown\",\"handleFormKeyDown\"]]]]],[\"pds-link\",[[257,\"pds-link\",{\"color\":[1],\"download\":[1],\"componentId\":[1,\"component-id\"],\"external\":[4],\"target\":[1],\"variant\":[1],\"fontSize\":[1,\"font-size\"],\"href\":[1],\"turbo\":[1],\"turboFrame\":[1,\"turbo-frame\"],\"turboAction\":[1,\"turbo-action\"],\"turboMethod\":[1,\"turbo-method\"],\"turboConfirm\":[1,\"turbo-confirm\"],\"turboStream\":[1,\"turbo-stream\"],\"turboPrefetch\":[1,\"turbo-prefetch\"],\"turboPreload\":[1,\"turbo-preload\"]}]]],[\"pds-table-head-cell\",[[257,\"pds-table-head-cell\",{\"cellAlign\":[1,\"cell-align\"],\"sortable\":[4],\"sortingDirection\":[32],\"tableScrolling\":[32],\"isSelected\":[32],\"hasHeadBorder\":[32],\"hasHeadBackground\":[32],\"isActive\":[32],\"setActiveSort\":[64],\"clearActiveSort\":[64]}]]],[\"pds-table-cell\",[[257,\"pds-table-cell\",{\"cellAlign\":[1,\"cell-align\"],\"truncate\":[4],\"tableScrolling\":[32]},null,{\"truncate\":[{\"handleTruncateChange\":0}]}]]],[\"pds-chip\",[[257,\"pds-chip\",{\"componentId\":[1,\"component-id\"],\"dot\":[4],\"icon\":[1],\"large\":[4],\"size\":[1],\"sentiment\":[1],\"variant\":[1],\"removeUrl\":[1,\"remove-url\"],\"removeHttpMethod\":[1,\"remove-http-method\"],\"removeTarget\":[1,\"remove-target\"],\"dismissLabel\":[1,\"dismiss-label\"]}]]],[\"pds-text\",[[257,\"pds-text\",{\"align\":[1],\"color\":[1],\"decoration\":[1],\"gutter\":[1],\"italic\":[4],\"size\":[1],\"weight\":[1],\"tag\":[1],\"truncate\":[516]},null,{\"truncate\":[{\"handleTruncateChange\":0}],\"size\":[{\"validateSize\":0}]}]]],[\"pds-checkbox\",[[65,\"pds-checkbox\",{\"checked\":[1028],\"componentId\":[1,\"component-id\"],\"disabled\":[4],\"errorMessage\":[1,\"error-message\"],\"helperMessage\":[1,\"helper-message\"],\"indeterminate\":[1028],\"invalid\":[4],\"label\":[1],\"hideLabel\":[4,\"hide-label\"],\"name\":[1],\"required\":[4],\"value\":[1]},null,{\"checked\":[{\"updateIndeterminate\":0},{\"checkedChanged\":0}]}]]],[\"pds-box\",[[0,\"pds-box\",{\"alignItems\":[1,\"align-items\"],\"alignItemsXs\":[1,\"align-items-xs\"],\"alignItemsSm\":[1,\"align-items-sm\"],\"alignItemsMd\":[1,\"align-items-md\"],\"alignItemsLg\":[1,\"align-items-lg\"],\"alignItemsXl\":[1,\"align-items-xl\"],\"alignSelf\":[1,\"align-self\"],\"alignSelfXs\":[1,\"align-self-xs\"],\"alignSelfSm\":[1,\"align-self-sm\"],\"alignSelfMd\":[1,\"align-self-md\"],\"alignSelfLg\":[1,\"align-self-lg\"],\"alignSelfXl\":[1,\"align-self-xl\"],\"auto\":[4],\"autoXs\":[4,\"auto-xs\"],\"autoSm\":[4,\"auto-sm\"],\"autoMd\":[4,\"auto-md\"],\"autoLg\":[4,\"auto-lg\"],\"autoXl\":[4,\"auto-xl\"],\"backgroundColor\":[1,\"background-color\"],\"border\":[4],\"borderColor\":[1,\"border-color\"],\"borderRadius\":[1,\"border-radius\"],\"direction\":[1],\"display\":[1],\"fit\":[4],\"fitXs\":[4,\"fit-xs\"],\"fitSm\":[4,\"fit-sm\"],\"fitMd\":[4,\"fit-md\"],\"fitLg\":[4,\"fit-lg\"],\"fitXl\":[4,\"fit-xl\"],\"gap\":[1],\"gapXs\":[1,\"gap-xs\"],\"gapSm\":[1,\"gap-sm\"],\"gapMd\":[1,\"gap-md\"],\"gapLg\":[1,\"gap-lg\"],\"gapXl\":[1,\"gap-xl\"],\"wrap\":[4],\"wrapXs\":[4,\"wrap-xs\"],\"wrapSm\":[4,\"wrap-sm\"],\"wrapMd\":[4,\"wrap-md\"],\"wrapLg\":[4,\"wrap-lg\"],\"wrapXl\":[4,\"wrap-xl\"],\"flex\":[1],\"justifyContent\":[1,\"justify-content\"],\"justifyContentXs\":[1,\"justify-content-xs\"],\"justifyContentSm\":[1,\"justify-content-sm\"],\"justifyContentMd\":[1,\"justify-content-md\"],\"justifyContentLg\":[1,\"justify-content-lg\"],\"justifyContentXl\":[1,\"justify-content-xl\"],\"marginBlockStart\":[1,\"margin-block-start\"],\"marginBlockStartXs\":[1,\"margin-block-start-xs\"],\"marginBlockStartSm\":[1,\"margin-block-start-sm\"],\"marginBlockStartMd\":[1,\"margin-block-start-md\"],\"marginBlockStartLg\":[1,\"margin-block-start-lg\"],\"marginBlockStartXl\":[1,\"margin-block-start-xl\"],\"marginInlineStart\":[1,\"margin-inline-start\"],\"marginInlineStartXs\":[1,\"margin-inline-start-xs\"],\"marginInlineStartSm\":[1,\"margin-inline-start-sm\"],\"marginInlineStartMd\":[1,\"margin-inline-start-md\"],\"marginInlineStartLg\":[1,\"margin-inline-start-lg\"],\"marginInlineStartXl\":[1,\"margin-inline-start-xl\"],\"marginInlineEnd\":[1,\"margin-inline-end\"],\"marginInlineEndXs\":[1,\"margin-inline-end-xs\"],\"marginInlineEndSm\":[1,\"margin-inline-end-sm\"],\"marginInlineEndMd\":[1,\"margin-inline-end-md\"],\"marginInlineEndLg\":[1,\"margin-inline-end-lg\"],\"marginInlineEndXl\":[1,\"margin-inline-end-xl\"],\"marginBlockEnd\":[1,\"margin-block-end\"],\"marginBlockEndXs\":[1,\"margin-block-end-xs\"],\"marginBlockEndSm\":[1,\"margin-block-end-sm\"],\"marginBlockEndMd\":[1,\"margin-block-end-md\"],\"marginBlockEndLg\":[1,\"margin-block-end-lg\"],\"marginBlockEndXl\":[1,\"margin-block-end-xl\"],\"minHeight\":[513,\"min-height\"],\"minWidth\":[513,\"min-width\"],\"offset\":[1],\"offsetXs\":[1,\"offset-xs\"],\"offsetSm\":[1,\"offset-sm\"],\"offsetMd\":[1,\"offset-md\"],\"offsetLg\":[1,\"offset-lg\"],\"offsetXl\":[1,\"offset-xl\"],\"padding\":[1],\"paddingXs\":[1,\"padding-xs\"],\"paddingSm\":[1,\"padding-sm\"],\"paddingMd\":[1,\"padding-md\"],\"paddingLg\":[1,\"padding-lg\"],\"paddingXl\":[1,\"padding-xl\"],\"paddingBlockStart\":[1,\"padding-block-start\"],\"paddingBlockStartXs\":[1,\"padding-block-start-xs\"],\"paddingBlockStartSm\":[1,\"padding-block-start-sm\"],\"paddingBlockStartMd\":[1,\"padding-block-start-md\"],\"paddingBlockStartLg\":[1,\"padding-block-start-lg\"],\"paddingBlockStartXl\":[1,\"padding-block-start-xl\"],\"paddingBlockEnd\":[1,\"padding-block-end\"],\"paddingBlockEndXs\":[1,\"padding-block-end-xs\"],\"paddingBlockEndSm\":[1,\"padding-block-end-sm\"],\"paddingBlockEndMd\":[1,\"padding-block-end-md\"],\"paddingBlockEndLg\":[1,\"padding-block-end-lg\"],\"paddingBlockEndXl\":[1,\"padding-block-end-xl\"],\"paddingInlineStart\":[1,\"padding-inline-start\"],\"paddingInlineStartXs\":[1,\"padding-inline-start-xs\"],\"paddingInlineStartSm\":[1,\"padding-inline-start-sm\"],\"paddingInlineStartMd\":[1,\"padding-inline-start-md\"],\"paddingInlineStartLg\":[1,\"padding-inline-start-lg\"],\"paddingInlineStartXl\":[1,\"padding-inline-start-xl\"],\"paddingInlineEnd\":[1,\"padding-inline-end\"],\"paddingInlineEndXs\":[1,\"padding-inline-end-xs\"],\"paddingInlineEndSm\":[1,\"padding-inline-end-sm\"],\"paddingInlineEndMd\":[1,\"padding-inline-end-md\"],\"paddingInlineEndLg\":[1,\"padding-inline-end-lg\"],\"paddingInlineEndXl\":[1,\"padding-inline-end-xl\"],\"shadow\":[1],\"size\":[1],\"sizeXs\":[1,\"size-xs\"],\"sizeSm\":[1,\"size-sm\"],\"sizeMd\":[1,\"size-md\"],\"sizeLg\":[1,\"size-lg\"],\"sizeXl\":[1,\"size-xl\"]}]]]]"), options);
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
export { defineCustomElements };
|
|
@@ -27,6 +27,12 @@ const PdsAlert = class {
|
|
|
27
27
|
* @defaultValue 'default'
|
|
28
28
|
*/
|
|
29
29
|
this.variant = 'default';
|
|
30
|
+
/**
|
|
31
|
+
* Accessible label for the dismiss button. Pass a translated string to
|
|
32
|
+
* localize it; defaults to English.
|
|
33
|
+
* @defaultValue 'Dismiss alert'
|
|
34
|
+
*/
|
|
35
|
+
this.dismissLabel = 'Dismiss alert';
|
|
30
36
|
this.hasActionsContent = false;
|
|
31
37
|
this.handleCloseClick = () => {
|
|
32
38
|
this.pdsAlertDismissClick.emit();
|
|
@@ -57,7 +63,7 @@ const PdsAlert = class {
|
|
|
57
63
|
};
|
|
58
64
|
// Get the icon name based on the current variant
|
|
59
65
|
const iconName = iconMap[this.variant] || iconMap.default;
|
|
60
|
-
return (h(Host, { key: '
|
|
66
|
+
return (h(Host, { key: 'b143df0c24c077e412894f5f77f1bd7c0ced1c92', class: "pds-alert", id: this.componentId, variant: this.variant }, h("pds-box", { key: '928e3852507a1776069ee80906443ef650607ce7', class: `pds-alert__container pds-alert__container--${this.variant}`, "background-color": "var(--pds-alert-background)", "border-color": "var(--pds-alert-border-color)", "border-radius": "md", border: true, display: "block" }, h("pds-box", { key: '778046ab1c651a57e910e45fe00944a74a3c32f7', gap: "sm", display: "flex", "align-items": this.small ? "center" : undefined }, !this.hideIcon && (h("pds-icon", { key: '0199ef3e12a8dc9da20006fc8c4e133f83f4caf4', class: `pds-alert__icon ${this.small ? 'pds-alert__icon--small' : ''}`, color: "var(--pds-alert-color-icon)", icon: iconName, size: "var(--pds-alert-icon-size)" })), h("pds-box", { key: 'b7b973c0c6154d72f90a585a116ea76ac48cc6e4', class: "pds-alert__content-wrapper", direction: "column", gap: "xs", flex: "grow" }, this.heading && !this.small && (h("pds-text", { key: 'c969f9a7eabdc31bc2faca247033e89cc15caea0', class: "pds-alert__heading", color: "var(--pds-alert-color-text)", size: "h5", tag: "h3", weight: "medium" }, this.heading)), this.renderContent()), this.dismissible && (h("button", { key: '168c21de5a0112a65b73a854add4393fea9ede6f', class: "pds-alert__dismiss", type: "button", part: "dismiss", "aria-label": this.dismissLabel, onClick: this.handleCloseClick }, h("pds-icon", { key: 'f8e9311a4934c1b8458879cd6244a99e3a730be2', icon: "remove", size: "var(--pds-alert-icon-size)", "aria-hidden": "true", color: "var(--pds-alert-color-dismiss)" })))))));
|
|
61
67
|
}
|
|
62
68
|
get el() { return getElement(this); }
|
|
63
69
|
};
|
|
@@ -41,6 +41,12 @@ const PdsAvatar = class {
|
|
|
41
41
|
* @defaultValue customer
|
|
42
42
|
*/
|
|
43
43
|
this.variant = 'customer';
|
|
44
|
+
/**
|
|
45
|
+
* Accessible label for the dropdown trigger button. Pass a translated string
|
|
46
|
+
* to localize it; defaults to English.
|
|
47
|
+
* @defaultValue 'Avatar dropdown trigger'
|
|
48
|
+
*/
|
|
49
|
+
this.triggerLabel = 'Avatar dropdown trigger';
|
|
44
50
|
this.renderAssetWrapper = () => {
|
|
45
51
|
const style = {
|
|
46
52
|
height: this.avatarSize(),
|
|
@@ -51,7 +57,7 @@ const PdsAvatar = class {
|
|
|
51
57
|
this.renderAvatar = () => {
|
|
52
58
|
return (this.dropdown
|
|
53
59
|
?
|
|
54
|
-
h("button", { class: "pds-avatar__button", type: "button", part: "button", "aria-label":
|
|
60
|
+
h("button", { class: "pds-avatar__button", type: "button", part: "button", "aria-label": this.triggerLabel }, this.renderAssetWrapper())
|
|
55
61
|
:
|
|
56
62
|
this.renderAssetWrapper());
|
|
57
63
|
};
|
|
@@ -95,7 +101,7 @@ const PdsAvatar = class {
|
|
|
95
101
|
}
|
|
96
102
|
}
|
|
97
103
|
render() {
|
|
98
|
-
return (h(Host, { key: '
|
|
104
|
+
return (h(Host, { key: 'd8c417ed6fca497bac5bb51a184b1f7d0077bc03', id: this.componentId, class: Object.assign({}, this.classNames()) }, this.renderAvatar()));
|
|
99
105
|
}
|
|
100
106
|
};
|
|
101
107
|
PdsAvatar.style = pdsAvatarCss();
|
|
@@ -32,6 +32,11 @@ const PdsChip = class {
|
|
|
32
32
|
* @defaultValue 'text'
|
|
33
33
|
*/
|
|
34
34
|
this.variant = 'text';
|
|
35
|
+
/**
|
|
36
|
+
* Accessible label for the remove button. Pass a translated string to localize it; defaults to English.
|
|
37
|
+
* @defaultValue 'Remove'
|
|
38
|
+
*/
|
|
39
|
+
this.dismissLabel = 'Remove';
|
|
35
40
|
this.handleCloseClick = () => {
|
|
36
41
|
this.pdsTagCloseClick.emit();
|
|
37
42
|
};
|
|
@@ -85,7 +90,7 @@ const PdsChip = class {
|
|
|
85
90
|
const linkAttrs = {
|
|
86
91
|
class: 'pds-chip__close',
|
|
87
92
|
href: this.removeUrl,
|
|
88
|
-
'aria-label':
|
|
93
|
+
'aria-label': this.dismissLabel,
|
|
89
94
|
};
|
|
90
95
|
// Add target if specified
|
|
91
96
|
if (this.removeTarget) {
|
|
@@ -116,13 +121,13 @@ const PdsChip = class {
|
|
|
116
121
|
return {
|
|
117
122
|
class: 'pds-chip__close',
|
|
118
123
|
type: 'button',
|
|
119
|
-
'aria-label':
|
|
124
|
+
'aria-label': this.dismissLabel,
|
|
120
125
|
};
|
|
121
126
|
};
|
|
122
127
|
return (h(CloseElement, Object.assign({}, closeAttributes(), { onClick: this.handleCloseClick }), h("pds-icon", { icon: remove, size: this.iconSize })));
|
|
123
128
|
}
|
|
124
129
|
render() {
|
|
125
|
-
return (h(Host, { key: '
|
|
130
|
+
return (h(Host, { key: 'ff02e96839049b313681389308faba50c5989842', class: this.classNames(), id: this.componentId }, this.setChipContent(), this.effectiveVariant === 'tag' && this.renderCloseButton()));
|
|
126
131
|
}
|
|
127
132
|
};
|
|
128
133
|
PdsChip.style = pdsChipTokensCss() + pdsChipCss();
|
|
@@ -3,6 +3,7 @@ import { a as autoUpdate, c as computePosition, o as offset, f as flip, s as shi
|
|
|
3
3
|
import { d as debounceEvent } from './utils-tJa4KYNO.js';
|
|
4
4
|
import { i as isSpecTest, a as assignDescription, m as messageId } from './form-C3xDZBme.js';
|
|
5
5
|
import { e as enlarge, b as danger } from './index-D4ys0pep.js';
|
|
6
|
+
import { f as formatMessage, p as pluralize } from './i18n-format-BKsJZTyn.js';
|
|
6
7
|
|
|
7
8
|
const pdsMultiselectCss = () => `:host{display:block}:host([aria-disabled=true]) .pds-multiselect__trigger{background:var(--pine-color-background-container-disabled);border-color:var(--pine-color-border-disabled);color:var(--pine-color-text-disabled);cursor:not-allowed}:host([aria-disabled=true]) .pds-multiselect__icon{color:var(--pine-color-text-disabled)}.pds-multiselect{position:relative}.pds-multiselect__label{color:var(--pine-color-text-label);display:block;font:var(--pine-typography-body-medium);letter-spacing:var(--pine-letter-spacing);-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs)}.pds-multiselect__wrapper{position:relative}.pds-multiselect__trigger{-ms-flex-align:center;align-items:center;background:var(--pine-color-background-container);border:var(--pine-border);border-radius:var(--pine-dimension-125);cursor:pointer;display:-ms-flexbox;display:flex;font:var(--pine-typography-body-medium);gap:var(--pine-dimension-xs);-ms-flex-pack:justify;justify-content:space-between;letter-spacing:var(--pine-letter-spacing);min-height:var(--pine-dimension-450);padding:var(--pine-dimension-xs) var(--pine-dimension-sm);position:relative;text-align:start;-webkit-transition:border-color var(--pine-motion-duration-base) ease, -webkit-box-shadow var(--pine-motion-duration-base) ease;transition:border-color var(--pine-motion-duration-base) ease, -webkit-box-shadow var(--pine-motion-duration-base) ease;transition:border-color var(--pine-motion-duration-base) ease, box-shadow var(--pine-motion-duration-base) ease;transition:border-color var(--pine-motion-duration-base) ease, box-shadow var(--pine-motion-duration-base) ease, -webkit-box-shadow var(--pine-motion-duration-base) ease;width:100%}.pds-multiselect__trigger:hover:not(.pds-multiselect__trigger--disabled){border-color:var(--pine-color-border-hover)}.pds-multiselect__trigger:focus:not(.pds-multiselect__trigger--disabled){border-color:var(--pine-color-border-active);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-multiselect__trigger.pds-multiselect__trigger--open{border-color:var(--pine-color-border-active)}.pds-multiselect__trigger.pds-multiselect__trigger--invalid{background-color:var(--pine-color-red-050);border-color:var(--pine-color-border-danger)}.pds-multiselect__trigger.pds-multiselect__trigger--invalid:focus{outline-color:var(--pine-color-focus-ring-danger)}.pds-multiselect__trigger.pds-multiselect__trigger--disabled{background:var(--pine-color-background-container-disabled);border-color:var(--pine-color-border-disabled);color:var(--pine-color-text-disabled);cursor:not-allowed}.pds-multiselect__trigger-text{color:var(--pine-color-text-strong);-ms-flex:1;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pds-multiselect__trigger-text.pds-multiselect__trigger-text--placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__trigger--disabled .pds-multiselect__trigger-text{color:var(--pine-color-text-disabled)}.pds-multiselect__icon{color:var(--pine-color-icon);-ms-flex-negative:var(--pine-dimension-none);flex-shrink:var(--pine-dimension-none)}.pds-multiselect__pill-list{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--pine-dimension-2xs)}.pds-multiselect__pill-list--inline{-ms-flex:1;flex:1;min-width:0}.pds-multiselect__pill-list--below{-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-multiselect__pill-overflow{color:var(--pine-color-text-muted);font:var(--pine-typography-body-sm-medium);white-space:nowrap}.pds-multiselect__trigger--pill-inline{-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--pine-dimension-2xs);min-height:var(--pine-dimension-450);padding:var(--pine-dimension-2xs) var(--pine-dimension-sm)}.pds-multiselect__trigger--pill-inline.pds-multiselect__trigger--open{border-color:var(--pine-color-border-active)}.pds-multiselect__trigger--pill-inline:focus-within:not(.pds-multiselect__trigger--disabled){border-color:var(--pine-color-border-active);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-multiselect__trigger--pill-inline.pds-multiselect__trigger--invalid:focus-within{outline-color:var(--pine-color-focus-ring-danger)}.pds-multiselect__pill-toggle{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border-width:0;cursor:pointer;display:-ms-flexbox;display:flex;padding:0}.pds-multiselect__pill-toggle:focus{outline:3px solid transparent}.pds-multiselect__trigger--disabled .pds-multiselect__pill-toggle{cursor:not-allowed;pointer-events:none}.pds-multiselect__panel{background:var(--pine-color-background-overlay);border-radius:var(--pine-dimension-125);-webkit-box-shadow:var(--pine-box-shadow);box-shadow:var(--pine-box-shadow);-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:absolute;z-index:var(--pine-z-index-raised)}.pds-multiselect__search{-ms-flex-align:center;align-items:center;-webkit-border-after:var(--pine-border);border-block-end:var(--pine-border);border-block-end-color:var(--pine-color-border-subtle);display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);padding:var(--pine-dimension-xs) var(--pine-dimension-sm)}.pds-multiselect__search pds-icon{color:var(--pine-color-text-muted);-ms-flex-negative:var(--pine-dimension-none);flex-shrink:var(--pine-dimension-none)}.pds-multiselect__search-input{background:transparent;border:var(--pine-dimension-none);color:var(--pine-color-text-strong);-ms-flex:1;flex:1;font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing);min-width:var(--pine-dimension-none);outline:none}.pds-multiselect__search-input::-webkit-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__search-input::-moz-placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__search-input:-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__search-input::-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__search-input::placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__selected-section{-webkit-border-after:var(--pine-border);border-block-end:var(--pine-border);border-block-end-color:var(--pine-color-border-subtle);padding:var(--pine-dimension-xs)}.pds-multiselect__selected-list{list-style:none;margin:var(--pine-dimension-none);padding:var(--pine-dimension-none)}.pds-multiselect__selected-item{color:var(--pine-color-text-strong);font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing);overflow:hidden;padding:var(--pine-dimension-2xs) var(--pine-dimension-xs);text-overflow:ellipsis;white-space:nowrap}.pds-multiselect__listbox{background:transparent;border:var(--pine-dimension-none);-webkit-box-sizing:border-box;box-sizing:border-box;list-style:none;margin:var(--pine-dimension-none);overflow-y:auto;padding:var(--pine-dimension-xs)}.pds-multiselect__group-header{color:var(--pine-color-text-muted);display:block;font:var(--pine-typography-body-sm-medium);letter-spacing:var(--pine-letter-spacing);padding:var(--pine-dimension-sm) var(--pine-dimension-xs) var(--pine-dimension-2xs);text-transform:uppercase}.pds-multiselect__listbox>li:first-child>.pds-multiselect__group-header{-webkit-padding-before:var(--pine-dimension-xs);padding-block-start:var(--pine-dimension-xs)}.pds-multiselect__group-list{list-style:none;margin:var(--pine-dimension-none);padding:var(--pine-dimension-none)}.pds-multiselect__option{-ms-flex-align:center;align-items:center;background:transparent;border-radius:var(--pine-dimension-xs);cursor:pointer;display:-ms-flexbox;display:flex;padding:var(--pine-dimension-2xs) var(--pine-dimension-xs);-webkit-transition:background 0.15s;transition:background 0.15s}.pds-multiselect__option pds-checkbox{pointer-events:none;width:100%}.pds-multiselect__option:hover:not(.pds-multiselect__option--disabled),.pds-multiselect__option.pds-multiselect__option--highlighted:not(.pds-multiselect__option--disabled){background:var(--pine-color-background-muted)}.pds-multiselect__option.pds-multiselect__option--disabled{cursor:not-allowed;opacity:0.5}.pds-multiselect__option:focus-visible{outline:var(--pine-dimension-none)}.pds-multiselect__create-option{color:var(--pine-color-text-strong);width:100%}.pds-multiselect__create-option pds-icon{color:var(--pine-color-text-muted);-ms-flex-negative:var(--pine-dimension-none);flex-shrink:var(--pine-dimension-none)}.pds-multiselect__empty,.pds-multiselect__loading{-ms-flex-align:center;align-items:center;color:var(--pine-color-text-muted);display:-ms-flexbox;display:flex;font:var(--pine-typography-body);-ms-flex-pack:center;justify-content:center;padding:var(--pine-dimension-sm)}.pds-multiselect__load-more{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;padding:var(--pine-dimension-xs)}.pds-multiselect__helper{color:var(--pine-color-text-message);font:var(--pine-typography-body-sm);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs);-webkit-margin-start:var(--pine-dimension-none);margin-inline-start:var(--pine-dimension-none)}.pds-multiselect__error{-ms-flex-align:start;align-items:flex-start;color:var(--pine-color-text-message-danger);display:-ms-flexbox;display:flex;font:var(--pine-typography-body-sm);gap:var(--pine-dimension-2xs);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs);-webkit-margin-start:var(--pine-dimension-none);margin-inline-start:var(--pine-dimension-none)}.pds-multiselect__error pds-icon{-ms-flex-negative:var(--pine-dimension-none);flex-shrink:var(--pine-dimension-none);-webkit-margin-before:var(--pine-dimension-025);margin-block-start:var(--pine-dimension-025)}.visually-hidden{border:var(--pine-dimension-none);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:var(--pine-dimension-none);position:absolute;white-space:nowrap;width:1px}`;
|
|
8
9
|
|
|
@@ -15,14 +16,65 @@ const PdsMultiselect = class {
|
|
|
15
16
|
this.pdsMultiselectCreate = createEvent(this, "pdsMultiselectCreate");
|
|
16
17
|
this.pdsMultiselectDismiss = createEvent(this, "pdsMultiselectDismiss");
|
|
17
18
|
/**
|
|
18
|
-
* Placeholder text for the input field.
|
|
19
|
+
* Placeholder text for the input field. Pass a translated string to localize it; defaults to English.
|
|
20
|
+
* @defaultValue 'Select...'
|
|
19
21
|
*/
|
|
20
22
|
this.placeholder = 'Select...';
|
|
21
23
|
/**
|
|
22
|
-
* Placeholder text for the search input inside the dropdown panel.
|
|
23
|
-
* @
|
|
24
|
+
* Placeholder text for the search input inside the dropdown panel. Pass a translated string to localize it; defaults to English.
|
|
25
|
+
* @defaultValue 'Find...'
|
|
24
26
|
*/
|
|
25
27
|
this.searchPlaceholder = 'Find...';
|
|
28
|
+
/**
|
|
29
|
+
* Accessible label for the search input. Pass a translated string to localize it; defaults to English.
|
|
30
|
+
* @defaultValue 'Search options'
|
|
31
|
+
*/
|
|
32
|
+
this.searchOptionsLabel = 'Search options';
|
|
33
|
+
/**
|
|
34
|
+
* Accessible label for the selected-items region. Pass a translated string to localize it; defaults to English.
|
|
35
|
+
* @defaultValue 'Selected items'
|
|
36
|
+
*/
|
|
37
|
+
this.selectedItemsLabel = 'Selected items';
|
|
38
|
+
/**
|
|
39
|
+
* Accessible label for the options listbox (falls back to this when `label` is unset). Pass a translated string to localize it; defaults to English.
|
|
40
|
+
* @defaultValue 'Options'
|
|
41
|
+
*/
|
|
42
|
+
this.optionsLabel = 'Options';
|
|
43
|
+
/**
|
|
44
|
+
* Text shown when no options match the search. Pass a translated string to localize it; defaults to English.
|
|
45
|
+
* @defaultValue 'No options found'
|
|
46
|
+
*/
|
|
47
|
+
this.noOptionsFoundLabel = 'No options found';
|
|
48
|
+
/**
|
|
49
|
+
* Visible label for the create-new-option row. Pass a translated string to localize it; `{text}` is interpolated.
|
|
50
|
+
* @defaultValue 'Add "{text}"'
|
|
51
|
+
*/
|
|
52
|
+
this.createOptionLabel = 'Add "{text}"';
|
|
53
|
+
/**
|
|
54
|
+
* Accessible label for the create-new-option row. Pass a translated string to localize it; `{text}` is interpolated.
|
|
55
|
+
* @defaultValue 'Create new tag: {text}'
|
|
56
|
+
*/
|
|
57
|
+
this.createOptionAriaLabel = 'Create new tag: {text}';
|
|
58
|
+
/**
|
|
59
|
+
* Screen-reader announcement when an item is removed. Pass a translated string to localize it; `{item}` is interpolated.
|
|
60
|
+
* @defaultValue '{item} removed'
|
|
61
|
+
*/
|
|
62
|
+
this.itemRemovedLabel = '{item} removed';
|
|
63
|
+
/**
|
|
64
|
+
* Accessible label for the remove button on each selected-item pill. Pass a translated string to localize it; defaults to English.
|
|
65
|
+
* @defaultValue 'Remove'
|
|
66
|
+
*/
|
|
67
|
+
this.pillRemoveLabel = 'Remove';
|
|
68
|
+
/**
|
|
69
|
+
* Singular form of the selected-count trigger text. Pass a translated string to localize it; `{count}` is interpolated.
|
|
70
|
+
* @defaultValue '{count} item'
|
|
71
|
+
*/
|
|
72
|
+
this.selectedCountLabelOne = '{count} item';
|
|
73
|
+
/**
|
|
74
|
+
* Plural (and fallback) form of the selected-count trigger text — used for English and any locale whose selected plural category isn't supplied via `selectedCountLabels`. Pass a translated string to localize it; `{count}` is interpolated.
|
|
75
|
+
* @defaultValue '{count} items'
|
|
76
|
+
*/
|
|
77
|
+
this.selectedCountLabelOther = '{count} items';
|
|
26
78
|
/**
|
|
27
79
|
* Whether to close the panel after an option is selected.
|
|
28
80
|
* Defaults to `false` (panel stays open for multi-select).
|
|
@@ -261,7 +313,7 @@ const PdsMultiselect = class {
|
|
|
261
313
|
this.pdsMultiselectChange.emit({ values: this.value, items: this.selectedItems });
|
|
262
314
|
// Clear first so screen readers re-announce even when the same item is removed twice
|
|
263
315
|
this.removalAnnouncement = '';
|
|
264
|
-
queueMicrotask(() => { this.removalAnnouncement =
|
|
316
|
+
queueMicrotask(() => { this.removalAnnouncement = formatMessage(this.itemRemovedLabel, { item: item.text }); });
|
|
265
317
|
this.isClosingViaSelection = true;
|
|
266
318
|
if (this.isOpen) {
|
|
267
319
|
(_a = this.searchInputEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
@@ -898,7 +950,7 @@ const PdsMultiselect = class {
|
|
|
898
950
|
'pds-multiselect__option--selected': isSelected,
|
|
899
951
|
'pds-multiselect__option--create': isCreateOption,
|
|
900
952
|
'pds-multiselect__option--disabled': isDisabled || isCreateDisabled,
|
|
901
|
-
}, role: "option", "aria-selected": isSelected ? 'true' : 'false', "aria-disabled": isDisabled || isCreateDisabled ? 'true' : undefined, "aria-label": isCreateOption ?
|
|
953
|
+
}, role: "option", "aria-selected": isSelected ? 'true' : 'false', "aria-disabled": isDisabled || isCreateDisabled ? 'true' : undefined, "aria-label": isCreateOption ? formatMessage(this.createOptionAriaLabel, { text: option.text }) : undefined, "data-index": index, onMouseDown: this.handleOptionMouseDown(option), onMouseEnter: this.handleOptionMouseEnter(index, option) }, isCreateOption ? (h("pds-box", { class: "pds-multiselect__create-option", "align-items": "center", gap: "xs" }, h("pds-icon", { name: "add", size: "small" }), h("pds-text", null, formatMessage(this.createOptionLabel, { text: option.text })))) : (h("pds-checkbox", { componentId: `${this.componentId}-checkbox-${index}`, checked: isSelected, label: option.text, disabled: isDisabled, style: { pointerEvents: 'none' } }))));
|
|
902
954
|
}
|
|
903
955
|
renderSelectedItemsList() {
|
|
904
956
|
if (this.hideSelectedItems || this.selectedItems.length === 0)
|
|
@@ -912,7 +964,7 @@ const PdsMultiselect = class {
|
|
|
912
964
|
const valueArray = this.ensureValueArray();
|
|
913
965
|
const hasSlottedEmpty = !!this.el.querySelector('[slot="empty"]');
|
|
914
966
|
const hasSlottedLoading = !!this.el.querySelector('[slot="loading"]');
|
|
915
|
-
return (h("div", { class: "pds-multiselect__panel", ref: el => (this.panelEl = el), style: { minWidth: this.minWidth } }, h("div", { class: "pds-multiselect__search" }, h("pds-icon", { name: "search", size: "small" }), h("input", { ref: el => (this.searchInputEl = el), type: "text", class: "pds-multiselect__search-input", placeholder: this.searchPlaceholder, value: this.searchQuery, "aria-label":
|
|
967
|
+
return (h("div", { class: "pds-multiselect__panel", ref: el => (this.panelEl = el), style: { minWidth: this.minWidth } }, h("div", { class: "pds-multiselect__search" }, h("pds-icon", { name: "search", size: "small" }), h("input", { ref: el => (this.searchInputEl = el), type: "text", class: "pds-multiselect__search-input", placeholder: this.searchPlaceholder, value: this.searchQuery, "aria-label": this.searchOptionsLabel, "aria-controls": `${this.componentId}-listbox`, "aria-activedescendant": this.highlightedIndex >= 0 ? `${this.componentId}-option-${this.highlightedIndex}` : undefined, role: "combobox", "aria-haspopup": "listbox", "aria-expanded": "true", "aria-autocomplete": "list", autocomplete: "off", onInput: this.handleSearchInputChange, onKeyDown: this.handleSearchInputKeyDown })), this.renderSelectedItemsList(), h("ul", { class: "pds-multiselect__listbox", role: "listbox", "aria-multiselectable": "true", "aria-label": this.label || this.optionsLabel, id: `${this.componentId}-listbox`, ref: el => (this.listboxEl = el), style: { maxHeight: this.maxHeight }, onScroll: this.handleScroll }, this.loading && (h("li", { class: "pds-multiselect__loading", role: "presentation" }, hasSlottedLoading ? (h("slot", { name: "loading" })) : (h("pds-loader", { size: "small" })))), !this.loading && filteredOptions.length === 0 && (h("li", { class: "pds-multiselect__empty", role: "presentation" }, hasSlottedEmpty ? (h("slot", { name: "empty" })) : (h("span", null, this.noOptionsFoundLabel)))), this.getGroupedRenderItems(filteredOptions).map((item, itemIndex) => {
|
|
916
968
|
if (item.type === 'group') {
|
|
917
969
|
return (h("li", { key: `group-${itemIndex}`, role: "group", "aria-label": item.group, class: "pds-multiselect__group" }, h("span", { class: "pds-multiselect__group-header", "aria-hidden": "true" }, item.group), h("ul", { class: "pds-multiselect__group-list", role: "presentation" }, item.options.map(({ option, index }) => this.renderOption(option, index, valueArray)))));
|
|
918
970
|
}
|
|
@@ -927,27 +979,54 @@ const PdsMultiselect = class {
|
|
|
927
979
|
const variant = this.disabled ? 'text' : 'tag';
|
|
928
980
|
const visibleItems = this.selectedItems.slice(0, Math.max(1, this.maxInlinePills));
|
|
929
981
|
const overflowCount = this.selectedItems.length - visibleItems.length;
|
|
930
|
-
return (h("div", { class: "pds-multiselect__pill-list pds-multiselect__pill-list--inline", "aria-label":
|
|
982
|
+
return (h("div", { class: "pds-multiselect__pill-list pds-multiselect__pill-list--inline", "aria-label": this.selectedItemsLabel }, visibleItems.map(item => (h("pds-chip", { key: String(item.id), "component-id": `${this.componentId}-pill-${item.id}`, variant: variant, size: "sm", sentiment: "neutral", "dismiss-label": this.pillRemoveLabel, onPdsTagCloseClick: this.handlePillRemove(item) }, item.text))), overflowCount > 0 && (h("span", { class: "pds-multiselect__pill-overflow" }, "+", overflowCount))));
|
|
931
983
|
}
|
|
932
984
|
renderBelowPills() {
|
|
933
985
|
if (this.selectedItems.length === 0)
|
|
934
986
|
return null;
|
|
935
987
|
const variant = this.disabled ? 'text' : 'tag';
|
|
936
|
-
return (h("div", { class: "pds-multiselect__pill-list pds-multiselect__pill-list--below", "aria-label":
|
|
988
|
+
return (h("div", { class: "pds-multiselect__pill-list pds-multiselect__pill-list--below", "aria-label": this.selectedItemsLabel }, this.selectedItems.map(item => (h("pds-chip", { key: String(item.id), "component-id": `${this.componentId}-pill-${item.id}`, variant: variant, size: "md", sentiment: "neutral", "dismiss-label": this.pillRemoveLabel, onPdsTagCloseClick: this.handlePillRemove(item) }, item.text)))));
|
|
937
989
|
}
|
|
938
990
|
getTriggerText() {
|
|
939
991
|
const count = this.selectedItems.length;
|
|
940
992
|
if (count === 0 || (this.selectedDisplay === 'pill' && this.pillPosition === 'below')) {
|
|
993
|
+
// Fall back to a non-empty string: the trigger's accessible name comes from
|
|
994
|
+
// this text, so an empty/undefined placeholder must never leave it nameless
|
|
995
|
+
// (WCAG 4.1.2). The prop is localizable; this last-resort default is not.
|
|
941
996
|
return this.placeholder || 'Select...';
|
|
942
997
|
}
|
|
943
|
-
return
|
|
998
|
+
return pluralize(this.el, count, this.resolveCountForms());
|
|
999
|
+
}
|
|
1000
|
+
/**
|
|
1001
|
+
* The `one`/`other` props are the ergonomic English defaults; `selectedCountLabels`
|
|
1002
|
+
* (object or JSON-string attribute) layers full CLDR forms on top for locales
|
|
1003
|
+
* that need `few`/`many`/`two`/`zero`. Malformed JSON degrades to the defaults.
|
|
1004
|
+
*/
|
|
1005
|
+
resolveCountForms() {
|
|
1006
|
+
const base = {
|
|
1007
|
+
one: this.selectedCountLabelOne,
|
|
1008
|
+
other: this.selectedCountLabelOther,
|
|
1009
|
+
};
|
|
1010
|
+
const extra = this.selectedCountLabels;
|
|
1011
|
+
if (!extra)
|
|
1012
|
+
return base;
|
|
1013
|
+
if (typeof extra === 'string') {
|
|
1014
|
+
try {
|
|
1015
|
+
const parsed = JSON.parse(extra);
|
|
1016
|
+
return parsed && typeof parsed === 'object' ? Object.assign(Object.assign({}, base), parsed) : base;
|
|
1017
|
+
}
|
|
1018
|
+
catch (_a) {
|
|
1019
|
+
return base; // not valid JSON → fall back to the English-shape defaults
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
return Object.assign(Object.assign({}, base), extra);
|
|
944
1023
|
}
|
|
945
1024
|
render() {
|
|
946
1025
|
const hasSelections = this.selectedItems.length > 0;
|
|
947
|
-
return (h(Host, { key: '
|
|
1026
|
+
return (h(Host, { key: '4a54a778522d0a1d2f45c32928e7a663f19c0189', "aria-disabled": this.disabled ? 'true' : null }, h("div", { key: '3593eb4fa1a0ae575b1c0ed03f0763dcea04c9e6', class: "pds-multiselect", onFocusout: this.handleContainerFocusOut }, this.label && (h("label", { key: 'f91a680ae3c3021bac6bd99368d3ef6ad6438898', id: `${this.componentId}-label`, htmlFor: this.componentId, class: {
|
|
948
1027
|
'pds-multiselect__label': true,
|
|
949
1028
|
'visually-hidden': this.hideLabel,
|
|
950
|
-
} }, this.label)), h("div", { key: '
|
|
1029
|
+
} }, this.label)), h("div", { key: 'de2899f19057b8cd19cf3467251d03c1b43b73f5', class: "pds-multiselect__wrapper", ref: el => (this.containerEl = el), style: { width: this.triggerWidth } }, this.selectedDisplay === 'pill' && this.pillPosition === 'inline' ? (h("div", { ref: el => (this.pillInlineTriggerEl = el || undefined), part: "trigger", class: {
|
|
951
1030
|
'pds-multiselect__trigger': true,
|
|
952
1031
|
'pds-multiselect__trigger--open': this.isOpen,
|
|
953
1032
|
'pds-multiselect__trigger--disabled': this.disabled,
|
|
@@ -963,7 +1042,7 @@ const PdsMultiselect = class {
|
|
|
963
1042
|
}, 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 }, h("span", { class: {
|
|
964
1043
|
'pds-multiselect__trigger-text': true,
|
|
965
1044
|
'pds-multiselect__trigger-text--placeholder': !hasSelections || (this.selectedDisplay === 'pill' && this.pillPosition === 'below'),
|
|
966
|
-
} }, this.getTriggerText()), h("pds-icon", { class: "pds-multiselect__icon", icon: enlarge }))), this.renderDropdown()), this.selectedDisplay === 'pill' && this.pillPosition === 'below' && this.renderBelowPills(), h("span", { key: '
|
|
1045
|
+
} }, this.getTriggerText()), h("pds-icon", { class: "pds-multiselect__icon", icon: enlarge }))), this.renderDropdown()), this.selectedDisplay === 'pill' && this.pillPosition === 'below' && this.renderBelowPills(), h("span", { key: '973443f9eb29dcf7fb1bde3f9101ac02967a8fd9', class: "visually-hidden", "aria-live": "polite", "aria-atomic": "true" }, this.removalAnnouncement), this.helperMessage && !(this.errorMessage && this.errorMessage.length > 0) && (h("p", { key: '568aab2b278abb7f4426d84ee926b4883375fb11', class: "pds-multiselect__helper", id: messageId(this.componentId, 'helper') }, this.helperMessage)), this.errorMessage && (h("p", { key: 'daddf192efd47df8c15267b9896913b926e02544', class: "pds-multiselect__error", id: messageId(this.componentId, 'error') }, h("pds-icon", { key: 'd0c72ab75a8e02e61c09e980ae817790804a776a', icon: danger, size: "small" }), this.errorMessage)), h("div", { key: '0453db2fca10b3573b1dd244875f90c856c8887b', style: { display: 'none' } }, h("slot", { key: 'a612741afc9545e5e50c47d27c3c27c1d7cade3c' })))));
|
|
967
1046
|
}
|
|
968
1047
|
static get formAssociated() { return true; }
|
|
969
1048
|
get el() { return getElement(this); }
|
|
@@ -3,6 +3,7 @@ import { i as isSpecTest, b as isRequired, e as exposeTypeProperty, a as assignD
|
|
|
3
3
|
import { d as debounceEvent } from './utils-tJa4KYNO.js';
|
|
4
4
|
import { i as inheritAriaAttributes, a as inheritAttributes } from './attributes-C0M1gTKv.js';
|
|
5
5
|
import { b as danger } from './index-D4ys0pep.js';
|
|
6
|
+
import { f as formatMessage } from './i18n-format-BKsJZTyn.js';
|
|
6
7
|
|
|
7
8
|
const labelCss = () => `: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)}`;
|
|
8
9
|
|
|
@@ -53,6 +54,12 @@ const PdsTextarea = class {
|
|
|
53
54
|
* If true, the textarea has action content in the label area
|
|
54
55
|
*/
|
|
55
56
|
this.hasAction = false;
|
|
57
|
+
/**
|
|
58
|
+
* Template for the character-counter's accessible label. Pass a translated
|
|
59
|
+
* string to localize it; `{current}` and `{max}` are interpolated.
|
|
60
|
+
* @defaultValue '{current} of {max} characters'
|
|
61
|
+
*/
|
|
62
|
+
this.characterCountLabel = '{current} of {max} characters';
|
|
56
63
|
this.onBlur = (ev) => {
|
|
57
64
|
this.hasFocus = false;
|
|
58
65
|
if (this.focusedValue !== this.value) {
|
|
@@ -250,7 +257,7 @@ const PdsTextarea = class {
|
|
|
250
257
|
return null;
|
|
251
258
|
}
|
|
252
259
|
const currentLength = this.getValue().length;
|
|
253
|
-
return (h("div", { class: "pds-textarea__character-counter", ref: (el) => this.characterCounter = el, role: "status", "aria-live": "polite", "aria-label":
|
|
260
|
+
return (h("div", { class: "pds-textarea__character-counter", ref: (el) => this.characterCounter = el, role: "status", "aria-live": "polite", "aria-label": formatMessage(this.characterCountLabel, { current: currentLength, max: this.maxLength }) }, currentLength, " / ", this.maxLength));
|
|
254
261
|
}
|
|
255
262
|
renderAction() {
|
|
256
263
|
const hasAction = this.el.querySelector('[slot="action"]') !== null;
|
|
@@ -304,10 +311,10 @@ const PdsTextarea = class {
|
|
|
304
311
|
}
|
|
305
312
|
render() {
|
|
306
313
|
const value = this.getValue();
|
|
307
|
-
return (h(Host, { key: '
|
|
308
|
-
h("div", { key: '
|
|
309
|
-
h("p", { key: '
|
|
310
|
-
h("p", { key: '
|
|
314
|
+
return (h(Host, { key: '838d12ba686fb041996c44522d3fd30e1b56c610', "aria-disabled": this.disabled ? 'true' : null, "aria-readonly": this.readonly ? 'true' : null, "has-action": this.hasAction && !this.hideLabel ? 'true' : null }, h("div", { key: 'bd3eef138a5c8f2cd4e48c007561bb1b12f4e575', class: "pds-textarea" }, this.label &&
|
|
315
|
+
h("div", { key: 'f83f23b17cd157d48bb5c0c5067ca5f611d73529', class: "pds-textarea__label-wrapper" }, h("label", { key: '896b7b495ad6f7deb8d4738e623f0676f0a98c1f', htmlFor: this.componentId }, h("span", { key: '02b06db969467f6c4e83e0f713bee0be76f8dfff', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), !this.hideLabel && this.renderAction()), h("div", { key: '15c5964576e73db36cee4a9ca868c28571250a27', class: "pds-textarea__field-wrapper" }, h("textarea", Object.assign({ key: '74713a5d438fc01103ca99f0c77abd84b7d2d16a', ref: (el) => this.nativeTextarea = el, "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage), "aria-invalid": this.invalid ? "true" : undefined, autocomplete: this.autocomplete, class: this.textareaClassNames(), disabled: this.disabled, id: this.componentId, maxlength: this.maxLength, name: this.name, placeholder: this.placeholder, readOnly: this.readonly, required: this.required, rows: this.rows, onBlur: this.onBlur, onChange: this.onTextareaChange, onFocus: this.onFocus, onInput: this.onInput, onKeyDown: this.onKeyDown }, this.inheritedAttributes), value), this.renderCharacterCounter()), this.helperMessage &&
|
|
316
|
+
h("p", { key: 'e42f174f4153363ce745db264fd3a9ee46178a03', class: "pds-textarea__helper-message", id: messageId(this.componentId, 'helper') }, this.helperMessage), this.invalid &&
|
|
317
|
+
h("p", { key: '44189515611ff9fa51d2815a7066626b6ba5df2c', "aria-live": "assertive", class: "pds-textarea__error-message", id: messageId(this.componentId, 'error') }, h("pds-icon", { key: '64d275da09cdf1c2cc27d4c0a780dd414c265534', icon: danger, size: "small" }), this.errorMessage))));
|
|
311
318
|
}
|
|
312
319
|
static get formAssociated() { return true; }
|
|
313
320
|
get el() { return getElement(this); }
|
|
@@ -28,6 +28,12 @@ const PdsToast = class {
|
|
|
28
28
|
* @default 'default'
|
|
29
29
|
*/
|
|
30
30
|
this.type = 'default';
|
|
31
|
+
/**
|
|
32
|
+
* Accessible label for the dismiss button. Pass a translated string to
|
|
33
|
+
* localize it; defaults to English.
|
|
34
|
+
* @defaultValue 'Dismiss message'
|
|
35
|
+
*/
|
|
36
|
+
this.dismissLabel = 'Dismiss message';
|
|
31
37
|
/**
|
|
32
38
|
* Whether the toast is currently visible.
|
|
33
39
|
*/
|
|
@@ -117,13 +123,13 @@ const PdsToast = class {
|
|
|
117
123
|
return this.icon && h("pds-icon", { name: this.icon, class: "pds-toast__icon" });
|
|
118
124
|
}
|
|
119
125
|
render() {
|
|
120
|
-
return (h(Host, { key: '
|
|
126
|
+
return (h(Host, { key: 'a1ec97158a6665aa25b58b1954b4b5c622590615', hidden: !this.isVisible }, h("div", { key: 'd9b01164364c76512852a260cede50000b73a563', class: {
|
|
121
127
|
'pds-toast': true,
|
|
122
128
|
[`pds-toast--${this.type}`]: this.type !== 'default',
|
|
123
129
|
'pds-toast--animating-out': this.isAnimatingOut
|
|
124
|
-
}, role: "alert", "aria-live": "polite" }, this.renderIcon(), h("span", { key: '
|
|
130
|
+
}, role: "alert", "aria-live": "polite" }, this.renderIcon(), h("span", { key: '1f581c7c29ea3fc795dfca061d3575c5a9895b3c', class: "pds-toast__message" }, h("slot", { key: '645b31eae3be23de63ab2562234caf0be2510645' })), this.dismissible && (h("button", { key: '44a62b304468c0fca0b8d490ad9c8b5932176ac9', type: "button", part: "dismiss", class: "pds-toast__button", onClick: () => {
|
|
125
131
|
this.dismiss();
|
|
126
|
-
}, "aria-label":
|
|
132
|
+
}, "aria-label": this.dismissLabel }, h("pds-icon", { key: 'fde63f279f696d9f02875cc1beee3542c97f0c7e', name: "remove" }))))));
|
|
127
133
|
}
|
|
128
134
|
get el() { return getElement(this); }
|
|
129
135
|
static get watchers() { return {
|